[
  {
    "path": ".changeset/README.md",
    "content": "# Changesets\n\nHello and welcome! This folder has been automatically generated by `@changesets/cli`, a build tool that works\nwith multi-package repos, or single-package repos to help you version and publish your code. You can\nfind the full documentation for it [in our repository](https://github.com/changesets/changesets)\n\nWe have a quick list of common questions to get you started engaging with this project in\n[our documentation](https://github.com/changesets/changesets/blob/main/docs/common-questions.md)\n"
  },
  {
    "path": ".changeset/changelog.js",
    "content": "import { getInfo, getInfoFromPullRequest } from '@changesets/get-github-info';\n\n/**\n * @returns {string}\n */\nfunction getRepo() {\n  return 'hey-api/openapi-ts';\n}\n\n/** @type {import(\"@changesets/types\").ChangelogFunctions} */\nexport default {\n  getDependencyReleaseLine: async (_, dependenciesUpdated) => {\n    if (!dependenciesUpdated.length) {\n      return '';\n    }\n\n    const list = dependenciesUpdated.map(\n      (dependency) => `  - ${dependency.name}@${dependency.newVersion}`,\n    );\n\n    return ['### Updated Dependencies:', ...list].join('\\n');\n  },\n  getReleaseLine: async (changeset) => {\n    const repo = getRepo();\n\n    /** @type number | undefined */\n    let prFromSummary;\n    /** @type string | undefined */\n    let commitFromSummary;\n    /** @type string[] */\n    const usersFromSummary = [];\n\n    // Remove PR, commit, author/user lines from summary\n    const replacedChangelog = changeset.summary\n      .replace(/^\\s*(?:pr|pull|pull\\s+request):\\s*#?(\\d+)/im, (_, pr) => {\n        const num = Number(pr);\n        if (!Number.isNaN(num)) {\n          prFromSummary = num;\n        }\n        return '';\n      })\n      .replace(/^\\s*commit:\\s*([^\\s]+)/im, (_, commit) => {\n        commitFromSummary = commit;\n        return '';\n      })\n      .replace(/^\\s*(?:author|user):\\s*@?([^\\s]+)/gim, (_, user) => {\n        usersFromSummary.push(user);\n        return '';\n      })\n      .trim();\n\n    const links = await (async () => {\n      if (prFromSummary !== undefined) {\n        let { links } = await getInfoFromPullRequest({\n          pull: prFromSummary,\n          repo,\n        });\n        if (commitFromSummary) {\n          const shortCommitId = commitFromSummary.slice(0, 7);\n          links = {\n            ...links,\n            commit: `[\\`${shortCommitId}\\`](https://github.com/${repo}/commit/${commitFromSummary})`,\n          };\n        }\n        return links;\n      }\n      const commitToFetchFrom = commitFromSummary || changeset.commit;\n      if (commitToFetchFrom) {\n        let { links } = await getInfo({ commit: commitToFetchFrom, repo });\n        const shortCommitId = commitToFetchFrom.slice(0, 7);\n        links = {\n          ...links,\n          commit: `[\\`${shortCommitId}\\`](https://github.com/${repo}/commit/${commitToFetchFrom})`,\n        };\n        return links;\n      }\n      return {\n        commit: null,\n        pull: null,\n        user: null,\n      };\n    })();\n\n    const users = usersFromSummary.length\n      ? usersFromSummary\n          .map((userFromSummary) => `[@${userFromSummary}](https://github.com/${userFromSummary})`)\n          .join(', ')\n      : links.user;\n\n    const metadata = [\n      links.pull === null ? '' : ` (${links.pull})`,\n      links.commit === null ? '' : ` (${links.commit})`,\n      users === null ? '' : ` by ${users}`,\n    ].join('');\n\n    // Split summary into first line and the rest\n    const [firstLine, ...rest] = replacedChangelog.split('\\n');\n    const restSummary = rest.join('\\n').trim();\n\n    // No code block conversion: preserve original triple backtick code blocks and indentation\n    let releaseLine = `\\n- ${firstLine}${metadata}`;\n    if (restSummary) {\n      releaseLine += '\\n\\n' + restSummary;\n    }\n    return releaseLine;\n  },\n};\n"
  },
  {
    "path": ".changeset/config.json",
    "content": "{\n  \"$schema\": \"https://unpkg.com/@changesets/config@3.1.1/schema.json\",\n  \"access\": \"public\",\n  \"baseBranch\": \"main\",\n  \"changelog\": \"./changelog.js\",\n  \"commit\": false,\n  \"fixed\": [],\n  \"ignore\": [],\n  \"linked\": [],\n  \"updateInternalDependencies\": \"minor\",\n  \"___experimentalUnsafeOptions_WILL_CHANGE_IN_PATCH\": {\n    \"onlyUpdatePeerDependentsWhenOutOfRange\": true\n  }\n}\n"
  },
  {
    "path": ".editorconfig",
    "content": "root = true\n\n[*]\ncharset = utf-8\nend_of_line = lf\nindent_size = 2\nindent_style = space\ninsert_final_newline = true\ntrim_trailing_whitespace = true\n"
  },
  {
    "path": ".gitattributes",
    "content": "* text=auto eol=lf\nbun.lockb linguist-generated=true\npackage-lock.json linguist-generated=true\npnpm-lock.yaml linguist-generated=true\nyarn.lock linguist-generated=true\n"
  },
  {
    "path": ".github/FUNDING.yml",
    "content": "github:\n  - hey-api\n"
  },
  {
    "path": ".github/ISSUE_TEMPLATE/bug_report.yml",
    "content": "name: Bug report\ndescription: Report an issue with the project.\n\nlabels:\n  - bug 🔥\n\nbody:\n  - type: markdown\n    attributes:\n      value: |\n        Thanks for taking the time to fill out this bug report! Please do your best to fill out as much information as possible.\n\n  - type: textarea\n    id: description\n    attributes:\n      label: Description\n      description: Please check if there is an existing bug report before creating a new issue. If you intend to submit a pull request to fix this issue, let us know in the description.\n      placeholder: Bug description\n    validations:\n      required: true\n\n  - type: textarea\n    id: config\n    attributes:\n      label: Reproducible example or configuration\n      description: Please provide a reproducible StackBlitz example, your configuration file, or CLI command used to recreate the issue.\n      placeholder: https://stackblitz.com/edit/hey-api-client-fetch-example\n      value: https://stackblitz.com/edit/hey-api-client-fetch-example\n\n  - type: textarea\n    id: openapi-spec\n    attributes:\n      label: OpenAPI specification (optional)\n      description: Minimal OpenAPI specification needed to recreate the issue.\n      placeholder: OpenAPI Specification\n\n  - type: textarea\n    id: system-info\n    attributes:\n      label: System information (optional)\n      description: Any additional relevant system information. This may include OS, browser, NPM version, Node.js version, etc.\n      placeholder: System information\n"
  },
  {
    "path": ".github/ISSUE_TEMPLATE/feature_request.yml",
    "content": "name: Feature Request\n\ndescription: Suggest a new feature for the project.\n\nlabels:\n  - feature 🚀\n\nbody:\n  - type: markdown\n    attributes:\n      value: |\n        Thanks for taking the time to request a new feature! Please ensure your feature request has enough information so maintainers can decide if it will be worked on.\n\n  - type: textarea\n    id: description\n    attributes:\n      label: Description\n      description: Please provide a clear and concise description of the proposed feature. The more information you can provide, the better.\n      placeholder: Feature description\n    validations:\n      required: true\n"
  },
  {
    "path": ".github/copilot-instructions.md",
    "content": "# Hey API OpenAPI TypeScript Codegen\n\nOpenAPI TypeScript is a CLI tool and library for generating TypeScript clients, SDKs, validators, and schemas from OpenAPI specifications. This is a monorepo built with pnpm workspaces, Turbo build orchestration, and TypeScript.\n\n**ALWAYS reference these instructions first and fallback to search or bash commands only when you encounter unexpected information that does not match the info here.**\n\n## Working Effectively\n\n### Prerequisites and Setup\n\n- Install Node.js (see `.nvmrc` for recommended version)\n- Install pnpm globally: `npm install -g pnpm@10.15.1`\n- Clone the repository and run setup commands\n\n### Bootstrap, Build, and Test\n\n```bash\n# Install dependencies (takes ~1m 20s)\npnpm install\n\n# Build packages only (NEVER CANCEL - takes ~2m 15s - set timeout to 180+ seconds)\npnpm build --filter=\"@hey-api/**\"\n\n# Build all including examples (NEVER CANCEL - takes ~5+ minutes - set timeout to 360+ seconds)\npnpm build\n\n# Run tests (takes ~1m 5s - set timeout to 120+ seconds)\n# NOTE: Some network-dependent tests may fail in sandboxed environments\npnpm test\n\n# Run linting (takes ~35s)\npnpm lint\n\n# Run type checking (NEVER CANCEL - takes ~1m 20s - set timeout to 120+ seconds)\npnpm typecheck\n\n# Format code (takes ~35s)\npnpm format\n```\n\n### Development Workflow\n\n```bash\n# Start development mode for main package (watches for changes)\npnpm --filter @hey-api/openapi-ts dev\n\n# Start development server for examples (e.g., fetch example)\npnpm --filter @example/openapi-ts-fetch dev\n# Server starts on http://localhost:5173/\n\n# Run CLI tool directly\nnode packages/openapi-ts/dist/run.js --help\n# or after building\nnpx @hey-api/openapi-ts --help\n```\n\n## Build and Test Details\n\n### **CRITICAL BUILD TIMING**\n\n- **NEVER CANCEL BUILD COMMANDS** - They may take 2-5+ minutes\n- `pnpm build --filter=\"@hey-api/**\"`: ~2m 15s (packages only)\n- `pnpm build`: ~5+ minutes (includes docs and examples)\n- `pnpm install`: ~1m 20s\n- `pnpm test`: ~1m 5s\n- `pnpm typecheck`: ~1m 20s\n- `pnpm lint`: ~35s\n- `pnpm format`: ~35s\n\n### Build Issues and Workarounds\n\n- **Docs build may fail** due to pnpm version mismatch in VitePress - this is expected in some environments\n- Use `pnpm build --filter=\"@hey-api/**\"` to build packages without docs\n- **Some tests may fail** in sandboxed environments due to network restrictions (OpenAPI spec downloads)\n- **Generated test files** in `packages/openapi-ts-tests/` contain auto-generated snapshots that may have linting warnings - this is expected\n- **Linting issues** in `.gen/snapshots/` directories are expected for generated code\n\n## Validation\n\n### Manual Testing Scenarios\n\nAfter making changes, ALWAYS validate with these scenarios:\n\n1. **CLI Functionality Test**:\n\n   ```bash\n   # Test CLI help\n   node packages/openapi-ts/dist/run.js --help\n\n   # Test CLI version\n   node packages/openapi-ts/dist/run.js --version\n\n   # Test basic code generation with a simple OpenAPI spec\n   # Create a minimal test spec and generate client code\n   node packages/openapi-ts/dist/run.js -i path/to/spec.json -o ./test-output --plugins \"@hey-api/client-fetch\" \"@hey-api/typescript\"\n   ```\n\n2. **Example Application Test**:\n\n   ```bash\n   # Start fetch example and verify it loads\n   pnpm --filter @example/openapi-ts-fetch dev\n   # Should start on http://localhost:5173/\n   ```\n\n3. **Development Mode Test**:\n   ```bash\n   # Start dev mode and make a small change to verify rebuilding\n   pnpm --filter @hey-api/openapi-ts dev\n   ```\n\n### Pre-commit Validation\n\nALWAYS run these commands before committing or the CI will fail:\n\n```bash\n# Use lint:fix to auto-fix issues (some warnings in generated test files are expected)\npnpm lint:fix\n\n# Run typecheck (can target specific packages with --filter)\npnpm typecheck\n\n# Run tests (some network tests may fail in sandboxed environments)\npnpm test\n```\n\n**NOTE**: Some linting warnings in generated test snapshot files (`.gen/snapshots/`) are expected and should be ignored. The `lint:fix` command will resolve actual source code issues.\n\n## Repository Structure\n\n### Key Packages\n\n- `packages/openapi-ts/` - Main CLI tool and library\n- `packages/codegen-core/` - Core code generation utilities\n- `packages/custom-client/` - Custom HTTP client implementations\n- `packages/nuxt/` - Nuxt.js integration\n- `packages/vite-plugin/` - Vite plugin\n\n### Examples\n\n- `examples/openapi-ts-fetch/` - Fetch client example (React + Vite)\n- `examples/openapi-ts-angular/` - Angular client example\n- `examples/openapi-ts-tanstack-react-query/` - TanStack React Query integration\n- `examples/openapi-ts-vue/` - Vue.js integration\n- Plus many more framework-specific examples\n\n### Configuration Files\n\n- `pnpm-workspace.yaml` - Workspace configuration\n- `turbo.json` - Turbo build configuration\n- `package.json` - Root package with workspace scripts\n- `.nvmrc` - Node.js version specification\n\n## Common Tasks\n\n### Working with the Main Package\n\n```bash\n# Install deps for main package\npnpm --filter @hey-api/openapi-ts install\n\n# Build main package only\npnpm --filter @hey-api/openapi-ts build\n\n# Test main package only\npnpm --filter @hey-api/openapi-ts test\n\n# Start dev mode for main package\npnpm --filter @hey-api/openapi-ts dev\n```\n\n### Working with Examples\n\n```bash\n# List all example packages\nls examples/\n\n# Run specific example\npnpm --filter @example/openapi-ts-fetch dev\n\n# Build all examples\npnpm build --filter=\"@example/**\"\n```\n\n### Debugging and Troubleshooting\n\n- Check `turbo.json` for task dependencies and configuration\n- Use `pnpm list` to see installed packages\n- Use `pnpm why <package>` to understand dependency chains\n- Check individual package `package.json` files for available scripts\n\n## CI/CD Pipeline\n\nThe repository uses GitHub Actions (`.github/workflows/ci.yml`):\n\n- Tests on multiple Node.js versions\n- Tests on multiple OS (macOS, Ubuntu, Windows)\n- Runs build, lint, typecheck, and test commands\n- Publishes preview packages on PRs\n\n## Performance Expectations\n\n- **Cold install**: ~1m 20s\n- **Cold build**: ~2-5m depending on scope\n- **Incremental builds**: ~30s in dev mode\n- **Test suite**: ~1m 5s\n- **Linting**: ~35s\n- **Type checking**: ~1m 20s\n\nRemember: This is a complex monorepo with many dependencies. Be patient with build times and always use appropriate timeouts for long-running commands.\n"
  },
  {
    "path": ".github/workflows/ci.yml",
    "content": "name: CI\n\non:\n  push:\n    branches:\n      - main\n  pull_request:\n  workflow_dispatch:\n\nconcurrency:\n  group: ${{ github.workflow }}-${{ github.ref }}\n  cancel-in-progress: true\n\njobs:\n  setup:\n    name: Setup\n    runs-on: ubuntu-latest\n    outputs:\n      node-version: ${{ steps.nvmrc.outputs.node-version }}\n    steps:\n      - uses: actions/checkout@v6.0.2\n\n      - id: nvmrc\n        run: echo \"node-version=$(cat .nvmrc)\" >> $GITHUB_OUTPUT\n\n  ci:\n    name: Build, Lint, Test\n    needs: setup\n    runs-on: ${{ matrix.os }}\n    env:\n      TURBO_TEAM: ${{ secrets.TURBO_TEAM }}\n      TURBO_TELEMETRY_DISABLED: 1\n      TURBO_TOKEN: ${{ secrets.TURBO_TOKEN }}\n    strategy:\n      matrix:\n        include:\n          # All Node versions on Ubuntu (fast, catches Node issues)\n          - os: ubuntu-latest\n            node-version: '20.19.0'\n          - os: ubuntu-latest\n            node-version: '22.12.0'\n          - os: ubuntu-latest\n            node-version: ${{ needs.setup.outputs.node-version }}\n            is-primary: true # Primary runner for examples/previews\n          # Latest Node on other OSes (catches platform issues)\n          - os: macos-latest\n            node-version: ${{ needs.setup.outputs.node-version }}\n          - os: windows-latest\n            node-version: ${{ needs.setup.outputs.node-version }}\n    steps:\n      - uses: actions/checkout@v6.0.2\n        with:\n          fetch-depth: 0\n\n      - uses: pnpm/action-setup@v5.0.0\n\n      - uses: actions/setup-node@v6\n        with:\n          node-version: ${{ matrix.node-version }}\n          cache: pnpm\n\n      - uses: astral-sh/setup-uv@v7\n        with:\n          enable-cache: true\n\n      - name: Install dependencies\n        run: pnpm install --frozen-lockfile\n\n      - name: Build packages\n        run: pnpm tb \"@hey-api/**\"\n\n      - name: Check examples generated code\n        if: matrix.is-primary\n        run: pnpm examples:check\n\n      - name: Build examples\n        if: matrix.is-primary\n        run: pnpm tb \"@example/**\"\n\n      - name: Run linter\n        run: pnpm turbo run lint\n\n      - name: Run type check\n        run: pnpm ty \"!@test/openapi-ts\"\n\n      - name: Run type check (heavy tests)\n        run: pnpm ty \"@test/openapi-ts\"\n\n      - name: Run tests\n        run: pnpm test\n\n      - name: Publish preview packages\n        if: matrix.is-primary && github.event_name == 'pull_request'\n        run: ./scripts/publish-preview-packages.sh\n        env:\n          TURBO_SCM_BASE: ${{ github.event_name == 'pull_request' && github.event.pull_request.base.sha || github.event.before }}\n"
  },
  {
    "path": ".github/workflows/contributors.yml",
    "content": "name: Update Contributors\n\non:\n  schedule:\n    - cron: '0 0 * * *' # Every day at 00:00 UTC\n  workflow_dispatch:\n\njobs:\n  update:\n    runs-on: ubuntu-latest\n    steps:\n      - uses: actions/checkout@v6.0.2\n\n      - name: Install dependencies\n        run: sudo apt-get update && sudo apt-get install -y jq curl\n\n      - name: Run update contributors script\n        env:\n          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}\n        run: |\n          chmod +x ./scripts/update-contributors.sh\n          ./scripts/update-contributors.sh\n\n      - name: Commit and push if updated\n        run: |\n          git config user.name \"github-actions[bot]\"\n          git config user.email \"github-actions[bot]@users.noreply.github.com\"\n          git add ./docs/partials/contributors-list.md\n          git diff --cached --quiet || git commit -m \"chore(docs): update contributors list\"\n          git push\n"
  },
  {
    "path": ".github/workflows/coverage.yml",
    "content": "name: Coverage\n\non:\n  push:\n    branches:\n      - main\n    paths-ignore:\n      - docs/**\n  pull_request:\n    paths-ignore:\n      - docs/**\n\nconcurrency:\n  group: ${{ github.workflow }}-${{ github.ref }}\n  cancel-in-progress: true\n\njobs:\n  upload:\n    name: Upload\n    runs-on: ubuntu-latest\n    env:\n      TURBO_TEAM: ${{ secrets.TURBO_TEAM }}\n      TURBO_TELEMETRY_DISABLED: 1\n      TURBO_TOKEN: ${{ secrets.TURBO_TOKEN }}\n    steps:\n      - uses: actions/checkout@v6.0.2\n\n      - uses: pnpm/action-setup@v5.0.0\n\n      - uses: actions/setup-node@v6\n        with:\n          node-version-file: '.nvmrc'\n          cache: pnpm\n\n      - name: Install dependencies\n        run: pnpm install --frozen-lockfile\n\n      - name: Run test coverage\n        run: pnpm test:coverage\n\n      - name: Upload code coverage to codecov.io\n        uses: codecov/codecov-action@v5\n        with:\n          token: ${{ secrets.CODECOV_TOKEN }}\n          directory: ./coverage\n          flags: unittests\n          fail_ci_if_error: true\n"
  },
  {
    "path": ".github/workflows/pullfrog.yml",
    "content": "# PULLFROG ACTION — DO NOT EDIT EXCEPT WHERE INDICATED\nname: Pullfrog\nrun-name: ${{ inputs.name || github.workflow }}\non:\n  workflow_dispatch:\n    inputs:\n      prompt:\n        type: string\n        description: Agent prompt\n      name:\n        type: string\n        description: Run name\n\npermissions:\n  id-token: write\n  contents: write\n  pull-requests: write\n  issues: write\n  actions: read\n  checks: read\n\njobs:\n  pullfrog:\n    runs-on: ubuntu-latest\n    steps:\n      - name: Checkout code\n        uses: actions/checkout@v6\n        with:\n          fetch-depth: 1\n      - name: Run agent\n        uses: pullfrog/pullfrog@v0\n        with:\n          prompt: ${{ inputs.prompt }}\n        env:\n          # add any additional keys your agent(s) need\n          # optionally, comment out any you won't use\n          ANTHROPIC_API_KEY: ${{ secrets.ANTHROPIC_API_KEY }}\n          OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}\n          GOOGLE_API_KEY: ${{ secrets.GOOGLE_API_KEY }}\n          GEMINI_API_KEY: ${{ secrets.GEMINI_API_KEY }}\n          CURSOR_API_KEY: ${{ secrets.CURSOR_API_KEY }}\n          MISTRAL_API_KEY: ${{ secrets.MISTRAL_API_KEY }}\n          GROQ_API_KEY: ${{ secrets.GROQ_API_KEY }}\n          DEEPSEEK_API_KEY: ${{ secrets.DEEPSEEK_API_KEY }}\n          OPENROUTER_API_KEY: ${{ secrets.OPENROUTER_API_KEY }}\n"
  },
  {
    "path": ".github/workflows/release.yml",
    "content": "name: Release\n\non:\n  push:\n    branches:\n      - main\n\npermissions:\n  contents: write\n  id-token: write\n  issues: write\n  packages: write\n  pull-requests: write\n\nconcurrency: ${{ github.workflow }}-${{ github.ref }}\n\njobs:\n  release:\n    name: Release\n    runs-on: ubuntu-latest\n    env:\n      TURBO_TEAM: ${{ secrets.TURBO_TEAM }}\n      TURBO_TELEMETRY_DISABLED: 1\n      TURBO_TOKEN: ${{ secrets.TURBO_TOKEN }}\n    steps:\n      - uses: actions/checkout@v6.0.2\n\n      - uses: pnpm/action-setup@v5.0.0\n\n      - uses: actions/setup-node@v6\n        with:\n          node-version-file: '.nvmrc'\n          cache: pnpm\n\n      - name: Install Dependencies\n        run: pnpm install --frozen-lockfile\n\n      - name: Build packages\n        run: pnpm tb \"@hey-api/**\"\n\n      - name: Generate GitHub App Token\n        id: app-token\n        uses: actions/create-github-app-token@v3.0.0\n        with:\n          app-id: ${{ secrets.GIT_APP_CLIENT_ID }}\n          private-key: ${{ secrets.GIT_APP_PRIVATE_KEY }}\n\n      - name: Create Release Pull Request\n        uses: changesets/action@v1.7.0\n        with:\n          commit: 'ci: release'\n          publish: pnpm changeset publish\n          title: 'ci: release'\n          version: pnpm changeset version\n        env:\n          GITHUB_TOKEN: ${{ steps.app-token.outputs.token }}\n          NPM_CONFIG_PROVENANCE: true\n\n      - name: Get current branch\n        run: echo \"CURRENT_BRANCH=$(git branch --show-current)\" >> $GITHUB_ENV\n\n      - name: Update lock file\n        if: env.CURRENT_BRANCH == 'changeset-release/main'\n        run: pnpm install --lockfile-only\n\n      - name: Commit lock file\n        if: env.CURRENT_BRANCH == 'changeset-release/main'\n        uses: stefanzweifel/git-auto-commit-action@v7.1.0\n        with:\n          branch: ${{ env.CURRENT_BRANCH }}\n          commit_message: 'chore: update lock file'\n\n  snapshot:\n    name: Snapshot Release\n    runs-on: ubuntu-latest\n    needs: release\n    if: github.ref == 'refs/heads/main'\n    env:\n      TURBO_TEAM: ${{ secrets.TURBO_TEAM }}\n      TURBO_TELEMETRY_DISABLED: 1\n      TURBO_TOKEN: ${{ secrets.TURBO_TOKEN }}\n    steps:\n      - uses: actions/checkout@v6.0.2\n\n      - uses: pnpm/action-setup@v5.0.0\n\n      - uses: actions/setup-node@v6\n        with:\n          node-version-file: '.nvmrc'\n          cache: pnpm\n\n      - name: Install Dependencies\n        run: pnpm install --frozen-lockfile\n\n      - name: Build packages\n        run: pnpm tb \"@hey-api/**\"\n\n      - name: Publish snapshot\n        run: |\n          pnpm changeset version --snapshot next\n          pnpm changeset publish --tag next\n        env:\n          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}\n          NPM_CONFIG_PROVENANCE: true\n"
  },
  {
    "path": ".gitignore",
    "content": ".DS_Store\n.cache\n.mypy_cache\n.idea\n.tmp\njunit.xml\nnode_modules\nnpm-debug.log*\ntemp\nyarn-debug.log*\nyarn-error.log*\n*.tsbuildinfo\n\n*.iml\ndist\ncoverage\n.env\n.venv\n.next\n.nuxt\n.output\n.svelte-kit\n.turbo\n\n# test files\n.gen/\ndev/gen/\ntest/generated\n\n# debug files\nopenapi-ts-debug-*\n# error files\nlogs\nopenapi-ts-error-*\n\n# But DO NOT ignore generated snapshots!\n!test/__snapshots__/test/generated\n!test/__snapshots__/test/generated/**\n"
  },
  {
    "path": ".husky/pre-commit",
    "content": "pnpm lint-staged\n"
  },
  {
    "path": ".npmrc",
    "content": "engine-strict=true\nsave-exact=true\n"
  },
  {
    "path": ".nvmrc",
    "content": "24.14.0\n"
  },
  {
    "path": ".oxfmtrc.json",
    "content": "{\n  \"$schema\": \"./node_modules/oxfmt/configuration_schema.json\",\n  \"singleQuote\": true,\n  \"ignorePatterns\": [\n    \"**/.tsdown/\",\n    \"**/dist/\",\n    \"**/node_modules/\",\n    \"temp/\",\n    \"dev/.gen/\",\n    \"examples/openapi-ts-openai/src/client/**/*.ts\",\n    \"**/test/generated/\",\n    \"**/__snapshots__/\",\n    \"**/.next/\",\n    \"**/.nuxt/\",\n    \"**/.output/\",\n    \"**/.svelte-kit/\",\n    \"**/.vitepress/cache\",\n    \"**/.vitepress/dist\",\n    \"**/.angular\"\n  ]\n}\n"
  },
  {
    "path": ".prettierignore",
    "content": "**/.changeset/*.md\n**/node_modules\n**/templates\n**/dist\n**/.next\n**/.nuxt\n**/.output\n**/.svelte-kit\n**/.vitepress/cache\n**/.vitepress/dist\n**/test/generated\n**/__snapshots__\n\n**/CHANGELOG.md\npnpm-lock.yaml\n"
  },
  {
    "path": ".vscode/extensions.json",
    "content": "{\n  \"recommendations\": [\n    \"dbaeumer.vscode-eslint\",\n    \"EditorConfig.EditorConfig\",\n    \"hilleer.yaml-plus-json\",\n    \"oxc.oxc-vscode\",\n    \"streetsidesoftware.code-spell-checker\",\n    \"usernamehw.errorlens\"\n  ]\n}\n"
  },
  {
    "path": ".vscode/launch.json",
    "content": "{\n  \"version\": \"0.2.0\",\n  \"configurations\": [\n    {\n      \"type\": \"node\",\n      \"request\": \"attach\",\n      \"name\": \"Attach\",\n      \"port\": 9229,\n      \"skipFiles\": [\"<node_internals>/**\"]\n    },\n    {\n      \"name\": \"TS: Debug\",\n      \"type\": \"node\",\n      \"request\": \"launch\",\n      \"preLaunchTask\": \"build:openapi-ts\",\n      \"program\": \"${workspaceFolder}/packages/openapi-ts/dist/run.mjs\",\n      \"cwd\": \"${workspaceFolder}/dev\"\n    },\n    {\n      \"name\": \"Python: Debug\",\n      \"type\": \"node\",\n      \"request\": \"launch\",\n      \"preLaunchTask\": \"build:openapi-python\",\n      \"program\": \"${workspaceFolder}/packages/openapi-python/dist/run.mjs\",\n      \"cwd\": \"${workspaceFolder}/dev\"\n    }\n  ]\n}\n"
  },
  {
    "path": ".vscode/settings.json",
    "content": "{\n  \"editor.codeActionsOnSave\": {\n    \"source.fixAll.eslint\": \"explicit\"\n  },\n  \"editor.defaultFormatter\": \"oxc.oxc-vscode\",\n  \"editor.quickSuggestions\": {\n    \"other\": \"on\",\n    \"strings\": \"on\"\n  },\n  \"eslint.format.enable\": true,\n  \"eslint.nodePath\": \"./node_modules\",\n  \"eslint.workingDirectories\": [{ \"pattern\": \"./packages/*/\" }],\n  \"oxc.fmt.configPath\": \".oxfmtrc.json\",\n  \"search.exclude\": {\n    \"**/*-lock.yaml\": true,\n    \"**/*-lock.json\": true,\n    \"**/*.log\": true,\n    \"**/*.map\": true,\n    \"**/*.mjs\": true,\n    \"**/*.mts\": true,\n    \"**/.vitepress/dist\": true,\n    \"**/dist\": true,\n    \"**/.mypy_cache\": true,\n    \"**/__snapshots__\": true,\n    \"**/coverage\": true,\n    \"**/openapi-python-tests/**/.gen\": true,\n    \"**/openapi-ts-tests/**/generated\": true,\n    \"**/openapi-ts-tests/**/.gen\": true,\n    \"**/*.tsbuildinfo\": true\n  },\n  \"typescript.experimental.useTsgo\": true,\n  \"typescript.preferences.autoImportFileExcludePatterns\": [\"dist/**\"],\n  \"typescript.preferences.autoImportSpecifierExcludeRegexes\": [\"^(node:)?os$\"],\n  \"typescript.tsdk\": \"node_modules/typescript/lib\",\n  \"vitest.rootConfig\": \"vitest.config.ts\",\n  \"[javascript]\": {\n    \"editor.defaultFormatter\": \"oxc.oxc-vscode\"\n  },\n  \"[typescript]\": {\n    \"editor.defaultFormatter\": \"oxc.oxc-vscode\"\n  }\n}\n"
  },
  {
    "path": ".vscode/tasks.json",
    "content": "{\n  \"version\": \"2.0.0\",\n  \"tasks\": [\n    {\n      \"label\": \"build:openapi-ts\",\n      \"type\": \"shell\",\n      \"command\": \"pnpm\",\n      \"args\": [\"turbo\", \"run\", \"build\", \"--filter=@hey-api/openapi-ts\"],\n      \"group\": \"build\",\n      \"problemMatcher\": [\"$tsc\"],\n      \"presentation\": { \"reveal\": \"silent\", \"close\": true }\n    },\n    {\n      \"label\": \"build:openapi-python\",\n      \"type\": \"shell\",\n      \"command\": \"pnpm\",\n      \"args\": [\"turbo\", \"run\", \"build\", \"--filter=@hey-api/openapi-python\"],\n      \"group\": \"build\",\n      \"problemMatcher\": [\"$tsc\"],\n      \"presentation\": { \"reveal\": \"silent\", \"close\": true }\n    }\n  ]\n}\n"
  },
  {
    "path": "CLAUDE.md",
    "content": "# CLAUDE.md\n\nOpenAPI TypeScript is a CLI tool and library for generating TypeScript clients, SDKs, validators, and schemas from OpenAPI specifications. This is a monorepo built with pnpm workspaces, Turbo build orchestration, and TypeScript.\n\n## Quick Reference\n\n```bash\npnpm install                          # Install dependencies\npnpm build --filter=\"@hey-api/**\"     # Build packages only\npnpm build                            # Build everything (packages + examples + docs)\npnpm test                             # Run all tests\npnpm typecheck                        # Type check all packages\npnpm lint                             # Check formatting (oxfmt) + linting (eslint)\npnpm lint:fix                         # Auto-fix formatting and linting\npnpm format                           # Format with oxfmt\n```\n\n### Shortcuts\n\n```bash\npnpm tt -- @hey-api/openapi-ts        # Test specific package\npnpm tw -- @hey-api/openapi-ts        # Test watch specific package\npnpm tu -- @hey-api/openapi-ts        # Update test snapshots\npnpm tb -- @hey-api/openapi-ts        # Build specific package\npnpm ty -- @hey-api/openapi-ts        # Typecheck specific package\n```\n\n### Development\n\n```bash\npnpm dev:ts                           # Watch mode for openapi-ts (runs from dev/)\npnpm dev:py                           # Watch mode for openapi-python (runs from dev/)\n```\n\n## Build Timing\n\n**Do not cancel build commands** - they take significant time:\n\n- `pnpm install`: ~1m 20s\n- `pnpm build --filter=\"@hey-api/**\"`: ~2m 15s\n- `pnpm build` (full): ~5+ minutes\n- `pnpm test`: ~1m 5s\n- `pnpm typecheck`: ~1m 20s\n- `pnpm lint`: ~35s\n\nSet timeouts accordingly (180s+ for builds, 120s+ for tests/typecheck).\n\n## Repository Structure\n\n```\npackages/\n  openapi-ts/          # Main CLI tool and library\n  openapi-python/      # Python DSL generation\n  codegen-core/        # Core code generation utilities\n  shared/              # Cross-package utilities (migrating out)\n  types/               # Shared type definitions\n  custom-client/       # Custom HTTP client implementations\n  nuxt/                # Nuxt.js integration\n  vite-plugin/         # Vite plugin\n  config-vite-base/    # Shared Vite base configuration\n  openapi-ts-tests/    # Test utilities and snapshots\nexamples/              # 16+ framework-specific examples\ndocs/                  # VitePress documentation site\ndev/                   # Development environment (CLI testing configs)\nspecs/                 # OpenAPI test specifications\nscripts/               # Build and test scripts\n```\n\n## Tooling\n\n- **Package manager**: pnpm 10.28.2 (strict engine, exact versions)\n- **Node**: >=20.19.0 (see .nvmrc for exact version)\n- **Build**: Turbo 2.8.0 + tsdown + Rollup\n- **Language**: TypeScript 5.9.3, ESM only\n- **Formatter**: oxfmt 0.27.0 (single quotes via .oxfmtrc.json)\n- **Linter**: ESLint 9 flat config with typescript-eslint, simple-import-sort, sort-destructure-keys, typescript-sort-keys\n- **Tests**: Vitest 3.2.4\n- **Pre-commit**: Husky + lint-staged (runs `pnpm format` + `pnpm lint:fix`)\n- **Python** (for openapi-python): Python >=3.10, mypy, ruff, line length 120\n- **Releases**: Changesets\n\n## Code Conventions\n\n- ESM modules only (`.mts`/`.mjs` extensions in builds)\n- UTF-8, LF line endings, 2-space indentation\n- Single quotes (enforced by oxfmt)\n- Imports sorted by eslint-plugin-simple-import-sort\n- Object/interface keys sorted alphabetically\n- Destructured keys sorted alphabetically\n\n## Refactoring Guidelines\n\nWhen refactoring existing code:\n\n- **Preserve all JSDoc comments** - Read the original file first and keep all existing documentation\n- **Match existing code patterns** - Look at similar files in the codebase for conventions\n- **Prefer `edit` over `write`** - Making targeted edits preserves comments better than rewriting files\n- **Check reference implementations** - For plugin work, use Valibot as a reference for proper patterns\n\n## Pre-commit Checklist\n\nRun before committing (Husky runs format + lint automatically, but also verify):\n\n```bash\npnpm lint:fix       # Auto-fix formatting and linting\npnpm typecheck      # Type check\npnpm test           # Run tests\n```\n\nSome linting warnings in `.gen/snapshots/` directories are expected for generated code.\n\n## Git Conventions\n\n- **Branch naming**: `feat/`, `fix/`, `chore/`, `refactor/`, `docs/` prefixes\n- **Commit messages**: Conventional Commits (`feat:`, `fix:`, `chore:`, `refactor:`, `ci:`, `docs:`)\n- **Releases**: Changesets-based, auto-publish on merge to main\n\n## Known Issues\n\n- Docs build may fail due to pnpm version mismatch in VitePress - use `--filter=\"@hey-api/**\"` to skip\n- Some tests may fail in sandboxed environments due to network restrictions (OpenAPI spec downloads)\n- Generated test files in `packages/openapi-ts-tests/` may have expected linting warnings\n"
  },
  {
    "path": "CODE_OF_CONDUCT.md",
    "content": "# Contributor Covenant Code of Conduct\n\n## Our Pledge\n\nIn the interest of fostering an open and welcoming environment, we as\ncontributors and maintainers pledge to making participation in our project and\nour community a harassment-free experience for everyone, regardless of age, body\nsize, disability, ethnicity, sex characteristics, gender identity and expression,\nlevel of experience, education, socio-economic status, nationality, personal\nappearance, race, religion, or sexual identity and orientation.\n\n## Our Standards\n\nExamples of behavior that contributes to creating a positive environment\ninclude:\n\n- Using welcoming and inclusive language\n- Being respectful of differing viewpoints and experiences\n- Gracefully accepting constructive criticism\n- Focusing on what is best for the community\n- Showing empathy towards other community members\n\nExamples of unacceptable behavior by participants include:\n\n- The use of sexualized language or imagery and unwelcome sexual attention or\n  advances\n- Trolling, insulting/derogatory comments, and personal or political attacks\n- Public or private harassment\n- Publishing others' private information, such as a physical or electronic\n  address, without explicit permission\n- Other conduct which could reasonably be considered inappropriate in a\n  professional setting\n\n## Our Responsibilities\n\nProject maintainers are responsible for clarifying the standards of acceptable\nbehavior and are expected to take appropriate and fair corrective action in\nresponse to any instances of unacceptable behavior.\n\nProject maintainers have the right and responsibility to remove, edit, or\nreject comments, commits, code, wiki edits, issues, and other contributions\nthat are not aligned to this Code of Conduct, or to ban temporarily or\npermanently any contributor for other behaviors that they deem inappropriate,\nthreatening, offensive, or harmful.\n\n## Scope\n\nThis Code of Conduct applies both within project spaces and in public spaces\nwhen an individual is representing the project or its community. Examples of\nrepresenting a project or community include using an official project e-mail\naddress, posting via an official social media account, or acting as an appointed\nrepresentative at an online or offline event. Representation of a project may be\nfurther defined and clarified by project maintainers.\n\n## Enforcement\n\nInstances of abusive, harassing, or otherwise unacceptable behavior may be\nreported by contacting the project team at https://github.com/hey-api/openapi-ts. All\ncomplaints will be reviewed and investigated and will result in a response that\nis deemed necessary and appropriate to the circumstances. The project team is\nobligated to maintain confidentiality with regard to the reporter of an incident.\nFurther details of specific enforcement policies may be posted separately.\n\nProject maintainers who do not follow or enforce the Code of Conduct in good\nfaith may face temporary or permanent repercussions as determined by other\nmembers of the project's leadership.\n\n## Attribution\n\nThis Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,\navailable at https://www.contributor-covenant.org/version/1/4/code-of-conduct.html\n\n[homepage]: https://www.contributor-covenant.org\n\nFor answers to common questions about this code of conduct, see\nhttps://www.contributor-covenant.org/faq\n"
  },
  {
    "path": "LICENSE.md",
    "content": "MIT License\n\nCopyright (c) Hey API\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n"
  },
  {
    "path": "__tests__/changelog.test.ts",
    "content": "import type * as getGitHubInfo from '@changesets/get-github-info';\nimport parse from '@changesets/parse';\nimport type { ModCompWithPackage, NewChangesetWithCommit, VersionType } from '@changesets/types';\nimport { describe, expect, it, vi } from 'vitest';\n\nimport changelog from '../.changeset/changelog.js';\n\ntype GetGitHubInfo = typeof getGitHubInfo;\n\nconst data = {\n  commit: 'a085003',\n  pull: 1613,\n  repo: 'hey-api/openapi-ts',\n  user: 'someone',\n};\n\nvi.mock(\n  '@changesets/get-github-info',\n  (): GetGitHubInfo => ({\n    async getInfo({ commit, repo }) {\n      const { pull, user } = data;\n      const links = {\n        commit: `[\\`${commit}\\`](https://github.com/${repo}/commit/${commit})`,\n        pull: `[#${pull}](https://github.com/${repo}/pull/${pull})`,\n        user: `[@${user}](https://github.com/${user})`,\n      };\n      return {\n        links,\n        pull,\n        user,\n      };\n    },\n    async getInfoFromPullRequest({ pull, repo }) {\n      const { commit, user } = data;\n      const links = {\n        commit: `[\\`${commit}\\`](https://github.com/${repo}/commit/${commit})`,\n        pull: `[#${pull}](https://github.com/${repo}/pull/${pull})`,\n        user: `[@${user}](https://github.com/${user})`,\n      };\n      return {\n        commit,\n        links,\n        user,\n      };\n    },\n  }),\n);\n\nconst getChangeset = (\n  content: string,\n  commit: string | undefined,\n): [NewChangesetWithCommit, VersionType, null | Record<string, any>] => [\n  {\n    ...parse(\n      `---\npkg: \"minor\"\n---\n\nsomething\n${content}\n`,\n    ),\n    commit,\n    id: 'some-id',\n  },\n  'minor',\n  { repo: data.repo },\n];\n\ndescribe('changelog', () => {\n  it('formats dependency release lines', async () => {\n    const changesets: NewChangesetWithCommit[] = [\n      {\n        commit: 'abc123',\n        id: 'fake-id',\n        releases: [],\n        summary: 'update deps',\n      },\n    ];\n    const deps: ModCompWithPackage[] = [\n      {\n        changesets: ['fake-id'],\n        dir: '/fake/path',\n        name: '@hey-api/openapi-ts',\n        newVersion: '0.0.2',\n        oldVersion: '0.0.1',\n        packageJson: {\n          name: '@hey-api/openapi-ts',\n          version: '0.0.1',\n        },\n        type: 'patch',\n      },\n    ];\n\n    const line = await changelog.getDependencyReleaseLine(changesets, deps, {\n      repo: 'org/repo',\n    });\n\n    expect(line).toEqual('### Updated Dependencies:\\n  - @hey-api/openapi-ts@0.0.2');\n  });\n\n  it('formats regular release lines', async () => {\n    const changeset: NewChangesetWithCommit = {\n      commit: 'abc123',\n      id: 'fake-id',\n      releases: [],\n      summary: 'Fixed bug in parser',\n    };\n\n    const line = await changelog.getReleaseLine(changeset, 'patch', {\n      repo: 'org/repo',\n    });\n\n    expect(line).toContain('Fixed bug in parser');\n    expect(line).toContain('abc123');\n  });\n\n  it('with multiple authors', async () => {\n    expect(\n      await changelog.getReleaseLine(\n        ...getChangeset(['author: @one', 'author: @two'].join('\\n'), data.commit),\n      ),\n    ).toEqual(\n      `\\n- something ([#1613](https://github.com/hey-api/openapi-ts/pull/1613)) ([\\`a085003\\`](https://github.com/hey-api/openapi-ts/commit/a085003)) by [@one](https://github.com/one), [@two](https://github.com/two)`,\n    );\n  });\n\n  it('places metadata on the first line and preserves markdown code blocks', async () => {\n    const summary = [\n      'refactor(config): replace `off` with null to disable options',\n      '',\n      '### Updated `output` options',\n      '',\n      'We made the `output` configuration more consistent by using `null` to represent disabled options. [This change](https://heyapi.dev/openapi-ts/migrating#updated-output-options) does not affect boolean options.',\n      '',\n      '```js',\n      'export default {',\n      '  input: \"hey-api/backend\", // sign up at app.heyapi.dev',\n      '  output: {',\n      '    format: null,',\n      '    lint: null,',\n      '    path: \"src/client\",',\n      '    tsConfigPath: null,',\n      '  },',\n      '};',\n      '```',\n    ].join('\\n');\n    const changeset = {\n      commit: 'fcdd73b816d74babf47e6a1f46032f5b8ebb4b48',\n      id: 'fake-id',\n      releases: [],\n      summary,\n    };\n    const line = await changelog.getReleaseLine(changeset, 'minor', {\n      repo: 'hey-api/openapi-ts',\n    });\n    // Metadata should be on the first line\n    expect(line).toMatch(\n      /^\\n- refactor\\(config\\): replace `off` with null to disable options \\(\\[#1613\\]\\(https:\\/\\/github.com\\/hey-api\\/openapi-ts\\/pull\\/1613\\)\\) \\(\\[`fcdd73b`\\]\\(https:\\/\\/github.com\\/hey-api\\/openapi-ts\\/commit\\/fcdd73b816d74babf47e6a1f46032f5b8ebb4b48\\)\\) by \\[@someone\\]\\(https:\\/\\/github.com\\/someone\\)/,\n    );\n    // Should not contain quadruple backticks\n    expect(line).not.toContain('````');\n    // Should contain a markdown code block\n    expect(line).toContain('```js\\nexport default {');\n    expect(line).toContain('  input: \"hey-api/backend\", // sign up at app.heyapi.dev');\n    expect(line).toContain('  output: {');\n    expect(line).toContain('    format: null,');\n    expect(line).toContain('    lint: null,');\n    expect(line).toContain('    path: \"src/client\",');\n    expect(line).toContain('    tsConfigPath: null,');\n    expect(line).toContain('  },');\n    expect(line).toContain('};');\n    expect(line).toContain('```');\n  });\n\n  it('converts multiple code blocks and preserves non-code content', async () => {\n    const summary = [\n      'feat: add foo',\n      '',\n      '```js',\n      'console.log(1);',\n      '```',\n      '',\n      'Some text.',\n      '',\n      '```ts',\n      'console.log(2);',\n      '```',\n    ].join('\\n');\n    const changeset = {\n      commit: 'abc123',\n      id: 'fake-id',\n      releases: [],\n      summary,\n    };\n    const line = await changelog.getReleaseLine(changeset, 'minor', {\n      repo: 'hey-api/openapi-ts',\n    });\n    expect(line).toContain('```js\\nconsole.log(1);\\n```');\n    expect(line).toContain('```ts\\nconsole.log(2);\\n```');\n    expect(line).toContain('Some text.');\n  });\n\n  describe.each(['author', 'user'])('override author with %s keyword', (keyword) => {\n    it.each(['with @', 'without @'])('%s', async (kind) => {\n      expect(\n        await changelog.getReleaseLine(\n          ...getChangeset(`${keyword}: ${kind === 'with @' ? '@' : ''}other`, data.commit),\n        ),\n      ).toEqual(\n        `\\n- something ([#1613](https://github.com/hey-api/openapi-ts/pull/1613)) ([\\`a085003\\`](https://github.com/hey-api/openapi-ts/commit/a085003)) by [@other](https://github.com/other)`,\n      );\n    });\n  });\n\n  describe.each([data.commit, 'wrongcommit', undefined])(\n    'with commit from changeset of %s',\n    (commitFromChangeset) => {\n      describe.each(['pr', 'pull request', 'pull'])('override pr with %s keyword', (keyword) => {\n        it.each(['with #', 'without #'])('%s', async (kind) => {\n          expect(\n            await changelog.getReleaseLine(\n              ...getChangeset(\n                `${keyword}: ${kind === 'with #' ? '#' : ''}${data.pull}`,\n                commitFromChangeset,\n              ),\n            ),\n          ).toEqual(\n            `\\n- something ([#1613](https://github.com/hey-api/openapi-ts/pull/1613)) ([\\`a085003\\`](https://github.com/hey-api/openapi-ts/commit/a085003)) by [@someone](https://github.com/someone)`,\n          );\n        });\n      });\n\n      it('override commit with commit keyword', async () => {\n        expect(\n          await changelog.getReleaseLine(\n            ...getChangeset(`commit: ${data.commit}`, commitFromChangeset),\n          ),\n        ).toEqual(\n          `\\n- something ([#1613](https://github.com/hey-api/openapi-ts/pull/1613)) ([\\`a085003\\`](https://github.com/hey-api/openapi-ts/commit/a085003)) by [@someone](https://github.com/someone)`,\n        );\n      });\n    },\n  );\n});\n"
  },
  {
    "path": "dev/graph-hotspots.js",
    "content": "import fs from 'node:fs';\nimport path from 'node:path';\nimport { fileURLToPath } from 'node:url';\n\nconst __filename = fileURLToPath(import.meta.url);\nconst __dirname = path.dirname(__filename);\n\n// Load your exported graph\nconst nodes = JSON.parse(fs.readFileSync(path.resolve(__dirname, 'graph.json'), 'utf-8'));\n\n// Annotate nodes with children count\nconst annotatedNodes = nodes.map((n) => ({\n  childrenCount: n.childrenPointers?.length ?? 0,\n  pointer: n.pointer,\n}));\n\n// Sort by childrenCount descending\nannotatedNodes.sort((a, b) => b.childrenCount - a.childrenCount);\n\n// Print top 20 hotspots\nconsole.log('Top 20 potential bottleneck nodes:\\n');\nannotatedNodes.slice(0, 20).forEach((n) => {\n  console.log(`${n.pointer} — children: ${n.childrenCount}`);\n});\n"
  },
  {
    "path": "dev/hey-api.ts",
    "content": "// @ts-ignore\nimport type { CreateClientConfig } from './.gen/typescript/client.gen';\n\n// @ts-ignore\nexport const createClientConfig: CreateClientConfig = (config) => ({\n  ...config,\n  // set default base url for requests\n  baseUrl: 'https://petstore3.swagger.io/api/v3',\n  // set default headers for requests\n  headers: {\n    Authorization: 'Bearer <token_from_internal_client>',\n  },\n});\n"
  },
  {
    "path": "dev/inputs.ts",
    "content": "import path from 'node:path';\n\nconst specsPath = path.join(__dirname, '..', 'specs');\n\nexport const inputs = {\n  circular: path.resolve(specsPath, '3.0.x', 'circular.yaml'),\n  full: path.resolve(specsPath, '3.1.x', 'full.yaml'),\n  local: 'http://localhost:8000/openapi.json',\n  opencode: path.resolve(specsPath, '3.1.x', 'opencode.yaml'),\n  petstore:\n    'https://raw.githubusercontent.com/swagger-api/swagger-petstore/master/src/main/resources/openapi.yaml',\n  redfish:\n    'https://raw.githubusercontent.com/DMTF/Redfish-Publications/refs/heads/main/openapi/openapi.yaml',\n  scalar: 'scalar:@scalar/access-service',\n  transformers: path.resolve(specsPath, '3.1.x', 'transformers.json'),\n  validators: path.resolve(specsPath, '3.1.x', 'validators.yaml'),\n} as const;\n\nexport type InputKey = keyof typeof inputs;\n\nexport function getInput(key: InputKey = (process.env.INPUT as InputKey) || 'opencode') {\n  const input = inputs[key] || key;\n  if (!input) {\n    throw new Error(`Unknown input: ${key}. Available: ${Object.keys(inputs).join(', ')}`);\n  }\n  return input;\n}\n"
  },
  {
    "path": "dev/json-to-dot.js",
    "content": "import fs from 'node:fs';\nimport path from 'node:path';\nimport { fileURLToPath } from 'node:url';\n\nconst __filename = fileURLToPath(import.meta.url);\nconst __dirname = path.dirname(__filename);\n\nconst nodes = JSON.parse(fs.readFileSync(path.resolve(__dirname, 'graph.json'), 'utf-8'));\n\n// --- Filter nodes for readability ---\nconst threshold = 10; // high-fanout threshold\nconst filteredSet = new Set();\n\n// Include nodes with children > threshold and their immediate children\nfor (const n of nodes) {\n  const childCount = n.childrenPointers?.length ?? 0;\n  if (childCount > threshold) {\n    filteredSet.add(n.pointer);\n    for (const child of n.childrenPointers || []) {\n      filteredSet.add(child);\n    }\n  }\n}\n\n// Filtered nodes list\nconst filteredNodes = nodes.filter((n) => filteredSet.has(n.pointer));\n\n// Start the .dot file\nlet dot = 'digraph OpenAPIGraph {\\nrankdir=LR;\\nnode [style=filled];\\n';\n\n// Add nodes with color based on fanout\nfor (const n of filteredNodes) {\n  const childCount = n.childrenPointers?.length ?? 0;\n  const color = childCount > 50 ? 'red' : childCount > 20 ? 'orange' : 'lightgray';\n  dot += `\"${n.pointer}\" [label=\"${n.pointer}\\\\n${childCount} children\", fillcolor=${color}];\\n`;\n}\n\n// Add edges: node -> its children\nfor (const n of filteredNodes) {\n  for (const child of n.childrenPointers || []) {\n    if (filteredSet.has(child)) {\n      dot += `\"${n.pointer}\" -> \"${child}\";\\n`;\n    }\n  }\n}\n\ndot += '}\\n';\n\n// Write to a file\nfs.writeFileSync(path.resolve(__dirname, 'graph.dot'), dot);\nconsole.log('graph.dot created!');\n\n// Instructions:\n// Render with Graphviz:\n// dot -Tpng graph.dot -o graph.png\n// or\n// dot -Tsvg graph.dot -o graph.svg\n"
  },
  {
    "path": "dev/openapi-python.config.ts",
    "content": "import fs from 'node:fs';\nimport path from 'node:path';\nimport { parseEnv } from 'node:util';\n\nimport { defineConfig } from '@hey-api/openapi-python';\n\nimport { getInput } from './inputs';\nimport { getPreset } from './python/presets';\n\nprocess.env = {\n  ...process.env,\n  ...parseEnv(fs.readFileSync(path.resolve(__dirname, '.env'), 'utf-8')),\n};\n\nexport default defineConfig(() => [\n  {\n    input: getInput(),\n    logs: {\n      path: './logs',\n    },\n    output: {\n      path: path.resolve(__dirname, 'gen', 'python'),\n    },\n    plugins: getPreset(),\n  },\n]);\n"
  },
  {
    "path": "dev/openapi-ts.config.ts",
    "content": "import fs from 'node:fs';\nimport path from 'node:path';\nimport { parseEnv } from 'node:util';\n\nimport { defineConfig } from '@hey-api/openapi-ts';\n\nimport { getInput } from './inputs';\nimport { getPreset } from './typescript/presets';\n\nprocess.env = {\n  ...process.env,\n  ...parseEnv(fs.readFileSync(path.resolve(__dirname, '.env'), 'utf-8')),\n};\n\nexport default defineConfig(() => [\n  {\n    input: getInput(),\n    logs: {\n      path: './logs',\n    },\n    output: {\n      path: path.resolve(__dirname, 'gen', 'typescript'),\n    },\n    plugins: getPreset(),\n  },\n]);\n"
  },
  {
    "path": "dev/package.json",
    "content": "{\n  \"name\": \"@test/playground\",\n  \"version\": \"0.0.0\",\n  \"private\": true,\n  \"type\": \"module\",\n  \"scripts\": {\n    \"dev\": \"tsx ./playground.ts\"\n  },\n  \"devDependencies\": {\n    \"@angular/common\": \"21.1.2\",\n    \"@angular/core\": \"21.1.2\",\n    \"@hey-api/codegen-core\": \"workspace:*\",\n    \"@hey-api/openapi-python\": \"workspace:*\",\n    \"@hey-api/openapi-ts\": \"workspace:*\",\n    \"@opencode-ai/sdk\": \"1.2.27\",\n    \"@orpc/contract\": \"1.13.4\",\n    \"@pinia/colada\": \"0.19.1\",\n    \"@tanstack/angular-query-experimental\": \"5.90.25\",\n    \"@tanstack/preact-query\": \"5.93.0\",\n    \"@tanstack/react-query\": \"5.90.21\",\n    \"@tanstack/solid-query\": \"5.90.26\",\n    \"@tanstack/svelte-query\": \"5.90.2\",\n    \"@tanstack/vue-query\": \"5.92.9\",\n    \"arktype\": \"2.2.0\",\n    \"nuxt\": \"3.21.0\",\n    \"swr\": \"2.4.1\",\n    \"tsx\": \"4.21.0\",\n    \"typescript\": \"5.9.3\",\n    \"valibot\": \"1.2.0\",\n    \"vue\": \"3.5.25\",\n    \"zod\": \"4.3.6\"\n  },\n  \"engines\": {\n    \"node\": \">=20.19.0\"\n  }\n}\n"
  },
  {
    "path": "dev/playground.py",
    "content": "# import httpx\nfrom gen.python import OpenCode\n\n# def log_request(request):\n#     print(request.method, request.url, request.headers, request.content)\n\n# client = httpx.Client(event_hooks={\"request\": [log_request]})\n\ndef run():\n    client = OpenCode()\n    client.tui.publish(\n        body={\n            \"properties\": {\n                \"message\": \"Hello from Hey API OpenAPI Python Playground!\",\n                \"variant\": \"success\",\n            },\n            \"type\": \"tui.toast.show\",\n        },\n        directory=\"main\",\n    )\n\nrun()\n"
  },
  {
    "path": "dev/playground.ts",
    "content": "import type { DefinePlugin, IR } from '@hey-api/openapi-ts';\n\n// import { createOpencode } from '@opencode-ai/sdk';\nimport { client } from './gen/typescript/client.gen';\nimport { OpenCode } from './gen/typescript/sdk.gen';\n\ntype MyPluginConfig = { readonly name: 'myplugin' };\ntype MyPlugin = DefinePlugin<MyPluginConfig>;\n\nexport function f(schema: IR.SchemaObject, plugin: MyPlugin['Instance']) {\n  plugin.context.resolveIrRef(schema.$ref!);\n}\n\nexport const handler: MyPlugin['Handler'] = ({ plugin }) => {\n  plugin.forEach('schema', 'operation', (event) => {\n    console.log(event);\n  });\n};\n\nasync function run() {\n  // const { client, server } = await createOpencode();\n  // console.log(client, server);\n  client.setConfig({\n    baseUrl: 'https://api.example.com',\n  });\n  const sdk = new OpenCode({ client });\n  sdk.tui.publish({\n    body: {\n      properties: {\n        message: 'Hello from Hey API OpenAPI TypeScript Playground!',\n        variant: 'success',\n      },\n      type: 'tui.toast.show',\n    },\n    directory: 'main',\n  });\n}\n\nrun();\n"
  },
  {
    "path": "dev/python/presets.ts",
    "content": "import type { UserConfig } from '@hey-api/openapi-python';\n\nexport type PluginConfig = NonNullable<NonNullable<UserConfig['plugins']>[number]>;\n\nexport const presets = {\n  sdk: () => [\n    /** SDK */\n    {\n      name: '@hey-api/python-sdk',\n      operations: {\n        containerName: 'OpenCode',\n        strategy: 'single',\n      },\n      paramsStructure: 'flat',\n    },\n  ],\n  validated: () => [\n    /** SDK + Pydantic validation */\n    {\n      name: '@hey-api/python-sdk',\n      paramsStructure: 'flat',\n    },\n    'pydantic',\n  ],\n} as const satisfies Record<string, () => ReadonlyArray<PluginConfig>>;\n\nexport type PresetKey = keyof typeof presets;\n\nexport function getPreset(key: PresetKey = (process.env.PRESET as PresetKey) || 'sdk') {\n  const preset = presets[key];\n  if (!preset) {\n    throw new Error(`Unknown preset: ${key}. Available: ${Object.keys(presets).join(', ')}`);\n  }\n  return preset();\n}\n"
  },
  {
    "path": "dev/tsconfig.json",
    "content": "{\n  \"extends\": \"../tsconfig.base.json\",\n  \"compilerOptions\": {\n    \"allowImportingTsExtensions\": true,\n    \"module\": \"ESNext\",\n    \"moduleResolution\": \"bundler\",\n    \"noEmit\": true,\n    \"resolveJsonModule\": true\n  }\n}\n"
  },
  {
    "path": "dev/turbo.json",
    "content": "{\n  \"$schema\": \"../node_modules/turbo/schema.json\",\n  \"extends\": [\"//\"],\n  \"tasks\": {\n    \"build\": {\n      \"dependsOn\": [],\n      \"outputs\": [\"dist/**\"]\n    }\n  }\n}\n"
  },
  {
    "path": "dev/typescript/presets.ts",
    "content": "import type { UserConfig } from '@hey-api/openapi-ts';\n\nexport type PluginConfig = NonNullable<NonNullable<UserConfig['plugins']>[number]>;\n\nexport const presets = {\n  angular: () => [\n    {\n      httpRequests: 'flat',\n      name: '@angular/common',\n    },\n  ],\n  full: () => [\n    /** Full kitchen sink for comprehensive testing */\n    '@hey-api/typescript',\n    {\n      name: '@hey-api/sdk',\n      paramsStructure: 'flat',\n    },\n    {\n      name: '@hey-api/transformers',\n    },\n    {\n      metadata: true,\n      name: 'zod',\n    },\n    {\n      name: '@tanstack/react-query',\n      queryKeys: {\n        tags: true,\n      },\n    },\n  ],\n  rpc: () => [\n    /** RPC-style SDK with Zod validation */\n    'orpc',\n    'zod',\n  ],\n  sdk: () => [\n    /** SDK with types */\n    '@hey-api/typescript',\n    {\n      name: '@hey-api/sdk',\n      operations: {\n        containerName: 'OpenCode',\n        strategy: 'single',\n      },\n      paramsStructure: 'flat',\n    },\n  ],\n  tanstack: () => [\n    /** SDK + TanStack Query */\n    '@hey-api/typescript',\n    '@hey-api/sdk',\n    {\n      name: '@tanstack/react-query',\n      queryKeys: {\n        tags: true,\n      },\n    },\n  ],\n  types: () => [\n    /** Just types, nothing else */\n    '@hey-api/typescript',\n  ],\n  validated: () => [\n    /** SDK + Zod validation */\n    '@hey-api/typescript',\n    {\n      name: '@hey-api/sdk',\n      validator: 'zod',\n    },\n    {\n      metadata: true,\n      name: 'valibot',\n    },\n    {\n      metadata: true,\n      name: 'zod',\n    },\n  ],\n} as const satisfies Record<string, () => ReadonlyArray<PluginConfig>>;\n\nexport type PresetKey = keyof typeof presets;\n\nexport function getPreset(key: PresetKey = (process.env.PRESET as PresetKey) || 'sdk') {\n  const preset = presets[key];\n  if (!preset) {\n    throw new Error(`Unknown preset: ${key}. Available: ${Object.keys(presets).join(', ')}`);\n  }\n  return preset();\n}\n"
  },
  {
    "path": "docs/.contributorsignore",
    "content": "dependabot-preview[bot]\ndependabot[bot]\ngithub-actions[bot]\nrenovate[bot]\nCopilot\n"
  },
  {
    "path": "docs/.contributorssince",
    "content": "2025-04-20T08:08:34Z\n"
  },
  {
    "path": "docs/.gitignore",
    "content": ".vitepress/cache\n.vitepress/dist\n"
  },
  {
    "path": "docs/.vitepress/config/en.ts",
    "content": "import { defineConfig } from 'vitepress';\n\nexport default defineConfig({\n  description:\n    '🌀 OpenAPI to TypeScript codegen. Production-ready SDKs, Zod schemas, TanStack Query hooks, and 20+ plugins. Used by Vercel, OpenCode, and PayPal.',\n  lang: 'en-US',\n  themeConfig: {\n    editLink: {\n      pattern: 'https://github.com/hey-api/openapi-ts/edit/main/docs/:path',\n      text: 'Edit',\n    },\n    footer: {\n      message: 'Released under the MIT License.',\n    },\n    nav: [\n      {\n        link: 'https://github.com/sponsors/hey-api',\n        text: 'Sponsor Hey API',\n      },\n    ],\n    outline: {\n      label: 'Table of Contents',\n      level: 2,\n    },\n    sidebar: [\n      {\n        items: [\n          {\n            link: '/openapi-ts/get-started',\n            text: 'Get Started',\n          },\n          {\n            collapsed: true,\n            items: [\n              {\n                link: '/openapi-ts/configuration/input',\n                text: 'Input',\n              },\n              {\n                link: '/openapi-ts/configuration/output',\n                text: 'Output',\n              },\n              {\n                link: '/openapi-ts/configuration/parser',\n                text: 'Parser',\n              },\n            ],\n            link: '/openapi-ts/configuration',\n            text: 'Configuration',\n          },\n          {\n            link: '/openapi-ts/output',\n            text: 'Output',\n          },\n        ],\n        text: 'Introduction',\n      },\n      {\n        items: [\n          {\n            collapsed: true,\n            items: [\n              {\n                link: '/openapi-ts/plugins/typescript',\n                text: 'TypeScript',\n              },\n              {\n                link: '/openapi-ts/plugins/sdk',\n                text: 'SDK',\n              },\n              {\n                link: '/openapi-ts/plugins/transformers',\n                text: 'Transformers',\n              },\n              {\n                link: '/openapi-ts/plugins/schemas',\n                text: 'Schemas',\n              },\n            ],\n            link: '/openapi-ts/core',\n            text: 'Core',\n          },\n          {\n            collapsed: true,\n            items: [\n              {\n                link: '/openapi-ts/clients/fetch',\n                text: 'Fetch API',\n              },\n              {\n                link: '/openapi-ts/clients/angular',\n                text: 'Angular',\n              },\n              {\n                link: '/openapi-ts/clients/axios',\n                text: 'Axios',\n              },\n              {\n                link: '/openapi-ts/clients/ky',\n                text: 'Ky',\n              },\n              {\n                link: '/openapi-ts/clients/next-js',\n                text: 'Next.js',\n              },\n              {\n                link: '/openapi-ts/clients/nuxt',\n                text: 'Nuxt',\n              },\n              {\n                link: '/openapi-ts/clients/ofetch',\n                text: 'OFetch',\n              },\n              {\n                link: '/openapi-ts/clients/effect',\n                text: 'Effect <span data-soon>soon</span>',\n              },\n              {\n                link: '/openapi-ts/clients/got',\n                text: 'Got <span data-soon>soon</span>',\n              },\n            ],\n            link: '/openapi-ts/clients',\n            text: 'Clients',\n          },\n          {\n            collapsed: true,\n            items: [\n              {\n                link: '/openapi-ts/plugins/valibot',\n                text: 'Valibot',\n              },\n              {\n                link: '/openapi-ts/plugins/zod',\n                text: 'Zod',\n              },\n              {\n                link: '/openapi-ts/plugins/ajv',\n                text: 'Ajv <span data-soon>soon</span>',\n              },\n              {\n                link: '/openapi-ts/plugins/arktype',\n                text: 'Arktype <span data-soon>soon</span>',\n              },\n              {\n                link: '/openapi-ts/plugins/joi',\n                text: 'Joi <span data-soon>soon</span>',\n              },\n              {\n                link: '/openapi-ts/plugins/superstruct',\n                text: 'Superstruct <span data-soon>soon</span>',\n              },\n              {\n                link: '/openapi-ts/plugins/typebox',\n                text: 'TypeBox <span data-soon>soon</span>',\n              },\n              {\n                link: '/openapi-ts/plugins/yup',\n                text: 'Yup <span data-soon>soon</span>',\n              },\n            ],\n            link: '/openapi-ts/validators',\n            text: 'Validators',\n          },\n          {\n            collapsed: true,\n            items: [\n              {\n                link: '/openapi-ts/plugins/pinia-colada',\n                text: 'Pinia Colada',\n              },\n              {\n                link: '/openapi-ts/plugins/tanstack-query',\n                text: 'TanStack Query',\n              },\n              {\n                link: '/openapi-ts/plugins/swr',\n                text: 'SWR <span data-soon>soon</span>',\n              },\n              {\n                link: '/openapi-ts/plugins/zustand',\n                text: 'Zustand <span data-soon>soon</span>',\n              },\n            ],\n            link: '/openapi-ts/state-management',\n            text: 'State Management',\n          },\n          {\n            collapsed: true,\n            items: [\n              {\n                link: '/openapi-ts/plugins/chance',\n                text: 'Chance <span data-soon>soon</span>',\n              },\n              {\n                link: '/openapi-ts/plugins/faker',\n                text: 'Faker <span data-soon>soon</span>',\n              },\n              {\n                link: '/openapi-ts/plugins/falso',\n                text: 'Falso <span data-soon>soon</span>',\n              },\n              {\n                link: '/openapi-ts/plugins/msw',\n                text: 'MSW <span data-soon>soon</span>',\n              },\n              {\n                link: '/openapi-ts/plugins/nock',\n                text: 'Nock <span data-soon>soon</span>',\n              },\n              {\n                link: '/openapi-ts/plugins/supertest',\n                text: 'Supertest <span data-soon>soon</span>',\n              },\n            ],\n            link: '/openapi-ts/mocks',\n            text: 'Mocks',\n          },\n          {\n            collapsed: true,\n            items: [\n              {\n                link: '/openapi-ts/plugins/angular',\n                text: 'Angular',\n              },\n              {\n                link: '/openapi-ts/plugins/fastify',\n                text: 'Fastify',\n              },\n              {\n                link: '/openapi-ts/plugins/nest',\n                text: 'Nest',\n              },\n              {\n                link: '/openapi-ts/plugins/adonis',\n                text: 'Adonis <span data-soon>soon</span>',\n              },\n              {\n                link: '/openapi-ts/plugins/elysia',\n                text: 'Elysia <span data-soon>soon</span>',\n              },\n              {\n                link: '/openapi-ts/plugins/express',\n                text: 'Express <span data-soon>soon</span>',\n              },\n              {\n                link: '/openapi-ts/plugins/hono',\n                text: 'Hono <span data-soon>soon</span>',\n              },\n              {\n                link: '/openapi-ts/plugins/koa',\n                text: 'Koa <span data-soon>soon</span>',\n              },\n            ],\n            link: '/openapi-ts/web-frameworks',\n            text: 'Web Frameworks',\n          },\n          {\n            collapsed: true,\n            items: [\n              {\n                link: '/openapi-ts/plugins/concepts/resolvers',\n                text: 'Resolvers',\n              },\n            ],\n            text: 'Concepts',\n          },\n          {\n            collapsed: true,\n            items: [\n              {\n                link: '/openapi-ts/plugins/custom',\n                text: 'Plugin',\n              },\n              {\n                link: '/openapi-ts/clients/custom',\n                text: 'Client',\n              },\n            ],\n            text: 'Custom',\n          },\n        ],\n        text: 'Plugins',\n      },\n      {\n        items: [\n          {\n            link: '/openapi-ts/community/spotlight',\n            text: 'Spotlight',\n          },\n          {\n            collapsed: true,\n            items: [\n              {\n                link: '/openapi-ts/community/contributing/building',\n                text: 'Building',\n              },\n              {\n                link: '/openapi-ts/community/contributing/developing',\n                text: 'Developing',\n              },\n              {\n                link: '/openapi-ts/community/contributing/testing',\n                text: 'Testing',\n              },\n            ],\n            link: '/openapi-ts/community/contributing',\n            text: 'Contributing',\n          },\n        ],\n        text: 'Community',\n      },\n      {\n        items: [\n          {\n            link: '/openapi-ts/integrations',\n            text: 'GitHub',\n          },\n        ],\n        text: 'Integrations',\n      },\n      {\n        items: [\n          {\n            link: '/openapi-ts/migrating',\n            text: 'Migrating',\n          },\n          {\n            link: '/openapi-ts/license',\n            text: 'License',\n          },\n          {\n            link: 'https://github.com/orgs/hey-api/discussions/1495',\n            text: 'Roadmap',\n          },\n        ],\n        text: '@hey-api/openapi-ts',\n      },\n    ],\n  },\n  title: 'Hey API',\n});\n"
  },
  {
    "path": "docs/.vitepress/config/index.ts",
    "content": "import { defineConfig } from 'vitepress';\n\nimport en from './en.js';\nimport shared from './shared.js';\n\nexport default defineConfig({\n  ...shared,\n  locales: {\n    ...shared.locales,\n    root: { label: 'English', ...en },\n  },\n});\n"
  },
  {
    "path": "docs/.vitepress/config/scripts/optimize-images.ts",
    "content": "import fs from 'node:fs';\nimport path from 'node:path';\n\nimport type { FormatEnum } from 'sharp';\nimport sharp from 'sharp';\n\nconst allowedImageExtensions = ['.png', '.jpg', '.jpeg', '.webp', '.svg'] as const;\nconst images: ReadonlyArray<{\n  formats?: ReadonlyArray<keyof FormatEnum>;\n  sizes: ReadonlyArray<{\n    formats: ReadonlyArray<keyof FormatEnum>;\n    width: number;\n  }>;\n  source: string;\n}> = [\n  {\n    sizes: [\n      {\n        formats: ['png'],\n        width: 300,\n      },\n      {\n        formats: ['png'],\n        width: 640,\n      },\n      {\n        formats: ['png'],\n        width: 920,\n      },\n    ],\n    source: 'hero.png',\n  },\n  {\n    sizes: [\n      {\n        formats: ['jpeg', 'webp'],\n        width: 480,\n      },\n      {\n        formats: ['webp'],\n        width: 768,\n      },\n      {\n        formats: ['png', 'webp'],\n        width: 1200,\n      },\n    ],\n    source: 'kinde-logo-wordmark.png',\n  },\n  {\n    sizes: [\n      {\n        formats: ['jpeg', 'webp'],\n        width: 480,\n      },\n      {\n        formats: ['webp'],\n        width: 768,\n      },\n      {\n        formats: ['png', 'webp'],\n        width: 1200,\n      },\n    ],\n    source: 'kinde-logo-wordmark-dark.png',\n  },\n  {\n    sizes: [\n      {\n        formats: ['png'],\n        width: 300,\n      },\n    ],\n    source: 'logo-astronaut.png',\n  },\n  {\n    sizes: [\n      {\n        formats: ['png'],\n        width: 300,\n      },\n      {\n        formats: ['png'],\n        width: 640,\n      },\n      {\n        formats: ['png'],\n        width: 1280,\n      },\n    ],\n    source: 'openapi-ts-hero.png',\n  },\n  {\n    sizes: [\n      {\n        formats: ['jpeg', 'webp'],\n        width: 480,\n      },\n      {\n        formats: ['webp'],\n        width: 768,\n      },\n      {\n        formats: ['png', 'webp'],\n        width: 1200,\n      },\n    ],\n    source: 'stainless-logo-wordmark.png',\n  },\n];\n\nconst outputDir = 'public/assets/.gen';\n\nif (fs.existsSync(outputDir)) {\n  fs.rmSync(outputDir, { force: true, recursive: true });\n}\n\nfs.mkdirSync(outputDir, { recursive: true });\n\nexport async function processImages() {\n  for (const image of images) {\n    const inputPath = path.join('public', 'assets', 'raw', image.source);\n    const ext = path.extname(image.source).toLowerCase();\n    const name = path.basename(image.source, ext);\n\n    if (!allowedImageExtensions.includes(ext as (typeof allowedImageExtensions)[number])) {\n      continue;\n    }\n\n    for (const imageSize of image.sizes) {\n      const size = typeof imageSize === 'object' ? imageSize.width : imageSize;\n      const formats =\n        typeof imageSize === 'object' ? imageSize.formats || image.formats : image.formats;\n      for (const format of formats) {\n        const outputFileName = `${name}-${size}w.${format}`;\n        const outputPath = path.join(outputDir, outputFileName);\n\n        let image = sharp(inputPath).resize(size).toFormat(format, {\n          quality: 80,\n        });\n\n        if (format === 'jpeg') {\n          image = image.flatten({ background: '#ffffff' });\n        }\n\n        await image.toFile(outputPath);\n      }\n    }\n  }\n}\n"
  },
  {
    "path": "docs/.vitepress/config/shared.ts",
    "content": "import path from 'node:path';\n\nimport { defineConfig, type HeadConfig } from 'vitepress';\nimport llmstxt from 'vitepress-plugin-llms';\n\nimport { processImages } from './scripts/optimize-images.js';\n\nconst domain = process.env.SITE_DOMAIN || 'http://localhost:5173';\n\nexport default defineConfig({\n  cleanUrls: true,\n  head: [\n    [\n      'link',\n      {\n        href: '/assets/icons/dark.svg',\n        media: '(prefers-color-scheme: dark)',\n        rel: 'icon',\n        sizes: '16x16',\n        type: 'image/svg',\n      },\n    ],\n    [\n      'link',\n      {\n        href: '/assets/icons/light.svg',\n        media: '(prefers-color-scheme: light)',\n        rel: 'icon',\n        sizes: '16x16',\n        type: 'image/svg',\n      },\n    ],\n    process.env.NODE_ENV === 'production' && [\n      'script',\n      {\n        'data-website-id': '4dffba2d-03a6-4358-9d90-229038c8575d',\n        defer: '',\n        src: 'https://cloud.umami.is/script.js',\n      },\n    ],\n  ].filter(Boolean) as Array<HeadConfig>,\n  lastUpdated: true,\n  sitemap: {\n    hostname: domain,\n    lastmodDateOnly: true,\n    // filter out everything but index and `openapi-ts` pages\n    transformItems: (items) =>\n      items.filter((item) => !item.url || item.url.startsWith('openapi-ts')),\n  },\n  themeConfig: {\n    externalLinkIcon: true,\n    logo: {\n      alt: 'Hey API logo',\n      dark: '/assets/icons/dark.svg',\n      light: '/assets/icons/light.svg',\n    },\n    search: {\n      options: {\n        apiKey: '2565c35b4ad91c2f8f8ae32cf9bbe899',\n        appId: 'OWEH2O8E50',\n        disableUserPersonalization: false,\n        indexName: 'openapi-ts docs',\n        insights: true,\n      },\n      provider: 'algolia',\n    },\n    socialLinks: [\n      { icon: 'linkedin', link: 'https://linkedin.com/company/heyapi' },\n      { icon: 'bluesky', link: 'https://bsky.app/profile/heyapi.dev' },\n      { icon: 'x', link: 'https://x.com/mrlubos' },\n      { icon: 'github', link: 'https://github.com/hey-api/openapi-ts' },\n    ],\n  },\n  transformPageData: (pageData, context) => {\n    pageData.frontmatter.head ??= [];\n\n    const canonicalUrl = pageData.relativePath\n      .replace(/index\\.md$/, '')\n      .replace(/\\.md$/, context.siteConfig.cleanUrls ? '' : '.html');\n    const url = `${domain}/${canonicalUrl}`;\n\n    const head: Array<HeadConfig> = pageData.frontmatter.head;\n    head.unshift(\n      ['link', { href: url, rel: 'canonical' }],\n      ['meta', { content: 'website', property: 'og:type' }],\n      ['meta', { content: 'en_US', property: 'og:locale' }],\n      ['meta', { content: 'Hey API', property: 'og:site_name' }],\n      [\n        'meta',\n        {\n          content: `${domain}/assets/.gen/openapi-ts-hero-640w.png`,\n          property: 'og:image',\n        },\n      ],\n      ['meta', { content: url, property: 'og:url' }],\n      [\n        'meta',\n        {\n          content:\n            pageData.frontmatter.description ||\n            '🌀 OpenAPI to TypeScript codegen. Production-ready SDKs, Zod schemas, TanStack Query hooks, and 20+ plugins. Used by Vercel, OpenCode, and PayPal.',\n          property: 'og:description',\n        },\n      ],\n      [\n        'meta',\n        {\n          content: pageData.frontmatter.title || 'OpenAPI TypeScript',\n          property: 'og:title',\n        },\n      ],\n    );\n  },\n  vite: {\n    plugins: [\n      {\n        async buildStart() {\n          try {\n            await processImages();\n          } catch (error) {\n            console.error('❌ Error optimizing images:', error);\n          }\n        },\n        name: 'generate-images',\n      },\n      llmstxt({\n        experimental: {\n          depth: 2,\n        },\n      }),\n    ],\n    resolve: {\n      alias: [\n        {\n          find: '@components',\n          replacement: path.resolve(__dirname, '..', 'theme', 'components'),\n        },\n        {\n          find: '@data',\n          replacement: path.resolve(__dirname, '..', '..', 'data'),\n        },\n        {\n          find: '@versions',\n          replacement: path.resolve(__dirname, '..', 'theme', 'versions'),\n        },\n      ],\n      preserveSymlinks: true,\n    },\n  },\n});\n"
  },
  {
    "path": "docs/.vitepress/theme/components/AuthorsList.vue",
    "content": "<script setup lang=\"ts\">\ntype Person = {\n  github: string;\n  name: string;\n};\n\ndefineProps<{\n  people: Person[];\n}>();\n</script>\n\n<template>\n  <ul class=\"authors-list\">\n    <li v-for=\"person in people\" :key=\"person.github\">\n      <a :href=\"person.github\" rel=\"noopener noreferrer\" target=\"_blank\">\n        <img :alt=\"person.name\" :src=\"`${person.github}.png`\" />\n        <h3>{{ person.name }}</h3>\n      </a>\n    </li>\n  </ul>\n</template>\n"
  },
  {
    "path": "docs/.vitepress/theme/components/Examples.vue",
    "content": "<script setup lang=\"ts\">\nconst props = defineProps<{\n  githubExamplePath?: string;\n}>();\n</script>\n\n<template>\n  <h2 id=\"examples\" tabindex=\"-1\">\n    Examples\n    <a class=\"header-anchor\" href=\"#examples\" aria-label=\"Permalink to “Examples”\">​</a>\n  </h2>\n  <p>\n    You can view live examples on\n    <a\n      href=\"https://stackblitz.com/orgs/github/hey-api/collections/openapi-ts-examples\"\n      target=\"_blank\"\n      rel=\"noreferrer\"\n      >StackBlitz</a\n    >\n    or on\n    <a\n      :href=\"`https://github.com/hey-api/openapi-ts/tree/main/examples${props.githubExamplePath ? props.githubExamplePath : ''}`\"\n      target=\"_blank\"\n      rel=\"noreferrer\"\n      >GitHub</a\n    >.\n  </p>\n</template>\n"
  },
  {
    "path": "docs/.vitepress/theme/components/FeatureStatus.vue",
    "content": "<script setup lang=\"ts\">\nconst props = defineProps<{\n  issueNumber: number;\n  name: string;\n}>();\n</script>\n\n<template>\n  <div class=\"warning custom-block\">\n    <p class=\"custom-block-title\">Excited about {{ props.name }}?</p>\n    <p>\n      Help us prioritize this feature by voting on\n      <a\n        :href=\"`https://github.com/hey-api/openapi-ts/issues/${props.issueNumber}`\"\n        rel=\"noreferrer\"\n        target=\"_blank\"\n        >GitHub</a\n      >\n      or consider becoming a\n      <a href=\"/openapi-ts/community/spotlight\">contributor</a>.\n    </p>\n  </div>\n</template>\n"
  },
  {
    "path": "docs/.vitepress/theme/components/Heading.vue",
    "content": "<script setup lang=\"ts\">\nconst props = defineProps<{\n  spaceBetween?: boolean;\n}>();\n</script>\n\n<template>\n  <div class=\"container\" :class=\"{ 'space-between': props.spaceBetween }\">\n    <slot />\n  </div>\n</template>\n\n<style scoped>\n.container {\n  align-items: center;\n  column-gap: 1rem;\n  display: flex;\n}\n\n.space-between {\n  justify-content: space-between;\n}\n</style>\n"
  },
  {
    "path": "docs/.vitepress/theme/components/Layout.vue",
    "content": "<script setup lang=\"ts\">\nimport DefaultTheme from 'vitepress/theme';\n\nconst { Layout } = DefaultTheme;\n</script>\n\n<template>\n  <Layout>\n    <template #layout-top>\n      <div class=\"announcement\">\n        <span>Host your specs. Generate from anywhere.</span>\n        <a href=\"https://app.heyapi.dev/\" rel=\"noopener noreferrer\" target=\"_blank\">Get started</a>\n      </div>\n    </template>\n    <!-- <template #home-features-before>\n      <a\n        aria-label=\"Send an email to Lubos\"\n        class=\"migration\"\n        href=\"mailto:lubos@heyapi.dev?subject=Migrate%20TypeScript%20SDKs\"\n      >\n        <p>Migrate your existing TypeScript SDKs</p>\n        <p>Contact us</p>\n      </a>\n    </template> -->\n  </Layout>\n</template>\n\n<style scoped>\n.announcement {\n  align-items: center;\n  background-color: var(--vp-c-bg);\n  border-bottom: 1px solid var(--vp-c-divider);\n  color: var(--vp-c-text-1);\n  column-gap: 0.5rem;\n  display: flex;\n  font-size: var(--announcement-font-size);\n  height: var(--announcement-height);\n  justify-content: center;\n  left: 0;\n  line-height: 1;\n  min-height: 1rem;\n  padding-left: 1.5rem;\n  padding-right: 1.5rem;\n  position: fixed;\n  top: 0;\n  width: 100%;\n  z-index: 31;\n}\n\n.announcement > a {\n  background-color: var(--vp-button-brand-bg);\n  border-radius: 4px;\n  color: var(--vp-button-brand-text);\n  font-size: 0.8em;\n  font-weight: 600;\n  padding: 0.4em 0.75em;\n}\n\n@media (width < 720px) {\n  .hide-sm {\n    display: none;\n  }\n}\n\n@media (width >= 720px) {\n  .show-sm {\n    display: none;\n  }\n}\n</style>\n\n<style>\n:root {\n  --announcement-font-size: 0.875rem;\n  --announcement-height: 2.25rem;\n  --vp-layout-top-height: var(--announcement-height);\n  --vp-nav-height: 48px;\n}\n\n@media (width < 960px) {\n  aside.VPSidebar {\n    top: 0 !important;\n  }\n}\n\n@media (width >= 1200px) {\n  :root {\n    --announcement-height: 2.5rem;\n  }\n}\n</style>\n"
  },
  {
    "path": "docs/.vitepress/theme/components/VersionLabel.vue",
    "content": "<script setup lang=\"ts\">\nconst props = defineProps<{\n  value: string;\n}>();\n</script>\n\n<template>\n  <div class=\"container\">\n    <div class=\"control\">\n      <div class=\"value-container\">\n        {{ props.value }}\n      </div>\n    </div>\n  </div>\n</template>\n\n<style scoped>\n.container {\n  box-sizing: border-box;\n  position: relative;\n  width: var(--vs-width);\n}\n\n.control {\n  align-items: center;\n  background-color: var(--vs-background-color);\n  border-radius: var(--vs-border-radius);\n  border: var(--vs-border);\n  display: flex;\n  flex-wrap: wrap;\n  justify-content: space-between;\n  min-height: var(--vs-min-height);\n}\n\n.value-container {\n  align-items: center;\n  display: grid;\n  flex: 1 1 0%;\n  overflow: hidden;\n  padding: var(--vs-padding-y) calc(var(--vs-padding-x) * 1.4) var(--vs-padding-y)\n    var(--vs-padding-x);\n  position: relative;\n}\n</style>\n"
  },
  {
    "path": "docs/.vitepress/theme/components/VersionSwitcher.vue",
    "content": "<script setup lang=\"ts\">\nimport { ref } from 'vue';\nimport { useRoute, useRouter } from 'vitepress';\nimport VueSelect from 'vue3-select-component';\nimport 'vue3-select-component/styles';\n\ntype Option = {\n  label: string;\n  short?: string;\n  value: string;\n};\n\nconst props = defineProps<{\n  default: string;\n  values: Array<Option>;\n}>();\n\nconst route = useRoute();\nconst router = useRouter();\n\nconst selected = ref(getCurrentVersion(route.path));\n\nfunction getCurrentVersion(path: string) {\n  const segments = path.replace(/(^\\/|\\/$)/g, '').split('/');\n  const versionValues = props.values.map((v) => v.value);\n  const last = segments[segments.length - 1];\n  return versionValues.includes(last) ? last : props.default;\n}\n\nfunction switchVersion(option: Option) {\n  const path = route.path;\n  const segments = path.replace(/(^\\/|\\/$)/g, '').split('/');\n  const versionValues = props.values.map((v) => v.value);\n  const last = segments[segments.length - 1];\n  if (versionValues.includes(last)) {\n    segments.pop();\n  }\n  if (option.value !== props.default) {\n    segments.push(option.value);\n  }\n  const nextPath = `/${segments.filter(Boolean).join('/')}`;\n  if (nextPath !== route.path) {\n    router.go(nextPath);\n  }\n}\n</script>\n\n<template>\n  <VueSelect\n    v-model=\"selected\"\n    :isClearable=\"false\"\n    :options=\"props.values\"\n    @option-selected=\"switchVersion\"\n  >\n    <template #value=\"{ option }\">\n      {{ option.short || option.label }}\n    </template>\n  </VueSelect>\n</template>\n"
  },
  {
    "path": "docs/.vitepress/theme/custom.css",
    "content": ":root {\n  --c-gradient-start: #d486b8;\n  --vp-c-brand-1: #a37ab4;\n  --vp-c-brand-2: #d486b8;\n  --vp-c-brand-3: #a37ab4;\n\n  --github-mark-fill-color: #24292f;\n  --vp-home-hero-name-color: transparent;\n  --vp-home-hero-name-background: -webkit-linear-gradient(\n    120deg,\n    var(--c-gradient-start) 30%,\n    var(--vp-c-brand-3)\n  );\n}\n\nhtml.dark {\n  --c-gradient-start: #86b9b0;\n  --vp-c-bg: #001b2e;\n  --vp-c-bg-alt: #041421;\n  --vp-c-bg-soft: #041421;\n  --vp-c-brand-1: #b3cde4;\n  --vp-c-brand-2: #b3cde4;\n  --vp-c-brand-3: #537692;\n\n  --github-mark-fill-color: #fff;\n  --vp-home-hero-image-background-image: linear-gradient(\n    -45deg,\n    var(--vp-c-brand-3) 50%,\n    var(--c-gradient-start) 50%\n  );\n  --vp-home-hero-image-filter: blur(144px);\n}\n\nhtml.mac {\n  --vs-background-color: var(--vp-input-switch-bg-color);\n  --vs-border: 1px solid var(--vp-input-border-color);\n  --vs-menu-border: 1px solid var(--vp-input-border-color);\n  --vs-menu-box-shadow: rgba(0, 0, 0, 0.24) 0px 3px 8px;\n  --vs-option-background-color: var(--vp-sidebar-bg-color);\n  --vs-option-disabled-background-color: var(--vp-sidebar-bg-color);\n  --vs-option-focused-background-color: var(--vp-sidebar-bg-color);\n  --vs-option-focused-text-color: var(--vp-c-brand-1);\n  --vs-option-hover-background-color: var(--vp-sidebar-bg-color);\n  --vs-option-hover-text-color: var(--vp-c-brand-1);\n  --vs-option-selected-background-color: var(--vp-sidebar-bg-color);\n  --vs-option-selected-text-color: var(--vp-c-brand-1);\n  --vs-option-text-color: var(--vp-c-text-2);\n  --vs-padding-x: 8px;\n  --vs-padding-y: 4px;\n  --vs-padding: var(--vs-padding-y) var(--vs-padding-x);\n  --vs-text-color: var(--vp-c-text-1);\n  --vs-width: auto;\n}\n\n[data-soon] {\n  background-color: var(--vp-button-brand-bg);\n  border-radius: 1em;\n  color: var(--vp-button-brand-text);\n  font-size: 0.6em;\n  padding: 0.05em 0.4em 0.2em;\n  position: relative;\n  text-transform: lowercase;\n  top: -1em;\n}\n\niframe {\n  background-color: var(--vp-sidebar-bg-color);\n  border: none;\n  margin: 0;\n}\n\n.VPFeatures.VPHomeFeatures > .container {\n  max-width: initial;\n}\n\n.VPFeatures.VPHomeFeatures > .container > .items {\n  gap: 1rem;\n  justify-content: center;\n  margin: 0;\n  padding: 0.2rem 0;\n}\n\n.VPFeatures.VPHomeFeatures > .container > .items > .item {\n  flex-shrink: 0;\n  max-width: 390px;\n  padding: 0;\n  width: 100%;\n}\n\n.authors-list {\n  display: flex;\n  flex-wrap: wrap;\n  font-size: 1rem;\n  gap: 1em;\n  padding: 0 !important;\n}\n\n.authors-list img {\n  border-radius: 50%;\n  display: block;\n  height: 2rem;\n  width: 2rem;\n}\n\n.authors-list a {\n  align-items: center;\n  border: 1px solid transparent;\n  border-radius: 10px;\n  display: flex;\n  column-gap: 0.4em;\n  padding: 0.4em 0.6em;\n  text-decoration: none;\n  transition: border-color ease-out 300ms;\n}\n\n.authors-list h3 {\n  color: var(--vp-c-text-1);\n  font-size: inherit;\n  margin: 0;\n}\n\n.authors-list a::after {\n  display: none !important;\n}\n\n.authors-list li {\n  margin: 0 !important;\n}\n\nh3#demo + iframe,\nh3#demo + button {\n  margin: 1rem 0 0;\n}\n\n.buttonLink {\n  color: var(--vp-c-brand-1);\n  font-size: 16px;\n  font-weight: 500;\n  text-decoration: underline;\n  text-underline-offset: 2px;\n  transition:\n    color 0.25s,\n    opacity 0.25s;\n}\n\n.buttonLink:hover {\n  color: var(--vp-c-brand-2);\n}\n\n.home-list {\n  text-align: center;\n}\n\n.authors-list li,\n.home-list li,\n.sponsors-list li {\n  list-style: none;\n}\n\n.home-list.sponsors-list > ul {\n  justify-content: center;\n}\n\n.home-list > ul {\n  align-items: center;\n  justify-content: center;\n}\n\n.home-list > ul,\n.sponsors-list > ul {\n  display: flex;\n  flex-direction: column;\n  flex-wrap: wrap;\n  padding: 0;\n}\n\n.home-list > ul:not(:last-child),\n.sponsors-list > ul:not(:last-child) {\n  padding-bottom: 1rem;\n}\n\n.home-list > h3 {\n  color: var(--vp-c-text-2);\n  display: inline-block;\n  font-size: 0.9rem;\n  margin-top: 2rem;\n  text-transform: uppercase;\n}\n\n.sponsors-list li {\n  align-items: center;\n  border: 1px solid transparent;\n  border-radius: 10px;\n  display: flex;\n  flex-direction: column;\n  row-gap: 0.5rem;\n  justify-content: center;\n  max-width: 240px;\n  padding: 1rem;\n  transition: border-color ease-out 300ms;\n  width: 100%;\n}\n\n.sponsors-list li a:first-of-type {\n  height: 66px;\n}\n\n.sponsors-list li a:first-of-type picture,\n.sponsors-list li a:first-of-type img {\n  height: 100%;\n}\n\n.sponsors-list li p {\n  margin: 0;\n  font-size: 0.86rem;\n  line-height: 120%;\n}\n\n.sponsors-list li a:last-of-type {\n  font-size: 0.86rem;\n  line-height: 100%;\n}\n\n.sponsors-list > ul.gold {\n  row-gap: 2rem;\n  column-gap: 3rem;\n}\n\n.sponsors-list > ul.gold li {\n  max-width: 240px;\n}\n\n.sponsors-list > ul.silver {\n  row-gap: 2rem;\n  column-gap: 3rem;\n}\n\n.sponsors-list > ul.silver li {\n  max-width: 180px;\n}\n\n.sponsors-list > ul li svg {\n  color: var(--vp-c-text-1) !important;\n  height: 100% !important;\n}\n\n/* Cella */\nhtml.dark .sponsors-list > ul li.cella svg > path:nth-child(2),\nhtml.dark .sponsors-list > ul li.cella svg > path:nth-child(3) {\n  filter: invert();\n}\n/* FastAPI */\n.sponsors-list > ul li.fastapi svg > g > path {\n  fill: white !important;\n}\nhtml.dark .sponsors-list > ul li.fastapi svg > g > path {\n  fill: var(--vp-button-brand-bg) !important;\n}\n/* OpenStatus */\n.sponsors-list > ul li.openstatus svg > g > g > path:not(:first-of-type) {\n  fill: white !important;\n}\nhtml.dark .sponsors-list > ul li.openstatus svg > g > g > path:not(:first-of-type) {\n  fill: var(--vp-button-brand-bg) !important;\n}\n\n.sponsors-list > ul.bronze {\n  row-gap: 2rem;\n  column-gap: 1rem;\n}\n\n.sponsors-list > ul.bronze li {\n  max-width: 100px;\n}\n\n.sponsors-list > ul.friends {\n  row-gap: 2rem;\n  column-gap: 1rem;\n}\n\n.sponsors-list > ul.friends li {\n  max-width: 70px;\n}\n\n.sponsors-list li + li {\n  margin-top: 0;\n}\n\n.sponsors-list li > a {\n  align-items: center;\n  display: flex;\n  justify-content: center;\n  text-decoration: none;\n  width: 100%;\n}\n\nhtml.dark .authors-list li > a,\nhtml.dark .sponsors-list li {\n  background-color: var(--vp-button-brand-bg);\n}\n\n.sponsors-list li > :is(.vp-doc a[href*='://'], .vp-doc a[target='_blank'])::after {\n  display: none;\n}\n\n.authors-list li > a:hover,\n.authors-list li > a:focus,\n.sponsors-list li:has(> a:hover),\n.sponsors-list li:has(> a:focus) {\n  border-color: var(--vp-c-brand-1);\n}\n\n/* .sponsors-list-new currently unused, keep in case we want to reuse it again */\n.sponsors-list-new > a {\n  border: 1px solid currentColor;\n  color: var(--vp-c-text-2);\n  text-transform: lowercase;\n}\n\n.migration {\n  background-color: var(--vp-c-brand-3);\n  border-radius: 10px;\n  border: 1px solid transparent;\n  color: var(--vp-button-brand-text);\n  column-gap: 3rem;\n  display: flex;\n  flex-direction: column;\n  justify-content: space-between;\n  margin: 0 auto 1rem;\n  max-width: 392px;\n  padding: 1rem;\n  row-gap: 1rem;\n  transition: border-color ease-out 250ms;\n  width: auto;\n}\n\na.migration:hover,\na.migration:focus {\n  border-color: var(--vp-c-brand-1);\n}\n\n.contributors-list ul {\n  margin-bottom: 1.3rem;\n  margin-top: 1.3rem;\n}\n\n.vue-select .control {\n  cursor: pointer;\n  transition: border-color 0.25s;\n}\n\n.vue-select .control:hover {\n  border-color: var(--vp-c-brand-1);\n}\n\n.vue-select .control .indicators-container {\n  padding: 0;\n}\n\n.vue-select .control .value-container.has-value:has(.single-value) {\n  padding-inline-end: 0;\n}\n\n.vue-select .control .indicators-container button.dropdown-icon {\n  height: 100%;\n  padding: var(--vs-padding);\n  width: calc(var(--vs-indicator-icon-size) + var(--vs-padding-x) + var(--vs-padding-x));\n}\n\n.vue-select .menu {\n  width: fit-content !important;\n}\n\n.vue-select .menu .menu-option {\n  border-left: 2px solid transparent;\n  border-right: 2px solid transparent;\n  white-space: nowrap;\n  transition:\n    background-color 0.25s,\n    border-color 0.25s,\n    color 0.25s,\n    opacity 0.25s;\n}\n\n.vue-select .menu:hover .menu-option.focused:not(:hover) {\n  border-left: 2px solid transparent;\n}\n\n.vue-select .menu .menu-option:hover,\n.vue-select .menu:not(:hover) .menu-option.focused {\n  border-left: 2px solid var(--vp-c-brand-1);\n}\n\n@media (min-width: 640px) {\n  h1.heading .name {\n    max-width: 600px;\n  }\n\n  .VPFeatures.VPHomeFeatures > .container > .items {\n    gap: 1rem;\n    padding: 0.4rem 0;\n  }\n\n  .home-list > ul,\n  .sponsors-list > ul {\n    flex-direction: row;\n  }\n\n  .contributors-list ul {\n    columns: 2;\n  }\n}\n\n@media (min-width: 892px) {\n  .migration {\n    flex-direction: row;\n    max-width: 798px;\n  }\n}\n\n@media (min-width: 960px) {\n  .VPFeatures.VPHomeFeatures > .container > .items {\n    gap: 1rem;\n    padding: 0.5rem 0;\n  }\n\n  .VPNavBar.has-sidebar > .wrapper > .container > .title {\n    background-color: var(--vp-sidebar-bg-color);\n  }\n}\n\nfooter.VPDocFooter > .edit-info > .last-updated {\n  /* don't render last updated date */\n  display: none;\n}\n\n.DocSearch-Modal {\n  display: flex;\n}\n\n.DocSearch-Footer {\n  position: initial;\n}\n\n.sr-only {\n  border: 0;\n  clip: rect(0, 0, 0, 0);\n  height: 1px;\n  margin: -1px;\n  overflow: hidden;\n  padding: 0;\n  position: absolute;\n  white-space: nowrap;\n  width: 1px;\n}\n\n.VPNavBarTitle a.title {\n  column-gap: 4px;\n}\n\n.VPImage.logo {\n  margin-right: 0;\n}\n\n.VPNavBarTitle {\n  color: var(--vp-c-text-1);\n}\n"
  },
  {
    "path": "docs/.vitepress/theme/index.ts",
    "content": "// eslint-disable-next-line simple-import-sort/imports\nimport type { Theme } from 'vitepress';\nimport DefaultTheme from 'vitepress/theme';\n\n// custom CSS must be imported after default theme to correctly apply styles\nimport './custom.css';\n\nimport Layout from './components/Layout.vue';\n\nexport default {\n  Layout,\n  enhanceApp: () => {},\n  extends: DefaultTheme,\n} satisfies Theme;\n"
  },
  {
    "path": "docs/.vitepress/theme/versions/AngularVersionSwitcher.vue",
    "content": "<script setup lang=\"ts\">\nimport VersionSwitcher from '@components/VersionSwitcher.vue';\n\nconst versions = [\n  {\n    label: 'Angular 20',\n    short: 'v20',\n    value: 'v20',\n  },\n  {\n    label: 'Angular 19',\n    short: 'v19',\n    value: 'v19',\n  },\n];\n</script>\n\n<template>\n  <VersionSwitcher :values=\"versions\" default=\"v20\" />\n</template>\n"
  },
  {
    "path": "docs/.vitepress/theme/versions/ZodVersionSwitcher.vue",
    "content": "<script setup lang=\"ts\">\nimport VersionSwitcher from '@components/VersionSwitcher.vue';\n\nconst versions = [\n  {\n    label: 'Zod 4',\n    short: 'v4',\n    value: 'v4',\n  },\n  {\n    label: 'Zod Mini',\n    short: 'Mini',\n    value: 'mini',\n  },\n  {\n    label: 'Zod 3',\n    short: 'v3',\n    value: 'v3',\n  },\n];\n</script>\n\n<template>\n  <VersionSwitcher :values=\"versions\" default=\"v4\" />\n</template>\n"
  },
  {
    "path": "docs/CHANGELOG.md",
    "content": "# docs\n\n## 0.10.4\n\n### Patch Changes\n\n- docs: add bigint section to transformers ([#2865](https://github.com/hey-api/openapi-ts/pull/2865)) ([`ba4d9bf`](https://github.com/hey-api/openapi-ts/commit/ba4d9bf603d8c897016fd1775d13e184111ace17)) by [@wn-mitch](https://github.com/wn-mitch)\n\n## 0.10.3\n\n### Patch Changes\n\n- chore: clarify TanStack Query reactivity in Vue ([#2745](https://github.com/hey-api/openapi-ts/pull/2745)) ([`5d06dbd`](https://github.com/hey-api/openapi-ts/commit/5d06dbdf8c2a834ecefdd7305b59572470f45a7e)) by [@9M6](https://github.com/9M6)\n\n## 0.10.2\n\n### Patch Changes\n\n- [#2117](https://github.com/hey-api/openapi-ts/pull/2117) [`a1435b9`](https://github.com/hey-api/openapi-ts/commit/a1435b915a272d9ffa599c194ee52c2a33f77fcd) Thanks [@johnny-mh](https://github.com/johnny-mh)! - docs: add docs for `input.patch` feature\n\n## 0.10.1\n\n### Patch Changes\n\n- [#1774](https://github.com/hey-api/openapi-ts/pull/1774) [`c0b36b9`](https://github.com/hey-api/openapi-ts/commit/c0b36b95645d484034c3af145c5554867568979b) Thanks [@mrlubos](https://github.com/mrlubos)! - docs: announce Hey API platform\n\n## 0.10.0\n\n### Minor Changes\n\n- [#1568](https://github.com/hey-api/openapi-ts/pull/1568) [`465410c`](https://github.com/hey-api/openapi-ts/commit/465410c201eb19e737e3143ad53a146e95f80107) Thanks [@mrlubos](https://github.com/mrlubos)! - feat: change the default parser\n\n## 0.9.0\n\n### Minor Changes\n\n- [#1511](https://github.com/hey-api/openapi-ts/pull/1511) [`4e8064d`](https://github.com/hey-api/openapi-ts/commit/4e8064d9a589e14b42d2b1a329e2436f242884da) Thanks [@mrlubos](https://github.com/mrlubos)! - feat: add watch mode\n\n  ## Watch Mode\n\n  ::: warning\n  Watch mode currently supports only remote files via URL.\n  :::\n\n  If your schema changes frequently, you may want to automatically regenerate the output during development. To watch your input file for changes, enable `watch` mode in your configuration or pass the `--watch` flag to the CLI.\n\n  ### Config\n\n  ```js\n  export default {\n    client: '@hey-api/client-fetch',\n    input: 'path/to/openapi.json',\n    output: 'src/client',\n    watch: true,\n  };\n  ```\n\n  ### CLI\n\n  ```sh\n  npx @hey-api/openapi-ts \\\n    -c @hey-api/client-fetch \\\n    -i path/to/openapi.json \\\n    -o src/client \\\n    -w\n  ```\n\n### Patch Changes\n\n- [#1496](https://github.com/hey-api/openapi-ts/pull/1496) [`1e418ba`](https://github.com/hey-api/openapi-ts/commit/1e418ba760b9903326ec37009651c32e195e24a9) Thanks [@mrlubos](https://github.com/mrlubos)! - docs: split output section into multiple pages\n\n## 0.8.0\n\n### Minor Changes\n\n- [#1447](https://github.com/hey-api/openapi-ts/pull/1447) [`200821b`](https://github.com/hey-api/openapi-ts/commit/200821b3ceea8ffca7656fe3f6e2ef98b7110a2a) Thanks [@mrlubos](https://github.com/mrlubos)! - fix: revert license to MIT\n\n### Patch Changes\n\n- [#1430](https://github.com/hey-api/openapi-ts/pull/1430) [`9cec9e8`](https://github.com/hey-api/openapi-ts/commit/9cec9e8582c12a8c041b922d9587e16f6f19782a) Thanks [@mrlubos](https://github.com/mrlubos)! - docs: add validators page\n\n## 0.7.4\n\n### Patch Changes\n\n- [#1420](https://github.com/hey-api/openapi-ts/pull/1420) [`8010dbb`](https://github.com/hey-api/openapi-ts/commit/8010dbb1ab8b91d1d49d5cf16276183764a63ff3) Thanks [@mrlubos](https://github.com/mrlubos)! - docs: add buildUrl() method to Axios client page\n\n## 0.7.3\n\n### Patch Changes\n\n- [#1316](https://github.com/hey-api/openapi-ts/pull/1316) [`a79fac8`](https://github.com/hey-api/openapi-ts/commit/a79fac8919ed29eec7195cbd441ffa38b559d63c) Thanks [@mrlubos](https://github.com/mrlubos)! - docs: add Plugins page\n\n## 0.7.2\n\n### Patch Changes\n\n- [#1253](https://github.com/hey-api/openapi-ts/pull/1253) [`01dee3d`](https://github.com/hey-api/openapi-ts/commit/01dee3df879232939e43355231147b3d910fb482) Thanks [@mrlubos](https://github.com/mrlubos)! - fix: update sponsorship links\n\n## 0.7.1\n\n### Patch Changes\n\n- [#1222](https://github.com/hey-api/openapi-ts/pull/1222) [`ceb4363`](https://github.com/hey-api/openapi-ts/commit/ceb4363d52893ebe947e21aac402b868ff2820d4) Thanks [@mrlubos](https://github.com/mrlubos)! - feat: add support for @tanstack/angular-query-experimental package\n\n## 0.7.0\n\n### Minor Changes\n\n- [#1201](https://github.com/hey-api/openapi-ts/pull/1201) [`972a93a`](https://github.com/hey-api/openapi-ts/commit/972a93a91a945cc9ead73c08bb0fa9ee120433ba) Thanks [@mrlubos](https://github.com/mrlubos)! - feat: make plugins first-class citizens\n\n  This release makes plugins first-class citizens. In order to achieve that, the following breaking changes were introduced.\n\n  ### Removed CLI options\n\n  The `--types`, `--schemas`, and `--services` CLI options have been removed. You can list which plugins you'd like to use explicitly by passing a list of plugins as `--plugins <plugin1> <plugin2>`\n\n  ### Removed `*.export` option\n\n  Previously, you could explicitly disable export of certain artifacts using the `*.export` option or its shorthand variant. These were both removed. You can now disable export of specific artifacts by manually defining an array of `plugins` and excluding the unwanted plugin.\n\n  ::: code-group\n\n  ```js [shorthand]\n  export default {\n    client: '@hey-api/client-fetch',\n    input: 'path/to/openapi.json',\n    output: 'src/client',\n    schemas: false, // [!code --]\n    plugins: ['@hey-api/types', '@hey-api/services'], // [!code ++]\n  };\n  ```\n\n  ```js [*.export]\n  export default {\n    client: '@hey-api/client-fetch',\n    input: 'path/to/openapi.json',\n    output: 'src/client',\n    schemas: {\n      export: false, // [!code --]\n    },\n    plugins: ['@hey-api/types', '@hey-api/services'], // [!code ++]\n  };\n  ```\n\n  :::\n\n  ### Renamed `schemas.name` option\n\n  Each plugin definition contains a `name` field. This was conflicting with the `schemas.name` option. As a result, it has been renamed to `nameBuilder`.\n\n  ```js\n  export default {\n    client: '@hey-api/client-fetch',\n    input: 'path/to/openapi.json',\n    output: 'src/client',\n    schemas: {\n      name: (name) => `${name}Schema`, // [!code --]\n    },\n    plugins: [\n      // ...other plugins\n      {\n        nameBuilder: (name) => `${name}Schema`, // [!code ++]\n        name: '@hey-api/schemas',\n      },\n    ],\n  };\n  ```\n\n  ### Removed `services.include` shorthand option\n\n  Previously, you could use a string value as a shorthand for the `services.include` configuration option. You can now achieve the same result using the `include` option.\n\n  ```js\n  export default {\n    client: '@hey-api/client-fetch',\n    input: 'path/to/openapi.json',\n    output: 'src/client',\n    services: '^MySchema', // [!code --]\n    plugins: [\n      // ...other plugins\n      {\n        include: '^MySchema', // [!code ++]\n        name: '@hey-api/services',\n      },\n    ],\n  };\n  ```\n\n  ### Renamed `services.name` option\n\n  Each plugin definition contains a `name` field. This was conflicting with the `services.name` option. As a result, it has been renamed to `serviceNameBuilder`.\n\n  ```js\n  export default {\n    client: '@hey-api/client-fetch',\n    input: 'path/to/openapi.json',\n    output: 'src/client',\n    services: {\n      name: '{{name}}Service', // [!code --]\n    },\n    plugins: [\n      // ...other plugins\n      {\n        serviceNameBuilder: '{{name}}Service', // [!code ++]\n        name: '@hey-api/services',\n      },\n    ],\n  };\n  ```\n\n  ### Renamed `types.dates` option\n\n  Previously, you could set `types.dates` to a boolean or a string value, depending on whether you wanted to transform only type strings into dates, or runtime code too. Many people found these options confusing, so they have been simplified to a boolean and extracted into a separate `@hey-api/transformers` plugin.\n\n  ```js\n  export default {\n    client: '@hey-api/client-fetch',\n    input: 'path/to/openapi.json',\n    output: 'src/client',\n    types: {\n      dates: 'types+transform', // [!code --]\n    },\n    plugins: [\n      // ...other plugins\n      {\n        dates: true, // [!code ++]\n        name: '@hey-api/transformers',\n      },\n    ],\n  };\n  ```\n\n  ### Removed `types.include` shorthand option\n\n  Previously, you could use a string value as a shorthand for the `types.include` configuration option. You can now achieve the same result using the `include` option.\n\n  ```js\n  export default {\n    client: '@hey-api/client-fetch',\n    input: 'path/to/openapi.json',\n    output: 'src/client',\n    types: '^MySchema', // [!code --]\n    plugins: [\n      // ...other plugins\n      {\n        include: '^MySchema', // [!code ++]\n        name: '@hey-api/types',\n      },\n    ],\n  };\n  ```\n\n  ### Renamed `types.name` option\n\n  Each plugin definition contains a `name` field. This was conflicting with the `types.name` option. As a result, it has been renamed to `style`.\n\n  ```js\n  export default {\n    client: '@hey-api/client-fetch',\n    input: 'path/to/openapi.json',\n    output: 'src/client',\n    types: {\n      name: 'PascalCase', // [!code --]\n    },\n    plugins: [\n      // ...other plugins\n      {\n        name: '@hey-api/types',\n        style: 'PascalCase', // [!code ++]\n      },\n    ],\n  };\n  ```\n\n## 0.6.2\n\n### Patch Changes\n\n- [#1162](https://github.com/hey-api/openapi-ts/pull/1162) [`1c85c24`](https://github.com/hey-api/openapi-ts/commit/1c85c24af514e9781aab1960298caa28effef5d3) Thanks [@mrlubos](https://github.com/mrlubos)! - docs: add Zod plugin page\n\n## 0.6.1\n\n### Patch Changes\n\n- [#1151](https://github.com/hey-api/openapi-ts/pull/1151) [`587791d`](https://github.com/hey-api/openapi-ts/commit/587791dfede0167fbed229281467e4c4875936f5) Thanks [@mrlubos](https://github.com/mrlubos)! - fix: update website domain, add license documentation\n\n## 0.6.0\n\n### Minor Changes\n\n- [#1009](https://github.com/hey-api/openapi-ts/pull/1009) [`c6b044d`](https://github.com/hey-api/openapi-ts/commit/c6b044d0bc9dc54cb0eb58d23438f4e1d050cb38) Thanks [@mrlubos](https://github.com/mrlubos)! - feat: change schemas name pattern, add schemas.name option\n\n## 0.5.11\n\n### Patch Changes\n\n- [#978](https://github.com/hey-api/openapi-ts/pull/978) [`2e051a5`](https://github.com/hey-api/openapi-ts/commit/2e051a596302c2e103dca25951a07b4aae1e9e23) Thanks [@mrlubos](https://github.com/mrlubos)! - docs: add basic TanStack Query plugin description\n\n## 0.5.10\n\n### Patch Changes\n\n- [#830](https://github.com/hey-api/openapi-ts/pull/830) [`babf11a`](https://github.com/hey-api/openapi-ts/commit/babf11ae082af642ac71cfee9c523cc976132a50) Thanks [@mrlubos](https://github.com/mrlubos)! - docs: split clients documentation into separate pages\n\n- [#830](https://github.com/hey-api/openapi-ts/pull/830) [`323d0a0`](https://github.com/hey-api/openapi-ts/commit/323d0a03c6560f27d0ce5eee1708ee16dc395532) Thanks [@mrlubos](https://github.com/mrlubos)! - docs: remove interceptors page in favour of per-client sections\n\n- [#830](https://github.com/hey-api/openapi-ts/pull/830) [`babf11a`](https://github.com/hey-api/openapi-ts/commit/babf11ae082af642ac71cfee9c523cc976132a50) Thanks [@mrlubos](https://github.com/mrlubos)! - docs: add v0.52.0 migration\n\n## 0.5.9\n\n### Patch Changes\n\n- [#828](https://github.com/hey-api/openapi-ts/pull/828) [`82a4696`](https://github.com/hey-api/openapi-ts/commit/82a4696b0b209ea2d9147f47f213479e61aed3d7) Thanks [@mrlubos](https://github.com/mrlubos)! - fix: add migration guide for v0.51.0\n\n## 0.5.8\n\n### Patch Changes\n\n- [#613](https://github.com/hey-api/openapi-ts/pull/613) [`b3786dc`](https://github.com/hey-api/openapi-ts/commit/b3786dc6749d8d4ae26bb63322e124663f881741) Thanks [@mrlubos](https://github.com/mrlubos)! - docs: add Axios client documentation\n\n## 0.5.7\n\n### Patch Changes\n\n- [#632](https://github.com/hey-api/openapi-ts/pull/632) [`9c16bc7`](https://github.com/hey-api/openapi-ts/commit/9c16bc71cde48c0cb700b7e720a9e2ad56ec5f02) Thanks [@mrlubos](https://github.com/mrlubos)! - docs: add output page\n\n## 0.5.6\n\n### Patch Changes\n\n- docs: add fetch client documentation ([#602](https://github.com/hey-api/openapi-ts/pull/602))\n\n- docs: add migration notes for v0.46.0 ([#602](https://github.com/hey-api/openapi-ts/pull/602))\n\n## 0.5.5\n\n### Patch Changes\n\n- docs: add migration for v0.45.0 ([#569](https://github.com/hey-api/openapi-ts/pull/569))\n\n## 0.5.4\n\n### Patch Changes\n\n- docs: add format and lint migration for 0.44.0 ([#546](https://github.com/hey-api/openapi-ts/pull/546))\n\n## 0.5.3\n\n### Patch Changes\n\n- docs: add links to homepage ([#489](https://github.com/hey-api/openapi-ts/pull/489))\n\n- feat: remove enum postfix, use typescript enums in types when generated, export enums from types.gen.ts ([#498](https://github.com/hey-api/openapi-ts/pull/498))\n\n- docs: add examples ([#476](https://github.com/hey-api/openapi-ts/pull/476))\n\n## 0.5.2\n\n### Patch Changes\n\n- docs: add github action to integrations ([#451](https://github.com/hey-api/openapi-ts/pull/451))\n\n## 0.5.1\n\n### Patch Changes\n\n- docs: add tanstack-query and http clients sections ([#436](https://github.com/hey-api/openapi-ts/pull/436))\n\n## 0.5.0\n\n### Minor Changes\n\n- feat: allow choosing naming convention for types ([#402](https://github.com/hey-api/openapi-ts/pull/402))\n\n## 0.4.0\n\n### Minor Changes\n\n- docs: add integrations ([#394](https://github.com/hey-api/openapi-ts/pull/394))\n\n- feat: rename generated files ([#363](https://github.com/hey-api/openapi-ts/pull/363))\n\n### Patch Changes\n\n- docs: add enums migration ([#358](https://github.com/hey-api/openapi-ts/pull/358))\n\n## 0.3.0\n\n### Minor Changes\n\n- fix: rename write to dryRun and invert value ([#326](https://github.com/hey-api/openapi-ts/pull/326))\n\n### Patch Changes\n\n- docs: update contributing guidelines ([#347](https://github.com/hey-api/openapi-ts/pull/347))\n\n## 0.2.2\n\n### Patch Changes\n\n- docs: add migration notes ([#306](https://github.com/hey-api/openapi-ts/pull/306))\n\n## 0.2.1\n\n### Patch Changes\n\n- fix(config): rename exportSchemas to schemas ([#288](https://github.com/hey-api/openapi-ts/pull/288))\n\n## 0.2.0\n\n### Minor Changes\n\n- docs: add support for localization of docs ([#251](https://github.com/hey-api/openapi-ts/pull/251))\n\n### Patch Changes\n\n- docs: add logo ([#250](https://github.com/hey-api/openapi-ts/pull/250))\n"
  },
  {
    "path": "docs/data/coreTeam.js",
    "content": "export const coreTeam = [\n  {\n    avatar: 'https://github.com/mrlubos.png',\n    links: [{ icon: 'github', link: 'https://github.com/mrlubos' }],\n    name: 'Lubos',\n    title: 'Hey API',\n  },\n];\n"
  },
  {
    "path": "docs/data/hallOfFame.js",
    "content": "export const hallOfFame = [\n  {\n    avatar: 'https://github.com/ferdikoomen.png',\n    links: [{ icon: 'github', link: 'https://github.com/ferdikoomen' }],\n    name: 'Ferdi Koomen',\n    title: 'OpenAPI TypeScript Codegen',\n  },\n  {\n    avatar: 'https://github.com/nicolas-chaulet.png',\n    links: [{ icon: 'github', link: 'https://github.com/nicolas-chaulet' }],\n    name: 'Nicolas Chaulet',\n    title: 'Made the Hey API fork',\n  },\n  {\n    avatar: 'https://github.com/jordanshatford.png',\n    links: [{ icon: 'github', link: 'https://github.com/jordanshatford' }],\n    name: 'Jordan Shatford',\n    title: 'Maintainer and Contributor',\n  },\n];\n"
  },
  {
    "path": "docs/data/people.ts",
    "content": "type Person = {\n  github: string;\n  name: string;\n};\n\nexport const dmitriyBrolnickij: Person = {\n  github: 'https://github.com/brolnickij',\n  name: 'Dmitriy Brolnickij',\n};\n\nexport const jacobCohen: Person = {\n  github: 'https://github.com/jacobinu',\n  name: 'Jacob Cohen',\n};\n\nexport const joshHemphill: Person = {\n  github: 'https://github.com/josh-hemphill',\n  name: 'Josh Hemphill',\n};\n\nexport const maxScopp: Person = {\n  github: 'https://github.com/max-scopp',\n  name: 'Max Scopp',\n};\n\nexport const sebastiaanWouters: Person = {\n  github: 'https://github.com/SebastiaanWouters',\n  name: 'Sebastiaan Wouters',\n};\n\nexport const yuriMikhin: Person = {\n  github: 'https://github.com/mikhin',\n  name: 'Yuri Mikhin',\n};\n"
  },
  {
    "path": "docs/email-form.md",
    "content": "<div class=\"home-list\">\n\n### Newsletter\n\n<form\n  action=\"https://app.kit.com/forms/7347653/subscriptions\"\n  class=\"seva-form formkit-form\"\n  method=\"post\"\n  data-sv-form=\"7347653\"\n  data-uid=\"d4e5f1d9b4\"\n  data-format=\"inline\"\n  data-version=\"5\"\n  data-options='{\"settings\":{\"after_subscribe\":{\"action\":\"message\",\"success_message\":\"Success! Now check your email to confirm your subscription.\",\"redirect_url\":\"\"},\"analytics\":{\"google\":null,\"fathom\":null,\"facebook\":null,\"segment\":null,\"pinterest\":null,\"sparkloop\":null,\"googletagmanager\":null},\"modal\":{\"trigger\":\"timer\",\"scroll_percentage\":null,\"timer\":5,\"devices\":\"all\",\"show_once_every\":15},\"powered_by\":{\"show\":false,\"url\":\"https://kit.com/features/forms?utm_campaign=poweredby&amp;utm_content=form&amp;utm_medium=referral&amp;utm_source=dynamic\"},\"recaptcha\":{\"enabled\":false},\"return_visitor\":{\"action\":\"show\",\"custom_content\":\"\"},\"slide_in\":{\"display_in\":\"bottom_right\",\"trigger\":\"timer\",\"scroll_percentage\":null,\"timer\":5,\"devices\":\"all\",\"show_once_every\":15},\"sticky_bar\":{\"display_in\":\"top\",\"trigger\":\"timer\",\"scroll_percentage\":null,\"timer\":5,\"devices\":\"all\",\"show_once_every\":15}},\"version\":\"5\"}'\n  min-width=\"400 500 600 700 800\"\n>\n  <div data-style=\"clean\">\n    <ul\n      class=\"formkit-alert formkit-alert-error\"\n      data-element=\"errors\"\n      data-group=\"alert\"\n    ></ul>\n    <div\n      data-element=\"fields\"\n      data-stacked=\"false\"\n      class=\"seva-fields formkit-fields\"\n    >\n      <div class=\"formkit-field\">\n        <input\n          class=\"DocSearch DocSearch-Button formkit-input\"\n          name=\"email_address\"\n          aria-label=\"Email Address\"\n          placeholder=\"Email Address\"\n          required=\"\"\n          type=\"email\"\n        />\n      </div>\n      <button\n        data-element=\"submit\"\n        class=\"formkit-submit\"\n      >\n        <div class=\"formkit-spinner\">\n          <div></div>\n          <div></div>\n          <div></div>\n        </div>\n        <span class=\"\">Subscribe</span>\n      </button>\n    </div>\n  </div>\n</form>\n\nSubscribe to product updates.\n\n</div>\n\n<style>\n.formkit-form {\n  margin: 0 auto;\n}\n\n.formkit-submit {\n  background-color: var(--vp-button-brand-bg);\n  border-color: var(--vp-button-brand-border);\n  color: var(--vp-button-brand-text);\n}\n\n\n.formkit-form[data-uid=\"d4e5f1d9b4\"] * {\n  box-sizing: border-box;\n}\n.formkit-form[data-uid=\"d4e5f1d9b4\"] {\n  -webkit-font-smoothing: antialiased;\n  -moz-osx-font-smoothing: grayscale;\n}\n.formkit-form[data-uid=\"d4e5f1d9b4\"] legend {\n  border: none;\n  font-size: inherit;\n  margin-bottom: 10px;\n  padding: 0;\n  position: relative;\n  display: table;\n}\n.formkit-form[data-uid=\"d4e5f1d9b4\"] fieldset {\n  border: 0;\n  padding: 0.01em 0 0 0;\n  margin: 0;\n  min-width: 0;\n}\n.formkit-form[data-uid=\"d4e5f1d9b4\"]\n  body:not(:-moz-handler-blocked)\n  fieldset {\n  display: table-cell;\n}\n.formkit-form[data-uid=\"d4e5f1d9b4\"] h1,\n.formkit-form[data-uid=\"d4e5f1d9b4\"] h2,\n.formkit-form[data-uid=\"d4e5f1d9b4\"] h3,\n.formkit-form[data-uid=\"d4e5f1d9b4\"] h4,\n.formkit-form[data-uid=\"d4e5f1d9b4\"] h5,\n.formkit-form[data-uid=\"d4e5f1d9b4\"] h6 {\n  color: inherit;\n  font-size: inherit;\n  font-weight: inherit;\n}\n.formkit-form[data-uid=\"d4e5f1d9b4\"] h2 {\n  font-size: 1.5em;\n  margin: 1em 0;\n}\n.formkit-form[data-uid=\"d4e5f1d9b4\"] h3 {\n  font-size: 1.17em;\n  margin: 1em 0;\n}\n.formkit-form[data-uid=\"d4e5f1d9b4\"] p {\n  color: inherit;\n  font-size: inherit;\n  font-weight: inherit;\n}\n.formkit-form[data-uid=\"d4e5f1d9b4\"] ol:not([template-default]),\n.formkit-form[data-uid=\"d4e5f1d9b4\"] ul:not([template-default]),\n.formkit-form[data-uid=\"d4e5f1d9b4\"] blockquote:not([template-default]) {\n  text-align: left;\n}\n.formkit-form[data-uid=\"d4e5f1d9b4\"] p:not([template-default]),\n.formkit-form[data-uid=\"d4e5f1d9b4\"] hr:not([template-default]),\n.formkit-form[data-uid=\"d4e5f1d9b4\"] blockquote:not([template-default]),\n.formkit-form[data-uid=\"d4e5f1d9b4\"] ol:not([template-default]),\n.formkit-form[data-uid=\"d4e5f1d9b4\"] ul:not([template-default]) {\n  color: inherit;\n  font-style: initial;\n}\n.formkit-form[data-uid=\"d4e5f1d9b4\"] .ordered-list,\n.formkit-form[data-uid=\"d4e5f1d9b4\"] .unordered-list {\n  list-style-position: outside !important;\n  padding-left: 1em;\n}\n.formkit-form[data-uid=\"d4e5f1d9b4\"] .list-item {\n  padding-left: 0;\n}\n.formkit-form[data-uid=\"d4e5f1d9b4\"][data-format=\"modal\"] {\n  display: none;\n}\n.formkit-form[data-uid=\"d4e5f1d9b4\"][data-format=\"slide in\"] {\n  display: none;\n}\n.formkit-form[data-uid=\"d4e5f1d9b4\"][data-format=\"sticky bar\"] {\n  display: none;\n}\n.formkit-sticky-bar\n  .formkit-form[data-uid=\"d4e5f1d9b4\"][data-format=\"sticky bar\"] {\n  display: block;\n}\n.formkit-form[data-uid=\"d4e5f1d9b4\"] .formkit-input,\n.formkit-form[data-uid=\"d4e5f1d9b4\"] .formkit-select,\n.formkit-form[data-uid=\"d4e5f1d9b4\"] .formkit-checkboxes {\n  width: 100%;\n}\n.formkit-form[data-uid=\"d4e5f1d9b4\"] .formkit-button,\n.formkit-form[data-uid=\"d4e5f1d9b4\"] .formkit-submit {\n  border: 0;\n  border-radius: 5px;\n  cursor: pointer;\n  display: inline-block;\n  text-align: center;\n  font-size: 16px;\n  font-weight: 500;\n  cursor: pointer;\n  margin-bottom: 16px;\n  overflow: hidden;\n  padding: 0;\n  position: relative;\n  vertical-align: middle;\n}\n.formkit-form[data-uid=\"d4e5f1d9b4\"] .formkit-button:hover > span,\n.formkit-form[data-uid=\"d4e5f1d9b4\"] .formkit-submit:hover > span,\n.formkit-form[data-uid=\"d4e5f1d9b4\"] .formkit-button:focus > span,\n.formkit-form[data-uid=\"d4e5f1d9b4\"] .formkit-submit:focus > span {\n  background-color: rgba(0, 0, 0, 0.1);\n}\n.formkit-form[data-uid=\"d4e5f1d9b4\"] .formkit-button > span,\n.formkit-form[data-uid=\"d4e5f1d9b4\"] .formkit-submit > span {\n  display: block;\n  -webkit-transition: all 300ms ease-in-out;\n  transition: all 300ms ease-in-out;\n  padding: 12px 24px;\n}\n.formkit-form[data-uid=\"d4e5f1d9b4\"] .formkit-input {\n  -ms-flex: 1 0 auto;\n  -webkit-flex: 1 0 auto;\n  -webkit-transition: border-color ease-out 300ms;\n  background-color: var(--vp-c-bg-alt);\n  border-radius: 8px;\n  flex: 1 0 auto;\n  font-size: 16px;\n  height: 100%;\n  line-height: 1.4;\n  margin: 0;\n  padding: 0 10px 0 12px;\n  transition: border-color ease-out 300ms;\n}\n.formkit-form[data-uid=\"d4e5f1d9b4\"] .formkit-input:focus {\n  background-color: var(--vp-c-bg-alt);\n  border-color: var(--vp-c-brand-1);\n  outline: none;\n  -webkit-transition: border-color ease 300ms;\n  transition: border-color ease 300ms;\n}\n.formkit-form[data-uid=\"d4e5f1d9b4\"] .formkit-input::-webkit-input-placeholder {\n  color: inherit;\n  opacity: 0.8;\n}\n.formkit-form[data-uid=\"d4e5f1d9b4\"] .formkit-input::-moz-placeholder {\n  color: inherit;\n  opacity: 0.8;\n}\n.formkit-form[data-uid=\"d4e5f1d9b4\"] .formkit-input:-ms-input-placeholder {\n  color: inherit;\n  opacity: 0.8;\n}\n.formkit-form[data-uid=\"d4e5f1d9b4\"] .formkit-input::placeholder {\n  color: inherit;\n  opacity: 0.8;\n}\n.formkit-form[data-uid=\"d4e5f1d9b4\"] [data-group=\"dropdown\"] {\n  position: relative;\n  display: inline-block;\n  width: 100%;\n}\n.formkit-form[data-uid=\"d4e5f1d9b4\"] [data-group=\"dropdown\"]::before {\n  content: \"\";\n  top: calc(50% - 2.5px);\n  right: 10px;\n  position: absolute;\n  pointer-events: none;\n  border-color: #4f4f4f transparent transparent transparent;\n  border-style: solid;\n  border-width: 6px 6px 0 6px;\n  height: 0;\n  width: 0;\n  z-index: 999;\n}\n.formkit-form[data-uid=\"d4e5f1d9b4\"] [data-group=\"dropdown\"] select {\n  height: auto;\n  width: 100%;\n  cursor: pointer;\n  color: #333333;\n  line-height: 1.4;\n  margin-bottom: 0;\n  padding: 0 6px;\n  -webkit-appearance: none;\n  -moz-appearance: none;\n  appearance: none;\n  font-size: 16px;\n  padding: 12px;\n  padding-right: 25px;\n  border: 1px solid #e3e3e3;\n  background: #ffffff;\n}\n.formkit-form[data-uid=\"d4e5f1d9b4\"] [data-group=\"dropdown\"] select:focus {\n  outline: none;\n}\n.formkit-form[data-uid=\"d4e5f1d9b4\"] [data-group=\"checkboxes\"] {\n  text-align: left;\n  margin: 0;\n}\n.formkit-form[data-uid=\"d4e5f1d9b4\"]\n  [data-group=\"checkboxes\"]\n  [data-group=\"checkbox\"] {\n  margin-bottom: 10px;\n}\n.formkit-form[data-uid=\"d4e5f1d9b4\"]\n  [data-group=\"checkboxes\"]\n  [data-group=\"checkbox\"]\n  * {\n  cursor: pointer;\n}\n.formkit-form[data-uid=\"d4e5f1d9b4\"]\n  [data-group=\"checkboxes\"]\n  [data-group=\"checkbox\"]:last-of-type {\n  margin-bottom: 0;\n}\n.formkit-form[data-uid=\"d4e5f1d9b4\"]\n  [data-group=\"checkboxes\"]\n  [data-group=\"checkbox\"]\n  input[type=\"checkbox\"] {\n  display: none;\n}\n.formkit-form[data-uid=\"d4e5f1d9b4\"]\n  [data-group=\"checkboxes\"]\n  [data-group=\"checkbox\"]\n  input[type=\"checkbox\"]\n  + label::after {\n  content: none;\n}\n.formkit-form[data-uid=\"d4e5f1d9b4\"]\n  [data-group=\"checkboxes\"]\n  [data-group=\"checkbox\"]\n  input[type=\"checkbox\"]:checked\n  + label::after {\n  border-color: #ffffff;\n  content: \"\";\n}\n.formkit-form[data-uid=\"d4e5f1d9b4\"]\n  [data-group=\"checkboxes\"]\n  [data-group=\"checkbox\"]\n  input[type=\"checkbox\"]:checked\n  + label::before {\n  background: #10bf7a;\n  border-color: #10bf7a;\n}\n.formkit-form[data-uid=\"d4e5f1d9b4\"]\n  [data-group=\"checkboxes\"]\n  [data-group=\"checkbox\"]\n  label {\n  position: relative;\n  display: inline-block;\n  padding-left: 28px;\n}\n.formkit-form[data-uid=\"d4e5f1d9b4\"]\n  [data-group=\"checkboxes\"]\n  [data-group=\"checkbox\"]\n  label::before,\n.formkit-form[data-uid=\"d4e5f1d9b4\"]\n  [data-group=\"checkboxes\"]\n  [data-group=\"checkbox\"]\n  label::after {\n  position: absolute;\n  content: \"\";\n  display: inline-block;\n}\n.formkit-form[data-uid=\"d4e5f1d9b4\"]\n  [data-group=\"checkboxes\"]\n  [data-group=\"checkbox\"]\n  label::before {\n  height: 16px;\n  width: 16px;\n  border: 1px solid #e3e3e3;\n  background: #ffffff;\n  left: 0px;\n  top: 3px;\n}\n.formkit-form[data-uid=\"d4e5f1d9b4\"]\n  [data-group=\"checkboxes\"]\n  [data-group=\"checkbox\"]\n  label::after {\n  height: 4px;\n  width: 8px;\n  border-left: 2px solid #4d4d4d;\n  border-bottom: 2px solid #4d4d4d;\n  -webkit-transform: rotate(-45deg);\n  -ms-transform: rotate(-45deg);\n  transform: rotate(-45deg);\n  left: 4px;\n  top: 8px;\n}\n.formkit-form[data-uid=\"d4e5f1d9b4\"] .formkit-alert {\n  background: #f9fafb;\n  border: 1px solid #e3e3e3;\n  border-radius: 5px;\n  -webkit-flex: 1 0 auto;\n  -ms-flex: 1 0 auto;\n  flex: 1 0 auto;\n  list-style: none;\n  margin: 25px auto;\n  padding: 12px;\n  text-align: center;\n  width: 100%;\n}\n.formkit-form[data-uid=\"d4e5f1d9b4\"] .formkit-alert:empty {\n  display: none;\n}\n.formkit-form[data-uid=\"d4e5f1d9b4\"] .formkit-alert-success {\n  background: #d3fbeb;\n  border-color: #10bf7a;\n  color: #0c905c;\n}\n.formkit-form[data-uid=\"d4e5f1d9b4\"] .formkit-alert-error {\n  background: #fde8e2;\n  border-color: #f2643b;\n  color: #ea4110;\n}\n.formkit-form[data-uid=\"d4e5f1d9b4\"] .formkit-spinner {\n  display: -webkit-box;\n  display: -webkit-flex;\n  display: -ms-flexbox;\n  display: flex;\n  height: 0px;\n  width: 0px;\n  margin: 0 auto;\n  position: absolute;\n  top: 0;\n  left: 0;\n  right: 0;\n  width: 0px;\n  overflow: hidden;\n  text-align: center;\n  -webkit-transition: all 300ms ease-in-out;\n  transition: all 300ms ease-in-out;\n}\n.formkit-form[data-uid=\"d4e5f1d9b4\"] .formkit-spinner > div {\n  margin: auto;\n  width: 12px;\n  height: 12px;\n  background-color: #fff;\n  opacity: 0.3;\n  border-radius: 100%;\n  display: inline-block;\n  -webkit-animation: formkit-bouncedelay-formkit-form-data-uid-d4e5f1d9b4-\n    1.4s infinite ease-in-out both;\n  animation: formkit-bouncedelay-formkit-form-data-uid-d4e5f1d9b4- 1.4s\n    infinite ease-in-out both;\n}\n.formkit-form[data-uid=\"d4e5f1d9b4\"] .formkit-spinner > div:nth-child(1) {\n  -webkit-animation-delay: -0.32s;\n  animation-delay: -0.32s;\n}\n.formkit-form[data-uid=\"d4e5f1d9b4\"] .formkit-spinner > div:nth-child(2) {\n  -webkit-animation-delay: -0.16s;\n  animation-delay: -0.16s;\n}\n.formkit-form[data-uid=\"d4e5f1d9b4\"] .formkit-submit[data-active] .formkit-spinner {\n  opacity: 1;\n  height: 100%;\n  width: 50px;\n}\n.formkit-form[data-uid=\"d4e5f1d9b4\"] .formkit-submit[data-active] .formkit-spinner ~ span {\n  opacity: 0;\n}\n.formkit-form[data-uid=\"d4e5f1d9b4\"]\n  .formkit-powered-by[data-active=\"false\"] {\n  opacity: 0.35;\n}\n.formkit-form[data-uid=\"d4e5f1d9b4\"]\n  .formkit-powered-by-convertkit-container {\n  display: -webkit-box;\n  display: -webkit-flex;\n  display: -ms-flexbox;\n  display: flex;\n  width: 100%;\n  margin: 10px 0;\n  position: relative;\n}\n.formkit-form[data-uid=\"d4e5f1d9b4\"]\n  .formkit-powered-by-convertkit-container[data-active=\"false\"] {\n  opacity: 0.35;\n}\n.formkit-form[data-uid=\"d4e5f1d9b4\"] .formkit-powered-by-convertkit {\n  -webkit-align-items: center;\n  -webkit-box-align: center;\n  -ms-flex-align: center;\n  align-items: center;\n  background-color: #ffffff;\n  border-radius: 9px;\n  color: #3d3d3d;\n  cursor: pointer;\n  display: block;\n  height: 36px;\n  margin: 0 auto;\n  opacity: 0.95;\n  padding: 0;\n  -webkit-text-decoration: none;\n  text-decoration: none;\n  text-indent: 100%;\n  -webkit-transition: ease-in-out all 200ms;\n  transition: ease-in-out all 200ms;\n  white-space: nowrap;\n  overflow: hidden;\n  -webkit-user-select: none;\n  -moz-user-select: none;\n  -ms-user-select: none;\n  user-select: none;\n  width: 157px;\n  background-repeat: no-repeat;\n  background-position: center;\n  background-image: url(\"data:image/svg+xml;charset=utf8,%3Csvg width='133' height='36' viewBox='0 0 133 36' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M0.861 25.5C0.735 25.5 0.651 25.416 0.651 25.29V10.548C0.651 10.422 0.735 10.338 0.861 10.338H6.279C9.072 10.338 10.668 11.451 10.668 13.824C10.668 15.819 9.219 16.932 8.001 17.226C7.707 17.268 7.707 17.625 8.022 17.688C9.912 18.108 11.088 19.116 11.088 21.321C11.088 23.715 9.429 25.5 6.426 25.5H0.861ZM5.397 23.085C6.825 23.085 7.518 22.224 7.518 21.006C7.518 19.683 6.825 18.948 5.397 18.948H4.2V23.085H5.397ZM5.313 16.617C6.51 16.617 7.245 15.945 7.245 14.601C7.245 13.383 6.51 12.753 5.25 12.753H4.2V16.617H5.313ZM17.9758 23.883C17.9758 23.568 17.6608 23.505 17.5348 23.799C17.0308 24.954 16.1698 25.731 14.5528 25.731C12.8728 25.731 12.0958 24.471 12.0958 22.707V14.937C12.0958 14.811 12.1798 14.727 12.3058 14.727H15.2248C15.3508 14.727 15.4348 14.811 15.4348 14.937V21.657C15.4348 22.581 15.7708 23.022 16.4638 23.022C17.1778 23.022 17.6188 22.581 17.6188 21.657V14.937C17.6188 14.811 17.7028 14.727 17.8288 14.727H20.7478C20.8738 14.727 20.9578 14.811 20.9578 14.937V25.29C20.9578 25.416 20.8738 25.5 20.7478 25.5H18.1858C18.0598 25.5 17.9758 25.416 17.9758 25.29V23.883ZM25.6141 25.29C25.6141 25.416 25.5301 25.5 25.4041 25.5H22.4851C22.3591 25.5 22.2751 25.416 22.2751 25.29V14.937C22.2751 14.811 22.3591 14.727 22.4851 14.727H25.4041C25.5301 14.727 25.6141 14.811 25.6141 14.937V25.29ZM23.9131 13.74C22.8001 13.74 22.0441 12.942 22.0441 11.934C22.0441 10.926 22.8001 10.107 23.9131 10.107C25.0051 10.107 25.7611 10.926 25.7611 11.934C25.7611 12.942 25.0051 13.74 23.9131 13.74ZM26.7883 10.548C26.7883 10.422 26.8723 10.338 26.9983 10.338H29.9173C30.0433 10.338 30.1273 10.422 30.1273 10.548V22.056C30.1273 22.749 30.2533 23.085 30.8203 23.085C31.0093 23.085 31.1983 23.043 31.3663 23.001C31.5133 22.959 31.6183 22.959 31.6183 23.127V25.059C31.6183 25.164 31.5763 25.269 31.4923 25.311C30.9673 25.521 30.2953 25.71 29.5813 25.71C27.7123 25.71 26.7883 24.639 26.7883 22.476V10.548ZM32.4237 14.727C32.8227 14.727 32.9277 14.538 32.9697 14.055L33.1167 12.039C33.1167 11.913 33.2217 11.829 33.3477 11.829H35.8887C36.0147 11.829 36.0987 11.913 36.0987 12.039V14.517C36.0987 14.643 36.1827 14.727 36.3087 14.727H38.2827C38.4087 14.727 38.4927 14.811 38.4927 14.937V16.659C38.4927 16.785 38.4087 16.869 38.2827 16.869H36.0777V22.056C36.0777 22.875 36.5397 23.085 37.0647 23.085C37.4847 23.085 37.9467 22.938 38.3247 22.707C38.4717 22.623 38.5767 22.665 38.5767 22.833V24.828C38.5767 24.933 38.5347 25.017 38.4507 25.08C37.8417 25.458 36.9807 25.71 36.0357 25.71C34.2927 25.71 32.7387 24.912 32.7387 22.476V16.869H31.8567C31.7307 16.869 31.6467 16.785 31.6467 16.659V14.937C31.6467 14.811 31.7307 14.727 31.8567 14.727H32.4237ZM51.3808 14.727C51.5068 14.727 51.5908 14.79 51.6118 14.916L52.3888 19.851L52.5778 21.174C52.6198 21.468 52.9558 21.468 52.9768 21.174C53.0398 20.712 53.0818 20.271 53.1658 19.83L53.8798 14.916C53.9008 14.79 53.9848 14.727 54.1108 14.727H56.6728C56.8198 14.727 56.8828 14.811 56.8618 14.958L54.6778 25.311C54.6568 25.437 54.5728 25.5 54.4468 25.5H51.3178C51.1918 25.5 51.1078 25.437 51.0868 25.311L50.1208 20.082L49.8898 18.633C49.8688 18.444 49.6588 18.444 49.6378 18.633L49.4068 20.103L48.5458 25.311C48.5248 25.437 48.4408 25.5 48.3148 25.5H45.2068C45.0808 25.5 44.9968 25.437 44.9758 25.311L42.8128 14.958C42.7918 14.811 42.8548 14.727 43.0018 14.727H45.9628C46.0888 14.727 46.1728 14.79 46.1938 14.916L46.9288 19.83C47.0128 20.271 47.0758 20.754 47.1388 21.195C47.2018 21.51 47.4748 21.531 47.5378 21.195L47.7478 19.872L48.6088 14.916C48.6298 14.79 48.7138 14.727 48.8398 14.727H51.3808ZM61.1582 25.29C61.1582 25.416 61.0742 25.5 60.9482 25.5H58.0292C57.9032 25.5 57.8192 25.416 57.8192 25.29V14.937C57.8192 14.811 57.9032 14.727 58.0292 14.727H60.9482C61.0742 14.727 61.1582 14.811 61.1582 14.937V25.29ZM59.4572 13.74C58.3442 13.74 57.5882 12.942 57.5882 11.934C57.5882 10.926 58.3442 10.107 59.4572 10.107C60.5492 10.107 61.3052 10.926 61.3052 11.934C61.3052 12.942 60.5492 13.74 59.4572 13.74ZM62.8154 14.727C63.2144 14.727 63.3194 14.538 63.3614 14.055L63.5084 12.039C63.5084 11.913 63.6134 11.829 63.7394 11.829H66.2804C66.4064 11.829 66.4904 11.913 66.4904 12.039V14.517C66.4904 14.643 66.5744 14.727 66.7004 14.727H68.6744C68.8004 14.727 68.8844 14.811 68.8844 14.937V16.659C68.8844 16.785 68.8004 16.869 68.6744 16.869H66.4694V22.056C66.4694 22.875 66.9314 23.085 67.4564 23.085C67.8764 23.085 68.3384 22.938 68.7164 22.707C68.8634 22.623 68.9684 22.665 68.9684 22.833V24.828C68.9684 24.933 68.9264 25.017 68.8424 25.08C68.2334 25.458 67.3724 25.71 66.4274 25.71C64.6844 25.71 63.1304 24.912 63.1304 22.476V16.869H62.2484C62.1224 16.869 62.0384 16.785 62.0384 16.659V14.937C62.0384 14.811 62.1224 14.727 62.2484 14.727H62.8154ZM73.4298 16.323C73.4298 16.638 73.7868 16.68 73.9128 16.407C74.3748 15.315 75.1308 14.496 76.6008 14.496C78.2178 14.496 78.9528 15.609 78.9528 17.373V25.29C78.9528 25.416 78.8688 25.5 78.7428 25.5H75.8238C75.6978 25.5 75.6138 25.416 75.6138 25.29V18.633C75.6138 17.709 75.2778 17.268 74.5848 17.268C73.8708 17.268 73.4298 17.709 73.4298 18.633V25.29C73.4298 25.416 73.3458 25.5 73.2198 25.5H70.3008C70.1748 25.5 70.0908 25.416 70.0908 25.29V10.548C70.0908 10.422 70.1748 10.338 70.3008 10.338H73.2198C73.3458 10.338 73.4298 10.422 73.4298 10.548V16.323Z' fill='%231E1E1E'/%3E%3Cpath d='M100.132 16.3203C105.58 17.3761 107.272 22.4211 107.318 27.4961C107.318 27.6101 107.226 27.7041 107.112 27.7041H100.252C100.138 27.7041 100.046 27.6121 100.046 27.5001C100.026 23.5629 99.3877 20.0896 95.4865 19.9396C95.3705 19.9356 95.2725 20.0276 95.2725 20.1456V27.5001C95.2725 27.6141 95.1806 27.7061 95.0666 27.7061H88.206C88.092 27.7061 88 27.6141 88 27.5001V8.75585C88 8.64187 88.092 8.54989 88.206 8.54989H95.0686C95.1826 8.54989 95.2745 8.64187 95.2745 8.75585V15.7764C95.2745 15.8804 95.3585 15.9644 95.4625 15.9644C95.5445 15.9644 95.6185 15.9104 95.6425 15.8324C97.4081 10.0416 100.709 8.58588 106.07 8.55189C106.184 8.55189 106.276 8.64387 106.276 8.75785V15.7604C106.276 15.8744 106.184 15.9664 106.07 15.9664H100.166C100.066 15.9664 99.9856 16.0464 99.9856 16.1464C99.9856 16.2304 100.048 16.3043 100.132 16.3203ZM118.918 20.7095V16.1704C118.918 16.0564 119.01 15.9644 119.124 15.9644H124.173C124.273 15.9644 124.353 15.8844 124.353 15.7844C124.353 15.6985 124.291 15.6245 124.207 15.6085C120.256 14.8246 118.432 12.5511 118.37 8.75585C118.368 8.64387 118.458 8.54989 118.572 8.54989H125.986C126.1 8.54989 126.192 8.64187 126.192 8.75585V11.9532C126.192 12.0672 126.284 12.1592 126.398 12.1592H130.649C130.763 12.1592 130.855 12.2511 130.855 12.3651V15.7624C130.855 15.8764 130.763 15.9684 130.649 15.9684H126.398C126.284 15.9684 126.192 16.0604 126.192 16.1744V19.8356C126.192 21.1294 126.986 21.5553 128.04 21.5553C129.692 21.5553 131.323 20.8114 131.977 20.4735C132.113 20.4035 132.277 20.5015 132.277 20.6555V26.3543C132.277 26.5063 132.193 26.6463 132.059 26.7183C131.413 27.0582 129.418 28 127.136 28C122.435 27.996 118.918 26.0824 118.918 20.7095ZM109.266 27.4981V16.1704C109.266 16.0564 109.358 15.9644 109.472 15.9644H116.334C116.448 15.9644 116.54 16.0564 116.54 16.1704V27.4981C116.54 27.6121 116.448 27.7041 116.334 27.7041H109.472C109.358 27.7021 109.266 27.6101 109.266 27.4981ZM108.876 11.4913C108.876 13.4189 110.238 14.9826 112.853 14.9826C115.469 14.9826 116.83 13.4189 116.83 11.4913C116.83 9.56369 115.471 8 112.853 8C110.238 8 108.876 9.56369 108.876 11.4913Z' fill='%231E1E1E'/%3E%3C/svg%3E\");\n}\n.formkit-form[data-uid=\"d4e5f1d9b4\"] .formkit-powered-by-convertkit:hover,\n.formkit-form[data-uid=\"d4e5f1d9b4\"] .formkit-powered-by-convertkit:focus {\n  background-color: #ffffff;\n  -webkit-transform: scale(1.025) perspective(1px);\n  -ms-transform: scale(1.025) perspective(1px);\n  transform: scale(1.025) perspective(1px);\n  opacity: 1;\n}\n.formkit-form[data-uid=\"d4e5f1d9b4\"]\n  .formkit-powered-by-convertkit[data-variant=\"dark\"],\n.formkit-form[data-uid=\"d4e5f1d9b4\"]\n  .formkit-powered-by-convertkit[data-variant=\"light\"] {\n  background-color: transparent;\n  border-color: transparent;\n  width: 133px;\n}\n.formkit-form[data-uid=\"d4e5f1d9b4\"]\n  .formkit-powered-by-convertkit[data-variant=\"light\"] {\n  color: #ffffff;\n  background-image: url(\"data:image/svg+xml;charset=utf8,%3Csvg width='133' height='36' viewBox='0 0 133 36' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M0.861 25.5C0.735 25.5 0.651 25.416 0.651 25.29V10.548C0.651 10.422 0.735 10.338 0.861 10.338H6.279C9.072 10.338 10.668 11.451 10.668 13.824C10.668 15.819 9.219 16.932 8.001 17.226C7.707 17.268 7.707 17.625 8.022 17.688C9.912 18.108 11.088 19.116 11.088 21.321C11.088 23.715 9.429 25.5 6.426 25.5H0.861ZM5.397 23.085C6.825 23.085 7.518 22.224 7.518 21.006C7.518 19.683 6.825 18.948 5.397 18.948H4.2V23.085H5.397ZM5.313 16.617C6.51 16.617 7.245 15.945 7.245 14.601C7.245 13.383 6.51 12.753 5.25 12.753H4.2V16.617H5.313ZM17.9758 23.883C17.9758 23.568 17.6608 23.505 17.5348 23.799C17.0308 24.954 16.1698 25.731 14.5528 25.731C12.8728 25.731 12.0958 24.471 12.0958 22.707V14.937C12.0958 14.811 12.1798 14.727 12.3058 14.727H15.2248C15.3508 14.727 15.4348 14.811 15.4348 14.937V21.657C15.4348 22.581 15.7708 23.022 16.4638 23.022C17.1778 23.022 17.6188 22.581 17.6188 21.657V14.937C17.6188 14.811 17.7028 14.727 17.8288 14.727H20.7478C20.8738 14.727 20.9578 14.811 20.9578 14.937V25.29C20.9578 25.416 20.8738 25.5 20.7478 25.5H18.1858C18.0598 25.5 17.9758 25.416 17.9758 25.29V23.883ZM25.6141 25.29C25.6141 25.416 25.5301 25.5 25.4041 25.5H22.4851C22.3591 25.5 22.2751 25.416 22.2751 25.29V14.937C22.2751 14.811 22.3591 14.727 22.4851 14.727H25.4041C25.5301 14.727 25.6141 14.811 25.6141 14.937V25.29ZM23.9131 13.74C22.8001 13.74 22.0441 12.942 22.0441 11.934C22.0441 10.926 22.8001 10.107 23.9131 10.107C25.0051 10.107 25.7611 10.926 25.7611 11.934C25.7611 12.942 25.0051 13.74 23.9131 13.74ZM26.7883 10.548C26.7883 10.422 26.8723 10.338 26.9983 10.338H29.9173C30.0433 10.338 30.1273 10.422 30.1273 10.548V22.056C30.1273 22.749 30.2533 23.085 30.8203 23.085C31.0093 23.085 31.1983 23.043 31.3663 23.001C31.5133 22.959 31.6183 22.959 31.6183 23.127V25.059C31.6183 25.164 31.5763 25.269 31.4923 25.311C30.9673 25.521 30.2953 25.71 29.5813 25.71C27.7123 25.71 26.7883 24.639 26.7883 22.476V10.548ZM32.4237 14.727C32.8227 14.727 32.9277 14.538 32.9697 14.055L33.1167 12.039C33.1167 11.913 33.2217 11.829 33.3477 11.829H35.8887C36.0147 11.829 36.0987 11.913 36.0987 12.039V14.517C36.0987 14.643 36.1827 14.727 36.3087 14.727H38.2827C38.4087 14.727 38.4927 14.811 38.4927 14.937V16.659C38.4927 16.785 38.4087 16.869 38.2827 16.869H36.0777V22.056C36.0777 22.875 36.5397 23.085 37.0647 23.085C37.4847 23.085 37.9467 22.938 38.3247 22.707C38.4717 22.623 38.5767 22.665 38.5767 22.833V24.828C38.5767 24.933 38.5347 25.017 38.4507 25.08C37.8417 25.458 36.9807 25.71 36.0357 25.71C34.2927 25.71 32.7387 24.912 32.7387 22.476V16.869H31.8567C31.7307 16.869 31.6467 16.785 31.6467 16.659V14.937C31.6467 14.811 31.7307 14.727 31.8567 14.727H32.4237ZM51.3808 14.727C51.5068 14.727 51.5908 14.79 51.6118 14.916L52.3888 19.851L52.5778 21.174C52.6198 21.468 52.9558 21.468 52.9768 21.174C53.0398 20.712 53.0818 20.271 53.1658 19.83L53.8798 14.916C53.9008 14.79 53.9848 14.727 54.1108 14.727H56.6728C56.8198 14.727 56.8828 14.811 56.8618 14.958L54.6778 25.311C54.6568 25.437 54.5728 25.5 54.4468 25.5H51.3178C51.1918 25.5 51.1078 25.437 51.0868 25.311L50.1208 20.082L49.8898 18.633C49.8688 18.444 49.6588 18.444 49.6378 18.633L49.4068 20.103L48.5458 25.311C48.5248 25.437 48.4408 25.5 48.3148 25.5H45.2068C45.0808 25.5 44.9968 25.437 44.9758 25.311L42.8128 14.958C42.7918 14.811 42.8548 14.727 43.0018 14.727H45.9628C46.0888 14.727 46.1728 14.79 46.1938 14.916L46.9288 19.83C47.0128 20.271 47.0758 20.754 47.1388 21.195C47.2018 21.51 47.4748 21.531 47.5378 21.195L47.7478 19.872L48.6088 14.916C48.6298 14.79 48.7138 14.727 48.8398 14.727H51.3808ZM61.1582 25.29C61.1582 25.416 61.0742 25.5 60.9482 25.5H58.0292C57.9032 25.5 57.8192 25.416 57.8192 25.29V14.937C57.8192 14.811 57.9032 14.727 58.0292 14.727H60.9482C61.0742 14.727 61.1582 14.811 61.1582 14.937V25.29ZM59.4572 13.74C58.3442 13.74 57.5882 12.942 57.5882 11.934C57.5882 10.926 58.3442 10.107 59.4572 10.107C60.5492 10.107 61.3052 10.926 61.3052 11.934C61.3052 12.942 60.5492 13.74 59.4572 13.74ZM62.8154 14.727C63.2144 14.727 63.3194 14.538 63.3614 14.055L63.5084 12.039C63.5084 11.913 63.6134 11.829 63.7394 11.829H66.2804C66.4064 11.829 66.4904 11.913 66.4904 12.039V14.517C66.4904 14.643 66.5744 14.727 66.7004 14.727H68.6744C68.8004 14.727 68.8844 14.811 68.8844 14.937V16.659C68.8844 16.785 68.8004 16.869 68.6744 16.869H66.4694V22.056C66.4694 22.875 66.9314 23.085 67.4564 23.085C67.8764 23.085 68.3384 22.938 68.7164 22.707C68.8634 22.623 68.9684 22.665 68.9684 22.833V24.828C68.9684 24.933 68.9264 25.017 68.8424 25.08C68.2334 25.458 67.3724 25.71 66.4274 25.71C64.6844 25.71 63.1304 24.912 63.1304 22.476V16.869H62.2484C62.1224 16.869 62.0384 16.785 62.0384 16.659V14.937C62.0384 14.811 62.1224 14.727 62.2484 14.727H62.8154ZM73.4298 16.323C73.4298 16.638 73.7868 16.68 73.9128 16.407C74.3748 15.315 75.1308 14.496 76.6008 14.496C78.2178 14.496 78.9528 15.609 78.9528 17.373V25.29C78.9528 25.416 78.8688 25.5 78.7428 25.5H75.8238C75.6978 25.5 75.6138 25.416 75.6138 25.29V18.633C75.6138 17.709 75.2778 17.268 74.5848 17.268C73.8708 17.268 73.4298 17.709 73.4298 18.633V25.29C73.4298 25.416 73.3458 25.5 73.2198 25.5H70.3008C70.1748 25.5 70.0908 25.416 70.0908 25.29V10.548C70.0908 10.422 70.1748 10.338 70.3008 10.338H73.2198C73.3458 10.338 73.4298 10.422 73.4298 10.548V16.323Z' fill='white'/%3E%3Cpath d='M100.132 16.3203C105.58 17.3761 107.272 22.4211 107.318 27.4961C107.318 27.6101 107.226 27.7041 107.112 27.7041H100.252C100.138 27.7041 100.046 27.6121 100.046 27.5001C100.026 23.5629 99.3877 20.0896 95.4865 19.9396C95.3705 19.9356 95.2725 20.0276 95.2725 20.1456V27.5001C95.2725 27.6141 95.1806 27.7061 95.0666 27.7061H88.206C88.092 27.7061 88 27.6141 88 27.5001V8.75585C88 8.64187 88.092 8.54989 88.206 8.54989H95.0686C95.1826 8.54989 95.2745 8.64187 95.2745 8.75585V15.7764C95.2745 15.8804 95.3585 15.9644 95.4625 15.9644C95.5445 15.9644 95.6185 15.9104 95.6425 15.8324C97.4081 10.0416 100.709 8.58588 106.07 8.55189C106.184 8.55189 106.276 8.64387 106.276 8.75785V15.7604C106.276 15.8744 106.184 15.9664 106.07 15.9664H100.166C100.066 15.9664 99.9856 16.0464 99.9856 16.1464C99.9856 16.2304 100.048 16.3043 100.132 16.3203ZM118.918 20.7095V16.1704C118.918 16.0564 119.01 15.9644 119.124 15.9644H124.173C124.273 15.9644 124.353 15.8844 124.353 15.7844C124.353 15.6985 124.291 15.6245 124.207 15.6085C120.256 14.8246 118.432 12.5511 118.37 8.75585C118.368 8.64387 118.458 8.54989 118.572 8.54989H125.986C126.1 8.54989 126.192 8.64187 126.192 8.75585V11.9532C126.192 12.0672 126.284 12.1592 126.398 12.1592H130.649C130.763 12.1592 130.855 12.2511 130.855 12.3651V15.7624C130.855 15.8764 130.763 15.9684 130.649 15.9684H126.398C126.284 15.9684 126.192 16.0604 126.192 16.1744V19.8356C126.192 21.1294 126.986 21.5553 128.04 21.5553C129.692 21.5553 131.323 20.8114 131.977 20.4735C132.113 20.4035 132.277 20.5015 132.277 20.6555V26.3543C132.277 26.5063 132.193 26.6463 132.059 26.7183C131.413 27.0582 129.418 28 127.136 28C122.435 27.996 118.918 26.0824 118.918 20.7095ZM109.266 27.4981V16.1704C109.266 16.0564 109.358 15.9644 109.472 15.9644H116.334C116.448 15.9644 116.54 16.0564 116.54 16.1704V27.4981C116.54 27.6121 116.448 27.7041 116.334 27.7041H109.472C109.358 27.7021 109.266 27.6101 109.266 27.4981ZM108.876 11.4913C108.876 13.4189 110.238 14.9826 112.853 14.9826C115.469 14.9826 116.83 13.4189 116.83 11.4913C116.83 9.56369 115.471 8 112.853 8C110.238 8 108.876 9.56369 108.876 11.4913Z' fill='white'/%3E%3C/svg%3E\");\n}\n@-webkit-keyframes formkit-bouncedelay-formkit-form-data-uid-d4e5f1d9b4- {\n  0%,\n  80%,\n  100% {\n    -webkit-transform: scale(0);\n    -ms-transform: scale(0);\n    transform: scale(0);\n  }\n  40% {\n    -webkit-transform: scale(1);\n    -ms-transform: scale(1);\n    transform: scale(1);\n  }\n}\n@keyframes formkit-bouncedelay-formkit-form-data-uid-d4e5f1d9b4- {\n  0%,\n  80%,\n  100% {\n    -webkit-transform: scale(0);\n    -ms-transform: scale(0);\n    transform: scale(0);\n  }\n  40% {\n    -webkit-transform: scale(1);\n    -ms-transform: scale(1);\n    transform: scale(1);\n  }\n}\n.formkit-form[data-uid=\"d4e5f1d9b4\"] blockquote {\n  padding: 10px 20px;\n  margin: 0 0 20px;\n  border-left: 5px solid #e1e1e1;\n}\n.formkit-form[data-uid=\"d4e5f1d9b4\"] .seva-custom-content {\n  padding: 16px;\n  font-size: 16px;\n  color: #fff;\n  mix-blend-mode: difference;\n}\n.formkit-form[data-uid=\"d4e5f1d9b4\"] .formkit-modal.guard {\n  max-width: 420px;\n  width: 100%;\n}\n.formkit-form[data-uid=\"d4e5f1d9b4\"] {\n  max-width: 700px;\n}\n.formkit-form[data-uid=\"d4e5f1d9b4\"] [data-style=\"clean\"] {\n  width: 100%;\n}\n.formkit-form[data-uid=\"d4e5f1d9b4\"] .formkit-fields {\n  display: -webkit-box;\n  display: -webkit-flex;\n  display: -ms-flexbox;\n  display: flex;\n  -webkit-flex-wrap: wrap;\n  -ms-flex-wrap: wrap;\n  flex-wrap: wrap;\n  margin: 0 auto;\n}\n.formkit-form[data-uid=\"d4e5f1d9b4\"] .formkit-field,\n.formkit-form[data-uid=\"d4e5f1d9b4\"] .formkit-submit {\n  margin: 0 0 16px 0;\n  -webkit-flex: 1 0 100%;\n  -ms-flex: 1 0 100%;\n  flex: 1 0 100%;\n}\n.formkit-form[data-uid=\"d4e5f1d9b4\"]\n  .formkit-powered-by-convertkit-container {\n  margin: 0;\n}\n.formkit-form[data-uid=\"d4e5f1d9b4\"] .formkit-submit {\n  position: static;\n}\n.formkit-form[data-uid=\"d4e5f1d9b4\"][min-width~=\"700\"] [data-style=\"clean\"],\n.formkit-form[data-uid=\"d4e5f1d9b4\"][min-width~=\"800\"] [data-style=\"clean\"] {\n  padding-bottom: 0;\n  padding-top: 16px;\n}\n.formkit-form[data-uid=\"d4e5f1d9b4\"][min-width~=\"700\"]\n  .formkit-fields[data-stacked=\"false\"],\n.formkit-form[data-uid=\"d4e5f1d9b4\"][min-width~=\"800\"]\n  .formkit-fields[data-stacked=\"false\"] {\n  margin-left: -5px;\n  margin-right: -5px;\n}\n.formkit-form[data-uid=\"d4e5f1d9b4\"][min-width~=\"700\"]\n  .formkit-fields[data-stacked=\"false\"]\n  .formkit-field,\n.formkit-form[data-uid=\"d4e5f1d9b4\"][min-width~=\"800\"]\n  .formkit-fields[data-stacked=\"false\"]\n  .formkit-field,\n.formkit-form[data-uid=\"d4e5f1d9b4\"][min-width~=\"700\"] .formkit-fields[data-stacked=\"false\"] .formkit-submit,\n.formkit-form[data-uid=\"d4e5f1d9b4\"][min-width~=\"800\"] .formkit-fields[data-stacked=\"false\"] .formkit-submit {\n  margin: 0 5px 16px 5px;\n}\n.formkit-form[data-uid=\"d4e5f1d9b4\"][min-width~=\"700\"]\n  .formkit-fields[data-stacked=\"false\"]\n  .formkit-field,\n.formkit-form[data-uid=\"d4e5f1d9b4\"][min-width~=\"800\"]\n  .formkit-fields[data-stacked=\"false\"]\n  .formkit-field {\n  -webkit-flex: 100 1 auto;\n  -ms-flex: 100 1 auto;\n  flex: 100 1 auto;\n}\n.formkit-form[data-uid=\"d4e5f1d9b4\"][min-width~=\"700\"] .formkit-fields[data-stacked=\"false\"] .formkit-submit,\n.formkit-form[data-uid=\"d4e5f1d9b4\"][min-width~=\"800\"] .formkit-fields[data-stacked=\"false\"] .formkit-submit {\n  -webkit-flex: 1 1 auto;\n  -ms-flex: 1 1 auto;\n  flex: 1 1 auto;\n}\n</style>\n"
  },
  {
    "path": "docs/embed.ts",
    "content": "import sdk from '@stackblitz/sdk';\n\n// https://api.npmjs.org/versions/@hey-api%2Fopenapi-ts/last-week\n\nexport const embedProject = (projectId: string) => async (event: Event) => {\n  const container = document.createElement('div');\n\n  if (event.target) {\n    const node = event.target as HTMLElement;\n    node.replaceWith(container);\n  }\n\n  switch (projectId) {\n    case 'hey-api-client-axios-example':\n      return await sdk.embedProjectId(container, projectId, {\n        height: 700,\n        openFile:\n          'openapi-ts.config.ts,src/client/schemas.gen.ts,src/client/sdk.gen.ts,src/client/types.gen.ts,src/App.tsx',\n        view: 'editor',\n      });\n    case 'hey-api-client-fetch-example':\n      return await sdk.embedProjectId(container, projectId, {\n        height: 700,\n        openFile:\n          'openapi-ts.config.ts,src/client/schemas.gen.ts,src/client/sdk.gen.ts,src/client/types.gen.ts,src/App.tsx',\n        view: 'editor',\n      });\n    case 'hey-api-client-fetch-plugin-fastify-example':\n      return await sdk.embedProjectId(container, projectId, {\n        height: 700,\n        openFile:\n          'openapi-ts.config.ts,src/client/fastify.gen.ts,src/client/types.gen.ts,src/server.ts',\n        view: 'editor',\n      });\n    case 'hey-api-client-fetch-plugin-tanstack-react-query-example':\n      return await sdk.embedProjectId(container, projectId, {\n        height: 700,\n        openFile:\n          'openapi-ts.config.ts,src/client/@tanstack/react-query.gen.ts,src/client/types.gen.ts,src/App.tsx',\n        view: 'editor',\n      });\n    case 'hey-api-client-fetch-plugin-zod-example':\n      return await sdk.embedProjectId(container, projectId, {\n        height: 700,\n        openFile: 'openapi-ts.config.ts,src/client/zod.gen.ts,src/App.tsx',\n        view: 'editor',\n      });\n    case 'hey-api-example':\n      return await sdk.embedProjectId(container, projectId, {\n        height: 700,\n        openFile:\n          'openapi-ts.config.ts,src/client/schemas.gen.ts,src/client/sdk.gen.ts,src/client/types.gen.ts',\n        view: 'editor',\n      });\n  }\n};\n"
  },
  {
    "path": "docs/index.md",
    "content": "---\nlayout: home\n\nhero:\n  name: OpenAPI to TypeScript in seconds.\n  tagline: Generate production-ready SDKs and validators from your OpenAPI spec. Used by Vercel, OpenCode, and PayPal.\n  actions:\n    - link: /openapi-ts/get-started\n      text: Get Started\n      theme: brand\n    - link: https://stackblitz.com/edit/hey-api-example?file=openapi-ts.config.ts,src%2Fclient%2Fschemas.gen.ts,src%2Fclient%2Fsdk.gen.ts,src%2Fclient%2Ftypes.gen.ts\n      text: View Demo\n      theme: alt\n    - link: https://github.com/orgs/hey-api/discussions/3159\n      text: Roadmap\n      theme: alt\n  image:\n    alt: Two people looking at the TypeScript logo\n    src: /assets/.gen/hero-920w.png\n\nfeatures:\n  - icon: <svg class=\"icon-openapi\" width=\"24\" height=\"24\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 30 32\"><path d=\"M8.96 18.397H.515l.005.123.014.238.007.102.022.275.006.061.033.304.003.03.043.327c.098.677.243 1.343.437 1.999l.003.008.1.326.006.018.093.276.025.07.087.24.04.107.078.2.06.149.065.154.086.188.05.114.105.225.035.072.126.256.02.039.154.293.033.057 7.235-4.366a5.754 5.754 0 0 1-.528-1.885ZM.914 22.27l.002.007.273-.085-.275.078ZM11.034 22.275l-5.97 5.967.092.085.255.227.203.172.055.045.232.187.03.024.255.196a.066.066 0 0 1 .01.007l1.113.752.04.024.219.13.134.076.128.072.232.126.032.017.658.32 3.213-7.805a5.719 5.719 0 0 1-.934-.623l.003.001ZM10.415 21.683l-.186-.219-.154-.199-.165-.233-.154-.241-7.22 4.349.371.584.03.044.002.003.388.547.009.011.008.011.176.229.21.261.045.055.173.203.076.087.15.171.084.092.039.042.114.12.046.047.2.204 5.956-5.956-.195-.209-.003-.003ZM18.31 22.272l-.2.154.016.025 4.342 7.209.594-.41c.42-.31.827-.645 1.22-1.007l-5.949-5.947-.023-.024ZM21.92 30.003l.01-.006-.01.006Zm-.005.003ZM21.929 29.994l.057-.028-.001-.002-.056.033v-.003Zm-.01.009-.002.001.002-.001ZM21.916 30.006l-.011-.018.01.018Zm.004-.003.01-.005-.01.005Z\" fill=\"#fff\"></path><path d=\"m21.837 29.719-4.2-6.97-.25.139-.256.128a5.756 5.756 0 0 1-4.106.319l-.27-.095-.27-.095-3.207 7.788.024.009.024.009.007.003.615.235a14.262 14.262 0 0 0 3.007.708l.349.038.056.005.28.023.095.006.245.014.15.006.195.007.348.004c.788 0 1.575-.066 2.352-.196l.04-.006.246-.045.143-.027.145-.03.24-.053.044-.01a14.241 14.241 0 0 0 3.398-1.267l.209-.115.424-.238-.007-.02.01.018.014-.008.056-.034-.15-.25Zm-10.8-16.335.2-.155-.015-.024-4.343-7.206-.595.41c-.42.31-.827.645-1.218 1.006l5.948 5.945.024.024ZM4.654 7.808l-.395.413c-.44.476-.841.971-1.203 1.491l-.052.075-.121.178-.123.188-.045.068a14.135 14.135 0 0 0-2.2 7.035l-.007.286-.005.285h8.424l.013-.285.016-.286a5.716 5.716 0 0 1 1.27-3.068c.058-.073.128-.142.192-.212.065-.07.124-.144.192-.212L4.654 7.808Zm17.38-2.09L22 5.695l-.224-.132-.13-.075-.132-.073-.228-.123-.036-.019a14.74 14.74 0 0 0-1.52-.686l-.04-.015-.342-.124a14.216 14.216 0 0 0-2.839-.673l-.118-.016-.119-.013-.228-.025-.064-.006-.273-.023-.342-.02-.124-.006v8.444c.433.045.862.138 1.279.279l6.216-6.211a13.96 13.96 0 0 0-.703-.461h.002ZM7.363 5.692l.147.244-.147-.244Zm0 0L7.36 5.69l.004.002Z\" fill=\"#fff\"></path><path d=\"m14.388 3.664-.285.005a14.24 14.24 0 0 0-1.78.184l-.04.007-.247.044-.143.027-.145.03-.24.053-.043.01a14.252 14.252 0 0 0-3.4 1.268l-.705.398v.001l4.349 7.219.25-.14a5.727 5.727 0 0 1 2.141-.657l.285-.022s.19-.01.286-.01V3.658c-.095 0-.19.003-.285.005h.002ZM28.827 17.131l-.014-.227-.007-.113-.022-.267-.006-.07-.032-.297-.002-.024-.002-.012-.043-.32-.001-.01a14.164 14.164 0 0 0-.436-1.992l-.003-.013-.094-.304-.013-.04-.091-.272-.026-.074-.086-.235-.043-.111-.075-.194-.063-.153-.063-.15-.083-.191-.049-.108-.107-.228-.033-.069-.128-.259-.018-.035-.149-.286c-.002-.003-.003-.007-.006-.01a14.217 14.217 0 0 0-.806-1.308l-6.217 6.218c.14.415.233.844.278 1.279h8.444l-.004-.125ZM20.42 17.828l-.013.285-.016.286a5.709 5.709 0 0 1-1.27 3.068c-.057.073-.128.142-.192.212s-.123.144-.191.212l5.956 5.956c.067-.068.13-.138.197-.206l.197-.207c.44-.477.843-.977 1.206-1.496l.043-.06.13-.193.113-.173.057-.084a14.13 14.13 0 0 0 2.196-7.03l.007-.285.005-.286H20.42Z\" fill=\"#fff\"></path></svg>\n    title: OpenAPI to TypeScript\n    details: Generate production-ready TypeScript from any OpenAPI specification.\n    link: /openapi-ts/get-started\n    linkText: Get started\n  - icon: <svg fill=\"none\" height=\"24\" viewBox=\"0 0 128 128\" width=\"24\" xmlns=\"http://www.w3.org/2000/svg\"><rect fill=\"#3178c6\" height=\"128\" rx=\"6\" width=\"128\"/><path clip-rule=\"evenodd\" d=\"m74.2622 99.468v14.026c2.2724 1.168 4.9598 2.045 8.0625 2.629 3.1027.585 6.3728.877 9.8105.877 3.3503 0 6.533-.321 9.5478-.964 3.016-.643 5.659-1.702 7.932-3.178 2.272-1.476 4.071-3.404 5.397-5.786 1.325-2.381 1.988-5.325 1.988-8.8313 0-2.5421-.379-4.7701-1.136-6.6841-.758-1.9139-1.85-3.6159-3.278-5.1062-1.427-1.4902-3.139-2.827-5.134-4.0104-1.996-1.1834-4.246-2.3011-6.752-3.353-1.8352-.7597-3.4812-1.4975-4.9378-2.2134-1.4567-.7159-2.6948-1.4464-3.7144-2.1915-1.0197-.7452-1.8063-1.5341-2.3598-2.3669-.5535-.8327-.8303-1.7751-.8303-2.827 0-.9643.2476-1.8336.7429-2.6079s1.1945-1.4391 2.0976-1.9943c.9031-.5551 2.0101-.9861 3.3211-1.2929 1.311-.3069 2.7676-.4603 4.3699-.4603 1.1658 0 2.3958.0877 3.6928.263 1.296.1753 2.6.4456 3.911.8109 1.311.3652 2.585.8254 3.824 1.3806 1.238.5552 2.381 1.198 3.43 1.9285v-13.1051c-2.127-.8182-4.45-1.4245-6.97-1.819s-5.411-.5917-8.6744-.5917c-3.3211 0-6.4674.3579-9.439 1.0738-2.9715.7159-5.5862 1.8336-7.844 3.353-2.2578 1.5195-4.0422 3.4553-5.3531 5.8075-1.311 2.3522-1.9665 5.1646-1.9665 8.4373 0 4.1785 1.2017 7.7433 3.6052 10.6945 2.4035 2.9513 6.0523 5.4496 10.9466 7.495 1.9228.7889 3.7145 1.5633 5.375 2.323 1.6606.7597 3.0954 1.5486 4.3044 2.3668s2.1628 1.7094 2.8618 2.6736c.7.9643 1.049 2.06 1.049 3.2873 0 .9062-.218 1.7462-.655 2.5202s-1.1 1.446-1.9885 2.016c-.8886.57-1.9956 1.016-3.3212 1.337-1.3255.321-2.8768.482-4.6539.482-3.0299 0-6.0305-.533-9.0021-1.6-2.9715-1.066-5.7245-2.666-8.2591-4.799zm-23.5596-34.9136h18.2974v-11.5544h-51v11.5544h18.2079v51.4456h14.4947z\" fill=\"#fff\" fill-rule=\"evenodd\"/></svg>\n    title: Instant SDKs\n    details: Highly customizable SDKs and types with sensible defaults that compile out of the box.\n    link: /openapi-ts/output\n    linkText: See output\n  - icon: <svg class=\"icon-json-schema xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 70.423 70.423\" height=\"24\" width=\"24\"><g fill=\"#fff\"><path d=\"M122.994 114.19c-4.329-.94-7.58-3.479-8.712-6.801-.79-2.316-.677-6.072.333-11.15.485-2.439.882-5.349.882-6.467-.001-3.718-1.712-5.736-5.1-6.017l-1.955-.162v-4.785l1.852-.251c2.702-.366 3.744-1.029 4.576-2.91.611-1.38.689-2.068.505-4.472-.119-1.562-.535-4.349-.924-6.192-.99-4.683-.949-8.485.117-10.773 1.568-3.369 5.437-5.855 9.932-6.383l1.933-.227v5.036h-1.3c-1.771 0-4.25 1.262-4.883 2.488-.608 1.176-.654 2.864-.158 5.802.783 4.644 1.047 9.099.676 11.422-.425 2.658-1.975 5.796-3.68 7.448l-1.18 1.144 1.615 1.983c1.99 2.443 2.765 4.148 3.243 7.142.378 2.369.085 7.283-.67 11.214-1.054 5.485.162 7.652 4.661 8.306l1.676.244v2.448c0 2.792.171 2.697-3.439 1.913z\" style=\"stroke-width:.35277775\" transform=\"translate(-104.228 -45.508)\"/><path d=\"M152.23 112.25v-2.43l2.05-.424c2.263-.467 4.054-1.863 4.459-3.475.127-.507-.113-3.164-.534-5.903-1.372-8.93-.611-13.537 2.855-17.297l1.482-1.608-1.11-1.266c-3.98-4.53-4.67-8.552-3.154-18.37.763-4.945.764-4.993.087-6.173-.797-1.388-3.284-2.776-4.975-2.776h-1.16v-2.47c0-2.81-.058-2.773 3.246-2.072 3.965.841 6.805 2.853 8.278 5.865.846 1.728.973 2.4.95 5.01-.016 1.66-.358 4.683-.762 6.72-1.499 7.564-1.365 9.576.765 11.533.99.908 1.64 1.173 3.37 1.368l2.145.243v4.848h-1.676c-2.151.001-3.932.91-4.838 2.47-.952 1.637-.893 5.206.173 10.406.907 4.422 1.053 8.459.389 10.729-.701 2.394-3.82 5.296-6.748 6.277-1.261.423-2.968.871-3.792.996l-1.5.228z\" style=\"stroke-width:.35277778\" transform=\"translate(-104.228 -45.508)\"/><path d=\"M131.742 108.266c-1.021-1.299-.873-3.537.381-5.732.928-1.624 4.809-6.948 7.61-10.44l1.132-1.41-1.802-5.226c-2.022-5.86-2.01-5.974.656-6.372l1.468-.219 1.64 3.35c.903 1.843 1.77 3.351 1.928 3.351.158 0 1.775-1.755 3.594-3.9 3.16-3.727 3.357-3.892 4.426-3.694.645.12 1.218.047 1.354-.173.318-.515 1.23.247 1.23 1.027 0 .32-.453 1.134-1.009 1.81-2.267 2.755-7.104 9.27-7.104 9.57 0 .177.975 2.454 2.167 5.059l2.166 4.736-.658.985c-.362.541-.662 1.126-.667 1.299-.005.173-.278.483-.606.69-.832.525-1.447-.115-3.99-4.153-1.164-1.848-2.231-3.365-2.372-3.37-.313-.01-3.79 5.133-6.48 9.581-2.37 3.924-1.938 3.42-3.265 3.801-.956.274-1.194.199-1.799-.57zM131.986 83.677c-2.152-3.847-6.019-9.428-7.579-10.938-.792-.767-1.44-1.575-1.44-1.796 0-.601 1.616-1.22 3.19-1.22 1.698 0 3.496 1.479 5.1 4.193.582.985 1.156 1.794 1.276 1.798.12.004.809-1.651 1.53-3.678 1.547-4.34 5.624-12.778 7.225-14.951 1.373-1.863 3.43-2.865 5.903-2.876 3.234-.013 3.243.13.205 3.297-4.636 4.832-6.764 8.81-11.252 21.037-1.246 3.396-2.39 6.48-2.542 6.852-.23.566-.498.281-1.616-1.718z\" style=\"stroke-width:.35277775\" transform=\"translate(-104.228 -45.508)\"/></g></svg>\n    title: HTTP Clients\n    details: Pluggable HTTP clients for Fetch API, Angular, Axios, Next.js, Nuxt, and more.\n    link: /openapi-ts/clients\n    linkText: Explore clients\n  - icon: <svg width=\"24\" height=\"24\" xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 190 190\"><g fill=\"none\" fill-rule=\"evenodd\"><path d=\"M150.276 61.344c3.093-14.981 3.756-26.471 1.757-34.815-1.189-4.962-3.362-9.01-6.668-11.93-3.49-3.084-7.901-4.597-12.858-4.597-8.178 0-16.775 3.725-25.963 10.802-3.747 2.887-7.636 6.366-11.676 10.44a8.743 8.743 0 0 0-1.09-1.163C82.36 19.915 72.746 13.599 64.523 11.164c-4.89-1.448-9.48-1.586-13.66-.181-4.414 1.483-7.93 4.55-10.41 8.845-4.094 7.089-5.174 16.403-3.648 27.904.623 4.688 1.686 9.794 3.189 15.327a8.725 8.725 0 0 0-1.698.38c-14.489 4.797-24.749 9.955-30.96 15.85-3.696 3.506-6.109 7.41-6.981 11.733-.921 4.562-.023 9.137 2.454 13.43 4.087 7.078 11.6 12.66 22.304 17.082 4.298 1.776 9.161 3.384 14.595 4.83a8.735 8.735 0 0 0-.57 1.776c-3.092 14.98-3.756 26.47-1.756 34.814 1.188 4.962 3.362 9.01 6.667 11.93 3.49 3.084 7.902 4.597 12.86 4.597 8.177 0 16.774-3.725 25.962-10.802 3.787-2.917 7.72-6.44 11.805-10.57.42.656.936 1.267 1.546 1.81 11.42 10.166 21.034 16.482 29.257 18.917 4.89 1.448 9.48 1.586 13.66.181 4.414-1.483 7.93-4.55 10.41-8.845 4.094-7.089 5.174-16.403 3.648-27.904-.645-4.857-1.764-10.164-3.354-15.929a8.715 8.715 0 0 0 1.863-.398c14.489-4.797 24.749-9.955 30.96-15.85 3.696-3.506 6.109-7.41 6.981-11.733.921-4.562.023-9.137-2.454-13.43-4.087-7.078-11.6-12.66-22.304-17.082-4.427-1.828-9.452-3.48-15.082-4.959.2-.49.36-1.006.47-1.543Z\" fill=\"#002C4B\" fill-rule=\"nonzero\"/><path d=\"M80.397 64h29.211a5 5 0 0 1 4.337 2.512l14.632 25.5a5 5 0 0 1 0 4.976l-14.632 25.5a5 5 0 0 1-4.337 2.512H80.397a5 5 0 0 1-4.337-2.512l-14.632-25.5a5 5 0 0 1 0-4.976l14.632-25.5A5 5 0 0 1 80.397 64Zm25.59 6.277a5 5 0 0 1 4.339 2.513l11.017 19.224a5 5 0 0 1 0 4.972l-11.017 19.224a5 5 0 0 1-4.338 2.513h-21.97a5 5 0 0 1-4.339-2.513L68.662 96.986a5 5 0 0 1 0-4.972L79.679 72.79a5 5 0 0 1 4.338-2.513h21.97Zm-3.906 6.864H87.924a5 5 0 0 0-4.335 2.51l-7.1 12.358a5 5 0 0 0 0 4.982l7.1 12.358a5 5 0 0 0 4.335 2.51h14.157a5 5 0 0 0 4.335-2.51l7.1-12.358a5 5 0 0 0 0-4.982l-7.1-12.358a5 5 0 0 0-4.335-2.51Zm-3.762 6.571a5 5 0 0 1 4.334 2.506l3.33 5.788a5 5 0 0 1 0 4.988l-3.33 5.788a5 5 0 0 1-4.334 2.506h-6.633a5 5 0 0 1-4.334-2.506l-3.33-5.788a5 5 0 0 1 0-4.988l3.33-5.788a5 5 0 0 1 4.334-2.506h6.633Zm-3.315 6.473a4.313 4.313 0 1 0-.003 8.63 4.313 4.313 0 1 0 .003-8.63ZM60 94.5h7.768\" fill=\"#FFD94C\"/><path d=\"M54.86 108.358a2.713 2.713 0 0 1 3.718 1.041l.475.845a269.421 269.421 0 0 0 11.888 19.191c4.867 7.15 10.34 14.39 16.421 21.716a2.776 2.776 0 0 1-.296 3.847l-.612.537c-20.107 17.568-33.176 21.078-39.206 10.527-5.898-10.32-3.764-29.08 6.403-56.28a2.748 2.748 0 0 1 1.21-1.424Zm85.674 20.684a2.708 2.708 0 0 1 3.126 2.152l.153.792c4.97 26.01 1.47 39.014-10.497 39.014-11.706 0-26.607-11.091-44.703-33.273a2.725 2.725 0 0 1-.613-1.745 2.712 2.712 0 0 1 2.73-2.694l.955.007c7.62.041 15.03-.223 22.226-.794 8.498-.673 17.373-1.826 26.623-3.46Zm6.875-55.23c.523-1.41 2.1-2.149 3.546-1.663l.788.266c25.84 8.803 35.66 18.477 29.455 29.022-6.068 10.314-23.714 17.823-52.936 22.527a2.852 2.852 0 0 1-1.88-.345 2.726 2.726 0 0 1-.993-3.772l.5-.837c3.988-6.694 7.592-13.356 10.813-19.986 3.803-7.83 7.372-16.233 10.707-25.212Zm-85.67-7.776a2.852 2.852 0 0 1 1.878.345 2.726 2.726 0 0 1 .994 3.772l-.5.837c-3.988 6.694-7.592 13.356-10.813 19.986-3.803 7.83-7.372 16.233-10.707 25.212-.523 1.41-2.1 2.149-3.546 1.663l-.788-.266c-25.84-8.803-35.66-18.477-29.455-29.022C14.87 78.25 32.516 70.74 61.738 66.036Zm41.807-31.57c20.107-17.57 33.176-21.079 39.206-10.528 5.898 10.32 3.764 29.08-6.403 56.28a2.748 2.748 0 0 1-1.21 1.424 2.713 2.713 0 0 1-3.717-1.041l-.475-.845a269.421 269.421 0 0 0-11.888-19.191c-4.867-7.15-10.34-14.39-16.421-21.716a2.776 2.776 0 0 1 .296-3.847ZM57.684 18c11.706 0 26.607 11.091 44.703 33.273.402.492.618 1.11.613 1.745a2.712 2.712 0 0 1-2.73 2.694l-.955-.007c-7.62-.041-15.03.223-22.226.794-8.498.673-17.373 1.826-26.623 3.46a2.708 2.708 0 0 1-3.126-2.153l-.153-.792C42.217 31.004 45.717 18 57.684 18Z\" fill=\"#FF4154\"/></g></svg>\n    title: Plugin Ecosystem\n    details: Zod, TanStack Query, and 20+ plugins to reduce third-party boilerplate.\n    link: /openapi-ts/core\n    linkText: Explore plugins\n  - icon: 🧩\n    title: Custom Extensions\n    details: Build custom plugins for proprietary or advanced use cases.\n    link: /openapi-ts/plugins/custom\n    linkText: Build a custom plugin\n  - icon: <svg class=\"icon-github\" width=\"24\" height=\"24\" xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 98 98\"><path fill-rule=\"evenodd\" clip-rule=\"evenodd\" d=\"M48.854 0C21.839 0 0 22 0 49.217c0 21.756 13.993 40.172 33.405 46.69 2.427.49 3.316-1.059 3.316-2.362 0-1.141-.08-5.052-.08-9.127-13.59 2.934-16.42-5.867-16.42-5.867-2.184-5.704-5.42-7.17-5.42-7.17-4.448-3.015.324-3.015.324-3.015 4.934.326 7.523 5.052 7.523 5.052 4.367 7.496 11.404 5.378 14.235 4.074.404-3.178 1.699-5.378 3.074-6.6-10.839-1.141-22.243-5.378-22.243-24.283 0-5.378 1.94-9.778 5.014-13.2-.485-1.222-2.184-6.275.486-13.038 0 0 4.125-1.304 13.426 5.052a46.97 46.97 0 0 1 12.214-1.63c4.125 0 8.33.571 12.213 1.63 9.302-6.356 13.427-5.052 13.427-5.052 2.67 6.763.97 11.816.485 13.038 3.155 3.422 5.015 7.822 5.015 13.2 0 18.905-11.404 23.06-22.324 24.283 1.78 1.548 3.316 4.481 3.316 9.126 0 6.6-.08 11.897-.08 13.526 0 1.304.89 2.853 3.316 2.364 19.412-6.52 33.405-24.935 33.405-46.691C97.707 22 75.788 0 48.854 0z\" fill=\"#24292f\"/></svg>\n    title: Integrations\n    details: Sync specs, automate workflows, and integrate with the Hey API Platform.\n    link: /openapi-ts/integrations\n    linkText: Learn about integrations\n---\n\n<br/>\n\n<div class=\"home-list sponsors-list\">\n\n### Sponsors\n\n<br/>\n\n<!--@include: ./partials/sponsors-list.md-->\n\n</div>\n\n<style>\n.icon-github path {\n  fill: var(--github-mark-fill-color);\n}\n\n.icon-json-schema path {\n  fill: var(--github-mark-fill-color);\n}\n\n.icon-openapi path {\n  fill: var(--github-mark-fill-color);\n}\n\n.VPImage.image-src {\n  max-width: 300px;\n}\n\n@media (min-width: 640px) {\n  html.dark {\n    --vp-home-hero-image-filter: blur(156px);\n  }\n\n  .VPImage.image-src {\n    max-width: 420px;\n  }\n}\n\n@media (min-width: 960px) {\n  html.dark {\n    --vp-home-hero-image-filter: blur(168px);\n  }\n\n  .VPImage.image-src {\n    max-width: 460px;\n  }\n}\n</style>\n"
  },
  {
    "path": "docs/openapi-ts/clients/angular/v19.md",
    "content": "---\ntitle: Angular v19 Client\ndescription: Generate a type-safe Angular v19 client from OpenAPI with the Angular client for openapi-ts. Fully compatible with validators, transformers, and all core features.\n---\n\n<script setup lang=\"ts\">\nimport AuthorsList from '@components/AuthorsList.vue';\nimport Heading from '@components/Heading.vue';\nimport { maxScopp } from '@data/people.js';\nimport AngularVersionSwitcher from '@versions/AngularVersionSwitcher.vue';\n</script>\n\n<Heading>\n  <h1>Angular<span class=\"sr-only\"> v19</span></h1>\n  <AngularVersionSwitcher />\n</Heading>\n\n::: warning\nAngular client is currently in beta. The interface might change before it becomes stable. We encourage you to leave feedback on [GitHub](https://github.com/hey-api/openapi-ts/issues).\n:::\n\n### About\n\n[Angular](https://angular.dev/) is a web framework that empowers developers to build fast, reliable applications.\n\nThe Angular client for Hey API generates a type-safe client from your OpenAPI spec, fully compatible with validators, transformers, and all core features.\n\n### Collaborators\n\n<AuthorsList :people=\"[maxScopp]\" />\n\n## Features\n\n- Angular v19 support\n- seamless integration with `@hey-api/openapi-ts` ecosystem\n- type-safe response data and errors\n- support for [`@Injectable()`](https://angular.dev/api/core/Injectable) decorators\n- response data validation and transformation\n- access to the original request and response\n- granular request and response customization options\n- minimal learning curve thanks to extending the underlying technology\n- support bundling inside the generated output\n\n## Installation\n\nIn your [configuration](/openapi-ts/get-started), add `@hey-api/client-angular` to your plugins and you'll be ready to generate client artifacts. :tada:\n\n::: code-group\n\n```js [config]\nexport default {\n  input: 'hey-api/backend', // sign up at app.heyapi.dev\n  output: 'src/client',\n  plugins: ['@hey-api/client-angular'], // [!code ++]\n};\n```\n\n```sh [cli]\nnpx @hey-api/openapi-ts \\\n  -i hey-api/backend \\\n  -o src/client \\\n  -c @hey-api/client-angular # [!code ++]\n```\n\n:::\n\n### Providers\n\nYou can use the Angular client in your application by adding `provideHeyApiClient` to your providers.\n\n```ts\nimport { provideHeyApiClient, client } from './client/client.gen';\n\nexport const appConfig: ApplicationConfig = {\n  providers: [\n    provideHttpClient(withFetch()),\n    provideHeyApiClient(client), // [!code ++]\n  ],\n};\n```\n\n## Configuration\n\nThe Angular client is built as a thin wrapper on top of Angular, extending its functionality to work with Hey API. If you're already familiar with Angular, configuring your client will feel like working directly with Angular.\n\nWhen we installed the client above, it created a [`client.gen.ts`](/openapi-ts/output#client) file. You will most likely want to configure the exported `client` instance. There are two ways to do that.\n\n### `setConfig()`\n\nThis is the simpler approach. You can call the `setConfig()` method at the beginning of your application or anytime you need to update the client configuration. You can pass any `HttpRequest` configuration option to `setConfig()`, and even your own [`httpClient`](#custom-httpclient) implementation.\n\n```js\nimport { client } from 'client/client.gen';\n\nclient.setConfig({\n  baseUrl: 'https://example.com',\n});\n```\n\nThe disadvantage of this approach is that your code may call the `client` instance before it's configured for the first time. Depending on your use case, you might need to use the second approach.\n\n### Runtime API\n\nSince `client.gen.ts` is a generated file, we can't directly modify it. Instead, we can tell our configuration to use a custom file implementing the Runtime API. We do that by specifying the `runtimeConfigPath` option.\n\n```js\nexport default {\n  input: 'hey-api/backend', // sign up at app.heyapi.dev\n  output: 'src/client',\n  plugins: [\n    {\n      name: '@hey-api/client-angular',\n      runtimeConfigPath: './src/hey-api.ts', // [!code ++]\n    },\n  ],\n};\n```\n\nIn our custom file, we need to export a `createClientConfig()` method. This function is a simple wrapper allowing us to override configuration values.\n\n::: code-group\n\n```ts [hey-api.ts]\nimport type { CreateClientConfig } from './client/client.gen';\n\nexport const createClientConfig: CreateClientConfig = (config) => ({\n  ...config,\n  baseUrl: 'https://example.com',\n});\n```\n\n:::\n\nWith this approach, `client.gen.ts` will call `createClientConfig()` before initializing the `client` instance. If needed, you can still use `setConfig()` to update the client configuration later.\n\n### `createClient()`\n\nYou can also create your own client instance. You can use it to manually send requests or point it to a different domain.\n\n```js\nimport { createClient } from './client/client';\n\nconst myClient = createClient({\n  baseUrl: 'https://example.com',\n});\n```\n\nYou can also pass this instance to any SDK function through the `client` option. This will override the default instance from `client.gen.ts`.\n\n```js\nconst response = await getFoo({\n  client: myClient,\n});\n```\n\n### SDKs\n\nAlternatively, you can pass the client configuration options to each SDK function. This is useful if you don't want to create a client instance for one-off use cases.\n\n```js\nconst response = await getFoo({\n  baseUrl: 'https://example.com', // <-- override default configuration\n});\n```\n\n## `@Injectable`\n\nIf you prefer to use the [`@Injectable()`](https://angular.dev/api/core/Injectable) decorators, set the `asClass` option in your SDK plugin to `true`.\n\n::: code-group\n\n```ts [example]\n@Injectable({ providedIn: 'root' })\nexport class FooService {\n  // class methods\n}\n```\n\n```js [config]\nexport default {\n  input: 'hey-api/backend', // sign up at app.heyapi.dev\n  output: 'src/client',\n  plugins: [\n    '@hey-api/client-angular',\n    {\n      name: '@hey-api/sdk',\n      asClass: true, // [!code ++]\n    },\n  ],\n};\n```\n\n:::\n\n## Interceptors\n\n::: warning\nThis section is under construction. We appreciate your patience.\n:::\n\n## Auth\n\n::: warning\nThis section is under construction. We appreciate your patience.\n:::\n\n## Build URL\n\nIf you need to access the compiled URL, you can use the `buildUrl()` method. It's loosely typed by default to accept almost any value; in practice, you will want to pass a type hint.\n\n```ts\ntype FooData = {\n  path: {\n    fooId: number;\n  };\n  query?: {\n    bar?: string;\n  };\n  url: '/foo/{fooId}';\n};\n\nconst url = client.buildUrl<FooData>({\n  path: {\n    fooId: 1,\n  },\n  query: {\n    bar: 'baz',\n  },\n  url: '/foo/{fooId}',\n});\nconsole.log(url); // prints '/foo/1?bar=baz'\n```\n\n## Custom Instance\n\nYou can provide a custom `httpClient` instance. This is useful if you need to extend the default instance with extra functionality, or replace it altogether.\n\n```js\nimport { client } from 'client/client.gen';\n\nclient.setConfig({\n  httpClient: inject(CustomHttpClient),\n});\n```\n\nYou can use any of the approaches mentioned in [Configuration](#configuration), depending on how granular you want your custom instance to be.\n\n## Plugins\n\nYou might be also interested in the [Angular](/openapi-ts/plugins/angular/v19) plugin.\n\n## API\n\nYou can view the complete list of options in the [UserConfig](https://github.com/hey-api/openapi-ts/blob/main/packages/openapi-ts/src/plugins/@hey-api/client-angular/types.ts) interface.\n\n<!--@include: ../../../partials/examples.md-->\n<!--@include: ../../../partials/sponsors.md-->\n"
  },
  {
    "path": "docs/openapi-ts/clients/angular.md",
    "content": "---\ntitle: Angular v20 Client\ndescription: Generate a type-safe Angular v20 client from OpenAPI with the Angular client for openapi-ts. Fully compatible with validators, transformers, and all core features.\n---\n\n<script setup lang=\"ts\">\nimport AuthorsList from '@components/AuthorsList.vue';\nimport Heading from '@components/Heading.vue';\nimport { maxScopp } from '@data/people.js';\nimport AngularVersionSwitcher from '@versions/AngularVersionSwitcher.vue';\n</script>\n\n<Heading>\n  <h1>Angular<span class=\"sr-only\"> v20</span></h1>\n  <AngularVersionSwitcher />\n</Heading>\n\n::: warning\nAngular client is currently in beta. The interface might change before it becomes stable. We encourage you to leave feedback on [GitHub](https://github.com/hey-api/openapi-ts/issues).\n:::\n\n### About\n\n[Angular](https://angular.dev/) is a web framework that empowers developers to build fast, reliable applications.\n\nThe Angular client for Hey API generates a type-safe client from your OpenAPI spec, fully compatible with validators, transformers, and all core features.\n\n### Collaborators\n\n<AuthorsList :people=\"[maxScopp]\" />\n\n## Features\n\n- Angular v20 support\n- seamless integration with `@hey-api/openapi-ts` ecosystem\n- type-safe response data and errors\n- support for [`@Injectable()`](https://angular.dev/api/core/Injectable) decorators\n- response data validation and transformation\n- access to the original request and response\n- granular request and response customization options\n- minimal learning curve thanks to extending the underlying technology\n- support bundling inside the generated output\n\n## Installation\n\nIn your [configuration](/openapi-ts/get-started), add `@hey-api/client-angular` to your plugins and you'll be ready to generate client artifacts. :tada:\n\n::: code-group\n\n```js [config]\nexport default {\n  input: 'hey-api/backend', // sign up at app.heyapi.dev\n  output: 'src/client',\n  plugins: ['@hey-api/client-angular'], // [!code ++]\n};\n```\n\n```sh [cli]\nnpx @hey-api/openapi-ts \\\n  -i hey-api/backend \\\n  -o src/client \\\n  -c @hey-api/client-angular # [!code ++]\n```\n\n:::\n\n### Providers\n\nYou can use the Angular client in your application by adding `provideHeyApiClient` to your providers.\n\n```ts\nimport { provideHeyApiClient, client } from './client/client.gen';\n\nexport const appConfig: ApplicationConfig = {\n  providers: [\n    provideHttpClient(withFetch()),\n    provideHeyApiClient(client), // [!code ++]\n  ],\n};\n```\n\n## Configuration\n\nThe Angular client is built as a thin wrapper on top of Angular, extending its functionality to work with Hey API. If you're already familiar with Angular, configuring your client will feel like working directly with Angular.\n\nWhen we installed the client above, it created a [`client.gen.ts`](/openapi-ts/output#client) file. You will most likely want to configure the exported `client` instance. There are two ways to do that.\n\n### `setConfig()`\n\nThis is the simpler approach. You can call the `setConfig()` method at the beginning of your application or anytime you need to update the client configuration. You can pass any `HttpRequest` configuration option to `setConfig()`, and even your own [`httpClient`](#custom-instance) implementation.\n\n```js\nimport { client } from 'client/client.gen';\n\nclient.setConfig({\n  baseUrl: 'https://example.com',\n});\n```\n\nThe disadvantage of this approach is that your code may call the `client` instance before it's configured for the first time. Depending on your use case, you might need to use the second approach.\n\n### Runtime API\n\nSince `client.gen.ts` is a generated file, we can't directly modify it. Instead, we can tell our configuration to use a custom file implementing the Runtime API. We do that by specifying the `runtimeConfigPath` option.\n\n```js\nexport default {\n  input: 'hey-api/backend', // sign up at app.heyapi.dev\n  output: 'src/client',\n  plugins: [\n    {\n      name: '@hey-api/client-angular',\n      runtimeConfigPath: './src/hey-api.ts', // [!code ++]\n    },\n  ],\n};\n```\n\nIn our custom file, we need to export a `createClientConfig()` method. This function is a simple wrapper allowing us to override configuration values.\n\n::: code-group\n\n```ts [hey-api.ts]\nimport type { CreateClientConfig } from './client/client.gen';\n\nexport const createClientConfig: CreateClientConfig = (config) => ({\n  ...config,\n  baseUrl: 'https://example.com',\n});\n```\n\n:::\n\nWith this approach, `client.gen.ts` will call `createClientConfig()` before initializing the `client` instance. If needed, you can still use `setConfig()` to update the client configuration later.\n\n### `createClient()`\n\nYou can also create your own client instance. You can use it to manually send requests or point it to a different domain.\n\n```js\nimport { createClient } from './client/client';\n\nconst myClient = createClient({\n  baseUrl: 'https://example.com',\n});\n```\n\nYou can also pass this instance to any SDK function through the `client` option. This will override the default instance from `client.gen.ts`.\n\n```js\nconst response = await getFoo({\n  client: myClient,\n});\n```\n\n### SDKs\n\nAlternatively, you can pass the client configuration options to each SDK function. This is useful if you don't want to create a client instance for one-off use cases.\n\n```js\nconst response = await getFoo({\n  baseUrl: 'https://example.com', // <-- override default configuration\n});\n```\n\n## `@Injectable`\n\nIf you prefer to use the [`@Injectable()`](https://angular.dev/api/core/Injectable) decorators, set the `asClass` option in your SDK plugin to `true`.\n\n::: code-group\n\n```ts [example]\n@Injectable({ providedIn: 'root' })\nexport class FooService {\n  // class methods\n}\n```\n\n```js [config]\nexport default {\n  input: 'hey-api/backend', // sign up at app.heyapi.dev\n  output: 'src/client',\n  plugins: [\n    '@hey-api/client-angular',\n    {\n      name: '@hey-api/sdk',\n      asClass: true, // [!code ++]\n    },\n  ],\n};\n```\n\n:::\n\n## Interceptors\n\n::: warning\nThis section is under construction. We appreciate your patience.\n:::\n\n## Auth\n\n::: warning\nThis section is under construction. We appreciate your patience.\n:::\n\n## Build URL\n\nIf you need to access the compiled URL, you can use the `buildUrl()` method. It's loosely typed by default to accept almost any value; in practice, you will want to pass a type hint.\n\n```ts\ntype FooData = {\n  path: {\n    fooId: number;\n  };\n  query?: {\n    bar?: string;\n  };\n  url: '/foo/{fooId}';\n};\n\nconst url = client.buildUrl<FooData>({\n  path: {\n    fooId: 1,\n  },\n  query: {\n    bar: 'baz',\n  },\n  url: '/foo/{fooId}',\n});\nconsole.log(url); // prints '/foo/1?bar=baz'\n```\n\n## Custom Instance\n\nYou can provide a custom `httpClient` instance. This is useful if you need to extend the default instance with extra functionality, or replace it altogether.\n\n```js\nimport { client } from 'client/client.gen';\n\nclient.setConfig({\n  httpClient: inject(CustomHttpClient),\n});\n```\n\nYou can use any of the approaches mentioned in [Configuration](#configuration), depending on how granular you want your custom instance to be.\n\n## Plugins\n\nYou might be also interested in the [Angular](/openapi-ts/plugins/angular) plugin.\n\n## API\n\nYou can view the complete list of options in the [UserConfig](https://github.com/hey-api/openapi-ts/blob/main/packages/openapi-ts/src/plugins/@hey-api/client-angular/types.ts) interface.\n\n<!--@include: ../../partials/examples.md-->\n<!--@include: ../../partials/sponsors.md-->\n"
  },
  {
    "path": "docs/openapi-ts/clients/axios.md",
    "content": "---\ntitle: Axios v1 Client\ndescription: Generate a type-safe Axios v1 client from OpenAPI with the Axios client for openapi-ts. Fully compatible with validators, transformers, and all core features.\n---\n\n<script setup lang=\"ts\">\nimport Heading from '@components/Heading.vue';\nimport VersionLabel from '@components/VersionLabel.vue';\n\nimport { embedProject } from '../../embed'\n</script>\n\n<Heading>\n  <h1>Axios<span class=\"sr-only\"> v1</span></h1>\n  <VersionLabel value=\"v1\" />\n</Heading>\n\n### About\n\n[Axios](https://axios-http.com) is a simple promise based HTTP client for the browser and Node.js. Axios provides a simple to use library in a small package with a very extensible interface.\n\nThe Axios client for Hey API generates a type-safe client from your OpenAPI spec, fully compatible with validators, transformers, and all core features.\n\n### Demo\n\n<button class=\"buttonLink\" @click=\"(event) => embedProject('hey-api-client-axios-example')(event)\">\nLaunch demo\n</button>\n\n## Features\n\n- Axios v1 support\n- seamless integration with `@hey-api/openapi-ts` ecosystem\n- type-safe response data and errors\n- response data validation and transformation\n- access to the original request and response\n- granular request and response customization options\n- minimal learning curve thanks to extending the underlying technology\n- support bundling inside the generated output\n\n## Installation\n\nIn your [configuration](/openapi-ts/get-started), add `@hey-api/client-axios` to your plugins and you'll be ready to generate client artifacts. :tada:\n\n::: code-group\n\n```js [config]\nexport default {\n  input: 'hey-api/backend', // sign up at app.heyapi.dev\n  output: 'src/client',\n  plugins: ['@hey-api/client-axios'], // [!code ++]\n};\n```\n\n```sh [cli]\nnpx @hey-api/openapi-ts \\\n  -i hey-api/backend \\\n  -o src/client \\\n  -c @hey-api/client-axios # [!code ++]\n```\n\n:::\n\n## Configuration\n\nThe Axios client is built as a thin wrapper on top of Axios, extending its functionality to work with Hey API. If you're already familiar with Axios, configuring your client will feel like working directly with Axios.\n\nWhen we installed the client above, it created a [`client.gen.ts`](/openapi-ts/output#client) file. You will most likely want to configure the exported `client` instance. There are two ways to do that.\n\n### `setConfig()`\n\nThis is the simpler approach. You can call the `setConfig()` method at the beginning of your application or anytime you need to update the client configuration. You can pass any Axios configuration option to `setConfig()` (except for `auth`), and even your own [Axios](#custom-instance) implementation.\n\n```js\nimport { client } from 'client/client.gen';\n\nclient.setConfig({\n  baseURL: 'https://example.com',\n});\n```\n\nThe disadvantage of this approach is that your code may call the `client` instance before it's configured for the first time. Depending on your use case, you might need to use the second approach.\n\n### Runtime API\n\nSince `client.gen.ts` is a generated file, we can't directly modify it. Instead, we can tell our configuration to use a custom file implementing the Runtime API. We do that by specifying the `runtimeConfigPath` option.\n\n```js\nexport default {\n  input: 'hey-api/backend', // sign up at app.heyapi.dev\n  output: 'src/client',\n  plugins: [\n    {\n      name: '@hey-api/client-axios',\n      runtimeConfigPath: './src/hey-api.ts', // [!code ++]\n    },\n  ],\n};\n```\n\nIn our custom file, we need to export a `createClientConfig()` method. This function is a simple wrapper allowing us to override configuration values.\n\n::: code-group\n\n```ts [hey-api.ts]\nimport type { CreateClientConfig } from './client/client.gen';\n\nexport const createClientConfig: CreateClientConfig = (config) => ({\n  ...config,\n  baseURL: 'https://example.com',\n});\n```\n\n:::\n\nWith this approach, `client.gen.ts` will call `createClientConfig()` before initializing the `client` instance. If needed, you can still use `setConfig()` to update the client configuration later.\n\n### `createClient()`\n\nYou can also create your own client instance. You can use it to manually send requests or point it to a different domain.\n\n```js\nimport { createClient } from './client/client';\n\nconst myClient = createClient({\n  baseURL: 'https://example.com',\n});\n```\n\nYou can also pass this instance to any SDK function through the `client` option. This will override the default instance from `client.gen.ts`.\n\n```js\nconst response = await getFoo({\n  client: myClient,\n});\n```\n\n### SDKs\n\nAlternatively, you can pass the client configuration options to each SDK function. This is useful if you don't want to create a client instance for one-off use cases.\n\n```js\nconst response = await getFoo({\n  baseURL: 'https://example.com', // <-- override default configuration\n});\n```\n\n## Interceptors\n\nInterceptors (middleware) can be used to modify requests before they're sent or responses before they're returned to your application. Axios provides interceptors, please refer to their documentation on [interceptors](https://axios-http.com/docs/interceptors).\n\nWe expose the Axios instance through the `instance` field.\n\n```js\nimport { client } from 'client/client.gen';\n\nclient.instance.interceptors.request.use((config) => {\n  // do something\n  return config;\n});\n```\n\n## Auth\n\nThe SDKs include auth mechanisms for every endpoint. You will want to configure the `auth` field to pass the right token for each request. The `auth` field can be a string or a function returning a string representing the token. The returned value will be attached only to requests that require auth.\n\n```js\nimport { client } from 'client/client.gen';\n\nclient.setConfig({\n  auth: () => '<my_token>', // [!code ++]\n  baseURL: 'https://example.com',\n});\n```\n\nIf you're not using SDKs or generating auth, using interceptors is a common approach to configuring auth for each request.\n\n```js\nimport { client } from 'client/client.gen';\n\nclient.instance.interceptors.request.use((config) => {\n  config.headers.set('Authorization', 'Bearer <my_token>'); // [!code ++]\n  return config;\n});\n```\n\n## Build URL\n\nIf you need to access the compiled URL, you can use the `buildUrl()` method. It's loosely typed by default to accept almost any value; in practice, you will want to pass a type hint.\n\n```ts\ntype FooData = {\n  path: {\n    fooId: number;\n  };\n  query?: {\n    bar?: string;\n  };\n  url: '/foo/{fooId}';\n};\n\nconst url = client.buildUrl<FooData>({\n  path: {\n    fooId: 1,\n  },\n  query: {\n    bar: 'baz',\n  },\n  url: '/foo/{fooId}',\n});\nconsole.log(url); // prints '/foo/1?bar=baz'\n```\n\n## Custom Instance\n\nYou can provide a custom `axios` instance. This is useful if you need to extend the default instance with extra functionality, or replace it altogether.\n\n```js\nimport axios from 'axios';\nimport { client } from 'client/client.gen';\n\n// Customize the default axios instance\naxios.defaults.baseURL = 'https://example.com';\n\nclient.setConfig({\n  axios: axios,\n});\n```\n\nor you can pass an `AxiosInstance` created with `axios.create()`:\n\n```js\nimport axios from 'axios';\nimport { client } from 'client/client.gen';\n\nconst customAxiosInstance = axios.create({\n  baseURL: 'https://example.com',\n});\n\nclient.setConfig({\n  axios: customAxiosInstance,\n});\n```\n\nYou can use any of the approaches mentioned in [Configuration](#configuration), depending on how granular you want your custom instance to be.\n\n## API\n\nYou can view the complete list of options in the [UserConfig](https://github.com/hey-api/openapi-ts/blob/main/packages/openapi-ts/src/plugins/@hey-api/client-axios/types.ts) interface.\n\n<!--@include: ../../partials/examples.md-->\n<!--@include: ../../partials/sponsors.md-->\n"
  },
  {
    "path": "docs/openapi-ts/clients/custom.md",
    "content": "---\ntitle: Custom Client\ndescription: Learn how to create your own Hey API client.\n---\n\n# Custom Client\n\n::: warning\nClient API is in development. The interface might change before it becomes stable. We encourage you to leave feedback on [GitHub](https://github.com/hey-api/openapi-ts/issues/1213).\n:::\n\nYou may need to write your own client if the available clients do not suit your needs or you're working on a proprietary use case. This can be easily achieved using the Client API. But don't take our word for it – all Hey API clients are written this way!\n\n::: warning\nCustom clients documentation will be finalized after further testing. Simplified [instructions](https://github.com/hey-api/openapi-ts/issues/1213#issuecomment-2765206344) can be found in the GitHub thread.\n:::\n\n<!--@include: ../../partials/examples.md-->\n<!--@include: ../../partials/sponsors.md-->\n"
  },
  {
    "path": "docs/openapi-ts/clients/effect.md",
    "content": "---\ntitle: Effect client\ndescription: Effect client for Hey API. Compatible with all our features.\n---\n\n<script setup lang=\"ts\">\nimport FeatureStatus from '@components/FeatureStatus.vue';\n</script>\n\n# Effect <span data-soon>soon</span>\n\n<FeatureStatus issueNumber=2082 name=\"Effect\" />\n\n### About\n\n[Effect](https://effect.website/) is a powerful TypeScript library designed to help developers easily create complex, synchronous, and asynchronous programs.\n\n<!--@include: ../../partials/sponsors.md-->\n"
  },
  {
    "path": "docs/openapi-ts/clients/fetch.md",
    "content": "---\ntitle: Fetch API Client\ndescription: Generate a type-safe Fetch API client from OpenAPI with the Fetch API client for openapi-ts. Fully compatible with validators, transformers, and all core features.\n---\n\n<script setup lang=\"ts\">\nimport { embedProject } from '../../embed'\n</script>\n\n# Fetch API\n\n### About\n\nThe [Fetch API](https://developer.mozilla.org/docs/Web/API/Fetch_API) provides an interface for fetching resources (including across the network). It is a more powerful and flexible replacement for XMLHttpRequest.\n\nThe Fetch API client for Hey API generates a type-safe client from your OpenAPI spec, fully compatible with validators, transformers, and all core features.\n\n### Demo\n\n<button class=\"buttonLink\" @click=\"(event) => embedProject('hey-api-client-fetch-example')(event)\">\nLaunch demo\n</button>\n\n## Features\n\n- seamless integration with `@hey-api/openapi-ts` ecosystem\n- type-safe response data and errors\n- response data validation and transformation\n- access to the original request and response\n- granular request and response customization options\n- minimal learning curve thanks to extending the underlying technology\n- support bundling inside the generated output\n\n## Installation\n\nIn your [configuration](/openapi-ts/get-started), add `@hey-api/client-fetch` to your plugins and you'll be ready to generate client artifacts. :tada:\n\n::: code-group\n\n```js [config]\nexport default {\n  input: 'hey-api/backend', // sign up at app.heyapi.dev\n  output: 'src/client',\n  plugins: ['@hey-api/client-fetch'], // [!code ++]\n};\n```\n\n```sh [cli]\nnpx @hey-api/openapi-ts \\\n  -i hey-api/backend \\\n  -o src/client \\\n  -c @hey-api/client-fetch # [!code ++]\n```\n\n:::\n\n::: tip\n\nThis step is optional because Fetch is the default client.\n\n:::\n\n## Configuration\n\nThe Fetch client is built as a thin wrapper on top of Fetch API, extending its functionality to work with Hey API. If you're already familiar with Fetch, configuring your client will feel like working directly with Fetch API.\n\nWhen we installed the client above, it created a [`client.gen.ts`](/openapi-ts/output#client) file. You will most likely want to configure the exported `client` instance. There are two ways to do that.\n\n### `setConfig()`\n\nThis is the simpler approach. You can call the `setConfig()` method at the beginning of your application or anytime you need to update the client configuration. You can pass any Fetch API configuration option to `setConfig()`, and even your own [Fetch](#custom-instance) implementation.\n\n```js\nimport { client } from 'client/client.gen';\n\nclient.setConfig({\n  baseUrl: 'https://example.com',\n});\n```\n\nThe disadvantage of this approach is that your code may call the `client` instance before it's configured for the first time. Depending on your use case, you might need to use the second approach.\n\n### Runtime API\n\nSince `client.gen.ts` is a generated file, we can't directly modify it. Instead, we can tell our configuration to use a custom file implementing the Runtime API. We do that by specifying the `runtimeConfigPath` option.\n\n```js\nexport default {\n  input: 'hey-api/backend', // sign up at app.heyapi.dev\n  output: 'src/client',\n  plugins: [\n    {\n      name: '@hey-api/client-fetch',\n      runtimeConfigPath: './src/hey-api.ts', // [!code ++]\n    },\n  ],\n};\n```\n\nIn our custom file, we need to export a `createClientConfig()` method. This function is a simple wrapper allowing us to override configuration values.\n\n::: code-group\n\n```ts [hey-api.ts]\nimport type { CreateClientConfig } from './client/client.gen';\n\nexport const createClientConfig: CreateClientConfig = (config) => ({\n  ...config,\n  baseUrl: 'https://example.com',\n});\n```\n\n:::\n\nWith this approach, `client.gen.ts` will call `createClientConfig()` before initializing the `client` instance. If needed, you can still use `setConfig()` to update the client configuration later.\n\n### `createClient()`\n\nYou can also create your own client instance. You can use it to manually send requests or point it to a different domain.\n\n```js\nimport { createClient } from './client/client';\n\nconst myClient = createClient({\n  baseUrl: 'https://example.com',\n});\n```\n\nYou can also pass this instance to any SDK function through the `client` option. This will override the default instance from `client.gen.ts`.\n\n```js\nconst response = await getFoo({\n  client: myClient,\n});\n```\n\n### SDKs\n\nAlternatively, you can pass the client configuration options to each SDK function. This is useful if you don't want to create a client instance for one-off use cases.\n\n```js\nconst response = await getFoo({\n  baseUrl: 'https://example.com', // <-- override default configuration\n});\n```\n\n## Interceptors\n\nInterceptors (middleware) can be used to modify requests before they're sent or responses before they're returned to your application.\n\nThey can be added with `use`, removed with `eject`, and updated wth `update`. The `use` and `update` methods will return the ID of the interceptor for use with `eject` and `update`. Fetch API does not have the interceptor functionality, so we implement our own.\n\n### Example: Request interceptor\n\n::: code-group\n\n```js [use]\nimport { client } from 'client/client.gen';\n\nasync function myInterceptor(request) {\n  // do something\n  return request;\n}\n\ninterceptorId = client.interceptors.request.use(myInterceptor);\n```\n\n```js [eject]\nimport { client } from 'client/client.gen';\n\n// eject by ID\nclient.interceptors.request.eject(interceptorId);\n\n// eject by reference\nclient.interceptors.request.eject(myInterceptor);\n```\n\n```js [update]\nimport { client } from 'client/client.gen';\n\nasync function myNewInterceptor(request) {\n  // do something\n  return request;\n}\n\n// update by ID\nclient.interceptors.request.update(interceptorId, myNewInterceptor);\n\n// update by reference\nclient.interceptors.request.update(myInterceptor, myNewInterceptor);\n```\n\n:::\n\n### Example: Response interceptor\n\n::: code-group\n\n```js [use]\nimport { client } from 'client/client.gen';\n\nasync function myInterceptor(response) {\n  // do something\n  return response;\n}\n\ninterceptorId = client.interceptors.response.use(myInterceptor);\n```\n\n```js [eject]\nimport { client } from 'client/client.gen';\n\n// eject by ID\nclient.interceptors.response.eject(interceptorId);\n\n// eject by reference\nclient.interceptors.response.eject(myInterceptor);\n```\n\n```js [update]\nimport { client } from 'client/client.gen';\n\nasync function myNewInterceptor(response) {\n  // do something\n  return response;\n}\n\n// update by ID\nclient.interceptors.response.update(interceptorId, myNewInterceptor);\n\n// update by reference\nclient.interceptors.response.update(myInterceptor, myNewInterceptor);\n```\n\n:::\n\n::: tip\nTo eject, you must provide the ID or reference of the interceptor passed to `use()`, the ID is the value returned by `use()` and `update()`.\n:::\n\n## Auth\n\nThe SDKs include auth mechanisms for every endpoint. You will want to configure the `auth` field to pass the right token for each request. The `auth` field can be a string or a function returning a string representing the token. The returned value will be attached only to requests that require auth.\n\n```js\nimport { client } from 'client/client.gen';\n\nclient.setConfig({\n  auth: () => '<my_token>', // [!code ++]\n  baseUrl: 'https://example.com',\n});\n```\n\nIf you're not using SDKs or generating auth, using interceptors is a common approach to configuring auth for each request.\n\n```js\nimport { client } from 'client/client.gen';\n\nclient.interceptors.request.use((request, options) => {\n  request.headers.set('Authorization', 'Bearer <my_token>'); // [!code ++]\n  return request;\n});\n```\n\n## Build URL\n\nIf you need to access the compiled URL, you can use the `buildUrl()` method. It's loosely typed by default to accept almost any value; in practice, you will want to pass a type hint.\n\n```ts\ntype FooData = {\n  path: {\n    fooId: number;\n  };\n  query?: {\n    bar?: string;\n  };\n  url: '/foo/{fooId}';\n};\n\nconst url = client.buildUrl<FooData>({\n  path: {\n    fooId: 1,\n  },\n  query: {\n    bar: 'baz',\n  },\n  url: '/foo/{fooId}',\n});\nconsole.log(url); // prints '/foo/1?bar=baz'\n```\n\n## Custom Instance\n\nYou can provide a custom `fetch` instance. This is useful if you need to extend the default instance with extra functionality, or replace it altogether.\n\n```js\nimport { client } from 'client/client.gen';\n\nclient.setConfig({\n  fetch: () => {\n    /* custom `fetch` method */\n  },\n});\n```\n\nYou can use any of the approaches mentioned in [Configuration](#configuration), depending on how granular you want your custom instance to be.\n\n## API\n\nYou can view the complete list of options in the [UserConfig](https://github.com/hey-api/openapi-ts/blob/main/packages/openapi-ts/src/plugins/@hey-api/client-fetch/types.ts) interface.\n\n<!--@include: ../../partials/examples.md-->\n<!--@include: ../../partials/sponsors.md-->\n"
  },
  {
    "path": "docs/openapi-ts/clients/got.md",
    "content": "---\ntitle: Got client\ndescription: Got client for Hey API. Compatible with all our features.\n---\n\n<script setup lang=\"ts\">\nimport FeatureStatus from '@components/FeatureStatus.vue';\n</script>\n\n# Got <span data-soon>soon</span>\n\n<FeatureStatus issueNumber=586 name=\"Got\" />\n\n### About\n\n[Got](https://github.com/sindresorhus/got) is a human-friendly and powerful HTTP request library for Node.js.\n\n<!--@include: ../../partials/sponsors.md-->\n"
  },
  {
    "path": "docs/openapi-ts/clients/ky.md",
    "content": "---\ntitle: Ky v1 Client\ndescription: Generate a type-safe Ky v1 client from OpenAPI with the Ky client for openapi-ts. Fully compatible with validators, transformers, and all core features.\n---\n\n<script setup lang=\"ts\">\nimport AuthorsList from '@components/AuthorsList.vue';\nimport Heading from '@components/Heading.vue';\nimport VersionLabel from '@components/VersionLabel.vue';\nimport { sebastiaanWouters } from '@data/people.js';\n</script>\n\n<Heading>\n  <h1>Ky<span class=\"sr-only\"> v1</span></h1>\n  <VersionLabel value=\"v1\" />\n</Heading>\n\n### About\n\n[Ky](https://github.com/sindresorhus/ky) is a tiny and elegant JavaScript HTTP client based on the Fetch API.\n\nThe Ky client for Hey API generates a type-safe client from your OpenAPI spec, fully compatible with validators, transformers, and all core features.\n\n### Collaborators\n\n<AuthorsList :people=\"[sebastiaanWouters]\" />\n\n## Features\n\n- seamless integration with `@hey-api/openapi-ts` ecosystem\n- type-safe response data and errors\n- response data validation and transformation\n- access to the original request and response\n- granular request and response customization options\n- minimal learning curve thanks to extending the underlying technology\n- support bundling inside the generated output\n\n## Installation\n\nIn your [configuration](/openapi-ts/get-started), add `@hey-api/client-ky` to your plugins and you'll be ready to generate client artifacts. :tada:\n\n::: code-group\n\n```js [config]\nexport default {\n  input: 'hey-api/backend', // sign up at app.heyapi.dev\n  output: 'src/client',\n  plugins: ['@hey-api/client-ky'], // [!code ++]\n};\n```\n\n```sh [cli]\nnpx @hey-api/openapi-ts \\\n  -i hey-api/backend \\\n  -o src/client \\\n  -c @hey-api/client-ky # [!code ++]\n```\n\n:::\n\n## Configuration\n\nThe Ky client is built as a thin wrapper on top of Ky, extending its functionality to work with Hey API. If you're already familiar with Ky, configuring your client will feel like working directly with Ky.\n\nWhen we installed the client above, it created a [`client.gen.ts`](/openapi-ts/output#client) file. You will most likely want to configure the exported `client` instance. There are two ways to do that.\n\n### `setConfig()`\n\nThis is the simpler approach. You can call the `setConfig()` method at the beginning of your application or anytime you need to update the client configuration. You can pass any Ky configuration option to `setConfig()`, and even your own [`ky`](#custom-instance) instance.\n\n```js\nimport { client } from 'client/client.gen';\n\nclient.setConfig({\n  baseUrl: 'https://example.com',\n});\n```\n\nThe disadvantage of this approach is that your code may call the `client` instance before it's configured for the first time. Depending on your use case, you might need to use the second approach.\n\n### Runtime API\n\nSince `client.gen.ts` is a generated file, we can't directly modify it. Instead, we can tell our configuration to use a custom file implementing the Runtime API. We do that by specifying the `runtimeConfigPath` option.\n\n```js\nexport default {\n  input: 'hey-api/backend', // sign up at app.heyapi.dev\n  output: 'src/client',\n  plugins: [\n    {\n      name: '@hey-api/client-ky',\n      runtimeConfigPath: './src/hey-api.ts', // [!code ++]\n    },\n  ],\n};\n```\n\nIn our custom file, we need to export a `createClientConfig()` method. This function is a simple wrapper allowing us to override configuration values.\n\n::: code-group\n\n```ts [hey-api.ts]\nimport type { CreateClientConfig } from './client/client.gen';\n\nexport const createClientConfig: CreateClientConfig = (config) => ({\n  ...config,\n  baseUrl: 'https://example.com',\n});\n```\n\n:::\n\nWith this approach, `client.gen.ts` will call `createClientConfig()` before initializing the `client` instance. If needed, you can still use `setConfig()` to update the client configuration later.\n\n### `createClient()`\n\nYou can also create your own client instance. You can use it to manually send requests or point it to a different domain.\n\n```js\nimport { createClient } from './client/client';\n\nconst myClient = createClient({\n  baseUrl: 'https://example.com',\n});\n```\n\nYou can also pass this instance to any SDK function through the `client` option. This will override the default instance from `client.gen.ts`.\n\n```js\nconst response = await getFoo({\n  client: myClient,\n});\n```\n\n### SDKs\n\nAlternatively, you can pass the client configuration options to each SDK function. This is useful if you don't want to create a client instance for one-off use cases.\n\n```js\nconst response = await getFoo({\n  baseUrl: 'https://example.com', // <-- override default configuration\n});\n```\n\n## Interceptors\n\nInterceptors (middleware) can be used to modify requests before they're sent or responses before they're returned to your application.\n\nThey can be added with `use`, removed with `eject`, and updated wth `update`. The `use` and `update` methods will return the ID of the interceptor for use with `eject` and `update`. Ky does not have the interceptor functionality, so we implement our own.\n\n### Example: Request interceptor\n\n::: code-group\n\n```js [use]\nimport { client } from 'client/client.gen';\n\nasync function myInterceptor(request) {\n  // do something\n  return request;\n}\n\ninterceptorId = client.interceptors.request.use(myInterceptor);\n```\n\n```js [eject]\nimport { client } from 'client/client.gen';\n\n// eject by ID\nclient.interceptors.request.eject(interceptorId);\n\n// eject by reference\nclient.interceptors.request.eject(myInterceptor);\n```\n\n```js [update]\nimport { client } from 'client/client.gen';\n\nasync function myNewInterceptor(request) {\n  // do something\n  return request;\n}\n\n// update by ID\nclient.interceptors.request.update(interceptorId, myNewInterceptor);\n\n// update by reference\nclient.interceptors.request.update(myInterceptor, myNewInterceptor);\n```\n\n:::\n\n### Example: Response interceptor\n\n::: code-group\n\n```js [use]\nimport { client } from 'client/client.gen';\n\nasync function myInterceptor(response) {\n  // do something\n  return response;\n}\n\ninterceptorId = client.interceptors.response.use(myInterceptor);\n```\n\n```js [eject]\nimport { client } from 'client/client.gen';\n\n// eject by ID\nclient.interceptors.response.eject(interceptorId);\n\n// eject by reference\nclient.interceptors.response.eject(myInterceptor);\n```\n\n```js [update]\nimport { client } from 'client/client.gen';\n\nasync function myNewInterceptor(response) {\n  // do something\n  return response;\n}\n\n// update by ID\nclient.interceptors.response.update(interceptorId, myNewInterceptor);\n\n// update by reference\nclient.interceptors.response.update(myInterceptor, myNewInterceptor);\n```\n\n:::\n\n::: tip\nTo eject, you must provide the ID or reference of the interceptor passed to `use()`, the ID is the value returned by `use()` and `update()`.\n:::\n\n## Auth\n\nThe SDKs include auth mechanisms for every endpoint. You will want to configure the `auth` field to pass the right token for each request. The `auth` field can be a string or a function returning a string representing the token. The returned value will be attached only to requests that require auth.\n\n```js\nimport { client } from 'client/client.gen';\n\nclient.setConfig({\n  auth: () => '<my_token>', // [!code ++]\n  baseUrl: 'https://example.com',\n});\n```\n\nIf you're not using SDKs or generating auth, using interceptors is a common approach to configuring auth for each request.\n\n```js\nimport { client } from 'client/client.gen';\n\nclient.interceptors.request.use((request, options) => {\n  request.headers.set('Authorization', 'Bearer <my_token>'); // [!code ++]\n  return request;\n});\n```\n\n## Build URL\n\nIf you need to access the compiled URL, you can use the `buildUrl()` method. It's loosely typed by default to accept almost any value; in practice, you will want to pass a type hint.\n\n```ts\ntype FooData = {\n  path: {\n    fooId: number;\n  };\n  query?: {\n    bar?: string;\n  };\n  url: '/foo/{fooId}';\n};\n\nconst url = client.buildUrl<FooData>({\n  path: {\n    fooId: 1,\n  },\n  query: {\n    bar: 'baz',\n  },\n  url: '/foo/{fooId}',\n});\nconsole.log(url); // prints '/foo/1?bar=baz'\n```\n\n## Custom Instance\n\nYou can provide a custom `ky` instance. This is useful if you need to extend the default instance with extra functionality, or replace it altogether.\n\n```js\nimport { client } from 'client/client.gen';\n\nclient.setConfig({\n  ky: ky.create({\n    /* custom `ky` instance */\n  }),\n});\n```\n\nYou can use any of the approaches mentioned in [Configuration](#configuration), depending on how granular you want your custom instance to be.\n\n## API\n\nYou can view the complete list of options in the [UserConfig](https://github.com/hey-api/openapi-ts/blob/main/packages/openapi-ts/src/plugins/@hey-api/client-ky/types.ts) interface.\n\n<!--@include: ../../partials/examples.md-->\n<!--@include: ../../partials/sponsors.md-->\n"
  },
  {
    "path": "docs/openapi-ts/clients/next-js.md",
    "content": "---\ntitle: Next.js Client\ndescription: Generate a type-safe Next.js client from OpenAPI with the Next.js client for openapi-ts. Fully compatible with validators, transformers, and all core features.\n---\n\n# Next.js\n\n### About\n\n[Next.js](https://nextjs.org) is the React framework for the web. Used by some of the world's largest companies, Next.js enables you to create high-quality web applications with the power of React components.\n\nThe Next.js client for Hey API generates a type-safe client from your OpenAPI spec, fully compatible with validators, transformers, and all core features.\n\n## Features\n\n- seamless integration with `@hey-api/openapi-ts` ecosystem\n- type-safe response data and errors\n- response data validation and transformation\n- access to the original request and response\n- granular request and response customization options\n- minimal learning curve thanks to extending the underlying technology\n- support bundling inside the generated output\n\n## Installation\n\nIn your [configuration](/openapi-ts/get-started), add `@hey-api/client-next` to your plugins and you'll be ready to generate client artifacts. :tada:\n\n::: code-group\n\n```js [config]\nexport default {\n  input: 'hey-api/backend', // sign up at app.heyapi.dev\n  output: 'src/client',\n  plugins: ['@hey-api/client-next'], // [!code ++]\n};\n```\n\n```sh [cli]\nnpx @hey-api/openapi-ts \\\n  -i hey-api/backend \\\n  -o src/client \\\n  -c @hey-api/client-next # [!code ++]\n```\n\n:::\n\n## Configuration\n\nThe Next.js client is built as a thin wrapper on top of [fetch](https://nextjs.org/docs/app/api-reference/functions/fetch), extending its functionality to work with Hey API. If you're already familiar with Fetch, configuring your client will feel like working directly with Fetch API.\n\nWhen we installed the client above, it created a [`client.gen.ts`](/openapi-ts/output#client) file. You will most likely want to configure the exported `client` instance. There are two ways to do that.\n\n### Runtime API\n\nSince `client.gen.ts` is a generated file, we can't directly modify it. Instead, we can tell our configuration to use a custom file implementing the Runtime API. We do that by specifying the `runtimeConfigPath` option.\n\n```js\nexport default {\n  input: 'hey-api/backend', // sign up at app.heyapi.dev\n  output: 'src/client',\n  plugins: [\n    {\n      name: '@hey-api/client-next',\n      runtimeConfigPath: './src/hey-api.ts', // [!code ++]\n    },\n  ],\n};\n```\n\nIn our custom file, we need to export a `createClientConfig()` method. This function is a simple wrapper allowing us to override configuration values.\n\n::: code-group\n\n```ts [hey-api.ts]\nimport type { CreateClientConfig } from './client/client.gen';\n\nexport const createClientConfig: CreateClientConfig = (config) => ({\n  ...config,\n  baseUrl: 'https://example.com',\n});\n```\n\n:::\n\nWith this approach, `client.gen.ts` will call `createClientConfig()` before initializing the `client` instance. This is the recommended approach because it guarantees the client will be initialized in both server and client environment. If needed, you can still use `setConfig()` to update the client configuration later.\n\n### `setConfig()`\n\nThis is the simpler approach. You can call the `setConfig()` method at the beginning of your application or anytime you need to update the client configuration. You can pass any Fetch API configuration option to `setConfig()`, and even your own [Fetch](#custom-instance) implementation.\n\n```js\nimport { client } from 'client/client.gen';\n\nclient.setConfig({\n  baseUrl: 'https://example.com',\n});\n```\n\nThe disadvantage of this approach is that your code may call the `client` instance before it's configured for the first time. Depending on your use case, this might be an acceptable trade-off. However, our Next.js users usually want to use the first approach.\n\n### `createClient()`\n\nYou can also create your own client instance. You can use it to manually send requests or point it to a different domain.\n\n```js\nimport { createClient } from './client/client';\n\nconst myClient = createClient({\n  baseUrl: 'https://example.com',\n});\n```\n\nYou can also pass this instance to any SDK function through the `client` option. This will override the default instance from `client.gen.ts`.\n\n```js\nconst response = await getFoo({\n  client: myClient,\n});\n```\n\n### SDKs\n\nAlternatively, you can pass the client configuration options to each SDK function. This is useful if you don't want to create a client instance for one-off use cases.\n\n```js\nconst response = await getFoo({\n  baseUrl: 'https://example.com', // <-- override default configuration\n});\n```\n\n## Interceptors\n\nInterceptors (middleware) can be used to modify requests before they're sent or responses before they're returned to your application.\n\nThey can be added with `use`, removed with `eject`, and updated wth `update`. The `use` and `update` methods will return the ID of the interceptor for use with `eject` and `update`. Fetch API does not have the interceptor functionality, so we implement our own.\n\n### Example: Request interceptor\n\n::: code-group\n\n```js [use]\nimport { client } from 'client/client.gen';\n\nasync function myInterceptor(request) {\n  // do something\n  return request;\n}\n\ninterceptorId = client.interceptors.request.use(myInterceptor);\n```\n\n```js [eject]\nimport { client } from 'client/client.gen';\n\n// eject by ID\nclient.interceptors.request.eject(interceptorId);\n\n// eject by reference\nclient.interceptors.request.eject(myInterceptor);\n```\n\n```js [update]\nimport { client } from 'client/client.gen';\n\nasync function myNewInterceptor(request) {\n  // do something\n  return request;\n}\n\n// update by ID\nclient.interceptors.request.update(interceptorId, myNewInterceptor);\n\n// update by reference\nclient.interceptors.request.update(myInterceptor, myNewInterceptor);\n```\n\n:::\n\n### Example: Response interceptor\n\n::: code-group\n\n```js [use]\nimport { client } from 'client/client.gen';\n\nasync function myInterceptor(response) {\n  // do something\n  return response;\n}\n\ninterceptorId = client.interceptors.response.use(myInterceptor);\n```\n\n```js [eject]\nimport { client } from 'client/client.gen';\n\n// eject by ID\nclient.interceptors.response.eject(interceptorId);\n\n// eject by reference\nclient.interceptors.response.eject(myInterceptor);\n```\n\n```js [update]\nimport { client } from 'client/client.gen';\n\nasync function myNewInterceptor(response) {\n  // do something\n  return response;\n}\n\n// update by ID\nclient.interceptors.response.update(interceptorId, myNewInterceptor);\n\n// update by reference\nclient.interceptors.response.update(myInterceptor, myNewInterceptor);\n```\n\n:::\n\n::: tip\nTo eject, you must provide the ID or reference of the interceptor passed to `use()`, the ID is the value returned by `use()` and `update()`.\n:::\n\n## Auth\n\nThe SDKs include auth mechanisms for every endpoint. You will want to configure the `auth` field to pass the right token for each request. The `auth` field can be a string or a function returning a string representing the token. The returned value will be attached only to requests that require auth.\n\n```js\nimport { client } from 'client/client.gen';\n\nclient.setConfig({\n  auth: () => '<my_token>', // [!code ++]\n  baseUrl: 'https://example.com',\n});\n```\n\nIf you're not using SDKs or generating auth, using interceptors is a common approach to configuring auth for each request.\n\n```js\nimport { client } from 'client/client.gen';\n\nclient.interceptors.request.use((options) => {\n  options.headers.set('Authorization', 'Bearer <my_token>'); // [!code ++]\n});\n```\n\n## Build URL\n\nIf you need to access the compiled URL, you can use the `buildUrl()` method. It's loosely typed by default to accept almost any value; in practice, you will want to pass a type hint.\n\n```ts\ntype FooData = {\n  path: {\n    fooId: number;\n  };\n  query?: {\n    bar?: string;\n  };\n  url: '/foo/{fooId}';\n};\n\nconst url = client.buildUrl<FooData>({\n  path: {\n    fooId: 1,\n  },\n  query: {\n    bar: 'baz',\n  },\n  url: '/foo/{fooId}',\n});\nconsole.log(url); // prints '/foo/1?bar=baz'\n```\n\n## Custom Instance\n\nYou can provide a custom `fetch` instance. This is useful if you need to extend the default instance with extra functionality, or replace it altogether.\n\n```js\nimport { client } from 'client/client.gen';\n\nclient.setConfig({\n  fetch: () => {\n    /* custom `fetch` method */\n  },\n});\n```\n\nYou can use any of the approaches mentioned in [Configuration](#configuration), depending on how granular you want your custom instance to be.\n\n## API\n\nYou can view the complete list of options in the [UserConfig](https://github.com/hey-api/openapi-ts/blob/main/packages/openapi-ts/src/plugins/@hey-api/client-next/types.ts) interface.\n\n<!--@include: ../../partials/examples.md-->\n<!--@include: ../../partials/sponsors.md-->\n"
  },
  {
    "path": "docs/openapi-ts/clients/nuxt.md",
    "content": "---\ntitle: Nuxt v3 Client\ndescription: Generate a type-safe Nuxt v3 client from OpenAPI with the Nuxt client for openapi-ts. Fully compatible with validators, transformers, and all core features.\n---\n\n<script setup lang=\"ts\">\nimport Heading from '@components/Heading.vue';\nimport VersionLabel from '@components/VersionLabel.vue';\n</script>\n\n<Heading>\n  <h1>Nuxt<span class=\"sr-only\"> v3</span></h1>\n  <VersionLabel value=\"v3\" />\n</Heading>\n\n::: warning\nNuxt client is currently in beta. The interface might change before it becomes stable. We encourage you to leave feedback on [GitHub](https://github.com/hey-api/openapi-ts/issues).\n:::\n\n### About\n\n[Nuxt](https://nuxt.com) is an open source framework that makes web development intuitive and powerful.\n\nThe Nuxt client for Hey API generates a type-safe client from your OpenAPI spec, fully compatible with validators, transformers, and all core features.\n\n## Features\n\n- Nuxt v3 support\n- seamless integration with `@hey-api/openapi-ts` ecosystem\n- type-safe response data and errors\n- response data validation and transformation\n- access to the original request and response\n- granular request and response customization options\n- minimal learning curve thanks to extending the underlying technology\n- support bundling inside the generated output\n\n## Installation\n\nStart by adding `@hey-api/nuxt` to your dependencies.\n\n::: code-group\n\n```sh [npm]\nnpm install @hey-api/nuxt\n```\n\n```sh [pnpm]\npnpm add @hey-api/nuxt\n```\n\n```sh [yarn]\nyarn add @hey-api/nuxt\n```\n\n```sh [bun]\nbun add @hey-api/nuxt\n```\n\n:::\n\nIn your [configuration](/openapi-ts/get-started), add `@hey-api/client-nuxt` to your plugins and you'll be ready to generate client artifacts. :tada:\n\n::: code-group\n\n```js [config]\nexport default {\n  input: 'hey-api/backend', // sign up at app.heyapi.dev\n  output: 'src/client',\n  plugins: ['@hey-api/client-nuxt'], // [!code ++]\n};\n```\n\n```sh [cli]\nnpx @hey-api/openapi-ts \\\n  -i hey-api/backend \\\n  -o src/client \\\n  -c @hey-api/client-nuxt # [!code ++]\n```\n\n:::\n\n::: tip\n\nIf you add `@hey-api/nuxt` to your Nuxt modules, this step is not needed.\n\n:::\n\n## Configuration\n\nThe Nuxt client is built as a thin wrapper on top of Nuxt, extending its functionality to work with Hey API. If you're already familiar with Nuxt, configuring your client will feel like working directly with Nuxt.\n\nWhen we installed the client above, it created a [`client.gen.ts`](/openapi-ts/output#client) file. You will most likely want to configure the exported `client` instance. There are two ways to do that.\n\n### `setConfig()`\n\nThis is the simpler approach. You can call the `setConfig()` method at the beginning of your application or anytime you need to update the client configuration. You can pass any Nuxt configuration option to `setConfig()`, and even your own [`$fetch`](#custom-instance) implementation.\n\n```js\nimport { client } from 'client/client.gen';\n\nclient.setConfig({\n  baseURL: 'https://example.com',\n});\n```\n\nThe disadvantage of this approach is that your code may call the `client` instance before it's configured for the first time. Depending on your use case, you might need to use the second approach.\n\n### Runtime API\n\nSince `client.gen.ts` is a generated file, we can't directly modify it. Instead, we can tell our configuration to use a custom file implementing the Runtime API. We do that by specifying the `runtimeConfigPath` option.\n\n```js\nexport default {\n  input: 'hey-api/backend', // sign up at app.heyapi.dev\n  output: 'src/client',\n  plugins: [\n    {\n      name: '@hey-api/client-nuxt',\n      runtimeConfigPath: './src/hey-api.ts', // [!code ++]\n    },\n  ],\n};\n```\n\nIn our custom file, we need to export a `createClientConfig()` method. This function is a simple wrapper allowing us to override configuration values.\n\n::: code-group\n\n```ts [hey-api.ts]\nimport type { CreateClientConfig } from './client/client.gen';\n\nexport const createClientConfig: CreateClientConfig = (config) => ({\n  ...config,\n  baseURL: 'https://example.com',\n});\n```\n\n:::\n\nWith this approach, `client.gen.ts` will call `createClientConfig()` before initializing the `client` instance. If needed, you can still use `setConfig()` to update the client configuration later.\n\n### `createClient()`\n\nYou can also create your own client instance. You can use it to manually send requests or point it to a different domain.\n\n```js\nimport { createClient } from './client/client';\n\nconst myClient = createClient({\n  baseURL: 'https://example.com',\n});\n```\n\nYou can also pass this instance to any SDK function through the `client` option. This will override the default instance from `client.gen.ts`.\n\n```js\nconst response = await getFoo({\n  client: myClient,\n});\n```\n\n### SDKs\n\nAlternatively, you can pass the client configuration options to each SDK function. This is useful if you don't want to create a client instance for one-off use cases.\n\n```js\nconst response = await getFoo({\n  baseURL: 'https://example.com', // <-- override default configuration\n});\n```\n\n## Interceptors\n\nInterceptors (middleware) can be used to modify requests before they're sent or responses before they're returned to your application. Nuxt provides interceptors through ofetch, please refer to their documentation on [$fetch](https://nuxt.com/docs/api/utils/dollarfetch).\n\nYou can pass any Nuxt/ofetch arguments to the client instance.\n\n::: tip\nIf you omit `composable`, `$fetch` is used by default.\n:::\n\n```js\nimport { client } from 'client/client.gen';\n\nconst result = await client.get({\n  composable: '$fetch',\n  onRequest: (context) => {\n    // do something\n  },\n  url: '/foo',\n});\n```\n\n## Auth\n\nThe SDKs include auth mechanisms for every endpoint. You will want to configure the `auth` field to pass the right token for each request. The `auth` field can be a string or a function returning a string representing the token. The returned value will be attached only to requests that require auth.\n\n```js\nimport { client } from 'client/client.gen';\n\nclient.setConfig({\n  auth: () => '<my_token>', // [!code ++]\n  baseURL: 'https://example.com',\n});\n```\n\nIf you're not using SDKs or generating auth, using interceptors is a common approach to configuring auth for each request.\n\n```js\nimport { client } from 'client/client.gen';\n\nclient.setConfig({\n  onRequest: ({ options }) => {\n    options.headers.set('Authorization', 'Bearer <my_token>'); // [!code ++]\n  },\n});\n```\n\n## Build URL\n\nIf you need to access the compiled URL, you can use the `buildUrl()` method. It's loosely typed by default to accept almost any value; in practice, you will want to pass a type hint.\n\n```ts\ntype FooData = {\n  path: {\n    fooId: number;\n  };\n  query?: {\n    bar?: string;\n  };\n  url: '/foo/{fooId}';\n};\n\nconst url = client.buildUrl<FooData>({\n  path: {\n    fooId: 1,\n  },\n  query: {\n    bar: 'baz',\n  },\n  url: '/foo/{fooId}',\n});\nconsole.log(url); // prints '/foo/1?bar=baz'\n```\n\n## Custom Instance\n\nYou can provide a custom `$fetch` instance. This is useful if you need to extend the default instance with extra functionality, or replace it altogether.\n\n```js\nimport { client } from 'client/client.gen';\n\nclient.setConfig({\n  $fetch: () => {\n    /* custom `$fetch` method */\n  },\n});\n```\n\nYou can use any of the approaches mentioned in [Configuration](#configuration), depending on how granular you want your custom instance to be.\n\n## API\n\nYou can view the complete list of options in the [UserConfig](https://github.com/hey-api/openapi-ts/blob/main/packages/openapi-ts/src/plugins/@hey-api/client-nuxt/types.ts) interface.\n\n<!--@include: ../../partials/examples.md-->\n<!--@include: ../../partials/sponsors.md-->\n"
  },
  {
    "path": "docs/openapi-ts/clients/ofetch.md",
    "content": "---\ntitle: OFetch Client\ndescription: Generate a type-safe ofetch client from OpenAPI with the ofetch client for openapi-ts. Fully compatible with validators, transformers, and all core features.\n---\n\n<script setup lang=\"ts\">\nimport AuthorsList from '@components/AuthorsList.vue';\nimport { dmitriyBrolnickij } from '@data/people.js';\n</script>\n\n# OFetch\n\n### About\n\n[`ofetch`](https://github.com/unjs/ofetch) is a better Fetch API that adds useful defaults and features such as automatic response parsing, request/response hooks, and it works in Node, browser, and workers.\n\nThe `ofetch` client for Hey API generates a type-safe client from your OpenAPI spec, fully compatible with validators, transformers, and all core features.\n\n### Collaborators\n\n<AuthorsList :people=\"[dmitriyBrolnickij]\" />\n\n## Features\n\n- seamless integration with `@hey-api/openapi-ts` ecosystem\n- type-safe response data and errors\n- response data validation and transformation\n- access to the original request and response\n- granular request and response customization options\n- minimal learning curve thanks to extending the underlying technology\n- support bundling inside the generated output\n\n## Installation\n\nIn your [configuration](/openapi-ts/get-started), add `@hey-api/client-ofetch` to your plugins and you'll be ready to generate client artifacts. :tada:\n\n::: code-group\n\n```js [config]\nexport default {\n  input: 'hey-api/backend', // sign up at app.heyapi.dev\n  output: 'src/client',\n  plugins: ['@hey-api/client-ofetch'], // [!code ++]\n};\n```\n\n```sh [cli]\nnpx @hey-api/openapi-ts \\\n  -i hey-api/backend \\\n  -o src/client \\\n  -c @hey-api/client-ofetch # [!code ++]\n```\n\n:::\n\n## Configuration\n\nThe `ofetch` client is built as a thin wrapper on top of `ofetch`, extending its functionality to work with Hey API. If you're already familiar with `ofetch`, configuring your client will feel like working directly with `ofetch`.\n\nWhen we installed the client above, it created a [`client.gen.ts`](/openapi-ts/output#client) file. You will most likely want to configure the exported `client` instance. There are two ways to do that.\n\n### `setConfig()`\n\nThis is the simpler approach. You can call the `setConfig()` method at the beginning of your application or anytime you need to update the client configuration. You can pass any `ofetch` configuration option to `setConfig()`, and even your own [`ofetch`](#custom-instance) instance.\n\n```js\nimport { client } from 'client/client.gen';\n\nclient.setConfig({\n  baseUrl: 'https://example.com',\n});\n```\n\nThe disadvantage of this approach is that your code may call the `client` instance before it's configured for the first time. Depending on your use case, you might need to use the second approach.\n\n### Runtime API\n\nSince `client.gen.ts` is a generated file, we can't directly modify it. Instead, we can tell our configuration to use a custom file implementing the Runtime API. We do that by specifying the `runtimeConfigPath` option.\n\n```js\nexport default {\n  input: 'hey-api/backend', // sign up at app.heyapi.dev\n  output: 'src/client',\n  plugins: [\n    {\n      name: '@hey-api/client-ofetch',\n      runtimeConfigPath: './src/hey-api.ts', // [!code ++]\n    },\n  ],\n};\n```\n\nIn our custom file, we need to export a `createClientConfig()` method. This function is a simple wrapper allowing us to override configuration values.\n\n::: code-group\n\n```ts [hey-api.ts]\nimport type { CreateClientConfig } from './client/client.gen';\n\nexport const createClientConfig: CreateClientConfig = (config) => ({\n  ...config,\n  baseUrl: 'https://example.com',\n});\n```\n\n:::\n\nWith this approach, `client.gen.ts` will call `createClientConfig()` before initializing the `client` instance. If needed, you can still use `setConfig()` to update the client configuration later.\n\n### `createClient()`\n\nYou can also create your own client instance. You can use it to manually send requests or point it to a different domain.\n\n```js\nimport { createClient } from './client/client';\n\nconst myClient = createClient({\n  baseUrl: 'https://example.com',\n});\n```\n\nYou can also pass this instance to any SDK function through the `client` option. This will override the default instance from `client.gen.ts`.\n\n```js\nconst response = await getFoo({\n  client: myClient,\n});\n```\n\n### SDKs\n\nAlternatively, you can pass the client configuration options to each SDK function. This is useful if you don't want to create a client instance for one-off use cases.\n\n```js\nconst response = await getFoo({\n  baseUrl: 'https://example.com', // <-- override default configuration\n});\n```\n\n## Interceptors\n\nInterceptors (middleware) can be used to modify requests before they're sent or responses before they're returned to your application.\n\nThe `ofetch` client supports two complementary options:\n\n- built-in Hey API interceptors exposed via `client.interceptors`\n- native `ofetch` hooks passed through config (e.g., `onRequest`)\n\n### Example: Request interceptor\n\n::: code-group\n\n```js [use]\nimport { client } from 'client/client.gen';\n\nasync function myInterceptor(request) {\n  // do something\n  return request;\n}\n\ninterceptorId = client.interceptors.request.use(myInterceptor);\n```\n\n```js [eject]\nimport { client } from 'client/client.gen';\n\n// eject by ID\nclient.interceptors.request.eject(interceptorId);\n\n// eject by reference\nclient.interceptors.request.eject(myInterceptor);\n```\n\n```js [update]\nimport { client } from 'client/client.gen';\n\nasync function myNewInterceptor(request) {\n  // do something\n  return request;\n}\n\n// update by ID\nclient.interceptors.request.update(interceptorId, myNewInterceptor);\n\n// update by reference\nclient.interceptors.request.update(myInterceptor, myNewInterceptor);\n```\n\n:::\n\n### Example: Response interceptor\n\n::: code-group\n\n```js [use]\nimport { client } from 'client/client.gen';\n\nasync function myInterceptor(response) {\n  // do something\n  return response;\n}\n\ninterceptorId = client.interceptors.response.use(myInterceptor);\n```\n\n```js [eject]\nimport { client } from 'client/client.gen';\n\n// eject by ID\nclient.interceptors.response.eject(interceptorId);\n\n// eject by reference\nclient.interceptors.response.eject(myInterceptor);\n```\n\n```js [update]\nimport { client } from 'client/client.gen';\n\nasync function myNewInterceptor(response) {\n  // do something\n  return response;\n}\n\n// update interceptor by interceptor ID\nclient.interceptors.response.update(interceptorId, myNewInterceptor);\n\n// update interceptor by reference to interceptor function\nclient.interceptors.response.update(myInterceptor, myNewInterceptor);\n```\n\n:::\n\n::: tip\nTo eject, you must provide the ID or reference of the interceptor passed to `use()`, the ID is the value returned by `use()` and `update()`.\n:::\n\n### Example: `ofetch` hooks\n\n```js\nimport { client } from 'client/client.gen';\n\nclient.setConfig({\n  onRequest: ({ options }) => {\n    // mutate ofetch options (headers, query, etc.)\n  },\n  onResponse: ({ response }) => {\n    // inspect/transform the raw Response\n  },\n  onRequestError: (ctx) => {\n    // handle request errors\n  },\n  onResponseError: (ctx) => {\n    // handle response errors\n  },\n});\n```\n\n## Auth\n\nThe SDKs include auth mechanisms for every endpoint. You will want to configure the `auth` field to pass the right token for each request. The `auth` field can be a string or a function returning a string representing the token. The returned value will be attached only to requests that require auth.\n\n```js\nimport { client } from 'client/client.gen';\n\nclient.setConfig({\n  auth: () => '<my_token>', // [!code ++]\n  baseUrl: 'https://example.com',\n});\n```\n\nIf you're not using SDKs or generating auth, using interceptors is a common approach to configuring auth for each request.\n\n```js\nimport { client } from 'client/client.gen';\n\nclient.interceptors.request.use((request, options) => {\n  request.headers.set('Authorization', 'Bearer <my_token>'); // [!code ++]\n  return request;\n});\n```\n\nYou can also use the `ofetch` hooks.\n\n```js\nimport { client } from 'client/client.gen';\n\nclient.setConfig({\n  onRequest: ({ options }) => {\n    options.headers.set('Authorization', 'Bearer <my_token>'); // [!code ++]\n  },\n});\n```\n\n## Build URL\n\nIf you need to access the compiled URL, you can use the `buildUrl()` method. It's loosely typed by default to accept almost any value; in practice, you will want to pass a type hint.\n\n```ts\ntype FooData = {\n  path: {\n    fooId: number;\n  };\n  query?: {\n    bar?: string;\n  };\n  url: '/foo/{fooId}';\n};\n\nconst url = client.buildUrl<FooData>({\n  path: {\n    fooId: 1,\n  },\n  query: {\n    bar: 'baz',\n  },\n  url: '/foo/{fooId}',\n});\nconsole.log(url); // prints '/foo/1?bar=baz'\n```\n\n## Custom Instance\n\nYou can provide a custom `ofetch` instance. This is useful if you need to extend the default instance with extra functionality, or replace it altogether.\n\n```js\nimport { ofetch } from 'ofetch';\nimport { client } from 'client/client.gen';\n\nconst customOFetchInstance = ofetch.create({\n  onRequest: ({ options }) => {\n    // customize request\n  },\n  onResponse: ({ response }) => {\n    // customize response\n  },\n});\n\nclient.setConfig({\n  ofetch: customOFetchInstance,\n});\n```\n\nYou can use any of the approaches mentioned in [Configuration](#configuration), depending on how granular you want your custom instance to be.\n\n## API\n\nYou can view the complete list of options in the [UserConfig](https://github.com/hey-api/openapi-ts/blob/main/packages/openapi-ts/src/plugins/@hey-api/client-ofetch/types.ts) interface.\n\n<!--@include: ../../partials/examples.md-->\n<!--@include: ../../partials/sponsors.md-->\n"
  },
  {
    "path": "docs/openapi-ts/clients.md",
    "content": "---\ntitle: Clients\ndescription: HTTP clients for Hey API. Compatible with all our features.\n---\n\n<script setup lang=\"ts\">\nimport { embedProject } from '../embed'\n</script>\n\n# HTTP Clients\n\nWe all send HTTP requests in a slightly different way. Hey API doesn't force you to use any specific technology. What we do, however, is support your choice with great clients. All seamlessly integrated with our other features.\n\n## Features\n\n- seamless integration with `@hey-api/openapi-ts` ecosystem\n- type-safe response data and errors\n- response data validation and transformation\n- access to the original request and response\n- granular request and response customization options\n- minimal learning curve thanks to extending the underlying technology\n- support bundling inside the generated output\n\n## Options\n\nHey API natively supports the following clients.\n\n- [Fetch API](/openapi-ts/clients/fetch)\n- [Angular](/openapi-ts/clients/angular)\n- [Axios](/openapi-ts/clients/axios)\n- [Ky](/openapi-ts/clients/ky)\n- [Next.js](/openapi-ts/clients/next-js)\n- [Nuxt](/openapi-ts/clients/nuxt)\n- [OFetch](/openapi-ts/clients/ofetch)\n- [Effect](/openapi-ts/clients/effect) <span data-soon>Soon</span>\n- [Got](/openapi-ts/clients/got) <span data-soon>Soon</span>\n\nDon't see your client? [Build your own](/openapi-ts/clients/custom) or let us know your interest by [opening an issue](https://github.com/hey-api/openapi-ts/issues).\n\n<!--@include: ../partials/examples.md-->\n<!--@include: ../partials/sponsors.md-->\n"
  },
  {
    "path": "docs/openapi-ts/community/contributing/building.md",
    "content": "---\ntitle: Building\ndescription: Learn how to contribute to Hey API.\n---\n\n# Building\n\n::: warning\nThis page is under construction. We appreciate your patience.\n:::\n\n## Prerequisites\n\nYou should have a working knowledge of [git](https://git-scm.com), [node](https://nodejs.org/en), and [pnpm](https://pnpm.io).\n\n## Guidelines\n\nYour [pull request](https://help.github.com/articles/using-pull-requests) must:\n\n- address a single issue or add a single item of functionality\n- contain a clean history of small, incremental, logically separate commits, with no merge commits\n- use clear commit messages\n- be possible to merge automatically\n\n## Start `@hey-api/openapi-ts`\n\nRun `pnpm --filter @hey-api/openapi-ts dev`.\n"
  },
  {
    "path": "docs/openapi-ts/community/contributing/developing.md",
    "content": "---\ntitle: Developing\ndescription: Learn how to contribute to Hey API.\n---\n\n# Developing\n\n::: warning\nThis page is under construction. We appreciate your patience.\n:::\n\n## Working with Examples\n\nThe `examples` folder contains various integration examples that demonstrate how to use `@hey-api/openapi-ts` with different frameworks and libraries. These examples are kept in sync with the codebase through automated checks.\n\n### Generating Example Code\n\nWhen you make changes to the core packages that affect code generation, you need to regenerate the client code in all examples:\n\n```bash\npnpm examples:generate\n```\n\nThis command will:\n\n- Find all examples with an `openapi-ts` script\n- Run the OpenAPI code generator for each example\n- Update the generated client code in each example\n\n### Checking Example Code\n\nBefore committing changes, ensure that all generated example code is up-to-date:\n\n```bash\npnpm examples:check\n```\n\nThis command will:\n\n- Regenerate all example code\n- Check if any files were modified\n- Exit with an error if generated code is out of sync\n\nThis check is also run automatically in CI to ensure examples stay in sync with the main codebase.\n\n### Example Workflow\n\n1. Make changes to core packages\n2. Build the packages: `pnpm build --filter=\"@hey-api/**\"`\n3. Regenerate examples: `pnpm examples:generate`\n4. Commit all changes including the updated generated code\n5. The CI will verify that examples are in sync\n\n::: tip\nThink of generated example code as snapshot tests - they should always reflect the current state of the code generator.\n:::\n"
  },
  {
    "path": "docs/openapi-ts/community/contributing/testing.md",
    "content": "---\ntitle: Testing\ndescription: Learn how to contribute to Hey API.\n---\n\n# Testing\n\n::: warning\nThis page is under construction. We appreciate your patience.\n:::\n"
  },
  {
    "path": "docs/openapi-ts/community/contributing.md",
    "content": "---\ntitle: Contributing\ndescription: Learn how to contribute to Hey API.\n---\n\n# Contributor Manual\n\n## Foreword\n\nHey API is building an OpenAPI to TypeScript code generator ecosystem. It's trusted by thousands of companies – from YC startups to Fortune 500 enterprises – and powers products used by millions worldwide.\n\nWe welcome contributors of all backgrounds and experience levels. Whether you're fixing a typo or building a new feature, your input matters. If you need guidance, help with technical writing, or want to bring a feature idea to life, we're here to support you.\n\n::: tip\n\nNew to open source? Take a look at the [Open Source](https://opensource.guide/) or [First Contributions](https://github.com/firstcontributions/first-contributions) guides for helpful information on contributing to open source projects.\n\n:::\n\n## First Steps\n\nThere are many ways to contribute to Hey API. Most of them don't involve writing any code!\n\n- **Read the documentation**. Start with the [Get Started](/openapi-ts/get-started) guide. If you find anything broken or confusing, you can suggest improvements by clicking \"Edit\" at the bottom of any page.\n\n- **Browse open issues**. Help others by providing workarounds, asking for clarification, triaging, or suggesting labels on [open issues](https://github.com/hey-api/openapi-ts/issues). If you see something you would like to work on, consider opening a pull request.\n\n- **Participate in discussions**. Ask or [answer questions](https://github.com/orgs/hey-api/discussions), provide feedback, or suggest new ideas. Every idea is welcome, no matter how big or small.\n\n- **Engage on social media**. Help others discover Hey API by engaging with our posts on [LinkedIn](https://linkedin.com/company/heyapi), [Bluesky](https://bsky.app/profile/heyapi.dev), or [X](https://x.com/mrlubos). Share your experiences with Hey API on Reddit, Slack, or in your own communities and group chats.\n\n- **Create a new issue**. If you can't find a solution, [open an issue](https://github.com/hey-api/openapi-ts/issues). The issue template will guide you through the process.\n\n- **Open a pull request**. If you find an issue you would like to fix, open a pull request. If you need help, tag [`@mrlubos`](https://github.com/mrlubos) on GitHub, provide enough relevant information, and we will do our best to assist you.\n\nThese are some of the best ways not only to contribute to Hey API, but also to learn, connect with others, and share ideas.\n\n## Pull Requests\n\nReady to write some code? We have dedicated guides to help you [build](/openapi-ts/community/contributing/building), [develop](/openapi-ts/community/contributing/developing), and [test](/openapi-ts/community/contributing/testing) your feature before it's released.\n\nWe are excited to see what you'll contribute!\n"
  },
  {
    "path": "docs/openapi-ts/community/spotlight.md",
    "content": "---\ntitle: Spotlight\ndescription: Meet the people behind Hey API.\n---\n\n<script setup lang=\"ts\">\nimport { VPTeamMembers } from 'vitepress/theme'\nimport { coreTeam } from '../../data/coreTeam.js'\nimport { hallOfFame } from '../../data/hallOfFame.js'\n</script>\n\n# Spotlight\n\nMeet the people behind Hey API. To join this list, please refer to the [contributing](/openapi-ts/community/contributing) guide.\n\n## Core Team\n\nThese people actively maintain Hey API.\n\n<VPTeamMembers class=\"people\" size=\"small\" :members=\"coreTeam\" />\n\nDo you want to join the core team? Send us a short [email](mailto:lubos@heyapi.dev?subject=Join%20Core%20Team) describing your interest in Hey API, any relevant experience, and what you're hoping to work on.\n\n## Hall of Fame\n\nThese are the people with significant contributions to Hey API. A special thank you goes to [Ferdi Koomen](https://madebyferdi.com) for allowing us to use the original source code from OpenAPI TypeScript Codegen. None of this would've been possible without you!\n\n<VPTeamMembers class=\"people\" size=\"small\" :members=\"hallOfFame\" />\n\n## Contributors\n\nThe complete list of contributors to Hey API.\n\n<div class=\"contributors-list\">\n\n<!--@include: ../../partials/contributors-list.md-->\n\n</div>\n\nA sincere thank you for your contributions.\n\n<style>\n.vp-doc .VPTeamMembers.people.small .container {\n  grid-template-columns: repeat(auto-fit, minmax(284px, 1fr)) !important;\n}\n\n@media (max-width: 640px) {\n  .vp-doc .VPTeamMembers.people.small .container {\n    max-width: 100% !important;\n  }\n}\n\n.VPTeamMembersItem.small {\n  max-width: 400px;\n}\n\n.VPTeamMembersItem.small .profile {\n  align-items: center;\n  display: flex;\n  padding: 1rem 1.4rem !important;\n}\n\n.VPTeamMembersItem.small .profile .avatar {\n  margin: 0 1rem 0 0;\n}\n\n.VPTeamMembersItem.small .profile .data {\n  padding: 0;\n  text-align: left;\n}\n\n.VPTeamMembersItem.small .profile .data .links {\n  justify-content: initial;\n  margin: 0 -8px -20px;\n  padding: 4px 0;\n}\n</style>\n"
  },
  {
    "path": "docs/openapi-ts/configuration/input.md",
    "content": "---\ntitle: Input\ndescription: Configure @hey-api/openapi-ts.\n---\n\n# Input\n\nYou must provide an input so we can load your OpenAPI specification.\n\n## Input\n\nThe input can be a string path, URL, [API registry](#api-registry), an object containing any of these, or an object representing an OpenAPI specification. Hey API supports all valid OpenAPI versions and file formats.\n\n::: code-group\n\n```js [path]\nexport default {\n  input: './path/to/openapi.json', // [!code ++]\n};\n```\n\n```js [url]\nexport default {\n  input: 'https://get.heyapi.dev/hey-api/backend', // sign up at app.heyapi.dev // [!code ++]\n};\n```\n\n```js [registry]\nexport default {\n  input: 'hey-api/backend', // sign up at app.heyapi.dev // [!code ++]\n};\n```\n\n<!-- prettier-ignore-start -->\n```js [object]\nexport default {\n  input: { // [!code ++]\n    path: 'hey-api/backend', // sign up at app.heyapi.dev // [!code ++]\n    // ...other options // [!code ++]\n  }, // [!code ++]\n};\n```\n<!-- prettier-ignore-end -->\n<!-- prettier-ignore-start -->\n```js [spec]\nexport default {\n  input: { // [!code ++]\n    openapi: '3.1.1', // [!code ++]\n    // ...rest of your spec // [!code ++]\n  }, // [!code ++]\n};\n```\n<!-- prettier-ignore-end -->\n\n:::\n\nYou can learn more about complex use cases in the [Advanced](/openapi-ts/configuration#advanced) section.\n\n::: info\nIf you use an HTTPS URL with a self-signed certificate in development, you will need to set [`NODE_TLS_REJECT_UNAUTHORIZED=0`](https://github.com/hey-api/openapi-ts/issues/276#issuecomment-2043143501) in your environment.\n:::\n\n### Request options\n\nYou can pass any valid Fetch API [options](https://developer.mozilla.org/docs/Web/API/RequestInit) to the request for fetching your specification. This is useful if your file is behind auth for example.\n\n<!-- prettier-ignore-start -->\n```js\nexport default {\n  input: {\n    path: 'https://secret.com/protected-spec',\n    fetch: { // [!code ++]\n      headers: { // [!code ++]\n        Authorization: 'Bearer xxx', // [!code ++]\n      }, // [!code ++]\n    }, // [!code ++]\n  },\n};\n```\n<!-- prettier-ignore-end -->\n\n## API Registry\n\nYou can store your specifications in an API registry to serve as a single source of truth. This helps prevent drift, improves discoverability, enables version tracking, and more.\n\n### Hey API\n\nYou can learn more about [Hey API Platform](https://app.heyapi.dev) on the [Integrations](/openapi-ts/integrations) page.\n\n```js [uuid]\nexport default {\n  input: 'hey-api/backend', // sign up at app.heyapi.dev // [!code ++]\n};\n```\n\nThe `input` object lets you provide additional options to construct the correct URL.\n\n```js\nexport default {\n  input: {\n    path: 'hey-api/backend', // sign up at app.heyapi.dev\n    branch: 'main', // [!code ++]\n  },\n};\n```\n\nWe also provide shorthands for other registries:\n\n::: details Scalar\nPrefix your input with `scalar:` to use the Scalar API Registry.\n\n```js [long]\nexport default {\n  input: 'scalar:@scalar/access-service', // [!code ++]\n};\n```\n\n:::\n\n::: details ReadMe\nPrefix your input with `readme:` to use the ReadMe API Registry.\n\n::: code-group\n\n```js [uuid]\nexport default {\n  input: 'readme:nysezql0wwo236', // [!code ++]\n};\n```\n\n```js [long]\nexport default {\n  input: 'readme:@developers/v2.0#nysezql0wwo236', // [!code ++]\n};\n```\n\n:::\n\n## Watch Mode\n\n::: warning\nWatch mode currently supports only remote files via URL.\n:::\n\nIf your schema changes frequently, you may want to automatically regenerate the output during development. To watch your input file for changes, enable `input.watch` mode in your configuration or pass the `--watch` flag to the CLI.\n\n::: code-group\n\n```js [config]\nexport default {\n  input: {\n    path: 'hey-api/backend', // sign up at app.heyapi.dev\n    watch: true, // [!code ++]\n  },\n};\n```\n\n```sh [cli]\nnpx @hey-api/openapi-ts \\\n  -i hey-api/backend \\\n  -o src/client \\\n  -w  # [!code ++]\n```\n\n:::\n\n<!--@include: ../../partials/examples.md-->\n<!--@include: ../../partials/sponsors.md-->\n"
  },
  {
    "path": "docs/openapi-ts/configuration/output.md",
    "content": "---\ntitle: Output\ndescription: Configure @hey-api/openapi-ts.\n---\n\n# Output\n\nYou must set the output so we know where to generate your files.\n\n## Output\n\nOutput can be a path to the destination folder or an object containing the destination folder path and optional settings.\n\n::: code-group\n\n```js [path]\nexport default {\n  input: 'hey-api/backend', // sign up at app.heyapi.dev\n  output: 'src/client', // [!code ++]\n};\n```\n\n<!-- prettier-ignore-start -->\n```js [object]\nexport default {\n  input: 'hey-api/backend', // sign up at app.heyapi.dev\n  output: { // [!code ++]\n    path: 'src/client', // [!code ++]\n    // ...other options // [!code ++]\n  }, // [!code ++]\n};\n```\n<!-- prettier-ignore-end -->\n\n:::\n\nYou can learn more about complex use cases in the [Advanced](/openapi-ts/configuration#advanced) section.\n\n## File\n\nControl how files are named and annotated in the generated output.\n\n### File Name\n\nYou can customize the naming and casing pattern for files using the `fileName` option.\n\n::: code-group\n\n```js [default]\nexport default {\n  input: 'hey-api/backend', // sign up at app.heyapi.dev\n  output: {\n    fileName: '{{name}}', // [!code ++]\n    path: 'src/client',\n  },\n};\n```\n\n```js [snake_case]\nexport default {\n  input: 'hey-api/backend', // sign up at app.heyapi.dev\n  output: {\n    fileName: {\n      case: 'snake_case', // [!code ++]\n    },\n    path: 'src/client',\n  },\n};\n```\n\n:::\n\nBy default, we append every file name with a `.gen` suffix to highlight it's automatically generated. You can customize or disable this suffix using the `fileName.suffix` option.\n\n::: code-group\n\n```js [default]\nexport default {\n  input: 'hey-api/backend', // sign up at app.heyapi.dev\n  output: {\n    fileName: {\n      suffix: '.gen', // [!code ++]\n    },\n    path: 'src/client',\n  },\n};\n```\n\n```js [disabled]\nexport default {\n  input: 'hey-api/backend', // sign up at app.heyapi.dev\n  output: {\n    fileName: {\n      suffix: null, // [!code ++]\n    },\n    path: 'src/client',\n  },\n};\n```\n\n```js [custom]\nexport default {\n  input: 'hey-api/backend', // sign up at app.heyapi.dev\n  output: {\n    fileName: {\n      suffix: '.generated', // [!code ++]\n    },\n    path: 'src/client',\n  },\n};\n```\n\n:::\n\n### File Header\n\nThe generated output includes a notice in every file warning that any modifications will be lost when the files are regenerated. You can customize or disable this notice using the `header` option.\n\n::: code-group\n\n```js [example]\n/* eslint-disable */\n// This file is auto-generated by @hey-api/openapi-ts\n\n/** ... */\n```\n\n<!-- prettier-ignore-start -->\n```js [config]\nexport default {\n  input: 'hey-api/backend', // sign up at app.heyapi.dev\n  output: {\n    header: (ctx) => [ // [!code ++]\n      '/* eslint-disable */', // [!code ++]\n      ...ctx.defaultValue, // [!code ++]\n    ], // [!code ++]\n    path: 'src/client',\n  },\n};\n```\n<!-- prettier-ignore-end -->\n\n:::\n\n## Module\n\nControl how module specifiers are generated in the output.\n\n### Module Extension\n\nSet `module.extension` to define the file extension used in import specifiers. This is useful when targeting environments that require fully specified imports (e.g., Node ESM or certain bundlers).\n\n::: code-group\n\n```js [example]\nimport foo from './foo.js';\nimport bar from './bar.js';\n```\n\n```js [config]\nexport default {\n  input: 'hey-api/backend', // sign up at app.heyapi.dev\n  output: {\n    module: {\n      extension: '.js', // [!code ++]\n    },\n    path: 'src/client',\n  },\n};\n```\n\n:::\n\n### Module Path\n\nUse `module.resolve` for full control over how module specifiers are generated. This lets you override specific modules or redirect them to custom locations (e.g., CDNs or internal aliases).\n\n::: code-group\n\n```js [example]\nimport * as z from 'https://esm.sh/zod';\n```\n\n<!-- prettier-ignore-start -->\n```js [config]\nexport default {\n  input: 'hey-api/backend', // sign up at app.heyapi.dev\n  output: {\n    module: {\n      resolve(path) { // [!code ++]\n        if (path === 'zod') { // [!code ++]\n          return 'https://esm.sh/zod'; // [!code ++]\n        } // [!code ++]\n      }, // [!code ++]\n    },\n    path: 'src/client',\n  },\n};\n```\n<!-- prettier-ignore-end -->\n\n:::\n\n## Source\n\nSource is a copy of the input specification used to generate your output. It can be used to power documentation tools or to persist a stable snapshot alongside your generated files.\n\nEnabling the `source` option with `true` creates a `source.json` file in your output folder.\n\n```js\nexport default {\n  input: 'hey-api/backend', // sign up at app.heyapi.dev\n  output: {\n    path: 'src/client',\n    source: true, // [!code ++]\n  },\n};\n```\n\nYou can customize the file name and location using `fileName` and `path`. For example, this configuration will create an `openapi.json` file inside `src/client/source` directory.\n\n```js\nexport default {\n  input: 'hey-api/backend', // sign up at app.heyapi.dev\n  output: {\n    path: 'src/client',\n    source: {\n      fileName: 'openapi', // [!code ++]\n      path: './source', // [!code ++]\n    },\n  },\n};\n```\n\nTo use the source without writing it to disk, you can provide a `callback` function. This is useful for logging or integrating with external systems.\n\n```js\nexport default {\n  input: 'hey-api/backend', // sign up at app.heyapi.dev\n  output: {\n    path: 'src/client',\n    source: {\n      callback: (source) => console.log(source), // [!code ++]\n      path: null, // [!code ++]\n    },\n  },\n};\n```\n\n## Post Process\n\nPost-processing allows you to run commands on the generated output folder after files are written. This is typically used to run formatters, linters, or other cleanup tools.\n\nCommands are executed in order, and each command receives the output path via the `path` placeholder.\n\n### Presets\n\nYou can use built-in presets for common tools:\n\n::: code-group\n\n```js [biome:format]\nexport default {\n  input: 'hey-api/backend', // sign up at app.heyapi.dev\n  output: {\n    path: 'src/client',\n    postProcess: ['biome:format'], // [!code ++]\n  },\n};\n```\n\n```js [biome:lint]\nexport default {\n  input: 'hey-api/backend', // sign up at app.heyapi.dev\n  output: {\n    path: 'src/client',\n    postProcess: ['biome:lint'], // [!code ++]\n  },\n};\n```\n\n```js [eslint]\nexport default {\n  input: 'hey-api/backend', // sign up at app.heyapi.dev\n  output: {\n    path: 'src/client',\n    postProcess: ['eslint'], // [!code ++]\n  },\n};\n```\n\n```js [oxfmt]\nexport default {\n  input: 'hey-api/backend', // sign up at app.heyapi.dev\n  output: {\n    path: 'src/client',\n    postProcess: ['oxfmt'], // [!code ++]\n  },\n};\n```\n\n```js [oxlint]\nexport default {\n  input: 'hey-api/backend', // sign up at app.heyapi.dev\n  output: {\n    path: 'src/client',\n    postProcess: ['oxlint'], // [!code ++]\n  },\n};\n```\n\n```js [prettier]\nexport default {\n  input: 'hey-api/backend', // sign up at app.heyapi.dev\n  output: {\n    path: 'src/client',\n    postProcess: ['prettier'], // [!code ++]\n  },\n};\n```\n\n:::\n\n### Custom\n\nYou can also provide custom post processors:\n\n<!-- prettier-ignore-start -->\n```js\nexport default {\n  input: 'hey-api/backend', // sign up at app.heyapi.dev\n  output: {\n    path: 'src/client',\n    postProcess: [{ // [!code ++]\n      command: 'dprint', // [!code ++]\n      args: ['fmt', '{{path}}'], // [!code ++]\n    }], // [!code ++]\n  },\n};\n```\n<!-- prettier-ignore-end -->\n\nYou can skip processing by adding the output path to the tool's ignore file (for example `.eslintignore` or `.prettierignore`).\n\n## Name Conflicts\n\nAs your project grows, the chances of name conflicts increase. We use a simple conflict resolver that appends numeric suffixes to duplicate identifiers. If you prefer a different strategy, you can provide your own `nameConflictResolver` function.\n\n::: code-group\n\n<!-- prettier-ignore-start -->\n```js [config]\nexport default {\n  input: 'hey-api/backend', // sign up at app.heyapi.dev\n  output: {\n    nameConflictResolver({ attempt, baseName }) { // [!code ++]\n      return attempt === 0 ? baseName : `${baseName}_N${attempt + 1}`; // [!code ++]\n    }, // [!code ++]\n    path: 'src/client',\n  },\n};\n```\n<!-- prettier-ignore-end -->\n\n```ts [example]\nexport type ChatCompletion = string;\n\nexport type ChatCompletion_N2 = number;\n```\n\n:::\n\n## TSConfig Path\n\nWe use the [TSConfig file](https://www.typescriptlang.org/tsconfig/) to generate output matching your project's settings. By default, we attempt to find a TSConfig file starting from the location of the `@hey-api/openapi-ts` configuration file and traversing up.\n\n::: code-group\n\n```js [default]\nexport default {\n  input: 'hey-api/backend', // sign up at app.heyapi.dev\n  output: {\n    path: 'src/client',\n    tsConfigPath: undefined, // [!code ++]\n  },\n};\n```\n\n```js [custom]\nexport default {\n  input: 'hey-api/backend', // sign up at app.heyapi.dev\n  output: {\n    path: 'src/client',\n    tsConfigPath: './config/tsconfig.custom.json', // [!code ++]\n  },\n};\n```\n\n```js [disabled]\nexport default {\n  input: 'hey-api/backend', // sign up at app.heyapi.dev\n  output: {\n    path: 'src/client',\n    tsConfigPath: null, // [!code ++]\n  },\n};\n```\n\n:::\n\n## Custom Files\n\nBy default, you can't keep custom files in the `path` folder because it's emptied on every run. If you're sure you need to disable this behavior, set `clean` to `false`.\n\n```js\nexport default {\n  input: 'hey-api/backend', // sign up at app.heyapi.dev\n  output: {\n    clean: false, // [!code ++]\n    path: 'src/client',\n  },\n};\n```\n\n::: warning\nSetting `clean` to `false` may result in broken output. Ensure you typecheck your code.\n:::\n\n<!--@include: ../../partials/examples.md-->\n<!--@include: ../../partials/sponsors.md-->\n"
  },
  {
    "path": "docs/openapi-ts/configuration/parser.md",
    "content": "---\ntitle: Parser\ndescription: Configure @hey-api/openapi-ts.\n---\n\n# Parser\n\nWe parse your input before making it available to plugins. Configuring the parser is optional, but it provides an ideal opportunity to modify or validate your input as needed.\n\n## Patch\n\nSometimes you need to modify raw input before it's processed further. A common use case is fixing an invalid specification or adding a missing field. For this reason, custom patches are applied before any parsing takes place.\n\nYou can add custom patches with `patch`.\n\n<!-- prettier-ignore-start -->\n```js\nexport default {\n  input: 'hey-api/backend', // sign up at app.heyapi.dev\n  output: 'src/client',\n  parser: {\n    patch: {\n      schemas: {\n        Foo: (schema) => { // [!code ++]\n          // convert date-time format to timestamp // [!code ++]\n          delete schema.properties.updatedAt.format; // [!code ++]\n          schema.properties.updatedAt.type = 'number'; // [!code ++]\n        }, // [!code ++]\n        Bar: (schema) => { // [!code ++]\n          // add missing property // [!code ++]\n          schema.properties.meta = { // [!code ++]\n            additionalProperties: true, // [!code ++]\n            type: 'object', // [!code ++]\n          }; // [!code ++]\n          schema.required = ['meta']; // [!code ++]\n        }, // [!code ++]\n        Baz: (schema) => { // [!code ++]\n          // remove property // [!code ++]\n          delete schema.properties.internalField; // [!code ++]\n        }, // [!code ++]\n      },\n    },\n  },\n};\n```\n<!-- prettier-ignore-end -->\n\n## Validate\n\n::: warning\nThe validator feature is very limited. You can help improve it by submitting more [use cases](https://github.com/hey-api/openapi-ts/issues/1970#issuecomment-2933189789).\n:::\n\nIf you don't control or trust your input, you might want to validate it. Any detected errors in your input will exit `@hey-api/openapi-ts` and no plugins will be executed.\n\nTo validate your input, set `validate_EXPERIMENTAL` to `true`.\n\n```js\nexport default {\n  input: 'hey-api/backend', // sign up at app.heyapi.dev\n  output: 'src/client',\n  parser: {\n    validate_EXPERIMENTAL: true, // [!code ++]\n  },\n};\n```\n\n## Filters\n\nFilters allow you to trim your input before it's processed further, so your output contains only relevant resources.\n\n### Operations\n\nSet `include` to match operations to be included or `exclude` to match operations to be excluded. Both exact keys and regular expressions are supported. When both rules match the same operation, `exclude` takes precedence over `include`.\n\n::: code-group\n\n```js [include]\nexport default {\n  input: 'hey-api/backend', // sign up at app.heyapi.dev\n  output: 'src/client',\n  parser: {\n    filters: {\n      operations: {\n        include: ['GET /api/v1/foo', '/^[A-Z]+ /api/v1//'], // [!code ++]\n      },\n    },\n  },\n};\n```\n\n```js [exclude]\nexport default {\n  input: 'hey-api/backend', // sign up at app.heyapi.dev\n  output: 'src/client',\n  parser: {\n    filters: {\n      operations: {\n        exclude: ['GET /api/v1/foo', '/^[A-Z]+ /api/v1//'], // [!code ++]\n      },\n    },\n  },\n};\n```\n\n:::\n\n### Tags\n\nSet `include` to match tags to be included or `exclude` to match tags to be excluded. When both rules match the same tag, `exclude` takes precedence over `include`.\n\n::: code-group\n\n```js [include]\nexport default {\n  input: 'hey-api/backend', // sign up at app.heyapi.dev\n  output: 'src/client',\n  parser: {\n    filters: {\n      tags: {\n        include: ['v2'], // [!code ++]\n      },\n    },\n  },\n};\n```\n\n```js [exclude]\nexport default {\n  input: 'hey-api/backend', // sign up at app.heyapi.dev\n  output: 'src/client',\n  parser: {\n    filters: {\n      tags: {\n        exclude: ['v1'], // [!code ++]\n      },\n    },\n  },\n};\n```\n\n:::\n\n### Deprecated\n\nYou can filter out deprecated resources by setting `deprecated` to `false`.\n\n```js\nexport default {\n  input: 'hey-api/backend', // sign up at app.heyapi.dev\n  output: 'src/client',\n  parser: {\n    filters: {\n      deprecated: false, // [!code ++]\n    },\n  },\n};\n```\n\n### Schemas\n\nSet `include` to match schemas to be included or `exclude` to match schemas to be excluded. Both exact keys and regular expressions are supported. When both rules match the same schema, `exclude` takes precedence over `include`.\n\n::: code-group\n\n```js [include]\nexport default {\n  input: 'hey-api/backend', // sign up at app.heyapi.dev\n  output: 'src/client',\n  parser: {\n    filters: {\n      schemas: {\n        include: ['Foo', '/^Bar/'], // [!code ++]\n      },\n    },\n  },\n};\n```\n\n```js [exclude]\nexport default {\n  input: 'hey-api/backend', // sign up at app.heyapi.dev\n  output: 'src/client',\n  parser: {\n    filters: {\n      schemas: {\n        exclude: ['Foo', '/^Bar/'], // [!code ++]\n      },\n    },\n  },\n};\n```\n\n:::\n\n### Parameters\n\nSet `include` to match parameters to be included or `exclude` to match parameters to be excluded. Both exact keys and regular expressions are supported. When both rules match the same parameter, `exclude` takes precedence over `include`.\n\n::: code-group\n\n```js [include]\nexport default {\n  input: 'hey-api/backend', // sign up at app.heyapi.dev\n  output: 'src/client',\n  parser: {\n    filters: {\n      parameters: {\n        include: ['QueryParameter', '/^MyQueryParameter/'], // [!code ++]\n      },\n    },\n  },\n};\n```\n\n```js [exclude]\nexport default {\n  input: 'hey-api/backend', // sign up at app.heyapi.dev\n  output: 'src/client',\n  parser: {\n    filters: {\n      parameters: {\n        exclude: ['QueryParameter', '/^MyQueryParameter/'], // [!code ++]\n      },\n    },\n  },\n};\n```\n\n:::\n\n### Request Bodies\n\nSet `include` to match request bodies to be included or `exclude` to match request bodies to be excluded. Both exact keys and regular expressions are supported. When both rules match the same request body, `exclude` takes precedence over `include`.\n\n::: code-group\n\n```js [include]\nexport default {\n  input: 'hey-api/backend', // sign up at app.heyapi.dev\n  output: 'src/client',\n  parser: {\n    filters: {\n      requestBodies: {\n        include: ['Payload', '/^SpecialPayload/'], // [!code ++]\n      },\n    },\n  },\n};\n```\n\n```js [exclude]\nexport default {\n  input: 'hey-api/backend', // sign up at app.heyapi.dev\n  output: 'src/client',\n  parser: {\n    filters: {\n      requestBodies: {\n        exclude: ['Payload', '/^SpecialPayload/'], // [!code ++]\n      },\n    },\n  },\n};\n```\n\n:::\n\n### Responses\n\nSet `include` to match responses to be included or `exclude` to match responses to be excluded. Both exact keys and regular expressions are supported. When both rules match the same response, `exclude` takes precedence over `include`.\n\n::: code-group\n\n```js [include]\nexport default {\n  input: 'hey-api/backend', // sign up at app.heyapi.dev\n  output: 'src/client',\n  parser: {\n    filters: {\n      responses: {\n        include: ['Foo', '/^Bar/'], // [!code ++]\n      },\n    },\n  },\n};\n```\n\n```js [exclude]\nexport default {\n  input: 'hey-api/backend', // sign up at app.heyapi.dev\n  output: 'src/client',\n  parser: {\n    filters: {\n      responses: {\n        exclude: ['Foo', '/^Bar/'], // [!code ++]\n      },\n    },\n  },\n};\n```\n\n:::\n\n### Orphaned resources\n\nIf you only want to exclude orphaned resources, set `orphans` to `false`. This is the default value when combined with any other filters. If this isn't the desired behavior, you may want to set `orphans` to `true` to always preserve unused resources.\n\n```js\nexport default {\n  input: 'hey-api/backend', // sign up at app.heyapi.dev\n  output: 'src/client',\n  parser: {\n    filters: {\n      orphans: false, // [!code ++]\n    },\n  },\n};\n```\n\n### Order\n\nFor performance reasons, we don't preserve the original order when filtering out resources. If maintaining the original order is important to you, set `preserveOrder` to `true`.\n\n```js\nexport default {\n  input: 'hey-api/backend', // sign up at app.heyapi.dev\n  output: 'src/client',\n  parser: {\n    filters: {\n      preserveOrder: true, // [!code ++]\n    },\n  },\n};\n```\n\n## Transforms\n\nYou can think of transforms as deterministic [patches](#patch). They provide an easy way to apply the most commonly used input transformations.\n\n### Enums\n\nYour input might contain two types of enums:\n\n- enums defined as reusable components (root enums)\n- non-reusable enums nested within other schemas (inline enums)\n\nYou may want all enums to be reusable. This is because only root enums are typically exported by plugins. Inline enums will never be directly importable since they're nested inside other schemas.\n\n::: code-group\n\n```js [root]\nexport default {\n  input: 'hey-api/backend', // sign up at app.heyapi.dev\n  output: 'src/client',\n  parser: {\n    transforms: {\n      enums: 'root', // [!code ++]\n    },\n  },\n};\n```\n\n```js [inline]\nexport default {\n  input: 'hey-api/backend', // sign up at app.heyapi.dev\n  output: 'src/client',\n  parser: {\n    transforms: {\n      enums: 'inline', // [!code ++]\n    },\n  },\n};\n```\n\n:::\n\nYou can customize the naming and casing pattern for `enums` schemas using the `.name` and `.case` options.\n\n### Properties required by default\n\nBy default, any object schema with a missing `required` keyword is interpreted as \"no properties are required.\" This is the correct behavior according to the OpenAPI standard. However, some specifications interpret a missing `required` keyword as \"all properties should be required.\"\n\nThis option allows you to change the default behavior so that properties are required by default unless explicitly marked as optional.\n\n::: code-group\n\n```js [default]\nexport default {\n  input: 'hey-api/backend', // sign up at app.heyapi.dev\n  output: 'src/client',\n  parser: {\n    transforms: {\n      propertiesRequiredByDefault: false, // [!code ++]\n    },\n  },\n};\n```\n\n```js [required]\nexport default {\n  input: 'hey-api/backend', // sign up at app.heyapi.dev\n  output: 'src/client',\n  parser: {\n    transforms: {\n      propertiesRequiredByDefault: true, // [!code ++]\n    },\n  },\n};\n```\n\n:::\n\n### Read-write\n\nYour schemas might contain read-only or write-only fields. Using such schemas directly could mean asking the user to provide a read-only field in requests, or expecting a write-only field in responses. We separate schemas for requests and responses if direct usage would result in such scenarios.\n\n::: code-group\n\n```js [default]\nexport default {\n  input: 'hey-api/backend', // sign up at app.heyapi.dev\n  output: 'src/client',\n  parser: {\n    transforms: {\n      readWrite: {\n        requests: '{{name}}Writable', // [!code ++]\n        responses: '{{name}}', // [!code ++]\n      },\n    },\n  },\n};\n```\n\n```js [disabled]\nexport default {\n  input: 'hey-api/backend', // sign up at app.heyapi.dev\n  output: 'src/client',\n  parser: {\n    transforms: {\n      readWrite: false, // [!code ++]\n    },\n  },\n};\n```\n\n:::\n\nYou can customize the naming and casing pattern for `requests` and `responses` schemas using the `.name` and `.case` options.\n\n### Schema Name\n\nSometimes your schema names are auto-generated or follow a naming convention that produces verbose or awkward type names. You can rename schema component keys throughout the specification, automatically updating all `$ref` pointers. For example, stripping version markers from schema names, removing vendor prefixes, converting naming conventions, or shortening deeply qualified names.\n\n::: code-group\n\n<!-- prettier-ignore-start -->\n```js [function]\nexport default {\n  input: 'hey-api/backend', // sign up at app.heyapi.dev\n  output: 'src/client',\n  parser: {\n    transforms: {\n      schemaName: (name) => { // [!code ++]\n        // Strip version markers: ServiceRoot_v1_20_0_ServiceRoot → ServiceRoot // [!code ++]\n        let clean = name.replace(/([A-Za-z\\d]+)_v\\d+_\\d+_\\d+_([A-Za-z\\d]*)/g, (_, p1, p2) => // [!code ++]\n          p2.startsWith(p1) ? p2 : p1 + p2, // [!code ++]\n        ); // [!code ++]\n        // Deduplicate prefixes: Foo_Foo → Foo // [!code ++]\n        const m = clean.match(/^([A-Za-z\\d]+)_\\1([A-Za-z\\d]*)$/); // [!code ++]\n        if (m) clean = m[1] + m[2]; // [!code ++]\n        return clean; // [!code ++]\n      }, // [!code ++]\n    },\n  },\n};\n```\n<!-- prettier-ignore-end -->\n\n```js [template]\nexport default {\n  input: 'hey-api/backend', // sign up at app.heyapi.dev\n  output: 'src/client',\n  parser: {\n    transforms: {\n      schemaName: 'Api{{name}}', // [!code ++]\n    },\n  },\n};\n```\n\n:::\n\n::: tip Name Collisions\nIf a transformed schema name conflicts with an existing schema, the rename is skipped for that schema to prevent overwrites. The original name is preserved.\n:::\n\n## Pagination\n\nPaginated operations are detected by having a pagination keyword in its parameters or request body. By default, we consider the following to be pagination keywords: `after`, `before`, `cursor`, `offset`, `page`, and `start`.\n\nYou can provide custom pagination keywords using `pagination.keywords`.\n\n::: code-group\n\n```js [extend]\nimport { defaultPaginationKeywords } from '@hey-api/openapi-ts';\n\nexport default {\n  input: 'hey-api/backend', // sign up at app.heyapi.dev\n  output: 'src/client',\n  parser: {\n    pagination: {\n      keywords: [\n        ...defaultPaginationKeywords, // [!code ++]\n        'extra', // [!code ++]\n        'pagination', // [!code ++]\n        'keywords', // [!code ++]\n      ],\n    },\n  },\n};\n```\n\n```js [override]\nexport default {\n  input: 'hey-api/backend', // sign up at app.heyapi.dev\n  output: 'src/client',\n  parser: {\n    pagination: {\n      keywords: [\n        'custom', // [!code ++]\n        'pagination', // [!code ++]\n        'keywords', // [!code ++]\n      ],\n    },\n  },\n};\n```\n\n:::\n\n## Hooks\n\nHooks affect runtime behavior but aren't tied to any single plugin. They can be configured globally via `hooks` or per plugin through the `~hooks` property.\n\n::: code-group\n\n```js [parser]\nexport default {\n  input: 'hey-api/backend', // sign up at app.heyapi.dev\n  output: 'src/client',\n  parser: {\n    hooks: {}, // configure global hooks // [!code ++]\n  },\n};\n```\n\n```js [plugin]\nexport default {\n  input: 'hey-api/backend', // sign up at app.heyapi.dev\n  output: 'src/client',\n  plugins: [\n    {\n      name: '@tanstack/react-query',\n      '~hooks': {}, // configure plugin hooks // [!code ++]\n    },\n  ],\n};\n```\n\n:::\n\nWe always use the first hook that returns a value. If a hook returns no value, we fall back to less specific hooks until one does.\n\n### Operations {#hooks-operations}\n\nEach operation has a list of classifiers that can include `query`, `mutation`, both, or none. Plugins may use these values to decide whether to generate specific output. For example, you usually don't want to generate [TanStack Query options](/openapi-ts/plugins/tanstack-query#queries) for PATCH operations.\n\n#### Query operations {#hooks-query-operations}\n\nBy default, GET operations are classified as `query` operations.\n\n#### Mutation operations {#hooks-mutation-operations}\n\nBy default, DELETE, PATCH, POST, and PUT operations are classified as `mutation` operations.\n\n#### Example: POST search query\n\nImagine your API has a POST `/search` endpoint that accepts a large payload. By default, it's classified as a `mutation`, but in practice it behaves like a `query`, and your [state management](/openapi-ts/state-management) plugin should generate query hooks.\n\nYou can achieve this by classifying the operation as `query` in a matcher.\n\n::: code-group\n\n<!-- prettier-ignore-start -->\n```js [isQuery]\nexport default {\n  input: 'hey-api/backend', // sign up at app.heyapi.dev\n  output: 'src/client',\n  parser: {\n    hooks: {\n      operations: {\n        isQuery: (op) => {\n          if (op.method === 'post' && op.path === '/search') { // [!code ++]\n            return true; // [!code ++]\n          } // [!code ++]\n        },\n      },\n    },\n  },\n};\n```\n<!-- prettier-ignore-end -->\n<!-- prettier-ignore-start -->\n```js [getKind]\nexport default {\n  input: 'hey-api/backend', // sign up at app.heyapi.dev\n  output: 'src/client',\n  parser: {\n    hooks: {\n      operations: {\n        getKind: (op) => {\n          if (op.method === 'post' && op.path === '/search') { // [!code ++]\n            return ['query']; // [!code ++]\n          } // [!code ++]\n        },\n      },\n    },\n  },\n};\n```\n<!-- prettier-ignore-end -->\n\n:::\n\n### Symbols {#hooks-symbols}\n\nEach symbol can have a placement function deciding its output location.\n\n#### Example: Alphabetic sort\n\nWhile we work on a better example, let's imagine a world where it's desirable to place every symbol in a file named after its initial letter. For example, a function named `Foo` should end up in the file `f.ts`.\n\nYou can achieve this by using the symbol's name.\n\n<!-- prettier-ignore-start -->\n```js [getKind]\nexport default {\n  input: 'hey-api/backend', // sign up at app.heyapi.dev\n  output: 'src/client',\n  parser: {\n    hooks: {\n      symbols: {\n        getFilePath: (symbol) => { // [!code ++]\n          if (symbol.name) { // [!code ++]\n            return symbol.name[0]?.toLowerCase(); // [!code ++]\n          } // [!code ++]\n        }, // [!code ++]\n      },\n    },\n  },\n};\n```\n<!-- prettier-ignore-end -->\n\nMost plugins expose configuration options that allow you to rename many of the generated symbols. If you need even more control, use the `getName()` hook.\n\n#### Example: Enum naming\n\nBy default, generated enums use the same name for both the type and the runtime value.\n\n::: code-group\n\n```ts [example]\nexport const Flags = {\n  ALPHA: 'alpha',\n  BETA: 'beta',\n} as const;\n\nexport type Flags = (typeof Flags)[keyof typeof Flags];\n```\n\n```js [config]\nexport default {\n  input: 'hey-api/backend', // sign up at app.heyapi.dev\n  output: 'src/client',\n  plugins: [\n    {\n      enums: 'javascript',\n      name: '@hey-api/typescript',\n    },\n  ],\n};\n```\n\n:::\n\nWhile this code works perfectly fine due to TypeScript's declaration merging, let's say we want to use a different name for the type. We can accomplish this with the `getName()` hook.\n\n::: code-group\n\n```ts [example]\nexport const Flags = {\n  ALPHA: 'alpha',\n  BETA: 'beta',\n} as const;\n\nexport type FlagsType = (typeof Flags)[keyof typeof Flags]; // [!code ++]\n```\n\n<!-- prettier-ignore-start -->\n```js [config]\nexport default {\n  input: 'hey-api/backend', // sign up at app.heyapi.dev\n  output: 'src/client',\n  plugins: [\n    {\n      enums: 'javascript',\n      name: '@hey-api/typescript',\n      '~hooks': {\n        symbols: {\n          getName({ meta, name, schema }) { // [!code ++]\n            if (schema?.type === 'enum' && meta.category === 'type') { // [!code ++]\n              return `${name}Type`; // [!code ++]\n            } // [!code ++]\n          }, // [!code ++]\n        },\n      },\n    },\n  ],\n};\n```\n<!-- prettier-ignore-end -->\n\n:::\n\n<!--@include: ../../partials/examples.md-->\n<!--@include: ../../partials/sponsors.md-->\n"
  },
  {
    "path": "docs/openapi-ts/configuration.md",
    "content": "---\ntitle: Configuration\ndescription: Configure @hey-api/openapi-ts.\n---\n\n# Configuration\n\n`@hey-api/openapi-ts` supports loading configuration from any file inside your project root folder supported by [jiti loader](https://github.com/unjs/c12?tab=readme-ov-file#-features). Below are the most common file formats.\n\n::: code-group\n\n```js [openapi-ts.config.ts]\nimport { defineConfig } from '@hey-api/openapi-ts';\n\nexport default defineConfig({\n  input: 'hey-api/backend', // sign up at app.heyapi.dev\n  output: 'src/client',\n});\n```\n\n```js [openapi-ts.config.cjs]\n/** @type {import('@hey-api/openapi-ts').UserConfig} */\nmodule.exports = {\n  input: 'hey-api/backend', // sign up at app.heyapi.dev\n  output: 'src/client',\n};\n```\n\n```js [openapi-ts.config.mjs]\n/** @type {import('@hey-api/openapi-ts').UserConfig} */\nexport default {\n  input: 'hey-api/backend', // sign up at app.heyapi.dev\n  output: 'src/client',\n};\n```\n\n:::\n\nAlternatively, you can use `openapi-ts.config.js` and configure the export statement depending on your project setup.\n\n## Input\n\nYou must provide an input so we can load your OpenAPI specification.\n\nThe input can be a string path, URL, [API registry](/openapi-ts/configuration/input#api-registry) shorthand, an object containing any of these, or an object representing an OpenAPI specification. Hey API supports all valid OpenAPI versions and file formats.\n\nYou can learn more on the [Input](/openapi-ts/configuration/input) page.\n\n::: code-group\n\n```js [path]\nexport default {\n  input: './path/to/openapi.json', // [!code ++]\n};\n```\n\n```js [url]\nexport default {\n  input: 'https://get.heyapi.dev/hey-api/backend', // sign up at app.heyapi.dev // [!code ++]\n};\n```\n\n```js [registry]\nexport default {\n  input: 'hey-api/backend', // sign up at app.heyapi.dev // [!code ++]\n};\n```\n\n<!-- prettier-ignore-start -->\n```js [object]\nexport default {\n  input: { // [!code ++]\n    path: 'hey-api/backend', // sign up at app.heyapi.dev // [!code ++]\n    // ...other options // [!code ++]\n  }, // [!code ++]\n};\n```\n<!-- prettier-ignore-end -->\n<!-- prettier-ignore-start -->\n```js [spec]\nexport default {\n  input: { // [!code ++]\n    openapi: '3.1.1', // [!code ++]\n    // ...rest of your spec // [!code ++]\n  }, // [!code ++]\n};\n```\n<!-- prettier-ignore-end -->\n\n:::\n\n::: info\nIf you use an HTTPS URL with a self-signed certificate in development, you will need to set [`NODE_TLS_REJECT_UNAUTHORIZED=0`](https://github.com/hey-api/openapi-ts/issues/276#issuecomment-2043143501) in your environment.\n:::\n\n## Output\n\nYou must set the output so we know where to generate your files. It can be a path to the destination folder or an object containing the destination folder path and optional settings.\n\nYou can learn more on the [Output](/openapi-ts/configuration/output) page.\n\n::: code-group\n\n```js [path]\nexport default {\n  input: 'hey-api/backend', // sign up at app.heyapi.dev\n  output: 'src/client', // [!code ++]\n};\n```\n\n<!-- prettier-ignore-start -->\n```js [object]\nexport default {\n  input: 'hey-api/backend', // sign up at app.heyapi.dev\n  output: { // [!code ++]\n    path: 'src/client', // [!code ++]\n    // ...other options // [!code ++]\n  }, // [!code ++]\n};\n```\n<!-- prettier-ignore-end -->\n\n:::\n\n::: tip\nYou should treat the output folder as a dependency. Do not directly modify its contents as your changes might be erased when you run `@hey-api/openapi-ts` again.\n:::\n\n## Parser\n\nWe parse your input before making it available to plugins. Configuring the parser is optional, but it provides an ideal opportunity to modify or validate your input as needed.\n\nYou can learn more on the [Parser](/openapi-ts/configuration/parser) page.\n\n## Plugins\n\nPlugins are responsible for generating artifacts from your input. By default, Hey API will generate TypeScript interfaces and SDK from your OpenAPI specification. You can add, remove, or customize any of the plugins. In fact, we highly encourage you to do so!\n\nYou can learn more on the [Output](/openapi-ts/output) page.\n\n## Advanced\n\nMore complex configuration scenarios can be handled by providing an array of inputs, outputs, or configurations.\n\n### Multiple jobs\n\nThroughout this documentation, we generally reference single job configurations. However, you can easily run multiple jobs by providing an array of configuration objects.\n\n::: code-group\n\n```js [config]\nexport default [\n  {\n    input: 'foo.yaml',\n    output: 'src/foo',\n  },\n  {\n    input: 'bar.yaml',\n    output: 'src/bar',\n  },\n];\n```\n\n```txt [example]\nsrc/\n├── foo/\n│ ├── client/\n│ ├── core/\n│ ├── client.gen.ts\n│ ├── index.ts\n│ ├── sdk.gen.ts\n│ └── types.gen.ts\n└── bar/\n  ├── client/\n  ├── core/\n  ├── client.gen.ts\n  ├── index.ts\n  ├── sdk.gen.ts\n  └── types.gen.ts\n```\n\n:::\n\n### Job matrix\n\nReusing configuration across multiple jobs is possible by defining a job matrix. You can create a job matrix by providing `input` and `output` arrays of matching length.\n\n::: code-group\n\n```js [config]\nexport default {\n  input: ['foo.yaml', 'bar.yaml'],\n  output: ['src/foo', 'src/bar'],\n};\n```\n\n```txt [example]\nsrc/\n├── foo/\n│ ├── client/\n│ ├── core/\n│ ├── client.gen.ts\n│ ├── index.ts\n│ ├── sdk.gen.ts\n│ └── types.gen.ts\n└── bar/\n  ├── client/\n  ├── core/\n  ├── client.gen.ts\n  ├── index.ts\n  ├── sdk.gen.ts\n  └── types.gen.ts\n```\n\n:::\n\n### Merging inputs\n\nYou can merge inputs by defining multiple inputs and a single output.\n\n::: code-group\n\n```js [config]\nexport default {\n  input: ['foo.yaml', 'bar.yaml'],\n  output: 'src/client',\n};\n```\n\n```txt [example]\nsrc/\n└── client/\n  ├── client/\n  ├── core/\n  ├── client.gen.ts\n  ├── index.ts\n  ├── sdk.gen.ts\n  └── types.gen.ts\n```\n\n:::\n\n## API\n\nYou can view the complete list of options in the [UserConfig](https://github.com/hey-api/openapi-ts/blob/main/packages/openapi-ts/src/config/types.ts) interface.\n\n<!--@include: ../partials/examples.md-->\n<!--@include: ../partials/sponsors.md-->\n"
  },
  {
    "path": "docs/openapi-ts/core.md",
    "content": "---\ntitle: Core Plugins\ndescription: Learn about the core plugins provided by Hey API.\n---\n\n# Core\n\nApart from being responsible for the default output, core plugins are the foundation for other plugins. Instead of creating their own primitives, other plugins can reuse the artifacts from core plugins. This results in a smaller output size and a better user experience.\n\n## Options\n\nHey API provides the following core plugins.\n\n- [TypeScript](/openapi-ts/plugins/typescript)\n- [SDK](/openapi-ts/plugins/sdk)\n- [Transformers](/openapi-ts/plugins/transformers)\n- [Schemas](/openapi-ts/plugins/schemas)\n\nNeed another core plugin? Let us know your interest by [opening an issue](https://github.com/hey-api/openapi-ts/issues).\n\n<!--@include: ../partials/examples.md-->\n<!--@include: ../partials/sponsors.md-->\n"
  },
  {
    "path": "docs/openapi-ts/get-started.md",
    "content": "---\ntitle: Get Started\ndescription: Get started with @hey-api/openapi-ts.\n---\n\n<script setup lang=\"ts\">\nimport { embedProject } from '../embed'\n</script>\n\n# Get Started\n\n[@hey-api/openapi-ts](https://github.com/hey-api/openapi-ts) generates TypeScript code from OpenAPI specifications. Point it at your spec, pick your plugins, and get production-ready code in seconds.\n\nUsed by companies like Vercel, OpenCode, and PayPal.\n\n> _“OpenAPI codegen that just works.”_\n>\n> <sub>— Guillermo Rauch, CEO of Vercel</sub>\n\n### Demo\n\n<button class=\"buttonLink\" @click=\"(event) => embedProject('hey-api-example')(event)\">\nLaunch demo\n</button>\n\n## Features\n\n- production-ready code that compiles\n- runs in any Node.js 20+ environment\n- accepts any OpenAPI specification\n- core plugins for SDKs, types, and schemas\n- HTTP clients for Fetch API, Angular, Axios, Next.js, Nuxt, and more\n- 20+ plugins to reduce third-party boilerplate\n- highly customizable via plugins\n- [sync with Hey API Registry](/openapi-ts/integrations) for spec management\n\n## Quick Start\n\nThe fastest way to use `@hey-api/openapi-ts` is via npx\n\n```sh\nnpx @hey-api/openapi-ts -i hey-api/backend -o src/client\n```\n\nCongratulations on creating your first client! 🎉 You can learn more about the generated files on the [Output](/openapi-ts/output) page.\n\n## Installation\n\nYou can download `@hey-api/openapi-ts` from npm using your favorite package manager.\n\n::: code-group\n\n```sh [npm]\nnpm install @hey-api/openapi-ts -D -E\n```\n\n```sh [pnpm]\npnpm add @hey-api/openapi-ts -D -E\n```\n\n```sh [yarn]\nyarn add @hey-api/openapi-ts -D -E\n```\n\n```sh [bun]\nbun add @hey-api/openapi-ts -D -E\n```\n\n:::\n\n### Versioning\n\nThis package is in [initial development](https://semver.org/#spec-item-4). Please pin an exact version so you can safely upgrade when you're ready.\n\nWe publish [migration notes](/openapi-ts/migrating) for every breaking release. You might not be impacted by a breaking change if you don't use the affected features.\n\n## Usage\n\n### CLI\n\nMost people run `@hey-api/openapi-ts` via CLI. To do that, add a script to your `package.json` file which will make `openapi-ts` executable through script.\n\n```json\n\"scripts\": {\n  \"openapi-ts\": \"openapi-ts\"\n}\n```\n\nThe above script can be executed by running `npm run openapi-ts` or equivalent command in other package managers. Next, we will create a [configuration](/openapi-ts/configuration) file and move our options from Quick Start to it.\n\n### Node.js\n\nYou can also generate output programmatically by calling `createClient()` in a JavaScript/TypeScript file.\n\n::: code-group\n\n```ts [script.ts]\nimport { createClient } from '@hey-api/openapi-ts';\n\ncreateClient({\n  input: 'hey-api/backend', // sign up at app.heyapi.dev\n  output: 'src/client',\n});\n```\n\n:::\n\n### Configuration\n\nIt's a good practice to extract your configuration into a separate file. Learn how to do that and discover available options on the [Configuration](/openapi-ts/configuration) page.\n\n<!--@include: ../partials/examples.md-->\n<!--@include: ../partials/sponsors.md-->\n"
  },
  {
    "path": "docs/openapi-ts/integrations.md",
    "content": "---\ntitle: Hey API Platform\ndescription: Automate your client generation with our OpenAPI specifications storage.\n---\n\n# Hey API Platform\n\n::: warning\nThis feature is in development! :tada: Try it out and provide feedback on [GitHub](https://github.com/orgs/hey-api/discussions/1773).\n:::\n\nYou can automate your client generation with Hey API Platform thanks to reproducible builds. Create dependency links between your clients and APIs, and watch the magic unfold. It's completely language and codegen agnostic.\n\n## Features\n\n- API version history\n- real-time updates\n- reproducible builds\n- language and codegen agnostic (TypeScript/Python/Go/Java/etc codegens are welcome)\n\n## Upload Specifications\n\nBefore you can generate clients, you must publish your OpenAPI specifications to Hey API.\n\n### Prerequisites\n\n1. Create a **free account** with [Hey API](https://app.heyapi.dev).\n1. Create a new **organization** and **project** for your API provider. We recommend your naming matches your GitHub structure as it will be referenced by API clients. For example, we are using **hey-api/backend** for the platform.\n1. Inside your project, go to _Integrations_ > _APIs_ and generate an **API key**. Keep this value secret, it will be used to upload files.\n\n### Add GitHub CI workflow\n\nOnce you have your API key, you can start uploading OpenAPI specifications on every API build. We'll use our [GitHub Action](https://github.com/marketplace/actions/upload-openapi-spec-by-hey-api), but you can also make the API call manually if you're not using GitHub.\n\nCreate a new GitHub workflow or add an upload step to an existing workflow inside your API codebase. The example below will upload your OpenAPI specification to Hey API on every pull request and push to the `main` branch.\n\n```yaml\nname: Upload OpenAPI Specification\n\non:\n  push:\n    branches:\n      - main\n  pull_request:\n\njobs:\n  upload-openapi-spec:\n    runs-on: ubuntu-latest\n    steps:\n      - name: Checkout\n        uses: actions/checkout@v4\n\n      - name: Upload OpenAPI spec\n        uses: hey-api/upload-openapi-spec@v1.3.0\n        with:\n          path-to-file: path/to/openapi.json\n          tags: optional,custom,tags\n        env:\n          API_KEY: ${{ secrets.HEY_API_TOKEN }}\n          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}\n```\n\n### Inputs\n\nTo successfully upload an OpenAPI specification, you need to provide the following inputs (see `with` in the example above)\n\n#### `path-to-file`\n\nA relative path to your OpenAPI file within the repository. Note that you might need an additional step in your GitHub workflow to generate this file (see [FastAPI example](https://fastapi.tiangolo.com/how-to/extending-openapi/#generate-the-openapi-schema)).\n\n#### `tags` (optional)\n\nA comma-separated string value representing any custom tags you wish to add to your OpenAPI specification.\n\n### Environment Variables\n\nIn addition to the required `path-to-file` input, you must provide the following environment variables.\n\n#### `API_KEY`\n\nThis is the project API key you obtained from [Hey API](https://app.heyapi.dev).\n\n::: warning\nPersonal API keys can't be used to upload specifications.\n:::\n\n#### `GITHUB_TOKEN`\n\nThis variable will be available inside your workflow by default. It's used to\nfetch information about your repository, i.e. default branch.\n\n## Generate Clients\n\nYou can generate clients from public projects or any private projects you can access. The setup is largely the same, you want to configure the input path used by your codegen.\n\n::: code-group\n\n```sh [Hey API]\nnpx @hey-api/openapi-ts -i hey-api/backend -o src/client\n```\n\n```sh [OpenAPI TypeScript]\nnpx openapi-typescript \\\n  https://get.heyapi.dev/hey-api/backend \\\n  -o schema.ts\n```\n\n```sh [Orval]\nnpx orval \\\n  --input https://get.heyapi.dev/hey-api/backend \\\n  --output ./src/client.ts\n```\n\n```sh [Other]\nother-cli \\\n  --input https://get.heyapi.dev/hey-api/backend \\  # [!code ++]\n  --output refer/to/other/tools/docs\n```\n\n:::\n\nBy default, we preserve the current behavior and return the latest specification. Let's have a closer look at the input path and change that.\n\n## Get API\n\nAs you can deduce from the examples above, the default command for fetching OpenAPI specifications looks like this.\n\n```\nhttps://get.heyapi.dev/<organization>/<project>\n```\n\nIf you created an organization `foo` with project `bar` earlier, your URL would look like this.\n\n```\nhttps://get.heyapi.dev/foo/bar\n```\n\n### Auth\n\nProjects are private by default, you will need to be authenticated to download OpenAPI specifications. We recommend using [project API keys](#prerequisites) in CI workflows and [personal API keys](https://app.heyapi.dev/settings/user/apis) for local development.\n\nOnce you have your API key, you can authenticate the request using the `Authorization` header or `api_key` query parameter.\n\n```\nhttps://get.heyapi.dev/foo/bar?api_key=<my_api_key>\n```\n\nCongratulations on fetching your first OpenAPI specification! 🎉\n\n### Filters\n\nThe default behavior returns the last uploaded specification. This might not be what you want. You can use a range of filters to narrow down the possible specifications, or pin your builds to an exact version.\n\n#### `branch`\n\nYou can fetch the last build from branch by providing the `branch` query parameter.\n\n```\nhttps://get.heyapi.dev/foo/bar?branch=production\n```\n\n#### `commit_sha`\n\nYou can fetch an exact specification by providing the `commit_sha` query parameter. This will always return the same file.\n\n```\nhttps://get.heyapi.dev/foo/bar?commit_sha=0eb34c2024841ce95620f3ec02a2fea164ea4e9d\n```\n\n#### `tags`\n\nIf you're tagging your specifications with [custom tags](#tags-optional), you can use them to filter the results. When you provide multiple tags, only the first match will be returned.\n\n```\nhttps://get.heyapi.dev/foo/bar?tags=optional,custom,tags\n```\n\n#### `version`\n\nEvery OpenAPI document contains a required version field. You can use this value to fetch the last uploaded specification matching the value.\n\n```\nhttps://get.heyapi.dev/foo/bar?version=1.0.0\n```\n\n## Feedback\n\nWe'd love your feedback! You can contact us on social media (search Hey API), [email](mailto:lubos@heyapi.dev), or [GitHub](https://github.com/orgs/hey-api/discussions/1773).\n\n## Pricing\n\nThe platform is currently in beta with our focus being on delivering a great experience. We plan to announce pricing once we have gathered enough data around usage patterns. However, we can guarantee there will always be a free plan available. Our mission to bring the finest tooling for working with APIs remains unchanged.\n\n<!--@include: ../partials/sponsors.md-->\n"
  },
  {
    "path": "docs/openapi-ts/license.md",
    "content": "---\ntitle: License\ndescription: License FAQ.\n---\n\n# License\n\n### MIT License\n\nCopyright (c) Hey API\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n"
  },
  {
    "path": "docs/openapi-ts/migrating.md",
    "content": "---\ntitle: Migrating\ndescription: Migrating to @hey-api/openapi-ts.\n---\n\n# Migrating\n\nWhile we try to avoid breaking changes, sometimes it's unavoidable in order to offer you the latest features. This page lists changes that require updates to your code. If you run into a problem with migration, please [open an issue](https://github.com/hey-api/openapi-ts/issues).\n\n## v0.93.0\n\n### Removed resolver node\n\nValibot and Zod plugins no longer expose the `enum.nodes.nullable` node. Both plugins were refactored so that nullable values are handled outside of resolvers.\n\n## v0.92.0\n\n### Updated Symbol interface\n\nThe `exportFrom` property has been replaced with the `getExportFromFilePath()` function. This allows you to dynamically determine export paths based on symbol properties. This is a low-level feature, so you're most likely unaffected.\n\n## v0.91.0\n\n### Removed CommonJS (CJS) support\n\n`@hey-api/openapi-ts` is now ESM-only. This change simplifies the codebase, improves tree-shaking, and enables better integration with modern bundlers and TypeScript tooling.\n\nCommonJS entry points (`require()`, `module.exports`) are no longer supported. If you are in a CJS environment, you can still load the package dynamically using `import()` like:\n\n```js\nconst { defineConfig } = await import('@hey-api/openapi-ts');\n```\n\nIf you have previously written:\n\n```js\nconst { defineConfig } = require('@hey-api/openapi-ts');\n```\n\nMigrate by updating your static imports:\n\n```js\nimport { defineConfig } from '@hey-api/openapi-ts';\n```\n\nIf your environment cannot use ESM, pin to a previous version.\n\n## v0.90.0\n\n### Resolvers API\n\nThe [Resolvers API](/openapi-ts/plugins/concepts/resolvers) has been simplified and expanded to provide a more consistent behavior across plugins. You can view a few common examples on the [Resolvers](/openapi-ts/plugins/concepts/resolvers) page.\n\n### Structure API\n\nThe [SDK plugin](/openapi-ts/plugins/sdk) and [Angular plugin](/openapi-ts/plugins/angular) now implement the Structure API, enabling more complex structures and fixing several known issues.\n\nSome Structure APIs are incompatible with the previous configuration, most notably the `methodNameBuilder` function, which accepted the operation object as an argument. You can read the [SDK Output](/openapi-ts/plugins/sdk#output) section to familiarize yourself with the Structure API.\n\nPlease [open an issue](https://github.com/hey-api/openapi-ts/issues) if you're unable to migrate your configuration to the new syntax.\n\n## v0.89.0\n\n### Prefer named exports\n\nThis release changes the default for `index.ts` to prefer named exports. Named exports may lead to better IDE and bundler performance compared to asterisk (`*`) as your tooling doesn't have to inspect the underlying module to discover exports.\n\nWhile this change is merely cosmetic, you can set `output.preferExportAll` to `true` if you prefer to use the asterisk.\n\n```js\nexport default {\n  input: 'hey-api/backend', // sign up at app.heyapi.dev\n  output: {\n    path: 'src/client',\n    preferExportAll: true, // [!code ++]\n  },\n};\n```\n\n### Removed `symbol:setValue:*` events\n\nThese events have been removed in favor of `node:set:*` events.\n\n## v0.88.0\n\n### Removed `compiler` and `tsc` exports\n\nThis release removes the `compiler` utility functions. Instead, it introduces a new TypeScript DSL exposed under the `$` symbol. All plugins now use this interface, so you may notice slight changes in the generated output.\n\n## v0.87.0\n\n### Removed legacy clients\n\nThis release removes support for legacy clients and plugins. Please migrate to the new clients if you haven't done so yet. If you're unable to do so due to a missing feature, let us know on [GitHub](https://github.com/hey-api/openapi-ts/issues).\n\n## v0.86.0\n\n### Removed Node 18 support\n\nThis release bumps the minimum required Node version to 20.19.\n\n## v0.85.0\n\n### Updated `output` options\n\nWe made the `output` configuration more consistent by using `null` to represent disabled options. This change does not affect boolean options.\n\n```js\nexport default {\n  input: 'hey-api/backend', // sign up at app.heyapi.dev\n  output: {\n    format: false, // [!code --]\n    format: null, // [!code ++]\n    lint: false, // [!code --]\n    lint: null, // [!code ++]\n    path: 'src/client',\n    tsConfigPath: 'off', // [!code --]\n    tsConfigPath: null, // [!code ++]\n  },\n};\n```\n\n### Updated Pinia Colada query options\n\nPinia Colada query options now use `defineQueryOptions` to improve reactivity support. Instead of calling the query options function, you can use one of the following approaches.\n\n::: code-group\n\n```ts [no params]\nuseQuery(getPetsQuery);\n```\n\n```ts [constant]\nuseQuery(getPetByIdQuery, () => ({\n  path: {\n    petId: 1,\n  },\n}));\n```\n\n```ts [reactive]\nconst petId = ref<number | null>(1);\n\nuseQuery(getPetByIdQuery, () => ({\n  path: {\n    petId: petId.value,\n  },\n}));\n```\n\n```ts [properties]\nconst petId = ref<number | null>(1);\n\nuseQuery(() => ({\n  ...getPetByIdQuery({\n    path: { petId: petId.value as number },\n  }),\n  enabled: () => petId.value != null,\n}));\n```\n\n:::\n\n## v0.84.0\n\n### Symbol API\n\nThis release improves the Symbol API, which adds the capability to place symbols in arbitrary files. We preserved the previous output structure for all plugins except Angular.\n\nYou can preserve the previous Angular output by writing your own [placement function](/openapi-ts/configuration/parser#hooks-symbols).\n\n### TypeScript renderer\n\nWe ship a dedicated TypeScript renderer for `.ts` files. This release improves the renderer's ability to group and sort imported modules, resulting in a more polished output.\n\n### Removed `output` plugin option\n\nDue to the Symbol API release, this option has been removed from the Plugin API.\n\n## v0.83.0\n\n### Symbol API\n\nThis release adds the Symbol API, which significantly reduces the risk of naming collisions. While the generated output should only include formatting changes, this feature introduces breaking changes to the Plugin API that affect custom plugins.\n\nWe will update the [custom plugin guide](/openapi-ts/plugins/custom) once the Plugin API becomes more stable.\n\n### Removed `groupByTag` Pinia Colada option\n\nThis option has been removed to provide a more consistent API across plugins. We plan to bring it back in a future release.\n\n## v0.82.0\n\n### Hooks API\n\nThis release adds the [Hooks API](/openapi-ts/configuration/parser#hooks), giving you granular control over which operations generate queries and mutations. As a result, we tightened the previous behavior and POST operations no longer generate queries by default. To preserve the old behavior, add a custom matcher.\n\n```js\nexport default {\n  input: 'hey-api/backend', // sign up at app.heyapi.dev\n  output: 'src/client',\n  parser: {\n    hooks: {\n      operations: {\n        isQuery: (op) => (op.method === 'post' ? true : undefined), // [!code ++]\n      },\n    },\n  },\n};\n```\n\n## v0.81.0\n\n### Server-Sent Events (SSE)\n\nThis release adds support for server-sent events (SSE). Instead of treating `text/event-stream` content types as regular HTTP methods, we now generate SSE streams. In practice, you will want to update your affected endpoints to process streamed events.\n\n::: code-group\n\n```js [before]\nconst { data } = await foo();\nconsole.log(data.type);\n```\n\n```js [after]\nconst { stream } = await foo();\nfor await (const event of stream) {\n  console.log(event.type);\n}\n```\n\n:::\n\n## v0.80.0\n\n### Added Zod 4 and Zod Mini\n\nThis release adds support for Zod 4 and Zod Mini. By default, the `zod` plugin will generate output for Zod 4. If you want to preserve the previous output for Zod 3 or use Zod Mini, set `compatibilityVersion` to `3` or `mini`.\n\n::: code-group\n\n```js [Zod 3]\nexport default {\n  input: 'hey-api/backend', // sign up at app.heyapi.dev\n  output: 'src/client',\n  plugins: [\n    // ...other plugins\n    {\n      name: 'zod',\n      compatibilityVersion: 3, // [!code ++]\n    },\n  ],\n};\n```\n\n```js [Zod Mini]\nexport default {\n  input: 'hey-api/backend', // sign up at app.heyapi.dev\n  output: 'src/client',\n  plugins: [\n    // ...other plugins\n    {\n      name: 'zod',\n      compatibilityVersion: 'mini', // [!code ++]\n    },\n  ],\n};\n```\n\n:::\n\n## v0.79.0\n\n### Removed `typescript+namespace` enums mode\n\nDue to a simpler TypeScript plugin implementation, the `typescript+namespace` enums mode is no longer necessary. This mode was used in the past to group inline enums under the same namespace. With the latest changes, this behavior is no longer supported. You can either choose to ignore inline enums (default), or use the `enums` transform (added in v0.78.0) to convert them into reusable components which will get exported as usual.\n\n## v0.78.0\n\n### Added `parser` options\n\nPreviously, `@hey-api/typescript` would generate correct types, but the validator plugins would have to re-implement the same logic or generate schemas that didn't match the generated types.\n\nSince neither option was ideal, this release adds a dedicated place for `parser` options. Parser is responsible for preparing the input so plugins can generate more accurate output with less effort.\n\nYou can learn more about configuring parser on the [Parser](/openapi-ts/configuration/parser) page.\n\n### Moved `input` options\n\nThe following options were moved to the new `parser` group.\n\n- `input.filters` moved to `parser.filters`\n- `input.pagination` moved to `parser.pagination`\n- `input.patch` moved to `parser.patch`\n- `input.validate_EXPERIMENTAL` moved to `parser.validate_EXPERIMENTAL`\n\n### Updated `typescript` options\n\nThe following options were renamed.\n\n- `enumsCase` moved to `enums.case`\n- `enumsConstantsIgnoreNull` moved to `enums.constantsIgnoreNull`\n\n### Moved `typescript` options\n\nThe following options were moved to the new `parser` group.\n\n- `exportInlineEnums` moved to `parser.transforms.enums`\n- `readOnlyWriteOnlyBehavior` moved to `parser.transforms.readWrite.enabled`\n- `readableNameBuilder` moved to `parser.transforms.readWrite.responses.name`\n- `writableNameBuilder` moved to `parser.transforms.readWrite.requests.name`\n\n### Updated `readWrite.responses` name\n\nAdditionally, the naming pattern for response schemas has changed from `{name}Readable` to `{name}`. This is to prevent your code from breaking by default when using a schema that gets updated with a write-only field.\n\n## v0.77.0\n\n### Updated `sdk.validator` option\n\nClients can now validate both request and response data. As a result, passing a boolean or string to `validator` will control both of these options. To preserve the previous behavior, set `validator.request` to `false` and `validator.response` to your previous configuration.\n\n<!-- prettier-ignore-start -->\n```js\nexport default {\n  input: 'hey-api/backend', // sign up at app.heyapi.dev\n  output: 'src/client',\n  plugins: [\n    // ...other plugins\n    {\n      name: '@hey-api/sdk',\n      validator: true, // [!code --]\n      validator: { // [!code ++]\n        request: false, // [!code ++]\n        response: true, // [!code ++]\n      }, // [!code ++]\n    },\n  ],\n};\n```\n<!-- prettier-ignore-end -->\n\n### Updated Plugin API\n\nPlease refer to the [custom plugin](/openapi-ts/plugins/custom) tutorial for the latest guide.\n\n## v0.76.0\n\n### Single Valibot schema per request\n\nPreviously, we generated a separate schema for each endpoint parameter and request body. In v0.76.0, a single request schema is generated for the whole endpoint. It may contain a request body, parameters, and headers.\n\n```ts\nconst vData = v.object({\n  body: v.optional(\n    v.object({\n      foo: v.optional(v.string()),\n      bar: v.optional(v.union([v.number(), v.null()])),\n    }),\n  ),\n  headers: v.optional(v.never()),\n  path: v.object({\n    baz: v.string(),\n  }),\n  query: v.optional(v.never()),\n});\n```\n\nIf you need to access individual fields, you can do so using the [`.entries`](https://valibot.dev/api/object/) API. For example, we can get the request body schema with `vData.entries.body`.\n\n## v0.75.0\n\n### Updated TanStack Query options\n\nThe TanStack Query plugin options have been expanded to support more naming and casing patterns. As a result, the following options have been renamed.\n\n- `queryOptionsNameBuilder` renamed to `queryOptions`\n- `infiniteQueryOptionsNameBuilder` renamed to `infiniteQueryOptions`\n- `mutationOptionsNameBuilder` renamed to `mutationOptions`\n- `queryKeyNameBuilder` renamed to `queryKeys`\n- `infiniteQueryKeyNameBuilder` renamed to `infiniteQueryKeys`\n\n### Added `plugin.forEach()` method\n\nThis method replaces the `.subscribe()` method. Additionally, `.forEach()` is executed immediately, which means we don't need the `before` and `after` events – simply move your code before and after the `.forEach()` block.\n\n```ts\nplugin.subscribe('operation', (event) => { // [!code --]\n  // do something with event // [!code --]\n}); // [!code --]\nplugin.subscribe('schema', (event) => { // [!code --]\nplugin.forEach('operation', 'schema', (event) => { // [!code ++]\n  // do something with event\n});\n```\n\n## v0.74.0\n\n### Single Zod schema per request\n\nPreviously, we generated a separate schema for each endpoint parameter and request body. In v0.74.0, a single request schema is generated for the whole endpoint. It may contain a request body, parameters, and headers.\n\n```ts\nconst zData = z.object({\n  body: z\n    .object({\n      foo: z.string().optional(),\n      bar: z.union([z.number(), z.null()]).optional(),\n    })\n    .optional(),\n  headers: z.never().optional(),\n  path: z.object({\n    baz: z.string(),\n  }),\n  query: z.never().optional(),\n});\n```\n\nIf you need to access individual fields, you can do so using the [`.shape`](https://zod.dev/api?id=shape) API. For example, we can get the request body schema with `zData.shape.body`.\n\n## v0.73.0\n\n### Bundle `@hey-api/client-*` plugins\n\nIn previous releases, you had to install a separate client package to generate a fully working output, e.g., `npm install @hey-api/client-fetch`. This created a few challenges: getting started was slower, upgrading was sometimes painful, and bundling too. Beginning with v0.73.0, all Hey API clients are bundled by default and don't require installing any additional dependencies. You can remove any installed client packages and re-run `@hey-api/openapi-ts`.\n\n```sh\nnpm uninstall @hey-api/client-fetch\n```\n\n## v0.72.0\n\n### Added `sdk.classStructure` option\n\nWhen generating class-based SDKs, we now try to infer the ideal structure using `operationId` keywords. If you'd like to preserve the previous behavior, set `classStructure` to `off`.\n\n```js\nexport default {\n  input: 'hey-api/backend', // sign up at app.heyapi.dev\n  output: 'src/client',\n  plugins: [\n    // ...other plugins\n    {\n      classStructure: 'off', // [!code ++]\n      name: '@hey-api/sdk',\n    },\n  ],\n};\n```\n\n## v0.71.0\n\n### Renamed `sdk.serviceNameBuilder` option\n\nThis option has been renamed to `sdk.classNameBuilder` to better represent its functionality. Additionally, it's no longer set by default. To preserve the previous behavior, update your configuration.\n\n```js\nexport default {\n  input: 'hey-api/backend', // sign up at app.heyapi.dev\n  output: 'src/client',\n  plugins: [\n    // ...other plugins\n    {\n      classNameBuilder: '{{name}}Service', // [!code ++]\n      name: '@hey-api/sdk',\n      serviceNameBuilder: '{{name}}Service', // [!code --]\n    },\n  ],\n};\n```\n\n## v0.68.0\n\n### Upgraded input filters\n\nInput filters now avoid generating invalid output without requiring you to specify every missing schema as in the previous releases. As part of this release, we changed the way filters are configured and removed the support for regular expressions. Let us know if regular expressions are still useful for you and want to bring them back!\n\n::: code-group\n\n```js [include]\nexport default {\n  input: {\n    // match only the schema named `foo` and `GET` operation for the `/api/v1/foo` path\n    filters: {\n      operations: {\n        include: ['GET /api/v1/foo'], // [!code ++]\n      },\n      schemas: {\n        include: ['foo'], // [!code ++]\n      },\n    },\n    include: '^(#/components/schemas/foo|#/paths/api/v1/foo/get)$', // [!code --]\n    path: 'hey-api/backend', // sign up at app.heyapi.dev\n  },\n  output: 'src/client',\n  plugins: ['@hey-api/client-fetch'],\n};\n```\n\n```js [exclude]\nexport default {\n  input: {\n    // match everything except for the schema named `foo` and `GET` operation for the `/api/v1/foo` path\n    exclude: '^(#/components/schemas/foo|#/paths/api/v1/foo/get)$', // [!code --]\n    filters: {\n      operations: {\n        exclude: ['GET /api/v1/foo'], // [!code ++]\n      },\n      schemas: {\n        exclude: ['foo'], // [!code ++]\n      },\n    },\n    path: 'hey-api/backend', // sign up at app.heyapi.dev\n  },\n  output: 'src/client',\n  plugins: ['@hey-api/client-fetch'],\n};\n```\n\n:::\n\n## v0.67.0\n\n### Respecting `moduleResolution` value in `tsconfig.json`\n\nThis release introduces functionality related to your `tsconfig.json` file. The initial feature properly respects the value of your `moduleResolution` field. If you're using `nodenext`, the relative module paths in your output will be appended with `.js`. To preserve the previous behavior where we never appended `.js` to relative module paths, set `output.tsConfigPath` to `off`.\n\n```js\nexport default {\n  input: 'hey-api/backend', // sign up at app.heyapi.dev\n  output: {\n    path: 'src/client',\n    tsConfigPath: 'off', // [!code ++]\n  },\n};\n```\n\n## v0.66.0\n\n### Read-only and write-only fields\n\nStarting with v0.66.0, `@hey-api/typescript` will generate separate types for payloads and responses if it detects any read-only or write-only fields. To preserve the previous behavior and generate a single type regardless, set `readOnlyWriteOnlyBehavior` to `off`.\n\n```js\nexport default {\n  input: 'hey-api/backend', // sign up at app.heyapi.dev\n  output: 'src/client',\n  plugins: [\n    // ...other plugins\n    {\n      name: '@hey-api/typescript',\n      readOnlyWriteOnlyBehavior: 'off', // [!code ++]\n    },\n  ],\n};\n```\n\n## v0.64.0\n\n### Added `ClientOptions` interface\n\nThe `Config` interface now accepts an optional generic extending `ClientOptions` instead of `boolean` type `ThrowOnError`.\n\n```ts\ntype Foo = Config<false>; // [!code --]\ntype Foo = Config<{ throwOnError: false }>; // [!code ++]\n```\n\n### Added `client.baseUrl` option\n\nYou can use this option to configure the default base URL for the generated client. By default, we will attempt to resolve the first defined server or infer the base URL from the input path. If you'd like to preserve the previous behavior, set `baseUrl` to `false`.\n\n```js\nexport default {\n  input: 'hey-api/backend', // sign up at app.heyapi.dev\n  output: 'src/client',\n  plugins: [\n    {\n      baseUrl: false, // [!code ++]\n      name: '@hey-api/client-fetch',\n    },\n  ],\n};\n```\n\n## v0.63.0\n\n### Client plugins\n\nClients are now plugins generating their own `client.gen.ts` file. There's no migration needed if you're using CLI. If you're using the configuration file, move `client` options to `plugins`.\n\n```js\nexport default {\n  client: '@hey-api/client-fetch', // [!code --]\n  input: 'hey-api/backend', // sign up at app.heyapi.dev\n  output: 'src/client',\n  plugins: ['@hey-api/client-fetch'], // [!code ++]\n};\n```\n\n### Added `client.gen.ts` file\n\nRelated to above, the internal `client` instance previously located in `sdk.gen.ts` is now defined in `client.gen.ts`. If you're importing it in your code, update the import module.\n\n```js\nimport { client } from 'client/sdk.gen'; // [!code --]\nimport { client } from 'client/client.gen'; // [!code ++]\n```\n\n### Moved `sdk.throwOnError` option\n\nThis SDK configuration option has been moved to the client plugins where applicable. Not every client can be configured to throw on error, so it didn't make sense to expose the option when it didn't have any effect.\n\n```js\nexport default {\n  input: 'hey-api/backend', // sign up at app.heyapi.dev\n  output: 'src/client',\n  plugins: [\n    {\n      name: '@hey-api/client-fetch',\n      throwOnError: true, // [!code ++]\n    },\n    {\n      name: '@hey-api/sdk',\n      throwOnError: true, // [!code --]\n    },\n  ],\n};\n```\n\n## v0.62.0\n\n### Changed parser\n\nFormerly known as the experimental parser, this is now the default parser. This change should not impact the generated output's functionality. However, there might be cases where this results in breaking changes due to different handling of certain scenarios. If you need to revert to the legacy parser, set the `experimentalParser` flag to `false`.\n\n```js\nexport default {\n  client: '@hey-api/client-fetch',\n  experimentalParser: false, // [!code ++]\n  input: 'hey-api/backend', // sign up at app.heyapi.dev\n  output: 'src/client',\n};\n```\n\nNote that the legacy parser is no longer supported and will be removed in the v1 release.\n\n## v0.61.0\n\n### Added `auth` option\n\nClient package functions `accessToken` and `apiKey` were replaced with a single `auth` function for fetching auth tokens. If your API supports multiple auth mechanisms, you can use the `auth` argument to return the appropriate token.\n\n```js\nimport { client } from 'client/sdk.gen';\n\nclient.setConfig({\n  accessToken: () => '<my_token>', // [!code --]\n  apiKey: () => '<my_token>', // [!code --]\n  auth: (auth) => '<my_token>', // [!code ++]\n});\n```\n\nDue to conflict with the Axios native `auth` option, we removed support for configuring Axios auth. Please let us know if you require this feature added back.\n\n### Added `watch` option\n\nWhile this is a new feature, supporting it involved replacing the `@apidevtools/json-schema-ref-parser` dependency with our own implementation. Since this was a big change, we're applying caution and marking this as a breaking change.\n\n### Changed `parseAs: 'auto'` behavior\n\nThe Fetch API client will return raw response body as `ReadableStream` when `Content-Type` response header is undefined and `parseAs` is `auto`.\n\n## v0.60.0\n\n### Added `sdk.transformer` option\n\nWhen generating SDKs, you now have to specify `transformer` in order to modify response data. By default, adding `@hey-api/transformers` to your plugins will only produce additional output. To preserve the previous functionality, set `sdk.transformer` to `true`.\n\n```js\nexport default {\n  client: '@hey-api/client-fetch',\n  input: 'hey-api/backend', // sign up at app.heyapi.dev\n  output: 'src/client',\n  plugins: [\n    // ...other plugins\n    {\n      dates: true,\n      name: '@hey-api/transformers',\n    },\n    {\n      name: '@hey-api/sdk',\n      transformer: true, // [!code ++]\n    },\n  ],\n};\n```\n\n## v0.59.0\n\n### Added `logs.level` option\n\nYou can now configure different log levels. As part of this feature, we had to introduce a breaking change by moving the `debug` option to `logs.level`. This will affect you if you're calling `@hey-api/openapi-ts` from Node.js (not CLI) or using the configuration file.\n\n```js\nexport default {\n  client: '@hey-api/client-fetch',\n  debug: true, // [!code --]\n  input: 'hey-api/backend', // sign up at app.heyapi.dev\n  logs: {\n    level: 'debug', // [!code ++]\n  },\n  output: 'src/client',\n};\n```\n\n### Updated default `plugins`\n\n`@hey-api/schemas` has been removed from the default plugins. To continue using it, add it to your plugins array.\n\n```js\nexport default {\n  client: '@hey-api/client-fetch',\n  experimentalParser: true,\n  input: 'hey-api/backend', // sign up at app.heyapi.dev\n  output: 'src/client',\n  plugins: [\n    // ...other plugins\n    '@hey-api/schemas', // [!code ++]\n  ],\n};\n```\n\n## v0.58.0\n\n### Removed `schemas.gen.ts` re-export\n\n`index.ts` will no longer re-export `schemas.gen.ts` to reduce the chance of producing broken output. Please update your code to import from `schemas.gen.ts` directly.\n\n```js\nimport { mySchema } from 'client'; // [!code --]\nimport { mySchema } from 'client/schemas.gen'; // [!code ++]\n```\n\n### Removed `transformers.gen.ts` re-export\n\n`index.ts` will no longer re-export `transformers.gen.ts` to reduce the chance of producing broken output. Please update your code to import from `transformers.gen.ts` directly.\n\n```js\nimport { myTransformer } from 'client'; // [!code --]\nimport { myTransformer } from 'client/transformers.gen'; // [!code ++]\n```\n\n### Added `output.clean` option\n\nBy default, the `output.path` folder will be emptied on every run. To preserve the previous behavior, set `output.clean` to `false`.\n\n```js\nexport default {\n  client: '@hey-api/client-fetch',\n  input: 'hey-api/backend', // sign up at app.heyapi.dev\n  output: {\n    clean: false, // [!code ++]\n    path: 'src/client',\n  },\n};\n```\n\n### Added `typescript.identifierCase` option\n\n**This change affects only the experimental parser.** By default, the generated TypeScript interfaces will follow the PascalCase naming convention. In the previous versions, we tried to preserve the original name as much as possible. To keep the previous behavior, set `typescript.identifierCase` to `preserve`.\n\n```js\nexport default {\n  client: '@hey-api/client-fetch',\n  experimentalParser: true,\n  input: 'hey-api/backend', // sign up at app.heyapi.dev\n  output: 'src/client',\n  plugins: [\n    // ...other plugins\n    {\n      identifierCase: 'preserve', // [!code ++]\n      name: '@hey-api/typescript',\n    },\n  ],\n};\n```\n\n## v0.57.0\n\n### Renamed `@hey-api/services` plugin\n\nThis plugin has been renamed to `@hey-api/sdk`.\n\n### Changed `sdk.output` value\n\nTo align with the updated name, the `@hey-api/sdk` plugin will generate an `sdk.gen.ts` file. This will result in a breaking change if you're importing from `services.gen.ts`. Please update your imports to reflect this change.\n\n```js\nimport { client } from 'client/services.gen'; // [!code --]\nimport { client } from 'client/sdk.gen'; // [!code ++]\n```\n\n### Renamed `@hey-api/types` plugin\n\nThis plugin has been renamed to `@hey-api/typescript`.\n\n### Added `typescript.exportInlineEnums` option\n\nBy default, inline enums (enums not defined as reusable components in the input file) will be generated only as inlined union types. You can set `exportInlineEnums` to `true` to treat inline enums as reusable components. When `true`, the exported enums will follow the style defined in `enums`.\n\nThis is a breaking change since in the previous versions, inline enums were always treated as reusable components. To preserve your current output, set `exportInlineEnums` to `true`. This feature works only with the experimental parser.\n\n```js\nexport default {\n  client: '@hey-api/client-fetch',\n  experimentalParser: true,\n  input: 'hey-api/backend', // sign up at app.heyapi.dev\n  output: 'src/client',\n  plugins: [\n    // ...other plugins\n    {\n      exportInlineEnums: true, // [!code ++]\n      name: '@hey-api/typescript',\n    },\n  ],\n};\n```\n\n## v0.56.0\n\n### Deprecated `tree` in `@hey-api/types`\n\nThis config option is deprecated and will be removed when the experimental parser becomes the default.\n\n## v0.55.0\n\nThis release adds the ability to filter your OpenAPI specification before it's processed. This feature will be useful if you are working with a large specification and are interested in generating output only from a small subset.\n\nThis feature is available only in the experimental parser. In the future, this will become the default parser. To opt-in to the experimental parser, set the `experimentalParser` flag in your configuration to `true`.\n\n### Deprecated `include` in `@hey-api/types`\n\nThis config option is deprecated and will be removed when the experimental parser becomes the default.\n\n### Deprecated `filter` in `@hey-api/services`\n\nThis config option is deprecated and will be removed when the experimental parser becomes the default.\n\n### Added `input.include` option\n\nThis config option can be used to replace the deprecated options. It accepts a regular expression string matching against references within the bundled specification.\n\n```js\nexport default {\n  client: '@hey-api/client-fetch',\n  experimentalParser: true,\n  input: {\n    include: '^(#/components/schemas/foo|#/paths/api/v1/foo/get)$', // [!code ++]\n    path: 'hey-api/backend', // sign up at app.heyapi.dev\n  },\n  output: 'src/client',\n};\n```\n\nThe configuration above will process only the schema named `foo` and `GET` operation for the `/api/v1/foo` path.\n\n## v0.54.0\n\nThis release makes plugins first-class citizens. In order to achieve that, the following breaking changes were introduced.\n\n### Removed CLI options\n\nThe `--types`, `--schemas`, and `--services` CLI options have been removed. You can list which plugins you'd like to use explicitly by passing a list of plugins as `--plugins <plugin1> <plugin2>`\n\n### Removed `*.export` option\n\nPreviously, you could explicitly disable export of certain artifacts using the `*.export` option or its shorthand variant. These were both removed. You can now disable export of specific artifacts by manually defining an array of `plugins` and excluding the unwanted plugin.\n\n::: code-group\n\n```js [shorthand]\nexport default {\n  client: '@hey-api/client-fetch',\n  input: 'hey-api/backend', // sign up at app.heyapi.dev\n  output: 'src/client',\n  schemas: false, // [!code --]\n  plugins: ['@hey-api/types', '@hey-api/services'], // [!code ++]\n};\n```\n\n```js [*.export]\nexport default {\n  client: '@hey-api/client-fetch',\n  input: 'hey-api/backend', // sign up at app.heyapi.dev\n  output: 'src/client',\n  schemas: {\n    export: false, // [!code --]\n  },\n  plugins: ['@hey-api/types', '@hey-api/services'], // [!code ++]\n};\n```\n\n:::\n\n### Renamed `schemas.name` option\n\nEach plugin definition contains a `name` field. This was conflicting with the `schemas.name` option. As a result, it has been renamed to `nameBuilder`.\n\n```js\nexport default {\n  client: '@hey-api/client-fetch',\n  input: 'hey-api/backend', // sign up at app.heyapi.dev\n  output: 'src/client',\n  schemas: {\n    name: (name) => `${name}Schema`, // [!code --]\n  },\n  plugins: [\n    // ...other plugins\n    {\n      nameBuilder: (name) => `${name}Schema`, // [!code ++]\n      name: '@hey-api/schemas',\n    },\n  ],\n};\n```\n\n### Removed `services.include` shorthand option\n\nPreviously, you could use a string value as a shorthand for the `services.include` configuration option. You can now achieve the same result using the `include` option.\n\n```js\nexport default {\n  client: '@hey-api/client-fetch',\n  input: 'hey-api/backend', // sign up at app.heyapi.dev\n  output: 'src/client',\n  services: '^MySchema', // [!code --]\n  plugins: [\n    // ...other plugins\n    {\n      include: '^MySchema', // [!code ++]\n      name: '@hey-api/services',\n    },\n  ],\n};\n```\n\n### Renamed `services.name` option\n\nEach plugin definition contains a `name` field. This was conflicting with the `services.name` option. As a result, it has been renamed to `serviceNameBuilder`.\n\n```js\nexport default {\n  client: '@hey-api/client-fetch',\n  input: 'hey-api/backend', // sign up at app.heyapi.dev\n  output: 'src/client',\n  services: {\n    name: '{{name}}Service', // [!code --]\n  },\n  plugins: [\n    // ...other plugins\n    {\n      serviceNameBuilder: '{{name}}Service', // [!code ++]\n      name: '@hey-api/services',\n    },\n  ],\n};\n```\n\n### Renamed `types.dates` option\n\nPreviously, you could set `types.dates` to a boolean or a string value, depending on whether you wanted to transform only type strings into dates, or runtime code too. Many people found these options confusing, so they have been simplified to a boolean and extracted into a separate `@hey-api/transformers` plugin.\n\n```js\nexport default {\n  client: '@hey-api/client-fetch',\n  input: 'hey-api/backend', // sign up at app.heyapi.dev\n  output: 'src/client',\n  types: {\n    dates: 'types+transform', // [!code --]\n  },\n  plugins: [\n    // ...other plugins\n    {\n      dates: true, // [!code ++]\n      name: '@hey-api/transformers',\n    },\n  ],\n};\n```\n\n### Removed `types.include` shorthand option\n\nPreviously, you could use a string value as a shorthand for the `types.include` configuration option. You can now achieve the same result using the `include` option.\n\n```js\nexport default {\n  client: '@hey-api/client-fetch',\n  input: 'hey-api/backend', // sign up at app.heyapi.dev\n  output: 'src/client',\n  types: '^MySchema', // [!code --]\n  plugins: [\n    // ...other plugins\n    {\n      include: '^MySchema', // [!code ++]\n      name: '@hey-api/types',\n    },\n  ],\n};\n```\n\n### Renamed `types.name` option\n\nEach plugin definition contains a `name` field. This was conflicting with the `types.name` option. As a result, it has been renamed to `style`.\n\n```js\nexport default {\n  client: '@hey-api/client-fetch',\n  input: 'hey-api/backend', // sign up at app.heyapi.dev\n  output: 'src/client',\n  types: {\n    name: 'PascalCase', // [!code --]\n  },\n  plugins: [\n    // ...other plugins\n    {\n      name: '@hey-api/types',\n      style: 'PascalCase', // [!code ++]\n    },\n  ],\n};\n```\n\n## v0.53.0\n\n### Changed schemas name pattern\n\nPreviously, generated schemas would have their definition names prefixed with `$`. This was problematic when using them with Svelte due to reserved keyword conflicts. The new naming pattern for schemas suffixes their definition names with `Schema`. You can continue using the previous pattern by setting the `schemas.name` configuration option.\n\n```js\nexport default {\n  input: 'hey-api/backend', // sign up at app.heyapi.dev\n  output: 'src/client',\n  schemas: {\n    name: (name) => `$${name}`, // [!code ++]\n  },\n};\n```\n\n### Renamed legacy clients\n\nLegacy clients were renamed to signal they are deprecated more clearly. To continue using legacy clients, you will need to update your configuration and prefix them with `legacy/`.\n\n::: code-group\n\n```js [fetch]\nexport default {\n  client: 'fetch', // [!code --]\n  client: 'legacy/fetch', // [!code ++]\n  input: 'hey-api/backend', // sign up at app.heyapi.dev\n  output: 'src/client',\n};\n```\n\n```js [axios]\nexport default {\n  client: 'axios', // [!code --]\n  client: 'legacy/axios', // [!code ++]\n  input: 'hey-api/backend', // sign up at app.heyapi.dev\n  output: 'src/client',\n};\n```\n\n```js [angular]\nexport default {\n  client: 'angular', // [!code --]\n  client: 'legacy/angular', // [!code ++]\n  input: 'hey-api/backend', // sign up at app.heyapi.dev\n  output: 'src/client',\n};\n```\n\n```js [node]\nexport default {\n  client: 'node', // [!code --]\n  client: 'legacy/node', // [!code ++]\n  input: 'hey-api/backend', // sign up at app.heyapi.dev\n  output: 'src/client',\n};\n```\n\n```js [xhr]\nexport default {\n  client: 'xhr', // [!code --]\n  client: 'legacy/xhr', // [!code ++]\n  input: 'hey-api/backend', // sign up at app.heyapi.dev\n  output: 'src/client',\n};\n```\n\n:::\n\n## v0.52.0\n\n### Removed internal `client` export\n\nPreviously, client packages would create a default client which you'd then import and configure.\n\n```js\nimport { client, createClient } from '@hey-api/client-fetch';\n\ncreateClient({\n  baseUrl: 'https://example.com',\n});\n\nconsole.log(client.getConfig().baseUrl); // <-- 'https://example.com'\n```\n\nThis client instance was used internally by services unless overridden. Apart from running `createClient()` twice, people were confused about the meaning of `global` configuration option.\n\nStarting with v0.52.0, client packages will not create a default client. Instead, services will define their own client. You can now achieve the same configuration by importing `client` from services and using the new `setConfig()` method.\n\n```js\nimport { client } from 'client/services.gen';\n\nclient.setConfig({\n  baseUrl: 'https://example.com',\n});\n\nconsole.log(client.getConfig().baseUrl); // <-- 'https://example.com'\n```\n\n## v0.51.0\n\n### Required `client` option\n\nClient now has to be explicitly specified and `@hey-api/openapi-ts` will no longer generate a legacy Fetch API client by default. To preserve the previous default behavior, set the `client` option to `fetch`.\n\n```js\nexport default {\n  client: 'fetch', // [!code ++]\n  input: 'hey-api/backend', // sign up at app.heyapi.dev\n  output: 'src/client',\n};\n```\n\n## v0.48.0\n\n### Changed `methodNameBuilder()` signature\n\nThe `services.methodNameBuilder()` function now provides a single `operation` argument instead of multiple cherry-picked properties from it.\n\n```js\nimport { createClient } from '@hey-api/openapi-ts';\n\ncreateClient({\n  input: 'hey-api/backend', // sign up at app.heyapi.dev\n  output: 'src/client',\n  services: {\n    methodNameBuilder: (service, name) => name, // [!code --]\n    methodNameBuilder: (operation) => operation.name, // [!code ++]\n  },\n});\n```\n\n## v0.46.0\n\n### Tree-shakeable services\n\nBy default, your services will now support [tree-shaking](https://developer.mozilla.org/docs/Glossary/Tree_shaking). You can either use wildcard imports\n\n```js\nimport { DefaultService } from 'client/services.gen'; // [!code --]\nimport * as DefaultService from 'client/services.gen'; // [!code ++]\n\nDefaultService.foo(); // only import needs to be changed\n```\n\nor update all references to service classes\n\n```js\nimport { DefaultService } from 'client/services.gen'; // [!code --]\nimport { foo } from 'client/services.gen'; // [!code ++]\n\nfoo(); // all references need to be changed\n```\n\nIf you want to preserve the old behavior, you can set the newly exposed `services.asClass` option to `true.`\n\n```js\nexport default {\n  input: 'hey-api/backend', // sign up at app.heyapi.dev\n  output: 'src/client',\n  services: {\n    asClass: true, // [!code ++]\n  },\n};\n```\n\n## v0.45.0\n\n### Removed `client` inference\n\n`@hey-api/openapi-ts` will no longer infer which client you want to generate. By default, we will create a `fetch` client. If you want a different client, you can specify it using the `client` option.\n\n```js\nexport default {\n  client: 'axios', // [!code ++]\n  input: 'hey-api/backend', // sign up at app.heyapi.dev\n  output: 'src/client',\n};\n```\n\n## v0.44.0\n\n### Moved `format`\n\nThis config option has been moved. You can now configure formatter using the `output.format` option.\n\n```js\nexport default {\n  format: 'prettier', // [!code --]\n  input: 'hey-api/backend', // sign up at app.heyapi.dev\n  output: {\n    format: 'prettier', // [!code ++]\n    path: 'src/client',\n  },\n};\n```\n\n### Moved `lint`\n\nThis config option has been moved. You can now configure linter using the `output.lint` option.\n\n```js\nexport default {\n  input: 'hey-api/backend', // sign up at app.heyapi.dev\n  lint: 'eslint', // [!code --]\n  output: {\n    lint: 'eslint', // [!code ++]\n    path: 'src/client',\n  },\n};\n```\n\n## v0.43.0\n\n### Removed `enums.gen.ts`\n\nThis file has been removed. Instead, enums are exported from `types.gen.ts`. If you use imports from `enums.gen.ts`, you should be able to easily find and replace all instances.\n\n```js\nimport { Foo } from 'client/enums.gen'; // [!code --]\nimport { Foo } from 'client/types.gen'; // [!code ++]\n```\n\n### Removed `Enum` postfix\n\nGenerated enum names are no longer postfixed with `Enum`. You can either alias your imports\n\n```js\nimport { FooEnum } from 'client/types.gen'; // [!code --]\nimport { Foo as FooEnum } from 'client/types.gen'; // [!code ++]\n\nconsole.log(FooEnum.value); // only import needs to be changed\n```\n\nor update all references to enums\n\n```js\nimport { FooEnum } from 'client/types.gen'; // [!code --]\nimport { Foo } from 'client/types.gen'; // [!code ++]\n\nconsole.log(Foo.value); // all references need to be changed\n```\n\n### Moved `enums`\n\nThis config option has been moved. You can now configure enums using the `types.enums` option.\n\n```js\nexport default {\n  enums: 'javascript', // [!code --]\n  input: 'hey-api/backend', // sign up at app.heyapi.dev\n  output: 'src/client',\n  types: {\n    enums: 'javascript', // [!code ++]\n  },\n};\n```\n\n## v0.42.0\n\n### Changed `format`\n\nThis config option has changed. You now need to specify a value (`biome` or `prettier`) to format the output (default: `false`).\n\n```js{2}\nexport default {\n  format: 'prettier',\n  input: 'hey-api/backend', // sign up at app.heyapi.dev\n  output: 'src/client',\n}\n```\n\n### Changed `lint`\n\nThis config option has changed. You now need to specify a value (`biome` or `eslint`) to lint the output (default: `false`).\n\n```js{3}\nexport default {\n  input: 'hey-api/backend', // sign up at app.heyapi.dev\n  lint: 'eslint',\n  output: 'src/client',\n}\n```\n\n### Moved `operationId`\n\nThis config option has been moved. You can now configure it using the `services.operationId` option.\n\n```js{5}\nexport default {\n  input: 'hey-api/backend', // sign up at app.heyapi.dev\n  output: 'src/client',\n  services: {\n    operationId: true,\n  },\n}\n```\n\n## v0.41.0\n\n### Removed `postfixServices`\n\nThis config option has been removed. You can now transform service names using the string pattern parameter.\n\n```js{5}\nexport default {\n  input: 'hey-api/backend', // sign up at app.heyapi.dev\n  output: 'src/client',\n  services: {\n    name: 'myAwesome{{name}}Api',\n  },\n}\n```\n\n### Removed `serviceResponse`\n\nThis config option has been removed. You can now configure service responses using the `services.response` option.\n\n```js{5}\nexport default {\n  input: 'hey-api/backend', // sign up at app.heyapi.dev\n  output: 'src/client',\n  services: {\n    response: 'body',\n  },\n}\n```\n\n### Removed `useDateType`\n\nThis config option has been removed. You can now configure date type using the `types.dates` option.\n\n```js{5}\nexport default {\n  input: 'hey-api/backend', // sign up at app.heyapi.dev\n  output: 'src/client',\n  type: {\n    dates: true,\n  },\n}\n```\n\n## v0.40.0\n\n### Renamed `models.gen.ts` file\n\n`models.gen.ts` is now called `types.gen.ts`. If you use imports from `models.gen.ts`, you should be able to easily find and replace all instances.\n\n```js\nimport type { Model } from 'client/models.gen' // [!code --]\nimport type { Model } from 'client/types.gen' // [!code ++]\n```\n\n### Renamed `exportModels`\n\nThis config option is now called `types`.\n\n### PascalCase for types\n\nYou can now choose to export types using the PascalCase naming convention.\n\n```js{5}\nexport default {\n  input: 'hey-api/backend', // sign up at app.heyapi.dev\n  output: 'src/client',\n  types: {\n    name: 'PascalCase',\n  },\n}\n```\n\n### Exported `enums.gen.ts` file\n\nEnums are now re-exported from the main `index.ts` file.\n\n## v0.39.0\n\n### Single `enums.gen.ts` file\n\nEnums are now exported from a separate file. If you use imports from `models.ts`, you can change them to `enums.gen.ts`.\n\n```js\nimport { Enum } from 'client/models'; // [!code --]\nimport { Enum } from 'client/enums.gen'; // [!code ++]\n```\n\n### Renamed `models.ts` file\n\n`models.ts` is now called `models.gen.ts`. If you use imports from `models.ts`, you should be able to easily find and replace all instances.\n\n```js\nimport type { Model } from 'client/models' // [!code --]\nimport type { Model } from 'client/models.gen' // [!code ++]\n```\n\n### Renamed `schemas.ts` file\n\n`schemas.ts` is now called `schemas.gen.ts`. If you use imports from `schemas.ts`, you should be able to easily find and replace all instances.\n\n```js\nimport { $Schema } from 'client/schemas'; // [!code --]\nimport { $Schema } from 'client/schemas.gen'; // [!code ++]\n```\n\n### Renamed `services.ts` file\n\n`services.ts` is now called `services.gen.ts`. If you use imports from `services.ts`, you should be able to easily find and replace all instances.\n\n```js\nimport { DefaultService } from 'client/services'; // [!code --]\nimport { DefaultService } from 'client/services.gen'; // [!code ++]\n```\n\n### Deprecated exports from `index.ts`\n\nUntil this release, `index.ts` file exported all generated artifacts. Starting from this release, enums are no longer exported from `index.ts`. Models, schemas, and services will continue to be exported from `index.ts` to avoid a huge migration lift, but we recommend migrating to import groups per artifact type.\n\n```js\nimport { Enum, type Model, $Schema, DefaultService } from 'client' // [!code --]\nimport { Enum } from 'client/enums.gen' // [!code ++]\nimport type { Model } from 'client/models.gen' // [!code ++]\nimport { $Schema } from 'client/schemas.gen' // [!code ++]\nimport { DefaultService } from 'client/services.gen' // [!code ++]\n```\n\n### Prefer `unknown`\n\nTypes that cannot be determined will now be generated as `unknown` instead of `any`. To dismiss any errors, you can cast your variables back to `any`, but we recommend updating your code to work with `unknown` types.\n\n```js\nconst foo = bar as any\n```\n\n## v0.38.0\n\n### Renamed `write`\n\nThis config option is now called `dryRun` (file) or `--dry-run` (CLI). To restore existing functionality, invert the value, ie. `write: true` is `dryRun: false` and `write: false` is `dryRun: true`.\n\n## v0.36.0\n\n### JSON Schema 2020-12\n\nSchemas are exported directly from OpenAPI specification. This means your schemas might change depending on which OpenAPI version you're using. If this release caused a field to be removed, consult the JSON Schema documentation on how to obtain the same value from JSON Schema (eg. [required properties](https://json-schema.org/understanding-json-schema/reference/object#required)).\n\n### Renamed `exportSchemas`\n\nThis config option is now called `schemas`.\n\n## v0.35.0\n\n### Removed `postfixModels`\n\nThis config option has been removed.\n\n## v0.34.0\n\n### Single `services.ts` file\n\nServices are now exported from a single file. If you used imports from individual service files, these will need to be updated to refer to the single `services.ts` file.\n\n## v0.31.1\n\n### Merged enums options\n\n`useLegacyEnums` config option is now `enums: 'typescript'` and existing `enums: true` option is now `enums: 'javascript'`.\n\n## v0.31.0\n\n### Single `models.ts` file\n\nTypeScript interfaces are now exported from a single file. If you used imports from individual model files, these will need to be updated to refer to the single `models.ts` file.\n\n### Single `schemas.ts` file\n\nSchemas are now exported from a single file. If you used imports from individual schema files, these will need to be updated to refer to the single `schemas.ts` file.\n\n## v0.27.38\n\n### `useOptions: true`\n\nBy default, generated clients will use a single object argument to pass values to API calls. This is a significant change from the previous default of unspecified array of arguments. If migrating your application in one go isn't feasible, we recommend deprecating your old client and generating a new client.\n\n```ts\nimport { DefaultService } from 'client/services'; // <-- old client with array arguments\n\nimport { DefaultService } from 'client_v2/services'; // <-- new client with options argument\n```\n\nThis way, you can gradually switch over to the new syntax as you update parts of your code. Once you've removed all instances of `client` imports, you can safely delete the old `client` folder and find and replace all `client_v2` calls to `client`.\n\n## v0.27.36\n\n### `exportSchemas: true`\n\nBy default, we will create schemas from your OpenAPI specification. Use `exportSchemas: false` to preserve the old behavior.\n\n## v0.27.32\n\n### Renamed `Config` interface\n\nThis interface is now called `UserConfig`.\n\n## v0.27.29\n\n### Renamed `openapi` CLI command\n\nThis command is now called `openapi-ts`.\n\n## v0.27.26\n\n### Removed `indent`\n\nThis config option has been removed. Use a [code formatter](/openapi-ts/configuration/output#post-process) to modify the generated files code style according to your preferences.\n\n## v0.27.24\n\n### Removed `useUnionTypes`\n\nThis config option has been removed. Generated types will behave the same as `useUnionTypes: true` before.\n\n## OpenAPI TypeScript Codegen\n\n`@hey-api/openapi-ts` was originally forked from Ferdi Koomen's [openapi-typescript-codegen](https://github.com/ferdikoomen/openapi-typescript-codegen). Therefore, we want you to be able to migrate your projects. Migration should be relatively straightforward if you follow the release notes on this page. Start on [v0.27.24](#v0-27-24) and scroll to the release you're migrating to.\n"
  },
  {
    "path": "docs/openapi-ts/mocks.md",
    "content": "---\ntitle: Mocks\ndescription: Learn about mocking HTTP servers with @hey-api/openapi-ts.\n---\n\n# Mocks\n\nRealistic mock data is an important component of every robust development process, testing strategy, and product presentation.\n\n## Options\n\nHey API natively supports the following mocking frameworks.\n\n- [Chance](/openapi-ts/plugins/chance) <span data-soon>Soon</span>\n- [Faker](/openapi-ts/plugins/faker) <span data-soon>Soon</span>\n- [Falso](/openapi-ts/plugins/falso) <span data-soon>Soon</span>\n- [MSW](/openapi-ts/plugins/msw) <span data-soon>Soon</span>\n- [Nock](/openapi-ts/plugins/nock) <span data-soon>Soon</span>\n- [Supertest](/openapi-ts/plugins/supertest) <span data-soon>Soon</span>\n\nDon't see your framework? Let us know your interest by [opening an issue](https://github.com/hey-api/openapi-ts/issues).\n\n<!--@include: ../partials/examples.md-->\n<!--@include: ../partials/sponsors.md-->\n"
  },
  {
    "path": "docs/openapi-ts/output.md",
    "content": "---\ntitle: Output\ndescription: Learn about files generated with @hey-api/openapi-ts.\n---\n\n# Output\n\nEvery generated file in your output folder is created by a plugin. This page describes the default output, but similar logic applies to all plugins.\n\n## Overview\n\nIf you use the default configuration, your [project](https://stackblitz.com/edit/hey-api-example?file=openapi-ts.config.ts,src%2Fclient%2Fschemas.gen.ts,src%2Fclient%2Fsdk.gen.ts,src%2Fclient%2Ftypes.gen.ts) might look like this.\n\n```txt\nmy-app/\n├── node_modules/\n├── src/\n│ ├── client/\n│ │ ├── client/\n│ │ ├── core/\n│ │ ├── client.gen.ts\n│ │ ├── index.ts\n│ │ ├── sdk.gen.ts\n│ │ └── types.gen.ts\n│ └── index.ts\n└── package.json\n```\n\nYour actual output depends on your Hey API configuration. It may contain a different number of files and their contents might differ.\n\nLet's go through each file in the `src/client` folder and explain what it looks like, what it does, and how to use it.\n\n## Client\n\n`client.gen.ts` is generated by [client plugins](/openapi-ts/clients). If you choose to generate SDKs (enabled by default), we use the Fetch client unless specified otherwise.\n\n::: code-group\n\n```ts [client.gen.ts]\nimport { createClient, createConfig } from './client';\n\nexport const client = createClient(createConfig());\n```\n\n:::\n\nThe contents of this file are consumed by SDKs, but you can also import `client` in your application to perform additional configuration or send manual requests.\n\n### Bundle\n\nClient plugins provide their bundles inside `client` and `core` folders. The contents of these folders don't depend on the provided input. Everything inside these folders serves as a scaffolding so the generated code can make HTTP requests.\n\n## TypeScript\n\nYou can learn more on the [TypeScript](/openapi-ts/plugins/typescript) page.\n\n## SDK\n\nYou can learn more on the [SDK](/openapi-ts/plugins/sdk) page.\n\n## Entry File\n\n`index.ts` is not generated by any specific plugin. It's meant for convenience and by default, it re-exports every artifact generated by default plugins (TypeScript and SDK).\n\n::: code-group\n\n```ts [index.ts]\nexport * from './sdk.gen';\nexport * from './types.gen';\n```\n\n:::\n\n### Disable entry file\n\nWe recommend importing artifacts from their respective files to avoid ambiguity, but we leave this choice up to you.\n\n```ts\nimport type { Pet } from './client';\n// or\nimport type { Pet } from './client/types.gen';\n```\n\nIf you're not importing artifacts from the entry file, you can skip generating it altogether by setting the `output.entryFile` option to `false`.\n\n```js\nexport default {\n  input: 'hey-api/backend', // sign up at app.heyapi.dev\n  output: {\n    entryFile: false, // [!code ++]\n    path: 'src/client',\n  },\n};\n```\n\n### Re-export artifacts\n\nYou can choose which artifacts should be re-exported from the entry file using the `includeInEntry` option on any plugin. For example, we can re-export all [Zod](/openapi-ts/plugins/zod) plugin artifacts by setting `includeInEntry` to `true`:\n\n::: code-group\n\n```ts [example]\nexport {\n  zAddPetData,\n  zAddPetResponse,\n  zApiResponse,\n  zCategory,\n  // ...more exports\n} from './zod.gen';\n```\n\n```js [config]\nexport default {\n  input: 'hey-api/backend', // sign up at app.heyapi.dev\n  output: 'src/client',\n  plugins: [\n    // ...other plugins\n    {\n      includeInEntry: true, // [!code ++]\n      name: 'zod',\n    },\n  ],\n};\n```\n\n:::\n\nOr we can re-export only specific artifacts by providing a predicate function:\n\n::: code-group\n\n```ts [example]\nexport { zTag } from './zod.gen';\n```\n\n```js [config]\nexport default {\n  input: 'hey-api/backend', // sign up at app.heyapi.dev\n  output: 'src/client',\n  plugins: [\n    // ...other plugins\n    {\n      includeInEntry: (symbol) => symbol.name === 'zTag', // [!code ++]\n      name: 'zod',\n    },\n  ],\n};\n```\n\n:::\n\n<!--@include: ../partials/examples.md-->\n<!--@include: ../partials/sponsors.md-->\n"
  },
  {
    "path": "docs/openapi-ts/plugins/adonis.md",
    "content": "---\ntitle: AdonisJS\ndescription: AdonisJS plugin for Hey API. Compatible with all our features.\n---\n\n<script setup lang=\"ts\">\nimport FeatureStatus from '@components/FeatureStatus.vue';\n</script>\n\n# AdonisJS <span data-soon>soon</span>\n\n<FeatureStatus issueNumber=2364 name=\"AdonisJS\" />\n\n### About\n\n[AdonisJS](https://adonisjs.com) is a TypeScript-first web framework for building web apps and API servers. It comes with support for testing, modern tooling, an ecosystem of official packages, and more.\n\n<!--@include: ../../partials/sponsors.md-->\n"
  },
  {
    "path": "docs/openapi-ts/plugins/ajv.md",
    "content": "---\ntitle: Ajv\ndescription: Ajv plugin for Hey API. Compatible with all our features.\n---\n\n<script setup lang=\"ts\">\nimport FeatureStatus from '@components/FeatureStatus.vue';\n</script>\n\n# Ajv <span data-soon>soon</span>\n\n<FeatureStatus issueNumber=1476 name=\"Ajv\" />\n\n### About\n\n[Ajv](https://ajv.js.org) is the fastest JSON validator for Node.js and browser.\n\n<!--@include: ../../partials/sponsors.md-->\n"
  },
  {
    "path": "docs/openapi-ts/plugins/angular/v19.md",
    "content": "---\ntitle: Angular v19 Plugin\ndescription: Generate Angular v19 HTTP requests and resources from OpenAPI with the Angular plugin for openapi-ts. Fully compatible with validators, transformers, and all core features.\n---\n\n<script setup lang=\"ts\">\nimport AuthorsList from '@components/AuthorsList.vue';\nimport Heading from '@components/Heading.vue';\nimport { maxScopp } from '@data/people.js';\nimport AngularVersionSwitcher from '@versions/AngularVersionSwitcher.vue';\n</script>\n\n<Heading>\n  <h1>Angular<span class=\"sr-only\"> v19</span></h1>\n  <AngularVersionSwitcher />\n</Heading>\n\n::: warning\nAngular client is currently in beta. The interface might change before it becomes stable. We encourage you to leave feedback on [GitHub](https://github.com/hey-api/openapi-ts/issues).\n:::\n\n### About\n\n[Angular](https://angular.dev/) is a web framework that empowers developers to build fast, reliable applications.\n\nThe Angular plugin for Hey API generates HTTP requests and resources from your OpenAPI spec, fully compatible with validators, transformers, and all core features.\n\n### Collaborators\n\n<AuthorsList :people=\"[maxScopp]\" />\n\n## Features\n\n- Angular v19 support\n- seamless integration with `@hey-api/openapi-ts` ecosystem\n- generate HTTP requests\n- generate HTTP resources\n- minimal learning curve thanks to extending the underlying technology\n\n## Installation\n\nIn your [configuration](/openapi-ts/get-started), add `@angular/common` to your plugins and you'll be ready to generate Angular artifacts. :tada:\n\n```js\nexport default {\n  input: 'hey-api/backend', // sign up at app.heyapi.dev\n  output: 'src/client',\n  plugins: [\n    // ...other plugins\n    '@angular/common', // [!code ++]\n  ],\n};\n```\n\n## Output\n\nThe Angular plugin will generate the following artifacts, depending on the input specification.\n\n## Requests\n\nA single function is generated for each endpoint. It returns an [`HttpRequest`](https://v19.angular.dev/api/common/http/HttpRequest) result.\n\n::: code-group\n\n```ts [example]\nexport const addPetRequest = (options) =>\n  client.requestOptions({\n    method: 'POST',\n    responseStyle: 'data',\n    url: '/pet',\n    ...options,\n  });\n```\n\n```js [config]\nexport default {\n  input: 'hey-api/backend', // sign up at app.heyapi.dev\n  output: 'src/client',\n  plugins: [\n    // ...other plugins\n    {\n      name: '@angular/common',\n      httpRequests: true, // [!code ++]\n    },\n  ],\n};\n```\n\n:::\n\n## Resources\n\nA single function is generated for each endpoint. It returns a result from [`httpResource`](https://v19.angular.dev/api/common/http/httpResource) call.\n\n::: code-group\n\n```ts [example]\nexport const addPetResource = (options) => httpResource(() => addPetRequest(options()));\n```\n\n```js [config]\nexport default {\n  input: 'hey-api/backend', // sign up at app.heyapi.dev\n  output: 'src/client',\n  plugins: [\n    // ...other plugins\n    {\n      name: '@angular/common',\n      httpResources: true, // [!code ++]\n    },\n  ],\n};\n```\n\n:::\n\n## API\n\nYou can view the complete list of options in the [UserConfig](https://github.com/hey-api/openapi-ts/blob/main/packages/openapi-ts/src/plugins/@angular/common/types.ts) interface.\n\n<!--@include: ../../partials/examples.md-->\n<!--@include: ../../partials/sponsors.md-->\n"
  },
  {
    "path": "docs/openapi-ts/plugins/angular.md",
    "content": "---\ntitle: Angular v20 Plugin\ndescription: Generate Angular v20 HTTP requests and resources from OpenAPI with the Angular plugin for openapi-ts. Fully compatible with validators, transformers, and all core features.\n---\n\n<script setup lang=\"ts\">\nimport AuthorsList from '@components/AuthorsList.vue';\nimport Heading from '@components/Heading.vue';\nimport { maxScopp } from '@data/people.js';\nimport AngularVersionSwitcher from '@versions/AngularVersionSwitcher.vue';\n</script>\n\n<Heading>\n  <h1>Angular<span class=\"sr-only\"> v20</span></h1>\n  <AngularVersionSwitcher />\n</Heading>\n\n::: warning\nAngular client is currently in beta. The interface might change before it becomes stable. We encourage you to leave feedback on [GitHub](https://github.com/hey-api/openapi-ts/issues).\n:::\n\n### About\n\n[Angular](https://angular.dev/) is a web framework that empowers developers to build fast, reliable applications.\n\nThe Angular plugin for Hey API generates HTTP requests and resources from your OpenAPI spec, fully compatible with validators, transformers, and all core features.\n\n### Collaborators\n\n<AuthorsList :people=\"[maxScopp]\" />\n\n## Features\n\n- Angular v20 support\n- seamless integration with `@hey-api/openapi-ts` ecosystem\n- generate HTTP requests\n- generate HTTP resources\n- minimal learning curve thanks to extending the underlying technology\n\n## Installation\n\nIn your [configuration](/openapi-ts/get-started), add `@angular/common` to your plugins and you'll be ready to generate Angular artifacts. :tada:\n\n```js\nexport default {\n  input: 'hey-api/backend', // sign up at app.heyapi.dev\n  output: 'src/client',\n  plugins: [\n    // ...other plugins\n    '@angular/common', // [!code ++]\n  ],\n};\n```\n\n## Output\n\nThe Angular plugin will generate the following artifacts, depending on the input specification.\n\n## Requests\n\nA single function is generated for each endpoint. It returns an [`HttpRequest`](https://angular.dev/api/common/http/HttpRequest) result.\n\n::: code-group\n\n```ts [example]\nexport const addPetRequest = (options) =>\n  client.requestOptions({\n    method: 'POST',\n    responseStyle: 'data',\n    url: '/pet',\n    ...options,\n  });\n```\n\n```js [config]\nexport default {\n  input: 'hey-api/backend', // sign up at app.heyapi.dev\n  output: 'src/client',\n  plugins: [\n    // ...other plugins\n    {\n      name: '@angular/common',\n      httpRequests: true, // [!code ++]\n    },\n  ],\n};\n```\n\n:::\n\n## Resources\n\nA single function is generated for each endpoint. It returns a result from [`httpResource`](https://angular.dev/api/common/http/httpResource) call.\n\n::: code-group\n\n```ts [example]\nexport const addPetResource = (options) => httpResource(() => addPetRequest(options()));\n```\n\n```js [config]\nexport default {\n  input: 'hey-api/backend', // sign up at app.heyapi.dev\n  output: 'src/client',\n  plugins: [\n    // ...other plugins\n    {\n      name: '@angular/common',\n      httpResources: true, // [!code ++]\n    },\n  ],\n};\n```\n\n:::\n\n## API\n\nYou can view the complete list of options in the [UserConfig](https://github.com/hey-api/openapi-ts/blob/main/packages/openapi-ts/src/plugins/@angular/common/types.ts) interface.\n\n<!--@include: ../../partials/examples.md-->\n<!--@include: ../../partials/sponsors.md-->\n"
  },
  {
    "path": "docs/openapi-ts/plugins/arktype.md",
    "content": "---\ntitle: Arktype\ndescription: Arktype plugin for Hey API. Compatible with all our features.\n---\n\n<script setup lang=\"ts\">\nimport FeatureStatus from '@components/FeatureStatus.vue';\n</script>\n\n# Arktype <span data-soon>soon</span>\n\n<FeatureStatus issueNumber=1473 name=\"Arktype\" />\n\n### About\n\n[Arktype](https://arktype.io) is a TypeScript's 1:1 validator, optimized from editor to runtime.\n\n<!--@include: ../../partials/sponsors.md-->\n"
  },
  {
    "path": "docs/openapi-ts/plugins/chance.md",
    "content": "---\ntitle: Chance\ndescription: Chance plugin for Hey API. Compatible with all our features.\n---\n\n<script setup lang=\"ts\">\nimport FeatureStatus from '@components/FeatureStatus.vue';\n</script>\n\n# Chance <span data-soon>soon</span>\n\n<FeatureStatus issueNumber=2497 name=\"Chance\" />\n\n### About\n\n[Chance](https://chancejs.com/) is a minimalist generator of random strings, numbers, etc. to help reduce some monotony particularly while writing automated tests or anywhere else you need anything random.\n\n<!--@include: ../../partials/sponsors.md-->\n"
  },
  {
    "path": "docs/openapi-ts/plugins/concepts/resolvers.md",
    "content": "---\ntitle: Resolvers\ndescription: Understand the concepts behind plugins.\n---\n\n# Resolvers\n\nSometimes the default plugin behavior isn't what you need or expect. Resolvers let you patch plugins in a safe and performant way, without forking or reimplementing core logic.\n\nCurrently available for [TypeScript](/openapi-ts/plugins/typescript), [Valibot](/openapi-ts/plugins/valibot), and [Zod](/openapi-ts/plugins/zod).\n\n## Examples\n\nThis page demonstrates resolvers through a few common scenarios.\n\n1. [Handle arbitrary schema formats](#example-1)\n2. [Validate high precision numbers](#example-2)\n3. [Replace default base](#example-3)\n4. [Create permissive enums](#example-4)\n\n## Terminology\n\nBefore we look at examples, let's go through the resolvers API to help you understand how they work. Plugins that support resolvers expose them through the `~resolvers` option. Each resolver is a function that receives context and returns an implemented node (or patches existing ones).\n\nThe resolver context will usually contain:\n\n- `$` - The node builder interface. Use it to build your custom logic.\n- `nodes` - Parts of the plugin logic. You can use these to avoid reimplementing the functionality, or replace them with custom implementation.\n- `plugin` - The plugin instance. You'll most likely use it to register new symbols.\n- `symbols` - Frequently used symbols. These are effectively shorthands for commonly used `plugin.referenceSymbol()` calls.\n\nOther fields may include the current schema or relevant utilities.\n\n## Example 1\n\n### Handle arbitrary schema formats\n\nBy default, the Valibot plugin may produce the following schemas for `date` and `date-time` strings.\n\n```js\nexport const vDates = v.object({\n  created: v.pipe(v.string(), v.isoDate()),\n  modified: v.pipe(v.string(), v.isoTimestamp()),\n});\n```\n\nWe can override this behavior by patching the `nodes.format` function only for strings with `date` or `date-time` formats.\n\n```js\n{\n  name: 'valibot',\n  '~resolvers': {\n    string(ctx) {\n      const { $, schema, symbols } = ctx;\n      const { v } = symbols;\n      if (schema.format === 'date' || schema.format === 'date-time') {\n        ctx.nodes.format = () => $(v).attr('isoDateTime').call();\n      }\n    }\n  }\n}\n```\n\nThis applies custom logic with surgical precision, without affecting the rest of the default behavior.\n\n::: code-group\n\n```js [after]\nexport const vDates = v.object({\n  created: v.pipe(v.string(), v.isoDateTime()),\n  modified: v.pipe(v.string(), v.isoDateTime()),\n});\n```\n\n```js [before]\nexport const vDates = v.object({\n  created: v.pipe(v.string(), v.isoDate()),\n  modified: v.pipe(v.string(), v.isoTimestamp()),\n});\n```\n\n:::\n\n## Example 2\n\n### Validate high precision numbers\n\nLet's say you're dealing with very large or unsafe numbers.\n\n```js\nexport const vAmount = v.number();\n```\n\nIn this case, you'll want to use a third-party library to validate your values. We can use big.js to validate all numbers by replacing the whole resolver.\n\n```js\n{\n  name: 'valibot',\n  '~resolvers': {\n    number(ctx) {\n      const { $, plugin, symbols } = ctx;\n      const { v } = symbols;\n      const big = plugin.symbolOnce('Big', {\n        external: 'big.js',\n        importKind: 'default',\n      });\n      return $(v).attr('instance').call(big);\n    }\n  }\n}\n```\n\nWe're calling `plugin.symbolOnce()` to ensure we always use the same symbol reference.\n\n::: code-group\n\n```js [after]\nimport Big from 'big.js';\n\nexport const vAmount = v.instance(Big);\n```\n\n```js [before]\nexport const vAmount = v.number();\n```\n\n:::\n\n## Example 3\n\n### Replace default base\n\nYou might want to replace the default base schema, e.g., `v.object()`.\n\n```js\nexport const vUser = v.object({\n  age: v.number(),\n});\n```\n\nLet's say we want to interpret any schema without explicitly defined additional properties as a loose object.\n\n```js\n{\n  name: 'valibot',\n  '~resolvers': {\n    object(ctx) {\n      const { $, symbols } = ctx;\n      const { v } = symbols;\n      const additional = ctx.nodes.additionalProperties(ctx);\n      if (additional === undefined) {\n        const shape = ctx.nodes.shape(ctx);\n        ctx.nodes.base = () => $(v).attr('looseObject').call(shape);\n      }\n    }\n  }\n}\n```\n\nAbove we demonstrate patching a node based on the result of another node.\n\n::: code-group\n\n```js [after]\nexport const vUser = v.looseObject({\n  age: v.number(),\n});\n```\n\n```js [before]\nexport const vUser = v.object({\n  age: v.number(),\n});\n```\n\n:::\n\n## Example 4\n\n### Create permissive enums\n\nBy default, enum schemas are strict and will reject unknown values.\n\n```js\nexport const zStatus = z.enum(['active', 'inactive', 'pending']);\n```\n\nYou might want to accept unknown enum values, for example when the API adds new values that haven't been added to the spec yet. You can use the enum resolver to create a permissive union.\n\n```js\n{\n  name: 'zod',\n  '~resolvers': {\n    enum(ctx) {\n      const { $, symbols } = ctx;\n      const { z } = symbols;\n      const { allStrings, enumMembers, literalMembers } = ctx.nodes.items(ctx);\n\n      if (!allStrings || !enumMembers.length) {\n        return;\n      }\n\n      const enumSchema = $(z).attr('enum').call($.array(...enumMembers));\n      return $(z).attr('union').call(\n        $.array(enumSchema, $(z).attr('string').call())\n      );\n    }\n  }\n}\n```\n\nThis resolver creates a union that accepts both the known enum values and any other string.\n\n::: code-group\n\n```js [after]\nexport const zStatus = z.union([z.enum(['active', 'inactive', 'pending']), z.string()]);\n```\n\n```js [before]\nexport const zStatus = z.enum(['active', 'inactive', 'pending']);\n```\n\n:::\n\n## Feedback\n\nWe welcome feedback on the Resolvers API. [Open a GitHub issue](https://github.com/hey-api/openapi-ts/issues) to request support for additional plugins.\n\n<!--@include: ../../../partials/sponsors.md-->\n"
  },
  {
    "path": "docs/openapi-ts/plugins/custom.md",
    "content": "---\ntitle: Custom Plugin\ndescription: Learn how to create your own Hey API plugin.\n---\n\n# Custom Plugin\n\n::: warning\nPlugin API is in development. The interface might change before it becomes stable. We encourage you to leave feedback on [GitHub](https://github.com/hey-api/openapi-ts/issues).\n:::\n\n::: warning\nThis page is out of date as of [v0.83.0](/openapi-ts/migrating#v0-83-0). If you have an existing custom plugin, we recommend waiting for a more stable Plugin API to avoid multiple plugin rewrites.\n:::\n\nYou may need to write your own plugin if the available plugins do not suit your needs or you're working on a proprietary use case. This can be easily achieved using the Plugin API. But don't take our word for it – all Hey API plugins are written this way!\n\n## File Structure\n\nWe recommend following the design pattern of the native plugins. You can browse the code on [GitHub](https://github.com/hey-api/openapi-ts/tree/main/packages/openapi-ts/src/plugins) as you follow this tutorial. First, create a `my-plugin` folder for your plugin files. Inside, create a barrel file `index.ts` exporting the plugin.\n\n::: code-group\n\n```ts [index.ts]\nexport { defaultConfig, defineConfig } from './config';\nexport type { MyPlugin } from './types';\n```\n\n:::\n\n## TypeScript\n\n`index.ts` references two files, so we need to create them. `types.ts` contains the TypeScript interface for your plugin options. It must have the reserved `name` and `output` fields, everything else will become user-configurable options.\n\n::: code-group\n\n```ts [types.ts]\nimport type { DefinePlugin } from '@hey-api/openapi-ts';\n\nexport type UserConfig = {\n  /**\n   * Plugin name. Must be unique.\n   */\n  name: 'my-plugin';\n  /**\n   * Name of the generated file.\n   *\n   * @default 'my-plugin'\n   */\n  output?: string;\n  /**\n   * User-configurable option for your plugin.\n   *\n   * @default false\n   */\n  myOption?: boolean;\n};\n\nexport type MyPlugin = DefinePlugin<UserConfig>;\n```\n\n:::\n\n## Configuration\n\n`config.ts` contains the runtime configuration for your plugin. It must implement the `MyPlugin` interface we created above and define the `handler()` function from the `MyPlugin['Config']` interface.\n\n::: code-group\n\n```ts [config.ts]\nimport { definePluginConfig } from '@hey-api/openapi-ts';\n\nimport { handler } from './plugin';\nimport type { MyPlugin } from './types';\n\nexport const defaultConfig: MyPlugin['Config'] = {\n  config: {\n    myOption: false, // implements default value from types\n  },\n  dependencies: ['@hey-api/typescript'],\n  handler,\n  name: 'my-plugin',\n};\n\n/**\n * Type helper for `my-plugin` plugin, returns {@link Plugin.Config} object\n */\nexport const defineConfig = definePluginConfig(defaultConfig);\n```\n\n:::\n\nIn the file above, we define a `my-plugin` plugin which will generate a `my-plugin.gen.ts` file. We also demonstrate declaring `@hey-api/typescript` as a dependency for our plugin, so we can safely import artifacts from `types.gen.ts`.\n\nBy default, your plugin output won't be re-exported from the `index.ts` file. To enable this feature, add `includeInEntry: true` to your `config.ts` file.\n\n::: warning\nRe-exporting your plugin from index file may result in broken output due to naming conflicts. Ensure your exported identifiers are unique.\n:::\n\n## Handler\n\nNotice we defined `handler` in our `config.ts` file. This method is responsible for generating the actual output. We recommend implementing it in `plugin.ts`.\n\n::: code-group\n\n```ts [plugin.ts]\nimport type { MyPlugin } from './types';\n\nexport const handler: MyPlugin['Handler'] = ({ plugin }) => {\n  // create an output file. it will not be\n  // generated until it contains nodes\n  const file = plugin.createFile({\n    id: plugin.name,\n    path: plugin.output,\n  });\n\n  plugin.forEach('operation', 'schema', (event) => {\n    if (event.type === 'operation') {\n      // do something with the operation model\n    } else if (event.type === 'schema') {\n      // do something with the schema model\n    }\n  });\n\n  // we're using the TypeScript Compiler API\n  const stringLiteral = ts.factory.createStringLiteral('Hello, world!');\n  const variableDeclaration = ts.factory.createVariableDeclaration(\n    'foo',\n    undefined,\n    undefined,\n    stringLiteral,\n  );\n  const node = ts.factory.createVariableStatement(\n    [ts.factory.createModifier(ts.SyntaxKind.ExportKeyword)],\n    ts.factory.createVariableDeclarationList([variableDeclaration], ts.NodeFlags.Const),\n  );\n\n  // add a node to our file\n  file.add(node);\n};\n```\n\n:::\n\n### Legacy Handler\n\nYou can also define an optional `handlerLegacy` function in `config.ts`. This method is responsible for generating the output when using the legacy parser. We do not recommend implementing this method unless you must use the legacy parser. You can use one of our [`plugin-legacy.ts`](https://github.com/hey-api/openapi-ts/blob/main/packages/openapi-ts/src/plugins/%40hey-api/typescript/plugin-legacy.ts) files as an inspiration for potential implementation.\n\n## Usage\n\nOnce we're satisfied with our plugin, we can register it in the [configuration](/openapi-ts/configuration) file.\n\n```js\nimport { defineConfig } from 'path/to/my-plugin';\n\nexport default {\n  input: 'hey-api/backend', // sign up at app.heyapi.dev\n  output: 'src/client',\n  plugins: [\n    defineConfig({\n      myOption: true,\n    }),\n  ],\n};\n```\n\n## Output\n\nPutting all of this together will generate the following `my-plugin.gen.ts` file.\n\n::: code-group\n\n```ts [my-plugin.gen.ts]\nexport const foo = 'Hello, world!';\n```\n\n:::\n\nCongratulations! You've successfully created your own plugin! :tada:\n\n<!--@include: ../../partials/examples.md-->\n<!--@include: ../../partials/sponsors.md-->\n"
  },
  {
    "path": "docs/openapi-ts/plugins/elysia.md",
    "content": "---\ntitle: Elysia\ndescription: Elysia plugin for Hey API. Compatible with all our features.\n---\n\n<script setup lang=\"ts\">\nimport FeatureStatus from '@components/FeatureStatus.vue';\n</script>\n\n# Elysia <span data-soon>soon</span>\n\n<FeatureStatus issueNumber=2676 name=\"Elysia\" />\n\n### About\n\n[Elysia](https://elysiajs.com/) is an ergonomic framework for humans. TypeScript with end-to-end type safety, type integrity, and exceptional developer experience. Supercharged by Bun.\n\n<!--@include: ../../partials/sponsors.md-->\n"
  },
  {
    "path": "docs/openapi-ts/plugins/express.md",
    "content": "---\ntitle: Express\ndescription: Express plugin for Hey API. Compatible with all our features.\n---\n\n<script setup lang=\"ts\">\nimport FeatureStatus from '@components/FeatureStatus.vue';\n</script>\n\n# Express <span data-soon>soon</span>\n\n<FeatureStatus issueNumber=1484 name=\"Express\" />\n\n### About\n\n[Express](https://expressjs.com) is a minimal and flexible Node.js web application framework that provides a robust set of features for web and mobile applications.\n\n<!--@include: ../../partials/sponsors.md-->\n"
  },
  {
    "path": "docs/openapi-ts/plugins/faker.md",
    "content": "---\ntitle: Faker\ndescription: Faker plugin for Hey API. Compatible with all our features.\n---\n\n<script setup lang=\"ts\">\nimport FeatureStatus from '@components/FeatureStatus.vue';\n</script>\n\n# Faker <span data-soon>soon</span>\n\n<FeatureStatus issueNumber=1485 name=\"Faker\" />\n\n### About\n\n[Faker](https://fakerjs.dev) is a popular library that generates fake (but reasonable) data that can be used for things such as unit testing, performance testing, building demos, and working without a completed backend.\n\n<!--@include: ../../partials/sponsors.md-->\n"
  },
  {
    "path": "docs/openapi-ts/plugins/falso.md",
    "content": "---\ntitle: Falso\ndescription: Falso plugin for Hey API. Compatible with all our features.\n---\n\n<script setup lang=\"ts\">\nimport FeatureStatus from '@components/FeatureStatus.vue';\n</script>\n\n# Falso <span data-soon>soon</span>\n\n<FeatureStatus issueNumber=2496 name=\"Falso\" />\n\n### About\n\n[Falso](https://ngneat.github.io/falso/) creates massive amounts of fake data in the browser and NodeJS. Tree shakeable & fully typed.\n\n<!--@include: ../../partials/sponsors.md-->\n"
  },
  {
    "path": "docs/openapi-ts/plugins/fastify.md",
    "content": "---\ntitle: Fastify v5 Plugin\ndescription: Generate Fastify v5 route handlers from OpenAPI with the Fastify plugin for openapi-ts. Fully compatible with validators, transformers, and all core features.\n---\n\n<script setup lang=\"ts\">\nimport AuthorsList from '@components/AuthorsList.vue';\nimport Examples from '@components/Examples.vue';\nimport Heading from '@components/Heading.vue';\nimport { jacobCohen } from '@data/people.js';\nimport VersionLabel from '@components/VersionLabel.vue';\n</script>\n\n<Heading>\n  <h1>Fastify<span class=\"sr-only\"> v5</span></h1>\n  <VersionLabel value=\"v5\" />\n</Heading>\n\n::: warning\nFastify plugin is currently in beta. The interface might change before it becomes stable. We encourage you to leave feedback on [GitHub](https://github.com/hey-api/openapi-ts/issues).\n:::\n\n### About\n\n[Fastify](https://fastify.dev) is a fast and low overhead web framework for Node.js.\n\nThe Fastify plugin for Hey API generates route handlers from your OpenAPI spec, fully compatible with all core features.\n\n### Collaborators\n\n<AuthorsList :people=\"[jacobCohen]\" />\n\n## Features\n\n- Fastify v5 support\n- seamless integration with `@hey-api/openapi-ts` ecosystem\n- type-safe route handlers\n- minimal learning curve thanks to extending the underlying technology\n\n## Installation\n\nIn your [configuration](/openapi-ts/get-started), add `fastify` to your plugins and you'll be ready to generate Fastify artifacts. :tada:\n\n```js\nexport default {\n  input: 'hey-api/backend', // sign up at app.heyapi.dev\n  output: 'src/client',\n  plugins: [\n    // ...other plugins\n    'fastify', // [!code ++]\n  ],\n};\n```\n\n## Output\n\nThe Fastify plugin will generate the following artifacts, depending on the input specification.\n\n## Route Handlers\n\nRoute handlers are generated from all endpoints. The generated interface follows the naming convention of SDK functions.\n\n::: code-group\n\n```ts [example]\nconst fastify = Fastify();\nconst serviceHandlers: RouteHandlers = {\n  createPets(request, reply) {\n    reply.code(201).send();\n  },\n  listPets(request, reply) {\n    reply.code(200).send([]);\n  },\n  showPetById(request, reply) {\n    reply.code(200).send({\n      id: Number(request.params.petId),\n      name: 'Kitty',\n    });\n  },\n};\nfastify.register(glue, { serviceHandlers });\n```\n\n```js [config]\nexport default {\n  input: 'hey-api/backend', // sign up at app.heyapi.dev\n  output: 'src/client',\n  plugins: [\n    // ...other plugins\n    {\n      name: 'fastify',\n    },\n  ],\n};\n```\n\n:::\n\n## API\n\nYou can view the complete list of options in the [UserConfig](https://github.com/hey-api/openapi-ts/blob/main/packages/openapi-ts/src/plugins/fastify/types.ts) interface.\n\n<Examples githubExamplePath=\"/openapi-ts-fastify\" />\n\n<!--@include: ../../partials/sponsors.md-->\n"
  },
  {
    "path": "docs/openapi-ts/plugins/hono.md",
    "content": "---\ntitle: Hono\ndescription: Hono plugin for Hey API. Compatible with all our features.\n---\n\n<script setup lang=\"ts\">\nimport FeatureStatus from '@components/FeatureStatus.vue';\n</script>\n\n# Hono <span data-soon>soon</span>\n\n<FeatureStatus issueNumber=1483 name=\"Hono\" />\n\n### About\n\n[Hono](https://hono.dev) is a small, simple, and ultrafast web framework built on Web Standards. It works on any JavaScript runtime: Cloudflare Workers, Fastly Compute, Deno, Bun, Vercel, Netlify, AWS Lambda, Lambda@Edge, and Node.js.\n\n<!--@include: ../../partials/sponsors.md-->\n"
  },
  {
    "path": "docs/openapi-ts/plugins/joi.md",
    "content": "---\ntitle: Joi\ndescription: Joi plugin for Hey API. Compatible with all our features.\n---\n\n<script setup lang=\"ts\">\nimport FeatureStatus from '@components/FeatureStatus.vue';\n</script>\n\n# Joi <span data-soon>soon</span>\n\n<FeatureStatus issueNumber=1477 name=\"Joi\" />\n\n### About\n\n[Joi](https://joi.dev) is the most powerful schema description language and data validator for JavaScript.\n\n<!--@include: ../../partials/sponsors.md-->\n"
  },
  {
    "path": "docs/openapi-ts/plugins/koa.md",
    "content": "---\ntitle: Koa\ndescription: Koa plugin for Hey API. Compatible with all our features.\n---\n\n<script setup lang=\"ts\">\nimport FeatureStatus from '@components/FeatureStatus.vue';\n</script>\n\n# Koa <span data-soon>soon</span>\n\n<FeatureStatus issueNumber=1482 name=\"Koa\" />\n\n### About\n\n[Koa](https://koajs.com) is a new web framework designed by the team behind Express, which aims to be a smaller, more expressive, and more robust foundation for web applications and APIs.\n\n<!--@include: ../../partials/sponsors.md-->\n"
  },
  {
    "path": "docs/openapi-ts/plugins/msw.md",
    "content": "---\ntitle: MSW\ndescription: MSW plugin for Hey API. Compatible with all our features.\n---\n\n<script setup lang=\"ts\">\nimport FeatureStatus from '@components/FeatureStatus.vue';\n</script>\n\n# MSW <span data-soon>soon</span>\n\n<FeatureStatus issueNumber=1486 name=\"MSW\" />\n\n### About\n\n[MSW](https://mswjs.io) is an API mocking library that allows you to write client-agnostic mocks and reuse them across any frameworks, tools, and environments.\n\n<!--@include: ../../partials/sponsors.md-->\n"
  },
  {
    "path": "docs/openapi-ts/plugins/nest.md",
    "content": "---\ntitle: NestJS v11 Plugin\ndescription: Generate NestJS v11 controller methods from OpenAPI with the NestJS plugin for openapi-ts. Fully compatible with validators, transformers, and all core features.\n---\n\n<script setup lang=\"ts\">\nimport AuthorsList from '@components/AuthorsList.vue';\nimport Examples from '@components/Examples.vue';\nimport Heading from '@components/Heading.vue';\nimport { yuriMikhin } from '@data/people.js';\nimport VersionLabel from '@components/VersionLabel.vue';\n</script>\n\n<Heading>\n  <h1>NestJS<span class=\"sr-only\"> v11</span></h1>\n  <VersionLabel value=\"v11\" />\n</Heading>\n\n::: warning\nNestJS plugin is currently in beta. The interface might change before it becomes stable. We encourage you to leave feedback on [GitHub](https://github.com/hey-api/openapi-ts/issues).\n:::\n\n### About\n\n[Nest](https://nestjs.com) is a progressive Node.js framework for building efficient, reliable and scalable server-side applications.\n\nThe NestJS plugin for Hey API generates type-safe controller method signatures from your OpenAPI spec, fully compatible with all core features.\n\n### Collaborators\n\n<AuthorsList :people=\"[yuriMikhin]\" />\n\n## Features\n\n- NestJS v11 support\n- seamless integration with `@hey-api/openapi-ts` ecosystem\n- type-safe controller methods\n- minimal learning curve thanks to extending the underlying technology\n\n## Installation\n\nIn your [configuration](/openapi-ts/get-started), add `nestjs` to your plugins and you'll be ready to generate NestJS artifacts. :tada:\n\n```js\nexport default {\n  input: 'hey-api/backend', // sign up at app.heyapi.dev\n  output: 'src/client',\n  plugins: [\n    // ...other plugins\n    'nestjs', // [!code ++]\n  ],\n};\n```\n\n## Output\n\nThe NestJS plugin will generate the following artifacts, depending on the input specification.\n\n## Controller Methods\n\nOperations are grouped by their first tag into separate types.\n\n::: code-group\n\n```ts [example]\nexport type PetsControllerMethods = {\n  createPet: (body: CreatePetData['body']) => Promise<CreatePetResponse>;\n  listPets: (query?: ListPetsData['query']) => Promise<ListPetsResponse>;\n  showPetById: (path: ShowPetByIdData['path']) => Promise<ShowPetByIdResponse>;\n};\n\nexport type StoreControllerMethods = {\n  getInventory: () => Promise<GetInventoryResponse>;\n};\n```\n\n```ts [usage]\nimport { Body, Controller, Get, Param, Post, Query } from '@nestjs/common';\n\nimport type { PetsControllerMethods } from '../client/nestjs.gen';\nimport type { CreatePetData, ListPetsData, ShowPetByIdData } from '../client/types.gen';\n\n@Controller('pets')\nexport class PetsController implements Pick<\n  PetsControllerMethods,\n  'createPet' | 'listPets' | 'showPetById'\n> {\n  @Post()\n  async createPet(@Body() body: CreatePetData['body']) {}\n\n  @Get()\n  async listPets(@Query() query?: ListPetsData['query']) {}\n\n  @Get(':petId')\n  async showPetById(@Param() path: ShowPetByIdData['path']) {}\n}\n```\n\n:::\n\n## API\n\nYou can view the complete list of options in the [UserConfig](https://github.com/hey-api/openapi-ts/blob/main/packages/openapi-ts/src/plugins/nestjs/types.ts) interface.\n\n<Examples githubExamplePath=\"/openapi-ts-nestjs\" />\n\n<!--@include: ../../partials/sponsors.md-->\n"
  },
  {
    "path": "docs/openapi-ts/plugins/nock.md",
    "content": "---\ntitle: Nock\ndescription: Nock plugin for Hey API. Compatible with all our features.\n---\n\n<script setup lang=\"ts\">\nimport FeatureStatus from '@components/FeatureStatus.vue';\n</script>\n\n# Nock <span data-soon>soon</span>\n\n<FeatureStatus issueNumber=1487 name=\"Nock\" />\n\n### About\n\n[Nock](https://github.com/nock/nock) is an HTTP server mocking and expectations library for Node.js.\n\n<!--@include: ../../partials/sponsors.md-->\n"
  },
  {
    "path": "docs/openapi-ts/plugins/pinia-colada.md",
    "content": "---\ntitle: Pinia Colada v0 Plugin\ndescription: Generate Pinia Colada v0 functions and query keys from OpenAPI with the Pinia Colada plugin for openapi-ts. Fully compatible with validators, transformers, and all core features.\n---\n\n<script setup lang=\"ts\">\nimport AuthorsList from '@components/AuthorsList.vue';\nimport Heading from '@components/Heading.vue';\nimport VersionLabel from '@components/VersionLabel.vue';\nimport { joshHemphill, sebastiaanWouters, dmitriyBrolnickij } from '@data/people.js';\n</script>\n\n<Heading>\n  <h1>Pinia Colada<span class=\"sr-only\"> v0</span></h1>\n  <VersionLabel value=\"v0\" />\n</Heading>\n\n### About\n\n[Pinia Colada](https://pinia-colada.esm.dev) is the perfect companion to Pinia to handle async state management in your Vue applications.\n\nThe Pinia Colada plugin for Hey API generates functions and query keys from your OpenAPI spec, fully compatible with SDKs, transformers, and all core features.\n\n### Collaborators\n\n<AuthorsList :people=\"[dmitriyBrolnickij, joshHemphill, sebastiaanWouters]\" />\n\n## Features\n\n- Pinia Colada v0 support\n- seamless integration with `@hey-api/openapi-ts` ecosystem\n- create query keys following the best practices\n- type-safe query options and mutation options\n- minimal learning curve thanks to extending the underlying technology\n\n## Installation\n\nIn your [configuration](/openapi-ts/get-started), add `@pinia/colada` to your plugins and you'll be ready to generate Pinia Colada artifacts. :tada:\n\n```js\nexport default {\n  input: 'hey-api/backend', // sign up at app.heyapi.dev\n  output: 'src/client',\n  plugins: [\n    // ...other plugins\n    '@pinia/colada', // [!code ++]\n  ],\n};\n```\n\n::: tip\nWhen using this plugin in a Nuxt app, prefer the [ofetch client](/openapi-ts/clients/ofetch) for universal compatibility.\n\nThe [nuxt client](/openapi-ts/clients/nuxt) is tailored for working directly with Nuxt composables (`$fetch` / `useFetch` / `useAsyncData`) and is not intended as a universal HTTP client for libraries like `@pinia/colada`.\n:::\n\n## Output\n\nThe Pinia Colada plugin will generate the following artifacts, depending on the input specification.\n\n## Queries\n\nQueries are generated from [query operations](/openapi-ts/configuration/parser#hooks-query-operations). The generated query functions follow the naming convention of SDK functions and by default append `Query`, e.g., `getPetByIdQuery()`.\n\n::: code-group\n\n```ts [example]\nconst query = useQuery(getPetByIdQuery, () => ({\n  path: {\n    petId: 1,\n  },\n}));\n```\n\n```js [config]\nexport default {\n  input: 'hey-api/backend', // sign up at app.heyapi.dev\n  output: 'src/client',\n  plugins: [\n    // ...other plugins\n    {\n      name: '@pinia/colada',\n      queryOptions: true, // [!code ++]\n    },\n  ],\n};\n```\n\n:::\n\nYou can customize the naming and casing pattern for `queryOptions` functions using the `.name` and `.case` options.\n\n## Query Keys\n\nQuery keys contain normalized SDK function parameters and additional metadata.\n\n::: code-group\n\n```ts [example]\nconst queryKey = [\n  {\n    _id: 'getPetById',\n    baseUrl: 'https://app.heyapi.dev',\n    path: {\n      petId: 1,\n    },\n  },\n];\n```\n\n```js [config]\nexport default {\n  input: 'hey-api/backend', // sign up at app.heyapi.dev\n  output: 'src/client',\n  plugins: [\n    // ...other plugins\n    {\n      name: '@pinia/colada',\n      queryKeys: true, // [!code ++]\n    },\n  ],\n};\n```\n\n:::\n\n### Tags\n\nYou can include operation tags in your query keys by setting `tags` to `true`. This will make query keys larger but provides better cache invalidation capabilities.\n\n::: code-group\n\n```ts [example]\nconst key = [\n  {\n    _id: 'getPetById',\n    baseUrl: 'https://app.heyapi.dev',\n    path: {\n      petId: 1,\n    },\n    tags: ['pets', 'one', 'get'], // [!code ++]\n  },\n];\n```\n\n```js [config]\nexport default {\n  input: 'hey-api/backend', // sign up at app.heyapi.dev\n  output: 'src/client',\n  plugins: [\n    // ...other plugins\n    {\n      name: '@pinia/colada',\n      queryKeys: {\n        tags: true, // [!code ++]\n      },\n    },\n  ],\n};\n```\n\n:::\n\n### Accessing Query Keys\n\nIf you have access to the result of query options function, you can get the query key from the `key` field.\n\n::: code-group\n\n```ts [example]\nconst { key } = getPetByIdQuery({\n  path: {\n    petId: 1,\n  },\n});\n```\n\n```js [config]\nexport default {\n  input: 'hey-api/backend', // sign up at app.heyapi.dev\n  output: 'src/client',\n  plugins: [\n    // ...other plugins\n    {\n      name: '@pinia/colada',\n      queryOptions: true, // [!code ++]\n    },\n  ],\n};\n```\n\n:::\n\nAlternatively, you can access the same query key by calling query key functions. The generated query key functions follow the naming convention of SDK functions and by default append `QueryKey`, e.g., `getPetByIdQueryKey()`.\n\n::: code-group\n\n```ts [example]\nconst key = getPetByIdQueryKey({\n  path: {\n    petId: 1,\n  },\n});\n```\n\n```js [config]\nexport default {\n  input: 'hey-api/backend', // sign up at app.heyapi.dev\n  output: 'src/client',\n  plugins: [\n    // ...other plugins\n    {\n      name: '@pinia/colada',\n      queryKeys: true, // [!code ++]\n    },\n  ],\n};\n```\n\n:::\n\nYou can customize the naming and casing pattern for `queryKeys` functions using the `.name` and `.case` options.\n\n## Mutations\n\nMutations are generated from [mutation operations](/openapi-ts/configuration/parser#hooks-mutation-operations). The generated mutation functions follow the naming convention of SDK functions and by default append `Mutation`, e.g., `addPetMutation()`.\n\n::: code-group\n\n```ts [example]\nconst addPet = useMutation({\n  ...addPetMutation(),\n  onError: (error) => {\n    console.log(error);\n  },\n});\n\naddPet.mutate({\n  body: {\n    name: 'Kitty',\n  },\n});\n```\n\n```js [config]\nexport default {\n  input: 'hey-api/backend', // sign up at app.heyapi.dev\n  output: 'src/client',\n  plugins: [\n    // ...other plugins\n    {\n      name: '@pinia/colada',\n      mutationOptions: true, // [!code ++]\n    },\n  ],\n};\n```\n\n:::\n\nYou can customize the naming and casing pattern for `mutationOptions` functions using the `.name` and `.case` options.\n\n## API\n\nYou can view the complete list of options in the [UserConfig](https://github.com/hey-api/openapi-ts/blob/main/packages/openapi-ts/src/plugins/@pinia/colada/types.ts) interface.\n\n<!--@include: ../../partials/examples.md-->\n<!--@include: ../../partials/sponsors.md-->\n"
  },
  {
    "path": "docs/openapi-ts/plugins/schemas.md",
    "content": "---\ntitle: JSON Schema\ndescription: Learn about files generated with @hey-api/openapi-ts.\n---\n\n# JSON Schemas\n\nSchemas are located in the `schemas.gen.ts` file. This file contains runtime schemas generated from your OpenAPI specification definitions located in `#/components/schemas`. If you're using OpenAPI 3.1, your schemas are fully JSON Schema compliant and can be used with other tools supporting JSON Schema.\n\n## Configuration\n\nYou can modify the contents of `schemas.gen.ts` by configuring the `@hey-api/schemas` plugin. Note that you must specify the default plugins to preserve the default output.\n\n::: code-group\n\n```js [json]\nexport default {\n  input: 'hey-api/backend', // sign up at app.heyapi.dev\n  output: 'src/client',\n  plugins: [\n    // ...other plugins\n    {\n      name: '@hey-api/schemas',\n      type: 'json', // [!code ++]\n    },\n  ],\n};\n```\n\n```js [form]\nexport default {\n  input: 'hey-api/backend', // sign up at app.heyapi.dev\n  output: 'src/client',\n  plugins: [\n    // ...other plugins\n    {\n      name: '@hey-api/schemas',\n      type: 'form', // [!code ++]\n    },\n  ],\n};\n```\n\n```js [disabled]\nexport default {\n  input: 'hey-api/backend', // sign up at app.heyapi.dev\n  output: 'src/client',\n  plugins: [\n    // ...other plugins\n    '@hey-api/schemas', // [!code --]\n  ],\n};\n```\n\n:::\n\n## Output\n\nBelow is an example output generated in the `type: 'form'` style. Disabling schemas will not generate the `schemas.gen.ts` file.\n\n```ts\nexport const PetSchema = {\n  required: ['name'],\n  properties: {\n    id: {\n      type: 'integer',\n      format: 'int64',\n      example: 10,\n    },\n    name: {\n      type: 'string',\n      example: 'doggie',\n    },\n  },\n  type: 'object',\n} as const;\n```\n\n## Usage\n\nA great use case for schemas is client-side form input validation.\n\n```ts\nimport { $Schema } from './client/schemas.gen';\n\nconst maxInputLength = $Schema.properties.text.maxLength;\n\nif (userInput.length > maxInputLength) {\n  throw new Error(`Text length can't exceed ${maxInputLength} characters!`);\n}\n```\n\n## API\n\nYou can view the complete list of options in the [UserConfig](https://github.com/hey-api/openapi-ts/blob/main/packages/openapi-ts/src/plugins/@hey-api/schemas/types.ts) interface.\n\n<!--@include: ../../partials/examples.md-->\n<!--@include: ../../partials/sponsors.md-->\n"
  },
  {
    "path": "docs/openapi-ts/plugins/sdk.md",
    "content": "---\ntitle: SDK Plugin\ndescription: Generate SDKs from OpenAPI with the SDK plugin for openapi-ts. Fully compatible with validators, transformers, and all core features.\n---\n\n# SDK\n\n### About\n\nThe SDK plugin generates a high-level, ergonomic API layer on top of the low-level HTTP client.\n\nIt exposes typed functions or methods for each operation, with built-in auth handling, configurable request and response validation, and ready-to-use code examples.\n\n## Features\n\n- high-level SDK layer on top of the HTTP client\n- typed functions or methods per operation\n- built-in authentication handling\n- request and response validation\n- ready-to-use code examples\n\n## Installation\n\nIn your [configuration](/openapi-ts/get-started), add `@hey-api/sdk` to your plugins and you'll be ready to generate SDK artifacts. :tada:\n\n```js\nexport default {\n  input: 'hey-api/backend', // sign up at app.heyapi.dev\n  output: 'src/client',\n  plugins: [\n    // ...other plugins\n    '@hey-api/sdk', // [!code ++]\n  ],\n};\n```\n\n## Output\n\nThe SDK plugin supports a wide range of configuration options. This guide focuses on two main SDK formats: tree-shakeable functions and instantiable classes, but you can apply the same concepts to create more advanced configurations.\n\n## Flat\n\nThis is the default setting. Flat SDKs support tree-shaking, which can lead to a reduced bundle size. You select flat mode by setting `operations.strategy` to `flat`.\n\n::: code-group\n\n```ts [example]\nimport type { AddPetData } from './types.gen';\n\nexport const addPet = (options: Options<AddPetData>) => {\n  /** ... */\n};\n```\n\n```js [config]\nexport default {\n  input: 'hey-api/backend', // sign up at app.heyapi.dev\n  output: 'src/client',\n  plugins: [\n    // ...other plugins\n    {\n      name: '@hey-api/sdk',\n      operations: {\n        strategy: 'flat', // [!code ++]\n      },\n    },\n  ],\n};\n```\n\n:::\n\n## Instance\n\nClass SDKs do not support tree-shaking, which results in a larger bundle size, but you may prefer their syntax. You select class mode by setting `operations.strategy` to `single`.\n\n::: code-group\n\n```ts [example]\nimport type { AddPetData } from './types.gen';\n\nexport class Sdk extends HeyApiClient {\n  public addPet(options: Options<AddPetData>) {\n    /** ... */\n  }\n}\n```\n\n```js [config]\nexport default {\n  input: 'hey-api/backend', // sign up at app.heyapi.dev\n  output: 'src/client',\n  plugins: [\n    // ...other plugins\n    {\n      name: '@hey-api/sdk',\n      operations: {\n        strategy: 'single', // [!code ++]\n      },\n    },\n  ],\n};\n```\n\n:::\n\n### Name\n\nAs shown above, by default our SDK class is called `Sdk`. The first thing you'll likely want to do is change this to your preferred name, which you can do using `operation.containerName`.\n\n::: code-group\n\n<!-- prettier-ignore-start -->\n```ts [example]\nimport { client } from './client.gen';\nimport type { AddPetData, AddPetErrors, AddPetResponses } from './types.gen';\n\nexport class PetStore extends HeyApiClient { // [!code ++]\n  /** ... */\n}\n```\n<!-- prettier-ignore-end -->\n\n```js [config]\nexport default {\n  input: 'hey-api/backend', // sign up at app.heyapi.dev\n  output: 'src/client',\n  plugins: [\n    // ...other plugins\n    {\n      name: '@hey-api/sdk',\n      operations: {\n        containerName: 'PetStore', // [!code ++]\n        strategy: 'single',\n      },\n    },\n  ],\n};\n```\n\n:::\n\n### Structure\n\nWhile we try to infer the SDK structure from `operationId` fields, you'll likely want to customize it further. You can do this using `operations.nesting`.\n\nSimilar to the `operations.strategy` option, we provide a few presets. However, you gain the most control by providing your own function.\n\nTo demonstrate the power of this feature, let's nest a few endpoints inside a `Pet` class and rename them. Our original `addPet()` method will now become `pet.add()`. Notice that we use the built-in `OperationPath.fromOperationId()` helper to handle the remaining operations.\n\n::: code-group\n\n<!-- prettier-ignore-start -->\n```ts [example]\nimport { client } from './client.gen';\nimport type { AddPetData, AddPetErrors, AddPetResponses } from './types.gen';\n\nexport class Pet extends HeyApiClient {\n  public add(options: Options<PostPetData>) { // [!code ++]\n    /** ... */\n  }\n}\n\nexport class PetStore extends HeyApiClient {\n  get pet(): Pet { // [!code ++]\n    /** ... */\n  }\n}\n```\n<!-- prettier-ignore-end -->\n<!-- prettier-ignore-start -->\n```js [config]\nexport default {\n  input: 'hey-api/backend', // sign up at app.heyapi.dev\n  output: 'src/client',\n  plugins: [\n    // ...other plugins\n    {\n      name: '@hey-api/sdk',\n      operations: {\n        containerName: 'PetStore',\n        nesting(operation) {\n          if (operation.path === '/pet/{petId}' || operation.path === '/pet') { // [!code ++]\n            return ['pet', operation.operationId?.replace(/Pet/, '') // [!code ++]\n              || operation.method.toLocaleLowerCase()]; // [!code ++]\n          } // [!code ++]\n          return OperationPath.fromOperationId()(operation); // [!code ++]\n        },\n        strategy: 'single',\n      },\n    },\n  ],\n};\n```\n<!-- prettier-ignore-end -->\n\n:::\n\n## Auth\n\nMost APIs require some form of authentication, which is why the SDK plugin provides built-in auth mechanisms by default. All you need to do is return the data from the `auth()` function, and the SDK will handle serialization and encoding for you. There are several ways to do this, for example on the client instance.\n\n::: code-group\n\n```ts [example]\nimport { client } from './client.gen';\n\nclient.setConfig({\n  auth() {\n    return '<token>';\n  },\n});\n```\n\n```js [config]\nexport default {\n  input: 'hey-api/backend', // sign up at app.heyapi.dev\n  output: 'src/client',\n  plugins: [\n    // ...other plugins\n    {\n      auth: true, // [!code ++]\n      name: '@hey-api/sdk',\n    },\n  ],\n};\n```\n\n:::\n\n::: info\nThe SDK plugin currently supports only the `bearer` and `basic` auth schemes. [Open an issue](https://github.com/hey-api/openapi-ts/issues) if you'd like support for additional mechanisms.\n:::\n\n## Validators\n\nValidating data at runtime comes with a performance cost, which is why it's not enabled by default. To enable validation, set `validator` to `zod` or one of the available [validator plugins](/openapi-ts/validators). This will implicitly add the selected plugin with default values.\n\nFor a more granular approach, manually add a validator plugin and set `validator` to the plugin name or `true` to automatically select a compatible plugin. Until you customize the validator plugin, both approaches will produce the same default output.\n\n::: code-group\n\n<!-- prettier-ignore-start -->\n```ts [example]\nimport * as v from 'valibot';\n\nexport const addPet = (options: Options<AddPetData>) =>\n  (options.client ?? client).post<AddPetResponses, AddPetErrors>({\n    requestValidator: async (data) => // [!code ++]\n      await v.parseAsync(vAddPetData, data), // [!code ++]\n    responseValidator: async (data) => // [!code ++]\n      await v.parseAsync(vAddPetResponse, data), // [!code ++]\n    /** ... */\n  });\n```\n<!-- prettier-ignore-end -->\n\n```js [config]\nexport default {\n  input: 'hey-api/backend', // sign up at app.heyapi.dev\n  output: 'src/client',\n  plugins: [\n    // ...other plugins\n    {\n      name: '@hey-api/sdk',\n      validator: true, // or 'valibot' // [!code ++]\n    },\n    {\n      name: 'valibot', // customize (optional) // [!code ++]\n      // other options\n    },\n  ],\n};\n```\n\n:::\n\nYou can choose to validate only requests or responses.\n\n::: code-group\n\n```js [requests]\nexport default {\n  input: 'hey-api/backend', // sign up at app.heyapi.dev\n  output: 'src/client',\n  plugins: [\n    // ...other plugins\n    {\n      name: '@hey-api/sdk',\n      validator: {\n        request: 'zod', // [!code ++]\n      },\n    },\n  ],\n};\n```\n\n```js [responses]\nexport default {\n  input: 'hey-api/backend', // sign up at app.heyapi.dev\n  output: 'src/client',\n  plugins: [\n    // ...other plugins\n    {\n      name: '@hey-api/sdk',\n      validator: {\n        response: 'zod', // [!code ++]\n      },\n    },\n  ],\n};\n```\n\n:::\n\nLearn more about available validators on the [Validators](/openapi-ts/validators) page.\n\n## Code Examples\n\nThe SDK plugin can generate ready-to-use code examples for each operation, showing how to call the SDK methods with proper parameters and setup.\n\nExamples are not generated by default, but you can enable and customize them through the `examples` option. With the default settings, an example might look like this.\n\n::: code-group\n\n```ts [example]\nimport { PetStore } from 'your-package';\n\nawait new PetStore().addPet();\n```\n\n```js [config]\nexport default {\n  input: 'hey-api/backend', // sign up at app.heyapi.dev\n  output: 'src/client',\n  plugins: [\n    // ...other plugins\n    {\n      examples: true, // [!code ++]\n      name: '@hey-api/sdk',\n      operations: {\n        containerName: 'PetStore',\n        strategy: 'single',\n      },\n    },\n  ],\n};\n```\n\n:::\n\n### Module and Setup\n\nTo make examples more practical, configure `moduleName` to specify the package from which users import your SDK.\n\nNext, set `setupName` to indicate how users should instantiate the SDK, typically only once per application.\n\n::: code-group\n\n```ts [example]\nimport { PetStore } from '@petstore/client'; // [!code ++]\n\nconst client = new PetStore(); // [!code ++]\n\nawait client.addPet();\n```\n\n```js [config]\nexport default {\n  input: 'hey-api/backend', // sign up at app.heyapi.dev\n  output: 'src/client',\n  plugins: [\n    // ...other plugins\n    {\n      examples: {\n        moduleName: '@petstore/client', // [!code ++]\n        setupName: 'client', // [!code ++]\n      },\n      name: '@hey-api/sdk',\n      operations: {\n        containerName: 'PetStore',\n        strategy: 'single',\n      },\n    },\n  ],\n};\n```\n\n:::\n\n### Initialization\n\nOften, your SDK needs to be instantiated with an API key or other configuration. In examples, `importSetup` lets you control how the SDK is initialized.\n\n::: code-group\n\n<!-- prettier-ignore-start -->\n```ts [example]\nimport { PetStore } from '@petstore/client';\n\nconst client = new PetStore({ // [!code ++]\n  apiKey: 'YOUR_API_KEY', // [!code ++]\n}); // [!code ++]\n\nawait client.addPet();\n```\n<!-- prettier-ignore-end -->\n<!-- prettier-ignore-start -->\n```js [config]\nexport default {\n  input: 'hey-api/backend', // sign up at app.heyapi.dev\n  output: 'src/client',\n  plugins: [\n    // ...other plugins\n    {\n      examples: {\n        importSetup: ({ $, node }) => // [!code ++]\n          $.new( // [!code ++]\n            node.name, // [!code ++]\n            $.object() // [!code ++]\n              .pretty() // [!code ++]\n              .prop('apiKey', $.literal('YOUR_API_KEY')), // [!code ++]\n          ), // [!code ++]\n        moduleName: '@petstore/client',\n        setupName: 'client',\n      },\n      name: '@hey-api/sdk',\n      operations: {\n        containerName: 'PetStore',\n        strategy: 'single',\n      },\n    },\n  ],\n};\n```\n<!-- prettier-ignore-end -->\n\n:::\n\n### Import Style\n\nIf you re-export the generated SDK from your own module, you can adjust `importName` and `importKind` to match your actual import style.\n\n::: code-group\n\n<!-- prettier-ignore-start -->\n```ts [example]\nimport CatStore from '@petstore/client'; // [!code ++]\n\nconst client = new CatStore({ // [!code ++]\n  apiKey: 'YOUR_API_KEY',\n});\n\nawait client.addPet();\n```\n<!-- prettier-ignore-end -->\n\n```js [config]\nexport default {\n  input: 'hey-api/backend', // sign up at app.heyapi.dev\n  output: 'src/client',\n  plugins: [\n    // ...other plugins\n    {\n      examples: {\n        importKind: 'default', // [!code ++]\n        importName: 'CatStore', // [!code ++]\n        importSetup: ({ $, node }) =>\n          $(node.name).call($.object().pretty().prop('apiKey', $.literal('YOUR_API_KEY'))),\n        moduleName: '@petstore/client',\n        setupName: 'client',\n      },\n      name: '@hey-api/sdk',\n      operations: {\n        containerName: 'PetStore',\n        strategy: 'single',\n      },\n    },\n  ],\n};\n```\n\n:::\n\n### Payload\n\nYou can customize the example request using the `payload` option. Requests can also be customized selectively. For example, we can provide a default payload only for the `addPet()` method.\n\n::: code-group\n\n<!-- prettier-ignore-start -->\n```ts [example]\nimport CatStore from '@petstore/client';\n\nconst client = new CatStore({\n  apiKey: 'YOUR_API_KEY',\n});\n\nawait client.addPet({ // [!code ++]\n  petId: 1234, // [!code ++]\n}); // [!code ++]\n```\n<!-- prettier-ignore-end -->\n<!-- prettier-ignore-start -->\n```js [config]\nexport default {\n  input: 'hey-api/backend', // sign up at app.heyapi.dev\n  output: 'src/client',\n  plugins: [\n    // ...other plugins\n    {\n      examples: {\n        importKind: 'default',\n        importName: 'CatStore',\n        importSetup: ({ $, node }) =>\n          $(node.name).call(\n            $.object().pretty().prop('apiKey', $.literal('YOUR_API_KEY')),\n          ),\n        moduleName: '@petstore/client',\n        payload(operation, ctx) { // [!code ++]\n          const { $ } = ctx; // [!code ++]\n          if (operation.path === '/pet/{petId}' || operation.path === '/pet') { // [!code ++]\n            return $.object().pretty().prop('petId', $.literal(1234)); // [!code ++]\n          } // [!code ++]\n        }, // [!code ++]\n        setupName: 'client',\n      },\n      name: '@hey-api/sdk',\n      operations: {\n        containerName: 'PetStore',\n        strategy: 'single',\n      },\n    },\n  ],\n};\n```\n<!-- prettier-ignore-end -->\n\n:::\n\n### Display\n\nEnabling examples does not produce visible output on its own. Examples are written into the source specification and can be consumed by documentation tools such as [Mintlify](https://kutt.to/6vrYy9) or [Scalar](https://kutt.to/skQUVd). To persist that specification, enable [Source](/openapi-ts/configuration/output#source) generation.\n\n## API\n\nYou can view the complete list of options in the [UserConfig](https://github.com/hey-api/openapi-ts/blob/main/packages/openapi-ts/src/plugins/@hey-api/sdk/types.ts) interface.\n\n<!--@include: ../../partials/examples.md-->\n<!--@include: ../../partials/sponsors.md-->\n"
  },
  {
    "path": "docs/openapi-ts/plugins/superstruct.md",
    "content": "---\ntitle: Superstruct\ndescription: Superstruct plugin for Hey API. Compatible with all our features.\n---\n\n<script setup lang=\"ts\">\nimport FeatureStatus from '@components/FeatureStatus.vue';\n</script>\n\n# Superstruct <span data-soon>soon</span>\n\n<FeatureStatus issueNumber=1489 name=\"Superstruct\" />\n\n### About\n\n[Superstruct](https://docs.superstructjs.org) makes it easy to define interfaces and then validate JavaScript data against them.\n\n<!--@include: ../../partials/sponsors.md-->\n"
  },
  {
    "path": "docs/openapi-ts/plugins/supertest.md",
    "content": "---\ntitle: Supertest\ndescription: Supertest plugin for Hey API. Compatible with all our features.\n---\n\n<script setup lang=\"ts\">\nimport FeatureStatus from '@components/FeatureStatus.vue';\n</script>\n\n# Supertest <span data-soon>soon</span>\n\n<FeatureStatus issueNumber=1488 name=\"Supertest\" />\n\n### About\n\n[Supertest](https://github.com/ladjs/supertest) is a super-agent driven library for testing node.js HTTP servers using a fluent API.\n\n<!--@include: ../../partials/sponsors.md-->\n"
  },
  {
    "path": "docs/openapi-ts/plugins/swr.md",
    "content": "---\ntitle: SWR\ndescription: SWR plugin for Hey API. Compatible with all our features.\n---\n\n<script setup lang=\"ts\">\nimport FeatureStatus from '@components/FeatureStatus.vue';\n</script>\n\n# SWR <span data-soon>soon</span>\n\n<FeatureStatus issueNumber=1479 name=\"SWR\" />\n\n### About\n\n[SWR](https://swr.vercel.app) is a strategy to first return the data from cache (stale), then send the fetch request (revalidate), and finally come with the up-to-date data.\n\n<!--@include: ../../partials/sponsors.md-->\n"
  },
  {
    "path": "docs/openapi-ts/plugins/tanstack-query.md",
    "content": "---\ntitle: TanStack Query v5 Plugin\ndescription: Generate TanStack Query v5 functions and query keys from OpenAPI with the TanStack Query plugin for openapi-ts. Fully compatible with validators, transformers, and all core features.\n---\n\n<script setup lang=\"ts\">\nimport Heading from '@components/Heading.vue';\nimport VersionLabel from '@components/VersionLabel.vue';\n\nimport { embedProject } from '../../embed'\n</script>\n\n<Heading>\n  <h1>TanStack Query<span class=\"sr-only\"> v5</span></h1>\n  <VersionLabel value=\"v5\" />\n</Heading>\n\n### About\n\n[TanStack Query](https://tanstack.com/query) is a powerful asynchronous state management solution for TypeScript/JavaScript, React, Solid, Vue, Svelte, Angular, and Preact.\n\nThe TanStack Query plugin for Hey API generates functions and query keys from your OpenAPI spec, fully compatible with SDKs, transformers, and all core features.\n\n### Demo\n\n<button class=\"buttonLink\" @click=\"(event) => embedProject('hey-api-client-fetch-plugin-tanstack-react-query-example')(event)\">\nLaunch demo\n</button>\n\n## Features\n\n- TanStack Query v5 support\n- seamless integration with `@hey-api/openapi-ts` ecosystem\n- create query keys following the best practices\n- type-safe query options, infinite query options, and mutation options\n- minimal learning curve thanks to extending the underlying technology\n\n## Installation\n\nIn your [configuration](/openapi-ts/get-started), add TanStack Query to your plugins and you'll be ready to generate TanStack Query artifacts. :tada:\n\n::: code-group\n\n```js [react]\nexport default {\n  input: 'hey-api/backend', // sign up at app.heyapi.dev\n  output: 'src/client',\n  plugins: [\n    // ...other plugins\n    '@tanstack/react-query', // [!code ++]\n  ],\n};\n```\n\n```js [vue]\nexport default {\n  input: 'hey-api/backend', // sign up at app.heyapi.dev\n  output: 'src/client',\n  plugins: [\n    // ...other plugins\n    '@tanstack/vue-query', // [!code ++]\n  ],\n};\n```\n\n```js [angular]\nexport default {\n  input: 'hey-api/backend', // sign up at app.heyapi.dev\n  output: 'src/client',\n  plugins: [\n    // ...other plugins\n    '@tanstack/angular-query-experimental', // [!code ++]\n  ],\n};\n```\n\n```js [svelte]\nexport default {\n  input: 'hey-api/backend', // sign up at app.heyapi.dev\n  output: 'src/client',\n  plugins: [\n    // ...other plugins\n    '@tanstack/svelte-query', // [!code ++]\n  ],\n};\n```\n\n```js [solid]\nexport default {\n  input: 'hey-api/backend', // sign up at app.heyapi.dev\n  output: 'src/client',\n  plugins: [\n    // ...other plugins\n    '@tanstack/solid-query', // [!code ++]\n  ],\n};\n```\n\n```js [preact]\nexport default {\n  input: 'hey-api/backend', // sign up at app.heyapi.dev\n  output: 'src/client',\n  plugins: [\n    // ...other plugins\n    '@tanstack/preact-query', // [!code ++]\n  ],\n};\n```\n\n:::\n\n## Output\n\nThe TanStack Query plugin will generate the following artifacts, depending on the input specification.\n\n## Queries\n\nQueries are generated from [query operations](/openapi-ts/configuration/parser#hooks-query-operations). The generated query functions follow the naming convention of SDK functions and by default append `Options`, e.g., `getPetByIdOptions()`.\n\n::: code-group\n\n```ts [example]\nconst query = useQuery({\n  ...getPetByIdOptions({\n    path: {\n      petId: 1,\n    },\n  }),\n});\n```\n\n```js [config]\nexport default {\n  input: 'hey-api/backend', // sign up at app.heyapi.dev\n  output: 'src/client',\n  plugins: [\n    // ...other plugins\n    {\n      name: '@tanstack/react-query',\n      queryOptions: true, // [!code ++]\n    },\n  ],\n};\n```\n\n:::\n\nYou can customize the naming and casing pattern for `queryOptions` functions using the `.name` and `.case` options.\n\n### Meta\n\nYou can use the `meta` field to attach arbitrary information to a query. To generate metadata for `queryOptions`, provide a function to the `.meta` option.\n\n::: code-group\n\n```ts [example]\nqueryOptions({\n  // ...other fields\n  meta: {\n    id: 'getPetById',\n  },\n});\n```\n\n```js [config]\nexport default {\n  input: 'hey-api/backend', // sign up at app.heyapi.dev\n  output: 'src/client',\n  plugins: [\n    // ...other plugins\n    {\n      name: '@tanstack/react-query',\n      queryOptions: {\n        meta: (operation) => ({ id: operation.id }), // [!code ++]\n      },\n    },\n  ],\n};\n```\n\n:::\n\n## Query Keys\n\nQuery keys contain normalized SDK function parameters and additional metadata.\n\n::: code-group\n\n```ts [example]\nconst queryKey = [\n  {\n    _id: 'getPetById',\n    baseUrl: 'https://app.heyapi.dev',\n    path: {\n      petId: 1,\n    },\n  },\n];\n```\n\n```js [config]\nexport default {\n  input: 'hey-api/backend', // sign up at app.heyapi.dev\n  output: 'src/client',\n  plugins: [\n    // ...other plugins\n    {\n      name: '@tanstack/react-query',\n      queryKeys: true, // [!code ++]\n    },\n  ],\n};\n```\n\n:::\n\n### Tags\n\nYou can include operation tags in your query keys by setting `tags` to `true`. This will make query keys larger but provides better cache invalidation capabilities.\n\n::: code-group\n\n```ts [example]\nconst queryKey = [\n  {\n    _id: 'getPetById',\n    baseUrl: 'https://app.heyapi.dev',\n    path: {\n      petId: 1,\n    },\n    tags: ['pets', 'one', 'get'], // [!code ++]\n  },\n];\n```\n\n```js [config]\nexport default {\n  input: 'hey-api/backend', // sign up at app.heyapi.dev\n  output: 'src/client',\n  plugins: [\n    // ...other plugins\n    {\n      name: '@tanstack/react-query',\n      queryKeys: {\n        tags: true, // [!code ++]\n      },\n    },\n  ],\n};\n```\n\n:::\n\n### Accessing Query Keys\n\nIf you have access to the result of query options function, you can get the query key from the `queryKey` field.\n\n::: code-group\n\n```ts [example]\nconst { queryKey } = getPetByIdOptions({\n  path: {\n    petId: 1,\n  },\n});\n```\n\n```js [config]\nexport default {\n  input: 'hey-api/backend', // sign up at app.heyapi.dev\n  output: 'src/client',\n  plugins: [\n    // ...other plugins\n    {\n      name: '@tanstack/react-query',\n      queryOptions: true, // [!code ++]\n    },\n  ],\n};\n```\n\n:::\n\nAlternatively, you can access the same query key by calling query key functions. The generated query key functions follow the naming convention of SDK functions and by default append `QueryKey`, e.g., `getPetByIdQueryKey()`.\n\n::: code-group\n\n```ts [example]\nconst queryKey = getPetByIdQueryKey({\n  path: {\n    petId: 1,\n  },\n});\n```\n\n```js [config]\nexport default {\n  input: 'hey-api/backend', // sign up at app.heyapi.dev\n  output: 'src/client',\n  plugins: [\n    // ...other plugins\n    {\n      name: '@tanstack/react-query',\n      queryKeys: true, // [!code ++]\n    },\n  ],\n};\n```\n\n:::\n\nYou can customize the naming and casing pattern for `queryKeys` functions using the `.name` and `.case` options.\n\n## Infinite Queries\n\nInfinite queries are generated from [query operations](/openapi-ts/configuration/parser#hooks-query-operations) if we detect a [pagination](/openapi-ts/configuration/parser#pagination) parameter. The generated infinite query functions follow the naming convention of SDK functions and by default append `InfiniteOptions`, e.g., `getFooInfiniteOptions()`.\n\n::: code-group\n\n```ts [example]\nconst query = useInfiniteQuery({\n  ...getFooInfiniteOptions({\n    path: {\n      fooId: 1,\n    },\n  }),\n  getNextPageParam: (lastPage, pages) => lastPage.nextCursor,\n  initialPageParam: 0,\n});\n```\n\n```js [config]\nexport default {\n  input: 'hey-api/backend', // sign up at app.heyapi.dev\n  output: 'src/client',\n  plugins: [\n    // ...other plugins\n    {\n      name: '@tanstack/react-query',\n      infiniteQueryOptions: true, // [!code ++]\n    },\n  ],\n};\n```\n\n:::\n\nYou can customize the naming and casing pattern for `infiniteQueryOptions` functions using the `.name` and `.case` options.\n\n### Meta\n\nYou can use the `meta` field to attach arbitrary information to a query. To generate metadata for `infiniteQueryOptions`, provide a function to the `.meta` option.\n\n::: code-group\n\n```ts [example]\ninfiniteQueryOptions({\n  // ...other fields\n  meta: {\n    id: 'getPetById',\n  },\n});\n```\n\n```js [config]\nexport default {\n  input: 'hey-api/backend', // sign up at app.heyapi.dev\n  output: 'src/client',\n  plugins: [\n    // ...other plugins\n    {\n      name: '@tanstack/react-query',\n      infiniteQueryOptions: {\n        meta: (operation) => ({ id: operation.id }), // [!code ++]\n      },\n    },\n  ],\n};\n```\n\n:::\n\n## Infinite Query Keys\n\nInfinite query keys contain normalized SDK function parameters and additional metadata.\n\n::: code-group\n\n```ts [example]\nconst queryKey = [\n  {\n    _id: 'getPetById',\n    _infinite: true,\n    baseUrl: 'https://app.heyapi.dev',\n    path: {\n      petId: 1,\n    },\n  },\n];\n```\n\n```js [config]\nexport default {\n  input: 'hey-api/backend', // sign up at app.heyapi.dev\n  output: 'src/client',\n  plugins: [\n    // ...other plugins\n    {\n      name: '@tanstack/react-query',\n      infiniteQueryKeys: true, // [!code ++]\n    },\n  ],\n};\n```\n\n:::\n\n### Tags\n\nYou can include operation tags in your infinite query keys by setting `tags` to `true`. This will make query keys larger but provides better cache invalidation capabilities.\n\n::: code-group\n\n```ts [example]\nconst queryKey = [\n  {\n    _id: 'getPetById',\n    _infinite: true,\n    baseUrl: 'https://app.heyapi.dev',\n    path: {\n      petId: 1,\n    },\n    tags: ['pets', 'one', 'get'], // [!code ++]\n  },\n];\n```\n\n```js [config]\nexport default {\n  input: 'hey-api/backend', // sign up at app.heyapi.dev\n  output: 'src/client',\n  plugins: [\n    // ...other plugins\n    {\n      name: '@tanstack/react-query',\n      infiniteQueryKeys: {\n        tags: true, // [!code ++]\n      },\n    },\n  ],\n};\n```\n\n:::\n\n### Accessing Infinite Query Keys\n\nIf you have access to the result of infinite query options function, you can get the query key from the `queryKey` field.\n\n::: code-group\n\n```ts [example]\nconst { queryKey } = getPetByIdInfiniteOptions({\n  path: {\n    petId: 1,\n  },\n});\n```\n\n```js [config]\nexport default {\n  input: 'hey-api/backend', // sign up at app.heyapi.dev\n  output: 'src/client',\n  plugins: [\n    // ...other plugins\n    {\n      name: '@tanstack/react-query',\n      infiniteQueryOptions: true, // [!code ++]\n    },\n  ],\n};\n```\n\n:::\n\nAlternatively, you can access the same query key by calling query key functions. The generated query key functions follow the naming convention of SDK functions and by default append `InfiniteQueryKey`, e.g., `getPetByIdInfiniteQueryKey()`.\n\n::: code-group\n\n```ts [example]\nconst queryKey = getPetByIdInfiniteQueryKey({\n  path: {\n    petId: 1,\n  },\n});\n```\n\n```js [config]\nexport default {\n  input: 'hey-api/backend', // sign up at app.heyapi.dev\n  output: 'src/client',\n  plugins: [\n    // ...other plugins\n    {\n      name: '@tanstack/react-query',\n      infiniteQueryKeys: true, // [!code ++]\n    },\n  ],\n};\n```\n\n:::\n\nYou can customize the naming and casing pattern for `infiniteQueryKeys` functions using the `.name` and `.case` options.\n\n## Mutations\n\nMutations are generated from [mutation operations](/openapi-ts/configuration/parser#hooks-mutation-operations). The generated mutation functions follow the naming convention of SDK functions and by default append `Mutation`, e.g., `addPetMutation()`.\n\n::: code-group\n\n```ts [example]\nconst addPet = useMutation({\n  ...addPetMutation(),\n  onError: (error) => {\n    console.log(error);\n  },\n});\n\naddPet.mutate({\n  body: {\n    name: 'Kitty',\n  },\n});\n```\n\n```js [config]\nexport default {\n  input: 'hey-api/backend', // sign up at app.heyapi.dev\n  output: 'src/client',\n  plugins: [\n    // ...other plugins\n    {\n      name: '@tanstack/react-query',\n      mutationOptions: true, // [!code ++]\n    },\n  ],\n};\n```\n\n:::\n\nYou can customize the naming and casing pattern for `mutationOptions` functions using the `.name` and `.case` options.\n\n### Meta\n\nYou can use the `meta` field to attach arbitrary information to a mutation. To generate metadata for `mutationOptions`, provide a function to the `.meta` option.\n\n::: code-group\n\n```ts [example]\nconst mutationOptions = {\n  // ...other fields\n  meta: {\n    id: 'getPetById',\n  },\n};\n```\n\n```js [config]\nexport default {\n  input: 'hey-api/backend', // sign up at app.heyapi.dev\n  output: 'src/client',\n  plugins: [\n    // ...other plugins\n    {\n      name: '@tanstack/react-query',\n      mutationOptions: {\n        meta: (operation) => ({ id: operation.id }), // [!code ++]\n      },\n    },\n  ],\n};\n```\n\n:::\n\n## Reactivity\n\nIn Vue applications, you need to wrap the options functions in [`computed()`](https://vuejs.org/guide/essentials/computed) to make them reactive. Otherwise, TanStack Query won't know it should execute the query when its dependencies change.\n\n::: code-group\n\n```js [reactive]\n// ✅ Query will execute on `petId` change\nconst query = useQuery(\n  computed(() =>\n    getPetByIdOptions({\n      path: {\n        petId: petId.value,\n      },\n    }),\n  ),\n);\n```\n\n```js [static]\n// ❌ Query will execute only once\nconst query = useQuery(\n  getPetByIdOptions({\n    path: {\n      petId: petId.value,\n    },\n  }),\n);\n```\n\n:::\n\n## API\n\nYou can view the complete list of options in the [UserConfig](https://github.com/hey-api/openapi-ts/blob/main/packages/openapi-ts/src/plugins/@tanstack/react-query/types.ts) interface.\n\n<!--@include: ../../partials/examples.md-->\n<!--@include: ../../partials/sponsors.md-->\n"
  },
  {
    "path": "docs/openapi-ts/plugins/transformers.md",
    "content": "---\ntitle: Transformers\ndescription: Learn about transforming data with @hey-api/openapi-ts.\n---\n\n# Transformers\n\nJSON is the most commonly used data format in REST APIs. However, it does not map well to complex data types. For example, both regular strings and date strings become simple strings in JSON.\n\nOne approach to this problem is using a [JSON superset](https://github.com/blitz-js/superjson). For most people, switching formats is not feasible. That's why we provide the `@hey-api/transformers` plugin.\n\n::: warning\nTransformers currently handle only the most common use cases. If your data isn't being transformed as expected, we encourage you to leave feedback on [GitHub](https://github.com/hey-api/openapi-ts/issues).\n:::\n\n## Considerations\n\nBefore deciding whether transformers are right for you, let's explain how they work. Transformers generate a runtime file, therefore they impact the bundle size. We generate a single transformer per operation response for the most efficient result, just like a human engineer would.\n\n### Limitations\n\nTransformers handle only the most common scenarios. Some of the known limitations are:\n\n- union types are not transformed (e.g., if you have multiple possible response shapes)\n- only types defined through `$ref` are transformed\n- error responses are not transformed\n\nIf your data isn't being transformed as expected, we encourage you to leave feedback on [GitHub](https://github.com/hey-api/openapi-ts/issues).\n\n## Installation\n\nIn your [configuration](/openapi-ts/get-started), add `@hey-api/transformers` to your plugins and you'll be ready to generate transformers. :tada:\n\n```js\nexport default {\n  input: 'hey-api/backend', // sign up at app.heyapi.dev\n  output: 'src/client',\n  plugins: [\n    // ...other plugins\n    '@hey-api/transformers', // [!code ++]\n  ],\n};\n```\n\n## SDKs\n\nTo automatically transform response data in your SDKs, set `sdk.transformer` to `true`.\n\n```js\nexport default {\n  input: 'hey-api/backend', // sign up at app.heyapi.dev\n  output: 'src/client',\n  plugins: [\n    // ...other plugins\n    '@hey-api/transformers',\n    {\n      name: '@hey-api/sdk', // [!code ++]\n      transformer: true, // [!code ++]\n    },\n  ],\n};\n```\n\n## Dates\n\nTo convert date strings into `Date` objects, use the `dates` configuration option.\n\n```js\nexport default {\n  input: 'hey-api/backend', // sign up at app.heyapi.dev\n  output: 'src/client',\n  plugins: [\n    // ...other plugins\n    {\n      dates: true, // [!code ++]\n      name: '@hey-api/transformers',\n    },\n  ],\n};\n```\n\nThis will generate types that use `Date` instead of `string` and appropriate transformers. Note that third-party date packages are not supported at the moment.\n\n## BigInt\n\nThe `@hey-api/transformers` plugin will natively type all BigInts as `bigint` instead of `number`, which can affect arithmetic operations if your application previously used `number`. To force BigInts to be numbers, use the `bigint` configuration option.\n\n```js\nexport default {\n  input: 'hey-api/backend', // sign up at app.heyapi.dev\n  output: 'src/client',\n  plugins: [\n    // ...other plugins\n    {\n      bigint: true, // [!code ++]\n      name: '@hey-api/transformers',\n    },\n  ],\n};\n```\n\n## Example\n\nA generated response transformer might look something like this. Please note the example has been edited for brevity.\n\n::: code-group\n\n```ts [transformers.gen.ts]\nimport type { GetFooResponse } from './types.gen';\n\nconst quxSchemaResponseTransformer = (data: any) => {\n  if (data.baz) {\n    data.baz = new Date(data.baz);\n  }\n  return data;\n};\n\nconst bazSchemaResponseTransformer = (data: any) => {\n  data = quxSchemaResponseTransformer(data);\n  data.bar = new Date(data.bar);\n  return data;\n};\n\nexport const getFooResponseTransformer = async (data: any): Promise<GetFooResponse> => {\n  data = bazSchemaResponseTransformer(data);\n  return data;\n};\n```\n\n```ts [types.gen.ts]\nexport type Baz = Qux & {\n  id: 'Baz';\n} & {\n  foo: number;\n  bar: Date;\n  baz: 'foo' | 'bar' | 'baz';\n  qux: number;\n};\n\nexport type Qux = {\n  foo: number;\n  bar: number;\n  baz?: Date;\n  id: string;\n};\n\nexport type GetFooResponse = Baz;\n```\n\n:::\n\n## API\n\nYou can view the complete list of options in the [UserConfig](https://github.com/hey-api/openapi-ts/blob/main/packages/openapi-ts/src/plugins/@hey-api/transformers/types.ts) interface.\n\n<!--@include: ../partials/sponsors.md-->\n"
  },
  {
    "path": "docs/openapi-ts/plugins/typebox.md",
    "content": "---\ntitle: TypeBox\ndescription: TypeBox plugin for Hey API. Compatible with all our features.\n---\n\n<script setup lang=\"ts\">\nimport FeatureStatus from '@components/FeatureStatus.vue';\n</script>\n\n# TypeBox <span data-soon>soon</span>\n\n<FeatureStatus issueNumber=1475 name=\"TypeBox\" />\n\n### About\n\n[TypeBox](https://github.com/sinclairzx81/typebox) is a JSON Schema type builder with static type resolution for TypeScript.\n\n<!--@include: ../../partials/sponsors.md-->\n"
  },
  {
    "path": "docs/openapi-ts/plugins/typescript.md",
    "content": "---\ntitle: TypeScript\ndescription: Learn about files generated with @hey-api/openapi-ts.\n---\n\n# TypeScript\n\nTypeScript interfaces are located in the `types.gen.ts` file. This is the only file that does not impact your bundle size and runtime performance. It will get discarded during build time, unless you configured to emit runtime [enums](#enums).\n\n## Installation\n\nIn your [configuration](/openapi-ts/get-started), add `@hey-api/typescript` to your plugins and you'll be ready to generate TypeScript artifacts. :tada:\n\n```js\nexport default {\n  input: 'hey-api/backend', // sign up at app.heyapi.dev\n  output: 'src/client',\n  plugins: [\n    // ...other plugins\n    '@hey-api/typescript', // [!code ++]\n  ],\n};\n```\n\n:::tip\nThe `@hey-api/typescript` plugin might be implicitly added to your `plugins` if another plugin depends on it.\n:::\n\n## Output\n\nThe TypeScript plugin will generate the following artifacts, depending on the input specification.\n\n## Requests\n\nA single request type is generated for each endpoint. It may contain a request body, parameters, and headers.\n\n```ts\nexport type AddPetData = {\n  body: {\n    id?: number;\n    name: string;\n  };\n  path?: never;\n  query?: never;\n  url: '/pets';\n};\n```\n\nYou can customize the naming and casing pattern for `requests` types using the `.name` and `.case` options.\n\n## Responses\n\nA single type is generated for all endpoint's responses.\n\n```ts\nexport type AddPetResponses = {\n  200: {\n    id?: number;\n    name: string;\n  };\n};\n\nexport type AddPetResponse = AddPetResponses[keyof AddPetResponses];\n```\n\nYou can customize the naming and casing pattern for `responses` types using the `.name` and `.case` options.\n\n## Definitions\n\nA type is generated for every reusable definition from your input.\n\n```ts\nexport type Pet = {\n  id?: number;\n  name: string;\n};\n```\n\nYou can customize the naming and casing pattern for `definitions` types using the `.name` and `.case` options.\n\n## Enums\n\nBy default, `@hey-api/typescript` will emit enums only as types. You may want to generate runtime artifacts. A good use case is iterating through possible field values without manually typing arrays. To emit runtime enums, set `enums` to a valid option.\n\n::: code-group\n\n```js [disabled]\nexport default {\n  input: 'hey-api/backend', // sign up at app.heyapi.dev\n  output: 'src/client',\n  plugins: [\n    // ...other plugins\n    {\n      enums: false, // default // [!code ++]\n      name: '@hey-api/typescript',\n    },\n  ],\n};\n```\n\n```js [javascript]\nexport default {\n  input: 'hey-api/backend', // sign up at app.heyapi.dev\n  output: 'src/client',\n  plugins: [\n    // ...other plugins\n    {\n      enums: 'javascript', // [!code ++]\n      name: '@hey-api/typescript',\n    },\n  ],\n};\n```\n\n```js [typescript]\nexport default {\n  input: 'hey-api/backend', // sign up at app.heyapi.dev\n  output: 'src/client',\n  plugins: [\n    // ...other plugins\n    {\n      enums: 'typescript', // [!code ++]\n      name: '@hey-api/typescript',\n    },\n  ],\n};\n```\n\n:::\n\nWe recommend exporting enums as plain JavaScript objects. [TypeScript enums](https://www.typescriptlang.org/docs/handbook/enums.html) are not a type-level extension of JavaScript and pose [typing challenges](https://dev.to/ivanzm123/dont-use-enums-in-typescript-they-are-very-dangerous-57bh).\n\n## Comments\n\nBy default, `@hey-api/typescript` will include comments in the generated code based on descriptions from your OpenAPI specification. If you want to reduce the size of your generated files or prefer cleaner output, you can disable comments.\n\n::: code-group\n\n```js [enabled]\nexport default {\n  input: 'hey-api/backend', // sign up at app.heyapi.dev\n  output: 'src/client',\n  plugins: [\n    // ...other plugins\n    {\n      comments: true, // default // [!code ++]\n      name: '@hey-api/typescript',\n    },\n  ],\n};\n```\n\n```js [disabled]\nexport default {\n  input: 'hey-api/backend', // sign up at app.heyapi.dev\n  output: 'src/client',\n  plugins: [\n    // ...other plugins\n    {\n      comments: false, // [!code ++]\n      name: '@hey-api/typescript',\n    },\n  ],\n};\n```\n\n:::\n\n## Resolvers\n\nYou can further customize this plugin's behavior using [resolvers](/openapi-ts/plugins/concepts/resolvers).\n\n## API\n\nYou can view the complete list of options in the [UserConfig](https://github.com/hey-api/openapi-ts/blob/main/packages/openapi-ts/src/plugins/@hey-api/typescript/types.ts) interface.\n\n<!--@include: ../../partials/examples.md-->\n<!--@include: ../../partials/sponsors.md-->\n"
  },
  {
    "path": "docs/openapi-ts/plugins/valibot.md",
    "content": "---\ntitle: Valibot v1 Plugin\ndescription: Generate Valibot v1 schemas from OpenAPI with the Valibot plugin for openapi-ts. Fully compatible with validators, transformers, and all core features.\n---\n\n<script setup lang=\"ts\">\nimport Heading from '@components/Heading.vue';\nimport VersionLabel from '@components/VersionLabel.vue';\n</script>\n\n<Heading>\n  <h1>Valibot<span class=\"sr-only\"> v1</span></h1>\n  <VersionLabel value=\"v1\" />\n</Heading>\n\n### About\n\n[Valibot](https://valibot.dev) is the open source schema library for TypeScript with bundle size, type safety and developer experience in mind.\n\nThe Valibot plugin for Hey API generates schemas from your OpenAPI spec, fully compatible with validators, transformers, and all core features.\n\n## Features\n\n- Valibot v1 support\n- seamless integration with `@hey-api/openapi-ts` ecosystem\n- Valibot schemas for requests, responses, and reusable definitions\n- minimal learning curve thanks to extending the underlying technology\n\n## Installation\n\nIn your [configuration](/openapi-ts/get-started), add `valibot` to your plugins and you'll be ready to generate Valibot artifacts. :tada:\n\n```js\nexport default {\n  input: 'hey-api/backend', // sign up at app.heyapi.dev\n  output: 'src/client',\n  plugins: [\n    // ...other plugins\n    'valibot', // [!code ++]\n  ],\n};\n```\n\n### SDKs\n\nTo add data validators to your SDKs, set `sdk.validator` to `true`.\n\n```js\nexport default {\n  input: 'hey-api/backend', // sign up at app.heyapi.dev\n  output: 'src/client',\n  plugins: [\n    // ...other plugins\n    'valibot',\n    {\n      name: '@hey-api/sdk', // [!code ++]\n      validator: true, // [!code ++]\n    },\n  ],\n};\n```\n\nLearn more about data validators in your SDKs on the [SDKs](/openapi-ts/plugins/sdk#validators) page.\n\n## Output\n\nThe Valibot plugin will generate the following artifacts, depending on the input specification.\n\n## Requests\n\nA single request schema is generated for each endpoint. It may contain a request body, parameters, and headers.\n\n::: code-group\n\n```ts [example]\nconst vData = v.object({\n  body: v.optional(\n    v.object({\n      foo: v.optional(v.string()),\n      bar: v.optional(v.union([v.number(), v.null()])),\n    }),\n  ),\n  path: v.object({\n    baz: v.string(),\n  }),\n  query: v.optional(v.never()),\n});\n```\n\n```js [config]\nexport default {\n  input: 'hey-api/backend', // sign up at app.heyapi.dev\n  output: 'src/client',\n  plugins: [\n    // ...other plugins\n    {\n      name: 'valibot',\n      requests: true, // [!code ++]\n    },\n  ],\n};\n```\n\n:::\n\n::: tip\nIf you need to access individual fields, you can do so using the [`.entries`](https://valibot.dev/api/object/) API. For example, we can get the request body schema with `vData.entries.body`.\n:::\n\nYou can customize the naming and casing pattern for `requests` schemas using the `.name` and `.case` options.\n\n## Responses\n\nA single Valibot schema is generated for all endpoint's responses. If the endpoint describes multiple responses, the generated schema is a union of all possible response shapes.\n\n::: code-group\n\n```ts [example]\nconst vResponse = v.union([\n  v.object({\n    foo: v.optional(v.string()),\n  }),\n  v.object({\n    bar: v.optional(v.number()),\n  }),\n]);\n```\n\n```js [config]\nexport default {\n  input: 'hey-api/backend', // sign up at app.heyapi.dev\n  output: 'src/client',\n  plugins: [\n    // ...other plugins\n    {\n      name: 'valibot',\n      responses: true, // [!code ++]\n    },\n  ],\n};\n```\n\n:::\n\nYou can customize the naming and casing pattern for `responses` schemas using the `.name` and `.case` options.\n\n## Definitions\n\nA Valibot schema is generated for every reusable definition from your input.\n\n::: code-group\n\n```ts [example]\nconst vFoo = v.pipe(v.number(), v.integer());\n\nconst vBar = v.object({\n  bar: v.optional(v.array(v.pipe(v.number(), v.integer()))),\n});\n```\n\n```js [config]\nexport default {\n  input: 'hey-api/backend', // sign up at app.heyapi.dev\n  output: 'src/client',\n  plugins: [\n    // ...other plugins\n    {\n      name: 'valibot',\n      definitions: true, // [!code ++]\n    },\n  ],\n};\n```\n\n:::\n\nYou can customize the naming and casing pattern for `definitions` schemas using the `.name` and `.case` options.\n\n## Metadata\n\nIt's often useful to associate a schema with some additional [metadata](https://valibot.dev/api/metadata/) for documentation, code generation, AI structured outputs, form validation, and other purposes. You can set `metadata` to `true` to attach descriptions to schemas when available.\n\n::: code-group\n\n```ts [example]\nexport const vFoo = v.pipe(\n  v.string(),\n  v.metadata({\n    description: 'Additional metadata',\n  }),\n);\n```\n\n```js [config]\nexport default {\n  input: 'hey-api/backend', // sign up at app.heyapi.dev\n  output: 'src/client',\n  plugins: [\n    // ...other plugins\n    {\n      name: 'valibot',\n      metadata: true, // [!code ++]\n    },\n  ],\n};\n```\n\n:::\n\nFor more control over metadata, you can provide your own function. It receives the source `schema`, the target `node` object, and the `$` builder for populating metadata.\n\n::: code-group\n\n```ts [example]\nexport const vFoo = v.pipe(\n  v.string(),\n  v.metadata({\n    hasTitle: false,\n    createdAt: 1735732800000,\n  }),\n);\n```\n\n<!-- prettier-ignore-start -->\n```js [config]\nexport default {\n  input: 'hey-api/backend', // sign up at app.heyapi.dev\n  output: 'src/client',\n  plugins: [\n    // ...other plugins\n    {\n      name: 'valibot',\n      metadata({ $, node, schema }) { // [!code ++]\n        node.prop('hasTitle', $.literal(Boolean(schema.title))); // [!code ++]\n        node.prop('createdAt', $.literal(Date.now())); // [!code ++]\n      }, // [!code ++]\n    },\n  ],\n};\n```\n<!-- prettier-ignore-end -->\n\n:::\n\n## Resolvers\n\nYou can further customize this plugin's behavior using [resolvers](/openapi-ts/plugins/concepts/resolvers).\n\n## API\n\nYou can view the complete list of options in the [UserConfig](https://github.com/hey-api/openapi-ts/blob/main/packages/openapi-ts/src/plugins/valibot/types.ts) interface.\n\n<!--@include: ../../partials/examples.md-->\n<!--@include: ../../partials/sponsors.md-->\n"
  },
  {
    "path": "docs/openapi-ts/plugins/yup.md",
    "content": "---\ntitle: Yup\ndescription: Yup plugin for Hey API. Compatible with all our features.\n---\n\n<script setup lang=\"ts\">\nimport FeatureStatus from '@components/FeatureStatus.vue';\n</script>\n\n# Yup <span data-soon>soon</span>\n\n<FeatureStatus issueNumber=1478 name=\"Yup\" />\n\n### About\n\n[Yup](https://github.com/jquense/yup) is a schema builder for runtime value parsing and validation.\n\n<!--@include: ../../partials/sponsors.md-->\n"
  },
  {
    "path": "docs/openapi-ts/plugins/zod/mini.md",
    "content": "---\ntitle: Zod Mini Plugin\ndescription: Generate Zod Mini schemas from OpenAPI with the Zod plugin for openapi-ts. Fully compatible with validators, transformers, and all core features.\n---\n\n<script setup lang=\"ts\">\nimport Heading from '@components/Heading.vue';\nimport ZodVersionSwitcher from '@versions/ZodVersionSwitcher.vue';\n</script>\n\n<Heading>\n  <h1>Zod<span class=\"sr-only\"> Mini</span></h1>\n  <ZodVersionSwitcher />\n</Heading>\n\n### About\n\n[Zod](https://zod.dev) is a TypeScript-first schema validation library with static type inference.\n\nThe Zod plugin for Hey API generates schemas from your OpenAPI spec, fully compatible with validators, transformers, and all core features.\n\n## Features\n\n- Zod Mini support\n- seamless integration with `@hey-api/openapi-ts` ecosystem\n- Zod schemas for requests, responses, and reusable definitions\n- minimal learning curve thanks to extending the underlying technology\n\n## Installation\n\nIn your [configuration](/openapi-ts/get-started), add `zod` to your plugins and you'll be ready to generate Zod artifacts. :tada:\n\n```js\nexport default {\n  input: 'hey-api/backend', // sign up at app.heyapi.dev\n  output: 'src/client',\n  plugins: [\n    // ...other plugins\n    {\n      name: 'zod', // [!code ++]\n      compatibilityVersion: 'mini', // [!code ++]\n    },\n  ],\n};\n```\n\n### SDKs\n\nTo add data validators to your SDKs, set `sdk.validator` to `true`.\n\n```js\nexport default {\n  input: 'hey-api/backend', // sign up at app.heyapi.dev\n  output: 'src/client',\n  plugins: [\n    // ...other plugins\n    {\n      name: 'zod',\n      compatibilityVersion: 'mini',\n    },\n    {\n      name: '@hey-api/sdk', // [!code ++]\n      validator: true, // [!code ++]\n    },\n  ],\n};\n```\n\nLearn more about data validators in your SDKs on the [SDKs](/openapi-ts/plugins/sdk#validators) page.\n\n## Output\n\nThe Zod plugin will generate the following artifacts, depending on the input specification.\n\n## Requests\n\nA single request schema is generated for each endpoint. It may contain a request body, parameters, and headers.\n\n::: code-group\n\n```ts [example]\nconst zData = z.object({\n  body: z\n    .object({\n      foo: z.optional(z.string()),\n      bar: z.optional(z.union([z.number(), z.null()])),\n    })\n    .optional(),\n  path: z.object({\n    baz: z.string(),\n  }),\n  query: z.optional(z.never()),\n});\n```\n\n```js [config]\nexport default {\n  input: 'hey-api/backend', // sign up at app.heyapi.dev\n  output: 'src/client',\n  plugins: [\n    // ...other plugins\n    {\n      name: 'zod',\n      compatibilityVersion: 'mini',\n      requests: true, // [!code ++]\n    },\n  ],\n};\n```\n\n:::\n\n::: tip\nIf you need to access individual fields, you can do so using the [`.def.shape`](https://zod.dev/api?id=shape) API. For example, we can get the request body schema with `zData.def.shape.body`.\n:::\n\nYou can customize the naming and casing pattern for `requests` schemas using the `.name` and `.case` options.\n\n## Responses\n\nA single Zod schema is generated for all endpoint's responses. If the endpoint describes multiple responses, the generated schema is a union of all possible response shapes.\n\n::: code-group\n\n```ts [example]\nconst zResponse = z.union([\n  z.object({\n    foo: z.optional(z.string()),\n  }),\n  z.object({\n    bar: z.optional(z.number()),\n  }),\n]);\n```\n\n```js [config]\nexport default {\n  input: 'hey-api/backend', // sign up at app.heyapi.dev\n  output: 'src/client',\n  plugins: [\n    // ...other plugins\n    {\n      name: 'zod',\n      compatibilityVersion: 'mini',\n      responses: true, // [!code ++]\n    },\n  ],\n};\n```\n\n:::\n\nYou can customize the naming and casing pattern for `responses` schemas using the `.name` and `.case` options.\n\n## Definitions\n\nA Zod schema is generated for every reusable definition from your input.\n\n::: code-group\n\n```ts [example]\nconst zFoo = z.int();\n\nconst zBar = z.object({\n  bar: z.optional(z.array(z.int())),\n});\n```\n\n```js [config]\nexport default {\n  input: 'hey-api/backend', // sign up at app.heyapi.dev\n  output: 'src/client',\n  plugins: [\n    // ...other plugins\n    {\n      name: 'zod',\n      compatibilityVersion: 'mini',\n      definitions: true, // [!code ++]\n    },\n  ],\n};\n```\n\n:::\n\nYou can customize the naming and casing pattern for `definitions` schemas using the `.name` and `.case` options.\n\n## ISO Datetimes\n\nBy default, values without a timezone or with a timezone offset are not allowed in the `z.iso.datetime()` method.\n\n### Timezone offsets\n\nYou can allow values with timezone offsets by setting `dates.offset` to `true`.\n\n::: code-group\n\n```ts [example]\nexport const zFoo = z.iso.datetime({ offset: true });\n```\n\n```js [config]\nexport default {\n  input: 'hey-api/backend', // sign up at app.heyapi.dev\n  output: 'src/client',\n  plugins: [\n    // ...other plugins\n    {\n      name: 'zod',\n      compatibilityVersion: 'mini',\n      dates: {\n        offset: true, // [!code ++]\n      },\n    },\n  ],\n};\n```\n\n:::\n\n### Local times\n\nYou can allow values without a timezone by setting `dates.local` to `true`.\n\n::: code-group\n\n```ts [example]\nexport const zFoo = z.iso.datetime({ local: true });\n```\n\n```js [config]\nexport default {\n  input: 'hey-api/backend', // sign up at app.heyapi.dev\n  output: 'src/client',\n  plugins: [\n    // ...other plugins\n    {\n      name: 'zod',\n      compatibilityVersion: 'mini',\n      dates: {\n        local: true, // [!code ++]\n      },\n    },\n  ],\n};\n```\n\n:::\n\n## Metadata\n\nIt's often useful to associate a schema with some additional [metadata](https://zod.dev/metadata) for documentation, code generation, AI structured outputs, form validation, and other purposes. You can set `metadata` to `true` to attach descriptions to schemas when available.\n\n::: code-group\n\n```ts [example]\nexport const zFoo = z.string().register(z.globalRegistry, {\n  description: 'Additional metadata',\n});\n```\n\n```js [config]\nexport default {\n  input: 'hey-api/backend', // sign up at app.heyapi.dev\n  output: 'src/client',\n  plugins: [\n    // ...other plugins\n    {\n      name: 'zod',\n      compatibilityVersion: 'mini',\n      metadata: true, // [!code ++]\n    },\n  ],\n};\n```\n\n:::\n\nFor more control over metadata, you can provide your own function. It receives the source `schema`, the target `node` object, and the `$` builder for populating metadata.\n\n::: code-group\n\n```ts [example]\nexport const zFoo = z.string().register(z.globalRegistry, {\n  hasTitle: true,\n  createdAt: 1735732800000,\n});\n```\n\n```js [config]\nexport default {\n  input: 'hey-api/backend', // sign up at app.heyapi.dev\n  output: 'src/client',\n  plugins: [\n    // ...other plugins\n    {\n      name: 'zod',\n      compatibilityVersion: 'mini',\n      metadata({ $, node, schema }) {\n        // [!code ++]\n        node.prop('hasTitle', $.literal(Boolean(schema.title))); // [!code ++]\n        node.prop('createdAt', $.literal(Date.now())); // [!code ++]\n      }, // [!code ++]\n    },\n  ],\n};\n```\n\n:::\n\n## Types\n\nIn addition to Zod schemas, you can generate schema-specific types. These can be generated for all schemas or for specific resources.\n\n::: code-group\n\n```ts [example]\nexport type ResponseZodType = z.infer<typeof zResponse>;\n```\n\n```js [config]\nexport default {\n  input: 'hey-api/backend', // sign up at app.heyapi.dev\n  output: 'src/client',\n  plugins: [\n    // ...other plugins\n    {\n      name: 'zod',\n      compatibilityVersion: 'mini',\n      types: {\n        infer: false, // by default, no `z.infer` types [!code ++]\n      },\n      responses: {\n        types: {\n          infer: true, // `z.infer` types only for response schemas [!code ++]\n        },\n      },\n    },\n  ],\n};\n```\n\n:::\n\nYou can customize the naming and casing pattern for schema-specific `types` using the `.name` and `.case` options.\n\n## Resolvers\n\nYou can further customize this plugin's behavior using [resolvers](/openapi-ts/plugins/concepts/resolvers).\n\n## API\n\nYou can view the complete list of options in the [UserConfig](https://github.com/hey-api/openapi-ts/blob/main/packages/openapi-ts/src/plugins/zod/types.ts) interface.\n\n<!--@include: ../../../partials/examples.md-->\n<!--@include: ../../../partials/sponsors.md-->\n"
  },
  {
    "path": "docs/openapi-ts/plugins/zod/v3.md",
    "content": "---\ntitle: Zod v3 Plugin\ndescription: Generate Zod v3 schemas from OpenAPI with the Zod plugin for openapi-ts. Fully compatible with validators, transformers, and all core features.\n---\n\n<script setup lang=\"ts\">\nimport Heading from '@components/Heading.vue';\nimport ZodVersionSwitcher from '@versions/ZodVersionSwitcher.vue';\n</script>\n\n<Heading>\n  <h1>Zod<span class=\"sr-only\"> v3</span></h1>\n  <ZodVersionSwitcher />\n</Heading>\n\n### About\n\n[Zod](https://v3.zod.dev/) is a TypeScript-first schema validation library with static type inference.\n\nThe Zod plugin for Hey API generates schemas from your OpenAPI spec, fully compatible with validators, transformers, and all core features.\n\n## Features\n\n- Zod v3 support\n- seamless integration with `@hey-api/openapi-ts` ecosystem\n- Zod schemas for requests, responses, and reusable definitions\n- minimal learning curve thanks to extending the underlying technology\n\n## Installation\n\nIn your [configuration](/openapi-ts/get-started), add `zod` to your plugins and you'll be ready to generate Zod artifacts. :tada:\n\n```js\nexport default {\n  input: 'hey-api/backend', // sign up at app.heyapi.dev\n  output: 'src/client',\n  plugins: [\n    // ...other plugins\n    {\n      name: 'zod', // [!code ++]\n      compatibilityVersion: 3, // [!code ++]\n    },\n  ],\n};\n```\n\n### SDKs\n\nTo add data validators to your SDKs, set `sdk.validator` to `true`.\n\n```js\nexport default {\n  input: 'hey-api/backend', // sign up at app.heyapi.dev\n  output: 'src/client',\n  plugins: [\n    // ...other plugins\n    {\n      name: 'zod',\n      compatibilityVersion: 3,\n    },\n    {\n      name: '@hey-api/sdk', // [!code ++]\n      validator: true, // [!code ++]\n    },\n  ],\n};\n```\n\nLearn more about data validators in your SDKs on the [SDKs](/openapi-ts/plugins/sdk#validators) page.\n\n## Output\n\nThe Zod plugin will generate the following artifacts, depending on the input specification.\n\n## Requests\n\nA single request schema is generated for each endpoint. It may contain a request body, parameters, and headers.\n\n::: code-group\n\n```ts [example]\nconst zData = z.object({\n  body: z\n    .object({\n      foo: z.string().optional(),\n      bar: z.union([z.number(), z.null()]).optional(),\n    })\n    .optional(),\n  path: z.object({\n    baz: z.string(),\n  }),\n  query: z.never().optional(),\n});\n```\n\n```js [config]\nexport default {\n  input: 'hey-api/backend', // sign up at app.heyapi.dev\n  output: 'src/client',\n  plugins: [\n    // ...other plugins\n    {\n      name: 'zod',\n      compatibilityVersion: 3,\n      requests: true, // [!code ++]\n    },\n  ],\n};\n```\n\n:::\n\n::: tip\nIf you need to access individual fields, you can do so using the [`.shape`](https://v3.zod.dev/?id=shape) API. For example, we can get the request body schema with `zData.shape.body`.\n:::\n\nYou can customize the naming and casing pattern for `requests` schemas using the `.name` and `.case` options.\n\n## Responses\n\nA single Zod schema is generated for all endpoint's responses. If the endpoint describes multiple responses, the generated schema is a union of all possible response shapes.\n\n::: code-group\n\n```ts [example]\nconst zResponse = z.union([\n  z.object({\n    foo: z.string().optional(),\n  }),\n  z.object({\n    bar: z.number().optional(),\n  }),\n]);\n```\n\n```js [config]\nexport default {\n  input: 'hey-api/backend', // sign up at app.heyapi.dev\n  output: 'src/client',\n  plugins: [\n    // ...other plugins\n    {\n      name: 'zod',\n      compatibilityVersion: 3,\n      responses: true, // [!code ++]\n    },\n  ],\n};\n```\n\n:::\n\nYou can customize the naming and casing pattern for `responses` schemas using the `.name` and `.case` options.\n\n## Definitions\n\nA Zod schema is generated for every reusable definition from your input.\n\n::: code-group\n\n```ts [example]\nconst zFoo = z.number().int();\n\nconst zBar = z.object({\n  bar: z.array(z.number().int()).optional(),\n});\n```\n\n```js [config]\nexport default {\n  input: 'hey-api/backend', // sign up at app.heyapi.dev\n  output: 'src/client',\n  plugins: [\n    // ...other plugins\n    {\n      name: 'zod',\n      compatibilityVersion: 3,\n      definitions: true, // [!code ++]\n    },\n  ],\n};\n```\n\n:::\n\nYou can customize the naming and casing pattern for `definitions` schemas using the `.name` and `.case` options.\n\n## ISO Datetimes\n\nBy default, values without a timezone or with a timezone offset are not allowed in the `z.string().datetime()` method.\n\n### Timezone offsets\n\nYou can allow values with timezone offsets by setting `dates.offset` to `true`.\n\n::: code-group\n\n```ts [example]\nexport const zFoo = z.string().datetime({ offset: true });\n```\n\n```js [config]\nexport default {\n  input: 'hey-api/backend', // sign up at app.heyapi.dev\n  output: 'src/client',\n  plugins: [\n    // ...other plugins\n    {\n      name: 'zod',\n      compatibilityVersion: 3,\n      dates: {\n        offset: true, // [!code ++]\n      },\n    },\n  ],\n};\n```\n\n:::\n\n### Local times\n\nYou can allow values without a timezone by setting `dates.local` to `true`.\n\n::: code-group\n\n```ts [example]\nexport const zFoo = z.string().datetime({ local: true });\n```\n\n```js [config]\nexport default {\n  input: 'hey-api/backend', // sign up at app.heyapi.dev\n  output: 'src/client',\n  plugins: [\n    // ...other plugins\n    {\n      name: 'zod',\n      compatibilityVersion: 3,\n      dates: {\n        local: true, // [!code ++]\n      },\n    },\n  ],\n};\n```\n\n:::\n\n## Metadata\n\nIt's often useful to associate a schema with some additional [metadata](https://v3.zod.dev/?id=describe) for documentation, code generation, AI structured outputs, form validation, and other purposes. If this is your use case, you can set `metadata` to `true` to generate additional metadata about schemas.\n\n::: code-group\n\n```ts [example]\nexport const zFoo = z.string().describe('Additional metadata');\n```\n\n```js [config]\nexport default {\n  input: 'hey-api/backend', // sign up at app.heyapi.dev\n  output: 'src/client',\n  plugins: [\n    // ...other plugins\n    {\n      name: 'zod',\n      compatibilityVersion: 3,\n      metadata: true, // [!code ++]\n    },\n  ],\n};\n```\n\n:::\n\n## Types\n\nIn addition to Zod schemas, you can generate schema-specific types. These can be generated for all schemas or for specific resources.\n\n::: code-group\n\n```ts [example]\nexport type ResponseZodType = z.infer<typeof zResponse>;\n```\n\n```js [config]\nexport default {\n  input: 'hey-api/backend', // sign up at app.heyapi.dev\n  output: 'src/client',\n  plugins: [\n    // ...other plugins\n    {\n      name: 'zod',\n      compatibilityVersion: 3,\n      types: {\n        infer: false, // by default, no `z.infer` types [!code ++]\n      },\n      responses: {\n        types: {\n          infer: true, // `z.infer` types only for response schemas [!code ++]\n        },\n      },\n    },\n  ],\n};\n```\n\n:::\n\nYou can customize the naming and casing pattern for schema-specific `types` using the `.name` and `.case` options.\n\n## Resolvers\n\nYou can further customize this plugin's behavior using [resolvers](/openapi-ts/plugins/concepts/resolvers).\n\n## API\n\nYou can view the complete list of options in the [UserConfig](https://github.com/hey-api/openapi-ts/blob/main/packages/openapi-ts/src/plugins/zod/types.ts) interface.\n\n<!--@include: ../../../partials/examples.md-->\n<!--@include: ../../../partials/sponsors.md-->\n"
  },
  {
    "path": "docs/openapi-ts/plugins/zod.md",
    "content": "---\ntitle: Zod v4 Plugin\ndescription: Generate Zod v4 schemas from OpenAPI with the Zod plugin for openapi-ts. Fully compatible with validators, transformers, and all core features.\n---\n\n<script setup lang=\"ts\">\nimport Heading from '@components/Heading.vue';\nimport ZodVersionSwitcher from '@versions/ZodVersionSwitcher.vue';\n</script>\n\n<Heading>\n  <h1>Zod<span class=\"sr-only\"> v4</span></h1>\n  <ZodVersionSwitcher />\n</Heading>\n\n### About\n\n[Zod](https://zod.dev) is a TypeScript-first schema validation library with static type inference.\n\nThe Zod plugin for Hey API generates schemas from your OpenAPI spec, fully compatible with validators, transformers, and all core features.\n\n## Features\n\n- Zod v4 support\n- seamless integration with `@hey-api/openapi-ts` ecosystem\n- Zod schemas for requests, responses, and reusable definitions\n- minimal learning curve thanks to extending the underlying technology\n\n## Installation\n\nIn your [configuration](/openapi-ts/get-started), add `zod` to your plugins and you'll be ready to generate Zod artifacts. :tada:\n\n```js\nexport default {\n  input: 'hey-api/backend', // sign up at app.heyapi.dev\n  output: 'src/client',\n  plugins: [\n    // ...other plugins\n    'zod', // [!code ++]\n  ],\n};\n```\n\n### SDKs\n\nTo add data validators to your SDKs, set `sdk.validator` to `true`.\n\n```js\nexport default {\n  input: 'hey-api/backend', // sign up at app.heyapi.dev\n  output: 'src/client',\n  plugins: [\n    // ...other plugins\n    'zod',\n    {\n      name: '@hey-api/sdk', // [!code ++]\n      validator: true, // [!code ++]\n    },\n  ],\n};\n```\n\nLearn more about data validators in your SDKs on the [SDKs](/openapi-ts/plugins/sdk#validators) page.\n\n## Output\n\nThe Zod plugin will generate the following artifacts, depending on the input specification.\n\n## Requests\n\nA single request schema is generated for each endpoint. It may contain a request body, parameters, and headers.\n\n::: code-group\n\n```ts [example]\nconst zData = z.object({\n  body: z\n    .object({\n      foo: z.optional(z.string()),\n      bar: z.optional(z.union([z.number(), z.null()])),\n    })\n    .optional(),\n  path: z.object({\n    baz: z.string(),\n  }),\n  query: z.optional(z.never()),\n});\n```\n\n```js [config]\nexport default {\n  input: 'hey-api/backend', // sign up at app.heyapi.dev\n  output: 'src/client',\n  plugins: [\n    // ...other plugins\n    {\n      name: 'zod',\n      requests: true, // [!code ++]\n    },\n  ],\n};\n```\n\n:::\n\n::: tip\nIf you need to access individual fields, you can do so using the [`.shape`](https://zod.dev/api?id=shape) API. For example, we can get the request body schema with `zData.shape.body`.\n:::\n\nYou can customize the naming and casing pattern for `requests` schemas using the `.name` and `.case` options.\n\n## Responses\n\nA single Zod schema is generated for all endpoint's responses. If the endpoint describes multiple responses, the generated schema is a union of all possible response shapes.\n\n::: code-group\n\n```ts [example]\nconst zResponse = z.union([\n  z.object({\n    foo: z.optional(z.string()),\n  }),\n  z.object({\n    bar: z.optional(z.number()),\n  }),\n]);\n```\n\n```js [config]\nexport default {\n  input: 'hey-api/backend', // sign up at app.heyapi.dev\n  output: 'src/client',\n  plugins: [\n    // ...other plugins\n    {\n      name: 'zod',\n      responses: true, // [!code ++]\n    },\n  ],\n};\n```\n\n:::\n\nYou can customize the naming and casing pattern for `responses` schemas using the `.name` and `.case` options.\n\n## Definitions\n\nA Zod schema is generated for every reusable definition from your input.\n\n::: code-group\n\n```ts [example]\nconst zFoo = z.int();\n\nconst zBar = z.object({\n  bar: z.optional(z.array(z.int())),\n});\n```\n\n```js [config]\nexport default {\n  input: 'hey-api/backend', // sign up at app.heyapi.dev\n  output: 'src/client',\n  plugins: [\n    // ...other plugins\n    {\n      name: 'zod',\n      definitions: true, // [!code ++]\n    },\n  ],\n};\n```\n\n:::\n\nYou can customize the naming and casing pattern for `definitions` schemas using the `.name` and `.case` options.\n\n## ISO Datetimes\n\nBy default, values without a timezone or with a timezone offset are not allowed in the `z.iso.datetime()` method.\n\n### Timezone offsets\n\nYou can allow values with timezone offsets by setting `dates.offset` to `true`.\n\n::: code-group\n\n```ts [example]\nexport const zFoo = z.iso.datetime({ offset: true });\n```\n\n```js [config]\nexport default {\n  input: 'hey-api/backend', // sign up at app.heyapi.dev\n  output: 'src/client',\n  plugins: [\n    // ...other plugins\n    {\n      name: 'zod',\n      dates: {\n        offset: true, // [!code ++]\n      },\n    },\n  ],\n};\n```\n\n:::\n\n### Local times\n\nYou can allow values without a timezone by setting `dates.local` to `true`.\n\n::: code-group\n\n```ts [example]\nexport const zFoo = z.iso.datetime({ local: true });\n```\n\n```js [config]\nexport default {\n  input: 'hey-api/backend', // sign up at app.heyapi.dev\n  output: 'src/client',\n  plugins: [\n    // ...other plugins\n    {\n      name: 'zod',\n      dates: {\n        local: true, // [!code ++]\n      },\n    },\n  ],\n};\n```\n\n:::\n\n## Metadata\n\nIt's often useful to associate a schema with some additional [metadata](https://zod.dev/metadata) for documentation, code generation, AI structured outputs, form validation, and other purposes. You can set `metadata` to `true` to attach descriptions to schemas when available.\n\n::: code-group\n\n```ts [example]\nexport const zFoo = z.string().register(z.globalRegistry, {\n  description: 'Additional metadata',\n});\n```\n\n```js [config]\nexport default {\n  input: 'hey-api/backend', // sign up at app.heyapi.dev\n  output: 'src/client',\n  plugins: [\n    // ...other plugins\n    {\n      name: 'zod',\n      metadata: true, // [!code ++]\n    },\n  ],\n};\n```\n\n:::\n\nFor more control over metadata, you can provide your own function. It receives the source `schema`, the target `node` object, and the `$` builder for populating metadata.\n\n::: code-group\n\n```ts [example]\nexport const zFoo = z.string().register(z.globalRegistry, {\n  hasTitle: true,\n  createdAt: 1735732800000,\n});\n```\n\n<!-- prettier-ignore-start -->\n```js [config]\nexport default {\n  input: 'hey-api/backend', // sign up at app.heyapi.dev\n  output: 'src/client',\n  plugins: [\n    // ...other plugins\n    {\n      name: 'zod',\n      metadata({ $, node, schema }) { // [!code ++]\n        node.prop('hasTitle', $.literal(Boolean(schema.title))); // [!code ++]\n        node.prop('createdAt', $.literal(Date.now())); // [!code ++]\n      }, // [!code ++]\n    },\n  ],\n};\n```\n<!-- prettier-ignore-end -->\n\n:::\n\n## Types\n\nIn addition to Zod schemas, you can generate schema-specific types. These can be generated for all schemas or for specific resources.\n\n::: code-group\n\n```ts [example]\nexport type ResponseZodType = z.infer<typeof zResponse>;\n```\n\n```js [config]\nexport default {\n  input: 'hey-api/backend', // sign up at app.heyapi.dev\n  output: 'src/client',\n  plugins: [\n    // ...other plugins\n    {\n      name: 'zod',\n      types: {\n        infer: false, // by default, no `z.infer` types [!code ++]\n      },\n      responses: {\n        types: {\n          infer: true, // `z.infer` types only for response schemas [!code ++]\n        },\n      },\n    },\n  ],\n};\n```\n\n:::\n\nYou can customize the naming and casing pattern for schema-specific `types` using the `.name` and `.case` options.\n\n## Resolvers\n\nYou can further customize this plugin's behavior using [resolvers](/openapi-ts/plugins/concepts/resolvers).\n\n## API\n\nYou can view the complete list of options in the [UserConfig](https://github.com/hey-api/openapi-ts/blob/main/packages/openapi-ts/src/plugins/zod/types.ts) interface.\n\n<!--@include: ../../partials/examples.md-->\n<!--@include: ../../partials/sponsors.md-->\n"
  },
  {
    "path": "docs/openapi-ts/plugins/zustand.md",
    "content": "---\ntitle: Zustand\ndescription: Zustand plugin for Hey API. Compatible with all our features.\n---\n\n<script setup lang=\"ts\">\nimport FeatureStatus from '@components/FeatureStatus.vue';\n</script>\n\n# Zustand <span data-soon>soon</span>\n\n<FeatureStatus issueNumber=1480 name=\"Zustand\" />\n\n### About\n\n[Zustand](https://zustand-demo.pmnd.rs) is a small, fast, and scalable bearbones state management solution.\n\n<!--@include: ../../partials/sponsors.md-->\n"
  },
  {
    "path": "docs/openapi-ts/state-management.md",
    "content": "---\ntitle: State Management\ndescription: Learn about handling state with @hey-api/openapi-ts.\n---\n\n# State Management\n\nAny reasonably large application will have to deal with state management at some point. State-related code is often one of the biggest boilerplates in your codebase. Well, at least until you start using our state management plugins.\n\n## Options\n\nHey API natively supports the following state managers.\n\n- [Pinia Colada](/openapi-ts/plugins/pinia-colada)\n- [TanStack Query](/openapi-ts/plugins/tanstack-query)\n- [SWR](/openapi-ts/plugins/swr) <span data-soon>Soon</span>\n- [Zustand](/openapi-ts/plugins/zustand) <span data-soon>Soon</span>\n\nDon't see your state manager? Let us know your interest by [opening an issue](https://github.com/hey-api/openapi-ts/issues).\n\n<!--@include: ../partials/examples.md-->\n<!--@include: ../partials/sponsors.md-->\n"
  },
  {
    "path": "docs/openapi-ts/validators.md",
    "content": "---\ntitle: Validators\ndescription: Learn about validating data with @hey-api/openapi-ts.\n---\n\n# Validators\n\nThere are times when you cannot blindly trust the server to return the correct data. You might be working on a critical application where any mistakes would be costly, or you're simply dealing with a legacy or undocumented system.\n\nWhatever your reason to use validators might be, you can rest assured that you're working with the correct data.\n\n## Features\n\n- seamless integration with `@hey-api/openapi-ts` ecosystem\n- schemas for requests, responses, and reusable definitions\n\n## Options\n\nHey API natively supports the following validators.\n\n- [Valibot](/openapi-ts/plugins/valibot)\n- [Zod](/openapi-ts/plugins/zod)\n- [Ajv](/openapi-ts/plugins/ajv) <span data-soon>Soon</span>\n- [Arktype](/openapi-ts/plugins/arktype) <span data-soon>Soon</span>\n- [Joi](/openapi-ts/plugins/joi) <span data-soon>Soon</span>\n- [TypeBox](/openapi-ts/plugins/typebox) <span data-soon>Soon</span>\n- [Yup](/openapi-ts/plugins/yup) <span data-soon>Soon</span>\n\nDon't see your validator? Let us know your interest by [opening an issue](https://github.com/hey-api/openapi-ts/issues).\n\n<!--@include: ../partials/examples.md-->\n<!--@include: ../partials/sponsors.md-->\n"
  },
  {
    "path": "docs/openapi-ts/web-frameworks.md",
    "content": "---\ntitle: Web Frameworks\ndescription: Learn about generating web framework code with @hey-api/openapi-ts.\n---\n\n# Web Frameworks\n\nThere are two approaches to developing APIs: code-first, where you start with the code, or spec-first, where you begin with the specification. If you use the latter, you can ensure your APIs adhere to the specification with our web framework plugins.\n\n## Options\n\nHey API natively supports the following frameworks.\n\n- [Angular](/openapi-ts/plugins/angular)\n- [Fastify](/openapi-ts/plugins/fastify)\n- [Nest](/openapi-ts/plugins/nest)\n- [Adonis](/openapi-ts/plugins/adonis) <span data-soon>Soon</span>\n- [Elysia](/openapi-ts/plugins/elysia) <span data-soon>Soon</span>\n- [Express](/openapi-ts/plugins/express) <span data-soon>Soon</span>\n- [Hono](/openapi-ts/plugins/hono) <span data-soon>Soon</span>\n- [Koa](/openapi-ts/plugins/koa) <span data-soon>Soon</span>\n\nDon't see your framework? Let us know your interest by [opening an issue](https://github.com/hey-api/openapi-ts/issues).\n\n<!--@include: ../partials/examples.md-->\n<!--@include: ../partials/sponsors.md-->\n"
  },
  {
    "path": "docs/package.json",
    "content": "{\n  \"name\": \"docs\",\n  \"version\": \"0.10.4\",\n  \"private\": true,\n  \"description\": \"Documentation for OpenAPI TypeScript.\",\n  \"type\": \"module\",\n  \"scripts\": {\n    \"build\": \"vitepress build\",\n    \"dev\": \"vitepress dev\",\n    \"preview\": \"vitepress preview\"\n  },\n  \"dependencies\": {\n    \"@stackblitz/sdk\": \"1.11.0\",\n    \"vue3-select-component\": \"0.16.0\"\n  },\n  \"devDependencies\": {\n    \"sharp\": \"0.34.5\",\n    \"vitepress\": \"2.0.0-alpha.16\",\n    \"vitepress-plugin-llms\": \"1.11.0\",\n    \"vue\": \"3.5.25\"\n  }\n}\n"
  },
  {
    "path": "docs/partials/contributors-list.md",
    "content": "- [Ahmed Rowaihi](https://github.com/ahmedrowaihi)\n- [Alessandro](https://github.com/ale18V)\n- [Alex Sagal](https://github.com/spikesagal)\n- [Alex Sarychev](https://github.com/Freddis)\n- [Alex Vukadinov](https://github.com/alexvuka1)\n- [Alex Yang](https://github.com/himself65)\n- [Alexander Horner](https://github.com/alexanderhorner)\n- [Alexander Skvortcov](https://github.com/askvortcov)\n- [Andrea](https://github.com/andreasciamanna)\n- [Andreas Adam](https://github.com/pixelmord)\n- [Ben Vincent](https://github.com/bvincent1)\n- [Björn Henriksson](https://github.com/bjornhenriksson)\n- [Bogdan ](https://github.com/BogdanMaier)\n- [Brian Tarricone](https://github.com/kelnos)\n- [Bryon Larrance](https://github.com/beelarr)\n- [Carl Kittelberger](https://github.com/icedream)\n- [Changwan](https://github.com/WooWan)\n- [Chris Wiggins](https://github.com/chriswiggins)\n- [Daniel Roe](https://github.com/danielroe)\n- [Daschi](https://github.com/Daschi1)\n- [David Bieregger](https://github.com/BierDav)\n- [David Ovčačík](https://github.com/dovca)\n- [Dmitriy Brolnickij](https://github.com/brolnickij)\n- [Erikwski](https://github.com/erikwski)\n- [Finn Poppinga](https://github.com/fpoppinga)\n- [Flo Edelmann](https://github.com/FloEdelmann)\n- [Florian Lutze](https://github.com/flow96)\n- [Francisco García](https://github.com/goltra)\n- [George Smith](https://github.com/georgesmith46)\n- [Gergan Penkov](https://github.com/gergan)\n- [Hector Ayala](https://github.com/bombillazo)\n- [Hiram Chirino](https://github.com/chirino)\n- [Idan Ben Ami](https://github.com/idbenami)\n- [Jan](https://github.com/JanST123)\n- [Jason Lee](https://github.com/LeeChSien)\n- [Jason Westover](https://github.com/j-westover)\n- [Jeff James](https://github.com/jsjames)\n- [Jianqi Pan](https://github.com/Jannchie)\n- [Jo](https://github.com/josh-hemphill)\n- [John Gozde](https://github.com/jgoz)\n- [Jordan Shatford](https://github.com/jordanshatford)\n- [Joshua](https://github.com/Joshua-hypt)\n- [Jostein Stuhaug](https://github.com/josstn)\n- [Juan Ibarra](https://github.com/j-ibarra)\n- [Julian Klumpers](https://github.com/julianklumpers)\n- [Karl Stoney](https://github.com/Stono)\n- [Keigo Ando](https://github.com/anchan828)\n- [Kenneth Apeland](https://github.com/kennidenni)\n- [Landon Gavin](https://github.com/seriouslag)\n- [Laurin](https://github.com/lausek)\n- [Lee Lian Hoy](https://github.com/bakakaba)\n- [Leo Developer](https://github.com/Le0Developer)\n- [Linus Fischer](https://github.com/LeiCraft)\n- [Louis Duchemin](https://github.com/lsdch)\n- [Lubos](https://github.com/mrlubos)\n- [Lukas Podmelle](https://github.com/lukaspodmelle)\n- [Luke Rohde](https://github.com/thyming)\n- [Maarten Knijnenberg](https://github.com/mknijnenberg)\n- [Mads Hougesen](https://github.com/hougesen)\n- [Malcolm Kee](https://github.com/malcolm-kee)\n- [Marcel Richter](https://github.com/mrclrchtr)\n- [Marek Lukáš](https://github.com/tajnymag)\n- [Martín Fernández](https://github.com/bilby91)\n- [Matsu](https://github.com/Matsuuu)\n- [Maurici Abad Gutierrez](https://github.com/mauriciabad)\n- [Max Scopp](https://github.com/max-scopp)\n- [Maximilian Dewald](https://github.com/maxdewald)\n- [Michał Grezel](https://github.com/dracomithril)\n- [Michiel Lankamp](https://github.com/mlankamp)\n- [Mika Vilpas](https://github.com/mikavilpas)\n- [Miklos](https://github.com/jumika)\n- [Nacho García](https://github.com/nachogarcia)\n- [Nicolas Chaulet](https://github.com/nicolas-chaulet)\n- [Niels Mokkenstorm](https://github.com/nmokkenstorm)\n- [Nikita Perepelitsa](https://github.com/quartepie)\n- [Nimo Beeren](https://github.com/nimobeeren)\n- [Novak Antonijevic](https://github.com/NovakAnton)\n- [Ondřej Maxa](https://github.com/maxa-ondrej)\n- [Pascal Ernst](https://github.com/LinuCC)\n- [Peter Graugaard](https://github.com/pgraug)\n- [Philipp Katz](https://github.com/qqilihq)\n- [Phuc Tran](https://github.com/Glup3)\n- [Rico](https://github.com/btmnk)\n- [Ryo Yamada](https://github.com/Liooo)\n- [Sebastiaan Wouters](https://github.com/SebastiaanWouters)\n- [Shinigami](https://github.com/Shinigami92)\n- [Simen Bekkhus](https://github.com/SimenB)\n- [Sipan Petrosyan](https://github.com/SipanP)\n- [Sjoerd Scheffer](https://github.com/ixnas)\n- [Stephen Zhou](https://github.com/hyoban)\n- [Stian Jensen](https://github.com/stianjensen)\n- [Vincent Olesen](https://github.com/volesen)\n- [Warren Seine](https://github.com/warrenseine)\n- [Will Mitchell](https://github.com/wn-mitch)\n- [Yuri Mikhin](https://github.com/mikhin)\n- [a1mer](https://github.com/a1mersnow)\n- [carson](https://github.com/carson2222)\n- [chrg1001](https://github.com/chrg1001)\n- [johnny kim](https://github.com/johnny-mh)\n- [0xfurai](https://github.com/0xfurai)\n- [9M6](https://github.com/9M6)\n- [Ben-Pfirsich](https://github.com/Ben-Pfirsich)\n- [Mxwllas](https://github.com/Mxwllas)\n- [RndUsername](https://github.com/RndUsername)\n- [Schroedi](https://github.com/Schroedi)\n- [alexedme](https://github.com/alexedme)\n- [ben-pietsch](https://github.com/ben-pietsch)\n- [fml09](https://github.com/fml09)\n- [henry-encord](https://github.com/henry-encord)\n- [hunshcn](https://github.com/hunshcn)\n- [jcx0](https://github.com/jcx0)\n- [maxdew-envelio](https://github.com/maxdew-envelio)\n- [nnzhadow](https://github.com/nnzhadow)\n- [renoschubert](https://github.com/renoschubert)\n"
  },
  {
    "path": "docs/partials/examples.md",
    "content": "## Examples\n\nYou can view live examples on [StackBlitz](https://stackblitz.com/orgs/github/hey-api/collections/openapi-ts-examples).\n"
  },
  {
    "path": "docs/partials/sponsors-list.md",
    "content": "### Gold\n\n<ul class=\"gold\">\n  <li>\n    <a href=\"https://kutt.to/pkEZyc\" style=\"height: 50px;\" target=\"_blank\">\n      <picture>\n        <source srcset=\"/assets/.gen/stainless-logo-wordmark-480w.webp\" media=\"(max-width: 480px)\" type=\"image/webp\" />\n        <source srcset=\"/assets/.gen/stainless-logo-wordmark-768w.webp\" media=\"(max-width: 768px)\" type=\"image/webp\" />\n        <source srcset=\"/assets/.gen/stainless-logo-wordmark-1200w.webp\" media=\"(min-width: 769px)\" type=\"image/webp\" />\n        <img alt=\"Stainless logo\" loading=\"lazy\" src=\"/assets/.gen/stainless-logo-wordmark-1200w.png\" />\n      </picture>\n    </a>\n    <p>\n      Best-in-class developer interfaces for your API.\n    </p>\n    <a href=\"https://kutt.to/pkEZyc\" target=\"_blank\">\n      stainless.com\n    </a>\n  </li>\n  <li>\n    <a href=\"https://kutt.to/QM9Q2N\" style=\"height: 50px;\" target=\"_blank\">\n      <svg width='640' height='115' viewBox='0 0 640 115' fill='none' xmlns='http://www.w3.org/2000/svg'><g clip-path='url(#clip0_1401_86353)'><mask id='mask0_1401_86353' style='mask-type:luminance' maskUnits='userSpaceOnUse' x='0' y='0' width='640' height='115'><path d='M640 0H0V115H640V0Z' fill='white'/></mask><g mask='url(#mask0_1401_86353)'><path d='M49.2308 32.8573H16.4103V82.143H49.2308V32.8573ZM65.641 98.5716H0V16.4287H65.641V98.5716Z' fill='currentColor'/><path d='M98.4649 82.143H131.285V32.8573H98.4649V82.143ZM147.696 98.5716H98.4649V115H82.0547V16.4287H147.696V98.5716Z' fill='currentColor'/><path d='M229.743 65.7144H180.512V82.143H229.743V98.5716H164.102V16.4287H229.743V65.7144ZM180.512 49.2859H213.332V32.8573H180.512V49.2859Z' fill='currentColor'/><path d='M295.387 32.8573H262.567V98.5716H246.156V16.4287H295.387V32.8573ZM311.797 98.5716H295.387V32.8573H311.797V98.5716Z' fill='currentColor'/><path d='M393.844 32.8573H344.613V82.143H393.844V98.5716H328.203V16.4287H393.844V32.8573Z' fill='currentColor'/><path d='M459.489 32.8573H426.668V82.143H459.489V32.8573ZM475.899 98.5716H410.258V16.4287H475.899V98.5716Z' fill='currentColor'/><path d='M541.535 32.8571H508.715V82.1428H541.535V32.8571ZM557.946 98.5714H492.305V16.4286H541.535V0H557.946V98.5714Z' fill='currentColor'/><path d='M590.77 32.8573V49.2859H623.59V32.8573H590.77ZM640 65.7144H590.77V82.143H640V98.5716H574.359V16.4287H640V65.7144Z' fill='currentColor'/></g></g><defs><clipPath id='clip0_1401_86353'><rect width='640' height='115' fill='white'/></clipPath></defs></svg>\n    </a>\n    <p>\n      The open source coding agent.\n    </p>\n    <a href=\"https://kutt.to/QM9Q2N\" target=\"_blank\">\n      opencode.ai\n    </a>\n  </li>\n  <li>\n    <a href=\"https://kutt.to/6vrYy9\" style=\"height: 50px;\" target=\"_blank\">\n      <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"208\" height=\"48\" fill=\"none\" viewBox=\"0 0 104 24\"><path fill=\"currentColor\" d=\"M18.473 9.605V3.914c0-.61-.496-1.098-1.098-1.098h-5.688c-.894 0-1.779.177-2.601.514a6.75 6.75 0 0 0-2.203 1.478l-.045.044a6.729 6.729 0 0 0-1.725 3.036 6.958 6.958 0 0 1 1.655-.221 6.744 6.744 0 0 1 4.131 1.354 6.695 6.695 0 0 1 2.327 3.16 6.784 6.784 0 0 1 .168 4 6.77 6.77 0 0 0 3.035-1.725l.044-.044a6.894 6.894 0 0 0 1.477-2.205 6.722 6.722 0 0 0 .514-2.602h.009Z\"/><path fill=\"currentColor\" d=\"M4.943 9.51a6.738 6.738 0 0 1 1.93-4.674L2.142 9.57c-.018.018-.036.027-.053.044a6.736 6.736 0 0 0-1.966 4.303 6.767 6.767 0 0 0 1.137 4.268c.08.12.3.159.423.044l2.9-2.892a3.313 3.313 0 0 0 .758-3.465 6.691 6.691 0 0 1-.397-2.364ZM16.445 14.412a6.779 6.779 0 0 1-3.28 1.781 6.794 6.794 0 0 1-3.727-.229H9.42a3.323 3.323 0 0 0-3.464.75l-2.9 2.892a.271.271 0 0 0 .044.423 6.815 6.815 0 0 0 4.266 1.138 6.75 6.75 0 0 0 4.301-1.967l.044-.044 4.734-4.735v-.009ZM96.236 23.5h-3.552l2.503-5.649-5.005-11.25h3.575l2.916 7.053a.299.299 0 0 0 .553-.001l2.894-7.051h3.599L96.236 23.5Z\"/><path fill=\"currentColor\" d=\"M85.448 18.519V9.462h-2.407v-2.86h2.407v-1.55c0-1.414.43-2.526 1.287-3.336C87.593.906 88.682.5 90.001.5c.81 0 1.501.087 2.073.262v2.884c-.381-.143-.826-.214-1.335-.214-.715 0-1.231.158-1.549.476-.318.302-.477.819-.477 1.55v1.144h3.361v2.86h-3.36v9.057h-3.266ZM80.12 4.647a2.03 2.03 0 0 1-1.453-.596 2.017 2.017 0 0 1-.62-1.477c0-.572.206-1.057.62-1.454.413-.413.897-.62 1.453-.62.588 0 1.08.207 1.478.62.413.397.62.882.62 1.454s-.207 1.064-.62 1.477c-.397.398-.89.596-1.478.596ZM78.5 18.52V6.602h3.265v11.917H78.5ZM72.813 18.518V.643h3.265v17.875h-3.266ZM69.126 18.662c-1.335 0-2.431-.365-3.29-1.096-.842-.747-1.263-1.82-1.263-3.218V9.462h-2.407v-2.86h2.407V3.289h3.266v3.313h3.36v2.86h-3.36v4.243c0 .73.158 1.255.476 1.573.318.301.834.452 1.55.452.508 0 .953-.071 1.334-.214V18.4c-.572.175-1.263.262-2.073.262ZM49.943 18.52V6.601h3.266v.871c0 .147.2.213.298.102.728-.823 1.764-1.235 3.11-1.235 1.43 0 2.55.477 3.36 1.43.827.937 1.24 2.193 1.24 3.766v6.983h-3.265v-6.435c0-.874-.183-1.55-.549-2.026-.365-.493-.881-.739-1.549-.739-.794 0-1.438.286-1.93.858-.477.572-.715 1.414-.715 2.527v5.815h-3.266ZM45.878 4.647a2.03 2.03 0 0 1-1.454-.596 2.018 2.018 0 0 1-.62-1.477c0-.572.207-1.057.62-1.454.413-.413.898-.62 1.454-.62.588 0 1.08.207 1.478.62.413.397.62.882.62 1.454s-.207 1.064-.62 1.477c-.397.398-.89.596-1.478.596Zm-1.62 13.872V6.602h3.265v11.917h-3.266ZM38.715 18.52v-6.365c0-1.89-.62-2.836-1.86-2.836-.714 0-1.286.27-1.715.81-.413.54-.636 1.343-.668 2.408v5.982h-3.265v-6.364c0-1.89-.62-2.836-1.86-2.836-.73 0-1.31.286-1.739.858-.429.572-.643 1.414-.643 2.527v5.815h-3.266V6.602h3.265v.88c0 .146.198.21.294.1.721-.828 1.68-1.242 2.876-1.242 1.573 0 2.757.649 3.553 1.947.063.103.217.101.28-.002a3.735 3.735 0 0 1 1.435-1.35c.699-.397 1.406-.595 2.121-.595 1.414 0 2.51.469 3.29 1.406.778.938 1.167 2.225 1.167 3.861v6.912h-3.265Z\"/></svg>\n    </a>\n    <p>\n      The intelligent knowledge platform.\n    </p>\n    <a href=\"https://kutt.to/6vrYy9\" target=\"_blank\">\n      mintlify.com\n    </a>\n  </li>\n</ul>\n\n### Silver\n\n<ul class=\"silver\">\n  <li class=\"scalar\">\n    <a href=\"https://kutt.to/skQUVd\" style=\"height: 40px;\" target=\"_blank\">\n      <svg width=\"137\" height=\"44\" viewBox=\"0 0 137 44\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\"><g clip-path=\"url(#a)\"><path fill-rule=\"evenodd\" clip-rule=\"evenodd\" d=\"M26.268.247c.441 0 .883.368.883.883v9.858l6.915-6.99c.368-.367.956-.367 1.25 0l5.298 5.298c.294.294.368.883 0 1.177v.074l-6.99 6.915h9.86c.514 0 .882.368.882.883v7.43c0 .516-.368.884-.883.884h-9.858l6.989 6.915c.294.368.368.957 0 1.25l-5.297 5.298c-.294.294-.883.368-1.177 0h-.074l-6.916-6.99v9.86c0 .514-.367.882-.882.882h-7.43c-.516 0-.884-.368-.884-.883v-5.15c0-1.618.662-3.163 1.766-4.34l9.564-9.564a2.664 2.664 0 0 0 0-3.753l-9.49-9.49a6.18 6.18 0 0 1-1.84-4.34V1.13c0-.515.368-.883.883-.883zM10.892 4.072h.073l16.112 16.112a2.664 2.664 0 0 1 0 3.752L10.965 40.123c-.294.368-.883.368-1.25 0l-5.224-5.15c-.294-.368-.368-.883 0-1.25l6.989-7.063H1.622c-.515 0-.883-.368-.883-.883v-7.43c0-.516.368-.884.883-.884h9.858l-6.99-6.915a.996.996 0 0 1 0-1.251l5.224-5.224a.766.766 0 0 1 1.178 0\" fill=\"currentColor\"/></g><path d=\"M67.617 18.017q-.12-1.199-1.022-1.864-.902-.664-2.448-.664-1.052 0-1.775.297-.724.288-1.11.804a1.93 1.93 0 0 0-.378 1.17q-.02.544.228.951.258.407.704.704.447.287 1.031.506.585.208 1.25.357l1.824.436q1.33.298 2.44.794 1.11.495 1.923 1.22a5.1 5.1 0 0 1 1.26 1.705q.455.981.465 2.25-.01 1.864-.952 3.233-.931 1.358-2.697 2.112-1.754.743-4.233.743-2.46 0-4.284-.753-1.815-.754-2.836-2.231-1.01-1.488-1.06-3.679H60.1q.069 1.022.585 1.706.525.675 1.398 1.02.883.338 1.993.338 1.09 0 1.894-.317.813-.318 1.26-.883.445-.566.445-1.299 0-.684-.406-1.15-.398-.465-1.17-.793a12 12 0 0 0-1.874-.595l-2.211-.555q-2.568-.626-4.056-1.953-1.487-1.33-1.477-3.58-.01-1.845.982-3.222 1.001-1.379 2.746-2.152t3.966-.773q2.26 0 3.947.773 1.695.774 2.637 2.152t.972 3.192zM80.86 32.781q-2.34 0-4.025-.991a6.7 6.7 0 0 1-2.578-2.777q-.893-1.775-.893-4.085 0-2.34.903-4.105a6.7 6.7 0 0 1 2.588-2.766q1.675-1.001 3.986-1.001 1.993 0 3.49.723 1.497.724 2.37 2.033.872 1.309.961 3.074h-3.986q-.168-1.14-.892-1.835-.713-.703-1.874-.703-.981 0-1.715.535-.725.526-1.13 1.537-.408 1.01-.407 2.449 0 1.457.396 2.479.407 1.021 1.14 1.556.735.536 1.716.536.724 0 1.299-.298.584-.297.962-.862.386-.576.505-1.379h3.986q-.099 1.745-.952 3.074-.842 1.32-2.33 2.063t-3.52.743m13.012-.01q-1.458 0-2.598-.505a4.2 4.2 0 0 1-1.805-1.517q-.654-1.012-.654-2.519 0-1.27.466-2.132a3.8 3.8 0 0 1 1.27-1.388 6.2 6.2 0 0 1 1.824-.793 14 14 0 0 1 2.161-.377q1.329-.138 2.142-.258.813-.129 1.18-.376.367-.248.367-.734v-.06q0-.941-.595-1.457-.585-.516-1.666-.516-1.14 0-1.815.506-.674.495-.892 1.25l-3.906-.318q.297-1.388 1.17-2.4.871-1.02 2.25-1.566 1.388-.555 3.213-.555 1.269 0 2.43.297 1.17.297 2.071.922a4.5 4.5 0 0 1 1.438 1.606q.525.972.526 2.33v10.273h-4.006v-2.112h-.12a4.3 4.3 0 0 1-.98 1.26q-.615.534-1.478.842-.863.297-1.993.297m1.21-2.915q.931 0 1.645-.367.715-.376 1.12-1.011.407-.634.407-1.438v-1.616a2.3 2.3 0 0 1-.545.238q-.338.1-.763.188-.427.08-.853.15l-.773.108a5.2 5.2 0 0 0-1.3.347q-.555.238-.862.645-.307.396-.307.991 0 .863.624 1.319.635.446 1.606.446m14.03-17.679v20.307h-4.224V12.177zM116 32.771q-1.458 0-2.598-.505a4.2 4.2 0 0 1-1.805-1.517q-.654-1.012-.654-2.519 0-1.27.466-2.132a3.8 3.8 0 0 1 1.269-1.388 6.2 6.2 0 0 1 1.824-.793 14 14 0 0 1 2.162-.377q1.329-.138 2.142-.258.813-.129 1.18-.376.367-.248.367-.734v-.06q0-.941-.595-1.457-.585-.516-1.666-.516-1.14 0-1.815.506-.674.495-.892 1.25l-3.907-.318q.299-1.388 1.17-2.4.873-1.02 2.251-1.566 1.388-.555 3.213-.555 1.27 0 2.429.297 1.17.297 2.072.922a4.5 4.5 0 0 1 1.438 1.606q.525.972.525 2.33v10.273h-4.005v-2.112h-.119a4.3 4.3 0 0 1-.982 1.26q-.615.534-1.477.842-.863.297-1.993.297m1.209-2.915q.933 0 1.646-.367.714-.376 1.121-1.011.406-.634.406-1.438v-1.616a2.3 2.3 0 0 1-.545.238 10 10 0 0 1-.764.188q-.426.08-.852.15l-.774.108a5.2 5.2 0 0 0-1.299.347q-.555.238-.862.645-.308.396-.308.991 0 .863.625 1.319.635.446 1.606.446m9.807 2.628v-15.23h4.095v2.657h.158q.417-1.417 1.398-2.142.982-.733 2.261-.733.318 0 .684.04.367.039.645.108v3.749a5.5 5.5 0 0 0-.823-.16 7 7 0 0 0-.962-.069q-.932 0-1.666.407a3 3 0 0 0-1.15 1.11q-.416.714-.416 1.646v8.617z\" fill=\"currentColor\"/><defs><clipPath id=\"a\"><path fill=\"#fff\" d=\"M.739.248h43.627v43.627H.739z\"/></clipPath></defs></svg>\n    </a>\n    <a href=\"https://kutt.to/skQUVd\" target=\"_blank\">\n      scalar.com\n    </a>\n  </li>\n  <li class=\"fastapi\">\n    <a href=\"https://kutt.to/Dr9GuW\" style=\"height: 40px;\" target=\"_blank\">\n      <svg viewBox=\"0 0 346.524 63.977\" height=\"241.803\" width=\"1309.697\" xmlns=\"http://www.w3.org/2000/svg\"><g transform=\"matrix(.96564 0 0 .96252 -899.33 194.869)\"><circle style=\"fill:currentColor;fill-opacity:.980392;stroke:none;stroke-width:.141404;stop-color:#000\" cx=\"964.562\" cy=\"-169.223\" r=\"33.234\"/><path style=\"fill:#fff;fill-opacity:.980392;stroke:none;stroke-width:.146895;stop-color:#000\" d=\"m962.269-187.408-6.645 14.803-3.036 6.764-6.644 14.804 30.591-21.568h-14.353l20.997-14.803z\"/></g><path style=\"font-size:79.7151px;line-height:1.25;font-family:Ubuntu;-inkscape-font-specification:Ubuntu;letter-spacing:0;word-spacing:0;fill:currentColor;stroke-width:1.99288\" d=\"M89.523 59.41V4.169h33.32v6.616H97.256v16.66h22.72v6.537h-22.72v25.43zm52.293-5.34q2.63 0 4.623-.08 2.073-.16 3.428-.478V41.156q-.797-.399-2.63-.638-1.754-.319-4.305-.319-1.674 0-3.587.24-1.834.239-3.428 1.036-1.515.717-2.55 2.072-1.037 1.276-1.037 3.428 0 3.986 2.55 5.58 2.552 1.515 6.936 1.515m-.638-37.148q4.464 0 7.493 1.196 3.11 1.116 4.943 3.269 1.913 2.072 2.71 5.022.797 2.87.797 6.377v25.907q-.956.16-2.71.478-1.674.24-3.826.479t-4.704.398q-2.47.24-4.942.24-3.507 0-6.457-.718-2.95-.717-5.102-2.232-2.152-1.594-3.348-4.145t-1.195-6.138q0-3.428 1.355-5.9 1.435-2.47 3.826-3.985t5.58-2.232 6.696-.717q1.116 0 2.312.16 1.196.079 2.232.318 1.116.16 1.913.319.797.16 1.116.239v-2.073q0-1.833-.398-3.587-.399-1.833-1.435-3.188-1.037-1.435-2.87-2.232-1.754-.877-4.623-.877-3.667 0-6.457.558-2.71.478-4.066 1.036l-.877-6.138q1.435-.638 4.783-1.196 3.348-.638 7.254-.638m37.865 37.148q4.544 0 6.696-1.196 2.232-1.196 2.232-3.826 0-2.71-2.152-4.305t-7.095-3.587q-2.391-.957-4.623-1.913-2.153-1.037-3.747-2.392t-2.55-3.268-.958-4.703q0-5.5 4.066-8.69 4.065-3.268 11.08-3.268 1.754 0 3.508.24 1.754.159 3.268.478 1.515.239 2.63.558 1.196.319 1.834.558l-1.355 6.377q-1.196-.638-3.747-1.275-2.55-.718-6.138-.718-3.109 0-5.42 1.276-2.312 1.195-2.312 3.826 0 1.355.478 2.391.558 1.037 1.595 1.914 1.116.797 2.71 1.514 1.594.718 3.826 1.515 2.95 1.116 5.261 2.232 2.312 1.036 3.906 2.471 1.674 1.435 2.551 3.507.877 1.993.877 4.943 0 5.74-4.304 8.689-4.225 2.95-12.117 2.95-5.5 0-8.61-.957-3.108-.877-4.224-1.356l1.355-6.377q1.275.479 4.065 1.435t7.414.957m32.842-36.111h15.704v6.218h-15.704v19.131q0 3.109.479 5.182.478 1.993 1.435 3.188.956 1.116 2.391 1.595t3.348.478q3.348 0 5.341-.718 2.073-.797 2.87-1.116l1.435 6.138q-1.116.558-3.906 1.356-2.79.876-6.378.876-4.225 0-7.015-1.036-2.71-1.116-4.384-3.268t-2.391-5.261q-.638-3.189-.638-7.334V6.4l7.413-1.275zm62.497 41.452q-1.355-3.588-2.55-7.015-1.197-3.508-2.472-7.095h-25.03l-5.023 14.11h-8.05q3.188-8.77 5.978-16.183 2.79-7.493 5.42-14.189 2.71-6.696 5.341-12.754 2.63-6.138 5.5-12.117h7.095q2.87 5.979 5.5 12.117 2.631 6.058 5.262 12.754 2.71 6.696 5.5 14.19 2.79 7.413 5.979 16.182zm-7.254-20.487q-2.551-6.935-5.102-13.392-2.471-6.537-5.181-12.516-2.79 5.979-5.341 12.516-2.471 6.457-4.943 13.392zM304.992 3.61q11.639 0 17.857 4.464 6.297 4.384 6.297 13.153 0 4.783-1.754 8.21-1.674 3.349-4.942 5.501-3.189 2.073-7.812 3.03t-10.443.956h-6.138V59.41h-7.732V4.965q3.268-.797 7.254-1.036 4.065-.319 7.413-.319m.638 6.776q-4.942 0-7.573.239v21.682h5.82q3.985 0 7.174-.478 3.188-.558 5.34-1.754 2.233-1.275 3.428-3.427 1.196-2.153 1.196-5.5 0-3.19-1.275-5.262-1.196-2.072-3.348-3.268-2.073-1.276-4.863-1.754t-5.899-.478m33.162-6.218h7.732v55.243h-7.732z\" aria-label=\"FastAPI\"/></svg>\n    </a>\n    <a href=\"https://kutt.to/Dr9GuW\" target=\"_blank\">\n      fastapi.tiangolo.com\n    </a>\n  </li>\n</ul>\n\n### Bronze\n\n<ul class=\"bronze\">\n  <li>\n    <a href=\"https://kutt.to/YpaKsX\" style=\"height: 20px;\" target=\"_blank\">\n      <picture>\n        <source srcset=\"/assets/.gen/kinde-logo-wordmark-480w.webp\" media=\"(max-width: 480px)\" type=\"image/webp\" />\n        <source srcset=\"/assets/.gen/kinde-logo-wordmark-768w.webp\" media=\"(max-width: 768px)\" type=\"image/webp\" />\n        <source srcset=\"/assets/.gen/kinde-logo-wordmark-1200w.webp\" media=\"(min-width: 769px)\" type=\"image/webp\" />\n        <img alt=\"Kinde logo\" loading=\"lazy\" src=\"/assets/.gen/kinde-logo-wordmark-1200w.png\" />\n      </picture>\n    </a>\n  </li>\n  <li class=\"cella\">\n    <a href=\"https://kutt.to/KkqSaw\" style=\"height: 20px;\" target=\"_blank\">\n      <svg width=\"452\" height=\"131\" viewBox=\"0 0 452 131\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M130.66 41.7v47.26c0 23.03-18.67 41.7-41.7 41.7H41.7c-23.03 0-41.7-18.67-41.7-41.7V41.7C0 18.67 18.67 0 41.7 0h47.26c23.03 0 41.7 18.67 41.7 41.7m-55.6 0H55.6c-7.677 0-13.9 6.223-13.9 13.9v19.46c0 7.677 6.223 13.9 13.9 13.9h19.46c7.677 0 13.9-6.223 13.9-13.9V55.6c0-7.677-6.223-13.9-13.9-13.9\" fill=\"currentColor\"/><path d=\"M83.4 13.9c18.424 0 33.36 14.936 33.36 33.36V83.4c0 18.424-14.936 33.36-33.36 33.36H47.26c-18.424 0-33.36-14.936-33.36-33.36V47.26c0-18.424 14.936-33.36 33.36-33.36zm-8.34 27.8H55.6c-7.677 0-13.9 6.223-13.9 13.9v19.46c0 7.677 6.223 13.9 13.9 13.9h19.46c7.677 0 13.9-6.223 13.9-13.9V55.6c0-7.677-6.223-13.9-13.9-13.9\" fill-opacity=\".4\" fill=\"#FFF\"/><path d=\"M77.84 27.8c13.818 0 25.02 11.202 25.02 25.02v25.02c0 13.818-11.202 25.02-25.02 25.02H52.82c-13.818 0-25.02-11.202-25.02-25.02V52.82c0-13.818 11.202-25.02 25.02-25.02zm-2.78 13.9H55.6c-7.677 0-13.9 6.223-13.9 13.9v19.46c0 7.677 6.223 13.9 13.9 13.9h19.46c7.677 0 13.9-6.223 13.9-13.9V55.6c0-7.677-6.223-13.9-13.9-13.9\" fill-opacity=\".5\" fill=\"#FFF\"/><path d=\"M174.06 99.167q-7.312-3.795-11.686-10.906Q158 81.148 158 71.546t4.374-16.715q4.375-7.112 11.686-10.906 7.31-3.793 15.94-3.793 6.351 0 10.966 1.6a41.6 41.6 0 0 1 8.569 4.09q2.397 1.54 2.397 4.15 0 1.777-1.378 3.259-1.38 1.482-3.176 1.482-1.32 0-2.637-.711-3.956-2.016-6.771-2.905-2.817-.889-7.012-.889-10.305 0-16.18 5.868-5.871 5.868-5.872 15.47t5.873 15.47q5.872 5.868 16.18 5.868 4.194 0 7.01-.89 2.817-.888 6.772-2.904 1.319-.71 2.637-.71 1.797 0 3.176 1.481 1.378 1.481 1.378 3.26 0 2.609-2.397 4.149a41.6 41.6 0 0 1-8.57 4.09q-4.612 1.6-10.965 1.6c-8.193 0-8.669-.019-15.94-3.793m91.032 3.793q-14.433 0-22.538-8.239-8.104-8.238-8.104-23.175 0-8.416 3.076-15.53 3.076-7.111 9.465-11.498 6.39-4.386 15.735-4.386 8.755 0 15.144 4.09t9.701 10.906 3.313 14.877q0 2.252-1.479 3.793t-3.963 1.541h-40.107q.945 8.299 6.152 12.922 5.205 4.623 14.552 4.623 4.969 0 8.696-.949a36 36 0 0 0 7.276-2.726q.945-.474 2.13-.474 1.892 0 3.312 1.304t1.42 3.319q0 2.608-3.076 4.386-4.614 2.608-9.11 3.912t-11.595 1.304m15.144-36.393q-.355-5.808-3.017-9.72t-6.566-5.75-7.927-1.837-7.927 1.837-6.507 5.75q-2.602 3.912-2.957 9.72zm43.113 35.837q-2.322 0-3.91-1.553-1.59-1.553-1.589-3.823V19.495q0-2.27 1.589-3.882t3.91-1.613q2.444 0 4.032 1.553 1.59 1.553 1.589 3.942v77.533q0 2.27-1.65 3.823t-3.971 1.553m42.534 0q-2.322 0-3.91-1.553-1.59-1.553-1.589-3.823V19.495q0-2.27 1.589-3.882t3.91-1.613q2.444 0 4.032 1.553 1.59 1.553 1.589 3.942v77.533q0 2.27-1.65 3.823t-3.971 1.553m52.168.556q-5.285 0-9.79-2.134-4.506-2.133-7.148-6.223-2.643-4.09-2.643-9.425 0-8.772 7.028-13.988t20.602-5.216h14.536v-.948q0-7.824-3.904-11.262-3.904-3.437-12.194-3.437-4.565 0-8.108.711-3.545.71-7.869 2.134-.96.237-1.562.237-1.802 0-3.123-1.304t-1.322-3.2q0-3.202 3.124-4.505 10.21-4.268 20.783-4.268 8.288 0 13.995 3.32 5.706 3.318 8.409 8.594t2.703 11.439v33.548q0 2.252-1.622 3.793-1.621 1.542-3.904 1.541-2.283 0-3.844-1.54-1.562-1.542-1.562-3.794v-3.082q-8.89 9.009-22.585 9.009m4.085-9.483q5.286 0 10.211-2.55 4.926-2.547 8.29-6.341v-9.958h-13.095q-18.14 0-18.14 9.365 0 4.268 2.943 6.876t9.79 2.608z\" fill=\"currentColor\"/></svg>\n    </a>\n  </li>\n</ul>\n\n### Friends\n\n<ul class=\"friends\">\n  <li class=\"openstatus\">\n    <a href=\"https://kutt.to/R6UuKW\" style=\"height: 20px;\" target=\"_blank\">\n      <svg width=\"330\" height=\"330\" viewBox=\"0 0 330 330\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\"><g clip-path=\"url(#clip0_1543_179)\"><mask id=\"mask0_1543_179\" style=\"mask-type:alpha\" maskUnits=\"userSpaceOnUse\" x=\"0\" y=\"0\" width=\"330\" height=\"330\"><circle cx=\"165\" cy=\"165\" r=\"165\" fill=\"black\"/></mask><g mask=\"url(#mask0_1543_179)\"><path d=\"M165 330C256.127 330 330 256.127 330 165C330 73.873 256.127 0 165 0C73.873 0 0 73.873 0 165C0 256.127 73.873 330 165 330Z\" fill=\"currentColor\"/><path d=\"M330 96H122V111H330V96Z\" fill=\"white\"/><path d=\"M208 219H0V234H208V219Z\" fill=\"white\"/></g></g><defs><clipPath id=\"clip0_1543_179\"><rect width=\"330\" height=\"330\" fill=\"white\"/></clipPath></defs></svg>\n    </a>\n  </li>\n  <li>\n    <a href=\"https://kutt.to/bcUF8q\" style=\"height: 20px;\" target=\"_blank\">\n      <svg width=\"1155\" height=\"1000\" viewBox=\"0 0 1155 1000\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M577.344 0L1154.69 1000H0L577.344 0Z\" fill=\"currentColor\"/></svg>\n    </a>\n  </li>\n</ul>\n"
  },
  {
    "path": "docs/partials/sponsors.md",
    "content": "## Sponsors\n\nHey API is sponsor-funded. If you rely on Hey API in production, consider becoming a [sponsor](https://github.com/sponsors/hey-api) to accelerate the roadmap.\n\n<div class=\"sponsors-list\">\n\n<!--@include: ./sponsors-list.md-->\n\n</div>\n"
  },
  {
    "path": "docs/public/robots.txt",
    "content": "User-agent: *\nAllow: /\n\nSitemap: https://heyapi.dev/sitemap.xml\n"
  },
  {
    "path": "docs/tsconfig.json",
    "content": "{\n  \"compilerOptions\": {\n    \"baseUrl\": \".\",\n    \"esModuleInterop\": true,\n    \"module\": \"nodenext\",\n    \"paths\": {\n      \"@components/*\": [\"./.vitepress/theme/components/*\"],\n      \"@data\": [\"./data/*\"],\n      \"@versions/*\": [\"./.vitepress/theme/versions/*\"]\n    }\n  },\n  \"include\": [\".vitepress/**/*\", \"./**/*.ts\", \"./**/*.vue\"]\n}\n"
  },
  {
    "path": "eslint.config.js",
    "content": "import eslint from '@eslint/js';\nimport pluginSimpleImportSort from 'eslint-plugin-simple-import-sort';\nimport pluginSortDestructureKeys from 'eslint-plugin-sort-destructure-keys';\nimport pluginSortKeysFix from 'eslint-plugin-sort-keys-fix';\nimport pluginTypeScriptSortKeys from 'eslint-plugin-typescript-sort-keys';\n// import pluginVue from 'eslint-plugin-vue'\nimport globals from 'globals';\nimport tseslint from 'typescript-eslint';\n\nexport default tseslint.config(\n  eslint.configs.recommended,\n  ...tseslint.configs.recommended,\n  {\n    languageOptions: {\n      ecmaVersion: 'latest',\n      globals: {\n        ...globals.node,\n      },\n    },\n    plugins: {\n      'simple-import-sort': pluginSimpleImportSort,\n      'sort-destructure-keys': pluginSortDestructureKeys,\n      'sort-keys-fix': pluginSortKeysFix,\n      'typescript-sort-keys': pluginTypeScriptSortKeys,\n    },\n    rules: {\n      '@typescript-eslint/ban-ts-comment': 'off',\n      '@typescript-eslint/ban-ts-ignore': 'off',\n      '@typescript-eslint/consistent-type-imports': 'warn',\n      '@typescript-eslint/explicit-function-return-type': 'off',\n      '@typescript-eslint/explicit-module-boundary-types': 'off',\n      '@typescript-eslint/no-explicit-any': 'off',\n      '@typescript-eslint/no-inferrable-types': 'off',\n      '@typescript-eslint/no-non-null-assertion': 'off',\n      '@typescript-eslint/no-var-requires': 'off',\n      'arrow-body-style': 'error',\n      'import/order': 'off',\n      'no-prototype-builtins': 'off',\n      'object-shorthand': 'error',\n      'simple-import-sort/exports': 'error',\n      'simple-import-sort/imports': 'error',\n      'sort-destructure-keys/sort-destructure-keys': 'warn',\n      'sort-imports': 'off',\n      'sort-keys-fix/sort-keys-fix': 'warn',\n      'typescript-sort-keys/interface': 'warn',\n      'typescript-sort-keys/string-enum': 'warn',\n    },\n  },\n  {\n    files: ['**/*.cjs'],\n    rules: {\n      '@typescript-eslint/no-require-imports': 'off',\n    },\n  },\n  {\n    ignores: [\n      '**/.tsdown/',\n      '**/dist/',\n      '**/node_modules/',\n      'temp/',\n      'dev/.gen/',\n      'examples/openapi-ts-nestjs/src/client/**/*.ts',\n      'examples/openapi-ts-openai/src/client/**/*.ts',\n      '**/test/generated/',\n      '**/__snapshots__/',\n      '**/.next/',\n      '**/.nuxt/',\n      '**/.output/',\n      '**/.svelte-kit/',\n      '**/.vitepress/cache',\n      '**/.vitepress/dist',\n      '**/.angular',\n    ],\n  },\n);\n"
  },
  {
    "path": "examples/README.md",
    "content": "# Examples\n\nThis directory contains integration examples demonstrating how to use `@hey-api/openapi-ts` with various frameworks, libraries, and client implementations.\n\n## Available Examples\n\n- **openapi-ts-angular** - Angular integration with common HTTP client\n- **openapi-ts-angular-common** - Angular with @angular/common/http\n- **openapi-ts-axios** - Using Axios client\n- **openapi-ts-fastify** - Fastify server integration\n- **openapi-ts-fetch** - Native Fetch API client\n- **openapi-ts-next** - Next.js integration\n- **openapi-ts-nuxt** - Nuxt.js integration with plugin\n- **openapi-ts-ofetch** - Using ofetch client\n- **openapi-ts-openai** - OpenAI API integration\n- **openapi-ts-pinia-colada** - Vue with Pinia Colada state management\n- **openapi-ts-sample** - Sample/template example (excluded from CI)\n- **openapi-ts-tanstack-angular-query-experimental** - Angular with TanStack Query\n- **openapi-ts-tanstack-react-query** - React with TanStack Query\n- **openapi-ts-tanstack-svelte-query** - Svelte with TanStack Query\n- **openapi-ts-tanstack-vue-query** - Vue with TanStack Query\n\n## Generated Code\n\nAll examples (except `openapi-ts-sample`) contain generated client code that is **committed to the repository**. This ensures:\n\n1. Examples always reflect the current state of the code generator\n2. Changes to the code generator are visible in pull requests\n3. CI can verify that examples are kept up-to-date\n\n## Regenerating Examples\n\nAfter making changes to the core packages, regenerate all example code:\n\n```bash\npnpm examples:generate\n```\n\nThis command will run `openapi-ts` for each example that has an `openapi-ts` script in its `package.json`.\n\n## Verifying Examples\n\nTo check if all examples are up-to-date with the current codebase:\n\n```bash\npnpm examples:check\n```\n\nThis check is also run automatically in CI. If it fails, run `pnpm examples:generate` and commit the changes.\n\n## Running Examples\n\nEach example can be run individually using the `example` script:\n\n```bash\n# Run dev server for fetch example\npnpm example fetch dev\n\n# Build fetch example\npnpm example fetch build\n```\n\nOr directly using pnpm filters:\n\n```bash\npnpm --filter @example/openapi-ts-fetch dev\n```\n\n## Creating New Examples\n\nWhen creating a new example:\n\n1. Create a new directory in `examples/`\n2. Add an `openapi-ts` script to `package.json`\n3. Run `pnpm examples:generate` to create initial generated code\n4. Commit both the source and generated code\n5. The example will automatically be included in CI checks\n\n## Excluding Examples\n\nTo exclude an example from CI (like `openapi-ts-sample`):\n\n1. Remove the `openapi-ts` script from `package.json`, or\n2. Update the exclusion filters in `package.json` scripts and `.github/workflows/ci.yml`\n"
  },
  {
    "path": "examples/openapi-ts-angular/.editorconfig",
    "content": "# Editor configuration, see https://editorconfig.org\nroot = true\n\n[*]\ncharset = utf-8\nindent_style = space\nindent_size = 2\ninsert_final_newline = true\ntrim_trailing_whitespace = true\n\n[*.ts]\nquote_type = single\nij_typescript_use_double_quotes = false\n\n[*.md]\nmax_line_length = off\ntrim_trailing_whitespace = false\n"
  },
  {
    "path": "examples/openapi-ts-angular/.gitignore",
    "content": "# See https://docs.github.com/get-started/getting-started-with-git/ignoring-files for more about ignoring files.\n\n# Compiled output\n/dist\n/tmp\n/out-tsc\n/bazel-out\n\n# Node\n/node_modules\nnpm-debug.log\nyarn-error.log\n\n# IDEs and editors\n.idea/\n.project\n.classpath\n.c9/\n*.launch\n.settings/\n*.sublime-workspace\n\n# Visual Studio Code\n.vscode/*\n!.vscode/settings.json\n!.vscode/tasks.json\n!.vscode/launch.json\n!.vscode/extensions.json\n.history/*\n\n# Miscellaneous\n/.angular/cache\n.sass-cache/\n/connect.lock\n/coverage\n/libpeerconnection.log\ntestem.log\n/typings\n\n# System files\n.DS_Store\nThumbs.db\n"
  },
  {
    "path": "examples/openapi-ts-angular/.vscode/extensions.json",
    "content": "{\n  // For more information, visit: https://go.microsoft.com/fwlink/?linkid=827846\n  \"recommendations\": [\"angular.ng-template\"]\n}\n"
  },
  {
    "path": "examples/openapi-ts-angular/.vscode/launch.json",
    "content": "{\n  // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387\n  \"version\": \"0.2.0\",\n  \"configurations\": [\n    {\n      \"name\": \"ng serve\",\n      \"type\": \"chrome\",\n      \"request\": \"launch\",\n      \"preLaunchTask\": \"npm: start\",\n      \"url\": \"http://localhost:4200/\"\n    },\n    {\n      \"name\": \"ng test\",\n      \"type\": \"chrome\",\n      \"request\": \"launch\",\n      \"preLaunchTask\": \"npm: test\",\n      \"url\": \"http://localhost:9876/debug.html\"\n    }\n  ]\n}\n"
  },
  {
    "path": "examples/openapi-ts-angular/.vscode/tasks.json",
    "content": "{\n  // For more information, visit: https://go.microsoft.com/fwlink/?LinkId=733558\n  \"version\": \"2.0.0\",\n  \"tasks\": [\n    {\n      \"type\": \"npm\",\n      \"script\": \"start\",\n      \"isBackground\": true,\n      \"problemMatcher\": {\n        \"owner\": \"typescript\",\n        \"pattern\": \"$tsc\",\n        \"background\": {\n          \"activeOnStart\": true,\n          \"beginsPattern\": {\n            \"regexp\": \"(.*?)\"\n          },\n          \"endsPattern\": {\n            \"regexp\": \"bundle generation complete\"\n          }\n        }\n      }\n    },\n    {\n      \"type\": \"npm\",\n      \"script\": \"test\",\n      \"isBackground\": true,\n      \"problemMatcher\": {\n        \"owner\": \"typescript\",\n        \"pattern\": \"$tsc\",\n        \"background\": {\n          \"activeOnStart\": true,\n          \"beginsPattern\": {\n            \"regexp\": \"(.*?)\"\n          },\n          \"endsPattern\": {\n            \"regexp\": \"bundle generation complete\"\n          }\n        }\n      }\n    }\n  ]\n}\n"
  },
  {
    "path": "examples/openapi-ts-angular/README.md",
    "content": "# Angular\n\nThis project was generated using [Angular CLI](https://github.com/angular/angular-cli) version 19.2.15.\n\n## Development server\n\nTo start a local development server, run:\n\n```bash\nng serve\n```\n\nOnce the server is running, open your browser and navigate to `http://localhost:4200/`. The application will automatically reload whenever you modify any of the source files.\n\n## Code scaffolding\n\nAngular CLI includes powerful code scaffolding tools. To generate a new component, run:\n\n```bash\nng generate component component-name\n```\n\nFor a complete list of available schematics (such as `components`, `directives`, or `pipes`), run:\n\n```bash\nng generate --help\n```\n\n## Building\n\nTo build the project run:\n\n```bash\nng build\n```\n\nThis will compile your project and store the build artifacts in the `dist/` directory. By default, the production build optimizes your application for performance and speed.\n\n## Running unit tests\n\nTo execute unit tests with the [Karma](https://karma-runner.github.io) test runner, use the following command:\n\n```bash\nng test\n```\n\n## Running end-to-end tests\n\nFor end-to-end (e2e) testing, run:\n\n```bash\nng e2e\n```\n\nAngular CLI does not come with an end-to-end testing framework by default. You can choose one that suits your needs.\n\n## Additional Resources\n\nFor more information on using the Angular CLI, including detailed command references, visit the [Angular CLI Overview and Command Reference](https://angular.dev/tools/cli) page.\n"
  },
  {
    "path": "examples/openapi-ts-angular/angular.json",
    "content": "{\n  \"$schema\": \"./node_modules/@angular/cli/lib/config/schema.json\",\n  \"version\": 1,\n  \"newProjectRoot\": \"projects\",\n  \"projects\": {\n    \"angular\": {\n      \"projectType\": \"application\",\n      \"schematics\": {},\n      \"root\": \"\",\n      \"sourceRoot\": \"src\",\n      \"prefix\": \"app\",\n      \"architect\": {\n        \"build\": {\n          \"builder\": \"@angular-devkit/build-angular:application\",\n          \"options\": {\n            \"outputPath\": \"dist/angular\",\n            \"index\": \"src/index.html\",\n            \"browser\": \"src/main.ts\",\n            \"polyfills\": [\"zone.js\"],\n            \"tsConfig\": \"tsconfig.app.json\",\n            \"assets\": [\n              {\n                \"glob\": \"**/*\",\n                \"input\": \"public\"\n              }\n            ],\n            \"styles\": [\"src/styles.css\"],\n            \"scripts\": []\n          },\n          \"configurations\": {\n            \"production\": {\n              \"budgets\": [\n                {\n                  \"type\": \"initial\",\n                  \"maximumWarning\": \"500kB\",\n                  \"maximumError\": \"1MB\"\n                },\n                {\n                  \"type\": \"anyComponentStyle\",\n                  \"maximumWarning\": \"4kB\",\n                  \"maximumError\": \"8kB\"\n                }\n              ],\n              \"outputHashing\": \"all\"\n            },\n            \"development\": {\n              \"optimization\": false,\n              \"extractLicenses\": false,\n              \"sourceMap\": true\n            }\n          },\n          \"defaultConfiguration\": \"production\"\n        },\n        \"serve\": {\n          \"builder\": \"@angular-devkit/build-angular:dev-server\",\n          \"configurations\": {\n            \"production\": {\n              \"buildTarget\": \"angular:build:production\"\n            },\n            \"development\": {\n              \"buildTarget\": \"angular:build:development\"\n            }\n          },\n          \"defaultConfiguration\": \"development\"\n        },\n        \"extract-i18n\": {\n          \"builder\": \"@angular-devkit/build-angular:extract-i18n\"\n        },\n        \"test\": {\n          \"builder\": \"@angular-devkit/build-angular:karma\",\n          \"options\": {\n            \"polyfills\": [\"zone.js\", \"zone.js/testing\"],\n            \"tsConfig\": \"tsconfig.spec.json\",\n            \"assets\": [\n              {\n                \"glob\": \"**/*\",\n                \"input\": \"public\"\n              }\n            ],\n            \"styles\": [\"src/styles.css\"],\n            \"scripts\": []\n          }\n        }\n      }\n    }\n  },\n  \"cli\": {\n    \"analytics\": false\n  }\n}\n"
  },
  {
    "path": "examples/openapi-ts-angular/openapi-ts.config.ts",
    "content": "import { defineConfig } from '@hey-api/openapi-ts';\n\nexport default defineConfig({\n  input:\n    'https://raw.githubusercontent.com/swagger-api/swagger-petstore/master/src/main/resources/openapi.yaml',\n  logs: {\n    path: './logs',\n  },\n  output: {\n    path: './src/client',\n    postProcess: ['oxfmt', 'eslint'],\n  },\n  plugins: [\n    '@hey-api/client-angular',\n    '@hey-api/schemas',\n    {\n      name: '@hey-api/sdk',\n      operations: {\n        containerName: '{{name}}Service',\n        strategy: 'byTags',\n      },\n    },\n    {\n      enums: 'javascript',\n      name: '@hey-api/typescript',\n    },\n  ],\n});\n"
  },
  {
    "path": "examples/openapi-ts-angular/package.json",
    "content": "{\n  \"name\": \"@example/openapi-ts-angular\",\n  \"version\": \"0.0.0\",\n  \"private\": true,\n  \"scripts\": {\n    \"build\": \"ng build\",\n    \"dev\": \"ng serve\",\n    \"lint\": \"eslint . --report-unused-disable-directives --max-warnings 0\",\n    \"ng\": \"ng\",\n    \"openapi-ts\": \"openapi-ts\",\n    \"serve:ssr:angular\": \"node dist/angular/server/server.mjs\",\n    \"test:disabled\": \"ng test --watch=false --browsers=ChromeHeadless\",\n    \"test\": \"echo \\\"Skipping tests\\\"\",\n    \"watch\": \"ng build --watch --configuration development\"\n  },\n  \"dependencies\": {\n    \"@angular/common\": \"21.1.2\",\n    \"@angular/compiler\": \"21.1.2\",\n    \"@angular/core\": \"21.1.2\",\n    \"@angular/forms\": \"21.1.2\",\n    \"@angular/platform-browser\": \"21.1.2\",\n    \"@angular/platform-browser-dynamic\": \"21.1.2\",\n    \"@angular/platform-server\": \"21.1.2\",\n    \"@angular/router\": \"21.1.2\",\n    \"@angular/ssr\": \"21.1.2\",\n    \"express\": \"4.21.0\",\n    \"rxjs\": \"7.8.2\",\n    \"tslib\": \"2.8.1\",\n    \"zone.js\": \"0.16.0\"\n  },\n  \"devDependencies\": {\n    \"@angular-devkit/build-angular\": \"21.1.2\",\n    \"@angular/cli\": \"21.1.2\",\n    \"@angular/compiler-cli\": \"21.1.2\",\n    \"@hey-api/openapi-ts\": \"workspace:*\",\n    \"@types/express\": \"4.17.21\",\n    \"@types/jasmine\": \"5.1.9\",\n    \"@types/node\": \"24.10.10\",\n    \"@typescript-eslint/eslint-plugin\": \"8.29.1\",\n    \"@typescript-eslint/parser\": \"8.29.1\",\n    \"eslint\": \"9.17.0\",\n    \"jasmine-core\": \"5.6.0\",\n    \"karma\": \"6.4.4\",\n    \"karma-chrome-launcher\": \"3.2.0\",\n    \"karma-coverage\": \"2.2.1\",\n    \"karma-jasmine\": \"5.1.0\",\n    \"karma-jasmine-html-reporter\": \"2.1.0\",\n    \"typescript\": \"5.9.3\"\n  }\n}\n"
  },
  {
    "path": "examples/openapi-ts-angular/src/app/app.component.css",
    "content": ""
  },
  {
    "path": "examples/openapi-ts-angular/src/app/app.component.html",
    "content": "<!-- * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * -->\n<!-- * * * * * * * * * * * The content below * * * * * * * * * * * -->\n<!-- * * * * * * * * * * is only a placeholder * * * * * * * * * * -->\n<!-- * * * * * * * * * * and can be replaced.  * * * * * * * * * * -->\n<!-- * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * -->\n<!-- * * * * * * * * * Delete the template below * * * * * * * * * -->\n<!-- * * * * * * * to get started with your project! * * * * * * * -->\n<!-- * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * -->\n\n<style>\n  :host {\n    --bright-blue: oklch(51.01% 0.274 263.83);\n    --electric-violet: oklch(53.18% 0.28 296.97);\n    --french-violet: oklch(47.66% 0.246 305.88);\n    --vivid-pink: oklch(69.02% 0.277 332.77);\n    --hot-red: oklch(61.42% 0.238 15.34);\n    --orange-red: oklch(63.32% 0.24 31.68);\n\n    --gray-900: oklch(19.37% 0.006 300.98);\n    --gray-700: oklch(36.98% 0.014 302.71);\n    --gray-400: oklch(70.9% 0.015 304.04);\n\n    --red-to-pink-to-purple-vertical-gradient: linear-gradient(\n      180deg,\n      var(--orange-red) 0%,\n      var(--vivid-pink) 50%,\n      var(--electric-violet) 100%\n    );\n\n    --red-to-pink-to-purple-horizontal-gradient: linear-gradient(\n      90deg,\n      var(--orange-red) 0%,\n      var(--vivid-pink) 50%,\n      var(--electric-violet) 100%\n    );\n\n    --pill-accent: var(--bright-blue);\n\n    font-family:\n      'Inter',\n      -apple-system,\n      BlinkMacSystemFont,\n      'Segoe UI',\n      Roboto,\n      Helvetica,\n      Arial,\n      sans-serif,\n      'Apple Color Emoji',\n      'Segoe UI Emoji',\n      'Segoe UI Symbol';\n    box-sizing: border-box;\n    -webkit-font-smoothing: antialiased;\n    -moz-osx-font-smoothing: grayscale;\n  }\n\n  h1 {\n    font-size: 2.125rem;\n    color: var(--gray-900);\n    font-weight: 500;\n    line-height: 100%;\n    letter-spacing: -0.1rem;\n    margin: 0;\n    font-family:\n      'Inter Tight',\n      -apple-system,\n      BlinkMacSystemFont,\n      'Segoe UI',\n      Roboto,\n      Helvetica,\n      Arial,\n      sans-serif,\n      'Apple Color Emoji',\n      'Segoe UI Emoji',\n      'Segoe UI Symbol';\n  }\n\n  p {\n    margin: 0;\n    color: var(--gray-700);\n  }\n\n  main {\n    width: 100%;\n    min-height: 100%;\n    display: flex;\n    justify-content: center;\n    align-items: center;\n    padding: 1rem;\n    box-sizing: inherit;\n    position: relative;\n  }\n\n  .angular-logo {\n    max-width: 9.2rem;\n  }\n\n  .content {\n    display: flex;\n    justify-content: space-around;\n    width: 100%;\n    max-width: 700px;\n    margin-bottom: 3rem;\n  }\n\n  .content h1 {\n    margin-top: 1.75rem;\n  }\n\n  .content p {\n    margin-top: 1.5rem;\n  }\n\n  .divider {\n    width: 1px;\n    background: var(--red-to-pink-to-purple-vertical-gradient);\n    margin-inline: 0.5rem;\n  }\n\n  .pill-group {\n    display: flex;\n    flex-direction: column;\n    align-items: start;\n    flex-wrap: wrap;\n    gap: 1.25rem;\n  }\n\n  .pill {\n    display: flex;\n    align-items: center;\n    --pill-accent: var(--bright-blue);\n    background: color-mix(in srgb, var(--pill-accent) 5%, transparent);\n    color: var(--pill-accent);\n    padding-inline: 0.75rem;\n    padding-block: 0.375rem;\n    border-radius: 2.75rem;\n    border: 0;\n    transition: background 0.3s ease;\n    font-family: var(--inter-font);\n    font-size: 0.875rem;\n    font-style: normal;\n    font-weight: 500;\n    line-height: 1.4rem;\n    letter-spacing: -0.00875rem;\n    text-decoration: none;\n  }\n\n  .pill:hover {\n    background: color-mix(in srgb, var(--pill-accent) 15%, transparent);\n  }\n\n  .pill-group .pill:nth-child(6n + 1) {\n    --pill-accent: var(--bright-blue);\n  }\n  .pill-group .pill:nth-child(6n + 2) {\n    --pill-accent: var(--french-violet);\n  }\n  .pill-group .pill:nth-child(6n + 3),\n  .pill-group .pill:nth-child(6n + 4),\n  .pill-group .pill:nth-child(6n + 5) {\n    --pill-accent: var(--hot-red);\n  }\n\n  .pill-group svg {\n    margin-inline-start: 0.25rem;\n  }\n\n  .social-links {\n    display: flex;\n    align-items: center;\n    gap: 0.73rem;\n    margin-top: 1.5rem;\n  }\n\n  .social-links path {\n    transition: fill 0.3s ease;\n    fill: var(--gray-400);\n  }\n\n  .social-links a:hover svg path {\n    fill: var(--gray-900);\n  }\n\n  @media screen and (max-width: 650px) {\n    .content {\n      flex-direction: column;\n      width: max-content;\n    }\n\n    .divider {\n      height: 1px;\n      width: 100%;\n      background: var(--red-to-pink-to-purple-horizontal-gradient);\n      margin-block: 1.5rem;\n    }\n  }\n</style>\n\n<main class=\"main\">\n  <div class=\"content\">\n    <div class=\"left-side\">\n      <svg\n        xmlns=\"http://www.w3.org/2000/svg\"\n        viewBox=\"0 0 982 239\"\n        fill=\"none\"\n        class=\"angular-logo\"\n      >\n        <g clip-path=\"url(#a)\">\n          <path\n            fill=\"url(#b)\"\n            d=\"M388.676 191.625h30.849L363.31 31.828h-35.758l-56.215 159.797h30.848l13.174-39.356h60.061l13.256 39.356Zm-65.461-62.675 21.602-64.311h1.227l21.602 64.311h-44.431Zm126.831-7.527v70.202h-28.23V71.839h27.002v20.374h1.392c2.782-6.71 7.2-12.028 13.255-15.956 6.056-3.927 13.584-5.89 22.503-5.89 8.264 0 15.465 1.8 21.684 5.318 6.137 3.518 10.964 8.673 14.319 15.382 3.437 6.71 5.074 14.81 4.992 24.383v76.175h-28.23v-71.92c0-8.019-2.046-14.237-6.219-18.819-4.173-4.5-9.819-6.791-17.102-6.791-4.91 0-9.328 1.063-13.174 3.272-3.846 2.128-6.792 5.237-9.001 9.328-2.046 4.009-3.191 8.918-3.191 14.728ZM589.233 239c-10.147 0-18.82-1.391-26.103-4.091-7.282-2.7-13.092-6.382-17.511-10.964-4.418-4.582-7.528-9.655-9.164-15.219l25.448-6.136c1.145 2.372 2.782 4.663 4.991 6.954 2.209 2.291 5.155 4.255 8.837 5.81 3.683 1.554 8.428 2.291 14.074 2.291 8.019 0 14.647-1.964 19.884-5.81 5.237-3.845 7.856-10.227 7.856-19.064v-22.665h-1.391c-1.473 2.946-3.601 5.892-6.383 9.001-2.782 3.109-6.464 5.645-10.965 7.691-4.582 2.046-10.228 3.109-17.101 3.109-9.165 0-17.511-2.209-25.039-6.545-7.446-4.337-13.42-10.883-17.757-19.474-4.418-8.673-6.628-19.473-6.628-32.565 0-13.091 2.21-24.301 6.628-33.383 4.419-9.082 10.311-15.955 17.839-20.7 7.528-4.746 15.874-7.037 25.039-7.037 7.037 0 12.846 1.145 17.347 3.518 4.582 2.373 8.182 5.236 10.883 8.51 2.7 3.272 4.746 6.382 6.137 9.327h1.554v-19.8h27.821v121.749c0 10.228-2.454 18.737-7.364 25.447-4.91 6.709-11.538 11.7-20.048 15.055-8.509 3.355-18.165 4.991-28.884 4.991Zm.245-71.266c5.974 0 11.047-1.473 15.302-4.337 4.173-2.945 7.446-7.118 9.573-12.519 2.21-5.482 3.274-12.027 3.274-19.637 0-7.609-1.064-14.155-3.274-19.8-2.127-5.646-5.318-10.064-9.491-13.255-4.174-3.11-9.329-4.746-15.384-4.746s-11.537 1.636-15.792 4.91c-4.173 3.272-7.365 7.772-9.492 13.418-2.128 5.727-3.191 12.191-3.191 19.392 0 7.2 1.063 13.745 3.273 19.228 2.127 5.482 5.318 9.736 9.573 12.764 4.174 3.027 9.41 4.582 15.629 4.582Zm141.56-26.51V71.839h28.23v119.786h-27.412v-21.273h-1.227c-2.7 6.709-7.119 12.191-13.338 16.446-6.137 4.255-13.747 6.382-22.748 6.382-7.855 0-14.81-1.718-20.783-5.237-5.974-3.518-10.72-8.591-14.075-15.382-3.355-6.709-5.073-14.891-5.073-24.464V71.839h28.312v71.921c0 7.609 2.046 13.664 6.219 18.083 4.173 4.5 9.655 6.709 16.365 6.709 4.173 0 8.183-.982 12.111-3.028 3.927-2.045 7.118-5.072 9.655-9.082 2.537-4.091 3.764-9.164 3.764-15.218Zm65.707-109.395v159.796h-28.23V31.828h28.23Zm44.841 162.169c-7.61 0-14.402-1.391-20.457-4.091-6.055-2.7-10.883-6.791-14.32-12.109-3.518-5.319-5.237-11.946-5.237-19.801 0-6.791 1.228-12.355 3.765-16.773 2.536-4.419 5.891-7.937 10.228-10.637 4.337-2.618 9.164-4.664 14.647-6.055 5.4-1.391 11.046-2.373 16.856-3.027 7.037-.737 12.683-1.391 17.102-1.964 4.337-.573 7.528-1.555 9.574-2.782 1.963-1.309 3.027-3.273 3.027-5.973v-.491c0-5.891-1.718-10.391-5.237-13.664-3.518-3.191-8.51-4.828-15.056-4.828-6.955 0-12.356 1.473-16.447 4.5-4.009 3.028-6.71 6.546-8.183 10.719l-26.348-3.764c2.046-7.282 5.483-13.336 10.31-18.328 4.746-4.909 10.638-8.59 17.511-11.045 6.955-2.455 14.565-3.682 22.912-3.682 5.809 0 11.537.654 17.265 2.045s10.965 3.6 15.711 6.71c4.746 3.109 8.51 7.282 11.455 12.6 2.864 5.318 4.337 11.946 4.337 19.883v80.184h-27.166v-16.446h-.9c-1.719 3.355-4.092 6.464-7.201 9.328-3.109 2.864-6.955 5.237-11.619 6.955-4.828 1.718-10.229 2.536-16.529 2.536Zm7.364-20.701c5.646 0 10.556-1.145 14.729-3.354 4.173-2.291 7.364-5.237 9.655-9.001 2.292-3.763 3.355-7.854 3.355-12.273v-14.155c-.9.737-2.373 1.391-4.5 2.046-2.128.654-4.419 1.145-7.037 1.636-2.619.491-5.155.9-7.692 1.227-2.537.328-4.746.655-6.628.901-4.173.572-8.019 1.472-11.292 2.781-3.355 1.31-5.973 3.11-7.855 5.401-1.964 2.291-2.864 5.318-2.864 8.918 0 5.237 1.882 9.164 5.728 11.782 3.682 2.782 8.51 4.091 14.401 4.091Zm64.643 18.328V71.839h27.412v19.965h1.227c2.21-6.955 5.974-12.274 11.292-16.038 5.319-3.763 11.456-5.645 18.329-5.645 1.555 0 3.355.082 5.237.163 1.964.164 3.601.328 4.91.573v25.938c-1.227-.41-3.109-.819-5.646-1.146a58.814 58.814 0 0 0-7.446-.49c-5.155 0-9.738 1.145-13.829 3.354-4.091 2.209-7.282 5.236-9.655 9.164-2.373 3.927-3.519 8.427-3.519 13.5v70.448h-28.312ZM222.077 39.192l-8.019 125.923L137.387 0l84.69 39.192Zm-53.105 162.825-57.933 33.056-57.934-33.056 11.783-28.556h92.301l11.783 28.556ZM111.039 62.675l30.357 73.803H80.681l30.358-73.803ZM7.937 165.115 0 39.192 84.69 0 7.937 165.115Z\"\n          />\n          <path\n            fill=\"url(#c)\"\n            d=\"M388.676 191.625h30.849L363.31 31.828h-35.758l-56.215 159.797h30.848l13.174-39.356h60.061l13.256 39.356Zm-65.461-62.675 21.602-64.311h1.227l21.602 64.311h-44.431Zm126.831-7.527v70.202h-28.23V71.839h27.002v20.374h1.392c2.782-6.71 7.2-12.028 13.255-15.956 6.056-3.927 13.584-5.89 22.503-5.89 8.264 0 15.465 1.8 21.684 5.318 6.137 3.518 10.964 8.673 14.319 15.382 3.437 6.71 5.074 14.81 4.992 24.383v76.175h-28.23v-71.92c0-8.019-2.046-14.237-6.219-18.819-4.173-4.5-9.819-6.791-17.102-6.791-4.91 0-9.328 1.063-13.174 3.272-3.846 2.128-6.792 5.237-9.001 9.328-2.046 4.009-3.191 8.918-3.191 14.728ZM589.233 239c-10.147 0-18.82-1.391-26.103-4.091-7.282-2.7-13.092-6.382-17.511-10.964-4.418-4.582-7.528-9.655-9.164-15.219l25.448-6.136c1.145 2.372 2.782 4.663 4.991 6.954 2.209 2.291 5.155 4.255 8.837 5.81 3.683 1.554 8.428 2.291 14.074 2.291 8.019 0 14.647-1.964 19.884-5.81 5.237-3.845 7.856-10.227 7.856-19.064v-22.665h-1.391c-1.473 2.946-3.601 5.892-6.383 9.001-2.782 3.109-6.464 5.645-10.965 7.691-4.582 2.046-10.228 3.109-17.101 3.109-9.165 0-17.511-2.209-25.039-6.545-7.446-4.337-13.42-10.883-17.757-19.474-4.418-8.673-6.628-19.473-6.628-32.565 0-13.091 2.21-24.301 6.628-33.383 4.419-9.082 10.311-15.955 17.839-20.7 7.528-4.746 15.874-7.037 25.039-7.037 7.037 0 12.846 1.145 17.347 3.518 4.582 2.373 8.182 5.236 10.883 8.51 2.7 3.272 4.746 6.382 6.137 9.327h1.554v-19.8h27.821v121.749c0 10.228-2.454 18.737-7.364 25.447-4.91 6.709-11.538 11.7-20.048 15.055-8.509 3.355-18.165 4.991-28.884 4.991Zm.245-71.266c5.974 0 11.047-1.473 15.302-4.337 4.173-2.945 7.446-7.118 9.573-12.519 2.21-5.482 3.274-12.027 3.274-19.637 0-7.609-1.064-14.155-3.274-19.8-2.127-5.646-5.318-10.064-9.491-13.255-4.174-3.11-9.329-4.746-15.384-4.746s-11.537 1.636-15.792 4.91c-4.173 3.272-7.365 7.772-9.492 13.418-2.128 5.727-3.191 12.191-3.191 19.392 0 7.2 1.063 13.745 3.273 19.228 2.127 5.482 5.318 9.736 9.573 12.764 4.174 3.027 9.41 4.582 15.629 4.582Zm141.56-26.51V71.839h28.23v119.786h-27.412v-21.273h-1.227c-2.7 6.709-7.119 12.191-13.338 16.446-6.137 4.255-13.747 6.382-22.748 6.382-7.855 0-14.81-1.718-20.783-5.237-5.974-3.518-10.72-8.591-14.075-15.382-3.355-6.709-5.073-14.891-5.073-24.464V71.839h28.312v71.921c0 7.609 2.046 13.664 6.219 18.083 4.173 4.5 9.655 6.709 16.365 6.709 4.173 0 8.183-.982 12.111-3.028 3.927-2.045 7.118-5.072 9.655-9.082 2.537-4.091 3.764-9.164 3.764-15.218Zm65.707-109.395v159.796h-28.23V31.828h28.23Zm44.841 162.169c-7.61 0-14.402-1.391-20.457-4.091-6.055-2.7-10.883-6.791-14.32-12.109-3.518-5.319-5.237-11.946-5.237-19.801 0-6.791 1.228-12.355 3.765-16.773 2.536-4.419 5.891-7.937 10.228-10.637 4.337-2.618 9.164-4.664 14.647-6.055 5.4-1.391 11.046-2.373 16.856-3.027 7.037-.737 12.683-1.391 17.102-1.964 4.337-.573 7.528-1.555 9.574-2.782 1.963-1.309 3.027-3.273 3.027-5.973v-.491c0-5.891-1.718-10.391-5.237-13.664-3.518-3.191-8.51-4.828-15.056-4.828-6.955 0-12.356 1.473-16.447 4.5-4.009 3.028-6.71 6.546-8.183 10.719l-26.348-3.764c2.046-7.282 5.483-13.336 10.31-18.328 4.746-4.909 10.638-8.59 17.511-11.045 6.955-2.455 14.565-3.682 22.912-3.682 5.809 0 11.537.654 17.265 2.045s10.965 3.6 15.711 6.71c4.746 3.109 8.51 7.282 11.455 12.6 2.864 5.318 4.337 11.946 4.337 19.883v80.184h-27.166v-16.446h-.9c-1.719 3.355-4.092 6.464-7.201 9.328-3.109 2.864-6.955 5.237-11.619 6.955-4.828 1.718-10.229 2.536-16.529 2.536Zm7.364-20.701c5.646 0 10.556-1.145 14.729-3.354 4.173-2.291 7.364-5.237 9.655-9.001 2.292-3.763 3.355-7.854 3.355-12.273v-14.155c-.9.737-2.373 1.391-4.5 2.046-2.128.654-4.419 1.145-7.037 1.636-2.619.491-5.155.9-7.692 1.227-2.537.328-4.746.655-6.628.901-4.173.572-8.019 1.472-11.292 2.781-3.355 1.31-5.973 3.11-7.855 5.401-1.964 2.291-2.864 5.318-2.864 8.918 0 5.237 1.882 9.164 5.728 11.782 3.682 2.782 8.51 4.091 14.401 4.091Zm64.643 18.328V71.839h27.412v19.965h1.227c2.21-6.955 5.974-12.274 11.292-16.038 5.319-3.763 11.456-5.645 18.329-5.645 1.555 0 3.355.082 5.237.163 1.964.164 3.601.328 4.91.573v25.938c-1.227-.41-3.109-.819-5.646-1.146a58.814 58.814 0 0 0-7.446-.49c-5.155 0-9.738 1.145-13.829 3.354-4.091 2.209-7.282 5.236-9.655 9.164-2.373 3.927-3.519 8.427-3.519 13.5v70.448h-28.312ZM222.077 39.192l-8.019 125.923L137.387 0l84.69 39.192Zm-53.105 162.825-57.933 33.056-57.934-33.056 11.783-28.556h92.301l11.783 28.556ZM111.039 62.675l30.357 73.803H80.681l30.358-73.803ZM7.937 165.115 0 39.192 84.69 0 7.937 165.115Z\"\n          />\n        </g>\n        <defs>\n          <radialGradient\n            id=\"c\"\n            cx=\"0\"\n            cy=\"0\"\n            r=\"1\"\n            gradientTransform=\"rotate(118.122 171.182 60.81) scale(205.794)\"\n            gradientUnits=\"userSpaceOnUse\"\n          >\n            <stop stop-color=\"#FF41F8\" />\n            <stop offset=\".707\" stop-color=\"#FF41F8\" stop-opacity=\".5\" />\n            <stop offset=\"1\" stop-color=\"#FF41F8\" stop-opacity=\"0\" />\n          </radialGradient>\n          <linearGradient id=\"b\" x1=\"0\" x2=\"982\" y1=\"192\" y2=\"192\" gradientUnits=\"userSpaceOnUse\">\n            <stop stop-color=\"#F0060B\" />\n            <stop offset=\"0\" stop-color=\"#F0070C\" />\n            <stop offset=\".526\" stop-color=\"#CC26D5\" />\n            <stop offset=\"1\" stop-color=\"#7702FF\" />\n          </linearGradient>\n          <clipPath id=\"a\"><path fill=\"#fff\" d=\"M0 0h982v239H0z\" /></clipPath>\n        </defs>\n      </svg>\n      <h1>{{ title }}</h1>\n\n      <app-demo />\n    </div>\n    <div class=\"divider\" role=\"separator\" aria-label=\"Divider\"></div>\n    <div class=\"right-side\">\n      <div class=\"pill-group\">\n        @for (\n          item of [\n            { title: 'Explore the Docs', link: 'https://angular.dev' },\n            {\n              title: 'Learn with Tutorials',\n              link: 'https://angular.dev/tutorials',\n            },\n            { title: 'CLI Docs', link: 'https://angular.dev/tools/cli' },\n            {\n              title: 'Angular Language Service',\n              link: 'https://angular.dev/tools/language-service',\n            },\n            {\n              title: 'Angular DevTools',\n              link: 'https://angular.dev/tools/devtools',\n            },\n          ];\n          track item.title\n        ) {\n          <a class=\"pill\" [href]=\"item.link\" target=\"_blank\" rel=\"noopener\">\n            <span>{{ item.title }}</span>\n            <svg\n              xmlns=\"http://www.w3.org/2000/svg\"\n              height=\"14\"\n              viewBox=\"0 -960 960 960\"\n              width=\"14\"\n              fill=\"currentColor\"\n            >\n              <path\n                d=\"M200-120q-33 0-56.5-23.5T120-200v-560q0-33 23.5-56.5T200-840h280v80H200v560h560v-280h80v280q0 33-23.5 56.5T760-120H200Zm188-212-56-56 372-372H560v-80h280v280h-80v-144L388-332Z\"\n              />\n            </svg>\n          </a>\n        }\n      </div>\n      <div class=\"social-links\">\n        <a\n          href=\"https://github.com/angular/angular\"\n          aria-label=\"Github\"\n          target=\"_blank\"\n          rel=\"noopener\"\n        >\n          <svg\n            width=\"25\"\n            height=\"24\"\n            viewBox=\"0 0 25 24\"\n            fill=\"none\"\n            xmlns=\"http://www.w3.org/2000/svg\"\n            alt=\"Github\"\n          >\n            <path\n              d=\"M12.3047 0C5.50634 0 0 5.50942 0 12.3047C0 17.7423 3.52529 22.3535 8.41332 23.9787C9.02856 24.0946 9.25414 23.7142 9.25414 23.3871C9.25414 23.0949 9.24389 22.3207 9.23876 21.2953C5.81601 22.0377 5.09414 19.6444 5.09414 19.6444C4.53427 18.2243 3.72524 17.8449 3.72524 17.8449C2.61064 17.082 3.81137 17.0973 3.81137 17.0973C5.04697 17.1835 5.69604 18.3647 5.69604 18.3647C6.79321 20.2463 8.57636 19.7029 9.27978 19.3881C9.39052 18.5924 9.70736 18.0499 10.0591 17.7423C7.32641 17.4347 4.45429 16.3765 4.45429 11.6618C4.45429 10.3185 4.9311 9.22133 5.72065 8.36C5.58222 8.04931 5.16694 6.79833 5.82831 5.10337C5.82831 5.10337 6.85883 4.77319 9.2121 6.36459C10.1965 6.09082 11.2424 5.95546 12.2883 5.94931C13.3342 5.95546 14.3801 6.09082 15.3644 6.36459C17.7023 4.77319 18.7328 5.10337 18.7328 5.10337C19.3942 6.79833 18.9789 8.04931 18.8559 8.36C19.6403 9.22133 20.1171 10.3185 20.1171 11.6618C20.1171 16.3888 17.2409 17.4296 14.5031 17.7321C14.9338 18.1012 15.3337 18.8559 15.3337 20.0084C15.3337 21.6552 15.3183 22.978 15.3183 23.3779C15.3183 23.7009 15.5336 24.0854 16.1642 23.9623C21.0871 22.3484 24.6094 17.7341 24.6094 12.3047C24.6094 5.50942 19.0999 0 12.3047 0Z\"\n            />\n          </svg>\n        </a>\n        <a href=\"https://twitter.com/angular\" aria-label=\"Twitter\" target=\"_blank\" rel=\"noopener\">\n          <svg\n            width=\"24\"\n            height=\"24\"\n            viewBox=\"0 0 24 24\"\n            fill=\"none\"\n            xmlns=\"http://www.w3.org/2000/svg\"\n            alt=\"Twitter\"\n          >\n            <path\n              d=\"M18.244 2.25h3.308l-7.227 8.26 8.502 11.24H16.17l-5.214-6.817L4.99 21.75H1.68l7.73-8.835L1.254 2.25H8.08l4.713 6.231zm-1.161 17.52h1.833L7.084 4.126H5.117z\"\n            />\n          </svg>\n        </a>\n        <a\n          href=\"https://www.youtube.com/channel/UCbn1OgGei-DV7aSRo_HaAiw\"\n          aria-label=\"Youtube\"\n          target=\"_blank\"\n          rel=\"noopener\"\n        >\n          <svg\n            width=\"29\"\n            height=\"20\"\n            viewBox=\"0 0 29 20\"\n            fill=\"none\"\n            xmlns=\"http://www.w3.org/2000/svg\"\n            alt=\"Youtube\"\n          >\n            <path\n              fill-rule=\"evenodd\"\n              clip-rule=\"evenodd\"\n              d=\"M27.4896 1.52422C27.9301 1.96749 28.2463 2.51866 28.4068 3.12258C29.0004 5.35161 29.0004 10 29.0004 10C29.0004 10 29.0004 14.6484 28.4068 16.8774C28.2463 17.4813 27.9301 18.0325 27.4896 18.4758C27.0492 18.9191 26.5 19.2389 25.8972 19.4032C23.6778 20 14.8068 20 14.8068 20C14.8068 20 5.93586 20 3.71651 19.4032C3.11363 19.2389 2.56449 18.9191 2.12405 18.4758C1.68361 18.0325 1.36732 17.4813 1.20683 16.8774C0.613281 14.6484 0.613281 10 0.613281 10C0.613281 10 0.613281 5.35161 1.20683 3.12258C1.36732 2.51866 1.68361 1.96749 2.12405 1.52422C2.56449 1.08095 3.11363 0.76113 3.71651 0.596774C5.93586 0 14.8068 0 14.8068 0C14.8068 0 23.6778 0 25.8972 0.596774C26.5 0.76113 27.0492 1.08095 27.4896 1.52422ZM19.3229 10L11.9036 5.77905V14.221L19.3229 10Z\"\n            />\n          </svg>\n        </a>\n      </div>\n    </div>\n  </div>\n</main>\n\n<!-- * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * -->\n<!-- * * * * * * * * * * * The content above * * * * * * * * * * * * -->\n<!-- * * * * * * * * * * is only a placeholder * * * * * * * * * * * -->\n<!-- * * * * * * * * * * and can be replaced.  * * * * * * * * * * * -->\n<!-- * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * -->\n<!-- * * * * * * * * * * End of Placeholder  * * * * * * * * * * * * -->\n<!-- * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * -->\n\n<router-outlet />\n"
  },
  {
    "path": "examples/openapi-ts-angular/src/app/app.component.spec.ts",
    "content": "import { provideHttpClient } from '@angular/common/http';\nimport { TestBed } from '@angular/core/testing';\n\nimport { AppComponent } from './app.component';\n\ndescribe('AppComponent', () => {\n  beforeEach(async () => {\n    await TestBed.configureTestingModule({\n      imports: [AppComponent],\n      providers: [provideHttpClient()],\n    }).compileComponents();\n  });\n\n  it('should create the app', () => {\n    const fixture = TestBed.createComponent(AppComponent);\n    const app = fixture.componentInstance;\n    expect(app).toBeTruthy();\n  });\n\n  it(`should have the 'angular' title`, () => {\n    const fixture = TestBed.createComponent(AppComponent);\n    const app = fixture.componentInstance;\n    expect(app.title).toEqual('angular');\n  });\n\n  it('should render title', () => {\n    const fixture = TestBed.createComponent(AppComponent);\n    fixture.detectChanges();\n    const compiled = fixture.nativeElement as HTMLElement;\n    expect(compiled.querySelector('h1')?.textContent).toContain('@hey-api/openapi-ts 🤝 Angular');\n  });\n});\n"
  },
  {
    "path": "examples/openapi-ts-angular/src/app/app.component.ts",
    "content": "import { Component } from '@angular/core';\nimport { RouterOutlet } from '@angular/router';\n\nimport { Demo } from './demo/demo';\n\n@Component({\n  host: { ngSkipHydration: 'true' },\n  imports: [RouterOutlet, Demo],\n  selector: 'app-root',\n  styleUrl: './app.component.css',\n  templateUrl: './app.component.html',\n})\nexport class AppComponent {\n  title = '@hey-api/openapi-ts 🤝 Angular';\n}\n"
  },
  {
    "path": "examples/openapi-ts-angular/src/app/app.config.server.ts",
    "content": "import type { ApplicationConfig } from '@angular/core';\nimport { mergeApplicationConfig } from '@angular/core';\nimport { provideServerRendering, withRoutes } from '@angular/ssr';\n\nimport { appConfig } from './app.config';\nimport { serverRoutes } from './app.routes.server';\n\nconst serverConfig: ApplicationConfig = {\n  providers: [provideServerRendering(), provideServerRendering(withRoutes(serverRoutes))],\n};\n\nexport const config = mergeApplicationConfig(appConfig, serverConfig);\n"
  },
  {
    "path": "examples/openapi-ts-angular/src/app/app.config.ts",
    "content": "import { provideHttpClient, withFetch } from '@angular/common/http';\nimport type { ApplicationConfig } from '@angular/core';\nimport { provideZoneChangeDetection } from '@angular/core';\nimport { provideClientHydration, withEventReplay } from '@angular/platform-browser';\nimport { provideRouter } from '@angular/router';\n\nimport { client } from '../client/client.gen';\nimport { provideHeyApiClient } from '../client/client/client.gen';\nimport { routes } from './app.routes';\n\nexport const appConfig: ApplicationConfig = {\n  providers: [\n    provideZoneChangeDetection({ eventCoalescing: true }),\n    provideRouter(routes),\n    provideClientHydration(withEventReplay()),\n    provideHttpClient(withFetch()),\n    provideHeyApiClient(client),\n  ],\n};\n"
  },
  {
    "path": "examples/openapi-ts-angular/src/app/app.routes.server.ts",
    "content": "import type { ServerRoute } from '@angular/ssr';\nimport { RenderMode } from '@angular/ssr';\n\nexport const serverRoutes: ServerRoute[] = [\n  {\n    path: '**',\n    renderMode: RenderMode.Prerender,\n  },\n];\n"
  },
  {
    "path": "examples/openapi-ts-angular/src/app/app.routes.ts",
    "content": "import type { Routes } from '@angular/router';\n\nimport { Demo } from './demo/demo';\n\nexport const routes: Routes = [\n  {\n    component: Demo,\n    path: '',\n    pathMatch: 'full',\n  },\n];\n"
  },
  {
    "path": "examples/openapi-ts-angular/src/app/demo/demo.css",
    "content": "/* Pet Card Styles */\n.pet-card {\n  background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);\n  border-radius: 16px;\n  padding: 1.5rem;\n  margin-top: 1.5rem;\n  box-shadow:\n    0 4px 6px -1px rgba(0, 0, 0, 0.1),\n    0 2px 4px -1px rgba(0, 0, 0, 0.06);\n  border: 1px solid rgba(0, 0, 0, 0.05);\n  transition:\n    transform 120ms ease,\n    box-shadow 120ms ease;\n}\n\n.pet-info {\n  display: flex;\n  align-items: center;\n  gap: 1rem;\n}\n\n.pet-avatar {\n  width: 64px;\n  height: 64px;\n  border-radius: 12px;\n  overflow: hidden;\n  flex-shrink: 0;\n  background: var(--red-to-pink-to-purple-horizontal-gradient);\n  display: flex;\n  align-items: center;\n  justify-content: center;\n}\n\n.pet-image {\n  width: 100%;\n  height: 100%;\n  object-fit: cover;\n}\n\n.pet-placeholder {\n  color: white;\n  font-size: 1.5rem;\n  font-weight: 600;\n  text-transform: uppercase;\n}\n\n.pet-details {\n  flex: 1;\n  display: flex;\n  flex-direction: column;\n  gap: 0.5rem;\n}\n\n.pet-name {\n  font-size: 1.125rem;\n  font-weight: 600;\n  color: var(--gray-900);\n  margin: 0;\n}\n\n.pet-category {\n  font-size: 0.875rem;\n  color: var(--gray-700);\n  background: rgba(255, 65, 248, 0.1);\n  padding: 0.25rem 0.75rem;\n  border-radius: 20px;\n  display: inline-block;\n  width: fit-content;\n}\n\n/* Error Message Styles */\n.error-message {\n  background: linear-gradient(135deg, #fef2f2 0%, #fee2e2 100%);\n  border: 1px solid #fecaca;\n  border-radius: 12px;\n  padding: 1rem;\n  margin-top: 1.5rem;\n  box-shadow: 0 2px 4px rgba(239, 68, 68, 0.1);\n}\n\n.error-title {\n  font-size: 1rem;\n  font-weight: 600;\n  color: #dc2626;\n  margin-bottom: 0.5rem;\n  display: flex;\n  align-items: center;\n  gap: 0.5rem;\n}\n\n.error-title::before {\n  content: '⚠️';\n  font-size: 1.125rem;\n}\n\n.error-details {\n  font-size: 0.875rem;\n  color: #991b1b;\n  background: rgba(239, 68, 68, 0.05);\n  padding: 0.75rem;\n  border-radius: 8px;\n  font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;\n  white-space: pre-wrap;\n  word-break: break-word;\n  border-left: 3px solid #ef4444;\n}\n\n/* Button Styles Enhancement */\nbutton {\n  background: var(--red-to-pink-to-purple-horizontal-gradient);\n  color: white;\n  border: none;\n  padding: 0.75rem 1.5rem;\n  border-radius: 8px;\n  font-size: 0.875rem;\n  font-weight: 500;\n  cursor: pointer;\n  transition: all 120ms ease;\n  margin-top: 1rem;\n  margin-right: 0.5rem;\n  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);\n}\n\nbutton:hover {\n  transform: translateY(-1px);\n  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);\n}\n\nbutton:active {\n  transform: translateY(0);\n}\n\n/* Responsive adjustments */\n@media screen and (max-width: 650px) {\n  .pet-card {\n    padding: 1rem;\n    margin-top: 1rem;\n  }\n\n  .pet-info {\n    flex-direction: column;\n    text-align: center;\n    gap: 1rem;\n  }\n\n  .pet-avatar {\n    width: 80px;\n    height: 80px;\n    align-self: center;\n  }\n\n  .error-message {\n    padding: 0.75rem;\n    margin-top: 1rem;\n  }\n}\n"
  },
  {
    "path": "examples/openapi-ts-angular/src/app/demo/demo.html",
    "content": "<button (click)=\"onGetPetById()\" type=\"button\">Get Random Pet</button>\n<button (click)=\"onGetPetByIdLocalClient()\" type=\"button\">Get Random Pet (local client)</button>\n\n<!-- Error Display -->\n@if (error()) {\n<div class=\"error-message\">\n  <div class=\"error-title\">Error occurred:</div>\n  <div class=\"error-details\">{{ error()?.error }}</div>\n</div>\n}\n\n<!-- Pet Display Card -->\n@if (pet()) {\n<div class=\"pet-card\">\n  <div class=\"pet-info\">\n    <div class=\"pet-avatar\">\n      @if (pet()?.photoUrls?.[0]) {\n      <img [src]=\"pet()?.photoUrls?.[0]\" [alt]=\"pet()?.name || 'Pet'\" class=\"pet-image\" />\n      } @else {\n      <div class=\"pet-placeholder\">{{ pet()?.name?.slice(0, 1) || 'N' }}</div>\n      }\n    </div>\n    <div class=\"pet-details\">\n      <div class=\"pet-name\">Name: {{ pet()?.name || 'N/A' }}</div>\n      <div class=\"pet-category\">Category: {{ pet()?.category?.name || 'N/A' }}</div>\n    </div>\n  </div>\n</div>\n}\n"
  },
  {
    "path": "examples/openapi-ts-angular/src/app/demo/demo.ts",
    "content": "import type { HttpErrorResponse } from '@angular/common/http';\nimport { HttpClient } from '@angular/common/http';\nimport { Component, inject, signal } from '@angular/core';\n\nimport type { AddPetErrors, Pet } from '../../client';\nimport { PetService } from '../../client';\nimport { createClient } from '../../client/client';\n\nconst localClient = createClient({\n  // set default base url for requests made by this client\n  baseUrl: 'https://petstore3.swagger.io/api/v3',\n  /**\n   * Set default headers only for requests made by this client. This is to\n   * demonstrate local clients and their configuration taking precedence over\n   * internal service client.\n   */\n  headers: {\n    Authorization: 'Bearer <token_from_local_client>',\n  },\n});\n\n@Component({\n  host: { ngSkipHydration: 'true' },\n  imports: [],\n  selector: 'app-demo',\n  styleUrl: './demo.css',\n  templateUrl: './demo.html',\n})\nexport class Demo {\n  pet = signal<Pet | undefined>(undefined);\n  error = signal<\n    | undefined\n    | {\n        error: AddPetErrors[keyof AddPetErrors] | Error;\n        response: HttpErrorResponse;\n      }\n  >(undefined);\n\n  #petService = inject(PetService);\n  #http = inject(HttpClient);\n\n  // // you can set a global httpClient for this client like so, in your app.config, or on each request (like below)\n  // ngOnInit(): void {\n  //   localClient.setConfig({\n  //     httpClient: this.#http,\n  //   });\n  // }\n\n  onGetPetByIdLocalClient = async () => {\n    const { data, error, response } = await this.#petService.getPetById({\n      client: localClient,\n      httpClient: this.#http,\n      path: {\n        // random id 1-10\n        petId: Math.floor(Math.random() * (10 - 1 + 1) + 1),\n      },\n    });\n\n    if (error) {\n      console.log(error);\n      this.error.set({\n        error,\n        response: response as HttpErrorResponse,\n      });\n      return;\n    }\n\n    this.pet.set(data);\n    this.error.set(undefined);\n  };\n\n  onGetPetById = async () => {\n    const { data, error, response } = await this.#petService.getPetById({\n      path: {\n        // random id 1-10\n        petId: Math.floor(Math.random() * (10 - 1 + 1) + 1),\n      },\n    });\n\n    if (error) {\n      console.log(error);\n      this.error.set({\n        error,\n        response: response as HttpErrorResponse,\n      });\n      return;\n    } else {\n      console.log(error);\n      console.log(response);\n      this.pet.set(data);\n      this.error.set(undefined);\n    }\n  };\n}\n"
  },
  {
    "path": "examples/openapi-ts-angular/src/client/client/client.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { HttpResponse } from '@angular/common/http';\nimport { HttpClient, HttpErrorResponse, HttpEventType, HttpRequest } from '@angular/common/http';\nimport {\n  assertInInjectionContext,\n  inject,\n  provideAppInitializer,\n  runInInjectionContext,\n} from '@angular/core';\nimport { firstValueFrom } from 'rxjs';\nimport { filter } from 'rxjs/operators';\n\nimport { createSseClient } from '../core/serverSentEvents.gen';\nimport type { HttpMethod } from '../core/types.gen';\nimport { getValidRequestBody } from '../core/utils.gen';\nimport type {\n  Client,\n  Config,\n  RequestOptions,\n  ResolvedRequestOptions,\n  ResponseStyle,\n} from './types.gen';\nimport {\n  buildUrl,\n  createConfig,\n  createInterceptors,\n  mergeConfigs,\n  mergeHeaders,\n  setAuthParams,\n} from './utils.gen';\n\nexport function provideHeyApiClient(client: Client) {\n  return provideAppInitializer(() => {\n    const httpClient = inject(HttpClient);\n    client.setConfig({ httpClient });\n  });\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<\n    HttpRequest<unknown>,\n    HttpResponse<unknown>,\n    unknown,\n    ResolvedRequestOptions\n  >();\n\n  const requestOptions = <\n    TData = unknown,\n    ThrowOnError extends boolean = false,\n    TResponseStyle extends ResponseStyle = 'fields',\n  >(\n    options: RequestOptions<TData, TResponseStyle, ThrowOnError>,\n  ) => {\n    const opts = {\n      ..._config,\n      ...options,\n      headers: mergeHeaders(_config.headers, options.headers),\n      httpClient: options.httpClient ?? _config.httpClient,\n      serializedBody: undefined as string | undefined,\n    };\n\n    if (!opts.httpClient) {\n      if (opts.injector) {\n        opts.httpClient = runInInjectionContext(opts.injector, () => inject(HttpClient));\n      } else {\n        assertInInjectionContext(requestOptions);\n        opts.httpClient = inject(HttpClient);\n      }\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 url = buildUrl(opts as any);\n\n    const req = new HttpRequest<unknown>(opts.method ?? 'GET', url, getValidRequestBody(opts), {\n      redirect: 'follow',\n      ...opts,\n    });\n\n    return { opts, req, url };\n  };\n\n  const beforeRequest = async (options: RequestOptions) => {\n    const { opts, req, url } = requestOptions(options);\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    return { opts, req, url };\n  };\n\n  const request: Client['request'] = async (options) => {\n    // @ts-expect-error\n    const { opts, req: initialReq } = await beforeRequest(options);\n\n    let req = initialReq;\n\n    for (const fn of interceptors.request.fns) {\n      if (fn) {\n        req = await fn(req, opts as any);\n      }\n    }\n\n    const result: {\n      request: HttpRequest<unknown>;\n      response: any;\n    } = {\n      request: req,\n      response: null,\n    };\n\n    try {\n      result.response = (await firstValueFrom(\n        opts\n          .httpClient!.request(req)\n          .pipe(filter((event) => event.type === HttpEventType.Response)),\n      )) as HttpResponse<unknown>;\n\n      for (const fn of interceptors.response.fns) {\n        if (fn) {\n          result.response = await fn(result.response, req, opts as any);\n        }\n      }\n\n      let bodyResponse = result.response.body;\n\n      if (opts.responseValidator) {\n        await opts.responseValidator(bodyResponse);\n      }\n\n      if (opts.responseTransformer) {\n        bodyResponse = await opts.responseTransformer(bodyResponse);\n      }\n\n      return opts.responseStyle === 'data' ? bodyResponse : { data: bodyResponse, ...result };\n    } catch (error) {\n      if (error instanceof HttpErrorResponse) {\n        result.response = error;\n      }\n\n      let finalError = error instanceof HttpErrorResponse ? error.error : error;\n\n      for (const fn of interceptors.error.fns) {\n        if (fn) {\n          finalError = (await fn(finalError, result.response as any, req, opts as any)) as string;\n        }\n      }\n\n      if (opts.throwOnError) {\n        throw finalError;\n      }\n\n      return opts.responseStyle === 'data'\n        ? undefined\n        : {\n            error: finalError,\n            ...result,\n          };\n    }\n  };\n\n  const makeMethodFn = (method: Uppercase<HttpMethod>) => (options: RequestOptions) =>\n    request({ ...options, method });\n\n  const makeSseFn = (method: Uppercase<HttpMethod>) => async (options: RequestOptions) => {\n    const { opts, url } = await beforeRequest(options);\n    return createSseClient({\n      ...opts,\n      body: opts.body as BodyInit | null | undefined,\n      headers: opts.headers as unknown as Record<string, string>,\n      method,\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    requestOptions: (options) => {\n      if (options.security) {\n        throw new Error('Security is not supported in requestOptions');\n      }\n\n      if (options.requestValidator) {\n        throw new Error('Request validation is not supported in requestOptions');\n      }\n\n      return requestOptions(options).req;\n    },\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"
  },
  {
    "path": "examples/openapi-ts-angular/src/client/client/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type { Auth } from '../core/auth.gen';\nexport type { QuerySerializerOptions } from '../core/bodySerializer.gen';\nexport {\n  formDataBodySerializer,\n  jsonBodySerializer,\n  urlSearchParamsBodySerializer,\n} from '../core/bodySerializer.gen';\nexport { buildClientParams } from '../core/params.gen';\nexport { serializeQueryKeyValue } from '../core/queryKeySerializer.gen';\nexport { createClient } from './client.gen';\nexport type {\n  Client,\n  ClientOptions,\n  Config,\n  CreateClientConfig,\n  Options,\n  RequestOptions,\n  RequestResult,\n  ResolvedRequestOptions,\n  ResponseStyle,\n  TDataShape,\n} from './types.gen';\nexport { createConfig, mergeHeaders } from './utils.gen';\n"
  },
  {
    "path": "examples/openapi-ts-angular/src/client/client/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type {\n  HttpClient,\n  HttpErrorResponse,\n  HttpHeaders,\n  HttpRequest,\n  HttpResponse,\n} from '@angular/common/http';\nimport type { Injector } from '@angular/core';\n\nimport type { Auth } from '../core/auth.gen';\nimport type { ServerSentEventsOptions, ServerSentEventsResult } from '../core/serverSentEvents.gen';\nimport type { Client as CoreClient, Config as CoreConfig } from '../core/types.gen';\nimport type { Middleware } from './utils.gen';\n\nexport type ResponseStyle = 'data' | 'fields';\n\nexport interface Config<T extends ClientOptions = ClientOptions>\n  extends Omit<RequestInit, 'body' | 'headers' | 'method'>, Omit<CoreConfig, 'headers'> {\n  /**\n   * Base URL for all requests made by this client.\n   */\n  baseUrl?: T['baseUrl'];\n  /**\n   * An object containing any HTTP headers that you want to pre-populate your\n   * `HttpHeaders` object with.\n   *\n   * {@link https://angular.dev/api/common/http/HttpHeaders#constructor See more}\n   */\n  headers?:\n    | HttpHeaders\n    | Record<\n        string,\n        string | number | boolean | (string | number | boolean)[] | null | undefined | unknown\n      >;\n  /**\n   * The HTTP client to use for making requests.\n   */\n  httpClient?: HttpClient;\n  /**\n   * Should we return only data or multiple fields (data, error, response, etc.)?\n   *\n   * @default 'fields'\n   */\n  responseStyle?: ResponseStyle;\n\n  /**\n   * Throw an error instead of returning it in the response?\n   *\n   * @default false\n   */\n  throwOnError?: T['throwOnError'];\n}\n\nexport interface RequestOptions<\n  TData = unknown,\n  TResponseStyle extends ResponseStyle = 'fields',\n  ThrowOnError extends boolean = boolean,\n  Url extends string = string,\n>\n  extends\n    Config<{\n      responseStyle: TResponseStyle;\n      throwOnError: ThrowOnError;\n    }>,\n    Pick<\n      ServerSentEventsOptions<TData>,\n      | 'onRequest'\n      | 'onSseError'\n      | 'onSseEvent'\n      | 'sseDefaultRetryDelay'\n      | 'sseMaxRetryAttempts'\n      | 'sseMaxRetryDelay'\n    > {\n  /**\n   * Any body that you want to add to your request.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/fetch#body}\n   */\n  body?: unknown;\n  /**\n   * Optional custom injector for dependency resolution if you don't implicitly or explicitly provide one.\n   */\n  injector?: Injector;\n  path?: Record<string, unknown>;\n  query?: Record<string, unknown>;\n  /**\n   * Security mechanism(s) to use for the request.\n   */\n  security?: ReadonlyArray<Auth>;\n  url: Url;\n}\n\nexport interface ResolvedRequestOptions<\n  TResponseStyle extends ResponseStyle = 'fields',\n  ThrowOnError extends boolean = boolean,\n  Url extends string = string,\n> extends RequestOptions<unknown, TResponseStyle, ThrowOnError, Url> {\n  serializedBody?: string;\n}\n\nexport type RequestResult<\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = boolean,\n  TResponseStyle extends ResponseStyle = 'fields',\n> = Promise<\n  ThrowOnError extends true\n    ? TResponseStyle extends 'data'\n      ? TData extends Record<string, unknown>\n        ? TData[keyof TData]\n        : TData\n      : {\n          data: TData extends Record<string, unknown> ? TData[keyof TData] : TData;\n          request: HttpRequest<unknown>;\n          response: HttpResponse<TData>;\n        }\n    : TResponseStyle extends 'data'\n      ? (TData extends Record<string, unknown> ? TData[keyof TData] : TData) | undefined\n      :\n          | {\n              data: TData extends Record<string, unknown> ? TData[keyof TData] : TData;\n              error: undefined;\n              request: HttpRequest<unknown>;\n              response: HttpResponse<TData>;\n            }\n          | {\n              data: undefined;\n              error: TError[keyof TError];\n              request: HttpRequest<unknown>;\n              response: HttpErrorResponse & {\n                error: TError[keyof TError] | null;\n              };\n            }\n>;\n\nexport interface ClientOptions {\n  baseUrl?: string;\n  responseStyle?: ResponseStyle;\n  throwOnError?: boolean;\n}\n\ntype MethodFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'>,\n) => RequestResult<TData, TError, ThrowOnError, TResponseStyle>;\n\ntype SseFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'>,\n) => Promise<ServerSentEventsResult<TData, TError>>;\n\ntype RequestFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'> &\n    Pick<Required<RequestOptions<TData, TResponseStyle, ThrowOnError>>, 'method'>,\n) => RequestResult<TData, TError, ThrowOnError, TResponseStyle>;\n\ntype RequestOptionsFn = <\n  T,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: RequestOptions<T, TResponseStyle, ThrowOnError>,\n) => HttpRequest<T>;\n\ntype BuildUrlFn = <\n  TData extends {\n    body?: unknown;\n    path?: Record<string, unknown>;\n    query?: Record<string, unknown>;\n    url: string;\n  },\n>(\n  options: TData & Options<TData>,\n) => string;\n\nexport type Client = CoreClient<RequestFn, Config, MethodFn, BuildUrlFn, SseFn> & {\n  interceptors: Middleware<\n    HttpRequest<unknown>,\n    HttpResponse<unknown>,\n    unknown,\n    ResolvedRequestOptions\n  >;\n  requestOptions: RequestOptionsFn;\n};\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 = ClientOptions> = (\n  override?: Config<ClientOptions & T>,\n) => Config<Required<ClientOptions> & T>;\n\nexport interface TDataShape {\n  body?: unknown;\n  headers?: unknown;\n  path?: unknown;\n  query?: unknown;\n  url: string;\n}\n\ntype OmitKeys<T, K> = Pick<T, Exclude<keyof T, K>>;\n\nexport type Options<\n  TData extends TDataShape = TDataShape,\n  ThrowOnError extends boolean = boolean,\n  TResponse = unknown,\n  TResponseStyle extends ResponseStyle = 'fields',\n> = OmitKeys<\n  RequestOptions<TResponse, TResponseStyle, ThrowOnError>,\n  'body' | 'path' | 'query' | 'url'\n> &\n  ([TData] extends [never] ? unknown : Omit<TData, 'url'>);\n"
  },
  {
    "path": "examples/openapi-ts-angular/src/client/client/utils.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport { HttpHeaders } from '@angular/common/http';\n\nimport { getAuthToken } from '../core/auth.gen';\nimport type { QuerySerializer, QuerySerializerOptions } from '../core/bodySerializer.gen';\nimport {\n  serializeArrayParam,\n  serializeObjectParam,\n  serializePrimitiveParam,\n} from '../core/pathSerializer.gen';\nimport type { Client, ClientOptions, Config, RequestOptions } from './types.gen';\n\ninterface PathSerializer {\n  path: Record<string, unknown>;\n  url: string;\n}\n\nconst PATH_PARAM_RE = /\\{[^{}]+\\}/g;\n\ntype ArrayStyle = 'form' | 'spaceDelimited' | 'pipeDelimited';\ntype MatrixStyle = 'label' | 'matrix' | 'simple';\ntype ArraySeparatorStyle = ArrayStyle | MatrixStyle;\n\nconst 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 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 = (\n  contentType: string | null,\n): 'blob' | 'formData' | 'json' | 'stream' | 'text' | undefined => {\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\nexport const setAuthParams = async (\n  options: Pick<Required<RequestOptions>, 'security'> &\n    Pick<RequestOptions, 'auth' | 'query'> & {\n      headers: HttpHeaders;\n    },\n) => {\n  for (const auth of options.security) {\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 = options.headers.append('Cookie', `${name}=${token}`);\n        break;\n      case 'header':\n      default:\n        options.headers = options.headers.set(name, token);\n        break;\n    }\n\n    return;\n  }\n};\n\nexport const buildUrl: Client['buildUrl'] = (options) => {\n  const url = 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  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 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\nexport const mergeHeaders = (\n  ...headers: Array<Required<Config>['headers'] | undefined>\n): HttpHeaders => {\n  let mergedHeaders = new HttpHeaders();\n\n  for (const header of headers) {\n    if (!header || typeof header !== 'object') {\n      continue;\n    }\n\n    if (header instanceof HttpHeaders) {\n      // Merge HttpHeaders instance\n      header.keys().forEach((key) => {\n        const values = header.getAll(key);\n        if (values) {\n          values.forEach((value) => {\n            mergedHeaders = mergedHeaders.append(key, value);\n          });\n        }\n      });\n    } else {\n      // Merge plain object headers\n      for (const [key, value] of Object.entries(header)) {\n        if (value === null) {\n          mergedHeaders = mergedHeaders.delete(key);\n        } else if (Array.isArray(value)) {\n          for (const v of value) {\n            mergedHeaders = 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 = mergedHeaders.set(\n            key,\n            typeof value === 'object' ? JSON.stringify(value) : (value as string),\n          );\n        }\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  headers: defaultHeaders,\n  querySerializer: defaultQuerySerializer,\n  ...override,\n});\n"
  },
  {
    "path": "examples/openapi-ts-angular/src/client/client.gen.ts",
    "content": "// 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> = (\n  override?: Config<ClientOptions & T>,\n) => Config<Required<ClientOptions> & T>;\n\nexport const client = createClient(\n  createConfig<ClientOptions2>({ baseUrl: 'https://petstore3.swagger.io/api/v3' }),\n);\n"
  },
  {
    "path": "examples/openapi-ts-angular/src/client/core/auth.gen.ts",
    "content": "// 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"
  },
  {
    "path": "examples/openapi-ts-angular/src/client/core/bodySerializer.gen.ts",
    "content": "// 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"
  },
  {
    "path": "examples/openapi-ts-angular/src/client/core/params.gen.ts",
    "content": "// 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"
  },
  {
    "path": "examples/openapi-ts-angular/src/client/core/pathSerializer.gen.ts",
    "content": "// 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"
  },
  {
    "path": "examples/openapi-ts-angular/src/client/core/queryKeySerializer.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\n/**\n * JSON-friendly union that mirrors what Pinia Colada can hash.\n */\nexport type JsonValue =\n  | null\n  | string\n  | number\n  | boolean\n  | JsonValue[]\n  | { [key: string]: JsonValue };\n\n/**\n * Replacer that converts non-JSON values (bigint, Date, etc.) to safe substitutes.\n */\nexport const queryKeyJsonReplacer = (_key: string, value: unknown) => {\n  if (value === undefined || typeof value === 'function' || typeof value === 'symbol') {\n    return undefined;\n  }\n  if (typeof value === 'bigint') {\n    return value.toString();\n  }\n  if (value instanceof Date) {\n    return value.toISOString();\n  }\n  return value;\n};\n\n/**\n * Safely stringifies a value and parses it back into a JsonValue.\n */\nexport const stringifyToJsonValue = (input: unknown): JsonValue | undefined => {\n  try {\n    const json = JSON.stringify(input, queryKeyJsonReplacer);\n    if (json === undefined) {\n      return undefined;\n    }\n    return JSON.parse(json) as JsonValue;\n  } catch {\n    return undefined;\n  }\n};\n\n/**\n * Detects plain objects (including objects with a null prototype).\n */\nconst isPlainObject = (value: unknown): value is Record<string, unknown> => {\n  if (value === null || typeof value !== 'object') {\n    return false;\n  }\n  const prototype = Object.getPrototypeOf(value as object);\n  return prototype === Object.prototype || prototype === null;\n};\n\n/**\n * Turns URLSearchParams into a sorted JSON object for deterministic keys.\n */\nconst serializeSearchParams = (params: URLSearchParams): JsonValue => {\n  const entries = Array.from(params.entries()).sort(([a], [b]) => a.localeCompare(b));\n  const result: Record<string, JsonValue> = {};\n\n  for (const [key, value] of entries) {\n    const existing = result[key];\n    if (existing === undefined) {\n      result[key] = value;\n      continue;\n    }\n\n    if (Array.isArray(existing)) {\n      (existing as string[]).push(value);\n    } else {\n      result[key] = [existing, value];\n    }\n  }\n\n  return result;\n};\n\n/**\n * Normalizes any accepted value into a JSON-friendly shape for query keys.\n */\nexport const serializeQueryKeyValue = (value: unknown): JsonValue | undefined => {\n  if (value === null) {\n    return null;\n  }\n\n  if (typeof value === 'string' || typeof value === 'number' || typeof value === 'boolean') {\n    return value;\n  }\n\n  if (value === undefined || typeof value === 'function' || typeof value === 'symbol') {\n    return undefined;\n  }\n\n  if (typeof value === 'bigint') {\n    return value.toString();\n  }\n\n  if (value instanceof Date) {\n    return value.toISOString();\n  }\n\n  if (Array.isArray(value)) {\n    return stringifyToJsonValue(value);\n  }\n\n  if (typeof URLSearchParams !== 'undefined' && value instanceof URLSearchParams) {\n    return serializeSearchParams(value);\n  }\n\n  if (isPlainObject(value)) {\n    return stringifyToJsonValue(value);\n  }\n\n  return undefined;\n};\n"
  },
  {
    "path": "examples/openapi-ts-angular/src/client/core/serverSentEvents.gen.ts",
    "content": "// 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 const 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            // Normalize line endings: CRLF -> LF, then CR -> LF\n            buffer = buffer.replace(/\\r\\n/g, '\\n').replace(/\\r/g, '\\n');\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"
  },
  {
    "path": "examples/openapi-ts-angular/src/client/core/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { Auth, AuthToken } from './auth.gen';\nimport type { BodySerializer, QuerySerializer, QuerySerializerOptions } from './bodySerializer.gen';\n\nexport type HttpMethod =\n  | 'connect'\n  | 'delete'\n  | 'get'\n  | 'head'\n  | 'options'\n  | 'patch'\n  | 'post'\n  | 'put'\n  | 'trace';\n\nexport type Client<\n  RequestFn = never,\n  Config = unknown,\n  MethodFn = never,\n  BuildUrlFn = never,\n  SseFn = never,\n> = {\n  /**\n   * Returns the final request URL.\n   */\n  buildUrl: BuildUrlFn;\n  getConfig: () => Config;\n  request: RequestFn;\n  setConfig: (config: Config) => Config;\n} & {\n  [K in HttpMethod]: MethodFn;\n} & ([SseFn] extends [never] ? { sse?: never } : { sse: { [K in HttpMethod]: SseFn } });\n\nexport interface Config {\n  /**\n   * Auth token or a function returning auth token. The resolved value will be\n   * added to the request payload as defined by its `security` array.\n   */\n  auth?: ((auth: Auth) => Promise<AuthToken> | AuthToken) | AuthToken;\n  /**\n   * A function for serializing request body parameter. By default,\n   * {@link JSON.stringify()} will be used.\n   */\n  bodySerializer?: BodySerializer | null;\n  /**\n   * An object containing any HTTP headers that you want to pre-populate your\n   * `Headers` object with.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/Headers/Headers#init See more}\n   */\n  headers?:\n    | RequestInit['headers']\n    | Record<\n        string,\n        string | number | boolean | (string | number | boolean)[] | null | undefined | unknown\n      >;\n  /**\n   * The request method.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/fetch#method See more}\n   */\n  method?: Uppercase<HttpMethod>;\n  /**\n   * A function for serializing request query parameters. By default, arrays\n   * will be exploded in form style, objects will be exploded in deepObject\n   * style, and reserved characters are percent-encoded.\n   *\n   * This method will have no effect if the native `paramsSerializer()` Axios\n   * API function is used.\n   *\n   * {@link https://swagger.io/docs/specification/serialization/#query View examples}\n   */\n  querySerializer?: QuerySerializer | QuerySerializerOptions;\n  /**\n   * A function validating request data. This is useful if you want to ensure\n   * the request conforms to the desired shape, so it can be safely sent to\n   * the server.\n   */\n  requestValidator?: (data: unknown) => Promise<unknown>;\n  /**\n   * A function transforming response data before it's returned. This is useful\n   * for post-processing data, e.g. converting ISO strings into Date objects.\n   */\n  responseTransformer?: (data: unknown) => Promise<unknown>;\n  /**\n   * A function validating response data. This is useful if you want to ensure\n   * the response conforms to the desired shape, so it can be safely passed to\n   * the transformers and returned to the user.\n   */\n  responseValidator?: (data: unknown) => Promise<unknown>;\n}\n\ntype IsExactlyNeverOrNeverUndefined<T> = [T] extends [never]\n  ? true\n  : [T] extends [never | undefined]\n    ? [undefined] extends [T]\n      ? false\n      : true\n    : false;\n\nexport type OmitNever<T extends Record<string, unknown>> = {\n  [K in keyof T as IsExactlyNeverOrNeverUndefined<T[K]> extends true ? never : K]: T[K];\n};\n"
  },
  {
    "path": "examples/openapi-ts-angular/src/client/core/utils.gen.ts",
    "content": "// 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"
  },
  {
    "path": "examples/openapi-ts-angular/src/client/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport { type Options, PetService, StoreService, UserService } from './sdk.gen';\nexport type {\n  AddPetData,\n  AddPetErrors,\n  AddPetResponse,\n  AddPetResponses,\n  ApiResponse,\n  Category,\n  ClientOptions,\n  CreateUserData,\n  CreateUserErrors,\n  CreateUserResponse,\n  CreateUserResponses,\n  CreateUsersWithListInputData,\n  CreateUsersWithListInputErrors,\n  CreateUsersWithListInputResponse,\n  CreateUsersWithListInputResponses,\n  DeleteOrderData,\n  DeleteOrderErrors,\n  DeleteOrderResponses,\n  DeletePetData,\n  DeletePetErrors,\n  DeletePetResponses,\n  DeleteUserData,\n  DeleteUserErrors,\n  DeleteUserResponses,\n  FindPetsByStatusData,\n  FindPetsByStatusErrors,\n  FindPetsByStatusResponse,\n  FindPetsByStatusResponses,\n  FindPetsByTagsData,\n  FindPetsByTagsErrors,\n  FindPetsByTagsResponse,\n  FindPetsByTagsResponses,\n  GetInventoryData,\n  GetInventoryErrors,\n  GetInventoryResponse,\n  GetInventoryResponses,\n  GetOrderByIdData,\n  GetOrderByIdErrors,\n  GetOrderByIdResponse,\n  GetOrderByIdResponses,\n  GetPetByIdData,\n  GetPetByIdErrors,\n  GetPetByIdResponse,\n  GetPetByIdResponses,\n  GetUserByNameData,\n  GetUserByNameErrors,\n  GetUserByNameResponse,\n  GetUserByNameResponses,\n  LoginUserData,\n  LoginUserErrors,\n  LoginUserResponse,\n  LoginUserResponses,\n  LogoutUserData,\n  LogoutUserErrors,\n  LogoutUserResponses,\n  Order,\n  Pet,\n  Pet2,\n  PlaceOrderData,\n  PlaceOrderErrors,\n  PlaceOrderResponse,\n  PlaceOrderResponses,\n  Tag,\n  UpdatePetData,\n  UpdatePetErrors,\n  UpdatePetResponse,\n  UpdatePetResponses,\n  UpdatePetWithFormData,\n  UpdatePetWithFormErrors,\n  UpdatePetWithFormResponse,\n  UpdatePetWithFormResponses,\n  UpdateUserData,\n  UpdateUserErrors,\n  UpdateUserResponses,\n  UploadFileData,\n  UploadFileErrors,\n  UploadFileResponse,\n  UploadFileResponses,\n  User,\n  UserArray,\n} from './types.gen';\n"
  },
  {
    "path": "examples/openapi-ts-angular/src/client/schemas.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport const OrderSchema = {\n  properties: {\n    complete: {\n      type: 'boolean',\n    },\n    id: {\n      example: 10,\n      format: 'int64',\n      type: 'integer',\n    },\n    petId: {\n      example: 198772,\n      format: 'int64',\n      type: 'integer',\n    },\n    quantity: {\n      example: 7,\n      format: 'int32',\n      type: 'integer',\n    },\n    shipDate: {\n      format: 'date-time',\n      type: 'string',\n    },\n    status: {\n      description: 'Order Status',\n      enum: ['placed', 'approved', 'delivered'],\n      example: 'approved',\n      type: 'string',\n    },\n  },\n  type: 'object',\n  'x-swagger-router-model': 'io.swagger.petstore.model.Order',\n  xml: {\n    name: 'order',\n  },\n} as const;\n\nexport const CategorySchema = {\n  properties: {\n    id: {\n      example: 1,\n      format: 'int64',\n      type: 'integer',\n    },\n    name: {\n      example: 'Dogs',\n      type: 'string',\n    },\n  },\n  type: 'object',\n  'x-swagger-router-model': 'io.swagger.petstore.model.Category',\n  xml: {\n    name: 'category',\n  },\n} as const;\n\nexport const UserSchema = {\n  properties: {\n    email: {\n      example: 'john@email.com',\n      type: 'string',\n    },\n    firstName: {\n      example: 'John',\n      type: 'string',\n    },\n    id: {\n      example: 10,\n      format: 'int64',\n      type: 'integer',\n    },\n    lastName: {\n      example: 'James',\n      type: 'string',\n    },\n    password: {\n      example: '12345',\n      type: 'string',\n    },\n    phone: {\n      example: '12345',\n      type: 'string',\n    },\n    userStatus: {\n      description: 'User Status',\n      example: 1,\n      format: 'int32',\n      type: 'integer',\n    },\n    username: {\n      example: 'theUser',\n      type: 'string',\n    },\n  },\n  type: 'object',\n  'x-swagger-router-model': 'io.swagger.petstore.model.User',\n  xml: {\n    name: 'user',\n  },\n} as const;\n\nexport const TagSchema = {\n  properties: {\n    id: {\n      format: 'int64',\n      type: 'integer',\n    },\n    name: {\n      type: 'string',\n    },\n  },\n  type: 'object',\n  'x-swagger-router-model': 'io.swagger.petstore.model.Tag',\n  xml: {\n    name: 'tag',\n  },\n} as const;\n\nexport const PetSchema = {\n  properties: {\n    category: {\n      $ref: '#/components/schemas/Category',\n    },\n    id: {\n      example: 10,\n      format: 'int64',\n      type: 'integer',\n    },\n    name: {\n      example: 'doggie',\n      type: 'string',\n    },\n    photoUrls: {\n      items: {\n        type: 'string',\n        xml: {\n          name: 'photoUrl',\n        },\n      },\n      type: 'array',\n      xml: {\n        wrapped: true,\n      },\n    },\n    status: {\n      description: 'pet status in the store',\n      enum: ['available', 'pending', 'sold'],\n      type: 'string',\n    },\n    tags: {\n      items: {\n        $ref: '#/components/schemas/Tag',\n      },\n      type: 'array',\n      xml: {\n        wrapped: true,\n      },\n    },\n  },\n  required: ['name', 'photoUrls'],\n  type: 'object',\n  'x-swagger-router-model': 'io.swagger.petstore.model.Pet',\n  xml: {\n    name: 'pet',\n  },\n} as const;\n\nexport const ApiResponseSchema = {\n  properties: {\n    code: {\n      format: 'int32',\n      type: 'integer',\n    },\n    message: {\n      type: 'string',\n    },\n    type: {\n      type: 'string',\n    },\n  },\n  type: 'object',\n  xml: {\n    name: '##default',\n  },\n} as const;\n"
  },
  {
    "path": "examples/openapi-ts-angular/src/client/sdk.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport { Injectable } from '@angular/core';\n\nimport type { Client, Options as Options2, TDataShape } from './client';\nimport { client } from './client.gen';\nimport type {\n  AddPetData,\n  AddPetErrors,\n  AddPetResponses,\n  CreateUserData,\n  CreateUserErrors,\n  CreateUserResponses,\n  CreateUsersWithListInputData,\n  CreateUsersWithListInputErrors,\n  CreateUsersWithListInputResponses,\n  DeleteOrderData,\n  DeleteOrderErrors,\n  DeleteOrderResponses,\n  DeletePetData,\n  DeletePetErrors,\n  DeletePetResponses,\n  DeleteUserData,\n  DeleteUserErrors,\n  DeleteUserResponses,\n  FindPetsByStatusData,\n  FindPetsByStatusErrors,\n  FindPetsByStatusResponses,\n  FindPetsByTagsData,\n  FindPetsByTagsErrors,\n  FindPetsByTagsResponses,\n  GetInventoryData,\n  GetInventoryErrors,\n  GetInventoryResponses,\n  GetOrderByIdData,\n  GetOrderByIdErrors,\n  GetOrderByIdResponses,\n  GetPetByIdData,\n  GetPetByIdErrors,\n  GetPetByIdResponses,\n  GetUserByNameData,\n  GetUserByNameErrors,\n  GetUserByNameResponses,\n  LoginUserData,\n  LoginUserErrors,\n  LoginUserResponses,\n  LogoutUserData,\n  LogoutUserErrors,\n  LogoutUserResponses,\n  PlaceOrderData,\n  PlaceOrderErrors,\n  PlaceOrderResponses,\n  UpdatePetData,\n  UpdatePetErrors,\n  UpdatePetResponses,\n  UpdatePetWithFormData,\n  UpdatePetWithFormErrors,\n  UpdatePetWithFormResponses,\n  UpdateUserData,\n  UpdateUserErrors,\n  UpdateUserResponses,\n  UploadFileData,\n  UploadFileErrors,\n  UploadFileResponses,\n} from './types.gen';\n\nexport type Options<\n  TData extends TDataShape = TDataShape,\n  ThrowOnError extends boolean = boolean,\n> = Options2<TData, ThrowOnError> & {\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@Injectable({ providedIn: 'root' })\nexport class PetService {\n  /**\n   * Add a new pet to the store.\n   *\n   * Add a new pet to the store.\n   */\n  public addPet<ThrowOnError extends boolean = false>(options: Options<AddPetData, ThrowOnError>) {\n    return (options.client ?? client).post<AddPetResponses, AddPetErrors, ThrowOnError>({\n      security: [{ scheme: 'bearer', type: 'http' }],\n      url: '/pet',\n      ...options,\n      headers: {\n        'Content-Type': 'application/json',\n        ...options.headers,\n      },\n    });\n  }\n\n  /**\n   * Update an existing pet.\n   *\n   * Update an existing pet by Id.\n   */\n  public updatePet<ThrowOnError extends boolean = false>(\n    options: Options<UpdatePetData, ThrowOnError>,\n  ) {\n    return (options.client ?? client).put<UpdatePetResponses, UpdatePetErrors, ThrowOnError>({\n      security: [{ scheme: 'bearer', type: 'http' }],\n      url: '/pet',\n      ...options,\n      headers: {\n        'Content-Type': 'application/json',\n        ...options.headers,\n      },\n    });\n  }\n\n  /**\n   * Finds Pets by status.\n   *\n   * Multiple status values can be provided with comma separated strings.\n   */\n  public findPetsByStatus<ThrowOnError extends boolean = false>(\n    options: Options<FindPetsByStatusData, ThrowOnError>,\n  ) {\n    return (options.client ?? client).get<\n      FindPetsByStatusResponses,\n      FindPetsByStatusErrors,\n      ThrowOnError\n    >({\n      security: [{ scheme: 'bearer', type: 'http' }],\n      url: '/pet/findByStatus',\n      ...options,\n    });\n  }\n\n  /**\n   * Finds Pets by tags.\n   *\n   * Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.\n   */\n  public findPetsByTags<ThrowOnError extends boolean = false>(\n    options: Options<FindPetsByTagsData, ThrowOnError>,\n  ) {\n    return (options.client ?? client).get<\n      FindPetsByTagsResponses,\n      FindPetsByTagsErrors,\n      ThrowOnError\n    >({\n      security: [{ scheme: 'bearer', type: 'http' }],\n      url: '/pet/findByTags',\n      ...options,\n    });\n  }\n\n  /**\n   * Deletes a pet.\n   *\n   * Delete a pet.\n   */\n  public deletePet<ThrowOnError extends boolean = false>(\n    options: Options<DeletePetData, ThrowOnError>,\n  ) {\n    return (options.client ?? client).delete<DeletePetResponses, DeletePetErrors, ThrowOnError>({\n      security: [{ scheme: 'bearer', type: 'http' }],\n      url: '/pet/{petId}',\n      ...options,\n    });\n  }\n\n  /**\n   * Find pet by ID.\n   *\n   * Returns a single pet.\n   */\n  public getPetById<ThrowOnError extends boolean = false>(\n    options: Options<GetPetByIdData, ThrowOnError>,\n  ) {\n    return (options.client ?? client).get<GetPetByIdResponses, GetPetByIdErrors, ThrowOnError>({\n      security: [\n        { name: 'api_key', type: 'apiKey' },\n        { scheme: 'bearer', type: 'http' },\n      ],\n      url: '/pet/{petId}',\n      ...options,\n    });\n  }\n\n  /**\n   * Updates a pet in the store with form data.\n   *\n   * Updates a pet resource based on the form data.\n   */\n  public updatePetWithForm<ThrowOnError extends boolean = false>(\n    options: Options<UpdatePetWithFormData, ThrowOnError>,\n  ) {\n    return (options.client ?? client).post<\n      UpdatePetWithFormResponses,\n      UpdatePetWithFormErrors,\n      ThrowOnError\n    >({\n      security: [{ scheme: 'bearer', type: 'http' }],\n      url: '/pet/{petId}',\n      ...options,\n    });\n  }\n\n  /**\n   * Uploads an image.\n   *\n   * Upload image of the pet.\n   */\n  public uploadFile<ThrowOnError extends boolean = false>(\n    options: Options<UploadFileData, ThrowOnError>,\n  ) {\n    return (options.client ?? client).post<UploadFileResponses, UploadFileErrors, ThrowOnError>({\n      bodySerializer: null,\n      security: [{ scheme: 'bearer', type: 'http' }],\n      url: '/pet/{petId}/uploadImage',\n      ...options,\n      headers: {\n        'Content-Type': 'application/octet-stream',\n        ...options.headers,\n      },\n    });\n  }\n}\n\n@Injectable({ providedIn: 'root' })\nexport class StoreService {\n  /**\n   * Returns pet inventories by status.\n   *\n   * Returns a map of status codes to quantities.\n   */\n  public getInventory<ThrowOnError extends boolean = false>(\n    options?: Options<GetInventoryData, ThrowOnError>,\n  ) {\n    return (options?.client ?? client).get<GetInventoryResponses, GetInventoryErrors, ThrowOnError>(\n      {\n        security: [{ name: 'api_key', type: 'apiKey' }],\n        url: '/store/inventory',\n        ...options,\n      },\n    );\n  }\n\n  /**\n   * Place an order for a pet.\n   *\n   * Place a new order in the store.\n   */\n  public placeOrder<ThrowOnError extends boolean = false>(\n    options?: Options<PlaceOrderData, ThrowOnError>,\n  ) {\n    return (options?.client ?? client).post<PlaceOrderResponses, PlaceOrderErrors, ThrowOnError>({\n      url: '/store/order',\n      ...options,\n      headers: {\n        'Content-Type': 'application/json',\n        ...options?.headers,\n      },\n    });\n  }\n\n  /**\n   * Delete purchase order by identifier.\n   *\n   * For valid response try integer IDs with value < 1000. Anything above 1000 or non-integers will generate API errors.\n   */\n  public deleteOrder<ThrowOnError extends boolean = false>(\n    options: Options<DeleteOrderData, ThrowOnError>,\n  ) {\n    return (options.client ?? client).delete<DeleteOrderResponses, DeleteOrderErrors, ThrowOnError>(\n      { url: '/store/order/{orderId}', ...options },\n    );\n  }\n\n  /**\n   * Find purchase order by ID.\n   *\n   * For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions.\n   */\n  public getOrderById<ThrowOnError extends boolean = false>(\n    options: Options<GetOrderByIdData, ThrowOnError>,\n  ) {\n    return (options.client ?? client).get<GetOrderByIdResponses, GetOrderByIdErrors, ThrowOnError>({\n      url: '/store/order/{orderId}',\n      ...options,\n    });\n  }\n}\n\n@Injectable({ providedIn: 'root' })\nexport class UserService {\n  /**\n   * Create user.\n   *\n   * This can only be done by the logged in user.\n   */\n  public createUser<ThrowOnError extends boolean = false>(\n    options?: Options<CreateUserData, ThrowOnError>,\n  ) {\n    return (options?.client ?? client).post<CreateUserResponses, CreateUserErrors, ThrowOnError>({\n      url: '/user',\n      ...options,\n      headers: {\n        'Content-Type': 'application/json',\n        ...options?.headers,\n      },\n    });\n  }\n\n  /**\n   * Creates list of users with given input array.\n   *\n   * Creates list of users with given input array.\n   */\n  public createUsersWithListInput<ThrowOnError extends boolean = false>(\n    options?: Options<CreateUsersWithListInputData, ThrowOnError>,\n  ) {\n    return (options?.client ?? client).post<\n      CreateUsersWithListInputResponses,\n      CreateUsersWithListInputErrors,\n      ThrowOnError\n    >({\n      url: '/user/createWithList',\n      ...options,\n      headers: {\n        'Content-Type': 'application/json',\n        ...options?.headers,\n      },\n    });\n  }\n\n  /**\n   * Logs user into the system.\n   *\n   * Log into the system.\n   */\n  public loginUser<ThrowOnError extends boolean = false>(\n    options?: Options<LoginUserData, ThrowOnError>,\n  ) {\n    return (options?.client ?? client).get<LoginUserResponses, LoginUserErrors, ThrowOnError>({\n      url: '/user/login',\n      ...options,\n    });\n  }\n\n  /**\n   * Logs out current logged in user session.\n   *\n   * Log user out of the system.\n   */\n  public logoutUser<ThrowOnError extends boolean = false>(\n    options?: Options<LogoutUserData, ThrowOnError>,\n  ) {\n    return (options?.client ?? client).get<LogoutUserResponses, LogoutUserErrors, ThrowOnError>({\n      url: '/user/logout',\n      ...options,\n    });\n  }\n\n  /**\n   * Delete user resource.\n   *\n   * This can only be done by the logged in user.\n   */\n  public deleteUser<ThrowOnError extends boolean = false>(\n    options: Options<DeleteUserData, ThrowOnError>,\n  ) {\n    return (options.client ?? client).delete<DeleteUserResponses, DeleteUserErrors, ThrowOnError>({\n      url: '/user/{username}',\n      ...options,\n    });\n  }\n\n  /**\n   * Get user by user name.\n   *\n   * Get user detail based on username.\n   */\n  public getUserByName<ThrowOnError extends boolean = false>(\n    options: Options<GetUserByNameData, ThrowOnError>,\n  ) {\n    return (options.client ?? client).get<\n      GetUserByNameResponses,\n      GetUserByNameErrors,\n      ThrowOnError\n    >({ url: '/user/{username}', ...options });\n  }\n\n  /**\n   * Update user resource.\n   *\n   * This can only be done by the logged in user.\n   */\n  public updateUser<ThrowOnError extends boolean = false>(\n    options: Options<UpdateUserData, ThrowOnError>,\n  ) {\n    return (options.client ?? client).put<UpdateUserResponses, UpdateUserErrors, ThrowOnError>({\n      url: '/user/{username}',\n      ...options,\n      headers: {\n        'Content-Type': 'application/json',\n        ...options.headers,\n      },\n    });\n  }\n}\n"
  },
  {
    "path": "examples/openapi-ts-angular/src/client/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type ClientOptions = {\n  baseUrl: 'https://petstore3.swagger.io/api/v3' | (string & {});\n};\n\nexport type Order = {\n  complete?: boolean;\n  id?: number;\n  petId?: number;\n  quantity?: number;\n  shipDate?: string;\n  /**\n   * Order Status\n   */\n  status?: 'placed' | 'approved' | 'delivered';\n};\n\nexport type Category = {\n  id?: number;\n  name?: string;\n};\n\nexport type User = {\n  email?: string;\n  firstName?: string;\n  id?: number;\n  lastName?: string;\n  password?: string;\n  phone?: string;\n  /**\n   * User Status\n   */\n  userStatus?: number;\n  username?: string;\n};\n\nexport type Tag = {\n  id?: number;\n  name?: string;\n};\n\nexport type Pet = {\n  category?: Category;\n  id?: number;\n  name: string;\n  photoUrls: Array<string>;\n  /**\n   * pet status in the store\n   */\n  status?: 'available' | 'pending' | 'sold';\n  tags?: Array<Tag>;\n};\n\nexport type ApiResponse = {\n  code?: number;\n  message?: string;\n  type?: string;\n};\n\nexport type Pet2 = Pet;\n\n/**\n * List of user object\n */\nexport type UserArray = Array<User>;\n\nexport type AddPetData = {\n  /**\n   * Create a new pet in the store\n   */\n  body: Pet;\n  path?: never;\n  query?: never;\n  url: '/pet';\n};\n\nexport type AddPetErrors = {\n  /**\n   * Invalid input\n   */\n  400: unknown;\n  /**\n   * Validation exception\n   */\n  422: unknown;\n  /**\n   * Unexpected error\n   */\n  default: unknown;\n};\n\nexport type AddPetResponses = {\n  /**\n   * Successful operation\n   */\n  200: Pet;\n};\n\nexport type AddPetResponse = AddPetResponses[keyof AddPetResponses];\n\nexport type UpdatePetData = {\n  /**\n   * Update an existent pet in the store\n   */\n  body: Pet;\n  path?: never;\n  query?: never;\n  url: '/pet';\n};\n\nexport type UpdatePetErrors = {\n  /**\n   * Invalid ID supplied\n   */\n  400: unknown;\n  /**\n   * Pet not found\n   */\n  404: unknown;\n  /**\n   * Validation exception\n   */\n  422: unknown;\n  /**\n   * Unexpected error\n   */\n  default: unknown;\n};\n\nexport type UpdatePetResponses = {\n  /**\n   * Successful operation\n   */\n  200: Pet;\n};\n\nexport type UpdatePetResponse = UpdatePetResponses[keyof UpdatePetResponses];\n\nexport type FindPetsByStatusData = {\n  body?: never;\n  path?: never;\n  query: {\n    /**\n     * Status values that need to be considered for filter\n     */\n    status: 'available' | 'pending' | 'sold';\n  };\n  url: '/pet/findByStatus';\n};\n\nexport type FindPetsByStatusErrors = {\n  /**\n   * Invalid status value\n   */\n  400: unknown;\n  /**\n   * Unexpected error\n   */\n  default: unknown;\n};\n\nexport type FindPetsByStatusResponses = {\n  /**\n   * successful operation\n   */\n  200: Array<Pet>;\n};\n\nexport type FindPetsByStatusResponse = FindPetsByStatusResponses[keyof FindPetsByStatusResponses];\n\nexport type FindPetsByTagsData = {\n  body?: never;\n  path?: never;\n  query: {\n    /**\n     * Tags to filter by\n     */\n    tags: Array<string>;\n  };\n  url: '/pet/findByTags';\n};\n\nexport type FindPetsByTagsErrors = {\n  /**\n   * Invalid tag value\n   */\n  400: unknown;\n  /**\n   * Unexpected error\n   */\n  default: unknown;\n};\n\nexport type FindPetsByTagsResponses = {\n  /**\n   * successful operation\n   */\n  200: Array<Pet>;\n};\n\nexport type FindPetsByTagsResponse = FindPetsByTagsResponses[keyof FindPetsByTagsResponses];\n\nexport type DeletePetData = {\n  body?: never;\n  headers?: {\n    api_key?: string;\n  };\n  path: {\n    /**\n     * Pet id to delete\n     */\n    petId: number;\n  };\n  query?: never;\n  url: '/pet/{petId}';\n};\n\nexport type DeletePetErrors = {\n  /**\n   * Invalid pet value\n   */\n  400: unknown;\n  /**\n   * Unexpected error\n   */\n  default: unknown;\n};\n\nexport type DeletePetResponses = {\n  /**\n   * Pet deleted\n   */\n  200: unknown;\n};\n\nexport type GetPetByIdData = {\n  body?: never;\n  path: {\n    /**\n     * ID of pet to return\n     */\n    petId: number;\n  };\n  query?: never;\n  url: '/pet/{petId}';\n};\n\nexport type GetPetByIdErrors = {\n  /**\n   * Invalid ID supplied\n   */\n  400: unknown;\n  /**\n   * Pet not found\n   */\n  404: unknown;\n  /**\n   * Unexpected error\n   */\n  default: unknown;\n};\n\nexport type GetPetByIdResponses = {\n  /**\n   * successful operation\n   */\n  200: Pet;\n};\n\nexport type GetPetByIdResponse = GetPetByIdResponses[keyof GetPetByIdResponses];\n\nexport type UpdatePetWithFormData = {\n  body?: never;\n  path: {\n    /**\n     * ID of pet that needs to be updated\n     */\n    petId: number;\n  };\n  query?: {\n    /**\n     * Name of pet that needs to be updated\n     */\n    name?: string;\n    /**\n     * Status of pet that needs to be updated\n     */\n    status?: string;\n  };\n  url: '/pet/{petId}';\n};\n\nexport type UpdatePetWithFormErrors = {\n  /**\n   * Invalid input\n   */\n  400: unknown;\n  /**\n   * Unexpected error\n   */\n  default: unknown;\n};\n\nexport type UpdatePetWithFormResponses = {\n  /**\n   * successful operation\n   */\n  200: Pet;\n};\n\nexport type UpdatePetWithFormResponse =\n  UpdatePetWithFormResponses[keyof UpdatePetWithFormResponses];\n\nexport type UploadFileData = {\n  body?: Blob | File;\n  path: {\n    /**\n     * ID of pet to update\n     */\n    petId: number;\n  };\n  query?: {\n    /**\n     * Additional Metadata\n     */\n    additionalMetadata?: string;\n  };\n  url: '/pet/{petId}/uploadImage';\n};\n\nexport type UploadFileErrors = {\n  /**\n   * No file uploaded\n   */\n  400: unknown;\n  /**\n   * Pet not found\n   */\n  404: unknown;\n  /**\n   * Unexpected error\n   */\n  default: unknown;\n};\n\nexport type UploadFileResponses = {\n  /**\n   * successful operation\n   */\n  200: ApiResponse;\n};\n\nexport type UploadFileResponse = UploadFileResponses[keyof UploadFileResponses];\n\nexport type GetInventoryData = {\n  body?: never;\n  path?: never;\n  query?: never;\n  url: '/store/inventory';\n};\n\nexport type GetInventoryErrors = {\n  /**\n   * Unexpected error\n   */\n  default: unknown;\n};\n\nexport type GetInventoryResponses = {\n  /**\n   * successful operation\n   */\n  200: {\n    [key: string]: number;\n  };\n};\n\nexport type GetInventoryResponse = GetInventoryResponses[keyof GetInventoryResponses];\n\nexport type PlaceOrderData = {\n  body?: Order;\n  path?: never;\n  query?: never;\n  url: '/store/order';\n};\n\nexport type PlaceOrderErrors = {\n  /**\n   * Invalid input\n   */\n  400: unknown;\n  /**\n   * Validation exception\n   */\n  422: unknown;\n  /**\n   * Unexpected error\n   */\n  default: unknown;\n};\n\nexport type PlaceOrderResponses = {\n  /**\n   * successful operation\n   */\n  200: Order;\n};\n\nexport type PlaceOrderResponse = PlaceOrderResponses[keyof PlaceOrderResponses];\n\nexport type DeleteOrderData = {\n  body?: never;\n  path: {\n    /**\n     * ID of the order that needs to be deleted\n     */\n    orderId: number;\n  };\n  query?: never;\n  url: '/store/order/{orderId}';\n};\n\nexport type DeleteOrderErrors = {\n  /**\n   * Invalid ID supplied\n   */\n  400: unknown;\n  /**\n   * Order not found\n   */\n  404: unknown;\n  /**\n   * Unexpected error\n   */\n  default: unknown;\n};\n\nexport type DeleteOrderResponses = {\n  /**\n   * order deleted\n   */\n  200: unknown;\n};\n\nexport type GetOrderByIdData = {\n  body?: never;\n  path: {\n    /**\n     * ID of order that needs to be fetched\n     */\n    orderId: number;\n  };\n  query?: never;\n  url: '/store/order/{orderId}';\n};\n\nexport type GetOrderByIdErrors = {\n  /**\n   * Invalid ID supplied\n   */\n  400: unknown;\n  /**\n   * Order not found\n   */\n  404: unknown;\n  /**\n   * Unexpected error\n   */\n  default: unknown;\n};\n\nexport type GetOrderByIdResponses = {\n  /**\n   * successful operation\n   */\n  200: Order;\n};\n\nexport type GetOrderByIdResponse = GetOrderByIdResponses[keyof GetOrderByIdResponses];\n\nexport type CreateUserData = {\n  /**\n   * Created user object\n   */\n  body?: User;\n  path?: never;\n  query?: never;\n  url: '/user';\n};\n\nexport type CreateUserErrors = {\n  /**\n   * Unexpected error\n   */\n  default: unknown;\n};\n\nexport type CreateUserResponses = {\n  /**\n   * successful operation\n   */\n  200: User;\n};\n\nexport type CreateUserResponse = CreateUserResponses[keyof CreateUserResponses];\n\nexport type CreateUsersWithListInputData = {\n  body?: Array<User>;\n  path?: never;\n  query?: never;\n  url: '/user/createWithList';\n};\n\nexport type CreateUsersWithListInputErrors = {\n  /**\n   * Unexpected error\n   */\n  default: unknown;\n};\n\nexport type CreateUsersWithListInputResponses = {\n  /**\n   * Successful operation\n   */\n  200: User;\n};\n\nexport type CreateUsersWithListInputResponse =\n  CreateUsersWithListInputResponses[keyof CreateUsersWithListInputResponses];\n\nexport type LoginUserData = {\n  body?: never;\n  path?: never;\n  query?: {\n    /**\n     * The password for login in clear text\n     */\n    password?: string;\n    /**\n     * The user name for login\n     */\n    username?: string;\n  };\n  url: '/user/login';\n};\n\nexport type LoginUserErrors = {\n  /**\n   * Invalid username/password supplied\n   */\n  400: unknown;\n  /**\n   * Unexpected error\n   */\n  default: unknown;\n};\n\nexport type LoginUserResponses = {\n  /**\n   * successful operation\n   */\n  200: string;\n};\n\nexport type LoginUserResponse = LoginUserResponses[keyof LoginUserResponses];\n\nexport type LogoutUserData = {\n  body?: never;\n  path?: never;\n  query?: never;\n  url: '/user/logout';\n};\n\nexport type LogoutUserErrors = {\n  /**\n   * Unexpected error\n   */\n  default: unknown;\n};\n\nexport type LogoutUserResponses = {\n  /**\n   * successful operation\n   */\n  200: unknown;\n};\n\nexport type DeleteUserData = {\n  body?: never;\n  path: {\n    /**\n     * The name that needs to be deleted\n     */\n    username: string;\n  };\n  query?: never;\n  url: '/user/{username}';\n};\n\nexport type DeleteUserErrors = {\n  /**\n   * Invalid username supplied\n   */\n  400: unknown;\n  /**\n   * User not found\n   */\n  404: unknown;\n  /**\n   * Unexpected error\n   */\n  default: unknown;\n};\n\nexport type DeleteUserResponses = {\n  /**\n   * User deleted\n   */\n  200: unknown;\n};\n\nexport type GetUserByNameData = {\n  body?: never;\n  path: {\n    /**\n     * The name that needs to be fetched. Use user1 for testing\n     */\n    username: string;\n  };\n  query?: never;\n  url: '/user/{username}';\n};\n\nexport type GetUserByNameErrors = {\n  /**\n   * Invalid username supplied\n   */\n  400: unknown;\n  /**\n   * User not found\n   */\n  404: unknown;\n  /**\n   * Unexpected error\n   */\n  default: unknown;\n};\n\nexport type GetUserByNameResponses = {\n  /**\n   * successful operation\n   */\n  200: User;\n};\n\nexport type GetUserByNameResponse = GetUserByNameResponses[keyof GetUserByNameResponses];\n\nexport type UpdateUserData = {\n  /**\n   * Update an existent user in the store\n   */\n  body?: User;\n  path: {\n    /**\n     * name that need to be deleted\n     */\n    username: string;\n  };\n  query?: never;\n  url: '/user/{username}';\n};\n\nexport type UpdateUserErrors = {\n  /**\n   * bad request\n   */\n  400: unknown;\n  /**\n   * user not found\n   */\n  404: unknown;\n  /**\n   * Unexpected error\n   */\n  default: unknown;\n};\n\nexport type UpdateUserResponses = {\n  /**\n   * successful operation\n   */\n  200: unknown;\n};\n"
  },
  {
    "path": "examples/openapi-ts-angular/src/index.html",
    "content": "<!doctype html>\n<html lang=\"en\">\n  <head>\n    <meta charset=\"utf-8\" />\n    <title>Hey API + Angular Demo</title>\n    <base href=\"/\" />\n    <meta name=\"viewport\" content=\"width=device-width, initial-scale=1\" />\n    <link rel=\"icon\" type=\"image/x-icon\" href=\"favicon.ico\" />\n  </head>\n  <body>\n    <app-root></app-root>\n  </body>\n</html>\n"
  },
  {
    "path": "examples/openapi-ts-angular/src/main.server.ts",
    "content": "import { bootstrapApplication } from '@angular/platform-browser';\n\nimport { AppComponent } from './app/app.component';\nimport { config } from './app/app.config.server';\n\nconst bootstrap = () => bootstrapApplication(AppComponent, config);\n\nexport default bootstrap;\n"
  },
  {
    "path": "examples/openapi-ts-angular/src/main.ts",
    "content": "import { bootstrapApplication } from '@angular/platform-browser';\n\nimport { AppComponent } from './app/app.component';\nimport { appConfig } from './app/app.config';\n\nbootstrapApplication(AppComponent, appConfig).catch((err) => console.error(err));\n"
  },
  {
    "path": "examples/openapi-ts-angular/src/server.ts",
    "content": "import { dirname, resolve } from 'node:path';\nimport { fileURLToPath } from 'node:url';\n\nimport {\n  AngularNodeAppEngine,\n  createNodeRequestHandler,\n  isMainModule,\n  writeResponseToNodeResponse,\n} from '@angular/ssr/node';\nimport express from 'express';\n\nconst serverDistFolder = dirname(fileURLToPath(import.meta.url));\nconst browserDistFolder = resolve(serverDistFolder, '../browser');\n\nconst app = express();\nconst angularApp = new AngularNodeAppEngine();\n\n/**\n * Example Express Rest API endpoints can be defined here.\n * Uncomment and define endpoints as necessary.\n *\n * Example:\n * ```ts\n * app.get('/api/**', (req, res) => {\n *   // Handle API request\n * });\n * ```\n */\n\n/**\n * Serve static files from /browser\n */\napp.use(\n  express.static(browserDistFolder, {\n    index: false,\n    maxAge: '1y',\n    redirect: false,\n  }),\n);\n\n/**\n * Handle all other requests by rendering the Angular application.\n */\napp.use('/**', (req, res, next) => {\n  angularApp\n    .handle(req)\n    .then((response) => (response ? writeResponseToNodeResponse(response, res) : next()))\n    .catch(next);\n});\n\n/**\n * Start the server if this module is the main entry point.\n * The server listens on the port defined by the `PORT` environment variable, or defaults to 4000.\n */\nif (isMainModule(import.meta.url)) {\n  const port = process.env['PORT'] || 4000;\n  app.listen(port, () => {\n    console.log(`Node Express server listening on http://localhost:${port}`);\n  });\n}\n\n/**\n * Request handler used by the Angular CLI (for dev-server and during build) or Firebase Cloud Functions.\n */\nexport const reqHandler = createNodeRequestHandler(app);\n"
  },
  {
    "path": "examples/openapi-ts-angular/src/styles.css",
    "content": "/* You can add global styles to this file, and also import other style files */\n"
  },
  {
    "path": "examples/openapi-ts-angular/tsconfig.app.json",
    "content": "/* To learn more about Typescript configuration file: https://www.typescriptlang.org/docs/handbook/tsconfig-json.html. */\n/* To learn more about Angular compiler options: https://angular.dev/reference/configs/angular-compiler-options. */\n{\n  \"extends\": \"./tsconfig.json\",\n  \"compilerOptions\": {\n    \"outDir\": \"./out-tsc/app\",\n    \"types\": [\"node\"]\n  },\n  \"files\": [\"src/main.ts\", \"src/main.server.ts\", \"src/server.ts\"],\n  \"include\": [\"src/**/*.d.ts\"]\n}\n"
  },
  {
    "path": "examples/openapi-ts-angular/tsconfig.json",
    "content": "/* To learn more about Typescript configuration file: https://www.typescriptlang.org/docs/handbook/tsconfig-json.html. */\n/* To learn more about Angular compiler options: https://angular.dev/reference/configs/angular-compiler-options. */\n{\n  \"compileOnSave\": false,\n  \"compilerOptions\": {\n    \"outDir\": \"./dist/out-tsc\",\n    \"strict\": true,\n    \"noImplicitOverride\": true,\n    \"noPropertyAccessFromIndexSignature\": true,\n    \"noImplicitReturns\": true,\n    \"noFallthroughCasesInSwitch\": true,\n    \"skipLibCheck\": true,\n    \"isolatedModules\": true,\n    \"esModuleInterop\": true,\n    \"experimentalDecorators\": true,\n    \"moduleResolution\": \"bundler\",\n    \"importHelpers\": true,\n    \"target\": \"ES2022\",\n    \"module\": \"ES2022\"\n  },\n  \"angularCompilerOptions\": {\n    \"enableI18nLegacyMessageIdFormat\": false,\n    \"strictInjectionParameters\": true,\n    \"strictInputAccessModifiers\": true,\n    \"strictTemplates\": true\n  }\n}\n"
  },
  {
    "path": "examples/openapi-ts-angular/tsconfig.spec.json",
    "content": "/* To learn more about Typescript configuration file: https://www.typescriptlang.org/docs/handbook/tsconfig-json.html. */\n/* To learn more about Angular compiler options: https://angular.dev/reference/configs/angular-compiler-options. */\n{\n  \"extends\": \"./tsconfig.json\",\n  \"compilerOptions\": {\n    \"outDir\": \"./out-tsc/spec\",\n    \"types\": [\"jasmine\"]\n  },\n  \"include\": [\"src/**/*.spec.ts\", \"src/**/*.d.ts\"]\n}\n"
  },
  {
    "path": "examples/openapi-ts-angular-common/.editorconfig",
    "content": "# Editor configuration, see https://editorconfig.org\nroot = true\n\n[*]\ncharset = utf-8\nindent_style = space\nindent_size = 2\ninsert_final_newline = true\ntrim_trailing_whitespace = true\n\n[*.ts]\nquote_type = single\nij_typescript_use_double_quotes = false\n\n[*.md]\nmax_line_length = off\ntrim_trailing_whitespace = false\n"
  },
  {
    "path": "examples/openapi-ts-angular-common/.gitignore",
    "content": "# See https://docs.github.com/get-started/getting-started-with-git/ignoring-files for more about ignoring files.\n\n# Compiled output\n/dist\n/tmp\n/out-tsc\n/bazel-out\n\n# Node\n/node_modules\nnpm-debug.log\nyarn-error.log\n\n# IDEs and editors\n.idea/\n.project\n.classpath\n.c9/\n*.launch\n.settings/\n*.sublime-workspace\n\n# Visual Studio Code\n.vscode/*\n!.vscode/settings.json\n!.vscode/tasks.json\n!.vscode/launch.json\n!.vscode/extensions.json\n.history/*\n\n# Miscellaneous\n/.angular/cache\n.sass-cache/\n/connect.lock\n/coverage\n/libpeerconnection.log\ntestem.log\n/typings\n\n# System files\n.DS_Store\nThumbs.db\n"
  },
  {
    "path": "examples/openapi-ts-angular-common/.vscode/extensions.json",
    "content": "{\n  // For more information, visit: https://go.microsoft.com/fwlink/?linkid=827846\n  \"recommendations\": [\"angular.ng-template\"]\n}\n"
  },
  {
    "path": "examples/openapi-ts-angular-common/.vscode/launch.json",
    "content": "{\n  // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387\n  \"version\": \"0.2.0\",\n  \"configurations\": [\n    {\n      \"name\": \"ng serve\",\n      \"type\": \"chrome\",\n      \"request\": \"launch\",\n      \"preLaunchTask\": \"npm: start\",\n      \"url\": \"http://localhost:4200/\"\n    },\n    {\n      \"name\": \"ng test\",\n      \"type\": \"chrome\",\n      \"request\": \"launch\",\n      \"preLaunchTask\": \"npm: test\",\n      \"url\": \"http://localhost:9876/debug.html\"\n    }\n  ]\n}\n"
  },
  {
    "path": "examples/openapi-ts-angular-common/.vscode/tasks.json",
    "content": "{\n  // For more information, visit: https://go.microsoft.com/fwlink/?LinkId=733558\n  \"version\": \"2.0.0\",\n  \"tasks\": [\n    {\n      \"type\": \"npm\",\n      \"script\": \"start\",\n      \"isBackground\": true,\n      \"problemMatcher\": {\n        \"owner\": \"typescript\",\n        \"pattern\": \"$tsc\",\n        \"background\": {\n          \"activeOnStart\": true,\n          \"beginsPattern\": {\n            \"regexp\": \"(.*?)\"\n          },\n          \"endsPattern\": {\n            \"regexp\": \"bundle generation complete\"\n          }\n        }\n      }\n    },\n    {\n      \"type\": \"npm\",\n      \"script\": \"test\",\n      \"isBackground\": true,\n      \"problemMatcher\": {\n        \"owner\": \"typescript\",\n        \"pattern\": \"$tsc\",\n        \"background\": {\n          \"activeOnStart\": true,\n          \"beginsPattern\": {\n            \"regexp\": \"(.*?)\"\n          },\n          \"endsPattern\": {\n            \"regexp\": \"bundle generation complete\"\n          }\n        }\n      }\n    }\n  ]\n}\n"
  },
  {
    "path": "examples/openapi-ts-angular-common/README.md",
    "content": "# Angular\n\nThis project was generated using [Angular CLI](https://github.com/angular/angular-cli) version 19.2.15.\n\n## Development server\n\nTo start a local development server, run:\n\n```bash\nng serve\n```\n\nOnce the server is running, open your browser and navigate to `http://localhost:4200/`. The application will automatically reload whenever you modify any of the source files.\n\n## Code scaffolding\n\nAngular CLI includes powerful code scaffolding tools. To generate a new component, run:\n\n```bash\nng generate component component-name\n```\n\nFor a complete list of available schematics (such as `components`, `directives`, or `pipes`), run:\n\n```bash\nng generate --help\n```\n\n## Building\n\nTo build the project run:\n\n```bash\nng build\n```\n\nThis will compile your project and store the build artifacts in the `dist/` directory. By default, the production build optimizes your application for performance and speed.\n\n## Running unit tests\n\nTo execute unit tests with the [Karma](https://karma-runner.github.io) test runner, use the following command:\n\n```bash\nng test\n```\n\n## Running end-to-end tests\n\nFor end-to-end (e2e) testing, run:\n\n```bash\nng e2e\n```\n\nAngular CLI does not come with an end-to-end testing framework by default. You can choose one that suits your needs.\n\n## Additional Resources\n\nFor more information on using the Angular CLI, including detailed command references, visit the [Angular CLI Overview and Command Reference](https://angular.dev/tools/cli) page.\n"
  },
  {
    "path": "examples/openapi-ts-angular-common/angular.json",
    "content": "{\n  \"$schema\": \"./node_modules/@angular/cli/lib/config/schema.json\",\n  \"version\": 1,\n  \"newProjectRoot\": \"projects\",\n  \"projects\": {\n    \"angular\": {\n      \"projectType\": \"application\",\n      \"schematics\": {},\n      \"root\": \"\",\n      \"sourceRoot\": \"src\",\n      \"prefix\": \"app\",\n      \"architect\": {\n        \"build\": {\n          \"builder\": \"@angular-devkit/build-angular:application\",\n          \"options\": {\n            \"outputPath\": \"dist/angular\",\n            \"index\": \"src/index.html\",\n            \"browser\": \"src/main.ts\",\n            \"polyfills\": [\"zone.js\"],\n            \"tsConfig\": \"tsconfig.app.json\",\n            \"assets\": [\n              {\n                \"glob\": \"**/*\",\n                \"input\": \"public\"\n              }\n            ],\n            \"styles\": [\"src/styles.css\"],\n            \"scripts\": []\n          },\n          \"configurations\": {\n            \"production\": {\n              \"budgets\": [\n                {\n                  \"type\": \"initial\",\n                  \"maximumWarning\": \"500kB\",\n                  \"maximumError\": \"1MB\"\n                },\n                {\n                  \"type\": \"anyComponentStyle\",\n                  \"maximumWarning\": \"4kB\",\n                  \"maximumError\": \"8kB\"\n                }\n              ],\n              \"outputHashing\": \"all\"\n            },\n            \"development\": {\n              \"optimization\": false,\n              \"extractLicenses\": false,\n              \"sourceMap\": true\n            }\n          },\n          \"defaultConfiguration\": \"production\"\n        },\n        \"serve\": {\n          \"builder\": \"@angular-devkit/build-angular:dev-server\",\n          \"configurations\": {\n            \"production\": {\n              \"buildTarget\": \"angular:build:production\"\n            },\n            \"development\": {\n              \"buildTarget\": \"angular:build:development\"\n            }\n          },\n          \"defaultConfiguration\": \"development\"\n        },\n        \"extract-i18n\": {\n          \"builder\": \"@angular-devkit/build-angular:extract-i18n\"\n        },\n        \"test\": {\n          \"builder\": \"@angular-devkit/build-angular:karma\",\n          \"options\": {\n            \"polyfills\": [\"zone.js\", \"zone.js/testing\"],\n            \"tsConfig\": \"tsconfig.spec.json\",\n            \"assets\": [\n              {\n                \"glob\": \"**/*\",\n                \"input\": \"public\"\n              }\n            ],\n            \"styles\": [\"src/styles.css\"],\n            \"scripts\": []\n          }\n        }\n      }\n    }\n  },\n  \"cli\": {\n    \"analytics\": false\n  }\n}\n"
  },
  {
    "path": "examples/openapi-ts-angular-common/openapi-ts.config.ts",
    "content": "import { defineConfig } from '@hey-api/openapi-ts';\n\nexport default defineConfig({\n  input:\n    'https://raw.githubusercontent.com/swagger-api/swagger-petstore/master/src/main/resources/openapi.yaml',\n  logs: {\n    path: './logs',\n  },\n  output: {\n    path: './src/client',\n    postProcess: ['oxfmt', 'eslint'],\n  },\n  plugins: [\n    {\n      name: '@hey-api/client-angular',\n      throwOnError: true,\n    },\n    {\n      httpRequests: true,\n      httpResources: {\n        containerName: '{{name}}ServiceResources',\n        strategy: 'byTags',\n      },\n      includeInEntry: true,\n      name: '@angular/common',\n    },\n    '@hey-api/schemas',\n    {\n      name: '@hey-api/sdk',\n      responseStyle: 'data',\n    },\n    {\n      enums: 'javascript',\n      name: '@hey-api/typescript',\n    },\n  ],\n});\n"
  },
  {
    "path": "examples/openapi-ts-angular-common/package.json",
    "content": "{\n  \"name\": \"@example/openapi-ts-angular-common\",\n  \"version\": \"0.0.0\",\n  \"private\": true,\n  \"scripts\": {\n    \"build\": \"ng build\",\n    \"dev\": \"ng serve\",\n    \"lint\": \"eslint . --report-unused-disable-directives --max-warnings 0\",\n    \"ng\": \"ng\",\n    \"openapi-ts\": \"openapi-ts\",\n    \"serve:ssr:angular\": \"node dist/angular/server/server.mjs\",\n    \"test:disabled\": \"ng test --watch=false --browsers=ChromeHeadless\",\n    \"test\": \"echo \\\"Skipping tests\\\"\",\n    \"watch\": \"ng build --watch --configuration development\"\n  },\n  \"dependencies\": {\n    \"@angular/common\": \"21.1.2\",\n    \"@angular/compiler\": \"21.1.2\",\n    \"@angular/core\": \"21.1.2\",\n    \"@angular/forms\": \"21.1.2\",\n    \"@angular/platform-browser\": \"21.1.2\",\n    \"@angular/platform-browser-dynamic\": \"21.1.2\",\n    \"@angular/platform-server\": \"21.1.2\",\n    \"@angular/router\": \"21.1.2\",\n    \"@angular/ssr\": \"21.1.2\",\n    \"express\": \"4.21.0\",\n    \"rxjs\": \"7.8.2\",\n    \"tslib\": \"2.8.1\",\n    \"zone.js\": \"0.16.0\"\n  },\n  \"devDependencies\": {\n    \"@angular-devkit/build-angular\": \"21.1.2\",\n    \"@angular/cli\": \"21.1.2\",\n    \"@angular/compiler-cli\": \"21.1.2\",\n    \"@hey-api/openapi-ts\": \"workspace:*\",\n    \"@types/express\": \"4.17.21\",\n    \"@types/jasmine\": \"5.1.9\",\n    \"@types/node\": \"24.10.10\",\n    \"@typescript-eslint/eslint-plugin\": \"8.29.1\",\n    \"@typescript-eslint/parser\": \"8.29.1\",\n    \"eslint\": \"9.17.0\",\n    \"jasmine-core\": \"5.6.0\",\n    \"karma\": \"6.4.4\",\n    \"karma-chrome-launcher\": \"3.2.0\",\n    \"karma-coverage\": \"2.2.1\",\n    \"karma-jasmine\": \"5.1.0\",\n    \"karma-jasmine-html-reporter\": \"2.1.0\",\n    \"typescript\": \"5.9.3\"\n  }\n}\n"
  },
  {
    "path": "examples/openapi-ts-angular-common/src/app/app.component.css",
    "content": ""
  },
  {
    "path": "examples/openapi-ts-angular-common/src/app/app.component.html",
    "content": "<!-- * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * -->\n<!-- * * * * * * * * * * * The content below * * * * * * * * * * * -->\n<!-- * * * * * * * * * * is only a placeholder * * * * * * * * * * -->\n<!-- * * * * * * * * * * and can be replaced.  * * * * * * * * * * -->\n<!-- * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * -->\n<!-- * * * * * * * * * Delete the template below * * * * * * * * * -->\n<!-- * * * * * * * to get started with your project! * * * * * * * -->\n<!-- * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * -->\n\n<style>\n  :host {\n    --bright-blue: oklch(51.01% 0.274 263.83);\n    --electric-violet: oklch(53.18% 0.28 296.97);\n    --french-violet: oklch(47.66% 0.246 305.88);\n    --vivid-pink: oklch(69.02% 0.277 332.77);\n    --hot-red: oklch(61.42% 0.238 15.34);\n    --orange-red: oklch(63.32% 0.24 31.68);\n\n    --gray-900: oklch(19.37% 0.006 300.98);\n    --gray-700: oklch(36.98% 0.014 302.71);\n    --gray-400: oklch(70.9% 0.015 304.04);\n\n    --red-to-pink-to-purple-vertical-gradient: linear-gradient(\n      180deg,\n      var(--orange-red) 0%,\n      var(--vivid-pink) 50%,\n      var(--electric-violet) 100%\n    );\n\n    --red-to-pink-to-purple-horizontal-gradient: linear-gradient(\n      90deg,\n      var(--orange-red) 0%,\n      var(--vivid-pink) 50%,\n      var(--electric-violet) 100%\n    );\n\n    --pill-accent: var(--bright-blue);\n\n    font-family:\n      'Inter',\n      -apple-system,\n      BlinkMacSystemFont,\n      'Segoe UI',\n      Roboto,\n      Helvetica,\n      Arial,\n      sans-serif,\n      'Apple Color Emoji',\n      'Segoe UI Emoji',\n      'Segoe UI Symbol';\n    box-sizing: border-box;\n    -webkit-font-smoothing: antialiased;\n    -moz-osx-font-smoothing: grayscale;\n  }\n\n  h1 {\n    font-size: 2.125rem;\n    color: var(--gray-900);\n    font-weight: 500;\n    line-height: 100%;\n    letter-spacing: -0.1rem;\n    margin: 0;\n    font-family:\n      'Inter Tight',\n      -apple-system,\n      BlinkMacSystemFont,\n      'Segoe UI',\n      Roboto,\n      Helvetica,\n      Arial,\n      sans-serif,\n      'Apple Color Emoji',\n      'Segoe UI Emoji',\n      'Segoe UI Symbol';\n  }\n\n  p {\n    margin: 0;\n    color: var(--gray-700);\n  }\n\n  main {\n    width: 100%;\n    min-height: 100%;\n    display: flex;\n    justify-content: center;\n    align-items: center;\n    padding: 1rem;\n    box-sizing: inherit;\n    position: relative;\n  }\n\n  .angular-logo {\n    max-width: 9.2rem;\n  }\n\n  .content {\n    display: flex;\n    justify-content: space-around;\n    width: 100%;\n    max-width: 700px;\n    margin-bottom: 3rem;\n  }\n\n  .content h1 {\n    margin-top: 1.75rem;\n  }\n\n  .content p {\n    margin-top: 1.5rem;\n  }\n\n  .divider {\n    width: 1px;\n    background: var(--red-to-pink-to-purple-vertical-gradient);\n    margin-inline: 0.5rem;\n  }\n\n  .pill-group {\n    display: flex;\n    flex-direction: column;\n    align-items: start;\n    flex-wrap: wrap;\n    gap: 1.25rem;\n  }\n\n  .pill {\n    display: flex;\n    align-items: center;\n    --pill-accent: var(--bright-blue);\n    background: color-mix(in srgb, var(--pill-accent) 5%, transparent);\n    color: var(--pill-accent);\n    padding-inline: 0.75rem;\n    padding-block: 0.375rem;\n    border-radius: 2.75rem;\n    border: 0;\n    transition: background 0.3s ease;\n    font-family: var(--inter-font);\n    font-size: 0.875rem;\n    font-style: normal;\n    font-weight: 500;\n    line-height: 1.4rem;\n    letter-spacing: -0.00875rem;\n    text-decoration: none;\n  }\n\n  .pill:hover {\n    background: color-mix(in srgb, var(--pill-accent) 15%, transparent);\n  }\n\n  .pill-group .pill:nth-child(6n + 1) {\n    --pill-accent: var(--bright-blue);\n  }\n  .pill-group .pill:nth-child(6n + 2) {\n    --pill-accent: var(--french-violet);\n  }\n  .pill-group .pill:nth-child(6n + 3),\n  .pill-group .pill:nth-child(6n + 4),\n  .pill-group .pill:nth-child(6n + 5) {\n    --pill-accent: var(--hot-red);\n  }\n\n  .pill-group svg {\n    margin-inline-start: 0.25rem;\n  }\n\n  .social-links {\n    display: flex;\n    align-items: center;\n    gap: 0.73rem;\n    margin-top: 1.5rem;\n  }\n\n  .social-links path {\n    transition: fill 0.3s ease;\n    fill: var(--gray-400);\n  }\n\n  .social-links a:hover svg path {\n    fill: var(--gray-900);\n  }\n\n  @media screen and (max-width: 650px) {\n    .content {\n      flex-direction: column;\n      width: max-content;\n    }\n\n    .divider {\n      height: 1px;\n      width: 100%;\n      background: var(--red-to-pink-to-purple-horizontal-gradient);\n      margin-block: 1.5rem;\n    }\n  }\n</style>\n\n<main class=\"main\">\n  <div class=\"content\">\n    <div class=\"left-side\">\n      <svg\n        xmlns=\"http://www.w3.org/2000/svg\"\n        viewBox=\"0 0 982 239\"\n        fill=\"none\"\n        class=\"angular-logo\"\n      >\n        <g clip-path=\"url(#a)\">\n          <path\n            fill=\"url(#b)\"\n            d=\"M388.676 191.625h30.849L363.31 31.828h-35.758l-56.215 159.797h30.848l13.174-39.356h60.061l13.256 39.356Zm-65.461-62.675 21.602-64.311h1.227l21.602 64.311h-44.431Zm126.831-7.527v70.202h-28.23V71.839h27.002v20.374h1.392c2.782-6.71 7.2-12.028 13.255-15.956 6.056-3.927 13.584-5.89 22.503-5.89 8.264 0 15.465 1.8 21.684 5.318 6.137 3.518 10.964 8.673 14.319 15.382 3.437 6.71 5.074 14.81 4.992 24.383v76.175h-28.23v-71.92c0-8.019-2.046-14.237-6.219-18.819-4.173-4.5-9.819-6.791-17.102-6.791-4.91 0-9.328 1.063-13.174 3.272-3.846 2.128-6.792 5.237-9.001 9.328-2.046 4.009-3.191 8.918-3.191 14.728ZM589.233 239c-10.147 0-18.82-1.391-26.103-4.091-7.282-2.7-13.092-6.382-17.511-10.964-4.418-4.582-7.528-9.655-9.164-15.219l25.448-6.136c1.145 2.372 2.782 4.663 4.991 6.954 2.209 2.291 5.155 4.255 8.837 5.81 3.683 1.554 8.428 2.291 14.074 2.291 8.019 0 14.647-1.964 19.884-5.81 5.237-3.845 7.856-10.227 7.856-19.064v-22.665h-1.391c-1.473 2.946-3.601 5.892-6.383 9.001-2.782 3.109-6.464 5.645-10.965 7.691-4.582 2.046-10.228 3.109-17.101 3.109-9.165 0-17.511-2.209-25.039-6.545-7.446-4.337-13.42-10.883-17.757-19.474-4.418-8.673-6.628-19.473-6.628-32.565 0-13.091 2.21-24.301 6.628-33.383 4.419-9.082 10.311-15.955 17.839-20.7 7.528-4.746 15.874-7.037 25.039-7.037 7.037 0 12.846 1.145 17.347 3.518 4.582 2.373 8.182 5.236 10.883 8.51 2.7 3.272 4.746 6.382 6.137 9.327h1.554v-19.8h27.821v121.749c0 10.228-2.454 18.737-7.364 25.447-4.91 6.709-11.538 11.7-20.048 15.055-8.509 3.355-18.165 4.991-28.884 4.991Zm.245-71.266c5.974 0 11.047-1.473 15.302-4.337 4.173-2.945 7.446-7.118 9.573-12.519 2.21-5.482 3.274-12.027 3.274-19.637 0-7.609-1.064-14.155-3.274-19.8-2.127-5.646-5.318-10.064-9.491-13.255-4.174-3.11-9.329-4.746-15.384-4.746s-11.537 1.636-15.792 4.91c-4.173 3.272-7.365 7.772-9.492 13.418-2.128 5.727-3.191 12.191-3.191 19.392 0 7.2 1.063 13.745 3.273 19.228 2.127 5.482 5.318 9.736 9.573 12.764 4.174 3.027 9.41 4.582 15.629 4.582Zm141.56-26.51V71.839h28.23v119.786h-27.412v-21.273h-1.227c-2.7 6.709-7.119 12.191-13.338 16.446-6.137 4.255-13.747 6.382-22.748 6.382-7.855 0-14.81-1.718-20.783-5.237-5.974-3.518-10.72-8.591-14.075-15.382-3.355-6.709-5.073-14.891-5.073-24.464V71.839h28.312v71.921c0 7.609 2.046 13.664 6.219 18.083 4.173 4.5 9.655 6.709 16.365 6.709 4.173 0 8.183-.982 12.111-3.028 3.927-2.045 7.118-5.072 9.655-9.082 2.537-4.091 3.764-9.164 3.764-15.218Zm65.707-109.395v159.796h-28.23V31.828h28.23Zm44.841 162.169c-7.61 0-14.402-1.391-20.457-4.091-6.055-2.7-10.883-6.791-14.32-12.109-3.518-5.319-5.237-11.946-5.237-19.801 0-6.791 1.228-12.355 3.765-16.773 2.536-4.419 5.891-7.937 10.228-10.637 4.337-2.618 9.164-4.664 14.647-6.055 5.4-1.391 11.046-2.373 16.856-3.027 7.037-.737 12.683-1.391 17.102-1.964 4.337-.573 7.528-1.555 9.574-2.782 1.963-1.309 3.027-3.273 3.027-5.973v-.491c0-5.891-1.718-10.391-5.237-13.664-3.518-3.191-8.51-4.828-15.056-4.828-6.955 0-12.356 1.473-16.447 4.5-4.009 3.028-6.71 6.546-8.183 10.719l-26.348-3.764c2.046-7.282 5.483-13.336 10.31-18.328 4.746-4.909 10.638-8.59 17.511-11.045 6.955-2.455 14.565-3.682 22.912-3.682 5.809 0 11.537.654 17.265 2.045s10.965 3.6 15.711 6.71c4.746 3.109 8.51 7.282 11.455 12.6 2.864 5.318 4.337 11.946 4.337 19.883v80.184h-27.166v-16.446h-.9c-1.719 3.355-4.092 6.464-7.201 9.328-3.109 2.864-6.955 5.237-11.619 6.955-4.828 1.718-10.229 2.536-16.529 2.536Zm7.364-20.701c5.646 0 10.556-1.145 14.729-3.354 4.173-2.291 7.364-5.237 9.655-9.001 2.292-3.763 3.355-7.854 3.355-12.273v-14.155c-.9.737-2.373 1.391-4.5 2.046-2.128.654-4.419 1.145-7.037 1.636-2.619.491-5.155.9-7.692 1.227-2.537.328-4.746.655-6.628.901-4.173.572-8.019 1.472-11.292 2.781-3.355 1.31-5.973 3.11-7.855 5.401-1.964 2.291-2.864 5.318-2.864 8.918 0 5.237 1.882 9.164 5.728 11.782 3.682 2.782 8.51 4.091 14.401 4.091Zm64.643 18.328V71.839h27.412v19.965h1.227c2.21-6.955 5.974-12.274 11.292-16.038 5.319-3.763 11.456-5.645 18.329-5.645 1.555 0 3.355.082 5.237.163 1.964.164 3.601.328 4.91.573v25.938c-1.227-.41-3.109-.819-5.646-1.146a58.814 58.814 0 0 0-7.446-.49c-5.155 0-9.738 1.145-13.829 3.354-4.091 2.209-7.282 5.236-9.655 9.164-2.373 3.927-3.519 8.427-3.519 13.5v70.448h-28.312ZM222.077 39.192l-8.019 125.923L137.387 0l84.69 39.192Zm-53.105 162.825-57.933 33.056-57.934-33.056 11.783-28.556h92.301l11.783 28.556ZM111.039 62.675l30.357 73.803H80.681l30.358-73.803ZM7.937 165.115 0 39.192 84.69 0 7.937 165.115Z\"\n          />\n          <path\n            fill=\"url(#c)\"\n            d=\"M388.676 191.625h30.849L363.31 31.828h-35.758l-56.215 159.797h30.848l13.174-39.356h60.061l13.256 39.356Zm-65.461-62.675 21.602-64.311h1.227l21.602 64.311h-44.431Zm126.831-7.527v70.202h-28.23V71.839h27.002v20.374h1.392c2.782-6.71 7.2-12.028 13.255-15.956 6.056-3.927 13.584-5.89 22.503-5.89 8.264 0 15.465 1.8 21.684 5.318 6.137 3.518 10.964 8.673 14.319 15.382 3.437 6.71 5.074 14.81 4.992 24.383v76.175h-28.23v-71.92c0-8.019-2.046-14.237-6.219-18.819-4.173-4.5-9.819-6.791-17.102-6.791-4.91 0-9.328 1.063-13.174 3.272-3.846 2.128-6.792 5.237-9.001 9.328-2.046 4.009-3.191 8.918-3.191 14.728ZM589.233 239c-10.147 0-18.82-1.391-26.103-4.091-7.282-2.7-13.092-6.382-17.511-10.964-4.418-4.582-7.528-9.655-9.164-15.219l25.448-6.136c1.145 2.372 2.782 4.663 4.991 6.954 2.209 2.291 5.155 4.255 8.837 5.81 3.683 1.554 8.428 2.291 14.074 2.291 8.019 0 14.647-1.964 19.884-5.81 5.237-3.845 7.856-10.227 7.856-19.064v-22.665h-1.391c-1.473 2.946-3.601 5.892-6.383 9.001-2.782 3.109-6.464 5.645-10.965 7.691-4.582 2.046-10.228 3.109-17.101 3.109-9.165 0-17.511-2.209-25.039-6.545-7.446-4.337-13.42-10.883-17.757-19.474-4.418-8.673-6.628-19.473-6.628-32.565 0-13.091 2.21-24.301 6.628-33.383 4.419-9.082 10.311-15.955 17.839-20.7 7.528-4.746 15.874-7.037 25.039-7.037 7.037 0 12.846 1.145 17.347 3.518 4.582 2.373 8.182 5.236 10.883 8.51 2.7 3.272 4.746 6.382 6.137 9.327h1.554v-19.8h27.821v121.749c0 10.228-2.454 18.737-7.364 25.447-4.91 6.709-11.538 11.7-20.048 15.055-8.509 3.355-18.165 4.991-28.884 4.991Zm.245-71.266c5.974 0 11.047-1.473 15.302-4.337 4.173-2.945 7.446-7.118 9.573-12.519 2.21-5.482 3.274-12.027 3.274-19.637 0-7.609-1.064-14.155-3.274-19.8-2.127-5.646-5.318-10.064-9.491-13.255-4.174-3.11-9.329-4.746-15.384-4.746s-11.537 1.636-15.792 4.91c-4.173 3.272-7.365 7.772-9.492 13.418-2.128 5.727-3.191 12.191-3.191 19.392 0 7.2 1.063 13.745 3.273 19.228 2.127 5.482 5.318 9.736 9.573 12.764 4.174 3.027 9.41 4.582 15.629 4.582Zm141.56-26.51V71.839h28.23v119.786h-27.412v-21.273h-1.227c-2.7 6.709-7.119 12.191-13.338 16.446-6.137 4.255-13.747 6.382-22.748 6.382-7.855 0-14.81-1.718-20.783-5.237-5.974-3.518-10.72-8.591-14.075-15.382-3.355-6.709-5.073-14.891-5.073-24.464V71.839h28.312v71.921c0 7.609 2.046 13.664 6.219 18.083 4.173 4.5 9.655 6.709 16.365 6.709 4.173 0 8.183-.982 12.111-3.028 3.927-2.045 7.118-5.072 9.655-9.082 2.537-4.091 3.764-9.164 3.764-15.218Zm65.707-109.395v159.796h-28.23V31.828h28.23Zm44.841 162.169c-7.61 0-14.402-1.391-20.457-4.091-6.055-2.7-10.883-6.791-14.32-12.109-3.518-5.319-5.237-11.946-5.237-19.801 0-6.791 1.228-12.355 3.765-16.773 2.536-4.419 5.891-7.937 10.228-10.637 4.337-2.618 9.164-4.664 14.647-6.055 5.4-1.391 11.046-2.373 16.856-3.027 7.037-.737 12.683-1.391 17.102-1.964 4.337-.573 7.528-1.555 9.574-2.782 1.963-1.309 3.027-3.273 3.027-5.973v-.491c0-5.891-1.718-10.391-5.237-13.664-3.518-3.191-8.51-4.828-15.056-4.828-6.955 0-12.356 1.473-16.447 4.5-4.009 3.028-6.71 6.546-8.183 10.719l-26.348-3.764c2.046-7.282 5.483-13.336 10.31-18.328 4.746-4.909 10.638-8.59 17.511-11.045 6.955-2.455 14.565-3.682 22.912-3.682 5.809 0 11.537.654 17.265 2.045s10.965 3.6 15.711 6.71c4.746 3.109 8.51 7.282 11.455 12.6 2.864 5.318 4.337 11.946 4.337 19.883v80.184h-27.166v-16.446h-.9c-1.719 3.355-4.092 6.464-7.201 9.328-3.109 2.864-6.955 5.237-11.619 6.955-4.828 1.718-10.229 2.536-16.529 2.536Zm7.364-20.701c5.646 0 10.556-1.145 14.729-3.354 4.173-2.291 7.364-5.237 9.655-9.001 2.292-3.763 3.355-7.854 3.355-12.273v-14.155c-.9.737-2.373 1.391-4.5 2.046-2.128.654-4.419 1.145-7.037 1.636-2.619.491-5.155.9-7.692 1.227-2.537.328-4.746.655-6.628.901-4.173.572-8.019 1.472-11.292 2.781-3.355 1.31-5.973 3.11-7.855 5.401-1.964 2.291-2.864 5.318-2.864 8.918 0 5.237 1.882 9.164 5.728 11.782 3.682 2.782 8.51 4.091 14.401 4.091Zm64.643 18.328V71.839h27.412v19.965h1.227c2.21-6.955 5.974-12.274 11.292-16.038 5.319-3.763 11.456-5.645 18.329-5.645 1.555 0 3.355.082 5.237.163 1.964.164 3.601.328 4.91.573v25.938c-1.227-.41-3.109-.819-5.646-1.146a58.814 58.814 0 0 0-7.446-.49c-5.155 0-9.738 1.145-13.829 3.354-4.091 2.209-7.282 5.236-9.655 9.164-2.373 3.927-3.519 8.427-3.519 13.5v70.448h-28.312ZM222.077 39.192l-8.019 125.923L137.387 0l84.69 39.192Zm-53.105 162.825-57.933 33.056-57.934-33.056 11.783-28.556h92.301l11.783 28.556ZM111.039 62.675l30.357 73.803H80.681l30.358-73.803ZM7.937 165.115 0 39.192 84.69 0 7.937 165.115Z\"\n          />\n        </g>\n        <defs>\n          <radialGradient\n            id=\"c\"\n            cx=\"0\"\n            cy=\"0\"\n            r=\"1\"\n            gradientTransform=\"rotate(118.122 171.182 60.81) scale(205.794)\"\n            gradientUnits=\"userSpaceOnUse\"\n          >\n            <stop stop-color=\"#FF41F8\" />\n            <stop offset=\".707\" stop-color=\"#FF41F8\" stop-opacity=\".5\" />\n            <stop offset=\"1\" stop-color=\"#FF41F8\" stop-opacity=\"0\" />\n          </radialGradient>\n          <linearGradient id=\"b\" x1=\"0\" x2=\"982\" y1=\"192\" y2=\"192\" gradientUnits=\"userSpaceOnUse\">\n            <stop stop-color=\"#F0060B\" />\n            <stop offset=\"0\" stop-color=\"#F0070C\" />\n            <stop offset=\".526\" stop-color=\"#CC26D5\" />\n            <stop offset=\"1\" stop-color=\"#7702FF\" />\n          </linearGradient>\n          <clipPath id=\"a\"><path fill=\"#fff\" d=\"M0 0h982v239H0z\" /></clipPath>\n        </defs>\n      </svg>\n      <h1>{{ title }}</h1>\n\n      <app-demo />\n    </div>\n    <div class=\"divider\" role=\"separator\" aria-label=\"Divider\"></div>\n    <div class=\"right-side\">\n      <div class=\"pill-group\">\n        @for (\n          item of [\n            { title: 'Explore the Docs', link: 'https://angular.dev' },\n            {\n              title: 'Learn with Tutorials',\n              link: 'https://angular.dev/tutorials',\n            },\n            { title: 'CLI Docs', link: 'https://angular.dev/tools/cli' },\n            {\n              title: 'Angular Language Service',\n              link: 'https://angular.dev/tools/language-service',\n            },\n            {\n              title: 'Angular DevTools',\n              link: 'https://angular.dev/tools/devtools',\n            },\n          ];\n          track item.title\n        ) {\n          <a class=\"pill\" [href]=\"item.link\" target=\"_blank\" rel=\"noopener\">\n            <span>{{ item.title }}</span>\n            <svg\n              xmlns=\"http://www.w3.org/2000/svg\"\n              height=\"14\"\n              viewBox=\"0 -960 960 960\"\n              width=\"14\"\n              fill=\"currentColor\"\n            >\n              <path\n                d=\"M200-120q-33 0-56.5-23.5T120-200v-560q0-33 23.5-56.5T200-840h280v80H200v560h560v-280h80v280q0 33-23.5 56.5T760-120H200Zm188-212-56-56 372-372H560v-80h280v280h-80v-144L388-332Z\"\n              />\n            </svg>\n          </a>\n        }\n      </div>\n      <div class=\"social-links\">\n        <a\n          href=\"https://github.com/angular/angular\"\n          aria-label=\"Github\"\n          target=\"_blank\"\n          rel=\"noopener\"\n        >\n          <svg\n            width=\"25\"\n            height=\"24\"\n            viewBox=\"0 0 25 24\"\n            fill=\"none\"\n            xmlns=\"http://www.w3.org/2000/svg\"\n            alt=\"Github\"\n          >\n            <path\n              d=\"M12.3047 0C5.50634 0 0 5.50942 0 12.3047C0 17.7423 3.52529 22.3535 8.41332 23.9787C9.02856 24.0946 9.25414 23.7142 9.25414 23.3871C9.25414 23.0949 9.24389 22.3207 9.23876 21.2953C5.81601 22.0377 5.09414 19.6444 5.09414 19.6444C4.53427 18.2243 3.72524 17.8449 3.72524 17.8449C2.61064 17.082 3.81137 17.0973 3.81137 17.0973C5.04697 17.1835 5.69604 18.3647 5.69604 18.3647C6.79321 20.2463 8.57636 19.7029 9.27978 19.3881C9.39052 18.5924 9.70736 18.0499 10.0591 17.7423C7.32641 17.4347 4.45429 16.3765 4.45429 11.6618C4.45429 10.3185 4.9311 9.22133 5.72065 8.36C5.58222 8.04931 5.16694 6.79833 5.82831 5.10337C5.82831 5.10337 6.85883 4.77319 9.2121 6.36459C10.1965 6.09082 11.2424 5.95546 12.2883 5.94931C13.3342 5.95546 14.3801 6.09082 15.3644 6.36459C17.7023 4.77319 18.7328 5.10337 18.7328 5.10337C19.3942 6.79833 18.9789 8.04931 18.8559 8.36C19.6403 9.22133 20.1171 10.3185 20.1171 11.6618C20.1171 16.3888 17.2409 17.4296 14.5031 17.7321C14.9338 18.1012 15.3337 18.8559 15.3337 20.0084C15.3337 21.6552 15.3183 22.978 15.3183 23.3779C15.3183 23.7009 15.5336 24.0854 16.1642 23.9623C21.0871 22.3484 24.6094 17.7341 24.6094 12.3047C24.6094 5.50942 19.0999 0 12.3047 0Z\"\n            />\n          </svg>\n        </a>\n        <a href=\"https://twitter.com/angular\" aria-label=\"Twitter\" target=\"_blank\" rel=\"noopener\">\n          <svg\n            width=\"24\"\n            height=\"24\"\n            viewBox=\"0 0 24 24\"\n            fill=\"none\"\n            xmlns=\"http://www.w3.org/2000/svg\"\n            alt=\"Twitter\"\n          >\n            <path\n              d=\"M18.244 2.25h3.308l-7.227 8.26 8.502 11.24H16.17l-5.214-6.817L4.99 21.75H1.68l7.73-8.835L1.254 2.25H8.08l4.713 6.231zm-1.161 17.52h1.833L7.084 4.126H5.117z\"\n            />\n          </svg>\n        </a>\n        <a\n          href=\"https://www.youtube.com/channel/UCbn1OgGei-DV7aSRo_HaAiw\"\n          aria-label=\"Youtube\"\n          target=\"_blank\"\n          rel=\"noopener\"\n        >\n          <svg\n            width=\"29\"\n            height=\"20\"\n            viewBox=\"0 0 29 20\"\n            fill=\"none\"\n            xmlns=\"http://www.w3.org/2000/svg\"\n            alt=\"Youtube\"\n          >\n            <path\n              fill-rule=\"evenodd\"\n              clip-rule=\"evenodd\"\n              d=\"M27.4896 1.52422C27.9301 1.96749 28.2463 2.51866 28.4068 3.12258C29.0004 5.35161 29.0004 10 29.0004 10C29.0004 10 29.0004 14.6484 28.4068 16.8774C28.2463 17.4813 27.9301 18.0325 27.4896 18.4758C27.0492 18.9191 26.5 19.2389 25.8972 19.4032C23.6778 20 14.8068 20 14.8068 20C14.8068 20 5.93586 20 3.71651 19.4032C3.11363 19.2389 2.56449 18.9191 2.12405 18.4758C1.68361 18.0325 1.36732 17.4813 1.20683 16.8774C0.613281 14.6484 0.613281 10 0.613281 10C0.613281 10 0.613281 5.35161 1.20683 3.12258C1.36732 2.51866 1.68361 1.96749 2.12405 1.52422C2.56449 1.08095 3.11363 0.76113 3.71651 0.596774C5.93586 0 14.8068 0 14.8068 0C14.8068 0 23.6778 0 25.8972 0.596774C26.5 0.76113 27.0492 1.08095 27.4896 1.52422ZM19.3229 10L11.9036 5.77905V14.221L19.3229 10Z\"\n            />\n          </svg>\n        </a>\n      </div>\n    </div>\n  </div>\n</main>\n\n<!-- * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * -->\n<!-- * * * * * * * * * * * The content above * * * * * * * * * * * * -->\n<!-- * * * * * * * * * * is only a placeholder * * * * * * * * * * * -->\n<!-- * * * * * * * * * * and can be replaced.  * * * * * * * * * * * -->\n<!-- * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * -->\n<!-- * * * * * * * * * * End of Placeholder  * * * * * * * * * * * * -->\n<!-- * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * -->\n\n<router-outlet />\n"
  },
  {
    "path": "examples/openapi-ts-angular-common/src/app/app.component.spec.ts",
    "content": "import { provideHttpClient } from '@angular/common/http';\nimport { TestBed } from '@angular/core/testing';\n\nimport { AppComponent } from './app.component';\n\ndescribe('AppComponent', () => {\n  beforeEach(async () => {\n    await TestBed.configureTestingModule({\n      imports: [AppComponent],\n      providers: [provideHttpClient()],\n    }).compileComponents();\n  });\n\n  it('should create the app', () => {\n    const fixture = TestBed.createComponent(AppComponent);\n    const app = fixture.componentInstance;\n    expect(app).toBeTruthy();\n  });\n\n  it(`should have the 'angular' title`, () => {\n    const fixture = TestBed.createComponent(AppComponent);\n    const app = fixture.componentInstance;\n    expect(app.title).toEqual('angular');\n  });\n\n  it('should render title', () => {\n    const fixture = TestBed.createComponent(AppComponent);\n    fixture.detectChanges();\n    const compiled = fixture.nativeElement as HTMLElement;\n    expect(compiled.querySelector('h1')?.textContent).toContain('@hey-api/openapi-ts 🤝 Angular');\n  });\n});\n"
  },
  {
    "path": "examples/openapi-ts-angular-common/src/app/app.component.ts",
    "content": "import { Component } from '@angular/core';\nimport { RouterOutlet } from '@angular/router';\n\nimport { Demo } from './demo/demo';\n\n@Component({\n  host: { ngSkipHydration: 'true' },\n  imports: [RouterOutlet, Demo],\n  selector: 'app-root',\n  styleUrl: './app.component.css',\n  templateUrl: './app.component.html',\n})\nexport class AppComponent {\n  title = '@hey-api/openapi-ts 🤝 Angular Resource API';\n}\n"
  },
  {
    "path": "examples/openapi-ts-angular-common/src/app/app.config.server.ts",
    "content": "import type { ApplicationConfig } from '@angular/core';\nimport { mergeApplicationConfig } from '@angular/core';\nimport { provideServerRendering, withRoutes } from '@angular/ssr';\n\nimport { appConfig } from './app.config';\nimport { serverRoutes } from './app.routes.server';\n\nconst serverConfig: ApplicationConfig = {\n  providers: [provideServerRendering(withRoutes(serverRoutes))],\n};\n\nexport const config = mergeApplicationConfig(appConfig, serverConfig);\n"
  },
  {
    "path": "examples/openapi-ts-angular-common/src/app/app.config.ts",
    "content": "import { provideHttpClient, withFetch } from '@angular/common/http';\nimport type { ApplicationConfig } from '@angular/core';\nimport { provideZoneChangeDetection } from '@angular/core';\nimport { provideClientHydration, withEventReplay } from '@angular/platform-browser';\nimport { provideRouter } from '@angular/router';\n\nimport { client } from '../client/client.gen';\nimport { provideHeyApiClient } from '../client/client/client.gen';\nimport { routes } from './app.routes';\n\nexport const appConfig: ApplicationConfig = {\n  providers: [\n    provideZoneChangeDetection({ eventCoalescing: true }),\n    provideRouter(routes),\n    provideClientHydration(withEventReplay()),\n    provideHttpClient(withFetch()),\n    provideHeyApiClient(client),\n  ],\n};\n"
  },
  {
    "path": "examples/openapi-ts-angular-common/src/app/app.routes.server.ts",
    "content": "import type { ServerRoute } from '@angular/ssr';\nimport { RenderMode } from '@angular/ssr';\n\nexport const serverRoutes: ServerRoute[] = [\n  {\n    path: '**',\n    renderMode: RenderMode.Server,\n  },\n];\n"
  },
  {
    "path": "examples/openapi-ts-angular-common/src/app/app.routes.ts",
    "content": "import type { Routes } from '@angular/router';\n\nimport { Demo } from './demo/demo';\n\nexport const routes: Routes = [\n  {\n    component: Demo,\n    path: '',\n    pathMatch: 'full',\n  },\n];\n"
  },
  {
    "path": "examples/openapi-ts-angular-common/src/app/demo/demo.css",
    "content": "/* Pet Card Styles */\n.pet-card {\n  background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);\n  border-radius: 16px;\n  padding: 1.5rem;\n  margin-top: 1.5rem;\n  box-shadow:\n    0 4px 6px -1px rgba(0, 0, 0, 0.1),\n    0 2px 4px -1px rgba(0, 0, 0, 0.06);\n  border: 1px solid rgba(0, 0, 0, 0.05);\n  transition:\n    transform 120ms ease,\n    box-shadow 120ms ease;\n}\n\n.pet-info {\n  display: flex;\n  align-items: center;\n  gap: 1rem;\n}\n\n.pet-avatar {\n  width: 64px;\n  height: 64px;\n  border-radius: 12px;\n  overflow: hidden;\n  flex-shrink: 0;\n  background: var(--red-to-pink-to-purple-horizontal-gradient);\n  display: flex;\n  align-items: center;\n  justify-content: center;\n}\n\n.pet-image {\n  width: 100%;\n  height: 100%;\n  object-fit: cover;\n}\n\n.pet-placeholder {\n  color: white;\n  font-size: 1.5rem;\n  font-weight: 600;\n  text-transform: uppercase;\n}\n\n.pet-details {\n  flex: 1;\n  display: flex;\n  flex-direction: column;\n  gap: 0.5rem;\n}\n\n.pet-name {\n  font-size: 1.125rem;\n  font-weight: 600;\n  color: var(--gray-900);\n  margin: 0;\n}\n\n.pet-category {\n  font-size: 0.875rem;\n  color: var(--gray-700);\n  background: rgba(255, 65, 248, 0.1);\n  padding: 0.25rem 0.75rem;\n  border-radius: 20px;\n  display: inline-block;\n  width: fit-content;\n}\n\n/* Error Message Styles */\n.error-message {\n  background: linear-gradient(135deg, #fef2f2 0%, #fee2e2 100%);\n  border: 1px solid #fecaca;\n  border-radius: 12px;\n  padding: 1rem;\n  margin-top: 1.5rem;\n  box-shadow: 0 2px 4px rgba(239, 68, 68, 0.1);\n}\n\n.error-title {\n  font-size: 1rem;\n  font-weight: 600;\n  color: #dc2626;\n  margin-bottom: 0.5rem;\n  display: flex;\n  align-items: center;\n  gap: 0.5rem;\n}\n\n.error-title::before {\n  content: '⚠️';\n  font-size: 1.125rem;\n}\n\n.error-details {\n  font-size: 0.875rem;\n  color: #991b1b;\n  background: rgba(239, 68, 68, 0.05);\n  padding: 0.75rem;\n  border-radius: 8px;\n  font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;\n  white-space: pre-wrap;\n  word-break: break-word;\n  border-left: 3px solid #ef4444;\n}\n\n/* Button Styles Enhancement */\nbutton {\n  background: var(--red-to-pink-to-purple-horizontal-gradient);\n  color: white;\n  border: none;\n  padding: 0.75rem 1.5rem;\n  border-radius: 8px;\n  font-size: 0.875rem;\n  font-weight: 500;\n  cursor: pointer;\n  transition: all 120ms ease;\n  margin-top: 1rem;\n  margin-right: 0.5rem;\n  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);\n}\n\nbutton:hover {\n  transform: translateY(-1px);\n  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);\n}\n\nbutton:active {\n  transform: translateY(0);\n}\n\n/* Responsive adjustments */\n@media screen and (max-width: 650px) {\n  .pet-card {\n    padding: 1rem;\n    margin-top: 1rem;\n  }\n\n  .pet-info {\n    flex-direction: column;\n    text-align: center;\n    gap: 1rem;\n  }\n\n  .pet-avatar {\n    width: 80px;\n    height: 80px;\n    align-self: center;\n  }\n\n  .error-message {\n    padding: 0.75rem;\n    margin-top: 1rem;\n  }\n}\n"
  },
  {
    "path": "examples/openapi-ts-angular-common/src/app/demo/demo.html",
    "content": "<button (click)=\"onGetPetById()\" type=\"button\">Get Random Pet</button>\n\n<!-- Error Display -->\n@if (pet.error()) {\n<div class=\"error-message\">\n  <div class=\"error-title\">Error occurred:</div>\n  <div class=\"error-details\">{{ pet.error()|json }}</div>\n</div>\n}\n\n<!-- Pet Display Card -->\n@if (pet.value()) {\n<div class=\"pet-card\">\n  <div class=\"pet-info\">\n    <div class=\"pet-avatar\">\n      @if (pet.value()?.photoUrls?.[0]) {\n      <img\n        [src]=\"pet.value()?.photoUrls?.[0]\"\n        [alt]=\"pet.value()?.name || 'Pet'\"\n        class=\"pet-image\"\n      />\n      } @else {\n      <div class=\"pet-placeholder\">{{ pet.value()?.name?.slice(0, 1) || 'N' }}</div>\n      }\n    </div>\n    <div class=\"pet-details\">\n      <div class=\"pet-name\">Name: {{ pet.value()?.name || 'N/A' }}</div>\n      <div class=\"pet-category\">Category: {{ pet.value()?.category?.name || 'N/A' }}</div>\n    </div>\n  </div>\n</div>\n}\n"
  },
  {
    "path": "examples/openapi-ts-angular-common/src/app/demo/demo.ts",
    "content": "import { JsonPipe } from '@angular/common';\nimport { Component, inject, signal } from '@angular/core';\n\nimport { PetServiceResources } from '../../client';\n\n@Component({\n  host: { ngSkipHydration: 'true' },\n  imports: [JsonPipe],\n  selector: 'app-demo',\n  styleUrl: './demo.css',\n  templateUrl: './demo.html',\n})\nexport class Demo {\n  #petResources = inject(PetServiceResources);\n\n  petId = signal(0);\n\n  // if you don't use `asClass`, you can simply remove the inject and use `getPetByIdResource(...)` here\n  pet = this.#petResources.getPetById(() => ({\n    path: {\n      petId: this.petId(),\n    },\n  }));\n\n  onGetPetById = async () => {\n    this.petId.set(Math.floor(Math.random() * (10 - 1 + 1) + 1));\n  };\n}\n"
  },
  {
    "path": "examples/openapi-ts-angular-common/src/client/@angular/common.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport { type HttpRequest, httpResource } from '@angular/common/http';\nimport { Injectable } from '@angular/core';\n\nimport { client } from '../client.gen';\nimport type { Options } from '../sdk.gen';\nimport type {\n  AddPetData,\n  AddPetResponse,\n  CreateUserData,\n  CreateUserResponse,\n  CreateUsersWithListInputData,\n  CreateUsersWithListInputResponse,\n  DeleteOrderData,\n  DeletePetData,\n  DeleteUserData,\n  FindPetsByStatusData,\n  FindPetsByStatusResponse,\n  FindPetsByTagsData,\n  FindPetsByTagsResponse,\n  GetInventoryData,\n  GetInventoryResponse,\n  GetOrderByIdData,\n  GetOrderByIdResponse,\n  GetPetByIdData,\n  GetPetByIdResponse,\n  GetUserByNameData,\n  GetUserByNameResponse,\n  LoginUserData,\n  LoginUserResponse,\n  LogoutUserData,\n  PlaceOrderData,\n  PlaceOrderResponse,\n  UpdatePetData,\n  UpdatePetResponse,\n  UpdatePetWithFormData,\n  UpdatePetWithFormResponse,\n  UpdateUserData,\n  UploadFileData,\n  UploadFileResponse,\n} from '../types.gen';\n\n/**\n * Add a new pet to the store.\n *\n * Add a new pet to the store.\n */\nexport const addPetRequest = <ThrowOnError extends boolean = false>(\n  options: Options<AddPetData, ThrowOnError>,\n): HttpRequest<AddPetResponse> =>\n  (options?.client ?? client).requestOptions<AddPetResponse, ThrowOnError>({\n    method: 'POST',\n    responseStyle: 'data',\n    url: '/pet',\n    ...options,\n  });\n\n/**\n * Update an existing pet.\n *\n * Update an existing pet by Id.\n */\nexport const updatePetRequest = <ThrowOnError extends boolean = false>(\n  options: Options<UpdatePetData, ThrowOnError>,\n): HttpRequest<UpdatePetResponse> =>\n  (options?.client ?? client).requestOptions<UpdatePetResponse, ThrowOnError>({\n    method: 'PUT',\n    responseStyle: 'data',\n    url: '/pet',\n    ...options,\n  });\n\n/**\n * Finds Pets by status.\n *\n * Multiple status values can be provided with comma separated strings.\n */\nexport const findPetsByStatusRequest = <ThrowOnError extends boolean = false>(\n  options: Options<FindPetsByStatusData, ThrowOnError>,\n): HttpRequest<FindPetsByStatusResponse> =>\n  (options?.client ?? client).requestOptions<FindPetsByStatusResponse, ThrowOnError>({\n    method: 'GET',\n    responseStyle: 'data',\n    url: '/pet/findByStatus',\n    ...options,\n  });\n\n/**\n * Finds Pets by tags.\n *\n * Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.\n */\nexport const findPetsByTagsRequest = <ThrowOnError extends boolean = false>(\n  options: Options<FindPetsByTagsData, ThrowOnError>,\n): HttpRequest<FindPetsByTagsResponse> =>\n  (options?.client ?? client).requestOptions<FindPetsByTagsResponse, ThrowOnError>({\n    method: 'GET',\n    responseStyle: 'data',\n    url: '/pet/findByTags',\n    ...options,\n  });\n\n/**\n * Deletes a pet.\n *\n * Delete a pet.\n */\nexport const deletePetRequest = <ThrowOnError extends boolean = false>(\n  options: Options<DeletePetData, ThrowOnError>,\n): HttpRequest<unknown> =>\n  (options?.client ?? client).requestOptions<unknown, ThrowOnError>({\n    method: 'DELETE',\n    responseStyle: 'data',\n    url: '/pet/{petId}',\n    ...options,\n  });\n\n/**\n * Find pet by ID.\n *\n * Returns a single pet.\n */\nexport const getPetByIdRequest = <ThrowOnError extends boolean = false>(\n  options: Options<GetPetByIdData, ThrowOnError>,\n): HttpRequest<GetPetByIdResponse> =>\n  (options?.client ?? client).requestOptions<GetPetByIdResponse, ThrowOnError>({\n    method: 'GET',\n    responseStyle: 'data',\n    url: '/pet/{petId}',\n    ...options,\n  });\n\n/**\n * Updates a pet in the store with form data.\n *\n * Updates a pet resource based on the form data.\n */\nexport const updatePetWithFormRequest = <ThrowOnError extends boolean = false>(\n  options: Options<UpdatePetWithFormData, ThrowOnError>,\n): HttpRequest<UpdatePetWithFormResponse> =>\n  (options?.client ?? client).requestOptions<UpdatePetWithFormResponse, ThrowOnError>({\n    method: 'POST',\n    responseStyle: 'data',\n    url: '/pet/{petId}',\n    ...options,\n  });\n\n/**\n * Uploads an image.\n *\n * Upload image of the pet.\n */\nexport const uploadFileRequest = <ThrowOnError extends boolean = false>(\n  options: Options<UploadFileData, ThrowOnError>,\n): HttpRequest<UploadFileResponse> =>\n  (options?.client ?? client).requestOptions<UploadFileResponse, ThrowOnError>({\n    method: 'POST',\n    responseStyle: 'data',\n    url: '/pet/{petId}/uploadImage',\n    ...options,\n  });\n\n/**\n * Returns pet inventories by status.\n *\n * Returns a map of status codes to quantities.\n */\nexport const getInventoryRequest = <ThrowOnError extends boolean = false>(\n  options?: Options<GetInventoryData, ThrowOnError>,\n): HttpRequest<GetInventoryResponse> =>\n  (options?.client ?? client).requestOptions<GetInventoryResponse, ThrowOnError>({\n    method: 'GET',\n    responseStyle: 'data',\n    url: '/store/inventory',\n    ...options,\n  });\n\n/**\n * Place an order for a pet.\n *\n * Place a new order in the store.\n */\nexport const placeOrderRequest = <ThrowOnError extends boolean = false>(\n  options?: Options<PlaceOrderData, ThrowOnError>,\n): HttpRequest<PlaceOrderResponse> =>\n  (options?.client ?? client).requestOptions<PlaceOrderResponse, ThrowOnError>({\n    method: 'POST',\n    responseStyle: 'data',\n    url: '/store/order',\n    ...options,\n  });\n\n/**\n * Delete purchase order by identifier.\n *\n * For valid response try integer IDs with value < 1000. Anything above 1000 or non-integers will generate API errors.\n */\nexport const deleteOrderRequest = <ThrowOnError extends boolean = false>(\n  options: Options<DeleteOrderData, ThrowOnError>,\n): HttpRequest<unknown> =>\n  (options?.client ?? client).requestOptions<unknown, ThrowOnError>({\n    method: 'DELETE',\n    responseStyle: 'data',\n    url: '/store/order/{orderId}',\n    ...options,\n  });\n\n/**\n * Find purchase order by ID.\n *\n * For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions.\n */\nexport const getOrderByIdRequest = <ThrowOnError extends boolean = false>(\n  options: Options<GetOrderByIdData, ThrowOnError>,\n): HttpRequest<GetOrderByIdResponse> =>\n  (options?.client ?? client).requestOptions<GetOrderByIdResponse, ThrowOnError>({\n    method: 'GET',\n    responseStyle: 'data',\n    url: '/store/order/{orderId}',\n    ...options,\n  });\n\n/**\n * Create user.\n *\n * This can only be done by the logged in user.\n */\nexport const createUserRequest = <ThrowOnError extends boolean = false>(\n  options?: Options<CreateUserData, ThrowOnError>,\n): HttpRequest<CreateUserResponse> =>\n  (options?.client ?? client).requestOptions<CreateUserResponse, ThrowOnError>({\n    method: 'POST',\n    responseStyle: 'data',\n    url: '/user',\n    ...options,\n  });\n\n/**\n * Creates list of users with given input array.\n *\n * Creates list of users with given input array.\n */\nexport const createUsersWithListInputRequest = <ThrowOnError extends boolean = false>(\n  options?: Options<CreateUsersWithListInputData, ThrowOnError>,\n): HttpRequest<CreateUsersWithListInputResponse> =>\n  (options?.client ?? client).requestOptions<CreateUsersWithListInputResponse, ThrowOnError>({\n    method: 'POST',\n    responseStyle: 'data',\n    url: '/user/createWithList',\n    ...options,\n  });\n\n/**\n * Logs user into the system.\n *\n * Log into the system.\n */\nexport const loginUserRequest = <ThrowOnError extends boolean = false>(\n  options?: Options<LoginUserData, ThrowOnError>,\n): HttpRequest<LoginUserResponse> =>\n  (options?.client ?? client).requestOptions<LoginUserResponse, ThrowOnError>({\n    method: 'GET',\n    responseStyle: 'data',\n    url: '/user/login',\n    ...options,\n  });\n\n/**\n * Logs out current logged in user session.\n *\n * Log user out of the system.\n */\nexport const logoutUserRequest = <ThrowOnError extends boolean = false>(\n  options?: Options<LogoutUserData, ThrowOnError>,\n): HttpRequest<unknown> =>\n  (options?.client ?? client).requestOptions<unknown, ThrowOnError>({\n    method: 'GET',\n    responseStyle: 'data',\n    url: '/user/logout',\n    ...options,\n  });\n\n/**\n * Delete user resource.\n *\n * This can only be done by the logged in user.\n */\nexport const deleteUserRequest = <ThrowOnError extends boolean = false>(\n  options: Options<DeleteUserData, ThrowOnError>,\n): HttpRequest<unknown> =>\n  (options?.client ?? client).requestOptions<unknown, ThrowOnError>({\n    method: 'DELETE',\n    responseStyle: 'data',\n    url: '/user/{username}',\n    ...options,\n  });\n\n/**\n * Get user by user name.\n *\n * Get user detail based on username.\n */\nexport const getUserByNameRequest = <ThrowOnError extends boolean = false>(\n  options: Options<GetUserByNameData, ThrowOnError>,\n): HttpRequest<GetUserByNameResponse> =>\n  (options?.client ?? client).requestOptions<GetUserByNameResponse, ThrowOnError>({\n    method: 'GET',\n    responseStyle: 'data',\n    url: '/user/{username}',\n    ...options,\n  });\n\n/**\n * Update user resource.\n *\n * This can only be done by the logged in user.\n */\nexport const updateUserRequest = <ThrowOnError extends boolean = false>(\n  options: Options<UpdateUserData, ThrowOnError>,\n): HttpRequest<unknown> =>\n  (options?.client ?? client).requestOptions<unknown, ThrowOnError>({\n    method: 'PUT',\n    responseStyle: 'data',\n    url: '/user/{username}',\n    ...options,\n  });\n\n@Injectable({ providedIn: 'root' })\nexport class PetServiceResources {\n  /**\n   * Add a new pet to the store.\n   *\n   * Add a new pet to the store.\n   */\n  public addPet<ThrowOnError extends boolean = false>(\n    options: () => Options<AddPetData, ThrowOnError> | undefined,\n  ) {\n    return httpResource<AddPetResponse>(() => {\n      const opts = options ? options() : undefined;\n      return opts ? addPetRequest(opts) : undefined;\n    });\n  }\n\n  /**\n   * Update an existing pet.\n   *\n   * Update an existing pet by Id.\n   */\n  public updatePet<ThrowOnError extends boolean = false>(\n    options: () => Options<UpdatePetData, ThrowOnError> | undefined,\n  ) {\n    return httpResource<UpdatePetResponse>(() => {\n      const opts = options ? options() : undefined;\n      return opts ? updatePetRequest(opts) : undefined;\n    });\n  }\n\n  /**\n   * Finds Pets by status.\n   *\n   * Multiple status values can be provided with comma separated strings.\n   */\n  public findPetsByStatus<ThrowOnError extends boolean = false>(\n    options: () => Options<FindPetsByStatusData, ThrowOnError> | undefined,\n  ) {\n    return httpResource<FindPetsByStatusResponse>(() => {\n      const opts = options ? options() : undefined;\n      return opts ? findPetsByStatusRequest(opts) : undefined;\n    });\n  }\n\n  /**\n   * Finds Pets by tags.\n   *\n   * Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.\n   */\n  public findPetsByTags<ThrowOnError extends boolean = false>(\n    options: () => Options<FindPetsByTagsData, ThrowOnError> | undefined,\n  ) {\n    return httpResource<FindPetsByTagsResponse>(() => {\n      const opts = options ? options() : undefined;\n      return opts ? findPetsByTagsRequest(opts) : undefined;\n    });\n  }\n\n  /**\n   * Deletes a pet.\n   *\n   * Delete a pet.\n   */\n  public deletePet<ThrowOnError extends boolean = false>(\n    options: () => Options<DeletePetData, ThrowOnError> | undefined,\n  ) {\n    return httpResource<unknown>(() => {\n      const opts = options ? options() : undefined;\n      return opts ? deletePetRequest(opts) : undefined;\n    });\n  }\n\n  /**\n   * Find pet by ID.\n   *\n   * Returns a single pet.\n   */\n  public getPetById<ThrowOnError extends boolean = false>(\n    options: () => Options<GetPetByIdData, ThrowOnError> | undefined,\n  ) {\n    return httpResource<GetPetByIdResponse>(() => {\n      const opts = options ? options() : undefined;\n      return opts ? getPetByIdRequest(opts) : undefined;\n    });\n  }\n\n  /**\n   * Updates a pet in the store with form data.\n   *\n   * Updates a pet resource based on the form data.\n   */\n  public updatePetWithForm<ThrowOnError extends boolean = false>(\n    options: () => Options<UpdatePetWithFormData, ThrowOnError> | undefined,\n  ) {\n    return httpResource<UpdatePetWithFormResponse>(() => {\n      const opts = options ? options() : undefined;\n      return opts ? updatePetWithFormRequest(opts) : undefined;\n    });\n  }\n\n  /**\n   * Uploads an image.\n   *\n   * Upload image of the pet.\n   */\n  public uploadFile<ThrowOnError extends boolean = false>(\n    options: () => Options<UploadFileData, ThrowOnError> | undefined,\n  ) {\n    return httpResource<UploadFileResponse>(() => {\n      const opts = options ? options() : undefined;\n      return opts ? uploadFileRequest(opts) : undefined;\n    });\n  }\n}\n\n@Injectable({ providedIn: 'root' })\nexport class StoreServiceResources {\n  /**\n   * Returns pet inventories by status.\n   *\n   * Returns a map of status codes to quantities.\n   */\n  public getInventory<ThrowOnError extends boolean = false>(\n    options?: () => Options<GetInventoryData, ThrowOnError> | undefined,\n  ) {\n    return httpResource<GetInventoryResponse>(() => {\n      const opts = options ? options() : undefined;\n      return opts ? getInventoryRequest(opts) : undefined;\n    });\n  }\n\n  /**\n   * Place an order for a pet.\n   *\n   * Place a new order in the store.\n   */\n  public placeOrder<ThrowOnError extends boolean = false>(\n    options?: () => Options<PlaceOrderData, ThrowOnError> | undefined,\n  ) {\n    return httpResource<PlaceOrderResponse>(() => {\n      const opts = options ? options() : undefined;\n      return opts ? placeOrderRequest(opts) : undefined;\n    });\n  }\n\n  /**\n   * Delete purchase order by identifier.\n   *\n   * For valid response try integer IDs with value < 1000. Anything above 1000 or non-integers will generate API errors.\n   */\n  public deleteOrder<ThrowOnError extends boolean = false>(\n    options: () => Options<DeleteOrderData, ThrowOnError> | undefined,\n  ) {\n    return httpResource<unknown>(() => {\n      const opts = options ? options() : undefined;\n      return opts ? deleteOrderRequest(opts) : undefined;\n    });\n  }\n\n  /**\n   * Find purchase order by ID.\n   *\n   * For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions.\n   */\n  public getOrderById<ThrowOnError extends boolean = false>(\n    options: () => Options<GetOrderByIdData, ThrowOnError> | undefined,\n  ) {\n    return httpResource<GetOrderByIdResponse>(() => {\n      const opts = options ? options() : undefined;\n      return opts ? getOrderByIdRequest(opts) : undefined;\n    });\n  }\n}\n\n@Injectable({ providedIn: 'root' })\nexport class UserServiceResources {\n  /**\n   * Create user.\n   *\n   * This can only be done by the logged in user.\n   */\n  public createUser<ThrowOnError extends boolean = false>(\n    options?: () => Options<CreateUserData, ThrowOnError> | undefined,\n  ) {\n    return httpResource<CreateUserResponse>(() => {\n      const opts = options ? options() : undefined;\n      return opts ? createUserRequest(opts) : undefined;\n    });\n  }\n\n  /**\n   * Creates list of users with given input array.\n   *\n   * Creates list of users with given input array.\n   */\n  public createUsersWithListInput<ThrowOnError extends boolean = false>(\n    options?: () => Options<CreateUsersWithListInputData, ThrowOnError> | undefined,\n  ) {\n    return httpResource<CreateUsersWithListInputResponse>(() => {\n      const opts = options ? options() : undefined;\n      return opts ? createUsersWithListInputRequest(opts) : undefined;\n    });\n  }\n\n  /**\n   * Logs user into the system.\n   *\n   * Log into the system.\n   */\n  public loginUser<ThrowOnError extends boolean = false>(\n    options?: () => Options<LoginUserData, ThrowOnError> | undefined,\n  ) {\n    return httpResource<LoginUserResponse>(() => {\n      const opts = options ? options() : undefined;\n      return opts ? loginUserRequest(opts) : undefined;\n    });\n  }\n\n  /**\n   * Logs out current logged in user session.\n   *\n   * Log user out of the system.\n   */\n  public logoutUser<ThrowOnError extends boolean = false>(\n    options?: () => Options<LogoutUserData, ThrowOnError> | undefined,\n  ) {\n    return httpResource<unknown>(() => {\n      const opts = options ? options() : undefined;\n      return opts ? logoutUserRequest(opts) : undefined;\n    });\n  }\n\n  /**\n   * Delete user resource.\n   *\n   * This can only be done by the logged in user.\n   */\n  public deleteUser<ThrowOnError extends boolean = false>(\n    options: () => Options<DeleteUserData, ThrowOnError> | undefined,\n  ) {\n    return httpResource<unknown>(() => {\n      const opts = options ? options() : undefined;\n      return opts ? deleteUserRequest(opts) : undefined;\n    });\n  }\n\n  /**\n   * Get user by user name.\n   *\n   * Get user detail based on username.\n   */\n  public getUserByName<ThrowOnError extends boolean = false>(\n    options: () => Options<GetUserByNameData, ThrowOnError> | undefined,\n  ) {\n    return httpResource<GetUserByNameResponse>(() => {\n      const opts = options ? options() : undefined;\n      return opts ? getUserByNameRequest(opts) : undefined;\n    });\n  }\n\n  /**\n   * Update user resource.\n   *\n   * This can only be done by the logged in user.\n   */\n  public updateUser<ThrowOnError extends boolean = false>(\n    options: () => Options<UpdateUserData, ThrowOnError> | undefined,\n  ) {\n    return httpResource<unknown>(() => {\n      const opts = options ? options() : undefined;\n      return opts ? updateUserRequest(opts) : undefined;\n    });\n  }\n}\n"
  },
  {
    "path": "examples/openapi-ts-angular-common/src/client/client/client.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { HttpResponse } from '@angular/common/http';\nimport { HttpClient, HttpErrorResponse, HttpEventType, HttpRequest } from '@angular/common/http';\nimport {\n  assertInInjectionContext,\n  inject,\n  provideAppInitializer,\n  runInInjectionContext,\n} from '@angular/core';\nimport { firstValueFrom } from 'rxjs';\nimport { filter } from 'rxjs/operators';\n\nimport { createSseClient } from '../core/serverSentEvents.gen';\nimport type { HttpMethod } from '../core/types.gen';\nimport { getValidRequestBody } from '../core/utils.gen';\nimport type {\n  Client,\n  Config,\n  RequestOptions,\n  ResolvedRequestOptions,\n  ResponseStyle,\n} from './types.gen';\nimport {\n  buildUrl,\n  createConfig,\n  createInterceptors,\n  mergeConfigs,\n  mergeHeaders,\n  setAuthParams,\n} from './utils.gen';\n\nexport function provideHeyApiClient(client: Client) {\n  return provideAppInitializer(() => {\n    const httpClient = inject(HttpClient);\n    client.setConfig({ httpClient });\n  });\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<\n    HttpRequest<unknown>,\n    HttpResponse<unknown>,\n    unknown,\n    ResolvedRequestOptions\n  >();\n\n  const requestOptions = <\n    TData = unknown,\n    ThrowOnError extends boolean = false,\n    TResponseStyle extends ResponseStyle = 'fields',\n  >(\n    options: RequestOptions<TData, TResponseStyle, ThrowOnError>,\n  ) => {\n    const opts = {\n      ..._config,\n      ...options,\n      headers: mergeHeaders(_config.headers, options.headers),\n      httpClient: options.httpClient ?? _config.httpClient,\n      serializedBody: undefined as string | undefined,\n    };\n\n    if (!opts.httpClient) {\n      if (opts.injector) {\n        opts.httpClient = runInInjectionContext(opts.injector, () => inject(HttpClient));\n      } else {\n        assertInInjectionContext(requestOptions);\n        opts.httpClient = inject(HttpClient);\n      }\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 url = buildUrl(opts as any);\n\n    const req = new HttpRequest<unknown>(opts.method ?? 'GET', url, getValidRequestBody(opts), {\n      redirect: 'follow',\n      ...opts,\n    });\n\n    return { opts, req, url };\n  };\n\n  const beforeRequest = async (options: RequestOptions) => {\n    const { opts, req, url } = requestOptions(options);\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    return { opts, req, url };\n  };\n\n  const request: Client['request'] = async (options) => {\n    // @ts-expect-error\n    const { opts, req: initialReq } = await beforeRequest(options);\n\n    let req = initialReq;\n\n    for (const fn of interceptors.request.fns) {\n      if (fn) {\n        req = await fn(req, opts as any);\n      }\n    }\n\n    const result: {\n      request: HttpRequest<unknown>;\n      response: any;\n    } = {\n      request: req,\n      response: null,\n    };\n\n    try {\n      result.response = (await firstValueFrom(\n        opts\n          .httpClient!.request(req)\n          .pipe(filter((event) => event.type === HttpEventType.Response)),\n      )) as HttpResponse<unknown>;\n\n      for (const fn of interceptors.response.fns) {\n        if (fn) {\n          result.response = await fn(result.response, req, opts as any);\n        }\n      }\n\n      let bodyResponse = result.response.body;\n\n      if (opts.responseValidator) {\n        await opts.responseValidator(bodyResponse);\n      }\n\n      if (opts.responseTransformer) {\n        bodyResponse = await opts.responseTransformer(bodyResponse);\n      }\n\n      return opts.responseStyle === 'data' ? bodyResponse : { data: bodyResponse, ...result };\n    } catch (error) {\n      if (error instanceof HttpErrorResponse) {\n        result.response = error;\n      }\n\n      let finalError = error instanceof HttpErrorResponse ? error.error : error;\n\n      for (const fn of interceptors.error.fns) {\n        if (fn) {\n          finalError = (await fn(finalError, result.response as any, req, opts as any)) as string;\n        }\n      }\n\n      if (opts.throwOnError) {\n        throw finalError;\n      }\n\n      return opts.responseStyle === 'data'\n        ? undefined\n        : {\n            error: finalError,\n            ...result,\n          };\n    }\n  };\n\n  const makeMethodFn = (method: Uppercase<HttpMethod>) => (options: RequestOptions) =>\n    request({ ...options, method });\n\n  const makeSseFn = (method: Uppercase<HttpMethod>) => async (options: RequestOptions) => {\n    const { opts, url } = await beforeRequest(options);\n    return createSseClient({\n      ...opts,\n      body: opts.body as BodyInit | null | undefined,\n      headers: opts.headers as unknown as Record<string, string>,\n      method,\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    requestOptions: (options) => {\n      if (options.security) {\n        throw new Error('Security is not supported in requestOptions');\n      }\n\n      if (options.requestValidator) {\n        throw new Error('Request validation is not supported in requestOptions');\n      }\n\n      return requestOptions(options).req;\n    },\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"
  },
  {
    "path": "examples/openapi-ts-angular-common/src/client/client/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type { Auth } from '../core/auth.gen';\nexport type { QuerySerializerOptions } from '../core/bodySerializer.gen';\nexport {\n  formDataBodySerializer,\n  jsonBodySerializer,\n  urlSearchParamsBodySerializer,\n} from '../core/bodySerializer.gen';\nexport { buildClientParams } from '../core/params.gen';\nexport { serializeQueryKeyValue } from '../core/queryKeySerializer.gen';\nexport { createClient } from './client.gen';\nexport type {\n  Client,\n  ClientOptions,\n  Config,\n  CreateClientConfig,\n  Options,\n  RequestOptions,\n  RequestResult,\n  ResolvedRequestOptions,\n  ResponseStyle,\n  TDataShape,\n} from './types.gen';\nexport { createConfig, mergeHeaders } from './utils.gen';\n"
  },
  {
    "path": "examples/openapi-ts-angular-common/src/client/client/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type {\n  HttpClient,\n  HttpErrorResponse,\n  HttpHeaders,\n  HttpRequest,\n  HttpResponse,\n} from '@angular/common/http';\nimport type { Injector } from '@angular/core';\n\nimport type { Auth } from '../core/auth.gen';\nimport type { ServerSentEventsOptions, ServerSentEventsResult } from '../core/serverSentEvents.gen';\nimport type { Client as CoreClient, Config as CoreConfig } from '../core/types.gen';\nimport type { Middleware } from './utils.gen';\n\nexport type ResponseStyle = 'data' | 'fields';\n\nexport interface Config<T extends ClientOptions = ClientOptions>\n  extends Omit<RequestInit, 'body' | 'headers' | 'method'>, Omit<CoreConfig, 'headers'> {\n  /**\n   * Base URL for all requests made by this client.\n   */\n  baseUrl?: T['baseUrl'];\n  /**\n   * An object containing any HTTP headers that you want to pre-populate your\n   * `HttpHeaders` object with.\n   *\n   * {@link https://angular.dev/api/common/http/HttpHeaders#constructor See more}\n   */\n  headers?:\n    | HttpHeaders\n    | Record<\n        string,\n        string | number | boolean | (string | number | boolean)[] | null | undefined | unknown\n      >;\n  /**\n   * The HTTP client to use for making requests.\n   */\n  httpClient?: HttpClient;\n  /**\n   * Should we return only data or multiple fields (data, error, response, etc.)?\n   *\n   * @default 'fields'\n   */\n  responseStyle?: ResponseStyle;\n\n  /**\n   * Throw an error instead of returning it in the response?\n   *\n   * @default false\n   */\n  throwOnError?: T['throwOnError'];\n}\n\nexport interface RequestOptions<\n  TData = unknown,\n  TResponseStyle extends ResponseStyle = 'fields',\n  ThrowOnError extends boolean = boolean,\n  Url extends string = string,\n>\n  extends\n    Config<{\n      responseStyle: TResponseStyle;\n      throwOnError: ThrowOnError;\n    }>,\n    Pick<\n      ServerSentEventsOptions<TData>,\n      | 'onRequest'\n      | 'onSseError'\n      | 'onSseEvent'\n      | 'sseDefaultRetryDelay'\n      | 'sseMaxRetryAttempts'\n      | 'sseMaxRetryDelay'\n    > {\n  /**\n   * Any body that you want to add to your request.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/fetch#body}\n   */\n  body?: unknown;\n  /**\n   * Optional custom injector for dependency resolution if you don't implicitly or explicitly provide one.\n   */\n  injector?: Injector;\n  path?: Record<string, unknown>;\n  query?: Record<string, unknown>;\n  /**\n   * Security mechanism(s) to use for the request.\n   */\n  security?: ReadonlyArray<Auth>;\n  url: Url;\n}\n\nexport interface ResolvedRequestOptions<\n  TResponseStyle extends ResponseStyle = 'fields',\n  ThrowOnError extends boolean = boolean,\n  Url extends string = string,\n> extends RequestOptions<unknown, TResponseStyle, ThrowOnError, Url> {\n  serializedBody?: string;\n}\n\nexport type RequestResult<\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = boolean,\n  TResponseStyle extends ResponseStyle = 'fields',\n> = Promise<\n  ThrowOnError extends true\n    ? TResponseStyle extends 'data'\n      ? TData extends Record<string, unknown>\n        ? TData[keyof TData]\n        : TData\n      : {\n          data: TData extends Record<string, unknown> ? TData[keyof TData] : TData;\n          request: HttpRequest<unknown>;\n          response: HttpResponse<TData>;\n        }\n    : TResponseStyle extends 'data'\n      ? (TData extends Record<string, unknown> ? TData[keyof TData] : TData) | undefined\n      :\n          | {\n              data: TData extends Record<string, unknown> ? TData[keyof TData] : TData;\n              error: undefined;\n              request: HttpRequest<unknown>;\n              response: HttpResponse<TData>;\n            }\n          | {\n              data: undefined;\n              error: TError[keyof TError];\n              request: HttpRequest<unknown>;\n              response: HttpErrorResponse & {\n                error: TError[keyof TError] | null;\n              };\n            }\n>;\n\nexport interface ClientOptions {\n  baseUrl?: string;\n  responseStyle?: ResponseStyle;\n  throwOnError?: boolean;\n}\n\ntype MethodFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'>,\n) => RequestResult<TData, TError, ThrowOnError, TResponseStyle>;\n\ntype SseFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'>,\n) => Promise<ServerSentEventsResult<TData, TError>>;\n\ntype RequestFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'> &\n    Pick<Required<RequestOptions<TData, TResponseStyle, ThrowOnError>>, 'method'>,\n) => RequestResult<TData, TError, ThrowOnError, TResponseStyle>;\n\ntype RequestOptionsFn = <\n  T,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: RequestOptions<T, TResponseStyle, ThrowOnError>,\n) => HttpRequest<T>;\n\ntype BuildUrlFn = <\n  TData extends {\n    body?: unknown;\n    path?: Record<string, unknown>;\n    query?: Record<string, unknown>;\n    url: string;\n  },\n>(\n  options: TData & Options<TData>,\n) => string;\n\nexport type Client = CoreClient<RequestFn, Config, MethodFn, BuildUrlFn, SseFn> & {\n  interceptors: Middleware<\n    HttpRequest<unknown>,\n    HttpResponse<unknown>,\n    unknown,\n    ResolvedRequestOptions\n  >;\n  requestOptions: RequestOptionsFn;\n};\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 = ClientOptions> = (\n  override?: Config<ClientOptions & T>,\n) => Config<Required<ClientOptions> & T>;\n\nexport interface TDataShape {\n  body?: unknown;\n  headers?: unknown;\n  path?: unknown;\n  query?: unknown;\n  url: string;\n}\n\ntype OmitKeys<T, K> = Pick<T, Exclude<keyof T, K>>;\n\nexport type Options<\n  TData extends TDataShape = TDataShape,\n  ThrowOnError extends boolean = boolean,\n  TResponse = unknown,\n  TResponseStyle extends ResponseStyle = 'fields',\n> = OmitKeys<\n  RequestOptions<TResponse, TResponseStyle, ThrowOnError>,\n  'body' | 'path' | 'query' | 'url'\n> &\n  ([TData] extends [never] ? unknown : Omit<TData, 'url'>);\n"
  },
  {
    "path": "examples/openapi-ts-angular-common/src/client/client/utils.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport { HttpHeaders } from '@angular/common/http';\n\nimport { getAuthToken } from '../core/auth.gen';\nimport type { QuerySerializer, QuerySerializerOptions } from '../core/bodySerializer.gen';\nimport {\n  serializeArrayParam,\n  serializeObjectParam,\n  serializePrimitiveParam,\n} from '../core/pathSerializer.gen';\nimport type { Client, ClientOptions, Config, RequestOptions } from './types.gen';\n\ninterface PathSerializer {\n  path: Record<string, unknown>;\n  url: string;\n}\n\nconst PATH_PARAM_RE = /\\{[^{}]+\\}/g;\n\ntype ArrayStyle = 'form' | 'spaceDelimited' | 'pipeDelimited';\ntype MatrixStyle = 'label' | 'matrix' | 'simple';\ntype ArraySeparatorStyle = ArrayStyle | MatrixStyle;\n\nconst 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 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 = (\n  contentType: string | null,\n): 'blob' | 'formData' | 'json' | 'stream' | 'text' | undefined => {\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\nexport const setAuthParams = async (\n  options: Pick<Required<RequestOptions>, 'security'> &\n    Pick<RequestOptions, 'auth' | 'query'> & {\n      headers: HttpHeaders;\n    },\n) => {\n  for (const auth of options.security) {\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 = options.headers.append('Cookie', `${name}=${token}`);\n        break;\n      case 'header':\n      default:\n        options.headers = options.headers.set(name, token);\n        break;\n    }\n\n    return;\n  }\n};\n\nexport const buildUrl: Client['buildUrl'] = (options) => {\n  const url = 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  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 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\nexport const mergeHeaders = (\n  ...headers: Array<Required<Config>['headers'] | undefined>\n): HttpHeaders => {\n  let mergedHeaders = new HttpHeaders();\n\n  for (const header of headers) {\n    if (!header || typeof header !== 'object') {\n      continue;\n    }\n\n    if (header instanceof HttpHeaders) {\n      // Merge HttpHeaders instance\n      header.keys().forEach((key) => {\n        const values = header.getAll(key);\n        if (values) {\n          values.forEach((value) => {\n            mergedHeaders = mergedHeaders.append(key, value);\n          });\n        }\n      });\n    } else {\n      // Merge plain object headers\n      for (const [key, value] of Object.entries(header)) {\n        if (value === null) {\n          mergedHeaders = mergedHeaders.delete(key);\n        } else if (Array.isArray(value)) {\n          for (const v of value) {\n            mergedHeaders = 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 = mergedHeaders.set(\n            key,\n            typeof value === 'object' ? JSON.stringify(value) : (value as string),\n          );\n        }\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  headers: defaultHeaders,\n  querySerializer: defaultQuerySerializer,\n  ...override,\n});\n"
  },
  {
    "path": "examples/openapi-ts-angular-common/src/client/client.gen.ts",
    "content": "// 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> = (\n  override?: Config<ClientOptions & T>,\n) => Config<Required<ClientOptions> & T>;\n\nexport const client = createClient(\n  createConfig<ClientOptions2>({\n    baseUrl: 'https://petstore3.swagger.io/api/v3',\n    throwOnError: true,\n  }),\n);\n"
  },
  {
    "path": "examples/openapi-ts-angular-common/src/client/core/auth.gen.ts",
    "content": "// 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"
  },
  {
    "path": "examples/openapi-ts-angular-common/src/client/core/bodySerializer.gen.ts",
    "content": "// 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"
  },
  {
    "path": "examples/openapi-ts-angular-common/src/client/core/params.gen.ts",
    "content": "// 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"
  },
  {
    "path": "examples/openapi-ts-angular-common/src/client/core/pathSerializer.gen.ts",
    "content": "// 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"
  },
  {
    "path": "examples/openapi-ts-angular-common/src/client/core/queryKeySerializer.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\n/**\n * JSON-friendly union that mirrors what Pinia Colada can hash.\n */\nexport type JsonValue =\n  | null\n  | string\n  | number\n  | boolean\n  | JsonValue[]\n  | { [key: string]: JsonValue };\n\n/**\n * Replacer that converts non-JSON values (bigint, Date, etc.) to safe substitutes.\n */\nexport const queryKeyJsonReplacer = (_key: string, value: unknown) => {\n  if (value === undefined || typeof value === 'function' || typeof value === 'symbol') {\n    return undefined;\n  }\n  if (typeof value === 'bigint') {\n    return value.toString();\n  }\n  if (value instanceof Date) {\n    return value.toISOString();\n  }\n  return value;\n};\n\n/**\n * Safely stringifies a value and parses it back into a JsonValue.\n */\nexport const stringifyToJsonValue = (input: unknown): JsonValue | undefined => {\n  try {\n    const json = JSON.stringify(input, queryKeyJsonReplacer);\n    if (json === undefined) {\n      return undefined;\n    }\n    return JSON.parse(json) as JsonValue;\n  } catch {\n    return undefined;\n  }\n};\n\n/**\n * Detects plain objects (including objects with a null prototype).\n */\nconst isPlainObject = (value: unknown): value is Record<string, unknown> => {\n  if (value === null || typeof value !== 'object') {\n    return false;\n  }\n  const prototype = Object.getPrototypeOf(value as object);\n  return prototype === Object.prototype || prototype === null;\n};\n\n/**\n * Turns URLSearchParams into a sorted JSON object for deterministic keys.\n */\nconst serializeSearchParams = (params: URLSearchParams): JsonValue => {\n  const entries = Array.from(params.entries()).sort(([a], [b]) => a.localeCompare(b));\n  const result: Record<string, JsonValue> = {};\n\n  for (const [key, value] of entries) {\n    const existing = result[key];\n    if (existing === undefined) {\n      result[key] = value;\n      continue;\n    }\n\n    if (Array.isArray(existing)) {\n      (existing as string[]).push(value);\n    } else {\n      result[key] = [existing, value];\n    }\n  }\n\n  return result;\n};\n\n/**\n * Normalizes any accepted value into a JSON-friendly shape for query keys.\n */\nexport const serializeQueryKeyValue = (value: unknown): JsonValue | undefined => {\n  if (value === null) {\n    return null;\n  }\n\n  if (typeof value === 'string' || typeof value === 'number' || typeof value === 'boolean') {\n    return value;\n  }\n\n  if (value === undefined || typeof value === 'function' || typeof value === 'symbol') {\n    return undefined;\n  }\n\n  if (typeof value === 'bigint') {\n    return value.toString();\n  }\n\n  if (value instanceof Date) {\n    return value.toISOString();\n  }\n\n  if (Array.isArray(value)) {\n    return stringifyToJsonValue(value);\n  }\n\n  if (typeof URLSearchParams !== 'undefined' && value instanceof URLSearchParams) {\n    return serializeSearchParams(value);\n  }\n\n  if (isPlainObject(value)) {\n    return stringifyToJsonValue(value);\n  }\n\n  return undefined;\n};\n"
  },
  {
    "path": "examples/openapi-ts-angular-common/src/client/core/serverSentEvents.gen.ts",
    "content": "// 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 const 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            // Normalize line endings: CRLF -> LF, then CR -> LF\n            buffer = buffer.replace(/\\r\\n/g, '\\n').replace(/\\r/g, '\\n');\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"
  },
  {
    "path": "examples/openapi-ts-angular-common/src/client/core/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { Auth, AuthToken } from './auth.gen';\nimport type { BodySerializer, QuerySerializer, QuerySerializerOptions } from './bodySerializer.gen';\n\nexport type HttpMethod =\n  | 'connect'\n  | 'delete'\n  | 'get'\n  | 'head'\n  | 'options'\n  | 'patch'\n  | 'post'\n  | 'put'\n  | 'trace';\n\nexport type Client<\n  RequestFn = never,\n  Config = unknown,\n  MethodFn = never,\n  BuildUrlFn = never,\n  SseFn = never,\n> = {\n  /**\n   * Returns the final request URL.\n   */\n  buildUrl: BuildUrlFn;\n  getConfig: () => Config;\n  request: RequestFn;\n  setConfig: (config: Config) => Config;\n} & {\n  [K in HttpMethod]: MethodFn;\n} & ([SseFn] extends [never] ? { sse?: never } : { sse: { [K in HttpMethod]: SseFn } });\n\nexport interface Config {\n  /**\n   * Auth token or a function returning auth token. The resolved value will be\n   * added to the request payload as defined by its `security` array.\n   */\n  auth?: ((auth: Auth) => Promise<AuthToken> | AuthToken) | AuthToken;\n  /**\n   * A function for serializing request body parameter. By default,\n   * {@link JSON.stringify()} will be used.\n   */\n  bodySerializer?: BodySerializer | null;\n  /**\n   * An object containing any HTTP headers that you want to pre-populate your\n   * `Headers` object with.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/Headers/Headers#init See more}\n   */\n  headers?:\n    | RequestInit['headers']\n    | Record<\n        string,\n        string | number | boolean | (string | number | boolean)[] | null | undefined | unknown\n      >;\n  /**\n   * The request method.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/fetch#method See more}\n   */\n  method?: Uppercase<HttpMethod>;\n  /**\n   * A function for serializing request query parameters. By default, arrays\n   * will be exploded in form style, objects will be exploded in deepObject\n   * style, and reserved characters are percent-encoded.\n   *\n   * This method will have no effect if the native `paramsSerializer()` Axios\n   * API function is used.\n   *\n   * {@link https://swagger.io/docs/specification/serialization/#query View examples}\n   */\n  querySerializer?: QuerySerializer | QuerySerializerOptions;\n  /**\n   * A function validating request data. This is useful if you want to ensure\n   * the request conforms to the desired shape, so it can be safely sent to\n   * the server.\n   */\n  requestValidator?: (data: unknown) => Promise<unknown>;\n  /**\n   * A function transforming response data before it's returned. This is useful\n   * for post-processing data, e.g. converting ISO strings into Date objects.\n   */\n  responseTransformer?: (data: unknown) => Promise<unknown>;\n  /**\n   * A function validating response data. This is useful if you want to ensure\n   * the response conforms to the desired shape, so it can be safely passed to\n   * the transformers and returned to the user.\n   */\n  responseValidator?: (data: unknown) => Promise<unknown>;\n}\n\ntype IsExactlyNeverOrNeverUndefined<T> = [T] extends [never]\n  ? true\n  : [T] extends [never | undefined]\n    ? [undefined] extends [T]\n      ? false\n      : true\n    : false;\n\nexport type OmitNever<T extends Record<string, unknown>> = {\n  [K in keyof T as IsExactlyNeverOrNeverUndefined<T[K]> extends true ? never : K]: T[K];\n};\n"
  },
  {
    "path": "examples/openapi-ts-angular-common/src/client/core/utils.gen.ts",
    "content": "// 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"
  },
  {
    "path": "examples/openapi-ts-angular-common/src/client/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport {\n  addPetRequest,\n  createUserRequest,\n  createUsersWithListInputRequest,\n  deleteOrderRequest,\n  deletePetRequest,\n  deleteUserRequest,\n  findPetsByStatusRequest,\n  findPetsByTagsRequest,\n  getInventoryRequest,\n  getOrderByIdRequest,\n  getPetByIdRequest,\n  getUserByNameRequest,\n  loginUserRequest,\n  logoutUserRequest,\n  PetServiceResources,\n  placeOrderRequest,\n  StoreServiceResources,\n  updatePetRequest,\n  updatePetWithFormRequest,\n  updateUserRequest,\n  uploadFileRequest,\n  UserServiceResources,\n} from './@angular/common.gen';\nexport {\n  addPet,\n  createUser,\n  createUsersWithListInput,\n  deleteOrder,\n  deletePet,\n  deleteUser,\n  findPetsByStatus,\n  findPetsByTags,\n  getInventory,\n  getOrderById,\n  getPetById,\n  getUserByName,\n  loginUser,\n  logoutUser,\n  type Options,\n  placeOrder,\n  updatePet,\n  updatePetWithForm,\n  updateUser,\n  uploadFile,\n} from './sdk.gen';\nexport type {\n  AddPetData,\n  AddPetErrors,\n  AddPetResponse,\n  AddPetResponses,\n  ApiResponse,\n  Category,\n  ClientOptions,\n  CreateUserData,\n  CreateUserErrors,\n  CreateUserResponse,\n  CreateUserResponses,\n  CreateUsersWithListInputData,\n  CreateUsersWithListInputErrors,\n  CreateUsersWithListInputResponse,\n  CreateUsersWithListInputResponses,\n  DeleteOrderData,\n  DeleteOrderErrors,\n  DeleteOrderResponses,\n  DeletePetData,\n  DeletePetErrors,\n  DeletePetResponses,\n  DeleteUserData,\n  DeleteUserErrors,\n  DeleteUserResponses,\n  FindPetsByStatusData,\n  FindPetsByStatusErrors,\n  FindPetsByStatusResponse,\n  FindPetsByStatusResponses,\n  FindPetsByTagsData,\n  FindPetsByTagsErrors,\n  FindPetsByTagsResponse,\n  FindPetsByTagsResponses,\n  GetInventoryData,\n  GetInventoryErrors,\n  GetInventoryResponse,\n  GetInventoryResponses,\n  GetOrderByIdData,\n  GetOrderByIdErrors,\n  GetOrderByIdResponse,\n  GetOrderByIdResponses,\n  GetPetByIdData,\n  GetPetByIdErrors,\n  GetPetByIdResponse,\n  GetPetByIdResponses,\n  GetUserByNameData,\n  GetUserByNameErrors,\n  GetUserByNameResponse,\n  GetUserByNameResponses,\n  LoginUserData,\n  LoginUserErrors,\n  LoginUserResponse,\n  LoginUserResponses,\n  LogoutUserData,\n  LogoutUserErrors,\n  LogoutUserResponses,\n  Order,\n  Pet,\n  Pet2,\n  PlaceOrderData,\n  PlaceOrderErrors,\n  PlaceOrderResponse,\n  PlaceOrderResponses,\n  Tag,\n  UpdatePetData,\n  UpdatePetErrors,\n  UpdatePetResponse,\n  UpdatePetResponses,\n  UpdatePetWithFormData,\n  UpdatePetWithFormErrors,\n  UpdatePetWithFormResponse,\n  UpdatePetWithFormResponses,\n  UpdateUserData,\n  UpdateUserErrors,\n  UpdateUserResponses,\n  UploadFileData,\n  UploadFileErrors,\n  UploadFileResponse,\n  UploadFileResponses,\n  User,\n  UserArray,\n} from './types.gen';\n"
  },
  {
    "path": "examples/openapi-ts-angular-common/src/client/schemas.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport const OrderSchema = {\n  properties: {\n    complete: {\n      type: 'boolean',\n    },\n    id: {\n      example: 10,\n      format: 'int64',\n      type: 'integer',\n    },\n    petId: {\n      example: 198772,\n      format: 'int64',\n      type: 'integer',\n    },\n    quantity: {\n      example: 7,\n      format: 'int32',\n      type: 'integer',\n    },\n    shipDate: {\n      format: 'date-time',\n      type: 'string',\n    },\n    status: {\n      description: 'Order Status',\n      enum: ['placed', 'approved', 'delivered'],\n      example: 'approved',\n      type: 'string',\n    },\n  },\n  type: 'object',\n  'x-swagger-router-model': 'io.swagger.petstore.model.Order',\n  xml: {\n    name: 'order',\n  },\n} as const;\n\nexport const CategorySchema = {\n  properties: {\n    id: {\n      example: 1,\n      format: 'int64',\n      type: 'integer',\n    },\n    name: {\n      example: 'Dogs',\n      type: 'string',\n    },\n  },\n  type: 'object',\n  'x-swagger-router-model': 'io.swagger.petstore.model.Category',\n  xml: {\n    name: 'category',\n  },\n} as const;\n\nexport const UserSchema = {\n  properties: {\n    email: {\n      example: 'john@email.com',\n      type: 'string',\n    },\n    firstName: {\n      example: 'John',\n      type: 'string',\n    },\n    id: {\n      example: 10,\n      format: 'int64',\n      type: 'integer',\n    },\n    lastName: {\n      example: 'James',\n      type: 'string',\n    },\n    password: {\n      example: '12345',\n      type: 'string',\n    },\n    phone: {\n      example: '12345',\n      type: 'string',\n    },\n    userStatus: {\n      description: 'User Status',\n      example: 1,\n      format: 'int32',\n      type: 'integer',\n    },\n    username: {\n      example: 'theUser',\n      type: 'string',\n    },\n  },\n  type: 'object',\n  'x-swagger-router-model': 'io.swagger.petstore.model.User',\n  xml: {\n    name: 'user',\n  },\n} as const;\n\nexport const TagSchema = {\n  properties: {\n    id: {\n      format: 'int64',\n      type: 'integer',\n    },\n    name: {\n      type: 'string',\n    },\n  },\n  type: 'object',\n  'x-swagger-router-model': 'io.swagger.petstore.model.Tag',\n  xml: {\n    name: 'tag',\n  },\n} as const;\n\nexport const PetSchema = {\n  properties: {\n    category: {\n      $ref: '#/components/schemas/Category',\n    },\n    id: {\n      example: 10,\n      format: 'int64',\n      type: 'integer',\n    },\n    name: {\n      example: 'doggie',\n      type: 'string',\n    },\n    photoUrls: {\n      items: {\n        type: 'string',\n        xml: {\n          name: 'photoUrl',\n        },\n      },\n      type: 'array',\n      xml: {\n        wrapped: true,\n      },\n    },\n    status: {\n      description: 'pet status in the store',\n      enum: ['available', 'pending', 'sold'],\n      type: 'string',\n    },\n    tags: {\n      items: {\n        $ref: '#/components/schemas/Tag',\n      },\n      type: 'array',\n      xml: {\n        wrapped: true,\n      },\n    },\n  },\n  required: ['name', 'photoUrls'],\n  type: 'object',\n  'x-swagger-router-model': 'io.swagger.petstore.model.Pet',\n  xml: {\n    name: 'pet',\n  },\n} as const;\n\nexport const ApiResponseSchema = {\n  properties: {\n    code: {\n      format: 'int32',\n      type: 'integer',\n    },\n    message: {\n      type: 'string',\n    },\n    type: {\n      type: 'string',\n    },\n  },\n  type: 'object',\n  xml: {\n    name: '##default',\n  },\n} as const;\n"
  },
  {
    "path": "examples/openapi-ts-angular-common/src/client/sdk.gen.ts",
    "content": "// 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 {\n  AddPetData,\n  AddPetErrors,\n  AddPetResponses,\n  CreateUserData,\n  CreateUserErrors,\n  CreateUserResponses,\n  CreateUsersWithListInputData,\n  CreateUsersWithListInputErrors,\n  CreateUsersWithListInputResponses,\n  DeleteOrderData,\n  DeleteOrderErrors,\n  DeleteOrderResponses,\n  DeletePetData,\n  DeletePetErrors,\n  DeletePetResponses,\n  DeleteUserData,\n  DeleteUserErrors,\n  DeleteUserResponses,\n  FindPetsByStatusData,\n  FindPetsByStatusErrors,\n  FindPetsByStatusResponses,\n  FindPetsByTagsData,\n  FindPetsByTagsErrors,\n  FindPetsByTagsResponses,\n  GetInventoryData,\n  GetInventoryErrors,\n  GetInventoryResponses,\n  GetOrderByIdData,\n  GetOrderByIdErrors,\n  GetOrderByIdResponses,\n  GetPetByIdData,\n  GetPetByIdErrors,\n  GetPetByIdResponses,\n  GetUserByNameData,\n  GetUserByNameErrors,\n  GetUserByNameResponses,\n  LoginUserData,\n  LoginUserErrors,\n  LoginUserResponses,\n  LogoutUserData,\n  LogoutUserErrors,\n  LogoutUserResponses,\n  PlaceOrderData,\n  PlaceOrderErrors,\n  PlaceOrderResponses,\n  UpdatePetData,\n  UpdatePetErrors,\n  UpdatePetResponses,\n  UpdatePetWithFormData,\n  UpdatePetWithFormErrors,\n  UpdatePetWithFormResponses,\n  UpdateUserData,\n  UpdateUserErrors,\n  UpdateUserResponses,\n  UploadFileData,\n  UploadFileErrors,\n  UploadFileResponses,\n} from './types.gen';\n\nexport type Options<\n  TData extends TDataShape = TDataShape,\n  ThrowOnError extends boolean = boolean,\n> = Options2<TData, ThrowOnError> & {\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 * Add a new pet to the store.\n *\n * Add a new pet to the store.\n */\nexport const addPet = <ThrowOnError extends boolean = true>(\n  options: Options<AddPetData, ThrowOnError>,\n) =>\n  (options.client ?? client).post<AddPetResponses, AddPetErrors, ThrowOnError, 'data'>({\n    responseStyle: 'data',\n    security: [{ scheme: 'bearer', type: 'http' }],\n    url: '/pet',\n    ...options,\n    headers: {\n      'Content-Type': 'application/json',\n      ...options.headers,\n    },\n  });\n\n/**\n * Update an existing pet.\n *\n * Update an existing pet by Id.\n */\nexport const updatePet = <ThrowOnError extends boolean = true>(\n  options: Options<UpdatePetData, ThrowOnError>,\n) =>\n  (options.client ?? client).put<UpdatePetResponses, UpdatePetErrors, ThrowOnError, 'data'>({\n    responseStyle: 'data',\n    security: [{ scheme: 'bearer', type: 'http' }],\n    url: '/pet',\n    ...options,\n    headers: {\n      'Content-Type': 'application/json',\n      ...options.headers,\n    },\n  });\n\n/**\n * Finds Pets by status.\n *\n * Multiple status values can be provided with comma separated strings.\n */\nexport const findPetsByStatus = <ThrowOnError extends boolean = true>(\n  options: Options<FindPetsByStatusData, ThrowOnError>,\n) =>\n  (options.client ?? client).get<\n    FindPetsByStatusResponses,\n    FindPetsByStatusErrors,\n    ThrowOnError,\n    'data'\n  >({\n    responseStyle: 'data',\n    security: [{ scheme: 'bearer', type: 'http' }],\n    url: '/pet/findByStatus',\n    ...options,\n  });\n\n/**\n * Finds Pets by tags.\n *\n * Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.\n */\nexport const findPetsByTags = <ThrowOnError extends boolean = true>(\n  options: Options<FindPetsByTagsData, ThrowOnError>,\n) =>\n  (options.client ?? client).get<\n    FindPetsByTagsResponses,\n    FindPetsByTagsErrors,\n    ThrowOnError,\n    'data'\n  >({\n    responseStyle: 'data',\n    security: [{ scheme: 'bearer', type: 'http' }],\n    url: '/pet/findByTags',\n    ...options,\n  });\n\n/**\n * Deletes a pet.\n *\n * Delete a pet.\n */\nexport const deletePet = <ThrowOnError extends boolean = true>(\n  options: Options<DeletePetData, ThrowOnError>,\n) =>\n  (options.client ?? client).delete<DeletePetResponses, DeletePetErrors, ThrowOnError, 'data'>({\n    responseStyle: 'data',\n    security: [{ scheme: 'bearer', type: 'http' }],\n    url: '/pet/{petId}',\n    ...options,\n  });\n\n/**\n * Find pet by ID.\n *\n * Returns a single pet.\n */\nexport const getPetById = <ThrowOnError extends boolean = true>(\n  options: Options<GetPetByIdData, ThrowOnError>,\n) =>\n  (options.client ?? client).get<GetPetByIdResponses, GetPetByIdErrors, ThrowOnError, 'data'>({\n    responseStyle: 'data',\n    security: [\n      { name: 'api_key', type: 'apiKey' },\n      { scheme: 'bearer', type: 'http' },\n    ],\n    url: '/pet/{petId}',\n    ...options,\n  });\n\n/**\n * Updates a pet in the store with form data.\n *\n * Updates a pet resource based on the form data.\n */\nexport const updatePetWithForm = <ThrowOnError extends boolean = true>(\n  options: Options<UpdatePetWithFormData, ThrowOnError>,\n) =>\n  (options.client ?? client).post<\n    UpdatePetWithFormResponses,\n    UpdatePetWithFormErrors,\n    ThrowOnError,\n    'data'\n  >({\n    responseStyle: 'data',\n    security: [{ scheme: 'bearer', type: 'http' }],\n    url: '/pet/{petId}',\n    ...options,\n  });\n\n/**\n * Uploads an image.\n *\n * Upload image of the pet.\n */\nexport const uploadFile = <ThrowOnError extends boolean = true>(\n  options: Options<UploadFileData, ThrowOnError>,\n) =>\n  (options.client ?? client).post<UploadFileResponses, UploadFileErrors, ThrowOnError, 'data'>({\n    bodySerializer: null,\n    responseStyle: 'data',\n    security: [{ scheme: 'bearer', type: 'http' }],\n    url: '/pet/{petId}/uploadImage',\n    ...options,\n    headers: {\n      'Content-Type': 'application/octet-stream',\n      ...options.headers,\n    },\n  });\n\n/**\n * Returns pet inventories by status.\n *\n * Returns a map of status codes to quantities.\n */\nexport const getInventory = <ThrowOnError extends boolean = true>(\n  options?: Options<GetInventoryData, ThrowOnError>,\n) =>\n  (options?.client ?? client).get<GetInventoryResponses, GetInventoryErrors, ThrowOnError, 'data'>({\n    responseStyle: 'data',\n    security: [{ name: 'api_key', type: 'apiKey' }],\n    url: '/store/inventory',\n    ...options,\n  });\n\n/**\n * Place an order for a pet.\n *\n * Place a new order in the store.\n */\nexport const placeOrder = <ThrowOnError extends boolean = true>(\n  options?: Options<PlaceOrderData, ThrowOnError>,\n) =>\n  (options?.client ?? client).post<PlaceOrderResponses, PlaceOrderErrors, ThrowOnError, 'data'>({\n    responseStyle: 'data',\n    url: '/store/order',\n    ...options,\n    headers: {\n      'Content-Type': 'application/json',\n      ...options?.headers,\n    },\n  });\n\n/**\n * Delete purchase order by identifier.\n *\n * For valid response try integer IDs with value < 1000. Anything above 1000 or non-integers will generate API errors.\n */\nexport const deleteOrder = <ThrowOnError extends boolean = true>(\n  options: Options<DeleteOrderData, ThrowOnError>,\n) =>\n  (options.client ?? client).delete<DeleteOrderResponses, DeleteOrderErrors, ThrowOnError, 'data'>({\n    responseStyle: 'data',\n    url: '/store/order/{orderId}',\n    ...options,\n  });\n\n/**\n * Find purchase order by ID.\n *\n * For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions.\n */\nexport const getOrderById = <ThrowOnError extends boolean = true>(\n  options: Options<GetOrderByIdData, ThrowOnError>,\n) =>\n  (options.client ?? client).get<GetOrderByIdResponses, GetOrderByIdErrors, ThrowOnError, 'data'>({\n    responseStyle: 'data',\n    url: '/store/order/{orderId}',\n    ...options,\n  });\n\n/**\n * Create user.\n *\n * This can only be done by the logged in user.\n */\nexport const createUser = <ThrowOnError extends boolean = true>(\n  options?: Options<CreateUserData, ThrowOnError>,\n) =>\n  (options?.client ?? client).post<CreateUserResponses, CreateUserErrors, ThrowOnError, 'data'>({\n    responseStyle: 'data',\n    url: '/user',\n    ...options,\n    headers: {\n      'Content-Type': 'application/json',\n      ...options?.headers,\n    },\n  });\n\n/**\n * Creates list of users with given input array.\n *\n * Creates list of users with given input array.\n */\nexport const createUsersWithListInput = <ThrowOnError extends boolean = true>(\n  options?: Options<CreateUsersWithListInputData, ThrowOnError>,\n) =>\n  (options?.client ?? client).post<\n    CreateUsersWithListInputResponses,\n    CreateUsersWithListInputErrors,\n    ThrowOnError,\n    'data'\n  >({\n    responseStyle: 'data',\n    url: '/user/createWithList',\n    ...options,\n    headers: {\n      'Content-Type': 'application/json',\n      ...options?.headers,\n    },\n  });\n\n/**\n * Logs user into the system.\n *\n * Log into the system.\n */\nexport const loginUser = <ThrowOnError extends boolean = true>(\n  options?: Options<LoginUserData, ThrowOnError>,\n) =>\n  (options?.client ?? client).get<LoginUserResponses, LoginUserErrors, ThrowOnError, 'data'>({\n    responseStyle: 'data',\n    url: '/user/login',\n    ...options,\n  });\n\n/**\n * Logs out current logged in user session.\n *\n * Log user out of the system.\n */\nexport const logoutUser = <ThrowOnError extends boolean = true>(\n  options?: Options<LogoutUserData, ThrowOnError>,\n) =>\n  (options?.client ?? client).get<LogoutUserResponses, LogoutUserErrors, ThrowOnError, 'data'>({\n    responseStyle: 'data',\n    url: '/user/logout',\n    ...options,\n  });\n\n/**\n * Delete user resource.\n *\n * This can only be done by the logged in user.\n */\nexport const deleteUser = <ThrowOnError extends boolean = true>(\n  options: Options<DeleteUserData, ThrowOnError>,\n) =>\n  (options.client ?? client).delete<DeleteUserResponses, DeleteUserErrors, ThrowOnError, 'data'>({\n    responseStyle: 'data',\n    url: '/user/{username}',\n    ...options,\n  });\n\n/**\n * Get user by user name.\n *\n * Get user detail based on username.\n */\nexport const getUserByName = <ThrowOnError extends boolean = true>(\n  options: Options<GetUserByNameData, ThrowOnError>,\n) =>\n  (options.client ?? client).get<GetUserByNameResponses, GetUserByNameErrors, ThrowOnError, 'data'>(\n    {\n      responseStyle: 'data',\n      url: '/user/{username}',\n      ...options,\n    },\n  );\n\n/**\n * Update user resource.\n *\n * This can only be done by the logged in user.\n */\nexport const updateUser = <ThrowOnError extends boolean = true>(\n  options: Options<UpdateUserData, ThrowOnError>,\n) =>\n  (options.client ?? client).put<UpdateUserResponses, UpdateUserErrors, ThrowOnError, 'data'>({\n    responseStyle: 'data',\n    url: '/user/{username}',\n    ...options,\n    headers: {\n      'Content-Type': 'application/json',\n      ...options.headers,\n    },\n  });\n"
  },
  {
    "path": "examples/openapi-ts-angular-common/src/client/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type ClientOptions = {\n  baseUrl: 'https://petstore3.swagger.io/api/v3' | (string & {});\n};\n\nexport type Order = {\n  complete?: boolean;\n  id?: number;\n  petId?: number;\n  quantity?: number;\n  shipDate?: string;\n  /**\n   * Order Status\n   */\n  status?: 'placed' | 'approved' | 'delivered';\n};\n\nexport type Category = {\n  id?: number;\n  name?: string;\n};\n\nexport type User = {\n  email?: string;\n  firstName?: string;\n  id?: number;\n  lastName?: string;\n  password?: string;\n  phone?: string;\n  /**\n   * User Status\n   */\n  userStatus?: number;\n  username?: string;\n};\n\nexport type Tag = {\n  id?: number;\n  name?: string;\n};\n\nexport type Pet = {\n  category?: Category;\n  id?: number;\n  name: string;\n  photoUrls: Array<string>;\n  /**\n   * pet status in the store\n   */\n  status?: 'available' | 'pending' | 'sold';\n  tags?: Array<Tag>;\n};\n\nexport type ApiResponse = {\n  code?: number;\n  message?: string;\n  type?: string;\n};\n\nexport type Pet2 = Pet;\n\n/**\n * List of user object\n */\nexport type UserArray = Array<User>;\n\nexport type AddPetData = {\n  /**\n   * Create a new pet in the store\n   */\n  body: Pet;\n  path?: never;\n  query?: never;\n  url: '/pet';\n};\n\nexport type AddPetErrors = {\n  /**\n   * Invalid input\n   */\n  400: unknown;\n  /**\n   * Validation exception\n   */\n  422: unknown;\n  /**\n   * Unexpected error\n   */\n  default: unknown;\n};\n\nexport type AddPetResponses = {\n  /**\n   * Successful operation\n   */\n  200: Pet;\n};\n\nexport type AddPetResponse = AddPetResponses[keyof AddPetResponses];\n\nexport type UpdatePetData = {\n  /**\n   * Update an existent pet in the store\n   */\n  body: Pet;\n  path?: never;\n  query?: never;\n  url: '/pet';\n};\n\nexport type UpdatePetErrors = {\n  /**\n   * Invalid ID supplied\n   */\n  400: unknown;\n  /**\n   * Pet not found\n   */\n  404: unknown;\n  /**\n   * Validation exception\n   */\n  422: unknown;\n  /**\n   * Unexpected error\n   */\n  default: unknown;\n};\n\nexport type UpdatePetResponses = {\n  /**\n   * Successful operation\n   */\n  200: Pet;\n};\n\nexport type UpdatePetResponse = UpdatePetResponses[keyof UpdatePetResponses];\n\nexport type FindPetsByStatusData = {\n  body?: never;\n  path?: never;\n  query: {\n    /**\n     * Status values that need to be considered for filter\n     */\n    status: 'available' | 'pending' | 'sold';\n  };\n  url: '/pet/findByStatus';\n};\n\nexport type FindPetsByStatusErrors = {\n  /**\n   * Invalid status value\n   */\n  400: unknown;\n  /**\n   * Unexpected error\n   */\n  default: unknown;\n};\n\nexport type FindPetsByStatusResponses = {\n  /**\n   * successful operation\n   */\n  200: Array<Pet>;\n};\n\nexport type FindPetsByStatusResponse = FindPetsByStatusResponses[keyof FindPetsByStatusResponses];\n\nexport type FindPetsByTagsData = {\n  body?: never;\n  path?: never;\n  query: {\n    /**\n     * Tags to filter by\n     */\n    tags: Array<string>;\n  };\n  url: '/pet/findByTags';\n};\n\nexport type FindPetsByTagsErrors = {\n  /**\n   * Invalid tag value\n   */\n  400: unknown;\n  /**\n   * Unexpected error\n   */\n  default: unknown;\n};\n\nexport type FindPetsByTagsResponses = {\n  /**\n   * successful operation\n   */\n  200: Array<Pet>;\n};\n\nexport type FindPetsByTagsResponse = FindPetsByTagsResponses[keyof FindPetsByTagsResponses];\n\nexport type DeletePetData = {\n  body?: never;\n  headers?: {\n    api_key?: string;\n  };\n  path: {\n    /**\n     * Pet id to delete\n     */\n    petId: number;\n  };\n  query?: never;\n  url: '/pet/{petId}';\n};\n\nexport type DeletePetErrors = {\n  /**\n   * Invalid pet value\n   */\n  400: unknown;\n  /**\n   * Unexpected error\n   */\n  default: unknown;\n};\n\nexport type DeletePetResponses = {\n  /**\n   * Pet deleted\n   */\n  200: unknown;\n};\n\nexport type GetPetByIdData = {\n  body?: never;\n  path: {\n    /**\n     * ID of pet to return\n     */\n    petId: number;\n  };\n  query?: never;\n  url: '/pet/{petId}';\n};\n\nexport type GetPetByIdErrors = {\n  /**\n   * Invalid ID supplied\n   */\n  400: unknown;\n  /**\n   * Pet not found\n   */\n  404: unknown;\n  /**\n   * Unexpected error\n   */\n  default: unknown;\n};\n\nexport type GetPetByIdResponses = {\n  /**\n   * successful operation\n   */\n  200: Pet;\n};\n\nexport type GetPetByIdResponse = GetPetByIdResponses[keyof GetPetByIdResponses];\n\nexport type UpdatePetWithFormData = {\n  body?: never;\n  path: {\n    /**\n     * ID of pet that needs to be updated\n     */\n    petId: number;\n  };\n  query?: {\n    /**\n     * Name of pet that needs to be updated\n     */\n    name?: string;\n    /**\n     * Status of pet that needs to be updated\n     */\n    status?: string;\n  };\n  url: '/pet/{petId}';\n};\n\nexport type UpdatePetWithFormErrors = {\n  /**\n   * Invalid input\n   */\n  400: unknown;\n  /**\n   * Unexpected error\n   */\n  default: unknown;\n};\n\nexport type UpdatePetWithFormResponses = {\n  /**\n   * successful operation\n   */\n  200: Pet;\n};\n\nexport type UpdatePetWithFormResponse =\n  UpdatePetWithFormResponses[keyof UpdatePetWithFormResponses];\n\nexport type UploadFileData = {\n  body?: Blob | File;\n  path: {\n    /**\n     * ID of pet to update\n     */\n    petId: number;\n  };\n  query?: {\n    /**\n     * Additional Metadata\n     */\n    additionalMetadata?: string;\n  };\n  url: '/pet/{petId}/uploadImage';\n};\n\nexport type UploadFileErrors = {\n  /**\n   * No file uploaded\n   */\n  400: unknown;\n  /**\n   * Pet not found\n   */\n  404: unknown;\n  /**\n   * Unexpected error\n   */\n  default: unknown;\n};\n\nexport type UploadFileResponses = {\n  /**\n   * successful operation\n   */\n  200: ApiResponse;\n};\n\nexport type UploadFileResponse = UploadFileResponses[keyof UploadFileResponses];\n\nexport type GetInventoryData = {\n  body?: never;\n  path?: never;\n  query?: never;\n  url: '/store/inventory';\n};\n\nexport type GetInventoryErrors = {\n  /**\n   * Unexpected error\n   */\n  default: unknown;\n};\n\nexport type GetInventoryResponses = {\n  /**\n   * successful operation\n   */\n  200: {\n    [key: string]: number;\n  };\n};\n\nexport type GetInventoryResponse = GetInventoryResponses[keyof GetInventoryResponses];\n\nexport type PlaceOrderData = {\n  body?: Order;\n  path?: never;\n  query?: never;\n  url: '/store/order';\n};\n\nexport type PlaceOrderErrors = {\n  /**\n   * Invalid input\n   */\n  400: unknown;\n  /**\n   * Validation exception\n   */\n  422: unknown;\n  /**\n   * Unexpected error\n   */\n  default: unknown;\n};\n\nexport type PlaceOrderResponses = {\n  /**\n   * successful operation\n   */\n  200: Order;\n};\n\nexport type PlaceOrderResponse = PlaceOrderResponses[keyof PlaceOrderResponses];\n\nexport type DeleteOrderData = {\n  body?: never;\n  path: {\n    /**\n     * ID of the order that needs to be deleted\n     */\n    orderId: number;\n  };\n  query?: never;\n  url: '/store/order/{orderId}';\n};\n\nexport type DeleteOrderErrors = {\n  /**\n   * Invalid ID supplied\n   */\n  400: unknown;\n  /**\n   * Order not found\n   */\n  404: unknown;\n  /**\n   * Unexpected error\n   */\n  default: unknown;\n};\n\nexport type DeleteOrderResponses = {\n  /**\n   * order deleted\n   */\n  200: unknown;\n};\n\nexport type GetOrderByIdData = {\n  body?: never;\n  path: {\n    /**\n     * ID of order that needs to be fetched\n     */\n    orderId: number;\n  };\n  query?: never;\n  url: '/store/order/{orderId}';\n};\n\nexport type GetOrderByIdErrors = {\n  /**\n   * Invalid ID supplied\n   */\n  400: unknown;\n  /**\n   * Order not found\n   */\n  404: unknown;\n  /**\n   * Unexpected error\n   */\n  default: unknown;\n};\n\nexport type GetOrderByIdResponses = {\n  /**\n   * successful operation\n   */\n  200: Order;\n};\n\nexport type GetOrderByIdResponse = GetOrderByIdResponses[keyof GetOrderByIdResponses];\n\nexport type CreateUserData = {\n  /**\n   * Created user object\n   */\n  body?: User;\n  path?: never;\n  query?: never;\n  url: '/user';\n};\n\nexport type CreateUserErrors = {\n  /**\n   * Unexpected error\n   */\n  default: unknown;\n};\n\nexport type CreateUserResponses = {\n  /**\n   * successful operation\n   */\n  200: User;\n};\n\nexport type CreateUserResponse = CreateUserResponses[keyof CreateUserResponses];\n\nexport type CreateUsersWithListInputData = {\n  body?: Array<User>;\n  path?: never;\n  query?: never;\n  url: '/user/createWithList';\n};\n\nexport type CreateUsersWithListInputErrors = {\n  /**\n   * Unexpected error\n   */\n  default: unknown;\n};\n\nexport type CreateUsersWithListInputResponses = {\n  /**\n   * Successful operation\n   */\n  200: User;\n};\n\nexport type CreateUsersWithListInputResponse =\n  CreateUsersWithListInputResponses[keyof CreateUsersWithListInputResponses];\n\nexport type LoginUserData = {\n  body?: never;\n  path?: never;\n  query?: {\n    /**\n     * The password for login in clear text\n     */\n    password?: string;\n    /**\n     * The user name for login\n     */\n    username?: string;\n  };\n  url: '/user/login';\n};\n\nexport type LoginUserErrors = {\n  /**\n   * Invalid username/password supplied\n   */\n  400: unknown;\n  /**\n   * Unexpected error\n   */\n  default: unknown;\n};\n\nexport type LoginUserResponses = {\n  /**\n   * successful operation\n   */\n  200: string;\n};\n\nexport type LoginUserResponse = LoginUserResponses[keyof LoginUserResponses];\n\nexport type LogoutUserData = {\n  body?: never;\n  path?: never;\n  query?: never;\n  url: '/user/logout';\n};\n\nexport type LogoutUserErrors = {\n  /**\n   * Unexpected error\n   */\n  default: unknown;\n};\n\nexport type LogoutUserResponses = {\n  /**\n   * successful operation\n   */\n  200: unknown;\n};\n\nexport type DeleteUserData = {\n  body?: never;\n  path: {\n    /**\n     * The name that needs to be deleted\n     */\n    username: string;\n  };\n  query?: never;\n  url: '/user/{username}';\n};\n\nexport type DeleteUserErrors = {\n  /**\n   * Invalid username supplied\n   */\n  400: unknown;\n  /**\n   * User not found\n   */\n  404: unknown;\n  /**\n   * Unexpected error\n   */\n  default: unknown;\n};\n\nexport type DeleteUserResponses = {\n  /**\n   * User deleted\n   */\n  200: unknown;\n};\n\nexport type GetUserByNameData = {\n  body?: never;\n  path: {\n    /**\n     * The name that needs to be fetched. Use user1 for testing\n     */\n    username: string;\n  };\n  query?: never;\n  url: '/user/{username}';\n};\n\nexport type GetUserByNameErrors = {\n  /**\n   * Invalid username supplied\n   */\n  400: unknown;\n  /**\n   * User not found\n   */\n  404: unknown;\n  /**\n   * Unexpected error\n   */\n  default: unknown;\n};\n\nexport type GetUserByNameResponses = {\n  /**\n   * successful operation\n   */\n  200: User;\n};\n\nexport type GetUserByNameResponse = GetUserByNameResponses[keyof GetUserByNameResponses];\n\nexport type UpdateUserData = {\n  /**\n   * Update an existent user in the store\n   */\n  body?: User;\n  path: {\n    /**\n     * name that need to be deleted\n     */\n    username: string;\n  };\n  query?: never;\n  url: '/user/{username}';\n};\n\nexport type UpdateUserErrors = {\n  /**\n   * bad request\n   */\n  400: unknown;\n  /**\n   * user not found\n   */\n  404: unknown;\n  /**\n   * Unexpected error\n   */\n  default: unknown;\n};\n\nexport type UpdateUserResponses = {\n  /**\n   * successful operation\n   */\n  200: unknown;\n};\n"
  },
  {
    "path": "examples/openapi-ts-angular-common/src/index.html",
    "content": "<!doctype html>\n<html lang=\"en\">\n  <head>\n    <meta charset=\"utf-8\" />\n    <title>Hey API + Angular Demo</title>\n    <base href=\"/\" />\n    <meta name=\"viewport\" content=\"width=device-width, initial-scale=1\" />\n    <link rel=\"icon\" type=\"image/x-icon\" href=\"favicon.ico\" />\n  </head>\n  <body>\n    <app-root></app-root>\n  </body>\n</html>\n"
  },
  {
    "path": "examples/openapi-ts-angular-common/src/main.server.ts",
    "content": "import { bootstrapApplication } from '@angular/platform-browser';\n\nimport { AppComponent } from './app/app.component';\nimport { config } from './app/app.config.server';\n\nconst bootstrap = () => bootstrapApplication(AppComponent, config);\n\nexport default bootstrap;\n"
  },
  {
    "path": "examples/openapi-ts-angular-common/src/main.ts",
    "content": "import { bootstrapApplication } from '@angular/platform-browser';\n\nimport { AppComponent } from './app/app.component';\nimport { appConfig } from './app/app.config';\n\nbootstrapApplication(AppComponent, appConfig).catch((err) => console.error(err));\n"
  },
  {
    "path": "examples/openapi-ts-angular-common/src/server.ts",
    "content": "import { dirname, resolve } from 'node:path';\nimport { fileURLToPath } from 'node:url';\n\nimport {\n  AngularNodeAppEngine,\n  createNodeRequestHandler,\n  isMainModule,\n  writeResponseToNodeResponse,\n} from '@angular/ssr/node';\nimport express from 'express';\n\nconst serverDistFolder = dirname(fileURLToPath(import.meta.url));\nconst browserDistFolder = resolve(serverDistFolder, '../browser');\n\nconst app = express();\nconst angularApp = new AngularNodeAppEngine();\n\n/**\n * Example Express Rest API endpoints can be defined here.\n * Uncomment and define endpoints as necessary.\n *\n * Example:\n * ```ts\n * app.get('/api/**', (req, res) => {\n *   // Handle API request\n * });\n * ```\n */\n\n/**\n * Serve static files from /browser\n */\napp.use(\n  express.static(browserDistFolder, {\n    index: false,\n    maxAge: '1y',\n    redirect: false,\n  }),\n);\n\n/**\n * Handle all other requests by rendering the Angular application.\n */\napp.use('/**', (req, res, next) => {\n  angularApp\n    .handle(req)\n    .then((response) => (response ? writeResponseToNodeResponse(response, res) : next()))\n    .catch(next);\n});\n\n/**\n * Start the server if this module is the main entry point.\n * The server listens on the port defined by the `PORT` environment variable, or defaults to 4000.\n */\nif (isMainModule(import.meta.url)) {\n  const port = process.env['PORT'] || 4000;\n  app.listen(port, () => {\n    console.log(`Node Express server listening on http://localhost:${port}`);\n  });\n}\n\n/**\n * Request handler used by the Angular CLI (for dev-server and during build) or Firebase Cloud Functions.\n */\nexport const reqHandler = createNodeRequestHandler(app);\n"
  },
  {
    "path": "examples/openapi-ts-angular-common/src/styles.css",
    "content": "/* You can add global styles to this file, and also import other style files */\n"
  },
  {
    "path": "examples/openapi-ts-angular-common/tsconfig.app.json",
    "content": "/* To learn more about Typescript configuration file: https://www.typescriptlang.org/docs/handbook/tsconfig-json.html. */\n/* To learn more about Angular compiler options: https://angular.dev/reference/configs/angular-compiler-options. */\n{\n  \"extends\": \"./tsconfig.json\",\n  \"compilerOptions\": {\n    \"outDir\": \"./out-tsc/app\",\n    \"types\": [\"node\"]\n  },\n  \"files\": [\"src/main.ts\", \"src/main.server.ts\", \"src/server.ts\"],\n  \"include\": [\"src/**/*.d.ts\"]\n}\n"
  },
  {
    "path": "examples/openapi-ts-angular-common/tsconfig.json",
    "content": "/* To learn more about Typescript configuration file: https://www.typescriptlang.org/docs/handbook/tsconfig-json.html. */\n/* To learn more about Angular compiler options: https://angular.dev/reference/configs/angular-compiler-options. */\n{\n  \"compileOnSave\": false,\n  \"compilerOptions\": {\n    \"outDir\": \"./dist/out-tsc\",\n    \"strict\": true,\n    \"noImplicitOverride\": true,\n    \"noPropertyAccessFromIndexSignature\": true,\n    \"noImplicitReturns\": true,\n    \"noFallthroughCasesInSwitch\": true,\n    \"skipLibCheck\": true,\n    \"isolatedModules\": true,\n    \"esModuleInterop\": true,\n    \"experimentalDecorators\": true,\n    \"moduleResolution\": \"bundler\",\n    \"importHelpers\": true,\n    \"target\": \"ES2022\",\n    \"module\": \"ES2022\"\n  },\n  \"angularCompilerOptions\": {\n    \"enableI18nLegacyMessageIdFormat\": false,\n    \"strictInjectionParameters\": true,\n    \"strictInputAccessModifiers\": true,\n    \"strictTemplates\": true\n  }\n}\n"
  },
  {
    "path": "examples/openapi-ts-angular-common/tsconfig.spec.json",
    "content": "/* To learn more about Typescript configuration file: https://www.typescriptlang.org/docs/handbook/tsconfig-json.html. */\n/* To learn more about Angular compiler options: https://angular.dev/reference/configs/angular-compiler-options. */\n{\n  \"extends\": \"./tsconfig.json\",\n  \"compilerOptions\": {\n    \"outDir\": \"./out-tsc/spec\",\n    \"types\": [\"jasmine\"]\n  },\n  \"include\": [\"src/**/*.spec.ts\", \"src/**/*.d.ts\"]\n}\n"
  },
  {
    "path": "examples/openapi-ts-axios/.gitignore",
    "content": "# Logs\nlogs\n*.log\nnpm-debug.log*\nyarn-debug.log*\nyarn-error.log*\npnpm-debug.log*\nlerna-debug.log*\n\nnode_modules\ndist\ndist-ssr\n*.local\n\n# Editor directories and files\n.vscode/*\n!.vscode/extensions.json\n.idea\n.DS_Store\n*.suo\n*.ntvs*\n*.njsproj\n*.sln\n*.sw?\n"
  },
  {
    "path": "examples/openapi-ts-axios/CHANGELOG.md",
    "content": "# @example/openapi-ts-axios\n\n## 0.0.35\n\n### Patch Changes\n\n- Updated dependencies [[`f23f3ae`](https://github.com/hey-api/openapi-ts/commit/f23f3ae874385e758eb8d43bb4e274c9858a4e40)]:\n  - @hey-api/client-axios@0.9.1\n\n## 0.0.34\n\n### Patch Changes\n\n- Updated dependencies [[`10d2e03`](https://github.com/hey-api/openapi-ts/commit/10d2e03b8295e4e887fab8d023aa823699efbae8)]:\n  - @hey-api/client-axios@0.9.0\n\n## 0.0.33\n\n### Patch Changes\n\n- Updated dependencies [[`8152aaf`](https://github.com/hey-api/openapi-ts/commit/8152aaf4892c48b79fd3dc486eb3c0ea333dc3e6)]:\n  - @hey-api/client-axios@0.8.0\n\n## 0.0.32\n\n### Patch Changes\n\n- Updated dependencies [[`565e0b8`](https://github.com/hey-api/openapi-ts/commit/565e0b89fbab4556ecdc63dfe08250942681140e)]:\n  - @hey-api/client-axios@0.7.1\n\n## 0.0.31\n\n### Patch Changes\n\n- Updated dependencies [[`67c385b`](https://github.com/hey-api/openapi-ts/commit/67c385bf6289a79726b0cdd85fd81ca501cf2248)]:\n  - @hey-api/client-axios@0.7.0\n\n## 0.0.30\n\n### Patch Changes\n\n- Updated dependencies [[`fe43b88`](https://github.com/hey-api/openapi-ts/commit/fe43b889c20a2001f56e259f93f64851a1caa1d1)]:\n  - @hey-api/client-axios@0.6.3\n\n## 0.0.29\n\n### Patch Changes\n\n- Updated dependencies [[`c0b36b9`](https://github.com/hey-api/openapi-ts/commit/c0b36b95645d484034c3af145c5554867568979b)]:\n  - @hey-api/client-axios@0.6.2\n\n## 0.0.28\n\n### Patch Changes\n\n- Updated dependencies [[`7f0f4a7`](https://github.com/hey-api/openapi-ts/commit/7f0f4a76b06c8fafb33581b522faf8efc6fd85ac)]:\n  - @hey-api/client-axios@0.6.1\n\n## 0.0.27\n\n### Patch Changes\n\n- Updated dependencies [[`bb6d46a`](https://github.com/hey-api/openapi-ts/commit/bb6d46ae119ce4e7e3a2ab3fded74ac4fb4cdff2)]:\n  - @hey-api/client-axios@0.6.0\n\n## 0.0.26\n\n### Patch Changes\n\n- Updated dependencies [[`2dc380e`](https://github.com/hey-api/openapi-ts/commit/2dc380eabc17c723654beb04ecd7bce6d33d3b49), [`603541e`](https://github.com/hey-api/openapi-ts/commit/603541e307dc2953da7dddd300176865629b50bb), [`2cbffeb`](https://github.com/hey-api/openapi-ts/commit/2cbffeb2cdd6c6143cd68cac68369584879dda31), [`2cbffeb`](https://github.com/hey-api/openapi-ts/commit/2cbffeb2cdd6c6143cd68cac68369584879dda31)]:\n  - @hey-api/client-axios@0.5.3\n\n## 0.0.25\n\n### Patch Changes\n\n- Updated dependencies [[`8eba19d`](https://github.com/hey-api/openapi-ts/commit/8eba19d4092fc0903572ab9fdadf0b4c26928ba2)]:\n  - @hey-api/client-axios@0.5.2\n\n## 0.0.24\n\n### Patch Changes\n\n- Updated dependencies [[`0432418`](https://github.com/hey-api/openapi-ts/commit/0432418d72c94ef94865f8216ed2f723ad5191f9), [`4784727`](https://github.com/hey-api/openapi-ts/commit/47847276e8bc854045044dd414382080270dd779)]:\n  - @hey-api/client-axios@0.5.1\n\n## 0.0.23\n\n### Patch Changes\n\n- Updated dependencies [[`465410c`](https://github.com/hey-api/openapi-ts/commit/465410c201eb19e737e3143ad53a146e95f80107)]:\n  - @hey-api/client-axios@0.5.0\n\n## 0.0.22\n\n### Patch Changes\n\n- Updated dependencies []:\n  - @hey-api/client-axios@0.4.0\n\n## 0.0.21\n\n### Patch Changes\n\n- Updated dependencies [[`20d7497`](https://github.com/hey-api/openapi-ts/commit/20d7497acb6c046f6a4206c2d8137414e17b2263), [`f86d293`](https://github.com/hey-api/openapi-ts/commit/f86d293f18f133ef6dd2f4864d037611b81edd26), [`458ef50`](https://github.com/hey-api/openapi-ts/commit/458ef500a18127a618dd1e14e14e20014027e77d)]:\n  - @hey-api/client-axios@0.3.4\n\n## 0.0.20\n\n### Patch Changes\n\n- Updated dependencies [[`ba56424`](https://github.com/hey-api/openapi-ts/commit/ba5642486cdd5461c2372c34b63019c02bc6874e)]:\n  - @hey-api/client-axios@0.3.3\n\n## 0.0.19\n\n### Patch Changes\n\n- Updated dependencies [[`9cec9e8`](https://github.com/hey-api/openapi-ts/commit/9cec9e8582c12a8c041b922d9587e16f6f19782a)]:\n  - @hey-api/client-axios@0.3.2\n\n## 0.0.18\n\n### Patch Changes\n\n- Updated dependencies [[`cbf4e84`](https://github.com/hey-api/openapi-ts/commit/cbf4e84db7f3a47f19d8c3eaa87c71b27912c1a2)]:\n  - @hey-api/client-axios@0.3.1\n\n## 0.0.17\n\n### Patch Changes\n\n- Updated dependencies [[`8010dbb`](https://github.com/hey-api/openapi-ts/commit/8010dbb1ab8b91d1d49d5cf16276183764a63ff3), [`8010dbb`](https://github.com/hey-api/openapi-ts/commit/8010dbb1ab8b91d1d49d5cf16276183764a63ff3), [`646064d`](https://github.com/hey-api/openapi-ts/commit/646064d1aecea988d2b4df73bd24b2ee83394ae0)]:\n  - @hey-api/client-axios@0.3.0\n\n## 0.0.16\n\n### Patch Changes\n\n- Updated dependencies [[`ec48d32`](https://github.com/hey-api/openapi-ts/commit/ec48d323d80de8e6a47ce7ecd732288f0a47e17a)]:\n  - @hey-api/client-axios@0.2.12\n\n## 0.0.15\n\n### Patch Changes\n\n- Updated dependencies [[`734a62d`](https://github.com/hey-api/openapi-ts/commit/734a62dd8d594b8266964fe16766a481d37eb7df)]:\n  - @hey-api/client-axios@0.2.11\n\n## 0.0.14\n\n### Patch Changes\n\n- Updated dependencies [[`01dee3d`](https://github.com/hey-api/openapi-ts/commit/01dee3df879232939e43355231147b3d910fb482)]:\n  - @hey-api/client-axios@0.2.10\n\n## 0.0.13\n\n### Patch Changes\n\n- [#1151](https://github.com/hey-api/openapi-ts/pull/1151) [`587791d`](https://github.com/hey-api/openapi-ts/commit/587791dfede0167fbed229281467e4c4875936f5) Thanks [@mrlubos](https://github.com/mrlubos)! - fix: update website domain, add license documentation\n\n- Updated dependencies [[`587791d`](https://github.com/hey-api/openapi-ts/commit/587791dfede0167fbed229281467e4c4875936f5)]:\n  - @hey-api/client-axios@0.2.9\n\n## 0.0.12\n\n### Patch Changes\n\n- Updated dependencies [[`a0a5551`](https://github.com/hey-api/openapi-ts/commit/a0a55510d30a1a8dea0ade4908b5b13d51b5f9e6)]:\n  - @hey-api/client-axios@0.2.8\n\n## 0.0.11\n\n### Patch Changes\n\n- Updated dependencies [[`7f986c2`](https://github.com/hey-api/openapi-ts/commit/7f986c2c7726ed8fbf16f8b235b7769c7d990502)]:\n  - @hey-api/client-axios@0.2.7\n\n## 0.0.10\n\n### Patch Changes\n\n- Updated dependencies [[`fe743c2`](https://github.com/hey-api/openapi-ts/commit/fe743c2d41c23bf7e1706bceedd6319299131197)]:\n  - @hey-api/client-axios@0.2.6\n\n## 0.0.9\n\n### Patch Changes\n\n- Updated dependencies [[`11a276a`](https://github.com/hey-api/openapi-ts/commit/11a276a1e35dde0735363e892d8142016fd87eec)]:\n  - @hey-api/client-axios@0.2.5\n\n## 0.0.8\n\n### Patch Changes\n\n- Updated dependencies [[`7ae2b1d`](https://github.com/hey-api/openapi-ts/commit/7ae2b1db047f3b6efe917a8b43ac7c851fb86c8f), [`2079c6e`](https://github.com/hey-api/openapi-ts/commit/2079c6e83a6b71e157c8e7ea56260b4e9ff8411d)]:\n  - @hey-api/client-axios@0.2.4\n\n## 0.0.7\n\n### Patch Changes\n\n- Updated dependencies [[`7825a2f`](https://github.com/hey-api/openapi-ts/commit/7825a2fba566a76c63775172ef0569ef375406b6)]:\n  - @hey-api/client-axios@0.2.3\n\n## 0.0.6\n\n### Patch Changes\n\n- [#895](https://github.com/hey-api/openapi-ts/pull/895) [`44de8d8`](https://github.com/hey-api/openapi-ts/commit/44de8d89556b3abf48acc4e23c9b9c198059c757) Thanks [@mrlubos](https://github.com/mrlubos)! - fix: define ThrowOnError generic as the last argument\n\n- Updated dependencies [[`44de8d8`](https://github.com/hey-api/openapi-ts/commit/44de8d89556b3abf48acc4e23c9b9c198059c757)]:\n  - @hey-api/client-axios@0.2.2\n\n## 0.0.5\n\n### Patch Changes\n\n- Updated dependencies [[`ec6bfc8`](https://github.com/hey-api/openapi-ts/commit/ec6bfc8292cce7663dfc6e0fcd89b44c56f08bb4), [`a73da1c`](https://github.com/hey-api/openapi-ts/commit/a73da1c854503246b6c58f1abea5dd77727eedca)]:\n  - @hey-api/client-axios@0.2.1\n\n## 0.0.4\n\n### Patch Changes\n\n- Updated dependencies [[`babf11a`](https://github.com/hey-api/openapi-ts/commit/babf11ae082af642ac71cfee9c523cc976132a50), [`babf11a`](https://github.com/hey-api/openapi-ts/commit/babf11ae082af642ac71cfee9c523cc976132a50)]:\n  - @hey-api/client-axios@0.2.0\n\n## 0.0.3\n\n### Patch Changes\n\n- [#823](https://github.com/hey-api/openapi-ts/pull/823) [`23c9dcd`](https://github.com/hey-api/openapi-ts/commit/23c9dcd5de19de62d745cc539674c815b2588cd2) Thanks [@mrlubos](https://github.com/mrlubos)! - fix: correctly process body parameter for OpenAPI 2.0 specs\n\n## 0.0.2\n\n### Patch Changes\n\n- Updated dependencies [[`f8e0b7b`](https://github.com/hey-api/openapi-ts/commit/f8e0b7b7ab5cbd673ca13a21fd1180194558c7f5)]:\n  - @hey-api/client-axios@0.1.1\n\n## 0.0.1\n\n### Patch Changes\n\n- Updated dependencies [[`b3786dc`](https://github.com/hey-api/openapi-ts/commit/b3786dc6749d8d4ae26bb63322e124663f881741)]:\n  - @hey-api/client-axios@0.1.0\n"
  },
  {
    "path": "examples/openapi-ts-axios/index.html",
    "content": "<!doctype html>\n<html lang=\"en\">\n  <head>\n    <meta charset=\"UTF-8\" />\n    <!-- <link rel=\"icon\" type=\"image/svg+xml\" href=\"/vite.svg\" /> -->\n    <meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\" />\n    <title>Hey API + Axios Demo</title>\n  </head>\n  <body>\n    <div id=\"root\"></div>\n    <script type=\"module\" src=\"/src/main.tsx\"></script>\n  </body>\n</html>\n"
  },
  {
    "path": "examples/openapi-ts-axios/openapi-ts.config.ts",
    "content": "import { defineConfig } from '@hey-api/openapi-ts';\n\nexport default defineConfig({\n  input:\n    'https://raw.githubusercontent.com/swagger-api/swagger-petstore/master/src/main/resources/openapi.yaml',\n  logs: {\n    path: './logs',\n  },\n  output: {\n    path: './src/client',\n    postProcess: ['oxfmt', 'eslint'],\n  },\n  plugins: [\n    '@hey-api/client-axios',\n    '@hey-api/schemas',\n    '@hey-api/sdk',\n    {\n      enums: 'javascript',\n      name: '@hey-api/typescript',\n    },\n  ],\n});\n"
  },
  {
    "path": "examples/openapi-ts-axios/package.json",
    "content": "{\n  \"name\": \"@example/openapi-ts-axios\",\n  \"version\": \"0.0.35\",\n  \"private\": true,\n  \"type\": \"module\",\n  \"scripts\": {\n    \"build\": \"tsgo --noEmit && vite build\",\n    \"dev\": \"vite\",\n    \"lint\": \"eslint . --report-unused-disable-directives --max-warnings 0\",\n    \"openapi-ts\": \"openapi-ts\",\n    \"preview\": \"vite preview\",\n    \"typecheck\": \"tsgo --noEmit\"\n  },\n  \"dependencies\": {\n    \"@radix-ui/react-form\": \"0.1.1\",\n    \"@radix-ui/react-icons\": \"1.3.2\",\n    \"@radix-ui/themes\": \"3.1.6\",\n    \"axios\": \"1.8.2\",\n    \"react\": \"19.0.0\",\n    \"react-dom\": \"19.0.0\"\n  },\n  \"devDependencies\": {\n    \"@hey-api/openapi-ts\": \"workspace:*\",\n    \"@types/react\": \"19.0.1\",\n    \"@types/react-dom\": \"19.0.1\",\n    \"@typescript-eslint/eslint-plugin\": \"8.29.1\",\n    \"@typescript-eslint/parser\": \"8.29.1\",\n    \"@vitejs/plugin-react\": \"4.4.0-beta.1\",\n    \"autoprefixer\": \"10.4.19\",\n    \"eslint\": \"9.17.0\",\n    \"eslint-plugin-react-hooks\": \"5.2.0\",\n    \"eslint-plugin-react-refresh\": \"0.4.7\",\n    \"oxfmt\": \"0.27.0\",\n    \"postcss\": \"8.4.41\",\n    \"tailwindcss\": \"3.4.9\",\n    \"typescript\": \"5.9.3\",\n    \"vite\": \"7.3.1\"\n  }\n}\n"
  },
  {
    "path": "examples/openapi-ts-axios/postcss.config.js",
    "content": "export default {\n  plugins: {\n    autoprefixer: {},\n    tailwindcss: {},\n  },\n};\n"
  },
  {
    "path": "examples/openapi-ts-axios/src/App.css",
    "content": "@tailwind base;\n@tailwind components;\n@tailwind utilities;\n"
  },
  {
    "path": "examples/openapi-ts-axios/src/App.tsx",
    "content": "import './App.css';\n\nimport * as Form from '@radix-ui/react-form';\nimport { DownloadIcon, PlusIcon, ReloadIcon } from '@radix-ui/react-icons';\nimport {\n  Avatar,\n  Box,\n  Button,\n  Card,\n  Container,\n  Flex,\n  Heading,\n  Section,\n  Text,\n  TextField,\n} from '@radix-ui/themes';\nimport { useState } from 'react';\n\nimport { createClient } from './client/client';\nimport { PetSchema } from './client/schemas.gen';\nimport { addPet, getPetById, updatePet } from './client/sdk.gen';\nimport type { Pet } from './client/types.gen';\n\nconst localClient = createClient({\n  // set default base url for requests made by this client\n  baseURL: 'https://petstore3.swagger.io/api/v3',\n  /**\n   * Set default headers only for requests made by this client. This is to\n   * demonstrate local clients and their configuration taking precedence over\n   * global configuration.\n   */\n  headers: {\n    Authorization: 'Bearer <token_from_local_client>',\n  },\n});\n\nlocalClient.instance.interceptors.request.use((config) => {\n  // Middleware is great for adding authorization tokens to requests made to\n  // protected paths. Headers are set randomly here to allow surfacing the\n  // default headers, too.\n  if (config.url?.startsWith('/pet/') && config.method === 'get' && Math.random() < 0.5) {\n    config.headers.set('Authorization', 'Bearer <token_from_interceptor>');\n  }\n  return config;\n});\n\nfunction App() {\n  const [pet, setPet] = useState<Pet>();\n  const [isRequiredNameError, setIsRequiredNameError] = useState(false);\n\n  const onAddPet = async (formData: FormData) => {\n    // simple form field validation to demonstrate using schemas\n    if (PetSchema.required.includes('name') && !formData.get('name')) {\n      setIsRequiredNameError(true);\n      return;\n    }\n\n    const { data, error } = await addPet({\n      body: {\n        category: {\n          id: 0,\n          name: formData.get('category') as string,\n        },\n        id: 0,\n        name: formData.get('name') as string,\n        photoUrls: ['string'],\n        status: 'available',\n        tags: [\n          {\n            id: 0,\n            name: 'string',\n          },\n        ],\n      },\n    });\n    if (error) {\n      console.log(error);\n      return;\n    }\n    setPet(data!);\n    setIsRequiredNameError(false);\n  };\n\n  const onGetPetById = async () => {\n    const { data, error } = await getPetById({\n      client: localClient,\n      path: {\n        // random id 1-10\n        petId: Math.floor(Math.random() * (10 - 1 + 1) + 1),\n      },\n    });\n    if (error) {\n      console.log(error);\n      return;\n    }\n    setPet(data!);\n  };\n\n  const onUpdatePet = async () => {\n    const { data, error } = await updatePet({\n      body: {\n        category: {\n          id: 0,\n          name: 'Cats',\n        },\n        id: 2,\n        name: 'Updated Kitty',\n        photoUrls: ['string'],\n        status: 'available',\n        tags: [\n          {\n            id: 0,\n            name: 'string',\n          },\n        ],\n      },\n      // setting headers per request\n      headers: {\n        Authorization: 'Bearer <token_from_method>',\n      },\n    });\n    if (error) {\n      console.log(error);\n      return;\n    }\n    setPet(data!);\n  };\n\n  return (\n    <Box style={{ background: 'var(--gray-a2)', borderRadius: 'var(--radius-3)' }}>\n      <Container size=\"1\">\n        <Section size=\"1\" />\n        <Flex align=\"center\">\n          <a className=\"shrink-0\" href=\"https://heyapi.dev/\" target=\"_blank\">\n            <img\n              src=\"https://heyapi.dev/assets/raw/logo.png\"\n              className=\"h-16 w-16 transition duration-300 will-change-auto\"\n              alt=\"Hey API logo\"\n            />\n          </a>\n          <Heading>@hey-api/openapi-ts 🤝 Axios</Heading>\n        </Flex>\n        <Section size=\"1\" />\n        <Flex direction=\"column\" gapY=\"2\">\n          <Box maxWidth=\"240px\">\n            <Card>\n              <Flex gap=\"3\" align=\"center\">\n                <Avatar\n                  size=\"3\"\n                  src={pet?.photoUrls[0]}\n                  radius=\"full\"\n                  fallback={pet?.name.slice(0, 1) ?? 'N'}\n                />\n                <Box>\n                  <Text as=\"div\" size=\"2\" weight=\"bold\">\n                    Name: {pet?.name ?? 'N/A'}\n                  </Text>\n                  <Text as=\"div\" size=\"2\" color=\"gray\">\n                    Category: {pet?.category?.name ?? 'N/A'}\n                  </Text>\n                </Box>\n              </Flex>\n            </Card>\n          </Box>\n          <Button onClick={onGetPetById}>\n            <DownloadIcon /> Get Random Pet\n          </Button>\n        </Flex>\n        <Section size=\"1\" />\n        <Flex direction=\"column\" gapY=\"2\">\n          <Form.Root\n            className=\"w-[260px]\"\n            onSubmit={(event) => {\n              event.preventDefault();\n              onAddPet(new FormData(event.currentTarget));\n            }}\n          >\n            <Form.Field className=\"grid mb-[10px]\" name=\"email\">\n              <div className=\"flex items-baseline justify-between\">\n                <Form.Label className=\"text-[15px] font-medium leading-[35px] text-white\">\n                  Name\n                </Form.Label>\n                {isRequiredNameError && (\n                  <Form.Message className=\"text-[13px] text-white opacity-[0.8]\">\n                    Please enter a name\n                  </Form.Message>\n                )}\n              </div>\n              <Form.Control asChild>\n                <TextField.Root placeholder=\"Kitty\" name=\"name\" type=\"text\" />\n              </Form.Control>\n            </Form.Field>\n            <Form.Field className=\"grid mb-[10px]\" name=\"question\">\n              <div className=\"flex items-baseline justify-between\">\n                <Form.Label className=\"text-[15px] font-medium leading-[35px] text-white\">\n                  Category\n                </Form.Label>\n                <Form.Message className=\"text-[13px] text-white opacity-[0.8]\" match=\"valueMissing\">\n                  Please enter a category\n                </Form.Message>\n              </div>\n              <Form.Control asChild>\n                <TextField.Root placeholder=\"Cats\" name=\"category\" type=\"text\" required />\n              </Form.Control>\n            </Form.Field>\n            <Flex gapX=\"2\">\n              <Form.Submit asChild>\n                <Button type=\"submit\">\n                  <PlusIcon /> Add Pet\n                </Button>\n              </Form.Submit>\n              <Button onClick={onUpdatePet} type=\"button\">\n                <ReloadIcon /> Update Pet\n              </Button>\n            </Flex>\n          </Form.Root>\n        </Flex>\n        <Section size=\"1\" />\n      </Container>\n    </Box>\n  );\n}\n\nexport default App;\n"
  },
  {
    "path": "examples/openapi-ts-axios/src/client/client/client.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { AxiosError, AxiosInstance, RawAxiosRequestHeaders } from 'axios';\nimport axios from 'axios';\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 } from './types.gen';\nimport { buildUrl, createConfig, mergeConfigs, mergeHeaders, setAuthParams } from './utils.gen';\n\nexport const createClient = (config: Config = {}): Client => {\n  let _config = mergeConfigs(createConfig(), config);\n\n  let instance: AxiosInstance;\n\n  if (_config.axios && !('Axios' in _config.axios)) {\n    instance = _config.axios;\n  } else {\n    // eslint-disable-next-line @typescript-eslint/no-unused-vars\n    const { auth, ...configWithoutAuth } = _config;\n    instance = axios.create(configWithoutAuth);\n  }\n\n  const getConfig = (): Config => ({ ..._config });\n\n  const setConfig = (config: Config): Config => {\n    _config = mergeConfigs(_config, config);\n    instance.defaults = {\n      ...instance.defaults,\n      ..._config,\n      // @ts-expect-error\n      headers: mergeHeaders(instance.defaults.headers, _config.headers),\n    };\n    return getConfig();\n  };\n\n  const beforeRequest = async (options: RequestOptions) => {\n    const opts = {\n      ..._config,\n      ...options,\n      axios: options.axios ?? _config.axios ?? instance,\n      headers: mergeHeaders(_config.headers, options.headers),\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.body = opts.bodySerializer(opts.body);\n    }\n\n    const url = buildUrl(opts);\n\n    return { opts, url };\n  };\n\n  // @ts-expect-error\n  const request: Client['request'] = async (options) => {\n    // @ts-expect-error\n    const { opts, url } = await beforeRequest(options);\n    try {\n      // assign Axios here for consistency with fetch\n      const _axios = opts.axios!;\n      // eslint-disable-next-line @typescript-eslint/no-unused-vars\n      const { auth, ...optsWithoutAuth } = opts;\n      const response = await _axios({\n        ...optsWithoutAuth,\n        baseURL: '', // the baseURL is already included in `url`\n        data: getValidRequestBody(opts),\n        headers: opts.headers as RawAxiosRequestHeaders,\n        // let `paramsSerializer()` handle query params if it exists\n        params: opts.paramsSerializer ? opts.query : undefined,\n        url,\n      });\n\n      let { data } = response;\n\n      if (opts.responseType === '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 {\n        ...response,\n        data: data ?? {},\n      };\n    } catch (error) {\n      const e = error as AxiosError;\n      if (opts.throwOnError) {\n        throw e;\n      }\n      // @ts-expect-error\n      e.error = e.response?.data ?? {};\n      return e;\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 Record<string, string>,\n      method,\n      serializedBody: getValidRequestBody(opts) as BodyInit | null | undefined,\n      // @ts-expect-error\n      signal: opts.signal,\n      url,\n    });\n  };\n\n  const _buildUrl: Client['buildUrl'] = (options) =>\n    buildUrl({ axios: instance, ..._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    instance,\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"
  },
  {
    "path": "examples/openapi-ts-axios/src/client/client/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type { Auth } from '../core/auth.gen';\nexport type { QuerySerializerOptions } from '../core/bodySerializer.gen';\nexport {\n  formDataBodySerializer,\n  jsonBodySerializer,\n  urlSearchParamsBodySerializer,\n} from '../core/bodySerializer.gen';\nexport { buildClientParams } from '../core/params.gen';\nexport { serializeQueryKeyValue } from '../core/queryKeySerializer.gen';\nexport { createClient } from './client.gen';\nexport type {\n  Client,\n  ClientOptions,\n  Config,\n  CreateClientConfig,\n  Options,\n  RequestOptions,\n  RequestResult,\n  TDataShape,\n} from './types.gen';\nexport { createConfig } from './utils.gen';\n"
  },
  {
    "path": "examples/openapi-ts-axios/src/client/client/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type {\n  AxiosError,\n  AxiosInstance,\n  AxiosRequestHeaders,\n  AxiosResponse,\n  AxiosStatic,\n  CreateAxiosDefaults,\n} from 'axios';\n\nimport type { Auth } from '../core/auth.gen';\nimport type { ServerSentEventsOptions, ServerSentEventsResult } from '../core/serverSentEvents.gen';\nimport type { Client as CoreClient, Config as CoreConfig } from '../core/types.gen';\n\nexport interface Config<T extends ClientOptions = ClientOptions>\n  extends Omit<CreateAxiosDefaults, 'auth' | 'baseURL' | 'headers' | 'method'>, CoreConfig {\n  /**\n   * Axios implementation. You can use this option to provide either an\n   * `AxiosStatic` or an `AxiosInstance`.\n   *\n   * @default axios\n   */\n  axios?: AxiosStatic | AxiosInstance;\n  /**\n   * Base URL for all requests made by this client.\n   */\n  baseURL?: T['baseURL'];\n  /**\n   * An object containing any HTTP headers that you want to pre-populate your\n   * `Headers` object with.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/Headers/Headers#init See more}\n   */\n  headers?:\n    | AxiosRequestHeaders\n    | Record<\n        string,\n        string | number | boolean | (string | number | boolean)[] | null | undefined | unknown\n      >;\n  /**\n   * Throw an error instead of returning it in the response?\n   *\n   * @default false\n   */\n  throwOnError?: T['throwOnError'];\n}\n\nexport interface RequestOptions<\n  TData = unknown,\n  ThrowOnError extends boolean = boolean,\n  Url extends string = string,\n>\n  extends\n    Config<{\n      throwOnError: ThrowOnError;\n    }>,\n    Pick<\n      ServerSentEventsOptions<TData>,\n      | 'onRequest'\n      | 'onSseError'\n      | 'onSseEvent'\n      | 'sseDefaultRetryDelay'\n      | 'sseMaxRetryAttempts'\n      | 'sseMaxRetryDelay'\n    > {\n  /**\n   * Any body that you want to add to your request.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/fetch#body}\n   */\n  body?: unknown;\n  path?: Record<string, unknown>;\n  query?: Record<string, unknown>;\n  /**\n   * Security mechanism(s) to use for the request.\n   */\n  security?: ReadonlyArray<Auth>;\n  url: Url;\n}\n\nexport interface ClientOptions {\n  baseURL?: string;\n  throwOnError?: boolean;\n}\n\nexport type RequestResult<\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = boolean,\n> = ThrowOnError extends true\n  ? Promise<AxiosResponse<TData extends Record<string, unknown> ? TData[keyof TData] : TData>>\n  : Promise<\n      | (AxiosResponse<TData extends Record<string, unknown> ? TData[keyof TData] : TData> & {\n          error: undefined;\n        })\n      | (AxiosError<TError extends Record<string, unknown> ? TError[keyof TError] : TError> & {\n          data: undefined;\n          error: TError extends Record<string, unknown> ? TError[keyof TError] : TError;\n        })\n    >;\n\ntype MethodFn = <TData = unknown, TError = unknown, ThrowOnError extends boolean = false>(\n  options: Omit<RequestOptions<TData, ThrowOnError>, 'method'>,\n) => RequestResult<TData, TError, ThrowOnError>;\n\ntype SseFn = <TData = unknown, TError = unknown, ThrowOnError extends boolean = false>(\n  options: Omit<RequestOptions<TData, ThrowOnError>, 'method'>,\n) => Promise<ServerSentEventsResult<TData, TError>>;\n\ntype RequestFn = <TData = unknown, TError = unknown, ThrowOnError extends boolean = false>(\n  options: Omit<RequestOptions<TData, ThrowOnError>, 'method'> &\n    Pick<Required<RequestOptions<TData, ThrowOnError>>, 'method'>,\n) => RequestResult<TData, TError, ThrowOnError>;\n\ntype BuildUrlFn = <\n  TData extends {\n    body?: unknown;\n    path?: Record<string, unknown>;\n    query?: Record<string, unknown>;\n    url: string;\n  },\n>(\n  options: TData & Options<TData>,\n) => string;\n\nexport type Client = CoreClient<RequestFn, Config, MethodFn, BuildUrlFn, SseFn> & {\n  instance: AxiosInstance;\n};\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 = ClientOptions> = (\n  override?: Config<ClientOptions & T>,\n) => Config<Required<ClientOptions> & T>;\n\nexport interface TDataShape {\n  body?: unknown;\n  headers?: unknown;\n  path?: unknown;\n  query?: unknown;\n  url: string;\n}\n\ntype OmitKeys<T, K> = Pick<T, Exclude<keyof T, K>>;\n\nexport type Options<\n  TData extends TDataShape = TDataShape,\n  ThrowOnError extends boolean = boolean,\n  TResponse = unknown,\n> = OmitKeys<RequestOptions<TResponse, ThrowOnError>, 'body' | 'path' | 'query' | 'url'> &\n  ([TData] extends [never] ? unknown : Omit<TData, 'url'>);\n"
  },
  {
    "path": "examples/openapi-ts-axios/src/client/client/utils.gen.ts",
    "content": "// 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 {\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\nconst checkForExistence = (\n  options: Pick<RequestOptions, 'auth' | 'query'> & {\n    headers: Record<any, unknown>;\n  },\n  name?: string,\n): boolean => {\n  if (!name) {\n    return false;\n  }\n  if (name in options.headers || options.query?.[name]) {\n    return true;\n  }\n  if (\n    'Cookie' in options.headers &&\n    options.headers['Cookie'] &&\n    typeof options.headers['Cookie'] === 'string'\n  ) {\n    return options.headers['Cookie'].includes(`${name}=`);\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: Record<any, unknown>;\n  }) => {\n  for (const auth of security) {\n    if (checkForExistence(options, auth.name)) {\n      continue;\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        const value = `${name}=${token}`;\n        if ('Cookie' in options.headers && options.headers['Cookie']) {\n          options.headers['Cookie'] = `${options.headers['Cookie']}; ${value}`;\n        } else {\n          options.headers['Cookie'] = value;\n        }\n        break;\n      }\n      case 'header':\n      default:\n        options.headers[name] = token;\n        break;\n    }\n  }\n};\n\nexport const buildUrl: Client['buildUrl'] = (options) => {\n  const instanceBaseUrl = options.axios?.defaults?.baseURL;\n\n  const baseUrl =\n    !!options.baseURL && typeof options.baseURL === 'string' ? options.baseURL : instanceBaseUrl;\n\n  return getUrl({\n    baseUrl: baseUrl as string,\n    path: options.path,\n    // let `paramsSerializer()` handle query params if it exists\n    query: !options.paramsSerializer ? options.query : undefined,\n    querySerializer:\n      typeof options.querySerializer === 'function'\n        ? options.querySerializer\n        : createQuerySerializer(options.querySerializer),\n    url: options.url,\n  });\n};\n\nexport const mergeConfigs = (a: Config, b: Config): Config => {\n  const config = { ...a, ...b };\n  config.headers = mergeHeaders(a.headers, b.headers);\n  return config;\n};\n\n/**\n * Special Axios headers keywords allowing to set headers by request method.\n */\nexport const axiosHeadersKeywords = [\n  'common',\n  'delete',\n  'get',\n  'head',\n  'patch',\n  'post',\n  'put',\n] as const;\n\nexport const mergeHeaders = (\n  ...headers: Array<Required<Config>['headers'] | undefined>\n): Record<any, unknown> => {\n  const mergedHeaders: Record<any, unknown> = {};\n  for (const header of headers) {\n    if (!header || typeof header !== 'object') {\n      continue;\n    }\n\n    const iterator = Object.entries(header);\n\n    for (const [key, value] of iterator) {\n      if (\n        axiosHeadersKeywords.includes(key as (typeof axiosHeadersKeywords)[number]) &&\n        typeof value === 'object'\n      ) {\n        mergedHeaders[key] = {\n          ...(mergedHeaders[key] as Record<any, unknown>),\n          ...value,\n        };\n      } else if (value === null) {\n        delete mergedHeaders[key];\n      } else if (Array.isArray(value)) {\n        for (const v of value) {\n          // @ts-expect-error\n          mergedHeaders[key] = [...(mergedHeaders[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[key] = typeof value === 'object' ? JSON.stringify(value) : (value as string);\n      }\n    }\n  }\n  return mergedHeaders;\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  ...override,\n});\n"
  },
  {
    "path": "examples/openapi-ts-axios/src/client/client.gen.ts",
    "content": "// 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> = (\n  override?: Config<ClientOptions & T>,\n) => Config<Required<ClientOptions> & T>;\n\nexport const client = createClient(\n  createConfig<ClientOptions2>({ baseURL: 'https://petstore3.swagger.io/api/v3' }),\n);\n"
  },
  {
    "path": "examples/openapi-ts-axios/src/client/core/auth.gen.ts",
    "content": "// 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"
  },
  {
    "path": "examples/openapi-ts-axios/src/client/core/bodySerializer.gen.ts",
    "content": "// 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"
  },
  {
    "path": "examples/openapi-ts-axios/src/client/core/params.gen.ts",
    "content": "// 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"
  },
  {
    "path": "examples/openapi-ts-axios/src/client/core/pathSerializer.gen.ts",
    "content": "// 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"
  },
  {
    "path": "examples/openapi-ts-axios/src/client/core/queryKeySerializer.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\n/**\n * JSON-friendly union that mirrors what Pinia Colada can hash.\n */\nexport type JsonValue =\n  | null\n  | string\n  | number\n  | boolean\n  | JsonValue[]\n  | { [key: string]: JsonValue };\n\n/**\n * Replacer that converts non-JSON values (bigint, Date, etc.) to safe substitutes.\n */\nexport const queryKeyJsonReplacer = (_key: string, value: unknown) => {\n  if (value === undefined || typeof value === 'function' || typeof value === 'symbol') {\n    return undefined;\n  }\n  if (typeof value === 'bigint') {\n    return value.toString();\n  }\n  if (value instanceof Date) {\n    return value.toISOString();\n  }\n  return value;\n};\n\n/**\n * Safely stringifies a value and parses it back into a JsonValue.\n */\nexport const stringifyToJsonValue = (input: unknown): JsonValue | undefined => {\n  try {\n    const json = JSON.stringify(input, queryKeyJsonReplacer);\n    if (json === undefined) {\n      return undefined;\n    }\n    return JSON.parse(json) as JsonValue;\n  } catch {\n    return undefined;\n  }\n};\n\n/**\n * Detects plain objects (including objects with a null prototype).\n */\nconst isPlainObject = (value: unknown): value is Record<string, unknown> => {\n  if (value === null || typeof value !== 'object') {\n    return false;\n  }\n  const prototype = Object.getPrototypeOf(value as object);\n  return prototype === Object.prototype || prototype === null;\n};\n\n/**\n * Turns URLSearchParams into a sorted JSON object for deterministic keys.\n */\nconst serializeSearchParams = (params: URLSearchParams): JsonValue => {\n  const entries = Array.from(params.entries()).sort(([a], [b]) => a.localeCompare(b));\n  const result: Record<string, JsonValue> = {};\n\n  for (const [key, value] of entries) {\n    const existing = result[key];\n    if (existing === undefined) {\n      result[key] = value;\n      continue;\n    }\n\n    if (Array.isArray(existing)) {\n      (existing as string[]).push(value);\n    } else {\n      result[key] = [existing, value];\n    }\n  }\n\n  return result;\n};\n\n/**\n * Normalizes any accepted value into a JSON-friendly shape for query keys.\n */\nexport const serializeQueryKeyValue = (value: unknown): JsonValue | undefined => {\n  if (value === null) {\n    return null;\n  }\n\n  if (typeof value === 'string' || typeof value === 'number' || typeof value === 'boolean') {\n    return value;\n  }\n\n  if (value === undefined || typeof value === 'function' || typeof value === 'symbol') {\n    return undefined;\n  }\n\n  if (typeof value === 'bigint') {\n    return value.toString();\n  }\n\n  if (value instanceof Date) {\n    return value.toISOString();\n  }\n\n  if (Array.isArray(value)) {\n    return stringifyToJsonValue(value);\n  }\n\n  if (typeof URLSearchParams !== 'undefined' && value instanceof URLSearchParams) {\n    return serializeSearchParams(value);\n  }\n\n  if (isPlainObject(value)) {\n    return stringifyToJsonValue(value);\n  }\n\n  return undefined;\n};\n"
  },
  {
    "path": "examples/openapi-ts-axios/src/client/core/serverSentEvents.gen.ts",
    "content": "// 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 const 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            // Normalize line endings: CRLF -> LF, then CR -> LF\n            buffer = buffer.replace(/\\r\\n/g, '\\n').replace(/\\r/g, '\\n');\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"
  },
  {
    "path": "examples/openapi-ts-axios/src/client/core/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { Auth, AuthToken } from './auth.gen';\nimport type { BodySerializer, QuerySerializer, QuerySerializerOptions } from './bodySerializer.gen';\n\nexport type HttpMethod =\n  | 'connect'\n  | 'delete'\n  | 'get'\n  | 'head'\n  | 'options'\n  | 'patch'\n  | 'post'\n  | 'put'\n  | 'trace';\n\nexport type Client<\n  RequestFn = never,\n  Config = unknown,\n  MethodFn = never,\n  BuildUrlFn = never,\n  SseFn = never,\n> = {\n  /**\n   * Returns the final request URL.\n   */\n  buildUrl: BuildUrlFn;\n  getConfig: () => Config;\n  request: RequestFn;\n  setConfig: (config: Config) => Config;\n} & {\n  [K in HttpMethod]: MethodFn;\n} & ([SseFn] extends [never] ? { sse?: never } : { sse: { [K in HttpMethod]: SseFn } });\n\nexport interface Config {\n  /**\n   * Auth token or a function returning auth token. The resolved value will be\n   * added to the request payload as defined by its `security` array.\n   */\n  auth?: ((auth: Auth) => Promise<AuthToken> | AuthToken) | AuthToken;\n  /**\n   * A function for serializing request body parameter. By default,\n   * {@link JSON.stringify()} will be used.\n   */\n  bodySerializer?: BodySerializer | null;\n  /**\n   * An object containing any HTTP headers that you want to pre-populate your\n   * `Headers` object with.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/Headers/Headers#init See more}\n   */\n  headers?:\n    | RequestInit['headers']\n    | Record<\n        string,\n        string | number | boolean | (string | number | boolean)[] | null | undefined | unknown\n      >;\n  /**\n   * The request method.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/fetch#method See more}\n   */\n  method?: Uppercase<HttpMethod>;\n  /**\n   * A function for serializing request query parameters. By default, arrays\n   * will be exploded in form style, objects will be exploded in deepObject\n   * style, and reserved characters are percent-encoded.\n   *\n   * This method will have no effect if the native `paramsSerializer()` Axios\n   * API function is used.\n   *\n   * {@link https://swagger.io/docs/specification/serialization/#query View examples}\n   */\n  querySerializer?: QuerySerializer | QuerySerializerOptions;\n  /**\n   * A function validating request data. This is useful if you want to ensure\n   * the request conforms to the desired shape, so it can be safely sent to\n   * the server.\n   */\n  requestValidator?: (data: unknown) => Promise<unknown>;\n  /**\n   * A function transforming response data before it's returned. This is useful\n   * for post-processing data, e.g. converting ISO strings into Date objects.\n   */\n  responseTransformer?: (data: unknown) => Promise<unknown>;\n  /**\n   * A function validating response data. This is useful if you want to ensure\n   * the response conforms to the desired shape, so it can be safely passed to\n   * the transformers and returned to the user.\n   */\n  responseValidator?: (data: unknown) => Promise<unknown>;\n}\n\ntype IsExactlyNeverOrNeverUndefined<T> = [T] extends [never]\n  ? true\n  : [T] extends [never | undefined]\n    ? [undefined] extends [T]\n      ? false\n      : true\n    : false;\n\nexport type OmitNever<T extends Record<string, unknown>> = {\n  [K in keyof T as IsExactlyNeverOrNeverUndefined<T[K]> extends true ? never : K]: T[K];\n};\n"
  },
  {
    "path": "examples/openapi-ts-axios/src/client/core/utils.gen.ts",
    "content": "// 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"
  },
  {
    "path": "examples/openapi-ts-axios/src/client/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport {\n  addPet,\n  createUser,\n  createUsersWithListInput,\n  deleteOrder,\n  deletePet,\n  deleteUser,\n  findPetsByStatus,\n  findPetsByTags,\n  getInventory,\n  getOrderById,\n  getPetById,\n  getUserByName,\n  loginUser,\n  logoutUser,\n  type Options,\n  placeOrder,\n  updatePet,\n  updatePetWithForm,\n  updateUser,\n  uploadFile,\n} from './sdk.gen';\nexport type {\n  AddPetData,\n  AddPetErrors,\n  AddPetResponse,\n  AddPetResponses,\n  ApiResponse,\n  Category,\n  ClientOptions,\n  CreateUserData,\n  CreateUserErrors,\n  CreateUserResponse,\n  CreateUserResponses,\n  CreateUsersWithListInputData,\n  CreateUsersWithListInputErrors,\n  CreateUsersWithListInputResponse,\n  CreateUsersWithListInputResponses,\n  DeleteOrderData,\n  DeleteOrderErrors,\n  DeleteOrderResponses,\n  DeletePetData,\n  DeletePetErrors,\n  DeletePetResponses,\n  DeleteUserData,\n  DeleteUserErrors,\n  DeleteUserResponses,\n  FindPetsByStatusData,\n  FindPetsByStatusErrors,\n  FindPetsByStatusResponse,\n  FindPetsByStatusResponses,\n  FindPetsByTagsData,\n  FindPetsByTagsErrors,\n  FindPetsByTagsResponse,\n  FindPetsByTagsResponses,\n  GetInventoryData,\n  GetInventoryErrors,\n  GetInventoryResponse,\n  GetInventoryResponses,\n  GetOrderByIdData,\n  GetOrderByIdErrors,\n  GetOrderByIdResponse,\n  GetOrderByIdResponses,\n  GetPetByIdData,\n  GetPetByIdErrors,\n  GetPetByIdResponse,\n  GetPetByIdResponses,\n  GetUserByNameData,\n  GetUserByNameErrors,\n  GetUserByNameResponse,\n  GetUserByNameResponses,\n  LoginUserData,\n  LoginUserErrors,\n  LoginUserResponse,\n  LoginUserResponses,\n  LogoutUserData,\n  LogoutUserErrors,\n  LogoutUserResponses,\n  Order,\n  Pet,\n  Pet2,\n  PlaceOrderData,\n  PlaceOrderErrors,\n  PlaceOrderResponse,\n  PlaceOrderResponses,\n  Tag,\n  UpdatePetData,\n  UpdatePetErrors,\n  UpdatePetResponse,\n  UpdatePetResponses,\n  UpdatePetWithFormData,\n  UpdatePetWithFormErrors,\n  UpdatePetWithFormResponse,\n  UpdatePetWithFormResponses,\n  UpdateUserData,\n  UpdateUserErrors,\n  UpdateUserResponses,\n  UploadFileData,\n  UploadFileErrors,\n  UploadFileResponse,\n  UploadFileResponses,\n  User,\n  UserArray,\n} from './types.gen';\n"
  },
  {
    "path": "examples/openapi-ts-axios/src/client/schemas.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport const OrderSchema = {\n  properties: {\n    complete: {\n      type: 'boolean',\n    },\n    id: {\n      example: 10,\n      format: 'int64',\n      type: 'integer',\n    },\n    petId: {\n      example: 198772,\n      format: 'int64',\n      type: 'integer',\n    },\n    quantity: {\n      example: 7,\n      format: 'int32',\n      type: 'integer',\n    },\n    shipDate: {\n      format: 'date-time',\n      type: 'string',\n    },\n    status: {\n      description: 'Order Status',\n      enum: ['placed', 'approved', 'delivered'],\n      example: 'approved',\n      type: 'string',\n    },\n  },\n  type: 'object',\n  'x-swagger-router-model': 'io.swagger.petstore.model.Order',\n  xml: {\n    name: 'order',\n  },\n} as const;\n\nexport const CategorySchema = {\n  properties: {\n    id: {\n      example: 1,\n      format: 'int64',\n      type: 'integer',\n    },\n    name: {\n      example: 'Dogs',\n      type: 'string',\n    },\n  },\n  type: 'object',\n  'x-swagger-router-model': 'io.swagger.petstore.model.Category',\n  xml: {\n    name: 'category',\n  },\n} as const;\n\nexport const UserSchema = {\n  properties: {\n    email: {\n      example: 'john@email.com',\n      type: 'string',\n    },\n    firstName: {\n      example: 'John',\n      type: 'string',\n    },\n    id: {\n      example: 10,\n      format: 'int64',\n      type: 'integer',\n    },\n    lastName: {\n      example: 'James',\n      type: 'string',\n    },\n    password: {\n      example: '12345',\n      type: 'string',\n    },\n    phone: {\n      example: '12345',\n      type: 'string',\n    },\n    userStatus: {\n      description: 'User Status',\n      example: 1,\n      format: 'int32',\n      type: 'integer',\n    },\n    username: {\n      example: 'theUser',\n      type: 'string',\n    },\n  },\n  type: 'object',\n  'x-swagger-router-model': 'io.swagger.petstore.model.User',\n  xml: {\n    name: 'user',\n  },\n} as const;\n\nexport const TagSchema = {\n  properties: {\n    id: {\n      format: 'int64',\n      type: 'integer',\n    },\n    name: {\n      type: 'string',\n    },\n  },\n  type: 'object',\n  'x-swagger-router-model': 'io.swagger.petstore.model.Tag',\n  xml: {\n    name: 'tag',\n  },\n} as const;\n\nexport const PetSchema = {\n  properties: {\n    category: {\n      $ref: '#/components/schemas/Category',\n    },\n    id: {\n      example: 10,\n      format: 'int64',\n      type: 'integer',\n    },\n    name: {\n      example: 'doggie',\n      type: 'string',\n    },\n    photoUrls: {\n      items: {\n        type: 'string',\n        xml: {\n          name: 'photoUrl',\n        },\n      },\n      type: 'array',\n      xml: {\n        wrapped: true,\n      },\n    },\n    status: {\n      description: 'pet status in the store',\n      enum: ['available', 'pending', 'sold'],\n      type: 'string',\n    },\n    tags: {\n      items: {\n        $ref: '#/components/schemas/Tag',\n      },\n      type: 'array',\n      xml: {\n        wrapped: true,\n      },\n    },\n  },\n  required: ['name', 'photoUrls'],\n  type: 'object',\n  'x-swagger-router-model': 'io.swagger.petstore.model.Pet',\n  xml: {\n    name: 'pet',\n  },\n} as const;\n\nexport const ApiResponseSchema = {\n  properties: {\n    code: {\n      format: 'int32',\n      type: 'integer',\n    },\n    message: {\n      type: 'string',\n    },\n    type: {\n      type: 'string',\n    },\n  },\n  type: 'object',\n  xml: {\n    name: '##default',\n  },\n} as const;\n"
  },
  {
    "path": "examples/openapi-ts-axios/src/client/sdk.gen.ts",
    "content": "// 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 {\n  AddPetData,\n  AddPetErrors,\n  AddPetResponses,\n  CreateUserData,\n  CreateUserErrors,\n  CreateUserResponses,\n  CreateUsersWithListInputData,\n  CreateUsersWithListInputErrors,\n  CreateUsersWithListInputResponses,\n  DeleteOrderData,\n  DeleteOrderErrors,\n  DeleteOrderResponses,\n  DeletePetData,\n  DeletePetErrors,\n  DeletePetResponses,\n  DeleteUserData,\n  DeleteUserErrors,\n  DeleteUserResponses,\n  FindPetsByStatusData,\n  FindPetsByStatusErrors,\n  FindPetsByStatusResponses,\n  FindPetsByTagsData,\n  FindPetsByTagsErrors,\n  FindPetsByTagsResponses,\n  GetInventoryData,\n  GetInventoryErrors,\n  GetInventoryResponses,\n  GetOrderByIdData,\n  GetOrderByIdErrors,\n  GetOrderByIdResponses,\n  GetPetByIdData,\n  GetPetByIdErrors,\n  GetPetByIdResponses,\n  GetUserByNameData,\n  GetUserByNameErrors,\n  GetUserByNameResponses,\n  LoginUserData,\n  LoginUserErrors,\n  LoginUserResponses,\n  LogoutUserData,\n  LogoutUserErrors,\n  LogoutUserResponses,\n  PlaceOrderData,\n  PlaceOrderErrors,\n  PlaceOrderResponses,\n  UpdatePetData,\n  UpdatePetErrors,\n  UpdatePetResponses,\n  UpdatePetWithFormData,\n  UpdatePetWithFormErrors,\n  UpdatePetWithFormResponses,\n  UpdateUserData,\n  UpdateUserErrors,\n  UpdateUserResponses,\n  UploadFileData,\n  UploadFileErrors,\n  UploadFileResponses,\n} from './types.gen';\n\nexport type Options<\n  TData extends TDataShape = TDataShape,\n  ThrowOnError extends boolean = boolean,\n> = Options2<TData, ThrowOnError> & {\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 * Add a new pet to the store.\n *\n * Add a new pet to the store.\n */\nexport const addPet = <ThrowOnError extends boolean = false>(\n  options: Options<AddPetData, ThrowOnError>,\n) =>\n  (options.client ?? client).post<AddPetResponses, AddPetErrors, ThrowOnError>({\n    responseType: 'json',\n    security: [{ scheme: 'bearer', type: 'http' }],\n    url: '/pet',\n    ...options,\n    headers: {\n      'Content-Type': 'application/json',\n      ...options.headers,\n    },\n  });\n\n/**\n * Update an existing pet.\n *\n * Update an existing pet by Id.\n */\nexport const updatePet = <ThrowOnError extends boolean = false>(\n  options: Options<UpdatePetData, ThrowOnError>,\n) =>\n  (options.client ?? client).put<UpdatePetResponses, UpdatePetErrors, ThrowOnError>({\n    responseType: 'json',\n    security: [{ scheme: 'bearer', type: 'http' }],\n    url: '/pet',\n    ...options,\n    headers: {\n      'Content-Type': 'application/json',\n      ...options.headers,\n    },\n  });\n\n/**\n * Finds Pets by status.\n *\n * Multiple status values can be provided with comma separated strings.\n */\nexport const findPetsByStatus = <ThrowOnError extends boolean = false>(\n  options: Options<FindPetsByStatusData, ThrowOnError>,\n) =>\n  (options.client ?? client).get<FindPetsByStatusResponses, FindPetsByStatusErrors, ThrowOnError>({\n    responseType: 'json',\n    security: [{ scheme: 'bearer', type: 'http' }],\n    url: '/pet/findByStatus',\n    ...options,\n  });\n\n/**\n * Finds Pets by tags.\n *\n * Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.\n */\nexport const findPetsByTags = <ThrowOnError extends boolean = false>(\n  options: Options<FindPetsByTagsData, ThrowOnError>,\n) =>\n  (options.client ?? client).get<FindPetsByTagsResponses, FindPetsByTagsErrors, ThrowOnError>({\n    responseType: 'json',\n    security: [{ scheme: 'bearer', type: 'http' }],\n    url: '/pet/findByTags',\n    ...options,\n  });\n\n/**\n * Deletes a pet.\n *\n * Delete a pet.\n */\nexport const deletePet = <ThrowOnError extends boolean = false>(\n  options: Options<DeletePetData, ThrowOnError>,\n) =>\n  (options.client ?? client).delete<DeletePetResponses, DeletePetErrors, ThrowOnError>({\n    security: [{ scheme: 'bearer', type: 'http' }],\n    url: '/pet/{petId}',\n    ...options,\n  });\n\n/**\n * Find pet by ID.\n *\n * Returns a single pet.\n */\nexport const getPetById = <ThrowOnError extends boolean = false>(\n  options: Options<GetPetByIdData, ThrowOnError>,\n) =>\n  (options.client ?? client).get<GetPetByIdResponses, GetPetByIdErrors, ThrowOnError>({\n    responseType: 'json',\n    security: [\n      { name: 'api_key', type: 'apiKey' },\n      { scheme: 'bearer', type: 'http' },\n    ],\n    url: '/pet/{petId}',\n    ...options,\n  });\n\n/**\n * Updates a pet in the store with form data.\n *\n * Updates a pet resource based on the form data.\n */\nexport const updatePetWithForm = <ThrowOnError extends boolean = false>(\n  options: Options<UpdatePetWithFormData, ThrowOnError>,\n) =>\n  (options.client ?? client).post<\n    UpdatePetWithFormResponses,\n    UpdatePetWithFormErrors,\n    ThrowOnError\n  >({\n    responseType: 'json',\n    security: [{ scheme: 'bearer', type: 'http' }],\n    url: '/pet/{petId}',\n    ...options,\n  });\n\n/**\n * Uploads an image.\n *\n * Upload image of the pet.\n */\nexport const uploadFile = <ThrowOnError extends boolean = false>(\n  options: Options<UploadFileData, ThrowOnError>,\n) =>\n  (options.client ?? client).post<UploadFileResponses, UploadFileErrors, ThrowOnError>({\n    bodySerializer: null,\n    responseType: 'json',\n    security: [{ scheme: 'bearer', type: 'http' }],\n    url: '/pet/{petId}/uploadImage',\n    ...options,\n    headers: {\n      'Content-Type': 'application/octet-stream',\n      ...options.headers,\n    },\n  });\n\n/**\n * Returns pet inventories by status.\n *\n * Returns a map of status codes to quantities.\n */\nexport const getInventory = <ThrowOnError extends boolean = false>(\n  options?: Options<GetInventoryData, ThrowOnError>,\n) =>\n  (options?.client ?? client).get<GetInventoryResponses, GetInventoryErrors, ThrowOnError>({\n    responseType: 'json',\n    security: [{ name: 'api_key', type: 'apiKey' }],\n    url: '/store/inventory',\n    ...options,\n  });\n\n/**\n * Place an order for a pet.\n *\n * Place a new order in the store.\n */\nexport const placeOrder = <ThrowOnError extends boolean = false>(\n  options?: Options<PlaceOrderData, ThrowOnError>,\n) =>\n  (options?.client ?? client).post<PlaceOrderResponses, PlaceOrderErrors, ThrowOnError>({\n    responseType: 'json',\n    url: '/store/order',\n    ...options,\n    headers: {\n      'Content-Type': 'application/json',\n      ...options?.headers,\n    },\n  });\n\n/**\n * Delete purchase order by identifier.\n *\n * For valid response try integer IDs with value < 1000. Anything above 1000 or non-integers will generate API errors.\n */\nexport const deleteOrder = <ThrowOnError extends boolean = false>(\n  options: Options<DeleteOrderData, ThrowOnError>,\n) =>\n  (options.client ?? client).delete<DeleteOrderResponses, DeleteOrderErrors, ThrowOnError>({\n    url: '/store/order/{orderId}',\n    ...options,\n  });\n\n/**\n * Find purchase order by ID.\n *\n * For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions.\n */\nexport const getOrderById = <ThrowOnError extends boolean = false>(\n  options: Options<GetOrderByIdData, ThrowOnError>,\n) =>\n  (options.client ?? client).get<GetOrderByIdResponses, GetOrderByIdErrors, ThrowOnError>({\n    responseType: 'json',\n    url: '/store/order/{orderId}',\n    ...options,\n  });\n\n/**\n * Create user.\n *\n * This can only be done by the logged in user.\n */\nexport const createUser = <ThrowOnError extends boolean = false>(\n  options?: Options<CreateUserData, ThrowOnError>,\n) =>\n  (options?.client ?? client).post<CreateUserResponses, CreateUserErrors, ThrowOnError>({\n    responseType: 'json',\n    url: '/user',\n    ...options,\n    headers: {\n      'Content-Type': 'application/json',\n      ...options?.headers,\n    },\n  });\n\n/**\n * Creates list of users with given input array.\n *\n * Creates list of users with given input array.\n */\nexport const createUsersWithListInput = <ThrowOnError extends boolean = false>(\n  options?: Options<CreateUsersWithListInputData, ThrowOnError>,\n) =>\n  (options?.client ?? client).post<\n    CreateUsersWithListInputResponses,\n    CreateUsersWithListInputErrors,\n    ThrowOnError\n  >({\n    responseType: 'json',\n    url: '/user/createWithList',\n    ...options,\n    headers: {\n      'Content-Type': 'application/json',\n      ...options?.headers,\n    },\n  });\n\n/**\n * Logs user into the system.\n *\n * Log into the system.\n */\nexport const loginUser = <ThrowOnError extends boolean = false>(\n  options?: Options<LoginUserData, ThrowOnError>,\n) =>\n  (options?.client ?? client).get<LoginUserResponses, LoginUserErrors, ThrowOnError>({\n    responseType: 'json',\n    url: '/user/login',\n    ...options,\n  });\n\n/**\n * Logs out current logged in user session.\n *\n * Log user out of the system.\n */\nexport const logoutUser = <ThrowOnError extends boolean = false>(\n  options?: Options<LogoutUserData, ThrowOnError>,\n) =>\n  (options?.client ?? client).get<LogoutUserResponses, LogoutUserErrors, ThrowOnError>({\n    url: '/user/logout',\n    ...options,\n  });\n\n/**\n * Delete user resource.\n *\n * This can only be done by the logged in user.\n */\nexport const deleteUser = <ThrowOnError extends boolean = false>(\n  options: Options<DeleteUserData, ThrowOnError>,\n) =>\n  (options.client ?? client).delete<DeleteUserResponses, DeleteUserErrors, ThrowOnError>({\n    url: '/user/{username}',\n    ...options,\n  });\n\n/**\n * Get user by user name.\n *\n * Get user detail based on username.\n */\nexport const getUserByName = <ThrowOnError extends boolean = false>(\n  options: Options<GetUserByNameData, ThrowOnError>,\n) =>\n  (options.client ?? client).get<GetUserByNameResponses, GetUserByNameErrors, ThrowOnError>({\n    responseType: 'json',\n    url: '/user/{username}',\n    ...options,\n  });\n\n/**\n * Update user resource.\n *\n * This can only be done by the logged in user.\n */\nexport const updateUser = <ThrowOnError extends boolean = false>(\n  options: Options<UpdateUserData, ThrowOnError>,\n) =>\n  (options.client ?? client).put<UpdateUserResponses, UpdateUserErrors, ThrowOnError>({\n    url: '/user/{username}',\n    ...options,\n    headers: {\n      'Content-Type': 'application/json',\n      ...options.headers,\n    },\n  });\n"
  },
  {
    "path": "examples/openapi-ts-axios/src/client/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type ClientOptions = {\n  baseURL: 'https://petstore3.swagger.io/api/v3' | (string & {});\n};\n\nexport type Order = {\n  complete?: boolean;\n  id?: number;\n  petId?: number;\n  quantity?: number;\n  shipDate?: string;\n  /**\n   * Order Status\n   */\n  status?: 'placed' | 'approved' | 'delivered';\n};\n\nexport type Category = {\n  id?: number;\n  name?: string;\n};\n\nexport type User = {\n  email?: string;\n  firstName?: string;\n  id?: number;\n  lastName?: string;\n  password?: string;\n  phone?: string;\n  /**\n   * User Status\n   */\n  userStatus?: number;\n  username?: string;\n};\n\nexport type Tag = {\n  id?: number;\n  name?: string;\n};\n\nexport type Pet = {\n  category?: Category;\n  id?: number;\n  name: string;\n  photoUrls: Array<string>;\n  /**\n   * pet status in the store\n   */\n  status?: 'available' | 'pending' | 'sold';\n  tags?: Array<Tag>;\n};\n\nexport type ApiResponse = {\n  code?: number;\n  message?: string;\n  type?: string;\n};\n\nexport type Pet2 = Pet;\n\n/**\n * List of user object\n */\nexport type UserArray = Array<User>;\n\nexport type AddPetData = {\n  /**\n   * Create a new pet in the store\n   */\n  body: Pet;\n  path?: never;\n  query?: never;\n  url: '/pet';\n};\n\nexport type AddPetErrors = {\n  /**\n   * Invalid input\n   */\n  400: unknown;\n  /**\n   * Validation exception\n   */\n  422: unknown;\n  /**\n   * Unexpected error\n   */\n  default: unknown;\n};\n\nexport type AddPetResponses = {\n  /**\n   * Successful operation\n   */\n  200: Pet;\n};\n\nexport type AddPetResponse = AddPetResponses[keyof AddPetResponses];\n\nexport type UpdatePetData = {\n  /**\n   * Update an existent pet in the store\n   */\n  body: Pet;\n  path?: never;\n  query?: never;\n  url: '/pet';\n};\n\nexport type UpdatePetErrors = {\n  /**\n   * Invalid ID supplied\n   */\n  400: unknown;\n  /**\n   * Pet not found\n   */\n  404: unknown;\n  /**\n   * Validation exception\n   */\n  422: unknown;\n  /**\n   * Unexpected error\n   */\n  default: unknown;\n};\n\nexport type UpdatePetResponses = {\n  /**\n   * Successful operation\n   */\n  200: Pet;\n};\n\nexport type UpdatePetResponse = UpdatePetResponses[keyof UpdatePetResponses];\n\nexport type FindPetsByStatusData = {\n  body?: never;\n  path?: never;\n  query: {\n    /**\n     * Status values that need to be considered for filter\n     */\n    status: 'available' | 'pending' | 'sold';\n  };\n  url: '/pet/findByStatus';\n};\n\nexport type FindPetsByStatusErrors = {\n  /**\n   * Invalid status value\n   */\n  400: unknown;\n  /**\n   * Unexpected error\n   */\n  default: unknown;\n};\n\nexport type FindPetsByStatusResponses = {\n  /**\n   * successful operation\n   */\n  200: Array<Pet>;\n};\n\nexport type FindPetsByStatusResponse = FindPetsByStatusResponses[keyof FindPetsByStatusResponses];\n\nexport type FindPetsByTagsData = {\n  body?: never;\n  path?: never;\n  query: {\n    /**\n     * Tags to filter by\n     */\n    tags: Array<string>;\n  };\n  url: '/pet/findByTags';\n};\n\nexport type FindPetsByTagsErrors = {\n  /**\n   * Invalid tag value\n   */\n  400: unknown;\n  /**\n   * Unexpected error\n   */\n  default: unknown;\n};\n\nexport type FindPetsByTagsResponses = {\n  /**\n   * successful operation\n   */\n  200: Array<Pet>;\n};\n\nexport type FindPetsByTagsResponse = FindPetsByTagsResponses[keyof FindPetsByTagsResponses];\n\nexport type DeletePetData = {\n  body?: never;\n  headers?: {\n    api_key?: string;\n  };\n  path: {\n    /**\n     * Pet id to delete\n     */\n    petId: number;\n  };\n  query?: never;\n  url: '/pet/{petId}';\n};\n\nexport type DeletePetErrors = {\n  /**\n   * Invalid pet value\n   */\n  400: unknown;\n  /**\n   * Unexpected error\n   */\n  default: unknown;\n};\n\nexport type DeletePetResponses = {\n  /**\n   * Pet deleted\n   */\n  200: unknown;\n};\n\nexport type GetPetByIdData = {\n  body?: never;\n  path: {\n    /**\n     * ID of pet to return\n     */\n    petId: number;\n  };\n  query?: never;\n  url: '/pet/{petId}';\n};\n\nexport type GetPetByIdErrors = {\n  /**\n   * Invalid ID supplied\n   */\n  400: unknown;\n  /**\n   * Pet not found\n   */\n  404: unknown;\n  /**\n   * Unexpected error\n   */\n  default: unknown;\n};\n\nexport type GetPetByIdResponses = {\n  /**\n   * successful operation\n   */\n  200: Pet;\n};\n\nexport type GetPetByIdResponse = GetPetByIdResponses[keyof GetPetByIdResponses];\n\nexport type UpdatePetWithFormData = {\n  body?: never;\n  path: {\n    /**\n     * ID of pet that needs to be updated\n     */\n    petId: number;\n  };\n  query?: {\n    /**\n     * Name of pet that needs to be updated\n     */\n    name?: string;\n    /**\n     * Status of pet that needs to be updated\n     */\n    status?: string;\n  };\n  url: '/pet/{petId}';\n};\n\nexport type UpdatePetWithFormErrors = {\n  /**\n   * Invalid input\n   */\n  400: unknown;\n  /**\n   * Unexpected error\n   */\n  default: unknown;\n};\n\nexport type UpdatePetWithFormResponses = {\n  /**\n   * successful operation\n   */\n  200: Pet;\n};\n\nexport type UpdatePetWithFormResponse =\n  UpdatePetWithFormResponses[keyof UpdatePetWithFormResponses];\n\nexport type UploadFileData = {\n  body?: Blob | File;\n  path: {\n    /**\n     * ID of pet to update\n     */\n    petId: number;\n  };\n  query?: {\n    /**\n     * Additional Metadata\n     */\n    additionalMetadata?: string;\n  };\n  url: '/pet/{petId}/uploadImage';\n};\n\nexport type UploadFileErrors = {\n  /**\n   * No file uploaded\n   */\n  400: unknown;\n  /**\n   * Pet not found\n   */\n  404: unknown;\n  /**\n   * Unexpected error\n   */\n  default: unknown;\n};\n\nexport type UploadFileResponses = {\n  /**\n   * successful operation\n   */\n  200: ApiResponse;\n};\n\nexport type UploadFileResponse = UploadFileResponses[keyof UploadFileResponses];\n\nexport type GetInventoryData = {\n  body?: never;\n  path?: never;\n  query?: never;\n  url: '/store/inventory';\n};\n\nexport type GetInventoryErrors = {\n  /**\n   * Unexpected error\n   */\n  default: unknown;\n};\n\nexport type GetInventoryResponses = {\n  /**\n   * successful operation\n   */\n  200: {\n    [key: string]: number;\n  };\n};\n\nexport type GetInventoryResponse = GetInventoryResponses[keyof GetInventoryResponses];\n\nexport type PlaceOrderData = {\n  body?: Order;\n  path?: never;\n  query?: never;\n  url: '/store/order';\n};\n\nexport type PlaceOrderErrors = {\n  /**\n   * Invalid input\n   */\n  400: unknown;\n  /**\n   * Validation exception\n   */\n  422: unknown;\n  /**\n   * Unexpected error\n   */\n  default: unknown;\n};\n\nexport type PlaceOrderResponses = {\n  /**\n   * successful operation\n   */\n  200: Order;\n};\n\nexport type PlaceOrderResponse = PlaceOrderResponses[keyof PlaceOrderResponses];\n\nexport type DeleteOrderData = {\n  body?: never;\n  path: {\n    /**\n     * ID of the order that needs to be deleted\n     */\n    orderId: number;\n  };\n  query?: never;\n  url: '/store/order/{orderId}';\n};\n\nexport type DeleteOrderErrors = {\n  /**\n   * Invalid ID supplied\n   */\n  400: unknown;\n  /**\n   * Order not found\n   */\n  404: unknown;\n  /**\n   * Unexpected error\n   */\n  default: unknown;\n};\n\nexport type DeleteOrderResponses = {\n  /**\n   * order deleted\n   */\n  200: unknown;\n};\n\nexport type GetOrderByIdData = {\n  body?: never;\n  path: {\n    /**\n     * ID of order that needs to be fetched\n     */\n    orderId: number;\n  };\n  query?: never;\n  url: '/store/order/{orderId}';\n};\n\nexport type GetOrderByIdErrors = {\n  /**\n   * Invalid ID supplied\n   */\n  400: unknown;\n  /**\n   * Order not found\n   */\n  404: unknown;\n  /**\n   * Unexpected error\n   */\n  default: unknown;\n};\n\nexport type GetOrderByIdResponses = {\n  /**\n   * successful operation\n   */\n  200: Order;\n};\n\nexport type GetOrderByIdResponse = GetOrderByIdResponses[keyof GetOrderByIdResponses];\n\nexport type CreateUserData = {\n  /**\n   * Created user object\n   */\n  body?: User;\n  path?: never;\n  query?: never;\n  url: '/user';\n};\n\nexport type CreateUserErrors = {\n  /**\n   * Unexpected error\n   */\n  default: unknown;\n};\n\nexport type CreateUserResponses = {\n  /**\n   * successful operation\n   */\n  200: User;\n};\n\nexport type CreateUserResponse = CreateUserResponses[keyof CreateUserResponses];\n\nexport type CreateUsersWithListInputData = {\n  body?: Array<User>;\n  path?: never;\n  query?: never;\n  url: '/user/createWithList';\n};\n\nexport type CreateUsersWithListInputErrors = {\n  /**\n   * Unexpected error\n   */\n  default: unknown;\n};\n\nexport type CreateUsersWithListInputResponses = {\n  /**\n   * Successful operation\n   */\n  200: User;\n};\n\nexport type CreateUsersWithListInputResponse =\n  CreateUsersWithListInputResponses[keyof CreateUsersWithListInputResponses];\n\nexport type LoginUserData = {\n  body?: never;\n  path?: never;\n  query?: {\n    /**\n     * The password for login in clear text\n     */\n    password?: string;\n    /**\n     * The user name for login\n     */\n    username?: string;\n  };\n  url: '/user/login';\n};\n\nexport type LoginUserErrors = {\n  /**\n   * Invalid username/password supplied\n   */\n  400: unknown;\n  /**\n   * Unexpected error\n   */\n  default: unknown;\n};\n\nexport type LoginUserResponses = {\n  /**\n   * successful operation\n   */\n  200: string;\n};\n\nexport type LoginUserResponse = LoginUserResponses[keyof LoginUserResponses];\n\nexport type LogoutUserData = {\n  body?: never;\n  path?: never;\n  query?: never;\n  url: '/user/logout';\n};\n\nexport type LogoutUserErrors = {\n  /**\n   * Unexpected error\n   */\n  default: unknown;\n};\n\nexport type LogoutUserResponses = {\n  /**\n   * successful operation\n   */\n  200: unknown;\n};\n\nexport type DeleteUserData = {\n  body?: never;\n  path: {\n    /**\n     * The name that needs to be deleted\n     */\n    username: string;\n  };\n  query?: never;\n  url: '/user/{username}';\n};\n\nexport type DeleteUserErrors = {\n  /**\n   * Invalid username supplied\n   */\n  400: unknown;\n  /**\n   * User not found\n   */\n  404: unknown;\n  /**\n   * Unexpected error\n   */\n  default: unknown;\n};\n\nexport type DeleteUserResponses = {\n  /**\n   * User deleted\n   */\n  200: unknown;\n};\n\nexport type GetUserByNameData = {\n  body?: never;\n  path: {\n    /**\n     * The name that needs to be fetched. Use user1 for testing\n     */\n    username: string;\n  };\n  query?: never;\n  url: '/user/{username}';\n};\n\nexport type GetUserByNameErrors = {\n  /**\n   * Invalid username supplied\n   */\n  400: unknown;\n  /**\n   * User not found\n   */\n  404: unknown;\n  /**\n   * Unexpected error\n   */\n  default: unknown;\n};\n\nexport type GetUserByNameResponses = {\n  /**\n   * successful operation\n   */\n  200: User;\n};\n\nexport type GetUserByNameResponse = GetUserByNameResponses[keyof GetUserByNameResponses];\n\nexport type UpdateUserData = {\n  /**\n   * Update an existent user in the store\n   */\n  body?: User;\n  path: {\n    /**\n     * name that need to be deleted\n     */\n    username: string;\n  };\n  query?: never;\n  url: '/user/{username}';\n};\n\nexport type UpdateUserErrors = {\n  /**\n   * bad request\n   */\n  400: unknown;\n  /**\n   * user not found\n   */\n  404: unknown;\n  /**\n   * Unexpected error\n   */\n  default: unknown;\n};\n\nexport type UpdateUserResponses = {\n  /**\n   * successful operation\n   */\n  200: unknown;\n};\n"
  },
  {
    "path": "examples/openapi-ts-axios/src/main.tsx",
    "content": "import '@radix-ui/themes/styles.css';\n\nimport { Theme } from '@radix-ui/themes';\nimport React from 'react';\nimport ReactDOM from 'react-dom/client';\n\nimport App from './App.tsx';\nimport { client } from './client/client.gen';\n\n// configure internal service client\nclient.setConfig({\n  // set default base url for requests\n  baseURL: 'https://petstore3.swagger.io/api/v3',\n  // set default headers for requests\n  headers: {\n    Authorization: 'Bearer <token_from_service_client>',\n  },\n});\n\nReactDOM.createRoot(document.getElementById('root')!).render(\n  <React.StrictMode>\n    <Theme appearance=\"dark\">\n      <App />\n    </Theme>\n  </React.StrictMode>,\n);\n"
  },
  {
    "path": "examples/openapi-ts-axios/src/vite-env.d.ts",
    "content": "/// <reference types=\"vite/client\" />\n"
  },
  {
    "path": "examples/openapi-ts-axios/tailwind.config.js",
    "content": "/** @type {import('tailwindcss').Config} */\nexport default {\n  content: ['./index.html', './src/**/*.{html,js,ts,jsx,tsx}'],\n  theme: {\n    extend: {},\n  },\n};\n"
  },
  {
    "path": "examples/openapi-ts-axios/tsconfig.json",
    "content": "{\n  \"compilerOptions\": {\n    \"target\": \"ES2020\",\n    \"useDefineForClassFields\": true,\n    \"lib\": [\"ES2020\", \"DOM\", \"DOM.Iterable\"],\n    \"module\": \"ESNext\",\n    \"skipLibCheck\": true,\n\n    /* Bundler mode */\n    \"moduleResolution\": \"bundler\",\n    \"allowImportingTsExtensions\": true,\n    \"resolveJsonModule\": true,\n    \"isolatedModules\": true,\n    \"noEmit\": true,\n    \"jsx\": \"react-jsx\",\n\n    /* Linting */\n    \"strict\": true,\n    \"noUnusedLocals\": true,\n    \"noUnusedParameters\": false,\n    \"noFallthroughCasesInSwitch\": true\n  },\n  \"include\": [\"src\"],\n  \"references\": [{ \"path\": \"./tsconfig.node.json\" }]\n}\n"
  },
  {
    "path": "examples/openapi-ts-axios/tsconfig.node.json",
    "content": "{\n  \"compilerOptions\": {\n    \"composite\": true,\n    \"skipLibCheck\": true,\n    \"module\": \"ESNext\",\n    \"moduleResolution\": \"bundler\",\n    \"allowSyntheticDefaultImports\": true,\n    \"strict\": true\n  },\n  \"include\": [\"vite.config.ts\"]\n}\n"
  },
  {
    "path": "examples/openapi-ts-axios/vite.config.ts",
    "content": "import react from '@vitejs/plugin-react';\n\n/** @type {import('vite').UserConfig} */\nexport default {\n  build: {\n    sourcemap: true,\n    target: 'esnext',\n  },\n  esbuild: {\n    target: 'esnext',\n  },\n  optimizeDeps: {\n    esbuildOptions: {\n      target: 'esnext',\n    },\n  },\n  plugins: [react()],\n};\n"
  },
  {
    "path": "examples/openapi-ts-fastify/CHANGELOG.md",
    "content": "# @example/openapi-ts-fastify\n\n## 0.1.16\n\n### Patch Changes\n\n- Updated dependencies [[`f23f3ae`](https://github.com/hey-api/openapi-ts/commit/f23f3ae874385e758eb8d43bb4e274c9858a4e40)]:\n  - @hey-api/client-fetch@0.13.1\n\n## 0.1.15\n\n### Patch Changes\n\n- Updated dependencies [[`10d2e03`](https://github.com/hey-api/openapi-ts/commit/10d2e03b8295e4e887fab8d023aa823699efbae8)]:\n  - @hey-api/client-fetch@0.13.0\n\n## 0.1.14\n\n### Patch Changes\n\n- Updated dependencies [[`4d8c030`](https://github.com/hey-api/openapi-ts/commit/4d8c03038979c9a75315cc158789b3c198c62f90)]:\n  - @hey-api/client-fetch@0.12.0\n\n## 0.1.13\n\n### Patch Changes\n\n- Updated dependencies [[`8152aaf`](https://github.com/hey-api/openapi-ts/commit/8152aaf4892c48b79fd3dc486eb3c0ea333dc3e6)]:\n  - @hey-api/client-fetch@0.11.0\n\n## 0.1.12\n\n### Patch Changes\n\n- Updated dependencies [[`1f99066`](https://github.com/hey-api/openapi-ts/commit/1f99066efbb2d0e6b9e3710c701293c2cc09d65e)]:\n  - @hey-api/client-fetch@0.10.2\n\n## 0.1.11\n\n### Patch Changes\n\n- Updated dependencies [[`565e0b8`](https://github.com/hey-api/openapi-ts/commit/565e0b89fbab4556ecdc63dfe08250942681140e)]:\n  - @hey-api/client-fetch@0.10.1\n\n## 0.1.10\n\n### Patch Changes\n\n- Updated dependencies [[`fed9699`](https://github.com/hey-api/openapi-ts/commit/fed969985275621c7c2b65ffc760c7c66fafaf72)]:\n  - @hey-api/client-fetch@0.10.0\n\n## 0.1.9\n\n### Patch Changes\n\n- Updated dependencies [[`67c385b`](https://github.com/hey-api/openapi-ts/commit/67c385bf6289a79726b0cdd85fd81ca501cf2248)]:\n  - @hey-api/client-fetch@0.9.0\n\n## 0.1.8\n\n### Patch Changes\n\n- Updated dependencies [[`fe43b88`](https://github.com/hey-api/openapi-ts/commit/fe43b889c20a2001f56e259f93f64851a1caa1d1)]:\n  - @hey-api/client-fetch@0.8.4\n\n## 0.1.7\n\n### Patch Changes\n\n- Updated dependencies [[`c0b36b9`](https://github.com/hey-api/openapi-ts/commit/c0b36b95645d484034c3af145c5554867568979b)]:\n  - @hey-api/client-fetch@0.8.3\n\n## 0.1.6\n\n### Patch Changes\n\n- Updated dependencies [[`b8cc9f8`](https://github.com/hey-api/openapi-ts/commit/b8cc9f8a5eaf4f4ff345abc49c14c6b96744c2ea)]:\n  - @hey-api/client-fetch@0.8.2\n\n## 0.1.5\n\n### Patch Changes\n\n- Updated dependencies [[`7f0f4a7`](https://github.com/hey-api/openapi-ts/commit/7f0f4a76b06c8fafb33581b522faf8efc6fd85ac)]:\n  - @hey-api/client-fetch@0.8.1\n\n## 0.1.4\n\n### Patch Changes\n\n- Updated dependencies [[`bb6d46a`](https://github.com/hey-api/openapi-ts/commit/bb6d46ae119ce4e7e3a2ab3fded74ac4fb4cdff2)]:\n  - @hey-api/client-fetch@0.8.0\n\n## 0.1.3\n\n### Patch Changes\n\n- Updated dependencies [[`2dc380e`](https://github.com/hey-api/openapi-ts/commit/2dc380eabc17c723654beb04ecd7bce6d33d3b49), [`603541e`](https://github.com/hey-api/openapi-ts/commit/603541e307dc2953da7dddd300176865629b50bb), [`2cbffeb`](https://github.com/hey-api/openapi-ts/commit/2cbffeb2cdd6c6143cd68cac68369584879dda31), [`2cbffeb`](https://github.com/hey-api/openapi-ts/commit/2cbffeb2cdd6c6143cd68cac68369584879dda31)]:\n  - @hey-api/client-fetch@0.7.3\n\n## 0.1.2\n\n### Patch Changes\n\n- Updated dependencies [[`8eba19d`](https://github.com/hey-api/openapi-ts/commit/8eba19d4092fc0903572ab9fdadf0b4c26928ba2)]:\n  - @hey-api/client-fetch@0.7.2\n\n## 0.1.1\n\n### Patch Changes\n\n- Updated dependencies [[`0432418`](https://github.com/hey-api/openapi-ts/commit/0432418d72c94ef94865f8216ed2f723ad5191f9), [`4784727`](https://github.com/hey-api/openapi-ts/commit/47847276e8bc854045044dd414382080270dd779)]:\n  - @hey-api/client-fetch@0.7.1\n\n## 0.1.0\n\n### Minor Changes\n\n- [#1568](https://github.com/hey-api/openapi-ts/pull/1568) [`465410c`](https://github.com/hey-api/openapi-ts/commit/465410c201eb19e737e3143ad53a146e95f80107) Thanks [@mrlubos](https://github.com/mrlubos)! - feat: change the default parser\n\n### Patch Changes\n\n- Updated dependencies [[`465410c`](https://github.com/hey-api/openapi-ts/commit/465410c201eb19e737e3143ad53a146e95f80107)]:\n  - @hey-api/client-fetch@0.7.0\n\n## 0.0.11\n\n### Patch Changes\n\n- Updated dependencies [[`e2e1410`](https://github.com/hey-api/openapi-ts/commit/e2e1410b22c0c84c40d1b1803e9650d546350cb7)]:\n  - @hey-api/client-fetch@0.6.0\n\n## 0.0.10\n\n### Patch Changes\n\n- Updated dependencies [[`20d7497`](https://github.com/hey-api/openapi-ts/commit/20d7497acb6c046f6a4206c2d8137414e17b2263), [`f86d293`](https://github.com/hey-api/openapi-ts/commit/f86d293f18f133ef6dd2f4864d037611b81edd26)]:\n  - @hey-api/client-fetch@0.5.7\n\n## 0.0.9\n\n### Patch Changes\n\n- Updated dependencies [[`ba56424`](https://github.com/hey-api/openapi-ts/commit/ba5642486cdd5461c2372c34b63019c02bc6874e)]:\n  - @hey-api/client-fetch@0.5.6\n\n## 0.0.8\n\n### Patch Changes\n\n- Updated dependencies [[`9cec9e8`](https://github.com/hey-api/openapi-ts/commit/9cec9e8582c12a8c041b922d9587e16f6f19782a)]:\n  - @hey-api/client-fetch@0.5.5\n\n## 0.0.7\n\n### Patch Changes\n\n- Updated dependencies [[`cbf4e84`](https://github.com/hey-api/openapi-ts/commit/cbf4e84db7f3a47f19d8c3eaa87c71b27912c1a2)]:\n  - @hey-api/client-fetch@0.5.4\n\n## 0.0.6\n\n### Patch Changes\n\n- Updated dependencies [[`646064d`](https://github.com/hey-api/openapi-ts/commit/646064d1aecea988d2b4df73bd24b2ee83394ae0)]:\n  - @hey-api/client-fetch@0.5.3\n\n## 0.0.5\n\n### Patch Changes\n\n- Updated dependencies [[`ec48d32`](https://github.com/hey-api/openapi-ts/commit/ec48d323d80de8e6a47ce7ecd732288f0a47e17a)]:\n  - @hey-api/client-fetch@0.5.2\n\n## 0.0.4\n\n### Patch Changes\n\n- Updated dependencies [[`fa8b0f1`](https://github.com/hey-api/openapi-ts/commit/fa8b0f11ed99c63f694a494944ccc2fbfa9706cc)]:\n  - @hey-api/client-fetch@0.5.1\n\n## 0.0.3\n\n### Patch Changes\n\n- Updated dependencies [[`734a62d`](https://github.com/hey-api/openapi-ts/commit/734a62dd8d594b8266964fe16766a481d37eb7df), [`734a62d`](https://github.com/hey-api/openapi-ts/commit/734a62dd8d594b8266964fe16766a481d37eb7df)]:\n  - @hey-api/client-fetch@0.5.0\n\n## 0.0.2\n\n### Patch Changes\n\n- Updated dependencies [[`4c853d0`](https://github.com/hey-api/openapi-ts/commit/4c853d090b79245854d13831f64731db4a92978b)]:\n  - @hey-api/client-fetch@0.4.4\n"
  },
  {
    "path": "examples/openapi-ts-fastify/openapi-ts.config.ts",
    "content": "import { defineConfig } from '@hey-api/openapi-ts';\n\nexport default defineConfig({\n  input:\n    'https://gist.githubusercontent.com/seriousme/55bd4c8ba2e598e416bb5543dcd362dc/raw/cf0b86ba37bb54bf1a6bf047c0ecf2a0ce4c62e0/petstore-v3.1.json',\n  logs: {\n    path: './logs',\n  },\n  output: {\n    path: './src/client',\n    postProcess: ['oxfmt', 'eslint'],\n  },\n  plugins: ['fastify', '@hey-api/sdk'],\n});\n"
  },
  {
    "path": "examples/openapi-ts-fastify/openapi.json",
    "content": "{\n  \"openapi\": \"3.1.0\",\n  \"info\": {\n    \"title\": \"Petstore API\",\n    \"version\": \"1.0.0\",\n    \"description\": \"A sample API that uses a petstore as an example\"\n  },\n  \"servers\": [\n    {\n      \"url\": \"http://localhost:3000/v3\"\n    }\n  ],\n  \"paths\": {\n    \"/pets/{petId}\": {\n      \"get\": {\n        \"summary\": \"Find pet by ID\",\n        \"operationId\": \"showPetById\",\n        \"parameters\": [\n          {\n            \"name\": \"petId\",\n            \"in\": \"path\",\n            \"required\": true,\n            \"schema\": {\n              \"type\": \"string\"\n            }\n          }\n        ],\n        \"responses\": {\n          \"200\": {\n            \"description\": \"Pet found\",\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"type\": \"object\",\n                  \"properties\": {\n                    \"id\": {\n                      \"type\": \"string\"\n                    },\n                    \"name\": {\n                      \"type\": \"string\"\n                    }\n                  }\n                }\n              }\n            }\n          }\n        }\n      }\n    },\n    \"/pets\": {\n      \"get\": {\n        \"summary\": \"List all pets\",\n        \"operationId\": \"listPets\",\n        \"responses\": {\n          \"200\": {\n            \"description\": \"A list of pets\",\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"type\": \"array\",\n                  \"items\": {\n                    \"type\": \"object\",\n                    \"properties\": {\n                      \"id\": {\n                        \"type\": \"string\"\n                      },\n                      \"name\": {\n                        \"type\": \"string\"\n                      }\n                    }\n                  }\n                }\n              }\n            }\n          }\n        }\n      },\n      \"post\": {\n        \"summary\": \"Create a pet\",\n        \"operationId\": \"createPets\",\n        \"responses\": {\n          \"201\": {\n            \"description\": \"Pet created\"\n          }\n        }\n      }\n    }\n  }\n}\n"
  },
  {
    "path": "examples/openapi-ts-fastify/package.json",
    "content": "{\n  \"name\": \"@example/openapi-ts-fastify\",\n  \"version\": \"0.1.16\",\n  \"private\": true,\n  \"type\": \"module\",\n  \"scripts\": {\n    \"openapi-ts\": \"openapi-ts\",\n    \"test\": \"vitest\",\n    \"typecheck\": \"tsgo --noEmit\"\n  },\n  \"dependencies\": {\n    \"fastify\": \"5.7.4\",\n    \"fastify-openapi-glue\": \"4.8.0\"\n  },\n  \"devDependencies\": {\n    \"@hey-api/openapi-ts\": \"workspace:*\",\n    \"eslint\": \"9.17.0\",\n    \"oxfmt\": \"0.27.0\",\n    \"typescript\": \"5.9.3\",\n    \"vite\": \"7.3.1\",\n    \"vitest\": \"4.0.18\"\n  }\n}\n"
  },
  {
    "path": "examples/openapi-ts-fastify/src/client/client/client.gen.ts",
    "content": "// 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 (options: RequestOptions) => {\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 url = buildUrl(opts);\n\n    return { opts, url };\n  };\n\n  const request: Client['request'] = async (options) => {\n    // @ts-expect-error\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"
  },
  {
    "path": "examples/openapi-ts-fastify/src/client/client/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type { Auth } from '../core/auth.gen';\nexport type { QuerySerializerOptions } from '../core/bodySerializer.gen';\nexport {\n  formDataBodySerializer,\n  jsonBodySerializer,\n  urlSearchParamsBodySerializer,\n} from '../core/bodySerializer.gen';\nexport { buildClientParams } from '../core/params.gen';\nexport { serializeQueryKeyValue } from '../core/queryKeySerializer.gen';\nexport { createClient } from './client.gen';\nexport type {\n  Client,\n  ClientOptions,\n  Config,\n  CreateClientConfig,\n  Options,\n  RequestOptions,\n  RequestResult,\n  ResolvedRequestOptions,\n  ResponseStyle,\n  TDataShape,\n} from './types.gen';\nexport { createConfig, mergeHeaders } from './utils.gen';\n"
  },
  {
    "path": "examples/openapi-ts-fastify/src/client/client/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { Auth } from '../core/auth.gen';\nimport type { ServerSentEventsOptions, ServerSentEventsResult } from '../core/serverSentEvents.gen';\nimport type { Client as CoreClient, Config as CoreConfig } from '../core/types.gen';\nimport type { Middleware } from './utils.gen';\n\nexport type ResponseStyle = 'data' | 'fields';\n\nexport interface Config<T extends ClientOptions = ClientOptions>\n  extends Omit<RequestInit, 'body' | 'headers' | 'method'>, CoreConfig {\n  /**\n   * Base URL for all requests made by this client.\n   */\n  baseUrl?: T['baseUrl'];\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   * Please don't use the Fetch client for Next.js applications. The `next`\n   * options won't have any effect.\n   *\n   * Install {@link https://www.npmjs.com/package/@hey-api/client-next `@hey-api/client-next`} instead.\n   */\n  next?: never;\n  /**\n   * Return the response data parsed in a specified format. By default, `auto`\n   * will infer the appropriate method from the `Content-Type` response header.\n   * You can override this behavior with any of the {@link Body} methods.\n   * Select `stream` if you don't want to parse response data at all.\n   *\n   * @default 'auto'\n   */\n  parseAs?: 'arrayBuffer' | 'auto' | 'blob' | 'formData' | 'json' | 'stream' | 'text';\n  /**\n   * Should we return only data or multiple fields (data, error, response, etc.)?\n   *\n   * @default 'fields'\n   */\n  responseStyle?: ResponseStyle;\n  /**\n   * Throw an error instead of returning it in the response?\n   *\n   * @default false\n   */\n  throwOnError?: T['throwOnError'];\n}\n\nexport interface RequestOptions<\n  TData = unknown,\n  TResponseStyle extends ResponseStyle = 'fields',\n  ThrowOnError extends boolean = boolean,\n  Url extends string = string,\n>\n  extends\n    Config<{\n      responseStyle: TResponseStyle;\n      throwOnError: ThrowOnError;\n    }>,\n    Pick<\n      ServerSentEventsOptions<TData>,\n      | 'onRequest'\n      | 'onSseError'\n      | 'onSseEvent'\n      | 'sseDefaultRetryDelay'\n      | 'sseMaxRetryAttempts'\n      | 'sseMaxRetryDelay'\n    > {\n  /**\n   * Any body that you want to add to your request.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/fetch#body}\n   */\n  body?: unknown;\n  path?: Record<string, unknown>;\n  query?: Record<string, unknown>;\n  /**\n   * Security mechanism(s) to use for the request.\n   */\n  security?: ReadonlyArray<Auth>;\n  url: Url;\n}\n\nexport interface ResolvedRequestOptions<\n  TResponseStyle extends ResponseStyle = 'fields',\n  ThrowOnError extends boolean = boolean,\n  Url extends string = string,\n> extends RequestOptions<unknown, TResponseStyle, ThrowOnError, Url> {\n  serializedBody?: string;\n}\n\nexport type RequestResult<\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = boolean,\n  TResponseStyle extends ResponseStyle = 'fields',\n> = ThrowOnError extends true\n  ? Promise<\n      TResponseStyle extends 'data'\n        ? TData extends Record<string, unknown>\n          ? TData[keyof TData]\n          : TData\n        : {\n            data: TData extends Record<string, unknown> ? TData[keyof TData] : TData;\n            request: Request;\n            response: Response;\n          }\n    >\n  : Promise<\n      TResponseStyle extends 'data'\n        ? (TData extends Record<string, unknown> ? TData[keyof TData] : TData) | undefined\n        : (\n            | {\n                data: TData extends Record<string, unknown> ? TData[keyof TData] : TData;\n                error: undefined;\n              }\n            | {\n                data: undefined;\n                error: TError extends Record<string, unknown> ? TError[keyof TError] : TError;\n              }\n          ) & {\n            request: Request;\n            response: Response;\n          }\n    >;\n\nexport interface ClientOptions {\n  baseUrl?: string;\n  responseStyle?: ResponseStyle;\n  throwOnError?: boolean;\n}\n\ntype MethodFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'>,\n) => RequestResult<TData, TError, ThrowOnError, TResponseStyle>;\n\ntype SseFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'>,\n) => Promise<ServerSentEventsResult<TData, TError>>;\n\ntype RequestFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'> &\n    Pick<Required<RequestOptions<TData, TResponseStyle, ThrowOnError>>, 'method'>,\n) => RequestResult<TData, TError, ThrowOnError, TResponseStyle>;\n\ntype BuildUrlFn = <\n  TData extends {\n    body?: unknown;\n    path?: Record<string, unknown>;\n    query?: Record<string, unknown>;\n    url: string;\n  },\n>(\n  options: TData & Options<TData>,\n) => string;\n\nexport type Client = CoreClient<RequestFn, Config, MethodFn, BuildUrlFn, SseFn> & {\n  interceptors: Middleware<Request, Response, unknown, ResolvedRequestOptions>;\n};\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 = ClientOptions> = (\n  override?: Config<ClientOptions & T>,\n) => Config<Required<ClientOptions> & T>;\n\nexport interface TDataShape {\n  body?: unknown;\n  headers?: unknown;\n  path?: unknown;\n  query?: unknown;\n  url: string;\n}\n\ntype OmitKeys<T, K> = Pick<T, Exclude<keyof T, K>>;\n\nexport type Options<\n  TData extends TDataShape = TDataShape,\n  ThrowOnError extends boolean = boolean,\n  TResponse = unknown,\n  TResponseStyle extends ResponseStyle = 'fields',\n> = OmitKeys<\n  RequestOptions<TResponse, TResponseStyle, ThrowOnError>,\n  'body' | 'path' | 'query' | 'url'\n> &\n  ([TData] extends [never] ? unknown : Omit<TData, 'url'>);\n"
  },
  {
    "path": "examples/openapi-ts-fastify/src/client/client/utils.gen.ts",
    "content": "// 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"
  },
  {
    "path": "examples/openapi-ts-fastify/src/client/client.gen.ts",
    "content": "// 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> = (\n  override?: Config<ClientOptions & T>,\n) => Config<Required<ClientOptions> & T>;\n\nexport const client = createClient(\n  createConfig<ClientOptions2>({ baseUrl: 'http://petstore.swagger.io/v1' }),\n);\n"
  },
  {
    "path": "examples/openapi-ts-fastify/src/client/core/auth.gen.ts",
    "content": "// 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"
  },
  {
    "path": "examples/openapi-ts-fastify/src/client/core/bodySerializer.gen.ts",
    "content": "// 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"
  },
  {
    "path": "examples/openapi-ts-fastify/src/client/core/params.gen.ts",
    "content": "// 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"
  },
  {
    "path": "examples/openapi-ts-fastify/src/client/core/pathSerializer.gen.ts",
    "content": "// 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"
  },
  {
    "path": "examples/openapi-ts-fastify/src/client/core/queryKeySerializer.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\n/**\n * JSON-friendly union that mirrors what Pinia Colada can hash.\n */\nexport type JsonValue =\n  | null\n  | string\n  | number\n  | boolean\n  | JsonValue[]\n  | { [key: string]: JsonValue };\n\n/**\n * Replacer that converts non-JSON values (bigint, Date, etc.) to safe substitutes.\n */\nexport const queryKeyJsonReplacer = (_key: string, value: unknown) => {\n  if (value === undefined || typeof value === 'function' || typeof value === 'symbol') {\n    return undefined;\n  }\n  if (typeof value === 'bigint') {\n    return value.toString();\n  }\n  if (value instanceof Date) {\n    return value.toISOString();\n  }\n  return value;\n};\n\n/**\n * Safely stringifies a value and parses it back into a JsonValue.\n */\nexport const stringifyToJsonValue = (input: unknown): JsonValue | undefined => {\n  try {\n    const json = JSON.stringify(input, queryKeyJsonReplacer);\n    if (json === undefined) {\n      return undefined;\n    }\n    return JSON.parse(json) as JsonValue;\n  } catch {\n    return undefined;\n  }\n};\n\n/**\n * Detects plain objects (including objects with a null prototype).\n */\nconst isPlainObject = (value: unknown): value is Record<string, unknown> => {\n  if (value === null || typeof value !== 'object') {\n    return false;\n  }\n  const prototype = Object.getPrototypeOf(value as object);\n  return prototype === Object.prototype || prototype === null;\n};\n\n/**\n * Turns URLSearchParams into a sorted JSON object for deterministic keys.\n */\nconst serializeSearchParams = (params: URLSearchParams): JsonValue => {\n  const entries = Array.from(params.entries()).sort(([a], [b]) => a.localeCompare(b));\n  const result: Record<string, JsonValue> = {};\n\n  for (const [key, value] of entries) {\n    const existing = result[key];\n    if (existing === undefined) {\n      result[key] = value;\n      continue;\n    }\n\n    if (Array.isArray(existing)) {\n      (existing as string[]).push(value);\n    } else {\n      result[key] = [existing, value];\n    }\n  }\n\n  return result;\n};\n\n/**\n * Normalizes any accepted value into a JSON-friendly shape for query keys.\n */\nexport const serializeQueryKeyValue = (value: unknown): JsonValue | undefined => {\n  if (value === null) {\n    return null;\n  }\n\n  if (typeof value === 'string' || typeof value === 'number' || typeof value === 'boolean') {\n    return value;\n  }\n\n  if (value === undefined || typeof value === 'function' || typeof value === 'symbol') {\n    return undefined;\n  }\n\n  if (typeof value === 'bigint') {\n    return value.toString();\n  }\n\n  if (value instanceof Date) {\n    return value.toISOString();\n  }\n\n  if (Array.isArray(value)) {\n    return stringifyToJsonValue(value);\n  }\n\n  if (typeof URLSearchParams !== 'undefined' && value instanceof URLSearchParams) {\n    return serializeSearchParams(value);\n  }\n\n  if (isPlainObject(value)) {\n    return stringifyToJsonValue(value);\n  }\n\n  return undefined;\n};\n"
  },
  {
    "path": "examples/openapi-ts-fastify/src/client/core/serverSentEvents.gen.ts",
    "content": "// 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 const 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            // Normalize line endings: CRLF -> LF, then CR -> LF\n            buffer = buffer.replace(/\\r\\n/g, '\\n').replace(/\\r/g, '\\n');\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"
  },
  {
    "path": "examples/openapi-ts-fastify/src/client/core/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { Auth, AuthToken } from './auth.gen';\nimport type { BodySerializer, QuerySerializer, QuerySerializerOptions } from './bodySerializer.gen';\n\nexport type HttpMethod =\n  | 'connect'\n  | 'delete'\n  | 'get'\n  | 'head'\n  | 'options'\n  | 'patch'\n  | 'post'\n  | 'put'\n  | 'trace';\n\nexport type Client<\n  RequestFn = never,\n  Config = unknown,\n  MethodFn = never,\n  BuildUrlFn = never,\n  SseFn = never,\n> = {\n  /**\n   * Returns the final request URL.\n   */\n  buildUrl: BuildUrlFn;\n  getConfig: () => Config;\n  request: RequestFn;\n  setConfig: (config: Config) => Config;\n} & {\n  [K in HttpMethod]: MethodFn;\n} & ([SseFn] extends [never] ? { sse?: never } : { sse: { [K in HttpMethod]: SseFn } });\n\nexport interface Config {\n  /**\n   * Auth token or a function returning auth token. The resolved value will be\n   * added to the request payload as defined by its `security` array.\n   */\n  auth?: ((auth: Auth) => Promise<AuthToken> | AuthToken) | AuthToken;\n  /**\n   * A function for serializing request body parameter. By default,\n   * {@link JSON.stringify()} will be used.\n   */\n  bodySerializer?: BodySerializer | null;\n  /**\n   * An object containing any HTTP headers that you want to pre-populate your\n   * `Headers` object with.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/Headers/Headers#init See more}\n   */\n  headers?:\n    | RequestInit['headers']\n    | Record<\n        string,\n        string | number | boolean | (string | number | boolean)[] | null | undefined | unknown\n      >;\n  /**\n   * The request method.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/fetch#method See more}\n   */\n  method?: Uppercase<HttpMethod>;\n  /**\n   * A function for serializing request query parameters. By default, arrays\n   * will be exploded in form style, objects will be exploded in deepObject\n   * style, and reserved characters are percent-encoded.\n   *\n   * This method will have no effect if the native `paramsSerializer()` Axios\n   * API function is used.\n   *\n   * {@link https://swagger.io/docs/specification/serialization/#query View examples}\n   */\n  querySerializer?: QuerySerializer | QuerySerializerOptions;\n  /**\n   * A function validating request data. This is useful if you want to ensure\n   * the request conforms to the desired shape, so it can be safely sent to\n   * the server.\n   */\n  requestValidator?: (data: unknown) => Promise<unknown>;\n  /**\n   * A function transforming response data before it's returned. This is useful\n   * for post-processing data, e.g. converting ISO strings into Date objects.\n   */\n  responseTransformer?: (data: unknown) => Promise<unknown>;\n  /**\n   * A function validating response data. This is useful if you want to ensure\n   * the response conforms to the desired shape, so it can be safely passed to\n   * the transformers and returned to the user.\n   */\n  responseValidator?: (data: unknown) => Promise<unknown>;\n}\n\ntype IsExactlyNeverOrNeverUndefined<T> = [T] extends [never]\n  ? true\n  : [T] extends [never | undefined]\n    ? [undefined] extends [T]\n      ? false\n      : true\n    : false;\n\nexport type OmitNever<T extends Record<string, unknown>> = {\n  [K in keyof T as IsExactlyNeverOrNeverUndefined<T[K]> extends true ? never : K]: T[K];\n};\n"
  },
  {
    "path": "examples/openapi-ts-fastify/src/client/core/utils.gen.ts",
    "content": "// 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"
  },
  {
    "path": "examples/openapi-ts-fastify/src/client/fastify.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { RouteHandler } from 'fastify';\n\nimport type {\n  CreatePetsResponses,\n  ListPetsData,\n  ListPetsResponses,\n  ShowPetByIdData,\n  ShowPetByIdResponses,\n} from './types.gen';\n\nexport type RouteHandlers = {\n  createPets: RouteHandler<{\n    Reply: CreatePetsResponses;\n  }>;\n  listPets: RouteHandler<{\n    Querystring?: ListPetsData['query'];\n    Reply: ListPetsResponses;\n  }>;\n  showPetById: RouteHandler<{\n    Params: ShowPetByIdData['path'];\n    Reply: ShowPetByIdResponses;\n  }>;\n};\n"
  },
  {
    "path": "examples/openapi-ts-fastify/src/client/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport { createPets, listPets, type Options, showPetById } from './sdk.gen';\nexport type {\n  ClientOptions,\n  CreatePetsData,\n  CreatePetsError,\n  CreatePetsErrors,\n  CreatePetsResponses,\n  Error,\n  ListPetsData,\n  ListPetsError,\n  ListPetsErrors,\n  ListPetsResponse,\n  ListPetsResponses,\n  Pet,\n  Pets,\n  ShowPetByIdData,\n  ShowPetByIdError,\n  ShowPetByIdErrors,\n  ShowPetByIdResponse,\n  ShowPetByIdResponses,\n} from './types.gen';\n"
  },
  {
    "path": "examples/openapi-ts-fastify/src/client/sdk.gen.ts",
    "content": "// 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 {\n  CreatePetsData,\n  CreatePetsErrors,\n  CreatePetsResponses,\n  ListPetsData,\n  ListPetsErrors,\n  ListPetsResponses,\n  ShowPetByIdData,\n  ShowPetByIdErrors,\n  ShowPetByIdResponses,\n} from './types.gen';\n\nexport type Options<\n  TData extends TDataShape = TDataShape,\n  ThrowOnError extends boolean = boolean,\n> = Options2<TData, ThrowOnError> & {\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 all pets\n */\nexport const listPets = <ThrowOnError extends boolean = false>(\n  options?: Options<ListPetsData, ThrowOnError>,\n) =>\n  (options?.client ?? client).get<ListPetsResponses, ListPetsErrors, ThrowOnError>({\n    url: '/pets',\n    ...options,\n  });\n\n/**\n * Create a pet\n */\nexport const createPets = <ThrowOnError extends boolean = false>(\n  options?: Options<CreatePetsData, ThrowOnError>,\n) =>\n  (options?.client ?? client).post<CreatePetsResponses, CreatePetsErrors, ThrowOnError>({\n    url: '/pets',\n    ...options,\n  });\n\n/**\n * Info for a specific pet\n */\nexport const showPetById = <ThrowOnError extends boolean = false>(\n  options: Options<ShowPetByIdData, ThrowOnError>,\n) =>\n  (options.client ?? client).get<ShowPetByIdResponses, ShowPetByIdErrors, ThrowOnError>({\n    url: '/pets/{petId}',\n    ...options,\n  });\n"
  },
  {
    "path": "examples/openapi-ts-fastify/src/client/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type ClientOptions = {\n  baseUrl: 'http://petstore.swagger.io/v1' | (string & {});\n};\n\nexport type Pet = {\n  id: number;\n  name: string;\n  tag?: string;\n};\n\nexport type Pets = Array<Pet>;\n\nexport type Error = {\n  code: number;\n  message: string;\n};\n\nexport type ListPetsData = {\n  body?: never;\n  path?: never;\n  query?: {\n    /**\n     * How many items to return at one time (max 100)\n     */\n    limit?: number;\n  };\n  url: '/pets';\n};\n\nexport type ListPetsErrors = {\n  /**\n   * unexpected error\n   */\n  default: Error;\n};\n\nexport type ListPetsError = ListPetsErrors[keyof ListPetsErrors];\n\nexport type ListPetsResponses = {\n  /**\n   * A paged array of pets\n   */\n  200: Pets;\n};\n\nexport type ListPetsResponse = ListPetsResponses[keyof ListPetsResponses];\n\nexport type CreatePetsData = {\n  body?: never;\n  path?: never;\n  query?: never;\n  url: '/pets';\n};\n\nexport type CreatePetsErrors = {\n  /**\n   * unexpected error\n   */\n  default: Error;\n};\n\nexport type CreatePetsError = CreatePetsErrors[keyof CreatePetsErrors];\n\nexport type CreatePetsResponses = {\n  /**\n   * Null response\n   */\n  201: unknown;\n};\n\nexport type ShowPetByIdData = {\n  body?: never;\n  path: {\n    /**\n     * The id of the pet to retrieve\n     */\n    petId: string;\n  };\n  query?: never;\n  url: '/pets/{petId}';\n};\n\nexport type ShowPetByIdErrors = {\n  /**\n   * unexpected error\n   */\n  default: Error;\n};\n\nexport type ShowPetByIdError = ShowPetByIdErrors[keyof ShowPetByIdErrors];\n\nexport type ShowPetByIdResponses = {\n  /**\n   * Expected response to a valid request\n   */\n  200: Pet;\n};\n\nexport type ShowPetByIdResponse = ShowPetByIdResponses[keyof ShowPetByIdResponses];\n"
  },
  {
    "path": "examples/openapi-ts-fastify/src/handlers.ts",
    "content": "import type { RouteHandlers } from './client/fastify.gen';\n\nexport const serviceHandlers: RouteHandlers = {\n  createPets(request, reply) {\n    reply.code(201).send();\n  },\n  listPets(request, reply) {\n    reply.code(200).send([]);\n  },\n  showPetById(request, reply) {\n    reply.code(200).send({\n      id: Number(request.params.petId),\n      name: 'Kitty',\n    });\n  },\n};\n"
  },
  {
    "path": "examples/openapi-ts-fastify/src/index.ts",
    "content": "import { buildServer } from './server';\n\nbuildServer().then((fastify) => {\n  fastify.listen({ port: 3000 }, function (err) {\n    if (err) {\n      fastify.log.error(err);\n      process.exit(1);\n    }\n  });\n});\n"
  },
  {
    "path": "examples/openapi-ts-fastify/src/server.ts",
    "content": "import { readFileSync } from 'node:fs';\nimport { join } from 'node:path';\n\nimport Fastify from 'fastify';\nimport glue from 'fastify-openapi-glue';\n\nimport { serviceHandlers } from './handlers';\n\nexport const buildServer = async () => {\n  const fastify = Fastify();\n\n  const specificationPath = join(__dirname, '..', 'openapi.json');\n  const specificationJson = JSON.parse(readFileSync(specificationPath, 'utf-8'));\n\n  fastify.register(glue, {\n    prefix: 'v3',\n    serviceHandlers,\n    specification: specificationJson,\n  });\n\n  return fastify;\n};\n"
  },
  {
    "path": "examples/openapi-ts-fastify/test/pets.test.ts",
    "content": "import { type FastifyInstance } from 'fastify';\nimport { showPetById } from 'src/client';\nimport { client } from 'src/client/client.gen';\nimport { buildServer } from 'src/server';\n\ndescribe('/pet/findByTags', () => {\n  let server: FastifyInstance;\n\n  beforeAll(async () => {\n    server = await buildServer();\n    await server.listen();\n\n    // @ts-ignore\n    const baseUrl = `http://localhost:${server.server.address().port}/v3`;\n    client.setConfig({ baseUrl });\n  });\n\n  afterAll(async () => {\n    await Promise.all([server.close()]);\n  });\n\n  test('showPetById', async () => {\n    const result = await showPetById({\n      client,\n      path: {\n        petId: '123',\n      },\n    });\n    expect(result.response.status).toBe(200);\n  });\n});\n"
  },
  {
    "path": "examples/openapi-ts-fastify/tsconfig.json",
    "content": "{\n  \"include\": [\"src/**/*\", \"test/**/*\"],\n  \"compilerOptions\": {\n    \"esModuleInterop\": true,\n    \"paths\": { \"*\": [\"./*\"] },\n    \"lib\": [\"es2023\", \"dom\", \"dom.iterable\"],\n    \"module\": \"ESNext\",\n    \"moduleResolution\": \"Bundler\",\n    \"skipLibCheck\": true,\n    \"strict\": true,\n    \"target\": \"es2022\",\n    \"types\": [\"vitest/globals\"]\n  },\n  \"references\": [{ \"path\": \"./tsconfig.node.json\" }]\n}\n"
  },
  {
    "path": "examples/openapi-ts-fastify/tsconfig.node.json",
    "content": "{\n  \"compilerOptions\": {\n    \"composite\": true,\n    \"skipLibCheck\": true,\n    \"module\": \"ESNext\",\n    \"moduleResolution\": \"bundler\",\n    \"allowSyntheticDefaultImports\": true,\n    \"strict\": true\n  },\n  \"include\": [\"vite.config.ts\"]\n}\n"
  },
  {
    "path": "examples/openapi-ts-fastify/vite.config.ts",
    "content": "import { defineProject } from 'vitest/config';\n\nexport default defineProject({\n  resolve: {\n    alias: {\n      src: new URL('./src', import.meta.url).pathname,\n    },\n  },\n  test: {\n    environment: 'node',\n    include: ['test/**/*.test.ts'],\n  },\n});\n"
  },
  {
    "path": "examples/openapi-ts-fetch/.gitignore",
    "content": "# Logs\nlogs\n*.log\nnpm-debug.log*\nyarn-debug.log*\nyarn-error.log*\npnpm-debug.log*\nlerna-debug.log*\n\nnode_modules\ndist\ndist-ssr\n*.local\n\n# Editor directories and files\n.vscode/*\n!.vscode/extensions.json\n.idea\n.DS_Store\n*.suo\n*.ntvs*\n*.njsproj\n*.sln\n*.sw?\n"
  },
  {
    "path": "examples/openapi-ts-fetch/CHANGELOG.md",
    "content": "# @example/openapi-ts-fetch\n\n## 0.0.57\n\n### Patch Changes\n\n- Updated dependencies [[`f23f3ae`](https://github.com/hey-api/openapi-ts/commit/f23f3ae874385e758eb8d43bb4e274c9858a4e40)]:\n  - @hey-api/client-fetch@0.13.1\n\n## 0.0.56\n\n### Patch Changes\n\n- Updated dependencies [[`10d2e03`](https://github.com/hey-api/openapi-ts/commit/10d2e03b8295e4e887fab8d023aa823699efbae8)]:\n  - @hey-api/client-fetch@0.13.0\n\n## 0.0.55\n\n### Patch Changes\n\n- Updated dependencies [[`4d8c030`](https://github.com/hey-api/openapi-ts/commit/4d8c03038979c9a75315cc158789b3c198c62f90)]:\n  - @hey-api/client-fetch@0.12.0\n\n## 0.0.54\n\n### Patch Changes\n\n- Updated dependencies [[`8152aaf`](https://github.com/hey-api/openapi-ts/commit/8152aaf4892c48b79fd3dc486eb3c0ea333dc3e6)]:\n  - @hey-api/client-fetch@0.11.0\n\n## 0.0.53\n\n### Patch Changes\n\n- Updated dependencies [[`1f99066`](https://github.com/hey-api/openapi-ts/commit/1f99066efbb2d0e6b9e3710c701293c2cc09d65e)]:\n  - @hey-api/client-fetch@0.10.2\n\n## 0.0.52\n\n### Patch Changes\n\n- Updated dependencies [[`565e0b8`](https://github.com/hey-api/openapi-ts/commit/565e0b89fbab4556ecdc63dfe08250942681140e)]:\n  - @hey-api/client-fetch@0.10.1\n\n## 0.0.51\n\n### Patch Changes\n\n- Updated dependencies [[`fed9699`](https://github.com/hey-api/openapi-ts/commit/fed969985275621c7c2b65ffc760c7c66fafaf72)]:\n  - @hey-api/client-fetch@0.10.0\n\n## 0.0.50\n\n### Patch Changes\n\n- Updated dependencies [[`67c385b`](https://github.com/hey-api/openapi-ts/commit/67c385bf6289a79726b0cdd85fd81ca501cf2248)]:\n  - @hey-api/client-fetch@0.9.0\n\n## 0.0.49\n\n### Patch Changes\n\n- Updated dependencies [[`fe43b88`](https://github.com/hey-api/openapi-ts/commit/fe43b889c20a2001f56e259f93f64851a1caa1d1)]:\n  - @hey-api/client-fetch@0.8.4\n\n## 0.0.48\n\n### Patch Changes\n\n- Updated dependencies [[`c0b36b9`](https://github.com/hey-api/openapi-ts/commit/c0b36b95645d484034c3af145c5554867568979b)]:\n  - @hey-api/client-fetch@0.8.3\n\n## 0.0.47\n\n### Patch Changes\n\n- Updated dependencies [[`b8cc9f8`](https://github.com/hey-api/openapi-ts/commit/b8cc9f8a5eaf4f4ff345abc49c14c6b96744c2ea)]:\n  - @hey-api/client-fetch@0.8.2\n\n## 0.0.46\n\n### Patch Changes\n\n- Updated dependencies [[`7f0f4a7`](https://github.com/hey-api/openapi-ts/commit/7f0f4a76b06c8fafb33581b522faf8efc6fd85ac)]:\n  - @hey-api/client-fetch@0.8.1\n\n## 0.0.45\n\n### Patch Changes\n\n- Updated dependencies [[`bb6d46a`](https://github.com/hey-api/openapi-ts/commit/bb6d46ae119ce4e7e3a2ab3fded74ac4fb4cdff2)]:\n  - @hey-api/client-fetch@0.8.0\n\n## 0.0.44\n\n### Patch Changes\n\n- Updated dependencies [[`2dc380e`](https://github.com/hey-api/openapi-ts/commit/2dc380eabc17c723654beb04ecd7bce6d33d3b49), [`603541e`](https://github.com/hey-api/openapi-ts/commit/603541e307dc2953da7dddd300176865629b50bb), [`2cbffeb`](https://github.com/hey-api/openapi-ts/commit/2cbffeb2cdd6c6143cd68cac68369584879dda31), [`2cbffeb`](https://github.com/hey-api/openapi-ts/commit/2cbffeb2cdd6c6143cd68cac68369584879dda31)]:\n  - @hey-api/client-fetch@0.7.3\n\n## 0.0.43\n\n### Patch Changes\n\n- Updated dependencies [[`8eba19d`](https://github.com/hey-api/openapi-ts/commit/8eba19d4092fc0903572ab9fdadf0b4c26928ba2)]:\n  - @hey-api/client-fetch@0.7.2\n\n## 0.0.42\n\n### Patch Changes\n\n- Updated dependencies [[`0432418`](https://github.com/hey-api/openapi-ts/commit/0432418d72c94ef94865f8216ed2f723ad5191f9), [`4784727`](https://github.com/hey-api/openapi-ts/commit/47847276e8bc854045044dd414382080270dd779)]:\n  - @hey-api/client-fetch@0.7.1\n\n## 0.0.41\n\n### Patch Changes\n\n- Updated dependencies [[`465410c`](https://github.com/hey-api/openapi-ts/commit/465410c201eb19e737e3143ad53a146e95f80107)]:\n  - @hey-api/client-fetch@0.7.0\n\n## 0.0.40\n\n### Patch Changes\n\n- Updated dependencies [[`e2e1410`](https://github.com/hey-api/openapi-ts/commit/e2e1410b22c0c84c40d1b1803e9650d546350cb7)]:\n  - @hey-api/client-fetch@0.6.0\n\n## 0.0.39\n\n### Patch Changes\n\n- Updated dependencies [[`20d7497`](https://github.com/hey-api/openapi-ts/commit/20d7497acb6c046f6a4206c2d8137414e17b2263), [`f86d293`](https://github.com/hey-api/openapi-ts/commit/f86d293f18f133ef6dd2f4864d037611b81edd26)]:\n  - @hey-api/client-fetch@0.5.7\n\n## 0.0.38\n\n### Patch Changes\n\n- Updated dependencies [[`ba56424`](https://github.com/hey-api/openapi-ts/commit/ba5642486cdd5461c2372c34b63019c02bc6874e)]:\n  - @hey-api/client-fetch@0.5.6\n\n## 0.0.37\n\n### Patch Changes\n\n- Updated dependencies [[`9cec9e8`](https://github.com/hey-api/openapi-ts/commit/9cec9e8582c12a8c041b922d9587e16f6f19782a)]:\n  - @hey-api/client-fetch@0.5.5\n\n## 0.0.36\n\n### Patch Changes\n\n- Updated dependencies [[`cbf4e84`](https://github.com/hey-api/openapi-ts/commit/cbf4e84db7f3a47f19d8c3eaa87c71b27912c1a2)]:\n  - @hey-api/client-fetch@0.5.4\n\n## 0.0.35\n\n### Patch Changes\n\n- Updated dependencies [[`646064d`](https://github.com/hey-api/openapi-ts/commit/646064d1aecea988d2b4df73bd24b2ee83394ae0)]:\n  - @hey-api/client-fetch@0.5.3\n\n## 0.0.34\n\n### Patch Changes\n\n- Updated dependencies [[`ec48d32`](https://github.com/hey-api/openapi-ts/commit/ec48d323d80de8e6a47ce7ecd732288f0a47e17a)]:\n  - @hey-api/client-fetch@0.5.2\n\n## 0.0.33\n\n### Patch Changes\n\n- Updated dependencies [[`fa8b0f1`](https://github.com/hey-api/openapi-ts/commit/fa8b0f11ed99c63f694a494944ccc2fbfa9706cc)]:\n  - @hey-api/client-fetch@0.5.1\n\n## 0.0.32\n\n### Patch Changes\n\n- Updated dependencies [[`734a62d`](https://github.com/hey-api/openapi-ts/commit/734a62dd8d594b8266964fe16766a481d37eb7df), [`734a62d`](https://github.com/hey-api/openapi-ts/commit/734a62dd8d594b8266964fe16766a481d37eb7df)]:\n  - @hey-api/client-fetch@0.5.0\n\n## 0.0.31\n\n### Patch Changes\n\n- Updated dependencies [[`4c853d0`](https://github.com/hey-api/openapi-ts/commit/4c853d090b79245854d13831f64731db4a92978b)]:\n  - @hey-api/client-fetch@0.4.4\n\n## 0.0.30\n\n### Patch Changes\n\n- Updated dependencies [[`01dee3d`](https://github.com/hey-api/openapi-ts/commit/01dee3df879232939e43355231147b3d910fb482)]:\n  - @hey-api/client-fetch@0.4.3\n\n## 0.0.29\n\n### Patch Changes\n\n- [#1151](https://github.com/hey-api/openapi-ts/pull/1151) [`587791d`](https://github.com/hey-api/openapi-ts/commit/587791dfede0167fbed229281467e4c4875936f5) Thanks [@mrlubos](https://github.com/mrlubos)! - fix: update website domain, add license documentation\n\n- Updated dependencies [[`587791d`](https://github.com/hey-api/openapi-ts/commit/587791dfede0167fbed229281467e4c4875936f5)]:\n  - @hey-api/client-fetch@0.4.2\n\n## 0.0.28\n\n### Patch Changes\n\n- Updated dependencies [[`a0a5551`](https://github.com/hey-api/openapi-ts/commit/a0a55510d30a1a8dea0ade4908b5b13d51b5f9e6)]:\n  - @hey-api/client-fetch@0.4.1\n\n## 0.0.27\n\n### Patch Changes\n\n- Updated dependencies [[`df5c690`](https://github.com/hey-api/openapi-ts/commit/df5c69048a03a1c7729a5200c586164287a8a6fa), [`df5c690`](https://github.com/hey-api/openapi-ts/commit/df5c69048a03a1c7729a5200c586164287a8a6fa)]:\n  - @hey-api/client-fetch@0.4.0\n\n## 0.0.26\n\n### Patch Changes\n\n- Updated dependencies [[`7f986c2`](https://github.com/hey-api/openapi-ts/commit/7f986c2c7726ed8fbf16f8b235b7769c7d990502)]:\n  - @hey-api/client-fetch@0.3.4\n\n## 0.0.25\n\n### Patch Changes\n\n- Updated dependencies [[`fe743c2`](https://github.com/hey-api/openapi-ts/commit/fe743c2d41c23bf7e1706bceedd6319299131197)]:\n  - @hey-api/client-fetch@0.3.3\n\n## 0.0.24\n\n### Patch Changes\n\n- Updated dependencies [[`11a276a`](https://github.com/hey-api/openapi-ts/commit/11a276a1e35dde0735363e892d8142016fd87eec)]:\n  - @hey-api/client-fetch@0.3.2\n\n## 0.0.23\n\n### Patch Changes\n\n- Updated dependencies [[`7ae2b1d`](https://github.com/hey-api/openapi-ts/commit/7ae2b1db047f3b6efe917a8b43ac7c851fb86c8f), [`2079c6e`](https://github.com/hey-api/openapi-ts/commit/2079c6e83a6b71e157c8e7ea56260b4e9ff8411d)]:\n  - @hey-api/client-fetch@0.3.1\n\n## 0.0.22\n\n### Patch Changes\n\n- Updated dependencies [[`7ebc1d4`](https://github.com/hey-api/openapi-ts/commit/7ebc1d44af74db2522219d71d240325f6bc5689d)]:\n  - @hey-api/client-fetch@0.3.0\n\n## 0.0.21\n\n### Patch Changes\n\n- [#899](https://github.com/hey-api/openapi-ts/pull/899) [`a8c84c0`](https://github.com/hey-api/openapi-ts/commit/a8c84c02dbb5ef1a59f5d414dff425e135c7a446) Thanks [@mrlubos](https://github.com/mrlubos)! - fix: preserve key name in Date transformation\n\n- Updated dependencies [[`a8c84c0`](https://github.com/hey-api/openapi-ts/commit/a8c84c02dbb5ef1a59f5d414dff425e135c7a446), [`7825a2f`](https://github.com/hey-api/openapi-ts/commit/7825a2fba566a76c63775172ef0569ef375406b6)]:\n  - @hey-api/client-fetch@0.2.4\n\n## 0.0.20\n\n### Patch Changes\n\n- [#895](https://github.com/hey-api/openapi-ts/pull/895) [`44de8d8`](https://github.com/hey-api/openapi-ts/commit/44de8d89556b3abf48acc4e23c9b9c198059c757) Thanks [@mrlubos](https://github.com/mrlubos)! - fix: define ThrowOnError generic as the last argument\n\n- Updated dependencies [[`44de8d8`](https://github.com/hey-api/openapi-ts/commit/44de8d89556b3abf48acc4e23c9b9c198059c757)]:\n  - @hey-api/client-fetch@0.2.3\n\n## 0.0.19\n\n### Patch Changes\n\n- Updated dependencies [[`72e2c4f`](https://github.com/hey-api/openapi-ts/commit/72e2c4fd7d07e532a848078c034bf33b6558ad3c)]:\n  - @hey-api/client-fetch@0.2.2\n\n## 0.0.18\n\n### Patch Changes\n\n- Updated dependencies [[`ec6bfc8`](https://github.com/hey-api/openapi-ts/commit/ec6bfc8292cce7663dfc6e0fcd89b44c56f08bb4), [`93e2d11`](https://github.com/hey-api/openapi-ts/commit/93e2d11d2a8ddd1f78dde46eceeb5543cae07e36), [`a73da1c`](https://github.com/hey-api/openapi-ts/commit/a73da1c854503246b6c58f1abea5dd77727eedca), [`da92c53`](https://github.com/hey-api/openapi-ts/commit/da92c535c14e3217d565472fe65c687243bc0dd8)]:\n  - @hey-api/client-fetch@0.2.1\n\n## 0.0.17\n\n### Patch Changes\n\n- Updated dependencies [[`babf11a`](https://github.com/hey-api/openapi-ts/commit/babf11ae082af642ac71cfee9c523cc976132a50), [`babf11a`](https://github.com/hey-api/openapi-ts/commit/babf11ae082af642ac71cfee9c523cc976132a50)]:\n  - @hey-api/client-fetch@0.2.0\n\n## 0.0.16\n\n### Patch Changes\n\n- Updated dependencies [[`8c9c874`](https://github.com/hey-api/openapi-ts/commit/8c9c8749594622283eed2c37bddfa0f1b8cf23a4)]:\n  - @hey-api/client-fetch@0.1.14\n\n## 0.0.15\n\n### Patch Changes\n\n- Updated dependencies [[`8e3c634`](https://github.com/hey-api/openapi-ts/commit/8e3c6343672b9280365c3266f94e4acba533bf29)]:\n  - @hey-api/client-fetch@0.1.13\n\n## 0.0.14\n\n### Patch Changes\n\n- [#823](https://github.com/hey-api/openapi-ts/pull/823) [`23c9dcd`](https://github.com/hey-api/openapi-ts/commit/23c9dcd5de19de62d745cc539674c815b2588cd2) Thanks [@mrlubos](https://github.com/mrlubos)! - fix: correctly process body parameter for OpenAPI 2.0 specs\n\n## 0.0.13\n\n### Patch Changes\n\n- Updated dependencies [[`0c4ee06`](https://github.com/hey-api/openapi-ts/commit/0c4ee06548f177ce83d73802471c659834c63566)]:\n  - @hey-api/client-fetch@0.1.12\n\n## 0.0.12\n\n### Patch Changes\n\n- Updated dependencies [[`c0ee1e3`](https://github.com/hey-api/openapi-ts/commit/c0ee1e3b56d67ab922491c488233bd89c8902986)]:\n  - @hey-api/client-fetch@0.1.11\n\n## 0.0.11\n\n### Patch Changes\n\n- Updated dependencies [[`ecd94f2`](https://github.com/hey-api/openapi-ts/commit/ecd94f2adab1dbe10e7a9c310d1fb6d1f170d332)]:\n  - @hey-api/client-fetch@0.1.10\n\n## 0.0.10\n\n### Patch Changes\n\n- Updated dependencies [[`e7e98d2`](https://github.com/hey-api/openapi-ts/commit/e7e98d279fe0ee4c71ae72a7b57afdd517a89641)]:\n  - @hey-api/client-fetch@0.1.9\n\n## 0.0.9\n\n### Patch Changes\n\n- Updated dependencies [[`d546a3f`](https://github.com/hey-api/openapi-ts/commit/d546a3f9fd0a6ff5181deb50ed467acd75370889)]:\n  - @hey-api/client-fetch@0.1.8\n\n## 0.0.8\n\n### Patch Changes\n\n- Updated dependencies [[`8410046`](https://github.com/hey-api/openapi-ts/commit/8410046c45d25db48ba940a0c6c7a7cda9e86b6a)]:\n  - @hey-api/client-fetch@0.1.7\n\n## 0.0.7\n\n### Patch Changes\n\n- Updated dependencies [[`aa661a1`](https://github.com/hey-api/openapi-ts/commit/aa661a136d1174eadf4d11538e473b0d96b91b81)]:\n  - @hey-api/client-fetch@0.1.6\n\n## 0.0.6\n\n### Patch Changes\n\n- Updated dependencies [[`fc2b166`](https://github.com/hey-api/openapi-ts/commit/fc2b166c8f683ece948284cf7a629fcd5b096b40)]:\n  - @hey-api/client-fetch@0.1.5\n\n## 0.0.5\n\n### Patch Changes\n\n- Updated dependencies [[`da31b74`](https://github.com/hey-api/openapi-ts/commit/da31b7424b30e00233df5a3867022832c4981312), [`34980a4`](https://github.com/hey-api/openapi-ts/commit/34980a4dc8269c9256d65984ff29270851689c43), [`34980a4`](https://github.com/hey-api/openapi-ts/commit/34980a4dc8269c9256d65984ff29270851689c43)]:\n  - @hey-api/client-fetch@0.1.4\n\n## 0.0.4\n\n### Patch Changes\n\n- Updated dependencies [[`820002f`](https://github.com/hey-api/openapi-ts/commit/820002ffe687b01c7a9b2250e19ddbafd1aaed71)]:\n  - @hey-api/client-fetch@0.1.3\n\n## 0.0.3\n\n### Patch Changes\n\n- Updated dependencies [[`735561c82dbe0979f2c175d274159c20ba8e622d`](https://github.com/hey-api/openapi-ts/commit/735561c82dbe0979f2c175d274159c20ba8e622d)]:\n  - @hey-api/client-fetch@0.1.2\n\n## 0.0.2\n\n### Patch Changes\n\n- Updated dependencies [[`616a4ea0265e09f3997ac2156c341a5cc0b49029`](https://github.com/hey-api/openapi-ts/commit/616a4ea0265e09f3997ac2156c341a5cc0b49029)]:\n  - @hey-api/client-fetch@0.1.1\n\n## 0.0.1\n\n### Patch Changes\n\n- Updated dependencies [[`c416343eb499791dd4771866de1862a2d5d69350`](https://github.com/hey-api/openapi-ts/commit/c416343eb499791dd4771866de1862a2d5d69350)]:\n  - @hey-api/client-fetch@0.1.0\n"
  },
  {
    "path": "examples/openapi-ts-fetch/index.html",
    "content": "<!doctype html>\n<html lang=\"en\">\n  <head>\n    <meta charset=\"UTF-8\" />\n    <!-- <link rel=\"icon\" type=\"image/svg+xml\" href=\"/vite.svg\" /> -->\n    <meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\" />\n    <title>Hey API + Fetch API Demo</title>\n  </head>\n  <body>\n    <div id=\"root\"></div>\n    <script type=\"module\" src=\"/src/main.tsx\"></script>\n  </body>\n</html>\n"
  },
  {
    "path": "examples/openapi-ts-fetch/openapi-ts.config.ts",
    "content": "import { defineConfig } from '@hey-api/openapi-ts';\n\nexport default defineConfig({\n  input:\n    'https://raw.githubusercontent.com/swagger-api/swagger-petstore/master/src/main/resources/openapi.yaml',\n  logs: {\n    path: './logs',\n  },\n  output: {\n    path: './src/client',\n    postProcess: ['oxfmt', 'eslint'],\n  },\n  plugins: [\n    '@hey-api/client-fetch',\n    '@hey-api/schemas',\n    '@hey-api/sdk',\n    {\n      enums: 'javascript',\n      name: '@hey-api/typescript',\n    },\n  ],\n});\n"
  },
  {
    "path": "examples/openapi-ts-fetch/package.json",
    "content": "{\n  \"name\": \"@example/openapi-ts-fetch\",\n  \"version\": \"0.0.57\",\n  \"private\": true,\n  \"type\": \"module\",\n  \"scripts\": {\n    \"build\": \"tsgo --noEmit && vite build\",\n    \"dev\": \"vite\",\n    \"lint\": \"eslint . --report-unused-disable-directives --max-warnings 0\",\n    \"openapi-ts\": \"openapi-ts\",\n    \"preview\": \"vite preview\",\n    \"typecheck\": \"tsgo --noEmit\"\n  },\n  \"dependencies\": {\n    \"@radix-ui/react-form\": \"0.1.1\",\n    \"@radix-ui/react-icons\": \"1.3.2\",\n    \"@radix-ui/themes\": \"3.1.6\",\n    \"react\": \"19.0.0\",\n    \"react-dom\": \"19.0.0\"\n  },\n  \"devDependencies\": {\n    \"@hey-api/openapi-ts\": \"workspace:*\",\n    \"@types/react\": \"19.0.1\",\n    \"@types/react-dom\": \"19.0.1\",\n    \"@typescript-eslint/eslint-plugin\": \"8.29.1\",\n    \"@typescript-eslint/parser\": \"8.29.1\",\n    \"@vitejs/plugin-react\": \"4.4.0-beta.1\",\n    \"autoprefixer\": \"10.4.19\",\n    \"eslint\": \"9.17.0\",\n    \"eslint-plugin-react-hooks\": \"5.2.0\",\n    \"eslint-plugin-react-refresh\": \"0.4.7\",\n    \"oxfmt\": \"0.27.0\",\n    \"postcss\": \"8.4.41\",\n    \"tailwindcss\": \"3.4.9\",\n    \"typescript\": \"5.9.3\",\n    \"vite\": \"7.3.1\"\n  }\n}\n"
  },
  {
    "path": "examples/openapi-ts-fetch/postcss.config.js",
    "content": "export default {\n  plugins: {\n    autoprefixer: {},\n    tailwindcss: {},\n  },\n};\n"
  },
  {
    "path": "examples/openapi-ts-fetch/src/App.css",
    "content": "@tailwind base;\n@tailwind components;\n@tailwind utilities;\n"
  },
  {
    "path": "examples/openapi-ts-fetch/src/App.tsx",
    "content": "import './App.css';\n\nimport * as Form from '@radix-ui/react-form';\nimport { DownloadIcon, PlusIcon, ReloadIcon } from '@radix-ui/react-icons';\nimport {\n  Avatar,\n  Box,\n  Button,\n  Card,\n  Container,\n  Flex,\n  Heading,\n  Section,\n  Text,\n  TextField,\n} from '@radix-ui/themes';\nimport { useState } from 'react';\n\nimport { createClient } from './client/client';\nimport { PetSchema } from './client/schemas.gen';\nimport { addPet, getPetById, updatePet } from './client/sdk.gen';\nimport type { Pet } from './client/types.gen';\n\nconst localClient = createClient({\n  // set default base url for requests made by this client\n  baseUrl: 'https://petstore3.swagger.io/api/v3',\n  /**\n   * Set default headers only for requests made by this client. This is to\n   * demonstrate local clients and their configuration taking precedence over\n   * internal service client.\n   */\n  headers: {\n    Authorization: 'Bearer <token_from_local_client>',\n  },\n});\n\nlocalClient.interceptors.request.use((request, options) => {\n  // Middleware is great for adding authorization tokens to requests made to\n  // protected paths. Headers are set randomly here to allow surfacing the\n  // default headers, too.\n  if (options.url === '/pet/{petId}' && options.method === 'GET' && Math.random() < 0.5) {\n    request.headers.set('Authorization', 'Bearer <token_from_interceptor>');\n  }\n  return request;\n});\n\nlocalClient.interceptors.error.use((error) => {\n  console.log(error);\n  return error;\n});\n\nfunction App() {\n  const [pet, setPet] = useState<Pet>();\n  const [isRequiredNameError, setIsRequiredNameError] = useState(false);\n\n  const onAddPet = async (formData: FormData) => {\n    // simple form field validation to demonstrate using schemas\n    if (PetSchema.required.includes('name') && !formData.get('name')) {\n      setIsRequiredNameError(true);\n      return;\n    }\n\n    const { data, error } = await addPet({\n      body: {\n        category: {\n          id: 0,\n          name: formData.get('category') as string,\n        },\n        id: 0,\n        name: formData.get('name') as string,\n        photoUrls: ['string'],\n        status: 'available',\n        tags: [\n          {\n            id: 0,\n            name: 'string',\n          },\n        ],\n      },\n    });\n    if (error) {\n      console.log(error);\n      return;\n    }\n    setPet(data!);\n    setIsRequiredNameError(false);\n  };\n\n  const onGetPetById = async () => {\n    const { data, error } = await getPetById({\n      client: localClient,\n      path: {\n        // random id 1-10\n        petId: Math.floor(Math.random() * (10 - 1 + 1) + 1),\n      },\n    });\n    if (error) {\n      console.log(error);\n      return;\n    }\n    setPet(data!);\n  };\n\n  const onUpdatePet = async () => {\n    const { data, error } = await updatePet({\n      body: {\n        category: {\n          id: 0,\n          name: 'Cats',\n        },\n        id: 2,\n        name: 'Updated Kitty',\n        photoUrls: ['string'],\n        status: 'available',\n        tags: [\n          {\n            id: 0,\n            name: 'string',\n          },\n        ],\n      },\n      // setting headers per request\n      headers: {\n        Authorization: 'Bearer <token_from_method>',\n      },\n    });\n    if (error) {\n      console.log(error);\n      return;\n    }\n    setPet(data!);\n  };\n\n  return (\n    <Box style={{ background: 'var(--gray-a2)', borderRadius: 'var(--radius-3)' }}>\n      <Container size=\"1\">\n        <Section size=\"1\" />\n        <Flex align=\"center\">\n          <a className=\"shrink-0\" href=\"https://heyapi.dev/\" target=\"_blank\">\n            <img\n              src=\"https://heyapi.dev/assets/raw/logo.png\"\n              className=\"h-16 w-16 transition duration-300 will-change-auto\"\n              alt=\"Hey API logo\"\n            />\n          </a>\n          <Heading>@hey-api/openapi-ts 🤝 Fetch API</Heading>\n        </Flex>\n        <Section size=\"1\" />\n        <Flex direction=\"column\" gapY=\"2\">\n          <Box maxWidth=\"240px\">\n            <Card>\n              <Flex gap=\"3\" align=\"center\">\n                <Avatar\n                  size=\"3\"\n                  src={pet?.photoUrls[0]}\n                  radius=\"full\"\n                  fallback={pet?.name.slice(0, 1) ?? 'N'}\n                />\n                <Box>\n                  <Text as=\"div\" size=\"2\" weight=\"bold\">\n                    Name: {pet?.name ?? 'N/A'}\n                  </Text>\n                  <Text as=\"div\" size=\"2\" color=\"gray\">\n                    Category: {pet?.category?.name ?? 'N/A'}\n                  </Text>\n                </Box>\n              </Flex>\n            </Card>\n          </Box>\n          <Button onClick={onGetPetById}>\n            <DownloadIcon /> Get Random Pet\n          </Button>\n        </Flex>\n        <Section size=\"1\" />\n        <Flex direction=\"column\" gapY=\"2\">\n          <Form.Root\n            className=\"w-[260px]\"\n            onSubmit={(event) => {\n              event.preventDefault();\n              onAddPet(new FormData(event.currentTarget));\n            }}\n          >\n            <Form.Field className=\"grid mb-[10px]\" name=\"email\">\n              <div className=\"flex items-baseline justify-between\">\n                <Form.Label className=\"text-[15px] font-medium leading-[35px] text-white\">\n                  Name\n                </Form.Label>\n                {isRequiredNameError && (\n                  <Form.Message className=\"text-[13px] text-white opacity-[0.8]\">\n                    Please enter a name\n                  </Form.Message>\n                )}\n              </div>\n              <Form.Control asChild>\n                <TextField.Root placeholder=\"Kitty\" name=\"name\" type=\"text\" />\n              </Form.Control>\n            </Form.Field>\n            <Form.Field className=\"grid mb-[10px]\" name=\"question\">\n              <div className=\"flex items-baseline justify-between\">\n                <Form.Label className=\"text-[15px] font-medium leading-[35px] text-white\">\n                  Category\n                </Form.Label>\n                <Form.Message className=\"text-[13px] text-white opacity-[0.8]\" match=\"valueMissing\">\n                  Please enter a category\n                </Form.Message>\n              </div>\n              <Form.Control asChild>\n                <TextField.Root placeholder=\"Cats\" name=\"category\" type=\"text\" required />\n              </Form.Control>\n            </Form.Field>\n            <Flex gapX=\"2\">\n              <Form.Submit asChild>\n                <Button type=\"submit\">\n                  <PlusIcon /> Add Pet\n                </Button>\n              </Form.Submit>\n              <Button onClick={onUpdatePet} type=\"button\">\n                <ReloadIcon /> Update Pet\n              </Button>\n            </Flex>\n          </Form.Root>\n        </Flex>\n        <Section size=\"1\" />\n      </Container>\n    </Box>\n  );\n}\n\nexport default App;\n"
  },
  {
    "path": "examples/openapi-ts-fetch/src/client/client/client.gen.ts",
    "content": "// 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 (options: RequestOptions) => {\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 url = buildUrl(opts);\n\n    return { opts, url };\n  };\n\n  const request: Client['request'] = async (options) => {\n    // @ts-expect-error\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"
  },
  {
    "path": "examples/openapi-ts-fetch/src/client/client/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type { Auth } from '../core/auth.gen';\nexport type { QuerySerializerOptions } from '../core/bodySerializer.gen';\nexport {\n  formDataBodySerializer,\n  jsonBodySerializer,\n  urlSearchParamsBodySerializer,\n} from '../core/bodySerializer.gen';\nexport { buildClientParams } from '../core/params.gen';\nexport { serializeQueryKeyValue } from '../core/queryKeySerializer.gen';\nexport { createClient } from './client.gen';\nexport type {\n  Client,\n  ClientOptions,\n  Config,\n  CreateClientConfig,\n  Options,\n  RequestOptions,\n  RequestResult,\n  ResolvedRequestOptions,\n  ResponseStyle,\n  TDataShape,\n} from './types.gen';\nexport { createConfig, mergeHeaders } from './utils.gen';\n"
  },
  {
    "path": "examples/openapi-ts-fetch/src/client/client/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { Auth } from '../core/auth.gen';\nimport type { ServerSentEventsOptions, ServerSentEventsResult } from '../core/serverSentEvents.gen';\nimport type { Client as CoreClient, Config as CoreConfig } from '../core/types.gen';\nimport type { Middleware } from './utils.gen';\n\nexport type ResponseStyle = 'data' | 'fields';\n\nexport interface Config<T extends ClientOptions = ClientOptions>\n  extends Omit<RequestInit, 'body' | 'headers' | 'method'>, CoreConfig {\n  /**\n   * Base URL for all requests made by this client.\n   */\n  baseUrl?: T['baseUrl'];\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   * Please don't use the Fetch client for Next.js applications. The `next`\n   * options won't have any effect.\n   *\n   * Install {@link https://www.npmjs.com/package/@hey-api/client-next `@hey-api/client-next`} instead.\n   */\n  next?: never;\n  /**\n   * Return the response data parsed in a specified format. By default, `auto`\n   * will infer the appropriate method from the `Content-Type` response header.\n   * You can override this behavior with any of the {@link Body} methods.\n   * Select `stream` if you don't want to parse response data at all.\n   *\n   * @default 'auto'\n   */\n  parseAs?: 'arrayBuffer' | 'auto' | 'blob' | 'formData' | 'json' | 'stream' | 'text';\n  /**\n   * Should we return only data or multiple fields (data, error, response, etc.)?\n   *\n   * @default 'fields'\n   */\n  responseStyle?: ResponseStyle;\n  /**\n   * Throw an error instead of returning it in the response?\n   *\n   * @default false\n   */\n  throwOnError?: T['throwOnError'];\n}\n\nexport interface RequestOptions<\n  TData = unknown,\n  TResponseStyle extends ResponseStyle = 'fields',\n  ThrowOnError extends boolean = boolean,\n  Url extends string = string,\n>\n  extends\n    Config<{\n      responseStyle: TResponseStyle;\n      throwOnError: ThrowOnError;\n    }>,\n    Pick<\n      ServerSentEventsOptions<TData>,\n      | 'onRequest'\n      | 'onSseError'\n      | 'onSseEvent'\n      | 'sseDefaultRetryDelay'\n      | 'sseMaxRetryAttempts'\n      | 'sseMaxRetryDelay'\n    > {\n  /**\n   * Any body that you want to add to your request.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/fetch#body}\n   */\n  body?: unknown;\n  path?: Record<string, unknown>;\n  query?: Record<string, unknown>;\n  /**\n   * Security mechanism(s) to use for the request.\n   */\n  security?: ReadonlyArray<Auth>;\n  url: Url;\n}\n\nexport interface ResolvedRequestOptions<\n  TResponseStyle extends ResponseStyle = 'fields',\n  ThrowOnError extends boolean = boolean,\n  Url extends string = string,\n> extends RequestOptions<unknown, TResponseStyle, ThrowOnError, Url> {\n  serializedBody?: string;\n}\n\nexport type RequestResult<\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = boolean,\n  TResponseStyle extends ResponseStyle = 'fields',\n> = ThrowOnError extends true\n  ? Promise<\n      TResponseStyle extends 'data'\n        ? TData extends Record<string, unknown>\n          ? TData[keyof TData]\n          : TData\n        : {\n            data: TData extends Record<string, unknown> ? TData[keyof TData] : TData;\n            request: Request;\n            response: Response;\n          }\n    >\n  : Promise<\n      TResponseStyle extends 'data'\n        ? (TData extends Record<string, unknown> ? TData[keyof TData] : TData) | undefined\n        : (\n            | {\n                data: TData extends Record<string, unknown> ? TData[keyof TData] : TData;\n                error: undefined;\n              }\n            | {\n                data: undefined;\n                error: TError extends Record<string, unknown> ? TError[keyof TError] : TError;\n              }\n          ) & {\n            request: Request;\n            response: Response;\n          }\n    >;\n\nexport interface ClientOptions {\n  baseUrl?: string;\n  responseStyle?: ResponseStyle;\n  throwOnError?: boolean;\n}\n\ntype MethodFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'>,\n) => RequestResult<TData, TError, ThrowOnError, TResponseStyle>;\n\ntype SseFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'>,\n) => Promise<ServerSentEventsResult<TData, TError>>;\n\ntype RequestFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'> &\n    Pick<Required<RequestOptions<TData, TResponseStyle, ThrowOnError>>, 'method'>,\n) => RequestResult<TData, TError, ThrowOnError, TResponseStyle>;\n\ntype BuildUrlFn = <\n  TData extends {\n    body?: unknown;\n    path?: Record<string, unknown>;\n    query?: Record<string, unknown>;\n    url: string;\n  },\n>(\n  options: TData & Options<TData>,\n) => string;\n\nexport type Client = CoreClient<RequestFn, Config, MethodFn, BuildUrlFn, SseFn> & {\n  interceptors: Middleware<Request, Response, unknown, ResolvedRequestOptions>;\n};\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 = ClientOptions> = (\n  override?: Config<ClientOptions & T>,\n) => Config<Required<ClientOptions> & T>;\n\nexport interface TDataShape {\n  body?: unknown;\n  headers?: unknown;\n  path?: unknown;\n  query?: unknown;\n  url: string;\n}\n\ntype OmitKeys<T, K> = Pick<T, Exclude<keyof T, K>>;\n\nexport type Options<\n  TData extends TDataShape = TDataShape,\n  ThrowOnError extends boolean = boolean,\n  TResponse = unknown,\n  TResponseStyle extends ResponseStyle = 'fields',\n> = OmitKeys<\n  RequestOptions<TResponse, TResponseStyle, ThrowOnError>,\n  'body' | 'path' | 'query' | 'url'\n> &\n  ([TData] extends [never] ? unknown : Omit<TData, 'url'>);\n"
  },
  {
    "path": "examples/openapi-ts-fetch/src/client/client/utils.gen.ts",
    "content": "// 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"
  },
  {
    "path": "examples/openapi-ts-fetch/src/client/client.gen.ts",
    "content": "// 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> = (\n  override?: Config<ClientOptions & T>,\n) => Config<Required<ClientOptions> & T>;\n\nexport const client = createClient(\n  createConfig<ClientOptions2>({ baseUrl: 'https://petstore3.swagger.io/api/v3' }),\n);\n"
  },
  {
    "path": "examples/openapi-ts-fetch/src/client/core/auth.gen.ts",
    "content": "// 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"
  },
  {
    "path": "examples/openapi-ts-fetch/src/client/core/bodySerializer.gen.ts",
    "content": "// 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"
  },
  {
    "path": "examples/openapi-ts-fetch/src/client/core/params.gen.ts",
    "content": "// 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"
  },
  {
    "path": "examples/openapi-ts-fetch/src/client/core/pathSerializer.gen.ts",
    "content": "// 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"
  },
  {
    "path": "examples/openapi-ts-fetch/src/client/core/queryKeySerializer.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\n/**\n * JSON-friendly union that mirrors what Pinia Colada can hash.\n */\nexport type JsonValue =\n  | null\n  | string\n  | number\n  | boolean\n  | JsonValue[]\n  | { [key: string]: JsonValue };\n\n/**\n * Replacer that converts non-JSON values (bigint, Date, etc.) to safe substitutes.\n */\nexport const queryKeyJsonReplacer = (_key: string, value: unknown) => {\n  if (value === undefined || typeof value === 'function' || typeof value === 'symbol') {\n    return undefined;\n  }\n  if (typeof value === 'bigint') {\n    return value.toString();\n  }\n  if (value instanceof Date) {\n    return value.toISOString();\n  }\n  return value;\n};\n\n/**\n * Safely stringifies a value and parses it back into a JsonValue.\n */\nexport const stringifyToJsonValue = (input: unknown): JsonValue | undefined => {\n  try {\n    const json = JSON.stringify(input, queryKeyJsonReplacer);\n    if (json === undefined) {\n      return undefined;\n    }\n    return JSON.parse(json) as JsonValue;\n  } catch {\n    return undefined;\n  }\n};\n\n/**\n * Detects plain objects (including objects with a null prototype).\n */\nconst isPlainObject = (value: unknown): value is Record<string, unknown> => {\n  if (value === null || typeof value !== 'object') {\n    return false;\n  }\n  const prototype = Object.getPrototypeOf(value as object);\n  return prototype === Object.prototype || prototype === null;\n};\n\n/**\n * Turns URLSearchParams into a sorted JSON object for deterministic keys.\n */\nconst serializeSearchParams = (params: URLSearchParams): JsonValue => {\n  const entries = Array.from(params.entries()).sort(([a], [b]) => a.localeCompare(b));\n  const result: Record<string, JsonValue> = {};\n\n  for (const [key, value] of entries) {\n    const existing = result[key];\n    if (existing === undefined) {\n      result[key] = value;\n      continue;\n    }\n\n    if (Array.isArray(existing)) {\n      (existing as string[]).push(value);\n    } else {\n      result[key] = [existing, value];\n    }\n  }\n\n  return result;\n};\n\n/**\n * Normalizes any accepted value into a JSON-friendly shape for query keys.\n */\nexport const serializeQueryKeyValue = (value: unknown): JsonValue | undefined => {\n  if (value === null) {\n    return null;\n  }\n\n  if (typeof value === 'string' || typeof value === 'number' || typeof value === 'boolean') {\n    return value;\n  }\n\n  if (value === undefined || typeof value === 'function' || typeof value === 'symbol') {\n    return undefined;\n  }\n\n  if (typeof value === 'bigint') {\n    return value.toString();\n  }\n\n  if (value instanceof Date) {\n    return value.toISOString();\n  }\n\n  if (Array.isArray(value)) {\n    return stringifyToJsonValue(value);\n  }\n\n  if (typeof URLSearchParams !== 'undefined' && value instanceof URLSearchParams) {\n    return serializeSearchParams(value);\n  }\n\n  if (isPlainObject(value)) {\n    return stringifyToJsonValue(value);\n  }\n\n  return undefined;\n};\n"
  },
  {
    "path": "examples/openapi-ts-fetch/src/client/core/serverSentEvents.gen.ts",
    "content": "// 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 const 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            // Normalize line endings: CRLF -> LF, then CR -> LF\n            buffer = buffer.replace(/\\r\\n/g, '\\n').replace(/\\r/g, '\\n');\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"
  },
  {
    "path": "examples/openapi-ts-fetch/src/client/core/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { Auth, AuthToken } from './auth.gen';\nimport type { BodySerializer, QuerySerializer, QuerySerializerOptions } from './bodySerializer.gen';\n\nexport type HttpMethod =\n  | 'connect'\n  | 'delete'\n  | 'get'\n  | 'head'\n  | 'options'\n  | 'patch'\n  | 'post'\n  | 'put'\n  | 'trace';\n\nexport type Client<\n  RequestFn = never,\n  Config = unknown,\n  MethodFn = never,\n  BuildUrlFn = never,\n  SseFn = never,\n> = {\n  /**\n   * Returns the final request URL.\n   */\n  buildUrl: BuildUrlFn;\n  getConfig: () => Config;\n  request: RequestFn;\n  setConfig: (config: Config) => Config;\n} & {\n  [K in HttpMethod]: MethodFn;\n} & ([SseFn] extends [never] ? { sse?: never } : { sse: { [K in HttpMethod]: SseFn } });\n\nexport interface Config {\n  /**\n   * Auth token or a function returning auth token. The resolved value will be\n   * added to the request payload as defined by its `security` array.\n   */\n  auth?: ((auth: Auth) => Promise<AuthToken> | AuthToken) | AuthToken;\n  /**\n   * A function for serializing request body parameter. By default,\n   * {@link JSON.stringify()} will be used.\n   */\n  bodySerializer?: BodySerializer | null;\n  /**\n   * An object containing any HTTP headers that you want to pre-populate your\n   * `Headers` object with.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/Headers/Headers#init See more}\n   */\n  headers?:\n    | RequestInit['headers']\n    | Record<\n        string,\n        string | number | boolean | (string | number | boolean)[] | null | undefined | unknown\n      >;\n  /**\n   * The request method.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/fetch#method See more}\n   */\n  method?: Uppercase<HttpMethod>;\n  /**\n   * A function for serializing request query parameters. By default, arrays\n   * will be exploded in form style, objects will be exploded in deepObject\n   * style, and reserved characters are percent-encoded.\n   *\n   * This method will have no effect if the native `paramsSerializer()` Axios\n   * API function is used.\n   *\n   * {@link https://swagger.io/docs/specification/serialization/#query View examples}\n   */\n  querySerializer?: QuerySerializer | QuerySerializerOptions;\n  /**\n   * A function validating request data. This is useful if you want to ensure\n   * the request conforms to the desired shape, so it can be safely sent to\n   * the server.\n   */\n  requestValidator?: (data: unknown) => Promise<unknown>;\n  /**\n   * A function transforming response data before it's returned. This is useful\n   * for post-processing data, e.g. converting ISO strings into Date objects.\n   */\n  responseTransformer?: (data: unknown) => Promise<unknown>;\n  /**\n   * A function validating response data. This is useful if you want to ensure\n   * the response conforms to the desired shape, so it can be safely passed to\n   * the transformers and returned to the user.\n   */\n  responseValidator?: (data: unknown) => Promise<unknown>;\n}\n\ntype IsExactlyNeverOrNeverUndefined<T> = [T] extends [never]\n  ? true\n  : [T] extends [never | undefined]\n    ? [undefined] extends [T]\n      ? false\n      : true\n    : false;\n\nexport type OmitNever<T extends Record<string, unknown>> = {\n  [K in keyof T as IsExactlyNeverOrNeverUndefined<T[K]> extends true ? never : K]: T[K];\n};\n"
  },
  {
    "path": "examples/openapi-ts-fetch/src/client/core/utils.gen.ts",
    "content": "// 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"
  },
  {
    "path": "examples/openapi-ts-fetch/src/client/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport {\n  addPet,\n  createUser,\n  createUsersWithListInput,\n  deleteOrder,\n  deletePet,\n  deleteUser,\n  findPetsByStatus,\n  findPetsByTags,\n  getInventory,\n  getOrderById,\n  getPetById,\n  getUserByName,\n  loginUser,\n  logoutUser,\n  type Options,\n  placeOrder,\n  updatePet,\n  updatePetWithForm,\n  updateUser,\n  uploadFile,\n} from './sdk.gen';\nexport type {\n  AddPetData,\n  AddPetErrors,\n  AddPetResponse,\n  AddPetResponses,\n  ApiResponse,\n  Category,\n  ClientOptions,\n  CreateUserData,\n  CreateUserErrors,\n  CreateUserResponse,\n  CreateUserResponses,\n  CreateUsersWithListInputData,\n  CreateUsersWithListInputErrors,\n  CreateUsersWithListInputResponse,\n  CreateUsersWithListInputResponses,\n  DeleteOrderData,\n  DeleteOrderErrors,\n  DeleteOrderResponses,\n  DeletePetData,\n  DeletePetErrors,\n  DeletePetResponses,\n  DeleteUserData,\n  DeleteUserErrors,\n  DeleteUserResponses,\n  FindPetsByStatusData,\n  FindPetsByStatusErrors,\n  FindPetsByStatusResponse,\n  FindPetsByStatusResponses,\n  FindPetsByTagsData,\n  FindPetsByTagsErrors,\n  FindPetsByTagsResponse,\n  FindPetsByTagsResponses,\n  GetInventoryData,\n  GetInventoryErrors,\n  GetInventoryResponse,\n  GetInventoryResponses,\n  GetOrderByIdData,\n  GetOrderByIdErrors,\n  GetOrderByIdResponse,\n  GetOrderByIdResponses,\n  GetPetByIdData,\n  GetPetByIdErrors,\n  GetPetByIdResponse,\n  GetPetByIdResponses,\n  GetUserByNameData,\n  GetUserByNameErrors,\n  GetUserByNameResponse,\n  GetUserByNameResponses,\n  LoginUserData,\n  LoginUserErrors,\n  LoginUserResponse,\n  LoginUserResponses,\n  LogoutUserData,\n  LogoutUserErrors,\n  LogoutUserResponses,\n  Order,\n  Pet,\n  Pet2,\n  PlaceOrderData,\n  PlaceOrderErrors,\n  PlaceOrderResponse,\n  PlaceOrderResponses,\n  Tag,\n  UpdatePetData,\n  UpdatePetErrors,\n  UpdatePetResponse,\n  UpdatePetResponses,\n  UpdatePetWithFormData,\n  UpdatePetWithFormErrors,\n  UpdatePetWithFormResponse,\n  UpdatePetWithFormResponses,\n  UpdateUserData,\n  UpdateUserErrors,\n  UpdateUserResponses,\n  UploadFileData,\n  UploadFileErrors,\n  UploadFileResponse,\n  UploadFileResponses,\n  User,\n  UserArray,\n} from './types.gen';\n"
  },
  {
    "path": "examples/openapi-ts-fetch/src/client/schemas.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport const OrderSchema = {\n  properties: {\n    complete: {\n      type: 'boolean',\n    },\n    id: {\n      example: 10,\n      format: 'int64',\n      type: 'integer',\n    },\n    petId: {\n      example: 198772,\n      format: 'int64',\n      type: 'integer',\n    },\n    quantity: {\n      example: 7,\n      format: 'int32',\n      type: 'integer',\n    },\n    shipDate: {\n      format: 'date-time',\n      type: 'string',\n    },\n    status: {\n      description: 'Order Status',\n      enum: ['placed', 'approved', 'delivered'],\n      example: 'approved',\n      type: 'string',\n    },\n  },\n  type: 'object',\n  'x-swagger-router-model': 'io.swagger.petstore.model.Order',\n  xml: {\n    name: 'order',\n  },\n} as const;\n\nexport const CategorySchema = {\n  properties: {\n    id: {\n      example: 1,\n      format: 'int64',\n      type: 'integer',\n    },\n    name: {\n      example: 'Dogs',\n      type: 'string',\n    },\n  },\n  type: 'object',\n  'x-swagger-router-model': 'io.swagger.petstore.model.Category',\n  xml: {\n    name: 'category',\n  },\n} as const;\n\nexport const UserSchema = {\n  properties: {\n    email: {\n      example: 'john@email.com',\n      type: 'string',\n    },\n    firstName: {\n      example: 'John',\n      type: 'string',\n    },\n    id: {\n      example: 10,\n      format: 'int64',\n      type: 'integer',\n    },\n    lastName: {\n      example: 'James',\n      type: 'string',\n    },\n    password: {\n      example: '12345',\n      type: 'string',\n    },\n    phone: {\n      example: '12345',\n      type: 'string',\n    },\n    userStatus: {\n      description: 'User Status',\n      example: 1,\n      format: 'int32',\n      type: 'integer',\n    },\n    username: {\n      example: 'theUser',\n      type: 'string',\n    },\n  },\n  type: 'object',\n  'x-swagger-router-model': 'io.swagger.petstore.model.User',\n  xml: {\n    name: 'user',\n  },\n} as const;\n\nexport const TagSchema = {\n  properties: {\n    id: {\n      format: 'int64',\n      type: 'integer',\n    },\n    name: {\n      type: 'string',\n    },\n  },\n  type: 'object',\n  'x-swagger-router-model': 'io.swagger.petstore.model.Tag',\n  xml: {\n    name: 'tag',\n  },\n} as const;\n\nexport const PetSchema = {\n  properties: {\n    category: {\n      $ref: '#/components/schemas/Category',\n    },\n    id: {\n      example: 10,\n      format: 'int64',\n      type: 'integer',\n    },\n    name: {\n      example: 'doggie',\n      type: 'string',\n    },\n    photoUrls: {\n      items: {\n        type: 'string',\n        xml: {\n          name: 'photoUrl',\n        },\n      },\n      type: 'array',\n      xml: {\n        wrapped: true,\n      },\n    },\n    status: {\n      description: 'pet status in the store',\n      enum: ['available', 'pending', 'sold'],\n      type: 'string',\n    },\n    tags: {\n      items: {\n        $ref: '#/components/schemas/Tag',\n      },\n      type: 'array',\n      xml: {\n        wrapped: true,\n      },\n    },\n  },\n  required: ['name', 'photoUrls'],\n  type: 'object',\n  'x-swagger-router-model': 'io.swagger.petstore.model.Pet',\n  xml: {\n    name: 'pet',\n  },\n} as const;\n\nexport const ApiResponseSchema = {\n  properties: {\n    code: {\n      format: 'int32',\n      type: 'integer',\n    },\n    message: {\n      type: 'string',\n    },\n    type: {\n      type: 'string',\n    },\n  },\n  type: 'object',\n  xml: {\n    name: '##default',\n  },\n} as const;\n"
  },
  {
    "path": "examples/openapi-ts-fetch/src/client/sdk.gen.ts",
    "content": "// 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 {\n  AddPetData,\n  AddPetErrors,\n  AddPetResponses,\n  CreateUserData,\n  CreateUserErrors,\n  CreateUserResponses,\n  CreateUsersWithListInputData,\n  CreateUsersWithListInputErrors,\n  CreateUsersWithListInputResponses,\n  DeleteOrderData,\n  DeleteOrderErrors,\n  DeleteOrderResponses,\n  DeletePetData,\n  DeletePetErrors,\n  DeletePetResponses,\n  DeleteUserData,\n  DeleteUserErrors,\n  DeleteUserResponses,\n  FindPetsByStatusData,\n  FindPetsByStatusErrors,\n  FindPetsByStatusResponses,\n  FindPetsByTagsData,\n  FindPetsByTagsErrors,\n  FindPetsByTagsResponses,\n  GetInventoryData,\n  GetInventoryErrors,\n  GetInventoryResponses,\n  GetOrderByIdData,\n  GetOrderByIdErrors,\n  GetOrderByIdResponses,\n  GetPetByIdData,\n  GetPetByIdErrors,\n  GetPetByIdResponses,\n  GetUserByNameData,\n  GetUserByNameErrors,\n  GetUserByNameResponses,\n  LoginUserData,\n  LoginUserErrors,\n  LoginUserResponses,\n  LogoutUserData,\n  LogoutUserErrors,\n  LogoutUserResponses,\n  PlaceOrderData,\n  PlaceOrderErrors,\n  PlaceOrderResponses,\n  UpdatePetData,\n  UpdatePetErrors,\n  UpdatePetResponses,\n  UpdatePetWithFormData,\n  UpdatePetWithFormErrors,\n  UpdatePetWithFormResponses,\n  UpdateUserData,\n  UpdateUserErrors,\n  UpdateUserResponses,\n  UploadFileData,\n  UploadFileErrors,\n  UploadFileResponses,\n} from './types.gen';\n\nexport type Options<\n  TData extends TDataShape = TDataShape,\n  ThrowOnError extends boolean = boolean,\n> = Options2<TData, ThrowOnError> & {\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 * Add a new pet to the store.\n *\n * Add a new pet to the store.\n */\nexport const addPet = <ThrowOnError extends boolean = false>(\n  options: Options<AddPetData, ThrowOnError>,\n) =>\n  (options.client ?? client).post<AddPetResponses, AddPetErrors, ThrowOnError>({\n    security: [{ scheme: 'bearer', type: 'http' }],\n    url: '/pet',\n    ...options,\n    headers: {\n      'Content-Type': 'application/json',\n      ...options.headers,\n    },\n  });\n\n/**\n * Update an existing pet.\n *\n * Update an existing pet by Id.\n */\nexport const updatePet = <ThrowOnError extends boolean = false>(\n  options: Options<UpdatePetData, ThrowOnError>,\n) =>\n  (options.client ?? client).put<UpdatePetResponses, UpdatePetErrors, ThrowOnError>({\n    security: [{ scheme: 'bearer', type: 'http' }],\n    url: '/pet',\n    ...options,\n    headers: {\n      'Content-Type': 'application/json',\n      ...options.headers,\n    },\n  });\n\n/**\n * Finds Pets by status.\n *\n * Multiple status values can be provided with comma separated strings.\n */\nexport const findPetsByStatus = <ThrowOnError extends boolean = false>(\n  options: Options<FindPetsByStatusData, ThrowOnError>,\n) =>\n  (options.client ?? client).get<FindPetsByStatusResponses, FindPetsByStatusErrors, ThrowOnError>({\n    security: [{ scheme: 'bearer', type: 'http' }],\n    url: '/pet/findByStatus',\n    ...options,\n  });\n\n/**\n * Finds Pets by tags.\n *\n * Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.\n */\nexport const findPetsByTags = <ThrowOnError extends boolean = false>(\n  options: Options<FindPetsByTagsData, ThrowOnError>,\n) =>\n  (options.client ?? client).get<FindPetsByTagsResponses, FindPetsByTagsErrors, ThrowOnError>({\n    security: [{ scheme: 'bearer', type: 'http' }],\n    url: '/pet/findByTags',\n    ...options,\n  });\n\n/**\n * Deletes a pet.\n *\n * Delete a pet.\n */\nexport const deletePet = <ThrowOnError extends boolean = false>(\n  options: Options<DeletePetData, ThrowOnError>,\n) =>\n  (options.client ?? client).delete<DeletePetResponses, DeletePetErrors, ThrowOnError>({\n    security: [{ scheme: 'bearer', type: 'http' }],\n    url: '/pet/{petId}',\n    ...options,\n  });\n\n/**\n * Find pet by ID.\n *\n * Returns a single pet.\n */\nexport const getPetById = <ThrowOnError extends boolean = false>(\n  options: Options<GetPetByIdData, ThrowOnError>,\n) =>\n  (options.client ?? client).get<GetPetByIdResponses, GetPetByIdErrors, ThrowOnError>({\n    security: [\n      { name: 'api_key', type: 'apiKey' },\n      { scheme: 'bearer', type: 'http' },\n    ],\n    url: '/pet/{petId}',\n    ...options,\n  });\n\n/**\n * Updates a pet in the store with form data.\n *\n * Updates a pet resource based on the form data.\n */\nexport const updatePetWithForm = <ThrowOnError extends boolean = false>(\n  options: Options<UpdatePetWithFormData, ThrowOnError>,\n) =>\n  (options.client ?? client).post<\n    UpdatePetWithFormResponses,\n    UpdatePetWithFormErrors,\n    ThrowOnError\n  >({\n    security: [{ scheme: 'bearer', type: 'http' }],\n    url: '/pet/{petId}',\n    ...options,\n  });\n\n/**\n * Uploads an image.\n *\n * Upload image of the pet.\n */\nexport const uploadFile = <ThrowOnError extends boolean = false>(\n  options: Options<UploadFileData, ThrowOnError>,\n) =>\n  (options.client ?? client).post<UploadFileResponses, UploadFileErrors, ThrowOnError>({\n    bodySerializer: null,\n    security: [{ scheme: 'bearer', type: 'http' }],\n    url: '/pet/{petId}/uploadImage',\n    ...options,\n    headers: {\n      'Content-Type': 'application/octet-stream',\n      ...options.headers,\n    },\n  });\n\n/**\n * Returns pet inventories by status.\n *\n * Returns a map of status codes to quantities.\n */\nexport const getInventory = <ThrowOnError extends boolean = false>(\n  options?: Options<GetInventoryData, ThrowOnError>,\n) =>\n  (options?.client ?? client).get<GetInventoryResponses, GetInventoryErrors, ThrowOnError>({\n    security: [{ name: 'api_key', type: 'apiKey' }],\n    url: '/store/inventory',\n    ...options,\n  });\n\n/**\n * Place an order for a pet.\n *\n * Place a new order in the store.\n */\nexport const placeOrder = <ThrowOnError extends boolean = false>(\n  options?: Options<PlaceOrderData, ThrowOnError>,\n) =>\n  (options?.client ?? client).post<PlaceOrderResponses, PlaceOrderErrors, ThrowOnError>({\n    url: '/store/order',\n    ...options,\n    headers: {\n      'Content-Type': 'application/json',\n      ...options?.headers,\n    },\n  });\n\n/**\n * Delete purchase order by identifier.\n *\n * For valid response try integer IDs with value < 1000. Anything above 1000 or non-integers will generate API errors.\n */\nexport const deleteOrder = <ThrowOnError extends boolean = false>(\n  options: Options<DeleteOrderData, ThrowOnError>,\n) =>\n  (options.client ?? client).delete<DeleteOrderResponses, DeleteOrderErrors, ThrowOnError>({\n    url: '/store/order/{orderId}',\n    ...options,\n  });\n\n/**\n * Find purchase order by ID.\n *\n * For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions.\n */\nexport const getOrderById = <ThrowOnError extends boolean = false>(\n  options: Options<GetOrderByIdData, ThrowOnError>,\n) =>\n  (options.client ?? client).get<GetOrderByIdResponses, GetOrderByIdErrors, ThrowOnError>({\n    url: '/store/order/{orderId}',\n    ...options,\n  });\n\n/**\n * Create user.\n *\n * This can only be done by the logged in user.\n */\nexport const createUser = <ThrowOnError extends boolean = false>(\n  options?: Options<CreateUserData, ThrowOnError>,\n) =>\n  (options?.client ?? client).post<CreateUserResponses, CreateUserErrors, ThrowOnError>({\n    url: '/user',\n    ...options,\n    headers: {\n      'Content-Type': 'application/json',\n      ...options?.headers,\n    },\n  });\n\n/**\n * Creates list of users with given input array.\n *\n * Creates list of users with given input array.\n */\nexport const createUsersWithListInput = <ThrowOnError extends boolean = false>(\n  options?: Options<CreateUsersWithListInputData, ThrowOnError>,\n) =>\n  (options?.client ?? client).post<\n    CreateUsersWithListInputResponses,\n    CreateUsersWithListInputErrors,\n    ThrowOnError\n  >({\n    url: '/user/createWithList',\n    ...options,\n    headers: {\n      'Content-Type': 'application/json',\n      ...options?.headers,\n    },\n  });\n\n/**\n * Logs user into the system.\n *\n * Log into the system.\n */\nexport const loginUser = <ThrowOnError extends boolean = false>(\n  options?: Options<LoginUserData, ThrowOnError>,\n) =>\n  (options?.client ?? client).get<LoginUserResponses, LoginUserErrors, ThrowOnError>({\n    url: '/user/login',\n    ...options,\n  });\n\n/**\n * Logs out current logged in user session.\n *\n * Log user out of the system.\n */\nexport const logoutUser = <ThrowOnError extends boolean = false>(\n  options?: Options<LogoutUserData, ThrowOnError>,\n) =>\n  (options?.client ?? client).get<LogoutUserResponses, LogoutUserErrors, ThrowOnError>({\n    url: '/user/logout',\n    ...options,\n  });\n\n/**\n * Delete user resource.\n *\n * This can only be done by the logged in user.\n */\nexport const deleteUser = <ThrowOnError extends boolean = false>(\n  options: Options<DeleteUserData, ThrowOnError>,\n) =>\n  (options.client ?? client).delete<DeleteUserResponses, DeleteUserErrors, ThrowOnError>({\n    url: '/user/{username}',\n    ...options,\n  });\n\n/**\n * Get user by user name.\n *\n * Get user detail based on username.\n */\nexport const getUserByName = <ThrowOnError extends boolean = false>(\n  options: Options<GetUserByNameData, ThrowOnError>,\n) =>\n  (options.client ?? client).get<GetUserByNameResponses, GetUserByNameErrors, ThrowOnError>({\n    url: '/user/{username}',\n    ...options,\n  });\n\n/**\n * Update user resource.\n *\n * This can only be done by the logged in user.\n */\nexport const updateUser = <ThrowOnError extends boolean = false>(\n  options: Options<UpdateUserData, ThrowOnError>,\n) =>\n  (options.client ?? client).put<UpdateUserResponses, UpdateUserErrors, ThrowOnError>({\n    url: '/user/{username}',\n    ...options,\n    headers: {\n      'Content-Type': 'application/json',\n      ...options.headers,\n    },\n  });\n"
  },
  {
    "path": "examples/openapi-ts-fetch/src/client/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type ClientOptions = {\n  baseUrl: 'https://petstore3.swagger.io/api/v3' | (string & {});\n};\n\nexport type Order = {\n  complete?: boolean;\n  id?: number;\n  petId?: number;\n  quantity?: number;\n  shipDate?: string;\n  /**\n   * Order Status\n   */\n  status?: 'placed' | 'approved' | 'delivered';\n};\n\nexport type Category = {\n  id?: number;\n  name?: string;\n};\n\nexport type User = {\n  email?: string;\n  firstName?: string;\n  id?: number;\n  lastName?: string;\n  password?: string;\n  phone?: string;\n  /**\n   * User Status\n   */\n  userStatus?: number;\n  username?: string;\n};\n\nexport type Tag = {\n  id?: number;\n  name?: string;\n};\n\nexport type Pet = {\n  category?: Category;\n  id?: number;\n  name: string;\n  photoUrls: Array<string>;\n  /**\n   * pet status in the store\n   */\n  status?: 'available' | 'pending' | 'sold';\n  tags?: Array<Tag>;\n};\n\nexport type ApiResponse = {\n  code?: number;\n  message?: string;\n  type?: string;\n};\n\nexport type Pet2 = Pet;\n\n/**\n * List of user object\n */\nexport type UserArray = Array<User>;\n\nexport type AddPetData = {\n  /**\n   * Create a new pet in the store\n   */\n  body: Pet;\n  path?: never;\n  query?: never;\n  url: '/pet';\n};\n\nexport type AddPetErrors = {\n  /**\n   * Invalid input\n   */\n  400: unknown;\n  /**\n   * Validation exception\n   */\n  422: unknown;\n  /**\n   * Unexpected error\n   */\n  default: unknown;\n};\n\nexport type AddPetResponses = {\n  /**\n   * Successful operation\n   */\n  200: Pet;\n};\n\nexport type AddPetResponse = AddPetResponses[keyof AddPetResponses];\n\nexport type UpdatePetData = {\n  /**\n   * Update an existent pet in the store\n   */\n  body: Pet;\n  path?: never;\n  query?: never;\n  url: '/pet';\n};\n\nexport type UpdatePetErrors = {\n  /**\n   * Invalid ID supplied\n   */\n  400: unknown;\n  /**\n   * Pet not found\n   */\n  404: unknown;\n  /**\n   * Validation exception\n   */\n  422: unknown;\n  /**\n   * Unexpected error\n   */\n  default: unknown;\n};\n\nexport type UpdatePetResponses = {\n  /**\n   * Successful operation\n   */\n  200: Pet;\n};\n\nexport type UpdatePetResponse = UpdatePetResponses[keyof UpdatePetResponses];\n\nexport type FindPetsByStatusData = {\n  body?: never;\n  path?: never;\n  query: {\n    /**\n     * Status values that need to be considered for filter\n     */\n    status: 'available' | 'pending' | 'sold';\n  };\n  url: '/pet/findByStatus';\n};\n\nexport type FindPetsByStatusErrors = {\n  /**\n   * Invalid status value\n   */\n  400: unknown;\n  /**\n   * Unexpected error\n   */\n  default: unknown;\n};\n\nexport type FindPetsByStatusResponses = {\n  /**\n   * successful operation\n   */\n  200: Array<Pet>;\n};\n\nexport type FindPetsByStatusResponse = FindPetsByStatusResponses[keyof FindPetsByStatusResponses];\n\nexport type FindPetsByTagsData = {\n  body?: never;\n  path?: never;\n  query: {\n    /**\n     * Tags to filter by\n     */\n    tags: Array<string>;\n  };\n  url: '/pet/findByTags';\n};\n\nexport type FindPetsByTagsErrors = {\n  /**\n   * Invalid tag value\n   */\n  400: unknown;\n  /**\n   * Unexpected error\n   */\n  default: unknown;\n};\n\nexport type FindPetsByTagsResponses = {\n  /**\n   * successful operation\n   */\n  200: Array<Pet>;\n};\n\nexport type FindPetsByTagsResponse = FindPetsByTagsResponses[keyof FindPetsByTagsResponses];\n\nexport type DeletePetData = {\n  body?: never;\n  headers?: {\n    api_key?: string;\n  };\n  path: {\n    /**\n     * Pet id to delete\n     */\n    petId: number;\n  };\n  query?: never;\n  url: '/pet/{petId}';\n};\n\nexport type DeletePetErrors = {\n  /**\n   * Invalid pet value\n   */\n  400: unknown;\n  /**\n   * Unexpected error\n   */\n  default: unknown;\n};\n\nexport type DeletePetResponses = {\n  /**\n   * Pet deleted\n   */\n  200: unknown;\n};\n\nexport type GetPetByIdData = {\n  body?: never;\n  path: {\n    /**\n     * ID of pet to return\n     */\n    petId: number;\n  };\n  query?: never;\n  url: '/pet/{petId}';\n};\n\nexport type GetPetByIdErrors = {\n  /**\n   * Invalid ID supplied\n   */\n  400: unknown;\n  /**\n   * Pet not found\n   */\n  404: unknown;\n  /**\n   * Unexpected error\n   */\n  default: unknown;\n};\n\nexport type GetPetByIdResponses = {\n  /**\n   * successful operation\n   */\n  200: Pet;\n};\n\nexport type GetPetByIdResponse = GetPetByIdResponses[keyof GetPetByIdResponses];\n\nexport type UpdatePetWithFormData = {\n  body?: never;\n  path: {\n    /**\n     * ID of pet that needs to be updated\n     */\n    petId: number;\n  };\n  query?: {\n    /**\n     * Name of pet that needs to be updated\n     */\n    name?: string;\n    /**\n     * Status of pet that needs to be updated\n     */\n    status?: string;\n  };\n  url: '/pet/{petId}';\n};\n\nexport type UpdatePetWithFormErrors = {\n  /**\n   * Invalid input\n   */\n  400: unknown;\n  /**\n   * Unexpected error\n   */\n  default: unknown;\n};\n\nexport type UpdatePetWithFormResponses = {\n  /**\n   * successful operation\n   */\n  200: Pet;\n};\n\nexport type UpdatePetWithFormResponse =\n  UpdatePetWithFormResponses[keyof UpdatePetWithFormResponses];\n\nexport type UploadFileData = {\n  body?: Blob | File;\n  path: {\n    /**\n     * ID of pet to update\n     */\n    petId: number;\n  };\n  query?: {\n    /**\n     * Additional Metadata\n     */\n    additionalMetadata?: string;\n  };\n  url: '/pet/{petId}/uploadImage';\n};\n\nexport type UploadFileErrors = {\n  /**\n   * No file uploaded\n   */\n  400: unknown;\n  /**\n   * Pet not found\n   */\n  404: unknown;\n  /**\n   * Unexpected error\n   */\n  default: unknown;\n};\n\nexport type UploadFileResponses = {\n  /**\n   * successful operation\n   */\n  200: ApiResponse;\n};\n\nexport type UploadFileResponse = UploadFileResponses[keyof UploadFileResponses];\n\nexport type GetInventoryData = {\n  body?: never;\n  path?: never;\n  query?: never;\n  url: '/store/inventory';\n};\n\nexport type GetInventoryErrors = {\n  /**\n   * Unexpected error\n   */\n  default: unknown;\n};\n\nexport type GetInventoryResponses = {\n  /**\n   * successful operation\n   */\n  200: {\n    [key: string]: number;\n  };\n};\n\nexport type GetInventoryResponse = GetInventoryResponses[keyof GetInventoryResponses];\n\nexport type PlaceOrderData = {\n  body?: Order;\n  path?: never;\n  query?: never;\n  url: '/store/order';\n};\n\nexport type PlaceOrderErrors = {\n  /**\n   * Invalid input\n   */\n  400: unknown;\n  /**\n   * Validation exception\n   */\n  422: unknown;\n  /**\n   * Unexpected error\n   */\n  default: unknown;\n};\n\nexport type PlaceOrderResponses = {\n  /**\n   * successful operation\n   */\n  200: Order;\n};\n\nexport type PlaceOrderResponse = PlaceOrderResponses[keyof PlaceOrderResponses];\n\nexport type DeleteOrderData = {\n  body?: never;\n  path: {\n    /**\n     * ID of the order that needs to be deleted\n     */\n    orderId: number;\n  };\n  query?: never;\n  url: '/store/order/{orderId}';\n};\n\nexport type DeleteOrderErrors = {\n  /**\n   * Invalid ID supplied\n   */\n  400: unknown;\n  /**\n   * Order not found\n   */\n  404: unknown;\n  /**\n   * Unexpected error\n   */\n  default: unknown;\n};\n\nexport type DeleteOrderResponses = {\n  /**\n   * order deleted\n   */\n  200: unknown;\n};\n\nexport type GetOrderByIdData = {\n  body?: never;\n  path: {\n    /**\n     * ID of order that needs to be fetched\n     */\n    orderId: number;\n  };\n  query?: never;\n  url: '/store/order/{orderId}';\n};\n\nexport type GetOrderByIdErrors = {\n  /**\n   * Invalid ID supplied\n   */\n  400: unknown;\n  /**\n   * Order not found\n   */\n  404: unknown;\n  /**\n   * Unexpected error\n   */\n  default: unknown;\n};\n\nexport type GetOrderByIdResponses = {\n  /**\n   * successful operation\n   */\n  200: Order;\n};\n\nexport type GetOrderByIdResponse = GetOrderByIdResponses[keyof GetOrderByIdResponses];\n\nexport type CreateUserData = {\n  /**\n   * Created user object\n   */\n  body?: User;\n  path?: never;\n  query?: never;\n  url: '/user';\n};\n\nexport type CreateUserErrors = {\n  /**\n   * Unexpected error\n   */\n  default: unknown;\n};\n\nexport type CreateUserResponses = {\n  /**\n   * successful operation\n   */\n  200: User;\n};\n\nexport type CreateUserResponse = CreateUserResponses[keyof CreateUserResponses];\n\nexport type CreateUsersWithListInputData = {\n  body?: Array<User>;\n  path?: never;\n  query?: never;\n  url: '/user/createWithList';\n};\n\nexport type CreateUsersWithListInputErrors = {\n  /**\n   * Unexpected error\n   */\n  default: unknown;\n};\n\nexport type CreateUsersWithListInputResponses = {\n  /**\n   * Successful operation\n   */\n  200: User;\n};\n\nexport type CreateUsersWithListInputResponse =\n  CreateUsersWithListInputResponses[keyof CreateUsersWithListInputResponses];\n\nexport type LoginUserData = {\n  body?: never;\n  path?: never;\n  query?: {\n    /**\n     * The password for login in clear text\n     */\n    password?: string;\n    /**\n     * The user name for login\n     */\n    username?: string;\n  };\n  url: '/user/login';\n};\n\nexport type LoginUserErrors = {\n  /**\n   * Invalid username/password supplied\n   */\n  400: unknown;\n  /**\n   * Unexpected error\n   */\n  default: unknown;\n};\n\nexport type LoginUserResponses = {\n  /**\n   * successful operation\n   */\n  200: string;\n};\n\nexport type LoginUserResponse = LoginUserResponses[keyof LoginUserResponses];\n\nexport type LogoutUserData = {\n  body?: never;\n  path?: never;\n  query?: never;\n  url: '/user/logout';\n};\n\nexport type LogoutUserErrors = {\n  /**\n   * Unexpected error\n   */\n  default: unknown;\n};\n\nexport type LogoutUserResponses = {\n  /**\n   * successful operation\n   */\n  200: unknown;\n};\n\nexport type DeleteUserData = {\n  body?: never;\n  path: {\n    /**\n     * The name that needs to be deleted\n     */\n    username: string;\n  };\n  query?: never;\n  url: '/user/{username}';\n};\n\nexport type DeleteUserErrors = {\n  /**\n   * Invalid username supplied\n   */\n  400: unknown;\n  /**\n   * User not found\n   */\n  404: unknown;\n  /**\n   * Unexpected error\n   */\n  default: unknown;\n};\n\nexport type DeleteUserResponses = {\n  /**\n   * User deleted\n   */\n  200: unknown;\n};\n\nexport type GetUserByNameData = {\n  body?: never;\n  path: {\n    /**\n     * The name that needs to be fetched. Use user1 for testing\n     */\n    username: string;\n  };\n  query?: never;\n  url: '/user/{username}';\n};\n\nexport type GetUserByNameErrors = {\n  /**\n   * Invalid username supplied\n   */\n  400: unknown;\n  /**\n   * User not found\n   */\n  404: unknown;\n  /**\n   * Unexpected error\n   */\n  default: unknown;\n};\n\nexport type GetUserByNameResponses = {\n  /**\n   * successful operation\n   */\n  200: User;\n};\n\nexport type GetUserByNameResponse = GetUserByNameResponses[keyof GetUserByNameResponses];\n\nexport type UpdateUserData = {\n  /**\n   * Update an existent user in the store\n   */\n  body?: User;\n  path: {\n    /**\n     * name that need to be deleted\n     */\n    username: string;\n  };\n  query?: never;\n  url: '/user/{username}';\n};\n\nexport type UpdateUserErrors = {\n  /**\n   * bad request\n   */\n  400: unknown;\n  /**\n   * user not found\n   */\n  404: unknown;\n  /**\n   * Unexpected error\n   */\n  default: unknown;\n};\n\nexport type UpdateUserResponses = {\n  /**\n   * successful operation\n   */\n  200: unknown;\n};\n"
  },
  {
    "path": "examples/openapi-ts-fetch/src/main.tsx",
    "content": "import '@radix-ui/themes/styles.css';\n\nimport { Theme } from '@radix-ui/themes';\nimport React from 'react';\nimport ReactDOM from 'react-dom/client';\n\nimport App from './App.tsx';\nimport { client } from './client/client.gen';\n\n// configure internal service client\nclient.setConfig({\n  // set default base url for requests\n  baseUrl: 'https://petstore3.swagger.io/api/v3',\n  // set default headers for requests\n  headers: {\n    Authorization: 'Bearer <token_from_service_client>',\n  },\n});\n\nReactDOM.createRoot(document.getElementById('root')!).render(\n  <React.StrictMode>\n    <Theme appearance=\"dark\">\n      <App />\n    </Theme>\n  </React.StrictMode>,\n);\n"
  },
  {
    "path": "examples/openapi-ts-fetch/src/vite-env.d.ts",
    "content": "/// <reference types=\"vite/client\" />\n"
  },
  {
    "path": "examples/openapi-ts-fetch/tailwind.config.js",
    "content": "/** @type {import('tailwindcss').Config} */\nexport default {\n  content: ['./index.html', './src/**/*.{html,js,ts,jsx,tsx}'],\n  theme: {\n    extend: {},\n  },\n};\n"
  },
  {
    "path": "examples/openapi-ts-fetch/tsconfig.json",
    "content": "{\n  \"compilerOptions\": {\n    \"target\": \"ES2020\",\n    \"useDefineForClassFields\": true,\n    \"lib\": [\"ES2020\", \"DOM\", \"DOM.Iterable\"],\n    \"module\": \"ESNext\",\n    \"skipLibCheck\": true,\n\n    /* Bundler mode */\n    \"moduleResolution\": \"bundler\",\n    \"allowImportingTsExtensions\": true,\n    \"resolveJsonModule\": true,\n    \"isolatedModules\": true,\n    \"noEmit\": true,\n    \"jsx\": \"react-jsx\",\n\n    /* Linting */\n    \"strict\": true,\n    \"noUnusedLocals\": true,\n    \"noUnusedParameters\": false,\n    \"noFallthroughCasesInSwitch\": true\n  },\n  \"include\": [\"src\"],\n  \"references\": [{ \"path\": \"./tsconfig.node.json\" }]\n}\n"
  },
  {
    "path": "examples/openapi-ts-fetch/tsconfig.node.json",
    "content": "{\n  \"compilerOptions\": {\n    \"composite\": true,\n    \"skipLibCheck\": true,\n    \"module\": \"ESNext\",\n    \"moduleResolution\": \"bundler\",\n    \"allowSyntheticDefaultImports\": true,\n    \"strict\": true\n  },\n  \"include\": [\"vite.config.ts\"]\n}\n"
  },
  {
    "path": "examples/openapi-ts-fetch/vite.config.ts",
    "content": "import react from '@vitejs/plugin-react';\n\n/** @type {import('vite').UserConfig} */\nexport default {\n  build: {\n    sourcemap: true,\n    target: 'esnext',\n  },\n  esbuild: {\n    target: 'esnext',\n  },\n  optimizeDeps: {\n    esbuildOptions: {\n      target: 'esnext',\n    },\n  },\n  plugins: [react()],\n};\n"
  },
  {
    "path": "examples/openapi-ts-ky/.gitignore",
    "content": "# Logs\nlogs\n*.log\nnpm-debug.log*\nyarn-debug.log*\nyarn-error.log*\npnpm-debug.log*\nlerna-debug.log*\n\nnode_modules\ndist\ndist-ssr\n*.local\n\n# Editor directories and files\n.vscode/*\n!.vscode/extensions.json\n.idea\n.DS_Store\n*.suo\n*.ntvs*\n*.njsproj\n*.sln\n*.sw?\n"
  },
  {
    "path": "examples/openapi-ts-ky/CHANGELOG.md",
    "content": "# @example/openapi-ts-ky\n\n## 0.0.1\n\n### Patch Changes\n\n- Initial release of ky client example\n"
  },
  {
    "path": "examples/openapi-ts-ky/index.html",
    "content": "<!doctype html>\n<html lang=\"en\">\n  <head>\n    <meta charset=\"UTF-8\" />\n    <!-- <link rel=\"icon\" type=\"image/svg+xml\" href=\"/vite.svg\" /> -->\n    <meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\" />\n    <title>Hey API + Fetch API Demo</title>\n  </head>\n  <body>\n    <div id=\"root\"></div>\n    <script type=\"module\" src=\"/src/main.tsx\"></script>\n  </body>\n</html>\n"
  },
  {
    "path": "examples/openapi-ts-ky/openapi-ts.config.ts",
    "content": "import { defineConfig } from '@hey-api/openapi-ts';\n\nexport default defineConfig({\n  input:\n    'https://raw.githubusercontent.com/swagger-api/swagger-petstore/master/src/main/resources/openapi.yaml',\n  logs: {\n    path: './logs',\n  },\n  output: {\n    path: './src/client',\n    postProcess: ['oxfmt', 'eslint'],\n  },\n  plugins: [\n    '@hey-api/client-ky',\n    '@hey-api/schemas',\n    '@hey-api/sdk',\n    {\n      enums: 'javascript',\n      name: '@hey-api/typescript',\n    },\n  ],\n});\n"
  },
  {
    "path": "examples/openapi-ts-ky/package.json",
    "content": "{\n  \"name\": \"@example/openapi-ts-ky\",\n  \"version\": \"0.0.1\",\n  \"private\": true,\n  \"type\": \"module\",\n  \"scripts\": {\n    \"build\": \"tsgo --noEmit && vite build\",\n    \"dev\": \"vite\",\n    \"lint\": \"eslint . --report-unused-disable-directives --max-warnings 0\",\n    \"openapi-ts\": \"openapi-ts\",\n    \"preview\": \"vite preview\",\n    \"typecheck\": \"tsgo --noEmit\"\n  },\n  \"dependencies\": {\n    \"@radix-ui/react-form\": \"0.1.1\",\n    \"@radix-ui/react-icons\": \"1.3.2\",\n    \"@radix-ui/themes\": \"3.1.6\",\n    \"ky\": \"1.14.0\",\n    \"react\": \"19.0.0\",\n    \"react-dom\": \"19.0.0\"\n  },\n  \"devDependencies\": {\n    \"@hey-api/openapi-ts\": \"workspace:*\",\n    \"@types/react\": \"19.0.1\",\n    \"@types/react-dom\": \"19.0.1\",\n    \"@typescript-eslint/eslint-plugin\": \"8.29.1\",\n    \"@typescript-eslint/parser\": \"8.29.1\",\n    \"@vitejs/plugin-react\": \"4.4.0-beta.1\",\n    \"autoprefixer\": \"10.4.19\",\n    \"eslint\": \"9.17.0\",\n    \"eslint-plugin-react-hooks\": \"5.2.0\",\n    \"eslint-plugin-react-refresh\": \"0.4.7\",\n    \"oxfmt\": \"0.27.0\",\n    \"postcss\": \"8.4.41\",\n    \"tailwindcss\": \"3.4.9\",\n    \"typescript\": \"5.9.3\",\n    \"vite\": \"7.3.1\"\n  }\n}\n"
  },
  {
    "path": "examples/openapi-ts-ky/postcss.config.js",
    "content": "export default {\n  plugins: {\n    autoprefixer: {},\n    tailwindcss: {},\n  },\n};\n"
  },
  {
    "path": "examples/openapi-ts-ky/src/App.css",
    "content": "@tailwind base;\n@tailwind components;\n@tailwind utilities;\n"
  },
  {
    "path": "examples/openapi-ts-ky/src/App.tsx",
    "content": "import './App.css';\n\nimport * as Form from '@radix-ui/react-form';\nimport { DownloadIcon, PlusIcon, ReloadIcon } from '@radix-ui/react-icons';\nimport {\n  Avatar,\n  Box,\n  Button,\n  Card,\n  Container,\n  Flex,\n  Heading,\n  Section,\n  Text,\n  TextField,\n} from '@radix-ui/themes';\nimport { useState } from 'react';\n\nimport { createClient } from './client/client';\nimport { PetSchema } from './client/schemas.gen';\nimport { addPet, getPetById, updatePet } from './client/sdk.gen';\nimport type { Pet } from './client/types.gen';\n\nconst localClient = createClient({\n  // set default base url for requests made by this client\n  baseUrl: 'https://petstore3.swagger.io/api/v3',\n  /**\n   * Set default headers only for requests made by this client. This is to\n   * demonstrate local clients and their configuration taking precedence over\n   * internal service client.\n   */\n  headers: {\n    Authorization: 'Bearer <token_from_local_client>',\n  },\n});\n\nlocalClient.interceptors.request.use((request, options) => {\n  // Middleware is great for adding authorization tokens to requests made to\n  // protected paths. Headers are set randomly here to allow surfacing the\n  // default headers, too.\n  if (options.url === '/pet/{petId}' && options.method === 'GET' && Math.random() < 0.5) {\n    request.headers.set('Authorization', 'Bearer <token_from_interceptor>');\n  }\n  return request;\n});\n\nlocalClient.interceptors.error.use((error) => {\n  console.log(error);\n  return error;\n});\n\nfunction App() {\n  const [pet, setPet] = useState<Pet>();\n  const [isRequiredNameError, setIsRequiredNameError] = useState(false);\n\n  const onAddPet = async (formData: FormData) => {\n    // simple form field validation to demonstrate using schemas\n    if (PetSchema.required.includes('name') && !formData.get('name')) {\n      setIsRequiredNameError(true);\n      return;\n    }\n\n    const { data, error } = await addPet({\n      body: {\n        category: {\n          id: 0,\n          name: formData.get('category') as string,\n        },\n        id: 0,\n        name: formData.get('name') as string,\n        photoUrls: ['string'],\n        status: 'available',\n        tags: [\n          {\n            id: 0,\n            name: 'string',\n          },\n        ],\n      },\n    });\n    if (error) {\n      console.log(error);\n      return;\n    }\n    setPet(data!);\n    setIsRequiredNameError(false);\n  };\n\n  const onGetPetById = async () => {\n    const { data, error } = await getPetById({\n      client: localClient,\n      path: {\n        // random id 1-10\n        petId: Math.floor(Math.random() * (10 - 1 + 1) + 1),\n      },\n    });\n    if (error) {\n      console.log(error);\n      return;\n    }\n    setPet(data!);\n  };\n\n  const onUpdatePet = async () => {\n    const { data, error } = await updatePet({\n      body: {\n        category: {\n          id: 0,\n          name: 'Cats',\n        },\n        id: 2,\n        name: 'Updated Kitty',\n        photoUrls: ['string'],\n        status: 'available',\n        tags: [\n          {\n            id: 0,\n            name: 'string',\n          },\n        ],\n      },\n      // setting headers per request\n      headers: {\n        Authorization: 'Bearer <token_from_method>',\n      },\n    });\n    if (error) {\n      console.log(error);\n      return;\n    }\n    setPet(data!);\n  };\n\n  return (\n    <Box style={{ background: 'var(--gray-a2)', borderRadius: 'var(--radius-3)' }}>\n      <Container size=\"1\">\n        <Section size=\"1\" />\n        <Flex align=\"center\">\n          <a className=\"shrink-0\" href=\"https://heyapi.dev/\" target=\"_blank\">\n            <img\n              src=\"https://heyapi.dev/assets/raw/logo.png\"\n              className=\"h-16 w-16 transition duration-300 will-change-auto\"\n              alt=\"Hey API logo\"\n            />\n          </a>\n          <Heading>@hey-api/openapi-ts 🤝 Fetch API</Heading>\n        </Flex>\n        <Section size=\"1\" />\n        <Flex direction=\"column\" gapY=\"2\">\n          <Box maxWidth=\"240px\">\n            <Card>\n              <Flex gap=\"3\" align=\"center\">\n                <Avatar\n                  size=\"3\"\n                  src={pet?.photoUrls[0]}\n                  radius=\"full\"\n                  fallback={pet?.name.slice(0, 1) ?? 'N'}\n                />\n                <Box>\n                  <Text as=\"div\" size=\"2\" weight=\"bold\">\n                    Name: {pet?.name ?? 'N/A'}\n                  </Text>\n                  <Text as=\"div\" size=\"2\" color=\"gray\">\n                    Category: {pet?.category?.name ?? 'N/A'}\n                  </Text>\n                </Box>\n              </Flex>\n            </Card>\n          </Box>\n          <Button onClick={onGetPetById}>\n            <DownloadIcon /> Get Random Pet\n          </Button>\n        </Flex>\n        <Section size=\"1\" />\n        <Flex direction=\"column\" gapY=\"2\">\n          <Form.Root\n            className=\"w-[260px]\"\n            onSubmit={(event) => {\n              event.preventDefault();\n              onAddPet(new FormData(event.currentTarget));\n            }}\n          >\n            <Form.Field className=\"grid mb-[10px]\" name=\"email\">\n              <div className=\"flex items-baseline justify-between\">\n                <Form.Label className=\"text-[15px] font-medium leading-[35px] text-white\">\n                  Name\n                </Form.Label>\n                {isRequiredNameError && (\n                  <Form.Message className=\"text-[13px] text-white opacity-[0.8]\">\n                    Please enter a name\n                  </Form.Message>\n                )}\n              </div>\n              <Form.Control asChild>\n                <TextField.Root placeholder=\"Kitty\" name=\"name\" type=\"text\" />\n              </Form.Control>\n            </Form.Field>\n            <Form.Field className=\"grid mb-[10px]\" name=\"question\">\n              <div className=\"flex items-baseline justify-between\">\n                <Form.Label className=\"text-[15px] font-medium leading-[35px] text-white\">\n                  Category\n                </Form.Label>\n                <Form.Message className=\"text-[13px] text-white opacity-[0.8]\" match=\"valueMissing\">\n                  Please enter a category\n                </Form.Message>\n              </div>\n              <Form.Control asChild>\n                <TextField.Root placeholder=\"Cats\" name=\"category\" type=\"text\" required />\n              </Form.Control>\n            </Form.Field>\n            <Flex gapX=\"2\">\n              <Form.Submit asChild>\n                <Button type=\"submit\">\n                  <PlusIcon /> Add Pet\n                </Button>\n              </Form.Submit>\n              <Button onClick={onUpdatePet} type=\"button\">\n                <ReloadIcon /> Update Pet\n              </Button>\n            </Flex>\n          </Form.Root>\n        </Flex>\n        <Section size=\"1\" />\n      </Container>\n    </Box>\n  );\n}\n\nexport default App;\n"
  },
  {
    "path": "examples/openapi-ts-ky/src/client/client/client.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { HTTPError, Options as KyOptions } from 'ky';\nimport ky from 'ky';\n\nimport { createSseClient } from '../core/serverSentEvents.gen';\nimport type { HttpMethod } from '../core/types.gen';\nimport { getValidRequestBody } from '../core/utils.gen';\nimport type {\n  Client,\n  Config,\n  RequestOptions,\n  ResolvedRequestOptions,\n  RetryOptions,\n} from './types.gen';\nimport type { Middleware } from './utils.gen';\nimport {\n  buildUrl,\n  createConfig,\n  createInterceptors,\n  getParseAs,\n  mergeConfigs,\n  mergeHeaders,\n  setAuthParams,\n} from './utils.gen';\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 (options: RequestOptions) => {\n    const opts = {\n      ..._config,\n      ...options,\n      headers: mergeHeaders(_config.headers, options.headers),\n      ky: options.ky ?? _config.ky ?? ky,\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    if (opts.body === undefined || opts.serializedBody === '') {\n      opts.headers.delete('Content-Type');\n    }\n\n    const url = buildUrl(opts);\n\n    return { opts, url };\n  };\n\n  const parseErrorResponse = async (\n    response: Response,\n    request: Request,\n    opts: ResolvedRequestOptions,\n    interceptorsMiddleware: Middleware<Request, Response, unknown, ResolvedRequestOptions>,\n  ) => {\n    const result = {\n      request,\n      response,\n    };\n\n    const textError = await response.text();\n    let jsonError: unknown;\n\n    try {\n      jsonError = JSON.parse(textError);\n    } catch {\n      jsonError = undefined;\n    }\n\n    const error = jsonError ?? textError;\n    let finalError = error;\n\n    for (const fn of interceptorsMiddleware.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    return opts.responseStyle === 'data'\n      ? undefined\n      : {\n          error: finalError,\n          ...result,\n        };\n  };\n\n  const request: Client['request'] = async (options) => {\n    // @ts-expect-error\n    const { opts, url } = await beforeRequest(options);\n\n    const kyInstance = opts.ky!;\n\n    const validBody = getValidRequestBody(opts);\n\n    const kyOptions: KyOptions = {\n      body: validBody as BodyInit,\n      cache: opts.cache,\n      credentials: opts.credentials,\n      headers: opts.headers,\n      integrity: opts.integrity,\n      keepalive: opts.keepalive,\n      method: opts.method as KyOptions['method'],\n      mode: opts.mode,\n      redirect: 'follow',\n      referrer: opts.referrer,\n      referrerPolicy: opts.referrerPolicy,\n      signal: opts.signal,\n      throwHttpErrors: opts.throwOnError ?? false,\n      timeout: opts.timeout,\n      ...opts.kyOptions,\n    };\n\n    if (opts.retry && typeof opts.retry === 'object') {\n      const retryOpts = opts.retry as RetryOptions;\n      kyOptions.retry = {\n        limit: retryOpts.limit ?? 2,\n        methods: retryOpts.methods as Array<\n          'get' | 'post' | 'put' | 'patch' | 'head' | 'delete' | 'options' | 'trace'\n        >,\n        statusCodes: retryOpts.statusCodes,\n      };\n    }\n\n    let request = new Request(url, {\n      body: kyOptions.body as BodyInit,\n      headers: kyOptions.headers as HeadersInit,\n      method: kyOptions.method,\n    });\n\n    for (const fn of interceptors.request.fns) {\n      if (fn) {\n        request = await fn(request, opts);\n      }\n    }\n\n    let response: Response;\n\n    try {\n      response = await kyInstance(request, kyOptions);\n    } catch (error) {\n      if (error && typeof error === 'object' && 'response' in error) {\n        const httpError = error as HTTPError;\n        response = httpError.response;\n\n        for (const fn of interceptors.response.fns) {\n          if (fn) {\n            response = await fn(response, request, opts);\n          }\n        }\n\n        return parseErrorResponse(response, request, opts, interceptors);\n      }\n\n      throw error;\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    return parseErrorResponse(response, request, opts, interceptors);\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      fetch: globalThis.fetch,\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"
  },
  {
    "path": "examples/openapi-ts-ky/src/client/client/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type { Auth } from '../core/auth.gen';\nexport type { QuerySerializerOptions } from '../core/bodySerializer.gen';\nexport {\n  formDataBodySerializer,\n  jsonBodySerializer,\n  urlSearchParamsBodySerializer,\n} from '../core/bodySerializer.gen';\nexport { buildClientParams } from '../core/params.gen';\nexport { serializeQueryKeyValue } from '../core/queryKeySerializer.gen';\nexport { createClient } from './client.gen';\nexport type {\n  Client,\n  ClientOptions,\n  Config,\n  CreateClientConfig,\n  Options,\n  RequestOptions,\n  RequestResult,\n  ResolvedRequestOptions,\n  ResponseStyle,\n  RetryOptions,\n  TDataShape,\n} from './types.gen';\nexport { createConfig, mergeHeaders } from './utils.gen';\n"
  },
  {
    "path": "examples/openapi-ts-ky/src/client/client/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { Options as KyOptions } from 'ky';\nimport type ky from 'ky';\n\nimport type { Auth } from '../core/auth.gen';\nimport type { ServerSentEventsOptions, ServerSentEventsResult } from '../core/serverSentEvents.gen';\nimport type { Client as CoreClient, Config as CoreConfig } from '../core/types.gen';\nimport type { Middleware } from './utils.gen';\n\nexport type ResponseStyle = 'data' | 'fields';\n\nexport interface RetryOptions {\n  /**\n   * Maximum number of retry attempts\n   *\n   * @default 2\n   */\n  limit?: number;\n  /**\n   * HTTP methods to retry\n   *\n   * @default ['get', 'put', 'head', 'delete', 'options', 'trace']\n   */\n  methods?: Array<'get' | 'post' | 'put' | 'delete' | 'patch' | 'head' | 'options' | 'trace'>;\n  /**\n   * HTTP status codes to retry\n   *\n   * @default [408, 413, 429, 500, 502, 503, 504]\n   */\n  statusCodes?: number[];\n}\n\nexport interface Config<T extends ClientOptions = ClientOptions>\n  extends\n    Omit<KyOptions, 'body' | 'headers' | 'method' | 'prefixUrl' | 'retry' | 'throwHttpErrors'>,\n    CoreConfig {\n  /**\n   * Base URL for all requests made by this client.\n   */\n  baseUrl?: T['baseUrl'];\n  /**\n   * Ky instance to use. You can use this option to provide a custom\n   * ky instance.\n   */\n  ky?: typeof ky;\n  /**\n   * Additional ky-specific options that will be passed directly to ky.\n   * This allows you to use any ky option not explicitly exposed in the config.\n   */\n  kyOptions?: Omit<KyOptions, 'method' | 'prefixUrl'>;\n  /**\n   * Return the response data parsed in a specified format. By default, `auto`\n   * will infer the appropriate method from the `Content-Type` response header.\n   * You can override this behavior with any of the {@link Body} methods.\n   * Select `stream` if you don't want to parse response data at all.\n   *\n   * @default 'auto'\n   */\n  parseAs?: 'arrayBuffer' | 'auto' | 'blob' | 'formData' | 'json' | 'stream' | 'text';\n  /**\n   * Should we return only data or multiple fields (data, error, response, etc.)?\n   *\n   * @default 'fields'\n   */\n  responseStyle?: ResponseStyle;\n  /**\n   * Retry configuration\n   */\n  retry?: RetryOptions;\n  /**\n   * Throw an error instead of returning it in the response?\n   *\n   * @default false\n   */\n  throwOnError?: T['throwOnError'];\n  /**\n   * Request timeout in milliseconds\n   *\n   * @default 10000\n   */\n  timeout?: number;\n}\n\nexport interface RequestOptions<\n  TData = unknown,\n  TResponseStyle extends ResponseStyle = 'fields',\n  ThrowOnError extends boolean = boolean,\n  Url extends string = string,\n>\n  extends\n    Config<{\n      responseStyle: TResponseStyle;\n      throwOnError: ThrowOnError;\n    }>,\n    Pick<\n      ServerSentEventsOptions<TData>,\n      | 'onRequest'\n      | 'onSseError'\n      | 'onSseEvent'\n      | 'sseDefaultRetryDelay'\n      | 'sseMaxRetryAttempts'\n      | 'sseMaxRetryDelay'\n    > {\n  /**\n   * Any body that you want to add to your request.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/fetch#body}\n   */\n  body?: unknown;\n  path?: Record<string, unknown>;\n  query?: Record<string, unknown>;\n  /**\n   * Security mechanism(s) to use for the request.\n   */\n  security?: ReadonlyArray<Auth>;\n  url: Url;\n}\n\nexport interface ResolvedRequestOptions<\n  TResponseStyle extends ResponseStyle = 'fields',\n  ThrowOnError extends boolean = boolean,\n  Url extends string = string,\n> extends RequestOptions<unknown, TResponseStyle, ThrowOnError, Url> {\n  serializedBody?: string;\n}\n\nexport type RequestResult<\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = boolean,\n  TResponseStyle extends ResponseStyle = 'fields',\n> = ThrowOnError extends true\n  ? Promise<\n      TResponseStyle extends 'data'\n        ? TData extends Record<string, unknown>\n          ? TData[keyof TData]\n          : TData\n        : {\n            data: TData extends Record<string, unknown> ? TData[keyof TData] : TData;\n            request: Request;\n            response: Response;\n          }\n    >\n  : Promise<\n      TResponseStyle extends 'data'\n        ? (TData extends Record<string, unknown> ? TData[keyof TData] : TData) | undefined\n        : (\n            | {\n                data: TData extends Record<string, unknown> ? TData[keyof TData] : TData;\n                error: undefined;\n              }\n            | {\n                data: undefined;\n                error: TError extends Record<string, unknown> ? TError[keyof TError] : TError;\n              }\n          ) & {\n            request: Request;\n            response: Response;\n          }\n    >;\n\nexport interface ClientOptions {\n  baseUrl?: string;\n  responseStyle?: ResponseStyle;\n  throwOnError?: boolean;\n}\n\ntype MethodFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'>,\n) => RequestResult<TData, TError, ThrowOnError, TResponseStyle>;\n\ntype SseFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'>,\n) => Promise<ServerSentEventsResult<TData, TError>>;\n\ntype RequestFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'> &\n    Pick<Required<RequestOptions<TData, TResponseStyle, ThrowOnError>>, 'method'>,\n) => RequestResult<TData, TError, ThrowOnError, TResponseStyle>;\n\ntype BuildUrlFn = <\n  TData extends {\n    body?: unknown;\n    path?: Record<string, unknown>;\n    query?: Record<string, unknown>;\n    url: string;\n  },\n>(\n  options: TData & Options<TData>,\n) => string;\n\nexport type Client = CoreClient<RequestFn, Config, MethodFn, BuildUrlFn, SseFn> & {\n  interceptors: Middleware<Request, Response, unknown, ResolvedRequestOptions>;\n};\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 = ClientOptions> = (\n  override?: Config<ClientOptions & T>,\n) => Config<Required<ClientOptions> & T>;\n\nexport interface TDataShape {\n  body?: unknown;\n  headers?: unknown;\n  path?: unknown;\n  query?: unknown;\n  url: string;\n}\n\ntype OmitKeys<T, K> = Pick<T, Exclude<keyof T, K>>;\n\nexport type Options<\n  TData extends TDataShape = TDataShape,\n  ThrowOnError extends boolean = boolean,\n  TResponse = unknown,\n  TResponseStyle extends ResponseStyle = 'fields',\n> = OmitKeys<\n  RequestOptions<TResponse, TResponseStyle, ThrowOnError>,\n  'body' | 'path' | 'query' | 'url'\n> &\n  ([TData] extends [never] ? unknown : Omit<TData, 'url'>);\n"
  },
  {
    "path": "examples/openapi-ts-ky/src/client/client/utils.gen.ts",
    "content": "// 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    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        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  throwOnError: false,\n  timeout: 10000,\n  ...override,\n});\n"
  },
  {
    "path": "examples/openapi-ts-ky/src/client/client.gen.ts",
    "content": "// 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> = (\n  override?: Config<ClientOptions & T>,\n) => Config<Required<ClientOptions> & T>;\n\nexport const client = createClient(\n  createConfig<ClientOptions2>({ baseUrl: 'https://petstore3.swagger.io/api/v3' }),\n);\n"
  },
  {
    "path": "examples/openapi-ts-ky/src/client/core/auth.gen.ts",
    "content": "// 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"
  },
  {
    "path": "examples/openapi-ts-ky/src/client/core/bodySerializer.gen.ts",
    "content": "// 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"
  },
  {
    "path": "examples/openapi-ts-ky/src/client/core/params.gen.ts",
    "content": "// 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"
  },
  {
    "path": "examples/openapi-ts-ky/src/client/core/pathSerializer.gen.ts",
    "content": "// 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"
  },
  {
    "path": "examples/openapi-ts-ky/src/client/core/queryKeySerializer.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\n/**\n * JSON-friendly union that mirrors what Pinia Colada can hash.\n */\nexport type JsonValue =\n  | null\n  | string\n  | number\n  | boolean\n  | JsonValue[]\n  | { [key: string]: JsonValue };\n\n/**\n * Replacer that converts non-JSON values (bigint, Date, etc.) to safe substitutes.\n */\nexport const queryKeyJsonReplacer = (_key: string, value: unknown) => {\n  if (value === undefined || typeof value === 'function' || typeof value === 'symbol') {\n    return undefined;\n  }\n  if (typeof value === 'bigint') {\n    return value.toString();\n  }\n  if (value instanceof Date) {\n    return value.toISOString();\n  }\n  return value;\n};\n\n/**\n * Safely stringifies a value and parses it back into a JsonValue.\n */\nexport const stringifyToJsonValue = (input: unknown): JsonValue | undefined => {\n  try {\n    const json = JSON.stringify(input, queryKeyJsonReplacer);\n    if (json === undefined) {\n      return undefined;\n    }\n    return JSON.parse(json) as JsonValue;\n  } catch {\n    return undefined;\n  }\n};\n\n/**\n * Detects plain objects (including objects with a null prototype).\n */\nconst isPlainObject = (value: unknown): value is Record<string, unknown> => {\n  if (value === null || typeof value !== 'object') {\n    return false;\n  }\n  const prototype = Object.getPrototypeOf(value as object);\n  return prototype === Object.prototype || prototype === null;\n};\n\n/**\n * Turns URLSearchParams into a sorted JSON object for deterministic keys.\n */\nconst serializeSearchParams = (params: URLSearchParams): JsonValue => {\n  const entries = Array.from(params.entries()).sort(([a], [b]) => a.localeCompare(b));\n  const result: Record<string, JsonValue> = {};\n\n  for (const [key, value] of entries) {\n    const existing = result[key];\n    if (existing === undefined) {\n      result[key] = value;\n      continue;\n    }\n\n    if (Array.isArray(existing)) {\n      (existing as string[]).push(value);\n    } else {\n      result[key] = [existing, value];\n    }\n  }\n\n  return result;\n};\n\n/**\n * Normalizes any accepted value into a JSON-friendly shape for query keys.\n */\nexport const serializeQueryKeyValue = (value: unknown): JsonValue | undefined => {\n  if (value === null) {\n    return null;\n  }\n\n  if (typeof value === 'string' || typeof value === 'number' || typeof value === 'boolean') {\n    return value;\n  }\n\n  if (value === undefined || typeof value === 'function' || typeof value === 'symbol') {\n    return undefined;\n  }\n\n  if (typeof value === 'bigint') {\n    return value.toString();\n  }\n\n  if (value instanceof Date) {\n    return value.toISOString();\n  }\n\n  if (Array.isArray(value)) {\n    return stringifyToJsonValue(value);\n  }\n\n  if (typeof URLSearchParams !== 'undefined' && value instanceof URLSearchParams) {\n    return serializeSearchParams(value);\n  }\n\n  if (isPlainObject(value)) {\n    return stringifyToJsonValue(value);\n  }\n\n  return undefined;\n};\n"
  },
  {
    "path": "examples/openapi-ts-ky/src/client/core/serverSentEvents.gen.ts",
    "content": "// 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 const 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            // Normalize line endings: CRLF -> LF, then CR -> LF\n            buffer = buffer.replace(/\\r\\n/g, '\\n').replace(/\\r/g, '\\n');\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"
  },
  {
    "path": "examples/openapi-ts-ky/src/client/core/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { Auth, AuthToken } from './auth.gen';\nimport type { BodySerializer, QuerySerializer, QuerySerializerOptions } from './bodySerializer.gen';\n\nexport type HttpMethod =\n  | 'connect'\n  | 'delete'\n  | 'get'\n  | 'head'\n  | 'options'\n  | 'patch'\n  | 'post'\n  | 'put'\n  | 'trace';\n\nexport type Client<\n  RequestFn = never,\n  Config = unknown,\n  MethodFn = never,\n  BuildUrlFn = never,\n  SseFn = never,\n> = {\n  /**\n   * Returns the final request URL.\n   */\n  buildUrl: BuildUrlFn;\n  getConfig: () => Config;\n  request: RequestFn;\n  setConfig: (config: Config) => Config;\n} & {\n  [K in HttpMethod]: MethodFn;\n} & ([SseFn] extends [never] ? { sse?: never } : { sse: { [K in HttpMethod]: SseFn } });\n\nexport interface Config {\n  /**\n   * Auth token or a function returning auth token. The resolved value will be\n   * added to the request payload as defined by its `security` array.\n   */\n  auth?: ((auth: Auth) => Promise<AuthToken> | AuthToken) | AuthToken;\n  /**\n   * A function for serializing request body parameter. By default,\n   * {@link JSON.stringify()} will be used.\n   */\n  bodySerializer?: BodySerializer | null;\n  /**\n   * An object containing any HTTP headers that you want to pre-populate your\n   * `Headers` object with.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/Headers/Headers#init See more}\n   */\n  headers?:\n    | RequestInit['headers']\n    | Record<\n        string,\n        string | number | boolean | (string | number | boolean)[] | null | undefined | unknown\n      >;\n  /**\n   * The request method.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/fetch#method See more}\n   */\n  method?: Uppercase<HttpMethod>;\n  /**\n   * A function for serializing request query parameters. By default, arrays\n   * will be exploded in form style, objects will be exploded in deepObject\n   * style, and reserved characters are percent-encoded.\n   *\n   * This method will have no effect if the native `paramsSerializer()` Axios\n   * API function is used.\n   *\n   * {@link https://swagger.io/docs/specification/serialization/#query View examples}\n   */\n  querySerializer?: QuerySerializer | QuerySerializerOptions;\n  /**\n   * A function validating request data. This is useful if you want to ensure\n   * the request conforms to the desired shape, so it can be safely sent to\n   * the server.\n   */\n  requestValidator?: (data: unknown) => Promise<unknown>;\n  /**\n   * A function transforming response data before it's returned. This is useful\n   * for post-processing data, e.g. converting ISO strings into Date objects.\n   */\n  responseTransformer?: (data: unknown) => Promise<unknown>;\n  /**\n   * A function validating response data. This is useful if you want to ensure\n   * the response conforms to the desired shape, so it can be safely passed to\n   * the transformers and returned to the user.\n   */\n  responseValidator?: (data: unknown) => Promise<unknown>;\n}\n\ntype IsExactlyNeverOrNeverUndefined<T> = [T] extends [never]\n  ? true\n  : [T] extends [never | undefined]\n    ? [undefined] extends [T]\n      ? false\n      : true\n    : false;\n\nexport type OmitNever<T extends Record<string, unknown>> = {\n  [K in keyof T as IsExactlyNeverOrNeverUndefined<T[K]> extends true ? never : K]: T[K];\n};\n"
  },
  {
    "path": "examples/openapi-ts-ky/src/client/core/utils.gen.ts",
    "content": "// 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"
  },
  {
    "path": "examples/openapi-ts-ky/src/client/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport {\n  addPet,\n  createUser,\n  createUsersWithListInput,\n  deleteOrder,\n  deletePet,\n  deleteUser,\n  findPetsByStatus,\n  findPetsByTags,\n  getInventory,\n  getOrderById,\n  getPetById,\n  getUserByName,\n  loginUser,\n  logoutUser,\n  type Options,\n  placeOrder,\n  updatePet,\n  updatePetWithForm,\n  updateUser,\n  uploadFile,\n} from './sdk.gen';\nexport type {\n  AddPetData,\n  AddPetErrors,\n  AddPetResponse,\n  AddPetResponses,\n  ApiResponse,\n  Category,\n  ClientOptions,\n  CreateUserData,\n  CreateUserErrors,\n  CreateUserResponse,\n  CreateUserResponses,\n  CreateUsersWithListInputData,\n  CreateUsersWithListInputErrors,\n  CreateUsersWithListInputResponse,\n  CreateUsersWithListInputResponses,\n  DeleteOrderData,\n  DeleteOrderErrors,\n  DeleteOrderResponses,\n  DeletePetData,\n  DeletePetErrors,\n  DeletePetResponses,\n  DeleteUserData,\n  DeleteUserErrors,\n  DeleteUserResponses,\n  FindPetsByStatusData,\n  FindPetsByStatusErrors,\n  FindPetsByStatusResponse,\n  FindPetsByStatusResponses,\n  FindPetsByTagsData,\n  FindPetsByTagsErrors,\n  FindPetsByTagsResponse,\n  FindPetsByTagsResponses,\n  GetInventoryData,\n  GetInventoryErrors,\n  GetInventoryResponse,\n  GetInventoryResponses,\n  GetOrderByIdData,\n  GetOrderByIdErrors,\n  GetOrderByIdResponse,\n  GetOrderByIdResponses,\n  GetPetByIdData,\n  GetPetByIdErrors,\n  GetPetByIdResponse,\n  GetPetByIdResponses,\n  GetUserByNameData,\n  GetUserByNameErrors,\n  GetUserByNameResponse,\n  GetUserByNameResponses,\n  LoginUserData,\n  LoginUserErrors,\n  LoginUserResponse,\n  LoginUserResponses,\n  LogoutUserData,\n  LogoutUserErrors,\n  LogoutUserResponses,\n  Order,\n  Pet,\n  Pet2,\n  PlaceOrderData,\n  PlaceOrderErrors,\n  PlaceOrderResponse,\n  PlaceOrderResponses,\n  Tag,\n  UpdatePetData,\n  UpdatePetErrors,\n  UpdatePetResponse,\n  UpdatePetResponses,\n  UpdatePetWithFormData,\n  UpdatePetWithFormErrors,\n  UpdatePetWithFormResponse,\n  UpdatePetWithFormResponses,\n  UpdateUserData,\n  UpdateUserErrors,\n  UpdateUserResponses,\n  UploadFileData,\n  UploadFileErrors,\n  UploadFileResponse,\n  UploadFileResponses,\n  User,\n  UserArray,\n} from './types.gen';\n"
  },
  {
    "path": "examples/openapi-ts-ky/src/client/schemas.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport const OrderSchema = {\n  properties: {\n    complete: {\n      type: 'boolean',\n    },\n    id: {\n      example: 10,\n      format: 'int64',\n      type: 'integer',\n    },\n    petId: {\n      example: 198772,\n      format: 'int64',\n      type: 'integer',\n    },\n    quantity: {\n      example: 7,\n      format: 'int32',\n      type: 'integer',\n    },\n    shipDate: {\n      format: 'date-time',\n      type: 'string',\n    },\n    status: {\n      description: 'Order Status',\n      enum: ['placed', 'approved', 'delivered'],\n      example: 'approved',\n      type: 'string',\n    },\n  },\n  type: 'object',\n  'x-swagger-router-model': 'io.swagger.petstore.model.Order',\n  xml: {\n    name: 'order',\n  },\n} as const;\n\nexport const CategorySchema = {\n  properties: {\n    id: {\n      example: 1,\n      format: 'int64',\n      type: 'integer',\n    },\n    name: {\n      example: 'Dogs',\n      type: 'string',\n    },\n  },\n  type: 'object',\n  'x-swagger-router-model': 'io.swagger.petstore.model.Category',\n  xml: {\n    name: 'category',\n  },\n} as const;\n\nexport const UserSchema = {\n  properties: {\n    email: {\n      example: 'john@email.com',\n      type: 'string',\n    },\n    firstName: {\n      example: 'John',\n      type: 'string',\n    },\n    id: {\n      example: 10,\n      format: 'int64',\n      type: 'integer',\n    },\n    lastName: {\n      example: 'James',\n      type: 'string',\n    },\n    password: {\n      example: '12345',\n      type: 'string',\n    },\n    phone: {\n      example: '12345',\n      type: 'string',\n    },\n    userStatus: {\n      description: 'User Status',\n      example: 1,\n      format: 'int32',\n      type: 'integer',\n    },\n    username: {\n      example: 'theUser',\n      type: 'string',\n    },\n  },\n  type: 'object',\n  'x-swagger-router-model': 'io.swagger.petstore.model.User',\n  xml: {\n    name: 'user',\n  },\n} as const;\n\nexport const TagSchema = {\n  properties: {\n    id: {\n      format: 'int64',\n      type: 'integer',\n    },\n    name: {\n      type: 'string',\n    },\n  },\n  type: 'object',\n  'x-swagger-router-model': 'io.swagger.petstore.model.Tag',\n  xml: {\n    name: 'tag',\n  },\n} as const;\n\nexport const PetSchema = {\n  properties: {\n    category: {\n      $ref: '#/components/schemas/Category',\n    },\n    id: {\n      example: 10,\n      format: 'int64',\n      type: 'integer',\n    },\n    name: {\n      example: 'doggie',\n      type: 'string',\n    },\n    photoUrls: {\n      items: {\n        type: 'string',\n        xml: {\n          name: 'photoUrl',\n        },\n      },\n      type: 'array',\n      xml: {\n        wrapped: true,\n      },\n    },\n    status: {\n      description: 'pet status in the store',\n      enum: ['available', 'pending', 'sold'],\n      type: 'string',\n    },\n    tags: {\n      items: {\n        $ref: '#/components/schemas/Tag',\n      },\n      type: 'array',\n      xml: {\n        wrapped: true,\n      },\n    },\n  },\n  required: ['name', 'photoUrls'],\n  type: 'object',\n  'x-swagger-router-model': 'io.swagger.petstore.model.Pet',\n  xml: {\n    name: 'pet',\n  },\n} as const;\n\nexport const ApiResponseSchema = {\n  properties: {\n    code: {\n      format: 'int32',\n      type: 'integer',\n    },\n    message: {\n      type: 'string',\n    },\n    type: {\n      type: 'string',\n    },\n  },\n  type: 'object',\n  xml: {\n    name: '##default',\n  },\n} as const;\n"
  },
  {
    "path": "examples/openapi-ts-ky/src/client/sdk.gen.ts",
    "content": "// 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 {\n  AddPetData,\n  AddPetErrors,\n  AddPetResponses,\n  CreateUserData,\n  CreateUserErrors,\n  CreateUserResponses,\n  CreateUsersWithListInputData,\n  CreateUsersWithListInputErrors,\n  CreateUsersWithListInputResponses,\n  DeleteOrderData,\n  DeleteOrderErrors,\n  DeleteOrderResponses,\n  DeletePetData,\n  DeletePetErrors,\n  DeletePetResponses,\n  DeleteUserData,\n  DeleteUserErrors,\n  DeleteUserResponses,\n  FindPetsByStatusData,\n  FindPetsByStatusErrors,\n  FindPetsByStatusResponses,\n  FindPetsByTagsData,\n  FindPetsByTagsErrors,\n  FindPetsByTagsResponses,\n  GetInventoryData,\n  GetInventoryErrors,\n  GetInventoryResponses,\n  GetOrderByIdData,\n  GetOrderByIdErrors,\n  GetOrderByIdResponses,\n  GetPetByIdData,\n  GetPetByIdErrors,\n  GetPetByIdResponses,\n  GetUserByNameData,\n  GetUserByNameErrors,\n  GetUserByNameResponses,\n  LoginUserData,\n  LoginUserErrors,\n  LoginUserResponses,\n  LogoutUserData,\n  LogoutUserErrors,\n  LogoutUserResponses,\n  PlaceOrderData,\n  PlaceOrderErrors,\n  PlaceOrderResponses,\n  UpdatePetData,\n  UpdatePetErrors,\n  UpdatePetResponses,\n  UpdatePetWithFormData,\n  UpdatePetWithFormErrors,\n  UpdatePetWithFormResponses,\n  UpdateUserData,\n  UpdateUserErrors,\n  UpdateUserResponses,\n  UploadFileData,\n  UploadFileErrors,\n  UploadFileResponses,\n} from './types.gen';\n\nexport type Options<\n  TData extends TDataShape = TDataShape,\n  ThrowOnError extends boolean = boolean,\n> = Options2<TData, ThrowOnError> & {\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 * Add a new pet to the store.\n *\n * Add a new pet to the store.\n */\nexport const addPet = <ThrowOnError extends boolean = false>(\n  options: Options<AddPetData, ThrowOnError>,\n) =>\n  (options.client ?? client).post<AddPetResponses, AddPetErrors, ThrowOnError>({\n    security: [{ scheme: 'bearer', type: 'http' }],\n    url: '/pet',\n    ...options,\n    headers: {\n      'Content-Type': 'application/json',\n      ...options.headers,\n    },\n  });\n\n/**\n * Update an existing pet.\n *\n * Update an existing pet by Id.\n */\nexport const updatePet = <ThrowOnError extends boolean = false>(\n  options: Options<UpdatePetData, ThrowOnError>,\n) =>\n  (options.client ?? client).put<UpdatePetResponses, UpdatePetErrors, ThrowOnError>({\n    security: [{ scheme: 'bearer', type: 'http' }],\n    url: '/pet',\n    ...options,\n    headers: {\n      'Content-Type': 'application/json',\n      ...options.headers,\n    },\n  });\n\n/**\n * Finds Pets by status.\n *\n * Multiple status values can be provided with comma separated strings.\n */\nexport const findPetsByStatus = <ThrowOnError extends boolean = false>(\n  options: Options<FindPetsByStatusData, ThrowOnError>,\n) =>\n  (options.client ?? client).get<FindPetsByStatusResponses, FindPetsByStatusErrors, ThrowOnError>({\n    security: [{ scheme: 'bearer', type: 'http' }],\n    url: '/pet/findByStatus',\n    ...options,\n  });\n\n/**\n * Finds Pets by tags.\n *\n * Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.\n */\nexport const findPetsByTags = <ThrowOnError extends boolean = false>(\n  options: Options<FindPetsByTagsData, ThrowOnError>,\n) =>\n  (options.client ?? client).get<FindPetsByTagsResponses, FindPetsByTagsErrors, ThrowOnError>({\n    security: [{ scheme: 'bearer', type: 'http' }],\n    url: '/pet/findByTags',\n    ...options,\n  });\n\n/**\n * Deletes a pet.\n *\n * Delete a pet.\n */\nexport const deletePet = <ThrowOnError extends boolean = false>(\n  options: Options<DeletePetData, ThrowOnError>,\n) =>\n  (options.client ?? client).delete<DeletePetResponses, DeletePetErrors, ThrowOnError>({\n    security: [{ scheme: 'bearer', type: 'http' }],\n    url: '/pet/{petId}',\n    ...options,\n  });\n\n/**\n * Find pet by ID.\n *\n * Returns a single pet.\n */\nexport const getPetById = <ThrowOnError extends boolean = false>(\n  options: Options<GetPetByIdData, ThrowOnError>,\n) =>\n  (options.client ?? client).get<GetPetByIdResponses, GetPetByIdErrors, ThrowOnError>({\n    security: [\n      { name: 'api_key', type: 'apiKey' },\n      { scheme: 'bearer', type: 'http' },\n    ],\n    url: '/pet/{petId}',\n    ...options,\n  });\n\n/**\n * Updates a pet in the store with form data.\n *\n * Updates a pet resource based on the form data.\n */\nexport const updatePetWithForm = <ThrowOnError extends boolean = false>(\n  options: Options<UpdatePetWithFormData, ThrowOnError>,\n) =>\n  (options.client ?? client).post<\n    UpdatePetWithFormResponses,\n    UpdatePetWithFormErrors,\n    ThrowOnError\n  >({\n    security: [{ scheme: 'bearer', type: 'http' }],\n    url: '/pet/{petId}',\n    ...options,\n  });\n\n/**\n * Uploads an image.\n *\n * Upload image of the pet.\n */\nexport const uploadFile = <ThrowOnError extends boolean = false>(\n  options: Options<UploadFileData, ThrowOnError>,\n) =>\n  (options.client ?? client).post<UploadFileResponses, UploadFileErrors, ThrowOnError>({\n    bodySerializer: null,\n    security: [{ scheme: 'bearer', type: 'http' }],\n    url: '/pet/{petId}/uploadImage',\n    ...options,\n    headers: {\n      'Content-Type': 'application/octet-stream',\n      ...options.headers,\n    },\n  });\n\n/**\n * Returns pet inventories by status.\n *\n * Returns a map of status codes to quantities.\n */\nexport const getInventory = <ThrowOnError extends boolean = false>(\n  options?: Options<GetInventoryData, ThrowOnError>,\n) =>\n  (options?.client ?? client).get<GetInventoryResponses, GetInventoryErrors, ThrowOnError>({\n    security: [{ name: 'api_key', type: 'apiKey' }],\n    url: '/store/inventory',\n    ...options,\n  });\n\n/**\n * Place an order for a pet.\n *\n * Place a new order in the store.\n */\nexport const placeOrder = <ThrowOnError extends boolean = false>(\n  options?: Options<PlaceOrderData, ThrowOnError>,\n) =>\n  (options?.client ?? client).post<PlaceOrderResponses, PlaceOrderErrors, ThrowOnError>({\n    url: '/store/order',\n    ...options,\n    headers: {\n      'Content-Type': 'application/json',\n      ...options?.headers,\n    },\n  });\n\n/**\n * Delete purchase order by identifier.\n *\n * For valid response try integer IDs with value < 1000. Anything above 1000 or non-integers will generate API errors.\n */\nexport const deleteOrder = <ThrowOnError extends boolean = false>(\n  options: Options<DeleteOrderData, ThrowOnError>,\n) =>\n  (options.client ?? client).delete<DeleteOrderResponses, DeleteOrderErrors, ThrowOnError>({\n    url: '/store/order/{orderId}',\n    ...options,\n  });\n\n/**\n * Find purchase order by ID.\n *\n * For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions.\n */\nexport const getOrderById = <ThrowOnError extends boolean = false>(\n  options: Options<GetOrderByIdData, ThrowOnError>,\n) =>\n  (options.client ?? client).get<GetOrderByIdResponses, GetOrderByIdErrors, ThrowOnError>({\n    url: '/store/order/{orderId}',\n    ...options,\n  });\n\n/**\n * Create user.\n *\n * This can only be done by the logged in user.\n */\nexport const createUser = <ThrowOnError extends boolean = false>(\n  options?: Options<CreateUserData, ThrowOnError>,\n) =>\n  (options?.client ?? client).post<CreateUserResponses, CreateUserErrors, ThrowOnError>({\n    url: '/user',\n    ...options,\n    headers: {\n      'Content-Type': 'application/json',\n      ...options?.headers,\n    },\n  });\n\n/**\n * Creates list of users with given input array.\n *\n * Creates list of users with given input array.\n */\nexport const createUsersWithListInput = <ThrowOnError extends boolean = false>(\n  options?: Options<CreateUsersWithListInputData, ThrowOnError>,\n) =>\n  (options?.client ?? client).post<\n    CreateUsersWithListInputResponses,\n    CreateUsersWithListInputErrors,\n    ThrowOnError\n  >({\n    url: '/user/createWithList',\n    ...options,\n    headers: {\n      'Content-Type': 'application/json',\n      ...options?.headers,\n    },\n  });\n\n/**\n * Logs user into the system.\n *\n * Log into the system.\n */\nexport const loginUser = <ThrowOnError extends boolean = false>(\n  options?: Options<LoginUserData, ThrowOnError>,\n) =>\n  (options?.client ?? client).get<LoginUserResponses, LoginUserErrors, ThrowOnError>({\n    url: '/user/login',\n    ...options,\n  });\n\n/**\n * Logs out current logged in user session.\n *\n * Log user out of the system.\n */\nexport const logoutUser = <ThrowOnError extends boolean = false>(\n  options?: Options<LogoutUserData, ThrowOnError>,\n) =>\n  (options?.client ?? client).get<LogoutUserResponses, LogoutUserErrors, ThrowOnError>({\n    url: '/user/logout',\n    ...options,\n  });\n\n/**\n * Delete user resource.\n *\n * This can only be done by the logged in user.\n */\nexport const deleteUser = <ThrowOnError extends boolean = false>(\n  options: Options<DeleteUserData, ThrowOnError>,\n) =>\n  (options.client ?? client).delete<DeleteUserResponses, DeleteUserErrors, ThrowOnError>({\n    url: '/user/{username}',\n    ...options,\n  });\n\n/**\n * Get user by user name.\n *\n * Get user detail based on username.\n */\nexport const getUserByName = <ThrowOnError extends boolean = false>(\n  options: Options<GetUserByNameData, ThrowOnError>,\n) =>\n  (options.client ?? client).get<GetUserByNameResponses, GetUserByNameErrors, ThrowOnError>({\n    url: '/user/{username}',\n    ...options,\n  });\n\n/**\n * Update user resource.\n *\n * This can only be done by the logged in user.\n */\nexport const updateUser = <ThrowOnError extends boolean = false>(\n  options: Options<UpdateUserData, ThrowOnError>,\n) =>\n  (options.client ?? client).put<UpdateUserResponses, UpdateUserErrors, ThrowOnError>({\n    url: '/user/{username}',\n    ...options,\n    headers: {\n      'Content-Type': 'application/json',\n      ...options.headers,\n    },\n  });\n"
  },
  {
    "path": "examples/openapi-ts-ky/src/client/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type ClientOptions = {\n  baseUrl: 'https://petstore3.swagger.io/api/v3' | (string & {});\n};\n\nexport type Order = {\n  complete?: boolean;\n  id?: number;\n  petId?: number;\n  quantity?: number;\n  shipDate?: string;\n  /**\n   * Order Status\n   */\n  status?: 'placed' | 'approved' | 'delivered';\n};\n\nexport type Category = {\n  id?: number;\n  name?: string;\n};\n\nexport type User = {\n  email?: string;\n  firstName?: string;\n  id?: number;\n  lastName?: string;\n  password?: string;\n  phone?: string;\n  /**\n   * User Status\n   */\n  userStatus?: number;\n  username?: string;\n};\n\nexport type Tag = {\n  id?: number;\n  name?: string;\n};\n\nexport type Pet = {\n  category?: Category;\n  id?: number;\n  name: string;\n  photoUrls: Array<string>;\n  /**\n   * pet status in the store\n   */\n  status?: 'available' | 'pending' | 'sold';\n  tags?: Array<Tag>;\n};\n\nexport type ApiResponse = {\n  code?: number;\n  message?: string;\n  type?: string;\n};\n\nexport type Pet2 = Pet;\n\n/**\n * List of user object\n */\nexport type UserArray = Array<User>;\n\nexport type AddPetData = {\n  /**\n   * Create a new pet in the store\n   */\n  body: Pet;\n  path?: never;\n  query?: never;\n  url: '/pet';\n};\n\nexport type AddPetErrors = {\n  /**\n   * Invalid input\n   */\n  400: unknown;\n  /**\n   * Validation exception\n   */\n  422: unknown;\n  /**\n   * Unexpected error\n   */\n  default: unknown;\n};\n\nexport type AddPetResponses = {\n  /**\n   * Successful operation\n   */\n  200: Pet;\n};\n\nexport type AddPetResponse = AddPetResponses[keyof AddPetResponses];\n\nexport type UpdatePetData = {\n  /**\n   * Update an existent pet in the store\n   */\n  body: Pet;\n  path?: never;\n  query?: never;\n  url: '/pet';\n};\n\nexport type UpdatePetErrors = {\n  /**\n   * Invalid ID supplied\n   */\n  400: unknown;\n  /**\n   * Pet not found\n   */\n  404: unknown;\n  /**\n   * Validation exception\n   */\n  422: unknown;\n  /**\n   * Unexpected error\n   */\n  default: unknown;\n};\n\nexport type UpdatePetResponses = {\n  /**\n   * Successful operation\n   */\n  200: Pet;\n};\n\nexport type UpdatePetResponse = UpdatePetResponses[keyof UpdatePetResponses];\n\nexport type FindPetsByStatusData = {\n  body?: never;\n  path?: never;\n  query: {\n    /**\n     * Status values that need to be considered for filter\n     */\n    status: 'available' | 'pending' | 'sold';\n  };\n  url: '/pet/findByStatus';\n};\n\nexport type FindPetsByStatusErrors = {\n  /**\n   * Invalid status value\n   */\n  400: unknown;\n  /**\n   * Unexpected error\n   */\n  default: unknown;\n};\n\nexport type FindPetsByStatusResponses = {\n  /**\n   * successful operation\n   */\n  200: Array<Pet>;\n};\n\nexport type FindPetsByStatusResponse = FindPetsByStatusResponses[keyof FindPetsByStatusResponses];\n\nexport type FindPetsByTagsData = {\n  body?: never;\n  path?: never;\n  query: {\n    /**\n     * Tags to filter by\n     */\n    tags: Array<string>;\n  };\n  url: '/pet/findByTags';\n};\n\nexport type FindPetsByTagsErrors = {\n  /**\n   * Invalid tag value\n   */\n  400: unknown;\n  /**\n   * Unexpected error\n   */\n  default: unknown;\n};\n\nexport type FindPetsByTagsResponses = {\n  /**\n   * successful operation\n   */\n  200: Array<Pet>;\n};\n\nexport type FindPetsByTagsResponse = FindPetsByTagsResponses[keyof FindPetsByTagsResponses];\n\nexport type DeletePetData = {\n  body?: never;\n  headers?: {\n    api_key?: string;\n  };\n  path: {\n    /**\n     * Pet id to delete\n     */\n    petId: number;\n  };\n  query?: never;\n  url: '/pet/{petId}';\n};\n\nexport type DeletePetErrors = {\n  /**\n   * Invalid pet value\n   */\n  400: unknown;\n  /**\n   * Unexpected error\n   */\n  default: unknown;\n};\n\nexport type DeletePetResponses = {\n  /**\n   * Pet deleted\n   */\n  200: unknown;\n};\n\nexport type GetPetByIdData = {\n  body?: never;\n  path: {\n    /**\n     * ID of pet to return\n     */\n    petId: number;\n  };\n  query?: never;\n  url: '/pet/{petId}';\n};\n\nexport type GetPetByIdErrors = {\n  /**\n   * Invalid ID supplied\n   */\n  400: unknown;\n  /**\n   * Pet not found\n   */\n  404: unknown;\n  /**\n   * Unexpected error\n   */\n  default: unknown;\n};\n\nexport type GetPetByIdResponses = {\n  /**\n   * successful operation\n   */\n  200: Pet;\n};\n\nexport type GetPetByIdResponse = GetPetByIdResponses[keyof GetPetByIdResponses];\n\nexport type UpdatePetWithFormData = {\n  body?: never;\n  path: {\n    /**\n     * ID of pet that needs to be updated\n     */\n    petId: number;\n  };\n  query?: {\n    /**\n     * Name of pet that needs to be updated\n     */\n    name?: string;\n    /**\n     * Status of pet that needs to be updated\n     */\n    status?: string;\n  };\n  url: '/pet/{petId}';\n};\n\nexport type UpdatePetWithFormErrors = {\n  /**\n   * Invalid input\n   */\n  400: unknown;\n  /**\n   * Unexpected error\n   */\n  default: unknown;\n};\n\nexport type UpdatePetWithFormResponses = {\n  /**\n   * successful operation\n   */\n  200: Pet;\n};\n\nexport type UpdatePetWithFormResponse =\n  UpdatePetWithFormResponses[keyof UpdatePetWithFormResponses];\n\nexport type UploadFileData = {\n  body?: Blob | File;\n  path: {\n    /**\n     * ID of pet to update\n     */\n    petId: number;\n  };\n  query?: {\n    /**\n     * Additional Metadata\n     */\n    additionalMetadata?: string;\n  };\n  url: '/pet/{petId}/uploadImage';\n};\n\nexport type UploadFileErrors = {\n  /**\n   * No file uploaded\n   */\n  400: unknown;\n  /**\n   * Pet not found\n   */\n  404: unknown;\n  /**\n   * Unexpected error\n   */\n  default: unknown;\n};\n\nexport type UploadFileResponses = {\n  /**\n   * successful operation\n   */\n  200: ApiResponse;\n};\n\nexport type UploadFileResponse = UploadFileResponses[keyof UploadFileResponses];\n\nexport type GetInventoryData = {\n  body?: never;\n  path?: never;\n  query?: never;\n  url: '/store/inventory';\n};\n\nexport type GetInventoryErrors = {\n  /**\n   * Unexpected error\n   */\n  default: unknown;\n};\n\nexport type GetInventoryResponses = {\n  /**\n   * successful operation\n   */\n  200: {\n    [key: string]: number;\n  };\n};\n\nexport type GetInventoryResponse = GetInventoryResponses[keyof GetInventoryResponses];\n\nexport type PlaceOrderData = {\n  body?: Order;\n  path?: never;\n  query?: never;\n  url: '/store/order';\n};\n\nexport type PlaceOrderErrors = {\n  /**\n   * Invalid input\n   */\n  400: unknown;\n  /**\n   * Validation exception\n   */\n  422: unknown;\n  /**\n   * Unexpected error\n   */\n  default: unknown;\n};\n\nexport type PlaceOrderResponses = {\n  /**\n   * successful operation\n   */\n  200: Order;\n};\n\nexport type PlaceOrderResponse = PlaceOrderResponses[keyof PlaceOrderResponses];\n\nexport type DeleteOrderData = {\n  body?: never;\n  path: {\n    /**\n     * ID of the order that needs to be deleted\n     */\n    orderId: number;\n  };\n  query?: never;\n  url: '/store/order/{orderId}';\n};\n\nexport type DeleteOrderErrors = {\n  /**\n   * Invalid ID supplied\n   */\n  400: unknown;\n  /**\n   * Order not found\n   */\n  404: unknown;\n  /**\n   * Unexpected error\n   */\n  default: unknown;\n};\n\nexport type DeleteOrderResponses = {\n  /**\n   * order deleted\n   */\n  200: unknown;\n};\n\nexport type GetOrderByIdData = {\n  body?: never;\n  path: {\n    /**\n     * ID of order that needs to be fetched\n     */\n    orderId: number;\n  };\n  query?: never;\n  url: '/store/order/{orderId}';\n};\n\nexport type GetOrderByIdErrors = {\n  /**\n   * Invalid ID supplied\n   */\n  400: unknown;\n  /**\n   * Order not found\n   */\n  404: unknown;\n  /**\n   * Unexpected error\n   */\n  default: unknown;\n};\n\nexport type GetOrderByIdResponses = {\n  /**\n   * successful operation\n   */\n  200: Order;\n};\n\nexport type GetOrderByIdResponse = GetOrderByIdResponses[keyof GetOrderByIdResponses];\n\nexport type CreateUserData = {\n  /**\n   * Created user object\n   */\n  body?: User;\n  path?: never;\n  query?: never;\n  url: '/user';\n};\n\nexport type CreateUserErrors = {\n  /**\n   * Unexpected error\n   */\n  default: unknown;\n};\n\nexport type CreateUserResponses = {\n  /**\n   * successful operation\n   */\n  200: User;\n};\n\nexport type CreateUserResponse = CreateUserResponses[keyof CreateUserResponses];\n\nexport type CreateUsersWithListInputData = {\n  body?: Array<User>;\n  path?: never;\n  query?: never;\n  url: '/user/createWithList';\n};\n\nexport type CreateUsersWithListInputErrors = {\n  /**\n   * Unexpected error\n   */\n  default: unknown;\n};\n\nexport type CreateUsersWithListInputResponses = {\n  /**\n   * Successful operation\n   */\n  200: User;\n};\n\nexport type CreateUsersWithListInputResponse =\n  CreateUsersWithListInputResponses[keyof CreateUsersWithListInputResponses];\n\nexport type LoginUserData = {\n  body?: never;\n  path?: never;\n  query?: {\n    /**\n     * The password for login in clear text\n     */\n    password?: string;\n    /**\n     * The user name for login\n     */\n    username?: string;\n  };\n  url: '/user/login';\n};\n\nexport type LoginUserErrors = {\n  /**\n   * Invalid username/password supplied\n   */\n  400: unknown;\n  /**\n   * Unexpected error\n   */\n  default: unknown;\n};\n\nexport type LoginUserResponses = {\n  /**\n   * successful operation\n   */\n  200: string;\n};\n\nexport type LoginUserResponse = LoginUserResponses[keyof LoginUserResponses];\n\nexport type LogoutUserData = {\n  body?: never;\n  path?: never;\n  query?: never;\n  url: '/user/logout';\n};\n\nexport type LogoutUserErrors = {\n  /**\n   * Unexpected error\n   */\n  default: unknown;\n};\n\nexport type LogoutUserResponses = {\n  /**\n   * successful operation\n   */\n  200: unknown;\n};\n\nexport type DeleteUserData = {\n  body?: never;\n  path: {\n    /**\n     * The name that needs to be deleted\n     */\n    username: string;\n  };\n  query?: never;\n  url: '/user/{username}';\n};\n\nexport type DeleteUserErrors = {\n  /**\n   * Invalid username supplied\n   */\n  400: unknown;\n  /**\n   * User not found\n   */\n  404: unknown;\n  /**\n   * Unexpected error\n   */\n  default: unknown;\n};\n\nexport type DeleteUserResponses = {\n  /**\n   * User deleted\n   */\n  200: unknown;\n};\n\nexport type GetUserByNameData = {\n  body?: never;\n  path: {\n    /**\n     * The name that needs to be fetched. Use user1 for testing\n     */\n    username: string;\n  };\n  query?: never;\n  url: '/user/{username}';\n};\n\nexport type GetUserByNameErrors = {\n  /**\n   * Invalid username supplied\n   */\n  400: unknown;\n  /**\n   * User not found\n   */\n  404: unknown;\n  /**\n   * Unexpected error\n   */\n  default: unknown;\n};\n\nexport type GetUserByNameResponses = {\n  /**\n   * successful operation\n   */\n  200: User;\n};\n\nexport type GetUserByNameResponse = GetUserByNameResponses[keyof GetUserByNameResponses];\n\nexport type UpdateUserData = {\n  /**\n   * Update an existent user in the store\n   */\n  body?: User;\n  path: {\n    /**\n     * name that need to be deleted\n     */\n    username: string;\n  };\n  query?: never;\n  url: '/user/{username}';\n};\n\nexport type UpdateUserErrors = {\n  /**\n   * bad request\n   */\n  400: unknown;\n  /**\n   * user not found\n   */\n  404: unknown;\n  /**\n   * Unexpected error\n   */\n  default: unknown;\n};\n\nexport type UpdateUserResponses = {\n  /**\n   * successful operation\n   */\n  200: unknown;\n};\n"
  },
  {
    "path": "examples/openapi-ts-ky/src/main.tsx",
    "content": "import '@radix-ui/themes/styles.css';\n\nimport { Theme } from '@radix-ui/themes';\nimport React from 'react';\nimport ReactDOM from 'react-dom/client';\n\nimport App from './App.tsx';\nimport { client } from './client/client.gen';\n\n// configure internal service client\nclient.setConfig({\n  // set default base url for requests\n  baseUrl: 'https://petstore3.swagger.io/api/v3',\n  // set default headers for requests\n  headers: {\n    Authorization: 'Bearer <token_from_service_client>',\n  },\n});\n\nReactDOM.createRoot(document.getElementById('root')!).render(\n  <React.StrictMode>\n    <Theme appearance=\"dark\">\n      <App />\n    </Theme>\n  </React.StrictMode>,\n);\n"
  },
  {
    "path": "examples/openapi-ts-ky/src/vite-env.d.ts",
    "content": "/// <reference types=\"vite/client\" />\n"
  },
  {
    "path": "examples/openapi-ts-ky/tailwind.config.js",
    "content": "/** @type {import('tailwindcss').Config} */\nexport default {\n  content: ['./index.html', './src/**/*.{html,js,ts,jsx,tsx}'],\n  theme: {\n    extend: {},\n  },\n};\n"
  },
  {
    "path": "examples/openapi-ts-ky/tsconfig.json",
    "content": "{\n  \"compilerOptions\": {\n    \"target\": \"ES2020\",\n    \"useDefineForClassFields\": true,\n    \"lib\": [\"ES2020\", \"DOM\", \"DOM.Iterable\"],\n    \"module\": \"ESNext\",\n    \"skipLibCheck\": true,\n\n    /* Bundler mode */\n    \"moduleResolution\": \"bundler\",\n    \"allowImportingTsExtensions\": true,\n    \"resolveJsonModule\": true,\n    \"isolatedModules\": true,\n    \"noEmit\": true,\n    \"jsx\": \"react-jsx\",\n\n    /* Linting */\n    \"strict\": true,\n    \"noUnusedLocals\": true,\n    \"noUnusedParameters\": false,\n    \"noFallthroughCasesInSwitch\": true\n  },\n  \"include\": [\"src\"],\n  \"references\": [{ \"path\": \"./tsconfig.node.json\" }]\n}\n"
  },
  {
    "path": "examples/openapi-ts-ky/tsconfig.node.json",
    "content": "{\n  \"compilerOptions\": {\n    \"composite\": true,\n    \"skipLibCheck\": true,\n    \"module\": \"ESNext\",\n    \"moduleResolution\": \"bundler\",\n    \"allowSyntheticDefaultImports\": true,\n    \"strict\": true\n  },\n  \"include\": [\"vite.config.ts\"]\n}\n"
  },
  {
    "path": "examples/openapi-ts-ky/vite.config.ts",
    "content": "import react from '@vitejs/plugin-react';\n\n/** @type {import('vite').UserConfig} */\nexport default {\n  build: {\n    sourcemap: true,\n    target: 'esnext',\n  },\n  esbuild: {\n    target: 'esnext',\n  },\n  optimizeDeps: {\n    esbuildOptions: {\n      target: 'esnext',\n    },\n  },\n  plugins: [react()],\n};\n"
  },
  {
    "path": "examples/openapi-ts-nestjs/openapi-ts.config.ts",
    "content": "import { defineConfig } from '@hey-api/openapi-ts';\n\nexport default defineConfig({\n  input: './openapi.json',\n  logs: {\n    path: './logs',\n  },\n  output: {\n    path: './src/client',\n    postProcess: ['oxfmt', 'eslint'],\n  },\n  plugins: ['nestjs', '@hey-api/sdk'],\n});\n"
  },
  {
    "path": "examples/openapi-ts-nestjs/openapi.json",
    "content": "{\n  \"openapi\": \"3.1.0\",\n  \"info\": {\n    \"title\": \"Petstore API\",\n    \"version\": \"1.0.0\",\n    \"description\": \"A sample API that uses a petstore as an example\"\n  },\n  \"servers\": [\n    {\n      \"url\": \"http://localhost:3000/v3\"\n    }\n  ],\n  \"tags\": [\n    {\n      \"name\": \"pets\",\n      \"description\": \"Pet operations\"\n    },\n    {\n      \"name\": \"store\",\n      \"description\": \"Store operations\"\n    }\n  ],\n  \"paths\": {\n    \"/pets\": {\n      \"get\": {\n        \"summary\": \"List all pets\",\n        \"operationId\": \"listPets\",\n        \"tags\": [\"pets\"],\n        \"parameters\": [\n          {\n            \"name\": \"limit\",\n            \"in\": \"query\",\n            \"required\": false,\n            \"schema\": {\n              \"type\": \"integer\",\n              \"format\": \"int32\",\n              \"minimum\": 1,\n              \"maximum\": 100\n            }\n          },\n          {\n            \"name\": \"offset\",\n            \"in\": \"query\",\n            \"required\": false,\n            \"schema\": {\n              \"type\": \"integer\",\n              \"format\": \"int32\",\n              \"minimum\": 0\n            }\n          }\n        ],\n        \"responses\": {\n          \"200\": {\n            \"description\": \"A list of pets\",\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"type\": \"array\",\n                  \"items\": {\n                    \"$ref\": \"#/components/schemas/Pet\"\n                  }\n                }\n              }\n            }\n          }\n        }\n      },\n      \"post\": {\n        \"summary\": \"Create a pet\",\n        \"operationId\": \"createPet\",\n        \"tags\": [\"pets\"],\n        \"requestBody\": {\n          \"required\": true,\n          \"content\": {\n            \"application/json\": {\n              \"schema\": {\n                \"$ref\": \"#/components/schemas/CreatePetBody\"\n              }\n            }\n          }\n        },\n        \"responses\": {\n          \"201\": {\n            \"description\": \"Pet created\",\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"$ref\": \"#/components/schemas/Pet\"\n                }\n              }\n            }\n          },\n          \"400\": {\n            \"description\": \"Validation error\",\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"$ref\": \"#/components/schemas/Error\"\n                }\n              }\n            }\n          }\n        }\n      }\n    },\n    \"/pets/{petId}\": {\n      \"get\": {\n        \"summary\": \"Find pet by ID\",\n        \"operationId\": \"showPetById\",\n        \"tags\": [\"pets\"],\n        \"parameters\": [\n          {\n            \"name\": \"petId\",\n            \"in\": \"path\",\n            \"required\": true,\n            \"schema\": {\n              \"type\": \"string\",\n              \"format\": \"uuid\"\n            }\n          }\n        ],\n        \"responses\": {\n          \"200\": {\n            \"description\": \"Pet found\",\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"$ref\": \"#/components/schemas/Pet\"\n                }\n              }\n            }\n          },\n          \"404\": {\n            \"description\": \"Pet not found\",\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"$ref\": \"#/components/schemas/Error\"\n                }\n              }\n            }\n          }\n        }\n      },\n      \"put\": {\n        \"summary\": \"Update a pet\",\n        \"operationId\": \"updatePet\",\n        \"tags\": [\"pets\"],\n        \"parameters\": [\n          {\n            \"name\": \"petId\",\n            \"in\": \"path\",\n            \"required\": true,\n            \"schema\": {\n              \"type\": \"string\",\n              \"format\": \"uuid\"\n            }\n          }\n        ],\n        \"requestBody\": {\n          \"required\": true,\n          \"content\": {\n            \"application/json\": {\n              \"schema\": {\n                \"$ref\": \"#/components/schemas/UpdatePetBody\"\n              }\n            }\n          }\n        },\n        \"responses\": {\n          \"200\": {\n            \"description\": \"Pet updated\",\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"$ref\": \"#/components/schemas/Pet\"\n                }\n              }\n            }\n          },\n          \"400\": {\n            \"description\": \"Validation error\",\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"$ref\": \"#/components/schemas/Error\"\n                }\n              }\n            }\n          },\n          \"404\": {\n            \"description\": \"Pet not found\",\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"$ref\": \"#/components/schemas/Error\"\n                }\n              }\n            }\n          }\n        }\n      },\n      \"delete\": {\n        \"summary\": \"Delete a pet\",\n        \"operationId\": \"deletePet\",\n        \"tags\": [\"pets\"],\n        \"parameters\": [\n          {\n            \"name\": \"petId\",\n            \"in\": \"path\",\n            \"required\": true,\n            \"schema\": {\n              \"type\": \"string\",\n              \"format\": \"uuid\"\n            }\n          }\n        ],\n        \"responses\": {\n          \"204\": {\n            \"description\": \"Pet deleted\"\n          },\n          \"404\": {\n            \"description\": \"Pet not found\",\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"$ref\": \"#/components/schemas/Error\"\n                }\n              }\n            }\n          }\n        }\n      }\n    },\n    \"/store/inventory\": {\n      \"get\": {\n        \"summary\": \"Returns pet inventories by status\",\n        \"operationId\": \"getInventory\",\n        \"tags\": [\"store\"],\n        \"responses\": {\n          \"200\": {\n            \"description\": \"Successful operation\",\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"type\": \"object\",\n                  \"additionalProperties\": {\n                    \"type\": \"integer\",\n                    \"format\": \"int32\"\n                  }\n                }\n              }\n            }\n          }\n        }\n      }\n    }\n  },\n  \"components\": {\n    \"schemas\": {\n      \"Pet\": {\n        \"type\": \"object\",\n        \"required\": [\"id\", \"name\"],\n        \"properties\": {\n          \"id\": {\n            \"type\": \"string\",\n            \"format\": \"uuid\"\n          },\n          \"name\": {\n            \"type\": \"string\",\n            \"minLength\": 1,\n            \"maxLength\": 100\n          },\n          \"tag\": {\n            \"type\": \"string\"\n          },\n          \"status\": {\n            \"type\": \"string\",\n            \"enum\": [\"available\", \"pending\", \"sold\"]\n          }\n        }\n      },\n      \"CreatePetBody\": {\n        \"type\": \"object\",\n        \"required\": [\"name\"],\n        \"properties\": {\n          \"name\": {\n            \"type\": \"string\",\n            \"minLength\": 1,\n            \"maxLength\": 100\n          },\n          \"tag\": {\n            \"type\": \"string\"\n          }\n        }\n      },\n      \"UpdatePetBody\": {\n        \"type\": \"object\",\n        \"properties\": {\n          \"name\": {\n            \"type\": \"string\",\n            \"minLength\": 1,\n            \"maxLength\": 100\n          },\n          \"tag\": {\n            \"type\": \"string\"\n          },\n          \"status\": {\n            \"type\": \"string\",\n            \"enum\": [\"available\", \"pending\", \"sold\"]\n          }\n        }\n      },\n      \"Error\": {\n        \"type\": \"object\",\n        \"required\": [\"code\", \"message\"],\n        \"properties\": {\n          \"code\": {\n            \"type\": \"integer\",\n            \"format\": \"int32\"\n          },\n          \"message\": {\n            \"type\": \"string\"\n          }\n        }\n      }\n    }\n  }\n}\n"
  },
  {
    "path": "examples/openapi-ts-nestjs/package.json",
    "content": "{\n  \"name\": \"@example/openapi-ts-nestjs\",\n  \"version\": \"0.1.0\",\n  \"private\": true,\n  \"type\": \"module\",\n  \"scripts\": {\n    \"openapi-ts\": \"openapi-ts\",\n    \"start\": \"node --import @swc-node/register/esm-register src/main.ts\",\n    \"test\": \"vitest\",\n    \"typecheck\": \"tsc --noEmit\"\n  },\n  \"dependencies\": {\n    \"@nestjs/common\": \"^11.0.1\",\n    \"@nestjs/core\": \"^11.0.1\",\n    \"@nestjs/platform-express\": \"^11.0.1\",\n    \"reflect-metadata\": \"^0.2.2\",\n    \"rxjs\": \"^7.8.1\"\n  },\n  \"devDependencies\": {\n    \"@hey-api/openapi-ts\": \"workspace:*\",\n    \"@nestjs/testing\": \"^11.0.1\",\n    \"@swc-node/register\": \"^1.10.10\",\n    \"@swc/core\": \"^1.11.29\",\n    \"eslint\": \"^9.18.0\",\n    \"oxfmt\": \"^0.27.0\",\n    \"typescript\": \"^5.9.3\",\n    \"unplugin-swc\": \"^1.5.5\",\n    \"vite\": \"^7.3.1\",\n    \"vitest\": \"^4.0.18\"\n  }\n}\n"
  },
  {
    "path": "examples/openapi-ts-nestjs/src/app.module.ts",
    "content": "import { Module } from '@nestjs/common';\n\nimport { PetsModule } from './pets/pets.module';\nimport { StoreModule } from './store/store.module';\n\n@Module({\n  imports: [PetsModule, StoreModule],\n})\nexport class AppModule {}\n"
  },
  {
    "path": "examples/openapi-ts-nestjs/src/client/client/client.gen.ts",
    "content": "// 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 (options: RequestOptions) => {\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 url = buildUrl(opts);\n\n    return { opts, url };\n  };\n\n  const request: Client['request'] = async (options) => {\n    // @ts-expect-error\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"
  },
  {
    "path": "examples/openapi-ts-nestjs/src/client/client/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type { Auth } from '../core/auth.gen';\nexport type { QuerySerializerOptions } from '../core/bodySerializer.gen';\nexport {\n  formDataBodySerializer,\n  jsonBodySerializer,\n  urlSearchParamsBodySerializer,\n} from '../core/bodySerializer.gen';\nexport { buildClientParams } from '../core/params.gen';\nexport { serializeQueryKeyValue } from '../core/queryKeySerializer.gen';\nexport { createClient } from './client.gen';\nexport type {\n  Client,\n  ClientOptions,\n  Config,\n  CreateClientConfig,\n  Options,\n  RequestOptions,\n  RequestResult,\n  ResolvedRequestOptions,\n  ResponseStyle,\n  TDataShape,\n} from './types.gen';\nexport { createConfig, mergeHeaders } from './utils.gen';\n"
  },
  {
    "path": "examples/openapi-ts-nestjs/src/client/client/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { Auth } from '../core/auth.gen';\nimport type { ServerSentEventsOptions, ServerSentEventsResult } from '../core/serverSentEvents.gen';\nimport type { Client as CoreClient, Config as CoreConfig } from '../core/types.gen';\nimport type { Middleware } from './utils.gen';\n\nexport type ResponseStyle = 'data' | 'fields';\n\nexport interface Config<T extends ClientOptions = ClientOptions>\n  extends Omit<RequestInit, 'body' | 'headers' | 'method'>, CoreConfig {\n  /**\n   * Base URL for all requests made by this client.\n   */\n  baseUrl?: T['baseUrl'];\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   * Please don't use the Fetch client for Next.js applications. The `next`\n   * options won't have any effect.\n   *\n   * Install {@link https://www.npmjs.com/package/@hey-api/client-next `@hey-api/client-next`} instead.\n   */\n  next?: never;\n  /**\n   * Return the response data parsed in a specified format. By default, `auto`\n   * will infer the appropriate method from the `Content-Type` response header.\n   * You can override this behavior with any of the {@link Body} methods.\n   * Select `stream` if you don't want to parse response data at all.\n   *\n   * @default 'auto'\n   */\n  parseAs?: 'arrayBuffer' | 'auto' | 'blob' | 'formData' | 'json' | 'stream' | 'text';\n  /**\n   * Should we return only data or multiple fields (data, error, response, etc.)?\n   *\n   * @default 'fields'\n   */\n  responseStyle?: ResponseStyle;\n  /**\n   * Throw an error instead of returning it in the response?\n   *\n   * @default false\n   */\n  throwOnError?: T['throwOnError'];\n}\n\nexport interface RequestOptions<\n  TData = unknown,\n  TResponseStyle extends ResponseStyle = 'fields',\n  ThrowOnError extends boolean = boolean,\n  Url extends string = string,\n>\n  extends\n    Config<{\n      responseStyle: TResponseStyle;\n      throwOnError: ThrowOnError;\n    }>,\n    Pick<\n      ServerSentEventsOptions<TData>,\n      | 'onRequest'\n      | 'onSseError'\n      | 'onSseEvent'\n      | 'sseDefaultRetryDelay'\n      | 'sseMaxRetryAttempts'\n      | 'sseMaxRetryDelay'\n    > {\n  /**\n   * Any body that you want to add to your request.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/fetch#body}\n   */\n  body?: unknown;\n  path?: Record<string, unknown>;\n  query?: Record<string, unknown>;\n  /**\n   * Security mechanism(s) to use for the request.\n   */\n  security?: ReadonlyArray<Auth>;\n  url: Url;\n}\n\nexport interface ResolvedRequestOptions<\n  TResponseStyle extends ResponseStyle = 'fields',\n  ThrowOnError extends boolean = boolean,\n  Url extends string = string,\n> extends RequestOptions<unknown, TResponseStyle, ThrowOnError, Url> {\n  serializedBody?: string;\n}\n\nexport type RequestResult<\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = boolean,\n  TResponseStyle extends ResponseStyle = 'fields',\n> = ThrowOnError extends true\n  ? Promise<\n      TResponseStyle extends 'data'\n        ? TData extends Record<string, unknown>\n          ? TData[keyof TData]\n          : TData\n        : {\n            data: TData extends Record<string, unknown> ? TData[keyof TData] : TData;\n            request: Request;\n            response: Response;\n          }\n    >\n  : Promise<\n      TResponseStyle extends 'data'\n        ? (TData extends Record<string, unknown> ? TData[keyof TData] : TData) | undefined\n        : (\n            | {\n                data: TData extends Record<string, unknown> ? TData[keyof TData] : TData;\n                error: undefined;\n              }\n            | {\n                data: undefined;\n                error: TError extends Record<string, unknown> ? TError[keyof TError] : TError;\n              }\n          ) & {\n            request: Request;\n            response: Response;\n          }\n    >;\n\nexport interface ClientOptions {\n  baseUrl?: string;\n  responseStyle?: ResponseStyle;\n  throwOnError?: boolean;\n}\n\ntype MethodFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'>,\n) => RequestResult<TData, TError, ThrowOnError, TResponseStyle>;\n\ntype SseFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'>,\n) => Promise<ServerSentEventsResult<TData, TError>>;\n\ntype RequestFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'> &\n    Pick<Required<RequestOptions<TData, TResponseStyle, ThrowOnError>>, 'method'>,\n) => RequestResult<TData, TError, ThrowOnError, TResponseStyle>;\n\ntype BuildUrlFn = <\n  TData extends {\n    body?: unknown;\n    path?: Record<string, unknown>;\n    query?: Record<string, unknown>;\n    url: string;\n  },\n>(\n  options: TData & Options<TData>,\n) => string;\n\nexport type Client = CoreClient<RequestFn, Config, MethodFn, BuildUrlFn, SseFn> & {\n  interceptors: Middleware<Request, Response, unknown, ResolvedRequestOptions>;\n};\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 = ClientOptions> = (\n  override?: Config<ClientOptions & T>,\n) => Config<Required<ClientOptions> & T>;\n\nexport interface TDataShape {\n  body?: unknown;\n  headers?: unknown;\n  path?: unknown;\n  query?: unknown;\n  url: string;\n}\n\ntype OmitKeys<T, K> = Pick<T, Exclude<keyof T, K>>;\n\nexport type Options<\n  TData extends TDataShape = TDataShape,\n  ThrowOnError extends boolean = boolean,\n  TResponse = unknown,\n  TResponseStyle extends ResponseStyle = 'fields',\n> = OmitKeys<\n  RequestOptions<TResponse, TResponseStyle, ThrowOnError>,\n  'body' | 'path' | 'query' | 'url'\n> &\n  ([TData] extends [never] ? unknown : Omit<TData, 'url'>);\n"
  },
  {
    "path": "examples/openapi-ts-nestjs/src/client/client/utils.gen.ts",
    "content": "// 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"
  },
  {
    "path": "examples/openapi-ts-nestjs/src/client/client.gen.ts",
    "content": "// 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> = (\n  override?: Config<ClientOptions & T>,\n) => Config<Required<ClientOptions> & T>;\n\nexport const client = createClient(\n  createConfig<ClientOptions2>({ baseUrl: 'http://localhost:3000/v3' }),\n);\n"
  },
  {
    "path": "examples/openapi-ts-nestjs/src/client/core/auth.gen.ts",
    "content": "// 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"
  },
  {
    "path": "examples/openapi-ts-nestjs/src/client/core/bodySerializer.gen.ts",
    "content": "// 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"
  },
  {
    "path": "examples/openapi-ts-nestjs/src/client/core/params.gen.ts",
    "content": "// 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"
  },
  {
    "path": "examples/openapi-ts-nestjs/src/client/core/pathSerializer.gen.ts",
    "content": "// 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"
  },
  {
    "path": "examples/openapi-ts-nestjs/src/client/core/queryKeySerializer.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\n/**\n * JSON-friendly union that mirrors what Pinia Colada can hash.\n */\nexport type JsonValue =\n  | null\n  | string\n  | number\n  | boolean\n  | JsonValue[]\n  | { [key: string]: JsonValue };\n\n/**\n * Replacer that converts non-JSON values (bigint, Date, etc.) to safe substitutes.\n */\nexport const queryKeyJsonReplacer = (_key: string, value: unknown) => {\n  if (value === undefined || typeof value === 'function' || typeof value === 'symbol') {\n    return undefined;\n  }\n  if (typeof value === 'bigint') {\n    return value.toString();\n  }\n  if (value instanceof Date) {\n    return value.toISOString();\n  }\n  return value;\n};\n\n/**\n * Safely stringifies a value and parses it back into a JsonValue.\n */\nexport const stringifyToJsonValue = (input: unknown): JsonValue | undefined => {\n  try {\n    const json = JSON.stringify(input, queryKeyJsonReplacer);\n    if (json === undefined) {\n      return undefined;\n    }\n    return JSON.parse(json) as JsonValue;\n  } catch {\n    return undefined;\n  }\n};\n\n/**\n * Detects plain objects (including objects with a null prototype).\n */\nconst isPlainObject = (value: unknown): value is Record<string, unknown> => {\n  if (value === null || typeof value !== 'object') {\n    return false;\n  }\n  const prototype = Object.getPrototypeOf(value as object);\n  return prototype === Object.prototype || prototype === null;\n};\n\n/**\n * Turns URLSearchParams into a sorted JSON object for deterministic keys.\n */\nconst serializeSearchParams = (params: URLSearchParams): JsonValue => {\n  const entries = Array.from(params.entries()).sort(([a], [b]) => a.localeCompare(b));\n  const result: Record<string, JsonValue> = {};\n\n  for (const [key, value] of entries) {\n    const existing = result[key];\n    if (existing === undefined) {\n      result[key] = value;\n      continue;\n    }\n\n    if (Array.isArray(existing)) {\n      (existing as string[]).push(value);\n    } else {\n      result[key] = [existing, value];\n    }\n  }\n\n  return result;\n};\n\n/**\n * Normalizes any accepted value into a JSON-friendly shape for query keys.\n */\nexport const serializeQueryKeyValue = (value: unknown): JsonValue | undefined => {\n  if (value === null) {\n    return null;\n  }\n\n  if (typeof value === 'string' || typeof value === 'number' || typeof value === 'boolean') {\n    return value;\n  }\n\n  if (value === undefined || typeof value === 'function' || typeof value === 'symbol') {\n    return undefined;\n  }\n\n  if (typeof value === 'bigint') {\n    return value.toString();\n  }\n\n  if (value instanceof Date) {\n    return value.toISOString();\n  }\n\n  if (Array.isArray(value)) {\n    return stringifyToJsonValue(value);\n  }\n\n  if (typeof URLSearchParams !== 'undefined' && value instanceof URLSearchParams) {\n    return serializeSearchParams(value);\n  }\n\n  if (isPlainObject(value)) {\n    return stringifyToJsonValue(value);\n  }\n\n  return undefined;\n};\n"
  },
  {
    "path": "examples/openapi-ts-nestjs/src/client/core/serverSentEvents.gen.ts",
    "content": "// 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 const 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            // Normalize line endings: CRLF -> LF, then CR -> LF\n            buffer = buffer.replace(/\\r\\n/g, '\\n').replace(/\\r/g, '\\n');\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"
  },
  {
    "path": "examples/openapi-ts-nestjs/src/client/core/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { Auth, AuthToken } from './auth.gen';\nimport type { BodySerializer, QuerySerializer, QuerySerializerOptions } from './bodySerializer.gen';\n\nexport type HttpMethod =\n  | 'connect'\n  | 'delete'\n  | 'get'\n  | 'head'\n  | 'options'\n  | 'patch'\n  | 'post'\n  | 'put'\n  | 'trace';\n\nexport type Client<\n  RequestFn = never,\n  Config = unknown,\n  MethodFn = never,\n  BuildUrlFn = never,\n  SseFn = never,\n> = {\n  /**\n   * Returns the final request URL.\n   */\n  buildUrl: BuildUrlFn;\n  getConfig: () => Config;\n  request: RequestFn;\n  setConfig: (config: Config) => Config;\n} & {\n  [K in HttpMethod]: MethodFn;\n} & ([SseFn] extends [never] ? { sse?: never } : { sse: { [K in HttpMethod]: SseFn } });\n\nexport interface Config {\n  /**\n   * Auth token or a function returning auth token. The resolved value will be\n   * added to the request payload as defined by its `security` array.\n   */\n  auth?: ((auth: Auth) => Promise<AuthToken> | AuthToken) | AuthToken;\n  /**\n   * A function for serializing request body parameter. By default,\n   * {@link JSON.stringify()} will be used.\n   */\n  bodySerializer?: BodySerializer | null;\n  /**\n   * An object containing any HTTP headers that you want to pre-populate your\n   * `Headers` object with.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/Headers/Headers#init See more}\n   */\n  headers?:\n    | RequestInit['headers']\n    | Record<\n        string,\n        string | number | boolean | (string | number | boolean)[] | null | undefined | unknown\n      >;\n  /**\n   * The request method.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/fetch#method See more}\n   */\n  method?: Uppercase<HttpMethod>;\n  /**\n   * A function for serializing request query parameters. By default, arrays\n   * will be exploded in form style, objects will be exploded in deepObject\n   * style, and reserved characters are percent-encoded.\n   *\n   * This method will have no effect if the native `paramsSerializer()` Axios\n   * API function is used.\n   *\n   * {@link https://swagger.io/docs/specification/serialization/#query View examples}\n   */\n  querySerializer?: QuerySerializer | QuerySerializerOptions;\n  /**\n   * A function validating request data. This is useful if you want to ensure\n   * the request conforms to the desired shape, so it can be safely sent to\n   * the server.\n   */\n  requestValidator?: (data: unknown) => Promise<unknown>;\n  /**\n   * A function transforming response data before it's returned. This is useful\n   * for post-processing data, e.g. converting ISO strings into Date objects.\n   */\n  responseTransformer?: (data: unknown) => Promise<unknown>;\n  /**\n   * A function validating response data. This is useful if you want to ensure\n   * the response conforms to the desired shape, so it can be safely passed to\n   * the transformers and returned to the user.\n   */\n  responseValidator?: (data: unknown) => Promise<unknown>;\n}\n\ntype IsExactlyNeverOrNeverUndefined<T> = [T] extends [never]\n  ? true\n  : [T] extends [never | undefined]\n    ? [undefined] extends [T]\n      ? false\n      : true\n    : false;\n\nexport type OmitNever<T extends Record<string, unknown>> = {\n  [K in keyof T as IsExactlyNeverOrNeverUndefined<T[K]> extends true ? never : K]: T[K];\n};\n"
  },
  {
    "path": "examples/openapi-ts-nestjs/src/client/core/utils.gen.ts",
    "content": "// 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"
  },
  {
    "path": "examples/openapi-ts-nestjs/src/client/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport {\n  createPet,\n  deletePet,\n  getInventory,\n  listPets,\n  type Options,\n  showPetById,\n  updatePet,\n} from './sdk.gen';\nexport type {\n  ClientOptions,\n  CreatePetBody,\n  CreatePetData,\n  CreatePetError,\n  CreatePetErrors,\n  CreatePetResponse,\n  CreatePetResponses,\n  DeletePetData,\n  DeletePetError,\n  DeletePetErrors,\n  DeletePetResponse,\n  DeletePetResponses,\n  Error,\n  GetInventoryData,\n  GetInventoryResponse,\n  GetInventoryResponses,\n  ListPetsData,\n  ListPetsResponse,\n  ListPetsResponses,\n  Pet,\n  ShowPetByIdData,\n  ShowPetByIdError,\n  ShowPetByIdErrors,\n  ShowPetByIdResponse,\n  ShowPetByIdResponses,\n  UpdatePetBody,\n  UpdatePetData,\n  UpdatePetError,\n  UpdatePetErrors,\n  UpdatePetResponse,\n  UpdatePetResponses,\n} from './types.gen';\n"
  },
  {
    "path": "examples/openapi-ts-nestjs/src/client/nestjs.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type {\n  CreatePetData,\n  CreatePetResponse,\n  DeletePetData,\n  DeletePetResponse,\n  GetInventoryResponse,\n  ListPetsData,\n  ListPetsResponse,\n  ShowPetByIdData,\n  ShowPetByIdResponse,\n  UpdatePetData,\n  UpdatePetResponse,\n} from './types.gen';\n\nexport type PetsControllerMethods = {\n  listPets: (query?: ListPetsData['query']) => Promise<ListPetsResponse>;\n  createPet: (body: CreatePetData['body']) => Promise<CreatePetResponse>;\n  deletePet: (path: DeletePetData['path']) => Promise<DeletePetResponse>;\n  showPetById: (path: ShowPetByIdData['path']) => Promise<ShowPetByIdResponse>;\n  updatePet: (\n    path: UpdatePetData['path'],\n    body: UpdatePetData['body'],\n  ) => Promise<UpdatePetResponse>;\n};\n\nexport type StoreControllerMethods = {\n  getInventory: () => Promise<GetInventoryResponse>;\n};\n"
  },
  {
    "path": "examples/openapi-ts-nestjs/src/client/sdk.gen.ts",
    "content": "// 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 {\n  CreatePetData,\n  CreatePetErrors,\n  CreatePetResponses,\n  DeletePetData,\n  DeletePetErrors,\n  DeletePetResponses,\n  GetInventoryData,\n  GetInventoryResponses,\n  ListPetsData,\n  ListPetsResponses,\n  ShowPetByIdData,\n  ShowPetByIdErrors,\n  ShowPetByIdResponses,\n  UpdatePetData,\n  UpdatePetErrors,\n  UpdatePetResponses,\n} from './types.gen';\n\nexport type Options<\n  TData extends TDataShape = TDataShape,\n  ThrowOnError extends boolean = boolean,\n> = Options2<TData, ThrowOnError> & {\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 all pets\n */\nexport const listPets = <ThrowOnError extends boolean = false>(\n  options?: Options<ListPetsData, ThrowOnError>,\n) =>\n  (options?.client ?? client).get<ListPetsResponses, unknown, ThrowOnError>({\n    url: '/pets',\n    ...options,\n  });\n\n/**\n * Create a pet\n */\nexport const createPet = <ThrowOnError extends boolean = false>(\n  options: Options<CreatePetData, ThrowOnError>,\n) =>\n  (options.client ?? client).post<CreatePetResponses, CreatePetErrors, ThrowOnError>({\n    url: '/pets',\n    ...options,\n    headers: {\n      'Content-Type': 'application/json',\n      ...options.headers,\n    },\n  });\n\n/**\n * Delete a pet\n */\nexport const deletePet = <ThrowOnError extends boolean = false>(\n  options: Options<DeletePetData, ThrowOnError>,\n) =>\n  (options.client ?? client).delete<DeletePetResponses, DeletePetErrors, ThrowOnError>({\n    url: '/pets/{petId}',\n    ...options,\n  });\n\n/**\n * Find pet by ID\n */\nexport const showPetById = <ThrowOnError extends boolean = false>(\n  options: Options<ShowPetByIdData, ThrowOnError>,\n) =>\n  (options.client ?? client).get<ShowPetByIdResponses, ShowPetByIdErrors, ThrowOnError>({\n    url: '/pets/{petId}',\n    ...options,\n  });\n\n/**\n * Update a pet\n */\nexport const updatePet = <ThrowOnError extends boolean = false>(\n  options: Options<UpdatePetData, ThrowOnError>,\n) =>\n  (options.client ?? client).put<UpdatePetResponses, UpdatePetErrors, ThrowOnError>({\n    url: '/pets/{petId}',\n    ...options,\n    headers: {\n      'Content-Type': 'application/json',\n      ...options.headers,\n    },\n  });\n\n/**\n * Returns pet inventories by status\n */\nexport const getInventory = <ThrowOnError extends boolean = false>(\n  options?: Options<GetInventoryData, ThrowOnError>,\n) =>\n  (options?.client ?? client).get<GetInventoryResponses, unknown, ThrowOnError>({\n    url: '/store/inventory',\n    ...options,\n  });\n"
  },
  {
    "path": "examples/openapi-ts-nestjs/src/client/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type ClientOptions = {\n  baseUrl: 'http://localhost:3000/v3' | (string & {});\n};\n\nexport type Pet = {\n  id: string;\n  name: string;\n  tag?: string;\n  status?: 'available' | 'pending' | 'sold';\n};\n\nexport type CreatePetBody = {\n  name: string;\n  tag?: string;\n};\n\nexport type UpdatePetBody = {\n  name?: string;\n  tag?: string;\n  status?: 'available' | 'pending' | 'sold';\n};\n\nexport type Error = {\n  code: number;\n  message: string;\n};\n\nexport type ListPetsData = {\n  body?: never;\n  path?: never;\n  query?: {\n    limit?: number;\n    offset?: number;\n  };\n  url: '/pets';\n};\n\nexport type ListPetsResponses = {\n  /**\n   * A list of pets\n   */\n  200: Array<Pet>;\n};\n\nexport type ListPetsResponse = ListPetsResponses[keyof ListPetsResponses];\n\nexport type CreatePetData = {\n  body: CreatePetBody;\n  path?: never;\n  query?: never;\n  url: '/pets';\n};\n\nexport type CreatePetErrors = {\n  /**\n   * Validation error\n   */\n  400: Error;\n};\n\nexport type CreatePetError = CreatePetErrors[keyof CreatePetErrors];\n\nexport type CreatePetResponses = {\n  /**\n   * Pet created\n   */\n  201: Pet;\n};\n\nexport type CreatePetResponse = CreatePetResponses[keyof CreatePetResponses];\n\nexport type DeletePetData = {\n  body?: never;\n  path: {\n    petId: string;\n  };\n  query?: never;\n  url: '/pets/{petId}';\n};\n\nexport type DeletePetErrors = {\n  /**\n   * Pet not found\n   */\n  404: Error;\n};\n\nexport type DeletePetError = DeletePetErrors[keyof DeletePetErrors];\n\nexport type DeletePetResponses = {\n  /**\n   * Pet deleted\n   */\n  204: void;\n};\n\nexport type DeletePetResponse = DeletePetResponses[keyof DeletePetResponses];\n\nexport type ShowPetByIdData = {\n  body?: never;\n  path: {\n    petId: string;\n  };\n  query?: never;\n  url: '/pets/{petId}';\n};\n\nexport type ShowPetByIdErrors = {\n  /**\n   * Pet not found\n   */\n  404: Error;\n};\n\nexport type ShowPetByIdError = ShowPetByIdErrors[keyof ShowPetByIdErrors];\n\nexport type ShowPetByIdResponses = {\n  /**\n   * Pet found\n   */\n  200: Pet;\n};\n\nexport type ShowPetByIdResponse = ShowPetByIdResponses[keyof ShowPetByIdResponses];\n\nexport type UpdatePetData = {\n  body: UpdatePetBody;\n  path: {\n    petId: string;\n  };\n  query?: never;\n  url: '/pets/{petId}';\n};\n\nexport type UpdatePetErrors = {\n  /**\n   * Validation error\n   */\n  400: Error;\n  /**\n   * Pet not found\n   */\n  404: Error;\n};\n\nexport type UpdatePetError = UpdatePetErrors[keyof UpdatePetErrors];\n\nexport type UpdatePetResponses = {\n  /**\n   * Pet updated\n   */\n  200: Pet;\n};\n\nexport type UpdatePetResponse = UpdatePetResponses[keyof UpdatePetResponses];\n\nexport type GetInventoryData = {\n  body?: never;\n  path?: never;\n  query?: never;\n  url: '/store/inventory';\n};\n\nexport type GetInventoryResponses = {\n  /**\n   * Successful operation\n   */\n  200: {\n    [key: string]: number;\n  };\n};\n\nexport type GetInventoryResponse = GetInventoryResponses[keyof GetInventoryResponses];\n"
  },
  {
    "path": "examples/openapi-ts-nestjs/src/main.ts",
    "content": "import 'reflect-metadata';\n\nimport { NestFactory } from '@nestjs/core';\n\nimport { AppModule } from './app.module';\n\nasync function bootstrap() {\n  const app = await NestFactory.create(AppModule);\n  await app.listen(3000);\n}\n\nbootstrap();\n"
  },
  {
    "path": "examples/openapi-ts-nestjs/src/pets/pets.controller.ts",
    "content": "import { Body, Controller, Get, NotFoundException, Param, Post, Query } from '@nestjs/common';\n\nimport type { PetsControllerMethods } from '../client/nestjs.gen';\nimport type { CreatePetData, ListPetsData, Pet, ShowPetByIdData } from '../client/types.gen';\n\n@Controller('pets')\nexport class PetsController implements Pick<\n  PetsControllerMethods,\n  'createPet' | 'listPets' | 'showPetById'\n> {\n  private readonly pets: Pet[] = [\n    { id: '1', name: 'Fido', status: 'available', tag: 'dog' },\n    { id: '2', name: 'Kitty', status: 'available', tag: 'cat' },\n  ];\n\n  @Get()\n  async listPets(@Query() query?: ListPetsData['query']) {\n    const limit = query?.limit ?? 20;\n\n    return this.pets.slice(0, limit);\n  }\n\n  @Post()\n  async createPet(@Body() body: CreatePetData['body']) {\n    const pet: Pet = {\n      id: crypto.randomUUID(),\n      name: body.name,\n      status: 'available',\n      tag: body.tag,\n    };\n\n    this.pets.push(pet);\n\n    return pet;\n  }\n\n  @Get(':petId')\n  async showPetById(@Param() path: ShowPetByIdData['path']) {\n    const pet = this.pets.find((p) => p.id === path.petId);\n\n    if (!pet) {\n      throw new NotFoundException(`Pet ${path.petId} not found`);\n    }\n\n    return pet;\n  }\n}\n"
  },
  {
    "path": "examples/openapi-ts-nestjs/src/pets/pets.module.ts",
    "content": "import { Module } from '@nestjs/common';\n\nimport { PetsController } from './pets.controller';\n\n@Module({\n  controllers: [PetsController],\n})\nexport class PetsModule {}\n"
  },
  {
    "path": "examples/openapi-ts-nestjs/src/store/store.controller.ts",
    "content": "import { Controller, Get } from '@nestjs/common';\n\nimport type { StoreControllerMethods } from '../client/nestjs.gen';\n\n@Controller('store')\nexport class StoreController implements Pick<StoreControllerMethods, 'getInventory'> {\n  @Get('inventory')\n  async getInventory() {\n    return {\n      available: 10,\n      pending: 3,\n      sold: 5,\n    };\n  }\n}\n"
  },
  {
    "path": "examples/openapi-ts-nestjs/src/store/store.module.ts",
    "content": "import { Module } from '@nestjs/common';\n\nimport { StoreController } from './store.controller';\n\n@Module({\n  controllers: [StoreController],\n})\nexport class StoreModule {}\n"
  },
  {
    "path": "examples/openapi-ts-nestjs/test/pets.test.ts",
    "content": "import type { INestApplication } from '@nestjs/common';\nimport { Test } from '@nestjs/testing';\nimport type { AddressInfo } from 'net';\nimport { AppModule } from 'src/app.module';\nimport { createPet, getInventory, listPets, showPetById } from 'src/client';\nimport { client } from 'src/client/client.gen';\n\nlet app: INestApplication;\n\nbeforeAll(async () => {\n  const moduleRef = await Test.createTestingModule({\n    imports: [AppModule],\n  }).compile();\n\n  app = moduleRef.createNestApplication();\n  await app.init();\n  await app.listen(0);\n\n  const address = app.getHttpServer().address() as AddressInfo;\n  const baseUrl = `http://localhost:${String(address.port)}`;\n  client.setConfig({ baseUrl });\n});\n\nafterAll(async () => {\n  await app.close();\n});\n\ndescribe('PetsController', () => {\n  test('listPets', async () => {\n    const result = await listPets({ client });\n    expect(result.response.status).toBe(200);\n    expect(Array.isArray(result.data)).toBe(true);\n  });\n\n  test('showPetById', async () => {\n    const result = await showPetById({\n      client,\n      path: { petId: '1' },\n    });\n    expect(result.response.status).toBe(200);\n  });\n\n  test('createPet', async () => {\n    const result = await createPet({\n      body: { name: 'Buddy' },\n      client,\n    });\n    expect(result.response.status).toBe(201);\n    expect(result.data).toMatchObject({ name: 'Buddy' });\n  });\n});\n\ndescribe('StoreController', () => {\n  test('getInventory', async () => {\n    const result = await getInventory({ client });\n    expect(result.response.status).toBe(200);\n  });\n});\n"
  },
  {
    "path": "examples/openapi-ts-nestjs/tsconfig.json",
    "content": "{\n  \"include\": [\"src/**/*\", \"test/**/*\"],\n  \"compilerOptions\": {\n    \"emitDecoratorMetadata\": true,\n    \"experimentalDecorators\": true,\n    \"esModuleInterop\": true,\n    \"lib\": [\"es2023\", \"dom\", \"dom.iterable\"],\n    \"module\": \"ESNext\",\n    \"moduleResolution\": \"Bundler\",\n    \"paths\": {\n      \"src/*\": [\"./src/*\"]\n    },\n    \"skipLibCheck\": true,\n    \"target\": \"es2022\",\n    \"types\": [\"node\", \"vitest/globals\"],\n\n    \"strict\": true,\n    \"noUncheckedIndexedAccess\": true,\n    \"noUnusedLocals\": true,\n    \"noUnusedParameters\": true,\n    \"noImplicitReturns\": true,\n    \"noFallthroughCasesInSwitch\": true,\n    \"noImplicitOverride\": true,\n    \"noPropertyAccessFromIndexSignature\": true,\n    \"forceConsistentCasingInFileNames\": true,\n    \"isolatedModules\": true\n  },\n  \"references\": [{ \"path\": \"./tsconfig.node.json\" }]\n}\n"
  },
  {
    "path": "examples/openapi-ts-nestjs/tsconfig.node.json",
    "content": "{\n  \"compilerOptions\": {\n    \"composite\": true,\n    \"skipLibCheck\": true,\n    \"module\": \"ESNext\",\n    \"moduleResolution\": \"bundler\",\n    \"allowSyntheticDefaultImports\": true,\n    \"strict\": true\n  },\n  \"include\": [\"vite.config.ts\"]\n}\n"
  },
  {
    "path": "examples/openapi-ts-nestjs/vite.config.ts",
    "content": "import swc from 'unplugin-swc';\nimport { defineProject } from 'vitest/config';\n\nexport default defineProject({\n  plugins: [swc.vite()],\n  resolve: {\n    alias: {\n      src: new URL('./src', import.meta.url).pathname,\n    },\n  },\n  test: {\n    environment: 'node',\n    globals: true,\n    include: ['test/**/*.test.ts'],\n  },\n});\n"
  },
  {
    "path": "examples/openapi-ts-next/.gitignore",
    "content": "# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.\n\n# dependencies\n/node_modules\n/.pnp\n.pnp.*\n.yarn/*\n!.yarn/patches\n!.yarn/plugins\n!.yarn/releases\n!.yarn/versions\n\n# testing\n/coverage\n\n# next.js\n/.next/\n/out/\n\n# production\n/build\n\n# misc\n.DS_Store\n*.pem\n\n# debug\nnpm-debug.log*\nyarn-debug.log*\nyarn-error.log*\n.pnpm-debug.log*\n\n# env files (can opt-in for committing if needed)\n.env*\n\n# vercel\n.vercel\n\n# typescript\n*.tsbuildinfo\nnext-env.d.ts\n"
  },
  {
    "path": "examples/openapi-ts-next/CHANGELOG.md",
    "content": "# @example/openapi-ts-next\n\n## 0.1.13\n\n### Patch Changes\n\n- Updated dependencies [[`f23f3ae`](https://github.com/hey-api/openapi-ts/commit/f23f3ae874385e758eb8d43bb4e274c9858a4e40)]:\n  - @hey-api/client-next@0.5.1\n\n## 0.1.12\n\n### Patch Changes\n\n- Updated dependencies [[`10d2e03`](https://github.com/hey-api/openapi-ts/commit/10d2e03b8295e4e887fab8d023aa823699efbae8)]:\n  - @hey-api/client-next@0.5.0\n\n## 0.1.11\n\n### Patch Changes\n\n- Updated dependencies [[`8152aaf`](https://github.com/hey-api/openapi-ts/commit/8152aaf4892c48b79fd3dc486eb3c0ea333dc3e6)]:\n  - @hey-api/client-next@0.4.0\n\n## 0.1.10\n\n### Patch Changes\n\n- Updated dependencies [[`1f99066`](https://github.com/hey-api/openapi-ts/commit/1f99066efbb2d0e6b9e3710c701293c2cc09d65e)]:\n  - @hey-api/client-next@0.3.2\n\n## 0.1.9\n\n### Patch Changes\n\n- Updated dependencies [[`565e0b8`](https://github.com/hey-api/openapi-ts/commit/565e0b89fbab4556ecdc63dfe08250942681140e)]:\n  - @hey-api/client-next@0.3.1\n\n## 0.1.8\n\n### Patch Changes\n\n- Updated dependencies [[`67c385b`](https://github.com/hey-api/openapi-ts/commit/67c385bf6289a79726b0cdd85fd81ca501cf2248)]:\n  - @hey-api/client-next@0.3.0\n\n## 0.1.7\n\n### Patch Changes\n\n- Updated dependencies [[`fe43b88`](https://github.com/hey-api/openapi-ts/commit/fe43b889c20a2001f56e259f93f64851a1caa1d1)]:\n  - @hey-api/client-next@0.2.4\n\n## 0.1.6\n\n### Patch Changes\n\n- Updated dependencies [[`c0b36b9`](https://github.com/hey-api/openapi-ts/commit/c0b36b95645d484034c3af145c5554867568979b)]:\n  - @hey-api/client-next@0.2.3\n\n## 0.1.5\n\n### Patch Changes\n\n- Updated dependencies [[`b8cc9f8`](https://github.com/hey-api/openapi-ts/commit/b8cc9f8a5eaf4f4ff345abc49c14c6b96744c2ea)]:\n  - @hey-api/client-next@0.2.2\n\n## 0.1.4\n\n### Patch Changes\n\n- Updated dependencies [[`7f0f4a7`](https://github.com/hey-api/openapi-ts/commit/7f0f4a76b06c8fafb33581b522faf8efc6fd85ac)]:\n  - @hey-api/client-next@0.2.1\n\n## 0.1.3\n\n### Patch Changes\n\n- Updated dependencies [[`bb6d46a`](https://github.com/hey-api/openapi-ts/commit/bb6d46ae119ce4e7e3a2ab3fded74ac4fb4cdff2)]:\n  - @hey-api/client-next@0.2.0\n\n## 0.1.2\n\n### Patch Changes\n\n- Updated dependencies [[`2dc380e`](https://github.com/hey-api/openapi-ts/commit/2dc380eabc17c723654beb04ecd7bce6d33d3b49)]:\n  - @hey-api/client-next@0.1.0\n\n## 0.1.1\n\n### Patch Changes\n\n- Updated dependencies [[`8eba19d`](https://github.com/hey-api/openapi-ts/commit/8eba19d4092fc0903572ab9fdadf0b4c26928ba2)]:\n  - @hey-api/client-fetch@0.7.2\n"
  },
  {
    "path": "examples/openapi-ts-next/README.md",
    "content": "This is a [Next.js](https://nextjs.org) project bootstrapped with [`create-next-app`](https://nextjs.org/docs/app/api-reference/cli/create-next-app).\n\n## Getting Started\n\nFirst, run the development server:\n\n```bash\nnpm run dev\n# or\nyarn dev\n# or\npnpm dev\n# or\nbun dev\n```\n\nOpen [http://localhost:3000](http://localhost:3000) with your browser to see the result.\n\nYou can start editing the page by modifying `app/page.tsx`. The page auto-updates as you edit the file.\n\nThis project uses [`next/font`](https://nextjs.org/docs/app/building-your-application/optimizing/fonts) to automatically optimize and load [Geist](https://vercel.com/font), a new font family for Vercel.\n\n## Learn More\n\nTo learn more about Next.js, take a look at the following resources:\n\n- [Next.js Documentation](https://nextjs.org/docs) - learn about Next.js features and API.\n- [Learn Next.js](https://nextjs.org/learn) - an interactive Next.js tutorial.\n\nYou can check out [the Next.js GitHub repository](https://github.com/vercel/next.js) - your feedback and contributions are welcome!\n\n## Deploy on Vercel\n\nThe easiest way to deploy your Next.js app is to use the [Vercel Platform](https://vercel.com/new?utm_medium=default-template&filter=next.js&utm_source=create-next-app&utm_campaign=create-next-app-readme) from the creators of Next.js.\n\nCheck out our [Next.js deployment documentation](https://nextjs.org/docs/app/building-your-application/deploying) for more details.\n"
  },
  {
    "path": "examples/openapi-ts-next/app/globals.css",
    "content": "@tailwind base;\n@tailwind components;\n@tailwind utilities;\n\n:root {\n  --background: #ffffff;\n  --foreground: #171717;\n}\n\n@media (prefers-color-scheme: dark) {\n  :root {\n    --background: #0a0a0a;\n    --foreground: #ededed;\n  }\n}\n\nbody {\n  color: var(--foreground);\n  background: var(--background);\n  font-family: Arial, Helvetica, sans-serif;\n}\n"
  },
  {
    "path": "examples/openapi-ts-next/app/layout.tsx",
    "content": "import './globals.css';\n\nimport type { Metadata } from 'next';\nimport { Geist, Geist_Mono } from 'next/font/google';\n\nimport { client } from '@/src/client/client.gen';\n\nclient.interceptors.request.use((options) => {\n  console.log(options);\n});\n\nclient.interceptors.response.use((response, options) => {\n  console.log(response, options);\n  return response;\n});\n\nconst geistSans = Geist({\n  subsets: ['latin'],\n  variable: '--font-geist-sans',\n});\n\nconst geistMono = Geist_Mono({\n  subsets: ['latin'],\n  variable: '--font-geist-mono',\n});\n\nexport const metadata: Metadata = {\n  description: 'Generated by create next app',\n  title: 'Create Next App',\n};\n\nexport default function RootLayout({\n  children,\n}: Readonly<{\n  children: React.ReactNode;\n}>) {\n  return (\n    <html lang=\"en\">\n      <body className={`${geistSans.variable} ${geistMono.variable} antialiased`}>{children}</body>\n    </html>\n  );\n}\n"
  },
  {
    "path": "examples/openapi-ts-next/app/page.tsx",
    "content": "'use client';\n\nimport Image from 'next/image';\nimport Link from 'next/link';\nimport { useEffect, useState } from 'react';\n\nimport { getPetById } from '@/src/client/sdk.gen';\nimport type { Pet } from '@/src/client/types.gen';\n\nexport default function Home() {\n  const [pet, setPet] = useState<Pet>();\n  const [petId, setPetId] = useState(8);\n\n  useEffect(() => {\n    const fetchPet = async () => {\n      const { data } = await getPetById({\n        cache: 'force-cache',\n        next: {\n          revalidate: 10,\n          tags: ['pet'],\n        },\n        path: {\n          petId,\n        },\n      });\n\n      if (data) {\n        setPet(data);\n      }\n    };\n\n    fetchPet();\n  }, [petId]);\n\n  return (\n    <div className=\"grid grid-rows-[20px_1fr_20px] items-center justify-items-center min-h-screen p-8 pb-20 gap-16 sm:p-20 font-[family-name:var(--font-geist-sans)]\">\n      <main className=\"flex flex-col gap-8 row-start-2 items-center sm:items-start\">\n        <Image\n          className=\"dark:invert\"\n          src=\"/next.svg\"\n          alt=\"Next.js logo\"\n          width={180}\n          height={38}\n          priority\n        />\n        <ol className=\"list-inside list-decimal text-sm text-center sm:text-left font-[family-name:var(--font-geist-mono)]\">\n          <li className=\"mb-2\">\n            Pet name:{' '}\n            <code className=\"bg-black/[.05] dark:bg-white/[.06] px-1 py-0.5 rounded font-semibold\">\n              {pet?.name}\n            </code>\n          </li>\n          <li>Press the button below to fetch a random pet</li>\n        </ol>\n\n        <div className=\"flex gap-4 items-center flex-col sm:flex-row\">\n          <button\n            className=\"rounded-full border border-solid border-transparent transition-colors flex items-center justify-center bg-foreground text-background gap-2 hover:bg-[#383838] dark:hover:bg-[#ccc] text-sm sm:text-base h-10 sm:h-12 px-4 sm:px-5\"\n            onClick={() => {\n              // random id 1-10\n              setPetId(Math.floor(Math.random() * (10 - 1 + 1) + 1));\n            }}\n          >\n            <Image\n              className=\"dark:invert\"\n              src=\"/vercel.svg\"\n              alt=\"Vercel logomark\"\n              width={20}\n              height={20}\n            />\n            Random pet\n          </button>\n          <Link\n            className=\"rounded-full border border-solid border-black/[.08] dark:border-white/[.145] transition-colors flex items-center justify-center hover:bg-[#f2f2f2] dark:hover:bg-[#1a1a1a] hover:border-transparent text-sm sm:text-base h-10 sm:h-12 px-4 sm:px-5 sm:min-w-44\"\n            href=\"/pet/8\"\n          >\n            Server component\n          </Link>\n        </div>\n      </main>\n      <footer className=\"row-start-3 flex gap-6 flex-wrap items-center justify-center\">\n        <a\n          className=\"flex items-center gap-2 hover:underline hover:underline-offset-4\"\n          href=\"https://nextjs.org/learn?utm_source=create-next-app&utm_medium=appdir-template-tw&utm_campaign=create-next-app\"\n          target=\"_blank\"\n          rel=\"noopener noreferrer\"\n        >\n          <Image aria-hidden src=\"/file.svg\" alt=\"File icon\" width={16} height={16} />\n          Learn\n        </a>\n        <a\n          className=\"flex items-center gap-2 hover:underline hover:underline-offset-4\"\n          href=\"https://vercel.com/templates?framework=next.js&utm_source=create-next-app&utm_medium=appdir-template-tw&utm_campaign=create-next-app\"\n          target=\"_blank\"\n          rel=\"noopener noreferrer\"\n        >\n          <Image aria-hidden src=\"/window.svg\" alt=\"Window icon\" width={16} height={16} />\n          Examples\n        </a>\n        <a\n          className=\"flex items-center gap-2 hover:underline hover:underline-offset-4\"\n          href=\"https://nextjs.org?utm_source=create-next-app&utm_medium=appdir-template-tw&utm_campaign=create-next-app\"\n          target=\"_blank\"\n          rel=\"noopener noreferrer\"\n        >\n          <Image aria-hidden src=\"/globe.svg\" alt=\"Globe icon\" width={16} height={16} />\n          Go to nextjs.org →\n        </a>\n      </footer>\n    </div>\n  );\n}\n"
  },
  {
    "path": "examples/openapi-ts-next/app/pet/[id]/page.tsx",
    "content": "import Image from 'next/image';\nimport Link from 'next/link';\nimport { notFound } from 'next/navigation';\n\nimport { getPetById } from '@/src/client/sdk.gen';\n\nasync function getPet(id: string) {\n  const petId = Number.parseInt(id, 10);\n  const { data: pet } = await getPetById({\n    cache: 'force-cache',\n    next: {\n      revalidate: 10,\n      tags: ['pet'],\n    },\n    path: {\n      petId,\n    },\n    throwOnError: true,\n  });\n  if (!pet) {\n    notFound();\n  }\n  return pet;\n}\n\nexport async function generateMetadata({ params }: { params: Promise<{ id: string }> }) {\n  const { id } = await params;\n  const pet = await getPet(id);\n  return {\n    name: pet.name,\n  };\n}\n\nexport default async function Blog({ params }: { params: Promise<{ id: string }> }) {\n  const { id } = await params;\n  const pet = await getPet(id);\n\n  return (\n    <div className=\"grid grid-rows-[20px_1fr_20px] items-center justify-items-center min-h-screen p-8 pb-20 gap-16 sm:p-20 font-[family-name:var(--font-geist-sans)]\">\n      <main className=\"flex flex-col gap-8 row-start-2 items-center sm:items-start\">\n        <Image\n          className=\"dark:invert\"\n          src=\"/next.svg\"\n          alt=\"Next.js logo\"\n          width={180}\n          height={38}\n          priority\n        />\n        <ol className=\"list-inside list-decimal text-sm text-center sm:text-left font-[family-name:var(--font-geist-mono)]\">\n          <li className=\"mb-2\">\n            Static pet name:{' '}\n            <code className=\"bg-black/[.05] dark:bg-white/[.06] px-1 py-0.5 rounded font-semibold\">\n              {pet.name}\n            </code>\n          </li>\n        </ol>\n\n        <div className=\"flex gap-4 items-center flex-col sm:flex-row\">\n          <Link\n            className=\"rounded-full border border-solid border-black/[.08] dark:border-white/[.145] transition-colors flex items-center justify-center hover:bg-[#f2f2f2] dark:hover:bg-[#1a1a1a] hover:border-transparent text-sm sm:text-base h-10 sm:h-12 px-4 sm:px-5 sm:min-w-44\"\n            href=\"/\"\n          >\n            Client component\n          </Link>\n        </div>\n      </main>\n      <footer className=\"row-start-3 flex gap-6 flex-wrap items-center justify-center\">\n        <a\n          className=\"flex items-center gap-2 hover:underline hover:underline-offset-4\"\n          href=\"https://nextjs.org/learn?utm_source=create-next-app&utm_medium=appdir-template-tw&utm_campaign=create-next-app\"\n          target=\"_blank\"\n          rel=\"noopener noreferrer\"\n        >\n          <Image aria-hidden src=\"/file.svg\" alt=\"File icon\" width={16} height={16} />\n          Learn\n        </a>\n        <a\n          className=\"flex items-center gap-2 hover:underline hover:underline-offset-4\"\n          href=\"https://vercel.com/templates?framework=next.js&utm_source=create-next-app&utm_medium=appdir-template-tw&utm_campaign=create-next-app\"\n          target=\"_blank\"\n          rel=\"noopener noreferrer\"\n        >\n          <Image aria-hidden src=\"/window.svg\" alt=\"Window icon\" width={16} height={16} />\n          Examples\n        </a>\n        <a\n          className=\"flex items-center gap-2 hover:underline hover:underline-offset-4\"\n          href=\"https://nextjs.org?utm_source=create-next-app&utm_medium=appdir-template-tw&utm_campaign=create-next-app\"\n          target=\"_blank\"\n          rel=\"noopener noreferrer\"\n        >\n          <Image aria-hidden src=\"/globe.svg\" alt=\"Globe icon\" width={16} height={16} />\n          Go to nextjs.org →\n        </a>\n      </footer>\n    </div>\n  );\n}\n"
  },
  {
    "path": "examples/openapi-ts-next/next.config.ts",
    "content": "import type { NextConfig } from 'next';\n\nconst nextConfig: NextConfig = {\n  /* config options here */\n};\n\nexport default nextConfig;\n"
  },
  {
    "path": "examples/openapi-ts-next/openapi-ts.config.ts",
    "content": "import { defineConfig } from '@hey-api/openapi-ts';\n\nexport default defineConfig({\n  input:\n    'https://raw.githubusercontent.com/swagger-api/swagger-petstore/master/src/main/resources/openapi.yaml',\n  logs: {\n    path: './logs',\n  },\n  output: {\n    path: './src/client',\n    postProcess: ['oxfmt', 'eslint'],\n  },\n  plugins: [\n    {\n      name: '@hey-api/client-next',\n      runtimeConfigPath: '../hey-api',\n    },\n    '@hey-api/sdk',\n    {\n      enums: 'javascript',\n      name: '@hey-api/typescript',\n    },\n  ],\n});\n"
  },
  {
    "path": "examples/openapi-ts-next/package.json",
    "content": "{\n  \"name\": \"@example/openapi-ts-next\",\n  \"version\": \"0.1.13\",\n  \"private\": true,\n  \"scripts\": {\n    \"build\": \"next build\",\n    \"dev\": \"next dev\",\n    \"lint\": \"next lint\",\n    \"openapi-ts\": \"openapi-ts\",\n    \"start\": \"next start\"\n  },\n  \"dependencies\": {\n    \"next\": \"15.2.4\",\n    \"react\": \"19.0.0\",\n    \"react-dom\": \"19.0.0\"\n  },\n  \"devDependencies\": {\n    \"@hey-api/openapi-ts\": \"workspace:*\",\n    \"@types/node\": \"24.10.10\",\n    \"@types/react\": \"19.0.1\",\n    \"@types/react-dom\": \"19.0.1\",\n    \"eslint\": \"9.17.0\",\n    \"eslint-config-next\": \"15.1.6\",\n    \"postcss\": \"8.4.41\",\n    \"tailwindcss\": \"3.4.9\",\n    \"typescript\": \"5.9.3\"\n  }\n}\n"
  },
  {
    "path": "examples/openapi-ts-next/postcss.config.mjs",
    "content": "/** @type {import('postcss-load-config').Config} */\nconst config = {\n  plugins: {\n    tailwindcss: {},\n  },\n};\n\nexport default config;\n"
  },
  {
    "path": "examples/openapi-ts-next/src/client/client/client.gen.ts",
    "content": "// 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<Response, unknown, ResolvedRequestOptions>();\n\n  const beforeRequest = async (options: RequestOptions) => {\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 url = buildUrl(opts);\n\n    return { opts, url };\n  };\n\n  // @ts-expect-error\n  const request: Client['request'] = async (options) => {\n    // @ts-expect-error\n    const { opts, url } = await beforeRequest(options);\n\n    for (const fn of interceptors.request.fns) {\n      if (fn) {\n        await fn(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    const requestInit: ReqInit = {\n      ...opts,\n      body: getValidRequestBody(opts),\n    };\n\n    let response = await _fetch(url, requestInit);\n\n    for (const fn of interceptors.response.fns) {\n      if (fn) {\n        response = await fn(response, opts);\n      }\n    }\n\n    const result = {\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 {\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 {\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 {\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, opts)) as string;\n      }\n    }\n\n    finalError = finalError || ({} as string);\n\n    if (opts.throwOnError) {\n      throw finalError;\n    }\n\n    return {\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        const requestInit = {\n          ...init,\n          method: init.method as Config['method'],\n          url,\n        };\n        for (const fn of interceptors.request.fns) {\n          if (fn) {\n            await fn(requestInit);\n            request = new Request(requestInit.url, requestInit);\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"
  },
  {
    "path": "examples/openapi-ts-next/src/client/client/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type { Auth } from '../core/auth.gen';\nexport type { QuerySerializerOptions } from '../core/bodySerializer.gen';\nexport {\n  formDataBodySerializer,\n  jsonBodySerializer,\n  urlSearchParamsBodySerializer,\n} from '../core/bodySerializer.gen';\nexport { buildClientParams } from '../core/params.gen';\nexport { serializeQueryKeyValue } from '../core/queryKeySerializer.gen';\nexport { createClient } from './client.gen';\nexport type {\n  Client,\n  ClientOptions,\n  Config,\n  CreateClientConfig,\n  Options,\n  RequestOptions,\n  RequestResult,\n  TDataShape,\n} from './types.gen';\nexport { createConfig } from './utils.gen';\n"
  },
  {
    "path": "examples/openapi-ts-next/src/client/client/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { Auth } from '../core/auth.gen';\nimport type { ServerSentEventsOptions, ServerSentEventsResult } from '../core/serverSentEvents.gen';\nimport type { Client as CoreClient, Config as CoreConfig } from '../core/types.gen';\nimport type { Middleware } from './utils.gen';\n\nexport interface Config<T extends ClientOptions = ClientOptions>\n  extends Omit<RequestInit, 'body' | 'headers' | 'method'>, CoreConfig {\n  /**\n   * Base URL for all requests made by this client.\n   */\n  baseUrl?: T['baseUrl'];\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   * Return the response data parsed in a specified format. By default, `auto`\n   * will infer the appropriate method from the `Content-Type` response header.\n   * You can override this behavior with any of the {@link Body} methods.\n   * Select `stream` if you don't want to parse response data at all.\n   *\n   * @default 'auto'\n   */\n  parseAs?: 'arrayBuffer' | 'auto' | 'blob' | 'formData' | 'json' | 'stream' | 'text';\n  /**\n   * Throw an error instead of returning it in the response?\n   *\n   * @default false\n   */\n  throwOnError?: T['throwOnError'];\n}\n\nexport interface RequestOptions<\n  TData = unknown,\n  ThrowOnError extends boolean = boolean,\n  Url extends string = string,\n>\n  extends\n    Config<{\n      throwOnError: ThrowOnError;\n    }>,\n    Pick<\n      ServerSentEventsOptions<TData>,\n      | 'onRequest'\n      | 'onSseError'\n      | 'onSseEvent'\n      | 'sseDefaultRetryDelay'\n      | 'sseMaxRetryAttempts'\n      | 'sseMaxRetryDelay'\n    > {\n  /**\n   * Any body that you want to add to your request.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/fetch#body}\n   */\n  body?: unknown;\n  path?: Record<string, unknown>;\n  query?: Record<string, unknown>;\n  /**\n   * Security mechanism(s) to use for the request.\n   */\n  security?: ReadonlyArray<Auth>;\n  url: Url;\n}\n\nexport interface ResolvedRequestOptions<\n  ThrowOnError extends boolean = boolean,\n  Url extends string = string,\n> extends RequestOptions<unknown, ThrowOnError, Url> {\n  serializedBody?: string;\n}\n\nexport type RequestResult<\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = boolean,\n> = ThrowOnError extends true\n  ? Promise<{\n      data: TData extends Record<string, unknown> ? TData[keyof TData] : TData;\n      response: Response;\n    }>\n  : Promise<\n      (\n        | {\n            data: TData extends Record<string, unknown> ? TData[keyof TData] : TData;\n            error: undefined;\n          }\n        | {\n            data: undefined;\n            error: TError extends Record<string, unknown> ? TError[keyof TError] : TError;\n          }\n      ) & {\n        response: Response;\n      }\n    >;\n\nexport interface ClientOptions {\n  baseUrl?: string;\n  throwOnError?: boolean;\n}\n\ntype MethodFn = <TData = unknown, TError = unknown, ThrowOnError extends boolean = false>(\n  options: Omit<RequestOptions<TData, ThrowOnError>, 'method'>,\n) => RequestResult<TData, TError, ThrowOnError>;\n\ntype SseFn = <TData = unknown, TError = unknown, ThrowOnError extends boolean = false>(\n  options: Omit<RequestOptions<TData, ThrowOnError>, 'method'>,\n) => Promise<ServerSentEventsResult<TData, TError>>;\n\ntype RequestFn = <TData = unknown, TError = unknown, ThrowOnError extends boolean = false>(\n  options: Omit<RequestOptions<TData, ThrowOnError>, 'method'> &\n    Pick<Required<RequestOptions<TData, ThrowOnError>>, 'method'>,\n) => RequestResult<TData, TError, ThrowOnError>;\n\ntype BuildUrlFn = <\n  TData extends {\n    body?: unknown;\n    path?: Record<string, unknown>;\n    query?: Record<string, unknown>;\n    url: string;\n  },\n>(\n  options: TData & Options<TData>,\n) => string;\n\nexport type Client = CoreClient<RequestFn, Config, MethodFn, BuildUrlFn, SseFn> & {\n  interceptors: Middleware<Response, unknown, ResolvedRequestOptions>;\n};\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 = ClientOptions> = (\n  override?: Config<ClientOptions & T>,\n) => Config<Required<ClientOptions> & T>;\n\nexport interface TDataShape {\n  body?: unknown;\n  headers?: unknown;\n  path?: unknown;\n  query?: unknown;\n  url: string;\n}\n\ntype OmitKeys<T, K> = Pick<T, Exclude<keyof T, K>>;\n\nexport type Options<\n  TData extends TDataShape = TDataShape,\n  ThrowOnError extends boolean = boolean,\n  TResponse = unknown,\n> = OmitKeys<RequestOptions<TResponse, ThrowOnError>, 'body' | 'path' | 'query' | 'url'> &\n  ([TData] extends [never] ? unknown : Omit<TData, 'url'>);\n"
  },
  {
    "path": "examples/openapi-ts-next/src/client/client/utils.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport { getAuthToken } from '../core/auth.gen';\nimport type { QuerySerializer, QuerySerializerOptions } from '../core/bodySerializer.gen';\nimport { jsonBodySerializer } from '../core/bodySerializer.gen';\nimport {\n  serializeArrayParam,\n  serializeObjectParam,\n  serializePrimitiveParam,\n} from '../core/pathSerializer.gen';\nimport type { Client, ClientOptions, Config, RequestOptions } from './types.gen';\n\ninterface PathSerializer {\n  path: Record<string, unknown>;\n  url: string;\n}\n\nconst PATH_PARAM_RE = /\\{[^{}]+\\}/g;\n\ntype ArrayStyle = 'form' | 'spaceDelimited' | 'pipeDelimited';\ntype MatrixStyle = 'label' | 'matrix' | 'simple';\ntype ArraySeparatorStyle = ArrayStyle | MatrixStyle;\n\nconst 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 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    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  const url = 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  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 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 || typeof header !== 'object') {\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, Options> = (\n  error: Err,\n  response: Res,\n  options: Options,\n) => Err | Promise<Err>;\n\ntype ReqInterceptor<Options> = (options: Options) => void | Promise<void>;\n\ntype ResInterceptor<Res, Options> = (response: Res, options: Options) => 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<Res, Err, Options> {\n  error: Interceptors<ErrInterceptor<Err, Res, Options>>;\n  request: Interceptors<ReqInterceptor<Options>>;\n  response: Interceptors<ResInterceptor<Res, Options>>;\n}\n\nexport const createInterceptors = <Res, Err, Options>(): Middleware<Res, Err, Options> => ({\n  error: new Interceptors<ErrInterceptor<Err, Res, Options>>(),\n  request: new Interceptors<ReqInterceptor<Options>>(),\n  response: new Interceptors<ResInterceptor<Res, 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"
  },
  {
    "path": "examples/openapi-ts-next/src/client/client.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport { createClientConfig } from '../hey-api';\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> = (\n  override?: Config<ClientOptions & T>,\n) => Config<Required<ClientOptions> & T>;\n\nexport const client = createClient(\n  createClientConfig(\n    createConfig<ClientOptions2>({ baseUrl: 'https://petstore3.swagger.io/api/v3' }),\n  ),\n);\n"
  },
  {
    "path": "examples/openapi-ts-next/src/client/core/auth.gen.ts",
    "content": "// 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"
  },
  {
    "path": "examples/openapi-ts-next/src/client/core/bodySerializer.gen.ts",
    "content": "// 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"
  },
  {
    "path": "examples/openapi-ts-next/src/client/core/params.gen.ts",
    "content": "// 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"
  },
  {
    "path": "examples/openapi-ts-next/src/client/core/pathSerializer.gen.ts",
    "content": "// 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"
  },
  {
    "path": "examples/openapi-ts-next/src/client/core/queryKeySerializer.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\n/**\n * JSON-friendly union that mirrors what Pinia Colada can hash.\n */\nexport type JsonValue =\n  | null\n  | string\n  | number\n  | boolean\n  | JsonValue[]\n  | { [key: string]: JsonValue };\n\n/**\n * Replacer that converts non-JSON values (bigint, Date, etc.) to safe substitutes.\n */\nexport const queryKeyJsonReplacer = (_key: string, value: unknown) => {\n  if (value === undefined || typeof value === 'function' || typeof value === 'symbol') {\n    return undefined;\n  }\n  if (typeof value === 'bigint') {\n    return value.toString();\n  }\n  if (value instanceof Date) {\n    return value.toISOString();\n  }\n  return value;\n};\n\n/**\n * Safely stringifies a value and parses it back into a JsonValue.\n */\nexport const stringifyToJsonValue = (input: unknown): JsonValue | undefined => {\n  try {\n    const json = JSON.stringify(input, queryKeyJsonReplacer);\n    if (json === undefined) {\n      return undefined;\n    }\n    return JSON.parse(json) as JsonValue;\n  } catch {\n    return undefined;\n  }\n};\n\n/**\n * Detects plain objects (including objects with a null prototype).\n */\nconst isPlainObject = (value: unknown): value is Record<string, unknown> => {\n  if (value === null || typeof value !== 'object') {\n    return false;\n  }\n  const prototype = Object.getPrototypeOf(value as object);\n  return prototype === Object.prototype || prototype === null;\n};\n\n/**\n * Turns URLSearchParams into a sorted JSON object for deterministic keys.\n */\nconst serializeSearchParams = (params: URLSearchParams): JsonValue => {\n  const entries = Array.from(params.entries()).sort(([a], [b]) => a.localeCompare(b));\n  const result: Record<string, JsonValue> = {};\n\n  for (const [key, value] of entries) {\n    const existing = result[key];\n    if (existing === undefined) {\n      result[key] = value;\n      continue;\n    }\n\n    if (Array.isArray(existing)) {\n      (existing as string[]).push(value);\n    } else {\n      result[key] = [existing, value];\n    }\n  }\n\n  return result;\n};\n\n/**\n * Normalizes any accepted value into a JSON-friendly shape for query keys.\n */\nexport const serializeQueryKeyValue = (value: unknown): JsonValue | undefined => {\n  if (value === null) {\n    return null;\n  }\n\n  if (typeof value === 'string' || typeof value === 'number' || typeof value === 'boolean') {\n    return value;\n  }\n\n  if (value === undefined || typeof value === 'function' || typeof value === 'symbol') {\n    return undefined;\n  }\n\n  if (typeof value === 'bigint') {\n    return value.toString();\n  }\n\n  if (value instanceof Date) {\n    return value.toISOString();\n  }\n\n  if (Array.isArray(value)) {\n    return stringifyToJsonValue(value);\n  }\n\n  if (typeof URLSearchParams !== 'undefined' && value instanceof URLSearchParams) {\n    return serializeSearchParams(value);\n  }\n\n  if (isPlainObject(value)) {\n    return stringifyToJsonValue(value);\n  }\n\n  return undefined;\n};\n"
  },
  {
    "path": "examples/openapi-ts-next/src/client/core/serverSentEvents.gen.ts",
    "content": "// 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 const 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            // Normalize line endings: CRLF -> LF, then CR -> LF\n            buffer = buffer.replace(/\\r\\n/g, '\\n').replace(/\\r/g, '\\n');\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"
  },
  {
    "path": "examples/openapi-ts-next/src/client/core/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { Auth, AuthToken } from './auth.gen';\nimport type { BodySerializer, QuerySerializer, QuerySerializerOptions } from './bodySerializer.gen';\n\nexport type HttpMethod =\n  | 'connect'\n  | 'delete'\n  | 'get'\n  | 'head'\n  | 'options'\n  | 'patch'\n  | 'post'\n  | 'put'\n  | 'trace';\n\nexport type Client<\n  RequestFn = never,\n  Config = unknown,\n  MethodFn = never,\n  BuildUrlFn = never,\n  SseFn = never,\n> = {\n  /**\n   * Returns the final request URL.\n   */\n  buildUrl: BuildUrlFn;\n  getConfig: () => Config;\n  request: RequestFn;\n  setConfig: (config: Config) => Config;\n} & {\n  [K in HttpMethod]: MethodFn;\n} & ([SseFn] extends [never] ? { sse?: never } : { sse: { [K in HttpMethod]: SseFn } });\n\nexport interface Config {\n  /**\n   * Auth token or a function returning auth token. The resolved value will be\n   * added to the request payload as defined by its `security` array.\n   */\n  auth?: ((auth: Auth) => Promise<AuthToken> | AuthToken) | AuthToken;\n  /**\n   * A function for serializing request body parameter. By default,\n   * {@link JSON.stringify()} will be used.\n   */\n  bodySerializer?: BodySerializer | null;\n  /**\n   * An object containing any HTTP headers that you want to pre-populate your\n   * `Headers` object with.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/Headers/Headers#init See more}\n   */\n  headers?:\n    | RequestInit['headers']\n    | Record<\n        string,\n        string | number | boolean | (string | number | boolean)[] | null | undefined | unknown\n      >;\n  /**\n   * The request method.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/fetch#method See more}\n   */\n  method?: Uppercase<HttpMethod>;\n  /**\n   * A function for serializing request query parameters. By default, arrays\n   * will be exploded in form style, objects will be exploded in deepObject\n   * style, and reserved characters are percent-encoded.\n   *\n   * This method will have no effect if the native `paramsSerializer()` Axios\n   * API function is used.\n   *\n   * {@link https://swagger.io/docs/specification/serialization/#query View examples}\n   */\n  querySerializer?: QuerySerializer | QuerySerializerOptions;\n  /**\n   * A function validating request data. This is useful if you want to ensure\n   * the request conforms to the desired shape, so it can be safely sent to\n   * the server.\n   */\n  requestValidator?: (data: unknown) => Promise<unknown>;\n  /**\n   * A function transforming response data before it's returned. This is useful\n   * for post-processing data, e.g. converting ISO strings into Date objects.\n   */\n  responseTransformer?: (data: unknown) => Promise<unknown>;\n  /**\n   * A function validating response data. This is useful if you want to ensure\n   * the response conforms to the desired shape, so it can be safely passed to\n   * the transformers and returned to the user.\n   */\n  responseValidator?: (data: unknown) => Promise<unknown>;\n}\n\ntype IsExactlyNeverOrNeverUndefined<T> = [T] extends [never]\n  ? true\n  : [T] extends [never | undefined]\n    ? [undefined] extends [T]\n      ? false\n      : true\n    : false;\n\nexport type OmitNever<T extends Record<string, unknown>> = {\n  [K in keyof T as IsExactlyNeverOrNeverUndefined<T[K]> extends true ? never : K]: T[K];\n};\n"
  },
  {
    "path": "examples/openapi-ts-next/src/client/core/utils.gen.ts",
    "content": "// 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"
  },
  {
    "path": "examples/openapi-ts-next/src/client/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport {\n  addPet,\n  createUser,\n  createUsersWithListInput,\n  deleteOrder,\n  deletePet,\n  deleteUser,\n  findPetsByStatus,\n  findPetsByTags,\n  getInventory,\n  getOrderById,\n  getPetById,\n  getUserByName,\n  loginUser,\n  logoutUser,\n  type Options,\n  placeOrder,\n  updatePet,\n  updatePetWithForm,\n  updateUser,\n  uploadFile,\n} from './sdk.gen';\nexport type {\n  AddPetData,\n  AddPetErrors,\n  AddPetResponse,\n  AddPetResponses,\n  ApiResponse,\n  Category,\n  ClientOptions,\n  CreateUserData,\n  CreateUserErrors,\n  CreateUserResponse,\n  CreateUserResponses,\n  CreateUsersWithListInputData,\n  CreateUsersWithListInputErrors,\n  CreateUsersWithListInputResponse,\n  CreateUsersWithListInputResponses,\n  DeleteOrderData,\n  DeleteOrderErrors,\n  DeleteOrderResponses,\n  DeletePetData,\n  DeletePetErrors,\n  DeletePetResponses,\n  DeleteUserData,\n  DeleteUserErrors,\n  DeleteUserResponses,\n  FindPetsByStatusData,\n  FindPetsByStatusErrors,\n  FindPetsByStatusResponse,\n  FindPetsByStatusResponses,\n  FindPetsByTagsData,\n  FindPetsByTagsErrors,\n  FindPetsByTagsResponse,\n  FindPetsByTagsResponses,\n  GetInventoryData,\n  GetInventoryErrors,\n  GetInventoryResponse,\n  GetInventoryResponses,\n  GetOrderByIdData,\n  GetOrderByIdErrors,\n  GetOrderByIdResponse,\n  GetOrderByIdResponses,\n  GetPetByIdData,\n  GetPetByIdErrors,\n  GetPetByIdResponse,\n  GetPetByIdResponses,\n  GetUserByNameData,\n  GetUserByNameErrors,\n  GetUserByNameResponse,\n  GetUserByNameResponses,\n  LoginUserData,\n  LoginUserErrors,\n  LoginUserResponse,\n  LoginUserResponses,\n  LogoutUserData,\n  LogoutUserErrors,\n  LogoutUserResponses,\n  Order,\n  Pet,\n  Pet2,\n  PlaceOrderData,\n  PlaceOrderErrors,\n  PlaceOrderResponse,\n  PlaceOrderResponses,\n  Tag,\n  UpdatePetData,\n  UpdatePetErrors,\n  UpdatePetResponse,\n  UpdatePetResponses,\n  UpdatePetWithFormData,\n  UpdatePetWithFormErrors,\n  UpdatePetWithFormResponse,\n  UpdatePetWithFormResponses,\n  UpdateUserData,\n  UpdateUserErrors,\n  UpdateUserResponses,\n  UploadFileData,\n  UploadFileErrors,\n  UploadFileResponse,\n  UploadFileResponses,\n  User,\n  UserArray,\n} from './types.gen';\n"
  },
  {
    "path": "examples/openapi-ts-next/src/client/sdk.gen.ts",
    "content": "// 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 {\n  AddPetData,\n  AddPetErrors,\n  AddPetResponses,\n  CreateUserData,\n  CreateUserErrors,\n  CreateUserResponses,\n  CreateUsersWithListInputData,\n  CreateUsersWithListInputErrors,\n  CreateUsersWithListInputResponses,\n  DeleteOrderData,\n  DeleteOrderErrors,\n  DeleteOrderResponses,\n  DeletePetData,\n  DeletePetErrors,\n  DeletePetResponses,\n  DeleteUserData,\n  DeleteUserErrors,\n  DeleteUserResponses,\n  FindPetsByStatusData,\n  FindPetsByStatusErrors,\n  FindPetsByStatusResponses,\n  FindPetsByTagsData,\n  FindPetsByTagsErrors,\n  FindPetsByTagsResponses,\n  GetInventoryData,\n  GetInventoryErrors,\n  GetInventoryResponses,\n  GetOrderByIdData,\n  GetOrderByIdErrors,\n  GetOrderByIdResponses,\n  GetPetByIdData,\n  GetPetByIdErrors,\n  GetPetByIdResponses,\n  GetUserByNameData,\n  GetUserByNameErrors,\n  GetUserByNameResponses,\n  LoginUserData,\n  LoginUserErrors,\n  LoginUserResponses,\n  LogoutUserData,\n  LogoutUserErrors,\n  LogoutUserResponses,\n  PlaceOrderData,\n  PlaceOrderErrors,\n  PlaceOrderResponses,\n  UpdatePetData,\n  UpdatePetErrors,\n  UpdatePetResponses,\n  UpdatePetWithFormData,\n  UpdatePetWithFormErrors,\n  UpdatePetWithFormResponses,\n  UpdateUserData,\n  UpdateUserErrors,\n  UpdateUserResponses,\n  UploadFileData,\n  UploadFileErrors,\n  UploadFileResponses,\n} from './types.gen';\n\nexport type Options<\n  TData extends TDataShape = TDataShape,\n  ThrowOnError extends boolean = boolean,\n> = Options2<TData, ThrowOnError> & {\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 * Add a new pet to the store.\n *\n * Add a new pet to the store.\n */\nexport const addPet = <ThrowOnError extends boolean = false>(\n  options: Options<AddPetData, ThrowOnError>,\n) =>\n  (options.client ?? client).post<AddPetResponses, AddPetErrors, ThrowOnError>({\n    security: [{ scheme: 'bearer', type: 'http' }],\n    url: '/pet',\n    ...options,\n    headers: {\n      'Content-Type': 'application/json',\n      ...options.headers,\n    },\n  });\n\n/**\n * Update an existing pet.\n *\n * Update an existing pet by Id.\n */\nexport const updatePet = <ThrowOnError extends boolean = false>(\n  options: Options<UpdatePetData, ThrowOnError>,\n) =>\n  (options.client ?? client).put<UpdatePetResponses, UpdatePetErrors, ThrowOnError>({\n    security: [{ scheme: 'bearer', type: 'http' }],\n    url: '/pet',\n    ...options,\n    headers: {\n      'Content-Type': 'application/json',\n      ...options.headers,\n    },\n  });\n\n/**\n * Finds Pets by status.\n *\n * Multiple status values can be provided with comma separated strings.\n */\nexport const findPetsByStatus = <ThrowOnError extends boolean = false>(\n  options: Options<FindPetsByStatusData, ThrowOnError>,\n) =>\n  (options.client ?? client).get<FindPetsByStatusResponses, FindPetsByStatusErrors, ThrowOnError>({\n    security: [{ scheme: 'bearer', type: 'http' }],\n    url: '/pet/findByStatus',\n    ...options,\n  });\n\n/**\n * Finds Pets by tags.\n *\n * Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.\n */\nexport const findPetsByTags = <ThrowOnError extends boolean = false>(\n  options: Options<FindPetsByTagsData, ThrowOnError>,\n) =>\n  (options.client ?? client).get<FindPetsByTagsResponses, FindPetsByTagsErrors, ThrowOnError>({\n    security: [{ scheme: 'bearer', type: 'http' }],\n    url: '/pet/findByTags',\n    ...options,\n  });\n\n/**\n * Deletes a pet.\n *\n * Delete a pet.\n */\nexport const deletePet = <ThrowOnError extends boolean = false>(\n  options: Options<DeletePetData, ThrowOnError>,\n) =>\n  (options.client ?? client).delete<DeletePetResponses, DeletePetErrors, ThrowOnError>({\n    security: [{ scheme: 'bearer', type: 'http' }],\n    url: '/pet/{petId}',\n    ...options,\n  });\n\n/**\n * Find pet by ID.\n *\n * Returns a single pet.\n */\nexport const getPetById = <ThrowOnError extends boolean = false>(\n  options: Options<GetPetByIdData, ThrowOnError>,\n) =>\n  (options.client ?? client).get<GetPetByIdResponses, GetPetByIdErrors, ThrowOnError>({\n    security: [\n      { name: 'api_key', type: 'apiKey' },\n      { scheme: 'bearer', type: 'http' },\n    ],\n    url: '/pet/{petId}',\n    ...options,\n  });\n\n/**\n * Updates a pet in the store with form data.\n *\n * Updates a pet resource based on the form data.\n */\nexport const updatePetWithForm = <ThrowOnError extends boolean = false>(\n  options: Options<UpdatePetWithFormData, ThrowOnError>,\n) =>\n  (options.client ?? client).post<\n    UpdatePetWithFormResponses,\n    UpdatePetWithFormErrors,\n    ThrowOnError\n  >({\n    security: [{ scheme: 'bearer', type: 'http' }],\n    url: '/pet/{petId}',\n    ...options,\n  });\n\n/**\n * Uploads an image.\n *\n * Upload image of the pet.\n */\nexport const uploadFile = <ThrowOnError extends boolean = false>(\n  options: Options<UploadFileData, ThrowOnError>,\n) =>\n  (options.client ?? client).post<UploadFileResponses, UploadFileErrors, ThrowOnError>({\n    bodySerializer: null,\n    security: [{ scheme: 'bearer', type: 'http' }],\n    url: '/pet/{petId}/uploadImage',\n    ...options,\n    headers: {\n      'Content-Type': 'application/octet-stream',\n      ...options.headers,\n    },\n  });\n\n/**\n * Returns pet inventories by status.\n *\n * Returns a map of status codes to quantities.\n */\nexport const getInventory = <ThrowOnError extends boolean = false>(\n  options?: Options<GetInventoryData, ThrowOnError>,\n) =>\n  (options?.client ?? client).get<GetInventoryResponses, GetInventoryErrors, ThrowOnError>({\n    security: [{ name: 'api_key', type: 'apiKey' }],\n    url: '/store/inventory',\n    ...options,\n  });\n\n/**\n * Place an order for a pet.\n *\n * Place a new order in the store.\n */\nexport const placeOrder = <ThrowOnError extends boolean = false>(\n  options?: Options<PlaceOrderData, ThrowOnError>,\n) =>\n  (options?.client ?? client).post<PlaceOrderResponses, PlaceOrderErrors, ThrowOnError>({\n    url: '/store/order',\n    ...options,\n    headers: {\n      'Content-Type': 'application/json',\n      ...options?.headers,\n    },\n  });\n\n/**\n * Delete purchase order by identifier.\n *\n * For valid response try integer IDs with value < 1000. Anything above 1000 or non-integers will generate API errors.\n */\nexport const deleteOrder = <ThrowOnError extends boolean = false>(\n  options: Options<DeleteOrderData, ThrowOnError>,\n) =>\n  (options.client ?? client).delete<DeleteOrderResponses, DeleteOrderErrors, ThrowOnError>({\n    url: '/store/order/{orderId}',\n    ...options,\n  });\n\n/**\n * Find purchase order by ID.\n *\n * For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions.\n */\nexport const getOrderById = <ThrowOnError extends boolean = false>(\n  options: Options<GetOrderByIdData, ThrowOnError>,\n) =>\n  (options.client ?? client).get<GetOrderByIdResponses, GetOrderByIdErrors, ThrowOnError>({\n    url: '/store/order/{orderId}',\n    ...options,\n  });\n\n/**\n * Create user.\n *\n * This can only be done by the logged in user.\n */\nexport const createUser = <ThrowOnError extends boolean = false>(\n  options?: Options<CreateUserData, ThrowOnError>,\n) =>\n  (options?.client ?? client).post<CreateUserResponses, CreateUserErrors, ThrowOnError>({\n    url: '/user',\n    ...options,\n    headers: {\n      'Content-Type': 'application/json',\n      ...options?.headers,\n    },\n  });\n\n/**\n * Creates list of users with given input array.\n *\n * Creates list of users with given input array.\n */\nexport const createUsersWithListInput = <ThrowOnError extends boolean = false>(\n  options?: Options<CreateUsersWithListInputData, ThrowOnError>,\n) =>\n  (options?.client ?? client).post<\n    CreateUsersWithListInputResponses,\n    CreateUsersWithListInputErrors,\n    ThrowOnError\n  >({\n    url: '/user/createWithList',\n    ...options,\n    headers: {\n      'Content-Type': 'application/json',\n      ...options?.headers,\n    },\n  });\n\n/**\n * Logs user into the system.\n *\n * Log into the system.\n */\nexport const loginUser = <ThrowOnError extends boolean = false>(\n  options?: Options<LoginUserData, ThrowOnError>,\n) =>\n  (options?.client ?? client).get<LoginUserResponses, LoginUserErrors, ThrowOnError>({\n    url: '/user/login',\n    ...options,\n  });\n\n/**\n * Logs out current logged in user session.\n *\n * Log user out of the system.\n */\nexport const logoutUser = <ThrowOnError extends boolean = false>(\n  options?: Options<LogoutUserData, ThrowOnError>,\n) =>\n  (options?.client ?? client).get<LogoutUserResponses, LogoutUserErrors, ThrowOnError>({\n    url: '/user/logout',\n    ...options,\n  });\n\n/**\n * Delete user resource.\n *\n * This can only be done by the logged in user.\n */\nexport const deleteUser = <ThrowOnError extends boolean = false>(\n  options: Options<DeleteUserData, ThrowOnError>,\n) =>\n  (options.client ?? client).delete<DeleteUserResponses, DeleteUserErrors, ThrowOnError>({\n    url: '/user/{username}',\n    ...options,\n  });\n\n/**\n * Get user by user name.\n *\n * Get user detail based on username.\n */\nexport const getUserByName = <ThrowOnError extends boolean = false>(\n  options: Options<GetUserByNameData, ThrowOnError>,\n) =>\n  (options.client ?? client).get<GetUserByNameResponses, GetUserByNameErrors, ThrowOnError>({\n    url: '/user/{username}',\n    ...options,\n  });\n\n/**\n * Update user resource.\n *\n * This can only be done by the logged in user.\n */\nexport const updateUser = <ThrowOnError extends boolean = false>(\n  options: Options<UpdateUserData, ThrowOnError>,\n) =>\n  (options.client ?? client).put<UpdateUserResponses, UpdateUserErrors, ThrowOnError>({\n    url: '/user/{username}',\n    ...options,\n    headers: {\n      'Content-Type': 'application/json',\n      ...options.headers,\n    },\n  });\n"
  },
  {
    "path": "examples/openapi-ts-next/src/client/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type ClientOptions = {\n  baseUrl: 'https://petstore3.swagger.io/api/v3' | (string & {});\n};\n\nexport type Order = {\n  complete?: boolean;\n  id?: number;\n  petId?: number;\n  quantity?: number;\n  shipDate?: string;\n  /**\n   * Order Status\n   */\n  status?: 'placed' | 'approved' | 'delivered';\n};\n\nexport type Category = {\n  id?: number;\n  name?: string;\n};\n\nexport type User = {\n  email?: string;\n  firstName?: string;\n  id?: number;\n  lastName?: string;\n  password?: string;\n  phone?: string;\n  /**\n   * User Status\n   */\n  userStatus?: number;\n  username?: string;\n};\n\nexport type Tag = {\n  id?: number;\n  name?: string;\n};\n\nexport type Pet = {\n  category?: Category;\n  id?: number;\n  name: string;\n  photoUrls: Array<string>;\n  /**\n   * pet status in the store\n   */\n  status?: 'available' | 'pending' | 'sold';\n  tags?: Array<Tag>;\n};\n\nexport type ApiResponse = {\n  code?: number;\n  message?: string;\n  type?: string;\n};\n\nexport type Pet2 = Pet;\n\n/**\n * List of user object\n */\nexport type UserArray = Array<User>;\n\nexport type AddPetData = {\n  /**\n   * Create a new pet in the store\n   */\n  body: Pet;\n  path?: never;\n  query?: never;\n  url: '/pet';\n};\n\nexport type AddPetErrors = {\n  /**\n   * Invalid input\n   */\n  400: unknown;\n  /**\n   * Validation exception\n   */\n  422: unknown;\n  /**\n   * Unexpected error\n   */\n  default: unknown;\n};\n\nexport type AddPetResponses = {\n  /**\n   * Successful operation\n   */\n  200: Pet;\n};\n\nexport type AddPetResponse = AddPetResponses[keyof AddPetResponses];\n\nexport type UpdatePetData = {\n  /**\n   * Update an existent pet in the store\n   */\n  body: Pet;\n  path?: never;\n  query?: never;\n  url: '/pet';\n};\n\nexport type UpdatePetErrors = {\n  /**\n   * Invalid ID supplied\n   */\n  400: unknown;\n  /**\n   * Pet not found\n   */\n  404: unknown;\n  /**\n   * Validation exception\n   */\n  422: unknown;\n  /**\n   * Unexpected error\n   */\n  default: unknown;\n};\n\nexport type UpdatePetResponses = {\n  /**\n   * Successful operation\n   */\n  200: Pet;\n};\n\nexport type UpdatePetResponse = UpdatePetResponses[keyof UpdatePetResponses];\n\nexport type FindPetsByStatusData = {\n  body?: never;\n  path?: never;\n  query: {\n    /**\n     * Status values that need to be considered for filter\n     */\n    status: 'available' | 'pending' | 'sold';\n  };\n  url: '/pet/findByStatus';\n};\n\nexport type FindPetsByStatusErrors = {\n  /**\n   * Invalid status value\n   */\n  400: unknown;\n  /**\n   * Unexpected error\n   */\n  default: unknown;\n};\n\nexport type FindPetsByStatusResponses = {\n  /**\n   * successful operation\n   */\n  200: Array<Pet>;\n};\n\nexport type FindPetsByStatusResponse = FindPetsByStatusResponses[keyof FindPetsByStatusResponses];\n\nexport type FindPetsByTagsData = {\n  body?: never;\n  path?: never;\n  query: {\n    /**\n     * Tags to filter by\n     */\n    tags: Array<string>;\n  };\n  url: '/pet/findByTags';\n};\n\nexport type FindPetsByTagsErrors = {\n  /**\n   * Invalid tag value\n   */\n  400: unknown;\n  /**\n   * Unexpected error\n   */\n  default: unknown;\n};\n\nexport type FindPetsByTagsResponses = {\n  /**\n   * successful operation\n   */\n  200: Array<Pet>;\n};\n\nexport type FindPetsByTagsResponse = FindPetsByTagsResponses[keyof FindPetsByTagsResponses];\n\nexport type DeletePetData = {\n  body?: never;\n  headers?: {\n    api_key?: string;\n  };\n  path: {\n    /**\n     * Pet id to delete\n     */\n    petId: number;\n  };\n  query?: never;\n  url: '/pet/{petId}';\n};\n\nexport type DeletePetErrors = {\n  /**\n   * Invalid pet value\n   */\n  400: unknown;\n  /**\n   * Unexpected error\n   */\n  default: unknown;\n};\n\nexport type DeletePetResponses = {\n  /**\n   * Pet deleted\n   */\n  200: unknown;\n};\n\nexport type GetPetByIdData = {\n  body?: never;\n  path: {\n    /**\n     * ID of pet to return\n     */\n    petId: number;\n  };\n  query?: never;\n  url: '/pet/{petId}';\n};\n\nexport type GetPetByIdErrors = {\n  /**\n   * Invalid ID supplied\n   */\n  400: unknown;\n  /**\n   * Pet not found\n   */\n  404: unknown;\n  /**\n   * Unexpected error\n   */\n  default: unknown;\n};\n\nexport type GetPetByIdResponses = {\n  /**\n   * successful operation\n   */\n  200: Pet;\n};\n\nexport type GetPetByIdResponse = GetPetByIdResponses[keyof GetPetByIdResponses];\n\nexport type UpdatePetWithFormData = {\n  body?: never;\n  path: {\n    /**\n     * ID of pet that needs to be updated\n     */\n    petId: number;\n  };\n  query?: {\n    /**\n     * Name of pet that needs to be updated\n     */\n    name?: string;\n    /**\n     * Status of pet that needs to be updated\n     */\n    status?: string;\n  };\n  url: '/pet/{petId}';\n};\n\nexport type UpdatePetWithFormErrors = {\n  /**\n   * Invalid input\n   */\n  400: unknown;\n  /**\n   * Unexpected error\n   */\n  default: unknown;\n};\n\nexport type UpdatePetWithFormResponses = {\n  /**\n   * successful operation\n   */\n  200: Pet;\n};\n\nexport type UpdatePetWithFormResponse =\n  UpdatePetWithFormResponses[keyof UpdatePetWithFormResponses];\n\nexport type UploadFileData = {\n  body?: Blob | File;\n  path: {\n    /**\n     * ID of pet to update\n     */\n    petId: number;\n  };\n  query?: {\n    /**\n     * Additional Metadata\n     */\n    additionalMetadata?: string;\n  };\n  url: '/pet/{petId}/uploadImage';\n};\n\nexport type UploadFileErrors = {\n  /**\n   * No file uploaded\n   */\n  400: unknown;\n  /**\n   * Pet not found\n   */\n  404: unknown;\n  /**\n   * Unexpected error\n   */\n  default: unknown;\n};\n\nexport type UploadFileResponses = {\n  /**\n   * successful operation\n   */\n  200: ApiResponse;\n};\n\nexport type UploadFileResponse = UploadFileResponses[keyof UploadFileResponses];\n\nexport type GetInventoryData = {\n  body?: never;\n  path?: never;\n  query?: never;\n  url: '/store/inventory';\n};\n\nexport type GetInventoryErrors = {\n  /**\n   * Unexpected error\n   */\n  default: unknown;\n};\n\nexport type GetInventoryResponses = {\n  /**\n   * successful operation\n   */\n  200: {\n    [key: string]: number;\n  };\n};\n\nexport type GetInventoryResponse = GetInventoryResponses[keyof GetInventoryResponses];\n\nexport type PlaceOrderData = {\n  body?: Order;\n  path?: never;\n  query?: never;\n  url: '/store/order';\n};\n\nexport type PlaceOrderErrors = {\n  /**\n   * Invalid input\n   */\n  400: unknown;\n  /**\n   * Validation exception\n   */\n  422: unknown;\n  /**\n   * Unexpected error\n   */\n  default: unknown;\n};\n\nexport type PlaceOrderResponses = {\n  /**\n   * successful operation\n   */\n  200: Order;\n};\n\nexport type PlaceOrderResponse = PlaceOrderResponses[keyof PlaceOrderResponses];\n\nexport type DeleteOrderData = {\n  body?: never;\n  path: {\n    /**\n     * ID of the order that needs to be deleted\n     */\n    orderId: number;\n  };\n  query?: never;\n  url: '/store/order/{orderId}';\n};\n\nexport type DeleteOrderErrors = {\n  /**\n   * Invalid ID supplied\n   */\n  400: unknown;\n  /**\n   * Order not found\n   */\n  404: unknown;\n  /**\n   * Unexpected error\n   */\n  default: unknown;\n};\n\nexport type DeleteOrderResponses = {\n  /**\n   * order deleted\n   */\n  200: unknown;\n};\n\nexport type GetOrderByIdData = {\n  body?: never;\n  path: {\n    /**\n     * ID of order that needs to be fetched\n     */\n    orderId: number;\n  };\n  query?: never;\n  url: '/store/order/{orderId}';\n};\n\nexport type GetOrderByIdErrors = {\n  /**\n   * Invalid ID supplied\n   */\n  400: unknown;\n  /**\n   * Order not found\n   */\n  404: unknown;\n  /**\n   * Unexpected error\n   */\n  default: unknown;\n};\n\nexport type GetOrderByIdResponses = {\n  /**\n   * successful operation\n   */\n  200: Order;\n};\n\nexport type GetOrderByIdResponse = GetOrderByIdResponses[keyof GetOrderByIdResponses];\n\nexport type CreateUserData = {\n  /**\n   * Created user object\n   */\n  body?: User;\n  path?: never;\n  query?: never;\n  url: '/user';\n};\n\nexport type CreateUserErrors = {\n  /**\n   * Unexpected error\n   */\n  default: unknown;\n};\n\nexport type CreateUserResponses = {\n  /**\n   * successful operation\n   */\n  200: User;\n};\n\nexport type CreateUserResponse = CreateUserResponses[keyof CreateUserResponses];\n\nexport type CreateUsersWithListInputData = {\n  body?: Array<User>;\n  path?: never;\n  query?: never;\n  url: '/user/createWithList';\n};\n\nexport type CreateUsersWithListInputErrors = {\n  /**\n   * Unexpected error\n   */\n  default: unknown;\n};\n\nexport type CreateUsersWithListInputResponses = {\n  /**\n   * Successful operation\n   */\n  200: User;\n};\n\nexport type CreateUsersWithListInputResponse =\n  CreateUsersWithListInputResponses[keyof CreateUsersWithListInputResponses];\n\nexport type LoginUserData = {\n  body?: never;\n  path?: never;\n  query?: {\n    /**\n     * The password for login in clear text\n     */\n    password?: string;\n    /**\n     * The user name for login\n     */\n    username?: string;\n  };\n  url: '/user/login';\n};\n\nexport type LoginUserErrors = {\n  /**\n   * Invalid username/password supplied\n   */\n  400: unknown;\n  /**\n   * Unexpected error\n   */\n  default: unknown;\n};\n\nexport type LoginUserResponses = {\n  /**\n   * successful operation\n   */\n  200: string;\n};\n\nexport type LoginUserResponse = LoginUserResponses[keyof LoginUserResponses];\n\nexport type LogoutUserData = {\n  body?: never;\n  path?: never;\n  query?: never;\n  url: '/user/logout';\n};\n\nexport type LogoutUserErrors = {\n  /**\n   * Unexpected error\n   */\n  default: unknown;\n};\n\nexport type LogoutUserResponses = {\n  /**\n   * successful operation\n   */\n  200: unknown;\n};\n\nexport type DeleteUserData = {\n  body?: never;\n  path: {\n    /**\n     * The name that needs to be deleted\n     */\n    username: string;\n  };\n  query?: never;\n  url: '/user/{username}';\n};\n\nexport type DeleteUserErrors = {\n  /**\n   * Invalid username supplied\n   */\n  400: unknown;\n  /**\n   * User not found\n   */\n  404: unknown;\n  /**\n   * Unexpected error\n   */\n  default: unknown;\n};\n\nexport type DeleteUserResponses = {\n  /**\n   * User deleted\n   */\n  200: unknown;\n};\n\nexport type GetUserByNameData = {\n  body?: never;\n  path: {\n    /**\n     * The name that needs to be fetched. Use user1 for testing\n     */\n    username: string;\n  };\n  query?: never;\n  url: '/user/{username}';\n};\n\nexport type GetUserByNameErrors = {\n  /**\n   * Invalid username supplied\n   */\n  400: unknown;\n  /**\n   * User not found\n   */\n  404: unknown;\n  /**\n   * Unexpected error\n   */\n  default: unknown;\n};\n\nexport type GetUserByNameResponses = {\n  /**\n   * successful operation\n   */\n  200: User;\n};\n\nexport type GetUserByNameResponse = GetUserByNameResponses[keyof GetUserByNameResponses];\n\nexport type UpdateUserData = {\n  /**\n   * Update an existent user in the store\n   */\n  body?: User;\n  path: {\n    /**\n     * name that need to be deleted\n     */\n    username: string;\n  };\n  query?: never;\n  url: '/user/{username}';\n};\n\nexport type UpdateUserErrors = {\n  /**\n   * bad request\n   */\n  400: unknown;\n  /**\n   * user not found\n   */\n  404: unknown;\n  /**\n   * Unexpected error\n   */\n  default: unknown;\n};\n\nexport type UpdateUserResponses = {\n  /**\n   * successful operation\n   */\n  200: unknown;\n};\n"
  },
  {
    "path": "examples/openapi-ts-next/src/hey-api.ts",
    "content": "import type { CreateClientConfig } from './client/client.gen';\n\nexport const createClientConfig: CreateClientConfig = (config) => ({\n  ...config,\n  // set default base url for requests\n  baseUrl: 'https://petstore3.swagger.io/api/v3',\n  // set default headers for requests\n  headers: {\n    Authorization: 'Bearer <token_from_internal_client>',\n  },\n});\n"
  },
  {
    "path": "examples/openapi-ts-next/tailwind.config.ts",
    "content": "import type { Config } from 'tailwindcss';\n\nexport default {\n  content: [\n    './pages/**/*.{js,ts,jsx,tsx,mdx}',\n    './components/**/*.{js,ts,jsx,tsx,mdx}',\n    './app/**/*.{js,ts,jsx,tsx,mdx}',\n  ],\n  theme: {\n    extend: {\n      colors: {\n        background: 'var(--background)',\n        foreground: 'var(--foreground)',\n      },\n    },\n  },\n} satisfies Config;\n"
  },
  {
    "path": "examples/openapi-ts-next/tsconfig.json",
    "content": "{\n  \"compilerOptions\": {\n    \"target\": \"ES2017\",\n    \"lib\": [\"dom\", \"dom.iterable\", \"esnext\"],\n    \"allowJs\": true,\n    \"skipLibCheck\": true,\n    \"strict\": true,\n    \"noEmit\": true,\n    \"esModuleInterop\": true,\n    \"module\": \"esnext\",\n    \"moduleResolution\": \"bundler\",\n    \"resolveJsonModule\": true,\n    \"isolatedModules\": true,\n    \"jsx\": \"preserve\",\n    \"incremental\": true,\n    \"plugins\": [\n      {\n        \"name\": \"next\"\n      }\n    ],\n    \"paths\": {\n      \"@/*\": [\"./*\"]\n    }\n  },\n  \"include\": [\"next-env.d.ts\", \"**/*.ts\", \"**/*.tsx\", \".next/types/**/*.ts\"],\n  \"exclude\": [\"node_modules\"]\n}\n"
  },
  {
    "path": "examples/openapi-ts-nuxt/.gitignore",
    "content": "# Nuxt dev/build outputs\n.output\n.data\n.nuxt\n.nitro\n.cache\ndist\n\n# Node dependencies\nnode_modules\n\n# Logs\nlogs\n*.log\n\n# Misc\n.DS_Store\n.fleet\n.idea\n\n# Local env files\n.env\n.env.*\n!.env.example\n"
  },
  {
    "path": "examples/openapi-ts-nuxt/.npmrc",
    "content": "engine-strict=true\nsave-exact=true\n"
  },
  {
    "path": "examples/openapi-ts-nuxt/CHANGELOG.md",
    "content": "# @example/openapi-ts-nuxt\n\n## 0.0.20\n\n### Patch Changes\n\n### Updated Dependencies:\n\n- @hey-api/nuxt@0.2.1\n\n## 0.0.19\n\n### Patch Changes\n\n- Updated dependencies [[`6d56fa8`](https://github.com/hey-api/openapi-ts/commit/6d56fa8d80fd02c67746324b8edd6d008f788d67)]:\n  - @hey-api/nuxt@0.2.0\n\n## 0.0.18\n\n### Patch Changes\n\n- Updated dependencies []:\n  - @hey-api/nuxt@0.1.7\n\n## 0.0.17\n\n### Patch Changes\n\n- Updated dependencies []:\n  - @hey-api/nuxt@0.1.6\n\n## 0.0.16\n\n### Patch Changes\n\n- Updated dependencies [[`09bce36`](https://github.com/hey-api/openapi-ts/commit/09bce3644680a68ea91c9a1396d506b13709ae93), [`f46e241`](https://github.com/hey-api/openapi-ts/commit/f46e2419d8eaefea4eaff232f00ec770509afcb1)]:\n  - @hey-api/nuxt@0.1.5\n\n## 0.0.15\n\n### Patch Changes\n\n- Updated dependencies []:\n  - @hey-api/nuxt@0.1.4\n\n## 0.0.14\n\n### Patch Changes\n\n- Updated dependencies []:\n  - @hey-api/nuxt@0.1.3\n\n## 0.0.13\n\n### Patch Changes\n\n- Updated dependencies [[`0670a38`](https://github.com/hey-api/openapi-ts/commit/0670a38c66dffc1431a7d4b48ec06b72d4f6868f)]:\n  - @hey-api/nuxt@0.1.2\n\n## 0.0.12\n\n### Patch Changes\n\n- Updated dependencies []:\n  - @hey-api/nuxt@0.1.1\n\n## 0.0.11\n\n### Patch Changes\n\n- Updated dependencies [[`d80f835`](https://github.com/hey-api/openapi-ts/commit/d80f835b46775a01451f02f832ceb288c2b561d2)]:\n  - @hey-api/nuxt@0.1.0\n\n## 0.0.10\n\n### Patch Changes\n\n- Updated dependencies [[`c0b36b9`](https://github.com/hey-api/openapi-ts/commit/c0b36b95645d484034c3af145c5554867568979b)]:\n  - @hey-api/client-nuxt@0.2.4\n\n## 0.0.9\n\n### Patch Changes\n\n- Updated dependencies [[`b8cc9f8`](https://github.com/hey-api/openapi-ts/commit/b8cc9f8a5eaf4f4ff345abc49c14c6b96744c2ea)]:\n  - @hey-api/client-nuxt@0.2.3\n\n## 0.0.8\n\n### Patch Changes\n\n- Updated dependencies [[`e86629b`](https://github.com/hey-api/openapi-ts/commit/e86629bfa9ae2a47131d3a9a240a6aa2a4f67911)]:\n  - @hey-api/client-nuxt@0.2.2\n\n## 0.0.7\n\n### Patch Changes\n\n- Updated dependencies [[`7f0f4a7`](https://github.com/hey-api/openapi-ts/commit/7f0f4a76b06c8fafb33581b522faf8efc6fd85ac)]:\n  - @hey-api/client-nuxt@0.2.1\n\n## 0.0.6\n\n### Patch Changes\n\n- Updated dependencies [[`bb6d46a`](https://github.com/hey-api/openapi-ts/commit/bb6d46ae119ce4e7e3a2ab3fded74ac4fb4cdff2)]:\n  - @hey-api/client-nuxt@0.2.0\n\n## 0.0.5\n\n### Patch Changes\n\n- Updated dependencies [[`2dc380e`](https://github.com/hey-api/openapi-ts/commit/2dc380eabc17c723654beb04ecd7bce6d33d3b49), [`603541e`](https://github.com/hey-api/openapi-ts/commit/603541e307dc2953da7dddd300176865629b50bb), [`603541e`](https://github.com/hey-api/openapi-ts/commit/603541e307dc2953da7dddd300176865629b50bb), [`2cbffeb`](https://github.com/hey-api/openapi-ts/commit/2cbffeb2cdd6c6143cd68cac68369584879dda31), [`2cbffeb`](https://github.com/hey-api/openapi-ts/commit/2cbffeb2cdd6c6143cd68cac68369584879dda31), [`603541e`](https://github.com/hey-api/openapi-ts/commit/603541e307dc2953da7dddd300176865629b50bb)]:\n  - @hey-api/client-nuxt@0.1.3\n\n## 0.0.4\n\n### Patch Changes\n\n- Updated dependencies [[`8eba19d`](https://github.com/hey-api/openapi-ts/commit/8eba19d4092fc0903572ab9fdadf0b4c26928ba2)]:\n  - @hey-api/client-nuxt@0.1.2\n\n## 0.0.3\n\n### Patch Changes\n\n- Updated dependencies [[`0432418`](https://github.com/hey-api/openapi-ts/commit/0432418d72c94ef94865f8216ed2f723ad5191f9), [`4784727`](https://github.com/hey-api/openapi-ts/commit/47847276e8bc854045044dd414382080270dd779)]:\n  - @hey-api/client-nuxt@0.1.1\n\n## 0.0.2\n\n### Patch Changes\n\n- Updated dependencies [[`14d3c4c`](https://github.com/hey-api/openapi-ts/commit/14d3c4ce0393d543e2d3aaebbfcf8f0cf32483b0)]:\n  - @hey-api/client-nuxt@0.1.0\n"
  },
  {
    "path": "examples/openapi-ts-nuxt/README.md",
    "content": "# Nuxt Minimal Starter\n\nLook at the [Nuxt documentation](https://nuxt.com/docs/getting-started/introduction) to learn more.\n\n## Setup\n\nMake sure to install dependencies:\n\n```bash\n# npm\nnpm install\n\n# pnpm\npnpm install\n\n# yarn\nyarn install\n\n# bun\nbun install\n```\n\n## Development Server\n\nStart the development server on `http://localhost:3000`:\n\n```bash\n# npm\nnpm run dev\n\n# pnpm\npnpm dev\n\n# yarn\nyarn dev\n\n# bun\nbun run dev\n```\n\n## Production\n\nBuild the application for production:\n\n```bash\n# npm\nnpm run build\n\n# pnpm\npnpm build\n\n# yarn\nyarn build\n\n# bun\nbun run build\n```\n\nLocally preview production build:\n\n```bash\n# npm\nnpm run preview\n\n# pnpm\npnpm preview\n\n# yarn\nyarn preview\n\n# bun\nbun run preview\n```\n\nCheck out the [deployment documentation](https://nuxt.com/docs/getting-started/deployment) for more information.\n"
  },
  {
    "path": "examples/openapi-ts-nuxt/app.vue",
    "content": "<script setup lang=\"ts\">\nimport { client } from '#hey-api/client.gen';\n\n// configure internal service client\nclient.setConfig({\n  auth: () => {\n    // fetch auth token\n    return undefined;\n  },\n  // set default base url for requests\n  baseURL: 'https://petstore3.swagger.io/api/v3',\n  // set default headers for requests\n  headers: {\n    Authorization: 'Bearer <token_from_service_client>',\n  },\n  onRequest: () => {\n    console.log('onRequest: global');\n  },\n  onResponse: () => {\n    console.log('onResponse: global');\n  },\n});\n</script>\n\n<template>\n  <div>\n    <NuxtRouteAnnouncer />\n    <!-- <NuxtWelcome /> -->\n    <Home />\n  </div>\n</template>\n"
  },
  {
    "path": "examples/openapi-ts-nuxt/components/home.vue",
    "content": "<script setup lang=\"ts\">\nconst name = ref('foo');\nconst petId = ref(BigInt(8));\nconst status = ref<NonNullable<FindPetsByStatusData['query']>['status']>('available');\n\nfunction incrementPetId() {\n  petId.value++;\n}\n\nasync function addNewPet() {\n  name.value = name.value === 'foo' ? 'bar' : 'foo';\n\n  const pet = await addPet({\n    body: {\n      category: {\n        id: BigInt(0),\n        name: 'cats',\n      },\n      id: BigInt(0),\n      name: 'doggy',\n      photoUrls: ['string'],\n      status: 'available',\n      tags: [\n        {\n          id: BigInt(0),\n          name: 'string',\n        },\n      ],\n    },\n    composable: '$fetch',\n  });\n\n  console.log('Added new pet:', pet);\n}\n\nfunction changeStatus() {\n  status.value = status.value === 'available' ? 'pending' : 'available';\n}\n\nconst query = computed(() => ({\n  status: status.value,\n}));\n\n/**\n * useAsyncData\n *\n * During SSR data is fetched only on the server side and transferred to the\n * client.\n *\n * This will NOT forward anything.\n * Result: { cookies: {} }\n */\n// const { data } = await useAsyncData(() => getPetById())\nasync function submitHandler() {}\nconst asyncData = await getPetById({\n  // fetchAdapter: (url, options) => fetch(url, options),\n  // fetchAdapter: (url, options) => $fetch(url, options),\n  // fetchAdapter: (url, options) => axiosInstance[(options.method || 'get').toLowerCase()](url, options),\n  asyncDataOptions: {\n    default: () => ({\n      name: 'Default Pet',\n      photoUrls: [],\n    }),\n    watch: [petId],\n  },\n  composable: 'useAsyncData',\n  key: 'item',\n  path: {\n    petId,\n  },\n});\nwatch(asyncData.data, (newPet) => {\n  console.log('pet', newPet);\n});\n\nawait findPetsByStatus({\n  asyncDataOptions: {\n    watch: [status],\n  },\n  composable: 'useAsyncData',\n  query,\n});\n\n/**\n * useAsyncData + useRequestFetch\n *\n * This will forward the user's headers to the event handler.\n * Result: { cookies: { foo: 'bar' } }\n */\nconst requestFetch = useRequestFetch();\nconst asyncDataWithRequestFetch = await getPetById({\n  $fetch: requestFetch,\n  composable: 'useAsyncData',\n  path: {\n    petId: BigInt(8),\n  },\n});\n\n/**\n * useFetch\n *\n * You can also useFetch as shortcut of useAsyncData + $fetch.\n */\nconst fetch = await getPetById({\n  composable: 'useFetch',\n  path: {\n    petId: BigInt(8),\n  },\n});\n\nawait addPet({\n  asyncDataOptions: {\n    watch: [name],\n  },\n  body: {\n    category: {\n      id: BigInt(0),\n      name: 'Cats',\n    },\n    id: BigInt(0),\n    name,\n    photoUrls: ['string'],\n    status: 'available',\n    tags: [\n      {\n        id: BigInt(0),\n        name: 'pet',\n      },\n    ],\n  },\n  composable: 'useAsyncData',\n  key: 'addPet',\n});\n\n/**\n * useLazyAsyncData\n *\n * Navigation will occur before fetching is complete. Handle 'pending' and\n * 'error' states directly within your component's template.\n */\nconst lazyAsyncData = await getPetById({\n  composable: 'useLazyAsyncData',\n  key: 'count',\n  path: {\n    petId: BigInt(8),\n  },\n});\nwatch(lazyAsyncData.data, (newPet) => {\n  // Because pet might start out null, you won't have access\n  // to its contents immediately, but you can watch it.\n  if (newPet) {\n    console.log(newPet.name);\n  }\n});\n\n/**\n * useLazyFetch\n *\n * Navigation will occur before fetching is complete. Handle 'pending' and\n * 'error' states directly within your component's template.\n */\nconst lazyFetch = await getPetById({\n  composable: 'useLazyFetch',\n  path: {\n    petId: BigInt(8),\n  },\n});\nwatch(lazyFetch.data, (newPet) => {\n  // Because pet might start out null, you won't have access\n  // to its contents immediately, but you can watch it.\n  if (newPet) {\n    console.log(newPet.name);\n  }\n});\n\nasync function handleFetch() {\n  try {\n    const result = await getPetById({\n      composable: '$fetch',\n      onRequest: [\n        () => {\n          console.log('onRequest: local');\n        },\n      ],\n      onResponse: [\n        () => {\n          console.log('onResponse: local');\n        },\n      ],\n      path: {\n        petId,\n      },\n    });\n    console.log(result);\n  } catch (error) {\n    console.log(error);\n  }\n}\n</script>\n\n<template>\n  <h1>Get Random Pet Nuxt APIs</h1>\n  <div>\n    <button @click=\"handleFetch\" type=\"button\">$fetch</button>\n    <button @click=\"incrementPetId\" type=\"button\">increment petId</button>\n    <button @click=\"changeStatus\" type=\"button\">change status</button>\n    <button @click=\"addNewPet\" type=\"button\">add pet</button>\n    <div>\n      <p>id: {{ petId }}</p>\n      <p>name: {{ name }}</p>\n      <p>status: {{ status }}</p>\n    </div>\n  </div>\n</template>\n"
  },
  {
    "path": "examples/openapi-ts-nuxt/nuxt.config.ts",
    "content": "// https://nuxt.com/docs/api/configuration/nuxt-config\nexport default defineNuxtConfig({\n  compatibilityDate: '2024-11-01',\n  devtools: {\n    enabled: true,\n  },\n  future: {\n    compatibilityVersion: 4,\n  },\n  heyApi: {\n    config: {\n      input:\n        'https://raw.githubusercontent.com/swagger-api/swagger-petstore/master/src/main/resources/openapi.yaml',\n      plugins: [\n        '@hey-api/schemas',\n        {\n          name: '@hey-api/sdk',\n          transformer: true,\n          validator: true,\n        },\n        {\n          enums: 'javascript',\n          name: '@hey-api/typescript',\n        },\n        '@hey-api/transformers',\n        'zod',\n      ],\n    },\n  },\n  modules: ['@hey-api/nuxt'],\n});\n"
  },
  {
    "path": "examples/openapi-ts-nuxt/package.json",
    "content": "{\n  \"name\": \"@example/openapi-ts-nuxt\",\n  \"version\": \"0.0.20\",\n  \"private\": true,\n  \"type\": \"module\",\n  \"scripts\": {\n    \"build\": \"nuxt build\",\n    \"dev\": \"nuxt dev\",\n    \"generate\": \"nuxt generate\",\n    \"postinstall:disabled\": \"nuxt prepare\",\n    \"preview\": \"nuxt preview\",\n    \"typecheck:disabled\": \"tsc --noEmit\"\n  },\n  \"dependencies\": {\n    \"@hey-api/nuxt\": \"workspace:*\",\n    \"nuxt\": \"3.14.1592\",\n    \"vue\": \"3.5.13\",\n    \"vue-router\": \"4.5.0\",\n    \"zod\": \"4.0.5\"\n  },\n  \"devDependencies\": {\n    \"vite\": \"7.3.1\"\n  }\n}\n"
  },
  {
    "path": "examples/openapi-ts-nuxt/public/robots.txt",
    "content": "\n"
  },
  {
    "path": "examples/openapi-ts-nuxt/server/tsconfig.json",
    "content": "{\n  \"extends\": \"../.nuxt/tsconfig.server.json\"\n}\n"
  },
  {
    "path": "examples/openapi-ts-nuxt/tsconfig.json",
    "content": "{\n  // https://nuxt.com/docs/guide/concepts/typescript\n  \"extends\": \"./.nuxt/tsconfig.json\"\n}\n"
  },
  {
    "path": "examples/openapi-ts-ofetch/env.d.ts",
    "content": "/// <reference types=\"vite/client\" />\n"
  },
  {
    "path": "examples/openapi-ts-ofetch/index.html",
    "content": "<!doctype html>\n<html lang=\"en\">\n  <head>\n    <meta charset=\"UTF-8\" />\n    <meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\" />\n    <title>Hey API — ofetch example</title>\n  </head>\n  <body>\n    <div id=\"app\"></div>\n    <script type=\"module\" src=\"/src/main.ts\"></script>\n  </body>\n</html>\n"
  },
  {
    "path": "examples/openapi-ts-ofetch/openapi-ts.config.ts",
    "content": "import { defineConfig } from '@hey-api/openapi-ts';\n\nexport default defineConfig({\n  input:\n    'https://raw.githubusercontent.com/swagger-api/swagger-petstore/master/src/main/resources/openapi.yaml',\n  logs: {\n    path: './logs',\n  },\n  output: {\n    path: './src/client',\n    postProcess: ['oxfmt', 'eslint'],\n  },\n  plugins: [\n    '@hey-api/client-ofetch',\n    '@hey-api/schemas',\n    '@hey-api/sdk',\n    {\n      enums: 'javascript',\n      name: '@hey-api/typescript',\n    },\n  ],\n});\n"
  },
  {
    "path": "examples/openapi-ts-ofetch/package.json",
    "content": "{\n  \"name\": \"@example/openapi-ts-ofetch\",\n  \"version\": \"0.0.1\",\n  \"private\": true,\n  \"type\": \"module\",\n  \"scripts\": {\n    \"build\": \"vite build\",\n    \"dev\": \"vite\",\n    \"lint\": \"eslint . --fix\",\n    \"openapi-ts\": \"openapi-ts\",\n    \"preview\": \"vite preview\",\n    \"typecheck\": \"vue-tsc --build --force\"\n  },\n  \"dependencies\": {\n    \"ofetch\": \"1.4.1\",\n    \"vue\": \"3.5.13\"\n  },\n  \"devDependencies\": {\n    \"@hey-api/openapi-ts\": \"workspace:*\",\n    \"@rushstack/eslint-patch\": \"1.10.5\",\n    \"@tsconfig/node24\": \"24.0.4\",\n    \"@types/jsdom\": \"27.0.0\",\n    \"@types/node\": \"24.10.10\",\n    \"@vitejs/plugin-vue\": \"6.0.4\",\n    \"@vitejs/plugin-vue-jsx\": \"5.1.4\",\n    \"@vue/eslint-config-typescript\": \"14.6.0\",\n    \"@vue/test-utils\": \"2.4.6\",\n    \"@vue/tsconfig\": \"0.8.1\",\n    \"autoprefixer\": \"10.4.20\",\n    \"eslint\": \"9.17.0\",\n    \"eslint-plugin-vue\": \"9.32.0\",\n    \"jsdom\": \"28.0.0\",\n    \"npm-run-all2\": \"6.2.0\",\n    \"oxfmt\": \"0.27.0\",\n    \"postcss\": \"8.4.41\",\n    \"tailwindcss\": \"3.4.9\",\n    \"typescript\": \"5.9.3\",\n    \"vite\": \"7.3.1\",\n    \"vite-plugin-vue-devtools\": \"8.0.2\",\n    \"vitest\": \"4.0.18\",\n    \"vue-tsc\": \"3.2.4\"\n  }\n}\n"
  },
  {
    "path": "examples/openapi-ts-ofetch/postcss.config.js",
    "content": "export default {\n  plugins: {\n    autoprefixer: {},\n    tailwindcss: {},\n  },\n};\n"
  },
  {
    "path": "examples/openapi-ts-ofetch/src/App.vue",
    "content": "<script setup lang=\"ts\">\nimport { ref } from 'vue';\n\nimport { createClient } from './client/client';\nimport { PetSchema } from './client/schemas.gen';\nimport { addPet, getPetById, updatePet } from './client/sdk.gen';\nimport type { Pet } from './client/types.gen';\n\nconst pet = ref<Pet | undefined>();\nconst petInput = ref({ name: '', category: '' });\nconst isPetNameRequired = PetSchema.required.includes('name');\n\nconst localClient = createClient({\n  baseUrl: 'https://petstore3.swagger.io/api/v3',\n  headers: {\n    Authorization: 'Bearer <token_from_local_client>',\n  },\n});\n\nlocalClient.interceptors.request.use((request, options) => {\n  if (options.url === '/pet/{petId}' && options.method === 'GET' && Math.random() < 0.5) {\n    request.headers.set('Authorization', 'Bearer <token_from_interceptor>');\n  }\n  return request;\n});\n\nlocalClient.interceptors.error.use((error) => {\n  console.error(error);\n  return error;\n});\n\nfunction randomInt(min: number, max: number) {\n  return Math.floor(Math.random() * (max - min + 1) + min);\n}\n\nasync function setRandomPetId() {\n  const id = randomInt(1, 10);\n  const { data, error } = await getPetById({\n    client: localClient,\n    path: { petId: id },\n  });\n  if (error) {\n    console.error(error);\n    return;\n  }\n  pet.value = data!;\n}\n\nfunction buildPetBody(base?: Partial<Pet>) {\n  return {\n    category: {\n      id: base?.category?.id ?? 0,\n      name: petInput.value.category,\n    },\n    id: base?.id ?? 0,\n    name: petInput.value.name,\n    photoUrls: ['string'],\n    status: 'available' as const,\n    tags: [\n      {\n        id: 0,\n        name: 'string',\n      },\n    ],\n  };\n}\n\nasync function handleAddPet() {\n  if (isPetNameRequired && !petInput.value.name) return;\n  const { data, error } = await addPet({ body: buildPetBody() });\n  if (error) {\n    console.error(error);\n    return;\n  }\n  pet.value = data!;\n}\n\nasync function handleUpdatePet() {\n  if (!pet.value) return;\n  const { data, error } = await updatePet({\n    body: buildPetBody(pet.value),\n    headers: { Authorization: 'Bearer <token_from_method>' },\n  });\n  if (error) {\n    console.error(error);\n    return;\n  }\n  pet.value = data!;\n}\n</script>\n\n<template>\n  <div class=\"bg-[#18191b] py-12\">\n    <div class=\"mx-auto flex max-w-md flex-col gap-12\">\n      <div class=\"flex items-center\">\n        <a class=\"shrink-0\" href=\"https://heyapi.dev/\" target=\"_blank\">\n          <img\n            alt=\"Hey API logo\"\n            class=\"size-16 transition duration-300 will-change-auto\"\n            src=\"https://heyapi.dev/assets/raw/logo.png\"\n          />\n        </a>\n\n        <h1 class=\"text-2xl font-bold text-white\">@hey-api/openapi-ts 🤝 ofetch</h1>\n      </div>\n\n      <div class=\"flex flex-col gap-2\">\n        <div\n          class=\"flex max-w-60 items-center gap-3 rounded border border-[#575e64] bg-[#1f2123] p-4\"\n        >\n          <div\n            class=\"flex size-10 place-content-center place-items-center rounded-full bg-[#233057] text-lg font-medium text-[#9eb1ff]\"\n          >\n            <span>\n              {{ pet?.name?.slice(0, 1) || 'N' }}\n            </span>\n          </div>\n\n          <div>\n            <p class=\"text-sm font-bold text-white\">Name: {{ pet?.name || 'N/A' }}</p>\n\n            <p class=\"text-sm text-[#f1f7feb5]\">Category: {{ pet?.category?.name || 'N/A' }}</p>\n          </div>\n        </div>\n\n        <button\n          class=\"rounded bg-[#3e63dd] p-1 text-sm font-medium text-white\"\n          type=\"button\"\n          @click=\"setRandomPetId\"\n        >\n          Get Random Pet\n        </button>\n      </div>\n\n      <form class=\"flex flex-col gap-3\" @submit.prevent=\"handleAddPet\">\n        <div class=\"flex w-64 flex-col gap-1\">\n          <label class=\"font-medium text-white\" for=\"name\">Name</label>\n\n          <input\n            v-model=\"petInput.name\"\n            class=\"rounded border border-[#575e64] bg-[#121314] p-1 text-sm text-white placeholder:text-[#575e64]\"\n            name=\"name\"\n            placeholder=\"Kitty\"\n            :required=\"isPetNameRequired\"\n          />\n        </div>\n\n        <div class=\"flex w-64 flex-col gap-1\">\n          <label class=\"font-medium text-white\" for=\"category\">Category</label>\n\n          <input\n            v-model=\"petInput.category\"\n            class=\"rounded border border-[#575e64] bg-[#121314] p-1 text-sm text-white placeholder:text-[#575e64]\"\n            name=\"category\"\n            placeholder=\"Cats\"\n            required\n          />\n        </div>\n\n        <div class=\"flex gap-2\">\n          <button class=\"rounded bg-[#3e63dd] p-2 text-sm font-medium text-white\" type=\"submit\">\n            Add Pet\n          </button>\n\n          <button\n            class=\"rounded bg-[#3e63dd] p-2 text-sm font-medium text-white disabled:cursor-not-allowed\"\n            :disabled=\"!pet\"\n            type=\"button\"\n            @click=\"handleUpdatePet\"\n          >\n            Update Pet\n          </button>\n        </div>\n      </form>\n    </div>\n  </div>\n</template>\n"
  },
  {
    "path": "examples/openapi-ts-ofetch/src/assets/main.css",
    "content": "@tailwind base;\n@tailwind components;\n@tailwind utilities;\n\nbody {\n  @apply bg-[#111113];\n}\n"
  },
  {
    "path": "examples/openapi-ts-ofetch/src/client/client/client.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport { ofetch, type ResponseType as OfetchResponseType } from 'ofetch';\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  buildOfetchOptions,\n  buildUrl,\n  createConfig,\n  createInterceptors,\n  isRepeatableBody,\n  mapParseAsToResponseType,\n  mergeConfigs,\n  mergeHeaders,\n  parseError,\n  parseSuccess,\n  setAuthParams,\n  wrapDataReturn,\n  wrapErrorReturn,\n} from './utils.gen';\n\ntype ReqInit = Omit<RequestInit, 'body' | 'headers'> & {\n  body?: BodyInit | null | undefined;\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  // precompute serialized / network body\n  const resolveOptions = async (options: RequestOptions) => {\n    const opts = {\n      ..._config,\n      ...options,\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 if body is empty to avoid invalid requests\n    if (opts.body === undefined || opts.serializedBody === '') {\n      opts.headers.delete('Content-Type');\n    }\n\n    // if a raw body is provided (no serializer), adjust Content-Type only when it\n    // equals the default JSON value to better match the concrete body type\n    if (\n      opts.body !== undefined &&\n      opts.bodySerializer === null &&\n      (opts.headers.get('Content-Type') || '').toLowerCase() === 'application/json'\n    ) {\n      const b: unknown = opts.body;\n      if (typeof FormData !== 'undefined' && b instanceof FormData) {\n        // let the runtime set the multipart boundary\n        opts.headers.delete('Content-Type');\n      } else if (typeof URLSearchParams !== 'undefined' && b instanceof URLSearchParams) {\n        // standard urlencoded content type (+ charset)\n        opts.headers.set('Content-Type', 'application/x-www-form-urlencoded;charset=UTF-8');\n      } else if (typeof Blob !== 'undefined' && b instanceof Blob) {\n        const t = b.type?.trim();\n        if (t) {\n          opts.headers.set('Content-Type', t);\n        } else {\n          // unknown blob type: avoid sending a misleading JSON header\n          opts.headers.delete('Content-Type');\n        }\n      }\n    }\n\n    // precompute network body (stability for retries and interceptors)\n    const networkBody = getValidRequestBody(opts) as RequestInit['body'] | null | undefined;\n\n    const url = buildUrl(opts);\n\n    return { networkBody, opts, url };\n  };\n\n  // apply request interceptors and mirror header/method/signal back to opts\n  const applyRequestInterceptors = async (\n    request: Request,\n    opts: ResolvedRequestOptions,\n    body: BodyInit | null | undefined,\n  ) => {\n    for (const fn of interceptors.request.fns) {\n      if (fn) {\n        request = await fn(request, opts);\n      }\n    }\n    // reflect interceptor changes into opts used by the network layer\n    opts.headers = request.headers;\n    opts.method = request.method as Uppercase<HttpMethod>;\n    // ignore request.body changes to avoid turning serialized bodies into streams\n    // body comes only from getValidRequestBody(options)\n    // reflect signal if present\n    opts.signal = (request as any).signal as AbortSignal | undefined;\n\n    // When body is FormData, remove Content-Type header to avoid boundary mismatch.\n    // Note: We already delete Content-Type in resolveOptions for FormData, but the\n    // Request constructor (line 175) re-adds it with an auto-generated boundary.\n    // Since we pass the original FormData (not the Request's body) to ofetch, and\n    // ofetch will generate its own boundary, we must remove the Request's Content-Type\n    // to let ofetch set the correct one. Otherwise the boundary in the header won't\n    // match the boundary in the actual multipart body sent by ofetch.\n    if (typeof FormData !== 'undefined' && body instanceof FormData) {\n      opts.headers.delete('Content-Type');\n    }\n\n    return request;\n  };\n\n  // build ofetch options with stable retry logic based on body repeatability\n  const buildNetworkOptions = (\n    opts: ResolvedRequestOptions,\n    body: BodyInit | null | undefined,\n    responseType: OfetchResponseType | undefined,\n  ) => {\n    const effectiveRetry = isRepeatableBody(body) ? (opts.retry as any) : (0 as any);\n    return buildOfetchOptions(opts, body, responseType, effectiveRetry);\n  };\n\n  const request: Client['request'] = async (options) => {\n    const { networkBody: initialNetworkBody, opts, url } = await resolveOptions(options as any);\n    // map parseAs -> ofetch responseType once per request\n    const ofetchResponseType: OfetchResponseType | undefined = mapParseAsToResponseType(\n      opts.parseAs,\n      opts.responseType,\n    );\n\n    const $ofetch = opts.ofetch ?? ofetch;\n\n    // create Request before network to run middleware consistently\n    const networkBody = initialNetworkBody;\n    const requestInit: ReqInit = {\n      body: networkBody,\n      headers: opts.headers as Headers,\n      method: opts.method,\n      redirect: 'follow',\n      signal: opts.signal,\n    };\n    let request = new Request(url, requestInit);\n\n    request = await applyRequestInterceptors(request, opts, networkBody);\n    const finalUrl = request.url;\n\n    // build ofetch options and perform the request (.raw keeps the Response)\n    const responseOptions = buildNetworkOptions(\n      opts as ResolvedRequestOptions,\n      networkBody,\n      ofetchResponseType,\n    );\n\n    let response = await $ofetch.raw(finalUrl, responseOptions);\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 = { request, response };\n\n    if (response.ok) {\n      const data = await parseSuccess(response, opts, ofetchResponseType);\n      return wrapDataReturn(data, result, opts.responseStyle);\n    }\n\n    let finalError = await parseError(response);\n\n    for (const fn of interceptors.error.fns) {\n      if (fn) {\n        finalError = await fn(finalError, response, request, opts);\n      }\n    }\n\n    // ensure error is never undefined after interceptors\n    finalError = (finalError as any) || ({} as string);\n\n    if (opts.throwOnError) {\n      throw finalError;\n    }\n\n    return wrapErrorReturn(finalError, result, opts.responseStyle) as any;\n  };\n\n  const makeMethodFn = (method: Uppercase<HttpMethod>) => (options: RequestOptions) =>\n    request({ ...options, method } as any);\n\n  const makeSseFn = (method: Uppercase<HttpMethod>) => async (options: RequestOptions) => {\n    const { networkBody, opts, url } = await resolveOptions(options);\n    const optsForSse: any = { ...opts };\n    delete optsForSse.body; // body is provided via serializedBody below\n    return createSseClient({\n      ...optsForSse,\n      fetch: opts.fetch,\n      headers: opts.headers as Headers,\n      method,\n      onRequest: async (url, init) => {\n        let request = new Request(url, init);\n        request = await applyRequestInterceptors(request, opts, networkBody);\n        return request;\n      },\n      serializedBody: networkBody as BodyInit | null | undefined,\n      signal: opts.signal,\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"
  },
  {
    "path": "examples/openapi-ts-ofetch/src/client/client/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type { Auth } from '../core/auth.gen';\nexport type { QuerySerializerOptions } from '../core/bodySerializer.gen';\nexport {\n  formDataBodySerializer,\n  jsonBodySerializer,\n  urlSearchParamsBodySerializer,\n} from '../core/bodySerializer.gen';\nexport { buildClientParams } from '../core/params.gen';\nexport { serializeQueryKeyValue } from '../core/queryKeySerializer.gen';\nexport { createClient } from './client.gen';\nexport type {\n  Client,\n  ClientOptions,\n  Config,\n  CreateClientConfig,\n  Options,\n  RequestOptions,\n  RequestResult,\n  ResolvedRequestOptions,\n  ResponseStyle,\n  TDataShape,\n} from './types.gen';\nexport { createConfig, mergeHeaders } from './utils.gen';\n"
  },
  {
    "path": "examples/openapi-ts-ofetch/src/client/client/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { FetchOptions as OfetchOptions, ResponseType as OfetchResponseType } from 'ofetch';\nimport type { ofetch } from 'ofetch';\n\nimport type { Auth } from '../core/auth.gen';\nimport type { ServerSentEventsOptions, ServerSentEventsResult } from '../core/serverSentEvents.gen';\nimport type { Client as CoreClient, Config as CoreConfig } from '../core/types.gen';\nimport type { Middleware } from './utils.gen';\n\nexport type ResponseStyle = 'data' | 'fields';\n\nexport interface Config<T extends ClientOptions = ClientOptions>\n  extends Omit<RequestInit, 'body' | 'headers' | 'method'>, CoreConfig {\n  /**\n   * HTTP(S) agent configuration (Node.js only). Passed through to ofetch.\n   */\n  agent?: OfetchOptions['agent'];\n  /**\n   * Base URL for all requests made by this client.\n   */\n  baseUrl?: T['baseUrl'];\n  /**\n   * Node-only proxy/agent options.\n   */\n  dispatcher?: OfetchOptions['dispatcher'];\n  /**\n   * Fetch API implementation. Used for SSE streaming. You can use this option\n   * to provide a custom fetch instance.\n   *\n   * @default globalThis.fetch\n   */\n  fetch?: typeof fetch;\n  /**\n   * Controls the native ofetch behaviour that throws `FetchError` when\n   * `response.ok === false`. We default to suppressing it to match the fetch\n   * client semantics and let `throwOnError` drive the outcome.\n   */\n  ignoreResponseError?: OfetchOptions['ignoreResponseError'];\n  // No custom fetch option: provide custom instance via `ofetch` instead\n  /**\n   * Please don't use the Fetch client for Next.js applications. The `next`\n   * options won't have any effect.\n   *\n   * Install {@link https://www.npmjs.com/package/@hey-api/client-next `@hey-api/client-next`} instead.\n   */\n  next?: never;\n  /**\n   * Custom ofetch instance created via `ofetch.create()`. If provided, it will\n   * be used for requests instead of the default `ofetch` export.\n   */\n  ofetch?: typeof ofetch;\n  /**\n   * ofetch hook called before a request is sent.\n   */\n  onRequest?: OfetchOptions['onRequest'];\n  /**\n   * ofetch hook called when a request fails before receiving a response\n   * (e.g., network errors or aborted requests).\n   */\n  onRequestError?: OfetchOptions['onRequestError'];\n  /**\n   * ofetch hook called after a successful response is received and parsed.\n   */\n  onResponse?: OfetchOptions['onResponse'];\n  /**\n   * ofetch hook called when the response indicates an error (non-ok status)\n   * or when response parsing fails.\n   */\n  onResponseError?: OfetchOptions['onResponseError'];\n  /**\n   * Return the response data parsed in a specified format. By default, `auto`\n   * will infer the appropriate method from the `Content-Type` response header.\n   * You can override this behavior with any of the {@link Body} methods.\n   * Select `stream` if you don't want to parse response data at all.\n   *\n   * @default 'auto'\n   */\n  parseAs?: 'arrayBuffer' | 'auto' | 'blob' | 'formData' | 'json' | 'stream' | 'text';\n  /** Custom response parser (ofetch). */\n  parseResponse?: OfetchOptions['parseResponse'];\n  /**\n   * Should we return only data or multiple fields (data, error, response, etc.)?\n   *\n   * @default 'fields'\n   */\n  responseStyle?: ResponseStyle;\n  /**\n   * ofetch responseType override. If provided, it will be passed directly to\n   * ofetch and take precedence over `parseAs`.\n   */\n  responseType?: OfetchResponseType;\n  /**\n   * Automatically retry failed requests.\n   */\n  retry?: OfetchOptions['retry'];\n  /**\n   * Delay (in ms) between retry attempts.\n   */\n  retryDelay?: OfetchOptions['retryDelay'];\n  /**\n   * HTTP status codes that should trigger a retry.\n   */\n  retryStatusCodes?: OfetchOptions['retryStatusCodes'];\n  /**\n   * Throw an error instead of returning it in the response?\n   *\n   * @default false\n   */\n  throwOnError?: T['throwOnError'];\n  /**\n   * Abort the request after the given milliseconds.\n   */\n  timeout?: number;\n}\n\nexport interface RequestOptions<\n  TData = unknown,\n  TResponseStyle extends ResponseStyle = 'fields',\n  ThrowOnError extends boolean = boolean,\n  Url extends string = string,\n>\n  extends\n    Config<{\n      responseStyle: TResponseStyle;\n      throwOnError: ThrowOnError;\n    }>,\n    Pick<\n      ServerSentEventsOptions<TData>,\n      | 'onSseError'\n      | 'onSseEvent'\n      | 'sseDefaultRetryDelay'\n      | 'sseMaxRetryAttempts'\n      | 'sseMaxRetryDelay'\n    > {\n  /**\n   * Any body that you want to add to your request.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/fetch#body}\n   */\n  body?: unknown;\n  path?: Record<string, unknown>;\n  query?: Record<string, unknown>;\n  /**\n   * Security mechanism(s) to use for the request.\n   */\n  security?: ReadonlyArray<Auth>;\n  url: Url;\n}\n\nexport interface ResolvedRequestOptions<\n  TResponseStyle extends ResponseStyle = 'fields',\n  ThrowOnError extends boolean = boolean,\n  Url extends string = string,\n> extends RequestOptions<unknown, TResponseStyle, ThrowOnError, Url> {\n  serializedBody?: string;\n}\n\nexport type RequestResult<\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = boolean,\n  TResponseStyle extends ResponseStyle = 'fields',\n> = ThrowOnError extends true\n  ? Promise<\n      TResponseStyle extends 'data'\n        ? TData extends Record<string, unknown>\n          ? TData[keyof TData]\n          : TData\n        : {\n            data: TData extends Record<string, unknown> ? TData[keyof TData] : TData;\n            request: Request;\n            response: Response;\n          }\n    >\n  : Promise<\n      TResponseStyle extends 'data'\n        ? (TData extends Record<string, unknown> ? TData[keyof TData] : TData) | undefined\n        : (\n            | {\n                data: TData extends Record<string, unknown> ? TData[keyof TData] : TData;\n                error: undefined;\n              }\n            | {\n                data: undefined;\n                error: TError extends Record<string, unknown> ? TError[keyof TError] : TError;\n              }\n          ) & {\n            request: Request;\n            response: Response;\n          }\n    >;\n\nexport interface ClientOptions {\n  baseUrl?: string;\n  responseStyle?: ResponseStyle;\n  throwOnError?: boolean;\n}\n\ntype MethodFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'>,\n) => RequestResult<TData, TError, ThrowOnError, TResponseStyle>;\n\ntype SseFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'>,\n) => Promise<ServerSentEventsResult<TData, TError>>;\n\ntype RequestFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'> &\n    Pick<Required<RequestOptions<TData, TResponseStyle, ThrowOnError>>, 'method'>,\n) => RequestResult<TData, TError, ThrowOnError, TResponseStyle>;\n\ntype BuildUrlFn = <\n  TData extends {\n    body?: unknown;\n    path?: Record<string, unknown>;\n    query?: Record<string, unknown>;\n    url: string;\n  },\n>(\n  options: TData & Options<TData>,\n) => string;\n\nexport type Client = CoreClient<RequestFn, Config, MethodFn, BuildUrlFn, SseFn> & {\n  interceptors: Middleware<Request, Response, unknown, ResolvedRequestOptions>;\n};\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 = ClientOptions> = (\n  override?: Config<ClientOptions & T>,\n) => Config<Required<ClientOptions> & T>;\n\nexport interface TDataShape {\n  body?: unknown;\n  headers?: unknown;\n  path?: unknown;\n  query?: unknown;\n  url: string;\n}\n\ntype OmitKeys<T, K> = Pick<T, Exclude<keyof T, K>>;\n\nexport type Options<\n  TData extends TDataShape = TDataShape,\n  ThrowOnError extends boolean = boolean,\n  TResponse = unknown,\n  TResponseStyle extends ResponseStyle = 'fields',\n> = OmitKeys<\n  RequestOptions<TResponse, TResponseStyle, ThrowOnError>,\n  'body' | 'path' | 'query' | 'url'\n> &\n  ([TData] extends [never] ? unknown : Omit<TData, 'url'>);\n"
  },
  {
    "path": "examples/openapi-ts-ofetch/src/client/client/utils.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { FetchOptions as OfetchOptions, ResponseType as OfetchResponseType } from 'ofetch';\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 {\n  Client,\n  ClientOptions,\n  Config,\n  RequestOptions,\n  ResolvedRequestOptions,\n  ResponseStyle,\n} 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\n/**\n * Map our parseAs value to ofetch responseType when not explicitly provided.\n */\nexport const mapParseAsToResponseType = (\n  parseAs: Config['parseAs'] | undefined,\n  explicit?: OfetchResponseType,\n): OfetchResponseType | undefined => {\n  if (explicit) return explicit;\n  switch (parseAs) {\n    case 'arrayBuffer':\n    case 'blob':\n    case 'json':\n    case 'text':\n    case 'stream':\n      return parseAs;\n    case 'formData':\n    case 'auto':\n    default:\n      return undefined; // let ofetch auto-detect\n  }\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\n/**\n * Heuristic to detect whether a request body can be safely retried.\n */\nexport const isRepeatableBody = (body: unknown): boolean => {\n  if (body == null) return true; // undefined/null treated as no-body\n  if (typeof body === 'string') return true;\n  if (typeof URLSearchParams !== 'undefined' && body instanceof URLSearchParams) return true;\n  if (typeof Uint8Array !== 'undefined' && body instanceof Uint8Array) return true;\n  if (typeof ArrayBuffer !== 'undefined' && body instanceof ArrayBuffer) return true;\n  if (typeof Blob !== 'undefined' && body instanceof Blob) return true;\n  if (typeof FormData !== 'undefined' && body instanceof FormData) return true;\n  // Streams are not repeatable\n  if (typeof ReadableStream !== 'undefined' && body instanceof ReadableStream) return false;\n  // Default: assume non-repeatable for unknown structured bodies\n  return false;\n};\n\n/**\n * Small helper to unify data vs fields return style.\n */\nexport const wrapDataReturn = <T>(\n  data: T,\n  result: { request: Request; response: Response },\n  responseStyle: ResponseStyle | undefined,\n): T | ((T extends Record<string, unknown> ? { data: T } : { data: T }) & typeof result) =>\n  (responseStyle ?? 'fields') === 'data' ? (data as any) : ({ data, ...result } as any);\n\n/**\n * Small helper to unify error vs fields return style.\n */\nexport const wrapErrorReturn = <E>(\n  error: E,\n  result: { request: Request; response: Response },\n  responseStyle: ResponseStyle | undefined,\n):\n  | undefined\n  | ((E extends Record<string, unknown> ? { error: E } : { error: E }) & typeof result) =>\n  (responseStyle ?? 'fields') === 'data' ? undefined : ({ error, ...result } as any);\n\n/**\n * Build options for $ofetch.raw from our resolved opts and body.\n */\nexport const buildOfetchOptions = (\n  opts: ResolvedRequestOptions,\n  body: BodyInit | null | undefined,\n  responseType: OfetchResponseType | undefined,\n  retryOverride?: OfetchOptions['retry'],\n): OfetchOptions =>\n  ({\n    agent: opts.agent as OfetchOptions['agent'],\n    body,\n    credentials: opts.credentials as OfetchOptions['credentials'],\n    dispatcher: opts.dispatcher as OfetchOptions['dispatcher'],\n    headers: opts.headers as Headers,\n    ignoreResponseError: (opts.ignoreResponseError as OfetchOptions['ignoreResponseError']) ?? true,\n    method: opts.method,\n    onRequest: opts.onRequest as OfetchOptions['onRequest'],\n    onRequestError: opts.onRequestError as OfetchOptions['onRequestError'],\n    onResponse: opts.onResponse as OfetchOptions['onResponse'],\n    onResponseError: opts.onResponseError as OfetchOptions['onResponseError'],\n    parseResponse: opts.parseResponse as OfetchOptions['parseResponse'],\n    // URL already includes query\n    query: undefined,\n    responseType,\n    retry: retryOverride ?? (opts.retry as OfetchOptions['retry']),\n    retryDelay: opts.retryDelay as OfetchOptions['retryDelay'],\n    retryStatusCodes: opts.retryStatusCodes as OfetchOptions['retryStatusCodes'],\n    signal: opts.signal,\n    timeout: opts.timeout as number | undefined,\n  }) as OfetchOptions;\n\n/**\n * Parse a successful response, handling empty bodies and stream cases.\n */\nexport const parseSuccess = async (\n  response: Response,\n  opts: ResolvedRequestOptions,\n  ofetchResponseType?: OfetchResponseType,\n): Promise<unknown> => {\n  // Stream requested: return stream body\n  if (ofetchResponseType === 'stream') {\n    return response.body;\n  }\n\n  const inferredParseAs =\n    (opts.parseAs === 'auto' ? getParseAs(response.headers.get('Content-Type')) : opts.parseAs) ??\n    'json';\n\n  // Handle empty responses\n  if (response.status === 204 || response.headers.get('Content-Length') === '0') {\n    switch (inferredParseAs) {\n      case 'arrayBuffer':\n      case 'blob':\n      case 'text':\n        return await (response as any)[inferredParseAs]();\n      case 'formData':\n        return new FormData();\n      case 'stream':\n        return response.body;\n      default:\n        return {};\n    }\n  }\n\n  // Prefer ofetch-populated data unless we explicitly need raw `formData`\n  let data: unknown = (response as any)._data;\n  if (inferredParseAs === 'formData' || typeof data === 'undefined') {\n    switch (inferredParseAs) {\n      case 'arrayBuffer':\n      case 'blob':\n      case 'formData':\n      case 'text':\n        data = await (response as any)[inferredParseAs]();\n        break;\n      case 'json': {\n        // Some servers return 200 with no Content-Length and empty body.\n        // response.json() would throw; detect empty via clone().text() first.\n        const txt = await response.clone().text();\n        if (!txt) {\n          data = {};\n        } else {\n          data = await (response as any).json();\n        }\n        break;\n      }\n      case 'stream':\n        return response.body;\n    }\n  }\n\n  if (inferredParseAs === 'json') {\n    if (opts.responseValidator) {\n      await opts.responseValidator(data);\n    }\n    if (opts.responseTransformer) {\n      data = await opts.responseTransformer(data);\n    }\n  }\n\n  return data;\n};\n\n/**\n * Parse an error response payload.\n */\nexport const parseError = async (response: Response): Promise<unknown> => {\n  let error: unknown = (response as any)._data;\n  if (typeof error === 'undefined') {\n    const textError = await response.text();\n    try {\n      error = JSON.parse(textError);\n    } catch {\n      error = textError;\n    }\n  }\n  return error ?? ({} as string);\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  ignoreResponseError: true,\n  parseAs: 'auto',\n  querySerializer: defaultQuerySerializer,\n  ...override,\n});\n"
  },
  {
    "path": "examples/openapi-ts-ofetch/src/client/client.gen.ts",
    "content": "// 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> = (\n  override?: Config<ClientOptions & T>,\n) => Config<Required<ClientOptions> & T>;\n\nexport const client = createClient(\n  createConfig<ClientOptions2>({ baseUrl: 'https://petstore3.swagger.io/api/v3' }),\n);\n"
  },
  {
    "path": "examples/openapi-ts-ofetch/src/client/core/auth.gen.ts",
    "content": "// 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"
  },
  {
    "path": "examples/openapi-ts-ofetch/src/client/core/bodySerializer.gen.ts",
    "content": "// 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"
  },
  {
    "path": "examples/openapi-ts-ofetch/src/client/core/params.gen.ts",
    "content": "// 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"
  },
  {
    "path": "examples/openapi-ts-ofetch/src/client/core/pathSerializer.gen.ts",
    "content": "// 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"
  },
  {
    "path": "examples/openapi-ts-ofetch/src/client/core/queryKeySerializer.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\n/**\n * JSON-friendly union that mirrors what Pinia Colada can hash.\n */\nexport type JsonValue =\n  | null\n  | string\n  | number\n  | boolean\n  | JsonValue[]\n  | { [key: string]: JsonValue };\n\n/**\n * Replacer that converts non-JSON values (bigint, Date, etc.) to safe substitutes.\n */\nexport const queryKeyJsonReplacer = (_key: string, value: unknown) => {\n  if (value === undefined || typeof value === 'function' || typeof value === 'symbol') {\n    return undefined;\n  }\n  if (typeof value === 'bigint') {\n    return value.toString();\n  }\n  if (value instanceof Date) {\n    return value.toISOString();\n  }\n  return value;\n};\n\n/**\n * Safely stringifies a value and parses it back into a JsonValue.\n */\nexport const stringifyToJsonValue = (input: unknown): JsonValue | undefined => {\n  try {\n    const json = JSON.stringify(input, queryKeyJsonReplacer);\n    if (json === undefined) {\n      return undefined;\n    }\n    return JSON.parse(json) as JsonValue;\n  } catch {\n    return undefined;\n  }\n};\n\n/**\n * Detects plain objects (including objects with a null prototype).\n */\nconst isPlainObject = (value: unknown): value is Record<string, unknown> => {\n  if (value === null || typeof value !== 'object') {\n    return false;\n  }\n  const prototype = Object.getPrototypeOf(value as object);\n  return prototype === Object.prototype || prototype === null;\n};\n\n/**\n * Turns URLSearchParams into a sorted JSON object for deterministic keys.\n */\nconst serializeSearchParams = (params: URLSearchParams): JsonValue => {\n  const entries = Array.from(params.entries()).sort(([a], [b]) => a.localeCompare(b));\n  const result: Record<string, JsonValue> = {};\n\n  for (const [key, value] of entries) {\n    const existing = result[key];\n    if (existing === undefined) {\n      result[key] = value;\n      continue;\n    }\n\n    if (Array.isArray(existing)) {\n      (existing as string[]).push(value);\n    } else {\n      result[key] = [existing, value];\n    }\n  }\n\n  return result;\n};\n\n/**\n * Normalizes any accepted value into a JSON-friendly shape for query keys.\n */\nexport const serializeQueryKeyValue = (value: unknown): JsonValue | undefined => {\n  if (value === null) {\n    return null;\n  }\n\n  if (typeof value === 'string' || typeof value === 'number' || typeof value === 'boolean') {\n    return value;\n  }\n\n  if (value === undefined || typeof value === 'function' || typeof value === 'symbol') {\n    return undefined;\n  }\n\n  if (typeof value === 'bigint') {\n    return value.toString();\n  }\n\n  if (value instanceof Date) {\n    return value.toISOString();\n  }\n\n  if (Array.isArray(value)) {\n    return stringifyToJsonValue(value);\n  }\n\n  if (typeof URLSearchParams !== 'undefined' && value instanceof URLSearchParams) {\n    return serializeSearchParams(value);\n  }\n\n  if (isPlainObject(value)) {\n    return stringifyToJsonValue(value);\n  }\n\n  return undefined;\n};\n"
  },
  {
    "path": "examples/openapi-ts-ofetch/src/client/core/serverSentEvents.gen.ts",
    "content": "// 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 const 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            // Normalize line endings: CRLF -> LF, then CR -> LF\n            buffer = buffer.replace(/\\r\\n/g, '\\n').replace(/\\r/g, '\\n');\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"
  },
  {
    "path": "examples/openapi-ts-ofetch/src/client/core/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { Auth, AuthToken } from './auth.gen';\nimport type { BodySerializer, QuerySerializer, QuerySerializerOptions } from './bodySerializer.gen';\n\nexport type HttpMethod =\n  | 'connect'\n  | 'delete'\n  | 'get'\n  | 'head'\n  | 'options'\n  | 'patch'\n  | 'post'\n  | 'put'\n  | 'trace';\n\nexport type Client<\n  RequestFn = never,\n  Config = unknown,\n  MethodFn = never,\n  BuildUrlFn = never,\n  SseFn = never,\n> = {\n  /**\n   * Returns the final request URL.\n   */\n  buildUrl: BuildUrlFn;\n  getConfig: () => Config;\n  request: RequestFn;\n  setConfig: (config: Config) => Config;\n} & {\n  [K in HttpMethod]: MethodFn;\n} & ([SseFn] extends [never] ? { sse?: never } : { sse: { [K in HttpMethod]: SseFn } });\n\nexport interface Config {\n  /**\n   * Auth token or a function returning auth token. The resolved value will be\n   * added to the request payload as defined by its `security` array.\n   */\n  auth?: ((auth: Auth) => Promise<AuthToken> | AuthToken) | AuthToken;\n  /**\n   * A function for serializing request body parameter. By default,\n   * {@link JSON.stringify()} will be used.\n   */\n  bodySerializer?: BodySerializer | null;\n  /**\n   * An object containing any HTTP headers that you want to pre-populate your\n   * `Headers` object with.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/Headers/Headers#init See more}\n   */\n  headers?:\n    | RequestInit['headers']\n    | Record<\n        string,\n        string | number | boolean | (string | number | boolean)[] | null | undefined | unknown\n      >;\n  /**\n   * The request method.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/fetch#method See more}\n   */\n  method?: Uppercase<HttpMethod>;\n  /**\n   * A function for serializing request query parameters. By default, arrays\n   * will be exploded in form style, objects will be exploded in deepObject\n   * style, and reserved characters are percent-encoded.\n   *\n   * This method will have no effect if the native `paramsSerializer()` Axios\n   * API function is used.\n   *\n   * {@link https://swagger.io/docs/specification/serialization/#query View examples}\n   */\n  querySerializer?: QuerySerializer | QuerySerializerOptions;\n  /**\n   * A function validating request data. This is useful if you want to ensure\n   * the request conforms to the desired shape, so it can be safely sent to\n   * the server.\n   */\n  requestValidator?: (data: unknown) => Promise<unknown>;\n  /**\n   * A function transforming response data before it's returned. This is useful\n   * for post-processing data, e.g. converting ISO strings into Date objects.\n   */\n  responseTransformer?: (data: unknown) => Promise<unknown>;\n  /**\n   * A function validating response data. This is useful if you want to ensure\n   * the response conforms to the desired shape, so it can be safely passed to\n   * the transformers and returned to the user.\n   */\n  responseValidator?: (data: unknown) => Promise<unknown>;\n}\n\ntype IsExactlyNeverOrNeverUndefined<T> = [T] extends [never]\n  ? true\n  : [T] extends [never | undefined]\n    ? [undefined] extends [T]\n      ? false\n      : true\n    : false;\n\nexport type OmitNever<T extends Record<string, unknown>> = {\n  [K in keyof T as IsExactlyNeverOrNeverUndefined<T[K]> extends true ? never : K]: T[K];\n};\n"
  },
  {
    "path": "examples/openapi-ts-ofetch/src/client/core/utils.gen.ts",
    "content": "// 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"
  },
  {
    "path": "examples/openapi-ts-ofetch/src/client/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport {\n  addPet,\n  createUser,\n  createUsersWithListInput,\n  deleteOrder,\n  deletePet,\n  deleteUser,\n  findPetsByStatus,\n  findPetsByTags,\n  getInventory,\n  getOrderById,\n  getPetById,\n  getUserByName,\n  loginUser,\n  logoutUser,\n  type Options,\n  placeOrder,\n  updatePet,\n  updatePetWithForm,\n  updateUser,\n  uploadFile,\n} from './sdk.gen';\nexport type {\n  AddPetData,\n  AddPetErrors,\n  AddPetResponse,\n  AddPetResponses,\n  ApiResponse,\n  Category,\n  ClientOptions,\n  CreateUserData,\n  CreateUserErrors,\n  CreateUserResponse,\n  CreateUserResponses,\n  CreateUsersWithListInputData,\n  CreateUsersWithListInputErrors,\n  CreateUsersWithListInputResponse,\n  CreateUsersWithListInputResponses,\n  DeleteOrderData,\n  DeleteOrderErrors,\n  DeleteOrderResponses,\n  DeletePetData,\n  DeletePetErrors,\n  DeletePetResponses,\n  DeleteUserData,\n  DeleteUserErrors,\n  DeleteUserResponses,\n  FindPetsByStatusData,\n  FindPetsByStatusErrors,\n  FindPetsByStatusResponse,\n  FindPetsByStatusResponses,\n  FindPetsByTagsData,\n  FindPetsByTagsErrors,\n  FindPetsByTagsResponse,\n  FindPetsByTagsResponses,\n  GetInventoryData,\n  GetInventoryErrors,\n  GetInventoryResponse,\n  GetInventoryResponses,\n  GetOrderByIdData,\n  GetOrderByIdErrors,\n  GetOrderByIdResponse,\n  GetOrderByIdResponses,\n  GetPetByIdData,\n  GetPetByIdErrors,\n  GetPetByIdResponse,\n  GetPetByIdResponses,\n  GetUserByNameData,\n  GetUserByNameErrors,\n  GetUserByNameResponse,\n  GetUserByNameResponses,\n  LoginUserData,\n  LoginUserErrors,\n  LoginUserResponse,\n  LoginUserResponses,\n  LogoutUserData,\n  LogoutUserErrors,\n  LogoutUserResponses,\n  Order,\n  Pet,\n  Pet2,\n  PlaceOrderData,\n  PlaceOrderErrors,\n  PlaceOrderResponse,\n  PlaceOrderResponses,\n  Tag,\n  UpdatePetData,\n  UpdatePetErrors,\n  UpdatePetResponse,\n  UpdatePetResponses,\n  UpdatePetWithFormData,\n  UpdatePetWithFormErrors,\n  UpdatePetWithFormResponse,\n  UpdatePetWithFormResponses,\n  UpdateUserData,\n  UpdateUserErrors,\n  UpdateUserResponses,\n  UploadFileData,\n  UploadFileErrors,\n  UploadFileResponse,\n  UploadFileResponses,\n  User,\n  UserArray,\n} from './types.gen';\n"
  },
  {
    "path": "examples/openapi-ts-ofetch/src/client/schemas.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport const OrderSchema = {\n  properties: {\n    complete: {\n      type: 'boolean',\n    },\n    id: {\n      example: 10,\n      format: 'int64',\n      type: 'integer',\n    },\n    petId: {\n      example: 198772,\n      format: 'int64',\n      type: 'integer',\n    },\n    quantity: {\n      example: 7,\n      format: 'int32',\n      type: 'integer',\n    },\n    shipDate: {\n      format: 'date-time',\n      type: 'string',\n    },\n    status: {\n      description: 'Order Status',\n      enum: ['placed', 'approved', 'delivered'],\n      example: 'approved',\n      type: 'string',\n    },\n  },\n  type: 'object',\n  'x-swagger-router-model': 'io.swagger.petstore.model.Order',\n  xml: {\n    name: 'order',\n  },\n} as const;\n\nexport const CategorySchema = {\n  properties: {\n    id: {\n      example: 1,\n      format: 'int64',\n      type: 'integer',\n    },\n    name: {\n      example: 'Dogs',\n      type: 'string',\n    },\n  },\n  type: 'object',\n  'x-swagger-router-model': 'io.swagger.petstore.model.Category',\n  xml: {\n    name: 'category',\n  },\n} as const;\n\nexport const UserSchema = {\n  properties: {\n    email: {\n      example: 'john@email.com',\n      type: 'string',\n    },\n    firstName: {\n      example: 'John',\n      type: 'string',\n    },\n    id: {\n      example: 10,\n      format: 'int64',\n      type: 'integer',\n    },\n    lastName: {\n      example: 'James',\n      type: 'string',\n    },\n    password: {\n      example: '12345',\n      type: 'string',\n    },\n    phone: {\n      example: '12345',\n      type: 'string',\n    },\n    userStatus: {\n      description: 'User Status',\n      example: 1,\n      format: 'int32',\n      type: 'integer',\n    },\n    username: {\n      example: 'theUser',\n      type: 'string',\n    },\n  },\n  type: 'object',\n  'x-swagger-router-model': 'io.swagger.petstore.model.User',\n  xml: {\n    name: 'user',\n  },\n} as const;\n\nexport const TagSchema = {\n  properties: {\n    id: {\n      format: 'int64',\n      type: 'integer',\n    },\n    name: {\n      type: 'string',\n    },\n  },\n  type: 'object',\n  'x-swagger-router-model': 'io.swagger.petstore.model.Tag',\n  xml: {\n    name: 'tag',\n  },\n} as const;\n\nexport const PetSchema = {\n  properties: {\n    category: {\n      $ref: '#/components/schemas/Category',\n    },\n    id: {\n      example: 10,\n      format: 'int64',\n      type: 'integer',\n    },\n    name: {\n      example: 'doggie',\n      type: 'string',\n    },\n    photoUrls: {\n      items: {\n        type: 'string',\n        xml: {\n          name: 'photoUrl',\n        },\n      },\n      type: 'array',\n      xml: {\n        wrapped: true,\n      },\n    },\n    status: {\n      description: 'pet status in the store',\n      enum: ['available', 'pending', 'sold'],\n      type: 'string',\n    },\n    tags: {\n      items: {\n        $ref: '#/components/schemas/Tag',\n      },\n      type: 'array',\n      xml: {\n        wrapped: true,\n      },\n    },\n  },\n  required: ['name', 'photoUrls'],\n  type: 'object',\n  'x-swagger-router-model': 'io.swagger.petstore.model.Pet',\n  xml: {\n    name: 'pet',\n  },\n} as const;\n\nexport const ApiResponseSchema = {\n  properties: {\n    code: {\n      format: 'int32',\n      type: 'integer',\n    },\n    message: {\n      type: 'string',\n    },\n    type: {\n      type: 'string',\n    },\n  },\n  type: 'object',\n  xml: {\n    name: '##default',\n  },\n} as const;\n"
  },
  {
    "path": "examples/openapi-ts-ofetch/src/client/sdk.gen.ts",
    "content": "// 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 {\n  AddPetData,\n  AddPetErrors,\n  AddPetResponses,\n  CreateUserData,\n  CreateUserErrors,\n  CreateUserResponses,\n  CreateUsersWithListInputData,\n  CreateUsersWithListInputErrors,\n  CreateUsersWithListInputResponses,\n  DeleteOrderData,\n  DeleteOrderErrors,\n  DeleteOrderResponses,\n  DeletePetData,\n  DeletePetErrors,\n  DeletePetResponses,\n  DeleteUserData,\n  DeleteUserErrors,\n  DeleteUserResponses,\n  FindPetsByStatusData,\n  FindPetsByStatusErrors,\n  FindPetsByStatusResponses,\n  FindPetsByTagsData,\n  FindPetsByTagsErrors,\n  FindPetsByTagsResponses,\n  GetInventoryData,\n  GetInventoryErrors,\n  GetInventoryResponses,\n  GetOrderByIdData,\n  GetOrderByIdErrors,\n  GetOrderByIdResponses,\n  GetPetByIdData,\n  GetPetByIdErrors,\n  GetPetByIdResponses,\n  GetUserByNameData,\n  GetUserByNameErrors,\n  GetUserByNameResponses,\n  LoginUserData,\n  LoginUserErrors,\n  LoginUserResponses,\n  LogoutUserData,\n  LogoutUserErrors,\n  LogoutUserResponses,\n  PlaceOrderData,\n  PlaceOrderErrors,\n  PlaceOrderResponses,\n  UpdatePetData,\n  UpdatePetErrors,\n  UpdatePetResponses,\n  UpdatePetWithFormData,\n  UpdatePetWithFormErrors,\n  UpdatePetWithFormResponses,\n  UpdateUserData,\n  UpdateUserErrors,\n  UpdateUserResponses,\n  UploadFileData,\n  UploadFileErrors,\n  UploadFileResponses,\n} from './types.gen';\n\nexport type Options<\n  TData extends TDataShape = TDataShape,\n  ThrowOnError extends boolean = boolean,\n> = Options2<TData, ThrowOnError> & {\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 * Add a new pet to the store.\n *\n * Add a new pet to the store.\n */\nexport const addPet = <ThrowOnError extends boolean = false>(\n  options: Options<AddPetData, ThrowOnError>,\n) =>\n  (options.client ?? client).post<AddPetResponses, AddPetErrors, ThrowOnError>({\n    security: [{ scheme: 'bearer', type: 'http' }],\n    url: '/pet',\n    ...options,\n    headers: {\n      'Content-Type': 'application/json',\n      ...options.headers,\n    },\n  });\n\n/**\n * Update an existing pet.\n *\n * Update an existing pet by Id.\n */\nexport const updatePet = <ThrowOnError extends boolean = false>(\n  options: Options<UpdatePetData, ThrowOnError>,\n) =>\n  (options.client ?? client).put<UpdatePetResponses, UpdatePetErrors, ThrowOnError>({\n    security: [{ scheme: 'bearer', type: 'http' }],\n    url: '/pet',\n    ...options,\n    headers: {\n      'Content-Type': 'application/json',\n      ...options.headers,\n    },\n  });\n\n/**\n * Finds Pets by status.\n *\n * Multiple status values can be provided with comma separated strings.\n */\nexport const findPetsByStatus = <ThrowOnError extends boolean = false>(\n  options: Options<FindPetsByStatusData, ThrowOnError>,\n) =>\n  (options.client ?? client).get<FindPetsByStatusResponses, FindPetsByStatusErrors, ThrowOnError>({\n    security: [{ scheme: 'bearer', type: 'http' }],\n    url: '/pet/findByStatus',\n    ...options,\n  });\n\n/**\n * Finds Pets by tags.\n *\n * Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.\n */\nexport const findPetsByTags = <ThrowOnError extends boolean = false>(\n  options: Options<FindPetsByTagsData, ThrowOnError>,\n) =>\n  (options.client ?? client).get<FindPetsByTagsResponses, FindPetsByTagsErrors, ThrowOnError>({\n    security: [{ scheme: 'bearer', type: 'http' }],\n    url: '/pet/findByTags',\n    ...options,\n  });\n\n/**\n * Deletes a pet.\n *\n * Delete a pet.\n */\nexport const deletePet = <ThrowOnError extends boolean = false>(\n  options: Options<DeletePetData, ThrowOnError>,\n) =>\n  (options.client ?? client).delete<DeletePetResponses, DeletePetErrors, ThrowOnError>({\n    security: [{ scheme: 'bearer', type: 'http' }],\n    url: '/pet/{petId}',\n    ...options,\n  });\n\n/**\n * Find pet by ID.\n *\n * Returns a single pet.\n */\nexport const getPetById = <ThrowOnError extends boolean = false>(\n  options: Options<GetPetByIdData, ThrowOnError>,\n) =>\n  (options.client ?? client).get<GetPetByIdResponses, GetPetByIdErrors, ThrowOnError>({\n    security: [\n      { name: 'api_key', type: 'apiKey' },\n      { scheme: 'bearer', type: 'http' },\n    ],\n    url: '/pet/{petId}',\n    ...options,\n  });\n\n/**\n * Updates a pet in the store with form data.\n *\n * Updates a pet resource based on the form data.\n */\nexport const updatePetWithForm = <ThrowOnError extends boolean = false>(\n  options: Options<UpdatePetWithFormData, ThrowOnError>,\n) =>\n  (options.client ?? client).post<\n    UpdatePetWithFormResponses,\n    UpdatePetWithFormErrors,\n    ThrowOnError\n  >({\n    security: [{ scheme: 'bearer', type: 'http' }],\n    url: '/pet/{petId}',\n    ...options,\n  });\n\n/**\n * Uploads an image.\n *\n * Upload image of the pet.\n */\nexport const uploadFile = <ThrowOnError extends boolean = false>(\n  options: Options<UploadFileData, ThrowOnError>,\n) =>\n  (options.client ?? client).post<UploadFileResponses, UploadFileErrors, ThrowOnError>({\n    bodySerializer: null,\n    security: [{ scheme: 'bearer', type: 'http' }],\n    url: '/pet/{petId}/uploadImage',\n    ...options,\n    headers: {\n      'Content-Type': 'application/octet-stream',\n      ...options.headers,\n    },\n  });\n\n/**\n * Returns pet inventories by status.\n *\n * Returns a map of status codes to quantities.\n */\nexport const getInventory = <ThrowOnError extends boolean = false>(\n  options?: Options<GetInventoryData, ThrowOnError>,\n) =>\n  (options?.client ?? client).get<GetInventoryResponses, GetInventoryErrors, ThrowOnError>({\n    security: [{ name: 'api_key', type: 'apiKey' }],\n    url: '/store/inventory',\n    ...options,\n  });\n\n/**\n * Place an order for a pet.\n *\n * Place a new order in the store.\n */\nexport const placeOrder = <ThrowOnError extends boolean = false>(\n  options?: Options<PlaceOrderData, ThrowOnError>,\n) =>\n  (options?.client ?? client).post<PlaceOrderResponses, PlaceOrderErrors, ThrowOnError>({\n    url: '/store/order',\n    ...options,\n    headers: {\n      'Content-Type': 'application/json',\n      ...options?.headers,\n    },\n  });\n\n/**\n * Delete purchase order by identifier.\n *\n * For valid response try integer IDs with value < 1000. Anything above 1000 or non-integers will generate API errors.\n */\nexport const deleteOrder = <ThrowOnError extends boolean = false>(\n  options: Options<DeleteOrderData, ThrowOnError>,\n) =>\n  (options.client ?? client).delete<DeleteOrderResponses, DeleteOrderErrors, ThrowOnError>({\n    url: '/store/order/{orderId}',\n    ...options,\n  });\n\n/**\n * Find purchase order by ID.\n *\n * For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions.\n */\nexport const getOrderById = <ThrowOnError extends boolean = false>(\n  options: Options<GetOrderByIdData, ThrowOnError>,\n) =>\n  (options.client ?? client).get<GetOrderByIdResponses, GetOrderByIdErrors, ThrowOnError>({\n    url: '/store/order/{orderId}',\n    ...options,\n  });\n\n/**\n * Create user.\n *\n * This can only be done by the logged in user.\n */\nexport const createUser = <ThrowOnError extends boolean = false>(\n  options?: Options<CreateUserData, ThrowOnError>,\n) =>\n  (options?.client ?? client).post<CreateUserResponses, CreateUserErrors, ThrowOnError>({\n    url: '/user',\n    ...options,\n    headers: {\n      'Content-Type': 'application/json',\n      ...options?.headers,\n    },\n  });\n\n/**\n * Creates list of users with given input array.\n *\n * Creates list of users with given input array.\n */\nexport const createUsersWithListInput = <ThrowOnError extends boolean = false>(\n  options?: Options<CreateUsersWithListInputData, ThrowOnError>,\n) =>\n  (options?.client ?? client).post<\n    CreateUsersWithListInputResponses,\n    CreateUsersWithListInputErrors,\n    ThrowOnError\n  >({\n    url: '/user/createWithList',\n    ...options,\n    headers: {\n      'Content-Type': 'application/json',\n      ...options?.headers,\n    },\n  });\n\n/**\n * Logs user into the system.\n *\n * Log into the system.\n */\nexport const loginUser = <ThrowOnError extends boolean = false>(\n  options?: Options<LoginUserData, ThrowOnError>,\n) =>\n  (options?.client ?? client).get<LoginUserResponses, LoginUserErrors, ThrowOnError>({\n    url: '/user/login',\n    ...options,\n  });\n\n/**\n * Logs out current logged in user session.\n *\n * Log user out of the system.\n */\nexport const logoutUser = <ThrowOnError extends boolean = false>(\n  options?: Options<LogoutUserData, ThrowOnError>,\n) =>\n  (options?.client ?? client).get<LogoutUserResponses, LogoutUserErrors, ThrowOnError>({\n    url: '/user/logout',\n    ...options,\n  });\n\n/**\n * Delete user resource.\n *\n * This can only be done by the logged in user.\n */\nexport const deleteUser = <ThrowOnError extends boolean = false>(\n  options: Options<DeleteUserData, ThrowOnError>,\n) =>\n  (options.client ?? client).delete<DeleteUserResponses, DeleteUserErrors, ThrowOnError>({\n    url: '/user/{username}',\n    ...options,\n  });\n\n/**\n * Get user by user name.\n *\n * Get user detail based on username.\n */\nexport const getUserByName = <ThrowOnError extends boolean = false>(\n  options: Options<GetUserByNameData, ThrowOnError>,\n) =>\n  (options.client ?? client).get<GetUserByNameResponses, GetUserByNameErrors, ThrowOnError>({\n    url: '/user/{username}',\n    ...options,\n  });\n\n/**\n * Update user resource.\n *\n * This can only be done by the logged in user.\n */\nexport const updateUser = <ThrowOnError extends boolean = false>(\n  options: Options<UpdateUserData, ThrowOnError>,\n) =>\n  (options.client ?? client).put<UpdateUserResponses, UpdateUserErrors, ThrowOnError>({\n    url: '/user/{username}',\n    ...options,\n    headers: {\n      'Content-Type': 'application/json',\n      ...options.headers,\n    },\n  });\n"
  },
  {
    "path": "examples/openapi-ts-ofetch/src/client/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type ClientOptions = {\n  baseUrl: 'https://petstore3.swagger.io/api/v3' | (string & {});\n};\n\nexport type Order = {\n  complete?: boolean;\n  id?: number;\n  petId?: number;\n  quantity?: number;\n  shipDate?: string;\n  /**\n   * Order Status\n   */\n  status?: 'placed' | 'approved' | 'delivered';\n};\n\nexport type Category = {\n  id?: number;\n  name?: string;\n};\n\nexport type User = {\n  email?: string;\n  firstName?: string;\n  id?: number;\n  lastName?: string;\n  password?: string;\n  phone?: string;\n  /**\n   * User Status\n   */\n  userStatus?: number;\n  username?: string;\n};\n\nexport type Tag = {\n  id?: number;\n  name?: string;\n};\n\nexport type Pet = {\n  category?: Category;\n  id?: number;\n  name: string;\n  photoUrls: Array<string>;\n  /**\n   * pet status in the store\n   */\n  status?: 'available' | 'pending' | 'sold';\n  tags?: Array<Tag>;\n};\n\nexport type ApiResponse = {\n  code?: number;\n  message?: string;\n  type?: string;\n};\n\nexport type Pet2 = Pet;\n\n/**\n * List of user object\n */\nexport type UserArray = Array<User>;\n\nexport type AddPetData = {\n  /**\n   * Create a new pet in the store\n   */\n  body: Pet;\n  path?: never;\n  query?: never;\n  url: '/pet';\n};\n\nexport type AddPetErrors = {\n  /**\n   * Invalid input\n   */\n  400: unknown;\n  /**\n   * Validation exception\n   */\n  422: unknown;\n  /**\n   * Unexpected error\n   */\n  default: unknown;\n};\n\nexport type AddPetResponses = {\n  /**\n   * Successful operation\n   */\n  200: Pet;\n};\n\nexport type AddPetResponse = AddPetResponses[keyof AddPetResponses];\n\nexport type UpdatePetData = {\n  /**\n   * Update an existent pet in the store\n   */\n  body: Pet;\n  path?: never;\n  query?: never;\n  url: '/pet';\n};\n\nexport type UpdatePetErrors = {\n  /**\n   * Invalid ID supplied\n   */\n  400: unknown;\n  /**\n   * Pet not found\n   */\n  404: unknown;\n  /**\n   * Validation exception\n   */\n  422: unknown;\n  /**\n   * Unexpected error\n   */\n  default: unknown;\n};\n\nexport type UpdatePetResponses = {\n  /**\n   * Successful operation\n   */\n  200: Pet;\n};\n\nexport type UpdatePetResponse = UpdatePetResponses[keyof UpdatePetResponses];\n\nexport type FindPetsByStatusData = {\n  body?: never;\n  path?: never;\n  query: {\n    /**\n     * Status values that need to be considered for filter\n     */\n    status: 'available' | 'pending' | 'sold';\n  };\n  url: '/pet/findByStatus';\n};\n\nexport type FindPetsByStatusErrors = {\n  /**\n   * Invalid status value\n   */\n  400: unknown;\n  /**\n   * Unexpected error\n   */\n  default: unknown;\n};\n\nexport type FindPetsByStatusResponses = {\n  /**\n   * successful operation\n   */\n  200: Array<Pet>;\n};\n\nexport type FindPetsByStatusResponse = FindPetsByStatusResponses[keyof FindPetsByStatusResponses];\n\nexport type FindPetsByTagsData = {\n  body?: never;\n  path?: never;\n  query: {\n    /**\n     * Tags to filter by\n     */\n    tags: Array<string>;\n  };\n  url: '/pet/findByTags';\n};\n\nexport type FindPetsByTagsErrors = {\n  /**\n   * Invalid tag value\n   */\n  400: unknown;\n  /**\n   * Unexpected error\n   */\n  default: unknown;\n};\n\nexport type FindPetsByTagsResponses = {\n  /**\n   * successful operation\n   */\n  200: Array<Pet>;\n};\n\nexport type FindPetsByTagsResponse = FindPetsByTagsResponses[keyof FindPetsByTagsResponses];\n\nexport type DeletePetData = {\n  body?: never;\n  headers?: {\n    api_key?: string;\n  };\n  path: {\n    /**\n     * Pet id to delete\n     */\n    petId: number;\n  };\n  query?: never;\n  url: '/pet/{petId}';\n};\n\nexport type DeletePetErrors = {\n  /**\n   * Invalid pet value\n   */\n  400: unknown;\n  /**\n   * Unexpected error\n   */\n  default: unknown;\n};\n\nexport type DeletePetResponses = {\n  /**\n   * Pet deleted\n   */\n  200: unknown;\n};\n\nexport type GetPetByIdData = {\n  body?: never;\n  path: {\n    /**\n     * ID of pet to return\n     */\n    petId: number;\n  };\n  query?: never;\n  url: '/pet/{petId}';\n};\n\nexport type GetPetByIdErrors = {\n  /**\n   * Invalid ID supplied\n   */\n  400: unknown;\n  /**\n   * Pet not found\n   */\n  404: unknown;\n  /**\n   * Unexpected error\n   */\n  default: unknown;\n};\n\nexport type GetPetByIdResponses = {\n  /**\n   * successful operation\n   */\n  200: Pet;\n};\n\nexport type GetPetByIdResponse = GetPetByIdResponses[keyof GetPetByIdResponses];\n\nexport type UpdatePetWithFormData = {\n  body?: never;\n  path: {\n    /**\n     * ID of pet that needs to be updated\n     */\n    petId: number;\n  };\n  query?: {\n    /**\n     * Name of pet that needs to be updated\n     */\n    name?: string;\n    /**\n     * Status of pet that needs to be updated\n     */\n    status?: string;\n  };\n  url: '/pet/{petId}';\n};\n\nexport type UpdatePetWithFormErrors = {\n  /**\n   * Invalid input\n   */\n  400: unknown;\n  /**\n   * Unexpected error\n   */\n  default: unknown;\n};\n\nexport type UpdatePetWithFormResponses = {\n  /**\n   * successful operation\n   */\n  200: Pet;\n};\n\nexport type UpdatePetWithFormResponse =\n  UpdatePetWithFormResponses[keyof UpdatePetWithFormResponses];\n\nexport type UploadFileData = {\n  body?: Blob | File;\n  path: {\n    /**\n     * ID of pet to update\n     */\n    petId: number;\n  };\n  query?: {\n    /**\n     * Additional Metadata\n     */\n    additionalMetadata?: string;\n  };\n  url: '/pet/{petId}/uploadImage';\n};\n\nexport type UploadFileErrors = {\n  /**\n   * No file uploaded\n   */\n  400: unknown;\n  /**\n   * Pet not found\n   */\n  404: unknown;\n  /**\n   * Unexpected error\n   */\n  default: unknown;\n};\n\nexport type UploadFileResponses = {\n  /**\n   * successful operation\n   */\n  200: ApiResponse;\n};\n\nexport type UploadFileResponse = UploadFileResponses[keyof UploadFileResponses];\n\nexport type GetInventoryData = {\n  body?: never;\n  path?: never;\n  query?: never;\n  url: '/store/inventory';\n};\n\nexport type GetInventoryErrors = {\n  /**\n   * Unexpected error\n   */\n  default: unknown;\n};\n\nexport type GetInventoryResponses = {\n  /**\n   * successful operation\n   */\n  200: {\n    [key: string]: number;\n  };\n};\n\nexport type GetInventoryResponse = GetInventoryResponses[keyof GetInventoryResponses];\n\nexport type PlaceOrderData = {\n  body?: Order;\n  path?: never;\n  query?: never;\n  url: '/store/order';\n};\n\nexport type PlaceOrderErrors = {\n  /**\n   * Invalid input\n   */\n  400: unknown;\n  /**\n   * Validation exception\n   */\n  422: unknown;\n  /**\n   * Unexpected error\n   */\n  default: unknown;\n};\n\nexport type PlaceOrderResponses = {\n  /**\n   * successful operation\n   */\n  200: Order;\n};\n\nexport type PlaceOrderResponse = PlaceOrderResponses[keyof PlaceOrderResponses];\n\nexport type DeleteOrderData = {\n  body?: never;\n  path: {\n    /**\n     * ID of the order that needs to be deleted\n     */\n    orderId: number;\n  };\n  query?: never;\n  url: '/store/order/{orderId}';\n};\n\nexport type DeleteOrderErrors = {\n  /**\n   * Invalid ID supplied\n   */\n  400: unknown;\n  /**\n   * Order not found\n   */\n  404: unknown;\n  /**\n   * Unexpected error\n   */\n  default: unknown;\n};\n\nexport type DeleteOrderResponses = {\n  /**\n   * order deleted\n   */\n  200: unknown;\n};\n\nexport type GetOrderByIdData = {\n  body?: never;\n  path: {\n    /**\n     * ID of order that needs to be fetched\n     */\n    orderId: number;\n  };\n  query?: never;\n  url: '/store/order/{orderId}';\n};\n\nexport type GetOrderByIdErrors = {\n  /**\n   * Invalid ID supplied\n   */\n  400: unknown;\n  /**\n   * Order not found\n   */\n  404: unknown;\n  /**\n   * Unexpected error\n   */\n  default: unknown;\n};\n\nexport type GetOrderByIdResponses = {\n  /**\n   * successful operation\n   */\n  200: Order;\n};\n\nexport type GetOrderByIdResponse = GetOrderByIdResponses[keyof GetOrderByIdResponses];\n\nexport type CreateUserData = {\n  /**\n   * Created user object\n   */\n  body?: User;\n  path?: never;\n  query?: never;\n  url: '/user';\n};\n\nexport type CreateUserErrors = {\n  /**\n   * Unexpected error\n   */\n  default: unknown;\n};\n\nexport type CreateUserResponses = {\n  /**\n   * successful operation\n   */\n  200: User;\n};\n\nexport type CreateUserResponse = CreateUserResponses[keyof CreateUserResponses];\n\nexport type CreateUsersWithListInputData = {\n  body?: Array<User>;\n  path?: never;\n  query?: never;\n  url: '/user/createWithList';\n};\n\nexport type CreateUsersWithListInputErrors = {\n  /**\n   * Unexpected error\n   */\n  default: unknown;\n};\n\nexport type CreateUsersWithListInputResponses = {\n  /**\n   * Successful operation\n   */\n  200: User;\n};\n\nexport type CreateUsersWithListInputResponse =\n  CreateUsersWithListInputResponses[keyof CreateUsersWithListInputResponses];\n\nexport type LoginUserData = {\n  body?: never;\n  path?: never;\n  query?: {\n    /**\n     * The password for login in clear text\n     */\n    password?: string;\n    /**\n     * The user name for login\n     */\n    username?: string;\n  };\n  url: '/user/login';\n};\n\nexport type LoginUserErrors = {\n  /**\n   * Invalid username/password supplied\n   */\n  400: unknown;\n  /**\n   * Unexpected error\n   */\n  default: unknown;\n};\n\nexport type LoginUserResponses = {\n  /**\n   * successful operation\n   */\n  200: string;\n};\n\nexport type LoginUserResponse = LoginUserResponses[keyof LoginUserResponses];\n\nexport type LogoutUserData = {\n  body?: never;\n  path?: never;\n  query?: never;\n  url: '/user/logout';\n};\n\nexport type LogoutUserErrors = {\n  /**\n   * Unexpected error\n   */\n  default: unknown;\n};\n\nexport type LogoutUserResponses = {\n  /**\n   * successful operation\n   */\n  200: unknown;\n};\n\nexport type DeleteUserData = {\n  body?: never;\n  path: {\n    /**\n     * The name that needs to be deleted\n     */\n    username: string;\n  };\n  query?: never;\n  url: '/user/{username}';\n};\n\nexport type DeleteUserErrors = {\n  /**\n   * Invalid username supplied\n   */\n  400: unknown;\n  /**\n   * User not found\n   */\n  404: unknown;\n  /**\n   * Unexpected error\n   */\n  default: unknown;\n};\n\nexport type DeleteUserResponses = {\n  /**\n   * User deleted\n   */\n  200: unknown;\n};\n\nexport type GetUserByNameData = {\n  body?: never;\n  path: {\n    /**\n     * The name that needs to be fetched. Use user1 for testing\n     */\n    username: string;\n  };\n  query?: never;\n  url: '/user/{username}';\n};\n\nexport type GetUserByNameErrors = {\n  /**\n   * Invalid username supplied\n   */\n  400: unknown;\n  /**\n   * User not found\n   */\n  404: unknown;\n  /**\n   * Unexpected error\n   */\n  default: unknown;\n};\n\nexport type GetUserByNameResponses = {\n  /**\n   * successful operation\n   */\n  200: User;\n};\n\nexport type GetUserByNameResponse = GetUserByNameResponses[keyof GetUserByNameResponses];\n\nexport type UpdateUserData = {\n  /**\n   * Update an existent user in the store\n   */\n  body?: User;\n  path: {\n    /**\n     * name that need to be deleted\n     */\n    username: string;\n  };\n  query?: never;\n  url: '/user/{username}';\n};\n\nexport type UpdateUserErrors = {\n  /**\n   * bad request\n   */\n  400: unknown;\n  /**\n   * user not found\n   */\n  404: unknown;\n  /**\n   * Unexpected error\n   */\n  default: unknown;\n};\n\nexport type UpdateUserResponses = {\n  /**\n   * successful operation\n   */\n  200: unknown;\n};\n"
  },
  {
    "path": "examples/openapi-ts-ofetch/src/main.ts",
    "content": "import './assets/main.css';\n\nimport { createApp } from 'vue';\n\nimport App from './App.vue';\nimport { client } from './client/client.gen';\n\n// configure internal service client\nclient.setConfig({\n  // set default base url for requests\n  baseUrl: 'https://petstore3.swagger.io/api/v3',\n  // set default headers for requests\n  headers: {\n    Authorization: 'Bearer <token_from_service_client>',\n  },\n});\n\ncreateApp(App).mount('#app');\n"
  },
  {
    "path": "examples/openapi-ts-ofetch/tailwind.config.ts",
    "content": "import type { Config } from 'tailwindcss';\n\nexport default {\n  content: ['./index.html', './src/**/*.{vue,js,ts,jsx,tsx}'],\n  theme: {\n    extend: {},\n  },\n} satisfies Config;\n"
  },
  {
    "path": "examples/openapi-ts-ofetch/tsconfig.app.json",
    "content": "{\n  \"extends\": \"@vue/tsconfig/tsconfig.dom.json\",\n  \"include\": [\"./env.d.ts\", \"./src/**/*\", \"./src/**/*.vue\"],\n  \"exclude\": [\"./src/**/__tests__/*\"],\n  \"compilerOptions\": {\n    \"composite\": true,\n    \"tsBuildInfoFile\": \"./node_modules/.tmp/tsconfig.app.tsbuildinfo\",\n\n    \"baseUrl\": \".\",\n    \"paths\": {\n      \"@/*\": [\"./src/*\"]\n    }\n  }\n}\n"
  },
  {
    "path": "examples/openapi-ts-ofetch/tsconfig.json",
    "content": "{\n  \"files\": [],\n  \"references\": [\n    {\n      \"path\": \"./tsconfig.node.json\"\n    },\n    {\n      \"path\": \"./tsconfig.app.json\"\n    }\n  ]\n}\n"
  },
  {
    "path": "examples/openapi-ts-ofetch/tsconfig.node.json",
    "content": "{\n  \"extends\": \"@tsconfig/node24/tsconfig.json\",\n  \"include\": [\n    \"vite.config.*\",\n    \"vitest.config.*\",\n    \"cypress.config.*\",\n    \"nightwatch.conf.*\",\n    \"playwright.config.*\"\n  ],\n  \"compilerOptions\": {\n    \"composite\": true,\n    \"noEmit\": true,\n    \"tsBuildInfoFile\": \"./node_modules/.tmp/tsconfig.node.tsbuildinfo\",\n\n    \"module\": \"ESNext\",\n    \"moduleResolution\": \"Bundler\",\n    \"types\": [\"node\"]\n  }\n}\n"
  },
  {
    "path": "examples/openapi-ts-ofetch/vite.config.ts",
    "content": "import { fileURLToPath, URL } from 'node:url';\n\nimport vue from '@vitejs/plugin-vue';\n\n/** @type {import('vite').UserConfig} */\nexport default {\n  build: {\n    sourcemap: true,\n    target: 'esnext',\n  },\n  esbuild: {\n    target: 'esnext',\n  },\n  optimizeDeps: {\n    esbuildOptions: {\n      target: 'esnext',\n    },\n  },\n  plugins: [vue()],\n  resolve: {\n    alias: {\n      '@': fileURLToPath(new URL('./src', import.meta.url)),\n    },\n  },\n  // eslint-disable-next-line @typescript-eslint/consistent-type-imports\n} as import('vite').UserConfig;\n"
  },
  {
    "path": "examples/openapi-ts-openai/.gitignore",
    "content": "# Logs\nlogs\n*.log\nnpm-debug.log*\nyarn-debug.log*\nyarn-error.log*\npnpm-debug.log*\nlerna-debug.log*\n\nnode_modules\ndist\ndist-ssr\n*.local\n\n# Editor directories and files\n.vscode/*\n!.vscode/extensions.json\n.idea\n.DS_Store\n*.suo\n*.ntvs*\n*.njsproj\n*.sln\n*.sw?\n"
  },
  {
    "path": "examples/openapi-ts-openai/index.html",
    "content": "<!doctype html>\n<html lang=\"en\">\n  <head>\n    <meta charset=\"UTF-8\" />\n    <!-- <link rel=\"icon\" type=\"image/svg+xml\" href=\"/vite.svg\" /> -->\n    <meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\" />\n    <title>Hey API + OpenAI Demo</title>\n  </head>\n  <body>\n    <div id=\"root\"></div>\n    <script type=\"module\" src=\"/src/main.tsx\"></script>\n  </body>\n</html>\n"
  },
  {
    "path": "examples/openapi-ts-openai/openapi-ts.config.ts",
    "content": "import path from 'node:path';\n\nimport { defineConfig } from '@hey-api/openapi-ts';\n\nexport default defineConfig({\n  input: path.resolve('..', '..', 'specs', '3.1.x', 'openai.yaml'),\n  logs: {\n    path: './logs',\n  },\n  output: {\n    path: './src/client',\n    postProcess: ['oxfmt'],\n  },\n  plugins: [\n    '@hey-api/client-fetch',\n    {\n      enums: 'javascript',\n      name: '@hey-api/typescript',\n    },\n    {\n      instance: 'OpenAI',\n      name: '@hey-api/sdk',\n    },\n  ],\n});\n"
  },
  {
    "path": "examples/openapi-ts-openai/package.json",
    "content": "{\n  \"name\": \"@example/openapi-ts-openai\",\n  \"version\": \"0.0.0\",\n  \"private\": true,\n  \"type\": \"module\",\n  \"scripts\": {\n    \"build\": \"tsgo --noEmit && vite build\",\n    \"dev\": \"vite\",\n    \"lint\": \"eslint . --report-unused-disable-directives --max-warnings 0\",\n    \"openapi-ts\": \"openapi-ts\",\n    \"preview\": \"vite preview\",\n    \"typecheck\": \"tsgo --noEmit\"\n  },\n  \"dependencies\": {\n    \"@radix-ui/react-form\": \"0.1.1\",\n    \"@radix-ui/react-icons\": \"1.3.2\",\n    \"@radix-ui/themes\": \"3.1.6\",\n    \"openai\": \"5.13.1\",\n    \"react\": \"19.0.0\",\n    \"react-dom\": \"19.0.0\"\n  },\n  \"devDependencies\": {\n    \"@hey-api/openapi-ts\": \"workspace:*\",\n    \"@types/react\": \"19.0.1\",\n    \"@types/react-dom\": \"19.0.1\",\n    \"@typescript-eslint/eslint-plugin\": \"8.29.1\",\n    \"@typescript-eslint/parser\": \"8.29.1\",\n    \"@vitejs/plugin-react\": \"4.4.0-beta.1\",\n    \"autoprefixer\": \"10.4.19\",\n    \"eslint\": \"9.17.0\",\n    \"eslint-plugin-react-hooks\": \"5.2.0\",\n    \"eslint-plugin-react-refresh\": \"0.4.7\",\n    \"oxfmt\": \"0.27.0\",\n    \"postcss\": \"8.4.41\",\n    \"tailwindcss\": \"3.4.9\",\n    \"typescript\": \"5.9.3\",\n    \"vite\": \"7.3.1\"\n  }\n}\n"
  },
  {
    "path": "examples/openapi-ts-openai/postcss.config.js",
    "content": "export default {\n  plugins: {\n    autoprefixer: {},\n    tailwindcss: {},\n  },\n};\n"
  },
  {
    "path": "examples/openapi-ts-openai/src/App.css",
    "content": "@tailwind base;\n@tailwind components;\n@tailwind utilities;\n"
  },
  {
    "path": "examples/openapi-ts-openai/src/App.tsx",
    "content": "import './App.css';\n\nimport * as Form from '@radix-ui/react-form';\nimport { PlusIcon } from '@radix-ui/react-icons';\nimport { Box, Button, Container, Flex, Heading, Section, TextField } from '@radix-ui/themes';\nimport OpenAI from 'openai';\nimport { useState } from 'react';\n\nimport { client as baseClient } from './client/client.gen';\nimport { OpenAi } from './client/sdk.gen';\n\nconst sdk = new OpenAI({\n  apiKey: import.meta.env.VITE_OPENAI_API_KEY,\n  dangerouslyAllowBrowser: true,\n});\n\nbaseClient.setConfig({\n  auth() {\n    return import.meta.env.VITE_OPENAI_API_KEY;\n  },\n});\n\nconst client = new OpenAi({\n  client: baseClient,\n});\n\nfunction App() {\n  const [isRequiredNameError] = useState(false);\n\n  const onCreateResponse = async (values: FormData) => {\n    const stream = await sdk.responses.create({\n      input: values.get('input') as string,\n      model: 'gpt-5-nano',\n      stream: true,\n    });\n\n    for await (const event of stream) {\n      console.log(event);\n    }\n\n    const { data, error } = await client.createResponse({\n      body: {\n        input: values.get('input') as string,\n        model: 'gpt-5-nano',\n        stream: true,\n      },\n    });\n    if (error) {\n      console.log(error);\n      return;\n    }\n    console.log(data?.output);\n  };\n\n  return (\n    <Box style={{ background: 'var(--gray-a2)', borderRadius: 'var(--radius-3)' }}>\n      <Container size=\"1\">\n        <Section size=\"1\" />\n        <Flex align=\"center\">\n          <a className=\"shrink-0\" href=\"https://heyapi.dev/\" target=\"_blank\">\n            <img\n              src=\"https://heyapi.dev/assets/raw/logo.png\"\n              className=\"h-16 w-16 transition duration-300 will-change-auto\"\n              alt=\"Hey API logo\"\n            />\n          </a>\n          <Heading>@hey-api/openapi-ts 🤝 OpenAI</Heading>\n        </Flex>\n        <Section size=\"1\" />\n        <Flex direction=\"column\" gapY=\"2\">\n          <Form.Root\n            className=\"w-[400px]\"\n            onSubmit={(event) => {\n              event.preventDefault();\n              onCreateResponse(new FormData(event.currentTarget));\n            }}\n          >\n            <Form.Field className=\"grid mb-[10px]\" name=\"input\">\n              <div className=\"flex items-baseline justify-between\">\n                <Form.Label className=\"text-[15px] font-medium leading-[35px] text-white\">\n                  Input\n                </Form.Label>\n                {isRequiredNameError && (\n                  <Form.Message className=\"text-[13px] text-white opacity-[0.8]\">\n                    Please enter a name\n                  </Form.Message>\n                )}\n                <Form.Message className=\"text-[13px] text-white opacity-[0.8]\" match=\"valueMissing\">\n                  Please enter an input\n                </Form.Message>\n              </div>\n              <Form.Control asChild>\n                <TextField.Root\n                  placeholder=\"Write a one-sentence bedtime story about a unicorn.\"\n                  name=\"input\"\n                  type=\"text\"\n                  required\n                />\n              </Form.Control>\n            </Form.Field>\n            <Flex gapX=\"2\">\n              <Form.Submit asChild>\n                <Button type=\"submit\">\n                  <PlusIcon /> Create Response\n                </Button>\n              </Form.Submit>\n              {/* <Button onClick={onUpdatePet} type=\"button\">\n                <ReloadIcon /> Update Pet\n              </Button> */}\n            </Flex>\n          </Form.Root>\n        </Flex>\n        <Section size=\"1\" />\n      </Container>\n    </Box>\n  );\n}\n\nexport default App;\n"
  },
  {
    "path": "examples/openapi-ts-openai/src/client/client/client.gen.ts",
    "content": "// 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 (options: RequestOptions) => {\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 url = buildUrl(opts);\n\n    return { opts, url };\n  };\n\n  const request: Client['request'] = async (options) => {\n    // @ts-expect-error\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"
  },
  {
    "path": "examples/openapi-ts-openai/src/client/client/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type { Auth } from '../core/auth.gen';\nexport type { QuerySerializerOptions } from '../core/bodySerializer.gen';\nexport {\n  formDataBodySerializer,\n  jsonBodySerializer,\n  urlSearchParamsBodySerializer,\n} from '../core/bodySerializer.gen';\nexport { buildClientParams } from '../core/params.gen';\nexport { serializeQueryKeyValue } from '../core/queryKeySerializer.gen';\nexport { createClient } from './client.gen';\nexport type {\n  Client,\n  ClientOptions,\n  Config,\n  CreateClientConfig,\n  Options,\n  RequestOptions,\n  RequestResult,\n  ResolvedRequestOptions,\n  ResponseStyle,\n  TDataShape,\n} from './types.gen';\nexport { createConfig, mergeHeaders } from './utils.gen';\n"
  },
  {
    "path": "examples/openapi-ts-openai/src/client/client/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { Auth } from '../core/auth.gen';\nimport type {\n  ServerSentEventsOptions,\n  ServerSentEventsResult,\n} from '../core/serverSentEvents.gen';\nimport type { Client as CoreClient, Config as CoreConfig } from '../core/types.gen';\nimport type { Middleware } from './utils.gen';\n\nexport type ResponseStyle = 'data' | 'fields';\n\nexport interface Config<T extends ClientOptions = ClientOptions>\n  extends Omit<RequestInit, 'body' | 'headers' | 'method'>, CoreConfig {\n  /**\n   * Base URL for all requests made by this client.\n   */\n  baseUrl?: T['baseUrl'];\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   * Please don't use the Fetch client for Next.js applications. The `next`\n   * options won't have any effect.\n   *\n   * Install {@link https://www.npmjs.com/package/@hey-api/client-next `@hey-api/client-next`} instead.\n   */\n  next?: never;\n  /**\n   * Return the response data parsed in a specified format. By default, `auto`\n   * will infer the appropriate method from the `Content-Type` response header.\n   * You can override this behavior with any of the {@link Body} methods.\n   * Select `stream` if you don't want to parse response data at all.\n   *\n   * @default 'auto'\n   */\n  parseAs?: 'arrayBuffer' | 'auto' | 'blob' | 'formData' | 'json' | 'stream' | 'text';\n  /**\n   * Should we return only data or multiple fields (data, error, response, etc.)?\n   *\n   * @default 'fields'\n   */\n  responseStyle?: ResponseStyle;\n  /**\n   * Throw an error instead of returning it in the response?\n   *\n   * @default false\n   */\n  throwOnError?: T['throwOnError'];\n}\n\nexport interface RequestOptions<\n  TData = unknown,\n  TResponseStyle extends ResponseStyle = 'fields',\n  ThrowOnError extends boolean = boolean,\n  Url extends string = string,\n>\n  extends\n    Config<{\n      responseStyle: TResponseStyle;\n      throwOnError: ThrowOnError;\n    }>,\n    Pick<\n      ServerSentEventsOptions<TData>,\n      | 'onRequest'\n      | 'onSseError'\n      | 'onSseEvent'\n      | 'sseDefaultRetryDelay'\n      | 'sseMaxRetryAttempts'\n      | 'sseMaxRetryDelay'\n    > {\n  /**\n   * Any body that you want to add to your request.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/fetch#body}\n   */\n  body?: unknown;\n  path?: Record<string, unknown>;\n  query?: Record<string, unknown>;\n  /**\n   * Security mechanism(s) to use for the request.\n   */\n  security?: ReadonlyArray<Auth>;\n  url: Url;\n}\n\nexport interface ResolvedRequestOptions<\n  TResponseStyle extends ResponseStyle = 'fields',\n  ThrowOnError extends boolean = boolean,\n  Url extends string = string,\n> extends RequestOptions<unknown, TResponseStyle, ThrowOnError, Url> {\n  serializedBody?: string;\n}\n\nexport type RequestResult<\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = boolean,\n  TResponseStyle extends ResponseStyle = 'fields',\n> = ThrowOnError extends true\n  ? Promise<\n      TResponseStyle extends 'data'\n        ? TData extends Record<string, unknown>\n          ? TData[keyof TData]\n          : TData\n        : {\n            data: TData extends Record<string, unknown> ? TData[keyof TData] : TData;\n            request: Request;\n            response: Response;\n          }\n    >\n  : Promise<\n      TResponseStyle extends 'data'\n        ? (TData extends Record<string, unknown> ? TData[keyof TData] : TData) | undefined\n        : (\n            | {\n                data: TData extends Record<string, unknown> ? TData[keyof TData] : TData;\n                error: undefined;\n              }\n            | {\n                data: undefined;\n                error: TError extends Record<string, unknown> ? TError[keyof TError] : TError;\n              }\n          ) & {\n            request: Request;\n            response: Response;\n          }\n    >;\n\nexport interface ClientOptions {\n  baseUrl?: string;\n  responseStyle?: ResponseStyle;\n  throwOnError?: boolean;\n}\n\ntype MethodFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'>,\n) => RequestResult<TData, TError, ThrowOnError, TResponseStyle>;\n\ntype SseFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'>,\n) => Promise<ServerSentEventsResult<TData, TError>>;\n\ntype RequestFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'> &\n    Pick<Required<RequestOptions<TData, TResponseStyle, ThrowOnError>>, 'method'>,\n) => RequestResult<TData, TError, ThrowOnError, TResponseStyle>;\n\ntype BuildUrlFn = <\n  TData extends {\n    body?: unknown;\n    path?: Record<string, unknown>;\n    query?: Record<string, unknown>;\n    url: string;\n  },\n>(\n  options: TData & Options<TData>,\n) => string;\n\nexport type Client = CoreClient<RequestFn, Config, MethodFn, BuildUrlFn, SseFn> & {\n  interceptors: Middleware<Request, Response, unknown, ResolvedRequestOptions>;\n};\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 = ClientOptions> = (\n  override?: Config<ClientOptions & T>,\n) => Config<Required<ClientOptions> & T>;\n\nexport interface TDataShape {\n  body?: unknown;\n  headers?: unknown;\n  path?: unknown;\n  query?: unknown;\n  url: string;\n}\n\ntype OmitKeys<T, K> = Pick<T, Exclude<keyof T, K>>;\n\nexport type Options<\n  TData extends TDataShape = TDataShape,\n  ThrowOnError extends boolean = boolean,\n  TResponse = unknown,\n  TResponseStyle extends ResponseStyle = 'fields',\n> = OmitKeys<\n  RequestOptions<TResponse, TResponseStyle, ThrowOnError>,\n  'body' | 'path' | 'query' | 'url'\n> &\n  ([TData] extends [never] ? unknown : Omit<TData, 'url'>);\n"
  },
  {
    "path": "examples/openapi-ts-openai/src/client/client/utils.gen.ts",
    "content": "// 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"
  },
  {
    "path": "examples/openapi-ts-openai/src/client/client.gen.ts",
    "content": "// 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://api.openai.com/v1' }));\n"
  },
  {
    "path": "examples/openapi-ts-openai/src/client/core/auth.gen.ts",
    "content": "// 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"
  },
  {
    "path": "examples/openapi-ts-openai/src/client/core/bodySerializer.gen.ts",
    "content": "// 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"
  },
  {
    "path": "examples/openapi-ts-openai/src/client/core/params.gen.ts",
    "content": "// 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"
  },
  {
    "path": "examples/openapi-ts-openai/src/client/core/pathSerializer.gen.ts",
    "content": "// 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"
  },
  {
    "path": "examples/openapi-ts-openai/src/client/core/queryKeySerializer.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\n/**\n * JSON-friendly union that mirrors what Pinia Colada can hash.\n */\nexport type JsonValue =\n  | null\n  | string\n  | number\n  | boolean\n  | JsonValue[]\n  | { [key: string]: JsonValue };\n\n/**\n * Replacer that converts non-JSON values (bigint, Date, etc.) to safe substitutes.\n */\nexport const queryKeyJsonReplacer = (_key: string, value: unknown) => {\n  if (value === undefined || typeof value === 'function' || typeof value === 'symbol') {\n    return undefined;\n  }\n  if (typeof value === 'bigint') {\n    return value.toString();\n  }\n  if (value instanceof Date) {\n    return value.toISOString();\n  }\n  return value;\n};\n\n/**\n * Safely stringifies a value and parses it back into a JsonValue.\n */\nexport const stringifyToJsonValue = (input: unknown): JsonValue | undefined => {\n  try {\n    const json = JSON.stringify(input, queryKeyJsonReplacer);\n    if (json === undefined) {\n      return undefined;\n    }\n    return JSON.parse(json) as JsonValue;\n  } catch {\n    return undefined;\n  }\n};\n\n/**\n * Detects plain objects (including objects with a null prototype).\n */\nconst isPlainObject = (value: unknown): value is Record<string, unknown> => {\n  if (value === null || typeof value !== 'object') {\n    return false;\n  }\n  const prototype = Object.getPrototypeOf(value as object);\n  return prototype === Object.prototype || prototype === null;\n};\n\n/**\n * Turns URLSearchParams into a sorted JSON object for deterministic keys.\n */\nconst serializeSearchParams = (params: URLSearchParams): JsonValue => {\n  const entries = Array.from(params.entries()).sort(([a], [b]) => a.localeCompare(b));\n  const result: Record<string, JsonValue> = {};\n\n  for (const [key, value] of entries) {\n    const existing = result[key];\n    if (existing === undefined) {\n      result[key] = value;\n      continue;\n    }\n\n    if (Array.isArray(existing)) {\n      (existing as string[]).push(value);\n    } else {\n      result[key] = [existing, value];\n    }\n  }\n\n  return result;\n};\n\n/**\n * Normalizes any accepted value into a JSON-friendly shape for query keys.\n */\nexport const serializeQueryKeyValue = (value: unknown): JsonValue | undefined => {\n  if (value === null) {\n    return null;\n  }\n\n  if (typeof value === 'string' || typeof value === 'number' || typeof value === 'boolean') {\n    return value;\n  }\n\n  if (value === undefined || typeof value === 'function' || typeof value === 'symbol') {\n    return undefined;\n  }\n\n  if (typeof value === 'bigint') {\n    return value.toString();\n  }\n\n  if (value instanceof Date) {\n    return value.toISOString();\n  }\n\n  if (Array.isArray(value)) {\n    return stringifyToJsonValue(value);\n  }\n\n  if (typeof URLSearchParams !== 'undefined' && value instanceof URLSearchParams) {\n    return serializeSearchParams(value);\n  }\n\n  if (isPlainObject(value)) {\n    return stringifyToJsonValue(value);\n  }\n\n  return undefined;\n};\n"
  },
  {
    "path": "examples/openapi-ts-openai/src/client/core/serverSentEvents.gen.ts",
    "content": "// 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 const 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            // Normalize line endings: CRLF -> LF, then CR -> LF\n            buffer = buffer.replace(/\\r\\n/g, '\\n').replace(/\\r/g, '\\n');\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"
  },
  {
    "path": "examples/openapi-ts-openai/src/client/core/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { Auth, AuthToken } from './auth.gen';\nimport type { BodySerializer, QuerySerializer, QuerySerializerOptions } from './bodySerializer.gen';\n\nexport type HttpMethod =\n  | 'connect'\n  | 'delete'\n  | 'get'\n  | 'head'\n  | 'options'\n  | 'patch'\n  | 'post'\n  | 'put'\n  | 'trace';\n\nexport type Client<\n  RequestFn = never,\n  Config = unknown,\n  MethodFn = never,\n  BuildUrlFn = never,\n  SseFn = never,\n> = {\n  /**\n   * Returns the final request URL.\n   */\n  buildUrl: BuildUrlFn;\n  getConfig: () => Config;\n  request: RequestFn;\n  setConfig: (config: Config) => Config;\n} & {\n  [K in HttpMethod]: MethodFn;\n} & ([SseFn] extends [never] ? { sse?: never } : { sse: { [K in HttpMethod]: SseFn } });\n\nexport interface Config {\n  /**\n   * Auth token or a function returning auth token. The resolved value will be\n   * added to the request payload as defined by its `security` array.\n   */\n  auth?: ((auth: Auth) => Promise<AuthToken> | AuthToken) | AuthToken;\n  /**\n   * A function for serializing request body parameter. By default,\n   * {@link JSON.stringify()} will be used.\n   */\n  bodySerializer?: BodySerializer | null;\n  /**\n   * An object containing any HTTP headers that you want to pre-populate your\n   * `Headers` object with.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/Headers/Headers#init See more}\n   */\n  headers?:\n    | RequestInit['headers']\n    | Record<\n        string,\n        string | number | boolean | (string | number | boolean)[] | null | undefined | unknown\n      >;\n  /**\n   * The request method.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/fetch#method See more}\n   */\n  method?: Uppercase<HttpMethod>;\n  /**\n   * A function for serializing request query parameters. By default, arrays\n   * will be exploded in form style, objects will be exploded in deepObject\n   * style, and reserved characters are percent-encoded.\n   *\n   * This method will have no effect if the native `paramsSerializer()` Axios\n   * API function is used.\n   *\n   * {@link https://swagger.io/docs/specification/serialization/#query View examples}\n   */\n  querySerializer?: QuerySerializer | QuerySerializerOptions;\n  /**\n   * A function validating request data. This is useful if you want to ensure\n   * the request conforms to the desired shape, so it can be safely sent to\n   * the server.\n   */\n  requestValidator?: (data: unknown) => Promise<unknown>;\n  /**\n   * A function transforming response data before it's returned. This is useful\n   * for post-processing data, e.g. converting ISO strings into Date objects.\n   */\n  responseTransformer?: (data: unknown) => Promise<unknown>;\n  /**\n   * A function validating response data. This is useful if you want to ensure\n   * the response conforms to the desired shape, so it can be safely passed to\n   * the transformers and returned to the user.\n   */\n  responseValidator?: (data: unknown) => Promise<unknown>;\n}\n\ntype IsExactlyNeverOrNeverUndefined<T> = [T] extends [never]\n  ? true\n  : [T] extends [never | undefined]\n    ? [undefined] extends [T]\n      ? false\n      : true\n    : false;\n\nexport type OmitNever<T extends Record<string, unknown>> = {\n  [K in keyof T as IsExactlyNeverOrNeverUndefined<T[K]> extends true ? never : K]: T[K];\n};\n"
  },
  {
    "path": "examples/openapi-ts-openai/src/client/core/utils.gen.ts",
    "content": "// 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"
  },
  {
    "path": "examples/openapi-ts-openai/src/client/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport { OpenAi, type Options } from './sdk.gen';\nexport { type ActivateOrganizationCertificatesData, type ActivateOrganizationCertificatesResponse, type ActivateOrganizationCertificatesResponses, type ActivateProjectCertificatesData, type ActivateProjectCertificatesResponse, type ActivateProjectCertificatesResponses, type AddUploadPartData, type AddUploadPartRequest, type AddUploadPartResponse, type AddUploadPartResponses, type AdminApiKey, type AdminApiKeysCreateData, type AdminApiKeysCreateResponse, type AdminApiKeysCreateResponses, type AdminApiKeysDeleteData, type AdminApiKeysDeleteResponse, type AdminApiKeysDeleteResponses, type AdminApiKeysGetData, type AdminApiKeysGetResponse, type AdminApiKeysGetResponses, type AdminApiKeysListData, type AdminApiKeysListResponse, type AdminApiKeysListResponses, type Annotation, type ApiKeyList, type ApproximateLocation, type ArchiveProjectData, type ArchiveProjectResponse, type ArchiveProjectResponses, type AssistantObject, type AssistantsApiResponseFormatOption, type AssistantsApiToolChoiceOption, type AssistantsNamedToolChoice, type AssistantStreamEvent, AssistantSupportedModels, type AssistantTool, type AssistantToolsCode, type AssistantToolsFileSearch, type AssistantToolsFileSearchTypeOnly, type AssistantToolsFunction, AudioResponseFormat, type AuditLog, type AuditLogActor, type AuditLogActorApiKey, type AuditLogActorServiceAccount, type AuditLogActorSession, type AuditLogActorUser, AuditLogEventType, type AutoChunkingStrategyRequestParam, type Batch, type BatchError, type BatchFileExpirationAfter, type BatchRequestCounts, type BatchRequestInput, type BatchRequestOutput, type CancelBatchData, type CancelBatchResponse, type CancelBatchResponses, type CancelEvalRunData, type CancelEvalRunResponse, type CancelEvalRunResponses, type CancelFineTuningJobData, type CancelFineTuningJobResponse, type CancelFineTuningJobResponses, type CancelResponseData, type CancelResponseError, type CancelResponseErrors, type CancelResponseResponse, type CancelResponseResponses, type CancelRunData, type CancelRunResponse, type CancelRunResponses, type CancelUploadData, type CancelUploadResponse, type CancelUploadResponses, type CancelVectorStoreFileBatchData, type CancelVectorStoreFileBatchResponse, type CancelVectorStoreFileBatchResponses, type Certificate, type ChatCompletionAllowedTools, type ChatCompletionAllowedToolsChoice, type ChatCompletionDeleted, type ChatCompletionFunctionCallOption, type ChatCompletionFunctions, type ChatCompletionList, type ChatCompletionMessageCustomToolCall, type ChatCompletionMessageList, type ChatCompletionMessageToolCall, type ChatCompletionMessageToolCallChunk, type ChatCompletionMessageToolCalls, type ChatCompletionModalities, type ChatCompletionNamedToolChoice, type ChatCompletionNamedToolChoiceCustom, type ChatCompletionRequestAssistantMessage, type ChatCompletionRequestAssistantMessageContentPart, type ChatCompletionRequestDeveloperMessage, type ChatCompletionRequestFunctionMessage, type ChatCompletionRequestMessage, type ChatCompletionRequestMessageContentPartAudio, type ChatCompletionRequestMessageContentPartFile, type ChatCompletionRequestMessageContentPartImage, type ChatCompletionRequestMessageContentPartRefusal, type ChatCompletionRequestMessageContentPartText, type ChatCompletionRequestSystemMessage, type ChatCompletionRequestSystemMessageContentPart, type ChatCompletionRequestToolMessage, type ChatCompletionRequestToolMessageContentPart, type ChatCompletionRequestUserMessage, type ChatCompletionRequestUserMessageContentPart, type ChatCompletionResponseMessage, ChatCompletionRole, type ChatCompletionStreamOptions, type ChatCompletionStreamResponseDelta, type ChatCompletionTokenLogprob, type ChatCompletionTool, type ChatCompletionToolChoiceOption, ChatModel, type ChunkingStrategyRequestParam, type ChunkingStrategyResponse, type Click, type ClientOptions, type CodeInterpreterFileOutput, type CodeInterpreterOutputImage, type CodeInterpreterOutputLogs, type CodeInterpreterTextOutput, type CodeInterpreterTool, type CodeInterpreterToolAuto, type CodeInterpreterToolCall, type ComparisonFilter, type CompleteUploadData, type CompleteUploadRequest, type CompleteUploadResponse, type CompleteUploadResponses, type CompletionUsage, type CompoundFilter, type ComputerAction, type ComputerCallOutputItemParam, type ComputerCallSafetyCheckParam, type ComputerScreenshotImage, type ComputerToolCall, type ComputerToolCallOutput, type ComputerToolCallOutputResource, type ComputerToolCallSafetyCheck, type ComputerUsePreviewTool, type ContainerFileCitationBody, type ContainerFileListResource, type ContainerFileResource, type ContainerListResource, type ContainerResource, type Content, type Coordinate, type CostsResult, type CreateAssistantData, type CreateAssistantRequest, type CreateAssistantResponse, type CreateAssistantResponses, type CreateBatchData, type CreateBatchResponse, type CreateBatchResponses, type CreateChatCompletionData, type CreateChatCompletionRequest, type CreateChatCompletionResponse, type CreateChatCompletionResponse2, type CreateChatCompletionResponses, type CreateChatCompletionStreamResponse, type CreateCompletionData, type CreateCompletionRequest, type CreateCompletionResponse, type CreateCompletionResponse2, type CreateCompletionResponses, type CreateContainerBody, type CreateContainerData, type CreateContainerFileBody, type CreateContainerFileData, type CreateContainerFileResponse, type CreateContainerFileResponses, type CreateContainerResponse, type CreateContainerResponses, type CreateEmbeddingData, type CreateEmbeddingRequest, type CreateEmbeddingResponse, type CreateEmbeddingResponse2, type CreateEmbeddingResponses, type CreateEvalCompletionsRunDataSource, type CreateEvalCustomDataSourceConfig, type CreateEvalData, type CreateEvalItem, type CreateEvalJsonlRunDataSource, type CreateEvalLabelModelGrader, type CreateEvalLogsDataSourceConfig, type CreateEvalRequest, type CreateEvalResponse, type CreateEvalResponses, type CreateEvalResponsesRunDataSource, type CreateEvalRunData, type CreateEvalRunError, type CreateEvalRunErrors, type CreateEvalRunRequest, type CreateEvalRunResponse, type CreateEvalRunResponses, type CreateEvalStoredCompletionsDataSourceConfig, type CreateFileData, type CreateFileRequest, type CreateFileResponse, type CreateFileResponses, type CreateFineTuningCheckpointPermissionData, type CreateFineTuningCheckpointPermissionRequest, type CreateFineTuningCheckpointPermissionResponse, type CreateFineTuningCheckpointPermissionResponses, type CreateFineTuningJobData, type CreateFineTuningJobRequest, type CreateFineTuningJobResponse, type CreateFineTuningJobResponses, type CreateImageData, type CreateImageEditData, type CreateImageEditRequest, type CreateImageEditResponse, type CreateImageEditResponses, type CreateImageRequest, type CreateImageResponse, type CreateImageResponses, type CreateImageVariationData, type CreateImageVariationRequest, type CreateImageVariationResponse, type CreateImageVariationResponses, type CreateMessageData, type CreateMessageRequest, type CreateMessageResponse, type CreateMessageResponses, type CreateModelResponseProperties, type CreateModerationData, type CreateModerationRequest, type CreateModerationResponse, type CreateModerationResponse2, type CreateModerationResponses, type CreateProjectData, type CreateProjectResponse, type CreateProjectResponses, type CreateProjectServiceAccountData, type CreateProjectServiceAccountError, type CreateProjectServiceAccountErrors, type CreateProjectServiceAccountResponse, type CreateProjectServiceAccountResponses, type CreateProjectUserData, type CreateProjectUserError, type CreateProjectUserErrors, type CreateProjectUserResponse, type CreateProjectUserResponses, type CreateRealtimeSessionData, type CreateRealtimeSessionResponse, type CreateRealtimeSessionResponses, type CreateRealtimeTranscriptionSessionData, type CreateRealtimeTranscriptionSessionResponse, type CreateRealtimeTranscriptionSessionResponses, type CreateResponse, type CreateResponseData, type CreateResponseResponse, type CreateResponseResponses, type CreateRunData, type CreateRunRequest, type CreateRunRequestWithoutStream, type CreateRunResponse, type CreateRunResponses, type CreateSpeechData, type CreateSpeechRequest, type CreateSpeechResponse, type CreateSpeechResponses, type CreateSpeechResponseStreamEvent, type CreateThreadAndRunData, type CreateThreadAndRunRequest, type CreateThreadAndRunRequestWithoutStream, type CreateThreadAndRunResponse, type CreateThreadAndRunResponses, type CreateThreadData, type CreateThreadRequest, type CreateThreadResponse, type CreateThreadResponses, type CreateTranscriptionData, type CreateTranscriptionRequest, type CreateTranscriptionResponse, type CreateTranscriptionResponseJson, type CreateTranscriptionResponses, type CreateTranscriptionResponseStreamEvent, type CreateTranscriptionResponseVerboseJson, type CreateTranslationData, type CreateTranslationRequest, type CreateTranslationResponse, type CreateTranslationResponseJson, type CreateTranslationResponses, type CreateTranslationResponseVerboseJson, type CreateUploadData, type CreateUploadRequest, type CreateUploadResponse, type CreateUploadResponses, type CreateVectorStoreData, type CreateVectorStoreFileBatchData, type CreateVectorStoreFileBatchRequest, type CreateVectorStoreFileBatchResponse, type CreateVectorStoreFileBatchResponses, type CreateVectorStoreFileData, type CreateVectorStoreFileRequest, type CreateVectorStoreFileResponse, type CreateVectorStoreFileResponses, type CreateVectorStoreRequest, type CreateVectorStoreResponse, type CreateVectorStoreResponses, type CustomTool, type CustomToolCall, type CustomToolCallOutput, type CustomToolChatCompletions, type DeactivateOrganizationCertificatesData, type DeactivateOrganizationCertificatesResponse, type DeactivateOrganizationCertificatesResponses, type DeactivateProjectCertificatesData, type DeactivateProjectCertificatesResponse, type DeactivateProjectCertificatesResponses, type DeleteAssistantData, type DeleteAssistantResponse, type DeleteAssistantResponse2, type DeleteAssistantResponses, type DeleteCertificateData, type DeleteCertificateResponse, type DeleteCertificateResponse2, type DeleteCertificateResponses, type DeleteChatCompletionData, type DeleteChatCompletionResponse, type DeleteChatCompletionResponses, type DeleteContainerData, type DeleteContainerFileData, type DeleteContainerFileResponses, type DeleteContainerResponses, type DeleteEvalData, type DeleteEvalError, type DeleteEvalErrors, type DeleteEvalResponse, type DeleteEvalResponses, type DeleteEvalRunData, type DeleteEvalRunError, type DeleteEvalRunErrors, type DeleteEvalRunResponse, type DeleteEvalRunResponses, type DeleteFileData, type DeleteFileResponse, type DeleteFileResponse2, type DeleteFileResponses, type DeleteFineTuningCheckpointPermissionData, type DeleteFineTuningCheckpointPermissionResponse, type DeleteFineTuningCheckpointPermissionResponse2, type DeleteFineTuningCheckpointPermissionResponses, type DeleteInviteData, type DeleteInviteResponse, type DeleteInviteResponses, type DeleteMessageData, type DeleteMessageResponse, type DeleteMessageResponse2, type DeleteMessageResponses, type DeleteModelData, type DeleteModelResponse, type DeleteModelResponse2, type DeleteModelResponses, type DeleteProjectApiKeyData, type DeleteProjectApiKeyError, type DeleteProjectApiKeyErrors, type DeleteProjectApiKeyResponse, type DeleteProjectApiKeyResponses, type DeleteProjectServiceAccountData, type DeleteProjectServiceAccountResponse, type DeleteProjectServiceAccountResponses, type DeleteProjectUserData, type DeleteProjectUserError, type DeleteProjectUserErrors, type DeleteProjectUserResponse, type DeleteProjectUserResponses, type DeleteResponseData, type DeleteResponseError, type DeleteResponseErrors, type DeleteResponseResponses, type DeleteThreadData, type DeleteThreadResponse, type DeleteThreadResponse2, type DeleteThreadResponses, type DeleteUserData, type DeleteUserResponse, type DeleteUserResponses, type DeleteVectorStoreData, type DeleteVectorStoreFileData, type DeleteVectorStoreFileResponse, type DeleteVectorStoreFileResponse2, type DeleteVectorStoreFileResponses, type DeleteVectorStoreResponse, type DeleteVectorStoreResponse2, type DeleteVectorStoreResponses, type DoneEvent, type DoubleClick, type DownloadFileData, type DownloadFileResponse, type DownloadFileResponses, type Drag, type EasyInputMessage, type Embedding, type Error, type ErrorEvent, type ErrorResponse, type Eval, type EvalApiError, type EvalCustomDataSourceConfig, type EvalGraderLabelModel, type EvalGraderPython, type EvalGraderScoreModel, type EvalGraderStringCheck, type EvalGraderTextSimilarity, type EvalItem, type EvalJsonlFileContentSource, type EvalJsonlFileIdSource, type EvalList, type EvalLogsDataSourceConfig, type EvalResponsesSource, type EvalRun, type EvalRunList, type EvalRunOutputItem, type EvalRunOutputItemList, type EvalStoredCompletionsDataSourceConfig, type EvalStoredCompletionsSource, type FileCitationBody, type FileExpirationAfter, type FilePath, FilePurpose, FileSearchRanker, type FileSearchRankingOptions, type FileSearchTool, type FileSearchToolCall, type Filters, type FineTuneChatCompletionRequestAssistantMessage, type FineTuneChatRequestInput, type FineTuneDpoHyperparameters, type FineTuneDpoMethod, type FineTuneMethod, type FineTunePreferenceRequestInput, type FineTuneReinforcementHyperparameters, type FineTuneReinforcementMethod, type FineTuneReinforcementRequestInput, type FineTuneSupervisedHyperparameters, type FineTuneSupervisedMethod, type FineTuningCheckpointPermission, type FineTuningIntegration, type FineTuningJob, type FineTuningJobCheckpoint, type FineTuningJobEvent, type FunctionCallOutputItemParam, type FunctionObject, type FunctionParameters, type FunctionTool, type FunctionToolCall, type FunctionToolCallOutput, type FunctionToolCallOutputResource, type FunctionToolCallResource, type GetAssistantData, type GetAssistantResponse, type GetAssistantResponses, type GetCertificateData, type GetCertificateResponse, type GetCertificateResponses, type GetChatCompletionData, type GetChatCompletionMessagesData, type GetChatCompletionMessagesResponse, type GetChatCompletionMessagesResponses, type GetChatCompletionResponse, type GetChatCompletionResponses, type GetEvalData, type GetEvalResponse, type GetEvalResponses, type GetEvalRunData, type GetEvalRunOutputItemData, type GetEvalRunOutputItemResponse, type GetEvalRunOutputItemResponses, type GetEvalRunOutputItemsData, type GetEvalRunOutputItemsResponse, type GetEvalRunOutputItemsResponses, type GetEvalRunResponse, type GetEvalRunResponses, type GetEvalRunsData, type GetEvalRunsResponse, type GetEvalRunsResponses, type GetMessageData, type GetMessageResponse, type GetMessageResponses, type GetResponseData, type GetResponseResponse, type GetResponseResponses, type GetRunData, type GetRunResponse, type GetRunResponses, type GetRunStepData, type GetRunStepResponse, type GetRunStepResponses, type GetThreadData, type GetThreadResponse, type GetThreadResponses, type GetVectorStoreData, type GetVectorStoreFileBatchData, type GetVectorStoreFileBatchResponse, type GetVectorStoreFileBatchResponses, type GetVectorStoreFileData, type GetVectorStoreFileResponse, type GetVectorStoreFileResponses, type GetVectorStoreResponse, type GetVectorStoreResponses, type GraderLabelModel, type GraderMulti, type GraderPython, type GraderScoreModel, type GraderStringCheck, type GraderTextSimilarity, type Image, type ImageEditCompletedEvent, type ImageEditPartialImageEvent, type ImageEditStreamEvent, type ImageGenCompletedEvent, type ImageGenInputUsageDetails, type ImageGenPartialImageEvent, type ImageGenStreamEvent, type ImageGenTool, type ImageGenToolCall, type ImageGenUsage, ImageInputFidelity, type ImagesResponse, type ImagesUsage, Includable, type InputAudio, type InputContent, type InputFileContent, type InputImageContent, type InputItem, type InputMessage, type InputMessageContentList, type InputMessageResource, type InputTextContent, type Invite, type InviteDeleteResponse, type InviteListResponse, type InviteRequest, type InviteUserData, type InviteUserResponse, type InviteUserResponses, type Item, type ItemReferenceParam, type ItemResource, type KeyPress, type ListAssistantsData, type ListAssistantsResponse, type ListAssistantsResponse2, type ListAssistantsResponses, type ListAuditLogsData, type ListAuditLogsResponse, type ListAuditLogsResponse2, type ListAuditLogsResponses, type ListBatchesData, type ListBatchesResponse, type ListBatchesResponse2, type ListBatchesResponses, type ListCertificatesResponse, type ListChatCompletionsData, type ListChatCompletionsResponse, type ListChatCompletionsResponses, type ListContainerFilesData, type ListContainerFilesResponse, type ListContainerFilesResponses, type ListContainersData, type ListContainersResponse, type ListContainersResponses, type ListEvalsData, type ListEvalsResponse, type ListEvalsResponses, type ListFilesData, type ListFilesInVectorStoreBatchData, type ListFilesInVectorStoreBatchResponse, type ListFilesInVectorStoreBatchResponses, type ListFilesResponse, type ListFilesResponse2, type ListFilesResponses, type ListFineTuningCheckpointPermissionResponse, type ListFineTuningCheckpointPermissionsData, type ListFineTuningCheckpointPermissionsResponse, type ListFineTuningCheckpointPermissionsResponses, type ListFineTuningEventsData, type ListFineTuningEventsResponse, type ListFineTuningEventsResponses, type ListFineTuningJobCheckpointsData, type ListFineTuningJobCheckpointsResponse, type ListFineTuningJobCheckpointsResponse2, type ListFineTuningJobCheckpointsResponses, type ListFineTuningJobEventsResponse, type ListInputItemsData, type ListInputItemsResponse, type ListInputItemsResponses, type ListInvitesData, type ListInvitesResponse, type ListInvitesResponses, type ListMessagesData, type ListMessagesResponse, type ListMessagesResponse2, type ListMessagesResponses, type ListModelsData, type ListModelsResponse, type ListModelsResponse2, type ListModelsResponses, type ListOrganizationCertificatesData, type ListOrganizationCertificatesResponse, type ListOrganizationCertificatesResponses, type ListPaginatedFineTuningJobsData, type ListPaginatedFineTuningJobsResponse, type ListPaginatedFineTuningJobsResponse2, type ListPaginatedFineTuningJobsResponses, type ListProjectApiKeysData, type ListProjectApiKeysResponse, type ListProjectApiKeysResponses, type ListProjectCertificatesData, type ListProjectCertificatesResponse, type ListProjectCertificatesResponses, type ListProjectRateLimitsData, type ListProjectRateLimitsResponse, type ListProjectRateLimitsResponses, type ListProjectsData, type ListProjectServiceAccountsData, type ListProjectServiceAccountsError, type ListProjectServiceAccountsErrors, type ListProjectServiceAccountsResponse, type ListProjectServiceAccountsResponses, type ListProjectsResponse, type ListProjectsResponses, type ListProjectUsersData, type ListProjectUsersError, type ListProjectUsersErrors, type ListProjectUsersResponse, type ListProjectUsersResponses, type ListRunsData, type ListRunsResponse, type ListRunsResponse2, type ListRunsResponses, type ListRunStepsData, type ListRunStepsResponse, type ListRunStepsResponse2, type ListRunStepsResponses, type ListUsersData, type ListUsersResponse, type ListUsersResponses, type ListVectorStoreFilesData, type ListVectorStoreFilesResponse, type ListVectorStoreFilesResponse2, type ListVectorStoreFilesResponses, type ListVectorStoresData, type ListVectorStoresResponse, type ListVectorStoresResponse2, type ListVectorStoresResponses, type LocalShellExecAction, type LocalShellTool, type LocalShellToolCall, type LocalShellToolCallOutput, type LogProb, type LogProbProperties, type McpApprovalRequest, type McpApprovalResponse, type McpApprovalResponseResource, type McpListTools, type McpListToolsTool, type McpTool, type McpToolCall, type MessageContent, type MessageContentDelta, type MessageContentImageFileObject, type MessageContentImageUrlObject, type MessageContentRefusalObject, type MessageContentTextAnnotationsFileCitationObject, type MessageContentTextAnnotationsFilePathObject, type MessageContentTextObject, type MessageDeltaContentImageFileObject, type MessageDeltaContentImageUrlObject, type MessageDeltaContentRefusalObject, type MessageDeltaContentTextAnnotationsFileCitationObject, type MessageDeltaContentTextAnnotationsFilePathObject, type MessageDeltaContentTextObject, type MessageDeltaObject, type MessageObject, type MessageRequestContentTextObject, type MessageStreamEvent, type Metadata, type Model, type ModelIds, type ModelIdsResponses, type ModelIdsShared, type ModelResponseProperties, type ModerationImageUrlInput, type ModerationTextInput, type ModifyAssistantData, type ModifyAssistantRequest, type ModifyAssistantResponse, type ModifyAssistantResponses, type ModifyCertificateData, type ModifyCertificateRequest, type ModifyCertificateResponse, type ModifyCertificateResponses, type ModifyMessageData, type ModifyMessageRequest, type ModifyMessageResponse, type ModifyMessageResponses, type ModifyProjectData, type ModifyProjectError, type ModifyProjectErrors, type ModifyProjectResponse, type ModifyProjectResponses, type ModifyProjectUserData, type ModifyProjectUserError, type ModifyProjectUserErrors, type ModifyProjectUserResponse, type ModifyProjectUserResponses, type ModifyRunData, type ModifyRunRequest, type ModifyRunResponse, type ModifyRunResponses, type ModifyThreadData, type ModifyThreadRequest, type ModifyThreadResponse, type ModifyThreadResponses, type ModifyUserData, type ModifyUserResponse, type ModifyUserResponses, type ModifyVectorStoreData, type ModifyVectorStoreResponse, type ModifyVectorStoreResponses, type Move, type OpenAiFile, type OtherChunkingStrategyResponseParam, type OutputAudio, type OutputContent, type OutputItem, type OutputMessage, type OutputTextContent, type ParallelToolCalls, type PartialImages, type PauseFineTuningJobData, type PauseFineTuningJobResponse, type PauseFineTuningJobResponses, type PostBatchCancelledWebhookPayload, type PostBatchCancelledWebhookRequest, type PostBatchCompletedWebhookPayload, type PostBatchCompletedWebhookRequest, type PostBatchExpiredWebhookPayload, type PostBatchExpiredWebhookRequest, type PostBatchFailedWebhookPayload, type PostBatchFailedWebhookRequest, type PostEvalRunCanceledWebhookPayload, type PostEvalRunCanceledWebhookRequest, type PostEvalRunFailedWebhookPayload, type PostEvalRunFailedWebhookRequest, type PostEvalRunSucceededWebhookPayload, type PostEvalRunSucceededWebhookRequest, type PostFineTuningJobCancelledWebhookPayload, type PostFineTuningJobCancelledWebhookRequest, type PostFineTuningJobFailedWebhookPayload, type PostFineTuningJobFailedWebhookRequest, type PostFineTuningJobSucceededWebhookPayload, type PostFineTuningJobSucceededWebhookRequest, type PostResponseCancelledWebhookPayload, type PostResponseCancelledWebhookRequest, type PostResponseCompletedWebhookPayload, type PostResponseCompletedWebhookRequest, type PostResponseFailedWebhookPayload, type PostResponseFailedWebhookRequest, type PostResponseIncompleteWebhookPayload, type PostResponseIncompleteWebhookRequest, type PredictionContent, type Project, type ProjectApiKey, type ProjectApiKeyDeleteResponse, type ProjectApiKeyListResponse, type ProjectCreateRequest, type ProjectListResponse, type ProjectRateLimit, type ProjectRateLimitListResponse, type ProjectRateLimitUpdateRequest, type ProjectServiceAccount, type ProjectServiceAccountApiKey, type ProjectServiceAccountCreateRequest, type ProjectServiceAccountCreateResponse, type ProjectServiceAccountDeleteResponse, type ProjectServiceAccountListResponse, type ProjectUpdateRequest, type ProjectUser, type ProjectUserCreateRequest, type ProjectUserDeleteResponse, type ProjectUserListResponse, type ProjectUserUpdateRequest, type Prompt, type RankingOptions, type RealtimeClientEvent, type RealtimeClientEventConversationItemCreate, type RealtimeClientEventConversationItemDelete, type RealtimeClientEventConversationItemRetrieve, type RealtimeClientEventConversationItemTruncate, type RealtimeClientEventInputAudioBufferAppend, type RealtimeClientEventInputAudioBufferClear, type RealtimeClientEventInputAudioBufferCommit, type RealtimeClientEventOutputAudioBufferClear, type RealtimeClientEventResponseCancel, type RealtimeClientEventResponseCreate, type RealtimeClientEventSessionUpdate, type RealtimeClientEventTranscriptionSessionUpdate, type RealtimeConnectParams, type RealtimeConversationItem, type RealtimeConversationItemContent, type RealtimeConversationItemWithReference, type RealtimeResponse, type RealtimeResponseCreateParams, type RealtimeServerEvent, type RealtimeServerEventConversationCreated, type RealtimeServerEventConversationItemCreated, type RealtimeServerEventConversationItemDeleted, type RealtimeServerEventConversationItemInputAudioTranscriptionCompleted, type RealtimeServerEventConversationItemInputAudioTranscriptionDelta, type RealtimeServerEventConversationItemInputAudioTranscriptionFailed, type RealtimeServerEventConversationItemRetrieved, type RealtimeServerEventConversationItemTruncated, type RealtimeServerEventError, type RealtimeServerEventInputAudioBufferCleared, type RealtimeServerEventInputAudioBufferCommitted, type RealtimeServerEventInputAudioBufferSpeechStarted, type RealtimeServerEventInputAudioBufferSpeechStopped, type RealtimeServerEventOutputAudioBufferCleared, type RealtimeServerEventOutputAudioBufferStarted, type RealtimeServerEventOutputAudioBufferStopped, type RealtimeServerEventRateLimitsUpdated, type RealtimeServerEventResponseAudioDelta, type RealtimeServerEventResponseAudioDone, type RealtimeServerEventResponseAudioTranscriptDelta, type RealtimeServerEventResponseAudioTranscriptDone, type RealtimeServerEventResponseContentPartAdded, type RealtimeServerEventResponseContentPartDone, type RealtimeServerEventResponseCreated, type RealtimeServerEventResponseDone, type RealtimeServerEventResponseFunctionCallArgumentsDelta, type RealtimeServerEventResponseFunctionCallArgumentsDone, type RealtimeServerEventResponseOutputItemAdded, type RealtimeServerEventResponseOutputItemDone, type RealtimeServerEventResponseTextDelta, type RealtimeServerEventResponseTextDone, type RealtimeServerEventSessionCreated, type RealtimeServerEventSessionUpdated, type RealtimeServerEventTranscriptionSessionUpdated, type RealtimeSession, type RealtimeSessionCreateRequest, type RealtimeSessionCreateResponse, type RealtimeTranscriptionSessionCreateRequest, type RealtimeTranscriptionSessionCreateResponse, type Reasoning, ReasoningEffort, type ReasoningItem, type RefusalContent, type Response, type ResponseAudioDeltaEvent, type ResponseAudioDoneEvent, type ResponseAudioTranscriptDeltaEvent, type ResponseAudioTranscriptDoneEvent, type ResponseCodeInterpreterCallCodeDeltaEvent, type ResponseCodeInterpreterCallCodeDoneEvent, type ResponseCodeInterpreterCallCompletedEvent, type ResponseCodeInterpreterCallInProgressEvent, type ResponseCodeInterpreterCallInterpretingEvent, type ResponseCompletedEvent, type ResponseContentPartAddedEvent, type ResponseContentPartDoneEvent, type ResponseCreatedEvent, type ResponseCustomToolCallInputDeltaEvent, type ResponseCustomToolCallInputDoneEvent, type ResponseError, ResponseErrorCode, type ResponseErrorEvent, type ResponseFailedEvent, type ResponseFileSearchCallCompletedEvent, type ResponseFileSearchCallInProgressEvent, type ResponseFileSearchCallSearchingEvent, type ResponseFormatJsonObject, type ResponseFormatJsonSchema, type ResponseFormatJsonSchemaSchema, type ResponseFormatText, type ResponseFormatTextGrammar, type ResponseFormatTextPython, type ResponseFunctionCallArgumentsDeltaEvent, type ResponseFunctionCallArgumentsDoneEvent, type ResponseImageGenCallCompletedEvent, type ResponseImageGenCallGeneratingEvent, type ResponseImageGenCallInProgressEvent, type ResponseImageGenCallPartialImageEvent, type ResponseIncompleteEvent, type ResponseInProgressEvent, type ResponseItemList, type ResponseLogProb, type ResponseMcpCallArgumentsDeltaEvent, type ResponseMcpCallArgumentsDoneEvent, type ResponseMcpCallCompletedEvent, type ResponseMcpCallFailedEvent, type ResponseMcpCallInProgressEvent, type ResponseMcpListToolsCompletedEvent, type ResponseMcpListToolsFailedEvent, type ResponseMcpListToolsInProgressEvent, type ResponseModalities, type ResponseOutputItemAddedEvent, type ResponseOutputItemDoneEvent, type ResponseOutputTextAnnotationAddedEvent, type ResponsePromptVariables, type ResponseProperties, type ResponseQueuedEvent, type ResponseReasoningSummaryPartAddedEvent, type ResponseReasoningSummaryPartDoneEvent, type ResponseReasoningSummaryTextDeltaEvent, type ResponseReasoningSummaryTextDoneEvent, type ResponseReasoningTextDeltaEvent, type ResponseReasoningTextDoneEvent, type ResponseRefusalDeltaEvent, type ResponseRefusalDoneEvent, type ResponseStreamEvent, type ResponseStreamOptions, type ResponseTextDeltaEvent, type ResponseTextDoneEvent, type ResponseUsage, type ResponseWebSearchCallCompletedEvent, type ResponseWebSearchCallInProgressEvent, type ResponseWebSearchCallSearchingEvent, type ResumeFineTuningJobData, type ResumeFineTuningJobResponse, type ResumeFineTuningJobResponses, type RetrieveBatchData, type RetrieveBatchResponse, type RetrieveBatchResponses, type RetrieveContainerData, type RetrieveContainerFileContentData, type RetrieveContainerFileContentResponses, type RetrieveContainerFileData, type RetrieveContainerFileResponse, type RetrieveContainerFileResponses, type RetrieveContainerResponse, type RetrieveContainerResponses, type RetrieveFileData, type RetrieveFileResponse, type RetrieveFileResponses, type RetrieveFineTuningJobData, type RetrieveFineTuningJobResponse, type RetrieveFineTuningJobResponses, type RetrieveInviteData, type RetrieveInviteResponse, type RetrieveInviteResponses, type RetrieveModelData, type RetrieveModelResponse, type RetrieveModelResponses, type RetrieveProjectApiKeyData, type RetrieveProjectApiKeyResponse, type RetrieveProjectApiKeyResponses, type RetrieveProjectData, type RetrieveProjectResponse, type RetrieveProjectResponses, type RetrieveProjectServiceAccountData, type RetrieveProjectServiceAccountResponse, type RetrieveProjectServiceAccountResponses, type RetrieveProjectUserData, type RetrieveProjectUserResponse, type RetrieveProjectUserResponses, type RetrieveUserData, type RetrieveUserResponse, type RetrieveUserResponses, type RetrieveVectorStoreFileContentData, type RetrieveVectorStoreFileContentResponse, type RetrieveVectorStoreFileContentResponses, type RunCompletionUsage, type RunGraderData, type RunGraderRequest, type RunGraderResponse, type RunGraderResponse2, type RunGraderResponses, type RunObject, RunStatus, type RunStepCompletionUsage, type RunStepDeltaObject, type RunStepDeltaObjectDelta, type RunStepDeltaStepDetailsMessageCreationObject, type RunStepDeltaStepDetailsToolCall, type RunStepDeltaStepDetailsToolCallsCodeObject, type RunStepDeltaStepDetailsToolCallsCodeOutputImageObject, type RunStepDeltaStepDetailsToolCallsCodeOutputLogsObject, type RunStepDeltaStepDetailsToolCallsFileSearchObject, type RunStepDeltaStepDetailsToolCallsFunctionObject, type RunStepDeltaStepDetailsToolCallsObject, type RunStepDetailsMessageCreationObject, type RunStepDetailsToolCall, type RunStepDetailsToolCallsCodeObject, type RunStepDetailsToolCallsCodeOutputImageObject, type RunStepDetailsToolCallsCodeOutputLogsObject, type RunStepDetailsToolCallsFileSearchObject, type RunStepDetailsToolCallsFileSearchRankingOptionsObject, type RunStepDetailsToolCallsFileSearchResultObject, type RunStepDetailsToolCallsFunctionObject, type RunStepDetailsToolCallsObject, type RunStepObject, type RunStepStreamEvent, type RunStreamEvent, type RunToolCallObject, type Screenshot, type Scroll, type SearchVectorStoreData, type SearchVectorStoreResponse, type SearchVectorStoreResponses, ServiceTier, type SpeechAudioDeltaEvent, type SpeechAudioDoneEvent, type StaticChunkingStrategy, type StaticChunkingStrategyRequestParam, type StaticChunkingStrategyResponseParam, type StopConfiguration, type SubmitToolOuputsToRunData, type SubmitToolOuputsToRunResponse, type SubmitToolOuputsToRunResponses, type SubmitToolOutputsRunRequest, type SubmitToolOutputsRunRequestWithoutStream, type TextAnnotation, type TextAnnotationDelta, type TextResponseFormatConfiguration, type TextResponseFormatJsonSchema, type ThreadObject, type ThreadStreamEvent, type ToggleCertificatesRequest, type Tool, type ToolChoiceAllowed, type ToolChoiceCustom, type ToolChoiceFunction, type ToolChoiceMcp, ToolChoiceOptions, type ToolChoiceTypes, type TopLogProb, type TranscriptionChunkingStrategy, TranscriptionInclude, type TranscriptionSegment, type TranscriptionWord, type TranscriptTextDeltaEvent, type TranscriptTextDoneEvent, type TranscriptTextUsageDuration, type TranscriptTextUsageTokens, type TruncationObject, type Type, type UpdateChatCompletionData, type UpdateChatCompletionResponse, type UpdateChatCompletionResponses, type UpdateEvalData, type UpdateEvalResponse, type UpdateEvalResponses, type UpdateProjectRateLimitsData, type UpdateProjectRateLimitsError, type UpdateProjectRateLimitsErrors, type UpdateProjectRateLimitsResponse, type UpdateProjectRateLimitsResponses, type UpdateVectorStoreFileAttributesData, type UpdateVectorStoreFileAttributesRequest, type UpdateVectorStoreFileAttributesResponse, type UpdateVectorStoreFileAttributesResponses, type UpdateVectorStoreRequest, type Upload, type UploadCertificateData, type UploadCertificateRequest, type UploadCertificateResponse, type UploadCertificateResponses, type UploadPart, type UrlCitationBody, type UsageAudioSpeechesData, type UsageAudioSpeechesResponse, type UsageAudioSpeechesResponses, type UsageAudioSpeechesResult, type UsageAudioTranscriptionsData, type UsageAudioTranscriptionsResponse, type UsageAudioTranscriptionsResponses, type UsageAudioTranscriptionsResult, type UsageCodeInterpreterSessionsData, type UsageCodeInterpreterSessionsResponse, type UsageCodeInterpreterSessionsResponses, type UsageCodeInterpreterSessionsResult, type UsageCompletionsData, type UsageCompletionsResponse, type UsageCompletionsResponses, type UsageCompletionsResult, type UsageCostsData, type UsageCostsResponse, type UsageCostsResponses, type UsageEmbeddingsData, type UsageEmbeddingsResponse, type UsageEmbeddingsResponses, type UsageEmbeddingsResult, type UsageImagesData, type UsageImagesResponse, type UsageImagesResponses, type UsageImagesResult, type UsageModerationsData, type UsageModerationsResponse, type UsageModerationsResponses, type UsageModerationsResult, type UsageResponse, type UsageTimeBucket, type UsageVectorStoresData, type UsageVectorStoresResponse, type UsageVectorStoresResponses, type UsageVectorStoresResult, type User, type UserDeleteResponse, type UserListResponse, type UserRoleUpdateRequest, type VadConfig, type ValidateGraderData, type ValidateGraderRequest, type ValidateGraderResponse, type ValidateGraderResponse2, type ValidateGraderResponses, type VectorStoreExpirationAfter, type VectorStoreFileAttributes, type VectorStoreFileBatchObject, type VectorStoreFileContentResponse, type VectorStoreFileObject, type VectorStoreObject, type VectorStoreSearchRequest, type VectorStoreSearchResultContentObject, type VectorStoreSearchResultItem, type VectorStoreSearchResultsPage, Verbosity, type VoiceIdsShared, type Wait, type WebhookBatchCancelled, type WebhookBatchCompleted, type WebhookBatchExpired, type WebhookBatchFailed, type WebhookEvalRunCanceled, type WebhookEvalRunFailed, type WebhookEvalRunSucceeded, type WebhookFineTuningJobCancelled, type WebhookFineTuningJobFailed, type WebhookFineTuningJobSucceeded, type WebhookResponseCancelled, type WebhookResponseCompleted, type WebhookResponseFailed, type WebhookResponseIncomplete, type Webhooks, type WebSearchActionFind, type WebSearchActionOpenPage, type WebSearchActionSearch, WebSearchContextSize, type WebSearchLocation, type WebSearchPreviewTool, type WebSearchToolCall } from './types.gen';\n"
  },
  {
    "path": "examples/openapi-ts-openai/src/client/sdk.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport { type Client, formDataBodySerializer, type Options as Options2, type TDataShape } from './client';\nimport { client } from './client.gen';\nimport type { ActivateOrganizationCertificatesData, ActivateOrganizationCertificatesResponses, ActivateProjectCertificatesData, ActivateProjectCertificatesResponses, AddUploadPartData, AddUploadPartResponses, AdminApiKeysCreateData, AdminApiKeysCreateResponses, AdminApiKeysDeleteData, AdminApiKeysDeleteResponses, AdminApiKeysGetData, AdminApiKeysGetResponses, AdminApiKeysListData, AdminApiKeysListResponses, ArchiveProjectData, ArchiveProjectResponses, CancelBatchData, CancelBatchResponses, CancelEvalRunData, CancelEvalRunResponses, CancelFineTuningJobData, CancelFineTuningJobResponses, CancelResponseData, CancelResponseErrors, CancelResponseResponses, CancelRunData, CancelRunResponses, CancelUploadData, CancelUploadResponses, CancelVectorStoreFileBatchData, CancelVectorStoreFileBatchResponses, CompleteUploadData, CompleteUploadResponses, CreateAssistantData, CreateAssistantResponses, CreateBatchData, CreateBatchResponses, CreateChatCompletionData, CreateChatCompletionResponses, CreateCompletionData, CreateCompletionResponses, CreateContainerData, CreateContainerFileData, CreateContainerFileResponses, CreateContainerResponses, CreateEmbeddingData, CreateEmbeddingResponses, CreateEvalData, CreateEvalResponses, CreateEvalRunData, CreateEvalRunErrors, CreateEvalRunResponses, CreateFileData, CreateFileResponses, CreateFineTuningCheckpointPermissionData, CreateFineTuningCheckpointPermissionResponses, CreateFineTuningJobData, CreateFineTuningJobResponses, CreateImageData, CreateImageEditData, CreateImageEditResponses, CreateImageResponses, CreateImageVariationData, CreateImageVariationResponses, CreateMessageData, CreateMessageResponses, CreateModerationData, CreateModerationResponses, CreateProjectData, CreateProjectResponses, CreateProjectServiceAccountData, CreateProjectServiceAccountErrors, CreateProjectServiceAccountResponses, CreateProjectUserData, CreateProjectUserErrors, CreateProjectUserResponses, CreateRealtimeSessionData, CreateRealtimeSessionResponses, CreateRealtimeTranscriptionSessionData, CreateRealtimeTranscriptionSessionResponses, CreateResponseData, CreateResponseResponses, CreateRunData, CreateRunResponses, CreateSpeechData, CreateSpeechResponses, CreateThreadAndRunData, CreateThreadAndRunResponses, CreateThreadData, CreateThreadResponses, CreateTranscriptionData, CreateTranscriptionResponses, CreateTranslationData, CreateTranslationResponses, CreateUploadData, CreateUploadResponses, CreateVectorStoreData, CreateVectorStoreFileBatchData, CreateVectorStoreFileBatchResponses, CreateVectorStoreFileData, CreateVectorStoreFileResponses, CreateVectorStoreResponses, DeactivateOrganizationCertificatesData, DeactivateOrganizationCertificatesResponses, DeactivateProjectCertificatesData, DeactivateProjectCertificatesResponses, DeleteAssistantData, DeleteAssistantResponses, DeleteCertificateData, DeleteCertificateResponses, DeleteChatCompletionData, DeleteChatCompletionResponses, DeleteContainerData, DeleteContainerFileData, DeleteContainerFileResponses, DeleteContainerResponses, DeleteEvalData, DeleteEvalErrors, DeleteEvalResponses, DeleteEvalRunData, DeleteEvalRunErrors, DeleteEvalRunResponses, DeleteFileData, DeleteFileResponses, DeleteFineTuningCheckpointPermissionData, DeleteFineTuningCheckpointPermissionResponses, DeleteInviteData, DeleteInviteResponses, DeleteMessageData, DeleteMessageResponses, DeleteModelData, DeleteModelResponses, DeleteProjectApiKeyData, DeleteProjectApiKeyErrors, DeleteProjectApiKeyResponses, DeleteProjectServiceAccountData, DeleteProjectServiceAccountResponses, DeleteProjectUserData, DeleteProjectUserErrors, DeleteProjectUserResponses, DeleteResponseData, DeleteResponseErrors, DeleteResponseResponses, DeleteThreadData, DeleteThreadResponses, DeleteUserData, DeleteUserResponses, DeleteVectorStoreData, DeleteVectorStoreFileData, DeleteVectorStoreFileResponses, DeleteVectorStoreResponses, DownloadFileData, DownloadFileResponses, GetAssistantData, GetAssistantResponses, GetCertificateData, GetCertificateResponses, GetChatCompletionData, GetChatCompletionMessagesData, GetChatCompletionMessagesResponses, GetChatCompletionResponses, GetEvalData, GetEvalResponses, GetEvalRunData, GetEvalRunOutputItemData, GetEvalRunOutputItemResponses, GetEvalRunOutputItemsData, GetEvalRunOutputItemsResponses, GetEvalRunResponses, GetEvalRunsData, GetEvalRunsResponses, GetMessageData, GetMessageResponses, GetResponseData, GetResponseResponses, GetRunData, GetRunResponses, GetRunStepData, GetRunStepResponses, GetThreadData, GetThreadResponses, GetVectorStoreData, GetVectorStoreFileBatchData, GetVectorStoreFileBatchResponses, GetVectorStoreFileData, GetVectorStoreFileResponses, GetVectorStoreResponses, InviteUserData, InviteUserResponses, ListAssistantsData, ListAssistantsResponses, ListAuditLogsData, ListAuditLogsResponses, ListBatchesData, ListBatchesResponses, ListChatCompletionsData, ListChatCompletionsResponses, ListContainerFilesData, ListContainerFilesResponses, ListContainersData, ListContainersResponses, ListEvalsData, ListEvalsResponses, ListFilesData, ListFilesInVectorStoreBatchData, ListFilesInVectorStoreBatchResponses, ListFilesResponses, ListFineTuningCheckpointPermissionsData, ListFineTuningCheckpointPermissionsResponses, ListFineTuningEventsData, ListFineTuningEventsResponses, ListFineTuningJobCheckpointsData, ListFineTuningJobCheckpointsResponses, ListInputItemsData, ListInputItemsResponses, ListInvitesData, ListInvitesResponses, ListMessagesData, ListMessagesResponses, ListModelsData, ListModelsResponses, ListOrganizationCertificatesData, ListOrganizationCertificatesResponses, ListPaginatedFineTuningJobsData, ListPaginatedFineTuningJobsResponses, ListProjectApiKeysData, ListProjectApiKeysResponses, ListProjectCertificatesData, ListProjectCertificatesResponses, ListProjectRateLimitsData, ListProjectRateLimitsResponses, ListProjectsData, ListProjectServiceAccountsData, ListProjectServiceAccountsErrors, ListProjectServiceAccountsResponses, ListProjectsResponses, ListProjectUsersData, ListProjectUsersErrors, ListProjectUsersResponses, ListRunsData, ListRunsResponses, ListRunStepsData, ListRunStepsResponses, ListUsersData, ListUsersResponses, ListVectorStoreFilesData, ListVectorStoreFilesResponses, ListVectorStoresData, ListVectorStoresResponses, ModifyAssistantData, ModifyAssistantResponses, ModifyCertificateData, ModifyCertificateResponses, ModifyMessageData, ModifyMessageResponses, ModifyProjectData, ModifyProjectErrors, ModifyProjectResponses, ModifyProjectUserData, ModifyProjectUserErrors, ModifyProjectUserResponses, ModifyRunData, ModifyRunResponses, ModifyThreadData, ModifyThreadResponses, ModifyUserData, ModifyUserResponses, ModifyVectorStoreData, ModifyVectorStoreResponses, PauseFineTuningJobData, PauseFineTuningJobResponses, ResumeFineTuningJobData, ResumeFineTuningJobResponses, RetrieveBatchData, RetrieveBatchResponses, RetrieveContainerData, RetrieveContainerFileContentData, RetrieveContainerFileContentResponses, RetrieveContainerFileData, RetrieveContainerFileResponses, RetrieveContainerResponses, RetrieveFileData, RetrieveFileResponses, RetrieveFineTuningJobData, RetrieveFineTuningJobResponses, RetrieveInviteData, RetrieveInviteResponses, RetrieveModelData, RetrieveModelResponses, RetrieveProjectApiKeyData, RetrieveProjectApiKeyResponses, RetrieveProjectData, RetrieveProjectResponses, RetrieveProjectServiceAccountData, RetrieveProjectServiceAccountResponses, RetrieveProjectUserData, RetrieveProjectUserResponses, RetrieveUserData, RetrieveUserResponses, RetrieveVectorStoreFileContentData, RetrieveVectorStoreFileContentResponses, RunGraderData, RunGraderResponses, SearchVectorStoreData, SearchVectorStoreResponses, SubmitToolOuputsToRunData, SubmitToolOuputsToRunResponses, UpdateChatCompletionData, UpdateChatCompletionResponses, UpdateEvalData, UpdateEvalResponses, UpdateProjectRateLimitsData, UpdateProjectRateLimitsErrors, UpdateProjectRateLimitsResponses, UpdateVectorStoreFileAttributesData, UpdateVectorStoreFileAttributesResponses, UploadCertificateData, UploadCertificateResponses, UsageAudioSpeechesData, UsageAudioSpeechesResponses, UsageAudioTranscriptionsData, UsageAudioTranscriptionsResponses, UsageCodeInterpreterSessionsData, UsageCodeInterpreterSessionsResponses, UsageCompletionsData, UsageCompletionsResponses, UsageCostsData, UsageCostsResponses, UsageEmbeddingsData, UsageEmbeddingsResponses, UsageImagesData, UsageImagesResponses, UsageModerationsData, UsageModerationsResponses, UsageVectorStoresData, UsageVectorStoresResponses, ValidateGraderData, ValidateGraderResponses } from './types.gen';\n\nexport type Options<TData extends TDataShape = TDataShape, ThrowOnError extends boolean = boolean> = Options2<TData, ThrowOnError> & {\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\nclass HeyApiClient {\n    protected client: Client;\n    \n    constructor(args?: {\n        client?: Client;\n    }) {\n        this.client = args?.client ?? client;\n    }\n}\n\nclass HeyApiRegistry<T> {\n    private readonly defaultKey = 'default';\n    \n    private readonly instances: Map<string, T> = new Map();\n    \n    get(key?: string): T {\n        const instance = this.instances.get(key ?? this.defaultKey);\n        if (!instance) {\n            throw new Error(`No SDK client found. Create one with \"new OpenAi()\" to fix this error.`);\n        }\n        return instance;\n    }\n    \n    set(value: T, key?: string): void {\n        this.instances.set(key ?? this.defaultKey, value);\n    }\n}\n\nexport class OpenAi extends HeyApiClient {\n    public static readonly __registry = new HeyApiRegistry<OpenAi>();\n    \n    constructor(args?: {\n        client?: Client;\n        key?: string;\n    }) {\n        super(args);\n        OpenAi.__registry.set(this, args?.key);\n    }\n    \n    /**\n     * List assistants\n     *\n     * Returns a list of assistants.\n     */\n    public listAssistants<ThrowOnError extends boolean = false>(options?: Options<ListAssistantsData, ThrowOnError>) {\n        return (options?.client ?? this.client).get<ListAssistantsResponses, unknown, ThrowOnError>({\n            security: [{ scheme: 'bearer', type: 'http' }],\n            url: '/assistants',\n            ...options\n        });\n    }\n    \n    /**\n     * Create assistant\n     *\n     * Create an assistant with a model and instructions.\n     */\n    public createAssistant<ThrowOnError extends boolean = false>(options: Options<CreateAssistantData, ThrowOnError>) {\n        return (options.client ?? this.client).post<CreateAssistantResponses, unknown, ThrowOnError>({\n            security: [{ scheme: 'bearer', type: 'http' }],\n            url: '/assistants',\n            ...options,\n            headers: {\n                'Content-Type': 'application/json',\n                ...options.headers\n            }\n        });\n    }\n    \n    /**\n     * Delete assistant\n     *\n     * Delete an assistant.\n     */\n    public deleteAssistant<ThrowOnError extends boolean = false>(options: Options<DeleteAssistantData, ThrowOnError>) {\n        return (options.client ?? this.client).delete<DeleteAssistantResponses, unknown, ThrowOnError>({\n            security: [{ scheme: 'bearer', type: 'http' }],\n            url: '/assistants/{assistant_id}',\n            ...options\n        });\n    }\n    \n    /**\n     * Retrieve assistant\n     *\n     * Retrieves an assistant.\n     */\n    public getAssistant<ThrowOnError extends boolean = false>(options: Options<GetAssistantData, ThrowOnError>) {\n        return (options.client ?? this.client).get<GetAssistantResponses, unknown, ThrowOnError>({\n            security: [{ scheme: 'bearer', type: 'http' }],\n            url: '/assistants/{assistant_id}',\n            ...options\n        });\n    }\n    \n    /**\n     * Modify assistant\n     *\n     * Modifies an assistant.\n     */\n    public modifyAssistant<ThrowOnError extends boolean = false>(options: Options<ModifyAssistantData, ThrowOnError>) {\n        return (options.client ?? this.client).post<ModifyAssistantResponses, unknown, ThrowOnError>({\n            security: [{ scheme: 'bearer', type: 'http' }],\n            url: '/assistants/{assistant_id}',\n            ...options,\n            headers: {\n                'Content-Type': 'application/json',\n                ...options.headers\n            }\n        });\n    }\n    \n    /**\n     * Create speech\n     *\n     * Generates audio from the input text.\n     */\n    public createSpeech<ThrowOnError extends boolean = false>(options: Options<CreateSpeechData, ThrowOnError>) {\n        return (options.client ?? this.client).post<CreateSpeechResponses, unknown, ThrowOnError>({\n            security: [{ scheme: 'bearer', type: 'http' }],\n            url: '/audio/speech',\n            ...options,\n            headers: {\n                'Content-Type': 'application/json',\n                ...options.headers\n            }\n        });\n    }\n    \n    /**\n     * Create transcription\n     *\n     * Transcribes audio into the input language.\n     */\n    public createTranscription<ThrowOnError extends boolean = false>(options: Options<CreateTranscriptionData, ThrowOnError>) {\n        return (options.client ?? this.client).post<CreateTranscriptionResponses, unknown, ThrowOnError>({\n            ...formDataBodySerializer,\n            security: [{ scheme: 'bearer', type: 'http' }],\n            url: '/audio/transcriptions',\n            ...options,\n            headers: {\n                'Content-Type': null,\n                ...options.headers\n            }\n        });\n    }\n    \n    /**\n     * Create translation\n     *\n     * Translates audio into English.\n     */\n    public createTranslation<ThrowOnError extends boolean = false>(options: Options<CreateTranslationData, ThrowOnError>) {\n        return (options.client ?? this.client).post<CreateTranslationResponses, unknown, ThrowOnError>({\n            ...formDataBodySerializer,\n            security: [{ scheme: 'bearer', type: 'http' }],\n            url: '/audio/translations',\n            ...options,\n            headers: {\n                'Content-Type': null,\n                ...options.headers\n            }\n        });\n    }\n    \n    /**\n     * List batch\n     *\n     * List your organization's batches.\n     */\n    public listBatches<ThrowOnError extends boolean = false>(options?: Options<ListBatchesData, ThrowOnError>) {\n        return (options?.client ?? this.client).get<ListBatchesResponses, unknown, ThrowOnError>({\n            security: [{ scheme: 'bearer', type: 'http' }],\n            url: '/batches',\n            ...options\n        });\n    }\n    \n    /**\n     * Create batch\n     *\n     * Creates and executes a batch from an uploaded file of requests\n     */\n    public createBatch<ThrowOnError extends boolean = false>(options: Options<CreateBatchData, ThrowOnError>) {\n        return (options.client ?? this.client).post<CreateBatchResponses, unknown, ThrowOnError>({\n            security: [{ scheme: 'bearer', type: 'http' }],\n            url: '/batches',\n            ...options,\n            headers: {\n                'Content-Type': 'application/json',\n                ...options.headers\n            }\n        });\n    }\n    \n    /**\n     * Retrieve batch\n     *\n     * Retrieves a batch.\n     */\n    public retrieveBatch<ThrowOnError extends boolean = false>(options: Options<RetrieveBatchData, ThrowOnError>) {\n        return (options.client ?? this.client).get<RetrieveBatchResponses, unknown, ThrowOnError>({\n            security: [{ scheme: 'bearer', type: 'http' }],\n            url: '/batches/{batch_id}',\n            ...options\n        });\n    }\n    \n    /**\n     * Cancel batch\n     *\n     * Cancels an in-progress batch. The batch will be in status `cancelling` for up to 10 minutes, before changing to `cancelled`, where it will have partial results (if any) available in the output file.\n     */\n    public cancelBatch<ThrowOnError extends boolean = false>(options: Options<CancelBatchData, ThrowOnError>) {\n        return (options.client ?? this.client).post<CancelBatchResponses, unknown, ThrowOnError>({\n            security: [{ scheme: 'bearer', type: 'http' }],\n            url: '/batches/{batch_id}/cancel',\n            ...options\n        });\n    }\n    \n    /**\n     * List Chat Completions\n     *\n     * List stored Chat Completions. Only Chat Completions that have been stored\n     * with the `store` parameter set to `true` will be returned.\n     *\n     */\n    public listChatCompletions<ThrowOnError extends boolean = false>(options?: Options<ListChatCompletionsData, ThrowOnError>) {\n        return (options?.client ?? this.client).get<ListChatCompletionsResponses, unknown, ThrowOnError>({\n            security: [{ scheme: 'bearer', type: 'http' }],\n            url: '/chat/completions',\n            ...options\n        });\n    }\n    \n    /**\n     * Create chat completion\n     *\n     * **Starting a new project?** We recommend trying [Responses](https://platform.openai.com/docs/api-reference/responses)\n     * to take advantage of the latest OpenAI platform features. Compare\n     * [Chat Completions with Responses](https://platform.openai.com/docs/guides/responses-vs-chat-completions?api-mode=responses).\n     *\n     * ---\n     *\n     * Creates a model response for the given chat conversation. Learn more in the\n     * [text generation](https://platform.openai.com/docs/guides/text-generation), [vision](https://platform.openai.com/docs/guides/vision),\n     * and [audio](https://platform.openai.com/docs/guides/audio) guides.\n     *\n     * Parameter support can differ depending on the model used to generate the\n     * response, particularly for newer reasoning models. Parameters that are only\n     * supported for reasoning models are noted below. For the current state of\n     * unsupported parameters in reasoning models,\n     * [refer to the reasoning guide](https://platform.openai.com/docs/guides/reasoning).\n     *\n     */\n    public createChatCompletion<ThrowOnError extends boolean = false>(options: Options<CreateChatCompletionData, ThrowOnError>) {\n        return (options.client ?? this.client).post<CreateChatCompletionResponses, unknown, ThrowOnError>({\n            security: [{ scheme: 'bearer', type: 'http' }],\n            url: '/chat/completions',\n            ...options,\n            headers: {\n                'Content-Type': 'application/json',\n                ...options.headers\n            }\n        });\n    }\n    \n    /**\n     * Delete chat completion\n     *\n     * Delete a stored chat completion. Only Chat Completions that have been\n     * created with the `store` parameter set to `true` can be deleted.\n     *\n     */\n    public deleteChatCompletion<ThrowOnError extends boolean = false>(options: Options<DeleteChatCompletionData, ThrowOnError>) {\n        return (options.client ?? this.client).delete<DeleteChatCompletionResponses, unknown, ThrowOnError>({\n            security: [{ scheme: 'bearer', type: 'http' }],\n            url: '/chat/completions/{completion_id}',\n            ...options\n        });\n    }\n    \n    /**\n     * Get chat completion\n     *\n     * Get a stored chat completion. Only Chat Completions that have been created\n     * with the `store` parameter set to `true` will be returned.\n     *\n     */\n    public getChatCompletion<ThrowOnError extends boolean = false>(options: Options<GetChatCompletionData, ThrowOnError>) {\n        return (options.client ?? this.client).get<GetChatCompletionResponses, unknown, ThrowOnError>({\n            security: [{ scheme: 'bearer', type: 'http' }],\n            url: '/chat/completions/{completion_id}',\n            ...options\n        });\n    }\n    \n    /**\n     * Update chat completion\n     *\n     * Modify a stored chat completion. Only Chat Completions that have been\n     * created with the `store` parameter set to `true` can be modified. Currently,\n     * the only supported modification is to update the `metadata` field.\n     *\n     */\n    public updateChatCompletion<ThrowOnError extends boolean = false>(options: Options<UpdateChatCompletionData, ThrowOnError>) {\n        return (options.client ?? this.client).post<UpdateChatCompletionResponses, unknown, ThrowOnError>({\n            security: [{ scheme: 'bearer', type: 'http' }],\n            url: '/chat/completions/{completion_id}',\n            ...options,\n            headers: {\n                'Content-Type': 'application/json',\n                ...options.headers\n            }\n        });\n    }\n    \n    /**\n     * Get chat messages\n     *\n     * Get the messages in a stored chat completion. Only Chat Completions that\n     * have been created with the `store` parameter set to `true` will be\n     * returned.\n     *\n     */\n    public getChatCompletionMessages<ThrowOnError extends boolean = false>(options: Options<GetChatCompletionMessagesData, ThrowOnError>) {\n        return (options.client ?? this.client).get<GetChatCompletionMessagesResponses, unknown, ThrowOnError>({\n            security: [{ scheme: 'bearer', type: 'http' }],\n            url: '/chat/completions/{completion_id}/messages',\n            ...options\n        });\n    }\n    \n    /**\n     * Create completion\n     *\n     * Creates a completion for the provided prompt and parameters.\n     */\n    public createCompletion<ThrowOnError extends boolean = false>(options: Options<CreateCompletionData, ThrowOnError>) {\n        return (options.client ?? this.client).post<CreateCompletionResponses, unknown, ThrowOnError>({\n            security: [{ scheme: 'bearer', type: 'http' }],\n            url: '/completions',\n            ...options,\n            headers: {\n                'Content-Type': 'application/json',\n                ...options.headers\n            }\n        });\n    }\n    \n    /**\n     * List containers\n     *\n     * List Containers\n     */\n    public listContainers<ThrowOnError extends boolean = false>(options?: Options<ListContainersData, ThrowOnError>) {\n        return (options?.client ?? this.client).get<ListContainersResponses, unknown, ThrowOnError>({\n            security: [{ scheme: 'bearer', type: 'http' }],\n            url: '/containers',\n            ...options\n        });\n    }\n    \n    /**\n     * Create container\n     *\n     * Create Container\n     */\n    public createContainer<ThrowOnError extends boolean = false>(options?: Options<CreateContainerData, ThrowOnError>) {\n        return (options?.client ?? this.client).post<CreateContainerResponses, unknown, ThrowOnError>({\n            security: [{ scheme: 'bearer', type: 'http' }],\n            url: '/containers',\n            ...options,\n            headers: {\n                'Content-Type': 'application/json',\n                ...options?.headers\n            }\n        });\n    }\n    \n    /**\n     * Delete a container\n     *\n     * Delete Container\n     */\n    public deleteContainer<ThrowOnError extends boolean = false>(options: Options<DeleteContainerData, ThrowOnError>) {\n        return (options.client ?? this.client).delete<DeleteContainerResponses, unknown, ThrowOnError>({\n            security: [{ scheme: 'bearer', type: 'http' }],\n            url: '/containers/{container_id}',\n            ...options\n        });\n    }\n    \n    /**\n     * Retrieve container\n     *\n     * Retrieve Container\n     */\n    public retrieveContainer<ThrowOnError extends boolean = false>(options: Options<RetrieveContainerData, ThrowOnError>) {\n        return (options.client ?? this.client).get<RetrieveContainerResponses, unknown, ThrowOnError>({\n            security: [{ scheme: 'bearer', type: 'http' }],\n            url: '/containers/{container_id}',\n            ...options\n        });\n    }\n    \n    /**\n     * List container files\n     *\n     * List Container files\n     */\n    public listContainerFiles<ThrowOnError extends boolean = false>(options: Options<ListContainerFilesData, ThrowOnError>) {\n        return (options.client ?? this.client).get<ListContainerFilesResponses, unknown, ThrowOnError>({\n            security: [{ scheme: 'bearer', type: 'http' }],\n            url: '/containers/{container_id}/files',\n            ...options\n        });\n    }\n    \n    /**\n     * Create container file\n     *\n     * Create a Container File\n     *\n     * You can send either a multipart/form-data request with the raw file content, or a JSON request with a file ID.\n     *\n     */\n    public createContainerFile<ThrowOnError extends boolean = false>(options: Options<CreateContainerFileData, ThrowOnError>) {\n        return (options.client ?? this.client).post<CreateContainerFileResponses, unknown, ThrowOnError>({\n            ...formDataBodySerializer,\n            security: [{ scheme: 'bearer', type: 'http' }],\n            url: '/containers/{container_id}/files',\n            ...options,\n            headers: {\n                'Content-Type': null,\n                ...options.headers\n            }\n        });\n    }\n    \n    /**\n     * Delete a container file\n     *\n     * Delete Container File\n     */\n    public deleteContainerFile<ThrowOnError extends boolean = false>(options: Options<DeleteContainerFileData, ThrowOnError>) {\n        return (options.client ?? this.client).delete<DeleteContainerFileResponses, unknown, ThrowOnError>({\n            security: [{ scheme: 'bearer', type: 'http' }],\n            url: '/containers/{container_id}/files/{file_id}',\n            ...options\n        });\n    }\n    \n    /**\n     * Retrieve container file\n     *\n     * Retrieve Container File\n     */\n    public retrieveContainerFile<ThrowOnError extends boolean = false>(options: Options<RetrieveContainerFileData, ThrowOnError>) {\n        return (options.client ?? this.client).get<RetrieveContainerFileResponses, unknown, ThrowOnError>({\n            security: [{ scheme: 'bearer', type: 'http' }],\n            url: '/containers/{container_id}/files/{file_id}',\n            ...options\n        });\n    }\n    \n    /**\n     * Retrieve container file content\n     *\n     * Retrieve Container File Content\n     */\n    public retrieveContainerFileContent<ThrowOnError extends boolean = false>(options: Options<RetrieveContainerFileContentData, ThrowOnError>) {\n        return (options.client ?? this.client).get<RetrieveContainerFileContentResponses, unknown, ThrowOnError>({\n            security: [{ scheme: 'bearer', type: 'http' }],\n            url: '/containers/{container_id}/files/{file_id}/content',\n            ...options\n        });\n    }\n    \n    /**\n     * Create embeddings\n     *\n     * Creates an embedding vector representing the input text.\n     */\n    public createEmbedding<ThrowOnError extends boolean = false>(options: Options<CreateEmbeddingData, ThrowOnError>) {\n        return (options.client ?? this.client).post<CreateEmbeddingResponses, unknown, ThrowOnError>({\n            security: [{ scheme: 'bearer', type: 'http' }],\n            url: '/embeddings',\n            ...options,\n            headers: {\n                'Content-Type': 'application/json',\n                ...options.headers\n            }\n        });\n    }\n    \n    /**\n     * List evals\n     *\n     * List evaluations for a project.\n     *\n     */\n    public listEvals<ThrowOnError extends boolean = false>(options?: Options<ListEvalsData, ThrowOnError>) {\n        return (options?.client ?? this.client).get<ListEvalsResponses, unknown, ThrowOnError>({\n            security: [{ scheme: 'bearer', type: 'http' }],\n            url: '/evals',\n            ...options\n        });\n    }\n    \n    /**\n     * Create eval\n     *\n     * Create the structure of an evaluation that can be used to test a model's performance.\n     * An evaluation is a set of testing criteria and the config for a data source, which dictates the schema of the data used in the evaluation. After creating an evaluation, you can run it on different models and model parameters. We support several types of graders and datasources.\n     * For more information, see the [Evals guide](https://platform.openai.com/docs/guides/evals).\n     *\n     */\n    public createEval<ThrowOnError extends boolean = false>(options: Options<CreateEvalData, ThrowOnError>) {\n        return (options.client ?? this.client).post<CreateEvalResponses, unknown, ThrowOnError>({\n            security: [{ scheme: 'bearer', type: 'http' }],\n            url: '/evals',\n            ...options,\n            headers: {\n                'Content-Type': 'application/json',\n                ...options.headers\n            }\n        });\n    }\n    \n    /**\n     * Delete an eval\n     *\n     * Delete an evaluation.\n     *\n     */\n    public deleteEval<ThrowOnError extends boolean = false>(options: Options<DeleteEvalData, ThrowOnError>) {\n        return (options.client ?? this.client).delete<DeleteEvalResponses, DeleteEvalErrors, ThrowOnError>({\n            security: [{ scheme: 'bearer', type: 'http' }],\n            url: '/evals/{eval_id}',\n            ...options\n        });\n    }\n    \n    /**\n     * Get an eval\n     *\n     * Get an evaluation by ID.\n     *\n     */\n    public getEval<ThrowOnError extends boolean = false>(options: Options<GetEvalData, ThrowOnError>) {\n        return (options.client ?? this.client).get<GetEvalResponses, unknown, ThrowOnError>({\n            security: [{ scheme: 'bearer', type: 'http' }],\n            url: '/evals/{eval_id}',\n            ...options\n        });\n    }\n    \n    /**\n     * Update an eval\n     *\n     * Update certain properties of an evaluation.\n     *\n     */\n    public updateEval<ThrowOnError extends boolean = false>(options: Options<UpdateEvalData, ThrowOnError>) {\n        return (options.client ?? this.client).post<UpdateEvalResponses, unknown, ThrowOnError>({\n            security: [{ scheme: 'bearer', type: 'http' }],\n            url: '/evals/{eval_id}',\n            ...options,\n            headers: {\n                'Content-Type': 'application/json',\n                ...options.headers\n            }\n        });\n    }\n    \n    /**\n     * Get eval runs\n     *\n     * Get a list of runs for an evaluation.\n     *\n     */\n    public getEvalRuns<ThrowOnError extends boolean = false>(options: Options<GetEvalRunsData, ThrowOnError>) {\n        return (options.client ?? this.client).get<GetEvalRunsResponses, unknown, ThrowOnError>({\n            security: [{ scheme: 'bearer', type: 'http' }],\n            url: '/evals/{eval_id}/runs',\n            ...options\n        });\n    }\n    \n    /**\n     * Create eval run\n     *\n     * Kicks off a new run for a given evaluation, specifying the data source, and what model configuration to use to test. The datasource will be validated against the schema specified in the config of the evaluation.\n     *\n     */\n    public createEvalRun<ThrowOnError extends boolean = false>(options: Options<CreateEvalRunData, ThrowOnError>) {\n        return (options.client ?? this.client).post<CreateEvalRunResponses, CreateEvalRunErrors, ThrowOnError>({\n            security: [{ scheme: 'bearer', type: 'http' }],\n            url: '/evals/{eval_id}/runs',\n            ...options,\n            headers: {\n                'Content-Type': 'application/json',\n                ...options.headers\n            }\n        });\n    }\n    \n    /**\n     * Delete eval run\n     *\n     * Delete an eval run.\n     *\n     */\n    public deleteEvalRun<ThrowOnError extends boolean = false>(options: Options<DeleteEvalRunData, ThrowOnError>) {\n        return (options.client ?? this.client).delete<DeleteEvalRunResponses, DeleteEvalRunErrors, ThrowOnError>({\n            security: [{ scheme: 'bearer', type: 'http' }],\n            url: '/evals/{eval_id}/runs/{run_id}',\n            ...options\n        });\n    }\n    \n    /**\n     * Get an eval run\n     *\n     * Get an evaluation run by ID.\n     *\n     */\n    public getEvalRun<ThrowOnError extends boolean = false>(options: Options<GetEvalRunData, ThrowOnError>) {\n        return (options.client ?? this.client).get<GetEvalRunResponses, unknown, ThrowOnError>({\n            security: [{ scheme: 'bearer', type: 'http' }],\n            url: '/evals/{eval_id}/runs/{run_id}',\n            ...options\n        });\n    }\n    \n    /**\n     * Cancel eval run\n     *\n     * Cancel an ongoing evaluation run.\n     *\n     */\n    public cancelEvalRun<ThrowOnError extends boolean = false>(options: Options<CancelEvalRunData, ThrowOnError>) {\n        return (options.client ?? this.client).post<CancelEvalRunResponses, unknown, ThrowOnError>({\n            security: [{ scheme: 'bearer', type: 'http' }],\n            url: '/evals/{eval_id}/runs/{run_id}',\n            ...options\n        });\n    }\n    \n    /**\n     * Get eval run output items\n     *\n     * Get a list of output items for an evaluation run.\n     *\n     */\n    public getEvalRunOutputItems<ThrowOnError extends boolean = false>(options: Options<GetEvalRunOutputItemsData, ThrowOnError>) {\n        return (options.client ?? this.client).get<GetEvalRunOutputItemsResponses, unknown, ThrowOnError>({\n            security: [{ scheme: 'bearer', type: 'http' }],\n            url: '/evals/{eval_id}/runs/{run_id}/output_items',\n            ...options\n        });\n    }\n    \n    /**\n     * Get an output item of an eval run\n     *\n     * Get an evaluation run output item by ID.\n     *\n     */\n    public getEvalRunOutputItem<ThrowOnError extends boolean = false>(options: Options<GetEvalRunOutputItemData, ThrowOnError>) {\n        return (options.client ?? this.client).get<GetEvalRunOutputItemResponses, unknown, ThrowOnError>({\n            security: [{ scheme: 'bearer', type: 'http' }],\n            url: '/evals/{eval_id}/runs/{run_id}/output_items/{output_item_id}',\n            ...options\n        });\n    }\n    \n    /**\n     * List files\n     *\n     * Returns a list of files.\n     */\n    public listFiles<ThrowOnError extends boolean = false>(options?: Options<ListFilesData, ThrowOnError>) {\n        return (options?.client ?? this.client).get<ListFilesResponses, unknown, ThrowOnError>({\n            security: [{ scheme: 'bearer', type: 'http' }],\n            url: '/files',\n            ...options\n        });\n    }\n    \n    /**\n     * Upload file\n     *\n     * Upload a file that can be used across various endpoints. Individual files can be up to 512 MB, and the size of all files uploaded by one organization can be up to 1 TB.\n     *\n     * The Assistants API supports files up to 2 million tokens and of specific file types. See the [Assistants Tools guide](https://platform.openai.com/docs/assistants/tools) for details.\n     *\n     * The Fine-tuning API only supports `.jsonl` files. The input also has certain required formats for fine-tuning [chat](https://platform.openai.com/docs/api-reference/fine-tuning/chat-input) or [completions](https://platform.openai.com/docs/api-reference/fine-tuning/completions-input) models.\n     *\n     * The Batch API only supports `.jsonl` files up to 200 MB in size. The input also has a specific required [format](https://platform.openai.com/docs/api-reference/batch/request-input).\n     *\n     * Please [contact us](https://help.openai.com/) if you need to increase these storage limits.\n     *\n     */\n    public createFile<ThrowOnError extends boolean = false>(options: Options<CreateFileData, ThrowOnError>) {\n        return (options.client ?? this.client).post<CreateFileResponses, unknown, ThrowOnError>({\n            ...formDataBodySerializer,\n            security: [{ scheme: 'bearer', type: 'http' }],\n            url: '/files',\n            ...options,\n            headers: {\n                'Content-Type': null,\n                ...options.headers\n            }\n        });\n    }\n    \n    /**\n     * Delete file\n     *\n     * Delete a file.\n     */\n    public deleteFile<ThrowOnError extends boolean = false>(options: Options<DeleteFileData, ThrowOnError>) {\n        return (options.client ?? this.client).delete<DeleteFileResponses, unknown, ThrowOnError>({\n            security: [{ scheme: 'bearer', type: 'http' }],\n            url: '/files/{file_id}',\n            ...options\n        });\n    }\n    \n    /**\n     * Retrieve file\n     *\n     * Returns information about a specific file.\n     */\n    public retrieveFile<ThrowOnError extends boolean = false>(options: Options<RetrieveFileData, ThrowOnError>) {\n        return (options.client ?? this.client).get<RetrieveFileResponses, unknown, ThrowOnError>({\n            security: [{ scheme: 'bearer', type: 'http' }],\n            url: '/files/{file_id}',\n            ...options\n        });\n    }\n    \n    /**\n     * Retrieve file content\n     *\n     * Returns the contents of the specified file.\n     */\n    public downloadFile<ThrowOnError extends boolean = false>(options: Options<DownloadFileData, ThrowOnError>) {\n        return (options.client ?? this.client).get<DownloadFileResponses, unknown, ThrowOnError>({\n            security: [{ scheme: 'bearer', type: 'http' }],\n            url: '/files/{file_id}/content',\n            ...options\n        });\n    }\n    \n    /**\n     * Run grader\n     *\n     * Run a grader.\n     *\n     */\n    public runGrader<ThrowOnError extends boolean = false>(options: Options<RunGraderData, ThrowOnError>) {\n        return (options.client ?? this.client).post<RunGraderResponses, unknown, ThrowOnError>({\n            security: [{ scheme: 'bearer', type: 'http' }],\n            url: '/fine_tuning/alpha/graders/run',\n            ...options,\n            headers: {\n                'Content-Type': 'application/json',\n                ...options.headers\n            }\n        });\n    }\n    \n    /**\n     * Validate grader\n     *\n     * Validate a grader.\n     *\n     */\n    public validateGrader<ThrowOnError extends boolean = false>(options: Options<ValidateGraderData, ThrowOnError>) {\n        return (options.client ?? this.client).post<ValidateGraderResponses, unknown, ThrowOnError>({\n            security: [{ scheme: 'bearer', type: 'http' }],\n            url: '/fine_tuning/alpha/graders/validate',\n            ...options,\n            headers: {\n                'Content-Type': 'application/json',\n                ...options.headers\n            }\n        });\n    }\n    \n    /**\n     * List checkpoint permissions\n     *\n     * **NOTE:** This endpoint requires an [admin API key](../admin-api-keys).\n     *\n     * Organization owners can use this endpoint to view all permissions for a fine-tuned model checkpoint.\n     *\n     */\n    public listFineTuningCheckpointPermissions<ThrowOnError extends boolean = false>(options: Options<ListFineTuningCheckpointPermissionsData, ThrowOnError>) {\n        return (options.client ?? this.client).get<ListFineTuningCheckpointPermissionsResponses, unknown, ThrowOnError>({\n            security: [{ scheme: 'bearer', type: 'http' }],\n            url: '/fine_tuning/checkpoints/{fine_tuned_model_checkpoint}/permissions',\n            ...options\n        });\n    }\n    \n    /**\n     * Create checkpoint permissions\n     *\n     * **NOTE:** Calling this endpoint requires an [admin API key](../admin-api-keys).\n     *\n     * This enables organization owners to share fine-tuned models with other projects in their organization.\n     *\n     */\n    public createFineTuningCheckpointPermission<ThrowOnError extends boolean = false>(options: Options<CreateFineTuningCheckpointPermissionData, ThrowOnError>) {\n        return (options.client ?? this.client).post<CreateFineTuningCheckpointPermissionResponses, unknown, ThrowOnError>({\n            security: [{ scheme: 'bearer', type: 'http' }],\n            url: '/fine_tuning/checkpoints/{fine_tuned_model_checkpoint}/permissions',\n            ...options,\n            headers: {\n                'Content-Type': 'application/json',\n                ...options.headers\n            }\n        });\n    }\n    \n    /**\n     * Delete checkpoint permission\n     *\n     * **NOTE:** This endpoint requires an [admin API key](../admin-api-keys).\n     *\n     * Organization owners can use this endpoint to delete a permission for a fine-tuned model checkpoint.\n     *\n     */\n    public deleteFineTuningCheckpointPermission<ThrowOnError extends boolean = false>(options: Options<DeleteFineTuningCheckpointPermissionData, ThrowOnError>) {\n        return (options.client ?? this.client).delete<DeleteFineTuningCheckpointPermissionResponses, unknown, ThrowOnError>({\n            security: [{ scheme: 'bearer', type: 'http' }],\n            url: '/fine_tuning/checkpoints/{fine_tuned_model_checkpoint}/permissions/{permission_id}',\n            ...options\n        });\n    }\n    \n    /**\n     * List fine-tuning jobs\n     *\n     * List your organization's fine-tuning jobs\n     *\n     */\n    public listPaginatedFineTuningJobs<ThrowOnError extends boolean = false>(options?: Options<ListPaginatedFineTuningJobsData, ThrowOnError>) {\n        return (options?.client ?? this.client).get<ListPaginatedFineTuningJobsResponses, unknown, ThrowOnError>({\n            security: [{ scheme: 'bearer', type: 'http' }],\n            url: '/fine_tuning/jobs',\n            ...options\n        });\n    }\n    \n    /**\n     * Create fine-tuning job\n     *\n     * Creates a fine-tuning job which begins the process of creating a new model from a given dataset.\n     *\n     * Response includes details of the enqueued job including job status and the name of the fine-tuned models once complete.\n     *\n     * [Learn more about fine-tuning](https://platform.openai.com/docs/guides/model-optimization)\n     *\n     */\n    public createFineTuningJob<ThrowOnError extends boolean = false>(options: Options<CreateFineTuningJobData, ThrowOnError>) {\n        return (options.client ?? this.client).post<CreateFineTuningJobResponses, unknown, ThrowOnError>({\n            security: [{ scheme: 'bearer', type: 'http' }],\n            url: '/fine_tuning/jobs',\n            ...options,\n            headers: {\n                'Content-Type': 'application/json',\n                ...options.headers\n            }\n        });\n    }\n    \n    /**\n     * Retrieve fine-tuning job\n     *\n     * Get info about a fine-tuning job.\n     *\n     * [Learn more about fine-tuning](https://platform.openai.com/docs/guides/model-optimization)\n     *\n     */\n    public retrieveFineTuningJob<ThrowOnError extends boolean = false>(options: Options<RetrieveFineTuningJobData, ThrowOnError>) {\n        return (options.client ?? this.client).get<RetrieveFineTuningJobResponses, unknown, ThrowOnError>({\n            security: [{ scheme: 'bearer', type: 'http' }],\n            url: '/fine_tuning/jobs/{fine_tuning_job_id}',\n            ...options\n        });\n    }\n    \n    /**\n     * Cancel fine-tuning\n     *\n     * Immediately cancel a fine-tune job.\n     *\n     */\n    public cancelFineTuningJob<ThrowOnError extends boolean = false>(options: Options<CancelFineTuningJobData, ThrowOnError>) {\n        return (options.client ?? this.client).post<CancelFineTuningJobResponses, unknown, ThrowOnError>({\n            security: [{ scheme: 'bearer', type: 'http' }],\n            url: '/fine_tuning/jobs/{fine_tuning_job_id}/cancel',\n            ...options\n        });\n    }\n    \n    /**\n     * List fine-tuning checkpoints\n     *\n     * List checkpoints for a fine-tuning job.\n     *\n     */\n    public listFineTuningJobCheckpoints<ThrowOnError extends boolean = false>(options: Options<ListFineTuningJobCheckpointsData, ThrowOnError>) {\n        return (options.client ?? this.client).get<ListFineTuningJobCheckpointsResponses, unknown, ThrowOnError>({\n            security: [{ scheme: 'bearer', type: 'http' }],\n            url: '/fine_tuning/jobs/{fine_tuning_job_id}/checkpoints',\n            ...options\n        });\n    }\n    \n    /**\n     * List fine-tuning events\n     *\n     * Get status updates for a fine-tuning job.\n     *\n     */\n    public listFineTuningEvents<ThrowOnError extends boolean = false>(options: Options<ListFineTuningEventsData, ThrowOnError>) {\n        return (options.client ?? this.client).get<ListFineTuningEventsResponses, unknown, ThrowOnError>({\n            security: [{ scheme: 'bearer', type: 'http' }],\n            url: '/fine_tuning/jobs/{fine_tuning_job_id}/events',\n            ...options\n        });\n    }\n    \n    /**\n     * Pause fine-tuning\n     *\n     * Pause a fine-tune job.\n     *\n     */\n    public pauseFineTuningJob<ThrowOnError extends boolean = false>(options: Options<PauseFineTuningJobData, ThrowOnError>) {\n        return (options.client ?? this.client).post<PauseFineTuningJobResponses, unknown, ThrowOnError>({\n            security: [{ scheme: 'bearer', type: 'http' }],\n            url: '/fine_tuning/jobs/{fine_tuning_job_id}/pause',\n            ...options\n        });\n    }\n    \n    /**\n     * Resume fine-tuning\n     *\n     * Resume a fine-tune job.\n     *\n     */\n    public resumeFineTuningJob<ThrowOnError extends boolean = false>(options: Options<ResumeFineTuningJobData, ThrowOnError>) {\n        return (options.client ?? this.client).post<ResumeFineTuningJobResponses, unknown, ThrowOnError>({\n            security: [{ scheme: 'bearer', type: 'http' }],\n            url: '/fine_tuning/jobs/{fine_tuning_job_id}/resume',\n            ...options\n        });\n    }\n    \n    /**\n     * Create image edit\n     *\n     * Creates an edited or extended image given one or more source images and a prompt. This endpoint only supports `gpt-image-1` and `dall-e-2`.\n     */\n    public createImageEdit<ThrowOnError extends boolean = false>(options: Options<CreateImageEditData, ThrowOnError>) {\n        return (options.client ?? this.client).post<CreateImageEditResponses, unknown, ThrowOnError>({\n            ...formDataBodySerializer,\n            security: [{ scheme: 'bearer', type: 'http' }],\n            url: '/images/edits',\n            ...options,\n            headers: {\n                'Content-Type': null,\n                ...options.headers\n            }\n        });\n    }\n    \n    /**\n     * Create image\n     *\n     * Creates an image given a prompt. [Learn more](https://platform.openai.com/docs/guides/images).\n     *\n     */\n    public createImage<ThrowOnError extends boolean = false>(options: Options<CreateImageData, ThrowOnError>) {\n        return (options.client ?? this.client).post<CreateImageResponses, unknown, ThrowOnError>({\n            security: [{ scheme: 'bearer', type: 'http' }],\n            url: '/images/generations',\n            ...options,\n            headers: {\n                'Content-Type': 'application/json',\n                ...options.headers\n            }\n        });\n    }\n    \n    /**\n     * Create image variation\n     *\n     * Creates a variation of a given image. This endpoint only supports `dall-e-2`.\n     */\n    public createImageVariation<ThrowOnError extends boolean = false>(options: Options<CreateImageVariationData, ThrowOnError>) {\n        return (options.client ?? this.client).post<CreateImageVariationResponses, unknown, ThrowOnError>({\n            ...formDataBodySerializer,\n            security: [{ scheme: 'bearer', type: 'http' }],\n            url: '/images/variations',\n            ...options,\n            headers: {\n                'Content-Type': null,\n                ...options.headers\n            }\n        });\n    }\n    \n    /**\n     * List models\n     *\n     * Lists the currently available models, and provides basic information about each one such as the owner and availability.\n     */\n    public listModels<ThrowOnError extends boolean = false>(options?: Options<ListModelsData, ThrowOnError>) {\n        return (options?.client ?? this.client).get<ListModelsResponses, unknown, ThrowOnError>({\n            security: [{ scheme: 'bearer', type: 'http' }],\n            url: '/models',\n            ...options\n        });\n    }\n    \n    /**\n     * Delete a fine-tuned model\n     *\n     * Delete a fine-tuned model. You must have the Owner role in your organization to delete a model.\n     */\n    public deleteModel<ThrowOnError extends boolean = false>(options: Options<DeleteModelData, ThrowOnError>) {\n        return (options.client ?? this.client).delete<DeleteModelResponses, unknown, ThrowOnError>({\n            security: [{ scheme: 'bearer', type: 'http' }],\n            url: '/models/{model}',\n            ...options\n        });\n    }\n    \n    /**\n     * Retrieve model\n     *\n     * Retrieves a model instance, providing basic information about the model such as the owner and permissioning.\n     */\n    public retrieveModel<ThrowOnError extends boolean = false>(options: Options<RetrieveModelData, ThrowOnError>) {\n        return (options.client ?? this.client).get<RetrieveModelResponses, unknown, ThrowOnError>({\n            security: [{ scheme: 'bearer', type: 'http' }],\n            url: '/models/{model}',\n            ...options\n        });\n    }\n    \n    /**\n     * Create moderation\n     *\n     * Classifies if text and/or image inputs are potentially harmful. Learn\n     * more in the [moderation guide](https://platform.openai.com/docs/guides/moderation).\n     *\n     */\n    public createModeration<ThrowOnError extends boolean = false>(options: Options<CreateModerationData, ThrowOnError>) {\n        return (options.client ?? this.client).post<CreateModerationResponses, unknown, ThrowOnError>({\n            security: [{ scheme: 'bearer', type: 'http' }],\n            url: '/moderations',\n            ...options,\n            headers: {\n                'Content-Type': 'application/json',\n                ...options.headers\n            }\n        });\n    }\n    \n    /**\n     * List all organization and project API keys.\n     *\n     * List organization API keys\n     */\n    public adminApiKeysList<ThrowOnError extends boolean = false>(options?: Options<AdminApiKeysListData, ThrowOnError>) {\n        return (options?.client ?? this.client).get<AdminApiKeysListResponses, unknown, ThrowOnError>({\n            security: [{ scheme: 'bearer', type: 'http' }],\n            url: '/organization/admin_api_keys',\n            ...options\n        });\n    }\n    \n    /**\n     * Create admin API key\n     *\n     * Create an organization admin API key\n     */\n    public adminApiKeysCreate<ThrowOnError extends boolean = false>(options: Options<AdminApiKeysCreateData, ThrowOnError>) {\n        return (options.client ?? this.client).post<AdminApiKeysCreateResponses, unknown, ThrowOnError>({\n            security: [{ scheme: 'bearer', type: 'http' }],\n            url: '/organization/admin_api_keys',\n            ...options,\n            headers: {\n                'Content-Type': 'application/json',\n                ...options.headers\n            }\n        });\n    }\n    \n    /**\n     * Delete admin API key\n     *\n     * Delete an organization admin API key\n     */\n    public adminApiKeysDelete<ThrowOnError extends boolean = false>(options: Options<AdminApiKeysDeleteData, ThrowOnError>) {\n        return (options.client ?? this.client).delete<AdminApiKeysDeleteResponses, unknown, ThrowOnError>({\n            security: [{ scheme: 'bearer', type: 'http' }],\n            url: '/organization/admin_api_keys/{key_id}',\n            ...options\n        });\n    }\n    \n    /**\n     * Retrieve admin API key\n     *\n     * Retrieve a single organization API key\n     */\n    public adminApiKeysGet<ThrowOnError extends boolean = false>(options: Options<AdminApiKeysGetData, ThrowOnError>) {\n        return (options.client ?? this.client).get<AdminApiKeysGetResponses, unknown, ThrowOnError>({\n            security: [{ scheme: 'bearer', type: 'http' }],\n            url: '/organization/admin_api_keys/{key_id}',\n            ...options\n        });\n    }\n    \n    /**\n     * List audit logs\n     *\n     * List user actions and configuration changes within this organization.\n     */\n    public listAuditLogs<ThrowOnError extends boolean = false>(options?: Options<ListAuditLogsData, ThrowOnError>) {\n        return (options?.client ?? this.client).get<ListAuditLogsResponses, unknown, ThrowOnError>({\n            querySerializer: { parameters: { effective_at: { object: { style: 'form' } } } },\n            security: [{ scheme: 'bearer', type: 'http' }],\n            url: '/organization/audit_logs',\n            ...options\n        });\n    }\n    \n    /**\n     * List organization certificates\n     *\n     * List uploaded certificates for this organization.\n     */\n    public listOrganizationCertificates<ThrowOnError extends boolean = false>(options?: Options<ListOrganizationCertificatesData, ThrowOnError>) {\n        return (options?.client ?? this.client).get<ListOrganizationCertificatesResponses, unknown, ThrowOnError>({\n            security: [{ scheme: 'bearer', type: 'http' }],\n            url: '/organization/certificates',\n            ...options\n        });\n    }\n    \n    /**\n     * Upload certificate\n     *\n     * Upload a certificate to the organization. This does **not** automatically activate the certificate.\n     *\n     * Organizations can upload up to 50 certificates.\n     *\n     */\n    public uploadCertificate<ThrowOnError extends boolean = false>(options: Options<UploadCertificateData, ThrowOnError>) {\n        return (options.client ?? this.client).post<UploadCertificateResponses, unknown, ThrowOnError>({\n            security: [{ scheme: 'bearer', type: 'http' }],\n            url: '/organization/certificates',\n            ...options,\n            headers: {\n                'Content-Type': 'application/json',\n                ...options.headers\n            }\n        });\n    }\n    \n    /**\n     * Activate certificates for organization\n     *\n     * Activate certificates at the organization level.\n     *\n     * You can atomically and idempotently activate up to 10 certificates at a time.\n     *\n     */\n    public activateOrganizationCertificates<ThrowOnError extends boolean = false>(options: Options<ActivateOrganizationCertificatesData, ThrowOnError>) {\n        return (options.client ?? this.client).post<ActivateOrganizationCertificatesResponses, unknown, ThrowOnError>({\n            security: [{ scheme: 'bearer', type: 'http' }],\n            url: '/organization/certificates/activate',\n            ...options,\n            headers: {\n                'Content-Type': 'application/json',\n                ...options.headers\n            }\n        });\n    }\n    \n    /**\n     * Deactivate certificates for organization\n     *\n     * Deactivate certificates at the organization level.\n     *\n     * You can atomically and idempotently deactivate up to 10 certificates at a time.\n     *\n     */\n    public deactivateOrganizationCertificates<ThrowOnError extends boolean = false>(options: Options<DeactivateOrganizationCertificatesData, ThrowOnError>) {\n        return (options.client ?? this.client).post<DeactivateOrganizationCertificatesResponses, unknown, ThrowOnError>({\n            security: [{ scheme: 'bearer', type: 'http' }],\n            url: '/organization/certificates/deactivate',\n            ...options,\n            headers: {\n                'Content-Type': 'application/json',\n                ...options.headers\n            }\n        });\n    }\n    \n    /**\n     * Delete certificate\n     *\n     * Delete a certificate from the organization.\n     *\n     * The certificate must be inactive for the organization and all projects.\n     *\n     */\n    public deleteCertificate<ThrowOnError extends boolean = false>(options?: Options<DeleteCertificateData, ThrowOnError>) {\n        return (options?.client ?? this.client).delete<DeleteCertificateResponses, unknown, ThrowOnError>({\n            security: [{ scheme: 'bearer', type: 'http' }],\n            url: '/organization/certificates/{certificate_id}',\n            ...options\n        });\n    }\n    \n    /**\n     * Get certificate\n     *\n     * Get a certificate that has been uploaded to the organization.\n     *\n     * You can get a certificate regardless of whether it is active or not.\n     *\n     */\n    public getCertificate<ThrowOnError extends boolean = false>(options: Options<GetCertificateData, ThrowOnError>) {\n        return (options.client ?? this.client).get<GetCertificateResponses, unknown, ThrowOnError>({\n            security: [{ scheme: 'bearer', type: 'http' }],\n            url: '/organization/certificates/{certificate_id}',\n            ...options\n        });\n    }\n    \n    /**\n     * Modify certificate\n     *\n     * Modify a certificate. Note that only the name can be modified.\n     *\n     */\n    public modifyCertificate<ThrowOnError extends boolean = false>(options: Options<ModifyCertificateData, ThrowOnError>) {\n        return (options.client ?? this.client).post<ModifyCertificateResponses, unknown, ThrowOnError>({\n            security: [{ scheme: 'bearer', type: 'http' }],\n            url: '/organization/certificates/{certificate_id}',\n            ...options,\n            headers: {\n                'Content-Type': 'application/json',\n                ...options.headers\n            }\n        });\n    }\n    \n    /**\n     * Costs\n     *\n     * Get costs details for the organization.\n     */\n    public usageCosts<ThrowOnError extends boolean = false>(options: Options<UsageCostsData, ThrowOnError>) {\n        return (options.client ?? this.client).get<UsageCostsResponses, unknown, ThrowOnError>({\n            security: [{ scheme: 'bearer', type: 'http' }],\n            url: '/organization/costs',\n            ...options\n        });\n    }\n    \n    /**\n     * List invites\n     *\n     * Returns a list of invites in the organization.\n     */\n    public listInvites<ThrowOnError extends boolean = false>(options?: Options<ListInvitesData, ThrowOnError>) {\n        return (options?.client ?? this.client).get<ListInvitesResponses, unknown, ThrowOnError>({\n            security: [{ scheme: 'bearer', type: 'http' }],\n            url: '/organization/invites',\n            ...options\n        });\n    }\n    \n    /**\n     * Create invite\n     *\n     * Create an invite for a user to the organization. The invite must be accepted by the user before they have access to the organization.\n     */\n    public inviteUser<ThrowOnError extends boolean = false>(options: Options<InviteUserData, ThrowOnError>) {\n        return (options.client ?? this.client).post<InviteUserResponses, unknown, ThrowOnError>({\n            security: [{ scheme: 'bearer', type: 'http' }],\n            url: '/organization/invites',\n            ...options,\n            headers: {\n                'Content-Type': 'application/json',\n                ...options.headers\n            }\n        });\n    }\n    \n    /**\n     * Delete invite\n     *\n     * Delete an invite. If the invite has already been accepted, it cannot be deleted.\n     */\n    public deleteInvite<ThrowOnError extends boolean = false>(options: Options<DeleteInviteData, ThrowOnError>) {\n        return (options.client ?? this.client).delete<DeleteInviteResponses, unknown, ThrowOnError>({\n            security: [{ scheme: 'bearer', type: 'http' }],\n            url: '/organization/invites/{invite_id}',\n            ...options\n        });\n    }\n    \n    /**\n     * Retrieve invite\n     *\n     * Retrieves an invite.\n     */\n    public retrieveInvite<ThrowOnError extends boolean = false>(options: Options<RetrieveInviteData, ThrowOnError>) {\n        return (options.client ?? this.client).get<RetrieveInviteResponses, unknown, ThrowOnError>({\n            security: [{ scheme: 'bearer', type: 'http' }],\n            url: '/organization/invites/{invite_id}',\n            ...options\n        });\n    }\n    \n    /**\n     * List projects\n     *\n     * Returns a list of projects.\n     */\n    public listProjects<ThrowOnError extends boolean = false>(options?: Options<ListProjectsData, ThrowOnError>) {\n        return (options?.client ?? this.client).get<ListProjectsResponses, unknown, ThrowOnError>({\n            security: [{ scheme: 'bearer', type: 'http' }],\n            url: '/organization/projects',\n            ...options\n        });\n    }\n    \n    /**\n     * Create project\n     *\n     * Create a new project in the organization. Projects can be created and archived, but cannot be deleted.\n     */\n    public createProject<ThrowOnError extends boolean = false>(options: Options<CreateProjectData, ThrowOnError>) {\n        return (options.client ?? this.client).post<CreateProjectResponses, unknown, ThrowOnError>({\n            security: [{ scheme: 'bearer', type: 'http' }],\n            url: '/organization/projects',\n            ...options,\n            headers: {\n                'Content-Type': 'application/json',\n                ...options.headers\n            }\n        });\n    }\n    \n    /**\n     * Retrieve project\n     *\n     * Retrieves a project.\n     */\n    public retrieveProject<ThrowOnError extends boolean = false>(options: Options<RetrieveProjectData, ThrowOnError>) {\n        return (options.client ?? this.client).get<RetrieveProjectResponses, unknown, ThrowOnError>({\n            security: [{ scheme: 'bearer', type: 'http' }],\n            url: '/organization/projects/{project_id}',\n            ...options\n        });\n    }\n    \n    /**\n     * Modify project\n     *\n     * Modifies a project in the organization.\n     */\n    public modifyProject<ThrowOnError extends boolean = false>(options: Options<ModifyProjectData, ThrowOnError>) {\n        return (options.client ?? this.client).post<ModifyProjectResponses, ModifyProjectErrors, ThrowOnError>({\n            security: [{ scheme: 'bearer', type: 'http' }],\n            url: '/organization/projects/{project_id}',\n            ...options,\n            headers: {\n                'Content-Type': 'application/json',\n                ...options.headers\n            }\n        });\n    }\n    \n    /**\n     * List project API keys\n     *\n     * Returns a list of API keys in the project.\n     */\n    public listProjectApiKeys<ThrowOnError extends boolean = false>(options: Options<ListProjectApiKeysData, ThrowOnError>) {\n        return (options.client ?? this.client).get<ListProjectApiKeysResponses, unknown, ThrowOnError>({\n            security: [{ scheme: 'bearer', type: 'http' }],\n            url: '/organization/projects/{project_id}/api_keys',\n            ...options\n        });\n    }\n    \n    /**\n     * Delete project API key\n     *\n     * Deletes an API key from the project.\n     */\n    public deleteProjectApiKey<ThrowOnError extends boolean = false>(options: Options<DeleteProjectApiKeyData, ThrowOnError>) {\n        return (options.client ?? this.client).delete<DeleteProjectApiKeyResponses, DeleteProjectApiKeyErrors, ThrowOnError>({\n            security: [{ scheme: 'bearer', type: 'http' }],\n            url: '/organization/projects/{project_id}/api_keys/{key_id}',\n            ...options\n        });\n    }\n    \n    /**\n     * Retrieve project API key\n     *\n     * Retrieves an API key in the project.\n     */\n    public retrieveProjectApiKey<ThrowOnError extends boolean = false>(options: Options<RetrieveProjectApiKeyData, ThrowOnError>) {\n        return (options.client ?? this.client).get<RetrieveProjectApiKeyResponses, unknown, ThrowOnError>({\n            security: [{ scheme: 'bearer', type: 'http' }],\n            url: '/organization/projects/{project_id}/api_keys/{key_id}',\n            ...options\n        });\n    }\n    \n    /**\n     * Archive project\n     *\n     * Archives a project in the organization. Archived projects cannot be used or updated.\n     */\n    public archiveProject<ThrowOnError extends boolean = false>(options: Options<ArchiveProjectData, ThrowOnError>) {\n        return (options.client ?? this.client).post<ArchiveProjectResponses, unknown, ThrowOnError>({\n            security: [{ scheme: 'bearer', type: 'http' }],\n            url: '/organization/projects/{project_id}/archive',\n            ...options\n        });\n    }\n    \n    /**\n     * List project certificates\n     *\n     * List certificates for this project.\n     */\n    public listProjectCertificates<ThrowOnError extends boolean = false>(options: Options<ListProjectCertificatesData, ThrowOnError>) {\n        return (options.client ?? this.client).get<ListProjectCertificatesResponses, unknown, ThrowOnError>({\n            security: [{ scheme: 'bearer', type: 'http' }],\n            url: '/organization/projects/{project_id}/certificates',\n            ...options\n        });\n    }\n    \n    /**\n     * Activate certificates for project\n     *\n     * Activate certificates at the project level.\n     *\n     * You can atomically and idempotently activate up to 10 certificates at a time.\n     *\n     */\n    public activateProjectCertificates<ThrowOnError extends boolean = false>(options: Options<ActivateProjectCertificatesData, ThrowOnError>) {\n        return (options.client ?? this.client).post<ActivateProjectCertificatesResponses, unknown, ThrowOnError>({\n            security: [{ scheme: 'bearer', type: 'http' }],\n            url: '/organization/projects/{project_id}/certificates/activate',\n            ...options,\n            headers: {\n                'Content-Type': 'application/json',\n                ...options.headers\n            }\n        });\n    }\n    \n    /**\n     * Deactivate certificates for project\n     *\n     * Deactivate certificates at the project level. You can atomically and\n     * idempotently deactivate up to 10 certificates at a time.\n     *\n     */\n    public deactivateProjectCertificates<ThrowOnError extends boolean = false>(options: Options<DeactivateProjectCertificatesData, ThrowOnError>) {\n        return (options.client ?? this.client).post<DeactivateProjectCertificatesResponses, unknown, ThrowOnError>({\n            security: [{ scheme: 'bearer', type: 'http' }],\n            url: '/organization/projects/{project_id}/certificates/deactivate',\n            ...options,\n            headers: {\n                'Content-Type': 'application/json',\n                ...options.headers\n            }\n        });\n    }\n    \n    /**\n     * List project rate limits\n     *\n     * Returns the rate limits per model for a project.\n     */\n    public listProjectRateLimits<ThrowOnError extends boolean = false>(options: Options<ListProjectRateLimitsData, ThrowOnError>) {\n        return (options.client ?? this.client).get<ListProjectRateLimitsResponses, unknown, ThrowOnError>({\n            security: [{ scheme: 'bearer', type: 'http' }],\n            url: '/organization/projects/{project_id}/rate_limits',\n            ...options\n        });\n    }\n    \n    /**\n     * Modify project rate limit\n     *\n     * Updates a project rate limit.\n     */\n    public updateProjectRateLimits<ThrowOnError extends boolean = false>(options: Options<UpdateProjectRateLimitsData, ThrowOnError>) {\n        return (options.client ?? this.client).post<UpdateProjectRateLimitsResponses, UpdateProjectRateLimitsErrors, ThrowOnError>({\n            security: [{ scheme: 'bearer', type: 'http' }],\n            url: '/organization/projects/{project_id}/rate_limits/{rate_limit_id}',\n            ...options,\n            headers: {\n                'Content-Type': 'application/json',\n                ...options.headers\n            }\n        });\n    }\n    \n    /**\n     * List project service accounts\n     *\n     * Returns a list of service accounts in the project.\n     */\n    public listProjectServiceAccounts<ThrowOnError extends boolean = false>(options: Options<ListProjectServiceAccountsData, ThrowOnError>) {\n        return (options.client ?? this.client).get<ListProjectServiceAccountsResponses, ListProjectServiceAccountsErrors, ThrowOnError>({\n            security: [{ scheme: 'bearer', type: 'http' }],\n            url: '/organization/projects/{project_id}/service_accounts',\n            ...options\n        });\n    }\n    \n    /**\n     * Create project service account\n     *\n     * Creates a new service account in the project. This also returns an unredacted API key for the service account.\n     */\n    public createProjectServiceAccount<ThrowOnError extends boolean = false>(options: Options<CreateProjectServiceAccountData, ThrowOnError>) {\n        return (options.client ?? this.client).post<CreateProjectServiceAccountResponses, CreateProjectServiceAccountErrors, ThrowOnError>({\n            security: [{ scheme: 'bearer', type: 'http' }],\n            url: '/organization/projects/{project_id}/service_accounts',\n            ...options,\n            headers: {\n                'Content-Type': 'application/json',\n                ...options.headers\n            }\n        });\n    }\n    \n    /**\n     * Delete project service account\n     *\n     * Deletes a service account from the project.\n     */\n    public deleteProjectServiceAccount<ThrowOnError extends boolean = false>(options: Options<DeleteProjectServiceAccountData, ThrowOnError>) {\n        return (options.client ?? this.client).delete<DeleteProjectServiceAccountResponses, unknown, ThrowOnError>({\n            security: [{ scheme: 'bearer', type: 'http' }],\n            url: '/organization/projects/{project_id}/service_accounts/{service_account_id}',\n            ...options\n        });\n    }\n    \n    /**\n     * Retrieve project service account\n     *\n     * Retrieves a service account in the project.\n     */\n    public retrieveProjectServiceAccount<ThrowOnError extends boolean = false>(options: Options<RetrieveProjectServiceAccountData, ThrowOnError>) {\n        return (options.client ?? this.client).get<RetrieveProjectServiceAccountResponses, unknown, ThrowOnError>({\n            security: [{ scheme: 'bearer', type: 'http' }],\n            url: '/organization/projects/{project_id}/service_accounts/{service_account_id}',\n            ...options\n        });\n    }\n    \n    /**\n     * List project users\n     *\n     * Returns a list of users in the project.\n     */\n    public listProjectUsers<ThrowOnError extends boolean = false>(options: Options<ListProjectUsersData, ThrowOnError>) {\n        return (options.client ?? this.client).get<ListProjectUsersResponses, ListProjectUsersErrors, ThrowOnError>({\n            security: [{ scheme: 'bearer', type: 'http' }],\n            url: '/organization/projects/{project_id}/users',\n            ...options\n        });\n    }\n    \n    /**\n     * Create project user\n     *\n     * Adds a user to the project. Users must already be members of the organization to be added to a project.\n     */\n    public createProjectUser<ThrowOnError extends boolean = false>(options: Options<CreateProjectUserData, ThrowOnError>) {\n        return (options.client ?? this.client).post<CreateProjectUserResponses, CreateProjectUserErrors, ThrowOnError>({\n            security: [{ scheme: 'bearer', type: 'http' }],\n            url: '/organization/projects/{project_id}/users',\n            ...options,\n            headers: {\n                'Content-Type': 'application/json',\n                ...options.headers\n            }\n        });\n    }\n    \n    /**\n     * Delete project user\n     *\n     * Deletes a user from the project.\n     */\n    public deleteProjectUser<ThrowOnError extends boolean = false>(options: Options<DeleteProjectUserData, ThrowOnError>) {\n        return (options.client ?? this.client).delete<DeleteProjectUserResponses, DeleteProjectUserErrors, ThrowOnError>({\n            security: [{ scheme: 'bearer', type: 'http' }],\n            url: '/organization/projects/{project_id}/users/{user_id}',\n            ...options\n        });\n    }\n    \n    /**\n     * Retrieve project user\n     *\n     * Retrieves a user in the project.\n     */\n    public retrieveProjectUser<ThrowOnError extends boolean = false>(options: Options<RetrieveProjectUserData, ThrowOnError>) {\n        return (options.client ?? this.client).get<RetrieveProjectUserResponses, unknown, ThrowOnError>({\n            security: [{ scheme: 'bearer', type: 'http' }],\n            url: '/organization/projects/{project_id}/users/{user_id}',\n            ...options\n        });\n    }\n    \n    /**\n     * Modify project user\n     *\n     * Modifies a user's role in the project.\n     */\n    public modifyProjectUser<ThrowOnError extends boolean = false>(options: Options<ModifyProjectUserData, ThrowOnError>) {\n        return (options.client ?? this.client).post<ModifyProjectUserResponses, ModifyProjectUserErrors, ThrowOnError>({\n            security: [{ scheme: 'bearer', type: 'http' }],\n            url: '/organization/projects/{project_id}/users/{user_id}',\n            ...options,\n            headers: {\n                'Content-Type': 'application/json',\n                ...options.headers\n            }\n        });\n    }\n    \n    /**\n     * Audio speeches\n     *\n     * Get audio speeches usage details for the organization.\n     */\n    public usageAudioSpeeches<ThrowOnError extends boolean = false>(options: Options<UsageAudioSpeechesData, ThrowOnError>) {\n        return (options.client ?? this.client).get<UsageAudioSpeechesResponses, unknown, ThrowOnError>({\n            security: [{ scheme: 'bearer', type: 'http' }],\n            url: '/organization/usage/audio_speeches',\n            ...options\n        });\n    }\n    \n    /**\n     * Audio transcriptions\n     *\n     * Get audio transcriptions usage details for the organization.\n     */\n    public usageAudioTranscriptions<ThrowOnError extends boolean = false>(options: Options<UsageAudioTranscriptionsData, ThrowOnError>) {\n        return (options.client ?? this.client).get<UsageAudioTranscriptionsResponses, unknown, ThrowOnError>({\n            security: [{ scheme: 'bearer', type: 'http' }],\n            url: '/organization/usage/audio_transcriptions',\n            ...options\n        });\n    }\n    \n    /**\n     * Code interpreter sessions\n     *\n     * Get code interpreter sessions usage details for the organization.\n     */\n    public usageCodeInterpreterSessions<ThrowOnError extends boolean = false>(options: Options<UsageCodeInterpreterSessionsData, ThrowOnError>) {\n        return (options.client ?? this.client).get<UsageCodeInterpreterSessionsResponses, unknown, ThrowOnError>({\n            security: [{ scheme: 'bearer', type: 'http' }],\n            url: '/organization/usage/code_interpreter_sessions',\n            ...options\n        });\n    }\n    \n    /**\n     * Completions\n     *\n     * Get completions usage details for the organization.\n     */\n    public usageCompletions<ThrowOnError extends boolean = false>(options: Options<UsageCompletionsData, ThrowOnError>) {\n        return (options.client ?? this.client).get<UsageCompletionsResponses, unknown, ThrowOnError>({\n            security: [{ scheme: 'bearer', type: 'http' }],\n            url: '/organization/usage/completions',\n            ...options\n        });\n    }\n    \n    /**\n     * Embeddings\n     *\n     * Get embeddings usage details for the organization.\n     */\n    public usageEmbeddings<ThrowOnError extends boolean = false>(options: Options<UsageEmbeddingsData, ThrowOnError>) {\n        return (options.client ?? this.client).get<UsageEmbeddingsResponses, unknown, ThrowOnError>({\n            security: [{ scheme: 'bearer', type: 'http' }],\n            url: '/organization/usage/embeddings',\n            ...options\n        });\n    }\n    \n    /**\n     * Images\n     *\n     * Get images usage details for the organization.\n     */\n    public usageImages<ThrowOnError extends boolean = false>(options: Options<UsageImagesData, ThrowOnError>) {\n        return (options.client ?? this.client).get<UsageImagesResponses, unknown, ThrowOnError>({\n            security: [{ scheme: 'bearer', type: 'http' }],\n            url: '/organization/usage/images',\n            ...options\n        });\n    }\n    \n    /**\n     * Moderations\n     *\n     * Get moderations usage details for the organization.\n     */\n    public usageModerations<ThrowOnError extends boolean = false>(options: Options<UsageModerationsData, ThrowOnError>) {\n        return (options.client ?? this.client).get<UsageModerationsResponses, unknown, ThrowOnError>({\n            security: [{ scheme: 'bearer', type: 'http' }],\n            url: '/organization/usage/moderations',\n            ...options\n        });\n    }\n    \n    /**\n     * Vector stores\n     *\n     * Get vector stores usage details for the organization.\n     */\n    public usageVectorStores<ThrowOnError extends boolean = false>(options: Options<UsageVectorStoresData, ThrowOnError>) {\n        return (options.client ?? this.client).get<UsageVectorStoresResponses, unknown, ThrowOnError>({\n            security: [{ scheme: 'bearer', type: 'http' }],\n            url: '/organization/usage/vector_stores',\n            ...options\n        });\n    }\n    \n    /**\n     * List users\n     *\n     * Lists all of the users in the organization.\n     */\n    public listUsers<ThrowOnError extends boolean = false>(options?: Options<ListUsersData, ThrowOnError>) {\n        return (options?.client ?? this.client).get<ListUsersResponses, unknown, ThrowOnError>({\n            security: [{ scheme: 'bearer', type: 'http' }],\n            url: '/organization/users',\n            ...options\n        });\n    }\n    \n    /**\n     * Delete user\n     *\n     * Deletes a user from the organization.\n     */\n    public deleteUser<ThrowOnError extends boolean = false>(options: Options<DeleteUserData, ThrowOnError>) {\n        return (options.client ?? this.client).delete<DeleteUserResponses, unknown, ThrowOnError>({\n            security: [{ scheme: 'bearer', type: 'http' }],\n            url: '/organization/users/{user_id}',\n            ...options\n        });\n    }\n    \n    /**\n     * Retrieve user\n     *\n     * Retrieves a user by their identifier.\n     */\n    public retrieveUser<ThrowOnError extends boolean = false>(options: Options<RetrieveUserData, ThrowOnError>) {\n        return (options.client ?? this.client).get<RetrieveUserResponses, unknown, ThrowOnError>({\n            security: [{ scheme: 'bearer', type: 'http' }],\n            url: '/organization/users/{user_id}',\n            ...options\n        });\n    }\n    \n    /**\n     * Modify user\n     *\n     * Modifies a user's role in the organization.\n     */\n    public modifyUser<ThrowOnError extends boolean = false>(options: Options<ModifyUserData, ThrowOnError>) {\n        return (options.client ?? this.client).post<ModifyUserResponses, unknown, ThrowOnError>({\n            security: [{ scheme: 'bearer', type: 'http' }],\n            url: '/organization/users/{user_id}',\n            ...options,\n            headers: {\n                'Content-Type': 'application/json',\n                ...options.headers\n            }\n        });\n    }\n    \n    /**\n     * Create session\n     *\n     * Create an ephemeral API token for use in client-side applications with the\n     * Realtime API. Can be configured with the same session parameters as the\n     * `session.update` client event.\n     *\n     * It responds with a session object, plus a `client_secret` key which contains\n     * a usable ephemeral API token that can be used to authenticate browser clients\n     * for the Realtime API.\n     *\n     */\n    public createRealtimeSession<ThrowOnError extends boolean = false>(options: Options<CreateRealtimeSessionData, ThrowOnError>) {\n        return (options.client ?? this.client).post<CreateRealtimeSessionResponses, unknown, ThrowOnError>({\n            security: [{ scheme: 'bearer', type: 'http' }],\n            url: '/realtime/sessions',\n            ...options,\n            headers: {\n                'Content-Type': 'application/json',\n                ...options.headers\n            }\n        });\n    }\n    \n    /**\n     * Create transcription session\n     *\n     * Create an ephemeral API token for use in client-side applications with the\n     * Realtime API specifically for realtime transcriptions.\n     * Can be configured with the same session parameters as the `transcription_session.update` client event.\n     *\n     * It responds with a session object, plus a `client_secret` key which contains\n     * a usable ephemeral API token that can be used to authenticate browser clients\n     * for the Realtime API.\n     *\n     */\n    public createRealtimeTranscriptionSession<ThrowOnError extends boolean = false>(options: Options<CreateRealtimeTranscriptionSessionData, ThrowOnError>) {\n        return (options.client ?? this.client).post<CreateRealtimeTranscriptionSessionResponses, unknown, ThrowOnError>({\n            security: [{ scheme: 'bearer', type: 'http' }],\n            url: '/realtime/transcription_sessions',\n            ...options,\n            headers: {\n                'Content-Type': 'application/json',\n                ...options.headers\n            }\n        });\n    }\n    \n    /**\n     * Create a model response\n     *\n     * Creates a model response. Provide [text](https://platform.openai.com/docs/guides/text) or\n     * [image](https://platform.openai.com/docs/guides/images) inputs to generate [text](https://platform.openai.com/docs/guides/text)\n     * or [JSON](https://platform.openai.com/docs/guides/structured-outputs) outputs. Have the model call\n     * your own [custom code](https://platform.openai.com/docs/guides/function-calling) or use built-in\n     * [tools](https://platform.openai.com/docs/guides/tools) like [web search](https://platform.openai.com/docs/guides/tools-web-search)\n     * or [file search](https://platform.openai.com/docs/guides/tools-file-search) to use your own data\n     * as input for the model's response.\n     *\n     */\n    public createResponse<ThrowOnError extends boolean = false>(options: Options<CreateResponseData, ThrowOnError>) {\n        return (options.client ?? this.client).post<CreateResponseResponses, unknown, ThrowOnError>({\n            security: [{ scheme: 'bearer', type: 'http' }],\n            url: '/responses',\n            ...options,\n            headers: {\n                'Content-Type': 'application/json',\n                ...options.headers\n            }\n        });\n    }\n    \n    /**\n     * Delete a model response\n     *\n     * Deletes a model response with the given ID.\n     *\n     */\n    public deleteResponse<ThrowOnError extends boolean = false>(options: Options<DeleteResponseData, ThrowOnError>) {\n        return (options.client ?? this.client).delete<DeleteResponseResponses, DeleteResponseErrors, ThrowOnError>({\n            security: [{ scheme: 'bearer', type: 'http' }],\n            url: '/responses/{response_id}',\n            ...options\n        });\n    }\n    \n    /**\n     * Get a model response\n     *\n     * Retrieves a model response with the given ID.\n     *\n     */\n    public getResponse<ThrowOnError extends boolean = false>(options: Options<GetResponseData, ThrowOnError>) {\n        return (options.client ?? this.client).get<GetResponseResponses, unknown, ThrowOnError>({\n            security: [{ scheme: 'bearer', type: 'http' }],\n            url: '/responses/{response_id}',\n            ...options\n        });\n    }\n    \n    /**\n     * Cancel a response\n     *\n     * Cancels a model response with the given ID. Only responses created with\n     * the `background` parameter set to `true` can be cancelled.\n     * [Learn more](https://platform.openai.com/docs/guides/background).\n     *\n     */\n    public cancelResponse<ThrowOnError extends boolean = false>(options: Options<CancelResponseData, ThrowOnError>) {\n        return (options.client ?? this.client).post<CancelResponseResponses, CancelResponseErrors, ThrowOnError>({\n            security: [{ scheme: 'bearer', type: 'http' }],\n            url: '/responses/{response_id}/cancel',\n            ...options\n        });\n    }\n    \n    /**\n     * List input items\n     *\n     * Returns a list of input items for a given response.\n     */\n    public listInputItems<ThrowOnError extends boolean = false>(options: Options<ListInputItemsData, ThrowOnError>) {\n        return (options.client ?? this.client).get<ListInputItemsResponses, unknown, ThrowOnError>({\n            security: [{ scheme: 'bearer', type: 'http' }],\n            url: '/responses/{response_id}/input_items',\n            ...options\n        });\n    }\n    \n    /**\n     * Create thread\n     *\n     * Create a thread.\n     */\n    public createThread<ThrowOnError extends boolean = false>(options?: Options<CreateThreadData, ThrowOnError>) {\n        return (options?.client ?? this.client).post<CreateThreadResponses, unknown, ThrowOnError>({\n            security: [{ scheme: 'bearer', type: 'http' }],\n            url: '/threads',\n            ...options,\n            headers: {\n                'Content-Type': 'application/json',\n                ...options?.headers\n            }\n        });\n    }\n    \n    /**\n     * Create thread and run\n     *\n     * Create a thread and run it in one request.\n     */\n    public createThreadAndRun<ThrowOnError extends boolean = false>(options: Options<CreateThreadAndRunData, ThrowOnError>) {\n        return (options.client ?? this.client).post<CreateThreadAndRunResponses, unknown, ThrowOnError>({\n            security: [{ scheme: 'bearer', type: 'http' }],\n            url: '/threads/runs',\n            ...options,\n            headers: {\n                'Content-Type': 'application/json',\n                ...options.headers\n            }\n        });\n    }\n    \n    /**\n     * Delete thread\n     *\n     * Delete a thread.\n     */\n    public deleteThread<ThrowOnError extends boolean = false>(options: Options<DeleteThreadData, ThrowOnError>) {\n        return (options.client ?? this.client).delete<DeleteThreadResponses, unknown, ThrowOnError>({\n            security: [{ scheme: 'bearer', type: 'http' }],\n            url: '/threads/{thread_id}',\n            ...options\n        });\n    }\n    \n    /**\n     * Retrieve thread\n     *\n     * Retrieves a thread.\n     */\n    public getThread<ThrowOnError extends boolean = false>(options: Options<GetThreadData, ThrowOnError>) {\n        return (options.client ?? this.client).get<GetThreadResponses, unknown, ThrowOnError>({\n            security: [{ scheme: 'bearer', type: 'http' }],\n            url: '/threads/{thread_id}',\n            ...options\n        });\n    }\n    \n    /**\n     * Modify thread\n     *\n     * Modifies a thread.\n     */\n    public modifyThread<ThrowOnError extends boolean = false>(options: Options<ModifyThreadData, ThrowOnError>) {\n        return (options.client ?? this.client).post<ModifyThreadResponses, unknown, ThrowOnError>({\n            security: [{ scheme: 'bearer', type: 'http' }],\n            url: '/threads/{thread_id}',\n            ...options,\n            headers: {\n                'Content-Type': 'application/json',\n                ...options.headers\n            }\n        });\n    }\n    \n    /**\n     * List messages\n     *\n     * Returns a list of messages for a given thread.\n     */\n    public listMessages<ThrowOnError extends boolean = false>(options: Options<ListMessagesData, ThrowOnError>) {\n        return (options.client ?? this.client).get<ListMessagesResponses, unknown, ThrowOnError>({\n            security: [{ scheme: 'bearer', type: 'http' }],\n            url: '/threads/{thread_id}/messages',\n            ...options\n        });\n    }\n    \n    /**\n     * Create message\n     *\n     * Create a message.\n     */\n    public createMessage<ThrowOnError extends boolean = false>(options: Options<CreateMessageData, ThrowOnError>) {\n        return (options.client ?? this.client).post<CreateMessageResponses, unknown, ThrowOnError>({\n            security: [{ scheme: 'bearer', type: 'http' }],\n            url: '/threads/{thread_id}/messages',\n            ...options,\n            headers: {\n                'Content-Type': 'application/json',\n                ...options.headers\n            }\n        });\n    }\n    \n    /**\n     * Delete message\n     *\n     * Deletes a message.\n     */\n    public deleteMessage<ThrowOnError extends boolean = false>(options: Options<DeleteMessageData, ThrowOnError>) {\n        return (options.client ?? this.client).delete<DeleteMessageResponses, unknown, ThrowOnError>({\n            security: [{ scheme: 'bearer', type: 'http' }],\n            url: '/threads/{thread_id}/messages/{message_id}',\n            ...options\n        });\n    }\n    \n    /**\n     * Retrieve message\n     *\n     * Retrieve a message.\n     */\n    public getMessage<ThrowOnError extends boolean = false>(options: Options<GetMessageData, ThrowOnError>) {\n        return (options.client ?? this.client).get<GetMessageResponses, unknown, ThrowOnError>({\n            security: [{ scheme: 'bearer', type: 'http' }],\n            url: '/threads/{thread_id}/messages/{message_id}',\n            ...options\n        });\n    }\n    \n    /**\n     * Modify message\n     *\n     * Modifies a message.\n     */\n    public modifyMessage<ThrowOnError extends boolean = false>(options: Options<ModifyMessageData, ThrowOnError>) {\n        return (options.client ?? this.client).post<ModifyMessageResponses, unknown, ThrowOnError>({\n            security: [{ scheme: 'bearer', type: 'http' }],\n            url: '/threads/{thread_id}/messages/{message_id}',\n            ...options,\n            headers: {\n                'Content-Type': 'application/json',\n                ...options.headers\n            }\n        });\n    }\n    \n    /**\n     * List runs\n     *\n     * Returns a list of runs belonging to a thread.\n     */\n    public listRuns<ThrowOnError extends boolean = false>(options: Options<ListRunsData, ThrowOnError>) {\n        return (options.client ?? this.client).get<ListRunsResponses, unknown, ThrowOnError>({\n            security: [{ scheme: 'bearer', type: 'http' }],\n            url: '/threads/{thread_id}/runs',\n            ...options\n        });\n    }\n    \n    /**\n     * Create run\n     *\n     * Create a run.\n     */\n    public createRun<ThrowOnError extends boolean = false>(options: Options<CreateRunData, ThrowOnError>) {\n        return (options.client ?? this.client).post<CreateRunResponses, unknown, ThrowOnError>({\n            security: [{ scheme: 'bearer', type: 'http' }],\n            url: '/threads/{thread_id}/runs',\n            ...options,\n            headers: {\n                'Content-Type': 'application/json',\n                ...options.headers\n            }\n        });\n    }\n    \n    /**\n     * Retrieve run\n     *\n     * Retrieves a run.\n     */\n    public getRun<ThrowOnError extends boolean = false>(options: Options<GetRunData, ThrowOnError>) {\n        return (options.client ?? this.client).get<GetRunResponses, unknown, ThrowOnError>({\n            security: [{ scheme: 'bearer', type: 'http' }],\n            url: '/threads/{thread_id}/runs/{run_id}',\n            ...options\n        });\n    }\n    \n    /**\n     * Modify run\n     *\n     * Modifies a run.\n     */\n    public modifyRun<ThrowOnError extends boolean = false>(options: Options<ModifyRunData, ThrowOnError>) {\n        return (options.client ?? this.client).post<ModifyRunResponses, unknown, ThrowOnError>({\n            security: [{ scheme: 'bearer', type: 'http' }],\n            url: '/threads/{thread_id}/runs/{run_id}',\n            ...options,\n            headers: {\n                'Content-Type': 'application/json',\n                ...options.headers\n            }\n        });\n    }\n    \n    /**\n     * Cancel a run\n     *\n     * Cancels a run that is `in_progress`.\n     */\n    public cancelRun<ThrowOnError extends boolean = false>(options: Options<CancelRunData, ThrowOnError>) {\n        return (options.client ?? this.client).post<CancelRunResponses, unknown, ThrowOnError>({\n            security: [{ scheme: 'bearer', type: 'http' }],\n            url: '/threads/{thread_id}/runs/{run_id}/cancel',\n            ...options\n        });\n    }\n    \n    /**\n     * List run steps\n     *\n     * Returns a list of run steps belonging to a run.\n     */\n    public listRunSteps<ThrowOnError extends boolean = false>(options: Options<ListRunStepsData, ThrowOnError>) {\n        return (options.client ?? this.client).get<ListRunStepsResponses, unknown, ThrowOnError>({\n            security: [{ scheme: 'bearer', type: 'http' }],\n            url: '/threads/{thread_id}/runs/{run_id}/steps',\n            ...options\n        });\n    }\n    \n    /**\n     * Retrieve run step\n     *\n     * Retrieves a run step.\n     */\n    public getRunStep<ThrowOnError extends boolean = false>(options: Options<GetRunStepData, ThrowOnError>) {\n        return (options.client ?? this.client).get<GetRunStepResponses, unknown, ThrowOnError>({\n            security: [{ scheme: 'bearer', type: 'http' }],\n            url: '/threads/{thread_id}/runs/{run_id}/steps/{step_id}',\n            ...options\n        });\n    }\n    \n    /**\n     * Submit tool outputs to run\n     *\n     * When a run has the `status: \"requires_action\"` and `required_action.type` is `submit_tool_outputs`, this endpoint can be used to submit the outputs from the tool calls once they're all completed. All outputs must be submitted in a single request.\n     *\n     */\n    public submitToolOuputsToRun<ThrowOnError extends boolean = false>(options: Options<SubmitToolOuputsToRunData, ThrowOnError>) {\n        return (options.client ?? this.client).post<SubmitToolOuputsToRunResponses, unknown, ThrowOnError>({\n            security: [{ scheme: 'bearer', type: 'http' }],\n            url: '/threads/{thread_id}/runs/{run_id}/submit_tool_outputs',\n            ...options,\n            headers: {\n                'Content-Type': 'application/json',\n                ...options.headers\n            }\n        });\n    }\n    \n    /**\n     * Create upload\n     *\n     * Creates an intermediate [Upload](https://platform.openai.com/docs/api-reference/uploads/object) object\n     * that you can add [Parts](https://platform.openai.com/docs/api-reference/uploads/part-object) to.\n     * Currently, an Upload can accept at most 8 GB in total and expires after an\n     * hour after you create it.\n     *\n     * Once you complete the Upload, we will create a\n     * [File](https://platform.openai.com/docs/api-reference/files/object) object that contains all the parts\n     * you uploaded. This File is usable in the rest of our platform as a regular\n     * File object.\n     *\n     * For certain `purpose` values, the correct `mime_type` must be specified.\n     * Please refer to documentation for the\n     * [supported MIME types for your use case](https://platform.openai.com/docs/assistants/tools/file-search#supported-files).\n     *\n     * For guidance on the proper filename extensions for each purpose, please\n     * follow the documentation on [creating a\n     * File](https://platform.openai.com/docs/api-reference/files/create).\n     *\n     */\n    public createUpload<ThrowOnError extends boolean = false>(options: Options<CreateUploadData, ThrowOnError>) {\n        return (options.client ?? this.client).post<CreateUploadResponses, unknown, ThrowOnError>({\n            security: [{ scheme: 'bearer', type: 'http' }],\n            url: '/uploads',\n            ...options,\n            headers: {\n                'Content-Type': 'application/json',\n                ...options.headers\n            }\n        });\n    }\n    \n    /**\n     * Cancel upload\n     *\n     * Cancels the Upload. No Parts may be added after an Upload is cancelled.\n     *\n     */\n    public cancelUpload<ThrowOnError extends boolean = false>(options: Options<CancelUploadData, ThrowOnError>) {\n        return (options.client ?? this.client).post<CancelUploadResponses, unknown, ThrowOnError>({\n            security: [{ scheme: 'bearer', type: 'http' }],\n            url: '/uploads/{upload_id}/cancel',\n            ...options\n        });\n    }\n    \n    /**\n     * Complete upload\n     *\n     * Completes the [Upload](https://platform.openai.com/docs/api-reference/uploads/object).\n     *\n     * Within the returned Upload object, there is a nested [File](https://platform.openai.com/docs/api-reference/files/object) object that is ready to use in the rest of the platform.\n     *\n     * You can specify the order of the Parts by passing in an ordered list of the Part IDs.\n     *\n     * The number of bytes uploaded upon completion must match the number of bytes initially specified when creating the Upload object. No Parts may be added after an Upload is completed.\n     *\n     */\n    public completeUpload<ThrowOnError extends boolean = false>(options: Options<CompleteUploadData, ThrowOnError>) {\n        return (options.client ?? this.client).post<CompleteUploadResponses, unknown, ThrowOnError>({\n            security: [{ scheme: 'bearer', type: 'http' }],\n            url: '/uploads/{upload_id}/complete',\n            ...options,\n            headers: {\n                'Content-Type': 'application/json',\n                ...options.headers\n            }\n        });\n    }\n    \n    /**\n     * Add upload part\n     *\n     * Adds a [Part](https://platform.openai.com/docs/api-reference/uploads/part-object) to an [Upload](https://platform.openai.com/docs/api-reference/uploads/object) object. A Part represents a chunk of bytes from the file you are trying to upload.\n     *\n     * Each Part can be at most 64 MB, and you can add Parts until you hit the Upload maximum of 8 GB.\n     *\n     * It is possible to add multiple Parts in parallel. You can decide the intended order of the Parts when you [complete the Upload](https://platform.openai.com/docs/api-reference/uploads/complete).\n     *\n     */\n    public addUploadPart<ThrowOnError extends boolean = false>(options: Options<AddUploadPartData, ThrowOnError>) {\n        return (options.client ?? this.client).post<AddUploadPartResponses, unknown, ThrowOnError>({\n            ...formDataBodySerializer,\n            security: [{ scheme: 'bearer', type: 'http' }],\n            url: '/uploads/{upload_id}/parts',\n            ...options,\n            headers: {\n                'Content-Type': null,\n                ...options.headers\n            }\n        });\n    }\n    \n    /**\n     * List vector stores\n     *\n     * Returns a list of vector stores.\n     */\n    public listVectorStores<ThrowOnError extends boolean = false>(options?: Options<ListVectorStoresData, ThrowOnError>) {\n        return (options?.client ?? this.client).get<ListVectorStoresResponses, unknown, ThrowOnError>({\n            security: [{ scheme: 'bearer', type: 'http' }],\n            url: '/vector_stores',\n            ...options\n        });\n    }\n    \n    /**\n     * Create vector store\n     *\n     * Create a vector store.\n     */\n    public createVectorStore<ThrowOnError extends boolean = false>(options: Options<CreateVectorStoreData, ThrowOnError>) {\n        return (options.client ?? this.client).post<CreateVectorStoreResponses, unknown, ThrowOnError>({\n            security: [{ scheme: 'bearer', type: 'http' }],\n            url: '/vector_stores',\n            ...options,\n            headers: {\n                'Content-Type': 'application/json',\n                ...options.headers\n            }\n        });\n    }\n    \n    /**\n     * Delete vector store\n     *\n     * Delete a vector store.\n     */\n    public deleteVectorStore<ThrowOnError extends boolean = false>(options: Options<DeleteVectorStoreData, ThrowOnError>) {\n        return (options.client ?? this.client).delete<DeleteVectorStoreResponses, unknown, ThrowOnError>({\n            security: [{ scheme: 'bearer', type: 'http' }],\n            url: '/vector_stores/{vector_store_id}',\n            ...options\n        });\n    }\n    \n    /**\n     * Retrieve vector store\n     *\n     * Retrieves a vector store.\n     */\n    public getVectorStore<ThrowOnError extends boolean = false>(options: Options<GetVectorStoreData, ThrowOnError>) {\n        return (options.client ?? this.client).get<GetVectorStoreResponses, unknown, ThrowOnError>({\n            security: [{ scheme: 'bearer', type: 'http' }],\n            url: '/vector_stores/{vector_store_id}',\n            ...options\n        });\n    }\n    \n    /**\n     * Modify vector store\n     *\n     * Modifies a vector store.\n     */\n    public modifyVectorStore<ThrowOnError extends boolean = false>(options: Options<ModifyVectorStoreData, ThrowOnError>) {\n        return (options.client ?? this.client).post<ModifyVectorStoreResponses, unknown, ThrowOnError>({\n            security: [{ scheme: 'bearer', type: 'http' }],\n            url: '/vector_stores/{vector_store_id}',\n            ...options,\n            headers: {\n                'Content-Type': 'application/json',\n                ...options.headers\n            }\n        });\n    }\n    \n    /**\n     * Create vector store file batch\n     *\n     * Create a vector store file batch.\n     */\n    public createVectorStoreFileBatch<ThrowOnError extends boolean = false>(options: Options<CreateVectorStoreFileBatchData, ThrowOnError>) {\n        return (options.client ?? this.client).post<CreateVectorStoreFileBatchResponses, unknown, ThrowOnError>({\n            security: [{ scheme: 'bearer', type: 'http' }],\n            url: '/vector_stores/{vector_store_id}/file_batches',\n            ...options,\n            headers: {\n                'Content-Type': 'application/json',\n                ...options.headers\n            }\n        });\n    }\n    \n    /**\n     * Retrieve vector store file batch\n     *\n     * Retrieves a vector store file batch.\n     */\n    public getVectorStoreFileBatch<ThrowOnError extends boolean = false>(options: Options<GetVectorStoreFileBatchData, ThrowOnError>) {\n        return (options.client ?? this.client).get<GetVectorStoreFileBatchResponses, unknown, ThrowOnError>({\n            security: [{ scheme: 'bearer', type: 'http' }],\n            url: '/vector_stores/{vector_store_id}/file_batches/{batch_id}',\n            ...options\n        });\n    }\n    \n    /**\n     * Cancel vector store file batch\n     *\n     * Cancel a vector store file batch. This attempts to cancel the processing of files in this batch as soon as possible.\n     */\n    public cancelVectorStoreFileBatch<ThrowOnError extends boolean = false>(options: Options<CancelVectorStoreFileBatchData, ThrowOnError>) {\n        return (options.client ?? this.client).post<CancelVectorStoreFileBatchResponses, unknown, ThrowOnError>({\n            security: [{ scheme: 'bearer', type: 'http' }],\n            url: '/vector_stores/{vector_store_id}/file_batches/{batch_id}/cancel',\n            ...options\n        });\n    }\n    \n    /**\n     * List vector store files in a batch\n     *\n     * Returns a list of vector store files in a batch.\n     */\n    public listFilesInVectorStoreBatch<ThrowOnError extends boolean = false>(options: Options<ListFilesInVectorStoreBatchData, ThrowOnError>) {\n        return (options.client ?? this.client).get<ListFilesInVectorStoreBatchResponses, unknown, ThrowOnError>({\n            security: [{ scheme: 'bearer', type: 'http' }],\n            url: '/vector_stores/{vector_store_id}/file_batches/{batch_id}/files',\n            ...options\n        });\n    }\n    \n    /**\n     * List vector store files\n     *\n     * Returns a list of vector store files.\n     */\n    public listVectorStoreFiles<ThrowOnError extends boolean = false>(options: Options<ListVectorStoreFilesData, ThrowOnError>) {\n        return (options.client ?? this.client).get<ListVectorStoreFilesResponses, unknown, ThrowOnError>({\n            security: [{ scheme: 'bearer', type: 'http' }],\n            url: '/vector_stores/{vector_store_id}/files',\n            ...options\n        });\n    }\n    \n    /**\n     * Create vector store file\n     *\n     * Create a vector store file by attaching a [File](https://platform.openai.com/docs/api-reference/files) to a [vector store](https://platform.openai.com/docs/api-reference/vector-stores/object).\n     */\n    public createVectorStoreFile<ThrowOnError extends boolean = false>(options: Options<CreateVectorStoreFileData, ThrowOnError>) {\n        return (options.client ?? this.client).post<CreateVectorStoreFileResponses, unknown, ThrowOnError>({\n            security: [{ scheme: 'bearer', type: 'http' }],\n            url: '/vector_stores/{vector_store_id}/files',\n            ...options,\n            headers: {\n                'Content-Type': 'application/json',\n                ...options.headers\n            }\n        });\n    }\n    \n    /**\n     * Delete vector store file\n     *\n     * Delete a vector store file. This will remove the file from the vector store but the file itself will not be deleted. To delete the file, use the [delete file](https://platform.openai.com/docs/api-reference/files/delete) endpoint.\n     */\n    public deleteVectorStoreFile<ThrowOnError extends boolean = false>(options: Options<DeleteVectorStoreFileData, ThrowOnError>) {\n        return (options.client ?? this.client).delete<DeleteVectorStoreFileResponses, unknown, ThrowOnError>({\n            security: [{ scheme: 'bearer', type: 'http' }],\n            url: '/vector_stores/{vector_store_id}/files/{file_id}',\n            ...options\n        });\n    }\n    \n    /**\n     * Retrieve vector store file\n     *\n     * Retrieves a vector store file.\n     */\n    public getVectorStoreFile<ThrowOnError extends boolean = false>(options: Options<GetVectorStoreFileData, ThrowOnError>) {\n        return (options.client ?? this.client).get<GetVectorStoreFileResponses, unknown, ThrowOnError>({\n            security: [{ scheme: 'bearer', type: 'http' }],\n            url: '/vector_stores/{vector_store_id}/files/{file_id}',\n            ...options\n        });\n    }\n    \n    /**\n     * Update vector store file attributes\n     *\n     * Update attributes on a vector store file.\n     */\n    public updateVectorStoreFileAttributes<ThrowOnError extends boolean = false>(options: Options<UpdateVectorStoreFileAttributesData, ThrowOnError>) {\n        return (options.client ?? this.client).post<UpdateVectorStoreFileAttributesResponses, unknown, ThrowOnError>({\n            security: [{ scheme: 'bearer', type: 'http' }],\n            url: '/vector_stores/{vector_store_id}/files/{file_id}',\n            ...options,\n            headers: {\n                'Content-Type': 'application/json',\n                ...options.headers\n            }\n        });\n    }\n    \n    /**\n     * Retrieve vector store file content\n     *\n     * Retrieve the parsed contents of a vector store file.\n     */\n    public retrieveVectorStoreFileContent<ThrowOnError extends boolean = false>(options: Options<RetrieveVectorStoreFileContentData, ThrowOnError>) {\n        return (options.client ?? this.client).get<RetrieveVectorStoreFileContentResponses, unknown, ThrowOnError>({\n            security: [{ scheme: 'bearer', type: 'http' }],\n            url: '/vector_stores/{vector_store_id}/files/{file_id}/content',\n            ...options\n        });\n    }\n    \n    /**\n     * Search vector store\n     *\n     * Search a vector store for relevant chunks based on a query and file attributes filter.\n     */\n    public searchVectorStore<ThrowOnError extends boolean = false>(options: Options<SearchVectorStoreData, ThrowOnError>) {\n        return (options.client ?? this.client).post<SearchVectorStoreResponses, unknown, ThrowOnError>({\n            security: [{ scheme: 'bearer', type: 'http' }],\n            url: '/vector_stores/{vector_store_id}/search',\n            ...options,\n            headers: {\n                'Content-Type': 'application/json',\n                ...options.headers\n            }\n        });\n    }\n}\n"
  },
  {
    "path": "examples/openapi-ts-openai/src/client/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type ClientOptions = {\n    baseUrl: 'https://api.openai.com/v1' | (string & {});\n};\n\nexport type Webhooks = PostBatchCancelledWebhookRequest | PostBatchCompletedWebhookRequest | PostBatchExpiredWebhookRequest | PostBatchFailedWebhookRequest | PostEvalRunCanceledWebhookRequest | PostEvalRunFailedWebhookRequest | PostEvalRunSucceededWebhookRequest | PostFineTuningJobCancelledWebhookRequest | PostFineTuningJobFailedWebhookRequest | PostFineTuningJobSucceededWebhookRequest | PostResponseCancelledWebhookRequest | PostResponseCompletedWebhookRequest | PostResponseFailedWebhookRequest | PostResponseIncompleteWebhookRequest;\n\nexport type AddUploadPartRequest = {\n    /**\n     * The chunk of bytes for this Part.\n     *\n     */\n    data: Blob | File;\n};\n\n/**\n * Represents an individual Admin API key in an org.\n */\nexport type AdminApiKey = {\n    /**\n     * The object type, which is always `organization.admin_api_key`\n     */\n    object: string;\n    /**\n     * The identifier, which can be referenced in API endpoints\n     */\n    id: string;\n    /**\n     * The name of the API key\n     */\n    name: string;\n    /**\n     * The redacted value of the API key\n     */\n    redacted_value: string;\n    /**\n     * The value of the API key. Only shown on create.\n     */\n    value?: string;\n    /**\n     * The Unix timestamp (in seconds) of when the API key was created\n     */\n    created_at: number;\n    /**\n     * The Unix timestamp (in seconds) of when the API key was last used\n     */\n    last_used_at: number;\n    owner: {\n        /**\n         * Always `user`\n         */\n        type?: string;\n        /**\n         * The object type, which is always organization.user\n         */\n        object?: string;\n        /**\n         * The identifier, which can be referenced in API endpoints\n         */\n        id?: string;\n        /**\n         * The name of the user\n         */\n        name?: string;\n        /**\n         * The Unix timestamp (in seconds) of when the user was created\n         */\n        created_at?: number;\n        /**\n         * Always `owner`\n         */\n        role?: string;\n    };\n};\n\nexport type ApiKeyList = {\n    object?: string;\n    data?: Array<AdminApiKey>;\n    has_more?: boolean;\n    first_id?: string;\n    last_id?: string;\n};\n\n/**\n * Assistant\n *\n * Represents an `assistant` that can call the model and use tools.\n */\nexport type AssistantObject = {\n    /**\n     * The identifier, which can be referenced in API endpoints.\n     */\n    id: string;\n    /**\n     * The object type, which is always `assistant`.\n     */\n    object: 'assistant';\n    /**\n     * The Unix timestamp (in seconds) for when the assistant was created.\n     */\n    created_at: number;\n    /**\n     * The name of the assistant. The maximum length is 256 characters.\n     *\n     */\n    name: string;\n    /**\n     * The description of the assistant. The maximum length is 512 characters.\n     *\n     */\n    description: string;\n    /**\n     * ID of the model to use. You can use the [List models](https://platform.openai.com/docs/api-reference/models/list) API to see all of your available models, or see our [Model overview](https://platform.openai.com/docs/models) for descriptions of them.\n     *\n     */\n    model: string;\n    /**\n     * The system instructions that the assistant uses. The maximum length is 256,000 characters.\n     *\n     */\n    instructions: string;\n    /**\n     * A list of tool enabled on the assistant. There can be a maximum of 128 tools per assistant. Tools can be of types `code_interpreter`, `file_search`, or `function`.\n     *\n     */\n    tools: Array<AssistantTool>;\n    /**\n     * A set of resources that are used by the assistant's tools. The resources are specific to the type of tool. For example, the `code_interpreter` tool requires a list of file IDs, while the `file_search` tool requires a list of vector store IDs.\n     *\n     */\n    tool_resources?: {\n        code_interpreter?: {\n            /**\n             * A list of [file](https://platform.openai.com/docs/api-reference/files) IDs made available to the `code_interpreter`` tool. There can be a maximum of 20 files associated with the tool.\n             *\n             */\n            file_ids?: Array<string>;\n        };\n        file_search?: {\n            /**\n             * The ID of the [vector store](https://platform.openai.com/docs/api-reference/vector-stores/object) attached to this assistant. There can be a maximum of 1 vector store attached to the assistant.\n             *\n             */\n            vector_store_ids?: Array<string>;\n        };\n    };\n    metadata: Metadata;\n    /**\n     * What sampling temperature to use, between 0 and 2. Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic.\n     *\n     */\n    temperature?: number;\n    /**\n     * An alternative to sampling with temperature, called nucleus sampling, where the model considers the results of the tokens with top_p probability mass. So 0.1 means only the tokens comprising the top 10% probability mass are considered.\n     *\n     * We generally recommend altering this or temperature but not both.\n     *\n     */\n    top_p?: number;\n    response_format?: AssistantsApiResponseFormatOption;\n};\n\n/**\n * Represents an event emitted when streaming a Run.\n *\n * Each event in a server-sent events stream has an `event` and `data` property:\n *\n * ```\n * event: thread.created\n * data: {\"id\": \"thread_123\", \"object\": \"thread\", ...}\n * ```\n *\n * We emit events whenever a new object is created, transitions to a new state, or is being\n * streamed in parts (deltas). For example, we emit `thread.run.created` when a new run\n * is created, `thread.run.completed` when a run completes, and so on. When an Assistant chooses\n * to create a message during a run, we emit a `thread.message.created event`, a\n * `thread.message.in_progress` event, many `thread.message.delta` events, and finally a\n * `thread.message.completed` event.\n *\n * We may add additional events over time, so we recommend handling unknown events gracefully\n * in your code. See the [Assistants API quickstart](https://platform.openai.com/docs/assistants/overview) to learn how to\n * integrate the Assistants API with streaming.\n *\n */\nexport type AssistantStreamEvent = ({\n    event?: 'ThreadStreamEvent';\n} & ThreadStreamEvent) | ({\n    event?: 'RunStreamEvent';\n} & RunStreamEvent) | ({\n    event?: 'RunStepStreamEvent';\n} & RunStepStreamEvent) | ({\n    event?: 'MessageStreamEvent';\n} & MessageStreamEvent) | ({\n    event?: 'ErrorEvent';\n} & ErrorEvent);\n\nexport const AssistantSupportedModels = {\n    GPT_5: 'gpt-5',\n    GPT_5_MINI: 'gpt-5-mini',\n    GPT_5_NANO: 'gpt-5-nano',\n    GPT_5_2025_08_07: 'gpt-5-2025-08-07',\n    GPT_5_MINI_2025_08_07: 'gpt-5-mini-2025-08-07',\n    GPT_5_NANO_2025_08_07: 'gpt-5-nano-2025-08-07',\n    GPT_4_1: 'gpt-4.1',\n    GPT_4_1_MINI: 'gpt-4.1-mini',\n    GPT_4_1_NANO: 'gpt-4.1-nano',\n    GPT_4_1_2025_04_14: 'gpt-4.1-2025-04-14',\n    GPT_4_1_MINI_2025_04_14: 'gpt-4.1-mini-2025-04-14',\n    GPT_4_1_NANO_2025_04_14: 'gpt-4.1-nano-2025-04-14',\n    O3_MINI: 'o3-mini',\n    O3_MINI_2025_01_31: 'o3-mini-2025-01-31',\n    O1: 'o1',\n    O1_2024_12_17: 'o1-2024-12-17',\n    GPT_4O: 'gpt-4o',\n    GPT_4O_2024_11_20: 'gpt-4o-2024-11-20',\n    GPT_4O_2024_08_06: 'gpt-4o-2024-08-06',\n    GPT_4O_2024_05_13: 'gpt-4o-2024-05-13',\n    GPT_4O_MINI: 'gpt-4o-mini',\n    GPT_4O_MINI_2024_07_18: 'gpt-4o-mini-2024-07-18',\n    GPT_4_5_PREVIEW: 'gpt-4.5-preview',\n    GPT_4_5_PREVIEW_2025_02_27: 'gpt-4.5-preview-2025-02-27',\n    GPT_4_TURBO: 'gpt-4-turbo',\n    GPT_4_TURBO_2024_04_09: 'gpt-4-turbo-2024-04-09',\n    GPT_4_0125_PREVIEW: 'gpt-4-0125-preview',\n    GPT_4_TURBO_PREVIEW: 'gpt-4-turbo-preview',\n    GPT_4_1106_PREVIEW: 'gpt-4-1106-preview',\n    GPT_4_VISION_PREVIEW: 'gpt-4-vision-preview',\n    GPT_4: 'gpt-4',\n    GPT_4_0314: 'gpt-4-0314',\n    GPT_4_0613: 'gpt-4-0613',\n    GPT_4_32K: 'gpt-4-32k',\n    GPT_4_32K_0314: 'gpt-4-32k-0314',\n    GPT_4_32K_0613: 'gpt-4-32k-0613',\n    GPT_3_5_TURBO: 'gpt-3.5-turbo',\n    GPT_3_5_TURBO_16K: 'gpt-3.5-turbo-16k',\n    GPT_3_5_TURBO_0613: 'gpt-3.5-turbo-0613',\n    GPT_3_5_TURBO_1106: 'gpt-3.5-turbo-1106',\n    GPT_3_5_TURBO_0125: 'gpt-3.5-turbo-0125',\n    GPT_3_5_TURBO_16K_0613: 'gpt-3.5-turbo-16k-0613'\n} as const;\n\nexport type AssistantSupportedModels = typeof AssistantSupportedModels[keyof typeof AssistantSupportedModels];\n\n/**\n * Code interpreter tool\n */\nexport type AssistantToolsCode = {\n    /**\n     * The type of tool being defined: `code_interpreter`\n     */\n    type: 'code_interpreter';\n};\n\n/**\n * FileSearch tool\n */\nexport type AssistantToolsFileSearch = {\n    /**\n     * The type of tool being defined: `file_search`\n     */\n    type: 'file_search';\n    /**\n     * Overrides for the file search tool.\n     */\n    file_search?: {\n        /**\n         * The maximum number of results the file search tool should output. The default is 20 for `gpt-4*` models and 5 for `gpt-3.5-turbo`. This number should be between 1 and 50 inclusive.\n         *\n         * Note that the file search tool may output fewer than `max_num_results` results. See the [file search tool documentation](https://platform.openai.com/docs/assistants/tools/file-search#customizing-file-search-settings) for more information.\n         *\n         */\n        max_num_results?: number;\n        ranking_options?: FileSearchRankingOptions;\n    };\n};\n\n/**\n * FileSearch tool\n */\nexport type AssistantToolsFileSearchTypeOnly = {\n    /**\n     * The type of tool being defined: `file_search`\n     */\n    type: 'file_search';\n};\n\n/**\n * Function tool\n */\nexport type AssistantToolsFunction = {\n    /**\n     * The type of tool being defined: `function`\n     */\n    type: 'function';\n    function: FunctionObject;\n};\n\n/**\n * Specifies the format that the model must output. Compatible with [GPT-4o](https://platform.openai.com/docs/models#gpt-4o), [GPT-4 Turbo](https://platform.openai.com/docs/models#gpt-4-turbo-and-gpt-4), and all GPT-3.5 Turbo models since `gpt-3.5-turbo-1106`.\n *\n * Setting to `{ \"type\": \"json_schema\", \"json_schema\": {...} }` enables Structured Outputs which ensures the model will match your supplied JSON schema. Learn more in the [Structured Outputs guide](https://platform.openai.com/docs/guides/structured-outputs).\n *\n * Setting to `{ \"type\": \"json_object\" }` enables JSON mode, which ensures the message the model generates is valid JSON.\n *\n * **Important:** when using JSON mode, you **must** also instruct the model to produce JSON yourself via a system or user message. Without this, the model may generate an unending stream of whitespace until the generation reaches the token limit, resulting in a long-running and seemingly \"stuck\" request. Also note that the message content may be partially cut off if `finish_reason=\"length\"`, which indicates the generation exceeded `max_tokens` or the conversation exceeded the max context length.\n *\n */\nexport type AssistantsApiResponseFormatOption = 'auto' | ResponseFormatText | ResponseFormatJsonObject | ResponseFormatJsonSchema;\n\n/**\n * Controls which (if any) tool is called by the model.\n * `none` means the model will not call any tools and instead generates a message.\n * `auto` is the default value and means the model can pick between generating a message or calling one or more tools.\n * `required` means the model must call one or more tools before responding to the user.\n * Specifying a particular tool like `{\"type\": \"file_search\"}` or `{\"type\": \"function\", \"function\": {\"name\": \"my_function\"}}` forces the model to call that tool.\n *\n */\nexport type AssistantsApiToolChoiceOption = 'none' | 'auto' | 'required' | AssistantsNamedToolChoice;\n\n/**\n * Specifies a tool the model should use. Use to force the model to call a specific tool.\n */\nexport type AssistantsNamedToolChoice = {\n    /**\n     * The type of the tool. If type is `function`, the function name must be set\n     */\n    type: 'function' | 'code_interpreter' | 'file_search';\n    function?: {\n        /**\n         * The name of the function to call.\n         */\n        name: string;\n    };\n};\n\n/**\n * The format of the output, in one of these options: `json`, `text`, `srt`, `verbose_json`, or `vtt`. For `gpt-4o-transcribe` and `gpt-4o-mini-transcribe`, the only supported format is `json`.\n *\n */\nexport const AudioResponseFormat = {\n    JSON: 'json',\n    TEXT: 'text',\n    SRT: 'srt',\n    VERBOSE_JSON: 'verbose_json',\n    VTT: 'vtt'\n} as const;\n\n/**\n * The format of the output, in one of these options: `json`, `text`, `srt`, `verbose_json`, or `vtt`. For `gpt-4o-transcribe` and `gpt-4o-mini-transcribe`, the only supported format is `json`.\n *\n */\nexport type AudioResponseFormat = typeof AudioResponseFormat[keyof typeof AudioResponseFormat];\n\n/**\n * A log of a user action or configuration change within this organization.\n */\nexport type AuditLog = {\n    /**\n     * The ID of this log.\n     */\n    id: string;\n    type: AuditLogEventType;\n    /**\n     * The Unix timestamp (in seconds) of the event.\n     */\n    effective_at: number;\n    /**\n     * The project that the action was scoped to. Absent for actions not scoped to projects. Note that any admin actions taken via Admin API keys are associated with the default project.\n     */\n    project?: {\n        /**\n         * The project ID.\n         */\n        id?: string;\n        /**\n         * The project title.\n         */\n        name?: string;\n    };\n    actor: AuditLogActor;\n    /**\n     * The details for events with this `type`.\n     */\n    'api_key.created'?: {\n        /**\n         * The tracking ID of the API key.\n         */\n        id?: string;\n        /**\n         * The payload used to create the API key.\n         */\n        data?: {\n            /**\n             * A list of scopes allowed for the API key, e.g. `[\"api.model.request\"]`\n             */\n            scopes?: Array<string>;\n        };\n    };\n    /**\n     * The details for events with this `type`.\n     */\n    'api_key.updated'?: {\n        /**\n         * The tracking ID of the API key.\n         */\n        id?: string;\n        /**\n         * The payload used to update the API key.\n         */\n        changes_requested?: {\n            /**\n             * A list of scopes allowed for the API key, e.g. `[\"api.model.request\"]`\n             */\n            scopes?: Array<string>;\n        };\n    };\n    /**\n     * The details for events with this `type`.\n     */\n    'api_key.deleted'?: {\n        /**\n         * The tracking ID of the API key.\n         */\n        id?: string;\n    };\n    /**\n     * The project and fine-tuned model checkpoint that the checkpoint permission was created for.\n     */\n    'checkpoint_permission.created'?: {\n        /**\n         * The ID of the checkpoint permission.\n         */\n        id?: string;\n        /**\n         * The payload used to create the checkpoint permission.\n         */\n        data?: {\n            /**\n             * The ID of the project that the checkpoint permission was created for.\n             */\n            project_id?: string;\n            /**\n             * The ID of the fine-tuned model checkpoint.\n             */\n            fine_tuned_model_checkpoint?: string;\n        };\n    };\n    /**\n     * The details for events with this `type`.\n     */\n    'checkpoint_permission.deleted'?: {\n        /**\n         * The ID of the checkpoint permission.\n         */\n        id?: string;\n    };\n    /**\n     * The details for events with this `type`.\n     */\n    'invite.sent'?: {\n        /**\n         * The ID of the invite.\n         */\n        id?: string;\n        /**\n         * The payload used to create the invite.\n         */\n        data?: {\n            /**\n             * The email invited to the organization.\n             */\n            email?: string;\n            /**\n             * The role the email was invited to be. Is either `owner` or `member`.\n             */\n            role?: string;\n        };\n    };\n    /**\n     * The details for events with this `type`.\n     */\n    'invite.accepted'?: {\n        /**\n         * The ID of the invite.\n         */\n        id?: string;\n    };\n    /**\n     * The details for events with this `type`.\n     */\n    'invite.deleted'?: {\n        /**\n         * The ID of the invite.\n         */\n        id?: string;\n    };\n    /**\n     * The details for events with this `type`.\n     */\n    'login.failed'?: {\n        /**\n         * The error code of the failure.\n         */\n        error_code?: string;\n        /**\n         * The error message of the failure.\n         */\n        error_message?: string;\n    };\n    /**\n     * The details for events with this `type`.\n     */\n    'logout.failed'?: {\n        /**\n         * The error code of the failure.\n         */\n        error_code?: string;\n        /**\n         * The error message of the failure.\n         */\n        error_message?: string;\n    };\n    /**\n     * The details for events with this `type`.\n     */\n    'organization.updated'?: {\n        /**\n         * The organization ID.\n         */\n        id?: string;\n        /**\n         * The payload used to update the organization settings.\n         */\n        changes_requested?: {\n            /**\n             * The organization title.\n             */\n            title?: string;\n            /**\n             * The organization description.\n             */\n            description?: string;\n            /**\n             * The organization name.\n             */\n            name?: string;\n            /**\n             * Visibility of the threads page which shows messages created with the Assistants API and Playground. One of `ANY_ROLE`, `OWNERS`, or `NONE`.\n             */\n            threads_ui_visibility?: string;\n            /**\n             * Visibility of the usage dashboard which shows activity and costs for your organization. One of `ANY_ROLE` or `OWNERS`.\n             */\n            usage_dashboard_visibility?: string;\n            /**\n             * How your organization logs data from supported API calls. One of `disabled`, `enabled_per_call`, `enabled_for_all_projects`, or `enabled_for_selected_projects`\n             */\n            api_call_logging?: string;\n            /**\n             * The list of project ids if api_call_logging is set to `enabled_for_selected_projects`\n             */\n            api_call_logging_project_ids?: string;\n        };\n    };\n    /**\n     * The details for events with this `type`.\n     */\n    'project.created'?: {\n        /**\n         * The project ID.\n         */\n        id?: string;\n        /**\n         * The payload used to create the project.\n         */\n        data?: {\n            /**\n             * The project name.\n             */\n            name?: string;\n            /**\n             * The title of the project as seen on the dashboard.\n             */\n            title?: string;\n        };\n    };\n    /**\n     * The details for events with this `type`.\n     */\n    'project.updated'?: {\n        /**\n         * The project ID.\n         */\n        id?: string;\n        /**\n         * The payload used to update the project.\n         */\n        changes_requested?: {\n            /**\n             * The title of the project as seen on the dashboard.\n             */\n            title?: string;\n        };\n    };\n    /**\n     * The details for events with this `type`.\n     */\n    'project.archived'?: {\n        /**\n         * The project ID.\n         */\n        id?: string;\n    };\n    /**\n     * The details for events with this `type`.\n     */\n    'rate_limit.updated'?: {\n        /**\n         * The rate limit ID\n         */\n        id?: string;\n        /**\n         * The payload used to update the rate limits.\n         */\n        changes_requested?: {\n            /**\n             * The maximum requests per minute.\n             */\n            max_requests_per_1_minute?: number;\n            /**\n             * The maximum tokens per minute.\n             */\n            max_tokens_per_1_minute?: number;\n            /**\n             * The maximum images per minute. Only relevant for certain models.\n             */\n            max_images_per_1_minute?: number;\n            /**\n             * The maximum audio megabytes per minute. Only relevant for certain models.\n             */\n            max_audio_megabytes_per_1_minute?: number;\n            /**\n             * The maximum requests per day. Only relevant for certain models.\n             */\n            max_requests_per_1_day?: number;\n            /**\n             * The maximum batch input tokens per day. Only relevant for certain models.\n             */\n            batch_1_day_max_input_tokens?: number;\n        };\n    };\n    /**\n     * The details for events with this `type`.\n     */\n    'rate_limit.deleted'?: {\n        /**\n         * The rate limit ID\n         */\n        id?: string;\n    };\n    /**\n     * The details for events with this `type`.\n     */\n    'service_account.created'?: {\n        /**\n         * The service account ID.\n         */\n        id?: string;\n        /**\n         * The payload used to create the service account.\n         */\n        data?: {\n            /**\n             * The role of the service account. Is either `owner` or `member`.\n             */\n            role?: string;\n        };\n    };\n    /**\n     * The details for events with this `type`.\n     */\n    'service_account.updated'?: {\n        /**\n         * The service account ID.\n         */\n        id?: string;\n        /**\n         * The payload used to updated the service account.\n         */\n        changes_requested?: {\n            /**\n             * The role of the service account. Is either `owner` or `member`.\n             */\n            role?: string;\n        };\n    };\n    /**\n     * The details for events with this `type`.\n     */\n    'service_account.deleted'?: {\n        /**\n         * The service account ID.\n         */\n        id?: string;\n    };\n    /**\n     * The details for events with this `type`.\n     */\n    'user.added'?: {\n        /**\n         * The user ID.\n         */\n        id?: string;\n        /**\n         * The payload used to add the user to the project.\n         */\n        data?: {\n            /**\n             * The role of the user. Is either `owner` or `member`.\n             */\n            role?: string;\n        };\n    };\n    /**\n     * The details for events with this `type`.\n     */\n    'user.updated'?: {\n        /**\n         * The project ID.\n         */\n        id?: string;\n        /**\n         * The payload used to update the user.\n         */\n        changes_requested?: {\n            /**\n             * The role of the user. Is either `owner` or `member`.\n             */\n            role?: string;\n        };\n    };\n    /**\n     * The details for events with this `type`.\n     */\n    'user.deleted'?: {\n        /**\n         * The user ID.\n         */\n        id?: string;\n    };\n    /**\n     * The details for events with this `type`.\n     */\n    'certificate.created'?: {\n        /**\n         * The certificate ID.\n         */\n        id?: string;\n        /**\n         * The name of the certificate.\n         */\n        name?: string;\n    };\n    /**\n     * The details for events with this `type`.\n     */\n    'certificate.updated'?: {\n        /**\n         * The certificate ID.\n         */\n        id?: string;\n        /**\n         * The name of the certificate.\n         */\n        name?: string;\n    };\n    /**\n     * The details for events with this `type`.\n     */\n    'certificate.deleted'?: {\n        /**\n         * The certificate ID.\n         */\n        id?: string;\n        /**\n         * The name of the certificate.\n         */\n        name?: string;\n        /**\n         * The certificate content in PEM format.\n         */\n        certificate?: string;\n    };\n    /**\n     * The details for events with this `type`.\n     */\n    'certificates.activated'?: {\n        certificates?: Array<{\n            /**\n             * The certificate ID.\n             */\n            id?: string;\n            /**\n             * The name of the certificate.\n             */\n            name?: string;\n        }>;\n    };\n    /**\n     * The details for events with this `type`.\n     */\n    'certificates.deactivated'?: {\n        certificates?: Array<{\n            /**\n             * The certificate ID.\n             */\n            id?: string;\n            /**\n             * The name of the certificate.\n             */\n            name?: string;\n        }>;\n    };\n};\n\n/**\n * The actor who performed the audit logged action.\n */\nexport type AuditLogActor = {\n    /**\n     * The type of actor. Is either `session` or `api_key`.\n     */\n    type?: 'session' | 'api_key';\n    session?: AuditLogActorSession;\n    api_key?: AuditLogActorApiKey;\n};\n\n/**\n * The API Key used to perform the audit logged action.\n */\nexport type AuditLogActorApiKey = {\n    /**\n     * The tracking id of the API key.\n     */\n    id?: string;\n    /**\n     * The type of API key. Can be either `user` or `service_account`.\n     */\n    type?: 'user' | 'service_account';\n    user?: AuditLogActorUser;\n    service_account?: AuditLogActorServiceAccount;\n};\n\n/**\n * The service account that performed the audit logged action.\n */\nexport type AuditLogActorServiceAccount = {\n    /**\n     * The service account id.\n     */\n    id?: string;\n};\n\n/**\n * The session in which the audit logged action was performed.\n */\nexport type AuditLogActorSession = {\n    user?: AuditLogActorUser;\n    /**\n     * The IP address from which the action was performed.\n     */\n    ip_address?: string;\n};\n\n/**\n * The user who performed the audit logged action.\n */\nexport type AuditLogActorUser = {\n    /**\n     * The user id.\n     */\n    id?: string;\n    /**\n     * The user email.\n     */\n    email?: string;\n};\n\n/**\n * The event type.\n */\nexport const AuditLogEventType = {\n    API_KEY_CREATED: 'api_key.created',\n    API_KEY_UPDATED: 'api_key.updated',\n    API_KEY_DELETED: 'api_key.deleted',\n    CHECKPOINT_PERMISSION_CREATED: 'checkpoint_permission.created',\n    CHECKPOINT_PERMISSION_DELETED: 'checkpoint_permission.deleted',\n    INVITE_SENT: 'invite.sent',\n    INVITE_ACCEPTED: 'invite.accepted',\n    INVITE_DELETED: 'invite.deleted',\n    LOGIN_SUCCEEDED: 'login.succeeded',\n    LOGIN_FAILED: 'login.failed',\n    LOGOUT_SUCCEEDED: 'logout.succeeded',\n    LOGOUT_FAILED: 'logout.failed',\n    ORGANIZATION_UPDATED: 'organization.updated',\n    PROJECT_CREATED: 'project.created',\n    PROJECT_UPDATED: 'project.updated',\n    PROJECT_ARCHIVED: 'project.archived',\n    SERVICE_ACCOUNT_CREATED: 'service_account.created',\n    SERVICE_ACCOUNT_UPDATED: 'service_account.updated',\n    SERVICE_ACCOUNT_DELETED: 'service_account.deleted',\n    RATE_LIMIT_UPDATED: 'rate_limit.updated',\n    RATE_LIMIT_DELETED: 'rate_limit.deleted',\n    USER_ADDED: 'user.added',\n    USER_UPDATED: 'user.updated',\n    USER_DELETED: 'user.deleted'\n} as const;\n\n/**\n * The event type.\n */\nexport type AuditLogEventType = typeof AuditLogEventType[keyof typeof AuditLogEventType];\n\n/**\n * Auto Chunking Strategy\n *\n * The default strategy. This strategy currently uses a `max_chunk_size_tokens` of `800` and `chunk_overlap_tokens` of `400`.\n */\nexport type AutoChunkingStrategyRequestParam = {\n    /**\n     * Always `auto`.\n     */\n    type: 'auto';\n};\n\nexport type Batch = {\n    id: string;\n    /**\n     * The object type, which is always `batch`.\n     */\n    object: 'batch';\n    /**\n     * The OpenAI API endpoint used by the batch.\n     */\n    endpoint: string;\n    errors?: {\n        /**\n         * The object type, which is always `list`.\n         */\n        object?: string;\n        data?: Array<BatchError>;\n    };\n    /**\n     * The ID of the input file for the batch.\n     */\n    input_file_id: string;\n    /**\n     * The time frame within which the batch should be processed.\n     */\n    completion_window: string;\n    /**\n     * The current status of the batch.\n     */\n    status: 'validating' | 'failed' | 'in_progress' | 'finalizing' | 'completed' | 'expired' | 'cancelling' | 'cancelled';\n    /**\n     * The ID of the file containing the outputs of successfully executed requests.\n     */\n    output_file_id?: string;\n    /**\n     * The ID of the file containing the outputs of requests with errors.\n     */\n    error_file_id?: string;\n    /**\n     * The Unix timestamp (in seconds) for when the batch was created.\n     */\n    created_at: number;\n    /**\n     * The Unix timestamp (in seconds) for when the batch started processing.\n     */\n    in_progress_at?: number;\n    /**\n     * The Unix timestamp (in seconds) for when the batch will expire.\n     */\n    expires_at?: number;\n    /**\n     * The Unix timestamp (in seconds) for when the batch started finalizing.\n     */\n    finalizing_at?: number;\n    /**\n     * The Unix timestamp (in seconds) for when the batch was completed.\n     */\n    completed_at?: number;\n    /**\n     * The Unix timestamp (in seconds) for when the batch failed.\n     */\n    failed_at?: number;\n    /**\n     * The Unix timestamp (in seconds) for when the batch expired.\n     */\n    expired_at?: number;\n    /**\n     * The Unix timestamp (in seconds) for when the batch started cancelling.\n     */\n    cancelling_at?: number;\n    /**\n     * The Unix timestamp (in seconds) for when the batch was cancelled.\n     */\n    cancelled_at?: number;\n    request_counts?: BatchRequestCounts;\n    metadata?: Metadata;\n};\n\n/**\n * File expiration policy\n *\n * The expiration policy for the output and/or error file that are generated for a batch.\n */\nexport type BatchFileExpirationAfter = {\n    /**\n     * Anchor timestamp after which the expiration policy applies. Supported anchors: `created_at`. Note that the anchor is the file creation time, not the time the batch is created.\n     */\n    anchor: 'created_at';\n    /**\n     * The number of seconds after the anchor time that the file will expire. Must be between 3600 (1 hour) and 2592000 (30 days).\n     */\n    seconds: number;\n};\n\n/**\n * The per-line object of the batch input file\n */\nexport type BatchRequestInput = {\n    /**\n     * A developer-provided per-request id that will be used to match outputs to inputs. Must be unique for each request in a batch.\n     */\n    custom_id?: string;\n    /**\n     * The HTTP method to be used for the request. Currently only `POST` is supported.\n     */\n    method?: 'POST';\n    /**\n     * The OpenAI API relative URL to be used for the request. Currently `/v1/chat/completions`, `/v1/embeddings`, and `/v1/completions` are supported.\n     */\n    url?: string;\n};\n\n/**\n * The per-line object of the batch output and error files\n */\nexport type BatchRequestOutput = {\n    id?: string;\n    /**\n     * A developer-provided per-request id that will be used to match outputs to inputs.\n     */\n    custom_id?: string;\n    response?: {\n        /**\n         * The HTTP status code of the response\n         */\n        status_code?: number;\n        /**\n         * An unique identifier for the OpenAI API request. Please include this request ID when contacting support.\n         */\n        request_id?: string;\n        /**\n         * The JSON body of the response\n         */\n        body?: {\n            [key: string]: unknown;\n        };\n    };\n    /**\n     * For requests that failed with a non-HTTP error, this will contain more information on the cause of the failure.\n     */\n    error?: {\n        /**\n         * A machine-readable error code.\n         */\n        code?: string;\n        /**\n         * A human-readable error message.\n         */\n        message?: string;\n    };\n};\n\n/**\n * Represents an individual `certificate` uploaded to the organization.\n */\nexport type Certificate = {\n    /**\n     * The object type.\n     *\n     * - If creating, updating, or getting a specific certificate, the object type is `certificate`.\n     * - If listing, activating, or deactivating certificates for the organization, the object type is `organization.certificate`.\n     * - If listing, activating, or deactivating certificates for a project, the object type is `organization.project.certificate`.\n     *\n     */\n    object: 'certificate' | 'organization.certificate' | 'organization.project.certificate';\n    /**\n     * The identifier, which can be referenced in API endpoints\n     */\n    id: string;\n    /**\n     * The name of the certificate.\n     */\n    name: string;\n    /**\n     * The Unix timestamp (in seconds) of when the certificate was uploaded.\n     */\n    created_at: number;\n    certificate_details: {\n        /**\n         * The Unix timestamp (in seconds) of when the certificate becomes valid.\n         */\n        valid_at?: number;\n        /**\n         * The Unix timestamp (in seconds) of when the certificate expires.\n         */\n        expires_at?: number;\n        /**\n         * The content of the certificate in PEM format.\n         */\n        content?: string;\n    };\n    /**\n     * Whether the certificate is currently active at the specified scope. Not returned when getting details for a specific certificate.\n     */\n    active?: boolean;\n};\n\n/**\n * Allowed tools\n *\n * Constrains the tools available to the model to a pre-defined set.\n *\n */\nexport type ChatCompletionAllowedTools = {\n    /**\n     * Constrains the tools available to the model to a pre-defined set.\n     *\n     * `auto` allows the model to pick from among the allowed tools and generate a\n     * message.\n     *\n     * `required` requires the model to call one or more of the allowed tools.\n     *\n     */\n    mode: 'auto' | 'required';\n    /**\n     * A list of tool definitions that the model should be allowed to call.\n     *\n     * For the Chat Completions API, the list of tool definitions might look like:\n     * ```json\n     * [\n     * { \"type\": \"function\", \"function\": { \"name\": \"get_weather\" } },\n     * { \"type\": \"function\", \"function\": { \"name\": \"get_time\" } }\n     * ]\n     * ```\n     *\n     */\n    tools: Array<{\n        [key: string]: unknown;\n    }>;\n};\n\n/**\n * Allowed tools\n *\n * Constrains the tools available to the model to a pre-defined set.\n *\n */\nexport type ChatCompletionAllowedToolsChoice = {\n    /**\n     * Allowed tool configuration type. Always `allowed_tools`.\n     */\n    type: 'allowed_tools';\n    allowed_tools: ChatCompletionAllowedTools;\n};\n\nexport type ChatCompletionDeleted = {\n    /**\n     * The type of object being deleted.\n     */\n    object: 'chat.completion.deleted';\n    /**\n     * The ID of the chat completion that was deleted.\n     */\n    id: string;\n    /**\n     * Whether the chat completion was deleted.\n     */\n    deleted: boolean;\n};\n\n/**\n * Specifying a particular function via `{\"name\": \"my_function\"}` forces the model to call that function.\n *\n */\nexport type ChatCompletionFunctionCallOption = {\n    /**\n     * The name of the function to call.\n     */\n    name: string;\n};\n\n/**\n * @deprecated\n */\nexport type ChatCompletionFunctions = {\n    /**\n     * A description of what the function does, used by the model to choose when and how to call the function.\n     */\n    description?: string;\n    /**\n     * The name of the function to be called. Must be a-z, A-Z, 0-9, or contain underscores and dashes, with a maximum length of 64.\n     */\n    name: string;\n    parameters?: FunctionParameters;\n};\n\n/**\n * ChatCompletionList\n *\n * An object representing a list of Chat Completions.\n *\n */\nexport type ChatCompletionList = {\n    /**\n     * The type of this object. It is always set to \"list\".\n     *\n     */\n    object: 'list';\n    /**\n     * An array of chat completion objects.\n     *\n     */\n    data: Array<CreateChatCompletionResponse>;\n    /**\n     * The identifier of the first chat completion in the data array.\n     */\n    first_id: string;\n    /**\n     * The identifier of the last chat completion in the data array.\n     */\n    last_id: string;\n    /**\n     * Indicates whether there are more Chat Completions available.\n     */\n    has_more: boolean;\n};\n\n/**\n * Custom tool call\n *\n * A call to a custom tool created by the model.\n *\n */\nexport type ChatCompletionMessageCustomToolCall = {\n    /**\n     * The ID of the tool call.\n     */\n    id: string;\n    /**\n     * The type of the tool. Always `custom`.\n     */\n    type: 'custom';\n    /**\n     * The custom tool that the model called.\n     */\n    custom: {\n        /**\n         * The name of the custom tool to call.\n         */\n        name: string;\n        /**\n         * The input for the custom tool call generated by the model.\n         */\n        input: string;\n    };\n};\n\n/**\n * ChatCompletionMessageList\n *\n * An object representing a list of chat completion messages.\n *\n */\nexport type ChatCompletionMessageList = {\n    /**\n     * The type of this object. It is always set to \"list\".\n     *\n     */\n    object: 'list';\n    /**\n     * An array of chat completion message objects.\n     *\n     */\n    data: Array<ChatCompletionResponseMessage & {\n        /**\n         * The identifier of the chat message.\n         */\n        id: string;\n        /**\n         * If a content parts array was provided, this is an array of `text` and `image_url` parts.\n         * Otherwise, null.\n         *\n         */\n        content_parts?: Array<ChatCompletionRequestMessageContentPartText | ChatCompletionRequestMessageContentPartImage>;\n    }>;\n    /**\n     * The identifier of the first chat message in the data array.\n     */\n    first_id: string;\n    /**\n     * The identifier of the last chat message in the data array.\n     */\n    last_id: string;\n    /**\n     * Indicates whether there are more chat messages available.\n     */\n    has_more: boolean;\n};\n\n/**\n * Function tool call\n *\n * A call to a function tool created by the model.\n *\n */\nexport type ChatCompletionMessageToolCall = {\n    /**\n     * The ID of the tool call.\n     */\n    id: string;\n    /**\n     * The type of the tool. Currently, only `function` is supported.\n     */\n    type: 'function';\n    /**\n     * The function that the model called.\n     */\n    function: {\n        /**\n         * The name of the function to call.\n         */\n        name: string;\n        /**\n         * The arguments to call the function with, as generated by the model in JSON format. Note that the model does not always generate valid JSON, and may hallucinate parameters not defined by your function schema. Validate the arguments in your code before calling your function.\n         */\n        arguments: string;\n    };\n};\n\nexport type ChatCompletionMessageToolCallChunk = {\n    index: number;\n    /**\n     * The ID of the tool call.\n     */\n    id?: string;\n    /**\n     * The type of the tool. Currently, only `function` is supported.\n     */\n    type?: 'function';\n    function?: {\n        /**\n         * The name of the function to call.\n         */\n        name?: string;\n        /**\n         * The arguments to call the function with, as generated by the model in JSON format. Note that the model does not always generate valid JSON, and may hallucinate parameters not defined by your function schema. Validate the arguments in your code before calling your function.\n         */\n        arguments?: string;\n    };\n};\n\n/**\n * The tool calls generated by the model, such as function calls.\n */\nexport type ChatCompletionMessageToolCalls = Array<({\n    type?: 'ChatCompletionMessageToolCall';\n} & ChatCompletionMessageToolCall) | ({\n    type?: 'ChatCompletionMessageCustomToolCall';\n} & ChatCompletionMessageCustomToolCall)>;\n\n/**\n * Output types that you would like the model to generate for this request.\n * Most models are capable of generating text, which is the default:\n *\n * `[\"text\"]`\n *\n * The `gpt-4o-audio-preview` model can also be used to [generate audio](https://platform.openai.com/docs/guides/audio). To\n * request that this model generate both text and audio responses, you can\n * use:\n *\n * `[\"text\", \"audio\"]`\n *\n */\nexport type ChatCompletionModalities = Array<'text' | 'audio'>;\n\n/**\n * Function tool choice\n *\n * Specifies a tool the model should use. Use to force the model to call a specific function.\n */\nexport type ChatCompletionNamedToolChoice = {\n    /**\n     * For function calling, the type is always `function`.\n     */\n    type: 'function';\n    function: {\n        /**\n         * The name of the function to call.\n         */\n        name: string;\n    };\n};\n\n/**\n * Custom tool choice\n *\n * Specifies a tool the model should use. Use to force the model to call a specific custom tool.\n */\nexport type ChatCompletionNamedToolChoiceCustom = {\n    /**\n     * For custom tool calling, the type is always `custom`.\n     */\n    type: 'custom';\n    custom: {\n        /**\n         * The name of the custom tool to call.\n         */\n        name: string;\n    };\n};\n\n/**\n * Assistant message\n *\n * Messages sent by the model in response to user messages.\n *\n */\nexport type ChatCompletionRequestAssistantMessage = {\n    /**\n     * The contents of the assistant message. Required unless `tool_calls` or `function_call` is specified.\n     *\n     */\n    content?: string | Array<ChatCompletionRequestAssistantMessageContentPart>;\n    /**\n     * The refusal message by the assistant.\n     */\n    refusal?: string;\n    /**\n     * The role of the messages author, in this case `assistant`.\n     */\n    role: 'assistant';\n    /**\n     * An optional name for the participant. Provides the model information to differentiate between participants of the same role.\n     */\n    name?: string;\n    /**\n     * Data about a previous audio response from the model.\n     * [Learn more](https://platform.openai.com/docs/guides/audio).\n     *\n     */\n    audio?: {\n        /**\n         * Unique identifier for a previous audio response from the model.\n         *\n         */\n        id: string;\n    };\n    tool_calls?: ChatCompletionMessageToolCalls;\n    /**\n     * Deprecated and replaced by `tool_calls`. The name and arguments of a function that should be called, as generated by the model.\n     *\n     * @deprecated\n     */\n    function_call?: {\n        /**\n         * The arguments to call the function with, as generated by the model in JSON format. Note that the model does not always generate valid JSON, and may hallucinate parameters not defined by your function schema. Validate the arguments in your code before calling your function.\n         */\n        arguments: string;\n        /**\n         * The name of the function to call.\n         */\n        name: string;\n    };\n};\n\nexport type ChatCompletionRequestAssistantMessageContentPart = ({\n    type?: 'ChatCompletionRequestMessageContentPartText';\n} & ChatCompletionRequestMessageContentPartText) | ({\n    type?: 'ChatCompletionRequestMessageContentPartRefusal';\n} & ChatCompletionRequestMessageContentPartRefusal);\n\n/**\n * Developer message\n *\n * Developer-provided instructions that the model should follow, regardless of\n * messages sent by the user. With o1 models and newer, `developer` messages\n * replace the previous `system` messages.\n *\n */\nexport type ChatCompletionRequestDeveloperMessage = {\n    /**\n     * The contents of the developer message.\n     */\n    content: string | Array<ChatCompletionRequestMessageContentPartText>;\n    /**\n     * The role of the messages author, in this case `developer`.\n     */\n    role: 'developer';\n    /**\n     * An optional name for the participant. Provides the model information to differentiate between participants of the same role.\n     */\n    name?: string;\n};\n\n/**\n * Function message\n *\n * @deprecated\n */\nexport type ChatCompletionRequestFunctionMessage = {\n    /**\n     * The role of the messages author, in this case `function`.\n     */\n    role: 'function';\n    /**\n     * The contents of the function message.\n     */\n    content: string;\n    /**\n     * The name of the function to call.\n     */\n    name: string;\n};\n\nexport type ChatCompletionRequestMessage = ({\n    role?: 'ChatCompletionRequestDeveloperMessage';\n} & ChatCompletionRequestDeveloperMessage) | ({\n    role?: 'ChatCompletionRequestSystemMessage';\n} & ChatCompletionRequestSystemMessage) | ({\n    role?: 'ChatCompletionRequestUserMessage';\n} & ChatCompletionRequestUserMessage) | ({\n    role?: 'ChatCompletionRequestAssistantMessage';\n} & ChatCompletionRequestAssistantMessage) | ({\n    role?: 'ChatCompletionRequestToolMessage';\n} & ChatCompletionRequestToolMessage) | ({\n    role?: 'ChatCompletionRequestFunctionMessage';\n} & ChatCompletionRequestFunctionMessage);\n\n/**\n * Audio content part\n *\n * Learn about [audio inputs](https://platform.openai.com/docs/guides/audio).\n *\n */\nexport type ChatCompletionRequestMessageContentPartAudio = {\n    /**\n     * The type of the content part. Always `input_audio`.\n     */\n    type: 'input_audio';\n    input_audio: {\n        /**\n         * Base64 encoded audio data.\n         */\n        data: string;\n        /**\n         * The format of the encoded audio data. Currently supports \"wav\" and \"mp3\".\n         *\n         */\n        format: 'wav' | 'mp3';\n    };\n};\n\n/**\n * File content part\n *\n * Learn about [file inputs](https://platform.openai.com/docs/guides/text) for text generation.\n *\n */\nexport type ChatCompletionRequestMessageContentPartFile = {\n    /**\n     * The type of the content part. Always `file`.\n     */\n    type: 'file';\n    file: {\n        /**\n         * The name of the file, used when passing the file to the model as a\n         * string.\n         *\n         */\n        filename?: string;\n        /**\n         * The base64 encoded file data, used when passing the file to the model\n         * as a string.\n         *\n         */\n        file_data?: string;\n        /**\n         * The ID of an uploaded file to use as input.\n         *\n         */\n        file_id?: string;\n    };\n};\n\n/**\n * Image content part\n *\n * Learn about [image inputs](https://platform.openai.com/docs/guides/vision).\n *\n */\nexport type ChatCompletionRequestMessageContentPartImage = {\n    /**\n     * The type of the content part.\n     */\n    type: 'image_url';\n    image_url: {\n        /**\n         * Either a URL of the image or the base64 encoded image data.\n         */\n        url: string;\n        /**\n         * Specifies the detail level of the image. Learn more in the [Vision guide](https://platform.openai.com/docs/guides/vision#low-or-high-fidelity-image-understanding).\n         */\n        detail?: 'auto' | 'low' | 'high';\n    };\n};\n\n/**\n * Refusal content part\n */\nexport type ChatCompletionRequestMessageContentPartRefusal = {\n    /**\n     * The type of the content part.\n     */\n    type: 'refusal';\n    /**\n     * The refusal message generated by the model.\n     */\n    refusal: string;\n};\n\n/**\n * Text content part\n *\n * Learn about [text inputs](https://platform.openai.com/docs/guides/text-generation).\n *\n */\nexport type ChatCompletionRequestMessageContentPartText = {\n    /**\n     * The type of the content part.\n     */\n    type: 'text';\n    /**\n     * The text content.\n     */\n    text: string;\n};\n\n/**\n * System message\n *\n * Developer-provided instructions that the model should follow, regardless of\n * messages sent by the user. With o1 models and newer, use `developer` messages\n * for this purpose instead.\n *\n */\nexport type ChatCompletionRequestSystemMessage = {\n    /**\n     * The contents of the system message.\n     */\n    content: string | Array<ChatCompletionRequestSystemMessageContentPart>;\n    /**\n     * The role of the messages author, in this case `system`.\n     */\n    role: 'system';\n    /**\n     * An optional name for the participant. Provides the model information to differentiate between participants of the same role.\n     */\n    name?: string;\n};\n\nexport type ChatCompletionRequestSystemMessageContentPart = ChatCompletionRequestMessageContentPartText;\n\n/**\n * Tool message\n */\nexport type ChatCompletionRequestToolMessage = {\n    /**\n     * The role of the messages author, in this case `tool`.\n     */\n    role: 'tool';\n    /**\n     * The contents of the tool message.\n     */\n    content: string | Array<ChatCompletionRequestToolMessageContentPart>;\n    /**\n     * Tool call that this message is responding to.\n     */\n    tool_call_id: string;\n};\n\nexport type ChatCompletionRequestToolMessageContentPart = ChatCompletionRequestMessageContentPartText;\n\n/**\n * User message\n *\n * Messages sent by an end user, containing prompts or additional context\n * information.\n *\n */\nexport type ChatCompletionRequestUserMessage = {\n    /**\n     * The contents of the user message.\n     *\n     */\n    content: string | Array<ChatCompletionRequestUserMessageContentPart>;\n    /**\n     * The role of the messages author, in this case `user`.\n     */\n    role: 'user';\n    /**\n     * An optional name for the participant. Provides the model information to differentiate between participants of the same role.\n     */\n    name?: string;\n};\n\nexport type ChatCompletionRequestUserMessageContentPart = ({\n    type?: 'ChatCompletionRequestMessageContentPartText';\n} & ChatCompletionRequestMessageContentPartText) | ({\n    type?: 'ChatCompletionRequestMessageContentPartImage';\n} & ChatCompletionRequestMessageContentPartImage) | ({\n    type?: 'ChatCompletionRequestMessageContentPartAudio';\n} & ChatCompletionRequestMessageContentPartAudio) | ({\n    type?: 'ChatCompletionRequestMessageContentPartFile';\n} & ChatCompletionRequestMessageContentPartFile);\n\n/**\n * A chat completion message generated by the model.\n */\nexport type ChatCompletionResponseMessage = {\n    /**\n     * The contents of the message.\n     */\n    content: string;\n    /**\n     * The refusal message generated by the model.\n     */\n    refusal: string;\n    tool_calls?: ChatCompletionMessageToolCalls;\n    /**\n     * Annotations for the message, when applicable, as when using the\n     * [web search tool](https://platform.openai.com/docs/guides/tools-web-search?api-mode=chat).\n     *\n     */\n    annotations?: Array<{\n        /**\n         * The type of the URL citation. Always `url_citation`.\n         */\n        type: 'url_citation';\n        /**\n         * A URL citation when using web search.\n         */\n        url_citation: {\n            /**\n             * The index of the last character of the URL citation in the message.\n             */\n            end_index: number;\n            /**\n             * The index of the first character of the URL citation in the message.\n             */\n            start_index: number;\n            /**\n             * The URL of the web resource.\n             */\n            url: string;\n            /**\n             * The title of the web resource.\n             */\n            title: string;\n        };\n    }>;\n    /**\n     * The role of the author of this message.\n     */\n    role: 'assistant';\n    /**\n     * Deprecated and replaced by `tool_calls`. The name and arguments of a function that should be called, as generated by the model.\n     *\n     * @deprecated\n     */\n    function_call?: {\n        /**\n         * The arguments to call the function with, as generated by the model in JSON format. Note that the model does not always generate valid JSON, and may hallucinate parameters not defined by your function schema. Validate the arguments in your code before calling your function.\n         */\n        arguments: string;\n        /**\n         * The name of the function to call.\n         */\n        name: string;\n    };\n    /**\n     * If the audio output modality is requested, this object contains data\n     * about the audio response from the model. [Learn more](https://platform.openai.com/docs/guides/audio).\n     *\n     */\n    audio?: {\n        /**\n         * Unique identifier for this audio response.\n         */\n        id: string;\n        /**\n         * The Unix timestamp (in seconds) for when this audio response will\n         * no longer be accessible on the server for use in multi-turn\n         * conversations.\n         *\n         */\n        expires_at: number;\n        /**\n         * Base64 encoded audio bytes generated by the model, in the format\n         * specified in the request.\n         *\n         */\n        data: string;\n        /**\n         * Transcript of the audio generated by the model.\n         */\n        transcript: string;\n    };\n};\n\n/**\n * The role of the author of a message\n */\nexport const ChatCompletionRole = {\n    DEVELOPER: 'developer',\n    SYSTEM: 'system',\n    USER: 'user',\n    ASSISTANT: 'assistant',\n    TOOL: 'tool',\n    FUNCTION: 'function'\n} as const;\n\n/**\n * The role of the author of a message\n */\nexport type ChatCompletionRole = typeof ChatCompletionRole[keyof typeof ChatCompletionRole];\n\n/**\n * Options for streaming response. Only set this when you set `stream: true`.\n *\n */\nexport type ChatCompletionStreamOptions = {\n    /**\n     * If set, an additional chunk will be streamed before the `data: [DONE]`\n     * message. The `usage` field on this chunk shows the token usage statistics\n     * for the entire request, and the `choices` field will always be an empty\n     * array.\n     *\n     * All other chunks will also include a `usage` field, but with a null\n     * value. **NOTE:** If the stream is interrupted, you may not receive the\n     * final usage chunk which contains the total token usage for the request.\n     *\n     */\n    include_usage?: boolean;\n    /**\n     * When true, stream obfuscation will be enabled. Stream obfuscation adds\n     * random characters to an `obfuscation` field on streaming delta events to\n     * normalize payload sizes as a mitigation to certain side-channel attacks.\n     * These obfuscation fields are included by default, but add a small amount\n     * of overhead to the data stream. You can set `include_obfuscation` to\n     * false to optimize for bandwidth if you trust the network links between\n     * your application and the OpenAI API.\n     *\n     */\n    include_obfuscation?: boolean;\n};\n\n/**\n * A chat completion delta generated by streamed model responses.\n */\nexport type ChatCompletionStreamResponseDelta = {\n    /**\n     * The contents of the chunk message.\n     */\n    content?: string;\n    /**\n     * Deprecated and replaced by `tool_calls`. The name and arguments of a function that should be called, as generated by the model.\n     *\n     * @deprecated\n     */\n    function_call?: {\n        /**\n         * The arguments to call the function with, as generated by the model in JSON format. Note that the model does not always generate valid JSON, and may hallucinate parameters not defined by your function schema. Validate the arguments in your code before calling your function.\n         */\n        arguments?: string;\n        /**\n         * The name of the function to call.\n         */\n        name?: string;\n    };\n    tool_calls?: Array<ChatCompletionMessageToolCallChunk>;\n    /**\n     * The role of the author of this message.\n     */\n    role?: 'developer' | 'system' | 'user' | 'assistant' | 'tool';\n    /**\n     * The refusal message generated by the model.\n     */\n    refusal?: string;\n};\n\nexport type ChatCompletionTokenLogprob = {\n    /**\n     * The token.\n     */\n    token: string;\n    /**\n     * The log probability of this token, if it is within the top 20 most likely tokens. Otherwise, the value `-9999.0` is used to signify that the token is very unlikely.\n     */\n    logprob: number;\n    /**\n     * A list of integers representing the UTF-8 bytes representation of the token. Useful in instances where characters are represented by multiple tokens and their byte representations must be combined to generate the correct text representation. Can be `null` if there is no bytes representation for the token.\n     */\n    bytes: Array<number>;\n    /**\n     * List of the most likely tokens and their log probability, at this token position. In rare cases, there may be fewer than the number of requested `top_logprobs` returned.\n     */\n    top_logprobs: Array<{\n        /**\n         * The token.\n         */\n        token: string;\n        /**\n         * The log probability of this token, if it is within the top 20 most likely tokens. Otherwise, the value `-9999.0` is used to signify that the token is very unlikely.\n         */\n        logprob: number;\n        /**\n         * A list of integers representing the UTF-8 bytes representation of the token. Useful in instances where characters are represented by multiple tokens and their byte representations must be combined to generate the correct text representation. Can be `null` if there is no bytes representation for the token.\n         */\n        bytes: Array<number>;\n    }>;\n};\n\n/**\n * Function tool\n *\n * A function tool that can be used to generate a response.\n *\n */\nexport type ChatCompletionTool = {\n    /**\n     * The type of the tool. Currently, only `function` is supported.\n     */\n    type: 'function';\n    function: FunctionObject;\n};\n\n/**\n * Controls which (if any) tool is called by the model.\n * `none` means the model will not call any tool and instead generates a message.\n * `auto` means the model can pick between generating a message or calling one or more tools.\n * `required` means the model must call one or more tools.\n * Specifying a particular tool via `{\"type\": \"function\", \"function\": {\"name\": \"my_function\"}}` forces the model to call that tool.\n *\n * `none` is the default when no tools are present. `auto` is the default if tools are present.\n *\n */\nexport type ChatCompletionToolChoiceOption = 'none' | 'auto' | 'required' | ChatCompletionAllowedToolsChoice | ChatCompletionNamedToolChoice | ChatCompletionNamedToolChoiceCustom;\n\n/**\n * The chunking strategy used to chunk the file(s). If not set, will use the `auto` strategy. Only applicable if `file_ids` is non-empty.\n */\nexport type ChunkingStrategyRequestParam = ({\n    type?: 'AutoChunkingStrategyRequestParam';\n} & AutoChunkingStrategyRequestParam) | ({\n    type?: 'StaticChunkingStrategyRequestParam';\n} & StaticChunkingStrategyRequestParam);\n\n/**\n * Click\n *\n * A click action.\n *\n */\nexport type Click = {\n    /**\n     * Specifies the event type. For a click action, this property is\n     * always set to `click`.\n     *\n     */\n    type: 'click';\n    /**\n     * Indicates which mouse button was pressed during the click. One of `left`, `right`, `wheel`, `back`, or `forward`.\n     *\n     */\n    button: 'left' | 'right' | 'wheel' | 'back' | 'forward';\n    /**\n     * The x-coordinate where the click occurred.\n     *\n     */\n    x: number;\n    /**\n     * The y-coordinate where the click occurred.\n     *\n     */\n    y: number;\n};\n\n/**\n * Code interpreter file output\n *\n * The output of a code interpreter tool call that is a file.\n *\n */\nexport type CodeInterpreterFileOutput = {\n    /**\n     * The type of the code interpreter file output. Always `files`.\n     *\n     */\n    type: 'files';\n    files: Array<{\n        /**\n         * The MIME type of the file.\n         *\n         */\n        mime_type: string;\n        /**\n         * The ID of the file.\n         *\n         */\n        file_id: string;\n    }>;\n};\n\n/**\n * Code interpreter output image\n *\n * The image output from the code interpreter.\n *\n */\nexport type CodeInterpreterOutputImage = {\n    /**\n     * The type of the output. Always 'image'.\n     */\n    type: 'image';\n    /**\n     * The URL of the image output from the code interpreter.\n     */\n    url: string;\n};\n\n/**\n * Code interpreter output logs\n *\n * The logs output from the code interpreter.\n *\n */\nexport type CodeInterpreterOutputLogs = {\n    /**\n     * The type of the output. Always 'logs'.\n     */\n    type: 'logs';\n    /**\n     * The logs output from the code interpreter.\n     */\n    logs: string;\n};\n\n/**\n * Code interpreter text output\n *\n * The output of a code interpreter tool call that is text.\n *\n */\nexport type CodeInterpreterTextOutput = {\n    /**\n     * The type of the code interpreter text output. Always `logs`.\n     *\n     */\n    type: 'logs';\n    /**\n     * The logs of the code interpreter tool call.\n     *\n     */\n    logs: string;\n};\n\n/**\n * Code interpreter\n *\n * A tool that runs Python code to help generate a response to a prompt.\n *\n */\nexport type CodeInterpreterTool = {\n    /**\n     * The type of the code interpreter tool. Always `code_interpreter`.\n     *\n     */\n    type: 'code_interpreter';\n    /**\n     * The code interpreter container. Can be a container ID or an object that\n     * specifies uploaded file IDs to make available to your code.\n     *\n     */\n    container: string | CodeInterpreterToolAuto;\n};\n\n/**\n * CodeInterpreterContainerAuto\n *\n * Configuration for a code interpreter container. Optionally specify the IDs\n * of the files to run the code on.\n *\n */\nexport type CodeInterpreterToolAuto = {\n    /**\n     * Always `auto`.\n     */\n    type: 'auto';\n    /**\n     * An optional list of uploaded files to make available to your code.\n     *\n     */\n    file_ids?: Array<string>;\n};\n\n/**\n * Code interpreter tool call\n *\n * A tool call to run code.\n *\n */\nexport type CodeInterpreterToolCall = {\n    /**\n     * The type of the code interpreter tool call. Always `code_interpreter_call`.\n     *\n     */\n    type: 'code_interpreter_call';\n    /**\n     * The unique ID of the code interpreter tool call.\n     *\n     */\n    id: string;\n    /**\n     * The status of the code interpreter tool call. Valid values are `in_progress`, `completed`, `incomplete`, `interpreting`, and `failed`.\n     *\n     */\n    status: 'in_progress' | 'completed' | 'incomplete' | 'interpreting' | 'failed';\n    /**\n     * The ID of the container used to run the code.\n     *\n     */\n    container_id: string;\n    /**\n     * The code to run, or null if not available.\n     *\n     */\n    code: string;\n    /**\n     * The outputs generated by the code interpreter, such as logs or images.\n     * Can be null if no outputs are available.\n     *\n     */\n    outputs: Array<({\n        type?: 'CodeInterpreterOutputLogs';\n    } & CodeInterpreterOutputLogs) | ({\n        type?: 'CodeInterpreterOutputImage';\n    } & CodeInterpreterOutputImage)>;\n};\n\n/**\n * Comparison Filter\n *\n * A filter used to compare a specified attribute key to a given value using a defined comparison operation.\n *\n */\nexport type ComparisonFilter = {\n    /**\n     * Specifies the comparison operator: `eq`, `ne`, `gt`, `gte`, `lt`, `lte`.\n     * - `eq`: equals\n     * - `ne`: not equal\n     * - `gt`: greater than\n     * - `gte`: greater than or equal\n     * - `lt`: less than\n     * - `lte`: less than or equal\n     *\n     */\n    type: 'eq' | 'ne' | 'gt' | 'gte' | 'lt' | 'lte';\n    /**\n     * The key to compare against the value.\n     */\n    key: string;\n    /**\n     * The value to compare against the attribute key; supports string, number, or boolean types.\n     */\n    value: string | number | boolean;\n};\n\nexport type CompleteUploadRequest = {\n    /**\n     * The ordered list of Part IDs.\n     *\n     */\n    part_ids: Array<string>;\n    /**\n     * The optional md5 checksum for the file contents to verify if the bytes uploaded matches what you expect.\n     *\n     */\n    md5?: string;\n};\n\n/**\n * Usage statistics for the completion request.\n */\nexport type CompletionUsage = {\n    /**\n     * Number of tokens in the generated completion.\n     */\n    completion_tokens: number;\n    /**\n     * Number of tokens in the prompt.\n     */\n    prompt_tokens: number;\n    /**\n     * Total number of tokens used in the request (prompt + completion).\n     */\n    total_tokens: number;\n    /**\n     * Breakdown of tokens used in a completion.\n     */\n    completion_tokens_details?: {\n        /**\n         * When using Predicted Outputs, the number of tokens in the\n         * prediction that appeared in the completion.\n         *\n         */\n        accepted_prediction_tokens?: number;\n        /**\n         * Audio input tokens generated by the model.\n         */\n        audio_tokens?: number;\n        /**\n         * Tokens generated by the model for reasoning.\n         */\n        reasoning_tokens?: number;\n        /**\n         * When using Predicted Outputs, the number of tokens in the\n         * prediction that did not appear in the completion. However, like\n         * reasoning tokens, these tokens are still counted in the total\n         * completion tokens for purposes of billing, output, and context window\n         * limits.\n         *\n         */\n        rejected_prediction_tokens?: number;\n    };\n    /**\n     * Breakdown of tokens used in the prompt.\n     */\n    prompt_tokens_details?: {\n        /**\n         * Audio input tokens present in the prompt.\n         */\n        audio_tokens?: number;\n        /**\n         * Cached tokens present in the prompt.\n         */\n        cached_tokens?: number;\n    };\n};\n\n/**\n * Compound Filter\n *\n * Combine multiple filters using `and` or `or`.\n */\nexport type CompoundFilter = {\n    /**\n     * Type of operation: `and` or `or`.\n     */\n    type: 'and' | 'or';\n    /**\n     * Array of filters to combine. Items can be `ComparisonFilter` or `CompoundFilter`.\n     */\n    filters: Array<ComparisonFilter | unknown>;\n};\n\nexport type ComputerAction = ({\n    type?: 'Click';\n} & Click) | ({\n    type?: 'DoubleClick';\n} & DoubleClick) | ({\n    type?: 'Drag';\n} & Drag) | ({\n    type?: 'KeyPress';\n} & KeyPress) | ({\n    type?: 'Move';\n} & Move) | ({\n    type?: 'Screenshot';\n} & Screenshot) | ({\n    type?: 'Scroll';\n} & Scroll) | ({\n    type?: 'Type';\n} & Type) | ({\n    type?: 'Wait';\n} & Wait);\n\n/**\n * A computer screenshot image used with the computer use tool.\n *\n */\nexport type ComputerScreenshotImage = {\n    /**\n     * Specifies the event type. For a computer screenshot, this property is\n     * always set to `computer_screenshot`.\n     *\n     */\n    type: 'computer_screenshot';\n    /**\n     * The URL of the screenshot image.\n     */\n    image_url?: string;\n    /**\n     * The identifier of an uploaded file that contains the screenshot.\n     */\n    file_id?: string;\n};\n\n/**\n * Computer tool call\n *\n * A tool call to a computer use tool. See the\n * [computer use guide](https://platform.openai.com/docs/guides/tools-computer-use) for more information.\n *\n */\nexport type ComputerToolCall = {\n    /**\n     * The type of the computer call. Always `computer_call`.\n     */\n    type: 'computer_call';\n    /**\n     * The unique ID of the computer call.\n     */\n    id: string;\n    /**\n     * An identifier used when responding to the tool call with output.\n     *\n     */\n    call_id: string;\n    action: ComputerAction;\n    /**\n     * The pending safety checks for the computer call.\n     *\n     */\n    pending_safety_checks: Array<ComputerToolCallSafetyCheck>;\n    /**\n     * The status of the item. One of `in_progress`, `completed`, or\n     * `incomplete`. Populated when items are returned via API.\n     *\n     */\n    status: 'in_progress' | 'completed' | 'incomplete';\n};\n\n/**\n * Computer tool call output\n *\n * The output of a computer tool call.\n *\n */\nexport type ComputerToolCallOutput = {\n    /**\n     * The type of the computer tool call output. Always `computer_call_output`.\n     *\n     */\n    type: 'computer_call_output';\n    /**\n     * The ID of the computer tool call output.\n     *\n     */\n    id?: string;\n    /**\n     * The ID of the computer tool call that produced the output.\n     *\n     */\n    call_id: string;\n    /**\n     * The safety checks reported by the API that have been acknowledged by the\n     * developer.\n     *\n     */\n    acknowledged_safety_checks?: Array<ComputerToolCallSafetyCheck>;\n    output: ComputerScreenshotImage;\n    /**\n     * The status of the message input. One of `in_progress`, `completed`, or\n     * `incomplete`. Populated when input items are returned via API.\n     *\n     */\n    status?: 'in_progress' | 'completed' | 'incomplete';\n};\n\nexport type ComputerToolCallOutputResource = ComputerToolCallOutput & {\n    /**\n     * The unique ID of the computer call tool output.\n     *\n     */\n    id: string;\n};\n\n/**\n * A pending safety check for the computer call.\n *\n */\nexport type ComputerToolCallSafetyCheck = {\n    /**\n     * The ID of the pending safety check.\n     */\n    id: string;\n    /**\n     * The type of the pending safety check.\n     */\n    code: string;\n    /**\n     * Details about the pending safety check.\n     */\n    message: string;\n};\n\nexport type ContainerFileListResource = {\n    /**\n     * The type of object returned, must be 'list'.\n     */\n    object: 'list';\n    /**\n     * A list of container files.\n     */\n    data: Array<ContainerFileResource>;\n    /**\n     * The ID of the first file in the list.\n     */\n    first_id: string;\n    /**\n     * The ID of the last file in the list.\n     */\n    last_id: string;\n    /**\n     * Whether there are more files available.\n     */\n    has_more: boolean;\n};\n\n/**\n * The container file object\n */\nexport type ContainerFileResource = {\n    /**\n     * Unique identifier for the file.\n     */\n    id: string;\n    /**\n     * The type of this object (`container.file`).\n     */\n    object: 'container.file';\n    /**\n     * The container this file belongs to.\n     */\n    container_id: string;\n    /**\n     * Unix timestamp (in seconds) when the file was created.\n     */\n    created_at: number;\n    /**\n     * Size of the file in bytes.\n     */\n    bytes: number;\n    /**\n     * Path of the file in the container.\n     */\n    path: string;\n    /**\n     * Source of the file (e.g., `user`, `assistant`).\n     */\n    source: string;\n};\n\nexport type ContainerListResource = {\n    /**\n     * The type of object returned, must be 'list'.\n     */\n    object: 'list';\n    /**\n     * A list of containers.\n     */\n    data: Array<ContainerResource>;\n    /**\n     * The ID of the first container in the list.\n     */\n    first_id: string;\n    /**\n     * The ID of the last container in the list.\n     */\n    last_id: string;\n    /**\n     * Whether there are more containers available.\n     */\n    has_more: boolean;\n};\n\n/**\n * The container object\n */\nexport type ContainerResource = {\n    /**\n     * Unique identifier for the container.\n     */\n    id: string;\n    /**\n     * The type of this object.\n     */\n    object: string;\n    /**\n     * Name of the container.\n     */\n    name: string;\n    /**\n     * Unix timestamp (in seconds) when the container was created.\n     */\n    created_at: number;\n    /**\n     * Status of the container (e.g., active, deleted).\n     */\n    status: string;\n    /**\n     * The container will expire after this time period.\n     * The anchor is the reference point for the expiration.\n     * The minutes is the number of minutes after the anchor before the container expires.\n     *\n     */\n    expires_after?: {\n        /**\n         * The reference point for the expiration.\n         */\n        anchor?: 'last_active_at';\n        /**\n         * The number of minutes after the anchor before the container expires.\n         */\n        minutes?: number;\n    };\n};\n\n/**\n * Multi-modal input and output contents.\n *\n */\nexport type Content = InputContent | OutputContent;\n\n/**\n * Coordinate\n *\n * An x/y coordinate pair, e.g. `{ x: 100, y: 200 }`.\n *\n */\nexport type Coordinate = {\n    /**\n     * The x-coordinate.\n     *\n     */\n    x: number;\n    /**\n     * The y-coordinate.\n     *\n     */\n    y: number;\n};\n\n/**\n * The aggregated costs details of the specific time bucket.\n */\nexport type CostsResult = {\n    object: 'organization.costs.result';\n    /**\n     * The monetary value in its associated currency.\n     */\n    amount?: {\n        /**\n         * The numeric value of the cost.\n         */\n        value?: number;\n        /**\n         * Lowercase ISO-4217 currency e.g. \"usd\"\n         */\n        currency?: string;\n    };\n    /**\n     * When `group_by=line_item`, this field provides the line item of the grouped costs result.\n     */\n    line_item?: string;\n    /**\n     * When `group_by=project_id`, this field provides the project ID of the grouped costs result.\n     */\n    project_id?: string;\n};\n\nexport type CreateAssistantRequest = {\n    /**\n     * ID of the model to use. You can use the [List models](https://platform.openai.com/docs/api-reference/models/list) API to see all of your available models, or see our [Model overview](https://platform.openai.com/docs/models) for descriptions of them.\n     *\n     */\n    model: string | AssistantSupportedModels;\n    /**\n     * The name of the assistant. The maximum length is 256 characters.\n     *\n     */\n    name?: string;\n    /**\n     * The description of the assistant. The maximum length is 512 characters.\n     *\n     */\n    description?: string;\n    /**\n     * The system instructions that the assistant uses. The maximum length is 256,000 characters.\n     *\n     */\n    instructions?: string;\n    reasoning_effort?: ReasoningEffort;\n    /**\n     * A list of tool enabled on the assistant. There can be a maximum of 128 tools per assistant. Tools can be of types `code_interpreter`, `file_search`, or `function`.\n     *\n     */\n    tools?: Array<AssistantTool>;\n    /**\n     * A set of resources that are used by the assistant's tools. The resources are specific to the type of tool. For example, the `code_interpreter` tool requires a list of file IDs, while the `file_search` tool requires a list of vector store IDs.\n     *\n     */\n    tool_resources?: {\n        code_interpreter?: {\n            /**\n             * A list of [file](https://platform.openai.com/docs/api-reference/files) IDs made available to the `code_interpreter` tool. There can be a maximum of 20 files associated with the tool.\n             *\n             */\n            file_ids?: Array<string>;\n        };\n        file_search?: unknown & {\n            /**\n             * The [vector store](https://platform.openai.com/docs/api-reference/vector-stores/object) attached to this assistant. There can be a maximum of 1 vector store attached to the assistant.\n             *\n             */\n            vector_store_ids?: Array<string>;\n            /**\n             * A helper to create a [vector store](https://platform.openai.com/docs/api-reference/vector-stores/object) with file_ids and attach it to this assistant. There can be a maximum of 1 vector store attached to the assistant.\n             *\n             */\n            vector_stores?: Array<{\n                /**\n                 * A list of [file](https://platform.openai.com/docs/api-reference/files) IDs to add to the vector store. There can be a maximum of 10000 files in a vector store.\n                 *\n                 */\n                file_ids?: Array<string>;\n                /**\n                 * The chunking strategy used to chunk the file(s). If not set, will use the `auto` strategy.\n                 */\n                chunking_strategy?: {\n                    /**\n                     * Always `auto`.\n                     */\n                    type: 'auto';\n                } | {\n                    /**\n                     * Always `static`.\n                     */\n                    type: 'static';\n                    static: {\n                        /**\n                         * The maximum number of tokens in each chunk. The default value is `800`. The minimum value is `100` and the maximum value is `4096`.\n                         */\n                        max_chunk_size_tokens: number;\n                        /**\n                         * The number of tokens that overlap between chunks. The default value is `400`.\n                         *\n                         * Note that the overlap must not exceed half of `max_chunk_size_tokens`.\n                         *\n                         */\n                        chunk_overlap_tokens: number;\n                    };\n                };\n                metadata?: Metadata;\n            }>;\n        };\n    };\n    metadata?: Metadata;\n    /**\n     * What sampling temperature to use, between 0 and 2. Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic.\n     *\n     */\n    temperature?: number;\n    /**\n     * An alternative to sampling with temperature, called nucleus sampling, where the model considers the results of the tokens with top_p probability mass. So 0.1 means only the tokens comprising the top 10% probability mass are considered.\n     *\n     * We generally recommend altering this or temperature but not both.\n     *\n     */\n    top_p?: number;\n    response_format?: AssistantsApiResponseFormatOption;\n};\n\nexport type CreateChatCompletionRequest = CreateModelResponseProperties & {\n    /**\n     * A list of messages comprising the conversation so far. Depending on the\n     * [model](https://platform.openai.com/docs/models) you use, different message types (modalities) are\n     * supported, like [text](https://platform.openai.com/docs/guides/text-generation),\n     * [images](https://platform.openai.com/docs/guides/vision), and [audio](https://platform.openai.com/docs/guides/audio).\n     *\n     */\n    messages: Array<ChatCompletionRequestMessage>;\n    /**\n     * Model ID used to generate the response, like `gpt-4o` or `o3`. OpenAI\n     * offers a wide range of models with different capabilities, performance\n     * characteristics, and price points. Refer to the [model guide](https://platform.openai.com/docs/models)\n     * to browse and compare available models.\n     *\n     */\n    model: ModelIdsShared;\n    modalities?: ResponseModalities;\n    verbosity?: Verbosity;\n    reasoning_effort?: ReasoningEffort;\n    /**\n     * An upper bound for the number of tokens that can be generated for a completion, including visible output tokens and [reasoning tokens](https://platform.openai.com/docs/guides/reasoning).\n     *\n     */\n    max_completion_tokens?: number;\n    /**\n     * Number between -2.0 and 2.0. Positive values penalize new tokens based on\n     * their existing frequency in the text so far, decreasing the model's\n     * likelihood to repeat the same line verbatim.\n     *\n     */\n    frequency_penalty?: number;\n    /**\n     * Number between -2.0 and 2.0. Positive values penalize new tokens based on\n     * whether they appear in the text so far, increasing the model's likelihood\n     * to talk about new topics.\n     *\n     */\n    presence_penalty?: number;\n    /**\n     * Web search\n     *\n     * This tool searches the web for relevant results to use in a response.\n     * Learn more about the [web search tool](https://platform.openai.com/docs/guides/tools-web-search?api-mode=chat).\n     *\n     */\n    web_search_options?: {\n        /**\n         * Approximate location parameters for the search.\n         *\n         */\n        user_location?: {\n            /**\n             * The type of location approximation. Always `approximate`.\n             *\n             */\n            type: 'approximate';\n            approximate: WebSearchLocation;\n        };\n        search_context_size?: WebSearchContextSize;\n    };\n    /**\n     * An integer between 0 and 20 specifying the number of most likely tokens to\n     * return at each token position, each with an associated log probability.\n     * `logprobs` must be set to `true` if this parameter is used.\n     *\n     */\n    top_logprobs?: number;\n    /**\n     * An object specifying the format that the model must output.\n     *\n     * Setting to `{ \"type\": \"json_schema\", \"json_schema\": {...} }` enables\n     * Structured Outputs which ensures the model will match your supplied JSON\n     * schema. Learn more in the [Structured Outputs\n     * guide](https://platform.openai.com/docs/guides/structured-outputs).\n     *\n     * Setting to `{ \"type\": \"json_object\" }` enables the older JSON mode, which\n     * ensures the message the model generates is valid JSON. Using `json_schema`\n     * is preferred for models that support it.\n     *\n     */\n    response_format?: ResponseFormatText | ResponseFormatJsonSchema | ResponseFormatJsonObject;\n    /**\n     * Parameters for audio output. Required when audio output is requested with\n     * `modalities: [\"audio\"]`. [Learn more](https://platform.openai.com/docs/guides/audio).\n     *\n     */\n    audio?: {\n        /**\n         * The voice the model uses to respond. Supported voices are\n         * `alloy`, `ash`, `ballad`, `coral`, `echo`, `fable`, `nova`, `onyx`, `sage`, and `shimmer`.\n         *\n         */\n        voice: VoiceIdsShared;\n        /**\n         * Specifies the output audio format. Must be one of `wav`, `mp3`, `flac`,\n         * `opus`, or `pcm16`.\n         *\n         */\n        format: 'wav' | 'aac' | 'mp3' | 'flac' | 'opus' | 'pcm16';\n    };\n    /**\n     * Whether or not to store the output of this chat completion request for\n     * use in our [model distillation](https://platform.openai.com/docs/guides/distillation) or\n     * [evals](https://platform.openai.com/docs/guides/evals) products.\n     *\n     * Supports text and image inputs. Note: image inputs over 8MB will be dropped.\n     *\n     */\n    store?: boolean;\n    /**\n     * If set to true, the model response data will be streamed to the client\n     * as it is generated using [server-sent events](https://developer.mozilla.org/en-US/docs/Web/API/Server-sent_events/Using_server-sent_events#Event_stream_format).\n     * See the [Streaming section below](https://platform.openai.com/docs/api-reference/chat/streaming)\n     * for more information, along with the [streaming responses](https://platform.openai.com/docs/guides/streaming-responses)\n     * guide for more information on how to handle the streaming events.\n     *\n     */\n    stream?: boolean;\n    stop?: StopConfiguration;\n    /**\n     * Modify the likelihood of specified tokens appearing in the completion.\n     *\n     * Accepts a JSON object that maps tokens (specified by their token ID in the\n     * tokenizer) to an associated bias value from -100 to 100. Mathematically,\n     * the bias is added to the logits generated by the model prior to sampling.\n     * The exact effect will vary per model, but values between -1 and 1 should\n     * decrease or increase likelihood of selection; values like -100 or 100\n     * should result in a ban or exclusive selection of the relevant token.\n     *\n     */\n    logit_bias?: {\n        [key: string]: number;\n    };\n    /**\n     * Whether to return log probabilities of the output tokens or not. If true,\n     * returns the log probabilities of each output token returned in the\n     * `content` of `message`.\n     *\n     */\n    logprobs?: boolean;\n    /**\n     * The maximum number of [tokens](/tokenizer) that can be generated in the\n     * chat completion. This value can be used to control\n     * [costs](https://openai.com/api/pricing/) for text generated via API.\n     *\n     * This value is now deprecated in favor of `max_completion_tokens`, and is\n     * not compatible with [o-series models](https://platform.openai.com/docs/guides/reasoning).\n     *\n     *\n     * @deprecated\n     */\n    max_tokens?: number;\n    /**\n     * How many chat completion choices to generate for each input message. Note that you will be charged based on the number of generated tokens across all of the choices. Keep `n` as `1` to minimize costs.\n     */\n    n?: number;\n    /**\n     * Configuration for a [Predicted Output](https://platform.openai.com/docs/guides/predicted-outputs),\n     * which can greatly improve response times when large parts of the model\n     * response are known ahead of time. This is most common when you are\n     * regenerating a file with only minor changes to most of the content.\n     *\n     */\n    prediction?: {\n        type?: 'PredictionContent';\n    } & PredictionContent;\n    /**\n     * This feature is in Beta.\n     * If specified, our system will make a best effort to sample deterministically, such that repeated requests with the same `seed` and parameters should return the same result.\n     * Determinism is not guaranteed, and you should refer to the `system_fingerprint` response parameter to monitor changes in the backend.\n     *\n     *\n     * @deprecated\n     */\n    seed?: number;\n    stream_options?: ChatCompletionStreamOptions;\n    /**\n     * A list of tools the model may call. You can provide either\n     * [custom tools](https://platform.openai.com/docs/guides/function-calling#custom-tools) or\n     * [function tools](https://platform.openai.com/docs/guides/function-calling).\n     *\n     */\n    tools?: Array<({\n        type?: 'ChatCompletionTool';\n    } & ChatCompletionTool) | ({\n        type?: 'CustomToolChatCompletions';\n    } & CustomToolChatCompletions)>;\n    tool_choice?: ChatCompletionToolChoiceOption;\n    parallel_tool_calls?: ParallelToolCalls;\n    /**\n     * Deprecated in favor of `tool_choice`.\n     *\n     * Controls which (if any) function is called by the model.\n     *\n     * `none` means the model will not call a function and instead generates a\n     * message.\n     *\n     * `auto` means the model can pick between generating a message or calling a\n     * function.\n     *\n     * Specifying a particular function via `{\"name\": \"my_function\"}` forces the\n     * model to call that function.\n     *\n     * `none` is the default when no functions are present. `auto` is the default\n     * if functions are present.\n     *\n     *\n     * @deprecated\n     */\n    function_call?: 'none' | 'auto' | ChatCompletionFunctionCallOption;\n    /**\n     * Deprecated in favor of `tools`.\n     *\n     * A list of functions the model may generate JSON inputs for.\n     *\n     *\n     * @deprecated\n     */\n    functions?: Array<ChatCompletionFunctions>;\n};\n\n/**\n * Represents a chat completion response returned by model, based on the provided input.\n */\nexport type CreateChatCompletionResponse = {\n    /**\n     * A unique identifier for the chat completion.\n     */\n    id: string;\n    /**\n     * A list of chat completion choices. Can be more than one if `n` is greater than 1.\n     */\n    choices: Array<{\n        /**\n         * The reason the model stopped generating tokens. This will be `stop` if the model hit a natural stop point or a provided stop sequence,\n         * `length` if the maximum number of tokens specified in the request was reached,\n         * `content_filter` if content was omitted due to a flag from our content filters,\n         * `tool_calls` if the model called a tool, or `function_call` (deprecated) if the model called a function.\n         *\n         */\n        finish_reason: 'stop' | 'length' | 'tool_calls' | 'content_filter' | 'function_call';\n        /**\n         * The index of the choice in the list of choices.\n         */\n        index: number;\n        message: ChatCompletionResponseMessage;\n        /**\n         * Log probability information for the choice.\n         */\n        logprobs: {\n            /**\n             * A list of message content tokens with log probability information.\n             */\n            content: Array<ChatCompletionTokenLogprob>;\n            /**\n             * A list of message refusal tokens with log probability information.\n             */\n            refusal: Array<ChatCompletionTokenLogprob>;\n        };\n    }>;\n    /**\n     * The Unix timestamp (in seconds) of when the chat completion was created.\n     */\n    created: number;\n    /**\n     * The model used for the chat completion.\n     */\n    model: string;\n    service_tier?: ServiceTier;\n    /**\n     * This fingerprint represents the backend configuration that the model runs with.\n     *\n     * Can be used in conjunction with the `seed` request parameter to understand when backend changes have been made that might impact determinism.\n     *\n     *\n     * @deprecated\n     */\n    system_fingerprint?: string;\n    /**\n     * The object type, which is always `chat.completion`.\n     */\n    object: 'chat.completion';\n    usage?: CompletionUsage;\n};\n\n/**\n * Represents a streamed chunk of a chat completion response returned\n * by the model, based on the provided input.\n * [Learn more](https://platform.openai.com/docs/guides/streaming-responses).\n *\n */\nexport type CreateChatCompletionStreamResponse = {\n    /**\n     * A unique identifier for the chat completion. Each chunk has the same ID.\n     */\n    id: string;\n    /**\n     * A list of chat completion choices. Can contain more than one elements if `n` is greater than 1. Can also be empty for the\n     * last chunk if you set `stream_options: {\"include_usage\": true}`.\n     *\n     */\n    choices: Array<{\n        delta: ChatCompletionStreamResponseDelta;\n        /**\n         * Log probability information for the choice.\n         */\n        logprobs?: {\n            /**\n             * A list of message content tokens with log probability information.\n             */\n            content: Array<ChatCompletionTokenLogprob>;\n            /**\n             * A list of message refusal tokens with log probability information.\n             */\n            refusal: Array<ChatCompletionTokenLogprob>;\n        };\n        /**\n         * The reason the model stopped generating tokens. This will be `stop` if the model hit a natural stop point or a provided stop sequence,\n         * `length` if the maximum number of tokens specified in the request was reached,\n         * `content_filter` if content was omitted due to a flag from our content filters,\n         * `tool_calls` if the model called a tool, or `function_call` (deprecated) if the model called a function.\n         *\n         */\n        finish_reason: 'stop' | 'length' | 'tool_calls' | 'content_filter' | 'function_call';\n        /**\n         * The index of the choice in the list of choices.\n         */\n        index: number;\n    }>;\n    /**\n     * The Unix timestamp (in seconds) of when the chat completion was created. Each chunk has the same timestamp.\n     */\n    created: number;\n    /**\n     * The model to generate the completion.\n     */\n    model: string;\n    service_tier?: ServiceTier;\n    /**\n     * This fingerprint represents the backend configuration that the model runs with.\n     * Can be used in conjunction with the `seed` request parameter to understand when backend changes have been made that might impact determinism.\n     *\n     *\n     * @deprecated\n     */\n    system_fingerprint?: string;\n    /**\n     * The object type, which is always `chat.completion.chunk`.\n     */\n    object: 'chat.completion.chunk';\n    /**\n     * An optional field that will only be present when you set\n     * `stream_options: {\"include_usage\": true}` in your request. When present, it\n     * contains a null value **except for the last chunk** which contains the\n     * token usage statistics for the entire request.\n     *\n     * **NOTE:** If the stream is interrupted or cancelled, you may not\n     * receive the final usage chunk which contains the total token usage for\n     * the request.\n     *\n     */\n    usage?: CompletionUsage;\n};\n\nexport type CreateCompletionRequest = {\n    /**\n     * ID of the model to use. You can use the [List models](https://platform.openai.com/docs/api-reference/models/list) API to see all of your available models, or see our [Model overview](https://platform.openai.com/docs/models) for descriptions of them.\n     *\n     */\n    model: string | 'gpt-3.5-turbo-instruct' | 'davinci-002' | 'babbage-002';\n    /**\n     * The prompt(s) to generate completions for, encoded as a string, array of strings, array of tokens, or array of token arrays.\n     *\n     * Note that <|endoftext|> is the document separator that the model sees during training, so if a prompt is not specified the model will generate as if from the beginning of a new document.\n     *\n     */\n    prompt: string | Array<string> | Array<number> | Array<Array<number>>;\n    /**\n     * Generates `best_of` completions server-side and returns the \"best\" (the one with the highest log probability per token). Results cannot be streamed.\n     *\n     * When used with `n`, `best_of` controls the number of candidate completions and `n` specifies how many to return – `best_of` must be greater than `n`.\n     *\n     * **Note:** Because this parameter generates many completions, it can quickly consume your token quota. Use carefully and ensure that you have reasonable settings for `max_tokens` and `stop`.\n     *\n     */\n    best_of?: number;\n    /**\n     * Echo back the prompt in addition to the completion\n     *\n     */\n    echo?: boolean;\n    /**\n     * Number between -2.0 and 2.0. Positive values penalize new tokens based on their existing frequency in the text so far, decreasing the model's likelihood to repeat the same line verbatim.\n     *\n     * [See more information about frequency and presence penalties.](https://platform.openai.com/docs/guides/text-generation)\n     *\n     */\n    frequency_penalty?: number;\n    /**\n     * Modify the likelihood of specified tokens appearing in the completion.\n     *\n     * Accepts a JSON object that maps tokens (specified by their token ID in the GPT tokenizer) to an associated bias value from -100 to 100. You can use this [tokenizer tool](/tokenizer?view=bpe) to convert text to token IDs. Mathematically, the bias is added to the logits generated by the model prior to sampling. The exact effect will vary per model, but values between -1 and 1 should decrease or increase likelihood of selection; values like -100 or 100 should result in a ban or exclusive selection of the relevant token.\n     *\n     * As an example, you can pass `{\"50256\": -100}` to prevent the <|endoftext|> token from being generated.\n     *\n     */\n    logit_bias?: {\n        [key: string]: number;\n    };\n    /**\n     * Include the log probabilities on the `logprobs` most likely output tokens, as well the chosen tokens. For example, if `logprobs` is 5, the API will return a list of the 5 most likely tokens. The API will always return the `logprob` of the sampled token, so there may be up to `logprobs+1` elements in the response.\n     *\n     * The maximum value for `logprobs` is 5.\n     *\n     */\n    logprobs?: number;\n    /**\n     * The maximum number of [tokens](/tokenizer) that can be generated in the completion.\n     *\n     * The token count of your prompt plus `max_tokens` cannot exceed the model's context length. [Example Python code](https://cookbook.openai.com/examples/how_to_count_tokens_with_tiktoken) for counting tokens.\n     *\n     */\n    max_tokens?: number;\n    /**\n     * How many completions to generate for each prompt.\n     *\n     * **Note:** Because this parameter generates many completions, it can quickly consume your token quota. Use carefully and ensure that you have reasonable settings for `max_tokens` and `stop`.\n     *\n     */\n    n?: number;\n    /**\n     * Number between -2.0 and 2.0. Positive values penalize new tokens based on whether they appear in the text so far, increasing the model's likelihood to talk about new topics.\n     *\n     * [See more information about frequency and presence penalties.](https://platform.openai.com/docs/guides/text-generation)\n     *\n     */\n    presence_penalty?: number;\n    /**\n     * If specified, our system will make a best effort to sample deterministically, such that repeated requests with the same `seed` and parameters should return the same result.\n     *\n     * Determinism is not guaranteed, and you should refer to the `system_fingerprint` response parameter to monitor changes in the backend.\n     *\n     */\n    seed?: number;\n    stop?: StopConfiguration;\n    /**\n     * Whether to stream back partial progress. If set, tokens will be sent as data-only [server-sent events](https://developer.mozilla.org/en-US/docs/Web/API/Server-sent_events/Using_server-sent_events#Event_stream_format) as they become available, with the stream terminated by a `data: [DONE]` message. [Example Python code](https://cookbook.openai.com/examples/how_to_stream_completions).\n     *\n     */\n    stream?: boolean;\n    stream_options?: ChatCompletionStreamOptions;\n    /**\n     * The suffix that comes after a completion of inserted text.\n     *\n     * This parameter is only supported for `gpt-3.5-turbo-instruct`.\n     *\n     */\n    suffix?: string;\n    /**\n     * What sampling temperature to use, between 0 and 2. Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic.\n     *\n     * We generally recommend altering this or `top_p` but not both.\n     *\n     */\n    temperature?: number;\n    /**\n     * An alternative to sampling with temperature, called nucleus sampling, where the model considers the results of the tokens with top_p probability mass. So 0.1 means only the tokens comprising the top 10% probability mass are considered.\n     *\n     * We generally recommend altering this or `temperature` but not both.\n     *\n     */\n    top_p?: number;\n    /**\n     * A unique identifier representing your end-user, which can help OpenAI to monitor and detect abuse. [Learn more](https://platform.openai.com/docs/guides/safety-best-practices#end-user-ids).\n     *\n     */\n    user?: string;\n};\n\n/**\n * Represents a completion response from the API. Note: both the streamed and non-streamed response objects share the same shape (unlike the chat endpoint).\n *\n */\nexport type CreateCompletionResponse = {\n    /**\n     * A unique identifier for the completion.\n     */\n    id: string;\n    /**\n     * The list of completion choices the model generated for the input prompt.\n     */\n    choices: Array<{\n        /**\n         * The reason the model stopped generating tokens. This will be `stop` if the model hit a natural stop point or a provided stop sequence,\n         * `length` if the maximum number of tokens specified in the request was reached,\n         * or `content_filter` if content was omitted due to a flag from our content filters.\n         *\n         */\n        finish_reason: 'stop' | 'length' | 'content_filter';\n        index: number;\n        logprobs: {\n            text_offset?: Array<number>;\n            token_logprobs?: Array<number>;\n            tokens?: Array<string>;\n            top_logprobs?: Array<{\n                [key: string]: number;\n            }>;\n        };\n        text: string;\n    }>;\n    /**\n     * The Unix timestamp (in seconds) of when the completion was created.\n     */\n    created: number;\n    /**\n     * The model used for completion.\n     */\n    model: string;\n    /**\n     * This fingerprint represents the backend configuration that the model runs with.\n     *\n     * Can be used in conjunction with the `seed` request parameter to understand when backend changes have been made that might impact determinism.\n     *\n     */\n    system_fingerprint?: string;\n    /**\n     * The object type, which is always \"text_completion\"\n     */\n    object: 'text_completion';\n    usage?: CompletionUsage;\n};\n\nexport type CreateContainerBody = {\n    /**\n     * Name of the container to create.\n     */\n    name: string;\n    /**\n     * IDs of files to copy to the container.\n     */\n    file_ids?: Array<string>;\n    /**\n     * Container expiration time in seconds relative to the 'anchor' time.\n     */\n    expires_after?: {\n        /**\n         * Time anchor for the expiration time. Currently only 'last_active_at' is supported.\n         */\n        anchor: 'last_active_at';\n        minutes: number;\n    };\n};\n\nexport type CreateContainerFileBody = {\n    /**\n     * Name of the file to create.\n     */\n    file_id?: string;\n    /**\n     * The File object (not file name) to be uploaded.\n     *\n     */\n    file?: Blob | File;\n};\n\nexport type CreateEmbeddingRequest = {\n    /**\n     * Input text to embed, encoded as a string or array of tokens. To embed multiple inputs in a single request, pass an array of strings or array of token arrays. The input must not exceed the max input tokens for the model (8192 tokens for all embedding models), cannot be an empty string, and any array must be 2048 dimensions or less. [Example Python code](https://cookbook.openai.com/examples/how_to_count_tokens_with_tiktoken) for counting tokens. In addition to the per-input token limit, all embedding  models enforce a maximum of 300,000 tokens summed across all inputs in a  single request.\n     *\n     */\n    input: string | Array<string> | Array<number> | Array<Array<number>>;\n    /**\n     * ID of the model to use. You can use the [List models](https://platform.openai.com/docs/api-reference/models/list) API to see all of your available models, or see our [Model overview](https://platform.openai.com/docs/models) for descriptions of them.\n     *\n     */\n    model: string | 'text-embedding-ada-002' | 'text-embedding-3-small' | 'text-embedding-3-large';\n    /**\n     * The format to return the embeddings in. Can be either `float` or [`base64`](https://pypi.org/project/pybase64/).\n     */\n    encoding_format?: 'float' | 'base64';\n    /**\n     * The number of dimensions the resulting output embeddings should have. Only supported in `text-embedding-3` and later models.\n     *\n     */\n    dimensions?: number;\n    /**\n     * A unique identifier representing your end-user, which can help OpenAI to monitor and detect abuse. [Learn more](https://platform.openai.com/docs/guides/safety-best-practices#end-user-ids).\n     *\n     */\n    user?: string;\n};\n\nexport type CreateEmbeddingResponse = {\n    /**\n     * The list of embeddings generated by the model.\n     */\n    data: Array<Embedding>;\n    /**\n     * The name of the model used to generate the embedding.\n     */\n    model: string;\n    /**\n     * The object type, which is always \"list\".\n     */\n    object: 'list';\n    /**\n     * The usage information for the request.\n     */\n    usage: {\n        /**\n         * The number of tokens used by the prompt.\n         */\n        prompt_tokens: number;\n        /**\n         * The total number of tokens used by the request.\n         */\n        total_tokens: number;\n    };\n};\n\n/**\n * CompletionsRunDataSource\n *\n * A CompletionsRunDataSource object describing a model sampling configuration.\n *\n */\nexport type CreateEvalCompletionsRunDataSource = {\n    /**\n     * The type of run data source. Always `completions`.\n     */\n    type: 'completions';\n    /**\n     * Used when sampling from a model. Dictates the structure of the messages passed into the model. Can either be a reference to a prebuilt trajectory (ie, `item.input_trajectory`), or a template with variable references to the `item` namespace.\n     */\n    input_messages?: {\n        /**\n         * The type of input messages. Always `template`.\n         */\n        type: 'template';\n        /**\n         * A list of chat messages forming the prompt or context. May include variable references to the `item` namespace, ie {{item.name}}.\n         */\n        template: Array<({\n            type?: 'EasyInputMessage';\n        } & EasyInputMessage) | ({\n            type?: 'EvalItem';\n        } & EvalItem)>;\n    } | {\n        /**\n         * The type of input messages. Always `item_reference`.\n         */\n        type: 'item_reference';\n        /**\n         * A reference to a variable in the `item` namespace. Ie, \"item.input_trajectory\"\n         */\n        item_reference: string;\n    };\n    sampling_params?: {\n        /**\n         * A higher temperature increases randomness in the outputs.\n         */\n        temperature?: number;\n        /**\n         * The maximum number of tokens in the generated output.\n         */\n        max_completion_tokens?: number;\n        /**\n         * An alternative to temperature for nucleus sampling; 1.0 includes all tokens.\n         */\n        top_p?: number;\n        /**\n         * A seed value to initialize the randomness, during sampling.\n         */\n        seed?: number;\n        /**\n         * An object specifying the format that the model must output.\n         *\n         * Setting to `{ \"type\": \"json_schema\", \"json_schema\": {...} }` enables\n         * Structured Outputs which ensures the model will match your supplied JSON\n         * schema. Learn more in the [Structured Outputs\n         * guide](https://platform.openai.com/docs/guides/structured-outputs).\n         *\n         * Setting to `{ \"type\": \"json_object\" }` enables the older JSON mode, which\n         * ensures the message the model generates is valid JSON. Using `json_schema`\n         * is preferred for models that support it.\n         *\n         */\n        response_format?: ResponseFormatText | ResponseFormatJsonSchema | ResponseFormatJsonObject;\n        /**\n         * A list of tools the model may call. Currently, only functions are supported as a tool. Use this to provide a list of functions the model may generate JSON inputs for. A max of 128 functions are supported.\n         *\n         */\n        tools?: Array<ChatCompletionTool>;\n    };\n    /**\n     * The name of the model to use for generating completions (e.g. \"o3-mini\").\n     */\n    model?: string;\n    /**\n     * Determines what populates the `item` namespace in this run's data source.\n     */\n    source: ({\n        type?: 'EvalJsonlFileContentSource';\n    } & EvalJsonlFileContentSource) | ({\n        type?: 'EvalJsonlFileIdSource';\n    } & EvalJsonlFileIdSource) | ({\n        type?: 'EvalStoredCompletionsSource';\n    } & EvalStoredCompletionsSource);\n};\n\n/**\n * CustomDataSourceConfig\n *\n * A CustomDataSourceConfig object that defines the schema for the data source used for the evaluation runs.\n * This schema is used to define the shape of the data that will be:\n * - Used to define your testing criteria and\n * - What data is required when creating a run\n *\n */\nexport type CreateEvalCustomDataSourceConfig = {\n    /**\n     * The type of data source. Always `custom`.\n     */\n    type: 'custom';\n    /**\n     * The json schema for each row in the data source.\n     */\n    item_schema: {\n        [key: string]: unknown;\n    };\n    /**\n     * Whether the eval should expect you to populate the sample namespace (ie, by generating responses off of your data source)\n     */\n    include_sample_schema?: boolean;\n};\n\n/**\n * CreateEvalItem\n *\n * A chat message that makes up the prompt or context. May include variable references to the `item` namespace, ie {{item.name}}.\n */\nexport type CreateEvalItem = {\n    /**\n     * The role of the message (e.g. \"system\", \"assistant\", \"user\").\n     */\n    role: string;\n    /**\n     * The content of the message.\n     */\n    content: string;\n} | EvalItem;\n\n/**\n * JsonlRunDataSource\n *\n * A JsonlRunDataSource object with that specifies a JSONL file that matches the eval\n *\n */\nexport type CreateEvalJsonlRunDataSource = {\n    /**\n     * The type of data source. Always `jsonl`.\n     */\n    type: 'jsonl';\n    /**\n     * Determines what populates the `item` namespace in the data source.\n     */\n    source: ({\n        type?: 'EvalJsonlFileContentSource';\n    } & EvalJsonlFileContentSource) | ({\n        type?: 'EvalJsonlFileIdSource';\n    } & EvalJsonlFileIdSource);\n};\n\n/**\n * LabelModelGrader\n *\n * A LabelModelGrader object which uses a model to assign labels to each item\n * in the evaluation.\n *\n */\nexport type CreateEvalLabelModelGrader = {\n    /**\n     * The object type, which is always `label_model`.\n     */\n    type: 'label_model';\n    /**\n     * The name of the grader.\n     */\n    name: string;\n    /**\n     * The model to use for the evaluation. Must support structured outputs.\n     */\n    model: string;\n    /**\n     * A list of chat messages forming the prompt or context. May include variable references to the `item` namespace, ie {{item.name}}.\n     */\n    input: Array<CreateEvalItem>;\n    /**\n     * The labels to classify to each item in the evaluation.\n     */\n    labels: Array<string>;\n    /**\n     * The labels that indicate a passing result. Must be a subset of labels.\n     */\n    passing_labels: Array<string>;\n};\n\n/**\n * LogsDataSourceConfig\n *\n * A data source config which specifies the metadata property of your logs query.\n * This is usually metadata like `usecase=chatbot` or `prompt-version=v2`, etc.\n *\n */\nexport type CreateEvalLogsDataSourceConfig = {\n    /**\n     * The type of data source. Always `logs`.\n     */\n    type: 'logs';\n    /**\n     * Metadata filters for the logs data source.\n     */\n    metadata?: {\n        [key: string]: unknown;\n    };\n};\n\n/**\n * CreateEvalRequest\n */\nexport type CreateEvalRequest = {\n    /**\n     * The name of the evaluation.\n     */\n    name?: string;\n    metadata?: Metadata;\n    /**\n     * The configuration for the data source used for the evaluation runs. Dictates the schema of the data used in the evaluation.\n     */\n    data_source_config: ({\n        type?: 'CreateEvalCustomDataSourceConfig';\n    } & CreateEvalCustomDataSourceConfig) | ({\n        type?: 'CreateEvalLogsDataSourceConfig';\n    } & CreateEvalLogsDataSourceConfig) | ({\n        type?: 'CreateEvalStoredCompletionsDataSourceConfig';\n    } & CreateEvalStoredCompletionsDataSourceConfig);\n    /**\n     * A list of graders for all eval runs in this group. Graders can reference variables in the data source using double curly braces notation, like `{{item.variable_name}}`. To reference the model's output, use the `sample` namespace (ie, `{{sample.output_text}}`).\n     */\n    testing_criteria: Array<({\n        type?: 'CreateEvalLabelModelGrader';\n    } & CreateEvalLabelModelGrader) | ({\n        type?: 'EvalGraderStringCheck';\n    } & EvalGraderStringCheck) | ({\n        type?: 'EvalGraderTextSimilarity';\n    } & EvalGraderTextSimilarity) | ({\n        type?: 'EvalGraderPython';\n    } & EvalGraderPython) | ({\n        type?: 'EvalGraderScoreModel';\n    } & EvalGraderScoreModel)>;\n};\n\n/**\n * ResponsesRunDataSource\n *\n * A ResponsesRunDataSource object describing a model sampling configuration.\n *\n */\nexport type CreateEvalResponsesRunDataSource = {\n    /**\n     * The type of run data source. Always `responses`.\n     */\n    type: 'responses';\n    /**\n     * Used when sampling from a model. Dictates the structure of the messages passed into the model. Can either be a reference to a prebuilt trajectory (ie, `item.input_trajectory`), or a template with variable references to the `item` namespace.\n     */\n    input_messages?: {\n        /**\n         * The type of input messages. Always `template`.\n         */\n        type: 'template';\n        /**\n         * A list of chat messages forming the prompt or context. May include variable references to the `item` namespace, ie {{item.name}}.\n         */\n        template: Array<{\n            /**\n             * The role of the message (e.g. \"system\", \"assistant\", \"user\").\n             */\n            role: string;\n            /**\n             * The content of the message.\n             */\n            content: string;\n        } | EvalItem>;\n    } | {\n        /**\n         * The type of input messages. Always `item_reference`.\n         */\n        type: 'item_reference';\n        /**\n         * A reference to a variable in the `item` namespace. Ie, \"item.name\"\n         */\n        item_reference: string;\n    };\n    sampling_params?: {\n        /**\n         * A higher temperature increases randomness in the outputs.\n         */\n        temperature?: number;\n        /**\n         * The maximum number of tokens in the generated output.\n         */\n        max_completion_tokens?: number;\n        /**\n         * An alternative to temperature for nucleus sampling; 1.0 includes all tokens.\n         */\n        top_p?: number;\n        /**\n         * A seed value to initialize the randomness, during sampling.\n         */\n        seed?: number;\n        /**\n         * An array of tools the model may call while generating a response. You\n         * can specify which tool to use by setting the `tool_choice` parameter.\n         *\n         * The two categories of tools you can provide the model are:\n         *\n         * - **Built-in tools**: Tools that are provided by OpenAI that extend the\n         * model's capabilities, like [web search](https://platform.openai.com/docs/guides/tools-web-search)\n         * or [file search](https://platform.openai.com/docs/guides/tools-file-search). Learn more about\n         * [built-in tools](https://platform.openai.com/docs/guides/tools).\n         * - **Function calls (custom tools)**: Functions that are defined by you,\n         * enabling the model to call your own code. Learn more about\n         * [function calling](https://platform.openai.com/docs/guides/function-calling).\n         *\n         */\n        tools?: Array<Tool>;\n        /**\n         * Configuration options for a text response from the model. Can be plain\n         * text or structured JSON data. Learn more:\n         * - [Text inputs and outputs](https://platform.openai.com/docs/guides/text)\n         * - [Structured Outputs](https://platform.openai.com/docs/guides/structured-outputs)\n         *\n         */\n        text?: {\n            format?: TextResponseFormatConfiguration;\n        };\n    };\n    /**\n     * The name of the model to use for generating completions (e.g. \"o3-mini\").\n     */\n    model?: string;\n    /**\n     * Determines what populates the `item` namespace in this run's data source.\n     */\n    source: ({\n        type?: 'EvalJsonlFileContentSource';\n    } & EvalJsonlFileContentSource) | ({\n        type?: 'EvalJsonlFileIdSource';\n    } & EvalJsonlFileIdSource) | ({\n        type?: 'EvalResponsesSource';\n    } & EvalResponsesSource);\n};\n\n/**\n * CreateEvalRunRequest\n */\nexport type CreateEvalRunRequest = {\n    /**\n     * The name of the run.\n     */\n    name?: string;\n    metadata?: Metadata;\n    /**\n     * Details about the run's data source.\n     */\n    data_source: CreateEvalJsonlRunDataSource | CreateEvalCompletionsRunDataSource | CreateEvalResponsesRunDataSource;\n};\n\n/**\n * StoredCompletionsDataSourceConfig\n *\n * Deprecated in favor of LogsDataSourceConfig.\n *\n *\n * @deprecated\n */\nexport type CreateEvalStoredCompletionsDataSourceConfig = {\n    /**\n     * The type of data source. Always `stored_completions`.\n     */\n    type: 'stored_completions';\n    /**\n     * Metadata filters for the stored completions data source.\n     */\n    metadata?: {\n        [key: string]: unknown;\n    };\n};\n\nexport type CreateFileRequest = {\n    /**\n     * The File object (not file name) to be uploaded.\n     *\n     */\n    file: Blob | File;\n    purpose: FilePurpose;\n    expires_after?: FileExpirationAfter;\n};\n\nexport type CreateFineTuningCheckpointPermissionRequest = {\n    /**\n     * The project identifiers to grant access to.\n     */\n    project_ids: Array<string>;\n};\n\nexport type CreateFineTuningJobRequest = {\n    /**\n     * The name of the model to fine-tune. You can select one of the\n     * [supported models](https://platform.openai.com/docs/guides/fine-tuning#which-models-can-be-fine-tuned).\n     *\n     */\n    model: string | 'babbage-002' | 'davinci-002' | 'gpt-3.5-turbo' | 'gpt-4o-mini';\n    /**\n     * The ID of an uploaded file that contains training data.\n     *\n     * See [upload file](https://platform.openai.com/docs/api-reference/files/create) for how to upload a file.\n     *\n     * Your dataset must be formatted as a JSONL file. Additionally, you must upload your file with the purpose `fine-tune`.\n     *\n     * The contents of the file should differ depending on if the model uses the [chat](https://platform.openai.com/docs/api-reference/fine-tuning/chat-input), [completions](https://platform.openai.com/docs/api-reference/fine-tuning/completions-input) format, or if the fine-tuning method uses the [preference](https://platform.openai.com/docs/api-reference/fine-tuning/preference-input) format.\n     *\n     * See the [fine-tuning guide](https://platform.openai.com/docs/guides/model-optimization) for more details.\n     *\n     */\n    training_file: string;\n    /**\n     * The hyperparameters used for the fine-tuning job.\n     * This value is now deprecated in favor of `method`, and should be passed in under the `method` parameter.\n     *\n     *\n     * @deprecated\n     */\n    hyperparameters?: {\n        /**\n         * Number of examples in each batch. A larger batch size means that model parameters\n         * are updated less frequently, but with lower variance.\n         *\n         */\n        batch_size?: 'auto' | number;\n        /**\n         * Scaling factor for the learning rate. A smaller learning rate may be useful to avoid\n         * overfitting.\n         *\n         */\n        learning_rate_multiplier?: 'auto' | number;\n        /**\n         * The number of epochs to train the model for. An epoch refers to one full cycle\n         * through the training dataset.\n         *\n         */\n        n_epochs?: 'auto' | number;\n    };\n    /**\n     * A string of up to 64 characters that will be added to your fine-tuned model name.\n     *\n     * For example, a `suffix` of \"custom-model-name\" would produce a model name like `ft:gpt-4o-mini:openai:custom-model-name:7p4lURel`.\n     *\n     */\n    suffix?: string;\n    /**\n     * The ID of an uploaded file that contains validation data.\n     *\n     * If you provide this file, the data is used to generate validation\n     * metrics periodically during fine-tuning. These metrics can be viewed in\n     * the fine-tuning results file.\n     * The same data should not be present in both train and validation files.\n     *\n     * Your dataset must be formatted as a JSONL file. You must upload your file with the purpose `fine-tune`.\n     *\n     * See the [fine-tuning guide](https://platform.openai.com/docs/guides/model-optimization) for more details.\n     *\n     */\n    validation_file?: string;\n    /**\n     * A list of integrations to enable for your fine-tuning job.\n     */\n    integrations?: Array<{\n        /**\n         * The type of integration to enable. Currently, only \"wandb\" (Weights and Biases) is supported.\n         *\n         */\n        type: 'wandb';\n        /**\n         * The settings for your integration with Weights and Biases. This payload specifies the project that\n         * metrics will be sent to. Optionally, you can set an explicit display name for your run, add tags\n         * to your run, and set a default entity (team, username, etc) to be associated with your run.\n         *\n         */\n        wandb: {\n            /**\n             * The name of the project that the new run will be created under.\n             *\n             */\n            project: string;\n            /**\n             * A display name to set for the run. If not set, we will use the Job ID as the name.\n             *\n             */\n            name?: string;\n            /**\n             * The entity to use for the run. This allows you to set the team or username of the WandB user that you would\n             * like associated with the run. If not set, the default entity for the registered WandB API key is used.\n             *\n             */\n            entity?: string;\n            /**\n             * A list of tags to be attached to the newly created run. These tags are passed through directly to WandB. Some\n             * default tags are generated by OpenAI: \"openai/finetune\", \"openai/{base-model}\", \"openai/{ftjob-abcdef}\".\n             *\n             */\n            tags?: Array<string>;\n        };\n    }>;\n    /**\n     * The seed controls the reproducibility of the job. Passing in the same seed and job parameters should produce the same results, but may differ in rare cases.\n     * If a seed is not specified, one will be generated for you.\n     *\n     */\n    seed?: number;\n    method?: FineTuneMethod;\n    metadata?: Metadata;\n};\n\nexport type CreateImageEditRequest = {\n    /**\n     * The image(s) to edit. Must be a supported image file or an array of images.\n     *\n     * For `gpt-image-1`, each image should be a `png`, `webp`, or `jpg` file less\n     * than 50MB. You can provide up to 16 images.\n     *\n     * For `dall-e-2`, you can only provide one image, and it should be a square\n     * `png` file less than 4MB.\n     *\n     */\n    image: Blob | File | Array<Blob | File>;\n    /**\n     * A text description of the desired image(s). The maximum length is 1000 characters for `dall-e-2`, and 32000 characters for `gpt-image-1`.\n     */\n    prompt: string;\n    /**\n     * An additional image whose fully transparent areas (e.g. where alpha is zero) indicate where `image` should be edited. If there are multiple images provided, the mask will be applied on the first image. Must be a valid PNG file, less than 4MB, and have the same dimensions as `image`.\n     */\n    mask?: Blob | File;\n    /**\n     * Allows to set transparency for the background of the generated image(s).\n     * This parameter is only supported for `gpt-image-1`. Must be one of\n     * `transparent`, `opaque` or `auto` (default value). When `auto` is used, the\n     * model will automatically determine the best background for the image.\n     *\n     * If `transparent`, the output format needs to support transparency, so it\n     * should be set to either `png` (default value) or `webp`.\n     *\n     */\n    background?: 'transparent' | 'opaque' | 'auto';\n    /**\n     * The model to use for image generation. Only `dall-e-2` and `gpt-image-1` are supported. Defaults to `dall-e-2` unless a parameter specific to `gpt-image-1` is used.\n     */\n    model?: string | 'dall-e-2' | 'gpt-image-1';\n    /**\n     * The number of images to generate. Must be between 1 and 10.\n     */\n    n?: number;\n    /**\n     * The size of the generated images. Must be one of `1024x1024`, `1536x1024` (landscape), `1024x1536` (portrait), or `auto` (default value) for `gpt-image-1`, and one of `256x256`, `512x512`, or `1024x1024` for `dall-e-2`.\n     */\n    size?: '256x256' | '512x512' | '1024x1024' | '1536x1024' | '1024x1536' | 'auto';\n    /**\n     * The format in which the generated images are returned. Must be one of `url` or `b64_json`. URLs are only valid for 60 minutes after the image has been generated. This parameter is only supported for `dall-e-2`, as `gpt-image-1` will always return base64-encoded images.\n     */\n    response_format?: 'url' | 'b64_json';\n    /**\n     * The format in which the generated images are returned. This parameter is\n     * only supported for `gpt-image-1`. Must be one of `png`, `jpeg`, or `webp`.\n     * The default value is `png`.\n     *\n     */\n    output_format?: 'png' | 'jpeg' | 'webp';\n    /**\n     * The compression level (0-100%) for the generated images. This parameter\n     * is only supported for `gpt-image-1` with the `webp` or `jpeg` output\n     * formats, and defaults to 100.\n     *\n     */\n    output_compression?: number;\n    /**\n     * A unique identifier representing your end-user, which can help OpenAI to monitor and detect abuse. [Learn more](https://platform.openai.com/docs/guides/safety-best-practices#end-user-ids).\n     *\n     */\n    user?: string;\n    input_fidelity?: ImageInputFidelity;\n    /**\n     * Edit the image in streaming mode. Defaults to `false`. See the\n     * [Image generation guide](https://platform.openai.com/docs/guides/image-generation) for more information.\n     *\n     */\n    stream?: boolean;\n    partial_images?: PartialImages;\n    /**\n     * The quality of the image that will be generated. `high`, `medium` and `low` are only supported for `gpt-image-1`. `dall-e-2` only supports `standard` quality. Defaults to `auto`.\n     *\n     */\n    quality?: 'standard' | 'low' | 'medium' | 'high' | 'auto';\n};\n\nexport type CreateImageRequest = {\n    /**\n     * A text description of the desired image(s). The maximum length is 32000 characters for `gpt-image-1`, 1000 characters for `dall-e-2` and 4000 characters for `dall-e-3`.\n     */\n    prompt: string;\n    /**\n     * The model to use for image generation. One of `dall-e-2`, `dall-e-3`, or `gpt-image-1`. Defaults to `dall-e-2` unless a parameter specific to `gpt-image-1` is used.\n     */\n    model?: string | 'dall-e-2' | 'dall-e-3' | 'gpt-image-1';\n    /**\n     * The number of images to generate. Must be between 1 and 10. For `dall-e-3`, only `n=1` is supported.\n     */\n    n?: number;\n    /**\n     * The quality of the image that will be generated.\n     *\n     * - `auto` (default value) will automatically select the best quality for the given model.\n     * - `high`, `medium` and `low` are supported for `gpt-image-1`.\n     * - `hd` and `standard` are supported for `dall-e-3`.\n     * - `standard` is the only option for `dall-e-2`.\n     *\n     */\n    quality?: 'standard' | 'hd' | 'low' | 'medium' | 'high' | 'auto';\n    /**\n     * The format in which generated images with `dall-e-2` and `dall-e-3` are returned. Must be one of `url` or `b64_json`. URLs are only valid for 60 minutes after the image has been generated. This parameter isn't supported for `gpt-image-1` which will always return base64-encoded images.\n     */\n    response_format?: 'url' | 'b64_json';\n    /**\n     * The format in which the generated images are returned. This parameter is only supported for `gpt-image-1`. Must be one of `png`, `jpeg`, or `webp`.\n     */\n    output_format?: 'png' | 'jpeg' | 'webp';\n    /**\n     * The compression level (0-100%) for the generated images. This parameter is only supported for `gpt-image-1` with the `webp` or `jpeg` output formats, and defaults to 100.\n     */\n    output_compression?: number;\n    /**\n     * Generate the image in streaming mode. Defaults to `false`. See the\n     * [Image generation guide](https://platform.openai.com/docs/guides/image-generation) for more information.\n     * This parameter is only supported for `gpt-image-1`.\n     *\n     */\n    stream?: boolean;\n    partial_images?: PartialImages;\n    /**\n     * The size of the generated images. Must be one of `1024x1024`, `1536x1024` (landscape), `1024x1536` (portrait), or `auto` (default value) for `gpt-image-1`, one of `256x256`, `512x512`, or `1024x1024` for `dall-e-2`, and one of `1024x1024`, `1792x1024`, or `1024x1792` for `dall-e-3`.\n     */\n    size?: 'auto' | '1024x1024' | '1536x1024' | '1024x1536' | '256x256' | '512x512' | '1792x1024' | '1024x1792';\n    /**\n     * Control the content-moderation level for images generated by `gpt-image-1`. Must be either `low` for less restrictive filtering or `auto` (default value).\n     */\n    moderation?: 'low' | 'auto';\n    /**\n     * Allows to set transparency for the background of the generated image(s).\n     * This parameter is only supported for `gpt-image-1`. Must be one of\n     * `transparent`, `opaque` or `auto` (default value). When `auto` is used, the\n     * model will automatically determine the best background for the image.\n     *\n     * If `transparent`, the output format needs to support transparency, so it\n     * should be set to either `png` (default value) or `webp`.\n     *\n     */\n    background?: 'transparent' | 'opaque' | 'auto';\n    /**\n     * The style of the generated images. This parameter is only supported for `dall-e-3`. Must be one of `vivid` or `natural`. Vivid causes the model to lean towards generating hyper-real and dramatic images. Natural causes the model to produce more natural, less hyper-real looking images.\n     */\n    style?: 'vivid' | 'natural';\n    /**\n     * A unique identifier representing your end-user, which can help OpenAI to monitor and detect abuse. [Learn more](https://platform.openai.com/docs/guides/safety-best-practices#end-user-ids).\n     *\n     */\n    user?: string;\n};\n\nexport type CreateImageVariationRequest = {\n    /**\n     * The image to use as the basis for the variation(s). Must be a valid PNG file, less than 4MB, and square.\n     */\n    image: Blob | File;\n    /**\n     * The model to use for image generation. Only `dall-e-2` is supported at this time.\n     */\n    model?: string | 'dall-e-2';\n    /**\n     * The number of images to generate. Must be between 1 and 10.\n     */\n    n?: number;\n    /**\n     * The format in which the generated images are returned. Must be one of `url` or `b64_json`. URLs are only valid for 60 minutes after the image has been generated.\n     */\n    response_format?: 'url' | 'b64_json';\n    /**\n     * The size of the generated images. Must be one of `256x256`, `512x512`, or `1024x1024`.\n     */\n    size?: '256x256' | '512x512' | '1024x1024';\n    /**\n     * A unique identifier representing your end-user, which can help OpenAI to monitor and detect abuse. [Learn more](https://platform.openai.com/docs/guides/safety-best-practices#end-user-ids).\n     *\n     */\n    user?: string;\n};\n\nexport type CreateMessageRequest = {\n    /**\n     * The role of the entity that is creating the message. Allowed values include:\n     * - `user`: Indicates the message is sent by an actual user and should be used in most cases to represent user-generated messages.\n     * - `assistant`: Indicates the message is generated by the assistant. Use this value to insert messages from the assistant into the conversation.\n     *\n     */\n    role: 'user' | 'assistant';\n    content: string | Array<({\n        type?: 'MessageContentImageFileObject';\n    } & MessageContentImageFileObject) | ({\n        type?: 'MessageContentImageUrlObject';\n    } & MessageContentImageUrlObject) | ({\n        type?: 'MessageRequestContentTextObject';\n    } & MessageRequestContentTextObject)>;\n    /**\n     * A list of files attached to the message, and the tools they should be added to.\n     */\n    attachments?: Array<{\n        /**\n         * The ID of the file to attach to the message.\n         */\n        file_id?: string;\n        /**\n         * The tools to add this file to.\n         */\n        tools?: Array<({\n            type?: 'AssistantToolsCode';\n        } & AssistantToolsCode) | ({\n            type?: 'AssistantToolsFileSearchTypeOnly';\n        } & AssistantToolsFileSearchTypeOnly)>;\n    }>;\n    metadata?: Metadata;\n};\n\nexport type CreateModelResponseProperties = ModelResponseProperties & {\n    /**\n     * An integer between 0 and 20 specifying the number of most likely tokens to\n     * return at each token position, each with an associated log probability.\n     *\n     */\n    top_logprobs?: number;\n};\n\nexport type CreateModerationRequest = {\n    /**\n     * Input (or inputs) to classify. Can be a single string, an array of strings, or\n     * an array of multi-modal input objects similar to other models.\n     *\n     */\n    input: string | Array<string> | Array<({\n        type?: 'ModerationImageURLInput';\n    } & ModerationImageUrlInput) | ({\n        type?: 'ModerationTextInput';\n    } & ModerationTextInput)>;\n    /**\n     * The content moderation model you would like to use. Learn more in\n     * [the moderation guide](https://platform.openai.com/docs/guides/moderation), and learn about\n     * available models [here](https://platform.openai.com/docs/models#moderation).\n     *\n     */\n    model?: string | 'omni-moderation-latest' | 'omni-moderation-2024-09-26' | 'text-moderation-latest' | 'text-moderation-stable';\n};\n\n/**\n * Represents if a given text input is potentially harmful.\n */\nexport type CreateModerationResponse = {\n    /**\n     * The unique identifier for the moderation request.\n     */\n    id: string;\n    /**\n     * The model used to generate the moderation results.\n     */\n    model: string;\n    /**\n     * A list of moderation objects.\n     */\n    results: Array<{\n        /**\n         * Whether any of the below categories are flagged.\n         */\n        flagged: boolean;\n        /**\n         * A list of the categories, and whether they are flagged or not.\n         */\n        categories: {\n            /**\n             * Content that expresses, incites, or promotes hate based on race, gender, ethnicity, religion, nationality, sexual orientation, disability status, or caste. Hateful content aimed at non-protected groups (e.g., chess players) is harassment.\n             */\n            hate: boolean;\n            /**\n             * Hateful content that also includes violence or serious harm towards the targeted group based on race, gender, ethnicity, religion, nationality, sexual orientation, disability status, or caste.\n             */\n            'hate/threatening': boolean;\n            /**\n             * Content that expresses, incites, or promotes harassing language towards any target.\n             */\n            harassment: boolean;\n            /**\n             * Harassment content that also includes violence or serious harm towards any target.\n             */\n            'harassment/threatening': boolean;\n            /**\n             * Content that includes instructions or advice that facilitate the planning or execution of wrongdoing, or that gives advice or instruction on how to commit illicit acts. For example, \"how to shoplift\" would fit this category.\n             */\n            illicit: boolean;\n            /**\n             * Content that includes instructions or advice that facilitate the planning or execution of wrongdoing that also includes violence, or that gives advice or instruction on the procurement of any weapon.\n             */\n            'illicit/violent': boolean;\n            /**\n             * Content that promotes, encourages, or depicts acts of self-harm, such as suicide, cutting, and eating disorders.\n             */\n            'self-harm': boolean;\n            /**\n             * Content where the speaker expresses that they are engaging or intend to engage in acts of self-harm, such as suicide, cutting, and eating disorders.\n             */\n            'self-harm/intent': boolean;\n            /**\n             * Content that encourages performing acts of self-harm, such as suicide, cutting, and eating disorders, or that gives instructions or advice on how to commit such acts.\n             */\n            'self-harm/instructions': boolean;\n            /**\n             * Content meant to arouse sexual excitement, such as the description of sexual activity, or that promotes sexual services (excluding sex education and wellness).\n             */\n            sexual: boolean;\n            /**\n             * Sexual content that includes an individual who is under 18 years old.\n             */\n            'sexual/minors': boolean;\n            /**\n             * Content that depicts death, violence, or physical injury.\n             */\n            violence: boolean;\n            /**\n             * Content that depicts death, violence, or physical injury in graphic detail.\n             */\n            'violence/graphic': boolean;\n        };\n        /**\n         * A list of the categories along with their scores as predicted by model.\n         */\n        category_scores: {\n            /**\n             * The score for the category 'hate'.\n             */\n            hate: number;\n            /**\n             * The score for the category 'hate/threatening'.\n             */\n            'hate/threatening': number;\n            /**\n             * The score for the category 'harassment'.\n             */\n            harassment: number;\n            /**\n             * The score for the category 'harassment/threatening'.\n             */\n            'harassment/threatening': number;\n            /**\n             * The score for the category 'illicit'.\n             */\n            illicit: number;\n            /**\n             * The score for the category 'illicit/violent'.\n             */\n            'illicit/violent': number;\n            /**\n             * The score for the category 'self-harm'.\n             */\n            'self-harm': number;\n            /**\n             * The score for the category 'self-harm/intent'.\n             */\n            'self-harm/intent': number;\n            /**\n             * The score for the category 'self-harm/instructions'.\n             */\n            'self-harm/instructions': number;\n            /**\n             * The score for the category 'sexual'.\n             */\n            sexual: number;\n            /**\n             * The score for the category 'sexual/minors'.\n             */\n            'sexual/minors': number;\n            /**\n             * The score for the category 'violence'.\n             */\n            violence: number;\n            /**\n             * The score for the category 'violence/graphic'.\n             */\n            'violence/graphic': number;\n        };\n        /**\n         * A list of the categories along with the input type(s) that the score applies to.\n         */\n        category_applied_input_types: {\n            /**\n             * The applied input type(s) for the category 'hate'.\n             */\n            hate: Array<'text'>;\n            /**\n             * The applied input type(s) for the category 'hate/threatening'.\n             */\n            'hate/threatening': Array<'text'>;\n            /**\n             * The applied input type(s) for the category 'harassment'.\n             */\n            harassment: Array<'text'>;\n            /**\n             * The applied input type(s) for the category 'harassment/threatening'.\n             */\n            'harassment/threatening': Array<'text'>;\n            /**\n             * The applied input type(s) for the category 'illicit'.\n             */\n            illicit: Array<'text'>;\n            /**\n             * The applied input type(s) for the category 'illicit/violent'.\n             */\n            'illicit/violent': Array<'text'>;\n            /**\n             * The applied input type(s) for the category 'self-harm'.\n             */\n            'self-harm': Array<'text' | 'image'>;\n            /**\n             * The applied input type(s) for the category 'self-harm/intent'.\n             */\n            'self-harm/intent': Array<'text' | 'image'>;\n            /**\n             * The applied input type(s) for the category 'self-harm/instructions'.\n             */\n            'self-harm/instructions': Array<'text' | 'image'>;\n            /**\n             * The applied input type(s) for the category 'sexual'.\n             */\n            sexual: Array<'text' | 'image'>;\n            /**\n             * The applied input type(s) for the category 'sexual/minors'.\n             */\n            'sexual/minors': Array<'text'>;\n            /**\n             * The applied input type(s) for the category 'violence'.\n             */\n            violence: Array<'text' | 'image'>;\n            /**\n             * The applied input type(s) for the category 'violence/graphic'.\n             */\n            'violence/graphic': Array<'text' | 'image'>;\n        };\n    }>;\n};\n\nexport type CreateResponse = CreateModelResponseProperties & ResponseProperties & {\n    /**\n     * Text, image, or file inputs to the model, used to generate a response.\n     *\n     * Learn more:\n     * - [Text inputs and outputs](https://platform.openai.com/docs/guides/text)\n     * - [Image inputs](https://platform.openai.com/docs/guides/images)\n     * - [File inputs](https://platform.openai.com/docs/guides/pdf-files)\n     * - [Conversation state](https://platform.openai.com/docs/guides/conversation-state)\n     * - [Function calling](https://platform.openai.com/docs/guides/function-calling)\n     *\n     */\n    input?: string | Array<InputItem>;\n    /**\n     * Specify additional output data to include in the model response. Currently\n     * supported values are:\n     * - `code_interpreter_call.outputs`: Includes the outputs of python code execution\n     * in code interpreter tool call items.\n     * - `computer_call_output.output.image_url`: Include image urls from the computer call output.\n     * - `file_search_call.results`: Include the search results of\n     * the file search tool call.\n     * - `message.input_image.image_url`: Include image urls from the input message.\n     * - `message.output_text.logprobs`: Include logprobs with assistant messages.\n     * - `reasoning.encrypted_content`: Includes an encrypted version of reasoning\n     * tokens in reasoning item outputs. This enables reasoning items to be used in\n     * multi-turn conversations when using the Responses API statelessly (like\n     * when the `store` parameter is set to `false`, or when an organization is\n     * enrolled in the zero data retention program).\n     *\n     */\n    include?: Array<Includable>;\n    /**\n     * Whether to allow the model to run tool calls in parallel.\n     *\n     */\n    parallel_tool_calls?: boolean;\n    /**\n     * Whether to store the generated model response for later retrieval via\n     * API.\n     *\n     */\n    store?: boolean;\n    /**\n     * A system (or developer) message inserted into the model's context.\n     *\n     * When using along with `previous_response_id`, the instructions from a previous\n     * response will not be carried over to the next response. This makes it simple\n     * to swap out system (or developer) messages in new responses.\n     *\n     */\n    instructions?: string;\n    /**\n     * If set to true, the model response data will be streamed to the client\n     * as it is generated using [server-sent events](https://developer.mozilla.org/en-US/docs/Web/API/Server-sent_events/Using_server-sent_events#Event_stream_format).\n     * See the [Streaming section below](https://platform.openai.com/docs/api-reference/responses-streaming)\n     * for more information.\n     *\n     */\n    stream?: boolean;\n    stream_options?: ResponseStreamOptions;\n};\n\nexport type CreateRunRequest = {\n    /**\n     * The ID of the [assistant](https://platform.openai.com/docs/api-reference/assistants) to use to execute this run.\n     */\n    assistant_id: string;\n    /**\n     * The ID of the [Model](https://platform.openai.com/docs/api-reference/models) to be used to execute this run. If a value is provided here, it will override the model associated with the assistant. If not, the model associated with the assistant will be used.\n     */\n    model?: string | AssistantSupportedModels;\n    reasoning_effort?: ReasoningEffort;\n    /**\n     * Overrides the [instructions](https://platform.openai.com/docs/api-reference/assistants/createAssistant) of the assistant. This is useful for modifying the behavior on a per-run basis.\n     */\n    instructions?: string;\n    /**\n     * Appends additional instructions at the end of the instructions for the run. This is useful for modifying the behavior on a per-run basis without overriding other instructions.\n     */\n    additional_instructions?: string;\n    /**\n     * Adds additional messages to the thread before creating the run.\n     */\n    additional_messages?: Array<CreateMessageRequest>;\n    /**\n     * Override the tools the assistant can use for this run. This is useful for modifying the behavior on a per-run basis.\n     */\n    tools?: Array<AssistantTool>;\n    metadata?: Metadata;\n    /**\n     * What sampling temperature to use, between 0 and 2. Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic.\n     *\n     */\n    temperature?: number;\n    /**\n     * An alternative to sampling with temperature, called nucleus sampling, where the model considers the results of the tokens with top_p probability mass. So 0.1 means only the tokens comprising the top 10% probability mass are considered.\n     *\n     * We generally recommend altering this or temperature but not both.\n     *\n     */\n    top_p?: number;\n    /**\n     * If `true`, returns a stream of events that happen during the Run as server-sent events, terminating when the Run enters a terminal state with a `data: [DONE]` message.\n     *\n     */\n    stream?: boolean;\n    /**\n     * The maximum number of prompt tokens that may be used over the course of the run. The run will make a best effort to use only the number of prompt tokens specified, across multiple turns of the run. If the run exceeds the number of prompt tokens specified, the run will end with status `incomplete`. See `incomplete_details` for more info.\n     *\n     */\n    max_prompt_tokens?: number;\n    /**\n     * The maximum number of completion tokens that may be used over the course of the run. The run will make a best effort to use only the number of completion tokens specified, across multiple turns of the run. If the run exceeds the number of completion tokens specified, the run will end with status `incomplete`. See `incomplete_details` for more info.\n     *\n     */\n    max_completion_tokens?: number;\n    truncation_strategy?: TruncationObject & unknown;\n    tool_choice?: AssistantsApiToolChoiceOption & unknown;\n    parallel_tool_calls?: ParallelToolCalls;\n    response_format?: AssistantsApiResponseFormatOption;\n};\n\nexport type CreateSpeechRequest = {\n    /**\n     * One of the available [TTS models](https://platform.openai.com/docs/models#tts): `tts-1`, `tts-1-hd` or `gpt-4o-mini-tts`.\n     *\n     */\n    model: string | 'tts-1' | 'tts-1-hd' | 'gpt-4o-mini-tts';\n    /**\n     * The text to generate audio for. The maximum length is 4096 characters.\n     */\n    input: string;\n    /**\n     * Control the voice of your generated audio with additional instructions. Does not work with `tts-1` or `tts-1-hd`.\n     */\n    instructions?: string;\n    /**\n     * The voice to use when generating the audio. Supported voices are `alloy`, `ash`, `ballad`, `coral`, `echo`, `fable`, `onyx`, `nova`, `sage`, `shimmer`, and `verse`. Previews of the voices are available in the [Text to speech guide](https://platform.openai.com/docs/guides/text-to-speech#voice-options).\n     */\n    voice: VoiceIdsShared;\n    /**\n     * The format to audio in. Supported formats are `mp3`, `opus`, `aac`, `flac`, `wav`, and `pcm`.\n     */\n    response_format?: 'mp3' | 'opus' | 'aac' | 'flac' | 'wav' | 'pcm';\n    /**\n     * The speed of the generated audio. Select a value from `0.25` to `4.0`. `1.0` is the default.\n     */\n    speed?: number;\n    /**\n     * The format to stream the audio in. Supported formats are `sse` and `audio`. `sse` is not supported for `tts-1` or `tts-1-hd`.\n     */\n    stream_format?: 'sse' | 'audio';\n};\n\nexport type CreateSpeechResponseStreamEvent = ({\n    type?: 'SpeechAudioDeltaEvent';\n} & SpeechAudioDeltaEvent) | ({\n    type?: 'SpeechAudioDoneEvent';\n} & SpeechAudioDoneEvent);\n\nexport type CreateThreadAndRunRequest = {\n    /**\n     * The ID of the [assistant](https://platform.openai.com/docs/api-reference/assistants) to use to execute this run.\n     */\n    assistant_id: string;\n    thread?: CreateThreadRequest;\n    /**\n     * The ID of the [Model](https://platform.openai.com/docs/api-reference/models) to be used to execute this run. If a value is provided here, it will override the model associated with the assistant. If not, the model associated with the assistant will be used.\n     */\n    model?: string | 'gpt-5' | 'gpt-5-mini' | 'gpt-5-nano' | 'gpt-5-2025-08-07' | 'gpt-5-mini-2025-08-07' | 'gpt-5-nano-2025-08-07' | 'gpt-4.1' | 'gpt-4.1-mini' | 'gpt-4.1-nano' | 'gpt-4.1-2025-04-14' | 'gpt-4.1-mini-2025-04-14' | 'gpt-4.1-nano-2025-04-14' | 'gpt-4o' | 'gpt-4o-2024-11-20' | 'gpt-4o-2024-08-06' | 'gpt-4o-2024-05-13' | 'gpt-4o-mini' | 'gpt-4o-mini-2024-07-18' | 'gpt-4.5-preview' | 'gpt-4.5-preview-2025-02-27' | 'gpt-4-turbo' | 'gpt-4-turbo-2024-04-09' | 'gpt-4-0125-preview' | 'gpt-4-turbo-preview' | 'gpt-4-1106-preview' | 'gpt-4-vision-preview' | 'gpt-4' | 'gpt-4-0314' | 'gpt-4-0613' | 'gpt-4-32k' | 'gpt-4-32k-0314' | 'gpt-4-32k-0613' | 'gpt-3.5-turbo' | 'gpt-3.5-turbo-16k' | 'gpt-3.5-turbo-0613' | 'gpt-3.5-turbo-1106' | 'gpt-3.5-turbo-0125' | 'gpt-3.5-turbo-16k-0613';\n    /**\n     * Override the default system message of the assistant. This is useful for modifying the behavior on a per-run basis.\n     */\n    instructions?: string;\n    /**\n     * Override the tools the assistant can use for this run. This is useful for modifying the behavior on a per-run basis.\n     */\n    tools?: Array<AssistantTool>;\n    /**\n     * A set of resources that are used by the assistant's tools. The resources are specific to the type of tool. For example, the `code_interpreter` tool requires a list of file IDs, while the `file_search` tool requires a list of vector store IDs.\n     *\n     */\n    tool_resources?: {\n        code_interpreter?: {\n            /**\n             * A list of [file](https://platform.openai.com/docs/api-reference/files) IDs made available to the `code_interpreter` tool. There can be a maximum of 20 files associated with the tool.\n             *\n             */\n            file_ids?: Array<string>;\n        };\n        file_search?: {\n            /**\n             * The ID of the [vector store](https://platform.openai.com/docs/api-reference/vector-stores/object) attached to this assistant. There can be a maximum of 1 vector store attached to the assistant.\n             *\n             */\n            vector_store_ids?: Array<string>;\n        };\n    };\n    metadata?: Metadata;\n    /**\n     * What sampling temperature to use, between 0 and 2. Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic.\n     *\n     */\n    temperature?: number;\n    /**\n     * An alternative to sampling with temperature, called nucleus sampling, where the model considers the results of the tokens with top_p probability mass. So 0.1 means only the tokens comprising the top 10% probability mass are considered.\n     *\n     * We generally recommend altering this or temperature but not both.\n     *\n     */\n    top_p?: number;\n    /**\n     * If `true`, returns a stream of events that happen during the Run as server-sent events, terminating when the Run enters a terminal state with a `data: [DONE]` message.\n     *\n     */\n    stream?: boolean;\n    /**\n     * The maximum number of prompt tokens that may be used over the course of the run. The run will make a best effort to use only the number of prompt tokens specified, across multiple turns of the run. If the run exceeds the number of prompt tokens specified, the run will end with status `incomplete`. See `incomplete_details` for more info.\n     *\n     */\n    max_prompt_tokens?: number;\n    /**\n     * The maximum number of completion tokens that may be used over the course of the run. The run will make a best effort to use only the number of completion tokens specified, across multiple turns of the run. If the run exceeds the number of completion tokens specified, the run will end with status `incomplete`. See `incomplete_details` for more info.\n     *\n     */\n    max_completion_tokens?: number;\n    truncation_strategy?: TruncationObject & unknown;\n    tool_choice?: AssistantsApiToolChoiceOption & unknown;\n    parallel_tool_calls?: ParallelToolCalls;\n    response_format?: AssistantsApiResponseFormatOption;\n};\n\n/**\n * Options to create a new thread. If no thread is provided when running a\n * request, an empty thread will be created.\n *\n */\nexport type CreateThreadRequest = {\n    /**\n     * A list of [messages](https://platform.openai.com/docs/api-reference/messages) to start the thread with.\n     */\n    messages?: Array<CreateMessageRequest>;\n    /**\n     * A set of resources that are made available to the assistant's tools in this thread. The resources are specific to the type of tool. For example, the `code_interpreter` tool requires a list of file IDs, while the `file_search` tool requires a list of vector store IDs.\n     *\n     */\n    tool_resources?: {\n        code_interpreter?: {\n            /**\n             * A list of [file](https://platform.openai.com/docs/api-reference/files) IDs made available to the `code_interpreter` tool. There can be a maximum of 20 files associated with the tool.\n             *\n             */\n            file_ids?: Array<string>;\n        };\n        file_search?: unknown & {\n            /**\n             * The [vector store](https://platform.openai.com/docs/api-reference/vector-stores/object) attached to this thread. There can be a maximum of 1 vector store attached to the thread.\n             *\n             */\n            vector_store_ids?: Array<string>;\n            /**\n             * A helper to create a [vector store](https://platform.openai.com/docs/api-reference/vector-stores/object) with file_ids and attach it to this thread. There can be a maximum of 1 vector store attached to the thread.\n             *\n             */\n            vector_stores?: Array<{\n                /**\n                 * A list of [file](https://platform.openai.com/docs/api-reference/files) IDs to add to the vector store. There can be a maximum of 10000 files in a vector store.\n                 *\n                 */\n                file_ids?: Array<string>;\n                /**\n                 * The chunking strategy used to chunk the file(s). If not set, will use the `auto` strategy.\n                 */\n                chunking_strategy?: {\n                    /**\n                     * Always `auto`.\n                     */\n                    type: 'auto';\n                } | {\n                    /**\n                     * Always `static`.\n                     */\n                    type: 'static';\n                    static: {\n                        /**\n                         * The maximum number of tokens in each chunk. The default value is `800`. The minimum value is `100` and the maximum value is `4096`.\n                         */\n                        max_chunk_size_tokens: number;\n                        /**\n                         * The number of tokens that overlap between chunks. The default value is `400`.\n                         *\n                         * Note that the overlap must not exceed half of `max_chunk_size_tokens`.\n                         *\n                         */\n                        chunk_overlap_tokens: number;\n                    };\n                };\n                metadata?: Metadata;\n            }>;\n        };\n    };\n    metadata?: Metadata;\n};\n\nexport type CreateTranscriptionRequest = {\n    /**\n     * The audio file object (not file name) to transcribe, in one of these formats: flac, mp3, mp4, mpeg, mpga, m4a, ogg, wav, or webm.\n     *\n     */\n    file: Blob | File;\n    /**\n     * ID of the model to use. The options are `gpt-4o-transcribe`, `gpt-4o-mini-transcribe`, and `whisper-1` (which is powered by our open source Whisper V2 model).\n     *\n     */\n    model: string | 'whisper-1' | 'gpt-4o-transcribe' | 'gpt-4o-mini-transcribe';\n    /**\n     * The language of the input audio. Supplying the input language in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) (e.g. `en`) format will improve accuracy and latency.\n     *\n     */\n    language?: string;\n    /**\n     * An optional text to guide the model's style or continue a previous audio segment. The [prompt](https://platform.openai.com/docs/guides/speech-to-text#prompting) should match the audio language.\n     *\n     */\n    prompt?: string;\n    response_format?: AudioResponseFormat;\n    /**\n     * The sampling temperature, between 0 and 1. Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic. If set to 0, the model will use [log probability](https://en.wikipedia.org/wiki/Log_probability) to automatically increase the temperature until certain thresholds are hit.\n     *\n     */\n    temperature?: number;\n    /**\n     * If set to true, the model response data will be streamed to the client\n     * as it is generated using [server-sent events](https://developer.mozilla.org/en-US/docs/Web/API/Server-sent_events/Using_server-sent_events#Event_stream_format).\n     * See the [Streaming section of the Speech-to-Text guide](https://platform.openai.com/docs/guides/speech-to-text?lang=curl#streaming-transcriptions)\n     * for more information.\n     *\n     * Note: Streaming is not supported for the `whisper-1` model and will be ignored.\n     *\n     */\n    stream?: boolean;\n    chunking_strategy?: TranscriptionChunkingStrategy;\n    /**\n     * The timestamp granularities to populate for this transcription. `response_format` must be set `verbose_json` to use timestamp granularities. Either or both of these options are supported: `word`, or `segment`. Note: There is no additional latency for segment timestamps, but generating word timestamps incurs additional latency.\n     *\n     */\n    timestamp_granularities?: Array<'word' | 'segment'>;\n    /**\n     * Additional information to include in the transcription response.\n     * `logprobs` will return the log probabilities of the tokens in the\n     * response to understand the model's confidence in the transcription.\n     * `logprobs` only works with response_format set to `json` and only with\n     * the models `gpt-4o-transcribe` and `gpt-4o-mini-transcribe`.\n     *\n     */\n    include?: Array<TranscriptionInclude>;\n};\n\n/**\n * Represents a transcription response returned by model, based on the provided input.\n */\nexport type CreateTranscriptionResponseJson = {\n    /**\n     * The transcribed text.\n     */\n    text: string;\n    /**\n     * The log probabilities of the tokens in the transcription. Only returned with the models `gpt-4o-transcribe` and `gpt-4o-mini-transcribe` if `logprobs` is added to the `include` array.\n     *\n     */\n    logprobs?: Array<{\n        /**\n         * The token in the transcription.\n         */\n        token?: string;\n        /**\n         * The log probability of the token.\n         */\n        logprob?: number;\n        /**\n         * The bytes of the token.\n         */\n        bytes?: Array<number>;\n    }>;\n    /**\n     * Token usage statistics for the request.\n     */\n    usage?: ({\n        type?: 'TranscriptTextUsageTokens';\n    } & TranscriptTextUsageTokens) | ({\n        type?: 'TranscriptTextUsageDuration';\n    } & TranscriptTextUsageDuration);\n};\n\nexport type CreateTranscriptionResponseStreamEvent = ({\n    type?: 'TranscriptTextDeltaEvent';\n} & TranscriptTextDeltaEvent) | ({\n    type?: 'TranscriptTextDoneEvent';\n} & TranscriptTextDoneEvent);\n\n/**\n * Represents a verbose json transcription response returned by model, based on the provided input.\n */\nexport type CreateTranscriptionResponseVerboseJson = {\n    /**\n     * The language of the input audio.\n     */\n    language: string;\n    /**\n     * The duration of the input audio.\n     */\n    duration: number;\n    /**\n     * The transcribed text.\n     */\n    text: string;\n    /**\n     * Extracted words and their corresponding timestamps.\n     */\n    words?: Array<TranscriptionWord>;\n    /**\n     * Segments of the transcribed text and their corresponding details.\n     */\n    segments?: Array<TranscriptionSegment>;\n    usage?: TranscriptTextUsageDuration;\n};\n\nexport type CreateTranslationRequest = {\n    /**\n     * The audio file object (not file name) translate, in one of these formats: flac, mp3, mp4, mpeg, mpga, m4a, ogg, wav, or webm.\n     *\n     */\n    file: Blob | File;\n    /**\n     * ID of the model to use. Only `whisper-1` (which is powered by our open source Whisper V2 model) is currently available.\n     *\n     */\n    model: string | 'whisper-1';\n    /**\n     * An optional text to guide the model's style or continue a previous audio segment. The [prompt](https://platform.openai.com/docs/guides/speech-to-text#prompting) should be in English.\n     *\n     */\n    prompt?: string;\n    /**\n     * The format of the output, in one of these options: `json`, `text`, `srt`, `verbose_json`, or `vtt`.\n     *\n     */\n    response_format?: 'json' | 'text' | 'srt' | 'verbose_json' | 'vtt';\n    /**\n     * The sampling temperature, between 0 and 1. Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic. If set to 0, the model will use [log probability](https://en.wikipedia.org/wiki/Log_probability) to automatically increase the temperature until certain thresholds are hit.\n     *\n     */\n    temperature?: number;\n};\n\nexport type CreateTranslationResponseJson = {\n    text: string;\n};\n\nexport type CreateTranslationResponseVerboseJson = {\n    /**\n     * The language of the output translation (always `english`).\n     */\n    language: string;\n    /**\n     * The duration of the input audio.\n     */\n    duration: number;\n    /**\n     * The translated text.\n     */\n    text: string;\n    /**\n     * Segments of the translated text and their corresponding details.\n     */\n    segments?: Array<TranscriptionSegment>;\n};\n\nexport type CreateUploadRequest = {\n    /**\n     * The name of the file to upload.\n     *\n     */\n    filename: string;\n    /**\n     * The intended purpose of the uploaded file.\n     *\n     * See the [documentation on File purposes](https://platform.openai.com/docs/api-reference/files/create#files-create-purpose).\n     *\n     */\n    purpose: 'assistants' | 'batch' | 'fine-tune' | 'vision';\n    /**\n     * The number of bytes in the file you are uploading.\n     *\n     */\n    bytes: number;\n    /**\n     * The MIME type of the file.\n     *\n     * This must fall within the supported MIME types for your file purpose. See the supported MIME types for assistants and vision.\n     *\n     */\n    mime_type: string;\n    expires_after?: FileExpirationAfter;\n};\n\nexport type CreateVectorStoreFileBatchRequest = {\n    /**\n     * A list of [File](https://platform.openai.com/docs/api-reference/files) IDs that the vector store should use. Useful for tools like `file_search` that can access files.\n     */\n    file_ids: Array<string>;\n    chunking_strategy?: ChunkingStrategyRequestParam;\n    attributes?: VectorStoreFileAttributes;\n};\n\nexport type CreateVectorStoreFileRequest = {\n    /**\n     * A [File](https://platform.openai.com/docs/api-reference/files) ID that the vector store should use. Useful for tools like `file_search` that can access files.\n     */\n    file_id: string;\n    chunking_strategy?: ChunkingStrategyRequestParam;\n    attributes?: VectorStoreFileAttributes;\n};\n\nexport type CreateVectorStoreRequest = {\n    /**\n     * A list of [File](https://platform.openai.com/docs/api-reference/files) IDs that the vector store should use. Useful for tools like `file_search` that can access files.\n     */\n    file_ids?: Array<string>;\n    /**\n     * The name of the vector store.\n     */\n    name?: string;\n    expires_after?: VectorStoreExpirationAfter;\n    chunking_strategy?: ChunkingStrategyRequestParam;\n    metadata?: Metadata;\n};\n\n/**\n * Custom tool\n *\n * A custom tool that processes input using a specified format. Learn more about\n * [custom tools](https://platform.openai.com/docs/guides/function-calling#custom-tools).\n *\n */\nexport type CustomTool = {\n    /**\n     * The type of the custom tool. Always `custom`.\n     */\n    type: 'custom';\n    /**\n     * The name of the custom tool, used to identify it in tool calls.\n     */\n    name: string;\n    /**\n     * Optional description of the custom tool, used to provide more context.\n     *\n     */\n    description?: string;\n    /**\n     * The input format for the custom tool. Default is unconstrained text.\n     *\n     */\n    format?: {\n        /**\n         * Unconstrained text format. Always `text`.\n         */\n        type: 'text';\n    } | {\n        /**\n         * Grammar format. Always `grammar`.\n         */\n        type: 'grammar';\n        /**\n         * The grammar definition.\n         */\n        definition: string;\n        /**\n         * The syntax of the grammar definition. One of `lark` or `regex`.\n         */\n        syntax: 'lark' | 'regex';\n    };\n};\n\n/**\n * Custom tool call\n *\n * A call to a custom tool created by the model.\n *\n */\nexport type CustomToolCall = {\n    /**\n     * The type of the custom tool call. Always `custom_tool_call`.\n     *\n     */\n    type: 'custom_tool_call';\n    /**\n     * The unique ID of the custom tool call in the OpenAI platform.\n     *\n     */\n    id?: string;\n    /**\n     * An identifier used to map this custom tool call to a tool call output.\n     *\n     */\n    call_id: string;\n    /**\n     * The name of the custom tool being called.\n     *\n     */\n    name: string;\n    /**\n     * The input for the custom tool call generated by the model.\n     *\n     */\n    input: string;\n};\n\n/**\n * Custom tool call output\n *\n * The output of a custom tool call from your code, being sent back to the model.\n *\n */\nexport type CustomToolCallOutput = {\n    /**\n     * The type of the custom tool call output. Always `custom_tool_call_output`.\n     *\n     */\n    type: 'custom_tool_call_output';\n    /**\n     * The unique ID of the custom tool call output in the OpenAI platform.\n     *\n     */\n    id?: string;\n    /**\n     * The call ID, used to map this custom tool call output to a custom tool call.\n     *\n     */\n    call_id: string;\n    /**\n     * The output from the custom tool call generated by your code.\n     *\n     */\n    output: string;\n};\n\n/**\n * Custom tool\n *\n * A custom tool that processes input using a specified format.\n *\n */\nexport type CustomToolChatCompletions = {\n    /**\n     * The type of the custom tool. Always `custom`.\n     */\n    type: 'custom';\n    /**\n     * Custom tool properties\n     *\n     * Properties of the custom tool.\n     *\n     */\n    custom: {\n        /**\n         * The name of the custom tool, used to identify it in tool calls.\n         */\n        name: string;\n        /**\n         * Optional description of the custom tool, used to provide more context.\n         *\n         */\n        description?: string;\n        /**\n         * The input format for the custom tool. Default is unconstrained text.\n         *\n         */\n        format?: {\n            /**\n             * Unconstrained text format. Always `text`.\n             */\n            type: 'text';\n        } | {\n            /**\n             * Grammar format. Always `grammar`.\n             */\n            type: 'grammar';\n            /**\n             * Grammar format\n             *\n             * Your chosen grammar.\n             */\n            grammar: {\n                /**\n                 * The grammar definition.\n                 */\n                definition: string;\n                /**\n                 * The syntax of the grammar definition. One of `lark` or `regex`.\n                 */\n                syntax: 'lark' | 'regex';\n            };\n        };\n    };\n};\n\nexport type DeleteAssistantResponse = {\n    id: string;\n    deleted: boolean;\n    object: 'assistant.deleted';\n};\n\nexport type DeleteCertificateResponse = {\n    /**\n     * The object type, must be `certificate.deleted`.\n     */\n    object: 'certificate.deleted';\n    /**\n     * The ID of the certificate that was deleted.\n     */\n    id: string;\n};\n\nexport type DeleteFileResponse = {\n    id: string;\n    object: 'file';\n    deleted: boolean;\n};\n\nexport type DeleteFineTuningCheckpointPermissionResponse = {\n    /**\n     * The ID of the fine-tuned model checkpoint permission that was deleted.\n     */\n    id: string;\n    /**\n     * The object type, which is always \"checkpoint.permission\".\n     */\n    object: 'checkpoint.permission';\n    /**\n     * Whether the fine-tuned model checkpoint permission was successfully deleted.\n     */\n    deleted: boolean;\n};\n\nexport type DeleteMessageResponse = {\n    id: string;\n    deleted: boolean;\n    object: 'thread.message.deleted';\n};\n\nexport type DeleteModelResponse = {\n    id: string;\n    deleted: boolean;\n    object: string;\n};\n\nexport type DeleteThreadResponse = {\n    id: string;\n    deleted: boolean;\n    object: 'thread.deleted';\n};\n\nexport type DeleteVectorStoreFileResponse = {\n    id: string;\n    deleted: boolean;\n    object: 'vector_store.file.deleted';\n};\n\nexport type DeleteVectorStoreResponse = {\n    id: string;\n    deleted: boolean;\n    object: 'vector_store.deleted';\n};\n\n/**\n * Occurs when a stream ends.\n */\nexport type DoneEvent = {\n    event: 'done';\n    data: '[DONE]';\n};\n\n/**\n * DoubleClick\n *\n * A double click action.\n *\n */\nexport type DoubleClick = {\n    /**\n     * Specifies the event type. For a double click action, this property is\n     * always set to `double_click`.\n     *\n     */\n    type: 'double_click';\n    /**\n     * The x-coordinate where the double click occurred.\n     *\n     */\n    x: number;\n    /**\n     * The y-coordinate where the double click occurred.\n     *\n     */\n    y: number;\n};\n\n/**\n * Drag\n *\n * A drag action.\n *\n */\nexport type Drag = {\n    /**\n     * Specifies the event type. For a drag action, this property is\n     * always set to `drag`.\n     *\n     */\n    type: 'drag';\n    /**\n     * An array of coordinates representing the path of the drag action. Coordinates will appear as an array\n     * of objects, eg\n     * ```\n     * [\n     * { x: 100, y: 200 },\n     * { x: 200, y: 300 }\n     * ]\n     * ```\n     *\n     */\n    path: Array<Coordinate>;\n};\n\n/**\n * Input message\n *\n * A message input to the model with a role indicating instruction following\n * hierarchy. Instructions given with the `developer` or `system` role take\n * precedence over instructions given with the `user` role. Messages with the\n * `assistant` role are presumed to have been generated by the model in previous\n * interactions.\n *\n */\nexport type EasyInputMessage = {\n    /**\n     * The role of the message input. One of `user`, `assistant`, `system`, or\n     * `developer`.\n     *\n     */\n    role: 'user' | 'assistant' | 'system' | 'developer';\n    /**\n     * Text, image, or audio input to the model, used to generate a response.\n     * Can also contain previous assistant responses.\n     *\n     */\n    content: string | InputMessageContentList;\n    /**\n     * The type of the message input. Always `message`.\n     *\n     */\n    type?: 'message';\n};\n\n/**\n * Represents an embedding vector returned by embedding endpoint.\n *\n */\nexport type Embedding = {\n    /**\n     * The index of the embedding in the list of embeddings.\n     */\n    index: number;\n    /**\n     * The embedding vector, which is a list of floats. The length of vector depends on the model as listed in the [embedding guide](https://platform.openai.com/docs/guides/embeddings).\n     *\n     */\n    embedding: Array<number>;\n    /**\n     * The object type, which is always \"embedding\".\n     */\n    object: 'embedding';\n};\n\nexport type Error = {\n    code: string;\n    message: string;\n    param: string;\n    type: string;\n};\n\n/**\n * Occurs when an [error](https://platform.openai.com/docs/guides/error-codes#api-errors) occurs. This can happen due to an internal server error or a timeout.\n */\nexport type ErrorEvent = {\n    event: 'error';\n    data: Error;\n};\n\nexport type ErrorResponse = {\n    error: Error;\n};\n\n/**\n * Eval\n *\n * An Eval object with a data source config and testing criteria.\n * An Eval represents a task to be done for your LLM integration.\n * Like:\n * - Improve the quality of my chatbot\n * - See how well my chatbot handles customer support\n * - Check if o4-mini is better at my usecase than gpt-4o\n *\n */\nexport type Eval = {\n    /**\n     * The object type.\n     */\n    object: 'eval';\n    /**\n     * Unique identifier for the evaluation.\n     */\n    id: string;\n    /**\n     * The name of the evaluation.\n     */\n    name: string;\n    /**\n     * Configuration of data sources used in runs of the evaluation.\n     */\n    data_source_config: ({\n        type?: 'EvalCustomDataSourceConfig';\n    } & EvalCustomDataSourceConfig) | ({\n        type?: 'EvalLogsDataSourceConfig';\n    } & EvalLogsDataSourceConfig) | ({\n        type?: 'EvalStoredCompletionsDataSourceConfig';\n    } & EvalStoredCompletionsDataSourceConfig);\n    /**\n     * A list of testing criteria.\n     */\n    testing_criteria: Array<EvalGraderLabelModel | EvalGraderStringCheck | EvalGraderTextSimilarity | EvalGraderPython | EvalGraderScoreModel>;\n    /**\n     * The Unix timestamp (in seconds) for when the eval was created.\n     */\n    created_at: number;\n    metadata: Metadata;\n};\n\n/**\n * EvalApiError\n *\n * An object representing an error response from the Eval API.\n *\n */\nexport type EvalApiError = {\n    /**\n     * The error code.\n     */\n    code: string;\n    /**\n     * The error message.\n     */\n    message: string;\n};\n\n/**\n * CustomDataSourceConfig\n *\n * A CustomDataSourceConfig which specifies the schema of your `item` and optionally `sample` namespaces.\n * The response schema defines the shape of the data that will be:\n * - Used to define your testing criteria and\n * - What data is required when creating a run\n *\n */\nexport type EvalCustomDataSourceConfig = {\n    /**\n     * The type of data source. Always `custom`.\n     */\n    type: 'custom';\n    /**\n     * The json schema for the run data source items.\n     * Learn how to build JSON schemas [here](https://json-schema.org/).\n     *\n     */\n    schema: {\n        [key: string]: unknown;\n    };\n};\n\n/**\n * LabelModelGrader\n */\nexport type EvalGraderLabelModel = GraderLabelModel;\n\n/**\n * PythonGrader\n */\nexport type EvalGraderPython = GraderPython & {\n    /**\n     * The threshold for the score.\n     */\n    pass_threshold?: number;\n};\n\n/**\n * ScoreModelGrader\n */\nexport type EvalGraderScoreModel = GraderScoreModel & {\n    /**\n     * The threshold for the score.\n     */\n    pass_threshold?: number;\n};\n\n/**\n * StringCheckGrader\n */\nexport type EvalGraderStringCheck = GraderStringCheck;\n\n/**\n * TextSimilarityGrader\n */\nexport type EvalGraderTextSimilarity = GraderTextSimilarity & {\n    /**\n     * The threshold for the score.\n     */\n    pass_threshold: number;\n};\n\n/**\n * Eval message object\n *\n * A message input to the model with a role indicating instruction following\n * hierarchy. Instructions given with the `developer` or `system` role take\n * precedence over instructions given with the `user` role. Messages with the\n * `assistant` role are presumed to have been generated by the model in previous\n * interactions.\n *\n */\nexport type EvalItem = {\n    /**\n     * The role of the message input. One of `user`, `assistant`, `system`, or\n     * `developer`.\n     *\n     */\n    role: 'user' | 'assistant' | 'system' | 'developer';\n    /**\n     * Inputs to the model - can contain template strings.\n     *\n     */\n    content: string | InputTextContent | {\n        /**\n         * The type of the output text. Always `output_text`.\n         *\n         */\n        type: 'output_text';\n        /**\n         * The text output from the model.\n         *\n         */\n        text: string;\n    } | {\n        /**\n         * The type of the image input. Always `input_image`.\n         *\n         */\n        type: 'input_image';\n        /**\n         * The URL of the image input.\n         *\n         */\n        image_url: string;\n        /**\n         * The detail level of the image to be sent to the model. One of `high`, `low`, or `auto`. Defaults to `auto`.\n         *\n         */\n        detail?: string;\n    } | Array<unknown>;\n    /**\n     * The type of the message input. Always `message`.\n     *\n     */\n    type?: 'message';\n};\n\n/**\n * EvalJsonlFileContentSource\n */\nexport type EvalJsonlFileContentSource = {\n    /**\n     * The type of jsonl source. Always `file_content`.\n     */\n    type: 'file_content';\n    /**\n     * The content of the jsonl file.\n     */\n    content: Array<{\n        item: {\n            [key: string]: unknown;\n        };\n        sample?: {\n            [key: string]: unknown;\n        };\n    }>;\n};\n\n/**\n * EvalJsonlFileIdSource\n */\nexport type EvalJsonlFileIdSource = {\n    /**\n     * The type of jsonl source. Always `file_id`.\n     */\n    type: 'file_id';\n    /**\n     * The identifier of the file.\n     */\n    id: string;\n};\n\n/**\n * EvalList\n *\n * An object representing a list of evals.\n *\n */\nexport type EvalList = {\n    /**\n     * The type of this object. It is always set to \"list\".\n     *\n     */\n    object: 'list';\n    /**\n     * An array of eval objects.\n     *\n     */\n    data: Array<Eval>;\n    /**\n     * The identifier of the first eval in the data array.\n     */\n    first_id: string;\n    /**\n     * The identifier of the last eval in the data array.\n     */\n    last_id: string;\n    /**\n     * Indicates whether there are more evals available.\n     */\n    has_more: boolean;\n};\n\n/**\n * LogsDataSourceConfig\n *\n * A LogsDataSourceConfig which specifies the metadata property of your logs query.\n * This is usually metadata like `usecase=chatbot` or `prompt-version=v2`, etc.\n * The schema returned by this data source config is used to defined what variables are available in your evals.\n * `item` and `sample` are both defined when using this data source config.\n *\n */\nexport type EvalLogsDataSourceConfig = {\n    /**\n     * The type of data source. Always `logs`.\n     */\n    type: 'logs';\n    metadata?: Metadata;\n    /**\n     * The json schema for the run data source items.\n     * Learn how to build JSON schemas [here](https://json-schema.org/).\n     *\n     */\n    schema: {\n        [key: string]: unknown;\n    };\n};\n\n/**\n * EvalResponsesSource\n *\n * A EvalResponsesSource object describing a run data source configuration.\n *\n */\nexport type EvalResponsesSource = {\n    /**\n     * The type of run data source. Always `responses`.\n     */\n    type: 'responses';\n    /**\n     * Metadata filter for the responses. This is a query parameter used to select responses.\n     */\n    metadata?: {\n        [key: string]: unknown;\n    };\n    /**\n     * The name of the model to find responses for. This is a query parameter used to select responses.\n     */\n    model?: string;\n    /**\n     * Optional string to search the 'instructions' field. This is a query parameter used to select responses.\n     */\n    instructions_search?: string;\n    /**\n     * Only include items created after this timestamp (inclusive). This is a query parameter used to select responses.\n     */\n    created_after?: number;\n    /**\n     * Only include items created before this timestamp (inclusive). This is a query parameter used to select responses.\n     */\n    created_before?: number;\n    /**\n     * Optional reasoning effort parameter. This is a query parameter used to select responses.\n     */\n    reasoning_effort?: ReasoningEffort;\n    /**\n     * Sampling temperature. This is a query parameter used to select responses.\n     */\n    temperature?: number;\n    /**\n     * Nucleus sampling parameter. This is a query parameter used to select responses.\n     */\n    top_p?: number;\n    /**\n     * List of user identifiers. This is a query parameter used to select responses.\n     */\n    users?: Array<string>;\n    /**\n     * List of tool names. This is a query parameter used to select responses.\n     */\n    tools?: Array<string>;\n};\n\n/**\n * EvalRun\n *\n * A schema representing an evaluation run.\n *\n */\nexport type EvalRun = {\n    /**\n     * The type of the object. Always \"eval.run\".\n     */\n    object: 'eval.run';\n    /**\n     * Unique identifier for the evaluation run.\n     */\n    id: string;\n    /**\n     * The identifier of the associated evaluation.\n     */\n    eval_id: string;\n    /**\n     * The status of the evaluation run.\n     */\n    status: string;\n    /**\n     * The model that is evaluated, if applicable.\n     */\n    model: string;\n    /**\n     * The name of the evaluation run.\n     */\n    name: string;\n    /**\n     * Unix timestamp (in seconds) when the evaluation run was created.\n     */\n    created_at: number;\n    /**\n     * The URL to the rendered evaluation run report on the UI dashboard.\n     */\n    report_url: string;\n    /**\n     * Counters summarizing the outcomes of the evaluation run.\n     */\n    result_counts: {\n        /**\n         * Total number of executed output items.\n         */\n        total: number;\n        /**\n         * Number of output items that resulted in an error.\n         */\n        errored: number;\n        /**\n         * Number of output items that failed to pass the evaluation.\n         */\n        failed: number;\n        /**\n         * Number of output items that passed the evaluation.\n         */\n        passed: number;\n    };\n    /**\n     * Usage statistics for each model during the evaluation run.\n     */\n    per_model_usage: Array<{\n        /**\n         * The name of the model.\n         */\n        model_name: string;\n        /**\n         * The number of invocations.\n         */\n        invocation_count: number;\n        /**\n         * The number of prompt tokens used.\n         */\n        prompt_tokens: number;\n        /**\n         * The number of completion tokens generated.\n         */\n        completion_tokens: number;\n        /**\n         * The total number of tokens used.\n         */\n        total_tokens: number;\n        /**\n         * The number of tokens retrieved from cache.\n         */\n        cached_tokens: number;\n    }>;\n    /**\n     * Results per testing criteria applied during the evaluation run.\n     */\n    per_testing_criteria_results: Array<{\n        /**\n         * A description of the testing criteria.\n         */\n        testing_criteria: string;\n        /**\n         * Number of tests passed for this criteria.\n         */\n        passed: number;\n        /**\n         * Number of tests failed for this criteria.\n         */\n        failed: number;\n    }>;\n    /**\n     * Information about the run's data source.\n     */\n    data_source: ({\n        type?: 'CreateEvalJsonlRunDataSource';\n    } & CreateEvalJsonlRunDataSource) | ({\n        type?: 'CreateEvalCompletionsRunDataSource';\n    } & CreateEvalCompletionsRunDataSource) | ({\n        type?: 'CreateEvalResponsesRunDataSource';\n    } & CreateEvalResponsesRunDataSource);\n    metadata: Metadata;\n    error: EvalApiError;\n};\n\n/**\n * EvalRunList\n *\n * An object representing a list of runs for an evaluation.\n *\n */\nexport type EvalRunList = {\n    /**\n     * The type of this object. It is always set to \"list\".\n     *\n     */\n    object: 'list';\n    /**\n     * An array of eval run objects.\n     *\n     */\n    data: Array<EvalRun>;\n    /**\n     * The identifier of the first eval run in the data array.\n     */\n    first_id: string;\n    /**\n     * The identifier of the last eval run in the data array.\n     */\n    last_id: string;\n    /**\n     * Indicates whether there are more evals available.\n     */\n    has_more: boolean;\n};\n\n/**\n * EvalRunOutputItem\n *\n * A schema representing an evaluation run output item.\n *\n */\nexport type EvalRunOutputItem = {\n    /**\n     * The type of the object. Always \"eval.run.output_item\".\n     */\n    object: 'eval.run.output_item';\n    /**\n     * Unique identifier for the evaluation run output item.\n     */\n    id: string;\n    /**\n     * The identifier of the evaluation run associated with this output item.\n     */\n    run_id: string;\n    /**\n     * The identifier of the evaluation group.\n     */\n    eval_id: string;\n    /**\n     * Unix timestamp (in seconds) when the evaluation run was created.\n     */\n    created_at: number;\n    /**\n     * The status of the evaluation run.\n     */\n    status: string;\n    /**\n     * The identifier for the data source item.\n     */\n    datasource_item_id: number;\n    /**\n     * Details of the input data source item.\n     */\n    datasource_item: {\n        [key: string]: unknown;\n    };\n    /**\n     * A list of results from the evaluation run.\n     */\n    results: Array<{\n        [key: string]: unknown;\n    }>;\n    /**\n     * A sample containing the input and output of the evaluation run.\n     */\n    sample: {\n        /**\n         * An array of input messages.\n         */\n        input: Array<{\n            /**\n             * The role of the message sender (e.g., system, user, developer).\n             */\n            role: string;\n            /**\n             * The content of the message.\n             */\n            content: string;\n        }>;\n        /**\n         * An array of output messages.\n         */\n        output: Array<{\n            /**\n             * The role of the message (e.g. \"system\", \"assistant\", \"user\").\n             */\n            role?: string;\n            /**\n             * The content of the message.\n             */\n            content?: string;\n        }>;\n        /**\n         * The reason why the sample generation was finished.\n         */\n        finish_reason: string;\n        /**\n         * The model used for generating the sample.\n         */\n        model: string;\n        /**\n         * Token usage details for the sample.\n         */\n        usage: {\n            /**\n             * The total number of tokens used.\n             */\n            total_tokens: number;\n            /**\n             * The number of completion tokens generated.\n             */\n            completion_tokens: number;\n            /**\n             * The number of prompt tokens used.\n             */\n            prompt_tokens: number;\n            /**\n             * The number of tokens retrieved from cache.\n             */\n            cached_tokens: number;\n        };\n        error: EvalApiError;\n        /**\n         * The sampling temperature used.\n         */\n        temperature: number;\n        /**\n         * The maximum number of tokens allowed for completion.\n         */\n        max_completion_tokens: number;\n        /**\n         * The top_p value used for sampling.\n         */\n        top_p: number;\n        /**\n         * The seed used for generating the sample.\n         */\n        seed: number;\n    };\n};\n\n/**\n * EvalRunOutputItemList\n *\n * An object representing a list of output items for an evaluation run.\n *\n */\nexport type EvalRunOutputItemList = {\n    /**\n     * The type of this object. It is always set to \"list\".\n     *\n     */\n    object: 'list';\n    /**\n     * An array of eval run output item objects.\n     *\n     */\n    data: Array<EvalRunOutputItem>;\n    /**\n     * The identifier of the first eval run output item in the data array.\n     */\n    first_id: string;\n    /**\n     * The identifier of the last eval run output item in the data array.\n     */\n    last_id: string;\n    /**\n     * Indicates whether there are more eval run output items available.\n     */\n    has_more: boolean;\n};\n\n/**\n * StoredCompletionsDataSourceConfig\n *\n * Deprecated in favor of LogsDataSourceConfig.\n *\n *\n * @deprecated\n */\nexport type EvalStoredCompletionsDataSourceConfig = {\n    /**\n     * The type of data source. Always `stored_completions`.\n     */\n    type: 'stored_completions';\n    metadata?: Metadata;\n    /**\n     * The json schema for the run data source items.\n     * Learn how to build JSON schemas [here](https://json-schema.org/).\n     *\n     */\n    schema: {\n        [key: string]: unknown;\n    };\n};\n\n/**\n * StoredCompletionsRunDataSource\n *\n * A StoredCompletionsRunDataSource configuration describing a set of filters\n *\n */\nexport type EvalStoredCompletionsSource = {\n    /**\n     * The type of source. Always `stored_completions`.\n     */\n    type: 'stored_completions';\n    metadata?: Metadata;\n    /**\n     * An optional model to filter by (e.g., 'gpt-4o').\n     */\n    model?: string;\n    /**\n     * An optional Unix timestamp to filter items created after this time.\n     */\n    created_after?: number;\n    /**\n     * An optional Unix timestamp to filter items created before this time.\n     */\n    created_before?: number;\n    /**\n     * An optional maximum number of items to return.\n     */\n    limit?: number;\n};\n\n/**\n * File expiration policy\n *\n * The expiration policy for a file. By default, files with `purpose=batch` expire after 30 days and all other files are persisted until they are manually deleted.\n */\nexport type FileExpirationAfter = {\n    /**\n     * Anchor timestamp after which the expiration policy applies. Supported anchors: `created_at`.\n     */\n    anchor: 'created_at';\n    /**\n     * The number of seconds after the anchor time that the file will expire. Must be between 3600 (1 hour) and 2592000 (30 days).\n     */\n    seconds: number;\n};\n\n/**\n * File path\n *\n * A path to a file.\n *\n */\nexport type FilePath = {\n    /**\n     * The type of the file path. Always `file_path`.\n     *\n     */\n    type: 'file_path';\n    /**\n     * The ID of the file.\n     *\n     */\n    file_id: string;\n    /**\n     * The index of the file in the list of files.\n     *\n     */\n    index: number;\n};\n\n/**\n * The ranker to use for the file search. If not specified will use the `auto` ranker.\n */\nexport const FileSearchRanker = { AUTO: 'auto', DEFAULT_2024_08_21: 'default_2024_08_21' } as const;\n\n/**\n * The ranker to use for the file search. If not specified will use the `auto` ranker.\n */\nexport type FileSearchRanker = typeof FileSearchRanker[keyof typeof FileSearchRanker];\n\n/**\n * File search tool call ranking options\n *\n * The ranking options for the file search. If not specified, the file search tool will use the `auto` ranker and a score_threshold of 0.\n *\n * See the [file search tool documentation](https://platform.openai.com/docs/assistants/tools/file-search#customizing-file-search-settings) for more information.\n *\n */\nexport type FileSearchRankingOptions = {\n    ranker?: FileSearchRanker;\n    /**\n     * The score threshold for the file search. All values must be a floating point number between 0 and 1.\n     */\n    score_threshold: number;\n};\n\n/**\n * File search tool call\n *\n * The results of a file search tool call. See the\n * [file search guide](https://platform.openai.com/docs/guides/tools-file-search) for more information.\n *\n */\nexport type FileSearchToolCall = {\n    /**\n     * The unique ID of the file search tool call.\n     *\n     */\n    id: string;\n    /**\n     * The type of the file search tool call. Always `file_search_call`.\n     *\n     */\n    type: 'file_search_call';\n    /**\n     * The status of the file search tool call. One of `in_progress`,\n     * `searching`, `incomplete` or `failed`,\n     *\n     */\n    status: 'in_progress' | 'searching' | 'completed' | 'incomplete' | 'failed';\n    /**\n     * The queries used to search for files.\n     *\n     */\n    queries: Array<string>;\n    /**\n     * The results of the file search tool call.\n     *\n     */\n    results?: Array<{\n        /**\n         * The unique ID of the file.\n         *\n         */\n        file_id?: string;\n        /**\n         * The text that was retrieved from the file.\n         *\n         */\n        text?: string;\n        /**\n         * The name of the file.\n         *\n         */\n        filename?: string;\n        attributes?: VectorStoreFileAttributes;\n        /**\n         * The relevance score of the file - a value between 0 and 1.\n         *\n         */\n        score?: number;\n    }>;\n};\n\nexport type FineTuneChatCompletionRequestAssistantMessage = {\n    /**\n     * Controls whether the assistant message is trained against (0 or 1)\n     */\n    weight?: 0 | 1;\n} & ChatCompletionRequestAssistantMessage;\n\n/**\n * The per-line training example of a fine-tuning input file for chat models using the supervised method.\n * Input messages may contain text or image content only. Audio and file input messages\n * are not currently supported for fine-tuning.\n *\n */\nexport type FineTuneChatRequestInput = {\n    messages?: Array<ChatCompletionRequestSystemMessage | ChatCompletionRequestUserMessage | FineTuneChatCompletionRequestAssistantMessage | ChatCompletionRequestToolMessage | ChatCompletionRequestFunctionMessage>;\n    /**\n     * A list of tools the model may generate JSON inputs for.\n     */\n    tools?: Array<ChatCompletionTool>;\n    parallel_tool_calls?: ParallelToolCalls;\n    /**\n     * A list of functions the model may generate JSON inputs for.\n     *\n     * @deprecated\n     */\n    functions?: Array<ChatCompletionFunctions>;\n};\n\n/**\n * The hyperparameters used for the DPO fine-tuning job.\n */\nexport type FineTuneDpoHyperparameters = {\n    /**\n     * The beta value for the DPO method. A higher beta value will increase the weight of the penalty between the policy and reference model.\n     *\n     */\n    beta?: 'auto' | number;\n    /**\n     * Number of examples in each batch. A larger batch size means that model parameters are updated less frequently, but with lower variance.\n     *\n     */\n    batch_size?: 'auto' | number;\n    /**\n     * Scaling factor for the learning rate. A smaller learning rate may be useful to avoid overfitting.\n     *\n     */\n    learning_rate_multiplier?: 'auto' | number;\n    /**\n     * The number of epochs to train the model for. An epoch refers to one full cycle through the training dataset.\n     *\n     */\n    n_epochs?: 'auto' | number;\n};\n\n/**\n * Configuration for the DPO fine-tuning method.\n */\nexport type FineTuneDpoMethod = {\n    hyperparameters?: FineTuneDpoHyperparameters;\n};\n\n/**\n * The method used for fine-tuning.\n */\nexport type FineTuneMethod = {\n    /**\n     * The type of method. Is either `supervised`, `dpo`, or `reinforcement`.\n     */\n    type: 'supervised' | 'dpo' | 'reinforcement';\n    supervised?: FineTuneSupervisedMethod;\n    dpo?: FineTuneDpoMethod;\n    reinforcement?: FineTuneReinforcementMethod;\n};\n\n/**\n * The per-line training example of a fine-tuning input file for chat models using the dpo method.\n * Input messages may contain text or image content only. Audio and file input messages\n * are not currently supported for fine-tuning.\n *\n */\nexport type FineTunePreferenceRequestInput = {\n    input?: {\n        messages?: Array<ChatCompletionRequestSystemMessage | ChatCompletionRequestUserMessage | FineTuneChatCompletionRequestAssistantMessage | ChatCompletionRequestToolMessage | ChatCompletionRequestFunctionMessage>;\n        /**\n         * A list of tools the model may generate JSON inputs for.\n         */\n        tools?: Array<ChatCompletionTool>;\n        parallel_tool_calls?: ParallelToolCalls;\n    };\n    /**\n     * The preferred completion message for the output.\n     */\n    preferred_output?: Array<ChatCompletionRequestAssistantMessage>;\n    /**\n     * The non-preferred completion message for the output.\n     */\n    non_preferred_output?: Array<ChatCompletionRequestAssistantMessage>;\n};\n\n/**\n * The hyperparameters used for the reinforcement fine-tuning job.\n */\nexport type FineTuneReinforcementHyperparameters = {\n    /**\n     * Number of examples in each batch. A larger batch size means that model parameters are updated less frequently, but with lower variance.\n     *\n     */\n    batch_size?: 'auto' | number;\n    /**\n     * Scaling factor for the learning rate. A smaller learning rate may be useful to avoid overfitting.\n     *\n     */\n    learning_rate_multiplier?: 'auto' | number;\n    /**\n     * The number of epochs to train the model for. An epoch refers to one full cycle through the training dataset.\n     *\n     */\n    n_epochs?: 'auto' | number;\n    /**\n     * Level of reasoning effort.\n     *\n     */\n    reasoning_effort?: 'default' | 'low' | 'medium' | 'high';\n    /**\n     * Multiplier on amount of compute used for exploring search space during training.\n     *\n     */\n    compute_multiplier?: 'auto' | number;\n    /**\n     * The number of training steps between evaluation runs.\n     *\n     */\n    eval_interval?: 'auto' | number;\n    /**\n     * Number of evaluation samples to generate per training step.\n     *\n     */\n    eval_samples?: 'auto' | number;\n};\n\n/**\n * Configuration for the reinforcement fine-tuning method.\n */\nexport type FineTuneReinforcementMethod = {\n    /**\n     * The grader used for the fine-tuning job.\n     */\n    grader: GraderStringCheck | GraderTextSimilarity | GraderPython | GraderScoreModel | GraderMulti;\n    hyperparameters?: FineTuneReinforcementHyperparameters;\n};\n\n/**\n * Per-line training example for reinforcement fine-tuning. Note that `messages` and `tools` are the only reserved keywords.\n * Any other arbitrary key-value data can be included on training datapoints and will be available to reference during grading under the `{{ item.XXX }}` template variable.\n * Input messages may contain text or image content only. Audio and file input messages\n * are not currently supported for fine-tuning.\n *\n */\nexport type FineTuneReinforcementRequestInput = {\n    messages: Array<ChatCompletionRequestDeveloperMessage | ChatCompletionRequestUserMessage | FineTuneChatCompletionRequestAssistantMessage | ChatCompletionRequestToolMessage>;\n    /**\n     * A list of tools the model may generate JSON inputs for.\n     */\n    tools?: Array<ChatCompletionTool>;\n};\n\n/**\n * The hyperparameters used for the fine-tuning job.\n */\nexport type FineTuneSupervisedHyperparameters = {\n    /**\n     * Number of examples in each batch. A larger batch size means that model parameters are updated less frequently, but with lower variance.\n     *\n     */\n    batch_size?: 'auto' | number;\n    /**\n     * Scaling factor for the learning rate. A smaller learning rate may be useful to avoid overfitting.\n     *\n     */\n    learning_rate_multiplier?: 'auto' | number;\n    /**\n     * The number of epochs to train the model for. An epoch refers to one full cycle through the training dataset.\n     *\n     */\n    n_epochs?: 'auto' | number;\n};\n\n/**\n * Configuration for the supervised fine-tuning method.\n */\nexport type FineTuneSupervisedMethod = {\n    hyperparameters?: FineTuneSupervisedHyperparameters;\n};\n\n/**\n * FineTuningCheckpointPermission\n *\n * The `checkpoint.permission` object represents a permission for a fine-tuned model checkpoint.\n *\n */\nexport type FineTuningCheckpointPermission = {\n    /**\n     * The permission identifier, which can be referenced in the API endpoints.\n     */\n    id: string;\n    /**\n     * The Unix timestamp (in seconds) for when the permission was created.\n     */\n    created_at: number;\n    /**\n     * The project identifier that the permission is for.\n     */\n    project_id: string;\n    /**\n     * The object type, which is always \"checkpoint.permission\".\n     */\n    object: 'checkpoint.permission';\n};\n\n/**\n * Fine-Tuning Job Integration\n */\nexport type FineTuningIntegration = {\n    /**\n     * The type of the integration being enabled for the fine-tuning job\n     */\n    type: 'wandb';\n    /**\n     * The settings for your integration with Weights and Biases. This payload specifies the project that\n     * metrics will be sent to. Optionally, you can set an explicit display name for your run, add tags\n     * to your run, and set a default entity (team, username, etc) to be associated with your run.\n     *\n     */\n    wandb: {\n        /**\n         * The name of the project that the new run will be created under.\n         *\n         */\n        project: string;\n        /**\n         * A display name to set for the run. If not set, we will use the Job ID as the name.\n         *\n         */\n        name?: string;\n        /**\n         * The entity to use for the run. This allows you to set the team or username of the WandB user that you would\n         * like associated with the run. If not set, the default entity for the registered WandB API key is used.\n         *\n         */\n        entity?: string;\n        /**\n         * A list of tags to be attached to the newly created run. These tags are passed through directly to WandB. Some\n         * default tags are generated by OpenAI: \"openai/finetune\", \"openai/{base-model}\", \"openai/{ftjob-abcdef}\".\n         *\n         */\n        tags?: Array<string>;\n    };\n};\n\n/**\n * FineTuningJob\n *\n * The `fine_tuning.job` object represents a fine-tuning job that has been created through the API.\n *\n */\nexport type FineTuningJob = {\n    /**\n     * The object identifier, which can be referenced in the API endpoints.\n     */\n    id: string;\n    /**\n     * The Unix timestamp (in seconds) for when the fine-tuning job was created.\n     */\n    created_at: number;\n    /**\n     * For fine-tuning jobs that have `failed`, this will contain more information on the cause of the failure.\n     */\n    error: {\n        /**\n         * A machine-readable error code.\n         */\n        code: string;\n        /**\n         * A human-readable error message.\n         */\n        message: string;\n        /**\n         * The parameter that was invalid, usually `training_file` or `validation_file`. This field will be null if the failure was not parameter-specific.\n         */\n        param: string;\n    };\n    /**\n     * The name of the fine-tuned model that is being created. The value will be null if the fine-tuning job is still running.\n     */\n    fine_tuned_model: string;\n    /**\n     * The Unix timestamp (in seconds) for when the fine-tuning job was finished. The value will be null if the fine-tuning job is still running.\n     */\n    finished_at: number;\n    /**\n     * The hyperparameters used for the fine-tuning job. This value will only be returned when running `supervised` jobs.\n     */\n    hyperparameters: {\n        /**\n         * Number of examples in each batch. A larger batch size means that model parameters\n         * are updated less frequently, but with lower variance.\n         *\n         */\n        batch_size?: 'auto' | number;\n        /**\n         * Scaling factor for the learning rate. A smaller learning rate may be useful to avoid\n         * overfitting.\n         *\n         */\n        learning_rate_multiplier?: 'auto' | number;\n        /**\n         * The number of epochs to train the model for. An epoch refers to one full cycle\n         * through the training dataset.\n         *\n         */\n        n_epochs?: 'auto' | number;\n    };\n    /**\n     * The base model that is being fine-tuned.\n     */\n    model: string;\n    /**\n     * The object type, which is always \"fine_tuning.job\".\n     */\n    object: 'fine_tuning.job';\n    /**\n     * The organization that owns the fine-tuning job.\n     */\n    organization_id: string;\n    /**\n     * The compiled results file ID(s) for the fine-tuning job. You can retrieve the results with the [Files API](https://platform.openai.com/docs/api-reference/files/retrieve-contents).\n     */\n    result_files: Array<string>;\n    /**\n     * The current status of the fine-tuning job, which can be either `validating_files`, `queued`, `running`, `succeeded`, `failed`, or `cancelled`.\n     */\n    status: 'validating_files' | 'queued' | 'running' | 'succeeded' | 'failed' | 'cancelled';\n    /**\n     * The total number of billable tokens processed by this fine-tuning job. The value will be null if the fine-tuning job is still running.\n     */\n    trained_tokens: number;\n    /**\n     * The file ID used for training. You can retrieve the training data with the [Files API](https://platform.openai.com/docs/api-reference/files/retrieve-contents).\n     */\n    training_file: string;\n    /**\n     * The file ID used for validation. You can retrieve the validation results with the [Files API](https://platform.openai.com/docs/api-reference/files/retrieve-contents).\n     */\n    validation_file: string;\n    /**\n     * A list of integrations to enable for this fine-tuning job.\n     */\n    integrations?: Array<{\n        type?: 'FineTuningIntegration';\n    } & FineTuningIntegration>;\n    /**\n     * The seed used for the fine-tuning job.\n     */\n    seed: number;\n    /**\n     * The Unix timestamp (in seconds) for when the fine-tuning job is estimated to finish. The value will be null if the fine-tuning job is not running.\n     */\n    estimated_finish?: number;\n    method?: FineTuneMethod;\n    metadata?: Metadata;\n};\n\n/**\n * FineTuningJobCheckpoint\n *\n * The `fine_tuning.job.checkpoint` object represents a model checkpoint for a fine-tuning job that is ready to use.\n *\n */\nexport type FineTuningJobCheckpoint = {\n    /**\n     * The checkpoint identifier, which can be referenced in the API endpoints.\n     */\n    id: string;\n    /**\n     * The Unix timestamp (in seconds) for when the checkpoint was created.\n     */\n    created_at: number;\n    /**\n     * The name of the fine-tuned checkpoint model that is created.\n     */\n    fine_tuned_model_checkpoint: string;\n    /**\n     * The step number that the checkpoint was created at.\n     */\n    step_number: number;\n    /**\n     * Metrics at the step number during the fine-tuning job.\n     */\n    metrics: {\n        step?: number;\n        train_loss?: number;\n        train_mean_token_accuracy?: number;\n        valid_loss?: number;\n        valid_mean_token_accuracy?: number;\n        full_valid_loss?: number;\n        full_valid_mean_token_accuracy?: number;\n    };\n    /**\n     * The name of the fine-tuning job that this checkpoint was created from.\n     */\n    fine_tuning_job_id: string;\n    /**\n     * The object type, which is always \"fine_tuning.job.checkpoint\".\n     */\n    object: 'fine_tuning.job.checkpoint';\n};\n\n/**\n * Fine-tuning job event object\n */\nexport type FineTuningJobEvent = {\n    /**\n     * The object type, which is always \"fine_tuning.job.event\".\n     */\n    object: 'fine_tuning.job.event';\n    /**\n     * The object identifier.\n     */\n    id: string;\n    /**\n     * The Unix timestamp (in seconds) for when the fine-tuning job was created.\n     */\n    created_at: number;\n    /**\n     * The log level of the event.\n     */\n    level: 'info' | 'warn' | 'error';\n    /**\n     * The message of the event.\n     */\n    message: string;\n    /**\n     * The type of event.\n     */\n    type?: 'message' | 'metrics';\n    /**\n     * The data associated with the event.\n     */\n    data?: {\n        [key: string]: unknown;\n    };\n};\n\nexport type FunctionObject = {\n    /**\n     * A description of what the function does, used by the model to choose when and how to call the function.\n     */\n    description?: string;\n    /**\n     * The name of the function to be called. Must be a-z, A-Z, 0-9, or contain underscores and dashes, with a maximum length of 64.\n     */\n    name: string;\n    parameters?: FunctionParameters;\n    /**\n     * Whether to enable strict schema adherence when generating the function call. If set to true, the model will follow the exact schema defined in the `parameters` field. Only a subset of JSON Schema is supported when `strict` is `true`. Learn more about Structured Outputs in the [function calling guide](https://platform.openai.com/docs/guides/function-calling).\n     */\n    strict?: boolean;\n};\n\n/**\n * The parameters the functions accepts, described as a JSON Schema object. See the [guide](https://platform.openai.com/docs/guides/function-calling) for examples, and the [JSON Schema reference](https://json-schema.org/understanding-json-schema/) for documentation about the format.\n *\n * Omitting `parameters` defines a function with an empty parameter list.\n */\nexport type FunctionParameters = {\n    [key: string]: unknown;\n};\n\n/**\n * Function tool call\n *\n * A tool call to run a function. See the\n * [function calling guide](https://platform.openai.com/docs/guides/function-calling) for more information.\n *\n */\nexport type FunctionToolCall = {\n    /**\n     * The unique ID of the function tool call.\n     *\n     */\n    id?: string;\n    /**\n     * The type of the function tool call. Always `function_call`.\n     *\n     */\n    type: 'function_call';\n    /**\n     * The unique ID of the function tool call generated by the model.\n     *\n     */\n    call_id: string;\n    /**\n     * The name of the function to run.\n     *\n     */\n    name: string;\n    /**\n     * A JSON string of the arguments to pass to the function.\n     *\n     */\n    arguments: string;\n    /**\n     * The status of the item. One of `in_progress`, `completed`, or\n     * `incomplete`. Populated when items are returned via API.\n     *\n     */\n    status?: 'in_progress' | 'completed' | 'incomplete';\n};\n\n/**\n * Function tool call output\n *\n * The output of a function tool call.\n *\n */\nexport type FunctionToolCallOutput = {\n    /**\n     * The unique ID of the function tool call output. Populated when this item\n     * is returned via API.\n     *\n     */\n    id?: string;\n    /**\n     * The type of the function tool call output. Always `function_call_output`.\n     *\n     */\n    type: 'function_call_output';\n    /**\n     * The unique ID of the function tool call generated by the model.\n     *\n     */\n    call_id: string;\n    /**\n     * A JSON string of the output of the function tool call.\n     *\n     */\n    output: string;\n    /**\n     * The status of the item. One of `in_progress`, `completed`, or\n     * `incomplete`. Populated when items are returned via API.\n     *\n     */\n    status?: 'in_progress' | 'completed' | 'incomplete';\n};\n\nexport type FunctionToolCallOutputResource = FunctionToolCallOutput & {\n    /**\n     * The unique ID of the function call tool output.\n     *\n     */\n    id: string;\n};\n\nexport type FunctionToolCallResource = FunctionToolCall & {\n    /**\n     * The unique ID of the function tool call.\n     *\n     */\n    id: string;\n};\n\n/**\n * LabelModelGrader\n *\n * A LabelModelGrader object which uses a model to assign labels to each item\n * in the evaluation.\n *\n */\nexport type GraderLabelModel = {\n    /**\n     * The object type, which is always `label_model`.\n     */\n    type: 'label_model';\n    /**\n     * The name of the grader.\n     */\n    name: string;\n    /**\n     * The model to use for the evaluation. Must support structured outputs.\n     */\n    model: string;\n    input: Array<EvalItem>;\n    /**\n     * The labels to assign to each item in the evaluation.\n     */\n    labels: Array<string>;\n    /**\n     * The labels that indicate a passing result. Must be a subset of labels.\n     */\n    passing_labels: Array<string>;\n};\n\n/**\n * MultiGrader\n *\n * A MultiGrader object combines the output of multiple graders to produce a single score.\n */\nexport type GraderMulti = {\n    /**\n     * The object type, which is always `multi`.\n     */\n    type: 'multi';\n    /**\n     * The name of the grader.\n     */\n    name: string;\n    graders: GraderStringCheck | GraderTextSimilarity | GraderPython | GraderScoreModel | GraderLabelModel;\n    /**\n     * A formula to calculate the output based on grader results.\n     */\n    calculate_output: string;\n};\n\n/**\n * PythonGrader\n *\n * A PythonGrader object that runs a python script on the input.\n *\n */\nexport type GraderPython = {\n    /**\n     * The object type, which is always `python`.\n     */\n    type: 'python';\n    /**\n     * The name of the grader.\n     */\n    name: string;\n    /**\n     * The source code of the python script.\n     */\n    source: string;\n    /**\n     * The image tag to use for the python script.\n     */\n    image_tag?: string;\n};\n\n/**\n * ScoreModelGrader\n *\n * A ScoreModelGrader object that uses a model to assign a score to the input.\n *\n */\nexport type GraderScoreModel = {\n    /**\n     * The object type, which is always `score_model`.\n     */\n    type: 'score_model';\n    /**\n     * The name of the grader.\n     */\n    name: string;\n    /**\n     * The model to use for the evaluation.\n     */\n    model: string;\n    /**\n     * The sampling parameters for the model.\n     */\n    sampling_params?: {\n        [key: string]: unknown;\n    };\n    /**\n     * The input text. This may include template strings.\n     */\n    input: Array<EvalItem>;\n    /**\n     * The range of the score. Defaults to `[0, 1]`.\n     */\n    range?: Array<number>;\n};\n\n/**\n * StringCheckGrader\n *\n * A StringCheckGrader object that performs a string comparison between input and reference using a specified operation.\n *\n */\nexport type GraderStringCheck = {\n    /**\n     * The object type, which is always `string_check`.\n     */\n    type: 'string_check';\n    /**\n     * The name of the grader.\n     */\n    name: string;\n    /**\n     * The input text. This may include template strings.\n     */\n    input: string;\n    /**\n     * The reference text. This may include template strings.\n     */\n    reference: string;\n    /**\n     * The string check operation to perform. One of `eq`, `ne`, `like`, or `ilike`.\n     */\n    operation: 'eq' | 'ne' | 'like' | 'ilike';\n};\n\n/**\n * TextSimilarityGrader\n *\n * A TextSimilarityGrader object which grades text based on similarity metrics.\n *\n */\nexport type GraderTextSimilarity = {\n    /**\n     * The type of grader.\n     */\n    type: 'text_similarity';\n    /**\n     * The name of the grader.\n     */\n    name: string;\n    /**\n     * The text being graded.\n     */\n    input: string;\n    /**\n     * The text being graded against.\n     */\n    reference: string;\n    /**\n     * The evaluation metric to use. One of `cosine`, `fuzzy_match`, `bleu`,\n     * `gleu`, `meteor`, `rouge_1`, `rouge_2`, `rouge_3`, `rouge_4`, `rouge_5`,\n     * or `rouge_l`.\n     *\n     */\n    evaluation_metric: 'cosine' | 'fuzzy_match' | 'bleu' | 'gleu' | 'meteor' | 'rouge_1' | 'rouge_2' | 'rouge_3' | 'rouge_4' | 'rouge_5' | 'rouge_l';\n};\n\n/**\n * Represents the content or the URL of an image generated by the OpenAI API.\n */\nexport type Image = {\n    /**\n     * The base64-encoded JSON of the generated image. Default value for `gpt-image-1`, and only present if `response_format` is set to `b64_json` for `dall-e-2` and `dall-e-3`.\n     */\n    b64_json?: string;\n    /**\n     * When using `dall-e-2` or `dall-e-3`, the URL of the generated image if `response_format` is set to `url` (default value). Unsupported for `gpt-image-1`.\n     */\n    url?: string;\n    /**\n     * For `dall-e-3` only, the revised prompt that was used to generate the image.\n     */\n    revised_prompt?: string;\n};\n\n/**\n * Emitted when image editing has completed and the final image is available.\n *\n */\nexport type ImageEditCompletedEvent = {\n    /**\n     * The type of the event. Always `image_edit.completed`.\n     *\n     */\n    type: 'image_edit.completed';\n    /**\n     * Base64-encoded final edited image data, suitable for rendering as an image.\n     *\n     */\n    b64_json: string;\n    /**\n     * The Unix timestamp when the event was created.\n     *\n     */\n    created_at: number;\n    /**\n     * The size of the edited image.\n     *\n     */\n    size: '1024x1024' | '1024x1536' | '1536x1024' | 'auto';\n    /**\n     * The quality setting for the edited image.\n     *\n     */\n    quality: 'low' | 'medium' | 'high' | 'auto';\n    /**\n     * The background setting for the edited image.\n     *\n     */\n    background: 'transparent' | 'opaque' | 'auto';\n    /**\n     * The output format for the edited image.\n     *\n     */\n    output_format: 'png' | 'webp' | 'jpeg';\n    usage: ImagesUsage;\n};\n\n/**\n * Emitted when a partial image is available during image editing streaming.\n *\n */\nexport type ImageEditPartialImageEvent = {\n    /**\n     * The type of the event. Always `image_edit.partial_image`.\n     *\n     */\n    type: 'image_edit.partial_image';\n    /**\n     * Base64-encoded partial image data, suitable for rendering as an image.\n     *\n     */\n    b64_json: string;\n    /**\n     * The Unix timestamp when the event was created.\n     *\n     */\n    created_at: number;\n    /**\n     * The size of the requested edited image.\n     *\n     */\n    size: '1024x1024' | '1024x1536' | '1536x1024' | 'auto';\n    /**\n     * The quality setting for the requested edited image.\n     *\n     */\n    quality: 'low' | 'medium' | 'high' | 'auto';\n    /**\n     * The background setting for the requested edited image.\n     *\n     */\n    background: 'transparent' | 'opaque' | 'auto';\n    /**\n     * The output format for the requested edited image.\n     *\n     */\n    output_format: 'png' | 'webp' | 'jpeg';\n    /**\n     * 0-based index for the partial image (streaming).\n     *\n     */\n    partial_image_index: number;\n};\n\nexport type ImageEditStreamEvent = ({\n    type?: 'ImageEditPartialImageEvent';\n} & ImageEditPartialImageEvent) | ({\n    type?: 'ImageEditCompletedEvent';\n} & ImageEditCompletedEvent);\n\n/**\n * Emitted when image generation has completed and the final image is available.\n *\n */\nexport type ImageGenCompletedEvent = {\n    /**\n     * The type of the event. Always `image_generation.completed`.\n     *\n     */\n    type: 'image_generation.completed';\n    /**\n     * Base64-encoded image data, suitable for rendering as an image.\n     *\n     */\n    b64_json: string;\n    /**\n     * The Unix timestamp when the event was created.\n     *\n     */\n    created_at: number;\n    /**\n     * The size of the generated image.\n     *\n     */\n    size: '1024x1024' | '1024x1536' | '1536x1024' | 'auto';\n    /**\n     * The quality setting for the generated image.\n     *\n     */\n    quality: 'low' | 'medium' | 'high' | 'auto';\n    /**\n     * The background setting for the generated image.\n     *\n     */\n    background: 'transparent' | 'opaque' | 'auto';\n    /**\n     * The output format for the generated image.\n     *\n     */\n    output_format: 'png' | 'webp' | 'jpeg';\n    usage: ImagesUsage;\n};\n\n/**\n * Emitted when a partial image is available during image generation streaming.\n *\n */\nexport type ImageGenPartialImageEvent = {\n    /**\n     * The type of the event. Always `image_generation.partial_image`.\n     *\n     */\n    type: 'image_generation.partial_image';\n    /**\n     * Base64-encoded partial image data, suitable for rendering as an image.\n     *\n     */\n    b64_json: string;\n    /**\n     * The Unix timestamp when the event was created.\n     *\n     */\n    created_at: number;\n    /**\n     * The size of the requested image.\n     *\n     */\n    size: '1024x1024' | '1024x1536' | '1536x1024' | 'auto';\n    /**\n     * The quality setting for the requested image.\n     *\n     */\n    quality: 'low' | 'medium' | 'high' | 'auto';\n    /**\n     * The background setting for the requested image.\n     *\n     */\n    background: 'transparent' | 'opaque' | 'auto';\n    /**\n     * The output format for the requested image.\n     *\n     */\n    output_format: 'png' | 'webp' | 'jpeg';\n    /**\n     * 0-based index for the partial image (streaming).\n     *\n     */\n    partial_image_index: number;\n};\n\nexport type ImageGenStreamEvent = ({\n    type?: 'ImageGenPartialImageEvent';\n} & ImageGenPartialImageEvent) | ({\n    type?: 'ImageGenCompletedEvent';\n} & ImageGenCompletedEvent);\n\n/**\n * Image generation tool\n *\n * A tool that generates images using a model like `gpt-image-1`.\n *\n */\nexport type ImageGenTool = {\n    /**\n     * The type of the image generation tool. Always `image_generation`.\n     *\n     */\n    type: 'image_generation';\n    /**\n     * The image generation model to use. Default: `gpt-image-1`.\n     *\n     */\n    model?: 'gpt-image-1';\n    /**\n     * The quality of the generated image. One of `low`, `medium`, `high`,\n     * or `auto`. Default: `auto`.\n     *\n     */\n    quality?: 'low' | 'medium' | 'high' | 'auto';\n    /**\n     * The size of the generated image. One of `1024x1024`, `1024x1536`,\n     * `1536x1024`, or `auto`. Default: `auto`.\n     *\n     */\n    size?: '1024x1024' | '1024x1536' | '1536x1024' | 'auto';\n    /**\n     * The output format of the generated image. One of `png`, `webp`, or\n     * `jpeg`. Default: `png`.\n     *\n     */\n    output_format?: 'png' | 'webp' | 'jpeg';\n    /**\n     * Compression level for the output image. Default: 100.\n     *\n     */\n    output_compression?: number;\n    /**\n     * Moderation level for the generated image. Default: `auto`.\n     *\n     */\n    moderation?: 'auto' | 'low';\n    /**\n     * Background type for the generated image. One of `transparent`,\n     * `opaque`, or `auto`. Default: `auto`.\n     *\n     */\n    background?: 'transparent' | 'opaque' | 'auto';\n    input_fidelity?: ImageInputFidelity;\n    /**\n     * Optional mask for inpainting. Contains `image_url`\n     * (string, optional) and `file_id` (string, optional).\n     *\n     */\n    input_image_mask?: {\n        /**\n         * Base64-encoded mask image.\n         *\n         */\n        image_url?: string;\n        /**\n         * File ID for the mask image.\n         *\n         */\n        file_id?: string;\n    };\n    /**\n     * Number of partial images to generate in streaming mode, from 0 (default value) to 3.\n     *\n     */\n    partial_images?: number;\n};\n\n/**\n * Image generation call\n *\n * An image generation request made by the model.\n *\n */\nexport type ImageGenToolCall = {\n    /**\n     * The type of the image generation call. Always `image_generation_call`.\n     *\n     */\n    type: 'image_generation_call';\n    /**\n     * The unique ID of the image generation call.\n     *\n     */\n    id: string;\n    /**\n     * The status of the image generation call.\n     *\n     */\n    status: 'in_progress' | 'completed' | 'generating' | 'failed';\n    /**\n     * The generated image encoded in base64.\n     *\n     */\n    result: string;\n};\n\n/**\n * Control how much effort the model will exert to match the style and features,\n * especially facial features, of input images. This parameter is only supported\n * for `gpt-image-1`. Supports `high` and `low`. Defaults to `low`.\n *\n */\nexport const ImageInputFidelity = { HIGH: 'high', LOW: 'low' } as const;\n\n/**\n * Control how much effort the model will exert to match the style and features,\n * especially facial features, of input images. This parameter is only supported\n * for `gpt-image-1`. Supports `high` and `low`. Defaults to `low`.\n *\n */\nexport type ImageInputFidelity = typeof ImageInputFidelity[keyof typeof ImageInputFidelity];\n\n/**\n * Image generation response\n *\n * The response from the image generation endpoint.\n */\nexport type ImagesResponse = {\n    /**\n     * The Unix timestamp (in seconds) of when the image was created.\n     */\n    created: number;\n    /**\n     * The list of generated images.\n     */\n    data?: Array<Image>;\n    /**\n     * The background parameter used for the image generation. Either `transparent` or `opaque`.\n     */\n    background?: 'transparent' | 'opaque';\n    /**\n     * The output format of the image generation. Either `png`, `webp`, or `jpeg`.\n     */\n    output_format?: 'png' | 'webp' | 'jpeg';\n    /**\n     * The size of the image generated. Either `1024x1024`, `1024x1536`, or `1536x1024`.\n     */\n    size?: '1024x1024' | '1024x1536' | '1536x1024';\n    /**\n     * The quality of the image generated. Either `low`, `medium`, or `high`.\n     */\n    quality?: 'low' | 'medium' | 'high';\n    usage?: ImageGenUsage;\n};\n\n/**\n * For `gpt-image-1` only, the token usage information for the image generation.\n *\n */\nexport type ImagesUsage = {\n    /**\n     * The total number of tokens (images and text) used for the image generation.\n     *\n     */\n    total_tokens: number;\n    /**\n     * The number of tokens (images and text) in the input prompt.\n     */\n    input_tokens: number;\n    /**\n     * The number of image tokens in the output image.\n     */\n    output_tokens: number;\n    /**\n     * The input tokens detailed information for the image generation.\n     */\n    input_tokens_details: {\n        /**\n         * The number of text tokens in the input prompt.\n         */\n        text_tokens: number;\n        /**\n         * The number of image tokens in the input prompt.\n         */\n        image_tokens: number;\n    };\n};\n\n/**\n * Specify additional output data to include in the model response. Currently\n * supported values are:\n * - `code_interpreter_call.outputs`: Includes the outputs of python code execution\n * in code interpreter tool call items.\n * - `computer_call_output.output.image_url`: Include image urls from the computer call output.\n * - `file_search_call.results`: Include the search results of\n * the file search tool call.\n * - `message.input_image.image_url`: Include image urls from the input message.\n * - `message.output_text.logprobs`: Include logprobs with assistant messages.\n * - `reasoning.encrypted_content`: Includes an encrypted version of reasoning\n * tokens in reasoning item outputs. This enables reasoning items to be used in\n * multi-turn conversations when using the Responses API statelessly (like\n * when the `store` parameter is set to `false`, or when an organization is\n * enrolled in the zero data retention program).\n *\n */\nexport const Includable = {\n    CODE_INTERPRETER_CALL_OUTPUTS: 'code_interpreter_call.outputs',\n    COMPUTER_CALL_OUTPUT_OUTPUT_IMAGE_URL: 'computer_call_output.output.image_url',\n    FILE_SEARCH_CALL_RESULTS: 'file_search_call.results',\n    MESSAGE_INPUT_IMAGE_IMAGE_URL: 'message.input_image.image_url',\n    MESSAGE_OUTPUT_TEXT_LOGPROBS: 'message.output_text.logprobs',\n    REASONING_ENCRYPTED_CONTENT: 'reasoning.encrypted_content'\n} as const;\n\n/**\n * Specify additional output data to include in the model response. Currently\n * supported values are:\n * - `code_interpreter_call.outputs`: Includes the outputs of python code execution\n * in code interpreter tool call items.\n * - `computer_call_output.output.image_url`: Include image urls from the computer call output.\n * - `file_search_call.results`: Include the search results of\n * the file search tool call.\n * - `message.input_image.image_url`: Include image urls from the input message.\n * - `message.output_text.logprobs`: Include logprobs with assistant messages.\n * - `reasoning.encrypted_content`: Includes an encrypted version of reasoning\n * tokens in reasoning item outputs. This enables reasoning items to be used in\n * multi-turn conversations when using the Responses API statelessly (like\n * when the `store` parameter is set to `false`, or when an organization is\n * enrolled in the zero data retention program).\n *\n */\nexport type Includable = typeof Includable[keyof typeof Includable];\n\n/**\n * Audio input\n *\n * An audio input to the model.\n *\n */\nexport type InputAudio = {\n    /**\n     * The type of the input item. Always `input_audio`.\n     *\n     */\n    type: 'input_audio';\n    /**\n     * Base64-encoded audio data.\n     *\n     */\n    data: string;\n    /**\n     * The format of the audio data. Currently supported formats are `mp3` and\n     * `wav`.\n     *\n     */\n    format: 'mp3' | 'wav';\n};\n\nexport type InputContent = ({\n    type?: 'InputTextContent';\n} & InputTextContent) | ({\n    type?: 'InputImageContent';\n} & InputImageContent) | ({\n    type?: 'InputFileContent';\n} & InputFileContent);\n\nexport type InputItem = ({\n    type?: 'EasyInputMessage';\n} & EasyInputMessage) | ({\n    type?: 'Item';\n} & Item) | ({\n    type?: 'ItemReferenceParam';\n} & ItemReferenceParam);\n\n/**\n * Input message\n *\n * A message input to the model with a role indicating instruction following\n * hierarchy. Instructions given with the `developer` or `system` role take\n * precedence over instructions given with the `user` role.\n *\n */\nexport type InputMessage = {\n    /**\n     * The type of the message input. Always set to `message`.\n     *\n     */\n    type?: 'message';\n    /**\n     * The role of the message input. One of `user`, `system`, or `developer`.\n     *\n     */\n    role: 'user' | 'system' | 'developer';\n    /**\n     * The status of item. One of `in_progress`, `completed`, or\n     * `incomplete`. Populated when items are returned via API.\n     *\n     */\n    status?: 'in_progress' | 'completed' | 'incomplete';\n    content: InputMessageContentList;\n};\n\n/**\n * Input item content list\n *\n * A list of one or many input items to the model, containing different content\n * types.\n *\n */\nexport type InputMessageContentList = Array<InputContent>;\n\nexport type InputMessageResource = InputMessage & {\n    /**\n     * The unique ID of the message input.\n     *\n     */\n    id: string;\n};\n\n/**\n * Represents an individual `invite` to the organization.\n */\nexport type Invite = {\n    /**\n     * The object type, which is always `organization.invite`\n     */\n    object: 'organization.invite';\n    /**\n     * The identifier, which can be referenced in API endpoints\n     */\n    id: string;\n    /**\n     * The email address of the individual to whom the invite was sent\n     */\n    email: string;\n    /**\n     * `owner` or `reader`\n     */\n    role: 'owner' | 'reader';\n    /**\n     * `accepted`,`expired`, or `pending`\n     */\n    status: 'accepted' | 'expired' | 'pending';\n    /**\n     * The Unix timestamp (in seconds) of when the invite was sent.\n     */\n    invited_at: number;\n    /**\n     * The Unix timestamp (in seconds) of when the invite expires.\n     */\n    expires_at: number;\n    /**\n     * The Unix timestamp (in seconds) of when the invite was accepted.\n     */\n    accepted_at?: number;\n    /**\n     * The projects that were granted membership upon acceptance of the invite.\n     */\n    projects?: Array<{\n        /**\n         * Project's public ID\n         */\n        id?: string;\n        /**\n         * Project membership role\n         */\n        role?: 'member' | 'owner';\n    }>;\n};\n\nexport type InviteDeleteResponse = {\n    /**\n     * The object type, which is always `organization.invite.deleted`\n     */\n    object: 'organization.invite.deleted';\n    id: string;\n    deleted: boolean;\n};\n\nexport type InviteListResponse = {\n    /**\n     * The object type, which is always `list`\n     */\n    object: 'list';\n    data: Array<Invite>;\n    /**\n     * The first `invite_id` in the retrieved `list`\n     */\n    first_id?: string;\n    /**\n     * The last `invite_id` in the retrieved `list`\n     */\n    last_id?: string;\n    /**\n     * The `has_more` property is used for pagination to indicate there are additional results.\n     */\n    has_more?: boolean;\n};\n\nexport type InviteRequest = {\n    /**\n     * Send an email to this address\n     */\n    email: string;\n    /**\n     * `owner` or `reader`\n     */\n    role: 'reader' | 'owner';\n    /**\n     * An array of projects to which membership is granted at the same time the org invite is accepted. If omitted, the user will be invited to the default project for compatibility with legacy behavior.\n     */\n    projects?: Array<{\n        /**\n         * Project's public ID\n         */\n        id: string;\n        /**\n         * Project membership role\n         */\n        role: 'member' | 'owner';\n    }>;\n};\n\n/**\n * Content item used to generate a response.\n *\n */\nexport type Item = ({\n    type?: 'InputMessage';\n} & InputMessage) | ({\n    type?: 'OutputMessage';\n} & OutputMessage) | ({\n    type?: 'FileSearchToolCall';\n} & FileSearchToolCall) | ({\n    type?: 'ComputerToolCall';\n} & ComputerToolCall) | ({\n    type?: 'ComputerCallOutputItemParam';\n} & ComputerCallOutputItemParam) | ({\n    type?: 'WebSearchToolCall';\n} & WebSearchToolCall) | ({\n    type?: 'FunctionToolCall';\n} & FunctionToolCall) | ({\n    type?: 'FunctionCallOutputItemParam';\n} & FunctionCallOutputItemParam) | ({\n    type?: 'ReasoningItem';\n} & ReasoningItem) | ({\n    type?: 'ImageGenToolCall';\n} & ImageGenToolCall) | ({\n    type?: 'CodeInterpreterToolCall';\n} & CodeInterpreterToolCall) | ({\n    type?: 'LocalShellToolCall';\n} & LocalShellToolCall) | ({\n    type?: 'LocalShellToolCallOutput';\n} & LocalShellToolCallOutput) | ({\n    type?: 'MCPListTools';\n} & McpListTools) | ({\n    type?: 'MCPApprovalRequest';\n} & McpApprovalRequest) | ({\n    type?: 'MCPApprovalResponse';\n} & McpApprovalResponse) | ({\n    type?: 'MCPToolCall';\n} & McpToolCall) | ({\n    type?: 'CustomToolCallOutput';\n} & CustomToolCallOutput) | ({\n    type?: 'CustomToolCall';\n} & CustomToolCall);\n\n/**\n * Content item used to generate a response.\n *\n */\nexport type ItemResource = ({\n    type?: 'InputMessageResource';\n} & InputMessageResource) | ({\n    type?: 'OutputMessage';\n} & OutputMessage) | ({\n    type?: 'FileSearchToolCall';\n} & FileSearchToolCall) | ({\n    type?: 'ComputerToolCall';\n} & ComputerToolCall) | ({\n    type?: 'ComputerToolCallOutputResource';\n} & ComputerToolCallOutputResource) | ({\n    type?: 'WebSearchToolCall';\n} & WebSearchToolCall) | ({\n    type?: 'FunctionToolCallResource';\n} & FunctionToolCallResource) | ({\n    type?: 'FunctionToolCallOutputResource';\n} & FunctionToolCallOutputResource) | ({\n    type?: 'ImageGenToolCall';\n} & ImageGenToolCall) | ({\n    type?: 'CodeInterpreterToolCall';\n} & CodeInterpreterToolCall) | ({\n    type?: 'LocalShellToolCall';\n} & LocalShellToolCall) | ({\n    type?: 'LocalShellToolCallOutput';\n} & LocalShellToolCallOutput) | ({\n    type?: 'MCPListTools';\n} & McpListTools) | ({\n    type?: 'MCPApprovalRequest';\n} & McpApprovalRequest) | ({\n    type?: 'MCPApprovalResponseResource';\n} & McpApprovalResponseResource) | ({\n    type?: 'MCPToolCall';\n} & McpToolCall);\n\n/**\n * KeyPress\n *\n * A collection of keypresses the model would like to perform.\n *\n */\nexport type KeyPress = {\n    /**\n     * Specifies the event type. For a keypress action, this property is\n     * always set to `keypress`.\n     *\n     */\n    type: 'keypress';\n    /**\n     * The combination of keys the model is requesting to be pressed. This is an\n     * array of strings, each representing a key.\n     *\n     */\n    keys: Array<string>;\n};\n\nexport type ListAssistantsResponse = {\n    object: string;\n    data: Array<AssistantObject>;\n    first_id: string;\n    last_id: string;\n    has_more: boolean;\n};\n\nexport type ListAuditLogsResponse = {\n    object: 'list';\n    data: Array<AuditLog>;\n    first_id: string;\n    last_id: string;\n    has_more: boolean;\n};\n\nexport type ListBatchesResponse = {\n    data: Array<Batch>;\n    first_id?: string;\n    last_id?: string;\n    has_more: boolean;\n    object: 'list';\n};\n\nexport type ListCertificatesResponse = {\n    data: Array<Certificate>;\n    first_id?: string;\n    last_id?: string;\n    has_more: boolean;\n    object: 'list';\n};\n\nexport type ListFilesResponse = {\n    object: string;\n    data: Array<OpenAiFile>;\n    first_id: string;\n    last_id: string;\n    has_more: boolean;\n};\n\nexport type ListFineTuningCheckpointPermissionResponse = {\n    data: Array<FineTuningCheckpointPermission>;\n    object: 'list';\n    first_id?: string;\n    last_id?: string;\n    has_more: boolean;\n};\n\nexport type ListFineTuningJobCheckpointsResponse = {\n    data: Array<FineTuningJobCheckpoint>;\n    object: 'list';\n    first_id?: string;\n    last_id?: string;\n    has_more: boolean;\n};\n\nexport type ListFineTuningJobEventsResponse = {\n    data: Array<FineTuningJobEvent>;\n    object: 'list';\n    has_more: boolean;\n};\n\nexport type ListMessagesResponse = {\n    object: string;\n    data: Array<MessageObject>;\n    first_id: string;\n    last_id: string;\n    has_more: boolean;\n};\n\nexport type ListModelsResponse = {\n    object: 'list';\n    data: Array<Model>;\n};\n\nexport type ListPaginatedFineTuningJobsResponse = {\n    data: Array<FineTuningJob>;\n    has_more: boolean;\n    object: 'list';\n};\n\nexport type ListRunStepsResponse = {\n    object: string;\n    data: Array<RunStepObject>;\n    first_id: string;\n    last_id: string;\n    has_more: boolean;\n};\n\nexport type ListRunsResponse = {\n    object: string;\n    data: Array<RunObject>;\n    first_id: string;\n    last_id: string;\n    has_more: boolean;\n};\n\nexport type ListVectorStoreFilesResponse = {\n    object: string;\n    data: Array<VectorStoreFileObject>;\n    first_id: string;\n    last_id: string;\n    has_more: boolean;\n};\n\nexport type ListVectorStoresResponse = {\n    object: string;\n    data: Array<VectorStoreObject>;\n    first_id: string;\n    last_id: string;\n    has_more: boolean;\n};\n\n/**\n * Local shell exec action\n *\n * Execute a shell command on the server.\n *\n */\nexport type LocalShellExecAction = {\n    /**\n     * The type of the local shell action. Always `exec`.\n     *\n     */\n    type: 'exec';\n    /**\n     * The command to run.\n     *\n     */\n    command: Array<string>;\n    /**\n     * Optional timeout in milliseconds for the command.\n     *\n     */\n    timeout_ms?: number;\n    /**\n     * Optional working directory to run the command in.\n     *\n     */\n    working_directory?: string;\n    /**\n     * Environment variables to set for the command.\n     *\n     */\n    env: {\n        [key: string]: string;\n    };\n    /**\n     * Optional user to run the command as.\n     *\n     */\n    user?: string;\n};\n\n/**\n * Local shell tool\n *\n * A tool that allows the model to execute shell commands in a local environment.\n *\n */\nexport type LocalShellTool = {\n    /**\n     * The type of the local shell tool. Always `local_shell`.\n     */\n    type: 'local_shell';\n};\n\n/**\n * Local shell call\n *\n * A tool call to run a command on the local shell.\n *\n */\nexport type LocalShellToolCall = {\n    /**\n     * The type of the local shell call. Always `local_shell_call`.\n     *\n     */\n    type: 'local_shell_call';\n    /**\n     * The unique ID of the local shell call.\n     *\n     */\n    id: string;\n    /**\n     * The unique ID of the local shell tool call generated by the model.\n     *\n     */\n    call_id: string;\n    action: LocalShellExecAction;\n    /**\n     * The status of the local shell call.\n     *\n     */\n    status: 'in_progress' | 'completed' | 'incomplete';\n};\n\n/**\n * Local shell call output\n *\n * The output of a local shell tool call.\n *\n */\nexport type LocalShellToolCallOutput = {\n    /**\n     * The type of the local shell tool call output. Always `local_shell_call_output`.\n     *\n     */\n    type: 'local_shell_call_output';\n    /**\n     * The unique ID of the local shell tool call generated by the model.\n     *\n     */\n    id: string;\n    /**\n     * A JSON string of the output of the local shell tool call.\n     *\n     */\n    output: string;\n    /**\n     * The status of the item. One of `in_progress`, `completed`, or `incomplete`.\n     *\n     */\n    status?: 'in_progress' | 'completed' | 'incomplete';\n};\n\n/**\n * A log probability object.\n *\n */\nexport type LogProbProperties = {\n    /**\n     * The token that was used to generate the log probability.\n     *\n     */\n    token: string;\n    /**\n     * The log probability of the token.\n     *\n     */\n    logprob: number;\n    /**\n     * The bytes that were used to generate the log probability.\n     *\n     */\n    bytes: Array<number>;\n};\n\n/**\n * MCP approval request\n *\n * A request for human approval of a tool invocation.\n *\n */\nexport type McpApprovalRequest = {\n    /**\n     * The type of the item. Always `mcp_approval_request`.\n     *\n     */\n    type: 'mcp_approval_request';\n    /**\n     * The unique ID of the approval request.\n     *\n     */\n    id: string;\n    /**\n     * The label of the MCP server making the request.\n     *\n     */\n    server_label: string;\n    /**\n     * The name of the tool to run.\n     *\n     */\n    name: string;\n    /**\n     * A JSON string of arguments for the tool.\n     *\n     */\n    arguments: string;\n};\n\n/**\n * MCP approval response\n *\n * A response to an MCP approval request.\n *\n */\nexport type McpApprovalResponse = {\n    /**\n     * The type of the item. Always `mcp_approval_response`.\n     *\n     */\n    type: 'mcp_approval_response';\n    /**\n     * The unique ID of the approval response\n     *\n     */\n    id?: string;\n    /**\n     * The ID of the approval request being answered.\n     *\n     */\n    approval_request_id: string;\n    /**\n     * Whether the request was approved.\n     *\n     */\n    approve: boolean;\n    /**\n     * Optional reason for the decision.\n     *\n     */\n    reason?: string;\n};\n\n/**\n * MCP approval response\n *\n * A response to an MCP approval request.\n *\n */\nexport type McpApprovalResponseResource = {\n    /**\n     * The type of the item. Always `mcp_approval_response`.\n     *\n     */\n    type: 'mcp_approval_response';\n    /**\n     * The unique ID of the approval response\n     *\n     */\n    id: string;\n    /**\n     * The ID of the approval request being answered.\n     *\n     */\n    approval_request_id: string;\n    /**\n     * Whether the request was approved.\n     *\n     */\n    approve: boolean;\n    /**\n     * Optional reason for the decision.\n     *\n     */\n    reason?: string;\n};\n\n/**\n * MCP list tools\n *\n * A list of tools available on an MCP server.\n *\n */\nexport type McpListTools = {\n    /**\n     * The type of the item. Always `mcp_list_tools`.\n     *\n     */\n    type: 'mcp_list_tools';\n    /**\n     * The unique ID of the list.\n     *\n     */\n    id: string;\n    /**\n     * The label of the MCP server.\n     *\n     */\n    server_label: string;\n    /**\n     * The tools available on the server.\n     *\n     */\n    tools: Array<McpListToolsTool>;\n    /**\n     * Error message if the server could not list tools.\n     *\n     */\n    error?: string;\n};\n\n/**\n * MCP list tools tool\n *\n * A tool available on an MCP server.\n *\n */\nexport type McpListToolsTool = {\n    /**\n     * The name of the tool.\n     *\n     */\n    name: string;\n    /**\n     * The description of the tool.\n     *\n     */\n    description?: string;\n    /**\n     * The JSON schema describing the tool's input.\n     *\n     */\n    input_schema: {\n        [key: string]: unknown;\n    };\n    /**\n     * Additional annotations about the tool.\n     *\n     */\n    annotations?: {\n        [key: string]: unknown;\n    };\n};\n\n/**\n * MCP tool\n *\n * Give the model access to additional tools via remote Model Context Protocol\n * (MCP) servers. [Learn more about MCP](https://platform.openai.com/docs/guides/tools-remote-mcp).\n *\n */\nexport type McpTool = {\n    /**\n     * The type of the MCP tool. Always `mcp`.\n     */\n    type: 'mcp';\n    /**\n     * A label for this MCP server, used to identify it in tool calls.\n     *\n     */\n    server_label: string;\n    /**\n     * The URL for the MCP server.\n     *\n     */\n    server_url: string;\n    /**\n     * Optional description of the MCP server, used to provide more context.\n     *\n     */\n    server_description?: string;\n    /**\n     * Optional HTTP headers to send to the MCP server. Use for authentication\n     * or other purposes.\n     *\n     */\n    headers?: {\n        [key: string]: string;\n    };\n    /**\n     * List of allowed tool names or a filter object.\n     *\n     */\n    allowed_tools?: Array<string> | {\n        /**\n         * MCP allowed tools\n         *\n         * List of allowed tool names.\n         */\n        tool_names?: Array<string>;\n    };\n    /**\n     * Specify which of the MCP server's tools require approval.\n     */\n    require_approval?: {\n        /**\n         * A list of tools that always require approval.\n         *\n         */\n        always?: {\n            /**\n             * List of tools that require approval.\n             */\n            tool_names?: Array<string>;\n        };\n        /**\n         * A list of tools that never require approval.\n         *\n         */\n        never?: {\n            /**\n             * List of tools that do not require approval.\n             */\n            tool_names?: Array<string>;\n        };\n    } | 'always' | 'never';\n};\n\n/**\n * MCP tool call\n *\n * An invocation of a tool on an MCP server.\n *\n */\nexport type McpToolCall = {\n    /**\n     * The type of the item. Always `mcp_call`.\n     *\n     */\n    type: 'mcp_call';\n    /**\n     * The unique ID of the tool call.\n     *\n     */\n    id: string;\n    /**\n     * The label of the MCP server running the tool.\n     *\n     */\n    server_label: string;\n    /**\n     * The name of the tool that was run.\n     *\n     */\n    name: string;\n    /**\n     * A JSON string of the arguments passed to the tool.\n     *\n     */\n    arguments: string;\n    /**\n     * The output from the tool call.\n     *\n     */\n    output?: string;\n    /**\n     * The error from the tool call, if any.\n     *\n     */\n    error?: string;\n};\n\n/**\n * Image file\n *\n * References an image [File](https://platform.openai.com/docs/api-reference/files) in the content of a message.\n */\nexport type MessageContentImageFileObject = {\n    /**\n     * Always `image_file`.\n     */\n    type: 'image_file';\n    image_file: {\n        /**\n         * The [File](https://platform.openai.com/docs/api-reference/files) ID of the image in the message content. Set `purpose=\"vision\"` when uploading the File if you need to later display the file content.\n         */\n        file_id: string;\n        /**\n         * Specifies the detail level of the image if specified by the user. `low` uses fewer tokens, you can opt in to high resolution using `high`.\n         */\n        detail?: 'auto' | 'low' | 'high';\n    };\n};\n\n/**\n * Image URL\n *\n * References an image URL in the content of a message.\n */\nexport type MessageContentImageUrlObject = {\n    /**\n     * The type of the content part.\n     */\n    type: 'image_url';\n    image_url: {\n        /**\n         * The external URL of the image, must be a supported image types: jpeg, jpg, png, gif, webp.\n         */\n        url: string;\n        /**\n         * Specifies the detail level of the image. `low` uses fewer tokens, you can opt in to high resolution using `high`. Default value is `auto`\n         */\n        detail?: 'auto' | 'low' | 'high';\n    };\n};\n\n/**\n * Refusal\n *\n * The refusal content generated by the assistant.\n */\nexport type MessageContentRefusalObject = {\n    /**\n     * Always `refusal`.\n     */\n    type: 'refusal';\n    refusal: string;\n};\n\n/**\n * File citation\n *\n * A citation within the message that points to a specific quote from a specific File associated with the assistant or the message. Generated when the assistant uses the \"file_search\" tool to search files.\n */\nexport type MessageContentTextAnnotationsFileCitationObject = {\n    /**\n     * Always `file_citation`.\n     */\n    type: 'file_citation';\n    /**\n     * The text in the message content that needs to be replaced.\n     */\n    text: string;\n    file_citation: {\n        /**\n         * The ID of the specific File the citation is from.\n         */\n        file_id: string;\n    };\n    start_index: number;\n    end_index: number;\n};\n\n/**\n * File path\n *\n * A URL for the file that's generated when the assistant used the `code_interpreter` tool to generate a file.\n */\nexport type MessageContentTextAnnotationsFilePathObject = {\n    /**\n     * Always `file_path`.\n     */\n    type: 'file_path';\n    /**\n     * The text in the message content that needs to be replaced.\n     */\n    text: string;\n    file_path: {\n        /**\n         * The ID of the file that was generated.\n         */\n        file_id: string;\n    };\n    start_index: number;\n    end_index: number;\n};\n\n/**\n * Text\n *\n * The text content that is part of a message.\n */\nexport type MessageContentTextObject = {\n    /**\n     * Always `text`.\n     */\n    type: 'text';\n    text: {\n        /**\n         * The data that makes up the text.\n         */\n        value: string;\n        annotations: Array<TextAnnotation>;\n    };\n};\n\n/**\n * Image file\n *\n * References an image [File](https://platform.openai.com/docs/api-reference/files) in the content of a message.\n */\nexport type MessageDeltaContentImageFileObject = {\n    /**\n     * The index of the content part in the message.\n     */\n    index: number;\n    /**\n     * Always `image_file`.\n     */\n    type: 'image_file';\n    image_file?: {\n        /**\n         * The [File](https://platform.openai.com/docs/api-reference/files) ID of the image in the message content. Set `purpose=\"vision\"` when uploading the File if you need to later display the file content.\n         */\n        file_id?: string;\n        /**\n         * Specifies the detail level of the image if specified by the user. `low` uses fewer tokens, you can opt in to high resolution using `high`.\n         */\n        detail?: 'auto' | 'low' | 'high';\n    };\n};\n\n/**\n * Image URL\n *\n * References an image URL in the content of a message.\n */\nexport type MessageDeltaContentImageUrlObject = {\n    /**\n     * The index of the content part in the message.\n     */\n    index: number;\n    /**\n     * Always `image_url`.\n     */\n    type: 'image_url';\n    image_url?: {\n        /**\n         * The URL of the image, must be a supported image types: jpeg, jpg, png, gif, webp.\n         */\n        url?: string;\n        /**\n         * Specifies the detail level of the image. `low` uses fewer tokens, you can opt in to high resolution using `high`.\n         */\n        detail?: 'auto' | 'low' | 'high';\n    };\n};\n\n/**\n * Refusal\n *\n * The refusal content that is part of a message.\n */\nexport type MessageDeltaContentRefusalObject = {\n    /**\n     * The index of the refusal part in the message.\n     */\n    index: number;\n    /**\n     * Always `refusal`.\n     */\n    type: 'refusal';\n    refusal?: string;\n};\n\n/**\n * File citation\n *\n * A citation within the message that points to a specific quote from a specific File associated with the assistant or the message. Generated when the assistant uses the \"file_search\" tool to search files.\n */\nexport type MessageDeltaContentTextAnnotationsFileCitationObject = {\n    /**\n     * The index of the annotation in the text content part.\n     */\n    index: number;\n    /**\n     * Always `file_citation`.\n     */\n    type: 'file_citation';\n    /**\n     * The text in the message content that needs to be replaced.\n     */\n    text?: string;\n    file_citation?: {\n        /**\n         * The ID of the specific File the citation is from.\n         */\n        file_id?: string;\n        /**\n         * The specific quote in the file.\n         */\n        quote?: string;\n    };\n    start_index?: number;\n    end_index?: number;\n};\n\n/**\n * File path\n *\n * A URL for the file that's generated when the assistant used the `code_interpreter` tool to generate a file.\n */\nexport type MessageDeltaContentTextAnnotationsFilePathObject = {\n    /**\n     * The index of the annotation in the text content part.\n     */\n    index: number;\n    /**\n     * Always `file_path`.\n     */\n    type: 'file_path';\n    /**\n     * The text in the message content that needs to be replaced.\n     */\n    text?: string;\n    file_path?: {\n        /**\n         * The ID of the file that was generated.\n         */\n        file_id?: string;\n    };\n    start_index?: number;\n    end_index?: number;\n};\n\n/**\n * Text\n *\n * The text content that is part of a message.\n */\nexport type MessageDeltaContentTextObject = {\n    /**\n     * The index of the content part in the message.\n     */\n    index: number;\n    /**\n     * Always `text`.\n     */\n    type: 'text';\n    text?: {\n        /**\n         * The data that makes up the text.\n         */\n        value?: string;\n        annotations?: Array<TextAnnotationDelta>;\n    };\n};\n\n/**\n * Message delta object\n *\n * Represents a message delta i.e. any changed fields on a message during streaming.\n *\n */\nexport type MessageDeltaObject = {\n    /**\n     * The identifier of the message, which can be referenced in API endpoints.\n     */\n    id: string;\n    /**\n     * The object type, which is always `thread.message.delta`.\n     */\n    object: 'thread.message.delta';\n    /**\n     * The delta containing the fields that have changed on the Message.\n     */\n    delta: {\n        /**\n         * The entity that produced the message. One of `user` or `assistant`.\n         */\n        role?: 'user' | 'assistant';\n        /**\n         * The content of the message in array of text and/or images.\n         */\n        content?: Array<MessageContentDelta>;\n    };\n};\n\n/**\n * The message object\n *\n * Represents a message within a [thread](https://platform.openai.com/docs/api-reference/threads).\n */\nexport type MessageObject = {\n    /**\n     * The identifier, which can be referenced in API endpoints.\n     */\n    id: string;\n    /**\n     * The object type, which is always `thread.message`.\n     */\n    object: 'thread.message';\n    /**\n     * The Unix timestamp (in seconds) for when the message was created.\n     */\n    created_at: number;\n    /**\n     * The [thread](https://platform.openai.com/docs/api-reference/threads) ID that this message belongs to.\n     */\n    thread_id: string;\n    /**\n     * The status of the message, which can be either `in_progress`, `incomplete`, or `completed`.\n     */\n    status: 'in_progress' | 'incomplete' | 'completed';\n    /**\n     * On an incomplete message, details about why the message is incomplete.\n     */\n    incomplete_details: {\n        /**\n         * The reason the message is incomplete.\n         */\n        reason: 'content_filter' | 'max_tokens' | 'run_cancelled' | 'run_expired' | 'run_failed';\n    };\n    /**\n     * The Unix timestamp (in seconds) for when the message was completed.\n     */\n    completed_at: number;\n    /**\n     * The Unix timestamp (in seconds) for when the message was marked as incomplete.\n     */\n    incomplete_at: number;\n    /**\n     * The entity that produced the message. One of `user` or `assistant`.\n     */\n    role: 'user' | 'assistant';\n    /**\n     * The content of the message in array of text and/or images.\n     */\n    content: Array<MessageContent>;\n    /**\n     * If applicable, the ID of the [assistant](https://platform.openai.com/docs/api-reference/assistants) that authored this message.\n     */\n    assistant_id: string;\n    /**\n     * The ID of the [run](https://platform.openai.com/docs/api-reference/runs) associated with the creation of this message. Value is `null` when messages are created manually using the create message or create thread endpoints.\n     */\n    run_id: string;\n    /**\n     * A list of files attached to the message, and the tools they were added to.\n     */\n    attachments: Array<{\n        /**\n         * The ID of the file to attach to the message.\n         */\n        file_id?: string;\n        /**\n         * The tools to add this file to.\n         */\n        tools?: Array<AssistantToolsCode | AssistantToolsFileSearchTypeOnly>;\n    }>;\n    metadata: Metadata;\n};\n\n/**\n * Text\n *\n * The text content that is part of a message.\n */\nexport type MessageRequestContentTextObject = {\n    /**\n     * Always `text`.\n     */\n    type: 'text';\n    /**\n     * Text content to be sent to the model\n     */\n    text: string;\n};\n\nexport type MessageStreamEvent = {\n    event: 'thread.message.created';\n    data: MessageObject;\n} | {\n    event: 'thread.message.in_progress';\n    data: MessageObject;\n} | {\n    event: 'thread.message.delta';\n    data: MessageDeltaObject;\n} | {\n    event: 'thread.message.completed';\n    data: MessageObject;\n} | {\n    event: 'thread.message.incomplete';\n    data: MessageObject;\n};\n\n/**\n * Set of 16 key-value pairs that can be attached to an object. This can be\n * useful for storing additional information about the object in a structured\n * format, and querying for objects via API or the dashboard.\n *\n * Keys are strings with a maximum length of 64 characters. Values are strings\n * with a maximum length of 512 characters.\n *\n */\nexport type Metadata = {\n    [key: string]: string;\n};\n\n/**\n * Model\n *\n * Describes an OpenAI model offering that can be used with the API.\n */\nexport type Model = {\n    /**\n     * The model identifier, which can be referenced in the API endpoints.\n     */\n    id: string;\n    /**\n     * The Unix timestamp (in seconds) when the model was created.\n     */\n    created: number;\n    /**\n     * The object type, which is always \"model\".\n     */\n    object: 'model';\n    /**\n     * The organization that owns the model.\n     */\n    owned_by: string;\n};\n\nexport type ModelIds = ModelIdsShared | ModelIdsResponses;\n\nexport type ModelIdsResponses = ModelIdsShared | 'o1-pro' | 'o1-pro-2025-03-19' | 'o3-pro' | 'o3-pro-2025-06-10' | 'o3-deep-research' | 'o3-deep-research-2025-06-26' | 'o4-mini-deep-research' | 'o4-mini-deep-research-2025-06-26' | 'computer-use-preview' | 'computer-use-preview-2025-03-11';\n\nexport type ModelIdsShared = string | ChatModel;\n\nexport type ModelResponseProperties = {\n    metadata?: Metadata;\n    /**\n     * An integer between 0 and 20 specifying the number of most likely tokens to\n     * return at each token position, each with an associated log probability.\n     *\n     */\n    top_logprobs?: number;\n    /**\n     * What sampling temperature to use, between 0 and 2. Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic.\n     * We generally recommend altering this or `top_p` but not both.\n     *\n     */\n    temperature?: number;\n    /**\n     * An alternative to sampling with temperature, called nucleus sampling,\n     * where the model considers the results of the tokens with top_p probability\n     * mass. So 0.1 means only the tokens comprising the top 10% probability mass\n     * are considered.\n     *\n     * We generally recommend altering this or `temperature` but not both.\n     *\n     */\n    top_p?: number;\n    /**\n     * This field is being replaced by `safety_identifier` and `prompt_cache_key`. Use `prompt_cache_key` instead to maintain caching optimizations.\n     * A stable identifier for your end-users.\n     * Used to boost cache hit rates by better bucketing similar requests and  to help OpenAI detect and prevent abuse. [Learn more](https://platform.openai.com/docs/guides/safety-best-practices#safety-identifiers).\n     *\n     *\n     * @deprecated\n     */\n    user?: string;\n    /**\n     * A stable identifier used to help detect users of your application that may be violating OpenAI's usage policies.\n     * The IDs should be a string that uniquely identifies each user. We recommend hashing their username or email address, in order to avoid sending us any identifying information. [Learn more](https://platform.openai.com/docs/guides/safety-best-practices#safety-identifiers).\n     *\n     */\n    safety_identifier?: string;\n    /**\n     * Used by OpenAI to cache responses for similar requests to optimize your cache hit rates. Replaces the `user` field. [Learn more](https://platform.openai.com/docs/guides/prompt-caching).\n     *\n     */\n    prompt_cache_key?: string;\n    service_tier?: ServiceTier;\n};\n\nexport type ModifyAssistantRequest = {\n    /**\n     * ID of the model to use. You can use the [List models](https://platform.openai.com/docs/api-reference/models/list) API to see all of your available models, or see our [Model overview](https://platform.openai.com/docs/models) for descriptions of them.\n     *\n     */\n    model?: string | AssistantSupportedModels;\n    reasoning_effort?: ReasoningEffort;\n    /**\n     * The name of the assistant. The maximum length is 256 characters.\n     *\n     */\n    name?: string;\n    /**\n     * The description of the assistant. The maximum length is 512 characters.\n     *\n     */\n    description?: string;\n    /**\n     * The system instructions that the assistant uses. The maximum length is 256,000 characters.\n     *\n     */\n    instructions?: string;\n    /**\n     * A list of tool enabled on the assistant. There can be a maximum of 128 tools per assistant. Tools can be of types `code_interpreter`, `file_search`, or `function`.\n     *\n     */\n    tools?: Array<AssistantTool>;\n    /**\n     * A set of resources that are used by the assistant's tools. The resources are specific to the type of tool. For example, the `code_interpreter` tool requires a list of file IDs, while the `file_search` tool requires a list of vector store IDs.\n     *\n     */\n    tool_resources?: {\n        code_interpreter?: {\n            /**\n             * Overrides the list of [file](https://platform.openai.com/docs/api-reference/files) IDs made available to the `code_interpreter` tool. There can be a maximum of 20 files associated with the tool.\n             *\n             */\n            file_ids?: Array<string>;\n        };\n        file_search?: {\n            /**\n             * Overrides the [vector store](https://platform.openai.com/docs/api-reference/vector-stores/object) attached to this assistant. There can be a maximum of 1 vector store attached to the assistant.\n             *\n             */\n            vector_store_ids?: Array<string>;\n        };\n    };\n    metadata?: Metadata;\n    /**\n     * What sampling temperature to use, between 0 and 2. Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic.\n     *\n     */\n    temperature?: number;\n    /**\n     * An alternative to sampling with temperature, called nucleus sampling, where the model considers the results of the tokens with top_p probability mass. So 0.1 means only the tokens comprising the top 10% probability mass are considered.\n     *\n     * We generally recommend altering this or temperature but not both.\n     *\n     */\n    top_p?: number;\n    response_format?: AssistantsApiResponseFormatOption;\n};\n\nexport type ModifyCertificateRequest = {\n    /**\n     * The updated name for the certificate\n     */\n    name: string;\n};\n\nexport type ModifyMessageRequest = {\n    metadata?: Metadata;\n};\n\nexport type ModifyRunRequest = {\n    metadata?: Metadata;\n};\n\nexport type ModifyThreadRequest = {\n    /**\n     * A set of resources that are made available to the assistant's tools in this thread. The resources are specific to the type of tool. For example, the `code_interpreter` tool requires a list of file IDs, while the `file_search` tool requires a list of vector store IDs.\n     *\n     */\n    tool_resources?: {\n        code_interpreter?: {\n            /**\n             * A list of [file](https://platform.openai.com/docs/api-reference/files) IDs made available to the `code_interpreter` tool. There can be a maximum of 20 files associated with the tool.\n             *\n             */\n            file_ids?: Array<string>;\n        };\n        file_search?: {\n            /**\n             * The [vector store](https://platform.openai.com/docs/api-reference/vector-stores/object) attached to this thread. There can be a maximum of 1 vector store attached to the thread.\n             *\n             */\n            vector_store_ids?: Array<string>;\n        };\n    };\n    metadata?: Metadata;\n};\n\n/**\n * Move\n *\n * A mouse move action.\n *\n */\nexport type Move = {\n    /**\n     * Specifies the event type. For a move action, this property is\n     * always set to `move`.\n     *\n     */\n    type: 'move';\n    /**\n     * The x-coordinate to move to.\n     *\n     */\n    x: number;\n    /**\n     * The y-coordinate to move to.\n     *\n     */\n    y: number;\n};\n\n/**\n * OpenAIFile\n *\n * The `File` object represents a document that has been uploaded to OpenAI.\n */\nexport type OpenAiFile = {\n    /**\n     * The file identifier, which can be referenced in the API endpoints.\n     */\n    id: string;\n    /**\n     * The size of the file, in bytes.\n     */\n    bytes: number;\n    /**\n     * The Unix timestamp (in seconds) for when the file was created.\n     */\n    created_at: number;\n    /**\n     * The Unix timestamp (in seconds) for when the file will expire.\n     */\n    expires_at?: number;\n    /**\n     * The name of the file.\n     */\n    filename: string;\n    /**\n     * The object type, which is always `file`.\n     */\n    object: 'file';\n    /**\n     * The intended purpose of the file. Supported values are `assistants`, `assistants_output`, `batch`, `batch_output`, `fine-tune`, `fine-tune-results`, `vision`, and `user_data`.\n     */\n    purpose: 'assistants' | 'assistants_output' | 'batch' | 'batch_output' | 'fine-tune' | 'fine-tune-results' | 'vision' | 'user_data';\n    /**\n     * Deprecated. The current status of the file, which can be either `uploaded`, `processed`, or `error`.\n     *\n     * @deprecated\n     */\n    status: 'uploaded' | 'processed' | 'error';\n    /**\n     * Deprecated. For details on why a fine-tuning training file failed validation, see the `error` field on `fine_tuning.job`.\n     *\n     * @deprecated\n     */\n    status_details?: string;\n};\n\n/**\n * Other Chunking Strategy\n *\n * This is returned when the chunking strategy is unknown. Typically, this is because the file was indexed before the `chunking_strategy` concept was introduced in the API.\n */\nexport type OtherChunkingStrategyResponseParam = {\n    /**\n     * Always `other`.\n     */\n    type: 'other';\n};\n\n/**\n * Output audio\n *\n * An audio output from the model.\n *\n */\nexport type OutputAudio = {\n    /**\n     * The type of the output audio. Always `output_audio`.\n     *\n     */\n    type: 'output_audio';\n    /**\n     * Base64-encoded audio data from the model.\n     *\n     */\n    data: string;\n    /**\n     * The transcript of the audio data from the model.\n     *\n     */\n    transcript: string;\n};\n\nexport type OutputContent = ({\n    type?: 'OutputTextContent';\n} & OutputTextContent) | ({\n    type?: 'RefusalContent';\n} & RefusalContent);\n\nexport type OutputItem = ({\n    type?: 'OutputMessage';\n} & OutputMessage) | ({\n    type?: 'FileSearchToolCall';\n} & FileSearchToolCall) | ({\n    type?: 'FunctionToolCall';\n} & FunctionToolCall) | ({\n    type?: 'WebSearchToolCall';\n} & WebSearchToolCall) | ({\n    type?: 'ComputerToolCall';\n} & ComputerToolCall) | ({\n    type?: 'ReasoningItem';\n} & ReasoningItem) | ({\n    type?: 'ImageGenToolCall';\n} & ImageGenToolCall) | ({\n    type?: 'CodeInterpreterToolCall';\n} & CodeInterpreterToolCall) | ({\n    type?: 'LocalShellToolCall';\n} & LocalShellToolCall) | ({\n    type?: 'MCPToolCall';\n} & McpToolCall) | ({\n    type?: 'MCPListTools';\n} & McpListTools) | ({\n    type?: 'MCPApprovalRequest';\n} & McpApprovalRequest) | ({\n    type?: 'CustomToolCall';\n} & CustomToolCall);\n\n/**\n * Output message\n *\n * An output message from the model.\n *\n */\nexport type OutputMessage = {\n    /**\n     * The unique ID of the output message.\n     *\n     */\n    id: string;\n    /**\n     * The type of the output message. Always `message`.\n     *\n     */\n    type: 'message';\n    /**\n     * The role of the output message. Always `assistant`.\n     *\n     */\n    role: 'assistant';\n    /**\n     * The content of the output message.\n     *\n     */\n    content: Array<OutputContent>;\n    /**\n     * The status of the message input. One of `in_progress`, `completed`, or\n     * `incomplete`. Populated when input items are returned via API.\n     *\n     */\n    status: 'in_progress' | 'completed' | 'incomplete';\n};\n\n/**\n * Whether to enable [parallel function calling](https://platform.openai.com/docs/guides/function-calling#configuring-parallel-function-calling) during tool use.\n */\nexport type ParallelToolCalls = boolean;\n\n/**\n * The number of partial images to generate. This parameter is used for\n * streaming responses that return partial images. Value must be between 0 and 3.\n * When set to 0, the response will be a single image sent in one streaming event.\n *\n * Note that the final image may be sent before the full number of partial images\n * are generated if the full image is generated more quickly.\n *\n */\nexport type PartialImages = number;\n\n/**\n * Static Content\n *\n * Static predicted output content, such as the content of a text file that is\n * being regenerated.\n *\n */\nexport type PredictionContent = {\n    /**\n     * The type of the predicted content you want to provide. This type is\n     * currently always `content`.\n     *\n     */\n    type: 'content';\n    /**\n     * The content that should be matched when generating a model response.\n     * If generated tokens would match this content, the entire model response\n     * can be returned much more quickly.\n     *\n     */\n    content: string | Array<ChatCompletionRequestMessageContentPartText>;\n};\n\n/**\n * Represents an individual project.\n */\nexport type Project = {\n    /**\n     * The identifier, which can be referenced in API endpoints\n     */\n    id: string;\n    /**\n     * The object type, which is always `organization.project`\n     */\n    object: 'organization.project';\n    /**\n     * The name of the project. This appears in reporting.\n     */\n    name: string;\n    /**\n     * The Unix timestamp (in seconds) of when the project was created.\n     */\n    created_at: number;\n    /**\n     * The Unix timestamp (in seconds) of when the project was archived or `null`.\n     */\n    archived_at?: number;\n    /**\n     * `active` or `archived`\n     */\n    status: 'active' | 'archived';\n};\n\n/**\n * Represents an individual API key in a project.\n */\nexport type ProjectApiKey = {\n    /**\n     * The object type, which is always `organization.project.api_key`\n     */\n    object: 'organization.project.api_key';\n    /**\n     * The redacted value of the API key\n     */\n    redacted_value: string;\n    /**\n     * The name of the API key\n     */\n    name: string;\n    /**\n     * The Unix timestamp (in seconds) of when the API key was created\n     */\n    created_at: number;\n    /**\n     * The Unix timestamp (in seconds) of when the API key was last used.\n     */\n    last_used_at: number;\n    /**\n     * The identifier, which can be referenced in API endpoints\n     */\n    id: string;\n    owner: {\n        /**\n         * `user` or `service_account`\n         */\n        type?: 'user' | 'service_account';\n        user?: ProjectUser;\n        service_account?: ProjectServiceAccount;\n    };\n};\n\nexport type ProjectApiKeyDeleteResponse = {\n    object: 'organization.project.api_key.deleted';\n    id: string;\n    deleted: boolean;\n};\n\nexport type ProjectApiKeyListResponse = {\n    object: 'list';\n    data: Array<ProjectApiKey>;\n    first_id: string;\n    last_id: string;\n    has_more: boolean;\n};\n\nexport type ProjectCreateRequest = {\n    /**\n     * The friendly name of the project, this name appears in reports.\n     */\n    name: string;\n};\n\nexport type ProjectListResponse = {\n    object: 'list';\n    data: Array<Project>;\n    first_id: string;\n    last_id: string;\n    has_more: boolean;\n};\n\n/**\n * Represents a project rate limit config.\n */\nexport type ProjectRateLimit = {\n    /**\n     * The object type, which is always `project.rate_limit`\n     */\n    object: 'project.rate_limit';\n    /**\n     * The identifier, which can be referenced in API endpoints.\n     */\n    id: string;\n    /**\n     * The model this rate limit applies to.\n     */\n    model: string;\n    /**\n     * The maximum requests per minute.\n     */\n    max_requests_per_1_minute: number;\n    /**\n     * The maximum tokens per minute.\n     */\n    max_tokens_per_1_minute: number;\n    /**\n     * The maximum images per minute. Only present for relevant models.\n     */\n    max_images_per_1_minute?: number;\n    /**\n     * The maximum audio megabytes per minute. Only present for relevant models.\n     */\n    max_audio_megabytes_per_1_minute?: number;\n    /**\n     * The maximum requests per day. Only present for relevant models.\n     */\n    max_requests_per_1_day?: number;\n    /**\n     * The maximum batch input tokens per day. Only present for relevant models.\n     */\n    batch_1_day_max_input_tokens?: number;\n};\n\nexport type ProjectRateLimitListResponse = {\n    object: 'list';\n    data: Array<ProjectRateLimit>;\n    first_id: string;\n    last_id: string;\n    has_more: boolean;\n};\n\nexport type ProjectRateLimitUpdateRequest = {\n    /**\n     * The maximum requests per minute.\n     */\n    max_requests_per_1_minute?: number;\n    /**\n     * The maximum tokens per minute.\n     */\n    max_tokens_per_1_minute?: number;\n    /**\n     * The maximum images per minute. Only relevant for certain models.\n     */\n    max_images_per_1_minute?: number;\n    /**\n     * The maximum audio megabytes per minute. Only relevant for certain models.\n     */\n    max_audio_megabytes_per_1_minute?: number;\n    /**\n     * The maximum requests per day. Only relevant for certain models.\n     */\n    max_requests_per_1_day?: number;\n    /**\n     * The maximum batch input tokens per day. Only relevant for certain models.\n     */\n    batch_1_day_max_input_tokens?: number;\n};\n\n/**\n * Represents an individual service account in a project.\n */\nexport type ProjectServiceAccount = {\n    /**\n     * The object type, which is always `organization.project.service_account`\n     */\n    object: 'organization.project.service_account';\n    /**\n     * The identifier, which can be referenced in API endpoints\n     */\n    id: string;\n    /**\n     * The name of the service account\n     */\n    name: string;\n    /**\n     * `owner` or `member`\n     */\n    role: 'owner' | 'member';\n    /**\n     * The Unix timestamp (in seconds) of when the service account was created\n     */\n    created_at: number;\n};\n\nexport type ProjectServiceAccountApiKey = {\n    /**\n     * The object type, which is always `organization.project.service_account.api_key`\n     */\n    object: 'organization.project.service_account.api_key';\n    value: string;\n    name: string;\n    created_at: number;\n    id: string;\n};\n\nexport type ProjectServiceAccountCreateRequest = {\n    /**\n     * The name of the service account being created.\n     */\n    name: string;\n};\n\nexport type ProjectServiceAccountCreateResponse = {\n    object: 'organization.project.service_account';\n    id: string;\n    name: string;\n    /**\n     * Service accounts can only have one role of type `member`\n     */\n    role: 'member';\n    created_at: number;\n    api_key: ProjectServiceAccountApiKey;\n};\n\nexport type ProjectServiceAccountDeleteResponse = {\n    object: 'organization.project.service_account.deleted';\n    id: string;\n    deleted: boolean;\n};\n\nexport type ProjectServiceAccountListResponse = {\n    object: 'list';\n    data: Array<ProjectServiceAccount>;\n    first_id: string;\n    last_id: string;\n    has_more: boolean;\n};\n\nexport type ProjectUpdateRequest = {\n    /**\n     * The updated name of the project, this name appears in reports.\n     */\n    name: string;\n};\n\n/**\n * Represents an individual user in a project.\n */\nexport type ProjectUser = {\n    /**\n     * The object type, which is always `organization.project.user`\n     */\n    object: 'organization.project.user';\n    /**\n     * The identifier, which can be referenced in API endpoints\n     */\n    id: string;\n    /**\n     * The name of the user\n     */\n    name: string;\n    /**\n     * The email address of the user\n     */\n    email: string;\n    /**\n     * `owner` or `member`\n     */\n    role: 'owner' | 'member';\n    /**\n     * The Unix timestamp (in seconds) of when the project was added.\n     */\n    added_at: number;\n};\n\nexport type ProjectUserCreateRequest = {\n    /**\n     * The ID of the user.\n     */\n    user_id: string;\n    /**\n     * `owner` or `member`\n     */\n    role: 'owner' | 'member';\n};\n\nexport type ProjectUserDeleteResponse = {\n    object: 'organization.project.user.deleted';\n    id: string;\n    deleted: boolean;\n};\n\nexport type ProjectUserListResponse = {\n    object: string;\n    data: Array<ProjectUser>;\n    first_id: string;\n    last_id: string;\n    has_more: boolean;\n};\n\nexport type ProjectUserUpdateRequest = {\n    /**\n     * `owner` or `member`\n     */\n    role: 'owner' | 'member';\n};\n\n/**\n * Reference to a prompt template and its variables.\n * [Learn more](https://platform.openai.com/docs/guides/text?api-mode=responses#reusable-prompts).\n *\n */\nexport type Prompt = {\n    /**\n     * The unique identifier of the prompt template to use.\n     */\n    id: string;\n    /**\n     * Optional version of the prompt template.\n     */\n    version?: string;\n    variables?: ResponsePromptVariables;\n};\n\n/**\n * A realtime client event.\n *\n */\nexport type RealtimeClientEvent = ({\n    type?: 'RealtimeClientEventConversationItemCreate';\n} & RealtimeClientEventConversationItemCreate) | ({\n    type?: 'RealtimeClientEventConversationItemDelete';\n} & RealtimeClientEventConversationItemDelete) | ({\n    type?: 'RealtimeClientEventConversationItemRetrieve';\n} & RealtimeClientEventConversationItemRetrieve) | ({\n    type?: 'RealtimeClientEventConversationItemTruncate';\n} & RealtimeClientEventConversationItemTruncate) | ({\n    type?: 'RealtimeClientEventInputAudioBufferAppend';\n} & RealtimeClientEventInputAudioBufferAppend) | ({\n    type?: 'RealtimeClientEventInputAudioBufferClear';\n} & RealtimeClientEventInputAudioBufferClear) | ({\n    type?: 'RealtimeClientEventOutputAudioBufferClear';\n} & RealtimeClientEventOutputAudioBufferClear) | ({\n    type?: 'RealtimeClientEventInputAudioBufferCommit';\n} & RealtimeClientEventInputAudioBufferCommit) | ({\n    type?: 'RealtimeClientEventResponseCancel';\n} & RealtimeClientEventResponseCancel) | ({\n    type?: 'RealtimeClientEventResponseCreate';\n} & RealtimeClientEventResponseCreate) | ({\n    type?: 'RealtimeClientEventSessionUpdate';\n} & RealtimeClientEventSessionUpdate) | ({\n    type?: 'RealtimeClientEventTranscriptionSessionUpdate';\n} & RealtimeClientEventTranscriptionSessionUpdate);\n\n/**\n * Add a new Item to the Conversation's context, including messages, function\n * calls, and function call responses. This event can be used both to populate a\n * \"history\" of the conversation and to add new items mid-stream, but has the\n * current limitation that it cannot populate assistant audio messages.\n *\n * If successful, the server will respond with a `conversation.item.created`\n * event, otherwise an `error` event will be sent.\n *\n */\nexport type RealtimeClientEventConversationItemCreate = {\n    /**\n     * Optional client-generated ID used to identify this event.\n     */\n    event_id?: string;\n    /**\n     * The event type, must be `conversation.item.create`.\n     */\n    type: 'conversation.item.create';\n    /**\n     * The ID of the preceding item after which the new item will be inserted.\n     * If not set, the new item will be appended to the end of the conversation.\n     * If set to `root`, the new item will be added to the beginning of the conversation.\n     * If set to an existing ID, it allows an item to be inserted mid-conversation. If the\n     * ID cannot be found, an error will be returned and the item will not be added.\n     *\n     */\n    previous_item_id?: string;\n    item: RealtimeConversationItem;\n};\n\n/**\n * Send this event when you want to remove any item from the conversation\n * history. The server will respond with a `conversation.item.deleted` event,\n * unless the item does not exist in the conversation history, in which case the\n * server will respond with an error.\n *\n */\nexport type RealtimeClientEventConversationItemDelete = {\n    /**\n     * Optional client-generated ID used to identify this event.\n     */\n    event_id?: string;\n    /**\n     * The event type, must be `conversation.item.delete`.\n     */\n    type: 'conversation.item.delete';\n    /**\n     * The ID of the item to delete.\n     */\n    item_id: string;\n};\n\n/**\n * Send this event when you want to retrieve the server's representation of a specific item in the conversation history. This is useful, for example, to inspect user audio after noise cancellation and VAD.\n * The server will respond with a `conversation.item.retrieved` event,\n * unless the item does not exist in the conversation history, in which case the\n * server will respond with an error.\n *\n */\nexport type RealtimeClientEventConversationItemRetrieve = {\n    /**\n     * Optional client-generated ID used to identify this event.\n     */\n    event_id?: string;\n    /**\n     * The event type, must be `conversation.item.retrieve`.\n     */\n    type: 'conversation.item.retrieve';\n    /**\n     * The ID of the item to retrieve.\n     */\n    item_id: string;\n};\n\n/**\n * Send this event to truncate a previous assistant message’s audio. The server\n * will produce audio faster than realtime, so this event is useful when the user\n * interrupts to truncate audio that has already been sent to the client but not\n * yet played. This will synchronize the server's understanding of the audio with\n * the client's playback.\n *\n * Truncating audio will delete the server-side text transcript to ensure there\n * is not text in the context that hasn't been heard by the user.\n *\n * If successful, the server will respond with a `conversation.item.truncated`\n * event.\n *\n */\nexport type RealtimeClientEventConversationItemTruncate = {\n    /**\n     * Optional client-generated ID used to identify this event.\n     */\n    event_id?: string;\n    /**\n     * The event type, must be `conversation.item.truncate`.\n     */\n    type: 'conversation.item.truncate';\n    /**\n     * The ID of the assistant message item to truncate. Only assistant message\n     * items can be truncated.\n     *\n     */\n    item_id: string;\n    /**\n     * The index of the content part to truncate. Set this to 0.\n     */\n    content_index: number;\n    /**\n     * Inclusive duration up to which audio is truncated, in milliseconds. If\n     * the audio_end_ms is greater than the actual audio duration, the server\n     * will respond with an error.\n     *\n     */\n    audio_end_ms: number;\n};\n\n/**\n * Send this event to append audio bytes to the input audio buffer. The audio\n * buffer is temporary storage you can write to and later commit. In Server VAD\n * mode, the audio buffer is used to detect speech and the server will decide\n * when to commit. When Server VAD is disabled, you must commit the audio buffer\n * manually.\n *\n * The client may choose how much audio to place in each event up to a maximum\n * of 15 MiB, for example streaming smaller chunks from the client may allow the\n * VAD to be more responsive. Unlike made other client events, the server will\n * not send a confirmation response to this event.\n *\n */\nexport type RealtimeClientEventInputAudioBufferAppend = {\n    /**\n     * Optional client-generated ID used to identify this event.\n     */\n    event_id?: string;\n    /**\n     * The event type, must be `input_audio_buffer.append`.\n     */\n    type: 'input_audio_buffer.append';\n    /**\n     * Base64-encoded audio bytes. This must be in the format specified by the\n     * `input_audio_format` field in the session configuration.\n     *\n     */\n    audio: string;\n};\n\n/**\n * Send this event to clear the audio bytes in the buffer. The server will\n * respond with an `input_audio_buffer.cleared` event.\n *\n */\nexport type RealtimeClientEventInputAudioBufferClear = {\n    /**\n     * Optional client-generated ID used to identify this event.\n     */\n    event_id?: string;\n    /**\n     * The event type, must be `input_audio_buffer.clear`.\n     */\n    type: 'input_audio_buffer.clear';\n};\n\n/**\n * Send this event to commit the user input audio buffer, which will create a\n * new user message item in the conversation. This event will produce an error\n * if the input audio buffer is empty. When in Server VAD mode, the client does\n * not need to send this event, the server will commit the audio buffer\n * automatically.\n *\n * Committing the input audio buffer will trigger input audio transcription\n * (if enabled in session configuration), but it will not create a response\n * from the model. The server will respond with an `input_audio_buffer.committed`\n * event.\n *\n */\nexport type RealtimeClientEventInputAudioBufferCommit = {\n    /**\n     * Optional client-generated ID used to identify this event.\n     */\n    event_id?: string;\n    /**\n     * The event type, must be `input_audio_buffer.commit`.\n     */\n    type: 'input_audio_buffer.commit';\n};\n\n/**\n * **WebRTC Only:** Emit to cut off the current audio response. This will trigger the server to\n * stop generating audio and emit a `output_audio_buffer.cleared` event. This\n * event should be preceded by a `response.cancel` client event to stop the\n * generation of the current response.\n * [Learn more](https://platform.openai.com/docs/guides/realtime-conversations#client-and-server-events-for-audio-in-webrtc).\n *\n */\nexport type RealtimeClientEventOutputAudioBufferClear = {\n    /**\n     * The unique ID of the client event used for error handling.\n     */\n    event_id?: string;\n    /**\n     * The event type, must be `output_audio_buffer.clear`.\n     */\n    type: 'output_audio_buffer.clear';\n};\n\n/**\n * Send this event to cancel an in-progress response. The server will respond\n * with a `response.done` event with a status of `response.status=cancelled`. If\n * there is no response to cancel, the server will respond with an error.\n *\n */\nexport type RealtimeClientEventResponseCancel = {\n    /**\n     * Optional client-generated ID used to identify this event.\n     */\n    event_id?: string;\n    /**\n     * The event type, must be `response.cancel`.\n     */\n    type: 'response.cancel';\n    /**\n     * A specific response ID to cancel - if not provided, will cancel an\n     * in-progress response in the default conversation.\n     *\n     */\n    response_id?: string;\n};\n\n/**\n * This event instructs the server to create a Response, which means triggering\n * model inference. When in Server VAD mode, the server will create Responses\n * automatically.\n *\n * A Response will include at least one Item, and may have two, in which case\n * the second will be a function call. These Items will be appended to the\n * conversation history.\n *\n * The server will respond with a `response.created` event, events for Items\n * and content created, and finally a `response.done` event to indicate the\n * Response is complete.\n *\n * The `response.create` event includes inference configuration like\n * `instructions`, and `temperature`. These fields will override the Session's\n * configuration for this Response only.\n *\n */\nexport type RealtimeClientEventResponseCreate = {\n    /**\n     * Optional client-generated ID used to identify this event.\n     */\n    event_id?: string;\n    /**\n     * The event type, must be `response.create`.\n     */\n    type: 'response.create';\n    response?: RealtimeResponseCreateParams;\n};\n\n/**\n * Send this event to update the session’s default configuration.\n * The client may send this event at any time to update any field,\n * except for `voice`. However, note that once a session has been\n * initialized with a particular `model`, it can’t be changed to\n * another model using `session.update`.\n *\n * When the server receives a `session.update`, it will respond\n * with a `session.updated` event showing the full, effective configuration.\n * Only the fields that are present are updated. To clear a field like\n * `instructions`, pass an empty string.\n *\n */\nexport type RealtimeClientEventSessionUpdate = {\n    /**\n     * Optional client-generated ID used to identify this event.\n     */\n    event_id?: string;\n    /**\n     * The event type, must be `session.update`.\n     */\n    type: 'session.update';\n    session: RealtimeSessionCreateRequest;\n};\n\n/**\n * Send this event to update a transcription session.\n *\n */\nexport type RealtimeClientEventTranscriptionSessionUpdate = {\n    /**\n     * Optional client-generated ID used to identify this event.\n     */\n    event_id?: string;\n    /**\n     * The event type, must be `transcription_session.update`.\n     */\n    type: 'transcription_session.update';\n    session: RealtimeTranscriptionSessionCreateRequest;\n};\n\n/**\n * The item to add to the conversation.\n */\nexport type RealtimeConversationItem = {\n    /**\n     * The unique ID of the item, this can be generated by the client to help\n     * manage server-side context, but is not required because the server will\n     * generate one if not provided.\n     *\n     */\n    id?: string;\n    /**\n     * The type of the item (`message`, `function_call`, `function_call_output`).\n     *\n     */\n    type?: 'message' | 'function_call' | 'function_call_output';\n    /**\n     * Identifier for the API object being returned - always `realtime.item`.\n     *\n     */\n    object?: 'realtime.item';\n    /**\n     * The status of the item (`completed`, `incomplete`, `in_progress`). These have no effect\n     * on the conversation, but are accepted for consistency with the\n     * `conversation.item.created` event.\n     *\n     */\n    status?: 'completed' | 'incomplete' | 'in_progress';\n    /**\n     * The role of the message sender (`user`, `assistant`, `system`), only\n     * applicable for `message` items.\n     *\n     */\n    role?: 'user' | 'assistant' | 'system';\n    /**\n     * The content of the message, applicable for `message` items.\n     * - Message items of role `system` support only `input_text` content\n     * - Message items of role `user` support `input_text` and `input_audio`\n     * content\n     * - Message items of role `assistant` support `text` content.\n     *\n     */\n    content?: Array<RealtimeConversationItemContent>;\n    /**\n     * The ID of the function call (for `function_call` and\n     * `function_call_output` items). If passed on a `function_call_output`\n     * item, the server will check that a `function_call` item with the same\n     * ID exists in the conversation history.\n     *\n     */\n    call_id?: string;\n    /**\n     * The name of the function being called (for `function_call` items).\n     *\n     */\n    name?: string;\n    /**\n     * The arguments of the function call (for `function_call` items).\n     *\n     */\n    arguments?: string;\n    /**\n     * The output of the function call (for `function_call_output` items).\n     *\n     */\n    output?: string;\n};\n\n/**\n * The item to add to the conversation.\n */\nexport type RealtimeConversationItemWithReference = {\n    /**\n     * For an item of type (`message` | `function_call` | `function_call_output`)\n     * this field allows the client to assign the unique ID of the item. It is\n     * not required because the server will generate one if not provided.\n     *\n     * For an item of type `item_reference`, this field is required and is a\n     * reference to any item that has previously existed in the conversation.\n     *\n     */\n    id?: string;\n    /**\n     * The type of the item (`message`, `function_call`, `function_call_output`, `item_reference`).\n     *\n     */\n    type?: 'message' | 'function_call' | 'function_call_output' | 'item_reference';\n    /**\n     * Identifier for the API object being returned - always `realtime.item`.\n     *\n     */\n    object?: 'realtime.item';\n    /**\n     * The status of the item (`completed`, `incomplete`, `in_progress`). These have no effect\n     * on the conversation, but are accepted for consistency with the\n     * `conversation.item.created` event.\n     *\n     */\n    status?: 'completed' | 'incomplete' | 'in_progress';\n    /**\n     * The role of the message sender (`user`, `assistant`, `system`), only\n     * applicable for `message` items.\n     *\n     */\n    role?: 'user' | 'assistant' | 'system';\n    /**\n     * The content of the message, applicable for `message` items.\n     * - Message items of role `system` support only `input_text` content\n     * - Message items of role `user` support `input_text` and `input_audio`\n     * content\n     * - Message items of role `assistant` support `text` content.\n     *\n     */\n    content?: Array<{\n        /**\n         * The content type (`input_text`, `input_audio`, `item_reference`, `text`).\n         *\n         */\n        type?: 'input_text' | 'input_audio' | 'item_reference' | 'text';\n        /**\n         * The text content, used for `input_text` and `text` content types.\n         *\n         */\n        text?: string;\n        /**\n         * ID of a previous conversation item to reference (for `item_reference`\n         * content types in `response.create` events). These can reference both\n         * client and server created items.\n         *\n         */\n        id?: string;\n        /**\n         * Base64-encoded audio bytes, used for `input_audio` content type.\n         *\n         */\n        audio?: string;\n        /**\n         * The transcript of the audio, used for `input_audio` content type.\n         *\n         */\n        transcript?: string;\n    }>;\n    /**\n     * The ID of the function call (for `function_call` and\n     * `function_call_output` items). If passed on a `function_call_output`\n     * item, the server will check that a `function_call` item with the same\n     * ID exists in the conversation history.\n     *\n     */\n    call_id?: string;\n    /**\n     * The name of the function being called (for `function_call` items).\n     *\n     */\n    name?: string;\n    /**\n     * The arguments of the function call (for `function_call` items).\n     *\n     */\n    arguments?: string;\n    /**\n     * The output of the function call (for `function_call_output` items).\n     *\n     */\n    output?: string;\n};\n\n/**\n * The response resource.\n */\nexport type RealtimeResponse = {\n    /**\n     * The unique ID of the response.\n     */\n    id?: string;\n    /**\n     * The object type, must be `realtime.response`.\n     */\n    object?: 'realtime.response';\n    /**\n     * The final status of the response (`completed`, `cancelled`, `failed`, or\n     * `incomplete`, `in_progress`).\n     *\n     */\n    status?: 'completed' | 'cancelled' | 'failed' | 'incomplete' | 'in_progress';\n    /**\n     * Additional details about the status.\n     */\n    status_details?: {\n        /**\n         * The type of error that caused the response to fail, corresponding\n         * with the `status` field (`completed`, `cancelled`, `incomplete`,\n         * `failed`).\n         *\n         */\n        type?: 'completed' | 'cancelled' | 'incomplete' | 'failed';\n        /**\n         * The reason the Response did not complete. For a `cancelled` Response,\n         * one of `turn_detected` (the server VAD detected a new start of speech)\n         * or `client_cancelled` (the client sent a cancel event). For an\n         * `incomplete` Response, one of `max_output_tokens` or `content_filter`\n         * (the server-side safety filter activated and cut off the response).\n         *\n         */\n        reason?: 'turn_detected' | 'client_cancelled' | 'max_output_tokens' | 'content_filter';\n        /**\n         * A description of the error that caused the response to fail,\n         * populated when the `status` is `failed`.\n         *\n         */\n        error?: {\n            /**\n             * The type of error.\n             */\n            type?: string;\n            /**\n             * Error code, if any.\n             */\n            code?: string;\n        };\n    };\n    /**\n     * The list of output items generated by the response.\n     */\n    output?: Array<RealtimeConversationItem>;\n    metadata?: Metadata;\n    /**\n     * Usage statistics for the Response, this will correspond to billing. A\n     * Realtime API session will maintain a conversation context and append new\n     * Items to the Conversation, thus output from previous turns (text and\n     * audio tokens) will become the input for later turns.\n     *\n     */\n    usage?: {\n        /**\n         * The total number of tokens in the Response including input and output\n         * text and audio tokens.\n         *\n         */\n        total_tokens?: number;\n        /**\n         * The number of input tokens used in the Response, including text and\n         * audio tokens.\n         *\n         */\n        input_tokens?: number;\n        /**\n         * The number of output tokens sent in the Response, including text and\n         * audio tokens.\n         *\n         */\n        output_tokens?: number;\n        /**\n         * Details about the input tokens used in the Response.\n         */\n        input_token_details?: {\n            /**\n             * The number of cached tokens used in the Response.\n             */\n            cached_tokens?: number;\n            /**\n             * The number of text tokens used in the Response.\n             */\n            text_tokens?: number;\n            /**\n             * The number of audio tokens used in the Response.\n             */\n            audio_tokens?: number;\n        };\n        /**\n         * Details about the output tokens used in the Response.\n         */\n        output_token_details?: {\n            /**\n             * The number of text tokens used in the Response.\n             */\n            text_tokens?: number;\n            /**\n             * The number of audio tokens used in the Response.\n             */\n            audio_tokens?: number;\n        };\n    };\n    /**\n     * Which conversation the response is added to, determined by the `conversation`\n     * field in the `response.create` event. If `auto`, the response will be added to\n     * the default conversation and the value of `conversation_id` will be an id like\n     * `conv_1234`. If `none`, the response will not be added to any conversation and\n     * the value of `conversation_id` will be `null`. If responses are being triggered\n     * by server VAD, the response will be added to the default conversation, thus\n     * the `conversation_id` will be an id like `conv_1234`.\n     *\n     */\n    conversation_id?: string;\n    /**\n     * The voice the model used to respond.\n     * Current voice options are `alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`,\n     * `shimmer`, and `verse`.\n     *\n     */\n    voice?: VoiceIdsShared;\n    /**\n     * The set of modalities the model used to respond. If there are multiple modalities,\n     * the model will pick one, for example if `modalities` is `[\"text\", \"audio\"]`, the model\n     * could be responding in either text or audio.\n     *\n     */\n    modalities?: Array<'text' | 'audio'>;\n    /**\n     * The format of output audio. Options are `pcm16`, `g711_ulaw`, or `g711_alaw`.\n     *\n     */\n    output_audio_format?: 'pcm16' | 'g711_ulaw' | 'g711_alaw';\n    /**\n     * Sampling temperature for the model, limited to [0.6, 1.2]. Defaults to 0.8.\n     *\n     */\n    temperature?: number;\n    /**\n     * Maximum number of output tokens for a single assistant response,\n     * inclusive of tool calls, that was used in this response.\n     *\n     */\n    max_output_tokens?: number | 'inf';\n};\n\n/**\n * Create a new Realtime response with these parameters\n */\nexport type RealtimeResponseCreateParams = {\n    /**\n     * The set of modalities the model can respond with. To disable audio,\n     * set this to [\"text\"].\n     *\n     */\n    modalities?: Array<'text' | 'audio'>;\n    /**\n     * The default system instructions (i.e. system message) prepended to model\n     * calls. This field allows the client to guide the model on desired\n     * responses. The model can be instructed on response content and format,\n     * (e.g. \"be extremely succinct\", \"act friendly\", \"here are examples of good\n     * responses\") and on audio behavior (e.g. \"talk quickly\", \"inject emotion\n     * into your voice\", \"laugh frequently\"). The instructions are not guaranteed\n     * to be followed by the model, but they provide guidance to the model on the\n     * desired behavior.\n     *\n     * Note that the server sets default instructions which will be used if this\n     * field is not set and are visible in the `session.created` event at the\n     * start of the session.\n     *\n     */\n    instructions?: string;\n    /**\n     * The voice the model uses to respond. Voice cannot be changed during the\n     * session once the model has responded with audio at least once. Current\n     * voice options are `alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`,\n     * `shimmer`, and `verse`.\n     *\n     */\n    voice?: VoiceIdsShared;\n    /**\n     * The format of output audio. Options are `pcm16`, `g711_ulaw`, or `g711_alaw`.\n     *\n     */\n    output_audio_format?: 'pcm16' | 'g711_ulaw' | 'g711_alaw';\n    /**\n     * Tools (functions) available to the model.\n     */\n    tools?: Array<{\n        /**\n         * The type of the tool, i.e. `function`.\n         */\n        type?: 'function';\n        /**\n         * The name of the function.\n         */\n        name?: string;\n        /**\n         * The description of the function, including guidance on when and how\n         * to call it, and guidance about what to tell the user when calling\n         * (if anything).\n         *\n         */\n        description?: string;\n        /**\n         * Parameters of the function in JSON Schema.\n         */\n        parameters?: {\n            [key: string]: unknown;\n        };\n    }>;\n    /**\n     * How the model chooses tools. Options are `auto`, `none`, `required`, or\n     * specify a function, like `{\"type\": \"function\", \"function\": {\"name\": \"my_function\"}}`.\n     *\n     */\n    tool_choice?: string;\n    /**\n     * Sampling temperature for the model, limited to [0.6, 1.2]. Defaults to 0.8.\n     *\n     */\n    temperature?: number;\n    /**\n     * Maximum number of output tokens for a single assistant response,\n     * inclusive of tool calls. Provide an integer between 1 and 4096 to\n     * limit output tokens, or `inf` for the maximum available tokens for a\n     * given model. Defaults to `inf`.\n     *\n     */\n    max_response_output_tokens?: number | 'inf';\n    /**\n     * Controls which conversation the response is added to. Currently supports\n     * `auto` and `none`, with `auto` as the default value. The `auto` value\n     * means that the contents of the response will be added to the default\n     * conversation. Set this to `none` to create an out-of-band response which\n     * will not add items to default conversation.\n     *\n     */\n    conversation?: string | 'auto' | 'none';\n    metadata?: Metadata;\n    /**\n     * Input items to include in the prompt for the model. Using this field\n     * creates a new context for this Response instead of using the default\n     * conversation. An empty array `[]` will clear the context for this Response.\n     * Note that this can include references to items from the default conversation.\n     *\n     */\n    input?: Array<RealtimeConversationItemWithReference>;\n};\n\n/**\n * A realtime server event.\n *\n */\nexport type RealtimeServerEvent = ({\n    type?: 'RealtimeServerEventConversationCreated';\n} & RealtimeServerEventConversationCreated) | ({\n    type?: 'RealtimeServerEventConversationItemCreated';\n} & RealtimeServerEventConversationItemCreated) | ({\n    type?: 'RealtimeServerEventConversationItemDeleted';\n} & RealtimeServerEventConversationItemDeleted) | ({\n    type?: 'RealtimeServerEventConversationItemInputAudioTranscriptionCompleted';\n} & RealtimeServerEventConversationItemInputAudioTranscriptionCompleted) | ({\n    type?: 'RealtimeServerEventConversationItemInputAudioTranscriptionDelta';\n} & RealtimeServerEventConversationItemInputAudioTranscriptionDelta) | ({\n    type?: 'RealtimeServerEventConversationItemInputAudioTranscriptionFailed';\n} & RealtimeServerEventConversationItemInputAudioTranscriptionFailed) | ({\n    type?: 'RealtimeServerEventConversationItemRetrieved';\n} & RealtimeServerEventConversationItemRetrieved) | ({\n    type?: 'RealtimeServerEventConversationItemTruncated';\n} & RealtimeServerEventConversationItemTruncated) | ({\n    type?: 'RealtimeServerEventError';\n} & RealtimeServerEventError) | ({\n    type?: 'RealtimeServerEventInputAudioBufferCleared';\n} & RealtimeServerEventInputAudioBufferCleared) | ({\n    type?: 'RealtimeServerEventInputAudioBufferCommitted';\n} & RealtimeServerEventInputAudioBufferCommitted) | ({\n    type?: 'RealtimeServerEventInputAudioBufferSpeechStarted';\n} & RealtimeServerEventInputAudioBufferSpeechStarted) | ({\n    type?: 'RealtimeServerEventInputAudioBufferSpeechStopped';\n} & RealtimeServerEventInputAudioBufferSpeechStopped) | ({\n    type?: 'RealtimeServerEventRateLimitsUpdated';\n} & RealtimeServerEventRateLimitsUpdated) | ({\n    type?: 'RealtimeServerEventResponseAudioDelta';\n} & RealtimeServerEventResponseAudioDelta) | ({\n    type?: 'RealtimeServerEventResponseAudioDone';\n} & RealtimeServerEventResponseAudioDone) | ({\n    type?: 'RealtimeServerEventResponseAudioTranscriptDelta';\n} & RealtimeServerEventResponseAudioTranscriptDelta) | ({\n    type?: 'RealtimeServerEventResponseAudioTranscriptDone';\n} & RealtimeServerEventResponseAudioTranscriptDone) | ({\n    type?: 'RealtimeServerEventResponseContentPartAdded';\n} & RealtimeServerEventResponseContentPartAdded) | ({\n    type?: 'RealtimeServerEventResponseContentPartDone';\n} & RealtimeServerEventResponseContentPartDone) | ({\n    type?: 'RealtimeServerEventResponseCreated';\n} & RealtimeServerEventResponseCreated) | ({\n    type?: 'RealtimeServerEventResponseDone';\n} & RealtimeServerEventResponseDone) | ({\n    type?: 'RealtimeServerEventResponseFunctionCallArgumentsDelta';\n} & RealtimeServerEventResponseFunctionCallArgumentsDelta) | ({\n    type?: 'RealtimeServerEventResponseFunctionCallArgumentsDone';\n} & RealtimeServerEventResponseFunctionCallArgumentsDone) | ({\n    type?: 'RealtimeServerEventResponseOutputItemAdded';\n} & RealtimeServerEventResponseOutputItemAdded) | ({\n    type?: 'RealtimeServerEventResponseOutputItemDone';\n} & RealtimeServerEventResponseOutputItemDone) | ({\n    type?: 'RealtimeServerEventResponseTextDelta';\n} & RealtimeServerEventResponseTextDelta) | ({\n    type?: 'RealtimeServerEventResponseTextDone';\n} & RealtimeServerEventResponseTextDone) | ({\n    type?: 'RealtimeServerEventSessionCreated';\n} & RealtimeServerEventSessionCreated) | ({\n    type?: 'RealtimeServerEventSessionUpdated';\n} & RealtimeServerEventSessionUpdated) | ({\n    type?: 'RealtimeServerEventTranscriptionSessionUpdated';\n} & RealtimeServerEventTranscriptionSessionUpdated) | ({\n    type?: 'RealtimeServerEventOutputAudioBufferStarted';\n} & RealtimeServerEventOutputAudioBufferStarted) | ({\n    type?: 'RealtimeServerEventOutputAudioBufferStopped';\n} & RealtimeServerEventOutputAudioBufferStopped) | ({\n    type?: 'RealtimeServerEventOutputAudioBufferCleared';\n} & RealtimeServerEventOutputAudioBufferCleared);\n\n/**\n * Returned when a conversation is created. Emitted right after session creation.\n *\n */\nexport type RealtimeServerEventConversationCreated = {\n    /**\n     * The unique ID of the server event.\n     */\n    event_id: string;\n    /**\n     * The event type, must be `conversation.created`.\n     */\n    type: 'conversation.created';\n    /**\n     * The conversation resource.\n     */\n    conversation: {\n        /**\n         * The unique ID of the conversation.\n         */\n        id?: string;\n        /**\n         * The object type, must be `realtime.conversation`.\n         */\n        object?: 'realtime.conversation';\n    };\n};\n\n/**\n * Returned when a conversation item is created. There are several scenarios that produce this event:\n * - The server is generating a Response, which if successful will produce\n * either one or two Items, which will be of type `message`\n * (role `assistant`) or type `function_call`.\n * - The input audio buffer has been committed, either by the client or the\n * server (in `server_vad` mode). The server will take the content of the\n * input audio buffer and add it to a new user message Item.\n * - The client has sent a `conversation.item.create` event to add a new Item\n * to the Conversation.\n *\n */\nexport type RealtimeServerEventConversationItemCreated = {\n    /**\n     * The unique ID of the server event.\n     */\n    event_id: string;\n    /**\n     * The event type, must be `conversation.item.created`.\n     */\n    type: 'conversation.item.created';\n    /**\n     * The ID of the preceding item in the Conversation context, allows the\n     * client to understand the order of the conversation. Can be `null` if the\n     * item has no predecessor.\n     *\n     */\n    previous_item_id?: string;\n    item: RealtimeConversationItem;\n};\n\n/**\n * Returned when an item in the conversation is deleted by the client with a\n * `conversation.item.delete` event. This event is used to synchronize the\n * server's understanding of the conversation history with the client's view.\n *\n */\nexport type RealtimeServerEventConversationItemDeleted = {\n    /**\n     * The unique ID of the server event.\n     */\n    event_id: string;\n    /**\n     * The event type, must be `conversation.item.deleted`.\n     */\n    type: 'conversation.item.deleted';\n    /**\n     * The ID of the item that was deleted.\n     */\n    item_id: string;\n};\n\n/**\n * This event is the output of audio transcription for user audio written to the\n * user audio buffer. Transcription begins when the input audio buffer is\n * committed by the client or server (in `server_vad` mode). Transcription runs\n * asynchronously with Response creation, so this event may come before or after\n * the Response events.\n *\n * Realtime API models accept audio natively, and thus input transcription is a\n * separate process run on a separate ASR (Automatic Speech Recognition) model.\n * The transcript may diverge somewhat from the model's interpretation, and\n * should be treated as a rough guide.\n *\n */\nexport type RealtimeServerEventConversationItemInputAudioTranscriptionCompleted = {\n    /**\n     * The unique ID of the server event.\n     */\n    event_id: string;\n    /**\n     * The event type, must be\n     * `conversation.item.input_audio_transcription.completed`.\n     *\n     */\n    type: 'conversation.item.input_audio_transcription.completed';\n    /**\n     * The ID of the user message item containing the audio.\n     */\n    item_id: string;\n    /**\n     * The index of the content part containing the audio.\n     */\n    content_index: number;\n    /**\n     * The transcribed text.\n     */\n    transcript: string;\n    /**\n     * The log probabilities of the transcription.\n     */\n    logprobs?: Array<LogProbProperties>;\n    /**\n     * Usage statistics for the transcription.\n     */\n    usage: TranscriptTextUsageTokens | TranscriptTextUsageDuration;\n};\n\n/**\n * Returned when the text value of an input audio transcription content part is updated.\n *\n */\nexport type RealtimeServerEventConversationItemInputAudioTranscriptionDelta = {\n    /**\n     * The unique ID of the server event.\n     */\n    event_id: string;\n    /**\n     * The event type, must be `conversation.item.input_audio_transcription.delta`.\n     */\n    type: 'conversation.item.input_audio_transcription.delta';\n    /**\n     * The ID of the item.\n     */\n    item_id: string;\n    /**\n     * The index of the content part in the item's content array.\n     */\n    content_index?: number;\n    /**\n     * The text delta.\n     */\n    delta?: string;\n    /**\n     * The log probabilities of the transcription.\n     */\n    logprobs?: Array<LogProbProperties>;\n};\n\n/**\n * Returned when input audio transcription is configured, and a transcription\n * request for a user message failed. These events are separate from other\n * `error` events so that the client can identify the related Item.\n *\n */\nexport type RealtimeServerEventConversationItemInputAudioTranscriptionFailed = {\n    /**\n     * The unique ID of the server event.\n     */\n    event_id: string;\n    /**\n     * The event type, must be\n     * `conversation.item.input_audio_transcription.failed`.\n     *\n     */\n    type: 'conversation.item.input_audio_transcription.failed';\n    /**\n     * The ID of the user message item.\n     */\n    item_id: string;\n    /**\n     * The index of the content part containing the audio.\n     */\n    content_index: number;\n    /**\n     * Details of the transcription error.\n     */\n    error: {\n        /**\n         * The type of error.\n         */\n        type?: string;\n        /**\n         * Error code, if any.\n         */\n        code?: string;\n        /**\n         * A human-readable error message.\n         */\n        message?: string;\n        /**\n         * Parameter related to the error, if any.\n         */\n        param?: string;\n    };\n};\n\n/**\n * Returned when a conversation item is retrieved with `conversation.item.retrieve`.\n *\n */\nexport type RealtimeServerEventConversationItemRetrieved = {\n    /**\n     * The unique ID of the server event.\n     */\n    event_id: string;\n    /**\n     * The event type, must be `conversation.item.retrieved`.\n     */\n    type: 'conversation.item.retrieved';\n    item: RealtimeConversationItem;\n};\n\n/**\n * Returned when an earlier assistant audio message item is truncated by the\n * client with a `conversation.item.truncate` event. This event is used to\n * synchronize the server's understanding of the audio with the client's playback.\n *\n * This action will truncate the audio and remove the server-side text transcript\n * to ensure there is no text in the context that hasn't been heard by the user.\n *\n */\nexport type RealtimeServerEventConversationItemTruncated = {\n    /**\n     * The unique ID of the server event.\n     */\n    event_id: string;\n    /**\n     * The event type, must be `conversation.item.truncated`.\n     */\n    type: 'conversation.item.truncated';\n    /**\n     * The ID of the assistant message item that was truncated.\n     */\n    item_id: string;\n    /**\n     * The index of the content part that was truncated.\n     */\n    content_index: number;\n    /**\n     * The duration up to which the audio was truncated, in milliseconds.\n     *\n     */\n    audio_end_ms: number;\n};\n\n/**\n * Returned when an error occurs, which could be a client problem or a server\n * problem. Most errors are recoverable and the session will stay open, we\n * recommend to implementors to monitor and log error messages by default.\n *\n */\nexport type RealtimeServerEventError = {\n    /**\n     * The unique ID of the server event.\n     */\n    event_id: string;\n    /**\n     * The event type, must be `error`.\n     */\n    type: 'error';\n    /**\n     * Details of the error.\n     */\n    error: {\n        /**\n         * The type of error (e.g., \"invalid_request_error\", \"server_error\").\n         *\n         */\n        type: string;\n        /**\n         * Error code, if any.\n         */\n        code?: string;\n        /**\n         * A human-readable error message.\n         */\n        message: string;\n        /**\n         * Parameter related to the error, if any.\n         */\n        param?: string;\n        /**\n         * The event_id of the client event that caused the error, if applicable.\n         *\n         */\n        event_id?: string;\n    };\n};\n\n/**\n * Returned when the input audio buffer is cleared by the client with a\n * `input_audio_buffer.clear` event.\n *\n */\nexport type RealtimeServerEventInputAudioBufferCleared = {\n    /**\n     * The unique ID of the server event.\n     */\n    event_id: string;\n    /**\n     * The event type, must be `input_audio_buffer.cleared`.\n     */\n    type: 'input_audio_buffer.cleared';\n};\n\n/**\n * Returned when an input audio buffer is committed, either by the client or\n * automatically in server VAD mode. The `item_id` property is the ID of the user\n * message item that will be created, thus a `conversation.item.created` event\n * will also be sent to the client.\n *\n */\nexport type RealtimeServerEventInputAudioBufferCommitted = {\n    /**\n     * The unique ID of the server event.\n     */\n    event_id: string;\n    /**\n     * The event type, must be `input_audio_buffer.committed`.\n     */\n    type: 'input_audio_buffer.committed';\n    /**\n     * The ID of the preceding item after which the new item will be inserted.\n     * Can be `null` if the item has no predecessor.\n     *\n     */\n    previous_item_id?: string;\n    /**\n     * The ID of the user message item that will be created.\n     */\n    item_id: string;\n};\n\n/**\n * Sent by the server when in `server_vad` mode to indicate that speech has been\n * detected in the audio buffer. This can happen any time audio is added to the\n * buffer (unless speech is already detected). The client may want to use this\n * event to interrupt audio playback or provide visual feedback to the user.\n *\n * The client should expect to receive a `input_audio_buffer.speech_stopped` event\n * when speech stops. The `item_id` property is the ID of the user message item\n * that will be created when speech stops and will also be included in the\n * `input_audio_buffer.speech_stopped` event (unless the client manually commits\n * the audio buffer during VAD activation).\n *\n */\nexport type RealtimeServerEventInputAudioBufferSpeechStarted = {\n    /**\n     * The unique ID of the server event.\n     */\n    event_id: string;\n    /**\n     * The event type, must be `input_audio_buffer.speech_started`.\n     */\n    type: 'input_audio_buffer.speech_started';\n    /**\n     * Milliseconds from the start of all audio written to the buffer during the\n     * session when speech was first detected. This will correspond to the\n     * beginning of audio sent to the model, and thus includes the\n     * `prefix_padding_ms` configured in the Session.\n     *\n     */\n    audio_start_ms: number;\n    /**\n     * The ID of the user message item that will be created when speech stops.\n     *\n     */\n    item_id: string;\n};\n\n/**\n * Returned in `server_vad` mode when the server detects the end of speech in\n * the audio buffer. The server will also send an `conversation.item.created`\n * event with the user message item that is created from the audio buffer.\n *\n */\nexport type RealtimeServerEventInputAudioBufferSpeechStopped = {\n    /**\n     * The unique ID of the server event.\n     */\n    event_id: string;\n    /**\n     * The event type, must be `input_audio_buffer.speech_stopped`.\n     */\n    type: 'input_audio_buffer.speech_stopped';\n    /**\n     * Milliseconds since the session started when speech stopped. This will\n     * correspond to the end of audio sent to the model, and thus includes the\n     * `min_silence_duration_ms` configured in the Session.\n     *\n     */\n    audio_end_ms: number;\n    /**\n     * The ID of the user message item that will be created.\n     */\n    item_id: string;\n};\n\n/**\n * **WebRTC Only:** Emitted when the output audio buffer is cleared. This happens either in VAD\n * mode when the user has interrupted (`input_audio_buffer.speech_started`),\n * or when the client has emitted the `output_audio_buffer.clear` event to manually\n * cut off the current audio response.\n * [Learn more](https://platform.openai.com/docs/guides/realtime-conversations#client-and-server-events-for-audio-in-webrtc).\n *\n */\nexport type RealtimeServerEventOutputAudioBufferCleared = {\n    /**\n     * The unique ID of the server event.\n     */\n    event_id: string;\n    /**\n     * The event type, must be `output_audio_buffer.cleared`.\n     */\n    type: 'output_audio_buffer.cleared';\n    /**\n     * The unique ID of the response that produced the audio.\n     */\n    response_id: string;\n};\n\n/**\n * **WebRTC Only:** Emitted when the server begins streaming audio to the client. This event is\n * emitted after an audio content part has been added (`response.content_part.added`)\n * to the response.\n * [Learn more](https://platform.openai.com/docs/guides/realtime-conversations#client-and-server-events-for-audio-in-webrtc).\n *\n */\nexport type RealtimeServerEventOutputAudioBufferStarted = {\n    /**\n     * The unique ID of the server event.\n     */\n    event_id: string;\n    /**\n     * The event type, must be `output_audio_buffer.started`.\n     */\n    type: 'output_audio_buffer.started';\n    /**\n     * The unique ID of the response that produced the audio.\n     */\n    response_id: string;\n};\n\n/**\n * **WebRTC Only:** Emitted when the output audio buffer has been completely drained on the server,\n * and no more audio is forthcoming. This event is emitted after the full response\n * data has been sent to the client (`response.done`).\n * [Learn more](https://platform.openai.com/docs/guides/realtime-conversations#client-and-server-events-for-audio-in-webrtc).\n *\n */\nexport type RealtimeServerEventOutputAudioBufferStopped = {\n    /**\n     * The unique ID of the server event.\n     */\n    event_id: string;\n    /**\n     * The event type, must be `output_audio_buffer.stopped`.\n     */\n    type: 'output_audio_buffer.stopped';\n    /**\n     * The unique ID of the response that produced the audio.\n     */\n    response_id: string;\n};\n\n/**\n * Emitted at the beginning of a Response to indicate the updated rate limits.\n * When a Response is created some tokens will be \"reserved\" for the output\n * tokens, the rate limits shown here reflect that reservation, which is then\n * adjusted accordingly once the Response is completed.\n *\n */\nexport type RealtimeServerEventRateLimitsUpdated = {\n    /**\n     * The unique ID of the server event.\n     */\n    event_id: string;\n    /**\n     * The event type, must be `rate_limits.updated`.\n     */\n    type: 'rate_limits.updated';\n    /**\n     * List of rate limit information.\n     */\n    rate_limits: Array<{\n        /**\n         * The name of the rate limit (`requests`, `tokens`).\n         *\n         */\n        name?: 'requests' | 'tokens';\n        /**\n         * The maximum allowed value for the rate limit.\n         */\n        limit?: number;\n        /**\n         * The remaining value before the limit is reached.\n         */\n        remaining?: number;\n        /**\n         * Seconds until the rate limit resets.\n         */\n        reset_seconds?: number;\n    }>;\n};\n\n/**\n * Returned when the model-generated audio is updated.\n */\nexport type RealtimeServerEventResponseAudioDelta = {\n    /**\n     * The unique ID of the server event.\n     */\n    event_id: string;\n    /**\n     * The event type, must be `response.audio.delta`.\n     */\n    type: 'response.audio.delta';\n    /**\n     * The ID of the response.\n     */\n    response_id: string;\n    /**\n     * The ID of the item.\n     */\n    item_id: string;\n    /**\n     * The index of the output item in the response.\n     */\n    output_index: number;\n    /**\n     * The index of the content part in the item's content array.\n     */\n    content_index: number;\n    /**\n     * Base64-encoded audio data delta.\n     */\n    delta: string;\n};\n\n/**\n * Returned when the model-generated audio is done. Also emitted when a Response\n * is interrupted, incomplete, or cancelled.\n *\n */\nexport type RealtimeServerEventResponseAudioDone = {\n    /**\n     * The unique ID of the server event.\n     */\n    event_id: string;\n    /**\n     * The event type, must be `response.audio.done`.\n     */\n    type: 'response.audio.done';\n    /**\n     * The ID of the response.\n     */\n    response_id: string;\n    /**\n     * The ID of the item.\n     */\n    item_id: string;\n    /**\n     * The index of the output item in the response.\n     */\n    output_index: number;\n    /**\n     * The index of the content part in the item's content array.\n     */\n    content_index: number;\n};\n\n/**\n * Returned when the model-generated transcription of audio output is updated.\n *\n */\nexport type RealtimeServerEventResponseAudioTranscriptDelta = {\n    /**\n     * The unique ID of the server event.\n     */\n    event_id: string;\n    /**\n     * The event type, must be `response.audio_transcript.delta`.\n     */\n    type: 'response.audio_transcript.delta';\n    /**\n     * The ID of the response.\n     */\n    response_id: string;\n    /**\n     * The ID of the item.\n     */\n    item_id: string;\n    /**\n     * The index of the output item in the response.\n     */\n    output_index: number;\n    /**\n     * The index of the content part in the item's content array.\n     */\n    content_index: number;\n    /**\n     * The transcript delta.\n     */\n    delta: string;\n};\n\n/**\n * Returned when the model-generated transcription of audio output is done\n * streaming. Also emitted when a Response is interrupted, incomplete, or\n * cancelled.\n *\n */\nexport type RealtimeServerEventResponseAudioTranscriptDone = {\n    /**\n     * The unique ID of the server event.\n     */\n    event_id: string;\n    /**\n     * The event type, must be `response.audio_transcript.done`.\n     */\n    type: 'response.audio_transcript.done';\n    /**\n     * The ID of the response.\n     */\n    response_id: string;\n    /**\n     * The ID of the item.\n     */\n    item_id: string;\n    /**\n     * The index of the output item in the response.\n     */\n    output_index: number;\n    /**\n     * The index of the content part in the item's content array.\n     */\n    content_index: number;\n    /**\n     * The final transcript of the audio.\n     */\n    transcript: string;\n};\n\n/**\n * Returned when a new content part is added to an assistant message item during\n * response generation.\n *\n */\nexport type RealtimeServerEventResponseContentPartAdded = {\n    /**\n     * The unique ID of the server event.\n     */\n    event_id: string;\n    /**\n     * The event type, must be `response.content_part.added`.\n     */\n    type: 'response.content_part.added';\n    /**\n     * The ID of the response.\n     */\n    response_id: string;\n    /**\n     * The ID of the item to which the content part was added.\n     */\n    item_id: string;\n    /**\n     * The index of the output item in the response.\n     */\n    output_index: number;\n    /**\n     * The index of the content part in the item's content array.\n     */\n    content_index: number;\n    /**\n     * The content part that was added.\n     */\n    part: {\n        /**\n         * The content type (\"text\", \"audio\").\n         */\n        type?: 'text' | 'audio';\n        /**\n         * The text content (if type is \"text\").\n         */\n        text?: string;\n        /**\n         * Base64-encoded audio data (if type is \"audio\").\n         */\n        audio?: string;\n        /**\n         * The transcript of the audio (if type is \"audio\").\n         */\n        transcript?: string;\n    };\n};\n\n/**\n * Returned when a content part is done streaming in an assistant message item.\n * Also emitted when a Response is interrupted, incomplete, or cancelled.\n *\n */\nexport type RealtimeServerEventResponseContentPartDone = {\n    /**\n     * The unique ID of the server event.\n     */\n    event_id: string;\n    /**\n     * The event type, must be `response.content_part.done`.\n     */\n    type: 'response.content_part.done';\n    /**\n     * The ID of the response.\n     */\n    response_id: string;\n    /**\n     * The ID of the item.\n     */\n    item_id: string;\n    /**\n     * The index of the output item in the response.\n     */\n    output_index: number;\n    /**\n     * The index of the content part in the item's content array.\n     */\n    content_index: number;\n    /**\n     * The content part that is done.\n     */\n    part: {\n        /**\n         * The content type (\"text\", \"audio\").\n         */\n        type?: 'text' | 'audio';\n        /**\n         * The text content (if type is \"text\").\n         */\n        text?: string;\n        /**\n         * Base64-encoded audio data (if type is \"audio\").\n         */\n        audio?: string;\n        /**\n         * The transcript of the audio (if type is \"audio\").\n         */\n        transcript?: string;\n    };\n};\n\n/**\n * Returned when a new Response is created. The first event of response creation,\n * where the response is in an initial state of `in_progress`.\n *\n */\nexport type RealtimeServerEventResponseCreated = {\n    /**\n     * The unique ID of the server event.\n     */\n    event_id: string;\n    /**\n     * The event type, must be `response.created`.\n     */\n    type: 'response.created';\n    response: RealtimeResponse;\n};\n\n/**\n * Returned when a Response is done streaming. Always emitted, no matter the\n * final state. The Response object included in the `response.done` event will\n * include all output Items in the Response but will omit the raw audio data.\n *\n */\nexport type RealtimeServerEventResponseDone = {\n    /**\n     * The unique ID of the server event.\n     */\n    event_id: string;\n    /**\n     * The event type, must be `response.done`.\n     */\n    type: 'response.done';\n    response: RealtimeResponse;\n};\n\n/**\n * Returned when the model-generated function call arguments are updated.\n *\n */\nexport type RealtimeServerEventResponseFunctionCallArgumentsDelta = {\n    /**\n     * The unique ID of the server event.\n     */\n    event_id: string;\n    /**\n     * The event type, must be `response.function_call_arguments.delta`.\n     *\n     */\n    type: 'response.function_call_arguments.delta';\n    /**\n     * The ID of the response.\n     */\n    response_id: string;\n    /**\n     * The ID of the function call item.\n     */\n    item_id: string;\n    /**\n     * The index of the output item in the response.\n     */\n    output_index: number;\n    /**\n     * The ID of the function call.\n     */\n    call_id: string;\n    /**\n     * The arguments delta as a JSON string.\n     */\n    delta: string;\n};\n\n/**\n * Returned when the model-generated function call arguments are done streaming.\n * Also emitted when a Response is interrupted, incomplete, or cancelled.\n *\n */\nexport type RealtimeServerEventResponseFunctionCallArgumentsDone = {\n    /**\n     * The unique ID of the server event.\n     */\n    event_id: string;\n    /**\n     * The event type, must be `response.function_call_arguments.done`.\n     *\n     */\n    type: 'response.function_call_arguments.done';\n    /**\n     * The ID of the response.\n     */\n    response_id: string;\n    /**\n     * The ID of the function call item.\n     */\n    item_id: string;\n    /**\n     * The index of the output item in the response.\n     */\n    output_index: number;\n    /**\n     * The ID of the function call.\n     */\n    call_id: string;\n    /**\n     * The final arguments as a JSON string.\n     */\n    arguments: string;\n};\n\n/**\n * Returned when a new Item is created during Response generation.\n */\nexport type RealtimeServerEventResponseOutputItemAdded = {\n    /**\n     * The unique ID of the server event.\n     */\n    event_id: string;\n    /**\n     * The event type, must be `response.output_item.added`.\n     */\n    type: 'response.output_item.added';\n    /**\n     * The ID of the Response to which the item belongs.\n     */\n    response_id: string;\n    /**\n     * The index of the output item in the Response.\n     */\n    output_index: number;\n    item: RealtimeConversationItem;\n};\n\n/**\n * Returned when an Item is done streaming. Also emitted when a Response is\n * interrupted, incomplete, or cancelled.\n *\n */\nexport type RealtimeServerEventResponseOutputItemDone = {\n    /**\n     * The unique ID of the server event.\n     */\n    event_id: string;\n    /**\n     * The event type, must be `response.output_item.done`.\n     */\n    type: 'response.output_item.done';\n    /**\n     * The ID of the Response to which the item belongs.\n     */\n    response_id: string;\n    /**\n     * The index of the output item in the Response.\n     */\n    output_index: number;\n    item: RealtimeConversationItem;\n};\n\n/**\n * Returned when the text value of a \"text\" content part is updated.\n */\nexport type RealtimeServerEventResponseTextDelta = {\n    /**\n     * The unique ID of the server event.\n     */\n    event_id: string;\n    /**\n     * The event type, must be `response.text.delta`.\n     */\n    type: 'response.text.delta';\n    /**\n     * The ID of the response.\n     */\n    response_id: string;\n    /**\n     * The ID of the item.\n     */\n    item_id: string;\n    /**\n     * The index of the output item in the response.\n     */\n    output_index: number;\n    /**\n     * The index of the content part in the item's content array.\n     */\n    content_index: number;\n    /**\n     * The text delta.\n     */\n    delta: string;\n};\n\n/**\n * Returned when the text value of a \"text\" content part is done streaming. Also\n * emitted when a Response is interrupted, incomplete, or cancelled.\n *\n */\nexport type RealtimeServerEventResponseTextDone = {\n    /**\n     * The unique ID of the server event.\n     */\n    event_id: string;\n    /**\n     * The event type, must be `response.text.done`.\n     */\n    type: 'response.text.done';\n    /**\n     * The ID of the response.\n     */\n    response_id: string;\n    /**\n     * The ID of the item.\n     */\n    item_id: string;\n    /**\n     * The index of the output item in the response.\n     */\n    output_index: number;\n    /**\n     * The index of the content part in the item's content array.\n     */\n    content_index: number;\n    /**\n     * The final text content.\n     */\n    text: string;\n};\n\n/**\n * Returned when a Session is created. Emitted automatically when a new\n * connection is established as the first server event. This event will contain\n * the default Session configuration.\n *\n */\nexport type RealtimeServerEventSessionCreated = {\n    /**\n     * The unique ID of the server event.\n     */\n    event_id: string;\n    /**\n     * The event type, must be `session.created`.\n     */\n    type: 'session.created';\n    session: RealtimeSession;\n};\n\n/**\n * Returned when a session is updated with a `session.update` event, unless\n * there is an error.\n *\n */\nexport type RealtimeServerEventSessionUpdated = {\n    /**\n     * The unique ID of the server event.\n     */\n    event_id: string;\n    /**\n     * The event type, must be `session.updated`.\n     */\n    type: 'session.updated';\n    session: RealtimeSession;\n};\n\n/**\n * Returned when a transcription session is updated with a `transcription_session.update` event, unless\n * there is an error.\n *\n */\nexport type RealtimeServerEventTranscriptionSessionUpdated = {\n    /**\n     * The unique ID of the server event.\n     */\n    event_id: string;\n    /**\n     * The event type, must be `transcription_session.updated`.\n     */\n    type: 'transcription_session.updated';\n    session: RealtimeTranscriptionSessionCreateResponse;\n};\n\n/**\n * Realtime session object configuration.\n */\nexport type RealtimeSession = {\n    /**\n     * Unique identifier for the session that looks like `sess_1234567890abcdef`.\n     *\n     */\n    id?: string;\n    /**\n     * The set of modalities the model can respond with. To disable audio,\n     * set this to [\"text\"].\n     *\n     */\n    modalities?: unknown;\n    /**\n     * The Realtime model used for this session.\n     *\n     */\n    model?: 'gpt-4o-realtime-preview' | 'gpt-4o-realtime-preview-2024-10-01' | 'gpt-4o-realtime-preview-2024-12-17' | 'gpt-4o-realtime-preview-2025-06-03' | 'gpt-4o-mini-realtime-preview' | 'gpt-4o-mini-realtime-preview-2024-12-17';\n    /**\n     * The default system instructions (i.e. system message) prepended to model\n     * calls. This field allows the client to guide the model on desired\n     * responses. The model can be instructed on response content and format,\n     * (e.g. \"be extremely succinct\", \"act friendly\", \"here are examples of good\n     * responses\") and on audio behavior (e.g. \"talk quickly\", \"inject emotion\n     * into your voice\", \"laugh frequently\"). The instructions are not\n     * guaranteed to be followed by the model, but they provide guidance to the\n     * model on the desired behavior.\n     *\n     *\n     * Note that the server sets default instructions which will be used if this\n     * field is not set and are visible in the `session.created` event at the\n     * start of the session.\n     *\n     */\n    instructions?: string;\n    /**\n     * The voice the model uses to respond. Voice cannot be changed during the\n     * session once the model has responded with audio at least once. Current\n     * voice options are `alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`,\n     * `shimmer`, and `verse`.\n     *\n     */\n    voice?: VoiceIdsShared;\n    /**\n     * The format of input audio. Options are `pcm16`, `g711_ulaw`, or `g711_alaw`.\n     * For `pcm16`, input audio must be 16-bit PCM at a 24kHz sample rate,\n     * single channel (mono), and little-endian byte order.\n     *\n     */\n    input_audio_format?: 'pcm16' | 'g711_ulaw' | 'g711_alaw';\n    /**\n     * The format of output audio. Options are `pcm16`, `g711_ulaw`, or `g711_alaw`.\n     * For `pcm16`, output audio is sampled at a rate of 24kHz.\n     *\n     */\n    output_audio_format?: 'pcm16' | 'g711_ulaw' | 'g711_alaw';\n    /**\n     * Configuration for input audio transcription, defaults to off and can be set to `null` to turn off once on. Input audio transcription is not native to the model, since the model consumes audio directly. Transcription runs asynchronously through [the /audio/transcriptions endpoint](https://platform.openai.com/docs/api-reference/audio/createTranscription) and should be treated as guidance of input audio content rather than precisely what the model heard. The client can optionally set the language and prompt for transcription, these offer additional guidance to the transcription service.\n     *\n     */\n    input_audio_transcription?: {\n        /**\n         * The model to use for transcription, current options are `gpt-4o-transcribe`, `gpt-4o-mini-transcribe`, and `whisper-1`.\n         *\n         */\n        model?: string;\n        /**\n         * The language of the input audio. Supplying the input language in\n         * [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) (e.g. `en`) format\n         * will improve accuracy and latency.\n         *\n         */\n        language?: string;\n        /**\n         * An optional text to guide the model's style or continue a previous audio\n         * segment.\n         * For `whisper-1`, the [prompt is a list of keywords](https://platform.openai.com/docs/guides/speech-to-text#prompting).\n         * For `gpt-4o-transcribe` models, the prompt is a free text string, for example \"expect words related to technology\".\n         *\n         */\n        prompt?: string;\n    };\n    /**\n     * Configuration for turn detection, ether Server VAD or Semantic VAD. This can be set to `null` to turn off, in which case the client must manually trigger model response.\n     * Server VAD means that the model will detect the start and end of speech based on audio volume and respond at the end of user speech.\n     * Semantic VAD is more advanced and uses a turn detection model (in conjunction with VAD) to semantically estimate whether the user has finished speaking, then dynamically sets a timeout based on this probability. For example, if user audio trails off with \"uhhm\", the model will score a low probability of turn end and wait longer for the user to continue speaking. This can be useful for more natural conversations, but may have a higher latency.\n     *\n     */\n    turn_detection?: {\n        /**\n         * Type of turn detection.\n         *\n         */\n        type?: 'server_vad' | 'semantic_vad';\n        /**\n         * Used only for `semantic_vad` mode. The eagerness of the model to respond. `low` will wait longer for the user to continue speaking, `high` will respond more quickly. `auto` is the default and is equivalent to `medium`.\n         *\n         */\n        eagerness?: 'low' | 'medium' | 'high' | 'auto';\n        /**\n         * Used only for `server_vad` mode. Activation threshold for VAD (0.0 to 1.0), this defaults to 0.5. A\n         * higher threshold will require louder audio to activate the model, and\n         * thus might perform better in noisy environments.\n         *\n         */\n        threshold?: number;\n        /**\n         * Used only for `server_vad` mode. Amount of audio to include before the VAD detected speech (in\n         * milliseconds). Defaults to 300ms.\n         *\n         */\n        prefix_padding_ms?: number;\n        /**\n         * Used only for `server_vad` mode. Duration of silence to detect speech stop (in milliseconds). Defaults\n         * to 500ms. With shorter values the model will respond more quickly,\n         * but may jump in on short pauses from the user.\n         *\n         */\n        silence_duration_ms?: number;\n        /**\n         * Whether or not to automatically generate a response when a VAD stop event occurs.\n         *\n         */\n        create_response?: boolean;\n        /**\n         * Whether or not to automatically interrupt any ongoing response with output to the default\n         * conversation (i.e. `conversation` of `auto`) when a VAD start event occurs.\n         *\n         */\n        interrupt_response?: boolean;\n    };\n    /**\n     * Configuration for input audio noise reduction. This can be set to `null` to turn off.\n     * Noise reduction filters audio added to the input audio buffer before it is sent to VAD and the model.\n     * Filtering the audio can improve VAD and turn detection accuracy (reducing false positives) and model performance by improving perception of the input audio.\n     *\n     */\n    input_audio_noise_reduction?: {\n        /**\n         * Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.\n         *\n         */\n        type?: 'near_field' | 'far_field';\n    };\n    /**\n     * The speed of the model's spoken response. 1.0 is the default speed. 0.25 is\n     * the minimum speed. 1.5 is the maximum speed. This value can only be changed\n     * in between model turns, not while a response is in progress.\n     *\n     */\n    speed?: number;\n    /**\n     * Tracing Configuration\n     *\n     * Configuration options for tracing. Set to null to disable tracing. Once\n     * tracing is enabled for a session, the configuration cannot be modified.\n     *\n     * `auto` will create a trace for the session with default values for the\n     * workflow name, group id, and metadata.\n     *\n     */\n    tracing?: 'auto' | {\n        /**\n         * The name of the workflow to attach to this trace. This is used to\n         * name the trace in the traces dashboard.\n         *\n         */\n        workflow_name?: string;\n        /**\n         * The group id to attach to this trace to enable filtering and\n         * grouping in the traces dashboard.\n         *\n         */\n        group_id?: string;\n        /**\n         * The arbitrary metadata to attach to this trace to enable\n         * filtering in the traces dashboard.\n         *\n         */\n        metadata?: {\n            [key: string]: unknown;\n        };\n    };\n    /**\n     * Tools (functions) available to the model.\n     */\n    tools?: Array<{\n        /**\n         * The type of the tool, i.e. `function`.\n         */\n        type?: 'function';\n        /**\n         * The name of the function.\n         */\n        name?: string;\n        /**\n         * The description of the function, including guidance on when and how\n         * to call it, and guidance about what to tell the user when calling\n         * (if anything).\n         *\n         */\n        description?: string;\n        /**\n         * Parameters of the function in JSON Schema.\n         */\n        parameters?: {\n            [key: string]: unknown;\n        };\n    }>;\n    /**\n     * How the model chooses tools. Options are `auto`, `none`, `required`, or\n     * specify a function.\n     *\n     */\n    tool_choice?: string;\n    /**\n     * Sampling temperature for the model, limited to [0.6, 1.2]. For audio models a temperature of 0.8 is highly recommended for best performance.\n     *\n     */\n    temperature?: number;\n    /**\n     * Maximum number of output tokens for a single assistant response,\n     * inclusive of tool calls. Provide an integer between 1 and 4096 to\n     * limit output tokens, or `inf` for the maximum available tokens for a\n     * given model. Defaults to `inf`.\n     *\n     */\n    max_response_output_tokens?: number | 'inf';\n};\n\n/**\n * Realtime session object configuration.\n */\nexport type RealtimeSessionCreateRequest = {\n    /**\n     * The set of modalities the model can respond with. To disable audio,\n     * set this to [\"text\"].\n     *\n     */\n    modalities?: unknown;\n    /**\n     * The Realtime model used for this session.\n     *\n     */\n    model?: 'gpt-4o-realtime-preview' | 'gpt-4o-realtime-preview-2024-10-01' | 'gpt-4o-realtime-preview-2024-12-17' | 'gpt-4o-realtime-preview-2025-06-03' | 'gpt-4o-mini-realtime-preview' | 'gpt-4o-mini-realtime-preview-2024-12-17';\n    /**\n     * The default system instructions (i.e. system message) prepended to model calls. This field allows the client to guide the model on desired responses. The model can be instructed on response content and format, (e.g. \"be extremely succinct\", \"act friendly\", \"here are examples of good responses\") and on audio behavior (e.g. \"talk quickly\", \"inject emotion into your voice\", \"laugh frequently\"). The instructions are not guaranteed to be followed by the model, but they provide guidance to the model on the desired behavior.\n     *\n     * Note that the server sets default instructions which will be used if this field is not set and are visible in the `session.created` event at the start of the session.\n     *\n     */\n    instructions?: string;\n    /**\n     * The voice the model uses to respond. Voice cannot be changed during the\n     * session once the model has responded with audio at least once. Current\n     * voice options are `alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`,\n     * `shimmer`, and `verse`.\n     *\n     */\n    voice?: VoiceIdsShared;\n    /**\n     * The format of input audio. Options are `pcm16`, `g711_ulaw`, or `g711_alaw`.\n     * For `pcm16`, input audio must be 16-bit PCM at a 24kHz sample rate,\n     * single channel (mono), and little-endian byte order.\n     *\n     */\n    input_audio_format?: 'pcm16' | 'g711_ulaw' | 'g711_alaw';\n    /**\n     * The format of output audio. Options are `pcm16`, `g711_ulaw`, or `g711_alaw`.\n     * For `pcm16`, output audio is sampled at a rate of 24kHz.\n     *\n     */\n    output_audio_format?: 'pcm16' | 'g711_ulaw' | 'g711_alaw';\n    /**\n     * Configuration for input audio transcription, defaults to off and can be set to `null` to turn off once on. Input audio transcription is not native to the model, since the model consumes audio directly. Transcription runs asynchronously through [the /audio/transcriptions endpoint](https://platform.openai.com/docs/api-reference/audio/createTranscription) and should be treated as guidance of input audio content rather than precisely what the model heard. The client can optionally set the language and prompt for transcription, these offer additional guidance to the transcription service.\n     *\n     */\n    input_audio_transcription?: {\n        /**\n         * The model to use for transcription, current options are `gpt-4o-transcribe`, `gpt-4o-mini-transcribe`, and `whisper-1`.\n         *\n         */\n        model?: string;\n        /**\n         * The language of the input audio. Supplying the input language in\n         * [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) (e.g. `en`) format\n         * will improve accuracy and latency.\n         *\n         */\n        language?: string;\n        /**\n         * An optional text to guide the model's style or continue a previous audio\n         * segment.\n         * For `whisper-1`, the [prompt is a list of keywords](https://platform.openai.com/docs/guides/speech-to-text#prompting).\n         * For `gpt-4o-transcribe` models, the prompt is a free text string, for example \"expect words related to technology\".\n         *\n         */\n        prompt?: string;\n    };\n    /**\n     * Configuration for turn detection, ether Server VAD or Semantic VAD. This can be set to `null` to turn off, in which case the client must manually trigger model response.\n     * Server VAD means that the model will detect the start and end of speech based on audio volume and respond at the end of user speech.\n     * Semantic VAD is more advanced and uses a turn detection model (in conjunction with VAD) to semantically estimate whether the user has finished speaking, then dynamically sets a timeout based on this probability. For example, if user audio trails off with \"uhhm\", the model will score a low probability of turn end and wait longer for the user to continue speaking. This can be useful for more natural conversations, but may have a higher latency.\n     *\n     */\n    turn_detection?: {\n        /**\n         * Type of turn detection.\n         *\n         */\n        type?: 'server_vad' | 'semantic_vad';\n        /**\n         * Used only for `semantic_vad` mode. The eagerness of the model to respond. `low` will wait longer for the user to continue speaking, `high` will respond more quickly. `auto` is the default and is equivalent to `medium`.\n         *\n         */\n        eagerness?: 'low' | 'medium' | 'high' | 'auto';\n        /**\n         * Used only for `server_vad` mode. Activation threshold for VAD (0.0 to 1.0), this defaults to 0.5. A\n         * higher threshold will require louder audio to activate the model, and\n         * thus might perform better in noisy environments.\n         *\n         */\n        threshold?: number;\n        /**\n         * Used only for `server_vad` mode. Amount of audio to include before the VAD detected speech (in\n         * milliseconds). Defaults to 300ms.\n         *\n         */\n        prefix_padding_ms?: number;\n        /**\n         * Used only for `server_vad` mode. Duration of silence to detect speech stop (in milliseconds). Defaults\n         * to 500ms. With shorter values the model will respond more quickly,\n         * but may jump in on short pauses from the user.\n         *\n         */\n        silence_duration_ms?: number;\n        /**\n         * Whether or not to automatically generate a response when a VAD stop event occurs.\n         *\n         */\n        create_response?: boolean;\n        /**\n         * Whether or not to automatically interrupt any ongoing response with output to the default\n         * conversation (i.e. `conversation` of `auto`) when a VAD start event occurs.\n         *\n         */\n        interrupt_response?: boolean;\n    };\n    /**\n     * Configuration for input audio noise reduction. This can be set to `null` to turn off.\n     * Noise reduction filters audio added to the input audio buffer before it is sent to VAD and the model.\n     * Filtering the audio can improve VAD and turn detection accuracy (reducing false positives) and model performance by improving perception of the input audio.\n     *\n     */\n    input_audio_noise_reduction?: {\n        /**\n         * Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.\n         *\n         */\n        type?: 'near_field' | 'far_field';\n    };\n    /**\n     * The speed of the model's spoken response. 1.0 is the default speed. 0.25 is\n     * the minimum speed. 1.5 is the maximum speed. This value can only be changed\n     * in between model turns, not while a response is in progress.\n     *\n     */\n    speed?: number;\n    /**\n     * Tracing Configuration\n     *\n     * Configuration options for tracing. Set to null to disable tracing. Once\n     * tracing is enabled for a session, the configuration cannot be modified.\n     *\n     * `auto` will create a trace for the session with default values for the\n     * workflow name, group id, and metadata.\n     *\n     */\n    tracing?: 'auto' | {\n        /**\n         * The name of the workflow to attach to this trace. This is used to\n         * name the trace in the traces dashboard.\n         *\n         */\n        workflow_name?: string;\n        /**\n         * The group id to attach to this trace to enable filtering and\n         * grouping in the traces dashboard.\n         *\n         */\n        group_id?: string;\n        /**\n         * The arbitrary metadata to attach to this trace to enable\n         * filtering in the traces dashboard.\n         *\n         */\n        metadata?: {\n            [key: string]: unknown;\n        };\n    };\n    /**\n     * Tools (functions) available to the model.\n     */\n    tools?: Array<{\n        /**\n         * The type of the tool, i.e. `function`.\n         */\n        type?: 'function';\n        /**\n         * The name of the function.\n         */\n        name?: string;\n        /**\n         * The description of the function, including guidance on when and how\n         * to call it, and guidance about what to tell the user when calling\n         * (if anything).\n         *\n         */\n        description?: string;\n        /**\n         * Parameters of the function in JSON Schema.\n         */\n        parameters?: {\n            [key: string]: unknown;\n        };\n    }>;\n    /**\n     * How the model chooses tools. Options are `auto`, `none`, `required`, or\n     * specify a function.\n     *\n     */\n    tool_choice?: string;\n    /**\n     * Sampling temperature for the model, limited to [0.6, 1.2]. For audio models a temperature of 0.8 is highly recommended for best performance.\n     *\n     */\n    temperature?: number;\n    /**\n     * Maximum number of output tokens for a single assistant response,\n     * inclusive of tool calls. Provide an integer between 1 and 4096 to\n     * limit output tokens, or `inf` for the maximum available tokens for a\n     * given model. Defaults to `inf`.\n     *\n     */\n    max_response_output_tokens?: number | 'inf';\n    /**\n     * Configuration options for the generated client secret.\n     *\n     */\n    client_secret?: {\n        /**\n         * Configuration for the ephemeral token expiration.\n         *\n         */\n        expires_after?: {\n            /**\n             * The anchor point for the ephemeral token expiration. Only `created_at` is currently supported.\n             *\n             */\n            anchor: 'created_at';\n            /**\n             * The number of seconds from the anchor point to the expiration. Select a value between `10` and `7200`.\n             *\n             */\n            seconds?: number;\n        };\n    };\n};\n\n/**\n * A new Realtime session configuration, with an ephemeral key. Default TTL\n * for keys is one minute.\n *\n */\nexport type RealtimeSessionCreateResponse = {\n    /**\n     * Ephemeral key returned by the API.\n     */\n    client_secret: {\n        /**\n         * Ephemeral key usable in client environments to authenticate connections\n         * to the Realtime API. Use this in client-side environments rather than\n         * a standard API token, which should only be used server-side.\n         *\n         */\n        value: string;\n        /**\n         * Timestamp for when the token expires. Currently, all tokens expire\n         * after one minute.\n         *\n         */\n        expires_at: number;\n    };\n    /**\n     * The set of modalities the model can respond with. To disable audio,\n     * set this to [\"text\"].\n     *\n     */\n    modalities?: unknown;\n    /**\n     * The default system instructions (i.e. system message) prepended to model\n     * calls. This field allows the client to guide the model on desired\n     * responses. The model can be instructed on response content and format,\n     * (e.g. \"be extremely succinct\", \"act friendly\", \"here are examples of good\n     * responses\") and on audio behavior (e.g. \"talk quickly\", \"inject emotion\n     * into your voice\", \"laugh frequently\"). The instructions are not guaranteed\n     * to be followed by the model, but they provide guidance to the model on the\n     * desired behavior.\n     *\n     * Note that the server sets default instructions which will be used if this\n     * field is not set and are visible in the `session.created` event at the\n     * start of the session.\n     *\n     */\n    instructions?: string;\n    /**\n     * The voice the model uses to respond. Voice cannot be changed during the\n     * session once the model has responded with audio at least once. Current\n     * voice options are `alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`,\n     * `shimmer`, and `verse`.\n     *\n     */\n    voice?: VoiceIdsShared;\n    /**\n     * The format of input audio. Options are `pcm16`, `g711_ulaw`, or `g711_alaw`.\n     *\n     */\n    input_audio_format?: string;\n    /**\n     * The format of output audio. Options are `pcm16`, `g711_ulaw`, or `g711_alaw`.\n     *\n     */\n    output_audio_format?: string;\n    /**\n     * Configuration for input audio transcription, defaults to off and can be\n     * set to `null` to turn off once on. Input audio transcription is not native\n     * to the model, since the model consumes audio directly. Transcription runs\n     * asynchronously and should be treated as rough guidance\n     * rather than the representation understood by the model.\n     *\n     */\n    input_audio_transcription?: {\n        /**\n         * The model to use for transcription.\n         *\n         */\n        model?: string;\n    };\n    /**\n     * The speed of the model's spoken response. 1.0 is the default speed. 0.25 is\n     * the minimum speed. 1.5 is the maximum speed. This value can only be changed\n     * in between model turns, not while a response is in progress.\n     *\n     */\n    speed?: number;\n    /**\n     * Tracing Configuration\n     *\n     * Configuration options for tracing. Set to null to disable tracing. Once\n     * tracing is enabled for a session, the configuration cannot be modified.\n     *\n     * `auto` will create a trace for the session with default values for the\n     * workflow name, group id, and metadata.\n     *\n     */\n    tracing?: 'auto' | {\n        /**\n         * The name of the workflow to attach to this trace. This is used to\n         * name the trace in the traces dashboard.\n         *\n         */\n        workflow_name?: string;\n        /**\n         * The group id to attach to this trace to enable filtering and\n         * grouping in the traces dashboard.\n         *\n         */\n        group_id?: string;\n        /**\n         * The arbitrary metadata to attach to this trace to enable\n         * filtering in the traces dashboard.\n         *\n         */\n        metadata?: {\n            [key: string]: unknown;\n        };\n    };\n    /**\n     * Configuration for turn detection. Can be set to `null` to turn off. Server\n     * VAD means that the model will detect the start and end of speech based on\n     * audio volume and respond at the end of user speech.\n     *\n     */\n    turn_detection?: {\n        /**\n         * Type of turn detection, only `server_vad` is currently supported.\n         *\n         */\n        type?: string;\n        /**\n         * Activation threshold for VAD (0.0 to 1.0), this defaults to 0.5. A\n         * higher threshold will require louder audio to activate the model, and\n         * thus might perform better in noisy environments.\n         *\n         */\n        threshold?: number;\n        /**\n         * Amount of audio to include before the VAD detected speech (in\n         * milliseconds). Defaults to 300ms.\n         *\n         */\n        prefix_padding_ms?: number;\n        /**\n         * Duration of silence to detect speech stop (in milliseconds). Defaults\n         * to 500ms. With shorter values the model will respond more quickly,\n         * but may jump in on short pauses from the user.\n         *\n         */\n        silence_duration_ms?: number;\n    };\n    /**\n     * Tools (functions) available to the model.\n     */\n    tools?: Array<{\n        /**\n         * The type of the tool, i.e. `function`.\n         */\n        type?: 'function';\n        /**\n         * The name of the function.\n         */\n        name?: string;\n        /**\n         * The description of the function, including guidance on when and how\n         * to call it, and guidance about what to tell the user when calling\n         * (if anything).\n         *\n         */\n        description?: string;\n        /**\n         * Parameters of the function in JSON Schema.\n         */\n        parameters?: {\n            [key: string]: unknown;\n        };\n    }>;\n    /**\n     * How the model chooses tools. Options are `auto`, `none`, `required`, or\n     * specify a function.\n     *\n     */\n    tool_choice?: string;\n    /**\n     * Sampling temperature for the model, limited to [0.6, 1.2]. Defaults to 0.8.\n     *\n     */\n    temperature?: number;\n    /**\n     * Maximum number of output tokens for a single assistant response,\n     * inclusive of tool calls. Provide an integer between 1 and 4096 to\n     * limit output tokens, or `inf` for the maximum available tokens for a\n     * given model. Defaults to `inf`.\n     *\n     */\n    max_response_output_tokens?: number | 'inf';\n};\n\n/**\n * Realtime transcription session object configuration.\n */\nexport type RealtimeTranscriptionSessionCreateRequest = {\n    /**\n     * The set of modalities the model can respond with. To disable audio,\n     * set this to [\"text\"].\n     *\n     */\n    modalities?: unknown;\n    /**\n     * The format of input audio. Options are `pcm16`, `g711_ulaw`, or `g711_alaw`.\n     * For `pcm16`, input audio must be 16-bit PCM at a 24kHz sample rate,\n     * single channel (mono), and little-endian byte order.\n     *\n     */\n    input_audio_format?: 'pcm16' | 'g711_ulaw' | 'g711_alaw';\n    /**\n     * Configuration for input audio transcription. The client can optionally set the language and prompt for transcription, these offer additional guidance to the transcription service.\n     *\n     */\n    input_audio_transcription?: {\n        /**\n         * The model to use for transcription, current options are `gpt-4o-transcribe`, `gpt-4o-mini-transcribe`, and `whisper-1`.\n         *\n         */\n        model?: 'gpt-4o-transcribe' | 'gpt-4o-mini-transcribe' | 'whisper-1';\n        /**\n         * The language of the input audio. Supplying the input language in\n         * [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) (e.g. `en`) format\n         * will improve accuracy and latency.\n         *\n         */\n        language?: string;\n        /**\n         * An optional text to guide the model's style or continue a previous audio\n         * segment.\n         * For `whisper-1`, the [prompt is a list of keywords](https://platform.openai.com/docs/guides/speech-to-text#prompting).\n         * For `gpt-4o-transcribe` models, the prompt is a free text string, for example \"expect words related to technology\".\n         *\n         */\n        prompt?: string;\n    };\n    /**\n     * Configuration for turn detection, ether Server VAD or Semantic VAD. This can be set to `null` to turn off, in which case the client must manually trigger model response.\n     * Server VAD means that the model will detect the start and end of speech based on audio volume and respond at the end of user speech.\n     * Semantic VAD is more advanced and uses a turn detection model (in conjunction with VAD) to semantically estimate whether the user has finished speaking, then dynamically sets a timeout based on this probability. For example, if user audio trails off with \"uhhm\", the model will score a low probability of turn end and wait longer for the user to continue speaking. This can be useful for more natural conversations, but may have a higher latency.\n     *\n     */\n    turn_detection?: {\n        /**\n         * Type of turn detection.\n         *\n         */\n        type?: 'server_vad' | 'semantic_vad';\n        /**\n         * Used only for `semantic_vad` mode. The eagerness of the model to respond. `low` will wait longer for the user to continue speaking, `high` will respond more quickly. `auto` is the default and is equivalent to `medium`.\n         *\n         */\n        eagerness?: 'low' | 'medium' | 'high' | 'auto';\n        /**\n         * Used only for `server_vad` mode. Activation threshold for VAD (0.0 to 1.0), this defaults to 0.5. A\n         * higher threshold will require louder audio to activate the model, and\n         * thus might perform better in noisy environments.\n         *\n         */\n        threshold?: number;\n        /**\n         * Used only for `server_vad` mode. Amount of audio to include before the VAD detected speech (in\n         * milliseconds). Defaults to 300ms.\n         *\n         */\n        prefix_padding_ms?: number;\n        /**\n         * Used only for `server_vad` mode. Duration of silence to detect speech stop (in milliseconds). Defaults\n         * to 500ms. With shorter values the model will respond more quickly,\n         * but may jump in on short pauses from the user.\n         *\n         */\n        silence_duration_ms?: number;\n        /**\n         * Whether or not to automatically generate a response when a VAD stop event occurs. Not available for transcription sessions.\n         *\n         */\n        create_response?: boolean;\n        /**\n         * Whether or not to automatically interrupt any ongoing response with output to the default\n         * conversation (i.e. `conversation` of `auto`) when a VAD start event occurs. Not available for transcription sessions.\n         *\n         */\n        interrupt_response?: boolean;\n    };\n    /**\n     * Configuration for input audio noise reduction. This can be set to `null` to turn off.\n     * Noise reduction filters audio added to the input audio buffer before it is sent to VAD and the model.\n     * Filtering the audio can improve VAD and turn detection accuracy (reducing false positives) and model performance by improving perception of the input audio.\n     *\n     */\n    input_audio_noise_reduction?: {\n        /**\n         * Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.\n         *\n         */\n        type?: 'near_field' | 'far_field';\n    };\n    /**\n     * The set of items to include in the transcription. Current available items are:\n     * - `item.input_audio_transcription.logprobs`\n     *\n     */\n    include?: Array<string>;\n    /**\n     * Configuration options for the generated client secret.\n     *\n     */\n    client_secret?: {\n        /**\n         * Configuration for the ephemeral token expiration.\n         *\n         */\n        expires_at?: {\n            /**\n             * The anchor point for the ephemeral token expiration. Only `created_at` is currently supported.\n             *\n             */\n            anchor?: 'created_at';\n            /**\n             * The number of seconds from the anchor point to the expiration. Select a value between `10` and `7200`.\n             *\n             */\n            seconds?: number;\n        };\n    };\n};\n\n/**\n * A new Realtime transcription session configuration.\n *\n * When a session is created on the server via REST API, the session object\n * also contains an ephemeral key. Default TTL for keys is 10 minutes. This\n * property is not present when a session is updated via the WebSocket API.\n *\n */\nexport type RealtimeTranscriptionSessionCreateResponse = {\n    /**\n     * Ephemeral key returned by the API. Only present when the session is\n     * created on the server via REST API.\n     *\n     */\n    client_secret: {\n        /**\n         * Ephemeral key usable in client environments to authenticate connections\n         * to the Realtime API. Use this in client-side environments rather than\n         * a standard API token, which should only be used server-side.\n         *\n         */\n        value: string;\n        /**\n         * Timestamp for when the token expires. Currently, all tokens expire\n         * after one minute.\n         *\n         */\n        expires_at: number;\n    };\n    /**\n     * The set of modalities the model can respond with. To disable audio,\n     * set this to [\"text\"].\n     *\n     */\n    modalities?: unknown;\n    /**\n     * The format of input audio. Options are `pcm16`, `g711_ulaw`, or `g711_alaw`.\n     *\n     */\n    input_audio_format?: string;\n    /**\n     * Configuration of the transcription model.\n     *\n     */\n    input_audio_transcription?: {\n        /**\n         * The model to use for transcription. Can be `gpt-4o-transcribe`, `gpt-4o-mini-transcribe`, or `whisper-1`.\n         *\n         */\n        model?: 'gpt-4o-transcribe' | 'gpt-4o-mini-transcribe' | 'whisper-1';\n        /**\n         * The language of the input audio. Supplying the input language in\n         * [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) (e.g. `en`) format\n         * will improve accuracy and latency.\n         *\n         */\n        language?: string;\n        /**\n         * An optional text to guide the model's style or continue a previous audio\n         * segment. The [prompt](https://platform.openai.com/docs/guides/speech-to-text#prompting) should match\n         * the audio language.\n         *\n         */\n        prompt?: string;\n    };\n    /**\n     * Configuration for turn detection. Can be set to `null` to turn off. Server\n     * VAD means that the model will detect the start and end of speech based on\n     * audio volume and respond at the end of user speech.\n     *\n     */\n    turn_detection?: {\n        /**\n         * Type of turn detection, only `server_vad` is currently supported.\n         *\n         */\n        type?: string;\n        /**\n         * Activation threshold for VAD (0.0 to 1.0), this defaults to 0.5. A\n         * higher threshold will require louder audio to activate the model, and\n         * thus might perform better in noisy environments.\n         *\n         */\n        threshold?: number;\n        /**\n         * Amount of audio to include before the VAD detected speech (in\n         * milliseconds). Defaults to 300ms.\n         *\n         */\n        prefix_padding_ms?: number;\n        /**\n         * Duration of silence to detect speech stop (in milliseconds). Defaults\n         * to 500ms. With shorter values the model will respond more quickly,\n         * but may jump in on short pauses from the user.\n         *\n         */\n        silence_duration_ms?: number;\n    };\n};\n\n/**\n * Reasoning\n *\n * **gpt-5 and o-series models only**\n *\n * Configuration options for\n * [reasoning models](https://platform.openai.com/docs/guides/reasoning).\n *\n */\nexport type Reasoning = {\n    effort?: ReasoningEffort;\n    /**\n     * A summary of the reasoning performed by the model. This can be\n     * useful for debugging and understanding the model's reasoning process.\n     * One of `auto`, `concise`, or `detailed`.\n     *\n     */\n    summary?: 'auto' | 'concise' | 'detailed';\n    /**\n     * **Deprecated:** use `summary` instead.\n     *\n     * A summary of the reasoning performed by the model. This can be\n     * useful for debugging and understanding the model's reasoning process.\n     * One of `auto`, `concise`, or `detailed`.\n     *\n     *\n     * @deprecated\n     */\n    generate_summary?: 'auto' | 'concise' | 'detailed';\n};\n\n/**\n * Constrains effort on reasoning for\n * [reasoning models](https://platform.openai.com/docs/guides/reasoning).\n * Currently supported values are `minimal`, `low`, `medium`, and `high`. Reducing\n * reasoning effort can result in faster responses and fewer tokens used\n * on reasoning in a response.\n *\n */\nexport const ReasoningEffort = {\n    MINIMAL: 'minimal',\n    LOW: 'low',\n    MEDIUM: 'medium',\n    HIGH: 'high'\n} as const;\n\n/**\n * Constrains effort on reasoning for\n * [reasoning models](https://platform.openai.com/docs/guides/reasoning).\n * Currently supported values are `minimal`, `low`, `medium`, and `high`. Reducing\n * reasoning effort can result in faster responses and fewer tokens used\n * on reasoning in a response.\n *\n */\nexport type ReasoningEffort = typeof ReasoningEffort[keyof typeof ReasoningEffort];\n\n/**\n * Reasoning\n *\n * A description of the chain of thought used by a reasoning model while generating\n * a response. Be sure to include these items in your `input` to the Responses API\n * for subsequent turns of a conversation if you are manually\n * [managing context](https://platform.openai.com/docs/guides/conversation-state).\n *\n */\nexport type ReasoningItem = {\n    /**\n     * The type of the object. Always `reasoning`.\n     *\n     */\n    type: 'reasoning';\n    /**\n     * The unique identifier of the reasoning content.\n     *\n     */\n    id: string;\n    /**\n     * The encrypted content of the reasoning item - populated when a response is\n     * generated with `reasoning.encrypted_content` in the `include` parameter.\n     *\n     */\n    encrypted_content?: string;\n    /**\n     * Reasoning summary content.\n     *\n     */\n    summary: Array<{\n        /**\n         * The type of the object. Always `summary_text`.\n         *\n         */\n        type: 'summary_text';\n        /**\n         * A summary of the reasoning output from the model so far.\n         *\n         */\n        text: string;\n    }>;\n    /**\n     * Reasoning text content.\n     *\n     */\n    content?: Array<{\n        /**\n         * The type of the object. Always `reasoning_text`.\n         *\n         */\n        type: 'reasoning_text';\n        /**\n         * Reasoning text output from the model.\n         *\n         */\n        text: string;\n    }>;\n    /**\n     * The status of the item. One of `in_progress`, `completed`, or\n     * `incomplete`. Populated when items are returned via API.\n     *\n     */\n    status?: 'in_progress' | 'completed' | 'incomplete';\n};\n\n/**\n * The response object\n */\nexport type Response = ModelResponseProperties & ResponseProperties & {\n    /**\n     * Unique identifier for this Response.\n     *\n     */\n    id: string;\n    /**\n     * The object type of this resource - always set to `response`.\n     *\n     */\n    object: 'response';\n    /**\n     * The status of the response generation. One of `completed`, `failed`,\n     * `in_progress`, `cancelled`, `queued`, or `incomplete`.\n     *\n     */\n    status?: 'completed' | 'failed' | 'in_progress' | 'cancelled' | 'queued' | 'incomplete';\n    /**\n     * Unix timestamp (in seconds) of when this Response was created.\n     *\n     */\n    created_at: number;\n    error: ResponseError;\n    /**\n     * Details about why the response is incomplete.\n     *\n     */\n    incomplete_details: {\n        /**\n         * The reason why the response is incomplete.\n         */\n        reason?: 'max_output_tokens' | 'content_filter';\n    };\n    /**\n     * An array of content items generated by the model.\n     *\n     * - The length and order of items in the `output` array is dependent\n     * on the model's response.\n     * - Rather than accessing the first item in the `output` array and\n     * assuming it's an `assistant` message with the content generated by\n     * the model, you might consider using the `output_text` property where\n     * supported in SDKs.\n     *\n     */\n    output: Array<OutputItem>;\n    /**\n     * A system (or developer) message inserted into the model's context.\n     *\n     * When using along with `previous_response_id`, the instructions from a previous\n     * response will not be carried over to the next response. This makes it simple\n     * to swap out system (or developer) messages in new responses.\n     *\n     */\n    instructions: string | Array<InputItem>;\n    /**\n     * SDK-only convenience property that contains the aggregated text output\n     * from all `output_text` items in the `output` array, if any are present.\n     * Supported in the Python and JavaScript SDKs.\n     *\n     */\n    output_text?: string;\n    usage?: ResponseUsage;\n    /**\n     * Whether to allow the model to run tool calls in parallel.\n     *\n     */\n    parallel_tool_calls: boolean;\n};\n\n/**\n * Emitted when there is a partial audio response.\n */\nexport type ResponseAudioDeltaEvent = {\n    /**\n     * The type of the event. Always `response.audio.delta`.\n     *\n     */\n    type: 'response.audio.delta';\n    /**\n     * A sequence number for this chunk of the stream response.\n     *\n     */\n    sequence_number: number;\n    /**\n     * A chunk of Base64 encoded response audio bytes.\n     *\n     */\n    delta: string;\n};\n\n/**\n * Emitted when the audio response is complete.\n */\nexport type ResponseAudioDoneEvent = {\n    /**\n     * The type of the event. Always `response.audio.done`.\n     *\n     */\n    type: 'response.audio.done';\n    /**\n     * The sequence number of the delta.\n     *\n     */\n    sequence_number: number;\n};\n\n/**\n * Emitted when there is a partial transcript of audio.\n */\nexport type ResponseAudioTranscriptDeltaEvent = {\n    /**\n     * The type of the event. Always `response.audio.transcript.delta`.\n     *\n     */\n    type: 'response.audio.transcript.delta';\n    /**\n     * The partial transcript of the audio response.\n     *\n     */\n    delta: string;\n    /**\n     * The sequence number of this event.\n     */\n    sequence_number: number;\n};\n\n/**\n * Emitted when the full audio transcript is completed.\n */\nexport type ResponseAudioTranscriptDoneEvent = {\n    /**\n     * The type of the event. Always `response.audio.transcript.done`.\n     *\n     */\n    type: 'response.audio.transcript.done';\n    /**\n     * The sequence number of this event.\n     */\n    sequence_number: number;\n};\n\n/**\n * Emitted when a partial code snippet is streamed by the code interpreter.\n */\nexport type ResponseCodeInterpreterCallCodeDeltaEvent = {\n    /**\n     * The type of the event. Always `response.code_interpreter_call_code.delta`.\n     */\n    type: 'response.code_interpreter_call_code.delta';\n    /**\n     * The index of the output item in the response for which the code is being streamed.\n     */\n    output_index: number;\n    /**\n     * The unique identifier of the code interpreter tool call item.\n     */\n    item_id: string;\n    /**\n     * The partial code snippet being streamed by the code interpreter.\n     */\n    delta: string;\n    /**\n     * The sequence number of this event, used to order streaming events.\n     */\n    sequence_number: number;\n};\n\n/**\n * Emitted when the code snippet is finalized by the code interpreter.\n */\nexport type ResponseCodeInterpreterCallCodeDoneEvent = {\n    /**\n     * The type of the event. Always `response.code_interpreter_call_code.done`.\n     */\n    type: 'response.code_interpreter_call_code.done';\n    /**\n     * The index of the output item in the response for which the code is finalized.\n     */\n    output_index: number;\n    /**\n     * The unique identifier of the code interpreter tool call item.\n     */\n    item_id: string;\n    /**\n     * The final code snippet output by the code interpreter.\n     */\n    code: string;\n    /**\n     * The sequence number of this event, used to order streaming events.\n     */\n    sequence_number: number;\n};\n\n/**\n * Emitted when the code interpreter call is completed.\n */\nexport type ResponseCodeInterpreterCallCompletedEvent = {\n    /**\n     * The type of the event. Always `response.code_interpreter_call.completed`.\n     */\n    type: 'response.code_interpreter_call.completed';\n    /**\n     * The index of the output item in the response for which the code interpreter call is completed.\n     */\n    output_index: number;\n    /**\n     * The unique identifier of the code interpreter tool call item.\n     */\n    item_id: string;\n    /**\n     * The sequence number of this event, used to order streaming events.\n     */\n    sequence_number: number;\n};\n\n/**\n * Emitted when a code interpreter call is in progress.\n */\nexport type ResponseCodeInterpreterCallInProgressEvent = {\n    /**\n     * The type of the event. Always `response.code_interpreter_call.in_progress`.\n     */\n    type: 'response.code_interpreter_call.in_progress';\n    /**\n     * The index of the output item in the response for which the code interpreter call is in progress.\n     */\n    output_index: number;\n    /**\n     * The unique identifier of the code interpreter tool call item.\n     */\n    item_id: string;\n    /**\n     * The sequence number of this event, used to order streaming events.\n     */\n    sequence_number: number;\n};\n\n/**\n * Emitted when the code interpreter is actively interpreting the code snippet.\n */\nexport type ResponseCodeInterpreterCallInterpretingEvent = {\n    /**\n     * The type of the event. Always `response.code_interpreter_call.interpreting`.\n     */\n    type: 'response.code_interpreter_call.interpreting';\n    /**\n     * The index of the output item in the response for which the code interpreter is interpreting code.\n     */\n    output_index: number;\n    /**\n     * The unique identifier of the code interpreter tool call item.\n     */\n    item_id: string;\n    /**\n     * The sequence number of this event, used to order streaming events.\n     */\n    sequence_number: number;\n};\n\n/**\n * Emitted when the model response is complete.\n */\nexport type ResponseCompletedEvent = {\n    /**\n     * The type of the event. Always `response.completed`.\n     *\n     */\n    type: 'response.completed';\n    /**\n     * Properties of the completed response.\n     *\n     */\n    response: Response;\n    /**\n     * The sequence number for this event.\n     */\n    sequence_number: number;\n};\n\n/**\n * Emitted when a new content part is added.\n */\nexport type ResponseContentPartAddedEvent = {\n    /**\n     * The type of the event. Always `response.content_part.added`.\n     *\n     */\n    type: 'response.content_part.added';\n    /**\n     * The ID of the output item that the content part was added to.\n     *\n     */\n    item_id: string;\n    /**\n     * The index of the output item that the content part was added to.\n     *\n     */\n    output_index: number;\n    /**\n     * The index of the content part that was added.\n     *\n     */\n    content_index: number;\n    /**\n     * The content part that was added.\n     *\n     */\n    part: OutputContent;\n    /**\n     * The sequence number of this event.\n     */\n    sequence_number: number;\n};\n\n/**\n * Emitted when a content part is done.\n */\nexport type ResponseContentPartDoneEvent = {\n    /**\n     * The type of the event. Always `response.content_part.done`.\n     *\n     */\n    type: 'response.content_part.done';\n    /**\n     * The ID of the output item that the content part was added to.\n     *\n     */\n    item_id: string;\n    /**\n     * The index of the output item that the content part was added to.\n     *\n     */\n    output_index: number;\n    /**\n     * The index of the content part that is done.\n     *\n     */\n    content_index: number;\n    /**\n     * The sequence number of this event.\n     */\n    sequence_number: number;\n    /**\n     * The content part that is done.\n     *\n     */\n    part: OutputContent;\n};\n\n/**\n * An event that is emitted when a response is created.\n *\n */\nexport type ResponseCreatedEvent = {\n    /**\n     * The type of the event. Always `response.created`.\n     *\n     */\n    type: 'response.created';\n    /**\n     * The response that was created.\n     *\n     */\n    response: Response;\n    /**\n     * The sequence number for this event.\n     */\n    sequence_number: number;\n};\n\n/**\n * ResponseCustomToolCallInputDelta\n *\n * Event representing a delta (partial update) to the input of a custom tool call.\n *\n */\nexport type ResponseCustomToolCallInputDeltaEvent = {\n    /**\n     * The event type identifier.\n     */\n    type: 'response.custom_tool_call_input.delta';\n    /**\n     * The sequence number of this event.\n     */\n    sequence_number: number;\n    /**\n     * The index of the output this delta applies to.\n     */\n    output_index: number;\n    /**\n     * Unique identifier for the API item associated with this event.\n     */\n    item_id: string;\n    /**\n     * The incremental input data (delta) for the custom tool call.\n     */\n    delta: string;\n};\n\n/**\n * ResponseCustomToolCallInputDone\n *\n * Event indicating that input for a custom tool call is complete.\n *\n */\nexport type ResponseCustomToolCallInputDoneEvent = {\n    /**\n     * The event type identifier.\n     */\n    type: 'response.custom_tool_call_input.done';\n    /**\n     * The sequence number of this event.\n     */\n    sequence_number: number;\n    /**\n     * The index of the output this event applies to.\n     */\n    output_index: number;\n    /**\n     * Unique identifier for the API item associated with this event.\n     */\n    item_id: string;\n    /**\n     * The complete input data for the custom tool call.\n     */\n    input: string;\n};\n\n/**\n * An error object returned when the model fails to generate a Response.\n *\n */\nexport type ResponseError = {\n    code: ResponseErrorCode;\n    /**\n     * A human-readable description of the error.\n     *\n     */\n    message: string;\n};\n\n/**\n * The error code for the response.\n *\n */\nexport const ResponseErrorCode = {\n    SERVER_ERROR: 'server_error',\n    RATE_LIMIT_EXCEEDED: 'rate_limit_exceeded',\n    INVALID_PROMPT: 'invalid_prompt',\n    VECTOR_STORE_TIMEOUT: 'vector_store_timeout',\n    INVALID_IMAGE: 'invalid_image',\n    INVALID_IMAGE_FORMAT: 'invalid_image_format',\n    INVALID_BASE64_IMAGE: 'invalid_base64_image',\n    INVALID_IMAGE_URL: 'invalid_image_url',\n    IMAGE_TOO_LARGE: 'image_too_large',\n    IMAGE_TOO_SMALL: 'image_too_small',\n    IMAGE_PARSE_ERROR: 'image_parse_error',\n    IMAGE_CONTENT_POLICY_VIOLATION: 'image_content_policy_violation',\n    INVALID_IMAGE_MODE: 'invalid_image_mode',\n    IMAGE_FILE_TOO_LARGE: 'image_file_too_large',\n    UNSUPPORTED_IMAGE_MEDIA_TYPE: 'unsupported_image_media_type',\n    EMPTY_IMAGE_FILE: 'empty_image_file',\n    FAILED_TO_DOWNLOAD_IMAGE: 'failed_to_download_image',\n    IMAGE_FILE_NOT_FOUND: 'image_file_not_found'\n} as const;\n\n/**\n * The error code for the response.\n *\n */\nexport type ResponseErrorCode = typeof ResponseErrorCode[keyof typeof ResponseErrorCode];\n\n/**\n * Emitted when an error occurs.\n */\nexport type ResponseErrorEvent = {\n    /**\n     * The type of the event. Always `error`.\n     *\n     */\n    type: 'error';\n    /**\n     * The error code.\n     *\n     */\n    code: string;\n    /**\n     * The error message.\n     *\n     */\n    message: string;\n    /**\n     * The error parameter.\n     *\n     */\n    param: string;\n    /**\n     * The sequence number of this event.\n     */\n    sequence_number: number;\n};\n\n/**\n * An event that is emitted when a response fails.\n *\n */\nexport type ResponseFailedEvent = {\n    /**\n     * The type of the event. Always `response.failed`.\n     *\n     */\n    type: 'response.failed';\n    /**\n     * The sequence number of this event.\n     */\n    sequence_number: number;\n    /**\n     * The response that failed.\n     *\n     */\n    response: Response;\n};\n\n/**\n * Emitted when a file search call is completed (results found).\n */\nexport type ResponseFileSearchCallCompletedEvent = {\n    /**\n     * The type of the event. Always `response.file_search_call.completed`.\n     *\n     */\n    type: 'response.file_search_call.completed';\n    /**\n     * The index of the output item that the file search call is initiated.\n     *\n     */\n    output_index: number;\n    /**\n     * The ID of the output item that the file search call is initiated.\n     *\n     */\n    item_id: string;\n    /**\n     * The sequence number of this event.\n     */\n    sequence_number: number;\n};\n\n/**\n * Emitted when a file search call is initiated.\n */\nexport type ResponseFileSearchCallInProgressEvent = {\n    /**\n     * The type of the event. Always `response.file_search_call.in_progress`.\n     *\n     */\n    type: 'response.file_search_call.in_progress';\n    /**\n     * The index of the output item that the file search call is initiated.\n     *\n     */\n    output_index: number;\n    /**\n     * The ID of the output item that the file search call is initiated.\n     *\n     */\n    item_id: string;\n    /**\n     * The sequence number of this event.\n     */\n    sequence_number: number;\n};\n\n/**\n * Emitted when a file search is currently searching.\n */\nexport type ResponseFileSearchCallSearchingEvent = {\n    /**\n     * The type of the event. Always `response.file_search_call.searching`.\n     *\n     */\n    type: 'response.file_search_call.searching';\n    /**\n     * The index of the output item that the file search call is searching.\n     *\n     */\n    output_index: number;\n    /**\n     * The ID of the output item that the file search call is initiated.\n     *\n     */\n    item_id: string;\n    /**\n     * The sequence number of this event.\n     */\n    sequence_number: number;\n};\n\n/**\n * JSON object\n *\n * JSON object response format. An older method of generating JSON responses.\n * Using `json_schema` is recommended for models that support it. Note that the\n * model will not generate JSON without a system or user message instructing it\n * to do so.\n *\n */\nexport type ResponseFormatJsonObject = {\n    /**\n     * The type of response format being defined. Always `json_object`.\n     */\n    type: 'json_object';\n};\n\n/**\n * JSON schema\n *\n * JSON Schema response format. Used to generate structured JSON responses.\n * Learn more about [Structured Outputs](https://platform.openai.com/docs/guides/structured-outputs).\n *\n */\nexport type ResponseFormatJsonSchema = {\n    /**\n     * The type of response format being defined. Always `json_schema`.\n     */\n    type: 'json_schema';\n    /**\n     * JSON schema\n     *\n     * Structured Outputs configuration options, including a JSON Schema.\n     *\n     */\n    json_schema: {\n        /**\n         * A description of what the response format is for, used by the model to\n         * determine how to respond in the format.\n         *\n         */\n        description?: string;\n        /**\n         * The name of the response format. Must be a-z, A-Z, 0-9, or contain\n         * underscores and dashes, with a maximum length of 64.\n         *\n         */\n        name: string;\n        schema?: ResponseFormatJsonSchemaSchema;\n        /**\n         * Whether to enable strict schema adherence when generating the output.\n         * If set to true, the model will always follow the exact schema defined\n         * in the `schema` field. Only a subset of JSON Schema is supported when\n         * `strict` is `true`. To learn more, read the [Structured Outputs\n         * guide](https://platform.openai.com/docs/guides/structured-outputs).\n         *\n         */\n        strict?: boolean;\n    };\n};\n\n/**\n * JSON schema\n *\n * The schema for the response format, described as a JSON Schema object.\n * Learn how to build JSON schemas [here](https://json-schema.org/).\n *\n */\nexport type ResponseFormatJsonSchemaSchema = {\n    [key: string]: unknown;\n};\n\n/**\n * Text\n *\n * Default response format. Used to generate text responses.\n *\n */\nexport type ResponseFormatText = {\n    /**\n     * The type of response format being defined. Always `text`.\n     */\n    type: 'text';\n};\n\n/**\n * Text grammar\n *\n * A custom grammar for the model to follow when generating text.\n * Learn more in the [custom grammars guide](https://platform.openai.com/docs/guides/custom-grammars).\n *\n */\nexport type ResponseFormatTextGrammar = {\n    /**\n     * The type of response format being defined. Always `grammar`.\n     */\n    type: 'grammar';\n    /**\n     * The custom grammar for the model to follow.\n     */\n    grammar: string;\n};\n\n/**\n * Python grammar\n *\n * Configure the model to generate valid Python code. See the\n * [custom grammars guide](https://platform.openai.com/docs/guides/custom-grammars) for more details.\n *\n */\nexport type ResponseFormatTextPython = {\n    /**\n     * The type of response format being defined. Always `python`.\n     */\n    type: 'python';\n};\n\n/**\n * Emitted when there is a partial function-call arguments delta.\n */\nexport type ResponseFunctionCallArgumentsDeltaEvent = {\n    /**\n     * The type of the event. Always `response.function_call_arguments.delta`.\n     *\n     */\n    type: 'response.function_call_arguments.delta';\n    /**\n     * The ID of the output item that the function-call arguments delta is added to.\n     *\n     */\n    item_id: string;\n    /**\n     * The index of the output item that the function-call arguments delta is added to.\n     *\n     */\n    output_index: number;\n    /**\n     * The sequence number of this event.\n     */\n    sequence_number: number;\n    /**\n     * The function-call arguments delta that is added.\n     *\n     */\n    delta: string;\n};\n\n/**\n * Emitted when function-call arguments are finalized.\n */\nexport type ResponseFunctionCallArgumentsDoneEvent = {\n    type: 'response.function_call_arguments.done';\n    /**\n     * The ID of the item.\n     */\n    item_id: string;\n    /**\n     * The index of the output item.\n     */\n    output_index: number;\n    /**\n     * The sequence number of this event.\n     */\n    sequence_number: number;\n    /**\n     * The function-call arguments.\n     */\n    arguments: string;\n};\n\n/**\n * ResponseImageGenCallCompletedEvent\n *\n * Emitted when an image generation tool call has completed and the final image is available.\n *\n */\nexport type ResponseImageGenCallCompletedEvent = {\n    /**\n     * The type of the event. Always 'response.image_generation_call.completed'.\n     */\n    type: 'response.image_generation_call.completed';\n    /**\n     * The index of the output item in the response's output array.\n     */\n    output_index: number;\n    /**\n     * The sequence number of this event.\n     */\n    sequence_number: number;\n    /**\n     * The unique identifier of the image generation item being processed.\n     */\n    item_id: string;\n};\n\n/**\n * ResponseImageGenCallGeneratingEvent\n *\n * Emitted when an image generation tool call is actively generating an image (intermediate state).\n *\n */\nexport type ResponseImageGenCallGeneratingEvent = {\n    /**\n     * The type of the event. Always 'response.image_generation_call.generating'.\n     */\n    type: 'response.image_generation_call.generating';\n    /**\n     * The index of the output item in the response's output array.\n     */\n    output_index: number;\n    /**\n     * The unique identifier of the image generation item being processed.\n     */\n    item_id: string;\n    /**\n     * The sequence number of the image generation item being processed.\n     */\n    sequence_number: number;\n};\n\n/**\n * ResponseImageGenCallInProgressEvent\n *\n * Emitted when an image generation tool call is in progress.\n *\n */\nexport type ResponseImageGenCallInProgressEvent = {\n    /**\n     * The type of the event. Always 'response.image_generation_call.in_progress'.\n     */\n    type: 'response.image_generation_call.in_progress';\n    /**\n     * The index of the output item in the response's output array.\n     */\n    output_index: number;\n    /**\n     * The unique identifier of the image generation item being processed.\n     */\n    item_id: string;\n    /**\n     * The sequence number of the image generation item being processed.\n     */\n    sequence_number: number;\n};\n\n/**\n * ResponseImageGenCallPartialImageEvent\n *\n * Emitted when a partial image is available during image generation streaming.\n *\n */\nexport type ResponseImageGenCallPartialImageEvent = {\n    /**\n     * The type of the event. Always 'response.image_generation_call.partial_image'.\n     */\n    type: 'response.image_generation_call.partial_image';\n    /**\n     * The index of the output item in the response's output array.\n     */\n    output_index: number;\n    /**\n     * The unique identifier of the image generation item being processed.\n     */\n    item_id: string;\n    /**\n     * The sequence number of the image generation item being processed.\n     */\n    sequence_number: number;\n    /**\n     * 0-based index for the partial image (backend is 1-based, but this is 0-based for the user).\n     */\n    partial_image_index: number;\n    /**\n     * Base64-encoded partial image data, suitable for rendering as an image.\n     */\n    partial_image_b64: string;\n};\n\n/**\n * Emitted when the response is in progress.\n */\nexport type ResponseInProgressEvent = {\n    /**\n     * The type of the event. Always `response.in_progress`.\n     *\n     */\n    type: 'response.in_progress';\n    /**\n     * The response that is in progress.\n     *\n     */\n    response: Response;\n    /**\n     * The sequence number of this event.\n     */\n    sequence_number: number;\n};\n\n/**\n * An event that is emitted when a response finishes as incomplete.\n *\n */\nexport type ResponseIncompleteEvent = {\n    /**\n     * The type of the event. Always `response.incomplete`.\n     *\n     */\n    type: 'response.incomplete';\n    /**\n     * The response that was incomplete.\n     *\n     */\n    response: Response;\n    /**\n     * The sequence number of this event.\n     */\n    sequence_number: number;\n};\n\n/**\n * A list of Response items.\n */\nexport type ResponseItemList = {\n    /**\n     * The type of object returned, must be `list`.\n     */\n    object: 'list';\n    /**\n     * A list of items used to generate this response.\n     */\n    data: Array<ItemResource>;\n    /**\n     * Whether there are more items available.\n     */\n    has_more: boolean;\n    /**\n     * The ID of the first item in the list.\n     */\n    first_id: string;\n    /**\n     * The ID of the last item in the list.\n     */\n    last_id: string;\n};\n\n/**\n * A logprob is the logarithmic probability that the model assigns to producing\n * a particular token at a given position in the sequence. Less-negative (higher)\n * logprob values indicate greater model confidence in that token choice.\n *\n */\nexport type ResponseLogProb = {\n    /**\n     * A possible text token.\n     */\n    token: string;\n    /**\n     * The log probability of this token.\n     *\n     */\n    logprob: number;\n    /**\n     * The log probability of the top 20 most likely tokens.\n     *\n     */\n    top_logprobs?: Array<{\n        /**\n         * A possible text token.\n         */\n        token?: string;\n        /**\n         * The log probability of this token.\n         */\n        logprob?: number;\n    }>;\n};\n\n/**\n * ResponseMCPCallArgumentsDeltaEvent\n *\n * Emitted when there is a delta (partial update) to the arguments of an MCP tool call.\n *\n */\nexport type ResponseMcpCallArgumentsDeltaEvent = {\n    /**\n     * The type of the event. Always 'response.mcp_call_arguments.delta'.\n     */\n    type: 'response.mcp_call_arguments.delta';\n    /**\n     * The index of the output item in the response's output array.\n     */\n    output_index: number;\n    /**\n     * The unique identifier of the MCP tool call item being processed.\n     */\n    item_id: string;\n    /**\n     * A JSON string containing the partial update to the arguments for the MCP tool call.\n     *\n     */\n    delta: string;\n    /**\n     * The sequence number of this event.\n     */\n    sequence_number: number;\n};\n\n/**\n * ResponseMCPCallArgumentsDoneEvent\n *\n * Emitted when the arguments for an MCP tool call are finalized.\n *\n */\nexport type ResponseMcpCallArgumentsDoneEvent = {\n    /**\n     * The type of the event. Always 'response.mcp_call_arguments.done'.\n     */\n    type: 'response.mcp_call_arguments.done';\n    /**\n     * The index of the output item in the response's output array.\n     */\n    output_index: number;\n    /**\n     * The unique identifier of the MCP tool call item being processed.\n     */\n    item_id: string;\n    /**\n     * A JSON string containing the finalized arguments for the MCP tool call.\n     *\n     */\n    arguments: string;\n    /**\n     * The sequence number of this event.\n     */\n    sequence_number: number;\n};\n\n/**\n * ResponseMCPCallCompletedEvent\n *\n * Emitted when an MCP  tool call has completed successfully.\n *\n */\nexport type ResponseMcpCallCompletedEvent = {\n    /**\n     * The type of the event. Always 'response.mcp_call.completed'.\n     */\n    type: 'response.mcp_call.completed';\n    /**\n     * The ID of the MCP tool call item that completed.\n     */\n    item_id: string;\n    /**\n     * The index of the output item that completed.\n     */\n    output_index: number;\n    /**\n     * The sequence number of this event.\n     */\n    sequence_number: number;\n};\n\n/**\n * ResponseMCPCallFailedEvent\n *\n * Emitted when an MCP  tool call has failed.\n *\n */\nexport type ResponseMcpCallFailedEvent = {\n    /**\n     * The type of the event. Always 'response.mcp_call.failed'.\n     */\n    type: 'response.mcp_call.failed';\n    /**\n     * The ID of the MCP tool call item that failed.\n     */\n    item_id: string;\n    /**\n     * The index of the output item that failed.\n     */\n    output_index: number;\n    /**\n     * The sequence number of this event.\n     */\n    sequence_number: number;\n};\n\n/**\n * ResponseMCPCallInProgressEvent\n *\n * Emitted when an MCP  tool call is in progress.\n *\n */\nexport type ResponseMcpCallInProgressEvent = {\n    /**\n     * The type of the event. Always 'response.mcp_call.in_progress'.\n     */\n    type: 'response.mcp_call.in_progress';\n    /**\n     * The sequence number of this event.\n     */\n    sequence_number: number;\n    /**\n     * The index of the output item in the response's output array.\n     */\n    output_index: number;\n    /**\n     * The unique identifier of the MCP tool call item being processed.\n     */\n    item_id: string;\n};\n\n/**\n * ResponseMCPListToolsCompletedEvent\n *\n * Emitted when the list of available MCP tools has been successfully retrieved.\n *\n */\nexport type ResponseMcpListToolsCompletedEvent = {\n    /**\n     * The type of the event. Always 'response.mcp_list_tools.completed'.\n     */\n    type: 'response.mcp_list_tools.completed';\n    /**\n     * The ID of the MCP tool call item that produced this output.\n     */\n    item_id: string;\n    /**\n     * The index of the output item that was processed.\n     */\n    output_index: number;\n    /**\n     * The sequence number of this event.\n     */\n    sequence_number: number;\n};\n\n/**\n * ResponseMCPListToolsFailedEvent\n *\n * Emitted when the attempt to list available MCP tools has failed.\n *\n */\nexport type ResponseMcpListToolsFailedEvent = {\n    /**\n     * The type of the event. Always 'response.mcp_list_tools.failed'.\n     */\n    type: 'response.mcp_list_tools.failed';\n    /**\n     * The ID of the MCP tool call item that failed.\n     */\n    item_id: string;\n    /**\n     * The index of the output item that failed.\n     */\n    output_index: number;\n    /**\n     * The sequence number of this event.\n     */\n    sequence_number: number;\n};\n\n/**\n * ResponseMCPListToolsInProgressEvent\n *\n * Emitted when the system is in the process of retrieving the list of available MCP tools.\n *\n */\nexport type ResponseMcpListToolsInProgressEvent = {\n    /**\n     * The type of the event. Always 'response.mcp_list_tools.in_progress'.\n     */\n    type: 'response.mcp_list_tools.in_progress';\n    /**\n     * The ID of the MCP tool call item that is being processed.\n     */\n    item_id: string;\n    /**\n     * The index of the output item that is being processed.\n     */\n    output_index: number;\n    /**\n     * The sequence number of this event.\n     */\n    sequence_number: number;\n};\n\n/**\n * Output types that you would like the model to generate.\n * Most models are capable of generating text, which is the default:\n *\n * `[\"text\"]`\n *\n * The `gpt-4o-audio-preview` model can also be used to\n * [generate audio](https://platform.openai.com/docs/guides/audio). To request that this model generate\n * both text and audio responses, you can use:\n *\n * `[\"text\", \"audio\"]`\n *\n */\nexport type ResponseModalities = Array<'text' | 'audio'>;\n\n/**\n * Emitted when a new output item is added.\n */\nexport type ResponseOutputItemAddedEvent = {\n    /**\n     * The type of the event. Always `response.output_item.added`.\n     *\n     */\n    type: 'response.output_item.added';\n    /**\n     * The index of the output item that was added.\n     *\n     */\n    output_index: number;\n    /**\n     * The sequence number of this event.\n     *\n     */\n    sequence_number: number;\n    /**\n     * The output item that was added.\n     *\n     */\n    item: OutputItem;\n};\n\n/**\n * Emitted when an output item is marked done.\n */\nexport type ResponseOutputItemDoneEvent = {\n    /**\n     * The type of the event. Always `response.output_item.done`.\n     *\n     */\n    type: 'response.output_item.done';\n    /**\n     * The index of the output item that was marked done.\n     *\n     */\n    output_index: number;\n    /**\n     * The sequence number of this event.\n     *\n     */\n    sequence_number: number;\n    /**\n     * The output item that was marked done.\n     *\n     */\n    item: OutputItem;\n};\n\n/**\n * ResponseOutputTextAnnotationAddedEvent\n *\n * Emitted when an annotation is added to output text content.\n *\n */\nexport type ResponseOutputTextAnnotationAddedEvent = {\n    /**\n     * The type of the event. Always 'response.output_text.annotation.added'.\n     */\n    type: 'response.output_text.annotation.added';\n    /**\n     * The unique identifier of the item to which the annotation is being added.\n     */\n    item_id: string;\n    /**\n     * The index of the output item in the response's output array.\n     */\n    output_index: number;\n    /**\n     * The index of the content part within the output item.\n     */\n    content_index: number;\n    /**\n     * The index of the annotation within the content part.\n     */\n    annotation_index: number;\n    /**\n     * The sequence number of this event.\n     */\n    sequence_number: number;\n    /**\n     * The annotation object being added. (See annotation schema for details.)\n     */\n    annotation: {\n        [key: string]: unknown;\n    };\n};\n\n/**\n * Prompt Variables\n *\n * Optional map of values to substitute in for variables in your\n * prompt. The substitution values can either be strings, or other\n * Response input types like images or files.\n *\n */\nexport type ResponsePromptVariables = {\n    [key: string]: string | InputTextContent | InputImageContent | InputFileContent;\n};\n\nexport type ResponseProperties = {\n    /**\n     * The unique ID of the previous response to the model. Use this to\n     * create multi-turn conversations. Learn more about\n     * [conversation state](https://platform.openai.com/docs/guides/conversation-state).\n     *\n     */\n    previous_response_id?: string;\n    /**\n     * Model ID used to generate the response, like `gpt-4o` or `o3`. OpenAI\n     * offers a wide range of models with different capabilities, performance\n     * characteristics, and price points. Refer to the [model guide](https://platform.openai.com/docs/models)\n     * to browse and compare available models.\n     *\n     */\n    model?: ModelIdsResponses;\n    reasoning?: Reasoning;\n    /**\n     * Whether to run the model response in the background.\n     * [Learn more](https://platform.openai.com/docs/guides/background).\n     *\n     */\n    background?: boolean;\n    /**\n     * An upper bound for the number of tokens that can be generated for a response, including visible output tokens and [reasoning tokens](https://platform.openai.com/docs/guides/reasoning).\n     *\n     */\n    max_output_tokens?: number;\n    /**\n     * The maximum number of total calls to built-in tools that can be processed in a response. This maximum number applies across all built-in tool calls, not per individual tool. Any further attempts to call a tool by the model will be ignored.\n     *\n     */\n    max_tool_calls?: number;\n    /**\n     * Configuration options for a text response from the model. Can be plain\n     * text or structured JSON data. Learn more:\n     * - [Text inputs and outputs](https://platform.openai.com/docs/guides/text)\n     * - [Structured Outputs](https://platform.openai.com/docs/guides/structured-outputs)\n     *\n     */\n    text?: {\n        format?: TextResponseFormatConfiguration;\n        verbosity?: Verbosity;\n    };\n    /**\n     * An array of tools the model may call while generating a response. You\n     * can specify which tool to use by setting the `tool_choice` parameter.\n     *\n     * The two categories of tools you can provide the model are:\n     *\n     * - **Built-in tools**: Tools that are provided by OpenAI that extend the\n     * model's capabilities, like [web search](https://platform.openai.com/docs/guides/tools-web-search)\n     * or [file search](https://platform.openai.com/docs/guides/tools-file-search). Learn more about\n     * [built-in tools](https://platform.openai.com/docs/guides/tools).\n     * - **Function calls (custom tools)**: Functions that are defined by you,\n     * enabling the model to call your own code with strongly typed arguments\n     * and outputs. Learn more about\n     * [function calling](https://platform.openai.com/docs/guides/function-calling). You can also use\n     * custom tools to call your own code.\n     *\n     */\n    tools?: Array<Tool>;\n    /**\n     * How the model should select which tool (or tools) to use when generating\n     * a response. See the `tools` parameter to see how to specify which tools\n     * the model can call.\n     *\n     */\n    tool_choice?: ToolChoiceOptions | ToolChoiceAllowed | ToolChoiceTypes | ToolChoiceFunction | ToolChoiceMcp | ToolChoiceCustom;\n    prompt?: Prompt;\n    /**\n     * The truncation strategy to use for the model response.\n     * - `auto`: If the context of this response and previous ones exceeds\n     * the model's context window size, the model will truncate the\n     * response to fit the context window by dropping input items in the\n     * middle of the conversation.\n     * - `disabled` (default): If a model response will exceed the context window\n     * size for a model, the request will fail with a 400 error.\n     *\n     */\n    truncation?: 'auto' | 'disabled';\n};\n\n/**\n * ResponseQueuedEvent\n *\n * Emitted when a response is queued and waiting to be processed.\n *\n */\nexport type ResponseQueuedEvent = {\n    /**\n     * The type of the event. Always 'response.queued'.\n     */\n    type: 'response.queued';\n    /**\n     * The full response object that is queued.\n     */\n    response: Response;\n    /**\n     * The sequence number for this event.\n     */\n    sequence_number: number;\n};\n\n/**\n * Emitted when a new reasoning summary part is added.\n */\nexport type ResponseReasoningSummaryPartAddedEvent = {\n    /**\n     * The type of the event. Always `response.reasoning_summary_part.added`.\n     *\n     */\n    type: 'response.reasoning_summary_part.added';\n    /**\n     * The ID of the item this summary part is associated with.\n     *\n     */\n    item_id: string;\n    /**\n     * The index of the output item this summary part is associated with.\n     *\n     */\n    output_index: number;\n    /**\n     * The index of the summary part within the reasoning summary.\n     *\n     */\n    summary_index: number;\n    /**\n     * The sequence number of this event.\n     *\n     */\n    sequence_number: number;\n    /**\n     * The summary part that was added.\n     *\n     */\n    part: {\n        /**\n         * The type of the summary part. Always `summary_text`.\n         */\n        type: 'summary_text';\n        /**\n         * The text of the summary part.\n         */\n        text: string;\n    };\n};\n\n/**\n * Emitted when a reasoning summary part is completed.\n */\nexport type ResponseReasoningSummaryPartDoneEvent = {\n    /**\n     * The type of the event. Always `response.reasoning_summary_part.done`.\n     *\n     */\n    type: 'response.reasoning_summary_part.done';\n    /**\n     * The ID of the item this summary part is associated with.\n     *\n     */\n    item_id: string;\n    /**\n     * The index of the output item this summary part is associated with.\n     *\n     */\n    output_index: number;\n    /**\n     * The index of the summary part within the reasoning summary.\n     *\n     */\n    summary_index: number;\n    /**\n     * The sequence number of this event.\n     *\n     */\n    sequence_number: number;\n    /**\n     * The completed summary part.\n     *\n     */\n    part: {\n        /**\n         * The type of the summary part. Always `summary_text`.\n         */\n        type: 'summary_text';\n        /**\n         * The text of the summary part.\n         */\n        text: string;\n    };\n};\n\n/**\n * Emitted when a delta is added to a reasoning summary text.\n */\nexport type ResponseReasoningSummaryTextDeltaEvent = {\n    /**\n     * The type of the event. Always `response.reasoning_summary_text.delta`.\n     *\n     */\n    type: 'response.reasoning_summary_text.delta';\n    /**\n     * The ID of the item this summary text delta is associated with.\n     *\n     */\n    item_id: string;\n    /**\n     * The index of the output item this summary text delta is associated with.\n     *\n     */\n    output_index: number;\n    /**\n     * The index of the summary part within the reasoning summary.\n     *\n     */\n    summary_index: number;\n    /**\n     * The text delta that was added to the summary.\n     *\n     */\n    delta: string;\n    /**\n     * The sequence number of this event.\n     *\n     */\n    sequence_number: number;\n};\n\n/**\n * Emitted when a reasoning summary text is completed.\n */\nexport type ResponseReasoningSummaryTextDoneEvent = {\n    /**\n     * The type of the event. Always `response.reasoning_summary_text.done`.\n     *\n     */\n    type: 'response.reasoning_summary_text.done';\n    /**\n     * The ID of the item this summary text is associated with.\n     *\n     */\n    item_id: string;\n    /**\n     * The index of the output item this summary text is associated with.\n     *\n     */\n    output_index: number;\n    /**\n     * The index of the summary part within the reasoning summary.\n     *\n     */\n    summary_index: number;\n    /**\n     * The full text of the completed reasoning summary.\n     *\n     */\n    text: string;\n    /**\n     * The sequence number of this event.\n     *\n     */\n    sequence_number: number;\n};\n\n/**\n * Emitted when a delta is added to a reasoning text.\n */\nexport type ResponseReasoningTextDeltaEvent = {\n    /**\n     * The type of the event. Always `response.reasoning_text.delta`.\n     *\n     */\n    type: 'response.reasoning_text.delta';\n    /**\n     * The ID of the item this reasoning text delta is associated with.\n     *\n     */\n    item_id: string;\n    /**\n     * The index of the output item this reasoning text delta is associated with.\n     *\n     */\n    output_index: number;\n    /**\n     * The index of the reasoning content part this delta is associated with.\n     *\n     */\n    content_index: number;\n    /**\n     * The text delta that was added to the reasoning content.\n     *\n     */\n    delta: string;\n    /**\n     * The sequence number of this event.\n     *\n     */\n    sequence_number: number;\n};\n\n/**\n * Emitted when a reasoning text is completed.\n */\nexport type ResponseReasoningTextDoneEvent = {\n    /**\n     * The type of the event. Always `response.reasoning_text.done`.\n     *\n     */\n    type: 'response.reasoning_text.done';\n    /**\n     * The ID of the item this reasoning text is associated with.\n     *\n     */\n    item_id: string;\n    /**\n     * The index of the output item this reasoning text is associated with.\n     *\n     */\n    output_index: number;\n    /**\n     * The index of the reasoning content part.\n     *\n     */\n    content_index: number;\n    /**\n     * The full text of the completed reasoning content.\n     *\n     */\n    text: string;\n    /**\n     * The sequence number of this event.\n     *\n     */\n    sequence_number: number;\n};\n\n/**\n * Emitted when there is a partial refusal text.\n */\nexport type ResponseRefusalDeltaEvent = {\n    /**\n     * The type of the event. Always `response.refusal.delta`.\n     *\n     */\n    type: 'response.refusal.delta';\n    /**\n     * The ID of the output item that the refusal text is added to.\n     *\n     */\n    item_id: string;\n    /**\n     * The index of the output item that the refusal text is added to.\n     *\n     */\n    output_index: number;\n    /**\n     * The index of the content part that the refusal text is added to.\n     *\n     */\n    content_index: number;\n    /**\n     * The refusal text that is added.\n     *\n     */\n    delta: string;\n    /**\n     * The sequence number of this event.\n     *\n     */\n    sequence_number: number;\n};\n\n/**\n * Emitted when refusal text is finalized.\n */\nexport type ResponseRefusalDoneEvent = {\n    /**\n     * The type of the event. Always `response.refusal.done`.\n     *\n     */\n    type: 'response.refusal.done';\n    /**\n     * The ID of the output item that the refusal text is finalized.\n     *\n     */\n    item_id: string;\n    /**\n     * The index of the output item that the refusal text is finalized.\n     *\n     */\n    output_index: number;\n    /**\n     * The index of the content part that the refusal text is finalized.\n     *\n     */\n    content_index: number;\n    /**\n     * The refusal text that is finalized.\n     *\n     */\n    refusal: string;\n    /**\n     * The sequence number of this event.\n     *\n     */\n    sequence_number: number;\n};\n\nexport type ResponseStreamEvent = ({\n    type?: 'ResponseAudioDeltaEvent';\n} & ResponseAudioDeltaEvent) | ({\n    type?: 'ResponseAudioDoneEvent';\n} & ResponseAudioDoneEvent) | ({\n    type?: 'ResponseAudioTranscriptDeltaEvent';\n} & ResponseAudioTranscriptDeltaEvent) | ({\n    type?: 'ResponseAudioTranscriptDoneEvent';\n} & ResponseAudioTranscriptDoneEvent) | ({\n    type?: 'ResponseCodeInterpreterCallCodeDeltaEvent';\n} & ResponseCodeInterpreterCallCodeDeltaEvent) | ({\n    type?: 'ResponseCodeInterpreterCallCodeDoneEvent';\n} & ResponseCodeInterpreterCallCodeDoneEvent) | ({\n    type?: 'ResponseCodeInterpreterCallCompletedEvent';\n} & ResponseCodeInterpreterCallCompletedEvent) | ({\n    type?: 'ResponseCodeInterpreterCallInProgressEvent';\n} & ResponseCodeInterpreterCallInProgressEvent) | ({\n    type?: 'ResponseCodeInterpreterCallInterpretingEvent';\n} & ResponseCodeInterpreterCallInterpretingEvent) | ({\n    type?: 'ResponseCompletedEvent';\n} & ResponseCompletedEvent) | ({\n    type?: 'ResponseContentPartAddedEvent';\n} & ResponseContentPartAddedEvent) | ({\n    type?: 'ResponseContentPartDoneEvent';\n} & ResponseContentPartDoneEvent) | ({\n    type?: 'ResponseCreatedEvent';\n} & ResponseCreatedEvent) | ({\n    type?: 'ResponseErrorEvent';\n} & ResponseErrorEvent) | ({\n    type?: 'ResponseFileSearchCallCompletedEvent';\n} & ResponseFileSearchCallCompletedEvent) | ({\n    type?: 'ResponseFileSearchCallInProgressEvent';\n} & ResponseFileSearchCallInProgressEvent) | ({\n    type?: 'ResponseFileSearchCallSearchingEvent';\n} & ResponseFileSearchCallSearchingEvent) | ({\n    type?: 'ResponseFunctionCallArgumentsDeltaEvent';\n} & ResponseFunctionCallArgumentsDeltaEvent) | ({\n    type?: 'ResponseFunctionCallArgumentsDoneEvent';\n} & ResponseFunctionCallArgumentsDoneEvent) | ({\n    type?: 'ResponseInProgressEvent';\n} & ResponseInProgressEvent) | ({\n    type?: 'ResponseFailedEvent';\n} & ResponseFailedEvent) | ({\n    type?: 'ResponseIncompleteEvent';\n} & ResponseIncompleteEvent) | ({\n    type?: 'ResponseOutputItemAddedEvent';\n} & ResponseOutputItemAddedEvent) | ({\n    type?: 'ResponseOutputItemDoneEvent';\n} & ResponseOutputItemDoneEvent) | ({\n    type?: 'ResponseReasoningSummaryPartAddedEvent';\n} & ResponseReasoningSummaryPartAddedEvent) | ({\n    type?: 'ResponseReasoningSummaryPartDoneEvent';\n} & ResponseReasoningSummaryPartDoneEvent) | ({\n    type?: 'ResponseReasoningSummaryTextDeltaEvent';\n} & ResponseReasoningSummaryTextDeltaEvent) | ({\n    type?: 'ResponseReasoningSummaryTextDoneEvent';\n} & ResponseReasoningSummaryTextDoneEvent) | ({\n    type?: 'ResponseReasoningTextDeltaEvent';\n} & ResponseReasoningTextDeltaEvent) | ({\n    type?: 'ResponseReasoningTextDoneEvent';\n} & ResponseReasoningTextDoneEvent) | ({\n    type?: 'ResponseRefusalDeltaEvent';\n} & ResponseRefusalDeltaEvent) | ({\n    type?: 'ResponseRefusalDoneEvent';\n} & ResponseRefusalDoneEvent) | ({\n    type?: 'ResponseTextDeltaEvent';\n} & ResponseTextDeltaEvent) | ({\n    type?: 'ResponseTextDoneEvent';\n} & ResponseTextDoneEvent) | ({\n    type?: 'ResponseWebSearchCallCompletedEvent';\n} & ResponseWebSearchCallCompletedEvent) | ({\n    type?: 'ResponseWebSearchCallInProgressEvent';\n} & ResponseWebSearchCallInProgressEvent) | ({\n    type?: 'ResponseWebSearchCallSearchingEvent';\n} & ResponseWebSearchCallSearchingEvent) | ({\n    type?: 'ResponseImageGenCallCompletedEvent';\n} & ResponseImageGenCallCompletedEvent) | ({\n    type?: 'ResponseImageGenCallGeneratingEvent';\n} & ResponseImageGenCallGeneratingEvent) | ({\n    type?: 'ResponseImageGenCallInProgressEvent';\n} & ResponseImageGenCallInProgressEvent) | ({\n    type?: 'ResponseImageGenCallPartialImageEvent';\n} & ResponseImageGenCallPartialImageEvent) | ({\n    type?: 'ResponseMCPCallArgumentsDeltaEvent';\n} & ResponseMcpCallArgumentsDeltaEvent) | ({\n    type?: 'ResponseMCPCallArgumentsDoneEvent';\n} & ResponseMcpCallArgumentsDoneEvent) | ({\n    type?: 'ResponseMCPCallCompletedEvent';\n} & ResponseMcpCallCompletedEvent) | ({\n    type?: 'ResponseMCPCallFailedEvent';\n} & ResponseMcpCallFailedEvent) | ({\n    type?: 'ResponseMCPCallInProgressEvent';\n} & ResponseMcpCallInProgressEvent) | ({\n    type?: 'ResponseMCPListToolsCompletedEvent';\n} & ResponseMcpListToolsCompletedEvent) | ({\n    type?: 'ResponseMCPListToolsFailedEvent';\n} & ResponseMcpListToolsFailedEvent) | ({\n    type?: 'ResponseMCPListToolsInProgressEvent';\n} & ResponseMcpListToolsInProgressEvent) | ({\n    type?: 'ResponseOutputTextAnnotationAddedEvent';\n} & ResponseOutputTextAnnotationAddedEvent) | ({\n    type?: 'ResponseQueuedEvent';\n} & ResponseQueuedEvent) | ({\n    type?: 'ResponseCustomToolCallInputDeltaEvent';\n} & ResponseCustomToolCallInputDeltaEvent) | ({\n    type?: 'ResponseCustomToolCallInputDoneEvent';\n} & ResponseCustomToolCallInputDoneEvent);\n\n/**\n * Options for streaming responses. Only set this when you set `stream: true`.\n *\n */\nexport type ResponseStreamOptions = {\n    /**\n     * When true, stream obfuscation will be enabled. Stream obfuscation adds\n     * random characters to an `obfuscation` field on streaming delta events to\n     * normalize payload sizes as a mitigation to certain side-channel attacks.\n     * These obfuscation fields are included by default, but add a small amount\n     * of overhead to the data stream. You can set `include_obfuscation` to\n     * false to optimize for bandwidth if you trust the network links between\n     * your application and the OpenAI API.\n     *\n     */\n    include_obfuscation?: boolean;\n};\n\n/**\n * Emitted when there is an additional text delta.\n */\nexport type ResponseTextDeltaEvent = {\n    /**\n     * The type of the event. Always `response.output_text.delta`.\n     *\n     */\n    type: 'response.output_text.delta';\n    /**\n     * The ID of the output item that the text delta was added to.\n     *\n     */\n    item_id: string;\n    /**\n     * The index of the output item that the text delta was added to.\n     *\n     */\n    output_index: number;\n    /**\n     * The index of the content part that the text delta was added to.\n     *\n     */\n    content_index: number;\n    /**\n     * The text delta that was added.\n     *\n     */\n    delta: string;\n    /**\n     * The sequence number for this event.\n     */\n    sequence_number: number;\n    /**\n     * The log probabilities of the tokens in the delta.\n     *\n     */\n    logprobs: Array<ResponseLogProb>;\n};\n\n/**\n * Emitted when text content is finalized.\n */\nexport type ResponseTextDoneEvent = {\n    /**\n     * The type of the event. Always `response.output_text.done`.\n     *\n     */\n    type: 'response.output_text.done';\n    /**\n     * The ID of the output item that the text content is finalized.\n     *\n     */\n    item_id: string;\n    /**\n     * The index of the output item that the text content is finalized.\n     *\n     */\n    output_index: number;\n    /**\n     * The index of the content part that the text content is finalized.\n     *\n     */\n    content_index: number;\n    /**\n     * The text content that is finalized.\n     *\n     */\n    text: string;\n    /**\n     * The sequence number for this event.\n     */\n    sequence_number: number;\n    /**\n     * The log probabilities of the tokens in the delta.\n     *\n     */\n    logprobs: Array<ResponseLogProb>;\n};\n\n/**\n * Represents token usage details including input tokens, output tokens,\n * a breakdown of output tokens, and the total tokens used.\n *\n */\nexport type ResponseUsage = {\n    /**\n     * The number of input tokens.\n     */\n    input_tokens: number;\n    /**\n     * A detailed breakdown of the input tokens.\n     */\n    input_tokens_details: {\n        /**\n         * The number of tokens that were retrieved from the cache.\n         * [More on prompt caching](https://platform.openai.com/docs/guides/prompt-caching).\n         *\n         */\n        cached_tokens: number;\n    };\n    /**\n     * The number of output tokens.\n     */\n    output_tokens: number;\n    /**\n     * A detailed breakdown of the output tokens.\n     */\n    output_tokens_details: {\n        /**\n         * The number of reasoning tokens.\n         */\n        reasoning_tokens: number;\n    };\n    /**\n     * The total number of tokens used.\n     */\n    total_tokens: number;\n};\n\n/**\n * Emitted when a web search call is completed.\n */\nexport type ResponseWebSearchCallCompletedEvent = {\n    /**\n     * The type of the event. Always `response.web_search_call.completed`.\n     *\n     */\n    type: 'response.web_search_call.completed';\n    /**\n     * The index of the output item that the web search call is associated with.\n     *\n     */\n    output_index: number;\n    /**\n     * Unique ID for the output item associated with the web search call.\n     *\n     */\n    item_id: string;\n    /**\n     * The sequence number of the web search call being processed.\n     */\n    sequence_number: number;\n};\n\n/**\n * Emitted when a web search call is initiated.\n */\nexport type ResponseWebSearchCallInProgressEvent = {\n    /**\n     * The type of the event. Always `response.web_search_call.in_progress`.\n     *\n     */\n    type: 'response.web_search_call.in_progress';\n    /**\n     * The index of the output item that the web search call is associated with.\n     *\n     */\n    output_index: number;\n    /**\n     * Unique ID for the output item associated with the web search call.\n     *\n     */\n    item_id: string;\n    /**\n     * The sequence number of the web search call being processed.\n     */\n    sequence_number: number;\n};\n\n/**\n * Emitted when a web search call is executing.\n */\nexport type ResponseWebSearchCallSearchingEvent = {\n    /**\n     * The type of the event. Always `response.web_search_call.searching`.\n     *\n     */\n    type: 'response.web_search_call.searching';\n    /**\n     * The index of the output item that the web search call is associated with.\n     *\n     */\n    output_index: number;\n    /**\n     * Unique ID for the output item associated with the web search call.\n     *\n     */\n    item_id: string;\n    /**\n     * The sequence number of the web search call being processed.\n     */\n    sequence_number: number;\n};\n\n/**\n * Usage statistics related to the run. This value will be `null` if the run is not in a terminal state (i.e. `in_progress`, `queued`, etc.).\n */\nexport type RunCompletionUsage = {\n    /**\n     * Number of completion tokens used over the course of the run.\n     */\n    completion_tokens: number;\n    /**\n     * Number of prompt tokens used over the course of the run.\n     */\n    prompt_tokens: number;\n    /**\n     * Total number of tokens used (prompt + completion).\n     */\n    total_tokens: number;\n};\n\n/**\n * RunGraderRequest\n */\nexport type RunGraderRequest = {\n    /**\n     * The grader used for the fine-tuning job.\n     */\n    grader: ({\n        type?: 'GraderStringCheck';\n    } & GraderStringCheck) | ({\n        type?: 'GraderTextSimilarity';\n    } & GraderTextSimilarity) | ({\n        type?: 'GraderPython';\n    } & GraderPython) | ({\n        type?: 'GraderScoreModel';\n    } & GraderScoreModel) | ({\n        type?: 'GraderMulti';\n    } & GraderMulti);\n    /**\n     * The dataset item provided to the grader. This will be used to populate\n     * the `item` namespace. See [the guide](https://platform.openai.com/docs/guides/graders) for more details.\n     *\n     */\n    item?: {\n        [key: string]: unknown;\n    };\n    /**\n     * The model sample to be evaluated. This value will be used to populate\n     * the `sample` namespace. See [the guide](https://platform.openai.com/docs/guides/graders) for more details.\n     * The `output_json` variable will be populated if the model sample is a\n     * valid JSON string.\n     *\n     */\n    model_sample: string;\n};\n\nexport type RunGraderResponse = {\n    reward: number;\n    metadata: {\n        name: string;\n        type: string;\n        errors: {\n            formula_parse_error: boolean;\n            sample_parse_error: boolean;\n            truncated_observation_error: boolean;\n            unresponsive_reward_error: boolean;\n            invalid_variable_error: boolean;\n            other_error: boolean;\n            python_grader_server_error: boolean;\n            python_grader_server_error_type: string;\n            python_grader_runtime_error: boolean;\n            python_grader_runtime_error_details: string;\n            model_grader_server_error: boolean;\n            model_grader_refusal_error: boolean;\n            model_grader_parse_error: boolean;\n            model_grader_server_error_details: string;\n        };\n        execution_time: number;\n        scores: {\n            [key: string]: unknown;\n        };\n        token_usage: number;\n        sampled_model_name: string;\n    };\n    sub_rewards: {\n        [key: string]: unknown;\n    };\n    model_grader_token_usage_per_model: {\n        [key: string]: unknown;\n    };\n};\n\n/**\n * A run on a thread\n *\n * Represents an execution run on a [thread](https://platform.openai.com/docs/api-reference/threads).\n */\nexport type RunObject = {\n    /**\n     * The identifier, which can be referenced in API endpoints.\n     */\n    id: string;\n    /**\n     * The object type, which is always `thread.run`.\n     */\n    object: 'thread.run';\n    /**\n     * The Unix timestamp (in seconds) for when the run was created.\n     */\n    created_at: number;\n    /**\n     * The ID of the [thread](https://platform.openai.com/docs/api-reference/threads) that was executed on as a part of this run.\n     */\n    thread_id: string;\n    /**\n     * The ID of the [assistant](https://platform.openai.com/docs/api-reference/assistants) used for execution of this run.\n     */\n    assistant_id: string;\n    status: RunStatus;\n    /**\n     * Details on the action required to continue the run. Will be `null` if no action is required.\n     */\n    required_action: {\n        /**\n         * For now, this is always `submit_tool_outputs`.\n         */\n        type: 'submit_tool_outputs';\n        /**\n         * Details on the tool outputs needed for this run to continue.\n         */\n        submit_tool_outputs: {\n            /**\n             * A list of the relevant tool calls.\n             */\n            tool_calls: Array<RunToolCallObject>;\n        };\n    };\n    /**\n     * The last error associated with this run. Will be `null` if there are no errors.\n     */\n    last_error: {\n        /**\n         * One of `server_error`, `rate_limit_exceeded`, or `invalid_prompt`.\n         */\n        code: 'server_error' | 'rate_limit_exceeded' | 'invalid_prompt';\n        /**\n         * A human-readable description of the error.\n         */\n        message: string;\n    };\n    /**\n     * The Unix timestamp (in seconds) for when the run will expire.\n     */\n    expires_at: number;\n    /**\n     * The Unix timestamp (in seconds) for when the run was started.\n     */\n    started_at: number;\n    /**\n     * The Unix timestamp (in seconds) for when the run was cancelled.\n     */\n    cancelled_at: number;\n    /**\n     * The Unix timestamp (in seconds) for when the run failed.\n     */\n    failed_at: number;\n    /**\n     * The Unix timestamp (in seconds) for when the run was completed.\n     */\n    completed_at: number;\n    /**\n     * Details on why the run is incomplete. Will be `null` if the run is not incomplete.\n     */\n    incomplete_details: {\n        /**\n         * The reason why the run is incomplete. This will point to which specific token limit was reached over the course of the run.\n         */\n        reason?: 'max_completion_tokens' | 'max_prompt_tokens';\n    };\n    /**\n     * The model that the [assistant](https://platform.openai.com/docs/api-reference/assistants) used for this run.\n     */\n    model: string;\n    /**\n     * The instructions that the [assistant](https://platform.openai.com/docs/api-reference/assistants) used for this run.\n     */\n    instructions: string;\n    /**\n     * The list of tools that the [assistant](https://platform.openai.com/docs/api-reference/assistants) used for this run.\n     */\n    tools: Array<AssistantTool>;\n    metadata: Metadata;\n    usage: RunCompletionUsage;\n    /**\n     * The sampling temperature used for this run. If not set, defaults to 1.\n     */\n    temperature?: number;\n    /**\n     * The nucleus sampling value used for this run. If not set, defaults to 1.\n     */\n    top_p?: number;\n    /**\n     * The maximum number of prompt tokens specified to have been used over the course of the run.\n     *\n     */\n    max_prompt_tokens: number;\n    /**\n     * The maximum number of completion tokens specified to have been used over the course of the run.\n     *\n     */\n    max_completion_tokens: number;\n    truncation_strategy: TruncationObject & unknown;\n    tool_choice: AssistantsApiToolChoiceOption & unknown;\n    parallel_tool_calls: ParallelToolCalls;\n    response_format: AssistantsApiResponseFormatOption;\n};\n\n/**\n * Usage statistics related to the run step. This value will be `null` while the run step's status is `in_progress`.\n */\nexport type RunStepCompletionUsage = {\n    /**\n     * Number of completion tokens used over the course of the run step.\n     */\n    completion_tokens: number;\n    /**\n     * Number of prompt tokens used over the course of the run step.\n     */\n    prompt_tokens: number;\n    /**\n     * Total number of tokens used (prompt + completion).\n     */\n    total_tokens: number;\n};\n\n/**\n * Run step delta object\n *\n * Represents a run step delta i.e. any changed fields on a run step during streaming.\n *\n */\nexport type RunStepDeltaObject = {\n    /**\n     * The identifier of the run step, which can be referenced in API endpoints.\n     */\n    id: string;\n    /**\n     * The object type, which is always `thread.run.step.delta`.\n     */\n    object: 'thread.run.step.delta';\n    delta: RunStepDeltaObjectDelta;\n};\n\n/**\n * Message creation\n *\n * Details of the message creation by the run step.\n */\nexport type RunStepDeltaStepDetailsMessageCreationObject = {\n    /**\n     * Always `message_creation`.\n     */\n    type: 'message_creation';\n    message_creation?: {\n        /**\n         * The ID of the message that was created by this run step.\n         */\n        message_id?: string;\n    };\n};\n\n/**\n * Code interpreter tool call\n *\n * Details of the Code Interpreter tool call the run step was involved in.\n */\nexport type RunStepDeltaStepDetailsToolCallsCodeObject = {\n    /**\n     * The index of the tool call in the tool calls array.\n     */\n    index: number;\n    /**\n     * The ID of the tool call.\n     */\n    id?: string;\n    /**\n     * The type of tool call. This is always going to be `code_interpreter` for this type of tool call.\n     */\n    type: 'code_interpreter';\n    /**\n     * The Code Interpreter tool call definition.\n     */\n    code_interpreter?: {\n        /**\n         * The input to the Code Interpreter tool call.\n         */\n        input?: string;\n        /**\n         * The outputs from the Code Interpreter tool call. Code Interpreter can output one or more items, including text (`logs`) or images (`image`). Each of these are represented by a different object type.\n         */\n        outputs?: Array<({\n            type?: 'RunStepDeltaStepDetailsToolCallsCodeOutputLogsObject';\n        } & RunStepDeltaStepDetailsToolCallsCodeOutputLogsObject) | ({\n            type?: 'RunStepDeltaStepDetailsToolCallsCodeOutputImageObject';\n        } & RunStepDeltaStepDetailsToolCallsCodeOutputImageObject)>;\n    };\n};\n\n/**\n * Code interpreter image output\n */\nexport type RunStepDeltaStepDetailsToolCallsCodeOutputImageObject = {\n    /**\n     * The index of the output in the outputs array.\n     */\n    index: number;\n    /**\n     * Always `image`.\n     */\n    type: 'image';\n    image?: {\n        /**\n         * The [file](https://platform.openai.com/docs/api-reference/files) ID of the image.\n         */\n        file_id?: string;\n    };\n};\n\n/**\n * Code interpreter log output\n *\n * Text output from the Code Interpreter tool call as part of a run step.\n */\nexport type RunStepDeltaStepDetailsToolCallsCodeOutputLogsObject = {\n    /**\n     * The index of the output in the outputs array.\n     */\n    index: number;\n    /**\n     * Always `logs`.\n     */\n    type: 'logs';\n    /**\n     * The text output from the Code Interpreter tool call.\n     */\n    logs?: string;\n};\n\n/**\n * File search tool call\n */\nexport type RunStepDeltaStepDetailsToolCallsFileSearchObject = {\n    /**\n     * The index of the tool call in the tool calls array.\n     */\n    index: number;\n    /**\n     * The ID of the tool call object.\n     */\n    id?: string;\n    /**\n     * The type of tool call. This is always going to be `file_search` for this type of tool call.\n     */\n    type: 'file_search';\n    /**\n     * For now, this is always going to be an empty object.\n     */\n    file_search: {\n        [key: string]: unknown;\n    };\n};\n\n/**\n * Function tool call\n */\nexport type RunStepDeltaStepDetailsToolCallsFunctionObject = {\n    /**\n     * The index of the tool call in the tool calls array.\n     */\n    index: number;\n    /**\n     * The ID of the tool call object.\n     */\n    id?: string;\n    /**\n     * The type of tool call. This is always going to be `function` for this type of tool call.\n     */\n    type: 'function';\n    /**\n     * The definition of the function that was called.\n     */\n    function?: {\n        /**\n         * The name of the function.\n         */\n        name?: string;\n        /**\n         * The arguments passed to the function.\n         */\n        arguments?: string;\n        /**\n         * The output of the function. This will be `null` if the outputs have not been [submitted](https://platform.openai.com/docs/api-reference/runs/submitToolOutputs) yet.\n         */\n        output?: string;\n    };\n};\n\n/**\n * Tool calls\n *\n * Details of the tool call.\n */\nexport type RunStepDeltaStepDetailsToolCallsObject = {\n    /**\n     * Always `tool_calls`.\n     */\n    type: 'tool_calls';\n    /**\n     * An array of tool calls the run step was involved in. These can be associated with one of three types of tools: `code_interpreter`, `file_search`, or `function`.\n     *\n     */\n    tool_calls?: Array<RunStepDeltaStepDetailsToolCall>;\n};\n\n/**\n * Message creation\n *\n * Details of the message creation by the run step.\n */\nexport type RunStepDetailsMessageCreationObject = {\n    /**\n     * Always `message_creation`.\n     */\n    type: 'message_creation';\n    message_creation: {\n        /**\n         * The ID of the message that was created by this run step.\n         */\n        message_id: string;\n    };\n};\n\n/**\n * Code Interpreter tool call\n *\n * Details of the Code Interpreter tool call the run step was involved in.\n */\nexport type RunStepDetailsToolCallsCodeObject = {\n    /**\n     * The ID of the tool call.\n     */\n    id: string;\n    /**\n     * The type of tool call. This is always going to be `code_interpreter` for this type of tool call.\n     */\n    type: 'code_interpreter';\n    /**\n     * The Code Interpreter tool call definition.\n     */\n    code_interpreter: {\n        /**\n         * The input to the Code Interpreter tool call.\n         */\n        input: string;\n        /**\n         * The outputs from the Code Interpreter tool call. Code Interpreter can output one or more items, including text (`logs`) or images (`image`). Each of these are represented by a different object type.\n         */\n        outputs: Array<({\n            type?: 'RunStepDetailsToolCallsCodeOutputLogsObject';\n        } & RunStepDetailsToolCallsCodeOutputLogsObject) | ({\n            type?: 'RunStepDetailsToolCallsCodeOutputImageObject';\n        } & RunStepDetailsToolCallsCodeOutputImageObject)>;\n    };\n};\n\n/**\n * Code Interpreter image output\n */\nexport type RunStepDetailsToolCallsCodeOutputImageObject = {\n    /**\n     * Always `image`.\n     */\n    type: 'image';\n    image: {\n        /**\n         * The [file](https://platform.openai.com/docs/api-reference/files) ID of the image.\n         */\n        file_id: string;\n    };\n};\n\n/**\n * Code Interpreter log output\n *\n * Text output from the Code Interpreter tool call as part of a run step.\n */\nexport type RunStepDetailsToolCallsCodeOutputLogsObject = {\n    /**\n     * Always `logs`.\n     */\n    type: 'logs';\n    /**\n     * The text output from the Code Interpreter tool call.\n     */\n    logs: string;\n};\n\n/**\n * File search tool call\n */\nexport type RunStepDetailsToolCallsFileSearchObject = {\n    /**\n     * The ID of the tool call object.\n     */\n    id: string;\n    /**\n     * The type of tool call. This is always going to be `file_search` for this type of tool call.\n     */\n    type: 'file_search';\n    /**\n     * For now, this is always going to be an empty object.\n     */\n    file_search: {\n        ranking_options?: RunStepDetailsToolCallsFileSearchRankingOptionsObject;\n        /**\n         * The results of the file search.\n         */\n        results?: Array<RunStepDetailsToolCallsFileSearchResultObject>;\n    };\n};\n\n/**\n * File search tool call ranking options\n *\n * The ranking options for the file search.\n */\nexport type RunStepDetailsToolCallsFileSearchRankingOptionsObject = {\n    ranker: FileSearchRanker;\n    /**\n     * The score threshold for the file search. All values must be a floating point number between 0 and 1.\n     */\n    score_threshold: number;\n};\n\n/**\n * File search tool call result\n *\n * A result instance of the file search.\n */\nexport type RunStepDetailsToolCallsFileSearchResultObject = {\n    /**\n     * The ID of the file that result was found in.\n     */\n    file_id: string;\n    /**\n     * The name of the file that result was found in.\n     */\n    file_name: string;\n    /**\n     * The score of the result. All values must be a floating point number between 0 and 1.\n     */\n    score: number;\n    /**\n     * The content of the result that was found. The content is only included if requested via the include query parameter.\n     */\n    content?: Array<{\n        /**\n         * The type of the content.\n         */\n        type?: 'text';\n        /**\n         * The text content of the file.\n         */\n        text?: string;\n    }>;\n};\n\n/**\n * Function tool call\n */\nexport type RunStepDetailsToolCallsFunctionObject = {\n    /**\n     * The ID of the tool call object.\n     */\n    id: string;\n    /**\n     * The type of tool call. This is always going to be `function` for this type of tool call.\n     */\n    type: 'function';\n    /**\n     * The definition of the function that was called.\n     */\n    function: {\n        /**\n         * The name of the function.\n         */\n        name: string;\n        /**\n         * The arguments passed to the function.\n         */\n        arguments: string;\n        /**\n         * The output of the function. This will be `null` if the outputs have not been [submitted](https://platform.openai.com/docs/api-reference/runs/submitToolOutputs) yet.\n         */\n        output: string;\n    };\n};\n\n/**\n * Tool calls\n *\n * Details of the tool call.\n */\nexport type RunStepDetailsToolCallsObject = {\n    /**\n     * Always `tool_calls`.\n     */\n    type: 'tool_calls';\n    /**\n     * An array of tool calls the run step was involved in. These can be associated with one of three types of tools: `code_interpreter`, `file_search`, or `function`.\n     *\n     */\n    tool_calls: Array<RunStepDetailsToolCall>;\n};\n\n/**\n * Run steps\n *\n * Represents a step in execution of a run.\n *\n */\nexport type RunStepObject = {\n    /**\n     * The identifier of the run step, which can be referenced in API endpoints.\n     */\n    id: string;\n    /**\n     * The object type, which is always `thread.run.step`.\n     */\n    object: 'thread.run.step';\n    /**\n     * The Unix timestamp (in seconds) for when the run step was created.\n     */\n    created_at: number;\n    /**\n     * The ID of the [assistant](https://platform.openai.com/docs/api-reference/assistants) associated with the run step.\n     */\n    assistant_id: string;\n    /**\n     * The ID of the [thread](https://platform.openai.com/docs/api-reference/threads) that was run.\n     */\n    thread_id: string;\n    /**\n     * The ID of the [run](https://platform.openai.com/docs/api-reference/runs) that this run step is a part of.\n     */\n    run_id: string;\n    /**\n     * The type of run step, which can be either `message_creation` or `tool_calls`.\n     */\n    type: 'message_creation' | 'tool_calls';\n    /**\n     * The status of the run step, which can be either `in_progress`, `cancelled`, `failed`, `completed`, or `expired`.\n     */\n    status: 'in_progress' | 'cancelled' | 'failed' | 'completed' | 'expired';\n    /**\n     * The details of the run step.\n     */\n    step_details: ({\n        type?: 'RunStepDetailsMessageCreationObject';\n    } & RunStepDetailsMessageCreationObject) | ({\n        type?: 'RunStepDetailsToolCallsObject';\n    } & RunStepDetailsToolCallsObject);\n    /**\n     * The last error associated with this run step. Will be `null` if there are no errors.\n     */\n    last_error: {\n        /**\n         * One of `server_error` or `rate_limit_exceeded`.\n         */\n        code: 'server_error' | 'rate_limit_exceeded';\n        /**\n         * A human-readable description of the error.\n         */\n        message: string;\n    };\n    /**\n     * The Unix timestamp (in seconds) for when the run step expired. A step is considered expired if the parent run is expired.\n     */\n    expired_at: number;\n    /**\n     * The Unix timestamp (in seconds) for when the run step was cancelled.\n     */\n    cancelled_at: number;\n    /**\n     * The Unix timestamp (in seconds) for when the run step failed.\n     */\n    failed_at: number;\n    /**\n     * The Unix timestamp (in seconds) for when the run step completed.\n     */\n    completed_at: number;\n    metadata: Metadata;\n    usage: RunStepCompletionUsage;\n};\n\nexport type RunStepStreamEvent = {\n    event: 'thread.run.step.created';\n    data: RunStepObject;\n} | {\n    event: 'thread.run.step.in_progress';\n    data: RunStepObject;\n} | {\n    event: 'thread.run.step.delta';\n    data: RunStepDeltaObject;\n} | {\n    event: 'thread.run.step.completed';\n    data: RunStepObject;\n} | {\n    event: 'thread.run.step.failed';\n    data: RunStepObject;\n} | {\n    event: 'thread.run.step.cancelled';\n    data: RunStepObject;\n} | {\n    event: 'thread.run.step.expired';\n    data: RunStepObject;\n};\n\nexport type RunStreamEvent = {\n    event: 'thread.run.created';\n    data: RunObject;\n} | {\n    event: 'thread.run.queued';\n    data: RunObject;\n} | {\n    event: 'thread.run.in_progress';\n    data: RunObject;\n} | {\n    event: 'thread.run.requires_action';\n    data: RunObject;\n} | {\n    event: 'thread.run.completed';\n    data: RunObject;\n} | {\n    event: 'thread.run.incomplete';\n    data: RunObject;\n} | {\n    event: 'thread.run.failed';\n    data: RunObject;\n} | {\n    event: 'thread.run.cancelling';\n    data: RunObject;\n} | {\n    event: 'thread.run.cancelled';\n    data: RunObject;\n} | {\n    event: 'thread.run.expired';\n    data: RunObject;\n};\n\n/**\n * Tool call objects\n */\nexport type RunToolCallObject = {\n    /**\n     * The ID of the tool call. This ID must be referenced when you submit the tool outputs in using the [Submit tool outputs to run](https://platform.openai.com/docs/api-reference/runs/submitToolOutputs) endpoint.\n     */\n    id: string;\n    /**\n     * The type of tool call the output is required for. For now, this is always `function`.\n     */\n    type: 'function';\n    /**\n     * The function definition.\n     */\n    function: {\n        /**\n         * The name of the function.\n         */\n        name: string;\n        /**\n         * The arguments that the model expects you to pass to the function.\n         */\n        arguments: string;\n    };\n};\n\n/**\n * Screenshot\n *\n * A screenshot action.\n *\n */\nexport type Screenshot = {\n    /**\n     * Specifies the event type. For a screenshot action, this property is\n     * always set to `screenshot`.\n     *\n     */\n    type: 'screenshot';\n};\n\n/**\n * Scroll\n *\n * A scroll action.\n *\n */\nexport type Scroll = {\n    /**\n     * Specifies the event type. For a scroll action, this property is\n     * always set to `scroll`.\n     *\n     */\n    type: 'scroll';\n    /**\n     * The x-coordinate where the scroll occurred.\n     *\n     */\n    x: number;\n    /**\n     * The y-coordinate where the scroll occurred.\n     *\n     */\n    y: number;\n    /**\n     * The horizontal scroll distance.\n     *\n     */\n    scroll_x: number;\n    /**\n     * The vertical scroll distance.\n     *\n     */\n    scroll_y: number;\n};\n\n/**\n * Specifies the processing type used for serving the request.\n * - If set to 'auto', then the request will be processed with the service tier configured in the Project settings. Unless otherwise configured, the Project will use 'default'.\n * - If set to 'default', then the request will be processed with the standard pricing and performance for the selected model.\n * - If set to '[flex](https://platform.openai.com/docs/guides/flex-processing)' or '[priority](https://openai.com/api-priority-processing/)', then the request will be processed with the corresponding service tier.\n * - When not set, the default behavior is 'auto'.\n *\n * When the `service_tier` parameter is set, the response body will include the `service_tier` value based on the processing mode actually used to serve the request. This response value may be different from the value set in the parameter.\n *\n */\nexport const ServiceTier = {\n    AUTO: 'auto',\n    DEFAULT: 'default',\n    FLEX: 'flex',\n    SCALE: 'scale',\n    PRIORITY: 'priority'\n} as const;\n\n/**\n * Specifies the processing type used for serving the request.\n * - If set to 'auto', then the request will be processed with the service tier configured in the Project settings. Unless otherwise configured, the Project will use 'default'.\n * - If set to 'default', then the request will be processed with the standard pricing and performance for the selected model.\n * - If set to '[flex](https://platform.openai.com/docs/guides/flex-processing)' or '[priority](https://openai.com/api-priority-processing/)', then the request will be processed with the corresponding service tier.\n * - When not set, the default behavior is 'auto'.\n *\n * When the `service_tier` parameter is set, the response body will include the `service_tier` value based on the processing mode actually used to serve the request. This response value may be different from the value set in the parameter.\n *\n */\nexport type ServiceTier = typeof ServiceTier[keyof typeof ServiceTier];\n\n/**\n * Emitted for each chunk of audio data generated during speech synthesis.\n */\nexport type SpeechAudioDeltaEvent = {\n    /**\n     * The type of the event. Always `speech.audio.delta`.\n     *\n     */\n    type: 'speech.audio.delta';\n    /**\n     * A chunk of Base64-encoded audio data.\n     *\n     */\n    audio: string;\n};\n\n/**\n * Emitted when the speech synthesis is complete and all audio has been streamed.\n */\nexport type SpeechAudioDoneEvent = {\n    /**\n     * The type of the event. Always `speech.audio.done`.\n     *\n     */\n    type: 'speech.audio.done';\n    /**\n     * Token usage statistics for the request.\n     *\n     */\n    usage: {\n        /**\n         * Number of input tokens in the prompt.\n         */\n        input_tokens: number;\n        /**\n         * Number of output tokens generated.\n         */\n        output_tokens: number;\n        /**\n         * Total number of tokens used (input + output).\n         */\n        total_tokens: number;\n    };\n};\n\nexport type StaticChunkingStrategy = {\n    /**\n     * The maximum number of tokens in each chunk. The default value is `800`. The minimum value is `100` and the maximum value is `4096`.\n     */\n    max_chunk_size_tokens: number;\n    /**\n     * The number of tokens that overlap between chunks. The default value is `400`.\n     *\n     * Note that the overlap must not exceed half of `max_chunk_size_tokens`.\n     *\n     */\n    chunk_overlap_tokens: number;\n};\n\n/**\n * Static Chunking Strategy\n *\n * Customize your own chunking strategy by setting chunk size and chunk overlap.\n */\nexport type StaticChunkingStrategyRequestParam = {\n    /**\n     * Always `static`.\n     */\n    type: 'static';\n    static: StaticChunkingStrategy;\n};\n\n/**\n * Static Chunking Strategy\n */\nexport type StaticChunkingStrategyResponseParam = {\n    /**\n     * Always `static`.\n     */\n    type: 'static';\n    static: StaticChunkingStrategy;\n};\n\n/**\n * Not supported with latest reasoning models `o3` and `o4-mini`.\n *\n * Up to 4 sequences where the API will stop generating further tokens. The\n * returned text will not contain the stop sequence.\n *\n */\nexport type StopConfiguration = string | Array<string>;\n\nexport type SubmitToolOutputsRunRequest = {\n    /**\n     * A list of tools for which the outputs are being submitted.\n     */\n    tool_outputs: Array<{\n        /**\n         * The ID of the tool call in the `required_action` object within the run object the output is being submitted for.\n         */\n        tool_call_id?: string;\n        /**\n         * The output of the tool call to be submitted to continue the run.\n         */\n        output?: string;\n    }>;\n    /**\n     * If `true`, returns a stream of events that happen during the Run as server-sent events, terminating when the Run enters a terminal state with a `data: [DONE]` message.\n     *\n     */\n    stream?: boolean;\n};\n\n/**\n * An object specifying the format that the model must output.\n *\n * Configuring `{ \"type\": \"json_schema\" }` enables Structured Outputs,\n * which ensures the model will match your supplied JSON schema. Learn more in the\n * [Structured Outputs guide](https://platform.openai.com/docs/guides/structured-outputs).\n *\n * The default format is `{ \"type\": \"text\" }` with no additional options.\n *\n * **Not recommended for gpt-4o and newer models:**\n *\n * Setting to `{ \"type\": \"json_object\" }` enables the older JSON mode, which\n * ensures the message the model generates is valid JSON. Using `json_schema`\n * is preferred for models that support it.\n *\n */\nexport type TextResponseFormatConfiguration = ({\n    type?: 'ResponseFormatText';\n} & ResponseFormatText) | ({\n    type?: 'TextResponseFormatJsonSchema';\n} & TextResponseFormatJsonSchema) | ({\n    type?: 'ResponseFormatJsonObject';\n} & ResponseFormatJsonObject);\n\n/**\n * JSON schema\n *\n * JSON Schema response format. Used to generate structured JSON responses.\n * Learn more about [Structured Outputs](https://platform.openai.com/docs/guides/structured-outputs).\n *\n */\nexport type TextResponseFormatJsonSchema = {\n    /**\n     * The type of response format being defined. Always `json_schema`.\n     */\n    type: 'json_schema';\n    /**\n     * A description of what the response format is for, used by the model to\n     * determine how to respond in the format.\n     *\n     */\n    description?: string;\n    /**\n     * The name of the response format. Must be a-z, A-Z, 0-9, or contain\n     * underscores and dashes, with a maximum length of 64.\n     *\n     */\n    name: string;\n    schema: ResponseFormatJsonSchemaSchema;\n    /**\n     * Whether to enable strict schema adherence when generating the output.\n     * If set to true, the model will always follow the exact schema defined\n     * in the `schema` field. Only a subset of JSON Schema is supported when\n     * `strict` is `true`. To learn more, read the [Structured Outputs\n     * guide](https://platform.openai.com/docs/guides/structured-outputs).\n     *\n     */\n    strict?: boolean;\n};\n\n/**\n * Thread\n *\n * Represents a thread that contains [messages](https://platform.openai.com/docs/api-reference/messages).\n */\nexport type ThreadObject = {\n    /**\n     * The identifier, which can be referenced in API endpoints.\n     */\n    id: string;\n    /**\n     * The object type, which is always `thread`.\n     */\n    object: 'thread';\n    /**\n     * The Unix timestamp (in seconds) for when the thread was created.\n     */\n    created_at: number;\n    /**\n     * A set of resources that are made available to the assistant's tools in this thread. The resources are specific to the type of tool. For example, the `code_interpreter` tool requires a list of file IDs, while the `file_search` tool requires a list of vector store IDs.\n     *\n     */\n    tool_resources: {\n        code_interpreter?: {\n            /**\n             * A list of [file](https://platform.openai.com/docs/api-reference/files) IDs made available to the `code_interpreter` tool. There can be a maximum of 20 files associated with the tool.\n             *\n             */\n            file_ids?: Array<string>;\n        };\n        file_search?: {\n            /**\n             * The [vector store](https://platform.openai.com/docs/api-reference/vector-stores/object) attached to this thread. There can be a maximum of 1 vector store attached to the thread.\n             *\n             */\n            vector_store_ids?: Array<string>;\n        };\n    };\n    metadata: Metadata;\n};\n\n/**\n * Occurs when a new [thread](https://platform.openai.com/docs/api-reference/threads/object) is created.\n */\nexport type ThreadStreamEvent = {\n    /**\n     * Whether to enable input audio transcription.\n     */\n    enabled?: boolean;\n    event: 'thread.created';\n    data: ThreadObject;\n};\n\nexport type ToggleCertificatesRequest = {\n    certificate_ids: Array<string>;\n};\n\n/**\n * A tool that can be used to generate a response.\n *\n */\nexport type Tool = ({\n    type?: 'FunctionTool';\n} & FunctionTool) | ({\n    type?: 'FileSearchTool';\n} & FileSearchTool) | ({\n    type?: 'WebSearchPreviewTool';\n} & WebSearchPreviewTool) | ({\n    type?: 'ComputerUsePreviewTool';\n} & ComputerUsePreviewTool) | ({\n    type?: 'MCPTool';\n} & McpTool) | ({\n    type?: 'CodeInterpreterTool';\n} & CodeInterpreterTool) | ({\n    type?: 'ImageGenTool';\n} & ImageGenTool) | ({\n    type?: 'LocalShellTool';\n} & LocalShellTool) | ({\n    type?: 'CustomTool';\n} & CustomTool);\n\n/**\n * Allowed tools\n *\n * Constrains the tools available to the model to a pre-defined set.\n *\n */\nexport type ToolChoiceAllowed = {\n    /**\n     * Allowed tool configuration type. Always `allowed_tools`.\n     */\n    type: 'allowed_tools';\n    /**\n     * Constrains the tools available to the model to a pre-defined set.\n     *\n     * `auto` allows the model to pick from among the allowed tools and generate a\n     * message.\n     *\n     * `required` requires the model to call one or more of the allowed tools.\n     *\n     */\n    mode: 'auto' | 'required';\n    /**\n     * A list of tool definitions that the model should be allowed to call.\n     *\n     * For the Responses API, the list of tool definitions might look like:\n     * ```json\n     * [\n     * { \"type\": \"function\", \"name\": \"get_weather\" },\n     * { \"type\": \"mcp\", \"server_label\": \"deepwiki\" },\n     * { \"type\": \"image_generation\" }\n     * ]\n     * ```\n     *\n     */\n    tools: Array<{\n        [key: string]: unknown;\n    }>;\n};\n\n/**\n * Custom tool\n *\n * Use this option to force the model to call a specific custom tool.\n *\n */\nexport type ToolChoiceCustom = {\n    /**\n     * For custom tool calling, the type is always `custom`.\n     */\n    type: 'custom';\n    /**\n     * The name of the custom tool to call.\n     */\n    name: string;\n};\n\n/**\n * Function tool\n *\n * Use this option to force the model to call a specific function.\n *\n */\nexport type ToolChoiceFunction = {\n    /**\n     * For function calling, the type is always `function`.\n     */\n    type: 'function';\n    /**\n     * The name of the function to call.\n     */\n    name: string;\n};\n\n/**\n * MCP tool\n *\n * Use this option to force the model to call a specific tool on a remote MCP server.\n *\n */\nexport type ToolChoiceMcp = {\n    /**\n     * For MCP tools, the type is always `mcp`.\n     */\n    type: 'mcp';\n    /**\n     * The label of the MCP server to use.\n     *\n     */\n    server_label: string;\n    /**\n     * The name of the tool to call on the server.\n     *\n     */\n    name?: string;\n};\n\n/**\n * Tool choice mode\n *\n * Controls which (if any) tool is called by the model.\n *\n * `none` means the model will not call any tool and instead generates a message.\n *\n * `auto` means the model can pick between generating a message or calling one or\n * more tools.\n *\n * `required` means the model must call one or more tools.\n *\n */\nexport const ToolChoiceOptions = {\n    NONE: 'none',\n    AUTO: 'auto',\n    REQUIRED: 'required'\n} as const;\n\n/**\n * Tool choice mode\n *\n * Controls which (if any) tool is called by the model.\n *\n * `none` means the model will not call any tool and instead generates a message.\n *\n * `auto` means the model can pick between generating a message or calling one or\n * more tools.\n *\n * `required` means the model must call one or more tools.\n *\n */\nexport type ToolChoiceOptions = typeof ToolChoiceOptions[keyof typeof ToolChoiceOptions];\n\n/**\n * Hosted tool\n *\n * Indicates that the model should use a built-in tool to generate a response.\n * [Learn more about built-in tools](https://platform.openai.com/docs/guides/tools).\n *\n */\nexport type ToolChoiceTypes = {\n    /**\n     * The type of hosted tool the model should to use. Learn more about\n     * [built-in tools](https://platform.openai.com/docs/guides/tools).\n     *\n     * Allowed values are:\n     * - `file_search`\n     * - `web_search_preview`\n     * - `computer_use_preview`\n     * - `code_interpreter`\n     * - `image_generation`\n     *\n     */\n    type: 'file_search' | 'web_search_preview' | 'computer_use_preview' | 'web_search_preview_2025_03_11' | 'image_generation' | 'code_interpreter';\n};\n\n/**\n * Emitted when there is an additional text delta. This is also the first event emitted when the transcription starts. Only emitted when you [create a transcription](https://platform.openai.com/docs/api-reference/audio/create-transcription) with the `Stream` parameter set to `true`.\n */\nexport type TranscriptTextDeltaEvent = {\n    /**\n     * The type of the event. Always `transcript.text.delta`.\n     *\n     */\n    type: 'transcript.text.delta';\n    /**\n     * The text delta that was additionally transcribed.\n     *\n     */\n    delta: string;\n    /**\n     * The log probabilities of the delta. Only included if you [create a transcription](https://platform.openai.com/docs/api-reference/audio/create-transcription) with the `include[]` parameter set to `logprobs`.\n     *\n     */\n    logprobs?: Array<{\n        /**\n         * The token that was used to generate the log probability.\n         *\n         */\n        token?: string;\n        /**\n         * The log probability of the token.\n         *\n         */\n        logprob?: number;\n        /**\n         * The bytes that were used to generate the log probability.\n         *\n         */\n        bytes?: Array<number>;\n    }>;\n};\n\n/**\n * Emitted when the transcription is complete. Contains the complete transcription text. Only emitted when you [create a transcription](https://platform.openai.com/docs/api-reference/audio/create-transcription) with the `Stream` parameter set to `true`.\n */\nexport type TranscriptTextDoneEvent = {\n    /**\n     * The type of the event. Always `transcript.text.done`.\n     *\n     */\n    type: 'transcript.text.done';\n    /**\n     * The text that was transcribed.\n     *\n     */\n    text: string;\n    /**\n     * The log probabilities of the individual tokens in the transcription. Only included if you [create a transcription](https://platform.openai.com/docs/api-reference/audio/create-transcription) with the `include[]` parameter set to `logprobs`.\n     *\n     */\n    logprobs?: Array<{\n        /**\n         * The token that was used to generate the log probability.\n         *\n         */\n        token?: string;\n        /**\n         * The log probability of the token.\n         *\n         */\n        logprob?: number;\n        /**\n         * The bytes that were used to generate the log probability.\n         *\n         */\n        bytes?: Array<number>;\n    }>;\n    usage?: TranscriptTextUsageTokens;\n};\n\n/**\n * Duration Usage\n *\n * Usage statistics for models billed by audio input duration.\n */\nexport type TranscriptTextUsageDuration = {\n    /**\n     * The type of the usage object. Always `duration` for this variant.\n     */\n    type: 'duration';\n    /**\n     * Duration of the input audio in seconds.\n     */\n    seconds: number;\n};\n\n/**\n * Token Usage\n *\n * Usage statistics for models billed by token usage.\n */\nexport type TranscriptTextUsageTokens = {\n    /**\n     * The type of the usage object. Always `tokens` for this variant.\n     */\n    type: 'tokens';\n    /**\n     * Number of input tokens billed for this request.\n     */\n    input_tokens: number;\n    /**\n     * Details about the input tokens billed for this request.\n     */\n    input_token_details?: {\n        /**\n         * Number of text tokens billed for this request.\n         */\n        text_tokens?: number;\n        /**\n         * Number of audio tokens billed for this request.\n         */\n        audio_tokens?: number;\n    };\n    /**\n     * Number of output tokens generated.\n     */\n    output_tokens: number;\n    /**\n     * Total number of tokens used (input + output).\n     */\n    total_tokens: number;\n};\n\n/**\n * Controls how the audio is cut into chunks. When set to `\"auto\"`, the server first normalizes loudness and then uses voice activity detection (VAD) to choose boundaries. `server_vad` object can be provided to tweak VAD detection parameters manually. If unset, the audio is transcribed as a single block.\n */\nexport type TranscriptionChunkingStrategy = 'auto' | VadConfig;\n\nexport const TranscriptionInclude = { LOGPROBS: 'logprobs' } as const;\n\nexport type TranscriptionInclude = typeof TranscriptionInclude[keyof typeof TranscriptionInclude];\n\nexport type TranscriptionSegment = {\n    /**\n     * Unique identifier of the segment.\n     */\n    id: number;\n    /**\n     * Seek offset of the segment.\n     */\n    seek: number;\n    /**\n     * Start time of the segment in seconds.\n     */\n    start: number;\n    /**\n     * End time of the segment in seconds.\n     */\n    end: number;\n    /**\n     * Text content of the segment.\n     */\n    text: string;\n    /**\n     * Array of token IDs for the text content.\n     */\n    tokens: Array<number>;\n    /**\n     * Temperature parameter used for generating the segment.\n     */\n    temperature: number;\n    /**\n     * Average logprob of the segment. If the value is lower than -1, consider the logprobs failed.\n     */\n    avg_logprob: number;\n    /**\n     * Compression ratio of the segment. If the value is greater than 2.4, consider the compression failed.\n     */\n    compression_ratio: number;\n    /**\n     * Probability of no speech in the segment. If the value is higher than 1.0 and the `avg_logprob` is below -1, consider this segment silent.\n     */\n    no_speech_prob: number;\n};\n\nexport type TranscriptionWord = {\n    /**\n     * The text content of the word.\n     */\n    word: string;\n    /**\n     * Start time of the word in seconds.\n     */\n    start: number;\n    /**\n     * End time of the word in seconds.\n     */\n    end: number;\n};\n\n/**\n * Thread Truncation Controls\n *\n * Controls for how a thread will be truncated prior to the run. Use this to control the initial context window of the run.\n */\nexport type TruncationObject = {\n    /**\n     * The truncation strategy to use for the thread. The default is `auto`. If set to `last_messages`, the thread will be truncated to the n most recent messages in the thread. When set to `auto`, messages in the middle of the thread will be dropped to fit the context length of the model, `max_prompt_tokens`.\n     */\n    type: 'auto' | 'last_messages';\n    /**\n     * The number of most recent messages from the thread when constructing the context for the run.\n     */\n    last_messages?: number;\n};\n\n/**\n * Type\n *\n * An action to type in text.\n *\n */\nexport type Type = {\n    /**\n     * Specifies the event type. For a type action, this property is\n     * always set to `type`.\n     *\n     */\n    type: 'type';\n    /**\n     * The text to type.\n     *\n     */\n    text: string;\n};\n\nexport type UpdateVectorStoreFileAttributesRequest = {\n    attributes: VectorStoreFileAttributes;\n};\n\nexport type UpdateVectorStoreRequest = {\n    /**\n     * The name of the vector store.\n     */\n    name?: string;\n    expires_after?: VectorStoreExpirationAfter & unknown;\n    metadata?: Metadata;\n};\n\n/**\n * Upload\n *\n * The Upload object can accept byte chunks in the form of Parts.\n *\n */\nexport type Upload = {\n    /**\n     * The Upload unique identifier, which can be referenced in API endpoints.\n     */\n    id: string;\n    /**\n     * The Unix timestamp (in seconds) for when the Upload was created.\n     */\n    created_at: number;\n    /**\n     * The name of the file to be uploaded.\n     */\n    filename: string;\n    /**\n     * The intended number of bytes to be uploaded.\n     */\n    bytes: number;\n    /**\n     * The intended purpose of the file. [Please refer here](https://platform.openai.com/docs/api-reference/files/object#files/object-purpose) for acceptable values.\n     */\n    purpose: string;\n    /**\n     * The status of the Upload.\n     */\n    status: 'pending' | 'completed' | 'cancelled' | 'expired';\n    /**\n     * The Unix timestamp (in seconds) for when the Upload will expire.\n     */\n    expires_at: number;\n    /**\n     * The object type, which is always \"upload\".\n     */\n    object: 'upload';\n    file?: OpenAiFile & unknown;\n};\n\nexport type UploadCertificateRequest = {\n    /**\n     * An optional name for the certificate\n     */\n    name?: string;\n    /**\n     * The certificate content in PEM format\n     */\n    content: string;\n};\n\n/**\n * UploadPart\n *\n * The upload Part represents a chunk of bytes we can add to an Upload object.\n *\n */\nexport type UploadPart = {\n    /**\n     * The upload Part unique identifier, which can be referenced in API endpoints.\n     */\n    id: string;\n    /**\n     * The Unix timestamp (in seconds) for when the Part was created.\n     */\n    created_at: number;\n    /**\n     * The ID of the Upload object that this Part was added to.\n     */\n    upload_id: string;\n    /**\n     * The object type, which is always `upload.part`.\n     */\n    object: 'upload.part';\n};\n\n/**\n * The aggregated audio speeches usage details of the specific time bucket.\n */\nexport type UsageAudioSpeechesResult = {\n    object: 'organization.usage.audio_speeches.result';\n    /**\n     * The number of characters processed.\n     */\n    characters: number;\n    /**\n     * The count of requests made to the model.\n     */\n    num_model_requests: number;\n    /**\n     * When `group_by=project_id`, this field provides the project ID of the grouped usage result.\n     */\n    project_id?: string;\n    /**\n     * When `group_by=user_id`, this field provides the user ID of the grouped usage result.\n     */\n    user_id?: string;\n    /**\n     * When `group_by=api_key_id`, this field provides the API key ID of the grouped usage result.\n     */\n    api_key_id?: string;\n    /**\n     * When `group_by=model`, this field provides the model name of the grouped usage result.\n     */\n    model?: string;\n};\n\n/**\n * The aggregated audio transcriptions usage details of the specific time bucket.\n */\nexport type UsageAudioTranscriptionsResult = {\n    object: 'organization.usage.audio_transcriptions.result';\n    /**\n     * The number of seconds processed.\n     */\n    seconds: number;\n    /**\n     * The count of requests made to the model.\n     */\n    num_model_requests: number;\n    /**\n     * When `group_by=project_id`, this field provides the project ID of the grouped usage result.\n     */\n    project_id?: string;\n    /**\n     * When `group_by=user_id`, this field provides the user ID of the grouped usage result.\n     */\n    user_id?: string;\n    /**\n     * When `group_by=api_key_id`, this field provides the API key ID of the grouped usage result.\n     */\n    api_key_id?: string;\n    /**\n     * When `group_by=model`, this field provides the model name of the grouped usage result.\n     */\n    model?: string;\n};\n\n/**\n * The aggregated code interpreter sessions usage details of the specific time bucket.\n */\nexport type UsageCodeInterpreterSessionsResult = {\n    object: 'organization.usage.code_interpreter_sessions.result';\n    /**\n     * The number of code interpreter sessions.\n     */\n    num_sessions?: number;\n    /**\n     * When `group_by=project_id`, this field provides the project ID of the grouped usage result.\n     */\n    project_id?: string;\n};\n\n/**\n * The aggregated completions usage details of the specific time bucket.\n */\nexport type UsageCompletionsResult = {\n    object: 'organization.usage.completions.result';\n    /**\n     * The aggregated number of text input tokens used, including cached tokens. For customers subscribe to scale tier, this includes scale tier tokens.\n     */\n    input_tokens: number;\n    /**\n     * The aggregated number of text input tokens that has been cached from previous requests. For customers subscribe to scale tier, this includes scale tier tokens.\n     */\n    input_cached_tokens?: number;\n    /**\n     * The aggregated number of text output tokens used. For customers subscribe to scale tier, this includes scale tier tokens.\n     */\n    output_tokens: number;\n    /**\n     * The aggregated number of audio input tokens used, including cached tokens.\n     */\n    input_audio_tokens?: number;\n    /**\n     * The aggregated number of audio output tokens used.\n     */\n    output_audio_tokens?: number;\n    /**\n     * The count of requests made to the model.\n     */\n    num_model_requests: number;\n    /**\n     * When `group_by=project_id`, this field provides the project ID of the grouped usage result.\n     */\n    project_id?: string;\n    /**\n     * When `group_by=user_id`, this field provides the user ID of the grouped usage result.\n     */\n    user_id?: string;\n    /**\n     * When `group_by=api_key_id`, this field provides the API key ID of the grouped usage result.\n     */\n    api_key_id?: string;\n    /**\n     * When `group_by=model`, this field provides the model name of the grouped usage result.\n     */\n    model?: string;\n    /**\n     * When `group_by=batch`, this field tells whether the grouped usage result is batch or not.\n     */\n    batch?: boolean;\n};\n\n/**\n * The aggregated embeddings usage details of the specific time bucket.\n */\nexport type UsageEmbeddingsResult = {\n    object: 'organization.usage.embeddings.result';\n    /**\n     * The aggregated number of input tokens used.\n     */\n    input_tokens: number;\n    /**\n     * The count of requests made to the model.\n     */\n    num_model_requests: number;\n    /**\n     * When `group_by=project_id`, this field provides the project ID of the grouped usage result.\n     */\n    project_id?: string;\n    /**\n     * When `group_by=user_id`, this field provides the user ID of the grouped usage result.\n     */\n    user_id?: string;\n    /**\n     * When `group_by=api_key_id`, this field provides the API key ID of the grouped usage result.\n     */\n    api_key_id?: string;\n    /**\n     * When `group_by=model`, this field provides the model name of the grouped usage result.\n     */\n    model?: string;\n};\n\n/**\n * The aggregated images usage details of the specific time bucket.\n */\nexport type UsageImagesResult = {\n    object: 'organization.usage.images.result';\n    /**\n     * The number of images processed.\n     */\n    images: number;\n    /**\n     * The count of requests made to the model.\n     */\n    num_model_requests: number;\n    /**\n     * When `group_by=source`, this field provides the source of the grouped usage result, possible values are `image.generation`, `image.edit`, `image.variation`.\n     */\n    source?: string;\n    /**\n     * When `group_by=size`, this field provides the image size of the grouped usage result.\n     */\n    size?: string;\n    /**\n     * When `group_by=project_id`, this field provides the project ID of the grouped usage result.\n     */\n    project_id?: string;\n    /**\n     * When `group_by=user_id`, this field provides the user ID of the grouped usage result.\n     */\n    user_id?: string;\n    /**\n     * When `group_by=api_key_id`, this field provides the API key ID of the grouped usage result.\n     */\n    api_key_id?: string;\n    /**\n     * When `group_by=model`, this field provides the model name of the grouped usage result.\n     */\n    model?: string;\n};\n\n/**\n * The aggregated moderations usage details of the specific time bucket.\n */\nexport type UsageModerationsResult = {\n    object: 'organization.usage.moderations.result';\n    /**\n     * The aggregated number of input tokens used.\n     */\n    input_tokens: number;\n    /**\n     * The count of requests made to the model.\n     */\n    num_model_requests: number;\n    /**\n     * When `group_by=project_id`, this field provides the project ID of the grouped usage result.\n     */\n    project_id?: string;\n    /**\n     * When `group_by=user_id`, this field provides the user ID of the grouped usage result.\n     */\n    user_id?: string;\n    /**\n     * When `group_by=api_key_id`, this field provides the API key ID of the grouped usage result.\n     */\n    api_key_id?: string;\n    /**\n     * When `group_by=model`, this field provides the model name of the grouped usage result.\n     */\n    model?: string;\n};\n\nexport type UsageResponse = {\n    object: 'page';\n    data: Array<UsageTimeBucket>;\n    has_more: boolean;\n    next_page: string;\n};\n\nexport type UsageTimeBucket = {\n    object: 'bucket';\n    start_time: number;\n    end_time: number;\n    result: Array<({\n        object?: 'UsageCompletionsResult';\n    } & UsageCompletionsResult) | ({\n        object?: 'UsageEmbeddingsResult';\n    } & UsageEmbeddingsResult) | ({\n        object?: 'UsageModerationsResult';\n    } & UsageModerationsResult) | ({\n        object?: 'UsageImagesResult';\n    } & UsageImagesResult) | ({\n        object?: 'UsageAudioSpeechesResult';\n    } & UsageAudioSpeechesResult) | ({\n        object?: 'UsageAudioTranscriptionsResult';\n    } & UsageAudioTranscriptionsResult) | ({\n        object?: 'UsageVectorStoresResult';\n    } & UsageVectorStoresResult) | ({\n        object?: 'UsageCodeInterpreterSessionsResult';\n    } & UsageCodeInterpreterSessionsResult) | ({\n        object?: 'CostsResult';\n    } & CostsResult)>;\n};\n\n/**\n * The aggregated vector stores usage details of the specific time bucket.\n */\nexport type UsageVectorStoresResult = {\n    object: 'organization.usage.vector_stores.result';\n    /**\n     * The vector stores usage in bytes.\n     */\n    usage_bytes: number;\n    /**\n     * When `group_by=project_id`, this field provides the project ID of the grouped usage result.\n     */\n    project_id?: string;\n};\n\n/**\n * Represents an individual `user` within an organization.\n */\nexport type User = {\n    /**\n     * The object type, which is always `organization.user`\n     */\n    object: 'organization.user';\n    /**\n     * The identifier, which can be referenced in API endpoints\n     */\n    id: string;\n    /**\n     * The name of the user\n     */\n    name: string;\n    /**\n     * The email address of the user\n     */\n    email: string;\n    /**\n     * `owner` or `reader`\n     */\n    role: 'owner' | 'reader';\n    /**\n     * The Unix timestamp (in seconds) of when the user was added.\n     */\n    added_at: number;\n};\n\nexport type UserDeleteResponse = {\n    object: 'organization.user.deleted';\n    id: string;\n    deleted: boolean;\n};\n\nexport type UserListResponse = {\n    object: 'list';\n    data: Array<User>;\n    first_id: string;\n    last_id: string;\n    has_more: boolean;\n};\n\nexport type UserRoleUpdateRequest = {\n    /**\n     * `owner` or `reader`\n     */\n    role: 'owner' | 'reader';\n};\n\nexport type VadConfig = {\n    /**\n     * Must be set to `server_vad` to enable manual chunking using server side VAD.\n     */\n    type: 'server_vad';\n    /**\n     * Amount of audio to include before the VAD detected speech (in\n     * milliseconds).\n     *\n     */\n    prefix_padding_ms?: number;\n    /**\n     * Duration of silence to detect speech stop (in milliseconds).\n     * With shorter values the model will respond more quickly,\n     * but may jump in on short pauses from the user.\n     *\n     */\n    silence_duration_ms?: number;\n    /**\n     * Sensitivity threshold (0.0 to 1.0) for voice activity detection. A\n     * higher threshold will require louder audio to activate the model, and\n     * thus might perform better in noisy environments.\n     *\n     */\n    threshold?: number;\n};\n\n/**\n * ValidateGraderRequest\n */\nexport type ValidateGraderRequest = {\n    /**\n     * The grader used for the fine-tuning job.\n     */\n    grader: GraderStringCheck | GraderTextSimilarity | GraderPython | GraderScoreModel | GraderMulti;\n};\n\n/**\n * ValidateGraderResponse\n */\nexport type ValidateGraderResponse = {\n    /**\n     * The grader used for the fine-tuning job.\n     */\n    grader?: GraderStringCheck | GraderTextSimilarity | GraderPython | GraderScoreModel | GraderMulti;\n};\n\n/**\n * Vector store expiration policy\n *\n * The expiration policy for a vector store.\n */\nexport type VectorStoreExpirationAfter = {\n    /**\n     * Anchor timestamp after which the expiration policy applies. Supported anchors: `last_active_at`.\n     */\n    anchor: 'last_active_at';\n    /**\n     * The number of days after the anchor time that the vector store will expire.\n     */\n    days: number;\n};\n\n/**\n * Set of 16 key-value pairs that can be attached to an object. This can be\n * useful for storing additional information about the object in a structured\n * format, and querying for objects via API or the dashboard. Keys are strings\n * with a maximum length of 64 characters. Values are strings with a maximum\n * length of 512 characters, booleans, or numbers.\n *\n */\nexport type VectorStoreFileAttributes = {\n    [key: string]: string | number | boolean;\n};\n\n/**\n * Vector store file batch\n *\n * A batch of files attached to a vector store.\n */\nexport type VectorStoreFileBatchObject = {\n    /**\n     * The identifier, which can be referenced in API endpoints.\n     */\n    id: string;\n    /**\n     * The object type, which is always `vector_store.file_batch`.\n     */\n    object: 'vector_store.files_batch';\n    /**\n     * The Unix timestamp (in seconds) for when the vector store files batch was created.\n     */\n    created_at: number;\n    /**\n     * The ID of the [vector store](https://platform.openai.com/docs/api-reference/vector-stores/object) that the [File](https://platform.openai.com/docs/api-reference/files) is attached to.\n     */\n    vector_store_id: string;\n    /**\n     * The status of the vector store files batch, which can be either `in_progress`, `completed`, `cancelled` or `failed`.\n     */\n    status: 'in_progress' | 'completed' | 'cancelled' | 'failed';\n    file_counts: {\n        /**\n         * The number of files that are currently being processed.\n         */\n        in_progress: number;\n        /**\n         * The number of files that have been processed.\n         */\n        completed: number;\n        /**\n         * The number of files that have failed to process.\n         */\n        failed: number;\n        /**\n         * The number of files that where cancelled.\n         */\n        cancelled: number;\n        /**\n         * The total number of files.\n         */\n        total: number;\n    };\n};\n\n/**\n * Represents the parsed content of a vector store file.\n */\nexport type VectorStoreFileContentResponse = {\n    /**\n     * The object type, which is always `vector_store.file_content.page`\n     */\n    object: 'vector_store.file_content.page';\n    /**\n     * Parsed content of the file.\n     */\n    data: Array<{\n        /**\n         * The content type (currently only `\"text\"`)\n         */\n        type?: string;\n        /**\n         * The text content\n         */\n        text?: string;\n    }>;\n    /**\n     * Indicates if there are more content pages to fetch.\n     */\n    has_more: boolean;\n    /**\n     * The token for the next page, if any.\n     */\n    next_page: string;\n};\n\n/**\n * Vector store files\n *\n * A list of files attached to a vector store.\n */\nexport type VectorStoreFileObject = {\n    /**\n     * The identifier, which can be referenced in API endpoints.\n     */\n    id: string;\n    /**\n     * The object type, which is always `vector_store.file`.\n     */\n    object: 'vector_store.file';\n    /**\n     * The total vector store usage in bytes. Note that this may be different from the original file size.\n     */\n    usage_bytes: number;\n    /**\n     * The Unix timestamp (in seconds) for when the vector store file was created.\n     */\n    created_at: number;\n    /**\n     * The ID of the [vector store](https://platform.openai.com/docs/api-reference/vector-stores/object) that the [File](https://platform.openai.com/docs/api-reference/files) is attached to.\n     */\n    vector_store_id: string;\n    /**\n     * The status of the vector store file, which can be either `in_progress`, `completed`, `cancelled`, or `failed`. The status `completed` indicates that the vector store file is ready for use.\n     */\n    status: 'in_progress' | 'completed' | 'cancelled' | 'failed';\n    /**\n     * The last error associated with this vector store file. Will be `null` if there are no errors.\n     */\n    last_error: {\n        /**\n         * One of `server_error` or `rate_limit_exceeded`.\n         */\n        code: 'server_error' | 'unsupported_file' | 'invalid_file';\n        /**\n         * A human-readable description of the error.\n         */\n        message: string;\n    };\n    chunking_strategy?: ChunkingStrategyResponse;\n    attributes?: VectorStoreFileAttributes;\n};\n\n/**\n * Vector store\n *\n * A vector store is a collection of processed files can be used by the `file_search` tool.\n */\nexport type VectorStoreObject = {\n    /**\n     * The identifier, which can be referenced in API endpoints.\n     */\n    id: string;\n    /**\n     * The object type, which is always `vector_store`.\n     */\n    object: 'vector_store';\n    /**\n     * The Unix timestamp (in seconds) for when the vector store was created.\n     */\n    created_at: number;\n    /**\n     * The name of the vector store.\n     */\n    name: string;\n    /**\n     * The total number of bytes used by the files in the vector store.\n     */\n    usage_bytes: number;\n    file_counts: {\n        /**\n         * The number of files that are currently being processed.\n         */\n        in_progress: number;\n        /**\n         * The number of files that have been successfully processed.\n         */\n        completed: number;\n        /**\n         * The number of files that have failed to process.\n         */\n        failed: number;\n        /**\n         * The number of files that were cancelled.\n         */\n        cancelled: number;\n        /**\n         * The total number of files.\n         */\n        total: number;\n    };\n    /**\n     * The status of the vector store, which can be either `expired`, `in_progress`, or `completed`. A status of `completed` indicates that the vector store is ready for use.\n     */\n    status: 'expired' | 'in_progress' | 'completed';\n    expires_after?: VectorStoreExpirationAfter;\n    /**\n     * The Unix timestamp (in seconds) for when the vector store will expire.\n     */\n    expires_at?: number;\n    /**\n     * The Unix timestamp (in seconds) for when the vector store was last active.\n     */\n    last_active_at: number;\n    metadata: Metadata;\n};\n\nexport type VectorStoreSearchRequest = {\n    /**\n     * A query string for a search\n     */\n    query: string | Array<string>;\n    /**\n     * Whether to rewrite the natural language query for vector search.\n     */\n    rewrite_query?: boolean;\n    /**\n     * The maximum number of results to return. This number should be between 1 and 50 inclusive.\n     */\n    max_num_results?: number;\n    /**\n     * A filter to apply based on file attributes.\n     */\n    filters?: ComparisonFilter | CompoundFilter;\n    /**\n     * Ranking options for search.\n     */\n    ranking_options?: {\n        /**\n         * Enable re-ranking; set to `none` to disable, which can help reduce latency.\n         */\n        ranker?: 'none' | 'auto' | 'default-2024-11-15';\n        score_threshold?: number;\n    };\n};\n\nexport type VectorStoreSearchResultContentObject = {\n    /**\n     * The type of content.\n     */\n    type: 'text';\n    /**\n     * The text content returned from search.\n     */\n    text: string;\n};\n\nexport type VectorStoreSearchResultItem = {\n    /**\n     * The ID of the vector store file.\n     */\n    file_id: string;\n    /**\n     * The name of the vector store file.\n     */\n    filename: string;\n    /**\n     * The similarity score for the result.\n     */\n    score: number;\n    attributes: VectorStoreFileAttributes;\n    /**\n     * Content chunks from the file.\n     */\n    content: Array<VectorStoreSearchResultContentObject>;\n};\n\nexport type VectorStoreSearchResultsPage = {\n    /**\n     * The object type, which is always `vector_store.search_results.page`\n     */\n    object: 'vector_store.search_results.page';\n    search_query: Array<string>;\n    /**\n     * The list of search result items.\n     */\n    data: Array<VectorStoreSearchResultItem>;\n    /**\n     * Indicates if there are more results to fetch.\n     */\n    has_more: boolean;\n    /**\n     * The token for the next page, if any.\n     */\n    next_page: string;\n};\n\n/**\n * Constrains the verbosity of the model's response. Lower values will result in\n * more concise responses, while higher values will result in more verbose responses.\n * Currently supported values are `low`, `medium`, and `high`.\n *\n */\nexport const Verbosity = {\n    LOW: 'low',\n    MEDIUM: 'medium',\n    HIGH: 'high'\n} as const;\n\n/**\n * Constrains the verbosity of the model's response. Lower values will result in\n * more concise responses, while higher values will result in more verbose responses.\n * Currently supported values are `low`, `medium`, and `high`.\n *\n */\nexport type Verbosity = typeof Verbosity[keyof typeof Verbosity];\n\nexport type VoiceIdsShared = string | 'alloy' | 'ash' | 'ballad' | 'coral' | 'echo' | 'sage' | 'shimmer' | 'verse';\n\n/**\n * Wait\n *\n * A wait action.\n *\n */\nexport type Wait = {\n    /**\n     * Specifies the event type. For a wait action, this property is\n     * always set to `wait`.\n     *\n     */\n    type: 'wait';\n};\n\n/**\n * Find action\n *\n * Action type \"find\": Searches for a pattern within a loaded page.\n *\n */\nexport type WebSearchActionFind = {\n    /**\n     * The action type.\n     *\n     */\n    type: 'find';\n    /**\n     * The URL of the page searched for the pattern.\n     *\n     */\n    url: string;\n    /**\n     * The pattern or text to search for within the page.\n     *\n     */\n    pattern: string;\n};\n\n/**\n * Open page action\n *\n * Action type \"open_page\" - Opens a specific URL from search results.\n *\n */\nexport type WebSearchActionOpenPage = {\n    /**\n     * The action type.\n     *\n     */\n    type: 'open_page';\n    /**\n     * The URL opened by the model.\n     *\n     */\n    url: string;\n};\n\n/**\n * Search action\n *\n * Action type \"search\" - Performs a web search query.\n *\n */\nexport type WebSearchActionSearch = {\n    /**\n     * The action type.\n     *\n     */\n    type: 'search';\n    /**\n     * The search query.\n     *\n     */\n    query: string;\n};\n\n/**\n * High level guidance for the amount of context window space to use for the\n * search. One of `low`, `medium`, or `high`. `medium` is the default.\n *\n */\nexport const WebSearchContextSize = {\n    LOW: 'low',\n    MEDIUM: 'medium',\n    HIGH: 'high'\n} as const;\n\n/**\n * High level guidance for the amount of context window space to use for the\n * search. One of `low`, `medium`, or `high`. `medium` is the default.\n *\n */\nexport type WebSearchContextSize = typeof WebSearchContextSize[keyof typeof WebSearchContextSize];\n\n/**\n * Web search location\n *\n * Approximate location parameters for the search.\n */\nexport type WebSearchLocation = {\n    /**\n     * The two-letter\n     * [ISO country code](https://en.wikipedia.org/wiki/ISO_3166-1) of the user,\n     * e.g. `US`.\n     *\n     */\n    country?: string;\n    /**\n     * Free text input for the region of the user, e.g. `California`.\n     *\n     */\n    region?: string;\n    /**\n     * Free text input for the city of the user, e.g. `San Francisco`.\n     *\n     */\n    city?: string;\n    /**\n     * The [IANA timezone](https://timeapi.io/documentation/iana-timezones)\n     * of the user, e.g. `America/Los_Angeles`.\n     *\n     */\n    timezone?: string;\n};\n\n/**\n * Web search tool call\n *\n * The results of a web search tool call. See the\n * [web search guide](https://platform.openai.com/docs/guides/tools-web-search) for more information.\n *\n */\nexport type WebSearchToolCall = {\n    /**\n     * The unique ID of the web search tool call.\n     *\n     */\n    id: string;\n    /**\n     * The type of the web search tool call. Always `web_search_call`.\n     *\n     */\n    type: 'web_search_call';\n    /**\n     * The status of the web search tool call.\n     *\n     */\n    status: 'in_progress' | 'searching' | 'completed' | 'failed';\n    /**\n     * An object describing the specific action taken in this web search call.\n     * Includes details on how the model used the web (search, open_page, find).\n     *\n     */\n    action: ({\n        type?: 'WebSearchActionSearch';\n    } & WebSearchActionSearch) | ({\n        type?: 'WebSearchActionOpenPage';\n    } & WebSearchActionOpenPage) | ({\n        type?: 'WebSearchActionFind';\n    } & WebSearchActionFind);\n};\n\n/**\n * batch.cancelled\n *\n * Sent when a batch API request has been cancelled.\n *\n */\nexport type WebhookBatchCancelled = {\n    /**\n     * The Unix timestamp (in seconds) of when the batch API request was cancelled.\n     *\n     */\n    created_at: number;\n    /**\n     * The unique ID of the event.\n     *\n     */\n    id: string;\n    /**\n     * Event data payload.\n     *\n     */\n    data: {\n        /**\n         * The unique ID of the batch API request.\n         *\n         */\n        id: string;\n    };\n    /**\n     * The object of the event. Always `event`.\n     *\n     */\n    object?: 'event';\n    /**\n     * The type of the event. Always `batch.cancelled`.\n     *\n     */\n    type: 'batch.cancelled';\n};\n\n/**\n * batch.completed\n *\n * Sent when a batch API request has been completed.\n *\n */\nexport type WebhookBatchCompleted = {\n    /**\n     * The Unix timestamp (in seconds) of when the batch API request was completed.\n     *\n     */\n    created_at: number;\n    /**\n     * The unique ID of the event.\n     *\n     */\n    id: string;\n    /**\n     * Event data payload.\n     *\n     */\n    data: {\n        /**\n         * The unique ID of the batch API request.\n         *\n         */\n        id: string;\n    };\n    /**\n     * The object of the event. Always `event`.\n     *\n     */\n    object?: 'event';\n    /**\n     * The type of the event. Always `batch.completed`.\n     *\n     */\n    type: 'batch.completed';\n};\n\n/**\n * batch.expired\n *\n * Sent when a batch API request has expired.\n *\n */\nexport type WebhookBatchExpired = {\n    /**\n     * The Unix timestamp (in seconds) of when the batch API request expired.\n     *\n     */\n    created_at: number;\n    /**\n     * The unique ID of the event.\n     *\n     */\n    id: string;\n    /**\n     * Event data payload.\n     *\n     */\n    data: {\n        /**\n         * The unique ID of the batch API request.\n         *\n         */\n        id: string;\n    };\n    /**\n     * The object of the event. Always `event`.\n     *\n     */\n    object?: 'event';\n    /**\n     * The type of the event. Always `batch.expired`.\n     *\n     */\n    type: 'batch.expired';\n};\n\n/**\n * batch.failed\n *\n * Sent when a batch API request has failed.\n *\n */\nexport type WebhookBatchFailed = {\n    /**\n     * The Unix timestamp (in seconds) of when the batch API request failed.\n     *\n     */\n    created_at: number;\n    /**\n     * The unique ID of the event.\n     *\n     */\n    id: string;\n    /**\n     * Event data payload.\n     *\n     */\n    data: {\n        /**\n         * The unique ID of the batch API request.\n         *\n         */\n        id: string;\n    };\n    /**\n     * The object of the event. Always `event`.\n     *\n     */\n    object?: 'event';\n    /**\n     * The type of the event. Always `batch.failed`.\n     *\n     */\n    type: 'batch.failed';\n};\n\n/**\n * eval.run.canceled\n *\n * Sent when an eval run has been canceled.\n *\n */\nexport type WebhookEvalRunCanceled = {\n    /**\n     * The Unix timestamp (in seconds) of when the eval run was canceled.\n     *\n     */\n    created_at: number;\n    /**\n     * The unique ID of the event.\n     *\n     */\n    id: string;\n    /**\n     * Event data payload.\n     *\n     */\n    data: {\n        /**\n         * The unique ID of the eval run.\n         *\n         */\n        id: string;\n    };\n    /**\n     * The object of the event. Always `event`.\n     *\n     */\n    object?: 'event';\n    /**\n     * The type of the event. Always `eval.run.canceled`.\n     *\n     */\n    type: 'eval.run.canceled';\n};\n\n/**\n * eval.run.failed\n *\n * Sent when an eval run has failed.\n *\n */\nexport type WebhookEvalRunFailed = {\n    /**\n     * The Unix timestamp (in seconds) of when the eval run failed.\n     *\n     */\n    created_at: number;\n    /**\n     * The unique ID of the event.\n     *\n     */\n    id: string;\n    /**\n     * Event data payload.\n     *\n     */\n    data: {\n        /**\n         * The unique ID of the eval run.\n         *\n         */\n        id: string;\n    };\n    /**\n     * The object of the event. Always `event`.\n     *\n     */\n    object?: 'event';\n    /**\n     * The type of the event. Always `eval.run.failed`.\n     *\n     */\n    type: 'eval.run.failed';\n};\n\n/**\n * eval.run.succeeded\n *\n * Sent when an eval run has succeeded.\n *\n */\nexport type WebhookEvalRunSucceeded = {\n    /**\n     * The Unix timestamp (in seconds) of when the eval run succeeded.\n     *\n     */\n    created_at: number;\n    /**\n     * The unique ID of the event.\n     *\n     */\n    id: string;\n    /**\n     * Event data payload.\n     *\n     */\n    data: {\n        /**\n         * The unique ID of the eval run.\n         *\n         */\n        id: string;\n    };\n    /**\n     * The object of the event. Always `event`.\n     *\n     */\n    object?: 'event';\n    /**\n     * The type of the event. Always `eval.run.succeeded`.\n     *\n     */\n    type: 'eval.run.succeeded';\n};\n\n/**\n * fine_tuning.job.cancelled\n *\n * Sent when a fine-tuning job has been cancelled.\n *\n */\nexport type WebhookFineTuningJobCancelled = {\n    /**\n     * The Unix timestamp (in seconds) of when the fine-tuning job was cancelled.\n     *\n     */\n    created_at: number;\n    /**\n     * The unique ID of the event.\n     *\n     */\n    id: string;\n    /**\n     * Event data payload.\n     *\n     */\n    data: {\n        /**\n         * The unique ID of the fine-tuning job.\n         *\n         */\n        id: string;\n    };\n    /**\n     * The object of the event. Always `event`.\n     *\n     */\n    object?: 'event';\n    /**\n     * The type of the event. Always `fine_tuning.job.cancelled`.\n     *\n     */\n    type: 'fine_tuning.job.cancelled';\n};\n\n/**\n * fine_tuning.job.failed\n *\n * Sent when a fine-tuning job has failed.\n *\n */\nexport type WebhookFineTuningJobFailed = {\n    /**\n     * The Unix timestamp (in seconds) of when the fine-tuning job failed.\n     *\n     */\n    created_at: number;\n    /**\n     * The unique ID of the event.\n     *\n     */\n    id: string;\n    /**\n     * Event data payload.\n     *\n     */\n    data: {\n        /**\n         * The unique ID of the fine-tuning job.\n         *\n         */\n        id: string;\n    };\n    /**\n     * The object of the event. Always `event`.\n     *\n     */\n    object?: 'event';\n    /**\n     * The type of the event. Always `fine_tuning.job.failed`.\n     *\n     */\n    type: 'fine_tuning.job.failed';\n};\n\n/**\n * fine_tuning.job.succeeded\n *\n * Sent when a fine-tuning job has succeeded.\n *\n */\nexport type WebhookFineTuningJobSucceeded = {\n    /**\n     * The Unix timestamp (in seconds) of when the fine-tuning job succeeded.\n     *\n     */\n    created_at: number;\n    /**\n     * The unique ID of the event.\n     *\n     */\n    id: string;\n    /**\n     * Event data payload.\n     *\n     */\n    data: {\n        /**\n         * The unique ID of the fine-tuning job.\n         *\n         */\n        id: string;\n    };\n    /**\n     * The object of the event. Always `event`.\n     *\n     */\n    object?: 'event';\n    /**\n     * The type of the event. Always `fine_tuning.job.succeeded`.\n     *\n     */\n    type: 'fine_tuning.job.succeeded';\n};\n\n/**\n * response.cancelled\n *\n * Sent when a background response has been cancelled.\n *\n */\nexport type WebhookResponseCancelled = {\n    /**\n     * The Unix timestamp (in seconds) of when the model response was cancelled.\n     *\n     */\n    created_at: number;\n    /**\n     * The unique ID of the event.\n     *\n     */\n    id: string;\n    /**\n     * Event data payload.\n     *\n     */\n    data: {\n        /**\n         * The unique ID of the model response.\n         *\n         */\n        id: string;\n    };\n    /**\n     * The object of the event. Always `event`.\n     *\n     */\n    object?: 'event';\n    /**\n     * The type of the event. Always `response.cancelled`.\n     *\n     */\n    type: 'response.cancelled';\n};\n\n/**\n * response.completed\n *\n * Sent when a background response has been completed.\n *\n */\nexport type WebhookResponseCompleted = {\n    /**\n     * The Unix timestamp (in seconds) of when the model response was completed.\n     *\n     */\n    created_at: number;\n    /**\n     * The unique ID of the event.\n     *\n     */\n    id: string;\n    /**\n     * Event data payload.\n     *\n     */\n    data: {\n        /**\n         * The unique ID of the model response.\n         *\n         */\n        id: string;\n    };\n    /**\n     * The object of the event. Always `event`.\n     *\n     */\n    object?: 'event';\n    /**\n     * The type of the event. Always `response.completed`.\n     *\n     */\n    type: 'response.completed';\n};\n\n/**\n * response.failed\n *\n * Sent when a background response has failed.\n *\n */\nexport type WebhookResponseFailed = {\n    /**\n     * The Unix timestamp (in seconds) of when the model response failed.\n     *\n     */\n    created_at: number;\n    /**\n     * The unique ID of the event.\n     *\n     */\n    id: string;\n    /**\n     * Event data payload.\n     *\n     */\n    data: {\n        /**\n         * The unique ID of the model response.\n         *\n         */\n        id: string;\n    };\n    /**\n     * The object of the event. Always `event`.\n     *\n     */\n    object?: 'event';\n    /**\n     * The type of the event. Always `response.failed`.\n     *\n     */\n    type: 'response.failed';\n};\n\n/**\n * response.incomplete\n *\n * Sent when a background response has been interrupted.\n *\n */\nexport type WebhookResponseIncomplete = {\n    /**\n     * The Unix timestamp (in seconds) of when the model response was interrupted.\n     *\n     */\n    created_at: number;\n    /**\n     * The unique ID of the event.\n     *\n     */\n    id: string;\n    /**\n     * Event data payload.\n     *\n     */\n    data: {\n        /**\n         * The unique ID of the model response.\n         *\n         */\n        id: string;\n    };\n    /**\n     * The object of the event. Always `event`.\n     *\n     */\n    object?: 'event';\n    /**\n     * The type of the event. Always `response.incomplete`.\n     *\n     */\n    type: 'response.incomplete';\n};\n\n/**\n * Input text\n *\n * A text input to the model.\n */\nexport type InputTextContent = {\n    /**\n     * The type of the input item. Always `input_text`.\n     */\n    type: 'input_text';\n    /**\n     * The text input to the model.\n     */\n    text: string;\n};\n\n/**\n * Input image\n *\n * An image input to the model. Learn about [image inputs](https://platform.openai.com/docs/guides/vision).\n */\nexport type InputImageContent = {\n    /**\n     * The type of the input item. Always `input_image`.\n     */\n    type: 'input_image';\n    image_url?: string | null;\n    file_id?: string | null;\n    /**\n     * The detail level of the image to be sent to the model. One of `high`, `low`, or `auto`. Defaults to `auto`.\n     */\n    detail: 'low' | 'high' | 'auto';\n};\n\n/**\n * Input file\n *\n * A file input to the model.\n */\nexport type InputFileContent = {\n    /**\n     * The type of the input item. Always `input_file`.\n     */\n    type: 'input_file';\n    file_id?: string | null;\n    /**\n     * The name of the file to be sent to the model.\n     */\n    filename?: string;\n    /**\n     * The URL of the file to be sent to the model.\n     */\n    file_url?: string;\n    /**\n     * The content of the file to be sent to the model.\n     *\n     */\n    file_data?: string;\n};\n\n/**\n * Function\n *\n * Defines a function in your own code the model can choose to call. Learn more about [function calling](https://platform.openai.com/docs/guides/function-calling).\n */\nexport type FunctionTool = {\n    /**\n     * The type of the function tool. Always `function`.\n     */\n    type: 'function';\n    /**\n     * The name of the function to call.\n     */\n    name: string;\n    description?: string | null;\n    parameters: {\n        [key: string]: unknown;\n    } | null;\n    strict: boolean | null;\n};\n\nexport type RankingOptions = {\n    /**\n     * The ranker to use for the file search.\n     */\n    ranker?: 'auto' | 'default-2024-11-15';\n    /**\n     * The score threshold for the file search, a number between 0 and 1. Numbers closer to 1 will attempt to return only the most relevant results, but may return fewer results.\n     */\n    score_threshold?: number;\n};\n\nexport type Filters = ComparisonFilter | CompoundFilter;\n\n/**\n * File search\n *\n * A tool that searches for relevant content from uploaded files. Learn more about the [file search tool](https://platform.openai.com/docs/guides/tools-file-search).\n */\nexport type FileSearchTool = {\n    /**\n     * The type of the file search tool. Always `file_search`.\n     */\n    type: 'file_search';\n    /**\n     * The IDs of the vector stores to search.\n     */\n    vector_store_ids: Array<string>;\n    /**\n     * The maximum number of results to return. This number should be between 1 and 50 inclusive.\n     */\n    max_num_results?: number;\n    /**\n     * Ranking options for search.\n     */\n    ranking_options?: RankingOptions;\n    filters?: Filters | null;\n};\n\nexport type ApproximateLocation = {\n    /**\n     * The type of location approximation. Always `approximate`.\n     */\n    type: 'approximate';\n    country?: string | null;\n    region?: string | null;\n    city?: string | null;\n    timezone?: string | null;\n};\n\n/**\n * Web search preview\n *\n * This tool searches the web for relevant results to use in a response. Learn more about the [web search tool](https://platform.openai.com/docs/guides/tools-web-search).\n */\nexport type WebSearchPreviewTool = {\n    /**\n     * The type of the web search tool. One of `web_search_preview` or `web_search_preview_2025_03_11`.\n     */\n    type: 'web_search_preview' | 'web_search_preview_2025_03_11';\n    user_location?: ApproximateLocation | null;\n    /**\n     * High level guidance for the amount of context window space to use for the search. One of `low`, `medium`, or `high`. `medium` is the default.\n     */\n    search_context_size?: 'low' | 'medium' | 'high';\n};\n\n/**\n * Computer use preview\n *\n * A tool that controls a virtual computer. Learn more about the [computer tool](https://platform.openai.com/docs/guides/tools-computer-use).\n */\nexport type ComputerUsePreviewTool = {\n    /**\n     * The type of the computer use tool. Always `computer_use_preview`.\n     */\n    type: 'computer_use_preview';\n    /**\n     * The type of computer environment to control.\n     */\n    environment: 'windows' | 'mac' | 'linux' | 'ubuntu' | 'browser';\n    /**\n     * The width of the computer display.\n     */\n    display_width: number;\n    /**\n     * The height of the computer display.\n     */\n    display_height: number;\n};\n\n/**\n * Input usage details\n *\n * The input tokens detailed information for the image generation.\n */\nexport type ImageGenInputUsageDetails = {\n    /**\n     * The number of text tokens in the input prompt.\n     */\n    text_tokens: number;\n    /**\n     * The number of image tokens in the input prompt.\n     */\n    image_tokens: number;\n};\n\n/**\n * Image generation usage\n *\n * For `gpt-image-1` only, the token usage information for the image generation.\n */\nexport type ImageGenUsage = {\n    /**\n     * The number of tokens (images and text) in the input prompt.\n     */\n    input_tokens: number;\n    /**\n     * The total number of tokens (images and text) used for the image generation.\n     */\n    total_tokens: number;\n    /**\n     * The number of output tokens generated by the model.\n     */\n    output_tokens: number;\n    input_tokens_details: ImageGenInputUsageDetails;\n};\n\n/**\n * File citation\n *\n * A citation to a file.\n */\nexport type FileCitationBody = {\n    /**\n     * The type of the file citation. Always `file_citation`.\n     */\n    type: 'file_citation';\n    /**\n     * The ID of the file.\n     */\n    file_id: string;\n    /**\n     * The index of the file in the list of files.\n     */\n    index: number;\n    /**\n     * The filename of the file cited.\n     */\n    filename: string;\n};\n\n/**\n * URL citation\n *\n * A citation for a web resource used to generate a model response.\n */\nexport type UrlCitationBody = {\n    /**\n     * The type of the URL citation. Always `url_citation`.\n     */\n    type: 'url_citation';\n    /**\n     * The URL of the web resource.\n     */\n    url: string;\n    /**\n     * The index of the first character of the URL citation in the message.\n     */\n    start_index: number;\n    /**\n     * The index of the last character of the URL citation in the message.\n     */\n    end_index: number;\n    /**\n     * The title of the web resource.\n     */\n    title: string;\n};\n\n/**\n * Container file citation\n *\n * A citation for a container file used to generate a model response.\n */\nexport type ContainerFileCitationBody = {\n    /**\n     * The type of the container file citation. Always `container_file_citation`.\n     */\n    type: 'container_file_citation';\n    /**\n     * The ID of the container file.\n     */\n    container_id: string;\n    /**\n     * The ID of the file.\n     */\n    file_id: string;\n    /**\n     * The index of the first character of the container file citation in the message.\n     */\n    start_index: number;\n    /**\n     * The index of the last character of the container file citation in the message.\n     */\n    end_index: number;\n    /**\n     * The filename of the container file cited.\n     */\n    filename: string;\n};\n\nexport type Annotation = ({\n    type?: 'FileCitationBody';\n} & FileCitationBody) | ({\n    type?: 'UrlCitationBody';\n} & UrlCitationBody) | ({\n    type?: 'ContainerFileCitationBody';\n} & ContainerFileCitationBody) | ({\n    type?: 'FilePath';\n} & FilePath);\n\n/**\n * Top log probability\n *\n * The top log probability of a token.\n */\nexport type TopLogProb = {\n    token: string;\n    logprob: number;\n    bytes: Array<number>;\n};\n\n/**\n * Log probability\n *\n * The log probability of a token.\n */\nexport type LogProb = {\n    token: string;\n    logprob: number;\n    bytes: Array<number>;\n    top_logprobs: Array<TopLogProb>;\n};\n\n/**\n * Output text\n *\n * A text output from the model.\n */\nexport type OutputTextContent = {\n    /**\n     * The type of the output text. Always `output_text`.\n     */\n    type: 'output_text';\n    /**\n     * The text output from the model.\n     */\n    text: string;\n    /**\n     * The annotations of the text output.\n     */\n    annotations: Array<Annotation>;\n    logprobs?: Array<LogProb>;\n};\n\n/**\n * Refusal\n *\n * A refusal from the model.\n */\nexport type RefusalContent = {\n    /**\n     * The type of the refusal. Always `refusal`.\n     */\n    type: 'refusal';\n    /**\n     * The refusal explanation from the model.\n     */\n    refusal: string;\n};\n\n/**\n * A pending safety check for the computer call.\n */\nexport type ComputerCallSafetyCheckParam = {\n    /**\n     * The ID of the pending safety check.\n     */\n    id: string;\n    code?: string | null;\n    message?: string | null;\n};\n\n/**\n * Computer tool call output\n *\n * The output of a computer tool call.\n */\nexport type ComputerCallOutputItemParam = {\n    id?: string | null;\n    /**\n     * The ID of the computer tool call that produced the output.\n     */\n    call_id: string;\n    /**\n     * The type of the computer tool call output. Always `computer_call_output`.\n     */\n    type: 'computer_call_output';\n    output: ComputerScreenshotImage;\n    acknowledged_safety_checks?: Array<ComputerCallSafetyCheckParam> | null;\n    status?: 'in_progress' | 'completed' | 'incomplete' | null;\n};\n\n/**\n * Function tool call output\n *\n * The output of a function tool call.\n */\nexport type FunctionCallOutputItemParam = {\n    id?: string | null;\n    /**\n     * The unique ID of the function tool call generated by the model.\n     */\n    call_id: string;\n    /**\n     * The type of the function tool call output. Always `function_call_output`.\n     */\n    type: 'function_call_output';\n    /**\n     * A JSON string of the output of the function tool call.\n     */\n    output: string;\n    status?: 'in_progress' | 'completed' | 'incomplete' | null;\n};\n\n/**\n * Item reference\n *\n * An internal identifier for an item to reference.\n */\nexport type ItemReferenceParam = {\n    type?: 'item_reference' | null;\n    /**\n     * The ID of the item to reference.\n     */\n    id: string;\n};\n\nexport type RealtimeConversationItemContent = {\n    /**\n     * The content type (`input_text`, `input_audio`, `item_reference`, `text`, `audio`).\n     *\n     */\n    type?: 'input_text' | 'input_audio' | 'item_reference' | 'text' | 'audio';\n    /**\n     * The text content, used for `input_text` and `text` content types.\n     *\n     */\n    text?: string;\n    /**\n     * ID of a previous conversation item to reference (for `item_reference`\n     * content types in `response.create` events). These can reference both\n     * client and server created items.\n     *\n     */\n    id?: string;\n    /**\n     * Base64-encoded audio bytes, used for `input_audio` content type.\n     *\n     */\n    audio?: string;\n    /**\n     * The transcript of the audio, used for `input_audio` and `audio`\n     * content types.\n     *\n     */\n    transcript?: string;\n};\n\nexport type RealtimeConnectParams = {\n    model: string;\n};\n\n/**\n * An object describing an image to classify.\n */\nexport type ModerationImageUrlInput = {\n    /**\n     * Always `image_url`.\n     */\n    type: 'image_url';\n    /**\n     * Contains either an image URL or a data URL for a base64 encoded image.\n     */\n    image_url: {\n        /**\n         * Either a URL of the image or the base64 encoded image data.\n         */\n        url: string;\n    };\n};\n\n/**\n * An object describing text to classify.\n */\nexport type ModerationTextInput = {\n    /**\n     * Always `text`.\n     */\n    type: 'text';\n    /**\n     * A string of text to classify.\n     */\n    text: string;\n};\n\n/**\n * The strategy used to chunk the file.\n */\nexport type ChunkingStrategyResponse = ({\n    type?: 'StaticChunkingStrategyResponseParam';\n} & StaticChunkingStrategyResponseParam) | ({\n    type?: 'OtherChunkingStrategyResponseParam';\n} & OtherChunkingStrategyResponseParam);\n\n/**\n * The intended purpose of the uploaded file. One of: - `assistants`: Used in the Assistants API - `batch`: Used in the Batch API - `fine-tune`: Used for fine-tuning - `vision`: Images used for vision fine-tuning - `user_data`: Flexible file type for any purpose - `evals`: Used for eval data sets\n *\n */\nexport const FilePurpose = {\n    ASSISTANTS: 'assistants',\n    BATCH: 'batch',\n    FINE_TUNE: 'fine-tune',\n    VISION: 'vision',\n    USER_DATA: 'user_data',\n    EVALS: 'evals'\n} as const;\n\n/**\n * The intended purpose of the uploaded file. One of: - `assistants`: Used in the Assistants API - `batch`: Used in the Batch API - `fine-tune`: Used for fine-tuning - `vision`: Images used for vision fine-tuning - `user_data`: Flexible file type for any purpose - `evals`: Used for eval data sets\n *\n */\nexport type FilePurpose = typeof FilePurpose[keyof typeof FilePurpose];\n\nexport type BatchError = {\n    /**\n     * An error code identifying the error type.\n     */\n    code?: string;\n    /**\n     * A human-readable message providing more details about the error.\n     */\n    message?: string;\n    /**\n     * The name of the parameter that caused the error, if applicable.\n     */\n    param?: string;\n    /**\n     * The line number of the input file where the error occurred, if applicable.\n     */\n    line?: number;\n};\n\n/**\n * The request counts for different statuses within the batch.\n */\nexport type BatchRequestCounts = {\n    /**\n     * Total number of requests in the batch.\n     */\n    total: number;\n    /**\n     * Number of requests that have been completed successfully.\n     */\n    completed: number;\n    /**\n     * Number of requests that have failed.\n     */\n    failed: number;\n};\n\nexport type AssistantTool = ({\n    type?: 'AssistantToolsCode';\n} & AssistantToolsCode) | ({\n    type?: 'AssistantToolsFileSearch';\n} & AssistantToolsFileSearch) | ({\n    type?: 'AssistantToolsFunction';\n} & AssistantToolsFunction);\n\nexport type TextAnnotationDelta = ({\n    type?: 'MessageDeltaContentTextAnnotationsFileCitationObject';\n} & MessageDeltaContentTextAnnotationsFileCitationObject) | ({\n    type?: 'MessageDeltaContentTextAnnotationsFilePathObject';\n} & MessageDeltaContentTextAnnotationsFilePathObject);\n\nexport type TextAnnotation = ({\n    type?: 'MessageContentTextAnnotationsFileCitationObject';\n} & MessageContentTextAnnotationsFileCitationObject) | ({\n    type?: 'MessageContentTextAnnotationsFilePathObject';\n} & MessageContentTextAnnotationsFilePathObject);\n\nexport type RunStepDetailsToolCall = ({\n    type?: 'RunStepDetailsToolCallsCodeObject';\n} & RunStepDetailsToolCallsCodeObject) | ({\n    type?: 'RunStepDetailsToolCallsFileSearchObject';\n} & RunStepDetailsToolCallsFileSearchObject) | ({\n    type?: 'RunStepDetailsToolCallsFunctionObject';\n} & RunStepDetailsToolCallsFunctionObject);\n\nexport type RunStepDeltaStepDetailsToolCall = ({\n    type?: 'RunStepDeltaStepDetailsToolCallsCodeObject';\n} & RunStepDeltaStepDetailsToolCallsCodeObject) | ({\n    type?: 'RunStepDeltaStepDetailsToolCallsFileSearchObject';\n} & RunStepDeltaStepDetailsToolCallsFileSearchObject) | ({\n    type?: 'RunStepDeltaStepDetailsToolCallsFunctionObject';\n} & RunStepDeltaStepDetailsToolCallsFunctionObject);\n\nexport type MessageContent = ({\n    type?: 'MessageContentImageFileObject';\n} & MessageContentImageFileObject) | ({\n    type?: 'MessageContentImageUrlObject';\n} & MessageContentImageUrlObject) | ({\n    type?: 'MessageContentTextObject';\n} & MessageContentTextObject) | ({\n    type?: 'MessageContentRefusalObject';\n} & MessageContentRefusalObject);\n\nexport type MessageContentDelta = ({\n    type?: 'MessageDeltaContentImageFileObject';\n} & MessageDeltaContentImageFileObject) | ({\n    type?: 'MessageDeltaContentTextObject';\n} & MessageDeltaContentTextObject) | ({\n    type?: 'MessageDeltaContentRefusalObject';\n} & MessageDeltaContentRefusalObject) | ({\n    type?: 'MessageDeltaContentImageUrlObject';\n} & MessageDeltaContentImageUrlObject);\n\nexport const ChatModel = {\n    GPT_5: 'gpt-5',\n    GPT_5_MINI: 'gpt-5-mini',\n    GPT_5_NANO: 'gpt-5-nano',\n    GPT_5_2025_08_07: 'gpt-5-2025-08-07',\n    GPT_5_MINI_2025_08_07: 'gpt-5-mini-2025-08-07',\n    GPT_5_NANO_2025_08_07: 'gpt-5-nano-2025-08-07',\n    GPT_5_CHAT_LATEST: 'gpt-5-chat-latest',\n    GPT_4_1: 'gpt-4.1',\n    GPT_4_1_MINI: 'gpt-4.1-mini',\n    GPT_4_1_NANO: 'gpt-4.1-nano',\n    GPT_4_1_2025_04_14: 'gpt-4.1-2025-04-14',\n    GPT_4_1_MINI_2025_04_14: 'gpt-4.1-mini-2025-04-14',\n    GPT_4_1_NANO_2025_04_14: 'gpt-4.1-nano-2025-04-14',\n    O4_MINI: 'o4-mini',\n    O4_MINI_2025_04_16: 'o4-mini-2025-04-16',\n    O3: 'o3',\n    O3_2025_04_16: 'o3-2025-04-16',\n    O3_MINI: 'o3-mini',\n    O3_MINI_2025_01_31: 'o3-mini-2025-01-31',\n    O1: 'o1',\n    O1_2024_12_17: 'o1-2024-12-17',\n    O1_PREVIEW: 'o1-preview',\n    O1_PREVIEW_2024_09_12: 'o1-preview-2024-09-12',\n    O1_MINI: 'o1-mini',\n    O1_MINI_2024_09_12: 'o1-mini-2024-09-12',\n    GPT_4O: 'gpt-4o',\n    GPT_4O_2024_11_20: 'gpt-4o-2024-11-20',\n    GPT_4O_2024_08_06: 'gpt-4o-2024-08-06',\n    GPT_4O_2024_05_13: 'gpt-4o-2024-05-13',\n    GPT_4O_AUDIO_PREVIEW: 'gpt-4o-audio-preview',\n    GPT_4O_AUDIO_PREVIEW_2024_10_01: 'gpt-4o-audio-preview-2024-10-01',\n    GPT_4O_AUDIO_PREVIEW_2024_12_17: 'gpt-4o-audio-preview-2024-12-17',\n    GPT_4O_AUDIO_PREVIEW_2025_06_03: 'gpt-4o-audio-preview-2025-06-03',\n    GPT_4O_MINI_AUDIO_PREVIEW: 'gpt-4o-mini-audio-preview',\n    GPT_4O_MINI_AUDIO_PREVIEW_2024_12_17: 'gpt-4o-mini-audio-preview-2024-12-17',\n    GPT_4O_SEARCH_PREVIEW: 'gpt-4o-search-preview',\n    GPT_4O_MINI_SEARCH_PREVIEW: 'gpt-4o-mini-search-preview',\n    GPT_4O_SEARCH_PREVIEW_2025_03_11: 'gpt-4o-search-preview-2025-03-11',\n    GPT_4O_MINI_SEARCH_PREVIEW_2025_03_11: 'gpt-4o-mini-search-preview-2025-03-11',\n    CHATGPT_4O_LATEST: 'chatgpt-4o-latest',\n    CODEX_MINI_LATEST: 'codex-mini-latest',\n    GPT_4O_MINI: 'gpt-4o-mini',\n    GPT_4O_MINI_2024_07_18: 'gpt-4o-mini-2024-07-18',\n    GPT_4_TURBO: 'gpt-4-turbo',\n    GPT_4_TURBO_2024_04_09: 'gpt-4-turbo-2024-04-09',\n    GPT_4_0125_PREVIEW: 'gpt-4-0125-preview',\n    GPT_4_TURBO_PREVIEW: 'gpt-4-turbo-preview',\n    GPT_4_1106_PREVIEW: 'gpt-4-1106-preview',\n    GPT_4_VISION_PREVIEW: 'gpt-4-vision-preview',\n    GPT_4: 'gpt-4',\n    GPT_4_0314: 'gpt-4-0314',\n    GPT_4_0613: 'gpt-4-0613',\n    GPT_4_32K: 'gpt-4-32k',\n    GPT_4_32K_0314: 'gpt-4-32k-0314',\n    GPT_4_32K_0613: 'gpt-4-32k-0613',\n    GPT_3_5_TURBO: 'gpt-3.5-turbo',\n    GPT_3_5_TURBO_16K: 'gpt-3.5-turbo-16k',\n    GPT_3_5_TURBO_0301: 'gpt-3.5-turbo-0301',\n    GPT_3_5_TURBO_0613: 'gpt-3.5-turbo-0613',\n    GPT_3_5_TURBO_1106: 'gpt-3.5-turbo-1106',\n    GPT_3_5_TURBO_0125: 'gpt-3.5-turbo-0125',\n    GPT_3_5_TURBO_16K_0613: 'gpt-3.5-turbo-16k-0613'\n} as const;\n\nexport type ChatModel = typeof ChatModel[keyof typeof ChatModel];\n\nexport type CreateThreadAndRunRequestWithoutStream = {\n    /**\n     * The ID of the [assistant](https://platform.openai.com/docs/api-reference/assistants) to use to execute this run.\n     */\n    assistant_id: string;\n    thread?: CreateThreadRequest;\n    /**\n     * The ID of the [Model](https://platform.openai.com/docs/api-reference/models) to be used to execute this run. If a value is provided here, it will override the model associated with the assistant. If not, the model associated with the assistant will be used.\n     */\n    model?: string | 'gpt-5' | 'gpt-5-mini' | 'gpt-5-nano' | 'gpt-5-2025-08-07' | 'gpt-5-mini-2025-08-07' | 'gpt-5-nano-2025-08-07' | 'gpt-4.1' | 'gpt-4.1-mini' | 'gpt-4.1-nano' | 'gpt-4.1-2025-04-14' | 'gpt-4.1-mini-2025-04-14' | 'gpt-4.1-nano-2025-04-14' | 'gpt-4o' | 'gpt-4o-2024-11-20' | 'gpt-4o-2024-08-06' | 'gpt-4o-2024-05-13' | 'gpt-4o-mini' | 'gpt-4o-mini-2024-07-18' | 'gpt-4.5-preview' | 'gpt-4.5-preview-2025-02-27' | 'gpt-4-turbo' | 'gpt-4-turbo-2024-04-09' | 'gpt-4-0125-preview' | 'gpt-4-turbo-preview' | 'gpt-4-1106-preview' | 'gpt-4-vision-preview' | 'gpt-4' | 'gpt-4-0314' | 'gpt-4-0613' | 'gpt-4-32k' | 'gpt-4-32k-0314' | 'gpt-4-32k-0613' | 'gpt-3.5-turbo' | 'gpt-3.5-turbo-16k' | 'gpt-3.5-turbo-0613' | 'gpt-3.5-turbo-1106' | 'gpt-3.5-turbo-0125' | 'gpt-3.5-turbo-16k-0613';\n    /**\n     * Override the default system message of the assistant. This is useful for modifying the behavior on a per-run basis.\n     */\n    instructions?: string;\n    /**\n     * Override the tools the assistant can use for this run. This is useful for modifying the behavior on a per-run basis.\n     */\n    tools?: Array<AssistantTool>;\n    /**\n     * A set of resources that are used by the assistant's tools. The resources are specific to the type of tool. For example, the `code_interpreter` tool requires a list of file IDs, while the `file_search` tool requires a list of vector store IDs.\n     *\n     */\n    tool_resources?: {\n        code_interpreter?: {\n            /**\n             * A list of [file](https://platform.openai.com/docs/api-reference/files) IDs made available to the `code_interpreter` tool. There can be a maximum of 20 files associated with the tool.\n             *\n             */\n            file_ids?: Array<string>;\n        };\n        file_search?: {\n            /**\n             * The ID of the [vector store](https://platform.openai.com/docs/api-reference/vector-stores/object) attached to this assistant. There can be a maximum of 1 vector store attached to the assistant.\n             *\n             */\n            vector_store_ids?: Array<string>;\n        };\n    };\n    metadata?: Metadata;\n    /**\n     * What sampling temperature to use, between 0 and 2. Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic.\n     *\n     */\n    temperature?: number;\n    /**\n     * An alternative to sampling with temperature, called nucleus sampling, where the model considers the results of the tokens with top_p probability mass. So 0.1 means only the tokens comprising the top 10% probability mass are considered.\n     *\n     * We generally recommend altering this or temperature but not both.\n     *\n     */\n    top_p?: number;\n    /**\n     * The maximum number of prompt tokens that may be used over the course of the run. The run will make a best effort to use only the number of prompt tokens specified, across multiple turns of the run. If the run exceeds the number of prompt tokens specified, the run will end with status `incomplete`. See `incomplete_details` for more info.\n     *\n     */\n    max_prompt_tokens?: number;\n    /**\n     * The maximum number of completion tokens that may be used over the course of the run. The run will make a best effort to use only the number of completion tokens specified, across multiple turns of the run. If the run exceeds the number of completion tokens specified, the run will end with status `incomplete`. See `incomplete_details` for more info.\n     *\n     */\n    max_completion_tokens?: number;\n    truncation_strategy?: TruncationObject & unknown;\n    tool_choice?: AssistantsApiToolChoiceOption & unknown;\n    parallel_tool_calls?: ParallelToolCalls;\n    response_format?: AssistantsApiResponseFormatOption;\n};\n\nexport type CreateRunRequestWithoutStream = {\n    /**\n     * The ID of the [assistant](https://platform.openai.com/docs/api-reference/assistants) to use to execute this run.\n     */\n    assistant_id: string;\n    /**\n     * The ID of the [Model](https://platform.openai.com/docs/api-reference/models) to be used to execute this run. If a value is provided here, it will override the model associated with the assistant. If not, the model associated with the assistant will be used.\n     */\n    model?: string | AssistantSupportedModels;\n    reasoning_effort?: ReasoningEffort;\n    /**\n     * Overrides the [instructions](https://platform.openai.com/docs/api-reference/assistants/createAssistant) of the assistant. This is useful for modifying the behavior on a per-run basis.\n     */\n    instructions?: string;\n    /**\n     * Appends additional instructions at the end of the instructions for the run. This is useful for modifying the behavior on a per-run basis without overriding other instructions.\n     */\n    additional_instructions?: string;\n    /**\n     * Adds additional messages to the thread before creating the run.\n     */\n    additional_messages?: Array<CreateMessageRequest>;\n    /**\n     * Override the tools the assistant can use for this run. This is useful for modifying the behavior on a per-run basis.\n     */\n    tools?: Array<AssistantTool>;\n    metadata?: Metadata;\n    /**\n     * What sampling temperature to use, between 0 and 2. Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic.\n     *\n     */\n    temperature?: number;\n    /**\n     * An alternative to sampling with temperature, called nucleus sampling, where the model considers the results of the tokens with top_p probability mass. So 0.1 means only the tokens comprising the top 10% probability mass are considered.\n     *\n     * We generally recommend altering this or temperature but not both.\n     *\n     */\n    top_p?: number;\n    /**\n     * The maximum number of prompt tokens that may be used over the course of the run. The run will make a best effort to use only the number of prompt tokens specified, across multiple turns of the run. If the run exceeds the number of prompt tokens specified, the run will end with status `incomplete`. See `incomplete_details` for more info.\n     *\n     */\n    max_prompt_tokens?: number;\n    /**\n     * The maximum number of completion tokens that may be used over the course of the run. The run will make a best effort to use only the number of completion tokens specified, across multiple turns of the run. If the run exceeds the number of completion tokens specified, the run will end with status `incomplete`. See `incomplete_details` for more info.\n     *\n     */\n    max_completion_tokens?: number;\n    truncation_strategy?: TruncationObject & unknown;\n    tool_choice?: AssistantsApiToolChoiceOption & unknown;\n    parallel_tool_calls?: ParallelToolCalls;\n    response_format?: AssistantsApiResponseFormatOption;\n};\n\nexport type SubmitToolOutputsRunRequestWithoutStream = {\n    /**\n     * A list of tools for which the outputs are being submitted.\n     */\n    tool_outputs: Array<{\n        /**\n         * The ID of the tool call in the `required_action` object within the run object the output is being submitted for.\n         */\n        tool_call_id?: string;\n        /**\n         * The output of the tool call to be submitted to continue the run.\n         */\n        output?: string;\n    }>;\n};\n\n/**\n * The status of the run, which can be either `queued`, `in_progress`, `requires_action`, `cancelling`, `cancelled`, `failed`, `completed`, `incomplete`, or `expired`.\n */\nexport const RunStatus = {\n    QUEUED: 'queued',\n    IN_PROGRESS: 'in_progress',\n    REQUIRES_ACTION: 'requires_action',\n    CANCELLING: 'cancelling',\n    CANCELLED: 'cancelled',\n    FAILED: 'failed',\n    COMPLETED: 'completed',\n    INCOMPLETE: 'incomplete',\n    EXPIRED: 'expired'\n} as const;\n\n/**\n * The status of the run, which can be either `queued`, `in_progress`, `requires_action`, `cancelling`, `cancelled`, `failed`, `completed`, `incomplete`, or `expired`.\n */\nexport type RunStatus = typeof RunStatus[keyof typeof RunStatus];\n\n/**\n * The delta containing the fields that have changed on the run step.\n */\nexport type RunStepDeltaObjectDelta = {\n    /**\n     * The details of the run step.\n     */\n    step_details?: ({\n        type?: 'RunStepDeltaStepDetailsMessageCreationObject';\n    } & RunStepDeltaStepDetailsMessageCreationObject) | ({\n        type?: 'RunStepDeltaStepDetailsToolCallsObject';\n    } & RunStepDeltaStepDetailsToolCallsObject);\n};\n\nexport type ListAssistantsData = {\n    body?: never;\n    path?: never;\n    query?: {\n        /**\n         * A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 20.\n         *\n         */\n        limit?: number;\n        /**\n         * Sort order by the `created_at` timestamp of the objects. `asc` for ascending order and `desc` for descending order.\n         *\n         */\n        order?: 'asc' | 'desc';\n        /**\n         * A cursor for use in pagination. `after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with obj_foo, your subsequent call can include after=obj_foo in order to fetch the next page of the list.\n         *\n         */\n        after?: string;\n        /**\n         * A cursor for use in pagination. `before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with obj_foo, your subsequent call can include before=obj_foo in order to fetch the previous page of the list.\n         *\n         */\n        before?: string;\n    };\n    url: '/assistants';\n};\n\nexport type ListAssistantsResponses = {\n    /**\n     * OK\n     */\n    200: ListAssistantsResponse;\n};\n\nexport type ListAssistantsResponse2 = ListAssistantsResponses[keyof ListAssistantsResponses];\n\nexport type CreateAssistantData = {\n    body: CreateAssistantRequest;\n    path?: never;\n    query?: never;\n    url: '/assistants';\n};\n\nexport type CreateAssistantResponses = {\n    /**\n     * OK\n     */\n    200: AssistantObject;\n};\n\nexport type CreateAssistantResponse = CreateAssistantResponses[keyof CreateAssistantResponses];\n\nexport type DeleteAssistantData = {\n    body?: never;\n    path: {\n        /**\n         * The ID of the assistant to delete.\n         */\n        assistant_id: string;\n    };\n    query?: never;\n    url: '/assistants/{assistant_id}';\n};\n\nexport type DeleteAssistantResponses = {\n    /**\n     * OK\n     */\n    200: DeleteAssistantResponse;\n};\n\nexport type DeleteAssistantResponse2 = DeleteAssistantResponses[keyof DeleteAssistantResponses];\n\nexport type GetAssistantData = {\n    body?: never;\n    path: {\n        /**\n         * The ID of the assistant to retrieve.\n         */\n        assistant_id: string;\n    };\n    query?: never;\n    url: '/assistants/{assistant_id}';\n};\n\nexport type GetAssistantResponses = {\n    /**\n     * OK\n     */\n    200: AssistantObject;\n};\n\nexport type GetAssistantResponse = GetAssistantResponses[keyof GetAssistantResponses];\n\nexport type ModifyAssistantData = {\n    body: ModifyAssistantRequest;\n    path: {\n        /**\n         * The ID of the assistant to modify.\n         */\n        assistant_id: string;\n    };\n    query?: never;\n    url: '/assistants/{assistant_id}';\n};\n\nexport type ModifyAssistantResponses = {\n    /**\n     * OK\n     */\n    200: AssistantObject;\n};\n\nexport type ModifyAssistantResponse = ModifyAssistantResponses[keyof ModifyAssistantResponses];\n\nexport type CreateSpeechData = {\n    body: CreateSpeechRequest;\n    path?: never;\n    query?: never;\n    url: '/audio/speech';\n};\n\nexport type CreateSpeechResponses = {\n    /**\n     * OK\n     */\n    200: Blob | File;\n};\n\nexport type CreateSpeechResponse = CreateSpeechResponses[keyof CreateSpeechResponses];\n\nexport type CreateTranscriptionData = {\n    body: CreateTranscriptionRequest;\n    path?: never;\n    query?: never;\n    url: '/audio/transcriptions';\n};\n\nexport type CreateTranscriptionResponses = {\n    /**\n     * OK\n     */\n    200: CreateTranscriptionResponseJson | CreateTranscriptionResponseVerboseJson;\n};\n\nexport type CreateTranscriptionResponse = CreateTranscriptionResponses[keyof CreateTranscriptionResponses];\n\nexport type CreateTranslationData = {\n    body: CreateTranslationRequest;\n    path?: never;\n    query?: never;\n    url: '/audio/translations';\n};\n\nexport type CreateTranslationResponses = {\n    /**\n     * OK\n     */\n    200: CreateTranslationResponseJson | CreateTranslationResponseVerboseJson;\n};\n\nexport type CreateTranslationResponse = CreateTranslationResponses[keyof CreateTranslationResponses];\n\nexport type ListBatchesData = {\n    body?: never;\n    path?: never;\n    query?: {\n        /**\n         * A cursor for use in pagination. `after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with obj_foo, your subsequent call can include after=obj_foo in order to fetch the next page of the list.\n         *\n         */\n        after?: string;\n        /**\n         * A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 20.\n         *\n         */\n        limit?: number;\n    };\n    url: '/batches';\n};\n\nexport type ListBatchesResponses = {\n    /**\n     * Batch listed successfully.\n     */\n    200: ListBatchesResponse;\n};\n\nexport type ListBatchesResponse2 = ListBatchesResponses[keyof ListBatchesResponses];\n\nexport type CreateBatchData = {\n    body: {\n        /**\n         * The ID of an uploaded file that contains requests for the new batch.\n         *\n         * See [upload file](https://platform.openai.com/docs/api-reference/files/create) for how to upload a file.\n         *\n         * Your input file must be formatted as a [JSONL file](https://platform.openai.com/docs/api-reference/batch/request-input), and must be uploaded with the purpose `batch`. The file can contain up to 50,000 requests, and can be up to 200 MB in size.\n         *\n         */\n        input_file_id: string;\n        /**\n         * The endpoint to be used for all requests in the batch. Currently `/v1/responses`, `/v1/chat/completions`, `/v1/embeddings`, and `/v1/completions` are supported. Note that `/v1/embeddings` batches are also restricted to a maximum of 50,000 embedding inputs across all requests in the batch.\n         */\n        endpoint: '/v1/responses' | '/v1/chat/completions' | '/v1/embeddings' | '/v1/completions';\n        /**\n         * The time frame within which the batch should be processed. Currently only `24h` is supported.\n         */\n        completion_window: '24h';\n        metadata?: Metadata;\n        output_expires_after?: BatchFileExpirationAfter;\n    };\n    path?: never;\n    query?: never;\n    url: '/batches';\n};\n\nexport type CreateBatchResponses = {\n    /**\n     * Batch created successfully.\n     */\n    200: Batch;\n};\n\nexport type CreateBatchResponse = CreateBatchResponses[keyof CreateBatchResponses];\n\nexport type RetrieveBatchData = {\n    body?: never;\n    path: {\n        /**\n         * The ID of the batch to retrieve.\n         */\n        batch_id: string;\n    };\n    query?: never;\n    url: '/batches/{batch_id}';\n};\n\nexport type RetrieveBatchResponses = {\n    /**\n     * Batch retrieved successfully.\n     */\n    200: Batch;\n};\n\nexport type RetrieveBatchResponse = RetrieveBatchResponses[keyof RetrieveBatchResponses];\n\nexport type CancelBatchData = {\n    body?: never;\n    path: {\n        /**\n         * The ID of the batch to cancel.\n         */\n        batch_id: string;\n    };\n    query?: never;\n    url: '/batches/{batch_id}/cancel';\n};\n\nexport type CancelBatchResponses = {\n    /**\n     * Batch is cancelling. Returns the cancelling batch's details.\n     */\n    200: Batch;\n};\n\nexport type CancelBatchResponse = CancelBatchResponses[keyof CancelBatchResponses];\n\nexport type ListChatCompletionsData = {\n    body?: never;\n    path?: never;\n    query?: {\n        /**\n         * The model used to generate the Chat Completions.\n         */\n        model?: string;\n        /**\n         * A list of metadata keys to filter the Chat Completions by. Example:\n         *\n         * `metadata[key1]=value1&metadata[key2]=value2`\n         *\n         */\n        metadata?: Metadata;\n        /**\n         * Identifier for the last chat completion from the previous pagination request.\n         */\n        after?: string;\n        /**\n         * Number of Chat Completions to retrieve.\n         */\n        limit?: number;\n        /**\n         * Sort order for Chat Completions by timestamp. Use `asc` for ascending order or `desc` for descending order. Defaults to `asc`.\n         */\n        order?: 'asc' | 'desc';\n    };\n    url: '/chat/completions';\n};\n\nexport type ListChatCompletionsResponses = {\n    /**\n     * A list of Chat Completions\n     */\n    200: ChatCompletionList;\n};\n\nexport type ListChatCompletionsResponse = ListChatCompletionsResponses[keyof ListChatCompletionsResponses];\n\nexport type CreateChatCompletionData = {\n    body: CreateChatCompletionRequest;\n    path?: never;\n    query?: never;\n    url: '/chat/completions';\n};\n\nexport type CreateChatCompletionResponses = {\n    /**\n     * OK\n     */\n    200: CreateChatCompletionResponse;\n};\n\nexport type CreateChatCompletionResponse2 = CreateChatCompletionResponses[keyof CreateChatCompletionResponses];\n\nexport type DeleteChatCompletionData = {\n    body?: never;\n    path: {\n        /**\n         * The ID of the chat completion to delete.\n         */\n        completion_id: string;\n    };\n    query?: never;\n    url: '/chat/completions/{completion_id}';\n};\n\nexport type DeleteChatCompletionResponses = {\n    /**\n     * The chat completion was deleted successfully.\n     */\n    200: ChatCompletionDeleted;\n};\n\nexport type DeleteChatCompletionResponse = DeleteChatCompletionResponses[keyof DeleteChatCompletionResponses];\n\nexport type GetChatCompletionData = {\n    body?: never;\n    path: {\n        /**\n         * The ID of the chat completion to retrieve.\n         */\n        completion_id: string;\n    };\n    query?: never;\n    url: '/chat/completions/{completion_id}';\n};\n\nexport type GetChatCompletionResponses = {\n    /**\n     * A chat completion\n     */\n    200: CreateChatCompletionResponse;\n};\n\nexport type GetChatCompletionResponse = GetChatCompletionResponses[keyof GetChatCompletionResponses];\n\nexport type UpdateChatCompletionData = {\n    body: {\n        metadata: Metadata;\n    };\n    path: {\n        /**\n         * The ID of the chat completion to update.\n         */\n        completion_id: string;\n    };\n    query?: never;\n    url: '/chat/completions/{completion_id}';\n};\n\nexport type UpdateChatCompletionResponses = {\n    /**\n     * A chat completion\n     */\n    200: CreateChatCompletionResponse;\n};\n\nexport type UpdateChatCompletionResponse = UpdateChatCompletionResponses[keyof UpdateChatCompletionResponses];\n\nexport type GetChatCompletionMessagesData = {\n    body?: never;\n    path: {\n        /**\n         * The ID of the chat completion to retrieve messages from.\n         */\n        completion_id: string;\n    };\n    query?: {\n        /**\n         * Identifier for the last message from the previous pagination request.\n         */\n        after?: string;\n        /**\n         * Number of messages to retrieve.\n         */\n        limit?: number;\n        /**\n         * Sort order for messages by timestamp. Use `asc` for ascending order or `desc` for descending order. Defaults to `asc`.\n         */\n        order?: 'asc' | 'desc';\n    };\n    url: '/chat/completions/{completion_id}/messages';\n};\n\nexport type GetChatCompletionMessagesResponses = {\n    /**\n     * A list of messages\n     */\n    200: ChatCompletionMessageList;\n};\n\nexport type GetChatCompletionMessagesResponse = GetChatCompletionMessagesResponses[keyof GetChatCompletionMessagesResponses];\n\nexport type CreateCompletionData = {\n    body: CreateCompletionRequest;\n    path?: never;\n    query?: never;\n    url: '/completions';\n};\n\nexport type CreateCompletionResponses = {\n    /**\n     * OK\n     */\n    200: CreateCompletionResponse;\n};\n\nexport type CreateCompletionResponse2 = CreateCompletionResponses[keyof CreateCompletionResponses];\n\nexport type ListContainersData = {\n    body?: never;\n    path?: never;\n    query?: {\n        /**\n         * A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 20.\n         *\n         */\n        limit?: number;\n        /**\n         * Sort order by the `created_at` timestamp of the objects. `asc` for ascending order and `desc` for descending order.\n         *\n         */\n        order?: 'asc' | 'desc';\n        /**\n         * A cursor for use in pagination. `after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with obj_foo, your subsequent call can include after=obj_foo in order to fetch the next page of the list.\n         *\n         */\n        after?: string;\n    };\n    url: '/containers';\n};\n\nexport type ListContainersResponses = {\n    /**\n     * Success\n     */\n    200: ContainerListResource;\n};\n\nexport type ListContainersResponse = ListContainersResponses[keyof ListContainersResponses];\n\nexport type CreateContainerData = {\n    body?: CreateContainerBody;\n    path?: never;\n    query?: never;\n    url: '/containers';\n};\n\nexport type CreateContainerResponses = {\n    /**\n     * Success\n     */\n    200: ContainerResource;\n};\n\nexport type CreateContainerResponse = CreateContainerResponses[keyof CreateContainerResponses];\n\nexport type DeleteContainerData = {\n    body?: never;\n    path: {\n        /**\n         * The ID of the container to delete.\n         */\n        container_id: string;\n    };\n    query?: never;\n    url: '/containers/{container_id}';\n};\n\nexport type DeleteContainerResponses = {\n    /**\n     * OK\n     */\n    200: unknown;\n};\n\nexport type RetrieveContainerData = {\n    body?: never;\n    path: {\n        container_id: string;\n    };\n    query?: never;\n    url: '/containers/{container_id}';\n};\n\nexport type RetrieveContainerResponses = {\n    /**\n     * Success\n     */\n    200: ContainerResource;\n};\n\nexport type RetrieveContainerResponse = RetrieveContainerResponses[keyof RetrieveContainerResponses];\n\nexport type ListContainerFilesData = {\n    body?: never;\n    path: {\n        container_id: string;\n    };\n    query?: {\n        /**\n         * A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 20.\n         *\n         */\n        limit?: number;\n        /**\n         * Sort order by the `created_at` timestamp of the objects. `asc` for ascending order and `desc` for descending order.\n         *\n         */\n        order?: 'asc' | 'desc';\n        /**\n         * A cursor for use in pagination. `after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with obj_foo, your subsequent call can include after=obj_foo in order to fetch the next page of the list.\n         *\n         */\n        after?: string;\n    };\n    url: '/containers/{container_id}/files';\n};\n\nexport type ListContainerFilesResponses = {\n    /**\n     * Success\n     */\n    200: ContainerFileListResource;\n};\n\nexport type ListContainerFilesResponse = ListContainerFilesResponses[keyof ListContainerFilesResponses];\n\nexport type CreateContainerFileData = {\n    body: CreateContainerFileBody;\n    path: {\n        container_id: string;\n    };\n    query?: never;\n    url: '/containers/{container_id}/files';\n};\n\nexport type CreateContainerFileResponses = {\n    /**\n     * Success\n     */\n    200: ContainerFileResource;\n};\n\nexport type CreateContainerFileResponse = CreateContainerFileResponses[keyof CreateContainerFileResponses];\n\nexport type DeleteContainerFileData = {\n    body?: never;\n    path: {\n        container_id: string;\n        file_id: string;\n    };\n    query?: never;\n    url: '/containers/{container_id}/files/{file_id}';\n};\n\nexport type DeleteContainerFileResponses = {\n    /**\n     * OK\n     */\n    200: unknown;\n};\n\nexport type RetrieveContainerFileData = {\n    body?: never;\n    path: {\n        container_id: string;\n        file_id: string;\n    };\n    query?: never;\n    url: '/containers/{container_id}/files/{file_id}';\n};\n\nexport type RetrieveContainerFileResponses = {\n    /**\n     * Success\n     */\n    200: ContainerFileResource;\n};\n\nexport type RetrieveContainerFileResponse = RetrieveContainerFileResponses[keyof RetrieveContainerFileResponses];\n\nexport type RetrieveContainerFileContentData = {\n    body?: never;\n    path: {\n        container_id: string;\n        file_id: string;\n    };\n    query?: never;\n    url: '/containers/{container_id}/files/{file_id}/content';\n};\n\nexport type RetrieveContainerFileContentResponses = {\n    /**\n     * Success\n     */\n    200: unknown;\n};\n\nexport type CreateEmbeddingData = {\n    body: CreateEmbeddingRequest;\n    path?: never;\n    query?: never;\n    url: '/embeddings';\n};\n\nexport type CreateEmbeddingResponses = {\n    /**\n     * OK\n     */\n    200: CreateEmbeddingResponse;\n};\n\nexport type CreateEmbeddingResponse2 = CreateEmbeddingResponses[keyof CreateEmbeddingResponses];\n\nexport type ListEvalsData = {\n    body?: never;\n    path?: never;\n    query?: {\n        /**\n         * Identifier for the last eval from the previous pagination request.\n         */\n        after?: string;\n        /**\n         * Number of evals to retrieve.\n         */\n        limit?: number;\n        /**\n         * Sort order for evals by timestamp. Use `asc` for ascending order or `desc` for descending order.\n         */\n        order?: 'asc' | 'desc';\n        /**\n         * Evals can be ordered by creation time or last updated time. Use\n         * `created_at` for creation time or `updated_at` for last updated time.\n         *\n         */\n        order_by?: 'created_at' | 'updated_at';\n    };\n    url: '/evals';\n};\n\nexport type ListEvalsResponses = {\n    /**\n     * A list of evals\n     */\n    200: EvalList;\n};\n\nexport type ListEvalsResponse = ListEvalsResponses[keyof ListEvalsResponses];\n\nexport type CreateEvalData = {\n    body: CreateEvalRequest;\n    path?: never;\n    query?: never;\n    url: '/evals';\n};\n\nexport type CreateEvalResponses = {\n    /**\n     * OK\n     */\n    201: Eval;\n};\n\nexport type CreateEvalResponse = CreateEvalResponses[keyof CreateEvalResponses];\n\nexport type DeleteEvalData = {\n    body?: never;\n    path: {\n        /**\n         * The ID of the evaluation to delete.\n         */\n        eval_id: string;\n    };\n    query?: never;\n    url: '/evals/{eval_id}';\n};\n\nexport type DeleteEvalErrors = {\n    /**\n     * Evaluation not found.\n     */\n    404: Error;\n};\n\nexport type DeleteEvalError = DeleteEvalErrors[keyof DeleteEvalErrors];\n\nexport type DeleteEvalResponses = {\n    /**\n     * Successfully deleted the evaluation.\n     */\n    200: {\n        object: string;\n        deleted: boolean;\n        eval_id: string;\n    };\n};\n\nexport type DeleteEvalResponse = DeleteEvalResponses[keyof DeleteEvalResponses];\n\nexport type GetEvalData = {\n    body?: never;\n    path: {\n        /**\n         * The ID of the evaluation to retrieve.\n         */\n        eval_id: string;\n    };\n    query?: never;\n    url: '/evals/{eval_id}';\n};\n\nexport type GetEvalResponses = {\n    /**\n     * The evaluation\n     */\n    200: Eval;\n};\n\nexport type GetEvalResponse = GetEvalResponses[keyof GetEvalResponses];\n\nexport type UpdateEvalData = {\n    /**\n     * Request to update an evaluation\n     */\n    body: {\n        /**\n         * Rename the evaluation.\n         */\n        name?: string;\n        metadata?: Metadata;\n    };\n    path: {\n        /**\n         * The ID of the evaluation to update.\n         */\n        eval_id: string;\n    };\n    query?: never;\n    url: '/evals/{eval_id}';\n};\n\nexport type UpdateEvalResponses = {\n    /**\n     * The updated evaluation\n     */\n    200: Eval;\n};\n\nexport type UpdateEvalResponse = UpdateEvalResponses[keyof UpdateEvalResponses];\n\nexport type GetEvalRunsData = {\n    body?: never;\n    path: {\n        /**\n         * The ID of the evaluation to retrieve runs for.\n         */\n        eval_id: string;\n    };\n    query?: {\n        /**\n         * Identifier for the last run from the previous pagination request.\n         */\n        after?: string;\n        /**\n         * Number of runs to retrieve.\n         */\n        limit?: number;\n        /**\n         * Sort order for runs by timestamp. Use `asc` for ascending order or `desc` for descending order. Defaults to `asc`.\n         */\n        order?: 'asc' | 'desc';\n        /**\n         * Filter runs by status. One of `queued` | `in_progress` | `failed` | `completed` | `canceled`.\n         */\n        status?: 'queued' | 'in_progress' | 'completed' | 'canceled' | 'failed';\n    };\n    url: '/evals/{eval_id}/runs';\n};\n\nexport type GetEvalRunsResponses = {\n    /**\n     * A list of runs for the evaluation\n     */\n    200: EvalRunList;\n};\n\nexport type GetEvalRunsResponse = GetEvalRunsResponses[keyof GetEvalRunsResponses];\n\nexport type CreateEvalRunData = {\n    body: CreateEvalRunRequest;\n    path: {\n        /**\n         * The ID of the evaluation to create a run for.\n         */\n        eval_id: string;\n    };\n    query?: never;\n    url: '/evals/{eval_id}/runs';\n};\n\nexport type CreateEvalRunErrors = {\n    /**\n     * Bad request (for example, missing eval object)\n     */\n    400: Error;\n};\n\nexport type CreateEvalRunError = CreateEvalRunErrors[keyof CreateEvalRunErrors];\n\nexport type CreateEvalRunResponses = {\n    /**\n     * Successfully created a run for the evaluation\n     */\n    201: EvalRun;\n};\n\nexport type CreateEvalRunResponse = CreateEvalRunResponses[keyof CreateEvalRunResponses];\n\nexport type DeleteEvalRunData = {\n    body?: never;\n    path: {\n        /**\n         * The ID of the evaluation to delete the run from.\n         */\n        eval_id: string;\n        /**\n         * The ID of the run to delete.\n         */\n        run_id: string;\n    };\n    query?: never;\n    url: '/evals/{eval_id}/runs/{run_id}';\n};\n\nexport type DeleteEvalRunErrors = {\n    /**\n     * Run not found\n     */\n    404: Error;\n};\n\nexport type DeleteEvalRunError = DeleteEvalRunErrors[keyof DeleteEvalRunErrors];\n\nexport type DeleteEvalRunResponses = {\n    /**\n     * Successfully deleted the eval run\n     */\n    200: {\n        object?: string;\n        deleted?: boolean;\n        run_id?: string;\n    };\n};\n\nexport type DeleteEvalRunResponse = DeleteEvalRunResponses[keyof DeleteEvalRunResponses];\n\nexport type GetEvalRunData = {\n    body?: never;\n    path: {\n        /**\n         * The ID of the evaluation to retrieve runs for.\n         */\n        eval_id: string;\n        /**\n         * The ID of the run to retrieve.\n         */\n        run_id: string;\n    };\n    query?: never;\n    url: '/evals/{eval_id}/runs/{run_id}';\n};\n\nexport type GetEvalRunResponses = {\n    /**\n     * The evaluation run\n     */\n    200: EvalRun;\n};\n\nexport type GetEvalRunResponse = GetEvalRunResponses[keyof GetEvalRunResponses];\n\nexport type CancelEvalRunData = {\n    body?: never;\n    path: {\n        /**\n         * The ID of the evaluation whose run you want to cancel.\n         */\n        eval_id: string;\n        /**\n         * The ID of the run to cancel.\n         */\n        run_id: string;\n    };\n    query?: never;\n    url: '/evals/{eval_id}/runs/{run_id}';\n};\n\nexport type CancelEvalRunResponses = {\n    /**\n     * The canceled eval run object\n     */\n    200: EvalRun;\n};\n\nexport type CancelEvalRunResponse = CancelEvalRunResponses[keyof CancelEvalRunResponses];\n\nexport type GetEvalRunOutputItemsData = {\n    body?: never;\n    path: {\n        /**\n         * The ID of the evaluation to retrieve runs for.\n         */\n        eval_id: string;\n        /**\n         * The ID of the run to retrieve output items for.\n         */\n        run_id: string;\n    };\n    query?: {\n        /**\n         * Identifier for the last output item from the previous pagination request.\n         */\n        after?: string;\n        /**\n         * Number of output items to retrieve.\n         */\n        limit?: number;\n        /**\n         * Filter output items by status. Use `failed` to filter by failed output\n         * items or `pass` to filter by passed output items.\n         *\n         */\n        status?: 'fail' | 'pass';\n        /**\n         * Sort order for output items by timestamp. Use `asc` for ascending order or `desc` for descending order. Defaults to `asc`.\n         */\n        order?: 'asc' | 'desc';\n    };\n    url: '/evals/{eval_id}/runs/{run_id}/output_items';\n};\n\nexport type GetEvalRunOutputItemsResponses = {\n    /**\n     * A list of output items for the evaluation run\n     */\n    200: EvalRunOutputItemList;\n};\n\nexport type GetEvalRunOutputItemsResponse = GetEvalRunOutputItemsResponses[keyof GetEvalRunOutputItemsResponses];\n\nexport type GetEvalRunOutputItemData = {\n    body?: never;\n    path: {\n        /**\n         * The ID of the evaluation to retrieve runs for.\n         */\n        eval_id: string;\n        /**\n         * The ID of the run to retrieve.\n         */\n        run_id: string;\n        /**\n         * The ID of the output item to retrieve.\n         */\n        output_item_id: string;\n    };\n    query?: never;\n    url: '/evals/{eval_id}/runs/{run_id}/output_items/{output_item_id}';\n};\n\nexport type GetEvalRunOutputItemResponses = {\n    /**\n     * The evaluation run output item\n     */\n    200: EvalRunOutputItem;\n};\n\nexport type GetEvalRunOutputItemResponse = GetEvalRunOutputItemResponses[keyof GetEvalRunOutputItemResponses];\n\nexport type ListFilesData = {\n    body?: never;\n    path?: never;\n    query?: {\n        /**\n         * Only return files with the given purpose.\n         */\n        purpose?: string;\n        /**\n         * A limit on the number of objects to be returned. Limit can range between 1 and 10,000, and the default is 10,000.\n         *\n         */\n        limit?: number;\n        /**\n         * Sort order by the `created_at` timestamp of the objects. `asc` for ascending order and `desc` for descending order.\n         *\n         */\n        order?: 'asc' | 'desc';\n        /**\n         * A cursor for use in pagination. `after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with obj_foo, your subsequent call can include after=obj_foo in order to fetch the next page of the list.\n         *\n         */\n        after?: string;\n    };\n    url: '/files';\n};\n\nexport type ListFilesResponses = {\n    /**\n     * OK\n     */\n    200: ListFilesResponse;\n};\n\nexport type ListFilesResponse2 = ListFilesResponses[keyof ListFilesResponses];\n\nexport type CreateFileData = {\n    body: CreateFileRequest;\n    path?: never;\n    query?: never;\n    url: '/files';\n};\n\nexport type CreateFileResponses = {\n    /**\n     * OK\n     */\n    200: OpenAiFile;\n};\n\nexport type CreateFileResponse = CreateFileResponses[keyof CreateFileResponses];\n\nexport type DeleteFileData = {\n    body?: never;\n    path: {\n        /**\n         * The ID of the file to use for this request.\n         */\n        file_id: string;\n    };\n    query?: never;\n    url: '/files/{file_id}';\n};\n\nexport type DeleteFileResponses = {\n    /**\n     * OK\n     */\n    200: DeleteFileResponse;\n};\n\nexport type DeleteFileResponse2 = DeleteFileResponses[keyof DeleteFileResponses];\n\nexport type RetrieveFileData = {\n    body?: never;\n    path: {\n        /**\n         * The ID of the file to use for this request.\n         */\n        file_id: string;\n    };\n    query?: never;\n    url: '/files/{file_id}';\n};\n\nexport type RetrieveFileResponses = {\n    /**\n     * OK\n     */\n    200: OpenAiFile;\n};\n\nexport type RetrieveFileResponse = RetrieveFileResponses[keyof RetrieveFileResponses];\n\nexport type DownloadFileData = {\n    body?: never;\n    path: {\n        /**\n         * The ID of the file to use for this request.\n         */\n        file_id: string;\n    };\n    query?: never;\n    url: '/files/{file_id}/content';\n};\n\nexport type DownloadFileResponses = {\n    /**\n     * OK\n     */\n    200: string;\n};\n\nexport type DownloadFileResponse = DownloadFileResponses[keyof DownloadFileResponses];\n\nexport type RunGraderData = {\n    body: RunGraderRequest;\n    path?: never;\n    query?: never;\n    url: '/fine_tuning/alpha/graders/run';\n};\n\nexport type RunGraderResponses = {\n    /**\n     * OK\n     */\n    200: RunGraderResponse;\n};\n\nexport type RunGraderResponse2 = RunGraderResponses[keyof RunGraderResponses];\n\nexport type ValidateGraderData = {\n    body: ValidateGraderRequest;\n    path?: never;\n    query?: never;\n    url: '/fine_tuning/alpha/graders/validate';\n};\n\nexport type ValidateGraderResponses = {\n    /**\n     * OK\n     */\n    200: ValidateGraderResponse;\n};\n\nexport type ValidateGraderResponse2 = ValidateGraderResponses[keyof ValidateGraderResponses];\n\nexport type ListFineTuningCheckpointPermissionsData = {\n    body?: never;\n    path: {\n        /**\n         * The ID of the fine-tuned model checkpoint to get permissions for.\n         *\n         */\n        fine_tuned_model_checkpoint: string;\n    };\n    query?: {\n        /**\n         * The ID of the project to get permissions for.\n         */\n        project_id?: string;\n        /**\n         * Identifier for the last permission ID from the previous pagination request.\n         */\n        after?: string;\n        /**\n         * Number of permissions to retrieve.\n         */\n        limit?: number;\n        /**\n         * The order in which to retrieve permissions.\n         */\n        order?: 'ascending' | 'descending';\n    };\n    url: '/fine_tuning/checkpoints/{fine_tuned_model_checkpoint}/permissions';\n};\n\nexport type ListFineTuningCheckpointPermissionsResponses = {\n    /**\n     * OK\n     */\n    200: ListFineTuningCheckpointPermissionResponse;\n};\n\nexport type ListFineTuningCheckpointPermissionsResponse = ListFineTuningCheckpointPermissionsResponses[keyof ListFineTuningCheckpointPermissionsResponses];\n\nexport type CreateFineTuningCheckpointPermissionData = {\n    body: CreateFineTuningCheckpointPermissionRequest;\n    path: {\n        /**\n         * The ID of the fine-tuned model checkpoint to create a permission for.\n         *\n         */\n        fine_tuned_model_checkpoint: string;\n    };\n    query?: never;\n    url: '/fine_tuning/checkpoints/{fine_tuned_model_checkpoint}/permissions';\n};\n\nexport type CreateFineTuningCheckpointPermissionResponses = {\n    /**\n     * OK\n     */\n    200: ListFineTuningCheckpointPermissionResponse;\n};\n\nexport type CreateFineTuningCheckpointPermissionResponse = CreateFineTuningCheckpointPermissionResponses[keyof CreateFineTuningCheckpointPermissionResponses];\n\nexport type DeleteFineTuningCheckpointPermissionData = {\n    body?: never;\n    path: {\n        /**\n         * The ID of the fine-tuned model checkpoint to delete a permission for.\n         *\n         */\n        fine_tuned_model_checkpoint: string;\n        /**\n         * The ID of the fine-tuned model checkpoint permission to delete.\n         *\n         */\n        permission_id: string;\n    };\n    query?: never;\n    url: '/fine_tuning/checkpoints/{fine_tuned_model_checkpoint}/permissions/{permission_id}';\n};\n\nexport type DeleteFineTuningCheckpointPermissionResponses = {\n    /**\n     * OK\n     */\n    200: DeleteFineTuningCheckpointPermissionResponse;\n};\n\nexport type DeleteFineTuningCheckpointPermissionResponse2 = DeleteFineTuningCheckpointPermissionResponses[keyof DeleteFineTuningCheckpointPermissionResponses];\n\nexport type ListPaginatedFineTuningJobsData = {\n    body?: never;\n    path?: never;\n    query?: {\n        /**\n         * Identifier for the last job from the previous pagination request.\n         */\n        after?: string;\n        /**\n         * Number of fine-tuning jobs to retrieve.\n         */\n        limit?: number;\n        /**\n         * Optional metadata filter. To filter, use the syntax `metadata[k]=v`. Alternatively, set `metadata=null` to indicate no metadata.\n         *\n         */\n        metadata?: {\n            [key: string]: string;\n        };\n    };\n    url: '/fine_tuning/jobs';\n};\n\nexport type ListPaginatedFineTuningJobsResponses = {\n    /**\n     * OK\n     */\n    200: ListPaginatedFineTuningJobsResponse;\n};\n\nexport type ListPaginatedFineTuningJobsResponse2 = ListPaginatedFineTuningJobsResponses[keyof ListPaginatedFineTuningJobsResponses];\n\nexport type CreateFineTuningJobData = {\n    body: CreateFineTuningJobRequest;\n    path?: never;\n    query?: never;\n    url: '/fine_tuning/jobs';\n};\n\nexport type CreateFineTuningJobResponses = {\n    /**\n     * OK\n     */\n    200: FineTuningJob;\n};\n\nexport type CreateFineTuningJobResponse = CreateFineTuningJobResponses[keyof CreateFineTuningJobResponses];\n\nexport type RetrieveFineTuningJobData = {\n    body?: never;\n    path: {\n        /**\n         * The ID of the fine-tuning job.\n         *\n         */\n        fine_tuning_job_id: string;\n    };\n    query?: never;\n    url: '/fine_tuning/jobs/{fine_tuning_job_id}';\n};\n\nexport type RetrieveFineTuningJobResponses = {\n    /**\n     * OK\n     */\n    200: FineTuningJob;\n};\n\nexport type RetrieveFineTuningJobResponse = RetrieveFineTuningJobResponses[keyof RetrieveFineTuningJobResponses];\n\nexport type CancelFineTuningJobData = {\n    body?: never;\n    path: {\n        /**\n         * The ID of the fine-tuning job to cancel.\n         *\n         */\n        fine_tuning_job_id: string;\n    };\n    query?: never;\n    url: '/fine_tuning/jobs/{fine_tuning_job_id}/cancel';\n};\n\nexport type CancelFineTuningJobResponses = {\n    /**\n     * OK\n     */\n    200: FineTuningJob;\n};\n\nexport type CancelFineTuningJobResponse = CancelFineTuningJobResponses[keyof CancelFineTuningJobResponses];\n\nexport type ListFineTuningJobCheckpointsData = {\n    body?: never;\n    path: {\n        /**\n         * The ID of the fine-tuning job to get checkpoints for.\n         *\n         */\n        fine_tuning_job_id: string;\n    };\n    query?: {\n        /**\n         * Identifier for the last checkpoint ID from the previous pagination request.\n         */\n        after?: string;\n        /**\n         * Number of checkpoints to retrieve.\n         */\n        limit?: number;\n    };\n    url: '/fine_tuning/jobs/{fine_tuning_job_id}/checkpoints';\n};\n\nexport type ListFineTuningJobCheckpointsResponses = {\n    /**\n     * OK\n     */\n    200: ListFineTuningJobCheckpointsResponse;\n};\n\nexport type ListFineTuningJobCheckpointsResponse2 = ListFineTuningJobCheckpointsResponses[keyof ListFineTuningJobCheckpointsResponses];\n\nexport type ListFineTuningEventsData = {\n    body?: never;\n    path: {\n        /**\n         * The ID of the fine-tuning job to get events for.\n         *\n         */\n        fine_tuning_job_id: string;\n    };\n    query?: {\n        /**\n         * Identifier for the last event from the previous pagination request.\n         */\n        after?: string;\n        /**\n         * Number of events to retrieve.\n         */\n        limit?: number;\n    };\n    url: '/fine_tuning/jobs/{fine_tuning_job_id}/events';\n};\n\nexport type ListFineTuningEventsResponses = {\n    /**\n     * OK\n     */\n    200: ListFineTuningJobEventsResponse;\n};\n\nexport type ListFineTuningEventsResponse = ListFineTuningEventsResponses[keyof ListFineTuningEventsResponses];\n\nexport type PauseFineTuningJobData = {\n    body?: never;\n    path: {\n        /**\n         * The ID of the fine-tuning job to pause.\n         *\n         */\n        fine_tuning_job_id: string;\n    };\n    query?: never;\n    url: '/fine_tuning/jobs/{fine_tuning_job_id}/pause';\n};\n\nexport type PauseFineTuningJobResponses = {\n    /**\n     * OK\n     */\n    200: FineTuningJob;\n};\n\nexport type PauseFineTuningJobResponse = PauseFineTuningJobResponses[keyof PauseFineTuningJobResponses];\n\nexport type ResumeFineTuningJobData = {\n    body?: never;\n    path: {\n        /**\n         * The ID of the fine-tuning job to resume.\n         *\n         */\n        fine_tuning_job_id: string;\n    };\n    query?: never;\n    url: '/fine_tuning/jobs/{fine_tuning_job_id}/resume';\n};\n\nexport type ResumeFineTuningJobResponses = {\n    /**\n     * OK\n     */\n    200: FineTuningJob;\n};\n\nexport type ResumeFineTuningJobResponse = ResumeFineTuningJobResponses[keyof ResumeFineTuningJobResponses];\n\nexport type CreateImageEditData = {\n    body: CreateImageEditRequest;\n    path?: never;\n    query?: never;\n    url: '/images/edits';\n};\n\nexport type CreateImageEditResponses = {\n    /**\n     * OK\n     */\n    200: ImagesResponse;\n};\n\nexport type CreateImageEditResponse = CreateImageEditResponses[keyof CreateImageEditResponses];\n\nexport type CreateImageData = {\n    body: CreateImageRequest;\n    path?: never;\n    query?: never;\n    url: '/images/generations';\n};\n\nexport type CreateImageResponses = {\n    /**\n     * OK\n     */\n    200: ImagesResponse;\n};\n\nexport type CreateImageResponse = CreateImageResponses[keyof CreateImageResponses];\n\nexport type CreateImageVariationData = {\n    body: CreateImageVariationRequest;\n    path?: never;\n    query?: never;\n    url: '/images/variations';\n};\n\nexport type CreateImageVariationResponses = {\n    /**\n     * OK\n     */\n    200: ImagesResponse;\n};\n\nexport type CreateImageVariationResponse = CreateImageVariationResponses[keyof CreateImageVariationResponses];\n\nexport type ListModelsData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/models';\n};\n\nexport type ListModelsResponses = {\n    /**\n     * OK\n     */\n    200: ListModelsResponse;\n};\n\nexport type ListModelsResponse2 = ListModelsResponses[keyof ListModelsResponses];\n\nexport type DeleteModelData = {\n    body?: never;\n    path: {\n        /**\n         * The model to delete\n         */\n        model: string;\n    };\n    query?: never;\n    url: '/models/{model}';\n};\n\nexport type DeleteModelResponses = {\n    /**\n     * OK\n     */\n    200: DeleteModelResponse;\n};\n\nexport type DeleteModelResponse2 = DeleteModelResponses[keyof DeleteModelResponses];\n\nexport type RetrieveModelData = {\n    body?: never;\n    path: {\n        /**\n         * The ID of the model to use for this request\n         */\n        model: string;\n    };\n    query?: never;\n    url: '/models/{model}';\n};\n\nexport type RetrieveModelResponses = {\n    /**\n     * OK\n     */\n    200: Model;\n};\n\nexport type RetrieveModelResponse = RetrieveModelResponses[keyof RetrieveModelResponses];\n\nexport type CreateModerationData = {\n    body: CreateModerationRequest;\n    path?: never;\n    query?: never;\n    url: '/moderations';\n};\n\nexport type CreateModerationResponses = {\n    /**\n     * OK\n     */\n    200: CreateModerationResponse;\n};\n\nexport type CreateModerationResponse2 = CreateModerationResponses[keyof CreateModerationResponses];\n\nexport type AdminApiKeysListData = {\n    body?: never;\n    path?: never;\n    query?: {\n        /**\n         * Return keys with IDs that come after this ID in the pagination order.\n         */\n        after?: string;\n        /**\n         * Order results by creation time, ascending or descending.\n         */\n        order?: 'asc' | 'desc';\n        /**\n         * Maximum number of keys to return.\n         */\n        limit?: number;\n    };\n    url: '/organization/admin_api_keys';\n};\n\nexport type AdminApiKeysListResponses = {\n    /**\n     * A list of organization API keys.\n     */\n    200: ApiKeyList;\n};\n\nexport type AdminApiKeysListResponse = AdminApiKeysListResponses[keyof AdminApiKeysListResponses];\n\nexport type AdminApiKeysCreateData = {\n    body: {\n        name: string;\n    };\n    path?: never;\n    query?: never;\n    url: '/organization/admin_api_keys';\n};\n\nexport type AdminApiKeysCreateResponses = {\n    /**\n     * The newly created admin API key.\n     */\n    200: AdminApiKey;\n};\n\nexport type AdminApiKeysCreateResponse = AdminApiKeysCreateResponses[keyof AdminApiKeysCreateResponses];\n\nexport type AdminApiKeysDeleteData = {\n    body?: never;\n    path: {\n        /**\n         * The ID of the API key to be deleted.\n         */\n        key_id: string;\n    };\n    query?: never;\n    url: '/organization/admin_api_keys/{key_id}';\n};\n\nexport type AdminApiKeysDeleteResponses = {\n    /**\n     * Confirmation that the API key was deleted.\n     */\n    200: {\n        id?: string;\n        object?: string;\n        deleted?: boolean;\n    };\n};\n\nexport type AdminApiKeysDeleteResponse = AdminApiKeysDeleteResponses[keyof AdminApiKeysDeleteResponses];\n\nexport type AdminApiKeysGetData = {\n    body?: never;\n    path: {\n        /**\n         * The ID of the API key.\n         */\n        key_id: string;\n    };\n    query?: never;\n    url: '/organization/admin_api_keys/{key_id}';\n};\n\nexport type AdminApiKeysGetResponses = {\n    /**\n     * Details of the requested API key.\n     */\n    200: AdminApiKey;\n};\n\nexport type AdminApiKeysGetResponse = AdminApiKeysGetResponses[keyof AdminApiKeysGetResponses];\n\nexport type ListAuditLogsData = {\n    body?: never;\n    path?: never;\n    query?: {\n        /**\n         * Return only events whose `effective_at` (Unix seconds) is in this range.\n         */\n        effective_at?: {\n            /**\n             * Return only events whose `effective_at` (Unix seconds) is greater than this value.\n             */\n            gt?: number;\n            /**\n             * Return only events whose `effective_at` (Unix seconds) is greater than or equal to this value.\n             */\n            gte?: number;\n            /**\n             * Return only events whose `effective_at` (Unix seconds) is less than this value.\n             */\n            lt?: number;\n            /**\n             * Return only events whose `effective_at` (Unix seconds) is less than or equal to this value.\n             */\n            lte?: number;\n        };\n        /**\n         * Return only events for these projects.\n         */\n        'project_ids[]'?: Array<string>;\n        /**\n         * Return only events with a `type` in one of these values. For example, `project.created`. For all options, see the documentation for the [audit log object](https://platform.openai.com/docs/api-reference/audit-logs/object).\n         */\n        'event_types[]'?: Array<AuditLogEventType>;\n        /**\n         * Return only events performed by these actors. Can be a user ID, a service account ID, or an api key tracking ID.\n         */\n        'actor_ids[]'?: Array<string>;\n        /**\n         * Return only events performed by users with these emails.\n         */\n        'actor_emails[]'?: Array<string>;\n        /**\n         * Return only events performed on these targets. For example, a project ID updated.\n         */\n        'resource_ids[]'?: Array<string>;\n        /**\n         * A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 20.\n         *\n         */\n        limit?: number;\n        /**\n         * A cursor for use in pagination. `after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with obj_foo, your subsequent call can include after=obj_foo in order to fetch the next page of the list.\n         *\n         */\n        after?: string;\n        /**\n         * A cursor for use in pagination. `before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with obj_foo, your subsequent call can include before=obj_foo in order to fetch the previous page of the list.\n         *\n         */\n        before?: string;\n    };\n    url: '/organization/audit_logs';\n};\n\nexport type ListAuditLogsResponses = {\n    /**\n     * Audit logs listed successfully.\n     */\n    200: ListAuditLogsResponse;\n};\n\nexport type ListAuditLogsResponse2 = ListAuditLogsResponses[keyof ListAuditLogsResponses];\n\nexport type ListOrganizationCertificatesData = {\n    body?: never;\n    path?: never;\n    query?: {\n        /**\n         * A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 20.\n         *\n         */\n        limit?: number;\n        /**\n         * A cursor for use in pagination. `after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with obj_foo, your subsequent call can include after=obj_foo in order to fetch the next page of the list.\n         *\n         */\n        after?: string;\n        /**\n         * Sort order by the `created_at` timestamp of the objects. `asc` for ascending order and `desc` for descending order.\n         *\n         */\n        order?: 'asc' | 'desc';\n    };\n    url: '/organization/certificates';\n};\n\nexport type ListOrganizationCertificatesResponses = {\n    /**\n     * Certificates listed successfully.\n     */\n    200: ListCertificatesResponse;\n};\n\nexport type ListOrganizationCertificatesResponse = ListOrganizationCertificatesResponses[keyof ListOrganizationCertificatesResponses];\n\nexport type UploadCertificateData = {\n    /**\n     * The certificate upload payload.\n     */\n    body: UploadCertificateRequest;\n    path?: never;\n    query?: never;\n    url: '/organization/certificates';\n};\n\nexport type UploadCertificateResponses = {\n    /**\n     * Certificate uploaded successfully.\n     */\n    200: Certificate;\n};\n\nexport type UploadCertificateResponse = UploadCertificateResponses[keyof UploadCertificateResponses];\n\nexport type ActivateOrganizationCertificatesData = {\n    /**\n     * The certificate activation payload.\n     */\n    body: ToggleCertificatesRequest;\n    path?: never;\n    query?: never;\n    url: '/organization/certificates/activate';\n};\n\nexport type ActivateOrganizationCertificatesResponses = {\n    /**\n     * Certificates activated successfully.\n     */\n    200: ListCertificatesResponse;\n};\n\nexport type ActivateOrganizationCertificatesResponse = ActivateOrganizationCertificatesResponses[keyof ActivateOrganizationCertificatesResponses];\n\nexport type DeactivateOrganizationCertificatesData = {\n    /**\n     * The certificate deactivation payload.\n     */\n    body: ToggleCertificatesRequest;\n    path?: never;\n    query?: never;\n    url: '/organization/certificates/deactivate';\n};\n\nexport type DeactivateOrganizationCertificatesResponses = {\n    /**\n     * Certificates deactivated successfully.\n     */\n    200: ListCertificatesResponse;\n};\n\nexport type DeactivateOrganizationCertificatesResponse = DeactivateOrganizationCertificatesResponses[keyof DeactivateOrganizationCertificatesResponses];\n\nexport type DeleteCertificateData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/organization/certificates/{certificate_id}';\n};\n\nexport type DeleteCertificateResponses = {\n    /**\n     * Certificate deleted successfully.\n     */\n    200: DeleteCertificateResponse;\n};\n\nexport type DeleteCertificateResponse2 = DeleteCertificateResponses[keyof DeleteCertificateResponses];\n\nexport type GetCertificateData = {\n    body?: never;\n    path: {\n        /**\n         * Unique ID of the certificate to retrieve.\n         */\n        certificate_id: string;\n    };\n    query?: {\n        /**\n         * A list of additional fields to include in the response. Currently the only supported value is `content` to fetch the PEM content of the certificate.\n         */\n        include?: Array<'content'>;\n    };\n    url: '/organization/certificates/{certificate_id}';\n};\n\nexport type GetCertificateResponses = {\n    /**\n     * Certificate retrieved successfully.\n     */\n    200: Certificate;\n};\n\nexport type GetCertificateResponse = GetCertificateResponses[keyof GetCertificateResponses];\n\nexport type ModifyCertificateData = {\n    /**\n     * The certificate modification payload.\n     */\n    body: ModifyCertificateRequest;\n    path?: never;\n    query?: never;\n    url: '/organization/certificates/{certificate_id}';\n};\n\nexport type ModifyCertificateResponses = {\n    /**\n     * Certificate modified successfully.\n     */\n    200: Certificate;\n};\n\nexport type ModifyCertificateResponse = ModifyCertificateResponses[keyof ModifyCertificateResponses];\n\nexport type UsageCostsData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * Start time (Unix seconds) of the query time range, inclusive.\n         */\n        start_time: number;\n        /**\n         * End time (Unix seconds) of the query time range, exclusive.\n         */\n        end_time?: number;\n        /**\n         * Width of each time bucket in response. Currently only `1d` is supported, default to `1d`.\n         */\n        bucket_width?: '1d';\n        /**\n         * Return only costs for these projects.\n         */\n        project_ids?: Array<string>;\n        /**\n         * Group the costs by the specified fields. Support fields include `project_id`, `line_item` and any combination of them.\n         */\n        group_by?: Array<'project_id' | 'line_item'>;\n        /**\n         * A limit on the number of buckets to be returned. Limit can range between 1 and 180, and the default is 7.\n         *\n         */\n        limit?: number;\n        /**\n         * A cursor for use in pagination. Corresponding to the `next_page` field from the previous response.\n         */\n        page?: string;\n    };\n    url: '/organization/costs';\n};\n\nexport type UsageCostsResponses = {\n    /**\n     * Costs data retrieved successfully.\n     */\n    200: UsageResponse;\n};\n\nexport type UsageCostsResponse = UsageCostsResponses[keyof UsageCostsResponses];\n\nexport type ListInvitesData = {\n    body?: never;\n    path?: never;\n    query?: {\n        /**\n         * A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 20.\n         *\n         */\n        limit?: number;\n        /**\n         * A cursor for use in pagination. `after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with obj_foo, your subsequent call can include after=obj_foo in order to fetch the next page of the list.\n         *\n         */\n        after?: string;\n    };\n    url: '/organization/invites';\n};\n\nexport type ListInvitesResponses = {\n    /**\n     * Invites listed successfully.\n     */\n    200: InviteListResponse;\n};\n\nexport type ListInvitesResponse = ListInvitesResponses[keyof ListInvitesResponses];\n\nexport type InviteUserData = {\n    /**\n     * The invite request payload.\n     */\n    body: InviteRequest;\n    path?: never;\n    query?: never;\n    url: '/organization/invites';\n};\n\nexport type InviteUserResponses = {\n    /**\n     * User invited successfully.\n     */\n    200: Invite;\n};\n\nexport type InviteUserResponse = InviteUserResponses[keyof InviteUserResponses];\n\nexport type DeleteInviteData = {\n    body?: never;\n    path: {\n        /**\n         * The ID of the invite to delete.\n         */\n        invite_id: string;\n    };\n    query?: never;\n    url: '/organization/invites/{invite_id}';\n};\n\nexport type DeleteInviteResponses = {\n    /**\n     * Invite deleted successfully.\n     */\n    200: InviteDeleteResponse;\n};\n\nexport type DeleteInviteResponse = DeleteInviteResponses[keyof DeleteInviteResponses];\n\nexport type RetrieveInviteData = {\n    body?: never;\n    path: {\n        /**\n         * The ID of the invite to retrieve.\n         */\n        invite_id: string;\n    };\n    query?: never;\n    url: '/organization/invites/{invite_id}';\n};\n\nexport type RetrieveInviteResponses = {\n    /**\n     * Invite retrieved successfully.\n     */\n    200: Invite;\n};\n\nexport type RetrieveInviteResponse = RetrieveInviteResponses[keyof RetrieveInviteResponses];\n\nexport type ListProjectsData = {\n    body?: never;\n    path?: never;\n    query?: {\n        /**\n         * A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 20.\n         *\n         */\n        limit?: number;\n        /**\n         * A cursor for use in pagination. `after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with obj_foo, your subsequent call can include after=obj_foo in order to fetch the next page of the list.\n         *\n         */\n        after?: string;\n        /**\n         * If `true` returns all projects including those that have been `archived`. Archived projects are not included by default.\n         */\n        include_archived?: boolean;\n    };\n    url: '/organization/projects';\n};\n\nexport type ListProjectsResponses = {\n    /**\n     * Projects listed successfully.\n     */\n    200: ProjectListResponse;\n};\n\nexport type ListProjectsResponse = ListProjectsResponses[keyof ListProjectsResponses];\n\nexport type CreateProjectData = {\n    /**\n     * The project create request payload.\n     */\n    body: ProjectCreateRequest;\n    path?: never;\n    query?: never;\n    url: '/organization/projects';\n};\n\nexport type CreateProjectResponses = {\n    /**\n     * Project created successfully.\n     */\n    200: Project;\n};\n\nexport type CreateProjectResponse = CreateProjectResponses[keyof CreateProjectResponses];\n\nexport type RetrieveProjectData = {\n    body?: never;\n    path: {\n        /**\n         * The ID of the project.\n         */\n        project_id: string;\n    };\n    query?: never;\n    url: '/organization/projects/{project_id}';\n};\n\nexport type RetrieveProjectResponses = {\n    /**\n     * Project retrieved successfully.\n     */\n    200: Project;\n};\n\nexport type RetrieveProjectResponse = RetrieveProjectResponses[keyof RetrieveProjectResponses];\n\nexport type ModifyProjectData = {\n    /**\n     * The project update request payload.\n     */\n    body: ProjectUpdateRequest;\n    path: {\n        /**\n         * The ID of the project.\n         */\n        project_id: string;\n    };\n    query?: never;\n    url: '/organization/projects/{project_id}';\n};\n\nexport type ModifyProjectErrors = {\n    /**\n     * Error response when updating the default project.\n     */\n    400: ErrorResponse;\n};\n\nexport type ModifyProjectError = ModifyProjectErrors[keyof ModifyProjectErrors];\n\nexport type ModifyProjectResponses = {\n    /**\n     * Project updated successfully.\n     */\n    200: Project;\n};\n\nexport type ModifyProjectResponse = ModifyProjectResponses[keyof ModifyProjectResponses];\n\nexport type ListProjectApiKeysData = {\n    body?: never;\n    path: {\n        /**\n         * The ID of the project.\n         */\n        project_id: string;\n    };\n    query?: {\n        /**\n         * A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 20.\n         *\n         */\n        limit?: number;\n        /**\n         * A cursor for use in pagination. `after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with obj_foo, your subsequent call can include after=obj_foo in order to fetch the next page of the list.\n         *\n         */\n        after?: string;\n    };\n    url: '/organization/projects/{project_id}/api_keys';\n};\n\nexport type ListProjectApiKeysResponses = {\n    /**\n     * Project API keys listed successfully.\n     */\n    200: ProjectApiKeyListResponse;\n};\n\nexport type ListProjectApiKeysResponse = ListProjectApiKeysResponses[keyof ListProjectApiKeysResponses];\n\nexport type DeleteProjectApiKeyData = {\n    body?: never;\n    path: {\n        /**\n         * The ID of the project.\n         */\n        project_id: string;\n        /**\n         * The ID of the API key.\n         */\n        key_id: string;\n    };\n    query?: never;\n    url: '/organization/projects/{project_id}/api_keys/{key_id}';\n};\n\nexport type DeleteProjectApiKeyErrors = {\n    /**\n     * Error response for various conditions.\n     */\n    400: ErrorResponse;\n};\n\nexport type DeleteProjectApiKeyError = DeleteProjectApiKeyErrors[keyof DeleteProjectApiKeyErrors];\n\nexport type DeleteProjectApiKeyResponses = {\n    /**\n     * Project API key deleted successfully.\n     */\n    200: ProjectApiKeyDeleteResponse;\n};\n\nexport type DeleteProjectApiKeyResponse = DeleteProjectApiKeyResponses[keyof DeleteProjectApiKeyResponses];\n\nexport type RetrieveProjectApiKeyData = {\n    body?: never;\n    path: {\n        /**\n         * The ID of the project.\n         */\n        project_id: string;\n        /**\n         * The ID of the API key.\n         */\n        key_id: string;\n    };\n    query?: never;\n    url: '/organization/projects/{project_id}/api_keys/{key_id}';\n};\n\nexport type RetrieveProjectApiKeyResponses = {\n    /**\n     * Project API key retrieved successfully.\n     */\n    200: ProjectApiKey;\n};\n\nexport type RetrieveProjectApiKeyResponse = RetrieveProjectApiKeyResponses[keyof RetrieveProjectApiKeyResponses];\n\nexport type ArchiveProjectData = {\n    body?: never;\n    path: {\n        /**\n         * The ID of the project.\n         */\n        project_id: string;\n    };\n    query?: never;\n    url: '/organization/projects/{project_id}/archive';\n};\n\nexport type ArchiveProjectResponses = {\n    /**\n     * Project archived successfully.\n     */\n    200: Project;\n};\n\nexport type ArchiveProjectResponse = ArchiveProjectResponses[keyof ArchiveProjectResponses];\n\nexport type ListProjectCertificatesData = {\n    body?: never;\n    path: {\n        /**\n         * The ID of the project.\n         */\n        project_id: string;\n    };\n    query?: {\n        /**\n         * A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 20.\n         *\n         */\n        limit?: number;\n        /**\n         * A cursor for use in pagination. `after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with obj_foo, your subsequent call can include after=obj_foo in order to fetch the next page of the list.\n         *\n         */\n        after?: string;\n        /**\n         * Sort order by the `created_at` timestamp of the objects. `asc` for ascending order and `desc` for descending order.\n         *\n         */\n        order?: 'asc' | 'desc';\n    };\n    url: '/organization/projects/{project_id}/certificates';\n};\n\nexport type ListProjectCertificatesResponses = {\n    /**\n     * Certificates listed successfully.\n     */\n    200: ListCertificatesResponse;\n};\n\nexport type ListProjectCertificatesResponse = ListProjectCertificatesResponses[keyof ListProjectCertificatesResponses];\n\nexport type ActivateProjectCertificatesData = {\n    /**\n     * The certificate activation payload.\n     */\n    body: ToggleCertificatesRequest;\n    path: {\n        /**\n         * The ID of the project.\n         */\n        project_id: string;\n    };\n    query?: never;\n    url: '/organization/projects/{project_id}/certificates/activate';\n};\n\nexport type ActivateProjectCertificatesResponses = {\n    /**\n     * Certificates activated successfully.\n     */\n    200: ListCertificatesResponse;\n};\n\nexport type ActivateProjectCertificatesResponse = ActivateProjectCertificatesResponses[keyof ActivateProjectCertificatesResponses];\n\nexport type DeactivateProjectCertificatesData = {\n    /**\n     * The certificate deactivation payload.\n     */\n    body: ToggleCertificatesRequest;\n    path: {\n        /**\n         * The ID of the project.\n         */\n        project_id: string;\n    };\n    query?: never;\n    url: '/organization/projects/{project_id}/certificates/deactivate';\n};\n\nexport type DeactivateProjectCertificatesResponses = {\n    /**\n     * Certificates deactivated successfully.\n     */\n    200: ListCertificatesResponse;\n};\n\nexport type DeactivateProjectCertificatesResponse = DeactivateProjectCertificatesResponses[keyof DeactivateProjectCertificatesResponses];\n\nexport type ListProjectRateLimitsData = {\n    body?: never;\n    path: {\n        /**\n         * The ID of the project.\n         */\n        project_id: string;\n    };\n    query?: {\n        /**\n         * A limit on the number of objects to be returned. The default is 100.\n         *\n         */\n        limit?: number;\n        /**\n         * A cursor for use in pagination. `after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with obj_foo, your subsequent call can include after=obj_foo in order to fetch the next page of the list.\n         *\n         */\n        after?: string;\n        /**\n         * A cursor for use in pagination. `before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, beginning with obj_foo, your subsequent call can include before=obj_foo in order to fetch the previous page of the list.\n         *\n         */\n        before?: string;\n    };\n    url: '/organization/projects/{project_id}/rate_limits';\n};\n\nexport type ListProjectRateLimitsResponses = {\n    /**\n     * Project rate limits listed successfully.\n     */\n    200: ProjectRateLimitListResponse;\n};\n\nexport type ListProjectRateLimitsResponse = ListProjectRateLimitsResponses[keyof ListProjectRateLimitsResponses];\n\nexport type UpdateProjectRateLimitsData = {\n    /**\n     * The project rate limit update request payload.\n     */\n    body: ProjectRateLimitUpdateRequest;\n    path: {\n        /**\n         * The ID of the project.\n         */\n        project_id: string;\n        /**\n         * The ID of the rate limit.\n         */\n        rate_limit_id: string;\n    };\n    query?: never;\n    url: '/organization/projects/{project_id}/rate_limits/{rate_limit_id}';\n};\n\nexport type UpdateProjectRateLimitsErrors = {\n    /**\n     * Error response for various conditions.\n     */\n    400: ErrorResponse;\n};\n\nexport type UpdateProjectRateLimitsError = UpdateProjectRateLimitsErrors[keyof UpdateProjectRateLimitsErrors];\n\nexport type UpdateProjectRateLimitsResponses = {\n    /**\n     * Project rate limit updated successfully.\n     */\n    200: ProjectRateLimit;\n};\n\nexport type UpdateProjectRateLimitsResponse = UpdateProjectRateLimitsResponses[keyof UpdateProjectRateLimitsResponses];\n\nexport type ListProjectServiceAccountsData = {\n    body?: never;\n    path: {\n        /**\n         * The ID of the project.\n         */\n        project_id: string;\n    };\n    query?: {\n        /**\n         * A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 20.\n         *\n         */\n        limit?: number;\n        /**\n         * A cursor for use in pagination. `after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with obj_foo, your subsequent call can include after=obj_foo in order to fetch the next page of the list.\n         *\n         */\n        after?: string;\n    };\n    url: '/organization/projects/{project_id}/service_accounts';\n};\n\nexport type ListProjectServiceAccountsErrors = {\n    /**\n     * Error response when project is archived.\n     */\n    400: ErrorResponse;\n};\n\nexport type ListProjectServiceAccountsError = ListProjectServiceAccountsErrors[keyof ListProjectServiceAccountsErrors];\n\nexport type ListProjectServiceAccountsResponses = {\n    /**\n     * Project service accounts listed successfully.\n     */\n    200: ProjectServiceAccountListResponse;\n};\n\nexport type ListProjectServiceAccountsResponse = ListProjectServiceAccountsResponses[keyof ListProjectServiceAccountsResponses];\n\nexport type CreateProjectServiceAccountData = {\n    /**\n     * The project service account create request payload.\n     */\n    body: ProjectServiceAccountCreateRequest;\n    path: {\n        /**\n         * The ID of the project.\n         */\n        project_id: string;\n    };\n    query?: never;\n    url: '/organization/projects/{project_id}/service_accounts';\n};\n\nexport type CreateProjectServiceAccountErrors = {\n    /**\n     * Error response when project is archived.\n     */\n    400: ErrorResponse;\n};\n\nexport type CreateProjectServiceAccountError = CreateProjectServiceAccountErrors[keyof CreateProjectServiceAccountErrors];\n\nexport type CreateProjectServiceAccountResponses = {\n    /**\n     * Project service account created successfully.\n     */\n    200: ProjectServiceAccountCreateResponse;\n};\n\nexport type CreateProjectServiceAccountResponse = CreateProjectServiceAccountResponses[keyof CreateProjectServiceAccountResponses];\n\nexport type DeleteProjectServiceAccountData = {\n    body?: never;\n    path: {\n        /**\n         * The ID of the project.\n         */\n        project_id: string;\n        /**\n         * The ID of the service account.\n         */\n        service_account_id: string;\n    };\n    query?: never;\n    url: '/organization/projects/{project_id}/service_accounts/{service_account_id}';\n};\n\nexport type DeleteProjectServiceAccountResponses = {\n    /**\n     * Project service account deleted successfully.\n     */\n    200: ProjectServiceAccountDeleteResponse;\n};\n\nexport type DeleteProjectServiceAccountResponse = DeleteProjectServiceAccountResponses[keyof DeleteProjectServiceAccountResponses];\n\nexport type RetrieveProjectServiceAccountData = {\n    body?: never;\n    path: {\n        /**\n         * The ID of the project.\n         */\n        project_id: string;\n        /**\n         * The ID of the service account.\n         */\n        service_account_id: string;\n    };\n    query?: never;\n    url: '/organization/projects/{project_id}/service_accounts/{service_account_id}';\n};\n\nexport type RetrieveProjectServiceAccountResponses = {\n    /**\n     * Project service account retrieved successfully.\n     */\n    200: ProjectServiceAccount;\n};\n\nexport type RetrieveProjectServiceAccountResponse = RetrieveProjectServiceAccountResponses[keyof RetrieveProjectServiceAccountResponses];\n\nexport type ListProjectUsersData = {\n    body?: never;\n    path: {\n        /**\n         * The ID of the project.\n         */\n        project_id: string;\n    };\n    query?: {\n        /**\n         * A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 20.\n         *\n         */\n        limit?: number;\n        /**\n         * A cursor for use in pagination. `after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with obj_foo, your subsequent call can include after=obj_foo in order to fetch the next page of the list.\n         *\n         */\n        after?: string;\n    };\n    url: '/organization/projects/{project_id}/users';\n};\n\nexport type ListProjectUsersErrors = {\n    /**\n     * Error response when project is archived.\n     */\n    400: ErrorResponse;\n};\n\nexport type ListProjectUsersError = ListProjectUsersErrors[keyof ListProjectUsersErrors];\n\nexport type ListProjectUsersResponses = {\n    /**\n     * Project users listed successfully.\n     */\n    200: ProjectUserListResponse;\n};\n\nexport type ListProjectUsersResponse = ListProjectUsersResponses[keyof ListProjectUsersResponses];\n\nexport type CreateProjectUserData = {\n    /**\n     * The project user create request payload.\n     */\n    body: ProjectUserCreateRequest;\n    path: {\n        /**\n         * The ID of the project.\n         */\n        project_id: string;\n    };\n    query?: never;\n    url: '/organization/projects/{project_id}/users';\n};\n\nexport type CreateProjectUserErrors = {\n    /**\n     * Error response for various conditions.\n     */\n    400: ErrorResponse;\n};\n\nexport type CreateProjectUserError = CreateProjectUserErrors[keyof CreateProjectUserErrors];\n\nexport type CreateProjectUserResponses = {\n    /**\n     * User added to project successfully.\n     */\n    200: ProjectUser;\n};\n\nexport type CreateProjectUserResponse = CreateProjectUserResponses[keyof CreateProjectUserResponses];\n\nexport type DeleteProjectUserData = {\n    body?: never;\n    path: {\n        /**\n         * The ID of the project.\n         */\n        project_id: string;\n        /**\n         * The ID of the user.\n         */\n        user_id: string;\n    };\n    query?: never;\n    url: '/organization/projects/{project_id}/users/{user_id}';\n};\n\nexport type DeleteProjectUserErrors = {\n    /**\n     * Error response for various conditions.\n     */\n    400: ErrorResponse;\n};\n\nexport type DeleteProjectUserError = DeleteProjectUserErrors[keyof DeleteProjectUserErrors];\n\nexport type DeleteProjectUserResponses = {\n    /**\n     * Project user deleted successfully.\n     */\n    200: ProjectUserDeleteResponse;\n};\n\nexport type DeleteProjectUserResponse = DeleteProjectUserResponses[keyof DeleteProjectUserResponses];\n\nexport type RetrieveProjectUserData = {\n    body?: never;\n    path: {\n        /**\n         * The ID of the project.\n         */\n        project_id: string;\n        /**\n         * The ID of the user.\n         */\n        user_id: string;\n    };\n    query?: never;\n    url: '/organization/projects/{project_id}/users/{user_id}';\n};\n\nexport type RetrieveProjectUserResponses = {\n    /**\n     * Project user retrieved successfully.\n     */\n    200: ProjectUser;\n};\n\nexport type RetrieveProjectUserResponse = RetrieveProjectUserResponses[keyof RetrieveProjectUserResponses];\n\nexport type ModifyProjectUserData = {\n    /**\n     * The project user update request payload.\n     */\n    body: ProjectUserUpdateRequest;\n    path: {\n        /**\n         * The ID of the project.\n         */\n        project_id: string;\n        /**\n         * The ID of the user.\n         */\n        user_id: string;\n    };\n    query?: never;\n    url: '/organization/projects/{project_id}/users/{user_id}';\n};\n\nexport type ModifyProjectUserErrors = {\n    /**\n     * Error response for various conditions.\n     */\n    400: ErrorResponse;\n};\n\nexport type ModifyProjectUserError = ModifyProjectUserErrors[keyof ModifyProjectUserErrors];\n\nexport type ModifyProjectUserResponses = {\n    /**\n     * Project user's role updated successfully.\n     */\n    200: ProjectUser;\n};\n\nexport type ModifyProjectUserResponse = ModifyProjectUserResponses[keyof ModifyProjectUserResponses];\n\nexport type UsageAudioSpeechesData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * Start time (Unix seconds) of the query time range, inclusive.\n         */\n        start_time: number;\n        /**\n         * End time (Unix seconds) of the query time range, exclusive.\n         */\n        end_time?: number;\n        /**\n         * Width of each time bucket in response. Currently `1m`, `1h` and `1d` are supported, default to `1d`.\n         */\n        bucket_width?: '1m' | '1h' | '1d';\n        /**\n         * Return only usage for these projects.\n         */\n        project_ids?: Array<string>;\n        /**\n         * Return only usage for these users.\n         */\n        user_ids?: Array<string>;\n        /**\n         * Return only usage for these API keys.\n         */\n        api_key_ids?: Array<string>;\n        /**\n         * Return only usage for these models.\n         */\n        models?: Array<string>;\n        /**\n         * Group the usage data by the specified fields. Support fields include `project_id`, `user_id`, `api_key_id`, `model` or any combination of them.\n         */\n        group_by?: Array<'project_id' | 'user_id' | 'api_key_id' | 'model'>;\n        /**\n         * Specifies the number of buckets to return.\n         * - `bucket_width=1d`: default: 7, max: 31\n         * - `bucket_width=1h`: default: 24, max: 168\n         * - `bucket_width=1m`: default: 60, max: 1440\n         *\n         */\n        limit?: number;\n        /**\n         * A cursor for use in pagination. Corresponding to the `next_page` field from the previous response.\n         */\n        page?: string;\n    };\n    url: '/organization/usage/audio_speeches';\n};\n\nexport type UsageAudioSpeechesResponses = {\n    /**\n     * Usage data retrieved successfully.\n     */\n    200: UsageResponse;\n};\n\nexport type UsageAudioSpeechesResponse = UsageAudioSpeechesResponses[keyof UsageAudioSpeechesResponses];\n\nexport type UsageAudioTranscriptionsData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * Start time (Unix seconds) of the query time range, inclusive.\n         */\n        start_time: number;\n        /**\n         * End time (Unix seconds) of the query time range, exclusive.\n         */\n        end_time?: number;\n        /**\n         * Width of each time bucket in response. Currently `1m`, `1h` and `1d` are supported, default to `1d`.\n         */\n        bucket_width?: '1m' | '1h' | '1d';\n        /**\n         * Return only usage for these projects.\n         */\n        project_ids?: Array<string>;\n        /**\n         * Return only usage for these users.\n         */\n        user_ids?: Array<string>;\n        /**\n         * Return only usage for these API keys.\n         */\n        api_key_ids?: Array<string>;\n        /**\n         * Return only usage for these models.\n         */\n        models?: Array<string>;\n        /**\n         * Group the usage data by the specified fields. Support fields include `project_id`, `user_id`, `api_key_id`, `model` or any combination of them.\n         */\n        group_by?: Array<'project_id' | 'user_id' | 'api_key_id' | 'model'>;\n        /**\n         * Specifies the number of buckets to return.\n         * - `bucket_width=1d`: default: 7, max: 31\n         * - `bucket_width=1h`: default: 24, max: 168\n         * - `bucket_width=1m`: default: 60, max: 1440\n         *\n         */\n        limit?: number;\n        /**\n         * A cursor for use in pagination. Corresponding to the `next_page` field from the previous response.\n         */\n        page?: string;\n    };\n    url: '/organization/usage/audio_transcriptions';\n};\n\nexport type UsageAudioTranscriptionsResponses = {\n    /**\n     * Usage data retrieved successfully.\n     */\n    200: UsageResponse;\n};\n\nexport type UsageAudioTranscriptionsResponse = UsageAudioTranscriptionsResponses[keyof UsageAudioTranscriptionsResponses];\n\nexport type UsageCodeInterpreterSessionsData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * Start time (Unix seconds) of the query time range, inclusive.\n         */\n        start_time: number;\n        /**\n         * End time (Unix seconds) of the query time range, exclusive.\n         */\n        end_time?: number;\n        /**\n         * Width of each time bucket in response. Currently `1m`, `1h` and `1d` are supported, default to `1d`.\n         */\n        bucket_width?: '1m' | '1h' | '1d';\n        /**\n         * Return only usage for these projects.\n         */\n        project_ids?: Array<string>;\n        /**\n         * Group the usage data by the specified fields. Support fields include `project_id`.\n         */\n        group_by?: Array<'project_id'>;\n        /**\n         * Specifies the number of buckets to return.\n         * - `bucket_width=1d`: default: 7, max: 31\n         * - `bucket_width=1h`: default: 24, max: 168\n         * - `bucket_width=1m`: default: 60, max: 1440\n         *\n         */\n        limit?: number;\n        /**\n         * A cursor for use in pagination. Corresponding to the `next_page` field from the previous response.\n         */\n        page?: string;\n    };\n    url: '/organization/usage/code_interpreter_sessions';\n};\n\nexport type UsageCodeInterpreterSessionsResponses = {\n    /**\n     * Usage data retrieved successfully.\n     */\n    200: UsageResponse;\n};\n\nexport type UsageCodeInterpreterSessionsResponse = UsageCodeInterpreterSessionsResponses[keyof UsageCodeInterpreterSessionsResponses];\n\nexport type UsageCompletionsData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * Start time (Unix seconds) of the query time range, inclusive.\n         */\n        start_time: number;\n        /**\n         * End time (Unix seconds) of the query time range, exclusive.\n         */\n        end_time?: number;\n        /**\n         * Width of each time bucket in response. Currently `1m`, `1h` and `1d` are supported, default to `1d`.\n         */\n        bucket_width?: '1m' | '1h' | '1d';\n        /**\n         * Return only usage for these projects.\n         */\n        project_ids?: Array<string>;\n        /**\n         * Return only usage for these users.\n         */\n        user_ids?: Array<string>;\n        /**\n         * Return only usage for these API keys.\n         */\n        api_key_ids?: Array<string>;\n        /**\n         * Return only usage for these models.\n         */\n        models?: Array<string>;\n        /**\n         * If `true`, return batch jobs only. If `false`, return non-batch jobs only. By default, return both.\n         *\n         */\n        batch?: boolean;\n        /**\n         * Group the usage data by the specified fields. Support fields include `project_id`, `user_id`, `api_key_id`, `model`, `batch` or any combination of them.\n         */\n        group_by?: Array<'project_id' | 'user_id' | 'api_key_id' | 'model' | 'batch'>;\n        /**\n         * Specifies the number of buckets to return.\n         * - `bucket_width=1d`: default: 7, max: 31\n         * - `bucket_width=1h`: default: 24, max: 168\n         * - `bucket_width=1m`: default: 60, max: 1440\n         *\n         */\n        limit?: number;\n        /**\n         * A cursor for use in pagination. Corresponding to the `next_page` field from the previous response.\n         */\n        page?: string;\n    };\n    url: '/organization/usage/completions';\n};\n\nexport type UsageCompletionsResponses = {\n    /**\n     * Usage data retrieved successfully.\n     */\n    200: UsageResponse;\n};\n\nexport type UsageCompletionsResponse = UsageCompletionsResponses[keyof UsageCompletionsResponses];\n\nexport type UsageEmbeddingsData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * Start time (Unix seconds) of the query time range, inclusive.\n         */\n        start_time: number;\n        /**\n         * End time (Unix seconds) of the query time range, exclusive.\n         */\n        end_time?: number;\n        /**\n         * Width of each time bucket in response. Currently `1m`, `1h` and `1d` are supported, default to `1d`.\n         */\n        bucket_width?: '1m' | '1h' | '1d';\n        /**\n         * Return only usage for these projects.\n         */\n        project_ids?: Array<string>;\n        /**\n         * Return only usage for these users.\n         */\n        user_ids?: Array<string>;\n        /**\n         * Return only usage for these API keys.\n         */\n        api_key_ids?: Array<string>;\n        /**\n         * Return only usage for these models.\n         */\n        models?: Array<string>;\n        /**\n         * Group the usage data by the specified fields. Support fields include `project_id`, `user_id`, `api_key_id`, `model` or any combination of them.\n         */\n        group_by?: Array<'project_id' | 'user_id' | 'api_key_id' | 'model'>;\n        /**\n         * Specifies the number of buckets to return.\n         * - `bucket_width=1d`: default: 7, max: 31\n         * - `bucket_width=1h`: default: 24, max: 168\n         * - `bucket_width=1m`: default: 60, max: 1440\n         *\n         */\n        limit?: number;\n        /**\n         * A cursor for use in pagination. Corresponding to the `next_page` field from the previous response.\n         */\n        page?: string;\n    };\n    url: '/organization/usage/embeddings';\n};\n\nexport type UsageEmbeddingsResponses = {\n    /**\n     * Usage data retrieved successfully.\n     */\n    200: UsageResponse;\n};\n\nexport type UsageEmbeddingsResponse = UsageEmbeddingsResponses[keyof UsageEmbeddingsResponses];\n\nexport type UsageImagesData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * Start time (Unix seconds) of the query time range, inclusive.\n         */\n        start_time: number;\n        /**\n         * End time (Unix seconds) of the query time range, exclusive.\n         */\n        end_time?: number;\n        /**\n         * Width of each time bucket in response. Currently `1m`, `1h` and `1d` are supported, default to `1d`.\n         */\n        bucket_width?: '1m' | '1h' | '1d';\n        /**\n         * Return only usages for these sources. Possible values are `image.generation`, `image.edit`, `image.variation` or any combination of them.\n         */\n        sources?: Array<'image.generation' | 'image.edit' | 'image.variation'>;\n        /**\n         * Return only usages for these image sizes. Possible values are `256x256`, `512x512`, `1024x1024`, `1792x1792`, `1024x1792` or any combination of them.\n         */\n        sizes?: Array<'256x256' | '512x512' | '1024x1024' | '1792x1792' | '1024x1792'>;\n        /**\n         * Return only usage for these projects.\n         */\n        project_ids?: Array<string>;\n        /**\n         * Return only usage for these users.\n         */\n        user_ids?: Array<string>;\n        /**\n         * Return only usage for these API keys.\n         */\n        api_key_ids?: Array<string>;\n        /**\n         * Return only usage for these models.\n         */\n        models?: Array<string>;\n        /**\n         * Group the usage data by the specified fields. Support fields include `project_id`, `user_id`, `api_key_id`, `model`, `size`, `source` or any combination of them.\n         */\n        group_by?: Array<'project_id' | 'user_id' | 'api_key_id' | 'model' | 'size' | 'source'>;\n        /**\n         * Specifies the number of buckets to return.\n         * - `bucket_width=1d`: default: 7, max: 31\n         * - `bucket_width=1h`: default: 24, max: 168\n         * - `bucket_width=1m`: default: 60, max: 1440\n         *\n         */\n        limit?: number;\n        /**\n         * A cursor for use in pagination. Corresponding to the `next_page` field from the previous response.\n         */\n        page?: string;\n    };\n    url: '/organization/usage/images';\n};\n\nexport type UsageImagesResponses = {\n    /**\n     * Usage data retrieved successfully.\n     */\n    200: UsageResponse;\n};\n\nexport type UsageImagesResponse = UsageImagesResponses[keyof UsageImagesResponses];\n\nexport type UsageModerationsData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * Start time (Unix seconds) of the query time range, inclusive.\n         */\n        start_time: number;\n        /**\n         * End time (Unix seconds) of the query time range, exclusive.\n         */\n        end_time?: number;\n        /**\n         * Width of each time bucket in response. Currently `1m`, `1h` and `1d` are supported, default to `1d`.\n         */\n        bucket_width?: '1m' | '1h' | '1d';\n        /**\n         * Return only usage for these projects.\n         */\n        project_ids?: Array<string>;\n        /**\n         * Return only usage for these users.\n         */\n        user_ids?: Array<string>;\n        /**\n         * Return only usage for these API keys.\n         */\n        api_key_ids?: Array<string>;\n        /**\n         * Return only usage for these models.\n         */\n        models?: Array<string>;\n        /**\n         * Group the usage data by the specified fields. Support fields include `project_id`, `user_id`, `api_key_id`, `model` or any combination of them.\n         */\n        group_by?: Array<'project_id' | 'user_id' | 'api_key_id' | 'model'>;\n        /**\n         * Specifies the number of buckets to return.\n         * - `bucket_width=1d`: default: 7, max: 31\n         * - `bucket_width=1h`: default: 24, max: 168\n         * - `bucket_width=1m`: default: 60, max: 1440\n         *\n         */\n        limit?: number;\n        /**\n         * A cursor for use in pagination. Corresponding to the `next_page` field from the previous response.\n         */\n        page?: string;\n    };\n    url: '/organization/usage/moderations';\n};\n\nexport type UsageModerationsResponses = {\n    /**\n     * Usage data retrieved successfully.\n     */\n    200: UsageResponse;\n};\n\nexport type UsageModerationsResponse = UsageModerationsResponses[keyof UsageModerationsResponses];\n\nexport type UsageVectorStoresData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * Start time (Unix seconds) of the query time range, inclusive.\n         */\n        start_time: number;\n        /**\n         * End time (Unix seconds) of the query time range, exclusive.\n         */\n        end_time?: number;\n        /**\n         * Width of each time bucket in response. Currently `1m`, `1h` and `1d` are supported, default to `1d`.\n         */\n        bucket_width?: '1m' | '1h' | '1d';\n        /**\n         * Return only usage for these projects.\n         */\n        project_ids?: Array<string>;\n        /**\n         * Group the usage data by the specified fields. Support fields include `project_id`.\n         */\n        group_by?: Array<'project_id'>;\n        /**\n         * Specifies the number of buckets to return.\n         * - `bucket_width=1d`: default: 7, max: 31\n         * - `bucket_width=1h`: default: 24, max: 168\n         * - `bucket_width=1m`: default: 60, max: 1440\n         *\n         */\n        limit?: number;\n        /**\n         * A cursor for use in pagination. Corresponding to the `next_page` field from the previous response.\n         */\n        page?: string;\n    };\n    url: '/organization/usage/vector_stores';\n};\n\nexport type UsageVectorStoresResponses = {\n    /**\n     * Usage data retrieved successfully.\n     */\n    200: UsageResponse;\n};\n\nexport type UsageVectorStoresResponse = UsageVectorStoresResponses[keyof UsageVectorStoresResponses];\n\nexport type ListUsersData = {\n    body?: never;\n    path?: never;\n    query?: {\n        /**\n         * A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 20.\n         *\n         */\n        limit?: number;\n        /**\n         * A cursor for use in pagination. `after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with obj_foo, your subsequent call can include after=obj_foo in order to fetch the next page of the list.\n         *\n         */\n        after?: string;\n        /**\n         * Filter by the email address of users.\n         */\n        emails?: Array<string>;\n    };\n    url: '/organization/users';\n};\n\nexport type ListUsersResponses = {\n    /**\n     * Users listed successfully.\n     */\n    200: UserListResponse;\n};\n\nexport type ListUsersResponse = ListUsersResponses[keyof ListUsersResponses];\n\nexport type DeleteUserData = {\n    body?: never;\n    path: {\n        /**\n         * The ID of the user.\n         */\n        user_id: string;\n    };\n    query?: never;\n    url: '/organization/users/{user_id}';\n};\n\nexport type DeleteUserResponses = {\n    /**\n     * User deleted successfully.\n     */\n    200: UserDeleteResponse;\n};\n\nexport type DeleteUserResponse = DeleteUserResponses[keyof DeleteUserResponses];\n\nexport type RetrieveUserData = {\n    body?: never;\n    path: {\n        /**\n         * The ID of the user.\n         */\n        user_id: string;\n    };\n    query?: never;\n    url: '/organization/users/{user_id}';\n};\n\nexport type RetrieveUserResponses = {\n    /**\n     * User retrieved successfully.\n     */\n    200: User;\n};\n\nexport type RetrieveUserResponse = RetrieveUserResponses[keyof RetrieveUserResponses];\n\nexport type ModifyUserData = {\n    /**\n     * The new user role to modify. This must be one of `owner` or `member`.\n     */\n    body: UserRoleUpdateRequest;\n    path: {\n        /**\n         * The ID of the user.\n         */\n        user_id: string;\n    };\n    query?: never;\n    url: '/organization/users/{user_id}';\n};\n\nexport type ModifyUserResponses = {\n    /**\n     * User role updated successfully.\n     */\n    200: User;\n};\n\nexport type ModifyUserResponse = ModifyUserResponses[keyof ModifyUserResponses];\n\nexport type CreateRealtimeSessionData = {\n    /**\n     * Create an ephemeral API key with the given session configuration.\n     */\n    body: RealtimeSessionCreateRequest;\n    path?: never;\n    query?: never;\n    url: '/realtime/sessions';\n};\n\nexport type CreateRealtimeSessionResponses = {\n    /**\n     * Session created successfully.\n     */\n    200: RealtimeSessionCreateResponse;\n};\n\nexport type CreateRealtimeSessionResponse = CreateRealtimeSessionResponses[keyof CreateRealtimeSessionResponses];\n\nexport type CreateRealtimeTranscriptionSessionData = {\n    /**\n     * Create an ephemeral API key with the given session configuration.\n     */\n    body: RealtimeTranscriptionSessionCreateRequest;\n    path?: never;\n    query?: never;\n    url: '/realtime/transcription_sessions';\n};\n\nexport type CreateRealtimeTranscriptionSessionResponses = {\n    /**\n     * Session created successfully.\n     */\n    200: RealtimeTranscriptionSessionCreateResponse;\n};\n\nexport type CreateRealtimeTranscriptionSessionResponse = CreateRealtimeTranscriptionSessionResponses[keyof CreateRealtimeTranscriptionSessionResponses];\n\nexport type CreateResponseData = {\n    body: CreateResponse;\n    path?: never;\n    query?: never;\n    url: '/responses';\n};\n\nexport type CreateResponseResponses = {\n    /**\n     * OK\n     */\n    200: Response;\n};\n\nexport type CreateResponseResponse = CreateResponseResponses[keyof CreateResponseResponses];\n\nexport type DeleteResponseData = {\n    body?: never;\n    path: {\n        /**\n         * The ID of the response to delete.\n         */\n        response_id: string;\n    };\n    query?: never;\n    url: '/responses/{response_id}';\n};\n\nexport type DeleteResponseErrors = {\n    /**\n     * Not Found\n     */\n    404: Error;\n};\n\nexport type DeleteResponseError = DeleteResponseErrors[keyof DeleteResponseErrors];\n\nexport type DeleteResponseResponses = {\n    /**\n     * OK\n     */\n    200: unknown;\n};\n\nexport type GetResponseData = {\n    body?: never;\n    path: {\n        /**\n         * The ID of the response to retrieve.\n         */\n        response_id: string;\n    };\n    query?: {\n        /**\n         * Additional fields to include in the response. See the `include`\n         * parameter for Response creation above for more information.\n         *\n         */\n        include?: Array<Includable>;\n        /**\n         * If set to true, the model response data will be streamed to the client\n         * as it is generated using [server-sent events](https://developer.mozilla.org/en-US/docs/Web/API/Server-sent_events/Using_server-sent_events#Event_stream_format).\n         * See the [Streaming section below](https://platform.openai.com/docs/api-reference/responses-streaming)\n         * for more information.\n         *\n         */\n        stream?: boolean;\n        /**\n         * The sequence number of the event after which to start streaming.\n         *\n         */\n        starting_after?: number;\n        /**\n         * When true, stream obfuscation will be enabled. Stream obfuscation adds\n         * random characters to an `obfuscation` field on streaming delta events\n         * to normalize payload sizes as a mitigation to certain side-channel\n         * attacks. These obfuscation fields are included by default, but add a\n         * small amount of overhead to the data stream. You can set\n         * `include_obfuscation` to false to optimize for bandwidth if you trust\n         * the network links between your application and the OpenAI API.\n         *\n         */\n        include_obfuscation?: boolean;\n    };\n    url: '/responses/{response_id}';\n};\n\nexport type GetResponseResponses = {\n    /**\n     * OK\n     */\n    200: Response;\n};\n\nexport type GetResponseResponse = GetResponseResponses[keyof GetResponseResponses];\n\nexport type CancelResponseData = {\n    body?: never;\n    path: {\n        /**\n         * The ID of the response to cancel.\n         */\n        response_id: string;\n    };\n    query?: never;\n    url: '/responses/{response_id}/cancel';\n};\n\nexport type CancelResponseErrors = {\n    /**\n     * Not Found\n     */\n    404: Error;\n};\n\nexport type CancelResponseError = CancelResponseErrors[keyof CancelResponseErrors];\n\nexport type CancelResponseResponses = {\n    /**\n     * OK\n     */\n    200: Response;\n};\n\nexport type CancelResponseResponse = CancelResponseResponses[keyof CancelResponseResponses];\n\nexport type ListInputItemsData = {\n    body?: never;\n    path: {\n        /**\n         * The ID of the response to retrieve input items for.\n         */\n        response_id: string;\n    };\n    query?: {\n        /**\n         * A limit on the number of objects to be returned. Limit can range between\n         * 1 and 100, and the default is 20.\n         *\n         */\n        limit?: number;\n        /**\n         * The order to return the input items in. Default is `desc`.\n         * - `asc`: Return the input items in ascending order.\n         * - `desc`: Return the input items in descending order.\n         *\n         */\n        order?: 'asc' | 'desc';\n        /**\n         * An item ID to list items after, used in pagination.\n         *\n         */\n        after?: string;\n        /**\n         * An item ID to list items before, used in pagination.\n         *\n         */\n        before?: string;\n        /**\n         * Additional fields to include in the response. See the `include`\n         * parameter for Response creation above for more information.\n         *\n         */\n        include?: Array<Includable>;\n    };\n    url: '/responses/{response_id}/input_items';\n};\n\nexport type ListInputItemsResponses = {\n    /**\n     * OK\n     */\n    200: ResponseItemList;\n};\n\nexport type ListInputItemsResponse = ListInputItemsResponses[keyof ListInputItemsResponses];\n\nexport type CreateThreadData = {\n    body?: CreateThreadRequest;\n    path?: never;\n    query?: never;\n    url: '/threads';\n};\n\nexport type CreateThreadResponses = {\n    /**\n     * OK\n     */\n    200: ThreadObject;\n};\n\nexport type CreateThreadResponse = CreateThreadResponses[keyof CreateThreadResponses];\n\nexport type CreateThreadAndRunData = {\n    body: CreateThreadAndRunRequest;\n    path?: never;\n    query?: never;\n    url: '/threads/runs';\n};\n\nexport type CreateThreadAndRunResponses = {\n    /**\n     * OK\n     */\n    200: RunObject;\n};\n\nexport type CreateThreadAndRunResponse = CreateThreadAndRunResponses[keyof CreateThreadAndRunResponses];\n\nexport type DeleteThreadData = {\n    body?: never;\n    path: {\n        /**\n         * The ID of the thread to delete.\n         */\n        thread_id: string;\n    };\n    query?: never;\n    url: '/threads/{thread_id}';\n};\n\nexport type DeleteThreadResponses = {\n    /**\n     * OK\n     */\n    200: DeleteThreadResponse;\n};\n\nexport type DeleteThreadResponse2 = DeleteThreadResponses[keyof DeleteThreadResponses];\n\nexport type GetThreadData = {\n    body?: never;\n    path: {\n        /**\n         * The ID of the thread to retrieve.\n         */\n        thread_id: string;\n    };\n    query?: never;\n    url: '/threads/{thread_id}';\n};\n\nexport type GetThreadResponses = {\n    /**\n     * OK\n     */\n    200: ThreadObject;\n};\n\nexport type GetThreadResponse = GetThreadResponses[keyof GetThreadResponses];\n\nexport type ModifyThreadData = {\n    body: ModifyThreadRequest;\n    path: {\n        /**\n         * The ID of the thread to modify. Only the `metadata` can be modified.\n         */\n        thread_id: string;\n    };\n    query?: never;\n    url: '/threads/{thread_id}';\n};\n\nexport type ModifyThreadResponses = {\n    /**\n     * OK\n     */\n    200: ThreadObject;\n};\n\nexport type ModifyThreadResponse = ModifyThreadResponses[keyof ModifyThreadResponses];\n\nexport type ListMessagesData = {\n    body?: never;\n    path: {\n        /**\n         * The ID of the [thread](https://platform.openai.com/docs/api-reference/threads) the messages belong to.\n         */\n        thread_id: string;\n    };\n    query?: {\n        /**\n         * A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 20.\n         *\n         */\n        limit?: number;\n        /**\n         * Sort order by the `created_at` timestamp of the objects. `asc` for ascending order and `desc` for descending order.\n         *\n         */\n        order?: 'asc' | 'desc';\n        /**\n         * A cursor for use in pagination. `after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with obj_foo, your subsequent call can include after=obj_foo in order to fetch the next page of the list.\n         *\n         */\n        after?: string;\n        /**\n         * A cursor for use in pagination. `before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with obj_foo, your subsequent call can include before=obj_foo in order to fetch the previous page of the list.\n         *\n         */\n        before?: string;\n        /**\n         * Filter messages by the run ID that generated them.\n         *\n         */\n        run_id?: string;\n    };\n    url: '/threads/{thread_id}/messages';\n};\n\nexport type ListMessagesResponses = {\n    /**\n     * OK\n     */\n    200: ListMessagesResponse;\n};\n\nexport type ListMessagesResponse2 = ListMessagesResponses[keyof ListMessagesResponses];\n\nexport type CreateMessageData = {\n    body: CreateMessageRequest;\n    path: {\n        /**\n         * The ID of the [thread](https://platform.openai.com/docs/api-reference/threads) to create a message for.\n         */\n        thread_id: string;\n    };\n    query?: never;\n    url: '/threads/{thread_id}/messages';\n};\n\nexport type CreateMessageResponses = {\n    /**\n     * OK\n     */\n    200: MessageObject;\n};\n\nexport type CreateMessageResponse = CreateMessageResponses[keyof CreateMessageResponses];\n\nexport type DeleteMessageData = {\n    body?: never;\n    path: {\n        /**\n         * The ID of the thread to which this message belongs.\n         */\n        thread_id: string;\n        /**\n         * The ID of the message to delete.\n         */\n        message_id: string;\n    };\n    query?: never;\n    url: '/threads/{thread_id}/messages/{message_id}';\n};\n\nexport type DeleteMessageResponses = {\n    /**\n     * OK\n     */\n    200: DeleteMessageResponse;\n};\n\nexport type DeleteMessageResponse2 = DeleteMessageResponses[keyof DeleteMessageResponses];\n\nexport type GetMessageData = {\n    body?: never;\n    path: {\n        /**\n         * The ID of the [thread](https://platform.openai.com/docs/api-reference/threads) to which this message belongs.\n         */\n        thread_id: string;\n        /**\n         * The ID of the message to retrieve.\n         */\n        message_id: string;\n    };\n    query?: never;\n    url: '/threads/{thread_id}/messages/{message_id}';\n};\n\nexport type GetMessageResponses = {\n    /**\n     * OK\n     */\n    200: MessageObject;\n};\n\nexport type GetMessageResponse = GetMessageResponses[keyof GetMessageResponses];\n\nexport type ModifyMessageData = {\n    body: ModifyMessageRequest;\n    path: {\n        /**\n         * The ID of the thread to which this message belongs.\n         */\n        thread_id: string;\n        /**\n         * The ID of the message to modify.\n         */\n        message_id: string;\n    };\n    query?: never;\n    url: '/threads/{thread_id}/messages/{message_id}';\n};\n\nexport type ModifyMessageResponses = {\n    /**\n     * OK\n     */\n    200: MessageObject;\n};\n\nexport type ModifyMessageResponse = ModifyMessageResponses[keyof ModifyMessageResponses];\n\nexport type ListRunsData = {\n    body?: never;\n    path: {\n        /**\n         * The ID of the thread the run belongs to.\n         */\n        thread_id: string;\n    };\n    query?: {\n        /**\n         * A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 20.\n         *\n         */\n        limit?: number;\n        /**\n         * Sort order by the `created_at` timestamp of the objects. `asc` for ascending order and `desc` for descending order.\n         *\n         */\n        order?: 'asc' | 'desc';\n        /**\n         * A cursor for use in pagination. `after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with obj_foo, your subsequent call can include after=obj_foo in order to fetch the next page of the list.\n         *\n         */\n        after?: string;\n        /**\n         * A cursor for use in pagination. `before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with obj_foo, your subsequent call can include before=obj_foo in order to fetch the previous page of the list.\n         *\n         */\n        before?: string;\n    };\n    url: '/threads/{thread_id}/runs';\n};\n\nexport type ListRunsResponses = {\n    /**\n     * OK\n     */\n    200: ListRunsResponse;\n};\n\nexport type ListRunsResponse2 = ListRunsResponses[keyof ListRunsResponses];\n\nexport type CreateRunData = {\n    body: CreateRunRequest;\n    path: {\n        /**\n         * The ID of the thread to run.\n         */\n        thread_id: string;\n    };\n    query?: {\n        /**\n         * A list of additional fields to include in the response. Currently the only supported value is `step_details.tool_calls[*].file_search.results[*].content` to fetch the file search result content.\n         *\n         * See the [file search tool documentation](https://platform.openai.com/docs/assistants/tools/file-search#customizing-file-search-settings) for more information.\n         *\n         */\n        'include[]'?: Array<'step_details.tool_calls[*].file_search.results[*].content'>;\n    };\n    url: '/threads/{thread_id}/runs';\n};\n\nexport type CreateRunResponses = {\n    /**\n     * OK\n     */\n    200: RunObject;\n};\n\nexport type CreateRunResponse = CreateRunResponses[keyof CreateRunResponses];\n\nexport type GetRunData = {\n    body?: never;\n    path: {\n        /**\n         * The ID of the [thread](https://platform.openai.com/docs/api-reference/threads) that was run.\n         */\n        thread_id: string;\n        /**\n         * The ID of the run to retrieve.\n         */\n        run_id: string;\n    };\n    query?: never;\n    url: '/threads/{thread_id}/runs/{run_id}';\n};\n\nexport type GetRunResponses = {\n    /**\n     * OK\n     */\n    200: RunObject;\n};\n\nexport type GetRunResponse = GetRunResponses[keyof GetRunResponses];\n\nexport type ModifyRunData = {\n    body: ModifyRunRequest;\n    path: {\n        /**\n         * The ID of the [thread](https://platform.openai.com/docs/api-reference/threads) that was run.\n         */\n        thread_id: string;\n        /**\n         * The ID of the run to modify.\n         */\n        run_id: string;\n    };\n    query?: never;\n    url: '/threads/{thread_id}/runs/{run_id}';\n};\n\nexport type ModifyRunResponses = {\n    /**\n     * OK\n     */\n    200: RunObject;\n};\n\nexport type ModifyRunResponse = ModifyRunResponses[keyof ModifyRunResponses];\n\nexport type CancelRunData = {\n    body?: never;\n    path: {\n        /**\n         * The ID of the thread to which this run belongs.\n         */\n        thread_id: string;\n        /**\n         * The ID of the run to cancel.\n         */\n        run_id: string;\n    };\n    query?: never;\n    url: '/threads/{thread_id}/runs/{run_id}/cancel';\n};\n\nexport type CancelRunResponses = {\n    /**\n     * OK\n     */\n    200: RunObject;\n};\n\nexport type CancelRunResponse = CancelRunResponses[keyof CancelRunResponses];\n\nexport type ListRunStepsData = {\n    body?: never;\n    path: {\n        /**\n         * The ID of the thread the run and run steps belong to.\n         */\n        thread_id: string;\n        /**\n         * The ID of the run the run steps belong to.\n         */\n        run_id: string;\n    };\n    query?: {\n        /**\n         * A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 20.\n         *\n         */\n        limit?: number;\n        /**\n         * Sort order by the `created_at` timestamp of the objects. `asc` for ascending order and `desc` for descending order.\n         *\n         */\n        order?: 'asc' | 'desc';\n        /**\n         * A cursor for use in pagination. `after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with obj_foo, your subsequent call can include after=obj_foo in order to fetch the next page of the list.\n         *\n         */\n        after?: string;\n        /**\n         * A cursor for use in pagination. `before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with obj_foo, your subsequent call can include before=obj_foo in order to fetch the previous page of the list.\n         *\n         */\n        before?: string;\n        /**\n         * A list of additional fields to include in the response. Currently the only supported value is `step_details.tool_calls[*].file_search.results[*].content` to fetch the file search result content.\n         *\n         * See the [file search tool documentation](https://platform.openai.com/docs/assistants/tools/file-search#customizing-file-search-settings) for more information.\n         *\n         */\n        'include[]'?: Array<'step_details.tool_calls[*].file_search.results[*].content'>;\n    };\n    url: '/threads/{thread_id}/runs/{run_id}/steps';\n};\n\nexport type ListRunStepsResponses = {\n    /**\n     * OK\n     */\n    200: ListRunStepsResponse;\n};\n\nexport type ListRunStepsResponse2 = ListRunStepsResponses[keyof ListRunStepsResponses];\n\nexport type GetRunStepData = {\n    body?: never;\n    path: {\n        /**\n         * The ID of the thread to which the run and run step belongs.\n         */\n        thread_id: string;\n        /**\n         * The ID of the run to which the run step belongs.\n         */\n        run_id: string;\n        /**\n         * The ID of the run step to retrieve.\n         */\n        step_id: string;\n    };\n    query?: {\n        /**\n         * A list of additional fields to include in the response. Currently the only supported value is `step_details.tool_calls[*].file_search.results[*].content` to fetch the file search result content.\n         *\n         * See the [file search tool documentation](https://platform.openai.com/docs/assistants/tools/file-search#customizing-file-search-settings) for more information.\n         *\n         */\n        'include[]'?: Array<'step_details.tool_calls[*].file_search.results[*].content'>;\n    };\n    url: '/threads/{thread_id}/runs/{run_id}/steps/{step_id}';\n};\n\nexport type GetRunStepResponses = {\n    /**\n     * OK\n     */\n    200: RunStepObject;\n};\n\nexport type GetRunStepResponse = GetRunStepResponses[keyof GetRunStepResponses];\n\nexport type SubmitToolOuputsToRunData = {\n    body: SubmitToolOutputsRunRequest;\n    path: {\n        /**\n         * The ID of the [thread](https://platform.openai.com/docs/api-reference/threads) to which this run belongs.\n         */\n        thread_id: string;\n        /**\n         * The ID of the run that requires the tool output submission.\n         */\n        run_id: string;\n    };\n    query?: never;\n    url: '/threads/{thread_id}/runs/{run_id}/submit_tool_outputs';\n};\n\nexport type SubmitToolOuputsToRunResponses = {\n    /**\n     * OK\n     */\n    200: RunObject;\n};\n\nexport type SubmitToolOuputsToRunResponse = SubmitToolOuputsToRunResponses[keyof SubmitToolOuputsToRunResponses];\n\nexport type CreateUploadData = {\n    body: CreateUploadRequest;\n    path?: never;\n    query?: never;\n    url: '/uploads';\n};\n\nexport type CreateUploadResponses = {\n    /**\n     * OK\n     */\n    200: Upload;\n};\n\nexport type CreateUploadResponse = CreateUploadResponses[keyof CreateUploadResponses];\n\nexport type CancelUploadData = {\n    body?: never;\n    path: {\n        /**\n         * The ID of the Upload.\n         *\n         */\n        upload_id: string;\n    };\n    query?: never;\n    url: '/uploads/{upload_id}/cancel';\n};\n\nexport type CancelUploadResponses = {\n    /**\n     * OK\n     */\n    200: Upload;\n};\n\nexport type CancelUploadResponse = CancelUploadResponses[keyof CancelUploadResponses];\n\nexport type CompleteUploadData = {\n    body: CompleteUploadRequest;\n    path: {\n        /**\n         * The ID of the Upload.\n         *\n         */\n        upload_id: string;\n    };\n    query?: never;\n    url: '/uploads/{upload_id}/complete';\n};\n\nexport type CompleteUploadResponses = {\n    /**\n     * OK\n     */\n    200: Upload;\n};\n\nexport type CompleteUploadResponse = CompleteUploadResponses[keyof CompleteUploadResponses];\n\nexport type AddUploadPartData = {\n    body: AddUploadPartRequest;\n    path: {\n        /**\n         * The ID of the Upload.\n         *\n         */\n        upload_id: string;\n    };\n    query?: never;\n    url: '/uploads/{upload_id}/parts';\n};\n\nexport type AddUploadPartResponses = {\n    /**\n     * OK\n     */\n    200: UploadPart;\n};\n\nexport type AddUploadPartResponse = AddUploadPartResponses[keyof AddUploadPartResponses];\n\nexport type ListVectorStoresData = {\n    body?: never;\n    path?: never;\n    query?: {\n        /**\n         * A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 20.\n         *\n         */\n        limit?: number;\n        /**\n         * Sort order by the `created_at` timestamp of the objects. `asc` for ascending order and `desc` for descending order.\n         *\n         */\n        order?: 'asc' | 'desc';\n        /**\n         * A cursor for use in pagination. `after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with obj_foo, your subsequent call can include after=obj_foo in order to fetch the next page of the list.\n         *\n         */\n        after?: string;\n        /**\n         * A cursor for use in pagination. `before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with obj_foo, your subsequent call can include before=obj_foo in order to fetch the previous page of the list.\n         *\n         */\n        before?: string;\n    };\n    url: '/vector_stores';\n};\n\nexport type ListVectorStoresResponses = {\n    /**\n     * OK\n     */\n    200: ListVectorStoresResponse;\n};\n\nexport type ListVectorStoresResponse2 = ListVectorStoresResponses[keyof ListVectorStoresResponses];\n\nexport type CreateVectorStoreData = {\n    body: CreateVectorStoreRequest;\n    path?: never;\n    query?: never;\n    url: '/vector_stores';\n};\n\nexport type CreateVectorStoreResponses = {\n    /**\n     * OK\n     */\n    200: VectorStoreObject;\n};\n\nexport type CreateVectorStoreResponse = CreateVectorStoreResponses[keyof CreateVectorStoreResponses];\n\nexport type DeleteVectorStoreData = {\n    body?: never;\n    path: {\n        /**\n         * The ID of the vector store to delete.\n         */\n        vector_store_id: string;\n    };\n    query?: never;\n    url: '/vector_stores/{vector_store_id}';\n};\n\nexport type DeleteVectorStoreResponses = {\n    /**\n     * OK\n     */\n    200: DeleteVectorStoreResponse;\n};\n\nexport type DeleteVectorStoreResponse2 = DeleteVectorStoreResponses[keyof DeleteVectorStoreResponses];\n\nexport type GetVectorStoreData = {\n    body?: never;\n    path: {\n        /**\n         * The ID of the vector store to retrieve.\n         */\n        vector_store_id: string;\n    };\n    query?: never;\n    url: '/vector_stores/{vector_store_id}';\n};\n\nexport type GetVectorStoreResponses = {\n    /**\n     * OK\n     */\n    200: VectorStoreObject;\n};\n\nexport type GetVectorStoreResponse = GetVectorStoreResponses[keyof GetVectorStoreResponses];\n\nexport type ModifyVectorStoreData = {\n    body: UpdateVectorStoreRequest;\n    path: {\n        /**\n         * The ID of the vector store to modify.\n         */\n        vector_store_id: string;\n    };\n    query?: never;\n    url: '/vector_stores/{vector_store_id}';\n};\n\nexport type ModifyVectorStoreResponses = {\n    /**\n     * OK\n     */\n    200: VectorStoreObject;\n};\n\nexport type ModifyVectorStoreResponse = ModifyVectorStoreResponses[keyof ModifyVectorStoreResponses];\n\nexport type CreateVectorStoreFileBatchData = {\n    body: CreateVectorStoreFileBatchRequest;\n    path: {\n        /**\n         * The ID of the vector store for which to create a File Batch.\n         *\n         */\n        vector_store_id: string;\n    };\n    query?: never;\n    url: '/vector_stores/{vector_store_id}/file_batches';\n};\n\nexport type CreateVectorStoreFileBatchResponses = {\n    /**\n     * OK\n     */\n    200: VectorStoreFileBatchObject;\n};\n\nexport type CreateVectorStoreFileBatchResponse = CreateVectorStoreFileBatchResponses[keyof CreateVectorStoreFileBatchResponses];\n\nexport type GetVectorStoreFileBatchData = {\n    body?: never;\n    path: {\n        /**\n         * The ID of the vector store that the file batch belongs to.\n         */\n        vector_store_id: string;\n        /**\n         * The ID of the file batch being retrieved.\n         */\n        batch_id: string;\n    };\n    query?: never;\n    url: '/vector_stores/{vector_store_id}/file_batches/{batch_id}';\n};\n\nexport type GetVectorStoreFileBatchResponses = {\n    /**\n     * OK\n     */\n    200: VectorStoreFileBatchObject;\n};\n\nexport type GetVectorStoreFileBatchResponse = GetVectorStoreFileBatchResponses[keyof GetVectorStoreFileBatchResponses];\n\nexport type CancelVectorStoreFileBatchData = {\n    body?: never;\n    path: {\n        /**\n         * The ID of the vector store that the file batch belongs to.\n         */\n        vector_store_id: string;\n        /**\n         * The ID of the file batch to cancel.\n         */\n        batch_id: string;\n    };\n    query?: never;\n    url: '/vector_stores/{vector_store_id}/file_batches/{batch_id}/cancel';\n};\n\nexport type CancelVectorStoreFileBatchResponses = {\n    /**\n     * OK\n     */\n    200: VectorStoreFileBatchObject;\n};\n\nexport type CancelVectorStoreFileBatchResponse = CancelVectorStoreFileBatchResponses[keyof CancelVectorStoreFileBatchResponses];\n\nexport type ListFilesInVectorStoreBatchData = {\n    body?: never;\n    path: {\n        /**\n         * The ID of the vector store that the files belong to.\n         */\n        vector_store_id: string;\n        /**\n         * The ID of the file batch that the files belong to.\n         */\n        batch_id: string;\n    };\n    query?: {\n        /**\n         * A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 20.\n         *\n         */\n        limit?: number;\n        /**\n         * Sort order by the `created_at` timestamp of the objects. `asc` for ascending order and `desc` for descending order.\n         *\n         */\n        order?: 'asc' | 'desc';\n        /**\n         * A cursor for use in pagination. `after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with obj_foo, your subsequent call can include after=obj_foo in order to fetch the next page of the list.\n         *\n         */\n        after?: string;\n        /**\n         * A cursor for use in pagination. `before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with obj_foo, your subsequent call can include before=obj_foo in order to fetch the previous page of the list.\n         *\n         */\n        before?: string;\n        /**\n         * Filter by file status. One of `in_progress`, `completed`, `failed`, `cancelled`.\n         */\n        filter?: 'in_progress' | 'completed' | 'failed' | 'cancelled';\n    };\n    url: '/vector_stores/{vector_store_id}/file_batches/{batch_id}/files';\n};\n\nexport type ListFilesInVectorStoreBatchResponses = {\n    /**\n     * OK\n     */\n    200: ListVectorStoreFilesResponse;\n};\n\nexport type ListFilesInVectorStoreBatchResponse = ListFilesInVectorStoreBatchResponses[keyof ListFilesInVectorStoreBatchResponses];\n\nexport type ListVectorStoreFilesData = {\n    body?: never;\n    path: {\n        /**\n         * The ID of the vector store that the files belong to.\n         */\n        vector_store_id: string;\n    };\n    query?: {\n        /**\n         * A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 20.\n         *\n         */\n        limit?: number;\n        /**\n         * Sort order by the `created_at` timestamp of the objects. `asc` for ascending order and `desc` for descending order.\n         *\n         */\n        order?: 'asc' | 'desc';\n        /**\n         * A cursor for use in pagination. `after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with obj_foo, your subsequent call can include after=obj_foo in order to fetch the next page of the list.\n         *\n         */\n        after?: string;\n        /**\n         * A cursor for use in pagination. `before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with obj_foo, your subsequent call can include before=obj_foo in order to fetch the previous page of the list.\n         *\n         */\n        before?: string;\n        /**\n         * Filter by file status. One of `in_progress`, `completed`, `failed`, `cancelled`.\n         */\n        filter?: 'in_progress' | 'completed' | 'failed' | 'cancelled';\n    };\n    url: '/vector_stores/{vector_store_id}/files';\n};\n\nexport type ListVectorStoreFilesResponses = {\n    /**\n     * OK\n     */\n    200: ListVectorStoreFilesResponse;\n};\n\nexport type ListVectorStoreFilesResponse2 = ListVectorStoreFilesResponses[keyof ListVectorStoreFilesResponses];\n\nexport type CreateVectorStoreFileData = {\n    body: CreateVectorStoreFileRequest;\n    path: {\n        /**\n         * The ID of the vector store for which to create a File.\n         *\n         */\n        vector_store_id: string;\n    };\n    query?: never;\n    url: '/vector_stores/{vector_store_id}/files';\n};\n\nexport type CreateVectorStoreFileResponses = {\n    /**\n     * OK\n     */\n    200: VectorStoreFileObject;\n};\n\nexport type CreateVectorStoreFileResponse = CreateVectorStoreFileResponses[keyof CreateVectorStoreFileResponses];\n\nexport type DeleteVectorStoreFileData = {\n    body?: never;\n    path: {\n        /**\n         * The ID of the vector store that the file belongs to.\n         */\n        vector_store_id: string;\n        /**\n         * The ID of the file to delete.\n         */\n        file_id: string;\n    };\n    query?: never;\n    url: '/vector_stores/{vector_store_id}/files/{file_id}';\n};\n\nexport type DeleteVectorStoreFileResponses = {\n    /**\n     * OK\n     */\n    200: DeleteVectorStoreFileResponse;\n};\n\nexport type DeleteVectorStoreFileResponse2 = DeleteVectorStoreFileResponses[keyof DeleteVectorStoreFileResponses];\n\nexport type GetVectorStoreFileData = {\n    body?: never;\n    path: {\n        /**\n         * The ID of the vector store that the file belongs to.\n         */\n        vector_store_id: string;\n        /**\n         * The ID of the file being retrieved.\n         */\n        file_id: string;\n    };\n    query?: never;\n    url: '/vector_stores/{vector_store_id}/files/{file_id}';\n};\n\nexport type GetVectorStoreFileResponses = {\n    /**\n     * OK\n     */\n    200: VectorStoreFileObject;\n};\n\nexport type GetVectorStoreFileResponse = GetVectorStoreFileResponses[keyof GetVectorStoreFileResponses];\n\nexport type UpdateVectorStoreFileAttributesData = {\n    body: UpdateVectorStoreFileAttributesRequest;\n    path: {\n        /**\n         * The ID of the vector store the file belongs to.\n         */\n        vector_store_id: string;\n        /**\n         * The ID of the file to update attributes.\n         */\n        file_id: string;\n    };\n    query?: never;\n    url: '/vector_stores/{vector_store_id}/files/{file_id}';\n};\n\nexport type UpdateVectorStoreFileAttributesResponses = {\n    /**\n     * OK\n     */\n    200: VectorStoreFileObject;\n};\n\nexport type UpdateVectorStoreFileAttributesResponse = UpdateVectorStoreFileAttributesResponses[keyof UpdateVectorStoreFileAttributesResponses];\n\nexport type RetrieveVectorStoreFileContentData = {\n    body?: never;\n    path: {\n        /**\n         * The ID of the vector store.\n         */\n        vector_store_id: string;\n        /**\n         * The ID of the file within the vector store.\n         */\n        file_id: string;\n    };\n    query?: never;\n    url: '/vector_stores/{vector_store_id}/files/{file_id}/content';\n};\n\nexport type RetrieveVectorStoreFileContentResponses = {\n    /**\n     * OK\n     */\n    200: VectorStoreFileContentResponse;\n};\n\nexport type RetrieveVectorStoreFileContentResponse = RetrieveVectorStoreFileContentResponses[keyof RetrieveVectorStoreFileContentResponses];\n\nexport type SearchVectorStoreData = {\n    body: VectorStoreSearchRequest;\n    path: {\n        /**\n         * The ID of the vector store to search.\n         */\n        vector_store_id: string;\n    };\n    query?: never;\n    url: '/vector_stores/{vector_store_id}/search';\n};\n\nexport type SearchVectorStoreResponses = {\n    /**\n     * OK\n     */\n    200: VectorStoreSearchResultsPage;\n};\n\nexport type SearchVectorStoreResponse = SearchVectorStoreResponses[keyof SearchVectorStoreResponses];\n\n/**\n * The event payload sent by the API.\n */\nexport type PostBatchCancelledWebhookPayload = WebhookBatchCancelled;\n\nexport type PostBatchCancelledWebhookRequest = {\n    body: PostBatchCancelledWebhookPayload;\n    key: 'batch_cancelled';\n    path?: never;\n    query?: never;\n};\n\n/**\n * The event payload sent by the API.\n */\nexport type PostBatchCompletedWebhookPayload = WebhookBatchCompleted;\n\nexport type PostBatchCompletedWebhookRequest = {\n    body: PostBatchCompletedWebhookPayload;\n    key: 'batch_completed';\n    path?: never;\n    query?: never;\n};\n\n/**\n * The event payload sent by the API.\n */\nexport type PostBatchExpiredWebhookPayload = WebhookBatchExpired;\n\nexport type PostBatchExpiredWebhookRequest = {\n    body: PostBatchExpiredWebhookPayload;\n    key: 'batch_expired';\n    path?: never;\n    query?: never;\n};\n\n/**\n * The event payload sent by the API.\n */\nexport type PostBatchFailedWebhookPayload = WebhookBatchFailed;\n\nexport type PostBatchFailedWebhookRequest = {\n    body: PostBatchFailedWebhookPayload;\n    key: 'batch_failed';\n    path?: never;\n    query?: never;\n};\n\n/**\n * The event payload sent by the API.\n */\nexport type PostEvalRunCanceledWebhookPayload = WebhookEvalRunCanceled;\n\nexport type PostEvalRunCanceledWebhookRequest = {\n    body: PostEvalRunCanceledWebhookPayload;\n    key: 'eval_run_canceled';\n    path?: never;\n    query?: never;\n};\n\n/**\n * The event payload sent by the API.\n */\nexport type PostEvalRunFailedWebhookPayload = WebhookEvalRunFailed;\n\nexport type PostEvalRunFailedWebhookRequest = {\n    body: PostEvalRunFailedWebhookPayload;\n    key: 'eval_run_failed';\n    path?: never;\n    query?: never;\n};\n\n/**\n * The event payload sent by the API.\n */\nexport type PostEvalRunSucceededWebhookPayload = WebhookEvalRunSucceeded;\n\nexport type PostEvalRunSucceededWebhookRequest = {\n    body: PostEvalRunSucceededWebhookPayload;\n    key: 'eval_run_succeeded';\n    path?: never;\n    query?: never;\n};\n\n/**\n * The event payload sent by the API.\n */\nexport type PostFineTuningJobCancelledWebhookPayload = WebhookFineTuningJobCancelled;\n\nexport type PostFineTuningJobCancelledWebhookRequest = {\n    body: PostFineTuningJobCancelledWebhookPayload;\n    key: 'fine_tuning_job_cancelled';\n    path?: never;\n    query?: never;\n};\n\n/**\n * The event payload sent by the API.\n */\nexport type PostFineTuningJobFailedWebhookPayload = WebhookFineTuningJobFailed;\n\nexport type PostFineTuningJobFailedWebhookRequest = {\n    body: PostFineTuningJobFailedWebhookPayload;\n    key: 'fine_tuning_job_failed';\n    path?: never;\n    query?: never;\n};\n\n/**\n * The event payload sent by the API.\n */\nexport type PostFineTuningJobSucceededWebhookPayload = WebhookFineTuningJobSucceeded;\n\nexport type PostFineTuningJobSucceededWebhookRequest = {\n    body: PostFineTuningJobSucceededWebhookPayload;\n    key: 'fine_tuning_job_succeeded';\n    path?: never;\n    query?: never;\n};\n\n/**\n * The event payload sent by the API.\n */\nexport type PostResponseCancelledWebhookPayload = WebhookResponseCancelled;\n\nexport type PostResponseCancelledWebhookRequest = {\n    body: PostResponseCancelledWebhookPayload;\n    key: 'response_cancelled';\n    path?: never;\n    query?: never;\n};\n\n/**\n * The event payload sent by the API.\n */\nexport type PostResponseCompletedWebhookPayload = WebhookResponseCompleted;\n\nexport type PostResponseCompletedWebhookRequest = {\n    body: PostResponseCompletedWebhookPayload;\n    key: 'response_completed';\n    path?: never;\n    query?: never;\n};\n\n/**\n * The event payload sent by the API.\n */\nexport type PostResponseFailedWebhookPayload = WebhookResponseFailed;\n\nexport type PostResponseFailedWebhookRequest = {\n    body: PostResponseFailedWebhookPayload;\n    key: 'response_failed';\n    path?: never;\n    query?: never;\n};\n\n/**\n * The event payload sent by the API.\n */\nexport type PostResponseIncompleteWebhookPayload = WebhookResponseIncomplete;\n\nexport type PostResponseIncompleteWebhookRequest = {\n    body: PostResponseIncompleteWebhookPayload;\n    key: 'response_incomplete';\n    path?: never;\n    query?: never;\n};\n"
  },
  {
    "path": "examples/openapi-ts-openai/src/main.tsx",
    "content": "import '@radix-ui/themes/styles.css';\n\nimport { Theme } from '@radix-ui/themes';\nimport React from 'react';\nimport ReactDOM from 'react-dom/client';\n\nimport App from './App.tsx';\n\nReactDOM.createRoot(document.getElementById('root')!).render(\n  <React.StrictMode>\n    <Theme appearance=\"dark\">\n      <App />\n    </Theme>\n  </React.StrictMode>,\n);\n"
  },
  {
    "path": "examples/openapi-ts-openai/src/vite-env.d.ts",
    "content": "/// <reference types=\"vite/client\" />\n"
  },
  {
    "path": "examples/openapi-ts-openai/tailwind.config.js",
    "content": "/** @type {import('tailwindcss').Config} */\nexport default {\n  content: ['./index.html', './src/**/*.{html,js,ts,jsx,tsx}'],\n  theme: {\n    extend: {},\n  },\n};\n"
  },
  {
    "path": "examples/openapi-ts-openai/tsconfig.json",
    "content": "{\n  \"compilerOptions\": {\n    \"target\": \"ES2020\",\n    \"useDefineForClassFields\": true,\n    \"lib\": [\"ES2020\", \"DOM\", \"DOM.Iterable\"],\n    \"module\": \"ESNext\",\n    \"skipLibCheck\": true,\n\n    /* Bundler mode */\n    \"moduleResolution\": \"bundler\",\n    \"allowImportingTsExtensions\": true,\n    \"resolveJsonModule\": true,\n    \"isolatedModules\": true,\n    \"noEmit\": true,\n    \"jsx\": \"react-jsx\",\n\n    /* Linting */\n    \"strict\": true,\n    \"noUnusedLocals\": true,\n    \"noUnusedParameters\": false,\n    \"noFallthroughCasesInSwitch\": true\n  },\n  \"include\": [\"src\"],\n  \"references\": [{ \"path\": \"./tsconfig.node.json\" }]\n}\n"
  },
  {
    "path": "examples/openapi-ts-openai/tsconfig.node.json",
    "content": "{\n  \"compilerOptions\": {\n    \"composite\": true,\n    \"skipLibCheck\": true,\n    \"module\": \"ESNext\",\n    \"moduleResolution\": \"bundler\",\n    \"allowSyntheticDefaultImports\": true,\n    \"strict\": true\n  },\n  \"include\": [\"vite.config.ts\"]\n}\n"
  },
  {
    "path": "examples/openapi-ts-openai/vite.config.ts",
    "content": "import react from '@vitejs/plugin-react';\n\n/** @type {import('vite').UserConfig} */\nexport default {\n  build: {\n    sourcemap: true,\n    target: 'esnext',\n  },\n  esbuild: {\n    target: 'esnext',\n  },\n  optimizeDeps: {\n    esbuildOptions: {\n      target: 'esnext',\n    },\n  },\n  plugins: [react()],\n};\n"
  },
  {
    "path": "examples/openapi-ts-pinia-colada/.eslintrc.cjs",
    "content": "/* eslint-env node */\nrequire('@rushstack/eslint-patch/modern-module-resolution');\n\nmodule.exports = {\n  extends: ['plugin:vue/vue3-essential', 'eslint:recommended', '@vue/eslint-config-typescript'],\n  files: ['**/*.{vue,js,jsx,cjs,mjs,ts,tsx,cts,mts}'],\n  parserOptions: {\n    ecmaVersion: 'latest',\n  },\n};\n"
  },
  {
    "path": "examples/openapi-ts-pinia-colada/.gitignore",
    "content": "# Logs\nlogs\n*.log\nnpm-debug.log*\nyarn-debug.log*\nyarn-error.log*\npnpm-debug.log*\nlerna-debug.log*\n\nnode_modules\n.DS_Store\ndist\ndist-ssr\ncoverage\n*.local\n\n/cypress/videos/\n/cypress/screenshots/\n\n# Editor directories and files\n.vscode/*\n!.vscode/extensions.json\n.idea\n*.suo\n*.ntvs*\n*.njsproj\n*.sln\n*.sw?\n\n*.tsbuildinfo\n"
  },
  {
    "path": "examples/openapi-ts-pinia-colada/.vscode/extensions.json",
    "content": "{\n  \"recommendations\": [\"Vue.volar\", \"dbaeumer.vscode-eslint\", \"oxc.oxc-vscode\"]\n}\n"
  },
  {
    "path": "examples/openapi-ts-pinia-colada/README.md",
    "content": "# @hey-api/openapi-ts with Pinia Colada Example\n\nThis example demonstrates how to use @hey-api/openapi-ts with Pinia Colada for Vue 3 applications.\n\n## Recommended IDE Setup\n\n[VSCode](https://code.visualstudio.com) + [Volar](https://marketplace.visualstudio.com/items?itemName=Vue.volar) (and disable Vetur).\n\n## Type Support for `.vue` Imports in TS\n\nTypeScript cannot handle type information for `.vue` imports by default, so we replace the `tsc` CLI with `vue-tsc` for type checking. In editors, we need [Volar](https://marketplace.visualstudio.com/items?itemName=Vue.volar) to make the TypeScript language service aware of `.vue` types.\n\n## Customize configuration\n\nSee [Vite Configuration Reference](https://vitejs.dev/config).\n\n## Project Setup\n\n```sh\npnpm install\n```\n\n### Compile and Hot-Reload for Development\n\n```sh\npnpm dev\n```\n\n### Type-Check, Compile and Minify for Production\n\n```sh\npnpm build\n```\n\n### Run Unit Tests with [Vitest](https://vitest.dev)\n\n```sh\npnpm test:unit\n```\n\n### Lint with [ESLint](https://eslint.org)\n\n```sh\npnpm lint\n```\n"
  },
  {
    "path": "examples/openapi-ts-pinia-colada/env.d.ts",
    "content": "/// <reference types=\"vite/client\" />\n"
  },
  {
    "path": "examples/openapi-ts-pinia-colada/index.html",
    "content": "<!doctype html>\n<html lang=\"en\">\n  <head>\n    <meta charset=\"UTF-8\" />\n    <link rel=\"icon\" href=\"/favicon.ico\" />\n    <meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\" />\n    <title>Hey API + Pinia Colada Demo</title>\n  </head>\n  <body>\n    <div id=\"app\"></div>\n    <script type=\"module\" src=\"/src/main.ts\"></script>\n  </body>\n</html>\n"
  },
  {
    "path": "examples/openapi-ts-pinia-colada/openapi-ts.config.ts",
    "content": "import { defineConfig } from '@hey-api/openapi-ts';\n\nexport default defineConfig({\n  input:\n    'https://raw.githubusercontent.com/swagger-api/swagger-petstore/master/src/main/resources/openapi.yaml',\n  logs: {\n    path: './logs',\n  },\n  output: {\n    path: './src/client',\n    postProcess: ['oxfmt', 'eslint'],\n  },\n  plugins: [\n    '@hey-api/client-fetch',\n    '@hey-api/schemas',\n    '@hey-api/sdk',\n    {\n      enums: 'javascript',\n      name: '@hey-api/typescript',\n    },\n    {\n      includeInEntry: true,\n      name: '@pinia/colada',\n      queryKeys: false,\n    },\n  ],\n});\n"
  },
  {
    "path": "examples/openapi-ts-pinia-colada/package.json",
    "content": "{\n  \"name\": \"@example/openapi-ts-pinia-colada\",\n  \"version\": \"0.0.0\",\n  \"private\": true,\n  \"type\": \"module\",\n  \"scripts\": {\n    \"build-only\": \"vite build\",\n    \"build\": \"run-p typecheck \\\"build-only {@}\\\" --\",\n    \"dev\": \"vite\",\n    \"format\": \"oxfmt src/\",\n    \"lint\": \"eslint . --fix\",\n    \"openapi-ts\": \"openapi-ts\",\n    \"preview\": \"vite preview\",\n    \"test:unit\": \"vitest\",\n    \"typecheck\": \"vue-tsc --build --force\"\n  },\n  \"dependencies\": {\n    \"@pinia/colada\": \"0.17.5\",\n    \"pinia\": \"3.0.3\",\n    \"vue\": \"3.5.13\",\n    \"vue-router\": \"4.5.0\"\n  },\n  \"devDependencies\": {\n    \"@hey-api/openapi-ts\": \"workspace:*\",\n    \"@pinia/colada-devtools\": \"0.1.6\",\n    \"@rushstack/eslint-patch\": \"1.10.5\",\n    \"@tsconfig/node24\": \"24.0.4\",\n    \"@types/jsdom\": \"27.0.0\",\n    \"@types/node\": \"24.10.10\",\n    \"@vitejs/plugin-vue\": \"6.0.4\",\n    \"@vitejs/plugin-vue-jsx\": \"5.1.4\",\n    \"@vue/eslint-config-typescript\": \"14.6.0\",\n    \"@vue/test-utils\": \"2.4.6\",\n    \"@vue/tsconfig\": \"0.8.1\",\n    \"autoprefixer\": \"10.4.20\",\n    \"eslint\": \"9.17.0\",\n    \"eslint-plugin-vue\": \"9.32.0\",\n    \"jsdom\": \"28.0.0\",\n    \"npm-run-all2\": \"6.2.0\",\n    \"oxfmt\": \"0.27.0\",\n    \"postcss\": \"8.4.41\",\n    \"tailwindcss\": \"3.4.9\",\n    \"typescript\": \"5.9.3\",\n    \"vite\": \"7.3.1\",\n    \"vite-plugin-vue-devtools\": \"8.0.2\",\n    \"vitest\": \"4.0.18\",\n    \"vue-tsc\": \"3.2.4\"\n  }\n}\n"
  },
  {
    "path": "examples/openapi-ts-pinia-colada/postcss.config.js",
    "content": "export default {\n  plugins: {\n    autoprefixer: {},\n    tailwindcss: {},\n  },\n};\n"
  },
  {
    "path": "examples/openapi-ts-pinia-colada/src/App.vue",
    "content": "<script setup lang=\"ts\">\nimport { RouterView } from 'vue-router';\n</script>\n\n<template>\n  <div>\n    <RouterView />\n  </div>\n</template>\n"
  },
  {
    "path": "examples/openapi-ts-pinia-colada/src/assets/main.css",
    "content": "@tailwind base;\n@tailwind components;\n@tailwind utilities;\n\nbody {\n  @apply bg-[#111113];\n}\n"
  },
  {
    "path": "examples/openapi-ts-pinia-colada/src/client/@pinia/colada.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport { type _JSONValue, defineQueryOptions, type UseMutationOptions } from '@pinia/colada';\n\nimport { serializeQueryKeyValue } from '../client';\nimport { client } from '../client.gen';\nimport {\n  addPet,\n  createUser,\n  createUsersWithListInput,\n  deleteOrder,\n  deletePet,\n  deleteUser,\n  findPetsByStatus,\n  findPetsByTags,\n  getInventory,\n  getOrderById,\n  getPetById,\n  getUserByName,\n  loginUser,\n  logoutUser,\n  type Options,\n  placeOrder,\n  updatePet,\n  updatePetWithForm,\n  updateUser,\n  uploadFile,\n} from '../sdk.gen';\nimport type {\n  AddPetData,\n  AddPetResponse,\n  CreateUserData,\n  CreateUserResponse,\n  CreateUsersWithListInputData,\n  CreateUsersWithListInputResponse,\n  DeleteOrderData,\n  DeletePetData,\n  DeleteUserData,\n  FindPetsByStatusData,\n  FindPetsByStatusResponse,\n  FindPetsByTagsData,\n  FindPetsByTagsResponse,\n  GetInventoryData,\n  GetInventoryResponse,\n  GetOrderByIdData,\n  GetOrderByIdResponse,\n  GetPetByIdData,\n  GetPetByIdResponse,\n  GetUserByNameData,\n  GetUserByNameResponse,\n  LoginUserData,\n  LoginUserResponse,\n  LogoutUserData,\n  PlaceOrderData,\n  PlaceOrderResponse,\n  UpdatePetData,\n  UpdatePetResponse,\n  UpdatePetWithFormData,\n  UpdatePetWithFormResponse,\n  UpdateUserData,\n  UploadFileData,\n  UploadFileResponse,\n} from '../types.gen';\n\n/**\n * Add a new pet to the store.\n *\n * Add a new pet to the store.\n */\nexport const addPetMutation = (\n  options?: Partial<Options<AddPetData>>,\n): UseMutationOptions<AddPetResponse, Options<AddPetData>, Error> => ({\n  mutation: async (vars) => {\n    const { data } = await addPet({\n      ...options,\n      ...vars,\n      throwOnError: true,\n    });\n    return data;\n  },\n});\n\n/**\n * Update an existing pet.\n *\n * Update an existing pet by Id.\n */\nexport const updatePetMutation = (\n  options?: Partial<Options<UpdatePetData>>,\n): UseMutationOptions<UpdatePetResponse, Options<UpdatePetData>, Error> => ({\n  mutation: async (vars) => {\n    const { data } = await updatePet({\n      ...options,\n      ...vars,\n      throwOnError: true,\n    });\n    return data;\n  },\n});\n\nexport type QueryKey<TOptions extends Options> = [\n  Pick<TOptions, 'path'> & {\n    _id: string;\n    baseUrl?: _JSONValue;\n    body?: _JSONValue;\n    query?: _JSONValue;\n    tags?: _JSONValue;\n  },\n];\n\nconst createQueryKey = <TOptions extends Options>(\n  id: string,\n  options?: TOptions,\n  tags?: ReadonlyArray<string>,\n): [QueryKey<TOptions>[0]] => {\n  const params: QueryKey<TOptions>[0] = {\n    _id: id,\n    baseUrl: options?.baseUrl || (options?.client ?? client).getConfig().baseUrl,\n  } as QueryKey<TOptions>[0];\n  if (tags) {\n    params.tags = tags as unknown as _JSONValue;\n  }\n  if (options?.body !== undefined) {\n    const normalizedBody = serializeQueryKeyValue(options.body);\n    if (normalizedBody !== undefined) {\n      params.body = normalizedBody;\n    }\n  }\n  if (options?.path) {\n    params.path = options.path;\n  }\n  if (options?.query !== undefined) {\n    const normalizedQuery = serializeQueryKeyValue(options.query);\n    if (normalizedQuery !== undefined) {\n      params.query = normalizedQuery;\n    }\n  }\n  return [params];\n};\n\n/**\n * Finds Pets by status.\n *\n * Multiple status values can be provided with comma separated strings.\n */\nexport const findPetsByStatusQuery = defineQueryOptions<\n  Options<FindPetsByStatusData>,\n  FindPetsByStatusResponse,\n  Error\n>((options: Options<FindPetsByStatusData>) => ({\n  key: createQueryKey('findPetsByStatus', options),\n  query: async (context) => {\n    const { data } = await findPetsByStatus({\n      ...options,\n      ...context,\n      throwOnError: true,\n    });\n    return data;\n  },\n}));\n\n/**\n * Finds Pets by tags.\n *\n * Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.\n */\nexport const findPetsByTagsQuery = defineQueryOptions<\n  Options<FindPetsByTagsData>,\n  FindPetsByTagsResponse,\n  Error\n>((options: Options<FindPetsByTagsData>) => ({\n  key: createQueryKey('findPetsByTags', options),\n  query: async (context) => {\n    const { data } = await findPetsByTags({\n      ...options,\n      ...context,\n      throwOnError: true,\n    });\n    return data;\n  },\n}));\n\n/**\n * Deletes a pet.\n *\n * Delete a pet.\n */\nexport const deletePetMutation = (\n  options?: Partial<Options<DeletePetData>>,\n): UseMutationOptions<unknown, Options<DeletePetData>, Error> => ({\n  mutation: async (vars) => {\n    const { data } = await deletePet({\n      ...options,\n      ...vars,\n      throwOnError: true,\n    });\n    return data;\n  },\n});\n\n/**\n * Find pet by ID.\n *\n * Returns a single pet.\n */\nexport const getPetByIdQuery = defineQueryOptions<\n  Options<GetPetByIdData>,\n  GetPetByIdResponse,\n  Error\n>((options: Options<GetPetByIdData>) => ({\n  key: createQueryKey('getPetById', options),\n  query: async (context) => {\n    const { data } = await getPetById({\n      ...options,\n      ...context,\n      throwOnError: true,\n    });\n    return data;\n  },\n}));\n\n/**\n * Updates a pet in the store with form data.\n *\n * Updates a pet resource based on the form data.\n */\nexport const updatePetWithFormMutation = (\n  options?: Partial<Options<UpdatePetWithFormData>>,\n): UseMutationOptions<UpdatePetWithFormResponse, Options<UpdatePetWithFormData>, Error> => ({\n  mutation: async (vars) => {\n    const { data } = await updatePetWithForm({\n      ...options,\n      ...vars,\n      throwOnError: true,\n    });\n    return data;\n  },\n});\n\n/**\n * Uploads an image.\n *\n * Upload image of the pet.\n */\nexport const uploadFileMutation = (\n  options?: Partial<Options<UploadFileData>>,\n): UseMutationOptions<UploadFileResponse, Options<UploadFileData>, Error> => ({\n  mutation: async (vars) => {\n    const { data } = await uploadFile({\n      ...options,\n      ...vars,\n      throwOnError: true,\n    });\n    return data;\n  },\n});\n\n/**\n * Returns pet inventories by status.\n *\n * Returns a map of status codes to quantities.\n */\nexport const getInventoryQuery = defineQueryOptions<\n  Options<GetInventoryData>,\n  GetInventoryResponse,\n  Error\n>((options?: Options<GetInventoryData>) => ({\n  key: createQueryKey('getInventory', options),\n  query: async (context) => {\n    const { data } = await getInventory({\n      ...options,\n      ...context,\n      throwOnError: true,\n    });\n    return data;\n  },\n}));\n\n/**\n * Place an order for a pet.\n *\n * Place a new order in the store.\n */\nexport const placeOrderMutation = (\n  options?: Partial<Options<PlaceOrderData>>,\n): UseMutationOptions<PlaceOrderResponse, Options<PlaceOrderData>, Error> => ({\n  mutation: async (vars) => {\n    const { data } = await placeOrder({\n      ...options,\n      ...vars,\n      throwOnError: true,\n    });\n    return data;\n  },\n});\n\n/**\n * Delete purchase order by identifier.\n *\n * For valid response try integer IDs with value < 1000. Anything above 1000 or non-integers will generate API errors.\n */\nexport const deleteOrderMutation = (\n  options?: Partial<Options<DeleteOrderData>>,\n): UseMutationOptions<unknown, Options<DeleteOrderData>, Error> => ({\n  mutation: async (vars) => {\n    const { data } = await deleteOrder({\n      ...options,\n      ...vars,\n      throwOnError: true,\n    });\n    return data;\n  },\n});\n\n/**\n * Find purchase order by ID.\n *\n * For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions.\n */\nexport const getOrderByIdQuery = defineQueryOptions<\n  Options<GetOrderByIdData>,\n  GetOrderByIdResponse,\n  Error\n>((options: Options<GetOrderByIdData>) => ({\n  key: createQueryKey('getOrderById', options),\n  query: async (context) => {\n    const { data } = await getOrderById({\n      ...options,\n      ...context,\n      throwOnError: true,\n    });\n    return data;\n  },\n}));\n\n/**\n * Create user.\n *\n * This can only be done by the logged in user.\n */\nexport const createUserMutation = (\n  options?: Partial<Options<CreateUserData>>,\n): UseMutationOptions<CreateUserResponse, Options<CreateUserData>, Error> => ({\n  mutation: async (vars) => {\n    const { data } = await createUser({\n      ...options,\n      ...vars,\n      throwOnError: true,\n    });\n    return data;\n  },\n});\n\n/**\n * Creates list of users with given input array.\n *\n * Creates list of users with given input array.\n */\nexport const createUsersWithListInputMutation = (\n  options?: Partial<Options<CreateUsersWithListInputData>>,\n): UseMutationOptions<\n  CreateUsersWithListInputResponse,\n  Options<CreateUsersWithListInputData>,\n  Error\n> => ({\n  mutation: async (vars) => {\n    const { data } = await createUsersWithListInput({\n      ...options,\n      ...vars,\n      throwOnError: true,\n    });\n    return data;\n  },\n});\n\n/**\n * Logs user into the system.\n *\n * Log into the system.\n */\nexport const loginUserQuery = defineQueryOptions<Options<LoginUserData>, LoginUserResponse, Error>(\n  (options?: Options<LoginUserData>) => ({\n    key: createQueryKey('loginUser', options),\n    query: async (context) => {\n      const { data } = await loginUser({\n        ...options,\n        ...context,\n        throwOnError: true,\n      });\n      return data;\n    },\n  }),\n);\n\n/**\n * Logs out current logged in user session.\n *\n * Log user out of the system.\n */\nexport const logoutUserQuery = defineQueryOptions<Options<LogoutUserData>, unknown, Error>(\n  (options?: Options<LogoutUserData>) => ({\n    key: createQueryKey('logoutUser', options),\n    query: async (context) => {\n      const { data } = await logoutUser({\n        ...options,\n        ...context,\n        throwOnError: true,\n      });\n      return data;\n    },\n  }),\n);\n\n/**\n * Delete user resource.\n *\n * This can only be done by the logged in user.\n */\nexport const deleteUserMutation = (\n  options?: Partial<Options<DeleteUserData>>,\n): UseMutationOptions<unknown, Options<DeleteUserData>, Error> => ({\n  mutation: async (vars) => {\n    const { data } = await deleteUser({\n      ...options,\n      ...vars,\n      throwOnError: true,\n    });\n    return data;\n  },\n});\n\n/**\n * Get user by user name.\n *\n * Get user detail based on username.\n */\nexport const getUserByNameQuery = defineQueryOptions<\n  Options<GetUserByNameData>,\n  GetUserByNameResponse,\n  Error\n>((options: Options<GetUserByNameData>) => ({\n  key: createQueryKey('getUserByName', options),\n  query: async (context) => {\n    const { data } = await getUserByName({\n      ...options,\n      ...context,\n      throwOnError: true,\n    });\n    return data;\n  },\n}));\n\n/**\n * Update user resource.\n *\n * This can only be done by the logged in user.\n */\nexport const updateUserMutation = (\n  options?: Partial<Options<UpdateUserData>>,\n): UseMutationOptions<unknown, Options<UpdateUserData>, Error> => ({\n  mutation: async (vars) => {\n    const { data } = await updateUser({\n      ...options,\n      ...vars,\n      throwOnError: true,\n    });\n    return data;\n  },\n});\n"
  },
  {
    "path": "examples/openapi-ts-pinia-colada/src/client/client/client.gen.ts",
    "content": "// 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 (options: RequestOptions) => {\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 url = buildUrl(opts);\n\n    return { opts, url };\n  };\n\n  const request: Client['request'] = async (options) => {\n    // @ts-expect-error\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"
  },
  {
    "path": "examples/openapi-ts-pinia-colada/src/client/client/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type { Auth } from '../core/auth.gen';\nexport type { QuerySerializerOptions } from '../core/bodySerializer.gen';\nexport {\n  formDataBodySerializer,\n  jsonBodySerializer,\n  urlSearchParamsBodySerializer,\n} from '../core/bodySerializer.gen';\nexport { buildClientParams } from '../core/params.gen';\nexport { serializeQueryKeyValue } from '../core/queryKeySerializer.gen';\nexport { createClient } from './client.gen';\nexport type {\n  Client,\n  ClientOptions,\n  Config,\n  CreateClientConfig,\n  Options,\n  RequestOptions,\n  RequestResult,\n  ResolvedRequestOptions,\n  ResponseStyle,\n  TDataShape,\n} from './types.gen';\nexport { createConfig, mergeHeaders } from './utils.gen';\n"
  },
  {
    "path": "examples/openapi-ts-pinia-colada/src/client/client/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { Auth } from '../core/auth.gen';\nimport type { ServerSentEventsOptions, ServerSentEventsResult } from '../core/serverSentEvents.gen';\nimport type { Client as CoreClient, Config as CoreConfig } from '../core/types.gen';\nimport type { Middleware } from './utils.gen';\n\nexport type ResponseStyle = 'data' | 'fields';\n\nexport interface Config<T extends ClientOptions = ClientOptions>\n  extends Omit<RequestInit, 'body' | 'headers' | 'method'>, CoreConfig {\n  /**\n   * Base URL for all requests made by this client.\n   */\n  baseUrl?: T['baseUrl'];\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   * Please don't use the Fetch client for Next.js applications. The `next`\n   * options won't have any effect.\n   *\n   * Install {@link https://www.npmjs.com/package/@hey-api/client-next `@hey-api/client-next`} instead.\n   */\n  next?: never;\n  /**\n   * Return the response data parsed in a specified format. By default, `auto`\n   * will infer the appropriate method from the `Content-Type` response header.\n   * You can override this behavior with any of the {@link Body} methods.\n   * Select `stream` if you don't want to parse response data at all.\n   *\n   * @default 'auto'\n   */\n  parseAs?: 'arrayBuffer' | 'auto' | 'blob' | 'formData' | 'json' | 'stream' | 'text';\n  /**\n   * Should we return only data or multiple fields (data, error, response, etc.)?\n   *\n   * @default 'fields'\n   */\n  responseStyle?: ResponseStyle;\n  /**\n   * Throw an error instead of returning it in the response?\n   *\n   * @default false\n   */\n  throwOnError?: T['throwOnError'];\n}\n\nexport interface RequestOptions<\n  TData = unknown,\n  TResponseStyle extends ResponseStyle = 'fields',\n  ThrowOnError extends boolean = boolean,\n  Url extends string = string,\n>\n  extends\n    Config<{\n      responseStyle: TResponseStyle;\n      throwOnError: ThrowOnError;\n    }>,\n    Pick<\n      ServerSentEventsOptions<TData>,\n      | 'onRequest'\n      | 'onSseError'\n      | 'onSseEvent'\n      | 'sseDefaultRetryDelay'\n      | 'sseMaxRetryAttempts'\n      | 'sseMaxRetryDelay'\n    > {\n  /**\n   * Any body that you want to add to your request.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/fetch#body}\n   */\n  body?: unknown;\n  path?: Record<string, unknown>;\n  query?: Record<string, unknown>;\n  /**\n   * Security mechanism(s) to use for the request.\n   */\n  security?: ReadonlyArray<Auth>;\n  url: Url;\n}\n\nexport interface ResolvedRequestOptions<\n  TResponseStyle extends ResponseStyle = 'fields',\n  ThrowOnError extends boolean = boolean,\n  Url extends string = string,\n> extends RequestOptions<unknown, TResponseStyle, ThrowOnError, Url> {\n  serializedBody?: string;\n}\n\nexport type RequestResult<\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = boolean,\n  TResponseStyle extends ResponseStyle = 'fields',\n> = ThrowOnError extends true\n  ? Promise<\n      TResponseStyle extends 'data'\n        ? TData extends Record<string, unknown>\n          ? TData[keyof TData]\n          : TData\n        : {\n            data: TData extends Record<string, unknown> ? TData[keyof TData] : TData;\n            request: Request;\n            response: Response;\n          }\n    >\n  : Promise<\n      TResponseStyle extends 'data'\n        ? (TData extends Record<string, unknown> ? TData[keyof TData] : TData) | undefined\n        : (\n            | {\n                data: TData extends Record<string, unknown> ? TData[keyof TData] : TData;\n                error: undefined;\n              }\n            | {\n                data: undefined;\n                error: TError extends Record<string, unknown> ? TError[keyof TError] : TError;\n              }\n          ) & {\n            request: Request;\n            response: Response;\n          }\n    >;\n\nexport interface ClientOptions {\n  baseUrl?: string;\n  responseStyle?: ResponseStyle;\n  throwOnError?: boolean;\n}\n\ntype MethodFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'>,\n) => RequestResult<TData, TError, ThrowOnError, TResponseStyle>;\n\ntype SseFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'>,\n) => Promise<ServerSentEventsResult<TData, TError>>;\n\ntype RequestFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'> &\n    Pick<Required<RequestOptions<TData, TResponseStyle, ThrowOnError>>, 'method'>,\n) => RequestResult<TData, TError, ThrowOnError, TResponseStyle>;\n\ntype BuildUrlFn = <\n  TData extends {\n    body?: unknown;\n    path?: Record<string, unknown>;\n    query?: Record<string, unknown>;\n    url: string;\n  },\n>(\n  options: TData & Options<TData>,\n) => string;\n\nexport type Client = CoreClient<RequestFn, Config, MethodFn, BuildUrlFn, SseFn> & {\n  interceptors: Middleware<Request, Response, unknown, ResolvedRequestOptions>;\n};\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 = ClientOptions> = (\n  override?: Config<ClientOptions & T>,\n) => Config<Required<ClientOptions> & T>;\n\nexport interface TDataShape {\n  body?: unknown;\n  headers?: unknown;\n  path?: unknown;\n  query?: unknown;\n  url: string;\n}\n\ntype OmitKeys<T, K> = Pick<T, Exclude<keyof T, K>>;\n\nexport type Options<\n  TData extends TDataShape = TDataShape,\n  ThrowOnError extends boolean = boolean,\n  TResponse = unknown,\n  TResponseStyle extends ResponseStyle = 'fields',\n> = OmitKeys<\n  RequestOptions<TResponse, TResponseStyle, ThrowOnError>,\n  'body' | 'path' | 'query' | 'url'\n> &\n  ([TData] extends [never] ? unknown : Omit<TData, 'url'>);\n"
  },
  {
    "path": "examples/openapi-ts-pinia-colada/src/client/client/utils.gen.ts",
    "content": "// 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"
  },
  {
    "path": "examples/openapi-ts-pinia-colada/src/client/client.gen.ts",
    "content": "// 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> = (\n  override?: Config<ClientOptions & T>,\n) => Config<Required<ClientOptions> & T>;\n\nexport const client = createClient(\n  createConfig<ClientOptions2>({ baseUrl: 'https://petstore3.swagger.io/api/v3' }),\n);\n"
  },
  {
    "path": "examples/openapi-ts-pinia-colada/src/client/core/auth.gen.ts",
    "content": "// 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"
  },
  {
    "path": "examples/openapi-ts-pinia-colada/src/client/core/bodySerializer.gen.ts",
    "content": "// 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"
  },
  {
    "path": "examples/openapi-ts-pinia-colada/src/client/core/params.gen.ts",
    "content": "// 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"
  },
  {
    "path": "examples/openapi-ts-pinia-colada/src/client/core/pathSerializer.gen.ts",
    "content": "// 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"
  },
  {
    "path": "examples/openapi-ts-pinia-colada/src/client/core/queryKeySerializer.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\n/**\n * JSON-friendly union that mirrors what Pinia Colada can hash.\n */\nexport type JsonValue =\n  | null\n  | string\n  | number\n  | boolean\n  | JsonValue[]\n  | { [key: string]: JsonValue };\n\n/**\n * Replacer that converts non-JSON values (bigint, Date, etc.) to safe substitutes.\n */\nexport const queryKeyJsonReplacer = (_key: string, value: unknown) => {\n  if (value === undefined || typeof value === 'function' || typeof value === 'symbol') {\n    return undefined;\n  }\n  if (typeof value === 'bigint') {\n    return value.toString();\n  }\n  if (value instanceof Date) {\n    return value.toISOString();\n  }\n  return value;\n};\n\n/**\n * Safely stringifies a value and parses it back into a JsonValue.\n */\nexport const stringifyToJsonValue = (input: unknown): JsonValue | undefined => {\n  try {\n    const json = JSON.stringify(input, queryKeyJsonReplacer);\n    if (json === undefined) {\n      return undefined;\n    }\n    return JSON.parse(json) as JsonValue;\n  } catch {\n    return undefined;\n  }\n};\n\n/**\n * Detects plain objects (including objects with a null prototype).\n */\nconst isPlainObject = (value: unknown): value is Record<string, unknown> => {\n  if (value === null || typeof value !== 'object') {\n    return false;\n  }\n  const prototype = Object.getPrototypeOf(value as object);\n  return prototype === Object.prototype || prototype === null;\n};\n\n/**\n * Turns URLSearchParams into a sorted JSON object for deterministic keys.\n */\nconst serializeSearchParams = (params: URLSearchParams): JsonValue => {\n  const entries = Array.from(params.entries()).sort(([a], [b]) => a.localeCompare(b));\n  const result: Record<string, JsonValue> = {};\n\n  for (const [key, value] of entries) {\n    const existing = result[key];\n    if (existing === undefined) {\n      result[key] = value;\n      continue;\n    }\n\n    if (Array.isArray(existing)) {\n      (existing as string[]).push(value);\n    } else {\n      result[key] = [existing, value];\n    }\n  }\n\n  return result;\n};\n\n/**\n * Normalizes any accepted value into a JSON-friendly shape for query keys.\n */\nexport const serializeQueryKeyValue = (value: unknown): JsonValue | undefined => {\n  if (value === null) {\n    return null;\n  }\n\n  if (typeof value === 'string' || typeof value === 'number' || typeof value === 'boolean') {\n    return value;\n  }\n\n  if (value === undefined || typeof value === 'function' || typeof value === 'symbol') {\n    return undefined;\n  }\n\n  if (typeof value === 'bigint') {\n    return value.toString();\n  }\n\n  if (value instanceof Date) {\n    return value.toISOString();\n  }\n\n  if (Array.isArray(value)) {\n    return stringifyToJsonValue(value);\n  }\n\n  if (typeof URLSearchParams !== 'undefined' && value instanceof URLSearchParams) {\n    return serializeSearchParams(value);\n  }\n\n  if (isPlainObject(value)) {\n    return stringifyToJsonValue(value);\n  }\n\n  return undefined;\n};\n"
  },
  {
    "path": "examples/openapi-ts-pinia-colada/src/client/core/serverSentEvents.gen.ts",
    "content": "// 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 const 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            // Normalize line endings: CRLF -> LF, then CR -> LF\n            buffer = buffer.replace(/\\r\\n/g, '\\n').replace(/\\r/g, '\\n');\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"
  },
  {
    "path": "examples/openapi-ts-pinia-colada/src/client/core/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { Auth, AuthToken } from './auth.gen';\nimport type { BodySerializer, QuerySerializer, QuerySerializerOptions } from './bodySerializer.gen';\n\nexport type HttpMethod =\n  | 'connect'\n  | 'delete'\n  | 'get'\n  | 'head'\n  | 'options'\n  | 'patch'\n  | 'post'\n  | 'put'\n  | 'trace';\n\nexport type Client<\n  RequestFn = never,\n  Config = unknown,\n  MethodFn = never,\n  BuildUrlFn = never,\n  SseFn = never,\n> = {\n  /**\n   * Returns the final request URL.\n   */\n  buildUrl: BuildUrlFn;\n  getConfig: () => Config;\n  request: RequestFn;\n  setConfig: (config: Config) => Config;\n} & {\n  [K in HttpMethod]: MethodFn;\n} & ([SseFn] extends [never] ? { sse?: never } : { sse: { [K in HttpMethod]: SseFn } });\n\nexport interface Config {\n  /**\n   * Auth token or a function returning auth token. The resolved value will be\n   * added to the request payload as defined by its `security` array.\n   */\n  auth?: ((auth: Auth) => Promise<AuthToken> | AuthToken) | AuthToken;\n  /**\n   * A function for serializing request body parameter. By default,\n   * {@link JSON.stringify()} will be used.\n   */\n  bodySerializer?: BodySerializer | null;\n  /**\n   * An object containing any HTTP headers that you want to pre-populate your\n   * `Headers` object with.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/Headers/Headers#init See more}\n   */\n  headers?:\n    | RequestInit['headers']\n    | Record<\n        string,\n        string | number | boolean | (string | number | boolean)[] | null | undefined | unknown\n      >;\n  /**\n   * The request method.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/fetch#method See more}\n   */\n  method?: Uppercase<HttpMethod>;\n  /**\n   * A function for serializing request query parameters. By default, arrays\n   * will be exploded in form style, objects will be exploded in deepObject\n   * style, and reserved characters are percent-encoded.\n   *\n   * This method will have no effect if the native `paramsSerializer()` Axios\n   * API function is used.\n   *\n   * {@link https://swagger.io/docs/specification/serialization/#query View examples}\n   */\n  querySerializer?: QuerySerializer | QuerySerializerOptions;\n  /**\n   * A function validating request data. This is useful if you want to ensure\n   * the request conforms to the desired shape, so it can be safely sent to\n   * the server.\n   */\n  requestValidator?: (data: unknown) => Promise<unknown>;\n  /**\n   * A function transforming response data before it's returned. This is useful\n   * for post-processing data, e.g. converting ISO strings into Date objects.\n   */\n  responseTransformer?: (data: unknown) => Promise<unknown>;\n  /**\n   * A function validating response data. This is useful if you want to ensure\n   * the response conforms to the desired shape, so it can be safely passed to\n   * the transformers and returned to the user.\n   */\n  responseValidator?: (data: unknown) => Promise<unknown>;\n}\n\ntype IsExactlyNeverOrNeverUndefined<T> = [T] extends [never]\n  ? true\n  : [T] extends [never | undefined]\n    ? [undefined] extends [T]\n      ? false\n      : true\n    : false;\n\nexport type OmitNever<T extends Record<string, unknown>> = {\n  [K in keyof T as IsExactlyNeverOrNeverUndefined<T[K]> extends true ? never : K]: T[K];\n};\n"
  },
  {
    "path": "examples/openapi-ts-pinia-colada/src/client/core/utils.gen.ts",
    "content": "// 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"
  },
  {
    "path": "examples/openapi-ts-pinia-colada/src/client/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport {\n  addPetMutation,\n  createUserMutation,\n  createUsersWithListInputMutation,\n  deleteOrderMutation,\n  deletePetMutation,\n  deleteUserMutation,\n  findPetsByStatusQuery,\n  findPetsByTagsQuery,\n  getInventoryQuery,\n  getOrderByIdQuery,\n  getPetByIdQuery,\n  getUserByNameQuery,\n  loginUserQuery,\n  logoutUserQuery,\n  placeOrderMutation,\n  type QueryKey,\n  updatePetMutation,\n  updatePetWithFormMutation,\n  updateUserMutation,\n  uploadFileMutation,\n} from './@pinia/colada.gen';\nexport {\n  addPet,\n  createUser,\n  createUsersWithListInput,\n  deleteOrder,\n  deletePet,\n  deleteUser,\n  findPetsByStatus,\n  findPetsByTags,\n  getInventory,\n  getOrderById,\n  getPetById,\n  getUserByName,\n  loginUser,\n  logoutUser,\n  type Options,\n  placeOrder,\n  updatePet,\n  updatePetWithForm,\n  updateUser,\n  uploadFile,\n} from './sdk.gen';\nexport type {\n  AddPetData,\n  AddPetErrors,\n  AddPetResponse,\n  AddPetResponses,\n  ApiResponse,\n  Category,\n  ClientOptions,\n  CreateUserData,\n  CreateUserErrors,\n  CreateUserResponse,\n  CreateUserResponses,\n  CreateUsersWithListInputData,\n  CreateUsersWithListInputErrors,\n  CreateUsersWithListInputResponse,\n  CreateUsersWithListInputResponses,\n  DeleteOrderData,\n  DeleteOrderErrors,\n  DeleteOrderResponses,\n  DeletePetData,\n  DeletePetErrors,\n  DeletePetResponses,\n  DeleteUserData,\n  DeleteUserErrors,\n  DeleteUserResponses,\n  FindPetsByStatusData,\n  FindPetsByStatusErrors,\n  FindPetsByStatusResponse,\n  FindPetsByStatusResponses,\n  FindPetsByTagsData,\n  FindPetsByTagsErrors,\n  FindPetsByTagsResponse,\n  FindPetsByTagsResponses,\n  GetInventoryData,\n  GetInventoryErrors,\n  GetInventoryResponse,\n  GetInventoryResponses,\n  GetOrderByIdData,\n  GetOrderByIdErrors,\n  GetOrderByIdResponse,\n  GetOrderByIdResponses,\n  GetPetByIdData,\n  GetPetByIdErrors,\n  GetPetByIdResponse,\n  GetPetByIdResponses,\n  GetUserByNameData,\n  GetUserByNameErrors,\n  GetUserByNameResponse,\n  GetUserByNameResponses,\n  LoginUserData,\n  LoginUserErrors,\n  LoginUserResponse,\n  LoginUserResponses,\n  LogoutUserData,\n  LogoutUserErrors,\n  LogoutUserResponses,\n  Order,\n  Pet,\n  Pet2,\n  PlaceOrderData,\n  PlaceOrderErrors,\n  PlaceOrderResponse,\n  PlaceOrderResponses,\n  Tag,\n  UpdatePetData,\n  UpdatePetErrors,\n  UpdatePetResponse,\n  UpdatePetResponses,\n  UpdatePetWithFormData,\n  UpdatePetWithFormErrors,\n  UpdatePetWithFormResponse,\n  UpdatePetWithFormResponses,\n  UpdateUserData,\n  UpdateUserErrors,\n  UpdateUserResponses,\n  UploadFileData,\n  UploadFileErrors,\n  UploadFileResponse,\n  UploadFileResponses,\n  User,\n  UserArray,\n} from './types.gen';\n"
  },
  {
    "path": "examples/openapi-ts-pinia-colada/src/client/schemas.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport const OrderSchema = {\n  properties: {\n    complete: {\n      type: 'boolean',\n    },\n    id: {\n      example: 10,\n      format: 'int64',\n      type: 'integer',\n    },\n    petId: {\n      example: 198772,\n      format: 'int64',\n      type: 'integer',\n    },\n    quantity: {\n      example: 7,\n      format: 'int32',\n      type: 'integer',\n    },\n    shipDate: {\n      format: 'date-time',\n      type: 'string',\n    },\n    status: {\n      description: 'Order Status',\n      enum: ['placed', 'approved', 'delivered'],\n      example: 'approved',\n      type: 'string',\n    },\n  },\n  type: 'object',\n  'x-swagger-router-model': 'io.swagger.petstore.model.Order',\n  xml: {\n    name: 'order',\n  },\n} as const;\n\nexport const CategorySchema = {\n  properties: {\n    id: {\n      example: 1,\n      format: 'int64',\n      type: 'integer',\n    },\n    name: {\n      example: 'Dogs',\n      type: 'string',\n    },\n  },\n  type: 'object',\n  'x-swagger-router-model': 'io.swagger.petstore.model.Category',\n  xml: {\n    name: 'category',\n  },\n} as const;\n\nexport const UserSchema = {\n  properties: {\n    email: {\n      example: 'john@email.com',\n      type: 'string',\n    },\n    firstName: {\n      example: 'John',\n      type: 'string',\n    },\n    id: {\n      example: 10,\n      format: 'int64',\n      type: 'integer',\n    },\n    lastName: {\n      example: 'James',\n      type: 'string',\n    },\n    password: {\n      example: '12345',\n      type: 'string',\n    },\n    phone: {\n      example: '12345',\n      type: 'string',\n    },\n    userStatus: {\n      description: 'User Status',\n      example: 1,\n      format: 'int32',\n      type: 'integer',\n    },\n    username: {\n      example: 'theUser',\n      type: 'string',\n    },\n  },\n  type: 'object',\n  'x-swagger-router-model': 'io.swagger.petstore.model.User',\n  xml: {\n    name: 'user',\n  },\n} as const;\n\nexport const TagSchema = {\n  properties: {\n    id: {\n      format: 'int64',\n      type: 'integer',\n    },\n    name: {\n      type: 'string',\n    },\n  },\n  type: 'object',\n  'x-swagger-router-model': 'io.swagger.petstore.model.Tag',\n  xml: {\n    name: 'tag',\n  },\n} as const;\n\nexport const PetSchema = {\n  properties: {\n    category: {\n      $ref: '#/components/schemas/Category',\n    },\n    id: {\n      example: 10,\n      format: 'int64',\n      type: 'integer',\n    },\n    name: {\n      example: 'doggie',\n      type: 'string',\n    },\n    photoUrls: {\n      items: {\n        type: 'string',\n        xml: {\n          name: 'photoUrl',\n        },\n      },\n      type: 'array',\n      xml: {\n        wrapped: true,\n      },\n    },\n    status: {\n      description: 'pet status in the store',\n      enum: ['available', 'pending', 'sold'],\n      type: 'string',\n    },\n    tags: {\n      items: {\n        $ref: '#/components/schemas/Tag',\n      },\n      type: 'array',\n      xml: {\n        wrapped: true,\n      },\n    },\n  },\n  required: ['name', 'photoUrls'],\n  type: 'object',\n  'x-swagger-router-model': 'io.swagger.petstore.model.Pet',\n  xml: {\n    name: 'pet',\n  },\n} as const;\n\nexport const ApiResponseSchema = {\n  properties: {\n    code: {\n      format: 'int32',\n      type: 'integer',\n    },\n    message: {\n      type: 'string',\n    },\n    type: {\n      type: 'string',\n    },\n  },\n  type: 'object',\n  xml: {\n    name: '##default',\n  },\n} as const;\n"
  },
  {
    "path": "examples/openapi-ts-pinia-colada/src/client/sdk.gen.ts",
    "content": "// 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 {\n  AddPetData,\n  AddPetErrors,\n  AddPetResponses,\n  CreateUserData,\n  CreateUserErrors,\n  CreateUserResponses,\n  CreateUsersWithListInputData,\n  CreateUsersWithListInputErrors,\n  CreateUsersWithListInputResponses,\n  DeleteOrderData,\n  DeleteOrderErrors,\n  DeleteOrderResponses,\n  DeletePetData,\n  DeletePetErrors,\n  DeletePetResponses,\n  DeleteUserData,\n  DeleteUserErrors,\n  DeleteUserResponses,\n  FindPetsByStatusData,\n  FindPetsByStatusErrors,\n  FindPetsByStatusResponses,\n  FindPetsByTagsData,\n  FindPetsByTagsErrors,\n  FindPetsByTagsResponses,\n  GetInventoryData,\n  GetInventoryErrors,\n  GetInventoryResponses,\n  GetOrderByIdData,\n  GetOrderByIdErrors,\n  GetOrderByIdResponses,\n  GetPetByIdData,\n  GetPetByIdErrors,\n  GetPetByIdResponses,\n  GetUserByNameData,\n  GetUserByNameErrors,\n  GetUserByNameResponses,\n  LoginUserData,\n  LoginUserErrors,\n  LoginUserResponses,\n  LogoutUserData,\n  LogoutUserErrors,\n  LogoutUserResponses,\n  PlaceOrderData,\n  PlaceOrderErrors,\n  PlaceOrderResponses,\n  UpdatePetData,\n  UpdatePetErrors,\n  UpdatePetResponses,\n  UpdatePetWithFormData,\n  UpdatePetWithFormErrors,\n  UpdatePetWithFormResponses,\n  UpdateUserData,\n  UpdateUserErrors,\n  UpdateUserResponses,\n  UploadFileData,\n  UploadFileErrors,\n  UploadFileResponses,\n} from './types.gen';\n\nexport type Options<\n  TData extends TDataShape = TDataShape,\n  ThrowOnError extends boolean = boolean,\n> = Options2<TData, ThrowOnError> & {\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 * Add a new pet to the store.\n *\n * Add a new pet to the store.\n */\nexport const addPet = <ThrowOnError extends boolean = false>(\n  options: Options<AddPetData, ThrowOnError>,\n) =>\n  (options.client ?? client).post<AddPetResponses, AddPetErrors, ThrowOnError>({\n    security: [{ scheme: 'bearer', type: 'http' }],\n    url: '/pet',\n    ...options,\n    headers: {\n      'Content-Type': 'application/json',\n      ...options.headers,\n    },\n  });\n\n/**\n * Update an existing pet.\n *\n * Update an existing pet by Id.\n */\nexport const updatePet = <ThrowOnError extends boolean = false>(\n  options: Options<UpdatePetData, ThrowOnError>,\n) =>\n  (options.client ?? client).put<UpdatePetResponses, UpdatePetErrors, ThrowOnError>({\n    security: [{ scheme: 'bearer', type: 'http' }],\n    url: '/pet',\n    ...options,\n    headers: {\n      'Content-Type': 'application/json',\n      ...options.headers,\n    },\n  });\n\n/**\n * Finds Pets by status.\n *\n * Multiple status values can be provided with comma separated strings.\n */\nexport const findPetsByStatus = <ThrowOnError extends boolean = false>(\n  options: Options<FindPetsByStatusData, ThrowOnError>,\n) =>\n  (options.client ?? client).get<FindPetsByStatusResponses, FindPetsByStatusErrors, ThrowOnError>({\n    security: [{ scheme: 'bearer', type: 'http' }],\n    url: '/pet/findByStatus',\n    ...options,\n  });\n\n/**\n * Finds Pets by tags.\n *\n * Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.\n */\nexport const findPetsByTags = <ThrowOnError extends boolean = false>(\n  options: Options<FindPetsByTagsData, ThrowOnError>,\n) =>\n  (options.client ?? client).get<FindPetsByTagsResponses, FindPetsByTagsErrors, ThrowOnError>({\n    security: [{ scheme: 'bearer', type: 'http' }],\n    url: '/pet/findByTags',\n    ...options,\n  });\n\n/**\n * Deletes a pet.\n *\n * Delete a pet.\n */\nexport const deletePet = <ThrowOnError extends boolean = false>(\n  options: Options<DeletePetData, ThrowOnError>,\n) =>\n  (options.client ?? client).delete<DeletePetResponses, DeletePetErrors, ThrowOnError>({\n    security: [{ scheme: 'bearer', type: 'http' }],\n    url: '/pet/{petId}',\n    ...options,\n  });\n\n/**\n * Find pet by ID.\n *\n * Returns a single pet.\n */\nexport const getPetById = <ThrowOnError extends boolean = false>(\n  options: Options<GetPetByIdData, ThrowOnError>,\n) =>\n  (options.client ?? client).get<GetPetByIdResponses, GetPetByIdErrors, ThrowOnError>({\n    security: [\n      { name: 'api_key', type: 'apiKey' },\n      { scheme: 'bearer', type: 'http' },\n    ],\n    url: '/pet/{petId}',\n    ...options,\n  });\n\n/**\n * Updates a pet in the store with form data.\n *\n * Updates a pet resource based on the form data.\n */\nexport const updatePetWithForm = <ThrowOnError extends boolean = false>(\n  options: Options<UpdatePetWithFormData, ThrowOnError>,\n) =>\n  (options.client ?? client).post<\n    UpdatePetWithFormResponses,\n    UpdatePetWithFormErrors,\n    ThrowOnError\n  >({\n    security: [{ scheme: 'bearer', type: 'http' }],\n    url: '/pet/{petId}',\n    ...options,\n  });\n\n/**\n * Uploads an image.\n *\n * Upload image of the pet.\n */\nexport const uploadFile = <ThrowOnError extends boolean = false>(\n  options: Options<UploadFileData, ThrowOnError>,\n) =>\n  (options.client ?? client).post<UploadFileResponses, UploadFileErrors, ThrowOnError>({\n    bodySerializer: null,\n    security: [{ scheme: 'bearer', type: 'http' }],\n    url: '/pet/{petId}/uploadImage',\n    ...options,\n    headers: {\n      'Content-Type': 'application/octet-stream',\n      ...options.headers,\n    },\n  });\n\n/**\n * Returns pet inventories by status.\n *\n * Returns a map of status codes to quantities.\n */\nexport const getInventory = <ThrowOnError extends boolean = false>(\n  options?: Options<GetInventoryData, ThrowOnError>,\n) =>\n  (options?.client ?? client).get<GetInventoryResponses, GetInventoryErrors, ThrowOnError>({\n    security: [{ name: 'api_key', type: 'apiKey' }],\n    url: '/store/inventory',\n    ...options,\n  });\n\n/**\n * Place an order for a pet.\n *\n * Place a new order in the store.\n */\nexport const placeOrder = <ThrowOnError extends boolean = false>(\n  options?: Options<PlaceOrderData, ThrowOnError>,\n) =>\n  (options?.client ?? client).post<PlaceOrderResponses, PlaceOrderErrors, ThrowOnError>({\n    url: '/store/order',\n    ...options,\n    headers: {\n      'Content-Type': 'application/json',\n      ...options?.headers,\n    },\n  });\n\n/**\n * Delete purchase order by identifier.\n *\n * For valid response try integer IDs with value < 1000. Anything above 1000 or non-integers will generate API errors.\n */\nexport const deleteOrder = <ThrowOnError extends boolean = false>(\n  options: Options<DeleteOrderData, ThrowOnError>,\n) =>\n  (options.client ?? client).delete<DeleteOrderResponses, DeleteOrderErrors, ThrowOnError>({\n    url: '/store/order/{orderId}',\n    ...options,\n  });\n\n/**\n * Find purchase order by ID.\n *\n * For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions.\n */\nexport const getOrderById = <ThrowOnError extends boolean = false>(\n  options: Options<GetOrderByIdData, ThrowOnError>,\n) =>\n  (options.client ?? client).get<GetOrderByIdResponses, GetOrderByIdErrors, ThrowOnError>({\n    url: '/store/order/{orderId}',\n    ...options,\n  });\n\n/**\n * Create user.\n *\n * This can only be done by the logged in user.\n */\nexport const createUser = <ThrowOnError extends boolean = false>(\n  options?: Options<CreateUserData, ThrowOnError>,\n) =>\n  (options?.client ?? client).post<CreateUserResponses, CreateUserErrors, ThrowOnError>({\n    url: '/user',\n    ...options,\n    headers: {\n      'Content-Type': 'application/json',\n      ...options?.headers,\n    },\n  });\n\n/**\n * Creates list of users with given input array.\n *\n * Creates list of users with given input array.\n */\nexport const createUsersWithListInput = <ThrowOnError extends boolean = false>(\n  options?: Options<CreateUsersWithListInputData, ThrowOnError>,\n) =>\n  (options?.client ?? client).post<\n    CreateUsersWithListInputResponses,\n    CreateUsersWithListInputErrors,\n    ThrowOnError\n  >({\n    url: '/user/createWithList',\n    ...options,\n    headers: {\n      'Content-Type': 'application/json',\n      ...options?.headers,\n    },\n  });\n\n/**\n * Logs user into the system.\n *\n * Log into the system.\n */\nexport const loginUser = <ThrowOnError extends boolean = false>(\n  options?: Options<LoginUserData, ThrowOnError>,\n) =>\n  (options?.client ?? client).get<LoginUserResponses, LoginUserErrors, ThrowOnError>({\n    url: '/user/login',\n    ...options,\n  });\n\n/**\n * Logs out current logged in user session.\n *\n * Log user out of the system.\n */\nexport const logoutUser = <ThrowOnError extends boolean = false>(\n  options?: Options<LogoutUserData, ThrowOnError>,\n) =>\n  (options?.client ?? client).get<LogoutUserResponses, LogoutUserErrors, ThrowOnError>({\n    url: '/user/logout',\n    ...options,\n  });\n\n/**\n * Delete user resource.\n *\n * This can only be done by the logged in user.\n */\nexport const deleteUser = <ThrowOnError extends boolean = false>(\n  options: Options<DeleteUserData, ThrowOnError>,\n) =>\n  (options.client ?? client).delete<DeleteUserResponses, DeleteUserErrors, ThrowOnError>({\n    url: '/user/{username}',\n    ...options,\n  });\n\n/**\n * Get user by user name.\n *\n * Get user detail based on username.\n */\nexport const getUserByName = <ThrowOnError extends boolean = false>(\n  options: Options<GetUserByNameData, ThrowOnError>,\n) =>\n  (options.client ?? client).get<GetUserByNameResponses, GetUserByNameErrors, ThrowOnError>({\n    url: '/user/{username}',\n    ...options,\n  });\n\n/**\n * Update user resource.\n *\n * This can only be done by the logged in user.\n */\nexport const updateUser = <ThrowOnError extends boolean = false>(\n  options: Options<UpdateUserData, ThrowOnError>,\n) =>\n  (options.client ?? client).put<UpdateUserResponses, UpdateUserErrors, ThrowOnError>({\n    url: '/user/{username}',\n    ...options,\n    headers: {\n      'Content-Type': 'application/json',\n      ...options.headers,\n    },\n  });\n"
  },
  {
    "path": "examples/openapi-ts-pinia-colada/src/client/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type ClientOptions = {\n  baseUrl: 'https://petstore3.swagger.io/api/v3' | (string & {});\n};\n\nexport type Order = {\n  complete?: boolean;\n  id?: number;\n  petId?: number;\n  quantity?: number;\n  shipDate?: string;\n  /**\n   * Order Status\n   */\n  status?: 'placed' | 'approved' | 'delivered';\n};\n\nexport type Category = {\n  id?: number;\n  name?: string;\n};\n\nexport type User = {\n  email?: string;\n  firstName?: string;\n  id?: number;\n  lastName?: string;\n  password?: string;\n  phone?: string;\n  /**\n   * User Status\n   */\n  userStatus?: number;\n  username?: string;\n};\n\nexport type Tag = {\n  id?: number;\n  name?: string;\n};\n\nexport type Pet = {\n  category?: Category;\n  id?: number;\n  name: string;\n  photoUrls: Array<string>;\n  /**\n   * pet status in the store\n   */\n  status?: 'available' | 'pending' | 'sold';\n  tags?: Array<Tag>;\n};\n\nexport type ApiResponse = {\n  code?: number;\n  message?: string;\n  type?: string;\n};\n\nexport type Pet2 = Pet;\n\n/**\n * List of user object\n */\nexport type UserArray = Array<User>;\n\nexport type AddPetData = {\n  /**\n   * Create a new pet in the store\n   */\n  body: Pet;\n  path?: never;\n  query?: never;\n  url: '/pet';\n};\n\nexport type AddPetErrors = {\n  /**\n   * Invalid input\n   */\n  400: unknown;\n  /**\n   * Validation exception\n   */\n  422: unknown;\n  /**\n   * Unexpected error\n   */\n  default: unknown;\n};\n\nexport type AddPetResponses = {\n  /**\n   * Successful operation\n   */\n  200: Pet;\n};\n\nexport type AddPetResponse = AddPetResponses[keyof AddPetResponses];\n\nexport type UpdatePetData = {\n  /**\n   * Update an existent pet in the store\n   */\n  body: Pet;\n  path?: never;\n  query?: never;\n  url: '/pet';\n};\n\nexport type UpdatePetErrors = {\n  /**\n   * Invalid ID supplied\n   */\n  400: unknown;\n  /**\n   * Pet not found\n   */\n  404: unknown;\n  /**\n   * Validation exception\n   */\n  422: unknown;\n  /**\n   * Unexpected error\n   */\n  default: unknown;\n};\n\nexport type UpdatePetResponses = {\n  /**\n   * Successful operation\n   */\n  200: Pet;\n};\n\nexport type UpdatePetResponse = UpdatePetResponses[keyof UpdatePetResponses];\n\nexport type FindPetsByStatusData = {\n  body?: never;\n  path?: never;\n  query: {\n    /**\n     * Status values that need to be considered for filter\n     */\n    status: 'available' | 'pending' | 'sold';\n  };\n  url: '/pet/findByStatus';\n};\n\nexport type FindPetsByStatusErrors = {\n  /**\n   * Invalid status value\n   */\n  400: unknown;\n  /**\n   * Unexpected error\n   */\n  default: unknown;\n};\n\nexport type FindPetsByStatusResponses = {\n  /**\n   * successful operation\n   */\n  200: Array<Pet>;\n};\n\nexport type FindPetsByStatusResponse = FindPetsByStatusResponses[keyof FindPetsByStatusResponses];\n\nexport type FindPetsByTagsData = {\n  body?: never;\n  path?: never;\n  query: {\n    /**\n     * Tags to filter by\n     */\n    tags: Array<string>;\n  };\n  url: '/pet/findByTags';\n};\n\nexport type FindPetsByTagsErrors = {\n  /**\n   * Invalid tag value\n   */\n  400: unknown;\n  /**\n   * Unexpected error\n   */\n  default: unknown;\n};\n\nexport type FindPetsByTagsResponses = {\n  /**\n   * successful operation\n   */\n  200: Array<Pet>;\n};\n\nexport type FindPetsByTagsResponse = FindPetsByTagsResponses[keyof FindPetsByTagsResponses];\n\nexport type DeletePetData = {\n  body?: never;\n  headers?: {\n    api_key?: string;\n  };\n  path: {\n    /**\n     * Pet id to delete\n     */\n    petId: number;\n  };\n  query?: never;\n  url: '/pet/{petId}';\n};\n\nexport type DeletePetErrors = {\n  /**\n   * Invalid pet value\n   */\n  400: unknown;\n  /**\n   * Unexpected error\n   */\n  default: unknown;\n};\n\nexport type DeletePetResponses = {\n  /**\n   * Pet deleted\n   */\n  200: unknown;\n};\n\nexport type GetPetByIdData = {\n  body?: never;\n  path: {\n    /**\n     * ID of pet to return\n     */\n    petId: number;\n  };\n  query?: never;\n  url: '/pet/{petId}';\n};\n\nexport type GetPetByIdErrors = {\n  /**\n   * Invalid ID supplied\n   */\n  400: unknown;\n  /**\n   * Pet not found\n   */\n  404: unknown;\n  /**\n   * Unexpected error\n   */\n  default: unknown;\n};\n\nexport type GetPetByIdResponses = {\n  /**\n   * successful operation\n   */\n  200: Pet;\n};\n\nexport type GetPetByIdResponse = GetPetByIdResponses[keyof GetPetByIdResponses];\n\nexport type UpdatePetWithFormData = {\n  body?: never;\n  path: {\n    /**\n     * ID of pet that needs to be updated\n     */\n    petId: number;\n  };\n  query?: {\n    /**\n     * Name of pet that needs to be updated\n     */\n    name?: string;\n    /**\n     * Status of pet that needs to be updated\n     */\n    status?: string;\n  };\n  url: '/pet/{petId}';\n};\n\nexport type UpdatePetWithFormErrors = {\n  /**\n   * Invalid input\n   */\n  400: unknown;\n  /**\n   * Unexpected error\n   */\n  default: unknown;\n};\n\nexport type UpdatePetWithFormResponses = {\n  /**\n   * successful operation\n   */\n  200: Pet;\n};\n\nexport type UpdatePetWithFormResponse =\n  UpdatePetWithFormResponses[keyof UpdatePetWithFormResponses];\n\nexport type UploadFileData = {\n  body?: Blob | File;\n  path: {\n    /**\n     * ID of pet to update\n     */\n    petId: number;\n  };\n  query?: {\n    /**\n     * Additional Metadata\n     */\n    additionalMetadata?: string;\n  };\n  url: '/pet/{petId}/uploadImage';\n};\n\nexport type UploadFileErrors = {\n  /**\n   * No file uploaded\n   */\n  400: unknown;\n  /**\n   * Pet not found\n   */\n  404: unknown;\n  /**\n   * Unexpected error\n   */\n  default: unknown;\n};\n\nexport type UploadFileResponses = {\n  /**\n   * successful operation\n   */\n  200: ApiResponse;\n};\n\nexport type UploadFileResponse = UploadFileResponses[keyof UploadFileResponses];\n\nexport type GetInventoryData = {\n  body?: never;\n  path?: never;\n  query?: never;\n  url: '/store/inventory';\n};\n\nexport type GetInventoryErrors = {\n  /**\n   * Unexpected error\n   */\n  default: unknown;\n};\n\nexport type GetInventoryResponses = {\n  /**\n   * successful operation\n   */\n  200: {\n    [key: string]: number;\n  };\n};\n\nexport type GetInventoryResponse = GetInventoryResponses[keyof GetInventoryResponses];\n\nexport type PlaceOrderData = {\n  body?: Order;\n  path?: never;\n  query?: never;\n  url: '/store/order';\n};\n\nexport type PlaceOrderErrors = {\n  /**\n   * Invalid input\n   */\n  400: unknown;\n  /**\n   * Validation exception\n   */\n  422: unknown;\n  /**\n   * Unexpected error\n   */\n  default: unknown;\n};\n\nexport type PlaceOrderResponses = {\n  /**\n   * successful operation\n   */\n  200: Order;\n};\n\nexport type PlaceOrderResponse = PlaceOrderResponses[keyof PlaceOrderResponses];\n\nexport type DeleteOrderData = {\n  body?: never;\n  path: {\n    /**\n     * ID of the order that needs to be deleted\n     */\n    orderId: number;\n  };\n  query?: never;\n  url: '/store/order/{orderId}';\n};\n\nexport type DeleteOrderErrors = {\n  /**\n   * Invalid ID supplied\n   */\n  400: unknown;\n  /**\n   * Order not found\n   */\n  404: unknown;\n  /**\n   * Unexpected error\n   */\n  default: unknown;\n};\n\nexport type DeleteOrderResponses = {\n  /**\n   * order deleted\n   */\n  200: unknown;\n};\n\nexport type GetOrderByIdData = {\n  body?: never;\n  path: {\n    /**\n     * ID of order that needs to be fetched\n     */\n    orderId: number;\n  };\n  query?: never;\n  url: '/store/order/{orderId}';\n};\n\nexport type GetOrderByIdErrors = {\n  /**\n   * Invalid ID supplied\n   */\n  400: unknown;\n  /**\n   * Order not found\n   */\n  404: unknown;\n  /**\n   * Unexpected error\n   */\n  default: unknown;\n};\n\nexport type GetOrderByIdResponses = {\n  /**\n   * successful operation\n   */\n  200: Order;\n};\n\nexport type GetOrderByIdResponse = GetOrderByIdResponses[keyof GetOrderByIdResponses];\n\nexport type CreateUserData = {\n  /**\n   * Created user object\n   */\n  body?: User;\n  path?: never;\n  query?: never;\n  url: '/user';\n};\n\nexport type CreateUserErrors = {\n  /**\n   * Unexpected error\n   */\n  default: unknown;\n};\n\nexport type CreateUserResponses = {\n  /**\n   * successful operation\n   */\n  200: User;\n};\n\nexport type CreateUserResponse = CreateUserResponses[keyof CreateUserResponses];\n\nexport type CreateUsersWithListInputData = {\n  body?: Array<User>;\n  path?: never;\n  query?: never;\n  url: '/user/createWithList';\n};\n\nexport type CreateUsersWithListInputErrors = {\n  /**\n   * Unexpected error\n   */\n  default: unknown;\n};\n\nexport type CreateUsersWithListInputResponses = {\n  /**\n   * Successful operation\n   */\n  200: User;\n};\n\nexport type CreateUsersWithListInputResponse =\n  CreateUsersWithListInputResponses[keyof CreateUsersWithListInputResponses];\n\nexport type LoginUserData = {\n  body?: never;\n  path?: never;\n  query?: {\n    /**\n     * The password for login in clear text\n     */\n    password?: string;\n    /**\n     * The user name for login\n     */\n    username?: string;\n  };\n  url: '/user/login';\n};\n\nexport type LoginUserErrors = {\n  /**\n   * Invalid username/password supplied\n   */\n  400: unknown;\n  /**\n   * Unexpected error\n   */\n  default: unknown;\n};\n\nexport type LoginUserResponses = {\n  /**\n   * successful operation\n   */\n  200: string;\n};\n\nexport type LoginUserResponse = LoginUserResponses[keyof LoginUserResponses];\n\nexport type LogoutUserData = {\n  body?: never;\n  path?: never;\n  query?: never;\n  url: '/user/logout';\n};\n\nexport type LogoutUserErrors = {\n  /**\n   * Unexpected error\n   */\n  default: unknown;\n};\n\nexport type LogoutUserResponses = {\n  /**\n   * successful operation\n   */\n  200: unknown;\n};\n\nexport type DeleteUserData = {\n  body?: never;\n  path: {\n    /**\n     * The name that needs to be deleted\n     */\n    username: string;\n  };\n  query?: never;\n  url: '/user/{username}';\n};\n\nexport type DeleteUserErrors = {\n  /**\n   * Invalid username supplied\n   */\n  400: unknown;\n  /**\n   * User not found\n   */\n  404: unknown;\n  /**\n   * Unexpected error\n   */\n  default: unknown;\n};\n\nexport type DeleteUserResponses = {\n  /**\n   * User deleted\n   */\n  200: unknown;\n};\n\nexport type GetUserByNameData = {\n  body?: never;\n  path: {\n    /**\n     * The name that needs to be fetched. Use user1 for testing\n     */\n    username: string;\n  };\n  query?: never;\n  url: '/user/{username}';\n};\n\nexport type GetUserByNameErrors = {\n  /**\n   * Invalid username supplied\n   */\n  400: unknown;\n  /**\n   * User not found\n   */\n  404: unknown;\n  /**\n   * Unexpected error\n   */\n  default: unknown;\n};\n\nexport type GetUserByNameResponses = {\n  /**\n   * successful operation\n   */\n  200: User;\n};\n\nexport type GetUserByNameResponse = GetUserByNameResponses[keyof GetUserByNameResponses];\n\nexport type UpdateUserData = {\n  /**\n   * Update an existent user in the store\n   */\n  body?: User;\n  path: {\n    /**\n     * name that need to be deleted\n     */\n    username: string;\n  };\n  query?: never;\n  url: '/user/{username}';\n};\n\nexport type UpdateUserErrors = {\n  /**\n   * bad request\n   */\n  400: unknown;\n  /**\n   * user not found\n   */\n  404: unknown;\n  /**\n   * Unexpected error\n   */\n  default: unknown;\n};\n\nexport type UpdateUserResponses = {\n  /**\n   * successful operation\n   */\n  200: unknown;\n};\n"
  },
  {
    "path": "examples/openapi-ts-pinia-colada/src/main.ts",
    "content": "import './assets/main.css';\n\nimport { PiniaColada } from '@pinia/colada';\nimport { createPinia } from 'pinia';\nimport { createApp } from 'vue';\n\nimport App from './App.vue';\nimport { client } from './client/client.gen';\nimport router from './router';\n\n// configure internal service client\nclient.setConfig({\n  // set default base url for requests\n  baseUrl: 'https://petstore3.swagger.io/api/v3',\n  // set default headers for requests\n  headers: {\n    Authorization: 'Bearer <token_from_service_client>',\n  },\n});\n\nconst app = createApp(App);\n\nconst pinia = createPinia();\napp.use(pinia);\napp.use(PiniaColada);\napp.use(router);\n\napp.mount('#app');\n"
  },
  {
    "path": "examples/openapi-ts-pinia-colada/src/router/index.ts",
    "content": "import { createRouter, createWebHistory } from 'vue-router';\n\nimport PiniaColadaExample from '@/views/PiniaColadaExample.vue';\n\nconst router = createRouter({\n  history: createWebHistory(import.meta.env.BASE_URL),\n  routes: [\n    {\n      component: PiniaColadaExample,\n      name: 'home',\n      path: '/',\n    },\n  ],\n});\n\nexport default router;\n"
  },
  {
    "path": "examples/openapi-ts-pinia-colada/src/views/PiniaColadaExample.vue",
    "content": "<script lang=\"ts\" setup>\nimport type { Pet } from '@/client';\nimport type { RequestOptions } from '@/client/client';\nimport { PiniaColadaDevtools } from '@pinia/colada-devtools';\nimport { createClient } from '@/client/client';\nimport { PetSchema } from '@/client/schemas.gen';\nimport { addPetMutation, getPetByIdQuery, updatePetMutation } from '@/client/@pinia/colada.gen';\nimport { useQuery, useMutation, useQueryCache } from '@pinia/colada';\nimport { ref, watch } from 'vue';\n\nconst localClient = createClient({\n  // set default base url for requests made by this client\n  baseUrl: 'https://petstore3.swagger.io/api/v3',\n  /**\n   * Set default headers only for requests made by this client. This is to\n   * demonstrate local clients and their configuration taking precedence over\n   * internal service client.\n   */\n  headers: {\n    Authorization: 'Bearer <token_from_local_client>',\n  },\n});\n\nlocalClient.interceptors.request.use((request: Request, options: RequestOptions) => {\n  // Middleware is great for adding authorization tokens to requests made to\n  // protected paths. Headers are set randomly here to allow surfacing the\n  // default headers, too.\n  if (options.url === '/pet/{petId}' && options.method === 'GET' && Math.random() < 0.5) {\n    request.headers.set('Authorization', 'Bearer <token_from_interceptor>');\n  }\n  return request;\n});\n\nconst isPetNameRequired = PetSchema.required.includes('name');\n\nconst petId = ref<number | undefined>();\nconst petInput = ref({ name: '', category: '' });\n\nconst { data: pet, error } = useQuery(() => ({\n  ...getPetByIdQuery({\n    path: {\n      petId: petId.value as number,\n    },\n  }),\n  enabled: petId.value !== undefined,\n}));\nconst { mutateAsync: createPet } = useMutation(addPetMutation());\nconst { mutateAsync: updatePet } = useMutation(updatePetMutation());\n\nconst queryCache = useQueryCache();\nasync function invalidateCurrentPet() {\n  const { key } = getPetByIdQuery({\n    path: {\n      petId: petId.value as number,\n    },\n  });\n  await queryCache.invalidateQueries({ key, exact: true });\n}\n\nasync function updatePetIdAndInvalidate(newId: number | undefined) {\n  if (newId !== undefined) {\n    petId.value = newId;\n  }\n\n  if (petId.value !== undefined) {\n    await invalidateCurrentPet();\n  }\n}\n\nasync function handleAddPet() {\n  if (isPetNameRequired && !petInput.value.name) return;\n\n  const result = await createPet({ body: buildPetBody() });\n  if (!result) return;\n\n  await updatePetIdAndInvalidate(result.id);\n}\n\nasync function handleUpdatePet() {\n  if (!pet.value) return;\n\n  const result = await updatePet({\n    body: buildPetBody(pet.value),\n    headers: {\n      Authorization: 'Bearer <token_from_method>',\n    },\n  });\n  if (!result) return;\n\n  await updatePetIdAndInvalidate(result.id);\n}\n\nfunction randomInt(min: number, max: number) {\n  return Math.floor(Math.random() * (max - min + 1) + min);\n}\n\nfunction setRandomPetId() {\n  petId.value = randomInt(1, 10);\n}\n\nfunction buildPetBody(base?: Partial<Pet>) {\n  return {\n    category: {\n      id: base?.category?.id ?? 0,\n      name: petInput.value.category,\n    },\n    id: base?.id ?? 0,\n    name: petInput.value.name,\n    photoUrls: ['string'],\n    status: 'available' as const,\n    tags: [\n      {\n        id: 0,\n        name: 'string',\n      },\n    ],\n  };\n}\n\nwatch(error, (error) => {\n  console.error(error);\n});\n</script>\n\n<template>\n  <div class=\"bg-[#18191b] py-12\">\n    <div class=\"mx-auto flex max-w-md flex-col gap-12\">\n      <div class=\"flex items-center\">\n        <a class=\"shrink-0\" href=\"https://heyapi.dev/\" target=\"_blank\">\n          <img\n            alt=\"Hey API logo\"\n            class=\"size-16 transition duration-300 will-change-auto\"\n            src=\"https://heyapi.dev/assets/raw/logo.png\"\n          />\n        </a>\n\n        <h1 class=\"text-2xl font-bold text-white\">@hey-api/openapi-ts 🤝 Pinia Colada</h1>\n      </div>\n\n      <div class=\"flex flex-col gap-2\">\n        <div\n          class=\"flex max-w-60 items-center gap-3 rounded border border-[#575e64] bg-[#1f2123] p-4\"\n        >\n          <div\n            class=\"flex size-10 place-content-center place-items-center rounded-full bg-[#233057] text-lg font-medium text-[#9eb1ff]\"\n          >\n            <span>\n              {{ pet?.name?.slice(0, 1) || 'N' }}\n            </span>\n          </div>\n\n          <div>\n            <p class=\"text-sm font-bold text-white\">Name: {{ pet?.name || 'N/A' }}</p>\n\n            <p class=\"text-sm text-[#f1f7feb5]\">Category: {{ pet?.category?.name || 'N/A' }}</p>\n          </div>\n        </div>\n\n        <button\n          class=\"rounded bg-[#3e63dd] p-1 text-sm font-medium text-white\"\n          type=\"button\"\n          @click=\"setRandomPetId\"\n        >\n          Get Random Pet\n        </button>\n      </div>\n\n      <form class=\"flex flex-col gap-3\" @submit.prevent=\"handleAddPet\">\n        <div class=\"flex w-64 flex-col gap-1\">\n          <label class=\"font-medium text-white\" for=\"name\">Name</label>\n\n          <input\n            v-model=\"petInput.name\"\n            class=\"rounded border border-[#575e64] bg-[#121314] p-1 text-sm text-white placeholder:text-[#575e64]\"\n            name=\"name\"\n            placeholder=\"Kitty\"\n            required\n          />\n        </div>\n\n        <div class=\"flex w-64 flex-col gap-1\">\n          <label class=\"font-medium text-white\" for=\"category\">Category</label>\n\n          <input\n            v-model=\"petInput.category\"\n            class=\"rounded border border-[#575e64] bg-[#121314] p-1 text-sm text-white placeholder:text-[#575e64]\"\n            name=\"category\"\n            placeholder=\"Cats\"\n            required\n          />\n        </div>\n\n        <div class=\"flex gap-2\">\n          <button class=\"rounded bg-[#3e63dd] p-2 text-sm font-medium text-white\" type=\"submit\">\n            Add Pet\n          </button>\n\n          <button\n            class=\"rounded bg-[#3e63dd] p-2 text-sm font-medium text-white disabled:cursor-not-allowed\"\n            :disabled=\"!pet\"\n            type=\"button\"\n            @click=\"handleUpdatePet\"\n          >\n            Update Pet\n          </button>\n        </div>\n      </form>\n    </div>\n  </div>\n\n  <pinia-colada-devtools />\n</template>\n"
  },
  {
    "path": "examples/openapi-ts-pinia-colada/tailwind.config.ts",
    "content": "import type { Config } from 'tailwindcss';\n\nexport default {\n  content: ['./index.html', './src/**/*.{vue,js,ts,jsx,tsx}'],\n  theme: {\n    extend: {},\n  },\n} satisfies Config;\n"
  },
  {
    "path": "examples/openapi-ts-pinia-colada/tsconfig.app.json",
    "content": "{\n  \"extends\": \"@vue/tsconfig/tsconfig.dom.json\",\n  \"include\": [\"./env.d.ts\", \"./src/**/*\", \"./src/**/*.vue\"],\n  \"exclude\": [\"./src/**/__tests__/*\"],\n  \"compilerOptions\": {\n    \"composite\": true,\n    \"tsBuildInfoFile\": \"./node_modules/.tmp/tsconfig.app.tsbuildinfo\",\n\n    \"baseUrl\": \".\",\n    \"paths\": {\n      \"@/*\": [\"./src/*\"]\n    }\n  }\n}\n"
  },
  {
    "path": "examples/openapi-ts-pinia-colada/tsconfig.json",
    "content": "{\n  \"files\": [],\n  \"references\": [\n    {\n      \"path\": \"./tsconfig.node.json\"\n    },\n    {\n      \"path\": \"./tsconfig.app.json\"\n    },\n    {\n      \"path\": \"./tsconfig.vitest.json\"\n    }\n  ]\n}\n"
  },
  {
    "path": "examples/openapi-ts-pinia-colada/tsconfig.node.json",
    "content": "{\n  \"extends\": \"@tsconfig/node24/tsconfig.json\",\n  \"include\": [\n    \"vite.config.*\",\n    \"vitest.config.*\",\n    \"cypress.config.*\",\n    \"nightwatch.conf.*\",\n    \"playwright.config.*\"\n  ],\n  \"compilerOptions\": {\n    \"composite\": true,\n    \"noEmit\": true,\n    \"tsBuildInfoFile\": \"./node_modules/.tmp/tsconfig.node.tsbuildinfo\",\n\n    \"module\": \"ESNext\",\n    \"moduleResolution\": \"Bundler\",\n    \"types\": [\"node\"]\n  }\n}\n"
  },
  {
    "path": "examples/openapi-ts-pinia-colada/tsconfig.vitest.json",
    "content": "{\n  \"extends\": \"./tsconfig.app.json\",\n  \"exclude\": [],\n  \"compilerOptions\": {\n    \"composite\": true,\n    \"tsBuildInfoFile\": \"./node_modules/.tmp/tsconfig.vitest.tsbuildinfo\",\n\n    \"lib\": [],\n    \"types\": [\"node\", \"jsdom\"]\n  }\n}\n"
  },
  {
    "path": "examples/openapi-ts-pinia-colada/vite.config.ts",
    "content": "import { fileURLToPath, URL } from 'node:url';\n\nimport vue from '@vitejs/plugin-vue';\nimport vueJsx from '@vitejs/plugin-vue-jsx';\nimport vueDevTools from 'vite-plugin-vue-devtools';\n\n/** @type {import('vite').UserConfig} */\nexport default {\n  build: {\n    sourcemap: true,\n    target: 'esnext',\n  },\n  esbuild: {\n    target: 'esnext',\n  },\n  optimizeDeps: {\n    esbuildOptions: {\n      target: 'esnext',\n    },\n  },\n  plugins: [vue(), vueJsx(), vueDevTools()],\n  resolve: {\n    alias: {\n      '@': fileURLToPath(new URL('./src', import.meta.url)),\n    },\n  },\n};\n"
  },
  {
    "path": "examples/openapi-ts-pinia-colada/vitest.config.ts",
    "content": "import { fileURLToPath } from 'node:url';\n\nimport { configDefaults, defineProject, mergeConfig } from 'vitest/config';\n\nimport viteConfig from './vite.config';\n\nexport default mergeConfig(\n  viteConfig,\n  defineProject({\n    test: {\n      environment: 'jsdom',\n      exclude: [...configDefaults.exclude, 'e2e/**'],\n      root: fileURLToPath(new URL('./', import.meta.url)),\n    },\n  }),\n);\n"
  },
  {
    "path": "examples/openapi-ts-tanstack-angular-query-experimental/.editorconfig",
    "content": "# Editor configuration, see https://editorconfig.org\nroot = true\n\n[*]\ncharset = utf-8\nindent_style = space\nindent_size = 2\ninsert_final_newline = true\ntrim_trailing_whitespace = true\n\n[*.ts]\nquote_type = single\nij_typescript_use_double_quotes = false\n\n[*.md]\nmax_line_length = off\ntrim_trailing_whitespace = false\n"
  },
  {
    "path": "examples/openapi-ts-tanstack-angular-query-experimental/.eslintignore",
    "content": ".angular\n"
  },
  {
    "path": "examples/openapi-ts-tanstack-angular-query-experimental/.gitignore",
    "content": "# See https://docs.github.com/get-started/getting-started-with-git/ignoring-files for more about ignoring files.\n\n# Compiled output\n/dist\n/tmp\n/out-tsc\n/bazel-out\n\n# Node\n/node_modules\nnpm-debug.log\nyarn-error.log\n\n# IDEs and editors\n.idea/\n.project\n.classpath\n.c9/\n*.launch\n.settings/\n*.sublime-workspace\n\n# Visual Studio Code\n.vscode/*\n!.vscode/settings.json\n!.vscode/tasks.json\n!.vscode/launch.json\n!.vscode/extensions.json\n.history/*\n\n# Miscellaneous\n/.angular/cache\n.sass-cache/\n/connect.lock\n/coverage\n/libpeerconnection.log\ntestem.log\n/typings\n\n# System files\n.DS_Store\nThumbs.db\n"
  },
  {
    "path": "examples/openapi-ts-tanstack-angular-query-experimental/.vscode/extensions.json",
    "content": "{\n  // For more information, visit: https://go.microsoft.com/fwlink/?linkid=827846\n  \"recommendations\": [\"angular.ng-template\"]\n}\n"
  },
  {
    "path": "examples/openapi-ts-tanstack-angular-query-experimental/.vscode/launch.json",
    "content": "{\n  // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387\n  \"version\": \"0.2.0\",\n  \"configurations\": [\n    {\n      \"name\": \"ng serve\",\n      \"type\": \"chrome\",\n      \"request\": \"launch\",\n      \"preLaunchTask\": \"npm: start\",\n      \"url\": \"http://localhost:4200/\"\n    },\n    {\n      \"name\": \"ng test\",\n      \"type\": \"chrome\",\n      \"request\": \"launch\",\n      \"preLaunchTask\": \"npm: test\",\n      \"url\": \"http://localhost:9876/debug.html\"\n    }\n  ]\n}\n"
  },
  {
    "path": "examples/openapi-ts-tanstack-angular-query-experimental/.vscode/tasks.json",
    "content": "{\n  // For more information, visit: https://go.microsoft.com/fwlink/?LinkId=733558\n  \"version\": \"2.0.0\",\n  \"tasks\": [\n    {\n      \"type\": \"npm\",\n      \"script\": \"start\",\n      \"isBackground\": true,\n      \"problemMatcher\": {\n        \"owner\": \"typescript\",\n        \"pattern\": \"$tsc\",\n        \"background\": {\n          \"activeOnStart\": true,\n          \"beginsPattern\": {\n            \"regexp\": \"(.*?)\"\n          },\n          \"endsPattern\": {\n            \"regexp\": \"bundle generation complete\"\n          }\n        }\n      }\n    },\n    {\n      \"type\": \"npm\",\n      \"script\": \"test\",\n      \"isBackground\": true,\n      \"problemMatcher\": {\n        \"owner\": \"typescript\",\n        \"pattern\": \"$tsc\",\n        \"background\": {\n          \"activeOnStart\": true,\n          \"beginsPattern\": {\n            \"regexp\": \"(.*?)\"\n          },\n          \"endsPattern\": {\n            \"regexp\": \"bundle generation complete\"\n          }\n        }\n      }\n    }\n  ]\n}\n"
  },
  {
    "path": "examples/openapi-ts-tanstack-angular-query-experimental/CHANGELOG.md",
    "content": "# @example/openapi-ts-tanstack-angular-query-experimental\n\n## 0.0.28\n\n### Patch Changes\n\n- Updated dependencies [[`f23f3ae`](https://github.com/hey-api/openapi-ts/commit/f23f3ae874385e758eb8d43bb4e274c9858a4e40)]:\n  - @hey-api/client-fetch@0.13.1\n\n## 0.0.27\n\n### Patch Changes\n\n- Updated dependencies [[`10d2e03`](https://github.com/hey-api/openapi-ts/commit/10d2e03b8295e4e887fab8d023aa823699efbae8)]:\n  - @hey-api/client-fetch@0.13.0\n\n## 0.0.26\n\n### Patch Changes\n\n- Updated dependencies [[`4d8c030`](https://github.com/hey-api/openapi-ts/commit/4d8c03038979c9a75315cc158789b3c198c62f90)]:\n  - @hey-api/client-fetch@0.12.0\n\n## 0.0.25\n\n### Patch Changes\n\n- Updated dependencies [[`8152aaf`](https://github.com/hey-api/openapi-ts/commit/8152aaf4892c48b79fd3dc486eb3c0ea333dc3e6)]:\n  - @hey-api/client-fetch@0.11.0\n\n## 0.0.24\n\n### Patch Changes\n\n- Updated dependencies [[`1f99066`](https://github.com/hey-api/openapi-ts/commit/1f99066efbb2d0e6b9e3710c701293c2cc09d65e)]:\n  - @hey-api/client-fetch@0.10.2\n\n## 0.0.23\n\n### Patch Changes\n\n- Updated dependencies [[`565e0b8`](https://github.com/hey-api/openapi-ts/commit/565e0b89fbab4556ecdc63dfe08250942681140e)]:\n  - @hey-api/client-fetch@0.10.1\n\n## 0.0.22\n\n### Patch Changes\n\n- Updated dependencies [[`fed9699`](https://github.com/hey-api/openapi-ts/commit/fed969985275621c7c2b65ffc760c7c66fafaf72)]:\n  - @hey-api/client-fetch@0.10.0\n\n## 0.0.21\n\n### Patch Changes\n\n- Updated dependencies [[`67c385b`](https://github.com/hey-api/openapi-ts/commit/67c385bf6289a79726b0cdd85fd81ca501cf2248)]:\n  - @hey-api/client-fetch@0.9.0\n\n## 0.0.20\n\n### Patch Changes\n\n- Updated dependencies [[`fe43b88`](https://github.com/hey-api/openapi-ts/commit/fe43b889c20a2001f56e259f93f64851a1caa1d1)]:\n  - @hey-api/client-fetch@0.8.4\n\n## 0.0.19\n\n### Patch Changes\n\n- Updated dependencies [[`c0b36b9`](https://github.com/hey-api/openapi-ts/commit/c0b36b95645d484034c3af145c5554867568979b)]:\n  - @hey-api/client-fetch@0.8.3\n\n## 0.0.18\n\n### Patch Changes\n\n- Updated dependencies [[`b8cc9f8`](https://github.com/hey-api/openapi-ts/commit/b8cc9f8a5eaf4f4ff345abc49c14c6b96744c2ea)]:\n  - @hey-api/client-fetch@0.8.2\n\n## 0.0.17\n\n### Patch Changes\n\n- Updated dependencies [[`7f0f4a7`](https://github.com/hey-api/openapi-ts/commit/7f0f4a76b06c8fafb33581b522faf8efc6fd85ac)]:\n  - @hey-api/client-fetch@0.8.1\n\n## 0.0.16\n\n### Patch Changes\n\n- Updated dependencies [[`bb6d46a`](https://github.com/hey-api/openapi-ts/commit/bb6d46ae119ce4e7e3a2ab3fded74ac4fb4cdff2)]:\n  - @hey-api/client-fetch@0.8.0\n\n## 0.0.15\n\n### Patch Changes\n\n- Updated dependencies [[`2dc380e`](https://github.com/hey-api/openapi-ts/commit/2dc380eabc17c723654beb04ecd7bce6d33d3b49), [`603541e`](https://github.com/hey-api/openapi-ts/commit/603541e307dc2953da7dddd300176865629b50bb), [`2cbffeb`](https://github.com/hey-api/openapi-ts/commit/2cbffeb2cdd6c6143cd68cac68369584879dda31), [`2cbffeb`](https://github.com/hey-api/openapi-ts/commit/2cbffeb2cdd6c6143cd68cac68369584879dda31)]:\n  - @hey-api/client-fetch@0.7.3\n\n## 0.0.14\n\n### Patch Changes\n\n- Updated dependencies [[`8eba19d`](https://github.com/hey-api/openapi-ts/commit/8eba19d4092fc0903572ab9fdadf0b4c26928ba2)]:\n  - @hey-api/client-fetch@0.7.2\n\n## 0.0.13\n\n### Patch Changes\n\n- Updated dependencies [[`0432418`](https://github.com/hey-api/openapi-ts/commit/0432418d72c94ef94865f8216ed2f723ad5191f9), [`4784727`](https://github.com/hey-api/openapi-ts/commit/47847276e8bc854045044dd414382080270dd779)]:\n  - @hey-api/client-fetch@0.7.1\n\n## 0.0.12\n\n### Patch Changes\n\n- Updated dependencies [[`465410c`](https://github.com/hey-api/openapi-ts/commit/465410c201eb19e737e3143ad53a146e95f80107)]:\n  - @hey-api/client-fetch@0.7.0\n\n## 0.0.11\n\n### Patch Changes\n\n- Updated dependencies [[`e2e1410`](https://github.com/hey-api/openapi-ts/commit/e2e1410b22c0c84c40d1b1803e9650d546350cb7)]:\n  - @hey-api/client-fetch@0.6.0\n\n## 0.0.10\n\n### Patch Changes\n\n- Updated dependencies [[`20d7497`](https://github.com/hey-api/openapi-ts/commit/20d7497acb6c046f6a4206c2d8137414e17b2263), [`f86d293`](https://github.com/hey-api/openapi-ts/commit/f86d293f18f133ef6dd2f4864d037611b81edd26)]:\n  - @hey-api/client-fetch@0.5.7\n\n## 0.0.9\n\n### Patch Changes\n\n- Updated dependencies [[`ba56424`](https://github.com/hey-api/openapi-ts/commit/ba5642486cdd5461c2372c34b63019c02bc6874e)]:\n  - @hey-api/client-fetch@0.5.6\n\n## 0.0.8\n\n### Patch Changes\n\n- Updated dependencies [[`9cec9e8`](https://github.com/hey-api/openapi-ts/commit/9cec9e8582c12a8c041b922d9587e16f6f19782a)]:\n  - @hey-api/client-fetch@0.5.5\n\n## 0.0.7\n\n### Patch Changes\n\n- Updated dependencies [[`cbf4e84`](https://github.com/hey-api/openapi-ts/commit/cbf4e84db7f3a47f19d8c3eaa87c71b27912c1a2)]:\n  - @hey-api/client-fetch@0.5.4\n\n## 0.0.6\n\n### Patch Changes\n\n- Updated dependencies [[`646064d`](https://github.com/hey-api/openapi-ts/commit/646064d1aecea988d2b4df73bd24b2ee83394ae0)]:\n  - @hey-api/client-fetch@0.5.3\n\n## 0.0.5\n\n### Patch Changes\n\n- Updated dependencies [[`ec48d32`](https://github.com/hey-api/openapi-ts/commit/ec48d323d80de8e6a47ce7ecd732288f0a47e17a)]:\n  - @hey-api/client-fetch@0.5.2\n\n## 0.0.4\n\n### Patch Changes\n\n- Updated dependencies [[`fa8b0f1`](https://github.com/hey-api/openapi-ts/commit/fa8b0f11ed99c63f694a494944ccc2fbfa9706cc)]:\n  - @hey-api/client-fetch@0.5.1\n\n## 0.0.3\n\n### Patch Changes\n\n- Updated dependencies [[`734a62d`](https://github.com/hey-api/openapi-ts/commit/734a62dd8d594b8266964fe16766a481d37eb7df), [`734a62d`](https://github.com/hey-api/openapi-ts/commit/734a62dd8d594b8266964fe16766a481d37eb7df)]:\n  - @hey-api/client-fetch@0.5.0\n\n## 0.0.2\n\n### Patch Changes\n\n- Updated dependencies [[`4c853d0`](https://github.com/hey-api/openapi-ts/commit/4c853d090b79245854d13831f64731db4a92978b)]:\n  - @hey-api/client-fetch@0.4.4\n\n## 0.0.1\n\n### Patch Changes\n\n- Updated dependencies [[`01dee3d`](https://github.com/hey-api/openapi-ts/commit/01dee3df879232939e43355231147b3d910fb482)]:\n  - @hey-api/client-fetch@0.4.3\n"
  },
  {
    "path": "examples/openapi-ts-tanstack-angular-query-experimental/README.md",
    "content": "# OpenapiTsTanstackAngularQueryExperimental\n\nThis project was generated with [Angular CLI](https://github.com/angular/angular-cli) version 18.2.7.\n\n## Development server\n\nRun `ng serve` for a dev server. Navigate to `http://localhost:4200/`. The application will automatically reload if you change any of the source files.\n\n## Code scaffolding\n\nRun `ng generate component component-name` to generate a new component. You can also use `ng generate directive|pipe|service|class|guard|interface|enum|module`.\n\n## Build\n\nRun `ng build` to build the project. The build artifacts will be stored in the `dist/` directory.\n\n## Running unit tests\n\nRun `ng test` to execute the unit tests via [Karma](https://karma-runner.github.io).\n\n## Running end-to-end tests\n\nRun `ng e2e` to execute the end-to-end tests via a platform of your choice. To use this command, you need to first add a package that implements end-to-end testing capabilities.\n\n## Further help\n\nTo get more help on the Angular CLI use `ng help` or go check out the [Angular CLI Overview and Command Reference](https://angular.dev/tools/cli) page.\n"
  },
  {
    "path": "examples/openapi-ts-tanstack-angular-query-experimental/angular.json",
    "content": "{\n  \"$schema\": \"./node_modules/@angular/cli/lib/config/schema.json\",\n  \"version\": 1,\n  \"newProjectRoot\": \"projects\",\n  \"projects\": {\n    \"openapi-ts-tanstack-angular-query-experimental\": {\n      \"projectType\": \"application\",\n      \"schematics\": {},\n      \"root\": \"\",\n      \"sourceRoot\": \"src\",\n      \"prefix\": \"app\",\n      \"architect\": {\n        \"build\": {\n          \"builder\": \"@angular-devkit/build-angular:application\",\n          \"options\": {\n            \"outputPath\": \"dist/openapi-ts-tanstack-angular-query-experimental\",\n            \"index\": \"src/index.html\",\n            \"browser\": \"src/main.ts\",\n            \"polyfills\": [\"zone.js\"],\n            \"tsConfig\": \"tsconfig.app.json\",\n            \"assets\": [\n              {\n                \"glob\": \"**/*\",\n                \"input\": \"public\"\n              }\n            ],\n            \"styles\": [\"@angular/material/prebuilt-themes/azure-blue.css\", \"src/styles.css\"],\n            \"scripts\": []\n          },\n          \"configurations\": {\n            \"production\": {\n              \"budgets\": [\n                {\n                  \"type\": \"initial\",\n                  \"maximumWarning\": \"500kB\",\n                  \"maximumError\": \"1MB\"\n                },\n                {\n                  \"type\": \"anyComponentStyle\",\n                  \"maximumWarning\": \"2kB\",\n                  \"maximumError\": \"4kB\"\n                }\n              ],\n              \"outputHashing\": \"all\"\n            },\n            \"development\": {\n              \"optimization\": false,\n              \"extractLicenses\": false,\n              \"sourceMap\": true\n            }\n          },\n          \"defaultConfiguration\": \"production\"\n        },\n        \"serve\": {\n          \"builder\": \"@angular-devkit/build-angular:dev-server\",\n          \"configurations\": {\n            \"production\": {\n              \"buildTarget\": \"openapi-ts-tanstack-angular-query-experimental:build:production\"\n            },\n            \"development\": {\n              \"buildTarget\": \"openapi-ts-tanstack-angular-query-experimental:build:development\"\n            }\n          },\n          \"defaultConfiguration\": \"development\"\n        },\n        \"extract-i18n\": {\n          \"builder\": \"@angular-devkit/build-angular:extract-i18n\"\n        }\n      }\n    }\n  },\n  \"cli\": {\n    \"analytics\": false\n  }\n}\n"
  },
  {
    "path": "examples/openapi-ts-tanstack-angular-query-experimental/openapi-ts.config.ts",
    "content": "import { defineConfig } from '@hey-api/openapi-ts';\n\nexport default defineConfig({\n  input:\n    'https://raw.githubusercontent.com/swagger-api/swagger-petstore/master/src/main/resources/openapi.yaml',\n  logs: {\n    path: './logs',\n  },\n  output: {\n    path: './src/client',\n    postProcess: ['oxfmt', 'eslint'],\n  },\n  plugins: [\n    {\n      name: '@hey-api/client-angular',\n      // throwOnError: true,\n    },\n    '@hey-api/schemas',\n    '@hey-api/sdk',\n    {\n      enums: 'javascript',\n      name: '@hey-api/typescript',\n    },\n    '@tanstack/angular-query-experimental',\n  ],\n});\n"
  },
  {
    "path": "examples/openapi-ts-tanstack-angular-query-experimental/package.json",
    "content": "{\n  \"name\": \"@example/openapi-ts-tanstack-angular-query-experimental\",\n  \"version\": \"0.0.28\",\n  \"private\": true,\n  \"scripts\": {\n    \"ng\": \"ng\",\n    \"start\": \"ng serve\",\n    \"build\": \"ng build\",\n    \"watch\": \"ng build --watch --configuration development\",\n    \"openapi-ts\": \"openapi-ts\",\n    \"typecheck\": \"tsc --project tsconfig.app.json --noEmit\"\n  },\n  \"dependencies\": {\n    \"@angular/animations\": \"21.1.2\",\n    \"@angular/cdk\": \"21.1.2\",\n    \"@angular/common\": \"21.1.2\",\n    \"@angular/compiler\": \"21.1.2\",\n    \"@angular/core\": \"21.1.2\",\n    \"@angular/forms\": \"21.1.2\",\n    \"@angular/material\": \"21.1.2\",\n    \"@angular/platform-browser\": \"21.1.2\",\n    \"@angular/platform-browser-dynamic\": \"21.1.2\",\n    \"@angular/router\": \"21.1.2\",\n    \"@tanstack/angular-query-experimental\": \"5.73.3\",\n    \"rxjs\": \"7.8.2\",\n    \"tslib\": \"2.8.1\",\n    \"zone.js\": \"0.16.0\"\n  },\n  \"devDependencies\": {\n    \"@angular-devkit/build-angular\": \"21.1.2\",\n    \"@angular/cli\": \"21.1.2\",\n    \"@angular/compiler-cli\": \"21.1.2\",\n    \"@hey-api/openapi-ts\": \"workspace:*\",\n    \"@types/jasmine\": \"5.1.9\",\n    \"jasmine-core\": \"5.6.0\",\n    \"karma\": \"6.4.4\",\n    \"karma-chrome-launcher\": \"3.2.0\",\n    \"karma-coverage\": \"2.2.1\",\n    \"karma-jasmine\": \"5.1.0\",\n    \"karma-jasmine-html-reporter\": \"2.1.0\",\n    \"typescript\": \"5.9.3\"\n  }\n}\n"
  },
  {
    "path": "examples/openapi-ts-tanstack-angular-query-experimental/src/app/app.component.css",
    "content": ":host {\n  display: contents;\n}\n"
  },
  {
    "path": "examples/openapi-ts-tanstack-angular-query-experimental/src/app/app.component.html",
    "content": "<router-outlet />\n"
  },
  {
    "path": "examples/openapi-ts-tanstack-angular-query-experimental/src/app/app.component.ts",
    "content": "import { Component } from '@angular/core';\nimport { RouterOutlet } from '@angular/router';\n\n@Component({\n  imports: [RouterOutlet],\n  selector: 'app-root',\n  standalone: true,\n  styleUrl: './app.component.css',\n  templateUrl: './app.component.html',\n})\nexport class AppComponent {\n  title = 'openapi-ts-tanstack-angular-query-experimental';\n}\n"
  },
  {
    "path": "examples/openapi-ts-tanstack-angular-query-experimental/src/app/app.config.ts",
    "content": "import { provideHttpClient, withFetch } from '@angular/common/http';\nimport type { ApplicationConfig } from '@angular/core';\nimport { provideZoneChangeDetection } from '@angular/core';\nimport { provideAnimationsAsync } from '@angular/platform-browser/animations/async';\nimport { provideRouter } from '@angular/router';\nimport { provideTanStackQuery, QueryClient } from '@tanstack/angular-query-experimental';\n\nimport { client } from '../client/client.gen';\nimport { provideHeyApiClient } from '../client/client/client.gen';\nimport { routes } from './app.routes';\n\nexport const appConfig: ApplicationConfig = {\n  providers: [\n    provideZoneChangeDetection({ eventCoalescing: true }),\n    provideRouter(routes),\n    provideHttpClient(withFetch()),\n    provideHeyApiClient(client),\n    provideTanStackQuery(\n      new QueryClient({\n        defaultOptions: {\n          queries: {\n            retry: 0,\n          },\n        },\n      }),\n    ),\n    provideAnimationsAsync(),\n  ],\n};\n"
  },
  {
    "path": "examples/openapi-ts-tanstack-angular-query-experimental/src/app/app.routes.ts",
    "content": "import type { Routes } from '@angular/router';\n\nimport { PetStoreComponent } from './pet-store/pet-store.component';\n\nexport const routes: Routes = [\n  {\n    component: PetStoreComponent,\n    path: '',\n  },\n];\n"
  },
  {
    "path": "examples/openapi-ts-tanstack-angular-query-experimental/src/app/pet-store/pet-store.component.css",
    "content": ":host {\n  display: grid;\n  gap: 20px;\n  max-width: 400px;\n  margin: auto;\n}\n\n.pet-store-header {\n  display: flex;\n  gap: 1rem;\n  align-items: flex-start;\n  flex-wrap: wrap;\n}\n\nmat-card {\n  margin-bottom: 20px;\n}\n\n.pet-card {\n  width: 100%;\n  margin-top: 1rem;\n}\n\n.pet-card-title {\n  font-size: 1.4rem;\n  font-weight: 600;\n}\n\n.pet-card-subtitle {\n  font-size: 1rem;\n  color: #666;\n}\n\n.pet-card-image {\n  object-fit: cover;\n  min-height: 180px;\n  background: #fafafa;\n}\n\n.pet-status {\n  margin-top: 0.5rem;\n  color: #888;\n}\n\n.pet-form-card {\n  margin-top: 2rem;\n  max-width: 400px;\n}\n\n.pet-form-title {\n  font-size: 1.2rem;\n  font-weight: 500;\n}\n\n.pet-form-content {\n  display: flex;\n  flex-direction: column;\n  gap: 1rem;\n}\n\n.actions {\n  display: flex;\n  gap: 0.5rem;\n}\n"
  },
  {
    "path": "examples/openapi-ts-tanstack-angular-query-experimental/src/app/pet-store/pet-store.component.html",
    "content": "@let pet = petState.data();\n<div class=\"pet-store-header\">\n  <button mat-raised-button color=\"primary\" (click)=\"getRandomPet()\">Get Random Pet</button>\n\n  <mat-card class=\"pet-card mat-elevation-z8\">\n    @if (petState.isLoading()) {\n      <mat-spinner />\n    }\n\n    @if (pet) {\n      <mat-card-header>\n        <mat-card-title class=\"pet-card-title\">{{ pet.name }}</mat-card-title>\n        <mat-card-subtitle class=\"pet-card-subtitle\">{{ pet.category?.name }}</mat-card-subtitle>\n      </mat-card-header>\n      <!-- <img mat-card-image [src]=\"pet.photoUrls.at(0)\" alt=\"{{ pet.name }}\" class=\"pet-card-image\" /> -->\n      <mat-card-content>\n        <p class=\"pet-status\">\n          Status: <b>{{ pet.status }}</b>\n        </p>\n      </mat-card-content>\n    }\n  </mat-card>\n</div>\n\n@if (addPet.data()) {\n  <pre>\n    <code>{{addPet.data()|json}}</code>\n  </pre>\n}\n\n@if (updatePet.data()) {\n  <pre>\n    <code>{{updatePet.data()|json}}</code>\n  </pre>\n}\n\n<form #petForm=\"ngForm\" (submit)=\"onSubmit(petForm)\">\n  <mat-card class=\"pet-form-card mat-elevation-z4\">\n    <mat-card-header>\n      <mat-card-title><span class=\"pet-form-title\">Pet Form</span></mat-card-title>\n    </mat-card-header>\n    <mat-card-content class=\"pet-form-content\">\n      <mat-form-field appearance=\"fill\">\n        <mat-label>Name</mat-label>\n        <input matInput name=\"name\" [(ngModel)]=\"nextPetState.name\" required />\n      </mat-form-field>\n    </mat-card-content>\n    <mat-card-footer>\n      <mat-card-actions class=\"actions\">\n        <button mat-raised-button color=\"primary\" type=\"submit\">Add Pet</button>\n        <button mat-stroked-button color=\"accent\" (click)=\"handleUpdatePet($event)\">\n          Update Pet\n        </button>\n      </mat-card-actions>\n    </mat-card-footer>\n  </mat-card>\n</form>\n"
  },
  {
    "path": "examples/openapi-ts-tanstack-angular-query-experimental/src/app/pet-store/pet-store.component.ts",
    "content": "import { JsonPipe } from '@angular/common';\nimport { Component, effect, inject, signal, viewChild } from '@angular/core';\nimport { FormsModule, NgForm } from '@angular/forms';\nimport { MatButtonModule } from '@angular/material/button';\nimport { MatCardModule } from '@angular/material/card';\nimport { MatFormFieldModule } from '@angular/material/form-field';\nimport { MatInputModule } from '@angular/material/input';\nimport { MatProgressSpinner } from '@angular/material/progress-spinner';\nimport { MatSnackBar } from '@angular/material/snack-bar';\nimport { injectMutation, injectQuery } from '@tanstack/angular-query-experimental';\n\nimport type { Pet } from '../../client';\nimport {\n  addPetMutation,\n  getPetByIdOptions,\n  updatePetMutation,\n} from '../../client/@tanstack/angular-query-experimental.gen';\n\n@Component({\n  imports: [\n    JsonPipe,\n    FormsModule,\n    MatButtonModule,\n    MatCardModule,\n    MatFormFieldModule,\n    MatInputModule,\n    MatProgressSpinner,\n  ],\n  selector: 'app-pet-store',\n  standalone: true,\n  styleUrls: ['./pet-store.component.css'],\n  templateUrl: './pet-store.component.html',\n})\nexport class PetStoreComponent {\n  #snackbar = inject(MatSnackBar);\n  form = viewChild.required(NgForm);\n\n  petId = signal<Pet['id']>(undefined);\n\n  petState = injectQuery(() => ({\n    enabled: (this.petId() ?? 0) > 0,\n    ...getPetByIdOptions({\n      path: { petId: this.petId()! },\n    }),\n  }));\n\n  addPet = injectMutation(() => ({\n    ...addPetMutation(),\n    onError: (err) => {\n      this.#snackbar.open(err.message);\n    },\n    onSuccess: () => {\n      this.#snackbar.open('Pet added successfully!');\n    },\n  }));\n  updatePet = injectMutation(() => ({\n    ...updatePetMutation(),\n    onError: (err) => {\n      this.#snackbar.open(err.message);\n    },\n    onSuccess: () => {\n      this.#snackbar.open('Pet updated successfully!');\n    },\n  }));\n\n  nextPetState: Partial<Pet> = {};\n\n  constructor() {\n    effect(() => {\n      const err = this.petState.error();\n\n      if (err) {\n        this.#snackbar.open(String(err));\n      }\n    });\n\n    effect(() => {\n      this.nextPetState = { ...this.petState.data() };\n    });\n  }\n\n  getRandomPet() {\n    // random id 1-10\n    this.petId.set(Math.floor(Math.random() * (10 - 1 + 1) + 1));\n  }\n\n  handleUpdatePet = async (event: Event) => {\n    event.preventDefault();\n\n    await this.updatePet.mutateAsync({\n      body: this.nextPetState as Pet,\n    });\n  };\n\n  onSubmit = async (form: NgForm) => {\n    if (!form.valid) {\n      return;\n    }\n\n    await this.addPet.mutateAsync({\n      body: this.nextPetState as Pet,\n    });\n  };\n}\n"
  },
  {
    "path": "examples/openapi-ts-tanstack-angular-query-experimental/src/client/@tanstack/angular-query-experimental.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport {\n  type DefaultError,\n  type MutationOptions,\n  queryOptions,\n} from '@tanstack/angular-query-experimental';\n\nimport { client } from '../client.gen';\nimport {\n  addPet,\n  createUser,\n  createUsersWithListInput,\n  deleteOrder,\n  deletePet,\n  deleteUser,\n  findPetsByStatus,\n  findPetsByTags,\n  getInventory,\n  getOrderById,\n  getPetById,\n  getUserByName,\n  loginUser,\n  logoutUser,\n  type Options,\n  placeOrder,\n  updatePet,\n  updatePetWithForm,\n  updateUser,\n  uploadFile,\n} from '../sdk.gen';\nimport type {\n  AddPetData,\n  AddPetResponse,\n  CreateUserData,\n  CreateUserResponse,\n  CreateUsersWithListInputData,\n  CreateUsersWithListInputResponse,\n  DeleteOrderData,\n  DeletePetData,\n  DeleteUserData,\n  FindPetsByStatusData,\n  FindPetsByStatusResponse,\n  FindPetsByTagsData,\n  FindPetsByTagsResponse,\n  GetInventoryData,\n  GetInventoryResponse,\n  GetOrderByIdData,\n  GetOrderByIdResponse,\n  GetPetByIdData,\n  GetPetByIdResponse,\n  GetUserByNameData,\n  GetUserByNameResponse,\n  LoginUserData,\n  LoginUserResponse,\n  LogoutUserData,\n  PlaceOrderData,\n  PlaceOrderResponse,\n  UpdatePetData,\n  UpdatePetResponse,\n  UpdatePetWithFormData,\n  UpdatePetWithFormResponse,\n  UpdateUserData,\n  UploadFileData,\n  UploadFileResponse,\n} from '../types.gen';\n\n/**\n * Add a new pet to the store.\n *\n * Add a new pet to the store.\n */\nexport const addPetMutation = (\n  options?: Partial<Options<AddPetData>>,\n): MutationOptions<AddPetResponse, DefaultError, Options<AddPetData>> => {\n  const mutationOptions: MutationOptions<AddPetResponse, DefaultError, Options<AddPetData>> = {\n    mutationFn: async (fnOptions) => {\n      const { data } = await addPet({\n        ...options,\n        ...fnOptions,\n        throwOnError: true,\n      });\n      return data;\n    },\n  };\n  return mutationOptions;\n};\n\n/**\n * Update an existing pet.\n *\n * Update an existing pet by Id.\n */\nexport const updatePetMutation = (\n  options?: Partial<Options<UpdatePetData>>,\n): MutationOptions<UpdatePetResponse, DefaultError, Options<UpdatePetData>> => {\n  const mutationOptions: MutationOptions<\n    UpdatePetResponse,\n    DefaultError,\n    Options<UpdatePetData>\n  > = {\n    mutationFn: async (fnOptions) => {\n      const { data } = await updatePet({\n        ...options,\n        ...fnOptions,\n        throwOnError: true,\n      });\n      return data;\n    },\n  };\n  return mutationOptions;\n};\n\nexport type QueryKey<TOptions extends Options> = [\n  Pick<TOptions, 'baseUrl' | 'body' | 'headers' | 'path' | 'query'> & {\n    _id: string;\n    _infinite?: boolean;\n    tags?: ReadonlyArray<string>;\n  },\n];\n\nconst createQueryKey = <TOptions extends Options>(\n  id: string,\n  options?: TOptions,\n  infinite?: boolean,\n  tags?: ReadonlyArray<string>,\n): [QueryKey<TOptions>[0]] => {\n  const params: QueryKey<TOptions>[0] = {\n    _id: id,\n    baseUrl: options?.baseUrl || (options?.client ?? client).getConfig().baseUrl,\n  } as QueryKey<TOptions>[0];\n  if (infinite) {\n    params._infinite = infinite;\n  }\n  if (tags) {\n    params.tags = tags;\n  }\n  if (options?.body) {\n    params.body = options.body;\n  }\n  if (options?.headers) {\n    params.headers = options.headers;\n  }\n  if (options?.path) {\n    params.path = options.path;\n  }\n  if (options?.query) {\n    params.query = options.query;\n  }\n  return [params];\n};\n\nexport const findPetsByStatusQueryKey = (options: Options<FindPetsByStatusData>) =>\n  createQueryKey('findPetsByStatus', options);\n\n/**\n * Finds Pets by status.\n *\n * Multiple status values can be provided with comma separated strings.\n */\nexport const findPetsByStatusOptions = (options: Options<FindPetsByStatusData>) =>\n  queryOptions<\n    FindPetsByStatusResponse,\n    DefaultError,\n    FindPetsByStatusResponse,\n    ReturnType<typeof findPetsByStatusQueryKey>\n  >({\n    queryFn: async ({ queryKey, signal }) => {\n      const { data } = await findPetsByStatus({\n        ...options,\n        ...queryKey[0],\n        signal,\n        throwOnError: true,\n      });\n      return data;\n    },\n    queryKey: findPetsByStatusQueryKey(options),\n  });\n\nexport const findPetsByTagsQueryKey = (options: Options<FindPetsByTagsData>) =>\n  createQueryKey('findPetsByTags', options);\n\n/**\n * Finds Pets by tags.\n *\n * Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.\n */\nexport const findPetsByTagsOptions = (options: Options<FindPetsByTagsData>) =>\n  queryOptions<\n    FindPetsByTagsResponse,\n    DefaultError,\n    FindPetsByTagsResponse,\n    ReturnType<typeof findPetsByTagsQueryKey>\n  >({\n    queryFn: async ({ queryKey, signal }) => {\n      const { data } = await findPetsByTags({\n        ...options,\n        ...queryKey[0],\n        signal,\n        throwOnError: true,\n      });\n      return data;\n    },\n    queryKey: findPetsByTagsQueryKey(options),\n  });\n\n/**\n * Deletes a pet.\n *\n * Delete a pet.\n */\nexport const deletePetMutation = (\n  options?: Partial<Options<DeletePetData>>,\n): MutationOptions<unknown, DefaultError, Options<DeletePetData>> => {\n  const mutationOptions: MutationOptions<unknown, DefaultError, Options<DeletePetData>> = {\n    mutationFn: async (fnOptions) => {\n      const { data } = await deletePet({\n        ...options,\n        ...fnOptions,\n        throwOnError: true,\n      });\n      return data;\n    },\n  };\n  return mutationOptions;\n};\n\nexport const getPetByIdQueryKey = (options: Options<GetPetByIdData>) =>\n  createQueryKey('getPetById', options);\n\n/**\n * Find pet by ID.\n *\n * Returns a single pet.\n */\nexport const getPetByIdOptions = (options: Options<GetPetByIdData>) =>\n  queryOptions<\n    GetPetByIdResponse,\n    DefaultError,\n    GetPetByIdResponse,\n    ReturnType<typeof getPetByIdQueryKey>\n  >({\n    queryFn: async ({ queryKey, signal }) => {\n      const { data } = await getPetById({\n        ...options,\n        ...queryKey[0],\n        signal,\n        throwOnError: true,\n      });\n      return data;\n    },\n    queryKey: getPetByIdQueryKey(options),\n  });\n\n/**\n * Updates a pet in the store with form data.\n *\n * Updates a pet resource based on the form data.\n */\nexport const updatePetWithFormMutation = (\n  options?: Partial<Options<UpdatePetWithFormData>>,\n): MutationOptions<UpdatePetWithFormResponse, DefaultError, Options<UpdatePetWithFormData>> => {\n  const mutationOptions: MutationOptions<\n    UpdatePetWithFormResponse,\n    DefaultError,\n    Options<UpdatePetWithFormData>\n  > = {\n    mutationFn: async (fnOptions) => {\n      const { data } = await updatePetWithForm({\n        ...options,\n        ...fnOptions,\n        throwOnError: true,\n      });\n      return data;\n    },\n  };\n  return mutationOptions;\n};\n\n/**\n * Uploads an image.\n *\n * Upload image of the pet.\n */\nexport const uploadFileMutation = (\n  options?: Partial<Options<UploadFileData>>,\n): MutationOptions<UploadFileResponse, DefaultError, Options<UploadFileData>> => {\n  const mutationOptions: MutationOptions<\n    UploadFileResponse,\n    DefaultError,\n    Options<UploadFileData>\n  > = {\n    mutationFn: async (fnOptions) => {\n      const { data } = await uploadFile({\n        ...options,\n        ...fnOptions,\n        throwOnError: true,\n      });\n      return data;\n    },\n  };\n  return mutationOptions;\n};\n\nexport const getInventoryQueryKey = (options?: Options<GetInventoryData>) =>\n  createQueryKey('getInventory', options);\n\n/**\n * Returns pet inventories by status.\n *\n * Returns a map of status codes to quantities.\n */\nexport const getInventoryOptions = (options?: Options<GetInventoryData>) =>\n  queryOptions<\n    GetInventoryResponse,\n    DefaultError,\n    GetInventoryResponse,\n    ReturnType<typeof getInventoryQueryKey>\n  >({\n    queryFn: async ({ queryKey, signal }) => {\n      const { data } = await getInventory({\n        ...options,\n        ...queryKey[0],\n        signal,\n        throwOnError: true,\n      });\n      return data;\n    },\n    queryKey: getInventoryQueryKey(options),\n  });\n\n/**\n * Place an order for a pet.\n *\n * Place a new order in the store.\n */\nexport const placeOrderMutation = (\n  options?: Partial<Options<PlaceOrderData>>,\n): MutationOptions<PlaceOrderResponse, DefaultError, Options<PlaceOrderData>> => {\n  const mutationOptions: MutationOptions<\n    PlaceOrderResponse,\n    DefaultError,\n    Options<PlaceOrderData>\n  > = {\n    mutationFn: async (fnOptions) => {\n      const { data } = await placeOrder({\n        ...options,\n        ...fnOptions,\n        throwOnError: true,\n      });\n      return data;\n    },\n  };\n  return mutationOptions;\n};\n\n/**\n * Delete purchase order by identifier.\n *\n * For valid response try integer IDs with value < 1000. Anything above 1000 or non-integers will generate API errors.\n */\nexport const deleteOrderMutation = (\n  options?: Partial<Options<DeleteOrderData>>,\n): MutationOptions<unknown, DefaultError, Options<DeleteOrderData>> => {\n  const mutationOptions: MutationOptions<unknown, DefaultError, Options<DeleteOrderData>> = {\n    mutationFn: async (fnOptions) => {\n      const { data } = await deleteOrder({\n        ...options,\n        ...fnOptions,\n        throwOnError: true,\n      });\n      return data;\n    },\n  };\n  return mutationOptions;\n};\n\nexport const getOrderByIdQueryKey = (options: Options<GetOrderByIdData>) =>\n  createQueryKey('getOrderById', options);\n\n/**\n * Find purchase order by ID.\n *\n * For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions.\n */\nexport const getOrderByIdOptions = (options: Options<GetOrderByIdData>) =>\n  queryOptions<\n    GetOrderByIdResponse,\n    DefaultError,\n    GetOrderByIdResponse,\n    ReturnType<typeof getOrderByIdQueryKey>\n  >({\n    queryFn: async ({ queryKey, signal }) => {\n      const { data } = await getOrderById({\n        ...options,\n        ...queryKey[0],\n        signal,\n        throwOnError: true,\n      });\n      return data;\n    },\n    queryKey: getOrderByIdQueryKey(options),\n  });\n\n/**\n * Create user.\n *\n * This can only be done by the logged in user.\n */\nexport const createUserMutation = (\n  options?: Partial<Options<CreateUserData>>,\n): MutationOptions<CreateUserResponse, DefaultError, Options<CreateUserData>> => {\n  const mutationOptions: MutationOptions<\n    CreateUserResponse,\n    DefaultError,\n    Options<CreateUserData>\n  > = {\n    mutationFn: async (fnOptions) => {\n      const { data } = await createUser({\n        ...options,\n        ...fnOptions,\n        throwOnError: true,\n      });\n      return data;\n    },\n  };\n  return mutationOptions;\n};\n\n/**\n * Creates list of users with given input array.\n *\n * Creates list of users with given input array.\n */\nexport const createUsersWithListInputMutation = (\n  options?: Partial<Options<CreateUsersWithListInputData>>,\n): MutationOptions<\n  CreateUsersWithListInputResponse,\n  DefaultError,\n  Options<CreateUsersWithListInputData>\n> => {\n  const mutationOptions: MutationOptions<\n    CreateUsersWithListInputResponse,\n    DefaultError,\n    Options<CreateUsersWithListInputData>\n  > = {\n    mutationFn: async (fnOptions) => {\n      const { data } = await createUsersWithListInput({\n        ...options,\n        ...fnOptions,\n        throwOnError: true,\n      });\n      return data;\n    },\n  };\n  return mutationOptions;\n};\n\nexport const loginUserQueryKey = (options?: Options<LoginUserData>) =>\n  createQueryKey('loginUser', options);\n\n/**\n * Logs user into the system.\n *\n * Log into the system.\n */\nexport const loginUserOptions = (options?: Options<LoginUserData>) =>\n  queryOptions<\n    LoginUserResponse,\n    DefaultError,\n    LoginUserResponse,\n    ReturnType<typeof loginUserQueryKey>\n  >({\n    queryFn: async ({ queryKey, signal }) => {\n      const { data } = await loginUser({\n        ...options,\n        ...queryKey[0],\n        signal,\n        throwOnError: true,\n      });\n      return data;\n    },\n    queryKey: loginUserQueryKey(options),\n  });\n\nexport const logoutUserQueryKey = (options?: Options<LogoutUserData>) =>\n  createQueryKey('logoutUser', options);\n\n/**\n * Logs out current logged in user session.\n *\n * Log user out of the system.\n */\nexport const logoutUserOptions = (options?: Options<LogoutUserData>) =>\n  queryOptions<unknown, DefaultError, unknown, ReturnType<typeof logoutUserQueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n      const { data } = await logoutUser({\n        ...options,\n        ...queryKey[0],\n        signal,\n        throwOnError: true,\n      });\n      return data;\n    },\n    queryKey: logoutUserQueryKey(options),\n  });\n\n/**\n * Delete user resource.\n *\n * This can only be done by the logged in user.\n */\nexport const deleteUserMutation = (\n  options?: Partial<Options<DeleteUserData>>,\n): MutationOptions<unknown, DefaultError, Options<DeleteUserData>> => {\n  const mutationOptions: MutationOptions<unknown, DefaultError, Options<DeleteUserData>> = {\n    mutationFn: async (fnOptions) => {\n      const { data } = await deleteUser({\n        ...options,\n        ...fnOptions,\n        throwOnError: true,\n      });\n      return data;\n    },\n  };\n  return mutationOptions;\n};\n\nexport const getUserByNameQueryKey = (options: Options<GetUserByNameData>) =>\n  createQueryKey('getUserByName', options);\n\n/**\n * Get user by user name.\n *\n * Get user detail based on username.\n */\nexport const getUserByNameOptions = (options: Options<GetUserByNameData>) =>\n  queryOptions<\n    GetUserByNameResponse,\n    DefaultError,\n    GetUserByNameResponse,\n    ReturnType<typeof getUserByNameQueryKey>\n  >({\n    queryFn: async ({ queryKey, signal }) => {\n      const { data } = await getUserByName({\n        ...options,\n        ...queryKey[0],\n        signal,\n        throwOnError: true,\n      });\n      return data;\n    },\n    queryKey: getUserByNameQueryKey(options),\n  });\n\n/**\n * Update user resource.\n *\n * This can only be done by the logged in user.\n */\nexport const updateUserMutation = (\n  options?: Partial<Options<UpdateUserData>>,\n): MutationOptions<unknown, DefaultError, Options<UpdateUserData>> => {\n  const mutationOptions: MutationOptions<unknown, DefaultError, Options<UpdateUserData>> = {\n    mutationFn: async (fnOptions) => {\n      const { data } = await updateUser({\n        ...options,\n        ...fnOptions,\n        throwOnError: true,\n      });\n      return data;\n    },\n  };\n  return mutationOptions;\n};\n"
  },
  {
    "path": "examples/openapi-ts-tanstack-angular-query-experimental/src/client/client/client.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { HttpResponse } from '@angular/common/http';\nimport { HttpClient, HttpErrorResponse, HttpEventType, HttpRequest } from '@angular/common/http';\nimport {\n  assertInInjectionContext,\n  inject,\n  provideAppInitializer,\n  runInInjectionContext,\n} from '@angular/core';\nimport { firstValueFrom } from 'rxjs';\nimport { filter } from 'rxjs/operators';\n\nimport { createSseClient } from '../core/serverSentEvents.gen';\nimport type { HttpMethod } from '../core/types.gen';\nimport { getValidRequestBody } from '../core/utils.gen';\nimport type {\n  Client,\n  Config,\n  RequestOptions,\n  ResolvedRequestOptions,\n  ResponseStyle,\n} from './types.gen';\nimport {\n  buildUrl,\n  createConfig,\n  createInterceptors,\n  mergeConfigs,\n  mergeHeaders,\n  setAuthParams,\n} from './utils.gen';\n\nexport function provideHeyApiClient(client: Client) {\n  return provideAppInitializer(() => {\n    const httpClient = inject(HttpClient);\n    client.setConfig({ httpClient });\n  });\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<\n    HttpRequest<unknown>,\n    HttpResponse<unknown>,\n    unknown,\n    ResolvedRequestOptions\n  >();\n\n  const requestOptions = <\n    TData = unknown,\n    ThrowOnError extends boolean = false,\n    TResponseStyle extends ResponseStyle = 'fields',\n  >(\n    options: RequestOptions<TData, TResponseStyle, ThrowOnError>,\n  ) => {\n    const opts = {\n      ..._config,\n      ...options,\n      headers: mergeHeaders(_config.headers, options.headers),\n      httpClient: options.httpClient ?? _config.httpClient,\n      serializedBody: undefined as string | undefined,\n    };\n\n    if (!opts.httpClient) {\n      if (opts.injector) {\n        opts.httpClient = runInInjectionContext(opts.injector, () => inject(HttpClient));\n      } else {\n        assertInInjectionContext(requestOptions);\n        opts.httpClient = inject(HttpClient);\n      }\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 url = buildUrl(opts as any);\n\n    const req = new HttpRequest<unknown>(opts.method ?? 'GET', url, getValidRequestBody(opts), {\n      redirect: 'follow',\n      ...opts,\n    });\n\n    return { opts, req, url };\n  };\n\n  const beforeRequest = async (options: RequestOptions) => {\n    const { opts, req, url } = requestOptions(options);\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    return { opts, req, url };\n  };\n\n  const request: Client['request'] = async (options) => {\n    // @ts-expect-error\n    const { opts, req: initialReq } = await beforeRequest(options);\n\n    let req = initialReq;\n\n    for (const fn of interceptors.request.fns) {\n      if (fn) {\n        req = await fn(req, opts as any);\n      }\n    }\n\n    const result: {\n      request: HttpRequest<unknown>;\n      response: any;\n    } = {\n      request: req,\n      response: null,\n    };\n\n    try {\n      result.response = (await firstValueFrom(\n        opts\n          .httpClient!.request(req)\n          .pipe(filter((event) => event.type === HttpEventType.Response)),\n      )) as HttpResponse<unknown>;\n\n      for (const fn of interceptors.response.fns) {\n        if (fn) {\n          result.response = await fn(result.response, req, opts as any);\n        }\n      }\n\n      let bodyResponse = result.response.body;\n\n      if (opts.responseValidator) {\n        await opts.responseValidator(bodyResponse);\n      }\n\n      if (opts.responseTransformer) {\n        bodyResponse = await opts.responseTransformer(bodyResponse);\n      }\n\n      return opts.responseStyle === 'data' ? bodyResponse : { data: bodyResponse, ...result };\n    } catch (error) {\n      if (error instanceof HttpErrorResponse) {\n        result.response = error;\n      }\n\n      let finalError = error instanceof HttpErrorResponse ? error.error : error;\n\n      for (const fn of interceptors.error.fns) {\n        if (fn) {\n          finalError = (await fn(finalError, result.response as any, req, opts as any)) as string;\n        }\n      }\n\n      if (opts.throwOnError) {\n        throw finalError;\n      }\n\n      return opts.responseStyle === 'data'\n        ? undefined\n        : {\n            error: finalError,\n            ...result,\n          };\n    }\n  };\n\n  const makeMethodFn = (method: Uppercase<HttpMethod>) => (options: RequestOptions) =>\n    request({ ...options, method });\n\n  const makeSseFn = (method: Uppercase<HttpMethod>) => async (options: RequestOptions) => {\n    const { opts, url } = await beforeRequest(options);\n    return createSseClient({\n      ...opts,\n      body: opts.body as BodyInit | null | undefined,\n      headers: opts.headers as unknown as Record<string, string>,\n      method,\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    requestOptions: (options) => {\n      if (options.security) {\n        throw new Error('Security is not supported in requestOptions');\n      }\n\n      if (options.requestValidator) {\n        throw new Error('Request validation is not supported in requestOptions');\n      }\n\n      return requestOptions(options).req;\n    },\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"
  },
  {
    "path": "examples/openapi-ts-tanstack-angular-query-experimental/src/client/client/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type { Auth } from '../core/auth.gen';\nexport type { QuerySerializerOptions } from '../core/bodySerializer.gen';\nexport {\n  formDataBodySerializer,\n  jsonBodySerializer,\n  urlSearchParamsBodySerializer,\n} from '../core/bodySerializer.gen';\nexport { buildClientParams } from '../core/params.gen';\nexport { serializeQueryKeyValue } from '../core/queryKeySerializer.gen';\nexport { createClient } from './client.gen';\nexport type {\n  Client,\n  ClientOptions,\n  Config,\n  CreateClientConfig,\n  Options,\n  RequestOptions,\n  RequestResult,\n  ResolvedRequestOptions,\n  ResponseStyle,\n  TDataShape,\n} from './types.gen';\nexport { createConfig, mergeHeaders } from './utils.gen';\n"
  },
  {
    "path": "examples/openapi-ts-tanstack-angular-query-experimental/src/client/client/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type {\n  HttpClient,\n  HttpErrorResponse,\n  HttpHeaders,\n  HttpRequest,\n  HttpResponse,\n} from '@angular/common/http';\nimport type { Injector } from '@angular/core';\n\nimport type { Auth } from '../core/auth.gen';\nimport type { ServerSentEventsOptions, ServerSentEventsResult } from '../core/serverSentEvents.gen';\nimport type { Client as CoreClient, Config as CoreConfig } from '../core/types.gen';\nimport type { Middleware } from './utils.gen';\n\nexport type ResponseStyle = 'data' | 'fields';\n\nexport interface Config<T extends ClientOptions = ClientOptions>\n  extends Omit<RequestInit, 'body' | 'headers' | 'method'>, Omit<CoreConfig, 'headers'> {\n  /**\n   * Base URL for all requests made by this client.\n   */\n  baseUrl?: T['baseUrl'];\n  /**\n   * An object containing any HTTP headers that you want to pre-populate your\n   * `HttpHeaders` object with.\n   *\n   * {@link https://angular.dev/api/common/http/HttpHeaders#constructor See more}\n   */\n  headers?:\n    | HttpHeaders\n    | Record<\n        string,\n        string | number | boolean | (string | number | boolean)[] | null | undefined | unknown\n      >;\n  /**\n   * The HTTP client to use for making requests.\n   */\n  httpClient?: HttpClient;\n  /**\n   * Should we return only data or multiple fields (data, error, response, etc.)?\n   *\n   * @default 'fields'\n   */\n  responseStyle?: ResponseStyle;\n\n  /**\n   * Throw an error instead of returning it in the response?\n   *\n   * @default false\n   */\n  throwOnError?: T['throwOnError'];\n}\n\nexport interface RequestOptions<\n  TData = unknown,\n  TResponseStyle extends ResponseStyle = 'fields',\n  ThrowOnError extends boolean = boolean,\n  Url extends string = string,\n>\n  extends\n    Config<{\n      responseStyle: TResponseStyle;\n      throwOnError: ThrowOnError;\n    }>,\n    Pick<\n      ServerSentEventsOptions<TData>,\n      | 'onRequest'\n      | 'onSseError'\n      | 'onSseEvent'\n      | 'sseDefaultRetryDelay'\n      | 'sseMaxRetryAttempts'\n      | 'sseMaxRetryDelay'\n    > {\n  /**\n   * Any body that you want to add to your request.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/fetch#body}\n   */\n  body?: unknown;\n  /**\n   * Optional custom injector for dependency resolution if you don't implicitly or explicitly provide one.\n   */\n  injector?: Injector;\n  path?: Record<string, unknown>;\n  query?: Record<string, unknown>;\n  /**\n   * Security mechanism(s) to use for the request.\n   */\n  security?: ReadonlyArray<Auth>;\n  url: Url;\n}\n\nexport interface ResolvedRequestOptions<\n  TResponseStyle extends ResponseStyle = 'fields',\n  ThrowOnError extends boolean = boolean,\n  Url extends string = string,\n> extends RequestOptions<unknown, TResponseStyle, ThrowOnError, Url> {\n  serializedBody?: string;\n}\n\nexport type RequestResult<\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = boolean,\n  TResponseStyle extends ResponseStyle = 'fields',\n> = Promise<\n  ThrowOnError extends true\n    ? TResponseStyle extends 'data'\n      ? TData extends Record<string, unknown>\n        ? TData[keyof TData]\n        : TData\n      : {\n          data: TData extends Record<string, unknown> ? TData[keyof TData] : TData;\n          request: HttpRequest<unknown>;\n          response: HttpResponse<TData>;\n        }\n    : TResponseStyle extends 'data'\n      ? (TData extends Record<string, unknown> ? TData[keyof TData] : TData) | undefined\n      :\n          | {\n              data: TData extends Record<string, unknown> ? TData[keyof TData] : TData;\n              error: undefined;\n              request: HttpRequest<unknown>;\n              response: HttpResponse<TData>;\n            }\n          | {\n              data: undefined;\n              error: TError[keyof TError];\n              request: HttpRequest<unknown>;\n              response: HttpErrorResponse & {\n                error: TError[keyof TError] | null;\n              };\n            }\n>;\n\nexport interface ClientOptions {\n  baseUrl?: string;\n  responseStyle?: ResponseStyle;\n  throwOnError?: boolean;\n}\n\ntype MethodFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'>,\n) => RequestResult<TData, TError, ThrowOnError, TResponseStyle>;\n\ntype SseFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'>,\n) => Promise<ServerSentEventsResult<TData, TError>>;\n\ntype RequestFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'> &\n    Pick<Required<RequestOptions<TData, TResponseStyle, ThrowOnError>>, 'method'>,\n) => RequestResult<TData, TError, ThrowOnError, TResponseStyle>;\n\ntype RequestOptionsFn = <\n  T,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: RequestOptions<T, TResponseStyle, ThrowOnError>,\n) => HttpRequest<T>;\n\ntype BuildUrlFn = <\n  TData extends {\n    body?: unknown;\n    path?: Record<string, unknown>;\n    query?: Record<string, unknown>;\n    url: string;\n  },\n>(\n  options: TData & Options<TData>,\n) => string;\n\nexport type Client = CoreClient<RequestFn, Config, MethodFn, BuildUrlFn, SseFn> & {\n  interceptors: Middleware<\n    HttpRequest<unknown>,\n    HttpResponse<unknown>,\n    unknown,\n    ResolvedRequestOptions\n  >;\n  requestOptions: RequestOptionsFn;\n};\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 = ClientOptions> = (\n  override?: Config<ClientOptions & T>,\n) => Config<Required<ClientOptions> & T>;\n\nexport interface TDataShape {\n  body?: unknown;\n  headers?: unknown;\n  path?: unknown;\n  query?: unknown;\n  url: string;\n}\n\ntype OmitKeys<T, K> = Pick<T, Exclude<keyof T, K>>;\n\nexport type Options<\n  TData extends TDataShape = TDataShape,\n  ThrowOnError extends boolean = boolean,\n  TResponse = unknown,\n  TResponseStyle extends ResponseStyle = 'fields',\n> = OmitKeys<\n  RequestOptions<TResponse, TResponseStyle, ThrowOnError>,\n  'body' | 'path' | 'query' | 'url'\n> &\n  ([TData] extends [never] ? unknown : Omit<TData, 'url'>);\n"
  },
  {
    "path": "examples/openapi-ts-tanstack-angular-query-experimental/src/client/client/utils.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport { HttpHeaders } from '@angular/common/http';\n\nimport { getAuthToken } from '../core/auth.gen';\nimport type { QuerySerializer, QuerySerializerOptions } from '../core/bodySerializer.gen';\nimport {\n  serializeArrayParam,\n  serializeObjectParam,\n  serializePrimitiveParam,\n} from '../core/pathSerializer.gen';\nimport type { Client, ClientOptions, Config, RequestOptions } from './types.gen';\n\ninterface PathSerializer {\n  path: Record<string, unknown>;\n  url: string;\n}\n\nconst PATH_PARAM_RE = /\\{[^{}]+\\}/g;\n\ntype ArrayStyle = 'form' | 'spaceDelimited' | 'pipeDelimited';\ntype MatrixStyle = 'label' | 'matrix' | 'simple';\ntype ArraySeparatorStyle = ArrayStyle | MatrixStyle;\n\nconst 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 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 = (\n  contentType: string | null,\n): 'blob' | 'formData' | 'json' | 'stream' | 'text' | undefined => {\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\nexport const setAuthParams = async (\n  options: Pick<Required<RequestOptions>, 'security'> &\n    Pick<RequestOptions, 'auth' | 'query'> & {\n      headers: HttpHeaders;\n    },\n) => {\n  for (const auth of options.security) {\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 = options.headers.append('Cookie', `${name}=${token}`);\n        break;\n      case 'header':\n      default:\n        options.headers = options.headers.set(name, token);\n        break;\n    }\n\n    return;\n  }\n};\n\nexport const buildUrl: Client['buildUrl'] = (options) => {\n  const url = 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  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 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\nexport const mergeHeaders = (\n  ...headers: Array<Required<Config>['headers'] | undefined>\n): HttpHeaders => {\n  let mergedHeaders = new HttpHeaders();\n\n  for (const header of headers) {\n    if (!header || typeof header !== 'object') {\n      continue;\n    }\n\n    if (header instanceof HttpHeaders) {\n      // Merge HttpHeaders instance\n      header.keys().forEach((key) => {\n        const values = header.getAll(key);\n        if (values) {\n          values.forEach((value) => {\n            mergedHeaders = mergedHeaders.append(key, value);\n          });\n        }\n      });\n    } else {\n      // Merge plain object headers\n      for (const [key, value] of Object.entries(header)) {\n        if (value === null) {\n          mergedHeaders = mergedHeaders.delete(key);\n        } else if (Array.isArray(value)) {\n          for (const v of value) {\n            mergedHeaders = 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 = mergedHeaders.set(\n            key,\n            typeof value === 'object' ? JSON.stringify(value) : (value as string),\n          );\n        }\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  headers: defaultHeaders,\n  querySerializer: defaultQuerySerializer,\n  ...override,\n});\n"
  },
  {
    "path": "examples/openapi-ts-tanstack-angular-query-experimental/src/client/client.gen.ts",
    "content": "// 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> = (\n  override?: Config<ClientOptions & T>,\n) => Config<Required<ClientOptions> & T>;\n\nexport const client = createClient(\n  createConfig<ClientOptions2>({ baseUrl: 'https://petstore3.swagger.io/api/v3' }),\n);\n"
  },
  {
    "path": "examples/openapi-ts-tanstack-angular-query-experimental/src/client/core/auth.gen.ts",
    "content": "// 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"
  },
  {
    "path": "examples/openapi-ts-tanstack-angular-query-experimental/src/client/core/bodySerializer.gen.ts",
    "content": "// 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"
  },
  {
    "path": "examples/openapi-ts-tanstack-angular-query-experimental/src/client/core/params.gen.ts",
    "content": "// 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"
  },
  {
    "path": "examples/openapi-ts-tanstack-angular-query-experimental/src/client/core/pathSerializer.gen.ts",
    "content": "// 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"
  },
  {
    "path": "examples/openapi-ts-tanstack-angular-query-experimental/src/client/core/queryKeySerializer.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\n/**\n * JSON-friendly union that mirrors what Pinia Colada can hash.\n */\nexport type JsonValue =\n  | null\n  | string\n  | number\n  | boolean\n  | JsonValue[]\n  | { [key: string]: JsonValue };\n\n/**\n * Replacer that converts non-JSON values (bigint, Date, etc.) to safe substitutes.\n */\nexport const queryKeyJsonReplacer = (_key: string, value: unknown) => {\n  if (value === undefined || typeof value === 'function' || typeof value === 'symbol') {\n    return undefined;\n  }\n  if (typeof value === 'bigint') {\n    return value.toString();\n  }\n  if (value instanceof Date) {\n    return value.toISOString();\n  }\n  return value;\n};\n\n/**\n * Safely stringifies a value and parses it back into a JsonValue.\n */\nexport const stringifyToJsonValue = (input: unknown): JsonValue | undefined => {\n  try {\n    const json = JSON.stringify(input, queryKeyJsonReplacer);\n    if (json === undefined) {\n      return undefined;\n    }\n    return JSON.parse(json) as JsonValue;\n  } catch {\n    return undefined;\n  }\n};\n\n/**\n * Detects plain objects (including objects with a null prototype).\n */\nconst isPlainObject = (value: unknown): value is Record<string, unknown> => {\n  if (value === null || typeof value !== 'object') {\n    return false;\n  }\n  const prototype = Object.getPrototypeOf(value as object);\n  return prototype === Object.prototype || prototype === null;\n};\n\n/**\n * Turns URLSearchParams into a sorted JSON object for deterministic keys.\n */\nconst serializeSearchParams = (params: URLSearchParams): JsonValue => {\n  const entries = Array.from(params.entries()).sort(([a], [b]) => a.localeCompare(b));\n  const result: Record<string, JsonValue> = {};\n\n  for (const [key, value] of entries) {\n    const existing = result[key];\n    if (existing === undefined) {\n      result[key] = value;\n      continue;\n    }\n\n    if (Array.isArray(existing)) {\n      (existing as string[]).push(value);\n    } else {\n      result[key] = [existing, value];\n    }\n  }\n\n  return result;\n};\n\n/**\n * Normalizes any accepted value into a JSON-friendly shape for query keys.\n */\nexport const serializeQueryKeyValue = (value: unknown): JsonValue | undefined => {\n  if (value === null) {\n    return null;\n  }\n\n  if (typeof value === 'string' || typeof value === 'number' || typeof value === 'boolean') {\n    return value;\n  }\n\n  if (value === undefined || typeof value === 'function' || typeof value === 'symbol') {\n    return undefined;\n  }\n\n  if (typeof value === 'bigint') {\n    return value.toString();\n  }\n\n  if (value instanceof Date) {\n    return value.toISOString();\n  }\n\n  if (Array.isArray(value)) {\n    return stringifyToJsonValue(value);\n  }\n\n  if (typeof URLSearchParams !== 'undefined' && value instanceof URLSearchParams) {\n    return serializeSearchParams(value);\n  }\n\n  if (isPlainObject(value)) {\n    return stringifyToJsonValue(value);\n  }\n\n  return undefined;\n};\n"
  },
  {
    "path": "examples/openapi-ts-tanstack-angular-query-experimental/src/client/core/serverSentEvents.gen.ts",
    "content": "// 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 const 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            // Normalize line endings: CRLF -> LF, then CR -> LF\n            buffer = buffer.replace(/\\r\\n/g, '\\n').replace(/\\r/g, '\\n');\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"
  },
  {
    "path": "examples/openapi-ts-tanstack-angular-query-experimental/src/client/core/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { Auth, AuthToken } from './auth.gen';\nimport type { BodySerializer, QuerySerializer, QuerySerializerOptions } from './bodySerializer.gen';\n\nexport type HttpMethod =\n  | 'connect'\n  | 'delete'\n  | 'get'\n  | 'head'\n  | 'options'\n  | 'patch'\n  | 'post'\n  | 'put'\n  | 'trace';\n\nexport type Client<\n  RequestFn = never,\n  Config = unknown,\n  MethodFn = never,\n  BuildUrlFn = never,\n  SseFn = never,\n> = {\n  /**\n   * Returns the final request URL.\n   */\n  buildUrl: BuildUrlFn;\n  getConfig: () => Config;\n  request: RequestFn;\n  setConfig: (config: Config) => Config;\n} & {\n  [K in HttpMethod]: MethodFn;\n} & ([SseFn] extends [never] ? { sse?: never } : { sse: { [K in HttpMethod]: SseFn } });\n\nexport interface Config {\n  /**\n   * Auth token or a function returning auth token. The resolved value will be\n   * added to the request payload as defined by its `security` array.\n   */\n  auth?: ((auth: Auth) => Promise<AuthToken> | AuthToken) | AuthToken;\n  /**\n   * A function for serializing request body parameter. By default,\n   * {@link JSON.stringify()} will be used.\n   */\n  bodySerializer?: BodySerializer | null;\n  /**\n   * An object containing any HTTP headers that you want to pre-populate your\n   * `Headers` object with.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/Headers/Headers#init See more}\n   */\n  headers?:\n    | RequestInit['headers']\n    | Record<\n        string,\n        string | number | boolean | (string | number | boolean)[] | null | undefined | unknown\n      >;\n  /**\n   * The request method.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/fetch#method See more}\n   */\n  method?: Uppercase<HttpMethod>;\n  /**\n   * A function for serializing request query parameters. By default, arrays\n   * will be exploded in form style, objects will be exploded in deepObject\n   * style, and reserved characters are percent-encoded.\n   *\n   * This method will have no effect if the native `paramsSerializer()` Axios\n   * API function is used.\n   *\n   * {@link https://swagger.io/docs/specification/serialization/#query View examples}\n   */\n  querySerializer?: QuerySerializer | QuerySerializerOptions;\n  /**\n   * A function validating request data. This is useful if you want to ensure\n   * the request conforms to the desired shape, so it can be safely sent to\n   * the server.\n   */\n  requestValidator?: (data: unknown) => Promise<unknown>;\n  /**\n   * A function transforming response data before it's returned. This is useful\n   * for post-processing data, e.g. converting ISO strings into Date objects.\n   */\n  responseTransformer?: (data: unknown) => Promise<unknown>;\n  /**\n   * A function validating response data. This is useful if you want to ensure\n   * the response conforms to the desired shape, so it can be safely passed to\n   * the transformers and returned to the user.\n   */\n  responseValidator?: (data: unknown) => Promise<unknown>;\n}\n\ntype IsExactlyNeverOrNeverUndefined<T> = [T] extends [never]\n  ? true\n  : [T] extends [never | undefined]\n    ? [undefined] extends [T]\n      ? false\n      : true\n    : false;\n\nexport type OmitNever<T extends Record<string, unknown>> = {\n  [K in keyof T as IsExactlyNeverOrNeverUndefined<T[K]> extends true ? never : K]: T[K];\n};\n"
  },
  {
    "path": "examples/openapi-ts-tanstack-angular-query-experimental/src/client/core/utils.gen.ts",
    "content": "// 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"
  },
  {
    "path": "examples/openapi-ts-tanstack-angular-query-experimental/src/client/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport {\n  addPet,\n  createUser,\n  createUsersWithListInput,\n  deleteOrder,\n  deletePet,\n  deleteUser,\n  findPetsByStatus,\n  findPetsByTags,\n  getInventory,\n  getOrderById,\n  getPetById,\n  getUserByName,\n  loginUser,\n  logoutUser,\n  type Options,\n  placeOrder,\n  updatePet,\n  updatePetWithForm,\n  updateUser,\n  uploadFile,\n} from './sdk.gen';\nexport type {\n  AddPetData,\n  AddPetErrors,\n  AddPetResponse,\n  AddPetResponses,\n  ApiResponse,\n  Category,\n  ClientOptions,\n  CreateUserData,\n  CreateUserErrors,\n  CreateUserResponse,\n  CreateUserResponses,\n  CreateUsersWithListInputData,\n  CreateUsersWithListInputErrors,\n  CreateUsersWithListInputResponse,\n  CreateUsersWithListInputResponses,\n  DeleteOrderData,\n  DeleteOrderErrors,\n  DeleteOrderResponses,\n  DeletePetData,\n  DeletePetErrors,\n  DeletePetResponses,\n  DeleteUserData,\n  DeleteUserErrors,\n  DeleteUserResponses,\n  FindPetsByStatusData,\n  FindPetsByStatusErrors,\n  FindPetsByStatusResponse,\n  FindPetsByStatusResponses,\n  FindPetsByTagsData,\n  FindPetsByTagsErrors,\n  FindPetsByTagsResponse,\n  FindPetsByTagsResponses,\n  GetInventoryData,\n  GetInventoryErrors,\n  GetInventoryResponse,\n  GetInventoryResponses,\n  GetOrderByIdData,\n  GetOrderByIdErrors,\n  GetOrderByIdResponse,\n  GetOrderByIdResponses,\n  GetPetByIdData,\n  GetPetByIdErrors,\n  GetPetByIdResponse,\n  GetPetByIdResponses,\n  GetUserByNameData,\n  GetUserByNameErrors,\n  GetUserByNameResponse,\n  GetUserByNameResponses,\n  LoginUserData,\n  LoginUserErrors,\n  LoginUserResponse,\n  LoginUserResponses,\n  LogoutUserData,\n  LogoutUserErrors,\n  LogoutUserResponses,\n  Order,\n  Pet,\n  Pet2,\n  PlaceOrderData,\n  PlaceOrderErrors,\n  PlaceOrderResponse,\n  PlaceOrderResponses,\n  Tag,\n  UpdatePetData,\n  UpdatePetErrors,\n  UpdatePetResponse,\n  UpdatePetResponses,\n  UpdatePetWithFormData,\n  UpdatePetWithFormErrors,\n  UpdatePetWithFormResponse,\n  UpdatePetWithFormResponses,\n  UpdateUserData,\n  UpdateUserErrors,\n  UpdateUserResponses,\n  UploadFileData,\n  UploadFileErrors,\n  UploadFileResponse,\n  UploadFileResponses,\n  User,\n  UserArray,\n} from './types.gen';\n"
  },
  {
    "path": "examples/openapi-ts-tanstack-angular-query-experimental/src/client/schemas.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport const OrderSchema = {\n  properties: {\n    complete: {\n      type: 'boolean',\n    },\n    id: {\n      example: 10,\n      format: 'int64',\n      type: 'integer',\n    },\n    petId: {\n      example: 198772,\n      format: 'int64',\n      type: 'integer',\n    },\n    quantity: {\n      example: 7,\n      format: 'int32',\n      type: 'integer',\n    },\n    shipDate: {\n      format: 'date-time',\n      type: 'string',\n    },\n    status: {\n      description: 'Order Status',\n      enum: ['placed', 'approved', 'delivered'],\n      example: 'approved',\n      type: 'string',\n    },\n  },\n  type: 'object',\n  'x-swagger-router-model': 'io.swagger.petstore.model.Order',\n  xml: {\n    name: 'order',\n  },\n} as const;\n\nexport const CategorySchema = {\n  properties: {\n    id: {\n      example: 1,\n      format: 'int64',\n      type: 'integer',\n    },\n    name: {\n      example: 'Dogs',\n      type: 'string',\n    },\n  },\n  type: 'object',\n  'x-swagger-router-model': 'io.swagger.petstore.model.Category',\n  xml: {\n    name: 'category',\n  },\n} as const;\n\nexport const UserSchema = {\n  properties: {\n    email: {\n      example: 'john@email.com',\n      type: 'string',\n    },\n    firstName: {\n      example: 'John',\n      type: 'string',\n    },\n    id: {\n      example: 10,\n      format: 'int64',\n      type: 'integer',\n    },\n    lastName: {\n      example: 'James',\n      type: 'string',\n    },\n    password: {\n      example: '12345',\n      type: 'string',\n    },\n    phone: {\n      example: '12345',\n      type: 'string',\n    },\n    userStatus: {\n      description: 'User Status',\n      example: 1,\n      format: 'int32',\n      type: 'integer',\n    },\n    username: {\n      example: 'theUser',\n      type: 'string',\n    },\n  },\n  type: 'object',\n  'x-swagger-router-model': 'io.swagger.petstore.model.User',\n  xml: {\n    name: 'user',\n  },\n} as const;\n\nexport const TagSchema = {\n  properties: {\n    id: {\n      format: 'int64',\n      type: 'integer',\n    },\n    name: {\n      type: 'string',\n    },\n  },\n  type: 'object',\n  'x-swagger-router-model': 'io.swagger.petstore.model.Tag',\n  xml: {\n    name: 'tag',\n  },\n} as const;\n\nexport const PetSchema = {\n  properties: {\n    category: {\n      $ref: '#/components/schemas/Category',\n    },\n    id: {\n      example: 10,\n      format: 'int64',\n      type: 'integer',\n    },\n    name: {\n      example: 'doggie',\n      type: 'string',\n    },\n    photoUrls: {\n      items: {\n        type: 'string',\n        xml: {\n          name: 'photoUrl',\n        },\n      },\n      type: 'array',\n      xml: {\n        wrapped: true,\n      },\n    },\n    status: {\n      description: 'pet status in the store',\n      enum: ['available', 'pending', 'sold'],\n      type: 'string',\n    },\n    tags: {\n      items: {\n        $ref: '#/components/schemas/Tag',\n      },\n      type: 'array',\n      xml: {\n        wrapped: true,\n      },\n    },\n  },\n  required: ['name', 'photoUrls'],\n  type: 'object',\n  'x-swagger-router-model': 'io.swagger.petstore.model.Pet',\n  xml: {\n    name: 'pet',\n  },\n} as const;\n\nexport const ApiResponseSchema = {\n  properties: {\n    code: {\n      format: 'int32',\n      type: 'integer',\n    },\n    message: {\n      type: 'string',\n    },\n    type: {\n      type: 'string',\n    },\n  },\n  type: 'object',\n  xml: {\n    name: '##default',\n  },\n} as const;\n"
  },
  {
    "path": "examples/openapi-ts-tanstack-angular-query-experimental/src/client/sdk.gen.ts",
    "content": "// 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 {\n  AddPetData,\n  AddPetErrors,\n  AddPetResponses,\n  CreateUserData,\n  CreateUserErrors,\n  CreateUserResponses,\n  CreateUsersWithListInputData,\n  CreateUsersWithListInputErrors,\n  CreateUsersWithListInputResponses,\n  DeleteOrderData,\n  DeleteOrderErrors,\n  DeleteOrderResponses,\n  DeletePetData,\n  DeletePetErrors,\n  DeletePetResponses,\n  DeleteUserData,\n  DeleteUserErrors,\n  DeleteUserResponses,\n  FindPetsByStatusData,\n  FindPetsByStatusErrors,\n  FindPetsByStatusResponses,\n  FindPetsByTagsData,\n  FindPetsByTagsErrors,\n  FindPetsByTagsResponses,\n  GetInventoryData,\n  GetInventoryErrors,\n  GetInventoryResponses,\n  GetOrderByIdData,\n  GetOrderByIdErrors,\n  GetOrderByIdResponses,\n  GetPetByIdData,\n  GetPetByIdErrors,\n  GetPetByIdResponses,\n  GetUserByNameData,\n  GetUserByNameErrors,\n  GetUserByNameResponses,\n  LoginUserData,\n  LoginUserErrors,\n  LoginUserResponses,\n  LogoutUserData,\n  LogoutUserErrors,\n  LogoutUserResponses,\n  PlaceOrderData,\n  PlaceOrderErrors,\n  PlaceOrderResponses,\n  UpdatePetData,\n  UpdatePetErrors,\n  UpdatePetResponses,\n  UpdatePetWithFormData,\n  UpdatePetWithFormErrors,\n  UpdatePetWithFormResponses,\n  UpdateUserData,\n  UpdateUserErrors,\n  UpdateUserResponses,\n  UploadFileData,\n  UploadFileErrors,\n  UploadFileResponses,\n} from './types.gen';\n\nexport type Options<\n  TData extends TDataShape = TDataShape,\n  ThrowOnError extends boolean = boolean,\n> = Options2<TData, ThrowOnError> & {\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 * Add a new pet to the store.\n *\n * Add a new pet to the store.\n */\nexport const addPet = <ThrowOnError extends boolean = false>(\n  options: Options<AddPetData, ThrowOnError>,\n) =>\n  (options.client ?? client).post<AddPetResponses, AddPetErrors, ThrowOnError>({\n    security: [{ scheme: 'bearer', type: 'http' }],\n    url: '/pet',\n    ...options,\n    headers: {\n      'Content-Type': 'application/json',\n      ...options.headers,\n    },\n  });\n\n/**\n * Update an existing pet.\n *\n * Update an existing pet by Id.\n */\nexport const updatePet = <ThrowOnError extends boolean = false>(\n  options: Options<UpdatePetData, ThrowOnError>,\n) =>\n  (options.client ?? client).put<UpdatePetResponses, UpdatePetErrors, ThrowOnError>({\n    security: [{ scheme: 'bearer', type: 'http' }],\n    url: '/pet',\n    ...options,\n    headers: {\n      'Content-Type': 'application/json',\n      ...options.headers,\n    },\n  });\n\n/**\n * Finds Pets by status.\n *\n * Multiple status values can be provided with comma separated strings.\n */\nexport const findPetsByStatus = <ThrowOnError extends boolean = false>(\n  options: Options<FindPetsByStatusData, ThrowOnError>,\n) =>\n  (options.client ?? client).get<FindPetsByStatusResponses, FindPetsByStatusErrors, ThrowOnError>({\n    security: [{ scheme: 'bearer', type: 'http' }],\n    url: '/pet/findByStatus',\n    ...options,\n  });\n\n/**\n * Finds Pets by tags.\n *\n * Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.\n */\nexport const findPetsByTags = <ThrowOnError extends boolean = false>(\n  options: Options<FindPetsByTagsData, ThrowOnError>,\n) =>\n  (options.client ?? client).get<FindPetsByTagsResponses, FindPetsByTagsErrors, ThrowOnError>({\n    security: [{ scheme: 'bearer', type: 'http' }],\n    url: '/pet/findByTags',\n    ...options,\n  });\n\n/**\n * Deletes a pet.\n *\n * Delete a pet.\n */\nexport const deletePet = <ThrowOnError extends boolean = false>(\n  options: Options<DeletePetData, ThrowOnError>,\n) =>\n  (options.client ?? client).delete<DeletePetResponses, DeletePetErrors, ThrowOnError>({\n    security: [{ scheme: 'bearer', type: 'http' }],\n    url: '/pet/{petId}',\n    ...options,\n  });\n\n/**\n * Find pet by ID.\n *\n * Returns a single pet.\n */\nexport const getPetById = <ThrowOnError extends boolean = false>(\n  options: Options<GetPetByIdData, ThrowOnError>,\n) =>\n  (options.client ?? client).get<GetPetByIdResponses, GetPetByIdErrors, ThrowOnError>({\n    security: [\n      { name: 'api_key', type: 'apiKey' },\n      { scheme: 'bearer', type: 'http' },\n    ],\n    url: '/pet/{petId}',\n    ...options,\n  });\n\n/**\n * Updates a pet in the store with form data.\n *\n * Updates a pet resource based on the form data.\n */\nexport const updatePetWithForm = <ThrowOnError extends boolean = false>(\n  options: Options<UpdatePetWithFormData, ThrowOnError>,\n) =>\n  (options.client ?? client).post<\n    UpdatePetWithFormResponses,\n    UpdatePetWithFormErrors,\n    ThrowOnError\n  >({\n    security: [{ scheme: 'bearer', type: 'http' }],\n    url: '/pet/{petId}',\n    ...options,\n  });\n\n/**\n * Uploads an image.\n *\n * Upload image of the pet.\n */\nexport const uploadFile = <ThrowOnError extends boolean = false>(\n  options: Options<UploadFileData, ThrowOnError>,\n) =>\n  (options.client ?? client).post<UploadFileResponses, UploadFileErrors, ThrowOnError>({\n    bodySerializer: null,\n    security: [{ scheme: 'bearer', type: 'http' }],\n    url: '/pet/{petId}/uploadImage',\n    ...options,\n    headers: {\n      'Content-Type': 'application/octet-stream',\n      ...options.headers,\n    },\n  });\n\n/**\n * Returns pet inventories by status.\n *\n * Returns a map of status codes to quantities.\n */\nexport const getInventory = <ThrowOnError extends boolean = false>(\n  options?: Options<GetInventoryData, ThrowOnError>,\n) =>\n  (options?.client ?? client).get<GetInventoryResponses, GetInventoryErrors, ThrowOnError>({\n    security: [{ name: 'api_key', type: 'apiKey' }],\n    url: '/store/inventory',\n    ...options,\n  });\n\n/**\n * Place an order for a pet.\n *\n * Place a new order in the store.\n */\nexport const placeOrder = <ThrowOnError extends boolean = false>(\n  options?: Options<PlaceOrderData, ThrowOnError>,\n) =>\n  (options?.client ?? client).post<PlaceOrderResponses, PlaceOrderErrors, ThrowOnError>({\n    url: '/store/order',\n    ...options,\n    headers: {\n      'Content-Type': 'application/json',\n      ...options?.headers,\n    },\n  });\n\n/**\n * Delete purchase order by identifier.\n *\n * For valid response try integer IDs with value < 1000. Anything above 1000 or non-integers will generate API errors.\n */\nexport const deleteOrder = <ThrowOnError extends boolean = false>(\n  options: Options<DeleteOrderData, ThrowOnError>,\n) =>\n  (options.client ?? client).delete<DeleteOrderResponses, DeleteOrderErrors, ThrowOnError>({\n    url: '/store/order/{orderId}',\n    ...options,\n  });\n\n/**\n * Find purchase order by ID.\n *\n * For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions.\n */\nexport const getOrderById = <ThrowOnError extends boolean = false>(\n  options: Options<GetOrderByIdData, ThrowOnError>,\n) =>\n  (options.client ?? client).get<GetOrderByIdResponses, GetOrderByIdErrors, ThrowOnError>({\n    url: '/store/order/{orderId}',\n    ...options,\n  });\n\n/**\n * Create user.\n *\n * This can only be done by the logged in user.\n */\nexport const createUser = <ThrowOnError extends boolean = false>(\n  options?: Options<CreateUserData, ThrowOnError>,\n) =>\n  (options?.client ?? client).post<CreateUserResponses, CreateUserErrors, ThrowOnError>({\n    url: '/user',\n    ...options,\n    headers: {\n      'Content-Type': 'application/json',\n      ...options?.headers,\n    },\n  });\n\n/**\n * Creates list of users with given input array.\n *\n * Creates list of users with given input array.\n */\nexport const createUsersWithListInput = <ThrowOnError extends boolean = false>(\n  options?: Options<CreateUsersWithListInputData, ThrowOnError>,\n) =>\n  (options?.client ?? client).post<\n    CreateUsersWithListInputResponses,\n    CreateUsersWithListInputErrors,\n    ThrowOnError\n  >({\n    url: '/user/createWithList',\n    ...options,\n    headers: {\n      'Content-Type': 'application/json',\n      ...options?.headers,\n    },\n  });\n\n/**\n * Logs user into the system.\n *\n * Log into the system.\n */\nexport const loginUser = <ThrowOnError extends boolean = false>(\n  options?: Options<LoginUserData, ThrowOnError>,\n) =>\n  (options?.client ?? client).get<LoginUserResponses, LoginUserErrors, ThrowOnError>({\n    url: '/user/login',\n    ...options,\n  });\n\n/**\n * Logs out current logged in user session.\n *\n * Log user out of the system.\n */\nexport const logoutUser = <ThrowOnError extends boolean = false>(\n  options?: Options<LogoutUserData, ThrowOnError>,\n) =>\n  (options?.client ?? client).get<LogoutUserResponses, LogoutUserErrors, ThrowOnError>({\n    url: '/user/logout',\n    ...options,\n  });\n\n/**\n * Delete user resource.\n *\n * This can only be done by the logged in user.\n */\nexport const deleteUser = <ThrowOnError extends boolean = false>(\n  options: Options<DeleteUserData, ThrowOnError>,\n) =>\n  (options.client ?? client).delete<DeleteUserResponses, DeleteUserErrors, ThrowOnError>({\n    url: '/user/{username}',\n    ...options,\n  });\n\n/**\n * Get user by user name.\n *\n * Get user detail based on username.\n */\nexport const getUserByName = <ThrowOnError extends boolean = false>(\n  options: Options<GetUserByNameData, ThrowOnError>,\n) =>\n  (options.client ?? client).get<GetUserByNameResponses, GetUserByNameErrors, ThrowOnError>({\n    url: '/user/{username}',\n    ...options,\n  });\n\n/**\n * Update user resource.\n *\n * This can only be done by the logged in user.\n */\nexport const updateUser = <ThrowOnError extends boolean = false>(\n  options: Options<UpdateUserData, ThrowOnError>,\n) =>\n  (options.client ?? client).put<UpdateUserResponses, UpdateUserErrors, ThrowOnError>({\n    url: '/user/{username}',\n    ...options,\n    headers: {\n      'Content-Type': 'application/json',\n      ...options.headers,\n    },\n  });\n"
  },
  {
    "path": "examples/openapi-ts-tanstack-angular-query-experimental/src/client/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type ClientOptions = {\n  baseUrl: 'https://petstore3.swagger.io/api/v3' | (string & {});\n};\n\nexport type Order = {\n  complete?: boolean;\n  id?: number;\n  petId?: number;\n  quantity?: number;\n  shipDate?: string;\n  /**\n   * Order Status\n   */\n  status?: 'placed' | 'approved' | 'delivered';\n};\n\nexport type Category = {\n  id?: number;\n  name?: string;\n};\n\nexport type User = {\n  email?: string;\n  firstName?: string;\n  id?: number;\n  lastName?: string;\n  password?: string;\n  phone?: string;\n  /**\n   * User Status\n   */\n  userStatus?: number;\n  username?: string;\n};\n\nexport type Tag = {\n  id?: number;\n  name?: string;\n};\n\nexport type Pet = {\n  category?: Category;\n  id?: number;\n  name: string;\n  photoUrls: Array<string>;\n  /**\n   * pet status in the store\n   */\n  status?: 'available' | 'pending' | 'sold';\n  tags?: Array<Tag>;\n};\n\nexport type ApiResponse = {\n  code?: number;\n  message?: string;\n  type?: string;\n};\n\nexport type Pet2 = Pet;\n\n/**\n * List of user object\n */\nexport type UserArray = Array<User>;\n\nexport type AddPetData = {\n  /**\n   * Create a new pet in the store\n   */\n  body: Pet;\n  path?: never;\n  query?: never;\n  url: '/pet';\n};\n\nexport type AddPetErrors = {\n  /**\n   * Invalid input\n   */\n  400: unknown;\n  /**\n   * Validation exception\n   */\n  422: unknown;\n  /**\n   * Unexpected error\n   */\n  default: unknown;\n};\n\nexport type AddPetResponses = {\n  /**\n   * Successful operation\n   */\n  200: Pet;\n};\n\nexport type AddPetResponse = AddPetResponses[keyof AddPetResponses];\n\nexport type UpdatePetData = {\n  /**\n   * Update an existent pet in the store\n   */\n  body: Pet;\n  path?: never;\n  query?: never;\n  url: '/pet';\n};\n\nexport type UpdatePetErrors = {\n  /**\n   * Invalid ID supplied\n   */\n  400: unknown;\n  /**\n   * Pet not found\n   */\n  404: unknown;\n  /**\n   * Validation exception\n   */\n  422: unknown;\n  /**\n   * Unexpected error\n   */\n  default: unknown;\n};\n\nexport type UpdatePetResponses = {\n  /**\n   * Successful operation\n   */\n  200: Pet;\n};\n\nexport type UpdatePetResponse = UpdatePetResponses[keyof UpdatePetResponses];\n\nexport type FindPetsByStatusData = {\n  body?: never;\n  path?: never;\n  query: {\n    /**\n     * Status values that need to be considered for filter\n     */\n    status: 'available' | 'pending' | 'sold';\n  };\n  url: '/pet/findByStatus';\n};\n\nexport type FindPetsByStatusErrors = {\n  /**\n   * Invalid status value\n   */\n  400: unknown;\n  /**\n   * Unexpected error\n   */\n  default: unknown;\n};\n\nexport type FindPetsByStatusResponses = {\n  /**\n   * successful operation\n   */\n  200: Array<Pet>;\n};\n\nexport type FindPetsByStatusResponse = FindPetsByStatusResponses[keyof FindPetsByStatusResponses];\n\nexport type FindPetsByTagsData = {\n  body?: never;\n  path?: never;\n  query: {\n    /**\n     * Tags to filter by\n     */\n    tags: Array<string>;\n  };\n  url: '/pet/findByTags';\n};\n\nexport type FindPetsByTagsErrors = {\n  /**\n   * Invalid tag value\n   */\n  400: unknown;\n  /**\n   * Unexpected error\n   */\n  default: unknown;\n};\n\nexport type FindPetsByTagsResponses = {\n  /**\n   * successful operation\n   */\n  200: Array<Pet>;\n};\n\nexport type FindPetsByTagsResponse = FindPetsByTagsResponses[keyof FindPetsByTagsResponses];\n\nexport type DeletePetData = {\n  body?: never;\n  headers?: {\n    api_key?: string;\n  };\n  path: {\n    /**\n     * Pet id to delete\n     */\n    petId: number;\n  };\n  query?: never;\n  url: '/pet/{petId}';\n};\n\nexport type DeletePetErrors = {\n  /**\n   * Invalid pet value\n   */\n  400: unknown;\n  /**\n   * Unexpected error\n   */\n  default: unknown;\n};\n\nexport type DeletePetResponses = {\n  /**\n   * Pet deleted\n   */\n  200: unknown;\n};\n\nexport type GetPetByIdData = {\n  body?: never;\n  path: {\n    /**\n     * ID of pet to return\n     */\n    petId: number;\n  };\n  query?: never;\n  url: '/pet/{petId}';\n};\n\nexport type GetPetByIdErrors = {\n  /**\n   * Invalid ID supplied\n   */\n  400: unknown;\n  /**\n   * Pet not found\n   */\n  404: unknown;\n  /**\n   * Unexpected error\n   */\n  default: unknown;\n};\n\nexport type GetPetByIdResponses = {\n  /**\n   * successful operation\n   */\n  200: Pet;\n};\n\nexport type GetPetByIdResponse = GetPetByIdResponses[keyof GetPetByIdResponses];\n\nexport type UpdatePetWithFormData = {\n  body?: never;\n  path: {\n    /**\n     * ID of pet that needs to be updated\n     */\n    petId: number;\n  };\n  query?: {\n    /**\n     * Name of pet that needs to be updated\n     */\n    name?: string;\n    /**\n     * Status of pet that needs to be updated\n     */\n    status?: string;\n  };\n  url: '/pet/{petId}';\n};\n\nexport type UpdatePetWithFormErrors = {\n  /**\n   * Invalid input\n   */\n  400: unknown;\n  /**\n   * Unexpected error\n   */\n  default: unknown;\n};\n\nexport type UpdatePetWithFormResponses = {\n  /**\n   * successful operation\n   */\n  200: Pet;\n};\n\nexport type UpdatePetWithFormResponse =\n  UpdatePetWithFormResponses[keyof UpdatePetWithFormResponses];\n\nexport type UploadFileData = {\n  body?: Blob | File;\n  path: {\n    /**\n     * ID of pet to update\n     */\n    petId: number;\n  };\n  query?: {\n    /**\n     * Additional Metadata\n     */\n    additionalMetadata?: string;\n  };\n  url: '/pet/{petId}/uploadImage';\n};\n\nexport type UploadFileErrors = {\n  /**\n   * No file uploaded\n   */\n  400: unknown;\n  /**\n   * Pet not found\n   */\n  404: unknown;\n  /**\n   * Unexpected error\n   */\n  default: unknown;\n};\n\nexport type UploadFileResponses = {\n  /**\n   * successful operation\n   */\n  200: ApiResponse;\n};\n\nexport type UploadFileResponse = UploadFileResponses[keyof UploadFileResponses];\n\nexport type GetInventoryData = {\n  body?: never;\n  path?: never;\n  query?: never;\n  url: '/store/inventory';\n};\n\nexport type GetInventoryErrors = {\n  /**\n   * Unexpected error\n   */\n  default: unknown;\n};\n\nexport type GetInventoryResponses = {\n  /**\n   * successful operation\n   */\n  200: {\n    [key: string]: number;\n  };\n};\n\nexport type GetInventoryResponse = GetInventoryResponses[keyof GetInventoryResponses];\n\nexport type PlaceOrderData = {\n  body?: Order;\n  path?: never;\n  query?: never;\n  url: '/store/order';\n};\n\nexport type PlaceOrderErrors = {\n  /**\n   * Invalid input\n   */\n  400: unknown;\n  /**\n   * Validation exception\n   */\n  422: unknown;\n  /**\n   * Unexpected error\n   */\n  default: unknown;\n};\n\nexport type PlaceOrderResponses = {\n  /**\n   * successful operation\n   */\n  200: Order;\n};\n\nexport type PlaceOrderResponse = PlaceOrderResponses[keyof PlaceOrderResponses];\n\nexport type DeleteOrderData = {\n  body?: never;\n  path: {\n    /**\n     * ID of the order that needs to be deleted\n     */\n    orderId: number;\n  };\n  query?: never;\n  url: '/store/order/{orderId}';\n};\n\nexport type DeleteOrderErrors = {\n  /**\n   * Invalid ID supplied\n   */\n  400: unknown;\n  /**\n   * Order not found\n   */\n  404: unknown;\n  /**\n   * Unexpected error\n   */\n  default: unknown;\n};\n\nexport type DeleteOrderResponses = {\n  /**\n   * order deleted\n   */\n  200: unknown;\n};\n\nexport type GetOrderByIdData = {\n  body?: never;\n  path: {\n    /**\n     * ID of order that needs to be fetched\n     */\n    orderId: number;\n  };\n  query?: never;\n  url: '/store/order/{orderId}';\n};\n\nexport type GetOrderByIdErrors = {\n  /**\n   * Invalid ID supplied\n   */\n  400: unknown;\n  /**\n   * Order not found\n   */\n  404: unknown;\n  /**\n   * Unexpected error\n   */\n  default: unknown;\n};\n\nexport type GetOrderByIdResponses = {\n  /**\n   * successful operation\n   */\n  200: Order;\n};\n\nexport type GetOrderByIdResponse = GetOrderByIdResponses[keyof GetOrderByIdResponses];\n\nexport type CreateUserData = {\n  /**\n   * Created user object\n   */\n  body?: User;\n  path?: never;\n  query?: never;\n  url: '/user';\n};\n\nexport type CreateUserErrors = {\n  /**\n   * Unexpected error\n   */\n  default: unknown;\n};\n\nexport type CreateUserResponses = {\n  /**\n   * successful operation\n   */\n  200: User;\n};\n\nexport type CreateUserResponse = CreateUserResponses[keyof CreateUserResponses];\n\nexport type CreateUsersWithListInputData = {\n  body?: Array<User>;\n  path?: never;\n  query?: never;\n  url: '/user/createWithList';\n};\n\nexport type CreateUsersWithListInputErrors = {\n  /**\n   * Unexpected error\n   */\n  default: unknown;\n};\n\nexport type CreateUsersWithListInputResponses = {\n  /**\n   * Successful operation\n   */\n  200: User;\n};\n\nexport type CreateUsersWithListInputResponse =\n  CreateUsersWithListInputResponses[keyof CreateUsersWithListInputResponses];\n\nexport type LoginUserData = {\n  body?: never;\n  path?: never;\n  query?: {\n    /**\n     * The password for login in clear text\n     */\n    password?: string;\n    /**\n     * The user name for login\n     */\n    username?: string;\n  };\n  url: '/user/login';\n};\n\nexport type LoginUserErrors = {\n  /**\n   * Invalid username/password supplied\n   */\n  400: unknown;\n  /**\n   * Unexpected error\n   */\n  default: unknown;\n};\n\nexport type LoginUserResponses = {\n  /**\n   * successful operation\n   */\n  200: string;\n};\n\nexport type LoginUserResponse = LoginUserResponses[keyof LoginUserResponses];\n\nexport type LogoutUserData = {\n  body?: never;\n  path?: never;\n  query?: never;\n  url: '/user/logout';\n};\n\nexport type LogoutUserErrors = {\n  /**\n   * Unexpected error\n   */\n  default: unknown;\n};\n\nexport type LogoutUserResponses = {\n  /**\n   * successful operation\n   */\n  200: unknown;\n};\n\nexport type DeleteUserData = {\n  body?: never;\n  path: {\n    /**\n     * The name that needs to be deleted\n     */\n    username: string;\n  };\n  query?: never;\n  url: '/user/{username}';\n};\n\nexport type DeleteUserErrors = {\n  /**\n   * Invalid username supplied\n   */\n  400: unknown;\n  /**\n   * User not found\n   */\n  404: unknown;\n  /**\n   * Unexpected error\n   */\n  default: unknown;\n};\n\nexport type DeleteUserResponses = {\n  /**\n   * User deleted\n   */\n  200: unknown;\n};\n\nexport type GetUserByNameData = {\n  body?: never;\n  path: {\n    /**\n     * The name that needs to be fetched. Use user1 for testing\n     */\n    username: string;\n  };\n  query?: never;\n  url: '/user/{username}';\n};\n\nexport type GetUserByNameErrors = {\n  /**\n   * Invalid username supplied\n   */\n  400: unknown;\n  /**\n   * User not found\n   */\n  404: unknown;\n  /**\n   * Unexpected error\n   */\n  default: unknown;\n};\n\nexport type GetUserByNameResponses = {\n  /**\n   * successful operation\n   */\n  200: User;\n};\n\nexport type GetUserByNameResponse = GetUserByNameResponses[keyof GetUserByNameResponses];\n\nexport type UpdateUserData = {\n  /**\n   * Update an existent user in the store\n   */\n  body?: User;\n  path: {\n    /**\n     * name that need to be deleted\n     */\n    username: string;\n  };\n  query?: never;\n  url: '/user/{username}';\n};\n\nexport type UpdateUserErrors = {\n  /**\n   * bad request\n   */\n  400: unknown;\n  /**\n   * user not found\n   */\n  404: unknown;\n  /**\n   * Unexpected error\n   */\n  default: unknown;\n};\n\nexport type UpdateUserResponses = {\n  /**\n   * successful operation\n   */\n  200: unknown;\n};\n"
  },
  {
    "path": "examples/openapi-ts-tanstack-angular-query-experimental/src/index.html",
    "content": "<!doctype html>\n<html lang=\"en\">\n  <head>\n    <meta charset=\"utf-8\" />\n    <title>OpenapiTsTanstackAngularQueryExperimental</title>\n    <base href=\"/\" />\n    <meta name=\"viewport\" content=\"width=device-width, initial-scale=1\" />\n    <link rel=\"icon\" type=\"image/x-icon\" href=\"favicon.ico\" />\n    <link\n      href=\"https://fonts.googleapis.com/css2?family=Roboto:wght@300;400;500&display=swap\"\n      rel=\"stylesheet\"\n    />\n    <link href=\"https://fonts.googleapis.com/icon?family=Material+Icons\" rel=\"stylesheet\" />\n  </head>\n  <body>\n    <app-root></app-root>\n  </body>\n</html>\n"
  },
  {
    "path": "examples/openapi-ts-tanstack-angular-query-experimental/src/main.ts",
    "content": "import { bootstrapApplication } from '@angular/platform-browser';\n\nimport { AppComponent } from './app/app.component';\nimport { appConfig } from './app/app.config';\n\nbootstrapApplication(AppComponent, appConfig).catch((err) => console.error(err));\n"
  },
  {
    "path": "examples/openapi-ts-tanstack-angular-query-experimental/src/styles.css",
    "content": "@import '@angular/material/prebuilt-themes/azure-blue.css';\n\n/* You can add global styles to this file, and also import other style files */\nhtml,\nbody {\n  height: 100%;\n}\nbody {\n  margin: 0;\n  font-family: Roboto, 'Helvetica Neue', sans-serif;\n\n  display: grid;\n  place-content: center;\n}\n"
  },
  {
    "path": "examples/openapi-ts-tanstack-angular-query-experimental/tsconfig.app.json",
    "content": "/* To learn more about Typescript configuration file: https://www.typescriptlang.org/docs/handbook/tsconfig-json.html. */\n/* To learn more about Angular compiler options: https://angular.dev/reference/configs/angular-compiler-options. */\n{\n  \"extends\": \"./tsconfig.json\",\n  \"compilerOptions\": {\n    \"outDir\": \"./out-tsc/app\",\n    \"types\": []\n  },\n  \"files\": [\"src/main.ts\"],\n  \"include\": [\"src/**/*.d.ts\"]\n}\n"
  },
  {
    "path": "examples/openapi-ts-tanstack-angular-query-experimental/tsconfig.json",
    "content": "/* To learn more about Typescript configuration file: https://www.typescriptlang.org/docs/handbook/tsconfig-json.html. */\n/* To learn more about Angular compiler options: https://angular.dev/reference/configs/angular-compiler-options. */\n{\n  \"compileOnSave\": false,\n  \"compilerOptions\": {\n    \"outDir\": \"./dist/out-tsc\",\n    \"strict\": true,\n    \"noImplicitOverride\": true,\n    \"noPropertyAccessFromIndexSignature\": true,\n    \"noImplicitReturns\": false,\n    \"noFallthroughCasesInSwitch\": true,\n    \"skipLibCheck\": true,\n    \"isolatedModules\": true,\n    \"esModuleInterop\": true,\n    \"sourceMap\": true,\n    \"declaration\": false,\n    \"experimentalDecorators\": true,\n    \"moduleResolution\": \"bundler\",\n    \"importHelpers\": true,\n    \"target\": \"ES2022\",\n    \"module\": \"ES2022\",\n    \"lib\": [\"ES2022\", \"dom\", \"dom.iterable\"]\n  },\n  \"angularCompilerOptions\": {\n    \"enableI18nLegacyMessageIdFormat\": false,\n    \"strictInjectionParameters\": true,\n    \"strictInputAccessModifiers\": true,\n    \"strictTemplates\": true\n  }\n}\n"
  },
  {
    "path": "examples/openapi-ts-tanstack-react-query/.gitignore",
    "content": "# Logs\nlogs\n*.log\nnpm-debug.log*\nyarn-debug.log*\nyarn-error.log*\npnpm-debug.log*\nlerna-debug.log*\n\nnode_modules\ndist\ndist-ssr\n*.local\n\n# Editor directories and files\n.vscode/*\n!.vscode/extensions.json\n.idea\n.DS_Store\n*.suo\n*.ntvs*\n*.njsproj\n*.sln\n*.sw?\n"
  },
  {
    "path": "examples/openapi-ts-tanstack-react-query/CHANGELOG.md",
    "content": "# @example/openapi-ts-tanstack-react-query\n\n## 0.0.39\n\n### Patch Changes\n\n- Updated dependencies [[`f23f3ae`](https://github.com/hey-api/openapi-ts/commit/f23f3ae874385e758eb8d43bb4e274c9858a4e40)]:\n  - @hey-api/client-fetch@0.13.1\n\n## 0.0.38\n\n### Patch Changes\n\n- Updated dependencies [[`10d2e03`](https://github.com/hey-api/openapi-ts/commit/10d2e03b8295e4e887fab8d023aa823699efbae8)]:\n  - @hey-api/client-fetch@0.13.0\n\n## 0.0.37\n\n### Patch Changes\n\n- Updated dependencies [[`4d8c030`](https://github.com/hey-api/openapi-ts/commit/4d8c03038979c9a75315cc158789b3c198c62f90)]:\n  - @hey-api/client-fetch@0.12.0\n\n## 0.0.36\n\n### Patch Changes\n\n- Updated dependencies [[`8152aaf`](https://github.com/hey-api/openapi-ts/commit/8152aaf4892c48b79fd3dc486eb3c0ea333dc3e6)]:\n  - @hey-api/client-fetch@0.11.0\n\n## 0.0.35\n\n### Patch Changes\n\n- Updated dependencies [[`1f99066`](https://github.com/hey-api/openapi-ts/commit/1f99066efbb2d0e6b9e3710c701293c2cc09d65e)]:\n  - @hey-api/client-fetch@0.10.2\n\n## 0.0.34\n\n### Patch Changes\n\n- Updated dependencies [[`565e0b8`](https://github.com/hey-api/openapi-ts/commit/565e0b89fbab4556ecdc63dfe08250942681140e)]:\n  - @hey-api/client-fetch@0.10.1\n\n## 0.0.33\n\n### Patch Changes\n\n- Updated dependencies [[`fed9699`](https://github.com/hey-api/openapi-ts/commit/fed969985275621c7c2b65ffc760c7c66fafaf72)]:\n  - @hey-api/client-fetch@0.10.0\n\n## 0.0.32\n\n### Patch Changes\n\n- Updated dependencies [[`67c385b`](https://github.com/hey-api/openapi-ts/commit/67c385bf6289a79726b0cdd85fd81ca501cf2248)]:\n  - @hey-api/client-fetch@0.9.0\n\n## 0.0.31\n\n### Patch Changes\n\n- Updated dependencies [[`fe43b88`](https://github.com/hey-api/openapi-ts/commit/fe43b889c20a2001f56e259f93f64851a1caa1d1)]:\n  - @hey-api/client-fetch@0.8.4\n\n## 0.0.30\n\n### Patch Changes\n\n- Updated dependencies [[`c0b36b9`](https://github.com/hey-api/openapi-ts/commit/c0b36b95645d484034c3af145c5554867568979b)]:\n  - @hey-api/client-fetch@0.8.3\n\n## 0.0.29\n\n### Patch Changes\n\n- Updated dependencies [[`b8cc9f8`](https://github.com/hey-api/openapi-ts/commit/b8cc9f8a5eaf4f4ff345abc49c14c6b96744c2ea)]:\n  - @hey-api/client-fetch@0.8.2\n\n## 0.0.28\n\n### Patch Changes\n\n- Updated dependencies [[`7f0f4a7`](https://github.com/hey-api/openapi-ts/commit/7f0f4a76b06c8fafb33581b522faf8efc6fd85ac)]:\n  - @hey-api/client-fetch@0.8.1\n\n## 0.0.27\n\n### Patch Changes\n\n- Updated dependencies [[`bb6d46a`](https://github.com/hey-api/openapi-ts/commit/bb6d46ae119ce4e7e3a2ab3fded74ac4fb4cdff2)]:\n  - @hey-api/client-fetch@0.8.0\n\n## 0.0.26\n\n### Patch Changes\n\n- Updated dependencies [[`2dc380e`](https://github.com/hey-api/openapi-ts/commit/2dc380eabc17c723654beb04ecd7bce6d33d3b49), [`603541e`](https://github.com/hey-api/openapi-ts/commit/603541e307dc2953da7dddd300176865629b50bb), [`2cbffeb`](https://github.com/hey-api/openapi-ts/commit/2cbffeb2cdd6c6143cd68cac68369584879dda31), [`2cbffeb`](https://github.com/hey-api/openapi-ts/commit/2cbffeb2cdd6c6143cd68cac68369584879dda31)]:\n  - @hey-api/client-fetch@0.7.3\n\n## 0.0.25\n\n### Patch Changes\n\n- Updated dependencies [[`8eba19d`](https://github.com/hey-api/openapi-ts/commit/8eba19d4092fc0903572ab9fdadf0b4c26928ba2)]:\n  - @hey-api/client-fetch@0.7.2\n\n## 0.0.24\n\n### Patch Changes\n\n- Updated dependencies [[`0432418`](https://github.com/hey-api/openapi-ts/commit/0432418d72c94ef94865f8216ed2f723ad5191f9), [`4784727`](https://github.com/hey-api/openapi-ts/commit/47847276e8bc854045044dd414382080270dd779)]:\n  - @hey-api/client-fetch@0.7.1\n\n## 0.0.23\n\n### Patch Changes\n\n- Updated dependencies [[`465410c`](https://github.com/hey-api/openapi-ts/commit/465410c201eb19e737e3143ad53a146e95f80107)]:\n  - @hey-api/client-fetch@0.7.0\n\n## 0.0.22\n\n### Patch Changes\n\n- Updated dependencies [[`e2e1410`](https://github.com/hey-api/openapi-ts/commit/e2e1410b22c0c84c40d1b1803e9650d546350cb7)]:\n  - @hey-api/client-fetch@0.6.0\n\n## 0.0.21\n\n### Patch Changes\n\n- Updated dependencies [[`20d7497`](https://github.com/hey-api/openapi-ts/commit/20d7497acb6c046f6a4206c2d8137414e17b2263), [`f86d293`](https://github.com/hey-api/openapi-ts/commit/f86d293f18f133ef6dd2f4864d037611b81edd26)]:\n  - @hey-api/client-fetch@0.5.7\n\n## 0.0.20\n\n### Patch Changes\n\n- Updated dependencies [[`ba56424`](https://github.com/hey-api/openapi-ts/commit/ba5642486cdd5461c2372c34b63019c02bc6874e)]:\n  - @hey-api/client-fetch@0.5.6\n\n## 0.0.19\n\n### Patch Changes\n\n- Updated dependencies [[`9cec9e8`](https://github.com/hey-api/openapi-ts/commit/9cec9e8582c12a8c041b922d9587e16f6f19782a)]:\n  - @hey-api/client-fetch@0.5.5\n\n## 0.0.18\n\n### Patch Changes\n\n- Updated dependencies [[`cbf4e84`](https://github.com/hey-api/openapi-ts/commit/cbf4e84db7f3a47f19d8c3eaa87c71b27912c1a2)]:\n  - @hey-api/client-fetch@0.5.4\n\n## 0.0.17\n\n### Patch Changes\n\n- Updated dependencies [[`646064d`](https://github.com/hey-api/openapi-ts/commit/646064d1aecea988d2b4df73bd24b2ee83394ae0)]:\n  - @hey-api/client-fetch@0.5.3\n\n## 0.0.16\n\n### Patch Changes\n\n- Updated dependencies [[`ec48d32`](https://github.com/hey-api/openapi-ts/commit/ec48d323d80de8e6a47ce7ecd732288f0a47e17a)]:\n  - @hey-api/client-fetch@0.5.2\n\n## 0.0.15\n\n### Patch Changes\n\n- Updated dependencies [[`fa8b0f1`](https://github.com/hey-api/openapi-ts/commit/fa8b0f11ed99c63f694a494944ccc2fbfa9706cc)]:\n  - @hey-api/client-fetch@0.5.1\n\n## 0.0.14\n\n### Patch Changes\n\n- Updated dependencies [[`734a62d`](https://github.com/hey-api/openapi-ts/commit/734a62dd8d594b8266964fe16766a481d37eb7df), [`734a62d`](https://github.com/hey-api/openapi-ts/commit/734a62dd8d594b8266964fe16766a481d37eb7df)]:\n  - @hey-api/client-fetch@0.5.0\n\n## 0.0.13\n\n### Patch Changes\n\n- Updated dependencies [[`4c853d0`](https://github.com/hey-api/openapi-ts/commit/4c853d090b79245854d13831f64731db4a92978b)]:\n  - @hey-api/client-fetch@0.4.4\n\n## 0.0.12\n\n### Patch Changes\n\n- Updated dependencies [[`01dee3d`](https://github.com/hey-api/openapi-ts/commit/01dee3df879232939e43355231147b3d910fb482)]:\n  - @hey-api/client-fetch@0.4.3\n\n## 0.0.11\n\n### Patch Changes\n\n- [#1151](https://github.com/hey-api/openapi-ts/pull/1151) [`587791d`](https://github.com/hey-api/openapi-ts/commit/587791dfede0167fbed229281467e4c4875936f5) Thanks [@mrlubos](https://github.com/mrlubos)! - fix: update website domain, add license documentation\n\n- Updated dependencies [[`587791d`](https://github.com/hey-api/openapi-ts/commit/587791dfede0167fbed229281467e4c4875936f5)]:\n  - @hey-api/client-fetch@0.4.2\n\n## 0.0.10\n\n### Patch Changes\n\n- Updated dependencies [[`a0a5551`](https://github.com/hey-api/openapi-ts/commit/a0a55510d30a1a8dea0ade4908b5b13d51b5f9e6)]:\n  - @hey-api/client-fetch@0.4.1\n\n## 0.0.9\n\n### Patch Changes\n\n- Updated dependencies [[`df5c690`](https://github.com/hey-api/openapi-ts/commit/df5c69048a03a1c7729a5200c586164287a8a6fa), [`df5c690`](https://github.com/hey-api/openapi-ts/commit/df5c69048a03a1c7729a5200c586164287a8a6fa)]:\n  - @hey-api/client-fetch@0.4.0\n\n## 0.0.8\n\n### Patch Changes\n\n- Updated dependencies [[`7f986c2`](https://github.com/hey-api/openapi-ts/commit/7f986c2c7726ed8fbf16f8b235b7769c7d990502)]:\n  - @hey-api/client-fetch@0.3.4\n\n## 0.0.7\n\n### Patch Changes\n\n- Updated dependencies [[`fe743c2`](https://github.com/hey-api/openapi-ts/commit/fe743c2d41c23bf7e1706bceedd6319299131197)]:\n  - @hey-api/client-fetch@0.3.3\n\n## 0.0.6\n\n### Patch Changes\n\n- Updated dependencies [[`11a276a`](https://github.com/hey-api/openapi-ts/commit/11a276a1e35dde0735363e892d8142016fd87eec)]:\n  - @hey-api/client-fetch@0.3.2\n\n## 0.0.5\n\n### Patch Changes\n\n- Updated dependencies [[`7ae2b1d`](https://github.com/hey-api/openapi-ts/commit/7ae2b1db047f3b6efe917a8b43ac7c851fb86c8f), [`2079c6e`](https://github.com/hey-api/openapi-ts/commit/2079c6e83a6b71e157c8e7ea56260b4e9ff8411d)]:\n  - @hey-api/client-fetch@0.3.1\n\n## 0.0.4\n\n### Patch Changes\n\n- Updated dependencies [[`7ebc1d4`](https://github.com/hey-api/openapi-ts/commit/7ebc1d44af74db2522219d71d240325f6bc5689d)]:\n  - @hey-api/client-fetch@0.3.0\n\n## 0.0.3\n\n### Patch Changes\n\n- [#1010](https://github.com/hey-api/openapi-ts/pull/1010) [`b6e58c6`](https://github.com/hey-api/openapi-ts/commit/b6e58c64d1b71897533a85d1738cd7ce7ede178d) Thanks [@mrlubos](https://github.com/mrlubos)! - fix: set query key base url from supplied client if provided\n\n## 0.0.2\n\n### Patch Changes\n\n- [#978](https://github.com/hey-api/openapi-ts/pull/978) [`2e051a5`](https://github.com/hey-api/openapi-ts/commit/2e051a596302c2e103dca25951a07b4aae1e9e23) Thanks [@mrlubos](https://github.com/mrlubos)! - docs: add basic TanStack Query plugin description\n\n## 0.0.1\n\n### Patch Changes\n\n- [#901](https://github.com/hey-api/openapi-ts/pull/901) [`5054875`](https://github.com/hey-api/openapi-ts/commit/505487582667fb2d9fe99a25ad53ea608ce5033d) Thanks [@mrlubos](https://github.com/mrlubos)! - docs: add TanStack React Query example\n\n- Updated dependencies [[`a8c84c0`](https://github.com/hey-api/openapi-ts/commit/a8c84c02dbb5ef1a59f5d414dff425e135c7a446), [`7825a2f`](https://github.com/hey-api/openapi-ts/commit/7825a2fba566a76c63775172ef0569ef375406b6)]:\n  - @hey-api/client-fetch@0.2.4\n"
  },
  {
    "path": "examples/openapi-ts-tanstack-react-query/index.html",
    "content": "<!doctype html>\n<html lang=\"en\">\n  <head>\n    <meta charset=\"UTF-8\" />\n    <!-- <link rel=\"icon\" type=\"image/svg+xml\" href=\"/vite.svg\" /> -->\n    <meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\" />\n    <title>Hey API + TanStack React Query Demo</title>\n  </head>\n  <body>\n    <div id=\"root\"></div>\n    <script type=\"module\" src=\"/src/main.tsx\"></script>\n  </body>\n</html>\n"
  },
  {
    "path": "examples/openapi-ts-tanstack-react-query/openapi-ts.config.ts",
    "content": "import { defineConfig } from '@hey-api/openapi-ts';\n\nexport default defineConfig({\n  input:\n    'https://raw.githubusercontent.com/swagger-api/swagger-petstore/master/src/main/resources/openapi.yaml',\n  logs: {\n    path: './logs',\n  },\n  output: {\n    path: './src/client',\n    postProcess: ['oxfmt', 'eslint'],\n  },\n  plugins: [\n    '@hey-api/client-fetch',\n    '@hey-api/schemas',\n    {\n      instance: true,\n      name: '@hey-api/sdk',\n    },\n    {\n      enums: 'javascript',\n      name: '@hey-api/typescript',\n    },\n    '@tanstack/react-query',\n  ],\n});\n"
  },
  {
    "path": "examples/openapi-ts-tanstack-react-query/package.json",
    "content": "{\n  \"name\": \"@example/openapi-ts-tanstack-react-query\",\n  \"version\": \"0.0.39\",\n  \"private\": true,\n  \"type\": \"module\",\n  \"scripts\": {\n    \"build\": \"tsgo --noEmit && vite build\",\n    \"dev\": \"vite\",\n    \"lint\": \"eslint . --report-unused-disable-directives --max-warnings 0\",\n    \"openapi-ts\": \"openapi-ts\",\n    \"preview\": \"vite preview\",\n    \"typecheck\": \"tsgo --noEmit\"\n  },\n  \"dependencies\": {\n    \"@radix-ui/react-form\": \"0.1.1\",\n    \"@radix-ui/react-icons\": \"1.3.2\",\n    \"@radix-ui/themes\": \"3.1.6\",\n    \"@tanstack/react-query\": \"5.73.3\",\n    \"@tanstack/react-query-devtools\": \"5.73.3\",\n    \"react\": \"19.0.0\",\n    \"react-dom\": \"19.0.0\"\n  },\n  \"devDependencies\": {\n    \"@hey-api/openapi-ts\": \"workspace:*\",\n    \"@types/react\": \"19.0.1\",\n    \"@types/react-dom\": \"19.0.1\",\n    \"@typescript-eslint/eslint-plugin\": \"8.29.1\",\n    \"@typescript-eslint/parser\": \"8.29.1\",\n    \"@vitejs/plugin-react\": \"4.4.0-beta.1\",\n    \"autoprefixer\": \"10.4.19\",\n    \"eslint\": \"9.17.0\",\n    \"eslint-plugin-react-hooks\": \"5.2.0\",\n    \"eslint-plugin-react-refresh\": \"0.4.7\",\n    \"oxfmt\": \"0.27.0\",\n    \"postcss\": \"8.4.41\",\n    \"tailwindcss\": \"3.4.9\",\n    \"typescript\": \"5.9.3\",\n    \"vite\": \"7.3.1\"\n  }\n}\n"
  },
  {
    "path": "examples/openapi-ts-tanstack-react-query/postcss.config.js",
    "content": "export default {\n  plugins: {\n    autoprefixer: {},\n    tailwindcss: {},\n  },\n};\n"
  },
  {
    "path": "examples/openapi-ts-tanstack-react-query/src/App.css",
    "content": "@tailwind base;\n@tailwind components;\n@tailwind utilities;\n"
  },
  {
    "path": "examples/openapi-ts-tanstack-react-query/src/App.tsx",
    "content": "import './App.css';\n\nimport * as Form from '@radix-ui/react-form';\nimport { DownloadIcon, PlusIcon, ReloadIcon } from '@radix-ui/react-icons';\nimport {\n  Avatar,\n  Box,\n  Button,\n  Card,\n  Container,\n  Flex,\n  Heading,\n  Section,\n  Text,\n  TextField,\n} from '@radix-ui/themes';\nimport { useMutation, useQuery } from '@tanstack/react-query';\nimport { useEffect, useState } from 'react';\n\nimport {\n  addPetMutation,\n  getPetByIdOptions,\n  updatePetMutation,\n} from './client/@tanstack/react-query.gen';\nimport { createClient } from './client/client';\nimport { PetSchema } from './client/schemas.gen';\nimport type { Pet } from './client/types.gen';\n\nconst localClient = createClient({\n  // set default base url for requests made by this client\n  baseUrl: 'https://petstore3.swagger.io/api/v3',\n  /**\n   * Set default headers only for requests made by this client. This is to\n   * demonstrate local clients and their configuration taking precedence over\n   * internal service client.\n   */\n  headers: {\n    Authorization: 'Bearer <token_from_local_client>',\n  },\n});\n\nlocalClient.interceptors.request.use((request, options) => {\n  // Middleware is great for adding authorization tokens to requests made to\n  // protected paths. Headers are set randomly here to allow surfacing the\n  // default headers, too.\n  if (options.url === '/pet/{petId}' && options.method === 'GET' && Math.random() < 0.5) {\n    request.headers.set('Authorization', 'Bearer <token_from_interceptor>');\n  }\n  return request;\n});\n\nfunction App() {\n  const [pet, setPet] = useState<Pet>();\n  const [petId, setPetId] = useState<number>();\n  const [isRequiredNameError, setIsRequiredNameError] = useState(false);\n\n  const addPet = useMutation({\n    ...addPetMutation(),\n    onError: (error) => {\n      console.log(error);\n      setIsRequiredNameError(false);\n    },\n    onSuccess: (data) => {\n      setPet(data);\n      setIsRequiredNameError(false);\n    },\n  });\n\n  const updatePet = useMutation({\n    ...updatePetMutation(),\n    onError: (error) => {\n      console.log(error);\n    },\n    onSuccess: (data) => {\n      setPet(data);\n    },\n  });\n\n  const { data, error } = useQuery({\n    ...getPetByIdOptions({\n      client: localClient,\n      path: {\n        petId: petId!,\n      },\n    }),\n    enabled: Boolean(petId),\n  });\n\n  const onAddPet = async (formData: FormData) => {\n    // simple form field validation to demonstrate using schemas\n    if (PetSchema.required.includes('name') && !formData.get('name')) {\n      setIsRequiredNameError(true);\n      return;\n    }\n\n    addPet.mutate({\n      body: {\n        category: {\n          id: 0,\n          name: formData.get('category') as string,\n        },\n        id: 0,\n        name: formData.get('name') as string,\n        photoUrls: ['string'],\n        status: 'available',\n        tags: [\n          {\n            id: 0,\n            name: 'string',\n          },\n        ],\n      },\n    });\n  };\n\n  const onGetPetById = async () => {\n    // random id 1-10\n    setPetId(Math.floor(Math.random() * (10 - 1 + 1) + 1));\n  };\n\n  const onUpdatePet = async () => {\n    updatePet.mutate({\n      body: {\n        category: {\n          id: 0,\n          name: 'Cats',\n        },\n        id: 2,\n        name: 'Updated Kitty',\n        photoUrls: ['string'],\n        status: 'available',\n        tags: [\n          {\n            id: 0,\n            name: 'string',\n          },\n        ],\n      },\n      // setting headers per request\n      headers: {\n        Authorization: 'Bearer <token_from_method>',\n      },\n    });\n  };\n\n  useEffect(() => {\n    if (error) {\n      console.log(error);\n      return;\n    }\n    setPet(data!);\n  }, [data, error]);\n\n  return (\n    <Box style={{ background: 'var(--gray-a2)', borderRadius: 'var(--radius-3)' }}>\n      <Container size=\"1\">\n        <Section size=\"1\" />\n        <Flex align=\"center\">\n          <a className=\"shrink-0\" href=\"https://heyapi.dev/\" target=\"_blank\">\n            <img\n              src=\"https://heyapi.dev/assets/raw/logo.png\"\n              className=\"h-16 w-16 transition duration-300 will-change-auto\"\n              alt=\"Hey API logo\"\n            />\n          </a>\n          <Heading>@hey-api/openapi-ts 🤝 TanStack React Query</Heading>\n        </Flex>\n        <Section size=\"1\" />\n        <Flex direction=\"column\" gapY=\"2\">\n          <Box maxWidth=\"240px\">\n            <Card>\n              <Flex gap=\"3\" align=\"center\">\n                <Avatar\n                  size=\"3\"\n                  src={pet?.photoUrls[0]}\n                  radius=\"full\"\n                  fallback={pet?.name.slice(0, 1) ?? 'N'}\n                />\n                <Box>\n                  <Text as=\"div\" size=\"2\" weight=\"bold\">\n                    Name: {pet?.name ?? 'N/A'}\n                  </Text>\n                  <Text as=\"div\" size=\"2\" color=\"gray\">\n                    Category: {pet?.category?.name ?? 'N/A'}\n                  </Text>\n                </Box>\n              </Flex>\n            </Card>\n          </Box>\n          <Button onClick={onGetPetById}>\n            <DownloadIcon /> Get Random Pet\n          </Button>\n        </Flex>\n        <Section size=\"1\" />\n        <Flex direction=\"column\" gapY=\"2\">\n          <Form.Root\n            className=\"w-[260px]\"\n            onSubmit={(event) => {\n              event.preventDefault();\n              onAddPet(new FormData(event.currentTarget));\n            }}\n          >\n            <Form.Field className=\"grid mb-[10px]\" name=\"email\">\n              <div className=\"flex items-baseline justify-between\">\n                <Form.Label className=\"text-[15px] font-medium leading-[35px] text-white\">\n                  Name\n                </Form.Label>\n                {isRequiredNameError && (\n                  <Form.Message className=\"text-[13px] text-white opacity-[0.8]\">\n                    Please enter a name\n                  </Form.Message>\n                )}\n              </div>\n              <Form.Control asChild>\n                <TextField.Root placeholder=\"Kitty\" name=\"name\" type=\"text\" />\n              </Form.Control>\n            </Form.Field>\n            <Form.Field className=\"grid mb-[10px]\" name=\"question\">\n              <div className=\"flex items-baseline justify-between\">\n                <Form.Label className=\"text-[15px] font-medium leading-[35px] text-white\">\n                  Category\n                </Form.Label>\n                <Form.Message className=\"text-[13px] text-white opacity-[0.8]\" match=\"valueMissing\">\n                  Please enter a category\n                </Form.Message>\n              </div>\n              <Form.Control asChild>\n                <TextField.Root placeholder=\"Cats\" name=\"category\" type=\"text\" required />\n              </Form.Control>\n            </Form.Field>\n            <Flex gapX=\"2\">\n              <Form.Submit asChild>\n                <Button type=\"submit\">\n                  <PlusIcon /> Add Pet\n                </Button>\n              </Form.Submit>\n              <Button onClick={onUpdatePet} type=\"button\">\n                <ReloadIcon /> Update Pet\n              </Button>\n            </Flex>\n          </Form.Root>\n        </Flex>\n        <Section size=\"1\" />\n      </Container>\n    </Box>\n  );\n}\n\nexport default App;\n"
  },
  {
    "path": "examples/openapi-ts-tanstack-react-query/src/client/@tanstack/react-query.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport { type DefaultError, queryOptions, type UseMutationOptions } from '@tanstack/react-query';\n\nimport { client } from '../client.gen';\nimport { type Options, Sdk } from '../sdk.gen';\nimport type {\n  AddPetData,\n  AddPetResponse,\n  CreateUserData,\n  CreateUserResponse,\n  CreateUsersWithListInputData,\n  CreateUsersWithListInputResponse,\n  DeleteOrderData,\n  DeletePetData,\n  DeleteUserData,\n  FindPetsByStatusData,\n  FindPetsByStatusResponse,\n  FindPetsByTagsData,\n  FindPetsByTagsResponse,\n  GetInventoryData,\n  GetInventoryResponse,\n  GetOrderByIdData,\n  GetOrderByIdResponse,\n  GetPetByIdData,\n  GetPetByIdResponse,\n  GetUserByNameData,\n  GetUserByNameResponse,\n  LoginUserData,\n  LoginUserResponse,\n  LogoutUserData,\n  PlaceOrderData,\n  PlaceOrderResponse,\n  UpdatePetData,\n  UpdatePetResponse,\n  UpdatePetWithFormData,\n  UpdatePetWithFormResponse,\n  UpdateUserData,\n  UploadFileData,\n  UploadFileResponse,\n} from '../types.gen';\n\n/**\n * Add a new pet to the store.\n *\n * Add a new pet to the store.\n */\nexport const addPetMutation = (\n  options?: Partial<Options<AddPetData>>,\n): UseMutationOptions<AddPetResponse, DefaultError, Options<AddPetData>> => {\n  const mutationOptions: UseMutationOptions<AddPetResponse, DefaultError, Options<AddPetData>> = {\n    mutationFn: async (fnOptions) => {\n      const { data } = await Sdk.__registry.get().addPet({\n        ...options,\n        ...fnOptions,\n        throwOnError: true,\n      });\n      return data;\n    },\n  };\n  return mutationOptions;\n};\n\n/**\n * Update an existing pet.\n *\n * Update an existing pet by Id.\n */\nexport const updatePetMutation = (\n  options?: Partial<Options<UpdatePetData>>,\n): UseMutationOptions<UpdatePetResponse, DefaultError, Options<UpdatePetData>> => {\n  const mutationOptions: UseMutationOptions<\n    UpdatePetResponse,\n    DefaultError,\n    Options<UpdatePetData>\n  > = {\n    mutationFn: async (fnOptions) => {\n      const { data } = await Sdk.__registry.get().updatePet({\n        ...options,\n        ...fnOptions,\n        throwOnError: true,\n      });\n      return data;\n    },\n  };\n  return mutationOptions;\n};\n\nexport type QueryKey<TOptions extends Options> = [\n  Pick<TOptions, 'baseUrl' | 'body' | 'headers' | 'path' | 'query'> & {\n    _id: string;\n    _infinite?: boolean;\n    tags?: ReadonlyArray<string>;\n  },\n];\n\nconst createQueryKey = <TOptions extends Options>(\n  id: string,\n  options?: TOptions,\n  infinite?: boolean,\n  tags?: ReadonlyArray<string>,\n): [QueryKey<TOptions>[0]] => {\n  const params: QueryKey<TOptions>[0] = {\n    _id: id,\n    baseUrl: options?.baseUrl || (options?.client ?? client).getConfig().baseUrl,\n  } as QueryKey<TOptions>[0];\n  if (infinite) {\n    params._infinite = infinite;\n  }\n  if (tags) {\n    params.tags = tags;\n  }\n  if (options?.body) {\n    params.body = options.body;\n  }\n  if (options?.headers) {\n    params.headers = options.headers;\n  }\n  if (options?.path) {\n    params.path = options.path;\n  }\n  if (options?.query) {\n    params.query = options.query;\n  }\n  return [params];\n};\n\nexport const findPetsByStatusQueryKey = (options: Options<FindPetsByStatusData>) =>\n  createQueryKey('findPetsByStatus', options);\n\n/**\n * Finds Pets by status.\n *\n * Multiple status values can be provided with comma separated strings.\n */\nexport const findPetsByStatusOptions = (options: Options<FindPetsByStatusData>) =>\n  queryOptions<\n    FindPetsByStatusResponse,\n    DefaultError,\n    FindPetsByStatusResponse,\n    ReturnType<typeof findPetsByStatusQueryKey>\n  >({\n    queryFn: async ({ queryKey, signal }) => {\n      const { data } = await Sdk.__registry.get().findPetsByStatus({\n        ...options,\n        ...queryKey[0],\n        signal,\n        throwOnError: true,\n      });\n      return data;\n    },\n    queryKey: findPetsByStatusQueryKey(options),\n  });\n\nexport const findPetsByTagsQueryKey = (options: Options<FindPetsByTagsData>) =>\n  createQueryKey('findPetsByTags', options);\n\n/**\n * Finds Pets by tags.\n *\n * Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.\n */\nexport const findPetsByTagsOptions = (options: Options<FindPetsByTagsData>) =>\n  queryOptions<\n    FindPetsByTagsResponse,\n    DefaultError,\n    FindPetsByTagsResponse,\n    ReturnType<typeof findPetsByTagsQueryKey>\n  >({\n    queryFn: async ({ queryKey, signal }) => {\n      const { data } = await Sdk.__registry.get().findPetsByTags({\n        ...options,\n        ...queryKey[0],\n        signal,\n        throwOnError: true,\n      });\n      return data;\n    },\n    queryKey: findPetsByTagsQueryKey(options),\n  });\n\n/**\n * Deletes a pet.\n *\n * Delete a pet.\n */\nexport const deletePetMutation = (\n  options?: Partial<Options<DeletePetData>>,\n): UseMutationOptions<unknown, DefaultError, Options<DeletePetData>> => {\n  const mutationOptions: UseMutationOptions<unknown, DefaultError, Options<DeletePetData>> = {\n    mutationFn: async (fnOptions) => {\n      const { data } = await Sdk.__registry.get().deletePet({\n        ...options,\n        ...fnOptions,\n        throwOnError: true,\n      });\n      return data;\n    },\n  };\n  return mutationOptions;\n};\n\nexport const getPetByIdQueryKey = (options: Options<GetPetByIdData>) =>\n  createQueryKey('getPetById', options);\n\n/**\n * Find pet by ID.\n *\n * Returns a single pet.\n */\nexport const getPetByIdOptions = (options: Options<GetPetByIdData>) =>\n  queryOptions<\n    GetPetByIdResponse,\n    DefaultError,\n    GetPetByIdResponse,\n    ReturnType<typeof getPetByIdQueryKey>\n  >({\n    queryFn: async ({ queryKey, signal }) => {\n      const { data } = await Sdk.__registry.get().getPetById({\n        ...options,\n        ...queryKey[0],\n        signal,\n        throwOnError: true,\n      });\n      return data;\n    },\n    queryKey: getPetByIdQueryKey(options),\n  });\n\n/**\n * Updates a pet in the store with form data.\n *\n * Updates a pet resource based on the form data.\n */\nexport const updatePetWithFormMutation = (\n  options?: Partial<Options<UpdatePetWithFormData>>,\n): UseMutationOptions<UpdatePetWithFormResponse, DefaultError, Options<UpdatePetWithFormData>> => {\n  const mutationOptions: UseMutationOptions<\n    UpdatePetWithFormResponse,\n    DefaultError,\n    Options<UpdatePetWithFormData>\n  > = {\n    mutationFn: async (fnOptions) => {\n      const { data } = await Sdk.__registry.get().updatePetWithForm({\n        ...options,\n        ...fnOptions,\n        throwOnError: true,\n      });\n      return data;\n    },\n  };\n  return mutationOptions;\n};\n\n/**\n * Uploads an image.\n *\n * Upload image of the pet.\n */\nexport const uploadFileMutation = (\n  options?: Partial<Options<UploadFileData>>,\n): UseMutationOptions<UploadFileResponse, DefaultError, Options<UploadFileData>> => {\n  const mutationOptions: UseMutationOptions<\n    UploadFileResponse,\n    DefaultError,\n    Options<UploadFileData>\n  > = {\n    mutationFn: async (fnOptions) => {\n      const { data } = await Sdk.__registry.get().uploadFile({\n        ...options,\n        ...fnOptions,\n        throwOnError: true,\n      });\n      return data;\n    },\n  };\n  return mutationOptions;\n};\n\nexport const getInventoryQueryKey = (options?: Options<GetInventoryData>) =>\n  createQueryKey('getInventory', options);\n\n/**\n * Returns pet inventories by status.\n *\n * Returns a map of status codes to quantities.\n */\nexport const getInventoryOptions = (options?: Options<GetInventoryData>) =>\n  queryOptions<\n    GetInventoryResponse,\n    DefaultError,\n    GetInventoryResponse,\n    ReturnType<typeof getInventoryQueryKey>\n  >({\n    queryFn: async ({ queryKey, signal }) => {\n      const { data } = await Sdk.__registry.get().getInventory({\n        ...options,\n        ...queryKey[0],\n        signal,\n        throwOnError: true,\n      });\n      return data;\n    },\n    queryKey: getInventoryQueryKey(options),\n  });\n\n/**\n * Place an order for a pet.\n *\n * Place a new order in the store.\n */\nexport const placeOrderMutation = (\n  options?: Partial<Options<PlaceOrderData>>,\n): UseMutationOptions<PlaceOrderResponse, DefaultError, Options<PlaceOrderData>> => {\n  const mutationOptions: UseMutationOptions<\n    PlaceOrderResponse,\n    DefaultError,\n    Options<PlaceOrderData>\n  > = {\n    mutationFn: async (fnOptions) => {\n      const { data } = await Sdk.__registry.get().placeOrder({\n        ...options,\n        ...fnOptions,\n        throwOnError: true,\n      });\n      return data;\n    },\n  };\n  return mutationOptions;\n};\n\n/**\n * Delete purchase order by identifier.\n *\n * For valid response try integer IDs with value < 1000. Anything above 1000 or non-integers will generate API errors.\n */\nexport const deleteOrderMutation = (\n  options?: Partial<Options<DeleteOrderData>>,\n): UseMutationOptions<unknown, DefaultError, Options<DeleteOrderData>> => {\n  const mutationOptions: UseMutationOptions<unknown, DefaultError, Options<DeleteOrderData>> = {\n    mutationFn: async (fnOptions) => {\n      const { data } = await Sdk.__registry.get().deleteOrder({\n        ...options,\n        ...fnOptions,\n        throwOnError: true,\n      });\n      return data;\n    },\n  };\n  return mutationOptions;\n};\n\nexport const getOrderByIdQueryKey = (options: Options<GetOrderByIdData>) =>\n  createQueryKey('getOrderById', options);\n\n/**\n * Find purchase order by ID.\n *\n * For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions.\n */\nexport const getOrderByIdOptions = (options: Options<GetOrderByIdData>) =>\n  queryOptions<\n    GetOrderByIdResponse,\n    DefaultError,\n    GetOrderByIdResponse,\n    ReturnType<typeof getOrderByIdQueryKey>\n  >({\n    queryFn: async ({ queryKey, signal }) => {\n      const { data } = await Sdk.__registry.get().getOrderById({\n        ...options,\n        ...queryKey[0],\n        signal,\n        throwOnError: true,\n      });\n      return data;\n    },\n    queryKey: getOrderByIdQueryKey(options),\n  });\n\n/**\n * Create user.\n *\n * This can only be done by the logged in user.\n */\nexport const createUserMutation = (\n  options?: Partial<Options<CreateUserData>>,\n): UseMutationOptions<CreateUserResponse, DefaultError, Options<CreateUserData>> => {\n  const mutationOptions: UseMutationOptions<\n    CreateUserResponse,\n    DefaultError,\n    Options<CreateUserData>\n  > = {\n    mutationFn: async (fnOptions) => {\n      const { data } = await Sdk.__registry.get().createUser({\n        ...options,\n        ...fnOptions,\n        throwOnError: true,\n      });\n      return data;\n    },\n  };\n  return mutationOptions;\n};\n\n/**\n * Creates list of users with given input array.\n *\n * Creates list of users with given input array.\n */\nexport const createUsersWithListInputMutation = (\n  options?: Partial<Options<CreateUsersWithListInputData>>,\n): UseMutationOptions<\n  CreateUsersWithListInputResponse,\n  DefaultError,\n  Options<CreateUsersWithListInputData>\n> => {\n  const mutationOptions: UseMutationOptions<\n    CreateUsersWithListInputResponse,\n    DefaultError,\n    Options<CreateUsersWithListInputData>\n  > = {\n    mutationFn: async (fnOptions) => {\n      const { data } = await Sdk.__registry.get().createUsersWithListInput({\n        ...options,\n        ...fnOptions,\n        throwOnError: true,\n      });\n      return data;\n    },\n  };\n  return mutationOptions;\n};\n\nexport const loginUserQueryKey = (options?: Options<LoginUserData>) =>\n  createQueryKey('loginUser', options);\n\n/**\n * Logs user into the system.\n *\n * Log into the system.\n */\nexport const loginUserOptions = (options?: Options<LoginUserData>) =>\n  queryOptions<\n    LoginUserResponse,\n    DefaultError,\n    LoginUserResponse,\n    ReturnType<typeof loginUserQueryKey>\n  >({\n    queryFn: async ({ queryKey, signal }) => {\n      const { data } = await Sdk.__registry.get().loginUser({\n        ...options,\n        ...queryKey[0],\n        signal,\n        throwOnError: true,\n      });\n      return data;\n    },\n    queryKey: loginUserQueryKey(options),\n  });\n\nexport const logoutUserQueryKey = (options?: Options<LogoutUserData>) =>\n  createQueryKey('logoutUser', options);\n\n/**\n * Logs out current logged in user session.\n *\n * Log user out of the system.\n */\nexport const logoutUserOptions = (options?: Options<LogoutUserData>) =>\n  queryOptions<unknown, DefaultError, unknown, ReturnType<typeof logoutUserQueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n      const { data } = await Sdk.__registry.get().logoutUser({\n        ...options,\n        ...queryKey[0],\n        signal,\n        throwOnError: true,\n      });\n      return data;\n    },\n    queryKey: logoutUserQueryKey(options),\n  });\n\n/**\n * Delete user resource.\n *\n * This can only be done by the logged in user.\n */\nexport const deleteUserMutation = (\n  options?: Partial<Options<DeleteUserData>>,\n): UseMutationOptions<unknown, DefaultError, Options<DeleteUserData>> => {\n  const mutationOptions: UseMutationOptions<unknown, DefaultError, Options<DeleteUserData>> = {\n    mutationFn: async (fnOptions) => {\n      const { data } = await Sdk.__registry.get().deleteUser({\n        ...options,\n        ...fnOptions,\n        throwOnError: true,\n      });\n      return data;\n    },\n  };\n  return mutationOptions;\n};\n\nexport const getUserByNameQueryKey = (options: Options<GetUserByNameData>) =>\n  createQueryKey('getUserByName', options);\n\n/**\n * Get user by user name.\n *\n * Get user detail based on username.\n */\nexport const getUserByNameOptions = (options: Options<GetUserByNameData>) =>\n  queryOptions<\n    GetUserByNameResponse,\n    DefaultError,\n    GetUserByNameResponse,\n    ReturnType<typeof getUserByNameQueryKey>\n  >({\n    queryFn: async ({ queryKey, signal }) => {\n      const { data } = await Sdk.__registry.get().getUserByName({\n        ...options,\n        ...queryKey[0],\n        signal,\n        throwOnError: true,\n      });\n      return data;\n    },\n    queryKey: getUserByNameQueryKey(options),\n  });\n\n/**\n * Update user resource.\n *\n * This can only be done by the logged in user.\n */\nexport const updateUserMutation = (\n  options?: Partial<Options<UpdateUserData>>,\n): UseMutationOptions<unknown, DefaultError, Options<UpdateUserData>> => {\n  const mutationOptions: UseMutationOptions<unknown, DefaultError, Options<UpdateUserData>> = {\n    mutationFn: async (fnOptions) => {\n      const { data } = await Sdk.__registry.get().updateUser({\n        ...options,\n        ...fnOptions,\n        throwOnError: true,\n      });\n      return data;\n    },\n  };\n  return mutationOptions;\n};\n"
  },
  {
    "path": "examples/openapi-ts-tanstack-react-query/src/client/client/client.gen.ts",
    "content": "// 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 (options: RequestOptions) => {\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 url = buildUrl(opts);\n\n    return { opts, url };\n  };\n\n  const request: Client['request'] = async (options) => {\n    // @ts-expect-error\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"
  },
  {
    "path": "examples/openapi-ts-tanstack-react-query/src/client/client/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type { Auth } from '../core/auth.gen';\nexport type { QuerySerializerOptions } from '../core/bodySerializer.gen';\nexport {\n  formDataBodySerializer,\n  jsonBodySerializer,\n  urlSearchParamsBodySerializer,\n} from '../core/bodySerializer.gen';\nexport { buildClientParams } from '../core/params.gen';\nexport { serializeQueryKeyValue } from '../core/queryKeySerializer.gen';\nexport { createClient } from './client.gen';\nexport type {\n  Client,\n  ClientOptions,\n  Config,\n  CreateClientConfig,\n  Options,\n  RequestOptions,\n  RequestResult,\n  ResolvedRequestOptions,\n  ResponseStyle,\n  TDataShape,\n} from './types.gen';\nexport { createConfig, mergeHeaders } from './utils.gen';\n"
  },
  {
    "path": "examples/openapi-ts-tanstack-react-query/src/client/client/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { Auth } from '../core/auth.gen';\nimport type { ServerSentEventsOptions, ServerSentEventsResult } from '../core/serverSentEvents.gen';\nimport type { Client as CoreClient, Config as CoreConfig } from '../core/types.gen';\nimport type { Middleware } from './utils.gen';\n\nexport type ResponseStyle = 'data' | 'fields';\n\nexport interface Config<T extends ClientOptions = ClientOptions>\n  extends Omit<RequestInit, 'body' | 'headers' | 'method'>, CoreConfig {\n  /**\n   * Base URL for all requests made by this client.\n   */\n  baseUrl?: T['baseUrl'];\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   * Please don't use the Fetch client for Next.js applications. The `next`\n   * options won't have any effect.\n   *\n   * Install {@link https://www.npmjs.com/package/@hey-api/client-next `@hey-api/client-next`} instead.\n   */\n  next?: never;\n  /**\n   * Return the response data parsed in a specified format. By default, `auto`\n   * will infer the appropriate method from the `Content-Type` response header.\n   * You can override this behavior with any of the {@link Body} methods.\n   * Select `stream` if you don't want to parse response data at all.\n   *\n   * @default 'auto'\n   */\n  parseAs?: 'arrayBuffer' | 'auto' | 'blob' | 'formData' | 'json' | 'stream' | 'text';\n  /**\n   * Should we return only data or multiple fields (data, error, response, etc.)?\n   *\n   * @default 'fields'\n   */\n  responseStyle?: ResponseStyle;\n  /**\n   * Throw an error instead of returning it in the response?\n   *\n   * @default false\n   */\n  throwOnError?: T['throwOnError'];\n}\n\nexport interface RequestOptions<\n  TData = unknown,\n  TResponseStyle extends ResponseStyle = 'fields',\n  ThrowOnError extends boolean = boolean,\n  Url extends string = string,\n>\n  extends\n    Config<{\n      responseStyle: TResponseStyle;\n      throwOnError: ThrowOnError;\n    }>,\n    Pick<\n      ServerSentEventsOptions<TData>,\n      | 'onRequest'\n      | 'onSseError'\n      | 'onSseEvent'\n      | 'sseDefaultRetryDelay'\n      | 'sseMaxRetryAttempts'\n      | 'sseMaxRetryDelay'\n    > {\n  /**\n   * Any body that you want to add to your request.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/fetch#body}\n   */\n  body?: unknown;\n  path?: Record<string, unknown>;\n  query?: Record<string, unknown>;\n  /**\n   * Security mechanism(s) to use for the request.\n   */\n  security?: ReadonlyArray<Auth>;\n  url: Url;\n}\n\nexport interface ResolvedRequestOptions<\n  TResponseStyle extends ResponseStyle = 'fields',\n  ThrowOnError extends boolean = boolean,\n  Url extends string = string,\n> extends RequestOptions<unknown, TResponseStyle, ThrowOnError, Url> {\n  serializedBody?: string;\n}\n\nexport type RequestResult<\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = boolean,\n  TResponseStyle extends ResponseStyle = 'fields',\n> = ThrowOnError extends true\n  ? Promise<\n      TResponseStyle extends 'data'\n        ? TData extends Record<string, unknown>\n          ? TData[keyof TData]\n          : TData\n        : {\n            data: TData extends Record<string, unknown> ? TData[keyof TData] : TData;\n            request: Request;\n            response: Response;\n          }\n    >\n  : Promise<\n      TResponseStyle extends 'data'\n        ? (TData extends Record<string, unknown> ? TData[keyof TData] : TData) | undefined\n        : (\n            | {\n                data: TData extends Record<string, unknown> ? TData[keyof TData] : TData;\n                error: undefined;\n              }\n            | {\n                data: undefined;\n                error: TError extends Record<string, unknown> ? TError[keyof TError] : TError;\n              }\n          ) & {\n            request: Request;\n            response: Response;\n          }\n    >;\n\nexport interface ClientOptions {\n  baseUrl?: string;\n  responseStyle?: ResponseStyle;\n  throwOnError?: boolean;\n}\n\ntype MethodFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'>,\n) => RequestResult<TData, TError, ThrowOnError, TResponseStyle>;\n\ntype SseFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'>,\n) => Promise<ServerSentEventsResult<TData, TError>>;\n\ntype RequestFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'> &\n    Pick<Required<RequestOptions<TData, TResponseStyle, ThrowOnError>>, 'method'>,\n) => RequestResult<TData, TError, ThrowOnError, TResponseStyle>;\n\ntype BuildUrlFn = <\n  TData extends {\n    body?: unknown;\n    path?: Record<string, unknown>;\n    query?: Record<string, unknown>;\n    url: string;\n  },\n>(\n  options: TData & Options<TData>,\n) => string;\n\nexport type Client = CoreClient<RequestFn, Config, MethodFn, BuildUrlFn, SseFn> & {\n  interceptors: Middleware<Request, Response, unknown, ResolvedRequestOptions>;\n};\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 = ClientOptions> = (\n  override?: Config<ClientOptions & T>,\n) => Config<Required<ClientOptions> & T>;\n\nexport interface TDataShape {\n  body?: unknown;\n  headers?: unknown;\n  path?: unknown;\n  query?: unknown;\n  url: string;\n}\n\ntype OmitKeys<T, K> = Pick<T, Exclude<keyof T, K>>;\n\nexport type Options<\n  TData extends TDataShape = TDataShape,\n  ThrowOnError extends boolean = boolean,\n  TResponse = unknown,\n  TResponseStyle extends ResponseStyle = 'fields',\n> = OmitKeys<\n  RequestOptions<TResponse, TResponseStyle, ThrowOnError>,\n  'body' | 'path' | 'query' | 'url'\n> &\n  ([TData] extends [never] ? unknown : Omit<TData, 'url'>);\n"
  },
  {
    "path": "examples/openapi-ts-tanstack-react-query/src/client/client/utils.gen.ts",
    "content": "// 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"
  },
  {
    "path": "examples/openapi-ts-tanstack-react-query/src/client/client.gen.ts",
    "content": "// 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> = (\n  override?: Config<ClientOptions & T>,\n) => Config<Required<ClientOptions> & T>;\n\nexport const client = createClient(\n  createConfig<ClientOptions2>({ baseUrl: 'https://petstore3.swagger.io/api/v3' }),\n);\n"
  },
  {
    "path": "examples/openapi-ts-tanstack-react-query/src/client/core/auth.gen.ts",
    "content": "// 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"
  },
  {
    "path": "examples/openapi-ts-tanstack-react-query/src/client/core/bodySerializer.gen.ts",
    "content": "// 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"
  },
  {
    "path": "examples/openapi-ts-tanstack-react-query/src/client/core/params.gen.ts",
    "content": "// 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"
  },
  {
    "path": "examples/openapi-ts-tanstack-react-query/src/client/core/pathSerializer.gen.ts",
    "content": "// 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"
  },
  {
    "path": "examples/openapi-ts-tanstack-react-query/src/client/core/queryKeySerializer.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\n/**\n * JSON-friendly union that mirrors what Pinia Colada can hash.\n */\nexport type JsonValue =\n  | null\n  | string\n  | number\n  | boolean\n  | JsonValue[]\n  | { [key: string]: JsonValue };\n\n/**\n * Replacer that converts non-JSON values (bigint, Date, etc.) to safe substitutes.\n */\nexport const queryKeyJsonReplacer = (_key: string, value: unknown) => {\n  if (value === undefined || typeof value === 'function' || typeof value === 'symbol') {\n    return undefined;\n  }\n  if (typeof value === 'bigint') {\n    return value.toString();\n  }\n  if (value instanceof Date) {\n    return value.toISOString();\n  }\n  return value;\n};\n\n/**\n * Safely stringifies a value and parses it back into a JsonValue.\n */\nexport const stringifyToJsonValue = (input: unknown): JsonValue | undefined => {\n  try {\n    const json = JSON.stringify(input, queryKeyJsonReplacer);\n    if (json === undefined) {\n      return undefined;\n    }\n    return JSON.parse(json) as JsonValue;\n  } catch {\n    return undefined;\n  }\n};\n\n/**\n * Detects plain objects (including objects with a null prototype).\n */\nconst isPlainObject = (value: unknown): value is Record<string, unknown> => {\n  if (value === null || typeof value !== 'object') {\n    return false;\n  }\n  const prototype = Object.getPrototypeOf(value as object);\n  return prototype === Object.prototype || prototype === null;\n};\n\n/**\n * Turns URLSearchParams into a sorted JSON object for deterministic keys.\n */\nconst serializeSearchParams = (params: URLSearchParams): JsonValue => {\n  const entries = Array.from(params.entries()).sort(([a], [b]) => a.localeCompare(b));\n  const result: Record<string, JsonValue> = {};\n\n  for (const [key, value] of entries) {\n    const existing = result[key];\n    if (existing === undefined) {\n      result[key] = value;\n      continue;\n    }\n\n    if (Array.isArray(existing)) {\n      (existing as string[]).push(value);\n    } else {\n      result[key] = [existing, value];\n    }\n  }\n\n  return result;\n};\n\n/**\n * Normalizes any accepted value into a JSON-friendly shape for query keys.\n */\nexport const serializeQueryKeyValue = (value: unknown): JsonValue | undefined => {\n  if (value === null) {\n    return null;\n  }\n\n  if (typeof value === 'string' || typeof value === 'number' || typeof value === 'boolean') {\n    return value;\n  }\n\n  if (value === undefined || typeof value === 'function' || typeof value === 'symbol') {\n    return undefined;\n  }\n\n  if (typeof value === 'bigint') {\n    return value.toString();\n  }\n\n  if (value instanceof Date) {\n    return value.toISOString();\n  }\n\n  if (Array.isArray(value)) {\n    return stringifyToJsonValue(value);\n  }\n\n  if (typeof URLSearchParams !== 'undefined' && value instanceof URLSearchParams) {\n    return serializeSearchParams(value);\n  }\n\n  if (isPlainObject(value)) {\n    return stringifyToJsonValue(value);\n  }\n\n  return undefined;\n};\n"
  },
  {
    "path": "examples/openapi-ts-tanstack-react-query/src/client/core/serverSentEvents.gen.ts",
    "content": "// 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 const 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            // Normalize line endings: CRLF -> LF, then CR -> LF\n            buffer = buffer.replace(/\\r\\n/g, '\\n').replace(/\\r/g, '\\n');\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"
  },
  {
    "path": "examples/openapi-ts-tanstack-react-query/src/client/core/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { Auth, AuthToken } from './auth.gen';\nimport type { BodySerializer, QuerySerializer, QuerySerializerOptions } from './bodySerializer.gen';\n\nexport type HttpMethod =\n  | 'connect'\n  | 'delete'\n  | 'get'\n  | 'head'\n  | 'options'\n  | 'patch'\n  | 'post'\n  | 'put'\n  | 'trace';\n\nexport type Client<\n  RequestFn = never,\n  Config = unknown,\n  MethodFn = never,\n  BuildUrlFn = never,\n  SseFn = never,\n> = {\n  /**\n   * Returns the final request URL.\n   */\n  buildUrl: BuildUrlFn;\n  getConfig: () => Config;\n  request: RequestFn;\n  setConfig: (config: Config) => Config;\n} & {\n  [K in HttpMethod]: MethodFn;\n} & ([SseFn] extends [never] ? { sse?: never } : { sse: { [K in HttpMethod]: SseFn } });\n\nexport interface Config {\n  /**\n   * Auth token or a function returning auth token. The resolved value will be\n   * added to the request payload as defined by its `security` array.\n   */\n  auth?: ((auth: Auth) => Promise<AuthToken> | AuthToken) | AuthToken;\n  /**\n   * A function for serializing request body parameter. By default,\n   * {@link JSON.stringify()} will be used.\n   */\n  bodySerializer?: BodySerializer | null;\n  /**\n   * An object containing any HTTP headers that you want to pre-populate your\n   * `Headers` object with.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/Headers/Headers#init See more}\n   */\n  headers?:\n    | RequestInit['headers']\n    | Record<\n        string,\n        string | number | boolean | (string | number | boolean)[] | null | undefined | unknown\n      >;\n  /**\n   * The request method.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/fetch#method See more}\n   */\n  method?: Uppercase<HttpMethod>;\n  /**\n   * A function for serializing request query parameters. By default, arrays\n   * will be exploded in form style, objects will be exploded in deepObject\n   * style, and reserved characters are percent-encoded.\n   *\n   * This method will have no effect if the native `paramsSerializer()` Axios\n   * API function is used.\n   *\n   * {@link https://swagger.io/docs/specification/serialization/#query View examples}\n   */\n  querySerializer?: QuerySerializer | QuerySerializerOptions;\n  /**\n   * A function validating request data. This is useful if you want to ensure\n   * the request conforms to the desired shape, so it can be safely sent to\n   * the server.\n   */\n  requestValidator?: (data: unknown) => Promise<unknown>;\n  /**\n   * A function transforming response data before it's returned. This is useful\n   * for post-processing data, e.g. converting ISO strings into Date objects.\n   */\n  responseTransformer?: (data: unknown) => Promise<unknown>;\n  /**\n   * A function validating response data. This is useful if you want to ensure\n   * the response conforms to the desired shape, so it can be safely passed to\n   * the transformers and returned to the user.\n   */\n  responseValidator?: (data: unknown) => Promise<unknown>;\n}\n\ntype IsExactlyNeverOrNeverUndefined<T> = [T] extends [never]\n  ? true\n  : [T] extends [never | undefined]\n    ? [undefined] extends [T]\n      ? false\n      : true\n    : false;\n\nexport type OmitNever<T extends Record<string, unknown>> = {\n  [K in keyof T as IsExactlyNeverOrNeverUndefined<T[K]> extends true ? never : K]: T[K];\n};\n"
  },
  {
    "path": "examples/openapi-ts-tanstack-react-query/src/client/core/utils.gen.ts",
    "content": "// 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"
  },
  {
    "path": "examples/openapi-ts-tanstack-react-query/src/client/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport { type Options, Sdk } from './sdk.gen';\nexport type {\n  AddPetData,\n  AddPetErrors,\n  AddPetResponse,\n  AddPetResponses,\n  ApiResponse,\n  Category,\n  ClientOptions,\n  CreateUserData,\n  CreateUserErrors,\n  CreateUserResponse,\n  CreateUserResponses,\n  CreateUsersWithListInputData,\n  CreateUsersWithListInputErrors,\n  CreateUsersWithListInputResponse,\n  CreateUsersWithListInputResponses,\n  DeleteOrderData,\n  DeleteOrderErrors,\n  DeleteOrderResponses,\n  DeletePetData,\n  DeletePetErrors,\n  DeletePetResponses,\n  DeleteUserData,\n  DeleteUserErrors,\n  DeleteUserResponses,\n  FindPetsByStatusData,\n  FindPetsByStatusErrors,\n  FindPetsByStatusResponse,\n  FindPetsByStatusResponses,\n  FindPetsByTagsData,\n  FindPetsByTagsErrors,\n  FindPetsByTagsResponse,\n  FindPetsByTagsResponses,\n  GetInventoryData,\n  GetInventoryErrors,\n  GetInventoryResponse,\n  GetInventoryResponses,\n  GetOrderByIdData,\n  GetOrderByIdErrors,\n  GetOrderByIdResponse,\n  GetOrderByIdResponses,\n  GetPetByIdData,\n  GetPetByIdErrors,\n  GetPetByIdResponse,\n  GetPetByIdResponses,\n  GetUserByNameData,\n  GetUserByNameErrors,\n  GetUserByNameResponse,\n  GetUserByNameResponses,\n  LoginUserData,\n  LoginUserErrors,\n  LoginUserResponse,\n  LoginUserResponses,\n  LogoutUserData,\n  LogoutUserErrors,\n  LogoutUserResponses,\n  Order,\n  Pet,\n  Pet2,\n  PlaceOrderData,\n  PlaceOrderErrors,\n  PlaceOrderResponse,\n  PlaceOrderResponses,\n  Tag,\n  UpdatePetData,\n  UpdatePetErrors,\n  UpdatePetResponse,\n  UpdatePetResponses,\n  UpdatePetWithFormData,\n  UpdatePetWithFormErrors,\n  UpdatePetWithFormResponse,\n  UpdatePetWithFormResponses,\n  UpdateUserData,\n  UpdateUserErrors,\n  UpdateUserResponses,\n  UploadFileData,\n  UploadFileErrors,\n  UploadFileResponse,\n  UploadFileResponses,\n  User,\n  UserArray,\n} from './types.gen';\n"
  },
  {
    "path": "examples/openapi-ts-tanstack-react-query/src/client/schemas.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport const OrderSchema = {\n  properties: {\n    complete: {\n      type: 'boolean',\n    },\n    id: {\n      example: 10,\n      format: 'int64',\n      type: 'integer',\n    },\n    petId: {\n      example: 198772,\n      format: 'int64',\n      type: 'integer',\n    },\n    quantity: {\n      example: 7,\n      format: 'int32',\n      type: 'integer',\n    },\n    shipDate: {\n      format: 'date-time',\n      type: 'string',\n    },\n    status: {\n      description: 'Order Status',\n      enum: ['placed', 'approved', 'delivered'],\n      example: 'approved',\n      type: 'string',\n    },\n  },\n  type: 'object',\n  'x-swagger-router-model': 'io.swagger.petstore.model.Order',\n  xml: {\n    name: 'order',\n  },\n} as const;\n\nexport const CategorySchema = {\n  properties: {\n    id: {\n      example: 1,\n      format: 'int64',\n      type: 'integer',\n    },\n    name: {\n      example: 'Dogs',\n      type: 'string',\n    },\n  },\n  type: 'object',\n  'x-swagger-router-model': 'io.swagger.petstore.model.Category',\n  xml: {\n    name: 'category',\n  },\n} as const;\n\nexport const UserSchema = {\n  properties: {\n    email: {\n      example: 'john@email.com',\n      type: 'string',\n    },\n    firstName: {\n      example: 'John',\n      type: 'string',\n    },\n    id: {\n      example: 10,\n      format: 'int64',\n      type: 'integer',\n    },\n    lastName: {\n      example: 'James',\n      type: 'string',\n    },\n    password: {\n      example: '12345',\n      type: 'string',\n    },\n    phone: {\n      example: '12345',\n      type: 'string',\n    },\n    userStatus: {\n      description: 'User Status',\n      example: 1,\n      format: 'int32',\n      type: 'integer',\n    },\n    username: {\n      example: 'theUser',\n      type: 'string',\n    },\n  },\n  type: 'object',\n  'x-swagger-router-model': 'io.swagger.petstore.model.User',\n  xml: {\n    name: 'user',\n  },\n} as const;\n\nexport const TagSchema = {\n  properties: {\n    id: {\n      format: 'int64',\n      type: 'integer',\n    },\n    name: {\n      type: 'string',\n    },\n  },\n  type: 'object',\n  'x-swagger-router-model': 'io.swagger.petstore.model.Tag',\n  xml: {\n    name: 'tag',\n  },\n} as const;\n\nexport const PetSchema = {\n  properties: {\n    category: {\n      $ref: '#/components/schemas/Category',\n    },\n    id: {\n      example: 10,\n      format: 'int64',\n      type: 'integer',\n    },\n    name: {\n      example: 'doggie',\n      type: 'string',\n    },\n    photoUrls: {\n      items: {\n        type: 'string',\n        xml: {\n          name: 'photoUrl',\n        },\n      },\n      type: 'array',\n      xml: {\n        wrapped: true,\n      },\n    },\n    status: {\n      description: 'pet status in the store',\n      enum: ['available', 'pending', 'sold'],\n      type: 'string',\n    },\n    tags: {\n      items: {\n        $ref: '#/components/schemas/Tag',\n      },\n      type: 'array',\n      xml: {\n        wrapped: true,\n      },\n    },\n  },\n  required: ['name', 'photoUrls'],\n  type: 'object',\n  'x-swagger-router-model': 'io.swagger.petstore.model.Pet',\n  xml: {\n    name: 'pet',\n  },\n} as const;\n\nexport const ApiResponseSchema = {\n  properties: {\n    code: {\n      format: 'int32',\n      type: 'integer',\n    },\n    message: {\n      type: 'string',\n    },\n    type: {\n      type: 'string',\n    },\n  },\n  type: 'object',\n  xml: {\n    name: '##default',\n  },\n} as const;\n"
  },
  {
    "path": "examples/openapi-ts-tanstack-react-query/src/client/sdk.gen.ts",
    "content": "// 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 {\n  AddPetData,\n  AddPetErrors,\n  AddPetResponses,\n  CreateUserData,\n  CreateUserErrors,\n  CreateUserResponses,\n  CreateUsersWithListInputData,\n  CreateUsersWithListInputErrors,\n  CreateUsersWithListInputResponses,\n  DeleteOrderData,\n  DeleteOrderErrors,\n  DeleteOrderResponses,\n  DeletePetData,\n  DeletePetErrors,\n  DeletePetResponses,\n  DeleteUserData,\n  DeleteUserErrors,\n  DeleteUserResponses,\n  FindPetsByStatusData,\n  FindPetsByStatusErrors,\n  FindPetsByStatusResponses,\n  FindPetsByTagsData,\n  FindPetsByTagsErrors,\n  FindPetsByTagsResponses,\n  GetInventoryData,\n  GetInventoryErrors,\n  GetInventoryResponses,\n  GetOrderByIdData,\n  GetOrderByIdErrors,\n  GetOrderByIdResponses,\n  GetPetByIdData,\n  GetPetByIdErrors,\n  GetPetByIdResponses,\n  GetUserByNameData,\n  GetUserByNameErrors,\n  GetUserByNameResponses,\n  LoginUserData,\n  LoginUserErrors,\n  LoginUserResponses,\n  LogoutUserData,\n  LogoutUserErrors,\n  LogoutUserResponses,\n  PlaceOrderData,\n  PlaceOrderErrors,\n  PlaceOrderResponses,\n  UpdatePetData,\n  UpdatePetErrors,\n  UpdatePetResponses,\n  UpdatePetWithFormData,\n  UpdatePetWithFormErrors,\n  UpdatePetWithFormResponses,\n  UpdateUserData,\n  UpdateUserErrors,\n  UpdateUserResponses,\n  UploadFileData,\n  UploadFileErrors,\n  UploadFileResponses,\n} from './types.gen';\n\nexport type Options<\n  TData extends TDataShape = TDataShape,\n  ThrowOnError extends boolean = boolean,\n> = Options2<TData, ThrowOnError> & {\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\nclass HeyApiClient {\n  protected client: Client;\n\n  constructor(args?: { client?: Client }) {\n    this.client = args?.client ?? client;\n  }\n}\n\nclass HeyApiRegistry<T> {\n  private readonly defaultKey = 'default';\n\n  private readonly instances: Map<string, T> = new Map();\n\n  get(key?: string): T {\n    const instance = this.instances.get(key ?? this.defaultKey);\n    if (!instance) {\n      throw new Error(`No SDK client found. Create one with \"new Sdk()\" to fix this error.`);\n    }\n    return instance;\n  }\n\n  set(value: T, key?: string): void {\n    this.instances.set(key ?? this.defaultKey, value);\n  }\n}\n\nexport class Sdk extends HeyApiClient {\n  public static readonly __registry = new HeyApiRegistry<Sdk>();\n\n  constructor(args?: { client?: Client; key?: string }) {\n    super(args);\n    Sdk.__registry.set(this, args?.key);\n  }\n\n  /**\n   * Add a new pet to the store.\n   *\n   * Add a new pet to the store.\n   */\n  public addPet<ThrowOnError extends boolean = false>(options: Options<AddPetData, ThrowOnError>) {\n    return (options.client ?? this.client).post<AddPetResponses, AddPetErrors, ThrowOnError>({\n      security: [{ scheme: 'bearer', type: 'http' }],\n      url: '/pet',\n      ...options,\n      headers: {\n        'Content-Type': 'application/json',\n        ...options.headers,\n      },\n    });\n  }\n\n  /**\n   * Update an existing pet.\n   *\n   * Update an existing pet by Id.\n   */\n  public updatePet<ThrowOnError extends boolean = false>(\n    options: Options<UpdatePetData, ThrowOnError>,\n  ) {\n    return (options.client ?? this.client).put<UpdatePetResponses, UpdatePetErrors, ThrowOnError>({\n      security: [{ scheme: 'bearer', type: 'http' }],\n      url: '/pet',\n      ...options,\n      headers: {\n        'Content-Type': 'application/json',\n        ...options.headers,\n      },\n    });\n  }\n\n  /**\n   * Finds Pets by status.\n   *\n   * Multiple status values can be provided with comma separated strings.\n   */\n  public findPetsByStatus<ThrowOnError extends boolean = false>(\n    options: Options<FindPetsByStatusData, ThrowOnError>,\n  ) {\n    return (options.client ?? this.client).get<\n      FindPetsByStatusResponses,\n      FindPetsByStatusErrors,\n      ThrowOnError\n    >({\n      security: [{ scheme: 'bearer', type: 'http' }],\n      url: '/pet/findByStatus',\n      ...options,\n    });\n  }\n\n  /**\n   * Finds Pets by tags.\n   *\n   * Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.\n   */\n  public findPetsByTags<ThrowOnError extends boolean = false>(\n    options: Options<FindPetsByTagsData, ThrowOnError>,\n  ) {\n    return (options.client ?? this.client).get<\n      FindPetsByTagsResponses,\n      FindPetsByTagsErrors,\n      ThrowOnError\n    >({\n      security: [{ scheme: 'bearer', type: 'http' }],\n      url: '/pet/findByTags',\n      ...options,\n    });\n  }\n\n  /**\n   * Deletes a pet.\n   *\n   * Delete a pet.\n   */\n  public deletePet<ThrowOnError extends boolean = false>(\n    options: Options<DeletePetData, ThrowOnError>,\n  ) {\n    return (options.client ?? this.client).delete<\n      DeletePetResponses,\n      DeletePetErrors,\n      ThrowOnError\n    >({\n      security: [{ scheme: 'bearer', type: 'http' }],\n      url: '/pet/{petId}',\n      ...options,\n    });\n  }\n\n  /**\n   * Find pet by ID.\n   *\n   * Returns a single pet.\n   */\n  public getPetById<ThrowOnError extends boolean = false>(\n    options: Options<GetPetByIdData, ThrowOnError>,\n  ) {\n    return (options.client ?? this.client).get<GetPetByIdResponses, GetPetByIdErrors, ThrowOnError>(\n      {\n        security: [\n          { name: 'api_key', type: 'apiKey' },\n          { scheme: 'bearer', type: 'http' },\n        ],\n        url: '/pet/{petId}',\n        ...options,\n      },\n    );\n  }\n\n  /**\n   * Updates a pet in the store with form data.\n   *\n   * Updates a pet resource based on the form data.\n   */\n  public updatePetWithForm<ThrowOnError extends boolean = false>(\n    options: Options<UpdatePetWithFormData, ThrowOnError>,\n  ) {\n    return (options.client ?? this.client).post<\n      UpdatePetWithFormResponses,\n      UpdatePetWithFormErrors,\n      ThrowOnError\n    >({\n      security: [{ scheme: 'bearer', type: 'http' }],\n      url: '/pet/{petId}',\n      ...options,\n    });\n  }\n\n  /**\n   * Uploads an image.\n   *\n   * Upload image of the pet.\n   */\n  public uploadFile<ThrowOnError extends boolean = false>(\n    options: Options<UploadFileData, ThrowOnError>,\n  ) {\n    return (options.client ?? this.client).post<\n      UploadFileResponses,\n      UploadFileErrors,\n      ThrowOnError\n    >({\n      bodySerializer: null,\n      security: [{ scheme: 'bearer', type: 'http' }],\n      url: '/pet/{petId}/uploadImage',\n      ...options,\n      headers: {\n        'Content-Type': 'application/octet-stream',\n        ...options.headers,\n      },\n    });\n  }\n\n  /**\n   * Returns pet inventories by status.\n   *\n   * Returns a map of status codes to quantities.\n   */\n  public getInventory<ThrowOnError extends boolean = false>(\n    options?: Options<GetInventoryData, ThrowOnError>,\n  ) {\n    return (options?.client ?? this.client).get<\n      GetInventoryResponses,\n      GetInventoryErrors,\n      ThrowOnError\n    >({\n      security: [{ name: 'api_key', type: 'apiKey' }],\n      url: '/store/inventory',\n      ...options,\n    });\n  }\n\n  /**\n   * Place an order for a pet.\n   *\n   * Place a new order in the store.\n   */\n  public placeOrder<ThrowOnError extends boolean = false>(\n    options?: Options<PlaceOrderData, ThrowOnError>,\n  ) {\n    return (options?.client ?? this.client).post<\n      PlaceOrderResponses,\n      PlaceOrderErrors,\n      ThrowOnError\n    >({\n      url: '/store/order',\n      ...options,\n      headers: {\n        'Content-Type': 'application/json',\n        ...options?.headers,\n      },\n    });\n  }\n\n  /**\n   * Delete purchase order by identifier.\n   *\n   * For valid response try integer IDs with value < 1000. Anything above 1000 or non-integers will generate API errors.\n   */\n  public deleteOrder<ThrowOnError extends boolean = false>(\n    options: Options<DeleteOrderData, ThrowOnError>,\n  ) {\n    return (options.client ?? this.client).delete<\n      DeleteOrderResponses,\n      DeleteOrderErrors,\n      ThrowOnError\n    >({ url: '/store/order/{orderId}', ...options });\n  }\n\n  /**\n   * Find purchase order by ID.\n   *\n   * For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions.\n   */\n  public getOrderById<ThrowOnError extends boolean = false>(\n    options: Options<GetOrderByIdData, ThrowOnError>,\n  ) {\n    return (options.client ?? this.client).get<\n      GetOrderByIdResponses,\n      GetOrderByIdErrors,\n      ThrowOnError\n    >({ url: '/store/order/{orderId}', ...options });\n  }\n\n  /**\n   * Create user.\n   *\n   * This can only be done by the logged in user.\n   */\n  public createUser<ThrowOnError extends boolean = false>(\n    options?: Options<CreateUserData, ThrowOnError>,\n  ) {\n    return (options?.client ?? this.client).post<\n      CreateUserResponses,\n      CreateUserErrors,\n      ThrowOnError\n    >({\n      url: '/user',\n      ...options,\n      headers: {\n        'Content-Type': 'application/json',\n        ...options?.headers,\n      },\n    });\n  }\n\n  /**\n   * Creates list of users with given input array.\n   *\n   * Creates list of users with given input array.\n   */\n  public createUsersWithListInput<ThrowOnError extends boolean = false>(\n    options?: Options<CreateUsersWithListInputData, ThrowOnError>,\n  ) {\n    return (options?.client ?? this.client).post<\n      CreateUsersWithListInputResponses,\n      CreateUsersWithListInputErrors,\n      ThrowOnError\n    >({\n      url: '/user/createWithList',\n      ...options,\n      headers: {\n        'Content-Type': 'application/json',\n        ...options?.headers,\n      },\n    });\n  }\n\n  /**\n   * Logs user into the system.\n   *\n   * Log into the system.\n   */\n  public loginUser<ThrowOnError extends boolean = false>(\n    options?: Options<LoginUserData, ThrowOnError>,\n  ) {\n    return (options?.client ?? this.client).get<LoginUserResponses, LoginUserErrors, ThrowOnError>({\n      url: '/user/login',\n      ...options,\n    });\n  }\n\n  /**\n   * Logs out current logged in user session.\n   *\n   * Log user out of the system.\n   */\n  public logoutUser<ThrowOnError extends boolean = false>(\n    options?: Options<LogoutUserData, ThrowOnError>,\n  ) {\n    return (options?.client ?? this.client).get<\n      LogoutUserResponses,\n      LogoutUserErrors,\n      ThrowOnError\n    >({ url: '/user/logout', ...options });\n  }\n\n  /**\n   * Delete user resource.\n   *\n   * This can only be done by the logged in user.\n   */\n  public deleteUser<ThrowOnError extends boolean = false>(\n    options: Options<DeleteUserData, ThrowOnError>,\n  ) {\n    return (options.client ?? this.client).delete<\n      DeleteUserResponses,\n      DeleteUserErrors,\n      ThrowOnError\n    >({ url: '/user/{username}', ...options });\n  }\n\n  /**\n   * Get user by user name.\n   *\n   * Get user detail based on username.\n   */\n  public getUserByName<ThrowOnError extends boolean = false>(\n    options: Options<GetUserByNameData, ThrowOnError>,\n  ) {\n    return (options.client ?? this.client).get<\n      GetUserByNameResponses,\n      GetUserByNameErrors,\n      ThrowOnError\n    >({ url: '/user/{username}', ...options });\n  }\n\n  /**\n   * Update user resource.\n   *\n   * This can only be done by the logged in user.\n   */\n  public updateUser<ThrowOnError extends boolean = false>(\n    options: Options<UpdateUserData, ThrowOnError>,\n  ) {\n    return (options.client ?? this.client).put<UpdateUserResponses, UpdateUserErrors, ThrowOnError>(\n      {\n        url: '/user/{username}',\n        ...options,\n        headers: {\n          'Content-Type': 'application/json',\n          ...options.headers,\n        },\n      },\n    );\n  }\n}\n"
  },
  {
    "path": "examples/openapi-ts-tanstack-react-query/src/client/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type ClientOptions = {\n  baseUrl: 'https://petstore3.swagger.io/api/v3' | (string & {});\n};\n\nexport type Order = {\n  complete?: boolean;\n  id?: number;\n  petId?: number;\n  quantity?: number;\n  shipDate?: string;\n  /**\n   * Order Status\n   */\n  status?: 'placed' | 'approved' | 'delivered';\n};\n\nexport type Category = {\n  id?: number;\n  name?: string;\n};\n\nexport type User = {\n  email?: string;\n  firstName?: string;\n  id?: number;\n  lastName?: string;\n  password?: string;\n  phone?: string;\n  /**\n   * User Status\n   */\n  userStatus?: number;\n  username?: string;\n};\n\nexport type Tag = {\n  id?: number;\n  name?: string;\n};\n\nexport type Pet = {\n  category?: Category;\n  id?: number;\n  name: string;\n  photoUrls: Array<string>;\n  /**\n   * pet status in the store\n   */\n  status?: 'available' | 'pending' | 'sold';\n  tags?: Array<Tag>;\n};\n\nexport type ApiResponse = {\n  code?: number;\n  message?: string;\n  type?: string;\n};\n\nexport type Pet2 = Pet;\n\n/**\n * List of user object\n */\nexport type UserArray = Array<User>;\n\nexport type AddPetData = {\n  /**\n   * Create a new pet in the store\n   */\n  body: Pet;\n  path?: never;\n  query?: never;\n  url: '/pet';\n};\n\nexport type AddPetErrors = {\n  /**\n   * Invalid input\n   */\n  400: unknown;\n  /**\n   * Validation exception\n   */\n  422: unknown;\n  /**\n   * Unexpected error\n   */\n  default: unknown;\n};\n\nexport type AddPetResponses = {\n  /**\n   * Successful operation\n   */\n  200: Pet;\n};\n\nexport type AddPetResponse = AddPetResponses[keyof AddPetResponses];\n\nexport type UpdatePetData = {\n  /**\n   * Update an existent pet in the store\n   */\n  body: Pet;\n  path?: never;\n  query?: never;\n  url: '/pet';\n};\n\nexport type UpdatePetErrors = {\n  /**\n   * Invalid ID supplied\n   */\n  400: unknown;\n  /**\n   * Pet not found\n   */\n  404: unknown;\n  /**\n   * Validation exception\n   */\n  422: unknown;\n  /**\n   * Unexpected error\n   */\n  default: unknown;\n};\n\nexport type UpdatePetResponses = {\n  /**\n   * Successful operation\n   */\n  200: Pet;\n};\n\nexport type UpdatePetResponse = UpdatePetResponses[keyof UpdatePetResponses];\n\nexport type FindPetsByStatusData = {\n  body?: never;\n  path?: never;\n  query: {\n    /**\n     * Status values that need to be considered for filter\n     */\n    status: 'available' | 'pending' | 'sold';\n  };\n  url: '/pet/findByStatus';\n};\n\nexport type FindPetsByStatusErrors = {\n  /**\n   * Invalid status value\n   */\n  400: unknown;\n  /**\n   * Unexpected error\n   */\n  default: unknown;\n};\n\nexport type FindPetsByStatusResponses = {\n  /**\n   * successful operation\n   */\n  200: Array<Pet>;\n};\n\nexport type FindPetsByStatusResponse = FindPetsByStatusResponses[keyof FindPetsByStatusResponses];\n\nexport type FindPetsByTagsData = {\n  body?: never;\n  path?: never;\n  query: {\n    /**\n     * Tags to filter by\n     */\n    tags: Array<string>;\n  };\n  url: '/pet/findByTags';\n};\n\nexport type FindPetsByTagsErrors = {\n  /**\n   * Invalid tag value\n   */\n  400: unknown;\n  /**\n   * Unexpected error\n   */\n  default: unknown;\n};\n\nexport type FindPetsByTagsResponses = {\n  /**\n   * successful operation\n   */\n  200: Array<Pet>;\n};\n\nexport type FindPetsByTagsResponse = FindPetsByTagsResponses[keyof FindPetsByTagsResponses];\n\nexport type DeletePetData = {\n  body?: never;\n  headers?: {\n    api_key?: string;\n  };\n  path: {\n    /**\n     * Pet id to delete\n     */\n    petId: number;\n  };\n  query?: never;\n  url: '/pet/{petId}';\n};\n\nexport type DeletePetErrors = {\n  /**\n   * Invalid pet value\n   */\n  400: unknown;\n  /**\n   * Unexpected error\n   */\n  default: unknown;\n};\n\nexport type DeletePetResponses = {\n  /**\n   * Pet deleted\n   */\n  200: unknown;\n};\n\nexport type GetPetByIdData = {\n  body?: never;\n  path: {\n    /**\n     * ID of pet to return\n     */\n    petId: number;\n  };\n  query?: never;\n  url: '/pet/{petId}';\n};\n\nexport type GetPetByIdErrors = {\n  /**\n   * Invalid ID supplied\n   */\n  400: unknown;\n  /**\n   * Pet not found\n   */\n  404: unknown;\n  /**\n   * Unexpected error\n   */\n  default: unknown;\n};\n\nexport type GetPetByIdResponses = {\n  /**\n   * successful operation\n   */\n  200: Pet;\n};\n\nexport type GetPetByIdResponse = GetPetByIdResponses[keyof GetPetByIdResponses];\n\nexport type UpdatePetWithFormData = {\n  body?: never;\n  path: {\n    /**\n     * ID of pet that needs to be updated\n     */\n    petId: number;\n  };\n  query?: {\n    /**\n     * Name of pet that needs to be updated\n     */\n    name?: string;\n    /**\n     * Status of pet that needs to be updated\n     */\n    status?: string;\n  };\n  url: '/pet/{petId}';\n};\n\nexport type UpdatePetWithFormErrors = {\n  /**\n   * Invalid input\n   */\n  400: unknown;\n  /**\n   * Unexpected error\n   */\n  default: unknown;\n};\n\nexport type UpdatePetWithFormResponses = {\n  /**\n   * successful operation\n   */\n  200: Pet;\n};\n\nexport type UpdatePetWithFormResponse =\n  UpdatePetWithFormResponses[keyof UpdatePetWithFormResponses];\n\nexport type UploadFileData = {\n  body?: Blob | File;\n  path: {\n    /**\n     * ID of pet to update\n     */\n    petId: number;\n  };\n  query?: {\n    /**\n     * Additional Metadata\n     */\n    additionalMetadata?: string;\n  };\n  url: '/pet/{petId}/uploadImage';\n};\n\nexport type UploadFileErrors = {\n  /**\n   * No file uploaded\n   */\n  400: unknown;\n  /**\n   * Pet not found\n   */\n  404: unknown;\n  /**\n   * Unexpected error\n   */\n  default: unknown;\n};\n\nexport type UploadFileResponses = {\n  /**\n   * successful operation\n   */\n  200: ApiResponse;\n};\n\nexport type UploadFileResponse = UploadFileResponses[keyof UploadFileResponses];\n\nexport type GetInventoryData = {\n  body?: never;\n  path?: never;\n  query?: never;\n  url: '/store/inventory';\n};\n\nexport type GetInventoryErrors = {\n  /**\n   * Unexpected error\n   */\n  default: unknown;\n};\n\nexport type GetInventoryResponses = {\n  /**\n   * successful operation\n   */\n  200: {\n    [key: string]: number;\n  };\n};\n\nexport type GetInventoryResponse = GetInventoryResponses[keyof GetInventoryResponses];\n\nexport type PlaceOrderData = {\n  body?: Order;\n  path?: never;\n  query?: never;\n  url: '/store/order';\n};\n\nexport type PlaceOrderErrors = {\n  /**\n   * Invalid input\n   */\n  400: unknown;\n  /**\n   * Validation exception\n   */\n  422: unknown;\n  /**\n   * Unexpected error\n   */\n  default: unknown;\n};\n\nexport type PlaceOrderResponses = {\n  /**\n   * successful operation\n   */\n  200: Order;\n};\n\nexport type PlaceOrderResponse = PlaceOrderResponses[keyof PlaceOrderResponses];\n\nexport type DeleteOrderData = {\n  body?: never;\n  path: {\n    /**\n     * ID of the order that needs to be deleted\n     */\n    orderId: number;\n  };\n  query?: never;\n  url: '/store/order/{orderId}';\n};\n\nexport type DeleteOrderErrors = {\n  /**\n   * Invalid ID supplied\n   */\n  400: unknown;\n  /**\n   * Order not found\n   */\n  404: unknown;\n  /**\n   * Unexpected error\n   */\n  default: unknown;\n};\n\nexport type DeleteOrderResponses = {\n  /**\n   * order deleted\n   */\n  200: unknown;\n};\n\nexport type GetOrderByIdData = {\n  body?: never;\n  path: {\n    /**\n     * ID of order that needs to be fetched\n     */\n    orderId: number;\n  };\n  query?: never;\n  url: '/store/order/{orderId}';\n};\n\nexport type GetOrderByIdErrors = {\n  /**\n   * Invalid ID supplied\n   */\n  400: unknown;\n  /**\n   * Order not found\n   */\n  404: unknown;\n  /**\n   * Unexpected error\n   */\n  default: unknown;\n};\n\nexport type GetOrderByIdResponses = {\n  /**\n   * successful operation\n   */\n  200: Order;\n};\n\nexport type GetOrderByIdResponse = GetOrderByIdResponses[keyof GetOrderByIdResponses];\n\nexport type CreateUserData = {\n  /**\n   * Created user object\n   */\n  body?: User;\n  path?: never;\n  query?: never;\n  url: '/user';\n};\n\nexport type CreateUserErrors = {\n  /**\n   * Unexpected error\n   */\n  default: unknown;\n};\n\nexport type CreateUserResponses = {\n  /**\n   * successful operation\n   */\n  200: User;\n};\n\nexport type CreateUserResponse = CreateUserResponses[keyof CreateUserResponses];\n\nexport type CreateUsersWithListInputData = {\n  body?: Array<User>;\n  path?: never;\n  query?: never;\n  url: '/user/createWithList';\n};\n\nexport type CreateUsersWithListInputErrors = {\n  /**\n   * Unexpected error\n   */\n  default: unknown;\n};\n\nexport type CreateUsersWithListInputResponses = {\n  /**\n   * Successful operation\n   */\n  200: User;\n};\n\nexport type CreateUsersWithListInputResponse =\n  CreateUsersWithListInputResponses[keyof CreateUsersWithListInputResponses];\n\nexport type LoginUserData = {\n  body?: never;\n  path?: never;\n  query?: {\n    /**\n     * The password for login in clear text\n     */\n    password?: string;\n    /**\n     * The user name for login\n     */\n    username?: string;\n  };\n  url: '/user/login';\n};\n\nexport type LoginUserErrors = {\n  /**\n   * Invalid username/password supplied\n   */\n  400: unknown;\n  /**\n   * Unexpected error\n   */\n  default: unknown;\n};\n\nexport type LoginUserResponses = {\n  /**\n   * successful operation\n   */\n  200: string;\n};\n\nexport type LoginUserResponse = LoginUserResponses[keyof LoginUserResponses];\n\nexport type LogoutUserData = {\n  body?: never;\n  path?: never;\n  query?: never;\n  url: '/user/logout';\n};\n\nexport type LogoutUserErrors = {\n  /**\n   * Unexpected error\n   */\n  default: unknown;\n};\n\nexport type LogoutUserResponses = {\n  /**\n   * successful operation\n   */\n  200: unknown;\n};\n\nexport type DeleteUserData = {\n  body?: never;\n  path: {\n    /**\n     * The name that needs to be deleted\n     */\n    username: string;\n  };\n  query?: never;\n  url: '/user/{username}';\n};\n\nexport type DeleteUserErrors = {\n  /**\n   * Invalid username supplied\n   */\n  400: unknown;\n  /**\n   * User not found\n   */\n  404: unknown;\n  /**\n   * Unexpected error\n   */\n  default: unknown;\n};\n\nexport type DeleteUserResponses = {\n  /**\n   * User deleted\n   */\n  200: unknown;\n};\n\nexport type GetUserByNameData = {\n  body?: never;\n  path: {\n    /**\n     * The name that needs to be fetched. Use user1 for testing\n     */\n    username: string;\n  };\n  query?: never;\n  url: '/user/{username}';\n};\n\nexport type GetUserByNameErrors = {\n  /**\n   * Invalid username supplied\n   */\n  400: unknown;\n  /**\n   * User not found\n   */\n  404: unknown;\n  /**\n   * Unexpected error\n   */\n  default: unknown;\n};\n\nexport type GetUserByNameResponses = {\n  /**\n   * successful operation\n   */\n  200: User;\n};\n\nexport type GetUserByNameResponse = GetUserByNameResponses[keyof GetUserByNameResponses];\n\nexport type UpdateUserData = {\n  /**\n   * Update an existent user in the store\n   */\n  body?: User;\n  path: {\n    /**\n     * name that need to be deleted\n     */\n    username: string;\n  };\n  query?: never;\n  url: '/user/{username}';\n};\n\nexport type UpdateUserErrors = {\n  /**\n   * bad request\n   */\n  400: unknown;\n  /**\n   * user not found\n   */\n  404: unknown;\n  /**\n   * Unexpected error\n   */\n  default: unknown;\n};\n\nexport type UpdateUserResponses = {\n  /**\n   * successful operation\n   */\n  200: unknown;\n};\n"
  },
  {
    "path": "examples/openapi-ts-tanstack-react-query/src/main.tsx",
    "content": "import '@radix-ui/themes/styles.css';\n\nimport { Theme } from '@radix-ui/themes';\nimport { QueryClient, QueryClientProvider } from '@tanstack/react-query';\nimport { ReactQueryDevtools } from '@tanstack/react-query-devtools';\nimport React from 'react';\nimport ReactDOM from 'react-dom/client';\n\nimport App from './App.tsx';\nimport { client } from './client/client.gen';\nimport { Sdk } from './client/sdk.gen.ts';\n\nconst queryClient = new QueryClient({\n  defaultOptions: {\n    queries: {\n      staleTime: 60000,\n    },\n  },\n});\n\n// configure internal service client\nclient.setConfig({\n  // set default base url for requests\n  baseUrl: 'https://petstore3.swagger.io/api/v3',\n  // set default headers for requests\n  headers: {\n    Authorization: 'Bearer <token_from_service_client>',\n  },\n});\nnew Sdk();\n\nReactDOM.createRoot(document.getElementById('root')!).render(\n  <React.StrictMode>\n    <QueryClientProvider client={queryClient}>\n      <Theme appearance=\"dark\">\n        <App />\n      </Theme>\n      <ReactQueryDevtools initialIsOpen={false} />\n    </QueryClientProvider>\n  </React.StrictMode>,\n);\n"
  },
  {
    "path": "examples/openapi-ts-tanstack-react-query/src/vite-env.d.ts",
    "content": "/// <reference types=\"vite/client\" />\n"
  },
  {
    "path": "examples/openapi-ts-tanstack-react-query/tailwind.config.js",
    "content": "/** @type {import('tailwindcss').Config} */\nexport default {\n  content: ['./index.html', './src/**/*.{html,js,ts,jsx,tsx}'],\n  theme: {\n    extend: {},\n  },\n};\n"
  },
  {
    "path": "examples/openapi-ts-tanstack-react-query/tsconfig.json",
    "content": "{\n  \"compilerOptions\": {\n    \"target\": \"ES2020\",\n    \"useDefineForClassFields\": true,\n    \"lib\": [\"ES2020\", \"DOM\", \"DOM.Iterable\"],\n    \"module\": \"ESNext\",\n    \"skipLibCheck\": true,\n\n    /* Bundler mode */\n    \"moduleResolution\": \"bundler\",\n    \"allowImportingTsExtensions\": true,\n    \"resolveJsonModule\": true,\n    \"isolatedModules\": true,\n    \"noEmit\": true,\n    \"jsx\": \"react-jsx\",\n\n    /* Linting */\n    \"strict\": true,\n    \"noUnusedLocals\": true,\n    \"noUnusedParameters\": false,\n    \"noFallthroughCasesInSwitch\": true\n  },\n  \"include\": [\"src\"],\n  \"references\": [{ \"path\": \"./tsconfig.node.json\" }]\n}\n"
  },
  {
    "path": "examples/openapi-ts-tanstack-react-query/tsconfig.node.json",
    "content": "{\n  \"compilerOptions\": {\n    \"composite\": true,\n    \"skipLibCheck\": true,\n    \"module\": \"ESNext\",\n    \"moduleResolution\": \"bundler\",\n    \"allowSyntheticDefaultImports\": true,\n    \"strict\": true\n  },\n  \"include\": [\"vite.config.ts\"]\n}\n"
  },
  {
    "path": "examples/openapi-ts-tanstack-react-query/vite.config.ts",
    "content": "import react from '@vitejs/plugin-react';\n\n/** @type {import('vite').UserConfig} */\nexport default {\n  build: {\n    sourcemap: true,\n    target: 'esnext',\n  },\n  esbuild: {\n    target: 'esnext',\n  },\n  optimizeDeps: {\n    esbuildOptions: {\n      target: 'esnext',\n    },\n  },\n  plugins: [react()],\n};\n"
  },
  {
    "path": "examples/openapi-ts-tanstack-svelte-query/.gitignore",
    "content": "# Logs\nlogs\n*.log\nnpm-debug.log*\nyarn-debug.log*\nyarn-error.log*\npnpm-debug.log*\nlerna-debug.log*\n\nnode_modules\ndist\ndist-ssr\n*.local\n\n# Editor directories and files\n.vscode/*\n!.vscode/extensions.json\n.idea\n*.suo\n*.ntvs*\n*.njsproj\n*.sln\n*.sw?\n\nnode_modules\n\n# Output\n.output\n.vercel\n.svelte-kit\n/build\n\n# OS\n.DS_Store\nThumbs.db\n\n# Env\n.env\n.env.*\n!.env.example\n!.env.test\n\n# Vite\nvite.config.js.timestamp-*\nvite.config.ts.timestamp-*\n"
  },
  {
    "path": "examples/openapi-ts-tanstack-svelte-query/CHANGELOG.md",
    "content": "# @example/openapi-ts-tanstack-svelte-query\n\n## 0.0.39\n\n### Patch Changes\n\n- Updated dependencies [[`f23f3ae`](https://github.com/hey-api/openapi-ts/commit/f23f3ae874385e758eb8d43bb4e274c9858a4e40)]:\n  - @hey-api/client-fetch@0.13.1\n\n## 0.0.38\n\n### Patch Changes\n\n- Updated dependencies [[`10d2e03`](https://github.com/hey-api/openapi-ts/commit/10d2e03b8295e4e887fab8d023aa823699efbae8)]:\n  - @hey-api/client-fetch@0.13.0\n\n## 0.0.37\n\n### Patch Changes\n\n- Updated dependencies [[`4d8c030`](https://github.com/hey-api/openapi-ts/commit/4d8c03038979c9a75315cc158789b3c198c62f90)]:\n  - @hey-api/client-fetch@0.12.0\n\n## 0.0.36\n\n### Patch Changes\n\n- Updated dependencies [[`8152aaf`](https://github.com/hey-api/openapi-ts/commit/8152aaf4892c48b79fd3dc486eb3c0ea333dc3e6)]:\n  - @hey-api/client-fetch@0.11.0\n\n## 0.0.35\n\n### Patch Changes\n\n- Updated dependencies [[`1f99066`](https://github.com/hey-api/openapi-ts/commit/1f99066efbb2d0e6b9e3710c701293c2cc09d65e)]:\n  - @hey-api/client-fetch@0.10.2\n\n## 0.0.34\n\n### Patch Changes\n\n- Updated dependencies [[`565e0b8`](https://github.com/hey-api/openapi-ts/commit/565e0b89fbab4556ecdc63dfe08250942681140e)]:\n  - @hey-api/client-fetch@0.10.1\n\n## 0.0.33\n\n### Patch Changes\n\n- Updated dependencies [[`fed9699`](https://github.com/hey-api/openapi-ts/commit/fed969985275621c7c2b65ffc760c7c66fafaf72)]:\n  - @hey-api/client-fetch@0.10.0\n\n## 0.0.32\n\n### Patch Changes\n\n- Updated dependencies [[`67c385b`](https://github.com/hey-api/openapi-ts/commit/67c385bf6289a79726b0cdd85fd81ca501cf2248)]:\n  - @hey-api/client-fetch@0.9.0\n\n## 0.0.31\n\n### Patch Changes\n\n- Updated dependencies [[`fe43b88`](https://github.com/hey-api/openapi-ts/commit/fe43b889c20a2001f56e259f93f64851a1caa1d1)]:\n  - @hey-api/client-fetch@0.8.4\n\n## 0.0.30\n\n### Patch Changes\n\n- Updated dependencies [[`c0b36b9`](https://github.com/hey-api/openapi-ts/commit/c0b36b95645d484034c3af145c5554867568979b)]:\n  - @hey-api/client-fetch@0.8.3\n\n## 0.0.29\n\n### Patch Changes\n\n- Updated dependencies [[`b8cc9f8`](https://github.com/hey-api/openapi-ts/commit/b8cc9f8a5eaf4f4ff345abc49c14c6b96744c2ea)]:\n  - @hey-api/client-fetch@0.8.2\n\n## 0.0.28\n\n### Patch Changes\n\n- Updated dependencies [[`7f0f4a7`](https://github.com/hey-api/openapi-ts/commit/7f0f4a76b06c8fafb33581b522faf8efc6fd85ac)]:\n  - @hey-api/client-fetch@0.8.1\n\n## 0.0.27\n\n### Patch Changes\n\n- Updated dependencies [[`bb6d46a`](https://github.com/hey-api/openapi-ts/commit/bb6d46ae119ce4e7e3a2ab3fded74ac4fb4cdff2)]:\n  - @hey-api/client-fetch@0.8.0\n\n## 0.0.26\n\n### Patch Changes\n\n- Updated dependencies [[`2dc380e`](https://github.com/hey-api/openapi-ts/commit/2dc380eabc17c723654beb04ecd7bce6d33d3b49), [`603541e`](https://github.com/hey-api/openapi-ts/commit/603541e307dc2953da7dddd300176865629b50bb), [`2cbffeb`](https://github.com/hey-api/openapi-ts/commit/2cbffeb2cdd6c6143cd68cac68369584879dda31), [`2cbffeb`](https://github.com/hey-api/openapi-ts/commit/2cbffeb2cdd6c6143cd68cac68369584879dda31)]:\n  - @hey-api/client-fetch@0.7.3\n\n## 0.0.25\n\n### Patch Changes\n\n- Updated dependencies [[`8eba19d`](https://github.com/hey-api/openapi-ts/commit/8eba19d4092fc0903572ab9fdadf0b4c26928ba2)]:\n  - @hey-api/client-fetch@0.7.2\n\n## 0.0.24\n\n### Patch Changes\n\n- Updated dependencies [[`0432418`](https://github.com/hey-api/openapi-ts/commit/0432418d72c94ef94865f8216ed2f723ad5191f9), [`4784727`](https://github.com/hey-api/openapi-ts/commit/47847276e8bc854045044dd414382080270dd779)]:\n  - @hey-api/client-fetch@0.7.1\n\n## 0.0.23\n\n### Patch Changes\n\n- Updated dependencies [[`465410c`](https://github.com/hey-api/openapi-ts/commit/465410c201eb19e737e3143ad53a146e95f80107)]:\n  - @hey-api/client-fetch@0.7.0\n\n## 0.0.22\n\n### Patch Changes\n\n- Updated dependencies [[`e2e1410`](https://github.com/hey-api/openapi-ts/commit/e2e1410b22c0c84c40d1b1803e9650d546350cb7)]:\n  - @hey-api/client-fetch@0.6.0\n\n## 0.0.21\n\n### Patch Changes\n\n- Updated dependencies [[`20d7497`](https://github.com/hey-api/openapi-ts/commit/20d7497acb6c046f6a4206c2d8137414e17b2263), [`f86d293`](https://github.com/hey-api/openapi-ts/commit/f86d293f18f133ef6dd2f4864d037611b81edd26)]:\n  - @hey-api/client-fetch@0.5.7\n\n## 0.0.20\n\n### Patch Changes\n\n- Updated dependencies [[`ba56424`](https://github.com/hey-api/openapi-ts/commit/ba5642486cdd5461c2372c34b63019c02bc6874e)]:\n  - @hey-api/client-fetch@0.5.6\n\n## 0.0.19\n\n### Patch Changes\n\n- Updated dependencies [[`9cec9e8`](https://github.com/hey-api/openapi-ts/commit/9cec9e8582c12a8c041b922d9587e16f6f19782a)]:\n  - @hey-api/client-fetch@0.5.5\n\n## 0.0.18\n\n### Patch Changes\n\n- Updated dependencies [[`cbf4e84`](https://github.com/hey-api/openapi-ts/commit/cbf4e84db7f3a47f19d8c3eaa87c71b27912c1a2)]:\n  - @hey-api/client-fetch@0.5.4\n\n## 0.0.17\n\n### Patch Changes\n\n- Updated dependencies [[`646064d`](https://github.com/hey-api/openapi-ts/commit/646064d1aecea988d2b4df73bd24b2ee83394ae0)]:\n  - @hey-api/client-fetch@0.5.3\n\n## 0.0.16\n\n### Patch Changes\n\n- Updated dependencies [[`ec48d32`](https://github.com/hey-api/openapi-ts/commit/ec48d323d80de8e6a47ce7ecd732288f0a47e17a)]:\n  - @hey-api/client-fetch@0.5.2\n\n## 0.0.15\n\n### Patch Changes\n\n- Updated dependencies [[`fa8b0f1`](https://github.com/hey-api/openapi-ts/commit/fa8b0f11ed99c63f694a494944ccc2fbfa9706cc)]:\n  - @hey-api/client-fetch@0.5.1\n\n## 0.0.14\n\n### Patch Changes\n\n- Updated dependencies [[`734a62d`](https://github.com/hey-api/openapi-ts/commit/734a62dd8d594b8266964fe16766a481d37eb7df), [`734a62d`](https://github.com/hey-api/openapi-ts/commit/734a62dd8d594b8266964fe16766a481d37eb7df)]:\n  - @hey-api/client-fetch@0.5.0\n\n## 0.0.13\n\n### Patch Changes\n\n- Updated dependencies [[`4c853d0`](https://github.com/hey-api/openapi-ts/commit/4c853d090b79245854d13831f64731db4a92978b)]:\n  - @hey-api/client-fetch@0.4.4\n\n## 0.0.12\n\n### Patch Changes\n\n- Updated dependencies [[`01dee3d`](https://github.com/hey-api/openapi-ts/commit/01dee3df879232939e43355231147b3d910fb482)]:\n  - @hey-api/client-fetch@0.4.3\n\n## 0.0.11\n\n### Patch Changes\n\n- Updated dependencies [[`587791d`](https://github.com/hey-api/openapi-ts/commit/587791dfede0167fbed229281467e4c4875936f5)]:\n  - @hey-api/client-fetch@0.4.2\n\n## 0.0.10\n\n### Patch Changes\n\n- Updated dependencies [[`a0a5551`](https://github.com/hey-api/openapi-ts/commit/a0a55510d30a1a8dea0ade4908b5b13d51b5f9e6)]:\n  - @hey-api/client-fetch@0.4.1\n\n## 0.0.9\n\n### Patch Changes\n\n- Updated dependencies [[`df5c690`](https://github.com/hey-api/openapi-ts/commit/df5c69048a03a1c7729a5200c586164287a8a6fa), [`df5c690`](https://github.com/hey-api/openapi-ts/commit/df5c69048a03a1c7729a5200c586164287a8a6fa)]:\n  - @hey-api/client-fetch@0.4.0\n\n## 0.0.8\n\n### Patch Changes\n\n- Updated dependencies [[`7f986c2`](https://github.com/hey-api/openapi-ts/commit/7f986c2c7726ed8fbf16f8b235b7769c7d990502)]:\n  - @hey-api/client-fetch@0.3.4\n\n## 0.0.7\n\n### Patch Changes\n\n- Updated dependencies [[`fe743c2`](https://github.com/hey-api/openapi-ts/commit/fe743c2d41c23bf7e1706bceedd6319299131197)]:\n  - @hey-api/client-fetch@0.3.3\n\n## 0.0.6\n\n### Patch Changes\n\n- Updated dependencies [[`11a276a`](https://github.com/hey-api/openapi-ts/commit/11a276a1e35dde0735363e892d8142016fd87eec)]:\n  - @hey-api/client-fetch@0.3.2\n\n## 0.0.5\n\n### Patch Changes\n\n- Updated dependencies [[`7ae2b1d`](https://github.com/hey-api/openapi-ts/commit/7ae2b1db047f3b6efe917a8b43ac7c851fb86c8f), [`2079c6e`](https://github.com/hey-api/openapi-ts/commit/2079c6e83a6b71e157c8e7ea56260b4e9ff8411d)]:\n  - @hey-api/client-fetch@0.3.1\n\n## 0.0.4\n\n### Patch Changes\n\n- Updated dependencies [[`7ebc1d4`](https://github.com/hey-api/openapi-ts/commit/7ebc1d44af74db2522219d71d240325f6bc5689d)]:\n  - @hey-api/client-fetch@0.3.0\n\n## 0.0.3\n\n### Patch Changes\n\n- [#1010](https://github.com/hey-api/openapi-ts/pull/1010) [`b6e58c6`](https://github.com/hey-api/openapi-ts/commit/b6e58c64d1b71897533a85d1738cd7ce7ede178d) Thanks [@mrlubos](https://github.com/mrlubos)! - fix: set query key base url from supplied client if provided\n\n## 0.0.2\n\n### Patch Changes\n\n- [#978](https://github.com/hey-api/openapi-ts/pull/978) [`2e051a5`](https://github.com/hey-api/openapi-ts/commit/2e051a596302c2e103dca25951a07b4aae1e9e23) Thanks [@mrlubos](https://github.com/mrlubos)! - docs: add basic TanStack Query plugin description\n"
  },
  {
    "path": "examples/openapi-ts-tanstack-svelte-query/README.md",
    "content": "# create-svelte\n\nEverything you need to build a Svelte project, powered by [`create-svelte`](https://github.com/sveltejs/kit/tree/main/packages/create-svelte).\n\n## Creating a project\n\nIf you're seeing this, you've probably already done this step. Congrats!\n\n```bash\n# create a new project in the current directory\nnpm create svelte@latest\n\n# create a new project in my-app\nnpm create svelte@latest my-app\n```\n\n## Developing\n\nOnce you've created a project and installed dependencies with `npm install` (or `pnpm install` or `yarn`), start a development server:\n\n```bash\nnpm run dev\n\n# or start the server and open the app in a new browser tab\nnpm run dev -- --open\n```\n\n## Building\n\nTo create a production version of your app:\n\n```bash\nnpm run build\n```\n\nYou can preview the production build with `npm run preview`.\n\n> To deploy your app, you may need to install an [adapter](https://kit.svelte.dev/docs/adapters) for your target environment.\n"
  },
  {
    "path": "examples/openapi-ts-tanstack-svelte-query/openapi-ts.config.ts",
    "content": "import { defineConfig } from '@hey-api/openapi-ts';\n\nexport default defineConfig({\n  input:\n    'https://raw.githubusercontent.com/swagger-api/swagger-petstore/master/src/main/resources/openapi.yaml',\n  logs: {\n    path: './logs',\n  },\n  output: {\n    path: './src/client',\n    postProcess: ['oxfmt', 'eslint'],\n  },\n  plugins: [\n    '@hey-api/client-fetch',\n    '@hey-api/schemas',\n    '@hey-api/sdk',\n    {\n      enums: 'javascript',\n      name: '@hey-api/typescript',\n    },\n    '@tanstack/svelte-query',\n  ],\n});\n"
  },
  {
    "path": "examples/openapi-ts-tanstack-svelte-query/package.json",
    "content": "{\n  \"name\": \"@example/openapi-ts-tanstack-svelte-query\",\n  \"version\": \"0.0.39\",\n  \"private\": true,\n  \"type\": \"module\",\n  \"scripts\": {\n    \"build\": \"vite build\",\n    \"check:watch\": \"svelte-kit sync && svelte-check --tsconfig ./tsconfig.json --watch\",\n    \"check\": \"svelte-kit sync && svelte-check --tsconfig ./tsconfig.json\",\n    \"dev\": \"vite dev\",\n    \"format\": \"oxfmt .\",\n    \"lint\": \"oxfmt --check . && eslint .\",\n    \"openapi-ts\": \"openapi-ts\",\n    \"prepare\": \"svelte-kit sync\",\n    \"preview\": \"vite preview\",\n    \"test\": \"vitest --watch=false\"\n  },\n  \"dependencies\": {\n    \"@tanstack/svelte-query\": \"5.73.3\"\n  },\n  \"devDependencies\": {\n    \"@fontsource/fira-mono\": \"5.0.0\",\n    \"@hey-api/openapi-ts\": \"workspace:*\",\n    \"@neoconfetti/svelte\": \"2.0.0\",\n    \"@sveltejs/adapter-auto\": \"4.0.0\",\n    \"@sveltejs/kit\": \"2.17.1\",\n    \"@sveltejs/vite-plugin-svelte\": \"5.0.3\",\n    \"@types/eslint\": \"9.6.0\",\n    \"eslint\": \"9.17.0\",\n    \"eslint-plugin-svelte\": \"2.36.0\",\n    \"globals\": \"15.14.0\",\n    \"oxfmt\": \"0.27.0\",\n    \"svelte\": \"5.19.9\",\n    \"svelte-check\": \"4.1.4\",\n    \"typescript\": \"5.9.3\",\n    \"typescript-eslint\": \"8.29.1\",\n    \"vite\": \"7.3.1\",\n    \"vitest\": \"4.0.18\"\n  }\n}\n"
  },
  {
    "path": "examples/openapi-ts-tanstack-svelte-query/src/app.css",
    "content": "@import '@fontsource/fira-mono';\n\n:root {\n  --font-body:\n    Arial, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell,\n    'Open Sans', 'Helvetica Neue', sans-serif;\n  --font-mono: 'Fira Mono', monospace;\n  --color-bg-0: rgb(202, 216, 228);\n  --color-bg-1: hsl(209, 36%, 86%);\n  --color-bg-2: hsl(224, 44%, 95%);\n  --color-theme-1: #ff3e00;\n  --color-theme-2: #4075a6;\n  --color-text: rgba(0, 0, 0, 0.7);\n  --column-width: 42rem;\n  --column-margin-top: 4rem;\n  font-family: var(--font-body);\n  color: var(--color-text);\n}\n\nbody {\n  min-height: 100vh;\n  margin: 0;\n  background-attachment: fixed;\n  background-color: var(--color-bg-1);\n  background-size: 100vw 100vh;\n  background-image:\n    radial-gradient(50% 50% at 50% 50%, rgba(255, 255, 255, 0.75) 0%, rgba(255, 255, 255, 0) 100%),\n    linear-gradient(180deg, var(--color-bg-0) 0%, var(--color-bg-1) 15%, var(--color-bg-2) 50%);\n}\n\nh1,\nh2,\np {\n  font-weight: 400;\n}\n\np {\n  line-height: 1.5;\n}\n\na {\n  color: var(--color-theme-1);\n  text-decoration: none;\n}\n\na:hover {\n  text-decoration: underline;\n}\n\nh1 {\n  font-size: 2rem;\n  text-align: center;\n}\n\nh2 {\n  font-size: 1rem;\n}\n\npre {\n  font-size: 16px;\n  font-family: var(--font-mono);\n  background-color: rgba(255, 255, 255, 0.45);\n  border-radius: 3px;\n  box-shadow: 2px 2px 6px rgb(255 255 255 / 25%);\n  padding: 0.5em;\n  overflow-x: auto;\n  color: var(--color-text);\n}\n\n.text-column {\n  display: flex;\n  max-width: 48rem;\n  flex: 0.6;\n  flex-direction: column;\n  justify-content: center;\n  margin: 0 auto;\n}\n\ninput,\nbutton {\n  font-size: inherit;\n  font-family: inherit;\n}\n\nbutton:focus:not(:focus-visible) {\n  outline: none;\n}\n\n@media (min-width: 720px) {\n  h1 {\n    font-size: 2.4rem;\n  }\n}\n\n.visually-hidden {\n  border: 0;\n  clip: rect(0 0 0 0);\n  height: auto;\n  margin: 0;\n  overflow: hidden;\n  padding: 0;\n  position: absolute;\n  width: 1px;\n  white-space: nowrap;\n}\n"
  },
  {
    "path": "examples/openapi-ts-tanstack-svelte-query/src/app.d.ts",
    "content": "// See https://kit.svelte.dev/docs/types#app\n// for information about these interfaces\ndeclare global {\n  namespace App {\n    // interface Error {}\n    // interface Locals {}\n    // interface PageData {}\n    // interface PageState {}\n    // interface Platform {}\n  }\n}\n\nexport {};\n"
  },
  {
    "path": "examples/openapi-ts-tanstack-svelte-query/src/app.html",
    "content": "<!doctype html>\n<html lang=\"en\">\n  <head>\n    <meta charset=\"utf-8\" />\n    <link rel=\"icon\" href=\"%sveltekit.assets%/favicon.png\" />\n    <meta name=\"viewport\" content=\"width=device-width, initial-scale=1\" />\n    %sveltekit.head%\n  </head>\n  <body data-sveltekit-preload-data=\"hover\">\n    <div style=\"display: contents\">%sveltekit.body%</div>\n  </body>\n</html>\n"
  },
  {
    "path": "examples/openapi-ts-tanstack-svelte-query/src/client/@tanstack/svelte-query.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport { type DefaultError, type MutationOptions, queryOptions } from '@tanstack/svelte-query';\n\nimport { client } from '../client.gen';\nimport {\n  addPet,\n  createUser,\n  createUsersWithListInput,\n  deleteOrder,\n  deletePet,\n  deleteUser,\n  findPetsByStatus,\n  findPetsByTags,\n  getInventory,\n  getOrderById,\n  getPetById,\n  getUserByName,\n  loginUser,\n  logoutUser,\n  type Options,\n  placeOrder,\n  updatePet,\n  updatePetWithForm,\n  updateUser,\n  uploadFile,\n} from '../sdk.gen';\nimport type {\n  AddPetData,\n  AddPetResponse,\n  CreateUserData,\n  CreateUserResponse,\n  CreateUsersWithListInputData,\n  CreateUsersWithListInputResponse,\n  DeleteOrderData,\n  DeletePetData,\n  DeleteUserData,\n  FindPetsByStatusData,\n  FindPetsByStatusResponse,\n  FindPetsByTagsData,\n  FindPetsByTagsResponse,\n  GetInventoryData,\n  GetInventoryResponse,\n  GetOrderByIdData,\n  GetOrderByIdResponse,\n  GetPetByIdData,\n  GetPetByIdResponse,\n  GetUserByNameData,\n  GetUserByNameResponse,\n  LoginUserData,\n  LoginUserResponse,\n  LogoutUserData,\n  PlaceOrderData,\n  PlaceOrderResponse,\n  UpdatePetData,\n  UpdatePetResponse,\n  UpdatePetWithFormData,\n  UpdatePetWithFormResponse,\n  UpdateUserData,\n  UploadFileData,\n  UploadFileResponse,\n} from '../types.gen';\n\n/**\n * Add a new pet to the store.\n *\n * Add a new pet to the store.\n */\nexport const addPetMutation = (\n  options?: Partial<Options<AddPetData>>,\n): MutationOptions<AddPetResponse, DefaultError, Options<AddPetData>> => {\n  const mutationOptions: MutationOptions<AddPetResponse, DefaultError, Options<AddPetData>> = {\n    mutationFn: async (fnOptions) => {\n      const { data } = await addPet({\n        ...options,\n        ...fnOptions,\n        throwOnError: true,\n      });\n      return data;\n    },\n  };\n  return mutationOptions;\n};\n\n/**\n * Update an existing pet.\n *\n * Update an existing pet by Id.\n */\nexport const updatePetMutation = (\n  options?: Partial<Options<UpdatePetData>>,\n): MutationOptions<UpdatePetResponse, DefaultError, Options<UpdatePetData>> => {\n  const mutationOptions: MutationOptions<\n    UpdatePetResponse,\n    DefaultError,\n    Options<UpdatePetData>\n  > = {\n    mutationFn: async (fnOptions) => {\n      const { data } = await updatePet({\n        ...options,\n        ...fnOptions,\n        throwOnError: true,\n      });\n      return data;\n    },\n  };\n  return mutationOptions;\n};\n\nexport type QueryKey<TOptions extends Options> = [\n  Pick<TOptions, 'baseUrl' | 'body' | 'headers' | 'path' | 'query'> & {\n    _id: string;\n    _infinite?: boolean;\n    tags?: ReadonlyArray<string>;\n  },\n];\n\nconst createQueryKey = <TOptions extends Options>(\n  id: string,\n  options?: TOptions,\n  infinite?: boolean,\n  tags?: ReadonlyArray<string>,\n): [QueryKey<TOptions>[0]] => {\n  const params: QueryKey<TOptions>[0] = {\n    _id: id,\n    baseUrl: options?.baseUrl || (options?.client ?? client).getConfig().baseUrl,\n  } as QueryKey<TOptions>[0];\n  if (infinite) {\n    params._infinite = infinite;\n  }\n  if (tags) {\n    params.tags = tags;\n  }\n  if (options?.body) {\n    params.body = options.body;\n  }\n  if (options?.headers) {\n    params.headers = options.headers;\n  }\n  if (options?.path) {\n    params.path = options.path;\n  }\n  if (options?.query) {\n    params.query = options.query;\n  }\n  return [params];\n};\n\nexport const findPetsByStatusQueryKey = (options: Options<FindPetsByStatusData>) =>\n  createQueryKey('findPetsByStatus', options);\n\n/**\n * Finds Pets by status.\n *\n * Multiple status values can be provided with comma separated strings.\n */\nexport const findPetsByStatusOptions = (options: Options<FindPetsByStatusData>) =>\n  queryOptions<\n    FindPetsByStatusResponse,\n    DefaultError,\n    FindPetsByStatusResponse,\n    ReturnType<typeof findPetsByStatusQueryKey>\n  >({\n    queryFn: async ({ queryKey, signal }) => {\n      const { data } = await findPetsByStatus({\n        ...options,\n        ...queryKey[0],\n        signal,\n        throwOnError: true,\n      });\n      return data;\n    },\n    queryKey: findPetsByStatusQueryKey(options),\n  });\n\nexport const findPetsByTagsQueryKey = (options: Options<FindPetsByTagsData>) =>\n  createQueryKey('findPetsByTags', options);\n\n/**\n * Finds Pets by tags.\n *\n * Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.\n */\nexport const findPetsByTagsOptions = (options: Options<FindPetsByTagsData>) =>\n  queryOptions<\n    FindPetsByTagsResponse,\n    DefaultError,\n    FindPetsByTagsResponse,\n    ReturnType<typeof findPetsByTagsQueryKey>\n  >({\n    queryFn: async ({ queryKey, signal }) => {\n      const { data } = await findPetsByTags({\n        ...options,\n        ...queryKey[0],\n        signal,\n        throwOnError: true,\n      });\n      return data;\n    },\n    queryKey: findPetsByTagsQueryKey(options),\n  });\n\n/**\n * Deletes a pet.\n *\n * Delete a pet.\n */\nexport const deletePetMutation = (\n  options?: Partial<Options<DeletePetData>>,\n): MutationOptions<unknown, DefaultError, Options<DeletePetData>> => {\n  const mutationOptions: MutationOptions<unknown, DefaultError, Options<DeletePetData>> = {\n    mutationFn: async (fnOptions) => {\n      const { data } = await deletePet({\n        ...options,\n        ...fnOptions,\n        throwOnError: true,\n      });\n      return data;\n    },\n  };\n  return mutationOptions;\n};\n\nexport const getPetByIdQueryKey = (options: Options<GetPetByIdData>) =>\n  createQueryKey('getPetById', options);\n\n/**\n * Find pet by ID.\n *\n * Returns a single pet.\n */\nexport const getPetByIdOptions = (options: Options<GetPetByIdData>) =>\n  queryOptions<\n    GetPetByIdResponse,\n    DefaultError,\n    GetPetByIdResponse,\n    ReturnType<typeof getPetByIdQueryKey>\n  >({\n    queryFn: async ({ queryKey, signal }) => {\n      const { data } = await getPetById({\n        ...options,\n        ...queryKey[0],\n        signal,\n        throwOnError: true,\n      });\n      return data;\n    },\n    queryKey: getPetByIdQueryKey(options),\n  });\n\n/**\n * Updates a pet in the store with form data.\n *\n * Updates a pet resource based on the form data.\n */\nexport const updatePetWithFormMutation = (\n  options?: Partial<Options<UpdatePetWithFormData>>,\n): MutationOptions<UpdatePetWithFormResponse, DefaultError, Options<UpdatePetWithFormData>> => {\n  const mutationOptions: MutationOptions<\n    UpdatePetWithFormResponse,\n    DefaultError,\n    Options<UpdatePetWithFormData>\n  > = {\n    mutationFn: async (fnOptions) => {\n      const { data } = await updatePetWithForm({\n        ...options,\n        ...fnOptions,\n        throwOnError: true,\n      });\n      return data;\n    },\n  };\n  return mutationOptions;\n};\n\n/**\n * Uploads an image.\n *\n * Upload image of the pet.\n */\nexport const uploadFileMutation = (\n  options?: Partial<Options<UploadFileData>>,\n): MutationOptions<UploadFileResponse, DefaultError, Options<UploadFileData>> => {\n  const mutationOptions: MutationOptions<\n    UploadFileResponse,\n    DefaultError,\n    Options<UploadFileData>\n  > = {\n    mutationFn: async (fnOptions) => {\n      const { data } = await uploadFile({\n        ...options,\n        ...fnOptions,\n        throwOnError: true,\n      });\n      return data;\n    },\n  };\n  return mutationOptions;\n};\n\nexport const getInventoryQueryKey = (options?: Options<GetInventoryData>) =>\n  createQueryKey('getInventory', options);\n\n/**\n * Returns pet inventories by status.\n *\n * Returns a map of status codes to quantities.\n */\nexport const getInventoryOptions = (options?: Options<GetInventoryData>) =>\n  queryOptions<\n    GetInventoryResponse,\n    DefaultError,\n    GetInventoryResponse,\n    ReturnType<typeof getInventoryQueryKey>\n  >({\n    queryFn: async ({ queryKey, signal }) => {\n      const { data } = await getInventory({\n        ...options,\n        ...queryKey[0],\n        signal,\n        throwOnError: true,\n      });\n      return data;\n    },\n    queryKey: getInventoryQueryKey(options),\n  });\n\n/**\n * Place an order for a pet.\n *\n * Place a new order in the store.\n */\nexport const placeOrderMutation = (\n  options?: Partial<Options<PlaceOrderData>>,\n): MutationOptions<PlaceOrderResponse, DefaultError, Options<PlaceOrderData>> => {\n  const mutationOptions: MutationOptions<\n    PlaceOrderResponse,\n    DefaultError,\n    Options<PlaceOrderData>\n  > = {\n    mutationFn: async (fnOptions) => {\n      const { data } = await placeOrder({\n        ...options,\n        ...fnOptions,\n        throwOnError: true,\n      });\n      return data;\n    },\n  };\n  return mutationOptions;\n};\n\n/**\n * Delete purchase order by identifier.\n *\n * For valid response try integer IDs with value < 1000. Anything above 1000 or non-integers will generate API errors.\n */\nexport const deleteOrderMutation = (\n  options?: Partial<Options<DeleteOrderData>>,\n): MutationOptions<unknown, DefaultError, Options<DeleteOrderData>> => {\n  const mutationOptions: MutationOptions<unknown, DefaultError, Options<DeleteOrderData>> = {\n    mutationFn: async (fnOptions) => {\n      const { data } = await deleteOrder({\n        ...options,\n        ...fnOptions,\n        throwOnError: true,\n      });\n      return data;\n    },\n  };\n  return mutationOptions;\n};\n\nexport const getOrderByIdQueryKey = (options: Options<GetOrderByIdData>) =>\n  createQueryKey('getOrderById', options);\n\n/**\n * Find purchase order by ID.\n *\n * For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions.\n */\nexport const getOrderByIdOptions = (options: Options<GetOrderByIdData>) =>\n  queryOptions<\n    GetOrderByIdResponse,\n    DefaultError,\n    GetOrderByIdResponse,\n    ReturnType<typeof getOrderByIdQueryKey>\n  >({\n    queryFn: async ({ queryKey, signal }) => {\n      const { data } = await getOrderById({\n        ...options,\n        ...queryKey[0],\n        signal,\n        throwOnError: true,\n      });\n      return data;\n    },\n    queryKey: getOrderByIdQueryKey(options),\n  });\n\n/**\n * Create user.\n *\n * This can only be done by the logged in user.\n */\nexport const createUserMutation = (\n  options?: Partial<Options<CreateUserData>>,\n): MutationOptions<CreateUserResponse, DefaultError, Options<CreateUserData>> => {\n  const mutationOptions: MutationOptions<\n    CreateUserResponse,\n    DefaultError,\n    Options<CreateUserData>\n  > = {\n    mutationFn: async (fnOptions) => {\n      const { data } = await createUser({\n        ...options,\n        ...fnOptions,\n        throwOnError: true,\n      });\n      return data;\n    },\n  };\n  return mutationOptions;\n};\n\n/**\n * Creates list of users with given input array.\n *\n * Creates list of users with given input array.\n */\nexport const createUsersWithListInputMutation = (\n  options?: Partial<Options<CreateUsersWithListInputData>>,\n): MutationOptions<\n  CreateUsersWithListInputResponse,\n  DefaultError,\n  Options<CreateUsersWithListInputData>\n> => {\n  const mutationOptions: MutationOptions<\n    CreateUsersWithListInputResponse,\n    DefaultError,\n    Options<CreateUsersWithListInputData>\n  > = {\n    mutationFn: async (fnOptions) => {\n      const { data } = await createUsersWithListInput({\n        ...options,\n        ...fnOptions,\n        throwOnError: true,\n      });\n      return data;\n    },\n  };\n  return mutationOptions;\n};\n\nexport const loginUserQueryKey = (options?: Options<LoginUserData>) =>\n  createQueryKey('loginUser', options);\n\n/**\n * Logs user into the system.\n *\n * Log into the system.\n */\nexport const loginUserOptions = (options?: Options<LoginUserData>) =>\n  queryOptions<\n    LoginUserResponse,\n    DefaultError,\n    LoginUserResponse,\n    ReturnType<typeof loginUserQueryKey>\n  >({\n    queryFn: async ({ queryKey, signal }) => {\n      const { data } = await loginUser({\n        ...options,\n        ...queryKey[0],\n        signal,\n        throwOnError: true,\n      });\n      return data;\n    },\n    queryKey: loginUserQueryKey(options),\n  });\n\nexport const logoutUserQueryKey = (options?: Options<LogoutUserData>) =>\n  createQueryKey('logoutUser', options);\n\n/**\n * Logs out current logged in user session.\n *\n * Log user out of the system.\n */\nexport const logoutUserOptions = (options?: Options<LogoutUserData>) =>\n  queryOptions<unknown, DefaultError, unknown, ReturnType<typeof logoutUserQueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n      const { data } = await logoutUser({\n        ...options,\n        ...queryKey[0],\n        signal,\n        throwOnError: true,\n      });\n      return data;\n    },\n    queryKey: logoutUserQueryKey(options),\n  });\n\n/**\n * Delete user resource.\n *\n * This can only be done by the logged in user.\n */\nexport const deleteUserMutation = (\n  options?: Partial<Options<DeleteUserData>>,\n): MutationOptions<unknown, DefaultError, Options<DeleteUserData>> => {\n  const mutationOptions: MutationOptions<unknown, DefaultError, Options<DeleteUserData>> = {\n    mutationFn: async (fnOptions) => {\n      const { data } = await deleteUser({\n        ...options,\n        ...fnOptions,\n        throwOnError: true,\n      });\n      return data;\n    },\n  };\n  return mutationOptions;\n};\n\nexport const getUserByNameQueryKey = (options: Options<GetUserByNameData>) =>\n  createQueryKey('getUserByName', options);\n\n/**\n * Get user by user name.\n *\n * Get user detail based on username.\n */\nexport const getUserByNameOptions = (options: Options<GetUserByNameData>) =>\n  queryOptions<\n    GetUserByNameResponse,\n    DefaultError,\n    GetUserByNameResponse,\n    ReturnType<typeof getUserByNameQueryKey>\n  >({\n    queryFn: async ({ queryKey, signal }) => {\n      const { data } = await getUserByName({\n        ...options,\n        ...queryKey[0],\n        signal,\n        throwOnError: true,\n      });\n      return data;\n    },\n    queryKey: getUserByNameQueryKey(options),\n  });\n\n/**\n * Update user resource.\n *\n * This can only be done by the logged in user.\n */\nexport const updateUserMutation = (\n  options?: Partial<Options<UpdateUserData>>,\n): MutationOptions<unknown, DefaultError, Options<UpdateUserData>> => {\n  const mutationOptions: MutationOptions<unknown, DefaultError, Options<UpdateUserData>> = {\n    mutationFn: async (fnOptions) => {\n      const { data } = await updateUser({\n        ...options,\n        ...fnOptions,\n        throwOnError: true,\n      });\n      return data;\n    },\n  };\n  return mutationOptions;\n};\n"
  },
  {
    "path": "examples/openapi-ts-tanstack-svelte-query/src/client/client/client.gen.ts",
    "content": "// 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 (options: RequestOptions) => {\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 url = buildUrl(opts);\n\n    return { opts, url };\n  };\n\n  const request: Client['request'] = async (options) => {\n    // @ts-expect-error\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"
  },
  {
    "path": "examples/openapi-ts-tanstack-svelte-query/src/client/client/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type { Auth } from '../core/auth.gen';\nexport type { QuerySerializerOptions } from '../core/bodySerializer.gen';\nexport {\n  formDataBodySerializer,\n  jsonBodySerializer,\n  urlSearchParamsBodySerializer,\n} from '../core/bodySerializer.gen';\nexport { buildClientParams } from '../core/params.gen';\nexport { serializeQueryKeyValue } from '../core/queryKeySerializer.gen';\nexport { createClient } from './client.gen';\nexport type {\n  Client,\n  ClientOptions,\n  Config,\n  CreateClientConfig,\n  Options,\n  RequestOptions,\n  RequestResult,\n  ResolvedRequestOptions,\n  ResponseStyle,\n  TDataShape,\n} from './types.gen';\nexport { createConfig, mergeHeaders } from './utils.gen';\n"
  },
  {
    "path": "examples/openapi-ts-tanstack-svelte-query/src/client/client/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { Auth } from '../core/auth.gen';\nimport type { ServerSentEventsOptions, ServerSentEventsResult } from '../core/serverSentEvents.gen';\nimport type { Client as CoreClient, Config as CoreConfig } from '../core/types.gen';\nimport type { Middleware } from './utils.gen';\n\nexport type ResponseStyle = 'data' | 'fields';\n\nexport interface Config<T extends ClientOptions = ClientOptions>\n  extends Omit<RequestInit, 'body' | 'headers' | 'method'>, CoreConfig {\n  /**\n   * Base URL for all requests made by this client.\n   */\n  baseUrl?: T['baseUrl'];\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   * Please don't use the Fetch client for Next.js applications. The `next`\n   * options won't have any effect.\n   *\n   * Install {@link https://www.npmjs.com/package/@hey-api/client-next `@hey-api/client-next`} instead.\n   */\n  next?: never;\n  /**\n   * Return the response data parsed in a specified format. By default, `auto`\n   * will infer the appropriate method from the `Content-Type` response header.\n   * You can override this behavior with any of the {@link Body} methods.\n   * Select `stream` if you don't want to parse response data at all.\n   *\n   * @default 'auto'\n   */\n  parseAs?: 'arrayBuffer' | 'auto' | 'blob' | 'formData' | 'json' | 'stream' | 'text';\n  /**\n   * Should we return only data or multiple fields (data, error, response, etc.)?\n   *\n   * @default 'fields'\n   */\n  responseStyle?: ResponseStyle;\n  /**\n   * Throw an error instead of returning it in the response?\n   *\n   * @default false\n   */\n  throwOnError?: T['throwOnError'];\n}\n\nexport interface RequestOptions<\n  TData = unknown,\n  TResponseStyle extends ResponseStyle = 'fields',\n  ThrowOnError extends boolean = boolean,\n  Url extends string = string,\n>\n  extends\n    Config<{\n      responseStyle: TResponseStyle;\n      throwOnError: ThrowOnError;\n    }>,\n    Pick<\n      ServerSentEventsOptions<TData>,\n      | 'onRequest'\n      | 'onSseError'\n      | 'onSseEvent'\n      | 'sseDefaultRetryDelay'\n      | 'sseMaxRetryAttempts'\n      | 'sseMaxRetryDelay'\n    > {\n  /**\n   * Any body that you want to add to your request.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/fetch#body}\n   */\n  body?: unknown;\n  path?: Record<string, unknown>;\n  query?: Record<string, unknown>;\n  /**\n   * Security mechanism(s) to use for the request.\n   */\n  security?: ReadonlyArray<Auth>;\n  url: Url;\n}\n\nexport interface ResolvedRequestOptions<\n  TResponseStyle extends ResponseStyle = 'fields',\n  ThrowOnError extends boolean = boolean,\n  Url extends string = string,\n> extends RequestOptions<unknown, TResponseStyle, ThrowOnError, Url> {\n  serializedBody?: string;\n}\n\nexport type RequestResult<\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = boolean,\n  TResponseStyle extends ResponseStyle = 'fields',\n> = ThrowOnError extends true\n  ? Promise<\n      TResponseStyle extends 'data'\n        ? TData extends Record<string, unknown>\n          ? TData[keyof TData]\n          : TData\n        : {\n            data: TData extends Record<string, unknown> ? TData[keyof TData] : TData;\n            request: Request;\n            response: Response;\n          }\n    >\n  : Promise<\n      TResponseStyle extends 'data'\n        ? (TData extends Record<string, unknown> ? TData[keyof TData] : TData) | undefined\n        : (\n            | {\n                data: TData extends Record<string, unknown> ? TData[keyof TData] : TData;\n                error: undefined;\n              }\n            | {\n                data: undefined;\n                error: TError extends Record<string, unknown> ? TError[keyof TError] : TError;\n              }\n          ) & {\n            request: Request;\n            response: Response;\n          }\n    >;\n\nexport interface ClientOptions {\n  baseUrl?: string;\n  responseStyle?: ResponseStyle;\n  throwOnError?: boolean;\n}\n\ntype MethodFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'>,\n) => RequestResult<TData, TError, ThrowOnError, TResponseStyle>;\n\ntype SseFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'>,\n) => Promise<ServerSentEventsResult<TData, TError>>;\n\ntype RequestFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'> &\n    Pick<Required<RequestOptions<TData, TResponseStyle, ThrowOnError>>, 'method'>,\n) => RequestResult<TData, TError, ThrowOnError, TResponseStyle>;\n\ntype BuildUrlFn = <\n  TData extends {\n    body?: unknown;\n    path?: Record<string, unknown>;\n    query?: Record<string, unknown>;\n    url: string;\n  },\n>(\n  options: TData & Options<TData>,\n) => string;\n\nexport type Client = CoreClient<RequestFn, Config, MethodFn, BuildUrlFn, SseFn> & {\n  interceptors: Middleware<Request, Response, unknown, ResolvedRequestOptions>;\n};\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 = ClientOptions> = (\n  override?: Config<ClientOptions & T>,\n) => Config<Required<ClientOptions> & T>;\n\nexport interface TDataShape {\n  body?: unknown;\n  headers?: unknown;\n  path?: unknown;\n  query?: unknown;\n  url: string;\n}\n\ntype OmitKeys<T, K> = Pick<T, Exclude<keyof T, K>>;\n\nexport type Options<\n  TData extends TDataShape = TDataShape,\n  ThrowOnError extends boolean = boolean,\n  TResponse = unknown,\n  TResponseStyle extends ResponseStyle = 'fields',\n> = OmitKeys<\n  RequestOptions<TResponse, TResponseStyle, ThrowOnError>,\n  'body' | 'path' | 'query' | 'url'\n> &\n  ([TData] extends [never] ? unknown : Omit<TData, 'url'>);\n"
  },
  {
    "path": "examples/openapi-ts-tanstack-svelte-query/src/client/client/utils.gen.ts",
    "content": "// 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"
  },
  {
    "path": "examples/openapi-ts-tanstack-svelte-query/src/client/client.gen.ts",
    "content": "// 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> = (\n  override?: Config<ClientOptions & T>,\n) => Config<Required<ClientOptions> & T>;\n\nexport const client = createClient(\n  createConfig<ClientOptions2>({ baseUrl: 'https://petstore3.swagger.io/api/v3' }),\n);\n"
  },
  {
    "path": "examples/openapi-ts-tanstack-svelte-query/src/client/core/auth.gen.ts",
    "content": "// 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"
  },
  {
    "path": "examples/openapi-ts-tanstack-svelte-query/src/client/core/bodySerializer.gen.ts",
    "content": "// 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"
  },
  {
    "path": "examples/openapi-ts-tanstack-svelte-query/src/client/core/params.gen.ts",
    "content": "// 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"
  },
  {
    "path": "examples/openapi-ts-tanstack-svelte-query/src/client/core/pathSerializer.gen.ts",
    "content": "// 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"
  },
  {
    "path": "examples/openapi-ts-tanstack-svelte-query/src/client/core/queryKeySerializer.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\n/**\n * JSON-friendly union that mirrors what Pinia Colada can hash.\n */\nexport type JsonValue =\n  | null\n  | string\n  | number\n  | boolean\n  | JsonValue[]\n  | { [key: string]: JsonValue };\n\n/**\n * Replacer that converts non-JSON values (bigint, Date, etc.) to safe substitutes.\n */\nexport const queryKeyJsonReplacer = (_key: string, value: unknown) => {\n  if (value === undefined || typeof value === 'function' || typeof value === 'symbol') {\n    return undefined;\n  }\n  if (typeof value === 'bigint') {\n    return value.toString();\n  }\n  if (value instanceof Date) {\n    return value.toISOString();\n  }\n  return value;\n};\n\n/**\n * Safely stringifies a value and parses it back into a JsonValue.\n */\nexport const stringifyToJsonValue = (input: unknown): JsonValue | undefined => {\n  try {\n    const json = JSON.stringify(input, queryKeyJsonReplacer);\n    if (json === undefined) {\n      return undefined;\n    }\n    return JSON.parse(json) as JsonValue;\n  } catch {\n    return undefined;\n  }\n};\n\n/**\n * Detects plain objects (including objects with a null prototype).\n */\nconst isPlainObject = (value: unknown): value is Record<string, unknown> => {\n  if (value === null || typeof value !== 'object') {\n    return false;\n  }\n  const prototype = Object.getPrototypeOf(value as object);\n  return prototype === Object.prototype || prototype === null;\n};\n\n/**\n * Turns URLSearchParams into a sorted JSON object for deterministic keys.\n */\nconst serializeSearchParams = (params: URLSearchParams): JsonValue => {\n  const entries = Array.from(params.entries()).sort(([a], [b]) => a.localeCompare(b));\n  const result: Record<string, JsonValue> = {};\n\n  for (const [key, value] of entries) {\n    const existing = result[key];\n    if (existing === undefined) {\n      result[key] = value;\n      continue;\n    }\n\n    if (Array.isArray(existing)) {\n      (existing as string[]).push(value);\n    } else {\n      result[key] = [existing, value];\n    }\n  }\n\n  return result;\n};\n\n/**\n * Normalizes any accepted value into a JSON-friendly shape for query keys.\n */\nexport const serializeQueryKeyValue = (value: unknown): JsonValue | undefined => {\n  if (value === null) {\n    return null;\n  }\n\n  if (typeof value === 'string' || typeof value === 'number' || typeof value === 'boolean') {\n    return value;\n  }\n\n  if (value === undefined || typeof value === 'function' || typeof value === 'symbol') {\n    return undefined;\n  }\n\n  if (typeof value === 'bigint') {\n    return value.toString();\n  }\n\n  if (value instanceof Date) {\n    return value.toISOString();\n  }\n\n  if (Array.isArray(value)) {\n    return stringifyToJsonValue(value);\n  }\n\n  if (typeof URLSearchParams !== 'undefined' && value instanceof URLSearchParams) {\n    return serializeSearchParams(value);\n  }\n\n  if (isPlainObject(value)) {\n    return stringifyToJsonValue(value);\n  }\n\n  return undefined;\n};\n"
  },
  {
    "path": "examples/openapi-ts-tanstack-svelte-query/src/client/core/serverSentEvents.gen.ts",
    "content": "// 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 const 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            // Normalize line endings: CRLF -> LF, then CR -> LF\n            buffer = buffer.replace(/\\r\\n/g, '\\n').replace(/\\r/g, '\\n');\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"
  },
  {
    "path": "examples/openapi-ts-tanstack-svelte-query/src/client/core/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { Auth, AuthToken } from './auth.gen';\nimport type { BodySerializer, QuerySerializer, QuerySerializerOptions } from './bodySerializer.gen';\n\nexport type HttpMethod =\n  | 'connect'\n  | 'delete'\n  | 'get'\n  | 'head'\n  | 'options'\n  | 'patch'\n  | 'post'\n  | 'put'\n  | 'trace';\n\nexport type Client<\n  RequestFn = never,\n  Config = unknown,\n  MethodFn = never,\n  BuildUrlFn = never,\n  SseFn = never,\n> = {\n  /**\n   * Returns the final request URL.\n   */\n  buildUrl: BuildUrlFn;\n  getConfig: () => Config;\n  request: RequestFn;\n  setConfig: (config: Config) => Config;\n} & {\n  [K in HttpMethod]: MethodFn;\n} & ([SseFn] extends [never] ? { sse?: never } : { sse: { [K in HttpMethod]: SseFn } });\n\nexport interface Config {\n  /**\n   * Auth token or a function returning auth token. The resolved value will be\n   * added to the request payload as defined by its `security` array.\n   */\n  auth?: ((auth: Auth) => Promise<AuthToken> | AuthToken) | AuthToken;\n  /**\n   * A function for serializing request body parameter. By default,\n   * {@link JSON.stringify()} will be used.\n   */\n  bodySerializer?: BodySerializer | null;\n  /**\n   * An object containing any HTTP headers that you want to pre-populate your\n   * `Headers` object with.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/Headers/Headers#init See more}\n   */\n  headers?:\n    | RequestInit['headers']\n    | Record<\n        string,\n        string | number | boolean | (string | number | boolean)[] | null | undefined | unknown\n      >;\n  /**\n   * The request method.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/fetch#method See more}\n   */\n  method?: Uppercase<HttpMethod>;\n  /**\n   * A function for serializing request query parameters. By default, arrays\n   * will be exploded in form style, objects will be exploded in deepObject\n   * style, and reserved characters are percent-encoded.\n   *\n   * This method will have no effect if the native `paramsSerializer()` Axios\n   * API function is used.\n   *\n   * {@link https://swagger.io/docs/specification/serialization/#query View examples}\n   */\n  querySerializer?: QuerySerializer | QuerySerializerOptions;\n  /**\n   * A function validating request data. This is useful if you want to ensure\n   * the request conforms to the desired shape, so it can be safely sent to\n   * the server.\n   */\n  requestValidator?: (data: unknown) => Promise<unknown>;\n  /**\n   * A function transforming response data before it's returned. This is useful\n   * for post-processing data, e.g. converting ISO strings into Date objects.\n   */\n  responseTransformer?: (data: unknown) => Promise<unknown>;\n  /**\n   * A function validating response data. This is useful if you want to ensure\n   * the response conforms to the desired shape, so it can be safely passed to\n   * the transformers and returned to the user.\n   */\n  responseValidator?: (data: unknown) => Promise<unknown>;\n}\n\ntype IsExactlyNeverOrNeverUndefined<T> = [T] extends [never]\n  ? true\n  : [T] extends [never | undefined]\n    ? [undefined] extends [T]\n      ? false\n      : true\n    : false;\n\nexport type OmitNever<T extends Record<string, unknown>> = {\n  [K in keyof T as IsExactlyNeverOrNeverUndefined<T[K]> extends true ? never : K]: T[K];\n};\n"
  },
  {
    "path": "examples/openapi-ts-tanstack-svelte-query/src/client/core/utils.gen.ts",
    "content": "// 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"
  },
  {
    "path": "examples/openapi-ts-tanstack-svelte-query/src/client/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport {\n  addPet,\n  createUser,\n  createUsersWithListInput,\n  deleteOrder,\n  deletePet,\n  deleteUser,\n  findPetsByStatus,\n  findPetsByTags,\n  getInventory,\n  getOrderById,\n  getPetById,\n  getUserByName,\n  loginUser,\n  logoutUser,\n  type Options,\n  placeOrder,\n  updatePet,\n  updatePetWithForm,\n  updateUser,\n  uploadFile,\n} from './sdk.gen';\nexport type {\n  AddPetData,\n  AddPetErrors,\n  AddPetResponse,\n  AddPetResponses,\n  ApiResponse,\n  Category,\n  ClientOptions,\n  CreateUserData,\n  CreateUserErrors,\n  CreateUserResponse,\n  CreateUserResponses,\n  CreateUsersWithListInputData,\n  CreateUsersWithListInputErrors,\n  CreateUsersWithListInputResponse,\n  CreateUsersWithListInputResponses,\n  DeleteOrderData,\n  DeleteOrderErrors,\n  DeleteOrderResponses,\n  DeletePetData,\n  DeletePetErrors,\n  DeletePetResponses,\n  DeleteUserData,\n  DeleteUserErrors,\n  DeleteUserResponses,\n  FindPetsByStatusData,\n  FindPetsByStatusErrors,\n  FindPetsByStatusResponse,\n  FindPetsByStatusResponses,\n  FindPetsByTagsData,\n  FindPetsByTagsErrors,\n  FindPetsByTagsResponse,\n  FindPetsByTagsResponses,\n  GetInventoryData,\n  GetInventoryErrors,\n  GetInventoryResponse,\n  GetInventoryResponses,\n  GetOrderByIdData,\n  GetOrderByIdErrors,\n  GetOrderByIdResponse,\n  GetOrderByIdResponses,\n  GetPetByIdData,\n  GetPetByIdErrors,\n  GetPetByIdResponse,\n  GetPetByIdResponses,\n  GetUserByNameData,\n  GetUserByNameErrors,\n  GetUserByNameResponse,\n  GetUserByNameResponses,\n  LoginUserData,\n  LoginUserErrors,\n  LoginUserResponse,\n  LoginUserResponses,\n  LogoutUserData,\n  LogoutUserErrors,\n  LogoutUserResponses,\n  Order,\n  Pet,\n  Pet2,\n  PlaceOrderData,\n  PlaceOrderErrors,\n  PlaceOrderResponse,\n  PlaceOrderResponses,\n  Tag,\n  UpdatePetData,\n  UpdatePetErrors,\n  UpdatePetResponse,\n  UpdatePetResponses,\n  UpdatePetWithFormData,\n  UpdatePetWithFormErrors,\n  UpdatePetWithFormResponse,\n  UpdatePetWithFormResponses,\n  UpdateUserData,\n  UpdateUserErrors,\n  UpdateUserResponses,\n  UploadFileData,\n  UploadFileErrors,\n  UploadFileResponse,\n  UploadFileResponses,\n  User,\n  UserArray,\n} from './types.gen';\n"
  },
  {
    "path": "examples/openapi-ts-tanstack-svelte-query/src/client/schemas.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport const OrderSchema = {\n  properties: {\n    complete: {\n      type: 'boolean',\n    },\n    id: {\n      example: 10,\n      format: 'int64',\n      type: 'integer',\n    },\n    petId: {\n      example: 198772,\n      format: 'int64',\n      type: 'integer',\n    },\n    quantity: {\n      example: 7,\n      format: 'int32',\n      type: 'integer',\n    },\n    shipDate: {\n      format: 'date-time',\n      type: 'string',\n    },\n    status: {\n      description: 'Order Status',\n      enum: ['placed', 'approved', 'delivered'],\n      example: 'approved',\n      type: 'string',\n    },\n  },\n  type: 'object',\n  'x-swagger-router-model': 'io.swagger.petstore.model.Order',\n  xml: {\n    name: 'order',\n  },\n} as const;\n\nexport const CategorySchema = {\n  properties: {\n    id: {\n      example: 1,\n      format: 'int64',\n      type: 'integer',\n    },\n    name: {\n      example: 'Dogs',\n      type: 'string',\n    },\n  },\n  type: 'object',\n  'x-swagger-router-model': 'io.swagger.petstore.model.Category',\n  xml: {\n    name: 'category',\n  },\n} as const;\n\nexport const UserSchema = {\n  properties: {\n    email: {\n      example: 'john@email.com',\n      type: 'string',\n    },\n    firstName: {\n      example: 'John',\n      type: 'string',\n    },\n    id: {\n      example: 10,\n      format: 'int64',\n      type: 'integer',\n    },\n    lastName: {\n      example: 'James',\n      type: 'string',\n    },\n    password: {\n      example: '12345',\n      type: 'string',\n    },\n    phone: {\n      example: '12345',\n      type: 'string',\n    },\n    userStatus: {\n      description: 'User Status',\n      example: 1,\n      format: 'int32',\n      type: 'integer',\n    },\n    username: {\n      example: 'theUser',\n      type: 'string',\n    },\n  },\n  type: 'object',\n  'x-swagger-router-model': 'io.swagger.petstore.model.User',\n  xml: {\n    name: 'user',\n  },\n} as const;\n\nexport const TagSchema = {\n  properties: {\n    id: {\n      format: 'int64',\n      type: 'integer',\n    },\n    name: {\n      type: 'string',\n    },\n  },\n  type: 'object',\n  'x-swagger-router-model': 'io.swagger.petstore.model.Tag',\n  xml: {\n    name: 'tag',\n  },\n} as const;\n\nexport const PetSchema = {\n  properties: {\n    category: {\n      $ref: '#/components/schemas/Category',\n    },\n    id: {\n      example: 10,\n      format: 'int64',\n      type: 'integer',\n    },\n    name: {\n      example: 'doggie',\n      type: 'string',\n    },\n    photoUrls: {\n      items: {\n        type: 'string',\n        xml: {\n          name: 'photoUrl',\n        },\n      },\n      type: 'array',\n      xml: {\n        wrapped: true,\n      },\n    },\n    status: {\n      description: 'pet status in the store',\n      enum: ['available', 'pending', 'sold'],\n      type: 'string',\n    },\n    tags: {\n      items: {\n        $ref: '#/components/schemas/Tag',\n      },\n      type: 'array',\n      xml: {\n        wrapped: true,\n      },\n    },\n  },\n  required: ['name', 'photoUrls'],\n  type: 'object',\n  'x-swagger-router-model': 'io.swagger.petstore.model.Pet',\n  xml: {\n    name: 'pet',\n  },\n} as const;\n\nexport const ApiResponseSchema = {\n  properties: {\n    code: {\n      format: 'int32',\n      type: 'integer',\n    },\n    message: {\n      type: 'string',\n    },\n    type: {\n      type: 'string',\n    },\n  },\n  type: 'object',\n  xml: {\n    name: '##default',\n  },\n} as const;\n"
  },
  {
    "path": "examples/openapi-ts-tanstack-svelte-query/src/client/sdk.gen.ts",
    "content": "// 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 {\n  AddPetData,\n  AddPetErrors,\n  AddPetResponses,\n  CreateUserData,\n  CreateUserErrors,\n  CreateUserResponses,\n  CreateUsersWithListInputData,\n  CreateUsersWithListInputErrors,\n  CreateUsersWithListInputResponses,\n  DeleteOrderData,\n  DeleteOrderErrors,\n  DeleteOrderResponses,\n  DeletePetData,\n  DeletePetErrors,\n  DeletePetResponses,\n  DeleteUserData,\n  DeleteUserErrors,\n  DeleteUserResponses,\n  FindPetsByStatusData,\n  FindPetsByStatusErrors,\n  FindPetsByStatusResponses,\n  FindPetsByTagsData,\n  FindPetsByTagsErrors,\n  FindPetsByTagsResponses,\n  GetInventoryData,\n  GetInventoryErrors,\n  GetInventoryResponses,\n  GetOrderByIdData,\n  GetOrderByIdErrors,\n  GetOrderByIdResponses,\n  GetPetByIdData,\n  GetPetByIdErrors,\n  GetPetByIdResponses,\n  GetUserByNameData,\n  GetUserByNameErrors,\n  GetUserByNameResponses,\n  LoginUserData,\n  LoginUserErrors,\n  LoginUserResponses,\n  LogoutUserData,\n  LogoutUserErrors,\n  LogoutUserResponses,\n  PlaceOrderData,\n  PlaceOrderErrors,\n  PlaceOrderResponses,\n  UpdatePetData,\n  UpdatePetErrors,\n  UpdatePetResponses,\n  UpdatePetWithFormData,\n  UpdatePetWithFormErrors,\n  UpdatePetWithFormResponses,\n  UpdateUserData,\n  UpdateUserErrors,\n  UpdateUserResponses,\n  UploadFileData,\n  UploadFileErrors,\n  UploadFileResponses,\n} from './types.gen';\n\nexport type Options<\n  TData extends TDataShape = TDataShape,\n  ThrowOnError extends boolean = boolean,\n> = Options2<TData, ThrowOnError> & {\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 * Add a new pet to the store.\n *\n * Add a new pet to the store.\n */\nexport const addPet = <ThrowOnError extends boolean = false>(\n  options: Options<AddPetData, ThrowOnError>,\n) =>\n  (options.client ?? client).post<AddPetResponses, AddPetErrors, ThrowOnError>({\n    security: [{ scheme: 'bearer', type: 'http' }],\n    url: '/pet',\n    ...options,\n    headers: {\n      'Content-Type': 'application/json',\n      ...options.headers,\n    },\n  });\n\n/**\n * Update an existing pet.\n *\n * Update an existing pet by Id.\n */\nexport const updatePet = <ThrowOnError extends boolean = false>(\n  options: Options<UpdatePetData, ThrowOnError>,\n) =>\n  (options.client ?? client).put<UpdatePetResponses, UpdatePetErrors, ThrowOnError>({\n    security: [{ scheme: 'bearer', type: 'http' }],\n    url: '/pet',\n    ...options,\n    headers: {\n      'Content-Type': 'application/json',\n      ...options.headers,\n    },\n  });\n\n/**\n * Finds Pets by status.\n *\n * Multiple status values can be provided with comma separated strings.\n */\nexport const findPetsByStatus = <ThrowOnError extends boolean = false>(\n  options: Options<FindPetsByStatusData, ThrowOnError>,\n) =>\n  (options.client ?? client).get<FindPetsByStatusResponses, FindPetsByStatusErrors, ThrowOnError>({\n    security: [{ scheme: 'bearer', type: 'http' }],\n    url: '/pet/findByStatus',\n    ...options,\n  });\n\n/**\n * Finds Pets by tags.\n *\n * Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.\n */\nexport const findPetsByTags = <ThrowOnError extends boolean = false>(\n  options: Options<FindPetsByTagsData, ThrowOnError>,\n) =>\n  (options.client ?? client).get<FindPetsByTagsResponses, FindPetsByTagsErrors, ThrowOnError>({\n    security: [{ scheme: 'bearer', type: 'http' }],\n    url: '/pet/findByTags',\n    ...options,\n  });\n\n/**\n * Deletes a pet.\n *\n * Delete a pet.\n */\nexport const deletePet = <ThrowOnError extends boolean = false>(\n  options: Options<DeletePetData, ThrowOnError>,\n) =>\n  (options.client ?? client).delete<DeletePetResponses, DeletePetErrors, ThrowOnError>({\n    security: [{ scheme: 'bearer', type: 'http' }],\n    url: '/pet/{petId}',\n    ...options,\n  });\n\n/**\n * Find pet by ID.\n *\n * Returns a single pet.\n */\nexport const getPetById = <ThrowOnError extends boolean = false>(\n  options: Options<GetPetByIdData, ThrowOnError>,\n) =>\n  (options.client ?? client).get<GetPetByIdResponses, GetPetByIdErrors, ThrowOnError>({\n    security: [\n      { name: 'api_key', type: 'apiKey' },\n      { scheme: 'bearer', type: 'http' },\n    ],\n    url: '/pet/{petId}',\n    ...options,\n  });\n\n/**\n * Updates a pet in the store with form data.\n *\n * Updates a pet resource based on the form data.\n */\nexport const updatePetWithForm = <ThrowOnError extends boolean = false>(\n  options: Options<UpdatePetWithFormData, ThrowOnError>,\n) =>\n  (options.client ?? client).post<\n    UpdatePetWithFormResponses,\n    UpdatePetWithFormErrors,\n    ThrowOnError\n  >({\n    security: [{ scheme: 'bearer', type: 'http' }],\n    url: '/pet/{petId}',\n    ...options,\n  });\n\n/**\n * Uploads an image.\n *\n * Upload image of the pet.\n */\nexport const uploadFile = <ThrowOnError extends boolean = false>(\n  options: Options<UploadFileData, ThrowOnError>,\n) =>\n  (options.client ?? client).post<UploadFileResponses, UploadFileErrors, ThrowOnError>({\n    bodySerializer: null,\n    security: [{ scheme: 'bearer', type: 'http' }],\n    url: '/pet/{petId}/uploadImage',\n    ...options,\n    headers: {\n      'Content-Type': 'application/octet-stream',\n      ...options.headers,\n    },\n  });\n\n/**\n * Returns pet inventories by status.\n *\n * Returns a map of status codes to quantities.\n */\nexport const getInventory = <ThrowOnError extends boolean = false>(\n  options?: Options<GetInventoryData, ThrowOnError>,\n) =>\n  (options?.client ?? client).get<GetInventoryResponses, GetInventoryErrors, ThrowOnError>({\n    security: [{ name: 'api_key', type: 'apiKey' }],\n    url: '/store/inventory',\n    ...options,\n  });\n\n/**\n * Place an order for a pet.\n *\n * Place a new order in the store.\n */\nexport const placeOrder = <ThrowOnError extends boolean = false>(\n  options?: Options<PlaceOrderData, ThrowOnError>,\n) =>\n  (options?.client ?? client).post<PlaceOrderResponses, PlaceOrderErrors, ThrowOnError>({\n    url: '/store/order',\n    ...options,\n    headers: {\n      'Content-Type': 'application/json',\n      ...options?.headers,\n    },\n  });\n\n/**\n * Delete purchase order by identifier.\n *\n * For valid response try integer IDs with value < 1000. Anything above 1000 or non-integers will generate API errors.\n */\nexport const deleteOrder = <ThrowOnError extends boolean = false>(\n  options: Options<DeleteOrderData, ThrowOnError>,\n) =>\n  (options.client ?? client).delete<DeleteOrderResponses, DeleteOrderErrors, ThrowOnError>({\n    url: '/store/order/{orderId}',\n    ...options,\n  });\n\n/**\n * Find purchase order by ID.\n *\n * For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions.\n */\nexport const getOrderById = <ThrowOnError extends boolean = false>(\n  options: Options<GetOrderByIdData, ThrowOnError>,\n) =>\n  (options.client ?? client).get<GetOrderByIdResponses, GetOrderByIdErrors, ThrowOnError>({\n    url: '/store/order/{orderId}',\n    ...options,\n  });\n\n/**\n * Create user.\n *\n * This can only be done by the logged in user.\n */\nexport const createUser = <ThrowOnError extends boolean = false>(\n  options?: Options<CreateUserData, ThrowOnError>,\n) =>\n  (options?.client ?? client).post<CreateUserResponses, CreateUserErrors, ThrowOnError>({\n    url: '/user',\n    ...options,\n    headers: {\n      'Content-Type': 'application/json',\n      ...options?.headers,\n    },\n  });\n\n/**\n * Creates list of users with given input array.\n *\n * Creates list of users with given input array.\n */\nexport const createUsersWithListInput = <ThrowOnError extends boolean = false>(\n  options?: Options<CreateUsersWithListInputData, ThrowOnError>,\n) =>\n  (options?.client ?? client).post<\n    CreateUsersWithListInputResponses,\n    CreateUsersWithListInputErrors,\n    ThrowOnError\n  >({\n    url: '/user/createWithList',\n    ...options,\n    headers: {\n      'Content-Type': 'application/json',\n      ...options?.headers,\n    },\n  });\n\n/**\n * Logs user into the system.\n *\n * Log into the system.\n */\nexport const loginUser = <ThrowOnError extends boolean = false>(\n  options?: Options<LoginUserData, ThrowOnError>,\n) =>\n  (options?.client ?? client).get<LoginUserResponses, LoginUserErrors, ThrowOnError>({\n    url: '/user/login',\n    ...options,\n  });\n\n/**\n * Logs out current logged in user session.\n *\n * Log user out of the system.\n */\nexport const logoutUser = <ThrowOnError extends boolean = false>(\n  options?: Options<LogoutUserData, ThrowOnError>,\n) =>\n  (options?.client ?? client).get<LogoutUserResponses, LogoutUserErrors, ThrowOnError>({\n    url: '/user/logout',\n    ...options,\n  });\n\n/**\n * Delete user resource.\n *\n * This can only be done by the logged in user.\n */\nexport const deleteUser = <ThrowOnError extends boolean = false>(\n  options: Options<DeleteUserData, ThrowOnError>,\n) =>\n  (options.client ?? client).delete<DeleteUserResponses, DeleteUserErrors, ThrowOnError>({\n    url: '/user/{username}',\n    ...options,\n  });\n\n/**\n * Get user by user name.\n *\n * Get user detail based on username.\n */\nexport const getUserByName = <ThrowOnError extends boolean = false>(\n  options: Options<GetUserByNameData, ThrowOnError>,\n) =>\n  (options.client ?? client).get<GetUserByNameResponses, GetUserByNameErrors, ThrowOnError>({\n    url: '/user/{username}',\n    ...options,\n  });\n\n/**\n * Update user resource.\n *\n * This can only be done by the logged in user.\n */\nexport const updateUser = <ThrowOnError extends boolean = false>(\n  options: Options<UpdateUserData, ThrowOnError>,\n) =>\n  (options.client ?? client).put<UpdateUserResponses, UpdateUserErrors, ThrowOnError>({\n    url: '/user/{username}',\n    ...options,\n    headers: {\n      'Content-Type': 'application/json',\n      ...options.headers,\n    },\n  });\n"
  },
  {
    "path": "examples/openapi-ts-tanstack-svelte-query/src/client/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type ClientOptions = {\n  baseUrl: 'https://petstore3.swagger.io/api/v3' | (string & {});\n};\n\nexport type Order = {\n  complete?: boolean;\n  id?: number;\n  petId?: number;\n  quantity?: number;\n  shipDate?: string;\n  /**\n   * Order Status\n   */\n  status?: 'placed' | 'approved' | 'delivered';\n};\n\nexport type Category = {\n  id?: number;\n  name?: string;\n};\n\nexport type User = {\n  email?: string;\n  firstName?: string;\n  id?: number;\n  lastName?: string;\n  password?: string;\n  phone?: string;\n  /**\n   * User Status\n   */\n  userStatus?: number;\n  username?: string;\n};\n\nexport type Tag = {\n  id?: number;\n  name?: string;\n};\n\nexport type Pet = {\n  category?: Category;\n  id?: number;\n  name: string;\n  photoUrls: Array<string>;\n  /**\n   * pet status in the store\n   */\n  status?: 'available' | 'pending' | 'sold';\n  tags?: Array<Tag>;\n};\n\nexport type ApiResponse = {\n  code?: number;\n  message?: string;\n  type?: string;\n};\n\nexport type Pet2 = Pet;\n\n/**\n * List of user object\n */\nexport type UserArray = Array<User>;\n\nexport type AddPetData = {\n  /**\n   * Create a new pet in the store\n   */\n  body: Pet;\n  path?: never;\n  query?: never;\n  url: '/pet';\n};\n\nexport type AddPetErrors = {\n  /**\n   * Invalid input\n   */\n  400: unknown;\n  /**\n   * Validation exception\n   */\n  422: unknown;\n  /**\n   * Unexpected error\n   */\n  default: unknown;\n};\n\nexport type AddPetResponses = {\n  /**\n   * Successful operation\n   */\n  200: Pet;\n};\n\nexport type AddPetResponse = AddPetResponses[keyof AddPetResponses];\n\nexport type UpdatePetData = {\n  /**\n   * Update an existent pet in the store\n   */\n  body: Pet;\n  path?: never;\n  query?: never;\n  url: '/pet';\n};\n\nexport type UpdatePetErrors = {\n  /**\n   * Invalid ID supplied\n   */\n  400: unknown;\n  /**\n   * Pet not found\n   */\n  404: unknown;\n  /**\n   * Validation exception\n   */\n  422: unknown;\n  /**\n   * Unexpected error\n   */\n  default: unknown;\n};\n\nexport type UpdatePetResponses = {\n  /**\n   * Successful operation\n   */\n  200: Pet;\n};\n\nexport type UpdatePetResponse = UpdatePetResponses[keyof UpdatePetResponses];\n\nexport type FindPetsByStatusData = {\n  body?: never;\n  path?: never;\n  query: {\n    /**\n     * Status values that need to be considered for filter\n     */\n    status: 'available' | 'pending' | 'sold';\n  };\n  url: '/pet/findByStatus';\n};\n\nexport type FindPetsByStatusErrors = {\n  /**\n   * Invalid status value\n   */\n  400: unknown;\n  /**\n   * Unexpected error\n   */\n  default: unknown;\n};\n\nexport type FindPetsByStatusResponses = {\n  /**\n   * successful operation\n   */\n  200: Array<Pet>;\n};\n\nexport type FindPetsByStatusResponse = FindPetsByStatusResponses[keyof FindPetsByStatusResponses];\n\nexport type FindPetsByTagsData = {\n  body?: never;\n  path?: never;\n  query: {\n    /**\n     * Tags to filter by\n     */\n    tags: Array<string>;\n  };\n  url: '/pet/findByTags';\n};\n\nexport type FindPetsByTagsErrors = {\n  /**\n   * Invalid tag value\n   */\n  400: unknown;\n  /**\n   * Unexpected error\n   */\n  default: unknown;\n};\n\nexport type FindPetsByTagsResponses = {\n  /**\n   * successful operation\n   */\n  200: Array<Pet>;\n};\n\nexport type FindPetsByTagsResponse = FindPetsByTagsResponses[keyof FindPetsByTagsResponses];\n\nexport type DeletePetData = {\n  body?: never;\n  headers?: {\n    api_key?: string;\n  };\n  path: {\n    /**\n     * Pet id to delete\n     */\n    petId: number;\n  };\n  query?: never;\n  url: '/pet/{petId}';\n};\n\nexport type DeletePetErrors = {\n  /**\n   * Invalid pet value\n   */\n  400: unknown;\n  /**\n   * Unexpected error\n   */\n  default: unknown;\n};\n\nexport type DeletePetResponses = {\n  /**\n   * Pet deleted\n   */\n  200: unknown;\n};\n\nexport type GetPetByIdData = {\n  body?: never;\n  path: {\n    /**\n     * ID of pet to return\n     */\n    petId: number;\n  };\n  query?: never;\n  url: '/pet/{petId}';\n};\n\nexport type GetPetByIdErrors = {\n  /**\n   * Invalid ID supplied\n   */\n  400: unknown;\n  /**\n   * Pet not found\n   */\n  404: unknown;\n  /**\n   * Unexpected error\n   */\n  default: unknown;\n};\n\nexport type GetPetByIdResponses = {\n  /**\n   * successful operation\n   */\n  200: Pet;\n};\n\nexport type GetPetByIdResponse = GetPetByIdResponses[keyof GetPetByIdResponses];\n\nexport type UpdatePetWithFormData = {\n  body?: never;\n  path: {\n    /**\n     * ID of pet that needs to be updated\n     */\n    petId: number;\n  };\n  query?: {\n    /**\n     * Name of pet that needs to be updated\n     */\n    name?: string;\n    /**\n     * Status of pet that needs to be updated\n     */\n    status?: string;\n  };\n  url: '/pet/{petId}';\n};\n\nexport type UpdatePetWithFormErrors = {\n  /**\n   * Invalid input\n   */\n  400: unknown;\n  /**\n   * Unexpected error\n   */\n  default: unknown;\n};\n\nexport type UpdatePetWithFormResponses = {\n  /**\n   * successful operation\n   */\n  200: Pet;\n};\n\nexport type UpdatePetWithFormResponse =\n  UpdatePetWithFormResponses[keyof UpdatePetWithFormResponses];\n\nexport type UploadFileData = {\n  body?: Blob | File;\n  path: {\n    /**\n     * ID of pet to update\n     */\n    petId: number;\n  };\n  query?: {\n    /**\n     * Additional Metadata\n     */\n    additionalMetadata?: string;\n  };\n  url: '/pet/{petId}/uploadImage';\n};\n\nexport type UploadFileErrors = {\n  /**\n   * No file uploaded\n   */\n  400: unknown;\n  /**\n   * Pet not found\n   */\n  404: unknown;\n  /**\n   * Unexpected error\n   */\n  default: unknown;\n};\n\nexport type UploadFileResponses = {\n  /**\n   * successful operation\n   */\n  200: ApiResponse;\n};\n\nexport type UploadFileResponse = UploadFileResponses[keyof UploadFileResponses];\n\nexport type GetInventoryData = {\n  body?: never;\n  path?: never;\n  query?: never;\n  url: '/store/inventory';\n};\n\nexport type GetInventoryErrors = {\n  /**\n   * Unexpected error\n   */\n  default: unknown;\n};\n\nexport type GetInventoryResponses = {\n  /**\n   * successful operation\n   */\n  200: {\n    [key: string]: number;\n  };\n};\n\nexport type GetInventoryResponse = GetInventoryResponses[keyof GetInventoryResponses];\n\nexport type PlaceOrderData = {\n  body?: Order;\n  path?: never;\n  query?: never;\n  url: '/store/order';\n};\n\nexport type PlaceOrderErrors = {\n  /**\n   * Invalid input\n   */\n  400: unknown;\n  /**\n   * Validation exception\n   */\n  422: unknown;\n  /**\n   * Unexpected error\n   */\n  default: unknown;\n};\n\nexport type PlaceOrderResponses = {\n  /**\n   * successful operation\n   */\n  200: Order;\n};\n\nexport type PlaceOrderResponse = PlaceOrderResponses[keyof PlaceOrderResponses];\n\nexport type DeleteOrderData = {\n  body?: never;\n  path: {\n    /**\n     * ID of the order that needs to be deleted\n     */\n    orderId: number;\n  };\n  query?: never;\n  url: '/store/order/{orderId}';\n};\n\nexport type DeleteOrderErrors = {\n  /**\n   * Invalid ID supplied\n   */\n  400: unknown;\n  /**\n   * Order not found\n   */\n  404: unknown;\n  /**\n   * Unexpected error\n   */\n  default: unknown;\n};\n\nexport type DeleteOrderResponses = {\n  /**\n   * order deleted\n   */\n  200: unknown;\n};\n\nexport type GetOrderByIdData = {\n  body?: never;\n  path: {\n    /**\n     * ID of order that needs to be fetched\n     */\n    orderId: number;\n  };\n  query?: never;\n  url: '/store/order/{orderId}';\n};\n\nexport type GetOrderByIdErrors = {\n  /**\n   * Invalid ID supplied\n   */\n  400: unknown;\n  /**\n   * Order not found\n   */\n  404: unknown;\n  /**\n   * Unexpected error\n   */\n  default: unknown;\n};\n\nexport type GetOrderByIdResponses = {\n  /**\n   * successful operation\n   */\n  200: Order;\n};\n\nexport type GetOrderByIdResponse = GetOrderByIdResponses[keyof GetOrderByIdResponses];\n\nexport type CreateUserData = {\n  /**\n   * Created user object\n   */\n  body?: User;\n  path?: never;\n  query?: never;\n  url: '/user';\n};\n\nexport type CreateUserErrors = {\n  /**\n   * Unexpected error\n   */\n  default: unknown;\n};\n\nexport type CreateUserResponses = {\n  /**\n   * successful operation\n   */\n  200: User;\n};\n\nexport type CreateUserResponse = CreateUserResponses[keyof CreateUserResponses];\n\nexport type CreateUsersWithListInputData = {\n  body?: Array<User>;\n  path?: never;\n  query?: never;\n  url: '/user/createWithList';\n};\n\nexport type CreateUsersWithListInputErrors = {\n  /**\n   * Unexpected error\n   */\n  default: unknown;\n};\n\nexport type CreateUsersWithListInputResponses = {\n  /**\n   * Successful operation\n   */\n  200: User;\n};\n\nexport type CreateUsersWithListInputResponse =\n  CreateUsersWithListInputResponses[keyof CreateUsersWithListInputResponses];\n\nexport type LoginUserData = {\n  body?: never;\n  path?: never;\n  query?: {\n    /**\n     * The password for login in clear text\n     */\n    password?: string;\n    /**\n     * The user name for login\n     */\n    username?: string;\n  };\n  url: '/user/login';\n};\n\nexport type LoginUserErrors = {\n  /**\n   * Invalid username/password supplied\n   */\n  400: unknown;\n  /**\n   * Unexpected error\n   */\n  default: unknown;\n};\n\nexport type LoginUserResponses = {\n  /**\n   * successful operation\n   */\n  200: string;\n};\n\nexport type LoginUserResponse = LoginUserResponses[keyof LoginUserResponses];\n\nexport type LogoutUserData = {\n  body?: never;\n  path?: never;\n  query?: never;\n  url: '/user/logout';\n};\n\nexport type LogoutUserErrors = {\n  /**\n   * Unexpected error\n   */\n  default: unknown;\n};\n\nexport type LogoutUserResponses = {\n  /**\n   * successful operation\n   */\n  200: unknown;\n};\n\nexport type DeleteUserData = {\n  body?: never;\n  path: {\n    /**\n     * The name that needs to be deleted\n     */\n    username: string;\n  };\n  query?: never;\n  url: '/user/{username}';\n};\n\nexport type DeleteUserErrors = {\n  /**\n   * Invalid username supplied\n   */\n  400: unknown;\n  /**\n   * User not found\n   */\n  404: unknown;\n  /**\n   * Unexpected error\n   */\n  default: unknown;\n};\n\nexport type DeleteUserResponses = {\n  /**\n   * User deleted\n   */\n  200: unknown;\n};\n\nexport type GetUserByNameData = {\n  body?: never;\n  path: {\n    /**\n     * The name that needs to be fetched. Use user1 for testing\n     */\n    username: string;\n  };\n  query?: never;\n  url: '/user/{username}';\n};\n\nexport type GetUserByNameErrors = {\n  /**\n   * Invalid username supplied\n   */\n  400: unknown;\n  /**\n   * User not found\n   */\n  404: unknown;\n  /**\n   * Unexpected error\n   */\n  default: unknown;\n};\n\nexport type GetUserByNameResponses = {\n  /**\n   * successful operation\n   */\n  200: User;\n};\n\nexport type GetUserByNameResponse = GetUserByNameResponses[keyof GetUserByNameResponses];\n\nexport type UpdateUserData = {\n  /**\n   * Update an existent user in the store\n   */\n  body?: User;\n  path: {\n    /**\n     * name that need to be deleted\n     */\n    username: string;\n  };\n  query?: never;\n  url: '/user/{username}';\n};\n\nexport type UpdateUserErrors = {\n  /**\n   * bad request\n   */\n  400: unknown;\n  /**\n   * user not found\n   */\n  404: unknown;\n  /**\n   * Unexpected error\n   */\n  default: unknown;\n};\n\nexport type UpdateUserResponses = {\n  /**\n   * successful operation\n   */\n  200: unknown;\n};\n"
  },
  {
    "path": "examples/openapi-ts-tanstack-svelte-query/src/routes/+layout.svelte",
    "content": "<script>\n\timport Header from './Header.svelte';\n\timport '../app.css';\n\timport { QueryClientProvider, QueryClient } from '@tanstack/svelte-query';\n\timport { client } from '../client/client.gen';\n\timport { browser } from '$app/environment';\n\n\t// configure internal service client\n\tclient.setConfig({\n\t\t// set default base url for requests\n\t\tbaseUrl: 'https://petstore3.swagger.io/api/v3',\n\t\t// set default headers for requests\n\t\theaders: {\n\t\t\tAuthorization: 'Bearer <token_from_service_client>'\n\t\t}\n\t});\n\n\tconst queryClient = new QueryClient({\n\t\tdefaultOptions: {\n\t\t\tqueries: {\n\t\t\t\tenabled: browser,\n\t\t\t\tstaleTime: 60000\n\t\t\t}\n\t\t}\n\t});\n</script>\n\n<div class=\"app\">\n\t<Header />\n\n\t<main>\n\t\t<QueryClientProvider client={queryClient}>\n\t\t\t<slot />\n\t\t</QueryClientProvider>\n\t</main>\n\n\t<footer>\n\t\t<p>visit <a href=\"https://kit.svelte.dev\">kit.svelte.dev</a> to learn SvelteKit</p>\n\t</footer>\n</div>\n\n<style>\n\t.app {\n\t\tdisplay: flex;\n\t\tflex-direction: column;\n\t\tmin-height: 100vh;\n\t}\n\n\tmain {\n\t\tflex: 1;\n\t\tdisplay: flex;\n\t\tflex-direction: column;\n\t\tpadding: 1rem;\n\t\twidth: 100%;\n\t\tmax-width: 64rem;\n\t\tmargin: 0 auto;\n\t\tbox-sizing: border-box;\n\t}\n\n\tfooter {\n\t\tdisplay: flex;\n\t\tflex-direction: column;\n\t\tjustify-content: center;\n\t\talign-items: center;\n\t\tpadding: 12px;\n\t}\n\n\tfooter a {\n\t\tfont-weight: bold;\n\t}\n\n\t@media (min-width: 480px) {\n\t\tfooter {\n\t\t\tpadding: 12px 0;\n\t\t}\n\t}\n</style>\n"
  },
  {
    "path": "examples/openapi-ts-tanstack-svelte-query/src/routes/+page.svelte",
    "content": "<script>\n\timport Counter from './Counter.svelte';\n\timport welcome from '$lib/images/svelte-welcome.webp';\n\timport welcome_fallback from '$lib/images/svelte-welcome.png';\n\timport { getPetByIdOptions, addPetMutation } from '../client/@tanstack/svelte-query.gen';\n\timport { createQuery, createMutation } from '@tanstack/svelte-query';\n\n\tconst query = createQuery({\n\t\t...getPetByIdOptions({\n\t\t\tpath: {\n\t\t\t\tpetId: 3\n\t\t\t}\n\t\t})\n\t});\n\n\tconst mutation = createMutation({\n\t\t...addPetMutation()\n\t});\n</script>\n\n<svelte:head>\n\t<title>Home</title>\n\t<meta name=\"description\" content=\"Svelte demo app\" />\n</svelte:head>\n\n<section>\n\t<h1>\n\t\t<span class=\"welcome\">\n\t\t\t<picture>\n\t\t\t\t<source srcset={welcome} type=\"image/webp\" />\n\t\t\t\t<img src={welcome_fallback} alt=\"Welcome\" />\n\t\t\t</picture>\n\t\t</span>\n\n\t\tto your new<br />SvelteKit app\n\t</h1>\n\n\t{#if $query.isPending}\n\t\tLoading...\n\t{/if}\n\t{#if $query.error}\n\t\tError...\n\t{/if}\n\t{#if $query.isSuccess}\n\t\t{$query.data.name}\n\t{/if}\n\t<button\n\t\ton:click={() => {\n\t\t\t$mutation.mutate({\n\t\t\t\tbody: {\n\t\t\t\t\tid: 1,\n\t\t\t\t\tname: 'Foo',\n\t\t\t\t\tphotoUrls: []\n\t\t\t\t}\n\t\t\t});\n\t\t}}\n\t\ttype=\"button\"\n\t>\n\t\tMutate\n\t</button>\n\n\t<h2>\n\t\ttry editing <strong>src/routes/+page.svelte</strong>\n\t</h2>\n\n\t<Counter />\n</section>\n\n<style>\n\tsection {\n\t\tdisplay: flex;\n\t\tflex-direction: column;\n\t\tjustify-content: center;\n\t\talign-items: center;\n\t\tflex: 0.6;\n\t}\n\n\th1 {\n\t\twidth: 100%;\n\t}\n\n\t.welcome {\n\t\tdisplay: block;\n\t\tposition: relative;\n\t\twidth: 100%;\n\t\theight: 0;\n\t\tpadding: 0 0 calc(100% * 495 / 2048) 0;\n\t}\n\n\t.welcome img {\n\t\tposition: absolute;\n\t\twidth: 100%;\n\t\theight: 100%;\n\t\ttop: 0;\n\t\tdisplay: block;\n\t}\n</style>\n"
  },
  {
    "path": "examples/openapi-ts-tanstack-svelte-query/src/routes/+page.ts",
    "content": "// since there's no dynamic data here, we can prerender\n// it so that it gets served as a static asset in production\nexport const prerender = true;\n"
  },
  {
    "path": "examples/openapi-ts-tanstack-svelte-query/src/routes/Counter.svelte",
    "content": "<script lang=\"ts\">\n\timport { spring } from 'svelte/motion';\n\n\tlet count = 0;\n\n\tconst displayed_count = spring();\n\t$: displayed_count.set(count);\n\t$: offset = modulo($displayed_count, 1);\n\n\tfunction modulo(n: number, m: number) {\n\t\t// handle negative numbers\n\t\treturn ((n % m) + m) % m;\n\t}\n</script>\n\n<div class=\"counter\">\n\t<button on:click={() => (count -= 1)} aria-label=\"Decrease the counter by one\">\n\t\t<svg aria-hidden=\"true\" viewBox=\"0 0 1 1\">\n\t\t\t<path d=\"M0,0.5 L1,0.5\" />\n\t\t</svg>\n\t</button>\n\n\t<div class=\"counter-viewport\">\n\t\t<div class=\"counter-digits\" style=\"transform: translate(0, {100 * offset}%)\">\n\t\t\t<strong class=\"hidden\" aria-hidden=\"true\">{Math.floor($displayed_count + 1)}</strong>\n\t\t\t<strong>{Math.floor($displayed_count)}</strong>\n\t\t</div>\n\t</div>\n\n\t<button on:click={() => (count += 1)} aria-label=\"Increase the counter by one\">\n\t\t<svg aria-hidden=\"true\" viewBox=\"0 0 1 1\">\n\t\t\t<path d=\"M0,0.5 L1,0.5 M0.5,0 L0.5,1\" />\n\t\t</svg>\n\t</button>\n</div>\n\n<style>\n\t.counter {\n\t\tdisplay: flex;\n\t\tborder-top: 1px solid rgba(0, 0, 0, 0.1);\n\t\tborder-bottom: 1px solid rgba(0, 0, 0, 0.1);\n\t\tmargin: 1rem 0;\n\t}\n\n\t.counter button {\n\t\twidth: 2em;\n\t\tpadding: 0;\n\t\tdisplay: flex;\n\t\talign-items: center;\n\t\tjustify-content: center;\n\t\tborder: 0;\n\t\tbackground-color: transparent;\n\t\ttouch-action: manipulation;\n\t\tfont-size: 2rem;\n\t}\n\n\t.counter button:hover {\n\t\tbackground-color: var(--color-bg-1);\n\t}\n\n\tsvg {\n\t\twidth: 25%;\n\t\theight: 25%;\n\t}\n\n\tpath {\n\t\tvector-effect: non-scaling-stroke;\n\t\tstroke-width: 2px;\n\t\tstroke: #444;\n\t}\n\n\t.counter-viewport {\n\t\twidth: 8em;\n\t\theight: 4em;\n\t\toverflow: hidden;\n\t\ttext-align: center;\n\t\tposition: relative;\n\t}\n\n\t.counter-viewport strong {\n\t\tposition: absolute;\n\t\tdisplay: flex;\n\t\twidth: 100%;\n\t\theight: 100%;\n\t\tfont-weight: 400;\n\t\tcolor: var(--color-theme-1);\n\t\tfont-size: 4rem;\n\t\talign-items: center;\n\t\tjustify-content: center;\n\t}\n\n\t.counter-digits {\n\t\tposition: absolute;\n\t\twidth: 100%;\n\t\theight: 100%;\n\t}\n\n\t.hidden {\n\t\ttop: -100%;\n\t\tuser-select: none;\n\t}\n</style>\n"
  },
  {
    "path": "examples/openapi-ts-tanstack-svelte-query/src/routes/Header.svelte",
    "content": "<script>\n\timport { page } from '$app/stores';\n\timport logo from '$lib/images/svelte-logo.svg';\n\timport github from '$lib/images/github.svg';\n</script>\n\n<header>\n\t<div class=\"corner\">\n\t\t<a href=\"https://kit.svelte.dev\">\n\t\t\t<img src={logo} alt=\"SvelteKit\" />\n\t\t</a>\n\t</div>\n\n\t<nav>\n\t\t<svg viewBox=\"0 0 2 3\" aria-hidden=\"true\">\n\t\t\t<path d=\"M0,0 L1,2 C1.5,3 1.5,3 2,3 L2,0 Z\" />\n\t\t</svg>\n\t\t<ul>\n\t\t\t<li aria-current={$page.url.pathname === '/' ? 'page' : undefined}>\n\t\t\t\t<a href=\"/\">Home</a>\n\t\t\t</li>\n\t\t\t<li aria-current={$page.url.pathname === '/about' ? 'page' : undefined}>\n\t\t\t\t<a href=\"/about\">About</a>\n\t\t\t</li>\n\t\t\t<li aria-current={$page.url.pathname.startsWith('/sverdle') ? 'page' : undefined}>\n\t\t\t\t<a href=\"/sverdle\">Sverdle</a>\n\t\t\t</li>\n\t\t</ul>\n\t\t<svg viewBox=\"0 0 2 3\" aria-hidden=\"true\">\n\t\t\t<path d=\"M0,0 L0,3 C0.5,3 0.5,3 1,2 L2,0 Z\" />\n\t\t</svg>\n\t</nav>\n\n\t<div class=\"corner\">\n\t\t<a href=\"https://github.com/sveltejs/kit\">\n\t\t\t<img src={github} alt=\"GitHub\" />\n\t\t</a>\n\t</div>\n</header>\n\n<style>\n\theader {\n\t\tdisplay: flex;\n\t\tjustify-content: space-between;\n\t}\n\n\t.corner {\n\t\twidth: 3em;\n\t\theight: 3em;\n\t}\n\n\t.corner a {\n\t\tdisplay: flex;\n\t\talign-items: center;\n\t\tjustify-content: center;\n\t\twidth: 100%;\n\t\theight: 100%;\n\t}\n\n\t.corner img {\n\t\twidth: 2em;\n\t\theight: 2em;\n\t\tobject-fit: contain;\n\t}\n\n\tnav {\n\t\tdisplay: flex;\n\t\tjustify-content: center;\n\t\t--background: rgba(255, 255, 255, 0.7);\n\t}\n\n\tsvg {\n\t\twidth: 2em;\n\t\theight: 3em;\n\t\tdisplay: block;\n\t}\n\n\tpath {\n\t\tfill: var(--background);\n\t}\n\n\tul {\n\t\tposition: relative;\n\t\tpadding: 0;\n\t\tmargin: 0;\n\t\theight: 3em;\n\t\tdisplay: flex;\n\t\tjustify-content: center;\n\t\talign-items: center;\n\t\tlist-style: none;\n\t\tbackground: var(--background);\n\t\tbackground-size: contain;\n\t}\n\n\tli {\n\t\tposition: relative;\n\t\theight: 100%;\n\t}\n\n\tli[aria-current='page']::before {\n\t\t--size: 6px;\n\t\tcontent: '';\n\t\twidth: 0;\n\t\theight: 0;\n\t\tposition: absolute;\n\t\ttop: 0;\n\t\tleft: calc(50% - var(--size));\n\t\tborder: var(--size) solid transparent;\n\t\tborder-top: var(--size) solid var(--color-theme-1);\n\t}\n\n\tnav a {\n\t\tdisplay: flex;\n\t\theight: 100%;\n\t\talign-items: center;\n\t\tpadding: 0 0.5rem;\n\t\tcolor: var(--color-text);\n\t\tfont-weight: 700;\n\t\tfont-size: 0.8rem;\n\t\ttext-transform: uppercase;\n\t\tletter-spacing: 0.1em;\n\t\ttext-decoration: none;\n\t\ttransition: color 0.2s linear;\n\t}\n\n\ta:hover {\n\t\tcolor: var(--color-theme-1);\n\t}\n</style>\n"
  },
  {
    "path": "examples/openapi-ts-tanstack-svelte-query/src/routes/about/+page.svelte",
    "content": "<svelte:head>\n\t<title>About</title>\n\t<meta name=\"description\" content=\"About this app\" />\n</svelte:head>\n\n<div class=\"text-column\">\n\t<h1>About this app</h1>\n\n\t<p>\n\t\tThis is a <a href=\"https://kit.svelte.dev\">SvelteKit</a> app. You can make your own by typing the\n\t\tfollowing into your command line and following the prompts:\n\t</p>\n\n\t<pre>npm create svelte@latest</pre>\n\n\t<p>\n\t\tThe page you're looking at is purely static HTML, with no client-side interactivity needed.\n\t\tBecause of that, we don't need to load any JavaScript. Try viewing the page's source, or opening\n\t\tthe devtools network panel and reloading.\n\t</p>\n\n\t<p>\n\t\tThe <a href=\"/sverdle\">Sverdle</a> page illustrates SvelteKit's data loading and form handling. Try\n\t\tusing it with JavaScript disabled!\n\t</p>\n</div>\n"
  },
  {
    "path": "examples/openapi-ts-tanstack-svelte-query/src/routes/about/+page.ts",
    "content": "import { dev } from '$app/environment';\n\n// we don't need any JS on this page, though we'll load\n// it in dev so that we get hot module replacement\nexport const csr = dev;\n\n// since there's no dynamic data here, we can prerender\n// it so that it gets served as a static asset in production\nexport const prerender = true;\n"
  },
  {
    "path": "examples/openapi-ts-tanstack-svelte-query/src/routes/sverdle/+page.server.ts",
    "content": "import { fail } from '@sveltejs/kit';\n\nimport type { Actions, PageServerLoad } from './$types';\nimport { Game } from './game';\n\nexport const load = (({ cookies }) => {\n  const game = new Game(cookies.get('sverdle'));\n\n  return {\n    /**\n     * The correct answer, revealed if the game is over\n     */\n    answer: game.answers.length >= 6 ? game.answer : null,\n\n    /**\n     * An array of strings like '__x_c' corresponding to the guesses, where 'x' means\n     * an exact match, and 'c' means a close match (right letter, wrong place)\n     */\n    answers: game.answers,\n\n    /**\n     * The player's guessed words so far\n     */\n    guesses: game.guesses,\n  };\n}) satisfies PageServerLoad;\n\nexport const actions = {\n  /**\n   * Modify game state in reaction to a guessed word. This logic always runs on\n   * the server, so that people can't cheat by peeking at the JavaScript\n   */\n  enter: async ({ cookies, request }) => {\n    const game = new Game(cookies.get('sverdle'));\n\n    const data = await request.formData();\n    const guess = data.getAll('guess') as string[];\n\n    if (!game.enter(guess)) {\n      return fail(400, { badGuess: true });\n    }\n\n    cookies.set('sverdle', game.toString(), { path: '/' });\n  },\n\n  restart: async ({ cookies }) => {\n    cookies.delete('sverdle', { path: '/' });\n  },\n\n  /**\n   * Modify game state in reaction to a keypress. If client-side JavaScript\n   * is available, this will happen in the browser instead of here\n   */\n  update: async ({ cookies, request }) => {\n    const game = new Game(cookies.get('sverdle'));\n\n    const data = await request.formData();\n    const key = data.get('key');\n\n    const i = game.answers.length;\n\n    if (key === 'backspace') {\n      game.guesses[i] = game.guesses[i].slice(0, -1);\n    } else {\n      game.guesses[i] += key;\n    }\n\n    cookies.set('sverdle', game.toString(), { path: '/' });\n  },\n} satisfies Actions;\n"
  },
  {
    "path": "examples/openapi-ts-tanstack-svelte-query/src/routes/sverdle/+page.svelte",
    "content": "<script lang=\"ts\">\n\timport { confetti } from '@neoconfetti/svelte';\n\timport { enhance } from '$app/forms';\n\timport type { PageData, ActionData } from './$types';\n\timport { reduced_motion } from './reduced-motion';\n\n\texport let data: PageData;\n\n\texport let form: ActionData;\n\n\t/** Whether or not the user has won */\n\t$: won = data.answers.at(-1) === 'xxxxx';\n\n\t/** The index of the current guess */\n\t$: i = won ? -1 : data.answers.length;\n\n\t/** The current guess */\n\t$: currentGuess = data.guesses[i] || '';\n\n\t/** Whether the current guess can be submitted */\n\t$: submittable = currentGuess.length === 5;\n\n\t/**\n\t * A map of classnames for all letters that have been guessed,\n\t * used for styling the keyboard\n\t */\n\tlet classnames: Record<string, 'exact' | 'close' | 'missing'>;\n\n\t/**\n\t * A map of descriptions for all letters that have been guessed,\n\t * used for adding text for assistive technology (e.g. screen readers)\n\t */\n\tlet description: Record<string, string>;\n\n\t$: {\n\t\tclassnames = {};\n\t\tdescription = {};\n\n\t\tdata.answers.forEach((answer, i) => {\n\t\t\tconst guess = data.guesses[i];\n\n\t\t\tfor (let i = 0; i < 5; i += 1) {\n\t\t\t\tconst letter = guess[i];\n\n\t\t\t\tif (answer[i] === 'x') {\n\t\t\t\t\tclassnames[letter] = 'exact';\n\t\t\t\t\tdescription[letter] = 'correct';\n\t\t\t\t} else if (!classnames[letter]) {\n\t\t\t\t\tclassnames[letter] = answer[i] === 'c' ? 'close' : 'missing';\n\t\t\t\t\tdescription[letter] = answer[i] === 'c' ? 'present' : 'absent';\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t}\n\n\t/**\n\t * Modify the game state without making a trip to the server,\n\t * if client-side JavaScript is enabled\n\t */\n\tfunction update(event: MouseEvent) {\n\t\tconst key = (event.target as HTMLButtonElement).getAttribute('data-key');\n\n\t\tif (key === 'backspace') {\n\t\t\tcurrentGuess = currentGuess.slice(0, -1);\n\t\t\tif (form?.badGuess) form.badGuess = false;\n\t\t} else if (currentGuess.length < 5) {\n\t\t\tcurrentGuess += key;\n\t\t}\n\t}\n\n\t/**\n\t * Trigger form logic in response to a keydown event, so that\n\t * desktop users can use the keyboard to play the game\n\t */\n\tfunction keydown(event: KeyboardEvent) {\n\t\tif (event.metaKey) return;\n\n\t\tif (event.key === 'Enter' && !submittable) return;\n\n\t\tdocument\n\t\t\t.querySelector(`[data-key=\"${event.key}\" i]`)\n\t\t\t?.dispatchEvent(new MouseEvent('click', { cancelable: true }));\n\t}\n</script>\n\n<svelte:window on:keydown={keydown} />\n\n<svelte:head>\n\t<title>Sverdle</title>\n\t<meta name=\"description\" content=\"A Wordle clone written in SvelteKit\" />\n</svelte:head>\n\n<h1 class=\"visually-hidden\">Sverdle</h1>\n\n<form\n\tmethod=\"POST\"\n\taction=\"?/enter\"\n\tuse:enhance={() => {\n\t\t// prevent default callback from resetting the form\n\t\treturn ({ update }) => {\n\t\t\tupdate({ reset: false });\n\t\t};\n\t}}\n>\n\t<a class=\"how-to-play\" href=\"/sverdle/how-to-play\">How to play</a>\n\n\t<div class=\"grid\" class:playing={!won} class:bad-guess={form?.badGuess}>\n\t\t{#each Array.from(Array(6).keys()) as row (row)}\n\t\t\t{@const current = row === i}\n\t\t\t<h2 class=\"visually-hidden\">Row {row + 1}</h2>\n\t\t\t<div class=\"row\" class:current>\n\t\t\t\t{#each Array.from(Array(5).keys()) as column (column)}\n\t\t\t\t\t{@const guess = current ? currentGuess : data.guesses[row]}\n\t\t\t\t\t{@const answer = data.answers[row]?.[column]}\n\t\t\t\t\t{@const value = guess?.[column] ?? ''}\n\t\t\t\t\t{@const selected = current && column === guess.length}\n\t\t\t\t\t{@const exact = answer === 'x'}\n\t\t\t\t\t{@const close = answer === 'c'}\n\t\t\t\t\t{@const missing = answer === '_'}\n\t\t\t\t\t<div class=\"letter\" class:exact class:close class:missing class:selected>\n\t\t\t\t\t\t{value}\n\t\t\t\t\t\t<span class=\"visually-hidden\">\n\t\t\t\t\t\t\t{#if exact}\n\t\t\t\t\t\t\t\t(correct)\n\t\t\t\t\t\t\t{:else if close}\n\t\t\t\t\t\t\t\t(present)\n\t\t\t\t\t\t\t{:else if missing}\n\t\t\t\t\t\t\t\t(absent)\n\t\t\t\t\t\t\t{:else}\n\t\t\t\t\t\t\t\tempty\n\t\t\t\t\t\t\t{/if}\n\t\t\t\t\t\t</span>\n\t\t\t\t\t\t<input name=\"guess\" disabled={!current} type=\"hidden\" {value} />\n\t\t\t\t\t</div>\n\t\t\t\t{/each}\n\t\t\t</div>\n\t\t{/each}\n\t</div>\n\n\t<div class=\"controls\">\n\t\t{#if won || data.answers.length >= 6}\n\t\t\t{#if !won && data.answer}\n\t\t\t\t<p>the answer was \"{data.answer}\"</p>\n\t\t\t{/if}\n\t\t\t<button data-key=\"enter\" class=\"restart selected\" formaction=\"?/restart\">\n\t\t\t\t{won ? 'you won :)' : `game over :(`} play again?\n\t\t\t</button>\n\t\t{:else}\n\t\t\t<div class=\"keyboard\">\n\t\t\t\t<button data-key=\"enter\" class:selected={submittable} disabled={!submittable}>enter</button>\n\n\t\t\t\t<button\n\t\t\t\t\ton:click|preventDefault={update}\n\t\t\t\t\tdata-key=\"backspace\"\n\t\t\t\t\tformaction=\"?/update\"\n\t\t\t\t\tname=\"key\"\n\t\t\t\t\tvalue=\"backspace\"\n\t\t\t\t>\n\t\t\t\t\tback\n\t\t\t\t</button>\n\n\t\t\t\t{#each ['qwertyuiop', 'asdfghjkl', 'zxcvbnm'] as row}\n\t\t\t\t\t<div class=\"row\">\n\t\t\t\t\t\t{#each row as letter}\n\t\t\t\t\t\t\t<button\n\t\t\t\t\t\t\t\ton:click|preventDefault={update}\n\t\t\t\t\t\t\t\tdata-key={letter}\n\t\t\t\t\t\t\t\tclass={classnames[letter]}\n\t\t\t\t\t\t\t\tdisabled={submittable}\n\t\t\t\t\t\t\t\tformaction=\"?/update\"\n\t\t\t\t\t\t\t\tname=\"key\"\n\t\t\t\t\t\t\t\tvalue={letter}\n\t\t\t\t\t\t\t\taria-label=\"{letter} {description[letter] || ''}\"\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t{letter}\n\t\t\t\t\t\t\t</button>\n\t\t\t\t\t\t{/each}\n\t\t\t\t\t</div>\n\t\t\t\t{/each}\n\t\t\t</div>\n\t\t{/if}\n\t</div>\n</form>\n\n{#if won}\n\t<div\n\t\tstyle=\"position: absolute; left: 50%; top: 30%\"\n\t\tuse:confetti={{\n\t\t\tparticleCount: $reduced_motion ? 0 : undefined,\n\t\t\tforce: 0.7,\n\t\t\tstageWidth: window.innerWidth,\n\t\t\tstageHeight: window.innerHeight,\n\t\t\tcolors: ['#ff3e00', '#40b3ff', '#676778']\n\t\t}}\n\t></div>\n{/if}\n\n<style>\n\tform {\n\t\twidth: 100%;\n\t\theight: 100%;\n\t\tdisplay: flex;\n\t\tflex-direction: column;\n\t\talign-items: center;\n\t\tjustify-content: center;\n\t\tgap: 1rem;\n\t\tflex: 1;\n\t}\n\n\t.how-to-play {\n\t\tcolor: var(--color-text);\n\t}\n\n\t.how-to-play::before {\n\t\tcontent: 'i';\n\t\tdisplay: inline-block;\n\t\tfont-size: 0.8em;\n\t\tfont-weight: 900;\n\t\twidth: 1em;\n\t\theight: 1em;\n\t\tpadding: 0.2em;\n\t\tline-height: 1;\n\t\tborder: 1.5px solid var(--color-text);\n\t\tborder-radius: 50%;\n\t\ttext-align: center;\n\t\tmargin: 0 0.5em 0 0;\n\t\tposition: relative;\n\t\ttop: -0.05em;\n\t}\n\n\t.grid {\n\t\t--width: min(100vw, 40vh, 380px);\n\t\tmax-width: var(--width);\n\t\talign-self: center;\n\t\tjustify-self: center;\n\t\twidth: 100%;\n\t\theight: 100%;\n\t\tdisplay: flex;\n\t\tflex-direction: column;\n\t\tjustify-content: flex-start;\n\t}\n\n\t.grid .row {\n\t\tdisplay: grid;\n\t\tgrid-template-columns: repeat(5, 1fr);\n\t\tgrid-gap: 0.2rem;\n\t\tmargin: 0 0 0.2rem 0;\n\t}\n\n\t@media (prefers-reduced-motion: no-preference) {\n\t\t.grid.bad-guess .row.current {\n\t\t\tanimation: wiggle 0.5s;\n\t\t}\n\t}\n\n\t.grid.playing .row.current {\n\t\tfilter: drop-shadow(3px 3px 10px var(--color-bg-0));\n\t}\n\n\t.letter {\n\t\taspect-ratio: 1;\n\t\twidth: 100%;\n\t\tdisplay: flex;\n\t\talign-items: center;\n\t\tjustify-content: center;\n\t\ttext-align: center;\n\t\tbox-sizing: border-box;\n\t\ttext-transform: lowercase;\n\t\tborder: none;\n\t\tfont-size: calc(0.08 * var(--width));\n\t\tborder-radius: 2px;\n\t\tbackground: white;\n\t\tmargin: 0;\n\t\tcolor: rgba(0, 0, 0, 0.7);\n\t}\n\n\t.letter.missing {\n\t\tbackground: rgba(255, 255, 255, 0.5);\n\t\tcolor: rgba(0, 0, 0, 0.5);\n\t}\n\n\t.letter.exact {\n\t\tbackground: var(--color-theme-2);\n\t\tcolor: white;\n\t}\n\n\t.letter.close {\n\t\tborder: 2px solid var(--color-theme-2);\n\t}\n\n\t.selected {\n\t\toutline: 2px solid var(--color-theme-1);\n\t}\n\n\t.controls {\n\t\ttext-align: center;\n\t\tjustify-content: center;\n\t\theight: min(18vh, 10rem);\n\t}\n\n\t.keyboard {\n\t\t--gap: 0.2rem;\n\t\tposition: relative;\n\t\tdisplay: flex;\n\t\tflex-direction: column;\n\t\tgap: var(--gap);\n\t\theight: 100%;\n\t}\n\n\t.keyboard .row {\n\t\tdisplay: flex;\n\t\tjustify-content: center;\n\t\tgap: 0.2rem;\n\t\tflex: 1;\n\t}\n\n\t.keyboard button,\n\t.keyboard button:disabled {\n\t\t--size: min(8vw, 4vh, 40px);\n\t\tbackground-color: white;\n\t\tcolor: black;\n\t\twidth: var(--size);\n\t\tborder: none;\n\t\tborder-radius: 2px;\n\t\tfont-size: calc(var(--size) * 0.5);\n\t\tmargin: 0;\n\t}\n\n\t.keyboard button.exact {\n\t\tbackground: var(--color-theme-2);\n\t\tcolor: white;\n\t}\n\n\t.keyboard button.missing {\n\t\topacity: 0.5;\n\t}\n\n\t.keyboard button.close {\n\t\tborder: 2px solid var(--color-theme-2);\n\t}\n\n\t.keyboard button:focus {\n\t\tbackground: var(--color-theme-1);\n\t\tcolor: white;\n\t\toutline: none;\n\t}\n\n\t.keyboard button[data-key='enter'],\n\t.keyboard button[data-key='backspace'] {\n\t\tposition: absolute;\n\t\tbottom: 0;\n\t\twidth: calc(1.5 * var(--size));\n\t\theight: calc(1 / 3 * (100% - 2 * var(--gap)));\n\t\ttext-transform: uppercase;\n\t\tfont-size: calc(0.3 * var(--size));\n\t\tpadding-top: calc(0.15 * var(--size));\n\t}\n\n\t.keyboard button[data-key='enter'] {\n\t\tright: calc(50% + 3.5 * var(--size) + 0.8rem);\n\t}\n\n\t.keyboard button[data-key='backspace'] {\n\t\tleft: calc(50% + 3.5 * var(--size) + 0.8rem);\n\t}\n\n\t.keyboard button[data-key='enter']:disabled {\n\t\topacity: 0.5;\n\t}\n\n\t.restart {\n\t\twidth: 100%;\n\t\tpadding: 1rem;\n\t\tbackground: rgba(255, 255, 255, 0.5);\n\t\tborder-radius: 2px;\n\t\tborder: none;\n\t}\n\n\t.restart:focus,\n\t.restart:hover {\n\t\tbackground: var(--color-theme-1);\n\t\tcolor: white;\n\t\toutline: none;\n\t}\n\n\t@keyframes wiggle {\n\t\t0% {\n\t\t\ttransform: translateX(0);\n\t\t}\n\t\t10% {\n\t\t\ttransform: translateX(-2px);\n\t\t}\n\t\t30% {\n\t\t\ttransform: translateX(4px);\n\t\t}\n\t\t50% {\n\t\t\ttransform: translateX(-6px);\n\t\t}\n\t\t70% {\n\t\t\ttransform: translateX(+4px);\n\t\t}\n\t\t90% {\n\t\t\ttransform: translateX(-2px);\n\t\t}\n\t\t100% {\n\t\t\ttransform: translateX(0);\n\t\t}\n\t}\n</style>\n"
  },
  {
    "path": "examples/openapi-ts-tanstack-svelte-query/src/routes/sverdle/game.test.ts",
    "content": "import { Game } from './game';\n\ndescribe('game test', () => {\n  it('returns true when a valid word is entered', () => {\n    const game = new Game();\n    expect(game.enter('zorro'.split(''))).toBe(true);\n  });\n});\n"
  },
  {
    "path": "examples/openapi-ts-tanstack-svelte-query/src/routes/sverdle/game.ts",
    "content": "import { allowed, words } from './words.server';\n\nexport class Game {\n  index: number;\n  guesses: string[];\n  answers: string[];\n  answer: string;\n\n  /**\n   * Create a game object from the player's cookie, or initialise a new game\n   */\n  constructor(serialized: string | undefined = undefined) {\n    if (serialized) {\n      const [index, guesses, answers] = serialized.split('-');\n\n      this.index = +index;\n      this.guesses = guesses ? guesses.split(' ') : [];\n      this.answers = answers ? answers.split(' ') : [];\n    } else {\n      this.index = Math.floor(Math.random() * words.length);\n      this.guesses = ['', '', '', '', '', ''];\n      this.answers = [];\n    }\n\n    this.answer = words[this.index];\n  }\n\n  /**\n   * Update game state based on a guess of a five-letter word. Returns\n   * true if the guess was valid, false otherwise\n   */\n  enter(letters: string[]) {\n    const word = letters.join('');\n    const valid = allowed.has(word);\n\n    if (!valid) return false;\n\n    this.guesses[this.answers.length] = word;\n\n    const available = Array.from(this.answer);\n    const answer = Array(5).fill('_');\n\n    // first, find exact matches\n    for (let i = 0; i < 5; i += 1) {\n      if (letters[i] === available[i]) {\n        answer[i] = 'x';\n        available[i] = ' ';\n      }\n    }\n\n    // then find close matches (this has to happen\n    // in a second step, otherwise an early close\n    // match can prevent a later exact match)\n    for (let i = 0; i < 5; i += 1) {\n      if (answer[i] === '_') {\n        const index = available.indexOf(letters[i]);\n        if (index !== -1) {\n          answer[i] = 'c';\n          available[index] = ' ';\n        }\n      }\n    }\n\n    this.answers.push(answer.join(''));\n\n    return true;\n  }\n\n  /**\n   * Serialize game state so it can be set as a cookie\n   */\n  toString() {\n    return `${this.index}-${this.guesses.join(' ')}-${this.answers.join(' ')}`;\n  }\n}\n"
  },
  {
    "path": "examples/openapi-ts-tanstack-svelte-query/src/routes/sverdle/how-to-play/+page.svelte",
    "content": "<svelte:head>\n\t<title>How to play Sverdle</title>\n\t<meta name=\"description\" content=\"How to play Sverdle\" />\n</svelte:head>\n\n<div class=\"text-column\">\n\t<h1>How to play Sverdle</h1>\n\n\t<p>\n\t\tSverdle is a clone of <a href=\"https://www.nytimes.com/games/wordle/index.html\">Wordle</a>, the\n\t\tword guessing game. To play, enter a five-letter English word. For example:\n\t</p>\n\n\t<div class=\"example\">\n\t\t<span class=\"close\">r</span>\n\t\t<span class=\"missing\">i</span>\n\t\t<span class=\"close\">t</span>\n\t\t<span class=\"missing\">z</span>\n\t\t<span class=\"exact\">y</span>\n\t</div>\n\n\t<p>\n\t\tThe <span class=\"exact\">y</span> is in the right place. <span class=\"close\">r</span> and\n\t\t<span class=\"close\">t</span>\n\t\tare the right letters, but in the wrong place. The other letters are wrong, and can be discarded.\n\t\tLet's make another guess:\n\t</p>\n\n\t<div class=\"example\">\n\t\t<span class=\"exact\">p</span>\n\t\t<span class=\"exact\">a</span>\n\t\t<span class=\"exact\">r</span>\n\t\t<span class=\"exact\">t</span>\n\t\t<span class=\"exact\">y</span>\n\t</div>\n\n\t<p>This time we guessed right! You have <strong>six</strong> guesses to get the word.</p>\n\n\t<p>\n\t\tUnlike the original Wordle, Sverdle runs on the server instead of in the browser, making it\n\t\timpossible to cheat. It uses <code>&lt;form&gt;</code> and cookies to submit data, meaning you can\n\t\teven play with JavaScript disabled!\n\t</p>\n</div>\n\n<style>\n\tspan {\n\t\tdisplay: inline-flex;\n\t\tjustify-content: center;\n\t\talign-items: center;\n\t\tfont-size: 0.8em;\n\t\twidth: 2.4em;\n\t\theight: 2.4em;\n\t\tbackground-color: white;\n\t\tbox-sizing: border-box;\n\t\tborder-radius: 2px;\n\t\tborder-width: 2px;\n\t\tcolor: rgba(0, 0, 0, 0.7);\n\t}\n\n\t.missing {\n\t\tbackground: rgba(255, 255, 255, 0.5);\n\t\tcolor: rgba(0, 0, 0, 0.5);\n\t}\n\n\t.close {\n\t\tborder-style: solid;\n\t\tborder-color: var(--color-theme-2);\n\t}\n\n\t.exact {\n\t\tbackground: var(--color-theme-2);\n\t\tcolor: white;\n\t}\n\n\t.example {\n\t\tdisplay: flex;\n\t\tjustify-content: flex-start;\n\t\tmargin: 1rem 0;\n\t\tgap: 0.2rem;\n\t}\n\n\t.example span {\n\t\tfont-size: 1.4rem;\n\t}\n\n\tp span {\n\t\tposition: relative;\n\t\tborder-width: 1px;\n\t\tborder-radius: 1px;\n\t\tfont-size: 0.4em;\n\t\ttransform: scale(2) translate(0, -10%);\n\t\tmargin: 0 1em;\n\t}\n</style>\n"
  },
  {
    "path": "examples/openapi-ts-tanstack-svelte-query/src/routes/sverdle/how-to-play/+page.ts",
    "content": "import { dev } from '$app/environment';\n\n// we don't need any JS on this page, though we'll load\n// it in dev so that we get hot module replacement\nexport const csr = dev;\n\n// since there's no dynamic data here, we can prerender\n// it so that it gets served as a static asset in production\nexport const prerender = true;\n"
  },
  {
    "path": "examples/openapi-ts-tanstack-svelte-query/src/routes/sverdle/reduced-motion.ts",
    "content": "import { readable } from 'svelte/store';\n\nimport { browser } from '$app/environment';\n\nconst reduced_motion_query = '(prefers-reduced-motion: reduce)';\n\nconst get_initial_motion_preference = () => {\n  if (!browser) return false;\n  return window.matchMedia(reduced_motion_query).matches;\n};\n\nexport const reduced_motion = readable(get_initial_motion_preference(), (set) => {\n  if (browser) {\n    const set_reduced_motion = (event: MediaQueryListEvent) => {\n      set(event.matches);\n    };\n    const media_query_list = window.matchMedia(reduced_motion_query);\n    media_query_list.addEventListener('change', set_reduced_motion);\n\n    return () => {\n      media_query_list.removeEventListener('change', set_reduced_motion);\n    };\n  }\n});\n"
  },
  {
    "path": "examples/openapi-ts-tanstack-svelte-query/src/routes/sverdle/words.server.ts",
    "content": "/** The list of possible words */\nexport const words = [\n  'aback',\n  'abase',\n  'abate',\n  'abbey',\n  'abbot',\n  'abhor',\n  'abide',\n  'abled',\n  'abode',\n  'abort',\n  'about',\n  'above',\n  'abuse',\n  'abyss',\n  'acorn',\n  'acrid',\n  'actor',\n  'acute',\n  'adage',\n  'adapt',\n  'adept',\n  'admin',\n  'admit',\n  'adobe',\n  'adopt',\n  'adore',\n  'adorn',\n  'adult',\n  'affix',\n  'afire',\n  'afoot',\n  'afoul',\n  'after',\n  'again',\n  'agape',\n  'agate',\n  'agent',\n  'agile',\n  'aging',\n  'aglow',\n  'agony',\n  'agora',\n  'agree',\n  'ahead',\n  'aider',\n  'aisle',\n  'alarm',\n  'album',\n  'alert',\n  'algae',\n  'alibi',\n  'alien',\n  'align',\n  'alike',\n  'alive',\n  'allay',\n  'alley',\n  'allot',\n  'allow',\n  'alloy',\n  'aloft',\n  'alone',\n  'along',\n  'aloof',\n  'aloud',\n  'alpha',\n  'altar',\n  'alter',\n  'amass',\n  'amaze',\n  'amber',\n  'amble',\n  'amend',\n  'amiss',\n  'amity',\n  'among',\n  'ample',\n  'amply',\n  'amuse',\n  'angel',\n  'anger',\n  'angle',\n  'angry',\n  'angst',\n  'anime',\n  'ankle',\n  'annex',\n  'annoy',\n  'annul',\n  'anode',\n  'antic',\n  'anvil',\n  'aorta',\n  'apart',\n  'aphid',\n  'aping',\n  'apnea',\n  'apple',\n  'apply',\n  'apron',\n  'aptly',\n  'arbor',\n  'ardor',\n  'arena',\n  'argue',\n  'arise',\n  'armor',\n  'aroma',\n  'arose',\n  'array',\n  'arrow',\n  'arson',\n  'artsy',\n  'ascot',\n  'ashen',\n  'aside',\n  'askew',\n  'assay',\n  'asset',\n  'atoll',\n  'atone',\n  'attic',\n  'audio',\n  'audit',\n  'augur',\n  'aunty',\n  'avail',\n  'avert',\n  'avian',\n  'avoid',\n  'await',\n  'awake',\n  'award',\n  'aware',\n  'awash',\n  'awful',\n  'awoke',\n  'axial',\n  'axiom',\n  'axion',\n  'azure',\n  'bacon',\n  'badge',\n  'badly',\n  'bagel',\n  'baggy',\n  'baker',\n  'baler',\n  'balmy',\n  'banal',\n  'banjo',\n  'barge',\n  'baron',\n  'basal',\n  'basic',\n  'basil',\n  'basin',\n  'basis',\n  'baste',\n  'batch',\n  'bathe',\n  'baton',\n  'batty',\n  'bawdy',\n  'bayou',\n  'beach',\n  'beady',\n  'beard',\n  'beast',\n  'beech',\n  'beefy',\n  'befit',\n  'began',\n  'begat',\n  'beget',\n  'begin',\n  'begun',\n  'being',\n  'belch',\n  'belie',\n  'belle',\n  'belly',\n  'below',\n  'bench',\n  'beret',\n  'berry',\n  'berth',\n  'beset',\n  'betel',\n  'bevel',\n  'bezel',\n  'bible',\n  'bicep',\n  'biddy',\n  'bigot',\n  'bilge',\n  'billy',\n  'binge',\n  'bingo',\n  'biome',\n  'birch',\n  'birth',\n  'bison',\n  'bitty',\n  'black',\n  'blade',\n  'blame',\n  'bland',\n  'blank',\n  'blare',\n  'blast',\n  'blaze',\n  'bleak',\n  'bleat',\n  'bleed',\n  'bleep',\n  'blend',\n  'bless',\n  'blimp',\n  'blind',\n  'blink',\n  'bliss',\n  'blitz',\n  'bloat',\n  'block',\n  'bloke',\n  'blond',\n  'blood',\n  'bloom',\n  'blown',\n  'bluer',\n  'bluff',\n  'blunt',\n  'blurb',\n  'blurt',\n  'blush',\n  'board',\n  'boast',\n  'bobby',\n  'boney',\n  'bongo',\n  'bonus',\n  'booby',\n  'boost',\n  'booth',\n  'booty',\n  'booze',\n  'boozy',\n  'borax',\n  'borne',\n  'bosom',\n  'bossy',\n  'botch',\n  'bough',\n  'boule',\n  'bound',\n  'bowel',\n  'boxer',\n  'brace',\n  'braid',\n  'brain',\n  'brake',\n  'brand',\n  'brash',\n  'brass',\n  'brave',\n  'bravo',\n  'brawl',\n  'brawn',\n  'bread',\n  'break',\n  'breed',\n  'briar',\n  'bribe',\n  'brick',\n  'bride',\n  'brief',\n  'brine',\n  'bring',\n  'brink',\n  'briny',\n  'brisk',\n  'broad',\n  'broil',\n  'broke',\n  'brood',\n  'brook',\n  'broom',\n  'broth',\n  'brown',\n  'brunt',\n  'brush',\n  'brute',\n  'buddy',\n  'budge',\n  'buggy',\n  'bugle',\n  'build',\n  'built',\n  'bulge',\n  'bulky',\n  'bully',\n  'bunch',\n  'bunny',\n  'burly',\n  'burnt',\n  'burst',\n  'bused',\n  'bushy',\n  'butch',\n  'butte',\n  'buxom',\n  'buyer',\n  'bylaw',\n  'cabal',\n  'cabby',\n  'cabin',\n  'cable',\n  'cacao',\n  'cache',\n  'cacti',\n  'caddy',\n  'cadet',\n  'cagey',\n  'cairn',\n  'camel',\n  'cameo',\n  'canal',\n  'candy',\n  'canny',\n  'canoe',\n  'canon',\n  'caper',\n  'caput',\n  'carat',\n  'cargo',\n  'carol',\n  'carry',\n  'carve',\n  'caste',\n  'catch',\n  'cater',\n  'catty',\n  'caulk',\n  'cause',\n  'cavil',\n  'cease',\n  'cedar',\n  'cello',\n  'chafe',\n  'chaff',\n  'chain',\n  'chair',\n  'chalk',\n  'champ',\n  'chant',\n  'chaos',\n  'chard',\n  'charm',\n  'chart',\n  'chase',\n  'chasm',\n  'cheap',\n  'cheat',\n  'check',\n  'cheek',\n  'cheer',\n  'chess',\n  'chest',\n  'chick',\n  'chide',\n  'chief',\n  'child',\n  'chili',\n  'chill',\n  'chime',\n  'china',\n  'chirp',\n  'chock',\n  'choir',\n  'choke',\n  'chord',\n  'chore',\n  'chose',\n  'chuck',\n  'chump',\n  'chunk',\n  'churn',\n  'chute',\n  'cider',\n  'cigar',\n  'cinch',\n  'circa',\n  'civic',\n  'civil',\n  'clack',\n  'claim',\n  'clamp',\n  'clang',\n  'clank',\n  'clash',\n  'clasp',\n  'class',\n  'clean',\n  'clear',\n  'cleat',\n  'cleft',\n  'clerk',\n  'click',\n  'cliff',\n  'climb',\n  'cling',\n  'clink',\n  'cloak',\n  'clock',\n  'clone',\n  'close',\n  'cloth',\n  'cloud',\n  'clout',\n  'clove',\n  'clown',\n  'cluck',\n  'clued',\n  'clump',\n  'clung',\n  'coach',\n  'coast',\n  'cobra',\n  'cocoa',\n  'colon',\n  'color',\n  'comet',\n  'comfy',\n  'comic',\n  'comma',\n  'conch',\n  'condo',\n  'conic',\n  'copse',\n  'coral',\n  'corer',\n  'corny',\n  'couch',\n  'cough',\n  'could',\n  'count',\n  'coupe',\n  'court',\n  'coven',\n  'cover',\n  'covet',\n  'covey',\n  'cower',\n  'coyly',\n  'crack',\n  'craft',\n  'cramp',\n  'crane',\n  'crank',\n  'crash',\n  'crass',\n  'crate',\n  'crave',\n  'crawl',\n  'craze',\n  'crazy',\n  'creak',\n  'cream',\n  'credo',\n  'creed',\n  'creek',\n  'creep',\n  'creme',\n  'crepe',\n  'crept',\n  'cress',\n  'crest',\n  'crick',\n  'cried',\n  'crier',\n  'crime',\n  'crimp',\n  'crisp',\n  'croak',\n  'crock',\n  'crone',\n  'crony',\n  'crook',\n  'cross',\n  'croup',\n  'crowd',\n  'crown',\n  'crude',\n  'cruel',\n  'crumb',\n  'crump',\n  'crush',\n  'crust',\n  'crypt',\n  'cubic',\n  'cumin',\n  'curio',\n  'curly',\n  'curry',\n  'curse',\n  'curve',\n  'curvy',\n  'cutie',\n  'cyber',\n  'cycle',\n  'cynic',\n  'daddy',\n  'daily',\n  'dairy',\n  'daisy',\n  'dally',\n  'dance',\n  'dandy',\n  'datum',\n  'daunt',\n  'dealt',\n  'death',\n  'debar',\n  'debit',\n  'debug',\n  'debut',\n  'decal',\n  'decay',\n  'decor',\n  'decoy',\n  'decry',\n  'defer',\n  'deign',\n  'deity',\n  'delay',\n  'delta',\n  'delve',\n  'demon',\n  'demur',\n  'denim',\n  'dense',\n  'depot',\n  'depth',\n  'derby',\n  'deter',\n  'detox',\n  'deuce',\n  'devil',\n  'diary',\n  'dicey',\n  'digit',\n  'dilly',\n  'dimly',\n  'diner',\n  'dingo',\n  'dingy',\n  'diode',\n  'dirge',\n  'dirty',\n  'disco',\n  'ditch',\n  'ditto',\n  'ditty',\n  'diver',\n  'dizzy',\n  'dodge',\n  'dodgy',\n  'dogma',\n  'doing',\n  'dolly',\n  'donor',\n  'donut',\n  'dopey',\n  'doubt',\n  'dough',\n  'dowdy',\n  'dowel',\n  'downy',\n  'dowry',\n  'dozen',\n  'draft',\n  'drain',\n  'drake',\n  'drama',\n  'drank',\n  'drape',\n  'drawl',\n  'drawn',\n  'dread',\n  'dream',\n  'dress',\n  'dried',\n  'drier',\n  'drift',\n  'drill',\n  'drink',\n  'drive',\n  'droit',\n  'droll',\n  'drone',\n  'drool',\n  'droop',\n  'dross',\n  'drove',\n  'drown',\n  'druid',\n  'drunk',\n  'dryer',\n  'dryly',\n  'duchy',\n  'dully',\n  'dummy',\n  'dumpy',\n  'dunce',\n  'dusky',\n  'dusty',\n  'dutch',\n  'duvet',\n  'dwarf',\n  'dwell',\n  'dwelt',\n  'dying',\n  'eager',\n  'eagle',\n  'early',\n  'earth',\n  'easel',\n  'eaten',\n  'eater',\n  'ebony',\n  'eclat',\n  'edict',\n  'edify',\n  'eerie',\n  'egret',\n  'eight',\n  'eject',\n  'eking',\n  'elate',\n  'elbow',\n  'elder',\n  'elect',\n  'elegy',\n  'elfin',\n  'elide',\n  'elite',\n  'elope',\n  'elude',\n  'email',\n  'embed',\n  'ember',\n  'emcee',\n  'empty',\n  'enact',\n  'endow',\n  'enema',\n  'enemy',\n  'enjoy',\n  'ennui',\n  'ensue',\n  'enter',\n  'entry',\n  'envoy',\n  'epoch',\n  'epoxy',\n  'equal',\n  'equip',\n  'erase',\n  'erect',\n  'erode',\n  'error',\n  'erupt',\n  'essay',\n  'ester',\n  'ether',\n  'ethic',\n  'ethos',\n  'etude',\n  'evade',\n  'event',\n  'every',\n  'evict',\n  'evoke',\n  'exact',\n  'exalt',\n  'excel',\n  'exert',\n  'exile',\n  'exist',\n  'expel',\n  'extol',\n  'extra',\n  'exult',\n  'eying',\n  'fable',\n  'facet',\n  'faint',\n  'fairy',\n  'faith',\n  'false',\n  'fancy',\n  'fanny',\n  'farce',\n  'fatal',\n  'fatty',\n  'fault',\n  'fauna',\n  'favor',\n  'feast',\n  'fecal',\n  'feign',\n  'fella',\n  'felon',\n  'femme',\n  'femur',\n  'fence',\n  'feral',\n  'ferry',\n  'fetal',\n  'fetch',\n  'fetid',\n  'fetus',\n  'fever',\n  'fewer',\n  'fiber',\n  'fibre',\n  'ficus',\n  'field',\n  'fiend',\n  'fiery',\n  'fifth',\n  'fifty',\n  'fight',\n  'filer',\n  'filet',\n  'filly',\n  'filmy',\n  'filth',\n  'final',\n  'finch',\n  'finer',\n  'first',\n  'fishy',\n  'fixer',\n  'fizzy',\n  'fjord',\n  'flack',\n  'flail',\n  'flair',\n  'flake',\n  'flaky',\n  'flame',\n  'flank',\n  'flare',\n  'flash',\n  'flask',\n  'fleck',\n  'fleet',\n  'flesh',\n  'flick',\n  'flier',\n  'fling',\n  'flint',\n  'flirt',\n  'float',\n  'flock',\n  'flood',\n  'floor',\n  'flora',\n  'floss',\n  'flour',\n  'flout',\n  'flown',\n  'fluff',\n  'fluid',\n  'fluke',\n  'flume',\n  'flung',\n  'flunk',\n  'flush',\n  'flute',\n  'flyer',\n  'foamy',\n  'focal',\n  'focus',\n  'foggy',\n  'foist',\n  'folio',\n  'folly',\n  'foray',\n  'force',\n  'forge',\n  'forgo',\n  'forte',\n  'forth',\n  'forty',\n  'forum',\n  'found',\n  'foyer',\n  'frail',\n  'frame',\n  'frank',\n  'fraud',\n  'freak',\n  'freed',\n  'freer',\n  'fresh',\n  'friar',\n  'fried',\n  'frill',\n  'frisk',\n  'fritz',\n  'frock',\n  'frond',\n  'front',\n  'frost',\n  'froth',\n  'frown',\n  'froze',\n  'fruit',\n  'fudge',\n  'fugue',\n  'fully',\n  'fungi',\n  'funky',\n  'funny',\n  'furor',\n  'furry',\n  'fussy',\n  'fuzzy',\n  'gaffe',\n  'gaily',\n  'gamer',\n  'gamma',\n  'gamut',\n  'gassy',\n  'gaudy',\n  'gauge',\n  'gaunt',\n  'gauze',\n  'gavel',\n  'gawky',\n  'gayer',\n  'gayly',\n  'gazer',\n  'gecko',\n  'geeky',\n  'geese',\n  'genie',\n  'genre',\n  'ghost',\n  'ghoul',\n  'giant',\n  'giddy',\n  'gipsy',\n  'girly',\n  'girth',\n  'given',\n  'giver',\n  'glade',\n  'gland',\n  'glare',\n  'glass',\n  'glaze',\n  'gleam',\n  'glean',\n  'glide',\n  'glint',\n  'gloat',\n  'globe',\n  'gloom',\n  'glory',\n  'gloss',\n  'glove',\n  'glyph',\n  'gnash',\n  'gnome',\n  'godly',\n  'going',\n  'golem',\n  'golly',\n  'gonad',\n  'goner',\n  'goody',\n  'gooey',\n  'goofy',\n  'goose',\n  'gorge',\n  'gouge',\n  'gourd',\n  'grace',\n  'grade',\n  'graft',\n  'grail',\n  'grain',\n  'grand',\n  'grant',\n  'grape',\n  'graph',\n  'grasp',\n  'grass',\n  'grate',\n  'grave',\n  'gravy',\n  'graze',\n  'great',\n  'greed',\n  'green',\n  'greet',\n  'grief',\n  'grill',\n  'grime',\n  'grimy',\n  'grind',\n  'gripe',\n  'groan',\n  'groin',\n  'groom',\n  'grope',\n  'gross',\n  'group',\n  'grout',\n  'grove',\n  'growl',\n  'grown',\n  'gruel',\n  'gruff',\n  'grunt',\n  'guard',\n  'guava',\n  'guess',\n  'guest',\n  'guide',\n  'guild',\n  'guile',\n  'guilt',\n  'guise',\n  'gulch',\n  'gully',\n  'gumbo',\n  'gummy',\n  'guppy',\n  'gusto',\n  'gusty',\n  'gypsy',\n  'habit',\n  'hairy',\n  'halve',\n  'handy',\n  'happy',\n  'hardy',\n  'harem',\n  'harpy',\n  'harry',\n  'harsh',\n  'haste',\n  'hasty',\n  'hatch',\n  'hater',\n  'haunt',\n  'haute',\n  'haven',\n  'havoc',\n  'hazel',\n  'heady',\n  'heard',\n  'heart',\n  'heath',\n  'heave',\n  'heavy',\n  'hedge',\n  'hefty',\n  'heist',\n  'helix',\n  'hello',\n  'hence',\n  'heron',\n  'hilly',\n  'hinge',\n  'hippo',\n  'hippy',\n  'hitch',\n  'hoard',\n  'hobby',\n  'hoist',\n  'holly',\n  'homer',\n  'honey',\n  'honor',\n  'horde',\n  'horny',\n  'horse',\n  'hotel',\n  'hotly',\n  'hound',\n  'house',\n  'hovel',\n  'hover',\n  'howdy',\n  'human',\n  'humid',\n  'humor',\n  'humph',\n  'humus',\n  'hunch',\n  'hunky',\n  'hurry',\n  'husky',\n  'hussy',\n  'hutch',\n  'hydro',\n  'hyena',\n  'hymen',\n  'hyper',\n  'icily',\n  'icing',\n  'ideal',\n  'idiom',\n  'idiot',\n  'idler',\n  'idyll',\n  'igloo',\n  'iliac',\n  'image',\n  'imbue',\n  'impel',\n  'imply',\n  'inane',\n  'inbox',\n  'incur',\n  'index',\n  'inept',\n  'inert',\n  'infer',\n  'ingot',\n  'inlay',\n  'inlet',\n  'inner',\n  'input',\n  'inter',\n  'intro',\n  'ionic',\n  'irate',\n  'irony',\n  'islet',\n  'issue',\n  'itchy',\n  'ivory',\n  'jaunt',\n  'jazzy',\n  'jelly',\n  'jerky',\n  'jetty',\n  'jewel',\n  'jiffy',\n  'joint',\n  'joist',\n  'joker',\n  'jolly',\n  'joust',\n  'judge',\n  'juice',\n  'juicy',\n  'jumbo',\n  'jumpy',\n  'junta',\n  'junto',\n  'juror',\n  'kappa',\n  'karma',\n  'kayak',\n  'kebab',\n  'khaki',\n  'kinky',\n  'kiosk',\n  'kitty',\n  'knack',\n  'knave',\n  'knead',\n  'kneed',\n  'kneel',\n  'knelt',\n  'knife',\n  'knock',\n  'knoll',\n  'known',\n  'koala',\n  'krill',\n  'label',\n  'labor',\n  'laden',\n  'ladle',\n  'lager',\n  'lance',\n  'lanky',\n  'lapel',\n  'lapse',\n  'large',\n  'larva',\n  'lasso',\n  'latch',\n  'later',\n  'lathe',\n  'latte',\n  'laugh',\n  'layer',\n  'leach',\n  'leafy',\n  'leaky',\n  'leant',\n  'leapt',\n  'learn',\n  'lease',\n  'leash',\n  'least',\n  'leave',\n  'ledge',\n  'leech',\n  'leery',\n  'lefty',\n  'legal',\n  'leggy',\n  'lemon',\n  'lemur',\n  'leper',\n  'level',\n  'lever',\n  'libel',\n  'liege',\n  'light',\n  'liken',\n  'lilac',\n  'limbo',\n  'limit',\n  'linen',\n  'liner',\n  'lingo',\n  'lipid',\n  'lithe',\n  'liver',\n  'livid',\n  'llama',\n  'loamy',\n  'loath',\n  'lobby',\n  'local',\n  'locus',\n  'lodge',\n  'lofty',\n  'logic',\n  'login',\n  'loopy',\n  'loose',\n  'lorry',\n  'loser',\n  'louse',\n  'lousy',\n  'lover',\n  'lower',\n  'lowly',\n  'loyal',\n  'lucid',\n  'lucky',\n  'lumen',\n  'lumpy',\n  'lunar',\n  'lunch',\n  'lunge',\n  'lupus',\n  'lurch',\n  'lurid',\n  'lusty',\n  'lying',\n  'lymph',\n  'lynch',\n  'lyric',\n  'macaw',\n  'macho',\n  'macro',\n  'madam',\n  'madly',\n  'mafia',\n  'magic',\n  'magma',\n  'maize',\n  'major',\n  'maker',\n  'mambo',\n  'mamma',\n  'mammy',\n  'manga',\n  'mange',\n  'mango',\n  'mangy',\n  'mania',\n  'manic',\n  'manly',\n  'manor',\n  'maple',\n  'march',\n  'marry',\n  'marsh',\n  'mason',\n  'masse',\n  'match',\n  'matey',\n  'mauve',\n  'maxim',\n  'maybe',\n  'mayor',\n  'mealy',\n  'meant',\n  'meaty',\n  'mecca',\n  'medal',\n  'media',\n  'medic',\n  'melee',\n  'melon',\n  'mercy',\n  'merge',\n  'merit',\n  'merry',\n  'metal',\n  'meter',\n  'metro',\n  'micro',\n  'midge',\n  'midst',\n  'might',\n  'milky',\n  'mimic',\n  'mince',\n  'miner',\n  'minim',\n  'minor',\n  'minty',\n  'minus',\n  'mirth',\n  'miser',\n  'missy',\n  'mocha',\n  'modal',\n  'model',\n  'modem',\n  'mogul',\n  'moist',\n  'molar',\n  'moldy',\n  'money',\n  'month',\n  'moody',\n  'moose',\n  'moral',\n  'moron',\n  'morph',\n  'mossy',\n  'motel',\n  'motif',\n  'motor',\n  'motto',\n  'moult',\n  'mound',\n  'mount',\n  'mourn',\n  'mouse',\n  'mouth',\n  'mover',\n  'movie',\n  'mower',\n  'mucky',\n  'mucus',\n  'muddy',\n  'mulch',\n  'mummy',\n  'munch',\n  'mural',\n  'murky',\n  'mushy',\n  'music',\n  'musky',\n  'musty',\n  'myrrh',\n  'nadir',\n  'naive',\n  'nanny',\n  'nasal',\n  'nasty',\n  'natal',\n  'naval',\n  'navel',\n  'needy',\n  'neigh',\n  'nerdy',\n  'nerve',\n  'never',\n  'newer',\n  'newly',\n  'nicer',\n  'niche',\n  'niece',\n  'night',\n  'ninja',\n  'ninny',\n  'ninth',\n  'noble',\n  'nobly',\n  'noise',\n  'noisy',\n  'nomad',\n  'noose',\n  'north',\n  'nosey',\n  'notch',\n  'novel',\n  'nudge',\n  'nurse',\n  'nutty',\n  'nylon',\n  'nymph',\n  'oaken',\n  'obese',\n  'occur',\n  'ocean',\n  'octal',\n  'octet',\n  'odder',\n  'oddly',\n  'offal',\n  'offer',\n  'often',\n  'olden',\n  'older',\n  'olive',\n  'ombre',\n  'omega',\n  'onion',\n  'onset',\n  'opera',\n  'opine',\n  'opium',\n  'optic',\n  'orbit',\n  'order',\n  'organ',\n  'other',\n  'otter',\n  'ought',\n  'ounce',\n  'outdo',\n  'outer',\n  'outgo',\n  'ovary',\n  'ovate',\n  'overt',\n  'ovine',\n  'ovoid',\n  'owing',\n  'owner',\n  'oxide',\n  'ozone',\n  'paddy',\n  'pagan',\n  'paint',\n  'paler',\n  'palsy',\n  'panel',\n  'panic',\n  'pansy',\n  'papal',\n  'paper',\n  'parer',\n  'parka',\n  'parry',\n  'parse',\n  'party',\n  'pasta',\n  'paste',\n  'pasty',\n  'patch',\n  'patio',\n  'patsy',\n  'patty',\n  'pause',\n  'payee',\n  'payer',\n  'peace',\n  'peach',\n  'pearl',\n  'pecan',\n  'pedal',\n  'penal',\n  'pence',\n  'penne',\n  'penny',\n  'perch',\n  'peril',\n  'perky',\n  'pesky',\n  'pesto',\n  'petal',\n  'petty',\n  'phase',\n  'phone',\n  'phony',\n  'photo',\n  'piano',\n  'picky',\n  'piece',\n  'piety',\n  'piggy',\n  'pilot',\n  'pinch',\n  'piney',\n  'pinky',\n  'pinto',\n  'piper',\n  'pique',\n  'pitch',\n  'pithy',\n  'pivot',\n  'pixel',\n  'pixie',\n  'pizza',\n  'place',\n  'plaid',\n  'plain',\n  'plait',\n  'plane',\n  'plank',\n  'plant',\n  'plate',\n  'plaza',\n  'plead',\n  'pleat',\n  'plied',\n  'plier',\n  'pluck',\n  'plumb',\n  'plume',\n  'plump',\n  'plunk',\n  'plush',\n  'poesy',\n  'point',\n  'poise',\n  'poker',\n  'polar',\n  'polka',\n  'polyp',\n  'pooch',\n  'poppy',\n  'porch',\n  'poser',\n  'posit',\n  'posse',\n  'pouch',\n  'pound',\n  'pouty',\n  'power',\n  'prank',\n  'prawn',\n  'preen',\n  'press',\n  'price',\n  'prick',\n  'pride',\n  'pried',\n  'prime',\n  'primo',\n  'print',\n  'prior',\n  'prism',\n  'privy',\n  'prize',\n  'probe',\n  'prone',\n  'prong',\n  'proof',\n  'prose',\n  'proud',\n  'prove',\n  'prowl',\n  'proxy',\n  'prude',\n  'prune',\n  'psalm',\n  'pubic',\n  'pudgy',\n  'puffy',\n  'pulpy',\n  'pulse',\n  'punch',\n  'pupal',\n  'pupil',\n  'puppy',\n  'puree',\n  'purer',\n  'purge',\n  'purse',\n  'pushy',\n  'putty',\n  'pygmy',\n  'quack',\n  'quail',\n  'quake',\n  'qualm',\n  'quark',\n  'quart',\n  'quash',\n  'quasi',\n  'queen',\n  'queer',\n  'quell',\n  'query',\n  'quest',\n  'queue',\n  'quick',\n  'quiet',\n  'quill',\n  'quilt',\n  'quirk',\n  'quite',\n  'quota',\n  'quote',\n  'quoth',\n  'rabbi',\n  'rabid',\n  'racer',\n  'radar',\n  'radii',\n  'radio',\n  'rainy',\n  'raise',\n  'rajah',\n  'rally',\n  'ralph',\n  'ramen',\n  'ranch',\n  'randy',\n  'range',\n  'rapid',\n  'rarer',\n  'raspy',\n  'ratio',\n  'ratty',\n  'raven',\n  'rayon',\n  'razor',\n  'reach',\n  'react',\n  'ready',\n  'realm',\n  'rearm',\n  'rebar',\n  'rebel',\n  'rebus',\n  'rebut',\n  'recap',\n  'recur',\n  'recut',\n  'reedy',\n  'refer',\n  'refit',\n  'regal',\n  'rehab',\n  'reign',\n  'relax',\n  'relay',\n  'relic',\n  'remit',\n  'renal',\n  'renew',\n  'repay',\n  'repel',\n  'reply',\n  'rerun',\n  'reset',\n  'resin',\n  'retch',\n  'retro',\n  'retry',\n  'reuse',\n  'revel',\n  'revue',\n  'rhino',\n  'rhyme',\n  'rider',\n  'ridge',\n  'rifle',\n  'right',\n  'rigid',\n  'rigor',\n  'rinse',\n  'ripen',\n  'riper',\n  'risen',\n  'riser',\n  'risky',\n  'rival',\n  'river',\n  'rivet',\n  'roach',\n  'roast',\n  'robin',\n  'robot',\n  'rocky',\n  'rodeo',\n  'roger',\n  'rogue',\n  'roomy',\n  'roost',\n  'rotor',\n  'rouge',\n  'rough',\n  'round',\n  'rouse',\n  'route',\n  'rover',\n  'rowdy',\n  'rower',\n  'royal',\n  'ruddy',\n  'ruder',\n  'rugby',\n  'ruler',\n  'rumba',\n  'rumor',\n  'rupee',\n  'rural',\n  'rusty',\n  'sadly',\n  'safer',\n  'saint',\n  'salad',\n  'sally',\n  'salon',\n  'salsa',\n  'salty',\n  'salve',\n  'salvo',\n  'sandy',\n  'saner',\n  'sappy',\n  'sassy',\n  'satin',\n  'satyr',\n  'sauce',\n  'saucy',\n  'sauna',\n  'saute',\n  'savor',\n  'savoy',\n  'savvy',\n  'scald',\n  'scale',\n  'scalp',\n  'scaly',\n  'scamp',\n  'scant',\n  'scare',\n  'scarf',\n  'scary',\n  'scene',\n  'scent',\n  'scion',\n  'scoff',\n  'scold',\n  'scone',\n  'scoop',\n  'scope',\n  'score',\n  'scorn',\n  'scour',\n  'scout',\n  'scowl',\n  'scram',\n  'scrap',\n  'scree',\n  'screw',\n  'scrub',\n  'scrum',\n  'scuba',\n  'sedan',\n  'seedy',\n  'segue',\n  'seize',\n  'semen',\n  'sense',\n  'sepia',\n  'serif',\n  'serum',\n  'serve',\n  'setup',\n  'seven',\n  'sever',\n  'sewer',\n  'shack',\n  'shade',\n  'shady',\n  'shaft',\n  'shake',\n  'shaky',\n  'shale',\n  'shall',\n  'shalt',\n  'shame',\n  'shank',\n  'shape',\n  'shard',\n  'share',\n  'shark',\n  'sharp',\n  'shave',\n  'shawl',\n  'shear',\n  'sheen',\n  'sheep',\n  'sheer',\n  'sheet',\n  'sheik',\n  'shelf',\n  'shell',\n  'shied',\n  'shift',\n  'shine',\n  'shiny',\n  'shire',\n  'shirk',\n  'shirt',\n  'shoal',\n  'shock',\n  'shone',\n  'shook',\n  'shoot',\n  'shore',\n  'shorn',\n  'short',\n  'shout',\n  'shove',\n  'shown',\n  'showy',\n  'shrew',\n  'shrub',\n  'shrug',\n  'shuck',\n  'shunt',\n  'shush',\n  'shyly',\n  'siege',\n  'sieve',\n  'sight',\n  'sigma',\n  'silky',\n  'silly',\n  'since',\n  'sinew',\n  'singe',\n  'siren',\n  'sissy',\n  'sixth',\n  'sixty',\n  'skate',\n  'skier',\n  'skiff',\n  'skill',\n  'skimp',\n  'skirt',\n  'skulk',\n  'skull',\n  'skunk',\n  'slack',\n  'slain',\n  'slang',\n  'slant',\n  'slash',\n  'slate',\n  'slave',\n  'sleek',\n  'sleep',\n  'sleet',\n  'slept',\n  'slice',\n  'slick',\n  'slide',\n  'slime',\n  'slimy',\n  'sling',\n  'slink',\n  'sloop',\n  'slope',\n  'slosh',\n  'sloth',\n  'slump',\n  'slung',\n  'slunk',\n  'slurp',\n  'slush',\n  'slyly',\n  'smack',\n  'small',\n  'smart',\n  'smash',\n  'smear',\n  'smell',\n  'smelt',\n  'smile',\n  'smirk',\n  'smite',\n  'smith',\n  'smock',\n  'smoke',\n  'smoky',\n  'smote',\n  'snack',\n  'snail',\n  'snake',\n  'snaky',\n  'snare',\n  'snarl',\n  'sneak',\n  'sneer',\n  'snide',\n  'sniff',\n  'snipe',\n  'snoop',\n  'snore',\n  'snort',\n  'snout',\n  'snowy',\n  'snuck',\n  'snuff',\n  'soapy',\n  'sober',\n  'soggy',\n  'solar',\n  'solid',\n  'solve',\n  'sonar',\n  'sonic',\n  'sooth',\n  'sooty',\n  'sorry',\n  'sound',\n  'south',\n  'sower',\n  'space',\n  'spade',\n  'spank',\n  'spare',\n  'spark',\n  'spasm',\n  'spawn',\n  'speak',\n  'spear',\n  'speck',\n  'speed',\n  'spell',\n  'spelt',\n  'spend',\n  'spent',\n  'sperm',\n  'spice',\n  'spicy',\n  'spied',\n  'spiel',\n  'spike',\n  'spiky',\n  'spill',\n  'spilt',\n  'spine',\n  'spiny',\n  'spire',\n  'spite',\n  'splat',\n  'split',\n  'spoil',\n  'spoke',\n  'spoof',\n  'spook',\n  'spool',\n  'spoon',\n  'spore',\n  'sport',\n  'spout',\n  'spray',\n  'spree',\n  'sprig',\n  'spunk',\n  'spurn',\n  'spurt',\n  'squad',\n  'squat',\n  'squib',\n  'stack',\n  'staff',\n  'stage',\n  'staid',\n  'stain',\n  'stair',\n  'stake',\n  'stale',\n  'stalk',\n  'stall',\n  'stamp',\n  'stand',\n  'stank',\n  'stare',\n  'stark',\n  'start',\n  'stash',\n  'state',\n  'stave',\n  'stead',\n  'steak',\n  'steal',\n  'steam',\n  'steed',\n  'steel',\n  'steep',\n  'steer',\n  'stein',\n  'stern',\n  'stick',\n  'stiff',\n  'still',\n  'stilt',\n  'sting',\n  'stink',\n  'stint',\n  'stock',\n  'stoic',\n  'stoke',\n  'stole',\n  'stomp',\n  'stone',\n  'stony',\n  'stood',\n  'stool',\n  'stoop',\n  'store',\n  'stork',\n  'storm',\n  'story',\n  'stout',\n  'stove',\n  'strap',\n  'straw',\n  'stray',\n  'strip',\n  'strut',\n  'stuck',\n  'study',\n  'stuff',\n  'stump',\n  'stung',\n  'stunk',\n  'stunt',\n  'style',\n  'suave',\n  'sugar',\n  'suing',\n  'suite',\n  'sulky',\n  'sully',\n  'sumac',\n  'sunny',\n  'super',\n  'surer',\n  'surge',\n  'surly',\n  'sushi',\n  'swami',\n  'swamp',\n  'swarm',\n  'swash',\n  'swath',\n  'swear',\n  'sweat',\n  'sweep',\n  'sweet',\n  'swell',\n  'swept',\n  'swift',\n  'swill',\n  'swine',\n  'swing',\n  'swirl',\n  'swish',\n  'swoon',\n  'swoop',\n  'sword',\n  'swore',\n  'sworn',\n  'swung',\n  'synod',\n  'syrup',\n  'tabby',\n  'table',\n  'taboo',\n  'tacit',\n  'tacky',\n  'taffy',\n  'taint',\n  'taken',\n  'taker',\n  'tally',\n  'talon',\n  'tamer',\n  'tango',\n  'tangy',\n  'taper',\n  'tapir',\n  'tardy',\n  'tarot',\n  'taste',\n  'tasty',\n  'tatty',\n  'taunt',\n  'tawny',\n  'teach',\n  'teary',\n  'tease',\n  'teddy',\n  'teeth',\n  'tempo',\n  'tenet',\n  'tenor',\n  'tense',\n  'tenth',\n  'tepee',\n  'tepid',\n  'terra',\n  'terse',\n  'testy',\n  'thank',\n  'theft',\n  'their',\n  'theme',\n  'there',\n  'these',\n  'theta',\n  'thick',\n  'thief',\n  'thigh',\n  'thing',\n  'think',\n  'third',\n  'thong',\n  'thorn',\n  'those',\n  'three',\n  'threw',\n  'throb',\n  'throw',\n  'thrum',\n  'thumb',\n  'thump',\n  'thyme',\n  'tiara',\n  'tibia',\n  'tidal',\n  'tiger',\n  'tight',\n  'tilde',\n  'timer',\n  'timid',\n  'tipsy',\n  'titan',\n  'tithe',\n  'title',\n  'toast',\n  'today',\n  'toddy',\n  'token',\n  'tonal',\n  'tonga',\n  'tonic',\n  'tooth',\n  'topaz',\n  'topic',\n  'torch',\n  'torso',\n  'torus',\n  'total',\n  'totem',\n  'touch',\n  'tough',\n  'towel',\n  'tower',\n  'toxic',\n  'toxin',\n  'trace',\n  'track',\n  'tract',\n  'trade',\n  'trail',\n  'train',\n  'trait',\n  'tramp',\n  'trash',\n  'trawl',\n  'tread',\n  'treat',\n  'trend',\n  'triad',\n  'trial',\n  'tribe',\n  'trice',\n  'trick',\n  'tried',\n  'tripe',\n  'trite',\n  'troll',\n  'troop',\n  'trope',\n  'trout',\n  'trove',\n  'truce',\n  'truck',\n  'truer',\n  'truly',\n  'trump',\n  'trunk',\n  'truss',\n  'trust',\n  'truth',\n  'tryst',\n  'tubal',\n  'tuber',\n  'tulip',\n  'tulle',\n  'tumor',\n  'tunic',\n  'turbo',\n  'tutor',\n  'twang',\n  'tweak',\n  'tweed',\n  'tweet',\n  'twice',\n  'twine',\n  'twirl',\n  'twist',\n  'twixt',\n  'tying',\n  'udder',\n  'ulcer',\n  'ultra',\n  'umbra',\n  'uncle',\n  'uncut',\n  'under',\n  'undid',\n  'undue',\n  'unfed',\n  'unfit',\n  'unify',\n  'union',\n  'unite',\n  'unity',\n  'unlit',\n  'unmet',\n  'unset',\n  'untie',\n  'until',\n  'unwed',\n  'unzip',\n  'upper',\n  'upset',\n  'urban',\n  'urine',\n  'usage',\n  'usher',\n  'using',\n  'usual',\n  'usurp',\n  'utile',\n  'utter',\n  'vague',\n  'valet',\n  'valid',\n  'valor',\n  'value',\n  'valve',\n  'vapid',\n  'vapor',\n  'vault',\n  'vaunt',\n  'vegan',\n  'venom',\n  'venue',\n  'verge',\n  'verse',\n  'verso',\n  'verve',\n  'vicar',\n  'video',\n  'vigil',\n  'vigor',\n  'villa',\n  'vinyl',\n  'viola',\n  'viper',\n  'viral',\n  'virus',\n  'visit',\n  'visor',\n  'vista',\n  'vital',\n  'vivid',\n  'vixen',\n  'vocal',\n  'vodka',\n  'vogue',\n  'voice',\n  'voila',\n  'vomit',\n  'voter',\n  'vouch',\n  'vowel',\n  'vying',\n  'wacky',\n  'wafer',\n  'wager',\n  'wagon',\n  'waist',\n  'waive',\n  'waltz',\n  'warty',\n  'waste',\n  'watch',\n  'water',\n  'waver',\n  'waxen',\n  'weary',\n  'weave',\n  'wedge',\n  'weedy',\n  'weigh',\n  'weird',\n  'welch',\n  'welsh',\n  'wench',\n  'whack',\n  'whale',\n  'wharf',\n  'wheat',\n  'wheel',\n  'whelp',\n  'where',\n  'which',\n  'whiff',\n  'while',\n  'whine',\n  'whiny',\n  'whirl',\n  'whisk',\n  'white',\n  'whole',\n  'whoop',\n  'whose',\n  'widen',\n  'wider',\n  'widow',\n  'width',\n  'wield',\n  'wight',\n  'willy',\n  'wimpy',\n  'wince',\n  'winch',\n  'windy',\n  'wiser',\n  'wispy',\n  'witch',\n  'witty',\n  'woken',\n  'woman',\n  'women',\n  'woody',\n  'wooer',\n  'wooly',\n  'woozy',\n  'wordy',\n  'world',\n  'worry',\n  'worse',\n  'worst',\n  'worth',\n  'would',\n  'wound',\n  'woven',\n  'wrack',\n  'wrath',\n  'wreak',\n  'wreck',\n  'wrest',\n  'wring',\n  'wrist',\n  'write',\n  'wrong',\n  'wrote',\n  'wrung',\n  'wryly',\n  'yacht',\n  'yearn',\n  'yeast',\n  'yield',\n  'young',\n  'youth',\n  'zebra',\n  'zesty',\n  'zonal',\n];\n\n/** The list of valid guesses, of which the list of possible words is a subset */\nexport const allowed = new Set([\n  ...words,\n  'aahed',\n  'aalii',\n  'aargh',\n  'aarti',\n  'abaca',\n  'abaci',\n  'abacs',\n  'abaft',\n  'abaka',\n  'abamp',\n  'aband',\n  'abash',\n  'abask',\n  'abaya',\n  'abbas',\n  'abbed',\n  'abbes',\n  'abcee',\n  'abeam',\n  'abear',\n  'abele',\n  'abers',\n  'abets',\n  'abies',\n  'abler',\n  'ables',\n  'ablet',\n  'ablow',\n  'abmho',\n  'abohm',\n  'aboil',\n  'aboma',\n  'aboon',\n  'abord',\n  'abore',\n  'abram',\n  'abray',\n  'abrim',\n  'abrin',\n  'abris',\n  'absey',\n  'absit',\n  'abuna',\n  'abune',\n  'abuts',\n  'abuzz',\n  'abyes',\n  'abysm',\n  'acais',\n  'acari',\n  'accas',\n  'accoy',\n  'acerb',\n  'acers',\n  'aceta',\n  'achar',\n  'ached',\n  'aches',\n  'achoo',\n  'acids',\n  'acidy',\n  'acing',\n  'acini',\n  'ackee',\n  'acker',\n  'acmes',\n  'acmic',\n  'acned',\n  'acnes',\n  'acock',\n  'acold',\n  'acred',\n  'acres',\n  'acros',\n  'acted',\n  'actin',\n  'acton',\n  'acyls',\n  'adaws',\n  'adays',\n  'adbot',\n  'addax',\n  'added',\n  'adder',\n  'addio',\n  'addle',\n  'adeem',\n  'adhan',\n  'adieu',\n  'adios',\n  'adits',\n  'adman',\n  'admen',\n  'admix',\n  'adobo',\n  'adown',\n  'adoze',\n  'adrad',\n  'adred',\n  'adsum',\n  'aduki',\n  'adunc',\n  'adust',\n  'advew',\n  'adyta',\n  'adzed',\n  'adzes',\n  'aecia',\n  'aedes',\n  'aegis',\n  'aeons',\n  'aerie',\n  'aeros',\n  'aesir',\n  'afald',\n  'afara',\n  'afars',\n  'afear',\n  'aflaj',\n  'afore',\n  'afrit',\n  'afros',\n  'agama',\n  'agami',\n  'agars',\n  'agast',\n  'agave',\n  'agaze',\n  'agene',\n  'agers',\n  'agger',\n  'aggie',\n  'aggri',\n  'aggro',\n  'aggry',\n  'aghas',\n  'agila',\n  'agios',\n  'agism',\n  'agist',\n  'agita',\n  'aglee',\n  'aglet',\n  'agley',\n  'agloo',\n  'aglus',\n  'agmas',\n  'agoge',\n  'agone',\n  'agons',\n  'agood',\n  'agria',\n  'agrin',\n  'agros',\n  'agued',\n  'agues',\n  'aguna',\n  'aguti',\n  'aheap',\n  'ahent',\n  'ahigh',\n  'ahind',\n  'ahing',\n  'ahint',\n  'ahold',\n  'ahull',\n  'ahuru',\n  'aidas',\n  'aided',\n  'aides',\n  'aidoi',\n  'aidos',\n  'aiery',\n  'aigas',\n  'aight',\n  'ailed',\n  'aimed',\n  'aimer',\n  'ainee',\n  'ainga',\n  'aioli',\n  'aired',\n  'airer',\n  'airns',\n  'airth',\n  'airts',\n  'aitch',\n  'aitus',\n  'aiver',\n  'aiyee',\n  'aizle',\n  'ajies',\n  'ajiva',\n  'ajuga',\n  'ajwan',\n  'akees',\n  'akela',\n  'akene',\n  'aking',\n  'akita',\n  'akkas',\n  'alaap',\n  'alack',\n  'alamo',\n  'aland',\n  'alane',\n  'alang',\n  'alans',\n  'alant',\n  'alapa',\n  'alaps',\n  'alary',\n  'alate',\n  'alays',\n  'albas',\n  'albee',\n  'alcid',\n  'alcos',\n  'aldea',\n  'alder',\n  'aldol',\n  'aleck',\n  'alecs',\n  'alefs',\n  'aleft',\n  'aleph',\n  'alews',\n  'aleye',\n  'alfas',\n  'algal',\n  'algas',\n  'algid',\n  'algin',\n  'algor',\n  'algum',\n  'alias',\n  'alifs',\n  'aline',\n  'alist',\n  'aliya',\n  'alkie',\n  'alkos',\n  'alkyd',\n  'alkyl',\n  'allee',\n  'allel',\n  'allis',\n  'allod',\n  'allyl',\n  'almah',\n  'almas',\n  'almeh',\n  'almes',\n  'almud',\n  'almug',\n  'alods',\n  'aloed',\n  'aloes',\n  'aloha',\n  'aloin',\n  'aloos',\n  'alowe',\n  'altho',\n  'altos',\n  'alula',\n  'alums',\n  'alure',\n  'alvar',\n  'alway',\n  'amahs',\n  'amain',\n  'amate',\n  'amaut',\n  'amban',\n  'ambit',\n  'ambos',\n  'ambry',\n  'ameba',\n  'ameer',\n  'amene',\n  'amens',\n  'ament',\n  'amias',\n  'amice',\n  'amici',\n  'amide',\n  'amido',\n  'amids',\n  'amies',\n  'amiga',\n  'amigo',\n  'amine',\n  'amino',\n  'amins',\n  'amirs',\n  'amlas',\n  'amman',\n  'ammon',\n  'ammos',\n  'amnia',\n  'amnic',\n  'amnio',\n  'amoks',\n  'amole',\n  'amort',\n  'amour',\n  'amove',\n  'amowt',\n  'amped',\n  'ampul',\n  'amrit',\n  'amuck',\n  'amyls',\n  'anana',\n  'anata',\n  'ancho',\n  'ancle',\n  'ancon',\n  'andro',\n  'anear',\n  'anele',\n  'anent',\n  'angas',\n  'anglo',\n  'anigh',\n  'anile',\n  'anils',\n  'anima',\n  'animi',\n  'anion',\n  'anise',\n  'anker',\n  'ankhs',\n  'ankus',\n  'anlas',\n  'annal',\n  'annas',\n  'annat',\n  'anoas',\n  'anole',\n  'anomy',\n  'ansae',\n  'antae',\n  'antar',\n  'antas',\n  'anted',\n  'antes',\n  'antis',\n  'antra',\n  'antre',\n  'antsy',\n  'anura',\n  'anyon',\n  'apace',\n  'apage',\n  'apaid',\n  'apayd',\n  'apays',\n  'apeak',\n  'apeek',\n  'apers',\n  'apert',\n  'apery',\n  'apgar',\n  'aphis',\n  'apian',\n  'apiol',\n  'apish',\n  'apism',\n  'apode',\n  'apods',\n  'apoop',\n  'aport',\n  'appal',\n  'appay',\n  'appel',\n  'appro',\n  'appui',\n  'appuy',\n  'apres',\n  'apses',\n  'apsis',\n  'apsos',\n  'apted',\n  'apter',\n  'aquae',\n  'aquas',\n  'araba',\n  'araks',\n  'arame',\n  'arars',\n  'arbas',\n  'arced',\n  'archi',\n  'arcos',\n  'arcus',\n  'ardeb',\n  'ardri',\n  'aread',\n  'areae',\n  'areal',\n  'arear',\n  'areas',\n  'areca',\n  'aredd',\n  'arede',\n  'arefy',\n  'areic',\n  'arene',\n  'arepa',\n  'arere',\n  'arete',\n  'arets',\n  'arett',\n  'argal',\n  'argan',\n  'argil',\n  'argle',\n  'argol',\n  'argon',\n  'argot',\n  'argus',\n  'arhat',\n  'arias',\n  'ariel',\n  'ariki',\n  'arils',\n  'ariot',\n  'arish',\n  'arked',\n  'arled',\n  'arles',\n  'armed',\n  'armer',\n  'armet',\n  'armil',\n  'arnas',\n  'arnut',\n  'aroba',\n  'aroha',\n  'aroid',\n  'arpas',\n  'arpen',\n  'arrah',\n  'arras',\n  'arret',\n  'arris',\n  'arroz',\n  'arsed',\n  'arses',\n  'arsey',\n  'arsis',\n  'artal',\n  'artel',\n  'artic',\n  'artis',\n  'aruhe',\n  'arums',\n  'arval',\n  'arvee',\n  'arvos',\n  'aryls',\n  'asana',\n  'ascon',\n  'ascus',\n  'asdic',\n  'ashed',\n  'ashes',\n  'ashet',\n  'asked',\n  'asker',\n  'askoi',\n  'askos',\n  'aspen',\n  'asper',\n  'aspic',\n  'aspie',\n  'aspis',\n  'aspro',\n  'assai',\n  'assam',\n  'asses',\n  'assez',\n  'assot',\n  'aster',\n  'astir',\n  'astun',\n  'asura',\n  'asway',\n  'aswim',\n  'asyla',\n  'ataps',\n  'ataxy',\n  'atigi',\n  'atilt',\n  'atimy',\n  'atlas',\n  'atman',\n  'atmas',\n  'atmos',\n  'atocs',\n  'atoke',\n  'atoks',\n  'atoms',\n  'atomy',\n  'atony',\n  'atopy',\n  'atria',\n  'atrip',\n  'attap',\n  'attar',\n  'atuas',\n  'audad',\n  'auger',\n  'aught',\n  'aulas',\n  'aulic',\n  'auloi',\n  'aulos',\n  'aumil',\n  'aunes',\n  'aunts',\n  'aurae',\n  'aural',\n  'aurar',\n  'auras',\n  'aurei',\n  'aures',\n  'auric',\n  'auris',\n  'aurum',\n  'autos',\n  'auxin',\n  'avale',\n  'avant',\n  'avast',\n  'avels',\n  'avens',\n  'avers',\n  'avgas',\n  'avine',\n  'avion',\n  'avise',\n  'aviso',\n  'avize',\n  'avows',\n  'avyze',\n  'awarn',\n  'awato',\n  'awave',\n  'aways',\n  'awdls',\n  'aweel',\n  'aweto',\n  'awing',\n  'awmry',\n  'awned',\n  'awner',\n  'awols',\n  'awork',\n  'axels',\n  'axile',\n  'axils',\n  'axing',\n  'axite',\n  'axled',\n  'axles',\n  'axman',\n  'axmen',\n  'axoid',\n  'axone',\n  'axons',\n  'ayahs',\n  'ayaya',\n  'ayelp',\n  'aygre',\n  'ayins',\n  'ayont',\n  'ayres',\n  'ayrie',\n  'azans',\n  'azide',\n  'azido',\n  'azine',\n  'azlon',\n  'azoic',\n  'azole',\n  'azons',\n  'azote',\n  'azoth',\n  'azuki',\n  'azurn',\n  'azury',\n  'azygy',\n  'azyme',\n  'azyms',\n  'baaed',\n  'baals',\n  'babas',\n  'babel',\n  'babes',\n  'babka',\n  'baboo',\n  'babul',\n  'babus',\n  'bacca',\n  'bacco',\n  'baccy',\n  'bacha',\n  'bachs',\n  'backs',\n  'baddy',\n  'baels',\n  'baffs',\n  'baffy',\n  'bafts',\n  'baghs',\n  'bagie',\n  'bahts',\n  'bahus',\n  'bahut',\n  'bails',\n  'bairn',\n  'baisa',\n  'baith',\n  'baits',\n  'baiza',\n  'baize',\n  'bajan',\n  'bajra',\n  'bajri',\n  'bajus',\n  'baked',\n  'baken',\n  'bakes',\n  'bakra',\n  'balas',\n  'balds',\n  'baldy',\n  'baled',\n  'bales',\n  'balks',\n  'balky',\n  'balls',\n  'bally',\n  'balms',\n  'baloo',\n  'balsa',\n  'balti',\n  'balun',\n  'balus',\n  'bambi',\n  'banak',\n  'banco',\n  'bancs',\n  'banda',\n  'bandh',\n  'bands',\n  'bandy',\n  'baned',\n  'banes',\n  'bangs',\n  'bania',\n  'banks',\n  'banns',\n  'bants',\n  'bantu',\n  'banty',\n  'banya',\n  'bapus',\n  'barbe',\n  'barbs',\n  'barby',\n  'barca',\n  'barde',\n  'bardo',\n  'bards',\n  'bardy',\n  'bared',\n  'barer',\n  'bares',\n  'barfi',\n  'barfs',\n  'baric',\n  'barks',\n  'barky',\n  'barms',\n  'barmy',\n  'barns',\n  'barny',\n  'barps',\n  'barra',\n  'barre',\n  'barro',\n  'barry',\n  'barye',\n  'basan',\n  'based',\n  'basen',\n  'baser',\n  'bases',\n  'basho',\n  'basij',\n  'basks',\n  'bason',\n  'basse',\n  'bassi',\n  'basso',\n  'bassy',\n  'basta',\n  'basti',\n  'basto',\n  'basts',\n  'bated',\n  'bates',\n  'baths',\n  'batik',\n  'batta',\n  'batts',\n  'battu',\n  'bauds',\n  'bauks',\n  'baulk',\n  'baurs',\n  'bavin',\n  'bawds',\n  'bawks',\n  'bawls',\n  'bawns',\n  'bawrs',\n  'bawty',\n  'bayed',\n  'bayer',\n  'bayes',\n  'bayle',\n  'bayts',\n  'bazar',\n  'bazoo',\n  'beads',\n  'beaks',\n  'beaky',\n  'beals',\n  'beams',\n  'beamy',\n  'beano',\n  'beans',\n  'beany',\n  'beare',\n  'bears',\n  'beath',\n  'beats',\n  'beaty',\n  'beaus',\n  'beaut',\n  'beaux',\n  'bebop',\n  'becap',\n  'becke',\n  'becks',\n  'bedad',\n  'bedel',\n  'bedes',\n  'bedew',\n  'bedim',\n  'bedye',\n  'beedi',\n  'beefs',\n  'beeps',\n  'beers',\n  'beery',\n  'beets',\n  'befog',\n  'begad',\n  'begar',\n  'begem',\n  'begot',\n  'begum',\n  'beige',\n  'beigy',\n  'beins',\n  'bekah',\n  'belah',\n  'belar',\n  'belay',\n  'belee',\n  'belga',\n  'bells',\n  'belon',\n  'belts',\n  'bemad',\n  'bemas',\n  'bemix',\n  'bemud',\n  'bends',\n  'bendy',\n  'benes',\n  'benet',\n  'benga',\n  'benis',\n  'benne',\n  'benni',\n  'benny',\n  'bento',\n  'bents',\n  'benty',\n  'bepat',\n  'beray',\n  'beres',\n  'bergs',\n  'berko',\n  'berks',\n  'berme',\n  'berms',\n  'berob',\n  'beryl',\n  'besat',\n  'besaw',\n  'besee',\n  'beses',\n  'besit',\n  'besom',\n  'besot',\n  'besti',\n  'bests',\n  'betas',\n  'beted',\n  'betes',\n  'beths',\n  'betid',\n  'beton',\n  'betta',\n  'betty',\n  'bever',\n  'bevor',\n  'bevue',\n  'bevvy',\n  'bewet',\n  'bewig',\n  'bezes',\n  'bezil',\n  'bezzy',\n  'bhais',\n  'bhaji',\n  'bhang',\n  'bhats',\n  'bhels',\n  'bhoot',\n  'bhuna',\n  'bhuts',\n  'biach',\n  'biali',\n  'bialy',\n  'bibbs',\n  'bibes',\n  'biccy',\n  'bices',\n  'bided',\n  'bider',\n  'bides',\n  'bidet',\n  'bidis',\n  'bidon',\n  'bield',\n  'biers',\n  'biffo',\n  'biffs',\n  'biffy',\n  'bifid',\n  'bigae',\n  'biggs',\n  'biggy',\n  'bigha',\n  'bight',\n  'bigly',\n  'bigos',\n  'bijou',\n  'biked',\n  'biker',\n  'bikes',\n  'bikie',\n  'bilbo',\n  'bilby',\n  'biled',\n  'biles',\n  'bilgy',\n  'bilks',\n  'bills',\n  'bimah',\n  'bimas',\n  'bimbo',\n  'binal',\n  'bindi',\n  'binds',\n  'biner',\n  'bines',\n  'bings',\n  'bingy',\n  'binit',\n  'binks',\n  'bints',\n  'biogs',\n  'biont',\n  'biota',\n  'biped',\n  'bipod',\n  'birds',\n  'birks',\n  'birle',\n  'birls',\n  'biros',\n  'birrs',\n  'birse',\n  'birsy',\n  'bises',\n  'bisks',\n  'bisom',\n  'bitch',\n  'biter',\n  'bites',\n  'bitos',\n  'bitou',\n  'bitsy',\n  'bitte',\n  'bitts',\n  'bivia',\n  'bivvy',\n  'bizes',\n  'bizzo',\n  'bizzy',\n  'blabs',\n  'blads',\n  'blady',\n  'blaer',\n  'blaes',\n  'blaff',\n  'blags',\n  'blahs',\n  'blain',\n  'blams',\n  'blart',\n  'blase',\n  'blash',\n  'blate',\n  'blats',\n  'blatt',\n  'blaud',\n  'blawn',\n  'blaws',\n  'blays',\n  'blear',\n  'blebs',\n  'blech',\n  'blees',\n  'blent',\n  'blert',\n  'blest',\n  'blets',\n  'bleys',\n  'blimy',\n  'bling',\n  'blini',\n  'blins',\n  'bliny',\n  'blips',\n  'blist',\n  'blite',\n  'blits',\n  'blive',\n  'blobs',\n  'blocs',\n  'blogs',\n  'blook',\n  'bloop',\n  'blore',\n  'blots',\n  'blows',\n  'blowy',\n  'blubs',\n  'blude',\n  'bluds',\n  'bludy',\n  'blued',\n  'blues',\n  'bluet',\n  'bluey',\n  'bluid',\n  'blume',\n  'blunk',\n  'blurs',\n  'blype',\n  'boabs',\n  'boaks',\n  'boars',\n  'boart',\n  'boats',\n  'bobac',\n  'bobak',\n  'bobas',\n  'bobol',\n  'bobos',\n  'bocca',\n  'bocce',\n  'bocci',\n  'boche',\n  'bocks',\n  'boded',\n  'bodes',\n  'bodge',\n  'bodhi',\n  'bodle',\n  'boeps',\n  'boets',\n  'boeuf',\n  'boffo',\n  'boffs',\n  'bogan',\n  'bogey',\n  'boggy',\n  'bogie',\n  'bogle',\n  'bogue',\n  'bogus',\n  'bohea',\n  'bohos',\n  'boils',\n  'boing',\n  'boink',\n  'boite',\n  'boked',\n  'bokeh',\n  'bokes',\n  'bokos',\n  'bolar',\n  'bolas',\n  'bolds',\n  'boles',\n  'bolix',\n  'bolls',\n  'bolos',\n  'bolts',\n  'bolus',\n  'bomas',\n  'bombe',\n  'bombo',\n  'bombs',\n  'bonce',\n  'bonds',\n  'boned',\n  'boner',\n  'bones',\n  'bongs',\n  'bonie',\n  'bonks',\n  'bonne',\n  'bonny',\n  'bonza',\n  'bonze',\n  'booai',\n  'booay',\n  'boobs',\n  'boody',\n  'booed',\n  'boofy',\n  'boogy',\n  'boohs',\n  'books',\n  'booky',\n  'bools',\n  'booms',\n  'boomy',\n  'boong',\n  'boons',\n  'boord',\n  'boors',\n  'boose',\n  'boots',\n  'boppy',\n  'borak',\n  'boral',\n  'boras',\n  'borde',\n  'bords',\n  'bored',\n  'boree',\n  'borel',\n  'borer',\n  'bores',\n  'borgo',\n  'boric',\n  'borks',\n  'borms',\n  'borna',\n  'boron',\n  'borts',\n  'borty',\n  'bortz',\n  'bosie',\n  'bosks',\n  'bosky',\n  'boson',\n  'bosun',\n  'botas',\n  'botel',\n  'botes',\n  'bothy',\n  'botte',\n  'botts',\n  'botty',\n  'bouge',\n  'bouks',\n  'boult',\n  'bouns',\n  'bourd',\n  'bourg',\n  'bourn',\n  'bouse',\n  'bousy',\n  'bouts',\n  'bovid',\n  'bowat',\n  'bowed',\n  'bower',\n  'bowes',\n  'bowet',\n  'bowie',\n  'bowls',\n  'bowne',\n  'bowrs',\n  'bowse',\n  'boxed',\n  'boxen',\n  'boxes',\n  'boxla',\n  'boxty',\n  'boyar',\n  'boyau',\n  'boyed',\n  'boyfs',\n  'boygs',\n  'boyla',\n  'boyos',\n  'boysy',\n  'bozos',\n  'braai',\n  'brach',\n  'brack',\n  'bract',\n  'brads',\n  'braes',\n  'brags',\n  'brail',\n  'braks',\n  'braky',\n  'brame',\n  'brane',\n  'brank',\n  'brans',\n  'brant',\n  'brast',\n  'brats',\n  'brava',\n  'bravi',\n  'braws',\n  'braxy',\n  'brays',\n  'braza',\n  'braze',\n  'bream',\n  'brede',\n  'breds',\n  'breem',\n  'breer',\n  'brees',\n  'breid',\n  'breis',\n  'breme',\n  'brens',\n  'brent',\n  'brere',\n  'brers',\n  'breve',\n  'brews',\n  'breys',\n  'brier',\n  'bries',\n  'brigs',\n  'briki',\n  'briks',\n  'brill',\n  'brims',\n  'brins',\n  'brios',\n  'brise',\n  'briss',\n  'brith',\n  'brits',\n  'britt',\n  'brize',\n  'broch',\n  'brock',\n  'brods',\n  'brogh',\n  'brogs',\n  'brome',\n  'bromo',\n  'bronc',\n  'brond',\n  'brool',\n  'broos',\n  'brose',\n  'brosy',\n  'brows',\n  'brugh',\n  'bruin',\n  'bruit',\n  'brule',\n  'brume',\n  'brung',\n  'brusk',\n  'brust',\n  'bruts',\n  'buats',\n  'buaze',\n  'bubal',\n  'bubas',\n  'bubba',\n  'bubbe',\n  'bubby',\n  'bubus',\n  'buchu',\n  'bucko',\n  'bucks',\n  'bucku',\n  'budas',\n  'budis',\n  'budos',\n  'buffa',\n  'buffe',\n  'buffi',\n  'buffo',\n  'buffs',\n  'buffy',\n  'bufos',\n  'bufty',\n  'buhls',\n  'buhrs',\n  'buiks',\n  'buist',\n  'bukes',\n  'bulbs',\n  'bulgy',\n  'bulks',\n  'bulla',\n  'bulls',\n  'bulse',\n  'bumbo',\n  'bumfs',\n  'bumph',\n  'bumps',\n  'bumpy',\n  'bunas',\n  'bunce',\n  'bunco',\n  'bunde',\n  'bundh',\n  'bunds',\n  'bundt',\n  'bundu',\n  'bundy',\n  'bungs',\n  'bungy',\n  'bunia',\n  'bunje',\n  'bunjy',\n  'bunko',\n  'bunks',\n  'bunns',\n  'bunts',\n  'bunty',\n  'bunya',\n  'buoys',\n  'buppy',\n  'buran',\n  'buras',\n  'burbs',\n  'burds',\n  'buret',\n  'burfi',\n  'burgh',\n  'burgs',\n  'burin',\n  'burka',\n  'burke',\n  'burks',\n  'burls',\n  'burns',\n  'buroo',\n  'burps',\n  'burqa',\n  'burro',\n  'burrs',\n  'burry',\n  'bursa',\n  'burse',\n  'busby',\n  'buses',\n  'busks',\n  'busky',\n  'bussu',\n  'busti',\n  'busts',\n  'busty',\n  'buteo',\n  'butes',\n  'butle',\n  'butoh',\n  'butts',\n  'butty',\n  'butut',\n  'butyl',\n  'buzzy',\n  'bwana',\n  'bwazi',\n  'byded',\n  'bydes',\n  'byked',\n  'bykes',\n  'byres',\n  'byrls',\n  'byssi',\n  'bytes',\n  'byway',\n  'caaed',\n  'cabas',\n  'caber',\n  'cabob',\n  'caboc',\n  'cabre',\n  'cacas',\n  'cacks',\n  'cacky',\n  'cadee',\n  'cades',\n  'cadge',\n  'cadgy',\n  'cadie',\n  'cadis',\n  'cadre',\n  'caeca',\n  'caese',\n  'cafes',\n  'caffs',\n  'caged',\n  'cager',\n  'cages',\n  'cagot',\n  'cahow',\n  'caids',\n  'cains',\n  'caird',\n  'cajon',\n  'cajun',\n  'caked',\n  'cakes',\n  'cakey',\n  'calfs',\n  'calid',\n  'calif',\n  'calix',\n  'calks',\n  'calla',\n  'calls',\n  'calms',\n  'calmy',\n  'calos',\n  'calpa',\n  'calps',\n  'calve',\n  'calyx',\n  'caman',\n  'camas',\n  'cames',\n  'camis',\n  'camos',\n  'campi',\n  'campo',\n  'camps',\n  'campy',\n  'camus',\n  'caned',\n  'caneh',\n  'caner',\n  'canes',\n  'cangs',\n  'canid',\n  'canna',\n  'canns',\n  'canso',\n  'canst',\n  'canto',\n  'cants',\n  'canty',\n  'capas',\n  'caped',\n  'capes',\n  'capex',\n  'caphs',\n  'capiz',\n  'caple',\n  'capon',\n  'capos',\n  'capot',\n  'capri',\n  'capul',\n  'carap',\n  'carbo',\n  'carbs',\n  'carby',\n  'cardi',\n  'cards',\n  'cardy',\n  'cared',\n  'carer',\n  'cares',\n  'caret',\n  'carex',\n  'carks',\n  'carle',\n  'carls',\n  'carns',\n  'carny',\n  'carob',\n  'carom',\n  'caron',\n  'carpi',\n  'carps',\n  'carrs',\n  'carse',\n  'carta',\n  'carte',\n  'carts',\n  'carvy',\n  'casas',\n  'casco',\n  'cased',\n  'cases',\n  'casks',\n  'casky',\n  'casts',\n  'casus',\n  'cates',\n  'cauda',\n  'cauks',\n  'cauld',\n  'cauls',\n  'caums',\n  'caups',\n  'cauri',\n  'causa',\n  'cavas',\n  'caved',\n  'cavel',\n  'caver',\n  'caves',\n  'cavie',\n  'cawed',\n  'cawks',\n  'caxon',\n  'ceaze',\n  'cebid',\n  'cecal',\n  'cecum',\n  'ceded',\n  'ceder',\n  'cedes',\n  'cedis',\n  'ceiba',\n  'ceili',\n  'ceils',\n  'celeb',\n  'cella',\n  'celli',\n  'cells',\n  'celom',\n  'celts',\n  'cense',\n  'cento',\n  'cents',\n  'centu',\n  'ceorl',\n  'cepes',\n  'cerci',\n  'cered',\n  'ceres',\n  'cerge',\n  'ceria',\n  'ceric',\n  'cerne',\n  'ceroc',\n  'ceros',\n  'certs',\n  'certy',\n  'cesse',\n  'cesta',\n  'cesti',\n  'cetes',\n  'cetyl',\n  'cezve',\n  'chace',\n  'chack',\n  'chaco',\n  'chado',\n  'chads',\n  'chaft',\n  'chais',\n  'chals',\n  'chams',\n  'chana',\n  'chang',\n  'chank',\n  'chape',\n  'chaps',\n  'chapt',\n  'chara',\n  'chare',\n  'chark',\n  'charr',\n  'chars',\n  'chary',\n  'chats',\n  'chave',\n  'chavs',\n  'chawk',\n  'chaws',\n  'chaya',\n  'chays',\n  'cheep',\n  'chefs',\n  'cheka',\n  'chela',\n  'chelp',\n  'chemo',\n  'chems',\n  'chere',\n  'chert',\n  'cheth',\n  'chevy',\n  'chews',\n  'chewy',\n  'chiao',\n  'chias',\n  'chibs',\n  'chica',\n  'chich',\n  'chico',\n  'chics',\n  'chiel',\n  'chiks',\n  'chile',\n  'chimb',\n  'chimo',\n  'chimp',\n  'chine',\n  'ching',\n  'chink',\n  'chino',\n  'chins',\n  'chips',\n  'chirk',\n  'chirl',\n  'chirm',\n  'chiro',\n  'chirr',\n  'chirt',\n  'chiru',\n  'chits',\n  'chive',\n  'chivs',\n  'chivy',\n  'chizz',\n  'choco',\n  'chocs',\n  'chode',\n  'chogs',\n  'choil',\n  'choko',\n  'choky',\n  'chola',\n  'choli',\n  'cholo',\n  'chomp',\n  'chons',\n  'choof',\n  'chook',\n  'choom',\n  'choon',\n  'chops',\n  'chota',\n  'chott',\n  'chout',\n  'choux',\n  'chowk',\n  'chows',\n  'chubs',\n  'chufa',\n  'chuff',\n  'chugs',\n  'chums',\n  'churl',\n  'churr',\n  'chuse',\n  'chuts',\n  'chyle',\n  'chyme',\n  'chynd',\n  'cibol',\n  'cided',\n  'cides',\n  'ciels',\n  'ciggy',\n  'cilia',\n  'cills',\n  'cimar',\n  'cimex',\n  'cinct',\n  'cines',\n  'cinqs',\n  'cions',\n  'cippi',\n  'circs',\n  'cires',\n  'cirls',\n  'cirri',\n  'cisco',\n  'cissy',\n  'cists',\n  'cital',\n  'cited',\n  'citer',\n  'cites',\n  'cives',\n  'civet',\n  'civie',\n  'civvy',\n  'clach',\n  'clade',\n  'clads',\n  'claes',\n  'clags',\n  'clame',\n  'clams',\n  'clans',\n  'claps',\n  'clapt',\n  'claro',\n  'clart',\n  'clary',\n  'clast',\n  'clats',\n  'claut',\n  'clave',\n  'clavi',\n  'claws',\n  'clays',\n  'cleck',\n  'cleek',\n  'cleep',\n  'clefs',\n  'clegs',\n  'cleik',\n  'clems',\n  'clepe',\n  'clept',\n  'cleve',\n  'clews',\n  'clied',\n  'clies',\n  'clift',\n  'clime',\n  'cline',\n  'clint',\n  'clipe',\n  'clips',\n  'clipt',\n  'clits',\n  'cloam',\n  'clods',\n  'cloff',\n  'clogs',\n  'cloke',\n  'clomb',\n  'clomp',\n  'clonk',\n  'clons',\n  'cloop',\n  'cloot',\n  'clops',\n  'clote',\n  'clots',\n  'clour',\n  'clous',\n  'clows',\n  'cloye',\n  'cloys',\n  'cloze',\n  'clubs',\n  'clues',\n  'cluey',\n  'clunk',\n  'clype',\n  'cnida',\n  'coact',\n  'coady',\n  'coala',\n  'coals',\n  'coaly',\n  'coapt',\n  'coarb',\n  'coate',\n  'coati',\n  'coats',\n  'cobbs',\n  'cobby',\n  'cobia',\n  'coble',\n  'cobza',\n  'cocas',\n  'cocci',\n  'cocco',\n  'cocks',\n  'cocky',\n  'cocos',\n  'codas',\n  'codec',\n  'coded',\n  'coden',\n  'coder',\n  'codes',\n  'codex',\n  'codon',\n  'coeds',\n  'coffs',\n  'cogie',\n  'cogon',\n  'cogue',\n  'cohab',\n  'cohen',\n  'cohoe',\n  'cohog',\n  'cohos',\n  'coifs',\n  'coign',\n  'coils',\n  'coins',\n  'coirs',\n  'coits',\n  'coked',\n  'cokes',\n  'colas',\n  'colby',\n  'colds',\n  'coled',\n  'coles',\n  'coley',\n  'colic',\n  'colin',\n  'colls',\n  'colly',\n  'colog',\n  'colts',\n  'colza',\n  'comae',\n  'comal',\n  'comas',\n  'combe',\n  'combi',\n  'combo',\n  'combs',\n  'comby',\n  'comer',\n  'comes',\n  'comix',\n  'commo',\n  'comms',\n  'commy',\n  'compo',\n  'comps',\n  'compt',\n  'comte',\n  'comus',\n  'coned',\n  'cones',\n  'coney',\n  'confs',\n  'conga',\n  'conge',\n  'congo',\n  'conia',\n  'conin',\n  'conks',\n  'conky',\n  'conne',\n  'conns',\n  'conte',\n  'conto',\n  'conus',\n  'convo',\n  'cooch',\n  'cooed',\n  'cooee',\n  'cooer',\n  'cooey',\n  'coofs',\n  'cooks',\n  'cooky',\n  'cools',\n  'cooly',\n  'coomb',\n  'cooms',\n  'coomy',\n  'coons',\n  'coops',\n  'coopt',\n  'coost',\n  'coots',\n  'cooze',\n  'copal',\n  'copay',\n  'coped',\n  'copen',\n  'coper',\n  'copes',\n  'coppy',\n  'copra',\n  'copsy',\n  'coqui',\n  'coram',\n  'corbe',\n  'corby',\n  'cords',\n  'cored',\n  'cores',\n  'corey',\n  'corgi',\n  'coria',\n  'corks',\n  'corky',\n  'corms',\n  'corni',\n  'corno',\n  'corns',\n  'cornu',\n  'corps',\n  'corse',\n  'corso',\n  'cosec',\n  'cosed',\n  'coses',\n  'coset',\n  'cosey',\n  'cosie',\n  'costa',\n  'coste',\n  'costs',\n  'cotan',\n  'coted',\n  'cotes',\n  'coths',\n  'cotta',\n  'cotts',\n  'coude',\n  'coups',\n  'courb',\n  'courd',\n  'coure',\n  'cours',\n  'couta',\n  'couth',\n  'coved',\n  'coves',\n  'covin',\n  'cowal',\n  'cowan',\n  'cowed',\n  'cowks',\n  'cowls',\n  'cowps',\n  'cowry',\n  'coxae',\n  'coxal',\n  'coxed',\n  'coxes',\n  'coxib',\n  'coyau',\n  'coyed',\n  'coyer',\n  'coypu',\n  'cozed',\n  'cozen',\n  'cozes',\n  'cozey',\n  'cozie',\n  'craal',\n  'crabs',\n  'crags',\n  'craic',\n  'craig',\n  'crake',\n  'crame',\n  'crams',\n  'crans',\n  'crape',\n  'craps',\n  'crapy',\n  'crare',\n  'craws',\n  'crays',\n  'creds',\n  'creel',\n  'crees',\n  'crems',\n  'crena',\n  'creps',\n  'crepy',\n  'crewe',\n  'crews',\n  'crias',\n  'cribs',\n  'cries',\n  'crims',\n  'crine',\n  'crios',\n  'cripe',\n  'crips',\n  'crise',\n  'crith',\n  'crits',\n  'croci',\n  'crocs',\n  'croft',\n  'crogs',\n  'cromb',\n  'crome',\n  'cronk',\n  'crons',\n  'crool',\n  'croon',\n  'crops',\n  'crore',\n  'crost',\n  'crout',\n  'crows',\n  'croze',\n  'cruck',\n  'crudo',\n  'cruds',\n  'crudy',\n  'crues',\n  'cruet',\n  'cruft',\n  'crunk',\n  'cruor',\n  'crura',\n  'cruse',\n  'crusy',\n  'cruve',\n  'crwth',\n  'cryer',\n  'ctene',\n  'cubby',\n  'cubeb',\n  'cubed',\n  'cuber',\n  'cubes',\n  'cubit',\n  'cuddy',\n  'cuffo',\n  'cuffs',\n  'cuifs',\n  'cuing',\n  'cuish',\n  'cuits',\n  'cukes',\n  'culch',\n  'culet',\n  'culex',\n  'culls',\n  'cully',\n  'culms',\n  'culpa',\n  'culti',\n  'cults',\n  'culty',\n  'cumec',\n  'cundy',\n  'cunei',\n  'cunit',\n  'cunts',\n  'cupel',\n  'cupid',\n  'cuppa',\n  'cuppy',\n  'curat',\n  'curbs',\n  'curch',\n  'curds',\n  'curdy',\n  'cured',\n  'curer',\n  'cures',\n  'curet',\n  'curfs',\n  'curia',\n  'curie',\n  'curli',\n  'curls',\n  'curns',\n  'curny',\n  'currs',\n  'cursi',\n  'curst',\n  'cusec',\n  'cushy',\n  'cusks',\n  'cusps',\n  'cuspy',\n  'cusso',\n  'cusum',\n  'cutch',\n  'cuter',\n  'cutes',\n  'cutey',\n  'cutin',\n  'cutis',\n  'cutto',\n  'cutty',\n  'cutup',\n  'cuvee',\n  'cuzes',\n  'cwtch',\n  'cyano',\n  'cyans',\n  'cycad',\n  'cycas',\n  'cyclo',\n  'cyder',\n  'cylix',\n  'cymae',\n  'cymar',\n  'cymas',\n  'cymes',\n  'cymol',\n  'cysts',\n  'cytes',\n  'cyton',\n  'czars',\n  'daals',\n  'dabba',\n  'daces',\n  'dacha',\n  'dacks',\n  'dadah',\n  'dadas',\n  'dados',\n  'daffs',\n  'daffy',\n  'dagga',\n  'daggy',\n  'dagos',\n  'dahls',\n  'daiko',\n  'daine',\n  'daint',\n  'daker',\n  'daled',\n  'dales',\n  'dalis',\n  'dalle',\n  'dalts',\n  'daman',\n  'damar',\n  'dames',\n  'damme',\n  'damns',\n  'damps',\n  'dampy',\n  'dancy',\n  'dangs',\n  'danio',\n  'danks',\n  'danny',\n  'dants',\n  'daraf',\n  'darbs',\n  'darcy',\n  'dared',\n  'darer',\n  'dares',\n  'darga',\n  'dargs',\n  'daric',\n  'daris',\n  'darks',\n  'darky',\n  'darns',\n  'darre',\n  'darts',\n  'darzi',\n  'dashi',\n  'dashy',\n  'datal',\n  'dated',\n  'dater',\n  'dates',\n  'datos',\n  'datto',\n  'daube',\n  'daubs',\n  'dauby',\n  'dauds',\n  'dault',\n  'daurs',\n  'dauts',\n  'daven',\n  'davit',\n  'dawah',\n  'dawds',\n  'dawed',\n  'dawen',\n  'dawks',\n  'dawns',\n  'dawts',\n  'dayan',\n  'daych',\n  'daynt',\n  'dazed',\n  'dazer',\n  'dazes',\n  'deads',\n  'deair',\n  'deals',\n  'deans',\n  'deare',\n  'dearn',\n  'dears',\n  'deary',\n  'deash',\n  'deave',\n  'deaws',\n  'deawy',\n  'debag',\n  'debby',\n  'debel',\n  'debes',\n  'debts',\n  'debud',\n  'debur',\n  'debus',\n  'debye',\n  'decad',\n  'decaf',\n  'decan',\n  'decko',\n  'decks',\n  'decos',\n  'dedal',\n  'deeds',\n  'deedy',\n  'deely',\n  'deems',\n  'deens',\n  'deeps',\n  'deere',\n  'deers',\n  'deets',\n  'deeve',\n  'deevs',\n  'defat',\n  'deffo',\n  'defis',\n  'defog',\n  'degas',\n  'degum',\n  'degus',\n  'deice',\n  'deids',\n  'deify',\n  'deils',\n  'deism',\n  'deist',\n  'deked',\n  'dekes',\n  'dekko',\n  'deled',\n  'deles',\n  'delfs',\n  'delft',\n  'delis',\n  'dells',\n  'delly',\n  'delos',\n  'delph',\n  'delts',\n  'deman',\n  'demes',\n  'demic',\n  'demit',\n  'demob',\n  'demoi',\n  'demos',\n  'dempt',\n  'denar',\n  'denay',\n  'dench',\n  'denes',\n  'denet',\n  'denis',\n  'dents',\n  'deoxy',\n  'derat',\n  'deray',\n  'dered',\n  'deres',\n  'derig',\n  'derma',\n  'derms',\n  'derns',\n  'derny',\n  'deros',\n  'derro',\n  'derry',\n  'derth',\n  'dervs',\n  'desex',\n  'deshi',\n  'desis',\n  'desks',\n  'desse',\n  'devas',\n  'devel',\n  'devis',\n  'devon',\n  'devos',\n  'devot',\n  'dewan',\n  'dewar',\n  'dewax',\n  'dewed',\n  'dexes',\n  'dexie',\n  'dhaba',\n  'dhaks',\n  'dhals',\n  'dhikr',\n  'dhobi',\n  'dhole',\n  'dholl',\n  'dhols',\n  'dhoti',\n  'dhows',\n  'dhuti',\n  'diact',\n  'dials',\n  'diane',\n  'diazo',\n  'dibbs',\n  'diced',\n  'dicer',\n  'dices',\n  'dicht',\n  'dicks',\n  'dicky',\n  'dicot',\n  'dicta',\n  'dicts',\n  'dicty',\n  'diddy',\n  'didie',\n  'didos',\n  'didst',\n  'diebs',\n  'diels',\n  'diene',\n  'diets',\n  'diffs',\n  'dight',\n  'dikas',\n  'diked',\n  'diker',\n  'dikes',\n  'dikey',\n  'dildo',\n  'dilli',\n  'dills',\n  'dimbo',\n  'dimer',\n  'dimes',\n  'dimps',\n  'dinar',\n  'dined',\n  'dines',\n  'dinge',\n  'dings',\n  'dinic',\n  'dinks',\n  'dinky',\n  'dinna',\n  'dinos',\n  'dints',\n  'diols',\n  'diota',\n  'dippy',\n  'dipso',\n  'diram',\n  'direr',\n  'dirke',\n  'dirks',\n  'dirls',\n  'dirts',\n  'disas',\n  'disci',\n  'discs',\n  'dishy',\n  'disks',\n  'disme',\n  'dital',\n  'ditas',\n  'dited',\n  'dites',\n  'ditsy',\n  'ditts',\n  'ditzy',\n  'divan',\n  'divas',\n  'dived',\n  'dives',\n  'divis',\n  'divna',\n  'divos',\n  'divot',\n  'divvy',\n  'diwan',\n  'dixie',\n  'dixit',\n  'diyas',\n  'dizen',\n  'djinn',\n  'djins',\n  'doabs',\n  'doats',\n  'dobby',\n  'dobes',\n  'dobie',\n  'dobla',\n  'dobra',\n  'dobro',\n  'docht',\n  'docks',\n  'docos',\n  'docus',\n  'doddy',\n  'dodos',\n  'doeks',\n  'doers',\n  'doest',\n  'doeth',\n  'doffs',\n  'dogan',\n  'doges',\n  'dogey',\n  'doggo',\n  'doggy',\n  'dogie',\n  'dohyo',\n  'doilt',\n  'doily',\n  'doits',\n  'dojos',\n  'dolce',\n  'dolci',\n  'doled',\n  'doles',\n  'dolia',\n  'dolls',\n  'dolma',\n  'dolor',\n  'dolos',\n  'dolts',\n  'domal',\n  'domed',\n  'domes',\n  'domic',\n  'donah',\n  'donas',\n  'donee',\n  'doner',\n  'donga',\n  'dongs',\n  'donko',\n  'donna',\n  'donne',\n  'donny',\n  'donsy',\n  'doobs',\n  'dooce',\n  'doody',\n  'dooks',\n  'doole',\n  'dools',\n  'dooly',\n  'dooms',\n  'doomy',\n  'doona',\n  'doorn',\n  'doors',\n  'doozy',\n  'dopas',\n  'doped',\n  'doper',\n  'dopes',\n  'dorad',\n  'dorba',\n  'dorbs',\n  'doree',\n  'dores',\n  'doric',\n  'doris',\n  'dorks',\n  'dorky',\n  'dorms',\n  'dormy',\n  'dorps',\n  'dorrs',\n  'dorsa',\n  'dorse',\n  'dorts',\n  'dorty',\n  'dosai',\n  'dosas',\n  'dosed',\n  'doseh',\n  'doser',\n  'doses',\n  'dosha',\n  'dotal',\n  'doted',\n  'doter',\n  'dotes',\n  'dotty',\n  'douar',\n  'douce',\n  'doucs',\n  'douks',\n  'doula',\n  'douma',\n  'doums',\n  'doups',\n  'doura',\n  'douse',\n  'douts',\n  'doved',\n  'doven',\n  'dover',\n  'doves',\n  'dovie',\n  'dowar',\n  'dowds',\n  'dowed',\n  'dower',\n  'dowie',\n  'dowle',\n  'dowls',\n  'dowly',\n  'downa',\n  'downs',\n  'dowps',\n  'dowse',\n  'dowts',\n  'doxed',\n  'doxes',\n  'doxie',\n  'doyen',\n  'doyly',\n  'dozed',\n  'dozer',\n  'dozes',\n  'drabs',\n  'drack',\n  'draco',\n  'draff',\n  'drags',\n  'drail',\n  'drams',\n  'drant',\n  'draps',\n  'drats',\n  'drave',\n  'draws',\n  'drays',\n  'drear',\n  'dreck',\n  'dreed',\n  'dreer',\n  'drees',\n  'dregs',\n  'dreks',\n  'drent',\n  'drere',\n  'drest',\n  'dreys',\n  'dribs',\n  'drice',\n  'dries',\n  'drily',\n  'drips',\n  'dript',\n  'droid',\n  'droil',\n  'droke',\n  'drole',\n  'drome',\n  'drony',\n  'droob',\n  'droog',\n  'drook',\n  'drops',\n  'dropt',\n  'drouk',\n  'drows',\n  'drubs',\n  'drugs',\n  'drums',\n  'drupe',\n  'druse',\n  'drusy',\n  'druxy',\n  'dryad',\n  'dryas',\n  'dsobo',\n  'dsomo',\n  'duads',\n  'duals',\n  'duans',\n  'duars',\n  'dubbo',\n  'ducal',\n  'ducat',\n  'duces',\n  'ducks',\n  'ducky',\n  'ducts',\n  'duddy',\n  'duded',\n  'dudes',\n  'duels',\n  'duets',\n  'duett',\n  'duffs',\n  'dufus',\n  'duing',\n  'duits',\n  'dukas',\n  'duked',\n  'dukes',\n  'dukka',\n  'dulce',\n  'dules',\n  'dulia',\n  'dulls',\n  'dulse',\n  'dumas',\n  'dumbo',\n  'dumbs',\n  'dumka',\n  'dumky',\n  'dumps',\n  'dunam',\n  'dunch',\n  'dunes',\n  'dungs',\n  'dungy',\n  'dunks',\n  'dunno',\n  'dunny',\n  'dunsh',\n  'dunts',\n  'duomi',\n  'duomo',\n  'duped',\n  'duper',\n  'dupes',\n  'duple',\n  'duply',\n  'duppy',\n  'dural',\n  'duras',\n  'dured',\n  'dures',\n  'durgy',\n  'durns',\n  'duroc',\n  'duros',\n  'duroy',\n  'durra',\n  'durrs',\n  'durry',\n  'durst',\n  'durum',\n  'durzi',\n  'dusks',\n  'dusts',\n  'duxes',\n  'dwaal',\n  'dwale',\n  'dwalm',\n  'dwams',\n  'dwang',\n  'dwaum',\n  'dweeb',\n  'dwile',\n  'dwine',\n  'dyads',\n  'dyers',\n  'dyked',\n  'dykes',\n  'dykey',\n  'dykon',\n  'dynel',\n  'dynes',\n  'dzhos',\n  'eagre',\n  'ealed',\n  'eales',\n  'eaned',\n  'eards',\n  'eared',\n  'earls',\n  'earns',\n  'earnt',\n  'earst',\n  'eased',\n  'easer',\n  'eases',\n  'easle',\n  'easts',\n  'eathe',\n  'eaved',\n  'eaves',\n  'ebbed',\n  'ebbet',\n  'ebons',\n  'ebook',\n  'ecads',\n  'eched',\n  'eches',\n  'echos',\n  'ecrus',\n  'edema',\n  'edged',\n  'edger',\n  'edges',\n  'edile',\n  'edits',\n  'educe',\n  'educt',\n  'eejit',\n  'eensy',\n  'eeven',\n  'eevns',\n  'effed',\n  'egads',\n  'egers',\n  'egest',\n  'eggar',\n  'egged',\n  'egger',\n  'egmas',\n  'ehing',\n  'eider',\n  'eidos',\n  'eigne',\n  'eiked',\n  'eikon',\n  'eilds',\n  'eisel',\n  'ejido',\n  'ekkas',\n  'elain',\n  'eland',\n  'elans',\n  'elchi',\n  'eldin',\n  'elemi',\n  'elfed',\n  'eliad',\n  'elint',\n  'elmen',\n  'eloge',\n  'elogy',\n  'eloin',\n  'elops',\n  'elpee',\n  'elsin',\n  'elute',\n  'elvan',\n  'elven',\n  'elver',\n  'elves',\n  'emacs',\n  'embar',\n  'embay',\n  'embog',\n  'embow',\n  'embox',\n  'embus',\n  'emeer',\n  'emend',\n  'emerg',\n  'emery',\n  'emeus',\n  'emics',\n  'emirs',\n  'emits',\n  'emmas',\n  'emmer',\n  'emmet',\n  'emmew',\n  'emmys',\n  'emoji',\n  'emong',\n  'emote',\n  'emove',\n  'empts',\n  'emule',\n  'emure',\n  'emyde',\n  'emyds',\n  'enarm',\n  'enate',\n  'ended',\n  'ender',\n  'endew',\n  'endue',\n  'enews',\n  'enfix',\n  'eniac',\n  'enlit',\n  'enmew',\n  'ennog',\n  'enoki',\n  'enols',\n  'enorm',\n  'enows',\n  'enrol',\n  'ensew',\n  'ensky',\n  'entia',\n  'enure',\n  'enurn',\n  'envoi',\n  'enzym',\n  'eorls',\n  'eosin',\n  'epact',\n  'epees',\n  'ephah',\n  'ephas',\n  'ephod',\n  'ephor',\n  'epics',\n  'epode',\n  'epopt',\n  'epris',\n  'eques',\n  'equid',\n  'erbia',\n  'erevs',\n  'ergon',\n  'ergos',\n  'ergot',\n  'erhus',\n  'erica',\n  'erick',\n  'erics',\n  'ering',\n  'erned',\n  'ernes',\n  'erose',\n  'erred',\n  'erses',\n  'eruct',\n  'erugo',\n  'eruvs',\n  'erven',\n  'ervil',\n  'escar',\n  'escot',\n  'esile',\n  'eskar',\n  'esker',\n  'esnes',\n  'esses',\n  'estoc',\n  'estop',\n  'estro',\n  'etage',\n  'etape',\n  'etats',\n  'etens',\n  'ethal',\n  'ethne',\n  'ethyl',\n  'etics',\n  'etnas',\n  'ettin',\n  'ettle',\n  'etuis',\n  'etwee',\n  'etyma',\n  'eughs',\n  'euked',\n  'eupad',\n  'euros',\n  'eusol',\n  'evens',\n  'evert',\n  'evets',\n  'evhoe',\n  'evils',\n  'evite',\n  'evohe',\n  'ewers',\n  'ewest',\n  'ewhow',\n  'ewked',\n  'exams',\n  'exeat',\n  'execs',\n  'exeem',\n  'exeme',\n  'exfil',\n  'exies',\n  'exine',\n  'exing',\n  'exits',\n  'exode',\n  'exome',\n  'exons',\n  'expat',\n  'expos',\n  'exude',\n  'exuls',\n  'exurb',\n  'eyass',\n  'eyers',\n  'eyots',\n  'eyras',\n  'eyres',\n  'eyrie',\n  'eyrir',\n  'ezine',\n  'fabby',\n  'faced',\n  'facer',\n  'faces',\n  'facia',\n  'facta',\n  'facts',\n  'faddy',\n  'faded',\n  'fader',\n  'fades',\n  'fadge',\n  'fados',\n  'faena',\n  'faery',\n  'faffs',\n  'faffy',\n  'faggy',\n  'fagin',\n  'fagot',\n  'faiks',\n  'fails',\n  'faine',\n  'fains',\n  'fairs',\n  'faked',\n  'faker',\n  'fakes',\n  'fakey',\n  'fakie',\n  'fakir',\n  'falaj',\n  'falls',\n  'famed',\n  'fames',\n  'fanal',\n  'fands',\n  'fanes',\n  'fanga',\n  'fango',\n  'fangs',\n  'fanks',\n  'fanon',\n  'fanos',\n  'fanum',\n  'faqir',\n  'farad',\n  'farci',\n  'farcy',\n  'fards',\n  'fared',\n  'farer',\n  'fares',\n  'farle',\n  'farls',\n  'farms',\n  'faros',\n  'farro',\n  'farse',\n  'farts',\n  'fasci',\n  'fasti',\n  'fasts',\n  'fated',\n  'fates',\n  'fatly',\n  'fatso',\n  'fatwa',\n  'faugh',\n  'fauld',\n  'fauns',\n  'faurd',\n  'fauts',\n  'fauve',\n  'favas',\n  'favel',\n  'faver',\n  'faves',\n  'favus',\n  'fawns',\n  'fawny',\n  'faxed',\n  'faxes',\n  'fayed',\n  'fayer',\n  'fayne',\n  'fayre',\n  'fazed',\n  'fazes',\n  'feals',\n  'feare',\n  'fears',\n  'feart',\n  'fease',\n  'feats',\n  'feaze',\n  'feces',\n  'fecht',\n  'fecit',\n  'fecks',\n  'fedex',\n  'feebs',\n  'feeds',\n  'feels',\n  'feens',\n  'feers',\n  'feese',\n  'feeze',\n  'fehme',\n  'feint',\n  'feist',\n  'felch',\n  'felid',\n  'fells',\n  'felly',\n  'felts',\n  'felty',\n  'femal',\n  'femes',\n  'femmy',\n  'fends',\n  'fendy',\n  'fenis',\n  'fenks',\n  'fenny',\n  'fents',\n  'feods',\n  'feoff',\n  'ferer',\n  'feres',\n  'feria',\n  'ferly',\n  'fermi',\n  'ferms',\n  'ferns',\n  'ferny',\n  'fesse',\n  'festa',\n  'fests',\n  'festy',\n  'fetas',\n  'feted',\n  'fetes',\n  'fetor',\n  'fetta',\n  'fetts',\n  'fetwa',\n  'feuar',\n  'feuds',\n  'feued',\n  'feyed',\n  'feyer',\n  'feyly',\n  'fezes',\n  'fezzy',\n  'fiars',\n  'fiats',\n  'fibro',\n  'fices',\n  'fiche',\n  'fichu',\n  'ficin',\n  'ficos',\n  'fides',\n  'fidge',\n  'fidos',\n  'fiefs',\n  'fient',\n  'fiere',\n  'fiers',\n  'fiest',\n  'fifed',\n  'fifer',\n  'fifes',\n  'fifis',\n  'figgy',\n  'figos',\n  'fiked',\n  'fikes',\n  'filar',\n  'filch',\n  'filed',\n  'files',\n  'filii',\n  'filks',\n  'fille',\n  'fillo',\n  'fills',\n  'filmi',\n  'films',\n  'filos',\n  'filum',\n  'finca',\n  'finds',\n  'fined',\n  'fines',\n  'finis',\n  'finks',\n  'finny',\n  'finos',\n  'fiord',\n  'fiqhs',\n  'fique',\n  'fired',\n  'firer',\n  'fires',\n  'firie',\n  'firks',\n  'firms',\n  'firns',\n  'firry',\n  'firth',\n  'fiscs',\n  'fisks',\n  'fists',\n  'fisty',\n  'fitch',\n  'fitly',\n  'fitna',\n  'fitte',\n  'fitts',\n  'fiver',\n  'fives',\n  'fixed',\n  'fixes',\n  'fixit',\n  'fjeld',\n  'flabs',\n  'flaff',\n  'flags',\n  'flaks',\n  'flamm',\n  'flams',\n  'flamy',\n  'flane',\n  'flans',\n  'flaps',\n  'flary',\n  'flats',\n  'flava',\n  'flawn',\n  'flaws',\n  'flawy',\n  'flaxy',\n  'flays',\n  'fleam',\n  'fleas',\n  'fleek',\n  'fleer',\n  'flees',\n  'flegs',\n  'fleme',\n  'fleur',\n  'flews',\n  'flexi',\n  'flexo',\n  'fleys',\n  'flics',\n  'flied',\n  'flies',\n  'flimp',\n  'flims',\n  'flips',\n  'flirs',\n  'flisk',\n  'flite',\n  'flits',\n  'flitt',\n  'flobs',\n  'flocs',\n  'floes',\n  'flogs',\n  'flong',\n  'flops',\n  'flors',\n  'flory',\n  'flosh',\n  'flota',\n  'flote',\n  'flows',\n  'flubs',\n  'flued',\n  'flues',\n  'fluey',\n  'fluky',\n  'flump',\n  'fluor',\n  'flurr',\n  'fluty',\n  'fluyt',\n  'flyby',\n  'flype',\n  'flyte',\n  'foals',\n  'foams',\n  'foehn',\n  'fogey',\n  'fogie',\n  'fogle',\n  'fogou',\n  'fohns',\n  'foids',\n  'foils',\n  'foins',\n  'folds',\n  'foley',\n  'folia',\n  'folic',\n  'folie',\n  'folks',\n  'folky',\n  'fomes',\n  'fonda',\n  'fonds',\n  'fondu',\n  'fones',\n  'fonly',\n  'fonts',\n  'foods',\n  'foody',\n  'fools',\n  'foots',\n  'footy',\n  'foram',\n  'forbs',\n  'forby',\n  'fordo',\n  'fords',\n  'forel',\n  'fores',\n  'forex',\n  'forks',\n  'forky',\n  'forme',\n  'forms',\n  'forts',\n  'forza',\n  'forze',\n  'fossa',\n  'fosse',\n  'fouat',\n  'fouds',\n  'fouer',\n  'fouet',\n  'foule',\n  'fouls',\n  'fount',\n  'fours',\n  'fouth',\n  'fovea',\n  'fowls',\n  'fowth',\n  'foxed',\n  'foxes',\n  'foxie',\n  'foyle',\n  'foyne',\n  'frabs',\n  'frack',\n  'fract',\n  'frags',\n  'fraim',\n  'franc',\n  'frape',\n  'fraps',\n  'frass',\n  'frate',\n  'frati',\n  'frats',\n  'fraus',\n  'frays',\n  'frees',\n  'freet',\n  'freit',\n  'fremd',\n  'frena',\n  'freon',\n  'frere',\n  'frets',\n  'fribs',\n  'frier',\n  'fries',\n  'frigs',\n  'frise',\n  'frist',\n  'frith',\n  'frits',\n  'fritt',\n  'frize',\n  'frizz',\n  'froes',\n  'frogs',\n  'frons',\n  'frore',\n  'frorn',\n  'frory',\n  'frosh',\n  'frows',\n  'frowy',\n  'frugs',\n  'frump',\n  'frush',\n  'frust',\n  'fryer',\n  'fubar',\n  'fubby',\n  'fubsy',\n  'fucks',\n  'fucus',\n  'fuddy',\n  'fudgy',\n  'fuels',\n  'fuero',\n  'fuffs',\n  'fuffy',\n  'fugal',\n  'fuggy',\n  'fugie',\n  'fugio',\n  'fugle',\n  'fugly',\n  'fugus',\n  'fujis',\n  'fulls',\n  'fumed',\n  'fumer',\n  'fumes',\n  'fumet',\n  'fundi',\n  'funds',\n  'fundy',\n  'fungo',\n  'fungs',\n  'funks',\n  'fural',\n  'furan',\n  'furca',\n  'furls',\n  'furol',\n  'furrs',\n  'furth',\n  'furze',\n  'furzy',\n  'fused',\n  'fusee',\n  'fusel',\n  'fuses',\n  'fusil',\n  'fusks',\n  'fusts',\n  'fusty',\n  'futon',\n  'fuzed',\n  'fuzee',\n  'fuzes',\n  'fuzil',\n  'fyces',\n  'fyked',\n  'fykes',\n  'fyles',\n  'fyrds',\n  'fytte',\n  'gabba',\n  'gabby',\n  'gable',\n  'gaddi',\n  'gades',\n  'gadge',\n  'gadid',\n  'gadis',\n  'gadje',\n  'gadjo',\n  'gadso',\n  'gaffs',\n  'gaged',\n  'gager',\n  'gages',\n  'gaids',\n  'gains',\n  'gairs',\n  'gaita',\n  'gaits',\n  'gaitt',\n  'gajos',\n  'galah',\n  'galas',\n  'galax',\n  'galea',\n  'galed',\n  'gales',\n  'galls',\n  'gally',\n  'galop',\n  'galut',\n  'galvo',\n  'gamas',\n  'gamay',\n  'gamba',\n  'gambe',\n  'gambo',\n  'gambs',\n  'gamed',\n  'games',\n  'gamey',\n  'gamic',\n  'gamin',\n  'gamme',\n  'gammy',\n  'gamps',\n  'ganch',\n  'gandy',\n  'ganef',\n  'ganev',\n  'gangs',\n  'ganja',\n  'ganof',\n  'gants',\n  'gaols',\n  'gaped',\n  'gaper',\n  'gapes',\n  'gapos',\n  'gappy',\n  'garbe',\n  'garbo',\n  'garbs',\n  'garda',\n  'gares',\n  'garis',\n  'garms',\n  'garni',\n  'garre',\n  'garth',\n  'garum',\n  'gases',\n  'gasps',\n  'gaspy',\n  'gasts',\n  'gatch',\n  'gated',\n  'gater',\n  'gates',\n  'gaths',\n  'gator',\n  'gauch',\n  'gaucy',\n  'gauds',\n  'gauje',\n  'gault',\n  'gaums',\n  'gaumy',\n  'gaups',\n  'gaurs',\n  'gauss',\n  'gauzy',\n  'gavot',\n  'gawcy',\n  'gawds',\n  'gawks',\n  'gawps',\n  'gawsy',\n  'gayal',\n  'gazal',\n  'gazar',\n  'gazed',\n  'gazes',\n  'gazon',\n  'gazoo',\n  'geals',\n  'geans',\n  'geare',\n  'gears',\n  'geats',\n  'gebur',\n  'gecks',\n  'geeks',\n  'geeps',\n  'geest',\n  'geist',\n  'geits',\n  'gelds',\n  'gelee',\n  'gelid',\n  'gelly',\n  'gelts',\n  'gemel',\n  'gemma',\n  'gemmy',\n  'gemot',\n  'genal',\n  'genas',\n  'genes',\n  'genet',\n  'genic',\n  'genii',\n  'genip',\n  'genny',\n  'genoa',\n  'genom',\n  'genro',\n  'gents',\n  'genty',\n  'genua',\n  'genus',\n  'geode',\n  'geoid',\n  'gerah',\n  'gerbe',\n  'geres',\n  'gerle',\n  'germs',\n  'germy',\n  'gerne',\n  'gesse',\n  'gesso',\n  'geste',\n  'gests',\n  'getas',\n  'getup',\n  'geums',\n  'geyan',\n  'geyer',\n  'ghast',\n  'ghats',\n  'ghaut',\n  'ghazi',\n  'ghees',\n  'ghest',\n  'ghyll',\n  'gibed',\n  'gibel',\n  'giber',\n  'gibes',\n  'gibli',\n  'gibus',\n  'gifts',\n  'gigas',\n  'gighe',\n  'gigot',\n  'gigue',\n  'gilas',\n  'gilds',\n  'gilet',\n  'gills',\n  'gilly',\n  'gilpy',\n  'gilts',\n  'gimel',\n  'gimme',\n  'gimps',\n  'gimpy',\n  'ginch',\n  'ginge',\n  'gings',\n  'ginks',\n  'ginny',\n  'ginzo',\n  'gipon',\n  'gippo',\n  'gippy',\n  'girds',\n  'girls',\n  'girns',\n  'giron',\n  'giros',\n  'girrs',\n  'girsh',\n  'girts',\n  'gismo',\n  'gisms',\n  'gists',\n  'gitch',\n  'gites',\n  'giust',\n  'gived',\n  'gives',\n  'gizmo',\n  'glace',\n  'glads',\n  'glady',\n  'glaik',\n  'glair',\n  'glams',\n  'glans',\n  'glary',\n  'glaum',\n  'glaur',\n  'glazy',\n  'gleba',\n  'glebe',\n  'gleby',\n  'glede',\n  'gleds',\n  'gleed',\n  'gleek',\n  'glees',\n  'gleet',\n  'gleis',\n  'glens',\n  'glent',\n  'gleys',\n  'glial',\n  'glias',\n  'glibs',\n  'gliff',\n  'glift',\n  'glike',\n  'glime',\n  'glims',\n  'glisk',\n  'glits',\n  'glitz',\n  'gloam',\n  'globi',\n  'globs',\n  'globy',\n  'glode',\n  'glogg',\n  'gloms',\n  'gloop',\n  'glops',\n  'glost',\n  'glout',\n  'glows',\n  'gloze',\n  'glued',\n  'gluer',\n  'glues',\n  'gluey',\n  'glugs',\n  'glume',\n  'glums',\n  'gluon',\n  'glute',\n  'gluts',\n  'gnarl',\n  'gnarr',\n  'gnars',\n  'gnats',\n  'gnawn',\n  'gnaws',\n  'gnows',\n  'goads',\n  'goafs',\n  'goals',\n  'goary',\n  'goats',\n  'goaty',\n  'goban',\n  'gobar',\n  'gobbi',\n  'gobbo',\n  'gobby',\n  'gobis',\n  'gobos',\n  'godet',\n  'godso',\n  'goels',\n  'goers',\n  'goest',\n  'goeth',\n  'goety',\n  'gofer',\n  'goffs',\n  'gogga',\n  'gogos',\n  'goier',\n  'gojis',\n  'golds',\n  'goldy',\n  'goles',\n  'golfs',\n  'golpe',\n  'golps',\n  'gombo',\n  'gomer',\n  'gompa',\n  'gonch',\n  'gonef',\n  'gongs',\n  'gonia',\n  'gonif',\n  'gonks',\n  'gonna',\n  'gonof',\n  'gonys',\n  'gonzo',\n  'gooby',\n  'goods',\n  'goofs',\n  'googs',\n  'gooks',\n  'gooky',\n  'goold',\n  'gools',\n  'gooly',\n  'goons',\n  'goony',\n  'goops',\n  'goopy',\n  'goors',\n  'goory',\n  'goosy',\n  'gopak',\n  'gopik',\n  'goral',\n  'goras',\n  'gored',\n  'gores',\n  'goris',\n  'gorms',\n  'gormy',\n  'gorps',\n  'gorse',\n  'gorsy',\n  'gosht',\n  'gosse',\n  'gotch',\n  'goths',\n  'gothy',\n  'gotta',\n  'gouch',\n  'gouks',\n  'goura',\n  'gouts',\n  'gouty',\n  'gowan',\n  'gowds',\n  'gowfs',\n  'gowks',\n  'gowls',\n  'gowns',\n  'goxes',\n  'goyim',\n  'goyle',\n  'graal',\n  'grabs',\n  'grads',\n  'graff',\n  'graip',\n  'grama',\n  'grame',\n  'gramp',\n  'grams',\n  'grana',\n  'grans',\n  'grapy',\n  'gravs',\n  'grays',\n  'grebe',\n  'grebo',\n  'grece',\n  'greek',\n  'grees',\n  'grege',\n  'grego',\n  'grein',\n  'grens',\n  'grese',\n  'greve',\n  'grews',\n  'greys',\n  'grice',\n  'gride',\n  'grids',\n  'griff',\n  'grift',\n  'grigs',\n  'grike',\n  'grins',\n  'griot',\n  'grips',\n  'gript',\n  'gripy',\n  'grise',\n  'grist',\n  'grisy',\n  'grith',\n  'grits',\n  'grize',\n  'groat',\n  'grody',\n  'grogs',\n  'groks',\n  'groma',\n  'grone',\n  'groof',\n  'grosz',\n  'grots',\n  'grouf',\n  'grovy',\n  'grows',\n  'grrls',\n  'grrrl',\n  'grubs',\n  'grued',\n  'grues',\n  'grufe',\n  'grume',\n  'grump',\n  'grund',\n  'gryce',\n  'gryde',\n  'gryke',\n  'grype',\n  'grypt',\n  'guaco',\n  'guana',\n  'guano',\n  'guans',\n  'guars',\n  'gucks',\n  'gucky',\n  'gudes',\n  'guffs',\n  'gugas',\n  'guids',\n  'guimp',\n  'guiro',\n  'gulag',\n  'gular',\n  'gulas',\n  'gules',\n  'gulet',\n  'gulfs',\n  'gulfy',\n  'gulls',\n  'gulph',\n  'gulps',\n  'gulpy',\n  'gumma',\n  'gummi',\n  'gumps',\n  'gundy',\n  'gunge',\n  'gungy',\n  'gunks',\n  'gunky',\n  'gunny',\n  'guqin',\n  'gurdy',\n  'gurge',\n  'gurls',\n  'gurly',\n  'gurns',\n  'gurry',\n  'gursh',\n  'gurus',\n  'gushy',\n  'gusla',\n  'gusle',\n  'gusli',\n  'gussy',\n  'gusts',\n  'gutsy',\n  'gutta',\n  'gutty',\n  'guyed',\n  'guyle',\n  'guyot',\n  'guyse',\n  'gwine',\n  'gyals',\n  'gyans',\n  'gybed',\n  'gybes',\n  'gyeld',\n  'gymps',\n  'gynae',\n  'gynie',\n  'gynny',\n  'gynos',\n  'gyoza',\n  'gypos',\n  'gyppo',\n  'gyppy',\n  'gyral',\n  'gyred',\n  'gyres',\n  'gyron',\n  'gyros',\n  'gyrus',\n  'gytes',\n  'gyved',\n  'gyves',\n  'haafs',\n  'haars',\n  'hable',\n  'habus',\n  'hacek',\n  'hacks',\n  'hadal',\n  'haded',\n  'hades',\n  'hadji',\n  'hadst',\n  'haems',\n  'haets',\n  'haffs',\n  'hafiz',\n  'hafts',\n  'haggs',\n  'hahas',\n  'haick',\n  'haika',\n  'haiks',\n  'haiku',\n  'hails',\n  'haily',\n  'hains',\n  'haint',\n  'hairs',\n  'haith',\n  'hajes',\n  'hajis',\n  'hajji',\n  'hakam',\n  'hakas',\n  'hakea',\n  'hakes',\n  'hakim',\n  'hakus',\n  'halal',\n  'haled',\n  'haler',\n  'hales',\n  'halfa',\n  'halfs',\n  'halid',\n  'hallo',\n  'halls',\n  'halma',\n  'halms',\n  'halon',\n  'halos',\n  'halse',\n  'halts',\n  'halva',\n  'halwa',\n  'hamal',\n  'hamba',\n  'hamed',\n  'hames',\n  'hammy',\n  'hamza',\n  'hanap',\n  'hance',\n  'hanch',\n  'hands',\n  'hangi',\n  'hangs',\n  'hanks',\n  'hanky',\n  'hansa',\n  'hanse',\n  'hants',\n  'haole',\n  'haoma',\n  'hapax',\n  'haply',\n  'happi',\n  'hapus',\n  'haram',\n  'hards',\n  'hared',\n  'hares',\n  'harim',\n  'harks',\n  'harls',\n  'harms',\n  'harns',\n  'haros',\n  'harps',\n  'harts',\n  'hashy',\n  'hasks',\n  'hasps',\n  'hasta',\n  'hated',\n  'hates',\n  'hatha',\n  'hauds',\n  'haufs',\n  'haugh',\n  'hauld',\n  'haulm',\n  'hauls',\n  'hault',\n  'hauns',\n  'hause',\n  'haver',\n  'haves',\n  'hawed',\n  'hawks',\n  'hawms',\n  'hawse',\n  'hayed',\n  'hayer',\n  'hayey',\n  'hayle',\n  'hazan',\n  'hazed',\n  'hazer',\n  'hazes',\n  'heads',\n  'heald',\n  'heals',\n  'heame',\n  'heaps',\n  'heapy',\n  'heare',\n  'hears',\n  'heast',\n  'heats',\n  'heben',\n  'hebes',\n  'hecht',\n  'hecks',\n  'heder',\n  'hedgy',\n  'heeds',\n  'heedy',\n  'heels',\n  'heeze',\n  'hefte',\n  'hefts',\n  'heids',\n  'heigh',\n  'heils',\n  'heirs',\n  'hejab',\n  'hejra',\n  'heled',\n  'heles',\n  'helio',\n  'hells',\n  'helms',\n  'helos',\n  'helot',\n  'helps',\n  'helve',\n  'hemal',\n  'hemes',\n  'hemic',\n  'hemin',\n  'hemps',\n  'hempy',\n  'hench',\n  'hends',\n  'henge',\n  'henna',\n  'henny',\n  'henry',\n  'hents',\n  'hepar',\n  'herbs',\n  'herby',\n  'herds',\n  'heres',\n  'herls',\n  'herma',\n  'herms',\n  'herns',\n  'heros',\n  'herry',\n  'herse',\n  'hertz',\n  'herye',\n  'hesps',\n  'hests',\n  'hetes',\n  'heths',\n  'heuch',\n  'heugh',\n  'hevea',\n  'hewed',\n  'hewer',\n  'hewgh',\n  'hexad',\n  'hexed',\n  'hexer',\n  'hexes',\n  'hexyl',\n  'heyed',\n  'hiant',\n  'hicks',\n  'hided',\n  'hider',\n  'hides',\n  'hiems',\n  'highs',\n  'hight',\n  'hijab',\n  'hijra',\n  'hiked',\n  'hiker',\n  'hikes',\n  'hikoi',\n  'hilar',\n  'hilch',\n  'hillo',\n  'hills',\n  'hilts',\n  'hilum',\n  'hilus',\n  'himbo',\n  'hinau',\n  'hinds',\n  'hings',\n  'hinky',\n  'hinny',\n  'hints',\n  'hiois',\n  'hiply',\n  'hired',\n  'hiree',\n  'hirer',\n  'hires',\n  'hissy',\n  'hists',\n  'hithe',\n  'hived',\n  'hiver',\n  'hives',\n  'hizen',\n  'hoaed',\n  'hoagy',\n  'hoars',\n  'hoary',\n  'hoast',\n  'hobos',\n  'hocks',\n  'hocus',\n  'hodad',\n  'hodja',\n  'hoers',\n  'hogan',\n  'hogen',\n  'hoggs',\n  'hoghs',\n  'hohed',\n  'hoick',\n  'hoied',\n  'hoiks',\n  'hoing',\n  'hoise',\n  'hokas',\n  'hoked',\n  'hokes',\n  'hokey',\n  'hokis',\n  'hokku',\n  'hokum',\n  'holds',\n  'holed',\n  'holes',\n  'holey',\n  'holks',\n  'holla',\n  'hollo',\n  'holme',\n  'holms',\n  'holon',\n  'holos',\n  'holts',\n  'homas',\n  'homed',\n  'homes',\n  'homey',\n  'homie',\n  'homme',\n  'homos',\n  'honan',\n  'honda',\n  'honds',\n  'honed',\n  'honer',\n  'hones',\n  'hongi',\n  'hongs',\n  'honks',\n  'honky',\n  'hooch',\n  'hoods',\n  'hoody',\n  'hooey',\n  'hoofs',\n  'hooka',\n  'hooks',\n  'hooky',\n  'hooly',\n  'hoons',\n  'hoops',\n  'hoord',\n  'hoors',\n  'hoosh',\n  'hoots',\n  'hooty',\n  'hoove',\n  'hopak',\n  'hoped',\n  'hoper',\n  'hopes',\n  'hoppy',\n  'horah',\n  'horal',\n  'horas',\n  'horis',\n  'horks',\n  'horme',\n  'horns',\n  'horst',\n  'horsy',\n  'hosed',\n  'hosel',\n  'hosen',\n  'hoser',\n  'hoses',\n  'hosey',\n  'hosta',\n  'hosts',\n  'hotch',\n  'hoten',\n  'hotty',\n  'houff',\n  'houfs',\n  'hough',\n  'houri',\n  'hours',\n  'houts',\n  'hovea',\n  'hoved',\n  'hoven',\n  'hoves',\n  'howbe',\n  'howes',\n  'howff',\n  'howfs',\n  'howks',\n  'howls',\n  'howre',\n  'howso',\n  'hoxed',\n  'hoxes',\n  'hoyas',\n  'hoyed',\n  'hoyle',\n  'hubby',\n  'hucks',\n  'hudna',\n  'hudud',\n  'huers',\n  'huffs',\n  'huffy',\n  'huger',\n  'huggy',\n  'huhus',\n  'huias',\n  'hulas',\n  'hules',\n  'hulks',\n  'hulky',\n  'hullo',\n  'hulls',\n  'hully',\n  'humas',\n  'humfs',\n  'humic',\n  'humps',\n  'humpy',\n  'hunks',\n  'hunts',\n  'hurds',\n  'hurls',\n  'hurly',\n  'hurra',\n  'hurst',\n  'hurts',\n  'hushy',\n  'husks',\n  'husos',\n  'hutia',\n  'huzza',\n  'huzzy',\n  'hwyls',\n  'hydra',\n  'hyens',\n  'hygge',\n  'hying',\n  'hykes',\n  'hylas',\n  'hyleg',\n  'hyles',\n  'hylic',\n  'hymns',\n  'hynde',\n  'hyoid',\n  'hyped',\n  'hypes',\n  'hypha',\n  'hyphy',\n  'hypos',\n  'hyrax',\n  'hyson',\n  'hythe',\n  'iambi',\n  'iambs',\n  'ibrik',\n  'icers',\n  'iched',\n  'iches',\n  'ichor',\n  'icier',\n  'icker',\n  'ickle',\n  'icons',\n  'ictal',\n  'ictic',\n  'ictus',\n  'idant',\n  'ideas',\n  'idees',\n  'ident',\n  'idled',\n  'idles',\n  'idola',\n  'idols',\n  'idyls',\n  'iftar',\n  'igapo',\n  'igged',\n  'iglus',\n  'ihram',\n  'ikans',\n  'ikats',\n  'ikons',\n  'ileac',\n  'ileal',\n  'ileum',\n  'ileus',\n  'iliad',\n  'ilial',\n  'ilium',\n  'iller',\n  'illth',\n  'imago',\n  'imams',\n  'imari',\n  'imaum',\n  'imbar',\n  'imbed',\n  'imide',\n  'imido',\n  'imids',\n  'imine',\n  'imino',\n  'immew',\n  'immit',\n  'immix',\n  'imped',\n  'impis',\n  'impot',\n  'impro',\n  'imshi',\n  'imshy',\n  'inapt',\n  'inarm',\n  'inbye',\n  'incel',\n  'incle',\n  'incog',\n  'incus',\n  'incut',\n  'indew',\n  'india',\n  'indie',\n  'indol',\n  'indow',\n  'indri',\n  'indue',\n  'inerm',\n  'infix',\n  'infos',\n  'infra',\n  'ingan',\n  'ingle',\n  'inion',\n  'inked',\n  'inker',\n  'inkle',\n  'inned',\n  'innit',\n  'inorb',\n  'inrun',\n  'inset',\n  'inspo',\n  'intel',\n  'intil',\n  'intis',\n  'intra',\n  'inula',\n  'inure',\n  'inurn',\n  'inust',\n  'invar',\n  'inwit',\n  'iodic',\n  'iodid',\n  'iodin',\n  'iotas',\n  'ippon',\n  'irade',\n  'irids',\n  'iring',\n  'irked',\n  'iroko',\n  'irone',\n  'irons',\n  'isbas',\n  'ishes',\n  'isled',\n  'isles',\n  'isnae',\n  'issei',\n  'istle',\n  'items',\n  'ither',\n  'ivied',\n  'ivies',\n  'ixias',\n  'ixnay',\n  'ixora',\n  'ixtle',\n  'izard',\n  'izars',\n  'izzat',\n  'jaaps',\n  'jabot',\n  'jacal',\n  'jacks',\n  'jacky',\n  'jaded',\n  'jades',\n  'jafas',\n  'jaffa',\n  'jagas',\n  'jager',\n  'jaggs',\n  'jaggy',\n  'jagir',\n  'jagra',\n  'jails',\n  'jaker',\n  'jakes',\n  'jakey',\n  'jalap',\n  'jalop',\n  'jambe',\n  'jambo',\n  'jambs',\n  'jambu',\n  'james',\n  'jammy',\n  'jamon',\n  'janes',\n  'janns',\n  'janny',\n  'janty',\n  'japan',\n  'japed',\n  'japer',\n  'japes',\n  'jarks',\n  'jarls',\n  'jarps',\n  'jarta',\n  'jarul',\n  'jasey',\n  'jaspe',\n  'jasps',\n  'jatos',\n  'jauks',\n  'jaups',\n  'javas',\n  'javel',\n  'jawan',\n  'jawed',\n  'jaxie',\n  'jeans',\n  'jeats',\n  'jebel',\n  'jedis',\n  'jeels',\n  'jeely',\n  'jeeps',\n  'jeers',\n  'jeeze',\n  'jefes',\n  'jeffs',\n  'jehad',\n  'jehus',\n  'jelab',\n  'jello',\n  'jells',\n  'jembe',\n  'jemmy',\n  'jenny',\n  'jeons',\n  'jerid',\n  'jerks',\n  'jerry',\n  'jesse',\n  'jests',\n  'jesus',\n  'jetes',\n  'jeton',\n  'jeune',\n  'jewed',\n  'jewie',\n  'jhala',\n  'jiaos',\n  'jibba',\n  'jibbs',\n  'jibed',\n  'jiber',\n  'jibes',\n  'jiffs',\n  'jiggy',\n  'jigot',\n  'jihad',\n  'jills',\n  'jilts',\n  'jimmy',\n  'jimpy',\n  'jingo',\n  'jinks',\n  'jinne',\n  'jinni',\n  'jinns',\n  'jirds',\n  'jirga',\n  'jirre',\n  'jisms',\n  'jived',\n  'jiver',\n  'jives',\n  'jivey',\n  'jnana',\n  'jobed',\n  'jobes',\n  'jocko',\n  'jocks',\n  'jocky',\n  'jocos',\n  'jodel',\n  'joeys',\n  'johns',\n  'joins',\n  'joked',\n  'jokes',\n  'jokey',\n  'jokol',\n  'joled',\n  'joles',\n  'jolls',\n  'jolts',\n  'jolty',\n  'jomon',\n  'jomos',\n  'jones',\n  'jongs',\n  'jonty',\n  'jooks',\n  'joram',\n  'jorum',\n  'jotas',\n  'jotty',\n  'jotun',\n  'joual',\n  'jougs',\n  'jouks',\n  'joule',\n  'jours',\n  'jowar',\n  'jowed',\n  'jowls',\n  'jowly',\n  'joyed',\n  'jubas',\n  'jubes',\n  'jucos',\n  'judas',\n  'judgy',\n  'judos',\n  'jugal',\n  'jugum',\n  'jujus',\n  'juked',\n  'jukes',\n  'jukus',\n  'julep',\n  'jumar',\n  'jumby',\n  'jumps',\n  'junco',\n  'junks',\n  'junky',\n  'jupes',\n  'jupon',\n  'jural',\n  'jurat',\n  'jurel',\n  'jures',\n  'justs',\n  'jutes',\n  'jutty',\n  'juves',\n  'juvie',\n  'kaama',\n  'kabab',\n  'kabar',\n  'kabob',\n  'kacha',\n  'kacks',\n  'kadai',\n  'kades',\n  'kadis',\n  'kafir',\n  'kagos',\n  'kagus',\n  'kahal',\n  'kaiak',\n  'kaids',\n  'kaies',\n  'kaifs',\n  'kaika',\n  'kaiks',\n  'kails',\n  'kaims',\n  'kaing',\n  'kains',\n  'kakas',\n  'kakis',\n  'kalam',\n  'kales',\n  'kalif',\n  'kalis',\n  'kalpa',\n  'kamas',\n  'kames',\n  'kamik',\n  'kamis',\n  'kamme',\n  'kanae',\n  'kanas',\n  'kandy',\n  'kaneh',\n  'kanes',\n  'kanga',\n  'kangs',\n  'kanji',\n  'kants',\n  'kanzu',\n  'kaons',\n  'kapas',\n  'kaphs',\n  'kapok',\n  'kapow',\n  'kapus',\n  'kaput',\n  'karas',\n  'karat',\n  'karks',\n  'karns',\n  'karoo',\n  'karos',\n  'karri',\n  'karst',\n  'karsy',\n  'karts',\n  'karzy',\n  'kasha',\n  'kasme',\n  'katal',\n  'katas',\n  'katis',\n  'katti',\n  'kaugh',\n  'kauri',\n  'kauru',\n  'kaury',\n  'kaval',\n  'kavas',\n  'kawas',\n  'kawau',\n  'kawed',\n  'kayle',\n  'kayos',\n  'kazis',\n  'kazoo',\n  'kbars',\n  'kebar',\n  'kebob',\n  'kecks',\n  'kedge',\n  'kedgy',\n  'keech',\n  'keefs',\n  'keeks',\n  'keels',\n  'keema',\n  'keeno',\n  'keens',\n  'keeps',\n  'keets',\n  'keeve',\n  'kefir',\n  'kehua',\n  'keirs',\n  'kelep',\n  'kelim',\n  'kells',\n  'kelly',\n  'kelps',\n  'kelpy',\n  'kelts',\n  'kelty',\n  'kembo',\n  'kembs',\n  'kemps',\n  'kempt',\n  'kempy',\n  'kenaf',\n  'kench',\n  'kendo',\n  'kenos',\n  'kente',\n  'kents',\n  'kepis',\n  'kerbs',\n  'kerel',\n  'kerfs',\n  'kerky',\n  'kerma',\n  'kerne',\n  'kerns',\n  'keros',\n  'kerry',\n  'kerve',\n  'kesar',\n  'kests',\n  'ketas',\n  'ketch',\n  'ketes',\n  'ketol',\n  'kevel',\n  'kevil',\n  'kexes',\n  'keyed',\n  'keyer',\n  'khadi',\n  'khafs',\n  'khans',\n  'khaph',\n  'khats',\n  'khaya',\n  'khazi',\n  'kheda',\n  'kheth',\n  'khets',\n  'khoja',\n  'khors',\n  'khoum',\n  'khuds',\n  'kiaat',\n  'kiack',\n  'kiang',\n  'kibbe',\n  'kibbi',\n  'kibei',\n  'kibes',\n  'kibla',\n  'kicks',\n  'kicky',\n  'kiddo',\n  'kiddy',\n  'kidel',\n  'kidge',\n  'kiefs',\n  'kiers',\n  'kieve',\n  'kievs',\n  'kight',\n  'kikes',\n  'kikoi',\n  'kiley',\n  'kilim',\n  'kills',\n  'kilns',\n  'kilos',\n  'kilps',\n  'kilts',\n  'kilty',\n  'kimbo',\n  'kinas',\n  'kinda',\n  'kinds',\n  'kindy',\n  'kines',\n  'kings',\n  'kinin',\n  'kinks',\n  'kinos',\n  'kiore',\n  'kipes',\n  'kippa',\n  'kipps',\n  'kirby',\n  'kirks',\n  'kirns',\n  'kirri',\n  'kisan',\n  'kissy',\n  'kists',\n  'kited',\n  'kiter',\n  'kites',\n  'kithe',\n  'kiths',\n  'kitul',\n  'kivas',\n  'kiwis',\n  'klang',\n  'klaps',\n  'klett',\n  'klick',\n  'klieg',\n  'kliks',\n  'klong',\n  'kloof',\n  'kluge',\n  'klutz',\n  'knags',\n  'knaps',\n  'knarl',\n  'knars',\n  'knaur',\n  'knawe',\n  'knees',\n  'knell',\n  'knish',\n  'knits',\n  'knive',\n  'knobs',\n  'knops',\n  'knosp',\n  'knots',\n  'knout',\n  'knowe',\n  'knows',\n  'knubs',\n  'knurl',\n  'knurr',\n  'knurs',\n  'knuts',\n  'koans',\n  'koaps',\n  'koban',\n  'kobos',\n  'koels',\n  'koffs',\n  'kofta',\n  'kogal',\n  'kohas',\n  'kohen',\n  'kohls',\n  'koine',\n  'kojis',\n  'kokam',\n  'kokas',\n  'koker',\n  'kokra',\n  'kokum',\n  'kolas',\n  'kolos',\n  'kombu',\n  'konbu',\n  'kondo',\n  'konks',\n  'kooks',\n  'kooky',\n  'koori',\n  'kopek',\n  'kophs',\n  'kopje',\n  'koppa',\n  'korai',\n  'koras',\n  'korat',\n  'kores',\n  'korma',\n  'koros',\n  'korun',\n  'korus',\n  'koses',\n  'kotch',\n  'kotos',\n  'kotow',\n  'koura',\n  'kraal',\n  'krabs',\n  'kraft',\n  'krais',\n  'krait',\n  'krang',\n  'krans',\n  'kranz',\n  'kraut',\n  'krays',\n  'kreep',\n  'kreng',\n  'krewe',\n  'krona',\n  'krone',\n  'kroon',\n  'krubi',\n  'krunk',\n  'ksars',\n  'kubie',\n  'kudos',\n  'kudus',\n  'kudzu',\n  'kufis',\n  'kugel',\n  'kuias',\n  'kukri',\n  'kukus',\n  'kulak',\n  'kulan',\n  'kulas',\n  'kulfi',\n  'kumis',\n  'kumys',\n  'kuris',\n  'kurre',\n  'kurta',\n  'kurus',\n  'kusso',\n  'kutas',\n  'kutch',\n  'kutis',\n  'kutus',\n  'kuzus',\n  'kvass',\n  'kvell',\n  'kwela',\n  'kyack',\n  'kyaks',\n  'kyang',\n  'kyars',\n  'kyats',\n  'kybos',\n  'kydst',\n  'kyles',\n  'kylie',\n  'kylin',\n  'kylix',\n  'kyloe',\n  'kynde',\n  'kynds',\n  'kypes',\n  'kyrie',\n  'kytes',\n  'kythe',\n  'laari',\n  'labda',\n  'labia',\n  'labis',\n  'labra',\n  'laced',\n  'lacer',\n  'laces',\n  'lacet',\n  'lacey',\n  'lacks',\n  'laddy',\n  'laded',\n  'lader',\n  'lades',\n  'laers',\n  'laevo',\n  'lagan',\n  'lahal',\n  'lahar',\n  'laich',\n  'laics',\n  'laids',\n  'laigh',\n  'laika',\n  'laiks',\n  'laird',\n  'lairs',\n  'lairy',\n  'laith',\n  'laity',\n  'laked',\n  'laker',\n  'lakes',\n  'lakhs',\n  'lakin',\n  'laksa',\n  'laldy',\n  'lalls',\n  'lamas',\n  'lambs',\n  'lamby',\n  'lamed',\n  'lamer',\n  'lames',\n  'lamia',\n  'lammy',\n  'lamps',\n  'lanai',\n  'lanas',\n  'lanch',\n  'lande',\n  'lands',\n  'lanes',\n  'lanks',\n  'lants',\n  'lapin',\n  'lapis',\n  'lapje',\n  'larch',\n  'lards',\n  'lardy',\n  'laree',\n  'lares',\n  'largo',\n  'laris',\n  'larks',\n  'larky',\n  'larns',\n  'larnt',\n  'larum',\n  'lased',\n  'laser',\n  'lases',\n  'lassi',\n  'lassu',\n  'lassy',\n  'lasts',\n  'latah',\n  'lated',\n  'laten',\n  'latex',\n  'lathi',\n  'laths',\n  'lathy',\n  'latke',\n  'latus',\n  'lauan',\n  'lauch',\n  'lauds',\n  'laufs',\n  'laund',\n  'laura',\n  'laval',\n  'lavas',\n  'laved',\n  'laver',\n  'laves',\n  'lavra',\n  'lavvy',\n  'lawed',\n  'lawer',\n  'lawin',\n  'lawks',\n  'lawns',\n  'lawny',\n  'laxed',\n  'laxer',\n  'laxes',\n  'laxly',\n  'layed',\n  'layin',\n  'layup',\n  'lazar',\n  'lazed',\n  'lazes',\n  'lazos',\n  'lazzi',\n  'lazzo',\n  'leads',\n  'leady',\n  'leafs',\n  'leaks',\n  'leams',\n  'leans',\n  'leany',\n  'leaps',\n  'leare',\n  'lears',\n  'leary',\n  'leats',\n  'leavy',\n  'leaze',\n  'leben',\n  'leccy',\n  'ledes',\n  'ledgy',\n  'ledum',\n  'leear',\n  'leeks',\n  'leeps',\n  'leers',\n  'leese',\n  'leets',\n  'leeze',\n  'lefte',\n  'lefts',\n  'leger',\n  'leges',\n  'legge',\n  'leggo',\n  'legit',\n  'lehrs',\n  'lehua',\n  'leirs',\n  'leish',\n  'leman',\n  'lemed',\n  'lemel',\n  'lemes',\n  'lemma',\n  'lemme',\n  'lends',\n  'lenes',\n  'lengs',\n  'lenis',\n  'lenos',\n  'lense',\n  'lenti',\n  'lento',\n  'leone',\n  'lepid',\n  'lepra',\n  'lepta',\n  'lered',\n  'leres',\n  'lerps',\n  'lesbo',\n  'leses',\n  'lests',\n  'letch',\n  'lethe',\n  'letup',\n  'leuch',\n  'leuco',\n  'leuds',\n  'leugh',\n  'levas',\n  'levee',\n  'leves',\n  'levin',\n  'levis',\n  'lewis',\n  'lexes',\n  'lexis',\n  'lezes',\n  'lezza',\n  'lezzy',\n  'liana',\n  'liane',\n  'liang',\n  'liard',\n  'liars',\n  'liart',\n  'liber',\n  'libra',\n  'libri',\n  'lichi',\n  'licht',\n  'licit',\n  'licks',\n  'lidar',\n  'lidos',\n  'liefs',\n  'liens',\n  'liers',\n  'lieus',\n  'lieve',\n  'lifer',\n  'lifes',\n  'lifts',\n  'ligan',\n  'liger',\n  'ligge',\n  'ligne',\n  'liked',\n  'liker',\n  'likes',\n  'likin',\n  'lills',\n  'lilos',\n  'lilts',\n  'liman',\n  'limas',\n  'limax',\n  'limba',\n  'limbi',\n  'limbs',\n  'limby',\n  'limed',\n  'limen',\n  'limes',\n  'limey',\n  'limma',\n  'limns',\n  'limos',\n  'limpa',\n  'limps',\n  'linac',\n  'linch',\n  'linds',\n  'lindy',\n  'lined',\n  'lines',\n  'liney',\n  'linga',\n  'lings',\n  'lingy',\n  'linin',\n  'links',\n  'linky',\n  'linns',\n  'linny',\n  'linos',\n  'lints',\n  'linty',\n  'linum',\n  'linux',\n  'lions',\n  'lipas',\n  'lipes',\n  'lipin',\n  'lipos',\n  'lippy',\n  'liras',\n  'lirks',\n  'lirot',\n  'lisks',\n  'lisle',\n  'lisps',\n  'lists',\n  'litai',\n  'litas',\n  'lited',\n  'liter',\n  'lites',\n  'litho',\n  'liths',\n  'litre',\n  'lived',\n  'liven',\n  'lives',\n  'livor',\n  'livre',\n  'llano',\n  'loach',\n  'loads',\n  'loafs',\n  'loams',\n  'loans',\n  'loast',\n  'loave',\n  'lobar',\n  'lobed',\n  'lobes',\n  'lobos',\n  'lobus',\n  'loche',\n  'lochs',\n  'locie',\n  'locis',\n  'locks',\n  'locos',\n  'locum',\n  'loden',\n  'lodes',\n  'loess',\n  'lofts',\n  'logan',\n  'loges',\n  'loggy',\n  'logia',\n  'logie',\n  'logoi',\n  'logon',\n  'logos',\n  'lohan',\n  'loids',\n  'loins',\n  'loipe',\n  'loirs',\n  'lokes',\n  'lolls',\n  'lolly',\n  'lolog',\n  'lomas',\n  'lomed',\n  'lomes',\n  'loner',\n  'longa',\n  'longe',\n  'longs',\n  'looby',\n  'looed',\n  'looey',\n  'loofa',\n  'loofs',\n  'looie',\n  'looks',\n  'looky',\n  'looms',\n  'loons',\n  'loony',\n  'loops',\n  'loord',\n  'loots',\n  'loped',\n  'loper',\n  'lopes',\n  'loppy',\n  'loral',\n  'loran',\n  'lords',\n  'lordy',\n  'lorel',\n  'lores',\n  'loric',\n  'loris',\n  'losed',\n  'losel',\n  'losen',\n  'loses',\n  'lossy',\n  'lotah',\n  'lotas',\n  'lotes',\n  'lotic',\n  'lotos',\n  'lotsa',\n  'lotta',\n  'lotte',\n  'lotto',\n  'lotus',\n  'loued',\n  'lough',\n  'louie',\n  'louis',\n  'louma',\n  'lound',\n  'louns',\n  'loupe',\n  'loups',\n  'loure',\n  'lours',\n  'loury',\n  'louts',\n  'lovat',\n  'loved',\n  'loves',\n  'lovey',\n  'lovie',\n  'lowan',\n  'lowed',\n  'lowes',\n  'lownd',\n  'lowne',\n  'lowns',\n  'lowps',\n  'lowry',\n  'lowse',\n  'lowts',\n  'loxed',\n  'loxes',\n  'lozen',\n  'luach',\n  'luaus',\n  'lubed',\n  'lubes',\n  'lubra',\n  'luces',\n  'lucks',\n  'lucre',\n  'ludes',\n  'ludic',\n  'ludos',\n  'luffa',\n  'luffs',\n  'luged',\n  'luger',\n  'luges',\n  'lulls',\n  'lulus',\n  'lumas',\n  'lumbi',\n  'lumme',\n  'lummy',\n  'lumps',\n  'lunas',\n  'lunes',\n  'lunet',\n  'lungi',\n  'lungs',\n  'lunks',\n  'lunts',\n  'lupin',\n  'lured',\n  'lurer',\n  'lures',\n  'lurex',\n  'lurgi',\n  'lurgy',\n  'lurks',\n  'lurry',\n  'lurve',\n  'luser',\n  'lushy',\n  'lusks',\n  'lusts',\n  'lusus',\n  'lutea',\n  'luted',\n  'luter',\n  'lutes',\n  'luvvy',\n  'luxed',\n  'luxer',\n  'luxes',\n  'lweis',\n  'lyams',\n  'lyard',\n  'lyart',\n  'lyase',\n  'lycea',\n  'lycee',\n  'lycra',\n  'lymes',\n  'lynes',\n  'lyres',\n  'lysed',\n  'lyses',\n  'lysin',\n  'lysis',\n  'lysol',\n  'lyssa',\n  'lyted',\n  'lytes',\n  'lythe',\n  'lytic',\n  'lytta',\n  'maaed',\n  'maare',\n  'maars',\n  'mabes',\n  'macas',\n  'maced',\n  'macer',\n  'maces',\n  'mache',\n  'machi',\n  'machs',\n  'macks',\n  'macle',\n  'macon',\n  'madge',\n  'madid',\n  'madre',\n  'maerl',\n  'mafic',\n  'mages',\n  'maggs',\n  'magot',\n  'magus',\n  'mahoe',\n  'mahua',\n  'mahwa',\n  'maids',\n  'maiko',\n  'maiks',\n  'maile',\n  'maill',\n  'mails',\n  'maims',\n  'mains',\n  'maire',\n  'mairs',\n  'maise',\n  'maist',\n  'makar',\n  'makes',\n  'makis',\n  'makos',\n  'malam',\n  'malar',\n  'malas',\n  'malax',\n  'males',\n  'malic',\n  'malik',\n  'malis',\n  'malls',\n  'malms',\n  'malmy',\n  'malts',\n  'malty',\n  'malus',\n  'malva',\n  'malwa',\n  'mamas',\n  'mamba',\n  'mamee',\n  'mamey',\n  'mamie',\n  'manas',\n  'manat',\n  'mandi',\n  'maneb',\n  'maned',\n  'maneh',\n  'manes',\n  'manet',\n  'mangs',\n  'manis',\n  'manky',\n  'manna',\n  'manos',\n  'manse',\n  'manta',\n  'manto',\n  'manty',\n  'manul',\n  'manus',\n  'mapau',\n  'maqui',\n  'marae',\n  'marah',\n  'maras',\n  'marcs',\n  'mardy',\n  'mares',\n  'marge',\n  'margs',\n  'maria',\n  'marid',\n  'marka',\n  'marks',\n  'marle',\n  'marls',\n  'marly',\n  'marms',\n  'maron',\n  'maror',\n  'marra',\n  'marri',\n  'marse',\n  'marts',\n  'marvy',\n  'masas',\n  'mased',\n  'maser',\n  'mases',\n  'mashy',\n  'masks',\n  'massa',\n  'massy',\n  'masts',\n  'masty',\n  'masus',\n  'matai',\n  'mated',\n  'mater',\n  'mates',\n  'maths',\n  'matin',\n  'matlo',\n  'matte',\n  'matts',\n  'matza',\n  'matzo',\n  'mauby',\n  'mauds',\n  'mauls',\n  'maund',\n  'mauri',\n  'mausy',\n  'mauts',\n  'mauzy',\n  'maven',\n  'mavie',\n  'mavin',\n  'mavis',\n  'mawed',\n  'mawks',\n  'mawky',\n  'mawns',\n  'mawrs',\n  'maxed',\n  'maxes',\n  'maxis',\n  'mayan',\n  'mayas',\n  'mayed',\n  'mayos',\n  'mayst',\n  'mazed',\n  'mazer',\n  'mazes',\n  'mazey',\n  'mazut',\n  'mbira',\n  'meads',\n  'meals',\n  'meane',\n  'means',\n  'meany',\n  'meare',\n  'mease',\n  'meath',\n  'meats',\n  'mebos',\n  'mechs',\n  'mecks',\n  'medii',\n  'medle',\n  'meeds',\n  'meers',\n  'meets',\n  'meffs',\n  'meins',\n  'meint',\n  'meiny',\n  'meith',\n  'mekka',\n  'melas',\n  'melba',\n  'melds',\n  'melic',\n  'melik',\n  'mells',\n  'melts',\n  'melty',\n  'memes',\n  'memos',\n  'menad',\n  'mends',\n  'mened',\n  'menes',\n  'menge',\n  'mengs',\n  'mensa',\n  'mense',\n  'mensh',\n  'menta',\n  'mento',\n  'menus',\n  'meous',\n  'meows',\n  'merch',\n  'mercs',\n  'merde',\n  'mered',\n  'merel',\n  'merer',\n  'meres',\n  'meril',\n  'meris',\n  'merks',\n  'merle',\n  'merls',\n  'merse',\n  'mesal',\n  'mesas',\n  'mesel',\n  'meses',\n  'meshy',\n  'mesic',\n  'mesne',\n  'meson',\n  'messy',\n  'mesto',\n  'meted',\n  'metes',\n  'metho',\n  'meths',\n  'metic',\n  'metif',\n  'metis',\n  'metol',\n  'metre',\n  'meuse',\n  'meved',\n  'meves',\n  'mewed',\n  'mewls',\n  'meynt',\n  'mezes',\n  'mezze',\n  'mezzo',\n  'mhorr',\n  'miaou',\n  'miaow',\n  'miasm',\n  'miaul',\n  'micas',\n  'miche',\n  'micht',\n  'micks',\n  'micky',\n  'micos',\n  'micra',\n  'middy',\n  'midgy',\n  'midis',\n  'miens',\n  'mieve',\n  'miffs',\n  'miffy',\n  'mifty',\n  'miggs',\n  'mihas',\n  'mihis',\n  'miked',\n  'mikes',\n  'mikra',\n  'mikva',\n  'milch',\n  'milds',\n  'miler',\n  'miles',\n  'milfs',\n  'milia',\n  'milko',\n  'milks',\n  'mille',\n  'mills',\n  'milor',\n  'milos',\n  'milpa',\n  'milts',\n  'milty',\n  'miltz',\n  'mimed',\n  'mimeo',\n  'mimer',\n  'mimes',\n  'mimsy',\n  'minae',\n  'minar',\n  'minas',\n  'mincy',\n  'minds',\n  'mined',\n  'mines',\n  'minge',\n  'mings',\n  'mingy',\n  'minis',\n  'minke',\n  'minks',\n  'minny',\n  'minos',\n  'mints',\n  'mired',\n  'mires',\n  'mirex',\n  'mirid',\n  'mirin',\n  'mirks',\n  'mirky',\n  'mirly',\n  'miros',\n  'mirvs',\n  'mirza',\n  'misch',\n  'misdo',\n  'mises',\n  'misgo',\n  'misos',\n  'missa',\n  'mists',\n  'misty',\n  'mitch',\n  'miter',\n  'mites',\n  'mitis',\n  'mitre',\n  'mitts',\n  'mixed',\n  'mixen',\n  'mixer',\n  'mixes',\n  'mixte',\n  'mixup',\n  'mizen',\n  'mizzy',\n  'mneme',\n  'moans',\n  'moats',\n  'mobby',\n  'mobes',\n  'mobey',\n  'mobie',\n  'moble',\n  'mochi',\n  'mochs',\n  'mochy',\n  'mocks',\n  'moder',\n  'modes',\n  'modge',\n  'modii',\n  'modus',\n  'moers',\n  'mofos',\n  'moggy',\n  'mohel',\n  'mohos',\n  'mohrs',\n  'mohua',\n  'mohur',\n  'moile',\n  'moils',\n  'moira',\n  'moire',\n  'moits',\n  'mojos',\n  'mokes',\n  'mokis',\n  'mokos',\n  'molal',\n  'molas',\n  'molds',\n  'moled',\n  'moles',\n  'molla',\n  'molls',\n  'molly',\n  'molto',\n  'molts',\n  'molys',\n  'momes',\n  'momma',\n  'mommy',\n  'momus',\n  'monad',\n  'monal',\n  'monas',\n  'monde',\n  'mondo',\n  'moner',\n  'mongo',\n  'mongs',\n  'monic',\n  'monie',\n  'monks',\n  'monos',\n  'monte',\n  'monty',\n  'moobs',\n  'mooch',\n  'moods',\n  'mooed',\n  'mooks',\n  'moola',\n  'mooli',\n  'mools',\n  'mooly',\n  'moong',\n  'moons',\n  'moony',\n  'moops',\n  'moors',\n  'moory',\n  'moots',\n  'moove',\n  'moped',\n  'moper',\n  'mopes',\n  'mopey',\n  'moppy',\n  'mopsy',\n  'mopus',\n  'morae',\n  'moras',\n  'morat',\n  'moray',\n  'morel',\n  'mores',\n  'moria',\n  'morne',\n  'morns',\n  'morra',\n  'morro',\n  'morse',\n  'morts',\n  'mosed',\n  'moses',\n  'mosey',\n  'mosks',\n  'mosso',\n  'moste',\n  'mosts',\n  'moted',\n  'moten',\n  'motes',\n  'motet',\n  'motey',\n  'moths',\n  'mothy',\n  'motis',\n  'motte',\n  'motts',\n  'motty',\n  'motus',\n  'motza',\n  'mouch',\n  'moues',\n  'mould',\n  'mouls',\n  'moups',\n  'moust',\n  'mousy',\n  'moved',\n  'moves',\n  'mowas',\n  'mowed',\n  'mowra',\n  'moxas',\n  'moxie',\n  'moyas',\n  'moyle',\n  'moyls',\n  'mozed',\n  'mozes',\n  'mozos',\n  'mpret',\n  'mucho',\n  'mucic',\n  'mucid',\n  'mucin',\n  'mucks',\n  'mucor',\n  'mucro',\n  'mudge',\n  'mudir',\n  'mudra',\n  'muffs',\n  'mufti',\n  'mugga',\n  'muggs',\n  'muggy',\n  'muhly',\n  'muids',\n  'muils',\n  'muirs',\n  'muist',\n  'mujik',\n  'mulct',\n  'muled',\n  'mules',\n  'muley',\n  'mulga',\n  'mulie',\n  'mulla',\n  'mulls',\n  'mulse',\n  'mulsh',\n  'mumms',\n  'mumps',\n  'mumsy',\n  'mumus',\n  'munga',\n  'munge',\n  'mungo',\n  'mungs',\n  'munis',\n  'munts',\n  'muntu',\n  'muons',\n  'muras',\n  'mured',\n  'mures',\n  'murex',\n  'murid',\n  'murks',\n  'murls',\n  'murly',\n  'murra',\n  'murre',\n  'murri',\n  'murrs',\n  'murry',\n  'murti',\n  'murva',\n  'musar',\n  'musca',\n  'mused',\n  'muser',\n  'muses',\n  'muset',\n  'musha',\n  'musit',\n  'musks',\n  'musos',\n  'musse',\n  'mussy',\n  'musth',\n  'musts',\n  'mutch',\n  'muted',\n  'muter',\n  'mutes',\n  'mutha',\n  'mutis',\n  'muton',\n  'mutts',\n  'muxed',\n  'muxes',\n  'muzak',\n  'muzzy',\n  'mvule',\n  'myall',\n  'mylar',\n  'mynah',\n  'mynas',\n  'myoid',\n  'myoma',\n  'myope',\n  'myops',\n  'myopy',\n  'mysid',\n  'mythi',\n  'myths',\n  'mythy',\n  'myxos',\n  'mzees',\n  'naams',\n  'naans',\n  'nabes',\n  'nabis',\n  'nabks',\n  'nabla',\n  'nabob',\n  'nache',\n  'nacho',\n  'nacre',\n  'nadas',\n  'naeve',\n  'naevi',\n  'naffs',\n  'nagas',\n  'naggy',\n  'nagor',\n  'nahal',\n  'naiad',\n  'naifs',\n  'naiks',\n  'nails',\n  'naira',\n  'nairu',\n  'naked',\n  'naker',\n  'nakfa',\n  'nalas',\n  'naled',\n  'nalla',\n  'named',\n  'namer',\n  'names',\n  'namma',\n  'namus',\n  'nanas',\n  'nance',\n  'nancy',\n  'nandu',\n  'nanna',\n  'nanos',\n  'nanua',\n  'napas',\n  'naped',\n  'napes',\n  'napoo',\n  'nappa',\n  'nappe',\n  'nappy',\n  'naras',\n  'narco',\n  'narcs',\n  'nards',\n  'nares',\n  'naric',\n  'naris',\n  'narks',\n  'narky',\n  'narre',\n  'nashi',\n  'natch',\n  'nates',\n  'natis',\n  'natty',\n  'nauch',\n  'naunt',\n  'navar',\n  'naves',\n  'navew',\n  'navvy',\n  'nawab',\n  'nazes',\n  'nazir',\n  'nazis',\n  'nduja',\n  'neafe',\n  'neals',\n  'neaps',\n  'nears',\n  'neath',\n  'neats',\n  'nebek',\n  'nebel',\n  'necks',\n  'neddy',\n  'needs',\n  'neeld',\n  'neele',\n  'neemb',\n  'neems',\n  'neeps',\n  'neese',\n  'neeze',\n  'negro',\n  'negus',\n  'neifs',\n  'neist',\n  'neive',\n  'nelis',\n  'nelly',\n  'nemas',\n  'nemns',\n  'nempt',\n  'nenes',\n  'neons',\n  'neper',\n  'nepit',\n  'neral',\n  'nerds',\n  'nerka',\n  'nerks',\n  'nerol',\n  'nerts',\n  'nertz',\n  'nervy',\n  'nests',\n  'netes',\n  'netop',\n  'netts',\n  'netty',\n  'neuks',\n  'neume',\n  'neums',\n  'nevel',\n  'neves',\n  'nevus',\n  'newbs',\n  'newed',\n  'newel',\n  'newie',\n  'newsy',\n  'newts',\n  'nexts',\n  'nexus',\n  'ngaio',\n  'ngana',\n  'ngati',\n  'ngoma',\n  'ngwee',\n  'nicad',\n  'nicht',\n  'nicks',\n  'nicol',\n  'nidal',\n  'nided',\n  'nides',\n  'nidor',\n  'nidus',\n  'niefs',\n  'nieve',\n  'nifes',\n  'niffs',\n  'niffy',\n  'nifty',\n  'niger',\n  'nighs',\n  'nihil',\n  'nikab',\n  'nikah',\n  'nikau',\n  'nills',\n  'nimbi',\n  'nimbs',\n  'nimps',\n  'niner',\n  'nines',\n  'ninon',\n  'nipas',\n  'nippy',\n  'niqab',\n  'nirls',\n  'nirly',\n  'nisei',\n  'nisse',\n  'nisus',\n  'niter',\n  'nites',\n  'nitid',\n  'niton',\n  'nitre',\n  'nitro',\n  'nitry',\n  'nitty',\n  'nival',\n  'nixed',\n  'nixer',\n  'nixes',\n  'nixie',\n  'nizam',\n  'nkosi',\n  'noahs',\n  'nobby',\n  'nocks',\n  'nodal',\n  'noddy',\n  'nodes',\n  'nodus',\n  'noels',\n  'noggs',\n  'nohow',\n  'noils',\n  'noily',\n  'noint',\n  'noirs',\n  'noles',\n  'nolls',\n  'nolos',\n  'nomas',\n  'nomen',\n  'nomes',\n  'nomic',\n  'nomoi',\n  'nomos',\n  'nonas',\n  'nonce',\n  'nones',\n  'nonet',\n  'nongs',\n  'nonis',\n  'nonny',\n  'nonyl',\n  'noobs',\n  'nooit',\n  'nooks',\n  'nooky',\n  'noons',\n  'noops',\n  'nopal',\n  'noria',\n  'noris',\n  'norks',\n  'norma',\n  'norms',\n  'nosed',\n  'noser',\n  'noses',\n  'notal',\n  'noted',\n  'noter',\n  'notes',\n  'notum',\n  'nould',\n  'noule',\n  'nouls',\n  'nouns',\n  'nouny',\n  'noups',\n  'novae',\n  'novas',\n  'novum',\n  'noway',\n  'nowed',\n  'nowls',\n  'nowts',\n  'nowty',\n  'noxal',\n  'noxes',\n  'noyau',\n  'noyed',\n  'noyes',\n  'nubby',\n  'nubia',\n  'nucha',\n  'nuddy',\n  'nuder',\n  'nudes',\n  'nudie',\n  'nudzh',\n  'nuffs',\n  'nugae',\n  'nuked',\n  'nukes',\n  'nulla',\n  'nulls',\n  'numbs',\n  'numen',\n  'nummy',\n  'nunny',\n  'nurds',\n  'nurdy',\n  'nurls',\n  'nurrs',\n  'nutso',\n  'nutsy',\n  'nyaff',\n  'nyala',\n  'nying',\n  'nyssa',\n  'oaked',\n  'oaker',\n  'oakum',\n  'oared',\n  'oases',\n  'oasis',\n  'oasts',\n  'oaten',\n  'oater',\n  'oaths',\n  'oaves',\n  'obang',\n  'obeah',\n  'obeli',\n  'obeys',\n  'obias',\n  'obied',\n  'obiit',\n  'obits',\n  'objet',\n  'oboes',\n  'obole',\n  'oboli',\n  'obols',\n  'occam',\n  'ocher',\n  'oches',\n  'ochre',\n  'ochry',\n  'ocker',\n  'ocrea',\n  'octad',\n  'octan',\n  'octas',\n  'octyl',\n  'oculi',\n  'odahs',\n  'odals',\n  'odeon',\n  'odeum',\n  'odism',\n  'odist',\n  'odium',\n  'odors',\n  'odour',\n  'odyle',\n  'odyls',\n  'ofays',\n  'offed',\n  'offie',\n  'oflag',\n  'ofter',\n  'ogams',\n  'ogeed',\n  'ogees',\n  'oggin',\n  'ogham',\n  'ogive',\n  'ogled',\n  'ogler',\n  'ogles',\n  'ogmic',\n  'ogres',\n  'ohias',\n  'ohing',\n  'ohmic',\n  'ohone',\n  'oidia',\n  'oiled',\n  'oiler',\n  'oinks',\n  'oints',\n  'ojime',\n  'okapi',\n  'okays',\n  'okehs',\n  'okras',\n  'oktas',\n  'oldie',\n  'oleic',\n  'olein',\n  'olent',\n  'oleos',\n  'oleum',\n  'olios',\n  'ollas',\n  'ollav',\n  'oller',\n  'ollie',\n  'ology',\n  'olpae',\n  'olpes',\n  'omasa',\n  'omber',\n  'ombus',\n  'omens',\n  'omers',\n  'omits',\n  'omlah',\n  'omovs',\n  'omrah',\n  'oncer',\n  'onces',\n  'oncet',\n  'oncus',\n  'onely',\n  'oners',\n  'onery',\n  'onium',\n  'onkus',\n  'onlay',\n  'onned',\n  'ontic',\n  'oobit',\n  'oohed',\n  'oomph',\n  'oonts',\n  'ooped',\n  'oorie',\n  'ooses',\n  'ootid',\n  'oozed',\n  'oozes',\n  'opahs',\n  'opals',\n  'opens',\n  'opepe',\n  'oping',\n  'oppos',\n  'opsin',\n  'opted',\n  'opter',\n  'orach',\n  'oracy',\n  'orals',\n  'orang',\n  'orant',\n  'orate',\n  'orbed',\n  'orcas',\n  'orcin',\n  'ordos',\n  'oread',\n  'orfes',\n  'orgia',\n  'orgic',\n  'orgue',\n  'oribi',\n  'oriel',\n  'orixa',\n  'orles',\n  'orlon',\n  'orlop',\n  'ormer',\n  'ornis',\n  'orpin',\n  'orris',\n  'ortho',\n  'orval',\n  'orzos',\n  'oscar',\n  'oshac',\n  'osier',\n  'osmic',\n  'osmol',\n  'ossia',\n  'ostia',\n  'otaku',\n  'otary',\n  'ottar',\n  'ottos',\n  'oubit',\n  'oucht',\n  'ouens',\n  'ouija',\n  'oulks',\n  'oumas',\n  'oundy',\n  'oupas',\n  'ouped',\n  'ouphe',\n  'ouphs',\n  'ourie',\n  'ousel',\n  'ousts',\n  'outby',\n  'outed',\n  'outre',\n  'outro',\n  'outta',\n  'ouzel',\n  'ouzos',\n  'ovals',\n  'ovels',\n  'ovens',\n  'overs',\n  'ovist',\n  'ovoli',\n  'ovolo',\n  'ovule',\n  'owche',\n  'owies',\n  'owled',\n  'owler',\n  'owlet',\n  'owned',\n  'owres',\n  'owrie',\n  'owsen',\n  'oxbow',\n  'oxers',\n  'oxeye',\n  'oxids',\n  'oxies',\n  'oxime',\n  'oxims',\n  'oxlip',\n  'oxter',\n  'oyers',\n  'ozeki',\n  'ozzie',\n  'paals',\n  'paans',\n  'pacas',\n  'paced',\n  'pacer',\n  'paces',\n  'pacey',\n  'pacha',\n  'packs',\n  'pacos',\n  'pacta',\n  'pacts',\n  'padis',\n  'padle',\n  'padma',\n  'padre',\n  'padri',\n  'paean',\n  'paedo',\n  'paeon',\n  'paged',\n  'pager',\n  'pages',\n  'pagle',\n  'pagod',\n  'pagri',\n  'paiks',\n  'pails',\n  'pains',\n  'paire',\n  'pairs',\n  'paisa',\n  'paise',\n  'pakka',\n  'palas',\n  'palay',\n  'palea',\n  'paled',\n  'pales',\n  'palet',\n  'palis',\n  'palki',\n  'palla',\n  'palls',\n  'pally',\n  'palms',\n  'palmy',\n  'palpi',\n  'palps',\n  'palsa',\n  'pampa',\n  'panax',\n  'pance',\n  'panda',\n  'pands',\n  'pandy',\n  'paned',\n  'panes',\n  'panga',\n  'pangs',\n  'panim',\n  'panko',\n  'panne',\n  'panni',\n  'panto',\n  'pants',\n  'panty',\n  'paoli',\n  'paolo',\n  'papas',\n  'papaw',\n  'papes',\n  'pappi',\n  'pappy',\n  'parae',\n  'paras',\n  'parch',\n  'pardi',\n  'pards',\n  'pardy',\n  'pared',\n  'paren',\n  'pareo',\n  'pares',\n  'pareu',\n  'parev',\n  'parge',\n  'pargo',\n  'paris',\n  'parki',\n  'parks',\n  'parky',\n  'parle',\n  'parly',\n  'parma',\n  'parol',\n  'parps',\n  'parra',\n  'parrs',\n  'parti',\n  'parts',\n  'parve',\n  'parvo',\n  'paseo',\n  'pases',\n  'pasha',\n  'pashm',\n  'paska',\n  'paspy',\n  'passe',\n  'pasts',\n  'pated',\n  'paten',\n  'pater',\n  'pates',\n  'paths',\n  'patin',\n  'patka',\n  'patly',\n  'patte',\n  'patus',\n  'pauas',\n  'pauls',\n  'pavan',\n  'paved',\n  'paven',\n  'paver',\n  'paves',\n  'pavid',\n  'pavin',\n  'pavis',\n  'pawas',\n  'pawaw',\n  'pawed',\n  'pawer',\n  'pawks',\n  'pawky',\n  'pawls',\n  'pawns',\n  'paxes',\n  'payed',\n  'payor',\n  'paysd',\n  'peage',\n  'peags',\n  'peaks',\n  'peaky',\n  'peals',\n  'peans',\n  'peare',\n  'pears',\n  'peart',\n  'pease',\n  'peats',\n  'peaty',\n  'peavy',\n  'peaze',\n  'pebas',\n  'pechs',\n  'pecke',\n  'pecks',\n  'pecky',\n  'pedes',\n  'pedis',\n  'pedro',\n  'peece',\n  'peeks',\n  'peels',\n  'peens',\n  'peeoy',\n  'peepe',\n  'peeps',\n  'peers',\n  'peery',\n  'peeve',\n  'peggy',\n  'peghs',\n  'peins',\n  'peise',\n  'peize',\n  'pekan',\n  'pekes',\n  'pekin',\n  'pekoe',\n  'pelas',\n  'pelau',\n  'peles',\n  'pelfs',\n  'pells',\n  'pelma',\n  'pelon',\n  'pelta',\n  'pelts',\n  'pends',\n  'pendu',\n  'pened',\n  'penes',\n  'pengo',\n  'penie',\n  'penis',\n  'penks',\n  'penna',\n  'penni',\n  'pents',\n  'peons',\n  'peony',\n  'pepla',\n  'pepos',\n  'peppy',\n  'pepsi',\n  'perai',\n  'perce',\n  'percs',\n  'perdu',\n  'perdy',\n  'perea',\n  'peres',\n  'peris',\n  'perks',\n  'perms',\n  'perns',\n  'perog',\n  'perps',\n  'perry',\n  'perse',\n  'perst',\n  'perts',\n  'perve',\n  'pervo',\n  'pervs',\n  'pervy',\n  'pesos',\n  'pests',\n  'pesty',\n  'petar',\n  'peter',\n  'petit',\n  'petre',\n  'petri',\n  'petti',\n  'petto',\n  'pewee',\n  'pewit',\n  'peyse',\n  'phage',\n  'phang',\n  'phare',\n  'pharm',\n  'pheer',\n  'phene',\n  'pheon',\n  'phese',\n  'phial',\n  'phish',\n  'phizz',\n  'phlox',\n  'phoca',\n  'phono',\n  'phons',\n  'phots',\n  'phpht',\n  'phuts',\n  'phyla',\n  'phyle',\n  'piani',\n  'pians',\n  'pibal',\n  'pical',\n  'picas',\n  'piccy',\n  'picks',\n  'picot',\n  'picra',\n  'picul',\n  'piend',\n  'piers',\n  'piert',\n  'pieta',\n  'piets',\n  'piezo',\n  'pight',\n  'pigmy',\n  'piing',\n  'pikas',\n  'pikau',\n  'piked',\n  'piker',\n  'pikes',\n  'pikey',\n  'pikis',\n  'pikul',\n  'pilae',\n  'pilaf',\n  'pilao',\n  'pilar',\n  'pilau',\n  'pilaw',\n  'pilch',\n  'pilea',\n  'piled',\n  'pilei',\n  'piler',\n  'piles',\n  'pilis',\n  'pills',\n  'pilow',\n  'pilum',\n  'pilus',\n  'pimas',\n  'pimps',\n  'pinas',\n  'pined',\n  'pines',\n  'pingo',\n  'pings',\n  'pinko',\n  'pinks',\n  'pinna',\n  'pinny',\n  'pinon',\n  'pinot',\n  'pinta',\n  'pints',\n  'pinup',\n  'pions',\n  'piony',\n  'pious',\n  'pioye',\n  'pioys',\n  'pipal',\n  'pipas',\n  'piped',\n  'pipes',\n  'pipet',\n  'pipis',\n  'pipit',\n  'pippy',\n  'pipul',\n  'pirai',\n  'pirls',\n  'pirns',\n  'pirog',\n  'pisco',\n  'pises',\n  'pisky',\n  'pisos',\n  'pissy',\n  'piste',\n  'pitas',\n  'piths',\n  'piton',\n  'pitot',\n  'pitta',\n  'piums',\n  'pixes',\n  'pized',\n  'pizes',\n  'plaas',\n  'plack',\n  'plage',\n  'plans',\n  'plaps',\n  'plash',\n  'plasm',\n  'plast',\n  'plats',\n  'platt',\n  'platy',\n  'playa',\n  'plays',\n  'pleas',\n  'plebe',\n  'plebs',\n  'plena',\n  'pleon',\n  'plesh',\n  'plews',\n  'plica',\n  'plies',\n  'plims',\n  'pling',\n  'plink',\n  'ploat',\n  'plods',\n  'plong',\n  'plonk',\n  'plook',\n  'plops',\n  'plots',\n  'plotz',\n  'plouk',\n  'plows',\n  'ploye',\n  'ploys',\n  'plues',\n  'pluff',\n  'plugs',\n  'plums',\n  'plumy',\n  'pluot',\n  'pluto',\n  'plyer',\n  'poach',\n  'poaka',\n  'poake',\n  'poboy',\n  'pocks',\n  'pocky',\n  'podal',\n  'poddy',\n  'podex',\n  'podge',\n  'podgy',\n  'podia',\n  'poems',\n  'poeps',\n  'poets',\n  'pogey',\n  'pogge',\n  'pogos',\n  'pohed',\n  'poilu',\n  'poind',\n  'pokal',\n  'poked',\n  'pokes',\n  'pokey',\n  'pokie',\n  'poled',\n  'poler',\n  'poles',\n  'poley',\n  'polio',\n  'polis',\n  'polje',\n  'polks',\n  'polls',\n  'polly',\n  'polos',\n  'polts',\n  'polys',\n  'pombe',\n  'pomes',\n  'pommy',\n  'pomos',\n  'pomps',\n  'ponce',\n  'poncy',\n  'ponds',\n  'pones',\n  'poney',\n  'ponga',\n  'pongo',\n  'pongs',\n  'pongy',\n  'ponks',\n  'ponts',\n  'ponty',\n  'ponzu',\n  'poods',\n  'pooed',\n  'poofs',\n  'poofy',\n  'poohs',\n  'pooja',\n  'pooka',\n  'pooks',\n  'pools',\n  'poons',\n  'poops',\n  'poopy',\n  'poori',\n  'poort',\n  'poots',\n  'poove',\n  'poovy',\n  'popes',\n  'poppa',\n  'popsy',\n  'porae',\n  'poral',\n  'pored',\n  'porer',\n  'pores',\n  'porge',\n  'porgy',\n  'porin',\n  'porks',\n  'porky',\n  'porno',\n  'porns',\n  'porny',\n  'porta',\n  'ports',\n  'porty',\n  'posed',\n  'poses',\n  'posey',\n  'posho',\n  'posts',\n  'potae',\n  'potch',\n  'poted',\n  'potes',\n  'potin',\n  'potoo',\n  'potsy',\n  'potto',\n  'potts',\n  'potty',\n  'pouff',\n  'poufs',\n  'pouke',\n  'pouks',\n  'poule',\n  'poulp',\n  'poult',\n  'poupe',\n  'poupt',\n  'pours',\n  'pouts',\n  'powan',\n  'powin',\n  'pownd',\n  'powns',\n  'powny',\n  'powre',\n  'poxed',\n  'poxes',\n  'poynt',\n  'poyou',\n  'poyse',\n  'pozzy',\n  'praam',\n  'prads',\n  'prahu',\n  'prams',\n  'prana',\n  'prang',\n  'praos',\n  'prase',\n  'prate',\n  'prats',\n  'pratt',\n  'praty',\n  'praus',\n  'prays',\n  'predy',\n  'preed',\n  'prees',\n  'preif',\n  'prems',\n  'premy',\n  'prent',\n  'preon',\n  'preop',\n  'preps',\n  'presa',\n  'prese',\n  'prest',\n  'preve',\n  'prexy',\n  'preys',\n  'prial',\n  'pricy',\n  'prief',\n  'prier',\n  'pries',\n  'prigs',\n  'prill',\n  'prima',\n  'primi',\n  'primp',\n  'prims',\n  'primy',\n  'prink',\n  'prion',\n  'prise',\n  'priss',\n  'proas',\n  'probs',\n  'prods',\n  'proem',\n  'profs',\n  'progs',\n  'proin',\n  'proke',\n  'prole',\n  'proll',\n  'promo',\n  'proms',\n  'pronk',\n  'props',\n  'prore',\n  'proso',\n  'pross',\n  'prost',\n  'prosy',\n  'proto',\n  'proul',\n  'prows',\n  'proyn',\n  'prunt',\n  'pruta',\n  'pryer',\n  'pryse',\n  'pseud',\n  'pshaw',\n  'psion',\n  'psoae',\n  'psoai',\n  'psoas',\n  'psora',\n  'psych',\n  'psyop',\n  'pubco',\n  'pubes',\n  'pubis',\n  'pucan',\n  'pucer',\n  'puces',\n  'pucka',\n  'pucks',\n  'puddy',\n  'pudge',\n  'pudic',\n  'pudor',\n  'pudsy',\n  'pudus',\n  'puers',\n  'puffa',\n  'puffs',\n  'puggy',\n  'pugil',\n  'puhas',\n  'pujah',\n  'pujas',\n  'pukas',\n  'puked',\n  'puker',\n  'pukes',\n  'pukey',\n  'pukka',\n  'pukus',\n  'pulao',\n  'pulas',\n  'puled',\n  'puler',\n  'pules',\n  'pulik',\n  'pulis',\n  'pulka',\n  'pulks',\n  'pulli',\n  'pulls',\n  'pully',\n  'pulmo',\n  'pulps',\n  'pulus',\n  'pumas',\n  'pumie',\n  'pumps',\n  'punas',\n  'punce',\n  'punga',\n  'pungs',\n  'punji',\n  'punka',\n  'punks',\n  'punky',\n  'punny',\n  'punto',\n  'punts',\n  'punty',\n  'pupae',\n  'pupas',\n  'pupus',\n  'purda',\n  'pured',\n  'pures',\n  'purin',\n  'puris',\n  'purls',\n  'purpy',\n  'purrs',\n  'pursy',\n  'purty',\n  'puses',\n  'pusle',\n  'pussy',\n  'putid',\n  'puton',\n  'putti',\n  'putto',\n  'putts',\n  'puzel',\n  'pwned',\n  'pyats',\n  'pyets',\n  'pygal',\n  'pyins',\n  'pylon',\n  'pyned',\n  'pynes',\n  'pyoid',\n  'pyots',\n  'pyral',\n  'pyran',\n  'pyres',\n  'pyrex',\n  'pyric',\n  'pyros',\n  'pyxed',\n  'pyxes',\n  'pyxie',\n  'pyxis',\n  'pzazz',\n  'qadis',\n  'qaids',\n  'qajaq',\n  'qanat',\n  'qapik',\n  'qibla',\n  'qophs',\n  'qorma',\n  'quads',\n  'quaff',\n  'quags',\n  'quair',\n  'quais',\n  'quaky',\n  'quale',\n  'quant',\n  'quare',\n  'quass',\n  'quate',\n  'quats',\n  'quayd',\n  'quays',\n  'qubit',\n  'quean',\n  'queme',\n  'quena',\n  'quern',\n  'queyn',\n  'queys',\n  'quich',\n  'quids',\n  'quiff',\n  'quims',\n  'quina',\n  'quine',\n  'quino',\n  'quins',\n  'quint',\n  'quipo',\n  'quips',\n  'quipu',\n  'quire',\n  'quirt',\n  'quist',\n  'quits',\n  'quoad',\n  'quods',\n  'quoif',\n  'quoin',\n  'quoit',\n  'quoll',\n  'quonk',\n  'quops',\n  'qursh',\n  'quyte',\n  'rabat',\n  'rabic',\n  'rabis',\n  'raced',\n  'races',\n  'rache',\n  'racks',\n  'racon',\n  'radge',\n  'radix',\n  'radon',\n  'raffs',\n  'rafts',\n  'ragas',\n  'ragde',\n  'raged',\n  'ragee',\n  'rager',\n  'rages',\n  'ragga',\n  'raggs',\n  'raggy',\n  'ragis',\n  'ragus',\n  'rahed',\n  'rahui',\n  'raias',\n  'raids',\n  'raiks',\n  'raile',\n  'rails',\n  'raine',\n  'rains',\n  'raird',\n  'raita',\n  'raits',\n  'rajas',\n  'rajes',\n  'raked',\n  'rakee',\n  'raker',\n  'rakes',\n  'rakia',\n  'rakis',\n  'rakus',\n  'rales',\n  'ramal',\n  'ramee',\n  'ramet',\n  'ramie',\n  'ramin',\n  'ramis',\n  'rammy',\n  'ramps',\n  'ramus',\n  'ranas',\n  'rance',\n  'rands',\n  'ranee',\n  'ranga',\n  'rangi',\n  'rangs',\n  'rangy',\n  'ranid',\n  'ranis',\n  'ranke',\n  'ranks',\n  'rants',\n  'raped',\n  'raper',\n  'rapes',\n  'raphe',\n  'rappe',\n  'rared',\n  'raree',\n  'rares',\n  'rarks',\n  'rased',\n  'raser',\n  'rases',\n  'rasps',\n  'rasse',\n  'rasta',\n  'ratal',\n  'ratan',\n  'ratas',\n  'ratch',\n  'rated',\n  'ratel',\n  'rater',\n  'rates',\n  'ratha',\n  'rathe',\n  'raths',\n  'ratoo',\n  'ratos',\n  'ratus',\n  'rauns',\n  'raupo',\n  'raved',\n  'ravel',\n  'raver',\n  'raves',\n  'ravey',\n  'ravin',\n  'rawer',\n  'rawin',\n  'rawly',\n  'rawns',\n  'raxed',\n  'raxes',\n  'rayah',\n  'rayas',\n  'rayed',\n  'rayle',\n  'rayne',\n  'razed',\n  'razee',\n  'razer',\n  'razes',\n  'razoo',\n  'readd',\n  'reads',\n  'reais',\n  'reaks',\n  'realo',\n  'reals',\n  'reame',\n  'reams',\n  'reamy',\n  'reans',\n  'reaps',\n  'rears',\n  'reast',\n  'reata',\n  'reate',\n  'reave',\n  'rebbe',\n  'rebec',\n  'rebid',\n  'rebit',\n  'rebop',\n  'rebuy',\n  'recal',\n  'recce',\n  'recco',\n  'reccy',\n  'recit',\n  'recks',\n  'recon',\n  'recta',\n  'recti',\n  'recto',\n  'redan',\n  'redds',\n  'reddy',\n  'reded',\n  'redes',\n  'redia',\n  'redid',\n  'redip',\n  'redly',\n  'redon',\n  'redos',\n  'redox',\n  'redry',\n  'redub',\n  'redux',\n  'redye',\n  'reech',\n  'reede',\n  'reeds',\n  'reefs',\n  'reefy',\n  'reeks',\n  'reeky',\n  'reels',\n  'reens',\n  'reest',\n  'reeve',\n  'refed',\n  'refel',\n  'reffo',\n  'refis',\n  'refix',\n  'refly',\n  'refry',\n  'regar',\n  'reges',\n  'reggo',\n  'regie',\n  'regma',\n  'regna',\n  'regos',\n  'regur',\n  'rehem',\n  'reifs',\n  'reify',\n  'reiki',\n  'reiks',\n  'reink',\n  'reins',\n  'reird',\n  'reist',\n  'reive',\n  'rejig',\n  'rejon',\n  'reked',\n  'rekes',\n  'rekey',\n  'relet',\n  'relie',\n  'relit',\n  'rello',\n  'reman',\n  'remap',\n  'remen',\n  'remet',\n  'remex',\n  'remix',\n  'renay',\n  'rends',\n  'reney',\n  'renga',\n  'renig',\n  'renin',\n  'renne',\n  'renos',\n  'rente',\n  'rents',\n  'reoil',\n  'reorg',\n  'repeg',\n  'repin',\n  'repla',\n  'repos',\n  'repot',\n  'repps',\n  'repro',\n  'reran',\n  'rerig',\n  'resat',\n  'resaw',\n  'resay',\n  'resee',\n  'reses',\n  'resew',\n  'resid',\n  'resit',\n  'resod',\n  'resow',\n  'resto',\n  'rests',\n  'resty',\n  'resus',\n  'retag',\n  'retax',\n  'retem',\n  'retia',\n  'retie',\n  'retox',\n  'revet',\n  'revie',\n  'rewan',\n  'rewax',\n  'rewed',\n  'rewet',\n  'rewin',\n  'rewon',\n  'rewth',\n  'rexes',\n  'rezes',\n  'rheas',\n  'rheme',\n  'rheum',\n  'rhies',\n  'rhime',\n  'rhine',\n  'rhody',\n  'rhomb',\n  'rhone',\n  'rhumb',\n  'rhyne',\n  'rhyta',\n  'riads',\n  'rials',\n  'riant',\n  'riata',\n  'ribas',\n  'ribby',\n  'ribes',\n  'riced',\n  'ricer',\n  'rices',\n  'ricey',\n  'richt',\n  'ricin',\n  'ricks',\n  'rides',\n  'ridgy',\n  'ridic',\n  'riels',\n  'riems',\n  'rieve',\n  'rifer',\n  'riffs',\n  'rifte',\n  'rifts',\n  'rifty',\n  'riggs',\n  'rigol',\n  'riled',\n  'riles',\n  'riley',\n  'rille',\n  'rills',\n  'rimae',\n  'rimed',\n  'rimer',\n  'rimes',\n  'rimus',\n  'rinds',\n  'rindy',\n  'rines',\n  'rings',\n  'rinks',\n  'rioja',\n  'riots',\n  'riped',\n  'ripes',\n  'ripps',\n  'rises',\n  'rishi',\n  'risks',\n  'risps',\n  'risus',\n  'rites',\n  'ritts',\n  'ritzy',\n  'rivas',\n  'rived',\n  'rivel',\n  'riven',\n  'rives',\n  'riyal',\n  'rizas',\n  'roads',\n  'roams',\n  'roans',\n  'roars',\n  'roary',\n  'roate',\n  'robed',\n  'robes',\n  'roble',\n  'rocks',\n  'roded',\n  'rodes',\n  'roguy',\n  'rohes',\n  'roids',\n  'roils',\n  'roily',\n  'roins',\n  'roist',\n  'rojak',\n  'rojis',\n  'roked',\n  'roker',\n  'rokes',\n  'rolag',\n  'roles',\n  'rolfs',\n  'rolls',\n  'romal',\n  'roman',\n  'romeo',\n  'romps',\n  'ronde',\n  'rondo',\n  'roneo',\n  'rones',\n  'ronin',\n  'ronne',\n  'ronte',\n  'ronts',\n  'roods',\n  'roofs',\n  'roofy',\n  'rooks',\n  'rooky',\n  'rooms',\n  'roons',\n  'roops',\n  'roopy',\n  'roosa',\n  'roose',\n  'roots',\n  'rooty',\n  'roped',\n  'roper',\n  'ropes',\n  'ropey',\n  'roque',\n  'roral',\n  'rores',\n  'roric',\n  'rorid',\n  'rorie',\n  'rorts',\n  'rorty',\n  'rosed',\n  'roses',\n  'roset',\n  'roshi',\n  'rosin',\n  'rosit',\n  'rosti',\n  'rosts',\n  'rotal',\n  'rotan',\n  'rotas',\n  'rotch',\n  'roted',\n  'rotes',\n  'rotis',\n  'rotls',\n  'roton',\n  'rotos',\n  'rotte',\n  'rouen',\n  'roues',\n  'roule',\n  'rouls',\n  'roums',\n  'roups',\n  'roupy',\n  'roust',\n  'routh',\n  'routs',\n  'roved',\n  'roven',\n  'roves',\n  'rowan',\n  'rowed',\n  'rowel',\n  'rowen',\n  'rowie',\n  'rowme',\n  'rownd',\n  'rowth',\n  'rowts',\n  'royne',\n  'royst',\n  'rozet',\n  'rozit',\n  'ruana',\n  'rubai',\n  'rubby',\n  'rubel',\n  'rubes',\n  'rubin',\n  'ruble',\n  'rubli',\n  'rubus',\n  'ruche',\n  'rucks',\n  'rudas',\n  'rudds',\n  'rudes',\n  'rudie',\n  'rudis',\n  'rueda',\n  'ruers',\n  'ruffe',\n  'ruffs',\n  'rugae',\n  'rugal',\n  'ruggy',\n  'ruing',\n  'ruins',\n  'rukhs',\n  'ruled',\n  'rules',\n  'rumal',\n  'rumbo',\n  'rumen',\n  'rumes',\n  'rumly',\n  'rummy',\n  'rumpo',\n  'rumps',\n  'rumpy',\n  'runch',\n  'runds',\n  'runed',\n  'runes',\n  'rungs',\n  'runic',\n  'runny',\n  'runts',\n  'runty',\n  'rupia',\n  'rurps',\n  'rurus',\n  'rusas',\n  'ruses',\n  'rushy',\n  'rusks',\n  'rusma',\n  'russe',\n  'rusts',\n  'ruths',\n  'rutin',\n  'rutty',\n  'ryals',\n  'rybat',\n  'ryked',\n  'rykes',\n  'rymme',\n  'rynds',\n  'ryots',\n  'ryper',\n  'saags',\n  'sabal',\n  'sabed',\n  'saber',\n  'sabes',\n  'sabha',\n  'sabin',\n  'sabir',\n  'sable',\n  'sabot',\n  'sabra',\n  'sabre',\n  'sacks',\n  'sacra',\n  'saddo',\n  'sades',\n  'sadhe',\n  'sadhu',\n  'sadis',\n  'sados',\n  'sadza',\n  'safed',\n  'safes',\n  'sagas',\n  'sager',\n  'sages',\n  'saggy',\n  'sagos',\n  'sagum',\n  'saheb',\n  'sahib',\n  'saice',\n  'saick',\n  'saics',\n  'saids',\n  'saiga',\n  'sails',\n  'saims',\n  'saine',\n  'sains',\n  'sairs',\n  'saist',\n  'saith',\n  'sajou',\n  'sakai',\n  'saker',\n  'sakes',\n  'sakia',\n  'sakis',\n  'sakti',\n  'salal',\n  'salat',\n  'salep',\n  'sales',\n  'salet',\n  'salic',\n  'salix',\n  'salle',\n  'salmi',\n  'salol',\n  'salop',\n  'salpa',\n  'salps',\n  'salse',\n  'salto',\n  'salts',\n  'salue',\n  'salut',\n  'saman',\n  'samas',\n  'samba',\n  'sambo',\n  'samek',\n  'samel',\n  'samen',\n  'sames',\n  'samey',\n  'samfu',\n  'sammy',\n  'sampi',\n  'samps',\n  'sands',\n  'saned',\n  'sanes',\n  'sanga',\n  'sangh',\n  'sango',\n  'sangs',\n  'sanko',\n  'sansa',\n  'santo',\n  'sants',\n  'saola',\n  'sapan',\n  'sapid',\n  'sapor',\n  'saran',\n  'sards',\n  'sared',\n  'saree',\n  'sarge',\n  'sargo',\n  'sarin',\n  'saris',\n  'sarks',\n  'sarky',\n  'sarod',\n  'saros',\n  'sarus',\n  'saser',\n  'sasin',\n  'sasse',\n  'satai',\n  'satay',\n  'sated',\n  'satem',\n  'sates',\n  'satis',\n  'sauba',\n  'sauch',\n  'saugh',\n  'sauls',\n  'sault',\n  'saunt',\n  'saury',\n  'sauts',\n  'saved',\n  'saver',\n  'saves',\n  'savey',\n  'savin',\n  'sawah',\n  'sawed',\n  'sawer',\n  'saxes',\n  'sayed',\n  'sayer',\n  'sayid',\n  'sayne',\n  'sayon',\n  'sayst',\n  'sazes',\n  'scabs',\n  'scads',\n  'scaff',\n  'scags',\n  'scail',\n  'scala',\n  'scall',\n  'scams',\n  'scand',\n  'scans',\n  'scapa',\n  'scape',\n  'scapi',\n  'scarp',\n  'scars',\n  'scart',\n  'scath',\n  'scats',\n  'scatt',\n  'scaud',\n  'scaup',\n  'scaur',\n  'scaws',\n  'sceat',\n  'scena',\n  'scend',\n  'schav',\n  'schmo',\n  'schul',\n  'schwa',\n  'sclim',\n  'scody',\n  'scogs',\n  'scoog',\n  'scoot',\n  'scopa',\n  'scops',\n  'scots',\n  'scoug',\n  'scoup',\n  'scowp',\n  'scows',\n  'scrab',\n  'scrae',\n  'scrag',\n  'scran',\n  'scrat',\n  'scraw',\n  'scray',\n  'scrim',\n  'scrip',\n  'scrob',\n  'scrod',\n  'scrog',\n  'scrow',\n  'scudi',\n  'scudo',\n  'scuds',\n  'scuff',\n  'scuft',\n  'scugs',\n  'sculk',\n  'scull',\n  'sculp',\n  'sculs',\n  'scums',\n  'scups',\n  'scurf',\n  'scurs',\n  'scuse',\n  'scuta',\n  'scute',\n  'scuts',\n  'scuzz',\n  'scyes',\n  'sdayn',\n  'sdein',\n  'seals',\n  'seame',\n  'seams',\n  'seamy',\n  'seans',\n  'seare',\n  'sears',\n  'sease',\n  'seats',\n  'seaze',\n  'sebum',\n  'secco',\n  'sechs',\n  'sects',\n  'seder',\n  'sedes',\n  'sedge',\n  'sedgy',\n  'sedum',\n  'seeds',\n  'seeks',\n  'seeld',\n  'seels',\n  'seely',\n  'seems',\n  'seeps',\n  'seepy',\n  'seers',\n  'sefer',\n  'segar',\n  'segni',\n  'segno',\n  'segol',\n  'segos',\n  'sehri',\n  'seifs',\n  'seils',\n  'seine',\n  'seirs',\n  'seise',\n  'seism',\n  'seity',\n  'seiza',\n  'sekos',\n  'sekts',\n  'selah',\n  'seles',\n  'selfs',\n  'sella',\n  'selle',\n  'sells',\n  'selva',\n  'semee',\n  'semes',\n  'semie',\n  'semis',\n  'senas',\n  'sends',\n  'senes',\n  'sengi',\n  'senna',\n  'senor',\n  'sensa',\n  'sensi',\n  'sente',\n  'senti',\n  'sents',\n  'senvy',\n  'senza',\n  'sepad',\n  'sepal',\n  'sepic',\n  'sepoy',\n  'septa',\n  'septs',\n  'serac',\n  'serai',\n  'seral',\n  'sered',\n  'serer',\n  'seres',\n  'serfs',\n  'serge',\n  'seric',\n  'serin',\n  'serks',\n  'seron',\n  'serow',\n  'serra',\n  'serre',\n  'serrs',\n  'serry',\n  'servo',\n  'sesey',\n  'sessa',\n  'setae',\n  'setal',\n  'seton',\n  'setts',\n  'sewan',\n  'sewar',\n  'sewed',\n  'sewel',\n  'sewen',\n  'sewin',\n  'sexed',\n  'sexer',\n  'sexes',\n  'sexto',\n  'sexts',\n  'seyen',\n  'shads',\n  'shags',\n  'shahs',\n  'shako',\n  'shakt',\n  'shalm',\n  'shaly',\n  'shama',\n  'shams',\n  'shand',\n  'shans',\n  'shaps',\n  'sharn',\n  'shash',\n  'shaul',\n  'shawm',\n  'shawn',\n  'shaws',\n  'shaya',\n  'shays',\n  'shchi',\n  'sheaf',\n  'sheal',\n  'sheas',\n  'sheds',\n  'sheel',\n  'shend',\n  'shent',\n  'sheol',\n  'sherd',\n  'shere',\n  'shero',\n  'shets',\n  'sheva',\n  'shewn',\n  'shews',\n  'shiai',\n  'shiel',\n  'shier',\n  'shies',\n  'shill',\n  'shily',\n  'shims',\n  'shins',\n  'ships',\n  'shirr',\n  'shirs',\n  'shish',\n  'shiso',\n  'shist',\n  'shite',\n  'shits',\n  'shiur',\n  'shiva',\n  'shive',\n  'shivs',\n  'shlep',\n  'shlub',\n  'shmek',\n  'shmoe',\n  'shoat',\n  'shoed',\n  'shoer',\n  'shoes',\n  'shogi',\n  'shogs',\n  'shoji',\n  'shojo',\n  'shola',\n  'shool',\n  'shoon',\n  'shoos',\n  'shope',\n  'shops',\n  'shorl',\n  'shote',\n  'shots',\n  'shott',\n  'showd',\n  'shows',\n  'shoyu',\n  'shred',\n  'shris',\n  'shrow',\n  'shtik',\n  'shtum',\n  'shtup',\n  'shule',\n  'shuln',\n  'shuls',\n  'shuns',\n  'shura',\n  'shute',\n  'shuts',\n  'shwas',\n  'shyer',\n  'sials',\n  'sibbs',\n  'sibyl',\n  'sices',\n  'sicht',\n  'sicko',\n  'sicks',\n  'sicky',\n  'sidas',\n  'sided',\n  'sider',\n  'sides',\n  'sidha',\n  'sidhe',\n  'sidle',\n  'sield',\n  'siens',\n  'sient',\n  'sieth',\n  'sieur',\n  'sifts',\n  'sighs',\n  'sigil',\n  'sigla',\n  'signa',\n  'signs',\n  'sijos',\n  'sikas',\n  'siker',\n  'sikes',\n  'silds',\n  'siled',\n  'silen',\n  'siler',\n  'siles',\n  'silex',\n  'silks',\n  'sills',\n  'silos',\n  'silts',\n  'silty',\n  'silva',\n  'simar',\n  'simas',\n  'simba',\n  'simis',\n  'simps',\n  'simul',\n  'sinds',\n  'sined',\n  'sines',\n  'sings',\n  'sinhs',\n  'sinks',\n  'sinky',\n  'sinus',\n  'siped',\n  'sipes',\n  'sippy',\n  'sired',\n  'siree',\n  'sires',\n  'sirih',\n  'siris',\n  'siroc',\n  'sirra',\n  'sirup',\n  'sisal',\n  'sises',\n  'sista',\n  'sists',\n  'sitar',\n  'sited',\n  'sites',\n  'sithe',\n  'sitka',\n  'situp',\n  'situs',\n  'siver',\n  'sixer',\n  'sixes',\n  'sixmo',\n  'sixte',\n  'sizar',\n  'sized',\n  'sizel',\n  'sizer',\n  'sizes',\n  'skags',\n  'skail',\n  'skald',\n  'skank',\n  'skart',\n  'skats',\n  'skatt',\n  'skaws',\n  'skean',\n  'skear',\n  'skeds',\n  'skeed',\n  'skeef',\n  'skeen',\n  'skeer',\n  'skees',\n  'skeet',\n  'skegg',\n  'skegs',\n  'skein',\n  'skelf',\n  'skell',\n  'skelm',\n  'skelp',\n  'skene',\n  'skens',\n  'skeos',\n  'skeps',\n  'skers',\n  'skets',\n  'skews',\n  'skids',\n  'skied',\n  'skies',\n  'skiey',\n  'skimo',\n  'skims',\n  'skink',\n  'skins',\n  'skint',\n  'skios',\n  'skips',\n  'skirl',\n  'skirr',\n  'skite',\n  'skits',\n  'skive',\n  'skivy',\n  'sklim',\n  'skoal',\n  'skody',\n  'skoff',\n  'skogs',\n  'skols',\n  'skool',\n  'skort',\n  'skosh',\n  'skran',\n  'skrik',\n  'skuas',\n  'skugs',\n  'skyed',\n  'skyer',\n  'skyey',\n  'skyfs',\n  'skyre',\n  'skyrs',\n  'skyte',\n  'slabs',\n  'slade',\n  'slaes',\n  'slags',\n  'slaid',\n  'slake',\n  'slams',\n  'slane',\n  'slank',\n  'slaps',\n  'slart',\n  'slats',\n  'slaty',\n  'slaws',\n  'slays',\n  'slebs',\n  'sleds',\n  'sleer',\n  'slews',\n  'sleys',\n  'slier',\n  'slily',\n  'slims',\n  'slipe',\n  'slips',\n  'slipt',\n  'slish',\n  'slits',\n  'slive',\n  'sloan',\n  'slobs',\n  'sloes',\n  'slogs',\n  'sloid',\n  'slojd',\n  'slomo',\n  'sloom',\n  'sloot',\n  'slops',\n  'slopy',\n  'slorm',\n  'slots',\n  'slove',\n  'slows',\n  'sloyd',\n  'slubb',\n  'slubs',\n  'slued',\n  'slues',\n  'sluff',\n  'slugs',\n  'sluit',\n  'slums',\n  'slurb',\n  'slurs',\n  'sluse',\n  'sluts',\n  'slyer',\n  'slype',\n  'smaak',\n  'smaik',\n  'smalm',\n  'smalt',\n  'smarm',\n  'smaze',\n  'smeek',\n  'smees',\n  'smeik',\n  'smeke',\n  'smerk',\n  'smews',\n  'smirr',\n  'smirs',\n  'smits',\n  'smogs',\n  'smoko',\n  'smolt',\n  'smoor',\n  'smoot',\n  'smore',\n  'smorg',\n  'smout',\n  'smowt',\n  'smugs',\n  'smurs',\n  'smush',\n  'smuts',\n  'snabs',\n  'snafu',\n  'snags',\n  'snaps',\n  'snarf',\n  'snark',\n  'snars',\n  'snary',\n  'snash',\n  'snath',\n  'snaws',\n  'snead',\n  'sneap',\n  'snebs',\n  'sneck',\n  'sneds',\n  'sneed',\n  'snees',\n  'snell',\n  'snibs',\n  'snick',\n  'snies',\n  'snift',\n  'snigs',\n  'snips',\n  'snipy',\n  'snirt',\n  'snits',\n  'snobs',\n  'snods',\n  'snoek',\n  'snoep',\n  'snogs',\n  'snoke',\n  'snood',\n  'snook',\n  'snool',\n  'snoot',\n  'snots',\n  'snowk',\n  'snows',\n  'snubs',\n  'snugs',\n  'snush',\n  'snyes',\n  'soaks',\n  'soaps',\n  'soare',\n  'soars',\n  'soave',\n  'sobas',\n  'socas',\n  'soces',\n  'socko',\n  'socks',\n  'socle',\n  'sodas',\n  'soddy',\n  'sodic',\n  'sodom',\n  'sofar',\n  'sofas',\n  'softa',\n  'softs',\n  'softy',\n  'soger',\n  'sohur',\n  'soils',\n  'soily',\n  'sojas',\n  'sojus',\n  'sokah',\n  'soken',\n  'sokes',\n  'sokol',\n  'solah',\n  'solan',\n  'solas',\n  'solde',\n  'soldi',\n  'soldo',\n  'solds',\n  'soled',\n  'solei',\n  'soler',\n  'soles',\n  'solon',\n  'solos',\n  'solum',\n  'solus',\n  'soman',\n  'somas',\n  'sonce',\n  'sonde',\n  'sones',\n  'songs',\n  'sonly',\n  'sonne',\n  'sonny',\n  'sonse',\n  'sonsy',\n  'sooey',\n  'sooks',\n  'sooky',\n  'soole',\n  'sools',\n  'sooms',\n  'soops',\n  'soote',\n  'soots',\n  'sophs',\n  'sophy',\n  'sopor',\n  'soppy',\n  'sopra',\n  'soral',\n  'soras',\n  'sorbo',\n  'sorbs',\n  'sorda',\n  'sordo',\n  'sords',\n  'sored',\n  'soree',\n  'sorel',\n  'sorer',\n  'sores',\n  'sorex',\n  'sorgo',\n  'sorns',\n  'sorra',\n  'sorta',\n  'sorts',\n  'sorus',\n  'soths',\n  'sotol',\n  'souce',\n  'souct',\n  'sough',\n  'souks',\n  'souls',\n  'soums',\n  'soups',\n  'soupy',\n  'sours',\n  'souse',\n  'souts',\n  'sowar',\n  'sowce',\n  'sowed',\n  'sowff',\n  'sowfs',\n  'sowle',\n  'sowls',\n  'sowms',\n  'sownd',\n  'sowne',\n  'sowps',\n  'sowse',\n  'sowth',\n  'soyas',\n  'soyle',\n  'soyuz',\n  'sozin',\n  'spacy',\n  'spado',\n  'spaed',\n  'spaer',\n  'spaes',\n  'spags',\n  'spahi',\n  'spail',\n  'spain',\n  'spait',\n  'spake',\n  'spald',\n  'spale',\n  'spall',\n  'spalt',\n  'spams',\n  'spane',\n  'spang',\n  'spans',\n  'spard',\n  'spars',\n  'spart',\n  'spate',\n  'spats',\n  'spaul',\n  'spawl',\n  'spaws',\n  'spayd',\n  'spays',\n  'spaza',\n  'spazz',\n  'speal',\n  'spean',\n  'speat',\n  'specs',\n  'spect',\n  'speel',\n  'speer',\n  'speil',\n  'speir',\n  'speks',\n  'speld',\n  'spelk',\n  'speos',\n  'spets',\n  'speug',\n  'spews',\n  'spewy',\n  'spial',\n  'spica',\n  'spick',\n  'spics',\n  'spide',\n  'spier',\n  'spies',\n  'spiff',\n  'spifs',\n  'spiks',\n  'spile',\n  'spims',\n  'spina',\n  'spink',\n  'spins',\n  'spirt',\n  'spiry',\n  'spits',\n  'spitz',\n  'spivs',\n  'splay',\n  'splog',\n  'spode',\n  'spods',\n  'spoom',\n  'spoor',\n  'spoot',\n  'spork',\n  'sposh',\n  'spots',\n  'sprad',\n  'sprag',\n  'sprat',\n  'spred',\n  'sprew',\n  'sprit',\n  'sprod',\n  'sprog',\n  'sprue',\n  'sprug',\n  'spuds',\n  'spued',\n  'spuer',\n  'spues',\n  'spugs',\n  'spule',\n  'spume',\n  'spumy',\n  'spurs',\n  'sputa',\n  'spyal',\n  'spyre',\n  'squab',\n  'squaw',\n  'squeg',\n  'squid',\n  'squit',\n  'squiz',\n  'stabs',\n  'stade',\n  'stags',\n  'stagy',\n  'staig',\n  'stane',\n  'stang',\n  'staph',\n  'staps',\n  'starn',\n  'starr',\n  'stars',\n  'stats',\n  'staun',\n  'staws',\n  'stays',\n  'stean',\n  'stear',\n  'stedd',\n  'stede',\n  'steds',\n  'steek',\n  'steem',\n  'steen',\n  'steil',\n  'stela',\n  'stele',\n  'stell',\n  'steme',\n  'stems',\n  'stend',\n  'steno',\n  'stens',\n  'stent',\n  'steps',\n  'stept',\n  'stere',\n  'stets',\n  'stews',\n  'stewy',\n  'steys',\n  'stich',\n  'stied',\n  'sties',\n  'stilb',\n  'stile',\n  'stime',\n  'stims',\n  'stimy',\n  'stipa',\n  'stipe',\n  'stire',\n  'stirk',\n  'stirp',\n  'stirs',\n  'stive',\n  'stivy',\n  'stoae',\n  'stoai',\n  'stoas',\n  'stoat',\n  'stobs',\n  'stoep',\n  'stogy',\n  'stoit',\n  'stoln',\n  'stoma',\n  'stond',\n  'stong',\n  'stonk',\n  'stonn',\n  'stook',\n  'stoor',\n  'stope',\n  'stops',\n  'stopt',\n  'stoss',\n  'stots',\n  'stott',\n  'stoun',\n  'stoup',\n  'stour',\n  'stown',\n  'stowp',\n  'stows',\n  'strad',\n  'strae',\n  'strag',\n  'strak',\n  'strep',\n  'strew',\n  'stria',\n  'strig',\n  'strim',\n  'strop',\n  'strow',\n  'stroy',\n  'strum',\n  'stubs',\n  'stude',\n  'studs',\n  'stull',\n  'stulm',\n  'stumm',\n  'stums',\n  'stuns',\n  'stupa',\n  'stupe',\n  'sture',\n  'sturt',\n  'styed',\n  'styes',\n  'styli',\n  'stylo',\n  'styme',\n  'stymy',\n  'styre',\n  'styte',\n  'subah',\n  'subas',\n  'subby',\n  'suber',\n  'subha',\n  'succi',\n  'sucks',\n  'sucky',\n  'sucre',\n  'sudds',\n  'sudor',\n  'sudsy',\n  'suede',\n  'suent',\n  'suers',\n  'suete',\n  'suets',\n  'suety',\n  'sugan',\n  'sughs',\n  'sugos',\n  'suhur',\n  'suids',\n  'suint',\n  'suits',\n  'sujee',\n  'sukhs',\n  'sukuk',\n  'sulci',\n  'sulfa',\n  'sulfo',\n  'sulks',\n  'sulph',\n  'sulus',\n  'sumis',\n  'summa',\n  'sumos',\n  'sumph',\n  'sumps',\n  'sunis',\n  'sunks',\n  'sunna',\n  'sunns',\n  'sunup',\n  'supes',\n  'supra',\n  'surah',\n  'sural',\n  'suras',\n  'surat',\n  'surds',\n  'sured',\n  'sures',\n  'surfs',\n  'surfy',\n  'surgy',\n  'surra',\n  'sused',\n  'suses',\n  'susus',\n  'sutor',\n  'sutra',\n  'sutta',\n  'swabs',\n  'swack',\n  'swads',\n  'swage',\n  'swags',\n  'swail',\n  'swain',\n  'swale',\n  'swaly',\n  'swamy',\n  'swang',\n  'swank',\n  'swans',\n  'swaps',\n  'swapt',\n  'sward',\n  'sware',\n  'swarf',\n  'swart',\n  'swats',\n  'swayl',\n  'sways',\n  'sweal',\n  'swede',\n  'sweed',\n  'sweel',\n  'sweer',\n  'swees',\n  'sweir',\n  'swelt',\n  'swerf',\n  'sweys',\n  'swies',\n  'swigs',\n  'swile',\n  'swims',\n  'swink',\n  'swipe',\n  'swire',\n  'swiss',\n  'swith',\n  'swits',\n  'swive',\n  'swizz',\n  'swobs',\n  'swole',\n  'swoln',\n  'swops',\n  'swopt',\n  'swots',\n  'swoun',\n  'sybbe',\n  'sybil',\n  'syboe',\n  'sybow',\n  'sycee',\n  'syces',\n  'sycon',\n  'syens',\n  'syker',\n  'sykes',\n  'sylis',\n  'sylph',\n  'sylva',\n  'symar',\n  'synch',\n  'syncs',\n  'synds',\n  'syned',\n  'synes',\n  'synth',\n  'syped',\n  'sypes',\n  'syphs',\n  'syrah',\n  'syren',\n  'sysop',\n  'sythe',\n  'syver',\n  'taals',\n  'taata',\n  'taber',\n  'tabes',\n  'tabid',\n  'tabis',\n  'tabla',\n  'tabor',\n  'tabun',\n  'tabus',\n  'tacan',\n  'taces',\n  'tacet',\n  'tache',\n  'tacho',\n  'tachs',\n  'tacks',\n  'tacos',\n  'tacts',\n  'taels',\n  'tafia',\n  'taggy',\n  'tagma',\n  'tahas',\n  'tahrs',\n  'taiga',\n  'taigs',\n  'taiko',\n  'tails',\n  'tains',\n  'taira',\n  'taish',\n  'taits',\n  'tajes',\n  'takas',\n  'takes',\n  'takhi',\n  'takin',\n  'takis',\n  'takky',\n  'talak',\n  'talaq',\n  'talar',\n  'talas',\n  'talcs',\n  'talcy',\n  'talea',\n  'taler',\n  'tales',\n  'talks',\n  'talky',\n  'talls',\n  'talma',\n  'talpa',\n  'taluk',\n  'talus',\n  'tamal',\n  'tamed',\n  'tames',\n  'tamin',\n  'tamis',\n  'tammy',\n  'tamps',\n  'tanas',\n  'tanga',\n  'tangi',\n  'tangs',\n  'tanhs',\n  'tanka',\n  'tanks',\n  'tanky',\n  'tanna',\n  'tansy',\n  'tanti',\n  'tanto',\n  'tanty',\n  'tapas',\n  'taped',\n  'tapen',\n  'tapes',\n  'tapet',\n  'tapis',\n  'tappa',\n  'tapus',\n  'taras',\n  'tardo',\n  'tared',\n  'tares',\n  'targa',\n  'targe',\n  'tarns',\n  'taroc',\n  'tarok',\n  'taros',\n  'tarps',\n  'tarre',\n  'tarry',\n  'tarsi',\n  'tarts',\n  'tarty',\n  'tasar',\n  'tased',\n  'taser',\n  'tases',\n  'tasks',\n  'tassa',\n  'tasse',\n  'tasso',\n  'tatar',\n  'tater',\n  'tates',\n  'taths',\n  'tatie',\n  'tatou',\n  'tatts',\n  'tatus',\n  'taube',\n  'tauld',\n  'tauon',\n  'taupe',\n  'tauts',\n  'tavah',\n  'tavas',\n  'taver',\n  'tawai',\n  'tawas',\n  'tawed',\n  'tawer',\n  'tawie',\n  'tawse',\n  'tawts',\n  'taxed',\n  'taxer',\n  'taxes',\n  'taxis',\n  'taxol',\n  'taxon',\n  'taxor',\n  'taxus',\n  'tayra',\n  'tazza',\n  'tazze',\n  'teade',\n  'teads',\n  'teaed',\n  'teaks',\n  'teals',\n  'teams',\n  'tears',\n  'teats',\n  'teaze',\n  'techs',\n  'techy',\n  'tecta',\n  'teels',\n  'teems',\n  'teend',\n  'teene',\n  'teens',\n  'teeny',\n  'teers',\n  'teffs',\n  'teggs',\n  'tegua',\n  'tegus',\n  'tehrs',\n  'teiid',\n  'teils',\n  'teind',\n  'teins',\n  'telae',\n  'telco',\n  'teles',\n  'telex',\n  'telia',\n  'telic',\n  'tells',\n  'telly',\n  'teloi',\n  'telos',\n  'temed',\n  'temes',\n  'tempi',\n  'temps',\n  'tempt',\n  'temse',\n  'tench',\n  'tends',\n  'tendu',\n  'tenes',\n  'tenge',\n  'tenia',\n  'tenne',\n  'tenno',\n  'tenny',\n  'tenon',\n  'tents',\n  'tenty',\n  'tenue',\n  'tepal',\n  'tepas',\n  'tepoy',\n  'terai',\n  'teras',\n  'terce',\n  'terek',\n  'teres',\n  'terfe',\n  'terfs',\n  'terga',\n  'terms',\n  'terne',\n  'terns',\n  'terry',\n  'terts',\n  'tesla',\n  'testa',\n  'teste',\n  'tests',\n  'tetes',\n  'teths',\n  'tetra',\n  'tetri',\n  'teuch',\n  'teugh',\n  'tewed',\n  'tewel',\n  'tewit',\n  'texas',\n  'texes',\n  'texts',\n  'thack',\n  'thagi',\n  'thaim',\n  'thale',\n  'thali',\n  'thana',\n  'thane',\n  'thang',\n  'thans',\n  'thanx',\n  'tharm',\n  'thars',\n  'thaws',\n  'thawy',\n  'thebe',\n  'theca',\n  'theed',\n  'theek',\n  'thees',\n  'thegn',\n  'theic',\n  'thein',\n  'thelf',\n  'thema',\n  'thens',\n  'theow',\n  'therm',\n  'thesp',\n  'thete',\n  'thews',\n  'thewy',\n  'thigs',\n  'thilk',\n  'thill',\n  'thine',\n  'thins',\n  'thiol',\n  'thirl',\n  'thoft',\n  'thole',\n  'tholi',\n  'thoro',\n  'thorp',\n  'thous',\n  'thowl',\n  'thrae',\n  'thraw',\n  'thrid',\n  'thrip',\n  'throe',\n  'thuds',\n  'thugs',\n  'thuja',\n  'thunk',\n  'thurl',\n  'thuya',\n  'thymi',\n  'thymy',\n  'tians',\n  'tiars',\n  'tical',\n  'ticca',\n  'ticed',\n  'tices',\n  'tichy',\n  'ticks',\n  'ticky',\n  'tiddy',\n  'tided',\n  'tides',\n  'tiers',\n  'tiffs',\n  'tifos',\n  'tifts',\n  'tiges',\n  'tigon',\n  'tikas',\n  'tikes',\n  'tikis',\n  'tikka',\n  'tilak',\n  'tiled',\n  'tiler',\n  'tiles',\n  'tills',\n  'tilly',\n  'tilth',\n  'tilts',\n  'timbo',\n  'timed',\n  'times',\n  'timon',\n  'timps',\n  'tinas',\n  'tinct',\n  'tinds',\n  'tinea',\n  'tined',\n  'tines',\n  'tinge',\n  'tings',\n  'tinks',\n  'tinny',\n  'tints',\n  'tinty',\n  'tipis',\n  'tippy',\n  'tired',\n  'tires',\n  'tirls',\n  'tiros',\n  'tirrs',\n  'titch',\n  'titer',\n  'titis',\n  'titre',\n  'titty',\n  'titup',\n  'tiyin',\n  'tiyns',\n  'tizes',\n  'tizzy',\n  'toads',\n  'toady',\n  'toaze',\n  'tocks',\n  'tocky',\n  'tocos',\n  'todde',\n  'toeas',\n  'toffs',\n  'toffy',\n  'tofts',\n  'tofus',\n  'togae',\n  'togas',\n  'toged',\n  'toges',\n  'togue',\n  'tohos',\n  'toile',\n  'toils',\n  'toing',\n  'toise',\n  'toits',\n  'tokay',\n  'toked',\n  'toker',\n  'tokes',\n  'tokos',\n  'tolan',\n  'tolar',\n  'tolas',\n  'toled',\n  'toles',\n  'tolls',\n  'tolly',\n  'tolts',\n  'tolus',\n  'tolyl',\n  'toman',\n  'tombs',\n  'tomes',\n  'tomia',\n  'tommy',\n  'tomos',\n  'tondi',\n  'tondo',\n  'toned',\n  'toner',\n  'tones',\n  'toney',\n  'tongs',\n  'tonka',\n  'tonks',\n  'tonne',\n  'tonus',\n  'tools',\n  'tooms',\n  'toons',\n  'toots',\n  'toped',\n  'topee',\n  'topek',\n  'toper',\n  'topes',\n  'tophe',\n  'tophi',\n  'tophs',\n  'topis',\n  'topoi',\n  'topos',\n  'toppy',\n  'toque',\n  'torah',\n  'toran',\n  'toras',\n  'torcs',\n  'tores',\n  'toric',\n  'torii',\n  'toros',\n  'torot',\n  'torrs',\n  'torse',\n  'torsi',\n  'torsk',\n  'torta',\n  'torte',\n  'torts',\n  'tosas',\n  'tosed',\n  'toses',\n  'toshy',\n  'tossy',\n  'toted',\n  'toter',\n  'totes',\n  'totty',\n  'touks',\n  'touns',\n  'tours',\n  'touse',\n  'tousy',\n  'touts',\n  'touze',\n  'touzy',\n  'towed',\n  'towie',\n  'towns',\n  'towny',\n  'towse',\n  'towsy',\n  'towts',\n  'towze',\n  'towzy',\n  'toyed',\n  'toyer',\n  'toyon',\n  'toyos',\n  'tozed',\n  'tozes',\n  'tozie',\n  'trabs',\n  'trads',\n  'tragi',\n  'traik',\n  'trams',\n  'trank',\n  'tranq',\n  'trans',\n  'trant',\n  'trape',\n  'traps',\n  'trapt',\n  'trass',\n  'trats',\n  'tratt',\n  'trave',\n  'trayf',\n  'trays',\n  'treck',\n  'treed',\n  'treen',\n  'trees',\n  'trefa',\n  'treif',\n  'treks',\n  'trema',\n  'trems',\n  'tress',\n  'trest',\n  'trets',\n  'trews',\n  'treyf',\n  'treys',\n  'triac',\n  'tride',\n  'trier',\n  'tries',\n  'triff',\n  'trigo',\n  'trigs',\n  'trike',\n  'trild',\n  'trill',\n  'trims',\n  'trine',\n  'trins',\n  'triol',\n  'trior',\n  'trios',\n  'trips',\n  'tripy',\n  'trist',\n  'troad',\n  'troak',\n  'troat',\n  'trock',\n  'trode',\n  'trods',\n  'trogs',\n  'trois',\n  'troke',\n  'tromp',\n  'trona',\n  'tronc',\n  'trone',\n  'tronk',\n  'trons',\n  'trooz',\n  'troth',\n  'trots',\n  'trows',\n  'troys',\n  'trued',\n  'trues',\n  'trugo',\n  'trugs',\n  'trull',\n  'tryer',\n  'tryke',\n  'tryma',\n  'tryps',\n  'tsade',\n  'tsadi',\n  'tsars',\n  'tsked',\n  'tsuba',\n  'tsubo',\n  'tuans',\n  'tuart',\n  'tuath',\n  'tubae',\n  'tubar',\n  'tubas',\n  'tubby',\n  'tubed',\n  'tubes',\n  'tucks',\n  'tufas',\n  'tuffe',\n  'tuffs',\n  'tufts',\n  'tufty',\n  'tugra',\n  'tuile',\n  'tuina',\n  'tuism',\n  'tuktu',\n  'tules',\n  'tulpa',\n  'tulsi',\n  'tumid',\n  'tummy',\n  'tumps',\n  'tumpy',\n  'tunas',\n  'tunds',\n  'tuned',\n  'tuner',\n  'tunes',\n  'tungs',\n  'tunny',\n  'tupek',\n  'tupik',\n  'tuple',\n  'tuque',\n  'turds',\n  'turfs',\n  'turfy',\n  'turks',\n  'turme',\n  'turms',\n  'turns',\n  'turnt',\n  'turps',\n  'turrs',\n  'tushy',\n  'tusks',\n  'tusky',\n  'tutee',\n  'tutti',\n  'tutty',\n  'tutus',\n  'tuxes',\n  'tuyer',\n  'twaes',\n  'twain',\n  'twals',\n  'twank',\n  'twats',\n  'tways',\n  'tweel',\n  'tween',\n  'tweep',\n  'tweer',\n  'twerk',\n  'twerp',\n  'twier',\n  'twigs',\n  'twill',\n  'twilt',\n  'twink',\n  'twins',\n  'twiny',\n  'twire',\n  'twirp',\n  'twite',\n  'twits',\n  'twoer',\n  'twyer',\n  'tyees',\n  'tyers',\n  'tyiyn',\n  'tykes',\n  'tyler',\n  'tymps',\n  'tynde',\n  'tyned',\n  'tynes',\n  'typal',\n  'typed',\n  'types',\n  'typey',\n  'typic',\n  'typos',\n  'typps',\n  'typto',\n  'tyran',\n  'tyred',\n  'tyres',\n  'tyros',\n  'tythe',\n  'tzars',\n  'udals',\n  'udons',\n  'ugali',\n  'ugged',\n  'uhlan',\n  'uhuru',\n  'ukase',\n  'ulama',\n  'ulans',\n  'ulema',\n  'ulmin',\n  'ulnad',\n  'ulnae',\n  'ulnar',\n  'ulnas',\n  'ulpan',\n  'ulvas',\n  'ulyie',\n  'ulzie',\n  'umami',\n  'umbel',\n  'umber',\n  'umble',\n  'umbos',\n  'umbre',\n  'umiac',\n  'umiak',\n  'umiaq',\n  'ummah',\n  'ummas',\n  'ummed',\n  'umped',\n  'umphs',\n  'umpie',\n  'umpty',\n  'umrah',\n  'umras',\n  'unais',\n  'unapt',\n  'unarm',\n  'unary',\n  'unaus',\n  'unbag',\n  'unban',\n  'unbar',\n  'unbed',\n  'unbid',\n  'unbox',\n  'uncap',\n  'unces',\n  'uncia',\n  'uncos',\n  'uncoy',\n  'uncus',\n  'undam',\n  'undee',\n  'undos',\n  'undug',\n  'uneth',\n  'unfix',\n  'ungag',\n  'unget',\n  'ungod',\n  'ungot',\n  'ungum',\n  'unhat',\n  'unhip',\n  'unica',\n  'units',\n  'unjam',\n  'unked',\n  'unket',\n  'unkid',\n  'unlaw',\n  'unlay',\n  'unled',\n  'unlet',\n  'unlid',\n  'unman',\n  'unmew',\n  'unmix',\n  'unpay',\n  'unpeg',\n  'unpen',\n  'unpin',\n  'unred',\n  'unrid',\n  'unrig',\n  'unrip',\n  'unsaw',\n  'unsay',\n  'unsee',\n  'unsew',\n  'unsex',\n  'unsod',\n  'untax',\n  'untin',\n  'unwet',\n  'unwit',\n  'unwon',\n  'upbow',\n  'upbye',\n  'updos',\n  'updry',\n  'upend',\n  'upjet',\n  'uplay',\n  'upled',\n  'uplit',\n  'upped',\n  'upran',\n  'uprun',\n  'upsee',\n  'upsey',\n  'uptak',\n  'upter',\n  'uptie',\n  'uraei',\n  'urali',\n  'uraos',\n  'urare',\n  'urari',\n  'urase',\n  'urate',\n  'urbex',\n  'urbia',\n  'urdee',\n  'ureal',\n  'ureas',\n  'uredo',\n  'ureic',\n  'urena',\n  'urent',\n  'urged',\n  'urger',\n  'urges',\n  'urial',\n  'urite',\n  'urman',\n  'urnal',\n  'urned',\n  'urped',\n  'ursae',\n  'ursid',\n  'urson',\n  'urubu',\n  'urvas',\n  'users',\n  'usnea',\n  'usque',\n  'usure',\n  'usury',\n  'uteri',\n  'uveal',\n  'uveas',\n  'uvula',\n  'vacua',\n  'vaded',\n  'vades',\n  'vagal',\n  'vagus',\n  'vails',\n  'vaire',\n  'vairs',\n  'vairy',\n  'vakas',\n  'vakil',\n  'vales',\n  'valis',\n  'valse',\n  'vamps',\n  'vampy',\n  'vanda',\n  'vaned',\n  'vanes',\n  'vangs',\n  'vants',\n  'vaped',\n  'vaper',\n  'vapes',\n  'varan',\n  'varas',\n  'vardy',\n  'varec',\n  'vares',\n  'varia',\n  'varix',\n  'varna',\n  'varus',\n  'varve',\n  'vasal',\n  'vases',\n  'vasts',\n  'vasty',\n  'vatic',\n  'vatus',\n  'vauch',\n  'vaute',\n  'vauts',\n  'vawte',\n  'vaxes',\n  'veale',\n  'veals',\n  'vealy',\n  'veena',\n  'veeps',\n  'veers',\n  'veery',\n  'vegas',\n  'veges',\n  'vegie',\n  'vegos',\n  'vehme',\n  'veils',\n  'veily',\n  'veins',\n  'veiny',\n  'velar',\n  'velds',\n  'veldt',\n  'veles',\n  'vells',\n  'velum',\n  'venae',\n  'venal',\n  'vends',\n  'vendu',\n  'veney',\n  'venge',\n  'venin',\n  'vents',\n  'venus',\n  'verbs',\n  'verra',\n  'verry',\n  'verst',\n  'verts',\n  'vertu',\n  'vespa',\n  'vesta',\n  'vests',\n  'vetch',\n  'vexed',\n  'vexer',\n  'vexes',\n  'vexil',\n  'vezir',\n  'vials',\n  'viand',\n  'vibes',\n  'vibex',\n  'vibey',\n  'viced',\n  'vices',\n  'vichy',\n  'viers',\n  'views',\n  'viewy',\n  'vifda',\n  'viffs',\n  'vigas',\n  'vigia',\n  'vilde',\n  'viler',\n  'villi',\n  'vills',\n  'vimen',\n  'vinal',\n  'vinas',\n  'vinca',\n  'vined',\n  'viner',\n  'vines',\n  'vinew',\n  'vinic',\n  'vinos',\n  'vints',\n  'viold',\n  'viols',\n  'vired',\n  'vireo',\n  'vires',\n  'virga',\n  'virge',\n  'virid',\n  'virls',\n  'virtu',\n  'visas',\n  'vised',\n  'vises',\n  'visie',\n  'visne',\n  'vison',\n  'visto',\n  'vitae',\n  'vitas',\n  'vitex',\n  'vitro',\n  'vitta',\n  'vivas',\n  'vivat',\n  'vivda',\n  'viver',\n  'vives',\n  'vizir',\n  'vizor',\n  'vleis',\n  'vlies',\n  'vlogs',\n  'voars',\n  'vocab',\n  'voces',\n  'voddy',\n  'vodou',\n  'vodun',\n  'voema',\n  'vogie',\n  'voids',\n  'voile',\n  'voips',\n  'volae',\n  'volar',\n  'voled',\n  'voles',\n  'volet',\n  'volks',\n  'volta',\n  'volte',\n  'volti',\n  'volts',\n  'volva',\n  'volve',\n  'vomer',\n  'voted',\n  'votes',\n  'vouge',\n  'voulu',\n  'vowed',\n  'vower',\n  'voxel',\n  'vozhd',\n  'vraic',\n  'vrils',\n  'vroom',\n  'vrous',\n  'vrouw',\n  'vrows',\n  'vuggs',\n  'vuggy',\n  'vughs',\n  'vughy',\n  'vulgo',\n  'vulns',\n  'vulva',\n  'vutty',\n  'waacs',\n  'wacke',\n  'wacko',\n  'wacks',\n  'wadds',\n  'waddy',\n  'waded',\n  'wader',\n  'wades',\n  'wadge',\n  'wadis',\n  'wadts',\n  'waffs',\n  'wafts',\n  'waged',\n  'wages',\n  'wagga',\n  'wagyu',\n  'wahoo',\n  'waide',\n  'waifs',\n  'waift',\n  'wails',\n  'wains',\n  'wairs',\n  'waite',\n  'waits',\n  'wakas',\n  'waked',\n  'waken',\n  'waker',\n  'wakes',\n  'wakfs',\n  'waldo',\n  'walds',\n  'waled',\n  'waler',\n  'wales',\n  'walie',\n  'walis',\n  'walks',\n  'walla',\n  'walls',\n  'wally',\n  'walty',\n  'wamed',\n  'wames',\n  'wamus',\n  'wands',\n  'waned',\n  'wanes',\n  'waney',\n  'wangs',\n  'wanks',\n  'wanky',\n  'wanle',\n  'wanly',\n  'wanna',\n  'wants',\n  'wanty',\n  'wanze',\n  'waqfs',\n  'warbs',\n  'warby',\n  'wards',\n  'wared',\n  'wares',\n  'warez',\n  'warks',\n  'warms',\n  'warns',\n  'warps',\n  'warre',\n  'warst',\n  'warts',\n  'wases',\n  'washy',\n  'wasms',\n  'wasps',\n  'waspy',\n  'wasts',\n  'watap',\n  'watts',\n  'wauff',\n  'waugh',\n  'wauks',\n  'waulk',\n  'wauls',\n  'waurs',\n  'waved',\n  'waves',\n  'wavey',\n  'wawas',\n  'wawes',\n  'wawls',\n  'waxed',\n  'waxer',\n  'waxes',\n  'wayed',\n  'wazir',\n  'wazoo',\n  'weald',\n  'weals',\n  'weamb',\n  'weans',\n  'wears',\n  'webby',\n  'weber',\n  'wecht',\n  'wedel',\n  'wedgy',\n  'weeds',\n  'weeke',\n  'weeks',\n  'weels',\n  'weems',\n  'weens',\n  'weeny',\n  'weeps',\n  'weepy',\n  'weest',\n  'weete',\n  'weets',\n  'wefte',\n  'wefts',\n  'weids',\n  'weils',\n  'weirs',\n  'weise',\n  'weize',\n  'wekas',\n  'welds',\n  'welke',\n  'welks',\n  'welkt',\n  'wells',\n  'welly',\n  'welts',\n  'wembs',\n  'wends',\n  'wenge',\n  'wenny',\n  'wents',\n  'weros',\n  'wersh',\n  'wests',\n  'wetas',\n  'wetly',\n  'wexed',\n  'wexes',\n  'whamo',\n  'whams',\n  'whang',\n  'whaps',\n  'whare',\n  'whata',\n  'whats',\n  'whaup',\n  'whaur',\n  'wheal',\n  'whear',\n  'wheen',\n  'wheep',\n  'wheft',\n  'whelk',\n  'whelm',\n  'whens',\n  'whets',\n  'whews',\n  'wheys',\n  'whids',\n  'whift',\n  'whigs',\n  'whilk',\n  'whims',\n  'whins',\n  'whios',\n  'whips',\n  'whipt',\n  'whirr',\n  'whirs',\n  'whish',\n  'whiss',\n  'whist',\n  'whits',\n  'whity',\n  'whizz',\n  'whomp',\n  'whoof',\n  'whoot',\n  'whops',\n  'whore',\n  'whorl',\n  'whort',\n  'whoso',\n  'whows',\n  'whump',\n  'whups',\n  'whyda',\n  'wicca',\n  'wicks',\n  'wicky',\n  'widdy',\n  'wides',\n  'wiels',\n  'wifed',\n  'wifes',\n  'wifey',\n  'wifie',\n  'wifty',\n  'wigan',\n  'wigga',\n  'wiggy',\n  'wikis',\n  'wilco',\n  'wilds',\n  'wiled',\n  'wiles',\n  'wilga',\n  'wilis',\n  'wilja',\n  'wills',\n  'wilts',\n  'wimps',\n  'winds',\n  'wined',\n  'wines',\n  'winey',\n  'winge',\n  'wings',\n  'wingy',\n  'winks',\n  'winna',\n  'winns',\n  'winos',\n  'winze',\n  'wiped',\n  'wiper',\n  'wipes',\n  'wired',\n  'wirer',\n  'wires',\n  'wirra',\n  'wised',\n  'wises',\n  'wisha',\n  'wisht',\n  'wisps',\n  'wists',\n  'witan',\n  'wited',\n  'wites',\n  'withe',\n  'withs',\n  'withy',\n  'wived',\n  'wiver',\n  'wives',\n  'wizen',\n  'wizes',\n  'woads',\n  'woald',\n  'wocks',\n  'wodge',\n  'woful',\n  'wojus',\n  'woker',\n  'wokka',\n  'wolds',\n  'wolfs',\n  'wolly',\n  'wolve',\n  'wombs',\n  'womby',\n  'womyn',\n  'wonga',\n  'wongi',\n  'wonks',\n  'wonky',\n  'wonts',\n  'woods',\n  'wooed',\n  'woofs',\n  'woofy',\n  'woold',\n  'wools',\n  'woons',\n  'woops',\n  'woopy',\n  'woose',\n  'woosh',\n  'wootz',\n  'words',\n  'works',\n  'worms',\n  'wormy',\n  'worts',\n  'wowed',\n  'wowee',\n  'woxen',\n  'wrang',\n  'wraps',\n  'wrapt',\n  'wrast',\n  'wrate',\n  'wrawl',\n  'wrens',\n  'wrick',\n  'wried',\n  'wrier',\n  'wries',\n  'writs',\n  'wroke',\n  'wroot',\n  'wroth',\n  'wryer',\n  'wuddy',\n  'wudus',\n  'wulls',\n  'wurst',\n  'wuses',\n  'wushu',\n  'wussy',\n  'wuxia',\n  'wyled',\n  'wyles',\n  'wynds',\n  'wynns',\n  'wyted',\n  'wytes',\n  'xebec',\n  'xenia',\n  'xenic',\n  'xenon',\n  'xeric',\n  'xerox',\n  'xerus',\n  'xoana',\n  'xrays',\n  'xylan',\n  'xylem',\n  'xylic',\n  'xylol',\n  'xylyl',\n  'xysti',\n  'xysts',\n  'yaars',\n  'yabas',\n  'yabba',\n  'yabby',\n  'yacca',\n  'yacka',\n  'yacks',\n  'yaffs',\n  'yager',\n  'yages',\n  'yagis',\n  'yahoo',\n  'yaird',\n  'yakka',\n  'yakow',\n  'yales',\n  'yamen',\n  'yampy',\n  'yamun',\n  'yangs',\n  'yanks',\n  'yapok',\n  'yapon',\n  'yapps',\n  'yappy',\n  'yarak',\n  'yarco',\n  'yards',\n  'yarer',\n  'yarfa',\n  'yarks',\n  'yarns',\n  'yarrs',\n  'yarta',\n  'yarto',\n  'yates',\n  'yauds',\n  'yauld',\n  'yaups',\n  'yawed',\n  'yawey',\n  'yawls',\n  'yawns',\n  'yawny',\n  'yawps',\n  'ybore',\n  'yclad',\n  'ycled',\n  'ycond',\n  'ydrad',\n  'ydred',\n  'yeads',\n  'yeahs',\n  'yealm',\n  'yeans',\n  'yeard',\n  'years',\n  'yecch',\n  'yechs',\n  'yechy',\n  'yedes',\n  'yeeds',\n  'yeesh',\n  'yeggs',\n  'yelks',\n  'yells',\n  'yelms',\n  'yelps',\n  'yelts',\n  'yenta',\n  'yente',\n  'yerba',\n  'yerds',\n  'yerks',\n  'yeses',\n  'yesks',\n  'yests',\n  'yesty',\n  'yetis',\n  'yetts',\n  'yeuks',\n  'yeuky',\n  'yeven',\n  'yeves',\n  'yewen',\n  'yexed',\n  'yexes',\n  'yfere',\n  'yiked',\n  'yikes',\n  'yills',\n  'yince',\n  'yipes',\n  'yippy',\n  'yirds',\n  'yirks',\n  'yirrs',\n  'yirth',\n  'yites',\n  'yitie',\n  'ylems',\n  'ylike',\n  'ylkes',\n  'ymolt',\n  'ympes',\n  'yobbo',\n  'yobby',\n  'yocks',\n  'yodel',\n  'yodhs',\n  'yodle',\n  'yogas',\n  'yogee',\n  'yoghs',\n  'yogic',\n  'yogin',\n  'yogis',\n  'yoick',\n  'yojan',\n  'yoked',\n  'yokel',\n  'yoker',\n  'yokes',\n  'yokul',\n  'yolks',\n  'yolky',\n  'yomim',\n  'yomps',\n  'yonic',\n  'yonis',\n  'yonks',\n  'yoofs',\n  'yoops',\n  'yores',\n  'yorks',\n  'yorps',\n  'youks',\n  'yourn',\n  'yours',\n  'yourt',\n  'youse',\n  'yowed',\n  'yowes',\n  'yowie',\n  'yowls',\n  'yowza',\n  'yrapt',\n  'yrent',\n  'yrivd',\n  'yrneh',\n  'ysame',\n  'ytost',\n  'yuans',\n  'yucas',\n  'yucca',\n  'yucch',\n  'yucko',\n  'yucks',\n  'yucky',\n  'yufts',\n  'yugas',\n  'yuked',\n  'yukes',\n  'yukky',\n  'yukos',\n  'yulan',\n  'yules',\n  'yummo',\n  'yummy',\n  'yumps',\n  'yupon',\n  'yuppy',\n  'yurta',\n  'yurts',\n  'yuzus',\n  'zabra',\n  'zacks',\n  'zaida',\n  'zaidy',\n  'zaire',\n  'zakat',\n  'zaman',\n  'zambo',\n  'zamia',\n  'zanja',\n  'zante',\n  'zanza',\n  'zanze',\n  'zappy',\n  'zarfs',\n  'zaris',\n  'zatis',\n  'zaxes',\n  'zayin',\n  'zazen',\n  'zeals',\n  'zebec',\n  'zebub',\n  'zebus',\n  'zedas',\n  'zeins',\n  'zendo',\n  'zerda',\n  'zerks',\n  'zeros',\n  'zests',\n  'zetas',\n  'zexes',\n  'zezes',\n  'zhomo',\n  'zibet',\n  'ziffs',\n  'zigan',\n  'zilas',\n  'zilch',\n  'zilla',\n  'zills',\n  'zimbi',\n  'zimbs',\n  'zinco',\n  'zincs',\n  'zincy',\n  'zineb',\n  'zines',\n  'zings',\n  'zingy',\n  'zinke',\n  'zinky',\n  'zippo',\n  'zippy',\n  'ziram',\n  'zitis',\n  'zizel',\n  'zizit',\n  'zlote',\n  'zloty',\n  'zoaea',\n  'zobos',\n  'zobus',\n  'zocco',\n  'zoeae',\n  'zoeal',\n  'zoeas',\n  'zoism',\n  'zoist',\n  'zombi',\n  'zonae',\n  'zonda',\n  'zoned',\n  'zoner',\n  'zones',\n  'zonks',\n  'zooea',\n  'zooey',\n  'zooid',\n  'zooks',\n  'zooms',\n  'zoons',\n  'zooty',\n  'zoppa',\n  'zoppo',\n  'zoril',\n  'zoris',\n  'zorro',\n  'zouks',\n  'zowee',\n  'zowie',\n  'zulus',\n  'zupan',\n  'zupas',\n  'zuppa',\n  'zurfs',\n  'zuzim',\n  'zygal',\n  'zygon',\n  'zymes',\n  'zymic',\n]);\n"
  },
  {
    "path": "examples/openapi-ts-tanstack-svelte-query/static/robots.txt",
    "content": "# https://www.robotstxt.org/robotstxt.html\nUser-agent: *\nDisallow:\n"
  },
  {
    "path": "examples/openapi-ts-tanstack-svelte-query/svelte.config.js",
    "content": "import adapter from '@sveltejs/adapter-auto';\nimport { vitePreprocess } from '@sveltejs/vite-plugin-svelte';\n\n/** @type {import('@sveltejs/kit').Config} */\nconst config = {\n  kit: {\n    // adapter-auto only supports some environments, see https://kit.svelte.dev/docs/adapter-auto for a list.\n    // If your environment is not supported, or you settled on a specific environment, switch out the adapter.\n    // See https://kit.svelte.dev/docs/adapters for more information about adapters.\n    adapter: adapter(),\n  },\n\n  // Consult https://kit.svelte.dev/docs/integrations#preprocessors\n  // for more information about preprocessors\n  preprocess: vitePreprocess(),\n};\n\nexport default config;\n"
  },
  {
    "path": "examples/openapi-ts-tanstack-svelte-query/tsconfig.json",
    "content": "{\n  \"extends\": \"./.svelte-kit/tsconfig.json\",\n  \"compilerOptions\": {\n    \"allowJs\": true,\n    \"checkJs\": true,\n    \"esModuleInterop\": true,\n    \"forceConsistentCasingInFileNames\": true,\n    \"moduleResolution\": \"bundler\",\n    \"resolveJsonModule\": true,\n    \"skipLibCheck\": true,\n    \"sourceMap\": true,\n    \"strict\": true,\n    \"types\": [\"vitest/globals\"]\n  }\n  // Path aliases are handled by https://kit.svelte.dev/docs/configuration#alias\n  // except $lib which is handled by https://kit.svelte.dev/docs/configuration#files\n  //\n  // If you want to overwrite includes/excludes, make sure to copy over the relevant includes/excludes\n  // from the referenced tsconfig.json - TypeScript does not merge them in\n}\n"
  },
  {
    "path": "examples/openapi-ts-tanstack-svelte-query/vite.config.ts",
    "content": "import { sveltekit } from '@sveltejs/kit/vite';\nimport { defineProject } from 'vitest/config';\n\nexport default async () => {\n  const sveltekitPlugins = await sveltekit();\n  return defineProject({\n    plugins: [sveltekitPlugins],\n    test: {\n      include: ['src/**/*.{test,spec}.{js,ts}'],\n    },\n  });\n};\n"
  },
  {
    "path": "examples/openapi-ts-tanstack-vue-query/.eslintrc.cjs",
    "content": "/* eslint-env node */\nrequire('@rushstack/eslint-patch/modern-module-resolution');\n\nmodule.exports = {\n  extends: ['plugin:vue/vue3-essential', 'eslint:recommended', '@vue/eslint-config-typescript'],\n  files: ['**/*.{vue,js,jsx,cjs,mjs,ts,tsx,cts,mts}'],\n  parserOptions: {\n    ecmaVersion: 'latest',\n  },\n};\n"
  },
  {
    "path": "examples/openapi-ts-tanstack-vue-query/.gitignore",
    "content": "# Logs\nlogs\n*.log\nnpm-debug.log*\nyarn-debug.log*\nyarn-error.log*\npnpm-debug.log*\nlerna-debug.log*\n\nnode_modules\n.DS_Store\ndist\ndist-ssr\ncoverage\n*.local\n\n/cypress/videos/\n/cypress/screenshots/\n\n# Editor directories and files\n.vscode/*\n!.vscode/extensions.json\n.idea\n*.suo\n*.ntvs*\n*.njsproj\n*.sln\n*.sw?\n\n*.tsbuildinfo\n"
  },
  {
    "path": "examples/openapi-ts-tanstack-vue-query/.vscode/extensions.json",
    "content": "{\n  \"recommendations\": [\"Vue.volar\", \"dbaeumer.vscode-eslint\", \"oxc.oxc-vscode\"]\n}\n"
  },
  {
    "path": "examples/openapi-ts-tanstack-vue-query/CHANGELOG.md",
    "content": "# @example/openapi-ts-tanstack-vue-query\n\n## 0.0.39\n\n### Patch Changes\n\n- Updated dependencies [[`f23f3ae`](https://github.com/hey-api/openapi-ts/commit/f23f3ae874385e758eb8d43bb4e274c9858a4e40)]:\n  - @hey-api/client-fetch@0.13.1\n\n## 0.0.38\n\n### Patch Changes\n\n- Updated dependencies [[`10d2e03`](https://github.com/hey-api/openapi-ts/commit/10d2e03b8295e4e887fab8d023aa823699efbae8)]:\n  - @hey-api/client-fetch@0.13.0\n\n## 0.0.37\n\n### Patch Changes\n\n- Updated dependencies [[`4d8c030`](https://github.com/hey-api/openapi-ts/commit/4d8c03038979c9a75315cc158789b3c198c62f90)]:\n  - @hey-api/client-fetch@0.12.0\n\n## 0.0.36\n\n### Patch Changes\n\n- Updated dependencies [[`8152aaf`](https://github.com/hey-api/openapi-ts/commit/8152aaf4892c48b79fd3dc486eb3c0ea333dc3e6)]:\n  - @hey-api/client-fetch@0.11.0\n\n## 0.0.35\n\n### Patch Changes\n\n- Updated dependencies [[`1f99066`](https://github.com/hey-api/openapi-ts/commit/1f99066efbb2d0e6b9e3710c701293c2cc09d65e)]:\n  - @hey-api/client-fetch@0.10.2\n\n## 0.0.34\n\n### Patch Changes\n\n- Updated dependencies [[`565e0b8`](https://github.com/hey-api/openapi-ts/commit/565e0b89fbab4556ecdc63dfe08250942681140e)]:\n  - @hey-api/client-fetch@0.10.1\n\n## 0.0.33\n\n### Patch Changes\n\n- Updated dependencies [[`fed9699`](https://github.com/hey-api/openapi-ts/commit/fed969985275621c7c2b65ffc760c7c66fafaf72)]:\n  - @hey-api/client-fetch@0.10.0\n\n## 0.0.32\n\n### Patch Changes\n\n- Updated dependencies [[`67c385b`](https://github.com/hey-api/openapi-ts/commit/67c385bf6289a79726b0cdd85fd81ca501cf2248)]:\n  - @hey-api/client-fetch@0.9.0\n\n## 0.0.31\n\n### Patch Changes\n\n- Updated dependencies [[`fe43b88`](https://github.com/hey-api/openapi-ts/commit/fe43b889c20a2001f56e259f93f64851a1caa1d1)]:\n  - @hey-api/client-fetch@0.8.4\n\n## 0.0.30\n\n### Patch Changes\n\n- Updated dependencies [[`c0b36b9`](https://github.com/hey-api/openapi-ts/commit/c0b36b95645d484034c3af145c5554867568979b)]:\n  - @hey-api/client-fetch@0.8.3\n\n## 0.0.29\n\n### Patch Changes\n\n- Updated dependencies [[`b8cc9f8`](https://github.com/hey-api/openapi-ts/commit/b8cc9f8a5eaf4f4ff345abc49c14c6b96744c2ea)]:\n  - @hey-api/client-fetch@0.8.2\n\n## 0.0.28\n\n### Patch Changes\n\n- Updated dependencies [[`7f0f4a7`](https://github.com/hey-api/openapi-ts/commit/7f0f4a76b06c8fafb33581b522faf8efc6fd85ac)]:\n  - @hey-api/client-fetch@0.8.1\n\n## 0.0.27\n\n### Patch Changes\n\n- Updated dependencies [[`bb6d46a`](https://github.com/hey-api/openapi-ts/commit/bb6d46ae119ce4e7e3a2ab3fded74ac4fb4cdff2)]:\n  - @hey-api/client-fetch@0.8.0\n\n## 0.0.26\n\n### Patch Changes\n\n- Updated dependencies [[`2dc380e`](https://github.com/hey-api/openapi-ts/commit/2dc380eabc17c723654beb04ecd7bce6d33d3b49), [`603541e`](https://github.com/hey-api/openapi-ts/commit/603541e307dc2953da7dddd300176865629b50bb), [`2cbffeb`](https://github.com/hey-api/openapi-ts/commit/2cbffeb2cdd6c6143cd68cac68369584879dda31), [`2cbffeb`](https://github.com/hey-api/openapi-ts/commit/2cbffeb2cdd6c6143cd68cac68369584879dda31)]:\n  - @hey-api/client-fetch@0.7.3\n\n## 0.0.25\n\n### Patch Changes\n\n- Updated dependencies [[`8eba19d`](https://github.com/hey-api/openapi-ts/commit/8eba19d4092fc0903572ab9fdadf0b4c26928ba2)]:\n  - @hey-api/client-fetch@0.7.2\n\n## 0.0.24\n\n### Patch Changes\n\n- Updated dependencies [[`0432418`](https://github.com/hey-api/openapi-ts/commit/0432418d72c94ef94865f8216ed2f723ad5191f9), [`4784727`](https://github.com/hey-api/openapi-ts/commit/47847276e8bc854045044dd414382080270dd779)]:\n  - @hey-api/client-fetch@0.7.1\n\n## 0.0.23\n\n### Patch Changes\n\n- Updated dependencies [[`465410c`](https://github.com/hey-api/openapi-ts/commit/465410c201eb19e737e3143ad53a146e95f80107)]:\n  - @hey-api/client-fetch@0.7.0\n\n## 0.0.22\n\n### Patch Changes\n\n- Updated dependencies [[`e2e1410`](https://github.com/hey-api/openapi-ts/commit/e2e1410b22c0c84c40d1b1803e9650d546350cb7)]:\n  - @hey-api/client-fetch@0.6.0\n\n## 0.0.21\n\n### Patch Changes\n\n- Updated dependencies [[`20d7497`](https://github.com/hey-api/openapi-ts/commit/20d7497acb6c046f6a4206c2d8137414e17b2263), [`f86d293`](https://github.com/hey-api/openapi-ts/commit/f86d293f18f133ef6dd2f4864d037611b81edd26)]:\n  - @hey-api/client-fetch@0.5.7\n\n## 0.0.20\n\n### Patch Changes\n\n- Updated dependencies [[`ba56424`](https://github.com/hey-api/openapi-ts/commit/ba5642486cdd5461c2372c34b63019c02bc6874e)]:\n  - @hey-api/client-fetch@0.5.6\n\n## 0.0.19\n\n### Patch Changes\n\n- Updated dependencies [[`9cec9e8`](https://github.com/hey-api/openapi-ts/commit/9cec9e8582c12a8c041b922d9587e16f6f19782a)]:\n  - @hey-api/client-fetch@0.5.5\n\n## 0.0.18\n\n### Patch Changes\n\n- Updated dependencies [[`cbf4e84`](https://github.com/hey-api/openapi-ts/commit/cbf4e84db7f3a47f19d8c3eaa87c71b27912c1a2)]:\n  - @hey-api/client-fetch@0.5.4\n\n## 0.0.17\n\n### Patch Changes\n\n- Updated dependencies [[`646064d`](https://github.com/hey-api/openapi-ts/commit/646064d1aecea988d2b4df73bd24b2ee83394ae0)]:\n  - @hey-api/client-fetch@0.5.3\n\n## 0.0.16\n\n### Patch Changes\n\n- Updated dependencies [[`ec48d32`](https://github.com/hey-api/openapi-ts/commit/ec48d323d80de8e6a47ce7ecd732288f0a47e17a)]:\n  - @hey-api/client-fetch@0.5.2\n\n## 0.0.15\n\n### Patch Changes\n\n- Updated dependencies [[`fa8b0f1`](https://github.com/hey-api/openapi-ts/commit/fa8b0f11ed99c63f694a494944ccc2fbfa9706cc)]:\n  - @hey-api/client-fetch@0.5.1\n\n## 0.0.14\n\n### Patch Changes\n\n- Updated dependencies [[`734a62d`](https://github.com/hey-api/openapi-ts/commit/734a62dd8d594b8266964fe16766a481d37eb7df), [`734a62d`](https://github.com/hey-api/openapi-ts/commit/734a62dd8d594b8266964fe16766a481d37eb7df)]:\n  - @hey-api/client-fetch@0.5.0\n\n## 0.0.13\n\n### Patch Changes\n\n- Updated dependencies [[`4c853d0`](https://github.com/hey-api/openapi-ts/commit/4c853d090b79245854d13831f64731db4a92978b)]:\n  - @hey-api/client-fetch@0.4.4\n\n## 0.0.12\n\n### Patch Changes\n\n- Updated dependencies [[`01dee3d`](https://github.com/hey-api/openapi-ts/commit/01dee3df879232939e43355231147b3d910fb482)]:\n  - @hey-api/client-fetch@0.4.3\n\n## 0.0.11\n\n### Patch Changes\n\n- [#1151](https://github.com/hey-api/openapi-ts/pull/1151) [`587791d`](https://github.com/hey-api/openapi-ts/commit/587791dfede0167fbed229281467e4c4875936f5) Thanks [@mrlubos](https://github.com/mrlubos)! - fix: update website domain, add license documentation\n\n- Updated dependencies [[`587791d`](https://github.com/hey-api/openapi-ts/commit/587791dfede0167fbed229281467e4c4875936f5)]:\n  - @hey-api/client-fetch@0.4.2\n\n## 0.0.10\n\n### Patch Changes\n\n- Updated dependencies [[`a0a5551`](https://github.com/hey-api/openapi-ts/commit/a0a55510d30a1a8dea0ade4908b5b13d51b5f9e6)]:\n  - @hey-api/client-fetch@0.4.1\n\n## 0.0.9\n\n### Patch Changes\n\n- Updated dependencies [[`df5c690`](https://github.com/hey-api/openapi-ts/commit/df5c69048a03a1c7729a5200c586164287a8a6fa), [`df5c690`](https://github.com/hey-api/openapi-ts/commit/df5c69048a03a1c7729a5200c586164287a8a6fa)]:\n  - @hey-api/client-fetch@0.4.0\n\n## 0.0.8\n\n### Patch Changes\n\n- Updated dependencies [[`7f986c2`](https://github.com/hey-api/openapi-ts/commit/7f986c2c7726ed8fbf16f8b235b7769c7d990502)]:\n  - @hey-api/client-fetch@0.3.4\n\n## 0.0.7\n\n### Patch Changes\n\n- Updated dependencies [[`fe743c2`](https://github.com/hey-api/openapi-ts/commit/fe743c2d41c23bf7e1706bceedd6319299131197)]:\n  - @hey-api/client-fetch@0.3.3\n\n## 0.0.6\n\n### Patch Changes\n\n- Updated dependencies [[`11a276a`](https://github.com/hey-api/openapi-ts/commit/11a276a1e35dde0735363e892d8142016fd87eec)]:\n  - @hey-api/client-fetch@0.3.2\n\n## 0.0.5\n\n### Patch Changes\n\n- Updated dependencies [[`7ae2b1d`](https://github.com/hey-api/openapi-ts/commit/7ae2b1db047f3b6efe917a8b43ac7c851fb86c8f), [`2079c6e`](https://github.com/hey-api/openapi-ts/commit/2079c6e83a6b71e157c8e7ea56260b4e9ff8411d)]:\n  - @hey-api/client-fetch@0.3.1\n\n## 0.0.4\n\n### Patch Changes\n\n- Updated dependencies [[`7ebc1d4`](https://github.com/hey-api/openapi-ts/commit/7ebc1d44af74db2522219d71d240325f6bc5689d)]:\n  - @hey-api/client-fetch@0.3.0\n\n## 0.0.3\n\n### Patch Changes\n\n- [#1010](https://github.com/hey-api/openapi-ts/pull/1010) [`b6e58c6`](https://github.com/hey-api/openapi-ts/commit/b6e58c64d1b71897533a85d1738cd7ce7ede178d) Thanks [@mrlubos](https://github.com/mrlubos)! - fix: set query key base url from supplied client if provided\n\n## 0.0.2\n\n### Patch Changes\n\n- [#978](https://github.com/hey-api/openapi-ts/pull/978) [`2e051a5`](https://github.com/hey-api/openapi-ts/commit/2e051a596302c2e103dca25951a07b4aae1e9e23) Thanks [@mrlubos](https://github.com/mrlubos)! - docs: add basic TanStack Query plugin description\n\n## 0.0.1\n\n### Patch Changes\n\n- [#901](https://github.com/hey-api/openapi-ts/pull/901) [`8ac24a6`](https://github.com/hey-api/openapi-ts/commit/8ac24a63eca2b890899ba9f6fa908b6ed0ae80d3) Thanks [@mrlubos](https://github.com/mrlubos)! - docs: add TanStack Vue Query example\n\n- Updated dependencies [[`a8c84c0`](https://github.com/hey-api/openapi-ts/commit/a8c84c02dbb5ef1a59f5d414dff425e135c7a446), [`7825a2f`](https://github.com/hey-api/openapi-ts/commit/7825a2fba566a76c63775172ef0569ef375406b6)]:\n  - @hey-api/client-fetch@0.2.4\n"
  },
  {
    "path": "examples/openapi-ts-tanstack-vue-query/README.md",
    "content": "# vue-project\n\nThis template should help get you started developing with Vue 3 in Vite.\n\n## Recommended IDE Setup\n\n[VSCode](https://code.visualstudio.com) + [Volar](https://marketplace.visualstudio.com/items?itemName=Vue.volar) (and disable Vetur).\n\n## Type Support for `.vue` Imports in TS\n\nTypeScript cannot handle type information for `.vue` imports by default, so we replace the `tsc` CLI with `vue-tsc` for type checking. In editors, we need [Volar](https://marketplace.visualstudio.com/items?itemName=Vue.volar) to make the TypeScript language service aware of `.vue` types.\n\n## Customize configuration\n\nSee [Vite Configuration Reference](https://vitejs.dev/config).\n\n## Project Setup\n\n```sh\npnpm install\n```\n\n### Compile and Hot-Reload for Development\n\n```sh\npnpm dev\n```\n\n### Type-Check, Compile and Minify for Production\n\n```sh\npnpm build\n```\n\n### Run Unit Tests with [Vitest](https://vitest.dev)\n\n```sh\npnpm test:unit\n```\n\n### Lint with [ESLint](https://eslint.org)\n\n```sh\npnpm lint\n```\n"
  },
  {
    "path": "examples/openapi-ts-tanstack-vue-query/env.d.ts",
    "content": "/// <reference types=\"vite/client\" />\n"
  },
  {
    "path": "examples/openapi-ts-tanstack-vue-query/index.html",
    "content": "<!doctype html>\n<html lang=\"en\">\n  <head>\n    <meta charset=\"UTF-8\" />\n    <link rel=\"icon\" href=\"/favicon.ico\" />\n    <meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\" />\n    <title>Hey API + TanStack Vue Query Demo</title>\n  </head>\n  <body>\n    <div id=\"app\"></div>\n    <script type=\"module\" src=\"/src/main.ts\"></script>\n  </body>\n</html>\n"
  },
  {
    "path": "examples/openapi-ts-tanstack-vue-query/openapi-ts.config.ts",
    "content": "import { defineConfig } from '@hey-api/openapi-ts';\n\nexport default defineConfig({\n  input:\n    'https://raw.githubusercontent.com/swagger-api/swagger-petstore/master/src/main/resources/openapi.yaml',\n  logs: {\n    path: './logs',\n  },\n  output: {\n    path: './src/client',\n    postProcess: ['oxfmt', 'eslint'],\n  },\n  plugins: [\n    '@hey-api/client-fetch',\n    '@hey-api/schemas',\n    '@hey-api/sdk',\n    {\n      enums: 'javascript',\n      name: '@hey-api/typescript',\n    },\n    '@tanstack/vue-query',\n  ],\n});\n"
  },
  {
    "path": "examples/openapi-ts-tanstack-vue-query/package.json",
    "content": "{\n  \"name\": \"@example/openapi-ts-tanstack-vue-query\",\n  \"version\": \"0.0.39\",\n  \"private\": true,\n  \"type\": \"module\",\n  \"scripts\": {\n    \"build-only\": \"vite build\",\n    \"build\": \"run-p typecheck \\\"build-only {@}\\\" --\",\n    \"dev\": \"vite\",\n    \"format\": \"oxfmt src/\",\n    \"lint\": \"eslint . --fix\",\n    \"openapi-ts\": \"openapi-ts\",\n    \"preview\": \"vite preview\",\n    \"test:unit\": \"vitest\",\n    \"typecheck\": \"vue-tsc --build --force\"\n  },\n  \"dependencies\": {\n    \"@tanstack/vue-query\": \"5.73.3\",\n    \"@tanstack/vue-query-devtools\": \"5.73.3\",\n    \"pinia\": \"3.0.3\",\n    \"vue\": \"3.5.13\",\n    \"vue-router\": \"4.5.0\"\n  },\n  \"devDependencies\": {\n    \"@hey-api/openapi-ts\": \"workspace:*\",\n    \"@rushstack/eslint-patch\": \"1.10.5\",\n    \"@tsconfig/node24\": \"24.0.4\",\n    \"@types/jsdom\": \"27.0.0\",\n    \"@types/node\": \"24.10.10\",\n    \"@vitejs/plugin-vue\": \"6.0.4\",\n    \"@vitejs/plugin-vue-jsx\": \"5.1.4\",\n    \"@vue/eslint-config-typescript\": \"14.6.0\",\n    \"@vue/test-utils\": \"2.4.6\",\n    \"@vue/tsconfig\": \"0.8.1\",\n    \"autoprefixer\": \"10.4.20\",\n    \"eslint\": \"9.17.0\",\n    \"eslint-plugin-vue\": \"9.32.0\",\n    \"jsdom\": \"28.0.0\",\n    \"npm-run-all2\": \"6.2.0\",\n    \"oxfmt\": \"0.27.0\",\n    \"postcss\": \"8.4.41\",\n    \"tailwindcss\": \"3.4.9\",\n    \"typescript\": \"5.9.3\",\n    \"vite\": \"7.3.1\",\n    \"vite-plugin-vue-devtools\": \"8.0.2\",\n    \"vitest\": \"4.0.18\",\n    \"vue-tsc\": \"3.2.4\"\n  }\n}\n"
  },
  {
    "path": "examples/openapi-ts-tanstack-vue-query/postcss.config.js",
    "content": "export default {\n  plugins: {\n    autoprefixer: {},\n    tailwindcss: {},\n  },\n};\n"
  },
  {
    "path": "examples/openapi-ts-tanstack-vue-query/src/App.vue",
    "content": "<script setup lang=\"ts\">\nimport { VueQueryDevtools } from '@tanstack/vue-query-devtools';\nimport { RouterView } from 'vue-router';\n</script>\n\n<template>\n  <div>\n    <RouterView />\n    <VueQueryDevtools />\n  </div>\n</template>\n"
  },
  {
    "path": "examples/openapi-ts-tanstack-vue-query/src/assets/main.css",
    "content": "@tailwind base;\n@tailwind components;\n@tailwind utilities;\n\nbody {\n  @apply bg-[#111113];\n}\n"
  },
  {
    "path": "examples/openapi-ts-tanstack-vue-query/src/client/@tanstack/vue-query.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport { type DefaultError, queryOptions, type UseMutationOptions } from '@tanstack/vue-query';\n\nimport { client } from '../client.gen';\nimport {\n  addPet,\n  createUser,\n  createUsersWithListInput,\n  deleteOrder,\n  deletePet,\n  deleteUser,\n  findPetsByStatus,\n  findPetsByTags,\n  getInventory,\n  getOrderById,\n  getPetById,\n  getUserByName,\n  loginUser,\n  logoutUser,\n  type Options,\n  placeOrder,\n  updatePet,\n  updatePetWithForm,\n  updateUser,\n  uploadFile,\n} from '../sdk.gen';\nimport type {\n  AddPetData,\n  AddPetResponse,\n  CreateUserData,\n  CreateUserResponse,\n  CreateUsersWithListInputData,\n  CreateUsersWithListInputResponse,\n  DeleteOrderData,\n  DeletePetData,\n  DeleteUserData,\n  FindPetsByStatusData,\n  FindPetsByStatusResponse,\n  FindPetsByTagsData,\n  FindPetsByTagsResponse,\n  GetInventoryData,\n  GetInventoryResponse,\n  GetOrderByIdData,\n  GetOrderByIdResponse,\n  GetPetByIdData,\n  GetPetByIdResponse,\n  GetUserByNameData,\n  GetUserByNameResponse,\n  LoginUserData,\n  LoginUserResponse,\n  LogoutUserData,\n  PlaceOrderData,\n  PlaceOrderResponse,\n  UpdatePetData,\n  UpdatePetResponse,\n  UpdatePetWithFormData,\n  UpdatePetWithFormResponse,\n  UpdateUserData,\n  UploadFileData,\n  UploadFileResponse,\n} from '../types.gen';\n\n/**\n * Add a new pet to the store.\n *\n * Add a new pet to the store.\n */\nexport const addPetMutation = (\n  options?: Partial<Options<AddPetData>>,\n): UseMutationOptions<AddPetResponse, DefaultError, Options<AddPetData>> => {\n  const mutationOptions: UseMutationOptions<AddPetResponse, DefaultError, Options<AddPetData>> = {\n    mutationFn: async (fnOptions) => {\n      const { data } = await addPet({\n        ...options,\n        ...fnOptions,\n        throwOnError: true,\n      });\n      return data;\n    },\n  };\n  return mutationOptions;\n};\n\n/**\n * Update an existing pet.\n *\n * Update an existing pet by Id.\n */\nexport const updatePetMutation = (\n  options?: Partial<Options<UpdatePetData>>,\n): UseMutationOptions<UpdatePetResponse, DefaultError, Options<UpdatePetData>> => {\n  const mutationOptions: UseMutationOptions<\n    UpdatePetResponse,\n    DefaultError,\n    Options<UpdatePetData>\n  > = {\n    mutationFn: async (fnOptions) => {\n      const { data } = await updatePet({\n        ...options,\n        ...fnOptions,\n        throwOnError: true,\n      });\n      return data;\n    },\n  };\n  return mutationOptions;\n};\n\nexport type QueryKey<TOptions extends Options> = [\n  Pick<TOptions, 'baseUrl' | 'body' | 'headers' | 'path' | 'query'> & {\n    _id: string;\n    _infinite?: boolean;\n    tags?: ReadonlyArray<string>;\n  },\n];\n\nconst createQueryKey = <TOptions extends Options>(\n  id: string,\n  options?: TOptions,\n  infinite?: boolean,\n  tags?: ReadonlyArray<string>,\n): [QueryKey<TOptions>[0]] => {\n  const params: QueryKey<TOptions>[0] = {\n    _id: id,\n    baseUrl: options?.baseUrl || (options?.client ?? client).getConfig().baseUrl,\n  } as QueryKey<TOptions>[0];\n  if (infinite) {\n    params._infinite = infinite;\n  }\n  if (tags) {\n    params.tags = tags;\n  }\n  if (options?.body) {\n    params.body = options.body;\n  }\n  if (options?.headers) {\n    params.headers = options.headers;\n  }\n  if (options?.path) {\n    params.path = options.path;\n  }\n  if (options?.query) {\n    params.query = options.query;\n  }\n  return [params];\n};\n\nexport const findPetsByStatusQueryKey = (options: Options<FindPetsByStatusData>) =>\n  createQueryKey('findPetsByStatus', options);\n\n/**\n * Finds Pets by status.\n *\n * Multiple status values can be provided with comma separated strings.\n */\nexport const findPetsByStatusOptions = (options: Options<FindPetsByStatusData>) =>\n  queryOptions<\n    FindPetsByStatusResponse,\n    DefaultError,\n    FindPetsByStatusResponse,\n    ReturnType<typeof findPetsByStatusQueryKey>\n  >({\n    queryFn: async ({ queryKey, signal }) => {\n      const { data } = await findPetsByStatus({\n        ...options,\n        ...queryKey[0],\n        signal,\n        throwOnError: true,\n      });\n      return data;\n    },\n    queryKey: findPetsByStatusQueryKey(options),\n  });\n\nexport const findPetsByTagsQueryKey = (options: Options<FindPetsByTagsData>) =>\n  createQueryKey('findPetsByTags', options);\n\n/**\n * Finds Pets by tags.\n *\n * Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.\n */\nexport const findPetsByTagsOptions = (options: Options<FindPetsByTagsData>) =>\n  queryOptions<\n    FindPetsByTagsResponse,\n    DefaultError,\n    FindPetsByTagsResponse,\n    ReturnType<typeof findPetsByTagsQueryKey>\n  >({\n    queryFn: async ({ queryKey, signal }) => {\n      const { data } = await findPetsByTags({\n        ...options,\n        ...queryKey[0],\n        signal,\n        throwOnError: true,\n      });\n      return data;\n    },\n    queryKey: findPetsByTagsQueryKey(options),\n  });\n\n/**\n * Deletes a pet.\n *\n * Delete a pet.\n */\nexport const deletePetMutation = (\n  options?: Partial<Options<DeletePetData>>,\n): UseMutationOptions<unknown, DefaultError, Options<DeletePetData>> => {\n  const mutationOptions: UseMutationOptions<unknown, DefaultError, Options<DeletePetData>> = {\n    mutationFn: async (fnOptions) => {\n      const { data } = await deletePet({\n        ...options,\n        ...fnOptions,\n        throwOnError: true,\n      });\n      return data;\n    },\n  };\n  return mutationOptions;\n};\n\nexport const getPetByIdQueryKey = (options: Options<GetPetByIdData>) =>\n  createQueryKey('getPetById', options);\n\n/**\n * Find pet by ID.\n *\n * Returns a single pet.\n */\nexport const getPetByIdOptions = (options: Options<GetPetByIdData>) =>\n  queryOptions<\n    GetPetByIdResponse,\n    DefaultError,\n    GetPetByIdResponse,\n    ReturnType<typeof getPetByIdQueryKey>\n  >({\n    queryFn: async ({ queryKey, signal }) => {\n      const { data } = await getPetById({\n        ...options,\n        ...queryKey[0],\n        signal,\n        throwOnError: true,\n      });\n      return data;\n    },\n    queryKey: getPetByIdQueryKey(options),\n  });\n\n/**\n * Updates a pet in the store with form data.\n *\n * Updates a pet resource based on the form data.\n */\nexport const updatePetWithFormMutation = (\n  options?: Partial<Options<UpdatePetWithFormData>>,\n): UseMutationOptions<UpdatePetWithFormResponse, DefaultError, Options<UpdatePetWithFormData>> => {\n  const mutationOptions: UseMutationOptions<\n    UpdatePetWithFormResponse,\n    DefaultError,\n    Options<UpdatePetWithFormData>\n  > = {\n    mutationFn: async (fnOptions) => {\n      const { data } = await updatePetWithForm({\n        ...options,\n        ...fnOptions,\n        throwOnError: true,\n      });\n      return data;\n    },\n  };\n  return mutationOptions;\n};\n\n/**\n * Uploads an image.\n *\n * Upload image of the pet.\n */\nexport const uploadFileMutation = (\n  options?: Partial<Options<UploadFileData>>,\n): UseMutationOptions<UploadFileResponse, DefaultError, Options<UploadFileData>> => {\n  const mutationOptions: UseMutationOptions<\n    UploadFileResponse,\n    DefaultError,\n    Options<UploadFileData>\n  > = {\n    mutationFn: async (fnOptions) => {\n      const { data } = await uploadFile({\n        ...options,\n        ...fnOptions,\n        throwOnError: true,\n      });\n      return data;\n    },\n  };\n  return mutationOptions;\n};\n\nexport const getInventoryQueryKey = (options?: Options<GetInventoryData>) =>\n  createQueryKey('getInventory', options);\n\n/**\n * Returns pet inventories by status.\n *\n * Returns a map of status codes to quantities.\n */\nexport const getInventoryOptions = (options?: Options<GetInventoryData>) =>\n  queryOptions<\n    GetInventoryResponse,\n    DefaultError,\n    GetInventoryResponse,\n    ReturnType<typeof getInventoryQueryKey>\n  >({\n    queryFn: async ({ queryKey, signal }) => {\n      const { data } = await getInventory({\n        ...options,\n        ...queryKey[0],\n        signal,\n        throwOnError: true,\n      });\n      return data;\n    },\n    queryKey: getInventoryQueryKey(options),\n  });\n\n/**\n * Place an order for a pet.\n *\n * Place a new order in the store.\n */\nexport const placeOrderMutation = (\n  options?: Partial<Options<PlaceOrderData>>,\n): UseMutationOptions<PlaceOrderResponse, DefaultError, Options<PlaceOrderData>> => {\n  const mutationOptions: UseMutationOptions<\n    PlaceOrderResponse,\n    DefaultError,\n    Options<PlaceOrderData>\n  > = {\n    mutationFn: async (fnOptions) => {\n      const { data } = await placeOrder({\n        ...options,\n        ...fnOptions,\n        throwOnError: true,\n      });\n      return data;\n    },\n  };\n  return mutationOptions;\n};\n\n/**\n * Delete purchase order by identifier.\n *\n * For valid response try integer IDs with value < 1000. Anything above 1000 or non-integers will generate API errors.\n */\nexport const deleteOrderMutation = (\n  options?: Partial<Options<DeleteOrderData>>,\n): UseMutationOptions<unknown, DefaultError, Options<DeleteOrderData>> => {\n  const mutationOptions: UseMutationOptions<unknown, DefaultError, Options<DeleteOrderData>> = {\n    mutationFn: async (fnOptions) => {\n      const { data } = await deleteOrder({\n        ...options,\n        ...fnOptions,\n        throwOnError: true,\n      });\n      return data;\n    },\n  };\n  return mutationOptions;\n};\n\nexport const getOrderByIdQueryKey = (options: Options<GetOrderByIdData>) =>\n  createQueryKey('getOrderById', options);\n\n/**\n * Find purchase order by ID.\n *\n * For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions.\n */\nexport const getOrderByIdOptions = (options: Options<GetOrderByIdData>) =>\n  queryOptions<\n    GetOrderByIdResponse,\n    DefaultError,\n    GetOrderByIdResponse,\n    ReturnType<typeof getOrderByIdQueryKey>\n  >({\n    queryFn: async ({ queryKey, signal }) => {\n      const { data } = await getOrderById({\n        ...options,\n        ...queryKey[0],\n        signal,\n        throwOnError: true,\n      });\n      return data;\n    },\n    queryKey: getOrderByIdQueryKey(options),\n  });\n\n/**\n * Create user.\n *\n * This can only be done by the logged in user.\n */\nexport const createUserMutation = (\n  options?: Partial<Options<CreateUserData>>,\n): UseMutationOptions<CreateUserResponse, DefaultError, Options<CreateUserData>> => {\n  const mutationOptions: UseMutationOptions<\n    CreateUserResponse,\n    DefaultError,\n    Options<CreateUserData>\n  > = {\n    mutationFn: async (fnOptions) => {\n      const { data } = await createUser({\n        ...options,\n        ...fnOptions,\n        throwOnError: true,\n      });\n      return data;\n    },\n  };\n  return mutationOptions;\n};\n\n/**\n * Creates list of users with given input array.\n *\n * Creates list of users with given input array.\n */\nexport const createUsersWithListInputMutation = (\n  options?: Partial<Options<CreateUsersWithListInputData>>,\n): UseMutationOptions<\n  CreateUsersWithListInputResponse,\n  DefaultError,\n  Options<CreateUsersWithListInputData>\n> => {\n  const mutationOptions: UseMutationOptions<\n    CreateUsersWithListInputResponse,\n    DefaultError,\n    Options<CreateUsersWithListInputData>\n  > = {\n    mutationFn: async (fnOptions) => {\n      const { data } = await createUsersWithListInput({\n        ...options,\n        ...fnOptions,\n        throwOnError: true,\n      });\n      return data;\n    },\n  };\n  return mutationOptions;\n};\n\nexport const loginUserQueryKey = (options?: Options<LoginUserData>) =>\n  createQueryKey('loginUser', options);\n\n/**\n * Logs user into the system.\n *\n * Log into the system.\n */\nexport const loginUserOptions = (options?: Options<LoginUserData>) =>\n  queryOptions<\n    LoginUserResponse,\n    DefaultError,\n    LoginUserResponse,\n    ReturnType<typeof loginUserQueryKey>\n  >({\n    queryFn: async ({ queryKey, signal }) => {\n      const { data } = await loginUser({\n        ...options,\n        ...queryKey[0],\n        signal,\n        throwOnError: true,\n      });\n      return data;\n    },\n    queryKey: loginUserQueryKey(options),\n  });\n\nexport const logoutUserQueryKey = (options?: Options<LogoutUserData>) =>\n  createQueryKey('logoutUser', options);\n\n/**\n * Logs out current logged in user session.\n *\n * Log user out of the system.\n */\nexport const logoutUserOptions = (options?: Options<LogoutUserData>) =>\n  queryOptions<unknown, DefaultError, unknown, ReturnType<typeof logoutUserQueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n      const { data } = await logoutUser({\n        ...options,\n        ...queryKey[0],\n        signal,\n        throwOnError: true,\n      });\n      return data;\n    },\n    queryKey: logoutUserQueryKey(options),\n  });\n\n/**\n * Delete user resource.\n *\n * This can only be done by the logged in user.\n */\nexport const deleteUserMutation = (\n  options?: Partial<Options<DeleteUserData>>,\n): UseMutationOptions<unknown, DefaultError, Options<DeleteUserData>> => {\n  const mutationOptions: UseMutationOptions<unknown, DefaultError, Options<DeleteUserData>> = {\n    mutationFn: async (fnOptions) => {\n      const { data } = await deleteUser({\n        ...options,\n        ...fnOptions,\n        throwOnError: true,\n      });\n      return data;\n    },\n  };\n  return mutationOptions;\n};\n\nexport const getUserByNameQueryKey = (options: Options<GetUserByNameData>) =>\n  createQueryKey('getUserByName', options);\n\n/**\n * Get user by user name.\n *\n * Get user detail based on username.\n */\nexport const getUserByNameOptions = (options: Options<GetUserByNameData>) =>\n  queryOptions<\n    GetUserByNameResponse,\n    DefaultError,\n    GetUserByNameResponse,\n    ReturnType<typeof getUserByNameQueryKey>\n  >({\n    queryFn: async ({ queryKey, signal }) => {\n      const { data } = await getUserByName({\n        ...options,\n        ...queryKey[0],\n        signal,\n        throwOnError: true,\n      });\n      return data;\n    },\n    queryKey: getUserByNameQueryKey(options),\n  });\n\n/**\n * Update user resource.\n *\n * This can only be done by the logged in user.\n */\nexport const updateUserMutation = (\n  options?: Partial<Options<UpdateUserData>>,\n): UseMutationOptions<unknown, DefaultError, Options<UpdateUserData>> => {\n  const mutationOptions: UseMutationOptions<unknown, DefaultError, Options<UpdateUserData>> = {\n    mutationFn: async (fnOptions) => {\n      const { data } = await updateUser({\n        ...options,\n        ...fnOptions,\n        throwOnError: true,\n      });\n      return data;\n    },\n  };\n  return mutationOptions;\n};\n"
  },
  {
    "path": "examples/openapi-ts-tanstack-vue-query/src/client/client/client.gen.ts",
    "content": "// 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 (options: RequestOptions) => {\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 url = buildUrl(opts);\n\n    return { opts, url };\n  };\n\n  const request: Client['request'] = async (options) => {\n    // @ts-expect-error\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"
  },
  {
    "path": "examples/openapi-ts-tanstack-vue-query/src/client/client/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type { Auth } from '../core/auth.gen';\nexport type { QuerySerializerOptions } from '../core/bodySerializer.gen';\nexport {\n  formDataBodySerializer,\n  jsonBodySerializer,\n  urlSearchParamsBodySerializer,\n} from '../core/bodySerializer.gen';\nexport { buildClientParams } from '../core/params.gen';\nexport { serializeQueryKeyValue } from '../core/queryKeySerializer.gen';\nexport { createClient } from './client.gen';\nexport type {\n  Client,\n  ClientOptions,\n  Config,\n  CreateClientConfig,\n  Options,\n  RequestOptions,\n  RequestResult,\n  ResolvedRequestOptions,\n  ResponseStyle,\n  TDataShape,\n} from './types.gen';\nexport { createConfig, mergeHeaders } from './utils.gen';\n"
  },
  {
    "path": "examples/openapi-ts-tanstack-vue-query/src/client/client/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { Auth } from '../core/auth.gen';\nimport type { ServerSentEventsOptions, ServerSentEventsResult } from '../core/serverSentEvents.gen';\nimport type { Client as CoreClient, Config as CoreConfig } from '../core/types.gen';\nimport type { Middleware } from './utils.gen';\n\nexport type ResponseStyle = 'data' | 'fields';\n\nexport interface Config<T extends ClientOptions = ClientOptions>\n  extends Omit<RequestInit, 'body' | 'headers' | 'method'>, CoreConfig {\n  /**\n   * Base URL for all requests made by this client.\n   */\n  baseUrl?: T['baseUrl'];\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   * Please don't use the Fetch client for Next.js applications. The `next`\n   * options won't have any effect.\n   *\n   * Install {@link https://www.npmjs.com/package/@hey-api/client-next `@hey-api/client-next`} instead.\n   */\n  next?: never;\n  /**\n   * Return the response data parsed in a specified format. By default, `auto`\n   * will infer the appropriate method from the `Content-Type` response header.\n   * You can override this behavior with any of the {@link Body} methods.\n   * Select `stream` if you don't want to parse response data at all.\n   *\n   * @default 'auto'\n   */\n  parseAs?: 'arrayBuffer' | 'auto' | 'blob' | 'formData' | 'json' | 'stream' | 'text';\n  /**\n   * Should we return only data or multiple fields (data, error, response, etc.)?\n   *\n   * @default 'fields'\n   */\n  responseStyle?: ResponseStyle;\n  /**\n   * Throw an error instead of returning it in the response?\n   *\n   * @default false\n   */\n  throwOnError?: T['throwOnError'];\n}\n\nexport interface RequestOptions<\n  TData = unknown,\n  TResponseStyle extends ResponseStyle = 'fields',\n  ThrowOnError extends boolean = boolean,\n  Url extends string = string,\n>\n  extends\n    Config<{\n      responseStyle: TResponseStyle;\n      throwOnError: ThrowOnError;\n    }>,\n    Pick<\n      ServerSentEventsOptions<TData>,\n      | 'onRequest'\n      | 'onSseError'\n      | 'onSseEvent'\n      | 'sseDefaultRetryDelay'\n      | 'sseMaxRetryAttempts'\n      | 'sseMaxRetryDelay'\n    > {\n  /**\n   * Any body that you want to add to your request.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/fetch#body}\n   */\n  body?: unknown;\n  path?: Record<string, unknown>;\n  query?: Record<string, unknown>;\n  /**\n   * Security mechanism(s) to use for the request.\n   */\n  security?: ReadonlyArray<Auth>;\n  url: Url;\n}\n\nexport interface ResolvedRequestOptions<\n  TResponseStyle extends ResponseStyle = 'fields',\n  ThrowOnError extends boolean = boolean,\n  Url extends string = string,\n> extends RequestOptions<unknown, TResponseStyle, ThrowOnError, Url> {\n  serializedBody?: string;\n}\n\nexport type RequestResult<\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = boolean,\n  TResponseStyle extends ResponseStyle = 'fields',\n> = ThrowOnError extends true\n  ? Promise<\n      TResponseStyle extends 'data'\n        ? TData extends Record<string, unknown>\n          ? TData[keyof TData]\n          : TData\n        : {\n            data: TData extends Record<string, unknown> ? TData[keyof TData] : TData;\n            request: Request;\n            response: Response;\n          }\n    >\n  : Promise<\n      TResponseStyle extends 'data'\n        ? (TData extends Record<string, unknown> ? TData[keyof TData] : TData) | undefined\n        : (\n            | {\n                data: TData extends Record<string, unknown> ? TData[keyof TData] : TData;\n                error: undefined;\n              }\n            | {\n                data: undefined;\n                error: TError extends Record<string, unknown> ? TError[keyof TError] : TError;\n              }\n          ) & {\n            request: Request;\n            response: Response;\n          }\n    >;\n\nexport interface ClientOptions {\n  baseUrl?: string;\n  responseStyle?: ResponseStyle;\n  throwOnError?: boolean;\n}\n\ntype MethodFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'>,\n) => RequestResult<TData, TError, ThrowOnError, TResponseStyle>;\n\ntype SseFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'>,\n) => Promise<ServerSentEventsResult<TData, TError>>;\n\ntype RequestFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'> &\n    Pick<Required<RequestOptions<TData, TResponseStyle, ThrowOnError>>, 'method'>,\n) => RequestResult<TData, TError, ThrowOnError, TResponseStyle>;\n\ntype BuildUrlFn = <\n  TData extends {\n    body?: unknown;\n    path?: Record<string, unknown>;\n    query?: Record<string, unknown>;\n    url: string;\n  },\n>(\n  options: TData & Options<TData>,\n) => string;\n\nexport type Client = CoreClient<RequestFn, Config, MethodFn, BuildUrlFn, SseFn> & {\n  interceptors: Middleware<Request, Response, unknown, ResolvedRequestOptions>;\n};\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 = ClientOptions> = (\n  override?: Config<ClientOptions & T>,\n) => Config<Required<ClientOptions> & T>;\n\nexport interface TDataShape {\n  body?: unknown;\n  headers?: unknown;\n  path?: unknown;\n  query?: unknown;\n  url: string;\n}\n\ntype OmitKeys<T, K> = Pick<T, Exclude<keyof T, K>>;\n\nexport type Options<\n  TData extends TDataShape = TDataShape,\n  ThrowOnError extends boolean = boolean,\n  TResponse = unknown,\n  TResponseStyle extends ResponseStyle = 'fields',\n> = OmitKeys<\n  RequestOptions<TResponse, TResponseStyle, ThrowOnError>,\n  'body' | 'path' | 'query' | 'url'\n> &\n  ([TData] extends [never] ? unknown : Omit<TData, 'url'>);\n"
  },
  {
    "path": "examples/openapi-ts-tanstack-vue-query/src/client/client/utils.gen.ts",
    "content": "// 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"
  },
  {
    "path": "examples/openapi-ts-tanstack-vue-query/src/client/client.gen.ts",
    "content": "// 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> = (\n  override?: Config<ClientOptions & T>,\n) => Config<Required<ClientOptions> & T>;\n\nexport const client = createClient(\n  createConfig<ClientOptions2>({ baseUrl: 'https://petstore3.swagger.io/api/v3' }),\n);\n"
  },
  {
    "path": "examples/openapi-ts-tanstack-vue-query/src/client/core/auth.gen.ts",
    "content": "// 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"
  },
  {
    "path": "examples/openapi-ts-tanstack-vue-query/src/client/core/bodySerializer.gen.ts",
    "content": "// 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"
  },
  {
    "path": "examples/openapi-ts-tanstack-vue-query/src/client/core/params.gen.ts",
    "content": "// 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"
  },
  {
    "path": "examples/openapi-ts-tanstack-vue-query/src/client/core/pathSerializer.gen.ts",
    "content": "// 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"
  },
  {
    "path": "examples/openapi-ts-tanstack-vue-query/src/client/core/queryKeySerializer.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\n/**\n * JSON-friendly union that mirrors what Pinia Colada can hash.\n */\nexport type JsonValue =\n  | null\n  | string\n  | number\n  | boolean\n  | JsonValue[]\n  | { [key: string]: JsonValue };\n\n/**\n * Replacer that converts non-JSON values (bigint, Date, etc.) to safe substitutes.\n */\nexport const queryKeyJsonReplacer = (_key: string, value: unknown) => {\n  if (value === undefined || typeof value === 'function' || typeof value === 'symbol') {\n    return undefined;\n  }\n  if (typeof value === 'bigint') {\n    return value.toString();\n  }\n  if (value instanceof Date) {\n    return value.toISOString();\n  }\n  return value;\n};\n\n/**\n * Safely stringifies a value and parses it back into a JsonValue.\n */\nexport const stringifyToJsonValue = (input: unknown): JsonValue | undefined => {\n  try {\n    const json = JSON.stringify(input, queryKeyJsonReplacer);\n    if (json === undefined) {\n      return undefined;\n    }\n    return JSON.parse(json) as JsonValue;\n  } catch {\n    return undefined;\n  }\n};\n\n/**\n * Detects plain objects (including objects with a null prototype).\n */\nconst isPlainObject = (value: unknown): value is Record<string, unknown> => {\n  if (value === null || typeof value !== 'object') {\n    return false;\n  }\n  const prototype = Object.getPrototypeOf(value as object);\n  return prototype === Object.prototype || prototype === null;\n};\n\n/**\n * Turns URLSearchParams into a sorted JSON object for deterministic keys.\n */\nconst serializeSearchParams = (params: URLSearchParams): JsonValue => {\n  const entries = Array.from(params.entries()).sort(([a], [b]) => a.localeCompare(b));\n  const result: Record<string, JsonValue> = {};\n\n  for (const [key, value] of entries) {\n    const existing = result[key];\n    if (existing === undefined) {\n      result[key] = value;\n      continue;\n    }\n\n    if (Array.isArray(existing)) {\n      (existing as string[]).push(value);\n    } else {\n      result[key] = [existing, value];\n    }\n  }\n\n  return result;\n};\n\n/**\n * Normalizes any accepted value into a JSON-friendly shape for query keys.\n */\nexport const serializeQueryKeyValue = (value: unknown): JsonValue | undefined => {\n  if (value === null) {\n    return null;\n  }\n\n  if (typeof value === 'string' || typeof value === 'number' || typeof value === 'boolean') {\n    return value;\n  }\n\n  if (value === undefined || typeof value === 'function' || typeof value === 'symbol') {\n    return undefined;\n  }\n\n  if (typeof value === 'bigint') {\n    return value.toString();\n  }\n\n  if (value instanceof Date) {\n    return value.toISOString();\n  }\n\n  if (Array.isArray(value)) {\n    return stringifyToJsonValue(value);\n  }\n\n  if (typeof URLSearchParams !== 'undefined' && value instanceof URLSearchParams) {\n    return serializeSearchParams(value);\n  }\n\n  if (isPlainObject(value)) {\n    return stringifyToJsonValue(value);\n  }\n\n  return undefined;\n};\n"
  },
  {
    "path": "examples/openapi-ts-tanstack-vue-query/src/client/core/serverSentEvents.gen.ts",
    "content": "// 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 const 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            // Normalize line endings: CRLF -> LF, then CR -> LF\n            buffer = buffer.replace(/\\r\\n/g, '\\n').replace(/\\r/g, '\\n');\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"
  },
  {
    "path": "examples/openapi-ts-tanstack-vue-query/src/client/core/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { Auth, AuthToken } from './auth.gen';\nimport type { BodySerializer, QuerySerializer, QuerySerializerOptions } from './bodySerializer.gen';\n\nexport type HttpMethod =\n  | 'connect'\n  | 'delete'\n  | 'get'\n  | 'head'\n  | 'options'\n  | 'patch'\n  | 'post'\n  | 'put'\n  | 'trace';\n\nexport type Client<\n  RequestFn = never,\n  Config = unknown,\n  MethodFn = never,\n  BuildUrlFn = never,\n  SseFn = never,\n> = {\n  /**\n   * Returns the final request URL.\n   */\n  buildUrl: BuildUrlFn;\n  getConfig: () => Config;\n  request: RequestFn;\n  setConfig: (config: Config) => Config;\n} & {\n  [K in HttpMethod]: MethodFn;\n} & ([SseFn] extends [never] ? { sse?: never } : { sse: { [K in HttpMethod]: SseFn } });\n\nexport interface Config {\n  /**\n   * Auth token or a function returning auth token. The resolved value will be\n   * added to the request payload as defined by its `security` array.\n   */\n  auth?: ((auth: Auth) => Promise<AuthToken> | AuthToken) | AuthToken;\n  /**\n   * A function for serializing request body parameter. By default,\n   * {@link JSON.stringify()} will be used.\n   */\n  bodySerializer?: BodySerializer | null;\n  /**\n   * An object containing any HTTP headers that you want to pre-populate your\n   * `Headers` object with.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/Headers/Headers#init See more}\n   */\n  headers?:\n    | RequestInit['headers']\n    | Record<\n        string,\n        string | number | boolean | (string | number | boolean)[] | null | undefined | unknown\n      >;\n  /**\n   * The request method.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/fetch#method See more}\n   */\n  method?: Uppercase<HttpMethod>;\n  /**\n   * A function for serializing request query parameters. By default, arrays\n   * will be exploded in form style, objects will be exploded in deepObject\n   * style, and reserved characters are percent-encoded.\n   *\n   * This method will have no effect if the native `paramsSerializer()` Axios\n   * API function is used.\n   *\n   * {@link https://swagger.io/docs/specification/serialization/#query View examples}\n   */\n  querySerializer?: QuerySerializer | QuerySerializerOptions;\n  /**\n   * A function validating request data. This is useful if you want to ensure\n   * the request conforms to the desired shape, so it can be safely sent to\n   * the server.\n   */\n  requestValidator?: (data: unknown) => Promise<unknown>;\n  /**\n   * A function transforming response data before it's returned. This is useful\n   * for post-processing data, e.g. converting ISO strings into Date objects.\n   */\n  responseTransformer?: (data: unknown) => Promise<unknown>;\n  /**\n   * A function validating response data. This is useful if you want to ensure\n   * the response conforms to the desired shape, so it can be safely passed to\n   * the transformers and returned to the user.\n   */\n  responseValidator?: (data: unknown) => Promise<unknown>;\n}\n\ntype IsExactlyNeverOrNeverUndefined<T> = [T] extends [never]\n  ? true\n  : [T] extends [never | undefined]\n    ? [undefined] extends [T]\n      ? false\n      : true\n    : false;\n\nexport type OmitNever<T extends Record<string, unknown>> = {\n  [K in keyof T as IsExactlyNeverOrNeverUndefined<T[K]> extends true ? never : K]: T[K];\n};\n"
  },
  {
    "path": "examples/openapi-ts-tanstack-vue-query/src/client/core/utils.gen.ts",
    "content": "// 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"
  },
  {
    "path": "examples/openapi-ts-tanstack-vue-query/src/client/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport {\n  addPet,\n  createUser,\n  createUsersWithListInput,\n  deleteOrder,\n  deletePet,\n  deleteUser,\n  findPetsByStatus,\n  findPetsByTags,\n  getInventory,\n  getOrderById,\n  getPetById,\n  getUserByName,\n  loginUser,\n  logoutUser,\n  type Options,\n  placeOrder,\n  updatePet,\n  updatePetWithForm,\n  updateUser,\n  uploadFile,\n} from './sdk.gen';\nexport type {\n  AddPetData,\n  AddPetErrors,\n  AddPetResponse,\n  AddPetResponses,\n  ApiResponse,\n  Category,\n  ClientOptions,\n  CreateUserData,\n  CreateUserErrors,\n  CreateUserResponse,\n  CreateUserResponses,\n  CreateUsersWithListInputData,\n  CreateUsersWithListInputErrors,\n  CreateUsersWithListInputResponse,\n  CreateUsersWithListInputResponses,\n  DeleteOrderData,\n  DeleteOrderErrors,\n  DeleteOrderResponses,\n  DeletePetData,\n  DeletePetErrors,\n  DeletePetResponses,\n  DeleteUserData,\n  DeleteUserErrors,\n  DeleteUserResponses,\n  FindPetsByStatusData,\n  FindPetsByStatusErrors,\n  FindPetsByStatusResponse,\n  FindPetsByStatusResponses,\n  FindPetsByTagsData,\n  FindPetsByTagsErrors,\n  FindPetsByTagsResponse,\n  FindPetsByTagsResponses,\n  GetInventoryData,\n  GetInventoryErrors,\n  GetInventoryResponse,\n  GetInventoryResponses,\n  GetOrderByIdData,\n  GetOrderByIdErrors,\n  GetOrderByIdResponse,\n  GetOrderByIdResponses,\n  GetPetByIdData,\n  GetPetByIdErrors,\n  GetPetByIdResponse,\n  GetPetByIdResponses,\n  GetUserByNameData,\n  GetUserByNameErrors,\n  GetUserByNameResponse,\n  GetUserByNameResponses,\n  LoginUserData,\n  LoginUserErrors,\n  LoginUserResponse,\n  LoginUserResponses,\n  LogoutUserData,\n  LogoutUserErrors,\n  LogoutUserResponses,\n  Order,\n  Pet,\n  Pet2,\n  PlaceOrderData,\n  PlaceOrderErrors,\n  PlaceOrderResponse,\n  PlaceOrderResponses,\n  Tag,\n  UpdatePetData,\n  UpdatePetErrors,\n  UpdatePetResponse,\n  UpdatePetResponses,\n  UpdatePetWithFormData,\n  UpdatePetWithFormErrors,\n  UpdatePetWithFormResponse,\n  UpdatePetWithFormResponses,\n  UpdateUserData,\n  UpdateUserErrors,\n  UpdateUserResponses,\n  UploadFileData,\n  UploadFileErrors,\n  UploadFileResponse,\n  UploadFileResponses,\n  User,\n  UserArray,\n} from './types.gen';\n"
  },
  {
    "path": "examples/openapi-ts-tanstack-vue-query/src/client/schemas.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport const OrderSchema = {\n  properties: {\n    complete: {\n      type: 'boolean',\n    },\n    id: {\n      example: 10,\n      format: 'int64',\n      type: 'integer',\n    },\n    petId: {\n      example: 198772,\n      format: 'int64',\n      type: 'integer',\n    },\n    quantity: {\n      example: 7,\n      format: 'int32',\n      type: 'integer',\n    },\n    shipDate: {\n      format: 'date-time',\n      type: 'string',\n    },\n    status: {\n      description: 'Order Status',\n      enum: ['placed', 'approved', 'delivered'],\n      example: 'approved',\n      type: 'string',\n    },\n  },\n  type: 'object',\n  'x-swagger-router-model': 'io.swagger.petstore.model.Order',\n  xml: {\n    name: 'order',\n  },\n} as const;\n\nexport const CategorySchema = {\n  properties: {\n    id: {\n      example: 1,\n      format: 'int64',\n      type: 'integer',\n    },\n    name: {\n      example: 'Dogs',\n      type: 'string',\n    },\n  },\n  type: 'object',\n  'x-swagger-router-model': 'io.swagger.petstore.model.Category',\n  xml: {\n    name: 'category',\n  },\n} as const;\n\nexport const UserSchema = {\n  properties: {\n    email: {\n      example: 'john@email.com',\n      type: 'string',\n    },\n    firstName: {\n      example: 'John',\n      type: 'string',\n    },\n    id: {\n      example: 10,\n      format: 'int64',\n      type: 'integer',\n    },\n    lastName: {\n      example: 'James',\n      type: 'string',\n    },\n    password: {\n      example: '12345',\n      type: 'string',\n    },\n    phone: {\n      example: '12345',\n      type: 'string',\n    },\n    userStatus: {\n      description: 'User Status',\n      example: 1,\n      format: 'int32',\n      type: 'integer',\n    },\n    username: {\n      example: 'theUser',\n      type: 'string',\n    },\n  },\n  type: 'object',\n  'x-swagger-router-model': 'io.swagger.petstore.model.User',\n  xml: {\n    name: 'user',\n  },\n} as const;\n\nexport const TagSchema = {\n  properties: {\n    id: {\n      format: 'int64',\n      type: 'integer',\n    },\n    name: {\n      type: 'string',\n    },\n  },\n  type: 'object',\n  'x-swagger-router-model': 'io.swagger.petstore.model.Tag',\n  xml: {\n    name: 'tag',\n  },\n} as const;\n\nexport const PetSchema = {\n  properties: {\n    category: {\n      $ref: '#/components/schemas/Category',\n    },\n    id: {\n      example: 10,\n      format: 'int64',\n      type: 'integer',\n    },\n    name: {\n      example: 'doggie',\n      type: 'string',\n    },\n    photoUrls: {\n      items: {\n        type: 'string',\n        xml: {\n          name: 'photoUrl',\n        },\n      },\n      type: 'array',\n      xml: {\n        wrapped: true,\n      },\n    },\n    status: {\n      description: 'pet status in the store',\n      enum: ['available', 'pending', 'sold'],\n      type: 'string',\n    },\n    tags: {\n      items: {\n        $ref: '#/components/schemas/Tag',\n      },\n      type: 'array',\n      xml: {\n        wrapped: true,\n      },\n    },\n  },\n  required: ['name', 'photoUrls'],\n  type: 'object',\n  'x-swagger-router-model': 'io.swagger.petstore.model.Pet',\n  xml: {\n    name: 'pet',\n  },\n} as const;\n\nexport const ApiResponseSchema = {\n  properties: {\n    code: {\n      format: 'int32',\n      type: 'integer',\n    },\n    message: {\n      type: 'string',\n    },\n    type: {\n      type: 'string',\n    },\n  },\n  type: 'object',\n  xml: {\n    name: '##default',\n  },\n} as const;\n"
  },
  {
    "path": "examples/openapi-ts-tanstack-vue-query/src/client/sdk.gen.ts",
    "content": "// 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 {\n  AddPetData,\n  AddPetErrors,\n  AddPetResponses,\n  CreateUserData,\n  CreateUserErrors,\n  CreateUserResponses,\n  CreateUsersWithListInputData,\n  CreateUsersWithListInputErrors,\n  CreateUsersWithListInputResponses,\n  DeleteOrderData,\n  DeleteOrderErrors,\n  DeleteOrderResponses,\n  DeletePetData,\n  DeletePetErrors,\n  DeletePetResponses,\n  DeleteUserData,\n  DeleteUserErrors,\n  DeleteUserResponses,\n  FindPetsByStatusData,\n  FindPetsByStatusErrors,\n  FindPetsByStatusResponses,\n  FindPetsByTagsData,\n  FindPetsByTagsErrors,\n  FindPetsByTagsResponses,\n  GetInventoryData,\n  GetInventoryErrors,\n  GetInventoryResponses,\n  GetOrderByIdData,\n  GetOrderByIdErrors,\n  GetOrderByIdResponses,\n  GetPetByIdData,\n  GetPetByIdErrors,\n  GetPetByIdResponses,\n  GetUserByNameData,\n  GetUserByNameErrors,\n  GetUserByNameResponses,\n  LoginUserData,\n  LoginUserErrors,\n  LoginUserResponses,\n  LogoutUserData,\n  LogoutUserErrors,\n  LogoutUserResponses,\n  PlaceOrderData,\n  PlaceOrderErrors,\n  PlaceOrderResponses,\n  UpdatePetData,\n  UpdatePetErrors,\n  UpdatePetResponses,\n  UpdatePetWithFormData,\n  UpdatePetWithFormErrors,\n  UpdatePetWithFormResponses,\n  UpdateUserData,\n  UpdateUserErrors,\n  UpdateUserResponses,\n  UploadFileData,\n  UploadFileErrors,\n  UploadFileResponses,\n} from './types.gen';\n\nexport type Options<\n  TData extends TDataShape = TDataShape,\n  ThrowOnError extends boolean = boolean,\n> = Options2<TData, ThrowOnError> & {\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 * Add a new pet to the store.\n *\n * Add a new pet to the store.\n */\nexport const addPet = <ThrowOnError extends boolean = false>(\n  options: Options<AddPetData, ThrowOnError>,\n) =>\n  (options.client ?? client).post<AddPetResponses, AddPetErrors, ThrowOnError>({\n    security: [{ scheme: 'bearer', type: 'http' }],\n    url: '/pet',\n    ...options,\n    headers: {\n      'Content-Type': 'application/json',\n      ...options.headers,\n    },\n  });\n\n/**\n * Update an existing pet.\n *\n * Update an existing pet by Id.\n */\nexport const updatePet = <ThrowOnError extends boolean = false>(\n  options: Options<UpdatePetData, ThrowOnError>,\n) =>\n  (options.client ?? client).put<UpdatePetResponses, UpdatePetErrors, ThrowOnError>({\n    security: [{ scheme: 'bearer', type: 'http' }],\n    url: '/pet',\n    ...options,\n    headers: {\n      'Content-Type': 'application/json',\n      ...options.headers,\n    },\n  });\n\n/**\n * Finds Pets by status.\n *\n * Multiple status values can be provided with comma separated strings.\n */\nexport const findPetsByStatus = <ThrowOnError extends boolean = false>(\n  options: Options<FindPetsByStatusData, ThrowOnError>,\n) =>\n  (options.client ?? client).get<FindPetsByStatusResponses, FindPetsByStatusErrors, ThrowOnError>({\n    security: [{ scheme: 'bearer', type: 'http' }],\n    url: '/pet/findByStatus',\n    ...options,\n  });\n\n/**\n * Finds Pets by tags.\n *\n * Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.\n */\nexport const findPetsByTags = <ThrowOnError extends boolean = false>(\n  options: Options<FindPetsByTagsData, ThrowOnError>,\n) =>\n  (options.client ?? client).get<FindPetsByTagsResponses, FindPetsByTagsErrors, ThrowOnError>({\n    security: [{ scheme: 'bearer', type: 'http' }],\n    url: '/pet/findByTags',\n    ...options,\n  });\n\n/**\n * Deletes a pet.\n *\n * Delete a pet.\n */\nexport const deletePet = <ThrowOnError extends boolean = false>(\n  options: Options<DeletePetData, ThrowOnError>,\n) =>\n  (options.client ?? client).delete<DeletePetResponses, DeletePetErrors, ThrowOnError>({\n    security: [{ scheme: 'bearer', type: 'http' }],\n    url: '/pet/{petId}',\n    ...options,\n  });\n\n/**\n * Find pet by ID.\n *\n * Returns a single pet.\n */\nexport const getPetById = <ThrowOnError extends boolean = false>(\n  options: Options<GetPetByIdData, ThrowOnError>,\n) =>\n  (options.client ?? client).get<GetPetByIdResponses, GetPetByIdErrors, ThrowOnError>({\n    security: [\n      { name: 'api_key', type: 'apiKey' },\n      { scheme: 'bearer', type: 'http' },\n    ],\n    url: '/pet/{petId}',\n    ...options,\n  });\n\n/**\n * Updates a pet in the store with form data.\n *\n * Updates a pet resource based on the form data.\n */\nexport const updatePetWithForm = <ThrowOnError extends boolean = false>(\n  options: Options<UpdatePetWithFormData, ThrowOnError>,\n) =>\n  (options.client ?? client).post<\n    UpdatePetWithFormResponses,\n    UpdatePetWithFormErrors,\n    ThrowOnError\n  >({\n    security: [{ scheme: 'bearer', type: 'http' }],\n    url: '/pet/{petId}',\n    ...options,\n  });\n\n/**\n * Uploads an image.\n *\n * Upload image of the pet.\n */\nexport const uploadFile = <ThrowOnError extends boolean = false>(\n  options: Options<UploadFileData, ThrowOnError>,\n) =>\n  (options.client ?? client).post<UploadFileResponses, UploadFileErrors, ThrowOnError>({\n    bodySerializer: null,\n    security: [{ scheme: 'bearer', type: 'http' }],\n    url: '/pet/{petId}/uploadImage',\n    ...options,\n    headers: {\n      'Content-Type': 'application/octet-stream',\n      ...options.headers,\n    },\n  });\n\n/**\n * Returns pet inventories by status.\n *\n * Returns a map of status codes to quantities.\n */\nexport const getInventory = <ThrowOnError extends boolean = false>(\n  options?: Options<GetInventoryData, ThrowOnError>,\n) =>\n  (options?.client ?? client).get<GetInventoryResponses, GetInventoryErrors, ThrowOnError>({\n    security: [{ name: 'api_key', type: 'apiKey' }],\n    url: '/store/inventory',\n    ...options,\n  });\n\n/**\n * Place an order for a pet.\n *\n * Place a new order in the store.\n */\nexport const placeOrder = <ThrowOnError extends boolean = false>(\n  options?: Options<PlaceOrderData, ThrowOnError>,\n) =>\n  (options?.client ?? client).post<PlaceOrderResponses, PlaceOrderErrors, ThrowOnError>({\n    url: '/store/order',\n    ...options,\n    headers: {\n      'Content-Type': 'application/json',\n      ...options?.headers,\n    },\n  });\n\n/**\n * Delete purchase order by identifier.\n *\n * For valid response try integer IDs with value < 1000. Anything above 1000 or non-integers will generate API errors.\n */\nexport const deleteOrder = <ThrowOnError extends boolean = false>(\n  options: Options<DeleteOrderData, ThrowOnError>,\n) =>\n  (options.client ?? client).delete<DeleteOrderResponses, DeleteOrderErrors, ThrowOnError>({\n    url: '/store/order/{orderId}',\n    ...options,\n  });\n\n/**\n * Find purchase order by ID.\n *\n * For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions.\n */\nexport const getOrderById = <ThrowOnError extends boolean = false>(\n  options: Options<GetOrderByIdData, ThrowOnError>,\n) =>\n  (options.client ?? client).get<GetOrderByIdResponses, GetOrderByIdErrors, ThrowOnError>({\n    url: '/store/order/{orderId}',\n    ...options,\n  });\n\n/**\n * Create user.\n *\n * This can only be done by the logged in user.\n */\nexport const createUser = <ThrowOnError extends boolean = false>(\n  options?: Options<CreateUserData, ThrowOnError>,\n) =>\n  (options?.client ?? client).post<CreateUserResponses, CreateUserErrors, ThrowOnError>({\n    url: '/user',\n    ...options,\n    headers: {\n      'Content-Type': 'application/json',\n      ...options?.headers,\n    },\n  });\n\n/**\n * Creates list of users with given input array.\n *\n * Creates list of users with given input array.\n */\nexport const createUsersWithListInput = <ThrowOnError extends boolean = false>(\n  options?: Options<CreateUsersWithListInputData, ThrowOnError>,\n) =>\n  (options?.client ?? client).post<\n    CreateUsersWithListInputResponses,\n    CreateUsersWithListInputErrors,\n    ThrowOnError\n  >({\n    url: '/user/createWithList',\n    ...options,\n    headers: {\n      'Content-Type': 'application/json',\n      ...options?.headers,\n    },\n  });\n\n/**\n * Logs user into the system.\n *\n * Log into the system.\n */\nexport const loginUser = <ThrowOnError extends boolean = false>(\n  options?: Options<LoginUserData, ThrowOnError>,\n) =>\n  (options?.client ?? client).get<LoginUserResponses, LoginUserErrors, ThrowOnError>({\n    url: '/user/login',\n    ...options,\n  });\n\n/**\n * Logs out current logged in user session.\n *\n * Log user out of the system.\n */\nexport const logoutUser = <ThrowOnError extends boolean = false>(\n  options?: Options<LogoutUserData, ThrowOnError>,\n) =>\n  (options?.client ?? client).get<LogoutUserResponses, LogoutUserErrors, ThrowOnError>({\n    url: '/user/logout',\n    ...options,\n  });\n\n/**\n * Delete user resource.\n *\n * This can only be done by the logged in user.\n */\nexport const deleteUser = <ThrowOnError extends boolean = false>(\n  options: Options<DeleteUserData, ThrowOnError>,\n) =>\n  (options.client ?? client).delete<DeleteUserResponses, DeleteUserErrors, ThrowOnError>({\n    url: '/user/{username}',\n    ...options,\n  });\n\n/**\n * Get user by user name.\n *\n * Get user detail based on username.\n */\nexport const getUserByName = <ThrowOnError extends boolean = false>(\n  options: Options<GetUserByNameData, ThrowOnError>,\n) =>\n  (options.client ?? client).get<GetUserByNameResponses, GetUserByNameErrors, ThrowOnError>({\n    url: '/user/{username}',\n    ...options,\n  });\n\n/**\n * Update user resource.\n *\n * This can only be done by the logged in user.\n */\nexport const updateUser = <ThrowOnError extends boolean = false>(\n  options: Options<UpdateUserData, ThrowOnError>,\n) =>\n  (options.client ?? client).put<UpdateUserResponses, UpdateUserErrors, ThrowOnError>({\n    url: '/user/{username}',\n    ...options,\n    headers: {\n      'Content-Type': 'application/json',\n      ...options.headers,\n    },\n  });\n"
  },
  {
    "path": "examples/openapi-ts-tanstack-vue-query/src/client/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type ClientOptions = {\n  baseUrl: 'https://petstore3.swagger.io/api/v3' | (string & {});\n};\n\nexport type Order = {\n  complete?: boolean;\n  id?: number;\n  petId?: number;\n  quantity?: number;\n  shipDate?: string;\n  /**\n   * Order Status\n   */\n  status?: 'placed' | 'approved' | 'delivered';\n};\n\nexport type Category = {\n  id?: number;\n  name?: string;\n};\n\nexport type User = {\n  email?: string;\n  firstName?: string;\n  id?: number;\n  lastName?: string;\n  password?: string;\n  phone?: string;\n  /**\n   * User Status\n   */\n  userStatus?: number;\n  username?: string;\n};\n\nexport type Tag = {\n  id?: number;\n  name?: string;\n};\n\nexport type Pet = {\n  category?: Category;\n  id?: number;\n  name: string;\n  photoUrls: Array<string>;\n  /**\n   * pet status in the store\n   */\n  status?: 'available' | 'pending' | 'sold';\n  tags?: Array<Tag>;\n};\n\nexport type ApiResponse = {\n  code?: number;\n  message?: string;\n  type?: string;\n};\n\nexport type Pet2 = Pet;\n\n/**\n * List of user object\n */\nexport type UserArray = Array<User>;\n\nexport type AddPetData = {\n  /**\n   * Create a new pet in the store\n   */\n  body: Pet;\n  path?: never;\n  query?: never;\n  url: '/pet';\n};\n\nexport type AddPetErrors = {\n  /**\n   * Invalid input\n   */\n  400: unknown;\n  /**\n   * Validation exception\n   */\n  422: unknown;\n  /**\n   * Unexpected error\n   */\n  default: unknown;\n};\n\nexport type AddPetResponses = {\n  /**\n   * Successful operation\n   */\n  200: Pet;\n};\n\nexport type AddPetResponse = AddPetResponses[keyof AddPetResponses];\n\nexport type UpdatePetData = {\n  /**\n   * Update an existent pet in the store\n   */\n  body: Pet;\n  path?: never;\n  query?: never;\n  url: '/pet';\n};\n\nexport type UpdatePetErrors = {\n  /**\n   * Invalid ID supplied\n   */\n  400: unknown;\n  /**\n   * Pet not found\n   */\n  404: unknown;\n  /**\n   * Validation exception\n   */\n  422: unknown;\n  /**\n   * Unexpected error\n   */\n  default: unknown;\n};\n\nexport type UpdatePetResponses = {\n  /**\n   * Successful operation\n   */\n  200: Pet;\n};\n\nexport type UpdatePetResponse = UpdatePetResponses[keyof UpdatePetResponses];\n\nexport type FindPetsByStatusData = {\n  body?: never;\n  path?: never;\n  query: {\n    /**\n     * Status values that need to be considered for filter\n     */\n    status: 'available' | 'pending' | 'sold';\n  };\n  url: '/pet/findByStatus';\n};\n\nexport type FindPetsByStatusErrors = {\n  /**\n   * Invalid status value\n   */\n  400: unknown;\n  /**\n   * Unexpected error\n   */\n  default: unknown;\n};\n\nexport type FindPetsByStatusResponses = {\n  /**\n   * successful operation\n   */\n  200: Array<Pet>;\n};\n\nexport type FindPetsByStatusResponse = FindPetsByStatusResponses[keyof FindPetsByStatusResponses];\n\nexport type FindPetsByTagsData = {\n  body?: never;\n  path?: never;\n  query: {\n    /**\n     * Tags to filter by\n     */\n    tags: Array<string>;\n  };\n  url: '/pet/findByTags';\n};\n\nexport type FindPetsByTagsErrors = {\n  /**\n   * Invalid tag value\n   */\n  400: unknown;\n  /**\n   * Unexpected error\n   */\n  default: unknown;\n};\n\nexport type FindPetsByTagsResponses = {\n  /**\n   * successful operation\n   */\n  200: Array<Pet>;\n};\n\nexport type FindPetsByTagsResponse = FindPetsByTagsResponses[keyof FindPetsByTagsResponses];\n\nexport type DeletePetData = {\n  body?: never;\n  headers?: {\n    api_key?: string;\n  };\n  path: {\n    /**\n     * Pet id to delete\n     */\n    petId: number;\n  };\n  query?: never;\n  url: '/pet/{petId}';\n};\n\nexport type DeletePetErrors = {\n  /**\n   * Invalid pet value\n   */\n  400: unknown;\n  /**\n   * Unexpected error\n   */\n  default: unknown;\n};\n\nexport type DeletePetResponses = {\n  /**\n   * Pet deleted\n   */\n  200: unknown;\n};\n\nexport type GetPetByIdData = {\n  body?: never;\n  path: {\n    /**\n     * ID of pet to return\n     */\n    petId: number;\n  };\n  query?: never;\n  url: '/pet/{petId}';\n};\n\nexport type GetPetByIdErrors = {\n  /**\n   * Invalid ID supplied\n   */\n  400: unknown;\n  /**\n   * Pet not found\n   */\n  404: unknown;\n  /**\n   * Unexpected error\n   */\n  default: unknown;\n};\n\nexport type GetPetByIdResponses = {\n  /**\n   * successful operation\n   */\n  200: Pet;\n};\n\nexport type GetPetByIdResponse = GetPetByIdResponses[keyof GetPetByIdResponses];\n\nexport type UpdatePetWithFormData = {\n  body?: never;\n  path: {\n    /**\n     * ID of pet that needs to be updated\n     */\n    petId: number;\n  };\n  query?: {\n    /**\n     * Name of pet that needs to be updated\n     */\n    name?: string;\n    /**\n     * Status of pet that needs to be updated\n     */\n    status?: string;\n  };\n  url: '/pet/{petId}';\n};\n\nexport type UpdatePetWithFormErrors = {\n  /**\n   * Invalid input\n   */\n  400: unknown;\n  /**\n   * Unexpected error\n   */\n  default: unknown;\n};\n\nexport type UpdatePetWithFormResponses = {\n  /**\n   * successful operation\n   */\n  200: Pet;\n};\n\nexport type UpdatePetWithFormResponse =\n  UpdatePetWithFormResponses[keyof UpdatePetWithFormResponses];\n\nexport type UploadFileData = {\n  body?: Blob | File;\n  path: {\n    /**\n     * ID of pet to update\n     */\n    petId: number;\n  };\n  query?: {\n    /**\n     * Additional Metadata\n     */\n    additionalMetadata?: string;\n  };\n  url: '/pet/{petId}/uploadImage';\n};\n\nexport type UploadFileErrors = {\n  /**\n   * No file uploaded\n   */\n  400: unknown;\n  /**\n   * Pet not found\n   */\n  404: unknown;\n  /**\n   * Unexpected error\n   */\n  default: unknown;\n};\n\nexport type UploadFileResponses = {\n  /**\n   * successful operation\n   */\n  200: ApiResponse;\n};\n\nexport type UploadFileResponse = UploadFileResponses[keyof UploadFileResponses];\n\nexport type GetInventoryData = {\n  body?: never;\n  path?: never;\n  query?: never;\n  url: '/store/inventory';\n};\n\nexport type GetInventoryErrors = {\n  /**\n   * Unexpected error\n   */\n  default: unknown;\n};\n\nexport type GetInventoryResponses = {\n  /**\n   * successful operation\n   */\n  200: {\n    [key: string]: number;\n  };\n};\n\nexport type GetInventoryResponse = GetInventoryResponses[keyof GetInventoryResponses];\n\nexport type PlaceOrderData = {\n  body?: Order;\n  path?: never;\n  query?: never;\n  url: '/store/order';\n};\n\nexport type PlaceOrderErrors = {\n  /**\n   * Invalid input\n   */\n  400: unknown;\n  /**\n   * Validation exception\n   */\n  422: unknown;\n  /**\n   * Unexpected error\n   */\n  default: unknown;\n};\n\nexport type PlaceOrderResponses = {\n  /**\n   * successful operation\n   */\n  200: Order;\n};\n\nexport type PlaceOrderResponse = PlaceOrderResponses[keyof PlaceOrderResponses];\n\nexport type DeleteOrderData = {\n  body?: never;\n  path: {\n    /**\n     * ID of the order that needs to be deleted\n     */\n    orderId: number;\n  };\n  query?: never;\n  url: '/store/order/{orderId}';\n};\n\nexport type DeleteOrderErrors = {\n  /**\n   * Invalid ID supplied\n   */\n  400: unknown;\n  /**\n   * Order not found\n   */\n  404: unknown;\n  /**\n   * Unexpected error\n   */\n  default: unknown;\n};\n\nexport type DeleteOrderResponses = {\n  /**\n   * order deleted\n   */\n  200: unknown;\n};\n\nexport type GetOrderByIdData = {\n  body?: never;\n  path: {\n    /**\n     * ID of order that needs to be fetched\n     */\n    orderId: number;\n  };\n  query?: never;\n  url: '/store/order/{orderId}';\n};\n\nexport type GetOrderByIdErrors = {\n  /**\n   * Invalid ID supplied\n   */\n  400: unknown;\n  /**\n   * Order not found\n   */\n  404: unknown;\n  /**\n   * Unexpected error\n   */\n  default: unknown;\n};\n\nexport type GetOrderByIdResponses = {\n  /**\n   * successful operation\n   */\n  200: Order;\n};\n\nexport type GetOrderByIdResponse = GetOrderByIdResponses[keyof GetOrderByIdResponses];\n\nexport type CreateUserData = {\n  /**\n   * Created user object\n   */\n  body?: User;\n  path?: never;\n  query?: never;\n  url: '/user';\n};\n\nexport type CreateUserErrors = {\n  /**\n   * Unexpected error\n   */\n  default: unknown;\n};\n\nexport type CreateUserResponses = {\n  /**\n   * successful operation\n   */\n  200: User;\n};\n\nexport type CreateUserResponse = CreateUserResponses[keyof CreateUserResponses];\n\nexport type CreateUsersWithListInputData = {\n  body?: Array<User>;\n  path?: never;\n  query?: never;\n  url: '/user/createWithList';\n};\n\nexport type CreateUsersWithListInputErrors = {\n  /**\n   * Unexpected error\n   */\n  default: unknown;\n};\n\nexport type CreateUsersWithListInputResponses = {\n  /**\n   * Successful operation\n   */\n  200: User;\n};\n\nexport type CreateUsersWithListInputResponse =\n  CreateUsersWithListInputResponses[keyof CreateUsersWithListInputResponses];\n\nexport type LoginUserData = {\n  body?: never;\n  path?: never;\n  query?: {\n    /**\n     * The password for login in clear text\n     */\n    password?: string;\n    /**\n     * The user name for login\n     */\n    username?: string;\n  };\n  url: '/user/login';\n};\n\nexport type LoginUserErrors = {\n  /**\n   * Invalid username/password supplied\n   */\n  400: unknown;\n  /**\n   * Unexpected error\n   */\n  default: unknown;\n};\n\nexport type LoginUserResponses = {\n  /**\n   * successful operation\n   */\n  200: string;\n};\n\nexport type LoginUserResponse = LoginUserResponses[keyof LoginUserResponses];\n\nexport type LogoutUserData = {\n  body?: never;\n  path?: never;\n  query?: never;\n  url: '/user/logout';\n};\n\nexport type LogoutUserErrors = {\n  /**\n   * Unexpected error\n   */\n  default: unknown;\n};\n\nexport type LogoutUserResponses = {\n  /**\n   * successful operation\n   */\n  200: unknown;\n};\n\nexport type DeleteUserData = {\n  body?: never;\n  path: {\n    /**\n     * The name that needs to be deleted\n     */\n    username: string;\n  };\n  query?: never;\n  url: '/user/{username}';\n};\n\nexport type DeleteUserErrors = {\n  /**\n   * Invalid username supplied\n   */\n  400: unknown;\n  /**\n   * User not found\n   */\n  404: unknown;\n  /**\n   * Unexpected error\n   */\n  default: unknown;\n};\n\nexport type DeleteUserResponses = {\n  /**\n   * User deleted\n   */\n  200: unknown;\n};\n\nexport type GetUserByNameData = {\n  body?: never;\n  path: {\n    /**\n     * The name that needs to be fetched. Use user1 for testing\n     */\n    username: string;\n  };\n  query?: never;\n  url: '/user/{username}';\n};\n\nexport type GetUserByNameErrors = {\n  /**\n   * Invalid username supplied\n   */\n  400: unknown;\n  /**\n   * User not found\n   */\n  404: unknown;\n  /**\n   * Unexpected error\n   */\n  default: unknown;\n};\n\nexport type GetUserByNameResponses = {\n  /**\n   * successful operation\n   */\n  200: User;\n};\n\nexport type GetUserByNameResponse = GetUserByNameResponses[keyof GetUserByNameResponses];\n\nexport type UpdateUserData = {\n  /**\n   * Update an existent user in the store\n   */\n  body?: User;\n  path: {\n    /**\n     * name that need to be deleted\n     */\n    username: string;\n  };\n  query?: never;\n  url: '/user/{username}';\n};\n\nexport type UpdateUserErrors = {\n  /**\n   * bad request\n   */\n  400: unknown;\n  /**\n   * user not found\n   */\n  404: unknown;\n  /**\n   * Unexpected error\n   */\n  default: unknown;\n};\n\nexport type UpdateUserResponses = {\n  /**\n   * successful operation\n   */\n  200: unknown;\n};\n"
  },
  {
    "path": "examples/openapi-ts-tanstack-vue-query/src/main.ts",
    "content": "import './assets/main.css';\n\nimport { VueQueryPlugin } from '@tanstack/vue-query';\nimport { createPinia } from 'pinia';\nimport { createApp } from 'vue';\n\nimport App from './App.vue';\nimport { client } from './client/client.gen';\nimport router from './router';\n\n// configure internal service client\nclient.setConfig({\n  // set default base url for requests\n  baseUrl: 'https://petstore3.swagger.io/api/v3',\n  // set default headers for requests\n  headers: {\n    Authorization: 'Bearer <token_from_service_client>',\n  },\n});\n\nconst app = createApp(App);\n\napp.use(createPinia());\napp.use(router);\napp.use(VueQueryPlugin);\n\napp.mount('#app');\n"
  },
  {
    "path": "examples/openapi-ts-tanstack-vue-query/src/router/index.ts",
    "content": "import { createRouter, createWebHistory } from 'vue-router';\n\nimport TanstackExample from '@/views/TanstackExample.vue';\n\nconst router = createRouter({\n  history: createWebHistory(import.meta.env.BASE_URL),\n  routes: [\n    {\n      component: TanstackExample,\n      name: 'home',\n      path: '/',\n    },\n  ],\n});\n\nexport default router;\n"
  },
  {
    "path": "examples/openapi-ts-tanstack-vue-query/src/views/TanstackExample.vue",
    "content": "<script lang=\"ts\" setup>\nimport type { Pet } from '@/client';\nimport { createClient } from '@/client/client';\nimport { PetSchema } from '@/client/schemas.gen';\nimport {\n  addPetMutation,\n  getPetByIdOptions,\n  updatePetMutation,\n} from '@/client/@tanstack/vue-query.gen';\nimport { useMutation, useQuery, useQueryClient } from '@tanstack/vue-query';\nimport { computed, ref, watch } from 'vue';\nimport type { RequestOptions } from '@/client/client';\n\nconst queryClient = useQueryClient();\n\nconst localClient = createClient({\n  // set default base url for requests made by this client\n  baseUrl: 'https://petstore3.swagger.io/api/v3',\n  /**\n   * Set default headers only for requests made by this client. This is to\n   * demonstrate local clients and their configuration taking precedence over\n   * internal service client.\n   */\n  headers: {\n    Authorization: 'Bearer <token_from_local_client>',\n  },\n});\n\nlocalClient.interceptors.request.use((request: Request, options: RequestOptions) => {\n  // Middleware is great for adding authorization tokens to requests made to\n  // protected paths. Headers are set randomly here to allow surfacing the\n  // default headers, too.\n  if (options.url === '/pet/{petId}' && options.method === 'GET' && Math.random() < 0.5) {\n    request.headers.set('Authorization', 'Bearer <token_from_interceptor>');\n  }\n  return request;\n});\n\nconst pet = ref<Pet>();\nconst petId = ref<number>();\n\nconst petInput = ref({ name: '', category: '' });\n\nconst addPet = useMutation({\n  ...addPetMutation(),\n  onError: (error) => {\n    console.log(error);\n  },\n  onSuccess: (data) => {\n    pet.value = data;\n    petId.value = data.id ?? petId.value;\n\n    if (typeof data?.id === 'number') {\n      queryClient.invalidateQueries({\n        queryKey: getPetByIdOptions({ path: { petId: data.id } }).queryKey,\n      });\n    }\n  },\n});\n\nconst updatePet = useMutation({\n  ...updatePetMutation(),\n  onError: (error) => {\n    console.log(error);\n  },\n  onSuccess: (data) => {\n    pet.value = data;\n    petId.value = data.id ?? petId.value;\n\n    if (typeof data?.id === 'number') {\n      queryClient.invalidateQueries({\n        queryKey: getPetByIdOptions({ path: { petId: data.id } }).queryKey,\n      });\n    }\n  },\n});\n\nconst { data, error } = useQuery(\n  computed(() => ({\n    ...getPetByIdOptions({\n      client: localClient,\n      path: {\n        petId: petId.value!,\n      },\n    }),\n    enabled: Boolean(petId.value),\n  })),\n);\n\nconst handleAddPet = async () => {\n  if (PetSchema.required.includes('name') && !petInput.value?.name?.length) {\n    return;\n  }\n\n  addPet.mutate({\n    body: {\n      category: {\n        id: 0,\n        name: petInput.value.category,\n      },\n      id: 0,\n      name: petInput.value?.name,\n      photoUrls: ['string'],\n      status: 'available',\n      tags: [\n        {\n          id: 0,\n          name: 'string',\n        },\n      ],\n    },\n  });\n};\n\nfunction setRandomPetId() {\n  // random id 1-10\n  petId.value = Math.floor(Math.random() * (10 - 1 + 1) + 1);\n}\n\nconst handleUpdatePet = async () => {\n  updatePet.mutate({\n    body: {\n      category: {\n        id: pet.value?.category?.id ?? 0,\n        name: petInput.value.category,\n      },\n      id: pet.value?.id ?? 0,\n      name: petInput.value.name,\n      photoUrls: ['string'],\n      status: 'available',\n      tags: [\n        {\n          id: 0,\n          name: 'string',\n        },\n      ],\n    },\n    // setting headers per request\n    headers: {\n      Authorization: 'Bearer <token_from_method>',\n    },\n  });\n};\n\nwatch(data, () => {\n  pet.value = data.value;\n});\n\nwatch(error, (error) => {\n  console.log(error);\n});\n</script>\n\n<template>\n  <div class=\"bg-[#18191b] py-12\">\n    <div class=\"mx-auto flex max-w-md flex-col gap-12\">\n      <div class=\"flex items-center\">\n        <a class=\"shrink-0\" href=\"https://heyapi.dev/\" target=\"_blank\">\n          <img\n            alt=\"Hey API logo\"\n            class=\"size-16 transition duration-300 will-change-auto\"\n            src=\"https://heyapi.dev/assets/raw/logo.png\"\n          />\n        </a>\n\n        <h1 class=\"text-2xl font-bold text-white\">@hey-api/openapi-ts 🤝 TanStack Vue Query</h1>\n      </div>\n\n      <div class=\"flex flex-col gap-2\">\n        <div\n          class=\"flex max-w-60 items-center gap-3 rounded border border-[#575e64] bg-[#1f2123] p-4\"\n        >\n          <div\n            class=\"flex size-10 place-content-center place-items-center rounded-full bg-[#233057] text-lg font-medium text-[#9eb1ff]\"\n          >\n            <span>\n              {{ pet?.name?.slice(0, 1) || 'N' }}\n            </span>\n          </div>\n\n          <div>\n            <p class=\"text-sm font-bold text-white\">Name: {{ pet?.name || 'N/A' }}</p>\n\n            <p class=\"text-sm text-[#f1f7feb5]\">Category: {{ pet?.category?.name || 'N/A' }}</p>\n          </div>\n        </div>\n\n        <button\n          class=\"rounded bg-[#3e63dd] p-1 text-sm font-medium text-white\"\n          type=\"button\"\n          @click=\"setRandomPetId\"\n        >\n          Get Random Pet\n        </button>\n      </div>\n\n      <form class=\"flex flex-col gap-3\" @submit.prevent=\"handleAddPet\">\n        <div class=\"flex w-64 flex-col gap-1\">\n          <label class=\"font-medium text-white\" for=\"name\">Name</label>\n\n          <input\n            v-model=\"petInput.name\"\n            class=\"rounded border border-[#575e64] bg-[#121314] p-1 text-sm text-white placeholder:text-[#575e64]\"\n            name=\"name\"\n            placeholder=\"Kitty\"\n            required\n          />\n        </div>\n\n        <div class=\"flex w-64 flex-col gap-1\">\n          <label class=\"font-medium text-white\" for=\"category\">Category</label>\n\n          <input\n            v-model=\"petInput.category\"\n            class=\"rounded border border-[#575e64] bg-[#121314] p-1 text-sm text-white placeholder:text-[#575e64]\"\n            name=\"category\"\n            placeholder=\"Cats\"\n            required\n          />\n        </div>\n\n        <div class=\"flex gap-2\">\n          <button class=\"rounded bg-[#3e63dd] p-2 text-sm font-medium text-white\" type=\"submit\">\n            Add Pet\n          </button>\n\n          <button\n            class=\"rounded bg-[#3e63dd] p-2 text-sm font-medium text-white disabled:cursor-not-allowed\"\n            :disabled=\"!pet\"\n            type=\"button\"\n            @click=\"handleUpdatePet\"\n          >\n            Update Pet\n          </button>\n        </div>\n      </form>\n    </div>\n  </div>\n</template>\n"
  },
  {
    "path": "examples/openapi-ts-tanstack-vue-query/tailwind.config.ts",
    "content": "import type { Config } from 'tailwindcss';\n\nexport default {\n  content: ['./index.html', './src/**/*.{vue,js,ts,jsx,tsx}'],\n  theme: {\n    extend: {},\n  },\n} satisfies Config;\n"
  },
  {
    "path": "examples/openapi-ts-tanstack-vue-query/tsconfig.app.json",
    "content": "{\n  \"extends\": \"@vue/tsconfig/tsconfig.dom.json\",\n  \"include\": [\"./env.d.ts\", \"./src/**/*\", \"./src/**/*.vue\"],\n  \"exclude\": [\"./src/**/__tests__/*\"],\n  \"compilerOptions\": {\n    \"composite\": true,\n    \"tsBuildInfoFile\": \"./node_modules/.tmp/tsconfig.app.tsbuildinfo\",\n\n    \"baseUrl\": \".\",\n    \"paths\": {\n      \"@/*\": [\"./src/*\"]\n    }\n  }\n}\n"
  },
  {
    "path": "examples/openapi-ts-tanstack-vue-query/tsconfig.json",
    "content": "{\n  \"files\": [],\n  \"references\": [\n    {\n      \"path\": \"./tsconfig.node.json\"\n    },\n    {\n      \"path\": \"./tsconfig.app.json\"\n    },\n    {\n      \"path\": \"./tsconfig.vitest.json\"\n    }\n  ]\n}\n"
  },
  {
    "path": "examples/openapi-ts-tanstack-vue-query/tsconfig.node.json",
    "content": "{\n  \"extends\": \"@tsconfig/node24/tsconfig.json\",\n  \"include\": [\n    \"vite.config.*\",\n    \"vitest.config.*\",\n    \"cypress.config.*\",\n    \"nightwatch.conf.*\",\n    \"playwright.config.*\"\n  ],\n  \"compilerOptions\": {\n    \"composite\": true,\n    \"noEmit\": true,\n    \"tsBuildInfoFile\": \"./node_modules/.tmp/tsconfig.node.tsbuildinfo\",\n\n    \"module\": \"ESNext\",\n    \"moduleResolution\": \"Bundler\",\n    \"types\": [\"node\"]\n  }\n}\n"
  },
  {
    "path": "examples/openapi-ts-tanstack-vue-query/tsconfig.vitest.json",
    "content": "{\n  \"extends\": \"./tsconfig.app.json\",\n  \"exclude\": [],\n  \"compilerOptions\": {\n    \"composite\": true,\n    \"tsBuildInfoFile\": \"./node_modules/.tmp/tsconfig.vitest.tsbuildinfo\",\n\n    \"lib\": [],\n    \"types\": [\"node\", \"jsdom\"]\n  }\n}\n"
  },
  {
    "path": "examples/openapi-ts-tanstack-vue-query/vite.config.ts",
    "content": "import { fileURLToPath, URL } from 'node:url';\n\nimport vue from '@vitejs/plugin-vue';\nimport vueJsx from '@vitejs/plugin-vue-jsx';\nimport vueDevTools from 'vite-plugin-vue-devtools';\n\n/** @type {import('vite').UserConfig} */\nexport default {\n  build: {\n    sourcemap: true,\n    target: 'esnext',\n  },\n  esbuild: {\n    target: 'esnext',\n  },\n  optimizeDeps: {\n    esbuildOptions: {\n      target: 'esnext',\n    },\n  },\n  plugins: [vue(), vueJsx(), vueDevTools()],\n  resolve: {\n    alias: {\n      '@': fileURLToPath(new URL('./src', import.meta.url)),\n    },\n  },\n};\n"
  },
  {
    "path": "examples/openapi-ts-tanstack-vue-query/vitest.config.ts",
    "content": "import { configDefaults, defineProject, mergeConfig } from 'vitest/config';\n\nimport viteConfig from './vite.config';\n\nexport default mergeConfig(\n  viteConfig,\n  defineProject({\n    test: {\n      environment: 'jsdom',\n      exclude: [...configDefaults.exclude, 'e2e/**'],\n    },\n  }),\n);\n"
  },
  {
    "path": "lint-staged.config.js",
    "content": "export default {\n  '*': ['pnpm format', 'pnpm lint:fix'],\n};\n"
  },
  {
    "path": "package.json",
    "content": "{\n  \"name\": \"openapi-ts-monorepo\",\n  \"version\": \"0.1.0\",\n  \"private\": true,\n  \"description\": \"Public @hey-api monorepo\",\n  \"homepage\": \"https://heyapi.dev\",\n  \"bugs\": {\n    \"url\": \"https://github.com/hey-api/openapi-ts/issues\"\n  },\n  \"license\": \"MIT\",\n  \"author\": {\n    \"name\": \"Hey API\",\n    \"email\": \"lubos@heyapi.dev\",\n    \"url\": \"https://heyapi.dev\"\n  },\n  \"repository\": {\n    \"type\": \"git\",\n    \"url\": \"git+https://github.com/hey-api/openapi-ts.git\"\n  },\n  \"funding\": \"https://github.com/sponsors/hey-api\",\n  \"type\": \"module\",\n  \"scripts\": {\n    \"build\": \"turbo run build\",\n    \"changeset\": \"changeset\",\n    \"examples:check\": \"sh ./scripts/examples-check.sh\",\n    \"examples:generate\": \"sh ./scripts/examples-generate.sh\",\n    \"format\": \"oxfmt .\",\n    \"format:next\": \"oxfmt . && uv run ruff format packages/openapi-python/src/py-compiler/__snapshots__\",\n    \"lint\": \"oxfmt --check . && eslint .\",\n    \"lint:next\": \"oxfmt --check . && eslint . && uv run ruff check packages/openapi-python/src/py-compiler/__snapshots__\",\n    \"lint:fix\": \"oxfmt . && eslint . --fix\",\n    \"lint:fix:next\": \"oxfmt . && eslint . --fix && uv run ruff check --fix packages/openapi-python/src/py-compiler/__snapshots__\",\n    \"prepare\": \"husky\",\n    \"test:changelog\": \"vitest run __tests__/*.test.ts\",\n    \"test:changelog:watch\": \"vitest watch __tests__/*.test.ts\",\n    \"test:coverage\": \"turbo run build && vitest run --coverage\",\n    \"test:update\": \"turbo run build && vitest watch --update\",\n    \"test:watch\": \"turbo run build && vitest watch\",\n    \"test\": \"turbo run build && vitest\",\n    \"typecheck\": \"turbo run typecheck\",\n    \"td\": \"turbo run dev --filter\",\n    \"tt\": \"turbo run build && vitest run --project\",\n    \"tw\": \"turbo run build && vitest watch --project\",\n    \"tu\": \"turbo run build && vitest watch --update --project\",\n    \"tb\": \"turbo run build --filter\",\n    \"ty\": \"turbo run typecheck --filter\",\n    \"dev:ts\": \"cd dev && HEYAPI_CODEGEN_ENV=development tsx watch --clear-screen=false ../packages/openapi-ts/src/run.ts\",\n    \"dev:py\": \"cd dev && HEYAPI_CODEGEN_ENV=development tsx watch --clear-screen=false ../packages/openapi-python/src/run.ts\"\n  },\n  \"devDependencies\": {\n    \"@arethetypeswrong/cli\": \"0.18.2\",\n    \"@changesets/cli\": \"2.30.0\",\n    \"@changesets/get-github-info\": \"0.8.0\",\n    \"@changesets/parse\": \"0.4.3\",\n    \"@changesets/types\": \"6.1.0\",\n    \"@eslint/js\": \"9.39.2\",\n    \"@hey-api/custom-client\": \"workspace:*\",\n    \"@hey-api/openapi-ts\": \"workspace:*\",\n    \"@types/node\": \"24.10.10\",\n    \"@typescript-eslint/eslint-plugin\": \"8.54.0\",\n    \"@typescript/native-preview\": \"7.0.0-dev.20260315.1\",\n    \"@vitest/coverage-v8\": \"4.1.0\",\n    \"eslint\": \"9.39.2\",\n    \"eslint-plugin-simple-import-sort\": \"12.1.1\",\n    \"eslint-plugin-sort-destructure-keys\": \"3.0.0\",\n    \"eslint-plugin-sort-keys-fix\": \"1.1.2\",\n    \"eslint-plugin-typescript-sort-keys\": \"3.3.0\",\n    \"eslint-plugin-vue\": \"10.7.0\",\n    \"globals\": \"17.4.0\",\n    \"husky\": \"9.1.7\",\n    \"lint-staged\": \"16.4.0\",\n    \"oxfmt\": \"0.40.0\",\n    \"tsdown\": \"0.21.3\",\n    \"tsx\": \"4.21.0\",\n    \"turbo\": \"2.8.17\",\n    \"typescript\": \"5.9.3\",\n    \"typescript-eslint\": \"8.54.0\",\n    \"vitest\": \"4.1.0\"\n  },\n  \"engines\": {\n    \"node\": \">=20.19.0\"\n  },\n  \"packageManager\": \"pnpm@10.32.1\"\n}\n"
  },
  {
    "path": "packages/codegen-core/.gitignore",
    "content": ".DS_Store\n.idea\n.tmp\n.tsdown\nlogs\nnode_modules\ntemp\n\n.env\ncoverage\ndist\n\n# test files\n.gen\n"
  },
  {
    "path": "packages/codegen-core/CHANGELOG.md",
    "content": "# @hey-api/codegen-core\n\n## 0.7.4\n\n### Patch Changes\n\n- **planner**: language-aware declaration sharing check ([#3606](https://github.com/hey-api/openapi-ts/pull/3606)) ([`86c7115`](https://github.com/hey-api/openapi-ts/commit/86c71151671b00821746659fa3be715224a28894)) by [@mrlubos](https://github.com/mrlubos)\n\n## 0.7.3\n\n### Patch Changes\n\n- **internal**: remove TypeScript from peer dependencies ([#3566](https://github.com/hey-api/openapi-ts/pull/3566)) ([`b5f1e4b`](https://github.com/hey-api/openapi-ts/commit/b5f1e4b5f64cbf0bad2eff888177ac9c1881ba3e)) by [@mrlubos](https://github.com/mrlubos)\n\n### Updated Dependencies:\n\n- @hey-api/types@0.1.4\n\n## 0.7.2\n\n### Patch Changes\n\n- **log**: make group optional in warn method ([#3540](https://github.com/hey-api/openapi-ts/pull/3540)) ([`0512650`](https://github.com/hey-api/openapi-ts/commit/0512650988ce3c411492172e6bbe300f5440408f)) by [@mrlubos](https://github.com/mrlubos)\n\n## 0.7.1\n\n### Patch Changes\n\n- **internal**: log symbol meta if name is falsy ([#3448](https://github.com/hey-api/openapi-ts/pull/3448)) ([`c50f7bc`](https://github.com/hey-api/openapi-ts/commit/c50f7bcf5676f2783a412288d243aeaeabd9f8bd)) by [@mrlubos](https://github.com/mrlubos)\n\n## 0.7.0\n\n### Minor Changes\n\n- **BREAKING:** **symbol**: replace `exportFrom` array with `getExportFromFilePath()` function ([#3322](https://github.com/hey-api/openapi-ts/pull/3322)) ([`bfd43ec`](https://github.com/hey-api/openapi-ts/commit/bfd43ec6d638bfc97b6905dd9dee2c911ccea3e0)) by [@mrlubos](https://github.com/mrlubos)\n\n### Updated Symbol interface\n\nThe `exportFrom` property has been replaced with the `getExportFromFilePath()` function. This allows you to dynamically determine export paths based on symbol properties. This is a low-level feature, so you're most likely unaffected.\n\n## 0.6.1\n\n### Patch Changes\n\n- **planner**: fix duplicate import when same symbol is imported as both type and value ([#3291](https://github.com/hey-api/openapi-ts/pull/3291)) ([`3c08e38`](https://github.com/hey-api/openapi-ts/commit/3c08e38b4daa5c1f4829bdfb7f088d73b0e0f1f1)) by [@copilot-swe-agent](https://github.com/apps/copilot-swe-agent)\n\n## 0.6.0\n\n### Minor Changes\n\n- **BREAKING**: Drop CommonJS (CJS) support. This package is now **ESM-only**. ([#3251](https://github.com/hey-api/openapi-ts/pull/3251)) ([`7f19d59`](https://github.com/hey-api/openapi-ts/commit/7f19d5921dadfa96ecae84a5298b7aee1daee56d)) by [@mrlubos](https://github.com/mrlubos)\n\n### Removed CommonJS (CJS) support\n\n`@hey-api/codegen-core` is now ESM-only. This change simplifies the codebase, improves tree-shaking, and enables better integration with modern bundlers and TypeScript tooling.\n\nCommonJS entry points (`require()`, `module.exports`) are no longer supported. If you are in a CJS environment, you can still load the package dynamically using `import()` like:\n\n```js\nconst { Project } = await import(\"@hey-api/codegen-core\");\n```\n\nIf you have previously written:\n\n```js\nconst { Project } = require(\"@hey-api/codegen-core\");\n```\n\nMigrate by updating your static imports:\n\n```js\nimport { Project } from \"@hey-api/codegen-core\";\n```\n\nIf your environment cannot use ESM, pin to a previous version.\n\n### Patch Changes\n\n### Updated Dependencies:\n\n- @hey-api/types@0.1.3\n\n## 0.5.5\n\n### Patch Changes\n\n- **config**: export `loadConfigFile` function (moved from `@hey-api/openapi-ts`) ([#3244](https://github.com/hey-api/openapi-ts/pull/3244)) ([`4f52bce`](https://github.com/hey-api/openapi-ts/commit/4f52bce79d8ac6573472f32a05b7f70913b90605)) by [@mrlubos](https://github.com/mrlubos)\n\n### Updated Dependencies:\n\n- @hey-api/types@0.1.2\n\n## 0.5.4\n\n### Patch Changes\n\n- **internal**: move logger to codegen-core ([#3235](https://github.com/hey-api/openapi-ts/pull/3235)) ([`88532f0`](https://github.com/hey-api/openapi-ts/commit/88532f01200e1111818e82a4af7bd5cf8cf26e3b)) by [@mrlubos](https://github.com/mrlubos)\n\n## 0.5.3\n\n### Patch Changes\n\n- **deps**: move @hey-api/types to dependencies to fix broken types ([#3232](https://github.com/hey-api/openapi-ts/pull/3232)) ([`edfce48`](https://github.com/hey-api/openapi-ts/commit/edfce4875cb9279d3ab8bfd438ff177e8ba7845c)) by [@mrlubos](https://github.com/mrlubos)\n\n## 0.5.2\n\n### Patch Changes\n\n- **build**: do not minify bundles for better code readability and debugging ([#3186](https://github.com/hey-api/openapi-ts/pull/3186)) ([`4d46130`](https://github.com/hey-api/openapi-ts/commit/4d46130b53d9d8d5d3c178343a1b4fc3645b2628)) by [@copilot-swe-agent](https://github.com/apps/copilot-swe-agent)\n\n## 0.5.1\n\n### Patch Changes\n\n- **project**: expose `.plan()` method ([#3175](https://github.com/hey-api/openapi-ts/pull/3175)) ([`b985053`](https://github.com/hey-api/openapi-ts/commit/b985053ffa64accc4ff01b7c0f301bb5cd84ff48)) by [@mrlubos](https://github.com/mrlubos)\n\n## 0.5.0\n\n### Minor Changes\n\n- **core**: Structure API ([#3109](https://github.com/hey-api/openapi-ts/pull/3109)) ([`815a3de`](https://github.com/hey-api/openapi-ts/commit/815a3de0af434c28ac6d13ff92b85ce1fc146999)) by [@mrlubos](https://github.com/mrlubos)\n\n### Patch Changes\n\n- **types**: document default values for `importKind` and `kind` ([#3147](https://github.com/hey-api/openapi-ts/pull/3147)) ([`ab80a4b`](https://github.com/hey-api/openapi-ts/commit/ab80a4b2c37423c522aa864afbcb688db76615ba)) by [@mrlubos](https://github.com/mrlubos)\n\n- **fix**: simplify symbol merging logic ([#3169](https://github.com/hey-api/openapi-ts/pull/3169)) ([`77bf81a`](https://github.com/hey-api/openapi-ts/commit/77bf81a13e49a13b6d052ef81e663df0f3b60b5a)) by [@mrlubos](https://github.com/mrlubos)\n\n## 0.4.0\n\n### Minor Changes\n\n- **symbols**: remove `placeholder` property ([#2990](https://github.com/hey-api/openapi-ts/pull/2990)) ([`c3a81e8`](https://github.com/hey-api/openapi-ts/commit/c3a81e89ba5ed3f373409582c5f814e1d10cae06)) by [@mrlubos](https://github.com/mrlubos)\n\n## 0.3.3\n\n### Patch Changes\n\n- fix: remove most of readonly properties to allow mutating in place ([#2919](https://github.com/hey-api/openapi-ts/pull/2919)) ([`34ee973`](https://github.com/hey-api/openapi-ts/commit/34ee973be30a9cbc66fd8463fe6f5961db0f3d37)) by [@mrlubos](https://github.com/mrlubos)\n\n- fix: update types ([#2909](https://github.com/hey-api/openapi-ts/pull/2909)) ([`d9dd389`](https://github.com/hey-api/openapi-ts/commit/d9dd38927ce5c7901ce46bfe439454935b2053fa)) by [@mrlubos](https://github.com/mrlubos)\n\n## 0.3.2\n\n### Patch Changes\n\n- feat: add `.query()` method to symbol registry ([#2873](https://github.com/hey-api/openapi-ts/pull/2873)) ([`1cfc8f2`](https://github.com/hey-api/openapi-ts/commit/1cfc8f2b4673b53e0b1fff43f3d2078dcd595ca2)) by [@mrlubos](https://github.com/mrlubos)\n\n## 0.3.1\n\n### Patch Changes\n\n- feat: add `isRegistered()` method to file and symbol registry ([#2812](https://github.com/hey-api/openapi-ts/pull/2812)) ([`022f7dd`](https://github.com/hey-api/openapi-ts/commit/022f7dd0bcb74d2da855f393e2175645aa670351)) by [@mrlubos](https://github.com/mrlubos)\n\n## 0.3.0\n\n### Minor Changes\n\n- feat: bump minimum Node version to 20.19.0 ([#2775](https://github.com/hey-api/openapi-ts/pull/2775)) ([`7c7702a`](https://github.com/hey-api/openapi-ts/commit/7c7702a9ed3bda0d75ef28d35d4284e3b6318b26)) by [@mrlubos](https://github.com/mrlubos)\n\n## 0.2.0\n\n### Minor Changes\n\n- feat: Symbol API ([#2664](https://github.com/hey-api/openapi-ts/pull/2664)) ([`e1ede9c`](https://github.com/hey-api/openapi-ts/commit/e1ede9cabf52b5bbcb9195570deff58db8f43dbb)) by [@mrlubos](https://github.com/mrlubos)\n\n## 0.1.0\n\n### Minor Changes\n\n- feat: expand Symbol API ([#2582](https://github.com/hey-api/openapi-ts/pull/2582)) ([`10aea89`](https://github.com/hey-api/openapi-ts/commit/10aea8910771ff72ef9b08d4eacdd6b028833c4c)) by [@mrlubos](https://github.com/mrlubos)\n\n## 0.0.1\n\n### Patch Changes\n\n- feat: initial release\n"
  },
  {
    "path": "packages/codegen-core/LICENSE.md",
    "content": "MIT License\n\nCopyright (c) Hey API\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n"
  },
  {
    "path": "packages/codegen-core/README.md",
    "content": "<div align=\"center\">\n  <h1 align=\"center\"><b>Codegen Core</b></h1>\n  <p align=\"center\">🧱 TypeScript framework for generating files.</p>\n</div>\n\n<br/>\n\n<p align=\"center\">\n  <a href=\"https://opensource.org/license/mit\" rel=\"nofollow\"><img src=\"https://img.shields.io/github/license/hey-api/openapi-ts\" alt=\"MIT License\"></a>\n  <a href=\"https://github.com/hey-api/openapi-ts/actions?query=branch%3Amain\"><img src=\"https://github.com/hey-api/openapi-ts/actions/workflows/ci.yml/badge.svg?event=push&branch=main\" alt=\"CI status\" /></a>\n</p>\n\n## Notice\n\nThis is an internal framework. Visit [Hey API](https://heyapi.dev/) to discover our products.\n\n## License\n\nReleased under the [MIT License](https://github.com/hey-api/openapi-ts/blob/main/LICENSE.md).\n"
  },
  {
    "path": "packages/codegen-core/package.json",
    "content": "{\n  \"name\": \"@hey-api/codegen-core\",\n  \"version\": \"0.7.4\",\n  \"description\": \"🧱 TypeScript framework for generating files.\",\n  \"keywords\": [\n    \"codegen\",\n    \"generator\",\n    \"javascript\",\n    \"node\",\n    \"typescript\"\n  ],\n  \"homepage\": \"https://heyapi.dev/\",\n  \"bugs\": {\n    \"url\": \"https://github.com/hey-api/openapi-ts/issues\"\n  },\n  \"license\": \"MIT\",\n  \"author\": {\n    \"name\": \"Hey API\",\n    \"email\": \"lubos@heyapi.dev\",\n    \"url\": \"https://heyapi.dev\"\n  },\n  \"repository\": {\n    \"type\": \"git\",\n    \"url\": \"git+https://github.com/hey-api/openapi-ts.git\"\n  },\n  \"funding\": \"https://github.com/sponsors/hey-api\",\n  \"files\": [\n    \"dist\",\n    \"LICENSE.md\",\n    \"README.md\"\n  ],\n  \"type\": \"module\",\n  \"main\": \"./dist/index.mjs\",\n  \"types\": \"./dist/index.d.mts\",\n  \"exports\": {\n    \".\": {\n      \"types\": \"./dist/index.d.mts\",\n      \"import\": \"./dist/index.mjs\"\n    },\n    \"./package.json\": \"./package.json\"\n  },\n  \"scripts\": {\n    \"build\": \"tsdown && pnpm check-exports\",\n    \"check-exports\": \"attw --pack . --profile esm-only --ignore-rules cjs-resolves-to-esm\",\n    \"dev\": \"tsdown --watch\",\n    \"prepublishOnly\": \"pnpm build\",\n    \"typecheck\": \"tsgo --noEmit\"\n  },\n  \"dependencies\": {\n    \"@hey-api/types\": \"workspace:*\",\n    \"ansi-colors\": \"4.1.3\",\n    \"c12\": \"3.3.3\",\n    \"color-support\": \"1.1.3\"\n  },\n  \"devDependencies\": {\n    \"eslint\": \"9.39.1\",\n    \"typescript\": \"5.9.3\"\n  },\n  \"engines\": {\n    \"node\": \">=20.19.0\"\n  }\n}\n"
  },
  {
    "path": "packages/codegen-core/src/__tests__/data/file.ts",
    "content": "/* @ts-nocheck */\n\ntype _heyapi_5_ = string;\ntype _heyapi_4_ = () => _heyapi_5_;\n\n/**\n * something about _heyapi_1_. Did you know that __heyapi_1__?\n */\nexport class _heyapi_1_ {\n  // _heyapi_1_ is great!\n  _heyapi_2_(_heyapi_12_: ReturnType<_heyapi_4_>): _heyapi_5_ {\n    return _heyapi_12_;\n  }\n}\n"
  },
  {
    "path": "packages/codegen-core/src/__tests__/exports.test.ts",
    "content": "import * as index from '../index';\n\nconst constExports = [\n  'defaultExtensions',\n  'defaultModuleEntryNames',\n  'defaultNameConflictResolvers',\n  'File',\n  'fromRef',\n  'fromRefs',\n  'detectInteractiveSession',\n  'isNode',\n  'isNodeRef',\n  'isRef',\n  'isSymbol',\n  'isSymbolRef',\n  'loadConfigFile',\n  'log',\n  'Logger',\n  'mergeConfigs',\n  'nodeBrand',\n  'Project',\n  'ref',\n  'refs',\n  'simpleNameConflictResolver',\n  'Symbol',\n  'symbolBrand',\n  'underscoreNameConflictResolver',\n];\n\n// Type-level test: will fail to compile if any type export is missing or renamed\nexport type _TypeExports = [\n  index.AnalysisContext,\n  index.BindingKind,\n  index.ExportMember,\n  index.ExportModule,\n  index.Extensions,\n  index.File,\n  index.FileIn,\n  index.FromRef<any>,\n  index.FromRefs<any>,\n  index.ImportMember,\n  index.ImportModule,\n  index.IProject,\n  index.Language,\n  index.ModuleEntryNames,\n  index.NameConflictResolver,\n  index.NameConflictResolvers,\n  index.Node,\n  index.NodeName,\n  index.NodeNameSanitizer,\n  index.NodeRelationship,\n  index.NodeScope,\n  index.Output,\n  index.Project,\n  index.ProjectRenderMeta,\n  index.Ref<any>,\n  index.Refs<any>,\n  index.RenderContext,\n  index.Renderer,\n  index.StructureInsert,\n  index.StructureItem,\n  index.StructureLocation,\n  index.StructureModel,\n  index.StructureNode,\n  index.StructureShell,\n  index.StructureShellResult,\n  index.Symbol,\n  index.SymbolIdentifier,\n  index.SymbolIn,\n  index.SymbolMeta,\n];\n\ndescribe('index exports', () => {\n  it('should export all expected symbols', () => {\n    for (const key of constExports) {\n      expect(index).toHaveProperty(key);\n    }\n  });\n});\n"
  },
  {
    "path": "packages/codegen-core/src/__tests__/files.test.ts",
    "content": "import { File } from '../files/file';\nimport { FileRegistry } from '../files/registry';\n\nconst mockProject = {} as any;\n\ndescribe('FileRegistry', () => {\n  it('register() creates a new File with incrementing id', () => {\n    const registry = new FileRegistry(mockProject);\n\n    const f1 = registry.register({\n      language: 'typescript',\n      logicalFilePath: 'foo.ts',\n    });\n    const f2 = registry.register({\n      language: 'typescript',\n      logicalFilePath: 'bar.ts',\n    });\n\n    expect(f1).toBeInstanceOf(File);\n    expect(f2).toBeInstanceOf(File);\n    expect(f2.id).toBe(f1.id + 1);\n  });\n\n  it('register() updates name if file already exists', () => {\n    const registry = new FileRegistry(mockProject);\n\n    const f1 = registry.register({\n      language: 'typescript',\n      logicalFilePath: 'dup.ts',\n      name: 'First',\n    });\n    const f2 = registry.register({\n      language: 'typescript',\n      logicalFilePath: 'dup.ts',\n      name: 'Second',\n    });\n\n    expect(f1).toBe(f2); // same File instance\n    expect(f1.name).toBe('Second'); // name updated\n  });\n\n  it('get() returns the registered File or undefined', () => {\n    const registry = new FileRegistry(mockProject);\n\n    const f = registry.register({ language: 'ts', logicalFilePath: 'get.ts' });\n\n    expect(registry.get({ language: 'ts', logicalFilePath: 'get.ts' })).toBe(f);\n    expect(registry.get({ language: 'ts', logicalFilePath: 'missing.ts' })).toBeUndefined();\n  });\n\n  it('isRegistered() returns true only for existing files', () => {\n    const registry = new FileRegistry(mockProject);\n\n    registry.register({ language: 'ts', logicalFilePath: 'check.ts' });\n\n    expect(registry.isRegistered({ language: 'ts', logicalFilePath: 'check.ts' })).toBe(true);\n    expect(registry.isRegistered({ language: 'ts', logicalFilePath: 'other.ts' })).toBe(false);\n  });\n\n  it('registered() iterates over all files', () => {\n    const registry = new FileRegistry(mockProject);\n\n    const files = [\n      registry.register({ language: 'ts', logicalFilePath: 'a.ts' }),\n      registry.register({ language: 'ts', logicalFilePath: 'b.ts' }),\n    ];\n\n    const iterated = [...registry.registered()];\n    expect(iterated).toEqual(files);\n  });\n\n  it('handles external flag in key generation', () => {\n    const registry = new FileRegistry(mockProject);\n\n    const f1 = registry.register({\n      external: true,\n      language: 'ts',\n      logicalFilePath: 'ext.ts',\n    });\n    const f2 = registry.register({\n      external: false,\n      language: 'ts',\n      logicalFilePath: 'ext.ts',\n    });\n\n    expect(f1).not.toBe(f2);\n    expect(\n      registry.isRegistered({\n        external: true,\n        language: 'ts',\n        logicalFilePath: 'ext.ts',\n      }),\n    ).toBe(true);\n    expect(\n      registry.isRegistered({\n        external: false,\n        language: 'ts',\n        logicalFilePath: 'ext.ts',\n      }),\n    ).toBe(true);\n  });\n\n  it('language influences key generation', () => {\n    const registry = new FileRegistry(mockProject);\n\n    const tsFile = registry.register({\n      language: 'ts',\n      logicalFilePath: 'file',\n    });\n    const jsFile = registry.register({\n      language: 'js',\n      logicalFilePath: 'file',\n    });\n\n    expect(tsFile).not.toBe(jsFile);\n    expect(registry.isRegistered({ language: 'ts', logicalFilePath: 'file' })).toBe(true);\n    expect(registry.isRegistered({ language: 'js', logicalFilePath: 'file' })).toBe(true);\n  });\n});\n"
  },
  {
    "path": "packages/codegen-core/src/__tests__/logger.test.ts",
    "content": "import { Logger } from '../logger';\n\ndescribe('Logger', () => {\n  describe('report', () => {\n    it('should handle unended events gracefully', () => {\n      const logger = new Logger();\n\n      // Create an event but don't end it\n      logger.timeEvent('test-event-1');\n\n      // Create another event and end it\n      const event2 = logger.timeEvent('test-event-2');\n      event2.timeEnd();\n\n      // report() should not throw even though event1 was never ended\n      expect(() => logger.report(false)).not.toThrow();\n\n      const measure = logger.report(false);\n      expect(measure).toBeDefined();\n      expect(measure?.duration).toBeGreaterThanOrEqual(0);\n    });\n\n    it('should handle nested unended events', () => {\n      const logger = new Logger();\n\n      const parent = logger.timeEvent('parent');\n      logger.timeEvent('child1');\n      // Don't end child1\n\n      const child2 = logger.timeEvent('child2');\n      child2.timeEnd();\n\n      parent.timeEnd();\n\n      // report() should not throw even though child1 was never ended\n      expect(() => logger.report(false)).not.toThrow();\n\n      const measure = logger.report(false);\n      expect(measure).toBeDefined();\n    });\n\n    it('should handle all events properly ended', () => {\n      const logger = new Logger();\n\n      const event1 = logger.timeEvent('event1');\n      const event2 = logger.timeEvent('event2');\n\n      event1.timeEnd();\n      event2.timeEnd();\n\n      expect(() => logger.report(false)).not.toThrow();\n\n      const measure = logger.report(false);\n      expect(measure).toBeDefined();\n      expect(measure?.duration).toBeGreaterThanOrEqual(0);\n    });\n\n    it('should return undefined when no events exist', () => {\n      const logger = new Logger();\n\n      const measure = logger.report(false);\n      expect(measure).toBeUndefined();\n    });\n  });\n});\n"
  },
  {
    "path": "packages/codegen-core/src/__tests__/planner.test.ts",
    "content": "import type { INode } from '../nodes/node';\nimport { Project } from '../project/project';\nimport { ref } from '../refs/refs';\nimport type { Symbol } from '../symbols/symbol';\nimport type { SymbolKind } from '../symbols/types';\n\n/**\n * Creates a mock node for testing.\n */\nconst createMockNode = (args: {\n  dependencies?: Array<Symbol>;\n  filePath: string;\n  language?: 'typescript' | 'javascript';\n  name: string;\n  project: Project;\n  symbolKind?: SymbolKind;\n}): { node: INode; symbol: Symbol } => {\n  const {\n    dependencies = [],\n    filePath,\n    language = 'typescript',\n    name,\n    project,\n    symbolKind = 'var',\n  } = args;\n\n  const symbol = project.symbols.register({\n    exported: true,\n    getFilePath: () => filePath,\n    kind: symbolKind,\n    name,\n  });\n\n  const node: INode = {\n    analyze: (ctx) => {\n      for (const dep of dependencies) {\n        ctx.addDependency(ref(dep));\n      }\n    },\n    clone() {\n      return this;\n    },\n    exported: true,\n    language,\n    name: ref(name) as INode['name'],\n    scope: 'value',\n    symbol,\n    toAst: () => ({}),\n    '~brand': 'test-node',\n  };\n\n  symbol.setNode(node);\n  project.nodes.add(node);\n\n  return { node, symbol };\n};\n\ndescribe('Planner imports deduplication', () => {\n  it('produces a single value import when there is 1 imported symbol as value', () => {\n    const project = new Project({ root: '/root' });\n\n    // Create source file with exported symbol\n    const { symbol: sourceSymbol } = createMockNode({\n      filePath: 'source',\n      name: 'MyValue',\n      project,\n      symbolKind: 'var',\n    });\n\n    // Create consumer file that imports the source symbol as value\n    createMockNode({\n      dependencies: [sourceSymbol],\n      filePath: 'consumer',\n      name: 'Consumer',\n      project,\n    });\n\n    project.plan();\n\n    const consumerFile = [...project.files.registered()].find((f) => f.name === 'consumer');\n    expect(consumerFile).toBeDefined();\n\n    const imports = consumerFile!.imports;\n    expect(imports).toHaveLength(1);\n    expect(imports[0]!.imports).toHaveLength(1);\n    expect(imports[0]!.imports[0]!.isTypeOnly).toBe(false);\n    expect(imports[0]!.imports[0]!.localName).toBe('MyValue');\n  });\n\n  it('produces a single type import when there is 1 imported symbol as type', () => {\n    const project = new Project({ root: '/root' });\n\n    // Create source file with exported type symbol\n    const { symbol: sourceSymbol } = createMockNode({\n      filePath: 'source',\n      name: 'MyType',\n      project,\n      symbolKind: 'type',\n    });\n\n    // Create consumer file that imports the source symbol as type\n    createMockNode({\n      dependencies: [sourceSymbol],\n      filePath: 'consumer',\n      name: 'Consumer',\n      project,\n    });\n\n    project.plan();\n\n    const consumerFile = [...project.files.registered()].find((f) => f.name === 'consumer');\n    expect(consumerFile).toBeDefined();\n\n    const imports = consumerFile!.imports;\n    expect(imports).toHaveLength(1);\n    expect(imports[0]!.imports).toHaveLength(1);\n    expect(imports[0]!.imports[0]!.isTypeOnly).toBe(true);\n    expect(imports[0]!.imports[0]!.localName).toBe('MyType');\n  });\n\n  it('produces a single value import when there are 2 imported symbols as values with same name', () => {\n    const project = new Project({ root: '/root' });\n\n    // Create source file with exported symbol\n    const { symbol: sourceSymbol } = createMockNode({\n      filePath: 'source',\n      name: 'MyValue',\n      project,\n      symbolKind: 'var',\n    });\n\n    // Create consumer file that imports the source symbol twice as value\n    const consumerSymbol = project.symbols.register({\n      exported: true,\n      getFilePath: () => 'consumer',\n      kind: 'var',\n      name: 'Consumer',\n    });\n    const consumerNode: INode = {\n      analyze: (ctx) => {\n        ctx.addDependency(ref(sourceSymbol));\n        ctx.addDependency(ref(sourceSymbol));\n      },\n      clone() {\n        return this;\n      },\n      exported: true,\n      language: 'typescript',\n      name: ref('Consumer') as INode['name'],\n      scope: 'value',\n      symbol: consumerSymbol,\n      toAst: () => ({}),\n      '~brand': 'test-node',\n    };\n    consumerSymbol.setNode(consumerNode);\n    project.nodes.add(consumerNode);\n\n    project.plan();\n\n    const consumerFile = [...project.files.registered()].find((f) => f.name === 'consumer');\n    expect(consumerFile).toBeDefined();\n\n    const imports = consumerFile!.imports;\n    expect(imports).toHaveLength(1);\n    expect(imports[0]!.imports).toHaveLength(1);\n    expect(imports[0]!.imports[0]!.isTypeOnly).toBe(false);\n    expect(imports[0]!.imports[0]!.localName).toBe('MyValue');\n  });\n\n  it('produces a single type import when there are 2 imported symbols as types with same name', () => {\n    const project = new Project({ root: '/root' });\n\n    // Create source file with exported type symbol\n    const { symbol: sourceSymbol } = createMockNode({\n      filePath: 'source',\n      name: 'MyType',\n      project,\n      symbolKind: 'type',\n    });\n\n    // Create consumer file that imports the source symbol twice as type\n    const consumerSymbol = project.symbols.register({\n      exported: true,\n      getFilePath: () => 'consumer',\n      kind: 'var',\n      name: 'Consumer',\n    });\n    const consumerNode: INode = {\n      analyze: (ctx) => {\n        ctx.addDependency(ref(sourceSymbol));\n        ctx.addDependency(ref(sourceSymbol));\n      },\n      clone() {\n        return this;\n      },\n      exported: true,\n      language: 'typescript',\n      name: ref('Consumer') as INode['name'],\n      scope: 'value',\n      symbol: consumerSymbol,\n      toAst: () => ({}),\n      '~brand': 'test-node',\n    };\n    consumerSymbol.setNode(consumerNode);\n    project.nodes.add(consumerNode);\n\n    project.plan();\n\n    const consumerFile = [...project.files.registered()].find((f) => f.name === 'consumer');\n    expect(consumerFile).toBeDefined();\n\n    const imports = consumerFile!.imports;\n    expect(imports).toHaveLength(1);\n    expect(imports[0]!.imports).toHaveLength(1);\n    expect(imports[0]!.imports[0]!.isTypeOnly).toBe(true);\n    expect(imports[0]!.imports[0]!.localName).toBe('MyType');\n  });\n\n  it('produces a single value import when there are 2 imported symbols, 1 as type and 1 as value, with same name', () => {\n    const project = new Project({ root: '/root' });\n\n    // Create source file with exported type symbol\n    const { symbol: typeSymbol } = createMockNode({\n      filePath: 'source',\n      name: 'MySymbol',\n      project,\n      symbolKind: 'type',\n    });\n\n    // Create source file with exported value symbol with same name\n    const { symbol: valueSymbol } = createMockNode({\n      filePath: 'source',\n      name: 'MySymbol',\n      project,\n      symbolKind: 'var',\n    });\n\n    // Create consumer file that imports both symbols (type and value with same name)\n    const consumerSymbol = project.symbols.register({\n      exported: true,\n      getFilePath: () => 'consumer',\n      kind: 'var',\n      name: 'Consumer',\n    });\n    const consumerNode: INode = {\n      analyze: (ctx) => {\n        ctx.addDependency(ref(typeSymbol));\n        ctx.addDependency(ref(valueSymbol));\n      },\n      clone() {\n        return this;\n      },\n      exported: true,\n      language: 'typescript',\n      name: ref('Consumer') as INode['name'],\n      scope: 'value',\n      symbol: consumerSymbol,\n      toAst: () => ({}),\n      '~brand': 'test-node',\n    };\n    consumerSymbol.setNode(consumerNode);\n    project.nodes.add(consumerNode);\n\n    project.plan();\n\n    const consumerFile = [...project.files.registered()].find((f) => f.name === 'consumer');\n    expect(consumerFile).toBeDefined();\n\n    const imports = consumerFile!.imports;\n    expect(imports).toHaveLength(1);\n    expect(imports[0]!.imports).toHaveLength(1);\n    expect(imports[0]!.imports[0]!.isTypeOnly).toBe(false);\n    expect(imports[0]!.imports[0]!.localName).toBe('MySymbol');\n  });\n});\n"
  },
  {
    "path": "packages/codegen-core/src/__tests__/project.test.ts",
    "content": "import { canDeclarationsShareIdentifier } from '../project/namespace';\nimport { Project } from '../project/project';\nimport type { SymbolKind } from '../symbols/types';\n\n// Mock Planner so we control what files appear in project.files\nvi.mock('../planner/planner', () => {\n  const MockPlanner = vi.fn(function (this: any, project: Project) {\n    this.plan = vi.fn(() => {\n      // planner is responsible for creating files\n      const file = project.files.register({\n        logicalFilePath: 'root/a',\n      });\n      file.setFinalPath('/root/a.ts');\n      file.setRenderer({\n        render: vi.fn(() => 'RENDERED'),\n        supports: () => true,\n      });\n    });\n  });\n\n  return { Planner: MockPlanner };\n});\n\ndescribe('Project', () => {\n  const makeProject = (overrides: any = {}) =>\n    new Project({\n      renderers: [],\n      root: '/root',\n      ...overrides,\n    });\n\n  it('calls Planner.plan() before rendering', () => {\n    const p = makeProject();\n    p.render();\n  });\n\n  it('renders files created by the planner', () => {\n    const p = makeProject();\n\n    const out = p.render();\n\n    expect(out).toEqual([{ content: 'RENDERED', path: '/root/a.ts' }]);\n  });\n\n  it('passes correct ctx to renderer.render()', () => {\n    const p = makeProject();\n    p.render({ hello: true });\n\n    const file = [...p.files.registered()][0]!;\n    const renderer = file.renderer!;\n\n    expect(renderer.render).toHaveBeenCalledWith({\n      file,\n      meta: { hello: true },\n      project: p,\n    });\n  });\n});\n\ndescribe('canDeclarationsShareIdentifier', () => {\n  const kinds: ReadonlyArray<SymbolKind> = [\n    'class',\n    'enum',\n    'function',\n    'interface',\n    'namespace',\n    'type',\n    'var',\n  ];\n\n  it('matches TypeScript declaration merging matrix', () => {\n    const allowed = new Set([\n      'interface|interface',\n      'class|interface',\n      'class|namespace',\n      'enum|namespace',\n      'function|namespace',\n      'namespace|namespace',\n      'function|type',\n      'type|var',\n    ]);\n\n    for (const a of kinds) {\n      for (const b of kinds) {\n        expect(canDeclarationsShareIdentifier('typescript', a, b)).toBe(\n          allowed.has([a, b].sort().join('|')),\n        );\n      }\n    }\n  });\n\n  it('returns false for Python declaration pairs', () => {\n    for (const a of kinds) {\n      for (const b of kinds) {\n        expect(canDeclarationsShareIdentifier('python', a, b)).toBe(false);\n      }\n    }\n  });\n});\n"
  },
  {
    "path": "packages/codegen-core/src/__tests__/refs.test.ts",
    "content": "import { fromRef, fromRefs, ref, refs } from '../refs/refs';\nimport type { Refs } from '../refs/types';\n\ndescribe('ref', () => {\n  it('wraps a primitive value', () => {\n    expect(ref(42)).toEqual({ '~ref': 42 });\n    expect(ref('x')).toEqual({ '~ref': 'x' });\n  });\n\n  it('wraps an object', () => {\n    const obj = { foo: 1 };\n    expect(ref(obj)).toEqual({ '~ref': obj });\n  });\n});\n\ndescribe('fromRef', () => {\n  it('unwraps a primitive value', () => {\n    expect(fromRef({ '~ref': 42 })).toBe(42);\n    expect(fromRef({ '~ref': 'x' })).toBe('x');\n  });\n\n  it('unwraps an object', () => {\n    const obj = { foo: 1 };\n    expect(fromRef({ '~ref': obj })).toBe(obj);\n  });\n});\n\ndescribe('ref <-> fromRef roundtrip', () => {\n  it('roundtrips value -> ref -> value', () => {\n    expect(fromRef(ref(123))).toBe(123);\n    const obj = { foo: 'bar' };\n    expect(fromRef(ref(obj))).toBe(obj);\n  });\n});\n\ndescribe('refs', () => {\n  it('wraps primitives', () => {\n    expect(refs({ a: 1, b: 'x' })).toEqual({\n      a: { '~ref': 1 },\n      b: { '~ref': 'x' },\n    });\n  });\n\n  it('wraps empty object', () => {\n    expect(refs({})).toEqual({});\n  });\n\n  it('wraps nested objects shallowly', () => {\n    const input = { a: { foo: 1 }, b: [1, 2] };\n    const value = refs(input);\n    expect(value.a['~ref']).toEqual({ foo: 1 });\n    expect(value.b['~ref']).toEqual([1, 2]);\n  });\n});\n\ndescribe('fromRefs', () => {\n  it('unwraps primitives', () => {\n    expect(fromRefs({ a: { '~ref': 1 }, b: { '~ref': 'x' } })).toEqual({\n      a: 1,\n      b: 'x',\n    });\n  });\n\n  it('unwraps empty object', () => {\n    expect(fromRefs({})).toEqual({});\n  });\n\n  it('unwraps nested objects shallowly', () => {\n    const input: Refs<any> = {\n      a: { '~ref': { foo: 1 } },\n      b: { '~ref': [1, 2] },\n    };\n    expect(fromRefs(input)).toEqual({ a: { foo: 1 }, b: [1, 2] });\n  });\n});\n\ndescribe('refs <-> fromRefs roundtrip', () => {\n  it('roundtrips plain -> refs -> plain', () => {\n    const obj = { a: 1, b: 'x', c: [1, 2], d: { foo: 2 } };\n    expect(fromRefs(refs(obj))).toEqual(obj);\n  });\n\n  it('roundtrips refs -> plain -> refs', () => {\n    const value: Refs<any> = {\n      a: { '~ref': 1 },\n      b: { '~ref': 'x' },\n      c: { '~ref': [1, 2] },\n    };\n    expect(refs(fromRefs(value))).toEqual(value);\n  });\n});\n"
  },
  {
    "path": "packages/codegen-core/src/__tests__/symbols.test.ts",
    "content": "import { SymbolRegistry } from '../symbols/registry';\nimport { Symbol } from '../symbols/symbol';\n\nconst meta = (m: any) => m as any;\n\ndescribe('SymbolRegistry', () => {\n  it('register() assigns increasing IDs and stores symbols', () => {\n    const r = new SymbolRegistry();\n\n    const a = r.register({ meta: meta({ kind: 'x' }), name: 'A' });\n    const b = r.register({ meta: meta({ kind: 'y' }), name: 'B' });\n\n    expect(a.id).toBe(0);\n    expect(b.id).toBe(1);\n    expect(r.get(0)).toBe(a);\n    expect(r.get(1)).toBe(b);\n  });\n\n  it('query() returns symbols matching meta', () => {\n    const r = new SymbolRegistry();\n\n    const a = r.register({\n      meta: meta({ nested: { x: 1 }, type: 'foo' }),\n      name: 'A',\n    });\n    r.register({ meta: meta({ type: 'bar' }), name: 'B' });\n\n    const results = r.query(meta({ nested: { x: 1 }, type: 'foo' }));\n    expect(results).toEqual([a]);\n  });\n\n  it('query() returns empty array when no matches', () => {\n    const r = new SymbolRegistry();\n    r.register({ meta: meta({ type: 'x' }), name: 'A' });\n\n    expect(r.query(meta({ type: 'nope' }))).toEqual([]);\n  });\n\n  it('reference() returns stub if not registered', () => {\n    const r = new SymbolRegistry();\n    const stub = r.reference(meta({ id: 1, kind: 'x' }));\n\n    expect(stub).toBeInstanceOf(Symbol);\n    expect(r.isRegistered(stub.id)).toBe(false);\n\n    // same meta → same stub\n    const again = r.reference(meta({ id: 1, kind: 'x' }));\n    expect(again).toBe(stub);\n  });\n\n  it('reference() stub is replaced when real symbol registers', () => {\n    const r = new SymbolRegistry();\n\n    const stub = r.reference(meta({ group: 'abc', tag: 1 }));\n    const real = r.register({\n      meta: meta({ group: 'abc', tag: 1 }),\n      name: 'Real',\n    });\n\n    // Stub should now canonicalize to the real one\n    expect(stub.canonical).toBe(real);\n    expect(r.get(stub.id)).toBe(stub);\n\n    // Queries should now return the real one\n    expect(r.query(meta({ group: 'abc', tag: 1 }))).toEqual([real]);\n  });\n\n  it('isRegistered() returns true only for registered symbols', () => {\n    const r = new SymbolRegistry();\n    const stub = r.reference(meta({ foo: 1 }));\n    const real = r.register({ meta: meta({ foo: 1 }), name: 'X' });\n\n    expect(r.isRegistered(stub.id)).toBe(false);\n    expect(r.isRegistered(real.id)).toBe(true);\n  });\n\n  it('registered() iterates over only registered symbols (not stubs)', () => {\n    const r = new SymbolRegistry();\n    r.reference(meta({ x: 1 })); // stub\n    const a = r.register({ meta: meta({ x: 2 }), name: 'A' });\n    const b = r.register({ meta: meta({ x: 3 }), name: 'B' });\n\n    expect([...r.registered()]).toEqual([a, b]);\n  });\n\n  it('cache invalidates when new symbol matches cached query', () => {\n    const r = new SymbolRegistry();\n\n    // prime cache\n    expect(r.query(meta({ type: 'foo' }))).toEqual([]);\n\n    const a = r.register({ meta: meta({ type: 'foo' }), name: 'A' });\n\n    // now query again → cache should be invalidated → return new entry\n    expect(r.query(meta({ type: 'foo' }))).toEqual([a]);\n  });\n\n  it('nested meta keys are indexed correctly', () => {\n    const r = new SymbolRegistry();\n\n    const a = r.register({\n      meta: meta({ a: { b: { c: 123 } } }),\n      name: 'A',\n    });\n\n    const result = r.query(meta({ a: { b: { c: 123 } } }));\n    expect(result).toEqual([a]);\n  });\n});\n"
  },
  {
    "path": "packages/codegen-core/src/bindings.ts",
    "content": "import type { File } from './files/file';\nimport type { BindingKind } from './symbols/types';\n\nexport interface ExportMember {\n  /**\n   * Name under which the symbol is exported in this file.\n   *\n   * export { Foo as Bar } from \"./models\"\n   *\n   * exportedName === \"Bar\"\n   */\n  exportedName: string;\n  /** Whether this export is type-only. */\n  isTypeOnly: boolean;\n  /** Export flavor. */\n  kind: BindingKind;\n  /** The exported name of the symbol in its source file. */\n  sourceName: string;\n}\n\nexport type ExportModule = Pick<ExportMember, 'isTypeOnly'> & {\n  /** Whether this module can export all symbols: `export * from 'module'`. */\n  canExportAll: boolean;\n  /** Members exported from this module. */\n  exports: Array<ExportMember>;\n  /** Source file. */\n  from: File;\n  /** Namespace export: `export * as ns from 'module'`. Mutually exclusive with `exports`. */\n  namespaceExport?: string;\n};\n\nexport interface ImportMember {\n  /** Whether this import is type-only. */\n  isTypeOnly: boolean;\n  /**\n   * The name this symbol will have locally in this file.\n   * This is where aliasing is applied:\n   *\n   * import { Foo as Foo$2 } from \"./x\"\n   *\n   * localName === \"Foo$2\"\n   */\n  localName: string;\n  /** The exported name of the symbol in its source file. */\n  sourceName: string;\n}\n\nexport type ImportModule = Pick<ImportMember, 'isTypeOnly'> &\n  Pick<Partial<ImportMember>, 'localName'> & {\n    /** Source file. */\n    from: File;\n    /** List of symbols imported from this module. */\n    imports: Array<ImportMember>;\n    /** Import flavor. */\n    kind: BindingKind;\n  };\n"
  },
  {
    "path": "packages/codegen-core/src/brands.ts",
    "content": "export const fileBrand = 'heyapi.file';\nexport const nodeBrand = 'heyapi.node';\nexport const symbolBrand = 'heyapi.symbol';\n"
  },
  {
    "path": "packages/codegen-core/src/config/interactive.ts",
    "content": "/**\n * Detect if the current session is interactive based on TTY status and environment variables.\n * This is used as a fallback when the user doesn't explicitly set the interactive option.\n * @internal\n */\nexport function detectInteractiveSession(): boolean {\n  return Boolean(\n    process.stdin.isTTY &&\n    process.stdout.isTTY &&\n    !process.env.CI &&\n    !process.env.NO_INTERACTIVE &&\n    !process.env.NO_INTERACTION,\n  );\n}\n"
  },
  {
    "path": "packages/codegen-core/src/config/load.ts",
    "content": "import type { AnyObject, MaybeArray } from '@hey-api/types';\nimport { loadConfig } from 'c12';\n\nimport type { Logger } from '../logger';\nimport { mergeConfigs } from './merge';\n\nexport async function loadConfigFile<T extends AnyObject>({\n  configFile,\n  logger,\n  name,\n  userConfig,\n}: {\n  configFile: string | undefined;\n  logger: Logger;\n  name: string;\n  userConfig: T;\n}): Promise<{\n  configFile: string | undefined;\n  configs: ReadonlyArray<T>;\n  foundConfig: boolean;\n}> {\n  const eventC12 = logger.timeEvent('c12');\n  const { config: fileConfig, configFile: loadedConfigFile } = await loadConfig<MaybeArray<T>>({\n    configFile,\n    name,\n  });\n  eventC12.timeEnd();\n\n  const fileConfigs = fileConfig instanceof Array ? fileConfig : [fileConfig];\n  const mergedConfigs = fileConfigs.map((config) => mergeConfigs<T>(config, userConfig));\n  const foundConfig = fileConfigs.some((config) => Object.keys(config).length > 0);\n\n  return { configFile: loadedConfigFile, configs: mergedConfigs, foundConfig };\n}\n"
  },
  {
    "path": "packages/codegen-core/src/config/merge.ts",
    "content": "import type { AnyObject } from '@hey-api/types';\n\nfunction isPlainObject(value: unknown): value is AnyObject {\n  return typeof value === 'object' && value !== null && !Array.isArray(value);\n}\n\nexport function mergeConfigs<T extends AnyObject>(\n  configA: T | undefined,\n  configB: T | undefined,\n): T {\n  const a = (configA || {}) as AnyObject;\n  const b = (configB || {}) as AnyObject;\n\n  const result: AnyObject = { ...a };\n\n  for (const key of Object.keys(b)) {\n    const valueA = a[key];\n    const valueB = b[key];\n\n    if (isPlainObject(valueA) && isPlainObject(valueB)) {\n      result[key] = mergeConfigs(valueA, valueB);\n    } else {\n      result[key] = valueB;\n    }\n  }\n\n  return result as T;\n}\n"
  },
  {
    "path": "packages/codegen-core/src/extensions.ts",
    "content": "/**\n * Arbitrary metadata passed to the project's render function.\n *\n * Implementers should extend this interface for their own needs.\n */\nexport interface IProjectRenderMeta {\n  [key: string]: unknown;\n}\n\n/**\n * Additional metadata about the symbol.\n *\n * Implementers should extend this interface for their own needs.\n */\nexport interface ISymbolMeta {\n  [key: string]: unknown;\n}\n"
  },
  {
    "path": "packages/codegen-core/src/files/file.ts",
    "content": "import path from 'node:path';\n\nimport type { ExportModule, ImportModule } from '../bindings';\nimport { fileBrand } from '../brands';\nimport type { Language } from '../languages/types';\nimport { log } from '../log';\nimport type { INode } from '../nodes/node';\nimport type { NameScopes } from '../planner/scope';\nimport type { IProject } from '../project/types';\nimport type { Renderer } from '../renderer';\nimport type { IFileIn } from './types';\n\nexport class File<Node extends INode = INode> {\n  /**\n   * Exports from this file.\n   */\n  private _exports: Array<ExportModule> = [];\n  /**\n   * File extension (e.g. `.ts`).\n   */\n  private _extension?: string;\n  /**\n   * Actual emitted file path, including extension and directories.\n   */\n  private _finalPath?: string;\n  /**\n   * Imports to this file.\n   */\n  private _imports: Array<ImportModule> = [];\n  /**\n   * Language of the file.\n   */\n  private _language?: Language;\n  /**\n   * Logical, extension-free path used for planning and routing.\n   */\n  private _logicalFilePath: string;\n  /**\n   * Base name of the file (without extension).\n   */\n  private _name?: string;\n  /**\n   * Syntax nodes contained in this file.\n   */\n  private _nodes: Array<Node> = [];\n  /**\n   * Renderer assigned to this file.\n   */\n  private _renderer?: Renderer;\n\n  /** Brand used for identifying files. */\n  readonly '~brand' = fileBrand;\n  /** All names defined in this file, including local scopes. */\n  allNames: NameScopes = new Map();\n  /** Whether this file is external to the project. */\n  external: boolean;\n  /** Unique identifier for the file. */\n  readonly id: number;\n  /** The project this file belongs to. */\n  readonly project: IProject;\n  /** Names declared at the top level of the file. */\n  topLevelNames: NameScopes = new Map();\n\n  constructor(input: IFileIn, id: number, project: IProject) {\n    this.external = input.external ?? false;\n    this.id = id;\n    if (input.language !== undefined) this._language = input.language;\n    this._logicalFilePath = input.logicalFilePath.split(path.sep).join('/');\n    if (input.name !== undefined) this._name = input.name;\n    this.project = project;\n  }\n\n  /**\n   * Exports from this file.\n   */\n  get exports(): ReadonlyArray<ExportModule> {\n    return [...this._exports];\n  }\n\n  /**\n   * Read-only accessor for the file extension.\n   */\n  get extension(): string | undefined {\n    if (this.external) return;\n    if (this._extension) return this._extension;\n    const language = this.language;\n    const extension = language ? this.project.extensions[language] : undefined;\n    if (extension && extension[0]) return extension[0];\n    return;\n  }\n\n  /**\n   * Read-only accessor for the final emitted path.\n   *\n   * If undefined, the file has not yet been assigned a final path\n   * or is external to the project and should not be emitted.\n   */\n  get finalPath(): string | undefined {\n    if (this._finalPath) return this._finalPath;\n    const dirs = this._logicalFilePath ? this._logicalFilePath.split('/').slice(0, -1) : [];\n    return [...dirs, `${this.name}${this.extension ?? ''}`].join('/');\n  }\n\n  /**\n   * Imports to this file.\n   */\n  get imports(): ReadonlyArray<ImportModule> {\n    return [...this._imports];\n  }\n\n  /**\n   * Language of the file; inferred from nodes or fallback if not set explicitly.\n   */\n  get language(): Language | undefined {\n    if (this._language) return this._language;\n    if (this._nodes[0]) return this._nodes[0].language;\n    return;\n  }\n\n  /**\n   * Logical, extension-free path used for planning and routing.\n   */\n  get logicalFilePath(): string {\n    return this._logicalFilePath;\n  }\n\n  /**\n   * Base name of the file (without extension).\n   *\n   * If no name was set explicitly, it is inferred from the logical file path.\n   */\n  get name(): string {\n    if (this._name) return this._name;\n    const name = this._logicalFilePath.split('/').pop();\n    if (name) return name;\n    const message = `File ${this.toString()} has no name`;\n    log.debug(message, 'file');\n    throw new Error(message);\n  }\n\n  /**\n   * Syntax nodes contained in this file.\n   */\n  get nodes(): ReadonlyArray<Node> {\n    return [...this._nodes];\n  }\n\n  /**\n   * Renderer assigned to this file.\n   */\n  get renderer(): Renderer | undefined {\n    return this._renderer;\n  }\n\n  /**\n   * Add an export group to the file.\n   */\n  addExport(group: ExportModule): void {\n    this._exports.push(group);\n  }\n\n  /**\n   * Add an import group to the file.\n   */\n  addImport(group: ImportModule): void {\n    this._imports.push(group);\n  }\n\n  /**\n   * Add a syntax node to the file.\n   */\n  addNode(node: Node): void {\n    this._nodes.push(node);\n    node.file = this;\n  }\n\n  /**\n   * Sets the file extension.\n   */\n  setExtension(extension: string): void {\n    this._extension = extension;\n  }\n\n  /**\n   * Sets the final emitted path of the file.\n   */\n  setFinalPath(path: string): void {\n    this._finalPath = path;\n  }\n\n  /**\n   * Sets the language of the file.\n   */\n  setLanguage(lang: Language): void {\n    this._language = lang;\n  }\n\n  /**\n   * Sets the name of the file.\n   */\n  setName(name: string): void {\n    this._name = name;\n  }\n\n  /**\n   * Sets the renderer assigned to this file.\n   */\n  setRenderer(renderer: Renderer): void {\n    this._renderer = renderer;\n  }\n\n  /**\n   * Returns a debug‑friendly string representation identifying the file.\n   */\n  toString(): string {\n    return `[File ${this._logicalFilePath}#${this.id}]`;\n  }\n}\n"
  },
  {
    "path": "packages/codegen-core/src/files/registry.ts",
    "content": "import path from 'node:path';\n\nimport type { IProject } from '../project/types';\nimport { File } from './file';\nimport type { FileKeyArgs, IFileIn, IFileRegistry } from './types';\n\ntype FileId = number;\ntype FileKey = string;\n\nexport class FileRegistry implements IFileRegistry {\n  private _id: FileId = 0;\n  private _values: Map<FileKey, File> = new Map();\n  private readonly project: IProject;\n\n  constructor(project: IProject) {\n    this.project = project;\n  }\n\n  get(args: FileKeyArgs): File | undefined {\n    return this._values.get(this.createFileKey(args));\n  }\n\n  isRegistered(args: FileKeyArgs): boolean {\n    return this._values.has(this.createFileKey(args));\n  }\n\n  get nextId(): FileId {\n    return this._id++;\n  }\n\n  register(file: IFileIn): File {\n    const key = this.createFileKey(file);\n\n    let result = this._values.get(key);\n    if (result) {\n      if (file.name) {\n        result.setName(file.name);\n      }\n    } else {\n      result = new File(file, this.nextId, this.project);\n    }\n\n    this._values.set(key, result);\n\n    return result;\n  }\n\n  *registered(): IterableIterator<File> {\n    for (const file of this._values.values()) {\n      yield file;\n    }\n  }\n\n  private createFileKey(args: FileKeyArgs): string {\n    const logicalPath = args.logicalFilePath.split(path.sep).join('/');\n    return `${args.external ? 'ext:' : ''}${logicalPath}${args.language ? `:${args.language}` : ''}`;\n  }\n}\n"
  },
  {
    "path": "packages/codegen-core/src/files/rules.ts",
    "content": "// TODO: use this later\nexport interface Rules {\n  /** Whether two exported names may collide. */\n  allowExportNameShadowing: boolean;\n  /** Whether a local symbol can shadow another local name without error. */\n  allowLocalNameShadowing: boolean;\n  /** Whether the language requires file-scoped name uniqueness. */\n  fileScopedNamesMustBeUnique: boolean;\n  /** Whether `import { X } from \"mod\"` introduces a local binding `X`. */\n  importCreatesLocalBinding: boolean;\n  /** Whether `export { X } from \"mod\"` introduces a local binding `X`. */\n  reexportCreatesLocalBinding: boolean;\n  /** Whether the language distinguishes type-only imports. */\n  supportsTypeImports: boolean;\n}\n"
  },
  {
    "path": "packages/codegen-core/src/files/types.ts",
    "content": "import type { Language } from '../languages/types';\nimport type { File } from './file';\n\nexport type FileKeyArgs = Pick<Required<File>, 'logicalFilePath'> &\n  Pick<Partial<File>, 'external' | 'language'>;\n\nexport type IFileIn = {\n  /**\n   * Indicates whether the file is external, meaning it is not generated\n   * as part of the project but is referenced (e.g., a module from\n   * node_modules).\n   *\n   * @example true\n   */\n  external?: boolean;\n  /**\n   * Language of the file.\n   *\n   * @example \"typescript\"\n   */\n  language?: Language;\n  /**\n   * Logical, extension-free path used for planning and routing.\n   *\n   * @example \"src/models/user\"\n   */\n  logicalFilePath: string;\n  /**\n   * The desired name for the file within the project. If there are multiple files\n   * with the same desired name, this might not end up being the actual name.\n   *\n   * @example \"UserModel\"\n   */\n  name?: string;\n};\n\nexport interface IFileRegistry {\n  /**\n   * Get a file.\n   *\n   * @returns The file, or undefined if not found.\n   */\n  get(args: FileKeyArgs): File | undefined;\n  /**\n   * Returns whether a file is registered in the registry.\n   *\n   * @returns True if the file is registered, false otherwise.\n   */\n  isRegistered(args: FileKeyArgs): boolean;\n  /**\n   * Returns the current file ID and increments it.\n   *\n   * @returns File ID before being incremented\n   */\n  readonly nextId: number;\n  /**\n   * Register a file globally.\n   *\n   * @param file File to register.\n   * @returns Newly registered file if created, merged file otherwise.\n   */\n  register(file: IFileIn): File;\n  /**\n   * Get all files in the order they were registered.\n   *\n   * @returns Array of all registered files, in insert order.\n   */\n  registered(): IterableIterator<File>;\n}\n"
  },
  {
    "path": "packages/codegen-core/src/guards.ts",
    "content": "import { nodeBrand, symbolBrand } from './brands';\nimport type { INode } from './nodes/node';\nimport type { Ref } from './refs/types';\nimport type { Symbol } from './symbols/symbol';\n\nexport function isBrand(value: unknown, brand: string): value is INode {\n  if (!value || typeof value !== 'object') return false;\n  return (value as any)['~brand'] === brand;\n}\n\nexport function isNode(value: unknown): value is INode {\n  if (!value || typeof value !== 'object') return false;\n  return isBrand(value, nodeBrand);\n}\n\nexport function isNodeRef(value: Ref<unknown>): value is Ref<INode> {\n  return isBrand(value['~ref'], nodeBrand);\n}\n\nexport function isSymbol(value: unknown): value is Symbol {\n  return isBrand(value, symbolBrand);\n}\n\nexport function isSymbolRef(value: Ref<unknown>): value is Ref<Symbol> {\n  return isBrand(value['~ref'], symbolBrand);\n}\n"
  },
  {
    "path": "packages/codegen-core/src/index.ts",
    "content": "export type { ExportMember, ExportModule, ImportMember, ImportModule } from './bindings';\nexport { nodeBrand, symbolBrand } from './brands';\nexport { detectInteractiveSession } from './config/interactive';\nexport { loadConfigFile } from './config/load';\nexport { mergeConfigs } from './config/merge';\nexport type {\n  IProjectRenderMeta as ProjectRenderMeta,\n  ISymbolMeta as SymbolMeta,\n} from './extensions';\nexport { File } from './files/file';\nexport type { IFileIn as FileIn } from './files/types';\nexport { isNode, isNodeRef, isSymbol, isSymbolRef } from './guards';\nexport { defaultExtensions } from './languages/extensions';\nexport { defaultModuleEntryNames } from './languages/modules';\nexport { defaultNameConflictResolvers } from './languages/resolvers';\nexport type {\n  Extensions,\n  Language,\n  ModuleEntryNames,\n  NameConflictResolvers,\n} from './languages/types';\nexport { log } from './log';\nexport { Logger } from './logger';\nexport type {\n  INode as Node,\n  NodeName,\n  NodeNameSanitizer,\n  NodeRelationship,\n  NodeScope,\n} from './nodes/node';\nexport type { IOutput as Output } from './output';\nexport { simpleNameConflictResolver, underscoreNameConflictResolver } from './planner/resolvers';\nexport type { IAnalysisContext as AnalysisContext, NameConflictResolver } from './planner/types';\nexport { Project } from './project/project';\nexport type { IProject } from './project/types';\nexport { fromRef, fromRefs, isRef, ref, refs } from './refs/refs';\nexport type { FromRef, FromRefs, Ref, Refs } from './refs/types';\nexport type { RenderContext, Renderer } from './renderer';\nexport { StructureModel } from './structure/model';\nexport { StructureNode } from './structure/node';\nexport type {\n  StructureInsert,\n  StructureItem,\n  StructureLocation,\n  StructureShell,\n  StructureShellResult,\n} from './structure/types';\nexport { Symbol } from './symbols/symbol';\nexport type {\n  BindingKind,\n  ISymbolIdentifier as SymbolIdentifier,\n  ISymbolIn as SymbolIn,\n} from './symbols/types';\n"
  },
  {
    "path": "packages/codegen-core/src/languages/extensions.ts",
    "content": "import type { Extensions } from './types';\n\nexport const defaultExtensions: Extensions = {\n  c: ['.c'],\n  'c#': ['.cs'],\n  'c++': ['.cpp', '.hpp'],\n  css: ['.css'],\n  dart: ['.dart'],\n  go: ['.go'],\n  haskell: ['.hs'],\n  html: ['.html'],\n  java: ['.java'],\n  javascript: ['.js', '.jsx'],\n  json: ['.json'],\n  kotlin: ['.kt'],\n  lua: ['.lua'],\n  markdown: ['.md'],\n  matlab: ['.m'],\n  perl: ['.pl'],\n  php: ['.php'],\n  python: ['.py'],\n  r: ['.r'],\n  ruby: ['.rb'],\n  rust: ['.rs'],\n  scala: ['.scala'],\n  shell: ['.sh'],\n  sql: ['.sql'],\n  swift: ['.swift'],\n  typescript: ['.ts', '.tsx'],\n  yaml: ['.yaml', '.yml'],\n};\n"
  },
  {
    "path": "packages/codegen-core/src/languages/modules.ts",
    "content": "import type { ModuleEntryNames } from './types';\n\nexport const defaultModuleEntryNames: ModuleEntryNames = {\n  javascript: 'index',\n  python: '__init__',\n  typescript: 'index',\n};\n"
  },
  {
    "path": "packages/codegen-core/src/languages/resolvers.ts",
    "content": "import { underscoreNameConflictResolver } from '../planner/resolvers';\nimport type { NameConflictResolvers } from './types';\n\nexport const defaultNameConflictResolvers: NameConflictResolvers = {\n  php: underscoreNameConflictResolver,\n  python: underscoreNameConflictResolver,\n  ruby: underscoreNameConflictResolver,\n};\n"
  },
  {
    "path": "packages/codegen-core/src/languages/types.ts",
    "content": "import type { AnyString } from '@hey-api/types';\n\nimport type { NameConflictResolver } from '../planner/types';\n\n/**\n * Map of extensions for each language.\n *\n * @example\n * ```ts\n * const exts: Extensions = {\n *   typescript: ['.ts', '.tsx'],\n *   python: ['.py'],\n * };\n * ```\n */\nexport type Extensions = Partial<Record<Language, ReadonlyArray<string>>>;\n\nexport type Language =\n  | 'c'\n  | 'c#'\n  | 'c++'\n  | 'css'\n  | 'dart'\n  | 'go'\n  | 'haskell'\n  | 'html'\n  | 'java'\n  | 'javascript'\n  | 'json'\n  | 'kotlin'\n  | 'lua'\n  | 'markdown'\n  | 'matlab'\n  | 'perl'\n  | 'php'\n  | 'python'\n  | 'r'\n  | 'ruby'\n  | 'rust'\n  | 'scala'\n  | 'shell'\n  | 'sql'\n  | 'swift'\n  | 'typescript'\n  | 'yaml'\n  | AnyString; // other/custom language\n\n/**\n * Map of module entry names for each language.\n *\n * @example\n * ```ts\n * const entries: ModuleEntryNames = {\n *   typescript: 'index',\n *   python: '__init__',\n * };\n * ```\n */\nexport type ModuleEntryNames = Partial<Record<Language, string>>;\n\nexport type NameConflictResolvers = Partial<Record<Language, NameConflictResolver>>;\n"
  },
  {
    "path": "packages/codegen-core/src/log.ts",
    "content": "import type { MaybeArray, MaybeFunc } from '@hey-api/types';\nimport colors from 'ansi-colors';\n// @ts-expect-error\nimport colorSupport from 'color-support';\n\ncolors.enabled = colorSupport().hasBasic;\n\nconst DEBUG_NAMESPACE = 'heyapi';\n\nconst NO_WARNINGS = /^(1|true|yes|on)$/i.test(process.env.HEYAPI_DISABLE_WARNINGS ?? '');\n\nconst DebugGroups = {\n  analyzer: colors.greenBright,\n  dsl: colors.cyanBright,\n  file: colors.yellowBright,\n  registry: colors.blueBright,\n  symbol: colors.magentaBright,\n} as const;\n\nconst WarnGroups = {\n  deprecated: colors.magentaBright,\n} as const;\n\nlet cachedDebugGroups: Set<string> | undefined;\nfunction getDebugGroups(): Set<string> {\n  if (cachedDebugGroups) return cachedDebugGroups;\n\n  const value = process.env.DEBUG;\n  cachedDebugGroups = new Set(value ? value.split(',').map((x) => x.trim().toLowerCase()) : []);\n\n  return cachedDebugGroups;\n}\n\n/**\n * Tracks which deprecations have been shown to avoid spam.\n */\nconst shownDeprecations = new Set<string>();\n\nfunction debug(message: string, group: keyof typeof DebugGroups) {\n  const groups = getDebugGroups();\n  if (\n    !(\n      groups.has('*') ||\n      groups.has(`${DEBUG_NAMESPACE}:*`) ||\n      groups.has(`${DEBUG_NAMESPACE}:${group}`) ||\n      groups.has(group)\n    )\n  ) {\n    return;\n  }\n\n  const color = DebugGroups[group] ?? colors.whiteBright;\n  const prefix = color(`${DEBUG_NAMESPACE}:${group}`);\n\n  console.debug(`${prefix} ${message}`);\n}\n\nfunction warn(message: string, group?: keyof typeof WarnGroups) {\n  if (NO_WARNINGS) return;\n\n  const color = group ? WarnGroups[group] : colors.yellowBright;\n\n  console.warn(color(`${message}`));\n}\n\nfunction warnDeprecated({\n  context,\n  field,\n  replacement,\n}: {\n  context?: string;\n  field: string;\n  replacement?: MaybeFunc<(field: string) => MaybeArray<string>>;\n}) {\n  const key = context\n    ? `${context}:${field}:${JSON.stringify(replacement)}`\n    : `${field}:${JSON.stringify(replacement)}`;\n\n  if (shownDeprecations.has(key)) return;\n  shownDeprecations.add(key);\n\n  let message = `\\`${field}\\` is deprecated.`;\n\n  if (replacement) {\n    const reps = typeof replacement === 'function' ? replacement(field) : replacement;\n    const repArray = reps instanceof Array ? reps : [reps];\n    const repString = repArray.map((r) => `\\`${r}\\``).join(' or ');\n    message += ` Use ${repString} instead.`;\n  }\n\n  const prefix = context ? `[${context}] ` : '';\n  warn(`${prefix}${message}`, 'deprecated');\n}\n\nexport const log = {\n  debug,\n  warn,\n  warnDeprecated,\n};\n"
  },
  {
    "path": "packages/codegen-core/src/logger.ts",
    "content": "import colors from 'ansi-colors';\n\ninterface LoggerEvent {\n  end?: PerformanceMark;\n  events: Array<LoggerEvent>;\n  id: string; // unique internal key\n  name: string;\n  start: PerformanceMark;\n}\n\ninterface Severity {\n  color: colors.StyleFunction;\n  type: 'duration' | 'percentage';\n}\n\ninterface StoredEventResult {\n  position: ReadonlyArray<number>;\n}\n\nlet loggerCounter = 0;\nconst nameToId = (name: string) => `${name}-${loggerCounter++}`;\nconst idEnd = (id: string) => `${id}-end`;\nconst idLength = (id: string) => `${id}-length`;\nconst idStart = (id: string) => `${id}-start`;\n\nconst getSeverity = (duration: number, percentage: number): Severity | undefined => {\n  if (duration > 200) {\n    return {\n      color: colors.red,\n      type: 'duration',\n    };\n  }\n  if (percentage > 30) {\n    return {\n      color: colors.red,\n      type: 'percentage',\n    };\n  }\n  if (duration > 50) {\n    return {\n      color: colors.yellow,\n      type: 'duration',\n    };\n  }\n  if (percentage > 10) {\n    return {\n      color: colors.yellow,\n      type: 'percentage',\n    };\n  }\n  return;\n};\n\nexport class Logger {\n  private events: Array<LoggerEvent> = [];\n\n  private end(result: StoredEventResult): void {\n    let event: LoggerEvent | undefined;\n    let events = this.events;\n    for (const index of result.position) {\n      event = events[index];\n      if (event?.events) {\n        events = event.events;\n      }\n    }\n    if (event && !event.end) {\n      event.end = performance.mark(idEnd(event.id));\n    }\n  }\n\n  /**\n   * Recursively end all unended events in the event tree.\n   * This ensures all events have end marks before measuring.\n   */\n  private endAllEvents(events: Array<LoggerEvent>): void {\n    for (const event of events) {\n      if (!event.end) {\n        event.end = performance.mark(idEnd(event.id));\n      }\n      if (event.events.length > 0) {\n        this.endAllEvents(event.events);\n      }\n    }\n  }\n\n  report(print: boolean = true): PerformanceMeasure | undefined {\n    const firstEvent = this.events[0];\n    if (!firstEvent) return;\n\n    // Ensure all events are ended before reporting\n    this.endAllEvents(this.events);\n\n    const lastEvent = this.events[this.events.length - 1]!;\n    const name = 'root';\n    const id = nameToId(name);\n\n    try {\n      const measure = performance.measure(\n        idLength(id),\n        idStart(firstEvent.id),\n        idEnd(lastEvent.id),\n      );\n      if (print) {\n        this.reportEvent({\n          end: lastEvent.end,\n          events: this.events,\n          id,\n          indent: 0,\n          measure,\n          name,\n          start: firstEvent!.start,\n        });\n      }\n      return measure;\n    } catch {\n      // If measuring fails (e.g., marks don't exist), silently skip reporting\n      // to avoid crashing the application\n      return;\n    }\n  }\n\n  private reportEvent({\n    indent,\n    ...parent\n  }: LoggerEvent & {\n    indent: number;\n    measure: PerformanceMeasure;\n  }): void {\n    const color = !indent ? colors.cyan : colors.gray;\n    const lastIndex = parent.events.length - 1;\n\n    parent.events.forEach((event, index) => {\n      try {\n        const measure = performance.measure(idLength(event.id), idStart(event.id), idEnd(event.id));\n        const duration = Math.ceil(measure.duration * 100) / 100;\n        const percentage =\n          Math.ceil((measure.duration / parent.measure.duration) * 100 * 100) / 100;\n        const severity = indent ? getSeverity(duration, percentage) : undefined;\n\n        let durationLabel = `${duration.toFixed(2).padStart(8)}ms`;\n        if (severity?.type === 'duration') {\n          durationLabel = severity.color(durationLabel);\n        }\n\n        const branch = index === lastIndex ? '└─ ' : '├─ ';\n        const prefix = !indent ? '' : '│  '.repeat(indent - 1) + branch;\n        const maxLength = 38 - prefix.length;\n\n        const percentageBranch = !indent ? '' : '↳ ';\n        const percentagePrefix = indent ? ' '.repeat(indent - 1) + percentageBranch : '';\n        let percentageLabel = `${percentagePrefix}${percentage.toFixed(2)}%`;\n        if (severity?.type === 'percentage') {\n          percentageLabel = severity.color(percentageLabel);\n        }\n        const jobPrefix = colors.gray('[root] ');\n        console.log(\n          `${jobPrefix}${colors.gray(prefix)}${color(\n            `${event.name.padEnd(maxLength)} ${durationLabel} (${percentageLabel})`,\n          )}`,\n        );\n        this.reportEvent({ ...event, indent: indent + 1, measure });\n      } catch {\n        // If measuring fails (e.g., marks don't exist), silently skip this event\n        // to avoid crashing the application\n      }\n    });\n  }\n\n  private start(id: string): PerformanceMark {\n    return performance.mark(idStart(id));\n  }\n\n  private storeEvent({\n    result,\n    ...event\n  }: Pick<LoggerEvent, 'events' | 'id' | 'name' | 'start'> & {\n    result: StoredEventResult;\n  }): void {\n    const lastEventIndex = event.events.length - 1;\n    const lastEvent = event.events[lastEventIndex];\n    if (lastEvent && !lastEvent.end) {\n      result.position = [...result.position, lastEventIndex];\n      this.storeEvent({ ...event, events: lastEvent.events, result });\n      return;\n    }\n    const length = event.events.push({ ...event, events: [] });\n    result.position = [...result.position, length - 1];\n  }\n\n  timeEvent(name: string) {\n    const id = nameToId(name);\n    const start = this.start(id);\n    const event: LoggerEvent = {\n      events: this.events,\n      id,\n      name,\n      start,\n    };\n    const result: StoredEventResult = {\n      position: [],\n    };\n    this.storeEvent({ ...event, result });\n    return {\n      mark: start,\n      timeEnd: () => this.end(result),\n    };\n  }\n}\n"
  },
  {
    "path": "packages/codegen-core/src/nodes/node.ts",
    "content": "import type { File } from '../files/file';\nimport type { Language } from '../languages/types';\nimport type { IAnalysisContext } from '../planner/types';\nimport type { Ref } from '../refs/types';\nimport type { Symbol } from '../symbols/symbol';\n\nexport type MaybeRef<T> = T | Ref<T>;\n\nexport type NodeName = MaybeRef<Symbol | string | number>;\n\nexport type NodeNameSanitizer = (name: string) => string;\n\nexport type NodeRelationship = 'container' | 'reference';\n\nexport type NodeScope = 'type' | 'value';\n\nexport interface INode<T = unknown> {\n  /** Perform semantic analysis. */\n  analyze(ctx: IAnalysisContext): void;\n  /** Create a shallow copy of this node. */\n  clone(): this;\n  /** Whether this node is exported from its file. */\n  exported?: boolean;\n  /** The file this node belongs to. */\n  file?: File;\n  /** The programming language associated with this node */\n  language: Language;\n  /** The display name of this node. */\n  readonly name: Ref<NodeName> & {\n    set(value: NodeName): void;\n    toString(): string;\n  };\n  /** Optional function to sanitize the node name. */\n  readonly nameSanitizer?: NodeNameSanitizer;\n  /** Whether this node is a root node in the file. */\n  root?: boolean;\n  /** The scope of this node. */\n  scope?: NodeScope;\n  /** Semantic children in the structure hierarchy. */\n  structuralChildren?: Map<INode, NodeRelationship>;\n  /** Semantic parents in the structure hierarchy. */\n  structuralParents?: Map<INode, NodeRelationship>;\n  /** The symbol associated with this node. */\n  symbol?: Symbol;\n  /** Convert this node into AST representation. */\n  toAst(): T;\n  /** Brand used for renderer dispatch. */\n  readonly '~brand': string;\n}\n"
  },
  {
    "path": "packages/codegen-core/src/nodes/registry.ts",
    "content": "import { fromRef, ref } from '../refs/refs';\nimport type { Ref } from '../refs/types';\nimport type { INode } from './node';\nimport type { INodeRegistry } from './types';\n\nexport class NodeRegistry implements INodeRegistry {\n  private list: Array<Ref<INode | null>> = [];\n\n  add(node: INode | null): number {\n    const index = this.list.push(ref(node));\n    return index - 1;\n  }\n\n  *all(): Iterable<INode> {\n    for (const r of this.list) {\n      const node = fromRef(r);\n      if (node) yield node;\n    }\n  }\n\n  remove(index: number): void {\n    this.list[index] = ref(null);\n  }\n\n  update(index: number, node: INode | null): void {\n    this.list[index] = ref(node);\n  }\n}\n"
  },
  {
    "path": "packages/codegen-core/src/nodes/types.ts",
    "content": "import type { INode } from './node';\n\nexport interface INodeRegistry {\n  /**\n   * Register a syntax node.\n   *\n   * @returns The index of the registered node.\n   */\n  add(node: INode | null): number;\n  /**\n   * All nodes in insertion order.\n   */\n  all(): Iterable<INode>;\n  /**\n   * Remove a node by its index.\n   *\n   * @param index Index of the node to remove.\n   */\n  remove(index: number): void;\n  /**\n   * Update a node at the given index.\n   *\n   * @param index Index of the node to update.\n   * @param node New node to set.\n   */\n  update(index: number, node: INode | null): void;\n}\n"
  },
  {
    "path": "packages/codegen-core/src/output.ts",
    "content": "export interface IOutput {\n  /**\n   * The main content of the file to output.\n   *\n   * A raw string representing source code.\n   *\n   * @example \"function foo(): void {\\n  // implementation\\n}\\n\"\n   */\n  content: string;\n  /**\n   * Logical output path (used for writing the file).\n   *\n   * @example \"models/user.ts\"\n   */\n  path: string;\n}\n"
  },
  {
    "path": "packages/codegen-core/src/planner/analyzer.ts",
    "content": "import { isNodeRef, isSymbolRef } from '../guards';\nimport type { INode, NodeRelationship } from '../nodes/node';\nimport { fromRef, isRef, ref } from '../refs/refs';\nimport type { Ref } from '../refs/types';\nimport type { Symbol } from '../symbols/symbol';\nimport type { NameScopes, Scope } from './scope';\nimport { createScope } from './scope';\nimport type { IAnalysisContext, Input } from './types';\n\nexport class AnalysisContext implements IAnalysisContext {\n  /**\n   * Stack of parent nodes during analysis.\n   *\n   * The top of the stack is the current semantic container.\n   */\n  private _parentStack: Array<INode> = [];\n\n  scope: Scope;\n  scopes: Scope = createScope();\n  symbol?: Symbol;\n\n  constructor(node: INode) {\n    this._parentStack.push(node);\n    this.scope = this.scopes;\n    this.symbol = node.symbol;\n  }\n\n  /**\n   * Get the current semantic parent (top of stack).\n   */\n  get currentParent(): INode | undefined {\n    return this._parentStack[this._parentStack.length - 1];\n  }\n\n  /**\n   * Register a child node under the current parent.\n   */\n  addChild(child: INode, relationship: NodeRelationship = 'container'): void {\n    const parent = this.currentParent;\n    if (!parent) return;\n\n    if (!parent.structuralChildren) {\n      parent.structuralChildren = new Map();\n    }\n    parent.structuralChildren.set(child, relationship);\n\n    if (!child.structuralParents) {\n      child.structuralParents = new Map();\n    }\n    child.structuralParents.set(parent, relationship);\n  }\n\n  addDependency(symbol: Ref<Symbol>): void {\n    if (this.symbol !== fromRef(symbol)) {\n      this.scope.symbols.push(symbol);\n    }\n  }\n\n  analyze(input: Input): void {\n    const value = isRef(input) ? input : ref(input);\n    if (isSymbolRef(value)) {\n      const symbol = fromRef(value);\n      // avoid adding self as child\n      if (symbol.node && this.currentParent !== symbol.node) {\n        this.addChild(symbol.node, 'reference');\n      }\n      this.addDependency(value);\n    } else if (isNodeRef(value)) {\n      const node = fromRef(value);\n      this.addChild(node, 'container');\n      this.pushParent(node);\n      node.analyze(this);\n      this.popParent();\n    }\n  }\n\n  localNames(scope: Scope): NameScopes {\n    const names: NameScopes = new Map();\n    for (const [name, kinds] of scope.localNames) {\n      names.set(name, new Set(kinds));\n    }\n    if (scope.parent) {\n      const parentNames = this.localNames(scope.parent);\n      for (const [name, kinds] of parentNames) {\n        if (!names.has(name)) {\n          names.set(name, kinds);\n        } else {\n          const existingKinds = names.get(name)!;\n          for (const kind of kinds) {\n            existingKinds.add(kind);\n          }\n        }\n      }\n    }\n    return names;\n  }\n\n  /**\n   * Pop the current semantic parent.\n   * Call this when exiting a container node.\n   */\n  popParent(): void {\n    this._parentStack.pop();\n  }\n\n  popScope(): void {\n    this.scope = this.scope.parent ?? this.scope;\n  }\n\n  /**\n   * Push a node as the current semantic parent.\n   */\n  pushParent(node: INode): void {\n    this._parentStack.push(node);\n  }\n\n  pushScope(): void {\n    const scope = createScope({ parent: this.scope });\n    this.scope.children.push(scope);\n    this.scope = scope;\n  }\n\n  walkScopes(\n    callback: (symbol: Ref<Symbol>, scope: Scope) => void,\n    scope: Scope = this.scopes,\n  ): void {\n    this.scope = scope;\n    for (const symbol of scope.symbols) {\n      callback(symbol, scope);\n    }\n    for (const child of scope.children) {\n      scope = child;\n      this.walkScopes(callback, scope);\n    }\n    this.scope = this.scopes;\n  }\n}\n\nexport class Analyzer {\n  private nodeCache = new WeakMap<INode, AnalysisContext>();\n\n  analyzeNode(node: INode): AnalysisContext {\n    const cached = this.nodeCache.get(node);\n    if (cached) return cached;\n\n    node.root = true;\n    const ctx = new AnalysisContext(node);\n    node.analyze(ctx);\n\n    this.nodeCache.set(node, ctx);\n    return ctx;\n  }\n\n  analyze(nodes: Iterable<INode>, callback?: (ctx: AnalysisContext, node: INode) => void): void {\n    for (const node of nodes) {\n      const ctx = this.analyzeNode(node);\n      callback?.(ctx, node);\n    }\n  }\n}\n"
  },
  {
    "path": "packages/codegen-core/src/planner/planner.ts",
    "content": "import path from 'node:path';\n\nimport type { ExportModule, ImportModule } from '../bindings';\nimport type { IProjectRenderMeta } from '../extensions';\nimport type { File } from '../files/file';\nimport type { INode } from '../nodes/node';\nimport { canDeclarationsShareIdentifier } from '../project/namespace';\nimport type { IProject } from '../project/types';\nimport { fromRef } from '../refs/refs';\nimport type { RenderContext } from '../renderer';\nimport type { Symbol } from '../symbols/symbol';\nimport type { SymbolKind } from '../symbols/types';\nimport type { AnalysisContext } from './analyzer';\nimport { Analyzer } from './analyzer';\nimport type { AssignOptions, Scope } from './scope';\nimport { createScope } from './scope';\n\nconst isTypeOnlyKind = (kind: SymbolKind) => kind === 'type' || kind === 'interface';\n\nexport class Planner {\n  private readonly analyzer = new Analyzer();\n  private readonly cacheResolvedNames = new Set<number>();\n  private readonly project: IProject;\n\n  constructor(project: IProject) {\n    this.project = project;\n  }\n\n  /**\n   * Executes the planning phase for the project.\n   */\n  plan(meta?: IProjectRenderMeta) {\n    this.cacheResolvedNames.clear();\n    this.allocateFiles();\n    this.assignLocalNames();\n    this.resolveFilePaths(meta);\n    this.planExports();\n    this.planImports();\n  }\n\n  /**\n   * Creates and assigns a file to every node, re-export,\n   * and external dependency.\n   */\n  private allocateFiles(): void {\n    this.analyzer.analyze(this.project.nodes.all(), (ctx, node) => {\n      const symbol = node.symbol;\n      if (!symbol) return;\n\n      const file = this.project.files.register({\n        external: false,\n        language: node.language,\n        logicalFilePath: symbol.getFilePath?.(symbol) || this.project.defaultFileName,\n      });\n      file.addNode(node);\n      symbol.setFile(file);\n      for (const logicalFilePath of symbol.getExportFromFilePath?.(symbol) ?? []) {\n        this.project.files.register({\n          external: false,\n          language: file.language,\n          logicalFilePath,\n        });\n      }\n      ctx.walkScopes((dependency) => {\n        const dep = fromRef(dependency);\n        if (dep.external && dep.isCanonical && !dep.file) {\n          const file = this.project.files.register({\n            external: true,\n            language: dep.node?.language,\n            logicalFilePath: dep.external,\n          });\n          dep.setFile(file);\n        }\n      });\n    });\n  }\n\n  /**\n   * Assigns final names to all symbols.\n   *\n   * First assigns top-level (file-scoped) symbol names, then local symbols.\n   */\n  private assignLocalNames(): void {\n    this.analyzer.analyze(this.project.nodes.all(), (ctx, node) => {\n      const symbol = node.symbol;\n      if (!symbol) return;\n      this.assignTopLevelName({ ctx, node, symbol });\n    });\n\n    this.analyzer.analyze(this.project.nodes.all(), (ctx, node) => {\n      const file = node.file;\n      if (!file) return;\n      ctx.walkScopes((dependency) => {\n        const dep = fromRef(dependency);\n        // top-level or external symbol\n        if (dep.file) return;\n        // TODO: pass node\n        this.assignLocalName({\n          ctx,\n          file,\n          scopesToUpdate: [createScope({ localNames: file.allNames })],\n          symbol: dep,\n        });\n      });\n    });\n  }\n\n  /**\n   * Resolves and sets final file paths for all non-external files. Attaches renderers.\n   *\n   * Uses the project's fileName function if provided, otherwise uses the file's current name.\n   *\n   * Resolves final paths relative to the project's root directory.\n   */\n  private resolveFilePaths(meta?: IProjectRenderMeta): void {\n    for (const file of this.project.files.registered()) {\n      if (file.external) {\n        file.setFinalPath(file.logicalFilePath);\n        continue;\n      }\n      const finalName = this.project.fileName?.(file.name) || file.name;\n      file.setName(finalName);\n      const finalPath = file.finalPath;\n      if (finalPath) {\n        file.setFinalPath(path.resolve(this.project.root, finalPath));\n      }\n      const ctx: RenderContext = { file, meta, project: this.project };\n      const renderer = this.project.renderers.find((r) => r.supports(ctx));\n      if (renderer) file.setRenderer(renderer);\n    }\n  }\n\n  /**\n   * Plans exports by analyzing all exported symbols.\n   *\n   * Registers re-export targets as files and creates new exported symbols for them.\n   *\n   * Assigns names to re-exported symbols and collects re-export metadata,\n   * distinguishing type-only exports based on symbol kinds.\n   */\n  private planExports(): void {\n    const seenByFile = new Map<File, Map<string, { kinds: Set<SymbolKind>; symbol: Symbol }>>();\n    const sourceFile = new Map<number, File>();\n\n    this.analyzer.analyze(this.project.nodes.all(), (ctx, node) => {\n      if (!node.exported) return;\n\n      const symbol = node.symbol;\n      if (!symbol) return;\n\n      const file = node.file;\n      if (!file) return;\n\n      for (const logicalFilePath of symbol.getExportFromFilePath?.(symbol) ?? []) {\n        const target = this.project.files.register({\n          external: false,\n          language: node.language,\n          logicalFilePath,\n        });\n        if (target.id === file.id) continue;\n\n        let fileMap = seenByFile.get(target);\n        if (!fileMap) {\n          fileMap = new Map();\n          seenByFile.set(target, fileMap);\n        }\n\n        const exp = this.project.symbols.register({\n          exported: true,\n          external: symbol.external,\n          importKind: symbol.importKind,\n          kind: symbol.kind,\n          name: symbol.finalName,\n        });\n        exp.setFile(target);\n        sourceFile.set(exp.id, file);\n        // TODO: pass node\n        this.assignTopLevelName({ ctx, symbol: exp });\n\n        let entry = fileMap.get(exp.finalName);\n        if (!entry) {\n          entry = { kinds: new Set(), symbol: exp };\n          fileMap.set(exp.finalName, entry);\n        }\n        entry.kinds.add(exp.kind);\n      }\n    });\n\n    for (const [file, fileMap] of seenByFile) {\n      const exports = new Map<File, ExportModule>();\n      for (const [, entry] of fileMap) {\n        const source = sourceFile.get(entry.symbol.id)!;\n        let exp = exports.get(source);\n        if (!exp) {\n          exp = {\n            canExportAll: true,\n            exports: [],\n            from: source,\n            isTypeOnly: true,\n          };\n        }\n        const isTypeOnly = [...entry.kinds].every((kind) => isTypeOnlyKind(kind));\n        const exportedName = entry.symbol.finalName;\n        exp.exports.push({\n          exportedName,\n          isTypeOnly,\n          kind: entry.symbol.importKind,\n          sourceName: entry.symbol.name,\n        });\n        if (entry.symbol.name !== entry.symbol.finalName) {\n          exp.canExportAll = false;\n        }\n        if (!isTypeOnly) {\n          exp.isTypeOnly = false;\n        }\n        exports.set(source, exp);\n      }\n      for (const [, exp] of exports) {\n        file.addExport(exp);\n      }\n    }\n  }\n\n  /**\n   * Plans imports by analyzing symbol dependencies across files.\n   *\n   * For external dependencies, assigns top-level names.\n   *\n   * Creates or reuses import symbols for dependencies from other files,\n   * assigning names and updating import metadata including type-only flags.\n   */\n  private planImports(): void {\n    const seenByFile = new Map<\n      File,\n      Map<\n        string,\n        {\n          dep: Symbol;\n          kinds: Set<SymbolKind>;\n          symbol: Symbol;\n        }\n      >\n    >();\n\n    this.analyzer.analyze(this.project.nodes.all(), (ctx) => {\n      const symbol = ctx.symbol;\n      if (!symbol) return;\n\n      const file = symbol.file;\n      if (!file) return;\n\n      let fileMap = seenByFile.get(file);\n      if (!fileMap) {\n        fileMap = new Map();\n        seenByFile.set(file, fileMap);\n      }\n\n      ctx.walkScopes((dependency) => {\n        const dep = fromRef(dependency);\n        if (!dep.file || dep.file.id === file.id) return;\n\n        if (dep.external) {\n          // TODO: pass node\n          this.assignTopLevelName({ ctx, symbol: dep });\n        }\n\n        const fromFileId = dep.file.id;\n        const importedName = dep.finalName;\n        const kind = dep.importKind;\n        const key = `${fromFileId}|${importedName}|${kind}`;\n\n        let entry = fileMap.get(key);\n        if (!entry) {\n          const imp = this.project.symbols.register({\n            exported: dep.exported,\n            external: dep.external,\n            importKind: dep.importKind,\n            kind: dep.kind,\n            name: dep.finalName,\n          });\n          imp.setFile(file);\n          // TODO: pass node\n          this.assignTopLevelName({\n            ctx,\n            scope: createScope({ localNames: imp.file!.allNames }),\n            symbol: imp,\n          });\n          entry = {\n            dep,\n            kinds: new Set(),\n            symbol: imp,\n          };\n          fileMap.set(key, entry);\n        }\n        entry.kinds.add(dep.kind);\n\n        dependency['~ref'] = entry.symbol;\n      });\n    });\n\n    for (const [file, fileMap] of seenByFile) {\n      const imports = new Map<File, ImportModule>();\n      for (const [, entry] of fileMap) {\n        const source = entry.dep.file!;\n        let imp = imports.get(source);\n        if (!imp) {\n          imp = {\n            from: source,\n            imports: [],\n            isTypeOnly: true,\n            kind: 'named',\n          };\n        }\n        const isTypeOnly = [...entry.kinds].every((kind) => isTypeOnlyKind(kind));\n        if (entry.symbol.importKind === 'namespace') {\n          imp.imports = [];\n          imp.kind = 'namespace';\n          imp.localName = entry.symbol.finalName;\n        } else if (entry.symbol.importKind === 'default') {\n          imp.kind = 'default';\n          imp.localName = entry.symbol.finalName;\n        } else {\n          imp.imports.push({\n            isTypeOnly,\n            localName: entry.symbol.finalName,\n            sourceName: entry.dep.finalName,\n          });\n        }\n        if (!isTypeOnly) {\n          imp.isTypeOnly = false;\n        }\n        imports.set(source, imp);\n      }\n      for (const [, imp] of imports) {\n        file.addImport(imp);\n      }\n    }\n  }\n\n  /**\n   * Assigns the final name to a top-level (file-scoped) symbol.\n   *\n   * Uses the symbol's file top-level names as the default scope,\n   * and updates all relevant name scopes including the file's allNames and local scopes.\n   *\n   * Supports optional overrides for the naming scope and scopes to update.\n   */\n  private assignTopLevelName(\n    args: Partial<AssignOptions> & {\n      ctx: AnalysisContext;\n      debug?: boolean;\n      node?: INode;\n      symbol: Symbol;\n    },\n  ): void {\n    if (!args.symbol.file) return;\n    this.assignSymbolName({\n      ...args,\n      file: args.symbol.file,\n      scope: args?.scope ?? createScope({ localNames: args.symbol.file.topLevelNames }),\n      scopesToUpdate: [\n        createScope({ localNames: args.symbol.file.allNames }),\n        args.ctx.scopes,\n        ...(args?.scopesToUpdate ?? []),\n      ],\n    });\n  }\n\n  /**\n   * Assigns the final name to a non-top-level (local) symbol.\n   *\n   * Uses the provided scope or derives it from the current analysis context's local names.\n   *\n   * Updates all provided name scopes accordingly.\n   */\n  private assignLocalName(\n    args: Pick<Partial<AssignOptions>, 'scope'> &\n      Pick<AssignOptions, 'scopesToUpdate'> & {\n        ctx: AnalysisContext;\n        debug?: boolean;\n        /** The file the symbol belongs to. */\n        file: File;\n        node?: INode;\n        symbol: Symbol;\n      },\n  ): void {\n    this.assignSymbolName({\n      ...args,\n      scope: args.scope ?? args.ctx.scope,\n    });\n  }\n\n  /**\n   * Assigns the final name to a symbol within the provided name scope.\n   *\n   * Resolves name conflicts until a unique name is found.\n   *\n   * Updates all specified name scopes with the assigned final name.\n   */\n  private assignSymbolName(\n    args: AssignOptions & {\n      ctx: AnalysisContext;\n      debug?: boolean;\n      /** The file the symbol belongs to. */\n      file: File;\n      node?: INode;\n      symbol: Symbol;\n    },\n  ): void {\n    const { ctx, file, node, scope, scopesToUpdate, symbol } = args;\n    if (this.cacheResolvedNames.has(symbol.id)) return;\n\n    const baseName = symbol.name;\n    let finalName =\n      node?.nameSanitizer?.(baseName) ?? symbol.node?.nameSanitizer?.(baseName) ?? baseName;\n    let attempt = 1;\n\n    const localNames = ctx.localNames(scope);\n    while (true) {\n      const language = node?.language || symbol.node?.language || file.language;\n\n      const kinds = [...(localNames.get(finalName) ?? [])];\n\n      const ok = kinds.every((kind) => canDeclarationsShareIdentifier(language, symbol.kind, kind));\n      if (ok) break;\n\n      const resolver =\n        (language ? this.project.nameConflictResolvers[language] : undefined) ??\n        this.project.defaultNameConflictResolver;\n      const resolvedName = resolver({ attempt, baseName });\n      if (!resolvedName) {\n        throw new Error(`Unresolvable name conflict: ${symbol.toString()}`);\n      }\n\n      finalName =\n        node?.nameSanitizer?.(resolvedName) ??\n        symbol.node?.nameSanitizer?.(resolvedName) ??\n        resolvedName;\n      attempt = attempt + 1;\n    }\n\n    symbol.setFinalName(finalName);\n    this.cacheResolvedNames.add(symbol.id);\n    const updateScopes = [scope, ...scopesToUpdate];\n    for (const scope of updateScopes) {\n      this.updateScope(symbol, scope);\n    }\n  }\n\n  /**\n   * Updates the provided name scope with the symbol's final name and kind.\n   *\n   * Ensures the name scope tracks all kinds associated with a given name.\n   */\n  private updateScope(symbol: Symbol, scope: Scope): void {\n    const name = symbol.finalName;\n    const cache = scope.localNames.get(name) ?? new Set();\n    cache.add(symbol.kind);\n    scope.localNames.set(name, cache);\n  }\n}\n"
  },
  {
    "path": "packages/codegen-core/src/planner/resolvers.ts",
    "content": "import type { NameConflictResolver } from './types';\n\nexport const simpleNameConflictResolver: NameConflictResolver = ({ attempt, baseName }) =>\n  attempt === 0 ? baseName : `${baseName}${attempt + 1}`;\n\nexport const underscoreNameConflictResolver: NameConflictResolver = ({ attempt, baseName }) =>\n  attempt === 0 ? baseName : `${baseName}_${attempt + 1}`;\n"
  },
  {
    "path": "packages/codegen-core/src/planner/scope.ts",
    "content": "import type { Ref } from '../refs/types';\nimport type { Symbol } from '../symbols/symbol';\nimport type { SymbolKind } from '../symbols/types';\n\nexport type NameScopes = Map<string, Set<SymbolKind>>;\n\nexport type Scope = {\n  /** Child scopes. */\n  children: Array<Scope>;\n  /** Resolved names in this scope. */\n  localNames: NameScopes;\n  /** Parent scope, if any. */\n  parent?: Scope;\n  /** Symbols registered in this scope. */\n  symbols: Array<Ref<Symbol>>;\n};\n\nexport type AssignOptions = {\n  /** The primary scope in which to assign a symbol's final name. */\n  scope: Scope;\n  /** Additional scopes to update as side effects when assigning a symbol's final name. */\n  scopesToUpdate: ReadonlyArray<Scope>;\n};\n\nexport const createScope = (\n  args: {\n    localNames?: NameScopes;\n    parent?: Scope;\n  } = {},\n): Scope => ({\n  children: [],\n  localNames: args.localNames || new Map(),\n  parent: args.parent,\n  symbols: [],\n});\n"
  },
  {
    "path": "packages/codegen-core/src/planner/types.ts",
    "content": "import type { Ref } from '../refs/types';\nimport type { Symbol } from '../symbols/symbol';\nimport type { NameScopes, Scope } from './scope';\n\nexport type Input = Ref<object> | object | string | number | undefined;\n\nexport type NameConflictResolver = (args: { attempt: number; baseName: string }) => string | null;\n\nexport interface IAnalysisContext {\n  /** Register a dependency on another symbol. */\n  addDependency(symbol: Ref<Symbol>): void;\n  /** Register a dependency on another symbol or analyze further. */\n  analyze(input: Input): void;\n  /** Get local names in the current scope. */\n  localNames(scope: Scope): NameScopes;\n  /** Pop the current local scope. */\n  popScope(): void;\n  /** Push a new local scope. */\n  pushScope(): void;\n  /** Current local scope. */\n  scope: Scope;\n  /** Stack of local name scopes. */\n  scopes: Scope;\n  /** Top-level symbol for the current analysis pass. */\n  symbol?: Symbol;\n  /** Walks all symbols in the scope tree in depth-first order. */\n  walkScopes(callback: (symbol: Ref<Symbol>, scope: Scope) => void, scope?: Scope): void;\n}\n"
  },
  {
    "path": "packages/codegen-core/src/project/namespace.ts",
    "content": "import type { Language } from '../languages/types';\nimport type { SymbolKind } from '../symbols/types';\n\nconst typescriptMergeKindRank: Record<SymbolKind, number> = {\n  class: 3,\n  enum: 4,\n  function: 5,\n  interface: 1,\n  namespace: 0,\n  type: 2,\n  var: 6,\n};\n\n/**\n * Returns true if two declarations of given kinds\n * are allowed to share the same identifier in TypeScript.\n */\nfunction canTypeScriptDeclarationsShareIdentifier(a: SymbolKind, b: SymbolKind): boolean {\n  // sort based on TypeScript merge precedence so `a` is always the weaker merge candidate\n  // ensures that asymmetric merges like `type + var` are correctly handled\n  if (typescriptMergeKindRank[a] > typescriptMergeKindRank[b]) {\n    [a, b] = [b, a];\n  }\n\n  switch (a) {\n    case 'interface':\n      return b === 'class' || b === 'interface';\n    case 'namespace':\n      return b === 'class' || b === 'enum' || b === 'function' || b === 'namespace';\n    case 'type':\n      // type can only merge with value-only declarations\n      return b === 'function' || b === 'var';\n    default:\n      return false;\n  }\n}\n\nexport function canDeclarationsShareIdentifier(\n  language: Language | undefined,\n  a: SymbolKind,\n  b: SymbolKind,\n): boolean {\n  if (language === 'typescript') {\n    return canTypeScriptDeclarationsShareIdentifier(a, b);\n  }\n\n  return false;\n}\n"
  },
  {
    "path": "packages/codegen-core/src/project/project.ts",
    "content": "import path from 'node:path';\n\nimport type { IProjectRenderMeta } from '../extensions';\nimport { FileRegistry } from '../files/registry';\nimport { defaultExtensions } from '../languages/extensions';\nimport { defaultModuleEntryNames } from '../languages/modules';\nimport { defaultNameConflictResolvers } from '../languages/resolvers';\nimport type { Extensions, ModuleEntryNames, NameConflictResolvers } from '../languages/types';\nimport { NodeRegistry } from '../nodes/registry';\nimport type { IOutput } from '../output';\nimport { Planner } from '../planner/planner';\nimport { simpleNameConflictResolver } from '../planner/resolvers';\nimport type { NameConflictResolver } from '../planner/types';\nimport type { Renderer } from '../renderer';\nimport { SymbolRegistry } from '../symbols/registry';\nimport type { IProject } from './types';\n\nexport class Project implements IProject {\n  private _isPlanned = false;\n\n  readonly files: FileRegistry;\n  readonly nodes = new NodeRegistry();\n  readonly symbols = new SymbolRegistry();\n\n  readonly defaultFileName: string;\n  readonly defaultNameConflictResolver: NameConflictResolver;\n  readonly extensions: Extensions;\n  readonly fileName?: (name: string) => string;\n  readonly moduleEntryNames: ModuleEntryNames;\n  readonly nameConflictResolvers: NameConflictResolvers;\n  readonly renderers: ReadonlyArray<Renderer>;\n  readonly root: string;\n\n  constructor(\n    args: Pick<\n      Partial<IProject>,\n      | 'defaultFileName'\n      | 'defaultNameConflictResolver'\n      | 'extensions'\n      | 'fileName'\n      | 'moduleEntryNames'\n      | 'nameConflictResolvers'\n      | 'renderers'\n    > &\n      Pick<IProject, 'root'>,\n  ) {\n    const fileName = args.fileName;\n    this.defaultFileName = args.defaultFileName ?? 'main';\n    this.defaultNameConflictResolver =\n      args.defaultNameConflictResolver ?? simpleNameConflictResolver;\n    this.extensions = {\n      ...defaultExtensions,\n      ...args.extensions,\n    };\n    this.fileName = typeof fileName === 'string' ? () => fileName : fileName;\n    this.files = new FileRegistry(this);\n    this.moduleEntryNames = {\n      ...defaultModuleEntryNames,\n      ...args.moduleEntryNames,\n    };\n    this.nameConflictResolvers = {\n      ...defaultNameConflictResolvers,\n      ...args.nameConflictResolvers,\n    };\n    this.renderers = args.renderers ?? [];\n    this.root = path.resolve(args.root).replace(/[/\\\\]+$/, '');\n  }\n\n  plan(meta?: IProjectRenderMeta): void {\n    if (this._isPlanned) return;\n    new Planner(this).plan(meta);\n    this._isPlanned = true;\n  }\n\n  render(meta?: IProjectRenderMeta): ReadonlyArray<IOutput> {\n    if (!this._isPlanned) this.plan(meta);\n    const files: Array<IOutput> = [];\n    for (const file of this.files.registered()) {\n      if (!file.external && file.finalPath && file.renderer) {\n        const content = file.renderer.render({ file, meta, project: this });\n        files.push({ content, path: file.finalPath });\n      }\n    }\n    return files;\n  }\n}\n"
  },
  {
    "path": "packages/codegen-core/src/project/types.ts",
    "content": "import type { IProjectRenderMeta } from '../extensions';\nimport type { IFileRegistry } from '../files/types';\nimport type { Extensions, ModuleEntryNames, NameConflictResolvers } from '../languages/types';\nimport type { INodeRegistry } from '../nodes/types';\nimport type { IOutput } from '../output';\nimport type { NameConflictResolver } from '../planner/types';\nimport type { Renderer } from '../renderer';\nimport type { ISymbolRegistry } from '../symbols/types';\n\n/**\n * Represents a code generation project consisting of codegen files.\n *\n * Manages imports, symbols, and output generation across the project.\n */\nexport interface IProject {\n  /**\n   * The default file to assign symbols without a specific file selector.\n   *\n   * @default 'main'\n   */\n  readonly defaultFileName: string;\n  /** Default name conflict resolver used when a file has no specific resolver. */\n  readonly defaultNameConflictResolver: NameConflictResolver;\n  /**\n   * Maps language to array of extensions. First element is used by default.\n   *\n   * @example\n   * ```ts\n   * const exts: Extensions = {\n   *   typescript: ['.ts', '.tsx'],\n   *   python: ['.py'],\n   * };\n   * ```\n   */\n  readonly extensions: Extensions;\n  /**\n   * Function to transform file names before they are used.\n   *\n   * @param name The original file name.\n   * @returns The transformed file name.\n   */\n  readonly fileName?: (name: string) => string;\n  /** Centralized file registry for the project. */\n  readonly files: IFileRegistry;\n  /**\n   * Map of module entry names for each language.\n   *\n   * @example\n   * ```ts\n   * const entries: ModuleEntryNames = {\n   *   typescript: 'index',\n   *   python: '__init__',\n   * };\n   * ```\n   */\n  readonly moduleEntryNames: ModuleEntryNames;\n  /**\n   * Map of language-specific name conflict resolvers for files in the project.\n   *\n   * @example\n   * ```ts\n   * const resolvers: NameConflictResolvers = {\n   *   typescript: myTypeScriptResolver,\n   *   python: myPythonResolver,\n   * };\n   * ```\n   */\n  readonly nameConflictResolvers: NameConflictResolvers;\n  /** Centralized node registry for the project. */\n  readonly nodes: INodeRegistry;\n  /**\n   * Finalizes the project structure, resolving nodes, symbols, and dependencies.\n   *\n   * @param meta Arbitrary metadata.\n   * @returns void\n   */\n  plan(meta?: IProjectRenderMeta): void;\n  /**\n   * Produces output representations for all files in the project.\n   *\n   * @param meta Arbitrary metadata.\n   * @returns Array of outputs ready for writing or further processing.\n   * @example\n   * project.render().forEach(output => writeFile(output));\n   */\n  render(meta?: IProjectRenderMeta): ReadonlyArray<IOutput>;\n  /**\n   * List of available renderers.\n   *\n   * @example\n   * [new TypeScriptRenderer()]\n   */\n  readonly renderers: ReadonlyArray<Renderer>;\n  /** The absolute path to the root folder of the project. */\n  readonly root: string;\n  /** Centralized symbol registry for the project. */\n  readonly symbols: ISymbolRegistry;\n}\n"
  },
  {
    "path": "packages/codegen-core/src/refs/refs.ts",
    "content": "import type { FromRef, FromRefs, Ref, Refs } from './types';\n\n/**\n * Wraps a single value in a Ref object.\n *\n * If the value is already a Ref, returns it as-is (idempotent).\n *\n * @example\n * ```ts\n * const r = ref(123); // { '~ref': 123 }\n * console.log(r['~ref']); // 123\n *\n * const r2 = ref(r); // { '~ref': 123 } (not double-wrapped)\n * ```\n */\nexport const ref = <T>(value: T): Ref<T> => {\n  if (isRef(value)) {\n    return value as Ref<T>;\n  }\n  return { '~ref': value } as Ref<T>;\n};\n\n/**\n * Converts a plain object to an object of Refs (deep, per property).\n *\n * @example\n * ```ts\n * const obj = { a: 1, b: \"x\" };\n * const refs = refs(obj); // { a: { '~ref': 1 }, b: { '~ref': \"x\" } }\n * ```\n */\nexport const refs = <T extends Record<string, unknown>>(obj: T): Refs<T> => {\n  const result = {} as Refs<T>;\n  for (const key in obj) {\n    if (Object.prototype.hasOwnProperty.call(obj, key)) {\n      result[key] = ref(obj[key]);\n    }\n  }\n  return result;\n};\n\n/**\n * Unwraps a single Ref object to its value.\n *\n * @example\n * ```ts\n * const r = { '~ref': 42 };\n * const n = fromRef(r); // 42\n * console.log(n); // 42\n * ```\n */\nexport const fromRef = <T extends Ref<unknown> | undefined>(ref: T): FromRef<T> =>\n  ref?.['~ref'] as FromRef<T>;\n\n/**\n * Converts an object of Refs back to a plain object (unwraps all refs).\n *\n * @example\n * ```ts\n * const refs = { a: { '~ref': 1 }, b: { '~ref': \"x\" } };\n * const plain = fromRefs(refs); // { a: 1, b: \"x\" }\n * ```\n */\nexport const fromRefs = <T extends Refs<Record<string, unknown>>>(obj: T): FromRefs<T> => {\n  const result = {} as FromRefs<T>;\n  for (const key in obj) {\n    if (Object.prototype.hasOwnProperty.call(obj, key)) {\n      result[key] = fromRef(obj[key]!) as (typeof result)[typeof key];\n    }\n  }\n  return result;\n};\n\n/**\n * Checks whether a value is a Ref object.\n *\n * @param value Value to check\n * @returns True if the value is a Ref object.\n */\nexport const isRef = <T>(value: unknown): value is Ref<T> =>\n  typeof value === 'object' && value !== null && '~ref' in value;\n"
  },
  {
    "path": "packages/codegen-core/src/refs/types.ts",
    "content": "/**\n * Ref wrapper which ensures a stable reference for a value.\n *\n * @example\n * ```ts\n * type NumRef = Ref<number>; // { '~ref': number }\n * const num: NumRef = { '~ref': 42 };\n * console.log(num['~ref']); // 42\n * ```\n */\nexport type Ref<T> = T extends { ['~ref']: unknown } ? T : { '~ref': T };\n\n/**\n * Maps every property of `T` to a `Ref` of that property.\n *\n * @example\n * ```ts\n * type Foo = { a: number; b: string };\n * type Refs = Refs<Foo>; // { a: Ref<number>; b: Ref<string> }\n * const refs: Refs = { a: { '~ref': 1 }, b: { '~ref': 'x' } };\n * console.log(refs.a['~ref'], refs.b['~ref']); // 1 'x'\n * ```\n */\nexport type Refs<T> = {\n  [K in keyof T]: Ref<T[K]>;\n};\n\n/**\n * Unwraps a Ref to its value type.\n *\n * @example\n * ```ts\n * type N = FromRef<{ '~ref': number }>; // number\n * ```\n */\nexport type FromRef<T> = T extends { '~ref': infer U } ? U : T;\n\n/**\n * Maps every property of a Ref-wrapped object back to its plain value.\n *\n * @example\n * ```ts\n * type Foo = { a: number; b: string };\n * type Refs = Refs<Foo>; // { a: Ref<number>; b: Ref<string> }\n * type Foo2 = FromRefs<Refs>; // { a: number; b: string }\n * ```\n */\nexport type FromRefs<T> = {\n  [K in keyof T]: T[K] extends Ref<infer U> ? U : T[K];\n};\n"
  },
  {
    "path": "packages/codegen-core/src/renderer.ts",
    "content": "import type { IProjectRenderMeta } from './extensions';\nimport type { File } from './files/file';\nimport type { INode } from './nodes/node';\nimport type { IProject } from './project/types';\n\nexport interface RenderContext<Node extends INode = INode> {\n  /**\n   * The current file.\n   */\n  file: File<Node>;\n  /**\n   * Arbitrary metadata.\n   */\n  meta?: IProjectRenderMeta;\n  /**\n   * The project the file belongs to.\n   */\n  project: IProject;\n}\n\nexport interface Renderer {\n  /** Renders the given file. */\n  render(ctx: RenderContext): string;\n  /** Returns whether this renderer can render the given file. */\n  supports(ctx: RenderContext): boolean;\n}\n"
  },
  {
    "path": "packages/codegen-core/src/structure/model.ts",
    "content": "import { StructureNode } from './node';\nimport type { StructureInsert } from './types';\n\nexport class StructureModel {\n  /** Root nodes mapped by their names. */\n  private _roots: Map<string, StructureNode> = new Map();\n  /** Node for data without a specific root. */\n  private _virtualRoot?: StructureNode;\n\n  /**\n   * Get all root nodes.\n   */\n  get roots(): ReadonlyArray<StructureNode> {\n    const roots = Array.from(this._roots.values());\n    if (this._virtualRoot) roots.unshift(this._virtualRoot);\n    return roots;\n  }\n\n  /**\n   * Insert data into the structure.\n   */\n  insert(args: StructureInsert): void {\n    const { data, locations, source } = args;\n    for (const location of locations) {\n      const { path, shell } = location;\n      const fullPath = path.filter((s): s is string => Boolean(s));\n      const segments = fullPath.slice(0, -1);\n      const name = fullPath[fullPath.length - 1];\n\n      if (!name) {\n        throw new Error('Cannot insert data without path.');\n      }\n\n      let cursor: StructureNode | null = null;\n\n      for (const segment of segments) {\n        if (!cursor) {\n          cursor = this.root(segment);\n        } else {\n          cursor = cursor.child(segment);\n        }\n\n        if (shell && !cursor.shell) {\n          cursor.shell = shell;\n          cursor.shellSource = source;\n        }\n      }\n\n      if (!cursor) {\n        cursor = this.root(null);\n      }\n\n      cursor.items.push({ data, location: fullPath, source });\n    }\n  }\n\n  /**\n   * Gets or creates a root by name.\n   *\n   * If the root doesn't exist, it's created automatically.\n   *\n   * @param name - The name of the root\n   * @returns The root instance\n   */\n  root(name: string | null): StructureNode {\n    if (!name) {\n      return (this._virtualRoot ??= new StructureNode('', undefined, {\n        virtual: true,\n      }));\n    }\n    if (!this._roots.has(name)) {\n      this._roots.set(name, new StructureNode(name));\n    }\n    return this._roots.get(name)!;\n  }\n\n  /**\n   * Walk all nodes in the structure (depth-first, post-order).\n   *\n   * @returns Generator of all structure nodes\n   */\n  *walk(): Generator<StructureNode> {\n    if (this._virtualRoot) {\n      yield* this._virtualRoot.walk();\n    }\n    for (const root of this._roots.values()) {\n      yield* root.walk();\n    }\n  }\n}\n"
  },
  {
    "path": "packages/codegen-core/src/structure/node.ts",
    "content": "import type { StructureItem, StructureShell } from './types';\n\nexport class StructureNode {\n  /** Nested nodes within this node. */\n  children: Map<string, StructureNode> = new Map();\n  /** Items contained in this node. */\n  items: Array<StructureItem> = [];\n  /** The name of this node (e.g., \"Users\", \"Accounts\"). */\n  name: string;\n  /** Parent node in the hierarchy. Undefined if this is the root node. */\n  parent?: StructureNode;\n  /** Shell claimed for this node. */\n  shell?: StructureShell;\n  /** Source of the claimed shell. */\n  shellSource?: symbol;\n  /** True if this is a virtual root. */\n  virtual: boolean;\n\n  constructor(\n    name: string,\n    parent?: StructureNode,\n    options?: {\n      virtual?: boolean;\n    },\n  ) {\n    this.name = name;\n    this.parent = parent;\n    this.virtual = options?.virtual ?? false;\n  }\n\n  get isRoot(): boolean {\n    return !this.parent;\n  }\n\n  /**\n   * Gets or creates a child node.\n   *\n   * If the child doesn't exist, it's created automatically.\n   *\n   * @param name - The name of the child node\n   * @returns The child node instance\n   */\n  child(name: string): StructureNode {\n    if (!this.children.has(name)) {\n      this.children.set(name, new StructureNode(name, this));\n    }\n    return this.children.get(name)!;\n  }\n\n  /**\n   * Gets the full path of this node in the hierarchy.\n   *\n   * @returns An array of node names from the root to this node\n   */\n  getPath(): ReadonlyArray<string> {\n    const path: Array<string> = [];\n    // eslint-disable-next-line @typescript-eslint/no-this-alias\n    let cursor: StructureNode | undefined = this;\n    while (cursor) {\n      path.unshift(cursor.name);\n      cursor = cursor.parent;\n    }\n    return path;\n  }\n\n  /**\n   * Yields items from a specific source with typed data.\n   *\n   * @param source - The source symbol to filter by\n   * @returns Generator of items from that source\n   */\n  *itemsFrom<T = unknown>(source: symbol): Generator<StructureItem & { data: T }> {\n    for (const item of this.items) {\n      if (item.source === source) {\n        yield item as StructureItem & { data: T };\n      }\n    }\n  }\n\n  /**\n   * Walk all nodes in the structure (depth-first, post-order).\n   *\n   * @returns Generator of all structure nodes\n   */\n  *walk(): Generator<StructureNode> {\n    for (const node of this.children.values()) {\n      yield* node.walk();\n    }\n    yield this;\n  }\n}\n"
  },
  {
    "path": "packages/codegen-core/src/structure/types.ts",
    "content": "import type { INode } from '../nodes/node';\nimport type { StructureNode } from './node';\n\nexport interface StructureInsert {\n  /** Inserted data. */\n  data: unknown;\n  /** Locations where the data should be inserted. */\n  locations: ReadonlyArray<StructureLocation>;\n  /** Source of the inserted data. */\n  source: symbol;\n}\n\nexport interface StructureItem extends Pick<StructureInsert, 'data' | 'source'> {\n  /** Location of this item within the structure. */\n  location: ReadonlyArray<string>;\n}\n\nexport interface StructureLocation {\n  /** Path within the structure where the data should be inserted. */\n  path: ReadonlyArray<string>;\n  /** Shell to apply at this location. */\n  shell?: StructureShell;\n}\n\nexport interface StructureShell {\n  define: (node: StructureNode) => StructureShellResult;\n}\n\nexport interface StructureShellResult {\n  dependencies?: Array<INode>;\n  node: INode;\n}\n"
  },
  {
    "path": "packages/codegen-core/src/symbols/registry.ts",
    "content": "import type { ISymbolMeta } from '../extensions';\nimport { Symbol } from './symbol';\nimport type { ISymbolIdentifier, ISymbolIn, ISymbolRegistry } from './types';\n\ntype IndexEntry = [string, unknown];\ntype IndexKeySpace = ReadonlyArray<IndexEntry>;\ntype QueryCacheKey = string;\ntype SymbolId = number;\n\nexport class SymbolRegistry implements ISymbolRegistry {\n  private _id: SymbolId = 0;\n  private _indices: Map<IndexEntry[0], Map<IndexEntry[1], Set<SymbolId>>> = new Map();\n  private _queryCache: Map<QueryCacheKey, ReadonlyArray<SymbolId>> = new Map();\n  private _queryCacheDependencies: Map<QueryCacheKey, Set<QueryCacheKey>> = new Map();\n  private _registered: Set<SymbolId> = new Set();\n  private _stubs: Set<SymbolId> = new Set();\n  private _stubCache: Map<QueryCacheKey, SymbolId> = new Map();\n  private _values: Map<SymbolId, Symbol> = new Map();\n\n  get(identifier: ISymbolIdentifier): Symbol | undefined {\n    return typeof identifier === 'number'\n      ? this._values.get(identifier)\n      : this.query(identifier)[0];\n  }\n\n  isRegistered(identifier: ISymbolIdentifier): boolean {\n    const symbol = this.get(identifier);\n    return symbol ? this._registered.has(symbol.id) : false;\n  }\n\n  get nextId(): SymbolId {\n    return this._id++;\n  }\n\n  query(filter: ISymbolMeta): ReadonlyArray<Symbol> {\n    const cacheKey = this.buildCacheKey(filter);\n    const cachedIds = this._queryCache.get(cacheKey);\n    if (cachedIds) {\n      return cachedIds.map((symbolId) => this._values.get(symbolId)!);\n    }\n    const sets: Array<Set<SymbolId>> = [];\n    const indexKeySpace = this.buildIndexKeySpace(filter);\n    const cacheDependencies = new Set<QueryCacheKey>();\n    let missed = false;\n    for (const indexEntry of indexKeySpace) {\n      cacheDependencies.add(this.serializeIndexEntry(indexEntry));\n      const values = this._indices.get(indexEntry[0]);\n      if (!values) {\n        missed = true;\n        break;\n      }\n      const set = values.get(indexEntry[1]);\n      if (!set) {\n        missed = true;\n        break;\n      }\n      sets.push(set);\n    }\n    if (missed || !sets.length) {\n      this._queryCacheDependencies.set(cacheKey, cacheDependencies);\n      this._queryCache.set(cacheKey, []);\n      return [];\n    }\n    let result = new Set(sets[0]);\n    for (const set of sets.slice(1)) {\n      result = new Set([...result].filter((symbolId) => set.has(symbolId)));\n    }\n    const resultIds = [...result];\n    this._queryCacheDependencies.set(cacheKey, cacheDependencies);\n    this._queryCache.set(cacheKey, resultIds);\n    return resultIds.map((symbolId) => this._values.get(symbolId)!);\n  }\n\n  reference(meta: ISymbolMeta): Symbol {\n    const [registered] = this.query(meta);\n    if (registered) return registered;\n\n    const cacheKey = this.buildCacheKey(meta);\n    const cachedId = this._stubCache.get(cacheKey);\n    if (cachedId !== undefined) return this._values.get(cachedId)!;\n\n    const stub = new Symbol({ meta, name: '' }, this.nextId);\n\n    this._values.set(stub.id, stub);\n    this._stubs.add(stub.id);\n    this._stubCache.set(cacheKey, stub.id);\n    return stub;\n  }\n\n  register(symbol: ISymbolIn): Symbol {\n    const result = new Symbol(symbol, this.nextId);\n\n    this._values.set(result.id, result);\n    this._registered.add(result.id);\n\n    if (result.meta) {\n      const indexKeySpace = this.buildIndexKeySpace(result.meta);\n      this.indexSymbol(result.id, indexKeySpace);\n      this.invalidateCache(indexKeySpace);\n      this.replaceStubs(result, indexKeySpace);\n    }\n\n    return result;\n  }\n\n  *registered(): IterableIterator<Symbol> {\n    for (const id of this._registered.values()) {\n      yield this._values.get(id)!;\n    }\n  }\n\n  private buildCacheKey(filter: ISymbolMeta): QueryCacheKey {\n    const indexKeySpace = this.buildIndexKeySpace(filter);\n    return indexKeySpace\n      .map((indexEntry) => this.serializeIndexEntry(indexEntry))\n      .sort() // ensure order-insensitivity\n      .join('|');\n  }\n\n  private buildIndexKeySpace(meta: ISymbolMeta, prefix = ''): IndexKeySpace {\n    const entries: Array<IndexEntry> = [];\n    for (const [key, value] of Object.entries(meta)) {\n      const path = prefix ? `${prefix}.${key}` : key;\n      if (value && typeof value === 'object' && !Array.isArray(value)) {\n        entries.push(...this.buildIndexKeySpace(value as ISymbolMeta, path));\n      } else {\n        entries.push([path, value]);\n      }\n    }\n    return entries;\n  }\n\n  private indexSymbol(symbolId: SymbolId, indexKeySpace: IndexKeySpace): void {\n    for (const [key, value] of indexKeySpace) {\n      if (!this._indices.has(key)) this._indices.set(key, new Map());\n      const values = this._indices.get(key)!;\n      const set = values.get(value) ?? new Set();\n      set.add(symbolId);\n      values.set(value, set);\n    }\n  }\n\n  private invalidateCache(indexKeySpace: IndexKeySpace): void {\n    const changed = indexKeySpace.map((indexEntry) => this.serializeIndexEntry(indexEntry));\n    for (const [cacheKey, cacheDependencies] of this._queryCacheDependencies.entries()) {\n      for (const key of changed) {\n        if (cacheDependencies.has(key)) {\n          this._queryCacheDependencies.delete(cacheKey);\n          this._queryCache.delete(cacheKey);\n          break;\n        }\n      }\n    }\n  }\n\n  private isSubset(sub: IndexKeySpace, sup: IndexKeySpace): boolean {\n    const supMap = new Map(sup);\n    for (const [key, value] of sub) {\n      if (!supMap.has(key) || supMap.get(key) !== value) {\n        return false;\n      }\n    }\n    return true;\n  }\n\n  private replaceStubs(symbol: Symbol, indexKeySpace: IndexKeySpace): void {\n    for (const stubId of this._stubs.values()) {\n      const stub = this._values.get(stubId);\n      if (stub?.meta && this.isSubset(this.buildIndexKeySpace(stub.meta), indexKeySpace)) {\n        const cacheKey = this.buildCacheKey(stub.meta);\n        this._stubCache.delete(cacheKey);\n        this._stubs.delete(stubId);\n        stub.setCanonical(symbol);\n      }\n    }\n  }\n\n  private serializeIndexEntry(indexEntry: IndexEntry): string {\n    return `${indexEntry[0]}:${JSON.stringify(indexEntry[1])}`;\n  }\n}\n"
  },
  {
    "path": "packages/codegen-core/src/symbols/symbol.ts",
    "content": "import { symbolBrand } from '../brands';\nimport type { ISymbolMeta } from '../extensions';\nimport type { File } from '../files/file';\nimport { log } from '../log';\nimport type { INode } from '../nodes/node';\nimport type { BindingKind, ISymbolIn, SymbolKind } from './types';\n\nexport class Symbol<Node extends INode = INode> {\n  /**\n   * Canonical symbol this stub resolves to, if any.\n   *\n   * Stubs created during DSL construction may later be associated\n   * with a fully registered symbol. Once set, all property lookups\n   * should defer to the canonical symbol.\n   */\n  private _canonical?: Symbol;\n  /**\n   * True if this symbol is exported from its defining file.\n   *\n   * @default false\n   */\n  private _exported: boolean;\n  /**\n   * External module name if this symbol is imported from a module not managed\n   * by the project (e.g. \"zod\", \"lodash\").\n   *\n   * @default undefined\n   */\n  private _external?: string;\n  /**\n   * The file this symbol is ultimately emitted into.\n   *\n   * Only top-level symbols have an assigned file.\n   */\n  private _file?: File;\n  /**\n   * The alias-resolved, conflict-free emitted name.\n   */\n  private _finalName?: string;\n  /**\n   * Custom strategy to determine from which file path(s) this symbol is re-exported.\n   *\n   * @returns The file path(s) that re-export this symbol, or undefined if none.\n   */\n  private _getExportFromFilePath?: (symbol: Symbol) => ReadonlyArray<string> | undefined;\n  /**\n   * Custom strategy to determine file output path.\n   *\n   * @returns The file path to output the symbol to, or undefined to fallback to default behavior.\n   */\n  private _getFilePath?: (symbol: Symbol) => string | undefined;\n  /**\n   * How this symbol should be imported (namespace/default/named).\n   *\n   * @default 'named'\n   */\n  private _importKind: BindingKind;\n  /**\n   * Kind of symbol (class, type, alias, etc.).\n   *\n   * @default 'var'\n   */\n  private _kind: SymbolKind;\n  /**\n   * Arbitrary user metadata.\n   *\n   * @default undefined\n   */\n  private _meta?: ISymbolMeta;\n  /**\n   * Intended user-facing name before conflict resolution.\n   *\n   * @example \"UserModel\"\n   */\n  private _name: string;\n  /**\n   * Node that defines this symbol.\n   */\n  private _node?: Node;\n\n  /** Brand used for identifying symbols. */\n  readonly '~brand' = symbolBrand;\n  /** Globally unique, stable symbol ID. */\n  readonly id: number;\n\n  constructor(input: ISymbolIn, id: number) {\n    this._exported = input.exported ?? false;\n    this._external = input.external;\n    this._getExportFromFilePath = input.getExportFromFilePath;\n    this._getFilePath = input.getFilePath;\n    this.id = id;\n    this._importKind = input.importKind ?? 'named';\n    this._kind = input.kind ?? 'var';\n    this._meta = input.meta;\n    this._name = input.name;\n  }\n\n  /**\n   * Returns the canonical symbol for this instance.\n   *\n   * If this symbol was created as a stub, this getter returns\n   * the fully registered canonical symbol. Otherwise, it returns\n   * the symbol itself.\n   */\n  get canonical(): Symbol {\n    return this._canonical ?? this;\n  }\n\n  /**\n   * Indicates whether this symbol is exported from its defining file.\n   */\n  get exported(): boolean {\n    return this.canonical._exported;\n  }\n\n  /**\n   * External module from which this symbol originates, if any.\n   */\n  get external(): string | undefined {\n    return this.canonical._external;\n  }\n\n  /**\n   * Read‑only accessor for the assigned output file.\n   *\n   * Only top-level symbols have an assigned file.\n   */\n  get file(): File | undefined {\n    return this.canonical._file;\n  }\n\n  /**\n   * Read‑only accessor for the resolved final emitted name.\n   */\n  get finalName(): string {\n    if (!this.canonical._finalName) {\n      const message = `Symbol finalName has not been resolved yet for ${this.canonical.toString()}`;\n      log.debug(message, 'symbol');\n      throw new Error(message);\n    }\n    return this.canonical._finalName;\n  }\n\n  /**\n   * Custom re-export file path resolver, if provided.\n   */\n  get getExportFromFilePath(): ((symbol: Symbol) => ReadonlyArray<string> | undefined) | undefined {\n    return this.canonical._getExportFromFilePath;\n  }\n\n  /**\n   * Custom file path resolver, if provided.\n   */\n  get getFilePath(): ((symbol: Symbol) => string | undefined) | undefined {\n    return this.canonical._getFilePath;\n  }\n\n  /**\n   * How this symbol should be imported (named/default/namespace).\n   */\n  get importKind(): BindingKind {\n    return this.canonical._importKind;\n  }\n\n  /**\n   * Indicates whether this is a canonical symbol (not a stub).\n   */\n  get isCanonical(): boolean {\n    return !this._canonical || this._canonical === this;\n  }\n\n  /**\n   * The symbol's kind (class, type, alias, variable, etc.).\n   */\n  get kind(): SymbolKind {\n    return this.canonical._kind;\n  }\n\n  /**\n   * Arbitrary user‑provided metadata associated with this symbol.\n   */\n  get meta(): ISymbolMeta | undefined {\n    return this.canonical._meta;\n  }\n\n  /**\n   * User-intended name before aliasing or conflict resolution.\n   */\n  get name(): string {\n    return this.canonical._name;\n  }\n\n  /**\n   * Read‑only accessor for the defining node.\n   */\n  get node(): Node | undefined {\n    return this.canonical._node as Node | undefined;\n  }\n\n  /**\n   * Marks this symbol as a stub and assigns its canonical symbol.\n   *\n   * After calling this, all semantic queries (name, kind, file,\n   * meta, etc.) should reflect the canonical symbol's values.\n   *\n   * @param symbol — The canonical symbol this stub should resolve to.\n   */\n  setCanonical(symbol: Symbol): void {\n    this._canonical = symbol;\n  }\n\n  /**\n   * Marks the symbol as exported from its file.\n   *\n   * @param exported — Whether the symbol is exported.\n   */\n  setExported(exported: boolean): void {\n    this.assertCanonical();\n    this._exported = exported;\n  }\n\n  /**\n   * Assigns the output file this symbol will be emitted into.\n   *\n   * This may only be set once.\n   */\n  setFile(file: File): void {\n    this.assertCanonical();\n    if (this._file && this._file !== file) {\n      const message = `Symbol ${this.canonical.toString()} is already assigned to a different file.`;\n      log.debug(message, 'symbol');\n      throw new Error(message);\n    }\n    this._file = file;\n  }\n\n  /**\n   * Assigns the conflict‑resolved final local name for this symbol.\n   *\n   * This may only be set once.\n   */\n  setFinalName(name: string): void {\n    this.assertCanonical();\n    if (this._finalName && this._finalName !== name) {\n      const message = `Symbol finalName has already been resolved for ${this.canonical.toString()}.`;\n      log.debug(message, 'symbol');\n      throw new Error(message);\n    }\n    this._finalName = name;\n  }\n\n  /**\n   * Sets how this symbol should be imported.\n   *\n   * @param kind — The import strategy (named/default/namespace).\n   */\n  setImportKind(kind: BindingKind): void {\n    this.assertCanonical();\n    this._importKind = kind;\n  }\n\n  /**\n   * Sets the symbol's kind (class, type, alias, variable, etc.).\n   *\n   * @param kind — The new symbol kind.\n   */\n  setKind(kind: SymbolKind): void {\n    this.assertCanonical();\n    this._kind = kind;\n  }\n\n  /**\n   * Updates the intended user‑facing name for this symbol.\n   *\n   * @param name — The new name.\n   */\n  setName(name: string): void {\n    this.assertCanonical();\n    this._name = name;\n  }\n\n  /**\n   * Binds the node that defines this symbol.\n   *\n   * This may only be set once.\n   */\n  setNode(node: Node): void {\n    this.assertCanonical();\n    if (this._node && this._node !== node) {\n      const message = `Symbol ${this.canonical.toString()} is already bound to a different node.`;\n      log.debug(message, 'symbol');\n      // TODO: symbol <> node relationship needs to be refactor to 1:many\n      // disabled in the meantime or it would throw\n      // throw new Error(message);\n    }\n    this._node = node;\n    node.symbol = this;\n  }\n\n  /**\n   * Returns a debug‑friendly string representation identifying the symbol.\n   */\n  toString(): string {\n    const canonical = this.canonical;\n    if (canonical._finalName && canonical._finalName !== canonical._name) {\n      return `[Symbol ${canonical._name} → ${canonical._finalName}#${canonical.id}]`;\n    }\n    return `[Symbol ${canonical._name || canonical._meta !== undefined ? JSON.stringify(canonical._meta) : '<unknown>'}#${canonical.id}]`;\n  }\n\n  /**\n   * Ensures this symbol is canonical before allowing mutation.\n   *\n   * A symbol that has been marked as a stub (i.e., its `_canonical` points\n   * to a different symbol) may not be mutated. This guard throws an error\n   * if any setter attempts to modify a stub, preventing accidental writes\n   * to non‑canonical instances.\n   *\n   * @throws {Error} If the symbol is a stub and is being mutated.\n   */\n  private assertCanonical(): void {\n    if (this._canonical && this._canonical !== this) {\n      const message = `Illegal mutation of stub symbol ${this.toString()} → canonical: ${this._canonical.toString()}`;\n      log.debug(message, 'symbol');\n      throw new Error(message);\n    }\n  }\n}\n"
  },
  {
    "path": "packages/codegen-core/src/symbols/types.ts",
    "content": "import type { ISymbolMeta } from '../extensions';\nimport type { Symbol } from './symbol';\n\nexport type BindingKind = 'default' | 'named' | 'namespace';\n\nexport type ISymbolIdentifier = number | ISymbolMeta;\n\nexport type SymbolKind = 'class' | 'enum' | 'function' | 'interface' | 'namespace' | 'type' | 'var';\n\nexport type ISymbolIn = {\n  /**\n   * Whether this symbol is exported from its own file.\n   *\n   * @default false\n   */\n  exported?: boolean;\n  /**\n   * External module name if this symbol is imported from a module not managed\n   * by the project (e.g. \"zod\", \"lodash\").\n   *\n   * @default undefined\n   */\n  external?: string;\n  /**\n   * Optional output strategy to override default behavior.\n   *\n   * @returns The file path(s) that re-export this symbol, or undefined if none.\n   */\n  getExportFromFilePath?: Symbol['getExportFromFilePath'];\n  /**\n   * Optional output strategy to override default behavior.\n   *\n   * @returns The file path to output the symbol to, or undefined to fallback to default behavior.\n   */\n  getFilePath?: Symbol['getFilePath'];\n  /**\n   * Kind of import if this symbol represents an import.\n   *\n   * @default 'named'\n   */\n  importKind?: BindingKind;\n  /**\n   * Kind of symbol.\n   *\n   * @default 'var'\n   */\n  kind?: SymbolKind;\n  /**\n   * Arbitrary metadata about the symbol.\n   *\n   * @default undefined\n   */\n  meta?: ISymbolMeta;\n  /**\n   * The intended, user-facing name of the symbol before any conflict resolution.\n   * It is **not** guaranteed to be the final emitted name — aliasing may occur if the\n   * file contains conflicting local identifiers or other symbols with the same intended name.\n   *\n   * @example \"UserModel\"\n   */\n  name: string;\n};\n\nexport interface ISymbolRegistry {\n  /**\n   * Get a symbol.\n   *\n   * @param identifier Symbol identifier to reference.\n   * @returns The symbol, or undefined if not found.\n   */\n  get(identifier: ISymbolIdentifier): Symbol | undefined;\n  /**\n   * Returns whether a symbol is registered in the registry.\n   *\n   * @param identifier Symbol identifier to check.\n   * @returns True if the symbol is registered, false otherwise.\n   */\n  isRegistered(identifier: ISymbolIdentifier): boolean;\n  /**\n   * Returns the current symbol ID and increments it.\n   *\n   * @returns Symbol ID before being incremented.\n   */\n  readonly nextId: number;\n  /**\n   * Queries symbols by metadata filter.\n   *\n   * @param filter Metadata filter to query symbols by.\n   * @returns Array of symbols matching the filter.\n   */\n  query(filter: ISymbolMeta): ReadonlyArray<Symbol>;\n  /**\n   * References a symbol.\n   *\n   * @param meta Metadata filter to reference symbol by.\n   * @returns The referenced symbol.\n   */\n  reference(meta: ISymbolMeta): Symbol;\n  /**\n   * Register a symbol globally.\n   *\n   * Deduplicates identical symbols by ID.\n   *\n   * @param symbol Symbol to register.\n   * @returns The registered symbol.\n   */\n  register(symbol: ISymbolIn): Symbol;\n  /**\n   * Get all symbols in the order they were registered.\n   *\n   * @returns Array of all registered symbols, in insert order.\n   */\n  registered(): IterableIterator<Symbol>;\n}\n"
  },
  {
    "path": "packages/codegen-core/tsconfig.json",
    "content": "{\n  \"extends\": \"../../tsconfig.base.json\",\n  \"compilerOptions\": {\n    \"composite\": true,\n    \"outDir\": \"dist\",\n    \"rootDir\": \"src\",\n    \"types\": [\"vitest/globals\", \"node\"]\n  },\n  \"include\": [\"src\"],\n  \"references\": [{ \"path\": \"../types\" }]\n}\n"
  },
  {
    "path": "packages/codegen-core/tsdown.config.ts",
    "content": "import { defineConfig } from 'tsdown';\n\nexport default defineConfig({\n  clean: true,\n  dts: true,\n  entry: ['src/index.ts'],\n  format: ['esm'],\n  minify: false,\n  sourcemap: true,\n  treeshake: true,\n});\n"
  },
  {
    "path": "packages/codegen-core/turbo.json",
    "content": "{\n  \"$schema\": \"../../node_modules/turbo/schema.json\",\n  \"extends\": [\"//\"],\n  \"tasks\": {\n    \"build\": {\n      \"dependsOn\": [],\n      \"outputs\": [\"dist/**\"]\n    }\n  }\n}\n"
  },
  {
    "path": "packages/custom-client/CHANGELOG.md",
    "content": "# @hey-api/custom-client\n\n## 0.1.1\n\n### Patch Changes\n\n- [#2165](https://github.com/hey-api/openapi-ts/pull/2165) [`f23f3ae`](https://github.com/hey-api/openapi-ts/commit/f23f3ae874385e758eb8d43bb4e274c9858a4e40) Thanks [@mrlubos](https://github.com/mrlubos)! - fix(client): do not serialize path param name in url\n\n## 0.1.0\n\n### Minor Changes\n\n- [#2148](https://github.com/hey-api/openapi-ts/pull/2148) [`10d2e03`](https://github.com/hey-api/openapi-ts/commit/10d2e03b8295e4e887fab8d023aa823699efbae8) Thanks [@mrlubos](https://github.com/mrlubos)! - feat: export `buildClientParams` function\n\n## 0.0.1\n\n### Patch Changes\n\n- [#2039](https://github.com/hey-api/openapi-ts/pull/2039) [`565e0b8`](https://github.com/hey-api/openapi-ts/commit/565e0b89fbab4556ecdc63dfe08250942681140e) Thanks [@Le0Developer](https://github.com/Le0Developer)! - fix(clients): fix query string encoding with empty lists/objects\n"
  },
  {
    "path": "packages/custom-client/LICENSE.md",
    "content": "MIT License\n\nCopyright (c) Hey API\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n"
  },
  {
    "path": "packages/custom-client/package.json",
    "content": "{\n  \"name\": \"@hey-api/custom-client\",\n  \"version\": \"0.1.1\",\n  \"private\": true,\n  \"description\": \"Custom client for `@hey-api/openapi-ts` codegen. Used for testing.\",\n  \"homepage\": \"https://heyapi.dev/\",\n  \"bugs\": {\n    \"url\": \"https://github.com/hey-api/openapi-ts/issues\"\n  },\n  \"license\": \"MIT\",\n  \"author\": {\n    \"name\": \"Hey API\",\n    \"email\": \"lubos@heyapi.dev\",\n    \"url\": \"https://heyapi.dev\"\n  },\n  \"repository\": {\n    \"type\": \"git\",\n    \"url\": \"git+https://github.com/hey-api/openapi-ts.git\"\n  },\n  \"funding\": \"https://github.com/sponsors/hey-api\",\n  \"files\": [\n    \"dist\",\n    \"LICENSE.md\",\n    \"src\"\n  ],\n  \"type\": \"module\",\n  \"sideEffects\": false,\n  \"main\": \"./dist/index.cjs\",\n  \"module\": \"./dist/index.mjs\",\n  \"types\": \"./dist/index.d.mts\",\n  \"exports\": {\n    \".\": {\n      \"import\": {\n        \"types\": \"./dist/index.d.mts\",\n        \"default\": \"./dist/index.mjs\"\n      },\n      \"require\": {\n        \"types\": \"./dist/index.d.cts\",\n        \"default\": \"./dist/index.cjs\"\n      }\n    },\n    \"./plugin\": {\n      \"import\": {\n        \"types\": \"./dist/plugin.d.mts\",\n        \"default\": \"./dist/plugin.mjs\"\n      },\n      \"require\": {\n        \"types\": \"./dist/plugin.d.cts\",\n        \"default\": \"./dist/plugin.cjs\"\n      }\n    },\n    \"./package.json\": \"./package.json\"\n  },\n  \"scripts\": {\n    \"build\": \"tsdown && rollup -c && pnpm check-exports\",\n    \"check-exports\": \"attw --profile node16 --pack .\",\n    \"dev\": \"tsdown --watch\",\n    \"prepublishOnly\": \"pnpm build\"\n  },\n  \"devDependencies\": {\n    \"@hey-api/codegen-core\": \"workspace:*\",\n    \"@hey-api/openapi-ts\": \"workspace:*\",\n    \"rollup\": \"4.56.0\",\n    \"rollup-plugin-dts\": \"6.1.1\"\n  },\n  \"peerDependencies\": {\n    \"@hey-api/codegen-core\": \"<2\",\n    \"@hey-api/openapi-ts\": \"<2\"\n  }\n}\n"
  },
  {
    "path": "packages/custom-client/rollup.config.mjs",
    "content": "import path from 'node:path';\n\nimport { defineConfig } from 'rollup';\nimport dts from 'rollup-plugin-dts';\n\nconst files = ['index.d.mts', 'index.d.cts', 'plugin.d.mts', 'plugin.d.cts'];\n\nexport default files.map((file) =>\n  defineConfig({\n    external: (id) => {\n      const normalizedId = id.split(path.sep).join('/');\n      return !normalizedId.startsWith('/') && !/^[a-zA-Z]:\\//.test(normalizedId);\n    },\n    input: `./dist/${file}`,\n    output: {\n      file: `./dist/${file}`,\n      format: 'es',\n    },\n    plugins: [\n      dts({\n        respectExternal: true,\n      }),\n    ],\n  }),\n);\n"
  },
  {
    "path": "packages/custom-client/src/__tests__/client.test.ts",
    "content": "import { createClient } from '../client';\n\ndescribe('buildUrl', () => {\n  const client = createClient();\n\n  const scenarios: {\n    options: Parameters<typeof client.buildUrl>[0];\n    url: string;\n  }[] = [\n    {\n      options: {\n        url: '',\n      },\n      url: '/',\n    },\n    {\n      options: {\n        url: '/foo',\n      },\n      url: '/foo',\n    },\n    {\n      options: {\n        path: {\n          fooId: 1,\n        },\n        url: '/foo/{fooId}',\n      },\n      url: '/foo/1',\n    },\n    {\n      options: {\n        path: {\n          fooId: 1,\n        },\n        query: {\n          bar: 'baz',\n        },\n        url: '/foo/{fooId}',\n      },\n      url: '/foo/1?bar=baz',\n    },\n  ];\n\n  it.each(scenarios)('returns $url', ({ options, url }) => {\n    expect(client.buildUrl(options)).toBe(url);\n  });\n});\n\ndescribe('zero-length body handling', () => {\n  const client = createClient({ baseUrl: 'https://example.com' });\n\n  it('returns empty object for zero-length JSON response', async () => {\n    const mockResponse = new Response(null, {\n      headers: {\n        'Content-Length': '0',\n        'Content-Type': 'application/json',\n      },\n      status: 200,\n    });\n\n    const mockFetch = vi.fn().mockResolvedValue(mockResponse);\n\n    const result = await client.request({\n      fetch: mockFetch,\n      method: 'GET',\n      url: '/test',\n    });\n\n    expect(result.data).toEqual({});\n  });\n\n  it('returns empty object for empty JSON response without Content-Length header (status 200)', async () => {\n    // Simulates a server returning an empty body with status 200 and no Content-Length header\n    // This is the scenario described in the issue where response.json() throws\n    const mockResponse = new Response('', {\n      headers: {\n        'Content-Type': 'application/json',\n      },\n      status: 200,\n    });\n\n    const mockFetch = vi.fn().mockResolvedValue(mockResponse);\n\n    const result = await client.request({\n      fetch: mockFetch,\n      method: 'GET',\n      url: '/test',\n    });\n\n    expect(result.data).toEqual({});\n  });\n\n  it('returns empty object for empty response without Content-Length header and no Content-Type (defaults to JSON)', async () => {\n    // Tests the auto-detection behavior when no Content-Type is provided\n    const mockResponse = new Response('', {\n      status: 200,\n    });\n\n    const mockFetch = vi.fn().mockResolvedValue(mockResponse);\n\n    const result = await client.request({\n      fetch: mockFetch,\n      method: 'GET',\n      url: '/test',\n    });\n\n    // When parseAs is 'auto' and no Content-Type header exists, it should handle empty body gracefully\n    expect(result.data).toBeDefined();\n  });\n});\n"
  },
  {
    "path": "packages/custom-client/src/__tests__/utils.test.ts",
    "content": "import type { Auth } from '../core/auth';\nimport { getParseAs, setAuthParams } from '../utils';\n\ndescribe('getParseAs', () => {\n  const scenarios: Array<{\n    content: Parameters<typeof getParseAs>[0];\n    parseAs: ReturnType<typeof getParseAs>;\n  }> = [\n    {\n      content: null,\n      parseAs: 'stream',\n    },\n    {\n      content: 'application/json',\n      parseAs: 'json',\n    },\n    {\n      content: 'application/ld+json',\n      parseAs: 'json',\n    },\n    {\n      content: 'application/ld+json;charset=utf-8',\n      parseAs: 'json',\n    },\n    {\n      content: 'application/ld+json; charset=utf-8',\n      parseAs: 'json',\n    },\n    {\n      content: 'multipart/form-data',\n      parseAs: 'formData',\n    },\n    {\n      content: 'application/*',\n      parseAs: 'blob',\n    },\n    {\n      content: 'audio/*',\n      parseAs: 'blob',\n    },\n    {\n      content: 'image/*',\n      parseAs: 'blob',\n    },\n    {\n      content: 'video/*',\n      parseAs: 'blob',\n    },\n    {\n      content: 'text/*',\n      parseAs: 'text',\n    },\n    {\n      content: 'unsupported',\n      parseAs: undefined,\n    },\n  ];\n\n  it.each(scenarios)('detects $content as $parseAs', async ({ content, parseAs }) => {\n    expect(getParseAs(content)).toEqual(parseAs);\n  });\n});\n\ndescribe('setAuthParams', () => {\n  it('sets bearer token in headers', async () => {\n    const auth = vi.fn().mockReturnValue('foo');\n    const headers = new Headers();\n    const query: Record<any, unknown> = {};\n    await setAuthParams({\n      auth,\n      headers,\n      query,\n      security: [\n        {\n          name: 'baz',\n          scheme: 'bearer',\n          type: 'http',\n        },\n      ],\n    });\n    expect(auth).toHaveBeenCalled();\n    expect(headers.get('baz')).toBe('Bearer foo');\n    expect(Object.keys(query).length).toBe(0);\n  });\n\n  it('sets access token in query', async () => {\n    const auth = vi.fn().mockReturnValue('foo');\n    const headers = new Headers();\n    const query: Record<any, unknown> = {};\n    await setAuthParams({\n      auth,\n      headers,\n      query,\n      security: [\n        {\n          in: 'query',\n          name: 'baz',\n          scheme: 'bearer',\n          type: 'http',\n        },\n      ],\n    });\n    expect(auth).toHaveBeenCalled();\n    expect(headers.get('baz')).toBeNull();\n    expect(query.baz).toBe('Bearer foo');\n  });\n\n  it('sets Authorization header when `in` and `name` are undefined', async () => {\n    const auth = vi.fn().mockReturnValue('foo');\n    const headers = new Headers();\n    const query: Record<any, unknown> = {};\n    await setAuthParams({\n      auth,\n      headers,\n      query,\n      security: [\n        {\n          type: 'http',\n        },\n      ],\n    });\n    expect(auth).toHaveBeenCalled();\n    expect(headers.get('Authorization')).toBe('foo');\n    expect(query).toEqual({});\n  });\n\n  it('sets first scheme only', async () => {\n    const auth = vi.fn().mockReturnValue('foo');\n    const headers = new Headers();\n    const query: Record<any, unknown> = {};\n    await setAuthParams({\n      auth,\n      headers,\n      query,\n      security: [\n        {\n          name: 'baz',\n          scheme: 'bearer',\n          type: 'http',\n        },\n        {\n          in: 'query',\n          name: 'baz',\n          scheme: 'bearer',\n          type: 'http',\n        },\n      ],\n    });\n    expect(auth).toHaveBeenCalled();\n    expect(headers.get('baz')).toBe('Bearer foo');\n    expect(Object.keys(query).length).toBe(0);\n  });\n\n  it('sets first scheme with token', async () => {\n    const auth = vi.fn().mockImplementation((auth: Auth) => {\n      if (auth.type === 'apiKey') {\n        return;\n      }\n      return 'foo';\n    });\n    const headers = new Headers();\n    const query: Record<any, unknown> = {};\n    await setAuthParams({\n      auth,\n      headers,\n      query,\n      security: [\n        {\n          name: 'baz',\n          type: 'apiKey',\n        },\n        {\n          in: 'query',\n          name: 'baz',\n          scheme: 'bearer',\n          type: 'http',\n        },\n      ],\n    });\n    expect(auth).toHaveBeenCalled();\n    expect(headers.get('baz')).toBeNull();\n    expect(query.baz).toBe('Bearer foo');\n  });\n\n  it('sets an API key in a cookie', async () => {\n    const auth = vi.fn().mockReturnValue('foo');\n    const headers = new Headers();\n    const query: Record<any, unknown> = {};\n    await setAuthParams({\n      auth,\n      headers,\n      query,\n      security: [\n        {\n          in: 'cookie',\n          name: 'baz',\n          type: 'apiKey',\n        },\n      ],\n    });\n    expect(auth).toHaveBeenCalled();\n    expect(headers.get('Cookie')).toBe('baz=foo');\n    expect(query).toEqual({});\n  });\n\n  it('sets only one specific header', async () => {\n    const auth = vi.fn(({ name }: Auth) => {\n      if (name === 'baz') {\n        return 'foo';\n      }\n      return 'buz';\n    });\n    const headers = new Headers();\n    const query: Record<any, unknown> = {};\n    await setAuthParams({\n      auth,\n      headers,\n      query,\n      security: [\n        {\n          name: 'baz',\n          scheme: 'bearer',\n          type: 'http',\n        },\n        {\n          name: 'fiz',\n          type: 'http',\n        },\n        {\n          in: 'query',\n          name: 'baz',\n          scheme: 'bearer',\n          type: 'http',\n        },\n      ],\n    });\n    expect(auth).toHaveBeenCalled();\n    expect(headers.get('baz')).toBe('Bearer foo');\n    expect(headers.get('fiz')).toBe('buz');\n    expect(Object.keys(query).length).toBe(0);\n  });\n});\n"
  },
  {
    "path": "packages/custom-client/src/client.ts",
    "content": "import type { Client, Config, RequestOptions } from './types';\nimport {\n  buildUrl,\n  createConfig,\n  createInterceptors,\n  getParseAs,\n  mergeConfigs,\n  mergeHeaders,\n  setAuthParams,\n} from './utils';\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, RequestOptions>();\n\n  // @ts-expect-error\n  const request: Client['request'] = async (options) => {\n    const opts = {\n      ..._config,\n      ...options,\n      fetch: options.fetch ?? _config.fetch ?? globalThis.fetch,\n      headers: mergeHeaders(_config.headers, options.headers),\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 && opts.bodySerializer) {\n      opts.body = opts.bodySerializer(opts.body);\n    }\n\n    // remove Content-Type header if body is empty to avoid sending invalid requests\n    if (opts.body === undefined || opts.body === '') {\n      opts.headers.delete('Content-Type');\n    }\n\n    const url = buildUrl(opts);\n    const requestInit: ReqInit = {\n      redirect: 'follow',\n      ...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 = await _fetch(request);\n\n    for (const fn of interceptors.response.fns) {\n      if (fn) {\n        response = await fn(response, request, opts);\n      }\n    }\n\n    const result = {\n      request,\n      response,\n    };\n\n    if (response.ok) {\n      if (response.status === 204 || response.headers.get('Content-Length') === '0') {\n        return {\n          data: {},\n          ...result,\n        };\n      }\n\n      const parseAs =\n        (opts.parseAs === 'auto'\n          ? getParseAs(response.headers.get('Content-Type'))\n          : opts.parseAs) ?? 'json';\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 {\n            data: response.body,\n            ...result,\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 {\n        data,\n        ...result,\n      };\n    }\n\n    let error = await response.text();\n\n    try {\n      error = JSON.parse(error);\n    } catch {\n      // noop\n    }\n\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    return {\n      error: finalError,\n      ...result,\n    };\n  };\n\n  return {\n    buildUrl,\n    connect: (options) => request({ ...options, method: 'CONNECT' }),\n    delete: (options) => request({ ...options, method: 'DELETE' }),\n    get: (options) => request({ ...options, method: 'GET' }),\n    getConfig,\n    head: (options) => request({ ...options, method: 'HEAD' }),\n    interceptors,\n    options: (options) => request({ ...options, method: 'OPTIONS' }),\n    patch: (options) => request({ ...options, method: 'PATCH' }),\n    post: (options) => request({ ...options, method: 'POST' }),\n    put: (options) => request({ ...options, method: 'PUT' }),\n    request,\n    setConfig,\n    trace: (options) => request({ ...options, method: 'TRACE' }),\n  };\n};\n"
  },
  {
    "path": "packages/custom-client/src/core/auth.ts",
    "content": "export 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"
  },
  {
    "path": "packages/custom-client/src/core/bodySerializer.ts",
    "content": "import type { ArrayStyle, ObjectStyle, SerializerOptions } from './pathSerializer';\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 {\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"
  },
  {
    "path": "packages/custom-client/src/core/params.ts",
    "content": "type Slot = 'body' | 'headers' | 'path' | 'query';\n\nexport type Field =\n  | {\n      in: Exclude<Slot, 'body'>;\n      key: string;\n      map?: string;\n    }\n  | {\n      in: Extract<Slot, 'body'>;\n      key?: string;\n      map?: string;\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 | undefined;\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 (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' && !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        (params[field.in] as Record<string, unknown>)[name] = arg;\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          const name = field.map || key;\n          (params[field.in] as Record<string, unknown>)[name] = value;\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 {\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"
  },
  {
    "path": "packages/custom-client/src/core/pathSerializer.ts",
    "content": "interface 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"
  },
  {
    "path": "packages/custom-client/src/core/types.ts",
    "content": "import type { Auth, AuthToken } from './auth';\nimport type { BodySerializer, QuerySerializer, QuerySerializerOptions } from './bodySerializer';\n\nexport interface Client<RequestFn = never, Config = unknown, MethodFn = never, BuildUrlFn = never> {\n  /**\n   * Returns the final request URL.\n   */\n  buildUrl: BuildUrlFn;\n  connect: MethodFn;\n  delete: MethodFn;\n  get: MethodFn;\n  getConfig: () => Config;\n  head: MethodFn;\n  options: MethodFn;\n  patch: MethodFn;\n  post: MethodFn;\n  put: MethodFn;\n  request: RequestFn;\n  setConfig: (config: Config) => Config;\n  trace: MethodFn;\n}\n\nexport interface Config {\n  /**\n   * Auth token or a function returning auth token. The resolved value will be\n   * added to the request payload as defined by its `security` array.\n   */\n  auth?: ((auth: Auth) => Promise<AuthToken> | AuthToken) | AuthToken;\n  /**\n   * A function for serializing request body parameter. By default,\n   * {@link JSON.stringify()} will be used.\n   */\n  bodySerializer?: BodySerializer | null;\n  /**\n   * An object containing any HTTP headers that you want to pre-populate your\n   * `Headers` object with.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/Headers/Headers#init See more}\n   */\n  headers?:\n    | RequestInit['headers']\n    | Record<\n        string,\n        string | number | boolean | (string | number | boolean)[] | null | undefined | unknown\n      >;\n  /**\n   * The request method.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/fetch#method See more}\n   */\n  method?: 'CONNECT' | 'DELETE' | 'GET' | 'HEAD' | 'OPTIONS' | 'PATCH' | 'POST' | 'PUT' | 'TRACE';\n  /**\n   * A function for serializing request query parameters. By default, arrays\n   * will be exploded in form style, objects will be exploded in deepObject\n   * style, and reserved characters are percent-encoded.\n   *\n   * This method will have no effect if the native `paramsSerializer()` Axios\n   * API function is used.\n   *\n   * {@link https://swagger.io/docs/specification/serialization/#query View examples}\n   */\n  querySerializer?: QuerySerializer | QuerySerializerOptions;\n  /**\n   * A function validating request data. This is useful if you want to ensure\n   * the request conforms to the desired shape, so it can be safely sent to\n   * the server.\n   */\n  requestValidator?: (data: unknown) => Promise<unknown>;\n  /**\n   * A function transforming response data before it's returned. This is useful\n   * for post-processing data, e.g. converting ISO strings into Date objects.\n   */\n  responseTransformer?: (data: unknown) => Promise<unknown>;\n  /**\n   * A function validating response data. This is useful if you want to ensure\n   * the response conforms to the desired shape, so it can be safely passed to\n   * the transformers and returned to the user.\n   */\n  responseValidator?: (data: unknown) => Promise<unknown>;\n}\n\ntype IsExactlyNeverOrNeverUndefined<T> = [T] extends [never]\n  ? true\n  : [T] extends [never | undefined]\n    ? [undefined] extends [T]\n      ? false\n      : true\n    : false;\n\nexport type OmitNever<T extends Record<string, unknown>> = {\n  [K in keyof T as IsExactlyNeverOrNeverUndefined<T[K]> extends true ? never : K]: T[K];\n};\n"
  },
  {
    "path": "packages/custom-client/src/index.ts",
    "content": "export { createClient } from './client';\nexport type { Auth } from './core/auth';\nexport type { QuerySerializerOptions } from './core/bodySerializer';\nexport {\n  formDataBodySerializer,\n  jsonBodySerializer,\n  urlSearchParamsBodySerializer,\n} from './core/bodySerializer';\nexport { buildClientParams } from './core/params';\nexport type {\n  Client,\n  ClientOptions,\n  Config,\n  CreateClientConfig,\n  Options,\n  RequestOptions,\n  RequestResult,\n  TDataShape,\n} from './types';\nexport { createConfig } from './utils';\n"
  },
  {
    "path": "packages/custom-client/src/plugin.ts",
    "content": "import {\n  type Client,\n  clientDefaultConfig,\n  clientDefaultMeta,\n  clientPluginHandler,\n  type DefinePlugin,\n  definePluginConfig,\n} from '@hey-api/openapi-ts';\n\nexport type Config = Client.Config & {\n  /**\n   * Plugin name. Must be unique.\n   */\n  name: '@hey-api/custom-client';\n};\n\nexport type CustomClientPlugin = DefinePlugin<Config, Config>;\n\nexport const defaultConfig: CustomClientPlugin['Config'] = {\n  ...clientDefaultMeta,\n  config: {\n    ...clientDefaultConfig,\n    bundle: false,\n  },\n  handler: clientPluginHandler as unknown as CustomClientPlugin['Handler'],\n  name: '@hey-api/custom-client',\n};\n\n/**\n * Type helper for `@hey-api/custom-client` plugin, returns {@link Plugin.Config} object\n */\nexport const customClientPlugin = definePluginConfig(defaultConfig);\n"
  },
  {
    "path": "packages/custom-client/src/types.ts",
    "content": "import type { Auth } from './core/auth';\nimport type { Client as CoreClient, Config as CoreConfig } from './core/types';\nimport type { Middleware } from './utils';\n\nexport interface Config<T extends ClientOptions = ClientOptions>\n  extends Omit<RequestInit, 'body' | 'headers' | 'method'>, CoreConfig {\n  /**\n   * Base URL for all requests made by this client.\n   */\n  baseUrl?: T['baseUrl'];\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?: (request: Request) => ReturnType<typeof fetch>;\n  /**\n   * Return the response data parsed in a specified format. By default, `auto`\n   * will infer the appropriate method from the `Content-Type` response header.\n   * You can override this behavior with any of the {@link Body} methods.\n   * Select `stream` if you don't want to parse response data at all.\n   *\n   * @default 'auto'\n   */\n  parseAs?: 'arrayBuffer' | 'auto' | 'blob' | 'formData' | 'json' | 'stream' | 'text';\n  /**\n   * Throw an error instead of returning it in the response?\n   *\n   * @default false\n   */\n  throwOnError?: T['throwOnError'];\n}\n\nexport interface RequestOptions<\n  ThrowOnError extends boolean = boolean,\n  Url extends string = string,\n> extends Config<{\n  throwOnError: ThrowOnError;\n}> {\n  /**\n   * Any body that you want to add to your request.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/fetch#body}\n   */\n  body?: unknown;\n  path?: Record<string, unknown>;\n  query?: Record<string, unknown>;\n  /**\n   * Security mechanism(s) to use for the request.\n   */\n  security?: ReadonlyArray<Auth>;\n  url: Url;\n}\n\nexport type RequestResult<\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = boolean,\n> = ThrowOnError extends true\n  ? Promise<{\n      data: TData;\n      request: Request;\n      response: Response;\n    }>\n  : Promise<\n      ({ data: TData; error: undefined } | { data: undefined; error: TError }) & {\n        request: Request;\n        response: Response;\n      }\n    >;\n\nexport interface ClientOptions {\n  baseUrl?: string;\n  throwOnError?: boolean;\n}\n\ntype MethodFn = <TData = unknown, TError = unknown, ThrowOnError extends boolean = false>(\n  options: Omit<RequestOptions<ThrowOnError>, 'method'>,\n) => RequestResult<TData, TError, ThrowOnError>;\n\ntype RequestFn = <TData = unknown, TError = unknown, ThrowOnError extends boolean = false>(\n  options: Omit<RequestOptions<ThrowOnError>, 'method'> &\n    Pick<Required<RequestOptions<ThrowOnError>>, 'method'>,\n) => RequestResult<TData, TError, ThrowOnError>;\n\ntype BuildUrlFn = <\n  TData extends {\n    body?: unknown;\n    path?: Record<string, unknown>;\n    query?: Record<string, unknown>;\n    url: string;\n  },\n>(\n  options: Pick<TData, 'url'> & Options<TData>,\n) => string;\n\nexport type Client = CoreClient<RequestFn, Config, MethodFn, BuildUrlFn> & {\n  interceptors: Middleware<Request, Response, unknown, RequestOptions>;\n};\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 = ClientOptions> = (\n  override?: Config<ClientOptions & T>,\n) => Config<Required<ClientOptions> & T>;\n\nexport interface TDataShape {\n  body?: unknown;\n  headers?: unknown;\n  path?: unknown;\n  query?: unknown;\n  url: string;\n}\n\ntype OmitKeys<T, K> = Pick<T, Exclude<keyof T, K>>;\n\nexport type Options<\n  TData extends TDataShape = TDataShape,\n  ThrowOnError extends boolean = boolean,\n> = OmitKeys<RequestOptions<ThrowOnError>, 'body' | 'path' | 'query' | 'url'> & Omit<TData, 'url'>;\n"
  },
  {
    "path": "packages/custom-client/src/utils.ts",
    "content": "import { getAuthToken } from './core/auth';\nimport type { QuerySerializer, QuerySerializerOptions } from './core/bodySerializer';\nimport { jsonBodySerializer } from './core/bodySerializer';\nimport {\n  serializeArrayParam,\n  serializeObjectParam,\n  serializePrimitiveParam,\n} from './core/pathSerializer';\nimport type { Client, ClientOptions, Config, RequestOptions } from './types';\n\ninterface PathSerializer {\n  path: Record<string, unknown>;\n  url: string;\n}\n\nconst PATH_PARAM_RE = /\\{[^{}]+\\}/g;\n\ntype ArrayStyle = 'form' | 'spaceDelimited' | 'pipeDelimited';\ntype MatrixStyle = 'label' | 'matrix' | 'simple';\ntype ArraySeparatorStyle = ArrayStyle | MatrixStyle;\n\nconst 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 createQuerySerializer = <T = unknown>({\n  allowReserved,\n  array,\n  object,\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        if (Array.isArray(value)) {\n          const serializedArray = serializeArrayParam({\n            allowReserved,\n            explode: true,\n            name,\n            style: 'form',\n            value,\n            ...array,\n          });\n          if (serializedArray) search.push(serializedArray);\n        } else if (typeof value === 'object') {\n          const serializedObject = serializeObjectParam({\n            allowReserved,\n            explode: true,\n            name,\n            style: 'deepObject',\n            value: value as Record<string, unknown>,\n            ...object,\n          });\n          if (serializedObject) search.push(serializedObject);\n        } else {\n          const serializedPrimitive = serializePrimitiveParam({\n            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  const url = 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  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 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\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 || typeof header !== 'object') {\n      continue;\n    }\n\n    const iterator = header instanceof Headers ? header.entries() : 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"
  },
  {
    "path": "packages/custom-client/tsconfig.base.json",
    "content": "{\n  \"compilerOptions\": {\n    \"declaration\": true,\n    \"esModuleInterop\": true,\n    \"module\": \"ESNext\",\n    \"moduleResolution\": \"Bundler\",\n    \"noImplicitOverride\": true,\n    \"noUncheckedIndexedAccess\": true,\n    \"noUnusedLocals\": true,\n    \"strict\": true,\n    \"target\": \"ES2022\",\n    \"useUnknownInCatchVariables\": false\n  }\n}\n"
  },
  {
    "path": "packages/custom-client/tsconfig.json",
    "content": "{\n  \"extends\": \"./tsconfig.base.json\",\n  \"compilerOptions\": {\n    \"declaration\": false,\n    \"esModuleInterop\": true,\n    \"types\": [\"vitest/globals\"]\n  }\n}\n"
  },
  {
    "path": "packages/custom-client/tsdown.config.ts",
    "content": "import { defineConfig } from 'tsdown';\n\nexport default defineConfig({\n  clean: true,\n  dts: true,\n  entry: ['src/index.ts', 'src/plugin.ts'],\n  format: ['cjs', 'esm'],\n  minify: false,\n  shims: false,\n  sourcemap: true,\n  treeshake: true,\n});\n"
  },
  {
    "path": "packages/json-schema-ref-parser/.gitignore",
    "content": ".gen\n"
  },
  {
    "path": "packages/json-schema-ref-parser/CHANGELOG.md",
    "content": "# @hey-api/json-schema-ref-parser\n\n## 1.3.1\n\n### Patch Changes\n\n- **parser**: prefer unprefixed schema names from external files ([#3417](https://github.com/hey-api/openapi-ts/pull/3417)) ([`f3a264b`](https://github.com/hey-api/openapi-ts/commit/f3a264b2c5d7af06bb44fa0350ef613bde3aff87)) by [@copilot-swe-agent](https://github.com/apps/copilot-swe-agent)\n\n- **parser**: fix: resolve sibling schemas from external files during bundling ([#3422](https://github.com/hey-api/openapi-ts/pull/3422)) ([`19fd80a`](https://github.com/hey-api/openapi-ts/commit/19fd80aff26b1198d6838d48357702c39ad05501)) by [@j-westover](https://github.com/j-westover)\n\n- **input**: fix: avoid prefixing sources if paths do not collide on operations ([#3436](https://github.com/hey-api/openapi-ts/pull/3436)) ([`b1a419a`](https://github.com/hey-api/openapi-ts/commit/b1a419a835c312a1f8bf36a5b781109368041220)) by [@copilot-swe-agent](https://github.com/apps/copilot-swe-agent)\n\n## 1.3.0\n\n### Minor Changes\n\n- **feat**: clean up dependencies ([#3386](https://github.com/hey-api/openapi-ts/pull/3386)) ([`e979b78`](https://github.com/hey-api/openapi-ts/commit/e979b789a052f7bbcfe4474ff8db2f733e23f2bb)) by [@mrlubos](https://github.com/mrlubos)\n\n### Patch Changes\n\n- **fix**: pass seen references through crawl stack ([#3387](https://github.com/hey-api/openapi-ts/pull/3387)) ([`072a9ae`](https://github.com/hey-api/openapi-ts/commit/072a9ae7f336d5c3e5d70085ded21366eeed186d)) by [@mrlubos](https://github.com/mrlubos)\n"
  },
  {
    "path": "packages/json-schema-ref-parser/README.md",
    "content": "# JSON Schema $Ref Parser\n\n#### Parse, Resolve, and Dereference JSON Schema $ref pointers\n\n## Installation\n\nInstall using [npm](https://docs.npmjs.com/about-npm/):\n\n```bash\nnpm install @hey-api/json-schema-ref-parser\nyarn add @hey-api/json-schema-ref-parser\nbun add @hey-api/json-schema-ref-parser\n```\n\n## The Problem:\n\nYou've got a JSON Schema with `$ref` pointers to other files and/or URLs. Maybe you know all the referenced files ahead\nof time. Maybe you don't. Maybe some are local files, and others are remote URLs. Maybe they are a mix of JSON and YAML\nformat. Maybe some of the files contain cross-references to each other.\n\n```json\n{\n  \"definitions\": {\n    \"person\": {\n      // references an external file\n      \"$ref\": \"schemas/people/Bruce-Wayne.json\"\n    },\n    \"place\": {\n      // references a sub-schema in an external file\n      \"$ref\": \"schemas/places.yaml#/definitions/Gotham-City\"\n    },\n    \"thing\": {\n      // references a URL\n      \"$ref\": \"http://wayne-enterprises.com/things/batmobile\"\n    },\n    \"color\": {\n      // references a value in an external file via an internal reference\n      \"$ref\": \"#/definitions/thing/properties/colors/black-as-the-night\"\n    }\n  }\n}\n```\n\n## The Solution:\n\nJSON Schema $Ref Parser is a full [JSON Reference](https://tools.ietf.org/html/draft-pbryan-zyp-json-ref-03)\nand [JSON Pointer](https://tools.ietf.org/html/rfc6901) implementation that crawls even the most\ncomplex [JSON Schemas](http://json-schema.org/latest/json-schema-core.html) and gives you simple, straightforward\nJavaScript objects.\n\n- Use **JSON** or **YAML** schemas &mdash; or even a mix of both!\n- Supports `$ref` pointers to external files and URLs, as well as custom sources such as databases\n- Can bundle multiple files into a single schema that only has _internal_ `$ref` pointers\n- Can dereference your schema, producing a plain-old JavaScript object that's easy to work with\n- Supports circular references, nested references,\n  back-references, and cross-references between files\n- Maintains object reference equality &mdash; `$ref` pointers to the same value always resolve to the same object\n  instance\n- Compatible with Node LTS and beyond, and all major web browsers on Windows, Mac, and Linux\n\n### New in this fork (@hey-api)\n\n- **Multiple inputs with `bundleMany`**: Merge and bundle several OpenAPI/JSON Schema inputs (files, URLs, or raw objects) into a single schema. Components are prefixed to avoid name collisions, paths are namespaced on conflict, and `$ref`s are rewritten accordingly.\n\n```javascript\nimport { $RefParser } from '@hey-api/json-schema-ref-parser';\n\nconst parser = new $RefParser();\nconst merged = await parser.bundleMany({\n  pathOrUrlOrSchemas: [\n    './specs/a.yaml',\n    'https://example.com/b.yaml',\n    { openapi: '3.1.0', info: { title: 'Inline' }, paths: {} },\n  ],\n});\n\n// merged.components.* will contain prefixed names like a_<name>, b_<name>, etc.\n```\n\n- **Dereference hooks**: Fine-tune dereferencing with `excludedPathMatcher(path) => boolean` to skip subpaths and `onDereference(path, value, parent, parentPropName)` to observe replacements.\n\n```javascript\nconst parser = new $RefParser();\nparser.options.dereference.excludedPathMatcher = (p) => p.includes('/example/');\nparser.options.dereference.onDereference = (p, v) => {\n  // inspect p / v as needed\n};\nawait parser.dereference({ pathOrUrlOrSchema: './openapi.yaml' });\n```\n\n- **Smart input resolution**: You can pass a file path, URL, or raw schema object. If a raw schema includes `$id`, it is used as the base URL for resolving relative `$ref`s.\n\n```javascript\nawait new $RefParser().bundle({\n  pathOrUrlOrSchema: {\n    $id: 'https://api.example.com/openapi.json',\n    openapi: '3.1.0',\n    paths: {\n      '/ping': { get: { responses: { 200: { description: 'ok' } } } },\n    },\n  },\n});\n```\n"
  },
  {
    "path": "packages/json-schema-ref-parser/package.json",
    "content": "{\n  \"name\": \"@hey-api/json-schema-ref-parser\",\n  \"version\": \"1.3.1\",\n  \"description\": \"Parse, Resolve, and Dereference JSON Schema $ref pointers\",\n  \"keywords\": [\n    \"$ref\",\n    \"dereference\",\n    \"json\",\n    \"json-pointer\",\n    \"json-schema\",\n    \"jsonschema\",\n    \"resolve\",\n    \"schema\"\n  ],\n  \"homepage\": \"https://heyapi.dev/\",\n  \"bugs\": {\n    \"url\": \"https://github.com/hey-api/openapi-ts/issues\"\n  },\n  \"license\": \"MIT\",\n  \"author\": {\n    \"name\": \"Hey API\",\n    \"email\": \"lubos@heyapi.dev\",\n    \"url\": \"https://heyapi.dev\"\n  },\n  \"repository\": {\n    \"type\": \"git\",\n    \"url\": \"git+https://github.com/hey-api/openapi-ts.git\"\n  },\n  \"funding\": \"https://github.com/sponsors/hey-api\",\n  \"files\": [\n    \"src\",\n    \"dist\",\n    \"cjs\"\n  ],\n  \"type\": \"module\",\n  \"main\": \"./dist/index.mjs\",\n  \"types\": \"./dist/index.d.mts\",\n  \"exports\": {\n    \".\": {\n      \"types\": \"./dist/index.d.mts\",\n      \"import\": \"./dist/index.mjs\"\n    },\n    \"./package.json\": \"./package.json\"\n  },\n  \"scripts\": {\n    \"build\": \"tsdown && pnpm check-exports\",\n    \"check-exports\": \"attw --pack . --profile esm-only --ignore-rules cjs-resolves-to-esm\",\n    \"dev\": \"tsdown --watch\",\n    \"prepublishOnly\": \"pnpm build\",\n    \"typecheck\": \"tsgo --noEmit\"\n  },\n  \"dependencies\": {\n    \"@jsdevtools/ono\": \"7.1.3\",\n    \"@types/json-schema\": \"7.0.15\",\n    \"yaml\": \"2.8.2\"\n  },\n  \"devDependencies\": {\n    \"typescript\": \"5.9.3\"\n  },\n  \"engines\": {\n    \"node\": \">=20.19.0\"\n  }\n}\n"
  },
  {
    "path": "packages/json-schema-ref-parser/src/__tests__/__snapshots__/circular-ref-with-description.json",
    "content": "{\n  \"schemas\": {\n    \"Foo\": {\n      \"$ref\": \"#/schemas/Bar\"\n    },\n    \"Bar\": {\n      \"description\": \"ok\",\n      \"$ref\": \"#/schemas/Foo\"\n    }\n  }\n}"
  },
  {
    "path": "packages/json-schema-ref-parser/src/__tests__/__snapshots__/main-with-external-siblings.json",
    "content": "{\n  \"openapi\": \"3.0.0\",\n  \"info\": {\n    \"title\": \"Test API\",\n    \"version\": \"1.0.0\"\n  },\n  \"paths\": {\n    \"/resolution\": {\n      \"get\": {\n        \"summary\": \"Get resolution step\",\n        \"responses\": {\n          \"200\": {\n            \"description\": \"Success\",\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"$ref\": \"#/components/schemas/ResolutionStep\"\n                }\n              }\n            }\n          }\n        }\n      }\n    },\n    \"/action\": {\n      \"get\": {\n        \"summary\": \"Get action info\",\n        \"responses\": {\n          \"200\": {\n            \"description\": \"Success\",\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"$ref\": \"#/components/schemas/ActionInfo\"\n                }\n              }\n            }\n          }\n        }\n      }\n    }\n  },\n  \"components\": {\n    \"schemas\": {\n      \"ActionInfo\": {\n        \"type\": \"object\",\n        \"properties\": {\n          \"ActionId\": {\n            \"type\": \"string\"\n          }\n        }\n      },\n      \"ResolutionStep\": {\n        \"type\": \"object\",\n        \"properties\": {\n          \"ResolutionType\": {\n            \"oneOf\": [\n              {\n                \"$ref\": \"#/components/schemas/ResolutionType\"\n              }\n            ]\n          },\n          \"ActionName\": {\n            \"type\": \"string\"\n          }\n        }\n      },\n      \"ResolutionType\": {\n        \"type\": \"string\",\n        \"enum\": [\n          \"ContactVendor\",\n          \"ResetToDefaults\",\n          \"RetryOperation\"\n        ]\n      }\n    }\n  }\n}"
  },
  {
    "path": "packages/json-schema-ref-parser/src/__tests__/__snapshots__/multiple-refs.json",
    "content": "{\n  \"paths\": {\n    \"/test1/{pathId}\": {\n      \"get\": {\n        \"summary\": \"First endpoint using the same pathId schema\",\n        \"parameters\": [\n          {\n            \"$ref\": \"#/components/parameters/pathId\"\n          }\n        ],\n        \"responses\": {\n          \"200\": {\n            \"description\": \"Test 1 response\"\n          }\n        }\n      }\n    },\n    \"/test2/{pathId}\": {\n      \"get\": {\n        \"summary\": \"Second endpoint using the same pathId schema\",\n        \"parameters\": [\n          {\n            \"$ref\": \"#/components/parameters/pathId\"\n          }\n        ],\n        \"responses\": {\n          \"200\": {\n            \"description\": \"Test 2 response\"\n          }\n        }\n      }\n    }\n  },\n  \"components\": {\n    \"parameters\": {\n      \"pathId\": {\n        \"name\": \"pathId\",\n        \"in\": \"path\",\n        \"required\": true,\n        \"schema\": {\n          \"type\": \"string\",\n          \"format\": \"uuid\",\n          \"description\": \"Unique identifier for the path\"\n        }\n      }\n    }\n  }\n}"
  },
  {
    "path": "packages/json-schema-ref-parser/src/__tests__/__snapshots__/redfish-like.json",
    "content": "{\n  \"openapi\": \"3.0.0\",\n  \"info\": {\n    \"title\": \"Redfish-like API\",\n    \"version\": \"1.0.0\",\n    \"description\": \"Test API simulating Redfish structure with versioned schemas\"\n  },\n  \"paths\": {\n    \"/redfish/v1/Systems\": {\n      \"get\": {\n        \"summary\": \"Get Systems\",\n        \"responses\": {\n          \"200\": {\n            \"description\": \"Success\",\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"$ref\": \"#/components/schemas/ResolutionStep_v1_0_1_ResolutionStep\"\n                }\n              }\n            }\n          },\n          \"default\": {\n            \"description\": \"Error\"\n          }\n        }\n      }\n    },\n    \"/redfish/v1/Actions\": {\n      \"post\": {\n        \"summary\": \"Submit Action\",\n        \"responses\": {\n          \"200\": {\n            \"description\": \"Success\",\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"$ref\": \"#/components/schemas/ResolutionStep_v1_0_1_ActionParameters\"\n                }\n              }\n            }\n          }\n        }\n      }\n    }\n  },\n  \"components\": {\n    \"schemas\": {\n      \"ResolutionStep_v1_0_1_ActionParameters\": {\n        \"type\": \"object\",\n        \"properties\": {\n          \"ActionId\": {\n            \"type\": \"string\"\n          },\n          \"ActionType\": {\n            \"$ref\": \"#/components/schemas/ResolutionStep_v1_0_1_ResolutionType\"\n          }\n        }\n      },\n      \"ResolutionStep_v1_0_1_ResolutionStep\": {\n        \"type\": \"object\",\n        \"properties\": {\n          \"ResolutionType\": {\n            \"oneOf\": [\n              {\n                \"$ref\": \"#/components/schemas/ResolutionStep_v1_0_1_ResolutionType\"\n              }\n            ]\n          },\n          \"ActionName\": {\n            \"type\": \"string\",\n            \"description\": \"Name of the action\"\n          }\n        }\n      },\n      \"ResolutionStep_v1_0_1_ResolutionType\": {\n        \"type\": \"string\",\n        \"enum\": [\n          \"ContactVendor\",\n          \"ResetToDefaults\",\n          \"RetryOperation\"\n        ],\n        \"description\": \"Types of resolution actions\"\n      }\n    }\n  }\n}"
  },
  {
    "path": "packages/json-schema-ref-parser/src/__tests__/bundle.test.ts",
    "content": "import fs from 'node:fs';\nimport path from 'node:path';\nimport { fileURLToPath } from 'node:url';\n\nimport { $RefParser } from '..';\nimport { getSpecsPath } from './utils';\n\nconst __filename = fileURLToPath(import.meta.url);\nconst __dirname = path.dirname(__filename);\n\nconst getSnapshotsPath = () => path.join(__dirname, '__snapshots__');\nconst getTempSnapshotsPath = () => path.join(__dirname, '.gen', 'snapshots');\n\n/**\n * Helper function to compare a bundled schema with a snapshot file.\n * Handles writing the schema to a temp file and comparing with the snapshot.\n *\n * @param schema - The bundled schema to compare\n * @param snapshotName - The name of the snapshot file (e.g., 'circular-ref-with-description.json')\n */\nconst expectBundledSchemaToMatchSnapshot = async (schema: unknown, snapshotName: string) => {\n  const outputPath = path.join(getTempSnapshotsPath(), snapshotName);\n  const snapshotPath = path.join(getSnapshotsPath(), snapshotName);\n\n  // Ensure directory exists\n  fs.mkdirSync(path.dirname(outputPath), { recursive: true });\n\n  // Write the bundled result\n  const content = JSON.stringify(schema, null, 2);\n  fs.writeFileSync(outputPath, content);\n\n  // Compare with snapshot\n  await expect(content).toMatchFileSnapshot(snapshotPath);\n};\n\ndescribe('bundle', () => {\n  it('handles circular reference with description', async () => {\n    const refParser = new $RefParser();\n    const pathOrUrlOrSchema = path.join(\n      getSpecsPath(),\n      'json-schema-ref-parser',\n      'circular-ref-with-description.json',\n    );\n    const schema = await refParser.bundle({ pathOrUrlOrSchema });\n\n    await expectBundledSchemaToMatchSnapshot(schema, 'circular-ref-with-description.json');\n  });\n\n  it('bundles multiple references to the same file correctly', async () => {\n    const refParser = new $RefParser();\n    const pathOrUrlOrSchema = path.join(\n      getSpecsPath(),\n      'json-schema-ref-parser',\n      'multiple-refs.json',\n    );\n    const schema = await refParser.bundle({ pathOrUrlOrSchema });\n\n    await expectBundledSchemaToMatchSnapshot(schema, 'multiple-refs.json');\n  });\n\n  it('hoists sibling schemas from external files', async () => {\n    const refParser = new $RefParser();\n    const pathOrUrlOrSchema = path.join(\n      getSpecsPath(),\n      'json-schema-ref-parser',\n      'main-with-external-siblings.json',\n    );\n    const schema = await refParser.bundle({ pathOrUrlOrSchema });\n\n    await expectBundledSchemaToMatchSnapshot(schema, 'main-with-external-siblings.json');\n  });\n\n  it('hoists sibling schemas from YAML files with versioned names (Redfish-like)', async () => {\n    const refParser = new $RefParser();\n    const pathOrUrlOrSchema = path.join(\n      getSpecsPath(),\n      'json-schema-ref-parser',\n      'redfish-like.yaml',\n    );\n    const schema = await refParser.bundle({ pathOrUrlOrSchema });\n\n    await expectBundledSchemaToMatchSnapshot(schema, 'redfish-like.json');\n  });\n\n  describe('sibling schema resolution', () => {\n    const specsDir = path.join(getSpecsPath(), 'json-schema-ref-parser');\n\n    const findSchemaByValue = (\n      schemas: Record<string, any>,\n      predicate: (value: any) => boolean,\n    ): [string, any] | undefined => {\n      for (const [name, value] of Object.entries(schemas)) {\n        if (predicate(value)) {\n          return [name, value];\n        }\n      }\n      return undefined;\n    };\n\n    it('hoists sibling schemas through a bare $ref wrapper chain', async () => {\n      const refParser = new $RefParser();\n      const pathOrUrlOrSchema = path.join(specsDir, 'sibling-schema-root.json');\n      const schema = (await refParser.bundle({ pathOrUrlOrSchema })) as any;\n\n      expect(schema.components).toBeDefined();\n      expect(schema.components.schemas).toBeDefined();\n\n      const schemas = schema.components.schemas;\n\n      const mainSchema = findSchemaByValue(\n        schemas,\n        (v) => v.type === 'object' && v.properties?.name,\n      );\n      expect(mainSchema).toBeDefined();\n      const [mainName, mainValue] = mainSchema!;\n      expect(mainValue.type).toBe('object');\n      expect(mainValue.properties.name).toEqual({ type: 'string' });\n\n      const enumSchema = findSchemaByValue(\n        schemas,\n        (v) => Array.isArray(v.enum) && v.enum.includes('active'),\n      );\n      expect(enumSchema).toBeDefined();\n      const [enumName, enumValue] = enumSchema!;\n      expect(enumValue.type).toBe('string');\n      expect(enumValue.enum).toEqual(['active', 'inactive', 'pending']);\n\n      // The main schema's status property should reference the hoisted enum\n      expect(mainValue.properties.status.$ref).toBe(`#/components/schemas/${enumName}`);\n\n      // The root path's schema ref should point to the hoisted main schema\n      const rootRef = schema.paths['/test'].get.responses['200'].content['application/json'].schema;\n      expect(rootRef.$ref).toBe(`#/components/schemas/${mainName}`);\n    });\n\n    it('hoists sibling schemas through an extended $ref wrapper chain', async () => {\n      const refParser = new $RefParser();\n      const pathOrUrlOrSchema = path.join(specsDir, 'sibling-schema-extended-root.json');\n      const warnSpy = vi.spyOn(console, 'warn').mockImplementation(() => {});\n\n      try {\n        const schema = (await refParser.bundle({ pathOrUrlOrSchema })) as any;\n\n        expect(schema.components).toBeDefined();\n        expect(schema.components.schemas).toBeDefined();\n\n        const schemas = schema.components.schemas;\n\n        // The main schema should be hoisted (with the extra description merged in)\n        const mainSchema = findSchemaByValue(\n          schemas,\n          (v) =>\n            v.description === 'Wrapper that extends the versioned schema' ||\n            (v.type === 'object' && v.properties?.name),\n        );\n        expect(mainSchema).toBeDefined();\n\n        // The sibling enum must also be hoisted (this was the bug — it was lost before the fix)\n        const enumSchema = findSchemaByValue(\n          schemas,\n          (v) => Array.isArray(v.enum) && v.enum.includes('active'),\n        );\n        expect(enumSchema).toBeDefined();\n        const [, enumValue] = enumSchema!;\n        expect(enumValue.type).toBe('string');\n        expect(enumValue.enum).toEqual(['active', 'inactive', 'pending']);\n\n        // No \"Skipping unresolvable $ref\" warnings should have been emitted\n        const unresolvableWarnings = warnSpy.mock.calls.filter(\n          (args) => typeof args[0] === 'string' && args[0].includes('Skipping unresolvable $ref'),\n        );\n        expect(unresolvableWarnings).toHaveLength(0);\n      } finally {\n        warnSpy.mockRestore();\n      }\n    });\n\n    it('hoists sibling schemas from a direct reference (no wrapper)', async () => {\n      const refParser = new $RefParser();\n      const pathOrUrlOrSchema = path.join(specsDir, 'sibling-schema-direct-root.json');\n      const schema = (await refParser.bundle({ pathOrUrlOrSchema })) as any;\n\n      expect(schema.components).toBeDefined();\n      expect(schema.components.schemas).toBeDefined();\n\n      const schemas = schema.components.schemas;\n\n      const mainSchema = findSchemaByValue(\n        schemas,\n        (v) => v.type === 'object' && v.properties?.name,\n      );\n      expect(mainSchema).toBeDefined();\n\n      const enumSchema = findSchemaByValue(\n        schemas,\n        (v) => Array.isArray(v.enum) && v.enum.includes('active'),\n      );\n      expect(enumSchema).toBeDefined();\n      const [enumName, enumValue] = enumSchema!;\n      expect(enumValue.enum).toEqual(['active', 'inactive', 'pending']);\n\n      const [, mainValue] = mainSchema!;\n      expect(mainValue.properties.status.$ref).toBe(`#/components/schemas/${enumName}`);\n    });\n\n    it('hoists multiple sibling schemas through an extended wrapper', async () => {\n      const refParser = new $RefParser();\n      const pathOrUrlOrSchema = path.join(specsDir, 'sibling-schema-multi-root.json');\n      const warnSpy = vi.spyOn(console, 'warn').mockImplementation(() => {});\n\n      try {\n        const schema = (await refParser.bundle({ pathOrUrlOrSchema })) as any;\n\n        expect(schema.components).toBeDefined();\n        expect(schema.components.schemas).toBeDefined();\n\n        const schemas = schema.components.schemas;\n\n        const mainSchema = findSchemaByValue(\n          schemas,\n          (v) => v.type === 'object' && v.properties?.health,\n        );\n        expect(mainSchema).toBeDefined();\n\n        const statusEnum = findSchemaByValue(\n          schemas,\n          (v) => Array.isArray(v.enum) && v.enum.includes('enabled'),\n        );\n        expect(statusEnum).toBeDefined();\n        expect(statusEnum![1].enum).toEqual(['enabled', 'disabled', 'standby']);\n\n        const healthEnum = findSchemaByValue(\n          schemas,\n          (v) => Array.isArray(v.enum) && v.enum.includes('ok'),\n        );\n        expect(healthEnum).toBeDefined();\n        expect(healthEnum![1].enum).toEqual(['ok', 'warning', 'critical']);\n\n        const [, mainValue] = mainSchema!;\n        expect(mainValue.properties.status.$ref).toBe(`#/components/schemas/${statusEnum![0]}`);\n        expect(mainValue.properties.health.$ref).toBe(`#/components/schemas/${healthEnum![0]}`);\n\n        const unresolvableWarnings = warnSpy.mock.calls.filter(\n          (args) => typeof args[0] === 'string' && args[0].includes('Skipping unresolvable $ref'),\n        );\n        expect(unresolvableWarnings).toHaveLength(0);\n      } finally {\n        warnSpy.mockRestore();\n      }\n    });\n\n    it('handles multiple external files with same-named sibling schemas', async () => {\n      const refParser = new $RefParser();\n      const pathOrUrlOrSchema = path.join(specsDir, 'sibling-schema-collision-root.json');\n      const warnSpy = vi.spyOn(console, 'warn').mockImplementation(() => {});\n\n      try {\n        const schema = (await refParser.bundle({ pathOrUrlOrSchema })) as any;\n\n        expect(schema.components).toBeDefined();\n        expect(schema.components.schemas).toBeDefined();\n\n        const schemas = schema.components.schemas;\n        const schemaNames = Object.keys(schemas);\n\n        const mainSchemaKey = schemaNames.find((name) => name.includes('MainSchema'));\n        const otherSchemaKey = schemaNames.find((name) => name.includes('OtherSchema'));\n\n        expect(mainSchemaKey).toBeDefined();\n        expect(otherSchemaKey).toBeDefined();\n\n        const statusSchemas = schemaNames.filter((name) => name.includes('Status'));\n        expect(statusSchemas.length).toBeGreaterThanOrEqual(2);\n\n        const statusValues = statusSchemas.map((name) => schemas[name]);\n        const stringStatus = statusValues.find((v: any) => v.type === 'string');\n        const integerStatus = statusValues.find((v: any) => v.type === 'integer');\n\n        expect(stringStatus).toBeDefined();\n        expect(integerStatus).toBeDefined();\n        expect(stringStatus!.enum).toEqual(['active', 'inactive']);\n        expect(integerStatus!.enum).toEqual([0, 1, 2]);\n\n        const mainSchemaValue = schemas[mainSchemaKey!];\n        const mainStatusRef = mainSchemaValue.properties.status.$ref;\n        expect(mainStatusRef).toMatch(/^#\\/components\\/schemas\\/.*Status/);\n\n        const referencedStatus = schemas[mainStatusRef.replace('#/components/schemas/', '')];\n        expect(referencedStatus).toBeDefined();\n        expect(referencedStatus.type).toBe('string');\n        expect(referencedStatus.enum).toEqual(['active', 'inactive']);\n\n        const otherSchemaValue = schemas[otherSchemaKey!];\n        const otherStatusRef = otherSchemaValue.properties.code.$ref;\n        expect(otherStatusRef).toMatch(/^#\\/components\\/schemas\\/.*Status/);\n\n        const referencedOtherStatus = schemas[otherStatusRef.replace('#/components/schemas/', '')];\n        expect(referencedOtherStatus).toBeDefined();\n        expect(referencedOtherStatus.type).toBe('integer');\n        expect(referencedOtherStatus.enum).toEqual([0, 1, 2]);\n\n        const unresolvableWarnings = warnSpy.mock.calls.filter(\n          (args) => typeof args[0] === 'string' && args[0].includes('Skipping unresolvable $ref'),\n        );\n        expect(unresolvableWarnings).toHaveLength(0);\n      } finally {\n        warnSpy.mockRestore();\n      }\n    });\n  });\n\n  describe('mergeMany', () => {\n    it('merges paths with non-conflicting methods under the same path', async () => {\n      const refParser = new $RefParser();\n      const spec1 = {\n        info: { title: 'Spec 1', version: '1.0.0' },\n        paths: {\n          '/pet/{petId}': {\n            post: {\n              operationId: 'updatePetWithForm',\n              responses: { '405': { description: 'Invalid input' } },\n            },\n          },\n        },\n        swagger: '2.0',\n      };\n      const spec2 = {\n        info: { title: 'Spec 2', version: '1.0.0' },\n        paths: {\n          '/pet/{petId}': {\n            delete: {\n              operationId: 'deletePet',\n              responses: {\n                '400': { description: 'Invalid ID supplied' },\n                '404': { description: 'Pet not found' },\n              },\n            },\n          },\n        },\n        swagger: '2.0',\n      };\n\n      const merged = (await refParser.bundleMany({ pathOrUrlOrSchemas: [spec1, spec2] })) as any;\n\n      // Both methods should be under the same path (no prefix added)\n      expect(merged.paths['/pet/{petId}']).toBeDefined();\n      expect(merged.paths['/pet/{petId}'].post).toBeDefined();\n      expect(merged.paths['/pet/{petId}'].delete).toBeDefined();\n\n      // No prefixed path should be created\n      const pathKeys = Object.keys(merged.paths);\n      expect(pathKeys).toHaveLength(1);\n    });\n\n    it('adds prefix to path when HTTP methods conflict', async () => {\n      const refParser = new $RefParser();\n      const spec1 = {\n        info: { title: 'Spec 1', version: '1.0.0' },\n        paths: {\n          '/pet/{petId}': {\n            get: {\n              operationId: 'getPetById',\n              responses: { '200': { description: 'OK' } },\n            },\n          },\n        },\n        swagger: '2.0',\n      };\n      const spec2 = {\n        info: { title: 'Spec 2', version: '1.0.0' },\n        paths: {\n          '/pet/{petId}': {\n            get: {\n              operationId: 'getPet',\n              responses: { '200': { description: 'Success' } },\n            },\n          },\n        },\n        swagger: '2.0',\n      };\n\n      const merged = (await refParser.bundleMany({ pathOrUrlOrSchemas: [spec1, spec2] })) as any;\n\n      // The conflicting path should be prefixed\n      const pathKeys = Object.keys(merged.paths);\n      expect(pathKeys).toHaveLength(2);\n      expect(merged.paths['/pet/{petId}']).toBeDefined();\n      const prefixedKey = pathKeys.find((k) => k !== '/pet/{petId}');\n      expect(prefixedKey).toBeDefined();\n      expect(merged.paths[prefixedKey!].get).toBeDefined();\n    });\n  });\n});\n"
  },
  {
    "path": "packages/json-schema-ref-parser/src/__tests__/index.test.ts",
    "content": "import path from 'node:path';\n\nimport { getResolvedInput } from '../index';\n\ndescribe('getResolvedInput', () => {\n  it('handles url', async () => {\n    const pathOrUrlOrSchema = 'https://foo.com';\n    const resolvedInput = await getResolvedInput({ pathOrUrlOrSchema });\n    expect(resolvedInput.type).toBe('url');\n    expect(resolvedInput.schema).toBeUndefined();\n    expect(resolvedInput.path).toBe('https://foo.com/');\n  });\n\n  it('handles file', async () => {\n    const pathOrUrlOrSchema = './path/to/openapi.json';\n    const resolvedInput = await getResolvedInput({ pathOrUrlOrSchema });\n    expect(resolvedInput.type).toBe('file');\n    expect(resolvedInput.schema).toBeUndefined();\n    expect(path.normalize(resolvedInput.path).toLowerCase()).toBe(\n      path.normalize(path.resolve('./path/to/openapi.json')).toLowerCase(),\n    );\n  });\n\n  it('handles raw spec', async () => {\n    const pathOrUrlOrSchema = {\n      info: {\n        version: '1.0.0',\n      },\n      openapi: '3.1.0',\n      paths: {},\n    };\n    const resolvedInput = await getResolvedInput({ pathOrUrlOrSchema });\n    expect(resolvedInput.type).toBe('json');\n    expect(resolvedInput.schema).toEqual({\n      info: {\n        version: '1.0.0',\n      },\n      openapi: '3.1.0',\n      paths: {},\n    });\n    expect(resolvedInput.path).toBe('');\n  });\n});\n"
  },
  {
    "path": "packages/json-schema-ref-parser/src/__tests__/pointer.test.ts",
    "content": "import path from 'node:path';\n\nimport { $RefParser } from '..';\nimport { getSpecsPath } from './utils';\n\ndescribe('pointer', () => {\n  it('inlines internal JSON Pointer refs under #/paths/ for OpenAPI bundling', async () => {\n    const refParser = new $RefParser();\n    const pathOrUrlOrSchema = path.join(\n      getSpecsPath(),\n      'json-schema-ref-parser',\n      'openapi-paths-ref.json',\n    );\n    const schema = (await refParser.bundle({ pathOrUrlOrSchema })) as any;\n\n    // The GET endpoint should have its schema defined inline\n    const getSchema = schema.paths['/foo'].get.responses['200'].content['application/json'].schema;\n    expect(getSchema.$ref).toBeUndefined();\n    expect(getSchema.type).toBe('object');\n    expect(getSchema.properties.bar.type).toBe('string');\n\n    // The POST endpoint should have its schema inlined (copied) instead of a $ref\n    const postSchema =\n      schema.paths['/foo'].post.responses['200'].content['application/json'].schema;\n    expect(postSchema.$ref).toBe(\n      '#/paths/~1foo/get/responses/200/content/application~1json/schema',\n    );\n    expect(postSchema.type).toBeUndefined();\n    expect(postSchema.properties?.bar?.type).toBeUndefined();\n\n    // Both schemas should be identical objects\n    expect(postSchema).not.toBe(getSchema);\n  });\n});\n"
  },
  {
    "path": "packages/json-schema-ref-parser/src/__tests__/utils.ts",
    "content": "import path from 'node:path';\n\nexport const getSpecsPath = (): string => path.join(__dirname, '..', '..', '..', '..', 'specs');\n"
  },
  {
    "path": "packages/json-schema-ref-parser/src/bundle.ts",
    "content": "import type { $RefParser } from '.';\nimport type { ParserOptions } from './options';\nimport Pointer from './pointer';\nimport $Ref from './ref';\nimport type $Refs from './refs';\nimport type { JSONSchema } from './types';\nimport { MissingPointerError } from './util/errors';\nimport * as url from './util/url';\n\nexport interface InventoryEntry {\n  $ref: any;\n  circular: any;\n  depth: any;\n  extended: any;\n  external: any;\n  file: any;\n  hash: any;\n  indirections: any;\n  key: any;\n  originalContainerType?: 'schemas' | 'parameters' | 'requestBodies' | 'responses' | 'headers';\n  parent: any;\n  pathFromRoot: any;\n  value: any;\n}\n\n/**\n * Fast lookup using Map instead of linear search with deep equality\n */\nconst createInventoryLookup = () => {\n  const lookup = new Map<string, InventoryEntry>();\n  const objectIds = new WeakMap<object, string>(); // Use WeakMap to avoid polluting objects\n  let idCounter = 0;\n\n  const getObjectId = (obj: any) => {\n    if (!objectIds.has(obj)) {\n      objectIds.set(obj, `obj_${++idCounter}`);\n    }\n    return objectIds.get(obj)!;\n  };\n\n  const createInventoryKey = ($refParent: any, $refKey: any) =>\n    // Use WeakMap-based lookup to avoid polluting the actual schema objects\n    `${getObjectId($refParent)}_${$refKey}`;\n\n  return {\n    add: (entry: InventoryEntry) => {\n      const key = createInventoryKey(entry.parent, entry.key);\n      lookup.set(key, entry);\n    },\n    find: ($refParent: any, $refKey: any) => {\n      const key = createInventoryKey($refParent, $refKey);\n      const result = lookup.get(key);\n      return result;\n    },\n    remove: (entry: InventoryEntry) => {\n      const key = createInventoryKey(entry.parent, entry.key);\n      lookup.delete(key);\n    },\n  };\n};\n\n/**\n * Determine the container type from a JSON Pointer path.\n * Analyzes the path tokens to identify the appropriate OpenAPI component container.\n *\n * @param path - The JSON Pointer path to analyze\n * @returns The container type: \"schemas\", \"parameters\", \"requestBodies\", \"responses\", or \"headers\"\n */\nconst getContainerTypeFromPath = (\n  path: string,\n): 'schemas' | 'parameters' | 'requestBodies' | 'responses' | 'headers' => {\n  const tokens = Pointer.parse(path);\n  const has = (t: string) => tokens.includes(t);\n  // Prefer more specific containers first\n  if (has('parameters')) {\n    return 'parameters';\n  }\n  if (has('requestBody')) {\n    return 'requestBodies';\n  }\n  if (has('headers')) {\n    return 'headers';\n  }\n  if (has('responses')) {\n    return 'responses';\n  }\n  if (has('schema')) {\n    return 'schemas';\n  }\n  // default: treat as schema-like\n  return 'schemas';\n};\n\n/**\n * Inventories the given JSON Reference (i.e. records detailed information about it so we can\n * optimize all $refs in the schema), and then crawls the resolved value.\n */\nconst inventory$Ref = <S extends object = JSONSchema>({\n  $refKey,\n  $refParent,\n  $refs,\n  indirections,\n  inventory,\n  inventoryLookup,\n  options,\n  path,\n  pathFromRoot,\n  resolvedRefs = new Map(),\n  visitedObjects = new WeakSet(),\n}: {\n  /**\n   * The key in `$refParent` that is a JSON Reference\n   */\n  $refKey: string | null;\n  /**\n   * The object that contains a JSON Reference as one of its keys\n   */\n  $refParent: any;\n  $refs: $Refs<S>;\n  /**\n   * unknown\n   */\n  indirections: number;\n  /**\n   * An array of already-inventoried $ref pointers\n   */\n  inventory: Array<InventoryEntry>;\n  /**\n   * Fast lookup for inventory entries\n   */\n  inventoryLookup: ReturnType<typeof createInventoryLookup>;\n  options: ParserOptions;\n  /**\n   * The full path of the JSON Reference at `$refKey`, possibly with a JSON Pointer in the hash\n   */\n  path: string;\n  /**\n   * The path of the JSON Reference at `$refKey`, from the schema root\n   */\n  pathFromRoot: string;\n  /**\n   * Cache for resolved $ref targets to avoid redundant resolution\n   */\n  resolvedRefs?: Map<string, any>;\n  /**\n   * Set of already visited objects to avoid infinite loops and redundant processing\n   */\n  visitedObjects?: WeakSet<object>;\n}) => {\n  const $ref = $refKey === null ? $refParent : $refParent[$refKey];\n  const $refPath = url.resolve(path, $ref.$ref);\n\n  // Check cache first to avoid redundant resolution\n  let pointer = resolvedRefs.get($refPath);\n  if (!pointer) {\n    try {\n      pointer = $refs._resolve($refPath, pathFromRoot, options);\n    } catch (error) {\n      if (error instanceof MissingPointerError) {\n        // The ref couldn't be resolved in the target file. This commonly\n        // happens when a wrapper file redirects via $ref to a versioned\n        // file, and the bundler's crawl path retains the wrapper URL.\n        // Try resolving the hash fragment against other files in $refs\n        // that might contain the target schema.\n        const hash = url.getHash($refPath);\n        if (hash) {\n          const baseFile = url.stripHash($refPath);\n          for (const filePath of Object.keys($refs._$refs)) {\n            if (filePath === baseFile) continue;\n            try {\n              pointer = $refs._resolve(filePath + hash, pathFromRoot, options);\n              if (pointer) break;\n            } catch {\n              // try next file\n            }\n          }\n        }\n        if (!pointer) {\n          console.warn(`Skipping unresolvable $ref: ${$refPath}`);\n          return;\n        }\n      } else {\n        throw error;\n      }\n    }\n\n    if (pointer) {\n      resolvedRefs.set($refPath, pointer);\n    }\n  }\n\n  if (pointer === null) return;\n\n  const parsed = Pointer.parse(pathFromRoot);\n  const depth = parsed.length;\n  const file = url.stripHash(pointer.path);\n  const hash = url.getHash(pointer.path);\n  const external = file !== $refs._root$Ref.path;\n  const extended = $Ref.isExtended$Ref($ref);\n  indirections += pointer.indirections;\n\n  // Check if this exact location (parent + key + pathFromRoot) has already been inventoried\n  const existingEntry = inventoryLookup.find($refParent, $refKey);\n\n  if (existingEntry && existingEntry.pathFromRoot === pathFromRoot) {\n    // This exact location has already been inventoried, so we don't need to process it again\n    if (depth < existingEntry.depth || indirections < existingEntry.indirections) {\n      removeFromInventory(inventory, existingEntry);\n      inventoryLookup.remove(existingEntry);\n    } else {\n      return;\n    }\n  }\n\n  const newEntry: InventoryEntry = {\n    $ref, // The JSON Reference (e.g. {$ref: string})\n    circular: pointer.circular, // Is this $ref pointer DIRECTLY circular? (i.e. it references itself)\n    depth, // How far from the JSON Schema root is this $ref pointer?\n    extended, // Does this $ref extend its resolved value? (i.e. it has extra properties, in addition to \"$ref\")\n    external, // Does this $ref pointer point to a file other than the main JSON Schema file?\n    file, // The file that the $ref pointer resolves to\n    hash, // The hash within `file` that the $ref pointer resolves to\n    indirections, // The number of indirect references that were traversed to resolve the value\n    key: $refKey,\n    // The resolved value of the $ref pointer\n    originalContainerType: external ? getContainerTypeFromPath(pointer.path) : undefined,\n\n    // The key in `parent` that is the $ref pointer\n    parent: $refParent,\n\n    // The object that contains this $ref pointer\n    pathFromRoot,\n    // The path to the $ref pointer, from the JSON Schema root\n    value: pointer.value, // The original container type in the external file\n  };\n\n  inventory.push(newEntry);\n  inventoryLookup.add(newEntry);\n\n  // Recursively crawl the resolved value.\n  // When the resolution followed a $ref chain to a different file,\n  // use the resolved file as the base path so that local $ref values\n  // (e.g. #/components/schemas/SiblingSchema) inside the resolved\n  // value resolve against the correct file.\n  if (!existingEntry || external) {\n    let crawlPath = pointer.path;\n\n    const originalFile = url.stripHash($refPath);\n    if (file !== originalFile) {\n      crawlPath = file + url.getHash(pointer.path);\n    }\n\n    crawl({\n      $refs,\n      indirections: indirections + 1,\n      inventory,\n      inventoryLookup,\n      key: null,\n      options,\n      parent: pointer.value,\n      path: crawlPath,\n      pathFromRoot,\n      resolvedRefs,\n      visitedObjects,\n    });\n  }\n};\n\n/**\n * Recursively crawls the given value, and inventories all JSON references.\n */\nconst crawl = <S extends object = JSONSchema>({\n  $refs,\n  indirections,\n  inventory,\n  inventoryLookup,\n  key,\n  options,\n  parent,\n  path,\n  pathFromRoot,\n  resolvedRefs = new Map(),\n  visitedObjects = new WeakSet(),\n}: {\n  $refs: $Refs<S>;\n  indirections: number;\n  /**\n   * An array of already-inventoried $ref pointers\n   */\n  inventory: Array<InventoryEntry>;\n  /**\n   * Fast lookup for inventory entries\n   */\n  inventoryLookup: ReturnType<typeof createInventoryLookup>;\n  /**\n   * The property key of `parent` to be crawled\n   */\n  key: string | null;\n  options: ParserOptions;\n  /**\n   * The object containing the value to crawl. If the value is not an object or array, it will be ignored.\n   */\n  parent: object | $RefParser;\n  /**\n   * The full path of the property being crawled, possibly with a JSON Pointer in the hash\n   */\n  path: string;\n  /**\n   * The path of the property being crawled, from the schema root\n   */\n  pathFromRoot: string;\n  /**\n   * Cache for resolved $ref targets to avoid redundant resolution\n   */\n  resolvedRefs?: Map<string, any>;\n  /**\n   * Set of already visited objects to avoid infinite loops and redundant processing\n   */\n  visitedObjects?: WeakSet<object>;\n}) => {\n  const obj = key === null ? parent : parent[key as keyof typeof parent];\n\n  if (obj && typeof obj === 'object' && !ArrayBuffer.isView(obj)) {\n    // Early exit if we've already processed this exact object\n    if (visitedObjects.has(obj)) return;\n\n    if ($Ref.isAllowed$Ref(obj)) {\n      inventory$Ref({\n        $refKey: key,\n        $refParent: parent,\n        $refs,\n        indirections,\n        inventory,\n        inventoryLookup,\n        options,\n        path,\n        pathFromRoot,\n        resolvedRefs,\n        visitedObjects,\n      });\n    } else {\n      // Mark this object as visited BEFORE processing its children\n      visitedObjects.add(obj);\n\n      // Crawl the object in a specific order that's optimized for bundling.\n      // This is important because it determines how `pathFromRoot` gets built,\n      // which later determines which keys get dereferenced and which ones get remapped\n      const keys = Object.keys(obj).sort((a, b) => {\n        // Most people will expect references to be bundled into the \"definitions\" property,\n        // so we always crawl that property first, if it exists.\n        if (a === 'definitions') {\n          return -1;\n        } else if (b === 'definitions') {\n          return 1;\n        } else {\n          // Otherwise, crawl the keys based on their length.\n          // This produces the shortest possible bundled references\n          return a.length - b.length;\n        }\n      }) as Array<keyof typeof obj>;\n\n      for (const key of keys) {\n        const keyPath = Pointer.join(path, key);\n        const keyPathFromRoot = Pointer.join(pathFromRoot, key);\n        const value = obj[key];\n\n        if ($Ref.isAllowed$Ref(value)) {\n          inventory$Ref({\n            $refKey: key,\n            $refParent: obj,\n            $refs,\n            indirections,\n            inventory,\n            inventoryLookup,\n            options,\n            path,\n            pathFromRoot: keyPathFromRoot,\n            resolvedRefs,\n            visitedObjects,\n          });\n        } else {\n          crawl({\n            $refs,\n            indirections,\n            inventory,\n            inventoryLookup,\n            key,\n            options,\n            parent: obj,\n            path: keyPath,\n            pathFromRoot: keyPathFromRoot,\n            resolvedRefs,\n            visitedObjects,\n          });\n        }\n      }\n    }\n  }\n};\n\n/**\n * Remap external refs by hoisting resolved values into a shared container in the root schema\n * and pointing all occurrences to those internal definitions. Internal refs remain internal.\n */\nfunction remap(parser: $RefParser, inventory: Array<InventoryEntry>) {\n  const root = parser.schema as any;\n\n  // Group & sort all the $ref pointers, so they're in the order that we need to dereference/remap them\n  inventory.sort((a: InventoryEntry, b: InventoryEntry) => {\n    if (a.file !== b.file) {\n      // Group all the $refs that point to the same file\n      return a.file < b.file ? -1 : +1;\n    } else if (a.hash !== b.hash) {\n      // Group all the $refs that point to the same part of the file\n      return a.hash < b.hash ? -1 : +1;\n    } else if (a.circular !== b.circular) {\n      // If the $ref points to itself, then sort it higher than other $refs that point to this $ref\n      return a.circular ? -1 : +1;\n    } else if (a.extended !== b.extended) {\n      // If the $ref extends the resolved value, then sort it lower than other $refs that don't extend the value\n      return a.extended ? +1 : -1;\n    } else if (a.indirections !== b.indirections) {\n      // Sort direct references higher than indirect references\n      return a.indirections - b.indirections;\n    } else if (a.depth !== b.depth) {\n      // Sort $refs by how close they are to the JSON Schema root\n      return a.depth - b.depth;\n    } else {\n      // Determine how far each $ref is from the \"definitions\" property.\n      // Most people will expect references to be bundled into the the \"definitions\" property if possible.\n      const aDefinitionsIndex = a.pathFromRoot.lastIndexOf('/definitions');\n      const bDefinitionsIndex = b.pathFromRoot.lastIndexOf('/definitions');\n      if (aDefinitionsIndex !== bDefinitionsIndex) {\n        // Give higher priority to the $ref that's closer to the \"definitions\" property\n        return bDefinitionsIndex - aDefinitionsIndex;\n      } else {\n        // All else is equal, so use the shorter path, which will produce the shortest possible reference\n        return a.pathFromRoot.length - b.pathFromRoot.length;\n      }\n    }\n  });\n\n  // Ensure or return a container by component type. Prefer OpenAPI-aware placement;\n  // otherwise use existing root containers; otherwise create components/*.\n  const ensureContainer = (\n    type: 'schemas' | 'parameters' | 'requestBodies' | 'responses' | 'headers',\n  ) => {\n    const isOas3 = !!(root && typeof root === 'object' && typeof root.openapi === 'string');\n    const isOas2 = !!(root && typeof root === 'object' && typeof root.swagger === 'string');\n\n    if (isOas3) {\n      if (!root.components || typeof root.components !== 'object') {\n        root.components = {};\n      }\n      if (!root.components[type] || typeof root.components[type] !== 'object') {\n        root.components[type] = {};\n      }\n      return { obj: root.components[type], prefix: `#/components/${type}` } as const;\n    }\n\n    if (isOas2) {\n      if (type === 'schemas') {\n        if (!root.definitions || typeof root.definitions !== 'object') {\n          root.definitions = {};\n        }\n        return { obj: root.definitions, prefix: '#/definitions' } as const;\n      }\n      if (type === 'parameters') {\n        if (!root.parameters || typeof root.parameters !== 'object') {\n          root.parameters = {};\n        }\n        return { obj: root.parameters, prefix: '#/parameters' } as const;\n      }\n      if (type === 'responses') {\n        if (!root.responses || typeof root.responses !== 'object') {\n          root.responses = {};\n        }\n        return { obj: root.responses, prefix: '#/responses' } as const;\n      }\n      // requestBodies/headers don't exist as reusable containers in OAS2; fallback to definitions\n      if (!root.definitions || typeof root.definitions !== 'object') {\n        root.definitions = {};\n      }\n      return { obj: root.definitions, prefix: '#/definitions' } as const;\n    }\n\n    // No explicit version: prefer existing containers\n    if (root && typeof root === 'object') {\n      if (root.components && typeof root.components === 'object') {\n        if (!root.components[type] || typeof root.components[type] !== 'object') {\n          root.components[type] = {};\n        }\n        return { obj: root.components[type], prefix: `#/components/${type}` } as const;\n      }\n      if (root.definitions && typeof root.definitions === 'object') {\n        return { obj: root.definitions, prefix: '#/definitions' } as const;\n      }\n      // Create components/* by default if nothing exists\n      if (!root.components || typeof root.components !== 'object') {\n        root.components = {};\n      }\n      if (!root.components[type] || typeof root.components[type] !== 'object') {\n        root.components[type] = {};\n      }\n      return { obj: root.components[type], prefix: `#/components/${type}` } as const;\n    }\n\n    // Fallback\n    root.definitions = root.definitions || {};\n    return { obj: root.definitions, prefix: '#/definitions' } as const;\n  };\n\n  /**\n   * Choose the appropriate component container for bundling.\n   * Prioritizes the original container type from external files over usage location.\n   *\n   * @param entry - The inventory entry containing reference information\n   * @returns The container type to use for bundling\n   */\n  const chooseComponent = (entry: InventoryEntry) => {\n    // If we have the original container type from the external file, use it\n    if (entry.originalContainerType) {\n      return entry.originalContainerType;\n    }\n\n    // Fallback to usage path for internal references or when original type is not available\n    return getContainerTypeFromPath(entry.pathFromRoot);\n  };\n\n  // Track names per (container prefix) and per target\n  const targetToNameByPrefix = new Map<string, Map<string, string>>();\n  const usedNamesByObj = new Map<any, Set<string>>();\n\n  const sanitize = (name: string) => name.replace(/[^A-Za-z0-9_-]/g, '_');\n  const baseName = (filePath: string) => {\n    try {\n      const withoutHash = filePath.split('#')[0]!;\n      const parts = withoutHash.split('/');\n      const filename = parts[parts.length - 1] || 'schema';\n      const dot = filename.lastIndexOf('.');\n      return sanitize(dot > 0 ? filename.substring(0, dot) : filename);\n    } catch {\n      return 'schema';\n    }\n  };\n  const lastToken = (hash: string) => {\n    if (!hash || hash === '#') {\n      return 'root';\n    }\n    const tokens = hash.replace(/^#\\//, '').split('/');\n    return sanitize(tokens[tokens.length - 1] || 'root');\n  };\n  const uniqueName = (containerObj: any, proposed: string) => {\n    if (!usedNamesByObj.has(containerObj)) {\n      usedNamesByObj.set(containerObj, new Set<string>(Object.keys(containerObj || {})));\n    }\n    const used = usedNamesByObj.get(containerObj)!;\n    let name = proposed;\n    let i = 2;\n    while (used.has(name)) {\n      name = `${proposed}_${i++}`;\n    }\n    used.add(name);\n    return name;\n  };\n  for (const entry of inventory) {\n    // Safety check: ensure entry and entry.$ref are valid objects\n    if (!entry || !entry.$ref || typeof entry.$ref !== 'object') {\n      continue;\n    }\n\n    // Keep internal refs internal. However, if the $ref extends the resolved value\n    // (i.e. it has additional properties in addition to \"$ref\"), then we must\n    // preserve the original $ref rather than rewriting it to the resolved hash.\n    if (!entry.external) {\n      if (!entry.extended && entry.$ref && typeof entry.$ref === 'object') {\n        entry.$ref.$ref = entry.hash;\n      }\n      continue;\n    }\n\n    // Avoid changing direct self-references; keep them internal\n    if (entry.circular) {\n      if (entry.$ref && typeof entry.$ref === 'object') {\n        entry.$ref.$ref = entry.pathFromRoot;\n      }\n      continue;\n    }\n\n    // Choose appropriate container based on original location in external file\n    const component = chooseComponent(entry);\n    const { obj: container, prefix } = ensureContainer(component);\n\n    const targetKey = `${entry.file}::${entry.hash}`;\n    if (!targetToNameByPrefix.has(prefix)) {\n      targetToNameByPrefix.set(prefix, new Map<string, string>());\n    }\n    const namesForPrefix = targetToNameByPrefix.get(prefix)!;\n\n    let defName = namesForPrefix.get(targetKey);\n    if (!defName) {\n      // If the external file is one of the original input sources, prefer its assigned prefix\n      let proposedBase = baseName(entry.file);\n      try {\n        const parserAny: any = parser as any;\n        if (\n          parserAny &&\n          parserAny.sourcePathToPrefix &&\n          typeof parserAny.sourcePathToPrefix.get === 'function'\n        ) {\n          const withoutHash = (entry.file || '').split('#')[0];\n          const mapped = parserAny.sourcePathToPrefix.get(withoutHash);\n          if (mapped && typeof mapped === 'string') {\n            proposedBase = mapped;\n          }\n        }\n      } catch {\n        // Ignore errors\n      }\n\n      // Try without prefix first (cleaner names)\n      const schemaName = lastToken(entry.hash);\n      let proposed = schemaName;\n\n      // Check if this name would conflict with existing schemas from other files\n      if (!usedNamesByObj.has(container)) {\n        usedNamesByObj.set(container, new Set<string>(Object.keys(container || {})));\n      }\n      const used = usedNamesByObj.get(container)!;\n\n      // If the name is already used, add the file prefix\n      if (used.has(proposed)) {\n        proposed = `${proposedBase}_${schemaName}`;\n      }\n\n      defName = uniqueName(container, proposed);\n      namesForPrefix.set(targetKey, defName);\n      // Store the resolved value under the container\n      container[defName] = entry.value;\n    }\n\n    // Point the occurrence to the internal definition, preserving extensions\n    const refPath = `${prefix}/${defName}`;\n    if (entry.extended && entry.$ref && typeof entry.$ref === 'object') {\n      entry.$ref.$ref = refPath;\n    } else {\n      entry.parent[entry.key] = { $ref: refPath };\n    }\n  }\n}\n\nfunction removeFromInventory(inventory: Array<InventoryEntry>, entry: any) {\n  const index = inventory.indexOf(entry);\n  inventory.splice(index, 1);\n}\n\n/**\n * Bundles all external JSON references into the main JSON schema, thus resulting in a schema that\n * only has *internal* references, not any *external* references.\n * This method mutates the JSON schema object, adding new references and re-mapping existing ones.\n *\n * @param parser\n * @param options\n */\nexport function bundle(parser: $RefParser, options: ParserOptions): void {\n  const inventory: Array<InventoryEntry> = [];\n  const inventoryLookup = createInventoryLookup();\n\n  const visitedObjects = new WeakSet<object>();\n  const resolvedRefs = new Map<string, any>();\n\n  crawl<JSONSchema>({\n    $refs: parser.$refs,\n    indirections: 0,\n    inventory,\n    inventoryLookup,\n    key: 'schema',\n    options,\n    parent: parser,\n    path: parser.$refs._root$Ref.path + '#',\n    pathFromRoot: '#',\n    resolvedRefs,\n    visitedObjects,\n  });\n\n  remap(parser, inventory);\n}\n"
  },
  {
    "path": "packages/json-schema-ref-parser/src/dereference.ts",
    "content": "import { ono } from '@jsdevtools/ono';\n\nimport type { DereferenceOptions, ParserOptions } from './options';\nimport Pointer from './pointer';\nimport $Ref from './ref';\nimport type $Refs from './refs';\nimport type { JSONSchema } from './types';\nimport { TimeoutError } from './util/errors';\nimport * as url from './util/url';\n\n/**\n * Recursively crawls the given value, and dereferences any JSON references.\n *\n * @param obj - The value to crawl. If it's not an object or array, it will be ignored.\n * @param path - The full path of `obj`, possibly with a JSON Pointer in the hash\n * @param pathFromRoot - The path of `obj` from the schema root\n * @param parents - An array of the parent objects that have already been dereferenced\n * @param processedObjects - An array of all the objects that have already been processed\n * @param dereferencedCache - An map of all the dereferenced objects\n * @param $refs\n * @param options\n * @param startTime - The time when the dereferencing started\n * @returns\n */\nfunction crawl<S extends object = JSONSchema>(\n  obj: any,\n  path: string,\n  pathFromRoot: string,\n  parents: Set<any>,\n  processedObjects: Set<any>,\n  dereferencedCache: any,\n  $refs: $Refs<S>,\n  options: ParserOptions,\n  startTime: number,\n) {\n  let dereferenced;\n  const result = {\n    circular: false,\n    value: obj,\n  };\n\n  if (options && options.timeoutMs) {\n    if (Date.now() - startTime > options.timeoutMs) {\n      throw new TimeoutError(options.timeoutMs);\n    }\n  }\n  const derefOptions = (options.dereference || {}) as DereferenceOptions;\n  const isExcludedPath = derefOptions.excludedPathMatcher || (() => false);\n\n  if (derefOptions?.circular === 'ignore' || !processedObjects.has(obj)) {\n    if (\n      obj &&\n      typeof obj === 'object' &&\n      !ArrayBuffer.isView(obj) &&\n      !isExcludedPath(pathFromRoot)\n    ) {\n      parents.add(obj);\n      processedObjects.add(obj);\n\n      if ($Ref.isAllowed$Ref(obj)) {\n        dereferenced = dereference$Ref(\n          obj,\n          path,\n          pathFromRoot,\n          parents,\n          processedObjects,\n          dereferencedCache,\n          $refs,\n          options,\n          startTime,\n        );\n        result.circular = dereferenced.circular;\n        result.value = dereferenced.value;\n      } else {\n        for (const key of Object.keys(obj)) {\n          const keyPath = Pointer.join(path, key);\n          const keyPathFromRoot = Pointer.join(pathFromRoot, key);\n\n          if (isExcludedPath(keyPathFromRoot)) {\n            continue;\n          }\n\n          const value = obj[key];\n          let circular = false;\n\n          if ($Ref.isAllowed$Ref(value)) {\n            dereferenced = dereference$Ref(\n              value,\n              keyPath,\n              keyPathFromRoot,\n              parents,\n              processedObjects,\n              dereferencedCache,\n              $refs,\n              options,\n              startTime,\n            );\n            circular = dereferenced.circular;\n            // Avoid pointless mutations; breaks frozen objects to no profit\n            if (obj[key] !== dereferenced.value) {\n              obj[key] = dereferenced.value;\n              derefOptions?.onDereference?.(value.$ref, obj[key], obj, key);\n            }\n          } else {\n            if (!parents.has(value)) {\n              dereferenced = crawl(\n                value,\n                keyPath,\n                keyPathFromRoot,\n                parents,\n                processedObjects,\n                dereferencedCache,\n                $refs,\n                options,\n                startTime,\n              );\n              circular = dereferenced.circular;\n              // Avoid pointless mutations; breaks frozen objects to no profit\n              if (obj[key] !== dereferenced.value) {\n                obj[key] = dereferenced.value;\n              }\n            } else {\n              circular = foundCircularReference(keyPath, $refs, options);\n            }\n          }\n\n          // Set the \"isCircular\" flag if this or any other property is circular\n          result.circular = result.circular || circular;\n        }\n      }\n\n      parents.delete(obj);\n    }\n  }\n\n  return result;\n}\n\n/**\n * Dereferences the given JSON Reference, and then crawls the resulting value.\n *\n * @param $ref - The JSON Reference to resolve\n * @param path - The full path of `$ref`, possibly with a JSON Pointer in the hash\n * @param pathFromRoot - The path of `$ref` from the schema root\n * @param parents - An array of the parent objects that have already been dereferenced\n * @param processedObjects - An array of all the objects that have already been dereferenced\n * @param dereferencedCache - An map of all the dereferenced objects\n * @param $refs\n * @param options\n * @returns\n */\nfunction dereference$Ref<S extends object = JSONSchema>(\n  $ref: any,\n  path: string,\n  pathFromRoot: string,\n  parents: Set<any>,\n  processedObjects: any,\n  dereferencedCache: any,\n  $refs: $Refs<S>,\n  options: ParserOptions,\n  startTime: number,\n) {\n  const $refPath = url.resolve(path, $ref.$ref);\n\n  const cache = dereferencedCache.get($refPath);\n  if (cache && !cache.circular) {\n    const refKeys = Object.keys($ref);\n    if (refKeys.length > 1) {\n      const extraKeys = {};\n      for (const key of refKeys) {\n        if (key !== '$ref' && !(key in cache.value)) {\n          // @ts-expect-error TS(7053): Element implicitly has an 'any' type because expre... Remove this comment to see the full error message\n          extraKeys[key] = $ref[key];\n        }\n      }\n      return {\n        circular: cache.circular,\n        value: Object.assign({}, structuredClone(cache.value), extraKeys),\n      };\n    }\n\n    // Return a deep-cloned value so each occurrence is an independent copy\n    return { circular: cache.circular, value: structuredClone(cache.value) };\n  }\n\n  const pointer = $refs._resolve($refPath, path, options);\n\n  if (pointer === null) {\n    return {\n      circular: false,\n      value: null,\n    };\n  }\n\n  // Check for circular references\n  const directCircular = pointer.circular;\n  let circular = directCircular || parents.has(pointer.value);\n  if (circular) {\n    foundCircularReference(path, $refs, options);\n  }\n\n  // Dereference the JSON reference\n  let dereferencedValue = $Ref.dereference($ref, pointer.value);\n\n  // Crawl the dereferenced value (unless it's circular)\n  if (!circular) {\n    // Determine if the dereferenced value is circular\n    const dereferenced = crawl(\n      dereferencedValue,\n      pointer.path,\n      pathFromRoot,\n      parents,\n      processedObjects,\n      dereferencedCache,\n      $refs,\n      options,\n      startTime,\n    );\n    circular = dereferenced.circular;\n    dereferencedValue = dereferenced.value;\n  }\n\n  if (circular && !directCircular && options.dereference?.circular === 'ignore') {\n    // The user has chosen to \"ignore\" circular references, so don't change the value\n    dereferencedValue = $ref;\n  }\n\n  if (directCircular) {\n    // The pointer is a DIRECT circular reference (i.e. it references itself).\n    // So replace the $ref path with the absolute path from the JSON Schema root\n    dereferencedValue.$ref = pathFromRoot;\n  }\n\n  const dereferencedObject = {\n    circular,\n    value: dereferencedValue,\n  };\n\n  // only cache if no extra properties than $ref\n  if (Object.keys($ref).length === 1) {\n    dereferencedCache.set($refPath, dereferencedObject);\n  }\n\n  return dereferencedObject;\n}\n\n/**\n * Called when a circular reference is found.\n * It sets the {@link $Refs#circular} flag, and throws an error if options.dereference.circular is false.\n *\n * @param keyPath - The JSON Reference path of the circular reference\n * @param $refs\n * @param options\n * @returns - always returns true, to indicate that a circular reference was found\n */\nfunction foundCircularReference(keyPath: any, $refs: any, options: any) {\n  $refs.circular = true;\n  if (!options.dereference.circular) {\n    throw ono.reference(`Circular $ref pointer found at ${keyPath}`);\n  }\n  return true;\n}\n"
  },
  {
    "path": "packages/json-schema-ref-parser/src/index.ts",
    "content": "import { ono } from '@jsdevtools/ono';\n\nimport { bundle as _bundle } from './bundle';\nimport { getJsonSchemaRefParserDefaultOptions } from './options';\nimport { newFile, parseFile } from './parse';\nimport $Refs from './refs';\nimport { resolveExternal } from './resolve-external';\nimport { fileResolver } from './resolvers/file';\nimport { urlResolver } from './resolvers/url';\nimport type { JSONSchema } from './types';\nimport { isHandledError, JSONParserErrorGroup } from './util/errors';\nimport * as url from './util/url';\n\ninterface ResolvedInput {\n  path: string;\n  schema: string | JSONSchema | Buffer | Awaited<JSONSchema> | undefined;\n  type: 'file' | 'json' | 'url';\n}\n\nexport function getResolvedInput({\n  pathOrUrlOrSchema,\n}: {\n  pathOrUrlOrSchema: JSONSchema | string | unknown;\n}): ResolvedInput {\n  if (!pathOrUrlOrSchema) {\n    throw ono(`Expected a file path, URL, or object. Got ${pathOrUrlOrSchema}`);\n  }\n\n  const resolvedInput: ResolvedInput = {\n    path: typeof pathOrUrlOrSchema === 'string' ? pathOrUrlOrSchema : '',\n    schema: undefined,\n    type: 'url',\n  };\n\n  // If the path is a filesystem path, then convert it to a URL.\n  // NOTE: According to the JSON Reference spec, these should already be URLs,\n  // but, in practice, many people use local filesystem paths instead.\n  // So we're being generous here and doing the conversion automatically.\n  // This is not intended to be a 100% bulletproof solution.\n  // If it doesn't work for your use-case, then use a URL instead.\n  if (resolvedInput.path && url.isFileSystemPath(resolvedInput.path)) {\n    resolvedInput.path = url.fromFileSystemPath(resolvedInput.path);\n    resolvedInput.type = 'file';\n  } else if (!resolvedInput.path && pathOrUrlOrSchema && typeof pathOrUrlOrSchema === 'object') {\n    if ('$id' in pathOrUrlOrSchema && pathOrUrlOrSchema.$id) {\n      // when schema id has defined an URL should use that hostname to request the references,\n      // instead of using the current page URL\n      const { hostname, protocol } = new URL(pathOrUrlOrSchema.$id as string);\n      resolvedInput.path = `${protocol}//${hostname}:${protocol === 'https:' ? 443 : 80}`;\n      resolvedInput.type = 'url';\n    } else {\n      resolvedInput.schema = pathOrUrlOrSchema;\n      resolvedInput.type = 'json';\n    }\n  }\n\n  if (resolvedInput.type !== 'json') {\n    // resolve the absolute path of the schema\n    resolvedInput.path = url.resolve(url.cwd(), resolvedInput.path);\n  }\n\n  return resolvedInput;\n}\n\n// NOTE: previously used helper removed as unused\n\n/**\n * This class parses a JSON schema, builds a map of its JSON references and their resolved values,\n * and provides methods for traversing, manipulating, and dereferencing those references.\n */\nexport class $RefParser {\n  /**\n   * The resolved JSON references\n   *\n   * @type {$Refs}\n   * @readonly\n   */\n  $refs = new $Refs<JSONSchema>();\n  public options = getJsonSchemaRefParserDefaultOptions();\n  /**\n   * The parsed (and possibly dereferenced) JSON schema object\n   *\n   * @type {object}\n   * @readonly\n   */\n  public schema: JSONSchema | null = null;\n  public schemaMany: JSONSchema[] = [];\n  public schemaManySources: string[] = [];\n  public sourcePathToPrefix: Map<string, string> = new Map();\n\n  /**\n   * Bundles all referenced files/URLs into a single schema that only has internal `$ref` pointers. This lets you split-up your schema however you want while you're building it, but easily combine all those files together when it's time to package or distribute the schema to other people. The resulting schema size will be small, since it will still contain internal JSON references rather than being fully-dereferenced.\n   *\n   * This also eliminates the risk of circular references, so the schema can be safely serialized using `JSON.stringify()`.\n   *\n   * See https://apitools.dev/json-schema-ref-parser/docs/ref-parser.html#bundleschema-options-callback\n   *\n   * @param pathOrUrlOrSchema A JSON Schema object, or the file path or URL of a JSON Schema file.\n   */\n  public async bundle({\n    arrayBuffer,\n    fetch,\n    pathOrUrlOrSchema,\n    resolvedInput,\n  }: {\n    arrayBuffer?: ArrayBuffer;\n    fetch?: RequestInit;\n    pathOrUrlOrSchema: JSONSchema | string | unknown;\n    resolvedInput?: ResolvedInput;\n  }): Promise<JSONSchema> {\n    await this.parse({\n      arrayBuffer,\n      fetch,\n      pathOrUrlOrSchema,\n      resolvedInput,\n    });\n\n    await resolveExternal(this, this.options);\n    const errors = JSONParserErrorGroup.getParserErrors(this);\n    if (errors.length > 0) {\n      throw new JSONParserErrorGroup(this);\n    }\n    _bundle(this, this.options);\n    const errors2 = JSONParserErrorGroup.getParserErrors(this);\n    if (errors2.length > 0) {\n      throw new JSONParserErrorGroup(this);\n    }\n    return this.schema!;\n  }\n\n  /**\n   * Bundles multiple roots (files/URLs/objects) into a single schema by creating a synthetic root\n   * that references each input, resolving all externals, and then hoisting via the existing bundler.\n   */\n  public async bundleMany({\n    arrayBuffer,\n    fetch,\n    pathOrUrlOrSchemas,\n    resolvedInputs,\n  }: {\n    arrayBuffer?: ArrayBuffer[];\n    fetch?: RequestInit;\n    pathOrUrlOrSchemas: Array<JSONSchema | string | unknown>;\n    resolvedInputs?: ResolvedInput[];\n  }): Promise<JSONSchema> {\n    await this.parseMany({ arrayBuffer, fetch, pathOrUrlOrSchemas, resolvedInputs });\n    this.mergeMany();\n\n    await resolveExternal(this, this.options);\n    const errors = JSONParserErrorGroup.getParserErrors(this);\n    if (errors.length > 0) {\n      throw new JSONParserErrorGroup(this);\n    }\n    _bundle(this, this.options);\n    // Merged root is ready for bundling\n\n    const errors2 = JSONParserErrorGroup.getParserErrors(this);\n    if (errors2.length > 0) {\n      throw new JSONParserErrorGroup(this);\n    }\n    return this.schema!;\n  }\n\n  /**\n   * Parses the given JSON schema.\n   * This method does not resolve any JSON references.\n   * It just reads a single file in JSON or YAML format, and parse it as a JavaScript object.\n   *\n   * @param pathOrUrlOrSchema A JSON Schema object, or the file path or URL of a JSON Schema file.\n   * @returns - The returned promise resolves with the parsed JSON schema object.\n   */\n  public async parse({\n    arrayBuffer,\n    fetch,\n    pathOrUrlOrSchema,\n    resolvedInput: _resolvedInput,\n  }: {\n    arrayBuffer?: ArrayBuffer;\n    fetch?: RequestInit;\n    pathOrUrlOrSchema: JSONSchema | string | unknown;\n    resolvedInput?: ResolvedInput;\n  }): Promise<{ schema: JSONSchema }> {\n    const resolvedInput = _resolvedInput || getResolvedInput({ pathOrUrlOrSchema });\n    const { path, type } = resolvedInput;\n    let { schema } = resolvedInput;\n\n    // reset everything\n    this.schema = null;\n    this.$refs = new $Refs();\n\n    if (schema) {\n      // immediately add a new $Ref with the schema object as value\n      const $ref = this.$refs._add(path);\n      $ref.pathType = url.isFileSystemPath(path) ? 'file' : 'http';\n      $ref.value = schema;\n    } else if (type !== 'json') {\n      const file = newFile(path);\n\n      // Add a new $Ref for this file, even though we don't have the value yet.\n      // This ensures that we don't simultaneously read & parse the same file multiple times\n      const $refAdded = this.$refs._add(file.url);\n      $refAdded.pathType = type;\n      try {\n        const resolver = type === 'file' ? fileResolver : urlResolver;\n        await resolver.handler({\n          arrayBuffer,\n          fetch,\n          file,\n        });\n        const parseResult = await parseFile(file, this.options.parse);\n        $refAdded.value = parseResult.result;\n        schema = parseResult.result;\n      } catch (error) {\n        if (isHandledError(error)) {\n          $refAdded.value = error;\n        }\n        throw error;\n      }\n    }\n\n    if (schema === null || typeof schema !== 'object' || Buffer.isBuffer(schema)) {\n      throw ono.syntax(`\"${this.$refs._root$Ref.path || schema}\" is not a valid JSON Schema`);\n    }\n\n    this.schema = schema;\n\n    return {\n      schema,\n    };\n  }\n\n  private async parseMany({\n    arrayBuffer,\n    fetch,\n    pathOrUrlOrSchemas,\n    resolvedInputs: _resolvedInputs,\n  }: {\n    arrayBuffer?: ArrayBuffer[];\n    fetch?: RequestInit;\n    pathOrUrlOrSchemas: Array<JSONSchema | string | unknown>;\n    resolvedInputs?: ResolvedInput[];\n  }): Promise<{ schemaMany: JSONSchema[] }> {\n    const resolvedInputs = [...(_resolvedInputs || [])];\n    resolvedInputs.push(\n      ...(pathOrUrlOrSchemas.map((schema) => getResolvedInput({ pathOrUrlOrSchema: schema })) ||\n        []),\n    );\n\n    this.schemaMany = [];\n    this.schemaManySources = [];\n    this.sourcePathToPrefix = new Map();\n\n    for (let i = 0; i < resolvedInputs.length; i++) {\n      const resolvedInput = resolvedInputs[i]!;\n      const { path, type } = resolvedInput;\n      let { schema } = resolvedInput;\n\n      if (schema) {\n        // keep schema as-is\n      } else if (type !== 'json') {\n        const file = newFile(path);\n\n        // Add a new $Ref for this file, even though we don't have the value yet.\n        // This ensures that we don't simultaneously read & parse the same file multiple times\n        const $refAdded = this.$refs._add(file.url);\n        $refAdded.pathType = type;\n        try {\n          const resolver = type === 'file' ? fileResolver : urlResolver;\n          await resolver.handler({\n            arrayBuffer: arrayBuffer?.[i],\n            fetch,\n            file,\n          });\n          const parseResult = await parseFile(file, this.options.parse);\n          $refAdded.value = parseResult.result;\n          schema = parseResult.result;\n        } catch (error) {\n          if (isHandledError(error)) {\n            $refAdded.value = error;\n          }\n          throw error;\n        }\n      }\n\n      if (schema === null || typeof schema !== 'object' || Buffer.isBuffer(schema)) {\n        throw ono.syntax(`\"${this.$refs._root$Ref.path || schema}\" is not a valid JSON Schema`);\n      }\n\n      this.schemaMany.push(schema);\n      this.schemaManySources.push(path && path.length ? path : url.cwd());\n    }\n\n    return {\n      schemaMany: this.schemaMany,\n    };\n  }\n\n  public mergeMany(): JSONSchema {\n    const schemas = this.schemaMany || [];\n    if (schemas.length === 0) {\n      throw ono('mergeMany called with no schemas. Did you run parseMany?');\n    }\n\n    const merged: any = {};\n\n    // Determine spec version: prefer first occurrence of openapi, else swagger\n    let chosenOpenapi: string | undefined;\n    let chosenSwagger: string | undefined;\n    for (const s of schemas) {\n      if (!chosenOpenapi && s && typeof (s as any).openapi === 'string') {\n        chosenOpenapi = (s as any).openapi;\n      }\n      if (!chosenSwagger && s && typeof (s as any).swagger === 'string') {\n        chosenSwagger = (s as any).swagger;\n      }\n      if (chosenOpenapi && chosenSwagger) {\n        break;\n      }\n    }\n    if (typeof chosenOpenapi === 'string') {\n      merged.openapi = chosenOpenapi;\n    } else if (typeof chosenSwagger === 'string') {\n      merged.swagger = chosenSwagger;\n    }\n\n    // Merge info: take first non-empty per-field across inputs\n    const infoAccumulator: any = {};\n    for (const s of schemas) {\n      const info = (s as any)?.info;\n      if (info && typeof info === 'object') {\n        for (const [k, v] of Object.entries(info)) {\n          if (infoAccumulator[k] === undefined && v !== undefined) {\n            infoAccumulator[k] = JSON.parse(JSON.stringify(v));\n          }\n        }\n      }\n    }\n    if (Object.keys(infoAccumulator).length > 0) {\n      merged.info = infoAccumulator;\n    }\n\n    // Merge servers: union by url+description\n    const servers: any[] = [];\n    const seenServers = new Set<string>();\n    for (const s of schemas) {\n      const arr = (s as any)?.servers;\n      if (Array.isArray(arr)) {\n        for (const srv of arr) {\n          if (srv && typeof srv === 'object') {\n            const key = `${srv.url || ''}|${srv.description || ''}`;\n            if (!seenServers.has(key)) {\n              seenServers.add(key);\n              servers.push(JSON.parse(JSON.stringify(srv)));\n            }\n          }\n        }\n      }\n    }\n    if (servers.length > 0) {\n      merged.servers = servers;\n    }\n\n    merged.paths = {};\n    merged.components = {};\n\n    const componentSections = [\n      'schemas',\n      'parameters',\n      'requestBodies',\n      'responses',\n      'headers',\n      'securitySchemes',\n      'examples',\n      'links',\n      'callbacks',\n    ];\n    for (const sec of componentSections) {\n      merged.components[sec] = {};\n    }\n\n    const tagNameSet = new Set<string>();\n    const tags: any[] = [];\n    const usedOpIds = new Set<string>();\n\n    const baseName = (p: string) => {\n      try {\n        const withoutHash = p.split('#')[0]!;\n        const parts = withoutHash.split('/');\n        const filename = parts[parts.length - 1] || 'schema';\n        const dot = filename.lastIndexOf('.');\n        const raw = dot > 0 ? filename.substring(0, dot) : filename;\n        return raw.replace(/[^A-Za-z0-9_-]/g, '_');\n      } catch {\n        return 'schema';\n      }\n    };\n    const unique = (set: Set<string>, proposed: string) => {\n      let name = proposed;\n      let i = 2;\n      while (set.has(name)) {\n        name = `${proposed}_${i++}`;\n      }\n      set.add(name);\n      return name;\n    };\n\n    const rewriteRef = (ref: string, refMap: Map<string, string>): string => {\n      // OAS3: #/components/{section}/{name}...\n      let m = ref.match(/^#\\/components\\/([^/]+)\\/([^/]+)(.*)$/);\n      if (m) {\n        const base = `#/components/${m[1]}/${m[2]}`;\n        const mapped = refMap.get(base);\n        if (mapped) {\n          return mapped + (m[3] || '');\n        }\n      }\n      // OAS2: #/definitions/{name}...\n      m = ref.match(/^#\\/definitions\\/([^/]+)(.*)$/);\n      if (m) {\n        const base = `#/components/schemas/${m[1]}`;\n        const mapped = refMap.get(base);\n        if (mapped) {\n          // map definitions -> components/schemas\n          return mapped + (m[2] || '');\n        }\n      }\n      return ref;\n    };\n\n    const cloneAndRewrite = (\n      obj: any,\n      refMap: Map<string, string>,\n      tagMap: Map<string, string>,\n      opIdPrefix: string,\n      basePath: string,\n    ): any => {\n      if (obj === null || obj === undefined) {\n        return obj;\n      }\n      if (Array.isArray(obj)) {\n        return obj.map((v) => cloneAndRewrite(v, refMap, tagMap, opIdPrefix, basePath));\n      }\n      if (typeof obj !== 'object') {\n        return obj;\n      }\n\n      const out: any = {};\n      for (const [k, v] of Object.entries(obj)) {\n        if (k === '$ref' && typeof v === 'string') {\n          const s = v as string;\n          if (s.startsWith('#')) {\n            out[k] = rewriteRef(s, refMap);\n          } else {\n            const proto = url.getProtocol(s);\n            if (proto === undefined) {\n              // relative external ref -> absolutize against source base path\n              out[k] = url.resolve(basePath + '#', s);\n            } else {\n              out[k] = s;\n            }\n          }\n        } else if (k === 'tags' && Array.isArray(v) && v.every((x) => typeof x === 'string')) {\n          out[k] = v.map((t) => tagMap.get(t) || t);\n        } else if (k === 'operationId' && typeof v === 'string') {\n          out[k] = unique(usedOpIds, `${opIdPrefix}_${v}`);\n        } else {\n          out[k] = cloneAndRewrite(v as any, refMap, tagMap, opIdPrefix, basePath);\n        }\n      }\n      return out;\n    };\n\n    for (let i = 0; i < schemas.length; i++) {\n      const schema: any = schemas[i] || {};\n      const sourcePath = this.schemaManySources[i] || `multi://input/${i + 1}`;\n      const prefix = baseName(sourcePath);\n\n      // Track prefix for this source path (strip hash). Only map real file/http paths\n      const withoutHash = url.stripHash(sourcePath);\n      const protocol = url.getProtocol(withoutHash);\n      if (\n        protocol === undefined ||\n        protocol === 'file' ||\n        protocol === 'http' ||\n        protocol === 'https'\n      ) {\n        this.sourcePathToPrefix.set(withoutHash, prefix);\n      }\n\n      const refMap = new Map<string, string>();\n      const tagMap = new Map<string, string>();\n\n      const srcComponents = (schema.components || {}) as any;\n      for (const sec of componentSections) {\n        const group = srcComponents[sec] || {};\n        for (const [name] of Object.entries(group)) {\n          const newName = `${prefix}_${name}`;\n          refMap.set(`#/components/${sec}/${name}`, `#/components/${sec}/${newName}`);\n        }\n      }\n\n      const srcTags: any[] = Array.isArray(schema.tags) ? schema.tags : [];\n      for (const t of srcTags) {\n        if (!t || typeof t !== 'object' || typeof t.name !== 'string') {\n          continue;\n        }\n        const desired = t.name;\n        const finalName = tagNameSet.has(desired) ? `${prefix}_${desired}` : desired;\n        tagNameSet.add(finalName);\n        tagMap.set(desired, finalName);\n        if (!tags.find((x) => x && x.name === finalName)) {\n          tags.push({ ...t, name: finalName });\n        }\n      }\n\n      for (const sec of componentSections) {\n        const group = (schema.components && schema.components[sec]) || {};\n        for (const [name, val] of Object.entries(group)) {\n          const newName = `${prefix}_${name}`;\n          merged.components[sec][newName] = cloneAndRewrite(\n            val,\n            refMap,\n            tagMap,\n            prefix,\n            url.stripHash(sourcePath),\n          );\n        }\n      }\n\n      const HTTP_METHODS = new Set([\n        'delete',\n        'get',\n        'head',\n        'options',\n        'patch',\n        'post',\n        'put',\n        'trace',\n      ]);\n\n      const srcPaths = (schema.paths || {}) as Record<string, any>;\n      for (const [p, item] of Object.entries(srcPaths)) {\n        if (merged.paths[p]) {\n          const newMethods = Object.keys(item as object).filter((k) => HTTP_METHODS.has(k));\n          const hasMethodConflict = newMethods.some((m) => merged.paths[p][m] !== undefined);\n          const rewritten = cloneAndRewrite(\n            item,\n            refMap,\n            tagMap,\n            prefix,\n            url.stripHash(sourcePath),\n          );\n          if (hasMethodConflict) {\n            const trimmed = p.startsWith('/') ? p.substring(1) : p;\n            merged.paths[`/${prefix}/${trimmed}`] = rewritten;\n          } else {\n            Object.assign(merged.paths[p], rewritten);\n          }\n        } else {\n          merged.paths[p] = cloneAndRewrite(\n            item,\n            refMap,\n            tagMap,\n            prefix,\n            url.stripHash(sourcePath),\n          );\n        }\n      }\n    }\n\n    if (tags.length > 0) {\n      merged.tags = tags;\n    }\n\n    // Rebuild $refs root using the first input's path to preserve external resolution semantics\n    const rootPath = this.schemaManySources[0] || url.cwd();\n    this.$refs = new $Refs();\n    const rootRef = this.$refs._add(rootPath);\n    rootRef.pathType = url.isFileSystemPath(rootPath) ? 'file' : 'http';\n    rootRef.value = merged;\n    this.schema = merged;\n    return merged as JSONSchema;\n  }\n}\n\nexport { sendRequest } from './resolvers/url';\nexport type { JSONSchema } from './types';\n"
  },
  {
    "path": "packages/json-schema-ref-parser/src/options.ts",
    "content": "import { binaryParser } from './parsers/binary';\nimport { jsonParser } from './parsers/json';\nimport { textParser } from './parsers/text';\nimport { yamlParser } from './parsers/yaml';\nimport type { JSONSchemaObject, Plugin } from './types';\n\nexport interface DereferenceOptions {\n  /**\n   * Determines whether circular `$ref` pointers are handled.\n   *\n   * If set to `false`, then a `ReferenceError` will be thrown if the schema contains any circular references.\n   *\n   * If set to `\"ignore\"`, then circular references will simply be ignored. No error will be thrown, but the `$Refs.circular` property will still be set to `true`.\n   */\n  circular?: boolean | 'ignore';\n  /**\n   * A function, called for each path, which can return true to stop this path and all\n   * subpaths from being dereferenced further. This is useful in schemas where some\n   * subpaths contain literal $ref keys that should not be dereferenced.\n   */\n  excludedPathMatcher?(path: string): boolean;\n  /**\n   * Callback invoked during dereferencing.\n   *\n   * @argument {string} path - The path being dereferenced (ie. the `$ref` string)\n   * @argument {JSONSchemaObject} value - The JSON-Schema that the `$ref` resolved to\n   * @argument {JSONSchemaObject} parent - The parent of the dereferenced object\n   * @argument {string} parentPropName - The prop name of the parent object whose value was dereferenced\n   */\n  onDereference?(\n    path: string,\n    value: JSONSchemaObject,\n    parent?: JSONSchemaObject,\n    parentPropName?: string,\n  ): void;\n}\n\n/**\n * Options that determine how JSON schemas are parsed, resolved, and dereferenced.\n *\n * @param [options] - Overridden options\n * @class\n */\nexport interface $RefParserOptions {\n  /**\n   * The `dereference` options control how JSON Schema `$Ref` Parser will dereference `$ref` pointers within the JSON schema.\n   */\n  dereference: DereferenceOptions;\n  /**\n   * The `parse` options determine how different types of files will be parsed.\n   *\n   * JSON Schema `$Ref` Parser comes with built-in JSON, YAML, plain-text, and binary parsers, any of which you can configure or disable. You can also add your own custom parsers if you want.\n   */\n  parse: {\n    binary: Plugin;\n    json: Plugin;\n    text: Plugin;\n    yaml: Plugin;\n  };\n  /**\n   * The maximum amount of time (in milliseconds) that JSON Schema $Ref Parser will spend dereferencing a single schema.\n   * It will throw a timeout error if the operation takes longer than this.\n   */\n  timeoutMs?: number;\n}\n\nexport const getJsonSchemaRefParserDefaultOptions = (): $RefParserOptions => ({\n  /**\n   * Determines the types of JSON references that are allowed.\n   */\n  dereference: {\n    /**\n     * Dereference circular (recursive) JSON references?\n     * If false, then a {@link ReferenceError} will be thrown if a circular reference is found.\n     * If \"ignore\", then circular references will not be dereferenced.\n     *\n     * @type {boolean|string}\n     */\n    circular: true,\n    /**\n     * A function, called for each path, which can return true to stop this path and all\n     * subpaths from being dereferenced further. This is useful in schemas where some\n     * subpaths contain literal $ref keys that should not be dereferenced.\n     *\n     * @type {function}\n     */\n    excludedPathMatcher: () => false,\n    // @ts-expect-error\n    referenceResolution: 'relative',\n  },\n  /**\n   * Determines how different types of files will be parsed.\n   *\n   * You can add additional parsers of your own, replace an existing one with\n   * your own implementation, or disable any parser by setting it to false.\n   */\n  parse: {\n    binary: { ...binaryParser },\n    json: { ...jsonParser },\n    text: { ...textParser },\n    yaml: { ...yamlParser },\n  },\n});\n\nexport type Options = $RefParserOptions;\n\ntype DeepPartial<T> = T extends object\n  ? {\n      [P in keyof T]?: DeepPartial<T[P]>;\n    }\n  : T;\nexport type ParserOptions = DeepPartial<$RefParserOptions>;\n"
  },
  {
    "path": "packages/json-schema-ref-parser/src/parse.ts",
    "content": "import { ono } from '@jsdevtools/ono';\n\nimport type { $RefParserOptions } from './options';\nimport type { FileInfo } from './types';\nimport { ParserError } from './util/errors';\nimport type { PluginResult } from './util/plugins';\nimport * as plugins from './util/plugins';\nimport { getExtension } from './util/url';\n\n/**\n * Prepares the file object so we can populate it with data and other values\n * when it's read and parsed. This \"file object\" will be passed to all\n * resolvers and parsers.\n */\nexport function newFile(path: string): FileInfo {\n  let url = path;\n  // Remove the URL fragment, if any\n  const hashIndex = url.indexOf('#');\n  let hash = '';\n  if (hashIndex > -1) {\n    hash = url.substring(hashIndex);\n    url = url.substring(0, hashIndex);\n  }\n  return {\n    extension: getExtension(url),\n    hash,\n    url,\n  } as FileInfo;\n}\n\n/**\n * Parses the given file's contents, using the configured parser plugins.\n */\nexport async function parseFile(\n  file: FileInfo,\n  options: $RefParserOptions['parse'],\n): Promise<PluginResult> {\n  try {\n    // If none of the parsers are a match for this file, try all of them. This\n    // handles situations where the file is a supported type, just with an\n    // unknown extension.\n    const parsers = [options.json, options.yaml, options.text, options.binary];\n    const filtered = parsers.filter((plugin) => plugin.canHandle(file));\n    return await plugins.run(filtered.length ? filtered : parsers, file);\n  } catch (error: any) {\n    if (error && error.message && error.message.startsWith('Error parsing')) {\n      throw error;\n    }\n\n    if (!error || !('error' in error)) {\n      throw ono.syntax(`Unable to parse ${file.url}`);\n    }\n\n    if (error.error instanceof ParserError) {\n      throw error.error;\n    }\n\n    throw new ParserError(error.error.message, file.url);\n  }\n}\n"
  },
  {
    "path": "packages/json-schema-ref-parser/src/parsers/binary.ts",
    "content": "import type { FileInfo, Plugin } from '../types';\n\nconst BINARY_REGEXP = /\\.(jpeg|jpg|gif|png|bmp|ico)$/i;\n\nexport const binaryParser: Plugin = {\n  canHandle: (file: FileInfo) => Buffer.isBuffer(file.data) && BINARY_REGEXP.test(file.url),\n  handler: (file: FileInfo): Buffer =>\n    Buffer.isBuffer(file.data)\n      ? file.data\n      : // This will reject if data is anything other than a string or typed array\n        Buffer.from(file.data),\n  name: 'binary',\n};\n"
  },
  {
    "path": "packages/json-schema-ref-parser/src/parsers/json.ts",
    "content": "import type { FileInfo, Plugin } from '../types';\nimport { ParserError } from '../util/errors';\n\nexport const jsonParser: Plugin = {\n  canHandle: (file: FileInfo) => file.extension === '.json',\n  async handler(file: FileInfo): Promise<object | undefined> {\n    let data = file.data;\n    if (Buffer.isBuffer(data)) {\n      data = data.toString();\n    }\n\n    if (typeof data !== 'string') {\n      // data is already a JavaScript value (object, array, number, null, NaN, etc.)\n      return data as object;\n    }\n\n    if (!data.trim().length) {\n      // this mirrors the YAML behavior\n      return;\n    }\n\n    try {\n      return JSON.parse(data);\n      // eslint-disable-next-line @typescript-eslint/no-unused-vars\n    } catch (error: any) {\n      try {\n        // find the first curly brace\n        const firstCurlyBrace = data.indexOf('{');\n        // remove any characters before the first curly brace\n        data = data.slice(firstCurlyBrace);\n        return JSON.parse(data);\n      } catch (error: any) {\n        throw new ParserError(error.message, file.url);\n      }\n    }\n  },\n  name: 'json',\n};\n"
  },
  {
    "path": "packages/json-schema-ref-parser/src/parsers/text.ts",
    "content": "import type { FileInfo, Plugin } from '../types';\nimport { ParserError } from '../util/errors';\n\nconst TEXT_REGEXP = /\\.(txt|htm|html|md|xml|js|min|map|css|scss|less|svg)$/i;\n\nexport const textParser: Plugin = {\n  canHandle: (file: FileInfo) =>\n    (typeof file.data === 'string' || Buffer.isBuffer(file.data)) && TEXT_REGEXP.test(file.url),\n  handler(file: FileInfo): string {\n    if (typeof file.data === 'string') {\n      return file.data;\n    }\n\n    if (!Buffer.isBuffer(file.data)) {\n      throw new ParserError('data is not text', file.url);\n    }\n\n    return file.data.toString('utf-8');\n  },\n  name: 'text',\n};\n"
  },
  {
    "path": "packages/json-schema-ref-parser/src/parsers/yaml.ts",
    "content": "import { parse } from 'yaml';\n\nimport type { FileInfo, JSONSchema, Plugin } from '../types';\nimport { ParserError } from '../util/errors';\n\nexport const yamlParser: Plugin = {\n  // JSON is valid YAML\n  canHandle: (file: FileInfo) => ['.yaml', '.yml', '.json'].includes(file.extension),\n  handler: async (file: FileInfo): Promise<JSONSchema> => {\n    const data = Buffer.isBuffer(file.data) ? file.data.toString() : file.data;\n\n    if (typeof data !== 'string') {\n      // data is already a JavaScript value (object, array, number, null, NaN, etc.)\n      return data;\n    }\n\n    try {\n      return parse(data) as JSONSchema;\n    } catch (error: any) {\n      throw new ParserError(error?.message || 'Parser Error', file.url);\n    }\n  },\n  name: 'yaml',\n};\n"
  },
  {
    "path": "packages/json-schema-ref-parser/src/pointer.ts",
    "content": "import type { ParserOptions } from './options';\nimport $Ref from './ref';\nimport type { JSONSchema } from './types';\nimport {\n  InvalidPointerError,\n  isHandledError,\n  JSONParserError,\n  MissingPointerError,\n} from './util/errors';\nimport * as url from './util/url';\n\nconst slashes = /\\//g;\nconst tildes = /~/g;\nconst escapedSlash = /~1/g;\nconst escapedTilde = /~0/g;\n\nconst safeDecodeURIComponent = (encodedURIComponent: string): string => {\n  try {\n    return decodeURIComponent(encodedURIComponent);\n  } catch {\n    return encodedURIComponent;\n  }\n};\n\n/**\n * This class represents a single JSON pointer and its resolved value.\n *\n * @param $ref\n * @param path\n * @param [friendlyPath] - The original user-specified path (used for error messages)\n * @class\n */\nclass Pointer<S extends object = JSONSchema> {\n  /**\n   * The {@link $Ref} object that contains this {@link Pointer} object.\n   */\n  $ref: $Ref<S>;\n\n  /**\n   * The file path or URL, containing the JSON pointer in the hash.\n   * This path is relative to the path of the main JSON schema file.\n   */\n  path: string;\n\n  /**\n   * The original path or URL, used for error messages.\n   */\n  originalPath: string;\n\n  /**\n   * The value of the JSON pointer.\n   * Can be any JSON type, not just objects. Unknown file types are represented as Buffers (byte arrays).\n   */\n\n  value: any;\n  /**\n   * Indicates whether the pointer references itself.\n   */\n  circular: boolean;\n  /**\n   * The number of indirect references that were traversed to resolve the value.\n   * Resolving a single pointer may require resolving multiple $Refs.\n   */\n  indirections: number;\n\n  constructor($ref: $Ref<S>, path: string, friendlyPath?: string) {\n    this.$ref = $ref;\n\n    this.path = path;\n\n    this.originalPath = friendlyPath || path;\n\n    this.value = undefined;\n\n    this.circular = false;\n\n    this.indirections = 0;\n  }\n\n  /**\n   * Resolves the value of a nested property within the given object.\n   *\n   * @param obj - The object that will be crawled\n   * @param options\n   * @param pathFromRoot - the path of place that initiated resolving\n   *\n   * @returns\n   * Returns a JSON pointer whose {@link Pointer#value} is the resolved value.\n   * If resolving this value required resolving other JSON references, then\n   * the {@link Pointer#$ref} and {@link Pointer#path} will reflect the resolution path\n   * of the resolved value.\n   */\n  resolve(obj: S, options?: ParserOptions, pathFromRoot?: string) {\n    const tokens = Pointer.parse(this.path, this.originalPath);\n\n    // Crawl the object, one token at a time\n    this.value = unwrapOrThrow(obj);\n\n    const errors: MissingPointerError[] = [];\n\n    for (let i = 0; i < tokens.length; i++) {\n      if (resolveIf$Ref(this, options, pathFromRoot)) {\n        // The $ref path has changed, so append the remaining tokens to the path\n        this.path = Pointer.join(this.path, tokens.slice(i));\n      }\n\n      if (\n        typeof this.value === 'object' &&\n        this.value !== null &&\n        !isRootPath(pathFromRoot) &&\n        '$ref' in this.value\n      ) {\n        return this;\n      }\n\n      const token = tokens[i]!;\n      if (\n        this.value[token] === undefined ||\n        (this.value[token] === null && i === tokens.length - 1)\n      ) {\n        // one final case is if the entry itself includes slashes, and was parsed out as a token - we can join the remaining tokens and try again\n        let didFindSubstringSlashMatch = false;\n        for (let j = tokens.length - 1; j > i; j--) {\n          const joinedToken = tokens.slice(i, j + 1).join('/');\n          if (this.value[joinedToken] !== undefined) {\n            this.value = this.value[joinedToken];\n            i = j;\n            didFindSubstringSlashMatch = true;\n            break;\n          }\n        }\n        if (didFindSubstringSlashMatch) {\n          continue;\n        }\n\n        this.value = null;\n        errors.push(new MissingPointerError(token, decodeURI(this.originalPath)));\n      } else {\n        this.value = this.value[token];\n      }\n    }\n\n    if (errors.length > 0) {\n      throw errors.length === 1\n        ? errors[0]\n        : new AggregateError(errors, 'Multiple missing pointer errors');\n    }\n\n    // Resolve the final value\n    if (\n      !this.value ||\n      (this.value.$ref && url.resolve(this.path, this.value.$ref) !== pathFromRoot)\n    ) {\n      resolveIf$Ref(this, options, pathFromRoot);\n    }\n\n    return this;\n  }\n\n  /**\n   * Sets the value of a nested property within the given object.\n   *\n   * @param obj - The object that will be crawled\n   * @param value - the value to assign\n   * @param options\n   *\n   * @returns\n   * Returns the modified object, or an entirely new object if the entire object is overwritten.\n   */\n  set(obj: S, value: any, options?: ParserOptions) {\n    const tokens = Pointer.parse(this.path);\n    let token;\n\n    if (tokens.length === 0) {\n      // There are no tokens, replace the entire object with the new value\n      this.value = value;\n      return value;\n    }\n\n    // Crawl the object, one token at a time\n    this.value = unwrapOrThrow(obj);\n\n    for (let i = 0; i < tokens.length - 1; i++) {\n      resolveIf$Ref(this, options);\n\n      token = tokens[i]!;\n      if (this.value && this.value[token] !== undefined) {\n        // The token exists\n        this.value = this.value[token];\n      } else {\n        // The token doesn't exist, so create it\n        this.value = setValue(this, token, {});\n      }\n    }\n\n    // Set the value of the final token\n    resolveIf$Ref(this, options);\n    token = tokens[tokens.length - 1];\n    setValue(this, token, value);\n\n    // Return the updated object\n    return obj;\n  }\n\n  /**\n   * Parses a JSON pointer (or a path containing a JSON pointer in the hash)\n   * and returns an array of the pointer's tokens.\n   * (e.g. \"schema.json#/definitions/person/name\" => [\"definitions\", \"person\", \"name\"])\n   *\n   * The pointer is parsed according to RFC 6901\n   * {@link https://tools.ietf.org/html/rfc6901#section-3}\n   *\n   * @param path\n   * @param [originalPath]\n   * @returns\n   */\n  static parse(path: string, originalPath?: string): string[] {\n    // Get the JSON pointer from the path's hash\n    const pointer = url.getHash(path).substring(1);\n\n    // If there's no pointer, then there are no tokens,\n    // so return an empty array\n    if (!pointer) {\n      return [];\n    }\n\n    // Split into an array\n    const split = pointer.split('/');\n\n    // Decode each part, according to RFC 6901\n    for (let i = 0; i < split.length; i++) {\n      split[i] = safeDecodeURIComponent(\n        split[i]!.replace(escapedSlash, '/').replace(escapedTilde, '~'),\n      );\n    }\n\n    if (split[0] !== '') {\n      throw new InvalidPointerError(pointer, originalPath === undefined ? path : originalPath);\n    }\n\n    return split.slice(1);\n  }\n\n  /**\n   * Creates a JSON pointer path, by joining one or more tokens to a base path.\n   *\n   * @param base - The base path (e.g. \"schema.json#/definitions/person\")\n   * @param tokens - The token(s) to append (e.g. [\"name\", \"first\"])\n   * @returns\n   */\n  static join(base: string, tokens: string | string[]) {\n    // Ensure that the base path contains a hash\n    if (base.indexOf('#') === -1) {\n      base += '#';\n    }\n\n    // Append each token to the base path\n    tokens = Array.isArray(tokens) ? tokens : [tokens];\n    for (let i = 0; i < tokens.length; i++) {\n      const token = tokens[i]!;\n      // Encode the token, according to RFC 6901\n      base += '/' + encodeURIComponent(token.replace(tildes, '~0').replace(slashes, '~1'));\n    }\n\n    return base;\n  }\n}\n\n/**\n * If the given pointer's {@link Pointer#value} is a JSON reference,\n * then the reference is resolved and {@link Pointer#value} is replaced with the resolved value.\n * In addition, {@link Pointer#path} and {@link Pointer#$ref} are updated to reflect the\n * resolution path of the new value.\n *\n * @param pointer\n * @param options\n * @param [pathFromRoot] - the path of place that initiated resolving\n * @returns - Returns `true` if the resolution path changed\n */\nfunction resolveIf$Ref(pointer: any, options: any, pathFromRoot?: any) {\n  // Is the value a JSON reference? (and allowed?)\n\n  if ($Ref.isAllowed$Ref(pointer.value)) {\n    const $refPath = url.resolve(pointer.path, pointer.value.$ref);\n\n    if ($refPath === pointer.path && !isRootPath(pathFromRoot)) {\n      // The value is a reference to itself, so there's nothing to do.\n      pointer.circular = true;\n    } else {\n      const resolved = pointer.$ref.$refs._resolve($refPath, pointer.path, options);\n      if (resolved === null) {\n        return false;\n      }\n\n      pointer.indirections += resolved.indirections + 1;\n\n      if ($Ref.isExtended$Ref(pointer.value)) {\n        // This JSON reference \"extends\" the resolved value, rather than simply pointing to it.\n        // So the resolved path does NOT change.  Just the value does.\n        pointer.value = $Ref.dereference(pointer.value, resolved.value);\n        return false;\n      } else {\n        // Resolve the reference\n        pointer.$ref = resolved.$ref;\n        pointer.path = resolved.path;\n        pointer.value = resolved.value;\n      }\n\n      return true;\n    }\n  }\n  return undefined;\n}\nexport default Pointer;\n\n/**\n * Sets the specified token value of the {@link Pointer#value}.\n *\n * The token is evaluated according to RFC 6901.\n * {@link https://tools.ietf.org/html/rfc6901#section-4}\n *\n * @param pointer - The JSON Pointer whose value will be modified\n * @param token - A JSON Pointer token that indicates how to modify `obj`\n * @param value - The value to assign\n * @returns - Returns the assigned value\n */\nfunction setValue(pointer: any, token: any, value: any) {\n  if (pointer.value && typeof pointer.value === 'object') {\n    if (token === '-' && Array.isArray(pointer.value)) {\n      pointer.value.push(value);\n    } else {\n      pointer.value[token] = value;\n    }\n  } else {\n    throw new JSONParserError(\n      `Error assigning $ref pointer \"${pointer.path}\". \\nCannot set \"${token}\" of a non-object.`,\n    );\n  }\n  return value;\n}\n\nfunction unwrapOrThrow(value: any) {\n  if (isHandledError(value)) {\n    throw value;\n  }\n\n  return value;\n}\n\nfunction isRootPath(pathFromRoot: any): boolean {\n  return typeof pathFromRoot == 'string' && Pointer.parse(pathFromRoot).length == 0;\n}\n"
  },
  {
    "path": "packages/json-schema-ref-parser/src/ref.ts",
    "content": "import type { ParserOptions } from './options';\nimport Pointer from './pointer';\nimport type $Refs from './refs';\nimport type { JSONSchema } from './types';\nimport type {\n  JSONParserError,\n  MissingPointerError,\n  ParserError,\n  ResolverError,\n} from './util/errors';\nimport { normalizeError } from './util/errors';\n\nexport type $RefError = JSONParserError | ResolverError | ParserError | MissingPointerError;\n\n/**\n * This class represents a single JSON reference and its resolved value.\n *\n * @class\n */\nclass $Ref<S extends object = JSONSchema> {\n  /**\n   * The file path or URL of the referenced file.\n   * This path is relative to the path of the main JSON schema file.\n   *\n   * This path does NOT contain document fragments (JSON pointers). It always references an ENTIRE file.\n   * Use methods such as {@link $Ref#get}, {@link $Ref#resolve}, and {@link $Ref#exists} to get\n   * specific JSON pointers within the file.\n   *\n   * @type {string}\n   */\n  path: undefined | string;\n\n  /**\n   * The resolved value of the JSON reference.\n   * Can be any JSON type, not just objects. Unknown file types are represented as Buffers (byte arrays).\n   *\n   * @type {?*}\n   */\n  value: any;\n\n  /**\n   * The {@link $Refs} object that contains this {@link $Ref} object.\n   *\n   * @type {$Refs}\n   */\n  $refs: $Refs<S>;\n\n  /**\n   * Indicates the type of {@link $Ref#path} (e.g. \"file\", \"http\", etc.)\n   */\n  pathType: string | unknown;\n\n  /**\n   * List of all errors. Undefined if no errors.\n   */\n  errors: Array<$RefError> = [];\n\n  constructor($refs: $Refs<S>) {\n    this.$refs = $refs;\n  }\n\n  /**\n   * Pushes an error to errors array.\n   *\n   * @param err - The error to be pushed\n   * @returns\n   */\n  addError(err: $RefError) {\n    if (this.errors === undefined) {\n      this.errors = [];\n    }\n\n    const existingErrors = this.errors.map(({ footprint }: any) => footprint);\n\n    // the path has been almost certainly set at this point,\n    // but just in case something went wrong, normalizeError injects path if necessary\n    // moreover, certain errors might point at the same spot, so filter them out to reduce noise\n    if ('errors' in err && Array.isArray(err.errors)) {\n      this.errors.push(\n        ...err.errors\n          .map(normalizeError)\n          .filter(({ footprint }: any) => !existingErrors.includes(footprint)),\n      );\n    } else if (!('footprint' in err) || !existingErrors.includes(err.footprint)) {\n      this.errors.push(normalizeError(err));\n    }\n  }\n\n  /**\n   * Determines whether the given JSON reference exists within this {@link $Ref#value}.\n   *\n   * @param path - The full path being resolved, optionally with a JSON pointer in the hash\n   * @param options\n   * @returns\n   */\n  exists(path: string, options?: ParserOptions) {\n    try {\n      this.resolve(path, options);\n      return true;\n    } catch {\n      return false;\n    }\n  }\n\n  /**\n   * Resolves the given JSON reference within this {@link $Ref#value} and returns the resolved value.\n   *\n   * @param path - The full path being resolved, optionally with a JSON pointer in the hash\n   * @param options\n   * @returns - Returns the resolved value\n   */\n  get(path: string, options?: ParserOptions) {\n    return this.resolve(path, options)?.value;\n  }\n\n  /**\n   * Resolves the given JSON reference within this {@link $Ref#value}.\n   *\n   * @param path - The full path being resolved, optionally with a JSON pointer in the hash\n   * @param options\n   * @param friendlyPath - The original user-specified path (used for error messages)\n   * @param pathFromRoot - The path of `obj` from the schema root\n   * @returns\n   */\n  resolve(path: string, options?: ParserOptions, friendlyPath?: string, pathFromRoot?: string) {\n    const pointer = new Pointer<S>(this, path, friendlyPath);\n    return pointer.resolve(this.value, options, pathFromRoot);\n  }\n\n  /**\n   * Sets the value of a nested property within this {@link $Ref#value}.\n   * If the property, or any of its parents don't exist, they will be created.\n   *\n   * @param path - The full path of the property to set, optionally with a JSON pointer in the hash\n   * @param value - The value to assign\n   */\n  set(path: string, value: any) {\n    const pointer = new Pointer(this, path);\n    this.value = pointer.set(this.value, value);\n  }\n\n  /**\n   * Determines whether the given value is a JSON reference.\n   *\n   * @param value - The value to inspect\n   * @returns\n   */\n  static is$Ref(value: unknown): value is { $ref: string; length?: number } {\n    return (\n      Boolean(value) &&\n      typeof value === 'object' &&\n      value !== null &&\n      '$ref' in value &&\n      typeof value.$ref === 'string' &&\n      value.$ref.length > 0\n    );\n  }\n\n  /**\n   * Determines whether the given value is an external JSON reference.\n   *\n   * @param value - The value to inspect\n   * @returns\n   */\n  static isExternal$Ref(value: unknown): boolean {\n    return $Ref.is$Ref(value) && value.$ref![0] !== '#';\n  }\n\n  /**\n   * Determines whether the given value is a JSON reference, and whether it is allowed by the options.\n   *\n   * @param value - The value to inspect\n   * @param options\n   * @returns\n   */\n  static isAllowed$Ref(value: unknown) {\n    if (this.is$Ref(value)) {\n      if (value.$ref.substring(0, 2) === '#/' || value.$ref === '#') {\n        // It's a JSON Pointer reference, which is always allowed\n        return true;\n      } else if (value.$ref[0] !== '#') {\n        // It's an external reference, which is allowed by the options\n        return true;\n      }\n    }\n    return undefined;\n  }\n\n  /**\n   * Determines whether the given value is a JSON reference that \"extends\" its resolved value.\n   * That is, it has extra properties (in addition to \"$ref\"), so rather than simply pointing to\n   * an existing value, this $ref actually creates a NEW value that is a shallow copy of the resolved\n   * value, plus the extra properties.\n   *\n   * @example: {\n     person: {\n       properties: {\n         firstName: { type: string }\n         lastName: { type: string }\n       }\n     }\n     employee: {\n       properties: {\n         $ref: #/person/properties\n         salary: { type: number }\n       }\n     }\n   }\n   *  In this example, \"employee\" is an extended $ref, since it extends \"person\" with an additional\n   *  property (salary).  The result is a NEW value that looks like this:\n   *\n   *  {\n   *    properties: {\n   *      firstName: { type: string }\n   *      lastName: { type: string }\n   *      salary: { type: number }\n   *    }\n   *  }\n   *\n   * @param value - The value to inspect\n   * @returns\n   */\n  static isExtended$Ref(value: unknown) {\n    return $Ref.is$Ref(value) && Object.keys(value).length > 1;\n  }\n\n  /**\n   * Returns the resolved value of a JSON Reference.\n   * If necessary, the resolved value is merged with the JSON Reference to create a new object\n   *\n   * @example: {\n  person: {\n    properties: {\n      firstName: { type: string }\n      lastName: { type: string }\n    }\n  }\n  employee: {\n    properties: {\n      $ref: #/person/properties\n      salary: { type: number }\n    }\n  }\n  } When \"person\" and \"employee\" are merged, you end up with the following object:\n   *\n   *  {\n   *    properties: {\n   *      firstName: { type: string }\n   *      lastName: { type: string }\n   *      salary: { type: number }\n   *    }\n   *  }\n   *\n   * @param $ref - The JSON reference object (the one with the \"$ref\" property)\n   * @param resolvedValue - The resolved value, which can be any type\n   * @returns - Returns the dereferenced value\n   */\n  static dereference<S extends object = JSONSchema>($ref: $Ref<S>, resolvedValue: S): S {\n    if (resolvedValue && typeof resolvedValue === 'object' && $Ref.isExtended$Ref($ref)) {\n      const merged = {};\n      for (const key of Object.keys($ref)) {\n        if (key !== '$ref') {\n          // @ts-expect-error TS(7053): Element implicitly has an 'any' type because expre... Remove this comment to see the full error message\n          merged[key] = $ref[key];\n        }\n      }\n\n      for (const key of Object.keys(resolvedValue)) {\n        if (!(key in merged)) {\n          // @ts-expect-error TS(7053): Element implicitly has an 'any' type because expre... Remove this comment to see the full error message\n          merged[key] = resolvedValue[key];\n        }\n      }\n\n      return merged as S;\n    } else {\n      // Completely replace the original reference with the resolved value\n      return resolvedValue;\n    }\n  }\n}\n\nexport default $Ref;\n"
  },
  {
    "path": "packages/json-schema-ref-parser/src/refs.ts",
    "content": "import { ono } from '@jsdevtools/ono';\nimport type { JSONSchema4Type, JSONSchema6Type, JSONSchema7Type } from 'json-schema';\n\nimport type { ParserOptions } from './options';\nimport $Ref from './ref';\nimport type { JSONSchema } from './types';\nimport convertPathToPosix from './util/convert-path-to-posix';\nimport * as url from './util/url';\n\ninterface $RefsMap<S extends object = JSONSchema> {\n  [url: string]: $Ref<S>;\n}\n/**\n * When you call the resolve method, the value that gets passed to the callback function (or Promise) is a $Refs object. This same object is accessible via the parser.$refs property of $RefParser objects.\n *\n * This object is a map of JSON References and their resolved values. It also has several convenient helper methods that make it easy for you to navigate and manipulate the JSON References.\n *\n * See https://apitools.dev/json-schema-ref-parser/docs/refs.html\n */\nexport default class $Refs<S extends object = JSONSchema> {\n  /**\n   * This property is true if the schema contains any circular references. You may want to check this property before serializing the dereferenced schema as JSON, since JSON.stringify() does not support circular references by default.\n   *\n   * See https://apitools.dev/json-schema-ref-parser/docs/refs.html#circular\n   */\n  public circular: boolean;\n\n  /**\n   * Returns the paths/URLs of all the files in your schema (including the main schema file).\n   *\n   * See https://apitools.dev/json-schema-ref-parser/docs/refs.html#pathstypes\n   *\n   * @param types (optional) Optionally only return certain types of paths (\"file\", \"http\", etc.)\n   */\n  paths(...types: (string | string[])[]): string[] {\n    const paths = getPaths(this._$refs, types.flat());\n    return paths.map((path) => convertPathToPosix(path.decoded));\n  }\n\n  /**\n   * Returns a map of paths/URLs and their correspond values.\n   *\n   * See https://apitools.dev/json-schema-ref-parser/docs/refs.html#valuestypes\n   *\n   * @param types (optional) Optionally only return values from certain locations (\"file\", \"http\", etc.)\n   */\n  values(...types: (string | string[])[]): S {\n    const $refs = this._$refs;\n    const paths = getPaths($refs, types.flat());\n    return paths.reduce<Record<string, any>>((obj, path) => {\n      obj[convertPathToPosix(path.decoded)] = $refs[path.encoded]!.value;\n      return obj;\n    }, {}) as S;\n  }\n\n  /**\n   * Returns `true` if the given path exists in the schema; otherwise, returns `false`\n   *\n   * See https://apitools.dev/json-schema-ref-parser/docs/refs.html#existsref\n   *\n   * @param $ref The JSON Reference path, optionally with a JSON Pointer in the hash\n   */\n  /**\n   * Determines whether the given JSON reference exists.\n   *\n   * @param path - The path being resolved, optionally with a JSON pointer in the hash\n   * @param [options]\n   * @returns\n   */\n  exists(path: string, options: any) {\n    try {\n      this._resolve(path, '', options);\n      return true;\n    } catch {\n      return false;\n    }\n  }\n\n  /**\n   * Resolves the given JSON reference and returns the resolved value.\n   *\n   * @param path - The path being resolved, with a JSON pointer in the hash\n   * @param [options]\n   * @returns - Returns the resolved value\n   */\n  get(path: string, options?: ParserOptions): JSONSchema4Type | JSONSchema6Type | JSONSchema7Type {\n    return this._resolve(path, '', options)!.value;\n  }\n\n  /**\n   * Sets the value at the given path in the schema. If the property, or any of its parents, don't exist, they will be created.\n   *\n   * @param path The JSON Reference path, optionally with a JSON Pointer in the hash\n   * @param value The value to assign. Can be anything (object, string, number, etc.)\n   */\n  set(path: string, value: JSONSchema4Type | JSONSchema6Type | JSONSchema7Type) {\n    const absPath = url.resolve(this._root$Ref.path!, path);\n    const withoutHash = url.stripHash(absPath);\n    const $ref = this._$refs[withoutHash];\n\n    if (!$ref) {\n      throw ono(`Error resolving $ref pointer \"${path}\". \\n\"${withoutHash}\" not found.`);\n    }\n\n    $ref.set(absPath, value);\n  }\n  /**\n   * Returns the specified {@link $Ref} object, or undefined.\n   *\n   * @param path - The path being resolved, optionally with a JSON pointer in the hash\n   * @returns\n   * @protected\n   */\n  _get$Ref(path: string) {\n    path = url.resolve(this._root$Ref.path!, path);\n    const withoutHash = url.stripHash(path);\n    return this._$refs[withoutHash];\n  }\n\n  /**\n   * Creates a new {@link $Ref} object and adds it to this {@link $Refs} object.\n   *\n   * @param path  - The file path or URL of the referenced file\n   */\n  _add(path: string) {\n    const withoutHash = url.stripHash(path);\n\n    const $ref = new $Ref<S>(this);\n    $ref.path = withoutHash;\n\n    this._$refs[withoutHash] = $ref;\n    this._root$Ref = this._root$Ref || $ref;\n\n    return $ref;\n  }\n\n  /**\n   * Resolves the given JSON reference.\n   *\n   * @param path - The path being resolved, optionally with a JSON pointer in the hash\n   * @param pathFromRoot - The path of `obj` from the schema root\n   * @param [options]\n   * @returns\n   * @protected\n   */\n  _resolve(path: string, pathFromRoot: string, options?: ParserOptions) {\n    const absPath = url.resolve(this._root$Ref.path!, path);\n    const withoutHash = url.stripHash(absPath);\n    const $ref = this._$refs[withoutHash];\n\n    if (!$ref) {\n      throw ono(`Error resolving $ref pointer \"${path}\". \\n\"${withoutHash}\" not found.`);\n    }\n\n    if ($ref.value === undefined) {\n      console.warn(`$ref entry exists but value is undefined: ${withoutHash}`);\n      return null; // Treat as unresolved\n    }\n\n    return $ref.resolve(absPath, options, path, pathFromRoot);\n  }\n\n  /**\n   * A map of paths/urls to {@link $Ref} objects\n   *\n   * @type {object}\n   * @protected\n   */\n  _$refs: $RefsMap<S> = {};\n\n  /**\n   * The {@link $Ref} object that is the root of the JSON schema.\n   *\n   * @type {$Ref}\n   * @protected\n   */\n  _root$Ref: $Ref<S>;\n\n  constructor() {\n    /**\n     * Indicates whether the schema contains any circular references.\n     *\n     * @type {boolean}\n     */\n    this.circular = false;\n\n    this._$refs = {};\n\n    // @ts-ignore\n    this._root$Ref = null;\n  }\n\n  /**\n   * Returns the paths of all the files/URLs that are referenced by the JSON schema,\n   * including the schema itself.\n   *\n   * @param [types] - Only return paths of the given types (\"file\", \"http\", etc.)\n   * @returns\n   */\n  /**\n   * Returns the map of JSON references and their resolved values.\n   *\n   * @param [types] - Only return references of the given types (\"file\", \"http\", etc.)\n   * @returns\n   */\n\n  /**\n   * Returns a POJO (plain old JavaScript object) for serialization as JSON.\n   *\n   * @returns {object}\n   */\n  toJSON = this.values;\n}\n\n/**\n * Returns the encoded and decoded paths keys of the given object.\n *\n * @param $refs - The object whose keys are URL-encoded paths\n * @param [types] - Only return paths of the given types (\"file\", \"http\", etc.)\n * @returns\n */\nfunction getPaths<S extends object = JSONSchema>($refs: $RefsMap<S>, types: string[]) {\n  let paths = Object.keys($refs);\n\n  // Filter the paths by type\n  types = Array.isArray(types[0]) ? types[0] : Array.prototype.slice.call(types);\n  if (types.length > 0 && types[0]) {\n    paths = paths.filter((key) => types.includes($refs[key]!.pathType as string));\n  }\n\n  // Decode local filesystem paths\n  return paths.map((path) => ({\n    decoded: $refs[path]!.pathType === 'file' ? url.toFileSystemPath(path, true) : path,\n    encoded: path,\n  }));\n}\n"
  },
  {
    "path": "packages/json-schema-ref-parser/src/resolve-external.ts",
    "content": "import type { $RefParser } from '.';\nimport { getResolvedInput } from '.';\nimport type { $RefParserOptions } from './options';\nimport { newFile, parseFile } from './parse';\nimport Pointer from './pointer';\nimport $Ref from './ref';\nimport type $Refs from './refs';\nimport { fileResolver } from './resolvers/file';\nimport { urlResolver } from './resolvers/url';\nimport type { JSONSchema } from './types';\nimport { isHandledError } from './util/errors';\nimport * as url from './util/url';\n\n/**\n * Crawls the JSON schema, finds all external JSON references, and resolves their values.\n * This method does not mutate the JSON schema. The resolved values are added to {@link $RefParser#$refs}.\n *\n * NOTE: We only care about EXTERNAL references here. INTERNAL references are only relevant when dereferencing.\n *\n * @returns\n * The promise resolves once all JSON references in the schema have been resolved,\n * including nested references that are contained in externally-referenced files.\n */\nexport async function resolveExternal(parser: $RefParser, options: $RefParserOptions) {\n  const promises = crawl(parser.schema, {\n    $refs: parser.$refs,\n    options: options.parse,\n    path: `${parser.$refs._root$Ref.path}#`,\n  });\n  await Promise.all(promises);\n}\n\n/**\n * Recursively crawls the given value, and resolves any external JSON references.\n *\n * @param obj - The value to crawl. If it's not an object or array, it will be ignored.\n * @returns An array of promises. There will be one promise for each JSON reference in `obj`.\n * If `obj` does not contain any JSON references, then the array will be empty.\n * If any of the JSON references point to files that contain additional JSON references,\n * then the corresponding promise will internally reference an array of promises.\n */\nfunction crawl<S extends object = JSONSchema>(\n  obj: string | Buffer | S | undefined | null,\n  {\n    $refs,\n    external = false,\n    options,\n    path,\n    seen = new Set(),\n  }: {\n    $refs: $Refs<S>;\n    /** Whether `obj` was found in an external document. */\n    external?: boolean;\n    options: $RefParserOptions['parse'];\n    /** The full path of `obj`, possibly with a JSON Pointer in the hash. */\n    path: string;\n    seen?: Set<unknown>;\n  },\n): ReadonlyArray<Promise<unknown>> {\n  let promises: Array<Promise<unknown>> = [];\n\n  if (obj && typeof obj === 'object' && !ArrayBuffer.isView(obj) && !seen.has(obj)) {\n    seen.add(obj);\n\n    if ($Ref.isExternal$Ref(obj)) {\n      promises.push(\n        resolve$Ref<S>(obj, {\n          $refs,\n          options,\n          path,\n          seen,\n        }),\n      );\n    }\n\n    for (const [key, value] of Object.entries(obj)) {\n      promises = promises.concat(\n        crawl(value, {\n          $refs,\n          external,\n          options,\n          path: Pointer.join(path, key),\n          seen,\n        }),\n      );\n    }\n  }\n\n  return promises;\n}\n\n/**\n * Resolves the given JSON Reference, and then crawls the resulting value.\n *\n * @param $ref - The JSON Reference to resolve\n * @param path - The full path of `$ref`, possibly with a JSON Pointer in the hash\n * @param $refs\n * @param options\n *\n * @returns\n * The promise resolves once all JSON references in the object have been resolved,\n * including nested references that are contained in externally-referenced files.\n */\nasync function resolve$Ref<S extends object = JSONSchema>(\n  $ref: S,\n  {\n    $refs,\n    options,\n    path,\n    seen,\n  }: {\n    $refs: $Refs<S>;\n    options: $RefParserOptions['parse'];\n    path: string;\n    seen: Set<unknown>;\n  },\n): Promise<unknown> {\n  const resolvedPath = url.resolve(path, ($ref as JSONSchema).$ref!);\n  const withoutHash = url.stripHash(resolvedPath);\n\n  // If this ref points back to an input source we've already merged, avoid re-importing\n  // by checking if the path (without hash) matches a known source in parser and we can serve it internally later.\n  // We keep normal flow but ensure cache hit if already added.\n  // Do we already have this $ref?\n  const ref = $refs._$refs[withoutHash];\n  if (ref) {\n    // We've already parsed this $ref, so crawl it to resolve its own externals\n    const promises = crawl(ref.value as S, {\n      $refs,\n      external: true,\n      options,\n      path: `${withoutHash}#`,\n      seen,\n    });\n    return Promise.all(promises);\n  }\n\n  // Parse the $referenced file/url\n  const file = newFile(resolvedPath);\n\n  // Add a new $Ref for this file, even though we don't have the value yet.\n  // This ensures that we don't simultaneously read & parse the same file multiple times\n  const $refAdded = $refs._add(file.url);\n\n  try {\n    const resolvedInput = getResolvedInput({ pathOrUrlOrSchema: resolvedPath });\n\n    $refAdded.pathType = resolvedInput.type;\n\n    let promises: ReadonlyArray<Promise<unknown>> = [];\n\n    if (resolvedInput.type !== 'json') {\n      const resolver = resolvedInput.type === 'file' ? fileResolver : urlResolver;\n      await resolver.handler({ file });\n      const parseResult = await parseFile(file, options);\n      $refAdded.value = parseResult.result;\n      promises = crawl(parseResult.result, {\n        $refs,\n        external: true,\n        options,\n        path: `${withoutHash}#`,\n        seen,\n      });\n    }\n\n    return Promise.all(promises);\n  } catch (error) {\n    if (isHandledError(error)) {\n      $refAdded.value = error;\n    }\n    throw error;\n  }\n}\n"
  },
  {
    "path": "packages/json-schema-ref-parser/src/resolvers/file.ts",
    "content": "import { ono } from '@jsdevtools/ono';\nimport fs from 'fs';\n\nimport type { FileInfo } from '../types';\nimport { ResolverError } from '../util/errors';\nimport * as url from '../util/url';\n\nexport const fileResolver = {\n  handler: async ({ file }: { file: FileInfo }): Promise<void> => {\n    let path: string | undefined;\n\n    try {\n      path = url.toFileSystemPath(file.url);\n    } catch (error: any) {\n      throw new ResolverError(ono.uri(error, `Malformed URI: ${file.url}`), file.url);\n    }\n\n    try {\n      const data = await fs.promises.readFile(path);\n      file.data = data;\n    } catch (error: any) {\n      throw new ResolverError(ono(error, `Error opening file \"${path}\"`), path);\n    }\n  },\n};\n"
  },
  {
    "path": "packages/json-schema-ref-parser/src/resolvers/url.ts",
    "content": "import { ono } from '@jsdevtools/ono';\n\nimport type { FileInfo } from '../types';\nimport { ResolverError } from '../util/errors';\nimport { resolve } from '../util/url';\n\nexport const sendRequest = async ({\n  fetchOptions,\n  redirects = [],\n  timeout = 60_000,\n  url,\n}: {\n  fetchOptions?: RequestInit;\n  redirects?: string[];\n  timeout?: number;\n  url: URL | string;\n}): Promise<{\n  fetchOptions?: RequestInit;\n  response: Response;\n}> => {\n  url = new URL(url);\n  redirects.push(url.href);\n\n  const controller = new AbortController();\n  const timeoutId = setTimeout(() => {\n    controller.abort();\n  }, timeout);\n  const response = await fetch(url, {\n    signal: controller.signal,\n    ...fetchOptions,\n  });\n  clearTimeout(timeoutId);\n\n  if (response.status >= 300 && response.status <= 399) {\n    if (redirects.length > 5) {\n      throw new ResolverError(\n        ono(\n          { status: response.status },\n          `Error requesting ${redirects[0]}. \\nToo many redirects: \\n  ${redirects.join(' \\n  ')}`,\n        ),\n      );\n    }\n\n    if (!('location' in response.headers) || !response.headers.location) {\n      throw ono(\n        { status: response.status },\n        `HTTP ${response.status} redirect with no location header`,\n      );\n    }\n\n    return sendRequest({\n      fetchOptions,\n      redirects,\n      timeout,\n      url: resolve(url.href, response.headers.location as string),\n    });\n  }\n\n  return { fetchOptions, response };\n};\n\nexport const urlResolver = {\n  handler: async ({\n    arrayBuffer,\n    fetch: _fetch,\n    file,\n  }: {\n    arrayBuffer?: ArrayBuffer;\n    fetch?: RequestInit;\n    file: FileInfo;\n  }): Promise<void> => {\n    let data = arrayBuffer;\n\n    if (!data) {\n      try {\n        const { fetchOptions, response } = await sendRequest({\n          fetchOptions: {\n            method: 'GET',\n            ..._fetch,\n          },\n          url: file.url,\n        });\n\n        if (response.status >= 400) {\n          // gracefully handle HEAD method not allowed\n          if (response.status !== 405 || fetchOptions?.method !== 'HEAD') {\n            throw ono({ status: response.status }, `HTTP ERROR ${response.status}`);\n          }\n        }\n\n        data = response.body ? await response.arrayBuffer() : new ArrayBuffer(0);\n      } catch (error: any) {\n        throw new ResolverError(ono(error, `Error requesting ${file.url}`), file.url);\n      }\n    }\n\n    file.data = Buffer.from(data!);\n  },\n};\n"
  },
  {
    "path": "packages/json-schema-ref-parser/src/types/index.ts",
    "content": "import type {\n  JSONSchema4,\n  JSONSchema4Object,\n  JSONSchema6,\n  JSONSchema6Object,\n  JSONSchema7,\n  JSONSchema7Object,\n} from 'json-schema';\n\nexport type JSONSchema = JSONSchema4 | JSONSchema6 | JSONSchema7;\nexport type JSONSchemaObject = JSONSchema4Object | JSONSchema6Object | JSONSchema7Object;\n\nexport interface Plugin {\n  /**\n   * Can this parser be used to process this file?\n   */\n  canHandle: (file: FileInfo) => boolean;\n  /**\n   * This is where the real work of a parser happens. The `parse` method accepts the same file info object as the `canHandle` function, but rather than returning a boolean value, the `parse` method should return a JavaScript representation of the file contents.  For our CSV parser, that is a two-dimensional array of lines and values.  For your parser, it might be an object, a string, a custom class, or anything else.\n   *\n   * Unlike the `canHandle` function, the `parse` method can also be asynchronous. This might be important if your parser needs to retrieve data from a database or if it relies on an external HTTP service to return the parsed value.  You can return your asynchronous value via a [Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise) or a Node.js-style error-first callback.  Here are examples of both approaches:\n   */\n  handler: (\n    file: FileInfo,\n  ) =>\n    | string\n    | Buffer\n    | JSONSchema\n    | Promise<{ data: Buffer }>\n    | Promise<string | Buffer | JSONSchema>;\n  name: 'binary' | 'file' | 'http' | 'json' | 'text' | 'yaml';\n}\n\n/**\n * JSON Schema `$Ref` Parser supports plug-ins, such as resolvers and parsers. These plug-ins can have methods such as `canHandle()`, `read()`, `canHandle()`, and `parse()`. All of these methods accept the same object as their parameter: an object containing information about the file being read or parsed.\n *\n * The file info object currently only consists of a few properties, but it may grow in the future if plug-ins end up needing more information.\n *\n * See https://apitools.dev/json-schema-ref-parser/docs/plugins/file-info-object.html\n */\nexport interface FileInfo {\n  /**\n   * The raw file contents, in whatever form they were returned by the resolver that read the file.\n   */\n  data: string | Buffer;\n  /**\n   * The lowercase file extension, such as \".json\", \".yaml\", \".txt\", etc.\n   */\n  extension: string;\n  /**\n   * The hash (URL fragment) of the file URL, including the # symbol. If the URL doesn't have a hash, then this will be an empty string.\n   */\n  hash: string;\n  /**\n   * The full URL of the file. This could be any type of URL, including \"http://\", \"https://\", \"file://\", \"ftp://\", \"mongodb://\", or even a local filesystem path (when running in Node.js).\n   */\n  url: string;\n}\n"
  },
  {
    "path": "packages/json-schema-ref-parser/src/util/convert-path-to-posix.ts",
    "content": "export default function convertPathToPosix(filePath: string): string {\n  // Extended-length paths on Windows should not be converted\n  if (filePath.startsWith('\\\\\\\\?\\\\')) {\n    return filePath;\n  }\n\n  return filePath.replaceAll('\\\\', '/');\n}\n"
  },
  {
    "path": "packages/json-schema-ref-parser/src/util/errors.ts",
    "content": "import { Ono } from '@jsdevtools/ono';\n\nimport type { $RefParser } from '..';\nimport type $Ref from '../ref';\nimport type { JSONSchema } from '../types';\nimport { getHash, stripHash, toFileSystemPath } from './url';\n\nexport type JSONParserErrorType =\n  | 'EUNKNOWN'\n  | 'EPARSER'\n  | 'EUNMATCHEDPARSER'\n  | 'ETIMEOUT'\n  | 'ERESOLVER'\n  | 'EUNMATCHEDRESOLVER'\n  | 'EMISSINGPOINTER'\n  | 'EINVALIDPOINTER';\n\nexport class JSONParserError extends Error {\n  public readonly name: string;\n  public readonly message: string;\n  public source: string | undefined;\n  public path: Array<string | number> | null;\n  public readonly code: JSONParserErrorType;\n  public constructor(message: string, source?: string) {\n    super();\n\n    this.code = 'EUNKNOWN';\n    this.name = 'JSONParserError';\n    this.message = message;\n    this.source = source;\n    this.path = null;\n\n    Ono.extend(this);\n  }\n\n  get footprint() {\n    return `${this.path}+${this.source}+${this.code}+${this.message}`;\n  }\n}\n\nexport class JSONParserErrorGroup<S extends object = JSONSchema> extends Error {\n  files: $RefParser;\n\n  constructor(parser: $RefParser) {\n    super();\n\n    this.files = parser;\n    this.name = 'JSONParserErrorGroup';\n    this.message = `${this.errors.length} error${\n      this.errors.length > 1 ? 's' : ''\n    } occurred while reading '${toFileSystemPath(parser.$refs._root$Ref!.path)}'`;\n\n    Ono.extend(this);\n  }\n\n  static getParserErrors<S extends object = JSONSchema>(parser: $RefParser) {\n    const errors = [];\n\n    for (const $ref of Object.values(parser.$refs._$refs) as $Ref<S>[]) {\n      if ($ref.errors) {\n        errors.push(...$ref.errors);\n      }\n    }\n\n    return errors;\n  }\n\n  get errors(): Array<\n    | JSONParserError\n    | InvalidPointerError\n    | ResolverError\n    | ParserError\n    | MissingPointerError\n    | UnmatchedParserError\n    | UnmatchedResolverError\n  > {\n    return JSONParserErrorGroup.getParserErrors<S>(this.files);\n  }\n}\n\nexport class ParserError extends JSONParserError {\n  code = 'EPARSER' as JSONParserErrorType;\n  name = 'ParserError';\n  constructor(message: any, source: any) {\n    super(`Error parsing ${source}: ${message}`, source);\n  }\n}\n\nexport class UnmatchedParserError extends JSONParserError {\n  code = 'EUNMATCHEDPARSER' as JSONParserErrorType;\n  name = 'UnmatchedParserError';\n\n  constructor(source: string) {\n    super(`Could not find parser for \"${source}\"`, source);\n  }\n}\n\nexport class ResolverError extends JSONParserError {\n  code = 'ERESOLVER' as JSONParserErrorType;\n  name = 'ResolverError';\n  ioErrorCode?: string;\n  constructor(ex: Error | any, source?: string) {\n    super(ex.message || `Error reading file \"${source}\"`, source);\n    if ('code' in ex) {\n      this.ioErrorCode = String(ex.code);\n    }\n  }\n}\n\nexport class UnmatchedResolverError extends JSONParserError {\n  code = 'EUNMATCHEDRESOLVER' as JSONParserErrorType;\n  name = 'UnmatchedResolverError';\n  constructor(source: any) {\n    super(`Could not find resolver for \"${source}\"`, source);\n  }\n}\n\nexport class MissingPointerError extends JSONParserError {\n  code = 'EMISSINGPOINTER' as JSONParserErrorType;\n  name = 'MissingPointerError';\n  constructor(token: string, path: string) {\n    super(\n      `Missing $ref pointer \"${getHash(path)}\". Token \"${token}\" does not exist.`,\n      stripHash(path),\n    );\n  }\n}\n\nexport class TimeoutError extends JSONParserError {\n  code = 'ETIMEOUT' as JSONParserErrorType;\n  name = 'TimeoutError';\n  constructor(timeout: number) {\n    super(`Dereferencing timeout reached: ${timeout}ms`);\n  }\n}\n\nexport class InvalidPointerError extends JSONParserError {\n  code = 'EUNMATCHEDRESOLVER' as JSONParserErrorType;\n  name = 'InvalidPointerError';\n  constructor(pointer: string, path: string) {\n    super(`Invalid $ref pointer \"${pointer}\". Pointers must begin with \"#/\"`, stripHash(path));\n  }\n}\n\nexport function isHandledError(err: any): err is JSONParserError {\n  return err instanceof JSONParserError || err instanceof JSONParserErrorGroup;\n}\n\nexport function normalizeError(err: any) {\n  if (err.path === null) {\n    err.path = [];\n  }\n\n  return err;\n}\n"
  },
  {
    "path": "packages/json-schema-ref-parser/src/util/is-windows.ts",
    "content": "const isWindowsConst = /^win/.test(globalThis.process ? globalThis.process.platform : '');\nexport const isWindows = () => isWindowsConst;\n"
  },
  {
    "path": "packages/json-schema-ref-parser/src/util/plugins.ts",
    "content": "import type { FileInfo, JSONSchema, Plugin } from '../types';\n\nexport interface PluginResult {\n  error?: any;\n  plugin: Pick<Plugin, 'handler'>;\n  result?: string | Buffer | JSONSchema;\n}\n\n/**\n * Runs the specified method of the given plugins, in order, until one of them returns a successful result.\n * Each method can return a synchronous value, a Promise, or call an error-first callback.\n * If the promise resolves successfully, or the callback is called without an error, then the result\n * is immediately returned and no further plugins are called.\n * If the promise rejects, or the callback is called with an error, then the next plugin is called.\n * If ALL plugins fail, then the last error is thrown.\n */\nexport async function run(plugins: Pick<Plugin, 'handler'>[], file: FileInfo) {\n  let index = 0;\n  let lastError: PluginResult;\n  let plugin: Pick<Plugin, 'handler'>;\n\n  return new Promise<PluginResult>((resolve, reject) => {\n    const runNextPlugin = async () => {\n      plugin = plugins[index++]!;\n\n      if (!plugin) {\n        // there are no more functions, re-throw the last error\n        return reject(lastError);\n      }\n\n      try {\n        const result = await plugin.handler(file);\n\n        if (result !== undefined) {\n          return resolve({\n            plugin,\n            result,\n          });\n        }\n\n        if (index === plugins.length) {\n          throw new Error('No promise has been returned.');\n        }\n      } catch (error) {\n        lastError = {\n          error,\n          plugin,\n        };\n        runNextPlugin();\n      }\n    };\n\n    runNextPlugin();\n  });\n}\n"
  },
  {
    "path": "packages/json-schema-ref-parser/src/util/url.ts",
    "content": "import path, { join, win32 } from 'node:path';\n\nimport convertPathToPosix from './convert-path-to-posix';\nimport { isWindows } from './is-windows';\n\nconst forwardSlashPattern = /\\//g;\nconst protocolPattern = /^(\\w{2,}):\\/\\//i;\n\n// RegExp patterns to URL-encode special characters in local filesystem paths\nconst urlEncodePatterns = [\n  [/\\?/g, '%3F'],\n  [/#/g, '%23'],\n] as [RegExp, string][];\n\n// RegExp patterns to URL-decode special characters for local filesystem paths\nconst urlDecodePatterns = [/%23/g, '#', /%24/g, '$', /%26/g, '&', /%2C/g, ',', /%40/g, '@'];\n\n/**\n * Returns resolved target URL relative to a base URL in a manner similar to that of a Web browser resolving an anchor tag HREF.\n *\n * @returns\n */\nexport function resolve(from: string, to: string) {\n  const fromUrl = new URL(convertPathToPosix(from), 'resolve://');\n  const resolvedUrl = new URL(convertPathToPosix(to), fromUrl);\n  const endSpaces = to.match(/(\\s*)$/)?.[1] || '';\n  if (resolvedUrl.protocol === 'resolve:') {\n    // `from` is a relative URL.\n    const { hash, pathname, search } = resolvedUrl;\n    return pathname + search + hash + endSpaces;\n  }\n  return resolvedUrl.toString() + endSpaces;\n}\n\n/**\n * Returns the current working directory (in Node) or the current page URL (in browsers).\n *\n * @returns\n */\nexport function cwd() {\n  if (typeof window !== 'undefined') {\n    return location.href;\n  }\n\n  const path = process.cwd();\n\n  const lastChar = path.slice(-1);\n  if (lastChar === '/' || lastChar === '\\\\') {\n    return path;\n  } else {\n    return path + '/';\n  }\n}\n\n/**\n * Returns the protocol of the given URL, or `undefined` if it has no protocol.\n *\n * @param path\n * @returns\n */\nexport function getProtocol(path: string | undefined) {\n  const match = protocolPattern.exec(path || '');\n  if (match) {\n    return match[1]!.toLowerCase();\n  }\n  return undefined;\n}\n\n/**\n * Returns the lowercased file extension of the given URL,\n * or an empty string if it has no extension.\n *\n * @param path\n * @returns\n */\nexport function getExtension(path: any) {\n  const lastDot = path.lastIndexOf('.');\n  if (lastDot > -1) {\n    return stripQuery(path.substr(lastDot).toLowerCase());\n  }\n  return '';\n}\n\n/**\n * Removes the query, if any, from the given path.\n *\n * @param path\n * @returns\n */\nexport function stripQuery(path: any) {\n  const queryIndex = path.indexOf('?');\n  if (queryIndex > -1) {\n    path = path.substr(0, queryIndex);\n  }\n  return path;\n}\n\n/**\n * Returns the hash (URL fragment), of the given path.\n * If there is no hash, then the root hash (\"#\") is returned.\n *\n * @param path\n * @returns\n */\nexport function getHash(path: undefined | string) {\n  if (!path) {\n    return '#';\n  }\n  const hashIndex = path.indexOf('#');\n  if (hashIndex > -1) {\n    return path.substring(hashIndex);\n  }\n  return '#';\n}\n\n/**\n * Removes the hash (URL fragment), if any, from the given path.\n *\n * @param path\n * @returns\n */\nexport function stripHash(path?: string | undefined) {\n  if (!path) {\n    return '';\n  }\n  const hashIndex = path.indexOf('#');\n  if (hashIndex > -1) {\n    path = path.substring(0, hashIndex);\n  }\n  return path;\n}\n\n/**\n * Determines whether the given path is a filesystem path.\n * This includes \"file://\" URLs.\n *\n * @param path\n * @returns\n */\nexport function isFileSystemPath(path: string | undefined) {\n  // @ts-ignore\n  if (typeof window !== 'undefined' || (typeof process !== 'undefined' && process.browser)) {\n    // We're running in a browser, so assume that all paths are URLs.\n    // This way, even relative paths will be treated as URLs rather than as filesystem paths\n    return false;\n  }\n\n  const protocol = getProtocol(path);\n  return protocol === undefined || protocol === 'file';\n}\n\n/**\n * Converts a filesystem path to a properly-encoded URL.\n *\n * This is intended to handle situations where JSON Schema $Ref Parser is called\n * with a filesystem path that contains characters which are not allowed in URLs.\n *\n * @example\n * The following filesystem paths would be converted to the following URLs:\n *\n *    <\"!@#$%^&*+=?'>.json              ==>   %3C%22!@%23$%25%5E&*+=%3F\\'%3E.json\n *    C:\\\\My Documents\\\\File (1).json   ==>   C:/My%20Documents/File%20(1).json\n *    file://Project #42/file.json      ==>   file://Project%20%2342/file.json\n *\n * @param path\n * @returns\n */\nexport function fromFileSystemPath(path: string) {\n  // Step 1: On Windows, replace backslashes with forward slashes,\n  // rather than encoding them as \"%5C\"\n  if (isWindows()) {\n    const projectDir = cwd();\n    const upperPath = path.toUpperCase();\n    const projectDirPosixPath = convertPathToPosix(projectDir);\n    const posixUpper = projectDirPosixPath.toUpperCase();\n    const hasProjectDir = upperPath.includes(posixUpper);\n    const hasProjectUri = upperPath.includes(posixUpper);\n    const isAbsolutePath =\n      win32.isAbsolute(path) ||\n      path.startsWith('http://') ||\n      path.startsWith('https://') ||\n      path.startsWith('file://');\n\n    if (!(hasProjectDir || hasProjectUri || isAbsolutePath) && !projectDir.startsWith('http')) {\n      path = join(projectDir, path);\n    }\n    path = convertPathToPosix(path);\n  }\n\n  // Step 2: `encodeURI` will take care of MOST characters\n  path = encodeURI(path);\n\n  // Step 3: Manually encode characters that are not encoded by `encodeURI`.\n  // This includes characters such as \"#\" and \"?\", which have special meaning in URLs,\n  // but are just normal characters in a filesystem path.\n  for (const pattern of urlEncodePatterns) {\n    path = path.replace(pattern[0], pattern[1]);\n  }\n\n  return path;\n}\n\n/**\n * Converts a URL to a local filesystem path.\n */\nexport function toFileSystemPath(path: string | undefined, keepFileProtocol?: boolean): string {\n  // Step 1: `decodeURI` will decode characters such as Cyrillic characters, spaces, etc.\n  path = decodeURI(path!);\n\n  // Step 2: Manually decode characters that are not decoded by `decodeURI`.\n  // This includes characters such as \"#\" and \"?\", which have special meaning in URLs,\n  // but are just normal characters in a filesystem path.\n  for (let i = 0; i < urlDecodePatterns.length; i += 2) {\n    path = path.replace(urlDecodePatterns[i]!, urlDecodePatterns[i + 1] as string);\n  }\n\n  // Step 3: If it's a \"file://\" URL, then format it consistently\n  // or convert it to a local filesystem path\n  let isFileUrl = path.substr(0, 7).toLowerCase() === 'file://';\n  if (isFileUrl) {\n    // Strip-off the protocol, and the initial \"/\", if there is one\n    path = path[7] === '/' ? path.substr(8) : path.substr(7);\n\n    // insert a colon (\":\") after the drive letter on Windows\n    if (isWindows() && path[1] === '/') {\n      path = path[0] + ':' + path.substr(1);\n    }\n\n    if (keepFileProtocol) {\n      // Return the consistently-formatted \"file://\" URL\n      path = 'file:///' + path;\n    } else {\n      // Convert the \"file://\" URL to a local filesystem path.\n      // On Windows, it will start with something like \"C:/\".\n      // On Posix, it will start with \"/\"\n      isFileUrl = false;\n      path = isWindows() ? path : '/' + path;\n    }\n  }\n\n  // Step 4: Normalize Windows paths (unless it's a \"file://\" URL)\n  if (isWindows() && !isFileUrl) {\n    // Replace forward slashes with backslashes\n    path = path.replace(forwardSlashPattern, '\\\\');\n\n    // Capitalize the drive letter\n    if (path.substr(1, 2) === ':\\\\') {\n      path = path[0]!.toUpperCase() + path.substr(1);\n    }\n  }\n\n  return path;\n}\n\nexport function relative(from: string, to: string) {\n  if (!isFileSystemPath(from) || !isFileSystemPath(to)) {\n    return resolve(from, to);\n  }\n\n  const fromDir = path.dirname(stripHash(from));\n  const toPath = stripHash(to);\n\n  const result = path.relative(fromDir, toPath);\n  return result + getHash(to);\n}\n"
  },
  {
    "path": "packages/json-schema-ref-parser/tsconfig.json",
    "content": "{\n  \"extends\": \"../../tsconfig.base.json\",\n  \"compilerOptions\": {\n    \"composite\": true,\n    \"outDir\": \"dist\",\n    \"rootDir\": \"src\",\n    \"types\": [\"vitest/globals\"]\n  },\n  \"include\": [\"src\"]\n}\n"
  },
  {
    "path": "packages/json-schema-ref-parser/tsdown.config.ts",
    "content": "import { defineConfig } from 'tsdown';\n\nexport default defineConfig({\n  clean: true,\n  dts: true,\n  entry: ['src/index.ts'],\n  format: ['esm'],\n  minify: false,\n  sourcemap: true,\n  treeshake: true,\n});\n"
  },
  {
    "path": "packages/nuxt/CHANGELOG.md",
    "content": "# @hey-api/nuxt\n\n## 0.2.1\n\n### Patch Changes\n\n- fix: update peer dependencies to be more permissible ([#2574](https://github.com/hey-api/openapi-ts/pull/2574)) ([`996021e`](https://github.com/hey-api/openapi-ts/commit/996021e4ce306ce762dfd55f2a7ec8099be4f24c)) by [@mrlubos](https://github.com/mrlubos)\n\n## 0.2.0\n\n### Minor Changes\n\n- [#2175](https://github.com/hey-api/openapi-ts/pull/2175) [`6d56fa8`](https://github.com/hey-api/openapi-ts/commit/6d56fa8d80fd02c67746324b8edd6d008f788d67) Thanks [@mrlubos](https://github.com/mrlubos)! - feat: remove `@hey-api/client-nuxt` dependency\n\n## 0.1.7\n\n### Patch Changes\n\n- Updated dependencies [[`96cd12c`](https://github.com/hey-api/openapi-ts/commit/96cd12c87ca11a396e0df47771ceb1f9f20860d7)]:\n  - @hey-api/client-nuxt@0.4.2\n\n## 0.1.6\n\n### Patch Changes\n\n- Updated dependencies [[`565e0b8`](https://github.com/hey-api/openapi-ts/commit/565e0b89fbab4556ecdc63dfe08250942681140e)]:\n  - @hey-api/client-nuxt@0.4.1\n\n## 0.1.5\n\n### Patch Changes\n\n- [#1939](https://github.com/hey-api/openapi-ts/pull/1939) [`09bce36`](https://github.com/hey-api/openapi-ts/commit/09bce3644680a68ea91c9a1396d506b13709ae93) Thanks [@a1mersnow](https://github.com/a1mersnow)! - fix: avoid duplicate definition of `@hey-api/client-nuxt` plugin\n\n- [#1939](https://github.com/hey-api/openapi-ts/pull/1939) [`f46e241`](https://github.com/hey-api/openapi-ts/commit/f46e2419d8eaefea4eaff232f00ec770509afcb1) Thanks [@a1mersnow](https://github.com/a1mersnow)! - fix: skip watch mode in prepare step\n\n- Updated dependencies []:\n  - @hey-api/client-nuxt@0.4.0\n\n## 0.1.4\n\n### Patch Changes\n\n- Updated dependencies [[`67c385b`](https://github.com/hey-api/openapi-ts/commit/67c385bf6289a79726b0cdd85fd81ca501cf2248)]:\n  - @hey-api/client-nuxt@0.4.0\n\n## 0.1.3\n\n### Patch Changes\n\n- Updated dependencies [[`fe43b88`](https://github.com/hey-api/openapi-ts/commit/fe43b889c20a2001f56e259f93f64851a1caa1d1)]:\n  - @hey-api/client-nuxt@0.3.1\n\n## 0.1.2\n\n### Patch Changes\n\n- [#1825](https://github.com/hey-api/openapi-ts/pull/1825) [`0670a38`](https://github.com/hey-api/openapi-ts/commit/0670a38c66dffc1431a7d4b48ec06b72d4f6868f) Thanks [@mrlubos](https://github.com/mrlubos)! - fix: move @hey-api/openapi-ts to peerDependencies\n\n- Updated dependencies [[`c73b0d4`](https://github.com/hey-api/openapi-ts/commit/c73b0d401c2bfa6f0b0d89d844a6aa09f2685a69), [`90886c1`](https://github.com/hey-api/openapi-ts/commit/90886c1372a999e8cb59d5da218762f6ee6cd459)]:\n  - @hey-api/openapi-ts@0.64.13\n\n## 0.1.1\n\n### Patch Changes\n\n- Updated dependencies [[`b9e1b4b`](https://github.com/hey-api/openapi-ts/commit/b9e1b4bec5e1c5d1f2b5b9cfc7fa145274ae604d)]:\n  - @hey-api/openapi-ts@0.64.12\n\n## 0.1.0\n\n### Minor Changes\n\n- [#1800](https://github.com/hey-api/openapi-ts/pull/1800) [`d80f835`](https://github.com/hey-api/openapi-ts/commit/d80f835b46775a01451f02f832ceb288c2b561d2) Thanks [@mrlubos](https://github.com/mrlubos)! - feat: initial release\n\n### Patch Changes\n\n- Updated dependencies [[`a4811bd`](https://github.com/hey-api/openapi-ts/commit/a4811bdf178ec1a7f1602e0483a32fe7303f4eac), [`d80f835`](https://github.com/hey-api/openapi-ts/commit/d80f835b46775a01451f02f832ceb288c2b561d2), [`a4811bd`](https://github.com/hey-api/openapi-ts/commit/a4811bdf178ec1a7f1602e0483a32fe7303f4eac)]:\n  - @hey-api/openapi-ts@0.64.11\n  - @hey-api/client-nuxt@0.3.0\n"
  },
  {
    "path": "packages/nuxt/LICENSE.md",
    "content": "MIT License\n\nCopyright (c) Hey API\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n"
  },
  {
    "path": "packages/nuxt/README.md",
    "content": "<div align=\"center\">\n  <img alt=\"Hey API logo\" height=\"150\" src=\"https://heyapi.dev/assets/.gen/logo-astronaut-300w.png\" width=\"150\">\n  <h1 align=\"center\"><b>Nuxt Module</b></h1>\n  <p align=\"center\">🚀 Nuxt module for <code>@hey-api/openapi-ts</code> codegen.</p>\n</div>\n\n<!-- TODO: add working example once StackBlitz updates their Node version -->\n<!-- [Live demo](https://stackblitz.com/edit/hey-api-client-nuxt-example?file=openapi-ts.config.ts,src%2Fclient%2Fschemas.gen.ts,src%2Fclient%2Fsdk.gen.ts,src%2Fclient%2Ftypes.gen.ts,src%2Fcomponents%home.vue) -->\n\n## Features\n\n- seamless integration with `@hey-api/openapi-ts` ecosystem\n- type-safe response data and errors\n- response data validation and transformation\n- access to the original request and response\n- granular request and response customization options\n- minimal learning curve thanks to extending the underlying technology\n- support bundling inside the generated output\n- [platform](https://heyapi.dev/openapi-ts/integrations) for automating codegen builds\n\n## Dashboard\n\nAccess your projects and OpenAPI specifications in the [Hey API Platform](https://app.heyapi.dev/).\n\n## Contributing\n\nWant to see your code in products used by millions?\n\nStart with our [Contributing](https://heyapi.dev/openapi-ts/community/contributing) guide and release your first feature.\n\n## Documentation\n\nPlease visit our [website](https://heyapi.dev) for documentation, guides, migrating, and more.\n\n## Sponsors\n\nHelp Hey API stay around for the long haul by becoming a [sponsor](https://github.com/sponsors/hey-api).\n\n<h3 align=\"center\">Gold</h3>\n\n<table align=\"center\" style=\"justify-content: center;align-items: center;display: flex;\">\n  <tbody>\n    <tr>\n      <td align=\"center\" width=\"336px\">\n        <p></p>\n        <p>\n          <a href=\"https://kutt.to/pkEZyc\" target=\"_blank\">\n            <picture height=\"50px\">\n              <source media=\"(prefers-color-scheme: dark)\" srcset=\"https://heyapi.dev/assets/.gen/stainless-logo-wordmark-480w.jpeg\">\n              <img alt=\"Stainless logo\" height=\"50px\" src=\"https://heyapi.dev/assets/.gen/stainless-logo-wordmark-480w.jpeg\">\n            </picture>\n          </a>\n          <br/>\n          Best-in-class developer interfaces for your API.\n          <br/>\n          <a href=\"https://kutt.to/pkEZyc\" style=\"text-decoration:none;\" target=\"_blank\">\n            stainless.com\n          </a>\n        </p>\n        <p></p>\n      </td>\n      <td align=\"center\" width=\"336px\">\n        <p></p>\n        <p>\n          <a href=\"https://kutt.to/QM9Q2N\" target=\"_blank\">\n            <picture height=\"50px\">\n              <source media=\"(prefers-color-scheme: dark)\" srcset=\"https://heyapi.dev/assets/opencode/logo-light.svg\">\n              <img alt=\"Opencode logo\" height=\"50px\" src=\"https://heyapi.dev/assets/opencode/logo-dark.svg\">\n            </picture>\n          </a>\n          <br/>\n          The open source coding agent.\n          <br/>\n          <a href=\"https://kutt.to/QM9Q2N\" style=\"text-decoration:none;\" target=\"_blank\">\n            opencode.ai\n          </a>\n        </p>\n        <p></p>\n      </td>\n    </tr>\n    <tr>\n      <td align=\"center\" width=\"336px\">\n        <p></p>\n        <p>\n          <a href=\"https://kutt.to/6vrYy9\" target=\"_blank\">\n            <picture height=\"50px\">\n              <source media=\"(prefers-color-scheme: dark)\" srcset=\"https://heyapi.dev/assets/mintlify/logo-light.svg\">\n              <img alt=\"Mintlify logo\" height=\"50px\" src=\"https://heyapi.dev/assets/mintlify/logo-dark.svg\">\n            </picture>\n          </a>\n          <br/>\n          The intelligent knowledge platform.\n          <br/>\n          <a href=\"https://kutt.to/6vrYy9\" style=\"text-decoration:none;\" target=\"_blank\">\n            mintlify.com\n          </a>\n        </p>\n        <p></p>\n      </td>\n    </tr>\n  </tbody>\n</table>\n\n<h3 align=\"center\">Silver</h3>\n\n<table align=\"center\" style=\"justify-content: center;align-items: center;display: flex;\">\n  <tbody>\n    <tr>\n      <td align=\"center\" width=\"172px\">\n        <a href=\"https://kutt.to/skQUVd\" target=\"_blank\">\n          <picture height=\"40px\">\n            <source media=\"(prefers-color-scheme: dark)\" srcset=\"https://heyapi.dev/assets/scalar/logo-light.svg\">\n            <img alt=\"Scalar logo\" height=\"40px\" src=\"https://heyapi.dev/assets/scalar/logo-dark.svg\">\n          </picture>\n        </a>\n        <br/>\n        <a href=\"https://kutt.to/skQUVd\" style=\"text-decoration:none;\" target=\"_blank\">\n          scalar.com\n        </a>\n      </td>\n      <td align=\"center\" width=\"172px\">\n        <a href=\"https://kutt.to/Dr9GuW\" target=\"_blank\">\n          <picture height=\"40px\">\n            <source media=\"(prefers-color-scheme: dark)\" srcset=\"https://heyapi.dev/assets/fastapi/logo-light.svg\">\n            <img alt=\"FastAPI logo\" height=\"40px\" src=\"https://heyapi.dev/assets/fastapi/logo-dark.svg\">\n          </picture>\n        </a>\n        <br/>\n        <a href=\"https://kutt.to/Dr9GuW\" style=\"text-decoration:none;\" target=\"_blank\">\n          fastapi.tiangolo.com\n        </a>\n      </td>\n    </tr>\n  </tbody>\n</table>\n\n<h3 align=\"center\">Bronze</h3>\n\n<table align=\"center\" style=\"justify-content: center;align-items: center;display: flex;\">\n  <tbody>\n    <tr>\n      <td align=\"center\" width=\"136px\">\n        <a href=\"https://kutt.to/YpaKsX\" target=\"_blank\">\n          <picture height=\"34px\">\n            <source media=\"(prefers-color-scheme: dark)\" srcset=\"https://heyapi.dev/assets/.gen/kinde-logo-wordmark-dark-480w.webp\">\n            <img alt=\"Kinde logo\" height=\"34px\" src=\"https://heyapi.dev/assets/.gen/kinde-logo-wordmark-480w.jpeg\">\n          </picture>\n        </a>\n      </td>\n      <td align=\"center\" width=\"136px\">\n        <a href=\"https://kutt.to/KkqSaw\" target=\"_blank\">\n          <picture height=\"34px\">\n            <source media=\"(prefers-color-scheme: dark)\" srcset=\"https://heyapi.dev/assets/cella/logo-light.svg\">\n            <img alt=\"Cella logo\" height=\"34px\" src=\"https://heyapi.dev/assets/cella/logo-dark.svg\">\n          </picture>\n        </a>\n      </td>\n    </tr>\n  </tbody>\n</table>\n\n## Migrating\n\nYou can learn more on the [Migrating](https://heyapi.dev/openapi-ts/migrating) page.\n\n## License\n\nReleased under the [MIT License](https://github.com/hey-api/openapi-ts/blob/main/LICENSE.md).\n"
  },
  {
    "path": "packages/nuxt/package.json",
    "content": "{\n  \"name\": \"@hey-api/nuxt\",\n  \"version\": \"0.2.1\",\n  \"description\": \"🚀 Nuxt module for `@hey-api/openapi-ts` codegen.\",\n  \"keywords\": [\n    \"client\",\n    \"codegen\",\n    \"fetch\",\n    \"http\",\n    \"javascript\",\n    \"nuxt\",\n    \"openapi\",\n    \"rest\",\n    \"swagger\",\n    \"typescript\",\n    \"vue\"\n  ],\n  \"homepage\": \"https://heyapi.dev/\",\n  \"bugs\": {\n    \"url\": \"https://github.com/hey-api/openapi-ts/issues\"\n  },\n  \"license\": \"MIT\",\n  \"author\": {\n    \"name\": \"Hey API\",\n    \"email\": \"lubos@heyapi.dev\",\n    \"url\": \"https://heyapi.dev\"\n  },\n  \"repository\": {\n    \"type\": \"git\",\n    \"url\": \"git+https://github.com/hey-api/openapi-ts.git\"\n  },\n  \"funding\": \"https://github.com/sponsors/hey-api\",\n  \"files\": [\n    \"dist\",\n    \"LICENSE.md\",\n    \"README.md\"\n  ],\n  \"type\": \"module\",\n  \"sideEffects\": false,\n  \"main\": \"./dist/module.cjs\",\n  \"types\": \"./dist/types.d.ts\",\n  \"exports\": {\n    \".\": {\n      \"types\": \"./dist/types.d.ts\",\n      \"import\": \"./dist/module.mjs\",\n      \"require\": \"./dist/module.cjs\"\n    }\n  },\n  \"scripts\": {\n    \"build\": \"nuxt-module-build build\",\n    \"dev\": \"tsdown --watch\",\n    \"prepack\": \"pnpm build\",\n    \"prepublishOnly\": \"pnpm build\"\n  },\n  \"dependencies\": {\n    \"@nuxt/kit\": \"4.3.1\",\n    \"defu\": \"6.1.4\",\n    \"mlly\": \"1.8.0\"\n  },\n  \"devDependencies\": {\n    \"@hey-api/openapi-ts\": \"workspace:*\",\n    \"@nuxt/module-builder\": \"0.8.4\",\n    \"@nuxt/schema\": \"3.16.2\",\n    \"@nuxt/test-utils\": \"4.0.0\",\n    \"vite\": \"7.3.1\"\n  },\n  \"peerDependencies\": {\n    \"@hey-api/openapi-ts\": \"<2\",\n    \"nuxt\": \">=3.0.0\",\n    \"vue\": \">=3.5.13\"\n  }\n}\n"
  },
  {
    "path": "packages/nuxt/src/module.ts",
    "content": "import fs from 'node:fs';\nimport path from 'node:path';\n\nimport type { UserConfig } from '@hey-api/openapi-ts';\nimport { createClient } from '@hey-api/openapi-ts';\nimport { addImportsSources, defineNuxtModule, useNuxt } from '@nuxt/kit';\nimport type {} from '@nuxt/schema';\nimport { defu } from 'defu';\nimport { findExports, findTypeExports } from 'mlly';\nimport { findPath } from 'nuxt/kit';\n\ninterface ModuleOptions {\n  /**\n   * Module alias.\n   *\n   * @default '#hey-api'\n   */\n  alias?: string;\n  /**\n   * Automatically import all re-exported identifiers from the index file?\n   * You may want to disable this option if the imported identifier names\n   * clash with identifier names from other modules.\n   *\n   * @default true\n   */\n  autoImport?: boolean;\n  /**\n   * `@hey-api/openapi-ts` configuration options.\n   */\n  config: Omit<UserConfig, 'output'> & Partial<Pick<UserConfig, 'output'>>;\n}\n\nexport default defineNuxtModule<ModuleOptions>({\n  defaults: {\n    alias: '#hey-api',\n    autoImport: true,\n  },\n  meta: {\n    configKey: 'heyApi',\n    name: '@hey-api/nuxt',\n  },\n  async setup(options) {\n    const nuxt = useNuxt();\n\n    const config = defu(options.config, {\n      output: {\n        path: path.join(nuxt.options.buildDir, 'client'),\n      },\n      plugins: (options.config.plugins || []).some(\n        (plugin: Required<UserConfig>['plugins'][number]) => {\n          const pluginName = typeof plugin === 'string' ? plugin : plugin.name;\n          return pluginName === '@hey-api/client-nuxt';\n        },\n      )\n        ? []\n        : ['@hey-api/client-nuxt'],\n    } satisfies Partial<UserConfig>) as UserConfig;\n\n    if (nuxt.options._prepare) {\n      config.watch = false;\n    }\n\n    const output = config.output instanceof Array ? config.output[0] : config.output;\n    const folder = path.resolve(\n      nuxt.options.rootDir,\n      typeof output === 'string' ? output : (output?.path ?? ''),\n    );\n\n    nuxt.options.alias[options.alias!] = folder;\n\n    nuxt.hooks.hookOnce('app:templates', async () => {\n      await createClient(config);\n    });\n\n    // auto-import enabled\n    if (options.autoImport) {\n      await createClient(config);\n      const typeImports = new Set<string>();\n      const valueImports = new Set<string>();\n      const files = findExports(fs.readFileSync(path.join(folder, 'index.ts'), 'utf-8'));\n      for (const file of files) {\n        if (!file.specifier || !/^\\.{1,2}\\//.test(file.specifier)) {\n          continue;\n        }\n        const filePath = await findPath(path.resolve(folder, file.specifier));\n        if (!filePath) {\n          continue;\n        }\n        const blob = fs.readFileSync(filePath, 'utf-8');\n        for (const { names } of findTypeExports(blob)) {\n          for (const name of names) {\n            typeImports.add(name);\n          }\n        }\n        for (const { names } of findExports(blob)) {\n          for (const name of names) {\n            valueImports.add(name);\n          }\n        }\n      }\n\n      const imports = [...[...typeImports].map((name) => ({ name, type: true })), ...valueImports];\n\n      if (imports.length && options.alias) {\n        addImportsSources({\n          from: options.alias,\n          imports,\n        });\n      }\n    }\n  },\n}) as any;\n"
  },
  {
    "path": "packages/nuxt/tsconfig.base.json",
    "content": "{\n  \"compilerOptions\": {\n    \"declaration\": true,\n    \"esModuleInterop\": true,\n    \"module\": \"ESNext\",\n    \"moduleResolution\": \"Bundler\",\n    \"noImplicitOverride\": true,\n    \"noUncheckedIndexedAccess\": true,\n    \"noUnusedLocals\": true,\n    \"strict\": true,\n    \"target\": \"ES2022\",\n    \"useUnknownInCatchVariables\": false\n  }\n}\n"
  },
  {
    "path": "packages/nuxt/tsconfig.json",
    "content": "{\n  \"extends\": \"./tsconfig.base.json\",\n  \"compilerOptions\": {\n    \"declaration\": false,\n    \"esModuleInterop\": true\n  }\n}\n"
  },
  {
    "path": "packages/nuxt/vitest.config.ts",
    "content": "import { defineVitestProject } from '@nuxt/test-utils/config';\n\nexport default defineVitestProject({\n  test: {\n    environment: 'nuxt',\n    environmentOptions: {\n      nuxt: {\n        domEnvironment: 'jsdom',\n      },\n    },\n  },\n});\n"
  },
  {
    "path": "packages/openapi-python/.gitignore",
    "content": ".DS_Store\n.idea\n.tsdown\n.tmp\njunit.xml\nlogs\nnode_modules\nnpm-debug.log*\ntemp\n\n*.iml\ndist\ncoverage\n.env\n"
  },
  {
    "path": "packages/openapi-python/CHANGELOG.md",
    "content": "# @hey-api/openapi-python\n\n## 0.0.12\n\n### Patch Changes\n\n### Updated Dependencies:\n\n- @hey-api/shared@0.2.5\n- @hey-api/codegen-core@0.7.4\n\n## 0.0.11\n\n### Patch Changes\n\n### Updated Dependencies:\n\n- @hey-api/shared@0.2.4\n- @hey-api/codegen-core@0.7.3\n- @hey-api/types@0.1.4\n\n## 0.0.10\n\n### Patch Changes\n\n- **cli**: show environment value in development ([#3546](https://github.com/hey-api/openapi-ts/pull/3546)) ([`571bc8a`](https://github.com/hey-api/openapi-ts/commit/571bc8a32b55647083bb506d4a5b575c4736cb94)) by [@mrlubos](https://github.com/mrlubos)\n\n### Updated Dependencies:\n\n- @hey-api/codegen-core@0.7.2\n- @hey-api/shared@0.2.3\n\n## 0.0.9\n\n### Patch Changes\n\n### Updated Dependencies:\n\n- @hey-api/shared@0.2.2\n- @hey-api/codegen-core@0.7.1\n\n## 0.0.8\n\n### Patch Changes\n\n### Updated Dependencies:\n\n- @hey-api/shared@0.2.1\n- @hey-api/json-schema-ref-parser@1.3.1\n\n## 0.0.7\n\n### Patch Changes\n\n### Updated Dependencies:\n\n- @hey-api/shared@0.2.0\n- @hey-api/json-schema-ref-parser@1.3.0\n\n## 0.0.6\n\n### Patch Changes\n\n### Updated Dependencies:\n\n- @hey-api/shared@0.1.2\n- @hey-api/codegen-core@0.7.0\n\n## 0.0.5\n\n### Patch Changes\n\n### Updated Dependencies:\n\n- @hey-api/shared@0.1.2\n- @hey-api/codegen-core@0.7.0\n\n## 0.0.4\n\n### Patch Changes\n\n### Updated Dependencies:\n\n- @hey-api/codegen-core@0.6.1\n- @hey-api/shared@0.1.1\n\n## 0.0.3\n\n### Patch Changes\n\n### Updated Dependencies:\n\n- @hey-api/shared@0.1.0\n- @hey-api/codegen-core@0.6.0\n- @hey-api/types@0.1.3\n\n## 0.0.2\n\n### Patch Changes\n\n### Updated Dependencies:\n\n- @hey-api/types@0.1.2\n- @hey-api/codegen-core@0.5.5\n"
  },
  {
    "path": "packages/openapi-python/LICENSE.md",
    "content": "MIT License\n\nCopyright (c) Hey API\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n"
  },
  {
    "path": "packages/openapi-python/README.md",
    "content": "<div align=\"center\">\n  <h1><b>OpenAPI Python</b></h1>\n</div>\n\nComing soon.\n"
  },
  {
    "path": "packages/openapi-python/bin/run.cmd",
    "content": "@echo off\nnode \"%~dp0\\run.js\" %*\n\n"
  },
  {
    "path": "packages/openapi-python/bin/run.js",
    "content": "#!/usr/bin/env node\nimport { spawnSync } from 'node:child_process';\nimport fs from 'node:fs';\nimport path from 'node:path';\nimport { fileURLToPath } from 'node:url';\n\nconst __dirname = path.dirname(fileURLToPath(import.meta.url));\nconst target = path.join(__dirname, '..', 'dist', 'run.mjs');\n\nif (!fs.existsSync(target)) {\n  console.error('openapi-python not built (expect dist/run.mjs)');\n  process.exit(1);\n}\n\nconst res = spawnSync(process.execPath, [target, ...process.argv.slice(2)], {\n  stdio: 'inherit',\n});\nprocess.exit(res.status ?? 0);\n"
  },
  {
    "path": "packages/openapi-python/package.json",
    "content": "{\n  \"name\": \"@hey-api/openapi-python\",\n  \"version\": \"0.0.12\",\n  \"private\": true,\n  \"description\": \"🐍 OpenAPI to Python codegen.\",\n  \"keywords\": [\n    \"codegen\",\n    \"generator\",\n    \"http\",\n    \"javascript\",\n    \"json\",\n    \"node\",\n    \"openapi\",\n    \"python\",\n    \"rest\",\n    \"swagger\",\n    \"typescript\",\n    \"yaml\"\n  ],\n  \"homepage\": \"https://heyapi.dev/\",\n  \"bugs\": {\n    \"url\": \"https://github.com/hey-api/openapi-ts/issues\"\n  },\n  \"license\": \"MIT\",\n  \"author\": {\n    \"name\": \"Hey API\",\n    \"email\": \"lubos@heyapi.dev\",\n    \"url\": \"https://heyapi.dev\"\n  },\n  \"repository\": {\n    \"type\": \"git\",\n    \"url\": \"git+https://github.com/hey-api/openapi-ts.git\"\n  },\n  \"funding\": \"https://github.com/sponsors/hey-api\",\n  \"bin\": {\n    \"openapi-python\": \"./bin/run.js\"\n  },\n  \"files\": [\n    \"bin\",\n    \"dist\",\n    \"LICENSE.md\",\n    \"README.md\"\n  ],\n  \"type\": \"module\",\n  \"main\": \"./dist/index.mjs\",\n  \"types\": \"./dist/index.d.mts\",\n  \"exports\": {\n    \".\": {\n      \"types\": \"./dist/index.d.mts\",\n      \"import\": \"./dist/index.mjs\"\n    },\n    \"./package.json\": \"./package.json\"\n  },\n  \"scripts\": {\n    \"build\": \"tsdown && pnpm check-exports\",\n    \"check-exports\": \"attw --pack . --profile esm-only --ignore-rules cjs-resolves-to-esm\",\n    \"dev\": \"tsdown --watch\",\n    \"prepublishOnly\": \"pnpm build\",\n    \"typecheck\": \"tsgo --noEmit\",\n    \"typecheck:next\": \"tsc --noEmit && uv run mypy src/py-compiler/__snapshots__\"\n  },\n  \"dependencies\": {\n    \"@hey-api/codegen-core\": \"workspace:*\",\n    \"@hey-api/json-schema-ref-parser\": \"workspace:*\",\n    \"@hey-api/shared\": \"workspace:*\",\n    \"@hey-api/types\": \"workspace:*\",\n    \"ansi-colors\": \"4.1.3\",\n    \"color-support\": \"1.1.3\",\n    \"commander\": \"14.0.3\"\n  },\n  \"devDependencies\": {\n    \"eslint\": \"9.39.1\",\n    \"typescript\": \"5.9.3\",\n    \"yaml\": \"2.8.2\"\n  },\n  \"engines\": {\n    \"node\": \">=20.19.0\"\n  }\n}\n"
  },
  {
    "path": "packages/openapi-python/src/__tests__/index.test.ts",
    "content": "// import { createClient } from './index';\n\n// type Config = Parameters<typeof createClient>[0];\n\ndescribe('createClient', () => {\n  it('works', () => {\n    expect(true).toBe(true);\n  });\n  // it('1 config, 1 input, 1 output', async () => {\n  //   const config: Config = {\n  //     dryRun: true,\n  //     input: {\n  //       info: { title: 'foo', version: '1.0.0' },\n  //       openapi: '3.0.0',\n  //     },\n  //     logs: {\n  //       level: 'silent',\n  //     },\n  //     output: 'output',\n  //     plugins: ['@hey-api/sdk'],\n  //   };\n\n  //   const results = await createClient(config);\n  //   expect(results).toHaveLength(1);\n  // });\n\n  // it('1 config, 2 inputs, 1 output', async () => {\n  //   const config: Config = {\n  //     dryRun: true,\n  //     input: [\n  //       {\n  //         info: { title: 'foo', version: '1.0.0' },\n  //         openapi: '3.0.0',\n  //       },\n  //       {\n  //         info: { title: 'bar', version: '1.0.0' },\n  //         openapi: '3.0.0',\n  //         paths: {},\n  //       },\n  //     ],\n  //     logs: {\n  //       level: 'silent',\n  //     },\n  //     output: 'output',\n  //     plugins: ['@hey-api/sdk'],\n  //   };\n\n  //   const results = await createClient(config);\n  //   expect(results).toHaveLength(1);\n  // });\n\n  // it('1 config, 2 inputs, 2 outputs', async () => {\n  //   const config: Config = {\n  //     dryRun: true,\n  //     input: [\n  //       {\n  //         info: { title: 'foo', version: '1.0.0' },\n  //         openapi: '3.0.0',\n  //       },\n  //       {\n  //         info: { title: 'bar', version: '1.0.0' },\n  //         openapi: '3.0.0',\n  //         paths: {},\n  //       },\n  //     ],\n  //     logs: {\n  //       level: 'silent',\n  //     },\n  //     output: ['output', 'output2'],\n  //     plugins: ['@hey-api/sdk'],\n  //   };\n\n  //   const results = await createClient(config);\n  //   expect(results).toHaveLength(2);\n  // });\n\n  // it('2 configs, 1 input, 1 output', async () => {\n  //   const config: Config = [\n  //     {\n  //       dryRun: true,\n  //       input: {\n  //         info: { title: 'foo', version: '1.0.0' },\n  //         openapi: '3.0.0',\n  //       },\n  //       logs: {\n  //         level: 'silent',\n  //       },\n  //       output: 'output',\n  //       plugins: ['@hey-api/sdk'],\n  //     },\n  //     {\n  //       dryRun: true,\n  //       input: {\n  //         info: { title: 'bar', version: '1.0.0' },\n  //         openapi: '3.0.0',\n  //       },\n  //       logs: {\n  //         level: 'silent',\n  //       },\n  //       output: 'output2',\n  //       plugins: ['@hey-api/sdk'],\n  //     },\n  //   ];\n\n  //   const results = await createClient(config);\n  //   expect(results).toHaveLength(2);\n  // });\n\n  // it('2 configs, 2 inputs, 2 outputs', async () => {\n  //   const config: Config = [\n  //     {\n  //       dryRun: true,\n  //       input: [\n  //         {\n  //           info: { title: 'foo', version: '1.0.0' },\n  //           openapi: '3.0.0',\n  //         },\n  //         {\n  //           info: { title: 'bar', version: '1.0.0' },\n  //           openapi: '3.0.0',\n  //           paths: {},\n  //         },\n  //       ],\n  //       logs: {\n  //         level: 'silent',\n  //       },\n  //       output: ['output', 'output2'],\n  //       plugins: ['@hey-api/sdk'],\n  //     },\n  //     {\n  //       dryRun: true,\n  //       input: [\n  //         {\n  //           info: { title: 'baz', version: '1.0.0' },\n  //           openapi: '3.0.0',\n  //         },\n  //         {\n  //           info: { title: 'qux', version: '1.0.0' },\n  //           openapi: '3.0.0',\n  //           paths: {},\n  //         },\n  //       ],\n  //       logs: {\n  //         level: 'silent',\n  //       },\n  //       output: ['output3', 'output4'],\n  //       plugins: ['@hey-api/sdk'],\n  //     },\n  //   ];\n\n  //   const results = await createClient(config);\n  //   expect(results).toHaveLength(4);\n  // });\n});\n"
  },
  {
    "path": "packages/openapi-python/src/cli/adapter.ts",
    "content": "import type { ToArray } from '@hey-api/types';\n\nimport type { UserConfig } from '../config/types';\nimport type { CliOptions } from './schema';\n\nexport const cliToConfig = (cli: CliOptions): Partial<UserConfig> => {\n  const config: Partial<UserConfig> = {};\n\n  if (cli.input) config.input = cli.input;\n  if (cli.output) config.output = cli.output;\n  if (cli.file) config.configFile = cli.file;\n  if (cli.dryRun !== undefined) config.dryRun = cli.dryRun;\n\n  const plugins: ToArray<UserConfig['plugins']> = [];\n  if (cli.plugins instanceof Array && cli.plugins.length > 0) {\n    plugins.push(...cli.plugins);\n  }\n  // if (cli.client) plugins.push(cli.client);\n  if (plugins.length > 0) config.plugins = plugins;\n\n  if (cli.debug || cli.silent || cli.logs || cli.logFile !== undefined) {\n    config.logs = {\n      ...(cli.logs && { path: cli.logs }),\n      ...(cli.debug && { level: 'debug' as const }),\n      ...(cli.silent && { level: 'silent' as const }),\n      ...(cli.logFile !== undefined && { file: cli.logFile }),\n    };\n  }\n\n  if (cli.watch !== undefined) {\n    if (typeof cli.watch === 'string') {\n      config.watch = Number.parseInt(cli.watch, 10);\n    } else {\n      config.watch = cli.watch;\n    }\n  }\n\n  return config;\n};\n"
  },
  {
    "path": "packages/openapi-python/src/cli/index.ts",
    "content": "import { isEnvironment } from '@hey-api/shared';\nimport { Command, CommanderError } from 'commander';\n\nimport pkg from '../../package.json';\nimport { createClient } from '../index';\nimport { cliToConfig } from './adapter';\n\nconst binName = Object.keys(pkg.bin)[0]!;\n\nconst program = new Command()\n  .name(binName)\n  .description('Generate Python code from OpenAPI specifications')\n  .version(isEnvironment('development') ? '[DEVELOPMENT]' : pkg.version);\n\nprogram\n  .option('-i, --input <path...>', 'OpenAPI specification (path, URL, or string)')\n  .option('-o, --output <path...>', 'Output folder(s)')\n  .option('-c, --client <name>', 'HTTP client to generate')\n  .option('-p, --plugins [names...]', 'Plugins to use')\n  .option('-f, --file <path>', 'Path to config file')\n  .option('-d, --debug', 'Enable debug logging')\n  .option('-s, --silent', 'Suppress all output')\n  .option('-l, --logs <path>', 'Logs folder path')\n  .option('--no-log-file', 'Disable log file output')\n  .option('--dry-run', 'Skip writing files')\n  .option('-w, --watch [interval]', 'Watch for changes')\n  .action(async (options) => {\n    const config = cliToConfig(options);\n\n    const context = await createClient(config as Parameters<typeof createClient>[0]);\n\n    const hasActiveWatch = context[0]?.config.input.some((input) => input.watch?.enabled);\n\n    if (!hasActiveWatch) {\n      process.exit(0);\n    }\n  });\n\nexport async function runCli(): Promise<void> {\n  try {\n    await program.parseAsync(process.argv);\n  } catch (error) {\n    if (error instanceof CommanderError && 'code' in error) {\n      if (error.code === 'commander.optionMissingArgument') {\n        console.error(`\\nMissing required argument. Run '${binName} --help' for usage.\\n`);\n      } else if (error.code === 'commander.unknownOption') {\n        console.error(`\\nUnknown option. Run '${binName} --help' for available options.\\n`);\n      }\n\n      process.exit(error.exitCode);\n    }\n\n    console.error('Unexpected error:', error);\n    process.exit(1);\n  }\n}\n"
  },
  {
    "path": "packages/openapi-python/src/cli/schema.ts",
    "content": "import type { PluginNames } from '@hey-api/shared';\nimport type { MaybeArray } from '@hey-api/types';\n\nimport type { PluginClientNames } from '../plugins/types';\n\nexport interface CliOptions {\n  client?: PluginClientNames;\n  debug?: boolean;\n  dryRun?: boolean;\n  file?: string;\n  input?: MaybeArray<string>;\n  logFile?: boolean;\n  logs?: string;\n  output?: MaybeArray<string>;\n  plugins?: ReadonlyArray<PluginNames>;\n  silent?: boolean;\n  watch?: boolean | string;\n}\n"
  },
  {
    "path": "packages/openapi-python/src/config/expand.ts",
    "content": "import { getInput } from '@hey-api/shared';\nimport colors from 'ansi-colors';\n\nimport type { UserConfig } from './types';\n\nexport interface Job {\n  config: UserConfig;\n  index: number;\n}\n\nexport function expandToJobs(configs: ReadonlyArray<UserConfig>): ReadonlyArray<Job> {\n  const jobs: Array<Job> = [];\n  let jobIndex = 0;\n\n  for (const config of configs) {\n    const inputs = getInput(config);\n    const outputs = config.output instanceof Array ? config.output : [config.output];\n\n    if (outputs.length === 1) {\n      jobs.push({\n        config: {\n          ...config,\n          input: inputs,\n          output: outputs[0]!, // output array with single item\n        },\n        index: jobIndex++,\n      });\n    } else if (outputs.length > 1 && inputs.length !== outputs.length) {\n      // Warn and create job per output (all with same inputs)\n      console.warn(\n        `⚙️ ${colors.yellow('Warning:')} You provided ${colors.cyan(String(inputs.length))} ${colors.cyan(inputs.length === 1 ? 'input' : 'inputs')} and ${colors.yellow(String(outputs.length))} ${colors.yellow('outputs')}. This will produce identical output in multiple locations. You likely want to provide a single output or the same number of outputs as inputs.`,\n      );\n      for (const output of outputs) {\n        jobs.push({\n          config: { ...config, input: inputs, output },\n          index: jobIndex++,\n        });\n      }\n    } else if (outputs.length > 1) {\n      // Pair inputs with outputs by index\n      outputs.forEach((output, index) => {\n        jobs.push({\n          config: { ...config, input: inputs[index]!, output },\n          index: jobIndex++,\n        });\n      });\n    }\n  }\n\n  return jobs;\n}\n"
  },
  {
    "path": "packages/openapi-python/src/config/init.ts",
    "content": "import type { Logger } from '@hey-api/codegen-core';\nimport { loadConfigFile } from '@hey-api/codegen-core';\n\nimport { expandToJobs } from './expand';\n// import { getProjectDependencies } from './packages';\nimport type { ResolvedJob } from './resolve';\nimport { resolveConfig } from './resolve';\nimport type { UserConfig } from './types';\nimport { validateJobs } from './validate';\n\nexport type Configs = {\n  dependencies: Record<string, string>;\n  jobs: ReadonlyArray<ResolvedJob>;\n};\n\n/**\n * @internal\n */\nexport async function resolveJobs({\n  logger,\n  userConfigs,\n}: {\n  logger: Logger;\n  userConfigs: ReadonlyArray<UserConfig>;\n}): Promise<Configs> {\n  const configs: Array<UserConfig> = [];\n  const dependencies: Record<string, string> = {};\n  // let dependencies: Record<string, string> = {};\n\n  const eventLoad = logger.timeEvent('load');\n  for (const userConfig of userConfigs) {\n    let configFile: string | undefined;\n    if (userConfig.configFile) {\n      const parts = userConfig.configFile.split('.');\n      configFile = parts.slice(0, parts.length - 1).join('.');\n    }\n\n    const loaded = await loadConfigFile<UserConfig>({\n      configFile,\n      logger,\n      name: 'openapi-python',\n      userConfig,\n    });\n\n    if (!Object.keys(dependencies).length) {\n      // TODO: handle dependencies for multiple configs properly?\n      // TODO: collect Python dependencies\n      // dependencies = getProjectDependencies(\n      //   loaded.foundConfig ? loaded.configFile : undefined,\n      // );\n    }\n\n    configs.push(...loaded.configs);\n  }\n  eventLoad.timeEnd();\n\n  const eventBuild = logger.timeEvent('build');\n  const jobs = validateJobs(expandToJobs(configs));\n  const resolvedJobs = jobs.map((validated) => resolveConfig(validated, dependencies));\n  eventBuild.timeEnd();\n\n  return {\n    dependencies,\n    jobs: resolvedJobs,\n  };\n}\n"
  },
  {
    "path": "packages/openapi-python/src/config/output/config.ts",
    "content": "import type { PostProcessor } from '@hey-api/shared';\nimport { resolveSource, valueToObject } from '@hey-api/shared';\nimport type { MaybeArray } from '@hey-api/types';\n\nimport { postProcessors } from './postprocess';\nimport type { Output, UserOutput } from './types';\n\nexport function getOutput(userConfig: { output: MaybeArray<string | UserOutput> }): Output {\n  if (userConfig.output instanceof Array) {\n    throw new Error(\n      'Unexpected array of outputs in user configuration. This should have been expanded already.',\n    );\n  }\n\n  const userOutput =\n    typeof userConfig.output === 'string' ? { path: userConfig.output } : (userConfig.output ?? {});\n\n  const output = valueToObject({\n    defaultValue: {\n      clean: true,\n      entryFile: true,\n      fileName: {\n        case: 'preserve',\n        name: '{{name}}',\n        suffix: '_gen',\n      },\n      module: {},\n      path: '',\n      postProcess: [],\n      preferExportAll: false,\n    },\n    mappers: {\n      object: (fields, defaultValue) => ({\n        ...fields,\n        fileName: valueToObject({\n          defaultValue: {\n            ...(defaultValue.fileName as Extract<\n              typeof defaultValue.fileName,\n              Record<string, unknown>\n            >),\n          },\n          mappers: {\n            function: (name) => ({ name }),\n            string: (name) => ({ name }),\n          },\n          value: fields.fileName,\n        }),\n      }),\n    },\n    value: userOutput,\n  }) as Output;\n  if (output.module.extension && !output.module.extension.startsWith('.')) {\n    output.module.extension = `.${output.module.extension}`;\n  }\n  output.postProcess = normalizePostProcess(userOutput.postProcess);\n  output.source = resolveSource(output);\n  return output;\n}\n\nfunction normalizePostProcess(input: UserOutput['postProcess']): ReadonlyArray<PostProcessor> {\n  if (!input) return [];\n\n  return input.map((item) => {\n    if (typeof item === 'string') {\n      const preset = postProcessors[item];\n      if (!preset) {\n        throw new Error(`Unknown post-processor preset: \"${item}\"`);\n      }\n      return preset;\n    }\n    return {\n      name: item.name ?? item.command,\n      ...item,\n    };\n  });\n}\n"
  },
  {
    "path": "packages/openapi-python/src/config/output/postprocess.ts",
    "content": "import type { PostProcessor } from '@hey-api/shared';\n\nexport const postProcessors = {\n  autopep8: {\n    args: ['--in-place', '{{path}}'],\n    command: 'autopep8',\n    name: 'autopep8',\n  },\n  black: {\n    args: ['{{path}}'],\n    command: 'black',\n    name: 'Black',\n  },\n  isort: {\n    args: ['{{path}}'],\n    command: 'isort',\n    name: 'isort',\n  },\n  'ruff:format': {\n    args: ['format', '{{path}}'],\n    command: 'ruff',\n    name: 'Ruff (Format)',\n  },\n  'ruff:lint': {\n    args: ['check', '--fix', '{{path}}'],\n    command: 'ruff',\n    name: 'Ruff (Lint)',\n  },\n  yapf: {\n    args: ['-i', '{{path}}'],\n    command: 'yapf',\n    name: 'YAPF',\n  },\n} as const satisfies Record<string, PostProcessor>;\n\nexport type PostProcessorPreset = keyof typeof postProcessors;\n"
  },
  {
    "path": "packages/openapi-python/src/config/output/types.ts",
    "content": "import type { BaseOutput, BaseUserOutput, UserPostProcessor } from '@hey-api/shared';\n\nimport type { PostProcessorPreset } from './postprocess';\n\nexport type UserOutput = BaseUserOutput<'.py'> & {\n  /**\n   * Post-processing commands to run on the output folder, executed in order.\n   *\n   * Use preset strings for common tools, or provide custom configurations.\n   *\n   * @example ['ruff:lint', 'ruff:format']\n   * @example [{ command: 'flake8', args: ['{{path}}'] }]\n   *\n   * @default []\n   */\n  postProcess?: ReadonlyArray<PostProcessorPreset | UserPostProcessor>;\n  /**\n   * Whether `export * from 'module'` should be used when possible\n   * instead of named exports.\n   *\n   * @default false\n   */\n  preferExportAll?: boolean;\n};\n\nexport type Output = BaseOutput<'.py'> & {\n  /**\n   * Whether `export * from 'module'` should be used when possible\n   * instead of named exports.\n   */\n  preferExportAll: boolean;\n};\n"
  },
  {
    "path": "packages/openapi-python/src/config/plugins.ts",
    "content": "import type { AnyPluginName, PluginContext, PluginNames } from '@hey-api/shared';\nimport { dependencyFactory, valueToObject } from '@hey-api/shared';\n\nimport { defaultPluginConfigs } from '../plugins/config';\nimport type { Config, UserConfig } from './types';\n\n/**\n * Default plugins used to generate artifacts if plugins aren't specified.\n */\nexport const defaultPlugins = ['@hey-api/python-sdk'] as const satisfies ReadonlyArray<PluginNames>;\n\nfunction getPluginsConfig({\n  dependencies,\n  userPlugins,\n  userPluginsConfig,\n}: {\n  dependencies: Record<string, string>;\n  userPlugins: ReadonlyArray<AnyPluginName>;\n  userPluginsConfig: Config['plugins'];\n}): Pick<Config, 'plugins' | 'pluginOrder'> {\n  const circularReferenceTracker = new Set<AnyPluginName>();\n  const pluginOrder = new Set<AnyPluginName>();\n  const plugins: Config['plugins'] = {};\n\n  const dfs = (name: AnyPluginName) => {\n    if (circularReferenceTracker.has(name)) {\n      throw new Error(`Circular reference detected at '${name}'`);\n    }\n\n    if (pluginOrder.has(name)) {\n      return;\n    }\n\n    circularReferenceTracker.add(name);\n\n    const defaultPlugin = defaultPluginConfigs[name as PluginNames];\n    const userPlugin = userPluginsConfig[name as PluginNames];\n\n    if (!defaultPlugin && !userPlugin) {\n      throw new Error(\n        `unknown plugin dependency \"${name}\" - do you need to register a custom plugin with this name?`,\n      );\n    }\n\n    const plugin = {\n      ...defaultPlugin,\n      ...userPlugin,\n      config: {\n        ...defaultPlugin?.config,\n        ...userPlugin?.config,\n      },\n      dependencies: new Set([\n        ...(defaultPlugin?.dependencies || []),\n        ...(userPlugin?.dependencies || []),\n      ]),\n    };\n\n    if (plugin.resolveConfig) {\n      const context: PluginContext = {\n        package: dependencyFactory(dependencies),\n        pluginByTag: (tag, props = {}) => {\n          const { defaultPlugin, errorMessage } = props;\n\n          for (const userPlugin of userPlugins) {\n            const defaultConfig =\n              defaultPluginConfigs[userPlugin as PluginNames] ||\n              userPluginsConfig[userPlugin as PluginNames];\n            if (defaultConfig && defaultConfig.tags?.includes(tag) && userPlugin !== name) {\n              return userPlugin as any;\n            }\n          }\n\n          if (defaultPlugin) {\n            const defaultConfig =\n              defaultPluginConfigs[defaultPlugin as PluginNames] ||\n              userPluginsConfig[defaultPlugin as PluginNames];\n            if (defaultConfig && defaultConfig.tags?.includes(tag) && defaultPlugin !== name) {\n              return defaultPlugin;\n            }\n          }\n\n          throw new Error(errorMessage || `missing plugin - no plugin with tag \"${tag}\" found`);\n        },\n        valueToObject,\n      };\n      // @ts-expect-error\n      plugin.resolveConfig(plugin, context);\n    }\n\n    for (const dependency of plugin.dependencies) {\n      dfs(dependency);\n    }\n\n    circularReferenceTracker.delete(name);\n    pluginOrder.add(name);\n\n    // @ts-expect-error\n    plugins[name] = plugin;\n  };\n\n  for (const name of userPlugins) {\n    dfs(name);\n  }\n\n  return {\n    pluginOrder: Array.from(pluginOrder) as ReadonlyArray<PluginNames>,\n    plugins,\n  };\n}\n\nfunction isPluginClient(plugin: Required<UserConfig>['plugins'][number]): boolean {\n  if (typeof plugin === 'string') {\n    return plugin.startsWith('@hey-api/client');\n  }\n\n  return (\n    plugin.name.startsWith('@hey-api/client') ||\n    // @ts-expect-error\n    (plugin.tags && plugin.tags.includes('client'))\n  );\n}\n\nexport function getPlugins({\n  dependencies,\n  userConfig,\n}: {\n  dependencies: Record<string, string>;\n  userConfig: UserConfig;\n}): Pick<Config, 'plugins' | 'pluginOrder'> {\n  const userPluginsConfig: Config['plugins'] = {};\n\n  let definedPlugins: UserConfig['plugins'] = defaultPlugins;\n\n  if (userConfig.plugins) {\n    userConfig.plugins = userConfig.plugins.filter(\n      (plugin) =>\n        (typeof plugin === 'string' && plugin) || (typeof plugin !== 'string' && plugin.name),\n    );\n    if (userConfig.plugins.length === 1 && isPluginClient(userConfig.plugins[0]!)) {\n      definedPlugins = [...defaultPlugins, ...userConfig.plugins];\n    } else {\n      definedPlugins = userConfig.plugins;\n    }\n  }\n\n  const userPlugins = definedPlugins\n    .map((plugin) => {\n      if (typeof plugin === 'string') {\n        return plugin;\n      }\n\n      const pluginName = plugin.name;\n\n      if (pluginName) {\n        // @ts-expect-error\n        if (plugin.handler) {\n          // @ts-expect-error\n          userPluginsConfig[pluginName] = plugin;\n        } else {\n          // @ts-expect-error\n          userPluginsConfig[pluginName] = {\n            config: { ...plugin },\n          };\n          // @ts-expect-error\n          delete userPluginsConfig[pluginName]!.config.name;\n        }\n      }\n\n      return pluginName;\n    })\n    .filter(Boolean);\n\n  return getPluginsConfig({ dependencies, userPlugins, userPluginsConfig });\n}\n"
  },
  {
    "path": "packages/openapi-python/src/config/resolve.ts",
    "content": "import path from 'node:path';\n\nimport { detectInteractiveSession } from '@hey-api/codegen-core';\nimport { ConfigError, getInput, getLogs, getParser } from '@hey-api/shared';\nimport colors from 'ansi-colors';\n\nimport { getOutput } from './output/config';\nimport { getPlugins } from './plugins';\nimport type { Config } from './types';\nimport type { ValidationResult } from './validate';\n\nexport type ResolvedJob = {\n  config: Config;\n  errors: Array<Error>;\n  index: number;\n};\n\nexport function resolveConfig(\n  validated: ValidationResult,\n  dependencies: Record<string, string>,\n): ResolvedJob {\n  const logs = getLogs(validated.job.config.logs);\n  const input = getInput(validated.job.config);\n  const output = getOutput(validated.job.config);\n  const parser = getParser(validated.job.config);\n\n  output.path = path.resolve(process.cwd(), output.path);\n\n  let plugins: Pick<Config, 'plugins' | 'pluginOrder'>;\n\n  try {\n    plugins = getPlugins({ dependencies, userConfig: validated.job.config });\n  } catch (error) {\n    if (error instanceof ConfigError) {\n      validated.errors.push(error);\n    }\n    plugins = {\n      pluginOrder: [],\n      plugins: {},\n    };\n  }\n\n  const config: Config = {\n    configFile: validated.job.config.configFile ?? '',\n    dryRun: validated.job.config.dryRun ?? false,\n    input,\n    interactive: validated.job.config.interactive ?? detectInteractiveSession(),\n    logs,\n    output,\n    parser,\n    pluginOrder: plugins.pluginOrder,\n    plugins: plugins.plugins,\n  };\n\n  if (logs.level === 'debug') {\n    const jobPrefix = colors.gray(`[Job ${validated.job.index}] `);\n    console.warn(`${jobPrefix}${colors.cyan('config:')}`, config);\n  }\n\n  return {\n    config,\n    errors: validated.errors,\n    index: validated.job.index,\n  };\n}\n"
  },
  {
    "path": "packages/openapi-python/src/config/types.ts",
    "content": "import type {\n  BaseConfig,\n  BaseUserConfig,\n  Plugin,\n  PluginConfigMap,\n  PluginNames,\n} from '@hey-api/shared';\n\nimport type { Output, UserOutput } from './output/types';\n\nexport type UserConfig = BaseUserConfig<UserOutput> & {\n  /**\n   * Plugins generate artifacts from `input`. By default, we generate SDK\n   * functions and TypeScript interfaces. If you manually define `plugins`,\n   * you need to include the default plugins if you wish to use them.\n   *\n   * @default ['@hey-api/python-sdk']\n   */\n  plugins?: ReadonlyArray<\n    | PluginNames\n    | {\n        [K in PluginNames]: PluginConfigMap[K]['config'] & {\n          name: K;\n        };\n      }[PluginNames]\n  >;\n};\n\nexport type Config = BaseConfig<UserConfig, Output> & {\n  pluginOrder: ReadonlyArray<keyof PluginConfigMap>;\n  plugins: {\n    [K in PluginNames]?: Plugin.Config<PluginConfigMap[K]>;\n  };\n};\n"
  },
  {
    "path": "packages/openapi-python/src/config/utils.ts",
    "content": "import type { Context, PluginInstance } from '@hey-api/shared';\n\nimport type { Config } from './types';\n\nexport function getTypedConfig(\n  plugin: Pick<PluginInstance, 'context'> | Pick<Context, 'config'>,\n): Config {\n  if ('context' in plugin) {\n    return plugin.context.config as Config;\n  }\n  return plugin.config as Config;\n}\n"
  },
  {
    "path": "packages/openapi-python/src/config/validate.ts",
    "content": "import { ConfigError, getInput } from '@hey-api/shared';\n\nimport type { Job } from './expand';\nimport { getOutput } from './output/config';\n\nexport type ValidationResult = {\n  errors: Array<ConfigError>;\n  job: Job;\n};\n\nexport function validateJobs(jobs: ReadonlyArray<Job>): ReadonlyArray<ValidationResult> {\n  return jobs.map((job) => {\n    const errors: Array<ConfigError> = [];\n    const { config } = job;\n\n    const inputs = getInput(config);\n    if (!inputs.length) {\n      errors.push(\n        new ConfigError(\n          'missing input - which OpenAPI specification should we use to generate your output?',\n        ),\n      );\n    }\n\n    const output = getOutput(config);\n    if (!output.path) {\n      errors.push(new ConfigError('missing output - where should we generate your output?'));\n    }\n\n    return { errors, job };\n  });\n}\n"
  },
  {
    "path": "packages/openapi-python/src/createClient.ts",
    "content": "import path from 'node:path';\n\nimport { type Logger, Project } from '@hey-api/codegen-core';\nimport { $RefParser } from '@hey-api/json-schema-ref-parser';\nimport {\n  applyNaming,\n  buildGraph,\n  compileInputPath,\n  Context,\n  getSpec,\n  type Input,\n  logInputPaths,\n  type OpenApi,\n  parseOpenApiSpec,\n  patchOpenApiSpec,\n  postprocessOutput,\n  type WatchValues,\n} from '@hey-api/shared';\nimport colors from 'ansi-colors';\n\nimport { postProcessors } from './config/output/postprocess';\nimport type { Config } from './config/types';\nimport { generateOutput } from './generate/output';\nimport { PythonRenderer } from './py-dsl';\n\nexport async function createClient({\n  config,\n  dependencies,\n  jobIndex,\n  logger,\n  watches: _watches,\n}: {\n  config: Config;\n  dependencies: Record<string, string>;\n  jobIndex: number;\n  logger: Logger;\n  /**\n   * Always undefined on the first run, defined on subsequent runs.\n   */\n  watches?: ReadonlyArray<WatchValues>;\n}): Promise<Context | undefined> {\n  const watches: ReadonlyArray<WatchValues> =\n    _watches ||\n    Array.from({ length: config.input.length }, () => ({\n      headers: new Headers(),\n    }));\n\n  const inputPaths = config.input.map((input) => compileInputPath(input));\n\n  // on first run, print the message as soon as possible\n  if (config.logs.level !== 'silent' && !_watches) {\n    logInputPaths(inputPaths, jobIndex);\n  }\n\n  const getSpecData = async (input: Input, index: number) => {\n    const eventSpec = logger.timeEvent('spec');\n    const { arrayBuffer, error, resolvedInput, response } = await getSpec({\n      fetchOptions: input.fetch,\n      inputPath: inputPaths[index]!.path,\n      timeout: input.watch.timeout,\n      watch: watches[index]!,\n    });\n    eventSpec.timeEnd();\n\n    // throw on first run if there's an error to preserve user experience\n    // if in watch mode, subsequent errors won't throw to gracefully handle\n    // cases where server might be reloading\n    if (error && !_watches) {\n      const text = await response.text().catch(() => '');\n      throw new Error(\n        `Request failed with status ${response.status}: ${text || response.statusText}`,\n      );\n    }\n\n    return { arrayBuffer, resolvedInput };\n  };\n  const specData = (\n    await Promise.all(config.input.map((input, index) => getSpecData(input, index)))\n  ).filter((data) => data.arrayBuffer || data.resolvedInput);\n\n  let context: Context | undefined;\n\n  if (specData.length) {\n    const refParser = new $RefParser();\n    const data =\n      specData.length > 1\n        ? await refParser.bundleMany({\n            arrayBuffer: specData.map((data) => data.arrayBuffer!),\n            pathOrUrlOrSchemas: [],\n            resolvedInputs: specData.map((data) => data.resolvedInput!),\n          })\n        : await refParser.bundle({\n            arrayBuffer: specData[0]!.arrayBuffer,\n            pathOrUrlOrSchema: undefined,\n            resolvedInput: specData[0]!.resolvedInput!,\n          });\n\n    // on subsequent runs in watch mode, print the message only if we know we're\n    // generating the output\n    if (config.logs.level !== 'silent' && _watches) {\n      console.clear();\n      logInputPaths(inputPaths, jobIndex);\n    }\n\n    const eventInputPatch = logger.timeEvent('input.patch');\n    await patchOpenApiSpec({ patchOptions: config.parser.patch, spec: data });\n    eventInputPatch.timeEnd();\n\n    const eventParser = logger.timeEvent('parser');\n    const header = config.output.header;\n    // TODO: allow overriding via config\n    const project = new Project({\n      defaultFileName: '__init__',\n      fileName: (base) => {\n        const name = applyNaming(base, config.output.fileName);\n        const { suffix } = config.output.fileName;\n        if (!suffix) {\n          return name;\n        }\n        return name === '__init__' || name.endsWith(suffix) ? name : `${name}${suffix}`;\n      },\n      nameConflictResolvers: config.output.nameConflictResolver\n        ? {\n            python: config.output.nameConflictResolver,\n          }\n        : undefined,\n      renderers: [\n        new PythonRenderer({\n          header: (ctx) => {\n            const defaultValue = ['# This file is auto-generated by @hey-api/openapi-python'];\n            const result = typeof header === 'function' ? header({ ...ctx, defaultValue }) : header;\n            return result === undefined ? defaultValue : result;\n          },\n          module: config.output.module,\n          preferExportAll: config.output.preferExportAll,\n        }),\n      ],\n      root: config.output.path,\n    });\n    context = new Context<OpenApi.V2_0_X | OpenApi.V3_0_X | OpenApi.V3_1_X, Config>({\n      config,\n      dependencies,\n      logger,\n      project,\n      spec: data as OpenApi.V2_0_X | OpenApi.V3_0_X | OpenApi.V3_1_X,\n    });\n    parseOpenApiSpec(context);\n    context.graph = buildGraph(context.ir, logger).graph;\n    eventParser.timeEnd();\n\n    const eventGenerator = logger.timeEvent('generator');\n    await generateOutput(context);\n    eventGenerator.timeEnd();\n\n    const eventPostprocess = logger.timeEvent('postprocess');\n    if (!config.dryRun) {\n      const jobPrefix = colors.gray(`[Job ${jobIndex + 1}] `);\n      postprocessOutput(config.output, postProcessors, jobPrefix);\n\n      if (config.logs.level !== 'silent') {\n        const outputPath = process.env.INIT_CWD\n          ? `./${path.relative(process.env.INIT_CWD, config.output.path)}`\n          : config.output.path;\n        console.log(\n          `${jobPrefix}${colors.green('✅ Done!')} Your output is in ${colors.cyanBright(outputPath)}`,\n        );\n      }\n    }\n    eventPostprocess.timeEnd();\n  }\n\n  const watchedInput = config.input.find(\n    (input, index) => input.watch.enabled && typeof inputPaths[index]!.path === 'string',\n  );\n\n  if (watchedInput) {\n    setTimeout(() => {\n      createClient({\n        config,\n        dependencies,\n        jobIndex,\n        logger,\n        watches,\n      });\n    }, watchedInput.watch.interval);\n  }\n\n  return context;\n}\n"
  },
  {
    "path": "packages/openapi-python/src/generate/client.ts",
    "content": "import fs from 'node:fs';\nimport path from 'node:path';\nimport { fileURLToPath } from 'node:url';\n\nimport type { IProject } from '@hey-api/codegen-core';\nimport type { DefinePlugin, OutputHeader } from '@hey-api/shared';\nimport { ensureDirSync, isEnvironment, outputHeaderToPrefix } from '@hey-api/shared';\n\nimport type { Config } from '../config/types';\nimport type { Client } from '../plugins/@hey-api/client-core/types';\nimport { getClientPlugin } from '../plugins/@hey-api/client-core/utils';\n\nconst __filename = fileURLToPath(import.meta.url);\nconst __dirname = path.dirname(__filename);\n\n/**\n * Returns paths to client bundle files based on execution context\n */\nfunction getClientBundlePaths(pluginName: string): {\n  clientPath: string;\n  corePath: string;\n} {\n  const clientName = pluginName.slice('@hey-api/client-'.length);\n\n  if (isEnvironment('development')) {\n    // Dev: source bundle folders at src/plugins/@hey-api/{client}/bundle\n    const pluginsDir = path.resolve(__dirname, '..', 'plugins', '@hey-api');\n    return {\n      clientPath: path.resolve(pluginsDir, `client-${clientName}`, 'bundle'),\n      corePath: path.resolve(pluginsDir, 'client-core', 'bundle'),\n    };\n  }\n\n  // Prod: copied to dist/clients/{clientName}\n  return {\n    clientPath: path.resolve(__dirname, 'clients', clientName),\n    corePath: path.resolve(__dirname, 'clients', 'core'),\n  };\n}\n\n/**\n * Returns absolute path to the client folder. This is hard-coded for now.\n */\nexport function clientFolderAbsolutePath(config: Config): string {\n  const client = getClientPlugin(config);\n\n  if ('bundle' in client.config && client.config.bundle) {\n    // not proud of this one\n    const renamed: Map<string, string> | undefined =\n      // @ts-expect-error\n      config._FRAGILE_CLIENT_BUNDLE_RENAMED;\n    return path.resolve(config.output.path, 'client', `${renamed?.get('index') ?? 'index'}.py`);\n  }\n\n  return client.name;\n}\n\n/**\n * Recursively copies files and directories.\n * This is a PnP-compatible alternative to fs.cpSync that works with Yarn PnP's\n * virtualized filesystem.\n */\nfunction copyRecursivePnP(src: string, dest: string): void {\n  const stat = fs.statSync(src);\n\n  if (stat.isDirectory()) {\n    if (!fs.existsSync(dest)) {\n      fs.mkdirSync(dest, { recursive: true });\n    }\n\n    const files = fs.readdirSync(src);\n    for (const file of files) {\n      copyRecursivePnP(path.join(src, file), path.join(dest, file));\n    }\n  } else {\n    const content = fs.readFileSync(src);\n    fs.writeFileSync(dest, content);\n  }\n}\n\nfunction renameFile({\n  filePath,\n  project,\n  renamed,\n}: {\n  filePath: string;\n  project: IProject;\n  renamed: Map<string, string>;\n}): void {\n  const extension = path.extname(filePath);\n  const name = path.basename(filePath, extension);\n  const renamedName = project.fileName?.(name) || name;\n  if (renamedName !== name) {\n    const outputPath = path.dirname(filePath);\n    fs.renameSync(filePath, path.resolve(outputPath, `${renamedName}${extension}`));\n    renamed.set(name, renamedName);\n  }\n}\n\nfunction replaceImports({\n  filePath,\n  header,\n  renamed,\n}: {\n  filePath: string;\n  header?: string;\n  renamed: Map<string, string>;\n}): void {\n  let content = fs.readFileSync(filePath, 'utf8');\n\n  // Dev mode: rewrite source bundle imports to match output structure\n  if (isEnvironment('development')) {\n    // ...client_core.bundle.foo -> ..core.foo\n    content = content.replace(\n      /from\\s+(\\.{3,})\\.?client_core\\.bundle\\./g,\n      (match, dots) => `from ${dots === '...' ? '..' : dots.slice(0, -1)}core.`,\n    );\n    // ...client_core.bundle (index import) -> ..core\n    content = content.replace(\n      /from\\s+(\\.{3,})\\.?client_core\\.bundle['\"]?/g,\n      (match, dots) => `from ${dots === '...' ? '..' : dots.slice(0, -1)}core`,\n    );\n  }\n\n  content = content.replace(/from\\s+(.+?)\\s+import/g, (match, importPath) => {\n    const cleanPath = importPath.replace(/^['\"]|['\"]$/g, '');\n    if (!cleanPath.startsWith('.')) return match;\n    const leadingDots = cleanPath.match(/^\\.+/)?.[0] || '';\n    const moduleName = cleanPath.replace(/^\\.+/, '');\n    if (!moduleName) return match;\n    const replacedName = renamed.get(moduleName) ?? moduleName;\n    return `from ${leadingDots}${replacedName} import`;\n  });\n\n  const fileHeader = header ?? '';\n\n  content = `${fileHeader}${content}`;\n\n  fs.writeFileSync(filePath, content, 'utf8');\n}\n\n/**\n * Creates a `client` folder containing the same modules as the client package.\n */\nexport function generateClientBundle({\n  header,\n  outputPath,\n  plugin,\n  project,\n}: {\n  header?: OutputHeader;\n  outputPath: string;\n  plugin: DefinePlugin<Client.Config & { name: string }>['Config'];\n  project: IProject;\n}): Map<string, string> | undefined {\n  const renamed = new Map<string, string>();\n  const headerPrefix = outputHeaderToPrefix({\n    defaultValue: ['# This file is auto-generated by @hey-api/openapi-python'],\n    header,\n    project,\n  });\n\n  // copy Hey API clients to output\n  const isHeyApiClientPlugin = plugin.name.startsWith('@hey-api/client-');\n  if (isHeyApiClientPlugin) {\n    const { clientPath } = getClientBundlePaths(plugin.name);\n    // const { clientPath, corePath } = getClientBundlePaths(plugin.name);\n\n    // copy client core\n    // const coreOutputPath = path.resolve(outputPath, 'core');\n    // ensureDirSync(coreOutputPath);\n    // copyRecursivePnP(corePath, coreOutputPath);\n\n    // copy client bundle\n    const clientOutputPath = path.resolve(outputPath, 'client');\n    ensureDirSync(clientOutputPath);\n    copyRecursivePnP(clientPath, clientOutputPath);\n\n    if (project) {\n      // const copiedCoreFiles = fs.readdirSync(coreOutputPath);\n      // for (const file of copiedCoreFiles) {\n      //   renameFile({\n      //     filePath: path.resolve(coreOutputPath, file),\n      //     project,\n      //     renamed,\n      //   });\n      // }\n\n      const copiedClientFiles = fs.readdirSync(clientOutputPath);\n      for (const file of copiedClientFiles) {\n        renameFile({\n          filePath: path.resolve(clientOutputPath, file),\n          project,\n          renamed,\n        });\n      }\n    }\n\n    // const coreFiles = fs.readdirSync(coreOutputPath);\n    // for (const file of coreFiles) {\n    //   replaceImports({\n    //     filePath: path.resolve(coreOutputPath, file),\n    //     renamed,\n    //   });\n    // }\n\n    const clientFiles = fs.readdirSync(clientOutputPath);\n    for (const file of clientFiles) {\n      replaceImports({\n        filePath: path.resolve(clientOutputPath, file),\n        header: headerPrefix,\n        renamed,\n      });\n    }\n    return renamed;\n  }\n\n  const clientSrcPath = path.isAbsolute(plugin.name) ? path.dirname(plugin.name) : undefined;\n\n  // copy custom local client to output\n  if (clientSrcPath) {\n    const dirPath = path.resolve(outputPath, 'client');\n    ensureDirSync(dirPath);\n    copyRecursivePnP(clientSrcPath, dirPath);\n    return;\n  }\n\n  // copy third-party client to output\n  const clientModulePath = path.normalize(require.resolve(plugin.name));\n  const clientModulePathComponents = clientModulePath.split(path.sep);\n  const clientDistPath = clientModulePathComponents\n    .slice(0, clientModulePathComponents.indexOf('dist') + 1)\n    .join(path.sep);\n\n  const indexJsFile = clientModulePathComponents[clientModulePathComponents.length - 1];\n  const distFiles = [indexJsFile!, 'index.d.mts', 'index.d.cts'];\n  const dirPath = path.resolve(outputPath, 'client');\n  ensureDirSync(dirPath);\n  for (const file of distFiles) {\n    fs.copyFileSync(path.resolve(clientDistPath, file), path.resolve(dirPath, file));\n  }\n\n  return;\n}\n"
  },
  {
    "path": "packages/openapi-python/src/generate/output.ts",
    "content": "import fs from 'node:fs';\nimport path from 'node:path';\n\nimport type { Context } from '@hey-api/shared';\nimport { IntentContext } from '@hey-api/shared';\n\nimport { getTypedConfig } from '../config/utils';\nimport { getClientPlugin } from '../plugins/@hey-api/client-core/utils';\nimport { generateClientBundle } from './client';\n\nexport async function generateOutput(context: Context): Promise<void> {\n  const outputPath = path.resolve(context.config.output.path);\n\n  if (context.config.output.clean) {\n    if (fs.existsSync(outputPath)) {\n      fs.rmSync(outputPath, { force: true, recursive: true });\n    }\n  }\n\n  const config = getTypedConfig(context);\n\n  const client = getClientPlugin(config);\n  if ('bundle' in client.config && client.config.bundle && !config.dryRun) {\n    // not proud of this one\n    // @ts-expect-error\n    config._FRAGILE_CLIENT_BUNDLE_RENAMED = generateClientBundle({\n      header: config.output.header,\n      outputPath,\n      // @ts-expect-error\n      plugin: client,\n      project: context.gen,\n    });\n  }\n\n  for (const plugin of context.registerPlugins()) {\n    await plugin.run();\n  }\n\n  context.gen.plan();\n\n  const ctx = new IntentContext(context.spec);\n  for (const intent of context.intents) {\n    await intent.run(ctx);\n  }\n\n  for (const file of context.gen.render()) {\n    const filePath = path.resolve(outputPath, file.path);\n    const dir = path.dirname(filePath);\n    if (!context.config.dryRun) {\n      fs.mkdirSync(dir, { recursive: true });\n      fs.writeFileSync(filePath, file.content, { encoding: 'utf8' });\n    }\n  }\n\n  const { source } = context.config.output;\n  if (source.enabled) {\n    const sourcePath = source.path === null ? undefined : path.resolve(outputPath, source.path);\n    if (!context.config.dryRun && sourcePath && sourcePath !== outputPath) {\n      fs.mkdirSync(sourcePath, { recursive: true });\n    }\n    const serialized = await source.serialize(context.spec);\n    // TODO: handle yaml (convert before writing)\n    if (!context.config.dryRun && sourcePath) {\n      fs.writeFileSync(\n        path.resolve(sourcePath, `${source.fileName}.${source.extension}`),\n        serialized,\n        { encoding: 'utf8' },\n      );\n    }\n    if (source.callback) {\n      await source.callback(serialized);\n    }\n  }\n}\n"
  },
  {
    "path": "packages/openapi-python/src/generate.ts",
    "content": "import path from 'node:path';\nimport { fileURLToPath } from 'node:url';\n\nimport { Logger } from '@hey-api/codegen-core';\nimport type { Context } from '@hey-api/shared';\nimport {\n  checkNodeVersion,\n  ConfigValidationError,\n  getLogs,\n  JobError,\n  logCrashReport,\n  openGitHubIssueWithCrashReport,\n  printCliIntro,\n  printCrashReport,\n  shouldReportCrash,\n} from '@hey-api/shared';\nimport type { LazyOrAsync, MaybeArray } from '@hey-api/types';\n\nimport type { Configs } from './config/init';\nimport { resolveJobs } from './config/init';\nimport type { UserConfig } from './config/types';\nimport { createClient as pCreateClient } from './createClient';\n\nconst __filename = fileURLToPath(import.meta.url);\nconst __dirname = path.dirname(__filename);\n\n/**\n * Generate a client from the provided configuration.\n *\n * @param userConfig User provided {@link UserConfig} configuration(s).\n */\nexport async function createClient(\n  userConfig?: LazyOrAsync<MaybeArray<UserConfig>>,\n  logger = new Logger(),\n): Promise<ReadonlyArray<Context>> {\n  const resolvedConfig = typeof userConfig === 'function' ? await userConfig() : userConfig;\n  const userConfigs = resolvedConfig\n    ? resolvedConfig instanceof Array\n      ? resolvedConfig\n      : [resolvedConfig]\n    : [];\n\n  let rawLogs = userConfigs.find((config) => getLogs(config.logs).level !== 'silent')?.logs;\n  if (typeof rawLogs === 'string') {\n    rawLogs = getLogs(rawLogs);\n  }\n\n  let jobs: Configs['jobs'] = [];\n\n  try {\n    checkNodeVersion();\n\n    const eventCreateClient = logger.timeEvent('createClient');\n\n    const eventConfig = logger.timeEvent('config');\n    const resolved = await resolveJobs({ logger, userConfigs });\n    const dependencies = resolved.dependencies;\n    jobs = resolved.jobs;\n    const printIntro = jobs.some((job) => job.config.logs.level !== 'silent');\n    if (printIntro) printCliIntro(__dirname);\n    eventConfig.timeEnd();\n\n    const configErrors = jobs.flatMap((job) =>\n      job.errors.map((error) => ({ error, jobIndex: job.index })),\n    );\n    if (configErrors.length > 0) {\n      throw new ConfigValidationError(configErrors);\n    }\n\n    const outputs = await Promise.all(\n      jobs.map(async (job) => {\n        try {\n          return await pCreateClient({\n            config: job.config,\n            dependencies,\n            jobIndex: job.index,\n            logger,\n          });\n        } catch (error) {\n          if (error instanceof Error) {\n            throw new JobError('', {\n              error,\n              jobIndex: job.index,\n            });\n          }\n        }\n      }),\n    );\n    const contexts = outputs.filter((ctx): ctx is Context => ctx !== undefined);\n\n    eventCreateClient.timeEnd();\n\n    logger.report(jobs.some((job) => job.config.logs.level === 'debug'));\n\n    return contexts;\n  } catch (error) {\n    const logs =\n      jobs.find((job) => job.config.logs.level !== 'silent')?.config.logs ??\n      jobs[0]?.config.logs ??\n      rawLogs;\n    const dryRun =\n      jobs.some((job) => job.config.dryRun) ?? userConfigs.some((config) => config.dryRun) ?? false;\n    const logPath = logs?.file && !dryRun ? logCrashReport(error, logs.path ?? '') : undefined;\n    if (!logs || logs.level !== 'silent') {\n      printCrashReport({ error, logPath });\n      const isInteractive =\n        jobs.some((job) => job.config.interactive) ??\n        userConfigs.some((config) => config.interactive) ??\n        false;\n      if (await shouldReportCrash({ error, isInteractive })) {\n        await openGitHubIssueWithCrashReport(error, __dirname);\n      }\n    }\n\n    throw error;\n  }\n}\n"
  },
  {
    "path": "packages/openapi-python/src/index.ts",
    "content": "/* eslint-disable @typescript-eslint/no-namespace */\n// OVERRIDES\n// hard-coded here because build process doesn't pick up overrides from separate files\nimport '@hey-api/codegen-core';\nimport '@hey-api/shared';\n\ndeclare module '@hey-api/codegen-core' {\n  interface ProjectRenderMeta {\n    /**\n     * If specified, this will be the file extension used when importing\n     * other modules. By default, we don't add a file extension and let the\n     * runtime resolve it.\n     *\n     * @default null\n     */\n    importFileExtension?: AnyString | null;\n  }\n\n  interface SymbolMeta {\n    category?:\n      | 'client'\n      | 'external'\n      | 'hook'\n      | 'schema'\n      | 'sdk'\n      | 'transform'\n      | 'type'\n      | 'utility'\n      | AnyString;\n    /**\n     * Path to the resource this symbol represents.\n     */\n    path?: ReadonlyArray<string | number>;\n    /**\n     * Name of the plugin that registered this symbol.\n     */\n    pluginName?: string;\n    resource?: 'client' | 'definition' | 'operation' | 'webhook' | AnyString;\n    resourceId?: string;\n    role?: 'data' | 'error' | 'errors' | 'options' | 'response' | 'responses' | AnyString;\n    /**\n     * Tags associated with this symbol.\n     */\n    tags?: ReadonlyArray<string>;\n    tool?: 'pydantic' | 'sdk' | AnyString;\n    variant?: 'container' | AnyString;\n  }\n}\n\ndeclare module '@hey-api/shared' {\n  interface PluginConfigMap {\n    '@hey-api/client-httpx': Plugins.HeyApiClientHttpx.Types['Types'];\n    '@hey-api/python-sdk': Plugins.HeyApiSdk.Types['Types'];\n    pydantic: Plugins.Pydantic.Types['Types'];\n  }\n}\n// END OVERRIDES\n\nimport type { AnyString, LazyOrAsync, MaybeArray } from '@hey-api/types';\nimport colors from 'ansi-colors';\n// @ts-expect-error\nimport colorSupport from 'color-support';\n\nimport type { UserConfig } from './config/types';\nimport type { HeyApiClientHttpxPlugin } from './plugins/@hey-api/client-httpx';\nimport type { HeyApiSdkPlugin } from './plugins/@hey-api/sdk';\nimport type { PydanticPlugin, PydanticResolvers } from './plugins/pydantic';\n\ncolors.enabled = colorSupport().hasBasic;\n\nexport { createClient } from './generate';\n\n/**\n * Type helper for configuration object, returns {@link MaybeArray<UserConfig>} object(s)\n */\nexport function defineConfig(\n  config: LazyOrAsync<ReadonlyArray<UserConfig>>,\n): Promise<ReadonlyArray<UserConfig>>;\nexport function defineConfig(config: LazyOrAsync<UserConfig>): Promise<UserConfig>;\nexport async function defineConfig<T extends MaybeArray<UserConfig>>(\n  config: LazyOrAsync<T>,\n): Promise<T> {\n  return typeof config === 'function' ? await config() : config;\n}\n\nexport { defaultPlugins } from './config/plugins';\nexport type { UserConfig } from './config/types';\nexport { Logger } from '@hey-api/codegen-core';\nexport type {\n  DefinePlugin,\n  IR,\n  OpenApi,\n  OpenApiMetaObject,\n  OpenApiOperationObject,\n  OpenApiParameterObject,\n  OpenApiRequestBodyObject,\n  OpenApiResponseObject,\n  OpenApiSchemaObject,\n  Plugin,\n} from '@hey-api/shared';\nexport {\n  defaultPaginationKeywords,\n  definePluginConfig,\n  OperationPath,\n  OperationStrategy,\n  utils,\n} from '@hey-api/shared';\n\nexport namespace Plugins {\n  export namespace HeyApiClientHttpx {\n    export type Types = HeyApiClientHttpxPlugin;\n  }\n\n  export namespace HeyApiSdk {\n    export type Types = HeyApiSdkPlugin;\n  }\n\n  export namespace Pydantic {\n    export type Resolvers = Required<PydanticResolvers>['~resolvers'];\n    export type Types = PydanticPlugin;\n  }\n}\n"
  },
  {
    "path": "packages/openapi-python/src/plugins/@hey-api/client-core/config.ts",
    "content": "export const clientDefaultConfig = {\n  baseUrl: true,\n  bundle: true,\n  includeInEntry: false,\n} as const;\n\nexport const clientDefaultMeta = {\n  tags: ['client'],\n} as const;\n"
  },
  {
    "path": "packages/openapi-python/src/plugins/@hey-api/client-core/types.ts",
    "content": "/* eslint-disable @typescript-eslint/no-namespace */\nimport type { Plugin } from '@hey-api/shared';\n\nimport type { HeyApiClientHttpxPlugin } from '../../../plugins/@hey-api/client-httpx';\n\nexport interface PluginHandler {\n  (...args: Parameters<HeyApiClientHttpxPlugin['Handler']>): void;\n}\n\n/**\n * Public Client API.\n */\nexport namespace Client {\n  export type Config = Plugin.Hooks &\n    Plugin.UserExports & {\n      /**\n       * Set a default base URL when creating the client? You can set `baseUrl`\n       * to a string which will be used as the base URL. If your input defines\n       * server(s), you can set `baseUrl` to a number to pick a specific server\n       * to use as the base URL. You can disable setting the base URL by setting\n       * `baseUrl` to `false`. By default, `baseUrl` is `true` and it will try to\n       * use the first defined server value. If there's none, we won't set a\n       * base URL.\n       *\n       * If the matched URL contains template literals, it will be ignored.\n       *\n       * @default true\n       */\n      baseUrl?: string | number | boolean;\n      /**\n       * Bundle the client module? When `true`, the client module will be copied\n       * from the client plugin and bundled with the generated output.\n       *\n       * @default true\n       */\n      bundle?: boolean;\n      /**\n       * Relative path to the runtime configuration file. This file must export\n       * a `createClientConfig()` function. The `createClientConfig()` function\n       * will be called on client initialization and the returned object will\n       * 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       */\n      runtimeConfigPath?: string;\n      /**\n       * Should the type helper for base URL allow only values matching the\n       * server(s) defined in the input? By default, `strictBaseUrl` is `false`\n       * which will provide type hints and allow you to pass any string.\n       *\n       * Note that setting `strictBaseUrl` to `true` can produce an invalid\n       * build if you specify `baseUrl` which doesn't conform to the type helper.\n       *\n       * @default false\n       */\n      strictBaseUrl?: boolean;\n    };\n}\n"
  },
  {
    "path": "packages/openapi-python/src/plugins/@hey-api/client-core/utils.ts",
    "content": "import type { Config } from '../../../config/types';\nimport type { PluginClientNames } from '../../types';\n\nexport function getClientPlugin(\n  config: Config,\n): Config['plugins'][PluginClientNames] & { name: PluginClientNames } {\n  for (const name of config.pluginOrder) {\n    const plugin = config.plugins[name];\n    if (plugin?.tags?.includes('client')) {\n      return plugin as Config['plugins'][PluginClientNames] & {\n        name: PluginClientNames;\n      };\n    }\n  }\n\n  return {\n    config: {\n      // @ts-expect-error\n      name: '',\n    },\n    // @ts-expect-error\n    name: '',\n  };\n}\n"
  },
  {
    "path": "packages/openapi-python/src/plugins/@hey-api/client-httpx/bundle/__init__.py",
    "content": "from .client import Client, build_client_params, create_client\n\n__all__ = [\"Client\", \"build_client_params\", \"create_client\"]\n"
  },
  {
    "path": "packages/openapi-python/src/plugins/@hey-api/client-httpx/bundle/client.py",
    "content": "from typing import Any, Optional\nimport httpx\n\n\nEXTRA_PREFIXES_MAP = {\n    \"$body_\": \"json\",\n    \"$headers_\": \"headers\",\n    \"$path_\": \"path\",\n    \"$query_\": \"params\",\n}\n\n\ndef build_client_params(fields: list[dict[str, Any]], **kwargs) -> dict[str, Any]:\n    \"\"\"Build client parameters from flat keyword arguments.\n\n    Args:\n        fields: List of field configurations with 'in', 'key', and optional 'map'.\n        **kwargs: Flat parameters passed to the SDK method.\n\n    Returns:\n        Dict suitable for httpx client methods: {params: {...}, headers: {...}, json: Any}\n    \"\"\"\n    result: dict[str, Any] = {}\n\n    key_map = {}\n    for field in fields:\n        key = field.get(\"key\")\n        if key:\n            key_map[key] = {\n                \"in\": field.get(\"in\"),\n                \"map\": field.get(\"map\", key),\n            }\n\n    for key, value in kwargs.items():\n        if value is None:\n            continue\n\n        field = key_map.get(key)\n\n        if field:\n            in_slot = field[\"in\"]\n            map_key = field[\"map\"]\n            slot = \"json\" if in_slot == \"body\" else in_slot\n\n            if in_slot == \"body\":\n                result[slot] = value\n            else:\n                if slot not in result:\n                    result[slot] = {}\n                result[slot][map_key] = value\n        else:\n            for prefix, slot in EXTRA_PREFIXES_MAP.items():\n                if key.startswith(prefix):\n                    actual_key = key[len(prefix) :]\n                    if slot not in result:\n                        result[slot] = {}\n                    result[slot][actual_key] = value\n                    break\n            else:\n                if \"params\" not in result:\n                    result[\"params\"] = {}\n                result[\"params\"][key] = value\n\n    for slot in list(result.keys()):\n        if not result[slot]:\n            del result[slot]\n\n    return result\n\n\nclass BaseClient:\n    \"\"\"Base HTTP client using httpx that SDK classes extend.\"\"\"\n\n    def __init__(self, client: Optional[httpx.Client] = None, base_url: Optional[str] = None, **kwargs):\n        if client is not None:\n            self._client = client\n        else:\n            self._client = httpx.Client(base_url=base_url or \"\", **kwargs)\n\n    @property\n    def client(self) -> httpx.Client:\n        \"\"\"Get the httpx client instance.\"\"\"\n        return self._client\n\n    def request(self, method: str, url: str, **kwargs) -> httpx.Response:\n        \"\"\"Make an HTTP request.\"\"\"\n        return self._client.request(method, url, **kwargs)\n\n    def get(self, url: str, **kwargs) -> httpx.Response:\n        \"\"\"Make a GET request.\"\"\"\n        return self._client.get(url, **kwargs)\n\n    def post(self, url: str, **kwargs) -> httpx.Response:\n        \"\"\"Make a POST request.\"\"\"\n        return self._client.post(url, **kwargs)\n\n    def put(self, url: str, **kwargs) -> httpx.Response:\n        \"\"\"Make a PUT request.\"\"\"\n        return self._client.put(url, **kwargs)\n\n    def patch(self, url: str, **kwargs) -> httpx.Response:\n        \"\"\"Make a PATCH request.\"\"\"\n        return self._client.patch(url, **kwargs)\n\n    def delete(self, url: str, **kwargs) -> httpx.Response:\n        \"\"\"Make a DELETE request.\"\"\"\n        return self._client.delete(url, **kwargs)\n\n    def close(self):\n        \"\"\"Close the client.\"\"\"\n        self._client.close()\n\n    def __enter__(self):\n        return self\n\n    def __exit__(self, *args):\n        self.close()\n\n\nclass Client(BaseClient):\n    \"\"\"HTTP client using httpx (alias for BaseClient).\"\"\"\n\n    pass\n\n\ndef create_client(base_url: Optional[str] = None, **kwargs) -> Client:\n    \"\"\"Create a new HTTP client instance.\"\"\"\n    return Client(base_url=base_url, **kwargs)\n"
  },
  {
    "path": "packages/openapi-python/src/plugins/@hey-api/client-httpx/config.ts",
    "content": "import { definePluginConfig } from '@hey-api/shared';\n\nimport { clientDefaultConfig, clientDefaultMeta } from '../client-core/config';\nimport type { HeyApiClientHttpxPlugin } from './types';\n\nexport const defaultConfig: HeyApiClientHttpxPlugin['Config'] = {\n  ...clientDefaultMeta,\n  config: clientDefaultConfig,\n  handler() {\n    // TODO: handler\n  },\n  name: '@hey-api/client-httpx',\n};\n\n/**\n * Type helper for `@hey-api/client-httpx` plugin, returns {@link Plugin.Config} object\n */\nexport const defineConfig = definePluginConfig(defaultConfig);\n"
  },
  {
    "path": "packages/openapi-python/src/plugins/@hey-api/client-httpx/index.ts",
    "content": "export { defaultConfig, defineConfig } from './config';\nexport type { HeyApiClientHttpxPlugin } from './types';\n"
  },
  {
    "path": "packages/openapi-python/src/plugins/@hey-api/client-httpx/types.ts",
    "content": "import type { DefinePlugin, Plugin } from '@hey-api/shared';\n\nexport type UserConfig = Plugin.Name<'@hey-api/client-httpx'> & {\n  /**\n   * Set a default base URL when creating the client? You can set `baseUrl`\n   * to a string which will be used as the base URL. If your input defines\n   * server(s), you can set `baseUrl` to a number to pick a specific server\n   * to use as the base URL. You can disable setting the base URL by setting\n   * `baseUrl` to `false`. By default, `baseUrl` is `true` and it will try to\n   * use the first defined server value. If there's none, we won't set a\n   * base URL.\n   *\n   * If the matched URL contains template literals, it will be ignored.\n   *\n   * @default true\n   */\n  baseUrl?: string | number | boolean;\n};\n\nexport type Config = Plugin.Name<'@hey-api/client-httpx'> & {\n  baseUrl: string | number | boolean;\n};\n\nexport type HeyApiClientHttpxPlugin = DefinePlugin<UserConfig, Config>;\n"
  },
  {
    "path": "packages/openapi-python/src/plugins/@hey-api/sdk/config.ts",
    "content": "import { definePluginConfig } from '@hey-api/shared';\n\nimport { resolveOperations } from './operations';\nimport { handler } from './plugin';\nimport type { HeyApiSdkPlugin } from './types';\n\nexport const defaultConfig: HeyApiSdkPlugin['Config'] = {\n  config: {\n    // auth: true,\n    client: true,\n    comments: true,\n    includeInEntry: true,\n    paramsStructure: 'grouped',\n    // responseStyle: 'fields',\n    // transformer: false,\n    // validator: false,\n  },\n  dependencies: ['pydantic'],\n  handler,\n  name: '@hey-api/python-sdk',\n  resolveConfig: (plugin, context) => {\n    if (plugin.config.client) {\n      if (typeof plugin.config.client === 'boolean') {\n        plugin.config.client = context.pluginByTag('client', {\n          defaultPlugin: '@hey-api/client-httpx',\n        });\n      }\n      plugin.dependencies.add(plugin.config.client!);\n    } else {\n      plugin.config.client = false;\n    }\n    // if (plugin.config.transformer) {\n    //   if (typeof plugin.config.transformer === 'boolean') {\n    //     plugin.config.transformer = context.pluginByTag('transformer');\n    //   }\n    //   plugin.dependencies.add(plugin.config.transformer!);\n    // } else {\n    //   plugin.config.transformer = false;\n    // }\n    // if (typeof plugin.config.validator !== 'object') {\n    //   plugin.config.validator = {\n    //     request: plugin.config.validator,\n    //     response: plugin.config.validator,\n    //   };\n    // }\n    // if (plugin.config.validator.request) {\n    //   if (typeof plugin.config.validator.request === 'boolean') {\n    //     plugin.config.validator.request = context.pluginByTag('validator');\n    //   }\n    //   plugin.dependencies.add(plugin.config.validator.request!);\n    // } else {\n    //   plugin.config.validator.request = false;\n    // }\n    // if (plugin.config.validator.response) {\n    //   if (typeof plugin.config.validator.response === 'boolean') {\n    //     plugin.config.validator.response = context.pluginByTag('validator');\n    //   }\n    //   plugin.dependencies.add(plugin.config.validator.response!);\n    // } else {\n    //   plugin.config.validator.response = false;\n    // }\n    // plugin.config.examples = resolveExamples(plugin.config, context);\n    plugin.config.operations = resolveOperations(plugin.config, context);\n  },\n};\n\n/**\n * Type helper for `@hey-api/python-sdk` plugin, returns {@link Plugin.Config} object\n */\nexport const defineConfig = definePluginConfig(defaultConfig);\n"
  },
  {
    "path": "packages/openapi-python/src/plugins/@hey-api/sdk/examples/config.ts",
    "content": "import type { PluginContext } from '@hey-api/shared';\n\nimport type { UserConfig } from '../types';\nimport type { ExamplesConfig } from './types';\n\ntype Config = Omit<UserConfig, 'name'>;\n\nexport function resolveExamples(config: Config, context: PluginContext): ExamplesConfig {\n  return context.valueToObject({\n    defaultValue: {\n      enabled: Boolean(config.examples),\n      language: 'Python',\n    },\n    mappers: {\n      boolean: (enabled) => ({ enabled }),\n    },\n    value: config.examples,\n  }) as ExamplesConfig;\n}\n"
  },
  {
    "path": "packages/openapi-python/src/plugins/@hey-api/sdk/examples/index.ts",
    "content": "export { resolveExamples } from './config';\nexport type { ExamplesConfig, UserExamplesConfig } from './types';\n"
  },
  {
    "path": "packages/openapi-python/src/plugins/@hey-api/sdk/examples/types.ts",
    "content": "import type { FeatureToggle, IR, LinguistLanguages } from '@hey-api/shared';\nimport type { MaybeFunc } from '@hey-api/types';\n\nimport type { CallArgs, DollarPyDsl, ExampleOptions } from '../../../../py-dsl';\n\nexport type UserExamplesConfig = Omit<ExampleOptions, 'payload'> & {\n  /**\n   * Whether this feature is enabled.\n   *\n   * @default true\n   */\n  enabled?: boolean;\n  /**\n   * The programming language for the generated examples.\n   *\n   * This is used to display the language label in code blocks in\n   * documentation UIs.\n   *\n   * @default 'Python'\n   */\n  language?: LinguistLanguages;\n  /**\n   * Example request payload.\n   */\n  payload?: MaybeFunc<\n    (operation: IR.OperationObject, ctx: DollarPyDsl) => CallArgs | CallArgs[number]\n  >;\n  /**\n   * Transform the generated example string.\n   *\n   * @param example The generated example string.\n   * @param operation The operation the example was generated for.\n   * @returns The final example string.\n   */\n  transform?: (example: string, operation: IR.OperationObject) => string;\n};\n\nexport type ExamplesConfig = Omit<ExampleOptions, 'payload'> &\n  FeatureToggle & {\n    /**\n     * The programming language for the generated examples.\n     *\n     * This is used to display the language label in code blocks in\n     * documentation UIs.\n     */\n    language: LinguistLanguages;\n    /**\n     * Example request payload.\n     */\n    payload?: MaybeFunc<\n      (operation: IR.OperationObject, ctx: DollarPyDsl) => CallArgs | CallArgs[number]\n    >;\n    /**\n     * Transform the generated example string.\n     *\n     * @param example The generated example string.\n     * @param operation The operation the example was generated for.\n     * @returns The final example string.\n     */\n    transform?: (example: string, operation: IR.OperationObject) => string;\n  };\n"
  },
  {
    "path": "packages/openapi-python/src/plugins/@hey-api/sdk/index.ts",
    "content": "export { defaultConfig, defineConfig } from './config';\nexport type { HeyApiSdkPlugin } from './types';\n"
  },
  {
    "path": "packages/openapi-python/src/plugins/@hey-api/sdk/operations/config.ts",
    "content": "import type { OperationsStrategy, PluginContext } from '@hey-api/shared';\n\nimport type { UserConfig } from '../types';\nimport type { OperationsConfig, UserOperationsConfig } from './types';\n\ntype Config = Omit<UserConfig, 'name'>;\n\nexport function resolveOperations(config: Config, context: PluginContext): OperationsConfig {\n  return normalizeConfig(config.operations, context);\n}\n\nfunction normalizeConfig(\n  input: Exclude<OperationsStrategy, 'flat'> | UserOperationsConfig | undefined,\n  context: PluginContext,\n): OperationsConfig {\n  if (!input || typeof input === 'string' || typeof input === 'function') {\n    input = { strategy: input };\n  }\n\n  const strategy = input.strategy ?? 'single';\n\n  return context.valueToObject({\n    defaultValue: {\n      container: 'class',\n      methods: 'instance',\n      nesting: 'operationId',\n      nestingDelimiters: /[./]/,\n      strategy,\n      strategyDefaultTag: 'default',\n    },\n    mappers: {\n      object(value) {\n        value.containerName = context.valueToObject({\n          defaultValue:\n            strategy === 'single'\n              ? { casing: 'PascalCase', name: 'Sdk' }\n              : { casing: 'PascalCase' },\n          mappers: {\n            function: (name) => ({ name }),\n            string: (name) => ({ name }),\n          },\n          value: value.containerName,\n        });\n        value.methodName = context.valueToObject({\n          defaultValue: { casing: 'snake_case' },\n          mappers: {\n            function: (name) => ({ name }),\n            string: (name) => ({ name }),\n          },\n          value: value.methodName,\n        });\n        value.segmentName = context.valueToObject({\n          defaultValue: { casing: 'PascalCase' },\n          mappers: {\n            function: (name) => ({ name }),\n            string: (name) => ({ name }),\n          },\n          value: value.segmentName,\n        });\n        return value;\n      },\n    },\n    value: {\n      ...input,\n    } as UserOperationsConfig,\n  }) as OperationsConfig;\n}\n"
  },
  {
    "path": "packages/openapi-python/src/plugins/@hey-api/sdk/operations/index.ts",
    "content": "export { resolveOperations } from './config';\nexport { resolveStrategy } from './resolve';\nexport type { OperationsConfig, UserOperationsConfig } from './types';\n"
  },
  {
    "path": "packages/openapi-python/src/plugins/@hey-api/sdk/operations/resolve.ts",
    "content": "import type { OperationPathStrategy, OperationStructureStrategy } from '@hey-api/shared';\nimport { OperationPath, OperationStrategy } from '@hey-api/shared';\n\nimport type { HeyApiSdkPlugin } from '../types';\n\nfunction resolvePath(plugin: HeyApiSdkPlugin['Instance']): OperationPathStrategy {\n  if (plugin.config.operations.nesting === 'id') {\n    return OperationPath.id();\n  }\n\n  if (plugin.config.operations.nesting === 'operationId') {\n    return OperationPath.fromOperationId({\n      delimiters: plugin.config.operations.nestingDelimiters,\n      fallback: OperationPath.id(),\n    });\n  }\n\n  return plugin.config.operations.nesting;\n}\n\nexport function resolveStrategy(plugin: HeyApiSdkPlugin['Instance']): OperationStructureStrategy {\n  // if (plugin.config.operations.strategy === 'flat') {\n  //   return OperationStrategy.flat({\n  //     path: (operation) => [resolvePath(plugin)(operation).join('.')],\n  //   });\n  // }\n\n  if (plugin.config.operations.strategy === 'single') {\n    const root = plugin.config.operations.containerName;\n    return OperationStrategy.single({\n      path: resolvePath(plugin),\n      root: typeof root.name === 'string' ? root.name : (root.name?.('') ?? ''),\n    });\n  }\n\n  if (plugin.config.operations.strategy === 'byTags') {\n    return OperationStrategy.byTags({\n      fallback: plugin.config.operations.strategyDefaultTag,\n      path: resolvePath(plugin),\n    });\n  }\n\n  return plugin.config.operations.strategy;\n}\n"
  },
  {
    "path": "packages/openapi-python/src/plugins/@hey-api/sdk/operations/types.ts",
    "content": "import type {\n  NamingConfig,\n  NamingRule,\n  OperationPathStrategy,\n  OperationsStrategy,\n} from '@hey-api/shared';\n\nexport interface UserOperationsConfig {\n  /**\n   * Type of container for grouped operations.\n   *\n   * Ignored when `strategy` is `'flat'`.\n   *\n   * - `'class'` - Class with methods\n   *\n   * @default 'class'\n   */\n  container?: 'class';\n  /**\n   * Customize container names.\n   *\n   * For `'single'` strategy, this sets the root container name.\n   * For `'byTags'` strategy, this transforms tag names.\n   *\n   * @default 'Sdk' for `'single'` strategy\n   *\n   * @example\n   * // Set root name for single strategy\n   * containerName: 'MyApi'\n   *\n   * @example\n   * // Transform tag names with suffix\n   * containerName: '{{name}}Service'\n   *\n   * @example\n   * // With casing\n   * containerName: { name: '{{name}}Service', casing: 'PascalCase' }\n   */\n  containerName?: NamingRule;\n  /**\n   * Customize method/function names.\n   *\n   * Applied to the final segment of the path (the method name).\n   */\n  methodName?: NamingRule;\n  /**\n   * How methods are attached to class containers.\n   *\n   * Only applies when `container` is `'class'`.\n   *\n   * - `'instance'` - Instance methods, requires `new ClassName(config)`\n   *\n   * @default 'instance'\n   */\n  methods?: 'instance';\n  /**\n   * How to derive nesting structure from operations.\n   *\n   * - `'operationId'` - Split operationId by delimiters (e.g., `users.list` → `Users.list()`)\n   * - `'id'` - Use operation id as-is, no nesting\n   * - Custom function for full control\n   *\n   * @default 'operationId'\n   */\n  nesting?: 'operationId' | 'id' | OperationPathStrategy;\n  /**\n   * Delimiters for splitting operationId.\n   *\n   * Only applies when `nesting` is `'operationId'`.\n   *\n   * @default /[./]/\n   */\n  nestingDelimiters?: RegExp;\n  /**\n   * Customize nesting segment names.\n   *\n   * Applied to intermediate path segments (not the method name).\n   */\n  segmentName?: NamingRule;\n  /**\n   * Grouping strategy.\n   *\n   * - `'byTags'` - One container per operation tag\n   * - `'single'` - All operations in one container\n   * - Custom function for full control\n   *\n   * @default 'single'\n   */\n  strategy?: Exclude<OperationsStrategy, 'flat'>;\n  /**\n   * Default container name for operations without tags.\n   *\n   * Only applies when `strategy` is `'byTags'`.\n   *\n   * @default 'default'\n   */\n  strategyDefaultTag?: string;\n}\n\nexport interface OperationsConfig {\n  /**\n   * Type of container for grouped operations.\n   *\n   * Ignored when `strategy` is `'flat'`.\n   *\n   * - `'class'` - Class with methods\n   */\n  container: 'class';\n  /**\n   * Customize container names.\n   *\n   * For `'single'` strategy, this sets the root container name.\n   * For `'byTags'` strategy, this transforms tag names.\n   *\n   * @default 'Sdk' for `'single'` strategy\n   *\n   * @example\n   * // Set root name for single strategy\n   * containerName: 'MyApi'\n   *\n   * @example\n   * // Transform tag names with suffix\n   * containerName: '{{name}}Service'\n   *\n   * @example\n   * // With casing\n   * containerName: { name: '{{name}}Service', case: 'PascalCase' }\n   */\n  containerName: NamingConfig;\n  /**\n   * Customize method/function names.\n   *\n   * Applied to the final segment of the path (the method name).\n   */\n  methodName: NamingConfig;\n  /**\n   * How methods are attached to class containers.\n   *\n   * Only applies when `container` is `'class'`.\n   *\n   * - `'instance'` - Instance methods, requires `new ClassName(config)`\n   */\n  methods: 'instance';\n  /**\n   * How to derive nesting structure from operations.\n   *\n   * - `'operationId'` - Split operationId by delimiters (e.g., `users.list` → `Users.list()`)\n   * - `'id'` - Use operation id as-is, no nesting\n   * - Custom function for full control\n   */\n  nesting: 'operationId' | 'id' | OperationPathStrategy;\n  /**\n   * Delimiters for splitting operationId.\n   *\n   * Only applies when `nesting` is `'operationId'`.\n   */\n  nestingDelimiters: RegExp;\n  /**\n   * Customize nesting segment names.\n   *\n   * Applied to intermediate path segments (not the method name).\n   */\n  segmentName: NamingConfig;\n  /**\n   * Grouping strategy.\n   *\n   * - `'byTags'` - One container per operation tag\n   * - `'single'` - All operations in one container\n   * - Custom function for full control\n   */\n  strategy: Exclude<OperationsStrategy, 'flat'>;\n  /**\n   * Default container name for operations without tags.\n   *\n   * Only applies when `strategy` is `'byTags'`.\n   */\n  strategyDefaultTag: string;\n}\n"
  },
  {
    "path": "packages/openapi-python/src/plugins/@hey-api/sdk/plugin.ts",
    "content": "import type { HeyApiSdkPlugin } from './types';\nimport { handlerV1 } from './v1/plugin';\n\nexport const handler: HeyApiSdkPlugin['Handler'] = (args) => handlerV1(args);\n"
  },
  {
    "path": "packages/openapi-python/src/plugins/@hey-api/sdk/shared/class.ts",
    "content": "export const createRegistryClass = () => {};\nexport const createClientClass = () => {};\n"
  },
  {
    "path": "packages/openapi-python/src/plugins/@hey-api/sdk/shared/operation.ts",
    "content": "import type { Symbol } from '@hey-api/codegen-core';\nimport type { IR } from '@hey-api/shared';\n\nimport { $ } from '../../../../py-dsl';\nimport type { HeyApiSdkPlugin } from '../types';\nimport { getSignatureParameters } from './signature';\n\ntype OperationParameters = {\n  bodyRef?: string;\n  fields: Array<{\n    in: string;\n    key: string;\n    map?: string;\n  }>;\n  parameters: Array<ReturnType<typeof $.param>>;\n};\n\nconst PYTHON_BUILTIN_TYPES: Record<string, string> = {\n  array: 'list',\n  boolean: 'bool',\n  integer: 'int',\n  number: 'float',\n  object: 'dict',\n  string: 'str',\n};\n\nfunction schemaToPythonType(\n  schema: IR.SchemaObject,\n  plugin: HeyApiSdkPlugin['Instance'],\n): ReturnType<typeof $.expr | typeof $.subscript> | Symbol {\n  if (schema.$ref) {\n    return plugin.referenceSymbol({\n      category: 'schema',\n      resourceId: schema.$ref,\n    });\n  }\n\n  if (schema.type === 'array') {\n    const itemsSchema = schema.items?.[0];\n    const itemType = itemsSchema\n      ? schemaToPythonType(itemsSchema, plugin)\n      : plugin.external('typing.Any');\n    return $('list').slice(itemType);\n  }\n\n  if (schema.type === 'object' || schema.additionalProperties) {\n    if (schema.additionalProperties && typeof schema.additionalProperties === 'object') {\n      const valueType = schemaToPythonType(schema.additionalProperties, plugin);\n      return $('dict').slice('str', valueType);\n    }\n    return $('dict').slice('str', plugin.external('typing.Any'));\n  }\n\n  if (schema.type === 'tuple') {\n    const itemsSchema = schema.items;\n    const itemTypes = itemsSchema\n      ? itemsSchema.map((item) => schemaToPythonType(item, plugin))\n      : [];\n    return $('tuple').slice(...itemTypes);\n  }\n\n  const builtinType = schema.type ? PYTHON_BUILTIN_TYPES[schema.type] : undefined;\n  return $(builtinType ?? plugin.external('typing.Any'));\n}\n\nexport function operationParameters({\n  operation,\n  plugin,\n}: {\n  operation: IR.OperationObject;\n  plugin: HeyApiSdkPlugin['Instance'];\n}): OperationParameters {\n  const result: OperationParameters = {\n    fields: [],\n    parameters: [],\n  };\n\n  if (plugin.config.paramsStructure === 'flat') {\n    const signature = getSignatureParameters({ operation });\n    if (!signature) return result;\n\n    result.bodyRef = signature.bodyRef;\n    result.fields = signature.fields;\n\n    const paramEntries = Object.entries(signature.parameters).sort(([, valueA], [, valueB]) =>\n      valueA.isRequired === valueB.isRequired ? 0 : valueA.isRequired ? -1 : 1,\n    );\n\n    for (const [paramName, param] of paramEntries) {\n      const type = schemaToPythonType(param.schema, plugin);\n\n      if (param.isRequired) {\n        result.parameters.push($.param(paramName).type(type));\n      } else {\n        result.parameters.push(\n          $.param(paramName)\n            .type($(plugin.external('typing.Union')).slice(type, 'None'))\n            .default('None'),\n        );\n      }\n    }\n  }\n\n  return result;\n}\n"
  },
  {
    "path": "packages/openapi-python/src/plugins/@hey-api/sdk/shared/signature.ts",
    "content": "import type { IR } from '@hey-api/shared';\nimport { refToName, toCase } from '@hey-api/shared';\n\ntype Location = keyof IR.ParametersObject | 'body';\n\ntype SignatureParameter = {\n  in: Location;\n  isRequired: boolean;\n  name: string;\n  originalName?: string;\n  schema: IR.SchemaObject;\n};\n\ntype SignatureParameters = Record<string, SignatureParameter>;\n\ntype Field = {\n  in: Location | 'headers';\n  key: string;\n  map?: string;\n};\n\ntype Signature = {\n  bodyRef?: string;\n  fields: Field[];\n  parameters: SignatureParameters;\n};\n\nexport function getSignatureParameters({\n  operation,\n}: {\n  operation: IR.OperationObject;\n}): Signature | undefined {\n  const locations = ['header', 'path', 'query'] as const satisfies ReadonlyArray<Location>;\n  const nameToLocations: Record<string, Set<Location>> = {};\n\n  const addParameter = (name: string, location: Location): void => {\n    if (!nameToLocations[name]) {\n      nameToLocations[name] = new Set();\n    }\n    nameToLocations[name]!.add(location);\n  };\n\n  for (const location of locations) {\n    const parameters = operation.parameters?.[location];\n    if (parameters) {\n      for (const key in parameters) {\n        const parameter = parameters[key]!;\n        addParameter(parameter.name, location);\n      }\n    }\n  }\n\n  if (operation.body) {\n    if (\n      !operation.body.schema.logicalOperator &&\n      operation.body.schema.type === 'object' &&\n      operation.body.schema.properties\n    ) {\n      const properties = operation.body.schema.properties;\n      for (const key in properties) {\n        addParameter(key, 'body');\n      }\n    } else if (operation.body.schema.$ref) {\n      const name = refToName(operation.body.schema.$ref);\n      const key = toCase(name, 'snake_case');\n      addParameter(key, 'body');\n    } else {\n      addParameter('body', 'body');\n    }\n  }\n\n  const conflicts = new Set<string>();\n  for (const name in nameToLocations) {\n    if (nameToLocations[name]!.size > 1) {\n      conflicts.add(name);\n    }\n  }\n\n  const signatureParameters: SignatureParameters = {};\n  const fields: Field[] = [];\n\n  for (const location of locations) {\n    const parameters = operation.parameters?.[location];\n    if (parameters) {\n      for (const key in parameters) {\n        const parameter = parameters[key]!;\n        const originalName = parameter.name;\n        const name = conflicts.has(originalName) ? `${location}_${originalName}` : originalName;\n        const signatureParameter: SignatureParameter = {\n          in: location,\n          isRequired: parameter.required ?? false,\n          name,\n          schema: parameter.schema,\n        };\n        if (name !== originalName) {\n          signatureParameter.originalName = originalName;\n        }\n        signatureParameters[name] = signatureParameter;\n        fields.push({\n          in: location === 'header' ? 'headers' : location,\n          key: name,\n          ...(name !== originalName ? { map: originalName } : {}),\n        });\n      }\n    }\n  }\n\n  let bodyRef: string | undefined;\n\n  if (operation.body) {\n    const location = 'body';\n    if (\n      !operation.body.schema.logicalOperator &&\n      operation.body.schema.type === 'object' &&\n      operation.body.schema.properties\n    ) {\n      const properties = operation.body.schema.properties;\n      for (const originalName in properties) {\n        const property = properties[originalName]!;\n        const name = conflicts.has(originalName) ? `${location}_${originalName}` : originalName;\n        const signatureParameter: SignatureParameter = {\n          in: location,\n          isRequired: operation.body.schema.required?.includes(originalName) ?? false,\n          name,\n          schema: property,\n        };\n        if (name !== originalName) {\n          signatureParameter.originalName = originalName;\n        }\n        signatureParameters[name] = signatureParameter;\n        fields.push({\n          in: location,\n          key: name,\n          ...(name !== originalName ? { map: originalName } : {}),\n        });\n      }\n    } else if (operation.body.schema.$ref) {\n      const value = refToName(operation.body.schema.$ref);\n      const originalName = toCase(value, 'snake_case');\n      const name = conflicts.has(originalName) ? `${location}_${originalName}` : originalName;\n      bodyRef = toCase(value, 'PascalCase');\n      const signatureParameter: SignatureParameter = {\n        in: location,\n        isRequired: operation.body.required ?? false,\n        name,\n        schema: operation.body.schema,\n      };\n      if (name !== originalName) {\n        signatureParameter.originalName = originalName;\n      }\n      signatureParameters[name] = signatureParameter;\n      fields.push({\n        in: location,\n        key: name,\n        map: 'body',\n      });\n    } else {\n      signatureParameters.body = {\n        in: location,\n        isRequired: operation.body.required ?? false,\n        name: 'body',\n        schema: operation.body.schema,\n      };\n      fields.push({\n        in: location,\n        key: 'body',\n        map: 'body',\n      });\n    }\n  }\n\n  if (!Object.keys(signatureParameters).length) {\n    return;\n  }\n\n  return { bodyRef, fields, parameters: signatureParameters };\n}\n"
  },
  {
    "path": "packages/openapi-python/src/plugins/@hey-api/sdk/types.ts",
    "content": "import type { DefinePlugin, OperationsStrategy, Plugin } from '@hey-api/shared';\n\nimport type { PluginClientNames } from '../../types';\n// import type { PluginClientNames, PluginValidatorNames } from '../../types';\nimport type { ExamplesConfig, UserExamplesConfig } from './examples';\nimport type { OperationsConfig, UserOperationsConfig } from './operations';\n\nexport type UserConfig = Plugin.Name<'@hey-api/python-sdk'> &\n  Plugin.Hooks &\n  Plugin.UserComments &\n  Plugin.UserExports & {\n    /**\n     * Should the generated functions contain auth mechanisms? You may want to\n     * disable this option if you're handling auth yourself or defining it\n     * globally on the client and want to reduce the size of generated code.\n     *\n     * @default true\n     */\n    // auth?: boolean;\n    /**\n     * Use an internal client instance to send HTTP requests? This is useful if\n     * you don't want to manually pass the client to each SDK function.\n     *\n     * You can customize the selected client output through its plugin. You can\n     * also set `client` to `true` to automatically choose the client from your\n     * defined plugins. If we can't detect a client plugin when using `true`, we\n     * will default to `@hey-api/client-httpx`.\n     *\n     * @default true\n     */\n    client?: PluginClientNames | boolean;\n    /**\n     * Generate code examples for SDK operations and attach them to the\n     * input source (e.g. via `x-codeSamples`).\n     *\n     * Set to `false` to disable example generation entirely, or provide an\n     * object for fine-grained control over the output and post-processing.\n     *\n     * @default false\n     */\n    examples?: boolean | UserExamplesConfig;\n    /**\n     * Define the structure of generated SDK operations.\n     *\n     * String shorthand:\n     * - `'byTags'` – one container per operation tag\n     * - `'single'` – all operations in a single container\n     * - custom function for full control\n     *\n     * Use the object form for advanced configuration.\n     *\n     * @default 'single'\n     */\n    operations?: Exclude<OperationsStrategy, 'flat'> | UserOperationsConfig;\n    /**\n     * Define how request parameters are structured in generated SDK methods.\n     *\n     * - `'flat'` merges parameters into a single object.\n     * - `'grouped'` separates parameters by transport layer.\n     *\n     * Use `'flat'` for simpler calls or `'grouped'` for stricter typing and code clarity.\n     *\n     * @default 'grouped'\n     */\n    paramsStructure?: 'flat' | 'grouped';\n    /**\n     * **This feature works only with the Fetch client**\n     *\n     * Should we return only data or multiple fields (data, error, response, etc.)?\n     *\n     * @default 'fields'\n     */\n    // responseStyle?: 'data' | 'fields';\n    /**\n     * Transform response data before returning. This is useful if you want to\n     * convert for example ISO strings into Date objects. However, transformation\n     * adds runtime overhead, so it's not recommended to use unless necessary.\n     *\n     * You can customize the selected transformer output through its plugin. You\n     * can also set `transformer` to `true` to automatically choose the\n     * transformer from your defined plugins.\n     *\n     * @default false\n     */\n    // transformer?: PluginTransformerNames | boolean;\n    /**\n     * Validate request and/or response data against schema before returning.\n     * This is useful if you want to ensure the request and/or response conforms\n     * to a desired shape. However, validation adds runtime overhead, so it's\n     * not recommended to use unless absolutely necessary.\n     *\n     * You can customize the validator output through its plugin. You can also\n     * set `validator` to `true` to automatically choose the validator from your\n     * defined plugins.\n     *\n     * You can enable/disable validation for requests and responses separately\n     * by setting `validator` to an object `{ request, response }`.\n     *\n     * Ensure you have declared the selected library as a dependency to avoid\n     * errors.\n     *\n     * @default false\n     */\n    // validator?:\n    //   | PluginValidatorNames\n    //   | boolean\n    //   | {\n    //       /**\n    //        * Validate request data against schema before sending.\n    //        *\n    //        * Can be a validator plugin name or boolean (true to auto-select, false\n    //        * to disable).\n    //        *\n    //        * @default false\n    //        */\n    //       request?: PluginValidatorNames | boolean;\n    //       /**\n    //        * Validate response data against schema before returning.\n    //        *\n    //        * Can be a validator plugin name or boolean (true to auto-select, false\n    //        * to disable).\n    //        *\n    //        * @default false\n    //        */\n    //       response?: PluginValidatorNames | boolean;\n    //     };\n  };\n\nexport type Config = Plugin.Name<'@hey-api/python-sdk'> &\n  Plugin.Hooks &\n  Plugin.Comments &\n  Plugin.Exports & {\n    /**\n     * Should the generated functions contain auth mechanisms? You may want to\n     * disable this option if you're handling auth yourself or defining it\n     * globally on the client and want to reduce the size of generated code.\n     *\n     * @default true\n     */\n    // auth: boolean;\n    /**\n     * Use an internal client instance to send HTTP requests? This is useful if\n     * you don't want to manually pass the client to each SDK function.\n     *\n     * You can customize the selected client output through its plugin. You can\n     * also set `client` to `true` to automatically choose the client from your\n     * defined plugins. If we can't detect a client plugin when using `true`, we\n     * will default to `@hey-api/client-httpx`.\n     *\n     * @default true\n     */\n    client: PluginClientNames | false;\n    /**\n     * Configuration for generating SDK code examples.\n     */\n    examples: ExamplesConfig;\n    /**\n     * Define the structure of generated SDK operations.\n     */\n    operations: OperationsConfig;\n    /**\n     * Define how request parameters are structured in generated SDK methods.\n     *\n     * - `'flat'` merges parameters into a single object.\n     * - `'grouped'` separates parameters by transport layer.\n     *\n     * Use `'flat'` for simpler calls or `'grouped'` for stricter typing and code clarity.\n     *\n     * @default 'grouped'\n     */\n    paramsStructure: 'flat' | 'grouped';\n    /**\n     * **This feature works only with the Fetch client**\n     *\n     * Should we return only data or multiple fields (data, error, response, etc.)?\n     *\n     * @default 'fields'\n     */\n    // responseStyle: 'data' | 'fields';\n    /**\n     * Transform response data before returning. This is useful if you want to\n     * convert for example ISO strings into Date objects. However, transformation\n     * adds runtime overhead, so it's not recommended to use unless necessary.\n     *\n     * You can customize the selected transformer output through its plugin. You\n     * can also set `transformer` to `true` to automatically choose the\n     * transformer from your defined plugins.\n     *\n     * @default false\n     */\n    // transformer: PluginTransformerNames | false;\n    /**\n     * Validate request and/or response data against schema before returning.\n     * This is useful if you want to ensure the request and/or response conforms\n     * to a desired shape. However, validation adds runtime overhead, so it's\n     * not recommended to use unless absolutely necessary.\n     */\n    // validator: {\n    //   /**\n    //    * The validator plugin to use for request validation, or false to disable.\n    //    *\n    //    * @default false\n    //    */\n    //   request: PluginValidatorNames | false;\n    //   /**\n    //    * The validator plugin to use for response validation, or false to disable.\n    //    *\n    //    * @default false\n    //    */\n    //   response: PluginValidatorNames | false;\n    // };\n  };\n\nexport type HeyApiSdkPlugin = DefinePlugin<UserConfig, Config>;\n"
  },
  {
    "path": "packages/openapi-python/src/plugins/@hey-api/sdk/v1/node.ts",
    "content": "import type {\n  StructureItem,\n  StructureNode,\n  StructureShell,\n  Symbol,\n  SymbolMeta,\n} from '@hey-api/codegen-core';\nimport type { IR } from '@hey-api/shared';\nimport { applyNaming, toCase } from '@hey-api/shared';\n\nimport { $ } from '../../../../py-dsl';\nimport { createOperationComment } from '../../../shared/utils/operation';\nimport { operationParameters } from '../shared/operation';\nimport type { HeyApiSdkPlugin } from '../types';\n\nexport interface OperationItem {\n  operation: IR.OperationObject;\n  path: ReadonlyArray<string | number>;\n  tags: ReadonlyArray<string> | undefined;\n}\n\nexport const source = globalThis.Symbol('@hey-api/python-sdk');\n\nfunction attachComment<T extends ReturnType<typeof $.func>>(args: {\n  node: T;\n  operation: IR.OperationObject;\n  plugin: HeyApiSdkPlugin['Instance'];\n}): T {\n  const { node, operation, plugin } = args;\n  return node.$if(plugin.config.comments && createOperationComment(operation), (n, v) =>\n    n.doc(v),\n  ) as T;\n}\n\nfunction createShellMeta(node: StructureNode): SymbolMeta {\n  return {\n    category: 'utility',\n    resource: 'class',\n    resourceId: node.getPath().join('.'),\n    tool: 'sdk',\n  };\n}\n\nfunction createFnSymbol(\n  plugin: HeyApiSdkPlugin['Instance'],\n  item: StructureItem & { data: OperationItem },\n): Symbol {\n  const { operation, path, tags } = item.data;\n  const name = item.location[item.location.length - 1]!;\n  return plugin.symbol(applyNaming(name, plugin.config.operations.methodName), {\n    meta: {\n      category: 'sdk',\n      path,\n      resource: 'operation',\n      resourceId: operation.id,\n      tags,\n      tool: 'sdk',\n    },\n  });\n}\n\nfunction childToNode(\n  resource: StructureNode,\n  plugin: HeyApiSdkPlugin['Instance'],\n): ReadonlyArray<ReturnType<typeof $.func>> {\n  const refChild = plugin.referenceSymbol(createShellMeta(resource));\n  const memberNameStr = toCase(\n    refChild.name,\n    plugin.config.operations.methodName.casing ?? 'camelCase',\n  );\n  const memberName = plugin.symbol(memberNameStr);\n  const cachedProp = plugin.external('functools.cached_property');\n\n  return [\n    $.method(memberName)\n      .decorator(cachedProp)\n      .param('self')\n      .returns(refChild)\n      .do(\n        $(refChild)\n          .call($.kwarg('client', $('self').attr('client')))\n          .return(),\n      ),\n  ];\n}\n\nexport function createShell(plugin: HeyApiSdkPlugin['Instance']): StructureShell {\n  return {\n    define: (node) => {\n      const symbol = plugin.symbol(\n        applyNaming(\n          node.name,\n          node.isRoot\n            ? plugin.config.operations.containerName\n            : plugin.config.operations.segmentName,\n        ),\n        {\n          meta: createShellMeta(node),\n        },\n      );\n\n      const symbolClient = plugin.external('client.Client');\n\n      const c = $.class(symbol).export().extends(symbolClient);\n\n      const dependencies: Array<ReturnType<typeof $.class>> = [];\n\n      return { dependencies, node: c };\n    },\n  };\n}\n\nfunction implementFn<T extends ReturnType<typeof $.func>>(args: {\n  node: T;\n  operation: IR.OperationObject;\n  plugin: HeyApiSdkPlugin['Instance'];\n}): T {\n  const { node, operation, plugin } = args;\n  const method = operation.method.toLowerCase();\n  const opParameters = operationParameters({ operation, plugin });\n\n  if (plugin.config.paramsStructure === 'flat' && opParameters.fields.length > 0) {\n    const paramNames = opParameters.parameters.map((parameter) => parameter.name.toString());\n\n    const fieldsList = $.list();\n    for (const field of opParameters.fields) {\n      const fieldDict = $.dict();\n      fieldDict.entry($.literal('in'), $.literal(field.in));\n      fieldDict.entry($.literal('key'), $.literal(field.key));\n      if (field.map) {\n        fieldDict.entry($.literal('map'), $.literal(field.map));\n      }\n      fieldsList.element(fieldDict);\n    }\n\n    return (\n      node\n        .params(...opParameters.parameters)\n        // TODO: extract operation statements into a separate function\n        .do(\n          $.var('params').assign(\n            $(plugin.external('client.build_client_params')).call(\n              fieldsList,\n              ...paramNames.map((name) => $.kwarg(name, name)),\n            ),\n          ),\n        )\n        .do(\n          $('self')\n            .attr('client')\n            .attr(method)\n            .call($.literal(operation.path), $.kwarg('params', $('params') as never))\n            .return(),\n        ) as T\n    );\n  }\n\n  return node\n    .params(...opParameters.parameters)\n    .do($('self').attr('client').attr(method).call($.literal(operation.path)).return()) as T;\n}\n\nexport function toNode(\n  model: StructureNode,\n  plugin: HeyApiSdkPlugin['Instance'],\n): {\n  dependencies?: Array<ReturnType<typeof $.class | typeof $.func>>;\n  nodes: ReadonlyArray<ReturnType<typeof $.class | typeof $.func>>;\n} {\n  if (model.virtual) {\n    const nodes: Array<ReturnType<typeof $.func>> = [];\n    for (const item of model.itemsFrom<OperationItem>(source)) {\n      const fnName = applyNaming(\n        String(item.location[item.location.length - 1]),\n        plugin.config.operations.methodName,\n      );\n      const node = $.func(fnName).export().do($('None').return());\n      nodes.push(node);\n    }\n    return { nodes };\n  }\n\n  if (!model.shell) {\n    return { nodes: [] };\n  }\n\n  const nodes: Array<ReturnType<typeof $.class | typeof $.func>> = [];\n  const shell = model.shell.define(model);\n  const node = shell.node as ReturnType<typeof $.class | typeof $.func>;\n\n  let index = 0;\n  for (const item of model.itemsFrom<OperationItem>(source)) {\n    const { operation } = item.data;\n    if (node['~dsl'] === 'FuncPyDsl') {\n      // TODO: function?\n    } else {\n      if (index > 0 || node.hasBody) node.newline();\n      const method = implementFn({\n        node: $.method(createFnSymbol(plugin, item), (m) =>\n          attachComment({\n            node: m,\n            operation,\n            plugin,\n          }),\n        ).param('self'),\n        operation,\n        plugin,\n      });\n      node.do(method);\n      // exampleIntent(method, operation, plugin);\n    }\n    index += 1;\n  }\n\n  for (const child of model.children.values()) {\n    if (node['~dsl'] === 'FuncPyDsl') {\n      // TODO: function?\n    } else {\n      if (node.hasBody) node.newline();\n      node.do(...childToNode(child, plugin));\n    }\n  }\n\n  nodes.push(node);\n\n  return {\n    dependencies: shell.dependencies as Array<ReturnType<typeof $.class | typeof $.func>>,\n    nodes,\n  };\n}\n"
  },
  {
    "path": "packages/openapi-python/src/plugins/@hey-api/sdk/v1/plugin.ts",
    "content": "import { StructureModel } from '@hey-api/codegen-core';\n\nimport { getTypedConfig } from '../../../../config/utils';\nimport { clientFolderAbsolutePath } from '../../../../generate/client';\nimport type { $ } from '../../../../py-dsl';\nimport { getClientPlugin } from '../../client-core/utils';\nimport { resolveStrategy } from '../operations';\nimport type { HeyApiSdkPlugin } from '../types';\nimport { createShell, type OperationItem, source, toNode } from './node';\n\nexport const handlerV1: HeyApiSdkPlugin['Handler'] = ({ plugin }) => {\n  const clientModule = clientFolderAbsolutePath(getTypedConfig(plugin));\n  const client = getClientPlugin(getTypedConfig(plugin));\n\n  // client\n  plugin.symbol('build_client_params', {\n    external: clientModule,\n    meta: {\n      category: 'external',\n      resource: 'client.build_client_params',\n      tool: client.name,\n    },\n  });\n  plugin.symbol('Client', {\n    external: clientModule,\n    meta: {\n      category: 'external',\n      resource: 'client.Client',\n      tool: client.name,\n    },\n  });\n\n  // functools\n  plugin.symbol('cached_property', {\n    external: 'functools',\n    meta: {\n      category: 'external',\n      resource: 'functools.cached_property',\n    },\n  });\n\n  // typing\n  plugin.symbol('Any', {\n    external: 'typing',\n    meta: {\n      category: 'external',\n      resource: 'typing.Any',\n    },\n  });\n  plugin.symbol('Union', {\n    external: 'typing',\n    meta: {\n      category: 'external',\n      resource: 'typing.Union',\n    },\n  });\n\n  const structure = new StructureModel();\n  const shell = createShell(plugin);\n  const strategy = resolveStrategy(plugin);\n\n  plugin.forEach(\n    'operation',\n    (event) => {\n      structure.insert({\n        data: {\n          operation: event.operation,\n          path: event._path,\n          tags: event.tags,\n        } satisfies OperationItem,\n        locations: strategy(event.operation).map((path) => ({ path, shell })),\n        source,\n      });\n    },\n    { order: 'declarations' },\n  );\n\n  const allDependencies: Array<ReturnType<typeof $.class | typeof $.func>> = [];\n  const allNodes: Array<ReturnType<typeof $.class | typeof $.func>> = [];\n\n  for (const node of structure.walk()) {\n    const { dependencies, nodes } = toNode(node, plugin);\n    allDependencies.push(...(dependencies ?? []));\n    allNodes.push(...nodes);\n  }\n\n  for (const dep of allDependencies) {\n    plugin.node(dep);\n  }\n\n  for (const node of allNodes) {\n    plugin.node(node);\n  }\n};\n"
  },
  {
    "path": "packages/openapi-python/src/plugins/config.ts",
    "content": "import type { Plugin, PluginConfigMap, PluginNames } from '@hey-api/shared';\n\nimport { defaultConfig as heyApiClientHttpx } from '../plugins/@hey-api/client-httpx';\nimport { defaultConfig as heyApiSdk } from '../plugins/@hey-api/sdk';\nimport { defaultConfig as pydantic } from '../plugins/pydantic';\n\nexport const defaultPluginConfigs: {\n  [K in PluginNames]: Plugin.Config<PluginConfigMap[K]>;\n} = {\n  '@hey-api/client-httpx': heyApiClientHttpx,\n  '@hey-api/python-sdk': heyApiSdk,\n  pydantic,\n};\n"
  },
  {
    "path": "packages/openapi-python/src/plugins/pydantic/config.ts",
    "content": "import { definePluginConfig, mappers } from '@hey-api/shared';\n\nimport { handler } from './plugin';\nimport type { PydanticPlugin } from './types';\n\nexport const defaultConfig: PydanticPlugin['Config'] = {\n  config: {\n    case: 'PascalCase',\n    comments: true,\n    enums: 'enum',\n    includeInEntry: false,\n    strict: false,\n  },\n  handler,\n  name: 'pydantic',\n  resolveConfig: (plugin, context) => {\n    plugin.config.definitions = context.valueToObject({\n      defaultValue: {\n        case: plugin.config.case ?? 'PascalCase',\n        enabled: true,\n        name: '{{name}}',\n      },\n      mappers,\n      value: plugin.config.definitions,\n    });\n\n    plugin.config.requests = context.valueToObject({\n      defaultValue: {\n        case: plugin.config.case ?? 'PascalCase',\n        enabled: true,\n        name: '{{name}}Request',\n      },\n      mappers,\n      value: plugin.config.requests,\n    });\n\n    plugin.config.responses = context.valueToObject({\n      defaultValue: {\n        case: plugin.config.case ?? 'PascalCase',\n        enabled: true,\n        name: '{{name}}Response',\n      },\n      mappers,\n      value: plugin.config.responses,\n    });\n\n    plugin.config.webhooks = context.valueToObject({\n      defaultValue: {\n        case: plugin.config.case ?? 'PascalCase',\n        enabled: true,\n        name: '{{name}}Webhook',\n      },\n      mappers,\n      value: plugin.config.webhooks,\n    });\n  },\n  tags: ['validator'],\n};\n\n/**\n * Type helper for Pydantic plugin, returns {@link Plugin.Config} object\n */\nexport const defineConfig = definePluginConfig(defaultConfig);\n"
  },
  {
    "path": "packages/openapi-python/src/plugins/pydantic/index.ts",
    "content": "export { defaultConfig, defineConfig } from './config';\nexport type { PydanticResolvers } from './resolvers';\nexport type { PydanticPlugin } from './types';\n"
  },
  {
    "path": "packages/openapi-python/src/plugins/pydantic/plugin.ts",
    "content": "import type { PydanticPlugin } from './types';\nimport { handlerV2 } from './v2/plugin';\n\nexport const handler: PydanticPlugin['Handler'] = (args) => handlerV2(args);\n"
  },
  {
    "path": "packages/openapi-python/src/plugins/pydantic/resolvers.ts",
    "content": "import type { IR, Plugin, SchemaVisitorContext, SchemaWithType, Walker } from '@hey-api/shared';\n\nimport type { DollarPyDsl } from '../../py-dsl';\nimport type { PydanticField, PydanticFinal, PydanticResult, PydanticType } from './shared/types';\nimport type { PydanticPlugin } from './types';\n\nexport type PydanticResolvers = Plugin.Resolvers<{\n  /**\n   * Resolver for array schemas.\n   *\n   * Allows customization of how array types are rendered.\n   *\n   * Returning `undefined` will execute the default resolver logic.\n   */\n  array?: (ctx: ArrayResolverContext) => PydanticType | undefined;\n  /**\n   * Resolver for boolean schemas.\n   *\n   * Allows customization of how boolean types are rendered.\n   *\n   * Returning `undefined` will execute the default resolver logic.\n   */\n  boolean?: (ctx: BooleanResolverContext) => PydanticType | undefined;\n  /**\n   * Resolver for enum schemas.\n   *\n   * Allows customization of how enum types are rendered.\n   *\n   * Returning `undefined` will execute the default resolver logic.\n   */\n  enum?: (ctx: EnumResolverContext) => PydanticType | undefined;\n  /**\n   * Resolver for intersection schemas.\n   *\n   * Allows customization of how intersection types are rendered.\n   *\n   * Returning `undefined` will execute the default resolver logic.\n   */\n  intersection?: (ctx: IntersectionResolverContext) => PydanticType | undefined;\n  /**\n   * Resolver for never schemas.\n   *\n   * Allows customization of how never types are rendered.\n   *\n   * Returning `undefined` will execute the default resolver logic.\n   */\n  never?: (ctx: NeverResolverContext) => PydanticType | undefined;\n  /**\n   * Resolver for null schemas.\n   *\n   * Allows customization of how null types are rendered.\n   *\n   * Returning `undefined` will execute the default resolver logic.\n   */\n  null?: (ctx: NullResolverContext) => PydanticType | undefined;\n  /**\n   * Resolver for number schemas.\n   *\n   * Allows customization of how number types are rendered.\n   *\n   * Returning `undefined` will execute the default resolver logic.\n   */\n  number?: (ctx: NumberResolverContext) => PydanticType | undefined;\n  /**\n   * Resolver for object schemas.\n   *\n   * Allows customization of how object types are rendered.\n   *\n   * Returning `undefined` will execute the default resolver logic.\n   */\n  object?: (\n    ctx: ObjectResolverContext,\n  ) => (PydanticType & { fields?: Array<PydanticField> }) | undefined;\n  /**\n   * Resolver for string schemas.\n   *\n   * Allows customization of how string types are rendered.\n   *\n   * Returning `undefined` will execute the default resolver logic.\n   */\n  string?: (ctx: StringResolverContext) => PydanticType | undefined;\n  /**\n   * Resolver for tuple schemas.\n   *\n   * Allows customization of how tuple types are rendered.\n   *\n   * Returning `undefined` will execute the default resolver logic.\n   */\n  tuple?: (ctx: TupleResolverContext) => PydanticType | undefined;\n  /**\n   * Resolver for undefined schemas.\n   *\n   * Allows customization of how undefined types are rendered.\n   *\n   * Returning `undefined` will execute the default resolver logic.\n   */\n  undefined?: (ctx: UndefinedResolverContext) => PydanticType | undefined;\n  /**\n   * Resolver for union schemas.\n   *\n   * Allows customization of how union types are rendered.\n   *\n   * Returning `undefined` will execute the default resolver logic.\n   */\n  union?: (ctx: UnionResolverContext) => PydanticType | undefined;\n  /**\n   * Resolver for unknown schemas.\n   *\n   * Allows customization of how unknown types are rendered.\n   *\n   * Returning `undefined` will execute the default resolver logic.\n   */\n  unknown?: (ctx: UnknownResolverContext) => PydanticType | undefined;\n  /**\n   * Resolver for void schemas.\n   *\n   * Allows customization of how void types are rendered.\n   *\n   * Returning `undefined` will execute the default resolver logic.\n   */\n  void?: (ctx: VoidResolverContext) => PydanticType | undefined;\n}>;\n\ninterface BaseContext extends DollarPyDsl {\n  /** The plugin instance. */\n  plugin: PydanticPlugin['Instance'];\n}\n\nexport interface ArrayResolverContext extends BaseContext {\n  applyModifiers: (result: PydanticResult, opts?: { optional?: boolean }) => PydanticFinal;\n  childResults: Array<PydanticResult>;\n  /**\n   * Nodes used to build different parts of the result.\n   */\n  nodes: {\n    base: (ctx: ArrayResolverContext) => PydanticType;\n    maxLength: (ctx: ArrayResolverContext) => PydanticType | undefined;\n    minLength: (ctx: ArrayResolverContext) => PydanticType | undefined;\n  };\n  schema: SchemaWithType<'array'>;\n  walk: Walker<PydanticResult, PydanticPlugin['Instance']>;\n  walkerCtx: SchemaVisitorContext<PydanticPlugin['Instance']>;\n}\n\nexport interface BooleanResolverContext extends BaseContext {\n  /**\n   * Nodes used to build different parts of the result.\n   */\n  nodes: {\n    base: (ctx: BooleanResolverContext) => PydanticType;\n    const: (ctx: BooleanResolverContext) => PydanticType | undefined;\n  };\n  schema: SchemaWithType<'boolean'>;\n}\n\nexport interface EnumResolverContext extends BaseContext {\n  /**\n   * Nodes used to build different parts of the result.\n   */\n  nodes: {\n    base: (ctx: EnumResolverContext) => PydanticType;\n    items: (ctx: EnumResolverContext) => {\n      enumMembers: Required<PydanticFinal>['enumMembers'];\n      isNullable: boolean;\n    };\n  };\n  schema: SchemaWithType<'enum'>;\n}\n\nexport interface IntersectionResolverContext extends BaseContext {\n  applyModifiers: (result: PydanticResult, opts?: { optional?: boolean }) => PydanticFinal;\n  childResults: Array<PydanticResult>;\n  /**\n   * Nodes used to build different parts of the result.\n   */\n  nodes: {\n    base: (ctx: IntersectionResolverContext) => PydanticType;\n  };\n  parentSchema: IR.SchemaObject;\n  schema: IR.SchemaObject;\n}\n\nexport interface NeverResolverContext extends BaseContext {\n  /**\n   * Nodes used to build different parts of the result.\n   */\n  nodes: {\n    base: (ctx: NeverResolverContext) => PydanticType;\n  };\n  schema: SchemaWithType<'never'>;\n}\n\nexport interface NullResolverContext extends BaseContext {\n  /**\n   * Nodes used to build different parts of the result.\n   */\n  nodes: {\n    base: (ctx: NullResolverContext) => PydanticType;\n  };\n  schema: SchemaWithType<'null'>;\n}\n\nexport interface NumberResolverContext extends BaseContext {\n  /**\n   * Nodes used to build different parts of the result.\n   */\n  nodes: {\n    base: (ctx: NumberResolverContext) => PydanticType;\n    const: (ctx: NumberResolverContext) => PydanticType | undefined;\n  };\n  schema: SchemaWithType<'integer' | 'number'>;\n}\n\nexport interface ObjectResolverContext extends BaseContext {\n  _childResults: Array<PydanticResult>;\n  applyModifiers: (result: PydanticResult, opts: { optional?: boolean }) => PydanticFinal;\n  /**\n   * Nodes used to build different parts of the result.\n   */\n  nodes: {\n    additionalProperties: (ctx: ObjectResolverContext) => PydanticType | null | undefined;\n    base: (ctx: ObjectResolverContext) => PydanticType & { fields?: Array<PydanticField> };\n    fields: (ctx: ObjectResolverContext) => Array<PydanticField>;\n  };\n  schema: SchemaWithType<'object'>;\n  walk: Walker<PydanticResult, PydanticPlugin['Instance']>;\n  walkerCtx: SchemaVisitorContext<PydanticPlugin['Instance']>;\n}\n\nexport interface StringResolverContext extends BaseContext {\n  /**\n   * Nodes used to build different parts of the result.\n   */\n  nodes: {\n    base: (ctx: StringResolverContext) => PydanticType;\n    const: (ctx: StringResolverContext) => PydanticType | undefined;\n  };\n  schema: SchemaWithType<'string'>;\n}\n\nexport interface TupleResolverContext extends BaseContext {\n  applyModifiers: (result: PydanticResult, opts?: { optional?: boolean }) => PydanticFinal;\n  childResults: Array<PydanticResult>;\n  /**\n   * Nodes used to build different parts of the result.\n   */\n  nodes: {\n    base: (ctx: TupleResolverContext) => PydanticType;\n    const: (ctx: TupleResolverContext) => PydanticType | undefined;\n  };\n  schema: SchemaWithType<'tuple'>;\n  walk: Walker<PydanticResult, PydanticPlugin['Instance']>;\n  walkerCtx: SchemaVisitorContext<PydanticPlugin['Instance']>;\n}\n\nexport interface UndefinedResolverContext extends BaseContext {\n  /**\n   * Nodes used to build different parts of the result.\n   */\n  nodes: {\n    base: (ctx: UndefinedResolverContext) => PydanticType;\n  };\n  schema: SchemaWithType<'undefined'>;\n}\n\nexport interface UnionResolverContext extends BaseContext {\n  applyModifiers: (result: PydanticResult, opts?: { optional?: boolean }) => PydanticFinal;\n  childResults: Array<PydanticResult>;\n  /**\n   * Nodes used to build different parts of the result.\n   */\n  nodes: {\n    base: (ctx: UnionResolverContext) => PydanticType;\n  };\n  parentSchema: IR.SchemaObject;\n  schema: IR.SchemaObject;\n  schemas: ReadonlyArray<IR.SchemaObject>;\n}\n\nexport interface UnknownResolverContext extends BaseContext {\n  /**\n   * Nodes used to build different parts of the result.\n   */\n  nodes: {\n    base: (ctx: UnknownResolverContext) => PydanticType;\n  };\n  schema: SchemaWithType<'unknown'>;\n}\n\nexport interface VoidResolverContext extends BaseContext {\n  /**\n   * Nodes used to build different parts of the result.\n   */\n  nodes: {\n    base: (ctx: VoidResolverContext) => PydanticType;\n  };\n  schema: SchemaWithType<'void'>;\n}\n"
  },
  {
    "path": "packages/openapi-python/src/plugins/pydantic/shared/export.ts",
    "content": "import type { Symbol } from '@hey-api/codegen-core';\nimport { buildSymbolIn, pathToName } from '@hey-api/shared';\n\nimport { $ } from '../../../py-dsl';\nimport type { PydanticPlugin } from '../types';\nimport { identifiers } from '../v2/constants';\nimport { createFieldCall } from './field';\nimport type { ProcessorContext } from './processor';\nimport type { PydanticField, PydanticFinal } from './types';\n\nexport function exportAst({\n  final,\n  meta,\n  naming,\n  namingAnchor,\n  path,\n  plugin,\n  schema,\n  tags,\n}: ProcessorContext & {\n  final: PydanticFinal;\n}): void {\n  const name = pathToName(path, { anchor: namingAnchor });\n  const symbol = plugin.registerSymbol(\n    buildSymbolIn({\n      meta: {\n        category: 'schema',\n        path,\n        tags,\n        tool: 'pydantic',\n        ...meta,\n      },\n      name,\n      naming,\n      plugin,\n      schema,\n    }),\n  );\n\n  if (final.enumMembers) {\n    exportEnumClass({ final, plugin, symbol });\n  } else if (final.fields) {\n    exportClass({ final, plugin, symbol });\n  } else {\n    exportTypeAlias({ final, plugin, symbol });\n  }\n}\n\nfunction exportClass({\n  final,\n  plugin,\n  symbol,\n}: {\n  final: PydanticFinal;\n  plugin: PydanticPlugin['Instance'];\n  symbol: Symbol;\n}): void {\n  const baseModel = plugin.external('pydantic.BaseModel');\n  const classDef = $.class(symbol).extends(baseModel);\n\n  if (plugin.config.strict) {\n    const configDict = plugin.external('pydantic.ConfigDict');\n    classDef.do(\n      $.var(identifiers.model_config).assign($(configDict).call($.kwarg('extra', 'forbid'))),\n    );\n  }\n\n  for (const field of final.fields!) {\n    const fieldStatement = createFieldStatement(field, plugin);\n    classDef.do(fieldStatement);\n  }\n\n  plugin.node(classDef);\n}\n\nfunction exportEnumClass({\n  final,\n  plugin,\n  symbol,\n}: {\n  final: PydanticFinal;\n  plugin: PydanticPlugin['Instance'];\n  symbol: Symbol;\n}): void {\n  const members = final.enumMembers ?? [];\n  const hasStrings = members.some((m) => typeof m.value === 'string');\n  const hasNumbers = members.some((m) => typeof m.value === 'number');\n\n  const enumSymbol = plugin.external('enum.Enum');\n  const classDef = $.class(symbol).extends(enumSymbol);\n\n  if (hasStrings && !hasNumbers) {\n    classDef.extends('str');\n  } else if (!hasStrings && hasNumbers) {\n    classDef.extends('int');\n  }\n\n  for (const member of final.enumMembers ?? []) {\n    classDef.do($.var(member.name).assign($.literal(member.value)));\n  }\n\n  plugin.node(classDef);\n}\n\nfunction createFieldStatement(\n  field: PydanticField,\n  plugin: PydanticPlugin['Instance'],\n): ReturnType<typeof $.var> {\n  const fieldSymbol = field.name;\n  const varStatement = $.var(fieldSymbol).$if(field.type, (v, a) => v.type(a));\n\n  const originalName = field.originalName ?? fieldSymbol.name;\n  const needsAlias = field.originalName !== undefined && fieldSymbol.name !== originalName;\n\n  const constraints = {\n    ...field.fieldConstraints,\n    ...(needsAlias && !field.fieldConstraints?.alias && { alias: originalName }),\n  };\n\n  if (Object.keys(constraints).length > 0) {\n    const fieldCall = createFieldCall(constraints, plugin, {\n      required: !field.isOptional,\n    });\n    return varStatement.assign(fieldCall);\n  }\n\n  if (field.isOptional) {\n    return varStatement.assign('None');\n  }\n\n  return varStatement;\n}\n\nfunction exportTypeAlias({\n  final,\n  plugin,\n  symbol,\n}: {\n  final: PydanticFinal;\n  plugin: PydanticPlugin['Instance'];\n  symbol: Symbol;\n}): void {\n  const typeAlias = plugin.external('typing.TypeAlias');\n  const statement = $.var(symbol)\n    .type(typeAlias)\n    .assign(final.type ?? plugin.external('typing.Any'));\n  plugin.node(statement);\n}\n"
  },
  {
    "path": "packages/openapi-python/src/plugins/pydantic/shared/field.ts",
    "content": "import { $ } from '../../../py-dsl';\nimport type { PydanticPlugin } from '../types';\nimport type { FieldConstraints } from '../v2/constants';\n\ntype FieldArg = ReturnType<typeof $.expr | typeof $.kwarg | typeof $.literal>;\n\nexport function createFieldCall(\n  constraints: FieldConstraints,\n  plugin: PydanticPlugin['Instance'],\n  options?: {\n    /** If true, the field is required. */\n    required?: boolean;\n  },\n): ReturnType<typeof $.call> {\n  const field = plugin.external('pydantic.Field');\n  const args: Array<FieldArg> = [];\n\n  const isRequired = options?.required !== false && constraints.default === undefined;\n\n  // For required fields with no default, use ... as first arg\n  if (isRequired && constraints.default === undefined) {\n    args.push($('...'));\n  }\n\n  // TODO: move to DSL\n  // Add constraint arguments in a consistent order\n  const orderedKeys: Array<keyof FieldConstraints> = [\n    'default',\n    'default_factory',\n    'alias',\n    'title',\n    'description',\n    'gt',\n    'ge',\n    'lt',\n    'le',\n    'multiple_of',\n    'min_length',\n    'max_length',\n    'pattern',\n  ];\n\n  for (const key of orderedKeys) {\n    const value = constraints[key];\n    if (value === undefined) continue;\n\n    // Skip default if we already added ... for required fields\n    if (key === 'default' && isRequired) continue;\n\n    args.push($.kwarg(key, toKwargValue(value)));\n  }\n\n  return $(field).call(...(args as Array<Parameters<typeof $.call>[1]>));\n}\n\n/**\n * Converts a constraint value to a kwarg-compatible value.\n */\nfunction toKwargValue(value: unknown): string | number | boolean | null {\n  if (\n    value === null ||\n    typeof value === 'string' ||\n    typeof value === 'number' ||\n    typeof value === 'boolean'\n  ) {\n    return value;\n  }\n  // For complex types, stringify\n  return String(value);\n}\n"
  },
  {
    "path": "packages/openapi-python/src/plugins/pydantic/shared/meta.ts",
    "content": "import type { IR } from '@hey-api/shared';\n\nimport type { PydanticMeta, PydanticResult } from './types';\n\n/**\n * Creates default metadata from a schema.\n */\nexport function defaultMeta(schema: IR.SchemaObject): PydanticMeta {\n  return {\n    default: schema.default,\n    hasForwardReference: false,\n    nullable: false,\n    readonly: schema.accessScope === 'read',\n  };\n}\n\n/**\n * Composes metadata from child results.\n *\n * @param children - Results from walking child schemas\n * @param overrides - Explicit overrides (e.g., from parent schema)\n */\nexport function composeMeta(\n  children: ReadonlyArray<PydanticResult>,\n  overrides?: Partial<PydanticMeta>,\n): PydanticMeta {\n  return {\n    default: overrides?.default,\n    hasForwardReference:\n      overrides?.hasForwardReference ?? children.some((c) => c.meta.hasForwardReference),\n    nullable: overrides?.nullable ?? children.some((c) => c.meta.nullable),\n    readonly: overrides?.readonly ?? children.some((c) => c.meta.readonly),\n  };\n}\n\n/**\n * Merges parent schema metadata with composed child metadata.\n *\n * @param parent - The parent schema\n * @param children - Results from walking child schemas\n */\nexport function inheritMeta(\n  parent: IR.SchemaObject,\n  children: ReadonlyArray<PydanticResult>,\n): PydanticMeta {\n  return composeMeta(children, {\n    default: parent.default,\n    nullable: false,\n    readonly: parent.accessScope === 'read',\n  });\n}\n"
  },
  {
    "path": "packages/openapi-python/src/plugins/pydantic/shared/processor.ts",
    "content": "import type { IR, NamingConfig, SchemaProcessorContext } from '@hey-api/shared';\n\nimport type { PydanticPlugin } from '../types';\nimport type { PydanticFinal } from './types';\n\nexport type ProcessorContext = SchemaProcessorContext & {\n  /** Whether to export the result (default: true) */\n  export?: boolean;\n  naming: NamingConfig;\n  /** The plugin instance. */\n  plugin: PydanticPlugin['Instance'];\n  schema: IR.SchemaObject;\n};\n\nexport type ProcessorResult = {\n  process: (ctx: ProcessorContext) => PydanticFinal | void;\n};\n"
  },
  {
    "path": "packages/openapi-python/src/plugins/pydantic/shared/types.ts",
    "content": "import type { Symbol } from '@hey-api/codegen-core';\n\nimport type { VarType } from '../../../py-dsl';\nimport type { FieldConstraints } from '../v2/constants';\n\n/**\n * Return type for toType converters.\n */\nexport interface PydanticType {\n  fieldConstraints?: FieldConstraints;\n  type?: VarType;\n}\n\n/**\n * Metadata that flows through schema walking.\n */\nexport interface PydanticMeta {\n  /** Default value from schema. */\n  default?: unknown;\n  /** Whether this or any child contains a forward reference. */\n  hasForwardReference: boolean;\n  /** Does this schema explicitly allow null? */\n  nullable: boolean;\n  /** Is this schema read-only? */\n  readonly: boolean;\n}\n\n/**\n * Result from walking a schema node.\n */\nexport interface PydanticResult extends PydanticType {\n  enumMembers?: Array<{ name: Symbol; value: string | number }>;\n  fields?: Array<PydanticField>; // present = emit class, absent = emit type alias\n  meta: PydanticMeta;\n}\n\nexport interface PydanticField extends PydanticType {\n  isOptional: boolean;\n  name: Symbol;\n  originalName?: string;\n}\n\n/**\n * Finalized result after applyModifiers.\n */\nexport interface PydanticFinal\n  extends PydanticType, Pick<PydanticResult, 'enumMembers' | 'fields'> {}\n"
  },
  {
    "path": "packages/openapi-python/src/plugins/pydantic/types.ts",
    "content": "import type {\n  Casing,\n  DefinePlugin,\n  FeatureToggle,\n  NameTransformer,\n  NamingOptions,\n  Plugin,\n} from '@hey-api/shared';\n\nimport type { PydanticResolvers } from './resolvers';\n\nexport type UserConfig = Plugin.Name<'pydantic'> &\n  Plugin.Hooks &\n  Plugin.UserComments &\n  Plugin.UserExports &\n  PydanticResolvers & {\n    /**\n     * Casing convention for generated names.\n     *\n     * @default 'PascalCase'\n     */\n    case?: Casing;\n    /**\n     * Configuration for reusable schema definitions.\n     *\n     * Controls generation of shared Pydantic models that can be referenced\n     * across requests and responses.\n     *\n     * Can be:\n     * - `boolean`: Shorthand for `{ enabled: boolean }`\n     * - `string` or `function`: Shorthand for `{ name: string | function }`\n     * - `object`: Full configuration object\n     *\n     * @default true\n     */\n    definitions?:\n      | boolean\n      | NameTransformer\n      | {\n          /**\n           * Casing convention for generated names.\n           *\n           * @default 'PascalCase'\n           */\n          case?: Casing;\n          /**\n           * Whether this feature is enabled.\n           *\n           * @default true\n           */\n          enabled?: boolean;\n          /**\n           * Naming pattern for generated names.\n           *\n           * @default '{{name}}'\n           */\n          name?: NameTransformer;\n        };\n    /**\n     * How to generate enum types.\n     *\n     * - `'enum'`: Generate Python Enum classes (e.g., `class Status(str, Enum): ...`)\n     * - `'literal'`: Generate Literal type hints (e.g., `Literal[\"pending\", \"active\"]`)\n     *\n     * @default 'enum'\n     */\n    enums?: 'enum' | 'literal';\n    /**\n     * Configuration for request-specific Pydantic models.\n     *\n     * Controls generation of Pydantic models for request bodies,\n     * query parameters, path parameters, and headers.\n     *\n     * Can be:\n     * - `boolean`: Shorthand for `{ enabled: boolean }`\n     * - `string` or `function`: Shorthand for `{ name: string | function }`\n     * - `object`: Full configuration object\n     *\n     * @default true\n     */\n    requests?:\n      | boolean\n      | NameTransformer\n      | {\n          /**\n           * Casing convention for generated names.\n           *\n           * @default 'PascalCase'\n           */\n          case?: Casing;\n          /**\n           * Whether this feature is enabled.\n           *\n           * @default true\n           */\n          enabled?: boolean;\n          /**\n           * Naming pattern for generated names.\n           *\n           * @default '{{name}}Request'\n           */\n          name?: NameTransformer;\n        };\n    /**\n     * Configuration for response-specific Pydantic models.\n     *\n     * Controls generation of Pydantic models for response bodies,\n     * error responses, and status codes.\n     *\n     * Can be:\n     * - `boolean`: Shorthand for `{ enabled: boolean }`\n     * - `string` or `function`: Shorthand for `{ name: string | function }`\n     * - `object`: Full configuration object\n     *\n     * @default true\n     */\n    responses?:\n      | boolean\n      | NameTransformer\n      | {\n          /**\n           * Casing convention for generated names.\n           *\n           * @default 'PascalCase'\n           */\n          case?: Casing;\n          /**\n           * Whether this feature is enabled.\n           *\n           * @default true\n           */\n          enabled?: boolean;\n          /**\n           * Naming pattern for generated names.\n           *\n           * @default '{{name}}Response'\n           */\n          name?: NameTransformer;\n        };\n    /**\n     * Enable strict mode for Pydantic models?\n     *\n     * When enabled, extra fields not defined in the schema will be rejected.\n     *\n     * This adds `model_config = ConfigDict(extra='forbid')`\n     * to generated models.\n     *\n     * @default false\n     */\n    strict?: boolean;\n    /**\n     * Configuration for webhook-specific Pydantic models.\n     *\n     * Controls generation of Pydantic models for webhook payloads.\n     *\n     * Can be:\n     * - `boolean`: Shorthand for `{ enabled: boolean }`\n     * - `string` or `function`: Shorthand for `{ name: string | function }`\n     * - `object`: Full configuration object\n     *\n     * @default true\n     */\n    webhooks?:\n      | boolean\n      | NameTransformer\n      | {\n          /**\n           * Casing convention for generated names.\n           *\n           * @default 'PascalCase'\n           */\n          case?: Casing;\n          /**\n           * Whether this feature is enabled.\n           *\n           * @default true\n           */\n          enabled?: boolean;\n          /**\n           * Naming pattern for generated names.\n           *\n           * @default '{{name}}Webhook'\n           */\n          name?: NameTransformer;\n        };\n  };\n\nexport type Config = Plugin.Name<'pydantic'> &\n  Plugin.Hooks &\n  Plugin.Comments &\n  Plugin.Exports &\n  PydanticResolvers & {\n    /** Casing convention for generated names. */\n    case: Casing;\n    /** Configuration for reusable schema definitions. */\n    definitions: NamingOptions & FeatureToggle;\n    /** How to generate enum types. */\n    enums: 'enum' | 'literal';\n    /** Configuration for request-specific Pydantic models. */\n    requests: NamingOptions & FeatureToggle;\n    /** Configuration for response-specific Pydantic models. */\n    responses: NamingOptions & FeatureToggle;\n    /** Enable strict mode for Pydantic models? */\n    strict: boolean;\n    /** Configuration for webhook-specific Pydantic models. */\n    webhooks: NamingOptions & FeatureToggle;\n  };\n\nexport type PydanticPlugin = DefinePlugin<UserConfig, Config>;\n"
  },
  {
    "path": "packages/openapi-python/src/plugins/pydantic/v2/constants.ts",
    "content": "export const identifiers = {\n  model_config: 'model_config',\n};\n\nexport interface FieldConstraints {\n  /** Alias for the field name in serialization. */\n  alias?: string;\n  /** Default value for the field. */\n  default?: unknown;\n  /** Default factory function (for mutable defaults). */\n  default_factory?: string;\n  /** Description of the field. */\n  description?: string;\n  /** Greater than or equal constraint for numbers. */\n  ge?: number;\n  /** Greater than constraint for numbers. */\n  gt?: number;\n  /** Less than or equal constraint for numbers. */\n  le?: number;\n  /** Less than constraint for numbers. */\n  lt?: number;\n  /** Maximum length constraint for strings/arrays. */\n  max_length?: number;\n  /** Minimum length constraint for strings/arrays. */\n  min_length?: number;\n  /** Multiple of constraint for numbers. */\n  multiple_of?: number;\n  /** Regex pattern constraint for strings. */\n  pattern?: string;\n  /** Title for the field. */\n  title?: string;\n}\n"
  },
  {
    "path": "packages/openapi-python/src/plugins/pydantic/v2/plugin.ts",
    "content": "import { pathToJsonPointer } from '@hey-api/shared';\n\nimport type { PydanticPlugin } from '../types';\nimport { createProcessor } from './processor';\n\nexport const handlerV2: PydanticPlugin['Handler'] = ({ plugin }) => {\n  // enum\n  plugin.symbol('Enum', {\n    external: 'enum',\n    meta: {\n      category: 'external',\n      resource: 'enum.Enum',\n    },\n  });\n\n  // typing\n  plugin.symbol('Any', {\n    external: 'typing',\n    meta: {\n      category: 'external',\n      resource: 'typing.Any',\n    },\n  });\n  plugin.symbol('Literal', {\n    external: 'typing',\n    meta: {\n      category: 'external',\n      resource: 'typing.Literal',\n    },\n  });\n  plugin.symbol('NoReturn', {\n    external: 'typing',\n    meta: {\n      category: 'external',\n      resource: 'typing.NoReturn',\n    },\n  });\n  plugin.symbol('Optional', {\n    external: 'typing',\n    meta: {\n      category: 'external',\n      resource: 'typing.Optional',\n    },\n  });\n  plugin.symbol('TypeAlias', {\n    external: 'typing',\n    meta: {\n      category: 'external',\n      resource: 'typing.TypeAlias',\n    },\n  });\n  plugin.symbol('Union', {\n    external: 'typing',\n    meta: {\n      category: 'external',\n      resource: 'typing.Union',\n    },\n  });\n\n  // Pydantic\n  plugin.symbol('BaseModel', {\n    external: 'pydantic',\n    meta: {\n      category: 'external',\n      resource: 'pydantic.BaseModel',\n    },\n  });\n  plugin.symbol('ConfigDict', {\n    external: 'pydantic',\n    meta: {\n      category: 'external',\n      resource: 'pydantic.ConfigDict',\n    },\n  });\n  plugin.symbol('Field', {\n    external: 'pydantic',\n    meta: {\n      category: 'external',\n      resource: 'pydantic.Field',\n    },\n  });\n\n  const processor = createProcessor(plugin);\n\n  plugin.forEach('operation', 'parameter', 'requestBody', 'schema', 'webhook', (event) => {\n    switch (event.type) {\n      case 'parameter':\n        processor.process({\n          meta: {\n            resource: 'definition',\n            resourceId: pathToJsonPointer(event._path),\n          },\n          naming: plugin.config.definitions,\n          path: event._path,\n          plugin,\n          schema: event.parameter.schema,\n          tags: event.tags,\n        });\n        break;\n      case 'requestBody':\n        processor.process({\n          meta: {\n            resource: 'definition',\n            resourceId: pathToJsonPointer(event._path),\n          },\n          naming: plugin.config.definitions,\n          path: event._path,\n          plugin,\n          schema: event.requestBody.schema,\n          tags: event.tags,\n        });\n        break;\n      case 'schema':\n        processor.process({\n          meta: {\n            resource: 'definition',\n            resourceId: pathToJsonPointer(event._path),\n          },\n          naming: plugin.config.definitions,\n          path: event._path,\n          plugin,\n          schema: event.schema,\n          tags: event.tags,\n        });\n        break;\n    }\n  });\n};\n"
  },
  {
    "path": "packages/openapi-python/src/plugins/pydantic/v2/processor.ts",
    "content": "import { ref } from '@hey-api/codegen-core';\nimport type { Hooks, IR } from '@hey-api/shared';\nimport { createSchemaProcessor, createSchemaWalker, pathToJsonPointer } from '@hey-api/shared';\n\nimport { exportAst } from '../shared/export';\nimport type { ProcessorContext, ProcessorResult } from '../shared/processor';\nimport type { PydanticFinal } from '../shared/types';\nimport type { PydanticPlugin } from '../types';\nimport { createVisitor } from './walker';\n\nexport function createProcessor(plugin: PydanticPlugin['Instance']): ProcessorResult {\n  const processor = createSchemaProcessor();\n\n  const extractorHooks: ReadonlyArray<NonNullable<Hooks['schemas']>['shouldExtract']> = [\n    (ctx) =>\n      ctx.schema.type === 'object' &&\n      ctx.schema.properties !== undefined &&\n      Object.keys(ctx.schema.properties).length > 0,\n    (ctx) =>\n      ctx.schema.type === 'enum' && ctx.schema.items !== undefined && ctx.schema.items.length > 0,\n    plugin.config['~hooks']?.schemas?.shouldExtract,\n    plugin.context.config.parser.hooks.schemas?.shouldExtract,\n  ];\n\n  function extractor(ctx: ProcessorContext): IR.SchemaObject {\n    if (processor.hasEmitted(ctx.path)) {\n      return ctx.schema;\n    }\n\n    for (const hook of extractorHooks) {\n      const result = hook?.(ctx);\n      if (result) {\n        process({\n          namingAnchor: processor.context.anchor,\n          tags: processor.context.tags,\n          ...ctx,\n        });\n        return { $ref: pathToJsonPointer(ctx.path) };\n      }\n    }\n\n    return ctx.schema;\n  }\n\n  function process(ctx: ProcessorContext): PydanticFinal | void {\n    if (!processor.markEmitted(ctx.path)) return;\n\n    const shouldExport = ctx.export !== false;\n\n    return processor.withContext({ anchor: ctx.namingAnchor, tags: ctx.tags }, () => {\n      const visitor = createVisitor({ schemaExtractor: extractor });\n      const walk = createSchemaWalker(visitor);\n\n      const result = walk(ctx.schema, {\n        path: ref(ctx.path),\n        plugin,\n      });\n\n      const final = visitor.applyModifiers(result, {\n        path: ref(ctx.path),\n        plugin,\n      }) as PydanticFinal;\n\n      if (shouldExport) {\n        exportAst({ ...ctx, final, plugin });\n        return;\n      }\n\n      return final;\n    });\n  }\n\n  return { process };\n}\n"
  },
  {
    "path": "packages/openapi-python/src/plugins/pydantic/v2/toAst/array.ts",
    "content": "import type { SchemaVisitorContext, SchemaWithType, Walker } from '@hey-api/shared';\nimport { childContext, deduplicateSchema } from '@hey-api/shared';\n\nimport { $ } from '../../../../py-dsl';\nimport type { ArrayResolverContext } from '../../resolvers';\nimport type { PydanticFinal, PydanticResult, PydanticType } from '../../shared/types';\nimport type { PydanticPlugin } from '../../types';\nimport type { FieldConstraints } from '../constants';\n\nfunction baseNode(ctx: ArrayResolverContext): PydanticType {\n  const { applyModifiers, childResults, plugin } = ctx;\n  const any = plugin.external('typing.Any');\n\n  if (childResults.length === 0) {\n    return {\n      type: $('list').slice(any),\n    };\n  }\n\n  if (childResults.length === 1) {\n    const itemResult = applyModifiers(childResults[0]!);\n    return {\n      type: $('list').slice(itemResult.type ?? any),\n    };\n  }\n\n  if (childResults.length > 1) {\n    const union = plugin.external('typing.Union');\n    const itemTypes = childResults.map((r) => applyModifiers(r).type ?? any);\n    return {\n      type: $('list').slice($(union).slice(...itemTypes)),\n    };\n  }\n\n  return {\n    type: $('list').slice(any),\n  };\n}\n\nfunction minLengthNode(ctx: ArrayResolverContext): PydanticType | undefined {\n  const { schema } = ctx;\n  if (schema.minItems === undefined) return;\n  return {\n    fieldConstraints: { min_length: schema.minItems },\n  };\n}\n\nfunction maxLengthNode(ctx: ArrayResolverContext): PydanticType | undefined {\n  const { schema } = ctx;\n  if (schema.maxItems === undefined) return;\n  return {\n    fieldConstraints: { max_length: schema.maxItems },\n  };\n}\n\nfunction arrayResolver(ctx: ArrayResolverContext): PydanticType {\n  const baseResult = ctx.nodes.base(ctx);\n  const minLengthResult = ctx.nodes.minLength(ctx);\n  const maxLengthResult = ctx.nodes.maxLength(ctx);\n\n  const fieldConstraints: FieldConstraints = {\n    ...(baseResult.fieldConstraints ?? {}),\n    ...(minLengthResult?.fieldConstraints ?? {}),\n    ...(maxLengthResult?.fieldConstraints ?? {}),\n  };\n\n  if (ctx.schema.description !== undefined) {\n    fieldConstraints.description = ctx.schema.description;\n  }\n\n  return {\n    ...baseResult,\n    fieldConstraints: Object.keys(fieldConstraints).length > 0 ? fieldConstraints : undefined,\n  };\n}\n\nexport interface ArrayToTypeResult extends PydanticType {\n  childResults: Array<PydanticResult>;\n}\n\nexport function arrayToType(ctx: {\n  applyModifiers: (result: PydanticResult, options?: { optional?: boolean }) => PydanticFinal;\n  plugin: PydanticPlugin['Instance'];\n  schema: SchemaWithType<'array'>;\n  walk: Walker<PydanticResult, PydanticPlugin['Instance']>;\n  walkerCtx: SchemaVisitorContext<PydanticPlugin['Instance']>;\n}): ArrayToTypeResult {\n  const { applyModifiers, plugin, schema, walk, walkerCtx } = ctx;\n  const any = plugin.external('typing.Any');\n\n  const childResults: Array<PydanticResult> = [];\n\n  if (schema.items) {\n    const normalizedSchema = deduplicateSchema({ schema });\n    for (let i = 0; i < normalizedSchema.items!.length; i++) {\n      const item = normalizedSchema.items![i]!;\n      const result = walk(item, childContext(walkerCtx, 'items', i));\n      childResults.push(result);\n    }\n  }\n\n  const resolverCtx: ArrayResolverContext = {\n    $,\n    applyModifiers,\n    childResults,\n    nodes: {\n      base: baseNode,\n      maxLength: maxLengthNode,\n      minLength: minLengthNode,\n    },\n    plugin,\n    schema,\n    walk,\n    walkerCtx,\n  };\n\n  const resolver = plugin.config['~resolvers']?.array;\n  const resolved = resolver?.(resolverCtx) ?? arrayResolver(resolverCtx);\n\n  if (!resolved.type) {\n    resolved.type = $('list').slice(any);\n  }\n\n  return {\n    ...resolved,\n    childResults,\n  };\n}\n"
  },
  {
    "path": "packages/openapi-python/src/plugins/pydantic/v2/toAst/boolean.ts",
    "content": "import type { SchemaWithType } from '@hey-api/shared';\n\nimport { $ } from '../../../../py-dsl';\nimport type { BooleanResolverContext } from '../../resolvers';\nimport type { PydanticType } from '../../shared/types';\nimport type { PydanticPlugin } from '../../types';\n\nfunction constNode(ctx: BooleanResolverContext): PydanticType | undefined {\n  const { plugin, schema } = ctx;\n\n  if (typeof schema.const === 'boolean') {\n    const literal = plugin.external('typing.Literal');\n    return {\n      type: $(literal).slice($.literal(schema.const)),\n    };\n  }\n}\n\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\nfunction baseNode(_ctx: BooleanResolverContext): PydanticType {\n  return {\n    type: 'bool',\n  };\n}\n\nfunction booleanResolver(ctx: BooleanResolverContext): PydanticType {\n  const constResult = ctx.nodes.const(ctx);\n  if (constResult) return constResult;\n\n  return ctx.nodes.base(ctx);\n}\n\nexport function booleanToType({\n  plugin,\n  schema,\n}: {\n  plugin: PydanticPlugin['Instance'];\n  schema: SchemaWithType<'boolean'>;\n}): PydanticType {\n  const ctx: BooleanResolverContext = {\n    $,\n    nodes: {\n      base: baseNode,\n      const: constNode,\n    },\n    plugin,\n    schema,\n  };\n\n  const resolver = plugin.config['~resolvers']?.boolean;\n  return resolver?.(ctx) ?? booleanResolver(ctx);\n}\n"
  },
  {
    "path": "packages/openapi-python/src/plugins/pydantic/v2/toAst/enum.ts",
    "content": "import type { SchemaWithType } from '@hey-api/shared';\nimport { toCase } from '@hey-api/shared';\n\nimport { $ } from '../../../../py-dsl';\nimport type { EnumResolverContext } from '../../resolvers';\nimport type { PydanticFinal, PydanticType } from '../../shared/types';\nimport type { PydanticPlugin } from '../../types';\n\nexport interface EnumToTypeResult extends PydanticType {\n  enumMembers: Required<PydanticFinal>['enumMembers'];\n  isNullable: boolean;\n}\n\n// TODO: replace with casing utils\nfunction toEnumMemberName(value: string | number): string {\n  if (typeof value === 'number') {\n    // For numbers, prefix with underscore if starts with digit\n    return `VALUE_${value}`.replace(/-/g, '_NEG_').replace(/\\./g, '_DOT_');\n  }\n\n  return toCase(value, 'SCREAMING_SNAKE_CASE');\n}\n\nfunction itemsNode(ctx: EnumResolverContext) {\n  const { plugin, schema } = ctx;\n  const enumMembers: Required<PydanticFinal>['enumMembers'] = [];\n  let isNullable = false;\n\n  for (const item of schema.items ?? []) {\n    if (item.type === 'null' || item.const === null) {\n      isNullable = true;\n      continue;\n    }\n\n    if (\n      (item.type === 'string' && typeof item.const === 'string') ||\n      ((item.type === 'integer' || item.type === 'number') && typeof item.const === 'number')\n    ) {\n      enumMembers.push({\n        name: plugin.symbol(toEnumMemberName(item.const)),\n        value: item.const,\n      });\n    }\n  }\n\n  return { enumMembers, isNullable };\n}\n\nfunction baseNode(ctx: EnumResolverContext): PydanticType {\n  const { plugin } = ctx;\n  const { enumMembers } = ctx.nodes.items(ctx);\n\n  if (enumMembers.length === 0) {\n    return {\n      type: plugin.external('typing.Any'),\n    };\n  }\n\n  const mode = plugin.config.enums ?? 'enum';\n\n  if (mode === 'literal') {\n    if (enumMembers.length === 0) {\n      return {\n        type: plugin.external('typing.Any'),\n      };\n    }\n\n    const literal = plugin.external('typing.Literal');\n    const values = enumMembers.map((m) =>\n      // TODO: replace\n      typeof m.value === 'string' ? `\"<<<<${m.value}\"` : `<<<${m.value}`,\n    );\n\n    return {\n      type: $(literal).slice(...values),\n    };\n  }\n\n  return {};\n}\n\nfunction enumResolver(ctx: EnumResolverContext): PydanticType {\n  return ctx.nodes.base(ctx);\n}\n\nexport function enumToType({\n  plugin,\n  schema,\n}: {\n  plugin: PydanticPlugin['Instance'];\n  schema: SchemaWithType<'enum'>;\n}): EnumToTypeResult {\n  const ctx: EnumResolverContext = {\n    $,\n    nodes: {\n      base: baseNode,\n      items: itemsNode,\n    },\n    plugin,\n    schema,\n  };\n\n  const resolver = plugin.config['~resolvers']?.enum;\n  const resolved = resolver?.(ctx) ?? enumResolver(ctx);\n\n  const { enumMembers, isNullable } = ctx.nodes.items(ctx);\n\n  return {\n    ...resolved,\n    enumMembers,\n    isNullable,\n  };\n}\n"
  },
  {
    "path": "packages/openapi-python/src/plugins/pydantic/v2/toAst/intersection.ts",
    "content": "import type { IR } from '@hey-api/shared';\n\nimport { $, type VarType } from '../../../../py-dsl';\nimport type { IntersectionResolverContext } from '../../resolvers';\nimport type {\n  PydanticField,\n  PydanticFinal,\n  PydanticResult,\n  PydanticType,\n} from '../../shared/types';\nimport type { PydanticPlugin } from '../../types';\nimport type { FieldConstraints } from '../constants';\n\nfunction baseNode(ctx: IntersectionResolverContext): PydanticType {\n  const { applyModifiers, childResults, plugin } = ctx;\n\n  if (childResults.length === 0) {\n    return {\n      type: plugin.external('typing.Any'),\n    };\n  }\n\n  if (childResults.length === 1) {\n    const finalResult = applyModifiers(childResults[0]!);\n    return finalResult;\n  }\n\n  const baseClasses: Array<string> = [];\n  const mergedFields: Array<PydanticField> = [];\n  const seenFieldIds = new Set<number>();\n\n  for (const result of childResults) {\n    const finalResult = applyModifiers(result);\n\n    // TODO: replace\n    const typeStr = String(finalResult.type);\n    const isReference =\n      !finalResult.fields &&\n      typeStr !== '' &&\n      !typeStr.startsWith('dict[') &&\n      !typeStr.startsWith('Dict[') &&\n      typeStr !== String(plugin.external('typing.Any'));\n\n    if (isReference) {\n      const baseName = typeStr.replace(/^'|'$/g, '');\n      if (baseName && !baseClasses.includes(baseName)) {\n        baseClasses.push(baseName);\n      }\n    }\n\n    if (finalResult.fields) {\n      for (const field of finalResult.fields) {\n        if (!seenFieldIds.has(field.name.id)) {\n          seenFieldIds.add(field.name.id);\n          mergedFields.push(field);\n        }\n      }\n    }\n  }\n\n  let type: VarType;\n\n  if (baseClasses.length > 0 && mergedFields.length === 0) {\n    type = baseClasses[0]!;\n  } else if (mergedFields.length > 0) {\n    // TODO: replace\n    type = '__INTERSECTION_PLACEHOLDER__';\n  } else {\n    type = plugin.external('typing.Any');\n  }\n\n  return {\n    type,\n  };\n}\n\nfunction intersectionResolver(ctx: IntersectionResolverContext): PydanticType {\n  return ctx.nodes.base(ctx);\n}\n\nexport interface IntersectionToTypeResult extends PydanticType {\n  baseClasses?: Array<string>;\n  childResults: Array<PydanticResult>;\n  mergedFields?: Array<PydanticField>;\n}\n\nexport function intersectionToType({\n  applyModifiers,\n  childResults,\n  parentSchema,\n  plugin,\n}: {\n  applyModifiers: (result: PydanticResult, options?: { optional?: boolean }) => PydanticFinal;\n  childResults: Array<PydanticResult>;\n  parentSchema: IR.SchemaObject;\n  plugin: PydanticPlugin['Instance'];\n}): IntersectionToTypeResult {\n  const constraints: FieldConstraints = {};\n\n  if (parentSchema.description !== undefined) {\n    constraints.description = parentSchema.description;\n  }\n\n  const resolverCtx: IntersectionResolverContext = {\n    $,\n    applyModifiers,\n    childResults,\n    nodes: {\n      base: baseNode,\n    },\n    parentSchema,\n    plugin,\n    schema: parentSchema,\n  };\n\n  const resolver = plugin.config['~resolvers']?.intersection;\n  const resolved = resolver?.(resolverCtx) ?? intersectionResolver(resolverCtx);\n\n  const baseClasses: Array<string> = [];\n  const mergedFields: Array<PydanticField> = [];\n  const seenFieldIds = new Set<number>();\n\n  for (const result of childResults) {\n    const finalResult = applyModifiers(result);\n\n    // TODO: replace\n    const typeStr = String(finalResult.type);\n    const isReference =\n      !finalResult.fields &&\n      typeStr !== '' &&\n      !typeStr.startsWith('dict[') &&\n      !typeStr.startsWith('Dict[') &&\n      typeStr !== String(plugin.external('typing.Any'));\n\n    if (isReference) {\n      const baseName = typeStr.replace(/^'|'$/g, '');\n      if (baseName && !baseClasses.includes(baseName)) {\n        baseClasses.push(baseName);\n      }\n    }\n\n    if (finalResult.fields) {\n      for (const field of finalResult.fields) {\n        if (!seenFieldIds.has(field.name.id)) {\n          seenFieldIds.add(field.name.id);\n          mergedFields.push(field);\n        }\n      }\n    }\n  }\n\n  return {\n    ...resolved,\n    baseClasses: baseClasses.length > 0 ? baseClasses : undefined,\n    childResults,\n    fieldConstraints:\n      Object.keys(constraints).length > 0\n        ? { ...constraints, ...resolved.fieldConstraints }\n        : resolved.fieldConstraints,\n    mergedFields: mergedFields.length > 0 ? mergedFields : undefined,\n  };\n}\n"
  },
  {
    "path": "packages/openapi-python/src/plugins/pydantic/v2/toAst/never.ts",
    "content": "import type { SchemaWithType } from '@hey-api/shared';\n\nimport { $ } from '../../../../py-dsl';\nimport type { NeverResolverContext } from '../../resolvers';\nimport type { PydanticType } from '../../shared/types';\nimport type { PydanticPlugin } from '../../types';\n\nfunction baseNode(ctx: NeverResolverContext): PydanticType {\n  const { plugin } = ctx;\n  return {\n    type: plugin.external('typing.NoReturn'),\n  };\n}\n\nfunction neverResolver(ctx: NeverResolverContext): PydanticType {\n  return ctx.nodes.base(ctx);\n}\n\nexport function neverToType({\n  plugin,\n  schema,\n}: {\n  plugin: PydanticPlugin['Instance'];\n  schema: SchemaWithType<'never'>;\n}): PydanticType {\n  const ctx: NeverResolverContext = {\n    $,\n    nodes: {\n      base: baseNode,\n    },\n    plugin,\n    schema,\n  };\n\n  const resolver = plugin.config['~resolvers']?.never;\n  return resolver?.(ctx) ?? neverResolver(ctx);\n}\n"
  },
  {
    "path": "packages/openapi-python/src/plugins/pydantic/v2/toAst/null.ts",
    "content": "import type { SchemaWithType } from '@hey-api/shared';\n\nimport { $ } from '../../../../py-dsl';\nimport type { NullResolverContext } from '../../resolvers';\nimport type { PydanticType } from '../../shared/types';\nimport type { PydanticPlugin } from '../../types';\n\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\nfunction baseNode(_ctx: NullResolverContext): PydanticType {\n  return {\n    type: 'None',\n  };\n}\n\nfunction nullResolver(ctx: NullResolverContext): PydanticType {\n  return ctx.nodes.base(ctx);\n}\n\nexport function nullToType({\n  plugin,\n  schema,\n}: {\n  plugin: PydanticPlugin['Instance'];\n  schema: SchemaWithType<'null'>;\n}): PydanticType {\n  const ctx: NullResolverContext = {\n    $,\n    nodes: {\n      base: baseNode,\n    },\n    plugin,\n    schema,\n  };\n\n  const resolver = plugin.config['~resolvers']?.null;\n  return resolver?.(ctx) ?? nullResolver(ctx);\n}\n"
  },
  {
    "path": "packages/openapi-python/src/plugins/pydantic/v2/toAst/number.ts",
    "content": "import type { SchemaWithType } from '@hey-api/shared';\n\nimport { $ } from '../../../../py-dsl';\nimport type { NumberResolverContext } from '../../resolvers';\nimport type { PydanticType } from '../../shared/types';\nimport type { PydanticPlugin } from '../../types';\nimport type { FieldConstraints } from '../constants';\n\nfunction constNode(ctx: NumberResolverContext): PydanticType | undefined {\n  const { plugin, schema } = ctx;\n\n  if (typeof schema.const === 'number') {\n    const literal = plugin.external('typing.Literal');\n    return {\n      type: $(literal).slice($.literal(schema.const)),\n    };\n  }\n}\n\nfunction baseNode(ctx: NumberResolverContext): PydanticType {\n  const { schema } = ctx;\n\n  const constraints: FieldConstraints = {};\n\n  if (schema.minimum !== undefined) {\n    constraints.ge = schema.minimum;\n  }\n\n  if (schema.exclusiveMinimum !== undefined) {\n    constraints.gt = schema.exclusiveMinimum;\n  }\n\n  if (schema.maximum !== undefined) {\n    constraints.le = schema.maximum;\n  }\n\n  if (schema.exclusiveMaximum !== undefined) {\n    constraints.lt = schema.exclusiveMaximum;\n  }\n\n  if (schema.description !== undefined) {\n    constraints.description = schema.description;\n  }\n\n  return {\n    fieldConstraints: constraints,\n    type: schema.type === 'integer' ? 'int' : 'float',\n  };\n}\n\nfunction numberResolver(ctx: NumberResolverContext): PydanticType {\n  const constResult = ctx.nodes.const(ctx);\n  if (constResult) return constResult;\n\n  return ctx.nodes.base(ctx);\n}\n\nexport function numberToType({\n  plugin,\n  schema,\n}: {\n  plugin: PydanticPlugin['Instance'];\n  schema: SchemaWithType<'integer' | 'number'>;\n}): PydanticType {\n  const ctx: NumberResolverContext = {\n    $,\n    nodes: {\n      base: baseNode,\n      const: constNode,\n    },\n    plugin,\n    schema,\n  };\n\n  const resolver = plugin.config['~resolvers']?.number;\n  return resolver?.(ctx) ?? numberResolver(ctx);\n}\n"
  },
  {
    "path": "packages/openapi-python/src/plugins/pydantic/v2/toAst/object.ts",
    "content": "import { childContext, toCase } from '@hey-api/shared';\n\nimport { $ } from '../../../../py-dsl';\nimport { safeRuntimeName } from '../../../../py-dsl/utils/name';\nimport type { ObjectResolverContext } from '../../resolvers';\nimport type { PydanticField, PydanticResult, PydanticType } from '../../shared/types';\n\nexport interface ObjectToFieldsResult extends Pick<PydanticResult, 'fields' | 'type'> {\n  childResults: Array<PydanticResult>;\n}\n\nfunction additionalPropertiesNode(ctx: ObjectResolverContext): PydanticType | null | undefined {\n  const { schema } = ctx;\n\n  if (!schema.additionalProperties || !schema.additionalProperties.type) return;\n  if (schema.additionalProperties.type === 'never') return null;\n\n  const result = ctx.walk(\n    schema.additionalProperties,\n    childContext(ctx.walkerCtx, 'additionalProperties'),\n  );\n  ctx._childResults.push(result);\n\n  return {\n    type: result.type,\n  };\n}\n\nfunction fieldsNode(ctx: ObjectResolverContext): Array<PydanticField> {\n  const { schema } = ctx;\n  const fields: Array<PydanticField> = [];\n\n  for (const name in schema.properties) {\n    const property = schema.properties[name]!;\n    const isOptional = !schema.required?.includes(name);\n\n    const propertyResult = ctx.walk(property, childContext(ctx.walkerCtx, 'properties', name));\n    ctx._childResults.push(propertyResult);\n\n    const final = ctx.applyModifiers(propertyResult, { optional: isOptional });\n    const snakeCaseName = safeRuntimeName(toCase(name, 'snake_case'));\n    fields.push({\n      fieldConstraints: final.fieldConstraints,\n      isOptional,\n      name: ctx.plugin.symbol(snakeCaseName),\n      originalName: name,\n      type: final.type,\n    });\n  }\n\n  return fields;\n}\n\nfunction baseNode(ctx: ObjectResolverContext): PydanticType & { fields?: Array<PydanticField> } {\n  const additional = additionalPropertiesNode(ctx);\n\n  if (additional === null) {\n    const fields = fieldsNode(ctx);\n    return { fields };\n  }\n\n  if (additional) {\n    const any = ctx.plugin.external('typing.Any');\n    if (!ctx.schema.properties) {\n      return { type: $('dict').slice('str', any) };\n    }\n    return { type: $('dict').slice('str', any) };\n  }\n\n  // TODO: consider model_config = ConfigDict(extra='allow')\n  if (ctx.schema.properties) {\n    const fields = fieldsNode(ctx);\n    return { fields };\n  }\n\n  const any = ctx.plugin.external('typing.Any');\n  return { type: $('dict').slice('str', any) };\n}\n\nfunction objectResolver(ctx: ObjectResolverContext): PydanticType {\n  return ctx.nodes.base(ctx);\n}\n\nexport function objectToFields(\n  ctx: Pick<ObjectResolverContext, 'applyModifiers' | 'plugin' | 'schema' | 'walk' | 'walkerCtx'>,\n): ObjectToFieldsResult {\n  const { applyModifiers, plugin, schema, walk, walkerCtx } = ctx;\n  const childResults: Array<PydanticResult> = [];\n\n  const extendedCtx: ObjectResolverContext = {\n    $,\n    _childResults: childResults,\n    applyModifiers,\n    nodes: {\n      additionalProperties: additionalPropertiesNode,\n      base: baseNode,\n      fields: fieldsNode,\n    },\n    plugin,\n    schema,\n    walk,\n    walkerCtx,\n  };\n\n  const resolver = plugin.config['~resolvers']?.object;\n  const resolved = resolver?.(extendedCtx) ?? objectResolver(extendedCtx);\n\n  const childResultsFinal = extendedCtx._childResults;\n\n  return { childResults: childResultsFinal, ...resolved };\n}\n"
  },
  {
    "path": "packages/openapi-python/src/plugins/pydantic/v2/toAst/string.ts",
    "content": "import type { SchemaWithType } from '@hey-api/shared';\n\nimport { $ } from '../../../../py-dsl';\nimport type { StringResolverContext } from '../../resolvers';\nimport type { PydanticType } from '../../shared/types';\nimport type { PydanticPlugin } from '../../types';\nimport type { FieldConstraints } from '../constants';\n\nfunction constNode(ctx: StringResolverContext): PydanticType | undefined {\n  const { plugin, schema } = ctx;\n\n  if (typeof schema.const === 'string') {\n    const literal = plugin.external('typing.Literal');\n    return {\n      type: $(literal).slice($.literal(schema.const)),\n    };\n  }\n}\n\nfunction baseNode(ctx: StringResolverContext): PydanticType {\n  const { schema } = ctx;\n\n  const constraints: FieldConstraints = {};\n\n  if (schema.minLength !== undefined) {\n    constraints.min_length = schema.minLength;\n  }\n\n  if (schema.maxLength !== undefined) {\n    constraints.max_length = schema.maxLength;\n  }\n\n  if (schema.pattern !== undefined) {\n    constraints.pattern = schema.pattern;\n  }\n\n  if (schema.description !== undefined) {\n    constraints.description = schema.description;\n  }\n\n  return {\n    fieldConstraints: constraints,\n    type: 'str',\n  };\n}\n\nfunction stringResolver(ctx: StringResolverContext): PydanticType {\n  const constResult = ctx.nodes.const(ctx);\n  if (constResult) return constResult;\n\n  return ctx.nodes.base(ctx);\n}\n\nexport function stringToType({\n  plugin,\n  schema,\n}: {\n  plugin: PydanticPlugin['Instance'];\n  schema: SchemaWithType<'string'>;\n}): PydanticType {\n  const ctx: StringResolverContext = {\n    $,\n    nodes: {\n      base: baseNode,\n      const: constNode,\n    },\n    plugin,\n    schema,\n  };\n\n  const resolver = plugin.config['~resolvers']?.string;\n  return resolver?.(ctx) ?? stringResolver(ctx);\n}\n"
  },
  {
    "path": "packages/openapi-python/src/plugins/pydantic/v2/toAst/tuple.ts",
    "content": "import type { SchemaVisitorContext, SchemaWithType, Walker } from '@hey-api/shared';\nimport { childContext } from '@hey-api/shared';\n\nimport { $, type VarType } from '../../../../py-dsl';\nimport type { TupleResolverContext } from '../../resolvers';\nimport type { PydanticFinal, PydanticResult, PydanticType } from '../../shared/types';\nimport type { PydanticPlugin } from '../../types';\nimport type { FieldConstraints } from '../constants';\n\nfunction baseNode(ctx: TupleResolverContext): PydanticType {\n  const { applyModifiers, childResults, plugin } = ctx;\n\n  const tuple = plugin.external('typing.Tuple');\n  const any = plugin.external('typing.Any');\n\n  if (childResults.length === 0) {\n    return {\n      type: $(tuple).slice(),\n    };\n  }\n\n  const itemTypes: Array<VarType> = [];\n\n  for (const result of childResults) {\n    const finalResult = applyModifiers(result);\n    if (finalResult.type !== undefined) {\n      itemTypes.push(finalResult.type);\n    }\n  }\n\n  if (itemTypes.length === 0) {\n    return {\n      type: $(tuple).slice(any, '...'),\n    };\n  }\n\n  return {\n    type: $(tuple).slice(...itemTypes),\n  };\n}\n\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\nfunction constNode(_ctx: TupleResolverContext): PydanticType | undefined {\n  return;\n}\n\nfunction tupleResolver(ctx: TupleResolverContext): PydanticType {\n  const baseResult = ctx.nodes.base(ctx);\n\n  const fieldConstraints: FieldConstraints = {\n    ...(baseResult.fieldConstraints ?? {}),\n  };\n\n  if (ctx.schema.description !== undefined) {\n    fieldConstraints.description = ctx.schema.description;\n  }\n\n  return {\n    ...baseResult,\n    fieldConstraints: Object.keys(fieldConstraints).length > 0 ? fieldConstraints : undefined,\n  };\n}\n\nexport interface TupleToTypeResult extends PydanticType {\n  childResults: Array<PydanticResult>;\n}\n\nexport function tupleToType(ctx: {\n  applyModifiers: (result: PydanticResult, options?: { optional?: boolean }) => PydanticFinal;\n  plugin: PydanticPlugin['Instance'];\n  schema: SchemaWithType<'tuple'>;\n  walk: Walker<PydanticResult, PydanticPlugin['Instance']>;\n  walkerCtx: SchemaVisitorContext<PydanticPlugin['Instance']>;\n}): TupleToTypeResult {\n  const { applyModifiers, plugin, schema, walk, walkerCtx } = ctx;\n\n  const childResults: Array<PydanticResult> = [];\n\n  if (schema.items && schema.items.length > 0) {\n    for (let i = 0; i < schema.items.length; i++) {\n      const item = schema.items[i]!;\n      const result = walk(item, childContext(walkerCtx, 'items', i));\n      childResults.push(result);\n    }\n  }\n\n  const resolverCtx: TupleResolverContext = {\n    $,\n    applyModifiers,\n    childResults,\n    nodes: {\n      base: baseNode,\n      const: constNode,\n    },\n    plugin,\n    schema,\n    walk,\n    walkerCtx,\n  };\n\n  const resolver = plugin.config['~resolvers']?.tuple;\n  const resolved = resolver?.(resolverCtx) ?? tupleResolver(resolverCtx);\n\n  return {\n    ...resolved,\n    childResults,\n  };\n}\n"
  },
  {
    "path": "packages/openapi-python/src/plugins/pydantic/v2/toAst/undefined.ts",
    "content": "import type { SchemaWithType } from '@hey-api/shared';\n\nimport { $ } from '../../../../py-dsl';\nimport type { UndefinedResolverContext } from '../../resolvers';\nimport type { PydanticType } from '../../shared/types';\nimport type { PydanticPlugin } from '../../types';\n\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\nfunction baseNode(_ctx: UndefinedResolverContext): PydanticType {\n  return {\n    type: 'None',\n  };\n}\n\nfunction undefinedResolver(ctx: UndefinedResolverContext): PydanticType {\n  return ctx.nodes.base(ctx);\n}\n\nexport function undefinedToType({\n  plugin,\n  schema,\n}: {\n  plugin: PydanticPlugin['Instance'];\n  schema: SchemaWithType<'undefined'>;\n}): PydanticType {\n  const ctx: UndefinedResolverContext = {\n    $,\n    nodes: {\n      base: baseNode,\n    },\n    plugin,\n    schema,\n  };\n\n  const resolver = plugin.config['~resolvers']?.undefined;\n  return resolver?.(ctx) ?? undefinedResolver(ctx);\n}\n"
  },
  {
    "path": "packages/openapi-python/src/plugins/pydantic/v2/toAst/union.ts",
    "content": "import type { IR } from '@hey-api/shared';\n\nimport { $ } from '../../../../py-dsl';\nimport type { UnionResolverContext } from '../../resolvers';\nimport type { PydanticFinal, PydanticResult, PydanticType } from '../../shared/types';\nimport type { PydanticPlugin } from '../../types';\nimport type { FieldConstraints } from '../constants';\n\nfunction baseNode(ctx: UnionResolverContext): PydanticType {\n  const { applyModifiers, childResults, plugin } = ctx;\n\n  const nonNullResults: Array<PydanticResult> = [];\n  let isNullable = false;\n\n  for (const result of childResults) {\n    if (result.type === 'None') {\n      isNullable = true;\n    } else {\n      nonNullResults.push(result);\n    }\n  }\n\n  isNullable = isNullable || childResults.some((r) => r.meta.nullable);\n\n  if (nonNullResults.length === 0) {\n    return {\n      type: 'None',\n    };\n  }\n\n  if (nonNullResults.length === 1) {\n    const finalResult = applyModifiers(nonNullResults[0]!);\n    return finalResult;\n  }\n\n  const union = plugin.external('typing.Union');\n  const itemTypes = nonNullResults.map(\n    (r) => applyModifiers(r).type ?? plugin.external('typing.Any'),\n  );\n\n  if (isNullable) {\n    itemTypes.push('None');\n  }\n\n  return {\n    type: $(union).slice(...itemTypes),\n  };\n}\n\nfunction unionResolver(ctx: UnionResolverContext): PydanticType {\n  return ctx.nodes.base(ctx);\n}\n\nexport interface UnionToTypeResult extends PydanticType {\n  childResults: Array<PydanticResult>;\n  isNullable: boolean;\n}\n\nexport function unionToType({\n  applyModifiers,\n  childResults,\n  parentSchema,\n  plugin,\n  schemas,\n}: {\n  applyModifiers: (result: PydanticResult, options?: { optional?: boolean }) => PydanticFinal;\n  childResults: Array<PydanticResult>;\n  parentSchema: IR.SchemaObject;\n  plugin: PydanticPlugin['Instance'];\n  schemas: ReadonlyArray<IR.SchemaObject>;\n}): UnionToTypeResult {\n  const constraints: FieldConstraints = {};\n\n  if (parentSchema.description !== undefined) {\n    constraints.description = parentSchema.description;\n  }\n\n  let isNullable = false;\n  for (const result of childResults) {\n    if (result.type === 'None') {\n      isNullable = true;\n      break;\n    }\n  }\n  isNullable = isNullable || childResults.some((r) => r.meta.nullable);\n\n  const resolverCtx: UnionResolverContext = {\n    $,\n    applyModifiers,\n    childResults,\n    nodes: {\n      base: baseNode,\n    },\n    parentSchema,\n    plugin,\n    schema: parentSchema,\n    schemas,\n  };\n\n  const resolver = plugin.config['~resolvers']?.union;\n  const resolved = resolver?.(resolverCtx) ?? unionResolver(resolverCtx);\n\n  return {\n    ...resolved,\n    childResults,\n    fieldConstraints:\n      Object.keys(constraints).length > 0\n        ? { ...constraints, ...resolved.fieldConstraints }\n        : resolved.fieldConstraints,\n    isNullable,\n  };\n}\n"
  },
  {
    "path": "packages/openapi-python/src/plugins/pydantic/v2/toAst/unknown.ts",
    "content": "import type { SchemaWithType } from '@hey-api/shared';\n\nimport { $ } from '../../../../py-dsl';\nimport type { UnknownResolverContext } from '../../resolvers';\nimport type { PydanticType } from '../../shared/types';\nimport type { PydanticPlugin } from '../../types';\n\nfunction baseNode(ctx: UnknownResolverContext): PydanticType {\n  const { plugin } = ctx;\n  return {\n    type: plugin.external('typing.Any'),\n  };\n}\n\nfunction unknownResolver(ctx: UnknownResolverContext): PydanticType {\n  return ctx.nodes.base(ctx);\n}\n\nexport function unknownToType({\n  plugin,\n  schema,\n}: {\n  plugin: PydanticPlugin['Instance'];\n  schema: SchemaWithType<'unknown'>;\n}): PydanticType {\n  const ctx: UnknownResolverContext = {\n    $,\n    nodes: {\n      base: baseNode,\n    },\n    plugin,\n    schema,\n  };\n\n  const resolver = plugin.config['~resolvers']?.unknown;\n  return resolver?.(ctx) ?? unknownResolver(ctx);\n}\n"
  },
  {
    "path": "packages/openapi-python/src/plugins/pydantic/v2/toAst/void.ts",
    "content": "import type { SchemaWithType } from '@hey-api/shared';\n\nimport { $ } from '../../../../py-dsl';\nimport type { VoidResolverContext } from '../../resolvers';\nimport type { PydanticType } from '../../shared/types';\nimport type { PydanticPlugin } from '../../types';\n\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\nfunction baseNode(_ctx: VoidResolverContext): PydanticType {\n  return {\n    type: 'None',\n  };\n}\n\nfunction voidResolver(ctx: VoidResolverContext): PydanticType {\n  return ctx.nodes.base(ctx);\n}\n\nexport function voidToType({\n  plugin,\n  schema,\n}: {\n  plugin: PydanticPlugin['Instance'];\n  schema: SchemaWithType<'void'>;\n}): PydanticType {\n  const ctx: VoidResolverContext = {\n    $,\n    nodes: {\n      base: baseNode,\n    },\n    plugin,\n    schema,\n  };\n\n  const resolver = plugin.config['~resolvers']?.void;\n  return resolver?.(ctx) ?? voidResolver(ctx);\n}\n"
  },
  {
    "path": "packages/openapi-python/src/plugins/pydantic/v2/walker.ts",
    "content": "import type { SymbolMeta } from '@hey-api/codegen-core';\nimport { fromRef } from '@hey-api/codegen-core';\nimport type { SchemaExtractor, SchemaVisitor } from '@hey-api/shared';\nimport { pathToJsonPointer } from '@hey-api/shared';\n\nimport { $ } from '../../../py-dsl';\nimport { composeMeta, defaultMeta, inheritMeta } from '../shared/meta';\nimport type { ProcessorContext } from '../shared/processor';\nimport type { PydanticFinal, PydanticResult } from '../shared/types';\nimport type { PydanticPlugin } from '../types';\nimport { arrayToType } from './toAst/array';\nimport { booleanToType } from './toAst/boolean';\nimport { enumToType } from './toAst/enum';\nimport { intersectionToType } from './toAst/intersection';\nimport { neverToType } from './toAst/never';\nimport { nullToType } from './toAst/null';\nimport { numberToType } from './toAst/number';\nimport { objectToFields } from './toAst/object';\nimport { stringToType } from './toAst/string';\nimport { tupleToType } from './toAst/tuple';\nimport { undefinedToType } from './toAst/undefined';\nimport { unionToType } from './toAst/union';\nimport { unknownToType } from './toAst/unknown';\nimport { voidToType } from './toAst/void';\n\nexport interface VisitorConfig {\n  /** Optional schema extractor function. */\n  schemaExtractor?: SchemaExtractor<ProcessorContext>;\n}\n\nexport function createVisitor(\n  config: VisitorConfig,\n): SchemaVisitor<PydanticResult, PydanticPlugin['Instance']> {\n  const { schemaExtractor } = config;\n\n  return {\n    applyModifiers(result, ctx, options = {}): PydanticFinal {\n      const { optional } = options;\n\n      const hasDefault = result.meta.default !== undefined;\n      const needsOptional = optional || hasDefault;\n      const needsNullable = result.meta.nullable;\n\n      let type = result.type;\n      const fieldConstraints = { ...result.fieldConstraints };\n\n      if (needsOptional || needsNullable) {\n        const optionalType = ctx.plugin.external('typing.Optional');\n        type = $(optionalType).slice(type ?? ctx.plugin.external('typing.Any'));\n        if (needsOptional) {\n          fieldConstraints.default = hasDefault ? result.meta.default : null;\n        }\n      }\n\n      return {\n        enumMembers: result.enumMembers,\n        fieldConstraints,\n        fields: result.fields,\n        type,\n      };\n    },\n    array(schema, ctx, walk) {\n      const applyModifiers: Parameters<typeof arrayToType>[0]['applyModifiers'] = (result, opts) =>\n        this.applyModifiers(result, ctx, opts) as PydanticFinal;\n\n      const { childResults, fieldConstraints, type } = arrayToType({\n        applyModifiers,\n        plugin: ctx.plugin,\n        schema,\n        walk,\n        walkerCtx: ctx,\n      });\n\n      return {\n        fieldConstraints,\n        meta: composeMeta(childResults, { ...defaultMeta(schema) }),\n        type,\n      };\n    },\n    boolean(schema, ctx) {\n      const result = booleanToType({ plugin: ctx.plugin, schema });\n      return {\n        ...result,\n        meta: defaultMeta(schema),\n      };\n    },\n    enum(schema, ctx) {\n      const result = enumToType({ plugin: ctx.plugin, schema });\n      return {\n        ...result,\n        meta: defaultMeta(schema),\n      };\n    },\n    integer(schema, ctx) {\n      const result = numberToType({ plugin: ctx.plugin, schema });\n      return {\n        ...result,\n        meta: defaultMeta(schema),\n      };\n    },\n    intercept(schema, ctx, walk) {\n      if (schemaExtractor && !schema.$ref) {\n        const extracted = schemaExtractor({\n          meta: { resource: 'definition', resourceId: pathToJsonPointer(fromRef(ctx.path)) },\n          naming: ctx.plugin.config.definitions,\n          path: fromRef(ctx.path),\n          plugin: ctx.plugin,\n          schema,\n        });\n        if (extracted !== schema) return walk(extracted, ctx);\n      }\n    },\n    intersection(items, schemas, parentSchema, ctx) {\n      const applyModifiers: Parameters<typeof intersectionToType>[0]['applyModifiers'] = (\n        result,\n        opts,\n      ) => this.applyModifiers(result, ctx, opts) as PydanticFinal;\n\n      const result = intersectionToType({\n        applyModifiers,\n        childResults: items,\n        parentSchema,\n        plugin: ctx.plugin,\n      });\n\n      return {\n        ...result,\n        meta: composeMeta(items, { default: parentSchema.default }),\n      };\n    },\n    never(schema, ctx) {\n      const result = neverToType({ plugin: ctx.plugin, schema });\n      return {\n        ...result,\n        meta: {\n          ...defaultMeta(schema),\n          nullable: false,\n          readonly: false,\n        },\n      };\n    },\n    null(schema, ctx) {\n      const result = nullToType({ plugin: ctx.plugin, schema });\n      return {\n        ...result,\n        meta: {\n          ...defaultMeta(schema),\n          nullable: true,\n          readonly: false,\n        },\n      };\n    },\n    number(schema, ctx) {\n      const result = numberToType({ plugin: ctx.plugin, schema });\n      return {\n        ...result,\n        meta: defaultMeta(schema),\n      };\n    },\n    object(schema, ctx, walk) {\n      const applyModifiers: Parameters<typeof objectToFields>[0]['applyModifiers'] = (\n        result,\n        opts,\n      ) => this.applyModifiers(result, ctx, opts) as PydanticFinal;\n\n      const { childResults, fields, type } = objectToFields({\n        applyModifiers,\n        plugin: ctx.plugin,\n        schema,\n        walk,\n        walkerCtx: ctx,\n      });\n\n      return {\n        fields,\n        meta: inheritMeta(schema, childResults),\n        type: type ?? '',\n      };\n    },\n    postProcess(result) {\n      return result;\n    },\n    reference($ref, schema, ctx) {\n      const query: SymbolMeta = {\n        category: 'schema',\n        resource: 'definition',\n        resourceId: $ref,\n        tool: 'pydantic',\n      };\n\n      const refSymbol = ctx.plugin.referenceSymbol(query);\n      const isRegistered = ctx.plugin.isSymbolRegistered(query);\n\n      return {\n        meta: {\n          ...defaultMeta(schema),\n          hasForwardReference: !isRegistered,\n        },\n        type: refSymbol,\n      };\n    },\n    string(schema, ctx) {\n      const result = stringToType({ plugin: ctx.plugin, schema });\n      return {\n        ...result,\n        meta: defaultMeta(schema),\n      };\n    },\n    tuple(schema, ctx, walk) {\n      const applyModifiers: Parameters<typeof tupleToType>[0]['applyModifiers'] = (result, opts) =>\n        this.applyModifiers(result, ctx, opts) as PydanticFinal;\n\n      const { childResults, fieldConstraints, type } = tupleToType({\n        applyModifiers,\n        plugin: ctx.plugin,\n        schema,\n        walk,\n        walkerCtx: ctx,\n      });\n\n      return {\n        fieldConstraints,\n        meta: composeMeta(childResults, { ...defaultMeta(schema) }),\n        type,\n      };\n    },\n    undefined(schema, ctx) {\n      const result = undefinedToType({ plugin: ctx.plugin, schema });\n      return {\n        ...result,\n        meta: {\n          ...defaultMeta(schema),\n          nullable: false,\n          readonly: false,\n        },\n      };\n    },\n    union(items, schemas, parentSchema, ctx) {\n      const applyModifiers: Parameters<typeof unionToType>[0]['applyModifiers'] = (result, opts) =>\n        this.applyModifiers(result, ctx, opts) as PydanticFinal;\n\n      const result = unionToType({\n        applyModifiers,\n        childResults: items,\n        parentSchema,\n        plugin: ctx.plugin,\n        schemas,\n      });\n\n      return {\n        ...result,\n        meta: composeMeta(items, { default: parentSchema.default }),\n      };\n    },\n    unknown(schema, ctx) {\n      const result = unknownToType({ plugin: ctx.plugin, schema });\n      return {\n        ...result,\n        meta: {\n          ...defaultMeta(schema),\n          nullable: false,\n          readonly: false,\n        },\n      };\n    },\n    void(schema, ctx) {\n      const result = voidToType({ plugin: ctx.plugin, schema });\n      return {\n        ...result,\n        meta: {\n          ...defaultMeta(schema),\n          nullable: false,\n          readonly: false,\n        },\n      };\n    },\n  };\n}\n"
  },
  {
    "path": "packages/openapi-python/src/plugins/shared/utils/operation.ts",
    "content": "import type { IR } from '@hey-api/shared';\nimport { escapeComment } from '@hey-api/shared';\n\nexport function createOperationComment(\n  operation: IR.OperationObject,\n): ReadonlyArray<string> | undefined {\n  const comments: Array<string> = [];\n\n  if (operation.summary) {\n    comments.push(escapeComment(operation.summary));\n  }\n\n  if (operation.description) {\n    if (comments.length) {\n      comments.push(''); // Add an empty line between summary and description\n    }\n\n    comments.push(escapeComment(operation.description));\n  }\n\n  if (operation.deprecated) {\n    if (comments.length) {\n      comments.push(''); // Add an empty line before deprecated\n    }\n\n    // TODO: smarter deprecation message\n    comments.push('Deprecated.');\n  }\n\n  return comments.length ? comments : undefined;\n}\n"
  },
  {
    "path": "packages/openapi-python/src/plugins/types.ts",
    "content": "export type PluginClientNames =\n  | '@hey-api/client-aiohttp'\n  | '@hey-api/client-httpx'\n  | '@hey-api/client-requests'\n  | '@hey-api/client-urllib3';\n\nexport type PluginMockNames = 'factory_boy' | 'faker' | 'mimesis';\n\nexport type PluginTransformerNames = never;\n\nexport type PluginValidatorNames = 'attrs' | 'dataclasses' | 'marshmallow' | 'pydantic';\n"
  },
  {
    "path": "packages/openapi-python/src/py-compiler/__snapshots__/__init__.py",
    "content": ""
  },
  {
    "path": "packages/openapi-python/src/py-compiler/__snapshots__/nodes/__init__.py",
    "content": ""
  },
  {
    "path": "packages/openapi-python/src/py-compiler/__snapshots__/nodes/declarations/__init__.py",
    "content": ""
  },
  {
    "path": "packages/openapi-python/src/py-compiler/__snapshots__/nodes/declarations/class/__init__.py",
    "content": ""
  },
  {
    "path": "packages/openapi-python/src/py-compiler/__snapshots__/nodes/declarations/class/default.py",
    "content": "class MyClass:\n    pass\n"
  },
  {
    "path": "packages/openapi-python/src/py-compiler/__snapshots__/nodes/declarations/class/with-decorators.py",
    "content": "def my_decorator(func):\n    return func\n\ndef another_decorator(func):\n    return func\n\n@my_decorator\n@another_decorator\nclass MyClass:\n    pass\n"
  },
  {
    "path": "packages/openapi-python/src/py-compiler/__snapshots__/nodes/declarations/class/with-docstring.py",
    "content": "class MyClass:\n    \"\"\"This is a class docstring\"\"\"\n\n    pass\n"
  },
  {
    "path": "packages/openapi-python/src/py-compiler/__snapshots__/nodes/declarations/class/with-extends.py",
    "content": "class BaseClass:\n    pass\n\nclass MyClass(BaseClass):\n    pass\n"
  },
  {
    "path": "packages/openapi-python/src/py-compiler/__snapshots__/nodes/declarations/class/with-method-docstring.py",
    "content": "class MyClass:\n    def greet():\n        \"\"\"Greets the user.\"\"\"\n\n        pass\n"
  },
  {
    "path": "packages/openapi-python/src/py-compiler/__snapshots__/nodes/declarations/class/with-method.py",
    "content": "class MyClass:\n    def foo():\n        return 42\n"
  },
  {
    "path": "packages/openapi-python/src/py-compiler/__snapshots__/nodes/declarations/function/__init__.py",
    "content": ""
  },
  {
    "path": "packages/openapi-python/src/py-compiler/__snapshots__/nodes/declarations/function/default.py",
    "content": "def greet():\n    pass\n"
  },
  {
    "path": "packages/openapi-python/src/py-compiler/__snapshots__/nodes/declarations/function/with-annotations-defaults-return.py",
    "content": "def greet(name: str = \"World\", times: int = 1) -> None:\n    for i in range(times):\n        print(\"Hello, \" + name)\n"
  },
  {
    "path": "packages/openapi-python/src/py-compiler/__snapshots__/nodes/declarations/function/with-body.py",
    "content": "def greet(name):\n    print(name)\n"
  },
  {
    "path": "packages/openapi-python/src/py-compiler/__snapshots__/nodes/declarations/function/with-decorators.py",
    "content": "def my_decorator(func):\n    return func\n\ndef another_decorator(func):\n    return func\n\n@my_decorator\n@another_decorator\ndef greet():\n    pass\n"
  },
  {
    "path": "packages/openapi-python/src/py-compiler/__snapshots__/nodes/declarations/function/with-docstring.py",
    "content": "def greet():\n    \"\"\"This function prints a greeting.\"\"\"\n\n    print(\"Hello\")\n"
  },
  {
    "path": "packages/openapi-python/src/py-compiler/__snapshots__/nodes/expressions/__init__.py",
    "content": ""
  },
  {
    "path": "packages/openapi-python/src/py-compiler/__snapshots__/nodes/expressions/await/__init__.py",
    "content": ""
  },
  {
    "path": "packages/openapi-python/src/py-compiler/__snapshots__/nodes/expressions/await/inside-function.py",
    "content": "def fetchData():\n    pass\n\nasync def main():\n    await fetchData()\n"
  },
  {
    "path": "packages/openapi-python/src/py-compiler/__snapshots__/nodes/expressions/binary/__init__.py",
    "content": ""
  },
  {
    "path": "packages/openapi-python/src/py-compiler/__snapshots__/nodes/expressions/binary/add.py",
    "content": "a = 42\nb = 84\nz = a + b\n"
  },
  {
    "path": "packages/openapi-python/src/py-compiler/__snapshots__/nodes/expressions/binary/subtract.py",
    "content": "a = 42\nb = 84\nz = a - b\n"
  },
  {
    "path": "packages/openapi-python/src/py-compiler/__snapshots__/nodes/expressions/call/__init__.py",
    "content": ""
  },
  {
    "path": "packages/openapi-python/src/py-compiler/__snapshots__/nodes/expressions/call/call.py",
    "content": "print(\"hi\")\n"
  },
  {
    "path": "packages/openapi-python/src/py-compiler/__snapshots__/nodes/expressions/comprehensions/__init__.py",
    "content": ""
  },
  {
    "path": "packages/openapi-python/src/py-compiler/__snapshots__/nodes/expressions/comprehensions/dict/__init__.py",
    "content": ""
  },
  {
    "path": "packages/openapi-python/src/py-compiler/__snapshots__/nodes/expressions/comprehensions/dict/dict.py",
    "content": "async def foo():\n    items = {\"key1\": \"value1\", \"key2\": \"value2\"}\n    {k: v async for (k, v) in items.items() if k % 2}\n"
  },
  {
    "path": "packages/openapi-python/src/py-compiler/__snapshots__/nodes/expressions/comprehensions/list/__init__.py",
    "content": ""
  },
  {
    "path": "packages/openapi-python/src/py-compiler/__snapshots__/nodes/expressions/comprehensions/list/list.py",
    "content": "async def foo():\n    items = [1, 2, 3]\n    evens = [x async for x in items if x % 2 == 0]\n"
  },
  {
    "path": "packages/openapi-python/src/py-compiler/__snapshots__/nodes/expressions/comprehensions/nested/__init__.py",
    "content": ""
  },
  {
    "path": "packages/openapi-python/src/py-compiler/__snapshots__/nodes/expressions/comprehensions/nested/dict-list.py",
    "content": "data = {\"numbers\": [1, 2, 3], \"nestedDict\": {\"foo\": \"bar\"}}\n"
  },
  {
    "path": "packages/openapi-python/src/py-compiler/__snapshots__/nodes/expressions/comprehensions/set/__init__.py",
    "content": ""
  },
  {
    "path": "packages/openapi-python/src/py-compiler/__snapshots__/nodes/expressions/comprehensions/set/dict.py",
    "content": "async def foo():\n    items = [1, 2, 3]\n    unique_evens = {x for x in items if x % 2}\n"
  },
  {
    "path": "packages/openapi-python/src/py-compiler/__snapshots__/nodes/expressions/dict/__init__.py",
    "content": ""
  },
  {
    "path": "packages/openapi-python/src/py-compiler/__snapshots__/nodes/expressions/dict/dict.py",
    "content": "person = {\"name\": \"Alice\", \"age\": 30}\n"
  },
  {
    "path": "packages/openapi-python/src/py-compiler/__snapshots__/nodes/expressions/fString/__init__.py",
    "content": ""
  },
  {
    "path": "packages/openapi-python/src/py-compiler/__snapshots__/nodes/expressions/fString/multiple-expressions.py",
    "content": "a = 1\nb = 2\nprint(f\"Sum: {a + b}\")\n"
  },
  {
    "path": "packages/openapi-python/src/py-compiler/__snapshots__/nodes/expressions/fString/simple-interpolation.py",
    "content": "name = \"Joe\"\nprint(f\"Hello, {name}!\")\n"
  },
  {
    "path": "packages/openapi-python/src/py-compiler/__snapshots__/nodes/expressions/generator/__init__.py",
    "content": ""
  },
  {
    "path": "packages/openapi-python/src/py-compiler/__snapshots__/nodes/expressions/generator/async.py",
    "content": "x_iter = [1, 2, 3]\n(x async for x in x_iter)\n"
  },
  {
    "path": "packages/openapi-python/src/py-compiler/__snapshots__/nodes/expressions/generator/simple.py",
    "content": "x_iter = [1, 2, 3]\n(x for x in x_iter)\n"
  },
  {
    "path": "packages/openapi-python/src/py-compiler/__snapshots__/nodes/expressions/generator/with-filter.py",
    "content": "x_iter = [1, 2, 3]\n(x for x in x_iter if x > 10)\n"
  },
  {
    "path": "packages/openapi-python/src/py-compiler/__snapshots__/nodes/expressions/identifier/__init__.py",
    "content": ""
  },
  {
    "path": "packages/openapi-python/src/py-compiler/__snapshots__/nodes/expressions/identifier/identifier.py",
    "content": "y = 42\nx = y\n"
  },
  {
    "path": "packages/openapi-python/src/py-compiler/__snapshots__/nodes/expressions/kwarg/__init__.py",
    "content": ""
  },
  {
    "path": "packages/openapi-python/src/py-compiler/__snapshots__/nodes/expressions/kwarg/multiple.py",
    "content": "result = Field(..., min_length=1, max_length=100, description=\"A field\")\n"
  },
  {
    "path": "packages/openapi-python/src/py-compiler/__snapshots__/nodes/expressions/kwarg/number.py",
    "content": "result = func(count=42)\n"
  },
  {
    "path": "packages/openapi-python/src/py-compiler/__snapshots__/nodes/expressions/kwarg/string.py",
    "content": "result = func(name=\"test\")\n"
  },
  {
    "path": "packages/openapi-python/src/py-compiler/__snapshots__/nodes/expressions/lambda/__init__.py",
    "content": ""
  },
  {
    "path": "packages/openapi-python/src/py-compiler/__snapshots__/nodes/expressions/lambda/simple.py",
    "content": "x = 5\nlambda : x + 1\n"
  },
  {
    "path": "packages/openapi-python/src/py-compiler/__snapshots__/nodes/expressions/lambda/with-params-and-default.py",
    "content": "lambda x, y = 10: x * y\n"
  },
  {
    "path": "packages/openapi-python/src/py-compiler/__snapshots__/nodes/expressions/list/__init__.py",
    "content": ""
  },
  {
    "path": "packages/openapi-python/src/py-compiler/__snapshots__/nodes/expressions/list/list.py",
    "content": "nums = [1, 2, 3]\n"
  },
  {
    "path": "packages/openapi-python/src/py-compiler/__snapshots__/nodes/expressions/literal/__init__.py",
    "content": ""
  },
  {
    "path": "packages/openapi-python/src/py-compiler/__snapshots__/nodes/expressions/literal/primitive.py",
    "content": "s = \"hello\"\nn = 123\nb = True\nc = False\nnone = None\n"
  },
  {
    "path": "packages/openapi-python/src/py-compiler/__snapshots__/nodes/expressions/set/__init__.py",
    "content": ""
  },
  {
    "path": "packages/openapi-python/src/py-compiler/__snapshots__/nodes/expressions/set/set.py",
    "content": "foo = \"bar\"\nemptySet = set()\nnumberSet = {1, 2, 3}\nmixedSet = {\"a\", True, foo}\n"
  },
  {
    "path": "packages/openapi-python/src/py-compiler/__snapshots__/nodes/expressions/subscript/__init__.py",
    "content": ""
  },
  {
    "path": "packages/openapi-python/src/py-compiler/__snapshots__/nodes/expressions/subscript/index-access.py",
    "content": "items = (1, 2, 3)\nfirst = items[0]\n"
  },
  {
    "path": "packages/openapi-python/src/py-compiler/__snapshots__/nodes/expressions/subscript/multiple.py",
    "content": "data = dict[str, int]\n"
  },
  {
    "path": "packages/openapi-python/src/py-compiler/__snapshots__/nodes/expressions/subscript/nested.py",
    "content": "matrix = list[list[int]]\n"
  },
  {
    "path": "packages/openapi-python/src/py-compiler/__snapshots__/nodes/expressions/subscript/single.py",
    "content": "numbers = list[int]\n"
  },
  {
    "path": "packages/openapi-python/src/py-compiler/__snapshots__/nodes/expressions/tuple/__init__.py",
    "content": ""
  },
  {
    "path": "packages/openapi-python/src/py-compiler/__snapshots__/nodes/expressions/tuple/tuple.py",
    "content": "t = (1, 2, 3)\nsingle = (42,)\n"
  },
  {
    "path": "packages/openapi-python/src/py-compiler/__snapshots__/nodes/expressions/yield/__init__.py",
    "content": ""
  },
  {
    "path": "packages/openapi-python/src/py-compiler/__snapshots__/nodes/expressions/yield/default.py",
    "content": "def gen():\n    yield\n"
  },
  {
    "path": "packages/openapi-python/src/py-compiler/__snapshots__/nodes/expressions/yield/from-iterable.py",
    "content": "iterable = [1, 2, 3]\n\ndef gen():\n    yield from iterable\n"
  },
  {
    "path": "packages/openapi-python/src/py-compiler/__snapshots__/nodes/expressions/yield/with-value.py",
    "content": "def gen():\n    yield 42\n"
  },
  {
    "path": "packages/openapi-python/src/py-compiler/__snapshots__/nodes/statements/__init__.py",
    "content": ""
  },
  {
    "path": "packages/openapi-python/src/py-compiler/__snapshots__/nodes/statements/assignment/__init__.py",
    "content": ""
  },
  {
    "path": "packages/openapi-python/src/py-compiler/__snapshots__/nodes/statements/assignment/annotation-only.py",
    "content": "name: str\n"
  },
  {
    "path": "packages/openapi-python/src/py-compiler/__snapshots__/nodes/statements/assignment/annotation-with-value.py",
    "content": "name: str = \"default\"\n"
  },
  {
    "path": "packages/openapi-python/src/py-compiler/__snapshots__/nodes/statements/assignment/complex-annotation.py",
    "content": "items: List[str] = Field(..., min_length=1)\n"
  },
  {
    "path": "packages/openapi-python/src/py-compiler/__snapshots__/nodes/statements/assignment/optional-annotation.py",
    "content": "name: Optional[str] = None\n"
  },
  {
    "path": "packages/openapi-python/src/py-compiler/__snapshots__/nodes/statements/assignment/primitive.py",
    "content": "foo = 42\n"
  },
  {
    "path": "packages/openapi-python/src/py-compiler/__snapshots__/nodes/statements/augmentedAssignment/__init__.py",
    "content": ""
  },
  {
    "path": "packages/openapi-python/src/py-compiler/__snapshots__/nodes/statements/augmentedAssignment/arithmetic.py",
    "content": "x = 0\ny = 0\nz = 0\na = 0\nb = 0\nc = 0\nx += 1\ny -= 2\nz *= 3\na /= 4\nb //= 5\nc %= 6\n"
  },
  {
    "path": "packages/openapi-python/src/py-compiler/__snapshots__/nodes/statements/augmentedAssignment/bitwise.py",
    "content": "x = 1\ny = 1\nz = 1\na = 1\nb = 1\nc = 1\nx **= 2\ny &= 1\nz |= 1\na ^= 1\nb >>= 1\nc <<= 1\n"
  },
  {
    "path": "packages/openapi-python/src/py-compiler/__snapshots__/nodes/statements/block/__init__.py",
    "content": ""
  },
  {
    "path": "packages/openapi-python/src/py-compiler/__snapshots__/nodes/statements/block/function.py",
    "content": "def main():\n    print(\"inside\")\n"
  },
  {
    "path": "packages/openapi-python/src/py-compiler/__snapshots__/nodes/statements/break/__init__.py",
    "content": ""
  },
  {
    "path": "packages/openapi-python/src/py-compiler/__snapshots__/nodes/statements/break/while.py",
    "content": "while True:\n    break\n"
  },
  {
    "path": "packages/openapi-python/src/py-compiler/__snapshots__/nodes/statements/continue/__init__.py",
    "content": ""
  },
  {
    "path": "packages/openapi-python/src/py-compiler/__snapshots__/nodes/statements/continue/while.py",
    "content": "while True:\n    continue\n"
  },
  {
    "path": "packages/openapi-python/src/py-compiler/__snapshots__/nodes/statements/expression/__init__.py",
    "content": ""
  },
  {
    "path": "packages/openapi-python/src/py-compiler/__snapshots__/nodes/statements/expression/simple.py",
    "content": "print(\"hello\")\n"
  },
  {
    "path": "packages/openapi-python/src/py-compiler/__snapshots__/nodes/statements/for/__init__.py",
    "content": ""
  },
  {
    "path": "packages/openapi-python/src/py-compiler/__snapshots__/nodes/statements/for/for-else.py",
    "content": "items = [1, 2, 3]\nfor x in items:\n    pass\nelse:\n    print(\"done\")\n"
  },
  {
    "path": "packages/openapi-python/src/py-compiler/__snapshots__/nodes/statements/for/for.py",
    "content": "for i in range(3):\n    print(i)\n"
  },
  {
    "path": "packages/openapi-python/src/py-compiler/__snapshots__/nodes/statements/if/__init__.py",
    "content": ""
  },
  {
    "path": "packages/openapi-python/src/py-compiler/__snapshots__/nodes/statements/if/if-else.py",
    "content": "x = 0\nif x > 0:\n    print(\"positive\")\nelse:\n    print(\"non-positive\")\n"
  },
  {
    "path": "packages/openapi-python/src/py-compiler/__snapshots__/nodes/statements/if/if.py",
    "content": "if True:\n    print(\"positive\")\n"
  },
  {
    "path": "packages/openapi-python/src/py-compiler/__snapshots__/nodes/statements/import/__init__.py",
    "content": ""
  },
  {
    "path": "packages/openapi-python/src/py-compiler/__snapshots__/nodes/statements/import/from-with-alias.py",
    "content": "from os import environ as env\n"
  },
  {
    "path": "packages/openapi-python/src/py-compiler/__snapshots__/nodes/statements/import/from-with-asterisk.py",
    "content": "from collections import *\n"
  },
  {
    "path": "packages/openapi-python/src/py-compiler/__snapshots__/nodes/statements/import/from-with-name-alias.py",
    "content": "from os import path, environ as env\n"
  },
  {
    "path": "packages/openapi-python/src/py-compiler/__snapshots__/nodes/statements/import/from-with-name.py",
    "content": "from sys import argv\n"
  },
  {
    "path": "packages/openapi-python/src/py-compiler/__snapshots__/nodes/statements/import/module-with-alias.py",
    "content": "import json as js\n"
  },
  {
    "path": "packages/openapi-python/src/py-compiler/__snapshots__/nodes/statements/import/module.py",
    "content": "import math\nimport loads\n"
  },
  {
    "path": "packages/openapi-python/src/py-compiler/__snapshots__/nodes/statements/raise/__init__.py",
    "content": ""
  },
  {
    "path": "packages/openapi-python/src/py-compiler/__snapshots__/nodes/statements/raise/reraise.py",
    "content": "raise\n"
  },
  {
    "path": "packages/openapi-python/src/py-compiler/__snapshots__/nodes/statements/raise/with-exception.py",
    "content": "raise ValueError(\"Invalid input\")\n"
  },
  {
    "path": "packages/openapi-python/src/py-compiler/__snapshots__/nodes/statements/return/__init__.py",
    "content": ""
  },
  {
    "path": "packages/openapi-python/src/py-compiler/__snapshots__/nodes/statements/return/function.py",
    "content": "def get_message():\n    return \"hi\"\n"
  },
  {
    "path": "packages/openapi-python/src/py-compiler/__snapshots__/nodes/statements/try/__init__.py",
    "content": ""
  },
  {
    "path": "packages/openapi-python/src/py-compiler/__snapshots__/nodes/statements/try/with-except-else-finally.py",
    "content": "def dangerous_func():\n    pass\n\ntry:\n    dangerous_func()\nexcept Exception as e:\n    print(e)\nelse:\n    pass\nfinally:\n    pass\n"
  },
  {
    "path": "packages/openapi-python/src/py-compiler/__snapshots__/nodes/statements/try/with-except-else.py",
    "content": "def dangerous_func():\n    pass\n\ntry:\n    dangerous_func()\nexcept:\n    pass\nelse:\n    pass\n"
  },
  {
    "path": "packages/openapi-python/src/py-compiler/__snapshots__/nodes/statements/try/with-except-finally.py",
    "content": "def dangerous_func():\n    pass\n\ntry:\n    dangerous_func()\nexcept Exception:\n    pass\nfinally:\n    pass\n"
  },
  {
    "path": "packages/openapi-python/src/py-compiler/__snapshots__/nodes/statements/try/with-except.py",
    "content": "def dangerous_func():\n    pass\n\ntry:\n    dangerous_func()\nexcept ValueError as e:\n    print(e)\n"
  },
  {
    "path": "packages/openapi-python/src/py-compiler/__snapshots__/nodes/statements/try/with-finally.py",
    "content": "def dangerous_func():\n    pass\n\ntry:\n    dangerous_func()\nfinally:\n    pass\n"
  },
  {
    "path": "packages/openapi-python/src/py-compiler/__snapshots__/nodes/statements/while/__init__.py",
    "content": ""
  },
  {
    "path": "packages/openapi-python/src/py-compiler/__snapshots__/nodes/statements/while/while-else.py",
    "content": "def should_continue():\n    return False\nwhile should_continue():\n    pass\nelse:\n    print(\"done\")\n"
  },
  {
    "path": "packages/openapi-python/src/py-compiler/__snapshots__/nodes/statements/while/while.py",
    "content": "x = 3\nwhile x > 0:\n    print(x)\n    x = x - 1\n"
  },
  {
    "path": "packages/openapi-python/src/py-compiler/__snapshots__/nodes/statements/with/__init__.py",
    "content": ""
  },
  {
    "path": "packages/openapi-python/src/py-compiler/__snapshots__/nodes/statements/with/with-alias.py",
    "content": "class context_manager:\n    def __enter__(self):\n        return self\n    def __exit__(\n        self,\n        exc_type,\n        exc_val,\n        exc_tb,\n    ):\n        return False\n\nwith context_manager() as alias:\n    pass\n"
  },
  {
    "path": "packages/openapi-python/src/py-compiler/__snapshots__/nodes/statements/with/with-async.py",
    "content": "class context_manager:\n    def __enter__(self):\n        return self\n    def __exit__(\n        self,\n        exc_type,\n        exc_val,\n        exc_tb,\n    ):\n        return False\n\nasync def foo():\n    async with context_manager():\n        pass\n"
  },
  {
    "path": "packages/openapi-python/src/py-compiler/__snapshots__/nodes/statements/with/with-many-items.py",
    "content": "class context_manager:\n    def __enter__(self):\n        return self\n    def __exit__(\n        self,\n        exc_type,\n        exc_val,\n        exc_tb,\n    ):\n        return False\n\nclass context_manager2:\n    def __enter__(self):\n        return self\n    def __exit__(\n        self,\n        exc_type,\n        exc_val,\n        exc_tb,\n    ):\n        return False\n\nclass context_manager3:\n    def __enter__(self):\n        return self\n    def __exit__(\n        self,\n        exc_type,\n        exc_val,\n        exc_tb,\n    ):\n        return False\n\nwith context_manager() as alias, context_manager2() as (a, b), context_manager3():\n    pass\n"
  },
  {
    "path": "packages/openapi-python/src/py-compiler/__snapshots__/nodes/statements/with/with-tuple-alias.py",
    "content": "class context_manager:\n    def __enter__(self):\n        return self\n    def __exit__(\n        self,\n        exc_type,\n        exc_val,\n        exc_tb,\n    ):\n        return False\n\nwith context_manager() as (a, b):\n    pass\n"
  },
  {
    "path": "packages/openapi-python/src/py-compiler/__snapshots__/nodes/statements/with/with.py",
    "content": "class context_manager:\n    def __enter__(self):\n        return self\n    def __exit__(\n        self,\n        exc_type,\n        exc_val,\n        exc_tb,\n    ):\n        return False\n\nwith context_manager():\n    pass\n"
  },
  {
    "path": "packages/openapi-python/src/py-compiler/__snapshots__/nodes/structure/__init__.py",
    "content": ""
  },
  {
    "path": "packages/openapi-python/src/py-compiler/__snapshots__/nodes/structure/comment/__init__.py",
    "content": ""
  },
  {
    "path": "packages/openapi-python/src/py-compiler/__snapshots__/nodes/structure/comment/simple.py",
    "content": "# This is a comment\n"
  },
  {
    "path": "packages/openapi-python/src/py-compiler/__snapshots__/nodes/structure/sourceFile/__init__.py",
    "content": ""
  },
  {
    "path": "packages/openapi-python/src/py-compiler/__snapshots__/nodes/structure/sourceFile/simple.py",
    "content": "a = 1\nb = 2\n"
  },
  {
    "path": "packages/openapi-python/src/py-compiler/__snapshots__/nodes/structure/sourceFile/with-docstring.py",
    "content": "\"\"\"This is a module-level docstring.\"\"\"\n\nfoo = 1\n"
  },
  {
    "path": "packages/openapi-python/src/py-compiler/__tests__/constants.ts",
    "content": "import path from 'node:path';\n\nexport const snapshotsDir = path.join(__dirname, '..', '__snapshots__');\nexport const tmpDir = path.join(__dirname, '..', '.tmp');\n"
  },
  {
    "path": "packages/openapi-python/src/py-compiler/__tests__/globalTeardown.ts",
    "content": "import fs from 'node:fs';\n\nimport { tmpDir } from './constants';\n\nexport function teardown() {\n  fs.rmSync(tmpDir, { force: true, recursive: true });\n}\n"
  },
  {
    "path": "packages/openapi-python/src/py-compiler/__tests__/nodes/declarations/class.test.ts",
    "content": "import { py } from '../../../index';\nimport { assertPrintedMatchesSnapshot } from '../utils';\n\ndescribe('class declaration', () => {\n  it('default', async () => {\n    const file = py.factory.createSourceFile([py.factory.createClassDeclaration('MyClass', [])]);\n    await assertPrintedMatchesSnapshot(file, 'default.py');\n  });\n\n  it('with docstring', async () => {\n    const node = py.factory.createSourceFile([\n      py.factory.createClassDeclaration(\n        'MyClass',\n        [],\n        undefined,\n        undefined,\n        'This is a class docstring',\n      ),\n    ]);\n    await assertPrintedMatchesSnapshot(node, 'with-docstring.py');\n  });\n\n  it('with base class', async () => {\n    const node = py.factory.createSourceFile([\n      py.factory.createClassDeclaration('BaseClass', []),\n      py.factory.createEmptyStatement(),\n      py.factory.createClassDeclaration('MyClass', [], undefined, [\n        py.factory.createIdentifier('BaseClass'),\n      ]),\n    ]);\n    await assertPrintedMatchesSnapshot(node, 'with-extends.py');\n  });\n\n  it('with method', async () => {\n    const node = py.factory.createSourceFile([\n      py.factory.createClassDeclaration('MyClass', [\n        py.factory.createFunctionDeclaration('foo', [], undefined, [\n          py.factory.createReturnStatement(py.factory.createLiteral(42)),\n        ]),\n      ]),\n    ]);\n    await assertPrintedMatchesSnapshot(node, 'with-method.py');\n  });\n\n  it('with decorators', async () => {\n    const file = py.factory.createSourceFile([\n      py.factory.createFunctionDeclaration(\n        'my_decorator',\n        [py.factory.createFunctionParameter('func')],\n        undefined,\n        [py.factory.createReturnStatement(py.factory.createIdentifier('func'))],\n      ),\n      py.factory.createEmptyStatement(),\n      py.factory.createFunctionDeclaration(\n        'another_decorator',\n        [py.factory.createFunctionParameter('func')],\n        undefined,\n        [py.factory.createReturnStatement(py.factory.createIdentifier('func'))],\n      ),\n      py.factory.createEmptyStatement(),\n      py.factory.createClassDeclaration(\n        'MyClass',\n        [],\n        [\n          py.factory.createIdentifier('my_decorator'),\n          py.factory.createIdentifier('another_decorator'),\n        ],\n      ),\n    ]);\n    await assertPrintedMatchesSnapshot(file, 'with-decorators.py');\n  });\n\n  it('with method docstring', async () => {\n    const file = py.factory.createSourceFile([\n      py.factory.createClassDeclaration('MyClass', [\n        py.factory.createFunctionDeclaration(\n          'greet',\n          [],\n          undefined,\n          [],\n          undefined,\n          'Greets the user.',\n        ),\n      ]),\n    ]);\n    await assertPrintedMatchesSnapshot(file, 'with-method-docstring.py');\n  });\n});\n"
  },
  {
    "path": "packages/openapi-python/src/py-compiler/__tests__/nodes/declarations/function.test.ts",
    "content": "import { py } from '../../../index';\nimport { assertPrintedMatchesSnapshot } from '../utils';\n\ndescribe('function declaration', () => {\n  it('default', async () => {\n    const file = py.factory.createSourceFile([\n      py.factory.createFunctionDeclaration('greet', [], undefined, []),\n    ]);\n    await assertPrintedMatchesSnapshot(file, 'default.py');\n  });\n\n  it('with docstring', async () => {\n    const node = py.factory.createSourceFile([\n      py.factory.createFunctionDeclaration(\n        'greet',\n        [],\n        undefined,\n        [\n          py.factory.createExpressionStatement(\n            py.factory.createCallExpression(py.factory.createIdentifier('print'), [\n              py.factory.createLiteral('Hello'),\n            ]),\n          ),\n        ],\n        undefined,\n        'This function prints a greeting.',\n      ),\n    ]);\n    await assertPrintedMatchesSnapshot(node, 'with-docstring.py');\n  });\n\n  it('with body', async () => {\n    const file = py.factory.createSourceFile([\n      py.factory.createFunctionDeclaration(\n        'greet',\n        [py.factory.createFunctionParameter('name')],\n        undefined,\n        [\n          py.factory.createExpressionStatement(\n            py.factory.createCallExpression(py.factory.createIdentifier('print'), [\n              py.factory.createIdentifier('name'),\n            ]),\n          ),\n        ],\n      ),\n    ]);\n    await assertPrintedMatchesSnapshot(file, 'with-body.py');\n  });\n\n  it('with decorators', async () => {\n    const file = py.factory.createSourceFile([\n      py.factory.createFunctionDeclaration(\n        'my_decorator',\n        [py.factory.createFunctionParameter('func')],\n        undefined,\n        [py.factory.createReturnStatement(py.factory.createIdentifier('func'))],\n      ),\n      py.factory.createEmptyStatement(),\n      py.factory.createFunctionDeclaration(\n        'another_decorator',\n        [py.factory.createFunctionParameter('func')],\n        undefined,\n        [py.factory.createReturnStatement(py.factory.createIdentifier('func'))],\n      ),\n      py.factory.createEmptyStatement(),\n      py.factory.createFunctionDeclaration(\n        'greet',\n        [],\n        undefined,\n        [],\n        [\n          py.factory.createIdentifier('my_decorator'),\n          py.factory.createIdentifier('another_decorator'),\n        ],\n      ),\n    ]);\n    await assertPrintedMatchesSnapshot(file, 'with-decorators.py');\n  });\n\n  it('with parameter annotations, defaults, and return type', async () => {\n    const file = py.factory.createSourceFile([\n      py.factory.createFunctionDeclaration(\n        'greet',\n        [\n          py.factory.createFunctionParameter(\n            'name',\n            py.factory.createIdentifier('str'),\n            py.factory.createLiteral('World'),\n          ),\n          py.factory.createFunctionParameter(\n            'times',\n            py.factory.createIdentifier('int'),\n            py.factory.createLiteral(1),\n          ),\n        ],\n        py.factory.createIdentifier('None'), // returnType\n        [\n          py.factory.createForStatement(\n            py.factory.createIdentifier('i'),\n            py.factory.createCallExpression(py.factory.createIdentifier('range'), [\n              py.factory.createIdentifier('times'),\n            ]),\n            [\n              py.factory.createExpressionStatement(\n                py.factory.createCallExpression(py.factory.createIdentifier('print'), [\n                  py.factory.createBinaryExpression(\n                    py.factory.createLiteral('Hello, '),\n                    '+',\n                    py.factory.createIdentifier('name'),\n                  ),\n                ]),\n              ),\n            ],\n          ),\n        ],\n      ),\n    ]);\n    await assertPrintedMatchesSnapshot(file, 'with-annotations-defaults-return.py');\n  });\n});\n"
  },
  {
    "path": "packages/openapi-python/src/py-compiler/__tests__/nodes/expressions/await.test.ts",
    "content": "import { py } from '../../../index';\nimport { assertPrintedMatchesSnapshot } from '../utils';\n\ndescribe('await expression', () => {\n  it('inside async function', async () => {\n    const file = py.factory.createSourceFile([\n      py.factory.createFunctionDeclaration('fetchData', [], undefined, []),\n      py.factory.createEmptyStatement(),\n      py.factory.createFunctionDeclaration(\n        'main',\n        [],\n        undefined,\n        [\n          py.factory.createExpressionStatement(\n            py.factory.createAwaitExpression(\n              py.factory.createCallExpression(py.factory.createIdentifier('fetchData'), []),\n            ),\n          ),\n        ],\n        undefined,\n        undefined,\n        [py.factory.createIdentifier('async')],\n      ),\n    ]);\n    await assertPrintedMatchesSnapshot(file, 'inside-function.py');\n  });\n});\n"
  },
  {
    "path": "packages/openapi-python/src/py-compiler/__tests__/nodes/expressions/binary.test.ts",
    "content": "import { py } from '../../../index';\nimport { assertPrintedMatchesSnapshot } from '../utils';\n\ndescribe('binary expression', () => {\n  it('add', async () => {\n    const file = py.factory.createSourceFile([\n      py.factory.createAssignment(\n        py.factory.createIdentifier('a'),\n        undefined,\n        py.factory.createLiteral(42),\n      ),\n      py.factory.createAssignment(\n        py.factory.createIdentifier('b'),\n        undefined,\n        py.factory.createLiteral(84),\n      ),\n      py.factory.createAssignment(\n        py.factory.createIdentifier('z'),\n        undefined,\n        py.factory.createBinaryExpression(\n          py.factory.createIdentifier('a'),\n          '+',\n          py.factory.createIdentifier('b'),\n        ),\n      ),\n    ]);\n    await assertPrintedMatchesSnapshot(file, 'add.py');\n  });\n\n  it('subtract', async () => {\n    const file = py.factory.createSourceFile([\n      py.factory.createAssignment(\n        py.factory.createIdentifier('a'),\n        undefined,\n        py.factory.createLiteral(42),\n      ),\n      py.factory.createAssignment(\n        py.factory.createIdentifier('b'),\n        undefined,\n        py.factory.createLiteral(84),\n      ),\n      py.factory.createAssignment(\n        py.factory.createIdentifier('z'),\n        undefined,\n        py.factory.createBinaryExpression(\n          py.factory.createIdentifier('a'),\n          '-',\n          py.factory.createIdentifier('b'),\n        ),\n      ),\n    ]);\n    await assertPrintedMatchesSnapshot(file, 'subtract.py');\n  });\n});\n"
  },
  {
    "path": "packages/openapi-python/src/py-compiler/__tests__/nodes/expressions/call.test.ts",
    "content": "import { py } from '../../../index';\nimport { assertPrintedMatchesSnapshot } from '../utils';\n\ndescribe('call expression', () => {\n  it('print', async () => {\n    const file = py.factory.createSourceFile([\n      py.factory.createCallExpression(py.factory.createIdentifier('print'), [\n        py.factory.createLiteral('hi'),\n      ]),\n    ]);\n    await assertPrintedMatchesSnapshot(file, 'call.py');\n  });\n});\n"
  },
  {
    "path": "packages/openapi-python/src/py-compiler/__tests__/nodes/expressions/comprehensions/dict.test.ts",
    "content": "import { py } from '../../../../index';\nimport { assertPrintedMatchesSnapshot } from '../../utils';\n\ndescribe('dict comprehension', () => {\n  it('assignment', async () => {\n    const file = py.factory.createSourceFile([\n      py.factory.createFunctionDeclaration(\n        'foo',\n        [],\n        undefined,\n        [\n          py.factory.createAssignment(\n            py.factory.createIdentifier('items'),\n            undefined,\n            py.factory.createDictExpression([\n              {\n                key: py.factory.createLiteral('key1'),\n                value: py.factory.createLiteral('value1'),\n              },\n              {\n                key: py.factory.createLiteral('key2'),\n                value: py.factory.createLiteral('value2'),\n              },\n            ]),\n          ),\n          py.factory.createExpressionStatement(\n            py.factory.createDictComprehension(\n              py.factory.createIdentifier('k'),\n              py.factory.createIdentifier('v'),\n              py.factory.createTupleExpression([\n                py.factory.createIdentifier('k'),\n                py.factory.createIdentifier('v'),\n              ]),\n              py.factory.createCallExpression(\n                py.factory.createMemberExpression(\n                  py.factory.createIdentifier('items'),\n                  py.factory.createIdentifier('items'),\n                ),\n                [],\n              ),\n              [\n                py.factory.createBinaryExpression(\n                  py.factory.createIdentifier('k'),\n                  '%',\n                  py.factory.createLiteral(2),\n                ),\n              ],\n              true,\n            ),\n          ),\n        ],\n        undefined,\n        undefined,\n        [py.factory.createIdentifier('async')],\n      ),\n    ]);\n    await assertPrintedMatchesSnapshot(file, 'dict.py');\n  });\n});\n"
  },
  {
    "path": "packages/openapi-python/src/py-compiler/__tests__/nodes/expressions/comprehensions/list.test.ts",
    "content": "import { py } from '../../../../index';\nimport { assertPrintedMatchesSnapshot } from '../../utils';\n\ndescribe('list comprehension', () => {\n  it('assignment', async () => {\n    const file = py.factory.createSourceFile([\n      py.factory.createFunctionDeclaration(\n        'foo',\n        [],\n        undefined,\n        [\n          py.factory.createAssignment(\n            py.factory.createIdentifier('items'),\n            undefined,\n            py.factory.createListExpression([\n              py.factory.createLiteral(1),\n              py.factory.createLiteral(2),\n              py.factory.createLiteral(3),\n            ]),\n          ),\n          py.factory.createAssignment(\n            py.factory.createIdentifier('evens'),\n            undefined,\n            py.factory.createListComprehension(\n              py.factory.createIdentifier('x'),\n              py.factory.createIdentifier('x'),\n              py.factory.createIdentifier('items'),\n              [\n                py.factory.createBinaryExpression(\n                  py.factory.createBinaryExpression(\n                    py.factory.createIdentifier('x'),\n                    '%',\n                    py.factory.createLiteral(2),\n                  ),\n                  '==',\n                  py.factory.createLiteral(0),\n                ),\n              ],\n              true,\n            ),\n          ),\n        ],\n        undefined,\n        undefined,\n        [py.factory.createIdentifier('async')],\n      ),\n    ]);\n    await assertPrintedMatchesSnapshot(file, 'list.py');\n  });\n});\n"
  },
  {
    "path": "packages/openapi-python/src/py-compiler/__tests__/nodes/expressions/comprehensions/nested.test.ts",
    "content": "import { py } from '../../../../index';\nimport { assertPrintedMatchesSnapshot } from '../../utils';\n\ndescribe('nested comprehension', () => {\n  it('dict and list', async () => {\n    const file = py.factory.createSourceFile([\n      py.factory.createAssignment(\n        py.factory.createIdentifier('data'),\n        undefined,\n        py.factory.createDictExpression([\n          {\n            key: py.factory.createLiteral('numbers'),\n            value: py.factory.createListExpression([\n              py.factory.createLiteral(1),\n              py.factory.createLiteral(2),\n              py.factory.createLiteral(3),\n            ]),\n          },\n          {\n            key: py.factory.createLiteral('nestedDict'),\n            value: py.factory.createDictExpression([\n              {\n                key: py.factory.createLiteral('foo'),\n                value: py.factory.createLiteral('bar'),\n              },\n            ]),\n          },\n        ]),\n      ),\n    ]);\n    await assertPrintedMatchesSnapshot(file, 'dict-list.py');\n  });\n});\n"
  },
  {
    "path": "packages/openapi-python/src/py-compiler/__tests__/nodes/expressions/comprehensions/set.test.ts",
    "content": "import { py } from '../../../../index';\nimport { assertPrintedMatchesSnapshot } from '../../utils';\n\ndescribe('set comprehension', () => {\n  it('assignment', async () => {\n    const file = py.factory.createSourceFile([\n      py.factory.createFunctionDeclaration(\n        'foo',\n        [],\n        undefined,\n        [\n          py.factory.createAssignment(\n            py.factory.createIdentifier('items'),\n            undefined,\n            py.factory.createListExpression([\n              py.factory.createLiteral(1),\n              py.factory.createLiteral(2),\n              py.factory.createLiteral(3),\n            ]),\n          ),\n          py.factory.createAssignment(\n            py.factory.createIdentifier('unique_evens'),\n            undefined,\n            py.factory.createSetComprehension(\n              py.factory.createIdentifier('x'),\n              py.factory.createIdentifier('x'),\n              py.factory.createIdentifier('items'),\n              [\n                py.factory.createBinaryExpression(\n                  py.factory.createIdentifier('x'),\n                  '%',\n                  py.factory.createLiteral(2),\n                ),\n              ],\n            ),\n          ),\n        ],\n        undefined,\n        undefined,\n        [py.factory.createIdentifier('async')],\n      ),\n    ]);\n    await assertPrintedMatchesSnapshot(file, 'dict.py');\n  });\n});\n"
  },
  {
    "path": "packages/openapi-python/src/py-compiler/__tests__/nodes/expressions/dict.test.ts",
    "content": "import { py } from '../../../index';\nimport { assertPrintedMatchesSnapshot } from '../utils';\n\ndescribe('dict expression', () => {\n  it('assignment', async () => {\n    const file = py.factory.createSourceFile([\n      py.factory.createAssignment(\n        py.factory.createIdentifier('person'),\n        undefined,\n        py.factory.createDictExpression([\n          {\n            key: py.factory.createLiteral('name'),\n            value: py.factory.createLiteral('Alice'),\n          },\n          {\n            key: py.factory.createLiteral('age'),\n            value: py.factory.createLiteral(30),\n          },\n        ]),\n      ),\n    ]);\n    await assertPrintedMatchesSnapshot(file, 'dict.py');\n  });\n});\n"
  },
  {
    "path": "packages/openapi-python/src/py-compiler/__tests__/nodes/expressions/fString.test.ts",
    "content": "import { py } from '../../../index';\nimport { assertPrintedMatchesSnapshot } from '../utils';\n\ndescribe('f-string expression', () => {\n  it('simple interpolation', async () => {\n    const file = py.factory.createSourceFile([\n      py.factory.createAssignment(\n        py.factory.createIdentifier('name'),\n        undefined,\n        py.factory.createLiteral('Joe'),\n      ),\n      py.factory.createExpressionStatement(\n        py.factory.createCallExpression(py.factory.createIdentifier('print'), [\n          py.factory.createFStringExpression(['Hello, ', py.factory.createIdentifier('name'), '!']),\n        ]),\n      ),\n    ]);\n    await assertPrintedMatchesSnapshot(file, 'simple-interpolation.py');\n  });\n\n  it('with multiple expressions', async () => {\n    const file = py.factory.createSourceFile([\n      py.factory.createAssignment(\n        py.factory.createIdentifier('a'),\n        undefined,\n        py.factory.createLiteral(1),\n      ),\n      py.factory.createAssignment(\n        py.factory.createIdentifier('b'),\n        undefined,\n        py.factory.createLiteral(2),\n      ),\n      py.factory.createExpressionStatement(\n        py.factory.createCallExpression(py.factory.createIdentifier('print'), [\n          py.factory.createFStringExpression([\n            'Sum: ',\n            py.factory.createBinaryExpression(\n              py.factory.createIdentifier('a'),\n              '+',\n              py.factory.createIdentifier('b'),\n            ),\n          ]),\n        ]),\n      ),\n    ]);\n    await assertPrintedMatchesSnapshot(file, 'multiple-expressions.py');\n  });\n});\n"
  },
  {
    "path": "packages/openapi-python/src/py-compiler/__tests__/nodes/expressions/generator.test.ts",
    "content": "import { py } from '../../../index';\nimport { assertPrintedMatchesSnapshot } from '../utils';\n\ndescribe('generator expression', () => {\n  it('simple', async () => {\n    const file = py.factory.createSourceFile([\n      py.factory.createAssignment(\n        py.factory.createIdentifier('x_iter'),\n        undefined,\n        py.factory.createListExpression([\n          py.factory.createLiteral(1),\n          py.factory.createLiteral(2),\n          py.factory.createLiteral(3),\n        ]),\n      ),\n      py.factory.createExpressionStatement(\n        py.factory.createGeneratorExpression(\n          py.factory.createIdentifier('x'),\n          py.factory.createIdentifier('x'),\n          py.factory.createIdentifier('x_iter'),\n        ),\n      ),\n    ]);\n    await assertPrintedMatchesSnapshot(file, 'simple.py');\n  });\n\n  it('with filters', async () => {\n    const file = py.factory.createSourceFile([\n      py.factory.createAssignment(\n        py.factory.createIdentifier('x_iter'),\n        undefined,\n        py.factory.createListExpression([\n          py.factory.createLiteral(1),\n          py.factory.createLiteral(2),\n          py.factory.createLiteral(3),\n        ]),\n      ),\n      py.factory.createExpressionStatement(\n        py.factory.createGeneratorExpression(\n          py.factory.createIdentifier('x'),\n          py.factory.createIdentifier('x'),\n          py.factory.createIdentifier('x_iter'),\n          [\n            py.factory.createBinaryExpression(\n              py.factory.createIdentifier('x'),\n              '>',\n              py.factory.createLiteral(10),\n            ),\n          ],\n        ),\n      ),\n    ]);\n    await assertPrintedMatchesSnapshot(file, 'with-filter.py');\n  });\n\n  it('async', async () => {\n    const file = py.factory.createSourceFile([\n      py.factory.createAssignment(\n        py.factory.createIdentifier('x_iter'),\n        undefined,\n        py.factory.createListExpression([\n          py.factory.createLiteral(1),\n          py.factory.createLiteral(2),\n          py.factory.createLiteral(3),\n        ]),\n      ),\n      py.factory.createExpressionStatement(\n        py.factory.createGeneratorExpression(\n          py.factory.createIdentifier('x'),\n          py.factory.createIdentifier('x'),\n          py.factory.createIdentifier('x_iter'),\n          undefined,\n          true,\n        ),\n      ),\n    ]);\n    await assertPrintedMatchesSnapshot(file, 'async.py');\n  });\n});\n"
  },
  {
    "path": "packages/openapi-python/src/py-compiler/__tests__/nodes/expressions/identifier.test.ts",
    "content": "import { py } from '../../../index';\nimport { assertPrintedMatchesSnapshot } from '../utils';\n\ndescribe('identifier expression', () => {\n  it('assignment', async () => {\n    const file = py.factory.createSourceFile([\n      py.factory.createAssignment(\n        py.factory.createIdentifier('y'),\n        undefined,\n        py.factory.createLiteral(42),\n      ),\n      py.factory.createAssignment(\n        py.factory.createIdentifier('x'),\n        undefined,\n        py.factory.createIdentifier('y'),\n      ),\n    ]);\n    await assertPrintedMatchesSnapshot(file, 'identifier.py');\n  });\n});\n"
  },
  {
    "path": "packages/openapi-python/src/py-compiler/__tests__/nodes/expressions/kwarg.test.ts",
    "content": "import { py } from '../../../index';\nimport { assertPrintedMatchesSnapshot } from '../utils';\n\ndescribe('keyword argument expression', () => {\n  it('string value', async () => {\n    const file = py.factory.createSourceFile([\n      py.factory.createAssignment(\n        py.factory.createIdentifier('result'),\n        undefined,\n        py.factory.createCallExpression(py.factory.createIdentifier('func'), [\n          py.factory.createKeywordArgument('name', py.factory.createLiteral('test')),\n        ]),\n      ),\n    ]);\n    await assertPrintedMatchesSnapshot(file, 'string.py');\n  });\n\n  it('number value', async () => {\n    const file = py.factory.createSourceFile([\n      py.factory.createAssignment(\n        py.factory.createIdentifier('result'),\n        undefined,\n        py.factory.createCallExpression(py.factory.createIdentifier('func'), [\n          py.factory.createKeywordArgument('count', py.factory.createLiteral(42)),\n        ]),\n      ),\n    ]);\n    await assertPrintedMatchesSnapshot(file, 'number.py');\n  });\n\n  it('multiple keyword arguments', async () => {\n    const file = py.factory.createSourceFile([\n      py.factory.createAssignment(\n        py.factory.createIdentifier('result'),\n        undefined,\n        py.factory.createCallExpression(py.factory.createIdentifier('Field'), [\n          py.factory.createIdentifier('...'),\n          py.factory.createKeywordArgument('min_length', py.factory.createLiteral(1)),\n          py.factory.createKeywordArgument('max_length', py.factory.createLiteral(100)),\n          py.factory.createKeywordArgument('description', py.factory.createLiteral('A field')),\n        ]),\n      ),\n    ]);\n    await assertPrintedMatchesSnapshot(file, 'multiple.py');\n  });\n});\n"
  },
  {
    "path": "packages/openapi-python/src/py-compiler/__tests__/nodes/expressions/lambda.test.ts",
    "content": "import { py } from '../../../index';\nimport { assertPrintedMatchesSnapshot } from '../utils';\n\ndescribe('lambda expression', () => {\n  it('simple', async () => {\n    const file = py.factory.createSourceFile([\n      py.factory.createAssignment(\n        py.factory.createIdentifier('x'),\n        undefined,\n        py.factory.createLiteral(5),\n      ),\n      py.factory.createExpressionStatement(\n        py.factory.createLambdaExpression(\n          [],\n          py.factory.createBinaryExpression(\n            py.factory.createIdentifier('x'),\n            '+',\n            py.factory.createLiteral(1),\n          ),\n        ),\n      ),\n    ]);\n    await assertPrintedMatchesSnapshot(file, 'simple.py');\n  });\n\n  it('with parameters and default', async () => {\n    const file = py.factory.createSourceFile([\n      py.factory.createExpressionStatement(\n        py.factory.createLambdaExpression(\n          [\n            py.factory.createFunctionParameter('x'),\n            py.factory.createFunctionParameter('y', undefined, py.factory.createLiteral(10)),\n          ],\n          py.factory.createBinaryExpression(\n            py.factory.createIdentifier('x'),\n            '*',\n            py.factory.createIdentifier('y'),\n          ),\n        ),\n      ),\n    ]);\n    await assertPrintedMatchesSnapshot(file, 'with-params-and-default.py');\n  });\n});\n"
  },
  {
    "path": "packages/openapi-python/src/py-compiler/__tests__/nodes/expressions/list.test.ts",
    "content": "import { py } from '../../../index';\nimport { assertPrintedMatchesSnapshot } from '../utils';\n\ndescribe('list expression', () => {\n  it('assignment', async () => {\n    const file = py.factory.createSourceFile([\n      py.factory.createAssignment(\n        py.factory.createIdentifier('nums'),\n        undefined,\n        py.factory.createListExpression([\n          py.factory.createLiteral(1),\n          py.factory.createLiteral(2),\n          py.factory.createLiteral(3),\n        ]),\n      ),\n    ]);\n    await assertPrintedMatchesSnapshot(file, 'list.py');\n  });\n});\n"
  },
  {
    "path": "packages/openapi-python/src/py-compiler/__tests__/nodes/expressions/literal.test.ts",
    "content": "import { py } from '../../../index';\nimport { assertPrintedMatchesSnapshot } from '../utils';\n\ndescribe('literal expression', () => {\n  it('primitive variables', async () => {\n    const file = py.factory.createSourceFile([\n      py.factory.createAssignment(\n        py.factory.createIdentifier('s'),\n        undefined,\n        py.factory.createLiteral('hello'),\n      ),\n      py.factory.createAssignment(\n        py.factory.createIdentifier('n'),\n        undefined,\n        py.factory.createLiteral(123),\n      ),\n      py.factory.createAssignment(\n        py.factory.createIdentifier('b'),\n        undefined,\n        py.factory.createLiteral(true),\n      ),\n      py.factory.createAssignment(\n        py.factory.createIdentifier('c'),\n        undefined,\n        py.factory.createLiteral(false),\n      ),\n      py.factory.createAssignment(\n        py.factory.createIdentifier('none'),\n        undefined,\n        py.factory.createLiteral(null),\n      ),\n    ]);\n    await assertPrintedMatchesSnapshot(file, 'primitive.py');\n  });\n});\n"
  },
  {
    "path": "packages/openapi-python/src/py-compiler/__tests__/nodes/expressions/set.test.ts",
    "content": "import { py } from '../../../index';\nimport { assertPrintedMatchesSnapshot } from '../utils';\n\ndescribe('set expression', () => {\n  it('assignment', async () => {\n    const file = py.factory.createSourceFile([\n      py.factory.createAssignment(\n        py.factory.createIdentifier('foo'),\n        undefined,\n        py.factory.createLiteral('bar'),\n      ),\n      py.factory.createAssignment(\n        py.factory.createIdentifier('emptySet'),\n        undefined,\n        py.factory.createSetExpression([]),\n      ),\n      py.factory.createAssignment(\n        py.factory.createIdentifier('numberSet'),\n        undefined,\n        py.factory.createSetExpression([\n          py.factory.createLiteral(1),\n          py.factory.createLiteral(2),\n          py.factory.createLiteral(3),\n        ]),\n      ),\n      py.factory.createAssignment(\n        py.factory.createIdentifier('mixedSet'),\n        undefined,\n        py.factory.createSetExpression([\n          py.factory.createLiteral('a'),\n          py.factory.createLiteral(true),\n          py.factory.createIdentifier('foo'),\n        ]),\n      ),\n    ]);\n    await assertPrintedMatchesSnapshot(file, 'set.py');\n  });\n});\n"
  },
  {
    "path": "packages/openapi-python/src/py-compiler/__tests__/nodes/expressions/subscript.test.ts",
    "content": "import { py } from '../../../index';\nimport { assertPrintedMatchesSnapshot } from '../utils';\n\ndescribe('subscript expression', () => {\n  it('type annotation with single type parameter', async () => {\n    const file = py.factory.createSourceFile([\n      py.factory.createAssignment(\n        py.factory.createIdentifier('numbers'),\n        undefined,\n        py.factory.createSubscriptExpression(\n          py.factory.createIdentifier('list'),\n          py.factory.createIdentifier('int'),\n        ),\n      ),\n    ]);\n    await assertPrintedMatchesSnapshot(file, 'single.py');\n  });\n\n  it('type annotation with multiple type parameters', async () => {\n    const file = py.factory.createSourceFile([\n      py.factory.createAssignment(\n        py.factory.createIdentifier('data'),\n        undefined,\n        py.factory.createSubscriptExpression(\n          py.factory.createIdentifier('dict'),\n          py.factory.createSubscriptSlice([\n            py.factory.createIdentifier('str'),\n            py.factory.createIdentifier('int'),\n          ]),\n        ),\n      ),\n    ]);\n    await assertPrintedMatchesSnapshot(file, 'multiple.py');\n  });\n\n  it('index access', async () => {\n    const file = py.factory.createSourceFile([\n      py.factory.createAssignment(\n        py.factory.createIdentifier('items'),\n        undefined,\n        py.factory.createTupleExpression([\n          py.factory.createLiteral(1),\n          py.factory.createLiteral(2),\n          py.factory.createLiteral(3),\n        ]),\n      ),\n      py.factory.createAssignment(\n        py.factory.createIdentifier('first'),\n        undefined,\n        py.factory.createSubscriptExpression(\n          py.factory.createIdentifier('items'),\n          py.factory.createLiteral(0),\n        ),\n      ),\n    ]);\n    await assertPrintedMatchesSnapshot(file, 'index-access.py');\n  });\n\n  it('nested type annotation', async () => {\n    const file = py.factory.createSourceFile([\n      py.factory.createAssignment(\n        py.factory.createIdentifier('matrix'),\n        undefined,\n        py.factory.createSubscriptExpression(\n          py.factory.createIdentifier('list'),\n          py.factory.createSubscriptExpression(\n            py.factory.createIdentifier('list'),\n            py.factory.createIdentifier('int'),\n          ),\n        ),\n      ),\n    ]);\n    await assertPrintedMatchesSnapshot(file, 'nested.py');\n  });\n});\n"
  },
  {
    "path": "packages/openapi-python/src/py-compiler/__tests__/nodes/expressions/tuple.test.ts",
    "content": "import { py } from '../../../index';\nimport { assertPrintedMatchesSnapshot } from '../utils';\n\ndescribe('tuple expression', () => {\n  it('assignment', async () => {\n    const file = py.factory.createSourceFile([\n      py.factory.createAssignment(\n        py.factory.createIdentifier('t'),\n        undefined,\n        py.factory.createTupleExpression([\n          py.factory.createLiteral(1),\n          py.factory.createLiteral(2),\n          py.factory.createLiteral(3),\n        ]),\n      ),\n      py.factory.createAssignment(\n        py.factory.createIdentifier('single'),\n        undefined,\n        py.factory.createTupleExpression([py.factory.createLiteral(42)]),\n      ),\n    ]);\n    await assertPrintedMatchesSnapshot(file, 'tuple.py');\n  });\n});\n"
  },
  {
    "path": "packages/openapi-python/src/py-compiler/__tests__/nodes/expressions/yield.test.ts",
    "content": "import { py } from '../../../index';\nimport { assertPrintedMatchesSnapshot } from '../utils';\n\ndescribe('yield expression', () => {\n  it('without value', async () => {\n    const file = py.factory.createSourceFile([\n      py.factory.createFunctionDeclaration('gen', [], undefined, [\n        py.factory.createExpressionStatement(py.factory.createYieldExpression(undefined)),\n      ]),\n    ]);\n    await assertPrintedMatchesSnapshot(file, 'default.py');\n  });\n\n  it('with value', async () => {\n    const file = py.factory.createSourceFile([\n      py.factory.createFunctionDeclaration('gen', [], undefined, [\n        py.factory.createExpressionStatement(\n          py.factory.createYieldExpression(py.factory.createLiteral(42)),\n        ),\n      ]),\n    ]);\n    await assertPrintedMatchesSnapshot(file, 'with-value.py');\n  });\n\n  it('from expression', async () => {\n    const file = py.factory.createSourceFile([\n      py.factory.createAssignment(\n        py.factory.createIdentifier('iterable'),\n        undefined,\n        py.factory.createListExpression([\n          py.factory.createLiteral(1),\n          py.factory.createLiteral(2),\n          py.factory.createLiteral(3),\n        ]),\n      ),\n      py.factory.createEmptyStatement(),\n      py.factory.createFunctionDeclaration('gen', [], undefined, [\n        py.factory.createExpressionStatement(\n          py.factory.createYieldFromExpression(py.factory.createIdentifier('iterable')),\n        ),\n      ]),\n    ]);\n    await assertPrintedMatchesSnapshot(file, 'from-iterable.py');\n  });\n});\n"
  },
  {
    "path": "packages/openapi-python/src/py-compiler/__tests__/nodes/statements/assignment.test.ts",
    "content": "import { py } from '../../../index';\nimport { assertPrintedMatchesSnapshot } from '../utils';\n\ndescribe('assignment statement', () => {\n  it('primitive variables', async () => {\n    const file = py.factory.createSourceFile([\n      py.factory.createAssignment(\n        py.factory.createIdentifier('foo'),\n        undefined,\n        py.factory.createLiteral(42),\n      ),\n    ]);\n    await assertPrintedMatchesSnapshot(file, 'primitive.py');\n  });\n\n  it('annotation only', async () => {\n    const file = py.factory.createSourceFile([\n      py.factory.createAssignment(\n        py.factory.createIdentifier('name'),\n        py.factory.createIdentifier('str'),\n      ),\n    ]);\n    await assertPrintedMatchesSnapshot(file, 'annotation-only.py');\n  });\n\n  it('annotation with value', async () => {\n    const file = py.factory.createSourceFile([\n      py.factory.createAssignment(\n        py.factory.createIdentifier('name'),\n        py.factory.createIdentifier('str'),\n        py.factory.createLiteral('default'),\n      ),\n    ]);\n    await assertPrintedMatchesSnapshot(file, 'annotation-with-value.py');\n  });\n\n  it('optional annotation', async () => {\n    const file = py.factory.createSourceFile([\n      py.factory.createAssignment(\n        py.factory.createIdentifier('name'),\n        py.factory.createSubscriptExpression(\n          py.factory.createIdentifier('Optional'),\n          py.factory.createIdentifier('str'),\n        ),\n        py.factory.createIdentifier('None'),\n      ),\n    ]);\n    await assertPrintedMatchesSnapshot(file, 'optional-annotation.py');\n  });\n\n  it('complex type annotation', async () => {\n    const file = py.factory.createSourceFile([\n      py.factory.createAssignment(\n        py.factory.createIdentifier('items'),\n        py.factory.createSubscriptExpression(\n          py.factory.createIdentifier('List'),\n          py.factory.createIdentifier('str'),\n        ),\n        py.factory.createCallExpression(py.factory.createIdentifier('Field'), [\n          py.factory.createIdentifier('...'),\n          py.factory.createKeywordArgument('min_length', py.factory.createLiteral(1)),\n        ]),\n      ),\n    ]);\n    await assertPrintedMatchesSnapshot(file, 'complex-annotation.py');\n  });\n});\n"
  },
  {
    "path": "packages/openapi-python/src/py-compiler/__tests__/nodes/statements/augmentedAssignment.test.ts",
    "content": "import { py } from '../../../index';\nimport { assertPrintedMatchesSnapshot } from '../utils';\n\ndescribe('augmented assignment statement', () => {\n  it('arithmetic operators', async () => {\n    const file = py.factory.createSourceFile([\n      py.factory.createAssignment(\n        py.factory.createIdentifier('x'),\n        undefined,\n        py.factory.createLiteral(0),\n      ),\n      py.factory.createAssignment(\n        py.factory.createIdentifier('y'),\n        undefined,\n        py.factory.createLiteral(0),\n      ),\n      py.factory.createAssignment(\n        py.factory.createIdentifier('z'),\n        undefined,\n        py.factory.createLiteral(0),\n      ),\n      py.factory.createAssignment(\n        py.factory.createIdentifier('a'),\n        undefined,\n        py.factory.createLiteral(0.0),\n      ),\n      py.factory.createAssignment(\n        py.factory.createIdentifier('b'),\n        undefined,\n        py.factory.createLiteral(0),\n      ),\n      py.factory.createAssignment(\n        py.factory.createIdentifier('c'),\n        undefined,\n        py.factory.createLiteral(0),\n      ),\n\n      py.factory.createAugmentedAssignment(\n        py.factory.createIdentifier('x'),\n        '+=',\n        py.factory.createLiteral(1),\n      ),\n      py.factory.createAugmentedAssignment(\n        py.factory.createIdentifier('y'),\n        '-=',\n        py.factory.createLiteral(2),\n      ),\n      py.factory.createAugmentedAssignment(\n        py.factory.createIdentifier('z'),\n        '*=',\n        py.factory.createLiteral(3),\n      ),\n      py.factory.createAugmentedAssignment(\n        py.factory.createIdentifier('a'),\n        '/=',\n        py.factory.createLiteral(4),\n      ),\n      py.factory.createAugmentedAssignment(\n        py.factory.createIdentifier('b'),\n        '//=',\n        py.factory.createLiteral(5),\n      ),\n      py.factory.createAugmentedAssignment(\n        py.factory.createIdentifier('c'),\n        '%=',\n        py.factory.createLiteral(6),\n      ),\n    ]);\n    await assertPrintedMatchesSnapshot(file, 'arithmetic.py');\n  });\n\n  it('power and bitwise operators', async () => {\n    const file = py.factory.createSourceFile([\n      py.factory.createAssignment(\n        py.factory.createIdentifier('x'),\n        undefined,\n        py.factory.createLiteral(1),\n      ),\n      py.factory.createAssignment(\n        py.factory.createIdentifier('y'),\n        undefined,\n        py.factory.createLiteral(1),\n      ),\n      py.factory.createAssignment(\n        py.factory.createIdentifier('z'),\n        undefined,\n        py.factory.createLiteral(1),\n      ),\n      py.factory.createAssignment(\n        py.factory.createIdentifier('a'),\n        undefined,\n        py.factory.createLiteral(1),\n      ),\n      py.factory.createAssignment(\n        py.factory.createIdentifier('b'),\n        undefined,\n        py.factory.createLiteral(1),\n      ),\n      py.factory.createAssignment(\n        py.factory.createIdentifier('c'),\n        undefined,\n        py.factory.createLiteral(1),\n      ),\n\n      py.factory.createAugmentedAssignment(\n        py.factory.createIdentifier('x'),\n        '**=',\n        py.factory.createLiteral(2),\n      ),\n      py.factory.createAugmentedAssignment(\n        py.factory.createIdentifier('y'),\n        '&=',\n        py.factory.createLiteral(1),\n      ),\n      py.factory.createAugmentedAssignment(\n        py.factory.createIdentifier('z'),\n        '|=',\n        py.factory.createLiteral(1),\n      ),\n      py.factory.createAugmentedAssignment(\n        py.factory.createIdentifier('a'),\n        '^=',\n        py.factory.createLiteral(1),\n      ),\n      py.factory.createAugmentedAssignment(\n        py.factory.createIdentifier('b'),\n        '>>=',\n        py.factory.createLiteral(1),\n      ),\n      py.factory.createAugmentedAssignment(\n        py.factory.createIdentifier('c'),\n        '<<=',\n        py.factory.createLiteral(1),\n      ),\n    ]);\n    await assertPrintedMatchesSnapshot(file, 'bitwise.py');\n  });\n});\n"
  },
  {
    "path": "packages/openapi-python/src/py-compiler/__tests__/nodes/statements/block.test.ts",
    "content": "import { py } from '../../..';\nimport { assertPrintedMatchesSnapshot } from '../utils';\n\ndescribe('block statement', () => {\n  it('inside function', async () => {\n    const file = py.factory.createSourceFile([\n      py.factory.createFunctionDeclaration('main', [], undefined, [\n        py.factory.createExpressionStatement(\n          py.factory.createCallExpression(py.factory.createIdentifier('print'), [\n            py.factory.createLiteral('inside'),\n          ]),\n        ),\n      ]),\n    ]);\n    await assertPrintedMatchesSnapshot(file, 'function.py');\n  });\n});\n"
  },
  {
    "path": "packages/openapi-python/src/py-compiler/__tests__/nodes/statements/break.test.ts",
    "content": "import { py } from '../../../index';\nimport { assertPrintedMatchesSnapshot } from '../utils';\n\ndescribe('break statement', () => {\n  it('inside a while loop', async () => {\n    const file = py.factory.createSourceFile([\n      py.factory.createWhileStatement(py.factory.createLiteral(true), [\n        py.factory.createBreakStatement(),\n      ]),\n    ]);\n    await assertPrintedMatchesSnapshot(file, 'while.py');\n  });\n});\n"
  },
  {
    "path": "packages/openapi-python/src/py-compiler/__tests__/nodes/statements/continue.test.ts",
    "content": "import { py } from '../../../index';\nimport { assertPrintedMatchesSnapshot } from '../utils';\n\ndescribe('continue statement', () => {\n  it('inside a while loop', async () => {\n    const file = py.factory.createSourceFile([\n      py.factory.createWhileStatement(py.factory.createLiteral(true), [\n        py.factory.createContinueStatement(),\n      ]),\n    ]);\n    await assertPrintedMatchesSnapshot(file, 'while.py');\n  });\n});\n"
  },
  {
    "path": "packages/openapi-python/src/py-compiler/__tests__/nodes/statements/expression.test.ts",
    "content": "import { py } from '../../../index';\nimport { assertPrintedMatchesSnapshot } from '../utils';\n\ndescribe('expression statement', () => {\n  it('simple', async () => {\n    const file = py.factory.createSourceFile([\n      py.factory.createExpressionStatement(\n        py.factory.createCallExpression(py.factory.createIdentifier('print'), [\n          py.factory.createLiteral('hello'),\n        ]),\n      ),\n    ]);\n    await assertPrintedMatchesSnapshot(file, 'simple.py');\n  });\n});\n"
  },
  {
    "path": "packages/openapi-python/src/py-compiler/__tests__/nodes/statements/for.test.ts",
    "content": "import { py } from '../../../index';\nimport { assertPrintedMatchesSnapshot } from '../utils';\n\ndescribe('for statement', () => {\n  it('simple', async () => {\n    const file = py.factory.createSourceFile([\n      py.factory.createForStatement(\n        py.factory.createIdentifier('i'),\n        py.factory.createCallExpression(py.factory.createIdentifier('range'), [\n          py.factory.createLiteral(3),\n        ]),\n        [\n          py.factory.createExpressionStatement(\n            py.factory.createCallExpression(py.factory.createIdentifier('print'), [\n              py.factory.createIdentifier('i'),\n            ]),\n          ),\n        ],\n      ),\n    ]);\n    await assertPrintedMatchesSnapshot(file, 'for.py');\n  });\n\n  it('with else', async () => {\n    const file = py.factory.createSourceFile([\n      py.factory.createAssignment(\n        py.factory.createIdentifier('items'),\n        undefined,\n        py.factory.createListExpression([\n          py.factory.createLiteral(1),\n          py.factory.createLiteral(2),\n          py.factory.createLiteral(3),\n        ]),\n      ),\n      py.factory.createForStatement(\n        py.factory.createIdentifier('x'),\n        py.factory.createIdentifier('items'),\n        [],\n        [\n          py.factory.createExpressionStatement(\n            py.factory.createCallExpression(py.factory.createIdentifier('print'), [\n              py.factory.createLiteral('done'),\n            ]),\n          ),\n        ],\n      ),\n    ]);\n    await assertPrintedMatchesSnapshot(file, 'for-else.py');\n  });\n});\n"
  },
  {
    "path": "packages/openapi-python/src/py-compiler/__tests__/nodes/statements/if.test.ts",
    "content": "import { py } from '../../../index';\nimport { assertPrintedMatchesSnapshot } from '../utils';\n\ndescribe('if statement', () => {\n  it('simple', async () => {\n    const file = py.factory.createSourceFile([\n      py.factory.createIfStatement(py.factory.createLiteral(true), [\n        py.factory.createExpressionStatement(\n          py.factory.createCallExpression(py.factory.createIdentifier('print'), [\n            py.factory.createLiteral('positive'),\n          ]),\n        ),\n      ]),\n    ]);\n    await assertPrintedMatchesSnapshot(file, 'if.py');\n  });\n\n  it('with else', async () => {\n    const file = py.factory.createSourceFile([\n      py.factory.createAssignment(\n        py.factory.createIdentifier('x'),\n        undefined,\n        py.factory.createLiteral(0),\n      ),\n      py.factory.createIfStatement(\n        py.factory.createBinaryExpression(\n          py.factory.createIdentifier('x'),\n          '>',\n          py.factory.createLiteral(0),\n        ),\n        [\n          py.factory.createExpressionStatement(\n            py.factory.createCallExpression(py.factory.createIdentifier('print'), [\n              py.factory.createLiteral('positive'),\n            ]),\n          ),\n        ],\n        [\n          py.factory.createExpressionStatement(\n            py.factory.createCallExpression(py.factory.createIdentifier('print'), [\n              py.factory.createLiteral('non-positive'),\n            ]),\n          ),\n        ],\n      ),\n    ]);\n    await assertPrintedMatchesSnapshot(file, 'if-else.py');\n  });\n});\n"
  },
  {
    "path": "packages/openapi-python/src/py-compiler/__tests__/nodes/statements/import.test.ts",
    "content": "import { py } from '../../../index';\nimport { assertPrintedMatchesSnapshot } from '../utils';\n\ndescribe('import statement', () => {\n  it('module', async () => {\n    const file = py.factory.createSourceFile([\n      py.factory.createImportStatement('math'),\n      py.factory.createImportStatement('json', [{ name: 'loads' }], false),\n    ]);\n    await assertPrintedMatchesSnapshot(file, 'module.py');\n  });\n\n  it('module with alias', async () => {\n    const file = py.factory.createSourceFile([\n      py.factory.createImportStatement('json', [{ alias: 'js', name: 'json' }], false),\n    ]);\n    await assertPrintedMatchesSnapshot(file, 'module-with-alias.py');\n  });\n\n  it('from with name and alias', async () => {\n    const file = py.factory.createSourceFile([\n      py.factory.createImportStatement(\n        'os',\n        [{ name: 'path' }, { alias: 'env', name: 'environ' }],\n        true,\n      ),\n    ]);\n    await assertPrintedMatchesSnapshot(file, 'from-with-name-alias.py');\n  });\n\n  it('from with alias', async () => {\n    const file = py.factory.createSourceFile([\n      py.factory.createImportStatement('os', [{ alias: 'env', name: 'environ' }], true),\n    ]);\n    await assertPrintedMatchesSnapshot(file, 'from-with-alias.py');\n  });\n\n  it('from with name', async () => {\n    const file = py.factory.createSourceFile([\n      py.factory.createImportStatement('sys', [{ name: 'argv' }], true),\n    ]);\n    await assertPrintedMatchesSnapshot(file, 'from-with-name.py');\n  });\n\n  it('from with asterisk', async () => {\n    const file = py.factory.createSourceFile([\n      py.factory.createImportStatement('collections', [], true),\n    ]);\n    await assertPrintedMatchesSnapshot(file, 'from-with-asterisk.py');\n  });\n});\n"
  },
  {
    "path": "packages/openapi-python/src/py-compiler/__tests__/nodes/statements/raise.test.ts",
    "content": "import { py } from '../../../index';\nimport { assertPrintedMatchesSnapshot } from '../utils';\n\ndescribe('raise statement', () => {\n  it('with exception', async () => {\n    const file = py.factory.createSourceFile([\n      py.factory.createRaiseStatement(\n        py.factory.createCallExpression(py.factory.createIdentifier('ValueError'), [\n          py.factory.createLiteral('Invalid input'),\n        ]),\n      ),\n    ]);\n    await assertPrintedMatchesSnapshot(file, 'with-exception.py');\n  });\n\n  it('re-raise', async () => {\n    const file = py.factory.createSourceFile([py.factory.createRaiseStatement()]);\n    await assertPrintedMatchesSnapshot(file, 'reraise.py');\n  });\n});\n"
  },
  {
    "path": "packages/openapi-python/src/py-compiler/__tests__/nodes/statements/return.test.ts",
    "content": "import { py } from '../../../index';\nimport { assertPrintedMatchesSnapshot } from '../utils';\n\ndescribe('return statement', () => {\n  it('inside function', async () => {\n    const node = py.factory.createSourceFile([\n      py.factory.createFunctionDeclaration('get_message', [], undefined, [\n        py.factory.createReturnStatement(py.factory.createLiteral('hi')),\n      ]),\n    ]);\n    await assertPrintedMatchesSnapshot(node, 'function.py');\n  });\n});\n"
  },
  {
    "path": "packages/openapi-python/src/py-compiler/__tests__/nodes/statements/try.test.ts",
    "content": "import { py } from '../../../index';\nimport { assertPrintedMatchesSnapshot } from '../utils';\n\ndescribe('try statement', () => {\n  it('with except', async () => {\n    const file = py.factory.createSourceFile([\n      py.factory.createFunctionDeclaration('dangerous_func', [], undefined, []),\n      py.factory.createEmptyStatement(),\n      py.factory.createTryStatement(\n        [\n          py.factory.createExpressionStatement(\n            py.factory.createCallExpression(py.factory.createIdentifier('dangerous_func'), []),\n          ),\n        ],\n        [\n          py.factory.createExceptClause(\n            [\n              py.factory.createExpressionStatement(\n                py.factory.createCallExpression(py.factory.createIdentifier('print'), [\n                  py.factory.createIdentifier('e'),\n                ]),\n              ),\n            ],\n            py.factory.createIdentifier('ValueError'),\n            py.factory.createIdentifier('e'),\n          ),\n        ],\n      ),\n    ]);\n    await assertPrintedMatchesSnapshot(file, 'with-except.py');\n  });\n\n  it('with except and else', async () => {\n    const file = py.factory.createSourceFile([\n      py.factory.createFunctionDeclaration('dangerous_func', [], undefined, []),\n      py.factory.createEmptyStatement(),\n      py.factory.createTryStatement(\n        [\n          py.factory.createExpressionStatement(\n            py.factory.createCallExpression(py.factory.createIdentifier('dangerous_func'), []),\n          ),\n        ],\n        [py.factory.createExceptClause([])],\n        [],\n      ),\n    ]);\n    await assertPrintedMatchesSnapshot(file, 'with-except-else.py');\n  });\n\n  it('with finally', async () => {\n    const file = py.factory.createSourceFile([\n      py.factory.createFunctionDeclaration('dangerous_func', [], undefined, []),\n      py.factory.createEmptyStatement(),\n      py.factory.createTryStatement(\n        [\n          py.factory.createExpressionStatement(\n            py.factory.createCallExpression(py.factory.createIdentifier('dangerous_func'), []),\n          ),\n        ],\n        undefined,\n        undefined,\n        [],\n      ),\n    ]);\n    await assertPrintedMatchesSnapshot(file, 'with-finally.py');\n  });\n\n  it('with except and finally', async () => {\n    const file = py.factory.createSourceFile([\n      py.factory.createFunctionDeclaration('dangerous_func', [], undefined, []),\n      py.factory.createEmptyStatement(),\n      py.factory.createTryStatement(\n        [\n          py.factory.createExpressionStatement(\n            py.factory.createCallExpression(py.factory.createIdentifier('dangerous_func'), []),\n          ),\n        ],\n        [py.factory.createExceptClause([], py.factory.createIdentifier('Exception'))],\n        undefined,\n        [],\n      ),\n    ]);\n    await assertPrintedMatchesSnapshot(file, 'with-except-finally.py');\n  });\n\n  it('with except, else, and finally', async () => {\n    const file = py.factory.createSourceFile([\n      py.factory.createFunctionDeclaration('dangerous_func', [], undefined, []),\n      py.factory.createEmptyStatement(),\n      py.factory.createTryStatement(\n        [\n          py.factory.createExpressionStatement(\n            py.factory.createCallExpression(py.factory.createIdentifier('dangerous_func'), []),\n          ),\n        ],\n        [\n          py.factory.createExceptClause(\n            [\n              py.factory.createExpressionStatement(\n                py.factory.createCallExpression(py.factory.createIdentifier('print'), [\n                  py.factory.createIdentifier('e'),\n                ]),\n              ),\n            ],\n            py.factory.createIdentifier('Exception'),\n            py.factory.createIdentifier('e'),\n          ),\n        ],\n        [],\n        [],\n      ),\n    ]);\n    await assertPrintedMatchesSnapshot(file, 'with-except-else-finally.py');\n  });\n});\n"
  },
  {
    "path": "packages/openapi-python/src/py-compiler/__tests__/nodes/statements/while.test.ts",
    "content": "import { py } from '../../../index';\nimport { assertPrintedMatchesSnapshot } from '../utils';\n\ndescribe('while statement', () => {\n  it('simple', async () => {\n    const file = py.factory.createSourceFile([\n      py.factory.createAssignment(\n        py.factory.createIdentifier('x'),\n        undefined,\n        py.factory.createLiteral(3),\n      ),\n      py.factory.createWhileStatement(\n        py.factory.createBinaryExpression(\n          py.factory.createIdentifier('x'),\n          '>',\n          py.factory.createLiteral(0),\n        ),\n        [\n          py.factory.createExpressionStatement(\n            py.factory.createCallExpression(py.factory.createIdentifier('print'), [\n              py.factory.createIdentifier('x'),\n            ]),\n          ),\n          py.factory.createAssignment(\n            py.factory.createIdentifier('x'),\n            undefined,\n            py.factory.createBinaryExpression(\n              py.factory.createIdentifier('x'),\n              '-',\n              py.factory.createLiteral(1),\n            ),\n          ),\n        ],\n      ),\n    ]);\n    await assertPrintedMatchesSnapshot(file, 'while.py');\n  });\n\n  it('with else', async () => {\n    const file = py.factory.createSourceFile([\n      py.factory.createFunctionDeclaration('should_continue', [], undefined, [\n        py.factory.createReturnStatement(py.factory.createLiteral(false)),\n      ]),\n      py.factory.createWhileStatement(\n        py.factory.createCallExpression(py.factory.createIdentifier('should_continue'), []),\n        [],\n        [\n          py.factory.createExpressionStatement(\n            py.factory.createCallExpression(py.factory.createIdentifier('print'), [\n              py.factory.createLiteral('done'),\n            ]),\n          ),\n        ],\n      ),\n    ]);\n    await assertPrintedMatchesSnapshot(file, 'while-else.py');\n  });\n});\n"
  },
  {
    "path": "packages/openapi-python/src/py-compiler/__tests__/nodes/statements/with.test.ts",
    "content": "import { py } from '../../../index';\nimport { assertPrintedMatchesSnapshot } from '../utils';\n\ndescribe('with statement', () => {\n  it('with alias', async () => {\n    const file = py.factory.createSourceFile([\n      py.factory.createClassDeclaration('context_manager', [\n        py.factory.createFunctionDeclaration(\n          '__enter__',\n          [py.factory.createFunctionParameter('self')],\n          undefined,\n          [py.factory.createReturnStatement(py.factory.createIdentifier('self'))],\n        ),\n        py.factory.createFunctionDeclaration(\n          '__exit__',\n          [\n            py.factory.createFunctionParameter('self'),\n            py.factory.createFunctionParameter('exc_type'),\n            py.factory.createFunctionParameter('exc_val'),\n            py.factory.createFunctionParameter('exc_tb'),\n          ],\n          undefined,\n          [py.factory.createReturnStatement(py.factory.createLiteral(false))],\n        ),\n      ]),\n      py.factory.createEmptyStatement(),\n      py.factory.createWithStatement(\n        [\n          py.factory.createWithItem(\n            py.factory.createCallExpression(py.factory.createIdentifier('context_manager'), []),\n            py.factory.createIdentifier('alias'),\n          ),\n        ],\n        [],\n      ),\n    ]);\n    await assertPrintedMatchesSnapshot(file, 'with-alias.py');\n  });\n\n  it('with tuple alias', async () => {\n    const file = py.factory.createSourceFile([\n      py.factory.createClassDeclaration('context_manager', [\n        py.factory.createFunctionDeclaration(\n          '__enter__',\n          [py.factory.createFunctionParameter('self')],\n          undefined,\n          [py.factory.createReturnStatement(py.factory.createIdentifier('self'))],\n        ),\n        py.factory.createFunctionDeclaration(\n          '__exit__',\n          [\n            py.factory.createFunctionParameter('self'),\n            py.factory.createFunctionParameter('exc_type'),\n            py.factory.createFunctionParameter('exc_val'),\n            py.factory.createFunctionParameter('exc_tb'),\n          ],\n          undefined,\n          [py.factory.createReturnStatement(py.factory.createLiteral(false))],\n        ),\n      ]),\n      py.factory.createEmptyStatement(),\n      py.factory.createWithStatement(\n        [\n          py.factory.createWithItem(\n            py.factory.createCallExpression(py.factory.createIdentifier('context_manager'), []),\n            py.factory.createTupleExpression([\n              py.factory.createIdentifier('a'),\n              py.factory.createIdentifier('b'),\n            ]),\n          ),\n        ],\n        [],\n      ),\n    ]);\n    await assertPrintedMatchesSnapshot(file, 'with-tuple-alias.py');\n  });\n\n  it('without alias', async () => {\n    const file = py.factory.createSourceFile([\n      py.factory.createClassDeclaration('context_manager', [\n        py.factory.createFunctionDeclaration(\n          '__enter__',\n          [py.factory.createFunctionParameter('self')],\n          undefined,\n          [py.factory.createReturnStatement(py.factory.createIdentifier('self'))],\n        ),\n        py.factory.createFunctionDeclaration(\n          '__exit__',\n          [\n            py.factory.createFunctionParameter('self'),\n            py.factory.createFunctionParameter('exc_type'),\n            py.factory.createFunctionParameter('exc_val'),\n            py.factory.createFunctionParameter('exc_tb'),\n          ],\n          undefined,\n          [py.factory.createReturnStatement(py.factory.createLiteral(false))],\n        ),\n      ]),\n      py.factory.createEmptyStatement(),\n      py.factory.createWithStatement(\n        [\n          py.factory.createWithItem(\n            py.factory.createCallExpression(py.factory.createIdentifier('context_manager'), []),\n          ),\n        ],\n        [],\n      ),\n    ]);\n    await assertPrintedMatchesSnapshot(file, 'with.py');\n  });\n\n  it('many with items', async () => {\n    const file = py.factory.createSourceFile([\n      py.factory.createClassDeclaration('context_manager', [\n        py.factory.createFunctionDeclaration(\n          '__enter__',\n          [py.factory.createFunctionParameter('self')],\n          undefined,\n          [py.factory.createReturnStatement(py.factory.createIdentifier('self'))],\n        ),\n        py.factory.createFunctionDeclaration(\n          '__exit__',\n          [\n            py.factory.createFunctionParameter('self'),\n            py.factory.createFunctionParameter('exc_type'),\n            py.factory.createFunctionParameter('exc_val'),\n            py.factory.createFunctionParameter('exc_tb'),\n          ],\n          undefined,\n          [py.factory.createReturnStatement(py.factory.createLiteral(false))],\n        ),\n      ]),\n      py.factory.createEmptyStatement(),\n      py.factory.createClassDeclaration('context_manager2', [\n        py.factory.createFunctionDeclaration(\n          '__enter__',\n          [py.factory.createFunctionParameter('self')],\n          undefined,\n          [py.factory.createReturnStatement(py.factory.createIdentifier('self'))],\n        ),\n        py.factory.createFunctionDeclaration(\n          '__exit__',\n          [\n            py.factory.createFunctionParameter('self'),\n            py.factory.createFunctionParameter('exc_type'),\n            py.factory.createFunctionParameter('exc_val'),\n            py.factory.createFunctionParameter('exc_tb'),\n          ],\n          undefined,\n          [py.factory.createReturnStatement(py.factory.createLiteral(false))],\n        ),\n      ]),\n      py.factory.createEmptyStatement(),\n      py.factory.createClassDeclaration('context_manager3', [\n        py.factory.createFunctionDeclaration(\n          '__enter__',\n          [py.factory.createFunctionParameter('self')],\n          undefined,\n          [py.factory.createReturnStatement(py.factory.createIdentifier('self'))],\n        ),\n        py.factory.createFunctionDeclaration(\n          '__exit__',\n          [\n            py.factory.createFunctionParameter('self'),\n            py.factory.createFunctionParameter('exc_type'),\n            py.factory.createFunctionParameter('exc_val'),\n            py.factory.createFunctionParameter('exc_tb'),\n          ],\n          undefined,\n          [py.factory.createReturnStatement(py.factory.createLiteral(false))],\n        ),\n      ]),\n      py.factory.createEmptyStatement(),\n      py.factory.createWithStatement(\n        [\n          py.factory.createWithItem(\n            py.factory.createCallExpression(py.factory.createIdentifier('context_manager'), []),\n            py.factory.createIdentifier('alias'),\n          ),\n          py.factory.createWithItem(\n            py.factory.createCallExpression(py.factory.createIdentifier('context_manager2'), []),\n            py.factory.createTupleExpression([\n              py.factory.createIdentifier('a'),\n              py.factory.createIdentifier('b'),\n            ]),\n          ),\n          py.factory.createWithItem(\n            py.factory.createCallExpression(py.factory.createIdentifier('context_manager3'), []),\n          ),\n        ],\n        [],\n      ),\n    ]);\n    await assertPrintedMatchesSnapshot(file, 'with-many-items.py');\n  });\n\n  it('with async', async () => {\n    const file = py.factory.createSourceFile([\n      py.factory.createClassDeclaration('context_manager', [\n        py.factory.createFunctionDeclaration(\n          '__enter__',\n          [py.factory.createFunctionParameter('self')],\n          undefined,\n          [py.factory.createReturnStatement(py.factory.createIdentifier('self'))],\n        ),\n        py.factory.createFunctionDeclaration(\n          '__exit__',\n          [\n            py.factory.createFunctionParameter('self'),\n            py.factory.createFunctionParameter('exc_type'),\n            py.factory.createFunctionParameter('exc_val'),\n            py.factory.createFunctionParameter('exc_tb'),\n          ],\n          undefined,\n          [py.factory.createReturnStatement(py.factory.createLiteral(false))],\n        ),\n      ]),\n      py.factory.createEmptyStatement(),\n      py.factory.createFunctionDeclaration(\n        'foo',\n        [],\n        undefined,\n        [\n          py.factory.createWithStatement(\n            [\n              py.factory.createWithItem(\n                py.factory.createCallExpression(py.factory.createIdentifier('context_manager'), []),\n              ),\n            ],\n            [],\n            [py.factory.createIdentifier('async')],\n          ),\n        ],\n        undefined,\n        undefined,\n        [py.factory.createIdentifier('async')],\n      ),\n    ]);\n    await assertPrintedMatchesSnapshot(file, 'with-async.py');\n  });\n});\n"
  },
  {
    "path": "packages/openapi-python/src/py-compiler/__tests__/nodes/structure/comment.test.ts",
    "content": "import { py } from '../../../index';\nimport { assertPrintedMatchesSnapshot } from '../utils';\n\ndescribe('comment', () => {\n  it('simple', async () => {\n    const file = py.factory.createSourceFile([py.factory.createComment('This is a comment')]);\n    await assertPrintedMatchesSnapshot(file, 'simple.py');\n  });\n});\n"
  },
  {
    "path": "packages/openapi-python/src/py-compiler/__tests__/nodes/structure/sourceFile.test.ts",
    "content": "import { py } from '../../../index';\nimport { assertPrintedMatchesSnapshot } from '../utils';\n\ndescribe('source file', () => {\n  it('simple', async () => {\n    const file = py.factory.createSourceFile([\n      py.factory.createAssignment(\n        py.factory.createIdentifier('a'),\n        undefined,\n        py.factory.createLiteral(1),\n      ),\n      py.factory.createAssignment(\n        py.factory.createIdentifier('b'),\n        undefined,\n        py.factory.createLiteral(2),\n      ),\n    ]);\n    await assertPrintedMatchesSnapshot(file, 'simple.py');\n  });\n\n  it('with docstring', async () => {\n    const file = py.factory.createSourceFile(\n      [\n        py.factory.createAssignment(\n          py.factory.createIdentifier('foo'),\n          undefined,\n          py.factory.createLiteral(1),\n        ),\n      ],\n      'This is a module-level docstring.',\n    );\n    await assertPrintedMatchesSnapshot(file, 'with-docstring.py');\n  });\n});\n"
  },
  {
    "path": "packages/openapi-python/src/py-compiler/__tests__/nodes/utils.ts",
    "content": "import fs from 'node:fs';\nimport path from 'node:path';\n\nimport { py } from '../../index';\nimport { snapshotsDir, tmpDir } from '../constants';\n\nfunction getCallerFile(): string {\n  const error = new Error();\n  const stack = (error.stack ?? '').split('\\n');\n  const callerLine = stack.find((line) => line.includes('.test.ts'));\n  if (!callerLine) {\n    throw new Error('Could not find test file in stack trace');\n  }\n  const match = callerLine.match(/\\(([^)]+)\\)/) || callerLine.match(/at (.+):\\d+:\\d+/);\n  if (!match?.[1]) {\n    throw new Error('Could not extract file path');\n  }\n  return match[1];\n}\n\nfunction ensureInitFiles(dir: string, rootDir: string): void {\n  let current = dir;\n  while (current.startsWith(rootDir) && current !== rootDir) {\n    const initPath = path.join(current, '__init__.py');\n    if (!fs.existsSync(initPath)) {\n      fs.writeFileSync(initPath, '');\n    }\n    current = path.dirname(current);\n  }\n\n  const rootInit = path.join(rootDir, '__init__.py');\n  if (!fs.existsSync(rootInit)) {\n    fs.writeFileSync(rootInit, '');\n  }\n}\n\nexport async function assertPrintedMatchesSnapshot(\n  file: py.SourceFile,\n  filename: string,\n): Promise<void> {\n  const result = py.createPrinter().printFile(file);\n\n  const caller = getCallerFile();\n  const relPath = path\n    .relative(path.join(process.cwd(), 'src', 'py-compiler', '__tests__'), caller)\n    .replace(/\\.test\\.ts$/, '');\n  const outputPath = path.join(tmpDir, relPath, filename);\n  const outputDir = path.dirname(outputPath);\n\n  fs.mkdirSync(outputDir, { recursive: true });\n  fs.writeFileSync(outputPath, result);\n\n  ensureInitFiles(outputDir, tmpDir);\n\n  const snapshotPath = path.join(snapshotsDir, relPath, filename);\n\n  const snapshotDir = path.dirname(snapshotPath);\n  fs.mkdirSync(snapshotDir, { recursive: true });\n  ensureInitFiles(snapshotDir, snapshotsDir);\n\n  await expect(result).toMatchFileSnapshot(snapshotPath);\n}\n"
  },
  {
    "path": "packages/openapi-python/src/py-compiler/index.ts",
    "content": "import type { PyNode as _PyNode, PyNodeBase as _PyNodeBase } from './nodes/base';\nimport type {\n  PyComprehension as _PyComprehension,\n  PyComprehensionNode as _PyComprehensionNode,\n} from './nodes/comprehension';\nimport type { PyClassDeclaration as _PyClassDeclaration } from './nodes/declarations/class';\nimport type { PyFunctionDeclaration as _PyFunctionDeclaration } from './nodes/declarations/function';\nimport type { PyFunctionParameter as _PyFunctionParameter } from './nodes/declarations/functionParameter';\nimport type { PyExpression as _PyExpression } from './nodes/expression';\nimport type { PyAsyncExpression as _PyAsyncExpression } from './nodes/expressions/async';\nimport type { PyAwaitExpression as _PyAwaitExpression } from './nodes/expressions/await';\nimport type {\n  PyBinaryExpression as _PyBinaryExpression,\n  PyBinaryOperator as _PyBinaryOperator,\n} from './nodes/expressions/binary';\nimport type { PyCallExpression as _PyCallExpression } from './nodes/expressions/call';\nimport type { PyDictComprehension as _PyDictComprehension } from './nodes/expressions/comprehensions/dict';\nimport type { PyListComprehension as _PyListComprehension } from './nodes/expressions/comprehensions/list';\nimport type { PySetComprehension as _PySetComprehension } from './nodes/expressions/comprehensions/set';\nimport type { PyDictExpression as _PyDictExpression } from './nodes/expressions/dict';\nimport type { PyFStringExpression as _PyFStringExpression } from './nodes/expressions/fString';\nimport type { PyGeneratorExpression as _PyGeneratorExpression } from './nodes/expressions/generator';\nimport type { PyIdentifier as _PyIdentifier } from './nodes/expressions/identifier';\nimport type { PyKeywordArgument as _PyKeywordArgument } from './nodes/expressions/keywordArg';\nimport type { PyLambdaExpression as _PyLambdaExpression } from './nodes/expressions/lambda';\nimport type { PyListExpression as _PyListExpression } from './nodes/expressions/list';\nimport type {\n  PyLiteral as _PyLiteral,\n  PyLiteralValue as _PyLiteralValue,\n} from './nodes/expressions/literal';\nimport type { PyMemberExpression as _PyMemberExpression } from './nodes/expressions/member';\nimport type { PySetExpression as _PySetExpression } from './nodes/expressions/set';\nimport type { PySubscriptExpression as _PySubscriptExpression } from './nodes/expressions/subscript';\nimport type { PySubscriptSlice as _PySubscriptSlice } from './nodes/expressions/subscript-slice';\nimport type { PyTupleExpression as _PyTupleExpression } from './nodes/expressions/tuple';\nimport type { PyYieldExpression as _PyYieldExpression } from './nodes/expressions/yield';\nimport type { PyYieldFromExpression as _PyYieldFromExpression } from './nodes/expressions/yieldFrom';\nimport { factory } from './nodes/factory';\nimport { PyNodeKind } from './nodes/kinds';\nimport type { PyStatement as _PyStatement } from './nodes/statement';\nimport type { PyAssignment as _PyAssignment } from './nodes/statements/assignment';\nimport type {\n  PyAugmentedAssignment as _PyAugmentedAssignment,\n  PyAugmentedOperator as _PyAugmentedOperator,\n} from './nodes/statements/augmentedAssignment';\nimport type { PyBlock as _PyBlock } from './nodes/statements/block';\nimport type { PyBreakStatement as _PyBreakStatement } from './nodes/statements/break';\nimport type { PyContinueStatement as _PyContinueStatement } from './nodes/statements/continue';\nimport type { PyEmptyStatement as _PyEmptyStatement } from './nodes/statements/empty';\nimport type { PyExceptClause as _PyExceptClause } from './nodes/statements/except';\nimport type { PyExpressionStatement as _PyExpressionStatement } from './nodes/statements/expression';\nimport type { PyForStatement as _PyForStatement } from './nodes/statements/for';\nimport type { PyIfStatement as _PyIfStatement } from './nodes/statements/if';\nimport type { PyImportStatement as _PyImportStatement } from './nodes/statements/import';\nimport type { PyRaiseStatement as _PyRaiseStatement } from './nodes/statements/raise';\nimport type { PyReturnStatement as _PyReturnStatement } from './nodes/statements/return';\nimport type { PyTryStatement as _PyTryStatement } from './nodes/statements/try';\nimport type { PyWhileStatement as _PyWhileStatement } from './nodes/statements/while';\nimport type { PyWithStatement as _PyWithStatement } from './nodes/statements/with';\nimport type { PyWithItem as _PyWithItem } from './nodes/statements/withItem';\nimport type { PyComment as _PyComment } from './nodes/structure/comment';\nimport type { PySourceFile as _PySourceFile } from './nodes/structure/sourceFile';\nimport type { PyPrinterOptions as _PyPrinterOptions } from './printer';\nimport { createPrinter, printAst } from './printer';\n\n// eslint-disable-next-line @typescript-eslint/no-namespace\nexport namespace py {\n  // Base / Core\n  export type Node = _PyNode;\n  export type NodeBase = _PyNodeBase;\n  export type NodeKind = PyNodeKind;\n  export type Expression = _PyExpression;\n  export type Statement = _PyStatement;\n\n  // Structure\n  export type SourceFile = _PySourceFile;\n  export type Comment = _PyComment;\n\n  // Declarations\n  export type ClassDeclaration = _PyClassDeclaration;\n  export type FunctionDeclaration = _PyFunctionDeclaration;\n  export type FunctionParameter = _PyFunctionParameter;\n\n  // Statements\n  export type Assignment = _PyAssignment;\n  export type AugmentedAssignment = _PyAugmentedAssignment;\n  export type AugmentedOperator = _PyAugmentedOperator;\n  export type Block = _PyBlock;\n  export type BreakStatement = _PyBreakStatement;\n  export type ContinueStatement = _PyContinueStatement;\n  export type EmptyStatement = _PyEmptyStatement;\n  export type ExceptClause = _PyExceptClause;\n  export type ExpressionStatement = _PyExpressionStatement;\n  export type ForStatement = _PyForStatement;\n  export type IfStatement = _PyIfStatement;\n  export type ImportStatement = _PyImportStatement;\n  export type RaiseStatement = _PyRaiseStatement;\n  export type ReturnStatement = _PyReturnStatement;\n  export type TryStatement = _PyTryStatement;\n  export type WhileStatement = _PyWhileStatement;\n  export type WithItem = _PyWithItem;\n  export type WithStatement = _PyWithStatement;\n\n  // Expressions\n  export type AsyncExpression = _PyAsyncExpression;\n  export type AwaitExpression = _PyAwaitExpression;\n  export type BinaryExpression = _PyBinaryExpression;\n  export type BinaryOperator = _PyBinaryOperator;\n  export type CallExpression = _PyCallExpression;\n  export type DictExpression = _PyDictExpression;\n  export type FStringExpression = _PyFStringExpression;\n  export type GeneratorExpression = _PyGeneratorExpression;\n  export type Identifier = _PyIdentifier;\n  export type KeywordArgument = _PyKeywordArgument;\n  export type LambdaExpression = _PyLambdaExpression;\n  export type ListExpression = _PyListExpression;\n  export type Literal = _PyLiteral;\n  export type MemberExpression = _PyMemberExpression;\n  export type SetExpression = _PySetExpression;\n  export type SubscriptExpression = _PySubscriptExpression;\n  export type SubscriptSlice = _PySubscriptSlice;\n  export type TupleExpression = _PyTupleExpression;\n  export type YieldExpression = _PyYieldExpression;\n  export type YieldFromExpression = _PyYieldFromExpression;\n\n  // Comprehensions\n  export type Comprehension = _PyComprehension;\n  export type ComprehensionNode = _PyComprehensionNode;\n  export type DictComprehension = _PyDictComprehension;\n  export type ListComprehension = _PyListComprehension;\n  export type SetComprehension = _PySetComprehension;\n\n  // Printer\n  export type PrinterOptions = _PyPrinterOptions;\n\n  // Miscellaneous\n  export type LiteralValue = _PyLiteralValue;\n}\n\nexport const py = {\n  PyNodeKind,\n  createPrinter,\n  factory,\n  printAst,\n} as const;\n"
  },
  {
    "path": "packages/openapi-python/src/py-compiler/nodes/base.ts",
    "content": "import type { PyExpression } from './expression';\nimport type { PyNodeKind } from './kinds';\nimport type { PyStatement } from './statement';\nimport type { PyBlock } from './statements/block';\nimport type { PySourceFile } from './structure/sourceFile';\n\nexport interface PyNodeBase {\n  kind: PyNodeKind;\n  leadingComments?: ReadonlyArray<string>;\n  trailingComments?: ReadonlyArray<string>;\n}\n\nexport type PyNode = PyBlock | PyExpression | PySourceFile | PyStatement;\n"
  },
  {
    "path": "packages/openapi-python/src/py-compiler/nodes/comprehension.ts",
    "content": "import type { PyNodeBase } from './base';\nimport type { PyExpression } from './expression';\nimport type { PyDictComprehension } from './expressions/comprehensions/dict';\nimport type { PyListComprehension } from './expressions/comprehensions/list';\nimport type { PySetComprehension } from './expressions/comprehensions/set';\n\nexport type PyComprehension = PyDictComprehension | PyListComprehension | PySetComprehension;\n\nexport interface PyComprehensionNode extends PyNodeBase {\n  ifs?: ReadonlyArray<PyExpression>;\n  isAsync?: boolean;\n  iterable: PyExpression;\n  target: PyExpression;\n}\n"
  },
  {
    "path": "packages/openapi-python/src/py-compiler/nodes/declarations/class.ts",
    "content": "import type { PyNode, PyNodeBase } from '../base';\nimport type { PyExpression } from '../expression';\nimport { PyNodeKind } from '../kinds';\nimport type { PyStatement } from '../statement';\nimport type { PyBlock } from '../statements/block';\nimport { createBlock } from '../statements/block';\n\nexport interface PyClassDeclaration extends PyNodeBase {\n  baseClasses?: ReadonlyArray<PyNode>;\n  body: PyBlock;\n  decorators?: ReadonlyArray<PyExpression>;\n  docstring?: string;\n  kind: PyNodeKind.ClassDeclaration;\n  name: string;\n}\n\nexport function createClassDeclaration(\n  name: string,\n  body: ReadonlyArray<PyStatement>,\n  decorators?: ReadonlyArray<PyExpression>,\n  baseClasses?: ReadonlyArray<PyNode>,\n  docstring?: string,\n  leadingComments?: ReadonlyArray<string>,\n  trailingComments?: ReadonlyArray<string>,\n): PyClassDeclaration {\n  return {\n    baseClasses,\n    body: createBlock(body),\n    decorators,\n    docstring,\n    kind: PyNodeKind.ClassDeclaration,\n    leadingComments,\n    name,\n    trailingComments,\n  };\n}\n"
  },
  {
    "path": "packages/openapi-python/src/py-compiler/nodes/declarations/function.ts",
    "content": "import type { PyNodeBase } from '../base';\nimport type { PyExpression } from '../expression';\nimport { PyNodeKind } from '../kinds';\nimport type { PyStatement } from '../statement';\nimport type { PyBlock } from '../statements/block';\nimport { createBlock } from '../statements/block';\nimport type { PyFunctionParameter } from './functionParameter';\n\nexport interface PyFunctionDeclaration extends PyNodeBase {\n  body: PyBlock;\n  decorators?: ReadonlyArray<PyExpression>;\n  docstring?: string;\n  kind: PyNodeKind.FunctionDeclaration;\n  modifiers?: ReadonlyArray<PyExpression>;\n  name: string;\n  parameters: ReadonlyArray<PyFunctionParameter>;\n  returnType?: PyExpression;\n}\n\nexport function createFunctionDeclaration(\n  name: string,\n  parameters: ReadonlyArray<PyFunctionParameter>,\n  returnType: PyExpression | undefined,\n  body: ReadonlyArray<PyStatement>,\n  decorators?: ReadonlyArray<PyExpression>,\n  docstring?: string,\n  modifiers?: ReadonlyArray<PyExpression>,\n  leadingComments?: ReadonlyArray<string>,\n  trailingComments?: ReadonlyArray<string>,\n): PyFunctionDeclaration {\n  return {\n    body: createBlock(body),\n    decorators,\n    docstring,\n    kind: PyNodeKind.FunctionDeclaration,\n    leadingComments,\n    modifiers,\n    name,\n    parameters,\n    returnType,\n    trailingComments,\n  };\n}\n"
  },
  {
    "path": "packages/openapi-python/src/py-compiler/nodes/declarations/functionParameter.ts",
    "content": "import type { PyNodeBase } from '../base';\nimport type { PyExpression } from '../expression';\nimport { PyNodeKind } from '../kinds';\n\nexport interface PyFunctionParameter extends PyNodeBase {\n  defaultValue?: PyExpression;\n  kind: PyNodeKind.FunctionParameter;\n  name: string;\n  type?: PyExpression;\n}\n\nexport function createFunctionParameter(\n  name: string,\n  type?: PyExpression,\n  defaultValue?: PyExpression,\n  leadingComments?: ReadonlyArray<string>,\n  trailingComments?: ReadonlyArray<string>,\n): PyFunctionParameter {\n  return {\n    defaultValue,\n    kind: PyNodeKind.FunctionParameter,\n    leadingComments,\n    name,\n    trailingComments,\n    type,\n  };\n}\n"
  },
  {
    "path": "packages/openapi-python/src/py-compiler/nodes/expression.ts",
    "content": "import type { PyComprehension } from './comprehension';\nimport type { PyAsyncExpression } from './expressions/async';\nimport type { PyAwaitExpression } from './expressions/await';\nimport type { PyBinaryExpression } from './expressions/binary';\nimport type { PyCallExpression } from './expressions/call';\nimport type { PyDictExpression } from './expressions/dict';\nimport type { PyFStringExpression } from './expressions/fString';\nimport type { PyGeneratorExpression } from './expressions/generator';\nimport type { PyIdentifier } from './expressions/identifier';\nimport type { PyKeywordArgument } from './expressions/keywordArg';\nimport type { PyLambdaExpression } from './expressions/lambda';\nimport type { PyListExpression } from './expressions/list';\nimport type { PyLiteral } from './expressions/literal';\nimport type { PyMemberExpression } from './expressions/member';\nimport type { PySetExpression } from './expressions/set';\nimport type { PySubscriptExpression } from './expressions/subscript';\nimport type { PySubscriptSlice } from './expressions/subscript-slice';\nimport type { PyTupleExpression } from './expressions/tuple';\nimport type { PyYieldExpression } from './expressions/yield';\nimport type { PyYieldFromExpression } from './expressions/yieldFrom';\n\nexport type PyExpression =\n  | PyAsyncExpression\n  | PyAwaitExpression\n  | PyBinaryExpression\n  | PyCallExpression\n  | PyComprehension\n  | PyDictExpression\n  | PyFStringExpression\n  | PyGeneratorExpression\n  | PyIdentifier\n  | PyKeywordArgument\n  | PyLambdaExpression\n  | PyListExpression\n  | PyLiteral\n  | PyMemberExpression\n  | PySetExpression\n  | PySubscriptExpression\n  | PySubscriptSlice\n  | PyTupleExpression\n  | PyYieldExpression\n  | PyYieldFromExpression;\n"
  },
  {
    "path": "packages/openapi-python/src/py-compiler/nodes/expressions/async.ts",
    "content": "import type { PyNodeBase } from '../base';\nimport type { PyExpression } from '../expression';\nimport { PyNodeKind } from '../kinds';\n\nexport interface PyAsyncExpression extends PyNodeBase {\n  expression: PyExpression;\n  kind: PyNodeKind.AsyncExpression;\n}\n\nexport function createAsyncExpression(expression: PyExpression): PyAsyncExpression {\n  return {\n    expression,\n    kind: PyNodeKind.AsyncExpression,\n  };\n}\n"
  },
  {
    "path": "packages/openapi-python/src/py-compiler/nodes/expressions/await.ts",
    "content": "import type { PyNodeBase } from '../base';\nimport type { PyExpression } from '../expression';\nimport { PyNodeKind } from '../kinds';\n\nexport interface PyAwaitExpression extends PyNodeBase {\n  expression: PyExpression;\n  kind: PyNodeKind.AwaitExpression;\n}\n\nexport function createAwaitExpression(expression: PyExpression): PyAwaitExpression {\n  return {\n    expression,\n    kind: PyNodeKind.AwaitExpression,\n  };\n}\n"
  },
  {
    "path": "packages/openapi-python/src/py-compiler/nodes/expressions/binary.ts",
    "content": "import type { PyNodeBase } from '../base';\nimport type { PyExpression } from '../expression';\nimport { PyNodeKind } from '../kinds';\n\nexport type PyBinaryOperator =\n  | '+'\n  | '-'\n  | '*'\n  | '/'\n  | '//'\n  | '%'\n  | '**'\n  | '=='\n  | '!='\n  | '>'\n  | '>='\n  | '<'\n  | '<='\n  | 'is'\n  | 'is not'\n  | 'in'\n  | 'not in'\n  | 'and'\n  | 'or';\n\nexport interface PyBinaryExpression extends PyNodeBase {\n  kind: PyNodeKind.BinaryExpression;\n  left: PyExpression;\n  operator: PyBinaryOperator;\n  right: PyExpression;\n}\n\nexport function createBinaryExpression(\n  left: PyExpression,\n  operator: PyBinaryOperator,\n  right: PyExpression,\n  leadingComments?: ReadonlyArray<string>,\n  trailingComments?: ReadonlyArray<string>,\n): PyBinaryExpression {\n  return {\n    kind: PyNodeKind.BinaryExpression,\n    leadingComments,\n    left,\n    operator,\n    right,\n    trailingComments,\n  };\n}\n"
  },
  {
    "path": "packages/openapi-python/src/py-compiler/nodes/expressions/call.ts",
    "content": "import type { PyNodeBase } from '../base';\nimport type { PyExpression } from '../expression';\nimport { PyNodeKind } from '../kinds';\n\nexport interface PyCallExpression extends PyNodeBase {\n  args: ReadonlyArray<PyExpression>;\n  callee: PyExpression;\n  kind: PyNodeKind.CallExpression;\n}\n\nexport function createCallExpression(\n  callee: PyExpression,\n  args: ReadonlyArray<PyExpression>,\n  leadingComments?: ReadonlyArray<string>,\n  trailingComments?: ReadonlyArray<string>,\n): PyCallExpression {\n  return {\n    args,\n    callee,\n    kind: PyNodeKind.CallExpression,\n    leadingComments,\n    trailingComments,\n  };\n}\n"
  },
  {
    "path": "packages/openapi-python/src/py-compiler/nodes/expressions/comprehensions/dict.ts",
    "content": "import type { PyComprehensionNode } from '../../comprehension';\nimport type { PyExpression } from '../../expression';\nimport { PyNodeKind } from '../../kinds';\n\nexport interface PyDictComprehension extends PyComprehensionNode {\n  key: PyExpression;\n  kind: PyNodeKind.DictComprehension;\n  value: PyExpression;\n}\n\nexport function createDictComprehension(\n  key: PyExpression,\n  value: PyExpression,\n  target: PyExpression,\n  iterable: PyExpression,\n  ifs?: ReadonlyArray<PyExpression>,\n  isAsync?: boolean,\n): PyDictComprehension {\n  return {\n    ifs,\n    isAsync,\n    iterable,\n    key,\n    kind: PyNodeKind.DictComprehension,\n    target,\n    value,\n  };\n}\n"
  },
  {
    "path": "packages/openapi-python/src/py-compiler/nodes/expressions/comprehensions/list.ts",
    "content": "import type { PyComprehensionNode } from '../../comprehension';\nimport type { PyExpression } from '../../expression';\nimport { PyNodeKind } from '../../kinds';\n\nexport interface PyListComprehension extends PyComprehensionNode {\n  element: PyExpression;\n  kind: PyNodeKind.ListComprehension;\n}\n\nexport function createListComprehension(\n  element: PyExpression,\n  target: PyExpression,\n  iterable: PyExpression,\n  ifs?: ReadonlyArray<PyExpression>,\n  isAsync?: boolean,\n): PyListComprehension {\n  return {\n    element,\n    ifs,\n    isAsync,\n    iterable,\n    kind: PyNodeKind.ListComprehension,\n    target,\n  };\n}\n"
  },
  {
    "path": "packages/openapi-python/src/py-compiler/nodes/expressions/comprehensions/set.ts",
    "content": "import type { PyComprehensionNode } from '../../comprehension';\nimport type { PyExpression } from '../../expression';\nimport { PyNodeKind } from '../../kinds';\n\nexport interface PySetComprehension extends PyComprehensionNode {\n  element: PyExpression;\n  kind: PyNodeKind.SetComprehension;\n}\n\nexport function createSetComprehension(\n  element: PyExpression,\n  target: PyExpression,\n  iterable: PyExpression,\n  ifs?: ReadonlyArray<PyExpression>,\n  isAsync?: boolean,\n): PySetComprehension {\n  return {\n    element,\n    ifs,\n    isAsync,\n    iterable,\n    kind: PyNodeKind.SetComprehension,\n    target,\n  };\n}\n"
  },
  {
    "path": "packages/openapi-python/src/py-compiler/nodes/expressions/dict.ts",
    "content": "import type { PyNodeBase } from '../base';\nimport type { PyExpression } from '../expression';\nimport { PyNodeKind } from '../kinds';\n\nexport interface PyDictExpression extends PyNodeBase {\n  entries: ReadonlyArray<{\n    key: PyExpression;\n    value: PyExpression;\n  }>;\n  kind: PyNodeKind.DictExpression;\n}\n\nexport function createDictExpression(\n  entries: ReadonlyArray<{ key: PyExpression; value: PyExpression }>,\n): PyDictExpression {\n  return {\n    entries,\n    kind: PyNodeKind.DictExpression,\n  };\n}\n"
  },
  {
    "path": "packages/openapi-python/src/py-compiler/nodes/expressions/fString.ts",
    "content": "import type { PyNodeBase } from '../base';\nimport type { PyExpression } from '../expression';\nimport { PyNodeKind } from '../kinds';\n\nexport interface PyFStringExpression extends PyNodeBase {\n  kind: PyNodeKind.FStringExpression;\n  parts: Array<string | PyExpression>;\n}\n\nexport function createFStringExpression(\n  parts: Array<string | PyExpression>,\n  leadingComments?: ReadonlyArray<string>,\n  trailingComments?: ReadonlyArray<string>,\n): PyFStringExpression {\n  return {\n    kind: PyNodeKind.FStringExpression,\n    leadingComments,\n    parts,\n    trailingComments,\n  };\n}\n"
  },
  {
    "path": "packages/openapi-python/src/py-compiler/nodes/expressions/generator.ts",
    "content": "import type { PyNodeBase } from '../base';\nimport type { PyExpression } from '../expression';\nimport { PyNodeKind } from '../kinds';\n\nexport interface PyGeneratorExpression extends PyNodeBase {\n  element: PyExpression;\n  ifs?: ReadonlyArray<PyExpression>;\n  isAsync?: boolean;\n  iterable: PyExpression;\n  kind: PyNodeKind.GeneratorExpression;\n  target: PyExpression;\n}\n\nexport function createGeneratorExpression(\n  element: PyExpression,\n  target: PyExpression,\n  iterable: PyExpression,\n  ifs?: ReadonlyArray<PyExpression>,\n  isAsync?: boolean,\n  leadingComments?: ReadonlyArray<string>,\n  trailingComments?: ReadonlyArray<string>,\n): PyGeneratorExpression {\n  return {\n    element,\n    ifs,\n    isAsync,\n    iterable,\n    kind: PyNodeKind.GeneratorExpression,\n    leadingComments,\n    target,\n    trailingComments,\n  };\n}\n"
  },
  {
    "path": "packages/openapi-python/src/py-compiler/nodes/expressions/identifier.ts",
    "content": "import type { PyNodeBase } from '../base';\nimport { PyNodeKind } from '../kinds';\n\nexport interface PyIdentifier extends PyNodeBase {\n  kind: PyNodeKind.Identifier;\n  name: string;\n}\n\nexport function createIdentifier(\n  name: string,\n  leadingComments?: ReadonlyArray<string>,\n  trailingComments?: ReadonlyArray<string>,\n): PyIdentifier {\n  return {\n    kind: PyNodeKind.Identifier,\n    leadingComments,\n    name,\n    trailingComments,\n  };\n}\n"
  },
  {
    "path": "packages/openapi-python/src/py-compiler/nodes/expressions/keywordArg.ts",
    "content": "import type { PyNodeBase } from '../base';\nimport type { PyExpression } from '../expression';\nimport { PyNodeKind } from '../kinds';\n\nexport interface PyKeywordArgument extends PyNodeBase {\n  kind: PyNodeKind.KeywordArgument;\n  name: string;\n  value: PyExpression;\n}\n\nexport function createKeywordArgument(\n  name: string,\n  value: PyExpression,\n  leadingComments?: ReadonlyArray<string>,\n  trailingComments?: ReadonlyArray<string>,\n): PyKeywordArgument {\n  return {\n    kind: PyNodeKind.KeywordArgument,\n    leadingComments,\n    name,\n    trailingComments,\n    value,\n  };\n}\n"
  },
  {
    "path": "packages/openapi-python/src/py-compiler/nodes/expressions/lambda.ts",
    "content": "import type { PyNodeBase } from '../base';\nimport type { PyFunctionParameter } from '../declarations/functionParameter';\nimport type { PyExpression } from '../expression';\nimport { PyNodeKind } from '../kinds';\n\nexport interface PyLambdaExpression extends PyNodeBase {\n  expression: PyExpression;\n  kind: PyNodeKind.LambdaExpression;\n  parameters: ReadonlyArray<PyFunctionParameter>;\n}\n\nexport function createLambdaExpression(\n  parameters: ReadonlyArray<PyFunctionParameter>,\n  expression: PyExpression,\n): PyLambdaExpression {\n  return {\n    expression,\n    kind: PyNodeKind.LambdaExpression,\n    parameters,\n  };\n}\n"
  },
  {
    "path": "packages/openapi-python/src/py-compiler/nodes/expressions/list.ts",
    "content": "import type { PyNode, PyNodeBase } from '../base';\nimport { PyNodeKind } from '../kinds';\n\nexport interface PyListExpression extends PyNodeBase {\n  elements: ReadonlyArray<PyNode>;\n  kind: PyNodeKind.ListExpression;\n}\n\nexport function createListExpression(elements: ReadonlyArray<PyNode>): PyListExpression {\n  return {\n    elements,\n    kind: PyNodeKind.ListExpression,\n  };\n}\n"
  },
  {
    "path": "packages/openapi-python/src/py-compiler/nodes/expressions/literal.ts",
    "content": "import type { PyNodeBase } from '../base';\nimport { PyNodeKind } from '../kinds';\n\nexport type PyLiteralValue = string | number | boolean | null;\n\nexport interface PyLiteral extends PyNodeBase {\n  kind: PyNodeKind.Literal;\n  value: PyLiteralValue;\n}\n\nexport function createLiteral(\n  value: PyLiteralValue,\n  leadingComments?: ReadonlyArray<string>,\n  trailingComments?: ReadonlyArray<string>,\n): PyLiteral {\n  return {\n    kind: PyNodeKind.Literal,\n    leadingComments,\n    trailingComments,\n    value,\n  };\n}\n"
  },
  {
    "path": "packages/openapi-python/src/py-compiler/nodes/expressions/member.ts",
    "content": "import type { PyNodeBase } from '../base';\nimport type { PyExpression } from '../expression';\nimport { PyNodeKind } from '../kinds';\nimport type { PyIdentifier } from './identifier';\n\nexport interface PyMemberExpression extends PyNodeBase {\n  kind: PyNodeKind.MemberExpression;\n  member: PyIdentifier;\n  object: PyExpression;\n}\n\nexport function createMemberExpression(\n  object: PyExpression,\n  member: PyIdentifier,\n  leadingComments?: ReadonlyArray<string>,\n  trailingComments?: ReadonlyArray<string>,\n): PyMemberExpression {\n  return {\n    kind: PyNodeKind.MemberExpression,\n    leadingComments,\n    member,\n    object,\n    trailingComments,\n  };\n}\n"
  },
  {
    "path": "packages/openapi-python/src/py-compiler/nodes/expressions/set.ts",
    "content": "import type { PyNodeBase } from '../base';\nimport type { PyExpression } from '../expression';\nimport { PyNodeKind } from '../kinds';\n\nexport interface PySetExpression extends PyNodeBase {\n  elements: ReadonlyArray<PyExpression>;\n  kind: PyNodeKind.SetExpression;\n}\n\nexport function createSetExpression(elements: ReadonlyArray<PyExpression>): PySetExpression {\n  return {\n    elements,\n    kind: PyNodeKind.SetExpression,\n  };\n}\n"
  },
  {
    "path": "packages/openapi-python/src/py-compiler/nodes/expressions/subscript-slice.ts",
    "content": "import type { PyNodeBase } from '../base';\nimport type { PyExpression } from '../expression';\nimport { PyNodeKind } from '../kinds';\n\nexport interface PySubscriptSlice extends PyNodeBase {\n  elements: ReadonlyArray<PyExpression>;\n  kind: PyNodeKind.SubscriptSlice;\n}\n\nexport function createSubscriptSlice(elements: ReadonlyArray<PyExpression>): PySubscriptSlice {\n  return {\n    elements,\n    kind: PyNodeKind.SubscriptSlice,\n  };\n}\n"
  },
  {
    "path": "packages/openapi-python/src/py-compiler/nodes/expressions/subscript.ts",
    "content": "import type { PyNodeBase } from '../base';\nimport type { PyExpression } from '../expression';\nimport { PyNodeKind } from '../kinds';\n\nexport interface PySubscriptExpression extends PyNodeBase {\n  kind: PyNodeKind.SubscriptExpression;\n  slice: PyExpression;\n  value: PyExpression;\n}\n\nexport function createSubscriptExpression(\n  value: PyExpression,\n  slice: PyExpression,\n): PySubscriptExpression {\n  return {\n    kind: PyNodeKind.SubscriptExpression,\n    slice,\n    value,\n  };\n}\n"
  },
  {
    "path": "packages/openapi-python/src/py-compiler/nodes/expressions/tuple.ts",
    "content": "import type { PyNodeBase } from '../base';\nimport type { PyExpression } from '../expression';\nimport { PyNodeKind } from '../kinds';\n\nexport interface PyTupleExpression extends PyNodeBase {\n  elements: ReadonlyArray<PyExpression>;\n  kind: PyNodeKind.TupleExpression;\n}\n\nexport function createTupleExpression(elements: ReadonlyArray<PyExpression>): PyTupleExpression {\n  return {\n    elements,\n    kind: PyNodeKind.TupleExpression,\n  };\n}\n"
  },
  {
    "path": "packages/openapi-python/src/py-compiler/nodes/expressions/yield.ts",
    "content": "import type { PyNodeBase } from '../base';\nimport type { PyExpression } from '../expression';\nimport { PyNodeKind } from '../kinds';\n\nexport interface PyYieldExpression extends PyNodeBase {\n  kind: PyNodeKind.YieldExpression;\n  value?: PyExpression;\n}\n\nexport function createYieldExpression(value?: PyExpression): PyYieldExpression {\n  return {\n    kind: PyNodeKind.YieldExpression,\n    value,\n  };\n}\n"
  },
  {
    "path": "packages/openapi-python/src/py-compiler/nodes/expressions/yieldFrom.ts",
    "content": "import type { PyNodeBase } from '../base';\nimport type { PyExpression } from '../expression';\nimport { PyNodeKind } from '../kinds';\n\nexport interface PyYieldFromExpression extends PyNodeBase {\n  expression: PyExpression;\n  kind: PyNodeKind.YieldFromExpression;\n}\n\nexport function createYieldFromExpression(expression: PyExpression): PyYieldFromExpression {\n  return {\n    expression,\n    kind: PyNodeKind.YieldFromExpression,\n  };\n}\n"
  },
  {
    "path": "packages/openapi-python/src/py-compiler/nodes/factory.ts",
    "content": "import { createClassDeclaration } from './declarations/class';\nimport { createFunctionDeclaration } from './declarations/function';\nimport { createFunctionParameter } from './declarations/functionParameter';\nimport { createAsyncExpression } from './expressions/async';\nimport { createAwaitExpression } from './expressions/await';\nimport { createBinaryExpression } from './expressions/binary';\nimport { createCallExpression } from './expressions/call';\nimport { createDictComprehension } from './expressions/comprehensions/dict';\nimport { createListComprehension } from './expressions/comprehensions/list';\nimport { createSetComprehension } from './expressions/comprehensions/set';\nimport { createDictExpression } from './expressions/dict';\nimport { createFStringExpression } from './expressions/fString';\nimport { createGeneratorExpression } from './expressions/generator';\nimport { createIdentifier } from './expressions/identifier';\nimport { createKeywordArgument } from './expressions/keywordArg';\nimport { createLambdaExpression } from './expressions/lambda';\nimport { createListExpression } from './expressions/list';\nimport { createLiteral } from './expressions/literal';\nimport { createMemberExpression } from './expressions/member';\nimport { createSetExpression } from './expressions/set';\nimport { createSubscriptExpression } from './expressions/subscript';\nimport { createSubscriptSlice } from './expressions/subscript-slice';\nimport { createTupleExpression } from './expressions/tuple';\nimport { createYieldExpression } from './expressions/yield';\nimport { createYieldFromExpression } from './expressions/yieldFrom';\nimport { createAssignment } from './statements/assignment';\nimport { createAugmentedAssignment } from './statements/augmentedAssignment';\nimport { createBlock } from './statements/block';\nimport { createBreakStatement } from './statements/break';\nimport { createContinueStatement } from './statements/continue';\nimport { createEmptyStatement } from './statements/empty';\nimport { createExceptClause } from './statements/except';\nimport { createExpressionStatement } from './statements/expression';\nimport { createForStatement } from './statements/for';\nimport { createIfStatement } from './statements/if';\nimport { createImportStatement } from './statements/import';\nimport { createRaiseStatement } from './statements/raise';\nimport { createReturnStatement } from './statements/return';\nimport { createTryStatement } from './statements/try';\nimport { createWhileStatement } from './statements/while';\nimport { createWithStatement } from './statements/with';\nimport { createWithItem } from './statements/withItem';\nimport { createComment } from './structure/comment';\nimport { createSourceFile } from './structure/sourceFile';\n\nexport const factory = {\n  createAssignment,\n  createAsyncExpression,\n  createAugmentedAssignment,\n  createAwaitExpression,\n  createBinaryExpression,\n  createBlock,\n  createBreakStatement,\n  createCallExpression,\n  createClassDeclaration,\n  createComment,\n  createContinueStatement,\n  createDictComprehension,\n  createDictExpression,\n  createEmptyStatement,\n  createExceptClause,\n  createExpressionStatement,\n  createFStringExpression,\n  createForStatement,\n  createFunctionDeclaration,\n  createFunctionParameter,\n  createGeneratorExpression,\n  createIdentifier,\n  createIfStatement,\n  createImportStatement,\n  createKeywordArgument,\n  createLambdaExpression,\n  createListComprehension,\n  createListExpression,\n  createLiteral,\n  createMemberExpression,\n  createRaiseStatement,\n  createReturnStatement,\n  createSetComprehension,\n  createSetExpression,\n  createSourceFile,\n  createSubscriptExpression,\n  createSubscriptSlice,\n  createTryStatement,\n  createTupleExpression,\n  createWhileStatement,\n  createWithItem,\n  createWithStatement,\n  createYieldExpression,\n  createYieldFromExpression,\n};\n"
  },
  {
    "path": "packages/openapi-python/src/py-compiler/nodes/kinds.ts",
    "content": "export enum PyNodeKind {\n  Assignment = 'Assignment',\n  AsyncExpression = 'AsyncExpression',\n  AugmentedAssignment = 'AugmentedAssignment',\n  AwaitExpression = 'AwaitExpression',\n  BinaryExpression = 'BinaryExpression',\n  Block = 'Block',\n  BreakStatement = 'BreakStatement',\n  CallExpression = 'CallExpression',\n  ClassDeclaration = 'ClassDeclaration',\n  Comment = 'Comment',\n  ContinueStatement = 'ContinueStatement',\n  DictComprehension = 'DictComprehension',\n  DictExpression = 'DictExpression',\n  EmptyStatement = 'EmptyStatement',\n  ExceptClause = 'ExceptClause',\n  ExpressionStatement = 'ExpressionStatement',\n  FStringExpression = 'FStringExpression',\n  ForStatement = 'ForStatement',\n  FunctionDeclaration = 'FunctionDeclaration',\n  FunctionParameter = 'FunctionParameter',\n  GeneratorExpression = 'GeneratorExpression',\n  Identifier = 'Identifier',\n  IfStatement = 'IfStatement',\n  ImportStatement = 'ImportStatement',\n  KeywordArgument = 'KeywordArgument',\n  LambdaExpression = 'LambdaExpression',\n  ListComprehension = 'ListComprehension',\n  ListExpression = 'ListExpression',\n  Literal = 'Literal',\n  MemberExpression = 'MemberExpression',\n  RaiseStatement = 'RaiseStatement',\n  ReturnStatement = 'ReturnStatement',\n  SetComprehension = 'SetComprehension',\n  SetExpression = 'SetExpression',\n  SourceFile = 'SourceFile',\n  SubscriptExpression = 'SubscriptExpression',\n  SubscriptSlice = 'SubscriptSlice',\n  TryStatement = 'TryStatement',\n  TupleExpression = 'TupleExpression',\n  WhileStatement = 'WhileStatement',\n  WithItem = 'WithItem',\n  WithStatement = 'WithStatement',\n  YieldExpression = 'YieldExpression',\n  YieldFromExpression = 'YieldFromExpression',\n}\n"
  },
  {
    "path": "packages/openapi-python/src/py-compiler/nodes/statement.ts",
    "content": "import type { PyClassDeclaration } from './declarations/class';\nimport type { PyFunctionDeclaration } from './declarations/function';\nimport type { PyFunctionParameter } from './declarations/functionParameter';\nimport type { PyAssignment } from './statements/assignment';\nimport type { PyAugmentedAssignment } from './statements/augmentedAssignment';\nimport type { PyBreakStatement } from './statements/break';\nimport type { PyContinueStatement } from './statements/continue';\nimport type { PyEmptyStatement } from './statements/empty';\nimport type { PyExpressionStatement } from './statements/expression';\nimport type { PyForStatement } from './statements/for';\nimport type { PyIfStatement } from './statements/if';\nimport type { PyImportStatement } from './statements/import';\nimport type { PyRaiseStatement } from './statements/raise';\nimport type { PyReturnStatement } from './statements/return';\nimport type { PyTryStatement } from './statements/try';\nimport type { PyWhileStatement } from './statements/while';\nimport type { PyWithStatement } from './statements/with';\nimport type { PyComment } from './structure/comment';\n\nexport type PyStatement =\n  | PyAssignment\n  | PyAugmentedAssignment\n  | PyBreakStatement\n  | PyClassDeclaration\n  | PyComment\n  | PyContinueStatement\n  | PyEmptyStatement\n  | PyExpressionStatement\n  | PyForStatement\n  | PyFunctionDeclaration\n  | PyFunctionParameter\n  | PyIfStatement\n  | PyImportStatement\n  | PyRaiseStatement\n  | PyReturnStatement\n  | PyTryStatement\n  | PyWhileStatement\n  | PyWithStatement;\n"
  },
  {
    "path": "packages/openapi-python/src/py-compiler/nodes/statements/assignment.ts",
    "content": "import type { PyNodeBase } from '../base';\nimport type { PyExpression } from '../expression';\nimport { PyNodeKind } from '../kinds';\n\nexport interface PyAssignment extends PyNodeBase {\n  kind: PyNodeKind.Assignment;\n  target: PyExpression;\n  type?: PyExpression;\n  value?: PyExpression;\n}\n\nexport function createAssignment(\n  target: PyExpression,\n  type?: PyExpression,\n  value?: PyExpression,\n  leadingComments?: ReadonlyArray<string>,\n  trailingComments?: ReadonlyArray<string>,\n): PyAssignment {\n  if (!type && !value) {\n    throw new Error('Assignment requires at least type or value');\n  }\n\n  return {\n    kind: PyNodeKind.Assignment,\n    leadingComments,\n    target,\n    trailingComments,\n    type,\n    value,\n  };\n}\n"
  },
  {
    "path": "packages/openapi-python/src/py-compiler/nodes/statements/augmentedAssignment.ts",
    "content": "import type { PyNodeBase } from '../base';\nimport type { PyExpression } from '../expression';\nimport { PyNodeKind } from '../kinds';\n\nexport type PyAugmentedOperator =\n  | '+='\n  | '-='\n  | '*='\n  | '/='\n  | '//='\n  | '%='\n  | '**='\n  | '&='\n  | '|='\n  | '^='\n  | '>>='\n  | '<<=';\n\nexport interface PyAugmentedAssignment extends PyNodeBase {\n  kind: PyNodeKind.AugmentedAssignment;\n  operator: PyAugmentedOperator;\n  target: PyExpression;\n  value: PyExpression;\n}\n\nexport function createAugmentedAssignment(\n  target: PyExpression,\n  operator: PyAugmentedOperator,\n  value: PyExpression,\n): PyAugmentedAssignment {\n  return {\n    kind: PyNodeKind.AugmentedAssignment,\n    operator,\n    target,\n    value,\n  };\n}\n"
  },
  {
    "path": "packages/openapi-python/src/py-compiler/nodes/statements/block.ts",
    "content": "import type { PyNodeBase } from '../base';\nimport { PyNodeKind } from '../kinds';\nimport type { PyStatement } from '../statement';\n\nexport interface PyBlock extends PyNodeBase {\n  kind: PyNodeKind.Block;\n  statements: ReadonlyArray<PyStatement>;\n}\n\nexport function createBlock(\n  statements: ReadonlyArray<PyStatement>,\n  leadingComments?: ReadonlyArray<string>,\n  trailingComments?: ReadonlyArray<string>,\n): PyBlock {\n  return {\n    kind: PyNodeKind.Block,\n    leadingComments,\n    statements,\n    trailingComments,\n  };\n}\n"
  },
  {
    "path": "packages/openapi-python/src/py-compiler/nodes/statements/break.ts",
    "content": "import type { PyNodeBase } from '../base';\nimport { PyNodeKind } from '../kinds';\n\nexport interface PyBreakStatement extends PyNodeBase {\n  kind: PyNodeKind.BreakStatement;\n}\n\nexport function createBreakStatement(): PyBreakStatement {\n  return {\n    kind: PyNodeKind.BreakStatement,\n  };\n}\n"
  },
  {
    "path": "packages/openapi-python/src/py-compiler/nodes/statements/continue.ts",
    "content": "import type { PyNodeBase } from '../base';\nimport { PyNodeKind } from '../kinds';\n\nexport interface PyContinueStatement extends PyNodeBase {\n  kind: PyNodeKind.ContinueStatement;\n}\n\nexport function createContinueStatement(): PyContinueStatement {\n  return {\n    kind: PyNodeKind.ContinueStatement,\n  };\n}\n"
  },
  {
    "path": "packages/openapi-python/src/py-compiler/nodes/statements/empty.ts",
    "content": "import type { PyNodeBase } from '../base';\nimport { PyNodeKind } from '../kinds';\n\nexport interface PyEmptyStatement extends PyNodeBase {\n  kind: PyNodeKind.EmptyStatement;\n}\n\nexport function createEmptyStatement(): PyEmptyStatement {\n  return {\n    kind: PyNodeKind.EmptyStatement,\n  };\n}\n"
  },
  {
    "path": "packages/openapi-python/src/py-compiler/nodes/statements/except.ts",
    "content": "import type { PyNodeBase } from '../base';\nimport type { PyExpression } from '../expression';\nimport type { PyIdentifier } from '../expressions/identifier';\nimport { PyNodeKind } from '../kinds';\nimport type { PyStatement } from '../statement';\nimport { createBlock, type PyBlock } from './block';\n\nexport interface PyExceptClause extends PyNodeBase {\n  block: PyBlock;\n  exceptionName?: PyIdentifier;\n  exceptionType?: PyExpression;\n  kind: PyNodeKind.ExceptClause;\n}\n\nexport function createExceptClause(\n  block: ReadonlyArray<PyStatement>,\n  exceptionType?: PyExpression,\n  exceptionName?: PyIdentifier,\n): PyExceptClause {\n  return {\n    block: createBlock(block),\n    exceptionName,\n    exceptionType,\n    kind: PyNodeKind.ExceptClause,\n  };\n}\n"
  },
  {
    "path": "packages/openapi-python/src/py-compiler/nodes/statements/expression.ts",
    "content": "import type { PyNodeBase } from '../base';\nimport type { PyExpression } from '../expression';\nimport { PyNodeKind } from '../kinds';\n\nexport interface PyExpressionStatement extends PyNodeBase {\n  expression: PyExpression;\n  kind: PyNodeKind.ExpressionStatement;\n}\n\nexport function createExpressionStatement(expression: PyExpression): PyExpressionStatement {\n  return {\n    expression,\n    kind: PyNodeKind.ExpressionStatement,\n  };\n}\n"
  },
  {
    "path": "packages/openapi-python/src/py-compiler/nodes/statements/for.ts",
    "content": "import type { PyNodeBase } from '../base';\nimport type { PyExpression } from '../expression';\nimport { PyNodeKind } from '../kinds';\nimport type { PyStatement } from '../statement';\nimport type { PyBlock } from './block';\nimport { createBlock } from './block';\n\nexport interface PyForStatement extends PyNodeBase {\n  body: PyBlock;\n  elseBlock?: PyBlock;\n  iterable: PyExpression;\n  kind: PyNodeKind.ForStatement;\n  target: PyExpression;\n}\n\nexport function createForStatement(\n  target: PyExpression,\n  iterable: PyExpression,\n  body: ReadonlyArray<PyStatement>,\n  elseBlock?: ReadonlyArray<PyStatement>,\n): PyForStatement {\n  return {\n    body: createBlock(body),\n    elseBlock: elseBlock ? createBlock(elseBlock) : undefined,\n    iterable,\n    kind: PyNodeKind.ForStatement,\n    target,\n  };\n}\n"
  },
  {
    "path": "packages/openapi-python/src/py-compiler/nodes/statements/if.ts",
    "content": "import type { PyNodeBase } from '../base';\nimport type { PyExpression } from '../expression';\nimport { PyNodeKind } from '../kinds';\nimport type { PyStatement } from '../statement';\nimport { createBlock, type PyBlock } from './block';\n\nexport interface PyIfStatement extends PyNodeBase {\n  condition: PyExpression;\n  elseBlock?: PyBlock | PyIfStatement;\n  kind: PyNodeKind.IfStatement;\n  thenBlock: PyBlock;\n}\n\nexport function createIfStatement(\n  condition: PyExpression,\n  thenBlock: ReadonlyArray<PyStatement>,\n  elseBlock?: ReadonlyArray<PyStatement> | PyIfStatement,\n  leadingComments?: ReadonlyArray<string>,\n  trailingComments?: ReadonlyArray<string>,\n): PyIfStatement {\n  return {\n    condition,\n    elseBlock: elseBlock instanceof Array ? createBlock(elseBlock) : elseBlock,\n    kind: PyNodeKind.IfStatement,\n    leadingComments,\n    thenBlock: createBlock(thenBlock),\n    trailingComments,\n  };\n}\n"
  },
  {
    "path": "packages/openapi-python/src/py-compiler/nodes/statements/import.ts",
    "content": "import type { PyNodeBase } from '../base';\nimport { PyNodeKind } from '../kinds';\n\nexport interface PyImportStatement extends PyNodeBase {\n  isFrom: boolean;\n  kind: PyNodeKind.ImportStatement;\n  module: string;\n  names?: ReadonlyArray<{ alias?: string; name: string }>;\n}\n\nexport function createImportStatement(\n  module: string,\n  names?: ReadonlyArray<{ alias?: string; name: string }>,\n  isFrom: boolean = false,\n): PyImportStatement {\n  return {\n    isFrom,\n    kind: PyNodeKind.ImportStatement,\n    module,\n    names,\n  };\n}\n"
  },
  {
    "path": "packages/openapi-python/src/py-compiler/nodes/statements/raise.ts",
    "content": "import type { PyNodeBase } from '../base';\nimport type { PyExpression } from '../expression';\nimport { PyNodeKind } from '../kinds';\n\nexport interface PyRaiseStatement extends PyNodeBase {\n  expression?: PyExpression;\n  kind: PyNodeKind.RaiseStatement;\n}\n\nexport function createRaiseStatement(expression?: PyExpression): PyRaiseStatement {\n  return {\n    expression,\n    kind: PyNodeKind.RaiseStatement,\n  };\n}\n"
  },
  {
    "path": "packages/openapi-python/src/py-compiler/nodes/statements/return.ts",
    "content": "import type { PyNodeBase } from '../base';\nimport type { PyExpression } from '../expression';\nimport { PyNodeKind } from '../kinds';\n\nexport interface PyReturnStatement extends PyNodeBase {\n  expression?: PyExpression;\n  kind: PyNodeKind.ReturnStatement;\n}\n\nexport function createReturnStatement(expression?: PyExpression): PyReturnStatement {\n  return {\n    expression,\n    kind: PyNodeKind.ReturnStatement,\n  };\n}\n"
  },
  {
    "path": "packages/openapi-python/src/py-compiler/nodes/statements/try.ts",
    "content": "import type { PyNodeBase } from '../base';\nimport { PyNodeKind } from '../kinds';\nimport type { PyStatement } from '../statement';\nimport { createBlock, type PyBlock } from './block';\nimport type { PyExceptClause } from './except';\n\nexport interface PyTryStatement extends PyNodeBase {\n  elseBlock?: PyBlock;\n  exceptClauses?: ReadonlyArray<PyExceptClause>;\n  finallyBlock?: PyBlock;\n  kind: PyNodeKind.TryStatement;\n  tryBlock: PyBlock;\n}\n\nexport function createTryStatement(\n  tryBlock: ReadonlyArray<PyStatement>,\n  exceptClauses?: ReadonlyArray<PyExceptClause>,\n  elseBlock?: ReadonlyArray<PyStatement>,\n  finallyBlock?: ReadonlyArray<PyStatement>,\n): PyTryStatement {\n  return {\n    elseBlock: elseBlock ? createBlock(elseBlock) : undefined,\n    exceptClauses,\n    finallyBlock: finallyBlock ? createBlock(finallyBlock) : undefined,\n    kind: PyNodeKind.TryStatement,\n    tryBlock: createBlock(tryBlock),\n  };\n}\n"
  },
  {
    "path": "packages/openapi-python/src/py-compiler/nodes/statements/while.ts",
    "content": "import type { PyNodeBase } from '../base';\nimport type { PyExpression } from '../expression';\nimport { PyNodeKind } from '../kinds';\nimport type { PyStatement } from '../statement';\nimport type { PyBlock } from './block';\nimport { createBlock } from './block';\n\nexport interface PyWhileStatement extends PyNodeBase {\n  body: PyBlock;\n  condition: PyExpression;\n  elseBlock?: PyBlock;\n  kind: PyNodeKind.WhileStatement;\n}\n\nexport function createWhileStatement(\n  condition: PyExpression,\n  body: ReadonlyArray<PyStatement>,\n  elseBlock?: ReadonlyArray<PyStatement>,\n): PyWhileStatement {\n  return {\n    body: createBlock(body),\n    condition,\n    elseBlock: elseBlock ? createBlock(elseBlock) : undefined,\n    kind: PyNodeKind.WhileStatement,\n  };\n}\n"
  },
  {
    "path": "packages/openapi-python/src/py-compiler/nodes/statements/with.ts",
    "content": "import type { PyNodeBase } from '../base';\nimport type { PyExpression } from '../expression';\nimport { PyNodeKind } from '../kinds';\nimport type { PyStatement } from '../statement';\nimport { createBlock, type PyBlock } from './block';\nimport type { PyWithItem } from './withItem';\n\nexport interface PyWithStatement extends PyNodeBase {\n  body: PyBlock;\n  items: ReadonlyArray<PyWithItem>;\n  kind: PyNodeKind.WithStatement;\n  modifiers?: ReadonlyArray<PyExpression>;\n}\n\nexport function createWithStatement(\n  items: ReadonlyArray<PyWithItem>,\n  body: ReadonlyArray<PyStatement>,\n  modifiers?: ReadonlyArray<PyExpression>,\n  leadingComments?: ReadonlyArray<string>,\n  trailingComments?: ReadonlyArray<string>,\n): PyWithStatement {\n  return {\n    body: createBlock(body),\n    items,\n    kind: PyNodeKind.WithStatement,\n    leadingComments,\n    modifiers,\n    trailingComments,\n  };\n}\n"
  },
  {
    "path": "packages/openapi-python/src/py-compiler/nodes/statements/withItem.ts",
    "content": "import type { PyNodeBase } from '../base';\nimport type { PyExpression } from '../expression';\nimport { PyNodeKind } from '../kinds';\n\nexport interface PyWithItem extends PyNodeBase {\n  alias?: PyExpression;\n  contextExpr: PyExpression;\n  kind: PyNodeKind.WithItem;\n}\n\nexport function createWithItem(\n  contextExpr: PyExpression,\n  alias?: PyExpression,\n  leadingComments?: ReadonlyArray<string>,\n  trailingComments?: ReadonlyArray<string>,\n): PyWithItem {\n  return {\n    alias,\n    contextExpr,\n    kind: PyNodeKind.WithItem,\n    leadingComments,\n    trailingComments,\n  };\n}\n"
  },
  {
    "path": "packages/openapi-python/src/py-compiler/nodes/structure/comment.ts",
    "content": "import type { PyNodeBase } from '../base';\nimport { PyNodeKind } from '../kinds';\n\nexport interface PyComment extends PyNodeBase {\n  kind: PyNodeKind.Comment;\n  text: string;\n}\n\nexport function createComment(text: string): PyComment {\n  return {\n    kind: PyNodeKind.Comment,\n    text,\n  };\n}\n"
  },
  {
    "path": "packages/openapi-python/src/py-compiler/nodes/structure/sourceFile.ts",
    "content": "import type { PyNode, PyNodeBase } from '../base';\nimport { PyNodeKind } from '../kinds';\n\nexport interface PySourceFile extends PyNodeBase {\n  docstring?: string;\n  kind: PyNodeKind.SourceFile;\n  statements: ReadonlyArray<PyNode>;\n}\n\nexport function createSourceFile(\n  statements: ReadonlyArray<PyNode>,\n  docstring?: string,\n  leadingComments?: ReadonlyArray<string>,\n  trailingComments?: ReadonlyArray<string>,\n): PySourceFile {\n  return {\n    docstring,\n    kind: PyNodeKind.SourceFile,\n    leadingComments,\n    statements,\n    trailingComments,\n  };\n}\n"
  },
  {
    "path": "packages/openapi-python/src/py-compiler/printer.ts",
    "content": "import type { PyNode } from './nodes/base';\nimport { PyNodeKind } from './nodes/kinds';\n\nexport interface PyPrinterOptions {\n  indentSize?: number;\n}\n\nconst DEFAULT_INDENT_SIZE = 4;\nconst PARAMS_MULTILINE_THRESHOLD = 3;\n\nexport function createPrinter(options?: PyPrinterOptions) {\n  const indentSize = options?.indentSize ?? DEFAULT_INDENT_SIZE;\n\n  let indentLevel = 0;\n\n  function printComments(\n    parts: Array<string>,\n    lines: ReadonlyArray<string>,\n    indent?: boolean,\n  ): void {\n    if (indent) indentLevel += 1;\n    parts.push(...lines.map((line) => printLine(`# ${line}`)));\n    if (indent) indentLevel -= 1;\n  }\n\n  function printDocstring(docstring: string): Array<string> {\n    const lines = docstring.split('\\n');\n    const parts: Array<string> = [];\n    if (lines.length === 1) {\n      parts.push(printLine(`\"\"\"${lines[0]}\"\"\"`), '');\n    } else {\n      parts.push(printLine(`\"\"\"`));\n      parts.push(...lines.map((line) => printLine(line)));\n      parts.push(printLine(`\"\"\"`), '');\n    }\n    return parts;\n  }\n\n  function printLine(line: string): string {\n    if (line === '') return '';\n    return ' '.repeat(indentLevel * indentSize) + line;\n  }\n\n  function printNode(node: PyNode): string {\n    const parts: Array<string> = [];\n\n    if (node.leadingComments) {\n      printComments(parts, node.leadingComments);\n    }\n\n    let indentTrailingComments = false;\n\n    switch (node.kind) {\n      case PyNodeKind.Assignment: {\n        const target = printNode(node.target);\n        if (node.type) {\n          const type = printNode(node.type);\n          if (node.value) {\n            parts.push(printLine(`${target}: ${type} = ${printNode(node.value)}`));\n          } else {\n            parts.push(printLine(`${target}: ${type}`));\n          }\n        } else {\n          parts.push(printLine(`${target} = ${printNode(node.value!)}`));\n        }\n        break;\n      }\n\n      case PyNodeKind.AsyncExpression:\n        parts.push(`async ${printNode(node.expression)}`);\n        break;\n\n      case PyNodeKind.AugmentedAssignment:\n        parts.push(\n          printLine(`${printNode(node.target)} ${node.operator} ${printNode(node.value)}`),\n        );\n        break;\n\n      case PyNodeKind.AwaitExpression:\n        parts.push(`await ${printNode(node.expression)}`);\n        break;\n\n      case PyNodeKind.BinaryExpression:\n        parts.push(`${printNode(node.left)} ${node.operator} ${printNode(node.right)}`);\n        break;\n\n      case PyNodeKind.Block:\n        indentLevel += 1;\n        if (node.statements.length) {\n          parts.push(...node.statements.map(printNode));\n        } else {\n          parts.push(printLine('pass'));\n        }\n        indentLevel -= 1;\n        break;\n\n      case PyNodeKind.BreakStatement:\n        parts.push(printLine('break'));\n        break;\n\n      case PyNodeKind.CallExpression:\n        parts.push(`${printNode(node.callee)}(${node.args.map(printNode).join(', ')})`);\n        break;\n\n      case PyNodeKind.ClassDeclaration: {\n        indentTrailingComments = true;\n        if (node.decorators) {\n          parts.push(...node.decorators.map((decorator) => printLine(`@${printNode(decorator)}`)));\n        }\n        const bases = node.baseClasses?.length\n          ? `(${node.baseClasses.map(printNode).join(', ')})`\n          : '';\n        parts.push(printLine(`class ${node.name}${bases}:`));\n        if (node.docstring) {\n          indentLevel += 1;\n          parts.push(...printDocstring(node.docstring));\n          indentLevel -= 1;\n        }\n        parts.push(printNode(node.body));\n        break;\n      }\n\n      case PyNodeKind.Comment:\n        parts.push(printLine(`# ${node.text}`));\n        break;\n\n      case PyNodeKind.ContinueStatement:\n        parts.push(printLine('continue'));\n        break;\n\n      case PyNodeKind.DictComprehension: {\n        const asyncPrefix = node.isAsync ? 'async ' : '';\n        const children: Array<string> = [\n          `${printNode(node.key)}: ${printNode(node.value)} ${asyncPrefix}for ${printNode(node.target)} in ${printNode(node.iterable)}`,\n        ];\n        if (node.ifs) {\n          for (const condition of node.ifs) {\n            children.push(`if ${printNode(condition)}`);\n          }\n        }\n        parts.push(`{${children.join(' ')}}`);\n        break;\n      }\n\n      case PyNodeKind.DictExpression: {\n        const entries = node.entries\n          .map(({ key, value }) => `${printNode(key)}: ${printNode(value)}`)\n          .join(', ');\n        parts.push(`{${entries}}`);\n        break;\n      }\n\n      case PyNodeKind.EmptyStatement:\n        parts.push('');\n        break;\n\n      case PyNodeKind.ExpressionStatement:\n        parts.push(printLine(printNode(node.expression)));\n        break;\n\n      case PyNodeKind.ForStatement:\n        parts.push(printLine(`for ${printNode(node.target)} in ${printNode(node.iterable)}:`));\n        parts.push(printNode(node.body));\n        if (node.elseBlock) {\n          parts.push(`${printLine('else:')}`);\n          parts.push(`${printNode(node.elseBlock)}`);\n        }\n        break;\n\n      case PyNodeKind.FStringExpression: {\n        const children = node.parts.map((part) =>\n          typeof part === 'string' ? part : `{${printNode(part)}}`,\n        );\n        parts.push(`f\"${children.join('')}\"`);\n        break;\n      }\n\n      case PyNodeKind.FunctionDeclaration: {\n        if (node.decorators) {\n          parts.push(...node.decorators.map((decorator) => printLine(`@${printNode(decorator)}`)));\n        }\n        const modifiers = node.modifiers?.map(printNode).join(' ') ?? '';\n        const defPrefix = modifiers ? `${modifiers} def` : 'def';\n        const formatParameter = (parameter: (typeof node.parameters)[number]): string => {\n          const children: Array<string> = [parameter.name];\n          if (parameter.type) children.push(`: ${printNode(parameter.type)}`);\n          if (parameter.defaultValue) children.push(` = ${printNode(parameter.defaultValue)}`);\n          return children.join('');\n        };\n        const returnAnnotation = node.returnType ? ` -> ${printNode(node.returnType)}` : '';\n        const preParams = `${defPrefix} ${node.name}(`;\n        const postParams = `)${returnAnnotation}:`;\n\n        if (node.parameters.length > PARAMS_MULTILINE_THRESHOLD) {\n          parts.push(printLine(preParams));\n          indentLevel += 1;\n          const params = node.parameters.map((parameter) =>\n            printLine(`${formatParameter(parameter)},`),\n          );\n          parts.push(...params);\n          indentLevel -= 1;\n          parts.push(printLine(postParams));\n        } else {\n          const parameters = node.parameters.map((parameter) => formatParameter(parameter));\n          const params = parameters.join(', ');\n          parts.push(printLine(`${preParams}${params}${postParams}`));\n        }\n\n        if (node.docstring) {\n          indentLevel += 1;\n          parts.push(...printDocstring(node.docstring));\n          indentLevel -= 1;\n        }\n        parts.push(printNode(node.body));\n        break;\n      }\n\n      case PyNodeKind.GeneratorExpression: {\n        const asyncPrefix = node.isAsync ? 'async ' : '';\n        const children: Array<string> = [\n          `${printNode(node.element)} ${asyncPrefix}for ${printNode(node.target)} in ${printNode(node.iterable)}`,\n        ];\n        if (node.ifs) {\n          for (const condition of node.ifs) {\n            children.push(`if ${printNode(condition)}`);\n          }\n        }\n        parts.push(`(${children.join(' ')})`);\n        break;\n      }\n\n      case PyNodeKind.Identifier:\n        parts.push(node.name);\n        break;\n\n      case PyNodeKind.IfStatement:\n        parts.push(printLine(`if ${printNode(node.condition)}:`));\n        parts.push(`${printNode(node.thenBlock)}`);\n        if (node.elseBlock) {\n          parts.push(`${printLine('else:')}`);\n          parts.push(`${printNode(node.elseBlock)}`);\n        }\n        break;\n\n      case PyNodeKind.KeywordArgument:\n        parts.push(`${node.name}=${printNode(node.value)}`);\n        break;\n\n      case PyNodeKind.ImportStatement: {\n        const fromPrefix = node.isFrom ? `from ${node.module} ` : '';\n        if (fromPrefix) {\n          if (node.names && node.names.length > 0) {\n            const imports = node.names\n              .map(({ alias, name }) => (alias ? `${name} as ${alias}` : name))\n              .join(', ');\n            parts.push(printLine(`${fromPrefix}import ${imports}`));\n          } else {\n            parts.push(printLine(`${fromPrefix}import *`));\n          }\n        } else {\n          if (node.names && node.names.length > 0) {\n            const imports = node.names\n              .map(({ alias, name }) => (alias ? `${name} as ${alias}` : name))\n              .join(', ');\n            parts.push(printLine(`import ${imports}`));\n          } else {\n            parts.push(printLine(`import ${node.module}`));\n          }\n        }\n        break;\n      }\n\n      case PyNodeKind.LambdaExpression: {\n        const parameters = node.parameters.map((parameter) => {\n          const children: Array<string> = [parameter.name];\n          if (parameter.type) children.push(`: ${printNode(parameter.type)}`);\n          if (parameter.defaultValue) children.push(` = ${printNode(parameter.defaultValue)}`);\n          return children.join('');\n        });\n        parts.push(`lambda ${parameters.join(', ')}: ${printNode(node.expression)}`);\n        break;\n      }\n\n      case PyNodeKind.ListComprehension: {\n        const asyncPrefix = node.isAsync ? 'async ' : '';\n        const children: Array<string> = [\n          `${printNode(node.element)} ${asyncPrefix}for ${printNode(node.target)} in ${printNode(node.iterable)}`,\n        ];\n        if (node.ifs) {\n          for (const condition of node.ifs) {\n            children.push(`if ${printNode(condition)}`);\n          }\n        }\n        parts.push(`[${children.join(' ')}]`);\n        break;\n      }\n\n      case PyNodeKind.ListExpression:\n        parts.push(`[${node.elements.map(printNode).join(', ')}]`);\n        break;\n\n      case PyNodeKind.Literal:\n        if (typeof node.value === 'string') {\n          parts.push(`\"${node.value}\"`);\n        } else if (typeof node.value === 'boolean') {\n          parts.push(node.value ? 'True' : 'False');\n        } else if (node.value === null) {\n          parts.push('None');\n        } else {\n          parts.push(String(node.value));\n        }\n        break;\n\n      case PyNodeKind.MemberExpression:\n        parts.push(`${printNode(node.object)}.${printNode(node.member)}`);\n        break;\n\n      case PyNodeKind.RaiseStatement:\n        if (node.expression) {\n          parts.push(printLine(`raise ${printNode(node.expression)}`));\n        } else {\n          parts.push(printLine('raise'));\n        }\n        break;\n\n      case PyNodeKind.ReturnStatement:\n        if (node.expression) {\n          parts.push(printLine(`return ${printNode(node.expression)}`));\n        } else {\n          parts.push(printLine('return'));\n        }\n        break;\n\n      case PyNodeKind.SetComprehension: {\n        const asyncPrefix = node.isAsync ? 'async ' : '';\n        const children: Array<string> = [\n          `${printNode(node.element)} ${asyncPrefix}for ${printNode(node.target)} in ${printNode(node.iterable)}`,\n        ];\n        if (node.ifs) {\n          for (const condition of node.ifs) {\n            children.push(`if ${printNode(condition)}`);\n          }\n        }\n        parts.push(`{${children.join(' ')}}`);\n        break;\n      }\n\n      case PyNodeKind.SetExpression: {\n        if (!node.elements.length) {\n          parts.push('set()');\n        } else {\n          parts.push(`{${node.elements.map(printNode).join(', ')}}`);\n        }\n        break;\n      }\n\n      case PyNodeKind.SourceFile:\n        if (node.docstring) {\n          parts.push(...printDocstring(node.docstring));\n        }\n        parts.push(...node.statements.map(printNode));\n        break;\n\n      case PyNodeKind.SubscriptExpression:\n        parts.push(`${printNode(node.value)}[${printNode(node.slice)}]`);\n        break;\n\n      case PyNodeKind.SubscriptSlice:\n        parts.push(node.elements.map(printNode).join(', '));\n        break;\n\n      case PyNodeKind.TryStatement: {\n        parts.push(printLine('try:'), printNode(node.tryBlock));\n        if (node.exceptClauses) {\n          for (const clause of node.exceptClauses) {\n            const type = clause.exceptionType ? ` ${printNode(clause.exceptionType)}` : '';\n            const name = clause.exceptionName ? ` as ${printNode(clause.exceptionName)}` : '';\n            parts.push(printLine(`except${type}${name}:`), printNode(clause.block));\n          }\n        }\n        if (node.elseBlock) {\n          parts.push(printLine(`else:`), printNode(node.elseBlock));\n        }\n        if (node.finallyBlock) {\n          parts.push(printLine(`finally:`), printNode(node.finallyBlock));\n        }\n        break;\n      }\n\n      case PyNodeKind.TupleExpression: {\n        // Single-element tuple needs trailing comma\n        const trailingComma = node.elements.length === 1 ? ',' : '';\n        parts.push(`(${node.elements.map(printNode).join(', ')}${trailingComma})`);\n        break;\n      }\n\n      case PyNodeKind.WhileStatement: {\n        parts.push(printLine(`while ${printNode(node.condition)}:`));\n        parts.push(printNode(node.body));\n        if (node.elseBlock) {\n          parts.push(`${printLine('else:')}`);\n          parts.push(`${printNode(node.elseBlock)}`);\n        }\n        break;\n      }\n\n      case PyNodeKind.WithStatement: {\n        const modifiers = node.modifiers?.map(printNode).join(' ') ?? '';\n        const withPrefix = modifiers ? `${modifiers} with` : 'with';\n        const items = node.items\n          .map((item) =>\n            item.alias\n              ? `${printNode(item.contextExpr)} as ${printNode(item.alias)}`\n              : printNode(item.contextExpr),\n          )\n          .join(', ');\n        parts.push(printLine(`${withPrefix} ${items}:`));\n        parts.push(printNode(node.body));\n        break;\n      }\n\n      case PyNodeKind.YieldExpression:\n        if (node.value) {\n          parts.push(`yield ${printNode(node.value)}`);\n        } else {\n          parts.push('yield');\n        }\n        break;\n\n      case PyNodeKind.YieldFromExpression:\n        parts.push(`yield from ${printNode(node.expression)}`);\n        break;\n\n      default:\n        throw new Error(`Unsupported node kind: ${(node as { kind: string }).kind}`);\n    }\n\n    if (node.trailingComments) {\n      printComments(parts, node.trailingComments, indentTrailingComments);\n    }\n\n    return parts.join('\\n');\n  }\n\n  function printFile(node: PyNode): string {\n    const parts: Array<string> = [printNode(node), ''];\n    return parts.join('\\n');\n  }\n\n  return {\n    printFile,\n  };\n}\n\nexport function printAst(node: PyNode): string {\n  return JSON.stringify(node, null, 2);\n}\n"
  },
  {
    "path": "packages/openapi-python/src/py-dsl/base.ts",
    "content": "// TODO: symbol should be protected, but needs to be public to satisfy types\nimport type {\n  AnalysisContext,\n  File,\n  FromRef,\n  Language,\n  Node,\n  NodeName,\n  NodeNameSanitizer,\n  NodeRelationship,\n  NodeScope,\n  Ref,\n  Symbol,\n} from '@hey-api/codegen-core';\nimport { fromRef, isNode, isRef, isSymbol, nodeBrand, ref } from '@hey-api/codegen-core';\nimport type { AnyString } from '@hey-api/types';\n\nimport { py } from '../py-compiler';\nimport type { AccessOptions } from './utils/context';\n\nexport abstract class PyDsl<T extends py.Node = py.Node> implements Node<T> {\n  // eslint-disable-next-line @typescript-eslint/no-unused-vars\n  analyze(_: AnalysisContext): void {}\n  clone(): this {\n    const cloned = Object.create(Object.getPrototypeOf(this));\n    Object.assign(cloned, this);\n    return cloned;\n  }\n  exported?: boolean;\n  file?: File;\n  get name(): Node['name'] {\n    return {\n      ...this._name,\n      set: (value) => {\n        this._name = ref(value);\n        if (isSymbol(value)) {\n          value.setNode(this);\n        }\n      },\n      toString: () => (this._name ? this.$name(this._name) : ''),\n    } as Node['name'];\n  }\n  readonly nameSanitizer?: NodeNameSanitizer;\n  language: Language = 'python';\n  parent?: Node;\n  root: boolean = false;\n  scope?: NodeScope = 'value';\n  structuralChildren?: Map<PyDsl, NodeRelationship>;\n  structuralParents?: Map<PyDsl, NodeRelationship>;\n  symbol?: Symbol;\n  toAst(): T {\n    return undefined as unknown as T;\n  }\n  readonly '~brand' = nodeBrand;\n\n  /** Branding property to identify the DSL class at runtime. */\n  abstract readonly '~dsl': AnyString;\n\n  /** Conditionally applies a callback to this builder. */\n  $if<T extends PyDsl, V, R extends PyDsl = T>(\n    this: T,\n    value: V,\n    ifTrue: (self: T, v: Exclude<V, false | null | undefined>) => R | void,\n    ifFalse?: (self: T, v: Extract<V, false | null | undefined>) => R | void,\n  ): R | T;\n  $if<T extends PyDsl, V, R extends PyDsl = T>(\n    this: T,\n    value: V,\n    ifTrue: (v: Exclude<V, false | null | undefined>) => R | void,\n    ifFalse?: (v: Extract<V, false | null | undefined>) => R | void,\n  ): R | T;\n  $if<T extends PyDsl, V, R extends PyDsl = T>(\n    this: T,\n    value: V,\n    ifTrue: () => R | void,\n    ifFalse?: () => R | void,\n  ): R | T;\n  $if<T extends PyDsl, V, R extends PyDsl = T>(\n    this: T,\n    value: V,\n    ifTrue: any,\n    ifFalse?: any,\n  ): R | T {\n    if (value) {\n      // Try calling with (self, value), then (value), then ()\n      let result: R | void | undefined;\n      try {\n        result = ifTrue?.(this, value as Exclude<V, false | null | undefined>);\n      } catch {\n        // ignore and try other signatures\n      }\n      if (result === undefined) {\n        try {\n          result = ifTrue?.(value as Exclude<V, false | null | undefined>);\n        } catch {\n          // ignore and try zero-arg\n        }\n      }\n      if (result === undefined) {\n        try {\n          result = ifTrue?.();\n        } catch {\n          // swallow\n        }\n      }\n      return (result ?? this) as R | T;\n    }\n    if (ifFalse) {\n      let result: R | void | undefined;\n      try {\n        result = ifFalse?.(this, value as Extract<V, false | null | undefined>);\n      } catch {\n        // ignore\n      }\n      if (result === undefined) {\n        try {\n          result = ifFalse?.(value as Extract<V, false | null | undefined>);\n        } catch {\n          // ignore\n        }\n      }\n      if (result === undefined) {\n        try {\n          result = ifFalse?.();\n        } catch {\n          // ignore\n        }\n      }\n      return (result ?? this) as R | T;\n    }\n    return this;\n  }\n\n  /** Access patterns for this node. */\n  toAccessNode?(\n    node: this,\n    options: AccessOptions,\n    ctx: {\n      /** The full chain. */\n      chain: ReadonlyArray<PyDsl>;\n      /** Position in the chain (0 = root). */\n      index: number;\n      /** Is this the leaf node? */\n      isLeaf: boolean;\n      /** Is this the root node? */\n      isRoot: boolean;\n      /** Total length of the chain. */\n      length: number;\n    },\n  ): PyDsl | undefined;\n\n  protected $maybeId<T extends string | py.Expression>(\n    expr: T,\n  ): T extends string ? py.Identifier : T {\n    return (typeof expr === 'string' ? py.factory.createIdentifier(expr) : expr) as T extends string\n      ? py.Identifier\n      : T;\n  }\n\n  protected $name(name: Ref<NodeName>): string {\n    const value = fromRef(name);\n    if (isSymbol(value)) {\n      try {\n        return value.finalName;\n      } catch {\n        return value.name;\n      }\n    }\n    return String(value);\n  }\n\n  protected $node<I>(value: I): NodeOfMaybe<I> {\n    if (value === undefined) {\n      return undefined as NodeOfMaybe<I>;\n    }\n    // @ts-expect-error\n    if (isRef(value)) value = fromRef(value);\n    if (isSymbol(value)) {\n      return this.$maybeId(value.finalName) as NodeOfMaybe<I>;\n    }\n    if (typeof value === 'string') {\n      return this.$maybeId(value) as NodeOfMaybe<I>;\n    }\n    if (value instanceof Array) {\n      return value.map((item) => {\n        if (isRef(item)) item = fromRef(item);\n        return this.unwrap(item);\n      }) as NodeOfMaybe<I>;\n    }\n    return this.unwrap(value as any) as NodeOfMaybe<I>;\n  }\n\n  // protected $type<I>(value: I, args?: ReadonlyArray<ts.TypeNode>): TypeOfMaybe<I> {\n  //   if (value === undefined) {\n  //     return undefined as TypeOfMaybe<I>;\n  //   }\n  //   // @ts-expect-error\n  //   if (isRef(value)) value = fromRef(value);\n  //   if (isSymbol(value)) {\n  //     return ts.factory.createTypeReferenceNode(value.finalName, args) as TypeOfMaybe<I>;\n  //   }\n  //   if (typeof value === 'string') {\n  //     return ts.factory.createTypeReferenceNode(value, args) as TypeOfMaybe<I>;\n  //   }\n  //   if (typeof value === 'boolean') {\n  //     const literal = value ? ts.factory.createTrue() : ts.factory.createFalse();\n  //     return ts.factory.createLiteralTypeNode(literal) as TypeOfMaybe<I>;\n  //   }\n  //   if (typeof value === 'number') {\n  //     return ts.factory.createLiteralTypeNode(\n  //       ts.factory.createNumericLiteral(value),\n  //     ) as TypeOfMaybe<I>;\n  //   }\n  //   if (value instanceof Array) {\n  //     return value.map((item) => this.$type(item, args)) as TypeOfMaybe<I>;\n  //   }\n  //   return this.unwrap(value as any) as TypeOfMaybe<I>;\n  // }\n\n  private _name?: Ref<NodeName>;\n\n  /** Unwraps nested nodes into raw Python AST. */\n  private unwrap<I>(value: I): I extends PyDsl<infer N> ? N : I {\n    return (isNode(value) ? value.toAst() : value) as I extends PyDsl<infer N> ? N : I;\n  }\n}\n\ntype NodeOfMaybe<I> = undefined extends I\n  ? NodeOf<NonNullable<FromRef<I>>> | undefined\n  : NodeOf<FromRef<I>>;\n\ntype NodeOf<I> =\n  I extends ReadonlyArray<infer U>\n    ? ReadonlyArray<U extends PyDsl<infer N> ? N : U>\n    : I extends string\n      ? py.Expression\n      : I extends PyDsl<infer N>\n        ? N\n        : I extends py.Node\n          ? I\n          : never;\n\nexport type MaybePyDsl<T> =\n  T extends PyDsl<infer U> ? U | PyDsl<U> : T extends py.Node ? T | PyDsl<T> : never;\n\n// export abstract class TypePyDsl<\n//   T extends\n//     | ts.LiteralTypeNode\n//     | ts.QualifiedName\n//     | ts.TypeElement\n//     | ts.TypeNode\n//     | ts.TypeParameterDeclaration = ts.TypeNode,\n// > extends PyDsl<T> {}\n\n// type TypeOfMaybe<I> = undefined extends I\n//   ? TypeOf<NonNullable<FromRef<I>>> | undefined\n//   : TypeOf<FromRef<I>>;\n\n// type TypeOf<I> =\n//   I extends ReadonlyArray<infer U>\n//     ? ReadonlyArray<TypeOf<U>>\n//     : I extends string\n//       ? ts.TypeNode\n//       : I extends boolean\n//         ? ts.LiteralTypeNode\n//         : I extends PyDsl<infer N>\n//           ? N\n//           : I extends ts.TypeNode\n//             ? I\n//             : never;\n"
  },
  {
    "path": "packages/openapi-python/src/py-dsl/decl/class.ts",
    "content": "import type { AnalysisContext, NodeName, Ref } from '@hey-api/codegen-core';\nimport { isSymbol, ref } from '@hey-api/codegen-core';\n\nimport { py } from '../../py-compiler';\nimport { type MaybePyDsl, PyDsl } from '../base';\nimport { NewlinePyDsl } from '../layout/newline';\nimport { DecoratorMixin } from '../mixins/decorator';\nimport { DocMixin } from '../mixins/doc';\nimport { LayoutMixin } from '../mixins/layout';\nimport { ExportMixin } from '../mixins/modifiers';\nimport { safeRuntimeName } from '../utils/name';\n\ntype Body = Array<MaybePyDsl<py.Statement>>;\n\nconst Mixed = DecoratorMixin(DocMixin(ExportMixin(LayoutMixin(PyDsl<py.ClassDeclaration>))));\n\nexport class ClassPyDsl extends Mixed {\n  readonly '~dsl' = 'ClassPyDsl';\n  override readonly nameSanitizer = safeRuntimeName;\n\n  protected baseClasses: Array<Ref<NodeName>> = [];\n  protected body: Body = [];\n\n  constructor(name: NodeName) {\n    super();\n    this.name.set(name);\n    if (isSymbol(name)) {\n      name.setKind('class');\n    }\n  }\n\n  override analyze(ctx: AnalysisContext): void {\n    super.analyze(ctx);\n    for (const baseClass of this.baseClasses) {\n      ctx.analyze(baseClass);\n    }\n    ctx.analyze(this.name);\n    ctx.pushScope();\n    try {\n      for (const item of this.body) {\n        ctx.analyze(item);\n      }\n    } finally {\n      ctx.popScope();\n    }\n  }\n\n  /** Returns true when all required builder calls are present. */\n  get isValid(): boolean {\n    return this.missingRequiredCalls().length === 0;\n  }\n\n  /** Returns true if the class has any members. */\n  get hasBody(): boolean {\n    return this.body.length > 0;\n  }\n\n  /** Adds one or more class members (fields, methods, etc.). */\n  do(...items: Body): this {\n    this.body.push(...items);\n    return this;\n  }\n\n  /** Records base classes to extend from. */\n  extends(...baseClass: ReadonlyArray<NodeName>): this {\n    this.baseClasses.push(...baseClass.map((item) => ref(item)));\n    return this;\n  }\n\n  /** Inserts an empty line between members for formatting. */\n  newline(): this {\n    this.body.push(new NewlinePyDsl());\n    return this;\n  }\n\n  override toAst() {\n    this.$validate();\n    // const uniqueClasses: Array<py.Expression> = [];\n\n    // for (const base of baseClass) {\n    //   let expr: py.Expression;\n    //   if (typeof base === 'string' || base instanceof PyDsl) {\n    //     expr = this.$node(base) as py.Expression;\n    //   } else if (isSymbol(base)) {\n    //     expr = py.factory.createIdentifier(base.finalName);\n    //   }\n\n    //   // Avoid duplicates by checking if already added\n    //   const exists = uniqueClasses.some((existing) => {\n    //     const existingExpr = this.$node(existing) as py.Expression;\n    //     return existingExpr === expr;\n    //   });\n\n    //   if (!exists) {\n    //     uniqueClasses.push(expr);\n    //   }\n    // }\n\n    return py.factory.createClassDeclaration(\n      this.name.toString(),\n      this.$node(this.body),\n      this.$decorators(),\n      this.baseClasses.map((c) => this.$node(c)),\n      this.$docs(),\n    );\n  }\n\n  $validate(): asserts this {\n    const missing = this.missingRequiredCalls();\n    if (missing.length === 0) return;\n    throw new Error(`Class declaration missing ${missing.join(' and ')}`);\n  }\n\n  private missingRequiredCalls(): ReadonlyArray<string> {\n    const missing: Array<string> = [];\n    if (!this.name.toString()) missing.push('name');\n    return missing;\n  }\n}\n"
  },
  {
    "path": "packages/openapi-python/src/py-dsl/decl/func.ts",
    "content": "import type { AnalysisContext, NodeName, NodeNameSanitizer } from '@hey-api/codegen-core';\nimport { isSymbol } from '@hey-api/codegen-core';\n\nimport { py } from '../../py-compiler';\nimport { PyDsl } from '../base';\nimport { DecoratorMixin } from '../mixins/decorator';\nimport { DoMixin } from '../mixins/do';\nimport { DocMixin } from '../mixins/doc';\nimport { LayoutMixin } from '../mixins/layout';\nimport { AsyncMixin, ExportMixin } from '../mixins/modifiers';\nimport { ParamMixin } from '../mixins/param';\nimport { ReturnsMixin } from '../mixins/returns';\nimport { safeRuntimeName } from '../utils/name';\n\nconst Mixed = AsyncMixin(\n  DecoratorMixin(\n    DocMixin(\n      DoMixin(ExportMixin(LayoutMixin(ParamMixin(ReturnsMixin(PyDsl<py.FunctionDeclaration>))))),\n    ),\n  ),\n);\n\nexport class FuncPyDsl extends Mixed {\n  readonly '~dsl' = 'FuncPyDsl';\n  override readonly nameSanitizer: NodeNameSanitizer;\n\n  constructor(\n    name: NodeName,\n    fn?: (f: FuncPyDsl) => void,\n    options?: { nameSanitizer?: NodeNameSanitizer },\n  ) {\n    super();\n    this.nameSanitizer = options?.nameSanitizer ?? safeRuntimeName;\n    this.name.set(name);\n    if (isSymbol(name)) {\n      name.setKind('function');\n    }\n    fn?.(this);\n  }\n\n  override analyze(ctx: AnalysisContext): void {\n    ctx.pushScope();\n    try {\n      super.analyze(ctx);\n      ctx.analyze(this.name);\n    } finally {\n      ctx.popScope();\n    }\n  }\n\n  /** Returns true when all required builder calls are present. */\n  get isValid(): boolean {\n    return this.missingRequiredCalls().length === 0;\n  }\n\n  override toAst() {\n    this.$validate();\n    return py.factory.createFunctionDeclaration(\n      this.name.toString(),\n      this.$params(),\n      this.$returns(),\n      this.$do(),\n      this.$decorators(),\n      this.$docs(),\n      this.modifiers,\n    );\n  }\n\n  $validate(): asserts this {\n    const missing = this.missingRequiredCalls();\n    if (missing.length === 0) return;\n    throw new Error(`Function declaration missing ${missing.join(' and ')}`);\n  }\n\n  private missingRequiredCalls(): ReadonlyArray<string> {\n    const missing: Array<string> = [];\n    if (!this.name.toString()) missing.push('name');\n    return missing;\n  }\n}\n"
  },
  {
    "path": "packages/openapi-python/src/py-dsl/decl/param.ts",
    "content": "import type { AnalysisContext, NodeName, Ref } from '@hey-api/codegen-core';\nimport { ref } from '@hey-api/codegen-core';\n\nimport { py } from '../../py-compiler';\nimport { PyDsl } from '../base';\n\nexport type ParamDefaultValue = NodeName | py.Expression | undefined;\nexport type ParamFn = (p: ParamPyDsl) => void;\nexport type ParamName = NodeName | ParamFn;\nexport type ParamType = NodeName | PyDsl<py.Expression> | undefined;\n\nexport type ParamCtor = (name: ParamName, fn?: ParamFn) => ParamPyDsl;\n\nexport class ParamPyDsl extends PyDsl<py.FunctionParameter> {\n  readonly '~dsl' = 'ParamPyDsl';\n\n  protected _defaultValue?: Ref<ParamDefaultValue>;\n  protected _type?: Ref<ParamType>;\n\n  constructor(name: ParamName, fn?: ParamFn) {\n    super();\n    if (typeof name === 'function') {\n      name(this);\n    } else {\n      this.name.set(name);\n      fn?.(this);\n    }\n  }\n\n  override analyze(ctx: AnalysisContext): void {\n    super.analyze(ctx);\n    ctx.analyze(this.name);\n    ctx.analyze(this._type);\n    ctx.analyze(this._defaultValue);\n  }\n\n  /** Sets the parameter default value. */\n  default(value: ParamDefaultValue): this {\n    this._defaultValue = ref(value);\n    return this;\n  }\n\n  get isValid(): boolean {\n    return this.missingRequiredCalls().length === 0;\n  }\n\n  /** Sets the parameter type. */\n  type(type: ParamType): this {\n    this._type = ref(type);\n    return this;\n  }\n\n  override toAst() {\n    this.$validate();\n    return py.factory.createFunctionParameter(\n      this.name.toString(),\n      this.$node(this._type),\n      this.$node(this._defaultValue),\n    );\n  }\n\n  $validate(): asserts this {\n    const missing = this.missingRequiredCalls();\n    if (missing.length === 0) return;\n    throw new Error(`Parameter missing ${missing.join(' and ')}`);\n  }\n\n  private missingRequiredCalls(): ReadonlyArray<string> {\n    const missing: Array<string> = [];\n    if (!this.name.toString()) missing.push('name');\n    return missing;\n  }\n}\n"
  },
  {
    "path": "packages/openapi-python/src/py-dsl/expr/attr.ts",
    "content": "import type { AnalysisContext, NodeName, Ref } from '@hey-api/codegen-core';\nimport { fromRef, isSymbol, ref } from '@hey-api/codegen-core';\n\nimport { py } from '../../py-compiler';\nimport type { MaybePyDsl } from '../base';\nimport { PyDsl } from '../base';\nimport { ExprMixin } from '../mixins/expr';\nimport { f } from '../utils/factories';\n\nexport type AttrLeft = NodeName | MaybePyDsl<py.Expression>;\nexport type AttrCtor = (left: AttrLeft, right: NodeName) => AttrPyDsl;\n\nconst Mixed = ExprMixin(PyDsl<py.MemberExpression>);\n\nexport class AttrPyDsl extends Mixed {\n  readonly '~dsl' = 'AttrPyDsl';\n\n  protected left: Ref<AttrLeft>;\n\n  constructor(left: AttrLeft, right: NodeName) {\n    super();\n    this.left = ref(left);\n    this.name.set(right);\n  }\n\n  override analyze(ctx: AnalysisContext): void {\n    super.analyze(ctx);\n    ctx.analyze(this.left);\n    ctx.analyze(this.name);\n  }\n\n  /** Returns true when all required builder calls are present. */\n  get isValid(): boolean {\n    return this.missingRequiredCalls().length === 0;\n  }\n\n  override toAst() {\n    this.$validate();\n\n    const leftNode = this.$node(this.left);\n    const right = fromRef(this.name);\n    const value = isSymbol(right) ? right.finalName : right;\n    return py.factory.createMemberExpression(\n      leftNode,\n      py.factory.createIdentifier(value as string),\n    );\n  }\n\n  $validate(): asserts this is this & {\n    left: MaybePyDsl<py.Expression>;\n  } {\n    const missing = this.missingRequiredCalls();\n    if (missing.length === 0) return;\n    throw new Error(`Attribute access missing ${missing.join(' and ')}`);\n  }\n\n  private missingRequiredCalls(): ReadonlyArray<string> {\n    const missing: Array<string> = [];\n    if (!this.name.toString()) missing.push('property name');\n    return missing;\n  }\n}\n\nf.attr.set((...args) => new AttrPyDsl(...args));\n"
  },
  {
    "path": "packages/openapi-python/src/py-dsl/expr/binary.ts",
    "content": "import type { AnalysisContext, Ref } from '@hey-api/codegen-core';\nimport { ref } from '@hey-api/codegen-core';\n\nimport { py } from '../../py-compiler';\nimport type { MaybePyDsl } from '../base';\nimport { PyDsl } from '../base';\n\nexport type PyBinaryOperator =\n  | '+'\n  | '-'\n  | '*'\n  | '/'\n  | '//'\n  | '%'\n  | '**'\n  | '=='\n  | '!='\n  | '>'\n  | '>='\n  | '<'\n  | '<='\n  | 'is'\n  | 'is not'\n  | 'in'\n  | 'not in'\n  | 'and'\n  | 'or';\n\nconst Mixed = PyDsl<py.BinaryExpression>;\n\nexport class BinaryPyDsl extends Mixed {\n  readonly '~dsl' = 'BinaryPyDsl';\n\n  protected _left?: Ref<MaybePyDsl<py.Expression>>;\n  protected _op?: PyBinaryOperator;\n  protected _right?: Ref<MaybePyDsl<py.Expression>>;\n\n  constructor(\n    left: MaybePyDsl<py.Expression>,\n    op: PyBinaryOperator,\n    right: MaybePyDsl<py.Expression>,\n  ) {\n    super();\n    this._left = ref(left);\n    this._op = op;\n    this._right = ref(right);\n  }\n\n  override analyze(ctx: AnalysisContext): void {\n    super.analyze(ctx);\n    ctx.analyze(this._left);\n    ctx.analyze(this._right);\n  }\n\n  /** Returns true when all required builder calls are present. */\n  get isValid(): boolean {\n    return this.missingRequiredCalls().length === 0;\n  }\n\n  and(right: MaybePyDsl<py.Expression>): this {\n    return this.opAndExpr('and', right);\n  }\n\n  div(right: MaybePyDsl<py.Expression>): this {\n    return this.opAndExpr('/', right);\n  }\n\n  eq(right: MaybePyDsl<py.Expression>): this {\n    return this.opAndExpr('==', right);\n  }\n\n  floordiv(right: MaybePyDsl<py.Expression>): this {\n    return this.opAndExpr('//', right);\n  }\n\n  gt(right: MaybePyDsl<py.Expression>): this {\n    return this.opAndExpr('>', right);\n  }\n\n  gte(right: MaybePyDsl<py.Expression>): this {\n    return this.opAndExpr('>=', right);\n  }\n\n  in_(right: MaybePyDsl<py.Expression>): this {\n    return this.opAndExpr('in', right);\n  }\n\n  is(right: MaybePyDsl<py.Expression>): this {\n    return this.opAndExpr('is', right);\n  }\n\n  isNot(right: MaybePyDsl<py.Expression>): this {\n    return this.opAndExpr('is not', right);\n  }\n\n  lt(right: MaybePyDsl<py.Expression>): this {\n    return this.opAndExpr('<', right);\n  }\n\n  lte(right: MaybePyDsl<py.Expression>): this {\n    return this.opAndExpr('<=', right);\n  }\n\n  minus(right: MaybePyDsl<py.Expression>): this {\n    return this.opAndExpr('-', right);\n  }\n\n  mod(right: MaybePyDsl<py.Expression>): this {\n    return this.opAndExpr('%', right);\n  }\n\n  neq(right: MaybePyDsl<py.Expression>): this {\n    return this.opAndExpr('!=', right);\n  }\n\n  notIn(right: MaybePyDsl<py.Expression>): this {\n    return this.opAndExpr('not in', right);\n  }\n\n  or(right: MaybePyDsl<py.Expression>): this {\n    return this.opAndExpr('or', right);\n  }\n\n  plus(right: MaybePyDsl<py.Expression>): this {\n    return this.opAndExpr('+', right);\n  }\n\n  pow(right: MaybePyDsl<py.Expression>): this {\n    return this.opAndExpr('**', right);\n  }\n\n  times(right: MaybePyDsl<py.Expression>): this {\n    return this.opAndExpr('*', right);\n  }\n\n  override toAst() {\n    this.$validate();\n\n    return py.factory.createBinaryExpression(\n      this.$node(this._left!),\n      this._op!,\n      this.$node(this._right!),\n    );\n  }\n\n  $validate(): asserts this is this & {\n    _left: MaybePyDsl<py.Expression>;\n    _op: PyBinaryOperator;\n    _right: MaybePyDsl<py.Expression>;\n  } {\n    const missing = this.missingRequiredCalls();\n    if (missing.length === 0) return;\n    throw new Error(`Binary expression missing ${missing.join(' and ')}`);\n  }\n\n  private missingRequiredCalls(): ReadonlyArray<string> {\n    const missing: Array<string> = [];\n    if (!this._left) missing.push('left operand');\n    if (!this._op) missing.push('operator');\n    if (!this._right) missing.push('right operand');\n    return missing;\n  }\n\n  private opAndExpr(op: PyBinaryOperator, right: MaybePyDsl<py.Expression>): this {\n    this._right = ref(right);\n    this._op = op;\n    return this;\n  }\n}\n"
  },
  {
    "path": "packages/openapi-python/src/py-dsl/expr/call.ts",
    "content": "import type { AnalysisContext, NodeName, Ref } from '@hey-api/codegen-core';\nimport { ref } from '@hey-api/codegen-core';\n\nimport { py } from '../../py-compiler';\nimport type { MaybePyDsl } from '../base';\nimport { PyDsl } from '../base';\nimport { ArgsMixin } from '../mixins/args';\nimport { ExprMixin } from '../mixins/expr';\nimport { f } from '../utils/factories';\n\nexport type CallArgs = ReadonlyArray<CallCallee | undefined>;\nexport type CallCallee = NodeName | MaybePyDsl<py.Expression>;\nexport type CallCtor = (callee: CallCallee, ...args: CallArgs) => CallPyDsl;\n\nconst Mixed = ArgsMixin(ExprMixin(PyDsl<py.CallExpression>));\n\nexport class CallPyDsl extends Mixed {\n  readonly '~dsl' = 'CallPyDsl';\n\n  protected _callee: Ref<CallCallee>;\n\n  constructor(callee: CallCallee, ...args: CallArgs) {\n    super();\n    this._callee = ref(callee);\n    this.args(...args);\n  }\n\n  override analyze(ctx: AnalysisContext): void {\n    super.analyze(ctx);\n    ctx.analyze(this._callee);\n  }\n\n  /** Returns true when all required builder calls are present. */\n  get isValid(): boolean {\n    return this.missingRequiredCalls().length === 0;\n  }\n\n  override toAst() {\n    this.$validate();\n\n    return py.factory.createCallExpression(this.$node(this._callee!), this.$args());\n  }\n\n  $validate(): asserts this is this & {\n    _callee: MaybePyDsl<py.Expression>;\n  } {\n    const missing = this.missingRequiredCalls();\n    if (missing.length === 0) return;\n    throw new Error(`Call expression missing ${missing.join(' and ')}`);\n  }\n\n  private missingRequiredCalls(): ReadonlyArray<string> {\n    const missing: Array<string> = [];\n    if (!this._callee) missing.push('callee');\n    return missing;\n  }\n}\n\nf.call.set((...args) => new CallPyDsl(...args));\n"
  },
  {
    "path": "packages/openapi-python/src/py-dsl/expr/dict.ts",
    "content": "import type { AnalysisContext } from '@hey-api/codegen-core';\n\nimport { py } from '../../py-compiler';\nimport type { MaybePyDsl } from '../base';\nimport { PyDsl } from '../base';\nimport { LayoutMixin } from '../mixins/layout';\n\nconst Mixed = LayoutMixin(PyDsl<py.DictExpression>);\n\nexport class DictPyDsl extends Mixed {\n  readonly '~dsl' = 'DictPyDsl';\n\n  protected _entries: Array<{\n    key: MaybePyDsl<py.Expression>;\n    value: MaybePyDsl<py.Expression>;\n  }> = [];\n\n  constructor(\n    ...entries: Array<{ key: MaybePyDsl<py.Expression>; value: MaybePyDsl<py.Expression> }>\n  ) {\n    super();\n    this._entries = entries;\n  }\n\n  override analyze(ctx: AnalysisContext): void {\n    super.analyze(ctx);\n    for (const entry of this._entries) {\n      ctx.analyze(entry.key);\n      ctx.analyze(entry.value);\n    }\n  }\n\n  entry(key: MaybePyDsl<py.Expression>, value: MaybePyDsl<py.Expression>): this {\n    this._entries.push({ key, value });\n    return this;\n  }\n\n  entries(\n    ...entries: ReadonlyArray<{ key: MaybePyDsl<py.Expression>; value: MaybePyDsl<py.Expression> }>\n  ): this {\n    this._entries.push(...entries);\n    return this;\n  }\n\n  override toAst() {\n    const astEntries = this._entries.map((entry) => ({\n      key: this.$node(entry.key),\n      value: this.$node(entry.value),\n    }));\n    return py.factory.createDictExpression(astEntries);\n  }\n}\n"
  },
  {
    "path": "packages/openapi-python/src/py-dsl/expr/expr.ts",
    "content": "import type { AnalysisContext, NodeName, Ref } from '@hey-api/codegen-core';\nimport { isNode, isSymbol, ref } from '@hey-api/codegen-core';\n\nimport type { py } from '../../py-compiler';\nimport type { MaybePyDsl } from '../base';\nimport { PyDsl } from '../base';\nimport { ExprMixin } from '../mixins/expr';\n\ntype Id = NodeName | MaybePyDsl<py.Expression>;\n\nconst Mixed = ExprMixin(PyDsl<py.Expression>);\n\nexport class ExprPyDsl extends Mixed {\n  readonly '~dsl' = 'ExprPyDsl';\n\n  protected _exprInput: Ref<Id>;\n\n  constructor(id: Id) {\n    super();\n    this._exprInput = ref(id);\n    if (typeof id === 'string' || isSymbol(id)) {\n      this.name.set(id);\n    } else if (isNode(id)) {\n      this.name.set(id.name);\n    }\n  }\n\n  override analyze(ctx: AnalysisContext): void {\n    super.analyze(ctx);\n    ctx.analyze(this._exprInput);\n  }\n\n  override toAst() {\n    return this.$node(this._exprInput);\n  }\n}\n"
  },
  {
    "path": "packages/openapi-python/src/py-dsl/expr/identifier.ts",
    "content": "import type { AnalysisContext, NodeName } from '@hey-api/codegen-core';\n\nimport { py } from '../../py-compiler';\nimport { PyDsl } from '../base';\n\nconst Mixed = PyDsl<py.Identifier>;\n\nexport class IdPyDsl extends Mixed {\n  readonly '~dsl' = 'IdPyDsl';\n\n  constructor(name: NodeName) {\n    super();\n    this.name.set(name);\n  }\n\n  override analyze(ctx: AnalysisContext): void {\n    super.analyze(ctx);\n    ctx.analyze(this.name);\n  }\n\n  override toAst() {\n    return py.factory.createIdentifier(this.name.toString());\n  }\n}\n"
  },
  {
    "path": "packages/openapi-python/src/py-dsl/expr/kwarg.ts",
    "content": "import type { NodeName } from '@hey-api/codegen-core';\n\nimport { py } from '../../py-compiler';\nimport type { MaybePyDsl } from '../base';\nimport { PyDsl } from '../base';\n\nexport type KwargValue = string | number | boolean | null | MaybePyDsl<py.Expression>;\n\nexport class KwargPyDsl extends PyDsl<py.KeywordArgument> {\n  readonly '~dsl' = 'KwargPyDsl';\n\n  protected _value: KwargValue;\n\n  constructor(name: NodeName, value: KwargValue) {\n    super();\n    this.name.set(name);\n    this._value = value;\n  }\n\n  override toAst() {\n    const name = this.name.toString();\n    return py.factory.createKeywordArgument(name, this.$valueToNode(this._value));\n  }\n\n  private $valueToNode(value: KwargValue) {\n    if (\n      typeof value === 'string' ||\n      typeof value === 'number' ||\n      typeof value === 'boolean' ||\n      value === null\n    ) {\n      return py.factory.createLiteral(value);\n    }\n    return this.$node(value);\n  }\n}\n"
  },
  {
    "path": "packages/openapi-python/src/py-dsl/expr/list.ts",
    "content": "import type { AnalysisContext } from '@hey-api/codegen-core';\n\nimport { py } from '../../py-compiler';\nimport type { MaybePyDsl } from '../base';\nimport { PyDsl } from '../base';\nimport { LayoutMixin } from '../mixins/layout';\n\nconst Mixed = LayoutMixin(PyDsl<py.ListExpression>);\n\nexport class ListPyDsl extends Mixed {\n  readonly '~dsl' = 'ListPyDsl';\n\n  protected _elements: Array<MaybePyDsl<py.Expression>> = [];\n\n  constructor(...elements: Array<MaybePyDsl<py.Expression>>) {\n    super();\n    this._elements = elements;\n  }\n\n  override analyze(ctx: AnalysisContext): void {\n    super.analyze(ctx);\n    for (const el of this._elements) {\n      ctx.analyze(el);\n    }\n  }\n\n  element(expr: MaybePyDsl<py.Expression>): this {\n    this._elements.push(expr);\n    return this;\n  }\n\n  elements(...exprs: ReadonlyArray<MaybePyDsl<py.Expression>>): this {\n    this._elements.push(...exprs);\n    return this;\n  }\n\n  override toAst() {\n    const astElements = this._elements.map((el) => this.$node(el));\n    return py.factory.createListExpression(astElements);\n  }\n}\n"
  },
  {
    "path": "packages/openapi-python/src/py-dsl/expr/literal.ts",
    "content": "import type { AnalysisContext } from '@hey-api/codegen-core';\n\nimport { py } from '../../py-compiler';\nimport { PyDsl } from '../base';\n\nconst Mixed = PyDsl<py.Literal>;\n\nexport class LiteralPyDsl extends Mixed {\n  readonly '~dsl' = 'LiteralPyDsl';\n\n  protected value: py.LiteralValue;\n\n  constructor(value: py.LiteralValue) {\n    super();\n    this.value = value;\n  }\n\n  override analyze(_ctx: AnalysisContext): void {\n    super.analyze(_ctx);\n  }\n\n  override toAst() {\n    return py.factory.createLiteral(this.value);\n  }\n}\n"
  },
  {
    "path": "packages/openapi-python/src/py-dsl/expr/set.ts",
    "content": "import type { AnalysisContext } from '@hey-api/codegen-core';\n\nimport { py } from '../../py-compiler';\nimport type { MaybePyDsl } from '../base';\nimport { PyDsl } from '../base';\nimport { LayoutMixin } from '../mixins/layout';\n\nconst Mixed = LayoutMixin(PyDsl<py.SetExpression>);\n\nexport class SetPyDsl extends Mixed {\n  readonly '~dsl' = 'SetPyDsl';\n\n  protected _elements: Array<MaybePyDsl<py.Expression>> = [];\n\n  constructor(...elements: Array<MaybePyDsl<py.Expression>>) {\n    super();\n    this._elements = elements;\n  }\n\n  override analyze(ctx: AnalysisContext): void {\n    super.analyze(ctx);\n    for (const el of this._elements) {\n      ctx.analyze(el);\n    }\n  }\n\n  element(expr: MaybePyDsl<py.Expression>): this {\n    this._elements.push(expr);\n    return this;\n  }\n\n  elements(...exprs: ReadonlyArray<MaybePyDsl<py.Expression>>): this {\n    this._elements.push(...exprs);\n    return this;\n  }\n\n  override toAst() {\n    const astElements = this._elements.map((el) => this.$node(el));\n    return py.factory.createSetExpression(astElements);\n  }\n}\n"
  },
  {
    "path": "packages/openapi-python/src/py-dsl/expr/subscript.ts",
    "content": "import type { AnalysisContext, NodeName, Ref } from '@hey-api/codegen-core';\nimport { ref } from '@hey-api/codegen-core';\n\nimport { py } from '../../py-compiler';\nimport { PyDsl } from '../base';\nimport { LayoutMixin } from '../mixins/layout';\nimport { f } from '../utils/factories';\n\nexport type SubscriptExpr = NodeName | PyDsl<py.Expression>;\nexport type SubscriptCtor = (\n  value: SubscriptExpr,\n  ...slices: Array<SubscriptExpr>\n) => SubscriptPyDsl;\n\nconst Mixed = LayoutMixin(PyDsl<py.SubscriptExpression>);\n\nexport class SubscriptPyDsl extends Mixed {\n  readonly '~dsl' = 'SubscriptPyDsl';\n\n  protected _slices: Array<Ref<SubscriptExpr>>;\n  protected _value: Ref<SubscriptExpr>;\n\n  constructor(value: SubscriptExpr, ...slices: Array<SubscriptExpr>) {\n    super();\n    this._slices = slices.map((slice) => ref(slice));\n    this._value = ref(value);\n  }\n\n  override analyze(ctx: AnalysisContext): void {\n    super.analyze(ctx);\n    ctx.analyze(this._value);\n    for (const slice of this._slices) {\n      ctx.analyze(slice);\n    }\n  }\n\n  override toAst() {\n    const slice =\n      this._slices.length === 1\n        ? this.$node(this._slices[0]!)\n        : py.factory.createSubscriptSlice(this._slices.map((s) => this.$node(s)));\n    return py.factory.createSubscriptExpression(this.$node(this._value), slice);\n  }\n}\n\nf.slice.set((...args) => new SubscriptPyDsl(...args));\n"
  },
  {
    "path": "packages/openapi-python/src/py-dsl/expr/tuple.ts",
    "content": "import type { AnalysisContext, NodeName, Ref } from '@hey-api/codegen-core';\nimport { ref } from '@hey-api/codegen-core';\n\nimport { py } from '../../py-compiler';\nimport type { MaybePyDsl } from '../base';\nimport { PyDsl } from '../base';\nimport { LayoutMixin } from '../mixins/layout';\n\nexport type TupleElement = NodeName | MaybePyDsl<py.Expression>;\n\nconst Mixed = LayoutMixin(PyDsl<py.TupleExpression>);\n\nexport class TuplePyDsl extends Mixed {\n  readonly '~dsl' = 'TuplePyDsl';\n\n  protected _elements: Array<Ref<TupleElement>> = [];\n\n  constructor(...elements: Array<TupleElement>) {\n    super();\n    this._elements = elements.map((element) => ref(element));\n  }\n\n  override analyze(ctx: AnalysisContext): void {\n    super.analyze(ctx);\n    for (const el of this._elements) {\n      ctx.analyze(el);\n    }\n  }\n\n  element(expr: TupleElement): this {\n    this._elements.push(ref(expr));\n    return this;\n  }\n\n  elements(...exprs: ReadonlyArray<TupleElement>): this {\n    this._elements.push(...exprs.map((expr) => ref(expr)));\n    return this;\n  }\n\n  override toAst() {\n    const astElements = this._elements.map((el) => this.$node(el));\n    return py.factory.createTupleExpression(astElements);\n  }\n}\n"
  },
  {
    "path": "packages/openapi-python/src/py-dsl/index.ts",
    "content": "import type { NodeName } from '@hey-api/codegen-core';\n\nimport type { py } from '../py-compiler';\nimport { ClassPyDsl } from './decl/class';\n// import { DecoratorPyDsl } from './decl/decorator';\n// import { EnumPyDsl } from './decl/enum';\n// import { FieldPyDsl } from './decl/field';\nimport { FuncPyDsl } from './decl/func';\nimport { ParamPyDsl } from './decl/param';\n// import { GetterPyDsl } from './decl/getter';\n// import { InitPyDsl } from './decl/init';\n// import { EnumMemberPyDsl } from './decl/member';\n// import { MethodPyDsl } from './decl/method';\n// import { PatternPyDsl } from './decl/pattern';\n// import { SetterPyDsl } from './decl/setter';\n// import { ArrayPyDsl } from './expr/array';\n// import { AsPyDsl } from './expr/as';\nimport { AttrPyDsl } from './expr/attr';\n// import { AwaitPyDsl } from './expr/await';\nimport { BinaryPyDsl } from './expr/binary';\nimport { CallPyDsl } from './expr/call';\nimport { DictPyDsl } from './expr/dict';\nimport { ExprPyDsl } from './expr/expr';\n// import { fromValue as exprValue } from './expr/fromValue';\nimport { IdPyDsl } from './expr/identifier';\nimport { KwargPyDsl } from './expr/kwarg';\nimport { ListPyDsl } from './expr/list';\nimport { LiteralPyDsl } from './expr/literal';\n// import { NewPyDsl } from './expr/new';\n// import { ObjectPyDsl } from './expr/object';\n// import { PrefixPyDsl } from './expr/prefix';\n// import { ObjectPropPyDsl } from './expr/prop';\n// import { RegExpPyDsl } from './expr/regexp';\nimport { SetPyDsl } from './expr/set';\nimport { SubscriptPyDsl } from './expr/subscript';\n// import { TemplatePyDsl } from './expr/template';\n// import { TernaryPyDsl } from './expr/ternary';\nimport { TuplePyDsl } from './expr/tuple';\n// import { TypeOfExprPyDsl } from './expr/typeof';\nimport { DocPyDsl } from './layout/doc';\nimport { HintPyDsl } from './layout/hint';\nimport { NewlinePyDsl } from './layout/newline';\nimport { BlockPyDsl } from './stmt/block';\nimport { BreakPyDsl } from './stmt/break';\nimport { ContinuePyDsl } from './stmt/continue';\nimport { ForPyDsl } from './stmt/for';\nimport { IfPyDsl } from './stmt/if';\nimport { ImportPyDsl } from './stmt/import';\nimport { RaisePyDsl } from './stmt/raise';\nimport { ReturnPyDsl } from './stmt/return';\nimport { StmtPyDsl } from './stmt/stmt';\nimport { TryPyDsl } from './stmt/try';\nimport { VarPyDsl } from './stmt/var';\nimport { WhilePyDsl } from './stmt/while';\nimport { WithPyDsl } from './stmt/with';\n// import { TokenPyDsl } from './token';\n// import { TypeAliasPyDsl } from './type/alias';\n// import { TypeAndPyDsl } from './type/and';\n// import { TypeAttrPyDsl } from './type/attr';\n// import { TypeExprPyDsl } from './type/expr';\n// import { fromValue as typeValue } from './type/fromValue';\n// import { TypeFuncPyDsl } from './type/func';\n// import { TypeIdxPyDsl } from './type/idx';\n// import { TypeLiteralPyDsl } from './type/literal';\n// import { TypeMappedPyDsl } from './type/mapped';\n// import { TypeObjectPyDsl } from './type/object';\n// import { TypeOperatorPyDsl } from './type/operator';\n// import { TypeOrPyDsl } from './type/or';\n// import { TypeParamPyDsl } from './type/param';\n// import { TypeQueryPyDsl } from './type/query';\n// import { TypeTemplatePyDsl } from './type/template';\n// import { TypeTuplePyDsl } from './type/tuple';\nimport { LazyPyDsl } from './utils/lazy';\nimport { safeKeywordName } from './utils/name';\n\nconst pyDsl = {\n  /** Creates an array literal expression (e.g. `[1, 2, 3]`). */\n  // array: (...args: ConstructorParameters<typeof ArrayTsDsl>) => new ArrayTsDsl(...args),\n  /** Creates an `as` type assertion expression (e.g. `value as Type`). */\n  // as: (...args: ConstructorParameters<typeof AsTsDsl>) => new AsTsDsl(...args),\n\n  /** Creates a property access expression (e.g. `obj.foo`). */\n  attr: (...args: ConstructorParameters<typeof AttrPyDsl>) => new AttrPyDsl(...args),\n\n  /** Creates an await expression (e.g. `await promise`). */\n  // await: (...args: ConstructorParameters<typeof AwaitTsDsl>) => new AwaitTsDsl(...args),\n\n  /** Creates a binary expression (e.g. `a + b`). */\n  binary: (...args: ConstructorParameters<typeof BinaryPyDsl>) => new BinaryPyDsl(...args),\n\n  /** Creates a statement block. */\n  block: (...args: ConstructorParameters<typeof BlockPyDsl>) => new BlockPyDsl(...args),\n\n  /** Creates a break statement. */\n  break: (...args: ConstructorParameters<typeof BreakPyDsl>) => new BreakPyDsl(...args),\n\n  /** Creates a function or method call expression (e.g. `fn(arg)`). */\n  call: (...args: ConstructorParameters<typeof CallPyDsl>) => new CallPyDsl(...args),\n\n  /** Creates a class declaration or expression. */\n  class: (...args: ConstructorParameters<typeof ClassPyDsl>) => new ClassPyDsl(...args),\n\n  /** Creates a continue statement. */\n  continue: (...args: ConstructorParameters<typeof ContinuePyDsl>) => new ContinuePyDsl(...args),\n\n  /** Creates a decorator expression (e.g. `@decorator`). */\n  // decorator: (...args: ConstructorParameters<typeof DecoratorTsDsl>) => new DecoratorTsDsl(...args),\n\n  /** Creates a dictionary expression (e.g. `{ 'a': 1 }`). */\n  dict: (...args: ConstructorParameters<typeof DictPyDsl>) => new DictPyDsl(...args),\n\n  /** Creates a Python docstring (`\"\"\"...\"\"\"`). */\n  doc: (...args: ConstructorParameters<typeof DocPyDsl>) => new DocPyDsl(...args),\n\n  /** Creates an enum declaration. */\n  // enum: (...args: ConstructorParameters<typeof EnumTsDsl>) => new EnumTsDsl(...args),\n\n  /** Creates a general expression node. */\n  expr: (...args: ConstructorParameters<typeof ExprPyDsl>) => new ExprPyDsl(...args),\n\n  /** Creates a field declaration in a class or object. */\n  // field: (...args: ConstructorParameters<typeof FieldTsDsl>) => new FieldTsDsl(...args),\n\n  /** Creates a for statement (e.g. `for x in items:`). */\n  for: (...args: ConstructorParameters<typeof ForPyDsl>) => new ForPyDsl(...args),\n\n  /** Converts a runtime value into a corresponding expression node. */\n  // fromValue: (...args: Parameters<typeof exprValue>) => exprValue(...args),\n\n  /** Creates a function declaration. */\n  func: ((name: NodeName, fn?: (f: FuncPyDsl) => void) => new FuncPyDsl(name, fn)) as {\n    (name: NodeName): FuncPyDsl;\n    (name: NodeName, fn: (f: FuncPyDsl) => void): FuncPyDsl;\n  },\n\n  /** Creates a getter method declaration. */\n  // getter: (...args: ConstructorParameters<typeof GetterTsDsl>) => new GetterTsDsl(...args),\n\n  /** Creates a Python comment (`# ...`). */\n  hint: (...args: ConstructorParameters<typeof HintPyDsl>) => new HintPyDsl(...args),\n\n  /** Creates an identifier (e.g. `foo`). */\n  id: (...args: ConstructorParameters<typeof IdPyDsl>) => new IdPyDsl(...args),\n\n  /** Creates an if statement. */\n  if: (...args: ConstructorParameters<typeof IfPyDsl>) => new IfPyDsl(...args),\n\n  /** Creates an import statement. */\n  import: (...args: ConstructorParameters<typeof ImportPyDsl>) => new ImportPyDsl(...args),\n\n  /** Creates an initialization block or statement. */\n  // init: (...args: ConstructorParameters<typeof InitTsDsl>) => new InitTsDsl(...args),\n\n  /** Creates a keyword argument expression (e.g. `name=value`). */\n  kwarg: (...args: ConstructorParameters<typeof KwargPyDsl>) => new KwargPyDsl(...args),\n\n  /** Creates a lazy, context-aware node with deferred evaluation. */\n  lazy: <T extends py.Node>(...args: ConstructorParameters<typeof LazyPyDsl<T>>) =>\n    new LazyPyDsl<T>(...args),\n\n  /** Creates a list expression (e.g. `[1, 2, 3]`). */\n  list: (...args: ConstructorParameters<typeof ListPyDsl>) => new ListPyDsl(...args),\n\n  /** Creates a literal value (e.g. string, number, boolean). */\n  literal: (...args: ConstructorParameters<typeof LiteralPyDsl>) => new LiteralPyDsl(...args),\n\n  /** Creates an enum member declaration. */\n  // member: (...args: ConstructorParameters<typeof EnumMemberTsDsl>) => new EnumMemberTsDsl(...args),\n\n  /** Creates a class method declaration. */\n  method: ((name: NodeName, fn?: (f: FuncPyDsl) => void) =>\n    new FuncPyDsl(name, fn, { nameSanitizer: safeKeywordName })) as {\n    (name: NodeName): FuncPyDsl;\n    (name: NodeName, fn: (f: FuncPyDsl) => void): FuncPyDsl;\n  },\n\n  /** Creates a negation expression (`-x`). */\n  // neg: (...args: ConstructorParameters<typeof PrefixTsDsl>) => new PrefixTsDsl(...args).neg(),\n\n  /** Creates a new expression (e.g. `new ClassName()`). */\n  // new: (...args: ConstructorParameters<typeof NewTsDsl>) => new NewTsDsl(...args),\n\n  /** Creates a newline (for formatting purposes). */\n  newline: (...args: ConstructorParameters<typeof NewlinePyDsl>) => new NewlinePyDsl(...args),\n\n  /** Creates a logical NOT expression (`!x`). */\n  // not: (...args: ConstructorParameters<typeof PrefixTsDsl>) => new PrefixTsDsl(...args).not(),\n\n  /** Creates an object literal expression. */\n  // object: (...args: ConstructorParameters<typeof ObjectTsDsl>) => new ObjectTsDsl(...args),\n\n  /** Creates a parameter declaration for functions or methods. */\n  param: (...args: ConstructorParameters<typeof ParamPyDsl>) => new ParamPyDsl(...args),\n\n  /** Creates a pattern for destructuring or matching. */\n  // pattern: (...args: ConstructorParameters<typeof PatternTsDsl>) => new PatternTsDsl(...args),\n\n  /** Creates a prefix unary expression (e.g. `-x`, `!x`, `~x`). */\n  // prefix: (...args: ConstructorParameters<typeof PrefixTsDsl>) => new PrefixTsDsl(...args),\n\n  /** Creates an object literal property (e.g. `{ foo: bar }`). */\n  // prop: (...args: ConstructorParameters<typeof ObjectPropTsDsl>) => new ObjectPropTsDsl(...args),\n\n  /** Creates a raise statement. */\n  raise: (...args: ConstructorParameters<typeof RaisePyDsl>) => new RaisePyDsl(...args),\n\n  /** Creates a regular expression literal (e.g. `/foo/gi`). */\n  // regexp: (...args: ConstructorParameters<typeof RegExpTsDsl>) => new RegExpTsDsl(...args),\n\n  /** Creates a return statement. */\n  return: (...args: ConstructorParameters<typeof ReturnPyDsl>) => new ReturnPyDsl(...args),\n\n  /** Creates a set expression (e.g. `{1, 2, 3}`). */\n  set: (...args: ConstructorParameters<typeof SetPyDsl>) => new SetPyDsl(...args),\n\n  /** Creates a setter method declaration. */\n  // setter: (...args: ConstructorParameters<typeof SetterTsDsl>) => new SetterTsDsl(...args),\n\n  /** Wraps an expression or statement-like value into a `StmtPyDsl`. */\n  stmt: (...args: ConstructorParameters<typeof StmtPyDsl>) => new StmtPyDsl(...args),\n\n  /** Creates a subscript expression (e.g. `obj[index]` or `Type[Param]`). */\n  subscript: (...args: ConstructorParameters<typeof SubscriptPyDsl>) => new SubscriptPyDsl(...args),\n\n  /** Creates a template literal expression. */\n  // template: (...args: ConstructorParameters<typeof TemplateTsDsl>) => new TemplateTsDsl(...args),\n\n  /** Creates a ternary conditional expression (if ? then : else). */\n  // ternary: (...args: ConstructorParameters<typeof TernaryTsDsl>) => new TernaryTsDsl(...args),\n\n  // /** Creates a throw statement. */\n  // throw: (...args: ConstructorParameters<typeof ThrowTsDsl>) => new ThrowTsDsl(...args),\n\n  /** Creates a syntax token (e.g. `?`, `readonly`, `+`, `-`). */\n  // token: (...args: ConstructorParameters<typeof TokenTsDsl>) => new TokenTsDsl(...args),\n\n  /** Creates a try/except/finally statement. */\n  try: (...args: ConstructorParameters<typeof TryPyDsl>) => new TryPyDsl(...args),\n\n  /** Creates a tuple expression (e.g. `(1, 2, 3)`). */\n  tuple: (...args: ConstructorParameters<typeof TuplePyDsl>) => new TuplePyDsl(...args),\n\n  /** Creates a basic type reference or type expression (e.g. Foo or Foo<T>). */\n  // type: Object.assign(\n  //   (...args: ConstructorParameters<typeof TypeExprTsDsl>) => new TypeExprTsDsl(...args),\n  //   {\n  /** Creates a type alias declaration (e.g. `type Foo = Bar`). */\n  // alias: (...args: ConstructorParameters<typeof TypeAliasTsDsl>) => new TypeAliasTsDsl(...args),\n  /** Creates an intersection type (e.g. `A & B`). */\n  // and: (...args: ConstructorParameters<typeof TypeAndTsDsl>) => new TypeAndTsDsl(...args),\n  /** Creates a qualified type reference (e.g. Foo.Bar). */\n  // attr: (...args: ConstructorParameters<typeof TypeAttrTsDsl>) => new TypeAttrTsDsl(...args),\n  /** Creates a basic type reference or type expression (e.g. Foo or Foo<T>). */\n  // expr: (...args: ConstructorParameters<typeof TypeExprTsDsl>) => new TypeExprTsDsl(...args),\n  /** Converts a runtime value into a corresponding type expression node. */\n  // fromValue: (...args: Parameters<typeof typeValue>) => typeValue(...args),\n  /** Creates a function type node (e.g. `(a: string) => number`). */\n  // func: (...args: ConstructorParameters<typeof TypeFuncTsDsl>) => new TypeFuncTsDsl(...args),\n  /** Creates an indexed-access type (e.g. `Foo<T>[K]`). */\n  // idx: (...args: ConstructorParameters<typeof TypeIdxTsDsl>) => new TypeIdxTsDsl(...args),\n  /** Creates a literal type node (e.g. 'foo', 42, or true). */\n  // literal: (...args: ConstructorParameters<typeof TypeLiteralTsDsl>) =>\n  //   new TypeLiteralTsDsl(...args),\n  /** Creates a mapped type (e.g. `{ [K in keyof T]: U }`). */\n  // mapped: (...args: ConstructorParameters<typeof TypeMappedTsDsl>) =>\n  //   new TypeMappedTsDsl(...args),\n  /** Creates a type literal node (e.g. { foo: string }). */\n  // object: (...args: ConstructorParameters<typeof TypeObjectTsDsl>) =>\n  //   new TypeObjectTsDsl(...args),\n  /** Creates a type operator node (e.g. `readonly T`, `keyof T`, `unique T`). */\n  // operator: (...args: ConstructorParameters<typeof TypeOperatorTsDsl>) =>\n  //   new TypeOperatorTsDsl(...args),\n  /** Represents a union type (e.g. `A | B | C`). */\n  // or: (...args: ConstructorParameters<typeof TypeOrTsDsl>) => new TypeOrTsDsl(...args),\n  /** Creates a type parameter (e.g. `<T>`). */\n  // param: (...args: ConstructorParameters<typeof TypeParamTsDsl>) => new TypeParamTsDsl(...args),\n  /** Creates a type query node (e.g. `typeof Foo`). */\n  // query: (...args: ConstructorParameters<typeof TypeQueryTsDsl>) => new TypeQueryTsDsl(...args),\n  /** Builds a TypeScript template literal *type* (e.g. `${Foo}-${Bar}` as a type). */\n  // template: (...args: ConstructorParameters<typeof TypeTemplateTsDsl>) =>\n  //   new TypeTemplateTsDsl(...args),\n  /** Creates a tuple type (e.g. [A, B, C]). */\n  // tuple: (...args: ConstructorParameters<typeof TypeTupleTsDsl>) => new TypeTupleTsDsl(...args),\n  // },\n  // ),\n  /** Creates a `typeof` expression (e.g. `typeof value`). */\n  // typeofExpr: (...args: ConstructorParameters<typeof TypeOfExprTsDsl>) =>\n  //   new TypeOfExprTsDsl(...args),\n\n  /** Creates a variable assignment. */\n  var: (...args: ConstructorParameters<typeof VarPyDsl>) => new VarPyDsl(...args),\n\n  /** Creates a while statement (e.g. `while x:`). */\n  while: (...args: ConstructorParameters<typeof WhilePyDsl>) => new WhilePyDsl(...args),\n\n  /** Creates a with statement (e.g. `with open(f) as file:`). */\n  with: (...args: ConstructorParameters<typeof WithPyDsl>) => new WithPyDsl(...args),\n};\n\nexport const $ = Object.assign(\n  (...args: ConstructorParameters<typeof ExprPyDsl>) => new ExprPyDsl(...args),\n  pyDsl,\n);\n\nexport type DollarPyDsl = {\n  /**\n   * Entry point to the Python DSL.\n   *\n   * `$` creates a general expression node by default, but also exposes\n   * builders for all other constructs.\n   *\n   * Example:\n   * ```ts\n   * const node = $('console').attr('log').call($.literal('Hello'));\n   * ```\n   *\n   * Returns:\n   * - A new `ExprPyDsl` instance when called directly.\n   * - The `pyDsl` object for constructing more specific nodes.\n   */\n  $: typeof $;\n};\n\nexport type { MaybePyDsl } from './base';\n// export type { MaybePyDsl, TypePyDsl } from './base';\nexport { PyDsl } from './base';\nexport type { CallArgs } from './expr/call';\nexport type { VarType } from './stmt/var';\nexport type { ExampleOptions } from './utils/context';\nexport { ctx, PyDslContext } from './utils/context';\nexport { keywords } from './utils/keywords';\nexport { regexp } from './utils/regexp';\nexport { PythonRenderer } from './utils/render';\nexport { reserved } from './utils/reserved';\n"
  },
  {
    "path": "packages/openapi-python/src/py-dsl/layout/doc.ts",
    "content": "import type { AnalysisContext } from '@hey-api/codegen-core';\nimport type { MaybeArray } from '@hey-api/types';\n\nimport { py } from '../../py-compiler';\nimport { PyDsl } from '../base';\nimport type { PyDslContext } from '../utils/context';\nimport { ctx } from '../utils/context';\n\ntype DocMaybeLazy<T> = ((ctx: PyDslContext) => T) | T;\nexport type DocFn = (d: DocPyDsl) => void;\nexport type DocLines = DocMaybeLazy<MaybeArray<string>>;\n\nexport class DocPyDsl extends PyDsl<py.Comment> {\n  readonly '~dsl' = 'DocPyDsl';\n\n  protected _lines: Array<DocLines> = [];\n\n  constructor(lines?: DocLines, fn?: DocFn) {\n    super();\n    if (lines) this.add(lines);\n    fn?.(this);\n  }\n\n  override analyze(ctx: AnalysisContext): void {\n    super.analyze(ctx);\n  }\n\n  add(lines: DocLines): this {\n    this._lines.push(lines);\n    return this;\n  }\n\n  resolve(): string | undefined {\n    const lines = this._lines.reduce((lines: Array<string>, line: DocLines) => {\n      if (typeof line === 'function') line = line(ctx);\n      for (const l of typeof line === 'string' ? [line] : line) {\n        if (l || l === '') lines.push(l);\n      }\n      return lines;\n    }, []);\n    if (!lines.length) return;\n    return lines.join('\\n');\n  }\n\n  override toAst() {\n    // Return a dummy comment node for compliance.\n    return py.factory.createComment(this.resolve() ?? '');\n    // return this.$node(new IdTsDsl(''));\n  }\n}\n"
  },
  {
    "path": "packages/openapi-python/src/py-dsl/layout/hint.ts",
    "content": "import type { AnalysisContext } from '@hey-api/codegen-core';\nimport type { MaybeArray } from '@hey-api/types';\n\nimport { py } from '../../py-compiler';\nimport { PyDsl } from '../base';\nimport type { PyDslContext } from '../utils/context';\nimport { ctx } from '../utils/context';\n\ntype HintMaybeLazy<T> = ((ctx: PyDslContext) => T) | T;\nexport type HintFn = (d: HintPyDsl) => void;\nexport type HintLines = HintMaybeLazy<MaybeArray<string>>;\n\nexport class HintPyDsl extends PyDsl<py.Comment> {\n  readonly '~dsl' = 'HintPyDsl';\n\n  protected _lines: Array<HintLines> = [];\n\n  constructor(lines?: HintLines, fn?: HintFn) {\n    super();\n    if (lines) this.add(lines);\n    fn?.(this);\n  }\n\n  override analyze(ctx: AnalysisContext): void {\n    super.analyze(ctx);\n  }\n\n  add(lines: HintLines): this {\n    this._lines.push(lines);\n    return this;\n  }\n\n  apply<T extends py.Node>(node: T): T {\n    const lines = this._resolveLines();\n    if (!lines.length) return node;\n\n    const existing = node.leadingComments ? [...node.leadingComments] : [];\n    existing.push(...lines);\n    node.leadingComments = existing;\n    return node;\n  }\n\n  override toAst() {\n    // Return a dummy comment node for compliance.\n    const lines = this._resolveLines();\n    return py.factory.createComment(lines.join('\\n'));\n  }\n\n  private _resolveLines(): Array<string> {\n    return this._lines.reduce((lines: Array<string>, line: HintLines) => {\n      if (typeof line === 'function') line = line(ctx);\n      for (const l of typeof line === 'string' ? [line] : line) {\n        if (l || l === '') lines.push(l);\n      }\n      return lines;\n    }, []);\n  }\n}\n"
  },
  {
    "path": "packages/openapi-python/src/py-dsl/layout/newline.ts",
    "content": "import type { AnalysisContext } from '@hey-api/codegen-core';\n\nimport { py } from '../../py-compiler';\nimport { PyDsl } from '../base';\n\nexport class NewlinePyDsl extends PyDsl<py.EmptyStatement> {\n  readonly '~dsl' = 'NewlinePyDsl';\n\n  override analyze(ctx: AnalysisContext): void {\n    super.analyze(ctx);\n  }\n\n  override toAst() {\n    return py.factory.createEmptyStatement();\n  }\n}\n"
  },
  {
    "path": "packages/openapi-python/src/py-dsl/mixins/args.ts",
    "content": "import type { AnalysisContext, Node, NodeName, Ref } from '@hey-api/codegen-core';\nimport { ref } from '@hey-api/codegen-core';\n\nimport type { py } from '../../py-compiler';\nimport type { MaybePyDsl } from '../base';\nimport type { BaseCtor, MixinCtor } from './types';\n\ntype Arg = NodeName | MaybePyDsl<py.Expression>;\n\nexport interface ArgsMethods extends Node {\n  /** Renders the arguments into an array of `Expression`s. */\n  $args(): ReadonlyArray<py.Expression>;\n  /** Adds a single expression argument. */\n  arg(arg: Arg | undefined): this;\n  /** Adds one or more expression arguments. */\n  args(...args: ReadonlyArray<Arg | undefined>): this;\n}\n\n/**\n * Adds `.arg()` and `.args()` for managing expression arguments in call-like nodes.\n */\nexport function ArgsMixin<T extends py.Node, TBase extends BaseCtor<T>>(Base: TBase) {\n  abstract class Args extends Base {\n    protected _args: Array<Ref<Arg>> = [];\n\n    override analyze(ctx: AnalysisContext): void {\n      super.analyze(ctx);\n      for (const arg of this._args) {\n        ctx.analyze(arg);\n      }\n    }\n\n    protected arg(arg: Arg | undefined): this {\n      if (arg !== undefined) this._args.push(ref(arg));\n      return this;\n    }\n\n    protected args(...args: ReadonlyArray<Arg | undefined>): this {\n      this._args.push(\n        ...args.filter((a): a is NonNullable<typeof a> => a !== undefined).map((a) => ref(a)),\n      );\n      return this;\n    }\n\n    protected $args(): ReadonlyArray<py.Expression> {\n      return this.$node(this._args).map((arg) => this.$node(arg));\n    }\n  }\n\n  return Args as unknown as MixinCtor<TBase, ArgsMethods>;\n}\n"
  },
  {
    "path": "packages/openapi-python/src/py-dsl/mixins/decorator.ts",
    "content": "import type { AnalysisContext, NodeName, Ref } from '@hey-api/codegen-core';\nimport { ref } from '@hey-api/codegen-core';\n\nimport { py } from '../../py-compiler';\nimport type { MaybePyDsl } from '../base';\nimport type { BaseCtor, MixinCtor } from './types';\n\ntype DecoratorArg = MaybePyDsl<py.Expression>;\ntype DecoratorName = NodeName | MaybePyDsl<py.Expression>;\n\nexport interface DecoratorMethods extends Node {\n  $decorators(): ReadonlyArray<py.Expression>;\n  decorator(name: DecoratorName, ...args: ReadonlyArray<DecoratorArg>): this;\n}\n\nexport function DecoratorMixin<T extends py.Node, TBase extends BaseCtor<T>>(Base: TBase) {\n  abstract class Decorator extends Base {\n    protected _decorators: Array<{\n      args: ReadonlyArray<Ref<DecoratorArg>>;\n      name: Ref<DecoratorName>;\n    }> = [];\n\n    override analyze(ctx: AnalysisContext): void {\n      super.analyze(ctx);\n      for (const decorator of this._decorators) {\n        ctx.analyze(decorator.name);\n        for (const arg of decorator.args) {\n          ctx.analyze(arg);\n        }\n      }\n    }\n\n    protected decorator(name: DecoratorName, ...args: ReadonlyArray<DecoratorArg>): this {\n      this._decorators.push({\n        args: args.map((arg) => ref(arg)),\n        name: ref(name),\n      });\n      return this;\n    }\n\n    protected $decorators(): ReadonlyArray<py.Expression> {\n      return this._decorators.map((decorator) =>\n        decorator.args.length > 0\n          ? py.factory.createCallExpression(\n              this.$node(decorator.name),\n              decorator.args.map((arg) => this.$node(arg)),\n            )\n          : this.$node(decorator.name),\n      );\n    }\n  }\n\n  return Decorator as unknown as MixinCtor<TBase, DecoratorMethods>;\n}\n"
  },
  {
    "path": "packages/openapi-python/src/py-dsl/mixins/do.ts",
    "content": "import type { AnalysisContext, Node } from '@hey-api/codegen-core';\n\nimport type { py } from '../../py-compiler';\nimport type { MaybePyDsl } from '../base';\nimport { StmtPyDsl } from '../stmt/stmt';\nimport type { BaseCtor, MixinCtor } from './types';\n\nexport type DoExpr = MaybePyDsl<py.Expression | py.Statement>;\n\nexport interface DoMethods extends Node {\n  /** Renders the collected `.do()` calls into an array of `py.Statement` nodes. */\n  $do(): ReadonlyArray<py.Statement>;\n  _do: Array<DoExpr>;\n  /** Adds one or more expressions/statements to the body. */\n  do(...items: ReadonlyArray<DoExpr>): this;\n}\n\nexport function DoMixin<T extends py.Node, TBase extends BaseCtor<T>>(Base: TBase) {\n  abstract class Do extends Base {\n    protected _do: Array<DoExpr> = [];\n\n    override analyze(ctx: AnalysisContext): void {\n      super.analyze(ctx);\n      ctx.pushScope();\n      try {\n        for (const item of this._do) {\n          ctx.analyze(item);\n        }\n      } finally {\n        ctx.popScope();\n      }\n    }\n\n    protected do(...items: ReadonlyArray<DoExpr>): this {\n      this._do.push(...items);\n      return this;\n    }\n\n    protected $do(): ReadonlyArray<py.Statement> {\n      return this.$node(this._do.map((item) => new StmtPyDsl(item)));\n    }\n  }\n\n  return Do as unknown as MixinCtor<TBase, DoMethods>;\n}\n"
  },
  {
    "path": "packages/openapi-python/src/py-dsl/mixins/doc.ts",
    "content": "import type { AnalysisContext, Node } from '@hey-api/codegen-core';\n\nimport type { py } from '../../py-compiler';\nimport type { DocFn, DocLines } from '../layout/doc';\nimport { DocPyDsl } from '../layout/doc';\nimport type { BaseCtor, MixinCtor } from './types';\n\nexport interface DocMethods extends Node {\n  $docs(): string | undefined;\n  doc(lines?: DocLines, fn?: DocFn): this;\n}\n\nexport function DocMixin<T extends py.Node, TBase extends BaseCtor<T>>(Base: TBase) {\n  abstract class Doc extends Base {\n    private _doc?: DocPyDsl;\n\n    override analyze(ctx: AnalysisContext): void {\n      super.analyze(ctx);\n    }\n\n    protected doc(lines?: DocLines, fn?: DocFn): this {\n      this._doc = new DocPyDsl(lines, fn);\n      return this;\n    }\n\n    protected $docs(): string | undefined {\n      return this._doc ? this._doc.resolve() : undefined;\n    }\n  }\n\n  return Doc as unknown as MixinCtor<TBase, DocMethods>;\n}\n"
  },
  {
    "path": "packages/openapi-python/src/py-dsl/mixins/expr.ts",
    "content": "import type { AnalysisContext, Node } from '@hey-api/codegen-core';\n\nimport type { py } from '../../py-compiler';\nimport { f } from '../utils/factories';\nimport type { BaseCtor, DropFirst, MixinCtor } from './types';\n\nexport interface ExprMethods extends Node {\n  /** Accesses a property on the current expression (e.g. `this.foo`). */\n  attr(...args: DropFirst<Parameters<typeof f.attr>>): ReturnType<typeof f.attr>;\n  /** Calls the current expression (e.g. `fn(arg1, arg2)`). */\n  call(...args: DropFirst<Parameters<typeof f.call>>): ReturnType<typeof f.call>;\n  /** Produces a `return` statement returning the current expression. */\n  return(): ReturnType<typeof f.return>;\n  /** Produces a subscript/slice expression (e.g. `expr[args]`). */\n  slice(...args: DropFirst<Parameters<typeof f.slice>>): ReturnType<typeof f.slice>;\n}\n\nexport function ExprMixin<T extends py.Expression, TBase extends BaseCtor<T>>(Base: TBase) {\n  abstract class Expr extends Base {\n    override analyze(ctx: AnalysisContext): void {\n      super.analyze(ctx);\n    }\n\n    protected attr(...args: DropFirst<Parameters<typeof f.attr>>): ReturnType<typeof f.attr> {\n      // @ts-expect-error - fix this type\n      return f.attr(this, ...args);\n    }\n\n    protected call(...args: DropFirst<Parameters<typeof f.call>>): ReturnType<typeof f.call> {\n      // @ts-expect-error - fix this type\n      return f.call(this, ...args);\n    }\n\n    protected return(): ReturnType<typeof f.return> {\n      // @ts-expect-error - fix this type\n      return f.return(this);\n    }\n\n    protected slice(...args: DropFirst<Parameters<typeof f.slice>>): ReturnType<typeof f.slice> {\n      return f.slice(this, ...args);\n    }\n  }\n\n  return Expr as unknown as MixinCtor<TBase, ExprMethods>;\n}\n"
  },
  {
    "path": "packages/openapi-python/src/py-dsl/mixins/hint.ts",
    "content": "import type { AnalysisContext, Node } from '@hey-api/codegen-core';\n\nimport type { py } from '../../py-compiler';\nimport type { HintFn, HintLines } from '../layout/hint';\nimport { HintPyDsl } from '../layout/hint';\nimport type { BaseCtor, MixinCtor } from './types';\n\nexport interface HintMethods extends Node {\n  $hint<T extends py.Node>(node: T): T;\n  hint(lines?: HintLines, fn?: HintFn): this;\n}\n\nexport function HintMixin<T extends py.Node, TBase extends BaseCtor<T>>(Base: TBase) {\n  abstract class Hint extends Base {\n    private _hint?: HintPyDsl;\n\n    override analyze(ctx: AnalysisContext): void {\n      super.analyze(ctx);\n    }\n\n    protected hint(lines?: HintLines, fn?: HintFn): this {\n      this._hint = new HintPyDsl(lines, fn);\n      return this;\n    }\n\n    protected $hint<T extends py.Node>(node: T): T {\n      return this._hint ? this._hint.apply(node) : node;\n    }\n  }\n\n  return Hint as unknown as MixinCtor<TBase, HintMethods>;\n}\n"
  },
  {
    "path": "packages/openapi-python/src/py-dsl/mixins/layout.ts",
    "content": "import type { AnalysisContext, Node } from '@hey-api/codegen-core';\n\nimport type { py } from '../../py-compiler';\nimport type { BaseCtor, MixinCtor } from './types';\n\nexport interface LayoutMethods extends Node {\n  /** Computes whether output should be multiline based on layout setting and element count. */\n  $multiline(count: number): boolean;\n  /** Sets automatic line output with optional threshold (default: 3). */\n  auto(threshold?: number): this;\n  /** Sets single line output. */\n  inline(): this;\n  /** Sets multi line output. */\n  pretty(): this;\n}\n\nexport function LayoutMixin<T extends py.Node, TBase extends BaseCtor<T>>(Base: TBase) {\n  abstract class Layout extends Base {\n    protected static readonly DEFAULT_THRESHOLD = 3;\n    protected layout: boolean | number | undefined;\n\n    override analyze(ctx: AnalysisContext): void {\n      super.analyze(ctx);\n    }\n\n    protected auto(threshold: number = Layout.DEFAULT_THRESHOLD): this {\n      this.layout = threshold;\n      return this;\n    }\n\n    protected inline(): this {\n      this.layout = false;\n      return this;\n    }\n\n    protected pretty(): this {\n      this.layout = true;\n      return this;\n    }\n\n    protected $multiline(count: number): boolean {\n      if (this.layout === undefined) {\n        this.layout = Layout.DEFAULT_THRESHOLD;\n      }\n      if (count === 0) return false;\n      return typeof this.layout === 'number' ? count >= this.layout : this.layout;\n    }\n  }\n\n  return Layout as unknown as MixinCtor<TBase, LayoutMethods>;\n}\n"
  },
  {
    "path": "packages/openapi-python/src/py-dsl/mixins/modifiers.ts",
    "content": "import type { AnalysisContext } from '@hey-api/codegen-core';\n\nimport { py } from '../../py-compiler';\nimport type { BaseCtor, MixinCtor } from './types';\n\nexport type Modifiers = {\n  /**\n   * Checks if specified modifier is present.\n   *\n   * @param modifier - The modifier to check.\n   * @returns True if modifier is present, false otherwise.\n   */\n  hasModifier(modifier: Modifier): boolean;\n  modifiers: Array<py.Expression>;\n};\n\ntype Modifier = 'async';\n\nexport interface ModifierMethods extends Modifiers {\n  /**\n   * Adds a modifier of specified kind to modifiers list if condition is true.\n   *\n   * @param modifier - The modifier to add.\n   * @param condition - Whether to add modifier.\n   * @returns The parent node for chaining.\n   */\n  _m(modifier: Modifier, condition: boolean): this;\n}\n\nfunction modifierToKind(modifier: Modifier): py.Expression {\n  switch (modifier) {\n    case 'async':\n      return py.factory.createIdentifier('async');\n  }\n}\n\nfunction ModifiersMixin<T extends py.Node, TBase extends BaseCtor<T>>(Base: TBase) {\n  abstract class Modifiers extends Base {\n    protected modifiers: Array<py.Expression> = [];\n\n    override analyze(ctx: AnalysisContext): void {\n      super.analyze(ctx);\n    }\n\n    protected hasModifier(modifier: Modifier): boolean {\n      const kind = modifierToKind(modifier);\n      return Boolean(this.modifiers.find((mod) => mod === kind));\n    }\n\n    protected _m(modifier: Modifier, condition: boolean): this {\n      if (condition) {\n        const kind = modifierToKind(modifier);\n        this.modifiers.push(kind);\n      }\n      return this;\n    }\n  }\n\n  return Modifiers as unknown as MixinCtor<TBase, ModifierMethods>;\n}\n\nexport interface AsyncMethods extends Modifiers {\n  /**\n   * Adds an `async` keyword modifier if condition is true.\n   *\n   * @param condition - Whether to add modifier (default: true).\n   * @returns The target object for chaining.\n   */\n  async(condition?: boolean): this;\n}\n\n/**\n * Mixin that adds an `async` modifier to a node.\n */\nexport function AsyncMixin<T extends py.Node, TBase extends BaseCtor<T>>(Base: TBase) {\n  const Mixed = ModifiersMixin(Base as BaseCtor<T>);\n\n  abstract class Async extends Mixed {\n    protected async(condition?: boolean): this {\n      const cond = arguments.length === 0 ? true : Boolean(condition);\n      return this._m('async', cond);\n    }\n  }\n\n  return Async as unknown as MixinCtor<TBase, AsyncMethods>;\n}\n\nexport interface ExportMethods extends Modifiers {\n  /**\n   * Adds the `export` keyword modifier if the condition is true.\n   *\n   * @param condition - Whether to add the modifier (default: true).\n   * @returns The target object for chaining.\n   */\n  export(condition?: boolean): this;\n}\n\n/**\n * Mixin that adds an `export` modifier to a node.\n */\nexport function ExportMixin<T extends py.Node, TBase extends BaseCtor<T>>(Base: TBase) {\n  const Mixed = ModifiersMixin(Base as BaseCtor<T>);\n\n  abstract class Export extends Mixed {\n    /**\n     * Adds the `export` keyword modifier if the condition is true.\n     *\n     * @param condition - Whether to add the modifier (default: true).\n     * @returns The target object for chaining.\n     */\n    protected export(condition?: boolean): this {\n      const cond = arguments.length === 0 ? true : Boolean(condition);\n      this.exported = cond;\n      // TODO: remove this side-effect once planner handles exported flag\n      if (this.symbol) this.symbol.setExported(cond);\n      return this;\n    }\n  }\n\n  return Export as unknown as MixinCtor<TBase, ExportMethods>;\n}\n"
  },
  {
    "path": "packages/openapi-python/src/py-dsl/mixins/operator.ts",
    "content": "import type { AnalysisContext, Node, NodeName } from '@hey-api/codegen-core';\n\nimport type { py } from '../../py-compiler';\nimport type { MaybePyDsl } from '../base';\nimport { BinaryPyDsl } from '../expr/binary';\nimport type { BaseCtor, MixinCtor } from './types';\n\ntype Expr = NodeName | MaybePyDsl<py.Expression>;\n\nexport interface OperatorMethods extends Node {\n  and(expr: Expr): BinaryPyDsl;\n  div(expr: Expr): BinaryPyDsl;\n  eq(expr: Expr): BinaryPyDsl;\n  floordiv(expr: Expr): BinaryPyDsl;\n  gt(expr: Expr): BinaryPyDsl;\n  gte(expr: Expr): BinaryPyDsl;\n  in_(expr: Expr): BinaryPyDsl;\n  is(expr: Expr): BinaryPyDsl;\n  isNot(expr: Expr): BinaryPyDsl;\n  lt(expr: Expr): BinaryPyDsl;\n  lte(expr: Expr): BinaryPyDsl;\n  minus(expr: Expr): BinaryPyDsl;\n  mod(expr: Expr): BinaryPyDsl;\n  neq(expr: Expr): BinaryPyDsl;\n  notIn(expr: Expr): BinaryPyDsl;\n  or(expr: Expr): BinaryPyDsl;\n  plus(expr: Expr): BinaryPyDsl;\n  pow(expr: Expr): BinaryPyDsl;\n  times(expr: Expr): BinaryPyDsl;\n}\n\nexport function OperatorMixin<T extends py.Expression, TBase extends BaseCtor<T>>(Base: TBase) {\n  abstract class Operator extends Base {\n    override analyze(ctx: AnalysisContext): void {\n      super.analyze(ctx);\n    }\n\n    protected and(expr: Expr): BinaryPyDsl {\n      return new BinaryPyDsl(\n        this as unknown as MaybePyDsl<py.Expression>,\n        'and',\n        expr as MaybePyDsl<py.Expression>,\n      );\n    }\n\n    protected div(expr: Expr): BinaryPyDsl {\n      return new BinaryPyDsl(\n        this as unknown as MaybePyDsl<py.Expression>,\n        '/',\n        expr as MaybePyDsl<py.Expression>,\n      );\n    }\n\n    protected eq(expr: Expr): BinaryPyDsl {\n      return new BinaryPyDsl(\n        this as unknown as MaybePyDsl<py.Expression>,\n        '==',\n        expr as MaybePyDsl<py.Expression>,\n      );\n    }\n\n    protected floordiv(expr: Expr): BinaryPyDsl {\n      return new BinaryPyDsl(\n        this as unknown as MaybePyDsl<py.Expression>,\n        '//',\n        expr as MaybePyDsl<py.Expression>,\n      );\n    }\n\n    protected gt(expr: Expr): BinaryPyDsl {\n      return new BinaryPyDsl(\n        this as unknown as MaybePyDsl<py.Expression>,\n        '>',\n        expr as MaybePyDsl<py.Expression>,\n      );\n    }\n\n    protected gte(expr: Expr): BinaryPyDsl {\n      return new BinaryPyDsl(\n        this as unknown as MaybePyDsl<py.Expression>,\n        '>=',\n        expr as MaybePyDsl<py.Expression>,\n      );\n    }\n\n    protected in_(expr: Expr): BinaryPyDsl {\n      return new BinaryPyDsl(\n        this as unknown as MaybePyDsl<py.Expression>,\n        'in',\n        expr as MaybePyDsl<py.Expression>,\n      );\n    }\n\n    protected is(expr: Expr): BinaryPyDsl {\n      return new BinaryPyDsl(\n        this as unknown as MaybePyDsl<py.Expression>,\n        'is',\n        expr as MaybePyDsl<py.Expression>,\n      );\n    }\n\n    protected isNot(expr: Expr): BinaryPyDsl {\n      return new BinaryPyDsl(\n        this as unknown as MaybePyDsl<py.Expression>,\n        'is not',\n        expr as MaybePyDsl<py.Expression>,\n      );\n    }\n\n    protected lt(expr: Expr): BinaryPyDsl {\n      return new BinaryPyDsl(\n        this as unknown as MaybePyDsl<py.Expression>,\n        '<',\n        expr as MaybePyDsl<py.Expression>,\n      );\n    }\n\n    protected lte(expr: Expr): BinaryPyDsl {\n      return new BinaryPyDsl(\n        this as unknown as MaybePyDsl<py.Expression>,\n        '<=',\n        expr as MaybePyDsl<py.Expression>,\n      );\n    }\n\n    protected minus(expr: Expr): BinaryPyDsl {\n      return new BinaryPyDsl(\n        this as unknown as MaybePyDsl<py.Expression>,\n        '-',\n        expr as MaybePyDsl<py.Expression>,\n      );\n    }\n\n    protected mod(expr: Expr): BinaryPyDsl {\n      return new BinaryPyDsl(\n        this as unknown as MaybePyDsl<py.Expression>,\n        '%',\n        expr as MaybePyDsl<py.Expression>,\n      );\n    }\n\n    protected neq(expr: Expr): BinaryPyDsl {\n      return new BinaryPyDsl(\n        this as unknown as MaybePyDsl<py.Expression>,\n        '!=',\n        expr as MaybePyDsl<py.Expression>,\n      );\n    }\n\n    protected notIn(expr: Expr): BinaryPyDsl {\n      return new BinaryPyDsl(\n        this as unknown as MaybePyDsl<py.Expression>,\n        'not in',\n        expr as MaybePyDsl<py.Expression>,\n      );\n    }\n\n    protected or(expr: Expr): BinaryPyDsl {\n      return new BinaryPyDsl(\n        this as unknown as MaybePyDsl<py.Expression>,\n        'or',\n        expr as MaybePyDsl<py.Expression>,\n      );\n    }\n\n    protected plus(expr: Expr): BinaryPyDsl {\n      return new BinaryPyDsl(\n        this as unknown as MaybePyDsl<py.Expression>,\n        '+',\n        expr as MaybePyDsl<py.Expression>,\n      );\n    }\n\n    protected pow(expr: Expr): BinaryPyDsl {\n      return new BinaryPyDsl(\n        this as unknown as MaybePyDsl<py.Expression>,\n        '**',\n        expr as MaybePyDsl<py.Expression>,\n      );\n    }\n\n    protected times(expr: Expr): BinaryPyDsl {\n      return new BinaryPyDsl(\n        this as unknown as MaybePyDsl<py.Expression>,\n        '*',\n        expr as MaybePyDsl<py.Expression>,\n      );\n    }\n  }\n\n  return Operator as unknown as MixinCtor<TBase, OperatorMethods>;\n}\n"
  },
  {
    "path": "packages/openapi-python/src/py-dsl/mixins/param.ts",
    "content": "import type { AnalysisContext, Node } from '@hey-api/codegen-core';\n\nimport type { py } from '../../py-compiler';\nimport type { MaybePyDsl } from '../base';\nimport type { ParamCtor, ParamFn, ParamName } from '../decl/param';\nimport { ParamPyDsl } from '../decl/param';\nimport type { BaseCtor, MixinCtor } from './types';\n\nexport interface ParamMethods extends Node {\n  /** Renders the parameters into an array of `FunctionParameter`s. */\n  $params(): ReadonlyArray<py.FunctionParameter>;\n  /** Adds a parameter. */\n  param(...args: Parameters<ParamCtor>): this;\n  /** Adds multiple parameters. */\n  params(...params: ReadonlyArray<MaybePyDsl<py.FunctionParameter>>): this;\n}\n\nexport function ParamMixin<T extends py.Node, TBase extends BaseCtor<T>>(Base: TBase) {\n  abstract class Param extends Base {\n    protected _params: Array<MaybePyDsl<py.FunctionParameter>> = [];\n\n    override analyze(ctx: AnalysisContext): void {\n      super.analyze(ctx);\n      for (const param of this._params) {\n        ctx.analyze(param);\n      }\n    }\n\n    protected param(name: ParamName, fn?: ParamFn): this {\n      const p = typeof name === 'function' ? new ParamPyDsl(name) : new ParamPyDsl(name, fn);\n      this._params.push(p);\n      return this;\n    }\n\n    protected params(...params: ReadonlyArray<MaybePyDsl<py.FunctionParameter>>): this {\n      this._params.push(...params);\n      return this;\n    }\n\n    protected $params(): ReadonlyArray<py.FunctionParameter> {\n      return this.$node(this._params);\n    }\n  }\n\n  return Param as unknown as MixinCtor<TBase, ParamMethods>;\n}\n"
  },
  {
    "path": "packages/openapi-python/src/py-dsl/mixins/returns.ts",
    "content": "import type { AnalysisContext, Node, NodeName, Ref } from '@hey-api/codegen-core';\nimport { ref } from '@hey-api/codegen-core';\n\nimport type { py } from '../../py-compiler';\nimport type { BaseCtor, MixinCtor } from './types';\n\nexport interface ReturnsMethods extends Node {\n  $returns(): py.Expression | undefined;\n  returns(type: NodeName | py.Expression): this;\n}\n\nexport function ReturnsMixin<T extends py.Node, TBase extends BaseCtor<T>>(Base: TBase) {\n  abstract class Returns extends Base {\n    protected _returns?: Ref<NodeName | py.Expression>;\n\n    override analyze(ctx: AnalysisContext): void {\n      super.analyze(ctx);\n      ctx.analyze(this._returns);\n    }\n\n    returns(type: NodeName | py.Expression): this {\n      this._returns = ref(type);\n      return this;\n    }\n\n    protected $returns(): py.Expression | undefined {\n      return this.$node(this._returns);\n    }\n  }\n\n  return Returns as unknown as MixinCtor<TBase, ReturnsMethods>;\n}\n"
  },
  {
    "path": "packages/openapi-python/src/py-dsl/mixins/types.ts",
    "content": "import type { py } from '../../py-compiler';\nimport type { PyDsl } from '../base';\n\nexport type BaseCtor<T extends py.Node> = abstract new (...args: Array<any>) => PyDsl<T>;\n\nexport type DropFirst<T extends Array<any>> = T extends [any, ...infer Rest] ? Rest : never;\n\nexport type MixinCtor<T extends BaseCtor<any>, K> = abstract new (\n  ...args: Array<any>\n) => InstanceType<T> & K;\n"
  },
  {
    "path": "packages/openapi-python/src/py-dsl/mixins/value.ts",
    "content": "import type { AnalysisContext, Node, NodeName, Ref } from '@hey-api/codegen-core';\nimport { ref } from '@hey-api/codegen-core';\n\nimport type { py } from '../../py-compiler';\nimport type { PyDsl } from '../base';\nimport type { BaseCtor, MixinCtor } from './types';\n\nexport type ValueExpr = NodeName | PyDsl<py.Expression>;\n\nexport interface ValueMethods extends Node {\n  $value(): py.Expression | undefined;\n  /** Sets the initializer expression (e.g. `= expr`). */\n  assign(expr: ValueExpr): this;\n}\n\nexport function ValueMixin<T extends py.Node, TBase extends BaseCtor<T>>(Base: TBase) {\n  abstract class Value extends Base {\n    protected value?: Ref<ValueExpr>;\n\n    override analyze(ctx: AnalysisContext): void {\n      super.analyze(ctx);\n      ctx.analyze(this.value);\n    }\n\n    protected assign(expr: ValueExpr): this {\n      this.value = ref(expr);\n      return this;\n    }\n\n    protected $value(): py.Expression | undefined {\n      return this.$node(this.value);\n    }\n  }\n\n  return Value as unknown as MixinCtor<TBase, ValueMethods>;\n}\n"
  },
  {
    "path": "packages/openapi-python/src/py-dsl/stmt/block.ts",
    "content": "import type { AnalysisContext } from '@hey-api/codegen-core';\n\nimport { py } from '../../py-compiler';\nimport { PyDsl } from '../base';\nimport type { DoExpr } from '../mixins/do';\nimport { DoMixin } from '../mixins/do';\nimport { LayoutMixin } from '../mixins/layout';\n\nconst Mixed = DoMixin(LayoutMixin(PyDsl<py.Block>));\n\nexport class BlockPyDsl extends Mixed {\n  readonly '~dsl' = 'BlockPyDsl';\n\n  constructor(...items: Array<DoExpr>) {\n    super();\n    this.do(...items);\n  }\n\n  override analyze(ctx: AnalysisContext) {\n    super.analyze(ctx);\n  }\n\n  override toAst() {\n    const statements = this.$do();\n    return py.factory.createBlock(statements);\n  }\n}\n"
  },
  {
    "path": "packages/openapi-python/src/py-dsl/stmt/break.ts",
    "content": "import type { AnalysisContext } from '@hey-api/codegen-core';\n\nimport { py } from '../../py-compiler';\nimport { PyDsl } from '../base';\n\nconst Mixed = PyDsl<py.BreakStatement>;\n\nexport class BreakPyDsl extends Mixed {\n  readonly '~dsl' = 'BreakPyDsl';\n\n  override analyze(_ctx: AnalysisContext): void {\n    super.analyze(_ctx);\n  }\n\n  override toAst() {\n    return py.factory.createBreakStatement();\n  }\n}\n"
  },
  {
    "path": "packages/openapi-python/src/py-dsl/stmt/continue.ts",
    "content": "import type { AnalysisContext } from '@hey-api/codegen-core';\n\nimport { py } from '../../py-compiler';\nimport { PyDsl } from '../base';\n\nconst Mixed = PyDsl<py.ContinueStatement>;\n\nexport class ContinuePyDsl extends Mixed {\n  readonly '~dsl' = 'ContinuePyDsl';\n\n  override analyze(_ctx: AnalysisContext): void {\n    super.analyze(_ctx);\n  }\n\n  override toAst() {\n    return py.factory.createContinueStatement();\n  }\n}\n"
  },
  {
    "path": "packages/openapi-python/src/py-dsl/stmt/for.ts",
    "content": "import type { AnalysisContext } from '@hey-api/codegen-core';\n\nimport { py } from '../../py-compiler';\nimport type { MaybePyDsl } from '../base';\nimport { PyDsl } from '../base';\nimport type { DoExpr } from '../mixins/do';\nimport { BlockPyDsl } from './block';\n\nconst Mixed = PyDsl<py.ForStatement>;\n\nexport class ForPyDsl extends Mixed {\n  readonly '~dsl' = 'ForPyDsl';\n\n  protected _body?: Array<DoExpr>;\n  protected _else?: Array<DoExpr>;\n  protected _iterable?: MaybePyDsl<py.Expression>;\n  protected _target?: MaybePyDsl<py.Expression>;\n\n  constructor(\n    target: MaybePyDsl<py.Expression>,\n    iterable: MaybePyDsl<py.Expression>,\n    ...body: Array<DoExpr>\n  ) {\n    super();\n    this._target = target;\n    this._iterable = iterable;\n    this._body = body;\n  }\n\n  override analyze(ctx: AnalysisContext): void {\n    super.analyze(ctx);\n\n    if (this._target) ctx.analyze(this._target);\n    if (this._iterable) ctx.analyze(this._iterable);\n\n    if (this._body) {\n      ctx.pushScope();\n      try {\n        for (const stmt of this._body) ctx.analyze(stmt);\n      } finally {\n        ctx.popScope();\n      }\n    }\n\n    if (this._else) {\n      ctx.pushScope();\n      try {\n        for (const stmt of this._else) ctx.analyze(stmt);\n      } finally {\n        ctx.popScope();\n      }\n    }\n  }\n\n  /** Returns true when all required builder calls are present. */\n  get isValid(): boolean {\n    return this.missingRequiredCalls().length === 0;\n  }\n\n  body(...items: Array<DoExpr>): this {\n    this._body = items;\n    return this;\n  }\n\n  else(...items: Array<DoExpr>): this {\n    this._else = items;\n    return this;\n  }\n\n  override toAst() {\n    this.$validate();\n\n    const body = new BlockPyDsl(...this._body!).$do();\n    const elseBlock = this._else ? new BlockPyDsl(...this._else).$do() : undefined;\n\n    return py.factory.createForStatement(\n      this.$node(this._target!),\n      this.$node(this._iterable!),\n      [...body],\n      elseBlock ? [...elseBlock] : undefined,\n    );\n  }\n\n  $validate(): asserts this is this & {\n    _body: Array<DoExpr>;\n    _iterable: MaybePyDsl<py.Expression>;\n    _target: MaybePyDsl<py.Expression>;\n  } {\n    const missing = this.missingRequiredCalls();\n    if (missing.length === 0) return;\n    throw new Error(`For statement missing ${missing.join(' and ')}`);\n  }\n\n  private missingRequiredCalls(): ReadonlyArray<string> {\n    const missing: Array<string> = [];\n    if (!this._target) missing.push('target');\n    if (!this._iterable) missing.push('iterable');\n    if (!this._body || this._body.length === 0) missing.push('body');\n    return missing;\n  }\n}\n"
  },
  {
    "path": "packages/openapi-python/src/py-dsl/stmt/if.ts",
    "content": "import type { AnalysisContext } from '@hey-api/codegen-core';\n\nimport { py } from '../../py-compiler';\nimport type { MaybePyDsl } from '../base';\nimport { PyDsl } from '../base';\nimport type { DoExpr } from '../mixins/do';\nimport { DoMixin } from '../mixins/do';\nimport { BlockPyDsl } from './block';\n\nexport type IfCondition = string | MaybePyDsl<py.Expression>;\n\nconst Mixed = DoMixin(PyDsl<py.IfStatement>);\n\nexport class IfPyDsl extends Mixed {\n  readonly '~dsl' = 'IfPyDsl';\n\n  protected _condition?: IfCondition;\n  protected _else?: Array<DoExpr>;\n\n  constructor(condition?: IfCondition) {\n    super();\n    if (condition) this.condition(condition);\n  }\n\n  override analyze(ctx: AnalysisContext): void {\n    super.analyze(ctx);\n    ctx.analyze(this._condition);\n    if (this._else) {\n      ctx.pushScope();\n      try {\n        for (const stmt of this._else) {\n          ctx.analyze(stmt);\n        }\n      } finally {\n        ctx.popScope();\n      }\n    }\n  }\n\n  /** Returns true when all required builder calls are present. */\n  get isValid(): boolean {\n    return this.missingRequiredCalls().length === 0;\n  }\n\n  condition(condition: IfCondition): this {\n    this._condition = condition;\n    return this;\n  }\n\n  otherwise(...items: Array<DoExpr>): this {\n    this._else = items;\n    return this;\n  }\n\n  override toAst() {\n    this.$validate();\n\n    const thenStatements = this.$do();\n    const elseStatements = this._else ? new BlockPyDsl(...this._else).$do() : undefined;\n\n    return py.factory.createIfStatement(\n      this.$node(this._condition!),\n      [...thenStatements],\n      elseStatements ? [...elseStatements] : undefined,\n    );\n  }\n\n  $validate(): asserts this is this & {\n    _condition: IfCondition;\n  } {\n    const missing = this.missingRequiredCalls();\n    if (missing.length === 0) return;\n    throw new Error(`If statement missing ${missing.join(' and ')}`);\n  }\n\n  private missingRequiredCalls(): ReadonlyArray<string> {\n    const missing: Array<string> = [];\n    if (!this._condition) missing.push('.condition()');\n    if (this._do.length === 0) missing.push('.do()');\n    return missing;\n  }\n}\n"
  },
  {
    "path": "packages/openapi-python/src/py-dsl/stmt/import.ts",
    "content": "import type { AnalysisContext } from '@hey-api/codegen-core';\n\nimport { py } from '../../py-compiler';\nimport { PyDsl } from '../base';\n\ntype ImportName = { alias?: string; name: string };\n\nconst Mixed = PyDsl<py.ImportStatement>;\n\nexport class ImportPyDsl extends Mixed {\n  readonly '~dsl' = 'ImportPyDsl';\n\n  protected isFrom: boolean = true;\n  protected module: string = '';\n  protected names?: ReadonlyArray<ImportName>;\n\n  constructor(module: string);\n  constructor(module: string, isFrom: boolean);\n  constructor(module: string, names: ReadonlyArray<ImportName>, isFrom: boolean);\n  constructor(\n    module: string,\n    namesOrIsFrom?: ReadonlyArray<ImportName> | boolean,\n    isFrom?: boolean,\n  ) {\n    super();\n    this.module = module;\n    if (typeof namesOrIsFrom === 'boolean') {\n      this.isFrom = namesOrIsFrom;\n    } else if (Array.isArray(namesOrIsFrom)) {\n      this.names = namesOrIsFrom;\n      this.isFrom = isFrom ?? true;\n    } else {\n      this.isFrom = true;\n    }\n  }\n\n  static from(module: string, names?: ReadonlyArray<ImportName>): ImportPyDsl {\n    return names ? new ImportPyDsl(module, names, true) : new ImportPyDsl(module, true);\n  }\n\n  static direct(module: string): ImportPyDsl {\n    return new ImportPyDsl(module, false);\n  }\n\n  override analyze(_ctx: AnalysisContext): void {\n    super.analyze(_ctx);\n  }\n\n  override toAst() {\n    return py.factory.createImportStatement(this.module, this.names, this.isFrom);\n  }\n}\n"
  },
  {
    "path": "packages/openapi-python/src/py-dsl/stmt/raise.ts",
    "content": "import type { AnalysisContext } from '@hey-api/codegen-core';\n\nimport { py } from '../../py-compiler';\nimport type { MaybePyDsl } from '../base';\nimport { PyDsl } from '../base';\n// import { LiteralPyDsl } from '../expr/literal';\n\nconst Mixed = PyDsl<py.RaiseStatement>;\n\nexport class RaisePyDsl extends Mixed {\n  readonly '~dsl' = 'RaisePyDsl';\n\n  protected _error?: string | MaybePyDsl<py.Expression>;\n  // protected msg?: string | MaybePyDsl<py.Expression>;\n\n  constructor(error?: string | MaybePyDsl<py.Expression>) {\n    super();\n    this._error = error;\n  }\n\n  override analyze(ctx: AnalysisContext): void {\n    super.analyze(ctx);\n    ctx.analyze(this._error);\n    // ctx.analyze(this.msg);\n  }\n\n  // /** Sets the message argument for the exception (e.g. `raise ValueError('msg')`). */\n  // message(value: string | MaybePyDsl<py.Expression>): this {\n  //   this.msg = value;\n  //   return this;\n  // }\n\n  override toAst() {\n    // Python's `raise` can be bare (re-raise), or `raise <expr>`.\n    // Unlike JS `throw new Error(msg)`, Python uses `raise ErrorType(msg)` directly,\n    // so the caller constructs the call expression themselves.\n    const errorNode = this._error ? this.$node(this._error) : undefined;\n    return py.factory.createRaiseStatement(errorNode);\n  }\n}\n"
  },
  {
    "path": "packages/openapi-python/src/py-dsl/stmt/return.ts",
    "content": "import type { AnalysisContext, NodeName, Ref } from '@hey-api/codegen-core';\nimport { ref } from '@hey-api/codegen-core';\n\nimport { py } from '../../py-compiler';\nimport type { MaybePyDsl } from '../base';\nimport { PyDsl } from '../base';\nimport { f } from '../utils/factories';\n\nexport type ReturnExpr = NodeName | MaybePyDsl<py.Expression>;\nexport type ReturnCtor = (expr?: ReturnExpr) => ReturnPyDsl;\n\nconst Mixed = PyDsl<py.ReturnStatement>;\n\nexport class ReturnPyDsl extends Mixed {\n  readonly '~dsl' = 'ReturnPyDsl';\n\n  protected _returnExpr?: Ref<ReturnExpr>;\n\n  constructor(expr?: ReturnExpr) {\n    super();\n    if (expr) this._returnExpr = ref(expr);\n  }\n\n  override analyze(ctx: AnalysisContext): void {\n    super.analyze(ctx);\n    ctx.analyze(this._returnExpr);\n  }\n\n  override toAst() {\n    return py.factory.createReturnStatement(this.$node(this._returnExpr));\n  }\n}\n\nf.return.set((...args) => new ReturnPyDsl(...args));\n"
  },
  {
    "path": "packages/openapi-python/src/py-dsl/stmt/stmt.ts",
    "content": "import type { AnalysisContext } from '@hey-api/codegen-core';\n\nimport { py } from '../../py-compiler';\nimport { PyDsl } from '../base';\n\nconst Mixed = PyDsl<py.Statement>;\n\nexport class StmtPyDsl extends Mixed {\n  readonly '~dsl' = 'StmtPyDsl';\n\n  protected _inner: py.Expression | py.Statement | PyDsl<any>;\n\n  constructor(inner: py.Expression | py.Statement | PyDsl<any>) {\n    super();\n    this._inner = inner;\n  }\n\n  override analyze(ctx: AnalysisContext): void {\n    super.analyze(ctx);\n    ctx.analyze(this._inner);\n  }\n\n  override toAst() {\n    const node = this.$node(this._inner);\n    if (isStatement(node)) return node;\n    return py.factory.createExpressionStatement(node);\n  }\n}\n\n/** Checks whether a Python AST node is a statement. */\nfunction isStatement(node: py.Expression | py.Statement): node is py.Statement {\n  const statementKinds = new Set([\n    py.PyNodeKind.Assignment,\n    py.PyNodeKind.AugmentedAssignment,\n    py.PyNodeKind.Block,\n    py.PyNodeKind.BreakStatement,\n    py.PyNodeKind.ClassDeclaration,\n    py.PyNodeKind.Comment,\n    py.PyNodeKind.ContinueStatement,\n    py.PyNodeKind.EmptyStatement,\n    py.PyNodeKind.ExpressionStatement,\n    py.PyNodeKind.ForStatement,\n    py.PyNodeKind.FunctionDeclaration,\n    py.PyNodeKind.IfStatement,\n    py.PyNodeKind.ImportStatement,\n    py.PyNodeKind.RaiseStatement,\n    py.PyNodeKind.ReturnStatement,\n    py.PyNodeKind.TryStatement,\n    py.PyNodeKind.WhileStatement,\n    py.PyNodeKind.WithStatement,\n  ]);\n  return statementKinds.has(node.kind);\n}\n"
  },
  {
    "path": "packages/openapi-python/src/py-dsl/stmt/try.ts",
    "content": "import type { AnalysisContext, NodeName, Ref } from '@hey-api/codegen-core';\nimport { ref } from '@hey-api/codegen-core';\nimport type { MaybeArray } from '@hey-api/types';\n\nimport { py } from '../../py-compiler';\nimport type { MaybePyDsl } from '../base';\nimport { PyDsl } from '../base';\nimport type { DoExpr } from '../mixins/do';\nimport { BlockPyDsl } from './block';\n\nconst Mixed = PyDsl<py.TryStatement>;\n\ntype ExceptType = string | MaybePyDsl<py.Expression>;\n\ninterface ExceptEntry {\n  body: Array<DoExpr>;\n  name?: Ref<NodeName>;\n  types: Array<ExceptType>;\n}\n\nfunction exceptKey(types: Array<ExceptType>): string {\n  return types\n    .map((t) => (typeof t === 'string' ? t : '<<expr>>'))\n    .sort()\n    .join(',');\n}\n\nexport class TryPyDsl extends Mixed {\n  readonly '~dsl' = 'TryPyDsl';\n\n  /**\n   * Ordered list of except clauses.  We also keep a lookup map\n   * (`_exceptIndex`) keyed by the normalised type key so that\n   * repeated `.except()` calls with the same type set merge their\n   * body statements instead of creating duplicate clauses.\n   */\n  protected _excepts: Array<ExceptEntry> = [];\n  protected _exceptIndex: Map<string, number> = new Map();\n\n  protected _finally?: Array<DoExpr>;\n  protected _try?: Array<DoExpr>;\n\n  constructor(...tryBlock: Array<DoExpr>) {\n    super();\n    this.try(...tryBlock);\n  }\n\n  override analyze(ctx: AnalysisContext): void {\n    super.analyze(ctx);\n\n    if (this._try) {\n      ctx.pushScope();\n      try {\n        for (const stmt of this._try) ctx.analyze(stmt);\n      } finally {\n        ctx.popScope();\n      }\n    }\n\n    for (const entry of this._excepts) {\n      ctx.pushScope();\n      try {\n        ctx.analyze(entry.name);\n        for (const t of entry.types) ctx.analyze(t);\n        for (const stmt of entry.body) ctx.analyze(stmt);\n      } finally {\n        ctx.popScope();\n      }\n    }\n\n    if (this._finally) {\n      ctx.pushScope();\n      try {\n        for (const stmt of this._finally) ctx.analyze(stmt);\n      } finally {\n        ctx.popScope();\n      }\n    }\n  }\n\n  /** Returns true when all required builder calls are present. */\n  get isValid(): boolean {\n    return this.missingRequiredCalls().length === 0;\n  }\n\n  /**\n   * Add (or merge into) an except clause.\n   *\n   * ```ts\n   * $.try(...)\n   *   .except('ValueError', 'e', body1, body2)     // except ValueError as e:\n   *   .except(['TypeError', 'KeyError'], 'e', ...) // except (TypeError, KeyError) as e:\n   *   .except('ValueError', moreBody)              // merges into first clause\n   * ```\n   *\n   * @param types  Single exception type or array of types.\n   * @param nameOrBody  Either the `as` variable name (`NodeName`) or the\n   *   first body expression. If it looks like a `NodeName` (string that\n   *   is a valid Python identifier and is *not* a DSL node), it is treated\n   *   as the name; pass body items after it.\n   * @param body   Remaining body statements.\n   */\n  except(\n    types: MaybeArray<ExceptType>,\n    nameOrBody?: NodeName | DoExpr,\n    ...body: Array<DoExpr>\n  ): this {\n    const typeArr = Array.isArray(types) ? types : [types];\n    const key = exceptKey(typeArr);\n\n    let name: Ref<NodeName> | undefined;\n    let bodyItems: Array<DoExpr>;\n\n    // Disambiguate: if the second arg is a plain string that looks like\n    // an identifier (no dots, no spaces, not a DSL node) treat it as\n    // the `as` name.  Otherwise it's the first body expression.\n    if (nameOrBody !== undefined && this._isNodeName(nameOrBody)) {\n      name = ref(nameOrBody as NodeName);\n      bodyItems = body;\n    } else if (nameOrBody !== undefined) {\n      bodyItems = [nameOrBody as DoExpr, ...body];\n    } else {\n      bodyItems = body;\n    }\n\n    const existing = this._exceptIndex.get(key);\n    if (existing !== undefined) {\n      const entry = this._excepts[existing]!;\n      entry.body.push(...bodyItems);\n      if (name !== undefined) entry.name = name;\n    } else {\n      this._exceptIndex.set(key, this._excepts.length);\n      this._excepts.push({ body: bodyItems, name, types: typeArr });\n    }\n\n    return this;\n  }\n\n  /** Add a bare `except:` clause (catches everything). */\n  exceptAll(...body: Array<DoExpr>): this {\n    const key = '';\n    const existing = this._exceptIndex.get(key);\n    if (existing !== undefined) {\n      this._excepts[existing]!.body.push(...body);\n    } else {\n      this._exceptIndex.set(key, this._excepts.length);\n      this._excepts.push({ body, types: [] });\n    }\n    return this;\n  }\n\n  finally(...items: Array<DoExpr>): this {\n    this._finally = items;\n    return this;\n  }\n\n  try(...items: Array<DoExpr>): this {\n    this._try = items;\n    return this;\n  }\n\n  override toAst() {\n    this.$validate();\n\n    const tryStatements = new BlockPyDsl(...this._try!).$do();\n\n    let exceptClauses: Array<py.ExceptClause> | undefined;\n    if (this._excepts.length) {\n      exceptClauses = this._excepts.map((entry) => {\n        const bodyStatements = new BlockPyDsl(...entry.body).$do();\n\n        let exceptionType: py.Expression | undefined;\n        if (entry.types.length === 1) {\n          exceptionType = this.$node(entry.types[0]!);\n        } else if (entry.types.length > 1) {\n          exceptionType = py.factory.createTupleExpression(entry.types.map((t) => this.$node(t)));\n        }\n\n        const exceptionName = entry.name\n          ? py.factory.createIdentifier(this.$name(entry.name) || String(entry.name['~ref']))\n          : undefined;\n\n        return py.factory.createExceptClause([...bodyStatements], exceptionType, exceptionName);\n      });\n    }\n\n    const finallyStatements = this._finally\n      ? [...new BlockPyDsl(...this._finally).$do()]\n      : undefined;\n\n    return py.factory.createTryStatement(\n      [...tryStatements],\n      exceptClauses,\n      undefined,\n      finallyStatements,\n    );\n  }\n\n  $validate(): asserts this is this & {\n    _try: Array<DoExpr>;\n  } {\n    const missing = this.missingRequiredCalls();\n    if (missing.length === 0) return;\n    throw new Error(`Try statement missing ${missing.join(' and ')}`);\n  }\n\n  private missingRequiredCalls(): ReadonlyArray<string> {\n    const missing: Array<string> = [];\n    if (!this._try || this._try.length === 0) missing.push('.try()');\n    return missing;\n  }\n\n  /**\n   * Heuristic: a value is a `NodeName` (intended as the `as` variable)\n   * if it is a plain string matching a Python identifier pattern, or a\n   * Symbol.\n   */\n  private _isNodeName(value: unknown): boolean {\n    if (typeof value === 'string') {\n      return /^[A-Za-z_]\\w*$/.test(value);\n    }\n    // Symbols from codegen-core have `~brand`\n    if (value && typeof value === 'object' && '~brand' in value) {\n      return true;\n    }\n    return false;\n  }\n}\n"
  },
  {
    "path": "packages/openapi-python/src/py-dsl/stmt/var.ts",
    "content": "import type { AnalysisContext, NodeName, Ref } from '@hey-api/codegen-core';\nimport { isSymbol, ref } from '@hey-api/codegen-core';\n\nimport { py } from '../../py-compiler';\nimport { PyDsl } from '../base';\nimport { ValueMixin } from '../mixins/value';\nimport { safeRuntimeName } from '../utils/name';\n\nconst Mixed = ValueMixin(PyDsl<py.Assignment>);\n\nexport type VarType = NodeName | PyDsl<py.Expression>;\n\nexport class VarPyDsl extends Mixed {\n  readonly '~dsl' = 'VarPyDsl';\n  override readonly nameSanitizer = safeRuntimeName;\n\n  protected _type?: Ref<VarType>;\n\n  constructor(name?: NodeName) {\n    super();\n    if (name) this.name.set(name);\n    if (isSymbol(name)) {\n      name.setKind('var');\n    }\n  }\n\n  override analyze(ctx: AnalysisContext): void {\n    super.analyze(ctx);\n    ctx.analyze(this.name);\n    ctx.analyze(this._type);\n  }\n\n  /** Returns true when all required builder calls are present. */\n  get isValid(): boolean {\n    return this.missingRequiredCalls().length === 0;\n  }\n\n  /** Sets the type annotation for the variable. */\n  type(type: VarType): this {\n    this._type = ref(type);\n    return this;\n  }\n\n  override toAst() {\n    this.$validate();\n    const target = this.$node(this.name)!;\n    const type = this.$type();\n    const value = this.$value();\n\n    return py.factory.createAssignment(target, type, value);\n  }\n\n  $validate(): asserts this {\n    const missing = this.missingRequiredCalls();\n    if (missing.length === 0) return;\n    throw new Error(`Variable assignment missing ${missing.join(' and ')}`);\n  }\n\n  protected $type(): py.Expression | undefined {\n    return this.$node(this._type);\n  }\n\n  private missingRequiredCalls(): ReadonlyArray<string> {\n    const missing: Array<string> = [];\n    if (!this.$node(this.name)) missing.push('name');\n    const hasAnnotation = this.$type();\n    const hasValue = this.$value();\n    if (!hasAnnotation && !hasValue) {\n      missing.push('.type() or .assign()');\n    }\n    return missing;\n  }\n}\n"
  },
  {
    "path": "packages/openapi-python/src/py-dsl/stmt/while.ts",
    "content": "import type { AnalysisContext } from '@hey-api/codegen-core';\n\nimport { py } from '../../py-compiler';\nimport type { MaybePyDsl } from '../base';\nimport { PyDsl } from '../base';\nimport type { DoExpr } from '../mixins/do';\nimport { BlockPyDsl } from './block';\n\nconst Mixed = PyDsl<py.WhileStatement>;\n\nexport class WhilePyDsl extends Mixed {\n  readonly '~dsl' = 'WhilePyDsl';\n\n  protected _body?: Array<DoExpr>;\n  protected _condition?: MaybePyDsl<py.Expression>;\n  protected _else?: Array<DoExpr>;\n\n  constructor(condition: MaybePyDsl<py.Expression>, ...body: Array<DoExpr>) {\n    super();\n    this._condition = condition;\n    this._body = body;\n  }\n\n  override analyze(ctx: AnalysisContext): void {\n    super.analyze(ctx);\n\n    if (this._condition) ctx.analyze(this._condition);\n\n    if (this._body) {\n      ctx.pushScope();\n      try {\n        for (const stmt of this._body) ctx.analyze(stmt);\n      } finally {\n        ctx.popScope();\n      }\n    }\n\n    if (this._else) {\n      ctx.pushScope();\n      try {\n        for (const stmt of this._else) ctx.analyze(stmt);\n      } finally {\n        ctx.popScope();\n      }\n    }\n  }\n\n  /** Returns true when all required builder calls are present. */\n  get isValid(): boolean {\n    return this.missingRequiredCalls().length === 0;\n  }\n\n  body(...items: Array<DoExpr>): this {\n    this._body = items;\n    return this;\n  }\n\n  else(...items: Array<DoExpr>): this {\n    this._else = items;\n    return this;\n  }\n\n  override toAst() {\n    this.$validate();\n\n    const body = new BlockPyDsl(...this._body!).$do();\n    const elseBlock = this._else ? new BlockPyDsl(...this._else).$do() : undefined;\n\n    return py.factory.createWhileStatement(\n      this.$node(this._condition!),\n      [...body],\n      elseBlock ? [...elseBlock] : undefined,\n    );\n  }\n\n  $validate(): asserts this is this & {\n    _body: Array<DoExpr>;\n    _condition: MaybePyDsl<py.Expression>;\n  } {\n    const missing = this.missingRequiredCalls();\n    if (missing.length === 0) return;\n    throw new Error(`While statement missing ${missing.join(' and ')}`);\n  }\n\n  private missingRequiredCalls(): ReadonlyArray<string> {\n    const missing: Array<string> = [];\n    if (!this._condition) missing.push('condition');\n    if (!this._body || this._body.length === 0) missing.push('body');\n    return missing;\n  }\n}\n"
  },
  {
    "path": "packages/openapi-python/src/py-dsl/stmt/with.ts",
    "content": "import type { AnalysisContext } from '@hey-api/codegen-core';\n\nimport { py } from '../../py-compiler';\nimport type { MaybePyDsl } from '../base';\nimport { PyDsl } from '../base';\nimport type { DoExpr } from '../mixins/do';\nimport { BlockPyDsl } from './block';\n\nconst Mixed = PyDsl<py.WithStatement>;\n\nexport type WithItemInput =\n  | MaybePyDsl<py.Expression>\n  | { alias?: MaybePyDsl<py.Expression>; context: MaybePyDsl<py.Expression> };\n\nexport class WithPyDsl extends Mixed {\n  readonly '~dsl' = 'WithPyDsl';\n\n  protected _body?: Array<DoExpr>;\n  protected _items: Array<WithItemInput> = [];\n  protected _modifier?: MaybePyDsl<py.Expression>;\n\n  constructor(...items: Array<WithItemInput>) {\n    super();\n    this._items = items;\n  }\n\n  override analyze(ctx: AnalysisContext): void {\n    super.analyze(ctx);\n\n    for (const item of this._items) {\n      if (typeof item === 'object' && 'context' in item) {\n        ctx.analyze(item.context);\n        ctx.analyze(item.alias);\n      } else {\n        ctx.analyze(item);\n      }\n    }\n    if (this._modifier) ctx.analyze(this._modifier);\n\n    if (this._body) {\n      ctx.pushScope();\n      try {\n        for (const stmt of this._body) ctx.analyze(stmt);\n      } finally {\n        ctx.popScope();\n      }\n    }\n  }\n\n  /** Returns true when all required builder calls are present. */\n  get isValid(): boolean {\n    return this.missingRequiredCalls().length === 0;\n  }\n\n  body(...items: Array<DoExpr>): this {\n    this._body = items;\n    return this;\n  }\n\n  item(item: WithItemInput): this {\n    this._items.push(item);\n    return this;\n  }\n\n  modifier(expr: MaybePyDsl<py.Expression>): this {\n    this._modifier = expr;\n    return this;\n  }\n\n  async(): this {\n    this._modifier = py.factory.createIdentifier('async');\n    return this;\n  }\n\n  override toAst() {\n    this.$validate();\n\n    const astItems = this._items.map((item) => {\n      if (typeof item === 'object' && 'context' in item) {\n        return py.factory.createWithItem(this.$node(item.context), this.$node(item.alias));\n      }\n      return py.factory.createWithItem(this.$node(item), undefined);\n    });\n\n    const body = new BlockPyDsl(...this._body!).$do();\n\n    return py.factory.createWithStatement(\n      astItems,\n      [...body],\n      this._modifier ? [this.$node(this._modifier)] : undefined,\n    );\n  }\n\n  $validate(): asserts this is this & {\n    _body: Array<DoExpr>;\n  } {\n    const missing = this.missingRequiredCalls();\n    if (missing.length === 0) return;\n    throw new Error(`With statement missing ${missing.join(' and ')}`);\n  }\n\n  private missingRequiredCalls(): ReadonlyArray<string> {\n    const missing: Array<string> = [];\n    if (!this._items.length) missing.push('items');\n    if (!this._body || this._body.length === 0) missing.push('.body()');\n    return missing;\n  }\n}\n"
  },
  {
    "path": "packages/openapi-python/src/py-dsl/utils/__tests__/name.test.ts",
    "content": "import { describe, expect, it } from 'vitest';\n\nimport { safeRuntimeName } from '../name';\n\ndescribe('safeRuntimeName', () => {\n  const scenarios = [\n    // Digits: valid as regular char, can reprocess → leading underscore\n    { name: '3foo', output: '_3foo' },\n    { name: '123', output: '_123' },\n\n    // $ sign: invalid in Python as regular char → single underscore, skip reprocess\n    { name: '$schema', output: '_schema' },\n    { name: '$foo', output: '_foo' },\n\n    // Hyphen: first char is valid (a, f), hyphen becomes underscore in loop\n    { name: 'api-version', output: 'api_version' },\n    { name: 'foo-bar', output: 'foo_bar' },\n\n    // Normal cases\n    { name: 'foo', output: 'foo' },\n    { name: '_private', output: '_private' },\n\n    // Reserved words\n    { name: 'class', output: 'class_' },\n  ] as const;\n\n  it.each(scenarios)('transforms $name -> $output', ({ name, output }) => {\n    expect(safeRuntimeName(name)).toEqual(output);\n  });\n});\n"
  },
  {
    "path": "packages/openapi-python/src/py-dsl/utils/__tests__/render-utils.test.ts",
    "content": "import { moduleSortKey } from '../render-utils';\n\nconst createFile = (finalPath: string, external = false) => {\n  const parts = finalPath.split('/');\n  const filename = parts.at(-1)!;\n  const dotIndex = filename.lastIndexOf('.');\n  return {\n    extension: dotIndex > 0 ? filename.slice(dotIndex) : undefined,\n    external,\n    finalPath,\n    name: dotIndex > 0 ? filename.slice(0, dotIndex) : filename,\n  };\n};\n\nconst root = '/project/src';\n\ndescribe('moduleSortKey', () => {\n  describe('external imports (group 0)', () => {\n    it('returns external module path unchanged', () => {\n      const file = createFile('/project/src/client.py');\n      const fromFile = createFile('httpx', true);\n\n      const [group, distance, modulePath] = moduleSortKey({\n        file,\n        fromFile,\n        preferFileExtension: '.py',\n        root,\n      });\n\n      expect(group).toBe(0);\n      expect(distance).toBe(0);\n      expect(modulePath).toBe('httpx');\n    });\n  });\n\n  describe('local imports (group 2)', () => {\n    describe('same directory', () => {\n      it('converts sibling file to relative import', () => {\n        const file = createFile('/project/src/api/client.py');\n        const fromFile = createFile('/project/src/api/types.py');\n\n        const [group, distance, modulePath] = moduleSortKey({\n          file,\n          fromFile,\n          preferFileExtension: '.py',\n          root,\n        });\n\n        expect(group).toBe(2);\n        expect(distance).toBe(0);\n        expect(modulePath).toBe('.types');\n      });\n\n      it('handles index.py as implicit module', () => {\n        const file = createFile('/project/src/api/client.py');\n        const fromFile = createFile('/project/src/api/index.py');\n\n        const [, , modulePath] = moduleSortKey({\n          file,\n          fromFile,\n          preferFileExtension: '.py',\n          root,\n        });\n\n        expect(modulePath).toBe('.');\n      });\n\n      it('handles __init__.py as implicit module', () => {\n        const file = createFile('/project/src/api/client.py');\n        const fromFile = createFile('/project/src/api/__init__.py');\n\n        const [, , modulePath] = moduleSortKey({\n          file,\n          fromFile,\n          preferFileExtension: '.py',\n          root,\n        });\n\n        expect(modulePath).toBe('.');\n      });\n    });\n\n    describe('child directory', () => {\n      it('converts nested path to dotted module', () => {\n        const file = createFile('/project/src/client.py');\n        const fromFile = createFile('/project/src/models/user.py');\n\n        const [group, distance, modulePath] = moduleSortKey({\n          file,\n          fromFile,\n          preferFileExtension: '.py',\n          root,\n        });\n\n        expect(group).toBe(2);\n        expect(distance).toBe(0);\n        expect(modulePath).toBe('.models.user');\n      });\n\n      it('handles deeply nested paths', () => {\n        const file = createFile('/project/src/client.py');\n        const fromFile = createFile('/project/src/api/v1/endpoints/users.py');\n\n        const [, , modulePath] = moduleSortKey({\n          file,\n          fromFile,\n          preferFileExtension: '.py',\n          root,\n        });\n\n        expect(modulePath).toBe('.api.v1.endpoints.users');\n      });\n\n      it('handles index.py in child directory', () => {\n        const file = createFile('/project/src/client.py');\n        const fromFile = createFile('/project/src/models/index.py');\n\n        const [, , modulePath] = moduleSortKey({\n          file,\n          fromFile,\n          preferFileExtension: '.py',\n          root,\n        });\n\n        expect(modulePath).toBe('.models');\n      });\n    });\n\n    describe('parent directory', () => {\n      it('converts single parent traversal', () => {\n        const file = createFile('/project/src/api/client.py');\n        const fromFile = createFile('/project/src/types.py');\n\n        const [group, distance, modulePath] = moduleSortKey({\n          file,\n          fromFile,\n          preferFileExtension: '.py',\n          root,\n        });\n\n        expect(group).toBe(2);\n        expect(distance).toBe(1);\n        expect(modulePath).toBe('..types');\n      });\n\n      it('converts double parent traversal', () => {\n        const file = createFile('/project/src/api/v1/client.py');\n        const fromFile = createFile('/project/src/types.py');\n\n        const [, distance, modulePath] = moduleSortKey({\n          file,\n          fromFile,\n          preferFileExtension: '.py',\n          root,\n        });\n\n        expect(distance).toBe(2);\n        expect(modulePath).toBe('...types');\n      });\n\n      it('handles index.py in parent directory', () => {\n        const file = createFile('/project/src/api/client.py');\n        const fromFile = createFile('/project/src/index.py');\n\n        const [, , modulePath] = moduleSortKey({\n          file,\n          fromFile,\n          preferFileExtension: '.py',\n          root,\n        });\n\n        expect(modulePath).toBe('..');\n      });\n    });\n\n    describe('sibling directory', () => {\n      it('converts sibling directory path', () => {\n        const file = createFile('/project/src/api/client.py');\n        const fromFile = createFile('/project/src/models/user.py');\n\n        const [, distance, modulePath] = moduleSortKey({\n          file,\n          fromFile,\n          preferFileExtension: '.py',\n          root,\n        });\n\n        expect(distance).toBe(1);\n        expect(modulePath).toBe('..models.user');\n      });\n\n      it('handles index.py in sibling directory', () => {\n        const file = createFile('/project/src/api/client.py');\n        const fromFile = createFile('/project/src/models/index.py');\n\n        const [, , modulePath] = moduleSortKey({\n          file,\n          fromFile,\n          preferFileExtension: '.py',\n          root,\n        });\n\n        expect(modulePath).toBe('..models');\n      });\n    });\n  });\n});\n"
  },
  {
    "path": "packages/openapi-python/src/py-dsl/utils/context.ts",
    "content": "import type { BindingKind } from '@hey-api/codegen-core';\n// import type { BindingKind, NodeScope, Symbol } from '@hey-api/codegen-core';\n// import { isSymbol } from '@hey-api/codegen-core';\nimport type { MaybeFunc } from '@hey-api/types';\n\nimport type { py } from '../../py-compiler';\nimport type { DollarPyDsl } from '../../py-dsl';\n// import { $, PythonRenderer } from '../../py-dsl';\nimport type { PyDsl } from '../base';\nimport type { CallArgs } from '../expr/call';\n\nexport type NodeChain = ReadonlyArray<PyDsl>;\n\nexport interface AccessOptions {\n  /** The access context. */\n  context?: 'example';\n  /** Enable debug mode. */\n  debug?: boolean;\n  /** Transform function for each node in the access chain. */\n  transform?: (node: PyDsl, index: number, chain: NodeChain) => PyDsl;\n}\n\n// export type AccessResult = ReturnType<typeof $.expr | typeof $.attr | typeof $.call | typeof $.new>;\n\nexport interface ExampleOptions {\n  /** Import kind for the root node. */\n  importKind?: BindingKind;\n  /** Import name for the root node. */\n  importName?: string;\n  /** Setup to run before calling the example. */\n  importSetup?: MaybeFunc<\n    (\n      ctx: DollarPyDsl & {\n        /** The imported expression. */\n        node: PyDsl<py.Expression>;\n      },\n    ) => PyDsl<py.Expression>\n  >;\n  /** Module to import from. */\n  moduleName?: string;\n  /** Example request payload. */\n  payload?: MaybeFunc<(ctx: DollarPyDsl) => CallArgs | CallArgs[number]>;\n  /** Variable name for setup node. */\n  setupName?: string;\n}\n\n// function accessChainToNode<T = AccessResult>(accessChain: NodeChain): T {\n//   let result!: AccessResult;\n//   accessChain.forEach((node, index) => {\n//     if (index === 0) {\n//       // assume correct node\n//       result = node as typeof result;\n//     } else {\n//       result = result.attr(node.name);\n//     }\n//   });\n//   return result as T;\n// }\n\n// function getAccessChainForNode(node: PyDsl): NodeChain {\n//   const structuralChain = [...getStructuralChainForNode(node, new Set())];\n//   const accessChain = structuralToAccessChain(structuralChain);\n//   if (accessChain.length === 0) {\n//     // I _think_ this should not happen, but it does and this fix works for now.\n//     // I assume this will cause issues with imports in some cases, investigate\n//     // when it actually happens.\n//     return [node.clone()];\n//   }\n//   return accessChain.map((node) => node.clone());\n// }\n\n// function getScope(node: PyDsl): NodeScope {\n//   return node.scope ?? 'value';\n// }\n\n// function getStructuralChainForNode(node: PyDsl, visited: Set<PyDsl>): NodeChain {\n//   if (visited.has(node)) return [];\n//   visited.add(node);\n\n//   if (isStopNode(node)) return [];\n\n//   if (node.structuralParents) {\n//     for (const [parent] of node.structuralParents) {\n//       if (getScope(parent) !== getScope(node)) continue;\n\n//       const chain = getStructuralChainForNode(parent, visited);\n//       if (chain.length > 0) return [...chain, node];\n//     }\n//   }\n\n//   if (!node.root) return [];\n\n//   return [node];\n// }\n\n// function isAccessorNode(node: PyDsl): boolean {\n//   return (\n//     node['~dsl'] === 'FieldPyDsl' ||\n//     node['~dsl'] === 'GetterPyDsl' ||\n//     node['~dsl'] === 'MethodPyDsl'\n//   );\n// }\n\n// function isStopNode(node: PyDsl): boolean {\n//   return node['~dsl'] === 'FuncPyDsl' || node['~dsl'] === 'TemplatePyDsl';\n// }\n\n/**\n * Fold a structural chain to an access chain by removing\n * non-accessor nodes.\n */\n// function structuralToAccessChain(structuralChain: NodeChain): NodeChain {\n//   const accessChain: Array<PyDsl> = [];\n//   structuralChain.forEach((node, index) => {\n//     // assume first node is always included\n//     if (index === 0) {\n//       accessChain.push(node);\n//     } else if (isAccessorNode(node)) {\n//       accessChain.push(node);\n//     }\n//   });\n//   return accessChain;\n// }\n\n// function transformAccessChain(accessChain: NodeChain, options: AccessOptions = {}): NodeChain {\n//   return accessChain.map((node, index) => {\n//     const transformedNode = options.transform?.(node, index, accessChain);\n//     if (transformedNode) return transformedNode;\n//     const accessNode = node.toAccessNode?.(node, options, {\n//       chain: accessChain,\n//       index,\n//       isLeaf: index === accessChain.length - 1,\n//       isRoot: index === 0,\n//       length: accessChain.length,\n//     });\n//     if (accessNode) return accessNode;\n//     if (index === 0) {\n//       if (node['~dsl'] === 'ClassPyDsl') {\n//         const nextNode = accessChain[index + 1];\n//         if (nextNode && isAccessorNode(nextNode)) {\n//           if ((nextNode as ReturnType<typeof $.field>).hasModifier('static')) {\n//             return $(node.name);\n//           }\n//         }\n//         return $.new(node.name).args();\n//       }\n//       return $(node.name);\n//     }\n//     return node;\n//   });\n// }\n\nexport class PyDslContext {\n  /**\n   * Build an expression for accessing the node.\n   *\n   * @param node - The node or symbol to build access for\n   * @param options - Access options\n   * @returns Expression for accessing the node\n   *\n   * @example\n   * ```ts\n   * ctx.access(node); // → Expression for accessing the node\n   * ```\n   */\n  // access<T = AccessResult>(node: PyDsl | Symbol<PyDsl>, options?: AccessOptions): T {\n  //   const n = isSymbol(node) ? node.node : node;\n  //   if (!n) {\n  //     throw new Error(`Symbol ${node.name} is not resolved to a node.`);\n  //   }\n  //   const accessChain = getAccessChainForNode(n);\n  //   const finalChain = transformAccessChain(accessChain, options);\n  //   return accessChainToNode<T>(finalChain);\n  // }\n  /**\n   * Build an example.\n   *\n   * @param node - The node to generate an example for\n   * @param options - Example options\n   * @returns Full example string\n   *\n   * @example\n   * ```ts\n   * ctx.example(node, { moduleName: 'my-sdk' }); // → Full example string\n   * ```\n   */\n  // example(\n  //   node: PyDsl,\n  //   options?: ExampleOptions,\n  //   astOptions?: Parameters<typeof PythonRenderer.astToString>[0],\n  // ): string {\n  //   if (astOptions) {\n  //     return PythonRenderer.astToString(astOptions);\n  //   }\n  //   options ||= {};\n  //   const accessChain = getAccessChainForNode(node);\n  //   if (options.importName) {\n  //     accessChain[0]!.name.set(options.importName);\n  //   }\n  //   const importNode = $(accessChain[0]!.name.toString()); // must store name before transform\n  //   const finalChain = transformAccessChain(accessChain, {\n  //     context: 'example',\n  //   });\n  //   const setupNode = options.importSetup\n  //     ? typeof options.importSetup === 'function'\n  //       ? options.importSetup({ $, node: importNode })\n  //       : options.importSetup\n  //     : (finalChain[0]! as PyDsl<py.Expression>);\n  //   const setupName = options.setupName;\n  //   let payload = typeof options.payload === 'function' ? options.payload({ $ }) : options.payload;\n  //   payload = payload instanceof Array ? payload : payload ? [payload] : [];\n  //   let nodes: Array<PyDsl> = [];\n  //   if (setupName) {\n  //     nodes = [\n  //       $.const(setupName).assign(setupNode),\n  //       $.await(accessChainToNode([$(setupName), ...finalChain.slice(1)]).call(...payload)),\n  //     ];\n  //   } else {\n  //     nodes = [$.await(accessChainToNode([setupNode, ...finalChain.slice(1)]).call(...payload))];\n  //   }\n  //   const localName = importNode.name.toString();\n  //   return PythonRenderer.astToString({\n  //     imports: [\n  //       [\n  //         {\n  //           imports:\n  //             !options.importKind || options.importKind === 'named'\n  //               ? [\n  //                   {\n  //                     isTypeOnly: false,\n  //                     localName,\n  //                     sourceName: localName,\n  //                   },\n  //                 ]\n  //               : [],\n  //           isTypeOnly: false,\n  //           kind: options.importKind ?? 'named',\n  //           localName: options.importKind !== 'named' ? localName : undefined,\n  //           modulePath: options.moduleName ?? 'your-package',\n  //         },\n  //       ],\n  //     ],\n  //     nodes,\n  //     trailingNewline: false,\n  //   });\n  // }\n}\n\nexport const ctx = new PyDslContext();\n"
  },
  {
    "path": "packages/openapi-python/src/py-dsl/utils/factories.ts",
    "content": "import type { AttrCtor } from '../expr/attr';\nimport type { CallCtor } from '../expr/call';\nimport type { SubscriptCtor } from '../expr/subscript';\nimport type { ReturnCtor } from '../stmt/return';\n\ntype Ctor = (...args: Array<any>) => any;\n\ntype Factory<T extends Ctor> = {\n  (...args: Parameters<T>): ReturnType<T>;\n  /** Sets the implementation of this factory. */\n  set(fn: T): void;\n};\n\nfunction createFactory<T extends Ctor>(name: string): Factory<T> {\n  let impl: T | undefined;\n\n  const slot = ((...args: Parameters<T>) => {\n    if (!impl) throw new Error(`${name} factory not registered`);\n    return impl(...args);\n  }) as Factory<T>;\n\n  slot.set = (fn: T) => {\n    impl = fn;\n  };\n\n  return slot;\n}\n\nexport const f = {\n  /** Factory for creating property access expressions (e.g. `obj.foo`). */\n  attr: createFactory<AttrCtor>('attr'),\n\n  /** Factory for creating function or method call expressions (e.g. `fn(arg)`). */\n  call: createFactory<CallCtor>('call'),\n\n  /** Factory for creating return statements. */\n  return: createFactory<ReturnCtor>('return'),\n\n  /** Factory for creating slice expressions. */\n  slice: createFactory<SubscriptCtor>('slice'),\n};\n"
  },
  {
    "path": "packages/openapi-python/src/py-dsl/utils/keywords.ts",
    "content": "const pythonKeywords = [\n  'and',\n  'as',\n  'assert',\n  'async',\n  'await',\n  'break',\n  'class',\n  'continue',\n  'def',\n  'del',\n  'elif',\n  'else',\n  'except',\n  'False',\n  'finally',\n  'for',\n  'from',\n  'global',\n  'if',\n  'import',\n  'in',\n  'is',\n  'lambda',\n  'None',\n  'nonlocal',\n  'not',\n  'or',\n  'pass',\n  'raise',\n  'return',\n  'True',\n  'try',\n  'while',\n  'with',\n  'yield',\n];\n\nconst pythonBuiltins = [\n  'abs',\n  'aiter',\n  'all',\n  'anext',\n  'any',\n  'ascii',\n  'bin',\n  'bool',\n  'breakpoint',\n  'bytearray',\n  'bytes',\n  'callable',\n  'chr',\n  'classmethod',\n  'compile',\n  'complex',\n  'delattr',\n  'dict',\n  'dir',\n  'divmod',\n  'enumerate',\n  'eval',\n  'exec',\n  'filter',\n  'float',\n  'format',\n  'frozenset',\n  'getattr',\n  'globals',\n  'hasattr',\n  'hash',\n  'help',\n  'hex',\n  'id',\n  'input',\n  'int',\n  'isinstance',\n  'issubclass',\n  'iter',\n  'len',\n  'list',\n  'locals',\n  'map',\n  'max',\n  'memoryview',\n  'min',\n  'next',\n  'object',\n  'oct',\n  'open',\n  'ord',\n  'pow',\n  'print',\n  'property',\n  'range',\n  'repr',\n  'reversed',\n  'round',\n  'set',\n  'setattr',\n  'slice',\n  'sorted',\n  'staticmethod',\n  'str',\n  'sum',\n  'super',\n  'tuple',\n  'type',\n  'vars',\n  'zip',\n];\n\nexport const keywords = {\n  pythonBuiltins,\n  pythonKeywords,\n};\n"
  },
  {
    "path": "packages/openapi-python/src/py-dsl/utils/lazy.ts",
    "content": "import type { AnalysisContext } from '@hey-api/codegen-core';\n\nimport type { py } from '../../py-compiler';\nimport { PyDsl } from '../base';\nimport type { PyDslContext } from './context';\nimport { ctx } from './context';\n\nexport type LazyThunk<T extends py.Node> = (ctx: PyDslContext) => PyDsl<T>;\n\nexport class LazyPyDsl<T extends py.Node = py.Node> extends PyDsl<T> {\n  readonly '~dsl' = 'LazyPyDsl';\n\n  private _thunk: LazyThunk<T>;\n\n  constructor(thunk: LazyThunk<T>) {\n    super();\n    this._thunk = thunk;\n  }\n\n  override analyze(ctx: AnalysisContext): void {\n    super.analyze(ctx);\n    ctx.analyze(this.toResult());\n  }\n\n  toResult(): PyDsl<T> {\n    return this._thunk(ctx);\n  }\n\n  override toAst() {\n    return this.toResult().toAst();\n  }\n}\n"
  },
  {
    "path": "packages/openapi-python/src/py-dsl/utils/name.ts",
    "content": "import { regexp } from './regexp';\nimport type { ReservedList } from './reserved';\nimport { reserved } from './reserved';\n\nexport const safeAccessorName = (name: string): string => {\n  regexp.number.lastIndex = 0;\n  if (regexp.number.test(name)) {\n    return name.startsWith('-') ? `'${name}'` : name;\n  }\n\n  regexp.pythonIdentifier.lastIndex = 0;\n  if (regexp.pythonIdentifier.test(name)) {\n    return name;\n  }\n  return `'${name}'`;\n};\n\nconst validPythonChar = /^[a-zA-Z0-9_]$/;\n\nconst safeName = (name: string, reserved: ReservedList): string => {\n  let sanitized = '';\n  let index: number;\n\n  const first = name[0] ?? '';\n  regexp.illegalStartCharacters.lastIndex = 0;\n  if (regexp.illegalStartCharacters.test(first)) {\n    // Check if character becomes valid when not in leading position (e.g., digits)\n    if (validPythonChar.test(first)) {\n      sanitized += '_';\n      index = 0;\n    } else {\n      sanitized += '_';\n      index = 1;\n    }\n  } else {\n    sanitized += first;\n    index = 1;\n  }\n\n  while (index < name.length) {\n    const char = name[index] ?? '';\n    sanitized += validPythonChar.test(char) ? char : '_';\n    index += 1;\n  }\n\n  if (reserved['~values'].has(sanitized)) {\n    sanitized = `${sanitized}_`;\n  }\n\n  return sanitized || '_';\n};\n\nexport const safeRuntimeName = (name: string): string => safeName(name, reserved.runtime);\n\nexport const safeKeywordName = (name: string): string => safeName(name, reserved.keywords);\n"
  },
  {
    "path": "packages/openapi-python/src/py-dsl/utils/regexp.ts",
    "content": "/**\n * Matches characters from the start that are not valid Python identifier starts.\n * Python identifiers: starts with letter/underscore, followed by letters/digits/underscores.\n */\nconst illegalStartCharactersRegExp = /^[^a-zA-Z_]+/;\n\n/**\n * Matches if string contains only digits and optionally decimal point or leading minus.\n */\nconst numberRegExp = /^-?\\d+(\\.\\d+)?$/;\n\n/**\n * Python identifier pattern: starts with letter or underscore,\n * followed by letters, digits, or underscores.\n * Uses Unicode categories for full Python 3 compliance.\n */\nconst validPythonIdentifierRegExp = /^[a-zA-Z_][a-zA-Z0-9_]*$/u;\n\n/**\n * Matches if a string looks like a valid Python identifier.\n */\nconst looksLikeIdentifierRegExp = /^[a-zA-Z_][a-zA-Z0-9_]*$/;\n\nexport const regexp = {\n  /**\n   * Matches characters from the start that are not valid Python identifier starts.\n   */\n  illegalStartCharacters: illegalStartCharactersRegExp,\n  /**\n   * Simpler pattern for quick identifier checks.\n   */\n  looksLikeIdentifier: looksLikeIdentifierRegExp,\n  /**\n   * Matches if string contains only digits and optionally decimal point or leading minus.\n   */\n  number: numberRegExp,\n  /**\n   * Python identifier pattern for validation.\n   */\n  pythonIdentifier: validPythonIdentifierRegExp,\n};\n"
  },
  {
    "path": "packages/openapi-python/src/py-dsl/utils/render-utils.ts",
    "content": "import path from 'node:path';\n\nimport type { ExportModule, File, ImportModule } from '@hey-api/codegen-core';\n\nimport { py } from '../../py-compiler';\n\nconst printer = py.createPrinter({\n  indentSize: 4,\n});\n\n/** Print a Python node to a string. */\nexport function astToString(node: py.Node): string {\n  const result = printer.printFile(node);\n  return result;\n}\n\nexport type SortGroup = number;\nexport type SortDistance = number;\nexport type SortModule = string;\nexport type SortKey = [SortGroup, SortDistance, SortModule];\n\nexport type ModuleExport = Omit<ExportModule, 'from'> & {\n  /** Module specifier for re-exports, e.g. `./foo`. */\n  modulePath: string;\n};\n\nexport type ModuleImport = Omit<ImportModule, 'from'> & {\n  /** Module specifier for imports, e.g. `./foo`. */\n  modulePath: string;\n};\n\nexport function moduleSortKey({\n  file,\n  fromFile,\n  root,\n}: {\n  file: Pick<File, 'finalPath'>;\n  fromFile: Pick<File, 'finalPath' | 'extension' | 'external' | 'name'>;\n  preferFileExtension: string;\n  root: string;\n}): SortKey {\n  const filePath = file.finalPath!.split(path.sep).join('/');\n  let modulePath = fromFile.finalPath!.split(path.sep).join('/');\n\n  // built-ins\n  // TODO\n\n  // external\n  if (fromFile.external && !path.isAbsolute(modulePath)) {\n    return [0, 0, modulePath];\n  }\n\n  // outside project root\n  if (!modulePath.startsWith(root.split(path.sep).join('/'))) {\n    return [1, 0, modulePath];\n  }\n\n  // local\n  const rel = path\n    .relative(path.dirname(filePath), path.dirname(modulePath))\n    .split(path.sep)\n    .join('/');\n\n  const segments = rel ? rel.split('/') : [];\n  const parentCount = segments.filter((s) => s === '..').length;\n\n  const leadingDots = '.'.repeat(parentCount + 1);\n\n  const pathSegments = segments.filter((s) => s !== '..' && s !== '.');\n\n  const filename = modulePath.split('/').at(-1)!;\n  // TODO: replace with extension check, there's an issue with external files\n  // not having extension set\n  const moduleName = filename.replace(/\\.[^.]+$/, '');\n  // const moduleName = fromFile.extension\n  //   ? filename.slice(0, -fromFile.extension.length)\n  //   : filename;\n\n  // index/__init__ are implicit\n  const isImplicitModule = moduleName === 'index' || moduleName === '__init__';\n  if (!isImplicitModule) {\n    pathSegments.push(moduleName);\n  }\n\n  modulePath = pathSegments.length > 0 ? leadingDots + pathSegments.join('.') : leadingDots;\n\n  return [2, parentCount, modulePath];\n}\n"
  },
  {
    "path": "packages/openapi-python/src/py-dsl/utils/render.ts",
    "content": "import type { RenderContext, Renderer } from '@hey-api/codegen-core';\nimport type { BaseOutput } from '@hey-api/shared';\nimport type { MaybeArray, MaybeFunc } from '@hey-api/types';\n\nimport { py } from '../../py-compiler';\nimport type { PyDsl } from '../../py-dsl';\nimport type { ModuleExport, ModuleImport, SortGroup, SortKey, SortModule } from './render-utils';\nimport { astToString, moduleSortKey } from './render-utils';\n\ntype Exports = ReadonlyArray<ReadonlyArray<ModuleExport>>;\ntype ExportsOptions = {\n  preferExportAll?: boolean;\n};\ntype Header = MaybeArray<string> | null | undefined;\ntype HeaderArg = MaybeFunc<(ctx: RenderContext<PyDsl>) => Header>;\ntype Imports = Array<ReadonlyArray<ModuleImport>>;\n\nfunction headerToLines(header: Header): ReadonlyArray<string> {\n  if (!header) return [];\n  const lines: Array<string> = [];\n  if (typeof header === 'string') {\n    lines.push(...header.split(/\\r?\\n/));\n    return lines;\n  }\n  for (const line of header) {\n    lines.push(...line.split(/\\r?\\n/));\n  }\n  return lines;\n}\n\nexport class PythonRenderer implements Renderer {\n  /**\n   * Function to generate a file header.\n   *\n   * @private\n   */\n  private _header?: HeaderArg;\n  /**\n   * Options for module specifier resolution.\n   *\n   * @private\n   */\n  private _module?: Partial<BaseOutput>['module'];\n  /**\n   * Whether `export * from 'module'` should be used when possible instead of named exports.\n   *\n   * @private\n   */\n  private _preferExportAll: boolean;\n\n  constructor(\n    args: Pick<Partial<BaseOutput>, 'module'> & {\n      header?: HeaderArg;\n      preferExportAll?: boolean;\n    } = {},\n  ) {\n    this._header = args.header;\n    this._module = args.module;\n    this._preferExportAll = args.preferExportAll ?? false;\n  }\n\n  render(ctx: RenderContext<PyDsl>): string {\n    const header = typeof this._header === 'function' ? this._header(ctx) : this._header;\n    return PythonRenderer.astToString({\n      exports: this.getExports(ctx),\n      exportsOptions: {\n        preferExportAll: this._preferExportAll,\n      },\n      header,\n      imports: this.getImports(ctx),\n      nodes: ctx.file.nodes,\n    });\n  }\n\n  supports(ctx: RenderContext): boolean {\n    return ctx.file.language === 'python';\n  }\n\n  static astToString(args: {\n    exports?: Exports;\n    exportsOptions?: ExportsOptions;\n    header?: Header;\n    imports?: Imports;\n    nodes?: ReadonlyArray<PyDsl>;\n    /**\n     * Whether to include a trailing newline at the end of the file.\n     *\n     * @default true\n     */\n    trailingNewline?: boolean;\n  }): string {\n    let text = '';\n    for (const header of headerToLines(args.header)) {\n      text += `${header}\\n`;\n    }\n\n    const argsImports = args.imports ?? [];\n\n    for (const group of args.exports ?? []) {\n      for (const exp of group) {\n        let found = false;\n        for (const impGroup of argsImports) {\n          if (found) break;\n          for (const imp of impGroup) {\n            if (imp.modulePath === exp.modulePath) {\n              // TODO: merge imports and exports from the same module\n              found = true;\n              break;\n            }\n          }\n        }\n        if (!found) {\n          argsImports.push([\n            {\n              imports: exp.exports.map((exp) => ({\n                isTypeOnly: exp.isTypeOnly,\n                localName: exp.exportedName,\n                sourceName: exp.exportedName,\n              })),\n              isTypeOnly: false,\n              kind: 'named',\n              modulePath: exp.modulePath,\n            },\n          ]);\n        }\n      }\n    }\n\n    let imports = '';\n    for (const group of argsImports) {\n      if (imports) imports += '\\n';\n      for (const imp of group) {\n        imports += `${astToString(PythonRenderer.toImportAst(imp))}`;\n      }\n    }\n    text = `${text}${text && imports ? '\\n' : ''}${imports}`;\n\n    let exports = '';\n    for (const group of args.exports ?? []) {\n      if (exports) exports += '\\n';\n      for (const exp of group) {\n        exports += `${astToString(PythonRenderer.toExportAst(exp, args.exportsOptions))}`;\n      }\n    }\n    text = `${text}${text && exports ? '\\n' : ''}${exports}`;\n\n    let nodes = '';\n    for (const node of args.nodes ?? []) {\n      if (nodes) nodes += '\\n\\n';\n      nodes += `${astToString(node.toAst())}`;\n    }\n    text = `${text}${text && nodes ? '\\n\\n' : ''}${nodes}`;\n\n    if (args.trailingNewline === false && text.endsWith('\\n')) {\n      text = text.slice(0, -1);\n    }\n\n    return text;\n  }\n\n  // eslint-disable-next-line @typescript-eslint/no-unused-vars\n  static toExportAst(group: ModuleExport, options?: ExportsOptions): py.Assignment {\n    const specifiers = group.exports.map((exp) => py.factory.createLiteral(exp.exportedName));\n    return py.factory.createAssignment(\n      py.factory.createIdentifier('__all__'),\n      undefined,\n      py.factory.createListExpression(specifiers),\n    );\n  }\n\n  static toImportAst(group: ModuleImport): py.ImportStatement {\n    const names: Array<{\n      alias?: string;\n      name: string;\n    }> = group.imports.map((imp) => ({\n      alias: imp.localName !== imp.sourceName ? imp.localName : undefined,\n      name: imp.sourceName,\n    }));\n    return py.factory.createImportStatement(group.modulePath, names, group.imports.length > 0);\n  }\n\n  private getExports(ctx: RenderContext): Exports {\n    type ModuleEntry = {\n      group: ModuleExport;\n      sortKey: SortKey;\n    };\n\n    const groups = new Map<SortGroup, Map<SortModule, ModuleEntry>>();\n\n    for (const exp of ctx.file.exports) {\n      const sortKey = moduleSortKey({\n        file: ctx.file,\n        fromFile: exp.from,\n        preferFileExtension: this._module?.extension || '',\n        root: ctx.project.root,\n      });\n      const modulePath = this._module?.resolve?.(sortKey[2], ctx) ?? sortKey[2];\n      const [groupIndex] = sortKey;\n\n      if (!groups.has(groupIndex)) groups.set(groupIndex, new Map());\n      const moduleMap = groups.get(groupIndex)!;\n\n      if (!moduleMap.has(modulePath)) {\n        moduleMap.set(modulePath, {\n          group: {\n            canExportAll: exp.canExportAll,\n            exports: exp.exports,\n            isTypeOnly: exp.isTypeOnly,\n            modulePath,\n            namespaceExport: exp.namespaceExport,\n          },\n          sortKey,\n        });\n      }\n    }\n\n    const exports: Array<Array<ModuleExport>> = Array.from(groups.entries())\n      .sort((a, b) => a[0] - b[0])\n      .map(([, moduleMap]) => {\n        const entries = Array.from(moduleMap.values());\n\n        entries.sort((a, b) => {\n          const d = a.sortKey[1] - b.sortKey[1];\n          return d !== 0 ? d : a.group.modulePath.localeCompare(b.group.modulePath);\n        });\n\n        return entries.map((e) => {\n          const group = e.group;\n          if (group.namespaceExport) {\n            group.exports = [];\n          } else {\n            const isTypeOnly = !group.exports.find((exp) => !exp.isTypeOnly);\n            if (isTypeOnly) {\n              group.isTypeOnly = true;\n              for (const exp of group.exports) {\n                exp.isTypeOnly = false;\n              }\n            }\n            group.exports.sort((a, b) => a.exportedName.localeCompare(b.exportedName));\n          }\n          return group;\n        });\n      });\n\n    return exports;\n  }\n\n  private getImports(ctx: RenderContext): Imports {\n    type ModuleEntry = {\n      group: ModuleImport;\n      sortKey: SortKey;\n    };\n\n    const groups = new Map<SortGroup, Map<SortModule, ModuleEntry>>();\n\n    for (const imp of ctx.file.imports) {\n      const sortKey = moduleSortKey({\n        file: ctx.file,\n        fromFile: imp.from,\n        preferFileExtension: this._module?.extension || '',\n        root: ctx.project.root,\n      });\n      const modulePath = this._module?.resolve?.(sortKey[2], ctx) ?? sortKey[2];\n      const [groupIndex] = sortKey;\n\n      if (!groups.has(groupIndex)) groups.set(groupIndex, new Map());\n      const moduleMap = groups.get(groupIndex)!;\n\n      if (!moduleMap.has(modulePath)) {\n        moduleMap.set(modulePath, {\n          group: {\n            imports: [],\n            isTypeOnly: false,\n            kind: imp.kind,\n            modulePath,\n          },\n          sortKey,\n        });\n      }\n\n      const entry = moduleMap.get(modulePath)!;\n      const group = entry.group;\n\n      if (imp.kind !== 'named') {\n        group.isTypeOnly = imp.isTypeOnly;\n        group.kind = imp.kind;\n        group.localName = imp.localName;\n      } else {\n        group.imports.push(...imp.imports);\n      }\n    }\n\n    const imports: Array<Array<ModuleImport>> = Array.from(groups.entries())\n      .sort((a, b) => a[0] - b[0])\n      .map(([, moduleMap]) => {\n        const entries = Array.from(moduleMap.values());\n\n        entries.sort((a, b) => {\n          const d = a.sortKey[1] - b.sortKey[1];\n          return d !== 0 ? d : a.group.modulePath.localeCompare(b.group.modulePath);\n        });\n\n        return entries.map((e) => {\n          const group = e.group;\n          if (group.kind === 'namespace') {\n            group.imports = [];\n          } else {\n            const isTypeOnly = !group.imports.find((imp) => !imp.isTypeOnly);\n            if (isTypeOnly) {\n              group.isTypeOnly = true;\n              for (const imp of group.imports) {\n                imp.isTypeOnly = false;\n              }\n            }\n            group.imports.sort((a, b) => a.localName.localeCompare(b.localName));\n          }\n          return group;\n        });\n      });\n\n    return imports;\n  }\n}\n"
  },
  {
    "path": "packages/openapi-python/src/py-dsl/utils/reserved.ts",
    "content": "import { keywords } from './keywords';\n\ntype List = ReadonlyArray<string>;\n\nexport class ReservedList {\n  private _array: List;\n  private _set: Set<string>;\n\n  constructor(values: List) {\n    this._array = values;\n    this._set = new Set(values);\n  }\n\n  get '~values'() {\n    return this._set;\n  }\n\n  /**\n   * Updates the reserved list with new values.\n   *\n   * @param values New reserved values or a function that receives the previous\n   * reserved values and returns the new ones.\n   */\n  set(values: List | ((prev: List) => List)): void {\n    const vals = typeof values === 'function' ? values(this._array) : values;\n    this._array = vals;\n    this._set = new Set(vals);\n  }\n}\n\nconst runtimeReserved = new ReservedList([...keywords.pythonKeywords, ...keywords.pythonBuiltins]);\nconst keywordReserved = new ReservedList([...keywords.pythonKeywords]);\n\n/**\n * Reserved names for identifiers. These names will not be used\n * for variables, functions, classes, or other identifiers in generated code.\n */\nexport const reserved = {\n  /**\n   * Reserved names for Python language keywords. These names are syntactically\n   * invalid as identifiers in any scope.\n   */\n  keywords: keywordReserved,\n  /**\n   * Reserved names for runtime identifiers. These names will not be used\n   * for variables, functions, classes, or other runtime identifiers in\n   * generated code.\n   */\n  runtime: runtimeReserved,\n};\n"
  },
  {
    "path": "packages/openapi-python/src/run.ts",
    "content": "#!/usr/bin/env node\n\nimport { runCli } from './cli';\n\nrunCli();\n"
  },
  {
    "path": "packages/openapi-python/tsconfig.json",
    "content": "{\n  \"extends\": \"../../tsconfig.base.json\",\n  \"compilerOptions\": {\n    \"composite\": true,\n    \"rootDir\": \"src\",\n    \"outDir\": \"dist\",\n    \"types\": [\"vitest/globals\", \"node\"]\n  },\n  \"include\": [\"src\"],\n  \"references\": [\n    { \"path\": \"../types\" },\n    { \"path\": \"../codegen-core\" },\n    { \"path\": \"../shared\" },\n    { \"path\": \"../json-schema-ref-parser\" }\n  ]\n}\n"
  },
  {
    "path": "packages/openapi-python/tsdown.config.ts",
    "content": "import fs from 'node:fs';\nimport path from 'node:path';\nimport { fileURLToPath } from 'node:url';\n\nimport { defineConfig } from 'tsdown';\n\nconst __dirname = path.dirname(fileURLToPath(import.meta.url));\n\nexport default defineConfig({\n  clean: true,\n  dts: true,\n  entry: ['./src/{index,run}.ts'],\n  format: ['esm'],\n  minify: false,\n  onSuccess: async () => {\n    // Copy client files to dist folder for runtime access\n    const pluginNames = ['client-httpx'];\n\n    for (const pluginName of pluginNames) {\n      const srcPath = path.resolve(__dirname, 'src', 'plugins', '@hey-api', pluginName, 'bundle');\n      const destPath = path.resolve(\n        __dirname,\n        'dist',\n        'clients',\n        pluginName.slice('client-'.length),\n      );\n\n      if (fs.existsSync(srcPath)) {\n        fs.mkdirSync(path.dirname(destPath), { recursive: true });\n        fs.cpSync(srcPath, destPath, { recursive: true });\n\n        // replace core imports in client bundle\n        // const clientFiles = fs.readdirSync(destPath);\n        // for (const file of clientFiles) {\n        //   replaceCoreImports(path.resolve(destPath, file));\n        // }\n      }\n    }\n  },\n  sourcemap: true,\n  treeshake: true,\n});\n"
  },
  {
    "path": "packages/openapi-python/turbo.json",
    "content": "{\n  \"$schema\": \"../../node_modules/turbo/schema.json\",\n  \"extends\": [\"//\"],\n  \"tasks\": {\n    \"build\": {\n      \"dependsOn\": [\"^build\"],\n      \"outputs\": [\"dist/**\"]\n    }\n  }\n}\n"
  },
  {
    "path": "packages/openapi-python/vitest.setup.ts",
    "content": "import { fileURLToPath } from 'node:url';\n\nimport { beforeAll } from 'vitest';\n\nbeforeAll(() => {\n  process.chdir(fileURLToPath(new URL('.', import.meta.url)));\n});\n"
  },
  {
    "path": "packages/openapi-python-tests/pydantic/v2/.gitignore",
    "content": ".DS_Store\n.idea\n.tmp\n.tsdown\nlogs\nnode_modules\ntemp\n\n.env\ncoverage\ndist\n\n# test files\n.gen\n"
  },
  {
    "path": "packages/openapi-python-tests/pydantic/v2/__snapshots__/3.1.x/opencode/pydantic_gen.py",
    "content": "# This file is auto-generated by @hey-api/openapi-python\n\nfrom enum import Enum\nfrom pydantic import BaseModel, Field\nfrom typing import Any, Literal, Optional, TypeAlias, Union\n\n\nclass EventInstallationUpdatedProperties(BaseModel):\n    version: str\n\n\nclass EventInstallationUpdated(BaseModel):\n    type_: Literal[\"installation.updated\"] = Field(..., alias=\"type\")\n    properties: EventInstallationUpdatedProperties\n\n\nclass EventInstallationUpdateAvailableProperties(BaseModel):\n    version: str\n\n\nclass EventInstallationUpdateAvailable(BaseModel):\n    type_: Literal[\"installation.update-available\"] = Field(..., alias=\"type\")\n    properties: EventInstallationUpdateAvailableProperties\n\n\nclass ProjectIcon(BaseModel):\n    url: Optional[str] = Field(default=None)\n    color: Optional[str] = Field(default=None)\n\n\nclass ProjectTime(BaseModel):\n    created: float\n    updated: float\n    initialized: Optional[float] = Field(default=None)\n\n\nclass Project(BaseModel):\n    id_: str = Field(..., alias=\"id\")\n    worktree: str\n    vcs: Optional[Literal[\"git\"]] = Field(default=None)\n    name: Optional[str] = Field(default=None)\n    icon: Optional[ProjectIcon] = Field(default=None)\n    time: ProjectTime\n\n\nclass EventProjectUpdated(BaseModel):\n    type_: Literal[\"project.updated\"] = Field(..., alias=\"type\")\n    properties: Project\n\n\nclass EventServerInstanceDisposedProperties(BaseModel):\n    directory: str\n\n\nclass EventServerInstanceDisposed(BaseModel):\n    type_: Literal[\"server.instance.disposed\"] = Field(..., alias=\"type\")\n    properties: EventServerInstanceDisposedProperties\n\n\nclass EventLspClientDiagnosticsProperties(BaseModel):\n    server_id: str = Field(..., alias=\"serverID\")\n    path: str\n\n\nclass EventLspClientDiagnostics(BaseModel):\n    type_: Literal[\"lsp.client.diagnostics\"] = Field(..., alias=\"type\")\n    properties: EventLspClientDiagnosticsProperties\n\n\nclass EventLspUpdated(BaseModel):\n    type_: Literal[\"lsp.updated\"] = Field(..., alias=\"type\")\n    properties: dict[str, Any]\n\n\nclass FileDiff(BaseModel):\n    file: str\n    before: str\n    after: str\n    additions: float\n    deletions: float\n\n\nclass UserMessageTime(BaseModel):\n    created: float\n\n\nclass UserMessageSummary(BaseModel):\n    title: Optional[str] = Field(default=None)\n    body: Optional[str] = Field(default=None)\n    diffs: list[FileDiff]\n\n\nclass UserMessageModel(BaseModel):\n    provider_id: str = Field(..., alias=\"providerID\")\n    model_id: str = Field(..., alias=\"modelID\")\n\n\nclass UserMessage(BaseModel):\n    id_: str = Field(..., alias=\"id\")\n    session_id: str = Field(..., alias=\"sessionID\")\n    role: Literal[\"user\"]\n    time: UserMessageTime\n    summary: Optional[UserMessageSummary] = Field(default=None)\n    agent: str\n    model: UserMessageModel\n    system: Optional[str] = Field(default=None)\n    tools: Optional[dict[str, Any]] = Field(default=None)\n    variant: Optional[str] = Field(default=None)\n\n\nclass ProviderAuthErrorData(BaseModel):\n    provider_id: str = Field(..., alias=\"providerID\")\n    message: str\n\n\nclass ProviderAuthError(BaseModel):\n    name: Literal[\"ProviderAuthError\"]\n    data: ProviderAuthErrorData\n\n\nclass UnknownErrorData(BaseModel):\n    message: str\n\n\nclass UnknownError(BaseModel):\n    name: Literal[\"UnknownError\"]\n    data: UnknownErrorData\n\n\nclass MessageOutputLengthError(BaseModel):\n    name: Literal[\"MessageOutputLengthError\"]\n    data: dict[str, Any]\n\n\nclass MessageAbortedErrorData(BaseModel):\n    message: str\n\n\nclass MessageAbortedError(BaseModel):\n    name: Literal[\"MessageAbortedError\"]\n    data: MessageAbortedErrorData\n\n\nclass ApiErrorData(BaseModel):\n    message: str\n    status_code: Optional[float] = Field(default=None, alias=\"statusCode\")\n    is_retryable: bool = Field(..., alias=\"isRetryable\")\n    response_headers: Optional[dict[str, Any]] = Field(default=None, alias=\"responseHeaders\")\n    response_body: Optional[str] = Field(default=None, alias=\"responseBody\")\n    metadata: Optional[dict[str, Any]] = Field(default=None)\n\n\nclass ApiError(BaseModel):\n    name: Literal[\"APIError\"]\n    data: ApiErrorData\n\n\nclass AssistantMessageTime(BaseModel):\n    created: float\n    completed: Optional[float] = Field(default=None)\n\n\nclass AssistantMessagePath(BaseModel):\n    cwd: str\n    root: str\n\n\nclass AssistantMessageTokensCache(BaseModel):\n    read: float\n    write: float\n\n\nclass AssistantMessageTokens(BaseModel):\n    input_: float = Field(..., alias=\"input\")\n    output: float\n    reasoning: float\n    cache: AssistantMessageTokensCache\n\n\nclass AssistantMessage(BaseModel):\n    id_: str = Field(..., alias=\"id\")\n    session_id: str = Field(..., alias=\"sessionID\")\n    role: Literal[\"assistant\"]\n    time: AssistantMessageTime\n    error: Optional[Union[ProviderAuthError, UnknownError, MessageOutputLengthError, MessageAbortedError, ApiError]] = Field(default=None)\n    parent_id: str = Field(..., alias=\"parentID\")\n    model_id: str = Field(..., alias=\"modelID\")\n    provider_id: str = Field(..., alias=\"providerID\")\n    mode: str\n    agent: str\n    path: AssistantMessagePath\n    summary: Optional[bool] = Field(default=None)\n    cost: float\n    tokens: AssistantMessageTokens\n    finish: Optional[str] = Field(default=None)\n\n\nMessage: TypeAlias = Union[UserMessage, AssistantMessage]\n\n\nclass EventMessageUpdatedProperties(BaseModel):\n    info: Message\n\n\nclass EventMessageUpdated(BaseModel):\n    type_: Literal[\"message.updated\"] = Field(..., alias=\"type\")\n    properties: EventMessageUpdatedProperties\n\n\nclass EventMessageRemovedProperties(BaseModel):\n    session_id: str = Field(..., alias=\"sessionID\")\n    message_id: str = Field(..., alias=\"messageID\")\n\n\nclass EventMessageRemoved(BaseModel):\n    type_: Literal[\"message.removed\"] = Field(..., alias=\"type\")\n    properties: EventMessageRemovedProperties\n\n\nclass TextPartTime(BaseModel):\n    start: float\n    end: Optional[float] = Field(default=None)\n\n\nclass TextPart(BaseModel):\n    id_: str = Field(..., alias=\"id\")\n    session_id: str = Field(..., alias=\"sessionID\")\n    message_id: str = Field(..., alias=\"messageID\")\n    type_: Literal[\"text\"] = Field(..., alias=\"type\")\n    text: str\n    synthetic: Optional[bool] = Field(default=None)\n    ignored: Optional[bool] = Field(default=None)\n    time: Optional[TextPartTime] = Field(default=None)\n    metadata: Optional[dict[str, Any]] = Field(default=None)\n\n\nclass ReasoningPartTime(BaseModel):\n    start: float\n    end: Optional[float] = Field(default=None)\n\n\nclass ReasoningPart(BaseModel):\n    id_: str = Field(..., alias=\"id\")\n    session_id: str = Field(..., alias=\"sessionID\")\n    message_id: str = Field(..., alias=\"messageID\")\n    type_: Literal[\"reasoning\"] = Field(..., alias=\"type\")\n    text: str\n    metadata: Optional[dict[str, Any]] = Field(default=None)\n    time: ReasoningPartTime\n\n\nclass FilePartSourceText(BaseModel):\n    value: str\n    start: int = Field(..., ge=-9007199254740991, le=9007199254740991)\n    end: int = Field(..., ge=-9007199254740991, le=9007199254740991)\n\n\nclass FileSource(BaseModel):\n    text: FilePartSourceText\n    type_: Literal[\"file\"] = Field(..., alias=\"type\")\n    path: str\n\n\nclass RangeStart(BaseModel):\n    line: float\n    character: float\n\n\nclass RangeEnd(BaseModel):\n    line: float\n    character: float\n\n\nclass Range(BaseModel):\n    start: RangeStart\n    end: RangeEnd\n\n\nclass SymbolSource(BaseModel):\n    text: FilePartSourceText\n    type_: Literal[\"symbol\"] = Field(..., alias=\"type\")\n    path: str\n    range_: Range = Field(..., alias=\"range\")\n    name: str\n    kind: int = Field(..., ge=-9007199254740991, le=9007199254740991)\n\n\nFilePartSource: TypeAlias = Union[FileSource, SymbolSource]\n\n\nclass FilePart(BaseModel):\n    id_: str = Field(..., alias=\"id\")\n    session_id: str = Field(..., alias=\"sessionID\")\n    message_id: str = Field(..., alias=\"messageID\")\n    type_: Literal[\"file\"] = Field(..., alias=\"type\")\n    mime: str\n    filename: Optional[str] = Field(default=None)\n    url: str\n    source: Optional[FilePartSource] = Field(default=None)\n\n\nclass ToolStatePending(BaseModel):\n    status: Literal[\"pending\"]\n    input_: dict[str, Any] = Field(..., alias=\"input\")\n    raw: str\n\n\nclass ToolStateRunningTime(BaseModel):\n    start: float\n\n\nclass ToolStateRunning(BaseModel):\n    status: Literal[\"running\"]\n    input_: dict[str, Any] = Field(..., alias=\"input\")\n    title: Optional[str] = Field(default=None)\n    metadata: Optional[dict[str, Any]] = Field(default=None)\n    time: ToolStateRunningTime\n\n\nclass ToolStateCompletedTime(BaseModel):\n    start: float\n    end: float\n    compacted: Optional[float] = Field(default=None)\n\n\nclass ToolStateCompleted(BaseModel):\n    status: Literal[\"completed\"]\n    input_: dict[str, Any] = Field(..., alias=\"input\")\n    output: str\n    title: str\n    metadata: dict[str, Any]\n    time: ToolStateCompletedTime\n    attachments: Optional[list[FilePart]] = Field(default=None)\n\n\nclass ToolStateErrorTime(BaseModel):\n    start: float\n    end: float\n\n\nclass ToolStateError(BaseModel):\n    status: Literal[\"error\"]\n    input_: dict[str, Any] = Field(..., alias=\"input\")\n    error: str\n    metadata: Optional[dict[str, Any]] = Field(default=None)\n    time: ToolStateErrorTime\n\n\nToolState: TypeAlias = Union[ToolStatePending, ToolStateRunning, ToolStateCompleted, ToolStateError]\n\n\nclass ToolPart(BaseModel):\n    id_: str = Field(..., alias=\"id\")\n    session_id: str = Field(..., alias=\"sessionID\")\n    message_id: str = Field(..., alias=\"messageID\")\n    type_: Literal[\"tool\"] = Field(..., alias=\"type\")\n    call_id: str = Field(..., alias=\"callID\")\n    tool: str\n    state: ToolState\n    metadata: Optional[dict[str, Any]] = Field(default=None)\n\n\nclass StepStartPart(BaseModel):\n    id_: str = Field(..., alias=\"id\")\n    session_id: str = Field(..., alias=\"sessionID\")\n    message_id: str = Field(..., alias=\"messageID\")\n    type_: Literal[\"step-start\"] = Field(..., alias=\"type\")\n    snapshot: Optional[str] = Field(default=None)\n\n\nclass StepFinishPartTokensCache(BaseModel):\n    read: float\n    write: float\n\n\nclass StepFinishPartTokens(BaseModel):\n    input_: float = Field(..., alias=\"input\")\n    output: float\n    reasoning: float\n    cache: StepFinishPartTokensCache\n\n\nclass StepFinishPart(BaseModel):\n    id_: str = Field(..., alias=\"id\")\n    session_id: str = Field(..., alias=\"sessionID\")\n    message_id: str = Field(..., alias=\"messageID\")\n    type_: Literal[\"step-finish\"] = Field(..., alias=\"type\")\n    reason: str\n    snapshot: Optional[str] = Field(default=None)\n    cost: float\n    tokens: StepFinishPartTokens\n\n\nclass SnapshotPart(BaseModel):\n    id_: str = Field(..., alias=\"id\")\n    session_id: str = Field(..., alias=\"sessionID\")\n    message_id: str = Field(..., alias=\"messageID\")\n    type_: Literal[\"snapshot\"] = Field(..., alias=\"type\")\n    snapshot: str\n\n\nclass PatchPart(BaseModel):\n    id_: str = Field(..., alias=\"id\")\n    session_id: str = Field(..., alias=\"sessionID\")\n    message_id: str = Field(..., alias=\"messageID\")\n    type_: Literal[\"patch\"] = Field(..., alias=\"type\")\n    hash_: str = Field(..., alias=\"hash\")\n    files: list[str]\n\n\nclass AgentPartSource(BaseModel):\n    value: str\n    start: int = Field(..., ge=-9007199254740991, le=9007199254740991)\n    end: int = Field(..., ge=-9007199254740991, le=9007199254740991)\n\n\nclass AgentPart(BaseModel):\n    id_: str = Field(..., alias=\"id\")\n    session_id: str = Field(..., alias=\"sessionID\")\n    message_id: str = Field(..., alias=\"messageID\")\n    type_: Literal[\"agent\"] = Field(..., alias=\"type\")\n    name: str\n    source: Optional[AgentPartSource] = Field(default=None)\n\n\nclass RetryPartTime(BaseModel):\n    created: float\n\n\nclass RetryPart(BaseModel):\n    id_: str = Field(..., alias=\"id\")\n    session_id: str = Field(..., alias=\"sessionID\")\n    message_id: str = Field(..., alias=\"messageID\")\n    type_: Literal[\"retry\"] = Field(..., alias=\"type\")\n    attempt: float\n    error: ApiError\n    time: RetryPartTime\n\n\nclass CompactionPart(BaseModel):\n    id_: str = Field(..., alias=\"id\")\n    session_id: str = Field(..., alias=\"sessionID\")\n    message_id: str = Field(..., alias=\"messageID\")\n    type_: Literal[\"compaction\"] = Field(..., alias=\"type\")\n    auto: bool\n\n\nclass Part(BaseModel):\n    id_: str = Field(..., alias=\"id\")\n    session_id: str = Field(..., alias=\"sessionID\")\n    message_id: str = Field(..., alias=\"messageID\")\n    type_: Literal[\"subtask\"] = Field(..., alias=\"type\")\n    prompt: str\n    description: str\n    agent: str\n    command: Optional[str] = Field(default=None)\n\n\nPart_2: TypeAlias = Union[TextPart, Part, ReasoningPart, FilePart, ToolPart, StepStartPart, StepFinishPart, SnapshotPart, PatchPart, AgentPart, RetryPart, CompactionPart]\n\n\nclass EventMessagePartUpdatedProperties(BaseModel):\n    part: Part_2\n    delta: Optional[str] = Field(default=None)\n\n\nclass EventMessagePartUpdated(BaseModel):\n    type_: Literal[\"message.part.updated\"] = Field(..., alias=\"type\")\n    properties: EventMessagePartUpdatedProperties\n\n\nclass EventMessagePartRemovedProperties(BaseModel):\n    session_id: str = Field(..., alias=\"sessionID\")\n    message_id: str = Field(..., alias=\"messageID\")\n    part_id: str = Field(..., alias=\"partID\")\n\n\nclass EventMessagePartRemoved(BaseModel):\n    type_: Literal[\"message.part.removed\"] = Field(..., alias=\"type\")\n    properties: EventMessagePartRemovedProperties\n\n\nclass PermissionRequestTool(BaseModel):\n    message_id: str = Field(..., alias=\"messageID\")\n    call_id: str = Field(..., alias=\"callID\")\n\n\nclass PermissionRequest(BaseModel):\n    id_: str = Field(..., alias=\"id\", pattern=\"^per.*\")\n    session_id: str = Field(..., alias=\"sessionID\", pattern=\"^ses.*\")\n    permission: str\n    patterns: list[str]\n    metadata: dict[str, Any]\n    always: list[str]\n    tool: Optional[PermissionRequestTool] = Field(default=None)\n\n\nclass EventPermissionAsked(BaseModel):\n    type_: Literal[\"permission.asked\"] = Field(..., alias=\"type\")\n    properties: PermissionRequest\n\n\nclass EventPermissionRepliedPropertiesReply(Enum, str):\n    ONCE = \"once\"\n    ALWAYS = \"always\"\n    REJECT = \"reject\"\n\n\nclass EventPermissionRepliedProperties(BaseModel):\n    session_id: str = Field(..., alias=\"sessionID\")\n    request_id: str = Field(..., alias=\"requestID\")\n    reply: EventPermissionRepliedPropertiesReply\n\n\nclass EventPermissionReplied(BaseModel):\n    type_: Literal[\"permission.replied\"] = Field(..., alias=\"type\")\n    properties: EventPermissionRepliedProperties\n\n\nclass SessionStatus(BaseModel):\n    type_: Literal[\"idle\"] = Field(..., alias=\"type\")\n\n\nclass SessionStatus_2(BaseModel):\n    type_: Literal[\"retry\"] = Field(..., alias=\"type\")\n    attempt: float\n    message: str\n    next_: float = Field(..., alias=\"next\")\n\n\nclass SessionStatus_3(BaseModel):\n    type_: Literal[\"busy\"] = Field(..., alias=\"type\")\n\n\nSessionStatus_4: TypeAlias = Union[SessionStatus, SessionStatus_2, SessionStatus_3]\n\n\nclass EventSessionStatusProperties(BaseModel):\n    session_id: str = Field(..., alias=\"sessionID\")\n    status: SessionStatus_4\n\n\nclass EventSessionStatus(BaseModel):\n    type_: Literal[\"session.status\"] = Field(..., alias=\"type\")\n    properties: EventSessionStatusProperties\n\n\nclass EventSessionIdleProperties(BaseModel):\n    session_id: str = Field(..., alias=\"sessionID\")\n\n\nclass EventSessionIdle(BaseModel):\n    type_: Literal[\"session.idle\"] = Field(..., alias=\"type\")\n    properties: EventSessionIdleProperties\n\n\nclass EventSessionCompactedProperties(BaseModel):\n    session_id: str = Field(..., alias=\"sessionID\")\n\n\nclass EventSessionCompacted(BaseModel):\n    type_: Literal[\"session.compacted\"] = Field(..., alias=\"type\")\n    properties: EventSessionCompactedProperties\n\n\nclass EventFileEditedProperties(BaseModel):\n    file: str\n\n\nclass EventFileEdited(BaseModel):\n    type_: Literal[\"file.edited\"] = Field(..., alias=\"type\")\n    properties: EventFileEditedProperties\n\n\nclass Todo(BaseModel):\n    content: str = Field(..., description=\"Brief description of the task\")\n    status: str = Field(..., description=\"Current status of the task: pending, in_progress, completed, cancelled\")\n    priority: str = Field(..., description=\"Priority level of the task: high, medium, low\")\n    id_: str = Field(..., alias=\"id\", description=\"Unique identifier for the todo item\")\n\n\nclass EventTodoUpdatedProperties(BaseModel):\n    session_id: str = Field(..., alias=\"sessionID\")\n    todos: list[Todo]\n\n\nclass EventTodoUpdated(BaseModel):\n    type_: Literal[\"todo.updated\"] = Field(..., alias=\"type\")\n    properties: EventTodoUpdatedProperties\n\n\nclass EventTuiPromptAppendProperties(BaseModel):\n    text: str\n\n\nclass EventTuiPromptAppend(BaseModel):\n    type_: Literal[\"tui.prompt.append\"] = Field(..., alias=\"type\")\n    properties: EventTuiPromptAppendProperties\n\n\nclass EventTuiCommandExecutePropertiesCommand(Enum, str):\n    SESSION_LIST = \"session.list\"\n    SESSION_NEW = \"session.new\"\n    SESSION_SHARE = \"session.share\"\n    SESSION_INTERRUPT = \"session.interrupt\"\n    SESSION_COMPACT = \"session.compact\"\n    SESSION_PAGE_UP = \"session.page.up\"\n    SESSION_PAGE_DOWN = \"session.page.down\"\n    SESSION_HALF_PAGE_UP = \"session.half.page.up\"\n    SESSION_HALF_PAGE_DOWN = \"session.half.page.down\"\n    SESSION_FIRST = \"session.first\"\n    SESSION_LAST = \"session.last\"\n    PROMPT_CLEAR = \"prompt.clear\"\n    PROMPT_SUBMIT = \"prompt.submit\"\n    AGENT_CYCLE = \"agent.cycle\"\n\n\nclass EventTuiCommandExecuteProperties(BaseModel):\n    command: Union[EventTuiCommandExecutePropertiesCommand, str]\n\n\nclass EventTuiCommandExecute(BaseModel):\n    type_: Literal[\"tui.command.execute\"] = Field(..., alias=\"type\")\n    properties: EventTuiCommandExecuteProperties\n\n\nclass EventTuiToastShowPropertiesVariant(Enum, str):\n    INFO = \"info\"\n    SUCCESS = \"success\"\n    WARNING = \"warning\"\n    ERROR = \"error\"\n\n\nclass EventTuiToastShowProperties(BaseModel):\n    title: Optional[str] = Field(default=None)\n    message: str\n    variant: EventTuiToastShowPropertiesVariant\n    duration: Optional[float] = Field(default=5000, description=\"Duration in milliseconds\")\n\n\nclass EventTuiToastShow(BaseModel):\n    type_: Literal[\"tui.toast.show\"] = Field(..., alias=\"type\")\n    properties: EventTuiToastShowProperties\n\n\nclass EventMcpToolsChangedProperties(BaseModel):\n    server: str\n\n\nclass EventMcpToolsChanged(BaseModel):\n    type_: Literal[\"mcp.tools.changed\"] = Field(..., alias=\"type\")\n    properties: EventMcpToolsChangedProperties\n\n\nclass EventCommandExecutedProperties(BaseModel):\n    name: str\n    session_id: str = Field(..., alias=\"sessionID\", pattern=\"^ses.*\")\n    arguments: str\n    message_id: str = Field(..., alias=\"messageID\", pattern=\"^msg.*\")\n\n\nclass EventCommandExecuted(BaseModel):\n    type_: Literal[\"command.executed\"] = Field(..., alias=\"type\")\n    properties: EventCommandExecutedProperties\n\n\nclass PermissionAction(Enum, str):\n    ALLOW = \"allow\"\n    DENY = \"deny\"\n    ASK = \"ask\"\n\n\nclass PermissionRule(BaseModel):\n    permission: str\n    pattern: str\n    action: PermissionAction\n\n\nPermissionRuleset: TypeAlias = list[PermissionRule]\n\n\nclass SessionSummary(BaseModel):\n    additions: float\n    deletions: float\n    files: float\n    diffs: Optional[list[FileDiff]] = Field(default=None)\n\n\nclass SessionShare(BaseModel):\n    url: str\n\n\nclass SessionTime(BaseModel):\n    created: float\n    updated: float\n    compacting: Optional[float] = Field(default=None)\n    archived: Optional[float] = Field(default=None)\n\n\nclass SessionRevert(BaseModel):\n    message_id: str = Field(..., alias=\"messageID\")\n    part_id: Optional[str] = Field(default=None, alias=\"partID\")\n    snapshot: Optional[str] = Field(default=None)\n    diff: Optional[str] = Field(default=None)\n\n\nclass Session(BaseModel):\n    id_: str = Field(..., alias=\"id\", pattern=\"^ses.*\")\n    project_id: str = Field(..., alias=\"projectID\")\n    directory: str\n    parent_id: Optional[str] = Field(default=None, alias=\"parentID\", pattern=\"^ses.*\")\n    summary: Optional[SessionSummary] = Field(default=None)\n    share: Optional[SessionShare] = Field(default=None)\n    title: str\n    version: str\n    time: SessionTime\n    permission: Optional[PermissionRuleset] = Field(default=None)\n    revert: Optional[SessionRevert] = Field(default=None)\n\n\nclass EventSessionCreatedProperties(BaseModel):\n    info: Session\n\n\nclass EventSessionCreated(BaseModel):\n    type_: Literal[\"session.created\"] = Field(..., alias=\"type\")\n    properties: EventSessionCreatedProperties\n\n\nclass EventSessionUpdatedProperties(BaseModel):\n    info: Session\n\n\nclass EventSessionUpdated(BaseModel):\n    type_: Literal[\"session.updated\"] = Field(..., alias=\"type\")\n    properties: EventSessionUpdatedProperties\n\n\nclass EventSessionDeletedProperties(BaseModel):\n    info: Session\n\n\nclass EventSessionDeleted(BaseModel):\n    type_: Literal[\"session.deleted\"] = Field(..., alias=\"type\")\n    properties: EventSessionDeletedProperties\n\n\nclass EventSessionDiffProperties(BaseModel):\n    session_id: str = Field(..., alias=\"sessionID\")\n    diff: list[FileDiff]\n\n\nclass EventSessionDiff(BaseModel):\n    type_: Literal[\"session.diff\"] = Field(..., alias=\"type\")\n    properties: EventSessionDiffProperties\n\n\nclass EventSessionErrorProperties(BaseModel):\n    session_id: Optional[str] = Field(default=None, alias=\"sessionID\")\n    error: Optional[Union[ProviderAuthError, UnknownError, MessageOutputLengthError, MessageAbortedError, ApiError]] = Field(default=None)\n\n\nclass EventSessionError(BaseModel):\n    type_: Literal[\"session.error\"] = Field(..., alias=\"type\")\n    properties: EventSessionErrorProperties\n\n\nclass EventFileWatcherUpdatedProperties(BaseModel):\n    file: str\n    event: Union[Literal[\"add\"], Literal[\"change\"], Literal[\"unlink\"]]\n\n\nclass EventFileWatcherUpdated(BaseModel):\n    type_: Literal[\"file.watcher.updated\"] = Field(..., alias=\"type\")\n    properties: EventFileWatcherUpdatedProperties\n\n\nclass EventVcsBranchUpdatedProperties(BaseModel):\n    branch: Optional[str] = Field(default=None)\n\n\nclass EventVcsBranchUpdated(BaseModel):\n    type_: Literal[\"vcs.branch.updated\"] = Field(..., alias=\"type\")\n    properties: EventVcsBranchUpdatedProperties\n\n\nclass PtyStatus(Enum, str):\n    RUNNING = \"running\"\n    EXITED = \"exited\"\n\n\nclass Pty(BaseModel):\n    id_: str = Field(..., alias=\"id\", pattern=\"^pty.*\")\n    title: str\n    command: str\n    args: list[str]\n    cwd: str\n    status: PtyStatus\n    pid: float\n\n\nclass EventPtyCreatedProperties(BaseModel):\n    info: Pty\n\n\nclass EventPtyCreated(BaseModel):\n    type_: Literal[\"pty.created\"] = Field(..., alias=\"type\")\n    properties: EventPtyCreatedProperties\n\n\nclass EventPtyUpdatedProperties(BaseModel):\n    info: Pty\n\n\nclass EventPtyUpdated(BaseModel):\n    type_: Literal[\"pty.updated\"] = Field(..., alias=\"type\")\n    properties: EventPtyUpdatedProperties\n\n\nclass EventPtyExitedProperties(BaseModel):\n    id_: str = Field(..., alias=\"id\", pattern=\"^pty.*\")\n    exit_code: float = Field(..., alias=\"exitCode\")\n\n\nclass EventPtyExited(BaseModel):\n    type_: Literal[\"pty.exited\"] = Field(..., alias=\"type\")\n    properties: EventPtyExitedProperties\n\n\nclass EventPtyDeletedProperties(BaseModel):\n    id_: str = Field(..., alias=\"id\", pattern=\"^pty.*\")\n\n\nclass EventPtyDeleted(BaseModel):\n    type_: Literal[\"pty.deleted\"] = Field(..., alias=\"type\")\n    properties: EventPtyDeletedProperties\n\n\nclass EventServerConnected(BaseModel):\n    type_: Literal[\"server.connected\"] = Field(..., alias=\"type\")\n    properties: dict[str, Any]\n\n\nclass EventGlobalDisposed(BaseModel):\n    type_: Literal[\"global.disposed\"] = Field(..., alias=\"type\")\n    properties: dict[str, Any]\n\n\nEvent: TypeAlias = Union[EventInstallationUpdated, EventInstallationUpdateAvailable, EventProjectUpdated, EventServerInstanceDisposed, EventLspClientDiagnostics, EventLspUpdated, EventMessageUpdated, EventMessageRemoved, EventMessagePartUpdated, EventMessagePartRemoved, EventPermissionAsked, EventPermissionReplied, EventSessionStatus, EventSessionIdle, EventSessionCompacted, EventFileEdited, EventTodoUpdated, EventTuiPromptAppend, EventTuiCommandExecute, EventTuiToastShow, EventMcpToolsChanged, EventCommandExecuted, EventSessionCreated, EventSessionUpdated, EventSessionDeleted, EventSessionDiff, EventSessionError, EventFileWatcherUpdated, EventVcsBranchUpdated, EventPtyCreated, EventPtyUpdated, EventPtyExited, EventPtyDeleted, EventServerConnected, EventGlobalDisposed]\n\n\nclass GlobalEvent(BaseModel):\n    directory: str\n    payload: Event\n\n\nclass BadRequestError(BaseModel):\n    data: Any\n    errors: list[dict[str, Any]]\n    success: Literal[False]\n\n\nclass NotFoundErrorData(BaseModel):\n    message: str\n\n\nclass NotFoundError(BaseModel):\n    name: Literal[\"NotFoundError\"]\n    data: NotFoundErrorData\n\n\nclass KeybindsConfig(BaseModel):\n    leader: Optional[str] = Field(default=\"ctrl+x\", description=\"Leader key for keybind combinations\")\n    app_exit: Optional[str] = Field(default=\"ctrl+c,ctrl+d,<leader>q\", description=\"Exit the application\")\n    editor_open: Optional[str] = Field(default=\"<leader>e\", description=\"Open external editor\")\n    theme_list: Optional[str] = Field(default=\"<leader>t\", description=\"List available themes\")\n    sidebar_toggle: Optional[str] = Field(default=\"<leader>b\", description=\"Toggle sidebar\")\n    scrollbar_toggle: Optional[str] = Field(default=\"none\", description=\"Toggle session scrollbar\")\n    username_toggle: Optional[str] = Field(default=\"none\", description=\"Toggle username visibility\")\n    status_view: Optional[str] = Field(default=\"<leader>s\", description=\"View status\")\n    session_export: Optional[str] = Field(default=\"<leader>x\", description=\"Export session to editor\")\n    session_new: Optional[str] = Field(default=\"<leader>n\", description=\"Create a new session\")\n    session_list: Optional[str] = Field(default=\"<leader>l\", description=\"List all sessions\")\n    session_timeline: Optional[str] = Field(default=\"<leader>g\", description=\"Show session timeline\")\n    session_fork: Optional[str] = Field(default=\"none\", description=\"Fork session from message\")\n    session_rename: Optional[str] = Field(default=\"none\", description=\"Rename session\")\n    session_share: Optional[str] = Field(default=\"none\", description=\"Share current session\")\n    session_unshare: Optional[str] = Field(default=\"none\", description=\"Unshare current session\")\n    session_interrupt: Optional[str] = Field(default=\"escape\", description=\"Interrupt current session\")\n    session_compact: Optional[str] = Field(default=\"<leader>c\", description=\"Compact the session\")\n    messages_page_up: Optional[str] = Field(default=\"pageup\", description=\"Scroll messages up by one page\")\n    messages_page_down: Optional[str] = Field(default=\"pagedown\", description=\"Scroll messages down by one page\")\n    messages_half_page_up: Optional[str] = Field(default=\"ctrl+alt+u\", description=\"Scroll messages up by half page\")\n    messages_half_page_down: Optional[str] = Field(default=\"ctrl+alt+d\", description=\"Scroll messages down by half page\")\n    messages_first: Optional[str] = Field(default=\"ctrl+g,home\", description=\"Navigate to first message\")\n    messages_last: Optional[str] = Field(default=\"ctrl+alt+g,end\", description=\"Navigate to last message\")\n    messages_next: Optional[str] = Field(default=\"none\", description=\"Navigate to next message\")\n    messages_previous: Optional[str] = Field(default=\"none\", description=\"Navigate to previous message\")\n    messages_last_user: Optional[str] = Field(default=\"none\", description=\"Navigate to last user message\")\n    messages_copy: Optional[str] = Field(default=\"<leader>y\", description=\"Copy message\")\n    messages_undo: Optional[str] = Field(default=\"<leader>u\", description=\"Undo message\")\n    messages_redo: Optional[str] = Field(default=\"<leader>r\", description=\"Redo message\")\n    messages_toggle_conceal: Optional[str] = Field(default=\"<leader>h\", description=\"Toggle code block concealment in messages\")\n    tool_details: Optional[str] = Field(default=\"none\", description=\"Toggle tool details visibility\")\n    model_list: Optional[str] = Field(default=\"<leader>m\", description=\"List available models\")\n    model_cycle_recent: Optional[str] = Field(default=\"f2\", description=\"Next recently used model\")\n    model_cycle_recent_reverse: Optional[str] = Field(default=\"shift+f2\", description=\"Previous recently used model\")\n    model_cycle_favorite: Optional[str] = Field(default=\"none\", description=\"Next favorite model\")\n    model_cycle_favorite_reverse: Optional[str] = Field(default=\"none\", description=\"Previous favorite model\")\n    command_list: Optional[str] = Field(default=\"ctrl+p\", description=\"List available commands\")\n    agent_list: Optional[str] = Field(default=\"<leader>a\", description=\"List agents\")\n    agent_cycle: Optional[str] = Field(default=\"tab\", description=\"Next agent\")\n    agent_cycle_reverse: Optional[str] = Field(default=\"shift+tab\", description=\"Previous agent\")\n    variant_cycle: Optional[str] = Field(default=\"ctrl+t\", description=\"Cycle model variants\")\n    input_clear: Optional[str] = Field(default=\"ctrl+c\", description=\"Clear input field\")\n    input_paste: Optional[str] = Field(default=\"ctrl+v\", description=\"Paste from clipboard\")\n    input_submit: Optional[str] = Field(default=\"return\", description=\"Submit input\")\n    input_newline: Optional[str] = Field(default=\"shift+return,ctrl+return,alt+return,ctrl+j\", description=\"Insert newline in input\")\n    input_move_left: Optional[str] = Field(default=\"left,ctrl+b\", description=\"Move cursor left in input\")\n    input_move_right: Optional[str] = Field(default=\"right,ctrl+f\", description=\"Move cursor right in input\")\n    input_move_up: Optional[str] = Field(default=\"up\", description=\"Move cursor up in input\")\n    input_move_down: Optional[str] = Field(default=\"down\", description=\"Move cursor down in input\")\n    input_select_left: Optional[str] = Field(default=\"shift+left\", description=\"Select left in input\")\n    input_select_right: Optional[str] = Field(default=\"shift+right\", description=\"Select right in input\")\n    input_select_up: Optional[str] = Field(default=\"shift+up\", description=\"Select up in input\")\n    input_select_down: Optional[str] = Field(default=\"shift+down\", description=\"Select down in input\")\n    input_line_home: Optional[str] = Field(default=\"ctrl+a\", description=\"Move to start of line in input\")\n    input_line_end: Optional[str] = Field(default=\"ctrl+e\", description=\"Move to end of line in input\")\n    input_select_line_home: Optional[str] = Field(default=\"ctrl+shift+a\", description=\"Select to start of line in input\")\n    input_select_line_end: Optional[str] = Field(default=\"ctrl+shift+e\", description=\"Select to end of line in input\")\n    input_visual_line_home: Optional[str] = Field(default=\"alt+a\", description=\"Move to start of visual line in input\")\n    input_visual_line_end: Optional[str] = Field(default=\"alt+e\", description=\"Move to end of visual line in input\")\n    input_select_visual_line_home: Optional[str] = Field(default=\"alt+shift+a\", description=\"Select to start of visual line in input\")\n    input_select_visual_line_end: Optional[str] = Field(default=\"alt+shift+e\", description=\"Select to end of visual line in input\")\n    input_buffer_home: Optional[str] = Field(default=\"home\", description=\"Move to start of buffer in input\")\n    input_buffer_end: Optional[str] = Field(default=\"end\", description=\"Move to end of buffer in input\")\n    input_select_buffer_home: Optional[str] = Field(default=\"shift+home\", description=\"Select to start of buffer in input\")\n    input_select_buffer_end: Optional[str] = Field(default=\"shift+end\", description=\"Select to end of buffer in input\")\n    input_delete_line: Optional[str] = Field(default=\"ctrl+shift+d\", description=\"Delete line in input\")\n    input_delete_to_line_end: Optional[str] = Field(default=\"ctrl+k\", description=\"Delete to end of line in input\")\n    input_delete_to_line_start: Optional[str] = Field(default=\"ctrl+u\", description=\"Delete to start of line in input\")\n    input_backspace: Optional[str] = Field(default=\"backspace,shift+backspace\", description=\"Backspace in input\")\n    input_delete: Optional[str] = Field(default=\"ctrl+d,delete,shift+delete\", description=\"Delete character in input\")\n    input_undo: Optional[str] = Field(default=\"ctrl+-,super+z\", description=\"Undo in input\")\n    input_redo: Optional[str] = Field(default=\"ctrl+.,super+shift+z\", description=\"Redo in input\")\n    input_word_forward: Optional[str] = Field(default=\"alt+f,alt+right,ctrl+right\", description=\"Move word forward in input\")\n    input_word_backward: Optional[str] = Field(default=\"alt+b,alt+left,ctrl+left\", description=\"Move word backward in input\")\n    input_select_word_forward: Optional[str] = Field(default=\"alt+shift+f,alt+shift+right\", description=\"Select word forward in input\")\n    input_select_word_backward: Optional[str] = Field(default=\"alt+shift+b,alt+shift+left\", description=\"Select word backward in input\")\n    input_delete_word_forward: Optional[str] = Field(default=\"alt+d,alt+delete,ctrl+delete\", description=\"Delete word forward in input\")\n    input_delete_word_backward: Optional[str] = Field(default=\"ctrl+w,ctrl+backspace,alt+backspace\", description=\"Delete word backward in input\")\n    history_previous: Optional[str] = Field(default=\"up\", description=\"Previous history item\")\n    history_next: Optional[str] = Field(default=\"down\", description=\"Next history item\")\n    session_child_cycle: Optional[str] = Field(default=\"<leader>right\", description=\"Next child session\")\n    session_child_cycle_reverse: Optional[str] = Field(default=\"<leader>left\", description=\"Previous child session\")\n    session_parent: Optional[str] = Field(default=\"<leader>up\", description=\"Go to parent session\")\n    terminal_suspend: Optional[str] = Field(default=\"ctrl+z\", description=\"Suspend terminal\")\n    terminal_title_toggle: Optional[str] = Field(default=\"none\", description=\"Toggle terminal title\")\n    tips_toggle: Optional[str] = Field(default=\"<leader>h\", description=\"Toggle tips on home screen\")\n\n\nclass LogLevel(Enum, str):\n    DEBUG = \"DEBUG\"\n    INFO = \"INFO\"\n    WARN = \"WARN\"\n    ERROR = \"ERROR\"\n\n\nclass ServerConfig(BaseModel):\n    port: Optional[int] = Field(default=None, description=\"Port to listen on\", gt=0, le=9007199254740991)\n    hostname: Optional[str] = Field(default=None, description=\"Hostname to listen on\")\n    mdns: Optional[bool] = Field(default=None)\n    cors: Optional[list[str]] = Field(default=None, description=\"Additional domains to allow for CORS\")\n\n\nclass PermissionActionConfig(Enum, str):\n    ASK = \"ask\"\n    ALLOW = \"allow\"\n    DENY = \"deny\"\n\n\nPermissionObjectConfig: TypeAlias = dict[str, Any]\n\n\nPermissionRuleConfig: TypeAlias = Union[PermissionActionConfig, PermissionObjectConfig]\n\n\nclass PermissionConfig(BaseModel):\n    read: Optional[PermissionRuleConfig] = Field(default=None)\n    edit: Optional[PermissionRuleConfig] = Field(default=None)\n    glob: Optional[PermissionRuleConfig] = Field(default=None)\n    grep: Optional[PermissionRuleConfig] = Field(default=None)\n    list_: Optional[PermissionRuleConfig] = Field(default=None, alias=\"list\")\n    bash: Optional[PermissionRuleConfig] = Field(default=None)\n    task: Optional[PermissionRuleConfig] = Field(default=None)\n    external_directory: Optional[PermissionRuleConfig] = Field(default=None)\n    todowrite: Optional[PermissionActionConfig] = Field(default=None)\n    todoread: Optional[PermissionActionConfig] = Field(default=None)\n    webfetch: Optional[PermissionActionConfig] = Field(default=None)\n    websearch: Optional[PermissionActionConfig] = Field(default=None)\n    codesearch: Optional[PermissionActionConfig] = Field(default=None)\n    lsp: Optional[PermissionRuleConfig] = Field(default=None)\n    doom_loop: Optional[PermissionActionConfig] = Field(default=None)\n\n\nPermissionConfig_2: TypeAlias = Union[PermissionConfig, PermissionActionConfig]\n\n\nAgentConfig: TypeAlias = dict[str, Any]\n\n\nclass ProviderConfigModelsValueInterleavedField(Enum, str):\n    REASONING_CONTENT = \"reasoning_content\"\n    REASONING_DETAILS = \"reasoning_details\"\n\n\nclass ProviderConfigModelsValueInterleaved(BaseModel):\n    field: ProviderConfigModelsValueInterleavedField\n\n\nclass ProviderConfigModelsValueCostContextOver200k(BaseModel):\n    input_: float = Field(..., alias=\"input\")\n    output: float\n    cache_read: Optional[float] = Field(default=None)\n    cache_write: Optional[float] = Field(default=None)\n\n\nclass ProviderConfigModelsValueCost(BaseModel):\n    input_: float = Field(..., alias=\"input\")\n    output: float\n    cache_read: Optional[float] = Field(default=None)\n    cache_write: Optional[float] = Field(default=None)\n    context_over_200k: Optional[ProviderConfigModelsValueCostContextOver200k] = Field(default=None)\n\n\nclass ProviderConfigModelsValueLimit(BaseModel):\n    context: float\n    output: float\n\n\nclass ProviderConfigModelsValueModalitiesInput(Enum, str):\n    TEXT = \"text\"\n    AUDIO = \"audio\"\n    IMAGE = \"image\"\n    VIDEO = \"video\"\n    PDF = \"pdf\"\n\n\nclass ProviderConfigModelsValueModalitiesOutput(Enum, str):\n    TEXT = \"text\"\n    AUDIO = \"audio\"\n    IMAGE = \"image\"\n    VIDEO = \"video\"\n    PDF = \"pdf\"\n\n\nclass ProviderConfigModelsValueModalities(BaseModel):\n    input_: list[ProviderConfigModelsValueModalitiesInput] = Field(..., alias=\"input\")\n    output: list[ProviderConfigModelsValueModalitiesOutput]\n\n\nclass ProviderConfigModelsValueStatus(Enum, str):\n    ALPHA = \"alpha\"\n    BETA = \"beta\"\n    DEPRECATED = \"deprecated\"\n\n\nclass ProviderConfigModelsValueProvider(BaseModel):\n    npm: str\n\n\nProviderConfigModelsValueVariantsValue: TypeAlias = dict[str, Any]\n\n\nclass ProviderConfigModelsValue(BaseModel):\n    id_: Optional[str] = Field(default=None, alias=\"id\")\n    name: Optional[str] = Field(default=None)\n    family: Optional[str] = Field(default=None)\n    release_date: Optional[str] = Field(default=None)\n    attachment: Optional[bool] = Field(default=None)\n    reasoning: Optional[bool] = Field(default=None)\n    temperature: Optional[bool] = Field(default=None)\n    tool_call: Optional[bool] = Field(default=None)\n    interleaved: Optional[Union[Literal[True], ProviderConfigModelsValueInterleaved]] = Field(default=None)\n    cost: Optional[ProviderConfigModelsValueCost] = Field(default=None)\n    limit: Optional[ProviderConfigModelsValueLimit] = Field(default=None)\n    modalities: Optional[ProviderConfigModelsValueModalities] = Field(default=None)\n    experimental: Optional[bool] = Field(default=None)\n    status: Optional[ProviderConfigModelsValueStatus] = Field(default=None)\n    options: Optional[dict[str, Any]] = Field(default=None)\n    headers: Optional[dict[str, Any]] = Field(default=None)\n    provider: Optional[ProviderConfigModelsValueProvider] = Field(default=None)\n    variants: Optional[dict[str, Any]] = Field(default=None)\n\n\nProviderConfigOptions: TypeAlias = dict[str, Any]\n\n\nclass ProviderConfig(BaseModel):\n    api: Optional[str] = Field(default=None)\n    name: Optional[str] = Field(default=None)\n    env: Optional[list[str]] = Field(default=None)\n    id_: Optional[str] = Field(default=None, alias=\"id\")\n    npm: Optional[str] = Field(default=None)\n    models: Optional[dict[str, Any]] = Field(default=None)\n    whitelist: Optional[list[str]] = Field(default=None)\n    blacklist: Optional[list[str]] = Field(default=None)\n    options: Optional[ProviderConfigOptions] = Field(default=None)\n\n\nclass McpLocalConfig(BaseModel):\n    type_: Literal[\"local\"] = Field(..., alias=\"type\")\n    command: list[str] = Field(..., description=\"Command and arguments to run the MCP server\")\n    environment: Optional[dict[str, Any]] = Field(default=None)\n    enabled: Optional[bool] = Field(default=None)\n    timeout: Optional[int] = Field(default=None, description=\"Timeout in ms for fetching tools from the MCP server. Defaults to 5000 (5 seconds) if not specified.\", gt=0, le=9007199254740991)\n\n\nclass McpOAuthConfig(BaseModel):\n    client_id: Optional[str] = Field(default=None, alias=\"clientId\", description=\"OAuth client ID. If not provided, dynamic client registration (RFC 7591) will be attempted.\")\n    client_secret: Optional[str] = Field(default=None, alias=\"clientSecret\", description=\"OAuth client secret (if required by the authorization server)\")\n    scope: Optional[str] = Field(default=None, description=\"OAuth scopes to request during authorization\")\n\n\nclass McpRemoteConfig(BaseModel):\n    type_: Literal[\"remote\"] = Field(..., alias=\"type\")\n    url: str = Field(..., description=\"URL of the remote MCP server\")\n    enabled: Optional[bool] = Field(default=None)\n    headers: Optional[dict[str, Any]] = Field(default=None)\n    oauth: Optional[Union[McpOAuthConfig, Literal[False]]] = Field(default=None, description=\"OAuth authentication configuration for the MCP server. Set to false to disable OAuth auto-detection.\")\n    timeout: Optional[int] = Field(default=None, description=\"Timeout in ms for fetching tools from the MCP server. Defaults to 5000 (5 seconds) if not specified.\", gt=0, le=9007199254740991)\n\n\nclass LayoutConfig(Enum, str):\n    AUTO = \"auto\"\n    STRETCH = \"stretch\"\n\n\nclass ConfigTuiScrollAcceleration(BaseModel):\n    enabled: bool\n\n\nclass ConfigTuiDiffStyle(Enum, str):\n    AUTO = \"auto\"\n    STACKED = \"stacked\"\n\n\nclass ConfigTui(BaseModel):\n    scroll_speed: Optional[float] = Field(default=None, description=\"TUI scroll speed\", ge=0.001)\n    scroll_acceleration: Optional[ConfigTuiScrollAcceleration] = Field(default=None)\n    diff_style: Optional[ConfigTuiDiffStyle] = Field(default=None)\n\n\nclass ConfigCommandValue(BaseModel):\n    template: str\n    description: Optional[str] = Field(default=None)\n    agent: Optional[str] = Field(default=None)\n    model: Optional[str] = Field(default=None)\n    subtask: Optional[bool] = Field(default=None)\n\n\nclass ConfigWatcher(BaseModel):\n    ignore: Optional[list[str]] = Field(default=None)\n\n\nclass ConfigShare(Enum, str):\n    MANUAL = \"manual\"\n    AUTO = \"auto\"\n    DISABLED = \"disabled\"\n\n\nclass ConfigMode(BaseModel):\n    build: Optional[AgentConfig] = Field(default=None)\n    plan: Optional[AgentConfig] = Field(default=None)\n\n\nclass ConfigAgent(BaseModel):\n    plan: Optional[AgentConfig] = Field(default=None)\n    build: Optional[AgentConfig] = Field(default=None)\n    general: Optional[AgentConfig] = Field(default=None)\n    explore: Optional[AgentConfig] = Field(default=None)\n    title: Optional[AgentConfig] = Field(default=None)\n    summary: Optional[AgentConfig] = Field(default=None)\n    compaction: Optional[AgentConfig] = Field(default=None)\n\n\nclass ConfigFormatterValue(BaseModel):\n    disabled: Optional[bool] = Field(default=None)\n    command: Optional[list[str]] = Field(default=None)\n    environment: Optional[dict[str, Any]] = Field(default=None)\n    extensions: Optional[list[str]] = Field(default=None)\n\n\nclass ConfigEnterprise(BaseModel):\n    url: Optional[str] = Field(default=None, description=\"Enterprise URL\")\n\n\nclass ConfigCompaction(BaseModel):\n    auto: Optional[bool] = Field(default=None)\n    prune: Optional[bool] = Field(default=None)\n\n\nclass ConfigExperimentalHookFileEditedValue(BaseModel):\n    command: list[str]\n    environment: Optional[dict[str, Any]] = Field(default=None)\n\n\nclass ConfigExperimentalHookSessionCompleted(BaseModel):\n    command: list[str]\n    environment: Optional[dict[str, Any]] = Field(default=None)\n\n\nclass ConfigExperimentalHook(BaseModel):\n    file_edited: Optional[dict[str, Any]] = Field(default=None)\n    session_completed: Optional[list[ConfigExperimentalHookSessionCompleted]] = Field(default=None)\n\n\nclass ConfigExperimental(BaseModel):\n    hook: Optional[ConfigExperimentalHook] = Field(default=None)\n    chat_max_retries: Optional[float] = Field(default=None, alias=\"chatMaxRetries\", description=\"Number of retries for chat completions on failure\")\n    disable_paste_summary: Optional[bool] = Field(default=None)\n    batch_tool: Optional[bool] = Field(default=None)\n    open_telemetry: Optional[bool] = Field(default=None, alias=\"openTelemetry\")\n    primary_tools: Optional[list[str]] = Field(default=None, description=\"Tools that should only be available to primary agents.\")\n    continue_loop_on_deny: Optional[bool] = Field(default=None)\n    mcp_timeout: Optional[int] = Field(default=None, description=\"Timeout in milliseconds for model context protocol (MCP) requests\", gt=0, le=9007199254740991)\n\n\nclass Config(BaseModel):\n    schema: Optional[str] = Field(default=None, alias=\"$schema\", description=\"JSON schema reference for configuration validation\")\n    theme: Optional[str] = Field(default=None, description=\"Theme name to use for the interface\")\n    keybinds: Optional[KeybindsConfig] = Field(default=None)\n    log_level: Optional[LogLevel] = Field(default=None, alias=\"logLevel\")\n    tui: Optional[ConfigTui] = Field(default=None)\n    server: Optional[ServerConfig] = Field(default=None)\n    command: Optional[dict[str, Any]] = Field(default=None)\n    watcher: Optional[ConfigWatcher] = Field(default=None)\n    plugin: Optional[list[str]] = Field(default=None)\n    snapshot: Optional[bool] = Field(default=None)\n    share: Optional[ConfigShare] = Field(default=None)\n    autoshare: Optional[bool] = Field(default=None)\n    autoupdate: Optional[Union[bool, Literal[\"notify\"]]] = Field(default=None, description=\"Automatically update to the latest version. Set to true to auto-update, false to disable, or 'notify' to show update notifications\")\n    disabled_providers: Optional[list[str]] = Field(default=None, description=\"Disable providers that are loaded automatically\")\n    enabled_providers: Optional[list[str]] = Field(default=None, description=\"When set, ONLY these providers will be enabled. All other providers will be ignored\")\n    model: Optional[str] = Field(default=None, description=\"Model to use in the format of provider/model, eg anthropic/claude-2\")\n    small_model: Optional[str] = Field(default=None, description=\"Small model to use for tasks like title generation in the format of provider/model\")\n    default_agent: Optional[str] = Field(default=None, description=\"Default agent to use when none is specified. Must be a primary agent. Falls back to 'build' if not set or if the specified agent is invalid.\")\n    username: Optional[str] = Field(default=None, description=\"Custom username to display in conversations instead of system username\")\n    mode: Optional[ConfigMode] = Field(default=None)\n    agent: Optional[ConfigAgent] = Field(default=None)\n    provider: Optional[dict[str, Any]] = Field(default=None)\n    mcp: Optional[dict[str, Any]] = Field(default=None)\n    formatter: Optional[Union[Literal[False], dict[str, Any]]] = Field(default=None)\n    lsp: Optional[Union[Literal[False], dict[str, Any]]] = Field(default=None)\n    instructions: Optional[list[str]] = Field(default=None, description=\"Additional instruction files or patterns to include\")\n    layout: Optional[LayoutConfig] = Field(default=None)\n    permission: Optional[PermissionConfig_2] = Field(default=None)\n    tools: Optional[dict[str, Any]] = Field(default=None)\n    enterprise: Optional[ConfigEnterprise] = Field(default=None)\n    compaction: Optional[ConfigCompaction] = Field(default=None)\n    experimental: Optional[ConfigExperimental] = Field(default=None)\n\n\nToolIds: TypeAlias = list[str]\n\n\nclass ToolListItem(BaseModel):\n    id_: str = Field(..., alias=\"id\")\n    description: str\n    parameters: Any\n\n\nToolList: TypeAlias = list[ToolListItem]\n\n\nclass Path(BaseModel):\n    home: str\n    state: str\n    config: str\n    worktree: str\n    directory: str\n\n\nclass VcsInfo(BaseModel):\n    branch: str\n\n\nclass TextPartInputTime(BaseModel):\n    start: float\n    end: Optional[float] = Field(default=None)\n\n\nclass TextPartInput(BaseModel):\n    id_: Optional[str] = Field(default=None, alias=\"id\")\n    type_: Literal[\"text\"] = Field(..., alias=\"type\")\n    text: str\n    synthetic: Optional[bool] = Field(default=None)\n    ignored: Optional[bool] = Field(default=None)\n    time: Optional[TextPartInputTime] = Field(default=None)\n    metadata: Optional[dict[str, Any]] = Field(default=None)\n\n\nclass FilePartInput(BaseModel):\n    id_: Optional[str] = Field(default=None, alias=\"id\")\n    type_: Literal[\"file\"] = Field(..., alias=\"type\")\n    mime: str\n    filename: Optional[str] = Field(default=None)\n    url: str\n    source: Optional[FilePartSource] = Field(default=None)\n\n\nclass AgentPartInputSource(BaseModel):\n    value: str\n    start: int = Field(..., ge=-9007199254740991, le=9007199254740991)\n    end: int = Field(..., ge=-9007199254740991, le=9007199254740991)\n\n\nclass AgentPartInput(BaseModel):\n    id_: Optional[str] = Field(default=None, alias=\"id\")\n    type_: Literal[\"agent\"] = Field(..., alias=\"type\")\n    name: str\n    source: Optional[AgentPartInputSource] = Field(default=None)\n\n\nclass SubtaskPartInput(BaseModel):\n    id_: Optional[str] = Field(default=None, alias=\"id\")\n    type_: Literal[\"subtask\"] = Field(..., alias=\"type\")\n    prompt: str\n    description: str\n    agent: str\n    command: Optional[str] = Field(default=None)\n\n\nclass Command(BaseModel):\n    name: str\n    description: Optional[str] = Field(default=None)\n    agent: Optional[str] = Field(default=None)\n    model: Optional[str] = Field(default=None)\n    mcp: Optional[bool] = Field(default=None)\n    template: str\n    subtask: Optional[bool] = Field(default=None)\n    hints: list[str]\n\n\nclass ModelApi(BaseModel):\n    id_: str = Field(..., alias=\"id\")\n    url: str\n    npm: str\n\n\nclass ModelCapabilitiesInput(BaseModel):\n    text: bool\n    audio: bool\n    image: bool\n    video: bool\n    pdf: bool\n\n\nclass ModelCapabilitiesOutput(BaseModel):\n    text: bool\n    audio: bool\n    image: bool\n    video: bool\n    pdf: bool\n\n\nclass ModelCapabilitiesInterleavedField(Enum, str):\n    REASONING_CONTENT = \"reasoning_content\"\n    REASONING_DETAILS = \"reasoning_details\"\n\n\nclass ModelCapabilitiesInterleaved(BaseModel):\n    field: ModelCapabilitiesInterleavedField\n\n\nclass ModelCapabilities(BaseModel):\n    temperature: bool\n    reasoning: bool\n    attachment: bool\n    toolcall: bool\n    input_: ModelCapabilitiesInput = Field(..., alias=\"input\")\n    output: ModelCapabilitiesOutput\n    interleaved: Union[bool, ModelCapabilitiesInterleaved]\n\n\nclass ModelCostCache(BaseModel):\n    read: float\n    write: float\n\n\nclass ModelCostExperimentalOver200kCache(BaseModel):\n    read: float\n    write: float\n\n\nclass ModelCostExperimentalOver200k(BaseModel):\n    input_: float = Field(..., alias=\"input\")\n    output: float\n    cache: ModelCostExperimentalOver200kCache\n\n\nclass ModelCost(BaseModel):\n    input_: float = Field(..., alias=\"input\")\n    output: float\n    cache: ModelCostCache\n    experimental_over200k: Optional[ModelCostExperimentalOver200k] = Field(default=None, alias=\"experimentalOver200K\")\n\n\nclass ModelLimit(BaseModel):\n    context: float\n    output: float\n\n\nclass ModelStatus(Enum, str):\n    ALPHA = \"alpha\"\n    BETA = \"beta\"\n    DEPRECATED = \"deprecated\"\n    ACTIVE = \"active\"\n\n\nclass Model(BaseModel):\n    id_: str = Field(..., alias=\"id\")\n    provider_id: str = Field(..., alias=\"providerID\")\n    api: ModelApi\n    name: str\n    family: Optional[str] = Field(default=None)\n    capabilities: ModelCapabilities\n    cost: ModelCost\n    limit: ModelLimit\n    status: ModelStatus\n    options: dict[str, Any]\n    headers: dict[str, Any]\n    release_date: str\n    variants: Optional[dict[str, Any]] = Field(default=None)\n\n\nclass ProviderSource(Enum, str):\n    ENV = \"env\"\n    CONFIG = \"config\"\n    CUSTOM = \"custom\"\n    API = \"api\"\n\n\nclass Provider(BaseModel):\n    id_: str = Field(..., alias=\"id\")\n    name: str\n    source: ProviderSource\n    env: list[str]\n    key: Optional[str] = Field(default=None)\n    options: dict[str, Any]\n    models: dict[str, Any]\n\n\nclass ProviderAuthMethod(BaseModel):\n    type_: Union[Literal[\"oauth\"], Literal[\"api\"]] = Field(..., alias=\"type\")\n    label: str\n\n\nclass ProviderAuthAuthorization(BaseModel):\n    url: str\n    method: Union[Literal[\"auto\"], Literal[\"code\"]]\n    instructions: str\n\n\nclass SymbolLocation(BaseModel):\n    uri: str\n    range_: Range = Field(..., alias=\"range\")\n\n\nclass Symbol(BaseModel):\n    name: str\n    kind: float\n    location: SymbolLocation\n\n\nclass FileNodeType(Enum, str):\n    FILE = \"file\"\n    DIRECTORY = \"directory\"\n\n\nclass FileNode(BaseModel):\n    name: str\n    path: str\n    absolute: str\n    type_: FileNodeType = Field(..., alias=\"type\")\n    ignored: bool\n\n\nclass FileContentPatchHunks(BaseModel):\n    old_start: float = Field(..., alias=\"oldStart\")\n    old_lines: float = Field(..., alias=\"oldLines\")\n    new_start: float = Field(..., alias=\"newStart\")\n    new_lines: float = Field(..., alias=\"newLines\")\n    lines: list[str]\n\n\nclass FileContentPatch(BaseModel):\n    old_file_name: str = Field(..., alias=\"oldFileName\")\n    new_file_name: str = Field(..., alias=\"newFileName\")\n    old_header: Optional[str] = Field(default=None, alias=\"oldHeader\")\n    new_header: Optional[str] = Field(default=None, alias=\"newHeader\")\n    hunks: list[FileContentPatchHunks]\n    index: Optional[str] = Field(default=None)\n\n\nclass FileContent(BaseModel):\n    type_: Literal[\"text\"] = Field(..., alias=\"type\")\n    content: str\n    diff: Optional[str] = Field(default=None)\n    patch: Optional[FileContentPatch] = Field(default=None)\n    encoding: Optional[Literal[\"base64\"]] = Field(default=None)\n    mime_type: Optional[str] = Field(default=None, alias=\"mimeType\")\n\n\nclass FileStatus(Enum, str):\n    ADDED = \"added\"\n    DELETED = \"deleted\"\n    MODIFIED = \"modified\"\n\n\nclass File(BaseModel):\n    path: str\n    added: int = Field(..., ge=-9007199254740991, le=9007199254740991)\n    removed: int = Field(..., ge=-9007199254740991, le=9007199254740991)\n    status: FileStatus\n\n\nclass AgentMode(Enum, str):\n    SUBAGENT = \"subagent\"\n    PRIMARY = \"primary\"\n    ALL = \"all\"\n\n\nclass AgentModel(BaseModel):\n    model_id: str = Field(..., alias=\"modelID\")\n    provider_id: str = Field(..., alias=\"providerID\")\n\n\nclass Agent(BaseModel):\n    name: str\n    description: Optional[str] = Field(default=None)\n    mode: AgentMode\n    native: Optional[bool] = Field(default=None)\n    hidden: Optional[bool] = Field(default=None)\n    top_p: Optional[float] = Field(default=None, alias=\"topP\")\n    temperature: Optional[float] = Field(default=None)\n    color: Optional[str] = Field(default=None)\n    permission: PermissionRuleset\n    model: Optional[AgentModel] = Field(default=None)\n    prompt: Optional[str] = Field(default=None)\n    options: dict[str, Any]\n    steps: Optional[int] = Field(default=None, gt=0, le=9007199254740991)\n\n\nclass McpStatusConnected(BaseModel):\n    status: Literal[\"connected\"]\n\n\nclass McpStatusDisabled(BaseModel):\n    status: Literal[\"disabled\"]\n\n\nclass McpStatusFailed(BaseModel):\n    status: Literal[\"failed\"]\n    error: str\n\n\nclass McpStatusNeedsAuth(BaseModel):\n    status: Literal[\"needs_auth\"]\n\n\nclass McpStatusNeedsClientRegistration(BaseModel):\n    status: Literal[\"needs_client_registration\"]\n    error: str\n\n\nMcpStatus: TypeAlias = Union[McpStatusConnected, McpStatusDisabled, McpStatusFailed, McpStatusNeedsAuth, McpStatusNeedsClientRegistration]\n\n\nclass LspStatus(BaseModel):\n    id_: str = Field(..., alias=\"id\")\n    name: str\n    root: str\n    status: Union[Literal[\"connected\"], Literal[\"error\"]]\n\n\nclass FormatterStatus(BaseModel):\n    name: str\n    extensions: list[str]\n    enabled: bool\n\n\nclass OAuth(BaseModel):\n    type_: Literal[\"oauth\"] = Field(..., alias=\"type\")\n    refresh: str\n    access: str\n    expires: float\n    enterprise_url: Optional[str] = Field(default=None, alias=\"enterpriseUrl\")\n\n\nclass ApiAuth(BaseModel):\n    type_: Literal[\"api\"] = Field(..., alias=\"type\")\n    key: str\n\n\nclass WellKnownAuth(BaseModel):\n    type_: Literal[\"wellknown\"] = Field(..., alias=\"type\")\n    key: str\n    token: str\n\n\nAuth: TypeAlias = Union[OAuth, ApiAuth, WellKnownAuth]\n"
  },
  {
    "path": "packages/openapi-python-tests/pydantic/v2/package.json",
    "content": "{\n  \"name\": \"@test/openapi-python-pydantic-v2\",\n  \"version\": \"0.0.0\",\n  \"private\": true,\n  \"type\": \"module\",\n  \"devDependencies\": {\n    \"@hey-api/openapi-python\": \"workspace:*\",\n    \"typescript\": \"5.9.3\"\n  },\n  \"engines\": {\n    \"node\": \">=20.19.0\"\n  }\n}\n"
  },
  {
    "path": "packages/openapi-python-tests/pydantic/v2/test/opencode.test.ts",
    "content": "import fs from 'node:fs';\nimport path from 'node:path';\n\nimport { createClient } from '@hey-api/openapi-python';\n\nimport { getFilePaths } from '../../../utils';\nimport { createPydanticConfig, getSnapshotsPath, getTempSnapshotsPath } from './utils';\n\nconst version = '3.1.x';\n\nconst outputDir = path.join(getTempSnapshotsPath(), version);\nconst snapshotsDir = path.join(getSnapshotsPath(), version);\n\ndescribe(`Pydantic: OpenAPI ${version}`, () => {\n  const createConfig = createPydanticConfig({\n    openApiVersion: version,\n    outputDir,\n  });\n\n  const scenarios = [\n    {\n      config: createConfig({\n        input: 'opencode.yaml',\n        output: 'opencode',\n      }),\n      description: 'OpenCode spec',\n    },\n  ];\n\n  it.each(scenarios)('$description', async ({ config }) => {\n    await createClient(config);\n\n    const filePaths = getFilePaths(config.output);\n\n    await Promise.all(\n      filePaths.map(async (filePath) => {\n        const fileContent = fs.readFileSync(filePath, 'utf-8');\n        await expect(fileContent).toMatchFileSnapshot(\n          path.join(snapshotsDir, filePath.slice(outputDir.length + 1)),\n        );\n      }),\n    );\n  });\n});\n"
  },
  {
    "path": "packages/openapi-python-tests/pydantic/v2/test/utils.ts",
    "content": "import path from 'node:path';\nimport { fileURLToPath } from 'node:url';\n\nimport { type UserConfig } from '@hey-api/openapi-python';\n\nimport { getSpecsPath } from '../../../utils';\n\nconst __filename = fileURLToPath(import.meta.url);\nconst __dirname = path.dirname(__filename);\n\nexport const createPydanticConfig =\n  ({ openApiVersion, outputDir }: { openApiVersion: string; outputDir: string }) =>\n  (userConfig: UserConfig) => {\n    const input = userConfig.input instanceof Array ? userConfig.input[0]! : userConfig.input;\n    const inputPath = path.join(\n      getSpecsPath(),\n      openApiVersion,\n      typeof input === 'string' ? input : (input.path as string),\n    );\n    return {\n      plugins: ['pydantic'],\n      ...userConfig,\n      input:\n        typeof userConfig.input === 'string'\n          ? inputPath\n          : {\n              ...userConfig.input,\n              path: inputPath,\n            },\n      logs: {\n        level: 'silent',\n        path: './logs',\n      },\n      output: path.join(outputDir, typeof userConfig.output === 'string' ? userConfig.output : ''),\n    } as const satisfies UserConfig;\n  };\n\nexport const getSnapshotsPath = (): string => path.join(__dirname, '..', '__snapshots__');\n\nexport const getTempSnapshotsPath = (): string => path.join(__dirname, '..', '.gen', 'snapshots');\n"
  },
  {
    "path": "packages/openapi-python-tests/pydantic/v2/tsconfig.json",
    "content": "{\n  \"extends\": \"../../tsconfig.base.json\",\n  \"include\": [\"test/**/*\"],\n  \"exclude\": [\".gen/**/*\"],\n  \"references\": [{ \"path\": \"../../../openapi-python\" }]\n}\n"
  },
  {
    "path": "packages/openapi-python-tests/pydantic/v2/turbo.json",
    "content": "{\n  \"$schema\": \"../../../../node_modules/turbo/schema.json\",\n  \"extends\": [\"//\"],\n  \"tasks\": {\n    \"build\": {\n      \"dependsOn\": [],\n      \"outputs\": [\"dist/**\"]\n    }\n  }\n}\n"
  },
  {
    "path": "packages/openapi-python-tests/pydantic/v2/vitest.setup.ts",
    "content": "import { fileURLToPath } from 'node:url';\n\nimport { beforeAll } from 'vitest';\n\nbeforeAll(() => {\n  process.chdir(fileURLToPath(new URL('.', import.meta.url)));\n});\n"
  },
  {
    "path": "packages/openapi-python-tests/sdks/.gitignore",
    "content": ".DS_Store\n.idea\n.tmp\n.tsdown\nlogs\nnode_modules\ntemp\n\n.env\ncoverage\ndist\n\n# test files\n.gen\n"
  },
  {
    "path": "packages/openapi-python-tests/sdks/__snapshots__/opencode/default/__init__.py",
    "content": "# This file is auto-generated by @hey-api/openapi-python\n\nfrom .sdk_gen import App, Auth, Auth_2, Command, Config, Control, Event, File, Find, Formatter, Global, Instance, Lsp, Mcp, Oauth, Part, Path, Permission, Project, Provider, Pty, Sdk, Session, Tool, Tui, Vcs\n\n__all__ = [\"App\", \"Auth\", \"Auth_2\", \"Command\", \"Config\", \"Control\", \"Event\", \"File\", \"Find\", \"Formatter\", \"Global\", \"Instance\", \"Lsp\", \"Mcp\", \"Oauth\", \"Part\", \"Path\", \"Permission\", \"Project\", \"Provider\", \"Pty\", \"Sdk\", \"Session\", \"Tool\", \"Tui\", \"Vcs\"]\n"
  },
  {
    "path": "packages/openapi-python-tests/sdks/__snapshots__/opencode/default/client/__init__.py",
    "content": "# This file is auto-generated by @hey-api/openapi-python\n\nfrom .client_gen import Client, build_client_params, create_client\n\n__all__ = [\"Client\", \"build_client_params\", \"create_client\"]\n"
  },
  {
    "path": "packages/openapi-python-tests/sdks/__snapshots__/opencode/default/client/client_gen.py",
    "content": "# This file is auto-generated by @hey-api/openapi-python\n\nfrom typing import Any, Optional\nimport httpx\n\n\nEXTRA_PREFIXES_MAP = {\n    \"$body_\": \"json\",\n    \"$headers_\": \"headers\",\n    \"$path_\": \"path\",\n    \"$query_\": \"params\",\n}\n\n\ndef build_client_params(fields: list[dict[str, Any]], **kwargs) -> dict[str, Any]:\n    \"\"\"Build client parameters from flat keyword arguments.\n\n    Args:\n        fields: List of field configurations with 'in', 'key', and optional 'map'.\n        **kwargs: Flat parameters passed to the SDK method.\n\n    Returns:\n        Dict suitable for httpx client methods: {params: {...}, headers: {...}, json: Any}\n    \"\"\"\n    result: dict[str, Any] = {}\n\n    key_map = {}\n    for field in fields:\n        key = field.get(\"key\")\n        if key:\n            key_map[key] = {\n                \"in\": field.get(\"in\"),\n                \"map\": field.get(\"map\", key),\n            }\n\n    for key, value in kwargs.items():\n        if value is None:\n            continue\n\n        field = key_map.get(key)\n\n        if field:\n            in_slot = field[\"in\"]\n            map_key = field[\"map\"]\n            slot = \"json\" if in_slot == \"body\" else in_slot\n\n            if in_slot == \"body\":\n                result[slot] = value\n            else:\n                if slot not in result:\n                    result[slot] = {}\n                result[slot][map_key] = value\n        else:\n            for prefix, slot in EXTRA_PREFIXES_MAP.items():\n                if key.startswith(prefix):\n                    actual_key = key[len(prefix) :]\n                    if slot not in result:\n                        result[slot] = {}\n                    result[slot][actual_key] = value\n                    break\n            else:\n                if \"params\" not in result:\n                    result[\"params\"] = {}\n                result[\"params\"][key] = value\n\n    for slot in list(result.keys()):\n        if not result[slot]:\n            del result[slot]\n\n    return result\n\n\nclass BaseClient:\n    \"\"\"Base HTTP client using httpx that SDK classes extend.\"\"\"\n\n    def __init__(self, client: Optional[httpx.Client] = None, base_url: Optional[str] = None, **kwargs):\n        if client is not None:\n            self._client = client\n        else:\n            self._client = httpx.Client(base_url=base_url or \"\", **kwargs)\n\n    @property\n    def client(self) -> httpx.Client:\n        \"\"\"Get the httpx client instance.\"\"\"\n        return self._client\n\n    def request(self, method: str, url: str, **kwargs) -> httpx.Response:\n        \"\"\"Make an HTTP request.\"\"\"\n        return self._client.request(method, url, **kwargs)\n\n    def get(self, url: str, **kwargs) -> httpx.Response:\n        \"\"\"Make a GET request.\"\"\"\n        return self._client.get(url, **kwargs)\n\n    def post(self, url: str, **kwargs) -> httpx.Response:\n        \"\"\"Make a POST request.\"\"\"\n        return self._client.post(url, **kwargs)\n\n    def put(self, url: str, **kwargs) -> httpx.Response:\n        \"\"\"Make a PUT request.\"\"\"\n        return self._client.put(url, **kwargs)\n\n    def patch(self, url: str, **kwargs) -> httpx.Response:\n        \"\"\"Make a PATCH request.\"\"\"\n        return self._client.patch(url, **kwargs)\n\n    def delete(self, url: str, **kwargs) -> httpx.Response:\n        \"\"\"Make a DELETE request.\"\"\"\n        return self._client.delete(url, **kwargs)\n\n    def close(self):\n        \"\"\"Close the client.\"\"\"\n        self._client.close()\n\n    def __enter__(self):\n        return self\n\n    def __exit__(self, *args):\n        self.close()\n\n\nclass Client(BaseClient):\n    \"\"\"HTTP client using httpx (alias for BaseClient).\"\"\"\n\n    pass\n\n\ndef create_client(base_url: Optional[str] = None, **kwargs) -> Client:\n    \"\"\"Create a new HTTP client instance.\"\"\"\n    return Client(base_url=base_url, **kwargs)\n"
  },
  {
    "path": "packages/openapi-python-tests/sdks/__snapshots__/opencode/default/pydantic_gen.py",
    "content": "# This file is auto-generated by @hey-api/openapi-python\n\nfrom enum import Enum\nfrom pydantic import BaseModel, Field\nfrom typing import Any, Literal, Optional, TypeAlias, Union\n\n\nclass EventInstallationUpdatedProperties(BaseModel):\n    version: str\n\n\nclass EventInstallationUpdated(BaseModel):\n    type_: Literal[\"installation.updated\"] = Field(..., alias=\"type\")\n    properties: EventInstallationUpdatedProperties\n\n\nclass EventInstallationUpdateAvailableProperties(BaseModel):\n    version: str\n\n\nclass EventInstallationUpdateAvailable(BaseModel):\n    type_: Literal[\"installation.update-available\"] = Field(..., alias=\"type\")\n    properties: EventInstallationUpdateAvailableProperties\n\n\nclass ProjectIcon(BaseModel):\n    url: Optional[str] = Field(default=None)\n    color: Optional[str] = Field(default=None)\n\n\nclass ProjectTime(BaseModel):\n    created: float\n    updated: float\n    initialized: Optional[float] = Field(default=None)\n\n\nclass Project(BaseModel):\n    id_: str = Field(..., alias=\"id\")\n    worktree: str\n    vcs: Optional[Literal[\"git\"]] = Field(default=None)\n    name: Optional[str] = Field(default=None)\n    icon: Optional[ProjectIcon] = Field(default=None)\n    time: ProjectTime\n\n\nclass EventProjectUpdated(BaseModel):\n    type_: Literal[\"project.updated\"] = Field(..., alias=\"type\")\n    properties: Project\n\n\nclass EventServerInstanceDisposedProperties(BaseModel):\n    directory: str\n\n\nclass EventServerInstanceDisposed(BaseModel):\n    type_: Literal[\"server.instance.disposed\"] = Field(..., alias=\"type\")\n    properties: EventServerInstanceDisposedProperties\n\n\nclass EventLspClientDiagnosticsProperties(BaseModel):\n    server_id: str = Field(..., alias=\"serverID\")\n    path: str\n\n\nclass EventLspClientDiagnostics(BaseModel):\n    type_: Literal[\"lsp.client.diagnostics\"] = Field(..., alias=\"type\")\n    properties: EventLspClientDiagnosticsProperties\n\n\nclass EventLspUpdated(BaseModel):\n    type_: Literal[\"lsp.updated\"] = Field(..., alias=\"type\")\n    properties: dict[str, Any]\n\n\nclass FileDiff(BaseModel):\n    file: str\n    before: str\n    after: str\n    additions: float\n    deletions: float\n\n\nclass UserMessageTime(BaseModel):\n    created: float\n\n\nclass UserMessageSummary(BaseModel):\n    title: Optional[str] = Field(default=None)\n    body: Optional[str] = Field(default=None)\n    diffs: list[FileDiff]\n\n\nclass UserMessageModel(BaseModel):\n    provider_id: str = Field(..., alias=\"providerID\")\n    model_id: str = Field(..., alias=\"modelID\")\n\n\nclass UserMessage(BaseModel):\n    id_: str = Field(..., alias=\"id\")\n    session_id: str = Field(..., alias=\"sessionID\")\n    role: Literal[\"user\"]\n    time: UserMessageTime\n    summary: Optional[UserMessageSummary] = Field(default=None)\n    agent: str\n    model: UserMessageModel\n    system: Optional[str] = Field(default=None)\n    tools: Optional[dict[str, Any]] = Field(default=None)\n    variant: Optional[str] = Field(default=None)\n\n\nclass ProviderAuthErrorData(BaseModel):\n    provider_id: str = Field(..., alias=\"providerID\")\n    message: str\n\n\nclass ProviderAuthError(BaseModel):\n    name: Literal[\"ProviderAuthError\"]\n    data: ProviderAuthErrorData\n\n\nclass UnknownErrorData(BaseModel):\n    message: str\n\n\nclass UnknownError(BaseModel):\n    name: Literal[\"UnknownError\"]\n    data: UnknownErrorData\n\n\nclass MessageOutputLengthError(BaseModel):\n    name: Literal[\"MessageOutputLengthError\"]\n    data: dict[str, Any]\n\n\nclass MessageAbortedErrorData(BaseModel):\n    message: str\n\n\nclass MessageAbortedError(BaseModel):\n    name: Literal[\"MessageAbortedError\"]\n    data: MessageAbortedErrorData\n\n\nclass ApiErrorData(BaseModel):\n    message: str\n    status_code: Optional[float] = Field(default=None, alias=\"statusCode\")\n    is_retryable: bool = Field(..., alias=\"isRetryable\")\n    response_headers: Optional[dict[str, Any]] = Field(default=None, alias=\"responseHeaders\")\n    response_body: Optional[str] = Field(default=None, alias=\"responseBody\")\n    metadata: Optional[dict[str, Any]] = Field(default=None)\n\n\nclass ApiError(BaseModel):\n    name: Literal[\"APIError\"]\n    data: ApiErrorData\n\n\nclass AssistantMessageTime(BaseModel):\n    created: float\n    completed: Optional[float] = Field(default=None)\n\n\nclass AssistantMessagePath(BaseModel):\n    cwd: str\n    root: str\n\n\nclass AssistantMessageTokensCache(BaseModel):\n    read: float\n    write: float\n\n\nclass AssistantMessageTokens(BaseModel):\n    input_: float = Field(..., alias=\"input\")\n    output: float\n    reasoning: float\n    cache: AssistantMessageTokensCache\n\n\nclass AssistantMessage(BaseModel):\n    id_: str = Field(..., alias=\"id\")\n    session_id: str = Field(..., alias=\"sessionID\")\n    role: Literal[\"assistant\"]\n    time: AssistantMessageTime\n    error: Optional[Union[ProviderAuthError, UnknownError, MessageOutputLengthError, MessageAbortedError, ApiError]] = Field(default=None)\n    parent_id: str = Field(..., alias=\"parentID\")\n    model_id: str = Field(..., alias=\"modelID\")\n    provider_id: str = Field(..., alias=\"providerID\")\n    mode: str\n    agent: str\n    path: AssistantMessagePath\n    summary: Optional[bool] = Field(default=None)\n    cost: float\n    tokens: AssistantMessageTokens\n    finish: Optional[str] = Field(default=None)\n\n\nMessage: TypeAlias = Union[UserMessage, AssistantMessage]\n\n\nclass EventMessageUpdatedProperties(BaseModel):\n    info: Message\n\n\nclass EventMessageUpdated(BaseModel):\n    type_: Literal[\"message.updated\"] = Field(..., alias=\"type\")\n    properties: EventMessageUpdatedProperties\n\n\nclass EventMessageRemovedProperties(BaseModel):\n    session_id: str = Field(..., alias=\"sessionID\")\n    message_id: str = Field(..., alias=\"messageID\")\n\n\nclass EventMessageRemoved(BaseModel):\n    type_: Literal[\"message.removed\"] = Field(..., alias=\"type\")\n    properties: EventMessageRemovedProperties\n\n\nclass TextPartTime(BaseModel):\n    start: float\n    end: Optional[float] = Field(default=None)\n\n\nclass TextPart(BaseModel):\n    id_: str = Field(..., alias=\"id\")\n    session_id: str = Field(..., alias=\"sessionID\")\n    message_id: str = Field(..., alias=\"messageID\")\n    type_: Literal[\"text\"] = Field(..., alias=\"type\")\n    text: str\n    synthetic: Optional[bool] = Field(default=None)\n    ignored: Optional[bool] = Field(default=None)\n    time: Optional[TextPartTime] = Field(default=None)\n    metadata: Optional[dict[str, Any]] = Field(default=None)\n\n\nclass ReasoningPartTime(BaseModel):\n    start: float\n    end: Optional[float] = Field(default=None)\n\n\nclass ReasoningPart(BaseModel):\n    id_: str = Field(..., alias=\"id\")\n    session_id: str = Field(..., alias=\"sessionID\")\n    message_id: str = Field(..., alias=\"messageID\")\n    type_: Literal[\"reasoning\"] = Field(..., alias=\"type\")\n    text: str\n    metadata: Optional[dict[str, Any]] = Field(default=None)\n    time: ReasoningPartTime\n\n\nclass FilePartSourceText(BaseModel):\n    value: str\n    start: int = Field(..., ge=-9007199254740991, le=9007199254740991)\n    end: int = Field(..., ge=-9007199254740991, le=9007199254740991)\n\n\nclass FileSource(BaseModel):\n    text: FilePartSourceText\n    type_: Literal[\"file\"] = Field(..., alias=\"type\")\n    path: str\n\n\nclass RangeStart(BaseModel):\n    line: float\n    character: float\n\n\nclass RangeEnd(BaseModel):\n    line: float\n    character: float\n\n\nclass Range(BaseModel):\n    start: RangeStart\n    end: RangeEnd\n\n\nclass SymbolSource(BaseModel):\n    text: FilePartSourceText\n    type_: Literal[\"symbol\"] = Field(..., alias=\"type\")\n    path: str\n    range_: Range = Field(..., alias=\"range\")\n    name: str\n    kind: int = Field(..., ge=-9007199254740991, le=9007199254740991)\n\n\nFilePartSource: TypeAlias = Union[FileSource, SymbolSource]\n\n\nclass FilePart(BaseModel):\n    id_: str = Field(..., alias=\"id\")\n    session_id: str = Field(..., alias=\"sessionID\")\n    message_id: str = Field(..., alias=\"messageID\")\n    type_: Literal[\"file\"] = Field(..., alias=\"type\")\n    mime: str\n    filename: Optional[str] = Field(default=None)\n    url: str\n    source: Optional[FilePartSource] = Field(default=None)\n\n\nclass ToolStatePending(BaseModel):\n    status: Literal[\"pending\"]\n    input_: dict[str, Any] = Field(..., alias=\"input\")\n    raw: str\n\n\nclass ToolStateRunningTime(BaseModel):\n    start: float\n\n\nclass ToolStateRunning(BaseModel):\n    status: Literal[\"running\"]\n    input_: dict[str, Any] = Field(..., alias=\"input\")\n    title: Optional[str] = Field(default=None)\n    metadata: Optional[dict[str, Any]] = Field(default=None)\n    time: ToolStateRunningTime\n\n\nclass ToolStateCompletedTime(BaseModel):\n    start: float\n    end: float\n    compacted: Optional[float] = Field(default=None)\n\n\nclass ToolStateCompleted(BaseModel):\n    status: Literal[\"completed\"]\n    input_: dict[str, Any] = Field(..., alias=\"input\")\n    output: str\n    title: str\n    metadata: dict[str, Any]\n    time: ToolStateCompletedTime\n    attachments: Optional[list[FilePart]] = Field(default=None)\n\n\nclass ToolStateErrorTime(BaseModel):\n    start: float\n    end: float\n\n\nclass ToolStateError(BaseModel):\n    status: Literal[\"error\"]\n    input_: dict[str, Any] = Field(..., alias=\"input\")\n    error: str\n    metadata: Optional[dict[str, Any]] = Field(default=None)\n    time: ToolStateErrorTime\n\n\nToolState: TypeAlias = Union[ToolStatePending, ToolStateRunning, ToolStateCompleted, ToolStateError]\n\n\nclass ToolPart(BaseModel):\n    id_: str = Field(..., alias=\"id\")\n    session_id: str = Field(..., alias=\"sessionID\")\n    message_id: str = Field(..., alias=\"messageID\")\n    type_: Literal[\"tool\"] = Field(..., alias=\"type\")\n    call_id: str = Field(..., alias=\"callID\")\n    tool: str\n    state: ToolState\n    metadata: Optional[dict[str, Any]] = Field(default=None)\n\n\nclass StepStartPart(BaseModel):\n    id_: str = Field(..., alias=\"id\")\n    session_id: str = Field(..., alias=\"sessionID\")\n    message_id: str = Field(..., alias=\"messageID\")\n    type_: Literal[\"step-start\"] = Field(..., alias=\"type\")\n    snapshot: Optional[str] = Field(default=None)\n\n\nclass StepFinishPartTokensCache(BaseModel):\n    read: float\n    write: float\n\n\nclass StepFinishPartTokens(BaseModel):\n    input_: float = Field(..., alias=\"input\")\n    output: float\n    reasoning: float\n    cache: StepFinishPartTokensCache\n\n\nclass StepFinishPart(BaseModel):\n    id_: str = Field(..., alias=\"id\")\n    session_id: str = Field(..., alias=\"sessionID\")\n    message_id: str = Field(..., alias=\"messageID\")\n    type_: Literal[\"step-finish\"] = Field(..., alias=\"type\")\n    reason: str\n    snapshot: Optional[str] = Field(default=None)\n    cost: float\n    tokens: StepFinishPartTokens\n\n\nclass SnapshotPart(BaseModel):\n    id_: str = Field(..., alias=\"id\")\n    session_id: str = Field(..., alias=\"sessionID\")\n    message_id: str = Field(..., alias=\"messageID\")\n    type_: Literal[\"snapshot\"] = Field(..., alias=\"type\")\n    snapshot: str\n\n\nclass PatchPart(BaseModel):\n    id_: str = Field(..., alias=\"id\")\n    session_id: str = Field(..., alias=\"sessionID\")\n    message_id: str = Field(..., alias=\"messageID\")\n    type_: Literal[\"patch\"] = Field(..., alias=\"type\")\n    hash_: str = Field(..., alias=\"hash\")\n    files: list[str]\n\n\nclass AgentPartSource(BaseModel):\n    value: str\n    start: int = Field(..., ge=-9007199254740991, le=9007199254740991)\n    end: int = Field(..., ge=-9007199254740991, le=9007199254740991)\n\n\nclass AgentPart(BaseModel):\n    id_: str = Field(..., alias=\"id\")\n    session_id: str = Field(..., alias=\"sessionID\")\n    message_id: str = Field(..., alias=\"messageID\")\n    type_: Literal[\"agent\"] = Field(..., alias=\"type\")\n    name: str\n    source: Optional[AgentPartSource] = Field(default=None)\n\n\nclass RetryPartTime(BaseModel):\n    created: float\n\n\nclass RetryPart(BaseModel):\n    id_: str = Field(..., alias=\"id\")\n    session_id: str = Field(..., alias=\"sessionID\")\n    message_id: str = Field(..., alias=\"messageID\")\n    type_: Literal[\"retry\"] = Field(..., alias=\"type\")\n    attempt: float\n    error: ApiError\n    time: RetryPartTime\n\n\nclass CompactionPart(BaseModel):\n    id_: str = Field(..., alias=\"id\")\n    session_id: str = Field(..., alias=\"sessionID\")\n    message_id: str = Field(..., alias=\"messageID\")\n    type_: Literal[\"compaction\"] = Field(..., alias=\"type\")\n    auto: bool\n\n\nclass Part(BaseModel):\n    id_: str = Field(..., alias=\"id\")\n    session_id: str = Field(..., alias=\"sessionID\")\n    message_id: str = Field(..., alias=\"messageID\")\n    type_: Literal[\"subtask\"] = Field(..., alias=\"type\")\n    prompt: str\n    description: str\n    agent: str\n    command: Optional[str] = Field(default=None)\n\n\nPart_2: TypeAlias = Union[TextPart, Part, ReasoningPart, FilePart, ToolPart, StepStartPart, StepFinishPart, SnapshotPart, PatchPart, AgentPart, RetryPart, CompactionPart]\n\n\nclass EventMessagePartUpdatedProperties(BaseModel):\n    part: Part_2\n    delta: Optional[str] = Field(default=None)\n\n\nclass EventMessagePartUpdated(BaseModel):\n    type_: Literal[\"message.part.updated\"] = Field(..., alias=\"type\")\n    properties: EventMessagePartUpdatedProperties\n\n\nclass EventMessagePartRemovedProperties(BaseModel):\n    session_id: str = Field(..., alias=\"sessionID\")\n    message_id: str = Field(..., alias=\"messageID\")\n    part_id: str = Field(..., alias=\"partID\")\n\n\nclass EventMessagePartRemoved(BaseModel):\n    type_: Literal[\"message.part.removed\"] = Field(..., alias=\"type\")\n    properties: EventMessagePartRemovedProperties\n\n\nclass PermissionRequestTool(BaseModel):\n    message_id: str = Field(..., alias=\"messageID\")\n    call_id: str = Field(..., alias=\"callID\")\n\n\nclass PermissionRequest(BaseModel):\n    id_: str = Field(..., alias=\"id\", pattern=\"^per.*\")\n    session_id: str = Field(..., alias=\"sessionID\", pattern=\"^ses.*\")\n    permission: str\n    patterns: list[str]\n    metadata: dict[str, Any]\n    always: list[str]\n    tool: Optional[PermissionRequestTool] = Field(default=None)\n\n\nclass EventPermissionAsked(BaseModel):\n    type_: Literal[\"permission.asked\"] = Field(..., alias=\"type\")\n    properties: PermissionRequest\n\n\nclass EventPermissionRepliedPropertiesReply(Enum, str):\n    ONCE = \"once\"\n    ALWAYS = \"always\"\n    REJECT = \"reject\"\n\n\nclass EventPermissionRepliedProperties(BaseModel):\n    session_id: str = Field(..., alias=\"sessionID\")\n    request_id: str = Field(..., alias=\"requestID\")\n    reply: EventPermissionRepliedPropertiesReply\n\n\nclass EventPermissionReplied(BaseModel):\n    type_: Literal[\"permission.replied\"] = Field(..., alias=\"type\")\n    properties: EventPermissionRepliedProperties\n\n\nclass SessionStatus(BaseModel):\n    type_: Literal[\"idle\"] = Field(..., alias=\"type\")\n\n\nclass SessionStatus_2(BaseModel):\n    type_: Literal[\"retry\"] = Field(..., alias=\"type\")\n    attempt: float\n    message: str\n    next_: float = Field(..., alias=\"next\")\n\n\nclass SessionStatus_3(BaseModel):\n    type_: Literal[\"busy\"] = Field(..., alias=\"type\")\n\n\nSessionStatus_4: TypeAlias = Union[SessionStatus, SessionStatus_2, SessionStatus_3]\n\n\nclass EventSessionStatusProperties(BaseModel):\n    session_id: str = Field(..., alias=\"sessionID\")\n    status: SessionStatus_4\n\n\nclass EventSessionStatus(BaseModel):\n    type_: Literal[\"session.status\"] = Field(..., alias=\"type\")\n    properties: EventSessionStatusProperties\n\n\nclass EventSessionIdleProperties(BaseModel):\n    session_id: str = Field(..., alias=\"sessionID\")\n\n\nclass EventSessionIdle(BaseModel):\n    type_: Literal[\"session.idle\"] = Field(..., alias=\"type\")\n    properties: EventSessionIdleProperties\n\n\nclass EventSessionCompactedProperties(BaseModel):\n    session_id: str = Field(..., alias=\"sessionID\")\n\n\nclass EventSessionCompacted(BaseModel):\n    type_: Literal[\"session.compacted\"] = Field(..., alias=\"type\")\n    properties: EventSessionCompactedProperties\n\n\nclass EventFileEditedProperties(BaseModel):\n    file: str\n\n\nclass EventFileEdited(BaseModel):\n    type_: Literal[\"file.edited\"] = Field(..., alias=\"type\")\n    properties: EventFileEditedProperties\n\n\nclass Todo(BaseModel):\n    content: str = Field(..., description=\"Brief description of the task\")\n    status: str = Field(..., description=\"Current status of the task: pending, in_progress, completed, cancelled\")\n    priority: str = Field(..., description=\"Priority level of the task: high, medium, low\")\n    id_: str = Field(..., alias=\"id\", description=\"Unique identifier for the todo item\")\n\n\nclass EventTodoUpdatedProperties(BaseModel):\n    session_id: str = Field(..., alias=\"sessionID\")\n    todos: list[Todo]\n\n\nclass EventTodoUpdated(BaseModel):\n    type_: Literal[\"todo.updated\"] = Field(..., alias=\"type\")\n    properties: EventTodoUpdatedProperties\n\n\nclass EventTuiPromptAppendProperties(BaseModel):\n    text: str\n\n\nclass EventTuiPromptAppend(BaseModel):\n    type_: Literal[\"tui.prompt.append\"] = Field(..., alias=\"type\")\n    properties: EventTuiPromptAppendProperties\n\n\nclass EventTuiCommandExecutePropertiesCommand(Enum, str):\n    SESSION_LIST = \"session.list\"\n    SESSION_NEW = \"session.new\"\n    SESSION_SHARE = \"session.share\"\n    SESSION_INTERRUPT = \"session.interrupt\"\n    SESSION_COMPACT = \"session.compact\"\n    SESSION_PAGE_UP = \"session.page.up\"\n    SESSION_PAGE_DOWN = \"session.page.down\"\n    SESSION_HALF_PAGE_UP = \"session.half.page.up\"\n    SESSION_HALF_PAGE_DOWN = \"session.half.page.down\"\n    SESSION_FIRST = \"session.first\"\n    SESSION_LAST = \"session.last\"\n    PROMPT_CLEAR = \"prompt.clear\"\n    PROMPT_SUBMIT = \"prompt.submit\"\n    AGENT_CYCLE = \"agent.cycle\"\n\n\nclass EventTuiCommandExecuteProperties(BaseModel):\n    command: Union[EventTuiCommandExecutePropertiesCommand, str]\n\n\nclass EventTuiCommandExecute(BaseModel):\n    type_: Literal[\"tui.command.execute\"] = Field(..., alias=\"type\")\n    properties: EventTuiCommandExecuteProperties\n\n\nclass EventTuiToastShowPropertiesVariant(Enum, str):\n    INFO = \"info\"\n    SUCCESS = \"success\"\n    WARNING = \"warning\"\n    ERROR = \"error\"\n\n\nclass EventTuiToastShowProperties(BaseModel):\n    title: Optional[str] = Field(default=None)\n    message: str\n    variant: EventTuiToastShowPropertiesVariant\n    duration: Optional[float] = Field(default=5000, description=\"Duration in milliseconds\")\n\n\nclass EventTuiToastShow(BaseModel):\n    type_: Literal[\"tui.toast.show\"] = Field(..., alias=\"type\")\n    properties: EventTuiToastShowProperties\n\n\nclass EventMcpToolsChangedProperties(BaseModel):\n    server: str\n\n\nclass EventMcpToolsChanged(BaseModel):\n    type_: Literal[\"mcp.tools.changed\"] = Field(..., alias=\"type\")\n    properties: EventMcpToolsChangedProperties\n\n\nclass EventCommandExecutedProperties(BaseModel):\n    name: str\n    session_id: str = Field(..., alias=\"sessionID\", pattern=\"^ses.*\")\n    arguments: str\n    message_id: str = Field(..., alias=\"messageID\", pattern=\"^msg.*\")\n\n\nclass EventCommandExecuted(BaseModel):\n    type_: Literal[\"command.executed\"] = Field(..., alias=\"type\")\n    properties: EventCommandExecutedProperties\n\n\nclass PermissionAction(Enum, str):\n    ALLOW = \"allow\"\n    DENY = \"deny\"\n    ASK = \"ask\"\n\n\nclass PermissionRule(BaseModel):\n    permission: str\n    pattern: str\n    action: PermissionAction\n\n\nPermissionRuleset: TypeAlias = list[PermissionRule]\n\n\nclass SessionSummary(BaseModel):\n    additions: float\n    deletions: float\n    files: float\n    diffs: Optional[list[FileDiff]] = Field(default=None)\n\n\nclass SessionShare(BaseModel):\n    url: str\n\n\nclass SessionTime(BaseModel):\n    created: float\n    updated: float\n    compacting: Optional[float] = Field(default=None)\n    archived: Optional[float] = Field(default=None)\n\n\nclass SessionRevert(BaseModel):\n    message_id: str = Field(..., alias=\"messageID\")\n    part_id: Optional[str] = Field(default=None, alias=\"partID\")\n    snapshot: Optional[str] = Field(default=None)\n    diff: Optional[str] = Field(default=None)\n\n\nclass Session(BaseModel):\n    id_: str = Field(..., alias=\"id\", pattern=\"^ses.*\")\n    project_id: str = Field(..., alias=\"projectID\")\n    directory: str\n    parent_id: Optional[str] = Field(default=None, alias=\"parentID\", pattern=\"^ses.*\")\n    summary: Optional[SessionSummary] = Field(default=None)\n    share: Optional[SessionShare] = Field(default=None)\n    title: str\n    version: str\n    time: SessionTime\n    permission: Optional[PermissionRuleset] = Field(default=None)\n    revert: Optional[SessionRevert] = Field(default=None)\n\n\nclass EventSessionCreatedProperties(BaseModel):\n    info: Session\n\n\nclass EventSessionCreated(BaseModel):\n    type_: Literal[\"session.created\"] = Field(..., alias=\"type\")\n    properties: EventSessionCreatedProperties\n\n\nclass EventSessionUpdatedProperties(BaseModel):\n    info: Session\n\n\nclass EventSessionUpdated(BaseModel):\n    type_: Literal[\"session.updated\"] = Field(..., alias=\"type\")\n    properties: EventSessionUpdatedProperties\n\n\nclass EventSessionDeletedProperties(BaseModel):\n    info: Session\n\n\nclass EventSessionDeleted(BaseModel):\n    type_: Literal[\"session.deleted\"] = Field(..., alias=\"type\")\n    properties: EventSessionDeletedProperties\n\n\nclass EventSessionDiffProperties(BaseModel):\n    session_id: str = Field(..., alias=\"sessionID\")\n    diff: list[FileDiff]\n\n\nclass EventSessionDiff(BaseModel):\n    type_: Literal[\"session.diff\"] = Field(..., alias=\"type\")\n    properties: EventSessionDiffProperties\n\n\nclass EventSessionErrorProperties(BaseModel):\n    session_id: Optional[str] = Field(default=None, alias=\"sessionID\")\n    error: Optional[Union[ProviderAuthError, UnknownError, MessageOutputLengthError, MessageAbortedError, ApiError]] = Field(default=None)\n\n\nclass EventSessionError(BaseModel):\n    type_: Literal[\"session.error\"] = Field(..., alias=\"type\")\n    properties: EventSessionErrorProperties\n\n\nclass EventFileWatcherUpdatedProperties(BaseModel):\n    file: str\n    event: Union[Literal[\"add\"], Literal[\"change\"], Literal[\"unlink\"]]\n\n\nclass EventFileWatcherUpdated(BaseModel):\n    type_: Literal[\"file.watcher.updated\"] = Field(..., alias=\"type\")\n    properties: EventFileWatcherUpdatedProperties\n\n\nclass EventVcsBranchUpdatedProperties(BaseModel):\n    branch: Optional[str] = Field(default=None)\n\n\nclass EventVcsBranchUpdated(BaseModel):\n    type_: Literal[\"vcs.branch.updated\"] = Field(..., alias=\"type\")\n    properties: EventVcsBranchUpdatedProperties\n\n\nclass PtyStatus(Enum, str):\n    RUNNING = \"running\"\n    EXITED = \"exited\"\n\n\nclass Pty(BaseModel):\n    id_: str = Field(..., alias=\"id\", pattern=\"^pty.*\")\n    title: str\n    command: str\n    args: list[str]\n    cwd: str\n    status: PtyStatus\n    pid: float\n\n\nclass EventPtyCreatedProperties(BaseModel):\n    info: Pty\n\n\nclass EventPtyCreated(BaseModel):\n    type_: Literal[\"pty.created\"] = Field(..., alias=\"type\")\n    properties: EventPtyCreatedProperties\n\n\nclass EventPtyUpdatedProperties(BaseModel):\n    info: Pty\n\n\nclass EventPtyUpdated(BaseModel):\n    type_: Literal[\"pty.updated\"] = Field(..., alias=\"type\")\n    properties: EventPtyUpdatedProperties\n\n\nclass EventPtyExitedProperties(BaseModel):\n    id_: str = Field(..., alias=\"id\", pattern=\"^pty.*\")\n    exit_code: float = Field(..., alias=\"exitCode\")\n\n\nclass EventPtyExited(BaseModel):\n    type_: Literal[\"pty.exited\"] = Field(..., alias=\"type\")\n    properties: EventPtyExitedProperties\n\n\nclass EventPtyDeletedProperties(BaseModel):\n    id_: str = Field(..., alias=\"id\", pattern=\"^pty.*\")\n\n\nclass EventPtyDeleted(BaseModel):\n    type_: Literal[\"pty.deleted\"] = Field(..., alias=\"type\")\n    properties: EventPtyDeletedProperties\n\n\nclass EventServerConnected(BaseModel):\n    type_: Literal[\"server.connected\"] = Field(..., alias=\"type\")\n    properties: dict[str, Any]\n\n\nclass EventGlobalDisposed(BaseModel):\n    type_: Literal[\"global.disposed\"] = Field(..., alias=\"type\")\n    properties: dict[str, Any]\n\n\nEvent: TypeAlias = Union[EventInstallationUpdated, EventInstallationUpdateAvailable, EventProjectUpdated, EventServerInstanceDisposed, EventLspClientDiagnostics, EventLspUpdated, EventMessageUpdated, EventMessageRemoved, EventMessagePartUpdated, EventMessagePartRemoved, EventPermissionAsked, EventPermissionReplied, EventSessionStatus, EventSessionIdle, EventSessionCompacted, EventFileEdited, EventTodoUpdated, EventTuiPromptAppend, EventTuiCommandExecute, EventTuiToastShow, EventMcpToolsChanged, EventCommandExecuted, EventSessionCreated, EventSessionUpdated, EventSessionDeleted, EventSessionDiff, EventSessionError, EventFileWatcherUpdated, EventVcsBranchUpdated, EventPtyCreated, EventPtyUpdated, EventPtyExited, EventPtyDeleted, EventServerConnected, EventGlobalDisposed]\n\n\nclass GlobalEvent(BaseModel):\n    directory: str\n    payload: Event\n\n\nclass BadRequestError(BaseModel):\n    data: Any\n    errors: list[dict[str, Any]]\n    success: Literal[False]\n\n\nclass NotFoundErrorData(BaseModel):\n    message: str\n\n\nclass NotFoundError(BaseModel):\n    name: Literal[\"NotFoundError\"]\n    data: NotFoundErrorData\n\n\nclass KeybindsConfig(BaseModel):\n    leader: Optional[str] = Field(default=\"ctrl+x\", description=\"Leader key for keybind combinations\")\n    app_exit: Optional[str] = Field(default=\"ctrl+c,ctrl+d,<leader>q\", description=\"Exit the application\")\n    editor_open: Optional[str] = Field(default=\"<leader>e\", description=\"Open external editor\")\n    theme_list: Optional[str] = Field(default=\"<leader>t\", description=\"List available themes\")\n    sidebar_toggle: Optional[str] = Field(default=\"<leader>b\", description=\"Toggle sidebar\")\n    scrollbar_toggle: Optional[str] = Field(default=\"none\", description=\"Toggle session scrollbar\")\n    username_toggle: Optional[str] = Field(default=\"none\", description=\"Toggle username visibility\")\n    status_view: Optional[str] = Field(default=\"<leader>s\", description=\"View status\")\n    session_export: Optional[str] = Field(default=\"<leader>x\", description=\"Export session to editor\")\n    session_new: Optional[str] = Field(default=\"<leader>n\", description=\"Create a new session\")\n    session_list: Optional[str] = Field(default=\"<leader>l\", description=\"List all sessions\")\n    session_timeline: Optional[str] = Field(default=\"<leader>g\", description=\"Show session timeline\")\n    session_fork: Optional[str] = Field(default=\"none\", description=\"Fork session from message\")\n    session_rename: Optional[str] = Field(default=\"none\", description=\"Rename session\")\n    session_share: Optional[str] = Field(default=\"none\", description=\"Share current session\")\n    session_unshare: Optional[str] = Field(default=\"none\", description=\"Unshare current session\")\n    session_interrupt: Optional[str] = Field(default=\"escape\", description=\"Interrupt current session\")\n    session_compact: Optional[str] = Field(default=\"<leader>c\", description=\"Compact the session\")\n    messages_page_up: Optional[str] = Field(default=\"pageup\", description=\"Scroll messages up by one page\")\n    messages_page_down: Optional[str] = Field(default=\"pagedown\", description=\"Scroll messages down by one page\")\n    messages_half_page_up: Optional[str] = Field(default=\"ctrl+alt+u\", description=\"Scroll messages up by half page\")\n    messages_half_page_down: Optional[str] = Field(default=\"ctrl+alt+d\", description=\"Scroll messages down by half page\")\n    messages_first: Optional[str] = Field(default=\"ctrl+g,home\", description=\"Navigate to first message\")\n    messages_last: Optional[str] = Field(default=\"ctrl+alt+g,end\", description=\"Navigate to last message\")\n    messages_next: Optional[str] = Field(default=\"none\", description=\"Navigate to next message\")\n    messages_previous: Optional[str] = Field(default=\"none\", description=\"Navigate to previous message\")\n    messages_last_user: Optional[str] = Field(default=\"none\", description=\"Navigate to last user message\")\n    messages_copy: Optional[str] = Field(default=\"<leader>y\", description=\"Copy message\")\n    messages_undo: Optional[str] = Field(default=\"<leader>u\", description=\"Undo message\")\n    messages_redo: Optional[str] = Field(default=\"<leader>r\", description=\"Redo message\")\n    messages_toggle_conceal: Optional[str] = Field(default=\"<leader>h\", description=\"Toggle code block concealment in messages\")\n    tool_details: Optional[str] = Field(default=\"none\", description=\"Toggle tool details visibility\")\n    model_list: Optional[str] = Field(default=\"<leader>m\", description=\"List available models\")\n    model_cycle_recent: Optional[str] = Field(default=\"f2\", description=\"Next recently used model\")\n    model_cycle_recent_reverse: Optional[str] = Field(default=\"shift+f2\", description=\"Previous recently used model\")\n    model_cycle_favorite: Optional[str] = Field(default=\"none\", description=\"Next favorite model\")\n    model_cycle_favorite_reverse: Optional[str] = Field(default=\"none\", description=\"Previous favorite model\")\n    command_list: Optional[str] = Field(default=\"ctrl+p\", description=\"List available commands\")\n    agent_list: Optional[str] = Field(default=\"<leader>a\", description=\"List agents\")\n    agent_cycle: Optional[str] = Field(default=\"tab\", description=\"Next agent\")\n    agent_cycle_reverse: Optional[str] = Field(default=\"shift+tab\", description=\"Previous agent\")\n    variant_cycle: Optional[str] = Field(default=\"ctrl+t\", description=\"Cycle model variants\")\n    input_clear: Optional[str] = Field(default=\"ctrl+c\", description=\"Clear input field\")\n    input_paste: Optional[str] = Field(default=\"ctrl+v\", description=\"Paste from clipboard\")\n    input_submit: Optional[str] = Field(default=\"return\", description=\"Submit input\")\n    input_newline: Optional[str] = Field(default=\"shift+return,ctrl+return,alt+return,ctrl+j\", description=\"Insert newline in input\")\n    input_move_left: Optional[str] = Field(default=\"left,ctrl+b\", description=\"Move cursor left in input\")\n    input_move_right: Optional[str] = Field(default=\"right,ctrl+f\", description=\"Move cursor right in input\")\n    input_move_up: Optional[str] = Field(default=\"up\", description=\"Move cursor up in input\")\n    input_move_down: Optional[str] = Field(default=\"down\", description=\"Move cursor down in input\")\n    input_select_left: Optional[str] = Field(default=\"shift+left\", description=\"Select left in input\")\n    input_select_right: Optional[str] = Field(default=\"shift+right\", description=\"Select right in input\")\n    input_select_up: Optional[str] = Field(default=\"shift+up\", description=\"Select up in input\")\n    input_select_down: Optional[str] = Field(default=\"shift+down\", description=\"Select down in input\")\n    input_line_home: Optional[str] = Field(default=\"ctrl+a\", description=\"Move to start of line in input\")\n    input_line_end: Optional[str] = Field(default=\"ctrl+e\", description=\"Move to end of line in input\")\n    input_select_line_home: Optional[str] = Field(default=\"ctrl+shift+a\", description=\"Select to start of line in input\")\n    input_select_line_end: Optional[str] = Field(default=\"ctrl+shift+e\", description=\"Select to end of line in input\")\n    input_visual_line_home: Optional[str] = Field(default=\"alt+a\", description=\"Move to start of visual line in input\")\n    input_visual_line_end: Optional[str] = Field(default=\"alt+e\", description=\"Move to end of visual line in input\")\n    input_select_visual_line_home: Optional[str] = Field(default=\"alt+shift+a\", description=\"Select to start of visual line in input\")\n    input_select_visual_line_end: Optional[str] = Field(default=\"alt+shift+e\", description=\"Select to end of visual line in input\")\n    input_buffer_home: Optional[str] = Field(default=\"home\", description=\"Move to start of buffer in input\")\n    input_buffer_end: Optional[str] = Field(default=\"end\", description=\"Move to end of buffer in input\")\n    input_select_buffer_home: Optional[str] = Field(default=\"shift+home\", description=\"Select to start of buffer in input\")\n    input_select_buffer_end: Optional[str] = Field(default=\"shift+end\", description=\"Select to end of buffer in input\")\n    input_delete_line: Optional[str] = Field(default=\"ctrl+shift+d\", description=\"Delete line in input\")\n    input_delete_to_line_end: Optional[str] = Field(default=\"ctrl+k\", description=\"Delete to end of line in input\")\n    input_delete_to_line_start: Optional[str] = Field(default=\"ctrl+u\", description=\"Delete to start of line in input\")\n    input_backspace: Optional[str] = Field(default=\"backspace,shift+backspace\", description=\"Backspace in input\")\n    input_delete: Optional[str] = Field(default=\"ctrl+d,delete,shift+delete\", description=\"Delete character in input\")\n    input_undo: Optional[str] = Field(default=\"ctrl+-,super+z\", description=\"Undo in input\")\n    input_redo: Optional[str] = Field(default=\"ctrl+.,super+shift+z\", description=\"Redo in input\")\n    input_word_forward: Optional[str] = Field(default=\"alt+f,alt+right,ctrl+right\", description=\"Move word forward in input\")\n    input_word_backward: Optional[str] = Field(default=\"alt+b,alt+left,ctrl+left\", description=\"Move word backward in input\")\n    input_select_word_forward: Optional[str] = Field(default=\"alt+shift+f,alt+shift+right\", description=\"Select word forward in input\")\n    input_select_word_backward: Optional[str] = Field(default=\"alt+shift+b,alt+shift+left\", description=\"Select word backward in input\")\n    input_delete_word_forward: Optional[str] = Field(default=\"alt+d,alt+delete,ctrl+delete\", description=\"Delete word forward in input\")\n    input_delete_word_backward: Optional[str] = Field(default=\"ctrl+w,ctrl+backspace,alt+backspace\", description=\"Delete word backward in input\")\n    history_previous: Optional[str] = Field(default=\"up\", description=\"Previous history item\")\n    history_next: Optional[str] = Field(default=\"down\", description=\"Next history item\")\n    session_child_cycle: Optional[str] = Field(default=\"<leader>right\", description=\"Next child session\")\n    session_child_cycle_reverse: Optional[str] = Field(default=\"<leader>left\", description=\"Previous child session\")\n    session_parent: Optional[str] = Field(default=\"<leader>up\", description=\"Go to parent session\")\n    terminal_suspend: Optional[str] = Field(default=\"ctrl+z\", description=\"Suspend terminal\")\n    terminal_title_toggle: Optional[str] = Field(default=\"none\", description=\"Toggle terminal title\")\n    tips_toggle: Optional[str] = Field(default=\"<leader>h\", description=\"Toggle tips on home screen\")\n\n\nclass LogLevel(Enum, str):\n    DEBUG = \"DEBUG\"\n    INFO = \"INFO\"\n    WARN = \"WARN\"\n    ERROR = \"ERROR\"\n\n\nclass ServerConfig(BaseModel):\n    port: Optional[int] = Field(default=None, description=\"Port to listen on\", gt=0, le=9007199254740991)\n    hostname: Optional[str] = Field(default=None, description=\"Hostname to listen on\")\n    mdns: Optional[bool] = Field(default=None)\n    cors: Optional[list[str]] = Field(default=None, description=\"Additional domains to allow for CORS\")\n\n\nclass PermissionActionConfig(Enum, str):\n    ASK = \"ask\"\n    ALLOW = \"allow\"\n    DENY = \"deny\"\n\n\nPermissionObjectConfig: TypeAlias = dict[str, Any]\n\n\nPermissionRuleConfig: TypeAlias = Union[PermissionActionConfig, PermissionObjectConfig]\n\n\nclass PermissionConfig(BaseModel):\n    read: Optional[PermissionRuleConfig] = Field(default=None)\n    edit: Optional[PermissionRuleConfig] = Field(default=None)\n    glob: Optional[PermissionRuleConfig] = Field(default=None)\n    grep: Optional[PermissionRuleConfig] = Field(default=None)\n    list_: Optional[PermissionRuleConfig] = Field(default=None, alias=\"list\")\n    bash: Optional[PermissionRuleConfig] = Field(default=None)\n    task: Optional[PermissionRuleConfig] = Field(default=None)\n    external_directory: Optional[PermissionRuleConfig] = Field(default=None)\n    todowrite: Optional[PermissionActionConfig] = Field(default=None)\n    todoread: Optional[PermissionActionConfig] = Field(default=None)\n    webfetch: Optional[PermissionActionConfig] = Field(default=None)\n    websearch: Optional[PermissionActionConfig] = Field(default=None)\n    codesearch: Optional[PermissionActionConfig] = Field(default=None)\n    lsp: Optional[PermissionRuleConfig] = Field(default=None)\n    doom_loop: Optional[PermissionActionConfig] = Field(default=None)\n\n\nPermissionConfig_2: TypeAlias = Union[PermissionConfig, PermissionActionConfig]\n\n\nAgentConfig: TypeAlias = dict[str, Any]\n\n\nclass ProviderConfigModelsValueInterleavedField(Enum, str):\n    REASONING_CONTENT = \"reasoning_content\"\n    REASONING_DETAILS = \"reasoning_details\"\n\n\nclass ProviderConfigModelsValueInterleaved(BaseModel):\n    field: ProviderConfigModelsValueInterleavedField\n\n\nclass ProviderConfigModelsValueCostContextOver200k(BaseModel):\n    input_: float = Field(..., alias=\"input\")\n    output: float\n    cache_read: Optional[float] = Field(default=None)\n    cache_write: Optional[float] = Field(default=None)\n\n\nclass ProviderConfigModelsValueCost(BaseModel):\n    input_: float = Field(..., alias=\"input\")\n    output: float\n    cache_read: Optional[float] = Field(default=None)\n    cache_write: Optional[float] = Field(default=None)\n    context_over_200k: Optional[ProviderConfigModelsValueCostContextOver200k] = Field(default=None)\n\n\nclass ProviderConfigModelsValueLimit(BaseModel):\n    context: float\n    output: float\n\n\nclass ProviderConfigModelsValueModalitiesInput(Enum, str):\n    TEXT = \"text\"\n    AUDIO = \"audio\"\n    IMAGE = \"image\"\n    VIDEO = \"video\"\n    PDF = \"pdf\"\n\n\nclass ProviderConfigModelsValueModalitiesOutput(Enum, str):\n    TEXT = \"text\"\n    AUDIO = \"audio\"\n    IMAGE = \"image\"\n    VIDEO = \"video\"\n    PDF = \"pdf\"\n\n\nclass ProviderConfigModelsValueModalities(BaseModel):\n    input_: list[ProviderConfigModelsValueModalitiesInput] = Field(..., alias=\"input\")\n    output: list[ProviderConfigModelsValueModalitiesOutput]\n\n\nclass ProviderConfigModelsValueStatus(Enum, str):\n    ALPHA = \"alpha\"\n    BETA = \"beta\"\n    DEPRECATED = \"deprecated\"\n\n\nclass ProviderConfigModelsValueProvider(BaseModel):\n    npm: str\n\n\nProviderConfigModelsValueVariantsValue: TypeAlias = dict[str, Any]\n\n\nclass ProviderConfigModelsValue(BaseModel):\n    id_: Optional[str] = Field(default=None, alias=\"id\")\n    name: Optional[str] = Field(default=None)\n    family: Optional[str] = Field(default=None)\n    release_date: Optional[str] = Field(default=None)\n    attachment: Optional[bool] = Field(default=None)\n    reasoning: Optional[bool] = Field(default=None)\n    temperature: Optional[bool] = Field(default=None)\n    tool_call: Optional[bool] = Field(default=None)\n    interleaved: Optional[Union[Literal[True], ProviderConfigModelsValueInterleaved]] = Field(default=None)\n    cost: Optional[ProviderConfigModelsValueCost] = Field(default=None)\n    limit: Optional[ProviderConfigModelsValueLimit] = Field(default=None)\n    modalities: Optional[ProviderConfigModelsValueModalities] = Field(default=None)\n    experimental: Optional[bool] = Field(default=None)\n    status: Optional[ProviderConfigModelsValueStatus] = Field(default=None)\n    options: Optional[dict[str, Any]] = Field(default=None)\n    headers: Optional[dict[str, Any]] = Field(default=None)\n    provider: Optional[ProviderConfigModelsValueProvider] = Field(default=None)\n    variants: Optional[dict[str, Any]] = Field(default=None)\n\n\nProviderConfigOptions: TypeAlias = dict[str, Any]\n\n\nclass ProviderConfig(BaseModel):\n    api: Optional[str] = Field(default=None)\n    name: Optional[str] = Field(default=None)\n    env: Optional[list[str]] = Field(default=None)\n    id_: Optional[str] = Field(default=None, alias=\"id\")\n    npm: Optional[str] = Field(default=None)\n    models: Optional[dict[str, Any]] = Field(default=None)\n    whitelist: Optional[list[str]] = Field(default=None)\n    blacklist: Optional[list[str]] = Field(default=None)\n    options: Optional[ProviderConfigOptions] = Field(default=None)\n\n\nclass McpLocalConfig(BaseModel):\n    type_: Literal[\"local\"] = Field(..., alias=\"type\")\n    command: list[str] = Field(..., description=\"Command and arguments to run the MCP server\")\n    environment: Optional[dict[str, Any]] = Field(default=None)\n    enabled: Optional[bool] = Field(default=None)\n    timeout: Optional[int] = Field(default=None, description=\"Timeout in ms for fetching tools from the MCP server. Defaults to 5000 (5 seconds) if not specified.\", gt=0, le=9007199254740991)\n\n\nclass McpOAuthConfig(BaseModel):\n    client_id: Optional[str] = Field(default=None, alias=\"clientId\", description=\"OAuth client ID. If not provided, dynamic client registration (RFC 7591) will be attempted.\")\n    client_secret: Optional[str] = Field(default=None, alias=\"clientSecret\", description=\"OAuth client secret (if required by the authorization server)\")\n    scope: Optional[str] = Field(default=None, description=\"OAuth scopes to request during authorization\")\n\n\nclass McpRemoteConfig(BaseModel):\n    type_: Literal[\"remote\"] = Field(..., alias=\"type\")\n    url: str = Field(..., description=\"URL of the remote MCP server\")\n    enabled: Optional[bool] = Field(default=None)\n    headers: Optional[dict[str, Any]] = Field(default=None)\n    oauth: Optional[Union[McpOAuthConfig, Literal[False]]] = Field(default=None, description=\"OAuth authentication configuration for the MCP server. Set to false to disable OAuth auto-detection.\")\n    timeout: Optional[int] = Field(default=None, description=\"Timeout in ms for fetching tools from the MCP server. Defaults to 5000 (5 seconds) if not specified.\", gt=0, le=9007199254740991)\n\n\nclass LayoutConfig(Enum, str):\n    AUTO = \"auto\"\n    STRETCH = \"stretch\"\n\n\nclass ConfigTuiScrollAcceleration(BaseModel):\n    enabled: bool\n\n\nclass ConfigTuiDiffStyle(Enum, str):\n    AUTO = \"auto\"\n    STACKED = \"stacked\"\n\n\nclass ConfigTui(BaseModel):\n    scroll_speed: Optional[float] = Field(default=None, description=\"TUI scroll speed\", ge=0.001)\n    scroll_acceleration: Optional[ConfigTuiScrollAcceleration] = Field(default=None)\n    diff_style: Optional[ConfigTuiDiffStyle] = Field(default=None)\n\n\nclass ConfigCommandValue(BaseModel):\n    template: str\n    description: Optional[str] = Field(default=None)\n    agent: Optional[str] = Field(default=None)\n    model: Optional[str] = Field(default=None)\n    subtask: Optional[bool] = Field(default=None)\n\n\nclass ConfigWatcher(BaseModel):\n    ignore: Optional[list[str]] = Field(default=None)\n\n\nclass ConfigShare(Enum, str):\n    MANUAL = \"manual\"\n    AUTO = \"auto\"\n    DISABLED = \"disabled\"\n\n\nclass ConfigMode(BaseModel):\n    build: Optional[AgentConfig] = Field(default=None)\n    plan: Optional[AgentConfig] = Field(default=None)\n\n\nclass ConfigAgent(BaseModel):\n    plan: Optional[AgentConfig] = Field(default=None)\n    build: Optional[AgentConfig] = Field(default=None)\n    general: Optional[AgentConfig] = Field(default=None)\n    explore: Optional[AgentConfig] = Field(default=None)\n    title: Optional[AgentConfig] = Field(default=None)\n    summary: Optional[AgentConfig] = Field(default=None)\n    compaction: Optional[AgentConfig] = Field(default=None)\n\n\nclass ConfigFormatterValue(BaseModel):\n    disabled: Optional[bool] = Field(default=None)\n    command: Optional[list[str]] = Field(default=None)\n    environment: Optional[dict[str, Any]] = Field(default=None)\n    extensions: Optional[list[str]] = Field(default=None)\n\n\nclass ConfigEnterprise(BaseModel):\n    url: Optional[str] = Field(default=None, description=\"Enterprise URL\")\n\n\nclass ConfigCompaction(BaseModel):\n    auto: Optional[bool] = Field(default=None)\n    prune: Optional[bool] = Field(default=None)\n\n\nclass ConfigExperimentalHookFileEditedValue(BaseModel):\n    command: list[str]\n    environment: Optional[dict[str, Any]] = Field(default=None)\n\n\nclass ConfigExperimentalHookSessionCompleted(BaseModel):\n    command: list[str]\n    environment: Optional[dict[str, Any]] = Field(default=None)\n\n\nclass ConfigExperimentalHook(BaseModel):\n    file_edited: Optional[dict[str, Any]] = Field(default=None)\n    session_completed: Optional[list[ConfigExperimentalHookSessionCompleted]] = Field(default=None)\n\n\nclass ConfigExperimental(BaseModel):\n    hook: Optional[ConfigExperimentalHook] = Field(default=None)\n    chat_max_retries: Optional[float] = Field(default=None, alias=\"chatMaxRetries\", description=\"Number of retries for chat completions on failure\")\n    disable_paste_summary: Optional[bool] = Field(default=None)\n    batch_tool: Optional[bool] = Field(default=None)\n    open_telemetry: Optional[bool] = Field(default=None, alias=\"openTelemetry\")\n    primary_tools: Optional[list[str]] = Field(default=None, description=\"Tools that should only be available to primary agents.\")\n    continue_loop_on_deny: Optional[bool] = Field(default=None)\n    mcp_timeout: Optional[int] = Field(default=None, description=\"Timeout in milliseconds for model context protocol (MCP) requests\", gt=0, le=9007199254740991)\n\n\nclass Config(BaseModel):\n    schema: Optional[str] = Field(default=None, alias=\"$schema\", description=\"JSON schema reference for configuration validation\")\n    theme: Optional[str] = Field(default=None, description=\"Theme name to use for the interface\")\n    keybinds: Optional[KeybindsConfig] = Field(default=None)\n    log_level: Optional[LogLevel] = Field(default=None, alias=\"logLevel\")\n    tui: Optional[ConfigTui] = Field(default=None)\n    server: Optional[ServerConfig] = Field(default=None)\n    command: Optional[dict[str, Any]] = Field(default=None)\n    watcher: Optional[ConfigWatcher] = Field(default=None)\n    plugin: Optional[list[str]] = Field(default=None)\n    snapshot: Optional[bool] = Field(default=None)\n    share: Optional[ConfigShare] = Field(default=None)\n    autoshare: Optional[bool] = Field(default=None)\n    autoupdate: Optional[Union[bool, Literal[\"notify\"]]] = Field(default=None, description=\"Automatically update to the latest version. Set to true to auto-update, false to disable, or 'notify' to show update notifications\")\n    disabled_providers: Optional[list[str]] = Field(default=None, description=\"Disable providers that are loaded automatically\")\n    enabled_providers: Optional[list[str]] = Field(default=None, description=\"When set, ONLY these providers will be enabled. All other providers will be ignored\")\n    model: Optional[str] = Field(default=None, description=\"Model to use in the format of provider/model, eg anthropic/claude-2\")\n    small_model: Optional[str] = Field(default=None, description=\"Small model to use for tasks like title generation in the format of provider/model\")\n    default_agent: Optional[str] = Field(default=None, description=\"Default agent to use when none is specified. Must be a primary agent. Falls back to 'build' if not set or if the specified agent is invalid.\")\n    username: Optional[str] = Field(default=None, description=\"Custom username to display in conversations instead of system username\")\n    mode: Optional[ConfigMode] = Field(default=None)\n    agent: Optional[ConfigAgent] = Field(default=None)\n    provider: Optional[dict[str, Any]] = Field(default=None)\n    mcp: Optional[dict[str, Any]] = Field(default=None)\n    formatter: Optional[Union[Literal[False], dict[str, Any]]] = Field(default=None)\n    lsp: Optional[Union[Literal[False], dict[str, Any]]] = Field(default=None)\n    instructions: Optional[list[str]] = Field(default=None, description=\"Additional instruction files or patterns to include\")\n    layout: Optional[LayoutConfig] = Field(default=None)\n    permission: Optional[PermissionConfig_2] = Field(default=None)\n    tools: Optional[dict[str, Any]] = Field(default=None)\n    enterprise: Optional[ConfigEnterprise] = Field(default=None)\n    compaction: Optional[ConfigCompaction] = Field(default=None)\n    experimental: Optional[ConfigExperimental] = Field(default=None)\n\n\nToolIds: TypeAlias = list[str]\n\n\nclass ToolListItem(BaseModel):\n    id_: str = Field(..., alias=\"id\")\n    description: str\n    parameters: Any\n\n\nToolList: TypeAlias = list[ToolListItem]\n\n\nclass Path(BaseModel):\n    home: str\n    state: str\n    config: str\n    worktree: str\n    directory: str\n\n\nclass VcsInfo(BaseModel):\n    branch: str\n\n\nclass TextPartInputTime(BaseModel):\n    start: float\n    end: Optional[float] = Field(default=None)\n\n\nclass TextPartInput(BaseModel):\n    id_: Optional[str] = Field(default=None, alias=\"id\")\n    type_: Literal[\"text\"] = Field(..., alias=\"type\")\n    text: str\n    synthetic: Optional[bool] = Field(default=None)\n    ignored: Optional[bool] = Field(default=None)\n    time: Optional[TextPartInputTime] = Field(default=None)\n    metadata: Optional[dict[str, Any]] = Field(default=None)\n\n\nclass FilePartInput(BaseModel):\n    id_: Optional[str] = Field(default=None, alias=\"id\")\n    type_: Literal[\"file\"] = Field(..., alias=\"type\")\n    mime: str\n    filename: Optional[str] = Field(default=None)\n    url: str\n    source: Optional[FilePartSource] = Field(default=None)\n\n\nclass AgentPartInputSource(BaseModel):\n    value: str\n    start: int = Field(..., ge=-9007199254740991, le=9007199254740991)\n    end: int = Field(..., ge=-9007199254740991, le=9007199254740991)\n\n\nclass AgentPartInput(BaseModel):\n    id_: Optional[str] = Field(default=None, alias=\"id\")\n    type_: Literal[\"agent\"] = Field(..., alias=\"type\")\n    name: str\n    source: Optional[AgentPartInputSource] = Field(default=None)\n\n\nclass SubtaskPartInput(BaseModel):\n    id_: Optional[str] = Field(default=None, alias=\"id\")\n    type_: Literal[\"subtask\"] = Field(..., alias=\"type\")\n    prompt: str\n    description: str\n    agent: str\n    command: Optional[str] = Field(default=None)\n\n\nclass Command(BaseModel):\n    name: str\n    description: Optional[str] = Field(default=None)\n    agent: Optional[str] = Field(default=None)\n    model: Optional[str] = Field(default=None)\n    mcp: Optional[bool] = Field(default=None)\n    template: str\n    subtask: Optional[bool] = Field(default=None)\n    hints: list[str]\n\n\nclass ModelApi(BaseModel):\n    id_: str = Field(..., alias=\"id\")\n    url: str\n    npm: str\n\n\nclass ModelCapabilitiesInput(BaseModel):\n    text: bool\n    audio: bool\n    image: bool\n    video: bool\n    pdf: bool\n\n\nclass ModelCapabilitiesOutput(BaseModel):\n    text: bool\n    audio: bool\n    image: bool\n    video: bool\n    pdf: bool\n\n\nclass ModelCapabilitiesInterleavedField(Enum, str):\n    REASONING_CONTENT = \"reasoning_content\"\n    REASONING_DETAILS = \"reasoning_details\"\n\n\nclass ModelCapabilitiesInterleaved(BaseModel):\n    field: ModelCapabilitiesInterleavedField\n\n\nclass ModelCapabilities(BaseModel):\n    temperature: bool\n    reasoning: bool\n    attachment: bool\n    toolcall: bool\n    input_: ModelCapabilitiesInput = Field(..., alias=\"input\")\n    output: ModelCapabilitiesOutput\n    interleaved: Union[bool, ModelCapabilitiesInterleaved]\n\n\nclass ModelCostCache(BaseModel):\n    read: float\n    write: float\n\n\nclass ModelCostExperimentalOver200kCache(BaseModel):\n    read: float\n    write: float\n\n\nclass ModelCostExperimentalOver200k(BaseModel):\n    input_: float = Field(..., alias=\"input\")\n    output: float\n    cache: ModelCostExperimentalOver200kCache\n\n\nclass ModelCost(BaseModel):\n    input_: float = Field(..., alias=\"input\")\n    output: float\n    cache: ModelCostCache\n    experimental_over200k: Optional[ModelCostExperimentalOver200k] = Field(default=None, alias=\"experimentalOver200K\")\n\n\nclass ModelLimit(BaseModel):\n    context: float\n    output: float\n\n\nclass ModelStatus(Enum, str):\n    ALPHA = \"alpha\"\n    BETA = \"beta\"\n    DEPRECATED = \"deprecated\"\n    ACTIVE = \"active\"\n\n\nclass Model(BaseModel):\n    id_: str = Field(..., alias=\"id\")\n    provider_id: str = Field(..., alias=\"providerID\")\n    api: ModelApi\n    name: str\n    family: Optional[str] = Field(default=None)\n    capabilities: ModelCapabilities\n    cost: ModelCost\n    limit: ModelLimit\n    status: ModelStatus\n    options: dict[str, Any]\n    headers: dict[str, Any]\n    release_date: str\n    variants: Optional[dict[str, Any]] = Field(default=None)\n\n\nclass ProviderSource(Enum, str):\n    ENV = \"env\"\n    CONFIG = \"config\"\n    CUSTOM = \"custom\"\n    API = \"api\"\n\n\nclass Provider(BaseModel):\n    id_: str = Field(..., alias=\"id\")\n    name: str\n    source: ProviderSource\n    env: list[str]\n    key: Optional[str] = Field(default=None)\n    options: dict[str, Any]\n    models: dict[str, Any]\n\n\nclass ProviderAuthMethod(BaseModel):\n    type_: Union[Literal[\"oauth\"], Literal[\"api\"]] = Field(..., alias=\"type\")\n    label: str\n\n\nclass ProviderAuthAuthorization(BaseModel):\n    url: str\n    method: Union[Literal[\"auto\"], Literal[\"code\"]]\n    instructions: str\n\n\nclass SymbolLocation(BaseModel):\n    uri: str\n    range_: Range = Field(..., alias=\"range\")\n\n\nclass Symbol(BaseModel):\n    name: str\n    kind: float\n    location: SymbolLocation\n\n\nclass FileNodeType(Enum, str):\n    FILE = \"file\"\n    DIRECTORY = \"directory\"\n\n\nclass FileNode(BaseModel):\n    name: str\n    path: str\n    absolute: str\n    type_: FileNodeType = Field(..., alias=\"type\")\n    ignored: bool\n\n\nclass FileContentPatchHunks(BaseModel):\n    old_start: float = Field(..., alias=\"oldStart\")\n    old_lines: float = Field(..., alias=\"oldLines\")\n    new_start: float = Field(..., alias=\"newStart\")\n    new_lines: float = Field(..., alias=\"newLines\")\n    lines: list[str]\n\n\nclass FileContentPatch(BaseModel):\n    old_file_name: str = Field(..., alias=\"oldFileName\")\n    new_file_name: str = Field(..., alias=\"newFileName\")\n    old_header: Optional[str] = Field(default=None, alias=\"oldHeader\")\n    new_header: Optional[str] = Field(default=None, alias=\"newHeader\")\n    hunks: list[FileContentPatchHunks]\n    index: Optional[str] = Field(default=None)\n\n\nclass FileContent(BaseModel):\n    type_: Literal[\"text\"] = Field(..., alias=\"type\")\n    content: str\n    diff: Optional[str] = Field(default=None)\n    patch: Optional[FileContentPatch] = Field(default=None)\n    encoding: Optional[Literal[\"base64\"]] = Field(default=None)\n    mime_type: Optional[str] = Field(default=None, alias=\"mimeType\")\n\n\nclass FileStatus(Enum, str):\n    ADDED = \"added\"\n    DELETED = \"deleted\"\n    MODIFIED = \"modified\"\n\n\nclass File(BaseModel):\n    path: str\n    added: int = Field(..., ge=-9007199254740991, le=9007199254740991)\n    removed: int = Field(..., ge=-9007199254740991, le=9007199254740991)\n    status: FileStatus\n\n\nclass AgentMode(Enum, str):\n    SUBAGENT = \"subagent\"\n    PRIMARY = \"primary\"\n    ALL = \"all\"\n\n\nclass AgentModel(BaseModel):\n    model_id: str = Field(..., alias=\"modelID\")\n    provider_id: str = Field(..., alias=\"providerID\")\n\n\nclass Agent(BaseModel):\n    name: str\n    description: Optional[str] = Field(default=None)\n    mode: AgentMode\n    native: Optional[bool] = Field(default=None)\n    hidden: Optional[bool] = Field(default=None)\n    top_p: Optional[float] = Field(default=None, alias=\"topP\")\n    temperature: Optional[float] = Field(default=None)\n    color: Optional[str] = Field(default=None)\n    permission: PermissionRuleset\n    model: Optional[AgentModel] = Field(default=None)\n    prompt: Optional[str] = Field(default=None)\n    options: dict[str, Any]\n    steps: Optional[int] = Field(default=None, gt=0, le=9007199254740991)\n\n\nclass McpStatusConnected(BaseModel):\n    status: Literal[\"connected\"]\n\n\nclass McpStatusDisabled(BaseModel):\n    status: Literal[\"disabled\"]\n\n\nclass McpStatusFailed(BaseModel):\n    status: Literal[\"failed\"]\n    error: str\n\n\nclass McpStatusNeedsAuth(BaseModel):\n    status: Literal[\"needs_auth\"]\n\n\nclass McpStatusNeedsClientRegistration(BaseModel):\n    status: Literal[\"needs_client_registration\"]\n    error: str\n\n\nMcpStatus: TypeAlias = Union[McpStatusConnected, McpStatusDisabled, McpStatusFailed, McpStatusNeedsAuth, McpStatusNeedsClientRegistration]\n\n\nclass LspStatus(BaseModel):\n    id_: str = Field(..., alias=\"id\")\n    name: str\n    root: str\n    status: Union[Literal[\"connected\"], Literal[\"error\"]]\n\n\nclass FormatterStatus(BaseModel):\n    name: str\n    extensions: list[str]\n    enabled: bool\n\n\nclass OAuth(BaseModel):\n    type_: Literal[\"oauth\"] = Field(..., alias=\"type\")\n    refresh: str\n    access: str\n    expires: float\n    enterprise_url: Optional[str] = Field(default=None, alias=\"enterpriseUrl\")\n\n\nclass ApiAuth(BaseModel):\n    type_: Literal[\"api\"] = Field(..., alias=\"type\")\n    key: str\n\n\nclass WellKnownAuth(BaseModel):\n    type_: Literal[\"wellknown\"] = Field(..., alias=\"type\")\n    key: str\n    token: str\n\n\nAuth: TypeAlias = Union[OAuth, ApiAuth, WellKnownAuth]\n"
  },
  {
    "path": "packages/openapi-python-tests/sdks/__snapshots__/opencode/default/sdk_gen.py",
    "content": "# This file is auto-generated by @hey-api/openapi-python\n\nfrom functools import cached_property\n\nfrom .client import Client\n\n\nclass Global(Client):\n    def health(self):\n        \"\"\"\n        Get health\n\n        Get health information about the OpenCode server.\n        \"\"\"\n\n        return self.client.get(\"/global/health\")\n\n    def event(self):\n        \"\"\"\n        Get global events\n\n        Subscribe to global events from the OpenCode system using server-sent events.\n        \"\"\"\n\n        return self.client.get(\"/global/event\")\n\n    def dispose(self):\n        \"\"\"\n        Dispose instance\n\n        Clean up and dispose all OpenCode instances, releasing all resources.\n        \"\"\"\n\n        return self.client.post(\"/global/dispose\")\n\n\nclass Project(Client):\n    def list(self):\n        \"\"\"\n        List all projects\n\n        Get a list of projects that have been opened with OpenCode.\n        \"\"\"\n\n        return self.client.get(\"/project\")\n\n    def current(self):\n        \"\"\"\n        Get current project\n\n        Retrieve the currently active project that OpenCode is working with.\n        \"\"\"\n\n        return self.client.get(\"/project/current\")\n\n    def update(self):\n        \"\"\"\n        Update project\n\n        Update project properties such as name, icon and color.\n        \"\"\"\n\n        return self.client.patch(\"/project/{projectID}\")\n\n\nclass Pty(Client):\n    def list(self):\n        \"\"\"\n        List PTY sessions\n\n        Get a list of all active pseudo-terminal (PTY) sessions managed by OpenCode.\n        \"\"\"\n\n        return self.client.get(\"/pty\")\n\n    def create(self):\n        \"\"\"\n        Create PTY session\n\n        Create a new pseudo-terminal (PTY) session for running shell commands and processes.\n        \"\"\"\n\n        return self.client.post(\"/pty\")\n\n    def remove(self):\n        \"\"\"\n        Remove PTY session\n\n        Remove and terminate a specific pseudo-terminal (PTY) session.\n        \"\"\"\n\n        return self.client.delete(\"/pty/{ptyID}\")\n\n    def get(self):\n        \"\"\"\n        Get PTY session\n\n        Retrieve detailed information about a specific pseudo-terminal (PTY) session.\n        \"\"\"\n\n        return self.client.get(\"/pty/{ptyID}\")\n\n    def update(self):\n        \"\"\"\n        Update PTY session\n\n        Update properties of an existing pseudo-terminal (PTY) session.\n        \"\"\"\n\n        return self.client.put(\"/pty/{ptyID}\")\n\n    def connect(self):\n        \"\"\"\n        Connect to PTY session\n\n        Establish a WebSocket connection to interact with a pseudo-terminal (PTY) session in real-time.\n        \"\"\"\n\n        return self.client.get(\"/pty/{ptyID}/connect\")\n\n\nclass Config(Client):\n    def get(self):\n        \"\"\"\n        Get configuration\n\n        Retrieve the current OpenCode configuration settings and preferences.\n        \"\"\"\n\n        return self.client.get(\"/config\")\n\n    def update(self):\n        \"\"\"\n        Update configuration\n\n        Update OpenCode configuration settings and preferences.\n        \"\"\"\n\n        return self.client.patch(\"/config\")\n\n    def providers(self):\n        \"\"\"\n        List config providers\n\n        Get a list of all configured AI providers and their default models.\n        \"\"\"\n\n        return self.client.get(\"/config/providers\")\n\n\nclass Tool(Client):\n    def ids(self):\n        \"\"\"\n        List tool IDs\n\n        Get a list of all available tool IDs, including both built-in tools and dynamically registered tools.\n        \"\"\"\n\n        return self.client.get(\"/experimental/tool/ids\")\n\n    def list(self):\n        \"\"\"\n        List tools\n\n        Get a list of available tools with their JSON schema parameters for a specific provider and model combination.\n        \"\"\"\n\n        return self.client.get(\"/experimental/tool\")\n\n\nclass Instance(Client):\n    def dispose(self):\n        \"\"\"\n        Dispose instance\n\n        Clean up and dispose the current OpenCode instance, releasing all resources.\n        \"\"\"\n\n        return self.client.post(\"/instance/dispose\")\n\n\nclass Path(Client):\n    def get(self):\n        \"\"\"\n        Get paths\n\n        Retrieve the current working directory and related path information for the OpenCode instance.\n        \"\"\"\n\n        return self.client.get(\"/path\")\n\n\nclass Vcs(Client):\n    def get(self):\n        \"\"\"\n        Get VCS info\n\n        Retrieve version control system (VCS) information for the current project, such as git branch.\n        \"\"\"\n\n        return self.client.get(\"/vcs\")\n\n\nclass Session(Client):\n    def list(self):\n        \"\"\"\n        List sessions\n\n        Get a list of all OpenCode sessions, sorted by most recently updated.\n        \"\"\"\n\n        return self.client.get(\"/session\")\n\n    def create(self):\n        \"\"\"\n        Create session\n\n        Create a new OpenCode session for interacting with AI assistants and managing conversations.\n        \"\"\"\n\n        return self.client.post(\"/session\")\n\n    def status(self):\n        \"\"\"\n        Get session status\n\n        Retrieve the current status of all sessions, including active, idle, and completed states.\n        \"\"\"\n\n        return self.client.get(\"/session/status\")\n\n    def delete(self):\n        \"\"\"\n        Delete session\n\n        Delete a session and permanently remove all associated data, including messages and history.\n        \"\"\"\n\n        return self.client.delete(\"/session/{sessionID}\")\n\n    def get(self):\n        \"\"\"\n        Get session\n\n        Retrieve detailed information about a specific OpenCode session.\n        \"\"\"\n\n        return self.client.get(\"/session/{sessionID}\")\n\n    def update(self):\n        \"\"\"\n        Update session\n\n        Update properties of an existing session, such as title or other metadata.\n        \"\"\"\n\n        return self.client.patch(\"/session/{sessionID}\")\n\n    def children(self):\n        \"\"\"\n        Get session children\n\n        Retrieve all child sessions that were forked from the specified parent session.\n        \"\"\"\n\n        return self.client.get(\"/session/{sessionID}/children\")\n\n    def todo(self):\n        \"\"\"\n        Get session todos\n\n        Retrieve the todo list associated with a specific session, showing tasks and action items.\n        \"\"\"\n\n        return self.client.get(\"/session/{sessionID}/todo\")\n\n    def init(self):\n        \"\"\"\n        Initialize session\n\n        Analyze the current application and create an AGENTS.md file with project-specific agent configurations.\n        \"\"\"\n\n        return self.client.post(\"/session/{sessionID}/init\")\n\n    def fork(self):\n        \"\"\"\n        Fork session\n\n        Create a new session by forking an existing session at a specific message point.\n        \"\"\"\n\n        return self.client.post(\"/session/{sessionID}/fork\")\n\n    def abort(self):\n        \"\"\"\n        Abort session\n\n        Abort an active session and stop any ongoing AI processing or command execution.\n        \"\"\"\n\n        return self.client.post(\"/session/{sessionID}/abort\")\n\n    def unshare(self):\n        \"\"\"\n        Unshare session\n\n        Remove the shareable link for a session, making it private again.\n        \"\"\"\n\n        return self.client.delete(\"/session/{sessionID}/share\")\n\n    def share(self):\n        \"\"\"\n        Share session\n\n        Create a shareable link for a session, allowing others to view the conversation.\n        \"\"\"\n\n        return self.client.post(\"/session/{sessionID}/share\")\n\n    def diff(self):\n        \"\"\"\n        Get session diff\n\n        Get all file changes (diffs) made during this session.\n        \"\"\"\n\n        return self.client.get(\"/session/{sessionID}/diff\")\n\n    def summarize(self):\n        \"\"\"\n        Summarize session\n\n        Generate a concise summary of the session using AI compaction to preserve key information.\n        \"\"\"\n\n        return self.client.post(\"/session/{sessionID}/summarize\")\n\n    def messages(self):\n        \"\"\"\n        Get session messages\n\n        Retrieve all messages in a session, including user prompts and AI responses.\n        \"\"\"\n\n        return self.client.get(\"/session/{sessionID}/message\")\n\n    def prompt(self):\n        \"\"\"\n        Send message\n\n        Create and send a new message to a session, streaming the AI response.\n        \"\"\"\n\n        return self.client.post(\"/session/{sessionID}/message\")\n\n    def message(self):\n        \"\"\"\n        Get message\n\n        Retrieve a specific message from a session by its message ID.\n        \"\"\"\n\n        return self.client.get(\"/session/{sessionID}/message/{messageID}\")\n\n    def prompt_async(self):\n        \"\"\"\n        Send async message\n\n        Create and send a new message to a session asynchronously, starting the session if needed and returning immediately.\n        \"\"\"\n\n        return self.client.post(\"/session/{sessionID}/prompt_async\")\n\n    def command(self):\n        \"\"\"\n        Send command\n\n        Send a new command to a session for execution by the AI assistant.\n        \"\"\"\n\n        return self.client.post(\"/session/{sessionID}/command\")\n\n    def shell(self):\n        \"\"\"\n        Run shell command\n\n        Execute a shell command within the session context and return the AI's response.\n        \"\"\"\n\n        return self.client.post(\"/session/{sessionID}/shell\")\n\n    def revert(self):\n        \"\"\"\n        Revert message\n\n        Revert a specific message in a session, undoing its effects and restoring the previous state.\n        \"\"\"\n\n        return self.client.post(\"/session/{sessionID}/revert\")\n\n    def unrevert(self):\n        \"\"\"\n        Restore reverted messages\n\n        Restore all previously reverted messages in a session.\n        \"\"\"\n\n        return self.client.post(\"/session/{sessionID}/unrevert\")\n\n\nclass Part(Client):\n    def delete(self):\n        \"\"\"Delete a part from a message\"\"\"\n\n        return self.client.delete(\"/session/{sessionID}/message/{messageID}/part/{partID}\")\n\n    def update(self):\n        \"\"\"Update a part in a message\"\"\"\n\n        return self.client.patch(\"/session/{sessionID}/message/{messageID}/part/{partID}\")\n\n\nclass Permission(Client):\n    def respond(self):\n        \"\"\"\n        Respond to permission\n\n        Approve or deny a permission request from the AI assistant.\n\n        Deprecated.\n        \"\"\"\n\n        return self.client.post(\"/session/{sessionID}/permissions/{permissionID}\")\n\n    def reply(self):\n        \"\"\"\n        Respond to permission request\n\n        Approve or deny a permission request from the AI assistant.\n        \"\"\"\n\n        return self.client.post(\"/permission/{requestID}/reply\")\n\n    def list(self):\n        \"\"\"\n        List pending permissions\n\n        Get all pending permission requests across all sessions.\n        \"\"\"\n\n        return self.client.get(\"/permission\")\n\n\nclass Command(Client):\n    def list(self):\n        \"\"\"\n        List commands\n\n        Get a list of all available commands in the OpenCode system.\n        \"\"\"\n\n        return self.client.get(\"/command\")\n\n\nclass Oauth(Client):\n    def authorize(self):\n        \"\"\"\n        OAuth authorize\n\n        Initiate OAuth authorization for a specific AI provider to get an authorization URL.\n        \"\"\"\n\n        return self.client.post(\"/provider/{providerID}/oauth/authorize\")\n\n    def callback(self):\n        \"\"\"\n        OAuth callback\n\n        Handle the OAuth callback from a provider after user authorization.\n        \"\"\"\n\n        return self.client.post(\"/provider/{providerID}/oauth/callback\")\n\n\nclass Provider(Client):\n    def list(self):\n        \"\"\"\n        List providers\n\n        Get a list of all available AI providers, including both available and connected ones.\n        \"\"\"\n\n        return self.client.get(\"/provider\")\n\n    def auth(self):\n        \"\"\"\n        Get provider auth methods\n\n        Retrieve available authentication methods for all AI providers.\n        \"\"\"\n\n        return self.client.get(\"/provider/auth\")\n\n    @cached_property\n    def oauth(self) -> Oauth:\n        return Oauth(client=self.client)\n\n\nclass Find(Client):\n    def text(self):\n        \"\"\"\n        Find text\n\n        Search for text patterns across files in the project using ripgrep.\n        \"\"\"\n\n        return self.client.get(\"/find\")\n\n    def files(self):\n        \"\"\"\n        Find files\n\n        Search for files or directories by name or pattern in the project directory.\n        \"\"\"\n\n        return self.client.get(\"/find/file\")\n\n    def symbols(self):\n        \"\"\"\n        Find symbols\n\n        Search for workspace symbols like functions, classes, and variables using LSP.\n        \"\"\"\n\n        return self.client.get(\"/find/symbol\")\n\n\nclass File(Client):\n    def list(self):\n        \"\"\"\n        List files\n\n        List files and directories in a specified path.\n        \"\"\"\n\n        return self.client.get(\"/file\")\n\n    def read(self):\n        \"\"\"\n        Read file\n\n        Read the content of a specified file.\n        \"\"\"\n\n        return self.client.get(\"/file/content\")\n\n    def status(self):\n        \"\"\"\n        Get file status\n\n        Get the git status of all files in the project.\n        \"\"\"\n\n        return self.client.get(\"/file/status\")\n\n\nclass App(Client):\n    def log(self):\n        \"\"\"\n        Write log\n\n        Write a log entry to the server logs with specified level and metadata.\n        \"\"\"\n\n        return self.client.post(\"/log\")\n\n    def agents(self):\n        \"\"\"\n        List agents\n\n        Get a list of all available AI agents in the OpenCode system.\n        \"\"\"\n\n        return self.client.get(\"/agent\")\n\n\nclass Auth(Client):\n    def remove(self):\n        \"\"\"\n        Remove MCP OAuth\n\n        Remove OAuth credentials for an MCP server\n        \"\"\"\n\n        return self.client.delete(\"/mcp/{name}/auth\")\n\n    def start(self):\n        \"\"\"\n        Start MCP OAuth\n\n        Start OAuth authentication flow for a Model Context Protocol (MCP) server.\n        \"\"\"\n\n        return self.client.post(\"/mcp/{name}/auth\")\n\n    def callback(self):\n        \"\"\"\n        Complete MCP OAuth\n\n        Complete OAuth authentication for a Model Context Protocol (MCP) server using the authorization code.\n        \"\"\"\n\n        return self.client.post(\"/mcp/{name}/auth/callback\")\n\n    def authenticate(self):\n        \"\"\"\n        Authenticate MCP OAuth\n\n        Start OAuth flow and wait for callback (opens browser)\n        \"\"\"\n\n        return self.client.post(\"/mcp/{name}/auth/authenticate\")\n\n\nclass Mcp(Client):\n    def status(self):\n        \"\"\"\n        Get MCP status\n\n        Get the status of all Model Context Protocol (MCP) servers.\n        \"\"\"\n\n        return self.client.get(\"/mcp\")\n\n    def add(self):\n        \"\"\"\n        Add MCP server\n\n        Dynamically add a new Model Context Protocol (MCP) server to the system.\n        \"\"\"\n\n        return self.client.post(\"/mcp\")\n\n    def connect(self):\n        \"\"\"Connect an MCP server\"\"\"\n\n        return self.client.post(\"/mcp/{name}/connect\")\n\n    def disconnect(self):\n        \"\"\"Disconnect an MCP server\"\"\"\n\n        return self.client.post(\"/mcp/{name}/disconnect\")\n\n    @cached_property\n    def auth(self) -> Auth:\n        return Auth(client=self.client)\n\n\nclass Lsp(Client):\n    def status(self):\n        \"\"\"\n        Get LSP status\n\n        Get LSP server status\n        \"\"\"\n\n        return self.client.get(\"/lsp\")\n\n\nclass Formatter(Client):\n    def status(self):\n        \"\"\"\n        Get formatter status\n\n        Get formatter status\n        \"\"\"\n\n        return self.client.get(\"/formatter\")\n\n\nclass Control(Client):\n    def next(self):\n        \"\"\"\n        Get next TUI request\n\n        Retrieve the next TUI (Terminal User Interface) request from the queue for processing.\n        \"\"\"\n\n        return self.client.get(\"/tui/control/next\")\n\n    def response(self):\n        \"\"\"\n        Submit TUI response\n\n        Submit a response to the TUI request queue to complete a pending request.\n        \"\"\"\n\n        return self.client.post(\"/tui/control/response\")\n\n\nclass Tui(Client):\n    def append_prompt(self):\n        \"\"\"\n        Append TUI prompt\n\n        Append prompt to the TUI\n        \"\"\"\n\n        return self.client.post(\"/tui/append-prompt\")\n\n    def open_help(self):\n        \"\"\"\n        Open help dialog\n\n        Open the help dialog in the TUI to display user assistance information.\n        \"\"\"\n\n        return self.client.post(\"/tui/open-help\")\n\n    def open_sessions(self):\n        \"\"\"\n        Open sessions dialog\n\n        Open the session dialog\n        \"\"\"\n\n        return self.client.post(\"/tui/open-sessions\")\n\n    def open_themes(self):\n        \"\"\"\n        Open themes dialog\n\n        Open the theme dialog\n        \"\"\"\n\n        return self.client.post(\"/tui/open-themes\")\n\n    def open_models(self):\n        \"\"\"\n        Open models dialog\n\n        Open the model dialog\n        \"\"\"\n\n        return self.client.post(\"/tui/open-models\")\n\n    def submit_prompt(self):\n        \"\"\"\n        Submit TUI prompt\n\n        Submit the prompt\n        \"\"\"\n\n        return self.client.post(\"/tui/submit-prompt\")\n\n    def clear_prompt(self):\n        \"\"\"\n        Clear TUI prompt\n\n        Clear the prompt\n        \"\"\"\n\n        return self.client.post(\"/tui/clear-prompt\")\n\n    def execute_command(self):\n        \"\"\"\n        Execute TUI command\n\n        Execute a TUI command (e.g. agent_cycle)\n        \"\"\"\n\n        return self.client.post(\"/tui/execute-command\")\n\n    def show_toast(self):\n        \"\"\"\n        Show TUI toast\n\n        Show a toast notification in the TUI\n        \"\"\"\n\n        return self.client.post(\"/tui/show-toast\")\n\n    def publish(self):\n        \"\"\"\n        Publish TUI event\n\n        Publish a TUI event\n        \"\"\"\n\n        return self.client.post(\"/tui/publish\")\n\n    @cached_property\n    def control(self) -> Control:\n        return Control(client=self.client)\n\n\nclass Auth_2(Client):\n    def set(self):\n        \"\"\"\n        Set auth credentials\n\n        Set authentication credentials\n        \"\"\"\n\n        return self.client.put(\"/auth/{providerID}\")\n\n\nclass Event(Client):\n    def subscribe(self):\n        \"\"\"\n        Subscribe to events\n\n        Get events\n        \"\"\"\n\n        return self.client.get(\"/event\")\n\n\nclass Sdk(Client):\n    @cached_property\n    def global_(self) -> Global:\n        return Global(client=self.client)\n\n    @cached_property\n    def project(self) -> Project:\n        return Project(client=self.client)\n\n    @cached_property\n    def pty(self) -> Pty:\n        return Pty(client=self.client)\n\n    @cached_property\n    def config(self) -> Config:\n        return Config(client=self.client)\n\n    @cached_property\n    def tool(self) -> Tool:\n        return Tool(client=self.client)\n\n    @cached_property\n    def instance(self) -> Instance:\n        return Instance(client=self.client)\n\n    @cached_property\n    def path(self) -> Path:\n        return Path(client=self.client)\n\n    @cached_property\n    def vcs(self) -> Vcs:\n        return Vcs(client=self.client)\n\n    @cached_property\n    def session(self) -> Session:\n        return Session(client=self.client)\n\n    @cached_property\n    def part(self) -> Part:\n        return Part(client=self.client)\n\n    @cached_property\n    def permission(self) -> Permission:\n        return Permission(client=self.client)\n\n    @cached_property\n    def command(self) -> Command:\n        return Command(client=self.client)\n\n    @cached_property\n    def provider(self) -> Provider:\n        return Provider(client=self.client)\n\n    @cached_property\n    def find(self) -> Find:\n        return Find(client=self.client)\n\n    @cached_property\n    def file(self) -> File:\n        return File(client=self.client)\n\n    @cached_property\n    def app(self) -> App:\n        return App(client=self.client)\n\n    @cached_property\n    def mcp(self) -> Mcp:\n        return Mcp(client=self.client)\n\n    @cached_property\n    def lsp(self) -> Lsp:\n        return Lsp(client=self.client)\n\n    @cached_property\n    def formatter(self) -> Formatter:\n        return Formatter(client=self.client)\n\n    @cached_property\n    def tui(self) -> Tui:\n        return Tui(client=self.client)\n\n    @cached_property\n    def auth(self) -> Auth_2:\n        return Auth_2(client=self.client)\n\n    @cached_property\n    def event(self) -> Event:\n        return Event(client=self.client)\n"
  },
  {
    "path": "packages/openapi-python-tests/sdks/package.json",
    "content": "{\n  \"name\": \"@test/openapi-python-sdks\",\n  \"version\": \"0.0.0\",\n  \"private\": true,\n  \"type\": \"module\",\n  \"devDependencies\": {\n    \"@hey-api/openapi-python\": \"workspace:*\",\n    \"typescript\": \"5.9.3\"\n  },\n  \"engines\": {\n    \"node\": \">=20.19.0\"\n  }\n}\n"
  },
  {
    "path": "packages/openapi-python-tests/sdks/test/opencode.test.ts",
    "content": "import fs from 'node:fs';\nimport path from 'node:path';\n\nimport { createClient } from '@hey-api/openapi-python';\n\nimport { getFilePaths, getSpecsPath } from '../../utils';\nimport { createSdkConfig, getSnapshotsPath, getTempSnapshotsPath } from './utils';\n\nconst namespace = 'opencode';\n\nconst outputDir = path.join(getTempSnapshotsPath(), namespace);\nconst snapshotsDir = path.join(getSnapshotsPath(), namespace);\n\nconst specPath = path.join(getSpecsPath(), '3.1.x', 'opencode.yaml');\n\ndescribe(`Python SDK: ${namespace}`, () => {\n  const createConfig = createSdkConfig({\n    outputDir,\n  });\n\n  const scenarios = [\n    {\n      config: createConfig({\n        input: specPath,\n        output: 'default',\n        plugins: ['@hey-api/python-sdk'],\n      }),\n      description: 'default',\n    },\n  ];\n\n  it.each(scenarios)(\n    '$description',\n    async ({ config }) => {\n      await createClient(config);\n\n      const filePaths = getFilePaths(\n        typeof config.output === 'string' ? config.output : config.output.path,\n      );\n\n      await Promise.all(\n        filePaths.map(async (filePath) => {\n          const fileContent = fs.readFileSync(filePath, 'utf-8');\n          await expect(fileContent).toMatchFileSnapshot(\n            path.join(snapshotsDir, filePath.slice(outputDir.length + 1)),\n          );\n        }),\n      );\n    },\n    15_000,\n  );\n});\n"
  },
  {
    "path": "packages/openapi-python-tests/sdks/test/utils.ts",
    "content": "import path from 'node:path';\nimport { fileURLToPath } from 'node:url';\n\nimport { type UserConfig } from '@hey-api/openapi-python';\n\nconst __filename = fileURLToPath(import.meta.url);\nconst __dirname = path.dirname(__filename);\n\nexport const createSdkConfig =\n  ({ outputDir }: { outputDir: string }) =>\n  (userConfig: UserConfig) =>\n    ({\n      ...userConfig,\n      logs: {\n        level: 'silent',\n        path: './logs',\n      },\n      output:\n        typeof userConfig.output === 'string'\n          ? path.join(outputDir, userConfig.output)\n          : {\n              ...userConfig.output,\n              path: path.join(\n                outputDir,\n                userConfig.output instanceof Array ? '' : userConfig.output.path,\n              ),\n            },\n    }) as const satisfies UserConfig;\n\nexport const getSnapshotsPath = (): string => path.join(__dirname, '..', '__snapshots__');\n\nexport const getTempSnapshotsPath = (): string => path.join(__dirname, '..', '.gen', 'snapshots');\n"
  },
  {
    "path": "packages/openapi-python-tests/sdks/tsconfig.json",
    "content": "{\n  \"extends\": \"../tsconfig.base.json\",\n  \"include\": [\"test/**/*\"],\n  \"exclude\": [\".gen/**/*\"],\n  \"references\": [{ \"path\": \"../../openapi-python\" }]\n}\n"
  },
  {
    "path": "packages/openapi-python-tests/sdks/turbo.json",
    "content": "{\n  \"$schema\": \"../../../node_modules/turbo/schema.json\",\n  \"extends\": [\"//\"],\n  \"tasks\": {\n    \"build\": {\n      \"dependsOn\": [],\n      \"outputs\": [\"dist/**\"]\n    }\n  }\n}\n"
  },
  {
    "path": "packages/openapi-python-tests/sdks/vitest.setup.ts",
    "content": "import { fileURLToPath } from 'node:url';\n\nimport { beforeAll } from 'vitest';\n\nbeforeAll(() => {\n  process.chdir(fileURLToPath(new URL('.', import.meta.url)));\n});\n"
  },
  {
    "path": "packages/openapi-python-tests/tsconfig.base.json",
    "content": "{\n  \"extends\": \"../../tsconfig.base.json\",\n  \"compilerOptions\": {\n    \"declaration\": false,\n    \"declarationMap\": false,\n    \"noEmit\": true,\n    \"noImplicitOverride\": true,\n    \"noImplicitReturns\": true,\n    \"noUnusedLocals\": true,\n    \"noUnusedParameters\": true,\n    \"types\": [\"vitest/globals\"],\n    \"useUnknownInCatchVariables\": false\n  }\n}\n"
  },
  {
    "path": "packages/openapi-python-tests/utils.ts",
    "content": "import fs from 'node:fs';\nimport path from 'node:path';\n\nexport const getFilePaths = (dirPath: string): Array<string> => {\n  let filePaths: Array<string> = [];\n  const files = fs.readdirSync(dirPath);\n\n  for (const file of files) {\n    const filePath = path.join(dirPath, file);\n    const stat = fs.statSync(filePath);\n\n    if (stat.isDirectory()) {\n      filePaths = filePaths.concat(getFilePaths(filePath));\n    } else {\n      filePaths.push(filePath);\n    }\n  }\n\n  return filePaths;\n};\n\nexport const getSpecsPath = (): string => path.join(__dirname, '..', '..', 'specs');\n"
  },
  {
    "path": "packages/openapi-ts/.gitignore",
    "content": ".DS_Store\n.idea\n.tsdown\n.tmp\njunit.xml\nlogs\nnode_modules\nnpm-debug.log*\ntemp\n\n*.iml\ndist\ncoverage\n.env\n"
  },
  {
    "path": "packages/openapi-ts/CHANGELOG.md",
    "content": "# @hey-api/openapi-ts\n\n## 0.94.4\n\n### Patch Changes\n\n- **plugin(orpc)**: initial release ([#3264](https://github.com/hey-api/openapi-ts/pull/3264)) ([`8e1e62d`](https://github.com/hey-api/openapi-ts/commit/8e1e62dbf88590542ac8bdf3584f9be881ea25fc)) by [@hyoban](https://github.com/hyoban)\n\n## 0.94.3\n\n### Patch Changes\n\n- **output**: pass context as second argument in `module.resolve()` function ([#3615](https://github.com/hey-api/openapi-ts/pull/3615)) ([`b6a65d6`](https://github.com/hey-api/openapi-ts/commit/b6a65d6bb3ff1895f2189af858e3424733154bdf)) by [@mrlubos](https://github.com/mrlubos)\n\n- **plugin(@hey-api/client-nuxt)**: preserve AbortSignal, FormData, and ReadableStream in unwrapRefs ([#3614](https://github.com/hey-api/openapi-ts/pull/3614)) ([`129afa0`](https://github.com/hey-api/openapi-ts/commit/129afa052b61d71fe4d0d7f5568b4ea38dead44c)) by [@copilot-swe-agent](https://github.com/apps/copilot-swe-agent)\n\n- **parser**: fix: self-referencing discriminator ([#3601](https://github.com/hey-api/openapi-ts/pull/3601)) ([`857eb19`](https://github.com/hey-api/openapi-ts/commit/857eb1983fa1ab0f048d426a31835ede563a2c00)) by [@pgraug](https://github.com/pgraug)\n\n- **output**: add `module` option ([#3616](https://github.com/hey-api/openapi-ts/pull/3616)) ([`e4eea23`](https://github.com/hey-api/openapi-ts/commit/e4eea23ab23fb704dfdb9aaad63989be34d5093c)) by [@mrlubos](https://github.com/mrlubos)\n\n- **plugin(@hey-api/transformers)**: expose `plugin` and `$` in transformer function context ([#3610](https://github.com/hey-api/openapi-ts/pull/3610)) ([`18ccc81`](https://github.com/hey-api/openapi-ts/commit/18ccc81ae75718157949c9724d86d6225f0c0eb0)) by [@mrlubos](https://github.com/mrlubos)\n\n### Updated Dependencies:\n\n- @hey-api/shared@0.2.5\n- @hey-api/codegen-core@0.7.4\n\n## 0.94.2\n\n### Patch Changes\n\n- **internal**: export Plugins namespace ([#3586](https://github.com/hey-api/openapi-ts/pull/3586)) ([`12827e3`](https://github.com/hey-api/openapi-ts/commit/12827e333b9c1b810607c8a948ab3a909a920678)) by [@mrlubos](https://github.com/mrlubos)\n\n- **plugin(nestjs)**: initial release ([#3573](https://github.com/hey-api/openapi-ts/pull/3573)) ([`e596edb`](https://github.com/hey-api/openapi-ts/commit/e596edbe799e51c21783239bfb524c7342df365b)) by [@mikhin](https://github.com/mikhin)\n\n- **internal**: expand TypeScript peer dependency range ([#3588](https://github.com/hey-api/openapi-ts/pull/3588)) ([`ae5ecc9`](https://github.com/hey-api/openapi-ts/commit/ae5ecc943f41c19bdc77a477c00b68ceb8ab3d52)) by [@mrlubos](https://github.com/mrlubos)\n\n- **output**: pass default value to `header` function ([#3585](https://github.com/hey-api/openapi-ts/pull/3585)) ([`c076e4d`](https://github.com/hey-api/openapi-ts/commit/c076e4d3e9697d8bbc72db13a31d44627c814c2d)) by [@mrlubos](https://github.com/mrlubos)\n\n### Updated Dependencies:\n\n- @hey-api/shared@0.2.4\n- @hey-api/codegen-core@0.7.3\n- @hey-api/types@0.1.4\n\n## 0.94.1\n\n### Patch Changes\n\n- **plugin(@hey-api/typescript)**: add Resolvers API ([#3531](https://github.com/hey-api/openapi-ts/pull/3531)) ([`0e47fcb`](https://github.com/hey-api/openapi-ts/commit/0e47fcbf87560f1d59b74d01c704a0e42648febb)) by [@mrlubos](https://github.com/mrlubos)\n\n- **dsl**: expand list of JavaScript globals ([#3508](https://github.com/hey-api/openapi-ts/pull/3508)) ([`1e00a69`](https://github.com/hey-api/openapi-ts/commit/1e00a6983eaa56acaf98663310fb9e3122d1d575)) by [@mrlubos](https://github.com/mrlubos)\n\n- **plugin(valibot)**: provide more resolvers ([#3547](https://github.com/hey-api/openapi-ts/pull/3547)) ([`854ee1c`](https://github.com/hey-api/openapi-ts/commit/854ee1cbdf322f7c3f02441d02eeb4b0dbe747aa)) by [@mrlubos](https://github.com/mrlubos)\n\n- **cli**: show environment value in development ([#3546](https://github.com/hey-api/openapi-ts/pull/3546)) ([`571bc8a`](https://github.com/hey-api/openapi-ts/commit/571bc8a32b55647083bb506d4a5b575c4736cb94)) by [@mrlubos](https://github.com/mrlubos)\n\n- **plugin(zod)**: handle `guid` string format ([#3552](https://github.com/hey-api/openapi-ts/pull/3552)) ([`7acb228`](https://github.com/hey-api/openapi-ts/commit/7acb228c7c4e1dd5d7b70ee576a007ee1c9682cd)) by [@erikwski](https://github.com/erikwski)\n\n- **plugin(@hey-api/typescript)**: implement `getName()` symbol hook ([#3556](https://github.com/hey-api/openapi-ts/pull/3556)) ([`68c750a`](https://github.com/hey-api/openapi-ts/commit/68c750ab7ad37c71c4f9b267ddc9e1c90c89924a)) by [@mrlubos](https://github.com/mrlubos)\n\n- **plugin(zod)**: implement `getName()` symbol hook ([#3556](https://github.com/hey-api/openapi-ts/pull/3556)) ([`68c750a`](https://github.com/hey-api/openapi-ts/commit/68c750ab7ad37c71c4f9b267ddc9e1c90c89924a)) by [@mrlubos](https://github.com/mrlubos)\n\n- **config(plugins)**: show warning when plugin infer fails ([#3540](https://github.com/hey-api/openapi-ts/pull/3540)) ([`0512650`](https://github.com/hey-api/openapi-ts/commit/0512650988ce3c411492172e6bbe300f5440408f)) by [@mrlubos](https://github.com/mrlubos)\n\n- **plugin(valibot)**: implement `getName()` symbol hook ([#3556](https://github.com/hey-api/openapi-ts/pull/3556)) ([`68c750a`](https://github.com/hey-api/openapi-ts/commit/68c750ab7ad37c71c4f9b267ddc9e1c90c89924a)) by [@mrlubos](https://github.com/mrlubos)\n\n- **plugin(@hey-api/transformers)**: fix: support `anyOf` schema with null ([#3504](https://github.com/hey-api/openapi-ts/pull/3504)) ([`4b6b398`](https://github.com/hey-api/openapi-ts/commit/4b6b398c59746167b93857f6ab475a7a88ddbcd4)) by [@copilot-swe-agent](https://github.com/apps/copilot-swe-agent)\n\n- **plugin(zod)**: provide more resolvers ([#3554](https://github.com/hey-api/openapi-ts/pull/3554)) ([`bfa255c`](https://github.com/hey-api/openapi-ts/commit/bfa255c0db03a869dd99cd16736acef6abe39987)) by [@mrlubos](https://github.com/mrlubos)\n\n### Updated Dependencies:\n\n- @hey-api/codegen-core@0.7.2\n- @hey-api/shared@0.2.3\n\n## 0.94.0\n\n### Minor Changes\n\n- **BREAKING** **client**: `buildUrl()` function includes `baseUrl` from config by default ([#3491](https://github.com/hey-api/openapi-ts/pull/3491)) ([`c0cbffb`](https://github.com/hey-api/openapi-ts/commit/c0cbffb9413c6f1cc12b41069af6ddb031401742)) by [@copilot-swe-agent](https://github.com/apps/copilot-swe-agent)\n\n### Patch Changes\n\n- **dsl(reserved)**: expand reserved keywords with more globals ([#3487](https://github.com/hey-api/openapi-ts/pull/3487)) ([`89a9151`](https://github.com/hey-api/openapi-ts/commit/89a9151b8d456796aa861c2a015af9bc1a300eb2)) by [@mrlubos](https://github.com/mrlubos)\n\n- **parser**: fix: explicit discriminator mapping wins over fallback in nested `allOf` ([#3490](https://github.com/hey-api/openapi-ts/pull/3490)) ([`a67d589`](https://github.com/hey-api/openapi-ts/commit/a67d589e1f8e5860bd05d5caff134dd6a7eed6e2)) by [@pgraug](https://github.com/pgraug)\n\n- **plugin(@pinia/colada)**: fix: pass error type generic to `defineQueryOptions` ([#3483](https://github.com/hey-api/openapi-ts/pull/3483)) ([`8e5a578`](https://github.com/hey-api/openapi-ts/commit/8e5a57855c03a2a49f9c62398f5bdf1fa989f4de)) by [@lukaspodmelle](https://github.com/lukaspodmelle)\n\n- **plugin(@tanstack/react-query)**: support generating `useMutation` hooks ([#3432](https://github.com/hey-api/openapi-ts/pull/3432)) ([`12d7660`](https://github.com/hey-api/openapi-ts/commit/12d76605e3dfb4204f9971dff7254be69c0a7359)) by [@nmokkenstorm](https://github.com/nmokkenstorm)\n\n- **plugin(typescript)**: fix: reference enum object when creating enum types ([#3500](https://github.com/hey-api/openapi-ts/pull/3500)) ([`127e67b`](https://github.com/hey-api/openapi-ts/commit/127e67b9b761889751e25d95fe5900508e6fd151)) by [@mrlubos](https://github.com/mrlubos)\n\n- **output(header)**: fix: support function signature in client and core files ([#3486](https://github.com/hey-api/openapi-ts/pull/3486)) ([`942913a`](https://github.com/hey-api/openapi-ts/commit/942913af15ae10c5fc3c5e456800829b7dd9c10a)) by [@mrlubos](https://github.com/mrlubos)\n\n- **output**: fix: avoid double sanitizing leading character ([#3448](https://github.com/hey-api/openapi-ts/pull/3448)) ([`c50f7bc`](https://github.com/hey-api/openapi-ts/commit/c50f7bcf5676f2783a412288d243aeaeabd9f8bd)) by [@mrlubos](https://github.com/mrlubos)\n\n- **internal**: fix: simplify dev mode check ([#3498](https://github.com/hey-api/openapi-ts/pull/3498)) ([`ea2538b`](https://github.com/hey-api/openapi-ts/commit/ea2538b221605ee1ba900d173394cd4f0aab8b12)) by [@mrlubos](https://github.com/mrlubos)\n\n- **plugin(zod)**: support function in `metadata` option ([#3497](https://github.com/hey-api/openapi-ts/pull/3497)) ([`1ed39bc`](https://github.com/hey-api/openapi-ts/commit/1ed39bc3ed713edd7ecdcc997fac1c7487b07105)) by [@copilot-swe-agent](https://github.com/apps/copilot-swe-agent)\n\n- **plugin(valibot)**: support function in `metadata` option ([#3497](https://github.com/hey-api/openapi-ts/pull/3497)) ([`202cc05`](https://github.com/hey-api/openapi-ts/commit/202cc054a7221d8ea7b63881785d314104ab01d2)) by [@copilot-swe-agent](https://github.com/apps/copilot-swe-agent)\n\n- **internal**: log symbol meta if name is falsy ([#3448](https://github.com/hey-api/openapi-ts/pull/3448)) ([`c50f7bc`](https://github.com/hey-api/openapi-ts/commit/c50f7bcf5676f2783a412288d243aeaeabd9f8bd)) by [@mrlubos](https://github.com/mrlubos)\n\n- **client**: fix: change serializer types from `any` to `unknown` ([#3471](https://github.com/hey-api/openapi-ts/pull/3471)) ([`ad11be2`](https://github.com/hey-api/openapi-ts/commit/ad11be241c494d23930ce8f76e57eb7afa631c67)) by [@copilot-swe-agent](https://github.com/apps/copilot-swe-agent)\n\n- **plugin(@tanstack/preact-query)**: initial release ([#3499](https://github.com/hey-api/openapi-ts/pull/3499)) ([`873839e`](https://github.com/hey-api/openapi-ts/commit/873839e065a7919fcf736348c15238bd3b6c3d15)) by [@mrlubos](https://github.com/mrlubos)\n\n### Updated Dependencies:\n\n- @hey-api/shared@0.2.2\n- @hey-api/codegen-core@0.7.1\n\n## 0.93.1\n\n### Patch Changes\n\n- **plugin(@tanstack/query)**: fix: skip mutation queries for SSE endpoints ([#3470](https://github.com/hey-api/openapi-ts/pull/3470)) ([`3ca4f31`](https://github.com/hey-api/openapi-ts/commit/3ca4f317e422bb58345cb794faf979e26f10d127)) by [@copilot-swe-agent](https://github.com/apps/copilot-swe-agent)\n\n- **client**: fix: avoid removing empty arrays from flat arguments ([#3451](https://github.com/hey-api/openapi-ts/pull/3451)) ([`1518fda`](https://github.com/hey-api/openapi-ts/commit/1518fda8372b5fb27085f4b296a77b922c340885)) by [@copilot-swe-agent](https://github.com/apps/copilot-swe-agent)\n\n- **plugin(zod)**: fix: apply nullable modifier to `additionalProperties` schema ([#3452](https://github.com/hey-api/openapi-ts/pull/3452)) ([`2e903af`](https://github.com/hey-api/openapi-ts/commit/2e903af5d09881949b042bbd9aba516f3237764d)) by [@copilot-swe-agent](https://github.com/apps/copilot-swe-agent)\n\n- **cli**: fix: do not set `logs.file` to `true` by default ([#3469](https://github.com/hey-api/openapi-ts/pull/3469)) ([`9e3d347`](https://github.com/hey-api/openapi-ts/commit/9e3d347d4b7a36c9d04b2f9c2d4988ece03677d8)) by [@copilot-swe-agent](https://github.com/apps/copilot-swe-agent)\n\n- **plugin(@hey-api/sdk)**: fix: correctly set required flat parameters ([#3458](https://github.com/hey-api/openapi-ts/pull/3458)) ([`bf50a55`](https://github.com/hey-api/openapi-ts/commit/bf50a559670311a866ff8b104c169ef7619fb202)) by [@copilot-swe-agent](https://github.com/apps/copilot-swe-agent)\n\n- **plugin(zod)**: add `u` flag on regex patterns with unicode property escapes ([#3468](https://github.com/hey-api/openapi-ts/pull/3468)) ([`67ad86a`](https://github.com/hey-api/openapi-ts/commit/67ad86a7e37a16125fc5a26eaad5859de43ccac3)) by [@copilot-swe-agent](https://github.com/apps/copilot-swe-agent)\n\n- **plugin(valibot)**: add `u` flag on regex patterns with unicode property escapes ([#3468](https://github.com/hey-api/openapi-ts/pull/3468)) ([`003d914`](https://github.com/hey-api/openapi-ts/commit/003d91422cc831de782015c640b9bcbce9f17dd9)) by [@copilot-swe-agent](https://github.com/apps/copilot-swe-agent)\n\n- **plugin(@hey-api/typescript)**: simplify union types if a member is `unknown` ([#3454](https://github.com/hey-api/openapi-ts/pull/3454)) ([`96d87df`](https://github.com/hey-api/openapi-ts/commit/96d87df7cf49bd1e8ce2dc196fcacc57270e4954)) by [@copilot-swe-agent](https://github.com/apps/copilot-swe-agent)\n\n- **client(@hey-api/nuxt)**: fix: do not unwrap blob values ([#3459](https://github.com/hey-api/openapi-ts/pull/3459)) ([`b7233d1`](https://github.com/hey-api/openapi-ts/commit/b7233d1d3cc5de84b02c9dc8a27c3cb84235d752)) by [@LeiCraft](https://github.com/LeiCraft)\n\n- **client**: support async `createClientConfig` ([#3445](https://github.com/hey-api/openapi-ts/pull/3445)) ([`cd33d86`](https://github.com/hey-api/openapi-ts/commit/cd33d867857fbe9b4daf3c164f892d89946c4beb)) by [@copilot-swe-agent](https://github.com/apps/copilot-swe-agent)\n\n## 0.93.0\n\n### Minor Changes\n\n- **plugin(valibot)**: remove `enum.nodes.nullable` resolver node ([#3396](https://github.com/hey-api/openapi-ts/pull/3396)) ([`ea6f386`](https://github.com/hey-api/openapi-ts/commit/ea6f3865c8e381b3160e1526435c4522f0dc6aa4)) by [@mrlubos](https://github.com/mrlubos)\n\n### Removed resolver node\n\nValibot plugin no longer exposes the `enum.nodes.nullable` node. It was refactored so that nullable values are handled outside of resolvers.\n\n- **plugin(zod)**: remove `enum.nodes.nullable` resolver node ([#3398](https://github.com/hey-api/openapi-ts/pull/3398)) ([`737730c`](https://github.com/hey-api/openapi-ts/commit/737730c9c6450c60a81a8949259336e790e9b4f4)) by [@mrlubos](https://github.com/mrlubos)\n\n### Removed resolver node\n\nZod plugin no longer exposes the `enum.nodes.nullable` node. It was refactored so that nullable values are handled outside of resolvers.\n\n### Patch Changes\n\n- **parser**: prefer unprefixed schema names from external files ([#3417](https://github.com/hey-api/openapi-ts/pull/3417)) ([`f3a264b`](https://github.com/hey-api/openapi-ts/commit/f3a264b2c5d7af06bb44fa0350ef613bde3aff87)) by [@copilot-swe-agent](https://github.com/apps/copilot-swe-agent)\n\n- **parser(patch)**: support callback for `patch.schemas` ([#3415](https://github.com/hey-api/openapi-ts/pull/3415)) ([`e494f4d`](https://github.com/hey-api/openapi-ts/commit/e494f4dd828167a0096a0a488b222a013f911055)) by [@copilot-swe-agent](https://github.com/apps/copilot-swe-agent)\n\n- **output**: fix: apply `output.header` to bundled files ([#3438](https://github.com/hey-api/openapi-ts/pull/3438)) ([`bcd0a87`](https://github.com/hey-api/openapi-ts/commit/bcd0a87cdd366cef572eb920b59c115ae65f67bb)) by [@copilot-swe-agent](https://github.com/apps/copilot-swe-agent)\n\n- **parser**: handle OpenAPI 3.1 `contentMediaType` keyword as binary format when file-like ([#3431](https://github.com/hey-api/openapi-ts/pull/3431)) ([`d6a8538`](https://github.com/hey-api/openapi-ts/commit/d6a85381e3c52b4fd1c4af43ee57506459db7a45)) by [@copilot-swe-agent](https://github.com/apps/copilot-swe-agent)\n\n- **input**: fix: improve returned status code when spec fetch fails ([#3427](https://github.com/hey-api/openapi-ts/pull/3427)) ([`37dd92c`](https://github.com/hey-api/openapi-ts/commit/37dd92c6629511860ae434c64ac8af9154ed6aed)) by [@copilot-swe-agent](https://github.com/apps/copilot-swe-agent)\n\n- **client**: expose `onRequest` in RequestOptions for SSE request interception ([#3392](https://github.com/hey-api/openapi-ts/pull/3392)) ([`8fc4681`](https://github.com/hey-api/openapi-ts/commit/8fc46819d5df1d4a353be5ae7cd45a8c669a5d7e)) by [@copilot-swe-agent](https://github.com/apps/copilot-swe-agent)\n\n- **parser**: add `patch.input` and shorthand `patch()` option for full specification transformations ([#3411](https://github.com/hey-api/openapi-ts/pull/3411)) ([`ba9f893`](https://github.com/hey-api/openapi-ts/commit/ba9f893d71b959721e177717ae85fce34d697002)) by [@copilot-swe-agent](https://github.com/apps/copilot-swe-agent)\n\n- **parser**: fix: preserve `unevaluatedProperties` keyword in transforms ([#3435](https://github.com/hey-api/openapi-ts/pull/3435)) ([`f659b38`](https://github.com/hey-api/openapi-ts/commit/f659b38701795d2c2b61c8d3f5c43af93893481a)) by [@copilot-swe-agent](https://github.com/apps/copilot-swe-agent)\n\n- **plugin(zod)**: use `.nullable()` and `.nullish()` methods ([#3398](https://github.com/hey-api/openapi-ts/pull/3398)) ([`737730c`](https://github.com/hey-api/openapi-ts/commit/737730c9c6450c60a81a8949259336e790e9b4f4)) by [@mrlubos](https://github.com/mrlubos)\n\n- **parser**: fix: resolve sibling schemas from external files during bundling ([#3422](https://github.com/hey-api/openapi-ts/pull/3422)) ([`19fd80a`](https://github.com/hey-api/openapi-ts/commit/19fd80aff26b1198d6838d48357702c39ad05501)) by [@j-westover](https://github.com/j-westover)\n\n- **parser(transforms)**: add `schemaName` transform ([#3416](https://github.com/hey-api/openapi-ts/pull/3416)) ([`4b9d032`](https://github.com/hey-api/openapi-ts/commit/4b9d032c6a144fa79cedc28e077782b9d67803a3)) by [@copilot-swe-agent](https://github.com/apps/copilot-swe-agent)\n\n- **plugin(valibot)**: use `.nullable()` and `.nullish()` methods ([#3396](https://github.com/hey-api/openapi-ts/pull/3396)) ([`ea6f386`](https://github.com/hey-api/openapi-ts/commit/ea6f3865c8e381b3160e1526435c4522f0dc6aa4)) by [@mrlubos](https://github.com/mrlubos)\n\n- **input**: fix: avoid prefixing sources if paths do not collide on operations ([#3436](https://github.com/hey-api/openapi-ts/pull/3436)) ([`b1a419a`](https://github.com/hey-api/openapi-ts/commit/b1a419a835c312a1f8bf36a5b781109368041220)) by [@copilot-swe-agent](https://github.com/apps/copilot-swe-agent)\n\n- **parser(patch)**: support callback for `patch.operations` ([#3420](https://github.com/hey-api/openapi-ts/pull/3420)) ([`e1cd970`](https://github.com/hey-api/openapi-ts/commit/e1cd970e4f3028b29ace44a58b2d2cae18a6c45f)) by [@copilot-swe-agent](https://github.com/apps/copilot-swe-agent)\n\n- **parser**: add support for non-string discriminator property types ([#3385](https://github.com/hey-api/openapi-ts/pull/3385)) ([`dd0be9c`](https://github.com/hey-api/openapi-ts/commit/dd0be9c6ca93552c3367ca8e8ba785381295a112)) by [@SipanP](https://github.com/SipanP)\n\n### Updated Dependencies:\n\n- @hey-api/shared@0.2.1\n- @hey-api/json-schema-ref-parser@1.3.1\n\n## 0.92.4\n\n### Patch Changes\n\n- **plugin(@hey-api/transformers)**: fix: false positive warning for discriminated `oneOf` schemas ([#3379](https://github.com/hey-api/openapi-ts/pull/3379)) ([`1f7c262`](https://github.com/hey-api/openapi-ts/commit/1f7c262f17b45093ae19d060ae26270c91b3ad41)) by [@copilot-swe-agent](https://github.com/apps/copilot-swe-agent)\n\n- **plugin(@hey-api/client-nuxt)**: fix: forward `asyncDataOptions` to `useFetch` and `useLazyFetch` ([#3382](https://github.com/hey-api/openapi-ts/pull/3382)) ([`a4b7399`](https://github.com/hey-api/openapi-ts/commit/a4b73998e1985f236aee1bbe76611e8d3413f4c6)) by [@rigtigeEmil](https://github.com/rigtigeEmil)\n\n- **output**: detect `importFileExtension` from tsconfig `module` option ([#3380](https://github.com/hey-api/openapi-ts/pull/3380)) ([`4cbc307`](https://github.com/hey-api/openapi-ts/commit/4cbc307862e4357a42afe8fb595036f86279babd)) by [@copilot-swe-agent](https://github.com/apps/copilot-swe-agent)\n\n- **plugin(@hey-api/typescript)**: fix: deduplicate enum keys to avoid name collision ([#3376](https://github.com/hey-api/openapi-ts/pull/3376)) ([`54138b6`](https://github.com/hey-api/openapi-ts/commit/54138b6771618d464f3b930fdf7af23290c00076)) by [@spikesagal](https://github.com/spikesagal)\n\n- **plugin(@hey-api/client-nuxt)**: unwrap `ComputedRef` body before initial serialization ([#3361](https://github.com/hey-api/openapi-ts/pull/3361)) ([`ca52649`](https://github.com/hey-api/openapi-ts/commit/ca52649a2f479478cc2842677c21c1bcfac69160)) by [@rigtigeEmil](https://github.com/rigtigeEmil)\n\n- **plugin(@angular/common)**: use generics for HttpRequests ([#3384](https://github.com/hey-api/openapi-ts/pull/3384)) ([`a94f50f`](https://github.com/hey-api/openapi-ts/commit/a94f50fef84f2387b9ca686ff47370030007e7a2)) by [@quartepie](https://github.com/quartepie)\n\n- **plugin(@hey-api/transformers)**: fix: handle `$ref` keywords in `allOf` compositions ([#3374](https://github.com/hey-api/openapi-ts/pull/3374)) ([`4b781aa`](https://github.com/hey-api/openapi-ts/commit/4b781aa18bc9f5bfde302c0359bfe9f3ad3effa7)) by [@copilot-swe-agent](https://github.com/apps/copilot-swe-agent)\n\n- **internal**: use shared schema processor ([#3370](https://github.com/hey-api/openapi-ts/pull/3370)) ([`27cd91f`](https://github.com/hey-api/openapi-ts/commit/27cd91f530bd77da6ea95df1704b2947917b4626)) by [@mrlubos](https://github.com/mrlubos)\n\n### Updated Dependencies:\n\n- @hey-api/shared@0.2.0\n- @hey-api/json-schema-ref-parser@1.3.0\n\n## 0.92.3\n\n### Patch Changes\n\n- **plugin(zod)**: use namespace import for zod v4 ([#3325](https://github.com/hey-api/openapi-ts/pull/3325)) ([`e54db3e`](https://github.com/hey-api/openapi-ts/commit/e54db3e7e34e86c17d5c1fba90d9df9778c4b32d)) by [@mrlubos](https://github.com/mrlubos)\n\n## 0.92.2\n\n### Patch Changes\n\n### Updated Dependencies:\n\n- @hey-api/shared@0.1.2\n- @hey-api/codegen-core@0.7.0\n\n## 0.92.1\n\n### Patch Changes\n\n### Updated Dependencies:\n\n- @hey-api/shared@0.1.2\n- @hey-api/codegen-core@0.7.0\n\n## 0.92.0\n\n### Minor Changes\n\n- **BREAKING:** **symbol**: replace `exportFrom` array with `getExportFromFilePath()` function ([#3318](https://github.com/hey-api/openapi-ts/pull/3318)) ([`fefa70e`](https://github.com/hey-api/openapi-ts/commit/fefa70e6810a539607441535289e98c69a604c0d)) by [@mrlubos](https://github.com/mrlubos)\n\n### Updated Symbol interface\n\nThe `exportFrom` property has been replaced with the `getExportFromFilePath()` function. This allows you to dynamically determine export paths based on symbol properties. This is a low-level feature, so you're most likely unaffected.\n\n### Patch Changes\n\n- **config**: rename `exportFromIndex` option to `includeInEntry` ([#3318](https://github.com/hey-api/openapi-ts/pull/3318)) ([`fefa70e`](https://github.com/hey-api/openapi-ts/commit/fefa70e6810a539607441535289e98c69a604c0d)) by [@mrlubos](https://github.com/mrlubos)\n\n- **config**: `includeInEntry` accepts function in addition to primitive value ([#3318](https://github.com/hey-api/openapi-ts/pull/3318)) ([`fefa70e`](https://github.com/hey-api/openapi-ts/commit/fefa70e6810a539607441535289e98c69a604c0d)) by [@mrlubos](https://github.com/mrlubos)\n\n- **parser**: add `getExportFromFilePath()` hook ([#3318](https://github.com/hey-api/openapi-ts/pull/3318)) ([`fefa70e`](https://github.com/hey-api/openapi-ts/commit/fefa70e6810a539607441535289e98c69a604c0d)) by [@mrlubos](https://github.com/mrlubos)\n\n- **plugin**: add `comments` option to all plugins ([#3318](https://github.com/hey-api/openapi-ts/pull/3318)) ([`fefa70e`](https://github.com/hey-api/openapi-ts/commit/fefa70e6810a539607441535289e98c69a604c0d)) by [@mrlubos](https://github.com/mrlubos)\n\n- **types**: improve `defineConfig()` types ([#3318](https://github.com/hey-api/openapi-ts/pull/3318)) ([`fefa70e`](https://github.com/hey-api/openapi-ts/commit/fefa70e6810a539607441535289e98c69a604c0d)) by [@mrlubos](https://github.com/mrlubos)\n\n- **config**: rename `output.indexFile` to `output.entryFile` ([#3318](https://github.com/hey-api/openapi-ts/pull/3318)) ([`fefa70e`](https://github.com/hey-api/openapi-ts/commit/fefa70e6810a539607441535289e98c69a604c0d)) by [@mrlubos](https://github.com/mrlubos)\n\n- **fix**: improve dev mode detection causing builds to fail ([#3318](https://github.com/hey-api/openapi-ts/pull/3318)) ([`fefa70e`](https://github.com/hey-api/openapi-ts/commit/fefa70e6810a539607441535289e98c69a604c0d)) by [@mrlubos](https://github.com/mrlubos)\n\n### Updated Dependencies:\n\n- @hey-api/shared@0.1.2\n- @hey-api/codegen-core@0.7.0\n\n## 0.91.1\n\n### Patch Changes\n\n### Updated Dependencies:\n\n- @hey-api/codegen-core@0.6.1\n- @hey-api/shared@0.1.1\n\n## 0.91.0\n\n### Minor Changes\n\n- **BREAKING**: Drop CommonJS (CJS) support. This package is now **ESM-only**. ([#3251](https://github.com/hey-api/openapi-ts/pull/3251)) ([`7f19d59`](https://github.com/hey-api/openapi-ts/commit/7f19d5921dadfa96ecae84a5298b7aee1daee56d)) by [@mrlubos](https://github.com/mrlubos)\n\n### Removed CommonJS (CJS) support\n\n`@hey-api/openapi-ts` is now ESM-only. This change simplifies the codebase, improves tree-shaking, and enables better integration with modern bundlers and TypeScript tooling.\n\nCommonJS entry points (`require()`, `module.exports`) are no longer supported. If you are in a CJS environment, you can still load the package dynamically using `import()` like:\n\n```js\nconst { defineConfig } = await import(\"@hey-api/openapi-ts\");\n```\n\nIf you have previously written:\n\n```js\nconst { defineConfig } = require(\"@hey-api/openapi-ts\");\n```\n\nMigrate by updating your static imports:\n\n```js\nimport { defineConfig } from \"@hey-api/openapi-ts\";\n```\n\nIf your environment cannot use ESM, pin to a previous version.\n\n### Patch Changes\n\n### Updated Dependencies:\n\n- @hey-api/shared@0.1.0\n- @hey-api/codegen-core@0.6.0\n- @hey-api/types@0.1.3\n\n## 0.90.10\n\n### Patch Changes\n\n- **plugin(@tanstack/solid-query)**: index mutation options symbol ([#3253](https://github.com/hey-api/openapi-ts/pull/3253)) ([`c5f379e`](https://github.com/hey-api/openapi-ts/commit/c5f379ea5534272d63a423c671427ff1ef13197a)) by [@mrlubos](https://github.com/mrlubos)\n\n- **plugin(@tanstack/svelte-query)**: index mutation options symbol ([#3253](https://github.com/hey-api/openapi-ts/pull/3253)) ([`c5f379e`](https://github.com/hey-api/openapi-ts/commit/c5f379ea5534272d63a423c671427ff1ef13197a)) by [@mrlubos](https://github.com/mrlubos)\n\n- **plugin(@tanstack/vue-query)**: index mutation options symbol ([#3253](https://github.com/hey-api/openapi-ts/pull/3253)) ([`c5f379e`](https://github.com/hey-api/openapi-ts/commit/c5f379ea5534272d63a423c671427ff1ef13197a)) by [@mrlubos](https://github.com/mrlubos)\n\n- **plugin(@tanstack/react-query)**: index mutation options symbol ([#3253](https://github.com/hey-api/openapi-ts/pull/3253)) ([`c5f379e`](https://github.com/hey-api/openapi-ts/commit/c5f379ea5534272d63a423c671427ff1ef13197a)) by [@mrlubos](https://github.com/mrlubos)\n\n- **parser**: inline deep path `$ref` references ([#3242](https://github.com/hey-api/openapi-ts/pull/3242)) ([`00cfaed`](https://github.com/hey-api/openapi-ts/commit/00cfaed32a3b1d2a7bbd5c4c2a946a9f7be262b2)) by [@chrg1001](https://github.com/chrg1001)\n\n- **plugin(@tanstack/angular-query-experimental)**: index mutation options symbol ([#3249](https://github.com/hey-api/openapi-ts/pull/3249)) ([`5977f56`](https://github.com/hey-api/openapi-ts/commit/5977f56362351a9e4f1e9715c141a8e37130a4bb)) by [@j-ibarra](https://github.com/j-ibarra)\n\n- **plugin(@hey-api/sdk)**: correctly map body keys in flat mode ([#3255](https://github.com/hey-api/openapi-ts/pull/3255)) ([`9ca5471`](https://github.com/hey-api/openapi-ts/commit/9ca547168c7a89acb0523bd05a5ee24aee7d8638)) by [@jsjames](https://github.com/jsjames)\n\n## 0.90.9\n\n### Patch Changes\n\n- **ts-dsl**: allow removing object properties by passing `null` ([#3247](https://github.com/hey-api/openapi-ts/pull/3247)) ([`7be1561`](https://github.com/hey-api/openapi-ts/commit/7be1561a862d2bb217703003d5e6cbc4a6a09586)) by [@mrlubos](https://github.com/mrlubos)\n\n- **cli**: clean up interface ([#3244](https://github.com/hey-api/openapi-ts/pull/3244)) ([`4f52bce`](https://github.com/hey-api/openapi-ts/commit/4f52bce79d8ac6573472f32a05b7f70913b90605)) by [@mrlubos](https://github.com/mrlubos)\n\n- **ts-dsl**: override object properties when called multiple times with the same name ([#3247](https://github.com/hey-api/openapi-ts/pull/3247)) ([`7be1561`](https://github.com/hey-api/openapi-ts/commit/7be1561a862d2bb217703003d5e6cbc4a6a09586)) by [@mrlubos](https://github.com/mrlubos)\n\n- **config**: move `loadConfigFile` function to `@hey-api/codegen-core` ([#3244](https://github.com/hey-api/openapi-ts/pull/3244)) ([`4f52bce`](https://github.com/hey-api/openapi-ts/commit/4f52bce79d8ac6573472f32a05b7f70913b90605)) by [@mrlubos](https://github.com/mrlubos)\n\n### Updated Dependencies:\n\n- @hey-api/types@0.1.2\n- @hey-api/codegen-core@0.5.5\n\n## 0.90.8\n\n### Patch Changes\n\n- **internal**: move logger to codegen-core ([#3235](https://github.com/hey-api/openapi-ts/pull/3235)) ([`88532f0`](https://github.com/hey-api/openapi-ts/commit/88532f01200e1111818e82a4af7bd5cf8cf26e3b)) by [@mrlubos](https://github.com/mrlubos)\n\n- **cli**: do not show ascii logo on generate command ([#3238](https://github.com/hey-api/openapi-ts/pull/3238)) ([`72e17f3`](https://github.com/hey-api/openapi-ts/commit/72e17f39d6e2d00eff24671e7f2b88801443489a)) by [@mrlubos](https://github.com/mrlubos)\n\n### Updated Dependencies:\n\n- @hey-api/codegen-core@0.5.4\n\n## 0.90.7\n\n### Patch Changes\n\n- **deps**: move @hey-api/types to dependencies to fix broken types ([#3232](https://github.com/hey-api/openapi-ts/pull/3232)) ([`edfce48`](https://github.com/hey-api/openapi-ts/commit/edfce4875cb9279d3ab8bfd438ff177e8ba7845c)) by [@mrlubos](https://github.com/mrlubos)\n\n### Updated Dependencies:\n\n- @hey-api/codegen-core@0.5.3\n\n## 0.90.6\n\n### Patch Changes\n\n- **plugin(@hey-api/sdk)**: do not warn on mutualTLS security schemes ([#3227](https://github.com/hey-api/openapi-ts/pull/3227)) ([`384e52f`](https://github.com/hey-api/openapi-ts/commit/384e52fdc06c99872b4ad5551acf8bcad616e024)) by [@mrlubos](https://github.com/mrlubos)\n\n## 0.90.5\n\n### Patch Changes\n\n- **plugin(@hey-api/sdk)**: do not warn on mutualTLS security schemes ([#3218](https://github.com/hey-api/openapi-ts/pull/3218)) ([`97c0a2e`](https://github.com/hey-api/openapi-ts/commit/97c0a2ec60490f135f4ad438108e36a4229d2c35)) by [@mrlubos](https://github.com/mrlubos)\n\n## 0.90.4\n\n### Patch Changes\n\n- **plugin(@hey-api/client-next)**: fix: JSON parsing error on empty response bodies without Content-Length header ([#3201](https://github.com/hey-api/openapi-ts/pull/3201)) ([`8428ca5`](https://github.com/hey-api/openapi-ts/commit/8428ca5152c66d393bcfee9570a6c1d7ad1155c7)) by [@copilot-swe-agent](https://github.com/apps/copilot-swe-agent)\n\n- **plugin(@hey-api/client-fetch)**: fix: JSON parsing error on empty response bodies without Content-Length header ([#3201](https://github.com/hey-api/openapi-ts/pull/3201)) ([`2af4d9a`](https://github.com/hey-api/openapi-ts/commit/2af4d9ab56293c042459e6ae31787cd628be6037)) by [@copilot-swe-agent](https://github.com/apps/copilot-swe-agent)\n\n- **plugin(@hey-api/client-ky)**: fix: JSON parsing error on empty response bodies without Content-Length header ([#3201](https://github.com/hey-api/openapi-ts/pull/3201)) ([`c0563fb`](https://github.com/hey-api/openapi-ts/commit/c0563fbd0f0ec66d25e5316bda0274380ac26639)) by [@copilot-swe-agent](https://github.com/apps/copilot-swe-agent)\n\n- **plugin(valibot)**: add `enum` resolver ([#3209](https://github.com/hey-api/openapi-ts/pull/3209)) ([`f6723eb`](https://github.com/hey-api/openapi-ts/commit/f6723eb59cba4b2c2ffbdbddce3fc26d668e2d4a)) by [@thyming](https://github.com/thyming)\n\n- **plugin(zod)**: add `enum` resolver ([#3209](https://github.com/hey-api/openapi-ts/pull/3209)) ([`57334d8`](https://github.com/hey-api/openapi-ts/commit/57334d8c9c83169773a626193ca4c661b3957d37)) by [@thyming](https://github.com/thyming)\n\n## 0.90.3\n\n### Patch Changes\n\n- **output**: add `oxfmt` preset ([#3197](https://github.com/hey-api/openapi-ts/pull/3197)) ([`701a69c`](https://github.com/hey-api/openapi-ts/commit/701a69cae24d3068235d80561e2cf9d18d7ccac9)) by [@mrlubos](https://github.com/mrlubos)\n\n## 0.90.2\n\n### Patch Changes\n\n- **build**: do not minify bundles for better code readability and debugging ([#3186](https://github.com/hey-api/openapi-ts/pull/3186)) ([`4d46130`](https://github.com/hey-api/openapi-ts/commit/4d46130b53d9d8d5d3c178343a1b4fc3645b2628)) by [@copilot-swe-agent](https://github.com/apps/copilot-swe-agent)\n\n- **plugin(@hey-api/sdk)**: fix: do not use bodySerializer if format is binary ([#3190](https://github.com/hey-api/openapi-ts/pull/3190)) ([`dc28c4c`](https://github.com/hey-api/openapi-ts/commit/dc28c4c6504724104bdef01332b9e3eb52ba3333)) by [@mrlubos](https://github.com/mrlubos)\n\n### Updated Dependencies:\n\n- @hey-api/codegen-core@0.5.2\n\n## 0.90.1\n\n### Patch Changes\n\n- **plugin(@hey-api/sdk)**: add `examples` option ([#3175](https://github.com/hey-api/openapi-ts/pull/3175)) ([`b985053`](https://github.com/hey-api/openapi-ts/commit/b985053ffa64accc4ff01b7c0f301bb5cd84ff48)) by [@mrlubos](https://github.com/mrlubos)\n\nThe SDK plugin can generate ready-to-use code examples for each operation, showing how to call the SDK methods with proper parameters and setup.\n\nLearn how to generate examples on the [SDK plugin](https://heyapi.dev/openapi-ts/plugins/sdk#code-examples) page.\n\n- **output**: add `source` option ([#3175](https://github.com/hey-api/openapi-ts/pull/3175)) ([`b985053`](https://github.com/hey-api/openapi-ts/commit/b985053ffa64accc4ff01b7c0f301bb5cd84ff48)) by [@mrlubos](https://github.com/mrlubos)\n\nSource is a copy of the input specification used to generate your output. It can be used to power documentation tools or to persist a stable snapshot alongside your generated files.\n\nLearn how to use the source on the [Output](https://heyapi.dev/openapi-ts/configuration/output#source) page.\n\n### Updated Dependencies:\n\n- @hey-api/codegen-core@0.5.1\n\n## 0.90.0\n\n### Minor Changes\n\n- **plugin(valibot)**: **BREAKING:** standardize `~resolvers` API ([#3147](https://github.com/hey-api/openapi-ts/pull/3147)) ([`ab80a4b`](https://github.com/hey-api/openapi-ts/commit/ab80a4b2c37423c522aa864afbcb688db76615ba)) by [@mrlubos](https://github.com/mrlubos)\n\nThe [Resolvers API](https://heyapi.dev/openapi-ts/plugins/concepts/resolvers) has been simplified and expanded to provide a more consistent behavior across plugins. You can view a few common examples on the [Resolvers](https://heyapi.dev/openapi-ts/plugins/concepts/resolvers) page.\n\n- **plugin(sdk)**: **BREAKING**: Structure API ([#3109](https://github.com/hey-api/openapi-ts/pull/3109)) ([`815a3de`](https://github.com/hey-api/openapi-ts/commit/815a3de0af434c28ac6d13ff92b85ce1fc146999)) by [@mrlubos](https://github.com/mrlubos)\n\n### Structure API\n\nThe [SDK plugin](https://heyapi.dev/openapi-ts/plugins/sdk) now implements the Structure API, enabling more complex structures and fixing several known issues.\n\nSome Structure APIs are incompatible with the previous configuration, most notably the `methodNameBuilder` function, which accepted the operation object as an argument. You can read the [SDK Output](https://heyapi.dev/openapi-ts/plugins/sdk#output) section to familiarize yourself with the Structure API.\n\nPlease [open an issue](https://github.com/hey-api/openapi-ts/issues) if you're unable to migrate your configuration to the new syntax.\n\n- **plugin(zod)**: **BREAKING:** standardize `~resolvers` API ([#3147](https://github.com/hey-api/openapi-ts/pull/3147)) ([`ab80a4b`](https://github.com/hey-api/openapi-ts/commit/ab80a4b2c37423c522aa864afbcb688db76615ba)) by [@mrlubos](https://github.com/mrlubos)\n\nThe [Resolvers API](https://heyapi.dev/openapi-ts/plugins/concepts/resolvers) has been simplified and expanded to provide a more consistent behavior across plugins. You can view a few common examples on the [Resolvers](https://heyapi.dev/openapi-ts/plugins/concepts/resolvers) page.\n\n- **plugin(@angular/common)**: **BREAKING**: Structure API ([#3109](https://github.com/hey-api/openapi-ts/pull/3109)) ([`815a3de`](https://github.com/hey-api/openapi-ts/commit/815a3de0af434c28ac6d13ff92b85ce1fc146999)) by [@mrlubos](https://github.com/mrlubos)\n\n### Structure API\n\nThe [Angular plugin](https://heyapi.dev/openapi-ts/plugins/angular) now implements the Structure API, enabling more complex structures and fixing several known issues.\n\nSome Structure APIs are incompatible with the previous configuration, most notably the `methodNameBuilder` function, which accepted the operation object as an argument. You can read the [SDK Output](https://heyapi.dev/openapi-ts/plugins/sdk#output) section to familiarize yourself with the Structure API.\n\nPlease [open an issue](https://github.com/hey-api/openapi-ts/issues) if you're unable to migrate your configuration to the new syntax.\n\n### Patch Changes\n\n- **plugin(@hey-api/client-nuxt)**: use serialized body in SSE requests ([#3123](https://github.com/hey-api/openapi-ts/pull/3123)) ([`6505659`](https://github.com/hey-api/openapi-ts/commit/6505659a5b776d03e943582e700a718eddcc2912)) by [@bilby91](https://github.com/bilby91)\n\n- **plugin(zod)**: expand support for bigint types ([#3145](https://github.com/hey-api/openapi-ts/pull/3145)) ([`4a32dcf`](https://github.com/hey-api/openapi-ts/commit/4a32dcfae503e76db81fa21ca71c71f20ea28c34)) by [@mrlubos](https://github.com/mrlubos)\n\n- **plugin(@hey-api/client-angular)**: use serialized body in SSE requests ([#3171](https://github.com/hey-api/openapi-ts/pull/3171)) ([`e63f0cf`](https://github.com/hey-api/openapi-ts/commit/e63f0cf1018e3014c3c125189fe18ed3fa40d078)) by [@mrlubos](https://github.com/mrlubos)\n\n- **plugin(@hey-api/client-next)**: use serialized body in SSE requests ([#3171](https://github.com/hey-api/openapi-ts/pull/3171)) ([`e63f0cf`](https://github.com/hey-api/openapi-ts/commit/e63f0cf1018e3014c3c125189fe18ed3fa40d078)) by [@mrlubos](https://github.com/mrlubos)\n\n- **plugin(@hey-api/client-axios)**: use serialized body in SSE requests ([#3171](https://github.com/hey-api/openapi-ts/pull/3171)) ([`e63f0cf`](https://github.com/hey-api/openapi-ts/commit/e63f0cf1018e3014c3c125189fe18ed3fa40d078)) by [@mrlubos](https://github.com/mrlubos)\n\n- **plugin(@hey-api/client-fetch)**: use serialized body in SSE requests ([#3171](https://github.com/hey-api/openapi-ts/pull/3171)) ([`e63f0cf`](https://github.com/hey-api/openapi-ts/commit/e63f0cf1018e3014c3c125189fe18ed3fa40d078)) by [@mrlubos](https://github.com/mrlubos)\n\n- **plugin(@hey-api/client-nuxt)**: preserve null in `WithRefs` type for nullable fields ([#3131](https://github.com/hey-api/openapi-ts/pull/3131)) ([`3935034`](https://github.com/hey-api/openapi-ts/commit/39350343fe77b6a2700c2b57f03c5b838a92f09e)) by [@rigtigeEmil](https://github.com/rigtigeEmil)\n\n- **renderer**: correctly render default import ([#3109](https://github.com/hey-api/openapi-ts/pull/3109)) ([`815a3de`](https://github.com/hey-api/openapi-ts/commit/815a3de0af434c28ac6d13ff92b85ce1fc146999)) by [@mrlubos](https://github.com/mrlubos)\n\n- **plugin(@hey-api/client-ky)**: use serialized body in SSE requests ([#3171](https://github.com/hey-api/openapi-ts/pull/3171)) ([`e63f0cf`](https://github.com/hey-api/openapi-ts/commit/e63f0cf1018e3014c3c125189fe18ed3fa40d078)) by [@mrlubos](https://github.com/mrlubos)\n\n### Updated Dependencies:\n\n- @hey-api/codegen-core@0.5.0\n\n## 0.89.2\n\n### Patch Changes\n\n- **plugin(@hey-api/typescript)**: improve type narrowing in discriminated types ([#3120](https://github.com/hey-api/openapi-ts/pull/3120)) ([`6f8a43c`](https://github.com/hey-api/openapi-ts/commit/6f8a43c7ffcc8685700c3789c6339aabbac07d2b)) by [@copilot-swe-agent](https://github.com/apps/copilot-swe-agent)\n\n- **plugin(@hey-api/client-axios)**: revert use `query` option when no `paramsSerializer` is provided ([#3125](https://github.com/hey-api/openapi-ts/pull/3125)) ([`34c9a92`](https://github.com/hey-api/openapi-ts/commit/34c9a9214008ede461251f46ab750de37da96bbb)) by [@mrlubos](https://github.com/mrlubos)\n\n## 0.89.1\n\n### Patch Changes\n\n- **parser**: expose OpenAPI extension keywords ([#3119](https://github.com/hey-api/openapi-ts/pull/3119)) ([`c50190b`](https://github.com/hey-api/openapi-ts/commit/c50190b02ef2a6b77703a2dbf84b826c4432d56e)) by [@copilot-swe-agent](https://github.com/apps/copilot-swe-agent)\n\n- **plugin(@hey-api/client-axios)**: use `query` option when no `paramsSerializer` is provided ([#3062](https://github.com/hey-api/openapi-ts/pull/3062)) ([`4dcc210`](https://github.com/hey-api/openapi-ts/commit/4dcc2100b7a96799f36cc64833f7ab69f09d1c54)) by [@JanST123GS](https://github.com/JanST123GS)\n\n- **plugin(@hey-api/sdk)**: lazily initialize sub-resources to improve performance ([#3099](https://github.com/hey-api/openapi-ts/pull/3099)) ([`f481f5c`](https://github.com/hey-api/openapi-ts/commit/f481f5cb11f9a8a5e0b1a0baee367f07dd327730)) by [@mrlubos](https://github.com/mrlubos)\n\n- **output**: sanitize reserved names with underscore suffix instead of prefix ([#3102](https://github.com/hey-api/openapi-ts/pull/3102)) ([`9116082`](https://github.com/hey-api/openapi-ts/commit/91160826f3c1d0b87090395140d163d930399639)) by [@mrlubos](https://github.com/mrlubos)\n\n- **parser**: improve discriminator support in nested `allOf` fields ([#3117](https://github.com/hey-api/openapi-ts/pull/3117)) ([`ec1224d`](https://github.com/hey-api/openapi-ts/commit/ec1224d97d2a8f97d66327bdd372dc82fa794955)) by [@copilot-swe-agent](https://github.com/apps/copilot-swe-agent)\n\n- **output**: default to `.js` extension when module resolution is set to `node16` ([#3115](https://github.com/hey-api/openapi-ts/pull/3115)) ([`18d218a`](https://github.com/hey-api/openapi-ts/commit/18d218a69f7b2b1b899ad29d3f3892374edf2910)) by [@copilot-swe-agent](https://github.com/apps/copilot-swe-agent)\n\n## 0.89.0\n\n### Minor Changes\n\n- **output**: add `preferExportAll` option ([#2990](https://github.com/hey-api/openapi-ts/pull/2990)) ([`c3a81e8`](https://github.com/hey-api/openapi-ts/commit/c3a81e89ba5ed3f373409582c5f814e1d10cae06)) by [@mrlubos](https://github.com/mrlubos)\n\n### Prefer named exports\n\nThis release changes the default for `index.ts` to prefer named exports. Named exports may lead to better IDE and bundler performance compared to asterisk (`*`) as your tooling doesn't have to inspect the underlying module to discover exports.\n\nWhile this change is merely cosmetic, you can set `output.preferExportAll` to `true` if you prefer to use the asterisk.\n\n```js\nexport default {\n  input: \"hey-api/backend\", // sign up at app.heyapi.dev\n  output: {\n    path: \"src/client\",\n    preferExportAll: true,\n  },\n};\n```\n\n- **parser**: removed `symbol:setValue:*` events ([#2990](https://github.com/hey-api/openapi-ts/pull/2990)) ([`c3a81e8`](https://github.com/hey-api/openapi-ts/commit/c3a81e89ba5ed3f373409582c5f814e1d10cae06)) by [@mrlubos](https://github.com/mrlubos)\n\n### Removed `symbol:setValue:*` events\n\nThese events have been removed in favor of `node:set:*` events.\n\n### Patch Changes\n\n- **output**: add `nameConflictResolver` option ([#2990](https://github.com/hey-api/openapi-ts/pull/2990)) ([`c3a81e8`](https://github.com/hey-api/openapi-ts/commit/c3a81e89ba5ed3f373409582c5f814e1d10cae06)) by [@mrlubos](https://github.com/mrlubos)\n\n## Name Conflicts\n\nAs your project grows, the chances of name conflicts increase. We use a simple conflict resolver that appends numeric suffixes to duplicate identifiers. If you prefer a different strategy, you can provide your own `nameConflictResolver` function.\n\n```js\nexport default {\n  input: \"hey-api/backend\", // sign up at app.heyapi.dev\n  output: {\n    nameConflictResolver({ attempt, baseName }) {\n      return attempt === 0 ? baseName : `${baseName}_N${attempt + 1}`;\n    },\n    path: \"src/client\",\n  },\n};\n```\n\nExample output:\n\n```ts\nexport type ChatCompletion = string;\n\nexport type ChatCompletion_N2 = number;\n```\n\n### Updated Dependencies:\n\n- @hey-api/codegen-core@0.4.0\n\n## 0.88.2\n\n### Patch Changes\n\n- **clients**: handle CR and CRLF line endings in SSE ([#3055](https://github.com/hey-api/openapi-ts/pull/3055)) ([`d663232`](https://github.com/hey-api/openapi-ts/commit/d663232d8f10cb29744beeba073532e2f6b3b27a)) by [@nachogarcia](https://github.com/nachogarcia)\n\n## 0.88.1\n\n### Patch Changes\n\n- **@hey-api/sdk**: correctly map flat parameters ([#3047](https://github.com/hey-api/openapi-ts/pull/3047)) ([`55ef279`](https://github.com/hey-api/openapi-ts/commit/55ef27994740ba0af0bc8db17b3e71bfb5c11714)) by [@mrlubos](https://github.com/mrlubos)\n\n## 0.88.0\n\n### Minor Changes\n\n- **output**: use TypeScript DSL ([#2986](https://github.com/hey-api/openapi-ts/pull/2986)) ([`37ff4ab`](https://github.com/hey-api/openapi-ts/commit/37ff4ab6bc89463778bf3709687ab84d3dab0618)) by [@mrlubos](https://github.com/mrlubos)\n\n### Removed `compiler` and `tsc` exports\n\nThis release removes the `compiler` utility functions. Instead, it introduces a new TypeScript DSL exposed under the `$` symbol. All plugins now use this interface, so you may notice slight changes in the generated output.\n\n## 0.87.5\n\n### Patch Changes\n\n- **client-ofetch**: fix FormData boundary mismatch ([#2940](https://github.com/hey-api/openapi-ts/pull/2940)) ([`b290ec9`](https://github.com/hey-api/openapi-ts/commit/b290ec9a944c4e536d204e481d942f79ac02c5b9)) by [@copilot-swe-agent](https://github.com/apps/copilot-swe-agent)\n\n## 0.87.4\n\n### Patch Changes\n\n- **valibot**: expose validator resolvers ([#2980](https://github.com/hey-api/openapi-ts/pull/2980)) ([`6226f6f`](https://github.com/hey-api/openapi-ts/commit/6226f6fa271369b5ff06853c1f623557a2ebe837)) by [@mrlubos](https://github.com/mrlubos)\n\n- **zod**: expose validator resolvers ([#2980](https://github.com/hey-api/openapi-ts/pull/2980)) ([`6226f6f`](https://github.com/hey-api/openapi-ts/commit/6226f6fa271369b5ff06853c1f623557a2ebe837)) by [@mrlubos](https://github.com/mrlubos)\n\n## 0.87.3\n\n### Patch Changes\n\n- **valibot**: allow generating custom pipes with `~resolvers` ([#2975](https://github.com/hey-api/openapi-ts/pull/2975)) ([`62a4745`](https://github.com/hey-api/openapi-ts/commit/62a4745c2de331330480d77c9838aa9429e950d7)) by [@mrlubos](https://github.com/mrlubos)\n\n- **zod**: allow generating custom chains with `~resolvers` ([#2975](https://github.com/hey-api/openapi-ts/pull/2975)) ([`62a4745`](https://github.com/hey-api/openapi-ts/commit/62a4745c2de331330480d77c9838aa9429e950d7)) by [@mrlubos](https://github.com/mrlubos)\n\n- **@tanstack/query**: add type annotations to `queryOptions()` ([#2964](https://github.com/hey-api/openapi-ts/pull/2964)) ([`7e1b017`](https://github.com/hey-api/openapi-ts/commit/7e1b01794911b590febaf821369aae0d4d798301)) by [@NovakAnton](https://github.com/NovakAnton)\n\n- **client-fetch**: intercept AbortError ([#2970](https://github.com/hey-api/openapi-ts/pull/2970)) ([`9075309`](https://github.com/hey-api/openapi-ts/commit/90753091a72796f6c6dffb6789ef42ecc4fd4e6b)) by [@copilot-swe-agent](https://github.com/apps/copilot-swe-agent)\n\n- **@tanstack/query**: prettier mutation options ([#2972](https://github.com/hey-api/openapi-ts/pull/2972)) ([`50266bd`](https://github.com/hey-api/openapi-ts/commit/50266bdb1524aec72e1fdf5e903bad6bebded5e5)) by [@mrlubos](https://github.com/mrlubos)\n\n## 0.87.2\n\n### Patch Changes\n\n- **clients**: add support for Ky client ([#2958](https://github.com/hey-api/openapi-ts/pull/2958)) ([`212fcaf`](https://github.com/hey-api/openapi-ts/commit/212fcaf5570ce05370dac6ace6e2751eecddb2d4)) by [@SebastiaanWouters](https://github.com/SebastiaanWouters)\n\n- **parser**: merge `default` keyword with `$ref` in OpenAPI 3.1 ([#2946](https://github.com/hey-api/openapi-ts/pull/2946)) ([`15a178d`](https://github.com/hey-api/openapi-ts/commit/15a178dd6a998bf88ebd17c64de151922e94765a)) by [@copilot-swe-agent](https://github.com/apps/copilot-swe-agent)\n\n- **output**: run lint before format ([#2937](https://github.com/hey-api/openapi-ts/pull/2937)) ([`eb23ee8`](https://github.com/hey-api/openapi-ts/commit/eb23ee89fd09368385a07cd2a3885e3e5ce111e6)) by [@FloEdelmann](https://github.com/FloEdelmann)\n\n- **@pinia/colada**: correctly access instantiated SDKs ([#2942](https://github.com/hey-api/openapi-ts/pull/2942)) ([`c041e96`](https://github.com/hey-api/openapi-ts/commit/c041e962604765e0f342fda970a2550367aa2142)) by [@mrlubos](https://github.com/mrlubos)\n\n- **valibot**: use `.strictObject()` instead of `.objectWithRest()` when additional properties are not allowed ([#2945](https://github.com/hey-api/openapi-ts/pull/2945)) ([`3786d2b`](https://github.com/hey-api/openapi-ts/commit/3786d2b3b2316ddcc00b7d87f7dff15b61e29719)) by [@copilot-swe-agent](https://github.com/apps/copilot-swe-agent)\n\n- **@tanstack/query**: prettier query options ([#2947](https://github.com/hey-api/openapi-ts/pull/2947)) ([`0b79b89`](https://github.com/hey-api/openapi-ts/commit/0b79b894bd263b2d28cbbb59dfab3aed4ba6736d)) by [@mrlubos](https://github.com/mrlubos)\n\n## 0.87.1\n\n### Patch Changes\n\n- fix(typescript): remove legacy options ([#2929](https://github.com/hey-api/openapi-ts/pull/2929)) ([`97c1f0e`](https://github.com/hey-api/openapi-ts/commit/97c1f0e94f8eb8ca2d74f4f5ebe51a53f347641b)) by [@mrlubos](https://github.com/mrlubos)\n\n- fix(tanstack-query): correctly access instantiated SDKs ([#2939](https://github.com/hey-api/openapi-ts/pull/2939)) ([`01a1fb4`](https://github.com/hey-api/openapi-ts/commit/01a1fb48a2e2d4e14a33cf3e81b44b5fad76e72a)) by [@mrlubos](https://github.com/mrlubos)\n\n## 0.87.0\n\n### Minor Changes\n\n- feat: remove legacy clients and plugins ([#2925](https://github.com/hey-api/openapi-ts/pull/2925)) ([`c9fb65d`](https://github.com/hey-api/openapi-ts/commit/c9fb65d2f5757f389383f8b9007baf6a5e26f45a)) by [@mrlubos](https://github.com/mrlubos)\n\n### Removed legacy clients\n\nThis release removes support for legacy clients and plugins. Please migrate to the new clients if you haven't done so yet. If you're unable to do so due to a missing feature, let us know on [GitHub](https://github.com/hey-api/openapi-ts/issues).\n\n## 0.86.12\n\n### Patch Changes\n\n- fix(transformers): do not reference undefined transformers ([#2924](https://github.com/hey-api/openapi-ts/pull/2924)) ([`b3f4f91`](https://github.com/hey-api/openapi-ts/commit/b3f4f91bbf6ac1db504b7605a73c986b37003880)) by [@mrlubos](https://github.com/mrlubos)\n\n- fix(sdk): add `paramsStructure` option ([#2909](https://github.com/hey-api/openapi-ts/pull/2909)) ([`d9dd389`](https://github.com/hey-api/openapi-ts/commit/d9dd38927ce5c7901ce46bfe439454935b2053fa)) by [@mrlubos](https://github.com/mrlubos)\n\n- fix(sdk): handle conflicts between method names and subclasses in class-based SDKs ([#2920](https://github.com/hey-api/openapi-ts/pull/2920)) ([`48c7fa3`](https://github.com/hey-api/openapi-ts/commit/48c7fa3db65ef1ee146b6e09e53ae500483d4b22)) by [@mrlubos](https://github.com/mrlubos)\n\n- fix: bundled context types ([#2923](https://github.com/hey-api/openapi-ts/pull/2923)) ([`f5a91c4`](https://github.com/hey-api/openapi-ts/commit/f5a91c4e068f64987d8138fadb0e969f1e28081f)) by [@mrlubos](https://github.com/mrlubos)\n\n### Updated Dependencies:\n\n- @hey-api/codegen-core@0.3.3\n\n## 0.86.11\n\n### Patch Changes\n\n- fix(types): use unique generic names in `PluginInstance` to avoid typing issues ([#2897](https://github.com/hey-api/openapi-ts/pull/2897)) ([`a625980`](https://github.com/hey-api/openapi-ts/commit/a625980e7bbcba1f4bb91aecae9546ff51942964)) by [@copilot-swe-agent](https://github.com/apps/copilot-swe-agent)\n\n## 0.86.10\n\n### Patch Changes\n\n- fix(parser): handle OpenAPI 2.0 body as JSON by default if not explicitly defined ([#2893](https://github.com/hey-api/openapi-ts/pull/2893)) ([`767ad18`](https://github.com/hey-api/openapi-ts/commit/767ad185d5a2bb5a7344ca1c297e8d2b1c16d638)) by [@copilot-swe-agent](https://github.com/apps/copilot-swe-agent)\n\n## 0.86.9\n\n### Patch Changes\n\n- fix(valibot): handle `time` string format ([#2889](https://github.com/hey-api/openapi-ts/pull/2889)) ([`0db5a43`](https://github.com/hey-api/openapi-ts/commit/0db5a43b868511784cdffabbec8ea234c7841d19)) by [@copilot-swe-agent](https://github.com/apps/copilot-swe-agent)\n\n- refactor: replace plugin references with queries ([#2873](https://github.com/hey-api/openapi-ts/pull/2873)) ([`1cfc8f2`](https://github.com/hey-api/openapi-ts/commit/1cfc8f2b4673b53e0b1fff43f3d2078dcd595ca2)) by [@mrlubos](https://github.com/mrlubos)\n\n- fix: gracefully handle errors in debug reports ([#2884](https://github.com/hey-api/openapi-ts/pull/2884)) ([`d5c0a1c`](https://github.com/hey-api/openapi-ts/commit/d5c0a1c03edd3cefcd9438cee59d538cf87e9d3f)) by [@copilot-swe-agent](https://github.com/apps/copilot-swe-agent)\n\n### Updated Dependencies:\n\n- @hey-api/codegen-core@0.3.2\n\n## 0.86.8\n\n### Patch Changes\n\n- fix(valibot): improve handling of additionalProperties type ([#2870](https://github.com/hey-api/openapi-ts/pull/2870)) ([`da88dd9`](https://github.com/hey-api/openapi-ts/commit/da88dd9962ff3a619f3d4853d641acc3637406f4)) by [@copilot-swe-agent](https://github.com/apps/copilot-swe-agent)\n\n## 0.86.7\n\n### Patch Changes\n\n- fix(types): export Operation type ([#2862](https://github.com/hey-api/openapi-ts/pull/2862)) ([`857c464`](https://github.com/hey-api/openapi-ts/commit/857c464ac04832c3bf26f33af3c1c90ccf67fda1)) by [@copilot-swe-agent](https://github.com/apps/copilot-swe-agent)\n\n## 0.86.6\n\n### Patch Changes\n\n- fix(transformers): revert function order to fix infinite cycle regression ([#2855](https://github.com/hey-api/openapi-ts/pull/2855)) ([`81f91a9`](https://github.com/hey-api/openapi-ts/commit/81f91a97e8e50427b45f21c80f72fdff7ce1deca)) by [@copilot-swe-agent](https://github.com/apps/copilot-swe-agent)\n\n## 0.86.5\n\n### Patch Changes\n\n- fix(parser): write-only schema incorrectly used in response schemas ([#2850](https://github.com/hey-api/openapi-ts/pull/2850)) ([`16cc0e7`](https://github.com/hey-api/openapi-ts/commit/16cc0e7d50993e36dab6349eda1361421bdf44ac)) by [@copilot-swe-agent](https://github.com/apps/copilot-swe-agent)\n\n- fix(cli): move cli script to typescript ([#2852](https://github.com/hey-api/openapi-ts/pull/2852)) ([`b677f89`](https://github.com/hey-api/openapi-ts/commit/b677f893f9dc1848bb54164e736a90e617d1269d)) by [@mrlubos](https://github.com/mrlubos)\n\n## 0.86.4\n\n### Patch Changes\n\n- feat(parser): pass tags to symbol meta ([#2845](https://github.com/hey-api/openapi-ts/pull/2845)) ([`e157288`](https://github.com/hey-api/openapi-ts/commit/e1572888aec1e95d23eb0124fb9a5f3383e89def)) by [@mrlubos](https://github.com/mrlubos)\n\n- feat(clients): granular query parameter serialization strategy ([#2837](https://github.com/hey-api/openapi-ts/pull/2837)) ([`e0e6ab3`](https://github.com/hey-api/openapi-ts/commit/e0e6ab37888ac9eb88fa9f0d45e0a9123f9f1158)) by [@pixelmord](https://github.com/pixelmord)\n\n## 0.86.3\n\n### Patch Changes\n\n- feat(parser): add `events` hooks ([#2829](https://github.com/hey-api/openapi-ts/pull/2829)) ([`d5c85fc`](https://github.com/hey-api/openapi-ts/commit/d5c85fc29e985af0cdc6ce7ac7e8210c60171163)) by [@mrlubos](https://github.com/mrlubos)\n\n- fix(parser): writeOnly schema properties missing from request types in nested schemas ([#2793](https://github.com/hey-api/openapi-ts/pull/2793)) ([`7d1c475`](https://github.com/hey-api/openapi-ts/commit/7d1c47592a806c34fb627f21e3ee59e2ec3c015a)) by [@copilot-swe-agent](https://github.com/apps/copilot-swe-agent)\n\n## 0.86.2\n\n### Patch Changes\n\n- fix(validators): do not reference variables before they are declared ([#2812](https://github.com/hey-api/openapi-ts/pull/2812)) ([`69783d1`](https://github.com/hey-api/openapi-ts/commit/69783d19be37014b5116a2ede5bb74adadbb8110)) by [@mrlubos](https://github.com/mrlubos)\n\n- fix(renderer): allow duplicate names when one symbol is a type ([#2812](https://github.com/hey-api/openapi-ts/pull/2812)) ([`523038e`](https://github.com/hey-api/openapi-ts/commit/523038e82c949a436a467486a26333d50ce0e7cd)) by [@mrlubos](https://github.com/mrlubos)\n\n### Updated Dependencies:\n\n- @hey-api/codegen-core@0.3.1\n\n## 0.86.1\n\n### Patch Changes\n\n- fix(client-axios): revert return error when axios request fails ([#2804](https://github.com/hey-api/openapi-ts/pull/2804)) ([`5bba86e`](https://github.com/hey-api/openapi-ts/commit/5bba86e742c48f575f96f55f7d7ea3d636102ebe)) by [@mrlubos](https://github.com/mrlubos)\n\n## 0.86.0\n\n### Minor Changes\n\n- feat: bump minimum Node version to 20.19.0 ([#2775](https://github.com/hey-api/openapi-ts/pull/2775)) ([`7c7702a`](https://github.com/hey-api/openapi-ts/commit/7c7702a9ed3bda0d75ef28d35d4284e3b6318b26)) by [@mrlubos](https://github.com/mrlubos)\n\n### Patch Changes\n\n- fix: do not print error details if logs are set to silent ([#2776](https://github.com/hey-api/openapi-ts/pull/2776)) ([`2274344`](https://github.com/hey-api/openapi-ts/commit/227434440bc2d00f9336041d3b083fc9374f3639)) by [@mrlubos](https://github.com/mrlubos)\n\n- fix(client-axios): return error when axios request fails ([#2763](https://github.com/hey-api/openapi-ts/pull/2763)) ([`122a292`](https://github.com/hey-api/openapi-ts/commit/122a292e3a0293098e5c5e222e5dcf8e99639ba8)) by [@mauriciabad](https://github.com/mauriciabad)\n\n### Updated Dependencies:\n\n- @hey-api/codegen-core@0.3.0\n\n## 0.85.2\n\n### Patch Changes\n\n- fix: dynamically load c12 to work with cjs modules ([#2755](https://github.com/hey-api/openapi-ts/pull/2755)) ([`e6472cf`](https://github.com/hey-api/openapi-ts/commit/e6472cf7f69db5ff2cb2f509c1d61e5c4438871e)) by [@mrlubos](https://github.com/mrlubos)\n\n- fix(cli): detect watch mode with input array ([#2751](https://github.com/hey-api/openapi-ts/pull/2751)) ([`3293cad`](https://github.com/hey-api/openapi-ts/commit/3293cada4f089107ac183fbcd03550541d95073a)) by [@warrenseine](https://github.com/warrenseine)\n\n## 0.85.1\n\n### Patch Changes\n\n- fix(zod): allOf in array items being generated as union instead of intersection ([#2736](https://github.com/hey-api/openapi-ts/pull/2736)) ([`078face`](https://github.com/hey-api/openapi-ts/commit/078face47b40462033ce557ce0048ccf88246854)) by [@copilot-swe-agent](https://github.com/apps/copilot-swe-agent)\n\n## 0.85.0\n\n### Minor Changes\n\n- refactor(config): replace 'off' with null to disable options ([#2718](https://github.com/hey-api/openapi-ts/pull/2718)) ([`fcdd73b`](https://github.com/hey-api/openapi-ts/commit/fcdd73b816d74babf47e6a1f46032f5b8ebb4b48)) by [@mrlubos](https://github.com/mrlubos)\n\n### Updated `output` options\n\nWe made the `output` configuration more consistent by using `null` to represent disabled options. [This change](https://heyapi.dev/openapi-ts/migrating#updated-output-options) does not affect boolean options.\n\n```js\nexport default {\n  input: \"hey-api/backend\", // sign up at app.heyapi.dev\n  output: {\n    format: null,\n    lint: null,\n    path: \"src/client\",\n    tsConfigPath: null,\n  },\n};\n```\n\n### Patch Changes\n\n- feat: support multiple configurations ([#2602](https://github.com/hey-api/openapi-ts/pull/2602)) ([`c84f10e`](https://github.com/hey-api/openapi-ts/commit/c84f10e5a1b7c54320e3ef5edfc9d2fffe5183e9)) by [@carson2222](https://github.com/carson2222)\n\n- feat(config): add `output.importFileExtension` option ([#2718](https://github.com/hey-api/openapi-ts/pull/2718)) ([`fcdd73b`](https://github.com/hey-api/openapi-ts/commit/fcdd73b816d74babf47e6a1f46032f5b8ebb4b48)) by [@mrlubos](https://github.com/mrlubos)\n\n- feat(pinia-colada): query options use `defineQueryOptions` ([#2610](https://github.com/hey-api/openapi-ts/pull/2610)) ([`33e6b31`](https://github.com/hey-api/openapi-ts/commit/33e6b31fa2ab840dd4e6e2e3e0fbc6e207ccdf7e)) by [@brolnickij](https://github.com/brolnickij)\n\n### Updated Pinia Colada query options\n\nPinia Colada query options now use `defineQueryOptions` to improve reactivity support. Instead of calling the query options function, you can use one of the [following approaches](https://heyapi.dev/openapi-ts/migrating#updated-pinia-colada-query-options).\n\n#### No params\n\n```ts\nuseQuery(getPetsQuery);\n```\n\n#### Constant\n\n```ts\nuseQuery(getPetByIdQuery, () => ({\n  path: {\n    petId: 1,\n  },\n}));\n```\n\n#### Reactive\n\n```ts\nconst petId = ref<number | null>(1);\n\nuseQuery(getPetByIdQuery, () => ({\n  path: {\n    petId: petId.value,\n  },\n}));\n```\n\n#### Properties\n\n```ts\nconst petId = ref<number | null>(1);\n\nuseQuery(() => ({\n  ...getPetByIdQuery({\n    path: { petId: petId.value as number },\n  }),\n  enabled: () => petId.value != null,\n}));\n```\n\n## 0.84.4\n\n### Patch Changes\n\n- fix(client-ofetch): add missing credentials property support ([#2710](https://github.com/hey-api/openapi-ts/pull/2710)) ([`ba7e6dc`](https://github.com/hey-api/openapi-ts/commit/ba7e6dc1af3a8e64082bd101de6c1cd6e0e8fc17)) by [@copilot-swe-agent](https://github.com/apps/copilot-swe-agent)\n\n- fix(config): do not override interactive config from CLI if defined in config file ([#2708](https://github.com/hey-api/openapi-ts/pull/2708)) ([`21e9fa0`](https://github.com/hey-api/openapi-ts/commit/21e9fa089d2305714f37c1a16cb3e6f9fedb49b9)) by [@copilot-swe-agent](https://github.com/apps/copilot-swe-agent)\n\n- fix(zod): correct schemas for numeric and boolean enums ([#2704](https://github.com/hey-api/openapi-ts/pull/2704)) ([`59ea38e`](https://github.com/hey-api/openapi-ts/commit/59ea38ea9e47b515c54e55d169591fe6188990b4)) by [@copilot-swe-agent](https://github.com/apps/copilot-swe-agent)\n\n## 0.84.3\n\n### Patch Changes\n\n- fix(validators): escaping slashes in regular expressions ([#2692](https://github.com/hey-api/openapi-ts/pull/2692)) ([`dba81bc`](https://github.com/hey-api/openapi-ts/commit/dba81bc23a7cb72696cd1fcf4fe1a17f00027fae)) by [@copilot-swe-agent](https://github.com/apps/copilot-swe-agent)\n\n## 0.84.2\n\n### Patch Changes\n\n- fix(parser): add `propertiesRequiredByDefault` transform option ([#2678](https://github.com/hey-api/openapi-ts/pull/2678)) ([`9e59e07`](https://github.com/hey-api/openapi-ts/commit/9e59e07efa2bafec88e0af2935edac323b4e41dd)) by [@mrlubos](https://github.com/mrlubos)\n\n- fix(typescript): do not mark enums as types ([#2680](https://github.com/hey-api/openapi-ts/pull/2680)) ([`1cab011`](https://github.com/hey-api/openapi-ts/commit/1cab0115afa3a201acb4911dd552c1d5dd9ba9ac)) by [@copilot-swe-agent](https://github.com/apps/copilot-swe-agent)\n\n## 0.84.1\n\n### Patch Changes\n\n- feat: add `ofetch` client available as `@hey-api/client-ofetch` ([#2642](https://github.com/hey-api/openapi-ts/pull/2642)) ([`da9e05f`](https://github.com/hey-api/openapi-ts/commit/da9e05f38f8952aaf2868094c2c0bc32c402d55e)) by [@brolnickij](https://github.com/brolnickij)\n\n- fix(renderer): replace default import placeholder ([#2674](https://github.com/hey-api/openapi-ts/pull/2674)) ([`762b20e`](https://github.com/hey-api/openapi-ts/commit/762b20e6c8b90d7011ce24a193a66b18e4f74136)) by [@copilot-swe-agent](https://github.com/apps/copilot-swe-agent)\n\n## 0.84.0\n\n### Minor Changes\n\n- feat: Symbol API\n\n### Symbol API\n\nThis release improves the Symbol API, which adds the capability to place symbols in arbitrary files. We preserved the previous output structure for all plugins except Angular.\n\nYou can preserve the previous Angular output by writing your own [placement function](https://heyapi.dev/openapi-ts/configuration/parser#hooks-symbols).\n\n### Removed `output` plugin option\n\nDue to the Symbol API release, this option has been removed from the Plugin API. ([#2664](https://github.com/hey-api/openapi-ts/pull/2664)) ([`e1ede9c`](https://github.com/hey-api/openapi-ts/commit/e1ede9cabf52b5bbcb9195570deff58db8f43dbb)) by [@mrlubos](https://github.com/mrlubos)\n\n### Patch Changes\n\n- fix(plugin): every plugin extends Plugin.Hooks interface ([#2664](https://github.com/hey-api/openapi-ts/pull/2664)) ([`e1ede9c`](https://github.com/hey-api/openapi-ts/commit/e1ede9cabf52b5bbcb9195570deff58db8f43dbb)) by [@mrlubos](https://github.com/mrlubos)\n\n- fix(renderer): group and sort imported modules\n\n### TypeScript renderer\n\nWe ship a dedicated TypeScript renderer for `.ts` files. This release improves the renderer's ability to group and sort imported modules, resulting in a more polished output. ([#2664](https://github.com/hey-api/openapi-ts/pull/2664)) ([`e1ede9c`](https://github.com/hey-api/openapi-ts/commit/e1ede9cabf52b5bbcb9195570deff58db8f43dbb)) by [@mrlubos](https://github.com/mrlubos)\n\n- fix(parser): expand schema deduplication by including validation constraints in type ID ([#2650](https://github.com/hey-api/openapi-ts/pull/2650)) ([`31b3933`](https://github.com/hey-api/openapi-ts/commit/31b3933b2caa1085dbead1ef94695bca4b83d6ac)) by [@copilot-swe-agent](https://github.com/apps/copilot-swe-agent)\n\n- fix(parser): bump support for OpenAPI 3.1.2 ([#2667](https://github.com/hey-api/openapi-ts/pull/2667)) ([`3511fb8`](https://github.com/hey-api/openapi-ts/commit/3511fb88cbe6b767b631af16336cb6c0722c3ff8)) by [@mrlubos](https://github.com/mrlubos)\n\n- fix(config): add `output.fileName` option ([#2664](https://github.com/hey-api/openapi-ts/pull/2664)) ([`e1ede9c`](https://github.com/hey-api/openapi-ts/commit/e1ede9cabf52b5bbcb9195570deff58db8f43dbb)) by [@mrlubos](https://github.com/mrlubos)\n\n## File Name\n\nYou can customize the naming and casing pattern for files using the `fileName` option.\n\n```js\nexport default {\n  input: \"hey-api/backend\", // sign up at app.heyapi.dev\n  output: {\n    fileName: \"{{name}}\",\n    path: \"src/client\",\n  },\n};\n```\n\nBy default, we append every file name with a `.gen` suffix to highlight it's automatically generated. You can customize or disable this suffix using the `fileName.suffix` option.\n\n```js\nexport default {\n  input: \"hey-api/backend\", // sign up at app.heyapi.dev\n  output: {\n    fileName: {\n      suffix: \".gen\",\n    },\n    path: \"src/client\",\n  },\n};\n```\n\n- fix(axios): remove duplicate `baseURL` when using relative values ([#2624](https://github.com/hey-api/openapi-ts/pull/2624)) ([`8ffceec`](https://github.com/hey-api/openapi-ts/commit/8ffceec89fe471d4e14df17a172f3d5a254eb819)) by [@Ben-Pfirsich](https://github.com/Ben-Pfirsich)\n\n### Updated Dependencies:\n\n- @hey-api/codegen-core@0.2.0\n\n## 0.83.1\n\n### Patch Changes\n\n- feat(typescript): add `topType` option allowing to choose `any` over `unknown` ([#2629](https://github.com/hey-api/openapi-ts/pull/2629)) ([`444a49a`](https://github.com/hey-api/openapi-ts/commit/444a49a3f0855575c3ef1a3350fd102d42553f3e)) by [@mrlubos](https://github.com/mrlubos)\n\n- fix(client): expose all interceptor methods ([#2627](https://github.com/hey-api/openapi-ts/pull/2627)) ([`5a74da0`](https://github.com/hey-api/openapi-ts/commit/5a74da055e835b5160cb11e3d2be6921feeb18ad)) by [@mrlubos](https://github.com/mrlubos)\n\n- fix(config): correctly load user-defined hooks ([#2623](https://github.com/hey-api/openapi-ts/pull/2623)) ([`1193c4d`](https://github.com/hey-api/openapi-ts/commit/1193c4dce77e0cb02c32b25661f22065a18bd095)) by [@mrlubos](https://github.com/mrlubos)\n\n- fix(typescript): handle string and binary string in composite keywords ([#2630](https://github.com/hey-api/openapi-ts/pull/2630)) ([`43a0661`](https://github.com/hey-api/openapi-ts/commit/43a06617448344448375e0c13a156cb91666f3e9)) by [@mrlubos](https://github.com/mrlubos)\n\n## 0.83.0\n\n### Minor Changes\n\n- feat: Symbol API\n\n### Symbol API\n\nThis release adds the Symbol API, which significantly reduces the risk of naming collisions. While the generated output should only include formatting changes, this feature introduces breaking changes to the Plugin API that affect custom plugins.\n\nWe will update the [custom plugin guide](https://heyapi.dev/openapi-ts/plugins/custom) once the Plugin API becomes more stable. ([#2582](https://github.com/hey-api/openapi-ts/pull/2582)) ([`10aea89`](https://github.com/hey-api/openapi-ts/commit/10aea8910771ff72ef9b08d4eacdd6b028833c4c)) by [@mrlubos](https://github.com/mrlubos)\n\n- feat(pinia-colada): remove `groupByTag` option\n\n### Removed `groupByTag` Pinia Colada option\n\nThis option has been removed to provide a more consistent API across plugins. We plan to bring it back in a future release. ([#2582](https://github.com/hey-api/openapi-ts/pull/2582)) ([`10aea89`](https://github.com/hey-api/openapi-ts/commit/10aea8910771ff72ef9b08d4eacdd6b028833c4c)) by [@mrlubos](https://github.com/mrlubos)\n\n### Patch Changes\n\n### Updated Dependencies:\n\n- @hey-api/codegen-core@0.1.0\n\n## 0.82.5\n\n### Patch Changes\n\n- fix(client): `mergeHeaders` functions use `.forEach()` instead of `.entries()` ([#2585](https://github.com/hey-api/openapi-ts/pull/2585)) ([`debba72`](https://github.com/hey-api/openapi-ts/commit/debba72348e450f8dc884223681f10e80da77545)) by [@volesen](https://github.com/volesen)\n\n- fix(client): move `getValidRequestBody()` function to `client-core` ([#2605](https://github.com/hey-api/openapi-ts/pull/2605)) ([`b180e4e`](https://github.com/hey-api/openapi-ts/commit/b180e4e105d1d8008e4c92d79857d592080feac7)) by [@franworks](https://github.com/franworks)\n\n## 0.82.4\n\n### Patch Changes\n\n- fix(client): improve handling of plain text, falsy, and unserialized request bodies ([#2564](https://github.com/hey-api/openapi-ts/pull/2564)) ([`074a459`](https://github.com/hey-api/openapi-ts/commit/074a4598c050036b161a9e04a4b5acae98d97b82)) by [@franworks](https://github.com/franworks)\n\n- feat(pinia-colada): implicit `$fetch` for `client-nuxt` (hide `composable`) ([#2598](https://github.com/hey-api/openapi-ts/pull/2598)) ([`7143078`](https://github.com/hey-api/openapi-ts/commit/7143078fde06b5b2fe00e7a7045317a2f5b40bb7)) by [@brolnickij](https://github.com/brolnickij)\n\n- fix(pinia-colada): optional `options` in mutation factory ([#2593](https://github.com/hey-api/openapi-ts/pull/2593)) ([`4137445`](https://github.com/hey-api/openapi-ts/commit/413744572f403f605c0ba6a69f3614da69fc6f15)) by [@brolnickij](https://github.com/brolnickij)\n\n- fix(parser): improve $ref handling ([#2588](https://github.com/hey-api/openapi-ts/pull/2588)) ([`c97e7a8`](https://github.com/hey-api/openapi-ts/commit/c97e7a8c8b1d24747356feb9a15840c296a9c1c8)) by [@carson2222](https://github.com/carson2222)\n\n## 0.82.3\n\n### Patch Changes\n\n- fix(angular): allow `httpResource` to skip requests when `undefined` is returned ([#2572](https://github.com/hey-api/openapi-ts/pull/2572)) ([`ee35b33`](https://github.com/hey-api/openapi-ts/commit/ee35b337909c2dfa76b8aa915d4b6e185deafa2b)) by [@max-scopp](https://github.com/max-scopp)\n\n## 0.82.2\n\n### Patch Changes\n\n- fix: update peer dependencies to be more permissible ([#2574](https://github.com/hey-api/openapi-ts/pull/2574)) ([`996021e`](https://github.com/hey-api/openapi-ts/commit/996021e4ce306ce762dfd55f2a7ec8099be4f24c)) by [@mrlubos](https://github.com/mrlubos)\n\n### Updated Dependencies:\n\n- @hey-api/codegen-core@0.0.1\n\n## 0.82.1\n\n### Patch Changes\n\n- [#2541](https://github.com/hey-api/openapi-ts/pull/2541) [`ad3c633`](https://github.com/hey-api/openapi-ts/commit/ad3c633b21d241ba72f27828870c354bfc00bd7e) Thanks [@ixnas](https://github.com/ixnas)! - feat(typescript): add `typescript-const` to `enums.mode` for generating TypeScript enums as constants\n\n- [#2556](https://github.com/hey-api/openapi-ts/pull/2556) [`74c16f2`](https://github.com/hey-api/openapi-ts/commit/74c16f219706d22aebbc166e8bbb95412a2a5b6f) Thanks [@carson2222](https://github.com/carson2222)! - fix(parser): prune `required` array after removing properties\n\n- [#2559](https://github.com/hey-api/openapi-ts/pull/2559) [`5012a72`](https://github.com/hey-api/openapi-ts/commit/5012a721e7b7064910e5e4056cb4adf3ae63f19b) Thanks [@jgoz](https://github.com/jgoz)! - fix(output): avoid appending `.gen` to file names multiple times when `output.clean` is `false`\n\n## 0.82.0\n\n### Minor Changes\n\n- [#2505](https://github.com/hey-api/openapi-ts/pull/2505) [`97c57f6`](https://github.com/hey-api/openapi-ts/commit/97c57f68af1f907f278707fb526289c73b33ea89) Thanks [@SebastiaanWouters](https://github.com/SebastiaanWouters)! - feat(parser): add Hooks API\n\n### Added Hooks API\n\nThis release adds the [Hooks API](https://heyapi.dev/openapi-ts/configuration/parser#hooks), giving you granular control over which operations generate queries and mutations. As a result, we tightened the previous behavior and POST operations no longer generate queries by default. To preserve the old behavior, add a custom matcher.\n\n```js\nexport default {\n  input: \"hey-api/backend\", // sign up at app.heyapi.dev\n  output: \"src/client\",\n  parser: {\n    hooks: {\n      operations: {\n        isQuery: (op) => (op.method === \"post\" ? true : undefined),\n      },\n    },\n  },\n};\n```\n\n### Patch Changes\n\n- [#2542](https://github.com/hey-api/openapi-ts/pull/2542) [`c12f7c7`](https://github.com/hey-api/openapi-ts/commit/c12f7c71287ced429db4036678b254a967da3dea) Thanks [@mrlubos](https://github.com/mrlubos)! - fix(client): pass fetch option to sse client\n\n- [#2505](https://github.com/hey-api/openapi-ts/pull/2505) [`80dc015`](https://github.com/hey-api/openapi-ts/commit/80dc01515d67bd335427af3dc9be0d49a417b9e3) Thanks [@SebastiaanWouters](https://github.com/SebastiaanWouters)! - feat(plugin): add `@pinia/colada` plugin\n\n- [#2535](https://github.com/hey-api/openapi-ts/pull/2535) [`efdeedc`](https://github.com/hey-api/openapi-ts/commit/efdeedce6765e6b4d3c2e288b0473c1ced6c487f) Thanks [@alexedme](https://github.com/alexedme)! - feat(client): added angular, axios, fetch, next & nuxt client type export for external typing purposes.\n\n- [#2544](https://github.com/hey-api/openapi-ts/pull/2544) [`d4cd30e`](https://github.com/hey-api/openapi-ts/commit/d4cd30e3486fef6c459d4c04d3ca3f7ac19f8d83) Thanks [@carson2222](https://github.com/carson2222)! - fix(parser): improve handling multiple references to shared external variable\n\n- [#2519](https://github.com/hey-api/openapi-ts/pull/2519) [`95f00fa`](https://github.com/hey-api/openapi-ts/commit/95f00fa28a4c56f8f614649f8b4fd73a08f8b81f) Thanks [@volesen](https://github.com/volesen)! - fix(client): improve empty response body handling\n\n- [#1680](https://github.com/hey-api/openapi-ts/pull/1680) [`9e4cc3d`](https://github.com/hey-api/openapi-ts/commit/9e4cc3df784999ead1691848a4db0b7238e45809) Thanks [@josh-hemphill](https://github.com/josh-hemphill)! - feat(plugin): add `@pinia/colada` plugin\n\n- [#2530](https://github.com/hey-api/openapi-ts/pull/2530) [`8d1cfc4`](https://github.com/hey-api/openapi-ts/commit/8d1cfc4e415239266760498ea126c465c53f588c) Thanks [@carson2222](https://github.com/carson2222)! - fix(parser): improve `readWrite` transformer splitting logic\n\n- [#2523](https://github.com/hey-api/openapi-ts/pull/2523) [`7f6de44`](https://github.com/hey-api/openapi-ts/commit/7f6de44be7f445425c70c82833bc0442db2fcbcd) Thanks [@carson2222](https://github.com/carson2222)! - fix(parser): handle `patternProperties` in OpenAPI 3.1\n\n## 0.81.1\n\n### Patch Changes\n\n- [#2516](https://github.com/hey-api/openapi-ts/pull/2516) [`c71d5db`](https://github.com/hey-api/openapi-ts/commit/c71d5dbfc5888f03ab06a7c763ada42c1af6c096) Thanks [@mrlubos](https://github.com/mrlubos)! - feat(typescript): add webhooks configuration options\n\n- [#2515](https://github.com/hey-api/openapi-ts/pull/2515) [`b81051e`](https://github.com/hey-api/openapi-ts/commit/b81051e27945e330c0a7c157aff49029bcd6dfda) Thanks [@malcolm-kee](https://github.com/malcolm-kee)! - fix(parser): correctly handle schema extending discriminated schema\n\n- [#2513](https://github.com/hey-api/openapi-ts/pull/2513) [`34fa59f`](https://github.com/hey-api/openapi-ts/commit/34fa59fe2f0e6b4ba6578f25a6e64f964c04155c) Thanks [@mrlubos](https://github.com/mrlubos)! - fix(client): move sse functions into their own namespace\n\n- [#2516](https://github.com/hey-api/openapi-ts/pull/2516) [`c71d5db`](https://github.com/hey-api/openapi-ts/commit/c71d5dbfc5888f03ab06a7c763ada42c1af6c096) Thanks [@mrlubos](https://github.com/mrlubos)! - feat(validator): add webhooks configuration options\n\n- [#2516](https://github.com/hey-api/openapi-ts/pull/2516) [`c71d5db`](https://github.com/hey-api/openapi-ts/commit/c71d5dbfc5888f03ab06a7c763ada42c1af6c096) Thanks [@mrlubos](https://github.com/mrlubos)! - feat(parser): handle webhooks in OpenAPI 3.1\n\n## 0.81.0\n\n### Minor Changes\n\n- [#2510](https://github.com/hey-api/openapi-ts/pull/2510) [`d43ef3f`](https://github.com/hey-api/openapi-ts/commit/d43ef3f3bb47bad3f4fafbcf7be86b328543f440) Thanks [@mrlubos](https://github.com/mrlubos)! - feat(client): add support for server-sent events (SSE)\n\n## 0.80.18\n\n### Patch Changes\n\n- [#2502](https://github.com/hey-api/openapi-ts/pull/2502) [`ac7efbf`](https://github.com/hey-api/openapi-ts/commit/ac7efbfd96e7a5e530e91655df6ac481c9a5eaa5) Thanks [@malcolm-kee](https://github.com/malcolm-kee)! - fix(parser): OpenAPI 3.1 parser handles multiple `type` values\n\n## 0.80.17\n\n### Patch Changes\n\n- [#2500](https://github.com/hey-api/openapi-ts/pull/2500) [`98d7bc3`](https://github.com/hey-api/openapi-ts/commit/98d7bc37387e16c6f38194a111d6df384eee3a82) Thanks [@max-scopp](https://github.com/max-scopp)! - fix(client): Angular client correctly applies default GET method\n\n## 0.80.16\n\n### Patch Changes\n\n- [#2490](https://github.com/hey-api/openapi-ts/pull/2490) [`03f37ea`](https://github.com/hey-api/openapi-ts/commit/03f37ea9481a28c7c05dba5f0fddfc2bc225e6a0) Thanks [@mrlubos](https://github.com/mrlubos)! - fix(client): Nuxt client receives raw body in request validators\n\n- [#2479](https://github.com/hey-api/openapi-ts/pull/2479) [`4038e1c`](https://github.com/hey-api/openapi-ts/commit/4038e1cef96c031acde97ccf82176a0fedbb3f8c) Thanks [@dracomithril](https://github.com/dracomithril)! - fix(parser): deduplicate security schemas based on name\n\n- [#2489](https://github.com/hey-api/openapi-ts/pull/2489) [`9bfbb63`](https://github.com/hey-api/openapi-ts/commit/9bfbb63bff087da4cffc76603f8c9f45f34f430a) Thanks [@mrlubos](https://github.com/mrlubos)! - feat(parser): input supports Hey API Registry shorthand\n\n- [#2485](https://github.com/hey-api/openapi-ts/pull/2485) [`e074a36`](https://github.com/hey-api/openapi-ts/commit/e074a3600701badc7f220b283a55188dc85a5572) Thanks [@bombillazo](https://github.com/bombillazo)! - feat(parser): input supports ReadMe API Registry with `readme:` prefix\n\n- [#2491](https://github.com/hey-api/openapi-ts/pull/2491) [`ce602fe`](https://github.com/hey-api/openapi-ts/commit/ce602fede185ba622398bdd42e38d3f78323c32c) Thanks [@mrlubos](https://github.com/mrlubos)! - feat(parser): input supports Scalar API Registry with `scalar:` prefix\n\n## 0.80.15\n\n### Patch Changes\n\n- [#2480](https://github.com/hey-api/openapi-ts/pull/2480) [`d9af1bb`](https://github.com/hey-api/openapi-ts/commit/d9af1bb3d1abb4c8caa4f8fd6a3fcef50d2187d9) Thanks [@dracomithril](https://github.com/dracomithril)! - fix(client): call `auth()` function for every unique security `name`\n\n- [#2481](https://github.com/hey-api/openapi-ts/pull/2481) [`7e8264e`](https://github.com/hey-api/openapi-ts/commit/7e8264eae199f4ce52f1666937bca838626cacc3) Thanks [@mrlubos](https://github.com/mrlubos)! - fix(parser): cache parent to children nodes\n\n## 0.80.14\n\n### Patch Changes\n\n- [#2475](https://github.com/hey-api/openapi-ts/pull/2475) [`b9204ad`](https://github.com/hey-api/openapi-ts/commit/b9204ad1603374713d507deaa416ed56d6ce6aea) Thanks [@mrlubos](https://github.com/mrlubos)! - fix(parser): cache visited graph nodes to boost performance\n\n## 0.80.13\n\n### Patch Changes\n\n- [#2471](https://github.com/hey-api/openapi-ts/pull/2471) [`82af768`](https://github.com/hey-api/openapi-ts/commit/82af768a102409f981006a4b6f0219f9d86256dc) Thanks [@josstn](https://github.com/josstn)! - fix(parser): handle non-ascii characters in discriminator\n\n## 0.80.12\n\n### Patch Changes\n\n- [#2467](https://github.com/hey-api/openapi-ts/pull/2467) [`c76a8de`](https://github.com/hey-api/openapi-ts/commit/c76a8decad12a4a67cab83827bb007b36d794f6a) Thanks [@bjornhenriksson](https://github.com/bjornhenriksson)! - fix(zod): add `dates.local` option to allow unqualified (timezone-less) datetimes\n\n## 0.80.11\n\n### Patch Changes\n\n- [#2452](https://github.com/hey-api/openapi-ts/pull/2452) [`fb5b621`](https://github.com/hey-api/openapi-ts/commit/fb5b621f89bfc7acf33b0156ffcdca87646d667f) Thanks [@mrlubos](https://github.com/mrlubos)! - feat(client): add `@hey-api/client-angular` client\n\n- [#2423](https://github.com/hey-api/openapi-ts/pull/2423) [`554e9a6`](https://github.com/hey-api/openapi-ts/commit/554e9a6b4513eff4785ef48a927c6fea7a8eb873) Thanks [@max-scopp](https://github.com/max-scopp)! - feat(plugin): add `@angular/common` plugin\n\n## 0.80.10\n\n### Patch Changes\n\n- [#2438](https://github.com/hey-api/openapi-ts/pull/2438) [`760fd61`](https://github.com/hey-api/openapi-ts/commit/760fd61701080a890ba8e8efc5eac46699db4bbf) Thanks [@mrlubos](https://github.com/mrlubos)! - fix(client): handle dates in formdata serializer\n\n## 0.80.9\n\n### Patch Changes\n\n- [#2426](https://github.com/hey-api/openapi-ts/pull/2426) [`7308d9b`](https://github.com/hey-api/openapi-ts/commit/7308d9b8f5eb96d984dc323b5e6276eafcd30382) Thanks [@flow96](https://github.com/flow96)! - fix(sdk): handle infinite loop in nested operation IDs and tags with duplicate values\n\n## 0.80.8\n\n### Patch Changes\n\n- [#2418](https://github.com/hey-api/openapi-ts/pull/2418) [`340a6cd`](https://github.com/hey-api/openapi-ts/commit/340a6cd8f90fac70ff752c11abfa4691180bd34a) Thanks [@mrlubos](https://github.com/mrlubos)! - fix(client): add auto-generated header to client files\n\n- [#2418](https://github.com/hey-api/openapi-ts/pull/2418) [`969d7cf`](https://github.com/hey-api/openapi-ts/commit/969d7cfd7ff17705148477e4ce2b0ca3cee81de9) Thanks [@mrlubos](https://github.com/mrlubos)! - fix(client): correctly rename client files with nodenext bundler\n\n- [#2416](https://github.com/hey-api/openapi-ts/pull/2416) [`9cff8c8`](https://github.com/hey-api/openapi-ts/commit/9cff8c871e2707b22f9ea521bce95c6ffd532079) Thanks [@mrlubos](https://github.com/mrlubos)! - fix(tanstack-query): set correct name for pagination parameters in infinite query options\n\n## 0.80.7\n\n### Patch Changes\n\n- [#2396](https://github.com/hey-api/openapi-ts/pull/2396) [`b0958a0`](https://github.com/hey-api/openapi-ts/commit/b0958a05c308c4fcd8ca17d61d8691b6fb3471fe) Thanks [@Shinigami92](https://github.com/Shinigami92)! - fix(client): add `.gen` to client files\n\n## 0.80.6\n\n### Patch Changes\n\n- [#2399](https://github.com/hey-api/openapi-ts/pull/2399) [`ef32c27`](https://github.com/hey-api/openapi-ts/commit/ef32c27a147c85216773ac1fb392363034f23fd1) Thanks [@ahmedrowaihi](https://github.com/ahmedrowaihi)! - feat(tanstack-query): support generating `meta` fields\n\n- [#2406](https://github.com/hey-api/openapi-ts/pull/2406) [`04fc0f3`](https://github.com/hey-api/openapi-ts/commit/04fc0f3106b33c1de8a78a401187617c3a788bc5) Thanks [@dovca](https://github.com/dovca)! - feat(clients): pass raw `body` to interceptors, provide serialized body in `serializedBody`\n\n- [#2407](https://github.com/hey-api/openapi-ts/pull/2407) [`9704055`](https://github.com/hey-api/openapi-ts/commit/970405534e26ddebaaaed71e2a7a242e005ca44e) Thanks [@flow96](https://github.com/flow96)! - fix(sdk): prevent infinite loop when a schema tag matches operation ID\n\n## 0.80.5\n\n### Patch Changes\n\n- [#2401](https://github.com/hey-api/openapi-ts/pull/2401) [`42566ef`](https://github.com/hey-api/openapi-ts/commit/42566ef86fe5af1f4768eaf08f0cafaa84c69044) Thanks [@mrclrchtr](https://github.com/mrclrchtr)! - fix: resolve Yarn PnP compatibility issues with client bundle generation\n\n## 0.80.4\n\n### Patch Changes\n\n- [#2391](https://github.com/hey-api/openapi-ts/pull/2391) [`ac3456f`](https://github.com/hey-api/openapi-ts/commit/ac3456f4c793f7f8b8f535766382476d6d410219) Thanks [@ahmedrowaihi](https://github.com/ahmedrowaihi)! - fix(tanstack-query): add `queryKeys.tags` and `infiniteQueryKeys.tags` options\n\n## 0.80.3\n\n### Patch Changes\n\n- [#2287](https://github.com/hey-api/openapi-ts/pull/2287) [`6df1237`](https://github.com/hey-api/openapi-ts/commit/6df1237cefcb803da55cb780285fc82be05e019a) Thanks [@MaxwellAt](https://github.com/MaxwellAt)! - fix(zod): improve handling of additional properties\n\n## 0.80.2\n\n### Patch Changes\n\n- [#2383](https://github.com/hey-api/openapi-ts/pull/2383) [`2ac456f`](https://github.com/hey-api/openapi-ts/commit/2ac456f0f6247ef51a83a8ddbe9a03d9b2dabae7) Thanks [@j-ibarra](https://github.com/j-ibarra)! - fix(transformers): add `typeTransformers` option allowing passing custom transform functions\n\n- [#2382](https://github.com/hey-api/openapi-ts/pull/2382) [`3a23362`](https://github.com/hey-api/openapi-ts/commit/3a2336204fb06b8fa69faa24de976122ad44c16a) Thanks [@idbenami](https://github.com/idbenami)! - fix(client-axios): allow passing `AxiosInstance` into `axios` field\n\n## 0.80.1\n\n### Patch Changes\n\n- [#2344](https://github.com/hey-api/openapi-ts/pull/2344) [`fb7b724`](https://github.com/hey-api/openapi-ts/commit/fb7b7243663ca40bf79bd76bd7af7a9376474505) Thanks [@Daschi1](https://github.com/Daschi1)! - fix(valibot): expand support for `format: int64`\n\n## 0.80.0\n\n### Minor Changes\n\n- [#2341](https://github.com/hey-api/openapi-ts/pull/2341) [`9954bcf`](https://github.com/hey-api/openapi-ts/commit/9954bcf139efca45f0c0cd0c25e5236dbf5c7121) Thanks [@mrlubos](https://github.com/mrlubos)! - feat(zod): add support for Zod 4 and Zod Mini\n\n  ### Added Zod 4 and Zod Mini\n\n  This release adds support for Zod 4 and Zod Mini. By default, the `zod` plugin will generate output for Zod 4. If you want to preserve the previous output for Zod 3 or use Zod Mini, set `compatibilityVersion` to `3` or `mini`.\n\n  ```js\n  export default {\n    input: \"hey-api/backend\", // sign up at app.heyapi.dev\n    output: \"src/client\",\n    plugins: [\n      // ...other plugins\n      {\n        name: \"zod\",\n        compatibilityVersion: 3,\n      },\n    ],\n  };\n  ```\n\n  ```js\n  export default {\n    input: \"hey-api/backend\", // sign up at app.heyapi.dev\n    output: \"src/client\",\n    plugins: [\n      // ...other plugins\n      {\n        name: \"zod\",\n        compatibilityVersion: \"mini\",\n      },\n    ],\n  };\n  ```\n\n## 0.79.2\n\n### Patch Changes\n\n- [#2034](https://github.com/hey-api/openapi-ts/pull/2034) [`257dd07`](https://github.com/hey-api/openapi-ts/commit/257dd0711f81221c49d26dc57c079f1ae956ca6e) Thanks [@Le0Developer](https://github.com/Le0Developer)! - fix(typescript): add support for TypeID types\n\n- [#2041](https://github.com/hey-api/openapi-ts/pull/2041) [`2755be9`](https://github.com/hey-api/openapi-ts/commit/2755be939376227969d2b216f556666cef67f01a) Thanks [@alexvuka1](https://github.com/alexvuka1)! - fix(parser): respect `output.case` when generating operation id\n\n## 0.79.1\n\n### Patch Changes\n\n- [#2336](https://github.com/hey-api/openapi-ts/pull/2336) [`6302793`](https://github.com/hey-api/openapi-ts/commit/63027931f85bad817a8111c263579fd018cb39cb) Thanks [@mrlubos](https://github.com/mrlubos)! - fix: respect NO_INTERACTIVE and NO_INTERACTION environment variables\n\n- [#2331](https://github.com/hey-api/openapi-ts/pull/2331) [`a309fc7`](https://github.com/hey-api/openapi-ts/commit/a309fc799d4c0899b781e40a721dd1aa834e42f3) Thanks [@mrlubos](https://github.com/mrlubos)! - fix(client): update Axios headers types\n\n- [#2334](https://github.com/hey-api/openapi-ts/pull/2334) [`298be27`](https://github.com/hey-api/openapi-ts/commit/298be2715106c840067f54648ee8e94314dfc742) Thanks [@mrlubos](https://github.com/mrlubos)! - fix: improve handlebars types for jsr compliance\n\n- [#2333](https://github.com/hey-api/openapi-ts/pull/2333) [`566c8e9`](https://github.com/hey-api/openapi-ts/commit/566c8e99aeaa6142aa65b8af370f2ff7e0f4d219) Thanks [@mrlubos](https://github.com/mrlubos)! - fix(tanstack-query): set query key base url from options if defined\n\n## 0.79.0\n\n### Minor Changes\n\n- [#2284](https://github.com/hey-api/openapi-ts/pull/2284) [`236550f`](https://github.com/hey-api/openapi-ts/commit/236550fa56645dffe855f051fc144b8d8342f5fc) Thanks [@mrlubos](https://github.com/mrlubos)! - fix(typescript): removed `typescript+namespace` enums mode\n\n  ### Removed `typescript+namespace` enums mode\n\n  Due to a simpler TypeScript plugin implementation, the `typescript+namespace` enums mode is no longer necessary. This mode was used in the past to group inline enums under the same namespace. With the latest changes, this behavior is no longer supported. You can either choose to ignore inline enums (default), or use the `enums` transform (added in v0.78.0) to convert them into reusable components which will get exported as usual.\n\n## 0.78.3\n\n### Patch Changes\n\n- [#2290](https://github.com/hey-api/openapi-ts/pull/2290) [`4a77615`](https://github.com/hey-api/openapi-ts/commit/4a776157d0168f4f5f267581874861c2e84ef544) Thanks [@btmnk](https://github.com/btmnk)! - fix(client): improve types to pass `@total-typescript/ts-reset` rules\n\n## 0.78.2\n\n### Patch Changes\n\n- [#2281](https://github.com/hey-api/openapi-ts/pull/2281) [`565830b`](https://github.com/hey-api/openapi-ts/commit/565830b97c34efe632db69b423c2d10b80693b76) Thanks [@j-ibarra](https://github.com/j-ibarra)! - fix(transformers): add `transformers` option allowing passing custom transform functions\n\n## 0.78.1\n\n### Patch Changes\n\n- [#2275](https://github.com/hey-api/openapi-ts/pull/2275) [`1581b5c`](https://github.com/hey-api/openapi-ts/commit/1581b5cd9b2ff160d10c19ff8c195063155c66ae) Thanks [@mrlubos](https://github.com/mrlubos)! - fix(valibot): properly handle array minLength and maxLength\n\n- [#2279](https://github.com/hey-api/openapi-ts/pull/2279) [`f0549f6`](https://github.com/hey-api/openapi-ts/commit/f0549f62d50da8a92a330bcdc73b22ee6d211be3) Thanks [@mrlubos](https://github.com/mrlubos)! - fix(typescript): handle additionalProperties in propertyNames\n\n- [#2277](https://github.com/hey-api/openapi-ts/pull/2277) [`25fc54c`](https://github.com/hey-api/openapi-ts/commit/25fc54cd9088240faa47ff7c9607e17c2e52780d) Thanks [@mrlubos](https://github.com/mrlubos)! - fix(clients): annotate serializer return types\n\n- [#2280](https://github.com/hey-api/openapi-ts/pull/2280) [`ae9c45a`](https://github.com/hey-api/openapi-ts/commit/ae9c45a79cac56362552033b49ebf2958e11324c) Thanks [@mrlubos](https://github.com/mrlubos)! - fix(zod): add `dates.offset` option\n\n## 0.78.0\n\n### Minor Changes\n\n- [#2246](https://github.com/hey-api/openapi-ts/pull/2246) [`a11a8c5`](https://github.com/hey-api/openapi-ts/commit/a11a8c5d0e3fd3f8564e4b0873babdee0dfea2d3) Thanks [@mrlubos](https://github.com/mrlubos)! - feat(config): add `parser` options\n\n  ### Added `parser` options\n\n  Previously, `@hey-api/typescript` would generate correct types, but the validator plugins would have to re-implement the same logic or generate schemas that didn't match the generated types.\n\n  Since neither option was ideal, this release adds a dedicated place for `parser` options. Parser is responsible for preparing the input so plugins can generate more accurate output with less effort.\n\n  You can learn more about configuring parser on the [Parser](https://heyapi.dev/openapi-ts/configuration/parser) page.\n\n  ### Moved `input` options\n\n  The following options were moved to the new `parser` group.\n\n  - `input.filters` moved to `parser.filters`\n  - `input.pagination` moved to `parser.pagination`\n  - `input.patch` moved to `parser.patch`\n  - `input.validate_EXPERIMENTAL` moved to `parser.validate_EXPERIMENTAL`\n\n  ### Updated `typescript` options\n\n  The following options were renamed.\n\n  - `enumsCase` moved to `enums.case`\n  - `enumsConstantsIgnoreNull` moved to `enums.constantsIgnoreNull`\n\n  ### Moved `typescript` options\n\n  The following options were moved to the new `parser` group.\n\n  - `exportInlineEnums` moved to `parser.transforms.enums`\n  - `readOnlyWriteOnlyBehavior` moved to `parser.transforms.readWrite.enabled`\n  - `readableNameBuilder` moved to `parser.transforms.readWrite.responses.name`\n  - `writableNameBuilder` moved to `parser.transforms.readWrite.requests.name`\n\n  ### Updated `readWrite.responses` name\n\n  Additionally, the naming pattern for response schemas has changed from `{name}Readable` to `{name}`. This is to prevent your code from breaking by default when using a schema that gets updated with a write-only field.\n\n### Patch Changes\n\n- [#2246](https://github.com/hey-api/openapi-ts/pull/2246) [`d901bd5`](https://github.com/hey-api/openapi-ts/commit/d901bd55e17c9a06abfa5af4d9ac62a06dd6c82e) Thanks [@mrlubos](https://github.com/mrlubos)! - fix(config): add `operations` option to `parser.patch`\n\n## 0.77.0\n\n### Minor Changes\n\n- [#2227](https://github.com/hey-api/openapi-ts/pull/2227) [`4ea6f24`](https://github.com/hey-api/openapi-ts/commit/4ea6f24d02d8e8867313073d003f0b573f2054db) Thanks [@mrlubos](https://github.com/mrlubos)! - refactor(plugin): add `DefinePlugin` utility types\n\n  ### Updated Plugin API\n\n  Please refer to the [custom plugin](https://heyapi.dev/openapi-ts/plugins/custom) tutorial for the latest guide.\n\n- [#2227](https://github.com/hey-api/openapi-ts/pull/2227) [`4ea6f24`](https://github.com/hey-api/openapi-ts/commit/4ea6f24d02d8e8867313073d003f0b573f2054db) Thanks [@mrlubos](https://github.com/mrlubos)! - feat(sdk): update `validator` option\n\n  ### Updated `sdk.validator` option\n\n  Clients can now validate both request and response data. As a result, passing a boolean or string to `validator` will control both of these options. To preserve the previous behavior, set `validator.request` to `false` and `validator.response` to your previous configuration.\n\n  ```js\n  export default {\n    input: \"hey-api/backend\", // sign up at app.heyapi.dev\n    output: \"src/client\",\n    plugins: [\n      // ...other plugins\n      {\n        name: \"@hey-api/sdk\",\n        validator: {\n          request: false,\n          response: true,\n        },\n      },\n    ],\n  };\n  ```\n\n### Patch Changes\n\n- [#2227](https://github.com/hey-api/openapi-ts/pull/2227) [`4ea6f24`](https://github.com/hey-api/openapi-ts/commit/4ea6f24d02d8e8867313073d003f0b573f2054db) Thanks [@mrlubos](https://github.com/mrlubos)! - fix(client): add requestValidator option\n\n## 0.76.0\n\n### Minor Changes\n\n- [#2226](https://github.com/hey-api/openapi-ts/pull/2226) [`1c66d88`](https://github.com/hey-api/openapi-ts/commit/1c66d8866fa25dc9cf978ef94eab3bf8ca64d9f3) Thanks [@mrlubos](https://github.com/mrlubos)! - feat(valibot): generate a single schema for requests\n\n  ### Single Valibot schema per request\n\n  Previously, we generated a separate schema for each endpoint parameter and request body. In v0.76.0, a single request schema is generated for the whole endpoint. It may contain a request body, parameters, and headers.\n\n  ```ts\n  const vData = v.object({\n    body: v.optional(\n      v.object({\n        foo: v.optional(v.string()),\n        bar: v.optional(v.union([v.number(), v.null()])),\n      })\n    ),\n    headers: v.optional(v.never()),\n    path: v.object({\n      baz: v.string(),\n    }),\n    query: v.optional(v.never()),\n  });\n  ```\n\n  If you need to access individual fields, you can do so using the [`.entries`](https://valibot.dev/api/object/) API. For example, we can get the request body schema with `vData.entries.body`.\n\n### Patch Changes\n\n- [#2221](https://github.com/hey-api/openapi-ts/pull/2221) [`e335e1e`](https://github.com/hey-api/openapi-ts/commit/e335e1ea31256b3b284b7ef968d566c1315096b3) Thanks [@mrlubos](https://github.com/mrlubos)! - fix(parser): prefer JSON media type\n\n- [#2226](https://github.com/hey-api/openapi-ts/pull/2226) [`1c66d88`](https://github.com/hey-api/openapi-ts/commit/1c66d8866fa25dc9cf978ef94eab3bf8ca64d9f3) Thanks [@mrlubos](https://github.com/mrlubos)! - fix(valibot): add `metadata` option to generate additional metadata for documentation, code generation, AI structured outputs, form validation, and other purposes\n\n## 0.75.0\n\n### Minor Changes\n\n- [#2215](https://github.com/hey-api/openapi-ts/pull/2215) [`82e56e9`](https://github.com/hey-api/openapi-ts/commit/82e56e926e90d8575302db7fa4843b3663ac3971) Thanks [@mrlubos](https://github.com/mrlubos)! - feat(parser): replace `plugin.subscribe()` with `plugin.forEach()`\n\n  ### Added `plugin.forEach()` method\n\n  This method replaces the `.subscribe()` method. Additionally, `.forEach()` is executed immediately, which means we don't need the `before` and `after` events – simply move your code before and after the `.forEach()` block.\n\n  ```ts\n  plugin.forEach(\"operation\", \"schema\", (event) => {\n    // do something with event\n  });\n  ```\n\n- [#2218](https://github.com/hey-api/openapi-ts/pull/2218) [`e5ff024`](https://github.com/hey-api/openapi-ts/commit/e5ff024d4ff2c715276fda88269e7c1668cb929e) Thanks [@mrlubos](https://github.com/mrlubos)! - feat(tanstack-query): add name and case options\n\n  ### Updated TanStack Query options\n\n  The TanStack Query plugin options have been expanded to support more naming and casing patterns. As a result, the following options have been renamed.\n\n  - `queryOptionsNameBuilder` renamed to `queryOptions`\n  - `infiniteQueryOptionsNameBuilder` renamed to `infiniteQueryOptions`\n  - `mutationOptionsNameBuilder` renamed to `mutationOptions`\n  - `queryKeyNameBuilder` renamed to `queryKeys`\n  - `infiniteQueryKeyNameBuilder` renamed to `infiniteQueryKeys`\n\n### Patch Changes\n\n- [#2219](https://github.com/hey-api/openapi-ts/pull/2219) [`4df6fa0`](https://github.com/hey-api/openapi-ts/commit/4df6fa0540c4e0e0adce485cb813ea57bf97b908) Thanks [@mrlubos](https://github.com/mrlubos)! - fix: make output pass stricter tsconfig configurations\"\n\n- [#2213](https://github.com/hey-api/openapi-ts/pull/2213) [`2ffb612`](https://github.com/hey-api/openapi-ts/commit/2ffb61253b302d746c4f08beae9daeec345343f6) Thanks [@mrlubos](https://github.com/mrlubos)! - fix(validators): handle additional properties object when no other properties are defined\n\n- [#2216](https://github.com/hey-api/openapi-ts/pull/2216) [`1456f87`](https://github.com/hey-api/openapi-ts/commit/1456f878cbe7ad7d2894a3ba8dddcc8b79d04920) Thanks [@mrlubos](https://github.com/mrlubos)! - fix(parser): add `meta` and `version` options to input.patch\n\n- [#2210](https://github.com/hey-api/openapi-ts/pull/2210) [`5b1362a`](https://github.com/hey-api/openapi-ts/commit/5b1362ae8bebf9aef846140e1400270131cbe64f) Thanks [@mrlubos](https://github.com/mrlubos)! - fix(cli): correctly detect watch mode\n\n## 0.74.0\n\n### Minor Changes\n\n- [#2201](https://github.com/hey-api/openapi-ts/pull/2201) [`ab8cede`](https://github.com/hey-api/openapi-ts/commit/ab8cedefe0ca99492d064dfc191f5445bd8102fb) Thanks [@mrlubos](https://github.com/mrlubos)! - feat(zod): generate a single schema for requests\n\n  ### Single Zod schema per request\n\n  Previously, we generated a separate schema for each endpoint parameter and request body. In v0.74.0, a single request schema is generated for the whole endpoint. It may contain a request body, parameters, and headers.\n\n  ```ts\n  const zData = z.object({\n    body: z\n      .object({\n        foo: z.string().optional(),\n        bar: z.union([z.number(), z.null()]).optional(),\n      })\n      .optional(),\n    headers: z.never().optional(),\n    path: z.object({\n      baz: z.string(),\n    }),\n    query: z.never().optional(),\n  });\n  ```\n\n  If you need to access individual fields, you can do so using the [`.shape`](https://zod.dev/api?id=shape) API. For example, we can get the request body schema with `zData.shape.body`.\n\n### Patch Changes\n\n- [#2192](https://github.com/hey-api/openapi-ts/pull/2192) [`7a740ed`](https://github.com/hey-api/openapi-ts/commit/7a740ed2007b81c0088f4d80dd3401c9af673767) Thanks [@Daschi1](https://github.com/Daschi1)! - fix(valibot): use `isoTimestamp` instead of `isoDateTime` for date-time format\n\n- [#2201](https://github.com/hey-api/openapi-ts/pull/2201) [`a889c3c`](https://github.com/hey-api/openapi-ts/commit/a889c3c899b54aec73a3ecffc071a412b44c112a) Thanks [@mrlubos](https://github.com/mrlubos)! - fix(parser): do not mark schemas as duplicate if they have different format\n\n## 0.73.0\n\n### Minor Changes\n\n- [#2172](https://github.com/hey-api/openapi-ts/pull/2172) [`29605a0`](https://github.com/hey-api/openapi-ts/commit/29605a0e1b58e986458275833a98a396eede9089) Thanks [@mrlubos](https://github.com/mrlubos)! - feat: bundle `@hey-api/client-*` plugins\n\n  ### Bundle `@hey-api/client-*` plugins\n\n  In previous releases, you had to install a separate client package to generate a fully working output, e.g. `npm install @hey-api/client-fetch`. This created a few challenges: getting started was slower, upgrading was sometimes painful, and bundling too. Beginning with v0.73.0, all Hey API clients are bundled by default and don't require installing any additional dependencies. You can remove any installed client packages and re-run `@hey-api/openapi-ts`.\n\n  ```sh\n  npm uninstall @hey-api/client-fetch\n  ```\n\n### Patch Changes\n\n- [#2172](https://github.com/hey-api/openapi-ts/pull/2172) [`9afbf66`](https://github.com/hey-api/openapi-ts/commit/9afbf666614ecb597f68ec809981f2acc28c66dc) Thanks [@mrlubos](https://github.com/mrlubos)! - fix: respect logs setting if initialization fails\n\n- [#2170](https://github.com/hey-api/openapi-ts/pull/2170) [`c18dd1e`](https://github.com/hey-api/openapi-ts/commit/c18dd1e41b1c055306932ca6d3fa905c14ad1dd4) Thanks [@mrlubos](https://github.com/mrlubos)! - fix: export default pagination keywords\n\n## 0.72.2\n\n### Patch Changes\n\n- [#2163](https://github.com/hey-api/openapi-ts/pull/2163) [`9769998`](https://github.com/hey-api/openapi-ts/commit/9769998550b1cb77f838827a9617b9dbbfa54537) Thanks [@mrlubos](https://github.com/mrlubos)! - fix(zod): add `metadata` option to generate additional metadata for documentation, code generation, AI structured outputs, form validation, and other purposes\n\n- [#2167](https://github.com/hey-api/openapi-ts/pull/2167) [`a46259e`](https://github.com/hey-api/openapi-ts/commit/a46259eb4d2ed1c95908a5ad3d69b0495a8aacb4) Thanks [@mrlubos](https://github.com/mrlubos)! - fix(tanstack-query): add name builder options for all generated artifacts\n\n- [#2166](https://github.com/hey-api/openapi-ts/pull/2166) [`594f3a6`](https://github.com/hey-api/openapi-ts/commit/594f3a6c7a154294fd99f5f76f2b0a9589a1e7f3) Thanks [@mrlubos](https://github.com/mrlubos)! - fix(parser): filter orphans only when there are some operations\n\n- [#2166](https://github.com/hey-api/openapi-ts/pull/2166) [`594f3a6`](https://github.com/hey-api/openapi-ts/commit/594f3a6c7a154294fd99f5f76f2b0a9589a1e7f3) Thanks [@mrlubos](https://github.com/mrlubos)! - fix(zod): support tuple types\n\n- [#2167](https://github.com/hey-api/openapi-ts/pull/2167) [`a46259e`](https://github.com/hey-api/openapi-ts/commit/a46259eb4d2ed1c95908a5ad3d69b0495a8aacb4) Thanks [@mrlubos](https://github.com/mrlubos)! - fix(parser): set correct subscription context for plugins\n\n## 0.72.1\n\n### Patch Changes\n\n- [#2159](https://github.com/hey-api/openapi-ts/pull/2159) [`87b2d6c`](https://github.com/hey-api/openapi-ts/commit/87b2d6cf075a3d0466a2e510a2fc89b409d57e3e) Thanks [@Joshua-hypt](https://github.com/Joshua-hypt)! - fix(zod): handle array union types\n\n## 0.72.0\n\n### Minor Changes\n\n- [#2141](https://github.com/hey-api/openapi-ts/pull/2141) [`557769d`](https://github.com/hey-api/openapi-ts/commit/557769d10a7b4da55489239a437c9611a3c41a24) Thanks [@mrlubos](https://github.com/mrlubos)! - feat(sdk): add `classStructure` option supporting dot or slash `operationId` notation when generating class-based SDKs\n\n  ### Added `sdk.classStructure` option\n\n  When generating class-based SDKs, we now try to infer the ideal structure using `operationId` keywords. If you'd like to preserve the previous behavior, set `classStructure` to `off`.\n\n  ```js\n  export default {\n    input: \"hey-api/backend\", // sign up at app.heyapi.dev\n    output: \"src/client\",\n    plugins: [\n      // ...other plugins\n      {\n        classStructure: \"off\",\n        name: \"@hey-api/sdk\",\n      },\n    ],\n  };\n  ```\n\n### Patch Changes\n\n- [#2151](https://github.com/hey-api/openapi-ts/pull/2151) [`0ea8130`](https://github.com/hey-api/openapi-ts/commit/0ea8130ff6b2e047dbc4fd6a30d08f54da367d0c) Thanks [@mrlubos](https://github.com/mrlubos)! - fix: add crash report prompt\n\n- [#2153](https://github.com/hey-api/openapi-ts/pull/2153) [`b272bd9`](https://github.com/hey-api/openapi-ts/commit/b272bd9e4adfb0d87a05b023bc078246e7ee4937) Thanks [@mrlubos](https://github.com/mrlubos)! - fix(parser): handle `propertyNames` keyword\n\n- [#2152](https://github.com/hey-api/openapi-ts/pull/2152) [`6d5ad37`](https://github.com/hey-api/openapi-ts/commit/6d5ad37e474ad659efb8ffdc649829ac4e1e1b8a) Thanks [@mrlubos](https://github.com/mrlubos)! - fix(validators): correctly generate default value for `BigInt`\n\n- [#2151](https://github.com/hey-api/openapi-ts/pull/2151) [`aef80c3`](https://github.com/hey-api/openapi-ts/commit/aef80c397b254f391543ff11cac417fab8397c8b) Thanks [@mrlubos](https://github.com/mrlubos)! - fix(typescript): handle nested inline objects with write/read only fields\n\n## 0.71.1\n\n### Patch Changes\n\n- [#2139](https://github.com/hey-api/openapi-ts/pull/2139) [`0c27937`](https://github.com/hey-api/openapi-ts/commit/0c279378b9be7bf0eaa29586999ecd3b983a26a4) Thanks [@mrlubos](https://github.com/mrlubos)! - fix(parser): skip schema if it's an array or tuple and its items don't have any matching readable or writable scopes\n\n- [#2140](https://github.com/hey-api/openapi-ts/pull/2140) [`54049fe`](https://github.com/hey-api/openapi-ts/commit/54049fe262336f5b439a540cbe362478ecbe8317) Thanks [@mrlubos](https://github.com/mrlubos)! - fix(parser): validate operationId keyword\n\n- [#2137](https://github.com/hey-api/openapi-ts/pull/2137) [`058dbc9`](https://github.com/hey-api/openapi-ts/commit/058dbc9fa81c95dca02788ad58231915cb1c4de3) Thanks [@mrlubos](https://github.com/mrlubos)! - fix(parser): respect exportFromIndex option when using legacy clients\n\n## 0.71.0\n\n### Minor Changes\n\n- [#2130](https://github.com/hey-api/openapi-ts/pull/2130) [`dc7535e`](https://github.com/hey-api/openapi-ts/commit/dc7535e6ed5b01ef722d536b909202e28ab16b46) Thanks [@mrlubos](https://github.com/mrlubos)! - fix(sdk): rename `serviceNameBuilder` to `classNameBuilder`\n\n### Patch Changes\n\n- [#2117](https://github.com/hey-api/openapi-ts/pull/2117) [`a1435b9`](https://github.com/hey-api/openapi-ts/commit/a1435b915a272d9ffa599c194ee52c2a33f77fcd) Thanks [@johnny-mh](https://github.com/johnny-mh)! - feat(parser): allow patching specs with `input.patch`\n\n- [#2132](https://github.com/hey-api/openapi-ts/pull/2132) [`9473613`](https://github.com/hey-api/openapi-ts/commit/9473613187a72a4ae4ed3047994b076c89285737) Thanks [@mrlubos](https://github.com/mrlubos)! - fix(typescript): better detect enum namespace\n\n- [#2130](https://github.com/hey-api/openapi-ts/pull/2130) [`dc7535e`](https://github.com/hey-api/openapi-ts/commit/dc7535e6ed5b01ef722d536b909202e28ab16b46) Thanks [@mrlubos](https://github.com/mrlubos)! - feat(sdk): add `instance` option for instantiable SDKs\n\n## 0.70.0\n\n### Minor Changes\n\n- [#2123](https://github.com/hey-api/openapi-ts/pull/2123) [`4d8c030`](https://github.com/hey-api/openapi-ts/commit/4d8c03038979c9a75315cc158789b3c198c62f90) Thanks [@mrlubos](https://github.com/mrlubos)! - feat(sdk): add responseStyle option\n\n  **BREAKING**: Update your client to the latest version.\n\n### Patch Changes\n\n- [#2116](https://github.com/hey-api/openapi-ts/pull/2116) [`21ddf25`](https://github.com/hey-api/openapi-ts/commit/21ddf252fd556827240334a8f1f8cf3bae8ff5da) Thanks [@mrlubos](https://github.com/mrlubos)! - fix(typescript): ensure generated enum uses unique namespace to avoid conflicts with non-enum declarations\n\n- [#2116](https://github.com/hey-api/openapi-ts/pull/2116) [`08f3f89`](https://github.com/hey-api/openapi-ts/commit/08f3f898a8b5939a9e6eed70f6424d2bc5084da8) Thanks [@mrlubos](https://github.com/mrlubos)! - fix(typescript): handle duplicate inline enum names\n\n## 0.69.2\n\n### Patch Changes\n\n- [#2110](https://github.com/hey-api/openapi-ts/pull/2110) [`323a966`](https://github.com/hey-api/openapi-ts/commit/323a9661213e41723af1d7944232064022814d2b) Thanks [@mrlubos](https://github.com/mrlubos)! - feat(parser): add validate_EXPERIMENTAL option\n\n- [#2114](https://github.com/hey-api/openapi-ts/pull/2114) [`55980f5`](https://github.com/hey-api/openapi-ts/commit/55980f533812cb33dc32e034f22aee1d58fe6c19) Thanks [@mrlubos](https://github.com/mrlubos)! - fix(validators): do not wrap regular expression in slashes if the pattern is already wrapped\n\n- [#2115](https://github.com/hey-api/openapi-ts/pull/2115) [`a94d3c0`](https://github.com/hey-api/openapi-ts/commit/a94d3c0503bbeeff026e9fea362f907a0e5d4cb7) Thanks [@mrlubos](https://github.com/mrlubos)! - fix(tanstack-query): create a shallow copy of queryKey in createInfiniteParams function\n\n## 0.69.1\n\n### Patch Changes\n\n- [#2109](https://github.com/hey-api/openapi-ts/pull/2109) [`6d6b087`](https://github.com/hey-api/openapi-ts/commit/6d6b08771e78d184c6b17c97c6baa5a750b84581) Thanks [@mrlubos](https://github.com/mrlubos)! - fix(valibot): use isoDate instead of date for date strings\n\n- [#2108](https://github.com/hey-api/openapi-ts/pull/2108) [`7e604fa`](https://github.com/hey-api/openapi-ts/commit/7e604fa03f34bcf621033f3ca633fa2365a79c53) Thanks [@mrlubos](https://github.com/mrlubos)! - fix(typescript): generates union of arrays when items use nested oneOf\n\n- [#2106](https://github.com/hey-api/openapi-ts/pull/2106) [`b0cb0ab`](https://github.com/hey-api/openapi-ts/commit/b0cb0abe0f63f144380cde5fe3a2381f61038e5f) Thanks [@mrlubos](https://github.com/mrlubos)! - fix(schema): nameBuilder can be a string\n\n- [#2106](https://github.com/hey-api/openapi-ts/pull/2106) [`b0cb0ab`](https://github.com/hey-api/openapi-ts/commit/b0cb0abe0f63f144380cde5fe3a2381f61038e5f) Thanks [@mrlubos](https://github.com/mrlubos)! - fix(sdk): serviceNameBuilder can be a function\n\n## 0.69.0\n\n### Minor Changes\n\n- [#2094](https://github.com/hey-api/openapi-ts/pull/2094) [`8152aaf`](https://github.com/hey-api/openapi-ts/commit/8152aaf4892c48b79fd3dc486eb3c0ea333dc3e6) Thanks [@mrlubos](https://github.com/mrlubos)! - feat(sdk): use responses/errors map instead of union\n\n  **BREAKING**: Update your client to the latest version.\n\n### Patch Changes\n\n- [#2100](https://github.com/hey-api/openapi-ts/pull/2100) [`54757a2`](https://github.com/hey-api/openapi-ts/commit/54757a2cf266a0ee49277baaa6765e078c95f2a3) Thanks [@mrlubos](https://github.com/mrlubos)! - feat(validators): generate schemas for request parameters\n\n- [#2099](https://github.com/hey-api/openapi-ts/pull/2099) [`a9484e0`](https://github.com/hey-api/openapi-ts/commit/a9484e0792dded8ccba280f0f4b55b72d22b3d83) Thanks [@mrlubos](https://github.com/mrlubos)! - feat(validators): generate schemas for request bodies\n\n- [#2097](https://github.com/hey-api/openapi-ts/pull/2097) [`d95802f`](https://github.com/hey-api/openapi-ts/commit/d95802f92e504f19130bd2e18a4355ce51e38ce0) Thanks [@mrlubos](https://github.com/mrlubos)! - fix(sdk): skip spreading required headers when there are conflicting Content-Type headers\n\n- [#2096](https://github.com/hey-api/openapi-ts/pull/2096) [`22e0b3b`](https://github.com/hey-api/openapi-ts/commit/22e0b3bccf94b49fd82665e96074ab76eb241109) Thanks [@mrlubos](https://github.com/mrlubos)! - fix(pagination): improved schema resolver for parameters\n\n## 0.68.1\n\n### Patch Changes\n\n- [#2086](https://github.com/hey-api/openapi-ts/pull/2086) [`ae8aacd`](https://github.com/hey-api/openapi-ts/commit/ae8aacd8bf2a80bb4a2af2cae2b7993e988ee17a) Thanks [@mrlubos](https://github.com/mrlubos)! - fix(parser): add back support for regular expressions in input filters\n\n- [#2086](https://github.com/hey-api/openapi-ts/pull/2086) [`ae8aacd`](https://github.com/hey-api/openapi-ts/commit/ae8aacd8bf2a80bb4a2af2cae2b7993e988ee17a) Thanks [@mrlubos](https://github.com/mrlubos)! - fix(parser): extend input filters to handle reusable parameters and responses\n\n## 0.68.0\n\n### Minor Changes\n\n- [#2072](https://github.com/hey-api/openapi-ts/pull/2072) [`8bea7d2`](https://github.com/hey-api/openapi-ts/commit/8bea7d23a6280ee8dc843be656da820179140403) Thanks [@mrlubos](https://github.com/mrlubos)! - feat: upgraded input filters\n\n  ### Upgraded input filters\n\n  Input filters now avoid generating invalid output without requiring you to specify every missing schema as in the previous releases. As part of this release, we changed the way filters are configured and removed the support for regular expressions. Let us know if regular expressions are still useful for you and want to bring them back!\n\n  ```js\n  export default {\n    input: {\n      // match only the schema named `foo` and `GET` operation for the `/api/v1/foo` path\n      filters: {\n        operations: {\n          include: ['GET /api/v1/foo'], // [!code ++]\n        },\n        schemas: {\n          include: ['foo'], // [!code ++]\n        },\n      },\n      include: '^(#/components/schemas/foo|#/paths/api/v1/foo/get)\n  ```\n\n## 0.67.6\n\n### Patch Changes\n\n- [#2068](https://github.com/hey-api/openapi-ts/pull/2068) [`93b62fd`](https://github.com/hey-api/openapi-ts/commit/93b62fd433a09f28c75f58852e1baaa2b6fbd641) Thanks [@mrlubos](https://github.com/mrlubos)! - fix(tanstack-query): require options when sdk client is set to false\n\n- [#2060](https://github.com/hey-api/openapi-ts/pull/2060) [`373e15a`](https://github.com/hey-api/openapi-ts/commit/373e15a34fd81ac596a0797ddb133a47aeceee1f) Thanks [@mrlubos](https://github.com/mrlubos)! - fix(valibot): add valibot plugin\n\n## 0.67.5\n\n### Patch Changes\n\n- [#2052](https://github.com/hey-api/openapi-ts/pull/2052) [`f430eaa`](https://github.com/hey-api/openapi-ts/commit/f430eaad13d83d2191fff12802d9283099d7a527) Thanks [@mrlubos](https://github.com/mrlubos)! - fix(tanstack-query): add SDK function comments to TanStack Query output\n\n- [#2058](https://github.com/hey-api/openapi-ts/pull/2058) [`e9fda0b`](https://github.com/hey-api/openapi-ts/commit/e9fda0bff09c534333691f981363f445dc97129f) Thanks [@mrlubos](https://github.com/mrlubos)! - fix(typescript): exclude $refs in readable/writable schemas when referenced schemas don't contain any readable/writable fields\n\n- [#2059](https://github.com/hey-api/openapi-ts/pull/2059) [`af2082f`](https://github.com/hey-api/openapi-ts/commit/af2082f75dd02a52f8196709d7497dc99c5321e5) Thanks [@mrlubos](https://github.com/mrlubos)! - fix(typescript): add enumsConstantsIgnoreNull option to skip nulls from generated JavaScript objects\n\n## 0.67.4\n\n### Patch Changes\n\n- [#2043](https://github.com/hey-api/openapi-ts/pull/2043) [`e3997c8`](https://github.com/hey-api/openapi-ts/commit/e3997c8d9a9e8a6da7bc4b417769e751887ff6ac) Thanks [@mrlubos](https://github.com/mrlubos)! - fix: handle enum keyword with array type\n\n## 0.67.3\n\n### Patch Changes\n\n- [#2020](https://github.com/hey-api/openapi-ts/pull/2020) [`27cb409`](https://github.com/hey-api/openapi-ts/commit/27cb4095383aff35f1d78094b8b73fb36f432d33) Thanks [@0xfurai](https://github.com/0xfurai)! - fix: handle references to properties\n\n## 0.67.2\n\n### Patch Changes\n\n- [#2023](https://github.com/hey-api/openapi-ts/pull/2023) [`c6f01f3`](https://github.com/hey-api/openapi-ts/commit/c6f01f39493e241f01dd7997ccdb8b6bc3d1519c) Thanks [@kennidenni](https://github.com/kennidenni)! - fix: handle relative paths in client's `baseUrl` field\n\n## 0.67.1\n\n### Patch Changes\n\n- [#2010](https://github.com/hey-api/openapi-ts/pull/2010) [`13c9577`](https://github.com/hey-api/openapi-ts/commit/13c9577f122eab7b7fdd92f67ac77cb334cbdcd5) Thanks [@mrlubos](https://github.com/mrlubos)! - fix: do not use named imports from typescript module\n\n## 0.67.0\n\n### Minor Changes\n\n- [#2003](https://github.com/hey-api/openapi-ts/pull/2003) [`1504a06`](https://github.com/hey-api/openapi-ts/commit/1504a0642fdb4f856d1650fade2d30988b35b4ff) Thanks [@mrlubos](https://github.com/mrlubos)! - feat: respect `moduleResolution` value in `tsconfig.json`\n\n  ### Respecting `moduleResolution` value in `tsconfig.json`\n\n  This release introduces functionality related to your `tsconfig.json` file. The initial feature properly respects the value of your `moduleResolution` field. If you're using `nodenext`, the relative module paths in your output will be appended with `.js`. To preserve the previous behavior where we never appended `.js` to relative module paths, set `output.tsConfigPath` to `off`.\n\n  ```js\n  export default {\n    input: \"hey-api/backend\", // sign up at app.heyapi.dev\n    output: {\n      path: \"src/client\",\n      tsConfigPath: \"off\",\n    },\n  };\n  ```\n\n### Patch Changes\n\n- [#2006](https://github.com/hey-api/openapi-ts/pull/2006) [`aa10522`](https://github.com/hey-api/openapi-ts/commit/aa10522f2bd018a417d875e5ab12ed0a848d2e49) Thanks [@Liooo](https://github.com/Liooo)! - fix: make discriminator field required when used with `oneOf` keyword\n\n- [#2009](https://github.com/hey-api/openapi-ts/pull/2009) [`f45ba8e`](https://github.com/hey-api/openapi-ts/commit/f45ba8e96872a13be71c0d07e134f8c6717458d4) Thanks [@mrlubos](https://github.com/mrlubos)! - fix: avoid including underscore for appended types (e.g. data, error, response) when preserving identifier case\n\n## 0.66.7\n\n### Patch Changes\n\n- [#1981](https://github.com/hey-api/openapi-ts/pull/1981) [`955b95a`](https://github.com/hey-api/openapi-ts/commit/955b95ab051401bdbeaa8cfb93a7a7b707cb7529) Thanks [@mrlubos](https://github.com/mrlubos)! - fix: handle schemas with all write-only or read-only fields\n\n- [#1990](https://github.com/hey-api/openapi-ts/pull/1990) [`2fb1689`](https://github.com/hey-api/openapi-ts/commit/2fb1689b6538d32d123235175159d412df988241) Thanks [@mrlubos](https://github.com/mrlubos)! - fix: avoid generating duplicate operation ids when sanitizing input\n\n- [#1991](https://github.com/hey-api/openapi-ts/pull/1991) [`b6e654a`](https://github.com/hey-api/openapi-ts/commit/b6e654a6e18698f3c554848f8b8113e30f108fc4) Thanks [@mrlubos](https://github.com/mrlubos)! - fix: Zod schemas use .and() instead of .merge()\n\n- [#1919](https://github.com/hey-api/openapi-ts/pull/1919) [`ec62470`](https://github.com/hey-api/openapi-ts/commit/ec624709b1fb07da8d7234fe851561054dc68150) Thanks [@ngalluzzo](https://github.com/ngalluzzo)! - fix: correctly handle numeric property names with signs\n\n- [#1984](https://github.com/hey-api/openapi-ts/pull/1984) [`0f305e0`](https://github.com/hey-api/openapi-ts/commit/0f305e06337758ee16c801ad437d9ce0996fc8b0) Thanks [@mrlubos](https://github.com/mrlubos)! - fix: Zod plugin handles nullable enums\n\n- [#1986](https://github.com/hey-api/openapi-ts/pull/1986) [`dbebff8`](https://github.com/hey-api/openapi-ts/commit/dbebff8dcba4c93d0c534e6e48e59e2aaaffd540) Thanks [@mrlubos](https://github.com/mrlubos)! - fix: handle discriminator with multiple mappings to the same schema\n\n- [#1980](https://github.com/hey-api/openapi-ts/pull/1980) [`0d7bede`](https://github.com/hey-api/openapi-ts/commit/0d7bede6e40553ae1c4c888770c84e55732b3cae) Thanks [@mrlubos](https://github.com/mrlubos)! - fix: Zod schemas with BigInt and min/max constraints\n\n- [#1987](https://github.com/hey-api/openapi-ts/pull/1987) [`71e2fd0`](https://github.com/hey-api/openapi-ts/commit/71e2fd029f2374ed8d2eaa01beecf254757e08d8) Thanks [@mrlubos](https://github.com/mrlubos)! - fix: correct path to nested plugin files when using exportFromIndex\n\n- [#1978](https://github.com/hey-api/openapi-ts/pull/1978) [`267f4b3`](https://github.com/hey-api/openapi-ts/commit/267f4b3730f2a477906e4e1593154dcd1723e554) Thanks [@mrlubos](https://github.com/mrlubos)! - fix: handle extended `$ref` with `type` keyword in OpenAPI 3.1\n\n- [#1982](https://github.com/hey-api/openapi-ts/pull/1982) [`1e6d74f`](https://github.com/hey-api/openapi-ts/commit/1e6d74f8321af5c61f86318b835d25db38609b03) Thanks [@mrlubos](https://github.com/mrlubos)! - fix: handle additionalProperties empty object as unknown instead of preserving an empty interface\n\n## 0.66.6\n\n### Patch Changes\n\n- [#1971](https://github.com/hey-api/openapi-ts/pull/1971) [`e1fb199`](https://github.com/hey-api/openapi-ts/commit/e1fb199a22a30653b95d498e6aaca2c59ed2b13b) Thanks [@mrlubos](https://github.com/mrlubos)! - fix: handle Zod circular reference\n\n## 0.66.5\n\n### Patch Changes\n\n- [#1951](https://github.com/hey-api/openapi-ts/pull/1951) [`4be46e5`](https://github.com/hey-api/openapi-ts/commit/4be46e506db1b2c53d1ddbf66e9919b5072f1cc0) Thanks [@devNameAsyraf](https://github.com/devNameAsyraf)! - fix: don't use JSON serializer for `application/octet-stream`\n\n- [#1938](https://github.com/hey-api/openapi-ts/pull/1938) [`2a03e37`](https://github.com/hey-api/openapi-ts/commit/2a03e371715b5948ba568009975ad65ccbf7bfd7) Thanks [@sredni](https://github.com/sredni)! - fix: repeat tuple type `maxItems` times\n\n## 0.66.4\n\n### Patch Changes\n\n- [#1936](https://github.com/hey-api/openapi-ts/pull/1936) [`ba2e5ca`](https://github.com/hey-api/openapi-ts/commit/ba2e5ca8af1cfe478963d72ff76d7d7ae026c5a5) Thanks [@seriouslag](https://github.com/seriouslag)! - fix: add return type to TanStack Query mutations\n\n- [#1934](https://github.com/hey-api/openapi-ts/pull/1934) [`d4df550`](https://github.com/hey-api/openapi-ts/commit/d4df5503369b7aa105c7f6a49e1c7b43e0e50f49) Thanks [@seriouslag](https://github.com/seriouslag)! - fix: export some internal functions\n\n## 0.66.3\n\n### Patch Changes\n\n- [#1917](https://github.com/hey-api/openapi-ts/pull/1917) [`d7af22c`](https://github.com/hey-api/openapi-ts/commit/d7af22c771af4bd2dab28acc69430717da390670) Thanks [@Freddis](https://github.com/Freddis)! - fix: handle nullable dates in transformers\n\n## 0.66.2\n\n### Patch Changes\n\n- [#1913](https://github.com/hey-api/openapi-ts/pull/1913) [`7cfa4a7`](https://github.com/hey-api/openapi-ts/commit/7cfa4a76b13ca97d49c5f0366ba7264f94753d8b) Thanks [@BogdanMaier](https://github.com/BogdanMaier)! - fix: prevent crash when optional pagination field is missing\n\n## 0.66.1\n\n### Patch Changes\n\n- [#1906](https://github.com/hey-api/openapi-ts/pull/1906) [`d1928d1`](https://github.com/hey-api/openapi-ts/commit/d1928d17710240bb42a6aa12da4618a9dd962df2) Thanks [@mrlubos](https://github.com/mrlubos)! - fix: exclude and include expressions can be an array\n\n- [#1906](https://github.com/hey-api/openapi-ts/pull/1906) [`d1928d1`](https://github.com/hey-api/openapi-ts/commit/d1928d17710240bb42a6aa12da4618a9dd962df2) Thanks [@mrlubos](https://github.com/mrlubos)! - fix: support excluding deprecated fields with '@deprecated'\n\n## 0.66.0\n\n### Minor Changes\n\n- [#1896](https://github.com/hey-api/openapi-ts/pull/1896) [`8840ed7`](https://github.com/hey-api/openapi-ts/commit/8840ed73df5ee718e803aa6e27b66e0c82ec3651) Thanks [@mrlubos](https://github.com/mrlubos)! - feat: support read-only and write-only properties\n\n  ### Read-only and write-only fields\n\n  Starting with v0.66.0, `@hey-api/typescript` will generate separate types for payloads and responses if it detects any read-only or write-only fields. To preserve the previous behavior and generate a single type regardless, set `readOnlyWriteOnlyBehavior` to `off`.\n\n  ```js\n  export default {\n    input: \"hey-api/backend\", // sign up at app.heyapi.dev\n    output: \"src/client\",\n    plugins: [\n      // ...other plugins\n      {\n        name: \"@hey-api/typescript\",\n        readOnlyWriteOnlyBehavior: \"off\", // [!code ++]\n      },\n    ],\n  };\n  ```\n\n## 0.65.0\n\n### Minor Changes\n\n- [#1889](https://github.com/hey-api/openapi-ts/pull/1889) [`67c385b`](https://github.com/hey-api/openapi-ts/commit/67c385bf6289a79726b0cdd85fd81ca501cf2248) Thanks [@mrlubos](https://github.com/mrlubos)! - feat: support custom clients\n\n### Patch Changes\n\n- [#1892](https://github.com/hey-api/openapi-ts/pull/1892) [`29fa764`](https://github.com/hey-api/openapi-ts/commit/29fa764986af3d3af842793c74d61681c7e967a1) Thanks [@mrlubos](https://github.com/mrlubos)! - fix: allow passing fetch options to the request resolving a specification\n\n- [#1877](https://github.com/hey-api/openapi-ts/pull/1877) [`6971f5b`](https://github.com/hey-api/openapi-ts/commit/6971f5bca4dd17ea65400c504ad0a4ffb083a38b) Thanks [@Matsuuu](https://github.com/Matsuuu)! - feat: ability to disable writing a log file via a `--no-log-file` flag or `logs.file` = `false`\n\n## 0.64.15\n\n### Patch Changes\n\n- [#1850](https://github.com/hey-api/openapi-ts/pull/1850) [`fe43b88`](https://github.com/hey-api/openapi-ts/commit/fe43b889c20a2001f56e259f93f64851a1caa1d1) Thanks [@kelnos](https://github.com/kelnos)! - feat: add support for cookies auth\n\n## 0.64.14\n\n### Patch Changes\n\n- [#1827](https://github.com/hey-api/openapi-ts/pull/1827) [`9dd43db`](https://github.com/hey-api/openapi-ts/commit/9dd43db54f2b7ebf87c5c7c118fdf149162a533d) Thanks [@john-cremit](https://github.com/john-cremit)! - feat: allow customizing pagination keywords using `input.pagination.keywords`\n\n## 0.64.13\n\n### Patch Changes\n\n- [#1822](https://github.com/hey-api/openapi-ts/pull/1822) [`c73b0d4`](https://github.com/hey-api/openapi-ts/commit/c73b0d401c2bfa6f0b0d89d844a6aa09f2685a69) Thanks [@mrlubos](https://github.com/mrlubos)! - fix: bump json-schema-ref-parser package\n\n- [#1826](https://github.com/hey-api/openapi-ts/pull/1826) [`90886c1`](https://github.com/hey-api/openapi-ts/commit/90886c1372a999e8cb59d5da218762f6ee6cd459) Thanks [@mrlubos](https://github.com/mrlubos)! - fix: allow config to be a function\n\n## 0.64.12\n\n### Patch Changes\n\n- [#1816](https://github.com/hey-api/openapi-ts/pull/1816) [`b9e1b4b`](https://github.com/hey-api/openapi-ts/commit/b9e1b4bec5e1c5d1f2b5b9cfc7fa145274ae604d) Thanks [@shemsiu](https://github.com/shemsiu)! - Allow `scheme` property to be case-insensitive\n\n## 0.64.11\n\n### Patch Changes\n\n- [#1800](https://github.com/hey-api/openapi-ts/pull/1800) [`a4811bd`](https://github.com/hey-api/openapi-ts/commit/a4811bdf178ec1a7f1602e0483a32fe7303f4eac) Thanks [@mrlubos](https://github.com/mrlubos)! - fix: support Hey API platform input arguments\n\n- [#1800](https://github.com/hey-api/openapi-ts/pull/1800) [`a4811bd`](https://github.com/hey-api/openapi-ts/commit/a4811bdf178ec1a7f1602e0483a32fe7303f4eac) Thanks [@mrlubos](https://github.com/mrlubos)! - fix: handle raw OpenAPI specification input\n\n## 0.64.10\n\n### Patch Changes\n\n- [#1779](https://github.com/hey-api/openapi-ts/pull/1779) [`57fcec8`](https://github.com/hey-api/openapi-ts/commit/57fcec804e339cfe508cfba4afd203c22495bff2) Thanks [@mrlubos](https://github.com/mrlubos)! - fix: don't throw on missing performance marks\n\n- [#1767](https://github.com/hey-api/openapi-ts/pull/1767) [`2de84ea`](https://github.com/hey-api/openapi-ts/commit/2de84ea3dbd2cba50150808a872aea8242c33014) Thanks [@Schroedi](https://github.com/Schroedi)! - fix: handle nested dates in transformers\n\n## 0.64.9\n\n### Patch Changes\n\n- [#1774](https://github.com/hey-api/openapi-ts/pull/1774) [`c0b36b9`](https://github.com/hey-api/openapi-ts/commit/c0b36b95645d484034c3af145c5554867568979b) Thanks [@mrlubos](https://github.com/mrlubos)! - docs: announce Hey API platform\n\n## 0.64.8\n\n### Patch Changes\n\n- [#1764](https://github.com/hey-api/openapi-ts/pull/1764) [`b3ecac3`](https://github.com/hey-api/openapi-ts/commit/b3ecac31d49a269ab400db4dbb84a22f1047e19a) Thanks [@mrlubos](https://github.com/mrlubos)! - fix: reduce minimum Node.js 22 version to 22.10.0\n\n## 0.64.7\n\n### Patch Changes\n\n- [#1755](https://github.com/hey-api/openapi-ts/pull/1755) [`82f7c14`](https://github.com/hey-api/openapi-ts/commit/82f7c1425dd903b75d15cf532b88580d180f281a) Thanks [@Matsuuu](https://github.com/Matsuuu)! - fix: Wrap the GET request in watch mode with try-catch to prevent crashes on no-head watch targets\n\n## 0.64.6\n\n### Patch Changes\n\n- [#1748](https://github.com/hey-api/openapi-ts/pull/1748) [`7326d25`](https://github.com/hey-api/openapi-ts/commit/7326d2550ae3336fd8f754f8d4a25f1a40c13a2b) Thanks [@Matsuuu](https://github.com/Matsuuu)! - fix: Wrap HEAD request in a try-catch to prevent watch mode crashes on server reloads\n\n## 0.64.5\n\n### Patch Changes\n\n- [#1728](https://github.com/hey-api/openapi-ts/pull/1728) [`cc8dabb`](https://github.com/hey-api/openapi-ts/commit/cc8dabbf1cb94879bb08fe66ecb04c4d0801e9cc) Thanks [@georgesmith46](https://github.com/georgesmith46)! - fix: correctly generate zod regex expressions when using patterns\n\n## 0.64.4\n\n### Patch Changes\n\n- [#1710](https://github.com/hey-api/openapi-ts/pull/1710) [`4afdaa1`](https://github.com/hey-api/openapi-ts/commit/4afdaa1247b0bf0629817a51c29ca25840569b77) Thanks [@mrlubos](https://github.com/mrlubos)! - fix: use relative path to custom config file if provided when resolving relative paths\n\n## 0.64.3\n\n### Patch Changes\n\n- [#1701](https://github.com/hey-api/openapi-ts/pull/1701) [`e86629b`](https://github.com/hey-api/openapi-ts/commit/e86629bfa9ae2a47131d3a9a240a6aa2a4f67911) Thanks [@mrlubos](https://github.com/mrlubos)! - fix: correctly type default value for Nuxt client\n\n## 0.64.2\n\n### Patch Changes\n\n- [#1697](https://github.com/hey-api/openapi-ts/pull/1697) [`dec3fed`](https://github.com/hey-api/openapi-ts/commit/dec3fedb5f51aad4711fec15a006c525cb0bf7d8) Thanks [@mrlubos](https://github.com/mrlubos)! - fix: add exportFromIndex option to all plugins\n\n- [#1699](https://github.com/hey-api/openapi-ts/pull/1699) [`8ff188f`](https://github.com/hey-api/openapi-ts/commit/8ff188fb269cf46321538dbe846e1b9ae3b8de42) Thanks [@mrlubos](https://github.com/mrlubos)! - fix: allow passing arbitrary values to SDK functions via `meta` field\n\n- [#1687](https://github.com/hey-api/openapi-ts/pull/1687) [`04c7cea`](https://github.com/hey-api/openapi-ts/commit/04c7ceac940a81cbed6a4070d9244aa5052ba4a2) Thanks [@hunshcn](https://github.com/hunshcn)! - sanitize \"+\" in uri to avoid plus in function name\n\n## 0.64.1\n\n### Patch Changes\n\n- [#1668](https://github.com/hey-api/openapi-ts/pull/1668) [`7a03341`](https://github.com/hey-api/openapi-ts/commit/7a03341301d9d56ae93b4e4e3bd1ca469444f886) Thanks [@mrlubos](https://github.com/mrlubos)! - fix: watch mode handles servers not exposing HEAD method for spec\n\n- [#1668](https://github.com/hey-api/openapi-ts/pull/1668) [`7a03341`](https://github.com/hey-api/openapi-ts/commit/7a03341301d9d56ae93b4e4e3bd1ca469444f886) Thanks [@mrlubos](https://github.com/mrlubos)! - fix: add watch.timeout option\n\n## 0.64.0\n\n### Minor Changes\n\n- [#1661](https://github.com/hey-api/openapi-ts/pull/1661) [`ccefe43`](https://github.com/hey-api/openapi-ts/commit/ccefe434ee83f1202769547ce128e1c134dee25f) Thanks [@mrlubos](https://github.com/mrlubos)! - feat: added `client.baseUrl` option\n\n  ### Added `client.baseUrl` option\n\n  You can use this option to configure the default base URL for the generated client. By default, we will attempt to resolve the first defined server or infer the base URL from the input path. If you'd like to preserve the previous behavior, set `baseUrl` to `false`.\n\n  ```js\n  export default {\n    input: \"path/to/openapi.json\",\n    output: \"src/client\",\n    plugins: [\n      {\n        baseUrl: false, // [!code ++]\n        name: \"@hey-api/client-fetch\",\n      },\n    ],\n  };\n  ```\n\n- [#1661](https://github.com/hey-api/openapi-ts/pull/1661) [`bb6d46a`](https://github.com/hey-api/openapi-ts/commit/bb6d46ae119ce4e7e3a2ab3fded74ac4fb4cdff2) Thanks [@mrlubos](https://github.com/mrlubos)! - fix: make createConfig, CreateClientConfig, and Config accept ClientOptions generic\n\n  ### Added `ClientOptions` interface\n\n  The `Config` interface now accepts an optional generic extending `ClientOptions` instead of `boolean` type `ThrowOnError`.\n\n  ```ts\n  type Foo = Config<false>; // [!code --]\n  type Foo = Config<{ throwOnError: false }>; // [!code ++]\n  ```\n\n## 0.63.2\n\n### Patch Changes\n\n- [#1651](https://github.com/hey-api/openapi-ts/pull/1651) [`df350f3`](https://github.com/hey-api/openapi-ts/commit/df350f31dae957d063010ba46c5008ae831b3a32) Thanks [@mrlubos](https://github.com/mrlubos)! - fix: lower Node version requirements\n\n## 0.63.1\n\n### Patch Changes\n\n- [#1637](https://github.com/hey-api/openapi-ts/pull/1637) [`2dc380e`](https://github.com/hey-api/openapi-ts/commit/2dc380eabc17c723654beb04ecd7bce6d33d3b49) Thanks [@mrlubos](https://github.com/mrlubos)! - fix: update keywords in package.json\n\n- [#1637](https://github.com/hey-api/openapi-ts/pull/1637) [`2dc380e`](https://github.com/hey-api/openapi-ts/commit/2dc380eabc17c723654beb04ecd7bce6d33d3b49) Thanks [@mrlubos](https://github.com/mrlubos)! - fix: add Next.js client\n\n- [#1646](https://github.com/hey-api/openapi-ts/pull/1646) [`2cbffeb`](https://github.com/hey-api/openapi-ts/commit/2cbffeb2cdd6c6143cd68cac68369584879dda31) Thanks [@mrlubos](https://github.com/mrlubos)! - feat: support required client in SDK using sdk.client = false\n\n- [#1648](https://github.com/hey-api/openapi-ts/pull/1648) [`66a9e45`](https://github.com/hey-api/openapi-ts/commit/66a9e4517d2306da8c60750dc3380e6774a7177b) Thanks [@mrlubos](https://github.com/mrlubos)! - fix: add support for openIdConnect auth flow\n\n## 0.63.0\n\n### Minor Changes\n\n- [#1626](https://github.com/hey-api/openapi-ts/pull/1626) [`8eba19d`](https://github.com/hey-api/openapi-ts/commit/8eba19d4092fc0903572ab9fdadf0b4c26928ba2) Thanks [@mrlubos](https://github.com/mrlubos)! - feat: move clients to plugins\n\n  ### Client plugins\n\n  Clients are now plugins generating their own `client.gen.ts` file. There's no migration needed if you're using CLI. If you're using the configuration file, move `client` options to `plugins`.\n\n  ```js\n  export default {\n    client: \"@hey-api/client-fetch\", // [!code --]\n    input: \"path/to/openapi.json\",\n    output: \"src/client\",\n    plugins: [\"@hey-api/client-fetch\"], // [!code ++]\n  };\n  ```\n\n### Patch Changes\n\n- [#1626](https://github.com/hey-api/openapi-ts/pull/1626) [`8eba19d`](https://github.com/hey-api/openapi-ts/commit/8eba19d4092fc0903572ab9fdadf0b4c26928ba2) Thanks [@mrlubos](https://github.com/mrlubos)! - fix: move sdk.throwOnError option to client.throwOnError\n\n  ### Moved `sdk.throwOnError` option\n\n  This SDK configuration option has been moved to the client plugins where applicable. Not every client can be configured to throw on error, so it didn't make sense to expose the option when it didn't have any effect.\n\n  ```js\n  export default {\n    input: \"path/to/openapi.json\",\n    output: \"src/client\",\n    plugins: [\n      {\n        name: \"@hey-api/client-fetch\",\n        throwOnError: true, // [!code ++]\n      },\n      {\n        name: \"@hey-api/sdk\",\n        throwOnError: true, // [!code --]\n      },\n    ],\n  };\n  ```\n\n- [#1626](https://github.com/hey-api/openapi-ts/pull/1626) [`8eba19d`](https://github.com/hey-api/openapi-ts/commit/8eba19d4092fc0903572ab9fdadf0b4c26928ba2) Thanks [@mrlubos](https://github.com/mrlubos)! - fix: sdks import client from client.gen.ts instead of defining it inside the file\n\n  ### Added `client.gen.ts` file\n\n  The internal `client` instance previously located in `sdk.gen.ts` is now defined in `client.gen.ts`. If you're importing it in your code, update the import module.\n\n  ```js\n  import { client } from \"client/sdk.gen\"; // [!code --]\n  import { client } from \"client/client.gen\"; // [!code ++]\n  ```\n\n- [#1626](https://github.com/hey-api/openapi-ts/pull/1626) [`8eba19d`](https://github.com/hey-api/openapi-ts/commit/8eba19d4092fc0903572ab9fdadf0b4c26928ba2) Thanks [@mrlubos](https://github.com/mrlubos)! - fix: throw if inferred plugin not found\n\n## 0.62.3\n\n### Patch Changes\n\n- [#1600](https://github.com/hey-api/openapi-ts/pull/1600) [`0432418`](https://github.com/hey-api/openapi-ts/commit/0432418d72c94ef94865f8216ed2f723ad5191f9) Thanks [@mrlubos](https://github.com/mrlubos)! - fix: bundle clients from compiled index file\n\n- [#1594](https://github.com/hey-api/openapi-ts/pull/1594) [`bc66cde`](https://github.com/hey-api/openapi-ts/commit/bc66cde1ebe0e2df08c8d04b3ddc9504e4952cf3) Thanks [@mrlubos](https://github.com/mrlubos)! - fix: generate correct response for text/plain content type\n\n- [#1596](https://github.com/hey-api/openapi-ts/pull/1596) [`4784727`](https://github.com/hey-api/openapi-ts/commit/47847276e8bc854045044dd414382080270dd779) Thanks [@mrlubos](https://github.com/mrlubos)! - fix: do not use a body serializer on text/plain sdks\n\n- [#1602](https://github.com/hey-api/openapi-ts/pull/1602) [`194f941`](https://github.com/hey-api/openapi-ts/commit/194f94110545f2cae07bde13b863cd0cb5284d8a) Thanks [@mrlubos](https://github.com/mrlubos)! - fix: support all oauth2 flows in sdk auth\n\n- [#1596](https://github.com/hey-api/openapi-ts/pull/1596) [`4784727`](https://github.com/hey-api/openapi-ts/commit/47847276e8bc854045044dd414382080270dd779) Thanks [@mrlubos](https://github.com/mrlubos)! - fix: add null to valid bodySerializer types\n\n## 0.62.2\n\n### Patch Changes\n\n- [#1519](https://github.com/hey-api/openapi-ts/pull/1519) [`14d3c4c`](https://github.com/hey-api/openapi-ts/commit/14d3c4ce0393d543e2d3aaebbfcf8f0cf32483b0) Thanks [@mrlubos](https://github.com/mrlubos)! - fix: add support for Nuxt client\n\n## 0.62.1\n\n### Patch Changes\n\n- [#1574](https://github.com/hey-api/openapi-ts/pull/1574) [`51bf7fc`](https://github.com/hey-api/openapi-ts/commit/51bf7fc88cb6e9ab392106b85f900a75540e524f) Thanks [@mrlubos](https://github.com/mrlubos)! - fix: generate bigint type instead of BigInt\n\n- [#1572](https://github.com/hey-api/openapi-ts/pull/1572) [`0e4882a`](https://github.com/hey-api/openapi-ts/commit/0e4882ae3b0dc048a2d9a2a0b5c39fbdeed6de8d) Thanks [@mrlubos](https://github.com/mrlubos)! - fix: add ability to skip generating index file with output.indexFile\n\n## 0.62.0\n\n### Minor Changes\n\n- [#1568](https://github.com/hey-api/openapi-ts/pull/1568) [`465410c`](https://github.com/hey-api/openapi-ts/commit/465410c201eb19e737e3143ad53a146e95f80107) Thanks [@mrlubos](https://github.com/mrlubos)! - feat: change the default parser\n\n### Patch Changes\n\n- [#1566](https://github.com/hey-api/openapi-ts/pull/1566) [`39d558a`](https://github.com/hey-api/openapi-ts/commit/39d558afc6af97fe8de1a6471b9d1f172ec2960a) Thanks [@mrlubos](https://github.com/mrlubos)! - fix: spread sdk options at the end to allow overriding generated values\n\n## 0.61.3\n\n### Patch Changes\n\n- [#1552](https://github.com/hey-api/openapi-ts/pull/1552) [`ceb8bd7`](https://github.com/hey-api/openapi-ts/commit/ceb8bd74207566871e9f179cb28b2d8c440ef2c8) Thanks [@mrlubos](https://github.com/mrlubos)! - fix: use z.coerce before calling z.bigint\n\n## 0.61.2\n\n### Patch Changes\n\n- [#1543](https://github.com/hey-api/openapi-ts/pull/1543) [`7a2d6dc`](https://github.com/hey-api/openapi-ts/commit/7a2d6dcd6e30411178ac5c78db3f1dbbcc8d6b27) Thanks [@mrlubos](https://github.com/mrlubos)! - fix: send GET request only on first spec fetch\n\n## 0.61.1\n\n### Patch Changes\n\n- [#1530](https://github.com/hey-api/openapi-ts/pull/1530) [`67b7295`](https://github.com/hey-api/openapi-ts/commit/67b72959be499ff59f5f68bfdaa7e5568f5de02f) Thanks [@mrlubos](https://github.com/mrlubos)! - fix: detect pagination in composite schemas with null type\n\n- [#1535](https://github.com/hey-api/openapi-ts/pull/1535) [`d4cfa05`](https://github.com/hey-api/openapi-ts/commit/d4cfa05ed425d57f79b28efe76e6a33f1e892ec5) Thanks [@mrlubos](https://github.com/mrlubos)! - fix: handle primitive constants in Zod and types\n\n## 0.61.0\n\n### Minor Changes\n\n- [#1520](https://github.com/hey-api/openapi-ts/pull/1520) [`b3c23ba`](https://github.com/hey-api/openapi-ts/commit/b3c23ba99c361bdca3ab9c44017b6e5c044f40a7) Thanks [@chriswiggins](https://github.com/chriswiggins)! - Add support for HTTP Bearer Authentication Scheme\n\n- [#1525](https://github.com/hey-api/openapi-ts/pull/1525) [`7b7313e`](https://github.com/hey-api/openapi-ts/commit/7b7313eeaf9a749fb81465546bc4e4bdce31d5ab) Thanks [@mrlubos](https://github.com/mrlubos)! - feat: add OpenAPI 2.0 support to experimental parser\n\n- [#1511](https://github.com/hey-api/openapi-ts/pull/1511) [`4e8064d`](https://github.com/hey-api/openapi-ts/commit/4e8064d9a589e14b42d2b1a329e2436f242884da) Thanks [@mrlubos](https://github.com/mrlubos)! - feat: add watch mode\n\n  ## Watch Mode\n\n  ::: warning\n  Watch mode currently supports only remote files via URL.\n  :::\n\n  If your schema changes frequently, you may want to automatically regenerate the output during development. To watch your input file for changes, enable `watch` mode in your configuration or pass the `--watch` flag to the CLI.\n\n  ### Config\n\n  ```js\n  export default {\n    client: \"@hey-api/client-fetch\",\n    input: \"path/to/openapi.json\",\n    output: \"src/client\",\n    watch: true,\n  };\n  ```\n\n  ### CLI\n\n  ```sh\n  npx @hey-api/openapi-ts \\\n    -c @hey-api/client-fetch \\\n    -i path/to/openapi.json \\\n    -o src/client \\\n    -w\n  ```\n\n- **BREAKING**: please update `@hey-api/client-*` packages to the latest version\n\n  feat: add support for basic http auth\n\n### Patch Changes\n\n- [#1529](https://github.com/hey-api/openapi-ts/pull/1529) [`ccc0bbc`](https://github.com/hey-api/openapi-ts/commit/ccc0bbcbdeace22bbd8e92caadebdca81e61e393) Thanks [@mrlubos](https://github.com/mrlubos)! - fix: add support for long integers\n\n- [#1512](https://github.com/hey-api/openapi-ts/pull/1512) [`dd0e0a2`](https://github.com/hey-api/openapi-ts/commit/dd0e0a266153e34448fbc3db6b0f864f75483280) Thanks [@mrlubos](https://github.com/mrlubos)! - fix: add `sdk.throwOnError` option\n\n- [#1525](https://github.com/hey-api/openapi-ts/pull/1525) [`7b7313e`](https://github.com/hey-api/openapi-ts/commit/7b7313eeaf9a749fb81465546bc4e4bdce31d5ab) Thanks [@mrlubos](https://github.com/mrlubos)! - fix: preserve leading separators in enum keys\n\n## 0.60.1\n\n### Patch Changes\n\n- [#1468](https://github.com/hey-api/openapi-ts/pull/1468) [`20d7497`](https://github.com/hey-api/openapi-ts/commit/20d7497acb6c046f6a4206c2d8137414e17b2263) Thanks [@mrlubos](https://github.com/mrlubos)! - fix: handle indexed access checks\n\n- [#1469](https://github.com/hey-api/openapi-ts/pull/1469) [`a7608c2`](https://github.com/hey-api/openapi-ts/commit/a7608c27ced3419dee228f4b0cd96479b3dc2c04) Thanks [@mrlubos](https://github.com/mrlubos)! - fix: zod: generate patterns and improve plain schemas\n\n- [#1471](https://github.com/hey-api/openapi-ts/pull/1471) [`f86d293`](https://github.com/hey-api/openapi-ts/commit/f86d293f18f133ef6dd2f4864d037611b81edd26) Thanks [@mrlubos](https://github.com/mrlubos)! - fix: add links to the experimental parser callouts\n\n- [#1462](https://github.com/hey-api/openapi-ts/pull/1462) [`893d6ef`](https://github.com/hey-api/openapi-ts/commit/893d6ef5677d17b96174f505937f6da686abb2bc) Thanks [@mrlubos](https://github.com/mrlubos)! - fix: update types for custom plugins so defineConfig does not throw\n\n- [#1464](https://github.com/hey-api/openapi-ts/pull/1464) [`787d59c`](https://github.com/hey-api/openapi-ts/commit/787d59c307549f5faf9f83314a8e9692bb01eb5d) Thanks [@mrlubos](https://github.com/mrlubos)! - fix: export IR types\n\n- [#1467](https://github.com/hey-api/openapi-ts/pull/1467) [`3a3f8d7`](https://github.com/hey-api/openapi-ts/commit/3a3f8d7ea4c993d4372e4bc52f6d9525bf1e45b6) Thanks [@mrlubos](https://github.com/mrlubos)! - fix: export utils\n\n- [#1457](https://github.com/hey-api/openapi-ts/pull/1457) [`bc03c37`](https://github.com/hey-api/openapi-ts/commit/bc03c373f4df61d8d715dc13badba2a6c5a3a450) Thanks [@mrlubos](https://github.com/mrlubos)! - fix: allow plugins to explicitly declare whether they should be re-exported from the index file\n\n## 0.60.0\n\n### Minor Changes\n\n- [#1430](https://github.com/hey-api/openapi-ts/pull/1430) [`9cec9e8`](https://github.com/hey-api/openapi-ts/commit/9cec9e8582c12a8c041b922d9587e16f6f19782a) Thanks [@mrlubos](https://github.com/mrlubos)! - fix: require sdk.transformer to use generated transformers\n\n  ### Added `sdk.transformer` option\n\n  When generating SDKs, you now have to specify `transformer` in order to modify response data. By default, adding `@hey-api/transformers` to your plugins will only produce additional output. To preserve the previous functionality, set `sdk.transformer` to `true`.\n\n  ```js\n  import { defaultPlugins } from \"@hey-api/openapi-ts\";\n\n  export default {\n    client: \"@hey-api/client-fetch\",\n    input: \"path/to/openapi.json\",\n    output: \"src/client\",\n    plugins: [\n      ...defaultPlugins,\n      {\n        dates: true,\n        name: \"@hey-api/transformers\",\n      },\n      {\n        name: \"@hey-api/sdk\",\n        transformer: true, // [!code ++]\n      },\n    ],\n  };\n  ```\n\n- [#1447](https://github.com/hey-api/openapi-ts/pull/1447) [`200821b`](https://github.com/hey-api/openapi-ts/commit/200821b3ceea8ffca7656fe3f6e2ef98b7110a2a) Thanks [@mrlubos](https://github.com/mrlubos)! - fix: revert license to MIT\n\n### Patch Changes\n\n- [#1430](https://github.com/hey-api/openapi-ts/pull/1430) [`9cec9e8`](https://github.com/hey-api/openapi-ts/commit/9cec9e8582c12a8c041b922d9587e16f6f19782a) Thanks [@mrlubos](https://github.com/mrlubos)! - feat: Zod plugin generates response schemas\n\n## 0.59.2\n\n### Patch Changes\n\n- [#1420](https://github.com/hey-api/openapi-ts/pull/1420) [`8010dbb`](https://github.com/hey-api/openapi-ts/commit/8010dbb1ab8b91d1d49d5cf16276183764a63ff3) Thanks [@mrlubos](https://github.com/mrlubos)! - fix: generate querySerializer options for Axios client\n\n- [#1419](https://github.com/hey-api/openapi-ts/pull/1419) [`4555796`](https://github.com/hey-api/openapi-ts/commit/4555796df3a33fb3fdf7d7417f7d1f3b22d89bcf) Thanks [@mrlubos](https://github.com/mrlubos)! - fix: infer responseType in SDKs for axios client\n\n- [#1409](https://github.com/hey-api/openapi-ts/pull/1409) [`646064d`](https://github.com/hey-api/openapi-ts/commit/646064d1aecea988d2b4df73bd24b2ee83394ae0) Thanks [@mrlubos](https://github.com/mrlubos)! - feat: support oauth2 and apiKey security schemes\n\n- [#1416](https://github.com/hey-api/openapi-ts/pull/1416) [`2a605b7`](https://github.com/hey-api/openapi-ts/commit/2a605b7e43655b3100e302e10b9979fbbad6cdfe) Thanks [@mrlubos](https://github.com/mrlubos)! - fix: zod plugin handles recursive schemas\n\n## 0.59.1\n\n### Patch Changes\n\n- [#1398](https://github.com/hey-api/openapi-ts/pull/1398) [`a88e7d9`](https://github.com/hey-api/openapi-ts/commit/a88e7d9f8a313c641cf651256a710d0610b95b5d) Thanks [@mrlubos](https://github.com/mrlubos)! - fix: prefix restricted identifier names with underscore\n\n- [#1394](https://github.com/hey-api/openapi-ts/pull/1394) [`ec48d32`](https://github.com/hey-api/openapi-ts/commit/ec48d323d80de8e6a47ce7ecd732288f0a47e17a) Thanks [@mrlubos](https://github.com/mrlubos)! - fix: disallow additional query parameters in experimental parser output\n\n## 0.59.0\n\n### Minor Changes\n\n- [#1387](https://github.com/hey-api/openapi-ts/pull/1387) [`7c4335d`](https://github.com/hey-api/openapi-ts/commit/7c4335d12782c73b5b242e7d5786ec8778857d1d) Thanks [@mrlubos](https://github.com/mrlubos)! - feat: add `logs.level` option\n\n  ### Added `logs.level` option\n\n  You can now configure different log levels. As part of this feature, we had to introduce a breaking change by moving the `debug` option to `logs.level`. This will affect you if you're calling `@hey-api/openapi-ts` from Node.js (not CLI) or using the configuration file.\n\n  ```js\n  export default {\n    client: \"@hey-api/client-fetch\",\n    debug: true, // [!code --]\n    input: \"path/to/openapi.json\",\n    logs: {\n      level: \"debug\", // [!code ++]\n    },\n    output: \"src/client\",\n  };\n  ```\n\n- [#1389](https://github.com/hey-api/openapi-ts/pull/1389) [`f4c98ec`](https://github.com/hey-api/openapi-ts/commit/f4c98ec429ee989ae1c76328f4d42d44f14cb52e) Thanks [@mrlubos](https://github.com/mrlubos)! - feat: remove `@hey-api/schemas` from default plugins\n\n  ### Updated default `plugins`\n\n  `@hey-api/schemas` has been removed from the default plugins. To continue using it, add it to your plugins array.\n\n  ```js\n  import { defaultPlugins } from \"@hey-api/openapi-ts\";\n\n  export default {\n    client: \"@hey-api/client-fetch\",\n    experimentalParser: true,\n    input: \"path/to/openapi.json\",\n    output: \"src/client\",\n    plugins: [\n      ...defaultPlugins,\n      \"@hey-api/schemas\", // [!code ++]\n    ],\n  };\n  ```\n\n### Patch Changes\n\n- [#1382](https://github.com/hey-api/openapi-ts/pull/1382) [`3580c1e`](https://github.com/hey-api/openapi-ts/commit/3580c1eec4640d235a1e0f78bf76581e532aaf8b) Thanks [@mrlubos](https://github.com/mrlubos)! - fix: correctly resolve required properties in nested allOf composition\n\n- [#1387](https://github.com/hey-api/openapi-ts/pull/1387) [`7c4335d`](https://github.com/hey-api/openapi-ts/commit/7c4335d12782c73b5b242e7d5786ec8778857d1d) Thanks [@mrlubos](https://github.com/mrlubos)! - fix: add `--silent` or `-s` CLI option for silent log level\n\n- [#1382](https://github.com/hey-api/openapi-ts/pull/1382) [`3580c1e`](https://github.com/hey-api/openapi-ts/commit/3580c1eec4640d235a1e0f78bf76581e532aaf8b) Thanks [@mrlubos](https://github.com/mrlubos)! - fix: transformers handle allOf composition in experimental parser\n\n- [#1387](https://github.com/hey-api/openapi-ts/pull/1387) [`0def82c`](https://github.com/hey-api/openapi-ts/commit/0def82c91d1be936702690b8cf5a21775974d946) Thanks [@mrlubos](https://github.com/mrlubos)! - feat: add `logs` configuration option to customize log directory\n\n- [#1390](https://github.com/hey-api/openapi-ts/pull/1390) [`8388c47`](https://github.com/hey-api/openapi-ts/commit/8388c4720dbb657899d5e30bd8d59c19583cad98) Thanks [@mrlubos](https://github.com/mrlubos)! - fix: allow arbitrary object properties when additionalProperties is undefined\n\n- [#1387](https://github.com/hey-api/openapi-ts/pull/1387) [`7c4335d`](https://github.com/hey-api/openapi-ts/commit/7c4335d12782c73b5b242e7d5786ec8778857d1d) Thanks [@mrlubos](https://github.com/mrlubos)! - fix: support `DEBUG` environment variable\n\n## 0.58.0\n\n### Minor Changes\n\n- [#1353](https://github.com/hey-api/openapi-ts/pull/1353) [`efd3e54`](https://github.com/hey-api/openapi-ts/commit/efd3e5444d208ea0c8dda7573f26bb04c31cc372) Thanks [@mrlubos](https://github.com/mrlubos)! - feat: add typescript.identifierCase option\n\n  ### Added `typescript.identifierCase` option\n\n  **This change affects only the experimental parser.** By default, the generated TypeScript interfaces will follow the PascalCase naming convention. In the previous versions, we tried to preserve the original name as much as possible. To keep the previous behavior, set `typescript.identifierCase` to `preserve`.\n\n  ```js\n  export default {\n    client: \"@hey-api/client-fetch\",\n    experimentalParser: true,\n    input: \"path/to/openapi.json\",\n    output: \"src/client\",\n    plugins: [\n      // ...other plugins\n      {\n        identifierCase: \"preserve\", // [!code ++]\n        name: \"@hey-api/typescript\",\n      },\n    ],\n  };\n  ```\n\n- [#1360](https://github.com/hey-api/openapi-ts/pull/1360) [`5f6ddd7`](https://github.com/hey-api/openapi-ts/commit/5f6ddd796f0ce77bcca55fd13981f2a8481aecd3) Thanks [@mrlubos](https://github.com/mrlubos)! - fix: remove schemas and transformers re-exports from index.ts\n\n  ### Removed `schemas.gen.ts` re-export\n\n  `index.ts` will no longer re-export `schemas.gen.ts` to reduce the chance of producing broken output. Please update your code to import from `schemas.gen.ts` directly.\n\n  ```js\n  import { mySchema } from \"client\"; // [!code --]\n  import { mySchema } from \"client/schemas.gen\"; // [!code ++]\n  ```\n\n  ### Removed `transformers.gen.ts` re-export\n\n  `index.ts` will no longer re-export `transformers.gen.ts` to reduce the chance of producing broken output. Please update your code to import from `transformers.gen.ts` directly.\n\n  ```js\n  import { myTransformer } from \"client\"; // [!code --]\n  import { myTransformer } from \"client/transformers.gen\"; // [!code ++]\n  ```\n\n- [#1360](https://github.com/hey-api/openapi-ts/pull/1360) [`5f6ddd7`](https://github.com/hey-api/openapi-ts/commit/5f6ddd796f0ce77bcca55fd13981f2a8481aecd3) Thanks [@mrlubos](https://github.com/mrlubos)! - feat: add output.clean option\n\n  ### Added `output.clean` option\n\n  By default, the `output.path` folder will be emptied on every run. To preserve the previous behavior, set `output.clean` to `false`.\n\n  ```js\n  export default {\n    client: \"@hey-api/client-fetch\",\n    input: \"path/to/openapi.json\",\n    output: {\n      clean: false, // [!code ++]\n      path: \"src/client\",\n    },\n  };\n  ```\n\n- [#1362](https://github.com/hey-api/openapi-ts/pull/1362) [`3bf7169`](https://github.com/hey-api/openapi-ts/commit/3bf7169b620946d99c17cf5398d7a818d0099f94) Thanks [@mrlubos](https://github.com/mrlubos)! - feat: add typescript.enumsCase option\n\n### Patch Changes\n\n- [#1361](https://github.com/hey-api/openapi-ts/pull/1361) [`a23c25e`](https://github.com/hey-api/openapi-ts/commit/a23c25ea1b5ca8bf421302bf93690168df3473cb) Thanks [@mrlubos](https://github.com/mrlubos)! - fix: add before and after to pagination keywords\n\n- [#1368](https://github.com/hey-api/openapi-ts/pull/1368) [`cca2290`](https://github.com/hey-api/openapi-ts/commit/cca2290aeaab0b9807c928d73dbfc1e4bacadc4d) Thanks [@mrlubos](https://github.com/mrlubos)! - fix: export Plugin API namespace\n\n- [#1369](https://github.com/hey-api/openapi-ts/pull/1369) [`11163f0`](https://github.com/hey-api/openapi-ts/commit/11163f0d6885633078126849c04c0646e7d19255) Thanks [@mrlubos](https://github.com/mrlubos)! - fix: TanStack Query plugin handles conflict with internal function name in experimental parser\n\n## 0.57.1\n\n### Patch Changes\n\n- [#1335](https://github.com/hey-api/openapi-ts/pull/1335) [`bb9a848`](https://github.com/hey-api/openapi-ts/commit/bb9a84869dc911861f3b12f725a470b8fd6b67fe) Thanks [@mrlubos](https://github.com/mrlubos)! - fix: transformers correctly handle an array\n\n- [#1332](https://github.com/hey-api/openapi-ts/pull/1332) [`25b598b`](https://github.com/hey-api/openapi-ts/commit/25b598bcecd1dd3eb3da6b7c7f24f4adb0170114) Thanks [@mrlubos](https://github.com/mrlubos)! - fix: improve camelcase with abbreviated plurals\n\n- [#1333](https://github.com/hey-api/openapi-ts/pull/1333) [`734a62d`](https://github.com/hey-api/openapi-ts/commit/734a62dd8d594b8266964fe16766a481d37eb7df) Thanks [@mrlubos](https://github.com/mrlubos)! - fix: experimental parser generates url inside data types\n\n- [#1336](https://github.com/hey-api/openapi-ts/pull/1336) [`6857da8`](https://github.com/hey-api/openapi-ts/commit/6857da8a7f23829a89115b2237aaac9a71a38dfb) Thanks [@mrlubos](https://github.com/mrlubos)! - fix: experimental parser transforms anyOf date and null\n\n- [#1330](https://github.com/hey-api/openapi-ts/pull/1330) [`3d68587`](https://github.com/hey-api/openapi-ts/commit/3d6858748c94d6e33fd4dae7ddbf6cb70d21aaee) Thanks [@mrlubos](https://github.com/mrlubos)! - fix: experimental parser handles empty string and null enum values in JavaScript mode\n\n- [#1340](https://github.com/hey-api/openapi-ts/pull/1340) [`c8511e0`](https://github.com/hey-api/openapi-ts/commit/c8511e0d84dd408407bf764fb0bae4938b70dacb) Thanks [@mrlubos](https://github.com/mrlubos)! - fix: experimental parser exports reusable request bodies\n\n## 0.57.0\n\n### Minor Changes\n\n- [#1324](https://github.com/hey-api/openapi-ts/pull/1324) [`4e62378`](https://github.com/hey-api/openapi-ts/commit/4e62378352d8306580293ee4aeef43756d245f85) Thanks [@mrlubos](https://github.com/mrlubos)! - feat: rename Hey API plugins\n\n  ### Renamed `@hey-api/services` plugin\n\n  This plugin has been renamed to `@hey-api/sdk`.\n\n  ### Changed `sdk.output` value\n\n  To align with the updated name, the `@hey-api/sdk` plugin will generate an `sdk.gen.ts` file. This will result in a breaking change if you're importing from `services.gen.ts`. Please update your imports to reflect this change.\n\n  ```js\n  import { client } from \"client/services.gen\"; // [!code --]\n  import { client } from \"client/sdk.gen\"; // [!code ++]\n  ```\n\n  ### Renamed `@hey-api/types` plugin\n\n  This plugin has been renamed to `@hey-api/typescript`.\n\n- [#1327](https://github.com/hey-api/openapi-ts/pull/1327) [`62e37d5`](https://github.com/hey-api/openapi-ts/commit/62e37d51e9d829e11d08a494060c1e808ce2e3f3) Thanks [@mrlubos](https://github.com/mrlubos)! - feat: add typescript.exportInlineEnums option\n\n  ### Added `typescript.exportInlineEnums` option\n\n  By default, inline enums (enums not defined as reusable components in the input file) will be generated only as inlined union types. You can set `exportInlineEnums` to `true` to treat inline enums as reusable components. When `true`, the exported enums will follow the style defined in `enums`.\n\n  This is a breaking change since in the previous versions, inline enums were always treated as reusable components. To preserve your current output, set `exportInlineEnums` to `true`. This feature works only with the experimental parser.\n\n  ```js\n  export default {\n    client: \"@hey-api/client-fetch\",\n    experimentalParser: true,\n    input: \"path/to/openapi.json\",\n    output: \"src/client\",\n    plugins: [\n      // ...other plugins\n      {\n        exportInlineEnums: true, // [!code ++]\n        name: \"@hey-api/typescript\",\n      },\n    ],\n  };\n  ```\n\n### Patch Changes\n\n- [#1326](https://github.com/hey-api/openapi-ts/pull/1326) [`01c3d69`](https://github.com/hey-api/openapi-ts/commit/01c3d69e4c97262cd6dda5061f0a76f3b4fda31a) Thanks [@mrlubos](https://github.com/mrlubos)! - fix: improve generated enum keys in experimental parser\n\n## 0.56.3\n\n### Patch Changes\n\n- [#1319](https://github.com/hey-api/openapi-ts/pull/1319) [`af76a77`](https://github.com/hey-api/openapi-ts/commit/af76a7705c585fcfae0c72872f358936f7d19d56) Thanks [@mrlubos](https://github.com/mrlubos)! - fix: Zod plugin handles value constraints and defaults\n\n## 0.56.2\n\n### Patch Changes\n\n- [#1316](https://github.com/hey-api/openapi-ts/pull/1316) [`a79fac8`](https://github.com/hey-api/openapi-ts/commit/a79fac8919ed29eec7195cbd441ffa38b559d63c) Thanks [@mrlubos](https://github.com/mrlubos)! - fix: add input.exclude option\n\n- [#1316](https://github.com/hey-api/openapi-ts/pull/1316) [`a79fac8`](https://github.com/hey-api/openapi-ts/commit/a79fac8919ed29eec7195cbd441ffa38b559d63c) Thanks [@mrlubos](https://github.com/mrlubos)! - fix: make Zod plugin available in plugins options\n\n## 0.56.1\n\n### Patch Changes\n\n- [#1309](https://github.com/hey-api/openapi-ts/pull/1309) [`785480b`](https://github.com/hey-api/openapi-ts/commit/785480b2d5f96a681dfc1f7f0fb626f744bb221f) Thanks [@mrlubos](https://github.com/mrlubos)! - fix: gracefully handle invalid schema type in experimental parser\n\n## 0.56.0\n\n### Minor Changes\n\n- [#1286](https://github.com/hey-api/openapi-ts/pull/1286) [`5514de4`](https://github.com/hey-api/openapi-ts/commit/5514de46a8c913ddc40f07d0142c80266e9837cd) Thanks [@jacobinu](https://github.com/jacobinu)! - feat: add `fastify` plugin\n\n### Patch Changes\n\n- [#1286](https://github.com/hey-api/openapi-ts/pull/1286) [`cebf327`](https://github.com/hey-api/openapi-ts/commit/cebf327046c801b375846bae6b07561b8ad1bdd6) Thanks [@jacobinu](https://github.com/jacobinu)! - fix: export a map of error and response types by status code\n\n- [#1286](https://github.com/hey-api/openapi-ts/pull/1286) [`8a15a35`](https://github.com/hey-api/openapi-ts/commit/8a15a35e86ff22eca85dc218bc1793315b934556) Thanks [@jacobinu](https://github.com/jacobinu)! - fix: deprecate types.tree option\n\n- [#1305](https://github.com/hey-api/openapi-ts/pull/1305) [`a3698a7`](https://github.com/hey-api/openapi-ts/commit/a3698a7f1680d7dfb913c6253f8685ebbdd132ca) Thanks [@mrlubos](https://github.com/mrlubos)! - fix: handle file-like content media type without explicit schema\n\n## 0.55.3\n\n### Patch Changes\n\n- [#1283](https://github.com/hey-api/openapi-ts/pull/1283) [`781d1a4`](https://github.com/hey-api/openapi-ts/commit/781d1a40d10ce380f1ca2cb2bc7aca7d3b169bc6) Thanks [@hougesen](https://github.com/hougesen)! - feat: add support for oxlint as linter\n\n## 0.55.2\n\n### Patch Changes\n\n- [#1253](https://github.com/hey-api/openapi-ts/pull/1253) [`01dee3d`](https://github.com/hey-api/openapi-ts/commit/01dee3df879232939e43355231147b3d910fb482) Thanks [@mrlubos](https://github.com/mrlubos)! - fix: update sponsorship links\n\n- [#1266](https://github.com/hey-api/openapi-ts/pull/1266) [`d60d260`](https://github.com/hey-api/openapi-ts/commit/d60d260342ff3013c2e228151e9b897224eb89cc) Thanks [@mrlubos](https://github.com/mrlubos)! - fix: correctly generate array when items are a oneOf array with length 1\n\n- [#1265](https://github.com/hey-api/openapi-ts/pull/1265) [`691cdc2`](https://github.com/hey-api/openapi-ts/commit/691cdc28b6ad5bc1a38e1ae9eb134a2b41d4ead8) Thanks [@mrlubos](https://github.com/mrlubos)! - fix: handle non-exploded array query parameters\n\n- [#1267](https://github.com/hey-api/openapi-ts/pull/1267) [`ff3aa4a`](https://github.com/hey-api/openapi-ts/commit/ff3aa4ac58068671d2b9eedbd7528eb4f9969386) Thanks [@mrlubos](https://github.com/mrlubos)! - fix: handle discriminators in experimental parser\n\n## 0.55.1\n\n### Patch Changes\n\n- [#1248](https://github.com/hey-api/openapi-ts/pull/1248) [`61cd848`](https://github.com/hey-api/openapi-ts/commit/61cd848262b20580fb185d023c28aa54754bf19c) Thanks [@mrlubos](https://github.com/mrlubos)! - fix: handle nullable enums in experimental parser\n\n- [#1251](https://github.com/hey-api/openapi-ts/pull/1251) [`07800d4`](https://github.com/hey-api/openapi-ts/commit/07800d4fbb849614ed2c23b8acc9c82f1ef74598) Thanks [@mrlubos](https://github.com/mrlubos)! - fix: add support for custom plugins\n\n- [#1250](https://github.com/hey-api/openapi-ts/pull/1250) [`9e07675`](https://github.com/hey-api/openapi-ts/commit/9e07675802c75b8f5105dd104bb7736aeb83ece6) Thanks [@mrlubos](https://github.com/mrlubos)! - fix: render void for empty response status codes in experimental parser\n\n## 0.55.0\n\n### Minor Changes\n\n- [#1241](https://github.com/hey-api/openapi-ts/pull/1241) [`41cee41`](https://github.com/hey-api/openapi-ts/commit/41cee417055c50de6170e6fdeae65bd6e643d19c) Thanks [@mrlubos](https://github.com/mrlubos)! - feat: add input.include option\n\n### Patch Changes\n\n- [#1239](https://github.com/hey-api/openapi-ts/pull/1239) [`319a28a`](https://github.com/hey-api/openapi-ts/commit/319a28af29541d7f61cca82389e1d486204f321f) Thanks [@mrlubos](https://github.com/mrlubos)! - fix: handle pagination with basic refs\n\n## 0.54.4\n\n### Patch Changes\n\n- [#1237](https://github.com/hey-api/openapi-ts/pull/1237) [`63ccc07`](https://github.com/hey-api/openapi-ts/commit/63ccc0775e24a096bc46ac7ff29b99b694aad621) Thanks [@mrlubos](https://github.com/mrlubos)! - fix: forbid any body, path, or query parameters if not defined in spec\n\n- [#1235](https://github.com/hey-api/openapi-ts/pull/1235) [`7a1a419`](https://github.com/hey-api/openapi-ts/commit/7a1a419f07d5ad39e07265771b30d49a4b754a88) Thanks [@mrlubos](https://github.com/mrlubos)! - fix: handle additionalProperties: boolean in experimental parser\n\n- [#1233](https://github.com/hey-api/openapi-ts/pull/1233) [`08baa77`](https://github.com/hey-api/openapi-ts/commit/08baa77afdc5e2c49d4789b20673e949951ab0b2) Thanks [@mrlubos](https://github.com/mrlubos)! - fix: update schemas plugin to handle experimental 3.0.x parser\n\n  This release adds an experimental parser for OpenAPI versions 3.0.x. In the future, this will become the default parser. If you're using OpenAPI 3.0 or newer, we encourage you to try it out today.\n\n  You can enable the experimental parser by setting the `experimentalParser` boolean flag to `true` in your configuration file or CLI.\n\n  ```js\n  export default {\n    client: \"@hey-api/client-fetch\",\n    input: \"path/to/openapi.json\",\n    output: \"src/client\",\n    experimentalParser: true,\n  };\n  ```\n\n  ```sh\n  npx @hey-api/openapi-ts -i path/to/openapi.json -o src/client -c @hey-api/client-fetch -e\n  ```\n\n  The generated output should not structurally change, despite few things being generated in a different order. In fact, the output should be cleaner! That's the immediate side effect you should notice. If that's not true, please leave feedback in [GitHub issues](https://github.com/hey-api/openapi-ts/issues).\n\n  Hey API parser marks an important milestone towards v1 of `@hey-api/openapi-ts`. More features will be added to the parser in the future and the original parser from `openapi-typescript-codegen` will be deprecated and used only for generating legacy clients.\n\n  If you'd like to work with the parser more closely (e.g. to generate code not natively supported by this package), feel free to reach out with any feedback or suggestions. Happy parsing! 🎉\n\n## 0.54.3\n\n### Patch Changes\n\n- [#1230](https://github.com/hey-api/openapi-ts/pull/1230) [`3e65ae0`](https://github.com/hey-api/openapi-ts/commit/3e65ae06bcd2823482cf012909388c7630e18229) Thanks [@mrlubos](https://github.com/mrlubos)! - feat: add OpenAPI 3.0.x experimental parser\n\n  This release adds an experimental parser for OpenAPI versions 3.0.x. In the future, this will become the default parser. If you're using OpenAPI 3.0 or newer, we encourage you to try it out today.\n\n  You can enable the experimental parser by setting the `experimentalParser` boolean flag to `true` in your configuration file or CLI.\n\n  ```js\n  export default {\n    client: \"@hey-api/client-fetch\",\n    input: \"path/to/openapi.json\",\n    output: \"src/client\",\n    experimentalParser: true,\n  };\n  ```\n\n  ```sh\n  npx @hey-api/openapi-ts -i path/to/openapi.json -o src/client -c @hey-api/client-fetch -e\n  ```\n\n  The generated output should not structurally change, despite few things being generated in a different order. In fact, the output should be cleaner! That's the immediate side effect you should notice. If that's not true, please leave feedback in [GitHub issues](https://github.com/hey-api/openapi-ts/issues).\n\n  Hey API parser marks an important milestone towards v1 of `@hey-api/openapi-ts`. More features will be added to the parser in the future and the original parser from `openapi-typescript-codegen` will be deprecated and used only for generating legacy clients.\n\n  If you'd like to work with the parser more closely (e.g. to generate code not natively supported by this package), feel free to reach out with any feedback or suggestions. Happy parsing! 🎉\n\n## 0.54.2\n\n### Patch Changes\n\n- [#1222](https://github.com/hey-api/openapi-ts/pull/1222) [`ceb4363`](https://github.com/hey-api/openapi-ts/commit/ceb4363d52893ebe947e21aac402b868ff2820d4) Thanks [@mrlubos](https://github.com/mrlubos)! - feat: add support for @tanstack/angular-query-experimental package\n\n## 0.54.1\n\n### Patch Changes\n\n- [#1211](https://github.com/hey-api/openapi-ts/pull/1211) [`c8a3e3d`](https://github.com/hey-api/openapi-ts/commit/c8a3e3d7e59692698b7cf45182ca92494fc4af96) Thanks [@mrlubos](https://github.com/mrlubos)! - fix: ignore name option when not used with legacy clients to avoid producing broken output\n\n- [#1209](https://github.com/hey-api/openapi-ts/pull/1209) [`3a80b9f`](https://github.com/hey-api/openapi-ts/commit/3a80b9fd009c8229d69f3f349acbfb19b7549a94) Thanks [@mrlubos](https://github.com/mrlubos)! - fix: add support for OpenAPI 3.1.1 to experimental parser\n\n## 0.54.0\n\n### Minor Changes\n\n- [#1201](https://github.com/hey-api/openapi-ts/pull/1201) [`972a93a`](https://github.com/hey-api/openapi-ts/commit/972a93a91a945cc9ead73c08bb0fa9ee120433ba) Thanks [@mrlubos](https://github.com/mrlubos)! - feat: make plugins first-class citizens\n\n  This release makes plugins first-class citizens. In order to achieve that, the following breaking changes were introduced.\n\n  ### Removed CLI options\n\n  The `--types`, `--schemas`, and `--services` CLI options have been removed. You can list which plugins you'd like to use explicitly by passing a list of plugins as `--plugins <plugin1> <plugin2>`\n\n  ### Removed `*.export` option\n\n  Previously, you could explicitly disable export of certain artifacts using the `*.export` option or its shorthand variant. These were both removed. You can now disable export of specific artifacts by manually defining an array of `plugins` and excluding the unwanted plugin.\n\n  ::: code-group\n\n  ```js [shorthand]\n  export default {\n    client: \"@hey-api/client-fetch\",\n    input: \"path/to/openapi.json\",\n    output: \"src/client\",\n    schemas: false, // [!code --]\n    plugins: [\"@hey-api/types\", \"@hey-api/services\"], // [!code ++]\n  };\n  ```\n\n  ```js [*.export]\n  export default {\n    client: \"@hey-api/client-fetch\",\n    input: \"path/to/openapi.json\",\n    output: \"src/client\",\n    schemas: {\n      export: false, // [!code --]\n    },\n    plugins: [\"@hey-api/types\", \"@hey-api/services\"], // [!code ++]\n  };\n  ```\n\n  :::\n\n  ### Renamed `schemas.name` option\n\n  Each plugin definition contains a `name` field. This was conflicting with the `schemas.name` option. As a result, it has been renamed to `nameBuilder`.\n\n  ```js\n  export default {\n    client: \"@hey-api/client-fetch\",\n    input: \"path/to/openapi.json\",\n    output: \"src/client\",\n    schemas: {\n      name: (name) => `${name}Schema`, // [!code --]\n    },\n    plugins: [\n      // ...other plugins\n      {\n        nameBuilder: (name) => `${name}Schema`, // [!code ++]\n        name: \"@hey-api/schemas\",\n      },\n    ],\n  };\n  ```\n\n  ### Removed `services.include` shorthand option\n\n  Previously, you could use a string value as a shorthand for the `services.include` configuration option. You can now achieve the same result using the `include` option.\n\n  ```js\n  export default {\n    client: \"@hey-api/client-fetch\",\n    input: \"path/to/openapi.json\",\n    output: \"src/client\",\n    services: \"^MySchema\", // [!code --]\n    plugins: [\n      // ...other plugins\n      {\n        include: \"^MySchema\", // [!code ++]\n        name: \"@hey-api/services\",\n      },\n    ],\n  };\n  ```\n\n  ### Renamed `services.name` option\n\n  Each plugin definition contains a `name` field. This was conflicting with the `services.name` option. As a result, it has been renamed to `serviceNameBuilder`.\n\n  ```js\n  export default {\n    client: \"@hey-api/client-fetch\",\n    input: \"path/to/openapi.json\",\n    output: \"src/client\",\n    services: {\n      name: \"{{name}}Service\", // [!code --]\n    },\n    plugins: [\n      // ...other plugins\n      {\n        serviceNameBuilder: \"{{name}}Service\", // [!code ++]\n        name: \"@hey-api/services\",\n      },\n    ],\n  };\n  ```\n\n  ### Renamed `types.dates` option\n\n  Previously, you could set `types.dates` to a boolean or a string value, depending on whether you wanted to transform only type strings into dates, or runtime code too. Many people found these options confusing, so they have been simplified to a boolean and extracted into a separate `@hey-api/transformers` plugin.\n\n  ```js\n  export default {\n    client: \"@hey-api/client-fetch\",\n    input: \"path/to/openapi.json\",\n    output: \"src/client\",\n    types: {\n      dates: \"types+transform\", // [!code --]\n    },\n    plugins: [\n      // ...other plugins\n      {\n        dates: true, // [!code ++]\n        name: \"@hey-api/transformers\",\n      },\n    ],\n  };\n  ```\n\n  ### Removed `types.include` shorthand option\n\n  Previously, you could use a string value as a shorthand for the `types.include` configuration option. You can now achieve the same result using the `include` option.\n\n  ```js\n  export default {\n    client: \"@hey-api/client-fetch\",\n    input: \"path/to/openapi.json\",\n    output: \"src/client\",\n    types: \"^MySchema\", // [!code --]\n    plugins: [\n      // ...other plugins\n      {\n        include: \"^MySchema\", // [!code ++]\n        name: \"@hey-api/types\",\n      },\n    ],\n  };\n  ```\n\n  ### Renamed `types.name` option\n\n  Each plugin definition contains a `name` field. This was conflicting with the `types.name` option. As a result, it has been renamed to `style`.\n\n  ```js\n  export default {\n    client: \"@hey-api/client-fetch\",\n    input: \"path/to/openapi.json\",\n    output: \"src/client\",\n    types: {\n      name: \"PascalCase\", // [!code --]\n    },\n    plugins: [\n      // ...other plugins\n      {\n        name: \"@hey-api/types\",\n        style: \"PascalCase\", // [!code ++]\n      },\n    ],\n  };\n  ```\n\n## 0.53.12\n\n### Patch Changes\n\n- [#1195](https://github.com/hey-api/openapi-ts/pull/1195) [`753643f`](https://github.com/hey-api/openapi-ts/commit/753643fae74d4248df8dc5fe9dda5f28a1dabdf1) Thanks [@mrlubos](https://github.com/mrlubos)! - fix: TanStack Query plugin using missing import for infinite query\n\n- [#1194](https://github.com/hey-api/openapi-ts/pull/1194) [`c38deaf`](https://github.com/hey-api/openapi-ts/commit/c38deaf02b606b92edd9c316b1444b6b6c12916d) Thanks [@mrlubos](https://github.com/mrlubos)! - fix: pass TanStack query signal to client call\n\n## 0.53.11\n\n### Patch Changes\n\n- [#1151](https://github.com/hey-api/openapi-ts/pull/1151) [`587791d`](https://github.com/hey-api/openapi-ts/commit/587791dfede0167fbed229281467e4c4875936f5) Thanks [@mrlubos](https://github.com/mrlubos)! - fix: update website domain, add license documentation\n\n## 0.53.10\n\n### Patch Changes\n\n- [#1145](https://github.com/hey-api/openapi-ts/pull/1145) [`a0a5551`](https://github.com/hey-api/openapi-ts/commit/a0a55510d30a1a8dea0ade4908b5b13d51b5f9e6) Thanks [@mrlubos](https://github.com/mrlubos)! - fix: update license field in package.json to match the license, revert client packages license to MIT\n\n## 0.53.9\n\n### Patch Changes\n\n- [#1137](https://github.com/hey-api/openapi-ts/pull/1137) [`f4566c2`](https://github.com/hey-api/openapi-ts/commit/f4566c2bcd67f45f069bfa6220d3c710177f28cc) Thanks [@BierDav](https://github.com/BierDav)! - Add support for passing mutation specific options to `<operation_id>Mutation(options)`\n\n## 0.53.8\n\n### Patch Changes\n\n- [#1123](https://github.com/hey-api/openapi-ts/pull/1123) [`032338c`](https://github.com/hey-api/openapi-ts/commit/032338c47506ccfd567bbbf915398942c8394bc2) Thanks [@mrlubos](https://github.com/mrlubos)! - fix: use correct relative path to bundled client when imported from nested module\n\n## 0.53.7\n\n### Patch Changes\n\n- [#1113](https://github.com/hey-api/openapi-ts/pull/1113) [`dc696e0`](https://github.com/hey-api/openapi-ts/commit/dc696e0b4500dba5ceb4c772110b123bd2f71b40) Thanks [@mrlubos](https://github.com/mrlubos)! - fix: skip nested properties in oneOf and anyOf compositions\n\n- [#1115](https://github.com/hey-api/openapi-ts/pull/1115) [`5f077dd`](https://github.com/hey-api/openapi-ts/commit/5f077dd8d144bbfe71d8775bad5fe7ddda2315d6) Thanks [@mrlubos](https://github.com/mrlubos)! - fix: abstract page params logic in TanStack Query plugin\n\n## 0.53.6\n\n### Patch Changes\n\n- [#1104](https://github.com/hey-api/openapi-ts/pull/1104) [`a1eada1`](https://github.com/hey-api/openapi-ts/commit/a1eada1896046f0de1710682635efc59434a1e2c) Thanks [@mrlubos](https://github.com/mrlubos)! - fix: export spec-compliant OpenAPI 3.1 interface\n\n- [#1108](https://github.com/hey-api/openapi-ts/pull/1108) [`7677924`](https://github.com/hey-api/openapi-ts/commit/76779246534391deca5a371df2c7dc76e9d2eb73) Thanks [@mrlubos](https://github.com/mrlubos)! - fix: handle multiple form-data parameters in Swagger 2.0\n\n## 0.53.5\n\n### Patch Changes\n\n- [#1096](https://github.com/hey-api/openapi-ts/pull/1096) [`b6e350a`](https://github.com/hey-api/openapi-ts/commit/b6e350a9cc2d82ac4496b7d57ec8b58978c951c2) Thanks [@mrlubos](https://github.com/mrlubos)! - fix: make TanStack Query plugin work with class-based services\n\n- [#1095](https://github.com/hey-api/openapi-ts/pull/1095) [`11ee53f`](https://github.com/hey-api/openapi-ts/commit/11ee53f4f519643ae7e3f0997ce4fe9b6cb050a8) Thanks [@mrlubos](https://github.com/mrlubos)! - fix: avoid printing duplicate null nodes\n\n- [#1094](https://github.com/hey-api/openapi-ts/pull/1094) [`713ccd5`](https://github.com/hey-api/openapi-ts/commit/713ccd5e5e250a14cacf96fd1dffad252cc4cc6a) Thanks [@mrlubos](https://github.com/mrlubos)! - fix: attach TanStack Query infinite page params only if they exist\n\n## 0.53.4\n\n### Patch Changes\n\n- [#1087](https://github.com/hey-api/openapi-ts/pull/1087) [`b528236`](https://github.com/hey-api/openapi-ts/commit/b528236b626d12d4ac03b98b8abecc425291c5e5) Thanks [@mrlubos](https://github.com/mrlubos)! - fix: import handlebars instead of runtime\n\n- [#1086](https://github.com/hey-api/openapi-ts/pull/1086) [`0bc1ebe`](https://github.com/hey-api/openapi-ts/commit/0bc1ebe318399d01296777746ce0bccc83c0e83d) Thanks [@mrlubos](https://github.com/mrlubos)! - fix: support dynamic require in child_process\n\n## 0.53.3\n\n### Patch Changes\n\n- [#1075](https://github.com/hey-api/openapi-ts/pull/1075) [`11a276a`](https://github.com/hey-api/openapi-ts/commit/11a276a1e35dde0735363e892d8142016fd87eec) Thanks [@mrlubos](https://github.com/mrlubos)! - fix: properly handle dual publishing and type generation\n\n## 0.53.2\n\n### Patch Changes\n\n- [#1060](https://github.com/hey-api/openapi-ts/pull/1060) [`8d66c08`](https://github.com/hey-api/openapi-ts/commit/8d66c085cf81e0e166c3e172ce319d5e2d4002bf) Thanks [@mrlubos](https://github.com/mrlubos)! - fix: handle colon in operation path\n\n- [#1065](https://github.com/hey-api/openapi-ts/pull/1065) [`a756987`](https://github.com/hey-api/openapi-ts/commit/a756987ad396fd7e68cc5eff63f6615bffef3782) Thanks [@mrlubos](https://github.com/mrlubos)! - fix: allow overriding generated headers from options\n\n- [#1068](https://github.com/hey-api/openapi-ts/pull/1068) [`a48be86`](https://github.com/hey-api/openapi-ts/commit/a48be8660f6d1d84fdf25a3952587fb963482e8a) Thanks [@mrlubos](https://github.com/mrlubos)! - fix: export Operation interface\n\n- [#1067](https://github.com/hey-api/openapi-ts/pull/1067) [`5a52da1`](https://github.com/hey-api/openapi-ts/commit/5a52da1425abef9f4fef58ef077dbd05545e25a2) Thanks [@mrlubos](https://github.com/mrlubos)! - fix: handle named object property with no nested properties\n\n- [#1066](https://github.com/hey-api/openapi-ts/pull/1066) [`e8a38ae`](https://github.com/hey-api/openapi-ts/commit/e8a38ae4e3f021a105d18764ef3252db7efa9aa0) Thanks [@mrlubos](https://github.com/mrlubos)! - fix: transform any-of nullable dates\n\n## 0.53.1\n\n### Patch Changes\n\n- [#1050](https://github.com/hey-api/openapi-ts/pull/1050) [`6922b5a`](https://github.com/hey-api/openapi-ts/commit/6922b5a3ebe67190d2034ea79674706a5e80e818) Thanks [@mrlubos](https://github.com/mrlubos)! - fix: throw error on invalid client value\n\n## 0.53.0\n\n### Minor Changes\n\n- [#1008](https://github.com/hey-api/openapi-ts/pull/1008) [`dc4a40d`](https://github.com/hey-api/openapi-ts/commit/dc4a40d517853e4cf5be532f5bf4874c84c924be) Thanks [@mrlubos](https://github.com/mrlubos)! - feat: rename legacy clients with 'legacy/' prefix\n\n- [#1009](https://github.com/hey-api/openapi-ts/pull/1009) [`c6b044d`](https://github.com/hey-api/openapi-ts/commit/c6b044d0bc9dc54cb0eb58d23438f4e1d050cb38) Thanks [@mrlubos](https://github.com/mrlubos)! - feat: change schemas name pattern, add schemas.name option\n\n### Patch Changes\n\n- [#989](https://github.com/hey-api/openapi-ts/pull/989) [`bc78a42`](https://github.com/hey-api/openapi-ts/commit/bc78a421eafed1920102b796842e227cacda6ef0) Thanks [@jacobinu](https://github.com/jacobinu)! - fix: make UserConfig interface instead of type\n\n- [#1010](https://github.com/hey-api/openapi-ts/pull/1010) [`b6e58c6`](https://github.com/hey-api/openapi-ts/commit/b6e58c64d1b71897533a85d1738cd7ce7ede178d) Thanks [@mrlubos](https://github.com/mrlubos)! - fix: set query key base url from supplied client if provided\n\n## 0.52.11\n\n### Patch Changes\n\n- [#981](https://github.com/hey-api/openapi-ts/pull/981) [`afd8c43`](https://github.com/hey-api/openapi-ts/commit/afd8c4386fb7b2f86a54e73c9471945bdfad22ea) Thanks [@mrlubos](https://github.com/mrlubos)! - fix: export query key functions from TanStack Query plugin\n\n## 0.52.10\n\n### Patch Changes\n\n- [#973](https://github.com/hey-api/openapi-ts/pull/973) [`8f7a14f`](https://github.com/hey-api/openapi-ts/commit/8f7a14f570e2d17053f1e612f6e045df774916f1) Thanks [@jacobinu](https://github.com/jacobinu)! - fix: handle tree-shakeable angular client case\n\n## 0.52.9\n\n### Patch Changes\n\n- [#948](https://github.com/hey-api/openapi-ts/pull/948) [`ebfd6ee`](https://github.com/hey-api/openapi-ts/commit/ebfd6eec434d7b84883a8f9058f31948fb1a40f2) Thanks [@mrlubos](https://github.com/mrlubos)! - fix: handle schemas with generics from C#\n\n- [#949](https://github.com/hey-api/openapi-ts/pull/949) [`16f8956`](https://github.com/hey-api/openapi-ts/commit/16f89566a7affeb09a6b928c43cfa2733e8b9adc) Thanks [@mrlubos](https://github.com/mrlubos)! - fix: rename infinite key in query key to \\_infinite\n\n- [#946](https://github.com/hey-api/openapi-ts/pull/946) [`f873fa6`](https://github.com/hey-api/openapi-ts/commit/f873fa67befe60b2fd8f63bc2c8b73437591f686) Thanks [@mrlubos](https://github.com/mrlubos)! - chore: warn on duplicate operation ID\n\n- [#947](https://github.com/hey-api/openapi-ts/pull/947) [`7f0fefe`](https://github.com/hey-api/openapi-ts/commit/7f0fefec92b25ce18ed0d1c6a6edf1adbc7d4481) Thanks [@mrlubos](https://github.com/mrlubos)! - fix: correctly use parentheses around composed schemas\n\n- [#944](https://github.com/hey-api/openapi-ts/pull/944) [`2f7cc89`](https://github.com/hey-api/openapi-ts/commit/2f7cc8986c0644b41cc6a5526ddf52ebff880c79) Thanks [@mrlubos](https://github.com/mrlubos)! - fix: correctly handle integer type in additional properties\n\n## 0.52.8\n\n### Patch Changes\n\n- [#932](https://github.com/hey-api/openapi-ts/pull/932) [`cdf01e8`](https://github.com/hey-api/openapi-ts/commit/cdf01e8cc0dc63213465b9e8fe33b80443d36f55) Thanks [@mrlubos](https://github.com/mrlubos)! - fix: cherry pick keys in mutation page param type\n\n## 0.52.7\n\n### Patch Changes\n\n- [#929](https://github.com/hey-api/openapi-ts/pull/929) [`b56c81c`](https://github.com/hey-api/openapi-ts/commit/b56c81ca67a2d069b33430c3139e2135a299b309) Thanks [@mrlubos](https://github.com/mrlubos)! - fix: handle various issues with additionalProperties definitions\n\n- [#927](https://github.com/hey-api/openapi-ts/pull/927) [`65f151d`](https://github.com/hey-api/openapi-ts/commit/65f151dc0004ce817bc370486495bdd281439e55) Thanks [@mrlubos](https://github.com/mrlubos)! - fix: update TanStack Query key to contain base URL\n\n- [#927](https://github.com/hey-api/openapi-ts/pull/927) [`65f151d`](https://github.com/hey-api/openapi-ts/commit/65f151dc0004ce817bc370486495bdd281439e55) Thanks [@mrlubos](https://github.com/mrlubos)! - fix: change TanStack Query mutation helpers to functions for consistent API\n\n## 0.52.6\n\n### Patch Changes\n\n- [#920](https://github.com/hey-api/openapi-ts/pull/920) [`4ff2404`](https://github.com/hey-api/openapi-ts/commit/4ff24049457b7d0d5333c3704f488f1f45dd0c5b) Thanks [@mrlubos](https://github.com/mrlubos)! - fix: add preview version of TanStack Query plugin\n\n## 0.52.5\n\n### Patch Changes\n\n- [#910](https://github.com/hey-api/openapi-ts/pull/910) [`428dcad`](https://github.com/hey-api/openapi-ts/commit/428dcad06eba3ab14876c28092a6df81fcde7dbe) Thanks [@mrlubos](https://github.com/mrlubos)! - fix: throw if prerequisite checks are not met\n\n- [#907](https://github.com/hey-api/openapi-ts/pull/907) [`a2a1ab8`](https://github.com/hey-api/openapi-ts/commit/a2a1ab8bd78c2cbbdcb7adb2ba3815250843dbe7) Thanks [@mrlubos](https://github.com/mrlubos)! - fix: correctly transform string to pascalcase when referenced inside schema\n\n- [#908](https://github.com/hey-api/openapi-ts/pull/908) [`225b640`](https://github.com/hey-api/openapi-ts/commit/225b640b5ac628cb7ba3b7afb39ff271a0608055) Thanks [@mrlubos](https://github.com/mrlubos)! - fix: do not generate types tree by default if services are enabled as it is unused\n\n## 0.52.4\n\n### Patch Changes\n\n- [#895](https://github.com/hey-api/openapi-ts/pull/895) [`44de8d8`](https://github.com/hey-api/openapi-ts/commit/44de8d89556b3abf48acc4e23c9b9c198059c757) Thanks [@mrlubos](https://github.com/mrlubos)! - fix: define ThrowOnError generic as the last argument\n\n## 0.52.3\n\n### Patch Changes\n\n- [#884](https://github.com/hey-api/openapi-ts/pull/884) [`62a39e6`](https://github.com/hey-api/openapi-ts/commit/62a39e63f645bce0801779fb6b90531401748e86) Thanks [@mrlubos](https://github.com/mrlubos)! - fix: generate ThrowOnError generic for class-based client methods\n\n## 0.52.2\n\n### Patch Changes\n\n- [#881](https://github.com/hey-api/openapi-ts/pull/881) [`a9ddfe6`](https://github.com/hey-api/openapi-ts/commit/a9ddfe6c4487fe5debd04a194ee6c6b6c611dc6b) Thanks [@hougesen](https://github.com/hougesen)! - fix: check if key is schema property before removing\n\n## 0.52.1\n\n### Patch Changes\n\n- [#855](https://github.com/hey-api/openapi-ts/pull/855) [`7ac6274`](https://github.com/hey-api/openapi-ts/commit/7ac627463a15fa6be2c9d103b25200355df6b166) Thanks [@mrlubos](https://github.com/mrlubos)! - fix: define multiple errors type as union instead of intersection\n\n- [#853](https://github.com/hey-api/openapi-ts/pull/853) [`6ab387d`](https://github.com/hey-api/openapi-ts/commit/6ab387d3440ec5ec524e7f198aedfa6734431d76) Thanks [@mrlubos](https://github.com/mrlubos)! - fix: remove Content-Type header with multipart/form-data content type\n\n- [#861](https://github.com/hey-api/openapi-ts/pull/861) [`21ccf90`](https://github.com/hey-api/openapi-ts/commit/21ccf90b864590c211fbfa3de5c687dd3c48f897) Thanks [@qqilihq](https://github.com/qqilihq)! - fix: Additional properties key\n\n- [#869](https://github.com/hey-api/openapi-ts/pull/869) [`42d8a41`](https://github.com/hey-api/openapi-ts/commit/42d8a4151bace7b70af60a1abe46b7550ddad686) Thanks [@SamuelGuillemet](https://github.com/SamuelGuillemet)! - fix: add conditionnal generation for service related types\n\n## 0.52.0\n\n### Minor Changes\n\n- [#835](https://github.com/hey-api/openapi-ts/pull/835) [`7ab277b`](https://github.com/hey-api/openapi-ts/commit/7ab277b22467fe268719af817aee701d6be3e828) Thanks [@LeeChSien](https://github.com/LeeChSien)! - feat: add namespace supporting for enums\n\n### Patch Changes\n\n- [#830](https://github.com/hey-api/openapi-ts/pull/830) [`babf11a`](https://github.com/hey-api/openapi-ts/commit/babf11ae082af642ac71cfee9c523cc976132a50) Thanks [@mrlubos](https://github.com/mrlubos)! - fix: generate internal client for services when using standalone package\n\n## 0.51.0\n\n### Minor Changes\n\n- [#828](https://github.com/hey-api/openapi-ts/pull/828) [`82a4696`](https://github.com/hey-api/openapi-ts/commit/82a4696b0b209ea2d9147f47f213479e61aed3d7) Thanks [@mrlubos](https://github.com/mrlubos)! - feat: make `client` config option required\n\n### Patch Changes\n\n- [#823](https://github.com/hey-api/openapi-ts/pull/823) [`23c9dcd`](https://github.com/hey-api/openapi-ts/commit/23c9dcd5de19de62d745cc539674c815b2588cd2) Thanks [@mrlubos](https://github.com/mrlubos)! - fix: correctly process body parameter for OpenAPI 2.0 specs\n\n- [#827](https://github.com/hey-api/openapi-ts/pull/827) [`8d81c06`](https://github.com/hey-api/openapi-ts/commit/8d81c0605dbf4b4d19ec1c2dc51a93f8a2aca5b2) Thanks [@mrlubos](https://github.com/mrlubos)! - fix: do not ignore api-version param in standalone clients\n\n## 0.50.2\n\n### Patch Changes\n\n- [#818](https://github.com/hey-api/openapi-ts/pull/818) [`85d123c`](https://github.com/hey-api/openapi-ts/commit/85d123c9160f4ecb4c48e8a2ead54abf604dd21b) Thanks [@mrlubos](https://github.com/mrlubos)! - fix: handle fully illegal schema names\n\n## 0.50.1\n\n### Patch Changes\n\n- [#807](https://github.com/hey-api/openapi-ts/pull/807) [`ef249ba`](https://github.com/hey-api/openapi-ts/commit/ef249ba5bd04dbfb0e0a497caaa021f9c7de6949) Thanks [@mrlubos](https://github.com/mrlubos)! - fix: generate types only for filtered services\n\n- [#807](https://github.com/hey-api/openapi-ts/pull/807) [`ef249ba`](https://github.com/hey-api/openapi-ts/commit/ef249ba5bd04dbfb0e0a497caaa021f9c7de6949) Thanks [@mrlubos](https://github.com/mrlubos)! - fix: allow any key/value pair in object types with empty properties object\n\n## 0.50.0\n\n### Minor Changes\n\n- [#790](https://github.com/hey-api/openapi-ts/pull/790) [`68c3921`](https://github.com/hey-api/openapi-ts/commit/68c3921fd6e9a5db41ebd9f06e4f3ef6e64ab051) Thanks [@mrlubos](https://github.com/mrlubos)! - feat: allow bundling standalone clients with `client.bundle = true`\n\n## 0.49.0\n\n### Minor Changes\n\n- [#787](https://github.com/hey-api/openapi-ts/pull/787) [`327c5fb`](https://github.com/hey-api/openapi-ts/commit/327c5fb629f0c7b9c727da87b6bc287b8e98bcd5) Thanks [@mrlubos](https://github.com/mrlubos)! - feat: allow filtering service endpoints with `services.filter`\n\n### Patch Changes\n\n- [#784](https://github.com/hey-api/openapi-ts/pull/784) [`f12dccf`](https://github.com/hey-api/openapi-ts/commit/f12dccf0ae3a05badb5783354bcd093f18f3ab74) Thanks [@mrlubos](https://github.com/mrlubos)! - fix: suffix illegal service names\n\n- [#786](https://github.com/hey-api/openapi-ts/pull/786) [`20759e2`](https://github.com/hey-api/openapi-ts/commit/20759e2cc52d78974fc0f78f581e9d9cb2d21ca5) Thanks [@mrlubos](https://github.com/mrlubos)! - fix: handle references to schemas with illegal names\n\n- [#788](https://github.com/hey-api/openapi-ts/pull/788) [`ecd94f2`](https://github.com/hey-api/openapi-ts/commit/ecd94f2adab1dbe10e7a9c310d1fb6d1f170d332) Thanks [@mrlubos](https://github.com/mrlubos)! - fix: handle application/x-www-form-urlencoded content in request body\n\n## 0.48.3\n\n### Patch Changes\n\n- [#781](https://github.com/hey-api/openapi-ts/pull/781) [`df3b799`](https://github.com/hey-api/openapi-ts/commit/df3b79996d47a69e4f2fdad93cea18ae1a01c419) Thanks [@mrlubos](https://github.com/mrlubos)! - fix: use methodNameBuilder when asClass is false\n\n- [#782](https://github.com/hey-api/openapi-ts/pull/782) [`edfd2bd`](https://github.com/hey-api/openapi-ts/commit/edfd2bdbb64f6682ded16f6da30f88f1c113bbe0) Thanks [@mrlubos](https://github.com/mrlubos)! - fix: allow not generating types tree with types.tree = false\n\n## 0.48.2\n\n### Patch Changes\n\n- [#746](https://github.com/hey-api/openapi-ts/pull/746) [`0448823`](https://github.com/hey-api/openapi-ts/commit/044882399d56d1532c7125df2e69cfb3b5fb4f34) Thanks [@mrlubos](https://github.com/mrlubos)! - fix: handle formData parameters in generated types\n\n- [#742](https://github.com/hey-api/openapi-ts/pull/742) [`efc30f4`](https://github.com/hey-api/openapi-ts/commit/efc30f4a2327b165b62f8467c68351a8bf94ffe5) Thanks [@mrlubos](https://github.com/mrlubos)! - fix: ignore services.asClass setting for named clients\n\n- [#744](https://github.com/hey-api/openapi-ts/pull/744) [`1e9edde`](https://github.com/hey-api/openapi-ts/commit/1e9edde54abd8978405f91b821c99b97f067d566) Thanks [@mrlubos](https://github.com/mrlubos)! - fix: improve default response type detection\n\n- [#745](https://github.com/hey-api/openapi-ts/pull/745) [`342772a`](https://github.com/hey-api/openapi-ts/commit/342772a560378c6718d25c29871eeab9a72c62a6) Thanks [@mrlubos](https://github.com/mrlubos)! - fix: handle properties in one-of composition\n\n## 0.48.1\n\n### Patch Changes\n\n- [#734](https://github.com/hey-api/openapi-ts/pull/734) [`1f52b26`](https://github.com/hey-api/openapi-ts/commit/1f52b260807531edb2c14003473ea4907007ecdb) Thanks [@mrlubos](https://github.com/mrlubos)! - fix: generate service types when types are enabled, even if services are disabled\n\n- [#737](https://github.com/hey-api/openapi-ts/pull/737) [`0537fe8`](https://github.com/hey-api/openapi-ts/commit/0537fe8682a93cc95d7637d643db4b9780318ea1) Thanks [@mrlubos](https://github.com/mrlubos)! - fix: support custom config file path\n\n- [#736](https://github.com/hey-api/openapi-ts/pull/736) [`8410046`](https://github.com/hey-api/openapi-ts/commit/8410046c45d25db48ba940a0c6c7a7cda9e86b6a) Thanks [@mrlubos](https://github.com/mrlubos)! - fix: handle async response transformers\n\n## 0.48.0\n\n### Minor Changes\n\n- [#696](https://github.com/hey-api/openapi-ts/pull/696) [`917405f`](https://github.com/hey-api/openapi-ts/commit/917405fcdcb2e978df693eb51720afa6fcf914e2) Thanks [@anchan828](https://github.com/anchan828)! - feat: pass the Operation object to methodNameBuilder\n\n### Patch Changes\n\n- [#708](https://github.com/hey-api/openapi-ts/pull/708) [`36cf95d`](https://github.com/hey-api/openapi-ts/commit/36cf95d319b175149d3b3ecc382b8d739186e658) Thanks [@mrlubos](https://github.com/mrlubos)! - fix: make getHeaders() accept generic\n\n- [#712](https://github.com/hey-api/openapi-ts/pull/712) [`6a5b96b`](https://github.com/hey-api/openapi-ts/commit/6a5b96b59e4248f2acaf5422be262edde97427dd) Thanks [@mrlubos](https://github.com/mrlubos)! - fix: handle void responses in transformers\n\n## 0.47.2\n\n### Patch Changes\n\n- [#701](https://github.com/hey-api/openapi-ts/pull/701) [`1081bbf`](https://github.com/hey-api/openapi-ts/commit/1081bbf5082450c18547dac4737ecc0e312cdd0e) Thanks [@mrlubos](https://github.com/mrlubos)! - feat: add initial implementation of prefixItems\n\n## 0.47.1\n\n### Patch Changes\n\n- [#690](https://github.com/hey-api/openapi-ts/pull/690) [`1017ace`](https://github.com/hey-api/openapi-ts/commit/1017acee80630d84a08bd8f0087c8fb0de270f1a) Thanks [@Nick-Lucas](https://github.com/Nick-Lucas)! - Fix an issue where transforms for endpoints with array returns were not generated correctly\n\n## 0.47.0\n\n### Minor Changes\n\n- [#685](https://github.com/hey-api/openapi-ts/pull/685) [`8ca3e5e`](https://github.com/hey-api/openapi-ts/commit/8ca3e5e2990bc07ce0bac902245d08b67b6621e8) Thanks [@mrlubos](https://github.com/mrlubos)! - feat: add initial support for response transformers (string -> Date)\n\n- [#663](https://github.com/hey-api/openapi-ts/pull/663) [`e01c612`](https://github.com/hey-api/openapi-ts/commit/e01c61213e266afad5e3b159682b05957aac6534) Thanks [@Stono](https://github.com/Stono)! - Add support for customizing method names with `services.methodNameBuilder()`\n\n## 0.46.3\n\n### Patch Changes\n\n- [#594](https://github.com/hey-api/openapi-ts/pull/594) [`9878381`](https://github.com/hey-api/openapi-ts/commit/98783811e0c90705ddac2cc5e54c524aae634865) Thanks [@SimenB](https://github.com/SimenB)! - Add explicit type annotations to `Interceptors`\n\n  This allows the generated code to work with TypeScript 5.5's new `isolatedDeclarations` configuration.\n\n- [#635](https://github.com/hey-api/openapi-ts/pull/635) [`0b09940`](https://github.com/hey-api/openapi-ts/commit/0b0994050dbcb6c17e8b78ca1c77738fc8e0d498) Thanks [@mrlubos](https://github.com/mrlubos)! - fix: handle 1XX response status codes\n\n- [#636](https://github.com/hey-api/openapi-ts/pull/636) [`498f459`](https://github.com/hey-api/openapi-ts/commit/498f45979b91bf93b319413c60492af94a08df48) Thanks [@mrlubos](https://github.com/mrlubos)! - fix: improve default response status code classification\n\n## 0.46.2\n\n### Patch Changes\n\n- fix: do not transform property names for standalone clients ([#616](https://github.com/hey-api/openapi-ts/pull/616))\n\n## 0.46.1\n\n### Patch Changes\n\n- fix: handle application/json content type in parameter definitions ([#614](https://github.com/hey-api/openapi-ts/pull/614))\n\n## 0.46.0\n\n### Minor Changes\n\n- feat: tree-shakeable services ([#602](https://github.com/hey-api/openapi-ts/pull/602))\n\n## 0.45.1\n\n### Patch Changes\n\n- fix: use generated types in request object instead of inlined duplicated params ([#582](https://github.com/hey-api/openapi-ts/pull/582))\n\n## 0.45.0\n\n### Minor Changes\n\n- feat: remove client inference ([#569](https://github.com/hey-api/openapi-ts/pull/569))\n\n### Patch Changes\n\n- fix: deduplicate inlined enums ([#573](https://github.com/hey-api/openapi-ts/pull/573))\n\n- fix: generate correct optional key in types when using positional arguments (useOptions: false) ([#572](https://github.com/hey-api/openapi-ts/pull/572))\n\n## 0.44.0\n\n### Minor Changes\n\n- feat: move format and lint config options to output object ([#546](https://github.com/hey-api/openapi-ts/pull/546))\n\n### Patch Changes\n\n- fix: comment position in JavaScript enums ([#544](https://github.com/hey-api/openapi-ts/pull/544))\n\n- fix: export inlined enums from components ([#563](https://github.com/hey-api/openapi-ts/pull/563))\n\n- fix: remove unused enums option from CLI ([#565](https://github.com/hey-api/openapi-ts/pull/565))\n\n- fix: Support typescript in peerDependencies ([#551](https://github.com/hey-api/openapi-ts/pull/551))\n\n## 0.43.2\n\n### Patch Changes\n\n- fix: deduplicate exported data and response types ([#538](https://github.com/hey-api/openapi-ts/pull/538))\n\n## 0.43.1\n\n### Patch Changes\n\n- fix: use optional chaining in bin catch block ([#528](https://github.com/hey-api/openapi-ts/pull/528))\n\n- fix: broken encoding ([#532](https://github.com/hey-api/openapi-ts/pull/532))\n\n- fix(parser): handle type array ([#533](https://github.com/hey-api/openapi-ts/pull/533))\n\n## 0.43.0\n\n### Minor Changes\n\n- feat: remove enum postfix, use typescript enums in types when generated, export enums from types.gen.ts ([#498](https://github.com/hey-api/openapi-ts/pull/498))\n\n### Patch Changes\n\n- fix: negative numbers in numeric enums ([#470](https://github.com/hey-api/openapi-ts/pull/470))\n\n- fix: escape keys in schemas starting with digit but containing non-digit characters ([#502](https://github.com/hey-api/openapi-ts/pull/502))\n\n- fix: issue causing code to not generate (t.filter is not a function) ([#507](https://github.com/hey-api/openapi-ts/pull/507))\n\n- fix: handle additional properties union ([#499](https://github.com/hey-api/openapi-ts/pull/499))\n\n- fix: do not export inline enums ([#508](https://github.com/hey-api/openapi-ts/pull/508))\n\n- fix: prefix parameter type exports to avoid conflicts ([#501](https://github.com/hey-api/openapi-ts/pull/501))\n\n- fix: export operation data and response types ([#500](https://github.com/hey-api/openapi-ts/pull/500))\n\n- fix: handle cases where packages are installed globally ([#471](https://github.com/hey-api/openapi-ts/pull/471))\n\n- fix: handle cases where package.json does not exist ([#471](https://github.com/hey-api/openapi-ts/pull/471))\n\n## 0.42.1\n\n### Patch Changes\n\n- fix: properly set formData and body when using options ([#461](https://github.com/hey-api/openapi-ts/pull/461))\n\n## 0.42.0\n\n### Minor Changes\n\n- change: config option `lint: true` has changed to `lint: 'eslint'` ([#455](https://github.com/hey-api/openapi-ts/pull/455))\n\n- change: disable formatting with prettier by default ([#457](https://github.com/hey-api/openapi-ts/pull/457))\n\n- feat: add support for biomejs as a formatter ([#455](https://github.com/hey-api/openapi-ts/pull/455))\n\n- feat: move operationId config option to services object ([#441](https://github.com/hey-api/openapi-ts/pull/441))\n\n- feat: add operation error type mappings ([#442](https://github.com/hey-api/openapi-ts/pull/442))\n\n- feat: add support for biomejs as a linter ([#455](https://github.com/hey-api/openapi-ts/pull/455))\n\n- change: config option `format: true` has changed to `format: 'prettier'` ([#455](https://github.com/hey-api/openapi-ts/pull/455))\n\n### Patch Changes\n\n- fix: do not destructure data when using use options ([#450](https://github.com/hey-api/openapi-ts/pull/450))\n\n- feat: automatically handle dates in query string ([#443](https://github.com/hey-api/openapi-ts/pull/443))\n\n- fix: only remove core directory when export core is true ([#449](https://github.com/hey-api/openapi-ts/pull/449))\n\n- fix: add jsdoc comments with use options ([#439](https://github.com/hey-api/openapi-ts/pull/439))\n\n## 0.41.0\n\n### Minor Changes\n\n- feat: add form type option for schemas ([#433](https://github.com/hey-api/openapi-ts/pull/433))\n\n- feat: replace useDateType with option in types object ([#435](https://github.com/hey-api/openapi-ts/pull/435))\n\n- feat: replace serviceResponse with option in services object ([#434](https://github.com/hey-api/openapi-ts/pull/434))\n\n- feat: replace postfixServices with configuration object ([#430](https://github.com/hey-api/openapi-ts/pull/430))\n\n### Patch Changes\n\n- fix: properly escape backticks in template literals ([#431](https://github.com/hey-api/openapi-ts/pull/431))\n\n- fix: transform names of referenced types ([#422](https://github.com/hey-api/openapi-ts/pull/422))\n\n- fix: use config interceptors passed to constructor when using named client ([#432](https://github.com/hey-api/openapi-ts/pull/432))\n\n- fix: properly escape expressions in template literals ([#431](https://github.com/hey-api/openapi-ts/pull/431))\n\n- fix: do not export common properties as schemas ([#424](https://github.com/hey-api/openapi-ts/pull/424))\n\n## 0.40.2\n\n### Patch Changes\n\n- fix: unhandled SyntaxKind unknown when specification has numeric enums ([#417](https://github.com/hey-api/openapi-ts/pull/417))\n\n## 0.40.1\n\n### Patch Changes\n\n- fix: revert to generating commonjs for esm and commonjs support ([#409](https://github.com/hey-api/openapi-ts/pull/409))\n\n## 0.40.0\n\n### Minor Changes\n\n- feat: allow choosing naming convention for types ([#402](https://github.com/hey-api/openapi-ts/pull/402))\n\n### Patch Changes\n\n- fix: rename exportModels to types ([#402](https://github.com/hey-api/openapi-ts/pull/402))\n\n- fix: rename models.gen.ts to types.gen.ts ([#399](https://github.com/hey-api/openapi-ts/pull/399))\n\n- fix: export enums from index.ts ([#399](https://github.com/hey-api/openapi-ts/pull/399))\n\n## 0.39.0\n\n### Minor Changes\n\n- feat: rename generated files ([#363](https://github.com/hey-api/openapi-ts/pull/363))\n\n- feat: add JSON-LD to content parsing ([#390](https://github.com/hey-api/openapi-ts/pull/390))\n\n- fix: generate enums into their own file ([#358](https://github.com/hey-api/openapi-ts/pull/358))\n\n### Patch Changes\n\n- fix: remove file if no contents to write to it ([#373](https://github.com/hey-api/openapi-ts/pull/373))\n\n- fix: eslint properly fixes output ([#375](https://github.com/hey-api/openapi-ts/pull/375))\n\n- fix: invalid typescript Record generated with circular dependencies ([#374](https://github.com/hey-api/openapi-ts/pull/374))\n\n- fix: prefer unknown type over any ([#392](https://github.com/hey-api/openapi-ts/pull/392))\n\n- fix: only delete generated files instead of whole output directory ([#362](https://github.com/hey-api/openapi-ts/pull/362))\n\n- fix: handle decoding models with `%` in description ([#360](https://github.com/hey-api/openapi-ts/pull/360))\n\n- fix: throw error when typescript is missing ([#366](https://github.com/hey-api/openapi-ts/pull/366))\n\n## 0.38.1\n\n### Patch Changes\n\n- fix: inconsistent indentation in models file when not using `format: true` ([#349](https://github.com/hey-api/openapi-ts/pull/349))\n\n- fix: output path no longer required to be within cwd ([#353](https://github.com/hey-api/openapi-ts/pull/353))\n\n## 0.38.0\n\n### Minor Changes\n\n- fix: rename write to dryRun and invert value ([#326](https://github.com/hey-api/openapi-ts/pull/326))\n\n### Patch Changes\n\n- fix: generate constant size array types properly ([#345](https://github.com/hey-api/openapi-ts/pull/345))\n\n- fix: support x-enumNames for custom enum names ([#334](https://github.com/hey-api/openapi-ts/pull/334))\n\n- fix: export service types from single namespace ([#341](https://github.com/hey-api/openapi-ts/pull/341))\n\n- fix: generate models with proper indentation when formatting is false ([#340](https://github.com/hey-api/openapi-ts/pull/340))\n\n- fix: log errors to file ([#329](https://github.com/hey-api/openapi-ts/pull/329))\n\n- fix: cleanup some styling issues when generating client without formatting ([#330](https://github.com/hey-api/openapi-ts/pull/330))\n\n## 0.37.3\n\n### Patch Changes\n\n- fix: do not ignore additionalProperties when object with properties object ([#323](https://github.com/hey-api/openapi-ts/pull/323))\n\n## 0.37.2\n\n### Patch Changes\n\n- fix: escape schema names ([#317](https://github.com/hey-api/openapi-ts/pull/317))\n\n- fix: escape backticks in strings starting with backtick ([#315](https://github.com/hey-api/openapi-ts/pull/315))\n\n## 0.37.1\n\n### Patch Changes\n\n- fix: ensure strings with both single/double quotes and backticks are escaped properly ([#310](https://github.com/hey-api/openapi-ts/pull/310)) ([#310](https://github.com/hey-api/openapi-ts/pull/310))\n\n## 0.37.0\n\n### Minor Changes\n\n- remove: `generics` as valid option for serviceResponse ([#299](https://github.com/hey-api/openapi-ts/pull/299))\n\n### Patch Changes\n\n- fix: escape dollar sign in operation names ([#307](https://github.com/hey-api/openapi-ts/pull/307))\n\n## 0.36.2\n\n### Patch Changes\n\n- fix: move service types into models file ([#292](https://github.com/hey-api/openapi-ts/pull/292))\n\n## 0.36.1\n\n### Patch Changes\n\n- fix: do not throw when failing to decode URI ([#296](https://github.com/hey-api/openapi-ts/pull/296))\n\n## 0.36.0\n\n### Minor Changes\n\n- feat: export schemas directly from OpenAPI specification (ie. support exporting JSON schemas draft 2020-12 ([#285](https://github.com/hey-api/openapi-ts/pull/285))\n\n### Patch Changes\n\n- fix(config): rename exportSchemas to schemas ([#288](https://github.com/hey-api/openapi-ts/pull/288))\n\n## 0.35.0\n\n### Minor Changes\n\n- fix(config): remove postfixModels option ([#266](https://github.com/hey-api/openapi-ts/pull/266))\n\n- fix(client): do not send default params ([#267](https://github.com/hey-api/openapi-ts/pull/267))\n\n### Patch Changes\n\n- fix(api): use TypeScript Compiler API to create schemas ([#271](https://github.com/hey-api/openapi-ts/pull/271))\n\n- fix(client): export APIResult when using serviceResponse as 'response' ([#283](https://github.com/hey-api/openapi-ts/pull/283))\n\n- fix(parser): use only isRequired to determine if field is required ([#264](https://github.com/hey-api/openapi-ts/pull/264))\n\n## 0.34.5\n\n### Patch Changes\n\n- fix(client): access service data type in namespace properly ([#258](https://github.com/hey-api/openapi-ts/pull/258))\n\n## 0.34.4\n\n### Patch Changes\n\n- fix(client): namespace service data types ([#246](https://github.com/hey-api/openapi-ts/pull/246))\n\n## 0.34.3\n\n### Patch Changes\n\n- fix(docs): link to docs hosted on vercel ([#244](https://github.com/hey-api/openapi-ts/pull/244))\n\n## 0.34.2\n\n### Patch Changes\n\n- docs(readme): update broken contributing link ([#236](https://github.com/hey-api/openapi-ts/pull/236))\n\n- fix(config): support ts config files and `defineConfig` syntax ([`0c92222ab74bb7d2391d49587760db9ea9228d5a`](https://github.com/hey-api/openapi-ts/commit/0c92222ab74bb7d2391d49587760db9ea9228d5a))\n\n## 0.34.1\n\n### Patch Changes\n\n- fix(docs): ensure README is shown on NPMJS ([#229](https://github.com/hey-api/openapi-ts/pull/229))\n\n## 0.34.0\n\n### Minor Changes\n\n- feat(client): generate all services in single `services.ts` file ([#215](https://github.com/hey-api/openapi-ts/pull/215))\n\n- feat(schema): add support for default values ([#197](https://github.com/hey-api/openapi-ts/pull/197))\n\n- feat(schema): add array of enum values for enums ([#197](https://github.com/hey-api/openapi-ts/pull/197))\n\n### Patch Changes\n\n- fix(axios): use builtin form data to ensure blob form data works in node environment ([#211](https://github.com/hey-api/openapi-ts/pull/211))\n\n- fix(enum): append index number on duplicate name ([#220](https://github.com/hey-api/openapi-ts/pull/220))\n\n## 0.33.2\n\n### Patch Changes\n\n- fix(axios): properly type content-type headers assignment ([#206](https://github.com/hey-api/openapi-ts/pull/206))\n\n## 0.33.1\n\n### Patch Changes\n\n- fix(axios): set content type to multipart/form-data when using form data ([#204](https://github.com/hey-api/openapi-ts/pull/204))\n\n## 0.33.0\n\n### Minor Changes\n\n- feat(fetch): detect form data repsonses properly ([#195](https://github.com/hey-api/openapi-ts/pull/195))\n\n- feat(fetch): add application/octet-stream, application/pdf, and application/zip as binary response types ([#195](https://github.com/hey-api/openapi-ts/pull/195))\n\n### Patch Changes\n\n- fix(client): do not create or export empty files ([#200](https://github.com/hey-api/openapi-ts/pull/200))\n\n- client(angular/fetch/xhr): detect all application/json or +json as JSON ([#195](https://github.com/hey-api/openapi-ts/pull/195))\n\n## 0.32.1\n\n### Patch Changes\n\n- fix(schema): allow minimums/maximums to be 0 ([#194](https://github.com/hey-api/openapi-ts/pull/194))\n\n- fix(axios): let axios handle serializing form data ([#192](https://github.com/hey-api/openapi-ts/pull/192))\n\n## 0.32.0\n\n### Minor Changes\n\n- Support all HTTP error codes ([#188](https://github.com/hey-api/openapi-ts/pull/188))\n\n- Use File or Blob type for binary types ([#186](https://github.com/hey-api/openapi-ts/pull/186))\n\n- Check value instanceof Blob when using isBlob ([#186](https://github.com/hey-api/openapi-ts/pull/186))\n\n### Patch Changes\n\n- fix(cli): properly handle booleans ([#190](https://github.com/hey-api/openapi-ts/pull/190))\n\n- Attempt to use body type as content type when sending Blob in node client ([#185](https://github.com/hey-api/openapi-ts/pull/185))\n\n- fix(api): add experimental flag ([#191](https://github.com/hey-api/openapi-ts/pull/191))\n\n## 0.31.1\n\n### Patch Changes\n\n- merge enums and useLegacyEnums into one option ([#178](https://github.com/hey-api/openapi-ts/pull/178))\n\n- use FormData from node-fetch in node client ([#173](https://github.com/hey-api/openapi-ts/pull/173))\n\n## 0.31.0\n\n### Minor Changes\n\n- Import all required models for a service in one import ([#172](https://github.com/hey-api/openapi-ts/pull/172))\n\n- generate all models in single `models.ts` file ([#168](https://github.com/hey-api/openapi-ts/pull/168))\n\n- generate all schemas in single `schemas.ts` file ([#168](https://github.com/hey-api/openapi-ts/pull/168))\n\n### Patch Changes\n\n- fix async response interceptors when using angular client ([#167](https://github.com/hey-api/openapi-ts/pull/167))\n\n- fix deprecation warning on `throwError` in Angular client ([#167](https://github.com/hey-api/openapi-ts/pull/167))\n\n- Do not create or export CancelablePromise when using Angular client ([#167](https://github.com/hey-api/openapi-ts/pull/167))\n\n- Fix issue causing type error when targeting lower than ES2015 ([#171](https://github.com/hey-api/openapi-ts/pull/171))\n\n- fix various warnings in generated client code ([#164](https://github.com/hey-api/openapi-ts/pull/164))\n\n- fix providing interceptors in Angular client ([#167](https://github.com/hey-api/openapi-ts/pull/167))\n\n## 0.30.0\n\n### Minor Changes\n\n- add support for interceptors ([#153](https://github.com/hey-api/openapi-ts/pull/153))\n\n## 0.29.2\n\n### Patch Changes\n\n- Fix export types as type only when using useLegacyEnums ([#160](https://github.com/hey-api/openapi-ts/pull/160))\n\n## 0.29.1\n\n### Patch Changes\n\n- Properly export enums when using useLegacyEnums ([#158](https://github.com/hey-api/openapi-ts/pull/158))\n\n## 0.29.0\n\n### Minor Changes\n\n- Add useLegacyEnums options to generate TypeScript enums ([#147](https://github.com/hey-api/openapi-ts/pull/147))\n\n## 0.28.0\n\n### Minor Changes\n\n- Add `index.ts` file to models, schemas, and services ([#137](https://github.com/hey-api/openapi-ts/pull/137))\n\n## 0.27.39\n\n### Patch Changes\n\n- Warn users about missing dependencies used in the generated client ([#124](https://github.com/hey-api/openapi-ts/pull/124))\n\n- Use AbortController in Axios client instead of deprecated CancelToken ([#124](https://github.com/hey-api/openapi-ts/pull/124))\n\n## 0.27.38\n\n### Minor Changes\n\n- Make useOptions default to true\n\n## 0.27.37\n\n### Minor Changes\n\n- Fix import error in generated Node client\n\n- Update package dependencies\n\n- Use engine-strict in .npmrc\n\n## 0.27.36\n\n### Minor Changes\n\n- Handle falsy values in header\n\n- Export schemas by default\n\n## 0.27.35\n\n### Minor Changes\n\n- Update all project dependencies\n\n- Discard only null or undefined in query string\n\n## 0.27.34\n\n### Minor Changes\n\n- Add flag for linting generated code (default: false)\n\n- Add flag for formatting generated code (default: true)\n\n## 0.27.33\n\n### Minor Changes\n\n- Auto format with Eslint if available\n\n- Add types for programmatic API\n\n## 0.27.32\n\n### Minor Changes\n\n- Rename Config type to UserConfig\n\n- Pass arguments in correct order in Angular client\n\n## 0.27.31\n\n### Minor Changes\n\n- Add support for openapi-ts.config.js file\n\n- Use built-in flat map\n\n## 0.27.30\n\n### Minor Changes\n\n- Prefer unknown instead of any in generated client\n\n## 0.27.29\n\n### Minor Changes\n\n- Rename openapi command to openapi-ts\n\n- Add basic support for response that are Blobs\n\n## 0.27.28\n\n### Minor Changes\n\n- Generate enums as JavaScript objects\n\n- Use shorthand object properties in service calls\n\n## 0.27.27\n\n### Minor Changes\n\n- Handle cases where a project does not have dependencies when checking to run Prettier\n\n## 0.27.26\n\n### Minor Changes\n\n- Skip global parameters if they are duplicates of path parameters\n\n- remove option to indent code\n\n## 0.27.25\n\n### Minor Changes\n\n- Correctly set content-type header, even when body is falsy\n\n## 0.27.24\n\n### Minor Changes\n\n- Remove union types flag (this is now default)\n\n## 0.27.23\n\n### Minor Changes\n\n- Support printing exact arrays\n\n## 0.27.22\n\n### Minor Changes\n\n- Add option to specify custom base path\n\n- Fix spacing in cancelable promise\n\n## 0.27.21\n\n### Minor Changes\n\n- Add explicit flags for generics\n\n## 0.27.20\n\n### Minor Changes\n\n- Do not require type to be set for object properties\n\n## 0.27.19\n\n### Minor Changes\n\n- Do not insert generics into custom client\n\n## 0.27.18\n\n### Minor Changes\n\n- Support returning raw result object\n\n- Allow passing config\n\n## 0.27.17\n\n### Minor Changes\n\n- Generate nullable interface when isNullable is true\n\n## 0.27.16\n\n### Minor Changes\n\n- Generate types for services when useOptions is true\n\n## 0.27.15\n\n### Minor Changes\n\n- Fix wrong path on Windows\n\n## 0.27.14\n\n### Minor Changes\n\n- Change imports to match project style\n\n## 0.27.13\n\n### Minor Changes\n\n- Support printing Date instead of string for date-time formats in models\n\n## 0.27.12\n\n### Minor Changes\n\n- Escape enum name when exported\n\n## 0.27.11\n\n### Minor Changes\n\n- Fix typo in template header\n\n## 0.27.10\n\n### Minor Changes\n\n- Escape newlines when outputting pattern string value in schemas\n\n## 0.27.9\n\n### Minor Changes\n\n- Start passing options object instead of positional parameters\n\n- Handle composition of any-of and properties\n\n- Allow ignoring operation ID when generating operation names\n\n- Propagate useVersionId to Swagger V2 parser\n\n- Change --ingoreOperationId to --useOperationId\n\n## 0.27.8\n\n### Minor Changes\n\n- Support non-ascii (unicode) characters in service name, operation name, and parameter name\n\n## 0.27.7\n\n### Minor Changes\n\n- Bump dependencies\n\n## 0.27.6\n\n### Minor Changes\n\n- Allow overriding request body name with x-body-name key\n\n## 0.27.5\n\n### Minor Changes\n\n- Type additional properties with properties\n\n- Parse array items only if parent definition has type\n\n## 0.27.4\n\n### Minor Changes\n\n- Bump dependencies\n\n## 0.27.3\n\n### Minor Changes\n\n- Support autoformat option flag\n\n- Handle more cases of any-of\n\n- Support regexp to select models to export\n\n- Return optional success response on 204 status code\n\n- Fix nested any-of\n\n- Add const support\n\n## 0.27.0\n\n### Minor Changes\n\n- Reverted `@apidevtools/json-schema-ref-parser` to version 10.1.0\n\n## 0.26.0\n\n### Minor Changes\n\n- Upgraded dependencies\n\n## 0.25.0\n\n### Minor Changes\n\n- Upgraded dependencies\n- Allow usage of a custom axios instance\n- Added message in generated files\n\n## 0.24.0\n\n### Minor Changes\n\n- Upgraded dependencies\n- Fixed issue with Cancelable promise\n- Fixed issue with escaping reserved keywords in schema names\n- Added `--postfixModels` option\n\n## 0.23.0\n\n### Minor Changes\n\n- Upgraded dependencies\n- Added blank line at the end of generated files\n- Added support for Node.js v12\n- Added `request` property inside `ApiError`\n- Added support for `@depricated` inside models and operations\n\n## 0.22.0\n\n### Minor Changes\n\n- Upgraded dependencies\n- Fixed issue with `null` value inside comments for OpenAPI v2 enums\n- Fixed issue with compatibility for latest version of Axios (0.27.x)\n- Removed deprecated enum model generation\n\n## 0.21.0\n\n### Minor Changes\n\n- Return `undefined` to match `noImplicitReturns` rule\n- Made `BaseHttpRequest` class abstract\n- Removed private fields using `#` inside `CancelablePromise`\n- Removed unneeded import `AbortController` from `node-fetch` client\n- Filter out wrong enum values\n\n## 0.20.1\n\n### Patch Changes\n\n- Support enums with single quotes in names for V2\n\n## 0.20.0\n\n### Minor Changes\n\n- Updated dependencies\n- Support enums with single quotes in names for V3\n- Generating better names when `operationId` is not given (breaking change)\n- Fixed issue where `x-enum` flags where breaking due to non-string values\n\n## 0.19.0\n\n### Minor Changes\n\n- Support for Angular client with `--name` option\n- Added test cases for Angular client\n\n## 0.18.2\n\n### Patch Changes\n\n- Updated dependencies\n- Fixed type definition\n- Added test cases for CLI commands\n- Added test cases for query parsing\n\n## 0.18.1\n\n### Patch Changes\n\n- Escaping error description\n- Made `Client.request` and `BaseHttpRequest.config` props public\n\n## 0.18.0\n\n### Minor Changes\n\n- Angular client generation!\n- Updated documentation with more examples and better descriptions\n\n## 0.17.0\n\n### Minor Changes\n\n- Shorthand notation for properties passed through constructor\n- Simplified creation of headers\n- Prepare codebase for Angular client\n\n## 0.16.2\n\n### Patch Changes\n\n- Removed dependency on `URLSearchParams` to support browser and node without any additional imports\n\n## 0.16.1\n\n### Patch Changes\n\n- Correct export inside `index.ts` when giving a custom name\n\n## 0.16.0\n\n### Minor Changes\n\n- Added option to set the indentation (spaces and tabs)\n- Added option to export separate client file that allows usage for multiple backends\n- Decoupled OpenAPI object from requests\n- Updated dependencies\n\n## 0.15.0\n\n### Minor Changes\n\n- Added change log and releases on GitHub\n\n## 0.14.0\n\n### Minor Changes\n\n- Added missing `postfix` options to typedef\n- Updated escaping of comments and descriptions\n- Better handling of services without tags\n- Updated dependencies\n  , // [!code --]\n  path: 'hey-api/backend', // sign up at app.heyapi.dev\n  },\n  output: 'src/client',\n  plugins: ['@hey-api/client-fetch'],\n  };\n\n  ```\n\n  ```\n\n### Patch Changes\n\n- [#2079](https://github.com/hey-api/openapi-ts/pull/2079) [`d478d8a`](https://github.com/hey-api/openapi-ts/commit/d478d8a75b2691f2a113f3fe9cf7d1ce588baa0b) Thanks [@mrlubos](https://github.com/mrlubos)! - fix(validators): generate JSDoc comments for validator schemas\n\n- [#2081](https://github.com/hey-api/openapi-ts/pull/2081) [`4c076ee`](https://github.com/hey-api/openapi-ts/commit/4c076ee6e302ebdb587aaf4e7064aa086fd0bc5c) Thanks [@mrlubos](https://github.com/mrlubos)! - fix(parser): handle exclusiveMinimum and exclusiveMaximum in OpenAPI 3.1.x when they're 0\n\n- [#2080](https://github.com/hey-api/openapi-ts/pull/2080) [`2698a40`](https://github.com/hey-api/openapi-ts/commit/2698a4095f836b23248869018b98665d0afbcde7) Thanks [@mrlubos](https://github.com/mrlubos)! - fix(sdk,axios): add responseType field when it's json so validators run by default\n\n## 0.67.6\n\n### Patch Changes\n\n- [#2068](https://github.com/hey-api/openapi-ts/pull/2068) [`93b62fd`](https://github.com/hey-api/openapi-ts/commit/93b62fd433a09f28c75f58852e1baaa2b6fbd641) Thanks [@mrlubos](https://github.com/mrlubos)! - fix(tanstack-query): require options when sdk client is set to false\n\n- [#2060](https://github.com/hey-api/openapi-ts/pull/2060) [`373e15a`](https://github.com/hey-api/openapi-ts/commit/373e15a34fd81ac596a0797ddb133a47aeceee1f) Thanks [@mrlubos](https://github.com/mrlubos)! - fix(valibot): add valibot plugin\n\n## 0.67.5\n\n### Patch Changes\n\n- [#2052](https://github.com/hey-api/openapi-ts/pull/2052) [`f430eaa`](https://github.com/hey-api/openapi-ts/commit/f430eaad13d83d2191fff12802d9283099d7a527) Thanks [@mrlubos](https://github.com/mrlubos)! - fix(tanstack-query): add SDK function comments to TanStack Query output\n\n- [#2058](https://github.com/hey-api/openapi-ts/pull/2058) [`e9fda0b`](https://github.com/hey-api/openapi-ts/commit/e9fda0bff09c534333691f981363f445dc97129f) Thanks [@mrlubos](https://github.com/mrlubos)! - fix(typescript): exclude $refs in readable/writable schemas when referenced schemas don't contain any readable/writable fields\n\n- [#2059](https://github.com/hey-api/openapi-ts/pull/2059) [`af2082f`](https://github.com/hey-api/openapi-ts/commit/af2082f75dd02a52f8196709d7497dc99c5321e5) Thanks [@mrlubos](https://github.com/mrlubos)! - fix(typescript): add enumsConstantsIgnoreNull option to skip nulls from generated JavaScript objects\n\n## 0.67.4\n\n### Patch Changes\n\n- [#2043](https://github.com/hey-api/openapi-ts/pull/2043) [`e3997c8`](https://github.com/hey-api/openapi-ts/commit/e3997c8d9a9e8a6da7bc4b417769e751887ff6ac) Thanks [@mrlubos](https://github.com/mrlubos)! - fix: handle enum keyword with array type\n\n## 0.67.3\n\n### Patch Changes\n\n- [#2020](https://github.com/hey-api/openapi-ts/pull/2020) [`27cb409`](https://github.com/hey-api/openapi-ts/commit/27cb4095383aff35f1d78094b8b73fb36f432d33) Thanks [@0xfurai](https://github.com/0xfurai)! - fix: handle references to properties\n\n## 0.67.2\n\n### Patch Changes\n\n- [#2023](https://github.com/hey-api/openapi-ts/pull/2023) [`c6f01f3`](https://github.com/hey-api/openapi-ts/commit/c6f01f39493e241f01dd7997ccdb8b6bc3d1519c) Thanks [@kennidenni](https://github.com/kennidenni)! - fix: handle relative paths in client's `baseUrl` field\n\n## 0.67.1\n\n### Patch Changes\n\n- [#2010](https://github.com/hey-api/openapi-ts/pull/2010) [`13c9577`](https://github.com/hey-api/openapi-ts/commit/13c9577f122eab7b7fdd92f67ac77cb334cbdcd5) Thanks [@mrlubos](https://github.com/mrlubos)! - fix: do not use named imports from typescript module\n\n## 0.67.0\n\n### Minor Changes\n\n- [#2003](https://github.com/hey-api/openapi-ts/pull/2003) [`1504a06`](https://github.com/hey-api/openapi-ts/commit/1504a0642fdb4f856d1650fade2d30988b35b4ff) Thanks [@mrlubos](https://github.com/mrlubos)! - feat: respect `moduleResolution` value in `tsconfig.json`\n\n  ### Respecting `moduleResolution` value in `tsconfig.json`\n\n  This release introduces functionality related to your `tsconfig.json` file. The initial feature properly respects the value of your `moduleResolution` field. If you're using `nodenext`, the relative module paths in your output will be appended with `.js`. To preserve the previous behavior where we never appended `.js` to relative module paths, set `output.tsConfigPath` to `off`.\n\n  ```js\n  export default {\n    input: \"hey-api/backend\", // sign up at app.heyapi.dev\n    output: {\n      path: \"src/client\",\n      tsConfigPath: \"off\",\n    },\n  };\n  ```\n\n### Patch Changes\n\n- [#2006](https://github.com/hey-api/openapi-ts/pull/2006) [`aa10522`](https://github.com/hey-api/openapi-ts/commit/aa10522f2bd018a417d875e5ab12ed0a848d2e49) Thanks [@Liooo](https://github.com/Liooo)! - fix: make discriminator field required when used with `oneOf` keyword\n\n- [#2009](https://github.com/hey-api/openapi-ts/pull/2009) [`f45ba8e`](https://github.com/hey-api/openapi-ts/commit/f45ba8e96872a13be71c0d07e134f8c6717458d4) Thanks [@mrlubos](https://github.com/mrlubos)! - fix: avoid including underscore for appended types (e.g. data, error, response) when preserving identifier case\n\n## 0.66.7\n\n### Patch Changes\n\n- [#1981](https://github.com/hey-api/openapi-ts/pull/1981) [`955b95a`](https://github.com/hey-api/openapi-ts/commit/955b95ab051401bdbeaa8cfb93a7a7b707cb7529) Thanks [@mrlubos](https://github.com/mrlubos)! - fix: handle schemas with all write-only or read-only fields\n\n- [#1990](https://github.com/hey-api/openapi-ts/pull/1990) [`2fb1689`](https://github.com/hey-api/openapi-ts/commit/2fb1689b6538d32d123235175159d412df988241) Thanks [@mrlubos](https://github.com/mrlubos)! - fix: avoid generating duplicate operation ids when sanitizing input\n\n- [#1991](https://github.com/hey-api/openapi-ts/pull/1991) [`b6e654a`](https://github.com/hey-api/openapi-ts/commit/b6e654a6e18698f3c554848f8b8113e30f108fc4) Thanks [@mrlubos](https://github.com/mrlubos)! - fix: Zod schemas use .and() instead of .merge()\n\n- [#1919](https://github.com/hey-api/openapi-ts/pull/1919) [`ec62470`](https://github.com/hey-api/openapi-ts/commit/ec624709b1fb07da8d7234fe851561054dc68150) Thanks [@ngalluzzo](https://github.com/ngalluzzo)! - fix: correctly handle numeric property names with signs\n\n- [#1984](https://github.com/hey-api/openapi-ts/pull/1984) [`0f305e0`](https://github.com/hey-api/openapi-ts/commit/0f305e06337758ee16c801ad437d9ce0996fc8b0) Thanks [@mrlubos](https://github.com/mrlubos)! - fix: Zod plugin handles nullable enums\n\n- [#1986](https://github.com/hey-api/openapi-ts/pull/1986) [`dbebff8`](https://github.com/hey-api/openapi-ts/commit/dbebff8dcba4c93d0c534e6e48e59e2aaaffd540) Thanks [@mrlubos](https://github.com/mrlubos)! - fix: handle discriminator with multiple mappings to the same schema\n\n- [#1980](https://github.com/hey-api/openapi-ts/pull/1980) [`0d7bede`](https://github.com/hey-api/openapi-ts/commit/0d7bede6e40553ae1c4c888770c84e55732b3cae) Thanks [@mrlubos](https://github.com/mrlubos)! - fix: Zod schemas with BigInt and min/max constraints\n\n- [#1987](https://github.com/hey-api/openapi-ts/pull/1987) [`71e2fd0`](https://github.com/hey-api/openapi-ts/commit/71e2fd029f2374ed8d2eaa01beecf254757e08d8) Thanks [@mrlubos](https://github.com/mrlubos)! - fix: correct path to nested plugin files when using exportFromIndex\n\n- [#1978](https://github.com/hey-api/openapi-ts/pull/1978) [`267f4b3`](https://github.com/hey-api/openapi-ts/commit/267f4b3730f2a477906e4e1593154dcd1723e554) Thanks [@mrlubos](https://github.com/mrlubos)! - fix: handle extended `$ref` with `type` keyword in OpenAPI 3.1\n\n- [#1982](https://github.com/hey-api/openapi-ts/pull/1982) [`1e6d74f`](https://github.com/hey-api/openapi-ts/commit/1e6d74f8321af5c61f86318b835d25db38609b03) Thanks [@mrlubos](https://github.com/mrlubos)! - fix: handle additionalProperties empty object as unknown instead of preserving an empty interface\n\n## 0.66.6\n\n### Patch Changes\n\n- [#1971](https://github.com/hey-api/openapi-ts/pull/1971) [`e1fb199`](https://github.com/hey-api/openapi-ts/commit/e1fb199a22a30653b95d498e6aaca2c59ed2b13b) Thanks [@mrlubos](https://github.com/mrlubos)! - fix: handle Zod circular reference\n\n## 0.66.5\n\n### Patch Changes\n\n- [#1951](https://github.com/hey-api/openapi-ts/pull/1951) [`4be46e5`](https://github.com/hey-api/openapi-ts/commit/4be46e506db1b2c53d1ddbf66e9919b5072f1cc0) Thanks [@devNameAsyraf](https://github.com/devNameAsyraf)! - fix: don't use JSON serializer for `application/octet-stream`\n\n- [#1938](https://github.com/hey-api/openapi-ts/pull/1938) [`2a03e37`](https://github.com/hey-api/openapi-ts/commit/2a03e371715b5948ba568009975ad65ccbf7bfd7) Thanks [@sredni](https://github.com/sredni)! - fix: repeat tuple type `maxItems` times\n\n## 0.66.4\n\n### Patch Changes\n\n- [#1936](https://github.com/hey-api/openapi-ts/pull/1936) [`ba2e5ca`](https://github.com/hey-api/openapi-ts/commit/ba2e5ca8af1cfe478963d72ff76d7d7ae026c5a5) Thanks [@seriouslag](https://github.com/seriouslag)! - fix: add return type to TanStack Query mutations\n\n- [#1934](https://github.com/hey-api/openapi-ts/pull/1934) [`d4df550`](https://github.com/hey-api/openapi-ts/commit/d4df5503369b7aa105c7f6a49e1c7b43e0e50f49) Thanks [@seriouslag](https://github.com/seriouslag)! - fix: export some internal functions\n\n## 0.66.3\n\n### Patch Changes\n\n- [#1917](https://github.com/hey-api/openapi-ts/pull/1917) [`d7af22c`](https://github.com/hey-api/openapi-ts/commit/d7af22c771af4bd2dab28acc69430717da390670) Thanks [@Freddis](https://github.com/Freddis)! - fix: handle nullable dates in transformers\n\n## 0.66.2\n\n### Patch Changes\n\n- [#1913](https://github.com/hey-api/openapi-ts/pull/1913) [`7cfa4a7`](https://github.com/hey-api/openapi-ts/commit/7cfa4a76b13ca97d49c5f0366ba7264f94753d8b) Thanks [@BogdanMaier](https://github.com/BogdanMaier)! - fix: prevent crash when optional pagination field is missing\n\n## 0.66.1\n\n### Patch Changes\n\n- [#1906](https://github.com/hey-api/openapi-ts/pull/1906) [`d1928d1`](https://github.com/hey-api/openapi-ts/commit/d1928d17710240bb42a6aa12da4618a9dd962df2) Thanks [@mrlubos](https://github.com/mrlubos)! - fix: exclude and include expressions can be an array\n\n- [#1906](https://github.com/hey-api/openapi-ts/pull/1906) [`d1928d1`](https://github.com/hey-api/openapi-ts/commit/d1928d17710240bb42a6aa12da4618a9dd962df2) Thanks [@mrlubos](https://github.com/mrlubos)! - fix: support excluding deprecated fields with '@deprecated'\n\n## 0.66.0\n\n### Minor Changes\n\n- [#1896](https://github.com/hey-api/openapi-ts/pull/1896) [`8840ed7`](https://github.com/hey-api/openapi-ts/commit/8840ed73df5ee718e803aa6e27b66e0c82ec3651) Thanks [@mrlubos](https://github.com/mrlubos)! - feat: support read-only and write-only properties\n\n  ### Read-only and write-only fields\n\n  Starting with v0.66.0, `@hey-api/typescript` will generate separate types for payloads and responses if it detects any read-only or write-only fields. To preserve the previous behavior and generate a single type regardless, set `readOnlyWriteOnlyBehavior` to `off`.\n\n  ```js\n  export default {\n    input: \"hey-api/backend\", // sign up at app.heyapi.dev\n    output: \"src/client\",\n    plugins: [\n      // ...other plugins\n      {\n        name: \"@hey-api/typescript\",\n        readOnlyWriteOnlyBehavior: \"off\", // [!code ++]\n      },\n    ],\n  };\n  ```\n\n## 0.65.0\n\n### Minor Changes\n\n- [#1889](https://github.com/hey-api/openapi-ts/pull/1889) [`67c385b`](https://github.com/hey-api/openapi-ts/commit/67c385bf6289a79726b0cdd85fd81ca501cf2248) Thanks [@mrlubos](https://github.com/mrlubos)! - feat: support custom clients\n\n### Patch Changes\n\n- [#1892](https://github.com/hey-api/openapi-ts/pull/1892) [`29fa764`](https://github.com/hey-api/openapi-ts/commit/29fa764986af3d3af842793c74d61681c7e967a1) Thanks [@mrlubos](https://github.com/mrlubos)! - fix: allow passing fetch options to the request resolving a specification\n\n- [#1877](https://github.com/hey-api/openapi-ts/pull/1877) [`6971f5b`](https://github.com/hey-api/openapi-ts/commit/6971f5bca4dd17ea65400c504ad0a4ffb083a38b) Thanks [@Matsuuu](https://github.com/Matsuuu)! - feat: ability to disable writing a log file via a `--no-log-file` flag or `logs.file` = `false`\n\n## 0.64.15\n\n### Patch Changes\n\n- [#1850](https://github.com/hey-api/openapi-ts/pull/1850) [`fe43b88`](https://github.com/hey-api/openapi-ts/commit/fe43b889c20a2001f56e259f93f64851a1caa1d1) Thanks [@kelnos](https://github.com/kelnos)! - feat: add support for cookies auth\n\n## 0.64.14\n\n### Patch Changes\n\n- [#1827](https://github.com/hey-api/openapi-ts/pull/1827) [`9dd43db`](https://github.com/hey-api/openapi-ts/commit/9dd43db54f2b7ebf87c5c7c118fdf149162a533d) Thanks [@john-cremit](https://github.com/john-cremit)! - feat: allow customizing pagination keywords using `input.pagination.keywords`\n\n## 0.64.13\n\n### Patch Changes\n\n- [#1822](https://github.com/hey-api/openapi-ts/pull/1822) [`c73b0d4`](https://github.com/hey-api/openapi-ts/commit/c73b0d401c2bfa6f0b0d89d844a6aa09f2685a69) Thanks [@mrlubos](https://github.com/mrlubos)! - fix: bump json-schema-ref-parser package\n\n- [#1826](https://github.com/hey-api/openapi-ts/pull/1826) [`90886c1`](https://github.com/hey-api/openapi-ts/commit/90886c1372a999e8cb59d5da218762f6ee6cd459) Thanks [@mrlubos](https://github.com/mrlubos)! - fix: allow config to be a function\n\n## 0.64.12\n\n### Patch Changes\n\n- [#1816](https://github.com/hey-api/openapi-ts/pull/1816) [`b9e1b4b`](https://github.com/hey-api/openapi-ts/commit/b9e1b4bec5e1c5d1f2b5b9cfc7fa145274ae604d) Thanks [@shemsiu](https://github.com/shemsiu)! - Allow `scheme` property to be case-insensitive\n\n## 0.64.11\n\n### Patch Changes\n\n- [#1800](https://github.com/hey-api/openapi-ts/pull/1800) [`a4811bd`](https://github.com/hey-api/openapi-ts/commit/a4811bdf178ec1a7f1602e0483a32fe7303f4eac) Thanks [@mrlubos](https://github.com/mrlubos)! - fix: support Hey API platform input arguments\n\n- [#1800](https://github.com/hey-api/openapi-ts/pull/1800) [`a4811bd`](https://github.com/hey-api/openapi-ts/commit/a4811bdf178ec1a7f1602e0483a32fe7303f4eac) Thanks [@mrlubos](https://github.com/mrlubos)! - fix: handle raw OpenAPI specification input\n\n## 0.64.10\n\n### Patch Changes\n\n- [#1779](https://github.com/hey-api/openapi-ts/pull/1779) [`57fcec8`](https://github.com/hey-api/openapi-ts/commit/57fcec804e339cfe508cfba4afd203c22495bff2) Thanks [@mrlubos](https://github.com/mrlubos)! - fix: don't throw on missing performance marks\n\n- [#1767](https://github.com/hey-api/openapi-ts/pull/1767) [`2de84ea`](https://github.com/hey-api/openapi-ts/commit/2de84ea3dbd2cba50150808a872aea8242c33014) Thanks [@Schroedi](https://github.com/Schroedi)! - fix: handle nested dates in transformers\n\n## 0.64.9\n\n### Patch Changes\n\n- [#1774](https://github.com/hey-api/openapi-ts/pull/1774) [`c0b36b9`](https://github.com/hey-api/openapi-ts/commit/c0b36b95645d484034c3af145c5554867568979b) Thanks [@mrlubos](https://github.com/mrlubos)! - docs: announce Hey API platform\n\n## 0.64.8\n\n### Patch Changes\n\n- [#1764](https://github.com/hey-api/openapi-ts/pull/1764) [`b3ecac3`](https://github.com/hey-api/openapi-ts/commit/b3ecac31d49a269ab400db4dbb84a22f1047e19a) Thanks [@mrlubos](https://github.com/mrlubos)! - fix: reduce minimum Node.js 22 version to 22.10.0\n\n## 0.64.7\n\n### Patch Changes\n\n- [#1755](https://github.com/hey-api/openapi-ts/pull/1755) [`82f7c14`](https://github.com/hey-api/openapi-ts/commit/82f7c1425dd903b75d15cf532b88580d180f281a) Thanks [@Matsuuu](https://github.com/Matsuuu)! - fix: Wrap the GET request in watch mode with try-catch to prevent crashes on no-head watch targets\n\n## 0.64.6\n\n### Patch Changes\n\n- [#1748](https://github.com/hey-api/openapi-ts/pull/1748) [`7326d25`](https://github.com/hey-api/openapi-ts/commit/7326d2550ae3336fd8f754f8d4a25f1a40c13a2b) Thanks [@Matsuuu](https://github.com/Matsuuu)! - fix: Wrap HEAD request in a try-catch to prevent watch mode crashes on server reloads\n\n## 0.64.5\n\n### Patch Changes\n\n- [#1728](https://github.com/hey-api/openapi-ts/pull/1728) [`cc8dabb`](https://github.com/hey-api/openapi-ts/commit/cc8dabbf1cb94879bb08fe66ecb04c4d0801e9cc) Thanks [@georgesmith46](https://github.com/georgesmith46)! - fix: correctly generate zod regex expressions when using patterns\n\n## 0.64.4\n\n### Patch Changes\n\n- [#1710](https://github.com/hey-api/openapi-ts/pull/1710) [`4afdaa1`](https://github.com/hey-api/openapi-ts/commit/4afdaa1247b0bf0629817a51c29ca25840569b77) Thanks [@mrlubos](https://github.com/mrlubos)! - fix: use relative path to custom config file if provided when resolving relative paths\n\n## 0.64.3\n\n### Patch Changes\n\n- [#1701](https://github.com/hey-api/openapi-ts/pull/1701) [`e86629b`](https://github.com/hey-api/openapi-ts/commit/e86629bfa9ae2a47131d3a9a240a6aa2a4f67911) Thanks [@mrlubos](https://github.com/mrlubos)! - fix: correctly type default value for Nuxt client\n\n## 0.64.2\n\n### Patch Changes\n\n- [#1697](https://github.com/hey-api/openapi-ts/pull/1697) [`dec3fed`](https://github.com/hey-api/openapi-ts/commit/dec3fedb5f51aad4711fec15a006c525cb0bf7d8) Thanks [@mrlubos](https://github.com/mrlubos)! - fix: add exportFromIndex option to all plugins\n\n- [#1699](https://github.com/hey-api/openapi-ts/pull/1699) [`8ff188f`](https://github.com/hey-api/openapi-ts/commit/8ff188fb269cf46321538dbe846e1b9ae3b8de42) Thanks [@mrlubos](https://github.com/mrlubos)! - fix: allow passing arbitrary values to SDK functions via `meta` field\n\n- [#1687](https://github.com/hey-api/openapi-ts/pull/1687) [`04c7cea`](https://github.com/hey-api/openapi-ts/commit/04c7ceac940a81cbed6a4070d9244aa5052ba4a2) Thanks [@hunshcn](https://github.com/hunshcn)! - sanitize \"+\" in uri to avoid plus in function name\n\n## 0.64.1\n\n### Patch Changes\n\n- [#1668](https://github.com/hey-api/openapi-ts/pull/1668) [`7a03341`](https://github.com/hey-api/openapi-ts/commit/7a03341301d9d56ae93b4e4e3bd1ca469444f886) Thanks [@mrlubos](https://github.com/mrlubos)! - fix: watch mode handles servers not exposing HEAD method for spec\n\n- [#1668](https://github.com/hey-api/openapi-ts/pull/1668) [`7a03341`](https://github.com/hey-api/openapi-ts/commit/7a03341301d9d56ae93b4e4e3bd1ca469444f886) Thanks [@mrlubos](https://github.com/mrlubos)! - fix: add watch.timeout option\n\n## 0.64.0\n\n### Minor Changes\n\n- [#1661](https://github.com/hey-api/openapi-ts/pull/1661) [`ccefe43`](https://github.com/hey-api/openapi-ts/commit/ccefe434ee83f1202769547ce128e1c134dee25f) Thanks [@mrlubos](https://github.com/mrlubos)! - feat: added `client.baseUrl` option\n\n  ### Added `client.baseUrl` option\n\n  You can use this option to configure the default base URL for the generated client. By default, we will attempt to resolve the first defined server or infer the base URL from the input path. If you'd like to preserve the previous behavior, set `baseUrl` to `false`.\n\n  ```js\n  export default {\n    input: \"path/to/openapi.json\",\n    output: \"src/client\",\n    plugins: [\n      {\n        baseUrl: false, // [!code ++]\n        name: \"@hey-api/client-fetch\",\n      },\n    ],\n  };\n  ```\n\n- [#1661](https://github.com/hey-api/openapi-ts/pull/1661) [`bb6d46a`](https://github.com/hey-api/openapi-ts/commit/bb6d46ae119ce4e7e3a2ab3fded74ac4fb4cdff2) Thanks [@mrlubos](https://github.com/mrlubos)! - fix: make createConfig, CreateClientConfig, and Config accept ClientOptions generic\n\n  ### Added `ClientOptions` interface\n\n  The `Config` interface now accepts an optional generic extending `ClientOptions` instead of `boolean` type `ThrowOnError`.\n\n  ```ts\n  type Foo = Config<false>; // [!code --]\n  type Foo = Config<{ throwOnError: false }>; // [!code ++]\n  ```\n\n## 0.63.2\n\n### Patch Changes\n\n- [#1651](https://github.com/hey-api/openapi-ts/pull/1651) [`df350f3`](https://github.com/hey-api/openapi-ts/commit/df350f31dae957d063010ba46c5008ae831b3a32) Thanks [@mrlubos](https://github.com/mrlubos)! - fix: lower Node version requirements\n\n## 0.63.1\n\n### Patch Changes\n\n- [#1637](https://github.com/hey-api/openapi-ts/pull/1637) [`2dc380e`](https://github.com/hey-api/openapi-ts/commit/2dc380eabc17c723654beb04ecd7bce6d33d3b49) Thanks [@mrlubos](https://github.com/mrlubos)! - fix: update keywords in package.json\n\n- [#1637](https://github.com/hey-api/openapi-ts/pull/1637) [`2dc380e`](https://github.com/hey-api/openapi-ts/commit/2dc380eabc17c723654beb04ecd7bce6d33d3b49) Thanks [@mrlubos](https://github.com/mrlubos)! - fix: add Next.js client\n\n- [#1646](https://github.com/hey-api/openapi-ts/pull/1646) [`2cbffeb`](https://github.com/hey-api/openapi-ts/commit/2cbffeb2cdd6c6143cd68cac68369584879dda31) Thanks [@mrlubos](https://github.com/mrlubos)! - feat: support required client in SDK using sdk.client = false\n\n- [#1648](https://github.com/hey-api/openapi-ts/pull/1648) [`66a9e45`](https://github.com/hey-api/openapi-ts/commit/66a9e4517d2306da8c60750dc3380e6774a7177b) Thanks [@mrlubos](https://github.com/mrlubos)! - fix: add support for openIdConnect auth flow\n\n## 0.63.0\n\n### Minor Changes\n\n- [#1626](https://github.com/hey-api/openapi-ts/pull/1626) [`8eba19d`](https://github.com/hey-api/openapi-ts/commit/8eba19d4092fc0903572ab9fdadf0b4c26928ba2) Thanks [@mrlubos](https://github.com/mrlubos)! - feat: move clients to plugins\n\n  ### Client plugins\n\n  Clients are now plugins generating their own `client.gen.ts` file. There's no migration needed if you're using CLI. If you're using the configuration file, move `client` options to `plugins`.\n\n  ```js\n  export default {\n    client: \"@hey-api/client-fetch\", // [!code --]\n    input: \"path/to/openapi.json\",\n    output: \"src/client\",\n    plugins: [\"@hey-api/client-fetch\"], // [!code ++]\n  };\n  ```\n\n### Patch Changes\n\n- [#1626](https://github.com/hey-api/openapi-ts/pull/1626) [`8eba19d`](https://github.com/hey-api/openapi-ts/commit/8eba19d4092fc0903572ab9fdadf0b4c26928ba2) Thanks [@mrlubos](https://github.com/mrlubos)! - fix: move sdk.throwOnError option to client.throwOnError\n\n  ### Moved `sdk.throwOnError` option\n\n  This SDK configuration option has been moved to the client plugins where applicable. Not every client can be configured to throw on error, so it didn't make sense to expose the option when it didn't have any effect.\n\n  ```js\n  export default {\n    input: \"path/to/openapi.json\",\n    output: \"src/client\",\n    plugins: [\n      {\n        name: \"@hey-api/client-fetch\",\n        throwOnError: true, // [!code ++]\n      },\n      {\n        name: \"@hey-api/sdk\",\n        throwOnError: true, // [!code --]\n      },\n    ],\n  };\n  ```\n\n- [#1626](https://github.com/hey-api/openapi-ts/pull/1626) [`8eba19d`](https://github.com/hey-api/openapi-ts/commit/8eba19d4092fc0903572ab9fdadf0b4c26928ba2) Thanks [@mrlubos](https://github.com/mrlubos)! - fix: sdks import client from client.gen.ts instead of defining it inside the file\n\n  ### Added `client.gen.ts` file\n\n  The internal `client` instance previously located in `sdk.gen.ts` is now defined in `client.gen.ts`. If you're importing it in your code, update the import module.\n\n  ```js\n  import { client } from \"client/sdk.gen\"; // [!code --]\n  import { client } from \"client/client.gen\"; // [!code ++]\n  ```\n\n- [#1626](https://github.com/hey-api/openapi-ts/pull/1626) [`8eba19d`](https://github.com/hey-api/openapi-ts/commit/8eba19d4092fc0903572ab9fdadf0b4c26928ba2) Thanks [@mrlubos](https://github.com/mrlubos)! - fix: throw if inferred plugin not found\n\n## 0.62.3\n\n### Patch Changes\n\n- [#1600](https://github.com/hey-api/openapi-ts/pull/1600) [`0432418`](https://github.com/hey-api/openapi-ts/commit/0432418d72c94ef94865f8216ed2f723ad5191f9) Thanks [@mrlubos](https://github.com/mrlubos)! - fix: bundle clients from compiled index file\n\n- [#1594](https://github.com/hey-api/openapi-ts/pull/1594) [`bc66cde`](https://github.com/hey-api/openapi-ts/commit/bc66cde1ebe0e2df08c8d04b3ddc9504e4952cf3) Thanks [@mrlubos](https://github.com/mrlubos)! - fix: generate correct response for text/plain content type\n\n- [#1596](https://github.com/hey-api/openapi-ts/pull/1596) [`4784727`](https://github.com/hey-api/openapi-ts/commit/47847276e8bc854045044dd414382080270dd779) Thanks [@mrlubos](https://github.com/mrlubos)! - fix: do not use a body serializer on text/plain sdks\n\n- [#1602](https://github.com/hey-api/openapi-ts/pull/1602) [`194f941`](https://github.com/hey-api/openapi-ts/commit/194f94110545f2cae07bde13b863cd0cb5284d8a) Thanks [@mrlubos](https://github.com/mrlubos)! - fix: support all oauth2 flows in sdk auth\n\n- [#1596](https://github.com/hey-api/openapi-ts/pull/1596) [`4784727`](https://github.com/hey-api/openapi-ts/commit/47847276e8bc854045044dd414382080270dd779) Thanks [@mrlubos](https://github.com/mrlubos)! - fix: add null to valid bodySerializer types\n\n## 0.62.2\n\n### Patch Changes\n\n- [#1519](https://github.com/hey-api/openapi-ts/pull/1519) [`14d3c4c`](https://github.com/hey-api/openapi-ts/commit/14d3c4ce0393d543e2d3aaebbfcf8f0cf32483b0) Thanks [@mrlubos](https://github.com/mrlubos)! - fix: add support for Nuxt client\n\n## 0.62.1\n\n### Patch Changes\n\n- [#1574](https://github.com/hey-api/openapi-ts/pull/1574) [`51bf7fc`](https://github.com/hey-api/openapi-ts/commit/51bf7fc88cb6e9ab392106b85f900a75540e524f) Thanks [@mrlubos](https://github.com/mrlubos)! - fix: generate bigint type instead of BigInt\n\n- [#1572](https://github.com/hey-api/openapi-ts/pull/1572) [`0e4882a`](https://github.com/hey-api/openapi-ts/commit/0e4882ae3b0dc048a2d9a2a0b5c39fbdeed6de8d) Thanks [@mrlubos](https://github.com/mrlubos)! - fix: add ability to skip generating index file with output.indexFile\n\n## 0.62.0\n\n### Minor Changes\n\n- [#1568](https://github.com/hey-api/openapi-ts/pull/1568) [`465410c`](https://github.com/hey-api/openapi-ts/commit/465410c201eb19e737e3143ad53a146e95f80107) Thanks [@mrlubos](https://github.com/mrlubos)! - feat: change the default parser\n\n### Patch Changes\n\n- [#1566](https://github.com/hey-api/openapi-ts/pull/1566) [`39d558a`](https://github.com/hey-api/openapi-ts/commit/39d558afc6af97fe8de1a6471b9d1f172ec2960a) Thanks [@mrlubos](https://github.com/mrlubos)! - fix: spread sdk options at the end to allow overriding generated values\n\n## 0.61.3\n\n### Patch Changes\n\n- [#1552](https://github.com/hey-api/openapi-ts/pull/1552) [`ceb8bd7`](https://github.com/hey-api/openapi-ts/commit/ceb8bd74207566871e9f179cb28b2d8c440ef2c8) Thanks [@mrlubos](https://github.com/mrlubos)! - fix: use z.coerce before calling z.bigint\n\n## 0.61.2\n\n### Patch Changes\n\n- [#1543](https://github.com/hey-api/openapi-ts/pull/1543) [`7a2d6dc`](https://github.com/hey-api/openapi-ts/commit/7a2d6dcd6e30411178ac5c78db3f1dbbcc8d6b27) Thanks [@mrlubos](https://github.com/mrlubos)! - fix: send GET request only on first spec fetch\n\n## 0.61.1\n\n### Patch Changes\n\n- [#1530](https://github.com/hey-api/openapi-ts/pull/1530) [`67b7295`](https://github.com/hey-api/openapi-ts/commit/67b72959be499ff59f5f68bfdaa7e5568f5de02f) Thanks [@mrlubos](https://github.com/mrlubos)! - fix: detect pagination in composite schemas with null type\n\n- [#1535](https://github.com/hey-api/openapi-ts/pull/1535) [`d4cfa05`](https://github.com/hey-api/openapi-ts/commit/d4cfa05ed425d57f79b28efe76e6a33f1e892ec5) Thanks [@mrlubos](https://github.com/mrlubos)! - fix: handle primitive constants in Zod and types\n\n## 0.61.0\n\n### Minor Changes\n\n- [#1520](https://github.com/hey-api/openapi-ts/pull/1520) [`b3c23ba`](https://github.com/hey-api/openapi-ts/commit/b3c23ba99c361bdca3ab9c44017b6e5c044f40a7) Thanks [@chriswiggins](https://github.com/chriswiggins)! - Add support for HTTP Bearer Authentication Scheme\n\n- [#1525](https://github.com/hey-api/openapi-ts/pull/1525) [`7b7313e`](https://github.com/hey-api/openapi-ts/commit/7b7313eeaf9a749fb81465546bc4e4bdce31d5ab) Thanks [@mrlubos](https://github.com/mrlubos)! - feat: add OpenAPI 2.0 support to experimental parser\n\n- [#1511](https://github.com/hey-api/openapi-ts/pull/1511) [`4e8064d`](https://github.com/hey-api/openapi-ts/commit/4e8064d9a589e14b42d2b1a329e2436f242884da) Thanks [@mrlubos](https://github.com/mrlubos)! - feat: add watch mode\n\n  ## Watch Mode\n\n  ::: warning\n  Watch mode currently supports only remote files via URL.\n  :::\n\n  If your schema changes frequently, you may want to automatically regenerate the output during development. To watch your input file for changes, enable `watch` mode in your configuration or pass the `--watch` flag to the CLI.\n\n  ### Config\n\n  ```js\n  export default {\n    client: \"@hey-api/client-fetch\",\n    input: \"path/to/openapi.json\",\n    output: \"src/client\",\n    watch: true,\n  };\n  ```\n\n  ### CLI\n\n  ```sh\n  npx @hey-api/openapi-ts \\\n    -c @hey-api/client-fetch \\\n    -i path/to/openapi.json \\\n    -o src/client \\\n    -w\n  ```\n\n- **BREAKING**: please update `@hey-api/client-*` packages to the latest version\n\n  feat: add support for basic http auth\n\n### Patch Changes\n\n- [#1529](https://github.com/hey-api/openapi-ts/pull/1529) [`ccc0bbc`](https://github.com/hey-api/openapi-ts/commit/ccc0bbcbdeace22bbd8e92caadebdca81e61e393) Thanks [@mrlubos](https://github.com/mrlubos)! - fix: add support for long integers\n\n- [#1512](https://github.com/hey-api/openapi-ts/pull/1512) [`dd0e0a2`](https://github.com/hey-api/openapi-ts/commit/dd0e0a266153e34448fbc3db6b0f864f75483280) Thanks [@mrlubos](https://github.com/mrlubos)! - fix: add `sdk.throwOnError` option\n\n- [#1525](https://github.com/hey-api/openapi-ts/pull/1525) [`7b7313e`](https://github.com/hey-api/openapi-ts/commit/7b7313eeaf9a749fb81465546bc4e4bdce31d5ab) Thanks [@mrlubos](https://github.com/mrlubos)! - fix: preserve leading separators in enum keys\n\n## 0.60.1\n\n### Patch Changes\n\n- [#1468](https://github.com/hey-api/openapi-ts/pull/1468) [`20d7497`](https://github.com/hey-api/openapi-ts/commit/20d7497acb6c046f6a4206c2d8137414e17b2263) Thanks [@mrlubos](https://github.com/mrlubos)! - fix: handle indexed access checks\n\n- [#1469](https://github.com/hey-api/openapi-ts/pull/1469) [`a7608c2`](https://github.com/hey-api/openapi-ts/commit/a7608c27ced3419dee228f4b0cd96479b3dc2c04) Thanks [@mrlubos](https://github.com/mrlubos)! - fix: zod: generate patterns and improve plain schemas\n\n- [#1471](https://github.com/hey-api/openapi-ts/pull/1471) [`f86d293`](https://github.com/hey-api/openapi-ts/commit/f86d293f18f133ef6dd2f4864d037611b81edd26) Thanks [@mrlubos](https://github.com/mrlubos)! - fix: add links to the experimental parser callouts\n\n- [#1462](https://github.com/hey-api/openapi-ts/pull/1462) [`893d6ef`](https://github.com/hey-api/openapi-ts/commit/893d6ef5677d17b96174f505937f6da686abb2bc) Thanks [@mrlubos](https://github.com/mrlubos)! - fix: update types for custom plugins so defineConfig does not throw\n\n- [#1464](https://github.com/hey-api/openapi-ts/pull/1464) [`787d59c`](https://github.com/hey-api/openapi-ts/commit/787d59c307549f5faf9f83314a8e9692bb01eb5d) Thanks [@mrlubos](https://github.com/mrlubos)! - fix: export IR types\n\n- [#1467](https://github.com/hey-api/openapi-ts/pull/1467) [`3a3f8d7`](https://github.com/hey-api/openapi-ts/commit/3a3f8d7ea4c993d4372e4bc52f6d9525bf1e45b6) Thanks [@mrlubos](https://github.com/mrlubos)! - fix: export utils\n\n- [#1457](https://github.com/hey-api/openapi-ts/pull/1457) [`bc03c37`](https://github.com/hey-api/openapi-ts/commit/bc03c373f4df61d8d715dc13badba2a6c5a3a450) Thanks [@mrlubos](https://github.com/mrlubos)! - fix: allow plugins to explicitly declare whether they should be re-exported from the index file\n\n## 0.60.0\n\n### Minor Changes\n\n- [#1430](https://github.com/hey-api/openapi-ts/pull/1430) [`9cec9e8`](https://github.com/hey-api/openapi-ts/commit/9cec9e8582c12a8c041b922d9587e16f6f19782a) Thanks [@mrlubos](https://github.com/mrlubos)! - fix: require sdk.transformer to use generated transformers\n\n  ### Added `sdk.transformer` option\n\n  When generating SDKs, you now have to specify `transformer` in order to modify response data. By default, adding `@hey-api/transformers` to your plugins will only produce additional output. To preserve the previous functionality, set `sdk.transformer` to `true`.\n\n  ```js\n  import { defaultPlugins } from \"@hey-api/openapi-ts\";\n\n  export default {\n    client: \"@hey-api/client-fetch\",\n    input: \"path/to/openapi.json\",\n    output: \"src/client\",\n    plugins: [\n      ...defaultPlugins,\n      {\n        dates: true,\n        name: \"@hey-api/transformers\",\n      },\n      {\n        name: \"@hey-api/sdk\",\n        transformer: true, // [!code ++]\n      },\n    ],\n  };\n  ```\n\n- [#1447](https://github.com/hey-api/openapi-ts/pull/1447) [`200821b`](https://github.com/hey-api/openapi-ts/commit/200821b3ceea8ffca7656fe3f6e2ef98b7110a2a) Thanks [@mrlubos](https://github.com/mrlubos)! - fix: revert license to MIT\n\n### Patch Changes\n\n- [#1430](https://github.com/hey-api/openapi-ts/pull/1430) [`9cec9e8`](https://github.com/hey-api/openapi-ts/commit/9cec9e8582c12a8c041b922d9587e16f6f19782a) Thanks [@mrlubos](https://github.com/mrlubos)! - feat: Zod plugin generates response schemas\n\n## 0.59.2\n\n### Patch Changes\n\n- [#1420](https://github.com/hey-api/openapi-ts/pull/1420) [`8010dbb`](https://github.com/hey-api/openapi-ts/commit/8010dbb1ab8b91d1d49d5cf16276183764a63ff3) Thanks [@mrlubos](https://github.com/mrlubos)! - fix: generate querySerializer options for Axios client\n\n- [#1419](https://github.com/hey-api/openapi-ts/pull/1419) [`4555796`](https://github.com/hey-api/openapi-ts/commit/4555796df3a33fb3fdf7d7417f7d1f3b22d89bcf) Thanks [@mrlubos](https://github.com/mrlubos)! - fix: infer responseType in SDKs for axios client\n\n- [#1409](https://github.com/hey-api/openapi-ts/pull/1409) [`646064d`](https://github.com/hey-api/openapi-ts/commit/646064d1aecea988d2b4df73bd24b2ee83394ae0) Thanks [@mrlubos](https://github.com/mrlubos)! - feat: support oauth2 and apiKey security schemes\n\n- [#1416](https://github.com/hey-api/openapi-ts/pull/1416) [`2a605b7`](https://github.com/hey-api/openapi-ts/commit/2a605b7e43655b3100e302e10b9979fbbad6cdfe) Thanks [@mrlubos](https://github.com/mrlubos)! - fix: zod plugin handles recursive schemas\n\n## 0.59.1\n\n### Patch Changes\n\n- [#1398](https://github.com/hey-api/openapi-ts/pull/1398) [`a88e7d9`](https://github.com/hey-api/openapi-ts/commit/a88e7d9f8a313c641cf651256a710d0610b95b5d) Thanks [@mrlubos](https://github.com/mrlubos)! - fix: prefix restricted identifier names with underscore\n\n- [#1394](https://github.com/hey-api/openapi-ts/pull/1394) [`ec48d32`](https://github.com/hey-api/openapi-ts/commit/ec48d323d80de8e6a47ce7ecd732288f0a47e17a) Thanks [@mrlubos](https://github.com/mrlubos)! - fix: disallow additional query parameters in experimental parser output\n\n## 0.59.0\n\n### Minor Changes\n\n- [#1387](https://github.com/hey-api/openapi-ts/pull/1387) [`7c4335d`](https://github.com/hey-api/openapi-ts/commit/7c4335d12782c73b5b242e7d5786ec8778857d1d) Thanks [@mrlubos](https://github.com/mrlubos)! - feat: add `logs.level` option\n\n  ### Added `logs.level` option\n\n  You can now configure different log levels. As part of this feature, we had to introduce a breaking change by moving the `debug` option to `logs.level`. This will affect you if you're calling `@hey-api/openapi-ts` from Node.js (not CLI) or using the configuration file.\n\n  ```js\n  export default {\n    client: \"@hey-api/client-fetch\",\n    debug: true, // [!code --]\n    input: \"path/to/openapi.json\",\n    logs: {\n      level: \"debug\", // [!code ++]\n    },\n    output: \"src/client\",\n  };\n  ```\n\n- [#1389](https://github.com/hey-api/openapi-ts/pull/1389) [`f4c98ec`](https://github.com/hey-api/openapi-ts/commit/f4c98ec429ee989ae1c76328f4d42d44f14cb52e) Thanks [@mrlubos](https://github.com/mrlubos)! - feat: remove `@hey-api/schemas` from default plugins\n\n  ### Updated default `plugins`\n\n  `@hey-api/schemas` has been removed from the default plugins. To continue using it, add it to your plugins array.\n\n  ```js\n  import { defaultPlugins } from \"@hey-api/openapi-ts\";\n\n  export default {\n    client: \"@hey-api/client-fetch\",\n    experimentalParser: true,\n    input: \"path/to/openapi.json\",\n    output: \"src/client\",\n    plugins: [\n      ...defaultPlugins,\n      \"@hey-api/schemas\", // [!code ++]\n    ],\n  };\n  ```\n\n### Patch Changes\n\n- [#1382](https://github.com/hey-api/openapi-ts/pull/1382) [`3580c1e`](https://github.com/hey-api/openapi-ts/commit/3580c1eec4640d235a1e0f78bf76581e532aaf8b) Thanks [@mrlubos](https://github.com/mrlubos)! - fix: correctly resolve required properties in nested allOf composition\n\n- [#1387](https://github.com/hey-api/openapi-ts/pull/1387) [`7c4335d`](https://github.com/hey-api/openapi-ts/commit/7c4335d12782c73b5b242e7d5786ec8778857d1d) Thanks [@mrlubos](https://github.com/mrlubos)! - fix: add `--silent` or `-s` CLI option for silent log level\n\n- [#1382](https://github.com/hey-api/openapi-ts/pull/1382) [`3580c1e`](https://github.com/hey-api/openapi-ts/commit/3580c1eec4640d235a1e0f78bf76581e532aaf8b) Thanks [@mrlubos](https://github.com/mrlubos)! - fix: transformers handle allOf composition in experimental parser\n\n- [#1387](https://github.com/hey-api/openapi-ts/pull/1387) [`0def82c`](https://github.com/hey-api/openapi-ts/commit/0def82c91d1be936702690b8cf5a21775974d946) Thanks [@mrlubos](https://github.com/mrlubos)! - feat: add `logs` configuration option to customize log directory\n\n- [#1390](https://github.com/hey-api/openapi-ts/pull/1390) [`8388c47`](https://github.com/hey-api/openapi-ts/commit/8388c4720dbb657899d5e30bd8d59c19583cad98) Thanks [@mrlubos](https://github.com/mrlubos)! - fix: allow arbitrary object properties when additionalProperties is undefined\n\n- [#1387](https://github.com/hey-api/openapi-ts/pull/1387) [`7c4335d`](https://github.com/hey-api/openapi-ts/commit/7c4335d12782c73b5b242e7d5786ec8778857d1d) Thanks [@mrlubos](https://github.com/mrlubos)! - fix: support `DEBUG` environment variable\n\n## 0.58.0\n\n### Minor Changes\n\n- [#1353](https://github.com/hey-api/openapi-ts/pull/1353) [`efd3e54`](https://github.com/hey-api/openapi-ts/commit/efd3e5444d208ea0c8dda7573f26bb04c31cc372) Thanks [@mrlubos](https://github.com/mrlubos)! - feat: add typescript.identifierCase option\n\n  ### Added `typescript.identifierCase` option\n\n  **This change affects only the experimental parser.** By default, the generated TypeScript interfaces will follow the PascalCase naming convention. In the previous versions, we tried to preserve the original name as much as possible. To keep the previous behavior, set `typescript.identifierCase` to `preserve`.\n\n  ```js\n  export default {\n    client: \"@hey-api/client-fetch\",\n    experimentalParser: true,\n    input: \"path/to/openapi.json\",\n    output: \"src/client\",\n    plugins: [\n      // ...other plugins\n      {\n        identifierCase: \"preserve\", // [!code ++]\n        name: \"@hey-api/typescript\",\n      },\n    ],\n  };\n  ```\n\n- [#1360](https://github.com/hey-api/openapi-ts/pull/1360) [`5f6ddd7`](https://github.com/hey-api/openapi-ts/commit/5f6ddd796f0ce77bcca55fd13981f2a8481aecd3) Thanks [@mrlubos](https://github.com/mrlubos)! - fix: remove schemas and transformers re-exports from index.ts\n\n  ### Removed `schemas.gen.ts` re-export\n\n  `index.ts` will no longer re-export `schemas.gen.ts` to reduce the chance of producing broken output. Please update your code to import from `schemas.gen.ts` directly.\n\n  ```js\n  import { mySchema } from \"client\"; // [!code --]\n  import { mySchema } from \"client/schemas.gen\"; // [!code ++]\n  ```\n\n  ### Removed `transformers.gen.ts` re-export\n\n  `index.ts` will no longer re-export `transformers.gen.ts` to reduce the chance of producing broken output. Please update your code to import from `transformers.gen.ts` directly.\n\n  ```js\n  import { myTransformer } from \"client\"; // [!code --]\n  import { myTransformer } from \"client/transformers.gen\"; // [!code ++]\n  ```\n\n- [#1360](https://github.com/hey-api/openapi-ts/pull/1360) [`5f6ddd7`](https://github.com/hey-api/openapi-ts/commit/5f6ddd796f0ce77bcca55fd13981f2a8481aecd3) Thanks [@mrlubos](https://github.com/mrlubos)! - feat: add output.clean option\n\n  ### Added `output.clean` option\n\n  By default, the `output.path` folder will be emptied on every run. To preserve the previous behavior, set `output.clean` to `false`.\n\n  ```js\n  export default {\n    client: \"@hey-api/client-fetch\",\n    input: \"path/to/openapi.json\",\n    output: {\n      clean: false, // [!code ++]\n      path: \"src/client\",\n    },\n  };\n  ```\n\n- [#1362](https://github.com/hey-api/openapi-ts/pull/1362) [`3bf7169`](https://github.com/hey-api/openapi-ts/commit/3bf7169b620946d99c17cf5398d7a818d0099f94) Thanks [@mrlubos](https://github.com/mrlubos)! - feat: add typescript.enumsCase option\n\n### Patch Changes\n\n- [#1361](https://github.com/hey-api/openapi-ts/pull/1361) [`a23c25e`](https://github.com/hey-api/openapi-ts/commit/a23c25ea1b5ca8bf421302bf93690168df3473cb) Thanks [@mrlubos](https://github.com/mrlubos)! - fix: add before and after to pagination keywords\n\n- [#1368](https://github.com/hey-api/openapi-ts/pull/1368) [`cca2290`](https://github.com/hey-api/openapi-ts/commit/cca2290aeaab0b9807c928d73dbfc1e4bacadc4d) Thanks [@mrlubos](https://github.com/mrlubos)! - fix: export Plugin API namespace\n\n- [#1369](https://github.com/hey-api/openapi-ts/pull/1369) [`11163f0`](https://github.com/hey-api/openapi-ts/commit/11163f0d6885633078126849c04c0646e7d19255) Thanks [@mrlubos](https://github.com/mrlubos)! - fix: TanStack Query plugin handles conflict with internal function name in experimental parser\n\n## 0.57.1\n\n### Patch Changes\n\n- [#1335](https://github.com/hey-api/openapi-ts/pull/1335) [`bb9a848`](https://github.com/hey-api/openapi-ts/commit/bb9a84869dc911861f3b12f725a470b8fd6b67fe) Thanks [@mrlubos](https://github.com/mrlubos)! - fix: transformers correctly handle an array\n\n- [#1332](https://github.com/hey-api/openapi-ts/pull/1332) [`25b598b`](https://github.com/hey-api/openapi-ts/commit/25b598bcecd1dd3eb3da6b7c7f24f4adb0170114) Thanks [@mrlubos](https://github.com/mrlubos)! - fix: improve camelcase with abbreviated plurals\n\n- [#1333](https://github.com/hey-api/openapi-ts/pull/1333) [`734a62d`](https://github.com/hey-api/openapi-ts/commit/734a62dd8d594b8266964fe16766a481d37eb7df) Thanks [@mrlubos](https://github.com/mrlubos)! - fix: experimental parser generates url inside data types\n\n- [#1336](https://github.com/hey-api/openapi-ts/pull/1336) [`6857da8`](https://github.com/hey-api/openapi-ts/commit/6857da8a7f23829a89115b2237aaac9a71a38dfb) Thanks [@mrlubos](https://github.com/mrlubos)! - fix: experimental parser transforms anyOf date and null\n\n- [#1330](https://github.com/hey-api/openapi-ts/pull/1330) [`3d68587`](https://github.com/hey-api/openapi-ts/commit/3d6858748c94d6e33fd4dae7ddbf6cb70d21aaee) Thanks [@mrlubos](https://github.com/mrlubos)! - fix: experimental parser handles empty string and null enum values in JavaScript mode\n\n- [#1340](https://github.com/hey-api/openapi-ts/pull/1340) [`c8511e0`](https://github.com/hey-api/openapi-ts/commit/c8511e0d84dd408407bf764fb0bae4938b70dacb) Thanks [@mrlubos](https://github.com/mrlubos)! - fix: experimental parser exports reusable request bodies\n\n## 0.57.0\n\n### Minor Changes\n\n- [#1324](https://github.com/hey-api/openapi-ts/pull/1324) [`4e62378`](https://github.com/hey-api/openapi-ts/commit/4e62378352d8306580293ee4aeef43756d245f85) Thanks [@mrlubos](https://github.com/mrlubos)! - feat: rename Hey API plugins\n\n  ### Renamed `@hey-api/services` plugin\n\n  This plugin has been renamed to `@hey-api/sdk`.\n\n  ### Changed `sdk.output` value\n\n  To align with the updated name, the `@hey-api/sdk` plugin will generate an `sdk.gen.ts` file. This will result in a breaking change if you're importing from `services.gen.ts`. Please update your imports to reflect this change.\n\n  ```js\n  import { client } from \"client/services.gen\"; // [!code --]\n  import { client } from \"client/sdk.gen\"; // [!code ++]\n  ```\n\n  ### Renamed `@hey-api/types` plugin\n\n  This plugin has been renamed to `@hey-api/typescript`.\n\n- [#1327](https://github.com/hey-api/openapi-ts/pull/1327) [`62e37d5`](https://github.com/hey-api/openapi-ts/commit/62e37d51e9d829e11d08a494060c1e808ce2e3f3) Thanks [@mrlubos](https://github.com/mrlubos)! - feat: add typescript.exportInlineEnums option\n\n  ### Added `typescript.exportInlineEnums` option\n\n  By default, inline enums (enums not defined as reusable components in the input file) will be generated only as inlined union types. You can set `exportInlineEnums` to `true` to treat inline enums as reusable components. When `true`, the exported enums will follow the style defined in `enums`.\n\n  This is a breaking change since in the previous versions, inline enums were always treated as reusable components. To preserve your current output, set `exportInlineEnums` to `true`. This feature works only with the experimental parser.\n\n  ```js\n  export default {\n    client: \"@hey-api/client-fetch\",\n    experimentalParser: true,\n    input: \"path/to/openapi.json\",\n    output: \"src/client\",\n    plugins: [\n      // ...other plugins\n      {\n        exportInlineEnums: true, // [!code ++]\n        name: \"@hey-api/typescript\",\n      },\n    ],\n  };\n  ```\n\n### Patch Changes\n\n- [#1326](https://github.com/hey-api/openapi-ts/pull/1326) [`01c3d69`](https://github.com/hey-api/openapi-ts/commit/01c3d69e4c97262cd6dda5061f0a76f3b4fda31a) Thanks [@mrlubos](https://github.com/mrlubos)! - fix: improve generated enum keys in experimental parser\n\n## 0.56.3\n\n### Patch Changes\n\n- [#1319](https://github.com/hey-api/openapi-ts/pull/1319) [`af76a77`](https://github.com/hey-api/openapi-ts/commit/af76a7705c585fcfae0c72872f358936f7d19d56) Thanks [@mrlubos](https://github.com/mrlubos)! - fix: Zod plugin handles value constraints and defaults\n\n## 0.56.2\n\n### Patch Changes\n\n- [#1316](https://github.com/hey-api/openapi-ts/pull/1316) [`a79fac8`](https://github.com/hey-api/openapi-ts/commit/a79fac8919ed29eec7195cbd441ffa38b559d63c) Thanks [@mrlubos](https://github.com/mrlubos)! - fix: add input.exclude option\n\n- [#1316](https://github.com/hey-api/openapi-ts/pull/1316) [`a79fac8`](https://github.com/hey-api/openapi-ts/commit/a79fac8919ed29eec7195cbd441ffa38b559d63c) Thanks [@mrlubos](https://github.com/mrlubos)! - fix: make Zod plugin available in plugins options\n\n## 0.56.1\n\n### Patch Changes\n\n- [#1309](https://github.com/hey-api/openapi-ts/pull/1309) [`785480b`](https://github.com/hey-api/openapi-ts/commit/785480b2d5f96a681dfc1f7f0fb626f744bb221f) Thanks [@mrlubos](https://github.com/mrlubos)! - fix: gracefully handle invalid schema type in experimental parser\n\n## 0.56.0\n\n### Minor Changes\n\n- [#1286](https://github.com/hey-api/openapi-ts/pull/1286) [`5514de4`](https://github.com/hey-api/openapi-ts/commit/5514de46a8c913ddc40f07d0142c80266e9837cd) Thanks [@jacobinu](https://github.com/jacobinu)! - feat: add `fastify` plugin\n\n### Patch Changes\n\n- [#1286](https://github.com/hey-api/openapi-ts/pull/1286) [`cebf327`](https://github.com/hey-api/openapi-ts/commit/cebf327046c801b375846bae6b07561b8ad1bdd6) Thanks [@jacobinu](https://github.com/jacobinu)! - fix: export a map of error and response types by status code\n\n- [#1286](https://github.com/hey-api/openapi-ts/pull/1286) [`8a15a35`](https://github.com/hey-api/openapi-ts/commit/8a15a35e86ff22eca85dc218bc1793315b934556) Thanks [@jacobinu](https://github.com/jacobinu)! - fix: deprecate types.tree option\n\n- [#1305](https://github.com/hey-api/openapi-ts/pull/1305) [`a3698a7`](https://github.com/hey-api/openapi-ts/commit/a3698a7f1680d7dfb913c6253f8685ebbdd132ca) Thanks [@mrlubos](https://github.com/mrlubos)! - fix: handle file-like content media type without explicit schema\n\n## 0.55.3\n\n### Patch Changes\n\n- [#1283](https://github.com/hey-api/openapi-ts/pull/1283) [`781d1a4`](https://github.com/hey-api/openapi-ts/commit/781d1a40d10ce380f1ca2cb2bc7aca7d3b169bc6) Thanks [@hougesen](https://github.com/hougesen)! - feat: add support for oxlint as linter\n\n## 0.55.2\n\n### Patch Changes\n\n- [#1253](https://github.com/hey-api/openapi-ts/pull/1253) [`01dee3d`](https://github.com/hey-api/openapi-ts/commit/01dee3df879232939e43355231147b3d910fb482) Thanks [@mrlubos](https://github.com/mrlubos)! - fix: update sponsorship links\n\n- [#1266](https://github.com/hey-api/openapi-ts/pull/1266) [`d60d260`](https://github.com/hey-api/openapi-ts/commit/d60d260342ff3013c2e228151e9b897224eb89cc) Thanks [@mrlubos](https://github.com/mrlubos)! - fix: correctly generate array when items are a oneOf array with length 1\n\n- [#1265](https://github.com/hey-api/openapi-ts/pull/1265) [`691cdc2`](https://github.com/hey-api/openapi-ts/commit/691cdc28b6ad5bc1a38e1ae9eb134a2b41d4ead8) Thanks [@mrlubos](https://github.com/mrlubos)! - fix: handle non-exploded array query parameters\n\n- [#1267](https://github.com/hey-api/openapi-ts/pull/1267) [`ff3aa4a`](https://github.com/hey-api/openapi-ts/commit/ff3aa4ac58068671d2b9eedbd7528eb4f9969386) Thanks [@mrlubos](https://github.com/mrlubos)! - fix: handle discriminators in experimental parser\n\n## 0.55.1\n\n### Patch Changes\n\n- [#1248](https://github.com/hey-api/openapi-ts/pull/1248) [`61cd848`](https://github.com/hey-api/openapi-ts/commit/61cd848262b20580fb185d023c28aa54754bf19c) Thanks [@mrlubos](https://github.com/mrlubos)! - fix: handle nullable enums in experimental parser\n\n- [#1251](https://github.com/hey-api/openapi-ts/pull/1251) [`07800d4`](https://github.com/hey-api/openapi-ts/commit/07800d4fbb849614ed2c23b8acc9c82f1ef74598) Thanks [@mrlubos](https://github.com/mrlubos)! - fix: add support for custom plugins\n\n- [#1250](https://github.com/hey-api/openapi-ts/pull/1250) [`9e07675`](https://github.com/hey-api/openapi-ts/commit/9e07675802c75b8f5105dd104bb7736aeb83ece6) Thanks [@mrlubos](https://github.com/mrlubos)! - fix: render void for empty response status codes in experimental parser\n\n## 0.55.0\n\n### Minor Changes\n\n- [#1241](https://github.com/hey-api/openapi-ts/pull/1241) [`41cee41`](https://github.com/hey-api/openapi-ts/commit/41cee417055c50de6170e6fdeae65bd6e643d19c) Thanks [@mrlubos](https://github.com/mrlubos)! - feat: add input.include option\n\n### Patch Changes\n\n- [#1239](https://github.com/hey-api/openapi-ts/pull/1239) [`319a28a`](https://github.com/hey-api/openapi-ts/commit/319a28af29541d7f61cca82389e1d486204f321f) Thanks [@mrlubos](https://github.com/mrlubos)! - fix: handle pagination with basic refs\n\n## 0.54.4\n\n### Patch Changes\n\n- [#1237](https://github.com/hey-api/openapi-ts/pull/1237) [`63ccc07`](https://github.com/hey-api/openapi-ts/commit/63ccc0775e24a096bc46ac7ff29b99b694aad621) Thanks [@mrlubos](https://github.com/mrlubos)! - fix: forbid any body, path, or query parameters if not defined in spec\n\n- [#1235](https://github.com/hey-api/openapi-ts/pull/1235) [`7a1a419`](https://github.com/hey-api/openapi-ts/commit/7a1a419f07d5ad39e07265771b30d49a4b754a88) Thanks [@mrlubos](https://github.com/mrlubos)! - fix: handle additionalProperties: boolean in experimental parser\n\n- [#1233](https://github.com/hey-api/openapi-ts/pull/1233) [`08baa77`](https://github.com/hey-api/openapi-ts/commit/08baa77afdc5e2c49d4789b20673e949951ab0b2) Thanks [@mrlubos](https://github.com/mrlubos)! - fix: update schemas plugin to handle experimental 3.0.x parser\n\n  This release adds an experimental parser for OpenAPI versions 3.0.x. In the future, this will become the default parser. If you're using OpenAPI 3.0 or newer, we encourage you to try it out today.\n\n  You can enable the experimental parser by setting the `experimentalParser` boolean flag to `true` in your configuration file or CLI.\n\n  ```js\n  export default {\n    client: \"@hey-api/client-fetch\",\n    input: \"path/to/openapi.json\",\n    output: \"src/client\",\n    experimentalParser: true,\n  };\n  ```\n\n  ```sh\n  npx @hey-api/openapi-ts -i path/to/openapi.json -o src/client -c @hey-api/client-fetch -e\n  ```\n\n  The generated output should not structurally change, despite few things being generated in a different order. In fact, the output should be cleaner! That's the immediate side effect you should notice. If that's not true, please leave feedback in [GitHub issues](https://github.com/hey-api/openapi-ts/issues).\n\n  Hey API parser marks an important milestone towards v1 of `@hey-api/openapi-ts`. More features will be added to the parser in the future and the original parser from `openapi-typescript-codegen` will be deprecated and used only for generating legacy clients.\n\n  If you'd like to work with the parser more closely (e.g. to generate code not natively supported by this package), feel free to reach out with any feedback or suggestions. Happy parsing! 🎉\n\n## 0.54.3\n\n### Patch Changes\n\n- [#1230](https://github.com/hey-api/openapi-ts/pull/1230) [`3e65ae0`](https://github.com/hey-api/openapi-ts/commit/3e65ae06bcd2823482cf012909388c7630e18229) Thanks [@mrlubos](https://github.com/mrlubos)! - feat: add OpenAPI 3.0.x experimental parser\n\n  This release adds an experimental parser for OpenAPI versions 3.0.x. In the future, this will become the default parser. If you're using OpenAPI 3.0 or newer, we encourage you to try it out today.\n\n  You can enable the experimental parser by setting the `experimentalParser` boolean flag to `true` in your configuration file or CLI.\n\n  ```js\n  export default {\n    client: \"@hey-api/client-fetch\",\n    input: \"path/to/openapi.json\",\n    output: \"src/client\",\n    experimentalParser: true,\n  };\n  ```\n\n  ```sh\n  npx @hey-api/openapi-ts -i path/to/openapi.json -o src/client -c @hey-api/client-fetch -e\n  ```\n\n  The generated output should not structurally change, despite few things being generated in a different order. In fact, the output should be cleaner! That's the immediate side effect you should notice. If that's not true, please leave feedback in [GitHub issues](https://github.com/hey-api/openapi-ts/issues).\n\n  Hey API parser marks an important milestone towards v1 of `@hey-api/openapi-ts`. More features will be added to the parser in the future and the original parser from `openapi-typescript-codegen` will be deprecated and used only for generating legacy clients.\n\n  If you'd like to work with the parser more closely (e.g. to generate code not natively supported by this package), feel free to reach out with any feedback or suggestions. Happy parsing! 🎉\n\n## 0.54.2\n\n### Patch Changes\n\n- [#1222](https://github.com/hey-api/openapi-ts/pull/1222) [`ceb4363`](https://github.com/hey-api/openapi-ts/commit/ceb4363d52893ebe947e21aac402b868ff2820d4) Thanks [@mrlubos](https://github.com/mrlubos)! - feat: add support for @tanstack/angular-query-experimental package\n\n## 0.54.1\n\n### Patch Changes\n\n- [#1211](https://github.com/hey-api/openapi-ts/pull/1211) [`c8a3e3d`](https://github.com/hey-api/openapi-ts/commit/c8a3e3d7e59692698b7cf45182ca92494fc4af96) Thanks [@mrlubos](https://github.com/mrlubos)! - fix: ignore name option when not used with legacy clients to avoid producing broken output\n\n- [#1209](https://github.com/hey-api/openapi-ts/pull/1209) [`3a80b9f`](https://github.com/hey-api/openapi-ts/commit/3a80b9fd009c8229d69f3f349acbfb19b7549a94) Thanks [@mrlubos](https://github.com/mrlubos)! - fix: add support for OpenAPI 3.1.1 to experimental parser\n\n## 0.54.0\n\n### Minor Changes\n\n- [#1201](https://github.com/hey-api/openapi-ts/pull/1201) [`972a93a`](https://github.com/hey-api/openapi-ts/commit/972a93a91a945cc9ead73c08bb0fa9ee120433ba) Thanks [@mrlubos](https://github.com/mrlubos)! - feat: make plugins first-class citizens\n\n  This release makes plugins first-class citizens. In order to achieve that, the following breaking changes were introduced.\n\n  ### Removed CLI options\n\n  The `--types`, `--schemas`, and `--services` CLI options have been removed. You can list which plugins you'd like to use explicitly by passing a list of plugins as `--plugins <plugin1> <plugin2>`\n\n  ### Removed `*.export` option\n\n  Previously, you could explicitly disable export of certain artifacts using the `*.export` option or its shorthand variant. These were both removed. You can now disable export of specific artifacts by manually defining an array of `plugins` and excluding the unwanted plugin.\n\n  ::: code-group\n\n  ```js [shorthand]\n  export default {\n    client: \"@hey-api/client-fetch\",\n    input: \"path/to/openapi.json\",\n    output: \"src/client\",\n    schemas: false, // [!code --]\n    plugins: [\"@hey-api/types\", \"@hey-api/services\"], // [!code ++]\n  };\n  ```\n\n  ```js [*.export]\n  export default {\n    client: \"@hey-api/client-fetch\",\n    input: \"path/to/openapi.json\",\n    output: \"src/client\",\n    schemas: {\n      export: false, // [!code --]\n    },\n    plugins: [\"@hey-api/types\", \"@hey-api/services\"], // [!code ++]\n  };\n  ```\n\n  :::\n\n  ### Renamed `schemas.name` option\n\n  Each plugin definition contains a `name` field. This was conflicting with the `schemas.name` option. As a result, it has been renamed to `nameBuilder`.\n\n  ```js\n  export default {\n    client: \"@hey-api/client-fetch\",\n    input: \"path/to/openapi.json\",\n    output: \"src/client\",\n    schemas: {\n      name: (name) => `${name}Schema`, // [!code --]\n    },\n    plugins: [\n      // ...other plugins\n      {\n        nameBuilder: (name) => `${name}Schema`, // [!code ++]\n        name: \"@hey-api/schemas\",\n      },\n    ],\n  };\n  ```\n\n  ### Removed `services.include` shorthand option\n\n  Previously, you could use a string value as a shorthand for the `services.include` configuration option. You can now achieve the same result using the `include` option.\n\n  ```js\n  export default {\n    client: \"@hey-api/client-fetch\",\n    input: \"path/to/openapi.json\",\n    output: \"src/client\",\n    services: \"^MySchema\", // [!code --]\n    plugins: [\n      // ...other plugins\n      {\n        include: \"^MySchema\", // [!code ++]\n        name: \"@hey-api/services\",\n      },\n    ],\n  };\n  ```\n\n  ### Renamed `services.name` option\n\n  Each plugin definition contains a `name` field. This was conflicting with the `services.name` option. As a result, it has been renamed to `serviceNameBuilder`.\n\n  ```js\n  export default {\n    client: \"@hey-api/client-fetch\",\n    input: \"path/to/openapi.json\",\n    output: \"src/client\",\n    services: {\n      name: \"{{name}}Service\", // [!code --]\n    },\n    plugins: [\n      // ...other plugins\n      {\n        serviceNameBuilder: \"{{name}}Service\", // [!code ++]\n        name: \"@hey-api/services\",\n      },\n    ],\n  };\n  ```\n\n  ### Renamed `types.dates` option\n\n  Previously, you could set `types.dates` to a boolean or a string value, depending on whether you wanted to transform only type strings into dates, or runtime code too. Many people found these options confusing, so they have been simplified to a boolean and extracted into a separate `@hey-api/transformers` plugin.\n\n  ```js\n  export default {\n    client: \"@hey-api/client-fetch\",\n    input: \"path/to/openapi.json\",\n    output: \"src/client\",\n    types: {\n      dates: \"types+transform\", // [!code --]\n    },\n    plugins: [\n      // ...other plugins\n      {\n        dates: true, // [!code ++]\n        name: \"@hey-api/transformers\",\n      },\n    ],\n  };\n  ```\n\n  ### Removed `types.include` shorthand option\n\n  Previously, you could use a string value as a shorthand for the `types.include` configuration option. You can now achieve the same result using the `include` option.\n\n  ```js\n  export default {\n    client: \"@hey-api/client-fetch\",\n    input: \"path/to/openapi.json\",\n    output: \"src/client\",\n    types: \"^MySchema\", // [!code --]\n    plugins: [\n      // ...other plugins\n      {\n        include: \"^MySchema\", // [!code ++]\n        name: \"@hey-api/types\",\n      },\n    ],\n  };\n  ```\n\n  ### Renamed `types.name` option\n\n  Each plugin definition contains a `name` field. This was conflicting with the `types.name` option. As a result, it has been renamed to `style`.\n\n  ```js\n  export default {\n    client: \"@hey-api/client-fetch\",\n    input: \"path/to/openapi.json\",\n    output: \"src/client\",\n    types: {\n      name: \"PascalCase\", // [!code --]\n    },\n    plugins: [\n      // ...other plugins\n      {\n        name: \"@hey-api/types\",\n        style: \"PascalCase\", // [!code ++]\n      },\n    ],\n  };\n  ```\n\n## 0.53.12\n\n### Patch Changes\n\n- [#1195](https://github.com/hey-api/openapi-ts/pull/1195) [`753643f`](https://github.com/hey-api/openapi-ts/commit/753643fae74d4248df8dc5fe9dda5f28a1dabdf1) Thanks [@mrlubos](https://github.com/mrlubos)! - fix: TanStack Query plugin using missing import for infinite query\n\n- [#1194](https://github.com/hey-api/openapi-ts/pull/1194) [`c38deaf`](https://github.com/hey-api/openapi-ts/commit/c38deaf02b606b92edd9c316b1444b6b6c12916d) Thanks [@mrlubos](https://github.com/mrlubos)! - fix: pass TanStack query signal to client call\n\n## 0.53.11\n\n### Patch Changes\n\n- [#1151](https://github.com/hey-api/openapi-ts/pull/1151) [`587791d`](https://github.com/hey-api/openapi-ts/commit/587791dfede0167fbed229281467e4c4875936f5) Thanks [@mrlubos](https://github.com/mrlubos)! - fix: update website domain, add license documentation\n\n## 0.53.10\n\n### Patch Changes\n\n- [#1145](https://github.com/hey-api/openapi-ts/pull/1145) [`a0a5551`](https://github.com/hey-api/openapi-ts/commit/a0a55510d30a1a8dea0ade4908b5b13d51b5f9e6) Thanks [@mrlubos](https://github.com/mrlubos)! - fix: update license field in package.json to match the license, revert client packages license to MIT\n\n## 0.53.9\n\n### Patch Changes\n\n- [#1137](https://github.com/hey-api/openapi-ts/pull/1137) [`f4566c2`](https://github.com/hey-api/openapi-ts/commit/f4566c2bcd67f45f069bfa6220d3c710177f28cc) Thanks [@BierDav](https://github.com/BierDav)! - Add support for passing mutation specific options to `<operation_id>Mutation(options)`\n\n## 0.53.8\n\n### Patch Changes\n\n- [#1123](https://github.com/hey-api/openapi-ts/pull/1123) [`032338c`](https://github.com/hey-api/openapi-ts/commit/032338c47506ccfd567bbbf915398942c8394bc2) Thanks [@mrlubos](https://github.com/mrlubos)! - fix: use correct relative path to bundled client when imported from nested module\n\n## 0.53.7\n\n### Patch Changes\n\n- [#1113](https://github.com/hey-api/openapi-ts/pull/1113) [`dc696e0`](https://github.com/hey-api/openapi-ts/commit/dc696e0b4500dba5ceb4c772110b123bd2f71b40) Thanks [@mrlubos](https://github.com/mrlubos)! - fix: skip nested properties in oneOf and anyOf compositions\n\n- [#1115](https://github.com/hey-api/openapi-ts/pull/1115) [`5f077dd`](https://github.com/hey-api/openapi-ts/commit/5f077dd8d144bbfe71d8775bad5fe7ddda2315d6) Thanks [@mrlubos](https://github.com/mrlubos)! - fix: abstract page params logic in TanStack Query plugin\n\n## 0.53.6\n\n### Patch Changes\n\n- [#1104](https://github.com/hey-api/openapi-ts/pull/1104) [`a1eada1`](https://github.com/hey-api/openapi-ts/commit/a1eada1896046f0de1710682635efc59434a1e2c) Thanks [@mrlubos](https://github.com/mrlubos)! - fix: export spec-compliant OpenAPI 3.1 interface\n\n- [#1108](https://github.com/hey-api/openapi-ts/pull/1108) [`7677924`](https://github.com/hey-api/openapi-ts/commit/76779246534391deca5a371df2c7dc76e9d2eb73) Thanks [@mrlubos](https://github.com/mrlubos)! - fix: handle multiple form-data parameters in Swagger 2.0\n\n## 0.53.5\n\n### Patch Changes\n\n- [#1096](https://github.com/hey-api/openapi-ts/pull/1096) [`b6e350a`](https://github.com/hey-api/openapi-ts/commit/b6e350a9cc2d82ac4496b7d57ec8b58978c951c2) Thanks [@mrlubos](https://github.com/mrlubos)! - fix: make TanStack Query plugin work with class-based services\n\n- [#1095](https://github.com/hey-api/openapi-ts/pull/1095) [`11ee53f`](https://github.com/hey-api/openapi-ts/commit/11ee53f4f519643ae7e3f0997ce4fe9b6cb050a8) Thanks [@mrlubos](https://github.com/mrlubos)! - fix: avoid printing duplicate null nodes\n\n- [#1094](https://github.com/hey-api/openapi-ts/pull/1094) [`713ccd5`](https://github.com/hey-api/openapi-ts/commit/713ccd5e5e250a14cacf96fd1dffad252cc4cc6a) Thanks [@mrlubos](https://github.com/mrlubos)! - fix: attach TanStack Query infinite page params only if they exist\n\n## 0.53.4\n\n### Patch Changes\n\n- [#1087](https://github.com/hey-api/openapi-ts/pull/1087) [`b528236`](https://github.com/hey-api/openapi-ts/commit/b528236b626d12d4ac03b98b8abecc425291c5e5) Thanks [@mrlubos](https://github.com/mrlubos)! - fix: import handlebars instead of runtime\n\n- [#1086](https://github.com/hey-api/openapi-ts/pull/1086) [`0bc1ebe`](https://github.com/hey-api/openapi-ts/commit/0bc1ebe318399d01296777746ce0bccc83c0e83d) Thanks [@mrlubos](https://github.com/mrlubos)! - fix: support dynamic require in child_process\n\n## 0.53.3\n\n### Patch Changes\n\n- [#1075](https://github.com/hey-api/openapi-ts/pull/1075) [`11a276a`](https://github.com/hey-api/openapi-ts/commit/11a276a1e35dde0735363e892d8142016fd87eec) Thanks [@mrlubos](https://github.com/mrlubos)! - fix: properly handle dual publishing and type generation\n\n## 0.53.2\n\n### Patch Changes\n\n- [#1060](https://github.com/hey-api/openapi-ts/pull/1060) [`8d66c08`](https://github.com/hey-api/openapi-ts/commit/8d66c085cf81e0e166c3e172ce319d5e2d4002bf) Thanks [@mrlubos](https://github.com/mrlubos)! - fix: handle colon in operation path\n\n- [#1065](https://github.com/hey-api/openapi-ts/pull/1065) [`a756987`](https://github.com/hey-api/openapi-ts/commit/a756987ad396fd7e68cc5eff63f6615bffef3782) Thanks [@mrlubos](https://github.com/mrlubos)! - fix: allow overriding generated headers from options\n\n- [#1068](https://github.com/hey-api/openapi-ts/pull/1068) [`a48be86`](https://github.com/hey-api/openapi-ts/commit/a48be8660f6d1d84fdf25a3952587fb963482e8a) Thanks [@mrlubos](https://github.com/mrlubos)! - fix: export Operation interface\n\n- [#1067](https://github.com/hey-api/openapi-ts/pull/1067) [`5a52da1`](https://github.com/hey-api/openapi-ts/commit/5a52da1425abef9f4fef58ef077dbd05545e25a2) Thanks [@mrlubos](https://github.com/mrlubos)! - fix: handle named object property with no nested properties\n\n- [#1066](https://github.com/hey-api/openapi-ts/pull/1066) [`e8a38ae`](https://github.com/hey-api/openapi-ts/commit/e8a38ae4e3f021a105d18764ef3252db7efa9aa0) Thanks [@mrlubos](https://github.com/mrlubos)! - fix: transform any-of nullable dates\n\n## 0.53.1\n\n### Patch Changes\n\n- [#1050](https://github.com/hey-api/openapi-ts/pull/1050) [`6922b5a`](https://github.com/hey-api/openapi-ts/commit/6922b5a3ebe67190d2034ea79674706a5e80e818) Thanks [@mrlubos](https://github.com/mrlubos)! - fix: throw error on invalid client value\n\n## 0.53.0\n\n### Minor Changes\n\n- [#1008](https://github.com/hey-api/openapi-ts/pull/1008) [`dc4a40d`](https://github.com/hey-api/openapi-ts/commit/dc4a40d517853e4cf5be532f5bf4874c84c924be) Thanks [@mrlubos](https://github.com/mrlubos)! - feat: rename legacy clients with 'legacy/' prefix\n\n- [#1009](https://github.com/hey-api/openapi-ts/pull/1009) [`c6b044d`](https://github.com/hey-api/openapi-ts/commit/c6b044d0bc9dc54cb0eb58d23438f4e1d050cb38) Thanks [@mrlubos](https://github.com/mrlubos)! - feat: change schemas name pattern, add schemas.name option\n\n### Patch Changes\n\n- [#989](https://github.com/hey-api/openapi-ts/pull/989) [`bc78a42`](https://github.com/hey-api/openapi-ts/commit/bc78a421eafed1920102b796842e227cacda6ef0) Thanks [@jacobinu](https://github.com/jacobinu)! - fix: make UserConfig interface instead of type\n\n- [#1010](https://github.com/hey-api/openapi-ts/pull/1010) [`b6e58c6`](https://github.com/hey-api/openapi-ts/commit/b6e58c64d1b71897533a85d1738cd7ce7ede178d) Thanks [@mrlubos](https://github.com/mrlubos)! - fix: set query key base url from supplied client if provided\n\n## 0.52.11\n\n### Patch Changes\n\n- [#981](https://github.com/hey-api/openapi-ts/pull/981) [`afd8c43`](https://github.com/hey-api/openapi-ts/commit/afd8c4386fb7b2f86a54e73c9471945bdfad22ea) Thanks [@mrlubos](https://github.com/mrlubos)! - fix: export query key functions from TanStack Query plugin\n\n## 0.52.10\n\n### Patch Changes\n\n- [#973](https://github.com/hey-api/openapi-ts/pull/973) [`8f7a14f`](https://github.com/hey-api/openapi-ts/commit/8f7a14f570e2d17053f1e612f6e045df774916f1) Thanks [@jacobinu](https://github.com/jacobinu)! - fix: handle tree-shakeable angular client case\n\n## 0.52.9\n\n### Patch Changes\n\n- [#948](https://github.com/hey-api/openapi-ts/pull/948) [`ebfd6ee`](https://github.com/hey-api/openapi-ts/commit/ebfd6eec434d7b84883a8f9058f31948fb1a40f2) Thanks [@mrlubos](https://github.com/mrlubos)! - fix: handle schemas with generics from C#\n\n- [#949](https://github.com/hey-api/openapi-ts/pull/949) [`16f8956`](https://github.com/hey-api/openapi-ts/commit/16f89566a7affeb09a6b928c43cfa2733e8b9adc) Thanks [@mrlubos](https://github.com/mrlubos)! - fix: rename infinite key in query key to \\_infinite\n\n- [#946](https://github.com/hey-api/openapi-ts/pull/946) [`f873fa6`](https://github.com/hey-api/openapi-ts/commit/f873fa67befe60b2fd8f63bc2c8b73437591f686) Thanks [@mrlubos](https://github.com/mrlubos)! - chore: warn on duplicate operation ID\n\n- [#947](https://github.com/hey-api/openapi-ts/pull/947) [`7f0fefe`](https://github.com/hey-api/openapi-ts/commit/7f0fefec92b25ce18ed0d1c6a6edf1adbc7d4481) Thanks [@mrlubos](https://github.com/mrlubos)! - fix: correctly use parentheses around composed schemas\n\n- [#944](https://github.com/hey-api/openapi-ts/pull/944) [`2f7cc89`](https://github.com/hey-api/openapi-ts/commit/2f7cc8986c0644b41cc6a5526ddf52ebff880c79) Thanks [@mrlubos](https://github.com/mrlubos)! - fix: correctly handle integer type in additional properties\n\n## 0.52.8\n\n### Patch Changes\n\n- [#932](https://github.com/hey-api/openapi-ts/pull/932) [`cdf01e8`](https://github.com/hey-api/openapi-ts/commit/cdf01e8cc0dc63213465b9e8fe33b80443d36f55) Thanks [@mrlubos](https://github.com/mrlubos)! - fix: cherry pick keys in mutation page param type\n\n## 0.52.7\n\n### Patch Changes\n\n- [#929](https://github.com/hey-api/openapi-ts/pull/929) [`b56c81c`](https://github.com/hey-api/openapi-ts/commit/b56c81ca67a2d069b33430c3139e2135a299b309) Thanks [@mrlubos](https://github.com/mrlubos)! - fix: handle various issues with additionalProperties definitions\n\n- [#927](https://github.com/hey-api/openapi-ts/pull/927) [`65f151d`](https://github.com/hey-api/openapi-ts/commit/65f151dc0004ce817bc370486495bdd281439e55) Thanks [@mrlubos](https://github.com/mrlubos)! - fix: update TanStack Query key to contain base URL\n\n- [#927](https://github.com/hey-api/openapi-ts/pull/927) [`65f151d`](https://github.com/hey-api/openapi-ts/commit/65f151dc0004ce817bc370486495bdd281439e55) Thanks [@mrlubos](https://github.com/mrlubos)! - fix: change TanStack Query mutation helpers to functions for consistent API\n\n## 0.52.6\n\n### Patch Changes\n\n- [#920](https://github.com/hey-api/openapi-ts/pull/920) [`4ff2404`](https://github.com/hey-api/openapi-ts/commit/4ff24049457b7d0d5333c3704f488f1f45dd0c5b) Thanks [@mrlubos](https://github.com/mrlubos)! - fix: add preview version of TanStack Query plugin\n\n## 0.52.5\n\n### Patch Changes\n\n- [#910](https://github.com/hey-api/openapi-ts/pull/910) [`428dcad`](https://github.com/hey-api/openapi-ts/commit/428dcad06eba3ab14876c28092a6df81fcde7dbe) Thanks [@mrlubos](https://github.com/mrlubos)! - fix: throw if prerequisite checks are not met\n\n- [#907](https://github.com/hey-api/openapi-ts/pull/907) [`a2a1ab8`](https://github.com/hey-api/openapi-ts/commit/a2a1ab8bd78c2cbbdcb7adb2ba3815250843dbe7) Thanks [@mrlubos](https://github.com/mrlubos)! - fix: correctly transform string to pascalcase when referenced inside schema\n\n- [#908](https://github.com/hey-api/openapi-ts/pull/908) [`225b640`](https://github.com/hey-api/openapi-ts/commit/225b640b5ac628cb7ba3b7afb39ff271a0608055) Thanks [@mrlubos](https://github.com/mrlubos)! - fix: do not generate types tree by default if services are enabled as it is unused\n\n## 0.52.4\n\n### Patch Changes\n\n- [#895](https://github.com/hey-api/openapi-ts/pull/895) [`44de8d8`](https://github.com/hey-api/openapi-ts/commit/44de8d89556b3abf48acc4e23c9b9c198059c757) Thanks [@mrlubos](https://github.com/mrlubos)! - fix: define ThrowOnError generic as the last argument\n\n## 0.52.3\n\n### Patch Changes\n\n- [#884](https://github.com/hey-api/openapi-ts/pull/884) [`62a39e6`](https://github.com/hey-api/openapi-ts/commit/62a39e63f645bce0801779fb6b90531401748e86) Thanks [@mrlubos](https://github.com/mrlubos)! - fix: generate ThrowOnError generic for class-based client methods\n\n## 0.52.2\n\n### Patch Changes\n\n- [#881](https://github.com/hey-api/openapi-ts/pull/881) [`a9ddfe6`](https://github.com/hey-api/openapi-ts/commit/a9ddfe6c4487fe5debd04a194ee6c6b6c611dc6b) Thanks [@hougesen](https://github.com/hougesen)! - fix: check if key is schema property before removing\n\n## 0.52.1\n\n### Patch Changes\n\n- [#855](https://github.com/hey-api/openapi-ts/pull/855) [`7ac6274`](https://github.com/hey-api/openapi-ts/commit/7ac627463a15fa6be2c9d103b25200355df6b166) Thanks [@mrlubos](https://github.com/mrlubos)! - fix: define multiple errors type as union instead of intersection\n\n- [#853](https://github.com/hey-api/openapi-ts/pull/853) [`6ab387d`](https://github.com/hey-api/openapi-ts/commit/6ab387d3440ec5ec524e7f198aedfa6734431d76) Thanks [@mrlubos](https://github.com/mrlubos)! - fix: remove Content-Type header with multipart/form-data content type\n\n- [#861](https://github.com/hey-api/openapi-ts/pull/861) [`21ccf90`](https://github.com/hey-api/openapi-ts/commit/21ccf90b864590c211fbfa3de5c687dd3c48f897) Thanks [@qqilihq](https://github.com/qqilihq)! - fix: Additional properties key\n\n- [#869](https://github.com/hey-api/openapi-ts/pull/869) [`42d8a41`](https://github.com/hey-api/openapi-ts/commit/42d8a4151bace7b70af60a1abe46b7550ddad686) Thanks [@SamuelGuillemet](https://github.com/SamuelGuillemet)! - fix: add conditionnal generation for service related types\n\n## 0.52.0\n\n### Minor Changes\n\n- [#835](https://github.com/hey-api/openapi-ts/pull/835) [`7ab277b`](https://github.com/hey-api/openapi-ts/commit/7ab277b22467fe268719af817aee701d6be3e828) Thanks [@LeeChSien](https://github.com/LeeChSien)! - feat: add namespace supporting for enums\n\n### Patch Changes\n\n- [#830](https://github.com/hey-api/openapi-ts/pull/830) [`babf11a`](https://github.com/hey-api/openapi-ts/commit/babf11ae082af642ac71cfee9c523cc976132a50) Thanks [@mrlubos](https://github.com/mrlubos)! - fix: generate internal client for services when using standalone package\n\n## 0.51.0\n\n### Minor Changes\n\n- [#828](https://github.com/hey-api/openapi-ts/pull/828) [`82a4696`](https://github.com/hey-api/openapi-ts/commit/82a4696b0b209ea2d9147f47f213479e61aed3d7) Thanks [@mrlubos](https://github.com/mrlubos)! - feat: make `client` config option required\n\n### Patch Changes\n\n- [#823](https://github.com/hey-api/openapi-ts/pull/823) [`23c9dcd`](https://github.com/hey-api/openapi-ts/commit/23c9dcd5de19de62d745cc539674c815b2588cd2) Thanks [@mrlubos](https://github.com/mrlubos)! - fix: correctly process body parameter for OpenAPI 2.0 specs\n\n- [#827](https://github.com/hey-api/openapi-ts/pull/827) [`8d81c06`](https://github.com/hey-api/openapi-ts/commit/8d81c0605dbf4b4d19ec1c2dc51a93f8a2aca5b2) Thanks [@mrlubos](https://github.com/mrlubos)! - fix: do not ignore api-version param in standalone clients\n\n## 0.50.2\n\n### Patch Changes\n\n- [#818](https://github.com/hey-api/openapi-ts/pull/818) [`85d123c`](https://github.com/hey-api/openapi-ts/commit/85d123c9160f4ecb4c48e8a2ead54abf604dd21b) Thanks [@mrlubos](https://github.com/mrlubos)! - fix: handle fully illegal schema names\n\n## 0.50.1\n\n### Patch Changes\n\n- [#807](https://github.com/hey-api/openapi-ts/pull/807) [`ef249ba`](https://github.com/hey-api/openapi-ts/commit/ef249ba5bd04dbfb0e0a497caaa021f9c7de6949) Thanks [@mrlubos](https://github.com/mrlubos)! - fix: generate types only for filtered services\n\n- [#807](https://github.com/hey-api/openapi-ts/pull/807) [`ef249ba`](https://github.com/hey-api/openapi-ts/commit/ef249ba5bd04dbfb0e0a497caaa021f9c7de6949) Thanks [@mrlubos](https://github.com/mrlubos)! - fix: allow any key/value pair in object types with empty properties object\n\n## 0.50.0\n\n### Minor Changes\n\n- [#790](https://github.com/hey-api/openapi-ts/pull/790) [`68c3921`](https://github.com/hey-api/openapi-ts/commit/68c3921fd6e9a5db41ebd9f06e4f3ef6e64ab051) Thanks [@mrlubos](https://github.com/mrlubos)! - feat: allow bundling standalone clients with `client.bundle = true`\n\n## 0.49.0\n\n### Minor Changes\n\n- [#787](https://github.com/hey-api/openapi-ts/pull/787) [`327c5fb`](https://github.com/hey-api/openapi-ts/commit/327c5fb629f0c7b9c727da87b6bc287b8e98bcd5) Thanks [@mrlubos](https://github.com/mrlubos)! - feat: allow filtering service endpoints with `services.filter`\n\n### Patch Changes\n\n- [#784](https://github.com/hey-api/openapi-ts/pull/784) [`f12dccf`](https://github.com/hey-api/openapi-ts/commit/f12dccf0ae3a05badb5783354bcd093f18f3ab74) Thanks [@mrlubos](https://github.com/mrlubos)! - fix: suffix illegal service names\n\n- [#786](https://github.com/hey-api/openapi-ts/pull/786) [`20759e2`](https://github.com/hey-api/openapi-ts/commit/20759e2cc52d78974fc0f78f581e9d9cb2d21ca5) Thanks [@mrlubos](https://github.com/mrlubos)! - fix: handle references to schemas with illegal names\n\n- [#788](https://github.com/hey-api/openapi-ts/pull/788) [`ecd94f2`](https://github.com/hey-api/openapi-ts/commit/ecd94f2adab1dbe10e7a9c310d1fb6d1f170d332) Thanks [@mrlubos](https://github.com/mrlubos)! - fix: handle application/x-www-form-urlencoded content in request body\n\n## 0.48.3\n\n### Patch Changes\n\n- [#781](https://github.com/hey-api/openapi-ts/pull/781) [`df3b799`](https://github.com/hey-api/openapi-ts/commit/df3b79996d47a69e4f2fdad93cea18ae1a01c419) Thanks [@mrlubos](https://github.com/mrlubos)! - fix: use methodNameBuilder when asClass is false\n\n- [#782](https://github.com/hey-api/openapi-ts/pull/782) [`edfd2bd`](https://github.com/hey-api/openapi-ts/commit/edfd2bdbb64f6682ded16f6da30f88f1c113bbe0) Thanks [@mrlubos](https://github.com/mrlubos)! - fix: allow not generating types tree with types.tree = false\n\n## 0.48.2\n\n### Patch Changes\n\n- [#746](https://github.com/hey-api/openapi-ts/pull/746) [`0448823`](https://github.com/hey-api/openapi-ts/commit/044882399d56d1532c7125df2e69cfb3b5fb4f34) Thanks [@mrlubos](https://github.com/mrlubos)! - fix: handle formData parameters in generated types\n\n- [#742](https://github.com/hey-api/openapi-ts/pull/742) [`efc30f4`](https://github.com/hey-api/openapi-ts/commit/efc30f4a2327b165b62f8467c68351a8bf94ffe5) Thanks [@mrlubos](https://github.com/mrlubos)! - fix: ignore services.asClass setting for named clients\n\n- [#744](https://github.com/hey-api/openapi-ts/pull/744) [`1e9edde`](https://github.com/hey-api/openapi-ts/commit/1e9edde54abd8978405f91b821c99b97f067d566) Thanks [@mrlubos](https://github.com/mrlubos)! - fix: improve default response type detection\n\n- [#745](https://github.com/hey-api/openapi-ts/pull/745) [`342772a`](https://github.com/hey-api/openapi-ts/commit/342772a560378c6718d25c29871eeab9a72c62a6) Thanks [@mrlubos](https://github.com/mrlubos)! - fix: handle properties in one-of composition\n\n## 0.48.1\n\n### Patch Changes\n\n- [#734](https://github.com/hey-api/openapi-ts/pull/734) [`1f52b26`](https://github.com/hey-api/openapi-ts/commit/1f52b260807531edb2c14003473ea4907007ecdb) Thanks [@mrlubos](https://github.com/mrlubos)! - fix: generate service types when types are enabled, even if services are disabled\n\n- [#737](https://github.com/hey-api/openapi-ts/pull/737) [`0537fe8`](https://github.com/hey-api/openapi-ts/commit/0537fe8682a93cc95d7637d643db4b9780318ea1) Thanks [@mrlubos](https://github.com/mrlubos)! - fix: support custom config file path\n\n- [#736](https://github.com/hey-api/openapi-ts/pull/736) [`8410046`](https://github.com/hey-api/openapi-ts/commit/8410046c45d25db48ba940a0c6c7a7cda9e86b6a) Thanks [@mrlubos](https://github.com/mrlubos)! - fix: handle async response transformers\n\n## 0.48.0\n\n### Minor Changes\n\n- [#696](https://github.com/hey-api/openapi-ts/pull/696) [`917405f`](https://github.com/hey-api/openapi-ts/commit/917405fcdcb2e978df693eb51720afa6fcf914e2) Thanks [@anchan828](https://github.com/anchan828)! - feat: pass the Operation object to methodNameBuilder\n\n### Patch Changes\n\n- [#708](https://github.com/hey-api/openapi-ts/pull/708) [`36cf95d`](https://github.com/hey-api/openapi-ts/commit/36cf95d319b175149d3b3ecc382b8d739186e658) Thanks [@mrlubos](https://github.com/mrlubos)! - fix: make getHeaders() accept generic\n\n- [#712](https://github.com/hey-api/openapi-ts/pull/712) [`6a5b96b`](https://github.com/hey-api/openapi-ts/commit/6a5b96b59e4248f2acaf5422be262edde97427dd) Thanks [@mrlubos](https://github.com/mrlubos)! - fix: handle void responses in transformers\n\n## 0.47.2\n\n### Patch Changes\n\n- [#701](https://github.com/hey-api/openapi-ts/pull/701) [`1081bbf`](https://github.com/hey-api/openapi-ts/commit/1081bbf5082450c18547dac4737ecc0e312cdd0e) Thanks [@mrlubos](https://github.com/mrlubos)! - feat: add initial implementation of prefixItems\n\n## 0.47.1\n\n### Patch Changes\n\n- [#690](https://github.com/hey-api/openapi-ts/pull/690) [`1017ace`](https://github.com/hey-api/openapi-ts/commit/1017acee80630d84a08bd8f0087c8fb0de270f1a) Thanks [@Nick-Lucas](https://github.com/Nick-Lucas)! - Fix an issue where transforms for endpoints with array returns were not generated correctly\n\n## 0.47.0\n\n### Minor Changes\n\n- [#685](https://github.com/hey-api/openapi-ts/pull/685) [`8ca3e5e`](https://github.com/hey-api/openapi-ts/commit/8ca3e5e2990bc07ce0bac902245d08b67b6621e8) Thanks [@mrlubos](https://github.com/mrlubos)! - feat: add initial support for response transformers (string -> Date)\n\n- [#663](https://github.com/hey-api/openapi-ts/pull/663) [`e01c612`](https://github.com/hey-api/openapi-ts/commit/e01c61213e266afad5e3b159682b05957aac6534) Thanks [@Stono](https://github.com/Stono)! - Add support for customizing method names with `services.methodNameBuilder()`\n\n## 0.46.3\n\n### Patch Changes\n\n- [#594](https://github.com/hey-api/openapi-ts/pull/594) [`9878381`](https://github.com/hey-api/openapi-ts/commit/98783811e0c90705ddac2cc5e54c524aae634865) Thanks [@SimenB](https://github.com/SimenB)! - Add explicit type annotations to `Interceptors`\n\n  This allows the generated code to work with TypeScript 5.5's new `isolatedDeclarations` configuration.\n\n- [#635](https://github.com/hey-api/openapi-ts/pull/635) [`0b09940`](https://github.com/hey-api/openapi-ts/commit/0b0994050dbcb6c17e8b78ca1c77738fc8e0d498) Thanks [@mrlubos](https://github.com/mrlubos)! - fix: handle 1XX response status codes\n\n- [#636](https://github.com/hey-api/openapi-ts/pull/636) [`498f459`](https://github.com/hey-api/openapi-ts/commit/498f45979b91bf93b319413c60492af94a08df48) Thanks [@mrlubos](https://github.com/mrlubos)! - fix: improve default response status code classification\n\n## 0.46.2\n\n### Patch Changes\n\n- fix: do not transform property names for standalone clients ([#616](https://github.com/hey-api/openapi-ts/pull/616))\n\n## 0.46.1\n\n### Patch Changes\n\n- fix: handle application/json content type in parameter definitions ([#614](https://github.com/hey-api/openapi-ts/pull/614))\n\n## 0.46.0\n\n### Minor Changes\n\n- feat: tree-shakeable services ([#602](https://github.com/hey-api/openapi-ts/pull/602))\n\n## 0.45.1\n\n### Patch Changes\n\n- fix: use generated types in request object instead of inlined duplicated params ([#582](https://github.com/hey-api/openapi-ts/pull/582))\n\n## 0.45.0\n\n### Minor Changes\n\n- feat: remove client inference ([#569](https://github.com/hey-api/openapi-ts/pull/569))\n\n### Patch Changes\n\n- fix: deduplicate inlined enums ([#573](https://github.com/hey-api/openapi-ts/pull/573))\n\n- fix: generate correct optional key in types when using positional arguments (useOptions: false) ([#572](https://github.com/hey-api/openapi-ts/pull/572))\n\n## 0.44.0\n\n### Minor Changes\n\n- feat: move format and lint config options to output object ([#546](https://github.com/hey-api/openapi-ts/pull/546))\n\n### Patch Changes\n\n- fix: comment position in JavaScript enums ([#544](https://github.com/hey-api/openapi-ts/pull/544))\n\n- fix: export inlined enums from components ([#563](https://github.com/hey-api/openapi-ts/pull/563))\n\n- fix: remove unused enums option from CLI ([#565](https://github.com/hey-api/openapi-ts/pull/565))\n\n- fix: Support typescript in peerDependencies ([#551](https://github.com/hey-api/openapi-ts/pull/551))\n\n## 0.43.2\n\n### Patch Changes\n\n- fix: deduplicate exported data and response types ([#538](https://github.com/hey-api/openapi-ts/pull/538))\n\n## 0.43.1\n\n### Patch Changes\n\n- fix: use optional chaining in bin catch block ([#528](https://github.com/hey-api/openapi-ts/pull/528))\n\n- fix: broken encoding ([#532](https://github.com/hey-api/openapi-ts/pull/532))\n\n- fix(parser): handle type array ([#533](https://github.com/hey-api/openapi-ts/pull/533))\n\n## 0.43.0\n\n### Minor Changes\n\n- feat: remove enum postfix, use typescript enums in types when generated, export enums from types.gen.ts ([#498](https://github.com/hey-api/openapi-ts/pull/498))\n\n### Patch Changes\n\n- fix: negative numbers in numeric enums ([#470](https://github.com/hey-api/openapi-ts/pull/470))\n\n- fix: escape keys in schemas starting with digit but containing non-digit characters ([#502](https://github.com/hey-api/openapi-ts/pull/502))\n\n- fix: issue causing code to not generate (t.filter is not a function) ([#507](https://github.com/hey-api/openapi-ts/pull/507))\n\n- fix: handle additional properties union ([#499](https://github.com/hey-api/openapi-ts/pull/499))\n\n- fix: do not export inline enums ([#508](https://github.com/hey-api/openapi-ts/pull/508))\n\n- fix: prefix parameter type exports to avoid conflicts ([#501](https://github.com/hey-api/openapi-ts/pull/501))\n\n- fix: export operation data and response types ([#500](https://github.com/hey-api/openapi-ts/pull/500))\n\n- fix: handle cases where packages are installed globally ([#471](https://github.com/hey-api/openapi-ts/pull/471))\n\n- fix: handle cases where package.json does not exist ([#471](https://github.com/hey-api/openapi-ts/pull/471))\n\n## 0.42.1\n\n### Patch Changes\n\n- fix: properly set formData and body when using options ([#461](https://github.com/hey-api/openapi-ts/pull/461))\n\n## 0.42.0\n\n### Minor Changes\n\n- change: config option `lint: true` has changed to `lint: 'eslint'` ([#455](https://github.com/hey-api/openapi-ts/pull/455))\n\n- change: disable formatting with prettier by default ([#457](https://github.com/hey-api/openapi-ts/pull/457))\n\n- feat: add support for biomejs as a formatter ([#455](https://github.com/hey-api/openapi-ts/pull/455))\n\n- feat: move operationId config option to services object ([#441](https://github.com/hey-api/openapi-ts/pull/441))\n\n- feat: add operation error type mappings ([#442](https://github.com/hey-api/openapi-ts/pull/442))\n\n- feat: add support for biomejs as a linter ([#455](https://github.com/hey-api/openapi-ts/pull/455))\n\n- change: config option `format: true` has changed to `format: 'prettier'` ([#455](https://github.com/hey-api/openapi-ts/pull/455))\n\n### Patch Changes\n\n- fix: do not destructure data when using use options ([#450](https://github.com/hey-api/openapi-ts/pull/450))\n\n- feat: automatically handle dates in query string ([#443](https://github.com/hey-api/openapi-ts/pull/443))\n\n- fix: only remove core directory when export core is true ([#449](https://github.com/hey-api/openapi-ts/pull/449))\n\n- fix: add jsdoc comments with use options ([#439](https://github.com/hey-api/openapi-ts/pull/439))\n\n## 0.41.0\n\n### Minor Changes\n\n- feat: add form type option for schemas ([#433](https://github.com/hey-api/openapi-ts/pull/433))\n\n- feat: replace useDateType with option in types object ([#435](https://github.com/hey-api/openapi-ts/pull/435))\n\n- feat: replace serviceResponse with option in services object ([#434](https://github.com/hey-api/openapi-ts/pull/434))\n\n- feat: replace postfixServices with configuration object ([#430](https://github.com/hey-api/openapi-ts/pull/430))\n\n### Patch Changes\n\n- fix: properly escape backticks in template literals ([#431](https://github.com/hey-api/openapi-ts/pull/431))\n\n- fix: transform names of referenced types ([#422](https://github.com/hey-api/openapi-ts/pull/422))\n\n- fix: use config interceptors passed to constructor when using named client ([#432](https://github.com/hey-api/openapi-ts/pull/432))\n\n- fix: properly escape expressions in template literals ([#431](https://github.com/hey-api/openapi-ts/pull/431))\n\n- fix: do not export common properties as schemas ([#424](https://github.com/hey-api/openapi-ts/pull/424))\n\n## 0.40.2\n\n### Patch Changes\n\n- fix: unhandled SyntaxKind unknown when specification has numeric enums ([#417](https://github.com/hey-api/openapi-ts/pull/417))\n\n## 0.40.1\n\n### Patch Changes\n\n- fix: revert to generating commonjs for esm and commonjs support ([#409](https://github.com/hey-api/openapi-ts/pull/409))\n\n## 0.40.0\n\n### Minor Changes\n\n- feat: allow choosing naming convention for types ([#402](https://github.com/hey-api/openapi-ts/pull/402))\n\n### Patch Changes\n\n- fix: rename exportModels to types ([#402](https://github.com/hey-api/openapi-ts/pull/402))\n\n- fix: rename models.gen.ts to types.gen.ts ([#399](https://github.com/hey-api/openapi-ts/pull/399))\n\n- fix: export enums from index.ts ([#399](https://github.com/hey-api/openapi-ts/pull/399))\n\n## 0.39.0\n\n### Minor Changes\n\n- feat: rename generated files ([#363](https://github.com/hey-api/openapi-ts/pull/363))\n\n- feat: add JSON-LD to content parsing ([#390](https://github.com/hey-api/openapi-ts/pull/390))\n\n- fix: generate enums into their own file ([#358](https://github.com/hey-api/openapi-ts/pull/358))\n\n### Patch Changes\n\n- fix: remove file if no contents to write to it ([#373](https://github.com/hey-api/openapi-ts/pull/373))\n\n- fix: eslint properly fixes output ([#375](https://github.com/hey-api/openapi-ts/pull/375))\n\n- fix: invalid typescript Record generated with circular dependencies ([#374](https://github.com/hey-api/openapi-ts/pull/374))\n\n- fix: prefer unknown type over any ([#392](https://github.com/hey-api/openapi-ts/pull/392))\n\n- fix: only delete generated files instead of whole output directory ([#362](https://github.com/hey-api/openapi-ts/pull/362))\n\n- fix: handle decoding models with `%` in description ([#360](https://github.com/hey-api/openapi-ts/pull/360))\n\n- fix: throw error when typescript is missing ([#366](https://github.com/hey-api/openapi-ts/pull/366))\n\n## 0.38.1\n\n### Patch Changes\n\n- fix: inconsistent indentation in models file when not using `format: true` ([#349](https://github.com/hey-api/openapi-ts/pull/349))\n\n- fix: output path no longer required to be within cwd ([#353](https://github.com/hey-api/openapi-ts/pull/353))\n\n## 0.38.0\n\n### Minor Changes\n\n- fix: rename write to dryRun and invert value ([#326](https://github.com/hey-api/openapi-ts/pull/326))\n\n### Patch Changes\n\n- fix: generate constant size array types properly ([#345](https://github.com/hey-api/openapi-ts/pull/345))\n\n- fix: support x-enumNames for custom enum names ([#334](https://github.com/hey-api/openapi-ts/pull/334))\n\n- fix: export service types from single namespace ([#341](https://github.com/hey-api/openapi-ts/pull/341))\n\n- fix: generate models with proper indentation when formatting is false ([#340](https://github.com/hey-api/openapi-ts/pull/340))\n\n- fix: log errors to file ([#329](https://github.com/hey-api/openapi-ts/pull/329))\n\n- fix: cleanup some styling issues when generating client without formatting ([#330](https://github.com/hey-api/openapi-ts/pull/330))\n\n## 0.37.3\n\n### Patch Changes\n\n- fix: do not ignore additionalProperties when object with properties object ([#323](https://github.com/hey-api/openapi-ts/pull/323))\n\n## 0.37.2\n\n### Patch Changes\n\n- fix: escape schema names ([#317](https://github.com/hey-api/openapi-ts/pull/317))\n\n- fix: escape backticks in strings starting with backtick ([#315](https://github.com/hey-api/openapi-ts/pull/315))\n\n## 0.37.1\n\n### Patch Changes\n\n- fix: ensure strings with both single/double quotes and backticks are escaped properly ([#310](https://github.com/hey-api/openapi-ts/pull/310)) ([#310](https://github.com/hey-api/openapi-ts/pull/310))\n\n## 0.37.0\n\n### Minor Changes\n\n- remove: `generics` as valid option for serviceResponse ([#299](https://github.com/hey-api/openapi-ts/pull/299))\n\n### Patch Changes\n\n- fix: escape dollar sign in operation names ([#307](https://github.com/hey-api/openapi-ts/pull/307))\n\n## 0.36.2\n\n### Patch Changes\n\n- fix: move service types into models file ([#292](https://github.com/hey-api/openapi-ts/pull/292))\n\n## 0.36.1\n\n### Patch Changes\n\n- fix: do not throw when failing to decode URI ([#296](https://github.com/hey-api/openapi-ts/pull/296))\n\n## 0.36.0\n\n### Minor Changes\n\n- feat: export schemas directly from OpenAPI specification (ie. support exporting JSON schemas draft 2020-12 ([#285](https://github.com/hey-api/openapi-ts/pull/285))\n\n### Patch Changes\n\n- fix(config): rename exportSchemas to schemas ([#288](https://github.com/hey-api/openapi-ts/pull/288))\n\n## 0.35.0\n\n### Minor Changes\n\n- fix(config): remove postfixModels option ([#266](https://github.com/hey-api/openapi-ts/pull/266))\n\n- fix(client): do not send default params ([#267](https://github.com/hey-api/openapi-ts/pull/267))\n\n### Patch Changes\n\n- fix(api): use TypeScript Compiler API to create schemas ([#271](https://github.com/hey-api/openapi-ts/pull/271))\n\n- fix(client): export APIResult when using serviceResponse as 'response' ([#283](https://github.com/hey-api/openapi-ts/pull/283))\n\n- fix(parser): use only isRequired to determine if field is required ([#264](https://github.com/hey-api/openapi-ts/pull/264))\n\n## 0.34.5\n\n### Patch Changes\n\n- fix(client): access service data type in namespace properly ([#258](https://github.com/hey-api/openapi-ts/pull/258))\n\n## 0.34.4\n\n### Patch Changes\n\n- fix(client): namespace service data types ([#246](https://github.com/hey-api/openapi-ts/pull/246))\n\n## 0.34.3\n\n### Patch Changes\n\n- fix(docs): link to docs hosted on vercel ([#244](https://github.com/hey-api/openapi-ts/pull/244))\n\n## 0.34.2\n\n### Patch Changes\n\n- docs(readme): update broken contributing link ([#236](https://github.com/hey-api/openapi-ts/pull/236))\n\n- fix(config): support ts config files and `defineConfig` syntax ([`0c92222ab74bb7d2391d49587760db9ea9228d5a`](https://github.com/hey-api/openapi-ts/commit/0c92222ab74bb7d2391d49587760db9ea9228d5a))\n\n## 0.34.1\n\n### Patch Changes\n\n- fix(docs): ensure README is shown on NPMJS ([#229](https://github.com/hey-api/openapi-ts/pull/229))\n\n## 0.34.0\n\n### Minor Changes\n\n- feat(client): generate all services in single `services.ts` file ([#215](https://github.com/hey-api/openapi-ts/pull/215))\n\n- feat(schema): add support for default values ([#197](https://github.com/hey-api/openapi-ts/pull/197))\n\n- feat(schema): add array of enum values for enums ([#197](https://github.com/hey-api/openapi-ts/pull/197))\n\n### Patch Changes\n\n- fix(axios): use builtin form data to ensure blob form data works in node environment ([#211](https://github.com/hey-api/openapi-ts/pull/211))\n\n- fix(enum): append index number on duplicate name ([#220](https://github.com/hey-api/openapi-ts/pull/220))\n\n## 0.33.2\n\n### Patch Changes\n\n- fix(axios): properly type content-type headers assignment ([#206](https://github.com/hey-api/openapi-ts/pull/206))\n\n## 0.33.1\n\n### Patch Changes\n\n- fix(axios): set content type to multipart/form-data when using form data ([#204](https://github.com/hey-api/openapi-ts/pull/204))\n\n## 0.33.0\n\n### Minor Changes\n\n- feat(fetch): detect form data repsonses properly ([#195](https://github.com/hey-api/openapi-ts/pull/195))\n\n- feat(fetch): add application/octet-stream, application/pdf, and application/zip as binary response types ([#195](https://github.com/hey-api/openapi-ts/pull/195))\n\n### Patch Changes\n\n- fix(client): do not create or export empty files ([#200](https://github.com/hey-api/openapi-ts/pull/200))\n\n- client(angular/fetch/xhr): detect all application/json or +json as JSON ([#195](https://github.com/hey-api/openapi-ts/pull/195))\n\n## 0.32.1\n\n### Patch Changes\n\n- fix(schema): allow minimums/maximums to be 0 ([#194](https://github.com/hey-api/openapi-ts/pull/194))\n\n- fix(axios): let axios handle serializing form data ([#192](https://github.com/hey-api/openapi-ts/pull/192))\n\n## 0.32.0\n\n### Minor Changes\n\n- Support all HTTP error codes ([#188](https://github.com/hey-api/openapi-ts/pull/188))\n\n- Use File or Blob type for binary types ([#186](https://github.com/hey-api/openapi-ts/pull/186))\n\n- Check value instanceof Blob when using isBlob ([#186](https://github.com/hey-api/openapi-ts/pull/186))\n\n### Patch Changes\n\n- fix(cli): properly handle booleans ([#190](https://github.com/hey-api/openapi-ts/pull/190))\n\n- Attempt to use body type as content type when sending Blob in node client ([#185](https://github.com/hey-api/openapi-ts/pull/185))\n\n- fix(api): add experimental flag ([#191](https://github.com/hey-api/openapi-ts/pull/191))\n\n## 0.31.1\n\n### Patch Changes\n\n- merge enums and useLegacyEnums into one option ([#178](https://github.com/hey-api/openapi-ts/pull/178))\n\n- use FormData from node-fetch in node client ([#173](https://github.com/hey-api/openapi-ts/pull/173))\n\n## 0.31.0\n\n### Minor Changes\n\n- Import all required models for a service in one import ([#172](https://github.com/hey-api/openapi-ts/pull/172))\n\n- generate all models in single `models.ts` file ([#168](https://github.com/hey-api/openapi-ts/pull/168))\n\n- generate all schemas in single `schemas.ts` file ([#168](https://github.com/hey-api/openapi-ts/pull/168))\n\n### Patch Changes\n\n- fix async response interceptors when using angular client ([#167](https://github.com/hey-api/openapi-ts/pull/167))\n\n- fix deprecation warning on `throwError` in Angular client ([#167](https://github.com/hey-api/openapi-ts/pull/167))\n\n- Do not create or export CancelablePromise when using Angular client ([#167](https://github.com/hey-api/openapi-ts/pull/167))\n\n- Fix issue causing type error when targeting lower than ES2015 ([#171](https://github.com/hey-api/openapi-ts/pull/171))\n\n- fix various warnings in generated client code ([#164](https://github.com/hey-api/openapi-ts/pull/164))\n\n- fix providing interceptors in Angular client ([#167](https://github.com/hey-api/openapi-ts/pull/167))\n\n## 0.30.0\n\n### Minor Changes\n\n- add support for interceptors ([#153](https://github.com/hey-api/openapi-ts/pull/153))\n\n## 0.29.2\n\n### Patch Changes\n\n- Fix export types as type only when using useLegacyEnums ([#160](https://github.com/hey-api/openapi-ts/pull/160))\n\n## 0.29.1\n\n### Patch Changes\n\n- Properly export enums when using useLegacyEnums ([#158](https://github.com/hey-api/openapi-ts/pull/158))\n\n## 0.29.0\n\n### Minor Changes\n\n- Add useLegacyEnums options to generate TypeScript enums ([#147](https://github.com/hey-api/openapi-ts/pull/147))\n\n## 0.28.0\n\n### Minor Changes\n\n- Add `index.ts` file to models, schemas, and services ([#137](https://github.com/hey-api/openapi-ts/pull/137))\n\n## 0.27.39\n\n### Patch Changes\n\n- Warn users about missing dependencies used in the generated client ([#124](https://github.com/hey-api/openapi-ts/pull/124))\n\n- Use AbortController in Axios client instead of deprecated CancelToken ([#124](https://github.com/hey-api/openapi-ts/pull/124))\n\n## 0.27.38\n\n### Minor Changes\n\n- Make useOptions default to true\n\n## 0.27.37\n\n### Minor Changes\n\n- Fix import error in generated Node client\n\n- Update package dependencies\n\n- Use engine-strict in .npmrc\n\n## 0.27.36\n\n### Minor Changes\n\n- Handle falsy values in header\n\n- Export schemas by default\n\n## 0.27.35\n\n### Minor Changes\n\n- Update all project dependencies\n\n- Discard only null or undefined in query string\n\n## 0.27.34\n\n### Minor Changes\n\n- Add flag for linting generated code (default: false)\n\n- Add flag for formatting generated code (default: true)\n\n## 0.27.33\n\n### Minor Changes\n\n- Auto format with Eslint if available\n\n- Add types for programmatic API\n\n## 0.27.32\n\n### Minor Changes\n\n- Rename Config type to UserConfig\n\n- Pass arguments in correct order in Angular client\n\n## 0.27.31\n\n### Minor Changes\n\n- Add support for openapi-ts.config.js file\n\n- Use built-in flat map\n\n## 0.27.30\n\n### Minor Changes\n\n- Prefer unknown instead of any in generated client\n\n## 0.27.29\n\n### Minor Changes\n\n- Rename openapi command to openapi-ts\n\n- Add basic support for response that are Blobs\n\n## 0.27.28\n\n### Minor Changes\n\n- Generate enums as JavaScript objects\n\n- Use shorthand object properties in service calls\n\n## 0.27.27\n\n### Minor Changes\n\n- Handle cases where a project does not have dependencies when checking to run Prettier\n\n## 0.27.26\n\n### Minor Changes\n\n- Skip global parameters if they are duplicates of path parameters\n\n- remove option to indent code\n\n## 0.27.25\n\n### Minor Changes\n\n- Correctly set content-type header, even when body is falsy\n\n## 0.27.24\n\n### Minor Changes\n\n- Remove union types flag (this is now default)\n\n## 0.27.23\n\n### Minor Changes\n\n- Support printing exact arrays\n\n## 0.27.22\n\n### Minor Changes\n\n- Add option to specify custom base path\n\n- Fix spacing in cancelable promise\n\n## 0.27.21\n\n### Minor Changes\n\n- Add explicit flags for generics\n\n## 0.27.20\n\n### Minor Changes\n\n- Do not require type to be set for object properties\n\n## 0.27.19\n\n### Minor Changes\n\n- Do not insert generics into custom client\n\n## 0.27.18\n\n### Minor Changes\n\n- Support returning raw result object\n\n- Allow passing config\n\n## 0.27.17\n\n### Minor Changes\n\n- Generate nullable interface when isNullable is true\n\n## 0.27.16\n\n### Minor Changes\n\n- Generate types for services when useOptions is true\n\n## 0.27.15\n\n### Minor Changes\n\n- Fix wrong path on Windows\n\n## 0.27.14\n\n### Minor Changes\n\n- Change imports to match project style\n\n## 0.27.13\n\n### Minor Changes\n\n- Support printing Date instead of string for date-time formats in models\n\n## 0.27.12\n\n### Minor Changes\n\n- Escape enum name when exported\n\n## 0.27.11\n\n### Minor Changes\n\n- Fix typo in template header\n\n## 0.27.10\n\n### Minor Changes\n\n- Escape newlines when outputting pattern string value in schemas\n\n## 0.27.9\n\n### Minor Changes\n\n- Start passing options object instead of positional parameters\n\n- Handle composition of any-of and properties\n\n- Allow ignoring operation ID when generating operation names\n\n- Propagate useVersionId to Swagger V2 parser\n\n- Change --ingoreOperationId to --useOperationId\n\n## 0.27.8\n\n### Minor Changes\n\n- Support non-ascii (unicode) characters in service name, operation name, and parameter name\n\n## 0.27.7\n\n### Minor Changes\n\n- Bump dependencies\n\n## 0.27.6\n\n### Minor Changes\n\n- Allow overriding request body name with x-body-name key\n\n## 0.27.5\n\n### Minor Changes\n\n- Type additional properties with properties\n\n- Parse array items only if parent definition has type\n\n## 0.27.4\n\n### Minor Changes\n\n- Bump dependencies\n\n## 0.27.3\n\n### Minor Changes\n\n- Support autoformat option flag\n\n- Handle more cases of any-of\n\n- Support regexp to select models to export\n\n- Return optional success response on 204 status code\n\n- Fix nested any-of\n\n- Add const support\n\n## 0.27.0\n\n### Minor Changes\n\n- Reverted `@apidevtools/json-schema-ref-parser` to version 10.1.0\n\n## 0.26.0\n\n### Minor Changes\n\n- Upgraded dependencies\n\n## 0.25.0\n\n### Minor Changes\n\n- Upgraded dependencies\n- Allow usage of a custom axios instance\n- Added message in generated files\n\n## 0.24.0\n\n### Minor Changes\n\n- Upgraded dependencies\n- Fixed issue with Cancelable promise\n- Fixed issue with escaping reserved keywords in schema names\n- Added `--postfixModels` option\n\n## 0.23.0\n\n### Minor Changes\n\n- Upgraded dependencies\n- Added blank line at the end of generated files\n- Added support for Node.js v12\n- Added `request` property inside `ApiError`\n- Added support for `@depricated` inside models and operations\n\n## 0.22.0\n\n### Minor Changes\n\n- Upgraded dependencies\n- Fixed issue with `null` value inside comments for OpenAPI v2 enums\n- Fixed issue with compatibility for latest version of Axios (0.27.x)\n- Removed deprecated enum model generation\n\n## 0.21.0\n\n### Minor Changes\n\n- Return `undefined` to match `noImplicitReturns` rule\n- Made `BaseHttpRequest` class abstract\n- Removed private fields using `#` inside `CancelablePromise`\n- Removed unneeded import `AbortController` from `node-fetch` client\n- Filter out wrong enum values\n\n## 0.20.1\n\n### Patch Changes\n\n- Support enums with single quotes in names for V2\n\n## 0.20.0\n\n### Minor Changes\n\n- Updated dependencies\n- Support enums with single quotes in names for V3\n- Generating better names when `operationId` is not given (breaking change)\n- Fixed issue where `x-enum` flags where breaking due to non-string values\n\n## 0.19.0\n\n### Minor Changes\n\n- Support for Angular client with `--name` option\n- Added test cases for Angular client\n\n## 0.18.2\n\n### Patch Changes\n\n- Updated dependencies\n- Fixed type definition\n- Added test cases for CLI commands\n- Added test cases for query parsing\n\n## 0.18.1\n\n### Patch Changes\n\n- Escaping error description\n- Made `Client.request` and `BaseHttpRequest.config` props public\n\n## 0.18.0\n\n### Minor Changes\n\n- Angular client generation!\n- Updated documentation with more examples and better descriptions\n\n## 0.17.0\n\n### Minor Changes\n\n- Shorthand notation for properties passed through constructor\n- Simplified creation of headers\n- Prepare codebase for Angular client\n\n## 0.16.2\n\n### Patch Changes\n\n- Removed dependency on `URLSearchParams` to support browser and node without any additional imports\n\n## 0.16.1\n\n### Patch Changes\n\n- Correct export inside `index.ts` when giving a custom name\n\n## 0.16.0\n\n### Minor Changes\n\n- Added option to set the indentation (spaces and tabs)\n- Added option to export separate client file that allows usage for multiple backends\n- Decoupled OpenAPI object from requests\n- Updated dependencies\n\n## 0.15.0\n\n### Minor Changes\n\n- Added change log and releases on GitHub\n\n## 0.14.0\n\n### Minor Changes\n\n- Added missing `postfix` options to typedef\n- Updated escaping of comments and descriptions\n- Better handling of services without tags\n- Updated dependencies\n"
  },
  {
    "path": "packages/openapi-ts/LICENSE.md",
    "content": "MIT License\n\nCopyright (c) Hey API\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n"
  },
  {
    "path": "packages/openapi-ts/README.md",
    "content": "<div align=\"center\">\n  <img alt=\"Hey API presents openapi-ts\" height=\"214\" src=\"https://heyapi.dev/assets/.gen/openapi-ts-hero-640w.png\" width=\"438\">\n  <h1><b>OpenAPI TypeScript</b></h1>\n  <p><em>“OpenAPI codegen that just works.”</em><br/><sub>— Guillermo Rauch, CEO of Vercel</sub></p>\n</div>\n\n<p align=\"center\">\n  <a href=\"https://www.devtrends.dev/trends?c=v1.kZIBIg\"><img src=\"https://api.devtrends.dev/badge/npm/%40hey-api%2Fopenapi-ts?period=month&style=flat&view=value\" alt=\"DevTrends badge for @hey-api/openapi-ts\" /></a>\n  <a href=\"https://www.devtrends.dev/trends?c=v1.kZIBIg&v=change\"><img src=\"https://api.devtrends.dev/badge/npm/%40hey-api%2Fopenapi-ts?period=year&style=flat&view=change\" alt=\"DevTrends badge for @hey-api/openapi-ts\" /></a>\n  <a href=\"https://github.com/hey-api/openapi-ts/actions?query=branch%3Amain\"><img src=\"https://github.com/hey-api/openapi-ts/actions/workflows/ci.yml/badge.svg?event=push&branch=main\" alt=\"CI status\" /></a>\n  <a href=\"https://github.com/hey-api/openapi-ts\"><img src=\"https://img.shields.io/github/stars/hey-api/openapi-ts?style=flat&logo=github&label=GitHub&color=54C82D\" alt=\"GitHub stars\" /></a>\n  <a href=\"https://github.com/hey-api/openapi-ts/blob/main/LICENSE.md\"><img src=\"https://img.shields.io/github/license/hey-api/openapi-ts\" alt=\"MIT License\"></a>\n</p>\n\n<p align=\"center\">\n  <a href=\"https://stackblitz.com/edit/hey-api-example?file=openapi-ts.config.ts,src%2Fclient%2Fschemas.gen.ts,src%2Fclient%2Fsdk.gen.ts,src%2Fclient%2Ftypes.gen.ts\">Demo</a>\n  <span>&nbsp;•&nbsp;</span>\n  <a href=\"https://heyapi.dev\">Manual</a>\n  <span>&nbsp;•&nbsp;</span>\n  <a href=\"https://github.com/hey-api/openapi-ts/issues\">Issues</a>\n  <span>&nbsp;•&nbsp;</span>\n  <a href=\"https://heyapi.dev/openapi-ts/community/contributing\">Contribute</a>\n</p>\n\n## About\n\nThe OpenAPI to TypeScript code generator used by Vercel, OpenCode, and PayPal.\n\nGenerate production-ready SDKs, Zod schemas, TanStack Query hooks, or choose from 20+ other plugins.\n\nPart of the Hey API ecosystem.\n\n## Features\n\n- production-ready code that compiles\n- runs in any Node.js 20+ environment\n- accepts any OpenAPI specification\n- core plugins for SDKs, types, and schemas\n- HTTP clients for Fetch API, Angular, Axios, Next.js, Nuxt, and more\n- 20+ plugins to reduce third-party boilerplate\n- highly customizable via plugins\n- [sync with Hey API Registry](https://heyapi.dev/openapi-ts/integrations) for spec management\n\n## Contributing\n\nWant to see your code in products used by millions?\n\nStart with our [Contributing](https://heyapi.dev/openapi-ts/community/contributing) guide and release your first feature.\n\n## Sponsors\n\nHey API is sponsor-funded. If you rely on Hey API in production, consider becoming a [sponsor](https://github.com/sponsors/hey-api) to accelerate the roadmap.\n\n<h3 align=\"center\">Gold</h3>\n\n<table align=\"center\" style=\"justify-content: center;align-items: center;display: flex;\">\n  <tbody>\n    <tr>\n      <td align=\"center\" width=\"336px\">\n        <p></p>\n        <p>\n          <a href=\"https://kutt.to/pkEZyc\" target=\"_blank\">\n            <picture height=\"50px\">\n              <source media=\"(prefers-color-scheme: dark)\" srcset=\"https://heyapi.dev/assets/.gen/stainless-logo-wordmark-480w.jpeg\">\n              <img alt=\"Stainless logo\" height=\"50px\" src=\"https://heyapi.dev/assets/.gen/stainless-logo-wordmark-480w.jpeg\">\n            </picture>\n          </a>\n          <br/>\n          Best-in-class developer interfaces for your API.\n          <br/>\n          <a href=\"https://kutt.to/pkEZyc\" style=\"text-decoration:none;\" target=\"_blank\">\n            stainless.com\n          </a>\n        </p>\n        <p></p>\n      </td>\n      <td align=\"center\" width=\"336px\">\n        <p></p>\n        <p>\n          <a href=\"https://kutt.to/QM9Q2N\" target=\"_blank\">\n            <picture height=\"50px\">\n              <source media=\"(prefers-color-scheme: dark)\" srcset=\"https://heyapi.dev/assets/opencode/logo-light.svg\">\n              <img alt=\"Opencode logo\" height=\"50px\" src=\"https://heyapi.dev/assets/opencode/logo-dark.svg\">\n            </picture>\n          </a>\n          <br/>\n          The open source coding agent.\n          <br/>\n          <a href=\"https://kutt.to/QM9Q2N\" style=\"text-decoration:none;\" target=\"_blank\">\n            opencode.ai\n          </a>\n        </p>\n        <p></p>\n      </td>\n    </tr>\n    <tr>\n      <td align=\"center\" width=\"336px\">\n        <p></p>\n        <p>\n          <a href=\"https://kutt.to/6vrYy9\" target=\"_blank\">\n            <picture height=\"50px\">\n              <source media=\"(prefers-color-scheme: dark)\" srcset=\"https://heyapi.dev/assets/mintlify/logo-light.svg\">\n              <img alt=\"Mintlify logo\" height=\"50px\" src=\"https://heyapi.dev/assets/mintlify/logo-dark.svg\">\n            </picture>\n          </a>\n          <br/>\n          The intelligent knowledge platform.\n          <br/>\n          <a href=\"https://kutt.to/6vrYy9\" style=\"text-decoration:none;\" target=\"_blank\">\n            mintlify.com\n          </a>\n        </p>\n        <p></p>\n      </td>\n    </tr>\n  </tbody>\n</table>\n\n<h3 align=\"center\">Silver</h3>\n\n<table align=\"center\" style=\"justify-content: center;align-items: center;display: flex;\">\n  <tbody>\n    <tr>\n      <td align=\"center\" width=\"172px\">\n        <a href=\"https://kutt.to/skQUVd\" target=\"_blank\">\n          <picture height=\"40px\">\n            <source media=\"(prefers-color-scheme: dark)\" srcset=\"https://heyapi.dev/assets/scalar/logo-light.svg\">\n            <img alt=\"Scalar logo\" height=\"40px\" src=\"https://heyapi.dev/assets/scalar/logo-dark.svg\">\n          </picture>\n        </a>\n        <br/>\n        <a href=\"https://kutt.to/skQUVd\" style=\"text-decoration:none;\" target=\"_blank\">\n          scalar.com\n        </a>\n      </td>\n      <td align=\"center\" width=\"172px\">\n        <a href=\"https://kutt.to/Dr9GuW\" target=\"_blank\">\n          <picture height=\"40px\">\n            <source media=\"(prefers-color-scheme: dark)\" srcset=\"https://heyapi.dev/assets/fastapi/logo-light.svg\">\n            <img alt=\"FastAPI logo\" height=\"40px\" src=\"https://heyapi.dev/assets/fastapi/logo-dark.svg\">\n          </picture>\n        </a>\n        <br/>\n        <a href=\"https://kutt.to/Dr9GuW\" style=\"text-decoration:none;\" target=\"_blank\">\n          fastapi.tiangolo.com\n        </a>\n      </td>\n    </tr>\n  </tbody>\n</table>\n\n<h3 align=\"center\">Bronze</h3>\n\n<table align=\"center\" style=\"justify-content: center;align-items: center;display: flex;\">\n  <tbody>\n    <tr>\n      <td align=\"center\" width=\"136px\">\n        <a href=\"https://kutt.to/YpaKsX\" target=\"_blank\">\n          <picture height=\"34px\">\n            <source media=\"(prefers-color-scheme: dark)\" srcset=\"https://heyapi.dev/assets/.gen/kinde-logo-wordmark-dark-480w.webp\">\n            <img alt=\"Kinde logo\" height=\"34px\" src=\"https://heyapi.dev/assets/.gen/kinde-logo-wordmark-480w.jpeg\">\n          </picture>\n        </a>\n      </td>\n      <td align=\"center\" width=\"136px\">\n        <a href=\"https://kutt.to/KkqSaw\" target=\"_blank\">\n          <picture height=\"34px\">\n            <source media=\"(prefers-color-scheme: dark)\" srcset=\"https://heyapi.dev/assets/cella/logo-light.svg\">\n            <img alt=\"Cella logo\" height=\"34px\" src=\"https://heyapi.dev/assets/cella/logo-dark.svg\">\n          </picture>\n        </a>\n      </td>\n    </tr>\n  </tbody>\n</table>\n\n## Quick Start\n\nThe fastest way to use `@hey-api/openapi-ts` is via npx\n\n```sh\nnpx @hey-api/openapi-ts -i hey-api/backend -o src/client\n```\n\nCongratulations on creating your first client! 🎉 You can learn more about the generated files on the [Output](https://heyapi.dev/openapi-ts/output) page.\n\n## Installation\n\nYou can download `@hey-api/openapi-ts` from npm using your favorite package manager.\n\n#### npm\n\n```sh\nnpm install @hey-api/openapi-ts -D -E\n```\n\n#### pnpm\n\n```sh\npnpm add @hey-api/openapi-ts -D -E\n```\n\n#### yarn\n\n```sh\nyarn add @hey-api/openapi-ts -D -E\n```\n\n#### bun\n\n```sh\nbun add @hey-api/openapi-ts -D -E\n```\n\n### Versioning\n\nThis package is in [initial development](https://semver.org/#spec-item-4). Please pin an exact version so you can safely upgrade when you're ready.\n\nWe publish [migration notes](https://heyapi.dev/openapi-ts/migrating) for every breaking release. You might not be impacted by a breaking change if you don't use the affected features.\n\n## Usage\n\n### CLI\n\nMost people run `@hey-api/openapi-ts` via CLI. To do that, add a script to your `package.json` file which will make `openapi-ts` executable through script.\n\n```json\n\"scripts\": {\n  \"openapi-ts\": \"openapi-ts\"\n}\n```\n\nThe above script can be executed by running `npm run openapi-ts` or equivalent command in other package managers. Next, we will create a [configuration](https://heyapi.dev/openapi-ts/configuration) file and move our options from Quick Start to it.\n\n### Node.js\n\nYou can also generate output programmatically by calling `createClient()` in a JavaScript/TypeScript file.\n\n#### `script.ts`\n\n```ts\nimport { createClient } from '@hey-api/openapi-ts';\n\ncreateClient({\n  input: 'hey-api/backend', // sign up at app.heyapi.dev\n  output: 'src/client',\n});\n```\n\n## Configuration\n\n`@hey-api/openapi-ts` supports loading configuration from any file inside your project root folder supported by [jiti loader](https://github.com/unjs/c12?tab=readme-ov-file#-features). Below are the most common file formats.\n\n#### `openapi-ts.config.ts`\n\n```js\nimport { defineConfig } from '@hey-api/openapi-ts';\n\nexport default defineConfig({\n  input: 'hey-api/backend', // sign up at app.heyapi.dev\n  output: 'src/client',\n});\n```\n\n#### `openapi-ts.config.cjs`\n\n```js\n/** @type {import('@hey-api/openapi-ts').UserConfig} */\nmodule.exports = {\n  input: 'hey-api/backend', // sign up at app.heyapi.dev\n  output: 'src/client',\n};\n```\n\n#### `openapi-ts.config.mjs`\n\n```js\n/** @type {import('@hey-api/openapi-ts').UserConfig} */\nexport default {\n  input: 'hey-api/backend', // sign up at app.heyapi.dev\n  output: 'src/client',\n};\n```\n\nAlternatively, you can use `openapi-ts.config.js` and configure the export statement depending on your project setup.\n\n### Input\n\nYou must set the input so we can load your OpenAPI specification. It can be a path or URL, object containing a path or URL, or an object representing an OpenAPI specification. Hey API supports all valid OpenAPI versions and file formats.\n\n> If you use an HTTPS URL with a self-signed certificate in development, you will need to set [`NODE_TLS_REJECT_UNAUTHORIZED=0`](https://github.com/hey-api/openapi-ts/issues/276#issuecomment-2043143501) in your environment.\n\n### Output\n\nYou must set the output so we know where to generate your files. It can be a path to the destination folder or an object containing the destination folder path and optional settings.\n\n> You should treat the output folder as a dependency. Do not directly modify its contents as your changes might be erased when you run `@hey-api/openapi-ts` again.\n\n## Parser\n\nWe parse your input before making it available to plugins. While configuring the parser is optional, it's the perfect place to modify or validate your input if needed.\n\n## Plugins\n\nPlugins are responsible for generating artifacts from your input. By default, Hey API will generate TypeScript interfaces and SDK from your OpenAPI specification. You can add, remove, or customize any of the plugins. In fact, we highly encourage you to do so!\n\n### Client\n\nClients are responsible for sending the actual HTTP requests. Using clients is not required, but you must add a client to `plugins` if you're generating SDKs (we default to Fetch).\n\n### Native Clients\n\n- [`@hey-api/client-fetch`](https://heyapi.dev/openapi-ts/clients/fetch)\n- [`@hey-api/client-angular`](https://heyapi.dev/openapi-ts/clients/angular)\n- [`@hey-api/client-axios`](https://heyapi.dev/openapi-ts/clients/axios)\n- [`@hey-api/client-ky`](https://heyapi.dev/openapi-ts/clients/ky)\n- [`@hey-api/client-next`](https://heyapi.dev/openapi-ts/clients/next-js)\n- [`@hey-api/client-nuxt`](https://heyapi.dev/openapi-ts/clients/nuxt)\n- [`@hey-api/client-ofetch`](https://heyapi.dev/openapi-ts/clients/ofetch)\n\n### Planned Clients\n\nThe following clients are planned but not in development yet. You can help us prioritize them by voting on [GitHub](https://github.com/hey-api/openapi-ts/labels/RSVP%20%F0%9F%91%8D%F0%9F%91%8E).\n\n- [`@hey-api/client-effect`](https://heyapi.dev/openapi-ts/clients/effect)\n\nDon't see your client? [Build your own](https://heyapi.dev/openapi-ts/clients/custom) or let us know your interest by [opening an issue](https://github.com/hey-api/openapi-ts/issues).\n\n### Native Plugins\n\nThese plugins help reduce boilerplate associated with third-party dependencies. Hey API natively supports the most popular packages. Please open an issue on [GitHub](https://github.com/hey-api/openapi-ts/issues) if you'd like us to support your favorite package.\n\n- [`@angular/common`](https://heyapi.dev/openapi-ts/plugins/angular)\n- [`@hey-api/schemas`](https://heyapi.dev/openapi-ts/output/json-schema)\n- [`@hey-api/sdk`](https://heyapi.dev/openapi-ts/output/sdk)\n- [`@hey-api/transformers`](https://heyapi.dev/openapi-ts/transformers)\n- [`@hey-api/typescript`](https://heyapi.dev/openapi-ts/output/typescript)\n- [`@pinia/colada`](https://heyapi.dev/openapi-ts/plugins/pinia-colada)\n- [`@tanstack/angular-query-experimental`](https://heyapi.dev/openapi-ts/plugins/tanstack-query)\n- [`@tanstack/preact-query`](https://heyapi.dev/openapi-ts/plugins/tanstack-query)\n- [`@tanstack/react-query`](https://heyapi.dev/openapi-ts/plugins/tanstack-query)\n- [`@tanstack/solid-query`](https://heyapi.dev/openapi-ts/plugins/tanstack-query)\n- [`@tanstack/svelte-query`](https://heyapi.dev/openapi-ts/plugins/tanstack-query)\n- [`@tanstack/vue-query`](https://heyapi.dev/openapi-ts/plugins/tanstack-query)\n- [`fastify`](https://heyapi.dev/openapi-ts/plugins/fastify)\n- [`nestjs`](https://heyapi.dev/openapi-ts/plugins/nest)\n- [`valibot`](https://heyapi.dev/openapi-ts/plugins/valibot)\n- [`zod`](https://heyapi.dev/openapi-ts/plugins/zod)\n\n### Planned Plugins\n\nThe following plugins are planned but not in development yet. You can help us prioritize them by voting on [GitHub](https://github.com/hey-api/openapi-ts/labels/RSVP%20%F0%9F%91%8D%F0%9F%91%8E).\n\n- [Adonis](https://heyapi.dev/openapi-ts/plugins/adonis)\n- [Ajv](https://heyapi.dev/openapi-ts/plugins/ajv)\n- [Arktype](https://heyapi.dev/openapi-ts/plugins/arktype)\n- [Chance](https://heyapi.dev/openapi-ts/plugins/chance)\n- [Elysia](https://heyapi.dev/openapi-ts/plugins/elysia)\n- [Express](https://heyapi.dev/openapi-ts/plugins/express)\n- [Faker](https://heyapi.dev/openapi-ts/plugins/faker)\n- [Falso](https://heyapi.dev/openapi-ts/plugins/falso)\n- [Hono](https://heyapi.dev/openapi-ts/plugins/hono)\n- [Joi](https://heyapi.dev/openapi-ts/plugins/joi)\n- [Koa](https://heyapi.dev/openapi-ts/plugins/koa)\n- [MSW](https://heyapi.dev/openapi-ts/plugins/msw)\n- [Nock](https://heyapi.dev/openapi-ts/plugins/nock)\n- [Superstruct](https://heyapi.dev/openapi-ts/plugins/superstruct)\n- [Supertest](https://heyapi.dev/openapi-ts/plugins/supertest)\n- [SWR](https://heyapi.dev/openapi-ts/plugins/swr)\n- [TypeBox](https://heyapi.dev/openapi-ts/plugins/typebox)\n- [Yup](https://heyapi.dev/openapi-ts/plugins/yup)\n- [Zustand](https://heyapi.dev/openapi-ts/plugins/zustand)\n\nDon't see your plugin? [Build your own](https://heyapi.dev/openapi-ts/plugins/custom) or let us know your interest by [opening an issue](https://github.com/hey-api/openapi-ts/issues).\n\n## Migrating\n\nYou can learn more on the [Migrating](https://heyapi.dev/openapi-ts/migrating) page.\n\n## License\n\nReleased under the [MIT License](https://github.com/hey-api/openapi-ts/blob/main/LICENSE.md).\n"
  },
  {
    "path": "packages/openapi-ts/bin/run.cmd",
    "content": "@echo off\nnode \"%~dp0\\run.js\" %*\n\n"
  },
  {
    "path": "packages/openapi-ts/bin/run.js",
    "content": "#!/usr/bin/env node\nimport { spawnSync } from 'node:child_process';\nimport fs from 'node:fs';\nimport path from 'node:path';\nimport { fileURLToPath } from 'node:url';\n\nconst __dirname = path.dirname(fileURLToPath(import.meta.url));\nconst target = path.join(__dirname, '..', 'dist', 'run.mjs');\n\nif (!fs.existsSync(target)) {\n  console.error('openapi-ts not built (expect dist/run.mjs)');\n  process.exit(1);\n}\n\nconst res = spawnSync(process.execPath, [target, ...process.argv.slice(2)], {\n  stdio: 'inherit',\n});\nprocess.exit(res.status ?? 0);\n"
  },
  {
    "path": "packages/openapi-ts/package.json",
    "content": "{\n  \"name\": \"@hey-api/openapi-ts\",\n  \"version\": \"0.94.4\",\n  \"description\": \"🌀 OpenAPI to TypeScript codegen. Production-ready SDKs, Zod schemas, TanStack Query hooks, and 20+ plugins. Used by Vercel, OpenCode, and PayPal.\",\n  \"keywords\": [\n    \"angular\",\n    \"axios\",\n    \"codegen\",\n    \"fetch\",\n    \"generator\",\n    \"http\",\n    \"javascript\",\n    \"json\",\n    \"next\",\n    \"next.js\",\n    \"node\",\n    \"nuxt\",\n    \"ofetch\",\n    \"openapi\",\n    \"rest\",\n    \"swagger\",\n    \"typescript\",\n    \"xhr\",\n    \"yaml\"\n  ],\n  \"homepage\": \"https://heyapi.dev/\",\n  \"bugs\": {\n    \"url\": \"https://github.com/hey-api/openapi-ts/issues\"\n  },\n  \"license\": \"MIT\",\n  \"author\": {\n    \"name\": \"Hey API\",\n    \"email\": \"lubos@heyapi.dev\",\n    \"url\": \"https://heyapi.dev\"\n  },\n  \"repository\": {\n    \"type\": \"git\",\n    \"url\": \"git+https://github.com/hey-api/openapi-ts.git\"\n  },\n  \"funding\": \"https://github.com/sponsors/hey-api\",\n  \"bin\": {\n    \"openapi-ts\": \"./bin/run.js\"\n  },\n  \"files\": [\n    \"bin\",\n    \"dist\",\n    \"LICENSE.md\",\n    \"README.md\"\n  ],\n  \"type\": \"module\",\n  \"main\": \"./dist/index.mjs\",\n  \"types\": \"./dist/index.d.mts\",\n  \"exports\": {\n    \".\": {\n      \"types\": \"./dist/index.d.mts\",\n      \"import\": \"./dist/index.mjs\"\n    },\n    \"./internal\": {\n      \"types\": \"./dist/internal.d.mts\",\n      \"import\": \"./dist/internal.mjs\"\n    },\n    \"./package.json\": \"./package.json\"\n  },\n  \"scripts\": {\n    \"build\": \"tsdown && pnpm check-exports\",\n    \"check-exports\": \"attw --pack . --profile esm-only --ignore-rules cjs-resolves-to-esm\",\n    \"dev\": \"tsdown --watch\",\n    \"prepublishOnly\": \"pnpm build\",\n    \"typecheck\": \"tsgo --noEmit\"\n  },\n  \"dependencies\": {\n    \"@hey-api/codegen-core\": \"workspace:*\",\n    \"@hey-api/json-schema-ref-parser\": \"workspace:*\",\n    \"@hey-api/shared\": \"workspace:*\",\n    \"@hey-api/types\": \"workspace:*\",\n    \"ansi-colors\": \"4.1.3\",\n    \"color-support\": \"1.1.3\",\n    \"commander\": \"14.0.3\",\n    \"get-tsconfig\": \"4.13.6\"\n  },\n  \"devDependencies\": {\n    \"@angular/common\": \"21.1.2\",\n    \"@angular/compiler\": \"21.1.2\",\n    \"@angular/compiler-cli\": \"21.1.2\",\n    \"@angular/core\": \"21.1.2\",\n    \"@angular/platform-browser\": \"21.1.2\",\n    \"@angular/platform-browser-dynamic\": \"21.1.2\",\n    \"@angular/router\": \"21.1.2\",\n    \"axios\": \"1.13.4\",\n    \"eslint\": \"9.39.1\",\n    \"ky\": \"1.14.3\",\n    \"nuxt\": \"3.14.1592\",\n    \"ofetch\": \"1.5.1\",\n    \"rxjs\": \"7.8.2\",\n    \"typescript\": \"5.9.3\",\n    \"vue\": \"3.5.25\",\n    \"yaml\": \"2.8.2\",\n    \"zone.js\": \"0.16.0\"\n  },\n  \"peerDependencies\": {\n    \"typescript\": \">=5.5.3 || 6.0.1-rc\"\n  },\n  \"engines\": {\n    \"node\": \">=20.19.0\"\n  }\n}\n"
  },
  {
    "path": "packages/openapi-ts/src/__tests__/cli.test.ts",
    "content": "import type { Mock } from 'vitest';\n\nimport { runCli } from '../cli';\nimport { createClient } from '../index';\n\nvi.mock('../index', () => {\n  const result: Awaited<ReturnType<typeof createClient>> = [];\n  return {\n    createClient: vi.fn().mockResolvedValue(result),\n  };\n});\nconst spyExit = vi.spyOn(process, 'exit').mockImplementation(() => ({}) as never);\n\nconst spy = createClient as Mock;\n\ndescribe('cli', () => {\n  beforeEach(() => {\n    spy.mockClear();\n    spyExit.mockClear();\n  });\n\n  it('with default options', async () => {\n    const originalArgv = process.argv.slice();\n    try {\n      process.argv = [String(process.argv[0]), String(process.argv[1])];\n      await runCli();\n    } finally {\n      process.argv = originalArgv;\n    }\n    expect(spy).toHaveBeenCalledWith({});\n  });\n\n  it('with minimal options', async () => {\n    const originalArgv = process.argv.slice();\n    try {\n      process.argv = [\n        String(process.argv[0]),\n        String(process.argv[1]),\n        '--input',\n        'foo.json',\n        '--output',\n        'bar',\n      ];\n      await runCli();\n    } finally {\n      process.argv = originalArgv;\n    }\n    expect(spy).toHaveBeenCalledWith({\n      input: ['foo.json'],\n      output: ['bar'],\n    });\n  });\n\n  it('with no plugins', async () => {\n    const originalArgv = process.argv.slice();\n    try {\n      process.argv = [String(process.argv[0]), String(process.argv[1]), '--plugins'];\n      await runCli();\n    } finally {\n      process.argv = originalArgv;\n    }\n    expect(spy).toHaveBeenCalledWith({});\n  });\n\n  it('with plugins', async () => {\n    const originalArgv = process.argv.slice();\n    try {\n      process.argv = [String(process.argv[0]), String(process.argv[1]), '--plugins', 'foo'];\n      await runCli();\n    } finally {\n      process.argv = originalArgv;\n    }\n    expect(spy).toHaveBeenCalledWith({\n      plugins: ['foo'],\n    });\n  });\n\n  it('with client plugin', async () => {\n    const originalArgv = process.argv.slice();\n    try {\n      process.argv = [String(process.argv[0]), String(process.argv[1]), '--client', 'foo'];\n      await runCli();\n    } finally {\n      process.argv = originalArgv;\n    }\n    expect(spy).toHaveBeenCalledWith({\n      plugins: ['foo'],\n    });\n  });\n\n  describe('logs', () => {\n    it('debug', async () => {\n      const originalArgv = process.argv.slice();\n      try {\n        process.argv = [String(process.argv[0]), String(process.argv[1]), '--debug'];\n        await runCli();\n      } finally {\n        process.argv = originalArgv;\n      }\n      expect(spy).toHaveBeenCalledWith({\n        logs: {\n          level: 'debug',\n        },\n      });\n    });\n\n    it('silent', async () => {\n      const originalArgv = process.argv.slice();\n      try {\n        process.argv = [String(process.argv[0]), String(process.argv[1]), '--silent'];\n        await runCli();\n      } finally {\n        process.argv = originalArgv;\n      }\n      expect(spy).toHaveBeenCalledWith({\n        logs: {\n          level: 'silent',\n        },\n      });\n    });\n\n    it('no log file', async () => {\n      const originalArgv = process.argv.slice();\n      try {\n        process.argv = [String(process.argv[0]), String(process.argv[1]), '--no-log-file'];\n        await runCli();\n      } finally {\n        process.argv = originalArgv;\n      }\n      expect(spy).toHaveBeenCalledWith({\n        logs: {\n          file: false,\n        },\n      });\n    });\n  });\n\n  it('with all options', async () => {\n    const originalArgv = process.argv.slice();\n    try {\n      process.argv = [\n        String(process.argv[0]),\n        String(process.argv[1]),\n        '--client',\n        'foo',\n        '--dry-run',\n        'true',\n        '--file',\n        'bar',\n        '--input',\n        'baz',\n        '--logs',\n        'qux',\n        '--output',\n        'quux',\n        '--plugins',\n        '--watch',\n      ];\n      await runCli();\n    } finally {\n      process.argv = originalArgv;\n    }\n    expect(spy).toHaveBeenCalledWith({\n      configFile: 'bar',\n      dryRun: true,\n      input: ['baz'],\n      logs: {\n        path: 'qux',\n      },\n      output: ['quux'],\n      plugins: ['foo'],\n      watch: true,\n    });\n  });\n\n  it('exits when not in watch mode', async () => {\n    const originalArgv = process.argv.slice();\n    try {\n      process.argv = [String(process.argv[0]), String(process.argv[1])];\n      await runCli();\n    } finally {\n      process.argv = originalArgv;\n    }\n    expect(spyExit).toHaveBeenCalledWith(0);\n  });\n\n  it('does not exit in watch mode', async () => {\n    spy.mockResolvedValueOnce([\n      {\n        config: { input: [{ watch: { enabled: true } }] },\n      },\n    ]);\n    const originalArgv = process.argv.slice();\n    try {\n      process.argv = [String(process.argv[0]), String(process.argv[1])];\n      await runCli();\n    } finally {\n      process.argv = originalArgv;\n    }\n    expect(spyExit).not.toHaveBeenCalled();\n  });\n\n  it('exits with error code on error', async () => {\n    spy.mockRejectedValueOnce('Some error');\n    const originalArgv = process.argv.slice();\n    try {\n      process.argv = [String(process.argv[0]), String(process.argv[1])];\n      await runCli();\n    } finally {\n      process.argv = originalArgv;\n    }\n    expect(spyExit).toHaveBeenCalledWith(1);\n  });\n});\n"
  },
  {
    "path": "packages/openapi-ts/src/__tests__/index.test.ts",
    "content": "import { createClient } from '../index';\n\ntype Config = Parameters<typeof createClient>[0];\n\ndescribe('createClient', () => {\n  it('handles deep path $ref without errors', async () => {\n    // This test verifies that deep path refs like\n    // #/components/schemas/Foo/properties/bar/items are inlined\n    // instead of being treated as symbol references (which would fail)\n    const config: Config = {\n      dryRun: true,\n      input: {\n        components: {\n          schemas: {\n            Bar: {\n              properties: {\n                nested: {\n                  // Deep path ref - should be inlined, not treated as symbol\n                  $ref: '#/components/schemas/Foo/properties/items/items',\n                },\n              },\n              type: 'object',\n            },\n            Foo: {\n              properties: {\n                items: {\n                  items: {\n                    properties: {\n                      name: { type: 'string' },\n                    },\n                    type: 'object',\n                  },\n                  type: 'array',\n                },\n              },\n              type: 'object',\n            },\n          },\n        },\n        info: { title: 'deep-ref-test', version: '1.0.0' },\n        openapi: '3.1.0',\n      },\n      logs: {\n        level: 'silent',\n      },\n      output: 'output',\n      plugins: ['@hey-api/typescript'],\n    };\n\n    // Should not throw \"Symbol finalName has not been resolved yet\" error\n    const results = await createClient(config);\n    expect(results).toHaveLength(1);\n  });\n\n  it('handles deep path $ref in OpenAPI 3.0.x without errors', async () => {\n    const config: Config = {\n      dryRun: true,\n      input: {\n        components: {\n          schemas: {\n            Bar: {\n              properties: {\n                nested: {\n                  $ref: '#/components/schemas/Foo/properties/items/items',\n                },\n              },\n              type: 'object',\n            },\n            Foo: {\n              properties: {\n                items: {\n                  items: {\n                    properties: {\n                      name: { type: 'string' },\n                    },\n                    type: 'object',\n                  },\n                  type: 'array',\n                },\n              },\n              type: 'object',\n            },\n          },\n        },\n        info: { title: 'deep-ref-test', version: '1.0.0' },\n        openapi: '3.0.0',\n        paths: {},\n      },\n      logs: {\n        level: 'silent',\n      },\n      output: 'output',\n      plugins: ['@hey-api/typescript'],\n    };\n\n    const results = await createClient(config);\n    expect(results).toHaveLength(1);\n  });\n\n  it('handles deep path $ref in OpenAPI 2.0 (Swagger) without errors', async () => {\n    const config: Config = {\n      dryRun: true,\n      input: {\n        definitions: {\n          Bar: {\n            properties: {\n              nested: {\n                $ref: '#/definitions/Foo/properties/items/items',\n              },\n            },\n            type: 'object',\n          },\n          Foo: {\n            properties: {\n              items: {\n                items: {\n                  properties: {\n                    name: { type: 'string' },\n                  },\n                  type: 'object',\n                },\n                type: 'array',\n              },\n            },\n            type: 'object',\n          },\n        },\n        info: { title: 'deep-ref-test', version: '1.0.0' },\n        paths: {},\n        swagger: '2.0',\n      },\n      logs: {\n        level: 'silent',\n      },\n      output: 'output',\n      plugins: ['@hey-api/typescript'],\n    };\n\n    const results = await createClient(config);\n    expect(results).toHaveLength(1);\n  });\n\n  it('1 config, 1 input, 1 output', async () => {\n    const config: Config = {\n      dryRun: true,\n      input: {\n        info: { title: 'foo', version: '1.0.0' },\n        openapi: '3.0.0',\n      },\n      logs: {\n        level: 'silent',\n      },\n      output: 'output',\n      plugins: ['@hey-api/typescript'],\n    };\n\n    const results = await createClient(config);\n    expect(results).toHaveLength(1);\n  });\n\n  it('1 config, 2 inputs, 1 output', async () => {\n    const config: Config = {\n      dryRun: true,\n      input: [\n        {\n          info: { title: 'foo', version: '1.0.0' },\n          openapi: '3.0.0',\n        },\n        {\n          info: { title: 'bar', version: '1.0.0' },\n          openapi: '3.0.0',\n          paths: {},\n        },\n      ],\n      logs: {\n        level: 'silent',\n      },\n      output: 'output',\n      plugins: ['@hey-api/typescript'],\n    };\n\n    const results = await createClient(config);\n    expect(results).toHaveLength(1);\n  });\n\n  it('1 config, 2 inputs, 2 outputs', async () => {\n    const config: Config = {\n      dryRun: true,\n      input: [\n        {\n          info: { title: 'foo', version: '1.0.0' },\n          openapi: '3.0.0',\n        },\n        {\n          info: { title: 'bar', version: '1.0.0' },\n          openapi: '3.0.0',\n          paths: {},\n        },\n      ],\n      logs: {\n        level: 'silent',\n      },\n      output: ['output', 'output2'],\n      plugins: ['@hey-api/typescript'],\n    };\n\n    const results = await createClient(config);\n    expect(results).toHaveLength(2);\n  });\n\n  it('2 configs, 1 input, 1 output', async () => {\n    const config: Config = [\n      {\n        dryRun: true,\n        input: {\n          info: { title: 'foo', version: '1.0.0' },\n          openapi: '3.0.0',\n        },\n        logs: {\n          level: 'silent',\n        },\n        output: 'output',\n        plugins: ['@hey-api/typescript'],\n      },\n      {\n        dryRun: true,\n        input: {\n          info: { title: 'bar', version: '1.0.0' },\n          openapi: '3.0.0',\n        },\n        logs: {\n          level: 'silent',\n        },\n        output: 'output2',\n        plugins: ['@hey-api/typescript'],\n      },\n    ];\n\n    const results = await createClient(config);\n    expect(results).toHaveLength(2);\n  });\n\n  it('2 configs, 2 inputs, 2 outputs', async () => {\n    const config: Config = [\n      {\n        dryRun: true,\n        input: [\n          {\n            info: { title: 'foo', version: '1.0.0' },\n            openapi: '3.0.0',\n          },\n          {\n            info: { title: 'bar', version: '1.0.0' },\n            openapi: '3.0.0',\n            paths: {},\n          },\n        ],\n        logs: {\n          level: 'silent',\n        },\n        output: ['output', 'output2'],\n        plugins: ['@hey-api/typescript'],\n      },\n      {\n        dryRun: true,\n        input: [\n          {\n            info: { title: 'baz', version: '1.0.0' },\n            openapi: '3.0.0',\n          },\n          {\n            info: { title: 'qux', version: '1.0.0' },\n            openapi: '3.0.0',\n            paths: {},\n          },\n        ],\n        logs: {\n          level: 'silent',\n        },\n        output: ['output3', 'output4'],\n        plugins: ['@hey-api/typescript'],\n      },\n    ];\n\n    const results = await createClient(config);\n    expect(results).toHaveLength(4);\n  });\n\n  it('executes @angular/common HttpRequest builder path', async () => {\n    const results = await createClient({\n      dryRun: true,\n      input: {\n        info: { title: 'angular-common-test', version: '1.0.0' },\n        openapi: '3.1.0',\n        paths: {\n          '/pets': {\n            get: {\n              operationId: 'listPets',\n              responses: {\n                200: {\n                  content: {\n                    'application/json': {\n                      schema: {\n                        items: { type: 'string' },\n                        type: 'array',\n                      },\n                    },\n                  },\n                  description: 'ok',\n                },\n              },\n            },\n          },\n        },\n      },\n      logs: { level: 'silent' },\n      output: 'out',\n      plugins: [\n        '@hey-api/typescript',\n        '@hey-api/sdk',\n        '@angular/common',\n        '@hey-api/client-angular',\n      ],\n    });\n\n    expect(results.length).toBeGreaterThanOrEqual(1);\n  });\n});\n"
  },
  {
    "path": "packages/openapi-ts/src/__tests__/interactive.test.ts",
    "content": "import { detectInteractiveSession, Logger, mergeConfigs } from '@hey-api/codegen-core';\n\nimport { resolveJobs } from '../config/init';\n\ndescribe('interactive config', () => {\n  it('should use detectInteractiveSession when not provided', async () => {\n    const result = await resolveJobs({\n      logger: new Logger(),\n      userConfigs: [\n        {\n          input: 'test.json',\n          output: './test',\n        },\n      ],\n    });\n\n    // In test environment, TTY is typically not available, so it should be false\n    expect(result.jobs[0]?.config.interactive).toBe(false);\n  });\n\n  it('should respect user config when set to true', async () => {\n    const result = await resolveJobs({\n      logger: new Logger(),\n      userConfigs: [\n        {\n          input: 'test.json',\n          interactive: true,\n          output: './test',\n        },\n      ],\n    });\n\n    expect(result.jobs[0]?.config.interactive).toBe(true);\n  });\n\n  it('should respect user config when set to false', async () => {\n    const result = await resolveJobs({\n      logger: new Logger(),\n      userConfigs: [\n        {\n          input: 'test.json',\n          interactive: false,\n          output: './test',\n        },\n      ],\n    });\n\n    expect(result.jobs[0]?.config.interactive).toBe(false);\n  });\n\n  it('should allow file config to set interactive when CLI does not provide it', () => {\n    // This simulates what happens when:\n    // 1. User has a config file with interactive: false\n    // 2. CLI doesn't provide interactive (undefined)\n    // 3. The bug was: bin script would set interactive = isInteractive (true in TTY)\n\n    const fileConfig = {\n      input: 'test.json',\n      interactive: false,\n      output: './test',\n    };\n\n    // CLI config without interactive (correct behavior after fix)\n    const cliConfigWithoutInteractive = {\n      input: 'test.json',\n      output: './test',\n    };\n\n    // CLI config with interactive set to true (simulating the bug)\n    const cliConfigWithInteractiveBug = {\n      input: 'test.json',\n      interactive: true,\n      output: './test', // Bug: bin script was setting this even when user didn't provide it\n    };\n\n    // After fix: file config's interactive should be preserved\n    const mergedCorrect = mergeConfigs<Partial<typeof fileConfig>>(\n      fileConfig,\n      cliConfigWithoutInteractive,\n    );\n    expect(mergedCorrect.interactive).toBe(false);\n\n    // Before fix: CLI's auto-detected interactive would override file config\n    const mergedWithBug = mergeConfigs(fileConfig, cliConfigWithInteractiveBug);\n    expect(mergedWithBug.interactive).toBe(true); // This was the bug - it overrode the file config\n  });\n});\n\ndescribe('detectInteractiveSession', () => {\n  const originalEnv = process.env;\n  const originalStdin = process.stdin;\n  const originalStdout = process.stdout;\n\n  afterEach(() => {\n    process.env = originalEnv;\n    Object.defineProperty(process, 'stdin', { value: originalStdin });\n    Object.defineProperty(process, 'stdout', { value: originalStdout });\n  });\n\n  it('should return false when CI environment variable is set', () => {\n    process.env = { ...originalEnv, CI: 'true' };\n    Object.defineProperty(process.stdin, 'isTTY', {\n      configurable: true,\n      value: true,\n    });\n    Object.defineProperty(process.stdout, 'isTTY', {\n      configurable: true,\n      value: true,\n    });\n\n    expect(detectInteractiveSession()).toBe(false);\n  });\n\n  it('should return false when NO_INTERACTIVE environment variable is set', () => {\n    process.env = { ...originalEnv, NO_INTERACTIVE: '1' };\n    Object.defineProperty(process.stdin, 'isTTY', {\n      configurable: true,\n      value: true,\n    });\n    Object.defineProperty(process.stdout, 'isTTY', {\n      configurable: true,\n      value: true,\n    });\n\n    expect(detectInteractiveSession()).toBe(false);\n  });\n\n  it('should return false when NO_INTERACTION environment variable is set', () => {\n    process.env = { ...originalEnv, NO_INTERACTION: '1' };\n    Object.defineProperty(process.stdin, 'isTTY', {\n      configurable: true,\n      value: true,\n    });\n    Object.defineProperty(process.stdout, 'isTTY', {\n      configurable: true,\n      value: true,\n    });\n\n    expect(detectInteractiveSession()).toBe(false);\n  });\n\n  it('should return false when stdin is not TTY', () => {\n    process.env = { ...originalEnv };\n    delete process.env.CI;\n    delete process.env.NO_INTERACTIVE;\n    delete process.env.NO_INTERACTION;\n    Object.defineProperty(process.stdin, 'isTTY', {\n      configurable: true,\n      value: false,\n    });\n    Object.defineProperty(process.stdout, 'isTTY', {\n      configurable: true,\n      value: true,\n    });\n\n    expect(detectInteractiveSession()).toBe(false);\n  });\n\n  it('should return false when stdout is not TTY', () => {\n    process.env = { ...originalEnv };\n    delete process.env.CI;\n    delete process.env.NO_INTERACTIVE;\n    delete process.env.NO_INTERACTION;\n    Object.defineProperty(process.stdin, 'isTTY', {\n      configurable: true,\n      value: true,\n    });\n    Object.defineProperty(process.stdout, 'isTTY', {\n      configurable: true,\n      value: false,\n    });\n\n    expect(detectInteractiveSession()).toBe(false);\n  });\n\n  it('should return true when TTY is available and no blocking env vars are set', () => {\n    process.env = { ...originalEnv };\n    delete process.env.CI;\n    delete process.env.NO_INTERACTIVE;\n    delete process.env.NO_INTERACTION;\n    Object.defineProperty(process.stdin, 'isTTY', {\n      configurable: true,\n      value: true,\n    });\n    Object.defineProperty(process.stdout, 'isTTY', {\n      configurable: true,\n      value: true,\n    });\n\n    expect(detectInteractiveSession()).toBe(true);\n  });\n});\n"
  },
  {
    "path": "packages/openapi-ts/src/__tests__/internal.test.ts",
    "content": "describe('internal entry index', () => {\n  it('should be exported', async () => {\n    const internal = await import('../internal');\n    expect(internal.getSpec).toBeDefined();\n    expect(internal.initConfigs).toBeDefined();\n    expect(internal.parseOpenApiSpec).toBeDefined();\n  });\n});\n"
  },
  {
    "path": "packages/openapi-ts/src/cli/adapter.ts",
    "content": "import type { ToArray } from '@hey-api/types';\n\nimport type { UserConfig } from '../config/types';\nimport type { CliOptions } from './schema';\n\nexport function cliToConfig(cli: CliOptions): Partial<UserConfig> {\n  const config: Partial<UserConfig> = {};\n\n  if (cli.input) config.input = cli.input;\n  if (cli.output) config.output = cli.output;\n  if (cli.file) config.configFile = cli.file;\n  if (cli.dryRun !== undefined) config.dryRun = cli.dryRun;\n\n  const plugins: ToArray<UserConfig['plugins']> = [];\n  if (cli.plugins instanceof Array && cli.plugins.length > 0) {\n    plugins.push(...cli.plugins);\n  }\n  if (cli.client) plugins.push(cli.client);\n  if (plugins.length > 0) config.plugins = plugins;\n\n  if (cli.debug || cli.silent || cli.logs || cli.logFile === false) {\n    config.logs = {\n      ...(cli.logs && { path: cli.logs }),\n      ...(cli.debug && { level: 'debug' as const }),\n      ...(cli.silent && { level: 'silent' as const }),\n      ...(cli.logFile === false && { file: false }),\n    };\n  }\n\n  if (cli.watch !== undefined) {\n    if (typeof cli.watch === 'string') {\n      config.watch = Number.parseInt(cli.watch, 10);\n    } else {\n      config.watch = cli.watch;\n    }\n  }\n\n  return config;\n}\n"
  },
  {
    "path": "packages/openapi-ts/src/cli/index.ts",
    "content": "import { isEnvironment } from '@hey-api/shared';\nimport { Command, CommanderError } from 'commander';\n\nimport pkg from '../../package.json';\nimport { createClient } from '../index';\nimport { cliToConfig } from './adapter';\n\nconst binName = Object.keys(pkg.bin)[0]!;\n\nconst program = new Command()\n  .name(binName)\n  .description('Generate TypeScript code from OpenAPI specifications')\n  .version(isEnvironment('development') ? '[DEVELOPMENT]' : pkg.version);\n\nprogram\n  .option('-i, --input <path...>', 'OpenAPI specification (path, URL, or string)')\n  .option('-o, --output <path...>', 'Output folder(s)')\n  .option('-c, --client <name>', 'HTTP client to generate')\n  .option('-p, --plugins [names...]', 'Plugins to use')\n  .option('-f, --file <path>', 'Path to config file')\n  .option('-d, --debug', 'Enable debug logging')\n  .option('-s, --silent', 'Suppress all output')\n  .option('-l, --logs <path>', 'Logs folder path')\n  .option('--no-log-file', 'Disable log file output')\n  .option('--dry-run', 'Skip writing files')\n  .option('-w, --watch [interval]', 'Watch for changes')\n  .action(async (options) => {\n    const config = cliToConfig(options);\n\n    const context = await createClient(config as Parameters<typeof createClient>[0]);\n\n    const hasActiveWatch = context[0]?.config.input.some((input) => input.watch?.enabled);\n\n    if (!hasActiveWatch) {\n      process.exit(0);\n    }\n  });\n\nexport async function runCli(): Promise<void> {\n  try {\n    await program.parseAsync(process.argv);\n  } catch (error) {\n    if (error instanceof CommanderError && 'code' in error) {\n      if (error.code === 'commander.optionMissingArgument') {\n        console.error(`\\nMissing required argument. Run '${binName} --help' for usage.\\n`);\n      } else if (error.code === 'commander.unknownOption') {\n        console.error(`\\nUnknown option. Run '${binName} --help' for available options.\\n`);\n      }\n\n      process.exit(error.exitCode);\n    }\n\n    console.error('Unexpected error:', error);\n    process.exit(1);\n  }\n}\n"
  },
  {
    "path": "packages/openapi-ts/src/cli/schema.ts",
    "content": "import type { PluginNames } from '@hey-api/shared';\nimport type { MaybeArray } from '@hey-api/types';\n\nimport type { PluginClientNames } from '../plugins/types';\n\nexport interface CliOptions {\n  client?: PluginClientNames;\n  debug?: boolean;\n  dryRun?: boolean;\n  file?: string;\n  input?: MaybeArray<string>;\n  logFile?: boolean;\n  logs?: string;\n  output?: MaybeArray<string>;\n  plugins?: ReadonlyArray<PluginNames>;\n  silent?: boolean;\n  watch?: boolean | string;\n}\n"
  },
  {
    "path": "packages/openapi-ts/src/config/expand.ts",
    "content": "import { getInput } from '@hey-api/shared';\nimport colors from 'ansi-colors';\n\nimport type { UserConfig } from './types';\n\nexport interface Job {\n  config: UserConfig;\n  index: number;\n}\n\nexport function expandToJobs(configs: ReadonlyArray<UserConfig>): ReadonlyArray<Job> {\n  const jobs: Array<Job> = [];\n  let jobIndex = 0;\n\n  for (const config of configs) {\n    const inputs = getInput(config);\n    const outputs = config.output instanceof Array ? config.output : [config.output];\n\n    if (outputs.length === 1) {\n      jobs.push({\n        config: {\n          ...config,\n          input: inputs,\n          output: outputs[0]!, // output array with single item\n        },\n        index: jobIndex++,\n      });\n    } else if (outputs.length > 1 && inputs.length !== outputs.length) {\n      // Warn and create job per output (all with same inputs)\n      console.warn(\n        `⚙️ ${colors.yellow('Warning:')} You provided ${colors.cyan(String(inputs.length))} ${colors.cyan(inputs.length === 1 ? 'input' : 'inputs')} and ${colors.yellow(String(outputs.length))} ${colors.yellow('outputs')}. This will produce identical output in multiple locations. You likely want to provide a single output or the same number of outputs as inputs.`,\n      );\n      for (const output of outputs) {\n        jobs.push({\n          config: { ...config, input: inputs, output },\n          index: jobIndex++,\n        });\n      }\n    } else if (outputs.length > 1) {\n      // Pair inputs with outputs by index\n      outputs.forEach((output, index) => {\n        jobs.push({\n          config: { ...config, input: inputs[index]!, output },\n          index: jobIndex++,\n        });\n      });\n    }\n  }\n\n  return jobs;\n}\n"
  },
  {
    "path": "packages/openapi-ts/src/config/init.ts",
    "content": "import type { Logger } from '@hey-api/codegen-core';\nimport { loadConfigFile } from '@hey-api/codegen-core';\n\nimport { expandToJobs } from './expand';\nimport { getProjectDependencies } from './packages';\nimport type { ResolvedJob } from './resolve';\nimport { resolveConfig } from './resolve';\nimport type { UserConfig } from './types';\nimport { validateJobs } from './validate';\n\nexport type Configs = {\n  dependencies: Record<string, string>;\n  jobs: ReadonlyArray<ResolvedJob>;\n  /**\n   * @deprecated Use `jobs` instead.\n   */\n  results: ReadonlyArray<ResolvedJob>;\n};\n\n/**\n * @internal\n */\nexport async function resolveJobs({\n  logger,\n  userConfigs,\n}: {\n  logger: Logger;\n  userConfigs: ReadonlyArray<UserConfig>;\n}): Promise<Configs> {\n  const configs: Array<UserConfig> = [];\n  let dependencies: Record<string, string> = {};\n\n  const eventLoad = logger.timeEvent('load');\n  for (const userConfig of userConfigs) {\n    let configFile: string | undefined;\n    if (userConfig.configFile) {\n      const parts = userConfig.configFile.split('.');\n      configFile = parts.slice(0, parts.length - 1).join('.');\n    }\n\n    const loaded = await loadConfigFile<UserConfig>({\n      configFile,\n      logger,\n      name: 'openapi-ts',\n      userConfig,\n    });\n\n    if (!Object.keys(dependencies).length) {\n      // TODO: handle dependencies for multiple configs properly?\n      dependencies = getProjectDependencies(loaded.foundConfig ? loaded.configFile : undefined);\n    }\n\n    configs.push(...loaded.configs);\n  }\n  eventLoad.timeEnd();\n\n  const eventBuild = logger.timeEvent('build');\n  const jobs = validateJobs(expandToJobs(configs));\n  const resolvedJobs = jobs.map((validated) => resolveConfig(validated, dependencies));\n  eventBuild.timeEnd();\n\n  return {\n    dependencies,\n    jobs: resolvedJobs,\n    results: resolvedJobs,\n  };\n}\n"
  },
  {
    "path": "packages/openapi-ts/src/config/output/__tests__/config.test.ts",
    "content": "import fs from 'node:fs';\nimport os from 'node:os';\nimport path from 'node:path';\n\nimport { getOutput } from '../config';\n\ndescribe('getOutput', () => {\n  let tmpDir: string;\n\n  beforeEach(() => {\n    tmpDir = fs.mkdtempSync(path.join(os.tmpdir(), 'openapi-ts-test-'));\n  });\n\n  afterEach(() => {\n    if (fs.existsSync(tmpDir)) {\n      fs.rmSync(tmpDir, { force: true, recursive: true });\n    }\n  });\n\n  describe('module resolution detection', () => {\n    it('should set module.extension when moduleResolution is NodeNext', () => {\n      const tsconfigPath = path.join(tmpDir, 'tsconfig.json');\n      fs.writeFileSync(\n        tsconfigPath,\n        JSON.stringify({\n          compilerOptions: {\n            moduleResolution: 'nodenext',\n          },\n        }),\n      );\n\n      const output = getOutput({\n        output: {\n          path: tmpDir,\n          tsConfigPath: tsconfigPath,\n        },\n      });\n\n      expect(output.module.extension).toBe('.js');\n    });\n\n    it('should set module.extension when moduleResolution is Node16', () => {\n      const tsconfigPath = path.join(tmpDir, 'tsconfig.json');\n      fs.writeFileSync(\n        tsconfigPath,\n        JSON.stringify({\n          compilerOptions: {\n            moduleResolution: 'node16',\n          },\n        }),\n      );\n\n      const output = getOutput({\n        output: {\n          path: tmpDir,\n          tsConfigPath: tsconfigPath,\n        },\n      });\n\n      expect(output.module.extension).toBe('.js');\n    });\n\n    it('should set module.extension when module is NodeNext (implicit moduleResolution)', () => {\n      const tsconfigPath = path.join(tmpDir, 'tsconfig.json');\n      fs.writeFileSync(\n        tsconfigPath,\n        JSON.stringify({\n          compilerOptions: {\n            module: 'nodenext',\n          },\n        }),\n      );\n\n      const output = getOutput({\n        output: {\n          path: tmpDir,\n          tsConfigPath: tsconfigPath,\n        },\n      });\n\n      expect(output.module.extension).toBe('.js');\n    });\n\n    it('should set module.extension when module is Node16 (implicit moduleResolution)', () => {\n      const tsconfigPath = path.join(tmpDir, 'tsconfig.json');\n      fs.writeFileSync(\n        tsconfigPath,\n        JSON.stringify({\n          compilerOptions: {\n            module: 'node16',\n          },\n        }),\n      );\n\n      const output = getOutput({\n        output: {\n          path: tmpDir,\n          tsConfigPath: tsconfigPath,\n        },\n      });\n\n      expect(output.module.extension).toBe('.js');\n    });\n\n    it('should not set module.extension for other module types', () => {\n      const tsconfigPath = path.join(tmpDir, 'tsconfig.json');\n      fs.writeFileSync(\n        tsconfigPath,\n        JSON.stringify({\n          compilerOptions: {\n            module: 'esnext',\n          },\n        }),\n      );\n\n      const output = getOutput({\n        output: {\n          path: tmpDir,\n          tsConfigPath: tsconfigPath,\n        },\n      });\n\n      expect(output.module.extension).toBeUndefined();\n    });\n\n    it('should not override explicit module.extension setting', () => {\n      const tsconfigPath = path.join(tmpDir, 'tsconfig.json');\n      fs.writeFileSync(\n        tsconfigPath,\n        JSON.stringify({\n          compilerOptions: {\n            module: 'nodenext',\n          },\n        }),\n      );\n\n      const output = getOutput({\n        output: {\n          module: {\n            extension: '.ts',\n          },\n          path: tmpDir,\n          tsConfigPath: tsconfigPath,\n        },\n      });\n\n      expect(output.module.extension).toBe('.ts');\n    });\n\n    it('should work when both module and moduleResolution are set', () => {\n      const tsconfigPath = path.join(tmpDir, 'tsconfig.json');\n      fs.writeFileSync(\n        tsconfigPath,\n        JSON.stringify({\n          compilerOptions: {\n            module: 'nodenext',\n            moduleResolution: 'nodenext',\n          },\n        }),\n      );\n\n      const output = getOutput({\n        output: {\n          path: tmpDir,\n          tsConfigPath: tsconfigPath,\n        },\n      });\n\n      expect(output.module.extension).toBe('.js');\n    });\n\n    it('should handle missing tsconfig gracefully', () => {\n      const output = getOutput({\n        output: {\n          path: tmpDir,\n        },\n      });\n\n      expect(output.module.extension).toBeUndefined();\n    });\n  });\n});\n"
  },
  {
    "path": "packages/openapi-ts/src/config/output/config.ts",
    "content": "import path from 'node:path';\nimport { fileURLToPath } from 'node:url';\n\nimport { log } from '@hey-api/codegen-core';\nimport type { PostProcessor, UserPostProcessor } from '@hey-api/shared';\nimport { findTsConfigPath, resolveSource, valueToObject } from '@hey-api/shared';\nimport type { MaybeArray } from '@hey-api/types';\nimport type { TsConfigJsonResolved } from 'get-tsconfig';\nimport { parseTsconfig } from 'get-tsconfig';\n\nimport { postProcessors } from './postprocess';\nimport type { Output, UserOutput } from './types';\n\nconst __filename = fileURLToPath(import.meta.url);\nconst __dirname = path.dirname(__filename);\n\nexport function getOutput(userConfig: { output: MaybeArray<string | UserOutput> }): Output {\n  if (userConfig.output instanceof Array) {\n    throw new Error(\n      'Unexpected array of outputs in user configuration. This should have been expanded already.',\n    );\n  }\n\n  const userOutput =\n    typeof userConfig.output === 'string' ? { path: userConfig.output } : (userConfig.output ?? {});\n\n  const legacyPostProcess = resolveLegacyPostProcess(userOutput);\n\n  const output = valueToObject({\n    defaultValue: {\n      clean: true,\n      entryFile: true,\n      fileName: {\n        case: 'preserve',\n        name: '{{name}}',\n        suffix: '.gen',\n      },\n      format: null,\n      lint: null,\n      module: {},\n      path: '',\n      postProcess: [],\n      preferExportAll: false,\n    },\n    mappers: {\n      object: (fields, defaultValue) => ({\n        ...fields,\n        fileName: valueToObject({\n          defaultValue: {\n            ...(defaultValue.fileName as Extract<\n              typeof defaultValue.fileName,\n              Record<string, unknown>\n            >),\n          },\n          mappers: {\n            function: (name) => ({ name }),\n            string: (name) => ({ name }),\n          },\n          value: fields.fileName,\n        }),\n        module: valueToObject({\n          defaultValue: {\n            extension: fields.importFileExtension,\n            resolve: fields.resolveModuleName,\n          },\n          mappers: {\n            object: (moduleFields) => ({\n              ...moduleFields,\n              extension: fields.importFileExtension ?? moduleFields.extension,\n              resolve: fields.resolveModuleName ?? moduleFields.resolve,\n            }),\n          },\n          value: fields.module,\n        }),\n      }),\n    },\n    value: userOutput,\n  }) as Output;\n  output.tsConfig = loadTsConfig(findTsConfigPath(__dirname, output.tsConfigPath));\n  if (\n    output.module.extension === undefined &&\n    (output.tsConfig?.compilerOptions?.moduleResolution === 'nodenext' ||\n      output.tsConfig?.compilerOptions?.moduleResolution === 'NodeNext' ||\n      output.tsConfig?.compilerOptions?.moduleResolution === 'node16' ||\n      output.tsConfig?.compilerOptions?.moduleResolution === 'Node16' ||\n      output.tsConfig?.compilerOptions?.module === 'nodenext' ||\n      output.tsConfig?.compilerOptions?.module === 'NodeNext' ||\n      output.tsConfig?.compilerOptions?.module === 'node16' ||\n      output.tsConfig?.compilerOptions?.module === 'Node16')\n  ) {\n    output.module.extension = '.js';\n  }\n  if (output.module.extension && !output.module.extension.startsWith('.')) {\n    output.module.extension = `.${output.module.extension}`;\n  }\n  output.postProcess = normalizePostProcess(userOutput.postProcess ?? legacyPostProcess);\n  output.source = resolveSource(output);\n  return output;\n}\n\nfunction resolveLegacyPostProcess(config: Partial<UserOutput>): ReadonlyArray<UserPostProcessor> {\n  const result: Array<UserPostProcessor> = [];\n\n  if (config.lint !== undefined) {\n    let processor: PostProcessor | undefined;\n    let preset: keyof typeof postProcessors | undefined;\n    if (config.lint) {\n      preset = config.lint === 'biome' ? 'biome:lint' : config.lint;\n      processor = postProcessors[preset];\n      if (processor) result.push(processor);\n    }\n\n    log.warnDeprecated({\n      context: 'output',\n      field: 'lint',\n      replacement: `postProcess: [${processor && preset ? `'${preset}'` : ''}]`,\n    });\n  }\n\n  if (config.format !== undefined) {\n    let processor: PostProcessor | undefined;\n    let preset: keyof typeof postProcessors | undefined;\n    if (config.format) {\n      preset = config.format === 'biome' ? 'biome:format' : config.format;\n      processor = postProcessors[preset];\n      if (processor) result.push(processor);\n    }\n\n    log.warnDeprecated({\n      context: 'output',\n      field: 'format',\n      replacement: `postProcess: [${processor && preset ? `'${preset}'` : ''}]`,\n    });\n  }\n\n  return result;\n}\n\nfunction normalizePostProcess(input: UserOutput['postProcess']): ReadonlyArray<PostProcessor> {\n  if (!input) return [];\n\n  return input.map((item) => {\n    if (typeof item === 'string') {\n      const preset = postProcessors[item];\n      if (!preset) {\n        throw new Error(`Unknown post-processor preset: \"${item}\"`);\n      }\n      return preset;\n    }\n    return {\n      name: item.name ?? item.command,\n      ...item,\n    };\n  });\n}\n\nfunction loadTsConfig(configPath: string | null): TsConfigJsonResolved | null {\n  if (!configPath) {\n    return null;\n  }\n\n  try {\n    return parseTsconfig(configPath);\n  } catch {\n    throw new Error(`Couldn't read tsconfig from path: ${configPath}`);\n  }\n}\n"
  },
  {
    "path": "packages/openapi-ts/src/config/output/postprocess.ts",
    "content": "import type { PostProcessor } from '@hey-api/shared';\n\n/**\n * @deprecated Use `PostProcessorPreset` instead.\n */\nexport type Formatters = 'biome' | 'prettier';\n\n/**\n * @deprecated Use `PostProcessorPreset` instead.\n */\nexport type Linters = 'biome' | 'eslint' | 'oxlint';\n\nexport const postProcessors = {\n  'biome:format': {\n    args: ['format', '--write', '{{path}}'],\n    command: 'biome',\n    name: 'Biome (Format)',\n  },\n  'biome:lint': {\n    args: ['lint', '--apply', '{{path}}'],\n    command: 'biome',\n    name: 'Biome (Lint)',\n  },\n  eslint: {\n    args: ['{{path}}', '--fix'],\n    command: 'eslint',\n    name: 'ESLint',\n  },\n  oxfmt: {\n    args: ['{{path}}'],\n    command: 'oxfmt',\n    name: 'Oxfmt',\n  },\n  oxlint: {\n    args: ['--fix', '{{path}}'],\n    command: 'oxlint',\n    name: 'Oxlint',\n  },\n  prettier: {\n    args: ['--ignore-unknown', '{{path}}', '--write', '--ignore-path', './.prettierignore'],\n    command: 'prettier',\n    name: 'Prettier',\n  },\n} as const satisfies Record<string, PostProcessor>;\n\nexport type PostProcessorPreset = keyof typeof postProcessors;\n"
  },
  {
    "path": "packages/openapi-ts/src/config/output/types.ts",
    "content": "import type { BaseOutput, BaseUserOutput, UserPostProcessor } from '@hey-api/shared';\nimport type { AnyString } from '@hey-api/types';\nimport type { TsConfigJsonResolved } from 'get-tsconfig';\n\nimport type { Formatters, Linters, PostProcessorPreset } from './postprocess';\n\nexport type UserOutput = BaseUserOutput<'.js' | '.ts'> & {\n  /**\n   * Which formatter to use to process output folder?\n   *\n   * @default null\n   * @deprecated Use `postProcess` instead.\n   */\n  format?: Formatters | null;\n  /**\n   * If specified, this will be the file extension used when importing\n   * other modules. By default, we don't add a file extension and let the\n   * runtime resolve it. If you're using moduleResolution `nodenext` or\n   * `node16`, we default to `.js`.\n   *\n   * @default undefined\n   * @deprecated Use `module.extension` instead.\n   */\n  importFileExtension?: '.js' | '.ts' | AnyString | null;\n  /**\n   * Which linter to use to process output folder?\n   *\n   * @default null\n   * @deprecated Use `postProcess` instead.\n   */\n  lint?: Linters | null;\n  /**\n   * Post-processing commands to run on the output folder, executed in order.\n   *\n   * Use preset strings for common tools, or provide custom configurations.\n   *\n   * @example ['biome:lint', 'prettier']\n   * @example [{ command: 'dprint', args: ['fmt', '{{path}}'] }]\n   * @example ['eslint', { command: 'prettier', args: ['{{path}}', '--write'] }]\n   *\n   * @default []\n   */\n  postProcess?: ReadonlyArray<PostProcessorPreset | UserPostProcessor>;\n  /**\n   * Whether `export * from 'module'` should be used when possible\n   * instead of named exports.\n   *\n   * @default false\n   */\n  preferExportAll?: boolean;\n  /**\n   * Relative or absolute path to the tsconfig file we should use to\n   * generate the output. If a path to tsconfig file is not provided, we\n   * attempt to find one starting from the location of the\n   * `@hey-api/openapi-ts` configuration file and traversing up.\n   *\n   * @default undefined\n   */\n  tsConfigPath?: AnyString | null;\n};\n\nexport type Output = BaseOutput<'.js' | '.ts'> & {\n  /**\n   * Which formatter to use to process output folder?\n   */\n  format: Formatters | null;\n  /**\n   * Which linter to use to process output folder?\n   */\n  lint: Linters | null;\n  /**\n   * Whether `export * from 'module'` should be used when possible\n   * instead of named exports.\n   */\n  preferExportAll: boolean;\n  /**\n   * The parsed TypeScript configuration used to generate the output.\n   * If no `tsconfig` file path was provided or found, this will be `null`.\n   */\n  tsConfig: TsConfigJsonResolved | null;\n  /**\n   * Relative or absolute path to the tsconfig file we should use to\n   * generate the output. If a path to tsconfig file is not provided, we\n   * attempt to find one starting from the location of the\n   * `@hey-api/openapi-ts` configuration file and traversing up.\n   */\n  tsConfigPath: AnyString | null | undefined;\n};\n"
  },
  {
    "path": "packages/openapi-ts/src/config/packages.ts",
    "content": "import fs from 'node:fs';\nimport path from 'node:path';\n\n/**\n * Finds and reads the project's package.json file by searching upwards from the config file location,\n * or from process.cwd() if no config file is provided.\n * This ensures we get the correct dependencies even in monorepo setups.\n *\n * @param configFilePath - The path to the configuration file (e.g., openapi-ts.config.ts)\n * @returns An object containing all project dependencies (dependencies, devDependencies, peerDependencies, optionalDependencies)\n */\nexport const getProjectDependencies = (configFilePath?: string): Record<string, string> => {\n  let currentDir = configFilePath ? path.dirname(configFilePath) : process.cwd();\n\n  while (currentDir !== path.dirname(currentDir)) {\n    const packageJsonPath = path.join(currentDir, 'package.json');\n\n    if (fs.existsSync(packageJsonPath)) {\n      try {\n        const packageJson = JSON.parse(fs.readFileSync(packageJsonPath, 'utf8'));\n        return {\n          ...packageJson.dependencies,\n          ...packageJson.devDependencies,\n          ...packageJson.peerDependencies,\n          ...packageJson.optionalDependencies,\n        };\n      } catch {\n        // Silently ignore JSON parsing errors and continue searching\n      }\n    }\n\n    const parentDir = path.dirname(currentDir);\n    if (parentDir === currentDir) {\n      break;\n    }\n    currentDir = parentDir;\n  }\n\n  return {};\n};\n"
  },
  {
    "path": "packages/openapi-ts/src/config/plugins.ts",
    "content": "import type { AnyPluginName, PluginContext, PluginNames } from '@hey-api/shared';\nimport { dependencyFactory, valueToObject } from '@hey-api/shared';\n\nimport { defaultPluginConfigs } from '../plugins/config';\nimport type { Config, UserConfig } from './types';\n\n/**\n * Default plugins used to generate artifacts if plugins aren't specified.\n */\nexport const defaultPlugins = [\n  '@hey-api/typescript',\n  '@hey-api/sdk',\n] as const satisfies ReadonlyArray<PluginNames>;\n\nfunction getPluginsConfig({\n  dependencies,\n  userPlugins,\n  userPluginsConfig,\n}: {\n  dependencies: Record<string, string>;\n  userPlugins: ReadonlyArray<AnyPluginName>;\n  userPluginsConfig: Config['plugins'];\n}): Pick<Config, 'plugins' | 'pluginOrder'> {\n  const circularReferenceTracker = new Set<AnyPluginName>();\n  const pluginOrder = new Set<AnyPluginName>();\n  const plugins: Config['plugins'] = {};\n\n  const dfs = (name: AnyPluginName) => {\n    if (circularReferenceTracker.has(name)) {\n      throw new Error(`Circular reference detected at '${name}'`);\n    }\n\n    if (pluginOrder.has(name)) {\n      return;\n    }\n\n    circularReferenceTracker.add(name);\n\n    const defaultPlugin = defaultPluginConfigs[name as PluginNames];\n    const userPlugin = userPluginsConfig[name as PluginNames];\n\n    if (!defaultPlugin && !userPlugin) {\n      throw new Error(\n        `unknown plugin dependency \"${name}\" - do you need to register a custom plugin with this name?`,\n      );\n    }\n\n    const plugin = {\n      ...defaultPlugin,\n      ...userPlugin,\n      config: {\n        ...defaultPlugin?.config,\n        ...userPlugin?.config,\n      },\n      dependencies: new Set([\n        ...(defaultPlugin?.dependencies || []),\n        ...(userPlugin?.dependencies || []),\n      ]),\n    };\n\n    if (plugin.resolveConfig) {\n      const context: PluginContext = {\n        package: dependencyFactory(dependencies),\n        pluginByTag: (tag, props = {}) => {\n          const { defaultPlugin, errorMessage } = props;\n\n          for (const userPlugin of userPlugins) {\n            const defaultConfig =\n              defaultPluginConfigs[userPlugin as PluginNames] ||\n              userPluginsConfig[userPlugin as PluginNames];\n            if (defaultConfig && defaultConfig.tags?.includes(tag) && userPlugin !== name) {\n              return userPlugin as any;\n            }\n          }\n\n          if (defaultPlugin) {\n            const defaultConfig =\n              defaultPluginConfigs[defaultPlugin as PluginNames] ||\n              userPluginsConfig[defaultPlugin as PluginNames];\n            if (defaultConfig && defaultConfig.tags?.includes(tag) && defaultPlugin !== name) {\n              return defaultPlugin;\n            }\n          }\n\n          throw new Error(errorMessage || `missing plugin - no plugin with tag \"${tag}\" found`);\n        },\n        valueToObject,\n      };\n      // @ts-expect-error\n      plugin.resolveConfig(plugin, context);\n    }\n\n    for (const dependency of plugin.dependencies) {\n      dfs(dependency);\n    }\n\n    circularReferenceTracker.delete(name);\n    pluginOrder.add(name);\n\n    // @ts-expect-error\n    plugins[name] = plugin;\n  };\n\n  for (const name of userPlugins) {\n    dfs(name);\n  }\n\n  return {\n    pluginOrder: Array.from(pluginOrder) as ReadonlyArray<PluginNames>,\n    plugins,\n  };\n}\n\nfunction isPluginClient(plugin: Required<UserConfig>['plugins'][number]): boolean {\n  if (typeof plugin === 'string') {\n    return plugin.startsWith('@hey-api/client');\n  }\n\n  return (\n    plugin.name.startsWith('@hey-api/client') ||\n    // @ts-expect-error\n    (plugin.tags && plugin.tags.includes('client'))\n  );\n}\n\nexport function getPlugins({\n  dependencies,\n  userConfig,\n}: {\n  dependencies: Record<string, string>;\n  userConfig: UserConfig;\n}): Pick<Config, 'plugins' | 'pluginOrder'> {\n  const userPluginsConfig: Config['plugins'] = {};\n\n  let definedPlugins: UserConfig['plugins'] = defaultPlugins;\n\n  if (userConfig.plugins) {\n    userConfig.plugins = userConfig.plugins.filter(\n      (plugin) =>\n        (typeof plugin === 'string' && plugin) || (typeof plugin !== 'string' && plugin.name),\n    );\n    if (userConfig.plugins.length === 1 && isPluginClient(userConfig.plugins[0]!)) {\n      definedPlugins = [...defaultPlugins, ...userConfig.plugins];\n    } else {\n      definedPlugins = userConfig.plugins;\n    }\n  }\n\n  const userPlugins = definedPlugins\n    .map((plugin) => {\n      if (typeof plugin === 'string') {\n        return plugin;\n      }\n\n      const pluginName = plugin.name;\n\n      if (pluginName) {\n        // @ts-expect-error\n        if (plugin.handler) {\n          // @ts-expect-error\n          userPluginsConfig[pluginName] = plugin;\n        } else {\n          // @ts-expect-error\n          userPluginsConfig[pluginName] = {\n            config: { ...plugin },\n          };\n          // @ts-expect-error\n          delete userPluginsConfig[pluginName]!.config.name;\n        }\n      }\n\n      return pluginName;\n    })\n    .filter(Boolean);\n\n  return getPluginsConfig({ dependencies, userPlugins, userPluginsConfig });\n}\n"
  },
  {
    "path": "packages/openapi-ts/src/config/resolve.ts",
    "content": "import path from 'node:path';\n\nimport { detectInteractiveSession } from '@hey-api/codegen-core';\nimport { ConfigError, getInput, getLogs, getParser } from '@hey-api/shared';\nimport colors from 'ansi-colors';\n\nimport { getOutput } from './output/config';\nimport { getPlugins } from './plugins';\nimport type { Config } from './types';\nimport type { ValidationResult } from './validate';\n\nexport type ResolvedJob = {\n  config: Config;\n  errors: Array<Error>;\n  index: number;\n};\n\nexport function resolveConfig(\n  validated: ValidationResult,\n  dependencies: Record<string, string>,\n): ResolvedJob {\n  const logs = getLogs(validated.job.config.logs);\n  const input = getInput(validated.job.config);\n  const output = getOutput(validated.job.config);\n  const parser = getParser(validated.job.config);\n\n  output.path = path.resolve(process.cwd(), output.path);\n\n  let plugins: Pick<Config, 'plugins' | 'pluginOrder'>;\n\n  try {\n    plugins = getPlugins({ dependencies, userConfig: validated.job.config });\n  } catch (error) {\n    if (error instanceof ConfigError) {\n      validated.errors.push(error);\n    }\n    plugins = {\n      pluginOrder: [],\n      plugins: {},\n    };\n  }\n\n  const config: Config = {\n    configFile: validated.job.config.configFile ?? '',\n    dryRun: validated.job.config.dryRun ?? false,\n    input,\n    interactive: validated.job.config.interactive ?? detectInteractiveSession(),\n    logs,\n    output,\n    parser,\n    pluginOrder: plugins.pluginOrder,\n    plugins: plugins.plugins,\n  };\n\n  if (logs.level === 'debug') {\n    const jobPrefix = colors.gray(`[Job ${validated.job.index}] `);\n    console.warn(`${jobPrefix}${colors.cyan('config:')}`, config);\n  }\n\n  return {\n    config,\n    errors: validated.errors,\n    index: validated.job.index,\n  };\n}\n"
  },
  {
    "path": "packages/openapi-ts/src/config/types.ts",
    "content": "import type {\n  BaseConfig,\n  BaseUserConfig,\n  Plugin,\n  PluginConfigMap,\n  PluginNames,\n} from '@hey-api/shared';\n\nimport type { Output, UserOutput } from './output/types';\n\nexport type UserConfig = BaseUserConfig<UserOutput> & {\n  /**\n   * Plugins generate artifacts from `input`. By default, we generate SDK\n   * functions and TypeScript interfaces. If you manually define `plugins`,\n   * you need to include the default plugins if you wish to use them.\n   *\n   * @default ['@hey-api/typescript', '@hey-api/sdk']\n   */\n  plugins?: ReadonlyArray<\n    | PluginNames\n    | {\n        [K in PluginNames]: PluginConfigMap[K]['config'] & {\n          name: K;\n        };\n      }[PluginNames]\n  >;\n};\n\nexport type Config = BaseConfig<UserConfig, Output> & {\n  pluginOrder: ReadonlyArray<keyof PluginConfigMap>;\n  plugins: {\n    [K in PluginNames]?: Plugin.Config<PluginConfigMap[K]>;\n  };\n};\n"
  },
  {
    "path": "packages/openapi-ts/src/config/utils.ts",
    "content": "import type { Context, PluginInstance } from '@hey-api/shared';\n\nimport type { Config } from './types';\n\nexport function getTypedConfig(\n  plugin: Pick<PluginInstance, 'context'> | Pick<Context, 'config'>,\n): Config {\n  if ('context' in plugin) {\n    return plugin.context.config as Config;\n  }\n  return plugin.config as Config;\n}\n"
  },
  {
    "path": "packages/openapi-ts/src/config/validate.ts",
    "content": "import { ConfigError, getInput } from '@hey-api/shared';\n\nimport type { Job } from './expand';\nimport { getOutput } from './output/config';\n\nexport type ValidationResult = {\n  errors: Array<ConfigError>;\n  job: Job;\n};\n\nexport function validateJobs(jobs: ReadonlyArray<Job>): ReadonlyArray<ValidationResult> {\n  return jobs.map((job) => {\n    const errors: Array<ConfigError> = [];\n    const { config } = job;\n\n    const inputs = getInput(config);\n    if (!inputs.length) {\n      errors.push(\n        new ConfigError(\n          'missing input - which OpenAPI specification should we use to generate your output?',\n        ),\n      );\n    }\n\n    const output = getOutput(config);\n    if (!output.path) {\n      errors.push(new ConfigError('missing output - where should we generate your output?'));\n    }\n\n    return { errors, job };\n  });\n}\n"
  },
  {
    "path": "packages/openapi-ts/src/createClient.ts",
    "content": "import path from 'node:path';\n\nimport { type Logger, Project } from '@hey-api/codegen-core';\nimport { $RefParser } from '@hey-api/json-schema-ref-parser';\nimport {\n  applyNaming,\n  buildGraph,\n  compileInputPath,\n  Context,\n  getSpec,\n  type Input,\n  logInputPaths,\n  type OpenApi,\n  parseOpenApiSpec,\n  patchOpenApiSpec,\n  postprocessOutput,\n  type WatchValues,\n} from '@hey-api/shared';\nimport colors from 'ansi-colors';\n\nimport { postProcessors } from './config/output/postprocess';\nimport type { Config } from './config/types';\nimport { generateOutput } from './generate/output';\nimport { TypeScriptRenderer } from './ts-dsl';\n\nexport async function createClient({\n  config,\n  dependencies,\n  jobIndex,\n  logger,\n  watches: _watches,\n}: {\n  config: Config;\n  dependencies: Record<string, string>;\n  jobIndex: number;\n  logger: Logger;\n  /**\n   * Always undefined on the first run, defined on subsequent runs.\n   */\n  watches?: ReadonlyArray<WatchValues>;\n}): Promise<Context | undefined> {\n  const watches: ReadonlyArray<WatchValues> =\n    _watches ||\n    Array.from({ length: config.input.length }, () => ({\n      headers: new Headers(),\n    }));\n\n  const inputPaths = config.input.map((input) => compileInputPath(input));\n\n  // on first run, print the message as soon as possible\n  if (config.logs.level !== 'silent' && !_watches) {\n    logInputPaths(inputPaths, jobIndex);\n  }\n\n  const getSpecData = async (input: Input, index: number) => {\n    const eventSpec = logger.timeEvent('spec');\n    const { arrayBuffer, error, resolvedInput, response } = await getSpec({\n      fetchOptions: input.fetch,\n      inputPath: inputPaths[index]!.path,\n      timeout: input.watch.timeout,\n      watch: watches[index]!,\n    });\n    eventSpec.timeEnd();\n\n    // throw on first run if there's an error to preserve user experience\n    // if in watch mode, subsequent errors won't throw to gracefully handle\n    // cases where server might be reloading\n    if (error && !_watches) {\n      const text = await response.text().catch(() => '');\n      throw new Error(\n        `Request failed with status ${response.status}: ${text || response.statusText}`,\n      );\n    }\n\n    return { arrayBuffer, resolvedInput };\n  };\n  const specData = (\n    await Promise.all(config.input.map((input, index) => getSpecData(input, index)))\n  ).filter((data) => data.arrayBuffer || data.resolvedInput);\n\n  let context: Context | undefined;\n\n  if (specData.length) {\n    const refParser = new $RefParser();\n    const data =\n      specData.length > 1\n        ? await refParser.bundleMany({\n            arrayBuffer: specData.map((data) => data.arrayBuffer!),\n            pathOrUrlOrSchemas: [],\n            resolvedInputs: specData.map((data) => data.resolvedInput!),\n          })\n        : await refParser.bundle({\n            arrayBuffer: specData[0]!.arrayBuffer,\n            pathOrUrlOrSchema: undefined,\n            resolvedInput: specData[0]!.resolvedInput!,\n          });\n\n    // on subsequent runs in watch mode, print the message only if we know we're\n    // generating the output\n    if (config.logs.level !== 'silent' && _watches) {\n      console.clear();\n      logInputPaths(inputPaths, jobIndex);\n    }\n\n    const eventInputPatch = logger.timeEvent('input.patch');\n    await patchOpenApiSpec({ patchOptions: config.parser.patch, spec: data });\n    eventInputPatch.timeEnd();\n\n    const eventParser = logger.timeEvent('parser');\n    const header = config.output.header;\n    // TODO: allow overriding via config\n    const project = new Project({\n      defaultFileName: 'index',\n      fileName: (base) => {\n        const name = applyNaming(base, config.output.fileName);\n        const { suffix } = config.output.fileName;\n        if (!suffix) {\n          return name;\n        }\n        return name === 'index' || name.endsWith(suffix) ? name : `${name}${suffix}`;\n      },\n      nameConflictResolvers: config.output.nameConflictResolver\n        ? {\n            typescript: config.output.nameConflictResolver,\n          }\n        : undefined,\n      renderers: [\n        new TypeScriptRenderer({\n          header: (ctx) => {\n            const defaultValue = ['// This file is auto-generated by @hey-api/openapi-ts'];\n            const result = typeof header === 'function' ? header({ ...ctx, defaultValue }) : header;\n            return result === undefined ? defaultValue : result;\n          },\n          module: config.output.module,\n          preferExportAll: config.output.preferExportAll,\n        }),\n      ],\n      root: config.output.path,\n    });\n    context = new Context<OpenApi.V2_0_X | OpenApi.V3_0_X | OpenApi.V3_1_X, Config>({\n      config,\n      dependencies,\n      logger,\n      project,\n      spec: data as OpenApi.V2_0_X | OpenApi.V3_0_X | OpenApi.V3_1_X,\n    });\n    parseOpenApiSpec(context);\n    context.graph = buildGraph(context.ir, logger).graph;\n    eventParser.timeEnd();\n\n    const eventGenerator = logger.timeEvent('generator');\n    await generateOutput(context);\n    eventGenerator.timeEnd();\n\n    const eventPostprocess = logger.timeEvent('postprocess');\n    if (!config.dryRun) {\n      const jobPrefix = colors.gray(`[Job ${jobIndex + 1}] `);\n      postprocessOutput(config.output, postProcessors, jobPrefix);\n\n      if (config.logs.level !== 'silent') {\n        const outputPath = process.env.INIT_CWD\n          ? `./${path.relative(process.env.INIT_CWD, config.output.path)}`\n          : config.output.path;\n        console.log(\n          `${jobPrefix}${colors.green('✅ Done!')} Your output is in ${colors.cyanBright(outputPath)}`,\n        );\n      }\n    }\n    eventPostprocess.timeEnd();\n  }\n\n  const watchedInput = config.input.find(\n    (input, index) => input.watch.enabled && typeof inputPaths[index]!.path === 'string',\n  );\n\n  if (watchedInput) {\n    setTimeout(() => {\n      createClient({\n        config,\n        dependencies,\n        jobIndex,\n        logger,\n        watches,\n      });\n    }, watchedInput.watch.interval);\n  }\n\n  return context;\n}\n"
  },
  {
    "path": "packages/openapi-ts/src/generate/client.ts",
    "content": "import fs from 'node:fs';\nimport path from 'node:path';\nimport { fileURLToPath } from 'node:url';\n\nimport type { IProject } from '@hey-api/codegen-core';\nimport type { BaseOutput, DefinePlugin, OutputHeader } from '@hey-api/shared';\nimport { ensureDirSync, isEnvironment, outputHeaderToPrefix } from '@hey-api/shared';\n\nimport type { Config } from '../config/types';\nimport type { Client } from '../plugins/@hey-api/client-core/types';\nimport { getClientPlugin } from '../plugins/@hey-api/client-core/utils';\n\nconst __filename = fileURLToPath(import.meta.url);\nconst __dirname = path.dirname(__filename);\n\n/**\n * Returns paths to client bundle files based on execution context\n */\nfunction getClientBundlePaths(pluginName: string): {\n  clientPath: string;\n  corePath: string;\n} {\n  const clientName = pluginName.slice('@hey-api/client-'.length);\n\n  if (isEnvironment('development')) {\n    // Dev: source bundle folders at src/plugins/@hey-api/{client}/bundle\n    const pluginsDir = path.resolve(__dirname, '..', 'plugins', '@hey-api');\n    return {\n      clientPath: path.resolve(pluginsDir, `client-${clientName}`, 'bundle'),\n      corePath: path.resolve(pluginsDir, 'client-core', 'bundle'),\n    };\n  }\n\n  // Prod: copied to dist/clients/{clientName}\n  return {\n    clientPath: path.resolve(__dirname, 'clients', clientName),\n    corePath: path.resolve(__dirname, 'clients', 'core'),\n  };\n}\n\n/**\n * Returns absolute path to the client folder. This is hard-coded for now.\n */\nexport function clientFolderAbsolutePath(config: Config): string {\n  const client = getClientPlugin(config);\n\n  if ('bundle' in client.config && client.config.bundle) {\n    // not proud of this one\n    const renamed: Map<string, string> | undefined =\n      // @ts-expect-error\n      config._FRAGILE_CLIENT_BUNDLE_RENAMED;\n    return path.resolve(config.output.path, 'client', `${renamed?.get('index') ?? 'index'}.ts`);\n  }\n\n  return client.name;\n}\n\n/**\n * Recursively copies files and directories.\n * This is a PnP-compatible alternative to fs.cpSync that works with Yarn PnP's\n * virtualized filesystem.\n */\nfunction copyRecursivePnP(src: string, dest: string): void {\n  const stat = fs.statSync(src);\n\n  if (stat.isDirectory()) {\n    if (!fs.existsSync(dest)) {\n      fs.mkdirSync(dest, { recursive: true });\n    }\n\n    const files = fs.readdirSync(src);\n    for (const file of files) {\n      copyRecursivePnP(path.join(src, file), path.join(dest, file));\n    }\n  } else {\n    const content = fs.readFileSync(src);\n    fs.writeFileSync(dest, content);\n  }\n}\n\nfunction renameFile({\n  filePath,\n  project,\n  renamed,\n}: {\n  filePath: string;\n  project: IProject;\n  renamed: Map<string, string>;\n}): void {\n  const extension = path.extname(filePath);\n  const name = path.basename(filePath, extension);\n  const renamedName = project.fileName?.(name) || name;\n  if (renamedName !== name) {\n    const outputPath = path.dirname(filePath);\n    fs.renameSync(filePath, path.resolve(outputPath, `${renamedName}${extension}`));\n    renamed.set(name, renamedName);\n  }\n}\n\nfunction replaceImports({\n  filePath,\n  header,\n  module,\n  renamed,\n}: Pick<BaseOutput, 'module'> & {\n  filePath: string;\n  header?: string;\n  renamed: Map<string, string>;\n}): void {\n  let content = fs.readFileSync(filePath, 'utf8');\n\n  // Dev mode: rewrite source bundle imports to match output structure\n  if (isEnvironment('development')) {\n    // ../../client-core/bundle/foo -> ../core/foo\n    content = content.replace(/from\\s+['\"]\\.\\.\\/\\.\\.\\/client-core\\/bundle\\//g, \"from '../core/\");\n    // ../../client-core/bundle' (index import)\n    content = content.replace(/from\\s+['\"]\\.\\.\\/\\.\\.\\/client-core\\/bundle['\"]/g, \"from '../core'\");\n  }\n\n  content = content.replace(/from\\s+['\"](\\.\\.?\\/[^'\"]*?)['\"]/g, (match, importPath) => {\n    const importIndex = match.indexOf(importPath);\n    const extension = path.extname(importPath);\n    const fileName = path.basename(importPath, extension);\n    const importDir = path.dirname(importPath);\n    const replacedName =\n      (renamed.get(fileName) ?? fileName) + (module.extension ? module.extension : extension);\n    const replacedMatch =\n      match.slice(0, importIndex) +\n      [importDir, replacedName].filter(Boolean).join('/') +\n      match.slice(importIndex + importPath.length);\n    return replacedMatch;\n  });\n\n  const fileHeader = header ?? '';\n\n  content = `${fileHeader}${content}`;\n\n  fs.writeFileSync(filePath, content, 'utf8');\n}\n\n/**\n * Creates a `client` folder containing the same modules as the client package.\n */\nexport function generateClientBundle({\n  header,\n  module,\n  outputPath,\n  plugin,\n  project,\n}: Pick<BaseOutput, 'module'> & {\n  header?: OutputHeader;\n  outputPath: string;\n  plugin: DefinePlugin<Client.Config & { name: string }>['Config'];\n  project: IProject;\n}): Map<string, string> | undefined {\n  const renamed = new Map<string, string>();\n  const headerPrefix = outputHeaderToPrefix({\n    defaultValue: ['// This file is auto-generated by @hey-api/openapi-ts'],\n    header,\n    project,\n  });\n\n  // copy Hey API clients to output\n  const isHeyApiClientPlugin = plugin.name.startsWith('@hey-api/client-');\n  if (isHeyApiClientPlugin) {\n    const { clientPath, corePath } = getClientBundlePaths(plugin.name);\n\n    // copy client core\n    const coreOutputPath = path.resolve(outputPath, 'core');\n    ensureDirSync(coreOutputPath);\n    copyRecursivePnP(corePath, coreOutputPath);\n\n    // copy client bundle\n    const clientOutputPath = path.resolve(outputPath, 'client');\n    ensureDirSync(clientOutputPath);\n    copyRecursivePnP(clientPath, clientOutputPath);\n\n    if (project) {\n      const copiedCoreFiles = fs.readdirSync(coreOutputPath);\n      for (const file of copiedCoreFiles) {\n        renameFile({\n          filePath: path.resolve(coreOutputPath, file),\n          project,\n          renamed,\n        });\n      }\n\n      const copiedClientFiles = fs.readdirSync(clientOutputPath);\n      for (const file of copiedClientFiles) {\n        renameFile({\n          filePath: path.resolve(clientOutputPath, file),\n          project,\n          renamed,\n        });\n      }\n    }\n\n    const coreFiles = fs.readdirSync(coreOutputPath);\n    for (const file of coreFiles) {\n      replaceImports({\n        filePath: path.resolve(coreOutputPath, file),\n        header: headerPrefix,\n        module,\n        renamed,\n      });\n    }\n\n    const clientFiles = fs.readdirSync(clientOutputPath);\n    for (const file of clientFiles) {\n      replaceImports({\n        filePath: path.resolve(clientOutputPath, file),\n        header: headerPrefix,\n        module,\n        renamed,\n      });\n    }\n    return renamed;\n  }\n\n  const clientSrcPath = path.isAbsolute(plugin.name) ? path.dirname(plugin.name) : undefined;\n\n  // copy custom local client to output\n  if (clientSrcPath) {\n    const dirPath = path.resolve(outputPath, 'client');\n    ensureDirSync(dirPath);\n    copyRecursivePnP(clientSrcPath, dirPath);\n    return;\n  }\n\n  // copy third-party client to output\n  const clientModulePath = path.normalize(require.resolve(plugin.name));\n  const clientModulePathComponents = clientModulePath.split(path.sep);\n  const clientDistPath = clientModulePathComponents\n    .slice(0, clientModulePathComponents.indexOf('dist') + 1)\n    .join(path.sep);\n\n  const indexJsFile = clientModulePathComponents[clientModulePathComponents.length - 1];\n  const distFiles = [indexJsFile!, 'index.d.mts', 'index.d.cts'];\n  const dirPath = path.resolve(outputPath, 'client');\n  ensureDirSync(dirPath);\n  for (const file of distFiles) {\n    fs.copyFileSync(path.resolve(clientDistPath, file), path.resolve(dirPath, file));\n  }\n\n  return;\n}\n"
  },
  {
    "path": "packages/openapi-ts/src/generate/output.ts",
    "content": "import fs from 'node:fs';\nimport path from 'node:path';\n\nimport type { Context } from '@hey-api/shared';\nimport { IntentContext } from '@hey-api/shared';\n\nimport { getTypedConfig } from '../config/utils';\nimport { getClientPlugin } from '../plugins/@hey-api/client-core/utils';\nimport { generateClientBundle } from './client';\n\nexport async function generateOutput(context: Context): Promise<void> {\n  const outputPath = path.resolve(context.config.output.path);\n\n  if (context.config.output.clean) {\n    if (fs.existsSync(outputPath)) {\n      fs.rmSync(outputPath, { force: true, recursive: true });\n    }\n  }\n\n  const config = getTypedConfig(context);\n\n  const client = getClientPlugin(config);\n  if ('bundle' in client.config && client.config.bundle && !config.dryRun) {\n    // not proud of this one\n    // @ts-expect-error\n    config._FRAGILE_CLIENT_BUNDLE_RENAMED = generateClientBundle({\n      header: config.output.header,\n      module: config.output.module,\n      outputPath,\n      // @ts-expect-error\n      plugin: client,\n      project: context.gen,\n    });\n  }\n\n  for (const plugin of context.registerPlugins()) {\n    await plugin.run();\n  }\n\n  context.gen.plan();\n\n  const ctx = new IntentContext(context.spec);\n  for (const intent of context.intents) {\n    await intent.run(ctx);\n  }\n\n  for (const file of context.gen.render()) {\n    const filePath = path.resolve(outputPath, file.path);\n    const dir = path.dirname(filePath);\n    if (!context.config.dryRun) {\n      fs.mkdirSync(dir, { recursive: true });\n      fs.writeFileSync(filePath, file.content, { encoding: 'utf8' });\n    }\n  }\n\n  const { source } = context.config.output;\n  if (source.enabled) {\n    const sourcePath = source.path === null ? undefined : path.resolve(outputPath, source.path);\n    if (!context.config.dryRun && sourcePath && sourcePath !== outputPath) {\n      fs.mkdirSync(sourcePath, { recursive: true });\n    }\n    const serialized = await source.serialize(context.spec);\n    // TODO: handle yaml (convert before writing)\n    if (!context.config.dryRun && sourcePath) {\n      fs.writeFileSync(\n        path.resolve(sourcePath, `${source.fileName}.${source.extension}`),\n        serialized,\n        { encoding: 'utf8' },\n      );\n    }\n    if (source.callback) {\n      await source.callback(serialized);\n    }\n  }\n}\n"
  },
  {
    "path": "packages/openapi-ts/src/generate.ts",
    "content": "import path from 'node:path';\nimport { fileURLToPath } from 'node:url';\n\nimport { Logger } from '@hey-api/codegen-core';\nimport type { Context } from '@hey-api/shared';\nimport {\n  checkNodeVersion,\n  ConfigValidationError,\n  getLogs,\n  JobError,\n  logCrashReport,\n  openGitHubIssueWithCrashReport,\n  printCliIntro,\n  printCrashReport,\n  shouldReportCrash,\n} from '@hey-api/shared';\nimport type { LazyOrAsync, MaybeArray } from '@hey-api/types';\n\nimport type { Configs } from './config/init';\nimport { resolveJobs } from './config/init';\nimport type { UserConfig } from './config/types';\nimport { createClient as pCreateClient } from './createClient';\n\nconst __filename = fileURLToPath(import.meta.url);\nconst __dirname = path.dirname(__filename);\n\n/**\n * Generate a client from the provided configuration.\n *\n * @param userConfig User provided {@link UserConfig} configuration(s).\n */\nexport async function createClient(\n  userConfig?: LazyOrAsync<MaybeArray<UserConfig>>,\n  logger = new Logger(),\n): Promise<ReadonlyArray<Context>> {\n  const resolvedConfig = typeof userConfig === 'function' ? await userConfig() : userConfig;\n  const userConfigs = resolvedConfig\n    ? resolvedConfig instanceof Array\n      ? resolvedConfig\n      : [resolvedConfig]\n    : [];\n\n  let rawLogs = userConfigs.find((config) => getLogs(config.logs).level !== 'silent')?.logs;\n  if (typeof rawLogs === 'string') {\n    rawLogs = getLogs(rawLogs);\n  }\n\n  let jobs: Configs['jobs'] = [];\n\n  try {\n    checkNodeVersion();\n\n    const eventCreateClient = logger.timeEvent('createClient');\n\n    const eventConfig = logger.timeEvent('config');\n    const resolved = await resolveJobs({ logger, userConfigs });\n    const dependencies = resolved.dependencies;\n    jobs = resolved.jobs;\n    const printIntro = jobs.some((job) => job.config.logs.level !== 'silent');\n    if (printIntro) printCliIntro(__dirname);\n    eventConfig.timeEnd();\n\n    const configErrors = jobs.flatMap((job) =>\n      job.errors.map((error) => ({ error, jobIndex: job.index })),\n    );\n    if (configErrors.length > 0) {\n      throw new ConfigValidationError(configErrors);\n    }\n\n    const outputs = await Promise.all(\n      jobs.map(async (job) => {\n        try {\n          return await pCreateClient({\n            config: job.config,\n            dependencies,\n            jobIndex: job.index,\n            logger,\n          });\n        } catch (error) {\n          if (error instanceof Error) {\n            throw new JobError('', {\n              error,\n              jobIndex: job.index,\n            });\n          }\n        }\n      }),\n    );\n    const contexts = outputs.filter((ctx): ctx is Context => ctx !== undefined);\n\n    eventCreateClient.timeEnd();\n\n    logger.report(jobs.some((job) => job.config.logs.level === 'debug'));\n\n    return contexts;\n  } catch (error) {\n    const logs =\n      jobs.find((job) => job.config.logs.level !== 'silent')?.config.logs ??\n      jobs[0]?.config.logs ??\n      rawLogs;\n    const dryRun =\n      jobs.some((job) => job.config.dryRun) ?? userConfigs.some((config) => config.dryRun) ?? false;\n    const logPath = logs?.file && !dryRun ? logCrashReport(error, logs.path ?? '') : undefined;\n    if (!logs || logs.level !== 'silent') {\n      printCrashReport({ error, logPath });\n      const isInteractive =\n        jobs.some((job) => job.config.interactive) ??\n        userConfigs.some((config) => config.interactive) ??\n        false;\n      if (await shouldReportCrash({ error, isInteractive })) {\n        await openGitHubIssueWithCrashReport(error, __dirname);\n      }\n    }\n\n    throw error;\n  }\n}\n"
  },
  {
    "path": "packages/openapi-ts/src/index.ts",
    "content": "/* eslint-disable @typescript-eslint/no-namespace */\n// OVERRIDES\n// hard-coded here because build process doesn't pick up overrides from separate files\nimport '@hey-api/codegen-core';\nimport '@hey-api/shared';\n\ndeclare module '@hey-api/codegen-core' {\n  interface ProjectRenderMeta {\n    /**\n     * If specified, this will be the file extension used when importing\n     * other modules. By default, we don't add a file extension and let the\n     * runtime resolve it.\n     *\n     * @default null\n     */\n    importFileExtension?: AnyString | null;\n  }\n\n  interface SymbolMeta {\n    category?:\n      | 'client'\n      | 'external'\n      | 'hook'\n      | 'schema'\n      | 'sdk'\n      | 'transform'\n      | 'type'\n      | 'utility'\n      | AnyString;\n    /**\n     * Path to the resource this symbol represents.\n     */\n    path?: ReadonlyArray<string | number>;\n    /**\n     * Name of the plugin that registered this symbol.\n     */\n    pluginName?: string;\n    resource?: 'client' | 'definition' | 'operation' | 'webhook' | AnyString;\n    resourceId?: string;\n    role?: 'data' | 'error' | 'errors' | 'options' | 'response' | 'responses' | AnyString;\n    /**\n     * Tags associated with this symbol.\n     */\n    tags?: ReadonlyArray<string>;\n    tool?:\n      | 'angular'\n      | 'arktype'\n      | 'fastify'\n      | 'json-schema'\n      | 'sdk'\n      | 'typescript'\n      | 'valibot'\n      | 'zod'\n      | AnyString;\n    variant?: 'container' | AnyString;\n  }\n}\n\ndeclare module '@hey-api/shared' {\n  interface PluginConfigMap {\n    '@angular/common': Plugins.AngularCommon.Types['Types'];\n    '@faker-js/faker': Plugins.FakerJsFaker.Types['Types'];\n    '@hey-api/client-angular': Plugins.HeyApiClientAngular.Types['Types'];\n    '@hey-api/client-axios': Plugins.HeyApiClientAxios.Types['Types'];\n    '@hey-api/client-fetch': Plugins.HeyApiClientFetch.Types['Types'];\n    '@hey-api/client-ky': Plugins.HeyApiClientKy.Types['Types'];\n    '@hey-api/client-next': Plugins.HeyApiClientNext.Types['Types'];\n    '@hey-api/client-nuxt': Plugins.HeyApiClientNuxt.Types['Types'];\n    '@hey-api/client-ofetch': Plugins.HeyApiClientOfetch.Types['Types'];\n    '@hey-api/schemas': Plugins.HeyApiSchemas.Types['Types'];\n    '@hey-api/sdk': Plugins.HeyApiSdk.Types['Types'];\n    '@hey-api/transformers': Plugins.HeyApiTransformers.Types['Types'];\n    '@hey-api/typescript': Plugins.HeyApiTypeScript.Types['Types'];\n    '@pinia/colada': Plugins.PiniaColada.Types['Types'];\n    '@tanstack/angular-query-experimental': Plugins.TanStackAngularQuery.Types['Types'];\n    '@tanstack/preact-query': Plugins.TanStackPreactQuery.Types['Types'];\n    '@tanstack/react-query': Plugins.TanStackReactQuery.Types['Types'];\n    '@tanstack/solid-query': Plugins.TanStackSolidQuery.Types['Types'];\n    '@tanstack/svelte-query': Plugins.TanStackSvelteQuery.Types['Types'];\n    '@tanstack/vue-query': Plugins.TanStackVueQuery.Types['Types'];\n    arktype: Plugins.Arktype.Types['Types'];\n    fastify: Plugins.Fastify.Types['Types'];\n    nestjs: Plugins.NestJs.Types['Types'];\n    orpc: Plugins.Orpc.Types['Types'];\n    swr: Plugins.Swr.Types['Types'];\n    valibot: Plugins.Valibot.Types['Types'];\n    zod: Plugins.Zod.Types['Types'];\n  }\n\n  interface PluginInstanceTypes {\n    Node: TsDsl;\n  }\n}\n// END OVERRIDES\n\nimport type { AnyString, LazyOrAsync, MaybeArray } from '@hey-api/types';\nimport colors from 'ansi-colors';\n// @ts-expect-error\nimport colorSupport from 'color-support';\n\nimport type { UserConfig } from './config/types';\nimport type { AngularCommonPlugin } from './plugins/@angular/common';\nimport type { FakerJsFakerPlugin, FakerJsFakerResolvers } from './plugins/@faker-js/faker';\nimport type {\n  AngularClient as AngularClientImp,\n  HeyApiClientAngularPlugin,\n} from './plugins/@hey-api/client-angular';\nimport type {\n  AxiosClient as AxiosClientImp,\n  HeyApiClientAxiosPlugin,\n} from './plugins/@hey-api/client-axios';\nimport type {\n  FetchClient as FetchClientImp,\n  HeyApiClientFetchPlugin,\n} from './plugins/@hey-api/client-fetch';\nimport type { HeyApiClientKyPlugin, KyClient as KyClientImp } from './plugins/@hey-api/client-ky';\nimport type {\n  HeyApiClientNextPlugin,\n  NextClient as NextClientImp,\n} from './plugins/@hey-api/client-next';\nimport type {\n  HeyApiClientNuxtPlugin,\n  NuxtClient as NuxtClientImp,\n} from './plugins/@hey-api/client-nuxt';\nimport type {\n  HeyApiClientOfetchPlugin,\n  OfetchClient as OfetchClientImp,\n} from './plugins/@hey-api/client-ofetch';\nimport type { HeyApiSchemasPlugin } from './plugins/@hey-api/schemas';\nimport type { HeyApiSdkPlugin } from './plugins/@hey-api/sdk';\nimport type { HeyApiTransformersPlugin } from './plugins/@hey-api/transformers';\nimport type {\n  HeyApiTypeScriptPlugin,\n  HeyApiTypeScriptResolvers,\n} from './plugins/@hey-api/typescript';\nimport type { PiniaColadaPlugin } from './plugins/@pinia/colada';\nimport type { TanStackAngularQueryPlugin } from './plugins/@tanstack/angular-query-experimental';\nimport type { TanStackPreactQueryPlugin } from './plugins/@tanstack/preact-query';\nimport type { TanStackReactQueryPlugin } from './plugins/@tanstack/react-query';\nimport type { TanStackSolidQueryPlugin } from './plugins/@tanstack/solid-query';\nimport type { TanStackSvelteQueryPlugin } from './plugins/@tanstack/svelte-query';\nimport type { TanStackVueQueryPlugin } from './plugins/@tanstack/vue-query';\nimport type { ArktypePlugin } from './plugins/arktype';\nimport type { FastifyPlugin } from './plugins/fastify';\nimport type { NestJsPlugin } from './plugins/nestjs';\nimport type { OrpcPlugin } from './plugins/orpc';\nimport type { SwrPlugin } from './plugins/swr';\nimport type { ValibotPlugin, ValibotResolvers } from './plugins/valibot';\nimport type { ZodPlugin, ZodResolvers } from './plugins/zod';\nimport type { TsDsl } from './ts-dsl';\n\ncolors.enabled = colorSupport().hasBasic;\n\nexport { createClient } from './generate';\n\n/**\n * Type helper for configuration object, returns {@link MaybeArray<UserConfig>} object(s)\n */\nexport function defineConfig(\n  config: LazyOrAsync<ReadonlyArray<UserConfig>>,\n): Promise<ReadonlyArray<UserConfig>>;\nexport function defineConfig(config: LazyOrAsync<UserConfig>): Promise<UserConfig>;\nexport async function defineConfig<T extends MaybeArray<UserConfig>>(\n  config: LazyOrAsync<T>,\n): Promise<T> {\n  return typeof config === 'function' ? await config() : config;\n}\n\nexport { defaultPlugins } from './config/plugins';\nexport type { UserConfig } from './config/types';\nexport { clientDefaultConfig, clientDefaultMeta } from './plugins/@hey-api/client-core/config';\nexport { clientPluginHandler } from './plugins/@hey-api/client-core/plugin';\nexport type { Client } from './plugins/@hey-api/client-core/types';\nexport type { ExpressionTransformer, TypeTransformer } from './plugins/@hey-api/transformers/types';\nexport * from './ts-dsl';\nexport { Logger } from '@hey-api/codegen-core';\nexport type {\n  DefinePlugin,\n  IR,\n  OpenApi,\n  OpenApiMetaObject,\n  OpenApiOperationObject,\n  OpenApiParameterObject,\n  OpenApiRequestBodyObject,\n  OpenApiResponseObject,\n  OpenApiSchemaObject,\n  Plugin,\n} from '@hey-api/shared';\nexport {\n  defaultPaginationKeywords,\n  definePluginConfig,\n  OperationPath,\n  OperationStrategy,\n  utils,\n} from '@hey-api/shared';\n\nexport namespace Plugins {\n  export namespace AngularCommon {\n    export type Types = AngularCommonPlugin;\n  }\n\n  export namespace Arktype {\n    export type Types = ArktypePlugin;\n  }\n\n  export namespace FakerJsFaker {\n    export type Types = FakerJsFakerPlugin;\n    export type Resolvers = Required<FakerJsFakerResolvers>['~resolvers'];\n  }\n\n  export namespace Fastify {\n    export type Types = FastifyPlugin;\n  }\n\n  export namespace HeyApiClientAngular {\n    export type Client = AngularClientImp;\n    export type Types = HeyApiClientAngularPlugin;\n  }\n\n  export namespace HeyApiClientAxios {\n    export type Client = AxiosClientImp;\n    export type Types = HeyApiClientAxiosPlugin;\n  }\n\n  export namespace HeyApiClientFetch {\n    export type Client = FetchClientImp;\n    export type Types = HeyApiClientFetchPlugin;\n  }\n\n  export namespace HeyApiClientKy {\n    export type Client = KyClientImp;\n    export type Types = HeyApiClientKyPlugin;\n  }\n\n  export namespace HeyApiClientNext {\n    export type Client = NextClientImp;\n    export type Types = HeyApiClientNextPlugin;\n  }\n\n  export namespace HeyApiClientNuxt {\n    export type Client = NuxtClientImp;\n    export type Types = HeyApiClientNuxtPlugin;\n  }\n\n  export namespace HeyApiClientOfetch {\n    export type Client = OfetchClientImp;\n    export type Types = HeyApiClientOfetchPlugin;\n  }\n\n  export namespace HeyApiSchemas {\n    export type Types = HeyApiSchemasPlugin;\n  }\n\n  export namespace HeyApiSdk {\n    export type Types = HeyApiSdkPlugin;\n  }\n\n  export namespace HeyApiTransformers {\n    export type Types = HeyApiTransformersPlugin;\n  }\n\n  export namespace HeyApiTypeScript {\n    export type Resolvers = Required<HeyApiTypeScriptResolvers>['~resolvers'];\n    export type Types = HeyApiTypeScriptPlugin;\n  }\n\n  export namespace NestJs {\n    export type Types = NestJsPlugin;\n  }\n\n  export namespace Orpc {\n    export type Types = OrpcPlugin;\n  }\n\n  export namespace PiniaColada {\n    export type Types = PiniaColadaPlugin;\n  }\n\n  export namespace Swr {\n    export type Types = SwrPlugin;\n  }\n\n  export namespace TanStackAngularQuery {\n    export type Types = TanStackAngularQueryPlugin;\n  }\n\n  export namespace TanStackPreactQuery {\n    export type Types = TanStackPreactQueryPlugin;\n  }\n\n  export namespace TanStackReactQuery {\n    export type Types = TanStackReactQueryPlugin;\n  }\n\n  export namespace TanStackSolidQuery {\n    export type Types = TanStackSolidQueryPlugin;\n  }\n\n  export namespace TanStackSvelteQuery {\n    export type Types = TanStackSvelteQueryPlugin;\n  }\n\n  export namespace TanStackVueQuery {\n    export type Types = TanStackVueQueryPlugin;\n  }\n\n  export namespace Valibot {\n    export type Resolvers = Required<ValibotResolvers>['~resolvers'];\n    export type Types = ValibotPlugin;\n  }\n\n  export namespace Zod {\n    export type Resolvers = Required<ZodResolvers>['~resolvers'];\n    export type Types = ZodPlugin;\n  }\n}\n\n// DEPRECATED\n/** @deprecated Use `Plugins.HeyApiClientAngular.Client` instead. */\nexport type AngularClient = AngularClientImp;\n/** @deprecated Use `Plugins.HeyApiClientAxios.Client` instead. */\nexport type AxiosClient = AxiosClientImp;\n/** @deprecated Use `Plugins.HeyApiClientFetch.Client` instead. */\nexport type FetchClient = FetchClientImp;\n/** @deprecated Use `Plugins.HeyApiClientKy.Client` instead. */\nexport type KyClient = KyClientImp;\n/** @deprecated Use `Plugins.HeyApiClientNext.Client` instead. */\nexport type NextClient = NextClientImp;\n/** @deprecated Use `Plugins.HeyApiClientNuxt.Client` instead. */\nexport type NuxtClient = NuxtClientImp;\n/** @deprecated Use `Plugins.HeyApiClientOfetch.Client` instead. */\nexport type OfetchClient = OfetchClientImp;\n"
  },
  {
    "path": "packages/openapi-ts/src/internal.ts",
    "content": "export { resolveJobs as initConfigs } from './config/init';\nexport { getSpec, parseOpenApiSpec } from '@hey-api/shared';\n"
  },
  {
    "path": "packages/openapi-ts/src/plugins/@angular/common/config.ts",
    "content": "import { definePluginConfig } from '@hey-api/shared';\n\nimport { resolveHttpRequests } from './httpRequests';\nimport { resolveHttpResources } from './httpResources';\nimport { handler } from './plugin';\nimport type { AngularCommonPlugin } from './types';\n\nexport const defaultConfig: AngularCommonPlugin['Config'] = {\n  config: {\n    comments: true,\n    includeInEntry: false,\n  },\n  dependencies: ['@hey-api/client-angular', '@hey-api/sdk'],\n  handler,\n  name: '@angular/common',\n  resolveConfig: (plugin, context) => {\n    plugin.config.httpRequests = resolveHttpRequests(plugin.config, context);\n    plugin.config.httpResources = resolveHttpResources(plugin.config, context);\n  },\n};\n\n/**\n * Type helper for `@angular/common` plugin, returns {@link Plugin.Config} object\n */\nexport const defineConfig = definePluginConfig(defaultConfig);\n"
  },
  {
    "path": "packages/openapi-ts/src/plugins/@angular/common/httpRequests/config.ts",
    "content": "import type { PluginContext } from '@hey-api/shared';\n\nimport type { UserConfig } from '../types';\nimport type { HttpRequestsConfig, UserHttpRequestsConfig } from './types';\n\ntype Config = Omit<UserConfig, 'name'>;\n\nexport function resolveHttpRequests(config: Config, context: PluginContext): HttpRequestsConfig {\n  let input = config.httpRequests;\n  if (typeof input === 'string' || typeof input === 'function') {\n    input = { strategy: input };\n  } else if (typeof input === 'boolean' || !input) {\n    input = { enabled: Boolean(input) };\n  }\n\n  const strategy = input.strategy ?? 'flat';\n\n  return context.valueToObject({\n    defaultValue: {\n      container: 'class',\n      enabled: true,\n      methods: 'instance',\n      nesting: 'operationId',\n      nestingDelimiters: /[./]/,\n      strategy,\n      strategyDefaultTag: 'default',\n    },\n    mappers: {\n      object(value) {\n        value.containerName = context.valueToObject({\n          defaultValue:\n            strategy === 'single'\n              ? { casing: 'PascalCase', name: 'HttpRequests' }\n              : { casing: 'PascalCase' },\n          mappers: {\n            function: (name) => ({ name }),\n            string: (name) => ({ name }),\n          },\n          value: value.containerName,\n        });\n        value.methodName = context.valueToObject({\n          defaultValue:\n            strategy === 'flat'\n              ? { casing: 'camelCase', name: '{{name}}Request' }\n              : { casing: 'camelCase' },\n          mappers: {\n            function: (name) => ({ name }),\n            string: (name) => ({ name }),\n          },\n          value: value.methodName,\n        });\n        value.segmentName = context.valueToObject({\n          defaultValue: { casing: 'PascalCase', name: '{{name}}Requests' },\n          mappers: {\n            function: (name) => ({ name }),\n            string: (name) => ({ name }),\n          },\n          value: value.segmentName,\n        });\n        return value;\n      },\n    },\n    value: input as UserHttpRequestsConfig,\n  }) as HttpRequestsConfig;\n}\n"
  },
  {
    "path": "packages/openapi-ts/src/plugins/@angular/common/httpRequests/index.ts",
    "content": "export { resolveHttpRequests } from './config';\nexport { resolveHttpRequestsStrategy } from './resolve';\nexport type { HttpRequestsConfig, UserHttpRequestsConfig } from './types';\n"
  },
  {
    "path": "packages/openapi-ts/src/plugins/@angular/common/httpRequests/resolve.ts",
    "content": "import type { OperationPathStrategy, OperationStructureStrategy } from '@hey-api/shared';\nimport { OperationPath, OperationStrategy } from '@hey-api/shared';\n\nimport type { AngularCommonPlugin } from '../types';\n\nfunction resolvePath(plugin: AngularCommonPlugin['Instance']): OperationPathStrategy {\n  if (plugin.config.httpRequests.nesting === 'id') {\n    return OperationPath.id();\n  }\n\n  if (plugin.config.httpRequests.nesting === 'operationId') {\n    return OperationPath.fromOperationId({\n      delimiters: plugin.config.httpRequests.nestingDelimiters,\n      fallback: OperationPath.id(),\n    });\n  }\n\n  return plugin.config.httpRequests.nesting;\n}\n\nexport function resolveHttpRequestsStrategy(\n  plugin: AngularCommonPlugin['Instance'],\n): OperationStructureStrategy {\n  if (plugin.config.httpRequests.strategy === 'flat') {\n    return OperationStrategy.flat({\n      path: (operation) => [resolvePath(plugin)(operation).join('.')],\n    });\n  }\n\n  if (plugin.config.httpRequests.strategy === 'single') {\n    const root = plugin.config.httpRequests.containerName;\n    return OperationStrategy.single({\n      path: resolvePath(plugin),\n      root: typeof root.name === 'string' ? root.name : (root.name?.('') ?? ''),\n    });\n  }\n\n  if (plugin.config.httpRequests.strategy === 'byTags') {\n    return OperationStrategy.byTags({\n      fallback: plugin.config.httpRequests.strategyDefaultTag,\n      path: resolvePath(plugin),\n    });\n  }\n\n  return plugin.config.httpRequests.strategy;\n}\n"
  },
  {
    "path": "packages/openapi-ts/src/plugins/@angular/common/httpRequests/types.ts",
    "content": "import type {\n  FeatureToggle,\n  NamingConfig,\n  NamingRule,\n  OperationPathStrategy,\n  OperationsStrategy,\n} from '@hey-api/shared';\n\nexport interface UserHttpRequestsConfig {\n  /**\n   * Type of container for grouped operations.\n   *\n   * Ignored when `strategy` is `'flat'`.\n   *\n   * - `'class'` - Class with methods\n   *\n   * @default 'class'\n   */\n  container?: 'class';\n  /**\n   * Customize container names.\n   *\n   * For `'single'` strategy, this sets the root container name.\n   * For `'byTags'` strategy, this transforms tag names.\n   *\n   * @default 'Sdk' for `'single'` strategy\n   *\n   * @example\n   * // Set root name for single strategy\n   * containerName: 'MyApi'\n   *\n   * @example\n   * // Transform tag names with suffix\n   * containerName: '{{name}}Service'\n   *\n   * @example\n   * // With casing\n   * containerName: { name: '{{name}}Service', case: 'PascalCase' }\n   */\n  containerName?: NamingRule;\n  /**\n   * Whether this feature is enabled.\n   *\n   * @default true\n   */\n  enabled?: boolean;\n  /**\n   * Customize method/function names.\n   *\n   * Applied to the final segment of the path (the method name).\n   */\n  methodName?: NamingRule;\n  /**\n   * How methods are attached to class containers.\n   *\n   * Only applies when `container` is `'class'`.\n   *\n   * - `'instance'` - Instance methods, requires `new ClassName(config)`\n   *\n   * @default 'instance'\n   */\n  methods?: 'instance';\n  /**\n   * How to derive nesting structure from operations.\n   *\n   * - `'operationId'` - Split operationId by delimiters (e.g., `users.list` → `Users.list()`)\n   * - `'id'` - Use operation id as-is, no nesting\n   * - Custom function for full control\n   *\n   * @default 'operationId'\n   */\n  nesting?: 'operationId' | 'id' | OperationPathStrategy;\n  /**\n   * Delimiters for splitting operationId.\n   *\n   * Only applies when `nesting` is `'operationId'`.\n   *\n   * @default /[./]/\n   */\n  nestingDelimiters?: RegExp;\n  /**\n   * Customize nesting segment names.\n   *\n   * Applied to intermediate path segments (not the method name).\n   */\n  segmentName?: NamingRule;\n  /**\n   * Grouping strategy.\n   *\n   * - `'flat'` - Standalone functions, no grouping\n   * - `'byTags'` - One container per operation tag\n   * - `'single'` - All operations in one container\n   * - Custom function for full control\n   *\n   * @default 'flat'\n   */\n  strategy?: OperationsStrategy;\n  /**\n   * Default container name for operations without tags.\n   *\n   * Only applies when `strategy` is `'byTags'`.\n   *\n   * @default 'default'\n   */\n  strategyDefaultTag?: string;\n}\n\nexport type HttpRequestsConfig = FeatureToggle & {\n  /**\n   * Type of container for grouped operations.\n   *\n   * Ignored when `strategy` is `'flat'`.\n   *\n   * - `'class'` - Class with methods\n   */\n  container: 'class';\n  /**\n   * Customize container names.\n   *\n   * For `'single'` strategy, this sets the root container name.\n   * For `'byTags'` strategy, this transforms tag names.\n   *\n   * @default 'Sdk' for `'single'` strategy\n   *\n   * @example\n   * // Set root name for single strategy\n   * containerName: 'MyApi'\n   *\n   * @example\n   * // Transform tag names with suffix\n   * containerName: '{{name}}Service'\n   *\n   * @example\n   * // With casing\n   * containerName: { name: '{{name}}Service', case: 'PascalCase' }\n   */\n  containerName: NamingConfig;\n  /**\n   * Customize method/function names.\n   *\n   * Applied to the final segment of the path (the method name).\n   */\n  methodName: NamingConfig;\n  /**\n   * How methods are attached to class containers.\n   *\n   * Only applies when `container` is `'class'`.\n   *\n   * - `'instance'` - Instance methods, requires `new ClassName(config)`\n   */\n  methods: 'instance';\n  /**\n   * How to derive nesting structure from operations.\n   *\n   * - `'operationId'` - Split operationId by delimiters (e.g., `users.list` → `Users.list()`)\n   * - `'id'` - Use operation id as-is, no nesting\n   * - Custom function for full control\n   */\n  nesting: 'operationId' | 'id' | OperationPathStrategy;\n  /**\n   * Delimiters for splitting operationId.\n   *\n   * Only applies when `nesting` is `'operationId'`.\n   */\n  nestingDelimiters: RegExp;\n  /**\n   * Customize nesting segment names.\n   *\n   * Applied to intermediate path segments (not the method name).\n   */\n  segmentName: NamingConfig;\n  /**\n   * Grouping strategy.\n   *\n   * - `'flat'` - Standalone functions, no grouping\n   * - `'byTags'` - One container per operation tag\n   * - `'single'` - All operations in one container\n   * - Custom function for full control\n   */\n  strategy: OperationsStrategy;\n  /**\n   * Default container name for operations without tags.\n   *\n   * Only applies when `strategy` is `'byTags'`.\n   */\n  strategyDefaultTag: string;\n};\n"
  },
  {
    "path": "packages/openapi-ts/src/plugins/@angular/common/httpResources/config.ts",
    "content": "import type { PluginContext } from '@hey-api/shared';\n\nimport type { UserConfig } from '../types';\nimport type { HttpResourcesConfig, UserHttpResourcesConfig } from './types';\n\ntype Config = Omit<UserConfig, 'name'>;\n\nexport function resolveHttpResources(config: Config, context: PluginContext): HttpResourcesConfig {\n  let input = config.httpResources;\n  if (typeof input === 'string' || typeof input === 'function') {\n    input = { strategy: input };\n  } else if (typeof input === 'boolean' || !input) {\n    input = { enabled: Boolean(input) };\n  }\n\n  const strategy = input.strategy ?? 'flat';\n\n  return context.valueToObject({\n    defaultValue: {\n      container: 'class',\n      enabled: true,\n      methods: 'instance',\n      nesting: 'operationId',\n      nestingDelimiters: /[./]/,\n      strategy,\n      strategyDefaultTag: 'default',\n    },\n    mappers: {\n      object(value) {\n        value.containerName = context.valueToObject({\n          defaultValue:\n            strategy === 'single'\n              ? { casing: 'PascalCase', name: 'HttpResources' }\n              : { casing: 'PascalCase' },\n          mappers: {\n            function: (name) => ({ name }),\n            string: (name) => ({ name }),\n          },\n          value: value.containerName,\n        });\n        value.methodName = context.valueToObject({\n          defaultValue:\n            strategy === 'flat'\n              ? { casing: 'camelCase', name: '{{name}}Resource' }\n              : { casing: 'camelCase' },\n          mappers: {\n            function: (name) => ({ name }),\n            string: (name) => ({ name }),\n          },\n          value: value.methodName,\n        });\n        value.segmentName = context.valueToObject({\n          defaultValue: { casing: 'PascalCase', name: '{{name}}Resources' },\n          mappers: {\n            function: (name) => ({ name }),\n            string: (name) => ({ name }),\n          },\n          value: value.segmentName,\n        });\n        return value;\n      },\n    },\n    value: input as UserHttpResourcesConfig,\n  }) as HttpResourcesConfig;\n}\n"
  },
  {
    "path": "packages/openapi-ts/src/plugins/@angular/common/httpResources/index.ts",
    "content": "export { resolveHttpResources } from './config';\nexport { resolveHttpResourcesStrategy } from './resolve';\nexport type { HttpResourcesConfig, UserHttpResourcesConfig } from './types';\n"
  },
  {
    "path": "packages/openapi-ts/src/plugins/@angular/common/httpResources/resolve.ts",
    "content": "import type { OperationPathStrategy, OperationStructureStrategy } from '@hey-api/shared';\nimport { OperationPath, OperationStrategy } from '@hey-api/shared';\n\nimport type { AngularCommonPlugin } from '../types';\n\nfunction resolvePath(plugin: AngularCommonPlugin['Instance']): OperationPathStrategy {\n  if (plugin.config.httpResources.nesting === 'id') {\n    return OperationPath.id();\n  }\n\n  if (plugin.config.httpResources.nesting === 'operationId') {\n    return OperationPath.fromOperationId({\n      delimiters: plugin.config.httpResources.nestingDelimiters,\n      fallback: OperationPath.id(),\n    });\n  }\n\n  return plugin.config.httpResources.nesting;\n}\n\nexport function resolveHttpResourcesStrategy(\n  plugin: AngularCommonPlugin['Instance'],\n): OperationStructureStrategy {\n  if (plugin.config.httpResources.strategy === 'flat') {\n    return OperationStrategy.flat({\n      path: (operation) => [resolvePath(plugin)(operation).join('.')],\n    });\n  }\n\n  if (plugin.config.httpResources.strategy === 'single') {\n    const root = plugin.config.httpResources.containerName;\n    return OperationStrategy.single({\n      path: resolvePath(plugin),\n      root: typeof root.name === 'string' ? root.name : (root.name?.('') ?? ''),\n    });\n  }\n\n  if (plugin.config.httpResources.strategy === 'byTags') {\n    return OperationStrategy.byTags({\n      fallback: plugin.config.httpResources.strategyDefaultTag,\n      path: resolvePath(plugin),\n    });\n  }\n\n  return plugin.config.httpResources.strategy;\n}\n"
  },
  {
    "path": "packages/openapi-ts/src/plugins/@angular/common/httpResources/types.ts",
    "content": "import type {\n  FeatureToggle,\n  NamingConfig,\n  NamingRule,\n  OperationPathStrategy,\n  OperationsStrategy,\n} from '@hey-api/shared';\n\nexport interface UserHttpResourcesConfig {\n  /**\n   * Type of container for grouped operations.\n   *\n   * Ignored when `strategy` is `'flat'`.\n   *\n   * - `'class'` - Class with methods\n   *\n   * @default 'class'\n   */\n  container?: 'class';\n  /**\n   * Customize container names.\n   *\n   * For `'single'` strategy, this sets the root container name.\n   * For `'byTags'` strategy, this transforms tag names.\n   *\n   * @default 'Sdk' for `'single'` strategy\n   *\n   * @example\n   * // Set root name for single strategy\n   * containerName: 'MyApi'\n   *\n   * @example\n   * // Transform tag names with suffix\n   * containerName: '{{name}}Service'\n   *\n   * @example\n   * // With casing\n   * containerName: { name: '{{name}}Service', case: 'PascalCase' }\n   */\n  containerName?: NamingRule;\n  /**\n   * Whether this feature is enabled.\n   *\n   * @default true\n   */\n  enabled?: boolean;\n  /**\n   * Customize method/function names.\n   *\n   * Applied to the final segment of the path (the method name).\n   */\n  methodName?: NamingRule;\n  /**\n   * How methods are attached to class containers.\n   *\n   * Only applies when `container` is `'class'`.\n   *\n   * - `'instance'` - Instance methods, requires `new ClassName(config)`\n   *\n   * @default 'instance'\n   */\n  methods?: 'instance';\n  /**\n   * How to derive nesting structure from operations.\n   *\n   * - `'operationId'` - Split operationId by delimiters (e.g., `users.list` → `Users.list()`)\n   * - `'id'` - Use operation id as-is, no nesting\n   * - Custom function for full control\n   *\n   * @default 'operationId'\n   */\n  nesting?: 'operationId' | 'id' | OperationPathStrategy;\n  /**\n   * Delimiters for splitting operationId.\n   *\n   * Only applies when `nesting` is `'operationId'`.\n   *\n   * @default /[./]/\n   */\n  nestingDelimiters?: RegExp;\n  /**\n   * Customize nesting segment names.\n   *\n   * Applied to intermediate path segments (not the method name).\n   */\n  segmentName?: NamingRule;\n  /**\n   * Grouping strategy.\n   *\n   * - `'flat'` - Standalone functions, no grouping\n   * - `'byTags'` - One container per operation tag\n   * - `'single'` - All operations in one container\n   * - Custom function for full control\n   *\n   * @default 'flat'\n   */\n  strategy?: OperationsStrategy;\n  /**\n   * Default container name for operations without tags.\n   *\n   * Only applies when `strategy` is `'byTags'`.\n   *\n   * @default 'default'\n   */\n  strategyDefaultTag?: string;\n}\n\nexport type HttpResourcesConfig = FeatureToggle & {\n  /**\n   * Type of container for grouped operations.\n   *\n   * Ignored when `strategy` is `'flat'`.\n   *\n   * - `'class'` - Class with methods\n   */\n  container: 'class';\n  /**\n   * Customize container names.\n   *\n   * For `'single'` strategy, this sets the root container name.\n   * For `'byTags'` strategy, this transforms tag names.\n   *\n   * @default 'Sdk' for `'single'` strategy\n   *\n   * @example\n   * // Set root name for single strategy\n   * containerName: 'MyApi'\n   *\n   * @example\n   * // Transform tag names with suffix\n   * containerName: '{{name}}Service'\n   *\n   * @example\n   * // With casing\n   * containerName: { name: '{{name}}Service', case: 'PascalCase' }\n   */\n  containerName: NamingConfig;\n  /**\n   * Customize method/function names.\n   *\n   * Applied to the final segment of the path (the method name).\n   */\n  methodName: NamingConfig;\n  /**\n   * How methods are attached to class containers.\n   *\n   * Only applies when `container` is `'class'`.\n   *\n   * - `'instance'` - Instance methods, requires `new ClassName(config)`\n   */\n  methods: 'instance';\n  /**\n   * How to derive nesting structure from operations.\n   *\n   * - `'operationId'` - Split operationId by delimiters (e.g., `users.list` → `Users.list()`)\n   * - `'id'` - Use operation id as-is, no nesting\n   * - Custom function for full control\n   */\n  nesting: 'operationId' | 'id' | OperationPathStrategy;\n  /**\n   * Delimiters for splitting operationId.\n   *\n   * Only applies when `nesting` is `'operationId'`.\n   */\n  nestingDelimiters: RegExp;\n  /**\n   * Customize nesting segment names.\n   *\n   * Applied to intermediate path segments (not the method name).\n   */\n  segmentName: NamingConfig;\n  /**\n   * Grouping strategy.\n   *\n   * - `'flat'` - Standalone functions, no grouping\n   * - `'byTags'` - One container per operation tag\n   * - `'single'` - All operations in one container\n   * - Custom function for full control\n   */\n  strategy: OperationsStrategy;\n  /**\n   * Default container name for operations without tags.\n   *\n   * Only applies when `strategy` is `'byTags'`.\n   */\n  strategyDefaultTag: string;\n};\n"
  },
  {
    "path": "packages/openapi-ts/src/plugins/@angular/common/index.ts",
    "content": "export { defaultConfig, defineConfig } from './config';\nexport type { AngularCommonPlugin } from './types';\n"
  },
  {
    "path": "packages/openapi-ts/src/plugins/@angular/common/plugin.ts",
    "content": "import { StructureModel } from '@hey-api/codegen-core';\n\nimport type { $ } from '../../../ts-dsl';\nimport { resolveHttpRequestsStrategy } from './httpRequests';\nimport { resolveHttpResourcesStrategy } from './httpResources';\nimport type { OperationItem } from './shared/node';\nimport {\n  createHttpRequestShell,\n  createHttpResourceShell,\n  source,\n  toHttpRequestNode,\n  toHttpResourceNode,\n} from './shared/node';\nimport type { AngularCommonPlugin } from './types';\n\nexport const handler: AngularCommonPlugin['Handler'] = ({ plugin }) => {\n  plugin.symbol('HttpRequest', {\n    external: '@angular/common/http',\n    kind: 'type',\n    meta: {\n      category: 'external',\n      resource: '@angular/common/http.HttpRequest',\n    },\n  });\n  plugin.symbol('inject', {\n    external: '@angular/core',\n    meta: {\n      category: 'external',\n      resource: '@angular/core.inject',\n    },\n  });\n  plugin.symbol('Injectable', {\n    external: '@angular/core',\n    meta: {\n      category: 'external',\n      resource: '@angular/core.Injectable',\n    },\n  });\n  plugin.symbol('httpResource', {\n    external: '@angular/common/http',\n    meta: {\n      category: 'external',\n      resource: '@angular/common/http.httpResource',\n    },\n  });\n\n  const httpRequestStructure = new StructureModel();\n  const httpResourceStructure = new StructureModel();\n\n  if (plugin.config.httpRequests.enabled) {\n    const shell = createHttpRequestShell(plugin);\n    const strategy = resolveHttpRequestsStrategy(plugin);\n\n    plugin.forEach(\n      'operation',\n      ({ operation }) => {\n        httpRequestStructure.insert({\n          data: {\n            operation,\n          } satisfies OperationItem,\n          locations: strategy(operation).map((path) => ({ path, shell })),\n          source,\n        });\n      },\n      { order: 'declarations' },\n    );\n  }\n\n  if (plugin.config.httpResources.enabled) {\n    const shell = createHttpResourceShell(plugin);\n    const strategy = resolveHttpResourcesStrategy(plugin);\n\n    plugin.forEach(\n      'operation',\n      ({ operation }) => {\n        httpResourceStructure.insert({\n          data: {\n            operation,\n          } satisfies OperationItem,\n          locations: strategy(operation).map((path) => ({ path, shell })),\n          source,\n        });\n      },\n      { order: 'declarations' },\n    );\n  }\n\n  const allDependencies: Array<ReturnType<typeof $.class | typeof $.var>> = [];\n  const allNodes: Array<ReturnType<typeof $.class | typeof $.var>> = [];\n\n  for (const node of httpRequestStructure.walk()) {\n    const { dependencies, nodes } = toHttpRequestNode(node, plugin);\n    allDependencies.push(...(dependencies ?? []));\n    allNodes.push(...nodes);\n  }\n  for (const node of httpResourceStructure.walk()) {\n    const { dependencies, nodes } = toHttpResourceNode(node, plugin);\n    allDependencies.push(...(dependencies ?? []));\n    allNodes.push(...nodes);\n  }\n\n  const uniqueDependencies = new Map<number, ReturnType<typeof $.class | typeof $.var>>();\n  for (const dep of allDependencies) {\n    if (dep.symbol) uniqueDependencies.set(dep.symbol.id, dep);\n  }\n  for (const dep of uniqueDependencies.values()) {\n    plugin.node(dep);\n  }\n\n  for (const node of allNodes) {\n    plugin.node(node);\n  }\n};\n"
  },
  {
    "path": "packages/openapi-ts/src/plugins/@angular/common/shared/node.ts",
    "content": "import type {\n  StructureItem,\n  StructureNode,\n  StructureShell,\n  Symbol,\n  SymbolMeta,\n} from '@hey-api/codegen-core';\nimport type { IR } from '@hey-api/shared';\nimport { applyNaming, toCase } from '@hey-api/shared';\n\nimport { getTypedConfig } from '../../../../config/utils';\nimport { getClientPlugin } from '../../../../plugins/@hey-api/client-core/utils';\nimport {\n  createOperationComment,\n  isOperationOptionsRequired,\n} from '../../../../plugins/shared/utils/operation';\nimport { $ } from '../../../../ts-dsl';\nimport type { AngularCommonPlugin } from '../types';\n\nexport interface OperationItem {\n  operation: IR.OperationObject;\n}\n\nexport const source = globalThis.Symbol('@angular/common');\n\nfunction attachComment<T extends ReturnType<typeof $.var | typeof $.method>>(args: {\n  node: T;\n  operation: IR.OperationObject;\n  plugin: AngularCommonPlugin['Instance'];\n}): T {\n  const { node, operation, plugin } = args;\n  return node.$if(plugin.config.comments && createOperationComment(operation), (n, v) =>\n    n.doc(v),\n  ) as T;\n}\n\nfunction createHttpRequestFnMeta(operation: IR.OperationObject): SymbolMeta {\n  return {\n    category: 'utility',\n    resource: 'operation',\n    resourceId: operation.id,\n    role: 'request',\n    tool: 'angular',\n  };\n}\n\nfunction createHttpRequestShellMeta(node: StructureNode): SymbolMeta {\n  return {\n    category: 'utility',\n    resource: 'shell',\n    resourceId: node.getPath().join('.'),\n    role: 'request',\n    tool: 'angular',\n  };\n}\n\nfunction createHttpResourceFnMeta(operation: IR.OperationObject): SymbolMeta {\n  return {\n    category: 'utility',\n    resource: 'operation',\n    resourceId: operation.id,\n    role: 'resource',\n    tool: 'angular',\n  };\n}\n\nfunction createHttpResourceShellMeta(node: StructureNode): SymbolMeta {\n  return {\n    category: 'utility',\n    resource: 'shell',\n    resourceId: node.getPath().join('.'),\n    role: 'resource',\n    tool: 'angular',\n  };\n}\n\nfunction createHttpRequestFnSymbol(\n  plugin: AngularCommonPlugin['Instance'],\n  item: StructureItem & { data: OperationItem },\n): Symbol {\n  const { operation } = item.data;\n  const name = item.location[item.location.length - 1]!;\n  return plugin.symbol(applyNaming(name, plugin.config.httpRequests.methodName), {\n    meta: createHttpRequestFnMeta(operation),\n  });\n}\n\nfunction createHttpResourceFnSymbol(\n  plugin: AngularCommonPlugin['Instance'],\n  item: StructureItem & { data: OperationItem },\n): Symbol {\n  const { operation } = item.data;\n  const name = item.location[item.location.length - 1]!;\n  return plugin.symbol(applyNaming(name, plugin.config.httpResources.methodName), {\n    meta: createHttpResourceFnMeta(operation),\n  });\n}\n\nfunction childToHttpRequestNode(\n  resource: StructureNode,\n  plugin: AngularCommonPlugin['Instance'],\n): ReadonlyArray<ReturnType<typeof $.field | typeof $.getter>> {\n  const refChild = plugin.referenceSymbol(createHttpRequestShellMeta(resource));\n  const memberNameStr = toCase(refChild.name, 'camelCase');\n  const memberName = plugin.symbol(memberNameStr);\n  const privateName = plugin.symbol(`_${memberNameStr}`);\n  return [\n    $.field(privateName, (f) => f.private().optional().type(refChild)),\n    $.getter(memberName, (g) =>\n      g\n        .returns(refChild)\n        .do($('this').attr(privateName).nullishAssign($.new(refChild).args()).return()),\n    ),\n  ];\n}\n\nfunction childToHttpResourceNode(\n  resource: StructureNode,\n  plugin: AngularCommonPlugin['Instance'],\n): ReadonlyArray<ReturnType<typeof $.field | typeof $.getter>> {\n  const refChild = plugin.referenceSymbol(createHttpResourceShellMeta(resource));\n  const memberNameStr = toCase(refChild.name, 'camelCase');\n  const memberName = plugin.symbol(memberNameStr);\n  const privateName = plugin.symbol(`_${memberNameStr}`);\n  return [\n    $.field(privateName, (f) => f.private().optional().type(refChild)),\n    $.getter(memberName, (g) =>\n      g\n        .returns(refChild)\n        .do($('this').attr(privateName).nullishAssign($.new(refChild).args()).return()),\n    ),\n  ];\n}\n\nexport function createHttpRequestShell(plugin: AngularCommonPlugin['Instance']): StructureShell {\n  const client = getClientPlugin(getTypedConfig(plugin));\n  const isAngularClient = client.name === '@hey-api/client-angular';\n\n  const symbolInjectable = plugin.external('@angular/core.Injectable');\n\n  return {\n    define: (node) => {\n      const symbol = plugin.symbol(\n        applyNaming(\n          node.name,\n          node.isRoot\n            ? plugin.config.httpRequests.containerName\n            : plugin.config.httpRequests.segmentName,\n        ),\n        {\n          meta: createHttpRequestShellMeta(node),\n        },\n      );\n\n      const c = $.class(symbol)\n        .export()\n        .$if(isAngularClient && node.isRoot, (c) =>\n          c.decorator(symbolInjectable, $.object().prop('providedIn', $.literal('root'))),\n        );\n\n      return { dependencies: [], node: c };\n    },\n  };\n}\n\nexport function createHttpResourceShell(plugin: AngularCommonPlugin['Instance']): StructureShell {\n  const client = getClientPlugin(getTypedConfig(plugin));\n  const isAngularClient = client.name === '@hey-api/client-angular';\n\n  const symbolInjectable = plugin.external('@angular/core.Injectable');\n\n  return {\n    define: (node) => {\n      const symbol = plugin.symbol(\n        applyNaming(\n          node.name,\n          node.isRoot\n            ? plugin.config.httpResources.containerName\n            : plugin.config.httpResources.segmentName,\n        ),\n        {\n          meta: createHttpResourceShellMeta(node),\n        },\n      );\n\n      const c = $.class(symbol)\n        .export()\n        .$if(isAngularClient && node.isRoot, (c) =>\n          c.decorator(symbolInjectable, $.object().prop('providedIn', $.literal('root'))),\n        );\n\n      return { dependencies: [], node: c };\n    },\n  };\n}\n\nfunction implementHttpRequestFn<T extends ReturnType<typeof $.func | typeof $.method>>(args: {\n  node: T;\n  operation: IR.OperationObject;\n  plugin: AngularCommonPlugin['Instance'];\n}): T {\n  const { node, operation, plugin } = args;\n  const isRequiredOptions = isOperationOptionsRequired({\n    context: plugin.context,\n    operation,\n  });\n\n  const symbolHttpRequest = plugin.external('@angular/common/http.HttpRequest');\n  const symbolClient = plugin.getSymbol({ category: 'client' });\n  const symbolOptions = plugin.referenceSymbol({\n    category: 'type',\n    resource: 'client-options',\n    tool: 'sdk',\n  });\n  const symbolDataType = plugin.querySymbol({\n    category: 'type',\n    resource: 'operation',\n    resourceId: operation.id,\n    role: 'data',\n    tool: 'typescript',\n  });\n  const symbolResponseType = plugin.querySymbol({\n    category: 'type',\n    resource: 'operation',\n    resourceId: operation.id,\n    role: 'response',\n  });\n\n  return node\n    .param('options', (p) =>\n      p.required(isRequiredOptions).type(\n        $.type(symbolOptions)\n          .generic(symbolDataType ?? 'unknown')\n          .generic('ThrowOnError'),\n      ),\n    )\n    .generic('ThrowOnError', (g) => g.extends('boolean').default(false))\n    .returns($.type(symbolHttpRequest).generic(symbolResponseType ?? 'unknown'))\n    .do(\n      $.return(\n        $('options')\n          .attr('client')\n          .optional()\n          .$if(symbolClient, (c, s) => c.coalesce(s))\n          .attr('requestOptions')\n          .call(\n            $.object()\n              .prop('responseStyle', $.literal('data'))\n              .prop('method', $.literal(operation.method.toUpperCase()))\n              .prop('url', $.literal(operation.path))\n              .spread('options'),\n          )\n          .generic(symbolResponseType ?? 'unknown')\n          .generic('ThrowOnError'),\n      ),\n    ) as T;\n}\n\nfunction implementHttpResourceFn<T extends ReturnType<typeof $.func | typeof $.method>>(args: {\n  node: T;\n  operation: IR.OperationObject;\n  plugin: AngularCommonPlugin['Instance'];\n}): T {\n  const { node, operation, plugin } = args;\n  const isRequiredOptions = isOperationOptionsRequired({\n    context: plugin.context,\n    operation,\n  });\n\n  const symbolHttpResource = plugin.external('@angular/common/http.httpResource');\n  const symbolInject = plugin.external('@angular/core.inject');\n  const symbolOptions = plugin.referenceSymbol({\n    category: 'type',\n    resource: 'client-options',\n    tool: 'sdk',\n  });\n  const symbolDataType = plugin.querySymbol({\n    category: 'type',\n    resource: 'operation',\n    resourceId: operation.id,\n    role: 'data',\n    tool: 'typescript',\n  });\n  const symbolResponseType = plugin.querySymbol({\n    category: 'type',\n    resource: 'operation',\n    resourceId: operation.id,\n    role: 'response',\n  });\n\n  return node\n    .param('options', (p) =>\n      p.required(isRequiredOptions).type(\n        $.type.func().returns(\n          $.type.or(\n            $.type(symbolOptions)\n              .generic(symbolDataType ?? 'unknown')\n              .generic('ThrowOnError'),\n            $.type('undefined'),\n          ),\n        ),\n      ),\n    )\n    .generic('ThrowOnError', (g) => g.extends('boolean').default(false))\n    .do(\n      $.return(\n        $(symbolHttpResource)\n          .call(\n            $.func().do(\n              $.const('opts').assign(\n                $.ternary('options').do($('options').call()).otherwise($.id('undefined')),\n              ),\n              $.return(\n                $.ternary('opts')\n                  .do(\n                    $.lazy((ctx) =>\n                      ctx\n                        .access(plugin.referenceSymbol(createHttpRequestFnMeta(operation)), {\n                          transform: (node, index) =>\n                            index === 0\n                              ? node['~dsl'] === 'ClassTsDsl'\n                                ? $(symbolInject).call($(node.name))\n                                : $(node.name)\n                              : node,\n                        })\n                        .call('opts'),\n                    ),\n                  )\n                  .otherwise($.id('undefined')),\n              ),\n            ),\n          )\n          .generic(symbolResponseType ?? 'unknown'),\n      ),\n    ) as T;\n}\n\nexport function toHttpRequestNode(\n  model: StructureNode,\n  plugin: AngularCommonPlugin['Instance'],\n): {\n  dependencies?: Array<ReturnType<typeof $.class | typeof $.var>>;\n  nodes: ReadonlyArray<ReturnType<typeof $.class | typeof $.var>>;\n} {\n  if (model.virtual) {\n    const nodes: Array<ReturnType<typeof $.var>> = [];\n    for (const item of model.itemsFrom<OperationItem>(source)) {\n      const { operation } = item.data;\n      let node = $.const(createHttpRequestFnSymbol(plugin, item))\n        .export()\n        .assign(\n          implementHttpRequestFn({\n            node: $.func(),\n            operation,\n            plugin,\n          }),\n        );\n      node = attachComment({ node, operation, plugin });\n      nodes.push(node);\n    }\n    return { nodes };\n  }\n\n  if (!model.shell) {\n    return { nodes: [] };\n  }\n\n  const nodes: Array<ReturnType<typeof $.class>> = [];\n\n  const shell = model.shell.define(model);\n  const node = shell.node as ReturnType<typeof $.class>;\n\n  let index = 0;\n  for (const item of model.itemsFrom<OperationItem>(source)) {\n    const { operation } = item.data;\n    if (index > 0 || node.hasBody) node.newline();\n    node.do(\n      implementHttpRequestFn({\n        node: $.method(createHttpRequestFnSymbol(plugin, item), (m) =>\n          attachComment({\n            node: m,\n            operation,\n            plugin,\n          }).public(),\n        ),\n        operation,\n        plugin,\n      }),\n    );\n    index += 1;\n  }\n\n  for (const child of model.children.values()) {\n    if (node.hasBody) node.newline();\n    node.do(...childToHttpRequestNode(child, plugin));\n  }\n\n  nodes.push(node);\n\n  return {\n    dependencies: shell.dependencies as Array<ReturnType<typeof $.class>>,\n    nodes,\n  };\n}\n\nexport function toHttpResourceNode(\n  model: StructureNode,\n  plugin: AngularCommonPlugin['Instance'],\n): {\n  dependencies?: Array<ReturnType<typeof $.class | typeof $.var>>;\n  nodes: ReadonlyArray<ReturnType<typeof $.class | typeof $.var>>;\n} {\n  if (model.virtual) {\n    const nodes: Array<ReturnType<typeof $.var>> = [];\n    for (const item of model.itemsFrom<OperationItem>(source)) {\n      const { operation } = item.data;\n      let node = $.const(createHttpResourceFnSymbol(plugin, item))\n        .export()\n        .assign(\n          implementHttpResourceFn({\n            node: $.func(),\n            operation,\n            plugin,\n          }),\n        );\n      node = attachComment({ node, operation, plugin });\n      nodes.push(node);\n    }\n    return { nodes };\n  }\n\n  if (!model.shell) {\n    return { nodes: [] };\n  }\n\n  const nodes: Array<ReturnType<typeof $.class>> = [];\n\n  const shell = model.shell.define(model);\n  const node = shell.node as ReturnType<typeof $.class>;\n\n  let index = 0;\n  for (const item of model.itemsFrom<OperationItem>(source)) {\n    const { operation } = item.data;\n    if (index > 0 || node.hasBody) node.newline();\n    node.do(\n      implementHttpResourceFn({\n        node: $.method(createHttpResourceFnSymbol(plugin, item), (m) =>\n          attachComment({\n            node: m,\n            operation,\n            plugin,\n          }).public(),\n        ),\n        operation,\n        plugin,\n      }),\n    );\n    index += 1;\n  }\n\n  for (const child of model.children.values()) {\n    if (node.hasBody) node.newline();\n    node.do(...childToHttpResourceNode(child, plugin));\n  }\n\n  nodes.push(node);\n\n  return {\n    dependencies: shell.dependencies as Array<ReturnType<typeof $.class>>,\n    nodes,\n  };\n}\n"
  },
  {
    "path": "packages/openapi-ts/src/plugins/@angular/common/types.ts",
    "content": "import type { DefinePlugin, OperationsStrategy, Plugin } from '@hey-api/shared';\n\nimport type { HttpRequestsConfig, UserHttpRequestsConfig } from './httpRequests';\nimport type { HttpResourcesConfig, UserHttpResourcesConfig } from './httpResources';\n\nexport type UserConfig = Plugin.Name<'@angular/common'> &\n  Plugin.Hooks &\n  Plugin.UserComments &\n  Plugin.UserExports & {\n    /**\n     * Options for generating HTTP Request instances.\n     *\n     * @default 'flat'\n     */\n    httpRequests?: boolean | OperationsStrategy | UserHttpRequestsConfig;\n    /**\n     * Options for generating HTTP resource APIs.\n     *\n     * @default 'flat'\n     */\n    httpResources?: boolean | OperationsStrategy | UserHttpResourcesConfig;\n  };\n\nexport type Config = Plugin.Name<'@angular/common'> &\n  Plugin.Hooks &\n  Plugin.Comments &\n  Plugin.Exports & {\n    /**\n     * Options for generating HTTP Request instances.\n     */\n    httpRequests: HttpRequestsConfig;\n    /**\n     * Options for generating HTTP resource APIs.\n     */\n    httpResources: HttpResourcesConfig;\n  };\n\nexport type AngularCommonPlugin = DefinePlugin<UserConfig, Config>;\n"
  },
  {
    "path": "packages/openapi-ts/src/plugins/@faker-js/faker/api.ts",
    "content": "import type { IR } from '@hey-api/shared';\n\nimport type { $ } from '../../../ts-dsl';\n\ntype Expression = ReturnType<typeof $.expr>;\n\nexport type IApi = {\n  /**\n   * Generate a Faker expression for a schema.\n   *\n   * Returns an expression that produces a valid instance when executed.\n   * Use when you need one-off generation without referencing shared artifacts.\n   *\n   * @example\n   * ```ts\n   * {\n   *   name: faker.person.fullName(),\n   *   email: faker.internet.email()\n   * }\n   * ```\n   */\n  toNode(schema: IR.SchemaObject): Expression;\n  /**\n   * Get a reference to a generated Faker expression for a schema.\n   *\n   * Returns a call expression referencing the shared artifact.\n   * If the artifact doesn't exist, it will be created.\n   *\n   * @example\n   * // Returns: fakeUser()\n   */\n  toNodeRef(schema: IR.SchemaObject): Expression;\n};\n\nexport class Api implements IApi {\n  // eslint-disable-next-line @typescript-eslint/no-unused-vars\n  toNode(_schema: IR.SchemaObject): Expression {\n    return undefined as any;\n  }\n\n  // eslint-disable-next-line @typescript-eslint/no-unused-vars\n  toNodeRef(_schema: IR.SchemaObject): Expression {\n    return undefined as any;\n  }\n}\n"
  },
  {
    "path": "packages/openapi-ts/src/plugins/@faker-js/faker/config.ts",
    "content": "import { definePluginConfig, mappers } from '@hey-api/shared';\n\nimport { Api } from './api';\n// import { handler } from './plugin';\nimport type { FakerJsFakerPlugin } from './types';\n\nexport const defaultConfig: FakerJsFakerPlugin['Config'] = {\n  api: new Api(),\n  config: {\n    case: 'camelCase',\n    includeInEntry: false,\n  },\n  // handler,\n  handler: () => {},\n  name: '@faker-js/faker',\n  resolveConfig: (plugin, context) => {\n    plugin.config.definitions = context.valueToObject({\n      defaultValue: {\n        case: plugin.config.case ?? 'camelCase',\n        enabled: true,\n        name: 'v{{name}}',\n      },\n      mappers,\n      value: plugin.config.definitions,\n    });\n  },\n  tags: ['mocker'],\n};\n\n/**\n * Type helper for Faker plugin, returns {@link Plugin.Config} object\n */\nexport const defineConfig = definePluginConfig(defaultConfig);\n"
  },
  {
    "path": "packages/openapi-ts/src/plugins/@faker-js/faker/index.ts",
    "content": "export { defaultConfig, defineConfig } from './config';\nexport type { FakerJsFakerResolvers } from './resolvers/types';\nexport type { FakerJsFakerPlugin } from './types';\n"
  },
  {
    "path": "packages/openapi-ts/src/plugins/@faker-js/faker/resolvers/types.ts",
    "content": "// TODO: later\nimport type { Symbol } from '@hey-api/codegen-core';\nimport type { Plugin, SchemaWithType } from '@hey-api/shared';\n\nimport type { $, DollarTsDsl } from '../../../../ts-dsl';\nimport type { FakerJsFakerPlugin } from '../types';\n\ntype Expression = ReturnType<typeof $.expr>;\n\nexport type FakerJsFakerResolvers = Plugin.Resolvers<{\n  array?: (ctx: ArrayResolverContext) => Expression | undefined;\n  number?: (ctx: NumberResolverContext) => Expression | undefined;\n  object?: (ctx: ObjectResolverContext) => Expression | undefined;\n  string?: (ctx: StringResolverContext) => Expression | undefined;\n}>;\n\ninterface BaseContext extends DollarTsDsl {\n  plugin: FakerJsFakerPlugin['Instance'];\n  symbols: {\n    faker: Symbol;\n  };\n}\n\nexport interface ArrayResolverContext extends BaseContext {\n  nodes: {\n    items: (ctx: ArrayResolverContext) => Expression;\n    length: (ctx: ArrayResolverContext) => Expression | undefined;\n  };\n  schema: SchemaWithType<'array'>;\n}\n\nexport interface NumberResolverContext extends BaseContext {\n  nodes: {\n    base: (ctx: NumberResolverContext) => Expression;\n    max: (ctx: NumberResolverContext) => Expression | undefined;\n    min: (ctx: NumberResolverContext) => Expression | undefined;\n  };\n  schema: SchemaWithType<'integer' | 'number'>;\n}\n\nexport interface ObjectResolverContext extends BaseContext {\n  nodes: {\n    properties: (ctx: ObjectResolverContext) => Expression;\n  };\n  schema: SchemaWithType<'object'>;\n}\n\nexport interface StringResolverContext extends BaseContext {\n  nodes: {\n    base: (ctx: StringResolverContext) => Expression;\n    format: (ctx: StringResolverContext) => Expression | undefined;\n    pattern: (ctx: StringResolverContext) => Expression | undefined;\n  };\n  schema: SchemaWithType<'string'>;\n}\n"
  },
  {
    "path": "packages/openapi-ts/src/plugins/@faker-js/faker/types.ts",
    "content": "import type { Casing, FeatureToggle, NameTransformer, NamingOptions } from '@hey-api/shared';\nimport type { DefinePlugin, Plugin } from '@hey-api/shared';\n\nimport type { IApi } from './api';\n\nexport type UserConfig = Plugin.Name<'@faker-js/faker'> &\n  Plugin.Hooks &\n  Plugin.UserExports & {\n    // Resolvers & {\n    /**\n     * Casing convention for generated names.\n     *\n     * @default 'camelCase'\n     */\n    case?: Casing;\n    /**\n     * Configuration for reusable schema definitions.\n     *\n     * Can be:\n     * - `boolean`: Shorthand for `{ enabled: boolean }`\n     * - `string` or `function`: Shorthand for `{ name: string | function }`\n     * - `object`: Full configuration object\n     */\n    definitions?:\n      | boolean\n      | NameTransformer\n      | {\n          /**\n           * Casing convention for generated names.\n           *\n           * @default 'camelCase'\n           */\n          case?: Casing;\n          /**\n           * Whether this feature is enabled.\n           *\n           * @default true\n           */\n          enabled?: boolean;\n          /**\n           * Naming pattern for generated names.\n           *\n           * @default 'fake{{name}}'\n           */\n          name?: NameTransformer;\n        };\n    /**\n     * Faker locale for generated data.\n     *\n     * @default 'en'\n     */\n    locale?: string;\n    /**\n     * Seed for deterministic output. When set, Faker will produce\n     * the same values across runs.\n     */\n    seed?: number;\n  };\n\nexport type Config = Plugin.Name<'@faker-js/faker'> &\n  Plugin.Hooks &\n  Plugin.Exports & {\n    // Resolvers & {\n    /**\n     * Casing convention for generated names.\n     */\n    case: Casing;\n    /**\n     * Configuration for reusable schema definitions.\n     */\n    definitions: NamingOptions & FeatureToggle;\n    /**\n     * Faker locale for generated data.\n     */\n    locale: string;\n    /**\n     * Seed for deterministic output. When set, Faker will produce\n     * the same values across runs.\n     */\n    seed?: number;\n  };\n\nexport type FakerJsFakerPlugin = DefinePlugin<UserConfig, Config, IApi>;\n"
  },
  {
    "path": "packages/openapi-ts/src/plugins/@hey-api/client-angular/__tests__/client.test.ts",
    "content": "import type { HttpClient } from '@angular/common/http';\nimport { HttpHeaders } from '@angular/common/http';\n\nimport { createClient } from '../bundle/client';\n\ndescribe('buildUrl', () => {\n  const client = createClient();\n\n  const scenarios: {\n    options: Parameters<typeof client.buildUrl>[0];\n    url: string;\n  }[] = [\n    {\n      options: {\n        url: '',\n      },\n      url: '/',\n    },\n    {\n      options: {\n        url: '/foo',\n      },\n      url: '/foo',\n    },\n    {\n      options: {\n        path: {\n          fooId: 1,\n        },\n        url: '/foo/{fooId}',\n      },\n      url: '/foo/1',\n    },\n    {\n      options: {\n        path: {\n          fooId: 1,\n        },\n        query: {\n          bar: 'baz',\n        },\n        url: '/foo/{fooId}',\n      },\n      url: '/foo/1?bar=baz',\n    },\n    {\n      options: {\n        query: {\n          bar: [],\n          foo: [],\n        },\n        url: '/',\n      },\n      url: '/',\n    },\n    {\n      options: {\n        query: {\n          bar: [],\n          foo: ['abc', 'def'],\n        },\n        url: '/',\n      },\n      url: '/?foo=abc&foo=def',\n    },\n  ];\n\n  it.each(scenarios)('returns $url', ({ options, url }) => {\n    expect(client.buildUrl(options)).toBe(url);\n  });\n\n  it('uses baseUrl from client config by default', () => {\n    const clientWithBase = createClient({ baseUrl: 'https://example.com' });\n    expect(clientWithBase.buildUrl({ url: '/foo' })).toBe('https://example.com/foo');\n  });\n\n  it('allows overriding baseUrl from client config', () => {\n    const clientWithBase = createClient({ baseUrl: 'https://example.com' });\n    expect(clientWithBase.buildUrl({ baseUrl: 'https://other.com', url: '/foo' })).toBe(\n      'https://other.com/foo',\n    );\n  });\n});\n\ndescribe('unserialized request body handling', () => {\n  const client = createClient({ baseUrl: 'https://example.com' });\n\n  afterEach(() => {\n    vi.restoreAllMocks();\n  });\n\n  const scenarios = [{ body: 0 }, { body: false }, { body: 'test string' }, { body: '' }];\n\n  it.each(scenarios)('handles plain text body with $body value', async ({ body }) => {\n    const spy = vi.spyOn(HttpHeaders.prototype, 'delete');\n\n    const request = client.requestOptions({\n      body,\n      bodySerializer: null,\n      httpClient: vi.fn() as Partial<HttpClient> as HttpClient,\n      url: '/test',\n    });\n\n    expect(request).toMatchObject(\n      expect.objectContaining({\n        body,\n      }),\n    );\n\n    expect(spy).toHaveBeenCalledTimes(0);\n  });\n});\n\ndescribe('requestOptions serialized request body handling', () => {\n  const client = createClient({ baseUrl: 'https://example.com' });\n\n  afterEach(() => {\n    vi.restoreAllMocks();\n  });\n\n  const scenarios = [\n    {\n      body: '',\n      expectBodyValue: false,\n      expectDeleteHeader: 1,\n      serializedBody: '',\n    },\n    {\n      body: 0,\n      expectBodyValue: true,\n      expectDeleteHeader: 0,\n      serializedBody: 0,\n    },\n    {\n      body: false,\n      expectBodyValue: true,\n      expectDeleteHeader: 0,\n      serializedBody: false,\n    },\n    {\n      body: {},\n      expectBodyValue: true,\n      expectDeleteHeader: 0,\n      serializedBody: '{\"key\":\"value\"}',\n    },\n  ];\n\n  it.each(scenarios)(\n    'handles $serializedBody serializedBody value',\n    async ({ body, expectBodyValue, expectDeleteHeader, serializedBody }) => {\n      const spy = vi.spyOn(HttpHeaders.prototype, 'delete');\n\n      const request = client.requestOptions({\n        body,\n        bodySerializer: () => serializedBody,\n        httpClient: vi.fn() as Partial<HttpClient> as HttpClient,\n        url: '/test',\n      });\n\n      expect(request).toMatchObject(\n        expect.objectContaining({\n          body: expectBodyValue ? serializedBody : null,\n        }),\n      );\n\n      expect(spy).toHaveBeenCalledTimes(expectDeleteHeader);\n    },\n  );\n});\n"
  },
  {
    "path": "packages/openapi-ts/src/plugins/@hey-api/client-angular/__tests__/utils.test.ts",
    "content": "import { HttpHeaders } from '@angular/common/http';\n\nimport type { Auth } from '../../client-core/bundle/auth';\nimport type { Client } from '../bundle/types';\nimport { buildUrl, getParseAs, setAuthParams } from '../bundle/utils';\n\ndescribe('buildUrl', () => {\n  const scenarios: Array<{\n    options: Parameters<Client['buildUrl']>[0];\n    url: string;\n  }> = [\n    {\n      options: {\n        path: {\n          id: new Date('2025-01-01T00:00:00.000Z'),\n        },\n        url: '/foo/{id}',\n      },\n      url: '/foo/2025-01-01T00:00:00.000Z',\n    },\n  ];\n\n  it.each(scenarios)('builds $url', async ({ options, url }) => {\n    expect(buildUrl(options)).toEqual(url);\n  });\n});\n\ndescribe('getParseAs', () => {\n  const scenarios: Array<{\n    content: Parameters<typeof getParseAs>[0];\n    parseAs: ReturnType<typeof getParseAs>;\n  }> = [\n    {\n      content: null,\n      parseAs: 'stream',\n    },\n    {\n      content: 'application/json',\n      parseAs: 'json',\n    },\n    {\n      content: 'application/ld+json',\n      parseAs: 'json',\n    },\n    {\n      content: 'application/ld+json;charset=utf-8',\n      parseAs: 'json',\n    },\n    {\n      content: 'application/ld+json; charset=utf-8',\n      parseAs: 'json',\n    },\n    {\n      content: 'multipart/form-data',\n      parseAs: 'formData',\n    },\n    {\n      content: 'application/*',\n      parseAs: 'blob',\n    },\n    {\n      content: 'audio/*',\n      parseAs: 'blob',\n    },\n    {\n      content: 'image/*',\n      parseAs: 'blob',\n    },\n    {\n      content: 'video/*',\n      parseAs: 'blob',\n    },\n    {\n      content: 'text/*',\n      parseAs: 'text',\n    },\n    {\n      content: 'unsupported',\n      parseAs: undefined,\n    },\n  ];\n\n  it.each(scenarios)('detects $content as $parseAs', async ({ content, parseAs }) => {\n    expect(getParseAs(content)).toEqual(parseAs);\n  });\n});\n\ndescribe('setAuthParams', () => {\n  it('sets bearer token in headers', async () => {\n    const auth = vi.fn().mockReturnValue('foo');\n    const headers = new HttpHeaders();\n    const query: Record<any, unknown> = {};\n    const options = {\n      auth,\n      headers,\n      query,\n      security: [\n        {\n          name: 'baz',\n          scheme: 'bearer' as const,\n          type: 'http' as const,\n        },\n      ],\n    };\n    await setAuthParams(options);\n    expect(auth).toHaveBeenCalled();\n    expect(options.headers.get('baz')).toBe('Bearer foo');\n    expect(Object.keys(query).length).toBe(0);\n  });\n\n  it('sets access token in query', async () => {\n    const auth = vi.fn().mockReturnValue('foo');\n    const headers = new HttpHeaders();\n    const query: Record<any, unknown> = {};\n    await setAuthParams({\n      auth,\n      headers,\n      query,\n      security: [\n        {\n          in: 'query',\n          name: 'baz',\n          scheme: 'bearer',\n          type: 'http',\n        },\n      ],\n    });\n    expect(auth).toHaveBeenCalled();\n    expect(headers.get('baz')).toBeNull();\n    expect(query.baz).toBe('Bearer foo');\n  });\n\n  it('sets Authorization header when `in` and `name` are undefined', async () => {\n    const auth = vi.fn().mockReturnValue('foo');\n    const headers = new HttpHeaders();\n    const query: Record<any, unknown> = {};\n    const options = {\n      auth,\n      headers,\n      query,\n      security: [\n        {\n          type: 'http' as const,\n        },\n      ],\n    };\n    await setAuthParams(options);\n    expect(auth).toHaveBeenCalled();\n    expect(options.headers.get('Authorization')).toBe('foo');\n    expect(query).toEqual({});\n  });\n\n  it('sets first scheme only', async () => {\n    const auth = vi.fn().mockReturnValue('foo');\n    const headers = new HttpHeaders();\n    const query: Record<any, unknown> = {};\n    const options = {\n      auth,\n      headers,\n      query,\n      security: [\n        {\n          name: 'baz',\n          scheme: 'bearer' as const,\n          type: 'http' as const,\n        },\n        {\n          in: 'query' as const,\n          name: 'baz',\n          scheme: 'bearer' as const,\n          type: 'http' as const,\n        },\n      ],\n    };\n    await setAuthParams(options);\n    expect(auth).toHaveBeenCalled();\n    expect(options.headers.get('baz')).toBe('Bearer foo');\n    expect(Object.keys(query).length).toBe(0);\n  });\n\n  it('sets first scheme with token', async () => {\n    const auth = vi.fn().mockImplementation((auth: Auth) => {\n      if (auth.type === 'apiKey') {\n        return;\n      }\n      return 'foo';\n    });\n    const headers = new HttpHeaders();\n    const query: Record<any, unknown> = {};\n    await setAuthParams({\n      auth,\n      headers,\n      query,\n      security: [\n        {\n          name: 'baz',\n          type: 'apiKey',\n        },\n        {\n          in: 'query',\n          name: 'baz',\n          scheme: 'bearer',\n          type: 'http',\n        },\n      ],\n    });\n    expect(auth).toHaveBeenCalled();\n    expect(headers.get('baz')).toBeNull();\n    expect(query.baz).toBe('Bearer foo');\n  });\n\n  it('sets an API key in a cookie', async () => {\n    const auth = vi.fn().mockReturnValue('foo');\n    const headers = new HttpHeaders();\n    const query: Record<any, unknown> = {};\n    const options = {\n      auth,\n      headers,\n      query,\n      security: [\n        {\n          in: 'cookie' as const,\n          name: 'baz',\n          type: 'apiKey' as const,\n        },\n      ],\n    };\n    await setAuthParams(options);\n    expect(auth).toHaveBeenCalled();\n    expect(options.headers.get('Cookie')).toBe('baz=foo');\n    expect(query).toEqual({});\n  });\n});\n"
  },
  {
    "path": "packages/openapi-ts/src/plugins/@hey-api/client-angular/bundle/client.ts",
    "content": "import type { HttpResponse } from '@angular/common/http';\nimport { HttpClient, HttpErrorResponse, HttpEventType, HttpRequest } from '@angular/common/http';\nimport {\n  assertInInjectionContext,\n  inject,\n  provideAppInitializer,\n  runInInjectionContext,\n} from '@angular/core';\nimport { firstValueFrom } from 'rxjs';\nimport { filter } from 'rxjs/operators';\n\nimport { createSseClient } from '../../client-core/bundle/serverSentEvents';\nimport type { HttpMethod } from '../../client-core/bundle/types';\nimport { getValidRequestBody } from '../../client-core/bundle/utils';\nimport type {\n  Client,\n  Config,\n  RequestOptions,\n  ResolvedRequestOptions,\n  ResponseStyle,\n} from './types';\nimport {\n  buildUrl,\n  createConfig,\n  createInterceptors,\n  mergeConfigs,\n  mergeHeaders,\n  setAuthParams,\n} from './utils';\n\nexport function provideHeyApiClient(client: Client) {\n  return provideAppInitializer(() => {\n    const httpClient = inject(HttpClient);\n    client.setConfig({ httpClient });\n  });\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<\n    HttpRequest<unknown>,\n    HttpResponse<unknown>,\n    unknown,\n    ResolvedRequestOptions\n  >();\n\n  const requestOptions = <\n    TData = unknown,\n    ThrowOnError extends boolean = false,\n    TResponseStyle extends ResponseStyle = 'fields',\n  >(\n    options: RequestOptions<TData, TResponseStyle, ThrowOnError>,\n  ) => {\n    const opts = {\n      ..._config,\n      ...options,\n      headers: mergeHeaders(_config.headers, options.headers),\n      httpClient: options.httpClient ?? _config.httpClient,\n      serializedBody: undefined as string | undefined,\n    };\n\n    if (!opts.httpClient) {\n      if (opts.injector) {\n        opts.httpClient = runInInjectionContext(opts.injector, () => inject(HttpClient));\n      } else {\n        assertInInjectionContext(requestOptions);\n        opts.httpClient = inject(HttpClient);\n      }\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 url = buildUrl(opts as any);\n\n    const req = new HttpRequest<unknown>(opts.method ?? 'GET', url, getValidRequestBody(opts), {\n      redirect: 'follow',\n      ...opts,\n    });\n\n    return { opts, req, url };\n  };\n\n  const beforeRequest = async (options: RequestOptions) => {\n    const { opts, req, url } = requestOptions(options);\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    return { opts, req, url };\n  };\n\n  const request: Client['request'] = async (options) => {\n    // @ts-expect-error\n    const { opts, req: initialReq } = await beforeRequest(options);\n\n    let req = initialReq;\n\n    for (const fn of interceptors.request.fns) {\n      if (fn) {\n        req = await fn(req, opts as any);\n      }\n    }\n\n    const result: {\n      request: HttpRequest<unknown>;\n      response: any;\n    } = {\n      request: req,\n      response: null,\n    };\n\n    try {\n      result.response = (await firstValueFrom(\n        opts\n          .httpClient!.request(req)\n          .pipe(filter((event) => event.type === HttpEventType.Response)),\n      )) as HttpResponse<unknown>;\n\n      for (const fn of interceptors.response.fns) {\n        if (fn) {\n          result.response = await fn(result.response, req, opts as any);\n        }\n      }\n\n      let bodyResponse = result.response.body;\n\n      if (opts.responseValidator) {\n        await opts.responseValidator(bodyResponse);\n      }\n\n      if (opts.responseTransformer) {\n        bodyResponse = await opts.responseTransformer(bodyResponse);\n      }\n\n      return opts.responseStyle === 'data' ? bodyResponse : { data: bodyResponse, ...result };\n    } catch (error) {\n      if (error instanceof HttpErrorResponse) {\n        result.response = error;\n      }\n\n      let finalError = error instanceof HttpErrorResponse ? error.error : error;\n\n      for (const fn of interceptors.error.fns) {\n        if (fn) {\n          finalError = (await fn(finalError, result.response as any, req, opts as any)) as string;\n        }\n      }\n\n      if (opts.throwOnError) {\n        throw finalError;\n      }\n\n      return opts.responseStyle === 'data'\n        ? undefined\n        : {\n            error: finalError,\n            ...result,\n          };\n    }\n  };\n\n  const makeMethodFn = (method: Uppercase<HttpMethod>) => (options: RequestOptions) =>\n    request({ ...options, method });\n\n  const makeSseFn = (method: Uppercase<HttpMethod>) => async (options: RequestOptions) => {\n    const { opts, url } = await beforeRequest(options);\n    return createSseClient({\n      ...opts,\n      body: opts.body as BodyInit | null | undefined,\n      headers: opts.headers as unknown as Record<string, string>,\n      method,\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    requestOptions: (options) => {\n      if (options.security) {\n        throw new Error('Security is not supported in requestOptions');\n      }\n\n      if (options.requestValidator) {\n        throw new Error('Request validation is not supported in requestOptions');\n      }\n\n      return requestOptions(options).req;\n    },\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"
  },
  {
    "path": "packages/openapi-ts/src/plugins/@hey-api/client-angular/bundle/index.ts",
    "content": "export type { Auth } from '../../client-core/bundle/auth';\nexport type { QuerySerializerOptions } from '../../client-core/bundle/bodySerializer';\nexport {\n  formDataBodySerializer,\n  jsonBodySerializer,\n  urlSearchParamsBodySerializer,\n} from '../../client-core/bundle/bodySerializer';\nexport { buildClientParams } from '../../client-core/bundle/params';\nexport { serializeQueryKeyValue } from '../../client-core/bundle/queryKeySerializer';\nexport { createClient } from './client';\nexport type {\n  Client,\n  ClientOptions,\n  Config,\n  CreateClientConfig,\n  Options,\n  RequestOptions,\n  RequestResult,\n  ResolvedRequestOptions,\n  ResponseStyle,\n  TDataShape,\n} from './types';\nexport { createConfig, mergeHeaders } from './utils';\n"
  },
  {
    "path": "packages/openapi-ts/src/plugins/@hey-api/client-angular/bundle/types.ts",
    "content": "import type {\n  HttpClient,\n  HttpErrorResponse,\n  HttpHeaders,\n  HttpRequest,\n  HttpResponse,\n} from '@angular/common/http';\nimport type { Injector } from '@angular/core';\n\nimport type { Auth } from '../../client-core/bundle/auth';\nimport type {\n  ServerSentEventsOptions,\n  ServerSentEventsResult,\n} from '../../client-core/bundle/serverSentEvents';\nimport type { Client as CoreClient, Config as CoreConfig } from '../../client-core/bundle/types';\nimport type { Middleware } from './utils';\n\nexport type ResponseStyle = 'data' | 'fields';\n\nexport interface Config<T extends ClientOptions = ClientOptions>\n  extends Omit<RequestInit, 'body' | 'headers' | 'method'>, Omit<CoreConfig, 'headers'> {\n  /**\n   * Base URL for all requests made by this client.\n   */\n  baseUrl?: T['baseUrl'];\n  /**\n   * An object containing any HTTP headers that you want to pre-populate your\n   * `HttpHeaders` object with.\n   *\n   * {@link https://angular.dev/api/common/http/HttpHeaders#constructor See more}\n   */\n  headers?:\n    | HttpHeaders\n    | Record<\n        string,\n        string | number | boolean | (string | number | boolean)[] | null | undefined | unknown\n      >;\n  /**\n   * The HTTP client to use for making requests.\n   */\n  httpClient?: HttpClient;\n  /**\n   * Should we return only data or multiple fields (data, error, response, etc.)?\n   *\n   * @default 'fields'\n   */\n  responseStyle?: ResponseStyle;\n\n  /**\n   * Throw an error instead of returning it in the response?\n   *\n   * @default false\n   */\n  throwOnError?: T['throwOnError'];\n}\n\nexport interface RequestOptions<\n  TData = unknown,\n  TResponseStyle extends ResponseStyle = 'fields',\n  ThrowOnError extends boolean = boolean,\n  Url extends string = string,\n>\n  extends\n    Config<{\n      responseStyle: TResponseStyle;\n      throwOnError: ThrowOnError;\n    }>,\n    Pick<\n      ServerSentEventsOptions<TData>,\n      | 'onRequest'\n      | 'onSseError'\n      | 'onSseEvent'\n      | 'sseDefaultRetryDelay'\n      | 'sseMaxRetryAttempts'\n      | 'sseMaxRetryDelay'\n    > {\n  /**\n   * Any body that you want to add to your request.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/fetch#body}\n   */\n  body?: unknown;\n  /**\n   * Optional custom injector for dependency resolution if you don't implicitly or explicitly provide one.\n   */\n  injector?: Injector;\n  path?: Record<string, unknown>;\n  query?: Record<string, unknown>;\n  /**\n   * Security mechanism(s) to use for the request.\n   */\n  security?: ReadonlyArray<Auth>;\n  url: Url;\n}\n\nexport interface ResolvedRequestOptions<\n  TResponseStyle extends ResponseStyle = 'fields',\n  ThrowOnError extends boolean = boolean,\n  Url extends string = string,\n> extends RequestOptions<unknown, TResponseStyle, ThrowOnError, Url> {\n  serializedBody?: string;\n}\n\nexport type RequestResult<\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = boolean,\n  TResponseStyle extends ResponseStyle = 'fields',\n> = Promise<\n  ThrowOnError extends true\n    ? TResponseStyle extends 'data'\n      ? TData extends Record<string, unknown>\n        ? TData[keyof TData]\n        : TData\n      : {\n          data: TData extends Record<string, unknown> ? TData[keyof TData] : TData;\n          request: HttpRequest<unknown>;\n          response: HttpResponse<TData>;\n        }\n    : TResponseStyle extends 'data'\n      ? (TData extends Record<string, unknown> ? TData[keyof TData] : TData) | undefined\n      :\n          | {\n              data: TData extends Record<string, unknown> ? TData[keyof TData] : TData;\n              error: undefined;\n              request: HttpRequest<unknown>;\n              response: HttpResponse<TData>;\n            }\n          | {\n              data: undefined;\n              error: TError[keyof TError];\n              request: HttpRequest<unknown>;\n              response: HttpErrorResponse & {\n                error: TError[keyof TError] | null;\n              };\n            }\n>;\n\nexport interface ClientOptions {\n  baseUrl?: string;\n  responseStyle?: ResponseStyle;\n  throwOnError?: boolean;\n}\n\ntype MethodFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'>,\n) => RequestResult<TData, TError, ThrowOnError, TResponseStyle>;\n\ntype SseFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'>,\n) => Promise<ServerSentEventsResult<TData, TError>>;\n\ntype RequestFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'> &\n    Pick<Required<RequestOptions<TData, TResponseStyle, ThrowOnError>>, 'method'>,\n) => RequestResult<TData, TError, ThrowOnError, TResponseStyle>;\n\ntype RequestOptionsFn = <\n  T,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: RequestOptions<T, TResponseStyle, ThrowOnError>,\n) => HttpRequest<T>;\n\ntype BuildUrlFn = <\n  TData extends {\n    body?: unknown;\n    path?: Record<string, unknown>;\n    query?: Record<string, unknown>;\n    url: string;\n  },\n>(\n  options: TData & Options<TData>,\n) => string;\n\nexport type Client = CoreClient<RequestFn, Config, MethodFn, BuildUrlFn, SseFn> & {\n  interceptors: Middleware<\n    HttpRequest<unknown>,\n    HttpResponse<unknown>,\n    unknown,\n    ResolvedRequestOptions\n  >;\n  requestOptions: RequestOptionsFn;\n};\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 = ClientOptions> = (\n  override?: Config<ClientOptions & T>,\n) => Config<Required<ClientOptions> & T>;\n\nexport interface TDataShape {\n  body?: unknown;\n  headers?: unknown;\n  path?: unknown;\n  query?: unknown;\n  url: string;\n}\n\ntype OmitKeys<T, K> = Pick<T, Exclude<keyof T, K>>;\n\nexport type Options<\n  TData extends TDataShape = TDataShape,\n  ThrowOnError extends boolean = boolean,\n  TResponse = unknown,\n  TResponseStyle extends ResponseStyle = 'fields',\n> = OmitKeys<\n  RequestOptions<TResponse, TResponseStyle, ThrowOnError>,\n  'body' | 'path' | 'query' | 'url'\n> &\n  ([TData] extends [never] ? unknown : Omit<TData, 'url'>);\n"
  },
  {
    "path": "packages/openapi-ts/src/plugins/@hey-api/client-angular/bundle/utils.ts",
    "content": "import { HttpHeaders } from '@angular/common/http';\n\nimport { getAuthToken } from '../../client-core/bundle/auth';\nimport type {\n  QuerySerializer,\n  QuerySerializerOptions,\n} from '../../client-core/bundle/bodySerializer';\nimport {\n  serializeArrayParam,\n  serializeObjectParam,\n  serializePrimitiveParam,\n} from '../../client-core/bundle/pathSerializer';\nimport type { Client, ClientOptions, Config, RequestOptions } from './types';\n\ninterface PathSerializer {\n  path: Record<string, unknown>;\n  url: string;\n}\n\nconst PATH_PARAM_RE = /\\{[^{}]+\\}/g;\n\ntype ArrayStyle = 'form' | 'spaceDelimited' | 'pipeDelimited';\ntype MatrixStyle = 'label' | 'matrix' | 'simple';\ntype ArraySeparatorStyle = ArrayStyle | MatrixStyle;\n\nconst 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 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 = (\n  contentType: string | null,\n): 'blob' | 'formData' | 'json' | 'stream' | 'text' | undefined => {\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\nexport const setAuthParams = async (\n  options: Pick<Required<RequestOptions>, 'security'> &\n    Pick<RequestOptions, 'auth' | 'query'> & {\n      headers: HttpHeaders;\n    },\n) => {\n  for (const auth of options.security) {\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 = options.headers.append('Cookie', `${name}=${token}`);\n        break;\n      case 'header':\n      default:\n        options.headers = options.headers.set(name, token);\n        break;\n    }\n\n    return;\n  }\n};\n\nexport const buildUrl: Client['buildUrl'] = (options) => {\n  const url = 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  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 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\nexport const mergeHeaders = (\n  ...headers: Array<Required<Config>['headers'] | undefined>\n): HttpHeaders => {\n  let mergedHeaders = new HttpHeaders();\n\n  for (const header of headers) {\n    if (!header || typeof header !== 'object') {\n      continue;\n    }\n\n    if (header instanceof HttpHeaders) {\n      // Merge HttpHeaders instance\n      header.keys().forEach((key) => {\n        const values = header.getAll(key);\n        if (values) {\n          values.forEach((value) => {\n            mergedHeaders = mergedHeaders.append(key, value);\n          });\n        }\n      });\n    } else {\n      // Merge plain object headers\n      for (const [key, value] of Object.entries(header)) {\n        if (value === null) {\n          mergedHeaders = mergedHeaders.delete(key);\n        } else if (Array.isArray(value)) {\n          for (const v of value) {\n            mergedHeaders = 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 = mergedHeaders.set(\n            key,\n            typeof value === 'object' ? JSON.stringify(value) : (value as string),\n          );\n        }\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  headers: defaultHeaders,\n  querySerializer: defaultQuerySerializer,\n  ...override,\n});\n"
  },
  {
    "path": "packages/openapi-ts/src/plugins/@hey-api/client-angular/config.ts",
    "content": "import { definePluginConfig } from '@hey-api/shared';\n\nimport {\n  clientDefaultConfig,\n  clientDefaultMeta,\n} from '../../../plugins/@hey-api/client-core/config';\nimport { clientPluginHandler } from '../../../plugins/@hey-api/client-core/plugin';\nimport type { HeyApiClientAngularPlugin } from './types';\n\nexport const defaultConfig: HeyApiClientAngularPlugin['Config'] = {\n  ...clientDefaultMeta,\n  config: {\n    ...clientDefaultConfig,\n    throwOnError: false,\n  },\n  handler: clientPluginHandler as unknown as HeyApiClientAngularPlugin['Handler'],\n  name: '@hey-api/client-angular',\n};\n\n/**\n * Type helper for `@hey-api/client-angular` plugin, returns {@link Plugin.Config} object\n */\nexport const defineConfig = definePluginConfig(defaultConfig);\n"
  },
  {
    "path": "packages/openapi-ts/src/plugins/@hey-api/client-angular/index.ts",
    "content": "export type { Client as AngularClient } from './bundle/types';\nexport { defaultConfig, defineConfig } from './config';\nexport type { HeyApiClientAngularPlugin } from './types';\n"
  },
  {
    "path": "packages/openapi-ts/src/plugins/@hey-api/client-angular/types.ts",
    "content": "import type { DefinePlugin, Plugin } from '@hey-api/shared';\n\nimport type { Client } from '../../../plugins/@hey-api/client-core/types';\n\nexport type UserConfig = Plugin.Name<'@hey-api/client-angular'> &\n  Client.Config & {\n    /**\n     * Throw an error instead of returning it in the response?\n     *\n     * @default false\n     */\n    throwOnError?: boolean;\n  };\n\nexport type HeyApiClientAngularPlugin = DefinePlugin<UserConfig, UserConfig>;\n"
  },
  {
    "path": "packages/openapi-ts/src/plugins/@hey-api/client-axios/__tests__/client.test.ts",
    "content": "import type { AxiosInstance } from 'axios';\nimport axios from 'axios';\n\nimport { createClient } from '../bundle/client';\n\ndescribe('buildUrl', () => {\n  const client = createClient();\n\n  const scenarios: {\n    options: Parameters<typeof client.buildUrl>[0];\n    url: string;\n  }[] = [\n    {\n      options: {\n        url: '',\n      },\n      url: '/',\n    },\n    {\n      options: {\n        url: '/foo',\n      },\n      url: '/foo',\n    },\n    {\n      options: {\n        path: {\n          fooId: 1,\n        },\n        url: '/foo/{fooId}',\n      },\n      url: '/foo/1',\n    },\n    {\n      options: {\n        path: {\n          fooId: 1,\n        },\n        query: {\n          bar: 'baz',\n        },\n        url: '/foo/{fooId}',\n      },\n      url: '/foo/1?bar=baz',\n    },\n  ];\n\n  it.each(scenarios)('returns $url', ({ options, url }) => {\n    expect(client.buildUrl(options)).toBe(url);\n  });\n\n  it('uses baseURL from client config by default', () => {\n    const clientWithBase = createClient({ baseURL: 'https://example.com' });\n    expect(clientWithBase.buildUrl({ url: '/foo' })).toBe('https://example.com/foo');\n  });\n\n  it('allows overriding baseURL from client config', () => {\n    const clientWithBase = createClient({ baseURL: 'https://example.com' });\n    expect(clientWithBase.buildUrl({ baseURL: 'https://other.com', url: '/foo' })).toBe(\n      'https://other.com/foo',\n    );\n  });\n});\n\ndescribe('AxiosInstance', () => {\n  it('should create an AxiosInstance if no axios option passed', () => {\n    const client = createClient({ baseURL: 'test-url' });\n\n    expect(client.instance).toBeDefined();\n    expect(client.instance.defaults).toBeDefined();\n    expect(client.instance.defaults.baseURL).toBe('test-url');\n  });\n\n  it('should use the provided AxiosStatic if axios option passed', () => {\n    axios.defaults.baseURL = 'test-url';\n\n    const client = createClient({ axios });\n\n    expect(client.instance).toBeDefined();\n    expect(client.instance.defaults).toBeDefined();\n    expect(client.instance.defaults.baseURL).toBe('test-url');\n  });\n\n  it('should use the provided AxiosInstance if axios option is passed', () => {\n    const axiosInstance = axios.create({ baseURL: 'test-url' });\n\n    axiosInstance.interceptors.request.use((config) => config);\n\n    const client = createClient({ axios: axiosInstance });\n\n    expect(client.instance).toBe(axiosInstance);\n    expect(client.instance.defaults.baseURL).toBe('test-url');\n    expect((client.instance.interceptors.request as any).handlers.length).toBe(1);\n  });\n});\n\ndescribe('unserialized request body handling', () => {\n  const client = createClient({ baseURL: 'https://example.com' });\n\n  const scenarios = [{ body: 0 }, { body: false }, { body: 'test string' }, { body: '' }];\n\n  it.each(scenarios)('handles plain text body with $body value', async ({ body }) => {\n    const mockAxios = vi.fn();\n\n    await client.post({\n      axios: mockAxios as Partial<AxiosInstance> as AxiosInstance,\n      body,\n      bodySerializer: null,\n      headers: {\n        'Content-Type': 'text/plain',\n      },\n      url: '/test',\n    });\n\n    expect(mockAxios).toHaveBeenCalledWith(\n      expect.objectContaining({\n        data: body,\n      }),\n    );\n  });\n});\n\ndescribe('serialized request body handling', () => {\n  const client = createClient({ baseURL: 'https://example.com' });\n\n  const scenarios = [\n    {\n      body: '',\n      expectBodyValue: false,\n      serializedBody: '',\n    },\n    {\n      body: 0,\n      expectBodyValue: true,\n      serializedBody: 0,\n    },\n    {\n      body: false,\n      expectBodyValue: true,\n      serializedBody: false,\n    },\n    {\n      body: {},\n      expectBodyValue: true,\n      serializedBody: '{\"key\":\"value\"}',\n    },\n  ];\n\n  it.each(scenarios)(\n    'handles $serializedBody serializedBody value',\n    async ({ body, expectBodyValue, serializedBody }) => {\n      const mockAxios = vi.fn();\n\n      await client.post({\n        axios: mockAxios as Partial<AxiosInstance> as AxiosInstance,\n        body,\n        bodySerializer: () => serializedBody,\n        headers: {\n          'Content-Type': 'application/json',\n        },\n        url: '/test',\n      });\n\n      expect(mockAxios).toHaveBeenCalledWith(\n        expect.objectContaining({\n          data: expectBodyValue ? serializedBody : null,\n        }),\n      );\n    },\n  );\n});\n\ndescribe('calling axios instance', () => {\n  it.each([\n    {\n      description: 'with absolute baseURL',\n      expectedURL: 'https://api.example.com/users',\n      instanceBaseURL: 'https://api.example.com',\n      optionsURL: '/users',\n    },\n    {\n      description: 'without baseURL',\n      expectedURL: '/users',\n      instanceBaseURL: undefined,\n      optionsURL: '/users',\n    },\n    {\n      description: 'with relative baseURL',\n      expectedURL: '/some-base-url/users',\n      instanceBaseURL: '/some-base-url',\n      optionsURL: '/users',\n    },\n  ])(\n    'should call the axios instance with correct baseURL and url $description configured via createClient',\n    async ({ expectedURL, instanceBaseURL, optionsURL }) => {\n      const client = createClient({ baseURL: instanceBaseURL });\n      const mockAxios = vi.fn().mockResolvedValue({ data: { ok: true } });\n\n      const options = {\n        axios: mockAxios as Partial<AxiosInstance> as AxiosInstance,\n        headers: {},\n        url: optionsURL,\n      };\n\n      await client.get(options);\n\n      expect(mockAxios).toHaveBeenCalledWith(\n        expect.objectContaining({\n          baseURL: '',\n          url: expectedURL,\n        }),\n      );\n    },\n  );\n\n  it.each([\n    {\n      description: 'with absolute baseURL',\n      expectedURL: 'https://api.example.com/some-base-url/users',\n      optionsBaseURL: 'https://api.example.com/some-base-url',\n      optionsURL: '/users',\n    },\n    {\n      description: 'with relative baseURL',\n      expectedURL: '/some-base-url/users',\n      optionsBaseURL: '/some-base-url',\n      optionsURL: '/users',\n    },\n  ])(\n    'should call the axios instance with correct url $description configured via request options',\n    async ({ expectedURL, optionsBaseURL, optionsURL }) => {\n      const client = createClient({\n        baseURL: 'base-url-that-will-be-overridden',\n      });\n\n      const mockAxios = vi.fn().mockResolvedValue({ data: { ok: true } });\n\n      const options = {\n        axios: mockAxios as Partial<AxiosInstance> as AxiosInstance,\n        baseURL: optionsBaseURL,\n        headers: {},\n        url: optionsURL,\n      };\n\n      await client.get(options);\n\n      expect(mockAxios).toHaveBeenCalledWith(\n        expect.objectContaining({\n          baseURL: '',\n          url: expectedURL,\n        }),\n      );\n    },\n  );\n\n  it('should call the axios instance with correct url when baseURL configured via axios defaults', async () => {\n    const client = createClient();\n\n    const mockAxios = vi.fn().mockResolvedValue({\n      data: { ok: true },\n    }) as Partial<AxiosInstance> as AxiosInstance;\n    mockAxios.defaults = { baseURL: '/some-base-url', headers: {} as any };\n\n    const options = {\n      axios: mockAxios,\n      headers: {},\n      url: '/users',\n    };\n\n    await client.get(options);\n\n    expect(mockAxios).toHaveBeenCalledWith(\n      expect.objectContaining({\n        baseURL: '',\n        url: '/some-base-url/users',\n      }),\n    );\n  });\n\n  it('should prefer passed baseUrl over configs', async () => {\n    const client = createClient({ baseURL: 'base-url-from-config-1' });\n\n    const mockAxios = vi.fn().mockResolvedValue({\n      data: { ok: true },\n    }) as Partial<AxiosInstance> as AxiosInstance;\n    mockAxios.defaults = {\n      baseURL: 'base-url-from-config-2',\n      headers: {} as any,\n    };\n\n    const options = {\n      axios: mockAxios,\n      baseURL: '/some-base-url',\n      headers: {},\n      url: '/users',\n    };\n\n    await client.get(options);\n\n    expect(mockAxios).toHaveBeenCalledWith(\n      expect.objectContaining({\n        baseURL: '',\n        url: '/some-base-url/users',\n      }),\n    );\n  });\n});\n\n// TODO: remove this after confirmation\ndescribe('confirming axios behaviour for constructing URLs', () => {\n  it('resolves relative URLs against baseURL', async () => {\n    const client = axios.create({\n      baseURL: 'https://api.example.com',\n    });\n\n    const config = client.getUri({ url: '/users' });\n    expect(config).toBe('https://api.example.com/users');\n  });\n\n  it('resolves relative URLs against relative baseURL', async () => {\n    const client = axios.create({\n      baseURL: '/example',\n    });\n\n    const config = client.getUri({ url: '/users' });\n    expect(config).toBe('/example/users');\n  });\n\n  it('does not prepend baseURL when url is absolute', async () => {\n    const client = axios.create({\n      baseURL: 'https://api.example.com',\n    });\n\n    const config = client.getUri({ url: 'https://other.com/users' });\n    expect(config).toBe('https://other.com/users');\n  });\n\n  it('does not prepend baseURL when overriding baseURL with empty string', async () => {\n    const client = axios.create({\n      baseURL: 'https://api.example.com',\n    });\n\n    const config = client.getUri({ baseURL: '', url: '/users' });\n    expect(config).toBe('/users');\n  });\n\n  it('does prepend baseURL when overriding baseURL with undefined', async () => {\n    const client = axios.create({\n      baseURL: 'https://api.example.com',\n    });\n\n    const config = client.getUri({ baseURL: undefined, url: '/users' });\n    expect(config).toBe('https://api.example.com/users');\n  });\n});\n"
  },
  {
    "path": "packages/openapi-ts/src/plugins/@hey-api/client-axios/__tests__/utils-buildUrl.test.ts",
    "content": "import type { QuerySerializer } from '../../client-core/bundle/bodySerializer';\n\ndescribe('buildUrl', () => {\n  afterEach(() => {\n    vi.resetAllMocks();\n    vi.resetModules();\n  });\n\n  it.each([\n    {\n      description: 'with query params',\n      expectedUrl: '/some-url?param1=some-query-param',\n      inputOptions: {\n        baseUrl: 'some-base-url',\n        path: { param1: 'some-path-param' },\n        query: { param1: 'some-query-param' },\n        querySerializer: (() => 'param1=some-query-param') as QuerySerializer,\n        url: '/some-url',\n      },\n    },\n    {\n      description: 'without query params',\n      expectedUrl: '/some-url',\n      inputOptions: {\n        baseURL: 'some-base-url',\n        path: { param1: 'some-path-param' },\n        query: undefined,\n        querySerializer: (() => '') as QuerySerializer,\n        url: '/some-url',\n      },\n    },\n  ])('passes correct parameters to getUrl $description', async ({ expectedUrl, inputOptions }) => {\n    const getUrlMock = vi.fn().mockReturnValue(expectedUrl);\n    vi.doMock('../../client-core/bundle/utils', async () => ({\n      getUrl: getUrlMock,\n    }));\n\n    const { buildUrl } = await import('../bundle/utils');\n\n    const builtUrl = buildUrl(inputOptions);\n\n    expect(builtUrl).toBe(expectedUrl);\n\n    expect(getUrlMock).toHaveBeenCalledExactlyOnceWith({\n      baseUrl: inputOptions.baseURL,\n      path: inputOptions.path,\n      query: inputOptions.query,\n      querySerializer: inputOptions.querySerializer,\n      url: inputOptions.url,\n    });\n  });\n});\n"
  },
  {
    "path": "packages/openapi-ts/src/plugins/@hey-api/client-axios/__tests__/utils.test.ts",
    "content": "import type { Auth } from '../../client-core/bundle/auth';\nimport { axiosHeadersKeywords, mergeHeaders, setAuthParams } from '../bundle/utils';\n\ndescribe('mergeHeaders', () => {\n  it.each(axiosHeadersKeywords)('handles \"%s\" Axios special keyword', (keyword) => {\n    const headers = mergeHeaders(\n      {\n        foo: 'foo',\n      },\n      {\n        [keyword]: {\n          foo: 'foo',\n        },\n      },\n    );\n    expect(headers).toEqual({\n      foo: 'foo',\n      [keyword]: {\n        foo: 'foo',\n      },\n    });\n  });\n});\n\ndescribe('setAuthParams', () => {\n  it('sets bearer token in headers', async () => {\n    const auth = vi.fn().mockReturnValue('foo');\n    const headers: Record<any, unknown> = {};\n    const query: Record<any, unknown> = {};\n    await setAuthParams({\n      auth,\n      headers,\n      query,\n      security: [\n        {\n          name: 'baz',\n          scheme: 'bearer',\n          type: 'http',\n        },\n      ],\n    });\n    expect(auth).toHaveBeenCalled();\n    expect(headers.baz).toBe('Bearer foo');\n    expect(Object.keys(query).length).toBe(0);\n  });\n\n  it('sets access token in query', async () => {\n    const auth = vi.fn().mockReturnValue('foo');\n    const headers: Record<any, unknown> = {};\n    const query: Record<any, unknown> = {};\n    await setAuthParams({\n      auth,\n      headers,\n      query,\n      security: [\n        {\n          in: 'query',\n          name: 'baz',\n          scheme: 'bearer',\n          type: 'http',\n        },\n      ],\n    });\n    expect(auth).toHaveBeenCalled();\n    expect(headers.baz).toBeUndefined();\n    expect(query.baz).toBe('Bearer foo');\n  });\n\n  it('sets Authorization header when `in` and `name` are undefined', async () => {\n    const auth = vi.fn().mockReturnValue('foo');\n    const headers: Record<any, unknown> = {};\n    const query: Record<any, unknown> = {};\n    await setAuthParams({\n      auth,\n      headers,\n      query,\n      security: [\n        {\n          type: 'http',\n        },\n      ],\n    });\n    expect(auth).toHaveBeenCalled();\n    expect(headers.Authorization).toBe('foo');\n    expect(query).toEqual({});\n  });\n\n  it('sets an API key in a cookie', async () => {\n    const auth = vi.fn().mockReturnValue('foo');\n    const headers: Record<any, unknown> = {};\n    const query: Record<any, unknown> = {};\n    await setAuthParams({\n      auth,\n      headers,\n      query,\n      security: [\n        {\n          in: 'cookie',\n          name: 'baz',\n          type: 'apiKey',\n        },\n      ],\n    });\n    expect(auth).toHaveBeenCalled();\n    expect(headers.Cookie).toBe('baz=foo');\n    expect(query).toEqual({});\n  });\n\n  it('sets first scheme only', async () => {\n    const auth = vi.fn().mockReturnValue('foo');\n    const headers: Record<any, unknown> = {};\n    const query: Record<any, unknown> = {};\n    await setAuthParams({\n      auth,\n      headers,\n      query,\n      security: [\n        {\n          name: 'baz',\n          scheme: 'bearer',\n          type: 'http',\n        },\n        {\n          in: 'query',\n          name: 'baz',\n          scheme: 'bearer',\n          type: 'http',\n        },\n      ],\n    });\n    expect(auth).toHaveBeenCalled();\n    expect(headers.baz).toBe('Bearer foo');\n    expect(Object.keys(query).length).toBe(0);\n  });\n\n  it('sets first scheme with token', async () => {\n    const auth = vi.fn().mockImplementation((auth: Auth) => {\n      if (auth.type === 'apiKey') {\n        return;\n      }\n      return 'foo';\n    });\n    const headers: Record<any, unknown> = {};\n    const query: Record<any, unknown> = {};\n    await setAuthParams({\n      auth,\n      headers,\n      query,\n      security: [\n        {\n          name: 'baz',\n          type: 'apiKey',\n        },\n        {\n          in: 'query',\n          name: 'baz',\n          scheme: 'bearer',\n          type: 'http',\n        },\n      ],\n    });\n    expect(auth).toHaveBeenCalled();\n    expect(headers.baz).toBeUndefined();\n    expect(query.baz).toBe('Bearer foo');\n  });\n\n  it('sets only one specific header', async () => {\n    const auth = vi.fn(({ name }: Auth) => {\n      if (name === 'baz') {\n        return 'foo';\n      }\n      return 'buz';\n    });\n    const headers: Record<any, unknown> = {};\n    const query: Record<any, unknown> = {};\n    await setAuthParams({\n      auth,\n      headers,\n      query,\n      security: [\n        {\n          name: 'baz',\n          scheme: 'bearer',\n          type: 'http',\n        },\n        {\n          name: 'fiz',\n          type: 'http',\n        },\n        {\n          in: 'query',\n          name: 'baz',\n          scheme: 'bearer',\n          type: 'http',\n        },\n      ],\n    });\n    expect(auth).toHaveBeenCalled();\n    expect(headers['baz']).toBe('Bearer foo');\n    expect(headers['fiz']).toBe('buz');\n    expect(Object.keys(query).length).toBe(0);\n  });\n});\n"
  },
  {
    "path": "packages/openapi-ts/src/plugins/@hey-api/client-axios/bundle/client.ts",
    "content": "import type { AxiosError, AxiosInstance, RawAxiosRequestHeaders } from 'axios';\nimport axios from 'axios';\n\nimport { createSseClient } from '../../client-core/bundle/serverSentEvents';\nimport type { HttpMethod } from '../../client-core/bundle/types';\nimport { getValidRequestBody } from '../../client-core/bundle/utils';\nimport type { Client, Config, RequestOptions } from './types';\nimport { buildUrl, createConfig, mergeConfigs, mergeHeaders, setAuthParams } from './utils';\n\nexport const createClient = (config: Config = {}): Client => {\n  let _config = mergeConfigs(createConfig(), config);\n\n  let instance: AxiosInstance;\n\n  if (_config.axios && !('Axios' in _config.axios)) {\n    instance = _config.axios;\n  } else {\n    // eslint-disable-next-line @typescript-eslint/no-unused-vars\n    const { auth, ...configWithoutAuth } = _config;\n    instance = axios.create(configWithoutAuth);\n  }\n\n  const getConfig = (): Config => ({ ..._config });\n\n  const setConfig = (config: Config): Config => {\n    _config = mergeConfigs(_config, config);\n    instance.defaults = {\n      ...instance.defaults,\n      ..._config,\n      // @ts-expect-error\n      headers: mergeHeaders(instance.defaults.headers, _config.headers),\n    };\n    return getConfig();\n  };\n\n  const beforeRequest = async (options: RequestOptions) => {\n    const opts = {\n      ..._config,\n      ...options,\n      axios: options.axios ?? _config.axios ?? instance,\n      headers: mergeHeaders(_config.headers, options.headers),\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.body = opts.bodySerializer(opts.body);\n    }\n\n    const url = buildUrl(opts);\n\n    return { opts, url };\n  };\n\n  // @ts-expect-error\n  const request: Client['request'] = async (options) => {\n    // @ts-expect-error\n    const { opts, url } = await beforeRequest(options);\n    try {\n      // assign Axios here for consistency with fetch\n      const _axios = opts.axios!;\n      // eslint-disable-next-line @typescript-eslint/no-unused-vars\n      const { auth, ...optsWithoutAuth } = opts;\n      const response = await _axios({\n        ...optsWithoutAuth,\n        baseURL: '', // the baseURL is already included in `url`\n        data: getValidRequestBody(opts),\n        headers: opts.headers as RawAxiosRequestHeaders,\n        // let `paramsSerializer()` handle query params if it exists\n        params: opts.paramsSerializer ? opts.query : undefined,\n        url,\n      });\n\n      let { data } = response;\n\n      if (opts.responseType === '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 {\n        ...response,\n        data: data ?? {},\n      };\n    } catch (error) {\n      const e = error as AxiosError;\n      if (opts.throwOnError) {\n        throw e;\n      }\n      // @ts-expect-error\n      e.error = e.response?.data ?? {};\n      return e;\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 Record<string, string>,\n      method,\n      serializedBody: getValidRequestBody(opts) as BodyInit | null | undefined,\n      // @ts-expect-error\n      signal: opts.signal,\n      url,\n    });\n  };\n\n  const _buildUrl: Client['buildUrl'] = (options) =>\n    buildUrl({ axios: instance, ..._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    instance,\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"
  },
  {
    "path": "packages/openapi-ts/src/plugins/@hey-api/client-axios/bundle/index.ts",
    "content": "export type { Auth } from '../../client-core/bundle/auth';\nexport type { QuerySerializerOptions } from '../../client-core/bundle/bodySerializer';\nexport {\n  formDataBodySerializer,\n  jsonBodySerializer,\n  urlSearchParamsBodySerializer,\n} from '../../client-core/bundle/bodySerializer';\nexport { buildClientParams } from '../../client-core/bundle/params';\nexport { serializeQueryKeyValue } from '../../client-core/bundle/queryKeySerializer';\nexport { createClient } from './client';\nexport type {\n  Client,\n  ClientOptions,\n  Config,\n  CreateClientConfig,\n  Options,\n  RequestOptions,\n  RequestResult,\n  TDataShape,\n} from './types';\nexport { createConfig } from './utils';\n"
  },
  {
    "path": "packages/openapi-ts/src/plugins/@hey-api/client-axios/bundle/types.ts",
    "content": "import type {\n  AxiosError,\n  AxiosInstance,\n  AxiosRequestHeaders,\n  AxiosResponse,\n  AxiosStatic,\n  CreateAxiosDefaults,\n} from 'axios';\n\nimport type { Auth } from '../../client-core/bundle/auth';\nimport type {\n  ServerSentEventsOptions,\n  ServerSentEventsResult,\n} from '../../client-core/bundle/serverSentEvents';\nimport type { Client as CoreClient, Config as CoreConfig } from '../../client-core/bundle/types';\n\nexport interface Config<T extends ClientOptions = ClientOptions>\n  extends Omit<CreateAxiosDefaults, 'auth' | 'baseURL' | 'headers' | 'method'>, CoreConfig {\n  /**\n   * Axios implementation. You can use this option to provide either an\n   * `AxiosStatic` or an `AxiosInstance`.\n   *\n   * @default axios\n   */\n  axios?: AxiosStatic | AxiosInstance;\n  /**\n   * Base URL for all requests made by this client.\n   */\n  baseURL?: T['baseURL'];\n  /**\n   * An object containing any HTTP headers that you want to pre-populate your\n   * `Headers` object with.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/Headers/Headers#init See more}\n   */\n  headers?:\n    | AxiosRequestHeaders\n    | Record<\n        string,\n        string | number | boolean | (string | number | boolean)[] | null | undefined | unknown\n      >;\n  /**\n   * Throw an error instead of returning it in the response?\n   *\n   * @default false\n   */\n  throwOnError?: T['throwOnError'];\n}\n\nexport interface RequestOptions<\n  TData = unknown,\n  ThrowOnError extends boolean = boolean,\n  Url extends string = string,\n>\n  extends\n    Config<{\n      throwOnError: ThrowOnError;\n    }>,\n    Pick<\n      ServerSentEventsOptions<TData>,\n      | 'onRequest'\n      | 'onSseError'\n      | 'onSseEvent'\n      | 'sseDefaultRetryDelay'\n      | 'sseMaxRetryAttempts'\n      | 'sseMaxRetryDelay'\n    > {\n  /**\n   * Any body that you want to add to your request.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/fetch#body}\n   */\n  body?: unknown;\n  path?: Record<string, unknown>;\n  query?: Record<string, unknown>;\n  /**\n   * Security mechanism(s) to use for the request.\n   */\n  security?: ReadonlyArray<Auth>;\n  url: Url;\n}\n\nexport interface ClientOptions {\n  baseURL?: string;\n  throwOnError?: boolean;\n}\n\nexport type RequestResult<\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = boolean,\n> = ThrowOnError extends true\n  ? Promise<AxiosResponse<TData extends Record<string, unknown> ? TData[keyof TData] : TData>>\n  : Promise<\n      | (AxiosResponse<TData extends Record<string, unknown> ? TData[keyof TData] : TData> & {\n          error: undefined;\n        })\n      | (AxiosError<TError extends Record<string, unknown> ? TError[keyof TError] : TError> & {\n          data: undefined;\n          error: TError extends Record<string, unknown> ? TError[keyof TError] : TError;\n        })\n    >;\n\ntype MethodFn = <TData = unknown, TError = unknown, ThrowOnError extends boolean = false>(\n  options: Omit<RequestOptions<TData, ThrowOnError>, 'method'>,\n) => RequestResult<TData, TError, ThrowOnError>;\n\ntype SseFn = <TData = unknown, TError = unknown, ThrowOnError extends boolean = false>(\n  options: Omit<RequestOptions<TData, ThrowOnError>, 'method'>,\n) => Promise<ServerSentEventsResult<TData, TError>>;\n\ntype RequestFn = <TData = unknown, TError = unknown, ThrowOnError extends boolean = false>(\n  options: Omit<RequestOptions<TData, ThrowOnError>, 'method'> &\n    Pick<Required<RequestOptions<TData, ThrowOnError>>, 'method'>,\n) => RequestResult<TData, TError, ThrowOnError>;\n\ntype BuildUrlFn = <\n  TData extends {\n    body?: unknown;\n    path?: Record<string, unknown>;\n    query?: Record<string, unknown>;\n    url: string;\n  },\n>(\n  options: TData & Options<TData>,\n) => string;\n\nexport type Client = CoreClient<RequestFn, Config, MethodFn, BuildUrlFn, SseFn> & {\n  instance: AxiosInstance;\n};\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 = ClientOptions> = (\n  override?: Config<ClientOptions & T>,\n) => Config<Required<ClientOptions> & T>;\n\nexport interface TDataShape {\n  body?: unknown;\n  headers?: unknown;\n  path?: unknown;\n  query?: unknown;\n  url: string;\n}\n\ntype OmitKeys<T, K> = Pick<T, Exclude<keyof T, K>>;\n\nexport type Options<\n  TData extends TDataShape = TDataShape,\n  ThrowOnError extends boolean = boolean,\n  TResponse = unknown,\n> = OmitKeys<RequestOptions<TResponse, ThrowOnError>, 'body' | 'path' | 'query' | 'url'> &\n  ([TData] extends [never] ? unknown : Omit<TData, 'url'>);\n"
  },
  {
    "path": "packages/openapi-ts/src/plugins/@hey-api/client-axios/bundle/utils.ts",
    "content": "import { getAuthToken } from '../../client-core/bundle/auth';\nimport type { QuerySerializerOptions } from '../../client-core/bundle/bodySerializer';\nimport {\n  serializeArrayParam,\n  serializeObjectParam,\n  serializePrimitiveParam,\n} from '../../client-core/bundle/pathSerializer';\nimport { getUrl } from '../../client-core/bundle/utils';\nimport type { Client, ClientOptions, Config, RequestOptions } from './types';\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\nconst checkForExistence = (\n  options: Pick<RequestOptions, 'auth' | 'query'> & {\n    headers: Record<any, unknown>;\n  },\n  name?: string,\n): boolean => {\n  if (!name) {\n    return false;\n  }\n  if (name in options.headers || options.query?.[name]) {\n    return true;\n  }\n  if (\n    'Cookie' in options.headers &&\n    options.headers['Cookie'] &&\n    typeof options.headers['Cookie'] === 'string'\n  ) {\n    return options.headers['Cookie'].includes(`${name}=`);\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: Record<any, unknown>;\n  }) => {\n  for (const auth of security) {\n    if (checkForExistence(options, auth.name)) {\n      continue;\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        const value = `${name}=${token}`;\n        if ('Cookie' in options.headers && options.headers['Cookie']) {\n          options.headers['Cookie'] = `${options.headers['Cookie']}; ${value}`;\n        } else {\n          options.headers['Cookie'] = value;\n        }\n        break;\n      }\n      case 'header':\n      default:\n        options.headers[name] = token;\n        break;\n    }\n  }\n};\n\nexport const buildUrl: Client['buildUrl'] = (options) => {\n  const instanceBaseUrl = options.axios?.defaults?.baseURL;\n\n  const baseUrl =\n    !!options.baseURL && typeof options.baseURL === 'string' ? options.baseURL : instanceBaseUrl;\n\n  return getUrl({\n    baseUrl: baseUrl as string,\n    path: options.path,\n    // let `paramsSerializer()` handle query params if it exists\n    query: !options.paramsSerializer ? options.query : undefined,\n    querySerializer:\n      typeof options.querySerializer === 'function'\n        ? options.querySerializer\n        : createQuerySerializer(options.querySerializer),\n    url: options.url,\n  });\n};\n\nexport const mergeConfigs = (a: Config, b: Config): Config => {\n  const config = { ...a, ...b };\n  config.headers = mergeHeaders(a.headers, b.headers);\n  return config;\n};\n\n/**\n * Special Axios headers keywords allowing to set headers by request method.\n */\nexport const axiosHeadersKeywords = [\n  'common',\n  'delete',\n  'get',\n  'head',\n  'patch',\n  'post',\n  'put',\n] as const;\n\nexport const mergeHeaders = (\n  ...headers: Array<Required<Config>['headers'] | undefined>\n): Record<any, unknown> => {\n  const mergedHeaders: Record<any, unknown> = {};\n  for (const header of headers) {\n    if (!header || typeof header !== 'object') {\n      continue;\n    }\n\n    const iterator = Object.entries(header);\n\n    for (const [key, value] of iterator) {\n      if (\n        axiosHeadersKeywords.includes(key as (typeof axiosHeadersKeywords)[number]) &&\n        typeof value === 'object'\n      ) {\n        mergedHeaders[key] = {\n          ...(mergedHeaders[key] as Record<any, unknown>),\n          ...value,\n        };\n      } else if (value === null) {\n        delete mergedHeaders[key];\n      } else if (Array.isArray(value)) {\n        for (const v of value) {\n          // @ts-expect-error\n          mergedHeaders[key] = [...(mergedHeaders[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[key] = typeof value === 'object' ? JSON.stringify(value) : (value as string);\n      }\n    }\n  }\n  return mergedHeaders;\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  ...override,\n});\n"
  },
  {
    "path": "packages/openapi-ts/src/plugins/@hey-api/client-axios/config.ts",
    "content": "import { definePluginConfig } from '@hey-api/shared';\n\nimport {\n  clientDefaultConfig,\n  clientDefaultMeta,\n} from '../../../plugins/@hey-api/client-core/config';\nimport { clientPluginHandler } from '../../../plugins/@hey-api/client-core/plugin';\nimport type { HeyApiClientAxiosPlugin } from './types';\n\nexport const defaultConfig: HeyApiClientAxiosPlugin['Config'] = {\n  ...clientDefaultMeta,\n  config: {\n    ...clientDefaultConfig,\n    throwOnError: false,\n  },\n  handler: clientPluginHandler as unknown as HeyApiClientAxiosPlugin['Handler'],\n  name: '@hey-api/client-axios',\n};\n\n/**\n * Type helper for `@hey-api/client-axios` plugin, returns {@link Plugin.Config} object\n */\nexport const defineConfig = definePluginConfig(defaultConfig);\n"
  },
  {
    "path": "packages/openapi-ts/src/plugins/@hey-api/client-axios/index.ts",
    "content": "export type { Client as AxiosClient } from './bundle/types';\nexport { defaultConfig, defineConfig } from './config';\nexport type { HeyApiClientAxiosPlugin } from './types';\n"
  },
  {
    "path": "packages/openapi-ts/src/plugins/@hey-api/client-axios/types.ts",
    "content": "import type { DefinePlugin, Plugin } from '@hey-api/shared';\n\nimport type { Client } from '../../../plugins/@hey-api/client-core/types';\n\nexport type UserConfig = Plugin.Name<'@hey-api/client-axios'> &\n  Client.Config & {\n    /**\n     * Throw an error instead of returning it in the response?\n     *\n     * @default false\n     */\n    throwOnError?: boolean;\n  };\n\nexport type HeyApiClientAxiosPlugin = DefinePlugin<UserConfig, UserConfig>;\n"
  },
  {
    "path": "packages/openapi-ts/src/plugins/@hey-api/client-core/__tests__/auth.test.ts",
    "content": "import { getAuthToken } from '../bundle/auth';\n\ndescribe('getAuthToken', () => {\n  it('returns bearer token', async () => {\n    const auth = vi.fn().mockReturnValue('foo');\n    const token = await getAuthToken(\n      {\n        scheme: 'bearer',\n        type: 'http',\n      },\n      auth,\n    );\n    expect(auth).toHaveBeenCalled();\n    expect(token).toBe('Bearer foo');\n  });\n\n  it('returns basic token', async () => {\n    const auth = vi.fn().mockReturnValue('foo:bar');\n    const token = await getAuthToken(\n      {\n        scheme: 'basic',\n        type: 'http',\n      },\n      auth,\n    );\n    expect(auth).toHaveBeenCalled();\n    expect(token).toBe(`Basic ${btoa('foo:bar')}`);\n  });\n\n  it('returns raw token', async () => {\n    const auth = vi.fn().mockReturnValue('foo');\n    const token = await getAuthToken(\n      {\n        type: 'http',\n      },\n      auth,\n    );\n    expect(auth).toHaveBeenCalled();\n    expect(token).toBe('foo');\n  });\n\n  it('returns nothing when auth function is undefined', async () => {\n    const token = await getAuthToken(\n      {\n        type: 'http',\n      },\n      undefined,\n    );\n    expect(token).toBeUndefined();\n  });\n});\n"
  },
  {
    "path": "packages/openapi-ts/src/plugins/@hey-api/client-core/__tests__/bodySerializer.test.ts",
    "content": "import { formDataBodySerializer } from '../bundle/bodySerializer';\n\ndescribe('formDataBodySerializer', () => {\n  it('serializes number', () => {\n    const body = { a: 1 };\n    const formData = formDataBodySerializer.bodySerializer(body);\n    expect(formData.get('a')).toBe('1');\n  });\n\n  it('serializes string', () => {\n    const body = { a: 'foo' };\n    const formData = formDataBodySerializer.bodySerializer(body);\n    expect(formData.get('a')).toBe('foo');\n  });\n\n  it('serializes date', () => {\n    const body = { a: new Date('2025-01-01T00:00:00.000Z') };\n    const formData = formDataBodySerializer.bodySerializer(body);\n    expect(formData.get('a')).toBe('2025-01-01T00:00:00.000Z');\n  });\n});\n"
  },
  {
    "path": "packages/openapi-ts/src/plugins/@hey-api/client-core/__tests__/params.test.ts",
    "content": "import type { FieldsConfig } from '../bundle/params';\nimport { buildClientParams } from '../bundle/params';\n\ndescribe('buildClientParams', () => {\n  const scenarios: ReadonlyArray<{\n    args: ReadonlyArray<unknown>;\n    config: FieldsConfig;\n    description: string;\n    params: Record<string, unknown>;\n  }> = [\n    {\n      args: [1, 2, 3, 4],\n      config: [\n        {\n          in: 'path',\n          key: 'foo',\n        },\n        {\n          in: 'query',\n          key: 'bar',\n        },\n        {\n          in: 'headers',\n          key: 'baz',\n        },\n        {\n          in: 'body',\n          key: 'qux',\n        },\n      ],\n      description: 'positional arguments',\n      params: {\n        body: {\n          qux: 4,\n        },\n        headers: {\n          baz: 3,\n        },\n        path: {\n          foo: 1,\n        },\n        query: {\n          bar: 2,\n        },\n      },\n    },\n    {\n      args: [\n        {\n          bar: 2,\n          baz: 3,\n          foo: 1,\n          qux: 4,\n        },\n      ],\n      config: [\n        {\n          args: [\n            {\n              in: 'path',\n              key: 'foo',\n            },\n            {\n              in: 'query',\n              key: 'bar',\n            },\n            {\n              in: 'headers',\n              key: 'baz',\n            },\n            {\n              in: 'body',\n              key: 'qux',\n            },\n          ],\n        },\n      ],\n      description: 'flat arguments',\n      params: {\n        body: {\n          qux: 4,\n        },\n        headers: {\n          baz: 3,\n        },\n        path: {\n          foo: 1,\n        },\n        query: {\n          bar: 2,\n        },\n      },\n    },\n    {\n      args: [\n        1,\n        2,\n        {\n          baz: 3,\n          qux: 4,\n        },\n      ],\n      config: [\n        {\n          in: 'path',\n          key: 'foo',\n        },\n        {\n          in: 'query',\n          key: 'bar',\n        },\n        {\n          args: [\n            {\n              in: 'headers',\n              key: 'baz',\n            },\n            {\n              in: 'body',\n              key: 'qux',\n            },\n          ],\n        },\n      ],\n      description: 'mixed arguments',\n      params: {\n        body: {\n          qux: 4,\n        },\n        headers: {\n          baz: 3,\n        },\n        path: {\n          foo: 1,\n        },\n        query: {\n          bar: 2,\n        },\n      },\n    },\n    {\n      args: [1, 2, 3, 4],\n      config: [\n        {\n          in: 'path',\n          key: 'foo',\n          map: 'f_o_o',\n        },\n        {\n          in: 'query',\n          key: 'bar',\n          map: 'b_a_r',\n        },\n        {\n          in: 'headers',\n          key: 'baz',\n          map: 'b_a_z',\n        },\n        {\n          in: 'body',\n          key: 'qux',\n          map: 'q_u_x',\n        },\n      ],\n      description: 'positional mapped arguments',\n      params: {\n        body: {\n          q_u_x: 4,\n        },\n        headers: {\n          b_a_z: 3,\n        },\n        path: {\n          f_o_o: 1,\n        },\n        query: {\n          b_a_r: 2,\n        },\n      },\n    },\n    {\n      args: [\n        {\n          bar: 2,\n          baz: 3,\n          foo: 1,\n          qux: 4,\n        },\n      ],\n      config: [\n        {\n          args: [\n            {\n              in: 'path',\n              key: 'foo',\n              map: 'f_o_o',\n            },\n            {\n              in: 'query',\n              key: 'bar',\n              map: 'b_a_r',\n            },\n            {\n              in: 'headers',\n              key: 'baz',\n              map: 'b_a_z',\n            },\n            {\n              in: 'body',\n              key: 'qux',\n              map: 'q_u_x',\n            },\n          ],\n        },\n      ],\n      description: 'flat mapped arguments',\n      params: {\n        body: {\n          q_u_x: 4,\n        },\n        headers: {\n          b_a_z: 3,\n        },\n        path: {\n          f_o_o: 1,\n        },\n        query: {\n          b_a_r: 2,\n        },\n      },\n    },\n    {\n      args: [1],\n      config: [\n        {\n          in: 'body',\n        },\n      ],\n      description: 'positional primitive body',\n      params: {\n        body: 1,\n      },\n    },\n    {\n      args: [\n        {\n          foo: 1,\n        },\n      ],\n      config: [\n        {\n          key: 'foo',\n          map: 'body',\n        },\n      ],\n      description: 'alias flat body',\n      params: {\n        body: 1,\n      },\n    },\n    {\n      args: [\n        {\n          bar: 2,\n          baz: 3,\n          foo: 1,\n          qux: 4,\n        },\n      ],\n      config: [\n        {\n          in: 'body',\n        },\n      ],\n      description: 'positional complex body',\n      params: {\n        body: {\n          bar: 2,\n          baz: 3,\n          foo: 1,\n          qux: 4,\n        },\n      },\n    },\n    {\n      args: [\n        {\n          $body_qux: 4,\n          $headers_baz: 3,\n          $path_foo: 1,\n          $query_bar: 2,\n        },\n      ],\n      config: [\n        {\n          allowExtra: {},\n        },\n      ],\n      description: 'namespace extra arguments',\n      params: {\n        body: {\n          qux: 4,\n        },\n        headers: {\n          baz: 3,\n        },\n        path: {\n          foo: 1,\n        },\n        query: {\n          bar: 2,\n        },\n      },\n    },\n    {\n      args: [\n        {\n          bar: 2,\n          baz: 3,\n          foo: 1,\n          qux: 4,\n        },\n      ],\n      config: [\n        {\n          allowExtra: {\n            query: true,\n          },\n        },\n      ],\n      description: 'slot extra arguments',\n      params: {\n        query: {\n          bar: 2,\n          baz: 3,\n          foo: 1,\n          qux: 4,\n        },\n      },\n    },\n    {\n      args: [],\n      config: [],\n      description: 'strip empty slots',\n      params: {},\n    },\n    {\n      args: [[]],\n      config: [\n        {\n          in: 'body',\n        },\n      ],\n      description: 'empty array body',\n      params: {\n        body: [],\n      },\n    },\n  ];\n\n  it.each(scenarios)('$description', async ({ args, config, params }) => {\n    expect(buildClientParams(args, config)).toEqual(params);\n  });\n});\n"
  },
  {
    "path": "packages/openapi-ts/src/plugins/@hey-api/client-core/__tests__/queryKeySerializer.test.ts",
    "content": "import {\n  queryKeyJsonReplacer,\n  serializeQueryKeyValue,\n  stringifyToJsonValue,\n} from '../bundle/queryKeySerializer';\n\ndescribe('query key helpers', () => {\n  describe('queryKeyJsonReplacer', () => {\n    it('converts bigint to string', () => {\n      expect(queryKeyJsonReplacer('value', 1n)).toBe('1');\n    });\n\n    it('converts Date to ISO string', () => {\n      const date = new Date('2025-01-01T12:34:56.000Z');\n      expect(queryKeyJsonReplacer('value', date)).toBe(date.toISOString());\n    });\n\n    it('drops unsupported values', () => {\n      expect(queryKeyJsonReplacer('value', undefined)).toBeUndefined();\n      expect(queryKeyJsonReplacer('value', () => {})).toBeUndefined();\n      expect(queryKeyJsonReplacer('value', Symbol('s'))).toBeUndefined();\n    });\n  });\n\n  describe('stringifyToJsonValue', () => {\n    it('produces JSON-safe structures', () => {\n      const input = {\n        a: 1n,\n        b: new Date('2025-01-02T00:00:00.000Z'),\n        c: () => {},\n        d: undefined,\n      };\n\n      expect(stringifyToJsonValue(input)).toEqual({\n        a: '1',\n        b: '2025-01-02T00:00:00.000Z',\n      });\n    });\n\n    it('returns undefined when value cannot be stringified', () => {\n      const circular: { self?: unknown } = {};\n      circular.self = circular;\n\n      expect(stringifyToJsonValue(circular)).toBeUndefined();\n    });\n  });\n\n  describe('serializeQueryKeyValue', () => {\n    it('handles primitives and null', () => {\n      expect(serializeQueryKeyValue(null)).toBeNull();\n      expect(serializeQueryKeyValue('')).toBe('');\n      expect(serializeQueryKeyValue(0)).toBe(0);\n      expect(serializeQueryKeyValue(false)).toBe(false);\n    });\n\n    it('converts special primitives', () => {\n      expect(serializeQueryKeyValue(1n)).toBe('1');\n\n      const date = new Date('2025-03-04T05:06:07.000Z');\n      expect(serializeQueryKeyValue(date)).toBe(date.toISOString());\n    });\n\n    it('normalizes arrays', () => {\n      const date = new Date('2025-03-04T05:06:07.000Z');\n      expect(serializeQueryKeyValue([1n, date, undefined, () => {}, 'ok'])).toEqual([\n        '1',\n        date.toISOString(),\n        null,\n        null,\n        'ok',\n      ]);\n    });\n\n    it('normalizes plain objects', () => {\n      const result = serializeQueryKeyValue({\n        a: 1,\n        b: 1n,\n        c: new Date('2025-06-07T08:09:10.000Z'),\n        d: undefined,\n        e: () => {},\n      });\n\n      expect(result).toEqual({\n        a: 1,\n        b: '1',\n        c: '2025-06-07T08:09:10.000Z',\n      });\n    });\n\n    it('supports objects with null prototype', () => {\n      const value = Object.assign(Object.create(null), { a: 1 });\n      expect(serializeQueryKeyValue(value)).toEqual({ a: 1 });\n    });\n\n    it('serializes URLSearchParams as JSON object', () => {\n      const params = new URLSearchParams();\n      params.append('a', '1');\n      params.append('a', '2');\n      params.append('b', 'foo');\n\n      expect(serializeQueryKeyValue(params)).toEqual({\n        a: ['1', '2'],\n        b: 'foo',\n      });\n    });\n\n    it('rejects unsupported structures', () => {\n      expect(serializeQueryKeyValue(new Map())).toBeUndefined();\n      expect(serializeQueryKeyValue(new Set())).toBeUndefined();\n      expect(serializeQueryKeyValue(new (class Example {})())).toBeUndefined();\n    });\n  });\n});\n"
  },
  {
    "path": "packages/openapi-ts/src/plugins/@hey-api/client-core/__tests__/serverSentEvents.test.ts",
    "content": "import { createSseClient } from '../bundle/serverSentEvents';\n\nfunction makeStream(chunks: string[]) {\n  let index = 0;\n  return new ReadableStream({\n    pull(controller) {\n      if (index < chunks.length) {\n        controller.enqueue(new TextEncoder().encode(chunks[index]));\n        index++;\n      } else {\n        controller.close();\n      }\n    },\n  });\n}\n\nfunction toRequest(input: RequestInfo, init?: RequestInit): Request {\n  if (input instanceof Request) {\n    const url = input.url.startsWith('http') ? input.url : `http://localhost${input.url}`;\n    return new Request(url, input);\n  }\n  const url = input.startsWith('http') ? input : `http://localhost${input}`;\n  return new Request(url, init);\n}\n\ndescribe('createSseClient', () => {\n  let fetchMock: any;\n\n  beforeEach(() => {\n    fetchMock = vi.fn();\n    global.fetch = fetchMock;\n  });\n\n  afterEach(() => {\n    vi.restoreAllMocks();\n  });\n\n  it('yields parsed JSON events', async () => {\n    fetchMock.mockResolvedValue({\n      body: makeStream(['id: 1\\nevent: test\\ndata: {\"foo\":\"bar\"}\\n\\n']),\n      ok: true,\n    });\n\n    const onEvent = vi.fn();\n    const { stream } = createSseClient({\n      onSseEvent: onEvent,\n      url: 'http://localhost/sse',\n    });\n\n    const result: any[] = [];\n    for await (const ev of stream) result.push(ev);\n\n    expect(result).toEqual([{ foo: 'bar' }]);\n    expect(onEvent).toHaveBeenCalledWith({\n      data: { foo: 'bar' },\n      event: 'test',\n      id: '1',\n      retry: 3000,\n    });\n  });\n\n  it('falls back to raw string if not valid JSON', async () => {\n    fetchMock.mockResolvedValue({\n      body: makeStream(['data: hello\\n\\n']),\n      ok: true,\n    });\n\n    const { stream } = createSseClient({ url: 'http://localhost/sse' });\n    const result: any[] = [];\n    for await (const ev of stream) result.push(ev);\n\n    expect(result).toEqual(['hello']);\n  });\n\n  it('calls onSseError when response not ok', async () => {\n    fetchMock.mockResolvedValue({\n      ok: false,\n      status: 500,\n      statusText: 'Server Error',\n      text: async () => 'fail',\n    });\n\n    const onError = vi.fn();\n    const controller = new AbortController();\n    const { stream } = createSseClient({\n      onSseError: onError,\n      signal: controller.signal,\n      sseDefaultRetryDelay: 0,\n      url: 'http://localhost/sse',\n    });\n\n    const iter = stream[Symbol.asyncIterator]();\n    const promise = iter.next().catch(() => {});\n    controller.abort();\n    await promise;\n\n    expect(onError).toHaveBeenCalled();\n    const error = onError.mock.calls[0]![0];\n    expect(error).toBeInstanceOf(Error);\n    expect((error as Error).message).toContain('SSE failed');\n  });\n\n  it('respects retry from server', async () => {\n    fetchMock.mockResolvedValue({\n      body: makeStream(['retry: 1234\\ndata: \"x\"\\n\\n']),\n      ok: true,\n    });\n\n    const onEvent = vi.fn();\n    const { stream } = createSseClient({\n      onSseEvent: onEvent,\n      url: 'http://localhost/sse',\n    });\n\n    const iter = stream[Symbol.asyncIterator]();\n    await iter.next();\n    await iter.return?.();\n\n    expect(onEvent).toHaveBeenCalledWith({\n      data: 'x',\n      event: undefined,\n      id: undefined,\n      retry: 1234,\n    });\n  });\n\n  it('yields multiple events in one stream', async () => {\n    fetchMock.mockResolvedValue({\n      body: makeStream(['data: 1\\n\\n', 'data: 2\\n\\n', 'data: 3\\n\\n']),\n      ok: true,\n    });\n\n    const { stream } = createSseClient({ url: 'http://localhost/sse' });\n    const result: any[] = [];\n    for await (const ev of stream) result.push(ev);\n    expect(result).toEqual([1, 2, 3]);\n  });\n\n  it('handles partial chunks correctly', async () => {\n    fetchMock.mockResolvedValue({\n      body: makeStream(['data: par', 'tial\\n\\n']),\n      ok: true,\n    });\n\n    const { stream } = createSseClient({ url: 'http://localhost/sse' });\n    const result: any[] = [];\n    for await (const ev of stream) result.push(ev);\n    expect(result).toEqual(['partial']);\n  });\n\n  it('sets Last-Event-ID header on reconnect', async () => {\n    let headersSeen: string | null | undefined;\n    fetchMock.mockImplementation(async (input: RequestInfo, init?: RequestInit) => {\n      const req = toRequest(input, init);\n      headersSeen = req.headers.get('Last-Event-ID');\n      return {\n        body: makeStream(['data: a\\n\\n']),\n        ok: true,\n      };\n    });\n\n    const onEvent = vi.fn();\n    const { stream } = createSseClient({\n      onSseEvent: onEvent,\n      url: 'http://localhost/sse',\n    });\n\n    const iter = stream[Symbol.asyncIterator]();\n    await iter.next();\n    await iter.return?.();\n\n    // simulate next fetch after reconnect\n    await fetchMock('http://localhost/sse', {\n      headers: new Headers({ 'Last-Event-ID': '1' }),\n    });\n    expect(headersSeen).toBe('1');\n  });\n\n  it('stops cleanly when aborted', async () => {\n    fetchMock.mockResolvedValue({\n      body: makeStream(['data: stop\\n\\n']),\n      ok: true,\n    });\n\n    const controller = new AbortController();\n    const { stream } = createSseClient({\n      signal: controller.signal,\n      url: 'http://localhost/sse',\n    });\n\n    const iter = stream[Symbol.asyncIterator]();\n    const first = await iter.next();\n    expect(first).toEqual({ done: false, value: 'stop' });\n\n    controller.abort();\n    const second = await iter.next();\n    expect(second).toEqual({ done: true, value: undefined });\n  });\n\n  it('handles mixed JSON and raw string events', async () => {\n    fetchMock.mockResolvedValue({\n      body: makeStream(['data: {\"foo\":1}\\n\\n', 'data: bar\\n\\n', 'data: {\"baz\":2}\\n\\n']),\n      ok: true,\n    });\n\n    const { stream } = createSseClient({ url: 'http://localhost/sse' });\n    const result: any[] = [];\n    for await (const ev of stream) result.push(ev);\n    expect(result).toEqual([{ foo: 1 }, 'bar', { baz: 2 }]);\n  });\n\n  it('passes custom headers', async () => {\n    let headersSeen: string | null | undefined;\n    fetchMock.mockImplementation(async (input: RequestInfo, init?: RequestInit) => {\n      const req = toRequest(input, init);\n      headersSeen = req.headers.get('X-Custom');\n      return {\n        body: makeStream([]),\n        ok: true,\n      };\n    });\n\n    const { stream } = createSseClient({\n      headers: { 'X-Custom': 'abc' },\n      url: 'http://localhost/sse',\n    });\n\n    const iter = stream[Symbol.asyncIterator]();\n    await iter.next();\n    await iter.return?.();\n\n    expect(headersSeen).toBe('abc');\n  });\n\n  it('handles chunked JSON across multiple SSE messages', async () => {\n    fetchMock.mockResolvedValue({\n      body: makeStream(['data: {\"foo\":', '\"bar\"}\\n\\n']),\n      ok: true,\n    });\n\n    const { stream } = createSseClient({ url: 'http://localhost/sse' });\n    const result: any[] = [];\n    for await (const ev of stream) result.push(ev);\n    expect(result).toEqual([{ foo: 'bar' }]);\n  });\n\n  it('handles empty stream', async () => {\n    fetchMock.mockResolvedValue({ body: makeStream([]), ok: true });\n    const { stream } = createSseClient({ url: 'http://localhost/sse' });\n    const iter = stream[Symbol.asyncIterator]();\n    const first = await iter.next();\n    expect(first).toEqual({ done: true, value: undefined });\n  });\n\n  it('respects retryDelay on rapid reconnects', async () => {\n    let attempt = 0;\n    fetchMock.mockImplementation(async () => {\n      attempt++;\n      if (attempt < 2) throw new Error('fail');\n      return {\n        body: makeStream(['data: ok\\n\\n']),\n        ok: true,\n      };\n    });\n\n    const onError = vi.fn();\n    const { stream } = createSseClient({\n      onSseError: onError,\n      sseDefaultRetryDelay: 0,\n      url: 'http://localhost/sse',\n    });\n\n    const result: any[] = [];\n    for await (const ev of stream) result.push(ev);\n\n    expect(onError).toHaveBeenCalled();\n    expect(result).toEqual(['ok']);\n  });\n\n  it('ignores invalid retry values', async () => {\n    fetchMock.mockResolvedValue({\n      body: makeStream(['retry: not-a-number\\ndata: x\\n\\n']),\n      ok: true,\n    });\n\n    const onEvent = vi.fn();\n    const { stream } = createSseClient({\n      onSseEvent: onEvent,\n      url: 'http://localhost/sse',\n    });\n    const iter = stream[Symbol.asyncIterator]();\n    const ev = await iter.next();\n    expect(ev.value).toBe('x');\n    expect(onEvent.mock.calls[0]![0].retry).toBe(3000); // default\n  });\n\n  it('handles events with no data lines gracefully', async () => {\n    fetchMock.mockResolvedValue({\n      body: makeStream(['event: noop\\nid: 1\\n\\n']),\n      ok: true,\n    });\n\n    const onEvent = vi.fn();\n    const { stream } = createSseClient({\n      onSseEvent: onEvent,\n      url: 'http://localhost/sse',\n    });\n    const iter = stream[Symbol.asyncIterator]();\n    const ev = await iter.next();\n    expect(ev.done).toBe(true);\n    expect(onEvent).toHaveBeenCalledWith({\n      data: undefined,\n      event: 'noop',\n      id: '1',\n      retry: 3000,\n    });\n  });\n\n  it('yields raw string on JSON parse error without calling onSseError', async () => {\n    fetchMock.mockResolvedValue({\n      body: makeStream(['data: {\"foo\": unquoted}\\n\\n']),\n      ok: true,\n    });\n\n    const onEvent = vi.fn();\n    const onError = vi.fn();\n    const { stream } = createSseClient({\n      onSseError: onError,\n      onSseEvent: onEvent,\n      url: 'http://localhost/sse',\n    });\n    const iter = stream[Symbol.asyncIterator]();\n    const ev = await iter.next();\n    expect(ev.value).toBe('{\"foo\": unquoted}');\n    expect(onError).not.toHaveBeenCalled();\n  });\n\n  it('handles multiple aborts without throwing', async () => {\n    fetchMock.mockResolvedValue({\n      body: makeStream(['data: a\\n\\n']),\n      ok: true,\n    });\n\n    const controller = new AbortController();\n    const { stream } = createSseClient({\n      signal: controller.signal,\n      url: 'http://localhost/sse',\n    });\n    const iter = stream[Symbol.asyncIterator]();\n    await iter.next();\n\n    controller.abort();\n    await expect(iter.next()).resolves.toEqual({\n      done: true,\n      value: undefined,\n    });\n    controller.abort();\n    await expect(iter.next()).resolves.toEqual({\n      done: true,\n      value: undefined,\n    });\n  });\n\n  it('stops immediately if signal is already aborted', async () => {\n    fetchMock.mockResolvedValue({\n      body: makeStream(['data: a\\n\\n']),\n      ok: true,\n    });\n\n    const controller = new AbortController();\n    controller.abort();\n    const { stream } = createSseClient({\n      signal: controller.signal,\n      url: 'http://localhost/sse',\n    });\n    const iter = stream[Symbol.asyncIterator]();\n    const ev = await iter.next();\n    expect(ev).toEqual({ done: true, value: undefined });\n  });\n\n  it('respects custom HTTP method', async () => {\n    let methodSeen: string | undefined;\n    fetchMock.mockImplementation(async (input: RequestInfo, init?: RequestInit) => {\n      const req = toRequest(input, init);\n      methodSeen = req.method;\n      return {\n        body: makeStream(['data: ok\\n\\n']),\n        ok: true,\n      };\n    });\n\n    const { stream } = createSseClient({\n      method: 'POST',\n      url: 'http://localhost/sse',\n    });\n    const iter = stream[Symbol.asyncIterator]();\n    await iter.next();\n    await iter.return?.();\n\n    expect(methodSeen).toBe('POST');\n  });\n\n  it('respects external AbortSignal', async () => {\n    fetchMock.mockResolvedValue({\n      body: makeStream(['data: x\\n\\n']),\n      ok: true,\n    });\n\n    const controller = new AbortController();\n    const { stream } = createSseClient({\n      signal: controller.signal,\n      url: 'http://localhost/sse',\n    });\n\n    const iter = stream[Symbol.asyncIterator]();\n    const first = await iter.next();\n    expect(first.value).toBe('x');\n\n    controller.abort();\n    const second = await iter.next();\n    expect(second.done).toBe(true);\n  });\n\n  it('ignores empty data but updates lastEventId', async () => {\n    let lastEventId: string | undefined;\n    fetchMock.mockImplementation(async () => ({\n      body: makeStream(['id: 99\\ndata:\\n\\n']),\n      ok: true,\n    }));\n\n    const { stream } = createSseClient({\n      onSseEvent: (ev) => {\n        lastEventId = ev.id;\n      },\n      url: 'http://localhost/sse',\n    });\n\n    stream[Symbol.asyncIterator]();\n    // pull all events until done\n    // eslint-disable-next-line @typescript-eslint/no-unused-vars\n    for await (const _ of stream) {\n      /* noop */\n    }\n\n    expect(lastEventId).toBe('99');\n  });\n\n  it('stops retrying after sseMaxRetryAttempts is reached', async () => {\n    let attempt = 0;\n    fetchMock.mockImplementation(async () => {\n      attempt++;\n      throw new Error('fail');\n    });\n\n    const onError = vi.fn();\n    const { stream } = createSseClient({\n      onSseError: onError,\n      sseDefaultRetryDelay: 0,\n      sseMaxRetryAttempts: 2,\n      url: 'http://localhost/sse',\n    });\n\n    const iter = stream[Symbol.asyncIterator]();\n    const result = await iter.next();\n\n    expect(result.done).toBe(true);\n    expect(onError).toHaveBeenCalledTimes(2); // once per failed attempt\n    expect(attempt).toBe(2);\n  });\n\n  it('applies exponential backoff between retries', async () => {\n    let attempt = 0;\n\n    fetchMock.mockImplementation(() => {\n      attempt++;\n      if (attempt < 3) throw new Error('fail');\n      return Promise.resolve({\n        body: makeStream(['data: ok\\n\\n']),\n        ok: true,\n      });\n    });\n\n    const onError = vi.fn();\n    const { stream } = createSseClient({\n      onSseError: onError,\n      sseDefaultRetryDelay: 10,\n      // Inject a fake sleep that resolves instantly\n      sseSleepFn: async () => {},\n      url: 'http://localhost/sse',\n    });\n\n    const iter = stream[Symbol.asyncIterator]();\n\n    const ev = await iter.next();\n\n    expect(ev.value).toBe('ok');\n    expect(onError).toHaveBeenCalledTimes(2);\n    expect(attempt).toBe(3);\n  });\n\n  it('does not retry when sseMaxRetryAttempts is 0', async () => {\n    let attempt = 0;\n    fetchMock.mockImplementation(async () => {\n      attempt++;\n      throw new Error('fail');\n    });\n\n    const onError = vi.fn();\n    const { stream } = createSseClient({\n      onSseError: onError,\n      sseMaxRetryAttempts: 0,\n      url: 'http://localhost/sse',\n    });\n\n    const iter = stream[Symbol.asyncIterator]();\n    const result = await iter.next();\n\n    expect(result.done).toBe(true);\n    expect(onError).toHaveBeenCalledTimes(1);\n    expect(attempt).toBe(1);\n  });\n\n  it('calls responseValidator before yielding JSON', async () => {\n    fetchMock.mockResolvedValue({\n      body: makeStream(['data: {\"foo\": \"bar\"}\\n\\n']),\n      ok: true,\n    });\n\n    const validator = vi.fn(async (data) => {\n      if (!('foo' in (data as any))) throw new Error('Missing foo');\n    });\n\n    const { stream } = createSseClient({\n      responseValidator: validator,\n      url: 'http://localhost/sse',\n    });\n\n    const result: any[] = [];\n    for await (const ev of stream) result.push(ev);\n\n    expect(result).toEqual([{ foo: 'bar' }]);\n    expect(validator).toHaveBeenCalledTimes(1);\n  });\n\n  it('calls responseTransformer before yielding JSON', async () => {\n    fetchMock.mockResolvedValue({\n      body: makeStream(['data: {\"num\": 2}\\n\\n']),\n      ok: true,\n    });\n\n    const transformer = vi.fn(async (data) => ({\n      doubled: (data as any).num * 2,\n    }));\n\n    const { stream } = createSseClient({\n      responseTransformer: transformer,\n      url: 'http://localhost/sse',\n    });\n\n    const result: any[] = [];\n    for await (const ev of stream) result.push(ev);\n\n    expect(result).toEqual([{ doubled: 4 }]);\n    expect(transformer).toHaveBeenCalledTimes(1);\n  });\n\n  it('validator error triggers onSseError and retry', async () => {\n    let attempt = 0;\n    fetchMock.mockImplementation(async () => {\n      attempt++;\n      return {\n        body: makeStream(['data: {\"foo\": \"bar\"}\\n\\n']),\n        ok: true,\n      };\n    });\n\n    const validator = vi.fn(async () => {\n      throw new Error('invalid');\n    });\n    const onError = vi.fn();\n\n    const { stream } = createSseClient({\n      onSseError: onError,\n      responseValidator: validator,\n      sseDefaultRetryDelay: 0,\n      sseMaxRetryAttempts: 1,\n      url: 'http://localhost/sse',\n    });\n\n    const iter = stream[Symbol.asyncIterator]();\n    await iter.next().catch(() => {});\n    expect(onError).toHaveBeenCalledTimes(1);\n    expect(attempt).toBe(1);\n  });\n\n  it('skips validator/transformer for non-JSON events', async () => {\n    fetchMock.mockResolvedValue({\n      body: makeStream(['data: rawstring\\n\\n']),\n      ok: true,\n    });\n\n    const validator = vi.fn();\n    const transformer = vi.fn();\n\n    const { stream } = createSseClient({\n      responseTransformer: transformer,\n      responseValidator: validator,\n      url: 'http://localhost/sse',\n    });\n\n    const result: any[] = [];\n    for await (const ev of stream) result.push(ev);\n\n    expect(result).toEqual(['rawstring']);\n    expect(validator).not.toHaveBeenCalled();\n    expect(transformer).not.toHaveBeenCalled();\n  });\n\n  it('handles CRLF line endings', async () => {\n    fetchMock.mockResolvedValue({\n      body: makeStream(['id: 1\\r\\nevent: test\\r\\ndata: {\"foo\":\"bar\"}\\r\\n\\r\\n']),\n      ok: true,\n    });\n\n    const onEvent = vi.fn();\n    const { stream } = createSseClient({\n      onSseEvent: onEvent,\n      url: 'http://localhost/sse',\n    });\n\n    const result: any[] = [];\n    for await (const ev of stream) result.push(ev);\n\n    expect(result).toEqual([{ foo: 'bar' }]);\n    expect(onEvent).toHaveBeenCalledWith({\n      data: { foo: 'bar' },\n      event: 'test',\n      id: '1',\n      retry: 3000,\n    });\n  });\n\n  it('handles CR-only line endings', async () => {\n    fetchMock.mockResolvedValue({\n      body: makeStream(['id: 2\\revent: test\\rdata: {\"baz\":\"qux\"}\\r\\r']),\n      ok: true,\n    });\n\n    const onEvent = vi.fn();\n    const { stream } = createSseClient({\n      onSseEvent: onEvent,\n      url: 'http://localhost/sse',\n    });\n\n    const result: any[] = [];\n    for await (const ev of stream) result.push(ev);\n\n    expect(result).toEqual([{ baz: 'qux' }]);\n    expect(onEvent).toHaveBeenCalledWith({\n      data: { baz: 'qux' },\n      event: 'test',\n      id: '2',\n      retry: 3000,\n    });\n  });\n\n  it('handles mixed line endings in a single stream', async () => {\n    fetchMock.mockResolvedValue({\n      body: makeStream(['data: 1\\n\\n', 'data: 2\\r\\n\\r\\n', 'data: 3\\r\\r']),\n      ok: true,\n    });\n\n    const { stream } = createSseClient({ url: 'http://localhost/sse' });\n    const result: any[] = [];\n    for await (const ev of stream) result.push(ev);\n    expect(result).toEqual([1, 2, 3]);\n  });\n});\n\ndescribe('serialized request body handling', () => {\n  let fetchMock: any;\n\n  beforeEach(() => {\n    fetchMock = vi.fn();\n    global.fetch = fetchMock;\n  });\n\n  afterEach(() => {\n    vi.restoreAllMocks();\n  });\n\n  it('sends serialized JSON body in SSE request', async () => {\n    fetchMock.mockResolvedValue({\n      body: makeStream(['data: ok\\n\\n']),\n      ok: true,\n    });\n\n    const jsonBody = { key: 'value' };\n    const serializedBody = JSON.stringify(jsonBody);\n\n    const { stream } = createSseClient({\n      body: jsonBody as any,\n      method: 'POST',\n      serializedBody,\n      url: 'http://localhost/sse',\n    });\n\n    const iter = stream[Symbol.asyncIterator]();\n    await iter.next();\n    await iter.return?.();\n\n    expect(fetchMock).toHaveBeenCalled();\n    const request = fetchMock.mock.calls[0]![0];\n    expect(request).toBeInstanceOf(Request);\n    await expect(request.text()).resolves.toBe(serializedBody);\n  });\n\n  it('handles empty string serializedBody', async () => {\n    fetchMock.mockResolvedValue({\n      body: makeStream(['data: ok\\n\\n']),\n      ok: true,\n    });\n\n    const { stream } = createSseClient({\n      body: '' as any,\n      method: 'POST',\n      serializedBody: '',\n      url: 'http://localhost/sse',\n    });\n\n    const iter = stream[Symbol.asyncIterator]();\n    await iter.next();\n    await iter.return?.();\n\n    expect(fetchMock).toHaveBeenCalled();\n    const request = fetchMock.mock.calls[0]![0];\n    expect(request).toBeInstanceOf(Request);\n    await expect(request.text()).resolves.toBe('');\n  });\n\n  it('provides serialized body to onRequest hook', async () => {\n    fetchMock.mockResolvedValue({\n      body: makeStream(['data: ok\\n\\n']),\n      ok: true,\n    });\n\n    const jsonBody = { key: 'value' };\n    const serializedBody = JSON.stringify(jsonBody);\n    const onRequest = vi.fn(async (url: string, init: RequestInit) => {\n      expect(init.body).toBe(serializedBody);\n      return toRequest(url, init);\n    });\n\n    const { stream } = createSseClient({\n      body: jsonBody as any,\n      method: 'POST',\n      onRequest,\n      serializedBody,\n      url: 'http://localhost/sse',\n    });\n\n    const iter = stream[Symbol.asyncIterator]();\n    await iter.next();\n    await iter.return?.();\n\n    expect(onRequest).toHaveBeenCalledWith(\n      'http://localhost/sse',\n      expect.objectContaining({\n        body: serializedBody,\n        method: 'POST',\n      }),\n    );\n  });\n});\n"
  },
  {
    "path": "packages/openapi-ts/src/plugins/@hey-api/client-core/__tests__/utils.test.ts",
    "content": "import { getValidRequestBody } from '../../client-core/bundle/utils';\n\ndescribe('getValidRequestBody', () => {\n  const noBodySerializer = [\n    { body: '' },\n    { body: 0 },\n    { body: false },\n    { body: 'test string' },\n    { body: null },\n    { body: undefined },\n  ].map(({ body }) => ({\n    expectedBody: body,\n    options: { body, bodySerializer: null, serializedBody: 'ignore' },\n  }));\n\n  const hasBodySerializer = [\n    { body: '', expectedBody: null },\n    { body: 0, expectedBody: 0 },\n    { body: false, expectedBody: false },\n    { body: '{\"key\":\"value\"}', expectedBody: '{\"key\":\"value\"}' },\n    { body: null, expectedBody: null },\n    { body: undefined, expectedBody: undefined },\n  ].map(({ body, expectedBody }) => ({\n    expectedBody,\n    options: { body, bodySerializer: () => {} },\n  }));\n\n  const hasBodySerializerAndSerializedBodyProperty = [\n    { body: '', expectedBody: null, serializedBody: '' },\n    { body: 0, expectedBody: 0, serializedBody: 0 },\n    { body: false, expectedBody: false, serializedBody: false },\n    {\n      body: {},\n      expectedBody: '{\"key\":\"value\"}',\n      serializedBody: '{\"key\":\"value\"}',\n    },\n    { body: null, expectedBody: 'foo', serializedBody: 'foo' },\n    { body: undefined, expectedBody: undefined, serializedBody: undefined },\n  ].map(({ body, expectedBody, serializedBody }) => ({\n    expectedBody,\n    options: { body, bodySerializer: () => {}, serializedBody },\n  }));\n\n  it.each(noBodySerializer)(\n    'returns $expectedBody when unserialized body value is $options.body',\n    ({ expectedBody, options }) => {\n      expect(getValidRequestBody(options)).toBe(expectedBody);\n    },\n  );\n\n  it.each(hasBodySerializer)(\n    'evaluates body and returns $expectedBody when serialized value is $options.body',\n    ({ expectedBody, options }) => {\n      expect(getValidRequestBody(options)).toBe(expectedBody);\n    },\n  );\n\n  it.each(hasBodySerializerAndSerializedBodyProperty)(\n    'evaluates serializedBody and returns $expectedBody when value is $options.serializedBody',\n    ({ expectedBody, options }) => {\n      expect(getValidRequestBody(options)).toBe(expectedBody);\n    },\n  );\n});\n"
  },
  {
    "path": "packages/openapi-ts/src/plugins/@hey-api/client-core/bundle/auth.ts",
    "content": "export 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"
  },
  {
    "path": "packages/openapi-ts/src/plugins/@hey-api/client-core/bundle/bodySerializer.ts",
    "content": "import type { ArrayStyle, ObjectStyle, SerializerOptions } from './pathSerializer';\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"
  },
  {
    "path": "packages/openapi-ts/src/plugins/@hey-api/client-core/bundle/params.ts",
    "content": "type 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"
  },
  {
    "path": "packages/openapi-ts/src/plugins/@hey-api/client-core/bundle/pathSerializer.ts",
    "content": "interface 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"
  },
  {
    "path": "packages/openapi-ts/src/plugins/@hey-api/client-core/bundle/queryKeySerializer.ts",
    "content": "/**\n * JSON-friendly union that mirrors what Pinia Colada can hash.\n */\nexport type JsonValue =\n  | null\n  | string\n  | number\n  | boolean\n  | JsonValue[]\n  | { [key: string]: JsonValue };\n\n/**\n * Replacer that converts non-JSON values (bigint, Date, etc.) to safe substitutes.\n */\nexport const queryKeyJsonReplacer = (_key: string, value: unknown) => {\n  if (value === undefined || typeof value === 'function' || typeof value === 'symbol') {\n    return undefined;\n  }\n  if (typeof value === 'bigint') {\n    return value.toString();\n  }\n  if (value instanceof Date) {\n    return value.toISOString();\n  }\n  return value;\n};\n\n/**\n * Safely stringifies a value and parses it back into a JsonValue.\n */\nexport const stringifyToJsonValue = (input: unknown): JsonValue | undefined => {\n  try {\n    const json = JSON.stringify(input, queryKeyJsonReplacer);\n    if (json === undefined) {\n      return undefined;\n    }\n    return JSON.parse(json) as JsonValue;\n  } catch {\n    return undefined;\n  }\n};\n\n/**\n * Detects plain objects (including objects with a null prototype).\n */\nconst isPlainObject = (value: unknown): value is Record<string, unknown> => {\n  if (value === null || typeof value !== 'object') {\n    return false;\n  }\n  const prototype = Object.getPrototypeOf(value as object);\n  return prototype === Object.prototype || prototype === null;\n};\n\n/**\n * Turns URLSearchParams into a sorted JSON object for deterministic keys.\n */\nconst serializeSearchParams = (params: URLSearchParams): JsonValue => {\n  const entries = Array.from(params.entries()).sort(([a], [b]) => a.localeCompare(b));\n  const result: Record<string, JsonValue> = {};\n\n  for (const [key, value] of entries) {\n    const existing = result[key];\n    if (existing === undefined) {\n      result[key] = value;\n      continue;\n    }\n\n    if (Array.isArray(existing)) {\n      (existing as string[]).push(value);\n    } else {\n      result[key] = [existing, value];\n    }\n  }\n\n  return result;\n};\n\n/**\n * Normalizes any accepted value into a JSON-friendly shape for query keys.\n */\nexport const serializeQueryKeyValue = (value: unknown): JsonValue | undefined => {\n  if (value === null) {\n    return null;\n  }\n\n  if (typeof value === 'string' || typeof value === 'number' || typeof value === 'boolean') {\n    return value;\n  }\n\n  if (value === undefined || typeof value === 'function' || typeof value === 'symbol') {\n    return undefined;\n  }\n\n  if (typeof value === 'bigint') {\n    return value.toString();\n  }\n\n  if (value instanceof Date) {\n    return value.toISOString();\n  }\n\n  if (Array.isArray(value)) {\n    return stringifyToJsonValue(value);\n  }\n\n  if (typeof URLSearchParams !== 'undefined' && value instanceof URLSearchParams) {\n    return serializeSearchParams(value);\n  }\n\n  if (isPlainObject(value)) {\n    return stringifyToJsonValue(value);\n  }\n\n  return undefined;\n};\n"
  },
  {
    "path": "packages/openapi-ts/src/plugins/@hey-api/client-core/bundle/serverSentEvents.ts",
    "content": "import type { Config } from './types';\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 const 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            // Normalize line endings: CRLF -> LF, then CR -> LF\n            buffer = buffer.replace(/\\r\\n/g, '\\n').replace(/\\r/g, '\\n');\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"
  },
  {
    "path": "packages/openapi-ts/src/plugins/@hey-api/client-core/bundle/types.ts",
    "content": "import type { Auth, AuthToken } from './auth';\nimport type { BodySerializer, QuerySerializer, QuerySerializerOptions } from './bodySerializer';\n\nexport type HttpMethod =\n  | 'connect'\n  | 'delete'\n  | 'get'\n  | 'head'\n  | 'options'\n  | 'patch'\n  | 'post'\n  | 'put'\n  | 'trace';\n\nexport type Client<\n  RequestFn = never,\n  Config = unknown,\n  MethodFn = never,\n  BuildUrlFn = never,\n  SseFn = never,\n> = {\n  /**\n   * Returns the final request URL.\n   */\n  buildUrl: BuildUrlFn;\n  getConfig: () => Config;\n  request: RequestFn;\n  setConfig: (config: Config) => Config;\n} & {\n  [K in HttpMethod]: MethodFn;\n} & ([SseFn] extends [never] ? { sse?: never } : { sse: { [K in HttpMethod]: SseFn } });\n\nexport interface Config {\n  /**\n   * Auth token or a function returning auth token. The resolved value will be\n   * added to the request payload as defined by its `security` array.\n   */\n  auth?: ((auth: Auth) => Promise<AuthToken> | AuthToken) | AuthToken;\n  /**\n   * A function for serializing request body parameter. By default,\n   * {@link JSON.stringify()} will be used.\n   */\n  bodySerializer?: BodySerializer | null;\n  /**\n   * An object containing any HTTP headers that you want to pre-populate your\n   * `Headers` object with.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/Headers/Headers#init See more}\n   */\n  headers?:\n    | RequestInit['headers']\n    | Record<\n        string,\n        string | number | boolean | (string | number | boolean)[] | null | undefined | unknown\n      >;\n  /**\n   * The request method.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/fetch#method See more}\n   */\n  method?: Uppercase<HttpMethod>;\n  /**\n   * A function for serializing request query parameters. By default, arrays\n   * will be exploded in form style, objects will be exploded in deepObject\n   * style, and reserved characters are percent-encoded.\n   *\n   * This method will have no effect if the native `paramsSerializer()` Axios\n   * API function is used.\n   *\n   * {@link https://swagger.io/docs/specification/serialization/#query View examples}\n   */\n  querySerializer?: QuerySerializer | QuerySerializerOptions;\n  /**\n   * A function validating request data. This is useful if you want to ensure\n   * the request conforms to the desired shape, so it can be safely sent to\n   * the server.\n   */\n  requestValidator?: (data: unknown) => Promise<unknown>;\n  /**\n   * A function transforming response data before it's returned. This is useful\n   * for post-processing data, e.g. converting ISO strings into Date objects.\n   */\n  responseTransformer?: (data: unknown) => Promise<unknown>;\n  /**\n   * A function validating response data. This is useful if you want to ensure\n   * the response conforms to the desired shape, so it can be safely passed to\n   * the transformers and returned to the user.\n   */\n  responseValidator?: (data: unknown) => Promise<unknown>;\n}\n\ntype IsExactlyNeverOrNeverUndefined<T> = [T] extends [never]\n  ? true\n  : [T] extends [never | undefined]\n    ? [undefined] extends [T]\n      ? false\n      : true\n    : false;\n\nexport type OmitNever<T extends Record<string, unknown>> = {\n  [K in keyof T as IsExactlyNeverOrNeverUndefined<T[K]> extends true ? never : K]: T[K];\n};\n"
  },
  {
    "path": "packages/openapi-ts/src/plugins/@hey-api/client-core/bundle/utils.ts",
    "content": "import type { BodySerializer, QuerySerializer } from './bodySerializer';\nimport {\n  type ArraySeparatorStyle,\n  serializeArrayParam,\n  serializeObjectParam,\n  serializePrimitiveParam,\n} from './pathSerializer';\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"
  },
  {
    "path": "packages/openapi-ts/src/plugins/@hey-api/client-core/client.ts",
    "content": "import { parseUrl } from '@hey-api/shared';\n\nimport { getTypedConfig } from '../../../config/utils';\nimport { clientFolderAbsolutePath } from '../../../generate/client';\nimport { $ } from '../../../ts-dsl';\nimport type { PluginHandler } from './types';\nimport { getClientBaseUrlKey } from './utils';\n\nconst resolveBaseUrlString = ({ plugin }: Parameters<PluginHandler>[0]): string | undefined => {\n  const { baseUrl } = plugin.config;\n\n  if (baseUrl === false) {\n    return;\n  }\n\n  if (typeof baseUrl === 'string') {\n    return baseUrl;\n  }\n\n  const { servers } = plugin.context.ir;\n\n  if (!servers) {\n    return;\n  }\n\n  return servers[typeof baseUrl === 'number' ? baseUrl : 0]?.url;\n};\n\nexport const createClient: PluginHandler = ({ plugin }) => {\n  const clientModule = clientFolderAbsolutePath(getTypedConfig(plugin));\n  const symbolCreateClient = plugin.symbol('createClient', {\n    external: clientModule,\n  });\n  const symbolCreateConfig = plugin.symbol('createConfig', {\n    external: clientModule,\n  });\n  const symbolClientOptions = plugin.referenceSymbol({\n    category: 'type',\n    resource: 'client',\n    role: 'options',\n  });\n\n  const { runtimeConfigPath } = plugin.config;\n  const symbolCreateClientConfig = runtimeConfigPath\n    ? plugin.symbol('createClientConfig', {\n        external: runtimeConfigPath,\n      })\n    : undefined;\n\n  const defaultVals = $.object();\n\n  const resolvedBaseUrl = resolveBaseUrlString({\n    plugin: plugin as any,\n  });\n  if (resolvedBaseUrl) {\n    const url = parseUrl(resolvedBaseUrl);\n    if (url.protocol && url.host && !resolvedBaseUrl.includes('{')) {\n      defaultVals.prop(getClientBaseUrlKey(getTypedConfig(plugin)), $.literal(resolvedBaseUrl));\n    } else if (resolvedBaseUrl !== '/' && resolvedBaseUrl.startsWith('/')) {\n      const baseUrl = resolvedBaseUrl.endsWith('/')\n        ? resolvedBaseUrl.slice(0, -1)\n        : resolvedBaseUrl;\n      defaultVals.prop(getClientBaseUrlKey(getTypedConfig(plugin)), $.literal(baseUrl));\n    }\n  }\n\n  if ('throwOnError' in plugin.config && plugin.config.throwOnError) {\n    defaultVals.prop('throwOnError', $.literal(true));\n  }\n\n  const createConfigParameters = [\n    $(symbolCreateConfig)\n      .call(defaultVals.hasProps() ? defaultVals : undefined)\n      .generic(symbolClientOptions),\n  ];\n\n  const symbolClient = plugin.symbol('client', {\n    meta: {\n      category: 'client',\n    },\n  });\n  const statement = $.const(symbolClient)\n    .export()\n    .assign(\n      $(symbolCreateClient).$if(\n        symbolCreateClientConfig,\n        (c, s) => c.call($(s).call(...createConfigParameters)),\n        (c) => c.call(...createConfigParameters),\n      ),\n    );\n  plugin.node(statement);\n};\n"
  },
  {
    "path": "packages/openapi-ts/src/plugins/@hey-api/client-core/config.ts",
    "content": "export const clientDefaultConfig = {\n  baseUrl: true,\n  bundle: true,\n  includeInEntry: false,\n} as const;\n\nexport const clientDefaultMeta = {\n  dependencies: ['@hey-api/typescript'],\n  tags: ['client'],\n} as const;\n"
  },
  {
    "path": "packages/openapi-ts/src/plugins/@hey-api/client-core/createClientConfig.ts",
    "content": "import { getTypedConfig } from '../../../config/utils';\nimport { clientFolderAbsolutePath } from '../../../generate/client';\nimport { $ } from '../../../ts-dsl';\nimport type { PluginHandler } from './types';\n\nexport const createClientConfigType = ({ plugin }: Parameters<PluginHandler>[0]) => {\n  const clientModule = clientFolderAbsolutePath(getTypedConfig(plugin));\n  const symbolClientOptions = plugin.referenceSymbol({\n    category: 'type',\n    resource: 'client',\n    role: 'options',\n  });\n  const symbolConfig = plugin.symbol('Config', {\n    external: clientModule,\n    kind: 'type',\n  });\n  const symbolDefaultClientOptions = plugin.symbol('ClientOptions', {\n    external: clientModule,\n    kind: 'type',\n  });\n  const symbolCreateClientConfig = plugin.symbol('CreateClientConfig');\n\n  const typeCreateClientConfig = $.type\n    .alias(symbolCreateClientConfig)\n    .export()\n    .doc([\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    ])\n    .generic('T', (g) => g.extends(symbolDefaultClientOptions).default(symbolClientOptions))\n    .type(\n      $.type\n        .func()\n        .param('override', (p) =>\n          p\n            .optional()\n            .type($.type(symbolConfig).generic($.type.and(symbolDefaultClientOptions, 'T'))),\n        )\n        .returns(\n          $.type(symbolConfig).generic(\n            $.type.and($.type('Required').generic(symbolDefaultClientOptions), 'T'),\n          ),\n        ),\n    );\n  plugin.node(typeCreateClientConfig);\n};\n"
  },
  {
    "path": "packages/openapi-ts/src/plugins/@hey-api/client-core/plugin.ts",
    "content": "import { createClient } from './client';\nimport { createClientConfigType } from './createClientConfig';\nimport type { PluginHandler } from './types';\n\nexport const clientPluginHandler = ({ plugin }: Parameters<PluginHandler>[0]) => {\n  createClientConfigType({ plugin });\n  createClient({ plugin });\n};\n"
  },
  {
    "path": "packages/openapi-ts/src/plugins/@hey-api/client-core/types.ts",
    "content": "/* eslint-disable @typescript-eslint/no-namespace */\nimport type { Plugin } from '@hey-api/shared';\n\nimport type { HeyApiClientAngularPlugin } from '../../../plugins/@hey-api/client-angular';\nimport type { HeyApiClientAxiosPlugin } from '../../../plugins/@hey-api/client-axios';\nimport type { HeyApiClientFetchPlugin } from '../../../plugins/@hey-api/client-fetch';\nimport type { HeyApiClientNextPlugin } from '../../../plugins/@hey-api/client-next';\nimport type { HeyApiClientNuxtPlugin } from '../../../plugins/@hey-api/client-nuxt';\nimport type { HeyApiClientOfetchPlugin } from '../../../plugins/@hey-api/client-ofetch';\n\nexport interface PluginHandler {\n  (...args: Parameters<HeyApiClientAngularPlugin['Handler']>): void;\n  (...args: Parameters<HeyApiClientAxiosPlugin['Handler']>): void;\n  (...args: Parameters<HeyApiClientFetchPlugin['Handler']>): void;\n  (...args: Parameters<HeyApiClientNextPlugin['Handler']>): void;\n  (...args: Parameters<HeyApiClientNuxtPlugin['Handler']>): void;\n  (...args: Parameters<HeyApiClientOfetchPlugin['Handler']>): void;\n}\n\n/**\n * Public Client API.\n */\nexport namespace Client {\n  export type Config = Plugin.Hooks &\n    Plugin.UserExports & {\n      /**\n       * Set a default base URL when creating the client? You can set `baseUrl`\n       * to a string which will be used as the base URL. If your input defines\n       * server(s), you can set `baseUrl` to a number to pick a specific server\n       * to use as the base URL. You can disable setting the base URL by setting\n       * `baseUrl` to `false`. By default, `baseUrl` is `true` and it will try to\n       * use the first defined server value. If there's none, we won't set a\n       * base URL.\n       *\n       * If the matched URL contains template literals, it will be ignored.\n       *\n       * @default true\n       */\n      baseUrl?: string | number | boolean;\n      /**\n       * Bundle the client module? When `true`, the client module will be copied\n       * from the client plugin and bundled with the generated output.\n       *\n       * @default true\n       */\n      bundle?: boolean;\n      /**\n       * Relative path to the runtime configuration file. This file must export\n       * a `createClientConfig()` function. The `createClientConfig()` function\n       * will be called on client initialization and the returned object will\n       * 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       */\n      runtimeConfigPath?: string;\n      /**\n       * Should the type helper for base URL allow only values matching the\n       * server(s) defined in the input? By default, `strictBaseUrl` is `false`\n       * which will provide type hints and allow you to pass any string.\n       *\n       * Note that setting `strictBaseUrl` to `true` can produce an invalid\n       * build if you specify `baseUrl` which doesn't conform to the type helper.\n       *\n       * @default false\n       */\n      strictBaseUrl?: boolean;\n    };\n}\n"
  },
  {
    "path": "packages/openapi-ts/src/plugins/@hey-api/client-core/utils.ts",
    "content": "import type { Config } from '../../../config/types';\nimport type { PluginClientNames } from '../../types';\n\nexport function getClientBaseUrlKey(config: Config) {\n  const client = getClientPlugin(config);\n  if (client.name === '@hey-api/client-axios' || client.name === '@hey-api/client-nuxt') {\n    return 'baseURL';\n  }\n  return 'baseUrl';\n}\n\nexport function getClientPlugin(\n  config: Config,\n): Config['plugins'][PluginClientNames] & { name: PluginClientNames } {\n  for (const name of config.pluginOrder) {\n    const plugin = config.plugins[name];\n    if (plugin?.tags?.includes('client')) {\n      return plugin as Config['plugins'][PluginClientNames] & {\n        name: PluginClientNames;\n      };\n    }\n  }\n\n  return {\n    config: {\n      // @ts-expect-error\n      name: '',\n    },\n    // @ts-expect-error\n    name: '',\n  };\n}\n"
  },
  {
    "path": "packages/openapi-ts/src/plugins/@hey-api/client-fetch/__tests__/client.test.ts",
    "content": "import type { ResolvedRequestOptions } from '../bundle';\nimport { createClient } from '../bundle/client';\n\ntype MockFetch = ((...args: any[]) => any) & {\n  preconnect?: any;\n};\n\ndescribe('buildUrl', () => {\n  const client = createClient();\n\n  const scenarios: {\n    options: Parameters<typeof client.buildUrl>[0];\n    url: string;\n  }[] = [\n    {\n      options: {\n        url: '',\n      },\n      url: '/',\n    },\n    {\n      options: {\n        url: '/foo',\n      },\n      url: '/foo',\n    },\n    {\n      options: {\n        path: {\n          fooId: 1,\n        },\n        url: '/foo/{fooId}',\n      },\n      url: '/foo/1',\n    },\n    {\n      options: {\n        path: {\n          fooId: 1,\n        },\n        query: {\n          bar: 'baz',\n        },\n        url: '/foo/{fooId}',\n      },\n      url: '/foo/1?bar=baz',\n    },\n    {\n      options: {\n        query: {\n          bar: [],\n          foo: [],\n        },\n        url: '/',\n      },\n      url: '/',\n    },\n    {\n      options: {\n        query: {\n          bar: [],\n          foo: ['abc', 'def'],\n        },\n        url: '/',\n      },\n      url: '/?foo=abc&foo=def',\n    },\n  ];\n\n  it.each(scenarios)('returns $url', ({ options, url }) => {\n    expect(client.buildUrl(options)).toBe(url);\n  });\n\n  it('uses baseUrl from client config by default', () => {\n    const clientWithBase = createClient({ baseUrl: 'https://example.com' });\n    expect(clientWithBase.buildUrl({ url: '/foo' })).toBe('https://example.com/foo');\n  });\n\n  it('allows overriding baseUrl from client config', () => {\n    const clientWithBase = createClient({ baseUrl: 'https://example.com' });\n    expect(clientWithBase.buildUrl({ baseUrl: 'https://other.com', url: '/foo' })).toBe(\n      'https://other.com/foo',\n    );\n  });\n});\n\ndescribe('zero-length body handling', () => {\n  const client = createClient({ baseUrl: 'https://example.com' });\n\n  it('returns empty Blob for zero-length application/octet-stream response', async () => {\n    const mockResponse = new Response(null, {\n      headers: {\n        'Content-Length': '0',\n        'Content-Type': 'application/octet-stream',\n      },\n      status: 200,\n    });\n\n    const mockFetch: MockFetch = vi.fn().mockResolvedValue(mockResponse);\n\n    const result = await client.request({\n      fetch: mockFetch,\n      method: 'GET',\n      url: '/test',\n    });\n\n    expect(result.data).toBeInstanceOf(Blob);\n    expect((result.data as Blob).size).toBe(0);\n  });\n\n  it('returns empty ArrayBuffer for zero-length response with arrayBuffer parseAs', async () => {\n    const mockResponse = new Response(null, {\n      headers: {\n        'Content-Length': '0',\n      },\n      status: 200,\n    });\n\n    const mockFetch: MockFetch = vi.fn().mockResolvedValue(mockResponse);\n\n    const result = await client.request({\n      fetch: mockFetch,\n      method: 'GET',\n      parseAs: 'arrayBuffer',\n      url: '/test',\n    });\n\n    expect(result.data).toBeInstanceOf(ArrayBuffer);\n    expect((result.data as ArrayBuffer).byteLength).toBe(0);\n  });\n\n  it('returns empty string for zero-length text response', async () => {\n    const mockResponse = new Response(null, {\n      headers: {\n        'Content-Length': '0',\n        'Content-Type': 'text/plain',\n      },\n      status: 200,\n    });\n\n    const mockFetch: MockFetch = vi.fn().mockResolvedValue(mockResponse);\n\n    const result = await client.request({\n      fetch: mockFetch,\n      method: 'GET',\n      url: '/test',\n    });\n\n    expect(result.data).toBe('');\n  });\n\n  it('returns empty object for zero-length JSON response', async () => {\n    const mockResponse = new Response(null, {\n      headers: {\n        'Content-Length': '0',\n        'Content-Type': 'application/json',\n      },\n      status: 200,\n    });\n\n    const mockFetch: MockFetch = vi.fn().mockResolvedValue(mockResponse);\n\n    const result = await client.request({\n      fetch: mockFetch,\n      method: 'GET',\n      url: '/test',\n    });\n\n    expect(result.data).toEqual({});\n  });\n\n  it('returns empty FormData for zero-length multipart/form-data response', async () => {\n    const mockResponse = new Response(null, {\n      headers: {\n        'Content-Length': '0',\n        'Content-Type': 'multipart/form-data',\n      },\n      status: 200,\n    });\n\n    const mockFetch: MockFetch = vi.fn().mockResolvedValue(mockResponse);\n\n    const result = await client.request({\n      fetch: mockFetch,\n      method: 'GET',\n      url: '/test',\n    });\n\n    expect(result.data).toBeInstanceOf(FormData);\n    expect([...(result.data as FormData).entries()]).toHaveLength(0);\n  });\n\n  it('returns stream body for zero-length stream response', async () => {\n    const mockBody = new ReadableStream();\n    const mockResponse = new Response(mockBody, {\n      headers: {\n        'Content-Length': '0',\n      },\n      status: 200,\n    });\n\n    const mockFetch: MockFetch = vi.fn().mockResolvedValue(mockResponse);\n\n    const result = await client.request({\n      fetch: mockFetch,\n      method: 'GET',\n      parseAs: 'stream',\n      url: '/test',\n    });\n\n    expect(result.data).toBe(mockBody);\n  });\n\n  it('handles non-zero content correctly for comparison', async () => {\n    const blobContent = new Blob(['test data']);\n    const mockResponse = new Response(blobContent, {\n      headers: {\n        'Content-Type': 'application/octet-stream',\n      },\n      status: 200,\n    });\n\n    const mockFetch: MockFetch = vi.fn().mockResolvedValue(mockResponse);\n\n    const result = await client.request({\n      fetch: mockFetch,\n      method: 'GET',\n      url: '/test',\n    });\n\n    expect(result.data).toBeInstanceOf(Blob);\n    expect((result.data as Blob).size).toBeGreaterThan(0);\n  });\n\n  it('returns empty object for empty JSON response without Content-Length header (status 200)', async () => {\n    // Simulates a server returning an empty body with status 200 and no Content-Length header\n    // This is the scenario described in the issue where response.json() throws\n    const mockResponse = new Response('', {\n      headers: {\n        'Content-Type': 'application/json',\n      },\n      status: 200,\n    });\n\n    const mockFetch: MockFetch = vi.fn().mockResolvedValue(mockResponse);\n\n    const result = await client.request({\n      fetch: mockFetch,\n      method: 'GET',\n      url: '/test',\n    });\n\n    expect(result.data).toEqual({});\n  });\n\n  it('returns empty object for empty response without Content-Length header and no Content-Type (defaults to JSON)', async () => {\n    // Tests the auto-detection behavior when no Content-Type is provided\n    const mockResponse = new Response('', {\n      status: 200,\n    });\n\n    const mockFetch: MockFetch = vi.fn().mockResolvedValue(mockResponse);\n\n    const result = await client.request({\n      fetch: mockFetch,\n      method: 'GET',\n      url: '/test',\n    });\n\n    // When parseAs is 'auto' and no Content-Type header exists, it should handle empty body gracefully\n    expect(result.data).toBeDefined();\n  });\n});\n\ndescribe('unserialized request body handling', () => {\n  const client = createClient({ baseUrl: 'https://example.com' });\n\n  const scenarios = [\n    { body: 0, textValue: '0' },\n    { body: false, textValue: 'false' },\n    { body: 'test string', textValue: 'test string' },\n    { body: '', textValue: '' },\n  ];\n\n  it.each(scenarios)('handles plain text body with $body value', async ({ body, textValue }) => {\n    const mockResponse = new Response(JSON.stringify({ success: true }), {\n      headers: {\n        'Content-Type': 'application/json',\n      },\n      status: 200,\n    });\n\n    const mockFetch: MockFetch = vi.fn().mockResolvedValueOnce(mockResponse);\n\n    const result = await client.post({\n      body,\n      bodySerializer: null,\n      fetch: mockFetch,\n      headers: {\n        'Content-Type': 'text/plain',\n      },\n      url: '/test',\n    });\n\n    expect(mockFetch).toHaveBeenCalledWith(\n      expect.objectContaining({\n        body: expect.any(ReadableStream),\n      }),\n    );\n\n    await expect(result.request.text()).resolves.toEqual(textValue);\n    expect(result.request.headers.get('Content-Type')).toEqual('text/plain');\n  });\n});\n\ndescribe('serialized request body handling', () => {\n  const client = createClient({ baseUrl: 'https://example.com' });\n\n  const scenarios = [\n    {\n      body: '',\n      expectBodyValue: false,\n      expectContentHeader: false,\n      serializedBody: '',\n      textValue: '',\n    },\n    {\n      body: 0,\n      expectBodyValue: true,\n      expectContentHeader: true,\n      serializedBody: 0,\n      textValue: '0',\n    },\n    {\n      body: false,\n      expectBodyValue: true,\n      expectContentHeader: true,\n      serializedBody: false,\n      textValue: 'false',\n    },\n    {\n      body: {},\n      expectBodyValue: true,\n      expectContentHeader: true,\n      serializedBody: '{\"key\":\"value\"}',\n      textValue: '{\"key\":\"value\"}',\n    },\n  ];\n\n  it.each(scenarios)(\n    'handles $serializedBody serializedBody value',\n    async ({ body, expectBodyValue, expectContentHeader, serializedBody, textValue }) => {\n      const mockResponse = new Response(JSON.stringify({ success: true }), {\n        headers: {\n          'Content-Type': 'application/json',\n        },\n        status: 200,\n      });\n\n      const mockFetch: MockFetch = vi.fn().mockResolvedValueOnce(mockResponse);\n\n      const result = await client.post({\n        body,\n        bodySerializer: () => serializedBody,\n        fetch: mockFetch,\n        headers: {\n          'Content-Type': 'application/json',\n        },\n        url: '/test',\n      });\n\n      expect(mockFetch).toHaveBeenCalledWith(\n        expect.objectContaining({\n          body: expectBodyValue ? expect.any(ReadableStream) : null,\n        }),\n      );\n\n      await expect(result.request.text()).resolves.toEqual(textValue);\n      expect(result.request.headers.get('Content-Type')).toEqual(\n        expectContentHeader ? 'application/json' : null,\n      );\n    },\n  );\n});\n\ndescribe('request interceptor', () => {\n  const client = createClient({ baseUrl: 'https://example.com' });\n\n  const scenarios = [\n    {\n      body: 'test string',\n      bodySerializer: null,\n      contentType: 'text/plain',\n      expectedSerializedValue: undefined,\n      expectedValue: async (request: Request) => await request.text(),\n    },\n    {\n      body: { key: 'value' },\n      bodySerializer: (body: unknown) => JSON.stringify(body),\n      contentType: 'application/json',\n      expectedSerializedValue: '{\"key\":\"value\"}',\n      expectedValue: async (request: Request) => await request.json(),\n    },\n  ];\n\n  it.each(scenarios)(\n    'exposes $contentType serialized and raw body values',\n    async ({ body, bodySerializer, contentType, expectedSerializedValue }) => {\n      const mockResponse = new Response(JSON.stringify({ success: true }), {\n        headers: {\n          'Content-Type': 'application/json',\n        },\n        status: 200,\n      });\n\n      const mockFetch: MockFetch = vi.fn().mockResolvedValueOnce(mockResponse);\n\n      const mockRequestInterceptor = vi\n        .fn()\n        .mockImplementation((request: Request, options: ResolvedRequestOptions) => {\n          expect(options.serializedBody).toBe(expectedSerializedValue);\n          expect(options.body).toBe(body);\n\n          return request;\n        });\n\n      const interceptorId = client.interceptors.request.use(mockRequestInterceptor);\n\n      await client.post({\n        body,\n        bodySerializer,\n        fetch: mockFetch,\n        headers: {\n          'Content-Type': contentType,\n        },\n        url: '/test',\n      });\n\n      expect(mockRequestInterceptor).toHaveBeenCalledOnce();\n\n      client.interceptors.request.eject(interceptorId);\n    },\n  );\n});\n\ndescribe('error interceptor for fetch exceptions', () => {\n  it('intercepts AbortError when fetch is aborted', async () => {\n    const client = createClient({ baseUrl: 'https://example.com' });\n\n    const abortError = new DOMException('The operation was aborted', 'AbortError');\n    const mockFetch: MockFetch = vi.fn().mockRejectedValue(abortError);\n\n    const mockErrorInterceptor = vi.fn().mockImplementation((error) => {\n      expect(error).toBe(abortError);\n      return { message: 'Request was aborted', type: 'abort' };\n    });\n\n    const interceptorId = client.interceptors.error.use(mockErrorInterceptor);\n\n    const result = await client.get({\n      fetch: mockFetch,\n      url: '/test',\n    });\n\n    expect(mockErrorInterceptor).toHaveBeenCalledOnce();\n    expect(result.error).toEqual({\n      message: 'Request was aborted',\n      type: 'abort',\n    });\n\n    client.interceptors.error.eject(interceptorId);\n  });\n\n  it('intercepts network errors', async () => {\n    const client = createClient({ baseUrl: 'https://example.com' });\n\n    const networkError = new TypeError('Failed to fetch');\n    const mockFetch: MockFetch = vi.fn().mockRejectedValue(networkError);\n\n    const mockErrorInterceptor = vi.fn().mockImplementation((error) => {\n      expect(error).toBe(networkError);\n      return { message: 'Network error occurred', type: 'network' };\n    });\n\n    const interceptorId = client.interceptors.error.use(mockErrorInterceptor);\n\n    const result = await client.get({\n      fetch: mockFetch,\n      url: '/test',\n    });\n\n    expect(mockErrorInterceptor).toHaveBeenCalledOnce();\n    expect(result.error).toEqual({\n      message: 'Network error occurred',\n      type: 'network',\n    });\n\n    client.interceptors.error.eject(interceptorId);\n  });\n\n  it('throws AbortError when throwOnError is true', async () => {\n    const client = createClient({ baseUrl: 'https://example.com' });\n\n    const abortError = new DOMException('The operation was aborted', 'AbortError');\n    const mockFetch: MockFetch = vi.fn().mockRejectedValue(abortError);\n\n    const mockErrorInterceptor = vi.fn().mockImplementation(() => ({\n      message: 'Request was aborted',\n      type: 'abort',\n    }));\n\n    const interceptorId = client.interceptors.error.use(mockErrorInterceptor);\n\n    await expect(\n      client.get({\n        fetch: mockFetch,\n        throwOnError: true,\n        url: '/test',\n      }),\n    ).rejects.toEqual({ message: 'Request was aborted', type: 'abort' });\n\n    expect(mockErrorInterceptor).toHaveBeenCalledOnce();\n\n    client.interceptors.error.eject(interceptorId);\n  });\n\n  it('handles fetch exceptions without error interceptor', async () => {\n    const client = createClient({ baseUrl: 'https://example.com' });\n\n    const abortError = new DOMException('The operation was aborted', 'AbortError');\n    const mockFetch: MockFetch = vi.fn().mockRejectedValue(abortError);\n\n    const result = await client.get({\n      fetch: mockFetch,\n      url: '/test',\n    });\n\n    expect(result.error).toBe(abortError);\n  });\n});\n"
  },
  {
    "path": "packages/openapi-ts/src/plugins/@hey-api/client-fetch/__tests__/utils.test.ts",
    "content": "import type { Auth } from '../../client-core/bundle/auth';\nimport type { Client } from '../bundle/types';\nimport { buildUrl, getParseAs, setAuthParams } from '../bundle/utils';\n\ndescribe('buildUrl', () => {\n  const scenarios: Array<{\n    options: Parameters<Client['buildUrl']>[0];\n    url: string;\n  }> = [\n    {\n      options: {\n        path: {\n          id: new Date('2025-01-01T00:00:00.000Z'),\n        },\n        url: '/foo/{id}',\n      },\n      url: '/foo/2025-01-01T00:00:00.000Z',\n    },\n  ];\n\n  it.each(scenarios)('builds $url', async ({ options, url }) => {\n    expect(buildUrl(options)).toEqual(url);\n  });\n});\n\ndescribe('getParseAs', () => {\n  const scenarios: Array<{\n    content: Parameters<typeof getParseAs>[0];\n    parseAs: ReturnType<typeof getParseAs>;\n  }> = [\n    {\n      content: null,\n      parseAs: 'stream',\n    },\n    {\n      content: 'application/json',\n      parseAs: 'json',\n    },\n    {\n      content: 'application/ld+json',\n      parseAs: 'json',\n    },\n    {\n      content: 'application/ld+json;charset=utf-8',\n      parseAs: 'json',\n    },\n    {\n      content: 'application/ld+json; charset=utf-8',\n      parseAs: 'json',\n    },\n    {\n      content: 'multipart/form-data',\n      parseAs: 'formData',\n    },\n    {\n      content: 'application/*',\n      parseAs: 'blob',\n    },\n    {\n      content: 'audio/*',\n      parseAs: 'blob',\n    },\n    {\n      content: 'image/*',\n      parseAs: 'blob',\n    },\n    {\n      content: 'video/*',\n      parseAs: 'blob',\n    },\n    {\n      content: 'text/*',\n      parseAs: 'text',\n    },\n    {\n      content: 'unsupported',\n      parseAs: undefined,\n    },\n  ];\n\n  it.each(scenarios)('detects $content as $parseAs', async ({ content, parseAs }) => {\n    expect(getParseAs(content)).toEqual(parseAs);\n  });\n});\n\ndescribe('setAuthParams', () => {\n  it('sets bearer token in headers', async () => {\n    const auth = vi.fn().mockReturnValue('foo');\n    const headers = new Headers();\n    const query: Record<any, unknown> = {};\n    await setAuthParams({\n      auth,\n      headers,\n      query,\n      security: [\n        {\n          name: 'baz',\n          scheme: 'bearer',\n          type: 'http',\n        },\n      ],\n    });\n    expect(auth).toHaveBeenCalled();\n    expect(headers.get('baz')).toBe('Bearer foo');\n    expect(Object.keys(query).length).toBe(0);\n  });\n\n  it('sets access token in query', async () => {\n    const auth = vi.fn().mockReturnValue('foo');\n    const headers = new Headers();\n    const query: Record<any, unknown> = {};\n    await setAuthParams({\n      auth,\n      headers,\n      query,\n      security: [\n        {\n          in: 'query',\n          name: 'baz',\n          scheme: 'bearer',\n          type: 'http',\n        },\n      ],\n    });\n    expect(auth).toHaveBeenCalled();\n    expect(headers.get('baz')).toBeNull();\n    expect(query.baz).toBe('Bearer foo');\n  });\n\n  it('sets Authorization header when `in` and `name` are undefined', async () => {\n    const auth = vi.fn().mockReturnValue('foo');\n    const headers = new Headers();\n    const query: Record<any, unknown> = {};\n    await setAuthParams({\n      auth,\n      headers,\n      query,\n      security: [\n        {\n          type: 'http',\n        },\n      ],\n    });\n    expect(auth).toHaveBeenCalled();\n    expect(headers.get('Authorization')).toBe('foo');\n    expect(query).toEqual({});\n  });\n\n  it('sets first scheme only', async () => {\n    const auth = vi.fn().mockReturnValue('foo');\n    const headers = new Headers();\n    const query: Record<any, unknown> = {};\n    await setAuthParams({\n      auth,\n      headers,\n      query,\n      security: [\n        {\n          name: 'baz',\n          scheme: 'bearer',\n          type: 'http',\n        },\n        {\n          in: 'query',\n          name: 'baz',\n          scheme: 'bearer',\n          type: 'http',\n        },\n      ],\n    });\n    expect(auth).toHaveBeenCalled();\n    expect(headers.get('baz')).toBe('Bearer foo');\n    expect(Object.keys(query).length).toBe(0);\n  });\n\n  it('sets first scheme with token', async () => {\n    const auth = vi.fn().mockImplementation((auth: Auth) => {\n      if (auth.type === 'apiKey') {\n        return;\n      }\n      return 'foo';\n    });\n    const headers = new Headers();\n    const query: Record<any, unknown> = {};\n    await setAuthParams({\n      auth,\n      headers,\n      query,\n      security: [\n        {\n          name: 'baz',\n          type: 'apiKey',\n        },\n        {\n          in: 'query',\n          name: 'baz',\n          scheme: 'bearer',\n          type: 'http',\n        },\n      ],\n    });\n    expect(auth).toHaveBeenCalled();\n    expect(headers.get('baz')).toBeNull();\n    expect(query.baz).toBe('Bearer foo');\n  });\n\n  it('sets an API key in a cookie', async () => {\n    const auth = vi.fn().mockReturnValue('foo');\n    const headers = new Headers();\n    const query: Record<any, unknown> = {};\n    await setAuthParams({\n      auth,\n      headers,\n      query,\n      security: [\n        {\n          in: 'cookie',\n          name: 'baz',\n          type: 'apiKey',\n        },\n      ],\n    });\n    expect(auth).toHaveBeenCalled();\n    expect(headers.get('Cookie')).toBe('baz=foo');\n    expect(query).toEqual({});\n  });\n\n  it('sets only one specific header', async () => {\n    const auth = vi.fn(({ name }: Auth) => {\n      if (name === 'baz') {\n        return 'foo';\n      }\n      return 'buz';\n    });\n    const headers = new Headers();\n    const query: Record<any, unknown> = {};\n    await setAuthParams({\n      auth,\n      headers,\n      query,\n      security: [\n        {\n          name: 'baz',\n          scheme: 'bearer',\n          type: 'http',\n        },\n        {\n          name: 'fiz',\n          type: 'http',\n        },\n        {\n          in: 'query',\n          name: 'baz',\n          scheme: 'bearer',\n          type: 'http',\n        },\n      ],\n    });\n    expect(auth).toHaveBeenCalled();\n    expect(headers.get('baz')).toBe('Bearer foo');\n    expect(headers.get('fiz')).toBe('buz');\n    expect(Object.keys(query).length).toBe(0);\n  });\n});\n"
  },
  {
    "path": "packages/openapi-ts/src/plugins/@hey-api/client-fetch/bundle/client.ts",
    "content": "import { createSseClient } from '../../client-core/bundle/serverSentEvents';\nimport type { HttpMethod } from '../../client-core/bundle/types';\nimport { getValidRequestBody } from '../../client-core/bundle/utils';\nimport type { Client, Config, RequestOptions, ResolvedRequestOptions } from './types';\nimport {\n  buildUrl,\n  createConfig,\n  createInterceptors,\n  getParseAs,\n  mergeConfigs,\n  mergeHeaders,\n  setAuthParams,\n} from './utils';\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 (options: RequestOptions) => {\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 url = buildUrl(opts);\n\n    return { opts, url };\n  };\n\n  const request: Client['request'] = async (options) => {\n    // @ts-expect-error\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"
  },
  {
    "path": "packages/openapi-ts/src/plugins/@hey-api/client-fetch/bundle/index.ts",
    "content": "export type { Auth } from '../../client-core/bundle/auth';\nexport type { QuerySerializerOptions } from '../../client-core/bundle/bodySerializer';\nexport {\n  formDataBodySerializer,\n  jsonBodySerializer,\n  urlSearchParamsBodySerializer,\n} from '../../client-core/bundle/bodySerializer';\nexport { buildClientParams } from '../../client-core/bundle/params';\nexport { serializeQueryKeyValue } from '../../client-core/bundle/queryKeySerializer';\nexport { createClient } from './client';\nexport type {\n  Client,\n  ClientOptions,\n  Config,\n  CreateClientConfig,\n  Options,\n  RequestOptions,\n  RequestResult,\n  ResolvedRequestOptions,\n  ResponseStyle,\n  TDataShape,\n} from './types';\nexport { createConfig, mergeHeaders } from './utils';\n"
  },
  {
    "path": "packages/openapi-ts/src/plugins/@hey-api/client-fetch/bundle/types.ts",
    "content": "import type { Auth } from '../../client-core/bundle/auth';\nimport type {\n  ServerSentEventsOptions,\n  ServerSentEventsResult,\n} from '../../client-core/bundle/serverSentEvents';\nimport type { Client as CoreClient, Config as CoreConfig } from '../../client-core/bundle/types';\nimport type { Middleware } from './utils';\n\nexport type ResponseStyle = 'data' | 'fields';\n\nexport interface Config<T extends ClientOptions = ClientOptions>\n  extends Omit<RequestInit, 'body' | 'headers' | 'method'>, CoreConfig {\n  /**\n   * Base URL for all requests made by this client.\n   */\n  baseUrl?: T['baseUrl'];\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   * Please don't use the Fetch client for Next.js applications. The `next`\n   * options won't have any effect.\n   *\n   * Install {@link https://www.npmjs.com/package/@hey-api/client-next `@hey-api/client-next`} instead.\n   */\n  next?: never;\n  /**\n   * Return the response data parsed in a specified format. By default, `auto`\n   * will infer the appropriate method from the `Content-Type` response header.\n   * You can override this behavior with any of the {@link Body} methods.\n   * Select `stream` if you don't want to parse response data at all.\n   *\n   * @default 'auto'\n   */\n  parseAs?: 'arrayBuffer' | 'auto' | 'blob' | 'formData' | 'json' | 'stream' | 'text';\n  /**\n   * Should we return only data or multiple fields (data, error, response, etc.)?\n   *\n   * @default 'fields'\n   */\n  responseStyle?: ResponseStyle;\n  /**\n   * Throw an error instead of returning it in the response?\n   *\n   * @default false\n   */\n  throwOnError?: T['throwOnError'];\n}\n\nexport interface RequestOptions<\n  TData = unknown,\n  TResponseStyle extends ResponseStyle = 'fields',\n  ThrowOnError extends boolean = boolean,\n  Url extends string = string,\n>\n  extends\n    Config<{\n      responseStyle: TResponseStyle;\n      throwOnError: ThrowOnError;\n    }>,\n    Pick<\n      ServerSentEventsOptions<TData>,\n      | 'onRequest'\n      | 'onSseError'\n      | 'onSseEvent'\n      | 'sseDefaultRetryDelay'\n      | 'sseMaxRetryAttempts'\n      | 'sseMaxRetryDelay'\n    > {\n  /**\n   * Any body that you want to add to your request.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/fetch#body}\n   */\n  body?: unknown;\n  path?: Record<string, unknown>;\n  query?: Record<string, unknown>;\n  /**\n   * Security mechanism(s) to use for the request.\n   */\n  security?: ReadonlyArray<Auth>;\n  url: Url;\n}\n\nexport interface ResolvedRequestOptions<\n  TResponseStyle extends ResponseStyle = 'fields',\n  ThrowOnError extends boolean = boolean,\n  Url extends string = string,\n> extends RequestOptions<unknown, TResponseStyle, ThrowOnError, Url> {\n  serializedBody?: string;\n}\n\nexport type RequestResult<\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = boolean,\n  TResponseStyle extends ResponseStyle = 'fields',\n> = ThrowOnError extends true\n  ? Promise<\n      TResponseStyle extends 'data'\n        ? TData extends Record<string, unknown>\n          ? TData[keyof TData]\n          : TData\n        : {\n            data: TData extends Record<string, unknown> ? TData[keyof TData] : TData;\n            request: Request;\n            response: Response;\n          }\n    >\n  : Promise<\n      TResponseStyle extends 'data'\n        ? (TData extends Record<string, unknown> ? TData[keyof TData] : TData) | undefined\n        : (\n            | {\n                data: TData extends Record<string, unknown> ? TData[keyof TData] : TData;\n                error: undefined;\n              }\n            | {\n                data: undefined;\n                error: TError extends Record<string, unknown> ? TError[keyof TError] : TError;\n              }\n          ) & {\n            request: Request;\n            response: Response;\n          }\n    >;\n\nexport interface ClientOptions {\n  baseUrl?: string;\n  responseStyle?: ResponseStyle;\n  throwOnError?: boolean;\n}\n\ntype MethodFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'>,\n) => RequestResult<TData, TError, ThrowOnError, TResponseStyle>;\n\ntype SseFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'>,\n) => Promise<ServerSentEventsResult<TData, TError>>;\n\ntype RequestFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'> &\n    Pick<Required<RequestOptions<TData, TResponseStyle, ThrowOnError>>, 'method'>,\n) => RequestResult<TData, TError, ThrowOnError, TResponseStyle>;\n\ntype BuildUrlFn = <\n  TData extends {\n    body?: unknown;\n    path?: Record<string, unknown>;\n    query?: Record<string, unknown>;\n    url: string;\n  },\n>(\n  options: TData & Options<TData>,\n) => string;\n\nexport type Client = CoreClient<RequestFn, Config, MethodFn, BuildUrlFn, SseFn> & {\n  interceptors: Middleware<Request, Response, unknown, ResolvedRequestOptions>;\n};\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 = ClientOptions> = (\n  override?: Config<ClientOptions & T>,\n) => Config<Required<ClientOptions> & T>;\n\nexport interface TDataShape {\n  body?: unknown;\n  headers?: unknown;\n  path?: unknown;\n  query?: unknown;\n  url: string;\n}\n\ntype OmitKeys<T, K> = Pick<T, Exclude<keyof T, K>>;\n\nexport type Options<\n  TData extends TDataShape = TDataShape,\n  ThrowOnError extends boolean = boolean,\n  TResponse = unknown,\n  TResponseStyle extends ResponseStyle = 'fields',\n> = OmitKeys<\n  RequestOptions<TResponse, TResponseStyle, ThrowOnError>,\n  'body' | 'path' | 'query' | 'url'\n> &\n  ([TData] extends [never] ? unknown : Omit<TData, 'url'>);\n"
  },
  {
    "path": "packages/openapi-ts/src/plugins/@hey-api/client-fetch/bundle/utils.ts",
    "content": "import { getAuthToken } from '../../client-core/bundle/auth';\nimport type { QuerySerializerOptions } from '../../client-core/bundle/bodySerializer';\nimport { jsonBodySerializer } from '../../client-core/bundle/bodySerializer';\nimport {\n  serializeArrayParam,\n  serializeObjectParam,\n  serializePrimitiveParam,\n} from '../../client-core/bundle/pathSerializer';\nimport { getUrl } from '../../client-core/bundle/utils';\nimport type { Client, ClientOptions, Config, RequestOptions } from './types';\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"
  },
  {
    "path": "packages/openapi-ts/src/plugins/@hey-api/client-fetch/config.ts",
    "content": "import { definePluginConfig } from '@hey-api/shared';\n\nimport {\n  clientDefaultConfig,\n  clientDefaultMeta,\n} from '../../../plugins/@hey-api/client-core/config';\nimport { clientPluginHandler } from '../../../plugins/@hey-api/client-core/plugin';\nimport type { HeyApiClientFetchPlugin } from './types';\n\nexport const defaultConfig: HeyApiClientFetchPlugin['Config'] = {\n  ...clientDefaultMeta,\n  config: {\n    ...clientDefaultConfig,\n    throwOnError: false,\n  },\n  handler: clientPluginHandler as unknown as HeyApiClientFetchPlugin['Handler'],\n  name: '@hey-api/client-fetch',\n};\n\n/**\n * Type helper for `@hey-api/client-fetch` plugin, returns {@link Plugin.Config} object\n */\nexport const defineConfig = definePluginConfig(defaultConfig);\n"
  },
  {
    "path": "packages/openapi-ts/src/plugins/@hey-api/client-fetch/index.ts",
    "content": "export type { Client as FetchClient } from './bundle/types';\nexport { defaultConfig, defineConfig } from './config';\nexport type { HeyApiClientFetchPlugin } from './types';\n"
  },
  {
    "path": "packages/openapi-ts/src/plugins/@hey-api/client-fetch/types.ts",
    "content": "import type { DefinePlugin, Plugin } from '@hey-api/shared';\n\nimport type { Client } from '../../../plugins/@hey-api/client-core/types';\n\nexport type UserConfig = Plugin.Name<'@hey-api/client-fetch'> &\n  Client.Config & {\n    /**\n     * Throw an error instead of returning it in the response?\n     *\n     * @default false\n     */\n    throwOnError?: boolean;\n  };\n\nexport type HeyApiClientFetchPlugin = DefinePlugin<UserConfig, UserConfig>;\n"
  },
  {
    "path": "packages/openapi-ts/src/plugins/@hey-api/client-ky/__tests__/client.test.ts",
    "content": "import type { KyInstance } from 'ky';\nimport { HTTPError } from 'ky';\n\nimport type { ResolvedRequestOptions } from '../bundle';\nimport { createClient } from '../bundle/client';\n\ndescribe('buildUrl', () => {\n  const client = createClient();\n\n  const scenarios: {\n    options: Parameters<typeof client.buildUrl>[0];\n    url: string;\n  }[] = [\n    {\n      options: {\n        url: '',\n      },\n      url: '/',\n    },\n    {\n      options: {\n        url: '/foo',\n      },\n      url: '/foo',\n    },\n    {\n      options: {\n        path: {\n          fooId: 1,\n        },\n        url: '/foo/{fooId}',\n      },\n      url: '/foo/1',\n    },\n    {\n      options: {\n        path: {\n          fooId: 1,\n        },\n        query: {\n          bar: 'baz',\n        },\n        url: '/foo/{fooId}',\n      },\n      url: '/foo/1?bar=baz',\n    },\n    {\n      options: {\n        query: {\n          bar: [],\n          foo: [],\n        },\n        url: '/',\n      },\n      url: '/',\n    },\n    {\n      options: {\n        query: {\n          bar: [],\n          foo: ['abc', 'def'],\n        },\n        url: '/',\n      },\n      url: '/?foo=abc&foo=def',\n    },\n  ];\n\n  it.each(scenarios)('returns $url', ({ options, url }) => {\n    expect(client.buildUrl(options)).toBe(url);\n  });\n\n  it('uses baseUrl from client config by default', () => {\n    const clientWithBase = createClient({ baseUrl: 'https://example.com' });\n    expect(clientWithBase.buildUrl({ url: '/foo' })).toBe('https://example.com/foo');\n  });\n\n  it('allows overriding baseUrl from client config', () => {\n    const clientWithBase = createClient({ baseUrl: 'https://example.com' });\n    expect(clientWithBase.buildUrl({ baseUrl: 'https://other.com', url: '/foo' })).toBe(\n      'https://other.com/foo',\n    );\n  });\n});\n\ndescribe('zero-length body handling', () => {\n  const client = createClient({ baseUrl: 'https://example.com' });\n\n  it('returns empty Blob for zero-length application/octet-stream response', async () => {\n    const mockResponse = new Response(null, {\n      headers: {\n        'Content-Length': '0',\n        'Content-Type': 'application/octet-stream',\n      },\n      status: 200,\n    });\n\n    const mockKy = vi.fn().mockResolvedValue(mockResponse);\n\n    const result = await client.request({\n      ky: mockKy as Partial<KyInstance> as KyInstance,\n      method: 'GET',\n      url: '/test',\n    });\n\n    expect(result.data).toBeInstanceOf(Blob);\n    expect((result.data as Blob).size).toBe(0);\n  });\n\n  it('returns empty ArrayBuffer for zero-length response with arrayBuffer parseAs', async () => {\n    const mockResponse = new Response(null, {\n      headers: {\n        'Content-Length': '0',\n      },\n      status: 200,\n    });\n\n    const mockKy = vi.fn().mockResolvedValue(mockResponse);\n\n    const result = await client.request({\n      ky: mockKy as Partial<KyInstance> as KyInstance,\n      method: 'GET',\n      parseAs: 'arrayBuffer',\n      url: '/test',\n    });\n\n    expect(result.data).toBeInstanceOf(ArrayBuffer);\n    expect((result.data as ArrayBuffer).byteLength).toBe(0);\n  });\n\n  it('returns empty string for zero-length text response', async () => {\n    const mockResponse = new Response(null, {\n      headers: {\n        'Content-Length': '0',\n        'Content-Type': 'text/plain',\n      },\n      status: 200,\n    });\n\n    const mockKy = vi.fn().mockResolvedValue(mockResponse);\n\n    const result = await client.request({\n      ky: mockKy as Partial<KyInstance> as KyInstance,\n      method: 'GET',\n      url: '/test',\n    });\n\n    expect(result.data).toBe('');\n  });\n\n  it('returns empty object for zero-length JSON response', async () => {\n    const mockResponse = new Response(null, {\n      headers: {\n        'Content-Length': '0',\n        'Content-Type': 'application/json',\n      },\n      status: 200,\n    });\n\n    const mockKy = vi.fn().mockResolvedValue(mockResponse);\n\n    const result = await client.request({\n      ky: mockKy as Partial<KyInstance> as KyInstance,\n      method: 'GET',\n      url: '/test',\n    });\n\n    expect(result.data).toEqual({});\n  });\n\n  it('returns empty FormData for zero-length multipart/form-data response', async () => {\n    const mockResponse = new Response(null, {\n      headers: {\n        'Content-Length': '0',\n        'Content-Type': 'multipart/form-data',\n      },\n      status: 200,\n    });\n\n    const mockKy = vi.fn().mockResolvedValue(mockResponse);\n\n    const result = await client.request({\n      ky: mockKy as Partial<KyInstance> as KyInstance,\n      method: 'GET',\n      url: '/test',\n    });\n\n    expect(result.data).toBeInstanceOf(FormData);\n    expect([...(result.data as FormData).entries()]).toHaveLength(0);\n  });\n\n  it('returns stream body for zero-length stream response', async () => {\n    const mockBody = new ReadableStream();\n    const mockResponse = new Response(mockBody, {\n      headers: {\n        'Content-Length': '0',\n      },\n      status: 200,\n    });\n\n    const mockKy = vi.fn().mockResolvedValue(mockResponse);\n\n    const result = await client.request({\n      ky: mockKy as Partial<KyInstance> as KyInstance,\n      method: 'GET',\n      parseAs: 'stream',\n      url: '/test',\n    });\n\n    expect(result.data).toBe(mockBody);\n  });\n\n  it('handles non-zero content correctly for comparison', async () => {\n    const blobContent = new Blob(['test data']);\n    const mockResponse = new Response(blobContent, {\n      headers: {\n        'Content-Type': 'application/octet-stream',\n      },\n      status: 200,\n    });\n\n    const mockKy = vi.fn().mockResolvedValue(mockResponse);\n\n    const result = await client.request({\n      ky: mockKy as Partial<KyInstance> as KyInstance,\n      method: 'GET',\n      url: '/test',\n    });\n\n    expect(result.data).toBeInstanceOf(Blob);\n    expect((result.data as Blob).size).toBeGreaterThan(0);\n  });\n\n  it('returns empty object for empty JSON response without Content-Length header (status 200)', async () => {\n    // Simulates a server returning an empty body with status 200 and no Content-Length header\n    // This is the scenario described in the issue where response.json() throws\n    const mockResponse = new Response('', {\n      headers: {\n        'Content-Type': 'application/json',\n      },\n      status: 200,\n    });\n\n    const mockKy = vi.fn().mockResolvedValue(mockResponse);\n\n    const result = await client.request({\n      ky: mockKy as Partial<KyInstance> as KyInstance,\n      method: 'GET',\n      url: '/test',\n    });\n\n    expect(result.data).toEqual({});\n  });\n\n  it('returns empty object for empty response without Content-Length header and no Content-Type (defaults to JSON)', async () => {\n    // Tests the auto-detection behavior when no Content-Type is provided\n    const mockResponse = new Response('', {\n      status: 200,\n    });\n\n    const mockKy = vi.fn().mockResolvedValue(mockResponse);\n\n    const result = await client.request({\n      ky: mockKy as Partial<KyInstance> as KyInstance,\n      method: 'GET',\n      url: '/test',\n    });\n\n    // When parseAs is 'auto' and no Content-Type header exists, it should handle empty body gracefully\n    expect(result.data).toBeDefined();\n  });\n});\n\ndescribe('unserialized request body handling', () => {\n  const client = createClient({ baseUrl: 'https://example.com' });\n\n  const scenarios = [\n    { body: 0, textValue: '0' },\n    { body: false, textValue: 'false' },\n    { body: 'test string', textValue: 'test string' },\n    { body: '', textValue: '' },\n  ];\n\n  it.each(scenarios)('handles plain text body with $body value', async ({ body, textValue }) => {\n    const mockResponse = new Response(JSON.stringify({ success: true }), {\n      headers: {\n        'Content-Type': 'application/json',\n      },\n      status: 200,\n    });\n\n    const mockKy = vi.fn().mockResolvedValueOnce(mockResponse);\n\n    const result = await client.post({\n      body,\n      bodySerializer: null,\n      headers: {\n        'Content-Type': 'text/plain',\n      },\n      ky: mockKy as Partial<KyInstance> as KyInstance,\n      url: '/test',\n    });\n\n    expect(mockKy).toHaveBeenCalledWith(\n      expect.objectContaining({\n        body: expect.any(ReadableStream),\n      }),\n      expect.any(Object),\n    );\n\n    await expect(result.request.text()).resolves.toEqual(textValue);\n    expect(result.request.headers.get('Content-Type')).toEqual('text/plain');\n  });\n});\n\ndescribe('serialized request body handling', () => {\n  const client = createClient({ baseUrl: 'https://example.com' });\n\n  const scenarios = [\n    {\n      body: '',\n      expectBodyValue: false,\n      expectContentHeader: false,\n      serializedBody: '',\n      textValue: '',\n    },\n    {\n      body: 0,\n      expectBodyValue: true,\n      expectContentHeader: true,\n      serializedBody: 0,\n      textValue: '0',\n    },\n    {\n      body: false,\n      expectBodyValue: true,\n      expectContentHeader: true,\n      serializedBody: false,\n      textValue: 'false',\n    },\n    {\n      body: {},\n      expectBodyValue: true,\n      expectContentHeader: true,\n      serializedBody: '{\"key\":\"value\"}',\n      textValue: '{\"key\":\"value\"}',\n    },\n  ];\n\n  it.each(scenarios)(\n    'handles $serializedBody serializedBody value',\n    async ({ body, expectBodyValue, expectContentHeader, serializedBody, textValue }) => {\n      const mockResponse = new Response(JSON.stringify({ success: true }), {\n        headers: {\n          'Content-Type': 'application/json',\n        },\n        status: 200,\n      });\n\n      const mockKy = vi.fn().mockResolvedValueOnce(mockResponse);\n\n      const result = await client.post({\n        body,\n        bodySerializer: () => serializedBody,\n        headers: {\n          'Content-Type': 'application/json',\n        },\n        ky: mockKy as Partial<KyInstance> as KyInstance,\n        url: '/test',\n      });\n\n      expect(mockKy).toHaveBeenCalledWith(\n        expect.objectContaining({\n          body: expectBodyValue ? expect.any(ReadableStream) : null,\n        }),\n        expect.any(Object),\n      );\n\n      await expect(result.request.text()).resolves.toEqual(textValue);\n      expect(result.request.headers.get('Content-Type')).toEqual(\n        expectContentHeader ? 'application/json' : null,\n      );\n    },\n  );\n});\n\ndescribe('request interceptor', () => {\n  const client = createClient({ baseUrl: 'https://example.com' });\n\n  const scenarios = [\n    {\n      body: 'test string',\n      bodySerializer: null,\n      contentType: 'text/plain',\n      expectedSerializedValue: undefined,\n      expectedValue: async (request: Request) => await request.text(),\n    },\n    {\n      body: { key: 'value' },\n      bodySerializer: (body: unknown) => JSON.stringify(body),\n      contentType: 'application/json',\n      expectedSerializedValue: '{\"key\":\"value\"}',\n      expectedValue: async (request: Request) => await request.json(),\n    },\n  ];\n\n  it.each(scenarios)(\n    'exposes $contentType serialized and raw body values',\n    async ({ body, bodySerializer, contentType, expectedSerializedValue }) => {\n      const mockResponse = new Response(JSON.stringify({ success: true }), {\n        headers: {\n          'Content-Type': 'application/json',\n        },\n        status: 200,\n      });\n\n      const mockKy = vi.fn().mockResolvedValueOnce(mockResponse);\n\n      const mockRequestInterceptor = vi\n        .fn()\n        .mockImplementation((request: Request, options: ResolvedRequestOptions) => {\n          expect(options.serializedBody).toBe(expectedSerializedValue);\n          expect(options.body).toBe(body);\n\n          return request;\n        });\n\n      const interceptorId = client.interceptors.request.use(mockRequestInterceptor);\n\n      await client.post({\n        body,\n        bodySerializer,\n        headers: {\n          'Content-Type': contentType,\n        },\n        ky: mockKy as Partial<KyInstance> as KyInstance,\n        url: '/test',\n      });\n\n      expect(mockRequestInterceptor).toHaveBeenCalledOnce();\n\n      client.interceptors.request.eject(interceptorId);\n    },\n  );\n});\n\ndescribe('response interceptor', () => {\n  const client = createClient({ baseUrl: 'https://example.com' });\n\n  it('allows response transformation', async () => {\n    const mockResponse = new Response(JSON.stringify({ success: true }), {\n      headers: {\n        'Content-Type': 'application/json',\n      },\n      status: 200,\n    });\n\n    const mockKy = vi.fn().mockResolvedValue(mockResponse);\n\n    const mockResponseInterceptor = vi.fn().mockImplementation((response: Response) => {\n      expect(response).toBe(mockResponse);\n      return response;\n    });\n\n    const interceptorId = client.interceptors.response.use(mockResponseInterceptor);\n\n    await client.get({\n      ky: mockKy as Partial<KyInstance> as KyInstance,\n      url: '/test',\n    });\n\n    expect(mockResponseInterceptor).toHaveBeenCalledOnce();\n\n    client.interceptors.response.eject(interceptorId);\n  });\n});\n\ndescribe('error handling', () => {\n  const client = createClient({ baseUrl: 'https://example.com' });\n\n  it('handles HTTP errors with throwOnError: false', async () => {\n    const errorResponse = new Response(JSON.stringify({ message: 'Not found' }), {\n      headers: {\n        'Content-Type': 'application/json',\n      },\n      status: 404,\n    });\n\n    const mockKy = vi.fn().mockRejectedValue(\n      new HTTPError(errorResponse, new Request('https://example.com/test'), {\n        method: 'GET',\n      } as any),\n    );\n\n    const result = await client.get({\n      ky: mockKy as Partial<KyInstance> as KyInstance,\n      throwOnError: false,\n      url: '/test',\n    });\n\n    expect(result.error).toEqual({ message: 'Not found' });\n    expect(result.response.status).toBe(404);\n  });\n\n  it('throws HTTP errors with throwOnError: true', async () => {\n    const errorResponse = new Response(JSON.stringify({ message: 'Not found' }), {\n      headers: {\n        'Content-Type': 'application/json',\n      },\n      status: 404,\n    });\n\n    const mockKy = vi.fn().mockRejectedValue(\n      new HTTPError(errorResponse, new Request('https://example.com/test'), {\n        method: 'GET',\n      } as any),\n    );\n\n    await expect(\n      client.get({\n        ky: mockKy as Partial<KyInstance> as KyInstance,\n        throwOnError: true,\n        url: '/test',\n      }),\n    ).rejects.toEqual({ message: 'Not found' });\n  });\n\n  it('handles text error responses', async () => {\n    const errorResponse = new Response('Internal Server Error', {\n      status: 500,\n    });\n\n    const mockKy = vi.fn().mockRejectedValue(\n      new HTTPError(errorResponse, new Request('https://example.com/test'), {\n        method: 'GET',\n      } as any),\n    );\n\n    const result = await client.get({\n      ky: mockKy as Partial<KyInstance> as KyInstance,\n      throwOnError: false,\n      url: '/test',\n    });\n\n    expect(result.error).toBe('Internal Server Error');\n    expect(result.response.status).toBe(500);\n  });\n});\n\ndescribe('error interceptor', () => {\n  const client = createClient({ baseUrl: 'https://example.com' });\n\n  it('allows error transformation', async () => {\n    const errorResponse = new Response(JSON.stringify({ message: 'Not found' }), {\n      headers: {\n        'Content-Type': 'application/json',\n      },\n      status: 404,\n    });\n\n    const mockKy = vi.fn().mockRejectedValue(\n      new HTTPError(errorResponse, new Request('https://example.com/test'), {\n        method: 'GET',\n      } as any),\n    );\n\n    const mockErrorInterceptor = vi\n      .fn()\n      .mockImplementation((error: any) => ({ transformed: true, ...error }));\n\n    const interceptorId = client.interceptors.error.use(mockErrorInterceptor);\n\n    const result = await client.get({\n      ky: mockKy as Partial<KyInstance> as KyInstance,\n      throwOnError: false,\n      url: '/test',\n    });\n\n    expect(mockErrorInterceptor).toHaveBeenCalledOnce();\n    expect(result.error).toEqual({ message: 'Not found', transformed: true });\n\n    client.interceptors.error.eject(interceptorId);\n  });\n});\n\ndescribe('retry configuration', () => {\n  const client = createClient({ baseUrl: 'https://example.com' });\n\n  it('passes retry configuration to ky', async () => {\n    const mockResponse = new Response(JSON.stringify({ success: true }), {\n      headers: {\n        'Content-Type': 'application/json',\n      },\n      status: 200,\n    });\n\n    const mockKy = vi.fn().mockResolvedValue(mockResponse);\n\n    await client.get({\n      ky: mockKy as Partial<KyInstance> as KyInstance,\n      retry: {\n        limit: 3,\n        methods: ['get', 'post'],\n        statusCodes: [408, 429, 500],\n      },\n      url: '/test',\n    });\n\n    expect(mockKy).toHaveBeenCalledWith(\n      expect.any(Request),\n      expect.objectContaining({\n        retry: {\n          limit: 3,\n          methods: ['get', 'post'],\n          statusCodes: [408, 429, 500],\n        },\n      }),\n    );\n  });\n});\n\ndescribe('responseStyle configuration', () => {\n  const client = createClient({\n    baseUrl: 'https://example.com',\n    responseStyle: 'data',\n  });\n\n  it('returns only data when responseStyle is \"data\"', async () => {\n    const mockResponse = new Response(JSON.stringify({ result: 'success' }), {\n      headers: {\n        'Content-Type': 'application/json',\n      },\n      status: 200,\n    });\n\n    const mockKy = vi.fn().mockResolvedValue(mockResponse);\n\n    const result = await client.get({\n      ky: mockKy as Partial<KyInstance> as KyInstance,\n      url: '/test',\n    });\n\n    expect(result).toEqual({ result: 'success' });\n    expect(result).not.toHaveProperty('response');\n    expect(result).not.toHaveProperty('request');\n  });\n\n  it('returns undefined for errors when responseStyle is \"data\"', async () => {\n    const errorResponse = new Response(JSON.stringify({ message: 'Not found' }), {\n      headers: {\n        'Content-Type': 'application/json',\n      },\n      status: 404,\n    });\n\n    const mockKy = vi.fn().mockRejectedValue(\n      new HTTPError(errorResponse, new Request('https://example.com/test'), {\n        method: 'GET',\n      } as any),\n    );\n\n    const result = await client.get({\n      ky: mockKy as Partial<KyInstance> as KyInstance,\n      throwOnError: false,\n      url: '/test',\n    });\n\n    expect(result).toBeUndefined();\n  });\n});\n"
  },
  {
    "path": "packages/openapi-ts/src/plugins/@hey-api/client-ky/__tests__/utils.test.ts",
    "content": "import type { Auth } from '../../client-core/bundle/auth';\nimport type { Client } from '../bundle/types';\nimport { buildUrl, getParseAs, setAuthParams } from '../bundle/utils';\n\ndescribe('buildUrl', () => {\n  const scenarios: Array<{\n    options: Parameters<Client['buildUrl']>[0];\n    url: string;\n  }> = [\n    {\n      options: {\n        path: {\n          id: new Date('2025-01-01T00:00:00.000Z'),\n        },\n        url: '/foo/{id}',\n      },\n      url: '/foo/2025-01-01T00:00:00.000Z',\n    },\n  ];\n\n  it.each(scenarios)('builds $url', async ({ options, url }) => {\n    expect(buildUrl(options)).toEqual(url);\n  });\n});\n\ndescribe('getParseAs', () => {\n  const scenarios: Array<{\n    content: Parameters<typeof getParseAs>[0];\n    parseAs: ReturnType<typeof getParseAs>;\n  }> = [\n    {\n      content: null,\n      parseAs: 'stream',\n    },\n    {\n      content: 'application/json',\n      parseAs: 'json',\n    },\n    {\n      content: 'application/ld+json',\n      parseAs: 'json',\n    },\n    {\n      content: 'application/ld+json;charset=utf-8',\n      parseAs: 'json',\n    },\n    {\n      content: 'application/ld+json; charset=utf-8',\n      parseAs: 'json',\n    },\n    {\n      content: 'multipart/form-data',\n      parseAs: 'formData',\n    },\n    {\n      content: 'application/*',\n      parseAs: 'blob',\n    },\n    {\n      content: 'audio/*',\n      parseAs: 'blob',\n    },\n    {\n      content: 'image/*',\n      parseAs: 'blob',\n    },\n    {\n      content: 'video/*',\n      parseAs: 'blob',\n    },\n    {\n      content: 'text/*',\n      parseAs: 'text',\n    },\n    {\n      content: 'unsupported',\n      parseAs: undefined,\n    },\n  ];\n\n  it.each(scenarios)('detects $content as $parseAs', async ({ content, parseAs }) => {\n    expect(getParseAs(content)).toEqual(parseAs);\n  });\n});\n\ndescribe('setAuthParams', () => {\n  it('sets bearer token in headers', async () => {\n    const auth = vi.fn().mockReturnValue('foo');\n    const headers = new Headers();\n    const query: Record<any, unknown> = {};\n    await setAuthParams({\n      auth,\n      headers,\n      query,\n      security: [\n        {\n          name: 'baz',\n          scheme: 'bearer',\n          type: 'http',\n        },\n      ],\n    });\n    expect(auth).toHaveBeenCalled();\n    expect(headers.get('baz')).toBe('Bearer foo');\n    expect(Object.keys(query).length).toBe(0);\n  });\n\n  it('sets access token in query', async () => {\n    const auth = vi.fn().mockReturnValue('foo');\n    const headers = new Headers();\n    const query: Record<any, unknown> = {};\n    await setAuthParams({\n      auth,\n      headers,\n      query,\n      security: [\n        {\n          in: 'query',\n          name: 'baz',\n          scheme: 'bearer',\n          type: 'http',\n        },\n      ],\n    });\n    expect(auth).toHaveBeenCalled();\n    expect(headers.get('baz')).toBeNull();\n    expect(query.baz).toBe('Bearer foo');\n  });\n\n  it('sets Authorization header when `in` and `name` are undefined', async () => {\n    const auth = vi.fn().mockReturnValue('foo');\n    const headers = new Headers();\n    const query: Record<any, unknown> = {};\n    await setAuthParams({\n      auth,\n      headers,\n      query,\n      security: [\n        {\n          type: 'http',\n        },\n      ],\n    });\n    expect(auth).toHaveBeenCalled();\n    expect(headers.get('Authorization')).toBe('foo');\n    expect(query).toEqual({});\n  });\n\n  it('sets first scheme only', async () => {\n    const auth = vi.fn().mockReturnValue('foo');\n    const headers = new Headers();\n    const query: Record<any, unknown> = {};\n    await setAuthParams({\n      auth,\n      headers,\n      query,\n      security: [\n        {\n          name: 'baz',\n          scheme: 'bearer',\n          type: 'http',\n        },\n        {\n          in: 'query',\n          name: 'baz',\n          scheme: 'bearer',\n          type: 'http',\n        },\n      ],\n    });\n    expect(auth).toHaveBeenCalled();\n    expect(headers.get('baz')).toBe('Bearer foo');\n    expect(Object.keys(query).length).toBe(0);\n  });\n\n  it('sets first scheme with token', async () => {\n    const auth = vi.fn().mockImplementation((auth: Auth) => {\n      if (auth.type === 'apiKey') {\n        return;\n      }\n      return 'foo';\n    });\n    const headers = new Headers();\n    const query: Record<any, unknown> = {};\n    await setAuthParams({\n      auth,\n      headers,\n      query,\n      security: [\n        {\n          name: 'baz',\n          type: 'apiKey',\n        },\n        {\n          in: 'query',\n          name: 'baz',\n          scheme: 'bearer',\n          type: 'http',\n        },\n      ],\n    });\n    expect(auth).toHaveBeenCalled();\n    expect(headers.get('baz')).toBeNull();\n    expect(query.baz).toBe('Bearer foo');\n  });\n\n  it('sets an API key in a cookie', async () => {\n    const auth = vi.fn().mockReturnValue('foo');\n    const headers = new Headers();\n    const query: Record<any, unknown> = {};\n    await setAuthParams({\n      auth,\n      headers,\n      query,\n      security: [\n        {\n          in: 'cookie',\n          name: 'baz',\n          type: 'apiKey',\n        },\n      ],\n    });\n    expect(auth).toHaveBeenCalled();\n    expect(headers.get('Cookie')).toBe('baz=foo');\n    expect(query).toEqual({});\n  });\n\n  it('sets only one specific header', async () => {\n    const auth = vi.fn(({ name }: Auth) => {\n      if (name === 'baz') {\n        return 'foo';\n      }\n      return 'buz';\n    });\n    const headers = new Headers();\n    const query: Record<any, unknown> = {};\n    await setAuthParams({\n      auth,\n      headers,\n      query,\n      security: [\n        {\n          name: 'baz',\n          scheme: 'bearer',\n          type: 'http',\n        },\n        {\n          name: 'fiz',\n          type: 'http',\n        },\n        {\n          in: 'query',\n          name: 'baz',\n          scheme: 'bearer',\n          type: 'http',\n        },\n      ],\n    });\n    expect(auth).toHaveBeenCalled();\n    expect(headers.get('baz')).toBe('Bearer foo');\n    expect(headers.get('fiz')).toBe('buz');\n    expect(Object.keys(query).length).toBe(0);\n  });\n});\n"
  },
  {
    "path": "packages/openapi-ts/src/plugins/@hey-api/client-ky/bundle/client.ts",
    "content": "import type { HTTPError, Options as KyOptions } from 'ky';\nimport ky from 'ky';\n\nimport { createSseClient } from '../../client-core/bundle/serverSentEvents';\nimport type { HttpMethod } from '../../client-core/bundle/types';\nimport { getValidRequestBody } from '../../client-core/bundle/utils';\nimport type { Client, Config, RequestOptions, ResolvedRequestOptions, RetryOptions } from './types';\nimport type { Middleware } from './utils';\nimport {\n  buildUrl,\n  createConfig,\n  createInterceptors,\n  getParseAs,\n  mergeConfigs,\n  mergeHeaders,\n  setAuthParams,\n} from './utils';\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 (options: RequestOptions) => {\n    const opts = {\n      ..._config,\n      ...options,\n      headers: mergeHeaders(_config.headers, options.headers),\n      ky: options.ky ?? _config.ky ?? ky,\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    if (opts.body === undefined || opts.serializedBody === '') {\n      opts.headers.delete('Content-Type');\n    }\n\n    const url = buildUrl(opts);\n\n    return { opts, url };\n  };\n\n  const parseErrorResponse = async (\n    response: Response,\n    request: Request,\n    opts: ResolvedRequestOptions,\n    interceptorsMiddleware: Middleware<Request, Response, unknown, ResolvedRequestOptions>,\n  ) => {\n    const result = {\n      request,\n      response,\n    };\n\n    const textError = await response.text();\n    let jsonError: unknown;\n\n    try {\n      jsonError = JSON.parse(textError);\n    } catch {\n      jsonError = undefined;\n    }\n\n    const error = jsonError ?? textError;\n    let finalError = error;\n\n    for (const fn of interceptorsMiddleware.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    return opts.responseStyle === 'data'\n      ? undefined\n      : {\n          error: finalError,\n          ...result,\n        };\n  };\n\n  const request: Client['request'] = async (options) => {\n    // @ts-expect-error\n    const { opts, url } = await beforeRequest(options);\n\n    const kyInstance = opts.ky!;\n\n    const validBody = getValidRequestBody(opts);\n\n    const kyOptions: KyOptions = {\n      body: validBody as BodyInit,\n      cache: opts.cache,\n      credentials: opts.credentials,\n      headers: opts.headers,\n      integrity: opts.integrity,\n      keepalive: opts.keepalive,\n      method: opts.method as KyOptions['method'],\n      mode: opts.mode,\n      redirect: 'follow',\n      referrer: opts.referrer,\n      referrerPolicy: opts.referrerPolicy,\n      signal: opts.signal,\n      throwHttpErrors: opts.throwOnError ?? false,\n      timeout: opts.timeout,\n      ...opts.kyOptions,\n    };\n\n    if (opts.retry && typeof opts.retry === 'object') {\n      const retryOpts = opts.retry as RetryOptions;\n      kyOptions.retry = {\n        limit: retryOpts.limit ?? 2,\n        methods: retryOpts.methods as Array<\n          'get' | 'post' | 'put' | 'patch' | 'head' | 'delete' | 'options' | 'trace'\n        >,\n        statusCodes: retryOpts.statusCodes,\n      };\n    }\n\n    let request = new Request(url, {\n      body: kyOptions.body as BodyInit,\n      headers: kyOptions.headers as HeadersInit,\n      method: kyOptions.method,\n    });\n\n    for (const fn of interceptors.request.fns) {\n      if (fn) {\n        request = await fn(request, opts);\n      }\n    }\n\n    let response: Response;\n\n    try {\n      response = await kyInstance(request, kyOptions);\n    } catch (error) {\n      if (error && typeof error === 'object' && 'response' in error) {\n        const httpError = error as HTTPError;\n        response = httpError.response;\n\n        for (const fn of interceptors.response.fns) {\n          if (fn) {\n            response = await fn(response, request, opts);\n          }\n        }\n\n        return parseErrorResponse(response, request, opts, interceptors);\n      }\n\n      throw error;\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    return parseErrorResponse(response, request, opts, interceptors);\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      fetch: globalThis.fetch,\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"
  },
  {
    "path": "packages/openapi-ts/src/plugins/@hey-api/client-ky/bundle/index.ts",
    "content": "export type { Auth } from '../../client-core/bundle/auth';\nexport type { QuerySerializerOptions } from '../../client-core/bundle/bodySerializer';\nexport {\n  formDataBodySerializer,\n  jsonBodySerializer,\n  urlSearchParamsBodySerializer,\n} from '../../client-core/bundle/bodySerializer';\nexport { buildClientParams } from '../../client-core/bundle/params';\nexport { serializeQueryKeyValue } from '../../client-core/bundle/queryKeySerializer';\nexport { createClient } from './client';\nexport type {\n  Client,\n  ClientOptions,\n  Config,\n  CreateClientConfig,\n  Options,\n  RequestOptions,\n  RequestResult,\n  ResolvedRequestOptions,\n  ResponseStyle,\n  RetryOptions,\n  TDataShape,\n} from './types';\nexport { createConfig, mergeHeaders } from './utils';\n"
  },
  {
    "path": "packages/openapi-ts/src/plugins/@hey-api/client-ky/bundle/types.ts",
    "content": "import type { Options as KyOptions } from 'ky';\nimport type ky from 'ky';\n\nimport type { Auth } from '../../client-core/bundle/auth';\nimport type {\n  ServerSentEventsOptions,\n  ServerSentEventsResult,\n} from '../../client-core/bundle/serverSentEvents';\nimport type { Client as CoreClient, Config as CoreConfig } from '../../client-core/bundle/types';\nimport type { Middleware } from './utils';\n\nexport type ResponseStyle = 'data' | 'fields';\n\nexport interface RetryOptions {\n  /**\n   * Maximum number of retry attempts\n   *\n   * @default 2\n   */\n  limit?: number;\n  /**\n   * HTTP methods to retry\n   *\n   * @default ['get', 'put', 'head', 'delete', 'options', 'trace']\n   */\n  methods?: Array<'get' | 'post' | 'put' | 'delete' | 'patch' | 'head' | 'options' | 'trace'>;\n  /**\n   * HTTP status codes to retry\n   *\n   * @default [408, 413, 429, 500, 502, 503, 504]\n   */\n  statusCodes?: number[];\n}\n\nexport interface Config<T extends ClientOptions = ClientOptions>\n  extends\n    Omit<KyOptions, 'body' | 'headers' | 'method' | 'prefixUrl' | 'retry' | 'throwHttpErrors'>,\n    CoreConfig {\n  /**\n   * Base URL for all requests made by this client.\n   */\n  baseUrl?: T['baseUrl'];\n  /**\n   * Ky instance to use. You can use this option to provide a custom\n   * ky instance.\n   */\n  ky?: typeof ky;\n  /**\n   * Additional ky-specific options that will be passed directly to ky.\n   * This allows you to use any ky option not explicitly exposed in the config.\n   */\n  kyOptions?: Omit<KyOptions, 'method' | 'prefixUrl'>;\n  /**\n   * Return the response data parsed in a specified format. By default, `auto`\n   * will infer the appropriate method from the `Content-Type` response header.\n   * You can override this behavior with any of the {@link Body} methods.\n   * Select `stream` if you don't want to parse response data at all.\n   *\n   * @default 'auto'\n   */\n  parseAs?: 'arrayBuffer' | 'auto' | 'blob' | 'formData' | 'json' | 'stream' | 'text';\n  /**\n   * Should we return only data or multiple fields (data, error, response, etc.)?\n   *\n   * @default 'fields'\n   */\n  responseStyle?: ResponseStyle;\n  /**\n   * Retry configuration\n   */\n  retry?: RetryOptions;\n  /**\n   * Throw an error instead of returning it in the response?\n   *\n   * @default false\n   */\n  throwOnError?: T['throwOnError'];\n  /**\n   * Request timeout in milliseconds\n   *\n   * @default 10000\n   */\n  timeout?: number;\n}\n\nexport interface RequestOptions<\n  TData = unknown,\n  TResponseStyle extends ResponseStyle = 'fields',\n  ThrowOnError extends boolean = boolean,\n  Url extends string = string,\n>\n  extends\n    Config<{\n      responseStyle: TResponseStyle;\n      throwOnError: ThrowOnError;\n    }>,\n    Pick<\n      ServerSentEventsOptions<TData>,\n      | 'onRequest'\n      | 'onSseError'\n      | 'onSseEvent'\n      | 'sseDefaultRetryDelay'\n      | 'sseMaxRetryAttempts'\n      | 'sseMaxRetryDelay'\n    > {\n  /**\n   * Any body that you want to add to your request.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/fetch#body}\n   */\n  body?: unknown;\n  path?: Record<string, unknown>;\n  query?: Record<string, unknown>;\n  /**\n   * Security mechanism(s) to use for the request.\n   */\n  security?: ReadonlyArray<Auth>;\n  url: Url;\n}\n\nexport interface ResolvedRequestOptions<\n  TResponseStyle extends ResponseStyle = 'fields',\n  ThrowOnError extends boolean = boolean,\n  Url extends string = string,\n> extends RequestOptions<unknown, TResponseStyle, ThrowOnError, Url> {\n  serializedBody?: string;\n}\n\nexport type RequestResult<\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = boolean,\n  TResponseStyle extends ResponseStyle = 'fields',\n> = ThrowOnError extends true\n  ? Promise<\n      TResponseStyle extends 'data'\n        ? TData extends Record<string, unknown>\n          ? TData[keyof TData]\n          : TData\n        : {\n            data: TData extends Record<string, unknown> ? TData[keyof TData] : TData;\n            request: Request;\n            response: Response;\n          }\n    >\n  : Promise<\n      TResponseStyle extends 'data'\n        ? (TData extends Record<string, unknown> ? TData[keyof TData] : TData) | undefined\n        : (\n            | {\n                data: TData extends Record<string, unknown> ? TData[keyof TData] : TData;\n                error: undefined;\n              }\n            | {\n                data: undefined;\n                error: TError extends Record<string, unknown> ? TError[keyof TError] : TError;\n              }\n          ) & {\n            request: Request;\n            response: Response;\n          }\n    >;\n\nexport interface ClientOptions {\n  baseUrl?: string;\n  responseStyle?: ResponseStyle;\n  throwOnError?: boolean;\n}\n\ntype MethodFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'>,\n) => RequestResult<TData, TError, ThrowOnError, TResponseStyle>;\n\ntype SseFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'>,\n) => Promise<ServerSentEventsResult<TData, TError>>;\n\ntype RequestFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'> &\n    Pick<Required<RequestOptions<TData, TResponseStyle, ThrowOnError>>, 'method'>,\n) => RequestResult<TData, TError, ThrowOnError, TResponseStyle>;\n\ntype BuildUrlFn = <\n  TData extends {\n    body?: unknown;\n    path?: Record<string, unknown>;\n    query?: Record<string, unknown>;\n    url: string;\n  },\n>(\n  options: TData & Options<TData>,\n) => string;\n\nexport type Client = CoreClient<RequestFn, Config, MethodFn, BuildUrlFn, SseFn> & {\n  interceptors: Middleware<Request, Response, unknown, ResolvedRequestOptions>;\n};\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 = ClientOptions> = (\n  override?: Config<ClientOptions & T>,\n) => Config<Required<ClientOptions> & T>;\n\nexport interface TDataShape {\n  body?: unknown;\n  headers?: unknown;\n  path?: unknown;\n  query?: unknown;\n  url: string;\n}\n\ntype OmitKeys<T, K> = Pick<T, Exclude<keyof T, K>>;\n\nexport type Options<\n  TData extends TDataShape = TDataShape,\n  ThrowOnError extends boolean = boolean,\n  TResponse = unknown,\n  TResponseStyle extends ResponseStyle = 'fields',\n> = OmitKeys<\n  RequestOptions<TResponse, TResponseStyle, ThrowOnError>,\n  'body' | 'path' | 'query' | 'url'\n> &\n  ([TData] extends [never] ? unknown : Omit<TData, 'url'>);\n"
  },
  {
    "path": "packages/openapi-ts/src/plugins/@hey-api/client-ky/bundle/utils.ts",
    "content": "import { getAuthToken } from '../../client-core/bundle/auth';\nimport type { QuerySerializerOptions } from '../../client-core/bundle/bodySerializer';\nimport { jsonBodySerializer } from '../../client-core/bundle/bodySerializer';\nimport {\n  serializeArrayParam,\n  serializeObjectParam,\n  serializePrimitiveParam,\n} from '../../client-core/bundle/pathSerializer';\nimport { getUrl } from '../../client-core/bundle/utils';\nimport type { Client, ClientOptions, Config, RequestOptions } from './types';\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    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        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  throwOnError: false,\n  timeout: 10000,\n  ...override,\n});\n"
  },
  {
    "path": "packages/openapi-ts/src/plugins/@hey-api/client-ky/config.ts",
    "content": "import { definePluginConfig } from '@hey-api/shared';\n\nimport {\n  clientDefaultConfig,\n  clientDefaultMeta,\n} from '../../../plugins/@hey-api/client-core/config';\nimport { clientPluginHandler } from '../../../plugins/@hey-api/client-core/plugin';\nimport type { HeyApiClientKyPlugin } from './types';\n\nexport const defaultConfig: HeyApiClientKyPlugin['Config'] = {\n  ...clientDefaultMeta,\n  config: {\n    ...clientDefaultConfig,\n    throwOnError: false,\n  },\n  handler: clientPluginHandler as unknown as HeyApiClientKyPlugin['Handler'],\n  name: '@hey-api/client-ky',\n};\n\n/**\n * Type helper for `@hey-api/client-ky` plugin, returns {@link Plugin.Config} object\n */\nexport const defineConfig = definePluginConfig(defaultConfig);\n"
  },
  {
    "path": "packages/openapi-ts/src/plugins/@hey-api/client-ky/index.ts",
    "content": "export type { Client as KyClient } from './bundle/types';\nexport { defaultConfig, defineConfig } from './config';\nexport type { HeyApiClientKyPlugin } from './types';\n"
  },
  {
    "path": "packages/openapi-ts/src/plugins/@hey-api/client-ky/types.ts",
    "content": "import type { DefinePlugin, Plugin } from '@hey-api/shared';\n\nimport type { Client } from '../../../plugins/@hey-api/client-core/types';\n\nexport type UserConfig = Plugin.Name<'@hey-api/client-ky'> &\n  Client.Config & {\n    /**\n     * Throw an error instead of returning it in the response?\n     *\n     * @default false\n     */\n    throwOnError?: boolean;\n  };\n\nexport type HeyApiClientKyPlugin = DefinePlugin<UserConfig, UserConfig>;\n"
  },
  {
    "path": "packages/openapi-ts/src/plugins/@hey-api/client-next/__tests__/client.test.ts",
    "content": "import { createClient } from '../bundle/client';\nimport type { ResolvedRequestOptions } from '../bundle/types';\n\ntype MockFetch = ((...args: any[]) => any) & {\n  preconnect?: any;\n};\n\ndescribe('buildUrl', () => {\n  const client = createClient();\n\n  const scenarios: {\n    options: Parameters<typeof client.buildUrl>[0];\n    url: string;\n  }[] = [\n    {\n      options: {\n        url: '',\n      },\n      url: '/',\n    },\n    {\n      options: {\n        url: '/foo',\n      },\n      url: '/foo',\n    },\n    {\n      options: {\n        path: {\n          fooId: 1,\n        },\n        url: '/foo/{fooId}',\n      },\n      url: '/foo/1',\n    },\n    {\n      options: {\n        path: {\n          fooId: 1,\n        },\n        query: {\n          bar: 'baz',\n        },\n        url: '/foo/{fooId}',\n      },\n      url: '/foo/1?bar=baz',\n    },\n  ];\n\n  it.each(scenarios)('returns $url', ({ options, url }) => {\n    expect(client.buildUrl(options)).toBe(url);\n  });\n\n  it('uses baseUrl from client config by default', () => {\n    const clientWithBase = createClient({ baseUrl: 'https://example.com' });\n    expect(clientWithBase.buildUrl({ url: '/foo' })).toBe('https://example.com/foo');\n  });\n\n  it('allows overriding baseUrl from client config', () => {\n    const clientWithBase = createClient({ baseUrl: 'https://example.com' });\n    expect(clientWithBase.buildUrl({ baseUrl: 'https://other.com', url: '/foo' })).toBe(\n      'https://other.com/foo',\n    );\n  });\n});\n\ndescribe('zero-length body handling', () => {\n  const client = createClient({ baseUrl: 'https://example.com' });\n\n  it('returns empty object for zero-length JSON response', async () => {\n    const mockResponse = new Response(null, {\n      headers: {\n        'Content-Length': '0',\n        'Content-Type': 'application/json',\n      },\n      status: 200,\n    });\n\n    const mockFetch: MockFetch = vi.fn().mockResolvedValue(mockResponse);\n\n    const result = await client.request({\n      fetch: mockFetch,\n      method: 'GET',\n      url: '/test',\n    });\n\n    expect(result.data).toEqual({});\n  });\n\n  it('returns empty object for empty JSON response without Content-Length header (status 200)', async () => {\n    // Simulates a server returning an empty body with status 200 and no Content-Length header\n    // This is the scenario described in the issue where response.json() throws\n    const mockResponse = new Response('', {\n      headers: {\n        'Content-Type': 'application/json',\n      },\n      status: 200,\n    });\n\n    const mockFetch: MockFetch = vi.fn().mockResolvedValue(mockResponse);\n\n    const result = await client.request({\n      fetch: mockFetch,\n      method: 'GET',\n      url: '/test',\n    });\n\n    expect(result.data).toEqual({});\n  });\n\n  it('returns empty object for empty response without Content-Length header and no Content-Type (defaults to JSON)', async () => {\n    // Tests the auto-detection behavior when no Content-Type is provided\n    const mockResponse = new Response('', {\n      status: 200,\n    });\n\n    const mockFetch: MockFetch = vi.fn().mockResolvedValue(mockResponse);\n\n    const result = await client.request({\n      fetch: mockFetch,\n      method: 'GET',\n      url: '/test',\n    });\n\n    // When parseAs is 'auto' and no Content-Type header exists, it should handle empty body gracefully\n    expect(result.data).toBeDefined();\n  });\n});\n\ndescribe('unserialized request body handling', () => {\n  const client = createClient({ baseUrl: 'https://example.com' });\n\n  const scenarios = [{ body: 0 }, { body: false }, { body: 'test string' }, { body: '' }];\n\n  it.each(scenarios)('handles plain text body with $body value', async ({ body }) => {\n    const mockResponse = new Response(JSON.stringify({ success: true }), {\n      headers: {\n        'Content-Type': 'application/json',\n      },\n      status: 200,\n    });\n\n    const mockFetch: MockFetch = vi.fn().mockResolvedValueOnce(mockResponse);\n    const headers = new Headers({ 'Content-Type': 'text/plain' });\n\n    await client.post({\n      body,\n      bodySerializer: null,\n      fetch: mockFetch,\n      headers: {\n        'Content-Type': 'text/plain',\n      },\n      url: '/test',\n    });\n\n    expect(mockFetch).toHaveBeenCalledExactlyOnceWith(\n      expect.any(String),\n      expect.objectContaining({\n        body,\n        headers,\n      }),\n    );\n  });\n});\n\ndescribe('serialized request body handling', () => {\n  const client = createClient({ baseUrl: 'https://example.com' });\n\n  const scenarios = [\n    {\n      body: '',\n      expectBodyValue: false,\n      expectContentHeader: false,\n      serializedBody: '',\n    },\n    {\n      body: 0,\n      expectBodyValue: true,\n      expectContentHeader: true,\n      serializedBody: 0,\n    },\n    {\n      body: false,\n      expectBodyValue: true,\n      expectContentHeader: true,\n      serializedBody: false,\n    },\n    {\n      body: {},\n      expectBodyValue: true,\n      expectContentHeader: true,\n      serializedBody: '{\"key\":\"value\"}',\n    },\n  ];\n\n  it.each(scenarios)(\n    'handles $serializedBody serializedBody value',\n    async ({ body, expectBodyValue, expectContentHeader, serializedBody }) => {\n      const mockResponse = new Response(JSON.stringify({ success: true }), {\n        headers: {\n          'Content-Type': 'application/json',\n        },\n        status: 200,\n      });\n\n      const mockFetch: MockFetch = vi.fn().mockResolvedValueOnce(mockResponse);\n      const headers = new Headers({ 'Content-Type': 'application/json' });\n\n      await client.post({\n        body,\n        bodySerializer: () => serializedBody,\n        fetch: mockFetch,\n        headers: {\n          'Content-Type': 'application/json',\n        },\n        url: '/test',\n      });\n\n      expect(mockFetch).toHaveBeenCalledExactlyOnceWith(\n        expect.any(String),\n        expect.objectContaining({\n          body: expectBodyValue ? serializedBody : null,\n          headers: expectContentHeader ? headers : new Headers(),\n        }),\n      );\n    },\n  );\n});\n\ndescribe('request interceptor', () => {\n  const client = createClient({ baseUrl: 'https://example.com' });\n\n  const scenarios = [\n    {\n      body: 'test string',\n      bodySerializer: null,\n      contentType: 'text/plain',\n      expectedSerializedValue: undefined,\n      expectedValue: 'test string',\n    },\n    {\n      body: { key: 'value' },\n      bodySerializer: (body: unknown) => JSON.stringify(body),\n      contentType: 'application/json',\n      expectedSerializedValue: '{\"key\":\"value\"}',\n      expectedValue: '{\"key\":\"value\"}',\n    },\n  ];\n\n  it.each(scenarios)(\n    'exposes $contentType serialized and raw body in interceptor',\n    async ({ body, bodySerializer, contentType, expectedSerializedValue }) => {\n      const mockResponse = new Response(JSON.stringify({ success: true }), {\n        headers: {\n          'Content-Type': 'application/json',\n        },\n        status: 200,\n      });\n\n      const mockFetch: MockFetch = vi.fn().mockResolvedValueOnce(mockResponse);\n\n      const mockRequestInterceptor = vi\n        .fn()\n        .mockImplementation((options: ResolvedRequestOptions) => {\n          expect(options.serializedBody).toBe(expectedSerializedValue);\n          expect(options.body).toBe(body);\n\n          return options;\n        });\n\n      const interceptorId = client.interceptors.request.use(mockRequestInterceptor);\n\n      await client.post({\n        body,\n        bodySerializer,\n        fetch: mockFetch,\n        headers: {\n          'Content-Type': contentType,\n        },\n        url: '/test',\n      });\n\n      expect(mockRequestInterceptor).toHaveBeenCalledOnce();\n\n      client.interceptors.request.eject(interceptorId);\n    },\n  );\n});\n"
  },
  {
    "path": "packages/openapi-ts/src/plugins/@hey-api/client-next/__tests__/utils.test.ts",
    "content": "import type { Auth } from '../../client-core/bundle/auth';\nimport { getParseAs, setAuthParams } from '../bundle/utils';\n\ndescribe('getParseAs', () => {\n  const scenarios: Array<{\n    content: Parameters<typeof getParseAs>[0];\n    parseAs: ReturnType<typeof getParseAs>;\n  }> = [\n    {\n      content: null,\n      parseAs: 'stream',\n    },\n    {\n      content: 'application/json',\n      parseAs: 'json',\n    },\n    {\n      content: 'application/ld+json',\n      parseAs: 'json',\n    },\n    {\n      content: 'application/ld+json;charset=utf-8',\n      parseAs: 'json',\n    },\n    {\n      content: 'application/ld+json; charset=utf-8',\n      parseAs: 'json',\n    },\n    {\n      content: 'multipart/form-data',\n      parseAs: 'formData',\n    },\n    {\n      content: 'application/*',\n      parseAs: 'blob',\n    },\n    {\n      content: 'audio/*',\n      parseAs: 'blob',\n    },\n    {\n      content: 'image/*',\n      parseAs: 'blob',\n    },\n    {\n      content: 'video/*',\n      parseAs: 'blob',\n    },\n    {\n      content: 'text/*',\n      parseAs: 'text',\n    },\n    {\n      content: 'unsupported',\n      parseAs: undefined,\n    },\n  ];\n\n  it.each(scenarios)('detects $content as $parseAs', async ({ content, parseAs }) => {\n    expect(getParseAs(content)).toEqual(parseAs);\n  });\n});\n\ndescribe('setAuthParams', () => {\n  it('sets bearer token in headers', async () => {\n    const auth = vi.fn().mockReturnValue('foo');\n    const headers = new Headers();\n    const query: Record<any, unknown> = {};\n    await setAuthParams({\n      auth,\n      headers,\n      query,\n      security: [\n        {\n          name: 'baz',\n          scheme: 'bearer',\n          type: 'http',\n        },\n      ],\n    });\n    expect(auth).toHaveBeenCalled();\n    expect(headers.get('baz')).toBe('Bearer foo');\n    expect(Object.keys(query).length).toBe(0);\n  });\n\n  it('sets access token in query', async () => {\n    const auth = vi.fn().mockReturnValue('foo');\n    const headers = new Headers();\n    const query: Record<any, unknown> = {};\n    await setAuthParams({\n      auth,\n      headers,\n      query,\n      security: [\n        {\n          in: 'query',\n          name: 'baz',\n          scheme: 'bearer',\n          type: 'http',\n        },\n      ],\n    });\n    expect(auth).toHaveBeenCalled();\n    expect(headers.get('baz')).toBeNull();\n    expect(query.baz).toBe('Bearer foo');\n  });\n\n  it('sets Authorization header when `in` and `name` are undefined', async () => {\n    const auth = vi.fn().mockReturnValue('foo');\n    const headers = new Headers();\n    const query: Record<any, unknown> = {};\n    await setAuthParams({\n      auth,\n      headers,\n      query,\n      security: [\n        {\n          type: 'http',\n        },\n      ],\n    });\n    expect(auth).toHaveBeenCalled();\n    expect(headers.get('Authorization')).toBe('foo');\n    expect(query).toEqual({});\n  });\n\n  it('sets first scheme only', async () => {\n    const auth = vi.fn().mockReturnValue('foo');\n    const headers = new Headers();\n    const query: Record<any, unknown> = {};\n    await setAuthParams({\n      auth,\n      headers,\n      query,\n      security: [\n        {\n          name: 'baz',\n          scheme: 'bearer',\n          type: 'http',\n        },\n        {\n          in: 'query',\n          name: 'baz',\n          scheme: 'bearer',\n          type: 'http',\n        },\n      ],\n    });\n    expect(auth).toHaveBeenCalled();\n    expect(headers.get('baz')).toBe('Bearer foo');\n    expect(Object.keys(query).length).toBe(0);\n  });\n\n  it('sets first scheme with token', async () => {\n    const auth = vi.fn().mockImplementation((auth: Auth) => {\n      if (auth.type === 'apiKey') {\n        return;\n      }\n      return 'foo';\n    });\n    const headers = new Headers();\n    const query: Record<any, unknown> = {};\n    await setAuthParams({\n      auth,\n      headers,\n      query,\n      security: [\n        {\n          name: 'baz',\n          type: 'apiKey',\n        },\n        {\n          in: 'query',\n          name: 'baz',\n          scheme: 'bearer',\n          type: 'http',\n        },\n      ],\n    });\n    expect(auth).toHaveBeenCalled();\n    expect(headers.get('baz')).toBeNull();\n    expect(query.baz).toBe('Bearer foo');\n  });\n\n  it('sets an API key in a cookie', async () => {\n    const auth = vi.fn().mockReturnValue('foo');\n    const headers = new Headers();\n    const query: Record<any, unknown> = {};\n    await setAuthParams({\n      auth,\n      headers,\n      query,\n      security: [\n        {\n          in: 'cookie',\n          name: 'baz',\n          type: 'apiKey',\n        },\n      ],\n    });\n    expect(auth).toHaveBeenCalled();\n    expect(headers.get('Cookie')).toBe('baz=foo');\n    expect(query).toEqual({});\n  });\n\n  it('sets only one specific header', async () => {\n    const auth = vi.fn(({ name }: Auth) => {\n      if (name === 'baz') {\n        return 'foo';\n      }\n      return 'buz';\n    });\n    const headers = new Headers();\n    const query: Record<any, unknown> = {};\n    await setAuthParams({\n      auth,\n      headers,\n      query,\n      security: [\n        {\n          name: 'baz',\n          scheme: 'bearer',\n          type: 'http',\n        },\n        {\n          name: 'fiz',\n          type: 'http',\n        },\n        {\n          in: 'query',\n          name: 'baz',\n          scheme: 'bearer',\n          type: 'http',\n        },\n      ],\n    });\n    expect(auth).toHaveBeenCalled();\n    expect(headers.get('baz')).toBe('Bearer foo');\n    expect(headers.get('fiz')).toBe('buz');\n    expect(Object.keys(query).length).toBe(0);\n  });\n});\n"
  },
  {
    "path": "packages/openapi-ts/src/plugins/@hey-api/client-next/bundle/client.ts",
    "content": "import { createSseClient } from '../../client-core/bundle/serverSentEvents';\nimport type { HttpMethod } from '../../client-core/bundle/types';\nimport { getValidRequestBody } from '../../client-core/bundle/utils';\nimport type { Client, Config, RequestOptions, ResolvedRequestOptions } from './types';\nimport {\n  buildUrl,\n  createConfig,\n  createInterceptors,\n  getParseAs,\n  mergeConfigs,\n  mergeHeaders,\n  setAuthParams,\n} from './utils';\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<Response, unknown, ResolvedRequestOptions>();\n\n  const beforeRequest = async (options: RequestOptions) => {\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 url = buildUrl(opts);\n\n    return { opts, url };\n  };\n\n  // @ts-expect-error\n  const request: Client['request'] = async (options) => {\n    // @ts-expect-error\n    const { opts, url } = await beforeRequest(options);\n\n    for (const fn of interceptors.request.fns) {\n      if (fn) {\n        await fn(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    const requestInit: ReqInit = {\n      ...opts,\n      body: getValidRequestBody(opts),\n    };\n\n    let response = await _fetch(url, requestInit);\n\n    for (const fn of interceptors.response.fns) {\n      if (fn) {\n        response = await fn(response, opts);\n      }\n    }\n\n    const result = {\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 {\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 {\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 {\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, opts)) as string;\n      }\n    }\n\n    finalError = finalError || ({} as string);\n\n    if (opts.throwOnError) {\n      throw finalError;\n    }\n\n    return {\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        const requestInit = {\n          ...init,\n          method: init.method as Config['method'],\n          url,\n        };\n        for (const fn of interceptors.request.fns) {\n          if (fn) {\n            await fn(requestInit);\n            request = new Request(requestInit.url, requestInit);\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"
  },
  {
    "path": "packages/openapi-ts/src/plugins/@hey-api/client-next/bundle/index.ts",
    "content": "export type { Auth } from '../../client-core/bundle/auth';\nexport type { QuerySerializerOptions } from '../../client-core/bundle/bodySerializer';\nexport {\n  formDataBodySerializer,\n  jsonBodySerializer,\n  urlSearchParamsBodySerializer,\n} from '../../client-core/bundle/bodySerializer';\nexport { buildClientParams } from '../../client-core/bundle/params';\nexport { serializeQueryKeyValue } from '../../client-core/bundle/queryKeySerializer';\nexport { createClient } from './client';\nexport type {\n  Client,\n  ClientOptions,\n  Config,\n  CreateClientConfig,\n  Options,\n  RequestOptions,\n  RequestResult,\n  TDataShape,\n} from './types';\nexport { createConfig } from './utils';\n"
  },
  {
    "path": "packages/openapi-ts/src/plugins/@hey-api/client-next/bundle/types.ts",
    "content": "import type { Auth } from '../../client-core/bundle/auth';\nimport type {\n  ServerSentEventsOptions,\n  ServerSentEventsResult,\n} from '../../client-core/bundle/serverSentEvents';\nimport type { Client as CoreClient, Config as CoreConfig } from '../../client-core/bundle/types';\nimport type { Middleware } from './utils';\n\nexport interface Config<T extends ClientOptions = ClientOptions>\n  extends Omit<RequestInit, 'body' | 'headers' | 'method'>, CoreConfig {\n  /**\n   * Base URL for all requests made by this client.\n   */\n  baseUrl?: T['baseUrl'];\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   * Return the response data parsed in a specified format. By default, `auto`\n   * will infer the appropriate method from the `Content-Type` response header.\n   * You can override this behavior with any of the {@link Body} methods.\n   * Select `stream` if you don't want to parse response data at all.\n   *\n   * @default 'auto'\n   */\n  parseAs?: 'arrayBuffer' | 'auto' | 'blob' | 'formData' | 'json' | 'stream' | 'text';\n  /**\n   * Throw an error instead of returning it in the response?\n   *\n   * @default false\n   */\n  throwOnError?: T['throwOnError'];\n}\n\nexport interface RequestOptions<\n  TData = unknown,\n  ThrowOnError extends boolean = boolean,\n  Url extends string = string,\n>\n  extends\n    Config<{\n      throwOnError: ThrowOnError;\n    }>,\n    Pick<\n      ServerSentEventsOptions<TData>,\n      | 'onRequest'\n      | 'onSseError'\n      | 'onSseEvent'\n      | 'sseDefaultRetryDelay'\n      | 'sseMaxRetryAttempts'\n      | 'sseMaxRetryDelay'\n    > {\n  /**\n   * Any body that you want to add to your request.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/fetch#body}\n   */\n  body?: unknown;\n  path?: Record<string, unknown>;\n  query?: Record<string, unknown>;\n  /**\n   * Security mechanism(s) to use for the request.\n   */\n  security?: ReadonlyArray<Auth>;\n  url: Url;\n}\n\nexport interface ResolvedRequestOptions<\n  ThrowOnError extends boolean = boolean,\n  Url extends string = string,\n> extends RequestOptions<unknown, ThrowOnError, Url> {\n  serializedBody?: string;\n}\n\nexport type RequestResult<\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = boolean,\n> = ThrowOnError extends true\n  ? Promise<{\n      data: TData extends Record<string, unknown> ? TData[keyof TData] : TData;\n      response: Response;\n    }>\n  : Promise<\n      (\n        | {\n            data: TData extends Record<string, unknown> ? TData[keyof TData] : TData;\n            error: undefined;\n          }\n        | {\n            data: undefined;\n            error: TError extends Record<string, unknown> ? TError[keyof TError] : TError;\n          }\n      ) & {\n        response: Response;\n      }\n    >;\n\nexport interface ClientOptions {\n  baseUrl?: string;\n  throwOnError?: boolean;\n}\n\ntype MethodFn = <TData = unknown, TError = unknown, ThrowOnError extends boolean = false>(\n  options: Omit<RequestOptions<TData, ThrowOnError>, 'method'>,\n) => RequestResult<TData, TError, ThrowOnError>;\n\ntype SseFn = <TData = unknown, TError = unknown, ThrowOnError extends boolean = false>(\n  options: Omit<RequestOptions<TData, ThrowOnError>, 'method'>,\n) => Promise<ServerSentEventsResult<TData, TError>>;\n\ntype RequestFn = <TData = unknown, TError = unknown, ThrowOnError extends boolean = false>(\n  options: Omit<RequestOptions<TData, ThrowOnError>, 'method'> &\n    Pick<Required<RequestOptions<TData, ThrowOnError>>, 'method'>,\n) => RequestResult<TData, TError, ThrowOnError>;\n\ntype BuildUrlFn = <\n  TData extends {\n    body?: unknown;\n    path?: Record<string, unknown>;\n    query?: Record<string, unknown>;\n    url: string;\n  },\n>(\n  options: TData & Options<TData>,\n) => string;\n\nexport type Client = CoreClient<RequestFn, Config, MethodFn, BuildUrlFn, SseFn> & {\n  interceptors: Middleware<Response, unknown, ResolvedRequestOptions>;\n};\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 = ClientOptions> = (\n  override?: Config<ClientOptions & T>,\n) => Config<Required<ClientOptions> & T>;\n\nexport interface TDataShape {\n  body?: unknown;\n  headers?: unknown;\n  path?: unknown;\n  query?: unknown;\n  url: string;\n}\n\ntype OmitKeys<T, K> = Pick<T, Exclude<keyof T, K>>;\n\nexport type Options<\n  TData extends TDataShape = TDataShape,\n  ThrowOnError extends boolean = boolean,\n  TResponse = unknown,\n> = OmitKeys<RequestOptions<TResponse, ThrowOnError>, 'body' | 'path' | 'query' | 'url'> &\n  ([TData] extends [never] ? unknown : Omit<TData, 'url'>);\n"
  },
  {
    "path": "packages/openapi-ts/src/plugins/@hey-api/client-next/bundle/utils.ts",
    "content": "import { getAuthToken } from '../../client-core/bundle/auth';\nimport type {\n  QuerySerializer,\n  QuerySerializerOptions,\n} from '../../client-core/bundle/bodySerializer';\nimport { jsonBodySerializer } from '../../client-core/bundle/bodySerializer';\nimport {\n  serializeArrayParam,\n  serializeObjectParam,\n  serializePrimitiveParam,\n} from '../../client-core/bundle/pathSerializer';\nimport type { Client, ClientOptions, Config, RequestOptions } from './types';\n\ninterface PathSerializer {\n  path: Record<string, unknown>;\n  url: string;\n}\n\nconst PATH_PARAM_RE = /\\{[^{}]+\\}/g;\n\ntype ArrayStyle = 'form' | 'spaceDelimited' | 'pipeDelimited';\ntype MatrixStyle = 'label' | 'matrix' | 'simple';\ntype ArraySeparatorStyle = ArrayStyle | MatrixStyle;\n\nconst 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 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    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  const url = 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  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 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 || typeof header !== 'object') {\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, Options> = (\n  error: Err,\n  response: Res,\n  options: Options,\n) => Err | Promise<Err>;\n\ntype ReqInterceptor<Options> = (options: Options) => void | Promise<void>;\n\ntype ResInterceptor<Res, Options> = (response: Res, options: Options) => 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<Res, Err, Options> {\n  error: Interceptors<ErrInterceptor<Err, Res, Options>>;\n  request: Interceptors<ReqInterceptor<Options>>;\n  response: Interceptors<ResInterceptor<Res, Options>>;\n}\n\nexport const createInterceptors = <Res, Err, Options>(): Middleware<Res, Err, Options> => ({\n  error: new Interceptors<ErrInterceptor<Err, Res, Options>>(),\n  request: new Interceptors<ReqInterceptor<Options>>(),\n  response: new Interceptors<ResInterceptor<Res, 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"
  },
  {
    "path": "packages/openapi-ts/src/plugins/@hey-api/client-next/config.ts",
    "content": "import { definePluginConfig } from '@hey-api/shared';\n\nimport {\n  clientDefaultConfig,\n  clientDefaultMeta,\n} from '../../../plugins/@hey-api/client-core/config';\nimport { clientPluginHandler } from '../../../plugins/@hey-api/client-core/plugin';\nimport type { HeyApiClientNextPlugin } from './types';\n\nexport const defaultConfig: HeyApiClientNextPlugin['Config'] = {\n  ...clientDefaultMeta,\n  config: {\n    ...clientDefaultConfig,\n    throwOnError: false,\n  },\n  handler: clientPluginHandler as unknown as HeyApiClientNextPlugin['Handler'],\n  name: '@hey-api/client-next',\n};\n\n/**\n * Type helper for `@hey-api/client-next` plugin, returns {@link Plugin.Config} object\n */\nexport const defineConfig = definePluginConfig(defaultConfig);\n"
  },
  {
    "path": "packages/openapi-ts/src/plugins/@hey-api/client-next/index.ts",
    "content": "export type { Client as NextClient } from './bundle/types';\nexport { defaultConfig, defineConfig } from './config';\nexport type { HeyApiClientNextPlugin } from './types';\n"
  },
  {
    "path": "packages/openapi-ts/src/plugins/@hey-api/client-next/types.ts",
    "content": "import type { DefinePlugin, Plugin } from '@hey-api/shared';\n\nimport type { Client } from '../../../plugins/@hey-api/client-core/types';\n\nexport type UserConfig = Plugin.Name<'@hey-api/client-next'> &\n  Client.Config & {\n    /**\n     * Throw an error instead of returning it in the response?\n     *\n     * @default false\n     */\n    throwOnError?: boolean;\n  };\n\nexport type HeyApiClientNextPlugin = DefinePlugin<UserConfig, UserConfig>;\n"
  },
  {
    "path": "packages/openapi-ts/src/plugins/@hey-api/client-nuxt/__tests__/client.test.ts",
    "content": "// Mock $fetch global (Nuxt auto-import)\nconst $fetchMock = vi.fn();\nvi.stubGlobal('$fetch', $fetchMock);\n\n// Mock Nuxt composables with realistic return values\nvi.mock('nuxt/app', () => ({\n  useAsyncData: vi.fn(() => ({\n    data: { value: null },\n    error: { value: null },\n    pending: { value: false },\n    refresh: vi.fn(),\n  })),\n  useFetch: vi.fn(() => ({\n    data: { value: null },\n    error: { value: null },\n    pending: { value: false },\n    refresh: vi.fn(),\n  })),\n  useLazyAsyncData: vi.fn(() => ({\n    data: { value: null },\n    error: { value: null },\n    pending: { value: false },\n    refresh: vi.fn(),\n  })),\n  useLazyFetch: vi.fn(() => ({\n    data: { value: null },\n    error: { value: null },\n    pending: { value: false },\n    refresh: vi.fn(),\n  })),\n}));\n\nimport { useFetch } from 'nuxt/app';\nimport { computed, ref } from 'vue';\n\nimport { createClient } from '../bundle/client';\n\ndescribe('useFetch with computed body', () => {\n  it('does not throw when body is a ComputedRef', () => {\n    const client = createClient();\n    const page = ref(1);\n    const body = computed(() => ({ page: page.value, pageSize: 10 }));\n\n    expect(() => {\n      client.post({\n        body,\n        composable: 'useFetch',\n        url: '/test',\n      });\n    }).not.toThrow();\n  });\n\n  it('serializes ComputedRef body correctly on initial call', () => {\n    const client = createClient();\n    const body = computed(() => ({ page: 1, search: 'hello' }));\n\n    client.post({\n      body,\n      composable: 'useFetch',\n      url: '/test',\n    });\n\n    // useFetch should be called with the serialized body as a ref\n    expect(useFetch).toHaveBeenCalled();\n    const callArgs = vi.mocked(useFetch).mock.calls.at(-1)!;\n    const opts = callArgs[1] as Record<string, unknown>;\n    // body should be a ref containing the JSON-serialized value\n    expect((opts.body as { value: unknown }).value).toBe('{\"page\":1,\"search\":\"hello\"}');\n  });\n\n  it('does not throw when body is a plain Ref', () => {\n    const client = createClient();\n    const body = ref({ page: 1, pageSize: 10 });\n\n    expect(() => {\n      client.post({\n        body,\n        composable: 'useFetch',\n        url: '/test',\n      });\n    }).not.toThrow();\n  });\n});\n\ndescribe('buildUrl', () => {\n  const client = createClient();\n\n  const scenarios: {\n    options: Parameters<typeof client.buildUrl>[0];\n    url: string;\n  }[] = [\n    {\n      options: {\n        url: '',\n      },\n      url: '/',\n    },\n    {\n      options: {\n        url: '/foo',\n      },\n      url: '/foo',\n    },\n    {\n      options: {\n        path: {\n          fooId: 1,\n        },\n        url: '/foo/{fooId}',\n      },\n      url: '/foo/1',\n    },\n    {\n      options: {\n        path: {\n          fooId: 1,\n        },\n        query: {\n          bar: 'baz',\n        },\n        url: '/foo/{fooId}',\n      },\n      url: '/foo/1?bar=baz',\n    },\n  ];\n\n  it.each(scenarios)('returns $url', ({ options, url }) => {\n    expect(client.buildUrl(options)).toBe(url);\n  });\n\n  it('uses baseURL from client config by default', () => {\n    const clientWithBase = createClient({ baseURL: 'https://example.com' });\n    expect(clientWithBase.buildUrl({ url: '/foo' })).toBe('https://example.com/foo');\n  });\n\n  it('allows overriding baseURL from client config', () => {\n    const clientWithBase = createClient({ baseURL: 'https://example.com' });\n    expect(clientWithBase.buildUrl({ baseURL: 'https://other.com', url: '/foo' })).toBe(\n      'https://other.com/foo',\n    );\n  });\n});\n"
  },
  {
    "path": "packages/openapi-ts/src/plugins/@hey-api/client-nuxt/__tests__/utils.test.ts",
    "content": "import type { Auth } from '../../client-core/bundle/auth';\nimport { mergeInterceptors, setAuthParams, unwrapRefs } from '../bundle/utils';\n\ndescribe('unwrapRefs', () => {\n  it('returns Blob as-is', () => {\n    const blob = new Blob(['test content'], { type: 'text/plain' });\n    const result = unwrapRefs(blob);\n    expect(result).toBe(blob);\n  });\n\n  it('preserves Blob in object', () => {\n    const blob = new Blob(['test content'], { type: 'application/json' });\n    const input = { file: blob, name: 'test' };\n    const result = unwrapRefs(input);\n    expect(result.file).toBe(blob);\n    expect(result.name).toBe('test');\n  });\n\n  it('preserves Blob in array', () => {\n    const blob = new Blob(['test content'], { type: 'image/png' });\n    const input = [blob, 'text'];\n    const result = unwrapRefs(input);\n    expect(result[0]).toBe(blob);\n    expect(result[1]).toBe('text');\n  });\n\n  it('preserves File (extends Blob) as-is', () => {\n    const file = new File(['test content'], 'test.txt', { type: 'text/plain' });\n    const result = unwrapRefs(file);\n    expect(result).toBe(file);\n  });\n\n  it('returns AbortSignal as-is', () => {\n    const controller = new AbortController();\n    const result = unwrapRefs(controller.signal);\n    expect(result).toBe(controller.signal);\n  });\n\n  it('preserves AbortSignal in object', () => {\n    const controller = new AbortController();\n    const input = { signal: controller.signal, url: '/test' };\n    const result = unwrapRefs(input);\n    expect(result.signal).toBe(controller.signal);\n    expect(result.signal instanceof AbortSignal).toBe(true);\n    expect(result.url).toBe('/test');\n  });\n\n  it('returns FormData as-is', () => {\n    const formData = new FormData();\n    formData.append('key', 'value');\n    const result = unwrapRefs(formData);\n    expect(result).toBe(formData);\n  });\n\n  it('preserves FormData in object', () => {\n    const formData = new FormData();\n    formData.append('key', 'value');\n    const input = { body: formData, url: '/upload' };\n    const result = unwrapRefs(input);\n    expect(result.body).toBe(formData);\n    expect(result.body instanceof FormData).toBe(true);\n  });\n\n  it('returns ReadableStream as-is', () => {\n    const stream = new ReadableStream();\n    const result = unwrapRefs(stream);\n    expect(result).toBe(stream);\n  });\n});\n\ndescribe('mergeInterceptors', () => {\n  it('handles no arguments', () => {\n    const result = mergeInterceptors();\n    expect(result).toEqual([]);\n  });\n\n  it('handles interceptor function', () => {\n    const foo = () => {};\n    const result = mergeInterceptors(foo);\n    expect(result).toEqual([foo]);\n  });\n\n  it('handles interceptors array', () => {\n    const foo = [() => {}];\n    const result = mergeInterceptors(foo);\n    expect(result).toEqual([foo[0]]);\n  });\n\n  it('handles interceptors array and function', () => {\n    const foo = [() => {}, () => {}];\n    const bar = () => {};\n    const result = mergeInterceptors(foo, bar);\n    expect(result).toEqual([foo[0], foo[1], bar]);\n  });\n});\n\ndescribe('setAuthParams', () => {\n  it('sets bearer token in headers', async () => {\n    const auth = vi.fn().mockReturnValue('foo');\n    const headers = new Headers();\n    const query: Record<any, unknown> = {};\n    await setAuthParams({\n      auth,\n      headers,\n      query,\n      security: [\n        {\n          name: 'baz',\n          scheme: 'bearer',\n          type: 'http',\n        },\n      ],\n    });\n    expect(auth).toHaveBeenCalled();\n    expect(headers.get('baz')).toBe('Bearer foo');\n    expect(Object.keys(query).length).toBe(0);\n  });\n\n  it('sets access token in query', async () => {\n    const auth = vi.fn().mockReturnValue('foo');\n    const headers = new Headers();\n    const query: Record<any, unknown> = {};\n    await setAuthParams({\n      auth,\n      headers,\n      query,\n      security: [\n        {\n          in: 'query',\n          name: 'baz',\n          scheme: 'bearer',\n          type: 'http',\n        },\n      ],\n    });\n    expect(auth).toHaveBeenCalled();\n    expect(headers.get('baz')).toBeNull();\n    expect(query.baz).toBe('Bearer foo');\n  });\n\n  it('sets Authorization header when `in` and `name` are undefined', async () => {\n    const auth = vi.fn().mockReturnValue('foo');\n    const headers = new Headers();\n    const query: Record<any, unknown> = {};\n    await setAuthParams({\n      auth,\n      headers,\n      query,\n      security: [\n        {\n          type: 'http',\n        },\n      ],\n    });\n    expect(auth).toHaveBeenCalled();\n    expect(headers.get('Authorization')).toBe('foo');\n    expect(query).toEqual({});\n  });\n\n  it('sets first scheme only', async () => {\n    const auth = vi.fn().mockReturnValue('foo');\n    const headers = new Headers();\n    const query: Record<any, unknown> = {};\n    await setAuthParams({\n      auth,\n      headers,\n      query,\n      security: [\n        {\n          name: 'baz',\n          scheme: 'bearer',\n          type: 'http',\n        },\n        {\n          in: 'query',\n          name: 'baz',\n          scheme: 'bearer',\n          type: 'http',\n        },\n      ],\n    });\n    expect(auth).toHaveBeenCalled();\n    expect(headers.get('baz')).toBe('Bearer foo');\n    expect(Object.keys(query).length).toBe(0);\n  });\n\n  it('sets first scheme with token', async () => {\n    const auth = vi.fn().mockImplementation((auth: Auth) => {\n      if (auth.type === 'apiKey') {\n        return;\n      }\n      return 'foo';\n    });\n    const headers = new Headers();\n    const query: Record<any, unknown> = {};\n    await setAuthParams({\n      auth,\n      headers,\n      query,\n      security: [\n        {\n          name: 'baz',\n          type: 'apiKey',\n        },\n        {\n          in: 'query',\n          name: 'baz',\n          scheme: 'bearer',\n          type: 'http',\n        },\n      ],\n    });\n    expect(auth).toHaveBeenCalled();\n    expect(headers.get('baz')).toBeNull();\n    expect(query.baz).toBe('Bearer foo');\n  });\n\n  it('sets only one specific header', async () => {\n    const auth = vi.fn(({ name }: Auth) => {\n      if (name === 'baz') {\n        return 'foo';\n      }\n      return 'buz';\n    });\n    const headers = new Headers();\n    const query: Record<any, unknown> = {};\n    await setAuthParams({\n      auth,\n      headers,\n      query,\n      security: [\n        {\n          name: 'baz',\n          scheme: 'bearer',\n          type: 'http',\n        },\n        {\n          name: 'fiz',\n          type: 'http',\n        },\n        {\n          in: 'query',\n          name: 'baz',\n          scheme: 'bearer',\n          type: 'http',\n        },\n      ],\n    });\n    expect(auth).toHaveBeenCalled();\n    expect(headers.get('baz')).toBe('Bearer foo');\n    expect(headers.get('fiz')).toBe('buz');\n    expect(Object.keys(query).length).toBe(0);\n  });\n});\n"
  },
  {
    "path": "packages/openapi-ts/src/plugins/@hey-api/client-nuxt/bundle/client.ts",
    "content": "import { useAsyncData, useFetch, useLazyAsyncData, useLazyFetch } from 'nuxt/app';\nimport { reactive, ref, toValue, watch } from 'vue';\n\nimport { createSseClient } from '../../client-core/bundle/serverSentEvents';\nimport type { HttpMethod } from '../../client-core/bundle/types';\nimport { getValidRequestBody } from '../../client-core/bundle/utils';\nimport type { Client, Config, RequestOptions } from './types';\nimport {\n  buildUrl,\n  createConfig,\n  executeFetchFn,\n  mergeConfigs,\n  mergeHeaders,\n  mergeInterceptors,\n  serializeBody,\n  setAuthParams,\n  unwrapRefs,\n} from './utils';\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 beforeRequest = async (options: RequestOptions) => {\n    const opts = {\n      ..._config,\n      ...options,\n      $fetch: options.$fetch ?? _config.$fetch ?? $fetch,\n      headers: mergeHeaders(_config.headers, options.headers),\n      onRequest: mergeInterceptors(_config.onRequest, options.onRequest),\n      onResponse: mergeInterceptors(_config.onResponse, options.onResponse),\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    const url = buildUrl(opts);\n\n    return { opts, url };\n  };\n\n  const request: Client['request'] = ({ asyncDataOptions, composable = '$fetch', ...options }) => {\n    const key = options.key;\n    const opts = {\n      ..._config,\n      ...options,\n      $fetch: options.$fetch ?? _config.$fetch ?? $fetch,\n      headers: mergeHeaders(_config.headers, options.headers),\n      onRequest: mergeInterceptors(_config.onRequest, options.onRequest),\n      onResponse: mergeInterceptors(_config.onResponse, options.onResponse),\n    };\n\n    const { requestValidator, responseTransformer, responseValidator, security } = opts;\n    if (requestValidator || security) {\n      // auth must happen in interceptors otherwise we'd need to require\n      // asyncContext enabled\n      // https://nuxt.com/docs/guide/going-further/experimental-features#asynccontext\n      opts.onRequest = [\n        async ({ options }) => {\n          if (security) {\n            await setAuthParams({\n              auth: opts.auth,\n              headers: options.headers,\n              query: options.query,\n              security,\n            });\n          }\n\n          if (requestValidator) {\n            await requestValidator({\n              ...options,\n              // @ts-expect-error\n              body: options.rawBody,\n            });\n          }\n        },\n        ...opts.onRequest,\n      ];\n    }\n\n    if (responseTransformer || responseValidator) {\n      opts.onResponse = [\n        ...opts.onResponse,\n        async ({ options, response }) => {\n          if (options.responseType && options.responseType !== 'json') {\n            return;\n          }\n\n          if (!response.ok) {\n            return;\n          }\n\n          if (responseValidator) {\n            await responseValidator(response._data);\n          }\n\n          if (responseTransformer) {\n            response._data = await responseTransformer(response._data);\n          }\n        },\n      ];\n    }\n\n    // remove Content-Type header if body is empty to avoid sending invalid requests\n    if (opts.body === undefined || opts.body === '') {\n      opts.headers.delete('Content-Type');\n    }\n\n    const fetchFn = opts.$fetch;\n\n    if (composable === '$fetch') {\n      return executeFetchFn(\n        // @ts-expect-error\n        opts,\n        fetchFn,\n      );\n    }\n\n    if (composable === 'useFetch' || composable === 'useLazyFetch') {\n      opts.rawBody = opts.body;\n      const bodyParams = reactive({\n        body: opts.body,\n        bodySerializer: opts.bodySerializer,\n      });\n      const body = ref(serializeBody({ ...opts, body: toValue(opts.body) }));\n      opts.body = body;\n      watch(bodyParams, (changed) => {\n        body.value = serializeBody(changed);\n      });\n      return composable === 'useLazyFetch'\n        ? useLazyFetch(() => buildUrl(opts), { ...opts, ...asyncDataOptions })\n        : useFetch(() => buildUrl(opts), { ...opts, ...asyncDataOptions });\n    }\n\n    const handler: any = () =>\n      executeFetchFn(\n        // @ts-expect-error\n        opts,\n        fetchFn,\n      );\n\n    if (composable === 'useAsyncData') {\n      return key\n        ? useAsyncData(key, handler, asyncDataOptions)\n        : useAsyncData(handler, asyncDataOptions);\n    }\n\n    if (composable === 'useLazyAsyncData') {\n      return key\n        ? useLazyAsyncData(key, handler, asyncDataOptions)\n        : useLazyAsyncData(handler, asyncDataOptions);\n    }\n\n    return undefined as any;\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      ...unwrapRefs(opts),\n      body: opts.body as BodyInit | null | undefined,\n      method,\n      onRequest: undefined,\n      serializedBody: getValidRequestBody(opts) as BodyInit | null | undefined,\n      signal: unwrapRefs(opts.signal) as AbortSignal,\n      url,\n    });\n  };\n\n  const _buildUrl: Client['buildUrl'] = (options) =>\n    buildUrl({ ..._config, ...options } as typeof 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    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"
  },
  {
    "path": "packages/openapi-ts/src/plugins/@hey-api/client-nuxt/bundle/index.ts",
    "content": "export type { Auth } from '../../client-core/bundle/auth';\nexport type { QuerySerializerOptions } from '../../client-core/bundle/bodySerializer';\nexport {\n  formDataBodySerializer,\n  jsonBodySerializer,\n  urlSearchParamsBodySerializer,\n} from '../../client-core/bundle/bodySerializer';\nexport { buildClientParams } from '../../client-core/bundle/params';\nexport { serializeQueryKeyValue } from '../../client-core/bundle/queryKeySerializer';\nexport { createClient } from './client';\nexport type {\n  Client,\n  ClientOptions,\n  Composable,\n  Config,\n  CreateClientConfig,\n  Options,\n  RequestOptions,\n  RequestResult,\n  TDataShape,\n} from './types';\nexport { createConfig } from './utils';\n"
  },
  {
    "path": "packages/openapi-ts/src/plugins/@hey-api/client-nuxt/bundle/types.ts",
    "content": "import type {\n  AsyncDataOptions,\n  useAsyncData,\n  useFetch,\n  UseFetchOptions,\n  useLazyAsyncData,\n  useLazyFetch,\n} from 'nuxt/app';\nimport type { Ref } from 'vue';\n\nimport type { Auth } from '../../client-core/bundle/auth';\nimport type { QuerySerializerOptions } from '../../client-core/bundle/bodySerializer';\nimport type {\n  ServerSentEventsOptions,\n  ServerSentEventsResult,\n} from '../../client-core/bundle/serverSentEvents';\nimport type { Client as CoreClient, Config as CoreConfig } from '../../client-core/bundle/types';\n\nexport type ArraySeparatorStyle = ArrayStyle | MatrixStyle;\ntype ArrayStyle = 'form' | 'spaceDelimited' | 'pipeDelimited';\ntype MatrixStyle = 'label' | 'matrix' | 'simple';\nexport type ObjectSeparatorStyle = ObjectStyle | MatrixStyle;\ntype ObjectStyle = 'form' | 'deepObject';\n\nexport type QuerySerializer = (query: Parameters<Client['buildUrl']>[0]['query']) => string;\n\ntype WithRefs<TData> = {\n  [K in keyof TData]: NonNullable<TData[K]> extends object\n    ? WithRefs<NonNullable<TData[K]>> | Ref<NonNullable<TData[K]>> | Extract<TData[K], null>\n    : NonNullable<TData[K]> | Ref<NonNullable<TData[K]>> | Extract<TData[K], null>;\n};\n\n// copied from Nuxt\nexport type KeysOf<T> = Array<T extends T ? (keyof T extends string ? keyof T : never) : never>;\n\nexport interface Config<T extends ClientOptions = ClientOptions>\n  extends\n    Omit<FetchOptions<unknown>, 'baseURL' | 'body' | 'headers' | 'method' | 'query'>,\n    WithRefs<Pick<FetchOptions<unknown>, 'query'>>,\n    Omit<CoreConfig, 'querySerializer'> {\n  /**\n   * Base URL for all requests made by this client.\n   */\n  baseURL?: T['baseURL'];\n  /**\n   * A function for serializing request query parameters. By default, arrays\n   * will be exploded in form style, objects will be exploded in deepObject\n   * style, and reserved characters are percent-encoded.\n   *\n   * {@link https://swagger.io/docs/specification/serialization/#query View examples}\n   */\n  querySerializer?: QuerySerializer | QuerySerializerOptions;\n}\n\nexport interface RequestOptions<\n  TComposable extends Composable = '$fetch',\n  ResT = unknown,\n  DefaultT = undefined,\n  Url extends string = string,\n>\n  extends\n    Config,\n    WithRefs<{\n      path?: FetchOptions<unknown>['query'];\n      query?: FetchOptions<unknown>['query'];\n    }>,\n    Pick<\n      ServerSentEventsOptions<ResT>,\n      | 'onSseError'\n      | 'onSseEvent'\n      | 'sseDefaultRetryDelay'\n      | 'sseMaxRetryAttempts'\n      | 'sseMaxRetryDelay'\n    > {\n  asyncDataOptions?: AsyncDataOptions<ResT, ResT, KeysOf<ResT>, DefaultT>;\n  /**\n   * Any body that you want to add to your request.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/fetch#body}\n   */\n  body?: NonNullable<unknown> | Ref<NonNullable<unknown>> | null;\n  composable?: TComposable;\n  key?: string;\n  rawBody?: NonNullable<unknown> | Ref<NonNullable<unknown>> | null;\n  /**\n   * Security mechanism(s) to use for the request.\n   */\n  security?: ReadonlyArray<Auth>;\n  url: Url;\n}\n\nexport type RequestResult<\n  TComposable extends Composable,\n  ResT,\n  TError,\n> = TComposable extends '$fetch'\n  ? ReturnType<typeof $fetch<ResT>>\n  : TComposable extends 'useAsyncData'\n    ? ReturnType<typeof useAsyncData<ResT | null, TError>>\n    : TComposable extends 'useFetch'\n      ? ReturnType<typeof useFetch<ResT | null, TError>>\n      : TComposable extends 'useLazyAsyncData'\n        ? ReturnType<typeof useLazyAsyncData<ResT | null, TError>>\n        : TComposable extends 'useLazyFetch'\n          ? ReturnType<typeof useLazyFetch<ResT | null, TError>>\n          : never;\n\nexport interface ClientOptions {\n  baseURL?: string;\n}\n\ntype MethodFn = <\n  TComposable extends Composable = '$fetch',\n  ResT = unknown,\n  TError = unknown,\n  DefaultT = undefined,\n>(\n  options: Omit<RequestOptions<TComposable, ResT, DefaultT>, 'method'>,\n) => RequestResult<TComposable, ResT, TError>;\n\ntype SseFn = <\n  TComposable extends Composable = '$fetch',\n  ResT = unknown,\n  TError = unknown,\n  DefaultT = undefined,\n>(\n  options: Omit<RequestOptions<TComposable, ResT, DefaultT>, 'method'>,\n) => Promise<ServerSentEventsResult<RequestResult<TComposable, ResT, TError>>>;\n\ntype RequestFn = <\n  TComposable extends Composable = '$fetch',\n  ResT = unknown,\n  TError = unknown,\n  DefaultT = undefined,\n>(\n  options: Omit<RequestOptions<TComposable, ResT, DefaultT>, 'method'> &\n    Pick<Required<RequestOptions<TComposable, ResT, DefaultT>>, 'method'>,\n) => RequestResult<TComposable, ResT, TError>;\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 = ClientOptions> = (\n  override?: Config<ClientOptions & T>,\n) => Config<Required<ClientOptions> & T>;\n\nexport interface TDataShape {\n  body?: unknown;\n  headers?: unknown;\n  path?: FetchOptions<unknown>['query'];\n  query?: FetchOptions<unknown>['query'];\n  url: string;\n}\n\nexport type BuildUrlOptions<\n  TData extends Omit<TDataShape, 'headers'> = Omit<TDataShape, 'headers'>,\n> = Pick<WithRefs<TData>, 'path' | 'query'> &\n  Pick<TData, 'url'> &\n  Pick<Options<'$fetch', TData>, 'baseURL' | 'querySerializer'>;\n\ntype BuildUrlFn = <TData extends Omit<TDataShape, 'headers'>>(\n  options: BuildUrlOptions<TData>,\n) => string;\n\nexport type Client = CoreClient<RequestFn, Config, MethodFn, BuildUrlFn, SseFn>;\n\ntype OmitKeys<T, K> = Pick<T, Exclude<keyof T, K>>;\n\nexport type Options<\n  TComposable extends Composable = '$fetch',\n  TData extends TDataShape = TDataShape,\n  ResT = unknown,\n  DefaultT = undefined,\n> = OmitKeys<RequestOptions<TComposable, ResT, DefaultT>, 'body' | 'path' | 'query' | 'url'> &\n  ([TData] extends [never] ? unknown : WithRefs<Omit<TData, 'url'>>);\n\ntype FetchOptions<TData> = Omit<UseFetchOptions<TData, TData>, keyof AsyncDataOptions<TData>>;\n\nexport type Composable =\n  | '$fetch'\n  | 'useAsyncData'\n  | 'useFetch'\n  | 'useLazyAsyncData'\n  | 'useLazyFetch';\n"
  },
  {
    "path": "packages/openapi-ts/src/plugins/@hey-api/client-nuxt/bundle/utils.ts",
    "content": "import type { ComputedRef, Ref } from 'vue';\nimport { isRef, toValue, unref } from 'vue';\n\nimport { getAuthToken } from '../../client-core/bundle/auth';\nimport type { QuerySerializerOptions } from '../../client-core/bundle/bodySerializer';\nimport { jsonBodySerializer } from '../../client-core/bundle/bodySerializer';\nimport {\n  serializeArrayParam,\n  serializeObjectParam,\n  serializePrimitiveParam,\n} from '../../client-core/bundle/pathSerializer';\nimport type {\n  ArraySeparatorStyle,\n  BuildUrlOptions,\n  Client,\n  ClientOptions,\n  Config,\n  QuerySerializer,\n  RequestOptions,\n} from './types';\n\ntype PathSerializer = Pick<Required<BuildUrlOptions>, 'path' | 'url'>;\n\nconst PATH_PARAM_RE = /\\{[^{}]+\\}/g;\n\ntype MaybeArray<T> = T | T[];\n\nconst 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 = toValue((toValue(path) as Record<string, unknown> | undefined)?.[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 createQuerySerializer = <T = unknown>({\n  parameters = {},\n  ...args\n}: QuerySerializerOptions = {}) => {\n  const querySerializer = (queryParams: T) => {\n    const search: string[] = [];\n    const qParams = toValue(queryParams);\n    if (qParams && typeof qParams === 'object') {\n      for (const name in qParams) {\n        const value = toValue(qParams[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\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    (toValue(options.query) as Record<string, unknown> | undefined)?.[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    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        const queryValue = toValue(options.query) as Record<string, unknown> | undefined;\n        if (queryValue) {\n          queryValue[name] = token;\n        }\n        break;\n      }\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  const url = 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  return url;\n};\n\nexport const getUrl = ({\n  baseUrl,\n  path,\n  query,\n  querySerializer,\n  url: _url,\n}: Pick<BuildUrlOptions, 'path' | 'query' | 'url'> & {\n  baseUrl?: string;\n  querySerializer: QuerySerializer;\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 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 || typeof header !== 'object') {\n      continue;\n    }\n\n    let h: unknown = header;\n    if (isRef(h)) {\n      h = unref(h);\n    }\n\n    const iterator =\n      h instanceof Headers ? headersEntries(h) : Object.entries(h as Record<string, unknown>);\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, unwrapRefs(v) as string);\n        }\n      } else if (value !== undefined) {\n        const v = unwrapRefs(value);\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(key, typeof v === 'object' ? JSON.stringify(v) : (v as string));\n      }\n    }\n  }\n  return mergedHeaders;\n};\n\nexport const mergeInterceptors = <T>(...args: Array<MaybeArray<T>>): Array<T> =>\n  args.reduce<Array<T>>((acc, item) => {\n    if (typeof item === 'function') {\n      acc.push(item);\n    } else if (Array.isArray(item)) {\n      return acc.concat(item);\n    }\n    return acc;\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  querySerializer: defaultQuerySerializer,\n  ...override,\n});\n\ntype UnwrapRefs<T> =\n  T extends Ref<infer V>\n    ? V\n    : T extends ComputedRef<infer V>\n      ? V\n      : T extends Record<string, unknown> // this doesn't handle functions well\n        ? { [K in keyof T]: UnwrapRefs<T[K]> }\n        : T;\n\nexport const unwrapRefs = <T>(value: T): UnwrapRefs<T> => {\n  if (value === null || typeof value !== 'object' || value instanceof Headers) {\n    return (isRef(value) ? unref(value) : value) as UnwrapRefs<T>;\n  }\n\n  if (\n    value instanceof Blob ||\n    value instanceof FormData ||\n    value instanceof ReadableStream ||\n    value instanceof AbortSignal\n  ) {\n    return value as UnwrapRefs<T>;\n  }\n\n  if (Array.isArray(value)) {\n    return value.map((item) => unwrapRefs(item)) as UnwrapRefs<T>;\n  }\n\n  if (isRef(value)) {\n    return unwrapRefs(unref(value) as T);\n  }\n\n  // unwrap into new object to avoid modifying the source\n  const result: Record<string, unknown> = {};\n  for (const key in value) {\n    result[key] = unwrapRefs(value[key] as T);\n  }\n  return result as UnwrapRefs<T>;\n};\n\nexport const serializeBody = (\n  opts: Pick<Parameters<Client['request']>[0], 'body' | 'bodySerializer'>,\n) => {\n  if (opts.body && opts.bodySerializer) {\n    return opts.bodySerializer(opts.body);\n  }\n  return opts.body;\n};\n\nexport const executeFetchFn = (\n  opts: Omit<Parameters<Client['request']>[0], 'composable'>,\n  fetchFn: Required<Config>['$fetch'],\n) => {\n  const unwrappedOpts = unwrapRefs(opts);\n  unwrappedOpts.rawBody = unwrappedOpts.body;\n  unwrappedOpts.body = serializeBody(unwrappedOpts);\n  return fetchFn(\n    buildUrl(opts),\n    // @ts-expect-error\n    unwrappedOpts,\n  );\n};\n"
  },
  {
    "path": "packages/openapi-ts/src/plugins/@hey-api/client-nuxt/config.ts",
    "content": "import { definePluginConfig } from '@hey-api/shared';\n\nimport {\n  clientDefaultConfig,\n  clientDefaultMeta,\n} from '../../../plugins/@hey-api/client-core/config';\nimport { clientPluginHandler } from '../../../plugins/@hey-api/client-core/plugin';\nimport type { HeyApiClientNuxtPlugin } from './types';\n\nexport const defaultConfig: HeyApiClientNuxtPlugin['Config'] = {\n  ...clientDefaultMeta,\n  config: clientDefaultConfig,\n  handler: clientPluginHandler as unknown as HeyApiClientNuxtPlugin['Handler'],\n  name: '@hey-api/client-nuxt',\n};\n\n/**\n * Type helper for `@hey-api/client-nuxt` plugin, returns {@link Plugin.Config} object\n */\nexport const defineConfig = definePluginConfig(defaultConfig);\n"
  },
  {
    "path": "packages/openapi-ts/src/plugins/@hey-api/client-nuxt/index.ts",
    "content": "export type { Client as NuxtClient } from './bundle/types';\nexport { defaultConfig, defineConfig } from './config';\nexport type { HeyApiClientNuxtPlugin } from './types';\n"
  },
  {
    "path": "packages/openapi-ts/src/plugins/@hey-api/client-nuxt/types.ts",
    "content": "import type { DefinePlugin, Plugin } from '@hey-api/shared';\n\nimport type { Client } from '../../../plugins/@hey-api/client-core/types';\n\nexport type UserConfig = Plugin.Name<'@hey-api/client-nuxt'> & Client.Config;\n\nexport type HeyApiClientNuxtPlugin = DefinePlugin<UserConfig, UserConfig>;\n"
  },
  {
    "path": "packages/openapi-ts/src/plugins/@hey-api/client-ofetch/__tests__/client.test.ts",
    "content": "import { createClient } from '../bundle/client';\nimport type { ResolvedRequestOptions } from '../bundle/types';\n\ntype MockOfetch = ((...args: any[]) => any) & {\n  raw?: any;\n};\n\nconst makeMockOfetch = (response: Response): MockOfetch => {\n  const fn: any = vi.fn();\n  fn.raw = vi.fn().mockResolvedValue(response);\n  return fn as MockOfetch;\n};\n\ndescribe('buildUrl', () => {\n  const client = createClient();\n\n  const scenarios: {\n    options: Parameters<typeof client.buildUrl>[0];\n    url: string;\n  }[] = [\n    {\n      options: {\n        url: '',\n      },\n      url: '/',\n    },\n    {\n      options: {\n        url: '/foo',\n      },\n      url: '/foo',\n    },\n    {\n      options: {\n        path: {\n          fooId: 1,\n        },\n        url: '/foo/{fooId}',\n      },\n      url: '/foo/1',\n    },\n    {\n      options: {\n        path: {\n          fooId: 1,\n        },\n        query: {\n          bar: 'baz',\n        },\n        url: '/foo/{fooId}',\n      },\n      url: '/foo/1?bar=baz',\n    },\n    {\n      options: {\n        query: {\n          bar: [],\n          foo: [],\n        },\n        url: '/',\n      },\n      url: '/',\n    },\n    {\n      options: {\n        query: {\n          bar: [],\n          foo: ['abc', 'def'],\n        },\n        url: '/',\n      },\n      url: '/?foo=abc&foo=def',\n    },\n  ];\n\n  it.each(scenarios)('returns $url', ({ options, url }) => {\n    expect(client.buildUrl(options)).toBe(url);\n  });\n\n  it('uses baseUrl from client config by default', () => {\n    const clientWithBase = createClient({ baseUrl: 'https://example.com' });\n    expect(clientWithBase.buildUrl({ url: '/foo' })).toBe('https://example.com/foo');\n  });\n\n  it('allows overriding baseUrl from client config', () => {\n    const clientWithBase = createClient({ baseUrl: 'https://example.com' });\n    expect(clientWithBase.buildUrl({ baseUrl: 'https://other.com', url: '/foo' })).toBe(\n      'https://other.com/foo',\n    );\n  });\n});\n\ndescribe('zero-length body handling', () => {\n  const client = createClient({ baseUrl: 'https://example.com' });\n\n  it('returns empty Blob for zero-length application/octet-stream response', async () => {\n    const mockResponse = new Response(null, {\n      headers: {\n        'Content-Length': '0',\n        'Content-Type': 'application/octet-stream',\n      },\n      status: 200,\n    });\n\n    const mockOfetch = makeMockOfetch(mockResponse);\n\n    const result = await client.request({\n      method: 'GET',\n      ofetch: mockOfetch as any,\n      url: '/test',\n    });\n\n    expect(result.data).toBeInstanceOf(Blob);\n    expect((result.data as Blob).size).toBe(0);\n  });\n\n  it('returns empty ArrayBuffer for zero-length response with arrayBuffer parseAs', async () => {\n    const mockResponse = new Response(null, {\n      headers: {\n        'Content-Length': '0',\n      },\n      status: 200,\n    });\n\n    const mockOfetch = makeMockOfetch(mockResponse);\n\n    const result = await client.request({\n      method: 'GET',\n      ofetch: mockOfetch as any,\n      parseAs: 'arrayBuffer',\n      url: '/test',\n    });\n\n    expect(result.data).toBeInstanceOf(ArrayBuffer);\n    expect((result.data as ArrayBuffer).byteLength).toBe(0);\n  });\n\n  it('returns empty string for zero-length text response', async () => {\n    const mockResponse = new Response(null, {\n      headers: {\n        'Content-Length': '0',\n        'Content-Type': 'text/plain',\n      },\n      status: 200,\n    });\n\n    const mockOfetch = makeMockOfetch(mockResponse);\n\n    const result = await client.request({\n      method: 'GET',\n      ofetch: mockOfetch as any,\n      url: '/test',\n    });\n\n    expect(result.data).toBe('');\n  });\n\n  it('returns empty object for zero-length JSON response', async () => {\n    const mockResponse = new Response(null, {\n      headers: {\n        'Content-Length': '0',\n        'Content-Type': 'application/json',\n      },\n      status: 200,\n    });\n\n    const mockOfetch = makeMockOfetch(mockResponse);\n\n    const result = await client.request({\n      method: 'GET',\n      ofetch: mockOfetch as any,\n      url: '/test',\n    });\n\n    expect(result.data).toEqual({});\n  });\n\n  it('returns empty FormData for zero-length multipart/form-data response', async () => {\n    const mockResponse = new Response(null, {\n      headers: {\n        'Content-Length': '0',\n        'Content-Type': 'multipart/form-data',\n      },\n      status: 200,\n    });\n\n    const mockOfetch = makeMockOfetch(mockResponse);\n\n    const result = await client.request({\n      method: 'GET',\n      ofetch: mockOfetch as any,\n      url: '/test',\n    });\n\n    expect(result.data).toBeInstanceOf(FormData);\n    expect([...(result.data as FormData).entries()]).toHaveLength(0);\n  });\n\n  it('returns stream body for zero-length stream response', async () => {\n    const mockBody = new ReadableStream();\n    const mockResponse = new Response(mockBody, {\n      headers: {\n        'Content-Length': '0',\n      },\n      status: 200,\n    });\n\n    const mockOfetch = makeMockOfetch(mockResponse);\n\n    const result = await client.request({\n      method: 'GET',\n      ofetch: mockOfetch as any,\n      parseAs: 'stream',\n      url: '/test',\n    });\n\n    expect(result.data).toBe(mockBody);\n  });\n\n  it('handles non-zero content correctly for comparison', async () => {\n    const blobContent = new Blob(['test data']);\n    const mockResponse = new Response(blobContent, {\n      headers: {\n        'Content-Type': 'application/octet-stream',\n      },\n      status: 200,\n    });\n\n    const mockOfetch = makeMockOfetch(mockResponse);\n\n    const result = await client.request({\n      method: 'GET',\n      ofetch: mockOfetch as any,\n      url: '/test',\n    });\n\n    expect(result.data).toBeInstanceOf(Blob);\n    expect((result.data as Blob).size).toBeGreaterThan(0);\n  });\n});\n\ndescribe('unserialized request body handling', () => {\n  const client = createClient({ baseUrl: 'https://example.com' });\n\n  const scenarios = [\n    { body: 0, textValue: '0' },\n    { body: false, textValue: 'false' },\n    { body: 'test string', textValue: 'test string' },\n    { body: '', textValue: '' },\n  ];\n\n  it.each(scenarios)('handles plain text body with $body value', async ({ body, textValue }) => {\n    const mockResponse = new Response(JSON.stringify({ success: true }), {\n      headers: {\n        'Content-Type': 'application/json',\n      },\n      status: 200,\n    });\n\n    const mockOfetch = makeMockOfetch(mockResponse);\n\n    const result = await client.post({\n      body,\n      bodySerializer: null,\n      headers: {\n        'Content-Type': 'text/plain',\n      },\n      ofetch: mockOfetch as any,\n      url: '/test',\n    });\n\n    await expect(result.request.text()).resolves.toEqual(textValue);\n    expect(result.request.headers.get('Content-Type')).toEqual('text/plain');\n  });\n});\n\ndescribe('serialized request body handling', () => {\n  const client = createClient({ baseUrl: 'https://example.com' });\n\n  const scenarios = [\n    {\n      body: '',\n      expectBodyValue: null,\n      expectContentHeader: false,\n      serializedBody: '',\n      textValue: '',\n    },\n    {\n      body: 0,\n      expectBodyValue: 0,\n      expectContentHeader: true,\n      serializedBody: 0,\n      textValue: '0',\n    },\n    {\n      body: false,\n      expectBodyValue: false,\n      expectContentHeader: true,\n      serializedBody: false,\n      textValue: 'false',\n    },\n    {\n      body: {},\n      expectBodyValue: '{\"key\":\"value\"}',\n      expectContentHeader: true,\n      serializedBody: '{\"key\":\"value\"}',\n      textValue: '{\"key\":\"value\"}',\n    },\n  ];\n\n  it.each(scenarios)(\n    'handles $serializedBody serializedBody value',\n    async ({ body, expectBodyValue, expectContentHeader, serializedBody, textValue }) => {\n      const mockResponse = new Response(JSON.stringify({ success: true }), {\n        headers: {\n          'Content-Type': 'application/json',\n        },\n        status: 200,\n      });\n\n      const mockOfetch = makeMockOfetch(mockResponse);\n\n      const result = await client.post({\n        body,\n        bodySerializer: () => serializedBody,\n        headers: {\n          'Content-Type': 'application/json',\n        },\n        ofetch: mockOfetch as any,\n        url: '/test',\n      });\n\n      // Ensure request captures serialized text value\n      await expect(result.request.text()).resolves.toEqual(textValue);\n      expect(result.request.headers.get('Content-Type')).toEqual(\n        expectContentHeader ? 'application/json' : null,\n      );\n\n      // Ensure ofetch.raw received the expected body\n      const call = (mockOfetch.raw as any).mock.calls[0];\n      const opts = call[1];\n      expect(opts.body).toEqual(expectBodyValue);\n    },\n  );\n});\n\ndescribe('request interceptor', () => {\n  const client = createClient({ baseUrl: 'https://example.com' });\n\n  const scenarios = [\n    {\n      body: 'test string',\n      bodySerializer: null,\n      contentType: 'text/plain',\n      expectedSerializedValue: undefined,\n    },\n    {\n      body: { key: 'value' },\n      bodySerializer: (body: unknown) => JSON.stringify(body),\n      contentType: 'application/json',\n      expectedSerializedValue: '{\"key\":\"value\"}',\n    },\n  ];\n\n  it.each(scenarios)(\n    'exposes $contentType serialized and raw body values',\n    async ({ body, bodySerializer, contentType, expectedSerializedValue }) => {\n      const mockResponse = new Response(JSON.stringify({ success: true }), {\n        headers: {\n          'Content-Type': 'application/json',\n        },\n        status: 200,\n      });\n\n      const mockOfetch = makeMockOfetch(mockResponse);\n\n      const mockRequestInterceptor = vi\n        .fn()\n        .mockImplementation((request: Request, options: ResolvedRequestOptions) => {\n          expect(options.serializedBody).toBe(expectedSerializedValue);\n          expect(options.body).toBe(body);\n          return request;\n        });\n\n      const interceptorId = client.interceptors.request.use(mockRequestInterceptor);\n\n      await client.post({\n        body,\n        bodySerializer,\n        headers: {\n          'Content-Type': contentType,\n        },\n        ofetch: mockOfetch as any,\n        url: '/test',\n      });\n\n      expect(mockRequestInterceptor).toHaveBeenCalledOnce();\n\n      client.interceptors.request.eject(interceptorId);\n    },\n  );\n});\n\ndescribe('FormData boundary handling', () => {\n  const client = createClient({ baseUrl: 'https://example.com' });\n\n  it('should not include Content-Type header for FormData body to avoid boundary mismatch', async () => {\n    const mockResponse = new Response(JSON.stringify({ success: true }), {\n      headers: {\n        'Content-Type': 'application/json',\n      },\n      status: 200,\n    });\n\n    const mockOfetch = makeMockOfetch(mockResponse);\n\n    const formData = new FormData();\n    formData.append('field1', 'value1');\n    formData.append('field2', 'value2');\n\n    await client.post({\n      body: formData,\n      bodySerializer: null,\n      ofetch: mockOfetch as any,\n      url: '/upload',\n    });\n\n    // Verify that ofetch.raw was called\n    expect(mockOfetch.raw).toHaveBeenCalledOnce();\n\n    // Get the options passed to ofetch.raw\n    const call = (mockOfetch.raw as any).mock.calls[0];\n    const opts = call[1];\n\n    // Verify that FormData is passed as body\n    expect(opts.body).toBeInstanceOf(FormData);\n\n    // Verify that Content-Type header is NOT set (so ofetch can set its own boundary)\n    expect(opts.headers.get('Content-Type')).toBeNull();\n  });\n\n  it('should preserve Content-Type header for non-FormData bodies', async () => {\n    const mockResponse = new Response(JSON.stringify({ success: true }), {\n      headers: {\n        'Content-Type': 'application/json',\n      },\n      status: 200,\n    });\n\n    const mockOfetch = makeMockOfetch(mockResponse);\n\n    await client.post({\n      body: { test: 'data' },\n      ofetch: mockOfetch as any,\n      url: '/api',\n    });\n\n    // Verify that ofetch.raw was called\n    expect(mockOfetch.raw).toHaveBeenCalledOnce();\n\n    // Get the options passed to ofetch.raw\n    const call = (mockOfetch.raw as any).mock.calls[0];\n    const opts = call[1];\n\n    // Verify that Content-Type header IS set for JSON\n    expect(opts.headers.get('Content-Type')).toBe('application/json');\n  });\n\n  it('should handle FormData with interceptors correctly', async () => {\n    const mockResponse = new Response(JSON.stringify({ success: true }), {\n      headers: {\n        'Content-Type': 'application/json',\n      },\n      status: 200,\n    });\n\n    const mockOfetch = makeMockOfetch(mockResponse);\n\n    const formData = new FormData();\n    formData.append('field1', 'value1');\n\n    const mockRequestInterceptor = vi.fn().mockImplementation((request: Request) => {\n      // Interceptor can modify headers but we should still remove Content-Type for FormData\n      request.headers.set('X-Custom-Header', 'custom-value');\n      return request;\n    });\n\n    const interceptorId = client.interceptors.request.use(mockRequestInterceptor);\n\n    await client.post({\n      body: formData,\n      bodySerializer: null,\n      ofetch: mockOfetch as any,\n      url: '/upload',\n    });\n\n    expect(mockRequestInterceptor).toHaveBeenCalledOnce();\n\n    // Get the options passed to ofetch.raw\n    const call = (mockOfetch.raw as any).mock.calls[0];\n    const opts = call[1];\n\n    // Verify that Content-Type is NOT set even after interceptor\n    expect(opts.headers.get('Content-Type')).toBeNull();\n\n    // Verify that custom header from interceptor IS preserved\n    expect(opts.headers.get('X-Custom-Header')).toBe('custom-value');\n\n    client.interceptors.request.eject(interceptorId);\n  });\n});\n\n// Note: дополнительные проверки поведения ofetch (responseType/responseStyle/retry)\n// не дублируем, чтобы набор тестов оставался сопоставим с другими клиентами.\n"
  },
  {
    "path": "packages/openapi-ts/src/plugins/@hey-api/client-ofetch/__tests__/utils.test.ts",
    "content": "import type { Auth } from '../../client-core/bundle/auth';\nimport type { ResolvedRequestOptions } from '../bundle/types';\nimport { buildOfetchOptions, mergeHeaders, setAuthParams } from '../bundle/utils';\n\ndescribe('mergeHeaders', () => {\n  it('merges plain objects into Headers', () => {\n    const headers = mergeHeaders(\n      {\n        baz: 'qux',\n        foo: 'bar',\n      },\n      {\n        baz: 'override',\n      },\n    );\n\n    expect(headers).toBeInstanceOf(Headers);\n    expect(headers.get('foo')).toBe('bar');\n    expect(headers.get('baz')).toBe('override');\n  });\n});\n\ndescribe('setAuthParams', () => {\n  it('sets bearer token in headers', async () => {\n    const auth = vi.fn().mockReturnValue('foo');\n    const headers = new Headers();\n    const query: Record<string, unknown> = {};\n    await setAuthParams({\n      auth,\n      headers,\n      query,\n      security: [\n        {\n          name: 'baz',\n          scheme: 'bearer',\n          type: 'http',\n        },\n      ],\n    });\n    expect(auth).toHaveBeenCalled();\n    expect(headers.get('baz')).toBe('Bearer foo');\n    expect(Object.keys(query).length).toBe(0);\n  });\n\n  it('sets access token in query', async () => {\n    const auth = vi.fn().mockReturnValue('foo');\n    const headers = new Headers();\n    const query: Record<string, unknown> = {};\n    await setAuthParams({\n      auth,\n      headers,\n      query,\n      security: [\n        {\n          in: 'query',\n          name: 'baz',\n          scheme: 'bearer',\n          type: 'http',\n        },\n      ],\n    });\n    expect(auth).toHaveBeenCalled();\n    expect(headers.get('baz')).toBeNull();\n    expect(query.baz).toBe('Bearer foo');\n  });\n\n  it('sets Authorization header when `in` and `name` are undefined', async () => {\n    const auth = vi.fn().mockReturnValue('foo');\n    const headers = new Headers();\n    const query: Record<string, unknown> = {};\n    await setAuthParams({\n      auth,\n      headers,\n      query,\n      security: [\n        {\n          type: 'http',\n        },\n      ],\n    });\n    expect(auth).toHaveBeenCalled();\n    expect(headers.get('Authorization')).toBe('foo');\n    expect(Object.keys(query).length).toBe(0);\n  });\n\n  it('sets an API key in a cookie', async () => {\n    const auth = vi.fn().mockReturnValue('foo');\n    const headers = new Headers();\n    const query: Record<string, unknown> = {};\n    await setAuthParams({\n      auth,\n      headers,\n      query,\n      security: [\n        {\n          in: 'cookie',\n          name: 'baz',\n          type: 'apiKey',\n        },\n      ],\n    });\n    expect(auth).toHaveBeenCalled();\n    expect(headers.get('Cookie')).toContain('baz=foo');\n    expect(Object.keys(query).length).toBe(0);\n  });\n\n  it('sets first scheme only', async () => {\n    const auth = vi.fn().mockReturnValue('foo');\n    const headers = new Headers();\n    const query: Record<string, unknown> = {};\n    await setAuthParams({\n      auth,\n      headers,\n      query,\n      security: [\n        {\n          name: 'baz',\n          scheme: 'bearer',\n          type: 'http',\n        },\n        {\n          in: 'query',\n          name: 'baz',\n          scheme: 'bearer',\n          type: 'http',\n        },\n      ],\n    });\n    expect(auth).toHaveBeenCalled();\n    expect(headers.get('baz')).toBe('Bearer foo');\n    expect(query.baz).toBeUndefined();\n  });\n\n  it('sets first scheme with token', async () => {\n    const auth = vi.fn().mockImplementation((auth: Auth) => {\n      if (auth.type === 'apiKey') {\n        return;\n      }\n      return 'foo';\n    });\n    const headers = new Headers();\n    const query: Record<string, unknown> = {};\n    await setAuthParams({\n      auth,\n      headers,\n      query,\n      security: [\n        {\n          name: 'baz',\n          type: 'apiKey',\n        },\n        {\n          in: 'query',\n          name: 'baz',\n          scheme: 'bearer',\n          type: 'http',\n        },\n      ],\n    });\n    expect(auth).toHaveBeenCalled();\n    expect(headers.get('baz')).toBeNull();\n    expect(query.baz).toBe('Bearer foo');\n  });\n\n  it('sets only one specific header', async () => {\n    const auth = vi.fn(({ name }: Auth) => {\n      if (name === 'baz') {\n        return 'foo';\n      }\n      return 'buz';\n    });\n    const headers = new Headers();\n    const query: Record<string, unknown> = {};\n    await setAuthParams({\n      auth,\n      headers,\n      query,\n      security: [\n        {\n          name: 'baz',\n          scheme: 'bearer',\n          type: 'http',\n        },\n        {\n          name: 'fiz',\n          type: 'http',\n        },\n        {\n          in: 'query',\n          name: 'baz',\n          scheme: 'bearer',\n          type: 'http',\n        },\n      ],\n    });\n    expect(auth).toHaveBeenCalled();\n    expect(headers.get('baz')).toBe('Bearer foo');\n    expect(headers.get('fiz')).toBe('buz');\n    expect(Object.keys(query).length).toBe(0);\n  });\n});\n\ndescribe('buildOfetchOptions', () => {\n  it('passes through credentials property when provided', () => {\n    const opts: ResolvedRequestOptions = {\n      baseUrl: 'https://api.example.com',\n      credentials: 'include' as const,\n      headers: new Headers({ 'Content-Type': 'application/json' }),\n      method: 'GET',\n      url: '/test',\n    };\n\n    const result = buildOfetchOptions(opts, null, undefined);\n\n    expect(result.credentials).toBe('include');\n  });\n\n  it('passes through undefined credentials when not provided', () => {\n    const opts: ResolvedRequestOptions = {\n      baseUrl: 'https://api.example.com',\n      headers: new Headers({ 'Content-Type': 'application/json' }),\n      method: 'GET',\n      url: '/test',\n    };\n\n    const result = buildOfetchOptions(opts, null, undefined);\n\n    expect(result.credentials).toBeUndefined();\n  });\n\n  it('passes through different credential values', () => {\n    const testCases: Array<RequestCredentials> = ['omit', 'same-origin', 'include'];\n\n    testCases.forEach((credentialValue) => {\n      const opts: ResolvedRequestOptions = {\n        baseUrl: 'https://api.example.com',\n        credentials: credentialValue,\n        headers: new Headers({ 'Content-Type': 'application/json' }),\n        method: 'GET',\n        url: '/test',\n      };\n\n      const result = buildOfetchOptions(opts, null, undefined);\n\n      expect(result.credentials).toBe(credentialValue);\n    });\n  });\n});\n"
  },
  {
    "path": "packages/openapi-ts/src/plugins/@hey-api/client-ofetch/bundle/client.ts",
    "content": "import { ofetch, type ResponseType as OfetchResponseType } from 'ofetch';\n\nimport { createSseClient } from '../../client-core/bundle/serverSentEvents';\nimport type { HttpMethod } from '../../client-core/bundle/types';\nimport { getValidRequestBody } from '../../client-core/bundle/utils';\nimport type { Client, Config, RequestOptions, ResolvedRequestOptions } from './types';\nimport {\n  buildOfetchOptions,\n  buildUrl,\n  createConfig,\n  createInterceptors,\n  isRepeatableBody,\n  mapParseAsToResponseType,\n  mergeConfigs,\n  mergeHeaders,\n  parseError,\n  parseSuccess,\n  setAuthParams,\n  wrapDataReturn,\n  wrapErrorReturn,\n} from './utils';\n\ntype ReqInit = Omit<RequestInit, 'body' | 'headers'> & {\n  body?: BodyInit | null | undefined;\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  // precompute serialized / network body\n  const resolveOptions = async (options: RequestOptions) => {\n    const opts = {\n      ..._config,\n      ...options,\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 if body is empty to avoid invalid requests\n    if (opts.body === undefined || opts.serializedBody === '') {\n      opts.headers.delete('Content-Type');\n    }\n\n    // if a raw body is provided (no serializer), adjust Content-Type only when it\n    // equals the default JSON value to better match the concrete body type\n    if (\n      opts.body !== undefined &&\n      opts.bodySerializer === null &&\n      (opts.headers.get('Content-Type') || '').toLowerCase() === 'application/json'\n    ) {\n      const b: unknown = opts.body;\n      if (typeof FormData !== 'undefined' && b instanceof FormData) {\n        // let the runtime set the multipart boundary\n        opts.headers.delete('Content-Type');\n      } else if (typeof URLSearchParams !== 'undefined' && b instanceof URLSearchParams) {\n        // standard urlencoded content type (+ charset)\n        opts.headers.set('Content-Type', 'application/x-www-form-urlencoded;charset=UTF-8');\n      } else if (typeof Blob !== 'undefined' && b instanceof Blob) {\n        const t = b.type?.trim();\n        if (t) {\n          opts.headers.set('Content-Type', t);\n        } else {\n          // unknown blob type: avoid sending a misleading JSON header\n          opts.headers.delete('Content-Type');\n        }\n      }\n    }\n\n    // precompute network body (stability for retries and interceptors)\n    const networkBody = getValidRequestBody(opts) as RequestInit['body'] | null | undefined;\n\n    const url = buildUrl(opts);\n\n    return { networkBody, opts, url };\n  };\n\n  // apply request interceptors and mirror header/method/signal back to opts\n  const applyRequestInterceptors = async (\n    request: Request,\n    opts: ResolvedRequestOptions,\n    body: BodyInit | null | undefined,\n  ) => {\n    for (const fn of interceptors.request.fns) {\n      if (fn) {\n        request = await fn(request, opts);\n      }\n    }\n    // reflect interceptor changes into opts used by the network layer\n    opts.headers = request.headers;\n    opts.method = request.method as Uppercase<HttpMethod>;\n    // ignore request.body changes to avoid turning serialized bodies into streams\n    // body comes only from getValidRequestBody(options)\n    // reflect signal if present\n    opts.signal = (request as any).signal as AbortSignal | undefined;\n\n    // When body is FormData, remove Content-Type header to avoid boundary mismatch.\n    // Note: We already delete Content-Type in resolveOptions for FormData, but the\n    // Request constructor (line 175) re-adds it with an auto-generated boundary.\n    // Since we pass the original FormData (not the Request's body) to ofetch, and\n    // ofetch will generate its own boundary, we must remove the Request's Content-Type\n    // to let ofetch set the correct one. Otherwise the boundary in the header won't\n    // match the boundary in the actual multipart body sent by ofetch.\n    if (typeof FormData !== 'undefined' && body instanceof FormData) {\n      opts.headers.delete('Content-Type');\n    }\n\n    return request;\n  };\n\n  // build ofetch options with stable retry logic based on body repeatability\n  const buildNetworkOptions = (\n    opts: ResolvedRequestOptions,\n    body: BodyInit | null | undefined,\n    responseType: OfetchResponseType | undefined,\n  ) => {\n    const effectiveRetry = isRepeatableBody(body) ? (opts.retry as any) : (0 as any);\n    return buildOfetchOptions(opts, body, responseType, effectiveRetry);\n  };\n\n  const request: Client['request'] = async (options) => {\n    const { networkBody: initialNetworkBody, opts, url } = await resolveOptions(options as any);\n    // map parseAs -> ofetch responseType once per request\n    const ofetchResponseType: OfetchResponseType | undefined = mapParseAsToResponseType(\n      opts.parseAs,\n      opts.responseType,\n    );\n\n    const $ofetch = opts.ofetch ?? ofetch;\n\n    // create Request before network to run middleware consistently\n    const networkBody = initialNetworkBody;\n    const requestInit: ReqInit = {\n      body: networkBody,\n      headers: opts.headers as Headers,\n      method: opts.method,\n      redirect: 'follow',\n      signal: opts.signal,\n    };\n    let request = new Request(url, requestInit);\n\n    request = await applyRequestInterceptors(request, opts, networkBody);\n    const finalUrl = request.url;\n\n    // build ofetch options and perform the request (.raw keeps the Response)\n    const responseOptions = buildNetworkOptions(\n      opts as ResolvedRequestOptions,\n      networkBody,\n      ofetchResponseType,\n    );\n\n    let response = await $ofetch.raw(finalUrl, responseOptions);\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 = { request, response };\n\n    if (response.ok) {\n      const data = await parseSuccess(response, opts, ofetchResponseType);\n      return wrapDataReturn(data, result, opts.responseStyle);\n    }\n\n    let finalError = await parseError(response);\n\n    for (const fn of interceptors.error.fns) {\n      if (fn) {\n        finalError = await fn(finalError, response, request, opts);\n      }\n    }\n\n    // ensure error is never undefined after interceptors\n    finalError = (finalError as any) || ({} as string);\n\n    if (opts.throwOnError) {\n      throw finalError;\n    }\n\n    return wrapErrorReturn(finalError, result, opts.responseStyle) as any;\n  };\n\n  const makeMethodFn = (method: Uppercase<HttpMethod>) => (options: RequestOptions) =>\n    request({ ...options, method } as any);\n\n  const makeSseFn = (method: Uppercase<HttpMethod>) => async (options: RequestOptions) => {\n    const { networkBody, opts, url } = await resolveOptions(options);\n    const optsForSse: any = { ...opts };\n    delete optsForSse.body; // body is provided via serializedBody below\n    return createSseClient({\n      ...optsForSse,\n      fetch: opts.fetch,\n      headers: opts.headers as Headers,\n      method,\n      onRequest: async (url, init) => {\n        let request = new Request(url, init);\n        request = await applyRequestInterceptors(request, opts, networkBody);\n        return request;\n      },\n      serializedBody: networkBody as BodyInit | null | undefined,\n      signal: opts.signal,\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"
  },
  {
    "path": "packages/openapi-ts/src/plugins/@hey-api/client-ofetch/bundle/index.ts",
    "content": "export type { Auth } from '../../client-core/bundle/auth';\nexport type { QuerySerializerOptions } from '../../client-core/bundle/bodySerializer';\nexport {\n  formDataBodySerializer,\n  jsonBodySerializer,\n  urlSearchParamsBodySerializer,\n} from '../../client-core/bundle/bodySerializer';\nexport { buildClientParams } from '../../client-core/bundle/params';\nexport { serializeQueryKeyValue } from '../../client-core/bundle/queryKeySerializer';\nexport { createClient } from './client';\nexport type {\n  Client,\n  ClientOptions,\n  Config,\n  CreateClientConfig,\n  Options,\n  RequestOptions,\n  RequestResult,\n  ResolvedRequestOptions,\n  ResponseStyle,\n  TDataShape,\n} from './types';\nexport { createConfig, mergeHeaders } from './utils';\n"
  },
  {
    "path": "packages/openapi-ts/src/plugins/@hey-api/client-ofetch/bundle/types.ts",
    "content": "import type { FetchOptions as OfetchOptions, ResponseType as OfetchResponseType } from 'ofetch';\nimport type { ofetch } from 'ofetch';\n\nimport type { Auth } from '../../client-core/bundle/auth';\nimport type {\n  ServerSentEventsOptions,\n  ServerSentEventsResult,\n} from '../../client-core/bundle/serverSentEvents';\nimport type { Client as CoreClient, Config as CoreConfig } from '../../client-core/bundle/types';\nimport type { Middleware } from './utils';\n\nexport type ResponseStyle = 'data' | 'fields';\n\nexport interface Config<T extends ClientOptions = ClientOptions>\n  extends Omit<RequestInit, 'body' | 'headers' | 'method'>, CoreConfig {\n  /**\n   * HTTP(S) agent configuration (Node.js only). Passed through to ofetch.\n   */\n  agent?: OfetchOptions['agent'];\n  /**\n   * Base URL for all requests made by this client.\n   */\n  baseUrl?: T['baseUrl'];\n  /**\n   * Node-only proxy/agent options.\n   */\n  dispatcher?: OfetchOptions['dispatcher'];\n  /**\n   * Fetch API implementation. Used for SSE streaming. You can use this option\n   * to provide a custom fetch instance.\n   *\n   * @default globalThis.fetch\n   */\n  fetch?: typeof fetch;\n  /**\n   * Controls the native ofetch behaviour that throws `FetchError` when\n   * `response.ok === false`. We default to suppressing it to match the fetch\n   * client semantics and let `throwOnError` drive the outcome.\n   */\n  ignoreResponseError?: OfetchOptions['ignoreResponseError'];\n  // No custom fetch option: provide custom instance via `ofetch` instead\n  /**\n   * Please don't use the Fetch client for Next.js applications. The `next`\n   * options won't have any effect.\n   *\n   * Install {@link https://www.npmjs.com/package/@hey-api/client-next `@hey-api/client-next`} instead.\n   */\n  next?: never;\n  /**\n   * Custom ofetch instance created via `ofetch.create()`. If provided, it will\n   * be used for requests instead of the default `ofetch` export.\n   */\n  ofetch?: typeof ofetch;\n  /**\n   * ofetch hook called before a request is sent.\n   */\n  onRequest?: OfetchOptions['onRequest'];\n  /**\n   * ofetch hook called when a request fails before receiving a response\n   * (e.g., network errors or aborted requests).\n   */\n  onRequestError?: OfetchOptions['onRequestError'];\n  /**\n   * ofetch hook called after a successful response is received and parsed.\n   */\n  onResponse?: OfetchOptions['onResponse'];\n  /**\n   * ofetch hook called when the response indicates an error (non-ok status)\n   * or when response parsing fails.\n   */\n  onResponseError?: OfetchOptions['onResponseError'];\n  /**\n   * Return the response data parsed in a specified format. By default, `auto`\n   * will infer the appropriate method from the `Content-Type` response header.\n   * You can override this behavior with any of the {@link Body} methods.\n   * Select `stream` if you don't want to parse response data at all.\n   *\n   * @default 'auto'\n   */\n  parseAs?: 'arrayBuffer' | 'auto' | 'blob' | 'formData' | 'json' | 'stream' | 'text';\n  /** Custom response parser (ofetch). */\n  parseResponse?: OfetchOptions['parseResponse'];\n  /**\n   * Should we return only data or multiple fields (data, error, response, etc.)?\n   *\n   * @default 'fields'\n   */\n  responseStyle?: ResponseStyle;\n  /**\n   * ofetch responseType override. If provided, it will be passed directly to\n   * ofetch and take precedence over `parseAs`.\n   */\n  responseType?: OfetchResponseType;\n  /**\n   * Automatically retry failed requests.\n   */\n  retry?: OfetchOptions['retry'];\n  /**\n   * Delay (in ms) between retry attempts.\n   */\n  retryDelay?: OfetchOptions['retryDelay'];\n  /**\n   * HTTP status codes that should trigger a retry.\n   */\n  retryStatusCodes?: OfetchOptions['retryStatusCodes'];\n  /**\n   * Throw an error instead of returning it in the response?\n   *\n   * @default false\n   */\n  throwOnError?: T['throwOnError'];\n  /**\n   * Abort the request after the given milliseconds.\n   */\n  timeout?: number;\n}\n\nexport interface RequestOptions<\n  TData = unknown,\n  TResponseStyle extends ResponseStyle = 'fields',\n  ThrowOnError extends boolean = boolean,\n  Url extends string = string,\n>\n  extends\n    Config<{\n      responseStyle: TResponseStyle;\n      throwOnError: ThrowOnError;\n    }>,\n    Pick<\n      ServerSentEventsOptions<TData>,\n      | 'onSseError'\n      | 'onSseEvent'\n      | 'sseDefaultRetryDelay'\n      | 'sseMaxRetryAttempts'\n      | 'sseMaxRetryDelay'\n    > {\n  /**\n   * Any body that you want to add to your request.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/fetch#body}\n   */\n  body?: unknown;\n  path?: Record<string, unknown>;\n  query?: Record<string, unknown>;\n  /**\n   * Security mechanism(s) to use for the request.\n   */\n  security?: ReadonlyArray<Auth>;\n  url: Url;\n}\n\nexport interface ResolvedRequestOptions<\n  TResponseStyle extends ResponseStyle = 'fields',\n  ThrowOnError extends boolean = boolean,\n  Url extends string = string,\n> extends RequestOptions<unknown, TResponseStyle, ThrowOnError, Url> {\n  serializedBody?: string;\n}\n\nexport type RequestResult<\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = boolean,\n  TResponseStyle extends ResponseStyle = 'fields',\n> = ThrowOnError extends true\n  ? Promise<\n      TResponseStyle extends 'data'\n        ? TData extends Record<string, unknown>\n          ? TData[keyof TData]\n          : TData\n        : {\n            data: TData extends Record<string, unknown> ? TData[keyof TData] : TData;\n            request: Request;\n            response: Response;\n          }\n    >\n  : Promise<\n      TResponseStyle extends 'data'\n        ? (TData extends Record<string, unknown> ? TData[keyof TData] : TData) | undefined\n        : (\n            | {\n                data: TData extends Record<string, unknown> ? TData[keyof TData] : TData;\n                error: undefined;\n              }\n            | {\n                data: undefined;\n                error: TError extends Record<string, unknown> ? TError[keyof TError] : TError;\n              }\n          ) & {\n            request: Request;\n            response: Response;\n          }\n    >;\n\nexport interface ClientOptions {\n  baseUrl?: string;\n  responseStyle?: ResponseStyle;\n  throwOnError?: boolean;\n}\n\ntype MethodFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'>,\n) => RequestResult<TData, TError, ThrowOnError, TResponseStyle>;\n\ntype SseFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'>,\n) => Promise<ServerSentEventsResult<TData, TError>>;\n\ntype RequestFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'> &\n    Pick<Required<RequestOptions<TData, TResponseStyle, ThrowOnError>>, 'method'>,\n) => RequestResult<TData, TError, ThrowOnError, TResponseStyle>;\n\ntype BuildUrlFn = <\n  TData extends {\n    body?: unknown;\n    path?: Record<string, unknown>;\n    query?: Record<string, unknown>;\n    url: string;\n  },\n>(\n  options: TData & Options<TData>,\n) => string;\n\nexport type Client = CoreClient<RequestFn, Config, MethodFn, BuildUrlFn, SseFn> & {\n  interceptors: Middleware<Request, Response, unknown, ResolvedRequestOptions>;\n};\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 = ClientOptions> = (\n  override?: Config<ClientOptions & T>,\n) => Config<Required<ClientOptions> & T>;\n\nexport interface TDataShape {\n  body?: unknown;\n  headers?: unknown;\n  path?: unknown;\n  query?: unknown;\n  url: string;\n}\n\ntype OmitKeys<T, K> = Pick<T, Exclude<keyof T, K>>;\n\nexport type Options<\n  TData extends TDataShape = TDataShape,\n  ThrowOnError extends boolean = boolean,\n  TResponse = unknown,\n  TResponseStyle extends ResponseStyle = 'fields',\n> = OmitKeys<\n  RequestOptions<TResponse, TResponseStyle, ThrowOnError>,\n  'body' | 'path' | 'query' | 'url'\n> &\n  ([TData] extends [never] ? unknown : Omit<TData, 'url'>);\n"
  },
  {
    "path": "packages/openapi-ts/src/plugins/@hey-api/client-ofetch/bundle/utils.ts",
    "content": "import type { FetchOptions as OfetchOptions, ResponseType as OfetchResponseType } from 'ofetch';\n\nimport { getAuthToken } from '../../client-core/bundle/auth';\nimport type { QuerySerializerOptions } from '../../client-core/bundle/bodySerializer';\nimport { jsonBodySerializer } from '../../client-core/bundle/bodySerializer';\nimport {\n  serializeArrayParam,\n  serializeObjectParam,\n  serializePrimitiveParam,\n} from '../../client-core/bundle/pathSerializer';\nimport { getUrl } from '../../client-core/bundle/utils';\nimport type {\n  Client,\n  ClientOptions,\n  Config,\n  RequestOptions,\n  ResolvedRequestOptions,\n  ResponseStyle,\n} from './types';\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\n/**\n * Map our parseAs value to ofetch responseType when not explicitly provided.\n */\nexport const mapParseAsToResponseType = (\n  parseAs: Config['parseAs'] | undefined,\n  explicit?: OfetchResponseType,\n): OfetchResponseType | undefined => {\n  if (explicit) return explicit;\n  switch (parseAs) {\n    case 'arrayBuffer':\n    case 'blob':\n    case 'json':\n    case 'text':\n    case 'stream':\n      return parseAs;\n    case 'formData':\n    case 'auto':\n    default:\n      return undefined; // let ofetch auto-detect\n  }\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\n/**\n * Heuristic to detect whether a request body can be safely retried.\n */\nexport const isRepeatableBody = (body: unknown): boolean => {\n  if (body == null) return true; // undefined/null treated as no-body\n  if (typeof body === 'string') return true;\n  if (typeof URLSearchParams !== 'undefined' && body instanceof URLSearchParams) return true;\n  if (typeof Uint8Array !== 'undefined' && body instanceof Uint8Array) return true;\n  if (typeof ArrayBuffer !== 'undefined' && body instanceof ArrayBuffer) return true;\n  if (typeof Blob !== 'undefined' && body instanceof Blob) return true;\n  if (typeof FormData !== 'undefined' && body instanceof FormData) return true;\n  // Streams are not repeatable\n  if (typeof ReadableStream !== 'undefined' && body instanceof ReadableStream) return false;\n  // Default: assume non-repeatable for unknown structured bodies\n  return false;\n};\n\n/**\n * Small helper to unify data vs fields return style.\n */\nexport const wrapDataReturn = <T>(\n  data: T,\n  result: { request: Request; response: Response },\n  responseStyle: ResponseStyle | undefined,\n): T | ((T extends Record<string, unknown> ? { data: T } : { data: T }) & typeof result) =>\n  (responseStyle ?? 'fields') === 'data' ? (data as any) : ({ data, ...result } as any);\n\n/**\n * Small helper to unify error vs fields return style.\n */\nexport const wrapErrorReturn = <E>(\n  error: E,\n  result: { request: Request; response: Response },\n  responseStyle: ResponseStyle | undefined,\n):\n  | undefined\n  | ((E extends Record<string, unknown> ? { error: E } : { error: E }) & typeof result) =>\n  (responseStyle ?? 'fields') === 'data' ? undefined : ({ error, ...result } as any);\n\n/**\n * Build options for $ofetch.raw from our resolved opts and body.\n */\nexport const buildOfetchOptions = (\n  opts: ResolvedRequestOptions,\n  body: BodyInit | null | undefined,\n  responseType: OfetchResponseType | undefined,\n  retryOverride?: OfetchOptions['retry'],\n): OfetchOptions =>\n  ({\n    agent: opts.agent as OfetchOptions['agent'],\n    body,\n    credentials: opts.credentials as OfetchOptions['credentials'],\n    dispatcher: opts.dispatcher as OfetchOptions['dispatcher'],\n    headers: opts.headers as Headers,\n    ignoreResponseError: (opts.ignoreResponseError as OfetchOptions['ignoreResponseError']) ?? true,\n    method: opts.method,\n    onRequest: opts.onRequest as OfetchOptions['onRequest'],\n    onRequestError: opts.onRequestError as OfetchOptions['onRequestError'],\n    onResponse: opts.onResponse as OfetchOptions['onResponse'],\n    onResponseError: opts.onResponseError as OfetchOptions['onResponseError'],\n    parseResponse: opts.parseResponse as OfetchOptions['parseResponse'],\n    // URL already includes query\n    query: undefined,\n    responseType,\n    retry: retryOverride ?? (opts.retry as OfetchOptions['retry']),\n    retryDelay: opts.retryDelay as OfetchOptions['retryDelay'],\n    retryStatusCodes: opts.retryStatusCodes as OfetchOptions['retryStatusCodes'],\n    signal: opts.signal,\n    timeout: opts.timeout as number | undefined,\n  }) as OfetchOptions;\n\n/**\n * Parse a successful response, handling empty bodies and stream cases.\n */\nexport const parseSuccess = async (\n  response: Response,\n  opts: ResolvedRequestOptions,\n  ofetchResponseType?: OfetchResponseType,\n): Promise<unknown> => {\n  // Stream requested: return stream body\n  if (ofetchResponseType === 'stream') {\n    return response.body;\n  }\n\n  const inferredParseAs =\n    (opts.parseAs === 'auto' ? getParseAs(response.headers.get('Content-Type')) : opts.parseAs) ??\n    'json';\n\n  // Handle empty responses\n  if (response.status === 204 || response.headers.get('Content-Length') === '0') {\n    switch (inferredParseAs) {\n      case 'arrayBuffer':\n      case 'blob':\n      case 'text':\n        return await (response as any)[inferredParseAs]();\n      case 'formData':\n        return new FormData();\n      case 'stream':\n        return response.body;\n      default:\n        return {};\n    }\n  }\n\n  // Prefer ofetch-populated data unless we explicitly need raw `formData`\n  let data: unknown = (response as any)._data;\n  if (inferredParseAs === 'formData' || typeof data === 'undefined') {\n    switch (inferredParseAs) {\n      case 'arrayBuffer':\n      case 'blob':\n      case 'formData':\n      case 'text':\n        data = await (response as any)[inferredParseAs]();\n        break;\n      case 'json': {\n        // Some servers return 200 with no Content-Length and empty body.\n        // response.json() would throw; detect empty via clone().text() first.\n        const txt = await response.clone().text();\n        if (!txt) {\n          data = {};\n        } else {\n          data = await (response as any).json();\n        }\n        break;\n      }\n      case 'stream':\n        return response.body;\n    }\n  }\n\n  if (inferredParseAs === 'json') {\n    if (opts.responseValidator) {\n      await opts.responseValidator(data);\n    }\n    if (opts.responseTransformer) {\n      data = await opts.responseTransformer(data);\n    }\n  }\n\n  return data;\n};\n\n/**\n * Parse an error response payload.\n */\nexport const parseError = async (response: Response): Promise<unknown> => {\n  let error: unknown = (response as any)._data;\n  if (typeof error === 'undefined') {\n    const textError = await response.text();\n    try {\n      error = JSON.parse(textError);\n    } catch {\n      error = textError;\n    }\n  }\n  return error ?? ({} as string);\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  ignoreResponseError: true,\n  parseAs: 'auto',\n  querySerializer: defaultQuerySerializer,\n  ...override,\n});\n"
  },
  {
    "path": "packages/openapi-ts/src/plugins/@hey-api/client-ofetch/config.ts",
    "content": "import { definePluginConfig } from '@hey-api/shared';\n\nimport {\n  clientDefaultConfig,\n  clientDefaultMeta,\n} from '../../../plugins/@hey-api/client-core/config';\nimport { clientPluginHandler } from '../../../plugins/@hey-api/client-core/plugin';\nimport type { HeyApiClientOfetchPlugin } from './types';\n\nexport const defaultConfig: HeyApiClientOfetchPlugin['Config'] = {\n  ...clientDefaultMeta,\n  config: {\n    ...clientDefaultConfig,\n    throwOnError: false,\n  },\n  handler: clientPluginHandler,\n  name: '@hey-api/client-ofetch',\n};\n\n/**\n * Type helper for `@hey-api/client-ofetch` plugin, returns {@link Plugin.Config} object\n */\nexport const defineConfig = definePluginConfig(defaultConfig);\n"
  },
  {
    "path": "packages/openapi-ts/src/plugins/@hey-api/client-ofetch/index.ts",
    "content": "export type { Client as OfetchClient } from './bundle/types';\nexport { defaultConfig, defineConfig } from './config';\nexport type { HeyApiClientOfetchPlugin } from './types';\n"
  },
  {
    "path": "packages/openapi-ts/src/plugins/@hey-api/client-ofetch/types.ts",
    "content": "import type { DefinePlugin, Plugin } from '@hey-api/shared';\n\nimport type { Client } from '../../../plugins/@hey-api/client-core/types';\n\nexport type UserConfig = Plugin.Name<'@hey-api/client-ofetch'> &\n  Client.Config & {\n    /**\n     * Throw an error instead of returning it in the response?\n     *\n     * @default false\n     */\n    throwOnError?: boolean;\n  };\n\nexport type HeyApiClientOfetchPlugin = DefinePlugin<UserConfig, UserConfig>;\n"
  },
  {
    "path": "packages/openapi-ts/src/plugins/@hey-api/schemas/config.ts",
    "content": "import { definePluginConfig } from '@hey-api/shared';\n\nimport { handler } from './plugin';\nimport type { HeyApiSchemasPlugin } from './types';\n\nexport const defaultConfig: HeyApiSchemasPlugin['Config'] = {\n  config: {\n    includeInEntry: false,\n    nameBuilder: (name) => `${name}Schema`,\n    type: 'json',\n  },\n  handler,\n  name: '@hey-api/schemas',\n};\n\n/**\n * Type helper for `@hey-api/schemas` plugin, returns {@link Plugin.Config} object\n */\nexport const defineConfig = definePluginConfig(defaultConfig);\n"
  },
  {
    "path": "packages/openapi-ts/src/plugins/@hey-api/schemas/index.ts",
    "content": "export { defaultConfig, defineConfig } from './config';\nexport type { HeyApiSchemasPlugin } from './types';\n"
  },
  {
    "path": "packages/openapi-ts/src/plugins/@hey-api/schemas/plugin.ts",
    "content": "import type {\n  Context,\n  OpenApi,\n  OpenApiV2_0_XTypes,\n  OpenApiV3_0_XTypes,\n  OpenApiV3_1_XTypes,\n} from '@hey-api/shared';\nimport { satisfies } from '@hey-api/shared';\n\nimport { $ } from '../../../ts-dsl';\nimport type { HeyApiSchemasPlugin } from './types';\n\nconst stripSchema = ({\n  plugin,\n  schema,\n}: {\n  plugin: HeyApiSchemasPlugin['Instance'];\n  schema:\n    | OpenApiV2_0_XTypes['SchemaObject']\n    | OpenApiV3_0_XTypes['SchemaObject']\n    | OpenApiV3_1_XTypes['SchemaObject'];\n}) => {\n  if (plugin.config.type === 'form') {\n    if (schema.description) {\n      delete schema.description;\n    }\n\n    if (schema['x-enum-descriptions']) {\n      delete schema['x-enum-descriptions'];\n    }\n\n    if (schema['x-enum-varnames']) {\n      delete schema['x-enum-varnames'];\n    }\n\n    if (schema['x-enumNames']) {\n      delete schema['x-enumNames'];\n    }\n\n    if (schema.title) {\n      delete schema.title;\n    }\n  }\n};\n\nconst schemaToJsonSchemaDraft_04 = ({\n  context,\n  plugin,\n  schema: _schema,\n}: {\n  context: Context;\n  plugin: HeyApiSchemasPlugin['Instance'];\n  schema: OpenApiV2_0_XTypes['SchemaObject'];\n}): OpenApiV2_0_XTypes['SchemaObject'] => {\n  if (Array.isArray(_schema)) {\n    return _schema.map((item) =>\n      schemaToJsonSchemaDraft_04({\n        context,\n        plugin,\n        schema: item,\n      }),\n    ) as unknown as OpenApiV2_0_XTypes['SchemaObject'];\n  }\n\n  const schema = structuredClone(_schema);\n\n  if (schema.$ref) {\n    // refs using unicode characters become encoded, didn't investigate why\n    // but the suspicion is this comes from `@hey-api/json-schema-ref-parser`\n    schema.$ref = decodeURI(schema.$ref);\n    return schema;\n  }\n\n  stripSchema({ plugin, schema });\n\n  if (schema.additionalProperties && typeof schema.additionalProperties !== 'boolean') {\n    schema.additionalProperties = schemaToJsonSchemaDraft_04({\n      context,\n      plugin,\n      schema: schema.additionalProperties,\n    });\n  }\n\n  if (schema.allOf) {\n    schema.allOf = schema.allOf.map((item) =>\n      schemaToJsonSchemaDraft_04({\n        context,\n        plugin,\n        schema: item,\n      }),\n    );\n  }\n\n  if (schema.items) {\n    schema.items = schemaToJsonSchemaDraft_04({\n      context,\n      plugin,\n      schema: schema.items as OpenApiV2_0_XTypes['SchemaObject'],\n    });\n  }\n\n  if (schema.properties) {\n    for (const name in schema.properties) {\n      const property = schema.properties[name]!;\n\n      if (typeof property !== 'boolean') {\n        schema.properties[name] = schemaToJsonSchemaDraft_04({\n          context,\n          plugin,\n          schema: property,\n        });\n      }\n    }\n  }\n\n  return schema;\n};\n\nconst schemaToJsonSchemaDraft_05 = ({\n  context,\n  plugin,\n  schema: _schema,\n}: {\n  context: Context;\n  plugin: HeyApiSchemasPlugin['Instance'];\n  schema: OpenApiV3_0_XTypes['SchemaObject'] | OpenApiV3_0_XTypes['ReferenceObject'];\n}): OpenApiV3_0_XTypes['SchemaObject'] | OpenApiV3_0_XTypes['ReferenceObject'] => {\n  if (Array.isArray(_schema)) {\n    return _schema.map((item) =>\n      schemaToJsonSchemaDraft_05({\n        context,\n        plugin,\n        schema: item,\n      }),\n    ) as unknown as OpenApiV3_0_XTypes['SchemaObject'] | OpenApiV3_0_XTypes['ReferenceObject'];\n  }\n\n  const schema = structuredClone(_schema);\n\n  if ('$ref' in schema) {\n    // refs using unicode characters become encoded, didn't investigate why\n    // but the suspicion is this comes from `@hey-api/json-schema-ref-parser`\n    schema.$ref = decodeURI(schema.$ref);\n    return schema;\n  }\n\n  stripSchema({ plugin, schema });\n\n  if (schema.additionalProperties && typeof schema.additionalProperties !== 'boolean') {\n    schema.additionalProperties = schemaToJsonSchemaDraft_05({\n      context,\n      plugin,\n      schema: schema.additionalProperties,\n    });\n  }\n\n  if (schema.allOf) {\n    schema.allOf = schema.allOf.map((item) =>\n      schemaToJsonSchemaDraft_05({\n        context,\n        plugin,\n        schema: item,\n      }),\n    );\n  }\n\n  if (schema.anyOf) {\n    schema.anyOf = schema.anyOf.map((item) =>\n      schemaToJsonSchemaDraft_05({\n        context,\n        plugin,\n        schema: item,\n      }),\n    );\n  }\n\n  if (schema.items) {\n    schema.items = schemaToJsonSchemaDraft_05({\n      context,\n      plugin,\n      schema: schema.items,\n    });\n  }\n\n  if (schema.oneOf) {\n    schema.oneOf = schema.oneOf.map((item) =>\n      schemaToJsonSchemaDraft_05({\n        context,\n        plugin,\n        schema: item,\n      }),\n    );\n  }\n\n  if (schema.properties) {\n    for (const name in schema.properties) {\n      const property = schema.properties[name]!;\n\n      if (typeof property !== 'boolean') {\n        schema.properties[name] = schemaToJsonSchemaDraft_05({\n          context,\n          plugin,\n          schema: property,\n        });\n      }\n    }\n  }\n\n  return schema;\n};\n\nconst schemaToJsonSchema2020_12 = ({\n  context,\n  plugin,\n  schema: _schema,\n}: {\n  context: Context;\n  plugin: HeyApiSchemasPlugin['Instance'];\n  schema: OpenApiV3_1_XTypes['SchemaObject'];\n}): OpenApiV3_1_XTypes['SchemaObject'] => {\n  if (Array.isArray(_schema)) {\n    return _schema.map((item) =>\n      schemaToJsonSchema2020_12({\n        context,\n        plugin,\n        schema: item,\n      }),\n    ) as unknown as OpenApiV3_1_XTypes['SchemaObject'];\n  }\n\n  const schema = structuredClone(_schema);\n\n  stripSchema({ plugin, schema });\n\n  if (schema.$ref) {\n    // refs using unicode characters become encoded, didn't investigate why\n    // but the suspicion is this comes from `@hey-api/json-schema-ref-parser`\n    schema.$ref = decodeURI(schema.$ref);\n  }\n\n  if (schema.additionalProperties && typeof schema.additionalProperties !== 'boolean') {\n    schema.additionalProperties = schemaToJsonSchema2020_12({\n      context,\n      plugin,\n      schema: schema.additionalProperties,\n    });\n  }\n\n  if (schema.allOf) {\n    schema.allOf = schema.allOf.map((item) =>\n      schemaToJsonSchema2020_12({\n        context,\n        plugin,\n        schema: item,\n      }),\n    );\n  }\n\n  if (schema.anyOf) {\n    schema.anyOf = schema.anyOf.map((item) =>\n      schemaToJsonSchema2020_12({\n        context,\n        plugin,\n        schema: item,\n      }),\n    );\n  }\n\n  if (schema.items) {\n    schema.items = schemaToJsonSchema2020_12({\n      context,\n      plugin,\n      schema: schema.items,\n    });\n  }\n\n  if (schema.oneOf) {\n    schema.oneOf = schema.oneOf.map((item) =>\n      schemaToJsonSchema2020_12({\n        context,\n        plugin,\n        schema: item,\n      }),\n    );\n  }\n\n  if (schema.prefixItems) {\n    schema.prefixItems = schema.prefixItems.map((item) =>\n      schemaToJsonSchema2020_12({\n        context,\n        plugin,\n        schema: item,\n      }),\n    );\n  }\n\n  if (schema.properties) {\n    for (const name in schema.properties) {\n      const property = schema.properties[name]!;\n\n      if (typeof property !== 'boolean') {\n        schema.properties[name] = schemaToJsonSchema2020_12({\n          context,\n          plugin,\n          schema: property,\n        });\n      }\n    }\n  }\n\n  return schema;\n};\n\nconst schemaName = ({\n  name,\n  plugin,\n  schema,\n}: {\n  name: string;\n  plugin: HeyApiSchemasPlugin['Instance'];\n  schema:\n    | OpenApiV2_0_XTypes['SchemaObject']\n    | OpenApiV3_0_XTypes['ReferenceObject']\n    | OpenApiV3_0_XTypes['SchemaObject']\n    | OpenApiV3_1_XTypes['SchemaObject'];\n}): string => {\n  let customName = '';\n\n  if (plugin.config.nameBuilder) {\n    if (typeof plugin.config.nameBuilder === 'function') {\n      customName = plugin.config.nameBuilder(name, schema);\n    } else {\n      customName = plugin.config.nameBuilder.replace('{{name}}', name);\n    }\n  }\n\n  if (!customName) {\n    customName = `${name}Schema`;\n  }\n\n  return customName;\n};\n\nconst schemasV2_0_X = ({\n  context,\n  plugin,\n}: {\n  context: Context<OpenApi.V2_0_X>;\n  plugin: HeyApiSchemasPlugin['Instance'];\n}) => {\n  if (!context.spec.definitions) {\n    return;\n  }\n\n  for (const name in context.spec.definitions) {\n    const schema = context.spec.definitions[name]!;\n    const symbol = plugin.symbol(schemaName({ name, plugin, schema }), {\n      meta: {\n        category: 'schema',\n        resource: 'definition',\n        resourceId: name,\n        tool: 'json-schema',\n      },\n    });\n    const obj = schemaToJsonSchemaDraft_04({\n      context,\n      plugin,\n      schema,\n    });\n    const statement = $.const(symbol)\n      .export()\n      .assign(\n        $(\n          $.fromValue(obj, {\n            layout: 'pretty',\n          }),\n        ).as('const'),\n      );\n    plugin.node(statement);\n  }\n};\n\nconst schemasV3_0_X = ({\n  context,\n  plugin,\n}: {\n  context: Context<OpenApi.V3_0_X>;\n  plugin: HeyApiSchemasPlugin['Instance'];\n}) => {\n  if (!context.spec.components) {\n    return;\n  }\n\n  for (const name in context.spec.components.schemas) {\n    const schema = context.spec.components.schemas[name]!;\n    const symbol = plugin.symbol(schemaName({ name, plugin, schema }), {\n      meta: {\n        category: 'schema',\n        resource: 'definition',\n        resourceId: name,\n        tool: 'json-schema',\n      },\n    });\n    const obj = schemaToJsonSchemaDraft_05({\n      context,\n      plugin,\n      schema,\n    });\n    const statement = $.const(symbol)\n      .export()\n      .assign(\n        $(\n          $.fromValue(obj, {\n            layout: 'pretty',\n          }),\n        ).as('const'),\n      );\n    plugin.node(statement);\n  }\n};\n\nconst schemasV3_1_X = ({\n  context,\n  plugin,\n}: {\n  context: Context<OpenApi.V3_1_X>;\n  plugin: HeyApiSchemasPlugin['Instance'];\n}) => {\n  if (!context.spec.components) {\n    return;\n  }\n\n  for (const name in context.spec.components.schemas) {\n    const schema = context.spec.components.schemas[name]!;\n    const symbol = plugin.symbol(schemaName({ name, plugin, schema }), {\n      meta: {\n        category: 'schema',\n        resource: 'definition',\n        resourceId: name,\n        tool: 'json-schema',\n      },\n    });\n    const obj = schemaToJsonSchema2020_12({\n      context,\n      plugin,\n      schema,\n    });\n    const statement = $.const(symbol)\n      .export()\n      .assign(\n        $(\n          $.fromValue(obj, {\n            layout: 'pretty',\n          }),\n        ).as('const'),\n      );\n    plugin.node(statement);\n  }\n};\n\nexport const handler: HeyApiSchemasPlugin['Handler'] = ({ plugin }) => {\n  if ('swagger' in plugin.context.spec) {\n    schemasV2_0_X({\n      context: plugin.context as Context<OpenApi.V2_0_X>,\n      plugin,\n    });\n    return;\n  }\n\n  if (satisfies(plugin.context.spec.openapi, '>=3.0.0 <3.1.0')) {\n    schemasV3_0_X({\n      context: plugin.context as Context<OpenApi.V3_0_X>,\n      plugin,\n    });\n    return;\n  }\n\n  if (satisfies(plugin.context.spec.openapi, '>=3.1.0')) {\n    schemasV3_1_X({\n      context: plugin.context as Context<OpenApi.V3_1_X>,\n      plugin,\n    });\n    return;\n  }\n\n  throw new Error('Unsupported OpenAPI specification');\n};\n"
  },
  {
    "path": "packages/openapi-ts/src/plugins/@hey-api/schemas/types.ts",
    "content": "import type {\n  DefinePlugin,\n  OpenApiV2_0_XTypes,\n  OpenApiV3_0_XTypes,\n  OpenApiV3_1_XTypes,\n  Plugin,\n} from '@hey-api/shared';\n\nexport type UserConfig = Plugin.Name<'@hey-api/schemas'> &\n  Plugin.Hooks &\n  Plugin.UserExports & {\n    /**\n     * Customise the schema name. By default, `{{name}}Schema` is used. `name` is a\n     * valid JavaScript/TypeScript identifier, e.g. if your schema name is\n     * \"Foo-Bar\", `name` value would be \"FooBar\".\n     *\n     * @default '{{name}}Schema'\n     */\n    nameBuilder?:\n      | string\n      | ((\n          name: string,\n          schema:\n            | OpenApiV2_0_XTypes['SchemaObject']\n            | OpenApiV3_0_XTypes['ReferenceObject']\n            | OpenApiV3_0_XTypes['SchemaObject']\n            | OpenApiV3_1_XTypes['SchemaObject'],\n        ) => string);\n    /**\n     * Choose schema type to generate. Select 'form' if you don't want\n     * descriptions to reduce bundle size and you plan to use schemas\n     * for form validation\n     *\n     * @default 'json'\n     */\n    type?: 'form' | 'json';\n  };\n\nexport type HeyApiSchemasPlugin = DefinePlugin<UserConfig, UserConfig>;\n"
  },
  {
    "path": "packages/openapi-ts/src/plugins/@hey-api/sdk/config.ts",
    "content": "import { log } from '@hey-api/codegen-core';\nimport { definePluginConfig } from '@hey-api/shared';\n\nimport { resolveExamples } from './examples';\nimport { resolveOperations } from './operations';\nimport { handler } from './plugin';\nimport type { HeyApiSdkPlugin } from './types';\n\nconst transformerInferWarn =\n  'You set `transformer: true` but no transformer plugin was found in your plugins. Add a transformer plugin like `@hey-api/transformers` to enable this feature. The transformer option has been disabled.';\nconst validatorInferWarn =\n  'You set `validator: true` but no validator plugin was found in your plugins. Add a validator plugin like `zod` to enable this feature. The validator option has been disabled.';\n\nexport const defaultConfig: HeyApiSdkPlugin['Config'] = {\n  config: {\n    auth: true,\n    client: true,\n    comments: true,\n    includeInEntry: true,\n    paramsStructure: 'grouped',\n    responseStyle: 'fields',\n    transformer: false,\n    validator: false,\n\n    // Deprecated - kept for backward compatibility\n    // eslint-disable-next-line sort-keys-fix/sort-keys-fix\n    response: 'body',\n  },\n  dependencies: ['@hey-api/typescript'],\n  handler,\n  name: '@hey-api/sdk',\n  resolveConfig: (plugin, context) => {\n    if (plugin.config.client) {\n      if (typeof plugin.config.client === 'boolean') {\n        plugin.config.client = context.pluginByTag('client', {\n          defaultPlugin: '@hey-api/client-fetch',\n        });\n      }\n\n      plugin.dependencies.add(plugin.config.client!);\n    } else {\n      plugin.config.client = false;\n    }\n\n    if (plugin.config.transformer) {\n      if (typeof plugin.config.transformer === 'boolean') {\n        try {\n          plugin.config.transformer = context.pluginByTag('transformer');\n          plugin.dependencies.add(plugin.config.transformer!);\n        } catch {\n          log.warn(transformerInferWarn);\n          plugin.config.transformer = false;\n        }\n      } else {\n        plugin.dependencies.add(plugin.config.transformer);\n      }\n    } else {\n      plugin.config.transformer = false;\n    }\n\n    if (typeof plugin.config.validator !== 'object') {\n      plugin.config.validator = {\n        request: plugin.config.validator,\n        response: plugin.config.validator,\n      };\n    }\n\n    if (plugin.config.validator.request) {\n      if (typeof plugin.config.validator.request === 'boolean') {\n        try {\n          plugin.config.validator.request = context.pluginByTag('validator');\n          plugin.dependencies.add(plugin.config.validator.request!);\n        } catch {\n          log.warn(validatorInferWarn);\n          plugin.config.validator.request = false;\n        }\n      } else {\n        plugin.dependencies.add(plugin.config.validator.request);\n      }\n    } else {\n      plugin.config.validator.request = false;\n    }\n\n    if (plugin.config.validator.response) {\n      if (typeof plugin.config.validator.response === 'boolean') {\n        try {\n          plugin.config.validator.response = context.pluginByTag('validator');\n          plugin.dependencies.add(plugin.config.validator.response!);\n        } catch {\n          log.warn(validatorInferWarn);\n          plugin.config.validator.response = false;\n        }\n      } else {\n        plugin.dependencies.add(plugin.config.validator.response);\n      }\n    } else {\n      plugin.config.validator.response = false;\n    }\n\n    plugin.config.examples = resolveExamples(plugin.config, context);\n    plugin.config.operations = resolveOperations(plugin.config, context);\n  },\n};\n\n/**\n * Type helper for `@hey-api/sdk` plugin, returns {@link Plugin.Config} object\n */\nexport const defineConfig = definePluginConfig(defaultConfig);\n"
  },
  {
    "path": "packages/openapi-ts/src/plugins/@hey-api/sdk/examples/config.ts",
    "content": "import type { PluginContext } from '@hey-api/shared';\n\nimport type { UserConfig } from '../types';\nimport type { ExamplesConfig } from './types';\n\ntype Config = Omit<UserConfig, 'name'>;\n\nexport function resolveExamples(config: Config, context: PluginContext): ExamplesConfig {\n  return context.valueToObject({\n    defaultValue: {\n      enabled: Boolean(config.examples),\n      language: 'JavaScript',\n    },\n    mappers: {\n      boolean: (enabled) => ({ enabled }),\n    },\n    value: config.examples,\n  }) as ExamplesConfig;\n}\n"
  },
  {
    "path": "packages/openapi-ts/src/plugins/@hey-api/sdk/examples/index.ts",
    "content": "export { resolveExamples } from './config';\nexport type { ExamplesConfig, UserExamplesConfig } from './types';\n"
  },
  {
    "path": "packages/openapi-ts/src/plugins/@hey-api/sdk/examples/types.ts",
    "content": "import type { FeatureToggle, IR, LinguistLanguages } from '@hey-api/shared';\nimport type { MaybeFunc } from '@hey-api/types';\n\nimport type { CallArgs, DollarTsDsl, ExampleOptions } from '../../../../ts-dsl';\n\nexport type UserExamplesConfig = Omit<ExampleOptions, 'payload'> & {\n  /**\n   * Whether this feature is enabled.\n   *\n   * @default true\n   */\n  enabled?: boolean;\n  /**\n   * The programming language for the generated examples.\n   *\n   * This is used to display the language label in code blocks in\n   * documentation UIs.\n   *\n   * @default 'JavaScript'\n   */\n  language?: LinguistLanguages;\n  /**\n   * Example request payload.\n   */\n  payload?: MaybeFunc<\n    (operation: IR.OperationObject, ctx: DollarTsDsl) => CallArgs | CallArgs[number]\n  >;\n  /**\n   * Transform the generated example string.\n   *\n   * @param example The generated example string.\n   * @param operation The operation the example was generated for.\n   * @returns The final example string.\n   */\n  transform?: (example: string, operation: IR.OperationObject) => string;\n};\n\nexport type ExamplesConfig = Omit<ExampleOptions, 'payload'> &\n  FeatureToggle & {\n    /**\n     * The programming language for the generated examples.\n     *\n     * This is used to display the language label in code blocks in\n     * documentation UIs.\n     */\n    language: LinguistLanguages;\n    /**\n     * Example request payload.\n     */\n    payload?: MaybeFunc<\n      (operation: IR.OperationObject, ctx: DollarTsDsl) => CallArgs | CallArgs[number]\n    >;\n    /**\n     * Transform the generated example string.\n     *\n     * @param example The generated example string.\n     * @param operation The operation the example was generated for.\n     * @returns The final example string.\n     */\n    transform?: (example: string, operation: IR.OperationObject) => string;\n  };\n"
  },
  {
    "path": "packages/openapi-ts/src/plugins/@hey-api/sdk/index.ts",
    "content": "export { defaultConfig, defineConfig } from './config';\nexport type { HeyApiSdkPlugin } from './types';\n"
  },
  {
    "path": "packages/openapi-ts/src/plugins/@hey-api/sdk/operations/config.ts",
    "content": "import { log } from '@hey-api/codegen-core';\nimport type { PluginContext } from '@hey-api/shared';\n\nimport type { UserConfig } from '../types';\nimport type { OperationsConfig, UserOperationsConfig } from './types';\n\ntype Config = Omit<UserConfig, 'name'>;\n\nexport function resolveOperations(config: Config, context: PluginContext): OperationsConfig {\n  if (config.asClass !== undefined) {\n    log.warnDeprecated({\n      context: '@hey-api/sdk',\n      field: 'asClass',\n      replacement: ['operations: { strategy: \"byTags\" }', 'operations: { strategy: \"single\" }'],\n    });\n  }\n\n  if (config.classNameBuilder !== undefined) {\n    log.warnDeprecated({\n      context: '@hey-api/sdk',\n      field: 'classNameBuilder',\n      replacement: 'operations: { containerName: \"...\" }',\n    });\n  }\n\n  if (config.classStructure !== undefined) {\n    log.warnDeprecated({\n      context: '@hey-api/sdk',\n      field: 'classStructure',\n      replacement: ['operations: { nesting: \"operationId\" }', 'operations: { nesting: \"id\" }'],\n    });\n  }\n\n  if (config.instance !== undefined) {\n    log.warnDeprecated({\n      context: '@hey-api/sdk',\n      field: 'instance',\n      replacement: `operations: { strategy: \"single\", containerName: \"${config.instance || 'Name'}\", methods: \"instance\" }`,\n    });\n  }\n\n  if (config.methodNameBuilder !== undefined) {\n    log.warnDeprecated({\n      context: '@hey-api/sdk',\n      field: 'methodNameBuilder',\n      replacement: 'operations: { methodName: \"...\" }',\n    });\n  }\n\n  if (config.operationId !== undefined) {\n    log.warnDeprecated({\n      context: '@hey-api/sdk',\n      field: 'operationId',\n      replacement: ['operations: { nesting: \"operationId\" }', 'operations: { nesting: \"id\" }'],\n    });\n  }\n\n  const legacy = mapLegacyToConfig(config);\n  return normalizeConfig(config.operations, legacy, context);\n}\n\nfunction normalizeConfig(\n  input: Config['operations'],\n  legacy: Partial<OperationsConfig>,\n  context: PluginContext,\n): OperationsConfig {\n  if (!input || typeof input === 'string' || typeof input === 'function') {\n    input = { strategy: input };\n  }\n\n  const strategy = legacy.strategy ?? input.strategy ?? 'flat';\n  const methods: OperationsConfig['methods'] = strategy === 'single' ? 'instance' : 'static';\n\n  return context.valueToObject({\n    defaultValue: {\n      container: 'class',\n      methods,\n      nesting: 'operationId',\n      nestingDelimiters: /[./]/,\n      strategy,\n      strategyDefaultTag: 'default',\n    },\n    mappers: {\n      object(value) {\n        value.containerName = context.valueToObject({\n          defaultValue:\n            strategy === 'single'\n              ? { casing: 'PascalCase', name: 'Sdk' }\n              : { casing: 'PascalCase' },\n          mappers: {\n            function: (name) => ({ name }),\n            string: (name) => ({ name }),\n          },\n          value: value.containerName,\n        });\n        value.methodName = context.valueToObject({\n          defaultValue: { casing: 'camelCase' },\n          mappers: {\n            function: (name) => ({ name }),\n            string: (name) => ({ name }),\n          },\n          value: value.methodName,\n        });\n        value.segmentName = context.valueToObject({\n          defaultValue: { casing: 'PascalCase' },\n          mappers: {\n            function: (name) => ({ name }),\n            string: (name) => ({ name }),\n          },\n          value: value.segmentName,\n        });\n        return value;\n      },\n    },\n    value: {\n      ...legacy,\n      ...input,\n    } as UserOperationsConfig,\n  }) as OperationsConfig;\n}\n\nfunction mapLegacyToConfig(config: Config): Partial<OperationsConfig> {\n  let strategy: OperationsConfig['strategy'] | undefined;\n  if (config.instance) {\n    strategy = 'single';\n  } else if (config.asClass) {\n    strategy = 'byTags';\n  } else if (config.instance === false || config.asClass === false) {\n    strategy = 'flat';\n  }\n\n  let containerName: OperationsConfig['containerName'] | undefined;\n  let segmentName: OperationsConfig['segmentName'] | undefined;\n  if (config.instance) {\n    let name = typeof config.instance === 'string' ? config.instance : 'Sdk';\n    segmentName = { casing: 'PascalCase' };\n    if (config.classNameBuilder) {\n      segmentName.name = config.classNameBuilder;\n      if (typeof config.classNameBuilder === 'string') {\n        name = config.classNameBuilder.replace('{{name}}', name);\n      } else {\n        name = config.classNameBuilder(name);\n      }\n    }\n    containerName = { casing: 'PascalCase', name };\n  } else if (config.classNameBuilder) {\n    containerName = {\n      casing: 'PascalCase',\n      name: config.classNameBuilder,\n    };\n    segmentName = { ...containerName };\n  } else if (config.asClass) {\n    containerName = { casing: 'PascalCase' };\n    segmentName = { ...containerName };\n  }\n\n  let methods: OperationsConfig['methods'] | undefined;\n  if (config.instance) {\n    methods = 'instance';\n  } else if (config.asClass) {\n    methods = 'static';\n  }\n\n  let nesting: OperationsConfig['nesting'] | undefined;\n  if (config.classStructure === 'off' || config.operationId === false) {\n    nesting = 'id';\n  } else if (config.classStructure === 'auto') {\n    nesting = 'operationId';\n  }\n\n  let methodName: OperationsConfig['methodName'] | undefined;\n  if (config.methodNameBuilder) {\n    methodName = {\n      casing: 'camelCase',\n      name: config.methodNameBuilder,\n    };\n  }\n\n  return {\n    containerName,\n    methodName,\n    methods,\n    nesting,\n    segmentName,\n    strategy,\n  };\n}\n"
  },
  {
    "path": "packages/openapi-ts/src/plugins/@hey-api/sdk/operations/index.ts",
    "content": "export { resolveOperations } from './config';\nexport { resolveStrategy } from './resolve';\nexport type { OperationsConfig, UserOperationsConfig } from './types';\n"
  },
  {
    "path": "packages/openapi-ts/src/plugins/@hey-api/sdk/operations/resolve.ts",
    "content": "import type { OperationPathStrategy, OperationStructureStrategy } from '@hey-api/shared';\nimport { OperationPath, OperationStrategy } from '@hey-api/shared';\n\nimport type { HeyApiSdkPlugin } from '../types';\n\nfunction resolvePath(plugin: HeyApiSdkPlugin['Instance']): OperationPathStrategy {\n  if (plugin.config.operations.nesting === 'id') {\n    return OperationPath.id();\n  }\n\n  if (plugin.config.operations.nesting === 'operationId') {\n    return OperationPath.fromOperationId({\n      delimiters: plugin.config.operations.nestingDelimiters,\n      fallback: OperationPath.id(),\n    });\n  }\n\n  return plugin.config.operations.nesting;\n}\n\nexport function resolveStrategy(plugin: HeyApiSdkPlugin['Instance']): OperationStructureStrategy {\n  if (plugin.config.operations.strategy === 'flat') {\n    return OperationStrategy.flat({\n      path: (operation) => [resolvePath(plugin)(operation).join('.')],\n    });\n  }\n\n  if (plugin.config.operations.strategy === 'single') {\n    const root = plugin.config.operations.containerName;\n    return OperationStrategy.single({\n      path: resolvePath(plugin),\n      root: typeof root.name === 'string' ? root.name : (root.name?.('') ?? ''),\n    });\n  }\n\n  if (plugin.config.operations.strategy === 'byTags') {\n    return OperationStrategy.byTags({\n      fallback: plugin.config.operations.strategyDefaultTag,\n      path: resolvePath(plugin),\n    });\n  }\n\n  return plugin.config.operations.strategy;\n}\n"
  },
  {
    "path": "packages/openapi-ts/src/plugins/@hey-api/sdk/operations/types.ts",
    "content": "import type {\n  NamingConfig,\n  NamingRule,\n  OperationPathStrategy,\n  OperationsStrategy,\n} from '@hey-api/shared';\n\nexport interface UserOperationsConfig {\n  /**\n   * Type of container for grouped operations.\n   *\n   * Ignored when `strategy` is `'flat'`.\n   *\n   * - `'class'` - Class with methods\n   *\n   * @default 'class'\n   */\n  container?: 'class';\n  // * - `'object'` - Object with properties\n  // container?: 'class' | 'object';\n  /**\n   * Customize container names.\n   *\n   * For `'single'` strategy, this sets the root container name.\n   * For `'byTags'` strategy, this transforms tag names.\n   *\n   * @default 'Sdk' for `'single'` strategy\n   *\n   * @example\n   * // Set root name for single strategy\n   * containerName: 'MyApi'\n   *\n   * @example\n   * // Transform tag names with suffix\n   * containerName: '{{name}}Service'\n   *\n   * @example\n   * // With casing\n   * containerName: { name: '{{name}}Service', casing: 'PascalCase' }\n   */\n  containerName?: NamingRule;\n  /**\n   * Customize method/function names.\n   *\n   * Applied to the final segment of the path (the method name).\n   */\n  methodName?: NamingRule;\n  /**\n   * How methods are attached to class containers.\n   *\n   * Only applies when `container` is `'class'`.\n   *\n   * - `'static'` - Static methods, no instantiation required\n   * - `'instance'` - Instance methods, requires `new ClassName(config)`\n   *\n   * @default 'instance'\n   */\n  methods?: 'instance' | 'static';\n  /**\n   * How to derive nesting structure from operations.\n   *\n   * - `'operationId'` - Split operationId by delimiters (e.g., `users.list` → `Users.list()`)\n   * - `'id'` - Use operation id as-is, no nesting\n   * - Custom function for full control\n   *\n   * @default 'operationId'\n   */\n  nesting?: 'operationId' | 'id' | OperationPathStrategy;\n  /**\n   * Delimiters for splitting operationId.\n   *\n   * Only applies when `nesting` is `'operationId'`.\n   *\n   * @default /[./]/\n   */\n  nestingDelimiters?: RegExp;\n  /**\n   * Customize nesting segment names.\n   *\n   * Applied to intermediate path segments (not the method name).\n   */\n  segmentName?: NamingRule;\n  /**\n   * Grouping strategy.\n   *\n   * - `'flat'` - Standalone functions, no grouping\n   * - `'byTags'` - One container per operation tag\n   * - `'single'` - All operations in one container\n   * - Custom function for full control\n   *\n   * @default 'flat'\n   */\n  strategy?: OperationsStrategy;\n  /**\n   * Default container name for operations without tags.\n   *\n   * Only applies when `strategy` is `'byTags'`.\n   *\n   * @default 'default'\n   */\n  strategyDefaultTag?: string;\n}\n\nexport interface OperationsConfig {\n  /** Type of container for grouped operations. */\n  container: 'class';\n  // * - `'object'` - Object with properties\n  // container: 'class' | 'object';\n  /** Customize container names. */\n  containerName: NamingConfig;\n  /** Customize method/function names. */\n  methodName: NamingConfig;\n  /** How methods are attached to class containers. */\n  methods: 'instance' | 'static';\n  /** How to derive nesting structure from operations. */\n  nesting: 'operationId' | 'id' | OperationPathStrategy;\n  /** Delimiters for splitting operationId. */\n  nestingDelimiters: RegExp;\n  /** Customize nesting segment names. */\n  segmentName: NamingConfig;\n  /** Grouping strategy. */\n  strategy: OperationsStrategy;\n  /** Default container name for operations without tags. */\n  strategyDefaultTag: string;\n}\n"
  },
  {
    "path": "packages/openapi-ts/src/plugins/@hey-api/sdk/plugin.ts",
    "content": "import type { HeyApiSdkPlugin } from './types';\nimport { handlerV1 } from './v1/plugin';\n\nexport const handler: HeyApiSdkPlugin['Handler'] = (args) => handlerV1(args);\n"
  },
  {
    "path": "packages/openapi-ts/src/plugins/@hey-api/sdk/shared/auth.ts",
    "content": "import type { Context, IR } from '@hey-api/shared';\n\nimport type { Auth } from '../../client-core/bundle/auth';\nimport type { HeyApiSdkPlugin } from '../types';\n\n// TODO: parser - handle more security types\nconst securitySchemeObjectToAuthObject = ({\n  securitySchemeObject,\n}: {\n  securitySchemeObject: IR.SecurityObject;\n}): Auth | undefined => {\n  if (securitySchemeObject.type === 'openIdConnect') {\n    return {\n      scheme: 'bearer',\n      type: 'http',\n    };\n  }\n\n  if (securitySchemeObject.type === 'oauth2') {\n    if (\n      securitySchemeObject.flows.password ||\n      securitySchemeObject.flows.authorizationCode ||\n      securitySchemeObject.flows.clientCredentials ||\n      securitySchemeObject.flows.implicit\n    ) {\n      return {\n        scheme: 'bearer',\n        type: 'http',\n      };\n    }\n\n    return;\n  }\n\n  if (securitySchemeObject.type === 'apiKey') {\n    if (securitySchemeObject.in === 'header') {\n      return {\n        name: securitySchemeObject.name,\n        type: 'apiKey',\n      };\n    }\n\n    if (securitySchemeObject.in === 'query' || securitySchemeObject.in == 'cookie') {\n      return {\n        in: securitySchemeObject.in,\n        name: securitySchemeObject.name,\n        type: 'apiKey',\n      };\n    }\n\n    return;\n  }\n\n  if (securitySchemeObject.type === 'http') {\n    const scheme = securitySchemeObject.scheme.toLowerCase();\n    if (scheme === 'bearer' || scheme === 'basic') {\n      return {\n        scheme: scheme as 'bearer' | 'basic',\n        type: 'http',\n      };\n    }\n\n    return;\n  }\n\n  return;\n};\n\nexport const operationAuth = ({\n  operation,\n  plugin,\n}: {\n  context: Context;\n  operation: IR.OperationObject;\n  plugin: HeyApiSdkPlugin['Instance'];\n}): Array<Auth> => {\n  if (!operation.security || !plugin.config.auth) {\n    return [];\n  }\n\n  const auth: Array<Auth> = [];\n\n  for (const securitySchemeObject of operation.security) {\n    const authObject = securitySchemeObjectToAuthObject({\n      securitySchemeObject,\n    });\n    if (authObject) {\n      auth.push(authObject);\n    } else if (securitySchemeObject.type !== 'mutualTLS') {\n      console.warn(\n        `❗️ SDK warning: unsupported security scheme. Please open an issue if you'd like it added https://github.com/hey-api/openapi-ts/issues\\n${JSON.stringify(securitySchemeObject, null, 2)}`,\n      );\n    }\n  }\n\n  return auth;\n};\n"
  },
  {
    "path": "packages/openapi-ts/src/plugins/@hey-api/sdk/shared/class.ts",
    "content": "import type { Symbol } from '@hey-api/codegen-core';\n\nimport { $ } from '../../../../ts-dsl';\nimport type { HeyApiSdkPlugin } from '../types';\n\nexport const createRegistryClass = ({\n  plugin,\n  sdkSymbol,\n  symbol,\n}: {\n  plugin: HeyApiSdkPlugin['Instance'];\n  sdkSymbol: Symbol;\n  symbol: Symbol;\n}): ReturnType<typeof $.class> => {\n  const symbolDefaultKey = plugin.symbol('defaultKey');\n  const symbolInstances = plugin.symbol('instances');\n  return $.class(symbol)\n    .generic('T')\n    .field(symbolDefaultKey, (f) => f.private().readonly().assign($.literal('default')))\n    .newline()\n    .field(symbolInstances, (f) =>\n      f.private().readonly().type($.type('Map').generics('string', 'T')).assign($.new('Map')),\n    )\n    .newline()\n    .method('get', (m) =>\n      m\n        .returns('T')\n        .param('key', (p) => p.type('string').optional())\n        .do(\n          $.const('instance').assign(\n            $('this')\n              .attr(symbolInstances)\n              .attr('get')\n              .call($('key').coalesce($('this').attr(symbolDefaultKey))),\n          ),\n          $.if($.not('instance')).do(\n            $.throw('Error').message(\n              $.template('No SDK client found. Create one with \"new ')\n                .add(sdkSymbol)\n                .add('()\" to fix this error.'),\n            ),\n          ),\n          $.return('instance'),\n        ),\n    )\n    .newline()\n    .method('set', (m) =>\n      m\n        .returns('void')\n        .param('value', (p) => p.type('T'))\n        .param('key', (p) => p.type('string').optional())\n        .do(\n          $('this')\n            .attr(symbolInstances)\n            .attr('set')\n            .call($('key').coalesce($('this').attr(symbolDefaultKey)), 'value'),\n        ),\n    );\n};\n\nexport const createClientClass = ({\n  plugin,\n  symbol,\n}: {\n  plugin: HeyApiSdkPlugin['Instance'];\n  symbol: Symbol;\n}): ReturnType<typeof $.class> => {\n  const symClient = plugin.getSymbol({ category: 'client' });\n  const optionalClient = Boolean(plugin.config.client && symClient);\n  const symbolClient = plugin.external('client.Client');\n  return $.class(symbol)\n    .field('client', (f) => f.protected().type(symbolClient))\n    .newline()\n    .init((i) =>\n      i\n        .param('args', (p) =>\n          p\n            .optional(optionalClient)\n            .type(\n              $.type.object().prop('client', (p) => p.optional(optionalClient).type(symbolClient)),\n            ),\n        )\n        .do(\n          $('this')\n            .attr('client')\n            .assign(\n              $('args')\n                .attr('client')\n                .optional(optionalClient)\n                .$if(optionalClient, (a) => a.coalesce(symClient!)),\n            ),\n        ),\n    );\n};\n"
  },
  {
    "path": "packages/openapi-ts/src/plugins/@hey-api/sdk/shared/constants.ts",
    "content": "export const nuxtTypeComposable = 'TComposable';\nexport const nuxtTypeDefault = 'DefaultT';\nexport const nuxtTypeResponse = 'ResT';\n"
  },
  {
    "path": "packages/openapi-ts/src/plugins/@hey-api/sdk/shared/operation.ts",
    "content": "import type { SymbolMeta } from '@hey-api/codegen-core';\nimport type { IR } from '@hey-api/shared';\nimport { statusCodeToGroup } from '@hey-api/shared';\n\nimport { getTypedConfig } from '../../../../config/utils';\nimport { getClientPlugin } from '../../../../plugins/@hey-api/client-core/utils';\nimport { $ } from '../../../../ts-dsl';\nimport type { Field, Fields } from '../../client-core/bundle/params';\nimport type { HeyApiSdkPlugin } from '../types';\nimport { isInstance } from '../v1/node';\nimport { operationAuth } from './auth';\nimport { nuxtTypeComposable, nuxtTypeDefault } from './constants';\nimport { getSignatureParameters } from './signature';\nimport { createRequestValidator, createResponseValidator } from './validator';\n\n/** TODO: needs complete refactor */\nexport const operationOptionsType = ({\n  isDataAllowed = true,\n  operation,\n  plugin,\n  throwOnError,\n}: {\n  isDataAllowed?: boolean;\n  operation: IR.OperationObject;\n  plugin: HeyApiSdkPlugin['Instance'];\n  throwOnError?: string;\n}): ReturnType<typeof $.type> => {\n  const client = getClientPlugin(getTypedConfig(plugin));\n  const isNuxtClient = client.name === '@hey-api/client-nuxt';\n\n  const symbolDataType = isDataAllowed\n    ? plugin.querySymbol({\n        category: 'type',\n        resource: 'operation',\n        resourceId: operation.id,\n        role: 'data',\n        tool: 'typescript',\n      })\n    : undefined;\n\n  const symbolOptions = plugin.referenceSymbol({\n    category: 'type',\n    resource: 'client-options',\n    tool: 'sdk',\n  });\n\n  if (isNuxtClient) {\n    const symbolResponseType = plugin.querySymbol({\n      category: 'type',\n      resource: 'operation',\n      resourceId: operation.id,\n      role: 'response',\n    });\n    return $.type(symbolOptions)\n      .generic(nuxtTypeComposable)\n      .generic(isDataAllowed ? (symbolDataType ?? 'unknown') : 'never')\n      .generic(symbolResponseType ?? 'unknown')\n      .generic(nuxtTypeDefault);\n  }\n\n  // TODO: refactor this to be more generic, works for now\n  if (throwOnError) {\n    return $.type(symbolOptions)\n      .generic(isDataAllowed ? (symbolDataType ?? 'unknown') : 'never')\n      .generic(throwOnError);\n  }\n  return $.type(symbolOptions).$if(!isDataAllowed || symbolDataType, (t) =>\n    t.generic(isDataAllowed ? symbolDataType! : 'never'),\n  );\n};\n\ntype OperationParameters = {\n  argNames: Array<string>;\n  fields: Array<Field | Fields>;\n  parameters: Array<ReturnType<typeof $.param>>;\n};\n\nexport function operationParameters({\n  isRequiredOptions,\n  operation,\n  plugin,\n}: {\n  isRequiredOptions: boolean;\n  operation: IR.OperationObject;\n  plugin: HeyApiSdkPlugin['Instance'];\n}): OperationParameters {\n  const result: OperationParameters = {\n    argNames: [],\n    fields: [],\n    parameters: [],\n  };\n\n  const pluginTypeScript = plugin.getPluginOrThrow('@hey-api/typescript');\n  const client = getClientPlugin(getTypedConfig(plugin));\n  const isNuxtClient = client.name === '@hey-api/client-nuxt';\n\n  if (plugin.config.paramsStructure === 'flat') {\n    const signature = getSignatureParameters({ operation, plugin });\n    const flatParams = $.type.object();\n\n    if (signature) {\n      let isParametersRequired = false;\n\n      for (const key in signature.parameters) {\n        const parameter = signature.parameters[key]!;\n        if (parameter.isRequired) {\n          isParametersRequired = true;\n        }\n        flatParams.prop(parameter.name, (p) =>\n          p\n            .required(parameter.isRequired)\n            .type(pluginTypeScript.api.schemaToType(pluginTypeScript, parameter.schema)),\n        );\n      }\n\n      result.argNames.push('parameters');\n      for (const field of signature.fields) {\n        result.fields.push(field);\n      }\n\n      result.parameters.push(\n        $.param('parameters', (p) => p.required(isParametersRequired).type(flatParams)),\n      );\n    }\n  }\n\n  result.parameters.push(\n    $.param('options', (p) =>\n      p.required(isRequiredOptions).type(\n        operationOptionsType({\n          isDataAllowed: plugin.config.paramsStructure === 'grouped',\n          operation,\n          plugin,\n          throwOnError: isNuxtClient ? undefined : 'ThrowOnError',\n        }),\n      ),\n    ),\n  );\n\n  return result;\n}\n\n/**\n * Infers `responseType` value from provided response content type. This is\n * an adapted version of `getParseAs()` from the Fetch API client.\n *\n * From Axios documentation:\n * `responseType` indicates the type of data that the server will respond with\n * options are: 'arraybuffer', 'document', 'json', 'text', 'stream'\n * browser only: 'blob'\n */\nconst getResponseType = (\n  contentType: string | null | undefined,\n): 'arraybuffer' | 'blob' | 'document' | 'json' | 'stream' | 'text' | undefined => {\n  if (!contentType) {\n    return;\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  // Axios does not handle form data out of the box\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\nexport function operationStatements({\n  isRequiredOptions,\n  opParameters,\n  operation,\n  plugin,\n}: {\n  isRequiredOptions: boolean;\n  opParameters: OperationParameters;\n  operation: IR.OperationObject;\n  plugin: HeyApiSdkPlugin['Instance'];\n}): Array<ReturnType<typeof $.return | typeof $.const>> {\n  const client = getClientPlugin(getTypedConfig(plugin));\n  const isNuxtClient = client.name === '@hey-api/client-nuxt';\n\n  const symbolResponseType = plugin.querySymbol({\n    category: 'type',\n    resource: 'operation',\n    resourceId: operation.id,\n    role: isNuxtClient ? 'response' : 'responses',\n  });\n\n  const symbolErrorType = plugin.querySymbol({\n    category: 'type',\n    resource: 'operation',\n    resourceId: operation.id,\n    role: isNuxtClient ? 'error' : 'errors',\n  });\n\n  // TODO: transform parameters\n  // const query = {\n  //   BarBaz: options.query.bar_baz,\n  //   qux_quux: options.query.qux_quux,\n  //   fooBar: options.query.foo_bar,\n  // };\n\n  // if (operation.parameters) {\n  //   for (const name in operation.parameters.query) {\n  //     const parameter = operation.parameters.query[name]\n  //     if (parameter.name !== fieldName({ context, name: parameter.name })) {\n  //       console.warn(parameter.name)\n  //     }\n  //   }\n  // }\n\n  const reqOptions = $.object();\n\n  if (operation.body) {\n    // Check if body has binary format - if so, don't use JSON serializer\n    const isBinaryFormat = operation.body.schema?.format === 'binary';\n\n    switch (operation.body.type) {\n      case 'form-data': {\n        const symbol = plugin.external('client.formDataBodySerializer');\n        reqOptions.spread(symbol);\n        break;\n      }\n      case 'json':\n        // jsonBodySerializer is the default, no need to specify\n        // unless the schema has binary format\n        if (isBinaryFormat) {\n          reqOptions.prop('bodySerializer', $.literal(null));\n        }\n        break;\n      case 'text':\n      case 'octet-stream':\n        // ensure we don't use any serializer by default\n        reqOptions.prop('bodySerializer', $.literal(null));\n        break;\n      case 'url-search-params': {\n        const symbol = plugin.external('client.urlSearchParamsBodySerializer');\n        reqOptions.spread(symbol);\n        break;\n      }\n      default:\n        // For unrecognized media types with binary format, don't use JSON serializer\n        if (isBinaryFormat) {\n          reqOptions.prop('bodySerializer', $.literal(null));\n        }\n        break;\n    }\n  }\n\n  // TODO: parser - set parseAs to skip inference if every response has the same\n  // content type. currently impossible because successes do not contain\n  // header information\n\n  const paramSerializers = $.object();\n\n  for (const name in operation.parameters?.query) {\n    const parameter = operation.parameters.query[name]!;\n\n    if (parameter.schema.type === 'array' || parameter.schema.type === 'tuple') {\n      if (parameter.style !== 'form' || !parameter.explode) {\n        // override the default settings for array serialization\n        paramSerializers.prop(\n          parameter.name,\n          $.object().prop(\n            'array',\n            $.object()\n              .$if(parameter.explode === false, (o) =>\n                o.prop('explode', $.literal(parameter.explode)),\n              )\n              .$if(parameter.style !== 'form', (o) => o.prop('style', $.literal(parameter.style))),\n          ),\n        );\n      }\n    } else if (parameter.schema.type === 'object') {\n      if (parameter.style !== 'deepObject' || !parameter.explode) {\n        // override the default settings for object serialization\n        paramSerializers.prop(\n          parameter.name,\n          $.object().prop(\n            'object',\n            $.object()\n              .$if(parameter.explode === false, (o) =>\n                o.prop('explode', $.literal(parameter.explode)),\n              )\n              .$if(parameter.style !== 'deepObject', (o) =>\n                o.prop('style', $.literal(parameter.style)),\n              ),\n          ),\n        );\n      }\n    }\n  }\n\n  if (paramSerializers.hasProps()) {\n    // TODO: if all parameters have the same serialization,\n    // apply it globally to reduce output size\n    reqOptions.prop('querySerializer', $.object().prop('parameters', paramSerializers));\n  }\n\n  const requestValidator = createRequestValidator({ operation, plugin });\n  const responseValidator = createResponseValidator({ operation, plugin });\n  if (requestValidator) {\n    reqOptions.prop('requestValidator', requestValidator.arrow());\n  }\n\n  if (plugin.config.transformer) {\n    const query: SymbolMeta = {\n      category: 'transform',\n      resource: 'operation',\n      resourceId: operation.id,\n      role: 'response',\n    };\n    if (plugin.isSymbolRegistered(query)) {\n      const ref = plugin.referenceSymbol(query);\n      reqOptions.prop('responseTransformer', $(ref));\n    }\n  }\n\n  let hasServerSentEvents = false;\n  let responseTypeValue: ReturnType<typeof getResponseType> | undefined;\n\n  for (const statusCode in operation.responses) {\n    const response = operation.responses[statusCode]!;\n\n    // try to infer `responseType` option for Axios. We don't need this in\n    // Fetch API client because it automatically detects the correct response\n    // during runtime.\n    if (!responseTypeValue && client.name === '@hey-api/client-axios') {\n      // this doesn't handle default status code for now\n      if (statusCodeToGroup({ statusCode }) === '2XX') {\n        responseTypeValue = getResponseType(response.mediaType);\n        if (responseTypeValue) {\n          reqOptions.prop('responseType', $.literal(responseTypeValue));\n        }\n      }\n    }\n\n    if (response.mediaType === 'text/event-stream') {\n      hasServerSentEvents = true;\n    }\n  }\n\n  if (responseValidator) {\n    reqOptions.prop('responseValidator', responseValidator.arrow());\n  }\n\n  if (plugin.config.responseStyle === 'data') {\n    reqOptions.prop('responseStyle', $.literal(plugin.config.responseStyle));\n  }\n\n  const auth = operationAuth({ context: plugin.context, operation, plugin });\n  if (auth.length) {\n    reqOptions.prop('security', $.fromValue(auth));\n  }\n\n  reqOptions.prop('url', $.literal(operation.path));\n\n  // options must go last to allow overriding parameters above\n  reqOptions.spread('options');\n\n  const statements: Array<ReturnType<typeof $.return | typeof $.const>> = [];\n  const hasParams = opParameters.argNames.length;\n\n  if (hasParams) {\n    const args: Array<ReturnType<typeof $.expr>> = [];\n    const config: Array<ReturnType<typeof $.object>> = [];\n    for (const argName of opParameters.argNames) {\n      args.push($(argName));\n    }\n    for (const field of opParameters.fields) {\n      const shape = $.object();\n      if ('in' in field) {\n        shape.prop('in', $.literal(field.in));\n      }\n      if ('key' in field) {\n        if (field.key) {\n          shape.prop('key', $.literal(field.key));\n        }\n        if (field.map) {\n          shape.prop('map', $.literal(field.map));\n        }\n      }\n      config.push(shape);\n    }\n    const symbol = plugin.external('client.buildClientParams');\n    statements.push(\n      $.const('params').assign(\n        $(symbol).call($.array(...args), $.array($.object().prop('args', $.array(...config)))),\n      ),\n    );\n    reqOptions.spread('params');\n  }\n\n  if (operation.body) {\n    const parameterContentType = operation.parameters?.header?.['content-type'];\n    const hasRequiredContentType = Boolean(parameterContentType?.required);\n    // spreading required Content-Type on generated header would throw a TypeScript error\n    if (!hasRequiredContentType) {\n      const headers = $.object()\n        .pretty()\n        // form-data does not need Content-Type header, browser will set it automatically\n        .prop(\n          parameterContentType?.name ?? 'Content-Type',\n          $.literal(operation.body.type === 'form-data' ? null : operation.body.mediaType),\n        )\n        .spread($('options').attr('headers').required(isRequiredOptions));\n      if (hasParams) {\n        headers.spread($('params').attr('headers'));\n      }\n      reqOptions.prop('headers', headers);\n    }\n  }\n\n  const symbolClient = plugin.config.client\n    ? plugin.getSymbol({\n        category: 'client',\n      })\n    : undefined;\n\n  let clientExpression: ReturnType<typeof $.attr | typeof $.binary>;\n  const optionsClient = $('options').attr('client').required(isRequiredOptions);\n  if (isInstance(plugin)) {\n    clientExpression = optionsClient.coalesce($('this').attr('client'));\n  } else if (symbolClient) {\n    clientExpression = optionsClient.coalesce(symbolClient);\n  } else {\n    clientExpression = optionsClient;\n  }\n\n  let functionName = hasServerSentEvents ? clientExpression.attr('sse') : clientExpression;\n  functionName = functionName.attr(operation.method);\n\n  statements.push(\n    $.return(\n      functionName\n        .call(reqOptions)\n        .$if(\n          isNuxtClient,\n          (f) =>\n            f\n              .generic(nuxtTypeComposable)\n              .generic($.type.or(symbolResponseType ?? 'unknown', nuxtTypeDefault))\n              .generic(symbolErrorType ?? 'unknown')\n              .generic(nuxtTypeDefault),\n          (f) =>\n            f\n              .generic(symbolResponseType ?? 'unknown')\n              .generic(symbolErrorType ?? 'unknown')\n              .generic('ThrowOnError'),\n        )\n        .$if(plugin.config.responseStyle === 'data', (f) =>\n          f.generic($.type.literal(plugin.config.responseStyle)),\n        ),\n    ),\n  );\n\n  return statements;\n}\n"
  },
  {
    "path": "packages/openapi-ts/src/plugins/@hey-api/sdk/shared/signature.ts",
    "content": "import type { IR, PluginInstance } from '@hey-api/shared';\nimport { refToName, toCase } from '@hey-api/shared';\n\nimport type { Field } from '../../client-core/bundle/params';\n\ntype Location = keyof IR.ParametersObject | 'body';\n\ntype SignatureParameter = {\n  /**\n   * Is this parameter required in the SDK method signature?\n   */\n  isRequired: boolean;\n  /**\n   * Parameter name in the SDK method signature.\n   */\n  name: string;\n  /**\n   * If the name was modified due to conflicts, this holds the original name.\n   */\n  originalName?: string;\n  /**\n   * Parameter schema object.\n   */\n  schema: IR.SchemaObject;\n};\n\ntype SignatureParameters = Record<string, SignatureParameter>;\n\ntype Signature = {\n  fields: ReadonlyArray<Field>;\n  parameters: SignatureParameters;\n};\n\n/**\n * Collects and resolves all operation parameters for flattened SDK signatures.\n * - Prefixes all conflicting names with their location (e.g. path_foo, query_foo)\n * - Returns a flat map of resolved parameter names to their metadata\n */\nexport function getSignatureParameters({\n  operation,\n}: {\n  operation: IR.OperationObject;\n  plugin: PluginInstance;\n}): Signature | undefined {\n  // TODO: add cookies\n  const locations = ['header', 'path', 'query'] as const satisfies ReadonlyArray<Location>;\n  const nameToLocations: Record<string, Set<Location>> = {};\n\n  const addParameter = (name: string, location: Location): void => {\n    if (!nameToLocations[name]) {\n      nameToLocations[name] = new Set();\n    }\n    nameToLocations[name].add(location);\n  };\n\n  for (const location of locations) {\n    const parameters = operation.parameters?.[location];\n    if (parameters) {\n      for (const key in parameters) {\n        const parameter = parameters[key]!;\n        addParameter(parameter.name, location);\n      }\n    }\n  }\n\n  if (operation.body) {\n    // spread body if there's only a single object\n    if (\n      !operation.body.schema.logicalOperator &&\n      operation.body.schema.type === 'object' &&\n      operation.body.schema.properties\n    ) {\n      const properties = operation.body.schema.properties;\n      for (const key in properties) {\n        addParameter(key, 'body');\n      }\n    } else if (operation.body.schema.$ref) {\n      // alias body for more ergonomic naming, e.g. user if the type is User\n      const name = refToName(operation.body.schema.$ref);\n      const key = toCase(name, 'camelCase');\n      addParameter(key, 'body');\n    } else {\n      addParameter('body', 'body');\n    }\n  }\n\n  const conflicts = new Set<string>();\n  for (const name in nameToLocations) {\n    if (nameToLocations[name]!.size > 1) {\n      conflicts.add(name);\n    }\n  }\n\n  const signatureParameters: SignatureParameters = {};\n  const fields: Array<Field> = [];\n\n  for (const location of locations) {\n    const parameters = operation.parameters?.[location];\n    if (parameters) {\n      for (const key in parameters) {\n        const parameter = parameters[key]!;\n        const originalName = parameter.name;\n        const name = conflicts.has(originalName) ? `${location}_${originalName}` : originalName;\n        const signatureParameter: SignatureParameter = {\n          isRequired: parameter.required ?? false,\n          name,\n          schema: parameter.schema,\n        };\n        if (name !== originalName) {\n          signatureParameter.originalName = originalName;\n        }\n        signatureParameters[name] = signatureParameter;\n        fields.push({\n          in: location === 'header' ? 'headers' : location,\n          key: name,\n          ...(name !== originalName ? { map: originalName } : {}),\n        });\n      }\n    }\n  }\n\n  if (operation.body) {\n    const location = 'body';\n    if (\n      !operation.body.schema.logicalOperator &&\n      operation.body.schema.type === 'object' &&\n      operation.body.schema.properties\n    ) {\n      const properties = operation.body.schema.properties;\n      for (const originalName in properties) {\n        const property = properties[originalName]!;\n        const name = conflicts.has(originalName) ? `${location}_${originalName}` : originalName;\n        const signatureParameter: SignatureParameter = {\n          isRequired: operation.body.schema.required?.includes(originalName) ?? false,\n          name,\n          schema: property,\n        };\n        if (name !== originalName) {\n          signatureParameter.originalName = originalName;\n        }\n        signatureParameters[name] = signatureParameter;\n        fields.push({\n          in: location,\n          key: name,\n          ...(name !== originalName ? { map: originalName } : {}),\n        });\n      }\n    } else if (operation.body.schema.$ref) {\n      const value = refToName(operation.body.schema.$ref);\n      const originalName = toCase(value, 'camelCase');\n      const name = conflicts.has(originalName) ? `${location}_${originalName}` : originalName;\n      const signatureParameter: SignatureParameter = {\n        isRequired: operation.body.required ?? false,\n        name,\n        schema: operation.body.schema,\n      };\n      if (name !== originalName) {\n        signatureParameter.originalName = originalName;\n      }\n      signatureParameters[name] = signatureParameter;\n      fields.push({\n        key: name,\n        map: 'body',\n      });\n    } else {\n      // never alias body\n      signatureParameters.body = {\n        isRequired: operation.body.required ?? false,\n        name: 'body',\n        schema: operation.body.schema,\n      };\n      fields.push({\n        key: 'body',\n        map: 'body',\n      });\n    }\n  }\n\n  if (!Object.keys(signatureParameters).length) {\n    return;\n  }\n\n  return { fields, parameters: signatureParameters };\n}\n"
  },
  {
    "path": "packages/openapi-ts/src/plugins/@hey-api/sdk/shared/typeOptions.ts",
    "content": "import { getTypedConfig } from '../../../../config/utils';\nimport { clientFolderAbsolutePath } from '../../../../generate/client';\nimport { getClientPlugin } from '../../../../plugins/@hey-api/client-core/utils';\nimport { $ } from '../../../../ts-dsl';\nimport type { HeyApiSdkPlugin } from '../types';\nimport { isInstance } from '../v1/node';\nimport { nuxtTypeDefault, nuxtTypeResponse } from './constants';\n\nexport const createTypeOptions = ({ plugin }: { plugin: HeyApiSdkPlugin['Instance'] }) => {\n  const clientModule = clientFolderAbsolutePath(getTypedConfig(plugin));\n  const client = getClientPlugin(getTypedConfig(plugin));\n  const isNuxtClient = client.name === '@hey-api/client-nuxt';\n\n  const symbolTDataShape = plugin.symbol('TDataShape', {\n    external: clientModule,\n    kind: 'type',\n  });\n  const symbolClient = plugin.symbol('Client', {\n    external: clientModule,\n    kind: 'type',\n    meta: {\n      category: 'external',\n      resource: 'client.Client',\n      tool: client.name,\n    },\n  });\n  const symbolClientOptions = plugin.symbol('Options', {\n    external: clientModule,\n    kind: 'type',\n  });\n  const symbolOptions = plugin.symbol('Options', {\n    meta: {\n      category: 'type',\n      resource: 'client-options',\n      tool: 'sdk',\n    },\n  });\n\n  const typeOptions = $.type\n    .alias(symbolOptions)\n    .export()\n    .$if(\n      isNuxtClient,\n      (t) =>\n        t\n          .generic('TComposable', (g) =>\n            g.extends(plugin.external('client.Composable')).default($.type.literal('$fetch')),\n          )\n          .generic('TData', (g) => g.extends(symbolTDataShape).default(symbolTDataShape))\n          .generic(nuxtTypeResponse, (g) => g.default('unknown'))\n          .generic(nuxtTypeDefault, (g) => g.default('undefined')),\n      (t) =>\n        t\n          .generic('TData', (g) => g.extends(symbolTDataShape).default(symbolTDataShape))\n          .generic('ThrowOnError', (g) => g.extends('boolean').default('boolean')),\n    )\n    .type(\n      $.type.and(\n        $.type(symbolClientOptions).$if(\n          isNuxtClient,\n          (t) =>\n            t\n              .generic('TComposable')\n              .generic('TData')\n              .generic(nuxtTypeResponse)\n              .generic(nuxtTypeDefault),\n          (t) => t.generic('TData').generic('ThrowOnError'),\n        ),\n        $.type\n          .object()\n          .prop('client', (p) =>\n            p\n              .doc([\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              .required(!plugin.config.client && !isInstance(plugin))\n              .type(symbolClient),\n          )\n          .prop('meta', (p) =>\n            p\n              .doc([\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              .optional()\n              .type($.type('Record').generics('string', 'unknown')),\n          ),\n      ),\n    );\n  plugin.node(typeOptions);\n};\n"
  },
  {
    "path": "packages/openapi-ts/src/plugins/@hey-api/sdk/shared/validator.ts",
    "content": "import type { IR } from '@hey-api/shared';\n\nimport type { $ } from '../../../../ts-dsl';\nimport type { HeyApiSdkPlugin } from '../types';\n\ninterface ValidatorProps {\n  operation: IR.OperationObject;\n  plugin: HeyApiSdkPlugin['Instance'];\n}\n\nexport const createRequestValidator = ({\n  operation,\n  plugin,\n}: ValidatorProps): ReturnType<typeof $.func> | undefined => {\n  if (!plugin.config.validator.request) return;\n\n  const validator = plugin.getPluginOrThrow(plugin.config.validator.request);\n  if (!validator.api.createRequestValidator) return;\n\n  return validator.api.createRequestValidator({\n    operation,\n    // @ts-expect-error\n    plugin: validator,\n  });\n};\n\nexport const createResponseValidator = ({\n  operation,\n  plugin,\n}: ValidatorProps): ReturnType<typeof $.func> | undefined => {\n  if (!plugin.config.validator.response) return;\n\n  const validator = plugin.getPluginOrThrow(plugin.config.validator.response);\n  if (!validator.api.createResponseValidator) return;\n\n  return validator.api.createResponseValidator({\n    operation,\n    // @ts-expect-error\n    plugin: validator,\n  });\n};\n"
  },
  {
    "path": "packages/openapi-ts/src/plugins/@hey-api/sdk/types.ts",
    "content": "import type { DefinePlugin, NameTransformer, OperationsStrategy, Plugin } from '@hey-api/shared';\n\nimport type { PluginClientNames, PluginTransformerNames, PluginValidatorNames } from '../../types';\nimport type { ExamplesConfig, UserExamplesConfig } from './examples';\nimport type { OperationsConfig, UserOperationsConfig } from './operations';\n\nexport type UserConfig = Plugin.Name<'@hey-api/sdk'> &\n  Plugin.Hooks &\n  Plugin.UserComments &\n  Plugin.UserExports & {\n    /**\n     * Should the generated functions contain auth mechanisms? You may want to\n     * disable this option if you're handling auth yourself or defining it\n     * globally on the client and want to reduce the size of generated code.\n     *\n     * @default true\n     */\n    auth?: boolean;\n    /**\n     * Use an internal client instance to send HTTP requests? This is useful if\n     * you don't want to manually pass the client to each SDK function.\n     *\n     * You can customize the selected client output through its plugin. You can\n     * also set `client` to `true` to automatically choose the client from your\n     * defined plugins. If we can't detect a client plugin when using `true`, we\n     * will default to `@hey-api/client-fetch`.\n     *\n     * @default true\n     */\n    client?: PluginClientNames | boolean;\n    /**\n     * Generate code examples for SDK operations and attach them to the\n     * input source (e.g. via `x-codeSamples`).\n     *\n     * Set to `false` to disable example generation entirely, or provide an\n     * object for fine-grained control over the output and post-processing.\n     *\n     * @default false\n     */\n    examples?: boolean | UserExamplesConfig;\n    /**\n     * Define the structure of generated SDK operations.\n     *\n     * String shorthand:\n     * - `'byTags'` – one container per operation tag\n     * - `'flat'` – standalone functions, no container\n     * - `'single'` – all operations in a single container\n     * - custom function for full control\n     *\n     * Use the object form for advanced configuration.\n     *\n     * @default 'flat'\n     */\n    operations?: OperationsStrategy | UserOperationsConfig;\n    /**\n     * Define how request parameters are structured in generated SDK methods.\n     *\n     * - `'flat'` merges parameters into a single object.\n     * - `'grouped'` separates parameters by transport layer.\n     *\n     * Use `'flat'` for simpler calls or `'grouped'` for stricter typing and code clarity.\n     *\n     * @default 'grouped'\n     */\n    paramsStructure?: 'flat' | 'grouped';\n    /**\n     * **This feature works only with the Fetch client**\n     *\n     * Should we return only data or multiple fields (data, error, response, etc.)?\n     *\n     * @default 'fields'\n     */\n    responseStyle?: 'data' | 'fields';\n    /**\n     * Transform response data before returning. This is useful if you want to\n     * convert for example ISO strings into Date objects. However, transformation\n     * adds runtime overhead, so it's not recommended to use unless necessary.\n     *\n     * You can customize the selected transformer output through its plugin. You\n     * can also set `transformer` to `true` to automatically choose the\n     * transformer from your defined plugins.\n     *\n     * @default false\n     */\n    transformer?: PluginTransformerNames | boolean;\n    /**\n     * Validate request and/or response data against schema before returning.\n     * This is useful if you want to ensure the request and/or response conforms\n     * to a desired shape. However, validation adds runtime overhead, so it's\n     * not recommended to use unless absolutely necessary.\n     *\n     * You can customize the validator output through its plugin. You can also\n     * set `validator` to `true` to automatically choose the validator from your\n     * defined plugins.\n     *\n     * You can enable/disable validation for requests and responses separately\n     * by setting `validator` to an object `{ request, response }`.\n     *\n     * Ensure you have declared the selected library as a dependency to avoid\n     * errors.\n     *\n     * @default false\n     */\n    validator?:\n      | PluginValidatorNames\n      | boolean\n      | {\n          /**\n           * Validate request data against schema before sending.\n           *\n           * Can be a validator plugin name or boolean (true to auto-select, false\n           * to disable).\n           *\n           * @default false\n           */\n          request?: PluginValidatorNames | boolean;\n          /**\n           * Validate response data against schema before returning.\n           *\n           * Can be a validator plugin name or boolean (true to auto-select, false\n           * to disable).\n           *\n           * @default false\n           */\n          response?: PluginValidatorNames | boolean;\n        };\n\n    // DEPRECATED OPTIONS BELOW\n\n    /**\n     * Group operation methods into classes? When enabled, you can select which\n     * classes to export with `sdk.include` and/or transform their names with\n     * `sdk.classNameBuilder`.\n     *\n     * Note that by enabling this option, your SDKs will **NOT**\n     * support {@link https://developer.mozilla.org/docs/Glossary/Tree_shaking tree-shaking}.\n     * For this reason, it is disabled by default.\n     *\n     * @deprecated Use `operations: { strategy: \"byTags\" }` or `operations: { strategy: \"single\" }` instead.\n     * @default false\n     */\n    // eslint-disable-next-line typescript-sort-keys/interface\n    asClass?: boolean;\n    /**\n     * Customize the generated class names. The name variable is obtained from\n     * your OpenAPI specification tags or `instance` value.\n     *\n     * This option has no effect if `sdk.asClass` is `false`.\n     *\n     * @deprecated Use `operations: { containerName: \"...\" }` instead.\n     */\n    classNameBuilder?: NameTransformer;\n    /**\n     * How should we structure your SDK? By default, we try to infer the ideal\n     * structure using `operationId` keywords. If you prefer a flatter structure,\n     * you can set `classStructure` to `off` to disable this behavior.\n     *\n     * @deprecated Use `operations: { nesting: \"operationId\" }` or `operations: { nesting: \"id\" }` instead.\n     * @default 'auto'\n     */\n    classStructure?: 'auto' | 'off';\n    /**\n     * Set `instance` to create an instantiable SDK. Using `true` will use the\n     * default instance name; in practice, you want to define your own by passing\n     * a string value.\n     *\n     * @deprecated Use `operations: { strategy: \"single\", containerName: \"Name\", methods: \"instance\" }` instead.\n     * @default false\n     */\n    instance?: string | boolean;\n    /**\n     * Customise the name of methods within the service. By default,\n     * `operation.id` is used.\n     *\n     * @deprecated Use `operations: { methodName: \"...\" }` instead.\n     */\n    methodNameBuilder?: NameTransformer;\n    /**\n     * Use operation ID to generate operation names?\n     *\n     * @deprecated Use `operations: { nesting: \"operationId\" }` or `operations: { nesting: \"id\" }` instead.\n     * @default true\n     */\n    operationId?: boolean;\n    /**\n     * Define shape of returned value from service calls\n     *\n     * @deprecated\n     * @default 'body'\n     */\n    response?: 'body' | 'response';\n  };\n\nexport type Config = Plugin.Name<'@hey-api/sdk'> &\n  Plugin.Hooks &\n  Plugin.Comments &\n  Plugin.Exports & {\n    /**\n     * Should the generated functions contain auth mechanisms? You may want to\n     * disable this option if you're handling auth yourself or defining it\n     * globally on the client and want to reduce the size of generated code.\n     *\n     * @default true\n     */\n    auth: boolean;\n    /**\n     * Use an internal client instance to send HTTP requests? This is useful if\n     * you don't want to manually pass the client to each SDK function.\n     *\n     * You can customize the selected client output through its plugin. You can\n     * also set `client` to `true` to automatically choose the client from your\n     * defined plugins. If we can't detect a client plugin when using `true`, we\n     * will default to `@hey-api/client-fetch`.\n     *\n     * @default true\n     */\n    client: PluginClientNames | false;\n    /** Configuration for generating SDK code examples. */\n    examples: ExamplesConfig;\n    /** Define the structure of generated SDK operations. */\n    operations: OperationsConfig;\n    /**\n     * Define how request parameters are structured in generated SDK methods.\n     *\n     * - `'flat'` merges parameters into a single object.\n     * - `'grouped'` separates parameters by transport layer.\n     *\n     * Use `'flat'` for simpler calls or `'grouped'` for stricter typing and code clarity.\n     *\n     * @default 'grouped'\n     */\n    paramsStructure: 'flat' | 'grouped';\n    /**\n     * **This feature works only with the Fetch client**\n     *\n     * Should we return only data or multiple fields (data, error, response, etc.)?\n     *\n     * @default 'fields'\n     */\n    responseStyle: 'data' | 'fields';\n    /**\n     * Transform response data before returning. This is useful if you want to\n     * convert for example ISO strings into Date objects. However, transformation\n     * adds runtime overhead, so it's not recommended to use unless necessary.\n     *\n     * You can customize the selected transformer output through its plugin. You\n     * can also set `transformer` to `true` to automatically choose the\n     * transformer from your defined plugins.\n     *\n     * @default false\n     */\n    transformer: PluginTransformerNames | false;\n    /**\n     * Validate request and/or response data against schema before returning.\n     * This is useful if you want to ensure the request and/or response conforms\n     * to a desired shape. However, validation adds runtime overhead, so it's\n     * not recommended to use unless absolutely necessary.\n     */\n    validator: {\n      /**\n       * The validator plugin to use for request validation, or false to disable.\n       *\n       * @default false\n       */\n      request: PluginValidatorNames | false;\n      /**\n       * The validator plugin to use for response validation, or false to disable.\n       *\n       * @default false\n       */\n      response: PluginValidatorNames | false;\n    };\n\n    // DEPRECATED OPTIONS BELOW\n\n    /**\n     * Define shape of returned value from service calls\n     *\n     * @deprecated\n     * @default 'body'\n     */\n    // eslint-disable-next-line typescript-sort-keys/interface\n    response: 'body' | 'response';\n  };\n\nexport type HeyApiSdkPlugin = DefinePlugin<UserConfig, Config>;\n"
  },
  {
    "path": "packages/openapi-ts/src/plugins/@hey-api/sdk/v1/node.ts",
    "content": "import type {\n  StructureItem,\n  StructureNode,\n  StructureShell,\n  Symbol,\n  SymbolMeta,\n} from '@hey-api/codegen-core';\nimport type { IR } from '@hey-api/shared';\nimport { applyNaming, toCase } from '@hey-api/shared';\n\nimport { getTypedConfig } from '../../../../config/utils';\nimport { getClientPlugin } from '../../../../plugins/@hey-api/client-core/utils';\nimport {\n  createOperationComment,\n  isOperationOptionsRequired,\n} from '../../../../plugins/shared/utils/operation';\nimport { $, ctx } from '../../../../ts-dsl';\nimport { createClientClass, createRegistryClass } from '../shared/class';\nimport { nuxtTypeComposable, nuxtTypeDefault } from '../shared/constants';\nimport { operationParameters, operationStatements } from '../shared/operation';\nimport type { HeyApiSdkPlugin } from '../types';\n\nexport interface OperationItem {\n  operation: IR.OperationObject;\n  path: ReadonlyArray<string | number>;\n  tags: ReadonlyArray<string> | undefined;\n}\n\nexport const source = globalThis.Symbol('@hey-api/sdk');\n\nexport function isInstance(plugin: HeyApiSdkPlugin['Instance']): boolean {\n  const config = plugin.config.operations;\n  return (\n    config.container === 'class' && config.methods === 'instance' && config.strategy !== 'flat'\n  );\n}\n\nfunction attachComment<T extends ReturnType<typeof $.var | typeof $.method>>(args: {\n  node: T;\n  operation: IR.OperationObject;\n  plugin: HeyApiSdkPlugin['Instance'];\n}): T {\n  const { node, operation, plugin } = args;\n  return node.$if(plugin.config.comments && createOperationComment(operation), (n, v) =>\n    n.doc(v),\n  ) as T;\n}\n\nfunction createShellMeta(node: StructureNode): SymbolMeta {\n  return {\n    category: 'utility',\n    resource: 'class',\n    resourceId: node.getPath().join('.'),\n    tool: 'sdk',\n  };\n}\n\nfunction createFnSymbol(\n  plugin: HeyApiSdkPlugin['Instance'],\n  item: StructureItem & { data: OperationItem },\n): Symbol {\n  const { operation, path, tags } = item.data;\n  const name = item.location[item.location.length - 1]!;\n  return plugin.symbol(applyNaming(name, plugin.config.operations.methodName), {\n    meta: {\n      category: 'sdk',\n      path,\n      resource: 'operation',\n      resourceId: operation.id,\n      tags,\n      tool: 'sdk',\n    },\n  });\n}\n\nfunction childToNode(\n  resource: StructureNode,\n  plugin: HeyApiSdkPlugin['Instance'],\n): ReadonlyArray<ReturnType<typeof $.field | typeof $.getter>> {\n  const refChild = plugin.referenceSymbol(createShellMeta(resource));\n  const memberNameStr = toCase(\n    refChild.name,\n    plugin.config.operations.methodName.casing ?? 'camelCase',\n  );\n  const memberName = plugin.symbol(memberNameStr);\n  if (isInstance(plugin)) {\n    const privateName = plugin.symbol(`_${memberNameStr}`);\n    return [\n      $.field(privateName, (f) => f.private().optional().type(refChild)),\n      $.getter(memberName, (g) =>\n        g.returns(refChild).do(\n          $('this')\n            .attr(privateName)\n            .nullishAssign(\n              $.new(refChild).args($.object().prop('client', $('this').attr('client'))),\n            )\n            .return(),\n        ),\n      ),\n    ];\n  }\n  if (plugin.isSymbolRegistered(refChild.id)) {\n    return [$.field(memberName, (f) => f.static().assign($(refChild)))];\n  }\n  return [$.getter(memberName, (g) => g.public().static().do($.return(refChild)))];\n}\n\nexport function createShell(plugin: HeyApiSdkPlugin['Instance']): StructureShell {\n  const client = getClientPlugin(getTypedConfig(plugin));\n  const isAngularClient = client.name === '@hey-api/client-angular';\n  return {\n    define: (node) => {\n      const symbol = plugin.symbol(\n        applyNaming(\n          node.name,\n          node.isRoot\n            ? plugin.config.operations.containerName\n            : plugin.config.operations.segmentName,\n        ),\n        {\n          meta: createShellMeta(node),\n        },\n      );\n\n      // if (plugin.config.operations.container === 'object') {\n      //   const o = $.const(symbol).export().assign($.object());\n      //   return { dependencies: [], node: o };\n      // }\n\n      const c = $.class(symbol)\n        .export()\n        .$if(isInstance(plugin), (c) =>\n          c.extends(\n            plugin.referenceSymbol({\n              category: 'utility',\n              resource: 'class',\n              resourceId: 'HeyApiClient',\n              tool: 'sdk',\n            }),\n          ),\n        )\n        .$if(isAngularClient && node.isRoot, (c) =>\n          c.decorator(\n            plugin.external('@angular/core.Injectable'),\n            $.object().prop('providedIn', $.literal('root')),\n          ),\n        );\n\n      const dependencies: Array<ReturnType<typeof $.class>> = [];\n\n      if (node.isRoot && isInstance(plugin)) {\n        enrichRootClass({\n          dependencies,\n          node: c,\n          plugin,\n          symbol,\n        });\n      }\n\n      return { dependencies, node: c };\n    },\n  };\n}\n\nfunction enrichRootClass(args: {\n  dependencies: Array<ReturnType<typeof $.class>>;\n  node: ReturnType<typeof $.class>;\n  plugin: HeyApiSdkPlugin['Instance'];\n  symbol: Symbol;\n}): void {\n  const { dependencies, node, plugin, symbol } = args;\n  const symbolClient = plugin.symbol('HeyApiClient', {\n    meta: {\n      category: 'utility',\n      resource: 'class',\n      resourceId: 'HeyApiClient',\n      tool: 'sdk',\n    },\n  });\n  dependencies.push(createClientClass({ plugin, symbol: symbolClient }));\n  const symbolRegistry = plugin.symbol('HeyApiRegistry', {\n    meta: {\n      category: 'utility',\n      resource: 'class',\n      resourceId: 'HeyApiRegistry',\n      tool: 'sdk',\n    },\n  });\n  dependencies.push(\n    createRegistryClass({\n      plugin,\n      sdkSymbol: symbol,\n      symbol: symbolRegistry,\n    }),\n  );\n  const isClientRequired = !plugin.config.client || !plugin.getSymbol({ category: 'client' });\n  const registry = plugin.symbol('__registry');\n  node.toAccessNode = (node, options) => {\n    if (options.context) return;\n    return $(node.name).attr(registry).attr('get').call();\n  };\n  node.do(\n    $.field(registry, (f) =>\n      f.public().static().readonly().assign($.new(symbolRegistry).generic(symbol)),\n    ),\n    $.newline(),\n    $.init((i) =>\n      i\n        .param('args', (p) =>\n          p.required(isClientRequired).type(\n            $.type\n              .object()\n              .prop('client', (p) =>\n                p.required(isClientRequired).type(plugin.external('client.Client')),\n              )\n              .prop('key', (p) => p.optional().type('string')),\n          ),\n        )\n        .do(\n          $('super').call('args'),\n          $(symbol)\n            .attr(registry)\n            .attr('set')\n            .call('this', $('args').attr('key').required(isClientRequired)),\n        ),\n    ),\n  );\n}\n\nfunction exampleIntent(\n  node: ReturnType<typeof $.method | typeof $.var>,\n  operation: IR.OperationObject,\n  plugin: HeyApiSdkPlugin['Instance'],\n): void {\n  const config = plugin.config.examples;\n  if (!config.enabled) return;\n  plugin.intent({\n    async run(context) {\n      const { payload } = config;\n      let example = ctx.example(node, {\n        ...config,\n        payload: (ctx) => (typeof payload === 'function' ? payload(operation, ctx) : payload),\n      });\n      if (config.transform) {\n        example = await config.transform(example, operation);\n      }\n      if (example) {\n        context.setExample(operation, {\n          lang: config.language,\n          source: example,\n        });\n      }\n    },\n  });\n}\n\nfunction implementFn<T extends ReturnType<typeof $.func | typeof $.method>>(args: {\n  node: T;\n  operation: IR.OperationObject;\n  plugin: HeyApiSdkPlugin['Instance'];\n}): T {\n  const { node, operation, plugin } = args;\n  const client = getClientPlugin(getTypedConfig(plugin));\n  const isNuxtClient = client.name === '@hey-api/client-nuxt';\n  const isRequiredOptions = isOperationOptionsRequired({\n    context: plugin.context,\n    operation,\n  });\n  const opParameters = operationParameters({\n    isRequiredOptions,\n    operation,\n    plugin,\n  });\n  const statements = operationStatements({\n    isRequiredOptions,\n    opParameters,\n    operation,\n    plugin,\n  });\n  return node\n    .$if(\n      isNuxtClient,\n      (m) =>\n        m\n          .generic(nuxtTypeComposable, (t) =>\n            t.extends(plugin.external('client.Composable')).default($.type.literal('$fetch')),\n          )\n          .generic(nuxtTypeDefault, (t) =>\n            t.$if(\n              plugin.querySymbol({\n                category: 'type',\n                resource: 'operation',\n                resourceId: operation.id,\n                role: 'response',\n              }),\n              (t, s) => t.extends(s).default(s),\n              (t) => t.default('undefined'),\n            ),\n          ),\n      (m) =>\n        m.generic('ThrowOnError', (t) =>\n          t\n            .extends('boolean')\n            .default(\n              ('throwOnError' in client.config ? client.config.throwOnError : false) ?? false,\n            ),\n        ),\n    )\n    .params(...opParameters.parameters)\n    .do(...statements) as T;\n}\n\nexport function toNode(\n  model: StructureNode,\n  plugin: HeyApiSdkPlugin['Instance'],\n): {\n  dependencies?: Array<ReturnType<typeof $.class | typeof $.var>>;\n  nodes: ReadonlyArray<ReturnType<typeof $.class | typeof $.var>>;\n} {\n  if (model.virtual) {\n    const nodes: Array<ReturnType<typeof $.var>> = [];\n    for (const item of model.itemsFrom<OperationItem>(source)) {\n      const { operation } = item.data;\n      let node = $.const(createFnSymbol(plugin, item))\n        .export()\n        .assign(\n          implementFn({\n            node: $.func(),\n            operation,\n            plugin,\n          }),\n        );\n      node = attachComment({ node, operation, plugin });\n      nodes.push(node);\n      exampleIntent(node, operation, plugin);\n    }\n    return { nodes };\n  }\n\n  if (!model.shell) {\n    return { nodes: [] };\n  }\n\n  const nodes: Array<ReturnType<typeof $.class | typeof $.var>> = [];\n\n  const client = getClientPlugin(getTypedConfig(plugin));\n  const isAngularClient = client.name === '@hey-api/client-angular';\n\n  const shell = model.shell.define(model);\n  const node = shell.node as ReturnType<typeof $.class | typeof $.var>;\n\n  let index = 0;\n  for (const item of model.itemsFrom<OperationItem>(source)) {\n    const { operation } = item.data;\n    if (node['~dsl'] === 'VarTsDsl') {\n      // TODO: object\n    } else {\n      if (index > 0 || node.hasBody) node.newline();\n      const method = implementFn({\n        node: $.method(createFnSymbol(plugin, item), (m) =>\n          attachComment({\n            node: m,\n            operation,\n            plugin,\n          })\n            .public()\n            .static(!isAngularClient && !isInstance(plugin)),\n        ),\n        operation,\n        plugin,\n      });\n      node.do(method);\n      exampleIntent(method, operation, plugin);\n    }\n    index += 1;\n  }\n\n  for (const child of model.children.values()) {\n    if (node['~dsl'] === 'VarTsDsl') {\n      // TODO: object\n    } else {\n      if (node.hasBody) node.newline();\n      node.do(...childToNode(child, plugin));\n    }\n  }\n\n  nodes.push(node);\n\n  return {\n    dependencies: shell.dependencies as Array<ReturnType<typeof $.class | typeof $.var>>,\n    nodes,\n  };\n}\n"
  },
  {
    "path": "packages/openapi-ts/src/plugins/@hey-api/sdk/v1/plugin.ts",
    "content": "import { StructureModel } from '@hey-api/codegen-core';\n\nimport { getTypedConfig } from '../../../../config/utils';\nimport { clientFolderAbsolutePath } from '../../../../generate/client';\nimport { getClientPlugin } from '../../../../plugins/@hey-api/client-core/utils';\nimport type { $ } from '../../../../ts-dsl';\nimport { resolveStrategy } from '../operations';\nimport { createTypeOptions } from '../shared/typeOptions';\nimport type { HeyApiSdkPlugin } from '../types';\nimport type { OperationItem } from './node';\nimport { createShell, source, toNode } from './node';\n\nexport const handlerV1: HeyApiSdkPlugin['Handler'] = ({ plugin }) => {\n  const clientModule = clientFolderAbsolutePath(getTypedConfig(plugin));\n  const client = getClientPlugin(getTypedConfig(plugin));\n  const isAngularClient = client.name === '@hey-api/client-angular';\n  const isNuxtClient = client.name === '@hey-api/client-nuxt';\n\n  plugin.symbol('formDataBodySerializer', {\n    external: clientModule,\n    meta: {\n      category: 'external',\n      resource: 'client.formDataBodySerializer',\n      tool: client.name,\n    },\n  });\n  plugin.symbol('urlSearchParamsBodySerializer', {\n    external: clientModule,\n    meta: {\n      category: 'external',\n      resource: 'client.urlSearchParamsBodySerializer',\n      tool: client.name,\n    },\n  });\n  plugin.symbol('buildClientParams', {\n    external: clientModule,\n    meta: {\n      category: 'external',\n      resource: 'client.buildClientParams',\n      tool: client.name,\n    },\n  });\n  if (isNuxtClient) {\n    plugin.symbol('Composable', {\n      external: clientModule,\n      kind: 'type',\n      meta: {\n        category: 'external',\n        resource: 'client.Composable',\n        tool: client.name,\n      },\n    });\n  }\n  if (isAngularClient) {\n    plugin.symbol('Injectable', {\n      external: '@angular/core',\n      meta: {\n        category: 'external',\n        resource: '@angular/core.Injectable',\n      },\n    });\n  }\n\n  createTypeOptions({ plugin });\n\n  const structure = new StructureModel();\n  const shell = createShell(plugin);\n  const strategy = resolveStrategy(plugin);\n\n  plugin.forEach(\n    'operation',\n    (event) => {\n      structure.insert({\n        data: {\n          operation: event.operation,\n          path: event._path,\n          tags: event.tags,\n        } satisfies OperationItem,\n        locations: strategy(event.operation).map((path) => ({ path, shell })),\n        source,\n      });\n    },\n    { order: 'declarations' },\n  );\n\n  const allDependencies: Array<ReturnType<typeof $.class | typeof $.var>> = [];\n  const allNodes: Array<ReturnType<typeof $.class | typeof $.var>> = [];\n\n  for (const node of structure.walk()) {\n    const { dependencies, nodes } = toNode(node, plugin);\n    allDependencies.push(...(dependencies ?? []));\n    allNodes.push(...nodes);\n  }\n\n  const uniqueDependencies = new Map<number, ReturnType<typeof $.class | typeof $.var>>();\n  for (const dep of allDependencies) {\n    if (dep.symbol) uniqueDependencies.set(dep.symbol.id, dep);\n  }\n  for (const dep of uniqueDependencies.values()) {\n    plugin.node(dep);\n  }\n\n  for (const node of allNodes) {\n    plugin.node(node);\n  }\n};\n"
  },
  {
    "path": "packages/openapi-ts/src/plugins/@hey-api/transformers/config.ts",
    "content": "import { definePluginConfig } from '@hey-api/shared';\n\nimport { bigIntExpressions, dateExpressions } from './expressions';\nimport { handler } from './plugin';\nimport type { HeyApiTransformersPlugin } from './types';\n\nexport const defaultConfig: HeyApiTransformersPlugin['Config'] = {\n  config: {\n    bigInt: true,\n    dates: true,\n    includeInEntry: false,\n    transformers: [],\n    typeTransformers: [],\n  },\n  dependencies: ['@hey-api/typescript'],\n  handler,\n  name: '@hey-api/transformers',\n  resolveConfig: (plugin) => {\n    if (!plugin.config.transformers) {\n      plugin.config.transformers = [];\n    }\n\n    if (plugin.config.dates) {\n      plugin.config.transformers = [...plugin.config.transformers, dateExpressions];\n    }\n\n    if (plugin.config.bigInt) {\n      plugin.config.transformers = [...plugin.config.transformers, bigIntExpressions];\n    }\n  },\n  tags: ['transformer'],\n};\n\n/**\n * Type helper for `@hey-api/transformers`, returns {@link Plugin.Config} object\n */\nexport const defineConfig = definePluginConfig(defaultConfig);\n"
  },
  {
    "path": "packages/openapi-ts/src/plugins/@hey-api/transformers/expressions.ts",
    "content": "import { $ } from '../../../ts-dsl';\nimport type { ExpressionTransformer } from './types';\n\nexport const bigIntExpressions: ExpressionTransformer = ({ dataExpression, schema }) => {\n  if (schema.type !== 'integer' || schema.format !== 'int64') {\n    return;\n  }\n\n  const bigIntCallExpression =\n    dataExpression !== undefined\n      ? $('BigInt').call($.expr(dataExpression).attr('toString').call())\n      : undefined;\n\n  if (bigIntCallExpression) {\n    if (typeof dataExpression === 'string') {\n      return [bigIntCallExpression];\n    }\n\n    if (dataExpression) {\n      return [$.expr(dataExpression).assign(bigIntCallExpression)];\n    }\n  }\n\n  return;\n};\n\nexport const dateExpressions: ExpressionTransformer = ({ dataExpression, schema }) => {\n  if (schema.type !== 'string' || !(schema.format === 'date' || schema.format === 'date-time')) {\n    return;\n  }\n\n  if (typeof dataExpression === 'string') {\n    return [$.new('Date').arg(dataExpression)];\n  }\n\n  if (dataExpression) {\n    return [$.expr(dataExpression).assign($.new('Date').arg(dataExpression))];\n  }\n\n  return;\n};\n"
  },
  {
    "path": "packages/openapi-ts/src/plugins/@hey-api/transformers/index.ts",
    "content": "export { defaultConfig, defineConfig } from './config';\nexport type { HeyApiTransformersPlugin, TypeTransformer } from './types';\n"
  },
  {
    "path": "packages/openapi-ts/src/plugins/@hey-api/transformers/plugin.ts",
    "content": "import type { SymbolMeta } from '@hey-api/codegen-core';\nimport type { IR } from '@hey-api/shared';\nimport { applyNaming, createOperationKey, operationResponsesMap, refToName } from '@hey-api/shared';\nimport type ts from 'typescript';\n\nimport { $ } from '../../../ts-dsl';\nimport type { HeyApiTransformersPlugin } from './types';\n\nconst dataVariableName = 'data';\n\n// Track symbols that are currently being built so recursive references\n// can emit calls to transformers that will be implemented later.\nconst buildingSymbols = new Set<number>();\n\ntype Expr = ReturnType<typeof $.fromValue | typeof $.return | typeof $.if>;\n\nfunction isNodeReturnStatement(node: Expr) {\n  return node['~dsl'] === 'ReturnTsDsl';\n}\n\nfunction schemaResponseTransformerNodes({\n  plugin,\n  schema,\n}: {\n  plugin: HeyApiTransformersPlugin['Instance'];\n  schema: IR.SchemaObject;\n}): Array<ts.Expression | ts.Statement | Expr> {\n  const nodes = processSchemaType({\n    dataExpression: $(dataVariableName),\n    plugin,\n    schema,\n  });\n  // append return statement if one does not already exist\n  if (nodes.length) {\n    const last = nodes[nodes.length - 1]!;\n    if (!isNodeReturnStatement(last)) {\n      nodes.push($.return(dataVariableName));\n    }\n  }\n  return nodes;\n}\n\nfunction processSchemaType({\n  dataExpression,\n  plugin,\n  schema,\n}: {\n  dataExpression?: ts.Expression | string | ReturnType<typeof $.attr | typeof $.expr>;\n  plugin: HeyApiTransformersPlugin['Instance'];\n  schema: IR.SchemaObject;\n}): Array<Expr> {\n  if (schema.$ref) {\n    const query: SymbolMeta = {\n      category: 'transform',\n      resource: 'definition',\n      resourceId: schema.$ref,\n    };\n    const symbol =\n      plugin.getSymbol(query) ??\n      plugin.symbol(\n        applyNaming(refToName(schema.$ref), {\n          case: 'camelCase',\n          name: '{{name}}SchemaResponseTransformer',\n        }),\n        {\n          meta: query,\n        },\n      );\n\n    // Only compute the implementation if the symbol isn't already being built.\n    // This prevents infinite recursion on self-referential schemas. We still\n    // allow emitting a call when the symbol is currently being built so\n    // parent nodes can reference the transformer that will be emitted later.\n    if (!symbol.node && !buildingSymbols.has(symbol.id)) {\n      buildingSymbols.add(symbol.id);\n      try {\n        const refSchema = plugin.context.resolveIrRef<IR.SchemaObject>(schema.$ref);\n        const nodes = schemaResponseTransformerNodes({\n          plugin,\n          schema: refSchema,\n        });\n\n        if (nodes.length) {\n          const node = $.const(symbol).assign(\n            // TODO: parser - add types, generate types without transforms\n            $.func()\n              .param(dataVariableName, (p) => p.type('any'))\n              .do(...nodes),\n          );\n          plugin.node(node);\n        }\n      } finally {\n        buildingSymbols.delete(symbol.id);\n      }\n    }\n\n    // Only emit a call if the symbol has a value (implementation) OR the\n    // symbol is currently being built (recursive reference) — in the\n    // latter case we allow emitting a call that will be implemented later.\n    if (symbol.node || buildingSymbols.has(symbol.id)) {\n      const ref = plugin.referenceSymbol(query);\n      const callExpression = $(ref).call(dataExpression);\n\n      if (dataExpression) {\n        // In a map callback, the item needs to be returned, not just the transformation result\n        if (typeof dataExpression === 'string' && dataExpression === 'item') {\n          return [$.return(callExpression)];\n        }\n\n        return [\n          typeof dataExpression === 'string'\n            ? callExpression\n            : $(dataExpression).assign(callExpression),\n        ];\n      }\n    }\n\n    return [];\n  }\n\n  if (schema.type === 'array') {\n    if (!dataExpression || typeof dataExpression === 'string') {\n      return [];\n    }\n\n    // TODO: parser - handle tuples and complex arrays\n    const nodes = !schema.items\n      ? []\n      : processSchemaType({\n          dataExpression: 'item',\n          plugin,\n          schema: schema.items?.[0]\n            ? schema.items[0]\n            : {\n                ...schema,\n                type: undefined,\n              },\n        });\n\n    if (!nodes.length) {\n      return [];\n    }\n\n    // TODO: remove\n    // Ensure the map callback has a return statement for the item\n    const mapCallbackStatements: Array<Expr> = nodes;\n    const hasReturnStatement = mapCallbackStatements.some((stmt) => isNodeReturnStatement(stmt));\n\n    if (!hasReturnStatement) {\n      mapCallbackStatements.push($.return('item'));\n    }\n\n    return [\n      $(dataExpression).assign(\n        $(dataExpression)\n          .attr('map')\n          .call(\n            $.func()\n              .param('item', (p) => p.type('any'))\n              .do(...mapCallbackStatements),\n          ),\n      ),\n    ];\n  }\n\n  if (schema.type === 'object') {\n    let nodes: Array<Expr> = [];\n    const required = schema.required ?? [];\n\n    for (const name in schema.properties) {\n      const property = schema.properties[name]!;\n      const propertyAccessExpression = $(dataExpression || dataVariableName).attr(name);\n      const propertyNodes = processSchemaType({\n        dataExpression: propertyAccessExpression,\n        plugin,\n        schema: property,\n      });\n      if (!propertyNodes.length) {\n        continue;\n      }\n      const noNullableTypesInSchema = !property.items?.find((x) => x.type === 'null');\n      const requiredField = required.includes(name);\n      // Cannot fully rely on required fields\n      // Such value has to be present, but it doesn't guarantee that this value is not nullish\n      if (requiredField && noNullableTypesInSchema) {\n        nodes = nodes.concat(propertyNodes);\n      } else {\n        nodes.push(\n          // todo: Probably, it would make more sense to go with if(x !== undefined && x !== null) instead of if(x)\n          // this place influences all underlying transformers, while it's not exactly transformer itself\n          // Keep in mind that !!0 === false, so it already makes output for Bigint undesirable\n          $.if(propertyAccessExpression).do(...propertyNodes),\n        );\n      }\n    }\n\n    return nodes;\n  }\n\n  if (schema.items) {\n    if (schema.items.length === 1) {\n      return processSchemaType({\n        dataExpression: 'item',\n        plugin,\n        schema: schema.items[0]!,\n      });\n    }\n\n    let arrayNodes: Array<Expr> = [];\n    // process 2 items if one of them is null\n    if (\n      schema.logicalOperator === 'and' ||\n      (schema.items.length === 2 &&\n        schema.items.find((item) => item.type === 'null' || item.type === 'void'))\n    ) {\n      for (const item of schema.items) {\n        const nodes = processSchemaType({\n          dataExpression: dataExpression || 'item',\n          plugin,\n          schema: item,\n        });\n        if (nodes.length) {\n          if (dataExpression) {\n            arrayNodes = arrayNodes.concat(nodes);\n          } else {\n            // processed means the item was transformed\n            arrayNodes.push($.if('item').do(...nodes), $.return('item'));\n          }\n        }\n      }\n      return arrayNodes;\n    }\n\n    // assume enums do not contain transformable values\n    if (schema.type !== 'enum') {\n      const hasSimpleTypes = (schema.items ?? []).every((item) =>\n        (\n          ['boolean', 'integer', 'null', 'number', 'string'] as ReadonlyArray<typeof item.type>\n        ).includes(item.type),\n      );\n\n      // Skip warning if items are processable through other mechanisms:\n      // 1. All items are $ref-based (e.g., discriminated oneOf/anyOf)\n      // 2. All items are nested allOf ($ref wrapped in allOf for discriminators)\n      // These patterns are handled correctly by recursive processing logic\n      const isProcessable = (schema.items ?? []).every((item) => {\n        // Direct $ref items are processable\n        if (item.$ref) {\n          return true;\n        }\n        // Nested allOf items (common in discriminated unions) are processable\n        if (item.logicalOperator === 'and' && item.items) {\n          return true;\n        }\n        return false;\n      });\n\n      if (!hasSimpleTypes && !isProcessable) {\n        console.warn(\n          `❗️ Transformers warning: schema ${JSON.stringify(schema)} is too complex and won't be currently processed. This will likely produce an incomplete transformer which is not what you want. Please open an issue if you'd like this improved https://github.com/hey-api/openapi-ts/issues`,\n        );\n      }\n    }\n  }\n\n  for (const transformer of plugin.config.transformers) {\n    const t = transformer({\n      $,\n      config: plugin.config,\n      dataExpression,\n      plugin,\n      schema,\n    });\n    if (t) {\n      return t;\n    }\n  }\n\n  return [];\n}\n\n// handles only response transformers for now\nexport const handler: HeyApiTransformersPlugin['Handler'] = ({ plugin }) => {\n  plugin.forEach(\n    'operation',\n    ({ operation }) => {\n      const { response } = operationResponsesMap(operation);\n      if (!response) return;\n\n      const isNullableUnion =\n        response.items?.length === 2 &&\n        response.items.some((item) => item.type === 'null' || item.type === 'void');\n\n      if (\n        response.items &&\n        response.items.length > 1 &&\n        response.logicalOperator !== 'and' &&\n        !isNullableUnion\n      ) {\n        if (plugin.context.config.logs.level === 'debug') {\n          console.warn(\n            `❗️ Transformers warning: route ${createOperationKey(operation)} has ${response.items.length} non-void success responses. This is currently not handled and we will not generate a response transformer. Please open an issue if you'd like this feature https://github.com/hey-api/openapi-ts/issues`,\n          );\n        }\n        return;\n      }\n\n      const symbolResponse = plugin.querySymbol({\n        category: 'type',\n        resource: 'operation',\n        resourceId: operation.id,\n        role: 'response',\n      });\n      if (!symbolResponse) return;\n\n      // TODO: parser - consider handling simple string response which is also a date\n      const nodes = schemaResponseTransformerNodes({\n        plugin,\n        schema: response,\n      });\n      if (!nodes.length) return;\n\n      // For nullable union responses (e.g. anyOf: [SomeSchema, null]), wrap the\n      // transformation in a null guard so that null data is returned as-is.\n      // We require nodes.length >= 2 because we need at least one transformation\n      // statement AND a return statement (empty .do() would fail validation).\n      let finalNodes = nodes;\n      if (isNullableUnion && nodes.length >= 2) {\n        const lastNode = nodes[nodes.length - 1]!;\n        if (isNodeReturnStatement(lastNode as Expr)) {\n          const transformNodes = nodes.slice(0, -1) as Array<Expr>;\n          finalNodes = [$.if($(dataVariableName)).do(...transformNodes), lastNode];\n        }\n      }\n\n      const symbol = plugin.symbol(\n        applyNaming(operation.id, {\n          case: 'camelCase',\n          name: '{{name}}ResponseTransformer',\n        }),\n        {\n          meta: {\n            category: 'transform',\n            resource: 'operation',\n            resourceId: operation.id,\n            role: 'response',\n          },\n        },\n      );\n      const value = $.const(symbol)\n        .export()\n        .assign(\n          // TODO: parser - add types, generate types without transforms\n          $.func()\n            .async()\n            .param(dataVariableName, (p) => p.type('any'))\n            .returns($.type('Promise').generic(symbolResponse))\n            .do(...finalNodes),\n        );\n      plugin.node(value);\n    },\n    {\n      order: 'declarations',\n    },\n  );\n};\n"
  },
  {
    "path": "packages/openapi-ts/src/plugins/@hey-api/transformers/types.ts",
    "content": "import type { IR } from '@hey-api/shared';\nimport type { DefinePlugin, Plugin } from '@hey-api/shared';\nimport type ts from 'typescript';\n\nimport type { $, DollarTsDsl, MaybeTsDsl, TsDsl } from '../../../ts-dsl';\n\ninterface BaseTransformer extends DollarTsDsl {\n  plugin: HeyApiTransformersPlugin['Instance'];\n  schema: IR.SchemaObject;\n}\n\nexport type ExpressionTransformer = (\n  ctx: BaseTransformer & {\n    /** @deprecated Use `plugin` instead and access the config via `plugin.config` */\n    config: Omit<UserConfig, 'name'>;\n    dataExpression?: ts.Expression | ReturnType<typeof $.attr | typeof $.expr> | string;\n  },\n) => Array<TsDsl<ts.Expression>> | undefined;\n\n/**\n * Returns the TypeScript type node for a schema with a specific format.\n * If undefined is returned, the default type will be used.\n */\nexport type TypeTransformer = (ctx: BaseTransformer) => MaybeTsDsl<ts.TypeNode> | undefined;\n\nexport type UserConfig = Plugin.Name<'@hey-api/transformers'> &\n  Plugin.Hooks &\n  Plugin.UserExports & {\n    /**\n     * Convert long integers into BigInt values?\n     *\n     * @default true\n     */\n    bigInt?: boolean;\n    /**\n     * Convert date strings into Date objects?\n     *\n     * @default true\n     */\n    dates?: boolean;\n    /**\n     * Custom transforms to apply to the generated code.\n     */\n    transformers?: ReadonlyArray<ExpressionTransformer>;\n    /**\n     * Custom type transformers that modify the TypeScript types generated.\n     */\n    typeTransformers?: ReadonlyArray<TypeTransformer>;\n  };\n\nexport type Config = Plugin.Name<'@hey-api/transformers'> &\n  Plugin.Hooks &\n  Plugin.Exports & {\n    /**\n     * Convert long integers into BigInt values?\n     *\n     * @default true\n     */\n    bigInt: boolean;\n    /**\n     * Convert date strings into Date objects?\n     *\n     * @default true\n     */\n    dates: boolean;\n    /**\n     * Custom transforms to apply to the generated code.\n     */\n    transformers: ReadonlyArray<ExpressionTransformer>;\n    /**\n     * Custom type transformers that modify the TypeScript types generated.\n     */\n    typeTransformers: ReadonlyArray<TypeTransformer>;\n  };\n\nexport type HeyApiTransformersPlugin = DefinePlugin<UserConfig, Config>;\n"
  },
  {
    "path": "packages/openapi-ts/src/plugins/@hey-api/typescript/api.ts",
    "content": "import type { IR } from '@hey-api/shared';\n\nimport { $ } from '../../../ts-dsl';\nimport type { Type } from './shared/types';\nimport type { HeyApiTypeScriptPlugin } from './types';\nimport { createProcessor } from './v1/processor';\n\nexport type IApi = {\n  schemaToType: (plugin: HeyApiTypeScriptPlugin['Instance'], schema: IR.SchemaObject) => Type;\n};\n\nexport class Api implements IApi {\n  schemaToType(plugin: HeyApiTypeScriptPlugin['Instance'], schema: IR.SchemaObject): Type {\n    const processor = createProcessor(plugin);\n    const result = processor.process({\n      export: false,\n      meta: {\n        resource: 'definition',\n        resourceId: '',\n      },\n      naming: plugin.config.definitions,\n      path: [],\n      plugin,\n      schema,\n    });\n\n    if (!result) {\n      return $.type(plugin.config.topType);\n    }\n    return result.type;\n  }\n}\n"
  },
  {
    "path": "packages/openapi-ts/src/plugins/@hey-api/typescript/config.ts",
    "content": "import { definePluginConfig } from '@hey-api/shared';\n\nimport { Api } from './api';\nimport { handler } from './plugin';\nimport type { HeyApiTypeScriptPlugin } from './types';\n\nexport const defaultConfig: HeyApiTypeScriptPlugin['Config'] = {\n  api: new Api(),\n  config: {\n    case: 'PascalCase',\n    comments: true,\n    includeInEntry: true,\n    topType: 'unknown',\n  },\n  handler,\n  name: '@hey-api/typescript',\n  resolveConfig: (plugin, context) => {\n    plugin.config.definitions = context.valueToObject({\n      defaultValue: {\n        case: plugin.config.case ?? 'PascalCase',\n        name: '{{name}}',\n      },\n      mappers: {\n        function: (name) => ({ name }),\n        string: (name) => ({ name }),\n      },\n      value: plugin.config.definitions,\n    });\n\n    plugin.config.enums = context.valueToObject({\n      defaultValue: {\n        case: 'SCREAMING_SNAKE_CASE',\n        constantsIgnoreNull: false,\n        enabled: Boolean(plugin.config.enums),\n        mode: 'javascript',\n      },\n      mappers: {\n        boolean: (enabled) => ({ enabled }),\n        string: (mode) => ({ mode }),\n      },\n      value: plugin.config.enums,\n    });\n\n    plugin.config.errors = context.valueToObject({\n      defaultValue: {\n        case: plugin.config.case ?? 'PascalCase',\n        error: '{{name}}Error',\n        name: '{{name}}Errors',\n      },\n      mappers: {\n        function: (name) => ({ name }),\n        string: (name) => ({ name }),\n      },\n      value: plugin.config.errors,\n    });\n\n    plugin.config.requests = context.valueToObject({\n      defaultValue: {\n        case: plugin.config.case ?? 'PascalCase',\n        name: '{{name}}Data',\n      },\n      mappers: {\n        function: (name) => ({ name }),\n        string: (name) => ({ name }),\n      },\n      value: plugin.config.requests,\n    });\n\n    plugin.config.responses = context.valueToObject({\n      defaultValue: {\n        case: plugin.config.case ?? 'PascalCase',\n        name: '{{name}}Responses',\n        response: '{{name}}Response',\n      },\n      mappers: {\n        function: (name) => ({ name }),\n        string: (name) => ({ name }),\n      },\n      value: plugin.config.responses,\n    });\n\n    plugin.config.webhooks = context.valueToObject({\n      defaultValue: {\n        case: plugin.config.case ?? 'PascalCase',\n        name: '{{name}}WebhookRequest',\n        payload: '{{name}}WebhookPayload',\n      },\n      mappers: {\n        function: (name) => ({ name }),\n        string: (name) => ({ name }),\n      },\n      value: plugin.config.webhooks,\n    });\n  },\n};\n\n/**\n * Type helper for `@hey-api/typescript` plugin, returns {@link Plugin.Config} object\n */\nexport const defineConfig = definePluginConfig(defaultConfig);\n"
  },
  {
    "path": "packages/openapi-ts/src/plugins/@hey-api/typescript/index.ts",
    "content": "export { defaultConfig, defineConfig } from './config';\nexport type { HeyApiTypeScriptResolvers } from './resolvers';\nexport type { HeyApiTypeScriptPlugin } from './types';\n"
  },
  {
    "path": "packages/openapi-ts/src/plugins/@hey-api/typescript/plugin.ts",
    "content": "import type { HeyApiTypeScriptPlugin } from './types';\nimport { handlerV1 } from './v1/plugin';\n\nexport const handler: HeyApiTypeScriptPlugin['Handler'] = (args) => handlerV1(args);\n"
  },
  {
    "path": "packages/openapi-ts/src/plugins/@hey-api/typescript/resolvers.ts",
    "content": "import type { IR, Plugin, SchemaVisitorContext, SchemaWithType, Walker } from '@hey-api/shared';\n\nimport type { $, DollarTsDsl } from '../../../ts-dsl';\nimport type { Type, TypeScriptResult } from './shared/types';\nimport type { HeyApiTypeScriptPlugin } from './types';\n\nexport type HeyApiTypeScriptResolvers = Plugin.Resolvers<{\n  /**\n   * Resolver for array schemas.\n   *\n   * Allows customization of how array types are rendered.\n   *\n   * Returning `undefined` will execute the default resolver logic.\n   */\n  array?: (ctx: ArrayResolverContext) => Type | undefined;\n  /**\n   * Resolver for boolean schemas.\n   *\n   * Allows customization of how boolean types are rendered.\n   *\n   * Returning `undefined` will execute the default resolver logic.\n   */\n  boolean?: (ctx: BooleanResolverContext) => Type | undefined;\n  /**\n   * Resolver for enum schemas.\n   *\n   * Allows customization of how enum types are rendered.\n   *\n   * Returning `undefined` will execute the default resolver logic.\n   */\n  enum?: (ctx: EnumResolverContext) => Type | undefined;\n  /**\n   * Resolver for intersection schemas.\n   *\n   * Allows customization of how intersection types are rendered.\n   *\n   * Returning `undefined` will execute the default resolver logic.\n   */\n  intersection?: (ctx: IntersectionResolverContext) => Type | undefined;\n  /**\n   * Resolver for never schemas.\n   *\n   * Allows customization of how never types are rendered.\n   *\n   * Returning `undefined` will execute the default resolver logic.\n   */\n  never?: (ctx: NeverResolverContext) => Type | undefined;\n  /**\n   * Resolver for null schemas.\n   *\n   * Allows customization of how null types are rendered.\n   *\n   * Returning `undefined` will execute the default resolver logic.\n   */\n  null?: (ctx: NullResolverContext) => Type | undefined;\n  /**\n   * Resolver for number schemas.\n   *\n   * Allows customization of how number types are rendered.\n   *\n   * Returning `undefined` will execute the default resolver logic.\n   */\n  number?: (ctx: NumberResolverContext) => Type | undefined;\n  /**\n   * Resolver for object schemas.\n   *\n   * Allows customization of how object types are rendered.\n   *\n   * Returning `undefined` will execute the default resolver logic.\n   */\n  object?: (ctx: ObjectResolverContext) => Type | undefined;\n  /**\n   * Resolver for string schemas.\n   *\n   * Allows customization of how string types are rendered.\n   *\n   * Returning `undefined` will execute the default resolver logic.\n   */\n  string?: (ctx: StringResolverContext) => Type | undefined;\n  /**\n   * Resolver for tuple schemas.\n   *\n   * Allows customization of how tuple types are rendered.\n   *\n   * Returning `undefined` will execute the default resolver logic.\n   */\n  tuple?: (ctx: TupleResolverContext) => Type | undefined;\n  /**\n   * Resolver for undefined schemas.\n   *\n   * Allows customization of how undefined types are rendered.\n   *\n   * Returning `undefined` will execute the default resolver logic.\n   */\n  undefined?: (ctx: UndefinedResolverContext) => Type | undefined;\n  /**\n   * Resolver for union schemas.\n   *\n   * Allows customization of how union types are rendered.\n   *\n   * Returning `undefined` will execute the default resolver logic.\n   */\n  union?: (ctx: UnionResolverContext) => Type | undefined;\n  /**\n   * Resolver for unknown schemas.\n   *\n   * Allows customization of how unknown types are rendered.\n   *\n   * Returning `undefined` will execute the default resolver logic.\n   */\n  unknown?: (ctx: UnknownResolverContext) => Type | undefined;\n  /**\n   * Resolver for void schemas.\n   *\n   * Allows customization of how void types are rendered.\n   *\n   * Returning `undefined` will execute the default resolver logic.\n   */\n  void?: (ctx: VoidResolverContext) => Type | undefined;\n}>;\n\ninterface BaseContext extends DollarTsDsl {\n  /** The plugin instance. */\n  plugin: HeyApiTypeScriptPlugin['Instance'];\n}\n\nexport interface ArrayResolverContext extends BaseContext {\n  /**\n   * Nodes used to build different parts of the result.\n   */\n  nodes: {\n    /**\n     * Returns the base array type expression.\n     */\n    base: (ctx: ArrayResolverContext) => Type;\n  };\n  schema: SchemaWithType<'array'>;\n  walk: Walker<TypeScriptResult, HeyApiTypeScriptPlugin['Instance']>;\n  walkerCtx: SchemaVisitorContext<HeyApiTypeScriptPlugin['Instance']>;\n}\n\nexport interface BooleanResolverContext extends BaseContext {\n  /**\n   * Nodes used to build different parts of the result.\n   */\n  nodes: {\n    /**\n     * Returns the base boolean type expression.\n     */\n    base: (ctx: BooleanResolverContext) => Type;\n    /**\n     * Returns the literal type for const values.\n     */\n    const: (ctx: BooleanResolverContext) => Type | undefined;\n  };\n  schema: SchemaWithType<'boolean'>;\n}\n\nexport interface EnumResolverContext extends BaseContext {\n  /**\n   * Nodes used to build different parts of the result.\n   */\n  nodes: {\n    /**\n     * Returns the base enum type expression.\n     */\n    base: (ctx: EnumResolverContext) => Type;\n    /**\n     * Returns parsed enum items with metadata about the enum members.\n     */\n    items: (ctx: EnumResolverContext) => {\n      /**\n       * String literal values for use with union types.\n       */\n      enumMembers: Array<ReturnType<typeof $.type.literal>>;\n      /**\n       * Whether the enum includes a null value.\n       */\n      isNullable: boolean;\n    };\n  };\n  schema: SchemaWithType<'enum'>;\n}\n\nexport interface IntersectionResolverContext extends BaseContext {\n  /**\n   * The child results from walking intersection members.\n   */\n  childResults: ReadonlyArray<TypeScriptResult>;\n  /**\n   * Nodes used to build different parts of the result.\n   */\n  nodes: {\n    /**\n     * Returns the base intersection type expression.\n     */\n    base: (ctx: IntersectionResolverContext) => Type;\n  };\n  /**\n   * The parent schema containing the intersection.\n   */\n  parentSchema: IR.SchemaObject;\n  /**\n   * The individual schemas being intersected.\n   */\n  schemas: ReadonlyArray<IR.SchemaObject>;\n}\n\nexport interface NeverResolverContext extends BaseContext {\n  /**\n   * Nodes used to build different parts of the result.\n   */\n  nodes: {\n    /**\n     * Returns the base never type expression.\n     */\n    base: (ctx: NeverResolverContext) => Type;\n  };\n  schema: SchemaWithType<'never'>;\n}\n\nexport interface NullResolverContext extends BaseContext {\n  /**\n   * Nodes used to build different parts of the result.\n   */\n  nodes: {\n    /**\n     * Returns the base null type expression.\n     */\n    base: (ctx: NullResolverContext) => Type;\n  };\n  schema: SchemaWithType<'null'>;\n}\n\nexport interface NumberResolverContext extends BaseContext {\n  /**\n   * Nodes used to build different parts of the result.\n   */\n  nodes: {\n    /**\n     * Returns the base number type expression.\n     */\n    base: (ctx: NumberResolverContext) => Type;\n    /**\n     * Returns the literal type for const values.\n     */\n    const: (ctx: NumberResolverContext) => Type | undefined;\n  };\n  schema: SchemaWithType<'integer' | 'number'>;\n}\n\nexport interface ObjectResolverContext extends BaseContext {\n  /**\n   * Nodes used to build different parts of the result.\n   */\n  nodes: {\n    /**\n     * Returns the base object type expression.\n     */\n    base: (ctx: ObjectResolverContext) => Type;\n    /**\n     * Returns the shape (properties) of the object type.\n     */\n    shape: (ctx: ObjectResolverContext) => ReturnType<typeof $.type.object>;\n  };\n  schema: SchemaWithType<'object'>;\n  walk: Walker<TypeScriptResult, HeyApiTypeScriptPlugin['Instance']>;\n  walkerCtx: SchemaVisitorContext<HeyApiTypeScriptPlugin['Instance']>;\n}\n\nexport interface StringResolverContext extends BaseContext {\n  /**\n   * Nodes used to build different parts of the result.\n   */\n  nodes: {\n    /**\n     * Returns the base string type expression.\n     */\n    base: (ctx: StringResolverContext) => Type;\n    /**\n     * Returns the literal type for const values.\n     */\n    const: (ctx: StringResolverContext) => Type | undefined;\n    /**\n     * Returns the format-specific type expression.\n     */\n    format: (ctx: StringResolverContext) => Type | undefined;\n  };\n  schema: SchemaWithType<'string'>;\n}\n\nexport interface TupleResolverContext extends BaseContext {\n  /**\n   * Nodes used to build different parts of the result.\n   */\n  nodes: {\n    /**\n     * Returns the base tuple type expression.\n     */\n    base: (ctx: TupleResolverContext) => Type;\n    /**\n     * Returns the literal type for const tuple values.\n     */\n    const: (ctx: TupleResolverContext) => Type | undefined;\n  };\n  schema: SchemaWithType<'tuple'>;\n  walk: Walker<TypeScriptResult, HeyApiTypeScriptPlugin['Instance']>;\n  walkerCtx: SchemaVisitorContext<HeyApiTypeScriptPlugin['Instance']>;\n}\n\nexport interface UnionResolverContext extends BaseContext {\n  /**\n   * The child results from walking union members.\n   */\n  childResults: ReadonlyArray<TypeScriptResult>;\n  /**\n   * Nodes used to build different parts of the result.\n   */\n  nodes: {\n    /**\n     * Returns the base union type expression.\n     */\n    base: (ctx: UnionResolverContext) => Type;\n  };\n  /**\n   * The parent schema containing the union.\n   */\n  parentSchema: IR.SchemaObject;\n  /**\n   * The individual schemas being unioned.\n   */\n  schemas: ReadonlyArray<IR.SchemaObject>;\n}\n\nexport interface UndefinedResolverContext extends BaseContext {\n  /**\n   * Nodes used to build different parts of the result.\n   */\n  nodes: {\n    /**\n     * Returns the base undefined type expression.\n     */\n    base: (ctx: UndefinedResolverContext) => Type;\n  };\n  schema: SchemaWithType<'undefined'>;\n}\n\nexport interface UnknownResolverContext extends BaseContext {\n  /**\n   * Nodes used to build different parts of the result.\n   */\n  nodes: {\n    /**\n     * Returns the base unknown type expression.\n     */\n    base: (ctx: UnknownResolverContext) => Type;\n  };\n  schema: SchemaWithType<'unknown'>;\n}\n\nexport interface VoidResolverContext extends BaseContext {\n  /**\n   * Nodes used to build different parts of the result.\n   */\n  nodes: {\n    /**\n     * Returns the base void type expression.\n     */\n    base: (ctx: VoidResolverContext) => Type;\n  };\n  schema: SchemaWithType<'void'>;\n}\n"
  },
  {
    "path": "packages/openapi-ts/src/plugins/@hey-api/typescript/shared/clientOptions.ts",
    "content": "import type { IR } from '@hey-api/shared';\nimport { buildSymbolIn, parseUrl } from '@hey-api/shared';\n\nimport { getTypedConfig } from '../../../../config/utils';\nimport {\n  getClientBaseUrlKey,\n  getClientPlugin,\n} from '../../../../plugins/@hey-api/client-core/utils';\nimport type { TypeTsDsl } from '../../../../ts-dsl';\nimport { $ } from '../../../../ts-dsl';\nimport type { HeyApiTypeScriptPlugin } from '../types';\n\nconst serverToBaseUrlType = ({ server }: { server: IR.ServerObject }) => {\n  const url = parseUrl(server.url);\n\n  if (url.protocol && url.host) {\n    return $.type.literal(server.url);\n  }\n\n  return $.type\n    .template()\n    .add(url.protocol || $.type('string'))\n    .add('://')\n    .add(url.host || $.type('string'))\n    .add(url.port ? `:${url.port}` : '')\n    .add(url.path || '');\n};\n\nexport const createClientOptions = ({\n  nodeIndex,\n  plugin,\n  servers,\n}: {\n  nodeIndex: number;\n  plugin: HeyApiTypeScriptPlugin['Instance'];\n  servers: ReadonlyArray<IR.ServerObject>;\n}) => {\n  const client = getClientPlugin(getTypedConfig(plugin));\n\n  const types: Array<TypeTsDsl> = servers.map((server) => serverToBaseUrlType({ server }));\n\n  if (!servers.length) {\n    types.push($.type('string'));\n  } else if (!('strictBaseUrl' in client.config && client.config.strictBaseUrl)) {\n    types.push($.type.and($.type('string'), $.type.object()));\n  }\n\n  const symbol = plugin.registerSymbol(\n    buildSymbolIn({\n      meta: {\n        category: 'type',\n        resource: 'client',\n        role: 'options',\n        tool: 'typescript',\n      },\n      name: 'ClientOptions',\n      naming: {\n        case: plugin.config.case,\n      },\n      plugin,\n    }),\n  );\n\n  const node = $.type\n    .alias(symbol)\n    .export()\n    .type(\n      $.type\n        .object()\n        .prop(getClientBaseUrlKey(getTypedConfig(plugin)), (p) => p.type($.type.or(...types))),\n    );\n  plugin.node(node, nodeIndex);\n};\n"
  },
  {
    "path": "packages/openapi-ts/src/plugins/@hey-api/typescript/shared/export.ts",
    "content": "import type { IR } from '@hey-api/shared';\nimport { buildSymbolIn, pathToName, toCase } from '@hey-api/shared';\nimport { pathToJsonPointer } from '@hey-api/shared';\n\nimport { createSchemaComment } from '../../../../plugins/shared/utils/schema';\nimport { $, regexp } from '../../../../ts-dsl';\nimport type { HeyApiTypeScriptPlugin } from '../types';\nimport type { ProcessorContext } from './processor';\nimport type { TypeScriptFinal } from './types';\n\nfunction resolveEnumKey({\n  baseName,\n  duplicateAttempt,\n  plugin,\n}: {\n  baseName: string;\n  duplicateAttempt: number;\n  plugin: HeyApiTypeScriptPlugin['Instance'];\n}): string {\n  let key = toCase(baseName, plugin.config.enums.case, {\n    stripLeadingSeparators: false,\n  });\n\n  regexp.number.lastIndex = 0;\n  if (\n    regexp.number.test(key) &&\n    plugin.config.enums.enabled &&\n    (plugin.config.enums.mode === 'typescript' || plugin.config.enums.mode === 'typescript-const')\n  ) {\n    key = `_${key}`;\n  }\n\n  if (duplicateAttempt > 0) {\n    const nameConflictResolver = plugin.context.config.output?.nameConflictResolver;\n    if (nameConflictResolver) {\n      const resolvedName = nameConflictResolver({\n        attempt: duplicateAttempt,\n        baseName: key,\n      });\n      if (resolvedName !== null) {\n        key = resolvedName;\n      } else {\n        key = `${key}${duplicateAttempt + 1}`;\n      }\n    } else {\n      key = `${key}${duplicateAttempt + 1}`;\n    }\n  }\n\n  return key;\n}\n\nfunction buildEnumExport({\n  enumData,\n  name,\n  plugin,\n  resourceId,\n  schema,\n}: {\n  enumData: TypeScriptFinal['enumData'];\n  name: string;\n  plugin: HeyApiTypeScriptPlugin['Instance'];\n  resourceId: string;\n  schema: IR.SchemaObject;\n}): boolean {\n  if (!enumData || enumData.mode === 'type') return false;\n\n  const mode = enumData.mode;\n  const items = enumData.items;\n  const duplicateCounts: Record<string, number> = {};\n\n  const itemsWithAttempts = items.map((item, index) => {\n    const candidateKey = toCase(item.key, plugin.config.enums.case, {\n      stripLeadingSeparators: false,\n    });\n\n    regexp.number.lastIndex = 0;\n    const baseKey =\n      regexp.number.test(candidateKey) &&\n      plugin.config.enums.enabled &&\n      (plugin.config.enums.mode === 'typescript' || plugin.config.enums.mode === 'typescript-const')\n        ? `_${candidateKey}`\n        : candidateKey;\n\n    const duplicateAttempt = duplicateCounts[baseKey] ?? 0;\n    duplicateCounts[baseKey] = duplicateAttempt + 1;\n\n    return {\n      duplicateAttempt,\n      index,\n      item,\n    };\n  });\n\n  if (mode === 'javascript') {\n    const filteredItems =\n      plugin.config.enums.constantsIgnoreNull && items.some((item) => item.schema.const === null)\n        ? items.filter((item) => item.schema.const !== null)\n        : items;\n\n    const symbolObject = plugin.registerSymbol(\n      buildSymbolIn({\n        meta: {\n          category: 'utility',\n          resource: 'definition',\n          resourceId,\n          tool: 'typescript',\n        },\n        name,\n        naming: plugin.config.definitions,\n        plugin,\n        schema,\n      }),\n    );\n\n    const objectNode = $.const(symbolObject)\n      .export()\n      .$if(plugin.config.comments && createSchemaComment(schema), (c, v) => c.doc(v))\n      .assign(\n        $.object(\n          ...itemsWithAttempts\n            .filter(({ item }) => filteredItems.includes(item))\n            .map(({ duplicateAttempt, item }) =>\n              $.prop({\n                kind: 'prop' as const,\n                name: resolveEnumKey({ baseName: item.key, duplicateAttempt, plugin }),\n              })\n                .$if(plugin.config.comments && createSchemaComment(item.schema), (p, v) => p.doc(v))\n                .value($.fromValue(item.schema.const)),\n            ),\n        ).as('const'),\n      );\n    plugin.node(objectNode);\n\n    const symbol = plugin.registerSymbol(\n      buildSymbolIn({\n        meta: {\n          category: 'type',\n          resource: 'definition',\n          resourceId,\n          tool: 'typescript',\n        },\n        name,\n        naming: plugin.config.definitions,\n        plugin,\n        schema,\n      }),\n    );\n    const node = $.type\n      .alias(symbol)\n      .export()\n      .$if(plugin.config.comments && createSchemaComment(schema), (t, v) => t.doc(v))\n      .type($.type(symbolObject).idx($.type(symbolObject).typeofType().keyof()).typeofType());\n    plugin.node(node);\n    return true;\n  }\n\n  if (mode === 'typescript' || mode === 'typescript-const') {\n    const hasInvalidTypes = items.some(\n      (item) => typeof item.schema.const !== 'number' && typeof item.schema.const !== 'string',\n    );\n    if (hasInvalidTypes) return false;\n\n    const symbol = plugin.registerSymbol(\n      buildSymbolIn({\n        meta: {\n          category: 'type',\n          resource: 'definition',\n          resourceId,\n          tool: 'typescript',\n        },\n        name,\n        naming: plugin.config.definitions,\n        plugin,\n        schema,\n      }),\n    );\n    const enumNode = $.enum(symbol)\n      .export()\n      .$if(plugin.config.comments && createSchemaComment(schema), (e, v) => e.doc(v))\n      .const(mode === 'typescript-const')\n      .members(\n        ...itemsWithAttempts.map(({ duplicateAttempt, item }) =>\n          $.member(resolveEnumKey({ baseName: item.key, duplicateAttempt, plugin }))\n            .$if(plugin.config.comments && createSchemaComment(item.schema), (m, v) => m.doc(v))\n            .value($.fromValue(item.schema.const)),\n        ),\n      );\n    plugin.node(enumNode);\n    return true;\n  }\n\n  return false;\n}\n\nexport function exportAst({\n  final,\n  meta,\n  naming,\n  namingAnchor,\n  path,\n  plugin,\n  schema,\n  tags,\n}: ProcessorContext & {\n  final: TypeScriptFinal;\n}): void {\n  const $ref = meta.resourceId || pathToJsonPointer(path);\n  const name = pathToName(path, { anchor: namingAnchor });\n\n  const hasEnumExport = buildEnumExport({\n    enumData: final.enumData,\n    name,\n    plugin,\n    resourceId: $ref,\n    schema,\n  });\n\n  // If enum declaration/const object has been emitted, do not emit fallback type alias.\n  if (hasEnumExport) {\n    return;\n  }\n\n  const symbol = plugin.registerSymbol(\n    buildSymbolIn({\n      meta: {\n        category: 'type',\n        path,\n        resource: 'definition',\n        resourceId: $ref,\n        tags,\n        tool: 'typescript',\n      },\n      name,\n      naming,\n      plugin,\n      schema,\n    }),\n  );\n\n  const node = $.type\n    .alias(symbol)\n    .export()\n    .$if(plugin.config.comments && createSchemaComment(schema), (t, v) => t.doc(v))\n    .type(final.type);\n  plugin.node(node);\n}\n"
  },
  {
    "path": "packages/openapi-ts/src/plugins/@hey-api/typescript/shared/meta.ts",
    "content": "import type { IR } from '@hey-api/shared';\n\nimport type { TypeScriptMeta, TypeScriptResult } from './types';\n\n/**\n * Creates default metadata from a schema.\n */\nexport function defaultMeta(schema: IR.SchemaObject): TypeScriptMeta {\n  return {\n    default: schema.default,\n    readonly: schema.accessScope === 'read',\n  };\n}\n\n/**\n * Composes metadata from child results.\n *\n * @param children - Results from walking child schemas\n * @param overrides - Explicit overrides (e.g., from parent schema)\n */\nexport function composeMeta(\n  children: ReadonlyArray<TypeScriptResult>,\n  overrides?: Partial<TypeScriptMeta>,\n): TypeScriptMeta {\n  return {\n    default: overrides?.default,\n    readonly: overrides?.readonly ?? children.some((c) => c.meta.readonly),\n  };\n}\n\n/**\n * Merges parent schema metadata with composed child metadata.\n *\n * @param parent - The parent schema\n * @param children - Results from walking child schemas\n */\nexport function inheritMeta(\n  parent: IR.SchemaObject,\n  children: ReadonlyArray<TypeScriptResult>,\n): TypeScriptMeta {\n  return composeMeta(children, {\n    default: parent.default,\n    readonly: parent.accessScope === 'read',\n  });\n}\n"
  },
  {
    "path": "packages/openapi-ts/src/plugins/@hey-api/typescript/shared/operation.ts",
    "content": "import type { IR } from '@hey-api/shared';\nimport { buildSymbolIn, deduplicateSchema, operationResponsesMap } from '@hey-api/shared';\n\nimport { $ } from '../../../../ts-dsl';\nimport type { HeyApiTypeScriptPlugin } from '../types';\nimport { createProcessor } from '../v1/processor';\n\nconst irParametersToIrSchema = ({\n  parameters,\n}: {\n  parameters: Record<string, IR.ParameterObject>;\n}): IR.SchemaObject => {\n  const irSchema: IR.SchemaObject = {\n    type: 'object',\n  };\n\n  if (parameters) {\n    const properties: Record<string, IR.SchemaObject> = {};\n    const required: Array<string> = [];\n\n    for (const key in parameters) {\n      const parameter = parameters[key]!;\n\n      properties[parameter.name] = deduplicateSchema({\n        detectFormat: false,\n        schema: parameter.schema,\n      });\n\n      if (parameter.required) {\n        required.push(parameter.name);\n      }\n    }\n\n    irSchema.properties = properties;\n\n    if (required.length) {\n      irSchema.required = required;\n    }\n  }\n\n  return irSchema;\n};\n\nexport const operationToType = ({\n  operation,\n  path,\n  plugin,\n  tags,\n}: {\n  operation: IR.OperationObject;\n  path: ReadonlyArray<string | number>;\n  plugin: HeyApiTypeScriptPlugin['Instance'];\n  tags?: ReadonlyArray<string>;\n}): void => {\n  const processor = createProcessor(plugin);\n\n  const data: IR.SchemaObject = {\n    properties: {\n      body: operation.body?.schema ?? { type: 'never' },\n      ...(operation.parameters?.header\n        ? {\n            headers: irParametersToIrSchema({\n              parameters: operation.parameters.header,\n            }),\n          }\n        : {}),\n      path: operation.parameters?.path\n        ? irParametersToIrSchema({ parameters: operation.parameters.path })\n        : { type: 'never' },\n      query: operation.parameters?.query\n        ? irParametersToIrSchema({ parameters: operation.parameters.query })\n        : { type: 'never' },\n      url: {\n        const: operation.path,\n        type: 'string',\n      },\n    },\n    type: 'object',\n  };\n\n  const dataRequired: Array<string> = [];\n\n  if (operation.body?.required) {\n    dataRequired.push('body');\n  }\n\n  // do not set headers to never so we can always pass arbitrary values\n  if (data.properties!.headers?.required) {\n    dataRequired.push('headers');\n  }\n\n  if (data.properties!.path!.required) {\n    dataRequired.push('path');\n  }\n\n  if (data.properties!.query!.required) {\n    dataRequired.push('query');\n  }\n\n  dataRequired.push('url');\n\n  if (dataRequired.length > 0) {\n    data.required = dataRequired;\n  }\n\n  const dataResult = processor.process({\n    export: false,\n    meta: {\n      resource: 'operation',\n      resourceId: operation.id,\n    },\n    naming: plugin.config.definitions,\n    path: [...path, operation.id, 'data'],\n    plugin,\n    schema: data,\n  });\n\n  const dataSymbol = plugin.registerSymbol(\n    buildSymbolIn({\n      meta: {\n        category: 'type',\n        path,\n        resource: 'operation',\n        resourceId: operation.id,\n        role: 'data',\n        tags,\n        tool: 'typescript',\n      },\n      name: operation.id,\n      naming: plugin.config.requests,\n      operation,\n      plugin,\n    }),\n  );\n  const dataNode = $.type\n    .alias(dataSymbol)\n    .export()\n    .type(dataResult?.type ?? $.type('never'));\n  plugin.node(dataNode);\n\n  const { error, errors, response, responses } = operationResponsesMap(operation);\n\n  if (errors) {\n    const errorsResult = processor.process({\n      export: false,\n      meta: {\n        resource: 'operation',\n        resourceId: operation.id,\n      },\n      naming: plugin.config.definitions,\n      path: [...path, operation.id, 'errors'],\n      plugin,\n      schema: errors,\n    });\n\n    const errorsSymbol = plugin.registerSymbol(\n      buildSymbolIn({\n        meta: {\n          category: 'type',\n          path,\n          resource: 'operation',\n          resourceId: operation.id,\n          role: 'errors',\n          tags,\n          tool: 'typescript',\n        },\n        name: operation.id,\n        naming: plugin.config.errors,\n        operation,\n        plugin,\n      }),\n    );\n    const errorsNode = $.type\n      .alias(errorsSymbol)\n      .export()\n      .type(errorsResult?.type ?? $.type('never'));\n    plugin.node(errorsNode);\n\n    if (error) {\n      const errorSymbol = plugin.registerSymbol(\n        buildSymbolIn({\n          meta: {\n            category: 'type',\n            path,\n            resource: 'operation',\n            resourceId: operation.id,\n            role: 'error',\n            tags,\n            tool: 'typescript',\n          },\n          name: operation.id,\n          naming: {\n            case: plugin.config.errors.case,\n            name: plugin.config.errors.error,\n          },\n          operation,\n          plugin,\n        }),\n      );\n      const errorNode = $.type\n        .alias(errorSymbol)\n        .export()\n        .type($.type(errorsSymbol).idx($.type(errorsSymbol).keyof()));\n      plugin.node(errorNode);\n    }\n  }\n\n  if (responses) {\n    const responsesResult = processor.process({\n      export: false,\n      meta: {\n        resource: 'operation',\n        resourceId: operation.id,\n      },\n      naming: plugin.config.definitions,\n      path: [...path, operation.id, 'responses'],\n      plugin,\n      schema: responses,\n    });\n\n    const responsesSymbol = plugin.registerSymbol(\n      buildSymbolIn({\n        meta: {\n          category: 'type',\n          path,\n          resource: 'operation',\n          resourceId: operation.id,\n          role: 'responses',\n          tags,\n          tool: 'typescript',\n        },\n        name: operation.id,\n        naming: plugin.config.responses,\n        operation,\n        plugin,\n      }),\n    );\n    const responsesNode = $.type\n      .alias(responsesSymbol)\n      .export()\n      .type(responsesResult?.type ?? $.type('never'));\n    plugin.node(responsesNode);\n\n    if (response) {\n      const responseSymbol = plugin.registerSymbol(\n        buildSymbolIn({\n          meta: {\n            category: 'type',\n            path,\n            resource: 'operation',\n            resourceId: operation.id,\n            role: 'response',\n            tags,\n            tool: 'typescript',\n          },\n          name: operation.id,\n          naming: {\n            case: plugin.config.responses.case,\n            name: plugin.config.responses.response,\n          },\n          operation,\n          plugin,\n        }),\n      );\n      const responseNode = $.type\n        .alias(responseSymbol)\n        .export()\n        .type($.type(responsesSymbol).idx($.type(responsesSymbol).keyof()));\n      plugin.node(responseNode);\n    }\n  }\n};\n"
  },
  {
    "path": "packages/openapi-ts/src/plugins/@hey-api/typescript/shared/processor.ts",
    "content": "import type { IR, NamingConfig, SchemaProcessorContext } from '@hey-api/shared';\n\nimport type { HeyApiTypeScriptPlugin } from '../types';\nimport type { TypeScriptFinal } from './types';\n\nexport type ProcessorContext = SchemaProcessorContext & {\n  /** Whether to export the result (default: true) */\n  export?: boolean;\n  naming: NamingConfig;\n  /** The plugin instance. */\n  plugin: HeyApiTypeScriptPlugin['Instance'];\n  schema: IR.SchemaObject;\n};\n\nexport type ProcessorResult = {\n  process: (ctx: ProcessorContext) => TypeScriptFinal | void;\n};\n"
  },
  {
    "path": "packages/openapi-ts/src/plugins/@hey-api/typescript/shared/types.ts",
    "content": "import type { IR } from '@hey-api/shared';\n\nimport type { MaybeTsDsl, TypeTsDsl } from '../../../../ts-dsl';\n\nexport type Type = MaybeTsDsl<TypeTsDsl>;\n\n/**\n * Metadata that flows through schema walking.\n */\nexport interface TypeScriptMeta {\n  /** Default value from schema. */\n  default?: unknown;\n  /** Is this schema read-only? */\n  readonly: boolean;\n}\n\nexport interface TypeScriptEnumData {\n  items: Array<{ key: string; schema: IR.SchemaObject }>;\n  mode: 'javascript' | 'typescript' | 'typescript-const' | 'type';\n}\n\n/**\n * Result from walking a schema node.\n */\nexport interface TypeScriptResult {\n  enumData?: TypeScriptEnumData;\n  meta: TypeScriptMeta;\n  type: Type;\n}\n\n/**\n * Finalized result after applyModifiers.\n */\n// eslint-disable-next-line @typescript-eslint/no-empty-object-type\nexport interface TypeScriptFinal extends Pick<TypeScriptResult, 'enumData' | 'type'> {}\n"
  },
  {
    "path": "packages/openapi-ts/src/plugins/@hey-api/typescript/shared/webhook.ts",
    "content": "import type { Symbol } from '@hey-api/codegen-core';\nimport type { IR } from '@hey-api/shared';\nimport { buildSymbolIn } from '@hey-api/shared';\n\nimport { createSchemaComment } from '../../../../plugins/shared/utils/schema';\nimport { $ } from '../../../../ts-dsl';\nimport type { HeyApiTypeScriptPlugin } from '../types';\nimport { createProcessor } from '../v1/processor';\n\nexport function webhookToType({\n  operation,\n  path,\n  plugin,\n  tags,\n}: {\n  operation: IR.OperationObject;\n  path: ReadonlyArray<string | number>;\n  plugin: HeyApiTypeScriptPlugin['Instance'];\n  tags?: ReadonlyArray<string>;\n}): Symbol {\n  const processor = createProcessor(plugin);\n  let symbolWebhookPayload: Symbol | undefined;\n\n  if (operation.body) {\n    symbolWebhookPayload = plugin.registerSymbol(\n      buildSymbolIn({\n        meta: {\n          category: 'type',\n          path,\n          resource: 'webhook',\n          resourceId: operation.id,\n          role: 'payload',\n          tags,\n          tool: 'typescript',\n        },\n        name: operation.id,\n        naming: {\n          case: plugin.config.webhooks.case,\n          name: plugin.config.webhooks.payload,\n        },\n        operation,\n        plugin,\n      }),\n    );\n\n    const payloadResult = processor.process({\n      export: false,\n      meta: {\n        resource: 'webhook',\n        resourceId: operation.id,\n      },\n      naming: plugin.config.definitions,\n      path: [...path, operation.id, 'payload'],\n      plugin,\n      schema: operation.body.schema,\n    });\n\n    const payloadNode = $.type\n      .alias(symbolWebhookPayload)\n      .export()\n      .$if(plugin.config.comments && createSchemaComment(operation.body.schema), (t, v) => t.doc(v))\n      .type(payloadResult?.type ?? $.type('never'));\n    plugin.node(payloadNode);\n  }\n\n  const requestType = $.type\n    .object()\n    .prop('body', (p) =>\n      p\n        .required(Boolean(symbolWebhookPayload))\n        .type(symbolWebhookPayload ? $.type(symbolWebhookPayload) : $.type('never')),\n    )\n    .prop('key', (p) => p.required(true).type($.type.literal(operation.path)))\n    .prop('path', (p) => p.required(false).type($.type('never')))\n    .prop('query', (p) => p.required(false).type($.type('never')));\n\n  const symbol = plugin.registerSymbol(\n    buildSymbolIn({\n      meta: {\n        category: 'type',\n        path,\n        resource: 'webhook',\n        resourceId: operation.id,\n        role: 'data',\n        tags,\n        tool: 'typescript',\n      },\n      name: operation.id,\n      naming: plugin.config.webhooks,\n      operation,\n      plugin,\n    }),\n  );\n\n  const node = $.type.alias(symbol).export().type(requestType);\n  plugin.node(node);\n\n  return symbol;\n}\n"
  },
  {
    "path": "packages/openapi-ts/src/plugins/@hey-api/typescript/types.ts",
    "content": "import type { Casing, FeatureToggle, NameTransformer, NamingOptions } from '@hey-api/shared';\nimport type { DefinePlugin, Plugin } from '@hey-api/shared';\n\nimport type { IApi } from './api';\nimport type { HeyApiTypeScriptResolvers } from './resolvers';\n\nexport type EnumsType = 'javascript' | 'typescript' | 'typescript-const';\n\nexport type UserConfig = Plugin.Name<'@hey-api/typescript'> &\n  Plugin.Hooks &\n  Plugin.UserComments &\n  Plugin.UserExports &\n  HeyApiTypeScriptResolvers & {\n    /**\n     * Casing convention for generated names.\n     *\n     * @default 'PascalCase'\n     */\n    case?: Exclude<Casing, 'SCREAMING_SNAKE_CASE'>;\n    /**\n     * Configuration for reusable schema definitions.\n     *\n     * Controls generation of shared types that can be referenced across\n     * requests and responses.\n     *\n     * Can be:\n     * - `string` or `function`: Shorthand for `{ name: string | function }`\n     * - `object`: Full configuration object\n     *\n     * @default '{{name}}'\n     */\n    definitions?:\n      | NameTransformer\n      | {\n          /**\n           * Casing convention for generated names.\n           *\n           * @default 'PascalCase'\n           */\n          case?: Casing;\n          /**\n           * Naming pattern for generated names.\n           *\n           * @default '{{name}}'\n           */\n          name?: NameTransformer;\n        };\n    /**\n     * By default, enums are emitted as types to preserve runtime-free output.\n     *\n     * However, you may want to generate enums as JavaScript objects or\n     * TypeScript enums for runtime usage, interoperability, or integration with\n     * other tools.\n     *\n     * @default false\n     */\n    enums?:\n      | boolean\n      | EnumsType\n      | {\n          /**\n           * Casing convention for generated names.\n           *\n           * @default 'SCREAMING_SNAKE_CASE'\n           */\n          case?: Casing;\n          /**\n           * When generating enums as JavaScript objects, they'll contain a null\n           * value if they're nullable. This might be undesirable if you want to do\n           * `Object.values(Foo)` and have all values be of the same type.\n           *\n           * This setting is disabled by default to preserve the source schemas.\n           *\n           * @default false\n           */\n          constantsIgnoreNull?: boolean;\n          /**\n           * Whether this feature is enabled.\n           *\n           * @default true\n           */\n          enabled?: boolean;\n          /**\n           * Specifies the output mode for generated enums.\n           *\n           * Can be:\n           * - `javascript`: Generates JavaScript objects\n           * - `typescript`: Generates TypeScript enums\n           * - `typescript-const`: Generates TypeScript const enums\n           *\n           * @default 'javascript'\n           */\n          mode?: EnumsType;\n        };\n    /**\n     * Configuration for error-specific types.\n     *\n     * Controls generation of types for error response bodies and status codes.\n     *\n     * Can be:\n     * - `string` or `function`: Shorthand for `{ name: string | function }`\n     * - `object`: Full configuration object\n     *\n     * @default '{{name}}Errors'\n     */\n    errors?:\n      | NameTransformer\n      | {\n          /**\n           * Casing convention for generated names.\n           *\n           * @default 'PascalCase'\n           */\n          case?: Casing;\n          /**\n           * Naming pattern for generated names.\n           *\n           * @default '{{name}}Error'\n           */\n          error?: NameTransformer;\n          /**\n           * Naming pattern for generated names.\n           *\n           * @default '{{name}}Errors'\n           */\n          name?: NameTransformer;\n        };\n    /**\n     * Configuration for request-specific types.\n     *\n     * Controls generation of types for request bodies, query parameters, path\n     * parameters, and headers.\n     *\n     * Can be:\n     * - `string` or `function`: Shorthand for `{ name: string | function }`\n     * - `object`: Full configuration object\n     *\n     * @default '{{name}}Data'\n     */\n    requests?:\n      | NameTransformer\n      | {\n          /**\n           * Casing convention for generated names.\n           *\n           * @default 'PascalCase'\n           */\n          case?: Casing;\n          /**\n           * Naming pattern for generated names.\n           *\n           * @default '{{name}}Data'\n           */\n          name?: NameTransformer;\n        };\n    /**\n     * Configuration for response-specific types.\n     *\n     * Controls generation of types for response bodies and status codes.\n     *\n     * Can be:\n     * - `string` or `function`: Shorthand for `{ name: string | function }`\n     * - `object`: Full configuration object\n     *\n     * @default '{{name}}Responses'\n     */\n    responses?:\n      | NameTransformer\n      | {\n          /**\n           * Casing convention for generated names.\n           *\n           * @default 'PascalCase'\n           */\n          case?: Casing;\n          /**\n           * Naming pattern for generated names.\n           *\n           * @default '{{name}}Responses'\n           */\n          name?: NameTransformer;\n          /**\n           * Naming pattern for generated names.\n           *\n           * @default '{{name}}Response'\n           */\n          response?: NameTransformer;\n        };\n    /**\n     * The top type to use for untyped or unspecified schema values.\n     *\n     * Can be:\n     * - `unknown` (default): safe top type, you must narrow before use\n     * - `any`: disables type checking, can be used anywhere\n     *\n     * @default 'unknown'\n     */\n    topType?: 'any' | 'unknown';\n    /**\n     * Configuration for webhook-specific types.\n     *\n     * Controls generation of types for webhook payloads and webhook requests.\n     *\n     * Can be:\n     * - `string` or `function`: Shorthand for `{ name: string | function }`\n     * - `object`: Full configuration object\n     *\n     * @default '{{name}}WebhookRequest'\n     */\n    webhooks?:\n      | NameTransformer\n      | {\n          /**\n           * Casing convention for generated names.\n           *\n           * @default 'PascalCase'\n           */\n          case?: Casing;\n          /**\n           * Naming pattern for generated names.\n           *\n           * @default '{{name}}WebhookRequest'\n           */\n          name?: NameTransformer;\n          /**\n           * Naming pattern for generated names.\n           *\n           * @default '{{name}}WebhookPayload'\n           */\n          payload?: NameTransformer;\n        };\n  };\n\nexport type Config = Plugin.Name<'@hey-api/typescript'> &\n  Plugin.Hooks &\n  Plugin.Comments &\n  Plugin.Exports &\n  HeyApiTypeScriptResolvers & {\n    /**\n     * Casing convention for generated names.\n     */\n    case: Exclude<Casing, 'SCREAMING_SNAKE_CASE'>;\n    /**\n     * Configuration for reusable schema definitions.\n     *\n     * Controls generation of shared types that can be referenced across\n     * requests and responses.\n     */\n    definitions: NamingOptions;\n    /**\n     * By default, enums are emitted as types to preserve runtime-free output.\n     *\n     * However, you may want to generate enums as JavaScript objects or\n     * TypeScript enums for runtime usage, interoperability, or integration with\n     * other tools.\n     */\n    enums: FeatureToggle & {\n      /**\n       * Casing convention for generated names.\n       */\n      case: Casing;\n      /**\n       * When generating enums as JavaScript objects, they'll contain a null\n       * value if they're nullable. This might be undesirable if you want to do\n       * `Object.values(Foo)` and have all values be of the same type.\n       *\n       * This setting is disabled by default to preserve the source schemas.\n       *\n       * @default false\n       */\n      constantsIgnoreNull: boolean;\n      /**\n       * Specifies the output mode for generated enums.\n       *\n       * Can be:\n       * - `javascript`: Generates JavaScript objects\n       * - `typescript`: Generates TypeScript enums\n       * - `typescript-const`: Generates TypeScript const enums\n       *\n       * @default 'javascript'\n       */\n      mode: EnumsType;\n    };\n    /**\n     * Configuration for error-specific types.\n     *\n     * Controls generation of types for error response bodies and status codes.\n     *\n     * Can be:\n     * - `string` or `function`: Shorthand for `{ name: string | function }`\n     * - `object`: Full configuration object\n     */\n    errors: NamingOptions & {\n      /**\n       * Naming pattern for generated names.\n       */\n      error: NameTransformer;\n    };\n    /**\n     * Configuration for request-specific types.\n     *\n     * Controls generation of types for request bodies, query parameters, path\n     * parameters, and headers.\n     */\n    requests: NamingOptions;\n    /**\n     * Configuration for response-specific types.\n     *\n     * Controls generation of types for response bodies and status codes.\n     */\n    responses: NamingOptions & {\n      /**\n       * Naming pattern for generated names.\n       */\n      response: NameTransformer;\n    };\n    /**\n     * The top type to use for untyped or unspecified schema values.\n     *\n     * @default 'unknown'\n     */\n    topType: 'any' | 'unknown';\n    /**\n     * Configuration for webhook-specific types.\n     *\n     * Controls generation of types for webhook payloads and webhook requests.\n     */\n    webhooks: NamingOptions & {\n      /**\n       * Naming pattern for generated names.\n       */\n      payload: NameTransformer;\n    };\n  };\n\nexport type HeyApiTypeScriptPlugin = DefinePlugin<UserConfig, Config, IApi>;\n"
  },
  {
    "path": "packages/openapi-ts/src/plugins/@hey-api/typescript/v1/plugin.ts",
    "content": "import type { Symbol } from '@hey-api/codegen-core';\nimport type { IR } from '@hey-api/shared';\nimport { buildSymbolIn, pathToJsonPointer } from '@hey-api/shared';\n\nimport { $ } from '../../../../ts-dsl';\nimport { createClientOptions } from '../shared/clientOptions';\nimport { operationToType } from '../shared/operation';\nimport { webhookToType } from '../shared/webhook';\nimport type { HeyApiTypeScriptPlugin } from '../types';\nimport { createProcessor } from './processor';\n\nexport const handlerV1: HeyApiTypeScriptPlugin['Handler'] = ({ plugin }) => {\n  const nodeClientIndex = plugin.node(null);\n  const nodeWebhooksIndex = plugin.node(null);\n\n  const servers: Array<IR.ServerObject> = [];\n  const webhooks: Array<Symbol> = [];\n\n  const processor = createProcessor(plugin);\n\n  plugin.forEach(\n    'operation',\n    'parameter',\n    'requestBody',\n    'schema',\n    'server',\n    'webhook',\n    (event) => {\n      switch (event.type) {\n        case 'operation':\n          operationToType({\n            operation: event.operation,\n            path: event._path,\n            plugin,\n            tags: event.tags,\n          });\n          break;\n        case 'parameter':\n          processor.process({\n            meta: {\n              resource: 'definition',\n              resourceId: pathToJsonPointer(event._path),\n            },\n            naming: plugin.config.definitions,\n            path: event._path,\n            plugin,\n            schema: event.parameter.schema,\n            tags: event.tags,\n          });\n          break;\n        case 'requestBody':\n          processor.process({\n            meta: {\n              resource: 'definition',\n              resourceId: pathToJsonPointer(event._path),\n            },\n            naming: plugin.config.definitions,\n            path: event._path,\n            plugin,\n            schema: event.requestBody.schema,\n            tags: event.tags,\n          });\n          break;\n        case 'schema':\n          processor.process({\n            meta: {\n              resource: 'definition',\n              resourceId: pathToJsonPointer(event._path),\n            },\n            naming: plugin.config.definitions,\n            path: event._path,\n            plugin,\n            schema: event.schema,\n            tags: event.tags,\n          });\n          break;\n        case 'server':\n          servers.push(event.server);\n          break;\n        case 'webhook':\n          webhooks.push(\n            webhookToType({\n              operation: event.operation,\n              path: event._path,\n              plugin,\n              tags: event.tags,\n            }),\n          );\n          break;\n      }\n    },\n    {\n      order: 'declarations',\n    },\n  );\n\n  createClientOptions({ nodeIndex: nodeClientIndex, plugin, servers });\n\n  if (webhooks.length > 0) {\n    const symbol = plugin.registerSymbol(\n      buildSymbolIn({\n        meta: {\n          category: 'type',\n          resource: 'webhook',\n          tool: 'typescript',\n          variant: 'container',\n        },\n        name: 'Webhooks',\n        naming: {\n          case: plugin.config.case,\n        },\n        plugin,\n      }),\n    );\n    const node = $.type\n      .alias(symbol)\n      .export()\n      .type($.type.or(...webhooks));\n    plugin.node(node, nodeWebhooksIndex);\n  }\n};\n"
  },
  {
    "path": "packages/openapi-ts/src/plugins/@hey-api/typescript/v1/processor.ts",
    "content": "import { ref } from '@hey-api/codegen-core';\nimport type { Hooks, IR } from '@hey-api/shared';\nimport { createSchemaProcessor, createSchemaWalker, pathToJsonPointer } from '@hey-api/shared';\n\nimport { exportAst } from '../shared/export';\nimport type { ProcessorContext, ProcessorResult } from '../shared/processor';\nimport type { TypeScriptFinal } from '../shared/types';\nimport type { HeyApiTypeScriptPlugin } from '../types';\nimport { createVisitor } from './walker';\n\nexport function createProcessor(plugin: HeyApiTypeScriptPlugin['Instance']): ProcessorResult {\n  const processor = createSchemaProcessor();\n\n  const extractorHooks: ReadonlyArray<NonNullable<Hooks['schemas']>['shouldExtract']> = [\n    plugin.config['~hooks']?.schemas?.shouldExtract,\n    plugin.context.config.parser.hooks.schemas?.shouldExtract,\n  ];\n\n  function extractor(ctx: ProcessorContext): IR.SchemaObject {\n    if (processor.hasEmitted(ctx.path)) {\n      return ctx.schema;\n    }\n\n    for (const hook of extractorHooks) {\n      const result = hook?.(ctx);\n      if (result) {\n        process({\n          namingAnchor: processor.context.anchor,\n          tags: processor.context.tags,\n          ...ctx,\n        });\n        return { $ref: pathToJsonPointer(ctx.path) };\n      }\n    }\n\n    return ctx.schema;\n  }\n\n  function process(ctx: ProcessorContext): TypeScriptFinal | void {\n    if (!processor.markEmitted(ctx.path)) return;\n\n    const shouldExport = ctx.export !== false;\n\n    return processor.withContext({ anchor: ctx.namingAnchor, tags: ctx.tags }, () => {\n      const visitor = createVisitor({ schemaExtractor: extractor });\n      const walk = createSchemaWalker(visitor);\n\n      const result = walk(ctx.schema, {\n        path: ref(ctx.path),\n        plugin,\n      });\n\n      const final = visitor.applyModifiers(result, {\n        path: ref(ctx.path),\n        plugin,\n      }) as TypeScriptFinal;\n\n      if (shouldExport) {\n        exportAst({ ...ctx, final, plugin });\n        return;\n      }\n\n      return final;\n    });\n  }\n\n  return { process };\n}\n"
  },
  {
    "path": "packages/openapi-ts/src/plugins/@hey-api/typescript/v1/toAst/array.ts",
    "content": "import { ref } from '@hey-api/codegen-core';\nimport type { SchemaVisitorContext, SchemaWithType, Walker } from '@hey-api/shared';\nimport { deduplicateSchema } from '@hey-api/shared';\n\nimport { $ } from '../../../../../ts-dsl';\nimport type { ArrayResolverContext } from '../../resolvers';\nimport type { Type, TypeScriptResult } from '../../shared/types';\nimport type { HeyApiTypeScriptPlugin } from '../../types';\n\nfunction baseNode(ctx: ArrayResolverContext): Type {\n  const { plugin, schema, walk } = ctx;\n\n  if (!schema.items) {\n    return $.type('Array').generic($.type(plugin.config.topType));\n  }\n\n  const dedupedSchema = deduplicateSchema({ detectFormat: true, schema });\n  if (!dedupedSchema.items) {\n    return $.type('Array').generic($.type(plugin.config.topType));\n  }\n\n  const itemResults: Array<TypeScriptResult> = dedupedSchema.items.map((item) =>\n    walk(item, {\n      path: ref([]),\n      plugin,\n    }),\n  );\n  if (itemResults.length === 1) {\n    return $.type('Array').generic(itemResults[0]!.type);\n  }\n\n  return dedupedSchema.logicalOperator === 'and'\n    ? $.type('Array').generic($.type.and(...itemResults.map((r) => r.type)))\n    : $.type('Array').generic($.type.or(...itemResults.map((r) => r.type)));\n}\n\nfunction arrayResolver(ctx: ArrayResolverContext): Type {\n  return ctx.nodes.base(ctx);\n}\n\nexport function arrayToAst({\n  plugin,\n  schema,\n  walk,\n  walkerCtx,\n}: {\n  plugin: HeyApiTypeScriptPlugin['Instance'];\n  schema: SchemaWithType<'array'>;\n  walk: Walker<TypeScriptResult, HeyApiTypeScriptPlugin['Instance']>;\n  walkerCtx: SchemaVisitorContext<HeyApiTypeScriptPlugin['Instance']>;\n}): Type {\n  const ctx: ArrayResolverContext = {\n    $,\n    nodes: {\n      base: baseNode,\n    },\n    plugin,\n    schema,\n    walk,\n    walkerCtx,\n  };\n\n  const resolver = plugin.config['~resolvers']?.array;\n  const result = resolver?.(ctx);\n  return result ?? arrayResolver(ctx);\n}\n"
  },
  {
    "path": "packages/openapi-ts/src/plugins/@hey-api/typescript/v1/toAst/boolean.ts",
    "content": "import type { SchemaWithType } from '@hey-api/shared';\n\nimport { $ } from '../../../../../ts-dsl';\nimport type { BooleanResolverContext } from '../../resolvers';\nimport type { Type } from '../../shared/types';\nimport type { HeyApiTypeScriptPlugin } from '../../types';\n\nfunction baseNode(): Type {\n  return $.type('boolean');\n}\n\nfunction constNode(ctx: BooleanResolverContext): Type | undefined {\n  const { schema } = ctx;\n  if (schema.const !== undefined) {\n    return $.type.fromValue(schema.const);\n  }\n}\n\nfunction booleanResolver(ctx: BooleanResolverContext): Type {\n  const constResult = ctx.nodes.const(ctx);\n  if (constResult) return constResult;\n\n  return ctx.nodes.base(ctx);\n}\n\nexport function booleanToAst({\n  plugin,\n  schema,\n}: {\n  plugin: HeyApiTypeScriptPlugin['Instance'];\n  schema: SchemaWithType<'boolean'>;\n}): Type {\n  const ctx: BooleanResolverContext = {\n    $,\n    nodes: {\n      base: baseNode,\n      const: constNode,\n    },\n    plugin,\n    schema,\n  };\n\n  const resolver = plugin.config['~resolvers']?.boolean;\n  const result = resolver?.(ctx);\n  return result ?? booleanResolver(ctx);\n}\n"
  },
  {
    "path": "packages/openapi-ts/src/plugins/@hey-api/typescript/v1/toAst/enum.ts",
    "content": "import type { SchemaWithType } from '@hey-api/shared';\n\nimport { $ } from '../../../../../ts-dsl';\nimport type { EnumResolverContext } from '../../resolvers';\nimport type { Type } from '../../shared/types';\nimport type { TypeScriptEnumData } from '../../shared/types';\nimport type { HeyApiTypeScriptPlugin } from '../../types';\n\nfunction buildEnumData(\n  plugin: HeyApiTypeScriptPlugin['Instance'],\n  schema: SchemaWithType<'enum'>,\n): TypeScriptEnumData | undefined {\n  if (!plugin.config.enums.enabled) {\n    return;\n  }\n\n  const items = schema.items ?? [];\n  const mode = plugin.config.enums.mode;\n\n  return {\n    items: items.map((item, index) => {\n      let key: string;\n      if (item.title) {\n        key = item.title;\n      } else if (typeof item.const === 'number' || typeof item.const === 'string') {\n        key = `${item.const}`;\n      } else if (typeof item.const === 'boolean') {\n        key = item.const ? 'true' : 'false';\n      } else if (item.const === null) {\n        key = 'null';\n      } else {\n        key = `${index}`;\n      }\n      return { key, schema: item };\n    }),\n    mode,\n  };\n}\n\nfunction itemsNode(ctx: EnumResolverContext): ReturnType<EnumResolverContext['nodes']['items']> {\n  const { schema } = ctx;\n  const items = schema.items ?? [];\n\n  const enumMembers: Array<ReturnType<typeof $.type.literal>> = [];\n  let isNullable = false;\n\n  for (const item of items) {\n    if (item.type === 'string' && typeof item.const === 'string') {\n      enumMembers.push($.type.literal(item.const));\n    } else if (item.type === 'number' && typeof item.const === 'number') {\n      enumMembers.push($.type.literal(item.const));\n    } else if (item.type === 'boolean' && typeof item.const === 'boolean') {\n      enumMembers.push($.type.literal(item.const));\n    } else if (item.type === 'null' || item.const === null) {\n      isNullable = true;\n    }\n  }\n\n  return { enumMembers, isNullable };\n}\n\nfunction baseNode(ctx: EnumResolverContext): Type {\n  const { schema } = ctx;\n  const items = schema.items ?? [];\n\n  if (items.length === 0) {\n    return $.type('never');\n  }\n\n  const literalTypes = items\n    .filter((item) => item.const !== undefined)\n    .map((item) => $.type.fromValue(item.const));\n  return literalTypes.length > 0 ? $.type.or(...literalTypes) : $.type('string');\n}\n\nfunction enumResolver(ctx: EnumResolverContext): Type {\n  return ctx.nodes.base(ctx);\n}\n\nexport function enumToAst({\n  plugin,\n  schema,\n}: {\n  plugin: HeyApiTypeScriptPlugin['Instance'];\n  schema: SchemaWithType<'enum'>;\n}): {\n  enumData?: TypeScriptEnumData;\n  type: Type;\n} {\n  const enumData = buildEnumData(plugin, schema);\n\n  const ctx: EnumResolverContext = {\n    $,\n    nodes: {\n      base: baseNode,\n      items: itemsNode,\n    },\n    plugin,\n    schema,\n  };\n\n  const resolver = plugin.config['~resolvers']?.enum;\n  const type = resolver?.(ctx) ?? enumResolver(ctx);\n\n  return {\n    enumData,\n    type,\n  };\n}\n"
  },
  {
    "path": "packages/openapi-ts/src/plugins/@hey-api/typescript/v1/toAst/intersection.ts",
    "content": "import type { IR } from '@hey-api/shared';\n\nimport { $ } from '../../../../../ts-dsl';\nimport type { IntersectionResolverContext } from '../../resolvers';\nimport type { Type, TypeScriptResult } from '../../shared/types';\nimport type { HeyApiTypeScriptPlugin } from '../../types';\n\nfunction baseNode(ctx: IntersectionResolverContext): Type {\n  const { childResults } = ctx;\n\n  if (childResults.length === 1) {\n    return childResults[0]!.type;\n  }\n\n  return $.type.and(...childResults.map((r) => r.type));\n}\n\nfunction intersectionResolver(ctx: IntersectionResolverContext): Type {\n  return ctx.nodes.base(ctx);\n}\n\nexport function intersectionToAst({\n  childResults,\n  parentSchema,\n  plugin,\n  schemas,\n}: {\n  childResults: ReadonlyArray<TypeScriptResult>;\n  parentSchema: IR.SchemaObject;\n  plugin: HeyApiTypeScriptPlugin['Instance'];\n  schemas: ReadonlyArray<IR.SchemaObject>;\n}): Type {\n  const ctx: IntersectionResolverContext = {\n    $,\n    childResults,\n    nodes: {\n      base: baseNode,\n    },\n    parentSchema,\n    plugin,\n    schemas,\n  };\n\n  const resolver = plugin.config['~resolvers']?.intersection;\n  const result = resolver?.(ctx);\n  return result ?? intersectionResolver(ctx);\n}\n"
  },
  {
    "path": "packages/openapi-ts/src/plugins/@hey-api/typescript/v1/toAst/never.ts",
    "content": "import type { SchemaWithType } from '@hey-api/shared';\n\nimport { $ } from '../../../../../ts-dsl';\nimport type { NeverResolverContext } from '../../resolvers';\nimport type { Type } from '../../shared/types';\nimport type { HeyApiTypeScriptPlugin } from '../../types';\n\nfunction baseNode(): Type {\n  return $.type('never');\n}\n\nfunction neverResolver(ctx: NeverResolverContext): Type {\n  return ctx.nodes.base(ctx);\n}\n\nexport function neverToAst({\n  plugin,\n  schema,\n}: {\n  plugin: HeyApiTypeScriptPlugin['Instance'];\n  schema: SchemaWithType<'never'>;\n}): Type {\n  const ctx: NeverResolverContext = {\n    $,\n    nodes: {\n      base: baseNode,\n    },\n    plugin,\n    schema,\n  };\n\n  const resolver = plugin.config['~resolvers']?.never;\n  const result = resolver?.(ctx);\n  return result ?? neverResolver(ctx);\n}\n"
  },
  {
    "path": "packages/openapi-ts/src/plugins/@hey-api/typescript/v1/toAst/null.ts",
    "content": "import type { SchemaWithType } from '@hey-api/shared';\n\nimport { $ } from '../../../../../ts-dsl';\nimport type { NullResolverContext } from '../../resolvers';\nimport type { Type } from '../../shared/types';\nimport type { HeyApiTypeScriptPlugin } from '../../types';\n\nfunction baseNode(): Type {\n  return $.type.literal(null);\n}\n\nfunction nullResolver(ctx: NullResolverContext): Type {\n  return ctx.nodes.base(ctx);\n}\n\nexport function nullToAst({\n  plugin,\n  schema,\n}: {\n  plugin: HeyApiTypeScriptPlugin['Instance'];\n  schema: SchemaWithType<'null'>;\n}): Type {\n  const ctx: NullResolverContext = {\n    $,\n    nodes: {\n      base: baseNode,\n    },\n    plugin,\n    schema,\n  };\n\n  const resolver = plugin.config['~resolvers']?.null;\n  const result = resolver?.(ctx);\n  return result ?? nullResolver(ctx);\n}\n"
  },
  {
    "path": "packages/openapi-ts/src/plugins/@hey-api/typescript/v1/toAst/number.ts",
    "content": "import type { SchemaWithType } from '@hey-api/shared';\n\nimport { $ } from '../../../../../ts-dsl';\nimport type { NumberResolverContext } from '../../resolvers';\nimport type { Type } from '../../shared/types';\nimport type { HeyApiTypeScriptPlugin } from '../../types';\n\nfunction constNode(ctx: NumberResolverContext): Type | undefined {\n  const { schema } = ctx;\n  if (schema.const !== undefined) {\n    return $.type.fromValue(schema.const);\n  }\n}\n\nfunction baseNode(ctx: NumberResolverContext): Type {\n  const { plugin, schema } = ctx;\n\n  if (schema.type === 'integer' && schema.format === 'int64') {\n    if (plugin.getPlugin('@hey-api/transformers')?.config.bigInt) {\n      return $.type('bigint');\n    }\n  }\n\n  return $.type('number');\n}\n\nfunction numberResolver(ctx: NumberResolverContext): Type {\n  const constResult = ctx.nodes.const(ctx);\n  if (constResult) return constResult;\n\n  return ctx.nodes.base(ctx);\n}\n\nexport function numberToAst({\n  plugin,\n  schema,\n}: {\n  plugin: HeyApiTypeScriptPlugin['Instance'];\n  schema: SchemaWithType<'integer' | 'number'>;\n}): Type {\n  const ctx: NumberResolverContext = {\n    $,\n    nodes: {\n      base: baseNode,\n      const: constNode,\n    },\n    plugin,\n    schema,\n  };\n\n  const resolver = plugin.config['~resolvers']?.number;\n  const result = resolver?.(ctx);\n  return result ?? numberResolver(ctx);\n}\n"
  },
  {
    "path": "packages/openapi-ts/src/plugins/@hey-api/typescript/v1/toAst/object.ts",
    "content": "import { ref } from '@hey-api/codegen-core';\nimport type { IR, SchemaVisitorContext, SchemaWithType, Walker } from '@hey-api/shared';\nimport { deduplicateSchema } from '@hey-api/shared';\n\nimport { createSchemaComment } from '../../../../../plugins/shared/utils/schema';\nimport { $ } from '../../../../../ts-dsl';\nimport type { ObjectResolverContext } from '../../resolvers';\nimport type { Type } from '../../shared/types';\nimport type { TypeScriptResult } from '../../shared/types';\nimport type { HeyApiTypeScriptPlugin } from '../../types';\n\nfunction shapeNode(ctx: ObjectResolverContext): ReturnType<typeof $.type.object> {\n  const { schema, walk, walkerCtx } = ctx;\n  const shape = $.type.object();\n  const required = schema.required ?? [];\n\n  for (const name in schema.properties) {\n    const property = schema.properties[name]!;\n    const propertyResult = walk(property, { path: ref([]), plugin: walkerCtx.plugin });\n    const isRequired = required.includes(name);\n    shape.prop(name, (p) =>\n      p\n        .$if(walkerCtx.plugin.config.comments && createSchemaComment(property), (p, v) => p.doc(v))\n        .readonly(property.accessScope === 'read')\n        .required(isRequired)\n        .type(propertyResult.type),\n    );\n  }\n\n  return shape;\n}\n\nfunction baseNode(ctx: ObjectResolverContext): Type {\n  const { schema, walk, walkerCtx } = ctx;\n  const shape = shapeNode(ctx);\n  const required = schema.required ?? [];\n  let indexSchemas: Array<IR.SchemaObject> = [];\n  let hasOptionalProperties = false;\n\n  for (const name in schema.properties) {\n    const property = schema.properties[name]!;\n    const isRequired = required.includes(name);\n    indexSchemas.push(property);\n\n    if (!isRequired) {\n      hasOptionalProperties = true;\n    }\n  }\n\n  if (schema.patternProperties) {\n    for (const pattern in schema.patternProperties) {\n      const ir = schema.patternProperties[pattern]!;\n      indexSchemas.unshift(ir);\n    }\n  }\n\n  const hasPatterns =\n    !!schema.patternProperties && Object.keys(schema.patternProperties).length > 0;\n\n  const addPropsRaw = schema.additionalProperties;\n  const addPropsObj =\n    addPropsRaw !== false && addPropsRaw ? (addPropsRaw as IR.SchemaObject) : undefined;\n  const shouldCreateIndex =\n    hasPatterns || (!!addPropsObj && (addPropsObj.type !== 'never' || !indexSchemas.length));\n\n  if (shouldCreateIndex) {\n    const addProps = addPropsObj;\n    if (addProps && addProps.type !== 'never') {\n      if (addProps.type === 'unknown') {\n        const patternSchemas: Array<IR.SchemaObject> = schema.patternProperties\n          ? Object.values(schema.patternProperties)\n          : [];\n        indexSchemas = [addProps, ...patternSchemas];\n      } else {\n        indexSchemas.unshift(addProps);\n      }\n    } else if (!hasPatterns && !indexSchemas.length && addProps && addProps.type === 'never') {\n      indexSchemas = [addProps];\n    }\n\n    if (hasOptionalProperties && addProps?.type !== 'unknown') {\n      indexSchemas.push({ type: 'undefined' });\n    }\n\n    if (indexSchemas.length > 0) {\n      const unionSchema: IR.SchemaObject =\n        indexSchemas.length === 1\n          ? indexSchemas[0]!\n          : deduplicateSchema({ schema: { items: indexSchemas, logicalOperator: 'or' } });\n\n      const indexType = walk(unionSchema, { path: ref([]), plugin: walkerCtx.plugin }).type;\n\n      if (schema.propertyNames?.$ref) {\n        const propertyNamesResult = walk(\n          { $ref: schema.propertyNames.$ref },\n          { path: ref([]), plugin: walkerCtx.plugin },\n        );\n        return $.type.mapped('key').key(propertyNamesResult.type).optional().type(indexType);\n      }\n\n      shape.idxSig('key', (i) => i.key('string').type(indexType));\n    }\n  }\n\n  return shape;\n}\n\nfunction objectResolver(ctx: ObjectResolverContext): Type {\n  return ctx.nodes.base(ctx);\n}\n\nexport function objectToAst({\n  plugin,\n  schema,\n  walk,\n  walkerCtx,\n}: {\n  plugin: HeyApiTypeScriptPlugin['Instance'];\n  schema: SchemaWithType<'object'>;\n  walk: Walker<TypeScriptResult, HeyApiTypeScriptPlugin['Instance']>;\n  walkerCtx: SchemaVisitorContext<HeyApiTypeScriptPlugin['Instance']>;\n}): Type {\n  const ctx: ObjectResolverContext = {\n    $,\n    nodes: {\n      base: baseNode,\n      shape: shapeNode,\n    },\n    plugin,\n    schema,\n    walk,\n    walkerCtx,\n  };\n\n  const resolver = plugin.config['~resolvers']?.object;\n  const result = resolver?.(ctx);\n  return result ?? objectResolver(ctx);\n}\n"
  },
  {
    "path": "packages/openapi-ts/src/plugins/@hey-api/typescript/v1/toAst/string.ts",
    "content": "import type { SymbolMeta } from '@hey-api/codegen-core';\nimport type { SchemaWithType } from '@hey-api/shared';\nimport { toCase } from '@hey-api/shared';\n\nimport { $ } from '../../../../../ts-dsl';\nimport type { StringResolverContext } from '../../resolvers';\nimport type { Type } from '../../shared/types';\nimport type { HeyApiTypeScriptPlugin } from '../../types';\n\nfunction constNode(ctx: StringResolverContext): Type | undefined {\n  const { schema } = ctx;\n  if (schema.const !== undefined) {\n    return $.type.fromValue(schema.const);\n  }\n}\n\nfunction formatNode(ctx: StringResolverContext): Type | undefined {\n  const { plugin, schema } = ctx;\n  const { format } = schema;\n\n  if (!format) return;\n\n  if (format === 'binary') {\n    return $.type.or($.type('Blob'), $.type('File'));\n  }\n\n  if (format === 'date-time' || format === 'date') {\n    if (plugin.getPlugin('@hey-api/transformers')?.config.dates) {\n      return $.type('Date');\n    }\n  }\n\n  if (format === 'typeid' && typeof schema.example === 'string') {\n    const parts = String(schema.example).split('_');\n    parts.pop();\n    const typeidBase = parts.join('_');\n\n    const typeidQuery: SymbolMeta = {\n      category: 'type',\n      resource: 'type-id',\n      resourceId: typeidBase,\n      tool: 'typescript',\n    };\n    if (!plugin.getSymbol(typeidQuery)) {\n      const containerQuery: SymbolMeta = {\n        category: 'type',\n        resource: 'type-id',\n        tool: 'typescript',\n        variant: 'container',\n      };\n\n      if (!plugin.getSymbol(containerQuery)) {\n        const symbolTypeId = plugin.symbol('TypeID', {\n          meta: containerQuery,\n        });\n        const nodeTypeId = $.type\n          .alias(symbolTypeId)\n          .export()\n          .generic('T', (g) => g.extends('string'))\n          .type($.type.template().add($.type('T')).add('_').add($.type('string')));\n        plugin.node(nodeTypeId);\n      }\n\n      const refSymbol = plugin.referenceSymbol(containerQuery);\n      const symbolTypeName = plugin.symbol(toCase(`${typeidBase}_id`, plugin.config.case), {\n        meta: typeidQuery,\n      });\n      const node = $.type\n        .alias(symbolTypeName)\n        .export()\n        .type($.type(refSymbol).generic($.type.literal(typeidBase)));\n      plugin.node(node);\n    }\n    return $.type(plugin.referenceSymbol(typeidQuery));\n  }\n}\n\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\nfunction baseNode(ctx: StringResolverContext): Type {\n  return $.type('string');\n}\n\nfunction stringResolver(ctx: StringResolverContext): Type {\n  if (ctx.schema.const !== undefined) {\n    const constResult = ctx.nodes.const(ctx);\n    if (constResult) return constResult;\n  }\n\n  const formatResult = ctx.nodes.format(ctx);\n  if (formatResult) return formatResult;\n\n  return ctx.nodes.base(ctx);\n}\n\nexport function stringToAst({\n  plugin,\n  schema,\n}: {\n  plugin: HeyApiTypeScriptPlugin['Instance'];\n  schema: SchemaWithType<'string'>;\n}): Type {\n  const ctx: StringResolverContext = {\n    $,\n    nodes: {\n      base: baseNode,\n      const: constNode,\n      format: formatNode,\n    },\n    plugin,\n    schema,\n  };\n\n  const resolver = plugin.config['~resolvers']?.string;\n  const result = resolver?.(ctx);\n  return result ?? stringResolver(ctx);\n}\n"
  },
  {
    "path": "packages/openapi-ts/src/plugins/@hey-api/typescript/v1/toAst/tuple.ts",
    "content": "import { ref } from '@hey-api/codegen-core';\nimport type { SchemaVisitorContext, SchemaWithType, Walker } from '@hey-api/shared';\n\nimport { $ } from '../../../../../ts-dsl';\nimport type { TupleResolverContext } from '../../resolvers';\nimport type { Type, TypeScriptResult } from '../../shared/types';\nimport type { HeyApiTypeScriptPlugin } from '../../types';\n\nfunction baseNode(ctx: TupleResolverContext): Type {\n  const { plugin, schema, walk } = ctx;\n  const itemTypes: Array<Type> = [];\n\n  if (schema.items) {\n    schema.items.forEach((item) => {\n      const result = walk(item, { path: ref([]), plugin });\n      itemTypes.push(result.type);\n    });\n  }\n\n  return $.type.tuple(...itemTypes);\n}\n\nfunction constNode(ctx: TupleResolverContext): Type | undefined {\n  const { schema } = ctx;\n\n  if (!schema.const || !Array.isArray(schema.const)) {\n    return;\n  }\n\n  const itemTypes = schema.const.map((value) => $.type.fromValue(value));\n  return $.type.tuple(...itemTypes);\n}\n\nfunction tupleResolver(ctx: TupleResolverContext): Type {\n  const constResult = ctx.nodes.const(ctx);\n  if (constResult) return constResult;\n\n  return ctx.nodes.base(ctx);\n}\n\nexport function tupleToAst({\n  plugin,\n  schema,\n  walk,\n  walkerCtx,\n}: {\n  plugin: HeyApiTypeScriptPlugin['Instance'];\n  schema: SchemaWithType<'tuple'>;\n  walk: Walker<TypeScriptResult, HeyApiTypeScriptPlugin['Instance']>;\n  walkerCtx: SchemaVisitorContext<HeyApiTypeScriptPlugin['Instance']>;\n}): Type {\n  const ctx: TupleResolverContext = {\n    $,\n    nodes: {\n      base: baseNode,\n      const: constNode,\n    },\n    plugin,\n    schema,\n    walk,\n    walkerCtx,\n  };\n\n  const resolver = plugin.config['~resolvers']?.tuple;\n  const result = resolver?.(ctx);\n  return result ?? tupleResolver(ctx);\n}\n"
  },
  {
    "path": "packages/openapi-ts/src/plugins/@hey-api/typescript/v1/toAst/undefined.ts",
    "content": "import type { SchemaWithType } from '@hey-api/shared';\n\nimport { $ } from '../../../../../ts-dsl';\nimport type { UndefinedResolverContext } from '../../resolvers';\nimport type { Type } from '../../shared/types';\nimport type { HeyApiTypeScriptPlugin } from '../../types';\n\nfunction baseNode(): Type {\n  return $.type('undefined');\n}\n\nfunction undefinedResolver(ctx: UndefinedResolverContext): Type {\n  return ctx.nodes.base(ctx);\n}\n\nexport function undefinedToAst({\n  plugin,\n  schema,\n}: {\n  plugin: HeyApiTypeScriptPlugin['Instance'];\n  schema: SchemaWithType<'undefined'>;\n}): Type {\n  const ctx: UndefinedResolverContext = {\n    $,\n    nodes: {\n      base: baseNode,\n    },\n    plugin,\n    schema,\n  };\n\n  const resolver = plugin.config['~resolvers']?.undefined;\n  const result = resolver?.(ctx);\n  return result ?? undefinedResolver(ctx);\n}\n"
  },
  {
    "path": "packages/openapi-ts/src/plugins/@hey-api/typescript/v1/toAst/union.ts",
    "content": "import type { IR } from '@hey-api/shared';\n\nimport { $ } from '../../../../../ts-dsl';\nimport type { UnionResolverContext } from '../../resolvers';\nimport type { Type, TypeScriptResult } from '../../shared/types';\nimport type { HeyApiTypeScriptPlugin } from '../../types';\n\nfunction baseNode(ctx: UnionResolverContext): Type {\n  const { childResults } = ctx;\n\n  if (childResults.length === 1) {\n    return childResults[0]!.type;\n  }\n\n  return $.type.or(...childResults.map((r) => r.type));\n}\n\nfunction unionResolver(ctx: UnionResolverContext): Type {\n  return ctx.nodes.base(ctx);\n}\n\nexport function unionToAst({\n  childResults,\n  parentSchema,\n  plugin,\n  schemas,\n}: {\n  childResults: ReadonlyArray<TypeScriptResult>;\n  parentSchema: IR.SchemaObject;\n  plugin: HeyApiTypeScriptPlugin['Instance'];\n  schemas: ReadonlyArray<IR.SchemaObject>;\n}): Type {\n  const ctx: UnionResolverContext = {\n    $,\n    childResults,\n    nodes: {\n      base: baseNode,\n    },\n    parentSchema,\n    plugin,\n    schemas,\n  };\n\n  const resolver = plugin.config['~resolvers']?.union;\n  const result = resolver?.(ctx);\n  return result ?? unionResolver(ctx);\n}\n"
  },
  {
    "path": "packages/openapi-ts/src/plugins/@hey-api/typescript/v1/toAst/unknown.ts",
    "content": "import type { SchemaWithType } from '@hey-api/shared';\n\nimport { $ } from '../../../../../ts-dsl';\nimport type { UnknownResolverContext } from '../../resolvers';\nimport type { Type } from '../../shared/types';\nimport type { HeyApiTypeScriptPlugin } from '../../types';\n\nfunction baseNode(ctx: UnknownResolverContext): Type {\n  return $.type(ctx.plugin.config.topType);\n}\n\nfunction unknownResolver(ctx: UnknownResolverContext): Type {\n  return ctx.nodes.base(ctx);\n}\n\nexport function unknownToAst({\n  plugin,\n  schema,\n}: {\n  plugin: HeyApiTypeScriptPlugin['Instance'];\n  schema: SchemaWithType<'unknown'>;\n}): Type {\n  const ctx: UnknownResolverContext = {\n    $,\n    nodes: {\n      base: baseNode,\n    },\n    plugin,\n    schema,\n  };\n\n  const resolver = plugin.config['~resolvers']?.unknown;\n  const result = resolver?.(ctx);\n  return result ?? unknownResolver(ctx);\n}\n"
  },
  {
    "path": "packages/openapi-ts/src/plugins/@hey-api/typescript/v1/toAst/void.ts",
    "content": "import type { SchemaWithType } from '@hey-api/shared';\n\nimport { $ } from '../../../../../ts-dsl';\nimport type { VoidResolverContext } from '../../resolvers';\nimport type { Type } from '../../shared/types';\nimport type { HeyApiTypeScriptPlugin } from '../../types';\n\nfunction baseNode(): Type {\n  return $.type('void');\n}\n\nfunction voidResolver(ctx: VoidResolverContext): Type {\n  return ctx.nodes.base(ctx);\n}\n\nexport function voidToAst({\n  plugin,\n  schema,\n}: {\n  plugin: HeyApiTypeScriptPlugin['Instance'];\n  schema: SchemaWithType<'void'>;\n}): Type {\n  const ctx: VoidResolverContext = {\n    $,\n    nodes: {\n      base: baseNode,\n    },\n    plugin,\n    schema,\n  };\n\n  const resolver = plugin.config['~resolvers']?.void;\n  const result = resolver?.(ctx);\n  return result ?? voidResolver(ctx);\n}\n"
  },
  {
    "path": "packages/openapi-ts/src/plugins/@hey-api/typescript/v1/walker.ts",
    "content": "import { fromRef } from '@hey-api/codegen-core';\nimport type { SchemaExtractor, SchemaVisitor } from '@hey-api/shared';\nimport { pathToJsonPointer } from '@hey-api/shared';\n\nimport { $ } from '../../../../ts-dsl';\nimport { defaultMeta, inheritMeta } from '../shared/meta';\nimport type { ProcessorContext } from '../shared/processor';\nimport type { TypeScriptResult } from '../shared/types';\nimport type { HeyApiTypeScriptPlugin } from '../types';\nimport { arrayToAst } from './toAst/array';\nimport { booleanToAst } from './toAst/boolean';\nimport { enumToAst } from './toAst/enum';\nimport { intersectionToAst } from './toAst/intersection';\nimport { neverToAst } from './toAst/never';\nimport { nullToAst } from './toAst/null';\nimport { numberToAst } from './toAst/number';\nimport { objectToAst } from './toAst/object';\nimport { stringToAst } from './toAst/string';\nimport { tupleToAst } from './toAst/tuple';\nimport { undefinedToAst } from './toAst/undefined';\nimport { unionToAst } from './toAst/union';\nimport { unknownToAst } from './toAst/unknown';\nimport { voidToAst } from './toAst/void';\n\nexport interface VisitorConfig {\n  /** Optional schema extractor function. */\n  schemaExtractor?: SchemaExtractor<ProcessorContext>;\n}\n\nexport function createVisitor(\n  config: VisitorConfig,\n): SchemaVisitor<TypeScriptResult, HeyApiTypeScriptPlugin['Instance']> {\n  const { schemaExtractor } = config;\n\n  return {\n    applyModifiers(result) {\n      return {\n        enumData: result.enumData,\n        type: result.type,\n      };\n    },\n    array(schema, ctx, walk) {\n      const type = arrayToAst({\n        plugin: ctx.plugin,\n        schema,\n        walk,\n        walkerCtx: ctx,\n      });\n      return {\n        meta: defaultMeta(schema),\n        type,\n      };\n    },\n    boolean(schema, ctx) {\n      const type = booleanToAst({ plugin: ctx.plugin, schema });\n      return {\n        meta: defaultMeta(schema),\n        type,\n      };\n    },\n    enum(schema, ctx) {\n      const { enumData, type } = enumToAst({ plugin: ctx.plugin, schema });\n      return {\n        enumData,\n        meta: defaultMeta(schema),\n        type,\n      };\n    },\n    integer(schema, ctx) {\n      const type = numberToAst({ plugin: ctx.plugin, schema });\n      return {\n        meta: defaultMeta(schema),\n        type,\n      };\n    },\n    intercept(schema, ctx, walk) {\n      if (schemaExtractor && !schema.$ref) {\n        const extracted = schemaExtractor({\n          meta: {\n            resource: 'definition',\n            resourceId: pathToJsonPointer(fromRef(ctx.path)),\n          },\n          naming: ctx.plugin.config.definitions,\n          path: fromRef(ctx.path),\n          plugin: ctx.plugin,\n          schema,\n        });\n\n        if (extracted !== schema) {\n          return walk(extracted, ctx);\n        }\n      }\n\n      const transformersPlugin = ctx.plugin.getPlugin('@hey-api/transformers');\n      if (transformersPlugin?.config.typeTransformers) {\n        for (const typeTransformer of transformersPlugin.config.typeTransformers) {\n          const typeNode = typeTransformer({ $, plugin: transformersPlugin, schema });\n          if (typeNode) {\n            return { meta: defaultMeta(schema), type: typeNode };\n          }\n        }\n      }\n    },\n    intersection(items, schemas, parentSchema, ctx) {\n      const type = intersectionToAst({\n        childResults: items,\n        parentSchema,\n        plugin: ctx.plugin,\n        schemas,\n      });\n\n      return {\n        meta: inheritMeta(parentSchema, items),\n        type,\n      };\n    },\n    never(schema, ctx) {\n      const type = neverToAst({ plugin: ctx.plugin, schema });\n      return {\n        meta: defaultMeta(schema),\n        type,\n      };\n    },\n    null(schema, ctx) {\n      const type = nullToAst({ plugin: ctx.plugin, schema });\n      return {\n        meta: defaultMeta(schema),\n        type,\n      };\n    },\n    number(schema, ctx) {\n      const type = numberToAst({ plugin: ctx.plugin, schema });\n      return {\n        meta: defaultMeta(schema),\n        type,\n      };\n    },\n    object(schema, ctx, walk) {\n      const type = objectToAst({\n        plugin: ctx.plugin,\n        schema,\n        walk,\n        walkerCtx: ctx,\n      });\n      return {\n        meta: defaultMeta(schema),\n        type,\n      };\n    },\n    postProcess(result) {\n      return result;\n    },\n    reference($ref, schema, ctx) {\n      const symbol = ctx.plugin.referenceSymbol({\n        category: 'type',\n        resource: 'definition',\n        resourceId: $ref,\n      });\n\n      if (schema.omit && schema.omit.length > 0) {\n        const omittedKeys =\n          schema.omit.length === 1\n            ? $.type.literal(schema.omit[0]!)\n            : $.type.or(...schema.omit.map((key) => $.type.literal(key)));\n        return {\n          meta: defaultMeta(schema),\n          type: $.type('Omit').generics($.type(symbol), omittedKeys),\n        };\n      }\n\n      return {\n        meta: defaultMeta(schema),\n        type: $.type(symbol),\n      };\n    },\n    string(schema, ctx) {\n      const type = stringToAst({ plugin: ctx.plugin, schema });\n      return {\n        meta: defaultMeta(schema),\n        type,\n      };\n    },\n    tuple(schema, ctx, walk) {\n      const type = tupleToAst({\n        plugin: ctx.plugin,\n        schema,\n        walk,\n        walkerCtx: ctx,\n      });\n      return {\n        meta: defaultMeta(schema),\n        type,\n      };\n    },\n    undefined(schema, ctx) {\n      const type = undefinedToAst({ plugin: ctx.plugin, schema });\n      return {\n        meta: defaultMeta(schema),\n        type,\n      };\n    },\n    union(items, schemas, parentSchema, ctx) {\n      const type = unionToAst({\n        childResults: items,\n        parentSchema,\n        plugin: ctx.plugin,\n        schemas,\n      });\n\n      return {\n        meta: inheritMeta(parentSchema, items),\n        type,\n      };\n    },\n    unknown(schema, ctx) {\n      const type = unknownToAst({ plugin: ctx.plugin, schema });\n      return {\n        meta: defaultMeta(schema),\n        type,\n      };\n    },\n    void(schema, ctx) {\n      const type = voidToAst({ plugin: ctx.plugin, schema });\n      return {\n        meta: defaultMeta(schema),\n        type,\n      };\n    },\n  };\n}\n"
  },
  {
    "path": "packages/openapi-ts/src/plugins/@pinia/colada/config.ts",
    "content": "import { definePluginConfig, mappers } from '@hey-api/shared';\n\nimport { handler } from './plugin';\nimport type { PiniaColadaPlugin } from './types';\n\nexport const defaultConfig: PiniaColadaPlugin['Config'] = {\n  config: {\n    case: 'camelCase',\n    comments: true,\n    includeInEntry: false,\n  },\n  dependencies: ['@hey-api/typescript', '@hey-api/sdk'],\n  handler: handler as PiniaColadaPlugin['Handler'],\n  name: '@pinia/colada',\n  resolveConfig: (plugin, context) => {\n    plugin.config.mutationOptions = context.valueToObject({\n      defaultValue: {\n        case: plugin.config.case ?? 'camelCase',\n        enabled: true,\n        name: '{{name}}Mutation',\n      },\n      mappers,\n      value: plugin.config.mutationOptions,\n    });\n\n    plugin.config.queryKeys = context.valueToObject({\n      defaultValue: {\n        case: plugin.config.case ?? 'camelCase',\n        enabled: true,\n        name: '{{name}}QueryKey',\n        tags: false,\n      },\n      mappers,\n      value: plugin.config.queryKeys,\n    });\n\n    plugin.config.queryOptions = context.valueToObject({\n      defaultValue: {\n        case: plugin.config.case ?? 'camelCase',\n        enabled: true,\n        name: '{{name}}Query',\n      },\n      mappers,\n      value: plugin.config.queryOptions,\n    });\n  },\n};\n\n/**\n * Type helper for `@pinia/colada` plugin, returns {@link Plugin.Config} object\n */\nexport const defineConfig = definePluginConfig(defaultConfig);\n"
  },
  {
    "path": "packages/openapi-ts/src/plugins/@pinia/colada/index.ts",
    "content": "export { defaultConfig, defineConfig } from './config';\nexport type { PiniaColadaPlugin } from './types';\n"
  },
  {
    "path": "packages/openapi-ts/src/plugins/@pinia/colada/meta.ts",
    "content": "import type { IR } from '@hey-api/shared';\n\nimport { $ } from '../../../ts-dsl';\nimport type { PiniaColadaPlugin } from './types';\n\nexport const handleMeta = (\n  plugin: PiniaColadaPlugin['Instance'],\n  operation: IR.OperationObject,\n  configPath: 'queryOptions' | 'mutationOptions',\n): ReturnType<typeof $.fromValue> | undefined => {\n  const metaFn = plugin.config[configPath].meta;\n  if (!metaFn) return;\n\n  const metaObject = metaFn(operation);\n  if (!Object.keys(metaObject).length) return;\n\n  return $.fromValue(metaObject);\n};\n"
  },
  {
    "path": "packages/openapi-ts/src/plugins/@pinia/colada/mutationOptions.ts",
    "content": "import type { IR } from '@hey-api/shared';\nimport { applyNaming } from '@hey-api/shared';\n\nimport { getTypedConfig } from '../../../config/utils';\nimport { getClientPlugin } from '../../../plugins/@hey-api/client-core/utils';\nimport { createOperationComment } from '../../../plugins/shared/utils/operation';\nimport { $ } from '../../../ts-dsl';\nimport { handleMeta } from './meta';\nimport type { PiniaColadaPlugin } from './types';\nimport { useTypeError, useTypeResponse } from './useType';\nimport { getPublicTypeData } from './utils';\n\nexport const createMutationOptions = ({\n  operation,\n  plugin,\n}: {\n  operation: IR.OperationObject;\n  plugin: PiniaColadaPlugin['Instance'];\n}): void => {\n  const symbolMutationOptionsType = plugin.external(`${plugin.name}.UseMutationOptions`);\n\n  const client = getClientPlugin(getTypedConfig(plugin));\n  const isNuxtClient = client.name === '@hey-api/client-nuxt';\n\n  const typeData = getPublicTypeData({ isNuxtClient, operation, plugin });\n\n  const options = plugin.symbol('options');\n  const fnOptions = plugin.symbol('vars');\n\n  const awaitSdkFn = $.lazy((ctx) =>\n    ctx\n      .access(\n        plugin.referenceSymbol({\n          category: 'sdk',\n          resource: 'operation',\n          resourceId: operation.id,\n        }),\n      )\n      .call(\n        $.object().pretty().spread(options).spread(fnOptions).prop('throwOnError', $.literal(true)),\n      )\n      .await(),\n  );\n\n  const statements: Array<ReturnType<typeof $.var | typeof $.return>> = [];\n\n  if (plugin.getPluginOrThrow('@hey-api/sdk').config.responseStyle === 'data') {\n    statements.push($.return(awaitSdkFn));\n  } else {\n    statements.push($.const().object('data').assign(awaitSdkFn), $.return('data'));\n  }\n\n  const mutationOpts = $.object()\n    .pretty()\n    .prop(\n      'mutation',\n      $.func()\n        .async()\n        .param(fnOptions, (p) =>\n          p.$if(isNuxtClient, (f) => f.type($.type('Partial').generic(typeData))),\n        )\n        .do(...statements),\n    )\n    .$if(handleMeta(plugin, operation, 'mutationOptions'), (o, v) => o.prop('meta', v));\n  const symbolMutationOptions = plugin.symbol(\n    applyNaming(operation.id, plugin.config.mutationOptions),\n  );\n  const statement = $.const(symbolMutationOptions)\n    .export()\n    .$if(plugin.config.comments && createOperationComment(operation), (c, v) => c.doc(v))\n    .assign(\n      $.func()\n        .param(options, (p) => p.optional().type($.type('Partial').generic(typeData)))\n        .returns(\n          $.type(symbolMutationOptionsType)\n            .generic(useTypeResponse({ operation, plugin }))\n            .generic(typeData)\n            .generic(useTypeError({ operation, plugin })),\n        )\n        .do($.return(mutationOpts)),\n    );\n  plugin.node(statement);\n};\n"
  },
  {
    "path": "packages/openapi-ts/src/plugins/@pinia/colada/plugin.ts",
    "content": "import type { PiniaColadaPlugin } from './types';\nimport { handlerV0 } from './v0/plugin';\n\nexport const handler: PiniaColadaPlugin['Handler'] = (args) => handlerV0(args);\n"
  },
  {
    "path": "packages/openapi-ts/src/plugins/@pinia/colada/queryKey.ts",
    "content": "import type { Symbol } from '@hey-api/codegen-core';\nimport type { IR } from '@hey-api/shared';\nimport { applyNaming, hasOperationDataRequired } from '@hey-api/shared';\n\nimport { getTypedConfig } from '../../../config/utils';\nimport { clientFolderAbsolutePath } from '../../../generate/client';\nimport { getClientBaseUrlKey, getClientPlugin } from '../../../plugins/@hey-api/client-core/utils';\nimport { $ } from '../../../ts-dsl';\nimport type { PiniaColadaPlugin } from './types';\nimport { getPublicTypeData } from './utils';\n\nconst TOptionsType = 'TOptions';\n\nexport const createQueryKeyFunction = ({ plugin }: { plugin: PiniaColadaPlugin['Instance'] }) => {\n  const symbolCreateQueryKey = plugin.symbol(\n    applyNaming('createQueryKey', {\n      case: plugin.config.case,\n    }),\n    {\n      meta: {\n        category: 'utility',\n        resource: 'createQueryKey',\n        tool: plugin.name,\n      },\n    },\n  );\n  const symbolQueryKeyType = plugin.referenceSymbol({\n    category: 'type',\n    resource: 'QueryKey',\n    tool: plugin.name,\n  });\n  const symbolJsonValue = plugin.external(`${plugin.name}._JSONValue`);\n\n  const returnType = $.type(symbolQueryKeyType).generic(TOptionsType).idx(0);\n\n  const baseUrlKey = getClientBaseUrlKey(getTypedConfig(plugin));\n\n  const symbolOptions = plugin.referenceSymbol({\n    category: 'type',\n    resource: 'client-options',\n    tool: 'sdk',\n  });\n  const symbolClient = plugin.getSymbol({\n    category: 'client',\n  });\n\n  const clientModule = clientFolderAbsolutePath(getTypedConfig(plugin));\n  const symbolSerializeQueryValue = plugin.symbol('serializeQueryKeyValue', {\n    external: clientModule,\n    meta: {\n      category: 'external',\n      resource: `${clientModule}.serializeQueryKeyValue`,\n    },\n  });\n\n  const fn = $.const(symbolCreateQueryKey).assign(\n    $.func()\n      .param('id', (p) => p.type('string'))\n      .param('options', (p) => p.optional().type(TOptionsType))\n      .param('tags', (p) => p.optional().type('ReadonlyArray<string>'))\n      .returns($.type.tuple(returnType))\n      .generic(TOptionsType, (g) => g.extends(symbolOptions))\n      .do(\n        $.const('params')\n          .type(returnType)\n          .assign(\n            $.object()\n              .prop('_id', 'id')\n              .prop(\n                baseUrlKey,\n                $('options')\n                  .attr(baseUrlKey)\n                  .optional()\n                  .or(\n                    $('options')\n                      .attr('client')\n                      .optional()\n                      .$if(symbolClient, (a, v) => a.coalesce(v))\n                      .attr('getConfig')\n                      .call()\n                      .attr(baseUrlKey),\n                  ),\n              )\n              .as(returnType),\n          ),\n        $.if('tags').do(\n          $('params').attr('tags').assign($('tags').as('unknown').as(symbolJsonValue)),\n        ),\n        $.if($('options').attr('body').optional().neq($.id('undefined'))).do(\n          $.const('normalizedBody').assign(\n            $(symbolSerializeQueryValue).call($('options').attr('body')),\n          ),\n          $.if($('normalizedBody').neq($.id('undefined'))).do(\n            $('params').attr('body').assign('normalizedBody'),\n          ),\n        ),\n        $.if($('options').attr('path').optional()).do(\n          $('params').attr('path').assign($('options').attr('path')),\n        ),\n        $.if($('options').attr('query').optional().neq($.id('undefined'))).do(\n          $.const('normalizedQuery').assign(\n            $(symbolSerializeQueryValue).call($('options').attr('query')),\n          ),\n          $.if($('normalizedQuery').neq($.id('undefined'))).do(\n            $('params').attr('query').assign('normalizedQuery'),\n          ),\n        ),\n        $.return($.array($('params'))),\n      ),\n  );\n  plugin.node(fn);\n};\n\nconst createQueryKeyLiteral = ({\n  id,\n  operation,\n  plugin,\n}: {\n  id: string;\n  operation: IR.OperationObject;\n  plugin: PiniaColadaPlugin['Instance'];\n}) => {\n  const config = plugin.config.queryKeys;\n  let tagsExpression: ReturnType<typeof $.array> | undefined;\n  if (config.tags && operation.tags && operation.tags.length > 0) {\n    tagsExpression = $.array(...operation.tags.map((tag) => $.literal(tag)));\n  }\n\n  const symbolCreateQueryKey = plugin.referenceSymbol({\n    category: 'utility',\n    resource: 'createQueryKey',\n    tool: plugin.name,\n  });\n  const createQueryKeyCallExpression = $(symbolCreateQueryKey).call(\n    $.literal(id),\n    'options',\n    tagsExpression,\n  );\n  return createQueryKeyCallExpression;\n};\n\nexport const createQueryKeyType = ({ plugin }: { plugin: PiniaColadaPlugin['Instance'] }) => {\n  const symbolJsonValue = plugin.external(`${plugin.name}._JSONValue`);\n\n  const symbolOptions = plugin.referenceSymbol({\n    category: 'type',\n    resource: 'client-options',\n    tool: 'sdk',\n  });\n  const symbolQueryKeyType = plugin.symbol('QueryKey', {\n    meta: {\n      category: 'type',\n      resource: 'QueryKey',\n      tool: plugin.name,\n    },\n  });\n  const queryKeyType = $.type\n    .alias(symbolQueryKeyType)\n    .export()\n    .generic(TOptionsType, (g) => g.extends($.type(symbolOptions)))\n    .type(\n      $.type.tuple(\n        $.type.and(\n          $.type(`Pick<${TOptionsType}, 'path'>`),\n          $.type\n            .object()\n            .prop('_id', (p) => p.type('string'))\n            .prop(getClientBaseUrlKey(getTypedConfig(plugin)), (p) =>\n              p.optional().type(symbolJsonValue),\n            )\n            .prop('body', (p) => p.optional().type(symbolJsonValue))\n            .prop('query', (p) => p.optional().type(symbolJsonValue))\n            .prop('tags', (p) => p.optional().type(symbolJsonValue)),\n        ),\n      ),\n    );\n  plugin.node(queryKeyType);\n};\n\nexport const queryKeyStatement = ({\n  operation,\n  plugin,\n  symbol,\n}: {\n  operation: IR.OperationObject;\n  plugin: PiniaColadaPlugin['Instance'];\n  symbol: Symbol;\n}) => {\n  const client = getClientPlugin(getTypedConfig(plugin));\n  const isNuxtClient = client.name === '@hey-api/client-nuxt';\n  const statement = $.const(symbol)\n    .export()\n    .assign(\n      $.func()\n        .param('options', (p) =>\n          p\n            .required(hasOperationDataRequired(operation))\n            .type(getPublicTypeData({ isNuxtClient, operation, plugin })),\n        )\n        .do(\n          createQueryKeyLiteral({\n            id: operation.id,\n            operation,\n            plugin,\n          }).return(),\n        ),\n    );\n  return statement;\n};\n"
  },
  {
    "path": "packages/openapi-ts/src/plugins/@pinia/colada/queryOptions.ts",
    "content": "import type { IR } from '@hey-api/shared';\nimport { applyNaming } from '@hey-api/shared';\n\nimport { getTypedConfig } from '../../../config/utils';\nimport { getClientPlugin } from '../../../plugins/@hey-api/client-core/utils';\nimport {\n  createOperationComment,\n  hasOperationSse,\n  isOperationOptionsRequired,\n} from '../../../plugins/shared/utils/operation';\nimport { $ } from '../../../ts-dsl';\nimport { handleMeta } from './meta';\nimport { createQueryKeyFunction, createQueryKeyType, queryKeyStatement } from './queryKey';\nimport type { PiniaColadaPlugin } from './types';\nimport { useTypeError, useTypeResponse } from './useType';\nimport { getPublicTypeData } from './utils';\n\nconst optionsParamName = 'options';\nconst fnOptions = 'context';\n\nexport const createQueryOptions = ({\n  operation,\n  plugin,\n}: {\n  operation: IR.OperationObject;\n  plugin: PiniaColadaPlugin['Instance'];\n}): void => {\n  if (hasOperationSse({ operation })) {\n    return;\n  }\n\n  const isRequiredOptions = isOperationOptionsRequired({\n    context: plugin.context,\n    operation,\n  });\n  if (\n    !plugin.getSymbol({\n      category: 'utility',\n      resource: 'createQueryKey',\n      tool: plugin.name,\n    })\n  ) {\n    createQueryKeyType({ plugin });\n    createQueryKeyFunction({ plugin });\n  }\n\n  let keyExpression: ReturnType<typeof $.call>;\n  if (plugin.config.queryKeys.enabled) {\n    const symbolQueryKey = plugin.symbol(applyNaming(operation.id, plugin.config.queryKeys));\n    const node = queryKeyStatement({\n      operation,\n      plugin,\n      symbol: symbolQueryKey,\n    });\n    plugin.node(node);\n    keyExpression = $(symbolQueryKey).call(optionsParamName);\n  } else {\n    const symbolCreateQueryKey = plugin.referenceSymbol({\n      category: 'utility',\n      resource: 'createQueryKey',\n      tool: plugin.name,\n    });\n    // Optionally include tags when configured\n    let tagsExpr: ReturnType<typeof $.array> | undefined;\n    if (plugin.config.queryKeys.tags && operation.tags && operation.tags.length > 0) {\n      tagsExpr = $.array(...operation.tags.map((t) => $.literal(t)));\n    }\n    keyExpression = $(symbolCreateQueryKey).call(\n      $.literal(operation.id),\n      optionsParamName,\n      tagsExpr,\n    );\n  }\n\n  const client = getClientPlugin(getTypedConfig(plugin));\n  const isNuxtClient = client.name === '@hey-api/client-nuxt';\n  const typeData = getPublicTypeData({ isNuxtClient, operation, plugin });\n  const awaitSdkFn = $.lazy((ctx) =>\n    ctx\n      .access(\n        plugin.referenceSymbol({\n          category: 'sdk',\n          resource: 'operation',\n          resourceId: operation.id,\n        }),\n      )\n      .call(\n        $.object().spread(optionsParamName).spread(fnOptions).prop('throwOnError', $.literal(true)),\n      )\n      .await(),\n  );\n\n  const statements: Array<ReturnType<typeof $.return | typeof $.const>> = [];\n  if (plugin.getPluginOrThrow('@hey-api/sdk').config.responseStyle === 'data') {\n    statements.push($.return(awaitSdkFn));\n  } else {\n    statements.push($.const().object('data').assign(awaitSdkFn), $.return('data'));\n  }\n\n  const queryOpts = $.object()\n    .pretty()\n    .prop('key', keyExpression)\n    .prop(\n      'query',\n      $.func()\n        .async()\n        .param(fnOptions)\n        .do(...statements),\n    )\n    .$if(handleMeta(plugin, operation, 'queryOptions'), (o, v) => o.prop('meta', v));\n\n  const symbolQueryOptionsFn = plugin.symbol(\n    applyNaming(operation.id, plugin.config.queryOptions),\n    {\n      meta: {\n        category: 'hook',\n        resource: 'operation',\n        resourceId: operation.id,\n        role: 'queryOptions',\n        tool: plugin.name,\n      },\n    },\n  );\n  const symbolDefineQueryOptions = plugin.external(`${plugin.name}.defineQueryOptions`);\n  const statement = $.const(symbolQueryOptionsFn)\n    .export()\n    .$if(plugin.config.comments && createOperationComment(operation), (c, v) => c.doc(v))\n    .assign(\n      $(symbolDefineQueryOptions)\n        .call(\n          $.func()\n            .param(optionsParamName, (p) => p.required(isRequiredOptions).type(typeData))\n            .do($.return(queryOpts)),\n        )\n        .generics(\n          typeData,\n          useTypeResponse({ operation, plugin }),\n          useTypeError({ operation, plugin }),\n        ),\n    );\n  plugin.node(statement);\n};\n"
  },
  {
    "path": "packages/openapi-ts/src/plugins/@pinia/colada/types.ts",
    "content": "import type { Casing, FeatureToggle, NameTransformer, NamingOptions } from '@hey-api/shared';\nimport type { IR } from '@hey-api/shared';\nimport type { DefinePlugin, Plugin } from '@hey-api/shared';\n\nexport type UserConfig = Plugin.Name<'@pinia/colada'> &\n  Plugin.Hooks &\n  Plugin.UserComments &\n  Plugin.UserExports & {\n    /**\n     * Casing convention for generated names.\n     *\n     * @default 'camelCase'\n     */\n    case?: Casing;\n    /**\n     * Configuration for generated mutation options helpers.\n     *\n     * See {@link https://pinia-colada.esm.dev/guide/mutations.html Mutations}\n     *\n     * Can be:\n     * - `boolean`: Shorthand for `{ enabled: boolean }`\n     * - `string` or `function`: Shorthand for `{ name: string | function }`\n     * - `object`: Full configuration object\n     *\n     * @default true\n     */\n    mutationOptions?:\n      | boolean\n      | NameTransformer\n      | {\n          /**\n           * Casing convention for generated names.\n           *\n           * @default 'camelCase'\n           */\n          case?: Casing;\n          /**\n           * Whether this feature is enabled.\n           *\n           * @default true\n           */\n          enabled?: boolean;\n          /**\n           * Custom function to generate metadata for the operation.\n           * Can return any valid meta object that will be included in the generated mutation options.\n           *\n           * @param operation - The operation object containing all available metadata\n           * @returns A meta object with any properties you want to include\n           *\n           * @example\n           * ```ts\n           * meta: (operation) => ({\n           *   customField: operation.id,\n           *   isDeprecated: operation.deprecated,\n           *   tags: operation.tags,\n           *   customObject: {\n           *     method: operation.method,\n           *     path: operation.path\n           *   }\n           * })\n           * ```\n           *\n           * @default undefined\n           */\n          meta?: (operation: IR.OperationObject) => Record<string, unknown>;\n          /**\n           * Naming pattern for generated names.\n           *\n           * @default '{{name}}Mutation'\n           */\n          name?: NameTransformer;\n        };\n    /**\n     * Configuration for generated query keys.\n     *\n     * See {@link https://pinia-colada.esm.dev/guide/query-keys.html Query Keys}\n     *\n     * Can be:\n     * - `boolean`: Shorthand for `{ enabled: boolean }`\n     * - `string` or `function`: Shorthand for `{ name: string | function }`\n     * - `object`: Full configuration object\n     *\n     * @default true\n     */\n    queryKeys?:\n      | boolean\n      | NameTransformer\n      | {\n          /**\n           * Casing convention for generated names.\n           *\n           * @default 'camelCase'\n           */\n          case?: Casing;\n          /**\n           * Whether this feature is enabled.\n           *\n           * @default true\n           */\n          enabled?: boolean;\n          /**\n           * Naming pattern for generated names.\n           *\n           * @default '{{name}}QueryKey'\n           */\n          name?: NameTransformer;\n          /**\n           * Whether to include operation tags in query keys.\n           * This will make query keys larger but provides better cache invalidation capabilities.\n           *\n           * @default false\n           */\n          tags?: boolean;\n        };\n    /**\n     * Configuration for generated query options helpers.\n     *\n     * See {@link https://pinia-colada.esm.dev/guide/queries.html Queries}\n     *\n     * Can be:\n     * - `boolean`: Shorthand for `{ enabled: boolean }`\n     * - `string` or `function`: Shorthand for `{ name: string | function }`\n     * - `object`: Full configuration object\n     *\n     * @default true\n     */\n    queryOptions?:\n      | boolean\n      | NameTransformer\n      | {\n          /**\n           * Casing convention for generated names.\n           *\n           * @default 'camelCase'\n           */\n          case?: Casing;\n          /**\n           * Whether this feature is enabled.\n           *\n           * @default true\n           */\n          enabled?: boolean;\n          /**\n           * Custom function to generate metadata for the operation.\n           * Can return any valid meta object that will be included in the generated query options.\n           *\n           * @param operation - The operation object containing all available metadata\n           * @returns A meta object with any properties you want to include\n           *\n           * @example\n           * ```ts\n           * meta: (operation) => ({\n           *   customField: operation.id,\n           *   isDeprecated: operation.deprecated,\n           *   tags: operation.tags,\n           *   customObject: {\n           *     method: operation.method,\n           *     path: operation.path\n           *   }\n           * })\n           * ```\n           *\n           * @default undefined\n           */\n          meta?: (operation: IR.OperationObject) => Record<string, unknown>;\n          /**\n           * Naming pattern for generated names.\n           *\n           * @default '{{name}}Query'\n           */\n          name?: NameTransformer;\n        };\n  };\n\nexport type Config = Plugin.Name<'@pinia/colada'> &\n  Plugin.Hooks &\n  Plugin.Comments &\n  Plugin.Exports & {\n    /**\n     * Casing convention for generated names.\n     */\n    case: Casing;\n    /**\n     * Resolved configuration for generated mutation options helpers.\n     */\n    mutationOptions: NamingOptions &\n      FeatureToggle & {\n        /**\n         * Custom function to generate metadata for the operation.\n         * Can return any valid meta object that will be included in the generated mutation options.\n         *\n         * @param operation - The operation object containing all available metadata\n         * @returns A meta object with any properties you want to include\n         *\n         * @example\n         * ```ts\n         * meta: (operation) => ({\n         *   customField: operation.id,\n         *   isDeprecated: operation.deprecated,\n         *   tags: operation.tags,\n         *   customObject: {\n         *     method: operation.method,\n         *     path: operation.path\n         *   }\n         * })\n         * ```\n         *\n         * @default undefined\n         */\n        meta: ((operation: IR.OperationObject) => Record<string, unknown>) | undefined;\n      };\n    /**\n     * Resolved configuration for generated query keys.\n     *\n     * See {@link https://pinia-colada.esm.dev/guide/query-keys.html Query Keys}\n     */\n    queryKeys: NamingOptions &\n      FeatureToggle & {\n        /**\n         * Whether to include operation tags in query keys.\n         * This will make query keys larger but provides better cache invalidation capabilities.\n         *\n         * @default false\n         */\n        tags: boolean;\n      };\n    /**\n     * Resolved configuration for generated query options helpers.\n     *\n     * See {@link https://pinia-colada.esm.dev/guide/queries.html Queries}\n     */\n    queryOptions: NamingOptions &\n      FeatureToggle & {\n        /**\n         * Custom function to generate metadata for the operation.\n         * Can return any valid meta object that will be included in the generated query options.\n         *\n         * @param operation - The operation object containing all available metadata\n         * @returns A meta object with any properties you want to include\n         *\n         * @example\n         * ```ts\n         * meta: (operation) => ({\n         *   customField: operation.id,\n         *   isDeprecated: operation.deprecated,\n         *   tags: operation.tags,\n         *   customObject: {\n         *     method: operation.method,\n         *     path: operation.path\n         *   }\n         * })\n         * ```\n         *\n         * @default undefined\n         */\n        meta: ((operation: IR.OperationObject) => Record<string, unknown>) | undefined;\n      };\n  };\n\nexport type PiniaColadaPlugin = DefinePlugin<UserConfig, Config>;\n"
  },
  {
    "path": "packages/openapi-ts/src/plugins/@pinia/colada/useType.ts",
    "content": "import type { IR } from '@hey-api/shared';\n\nimport { getTypedConfig } from '../../../config/utils';\nimport { getClientPlugin } from '../../../plugins/@hey-api/client-core/utils';\nimport { operationOptionsType } from '../../../plugins/@hey-api/sdk/shared/operation';\nimport { $ } from '../../../ts-dsl';\nimport type { PiniaColadaPlugin } from './types';\n\nexport const useTypeData = ({\n  operation,\n  plugin,\n}: {\n  operation: IR.OperationObject;\n  plugin: PiniaColadaPlugin['Instance'];\n}): ReturnType<typeof $.type> => {\n  const pluginSdk = plugin.getPluginOrThrow('@hey-api/sdk');\n  return operationOptionsType({ operation, plugin: pluginSdk });\n};\n\nexport const useTypeError = ({\n  operation,\n  plugin,\n}: {\n  operation: IR.OperationObject;\n  plugin: PiniaColadaPlugin['Instance'];\n}): ReturnType<typeof $.type> => {\n  const client = getClientPlugin(getTypedConfig(plugin));\n  const symbolErrorType = plugin.querySymbol({\n    category: 'type',\n    resource: 'operation',\n    resourceId: operation.id,\n    role: 'error',\n  });\n  const symbolError = symbolErrorType || 'Error';\n  if (client.name === '@hey-api/client-axios') {\n    const symbol = plugin.external('axios.AxiosError');\n    return $.type(symbol).generic(symbolError);\n  }\n  return $.type(symbolError);\n};\n\nexport const useTypeResponse = ({\n  operation,\n  plugin,\n}: {\n  operation: IR.OperationObject;\n  plugin: PiniaColadaPlugin['Instance'];\n}): ReturnType<typeof $.type> => {\n  const symbolResponseType = plugin.querySymbol({\n    category: 'type',\n    resource: 'operation',\n    resourceId: operation.id,\n    role: 'response',\n  });\n  return $.type(symbolResponseType ?? 'unknown');\n};\n"
  },
  {
    "path": "packages/openapi-ts/src/plugins/@pinia/colada/utils.ts",
    "content": "import type { IR } from '@hey-api/shared';\n\nimport { $ } from '../../../ts-dsl';\nimport type { PiniaColadaPlugin } from './types';\nimport { useTypeData } from './useType';\n\nexport const getPublicTypeData = ({\n  isNuxtClient,\n  operation,\n  plugin,\n}: {\n  isNuxtClient: boolean;\n  operation: IR.OperationObject;\n  plugin: PiniaColadaPlugin['Instance'];\n}) => {\n  const typeData = useTypeData({ operation, plugin });\n  return isNuxtClient ? $.type('Omit').generic(typeData).generic('composable') : typeData;\n};\n"
  },
  {
    "path": "packages/openapi-ts/src/plugins/@pinia/colada/v0/plugin.ts",
    "content": "import { createMutationOptions } from '../mutationOptions';\nimport { createQueryOptions } from '../queryOptions';\nimport type { PiniaColadaPlugin } from '../types';\n\nexport const handlerV0: PiniaColadaPlugin['Handler'] = ({ plugin }) => {\n  plugin.symbol('defineQueryOptions', {\n    external: plugin.name,\n    meta: {\n      category: 'external',\n      resource: `${plugin.name}.defineQueryOptions`,\n    },\n  });\n  plugin.symbol('UseMutationOptions', {\n    external: plugin.name,\n    kind: 'type',\n    meta: {\n      category: 'external',\n      resource: `${plugin.name}.UseMutationOptions`,\n    },\n  });\n  plugin.symbol('UseQueryOptions', {\n    external: plugin.name,\n    kind: 'type',\n    meta: {\n      category: 'external',\n      resource: `${plugin.name}.UseQueryOptions`,\n    },\n  });\n  plugin.symbol('_JSONValue', {\n    external: plugin.name,\n    kind: 'type',\n    meta: {\n      category: 'external',\n      resource: `${plugin.name}._JSONValue`,\n    },\n  });\n  plugin.symbol('AxiosError', {\n    external: 'axios',\n    kind: 'type',\n    meta: {\n      category: 'external',\n      resource: 'axios.AxiosError',\n    },\n  });\n\n  plugin.forEach(\n    'operation',\n    ({ operation }) => {\n      if (plugin.hooks.operation.isQuery(operation)) {\n        if (plugin.config.queryOptions.enabled) {\n          createQueryOptions({ operation, plugin });\n        }\n      }\n\n      if (plugin.hooks.operation.isMutation(operation)) {\n        if (plugin.config.mutationOptions.enabled) {\n          createMutationOptions({ operation, plugin });\n        }\n      }\n    },\n    {\n      order: 'declarations',\n    },\n  );\n};\n"
  },
  {
    "path": "packages/openapi-ts/src/plugins/@tanstack/angular-query-experimental/config.ts",
    "content": "import { definePluginConfig, mappers } from '@hey-api/shared';\n\nimport { handler } from '../../../plugins/@tanstack/query-core/plugin';\nimport type { TanStackAngularQueryPlugin } from './types';\n\nexport const defaultConfig: TanStackAngularQueryPlugin['Config'] = {\n  config: {\n    case: 'camelCase',\n    comments: true,\n    includeInEntry: false,\n  },\n  dependencies: ['@hey-api/sdk', '@hey-api/typescript'],\n  handler: handler as TanStackAngularQueryPlugin['Handler'],\n  name: '@tanstack/angular-query-experimental',\n  resolveConfig: (plugin, context) => {\n    plugin.config.infiniteQueryKeys = context.valueToObject({\n      defaultValue: {\n        case: plugin.config.case ?? 'camelCase',\n        enabled: true,\n        name: '{{name}}InfiniteQueryKey',\n        tags: false,\n      },\n      mappers,\n      value: plugin.config.infiniteQueryKeys,\n    });\n\n    plugin.config.infiniteQueryOptions = context.valueToObject({\n      defaultValue: {\n        case: plugin.config.case ?? 'camelCase',\n        enabled: true,\n        name: '{{name}}InfiniteOptions',\n      },\n      mappers,\n      value: plugin.config.infiniteQueryOptions,\n    });\n\n    plugin.config.mutationOptions = context.valueToObject({\n      defaultValue: {\n        case: plugin.config.case ?? 'camelCase',\n        enabled: true,\n        exported: true,\n        name: '{{name}}Mutation',\n      },\n      mappers,\n      value: plugin.config.mutationOptions,\n    });\n\n    plugin.config.queryKeys = context.valueToObject({\n      defaultValue: {\n        case: plugin.config.case ?? 'camelCase',\n        enabled: true,\n        name: '{{name}}QueryKey',\n        tags: false,\n      },\n      mappers,\n      value: plugin.config.queryKeys,\n    });\n\n    plugin.config.queryOptions = context.valueToObject({\n      defaultValue: {\n        case: plugin.config.case ?? 'camelCase',\n        enabled: true,\n        exported: true,\n        name: '{{name}}Options',\n      },\n      mappers,\n      value: plugin.config.queryOptions,\n    });\n  },\n};\n\n/**\n * Type helper for `@tanstack/angular-query-experimental` plugin, returns {@link Plugin.Config} object\n */\nexport const defineConfig = definePluginConfig(defaultConfig);\n"
  },
  {
    "path": "packages/openapi-ts/src/plugins/@tanstack/angular-query-experimental/index.ts",
    "content": "export { defaultConfig, defineConfig } from './config';\nexport type { TanStackAngularQueryPlugin } from './types';\n"
  },
  {
    "path": "packages/openapi-ts/src/plugins/@tanstack/angular-query-experimental/types.ts",
    "content": "import type { Casing, FeatureToggle, NameTransformer, NamingOptions } from '@hey-api/shared';\nimport type { IR } from '@hey-api/shared';\nimport type { DefinePlugin, Plugin } from '@hey-api/shared';\n\nexport type UserConfig = Plugin.Name<'@tanstack/angular-query-experimental'> &\n  Plugin.Hooks &\n  Plugin.UserComments &\n  Plugin.UserExports & {\n    /**\n     * Casing convention for generated names.\n     *\n     * @default 'camelCase'\n     */\n    case?: Casing;\n    /**\n     * Configuration for generated infinite query key helpers.\n     *\n     * See {@link https://tanstack.com/query/v5/docs/framework/angular/reference/infiniteQueryOptions}\n     *\n     * Can be:\n     * - `boolean`: Shorthand for `{ enabled: boolean }`\n     * - `string` or `function`: Shorthand for `{ name: string | function }`\n     * - `object`: Full configuration object\n     *\n     * @default true\n     */\n    infiniteQueryKeys?:\n      | boolean\n      | NameTransformer\n      | {\n          /**\n           * Casing convention for generated names.\n           *\n           * @default 'camelCase'\n           */\n          case?: Casing;\n          /**\n           * Whether this feature is enabled.\n           *\n           * @default true\n           */\n          enabled?: boolean;\n          /**\n           * Naming pattern for generated names.\n           *\n           * @default '{{name}}InfiniteQueryKey'\n           * @see https://tanstack.com/query/v5/docs/framework/angular/reference/infiniteQueryOptions\n           */\n          name?: NameTransformer;\n          /**\n           * Whether to include operation tags in infinite query keys.\n           * This will make query keys larger but provides better cache invalidation capabilities.\n           *\n           * @default false\n           */\n          tags?: boolean;\n        };\n    /**\n     * Configuration for generated infinite query options helpers.\n     *\n     * See {@link https://tanstack.com/query/v5/docs/framework/angular/reference/infiniteQueryOptions}\n     *\n     * Can be:\n     * - `boolean`: Shorthand for `{ enabled: boolean }`\n     * - `string` or `function`: Shorthand for `{ name: string | function }`\n     * - `object`: Full configuration object\n     *\n     * @default true\n     */\n    infiniteQueryOptions?:\n      | boolean\n      | NameTransformer\n      | {\n          /**\n           * Casing convention for generated names.\n           *\n           * @default 'camelCase'\n           */\n          case?: Casing;\n          /**\n           * Whether this feature is enabled.\n           *\n           * @default true\n           */\n          enabled?: boolean;\n          /**\n           * Custom function to generate metadata for the operation.\n           * Can return any valid meta object that will be included in the generated infinite query options.\n           * @param operation - The operation object containing all available metadata\n           * @returns A meta object with any properties you want to include\n           *\n           * @example\n           * ```ts\n           * meta: (operation) => ({\n           *   customField: operation.id,\n           *   isDeprecated: operation.deprecated,\n           *   tags: operation.tags,\n           *   customObject: {\n           *     method: operation.method,\n           *     path: operation.path\n           *   }\n           * })\n           * ```\n           *\n           * @default undefined\n           */\n          meta?: (operation: IR.OperationObject) => Record<string, unknown>;\n          /**\n           * Naming pattern for generated names.\n           *\n           * @default '{{name}}InfiniteOptions'\n           * @see https://tanstack.com/query/v5/docs/framework/angular/reference/infiniteQueryOptions\n           */\n          name?: NameTransformer;\n        };\n    /**\n     * Configuration for generated mutation options helpers.\n     *\n     * See {@link https://tanstack.com/query/v5/docs/framework/angular/reference/useMutation}\n     *\n     * Can be:\n     * - `boolean`: Shorthand for `{ enabled: boolean }`\n     * - `string` or `function`: Shorthand for `{ name: string | function }`\n     * - `object`: Full configuration object\n     *\n     * @default true\n     */\n    mutationOptions?:\n      | boolean\n      | NameTransformer\n      | {\n          /**\n           * Casing convention for generated names.\n           *\n           * @default 'camelCase'\n           */\n          case?: Casing;\n          /**\n           * Whether this feature is enabled.\n           *\n           * @default true\n           */\n          enabled?: boolean;\n          /**\n           * Whether to export generated symbols.\n           *\n           * @default true\n           */\n          exported?: boolean;\n          /**\n           * Custom function to generate metadata for the operation.\n           * Can return any valid meta object that will be included in the generated mutation options.\n           * @param operation - The operation object containing all available metadata\n           * @returns A meta object with any properties you want to include\n           *\n           * @example\n           * ```ts\n           * meta: (operation) => ({\n           *   customField: operation.id,\n           *   isDeprecated: operation.deprecated,\n           *   tags: operation.tags,\n           *   customObject: {\n           *     method: operation.method,\n           *     path: operation.path\n           *   }\n           * })\n           * ```\n           *\n           * @default undefined\n           */\n          meta?: (operation: IR.OperationObject) => Record<string, unknown>;\n          /**\n           * Naming pattern for generated names.\n           *\n           * @default '{{name}}Mutation'\n           * @see https://tanstack.com/query/v5/docs/framework/angular/reference/useMutation\n           */\n          name?: NameTransformer;\n        };\n    /**\n     * Configuration for generated query keys.\n     *\n     * See {@link https://tanstack.com/query/v5/docs/framework/angular/reference/queryKey}\n     *\n     * Can be:\n     * - `boolean`: Shorthand for `{ enabled: boolean }`\n     * - `string` or `function`: Shorthand for `{ name: string | function }`\n     * - `object`: Full configuration object\n     *\n     * @default true\n     */\n    queryKeys?:\n      | boolean\n      | NameTransformer\n      | {\n          /**\n           * Casing convention for generated names.\n           *\n           * @default 'camelCase'\n           */\n          case?: Casing;\n          /**\n           * Whether this feature is enabled.\n           *\n           * @default true\n           */\n          enabled?: boolean;\n          /**\n           * Naming pattern for generated names.\n           *\n           * @default '{{name}}QueryKey'\n           * @see https://tanstack.com/query/v5/docs/framework/angular/reference/queryKey\n           */\n          name?: NameTransformer;\n          /**\n           * Whether to include operation tags in query keys.\n           * This will make query keys larger but provides better cache invalidation capabilities.\n           *\n           * @default false\n           */\n          tags?: boolean;\n        };\n    /**\n     * Configuration for generated query options helpers.\n     *\n     * See {@link https://tanstack.com/query/v5/docs/framework/angular/reference/queryOptions}\n     *\n     * Can be:\n     * - `boolean`: Shorthand for `{ enabled: boolean }`\n     * - `string` or `function`: Shorthand for `{ name: string | function }`\n     * - `object`: Full configuration object\n     *\n     * @default true\n     */\n    queryOptions?:\n      | boolean\n      | NameTransformer\n      | {\n          /**\n           * Casing convention for generated names.\n           *\n           * @default 'camelCase'\n           */\n          case?: Casing;\n          /**\n           * Whether this feature is enabled.\n           *\n           * @default true\n           */\n          enabled?: boolean;\n          /**\n           * Whether to export generated symbols.\n           *\n           * @default true\n           */\n          exported?: boolean;\n          /**\n           * Custom function to generate metadata for the operation.\n           * Can return any valid meta object that will be included in the generated query options.\n           * @param operation - The operation object containing all available metadata\n           * @returns A meta object with any properties you want to include\n           *\n           * @example\n           * ```ts\n           * meta: (operation) => ({\n           *   customField: operation.id,\n           *   isDeprecated: operation.deprecated,\n           *   tags: operation.tags,\n           *   customObject: {\n           *     method: operation.method,\n           *     path: operation.path\n           *   }\n           * })\n           * ```\n           *\n           * @default undefined\n           */\n          meta?: (operation: IR.OperationObject) => Record<string, unknown>;\n          /**\n           * Naming pattern for generated names.\n           *\n           * @default '{{name}}Options'\n           * @see https://tanstack.com/query/v5/docs/framework/angular/reference/queryOptions\n           */\n          name?: NameTransformer;\n        };\n  };\n\nexport type Config = Plugin.Name<'@tanstack/angular-query-experimental'> &\n  Plugin.Hooks &\n  Plugin.Comments &\n  Plugin.Exports & {\n    /**\n     * Casing convention for generated names.\n     */\n    case: Casing;\n    /**\n     * Resolved configuration for generated infinite query key helpers.\n     *\n     * @see https://tanstack.com/query/v5/docs/framework/angular/reference/infiniteQueryOptions\n     */\n    infiniteQueryKeys: NamingOptions &\n      FeatureToggle & {\n        /**\n         * Whether to include operation tags in infinite query keys.\n         * This will make query keys larger but provides better cache invalidation capabilities.\n         *\n         * @default false\n         */\n        tags: boolean;\n      };\n    /**\n     * Resolved configuration for generated infinite query options helpers.\n     *\n     * @see https://tanstack.com/query/v5/docs/framework/angular/reference/infiniteQueryOptions\n     */\n    infiniteQueryOptions: NamingOptions &\n      FeatureToggle & {\n        /**\n         * Custom function to generate metadata for the operation.\n         * Can return any valid meta object that will be included in the generated infinite query options.\n         * @param operation - The operation object containing all available metadata\n         * @returns A meta object with any properties you want to include\n         *\n         * @example\n         * ```ts\n         * meta: (operation) => ({\n         *   customField: operation.id,\n         *   isDeprecated: operation.deprecated,\n         *   tags: operation.tags,\n         *   customObject: {\n         *     method: operation.method,\n         *     path: operation.path\n         *   }\n         * })\n         * ```\n         *\n         * @default undefined\n         */\n        meta: (operation: IR.OperationObject) => Record<string, unknown>;\n      };\n    /**\n     * Resolved configuration for generated mutation options helpers.\n     *\n     * @see https://tanstack.com/query/v5/docs/framework/angular/reference/useMutation\n     */\n    mutationOptions: NamingOptions &\n      FeatureToggle & {\n        /**\n         * Whether to export generated symbols.\n         *\n         * @default true\n         */\n        exported: boolean;\n        /**\n         * Custom function to generate metadata for the operation.\n         * Can return any valid meta object that will be included in the generated mutation options.\n         * @param operation - The operation object containing all available metadata\n         * @returns A meta object with any properties you want to include\n         *\n         * @example\n         * ```ts\n         * meta: (operation) => ({\n         *   customField: operation.id,\n         *   isDeprecated: operation.deprecated,\n         *   tags: operation.tags,\n         *   customObject: {\n         *     method: operation.method,\n         *     path: operation.path\n         *   }\n         * })\n         * ```\n         *\n         * @default undefined\n         */\n        meta: (operation: IR.OperationObject) => Record<string, unknown>;\n      };\n    /**\n     * Resolved configuration for generated query keys.\n     *\n     * @see https://tanstack.com/query/v5/docs/framework/angular/reference/queryKey\n     */\n    queryKeys: NamingOptions &\n      FeatureToggle & {\n        /**\n         * Whether to include operation tags in query keys.\n         * This will make query keys larger but provides better cache invalidation capabilities.\n         *\n         * @default false\n         */\n        tags: boolean;\n      };\n    /**\n     * Resolved configuration for generated query options helpers.\n     *\n     * @see https://tanstack.com/query/v5/docs/framework/angular/reference/queryOptions\n     */\n    queryOptions: NamingOptions &\n      FeatureToggle & {\n        /**\n         * Whether to export generated symbols.\n         *\n         * @default true\n         */\n        exported: boolean;\n        /**\n         * Custom function to generate metadata for the operation.\n         * Can return any valid meta object that will be included in the generated query options.\n         * @param operation - The operation object containing all available metadata\n         * @returns A meta object with any properties you want to include\n         *\n         * @example\n         * ```ts\n         * meta: (operation) => ({\n         *   customField: operation.id,\n         *   isDeprecated: operation.deprecated,\n         *   tags: operation.tags,\n         *   customObject: {\n         *     method: operation.method,\n         *     path: operation.path\n         *   }\n         * })\n         * ```\n         *\n         * @default undefined\n         */\n        meta: (operation: IR.OperationObject) => Record<string, unknown>;\n      };\n  };\n\nexport type TanStackAngularQueryPlugin = DefinePlugin<UserConfig, Config>;\n"
  },
  {
    "path": "packages/openapi-ts/src/plugins/@tanstack/preact-query/config.ts",
    "content": "import { definePluginConfig, mappers } from '@hey-api/shared';\n\nimport { handler } from '../../../plugins/@tanstack/query-core/plugin';\nimport type { TanStackPreactQueryPlugin } from './types';\n\nexport const defaultConfig: TanStackPreactQueryPlugin['Config'] = {\n  config: {\n    case: 'camelCase',\n    comments: true,\n    includeInEntry: false,\n  },\n  dependencies: ['@hey-api/sdk', '@hey-api/typescript'],\n  handler: handler as TanStackPreactQueryPlugin['Handler'],\n  name: '@tanstack/preact-query',\n  resolveConfig: (plugin, context) => {\n    plugin.config.infiniteQueryKeys = context.valueToObject({\n      defaultValue: {\n        case: plugin.config.case ?? 'camelCase',\n        enabled: true,\n        name: '{{name}}InfiniteQueryKey',\n        tags: false,\n      },\n      mappers,\n      value: plugin.config.infiniteQueryKeys,\n    });\n\n    plugin.config.infiniteQueryOptions = context.valueToObject({\n      defaultValue: {\n        case: plugin.config.case ?? 'camelCase',\n        enabled: true,\n        name: '{{name}}InfiniteOptions',\n      },\n      mappers,\n      value: plugin.config.infiniteQueryOptions,\n    });\n\n    plugin.config.mutationOptions = context.valueToObject({\n      defaultValue: {\n        case: plugin.config.case ?? 'camelCase',\n        enabled: true,\n        exported: true,\n        name: '{{name}}Mutation',\n      },\n      mappers,\n      value: plugin.config.mutationOptions,\n    });\n\n    plugin.config.queryKeys = context.valueToObject({\n      defaultValue: {\n        case: plugin.config.case ?? 'camelCase',\n        enabled: true,\n        name: '{{name}}QueryKey',\n        tags: false,\n      },\n      mappers,\n      value: plugin.config.queryKeys,\n    });\n\n    plugin.config.queryOptions = context.valueToObject({\n      defaultValue: {\n        case: plugin.config.case ?? 'camelCase',\n        enabled: true,\n        exported: true,\n        name: '{{name}}Options',\n      },\n      mappers,\n      value: plugin.config.queryOptions,\n    });\n\n    plugin.config.useMutation = context.valueToObject({\n      defaultValue: {\n        case: plugin.config.case ?? 'camelCase',\n        enabled: false,\n        name: 'use{{name}}Mutation',\n      },\n      mappers: {\n        boolean: (enabled) => ({ enabled }),\n        function: (name) => ({ enabled: true, name }),\n        object: (fields) => ({ enabled: true, ...fields }),\n        string: (name) => ({ enabled: true, name }),\n      },\n      value: plugin.config.useMutation,\n    });\n\n    plugin.config.useQuery = context.valueToObject({\n      defaultValue: {\n        case: plugin.config.case ?? 'camelCase',\n        enabled: false,\n        name: 'use{{name}}Query',\n      },\n      mappers: {\n        boolean: (enabled) => ({ enabled }),\n        function: (name) => ({ enabled: true, name }),\n        object: (fields) => ({ enabled: true, ...fields }),\n        string: (name) => ({ enabled: true, name }),\n      },\n      value: plugin.config.useQuery,\n    });\n\n    if (plugin.config.useMutation.enabled) {\n      if (!plugin.config.mutationOptions.enabled) {\n        plugin.config.mutationOptions.enabled = true;\n        plugin.config.mutationOptions.exported = false;\n      }\n    }\n\n    if (plugin.config.useQuery.enabled) {\n      if (!plugin.config.queryOptions.enabled) {\n        plugin.config.queryOptions.enabled = true;\n        plugin.config.queryOptions.exported = false;\n      }\n    }\n  },\n};\n\n/**\n * Type helper for `@tanstack/preact-query` plugin, returns {@link Plugin.Config} object\n */\nexport const defineConfig = definePluginConfig(defaultConfig);\n"
  },
  {
    "path": "packages/openapi-ts/src/plugins/@tanstack/preact-query/index.ts",
    "content": "export { defaultConfig, defineConfig } from './config';\nexport type { TanStackPreactQueryPlugin } from './types';\n"
  },
  {
    "path": "packages/openapi-ts/src/plugins/@tanstack/preact-query/types.ts",
    "content": "import type { Casing, FeatureToggle, NameTransformer, NamingOptions } from '@hey-api/shared';\nimport type { IR } from '@hey-api/shared';\nimport type { DefinePlugin, Plugin } from '@hey-api/shared';\n\nexport type UserConfig = Plugin.Name<'@tanstack/preact-query'> &\n  Plugin.Hooks &\n  Plugin.UserComments &\n  Plugin.UserExports & {\n    /**\n     * Casing convention for generated names.\n     *\n     * @default 'camelCase'\n     */\n    case?: Casing;\n    /**\n     * Configuration for generated infinite query key helpers.\n     *\n     * See {@link https://tanstack.com/query/v5/docs/framework/preact/reference/infiniteQueryOptions infiniteQueryOptions}\n     *\n     * Can be:\n     * - `boolean`: Shorthand for `{ enabled: boolean }`\n     * - `string` or `function`: Shorthand for `{ name: string | function }`\n     * - `object`: Full configuration object\n     *\n     * @default true\n     */\n    infiniteQueryKeys?:\n      | boolean\n      | NameTransformer\n      | {\n          /**\n           * Casing convention for generated names.\n           *\n           * @default 'camelCase'\n           */\n          case?: Casing;\n          /**\n           * Whether this feature is enabled.\n           *\n           * @default true\n           */\n          enabled?: boolean;\n          /**\n           * Naming pattern for generated names.\n           *\n           * See {@link https://tanstack.com/query/v5/docs/framework/preact/reference/infiniteQueryOptions infiniteQueryOptions}\n           *\n           * @default '{{name}}InfiniteQueryKey'\n           */\n          name?: NameTransformer;\n          /**\n           * Whether to include operation tags in infinite query keys.\n           * This will make query keys larger but provides better cache invalidation capabilities.\n           *\n           * @default false\n           */\n          tags?: boolean;\n        };\n    /**\n     * Configuration for generated infinite query options helpers.\n     *\n     * See {@link https://tanstack.com/query/v5/docs/framework/preact/reference/infiniteQueryOptions infiniteQueryOptions}\n     *\n     * Can be:\n     * - `boolean`: Shorthand for `{ enabled: boolean }`\n     * - `string` or `function`: Shorthand for `{ name: string | function }`\n     * - `object`: Full configuration object\n     *\n     * @default true\n     */\n    infiniteQueryOptions?:\n      | boolean\n      | NameTransformer\n      | {\n          /**\n           * Casing convention for generated names.\n           *\n           * @default 'camelCase'\n           */\n          case?: Casing;\n          /**\n           * Whether this feature is enabled.\n           *\n           * @default true\n           */\n          enabled?: boolean;\n          /**\n           * Custom function to generate metadata for the operation.\n           * Can return any valid meta object that will be included in the generated infinite query options.\n           *\n           * @param operation - The operation object containing all available metadata\n           * @returns A meta object with any properties you want to include\n           *\n           * @example\n           * ```ts\n           * meta: (operation) => ({\n           *   customField: operation.id,\n           *   isDeprecated: operation.deprecated,\n           *   tags: operation.tags,\n           *   customObject: {\n           *     method: operation.method,\n           *     path: operation.path\n           *   }\n           * })\n           * ```\n           *\n           * @default undefined\n           */\n          meta?: (operation: IR.OperationObject) => Record<string, unknown>;\n          /**\n           * Naming pattern for generated names.\n           *\n           * See {@link https://tanstack.com/query/v5/docs/framework/preact/reference/infiniteQueryOptions infiniteQueryOptions}\n           *\n           * @default '{{name}}InfiniteOptions'\n           */\n          name?: NameTransformer;\n        };\n    /**\n     * Configuration for generated mutation options helpers.\n     *\n     * See {@link https://tanstack.com/query/v5/docs/framework/preact/reference/useMutation useMutation}\n     *\n     * Can be:\n     * - `boolean`: Shorthand for `{ enabled: boolean }`\n     * - `string` or `function`: Shorthand for `{ name: string | function }`\n     * - `object`: Full configuration object\n     *\n     * @default true\n     */\n    mutationOptions?:\n      | boolean\n      | NameTransformer\n      | {\n          /**\n           * Casing convention for generated names.\n           *\n           * @default 'camelCase'\n           */\n          case?: Casing;\n          /**\n           * Whether this feature is enabled.\n           *\n           * @default true\n           */\n          enabled?: boolean;\n          /**\n           * Whether to export generated symbols.\n           *\n           * @default true\n           */\n          exported?: boolean;\n          /**\n           * Custom function to generate metadata for the operation.\n           * Can return any valid meta object that will be included in the generated mutation options.\n           *\n           * @param operation - The operation object containing all available metadata\n           * @returns A meta object with any properties you want to include\n           *\n           * @example\n           * ```ts\n           * meta: (operation) => ({\n           *   customField: operation.id,\n           *   isDeprecated: operation.deprecated,\n           *   tags: operation.tags,\n           *   customObject: {\n           *     method: operation.method,\n           *     path: operation.path\n           *   }\n           * })\n           * ```\n           *\n           * @default undefined\n           */\n          meta?: (operation: IR.OperationObject) => Record<string, unknown>;\n          /**\n           * Naming pattern for generated names.\n           *\n           * See {@link https://tanstack.com/query/v5/docs/framework/preact/reference/useMutation useMutation}\n           *\n           * @default '{{name}}Mutation'\n           */\n          name?: NameTransformer;\n        };\n    /**\n     * Configuration for generated query keys.\n     *\n     * See {@link https://tanstack.com/query/v5/docs/framework/preact/reference/queryKey queryKey}\n     *\n     * Can be:\n     * - `boolean`: Shorthand for `{ enabled: boolean }`\n     * - `string` or `function`: Shorthand for `{ name: string | function }`\n     * - `object`: Full configuration object\n     *\n     * @default true\n     */\n    queryKeys?:\n      | boolean\n      | NameTransformer\n      | {\n          /**\n           * Casing convention for generated names.\n           *\n           * @default 'camelCase'\n           */\n          case?: Casing;\n          /**\n           * Whether this feature is enabled.\n           *\n           * @default true\n           */\n          enabled?: boolean;\n          /**\n           * Naming pattern for generated names.\n           *\n           * See {@link https://tanstack.com/query/v5/docs/framework/preact/guides/query-keys Query Keys}\n           *\n           * @default '{{name}}QueryKey'\n           */\n          name?: NameTransformer;\n          /**\n           * Whether to include operation tags in query keys.\n           * This will make query keys larger but provides better cache invalidation capabilities.\n           *\n           * @default false\n           */\n          tags?: boolean;\n        };\n    /**\n     * Configuration for generated query options helpers.\n     *\n     * See {@link https://tanstack.com/query/v5/docs/framework/preact/reference/queryOptions queryOptions}\n     *\n     * Can be:\n     * - `boolean`: Shorthand for `{ enabled: boolean }`\n     * - `string` or `function`: Shorthand for `{ name: string | function }`\n     * - `object`: Full configuration object\n     *\n     * @default true\n     */\n    queryOptions?:\n      | boolean\n      | NameTransformer\n      | {\n          /**\n           * Casing convention for generated names.\n           *\n           * @default 'camelCase'\n           */\n          case?: Casing;\n          /**\n           * Whether this feature is enabled.\n           *\n           * @default true\n           */\n          enabled?: boolean;\n          /**\n           * Whether to export generated symbols.\n           *\n           * @default true\n           */\n          exported?: boolean;\n          /**\n           * Custom function to generate metadata for the operation.\n           * Can return any valid meta object that will be included in the generated query options.\n           *\n           * @param operation - The operation object containing all available metadata\n           * @returns A meta object with any properties you want to include\n           *\n           * @example\n           * ```ts\n           * meta: (operation) => ({\n           *   customField: operation.id,\n           *   isDeprecated: operation.deprecated,\n           *   tags: operation.tags,\n           *   customObject: {\n           *     method: operation.method,\n           *     path: operation.path\n           *   }\n           * })\n           * ```\n           *\n           * @default undefined\n           */\n          meta?: (operation: IR.OperationObject) => Record<string, unknown>;\n          /**\n           * Naming pattern for generated names.\n           *\n           * See {@link https://tanstack.com/query/v5/docs/framework/preact/reference/queryOptions queryOptions}\n           *\n           * @default '{{name}}Options'\n           */\n          name?: NameTransformer;\n        };\n    /**\n     * Configuration for generated `useMutation()` function helpers.\n     *\n     * See {@link https://tanstack.com/query/v5/docs/framework/preact/reference/useMutation useMutation}\n     *\n     * Can be:\n     * - `boolean`: Shorthand for `{ enabled: boolean }`\n     * - `string` or `function`: Shorthand for `{ name: string | function }`\n     * - `object`: Full configuration object\n     *\n     * @default false\n     */\n    useMutation?:\n      | boolean\n      | NameTransformer\n      | {\n          /**\n           * Casing convention for generated names.\n           *\n           * @default 'camelCase'\n           */\n          case?: Casing;\n          /**\n           * Whether this feature is enabled.\n           *\n           * @default false\n           */\n          enabled?: boolean;\n          /**\n           * Naming pattern for generated names.\n           *\n           * See {@link https://tanstack.com/query/v5/docs/framework/preact/reference/useMutation useMutation}\n           *\n           * @default 'use{{name}}Mutation'\n           */\n          name?: NameTransformer;\n        };\n    /**\n     * Configuration for generated `useQuery()` function helpers.\n     *\n     * See {@link https://tanstack.com/query/v5/docs/framework/preact/reference/useQuery useQuery}\n     *\n     * Can be:\n     * - `boolean`: Shorthand for `{ enabled: boolean }`\n     * - `string` or `function`: Shorthand for `{ name: string | function }`\n     * - `object`: Full configuration object\n     *\n     * @default false\n     */\n    useQuery?:\n      | boolean\n      | NameTransformer\n      | {\n          /**\n           * Casing convention for generated names.\n           *\n           * @default 'camelCase'\n           */\n          case?: Casing;\n          /**\n           * Whether this feature is enabled.\n           *\n           * @default true\n           */\n          enabled?: boolean;\n          /**\n           * Naming pattern for generated names.\n           *\n           * See {@link https://tanstack.com/query/v5/docs/framework/preact/reference/useQuery useQuery}\n           *\n           * @default 'use{{name}}Query'\n           */\n          name?: NameTransformer;\n        };\n  };\n\nexport type Config = Plugin.Name<'@tanstack/preact-query'> &\n  Plugin.Hooks &\n  Plugin.Comments &\n  Plugin.Exports & {\n    /**\n     * Casing convention for generated names.\n     */\n    case: Casing;\n    /**\n     * Resolved configuration for generated infinite query key helpers.\n     *\n     * See {@link https://tanstack.com/query/v5/docs/framework/preact/reference/infiniteQueryOptions infiniteQueryOptions}\n     */\n    infiniteQueryKeys: NamingOptions &\n      FeatureToggle & {\n        /**\n         * Whether to include operation tags in infinite query keys.\n         * This will make query keys larger but provides better cache invalidation capabilities.\n         *\n         * @default false\n         */\n        tags: boolean;\n      };\n    /**\n     * Resolved configuration for generated infinite query options helpers.\n     *\n     * See {@link https://tanstack.com/query/v5/docs/framework/preact/reference/infiniteQueryOptions infiniteQueryOptions}\n     */\n    infiniteQueryOptions: NamingOptions &\n      FeatureToggle & {\n        /**\n         * Custom function to generate metadata for the operation.\n         * Can return any valid meta object that will be included in the generated infinite query options.\n         *\n         * @param operation - The operation object containing all available metadata\n         * @returns A meta object with any properties you want to include\n         *\n         * @example\n         * ```ts\n         * meta: (operation) => ({\n         *   customField: operation.id,\n         *   isDeprecated: operation.deprecated,\n         *   tags: operation.tags,\n         *   customObject: {\n         *     method: operation.method,\n         *     path: operation.path\n         *   }\n         * })\n         * ```\n         *\n         * @default undefined\n         */\n        meta: (operation: IR.OperationObject) => Record<string, unknown>;\n      };\n    /**\n     * Resolved configuration for generated mutation options helpers.\n     *\n     * See {@link https://tanstack.com/query/v5/docs/framework/preact/reference/useMutation useMutation}\n     */\n    mutationOptions: NamingOptions &\n      FeatureToggle & {\n        /**\n         * Whether to export generated symbols.\n         *\n         * @default true\n         */\n        exported: boolean;\n        /**\n         * Custom function to generate metadata for the operation.\n         * Can return any valid meta object that will be included in the generated mutation options.\n         *\n         * @param operation - The operation object containing all available metadata\n         * @returns A meta object with any properties you want to include\n         *\n         * @example\n         * ```ts\n         * meta: (operation) => ({\n         *   customField: operation.id,\n         *   isDeprecated: operation.deprecated,\n         *   tags: operation.tags,\n         *   customObject: {\n         *     method: operation.method,\n         *     path: operation.path\n         *   }\n         * })\n         * ```\n         *\n         * @default undefined\n         */\n        meta: (operation: IR.OperationObject) => Record<string, unknown>;\n      };\n    /**\n     * Resolved configuration for generated query keys.\n     *\n     * See {@link https://tanstack.com/query/v5/docs/framework/preact/guides/query-keys Query Keys}\n     */\n    queryKeys: NamingOptions &\n      FeatureToggle & {\n        /**\n         * Whether to include operation tags in query keys.\n         * This will make query keys larger but provides better cache invalidation capabilities.\n         *\n         * @default false\n         */\n        tags: boolean;\n      };\n    /**\n     * Resolved configuration for generated query options helpers.\n     *\n     * See {@link https://tanstack.com/query/v5/docs/framework/preact/reference/queryOptions queryOptions}\n     */\n    queryOptions: NamingOptions &\n      FeatureToggle & {\n        /**\n         * Whether to export generated symbols.\n         *\n         * @default true\n         */\n        exported: boolean;\n        /**\n         * Custom function to generate metadata for the operation.\n         * Can return any valid meta object that will be included in the generated query options.\n         *\n         * @param operation - The operation object containing all available metadata\n         * @returns A meta object with any properties you want to include\n         *\n         * @example\n         * ```ts\n         * meta: (operation) => ({\n         *   customField: operation.id,\n         *   isDeprecated: operation.deprecated,\n         *   tags: operation.tags,\n         *   customObject: {\n         *     method: operation.method,\n         *     path: operation.path\n         *   }\n         * })\n         * ```\n         *\n         * @default undefined\n         */\n        meta: (operation: IR.OperationObject) => Record<string, unknown>;\n      };\n    /**\n     * Configuration for generated `useMutation()` function helpers.\n     *\n     * See {@link https://tanstack.com/query/v5/docs/framework/preact/reference/useMutation useMutation}\n     */\n    useMutation: NamingOptions & FeatureToggle;\n    /**\n     * Configuration for generated `useQuery()` function helpers.\n     *\n     * See {@link https://tanstack.com/query/v5/docs/framework/preact/reference/useQuery useQuery}\n     */\n    useQuery: NamingOptions & FeatureToggle;\n  };\n\nexport type TanStackPreactQueryPlugin = DefinePlugin<UserConfig, Config>;\n"
  },
  {
    "path": "packages/openapi-ts/src/plugins/@tanstack/query-core/plugin.ts",
    "content": "import type { PluginHandler } from './types';\nimport { handlerV5 } from './v5/plugin';\n\nexport const handler: PluginHandler = (args) => handlerV5(args as Parameters<PluginHandler>[0]);\n"
  },
  {
    "path": "packages/openapi-ts/src/plugins/@tanstack/query-core/queryKey.ts",
    "content": "import type { Symbol } from '@hey-api/codegen-core';\nimport type { IR } from '@hey-api/shared';\nimport { applyNaming, hasOperationDataRequired } from '@hey-api/shared';\nimport type ts from 'typescript';\n\nimport { getTypedConfig } from '../../../config/utils';\nimport { getClientBaseUrlKey } from '../../../plugins/@hey-api/client-core/utils';\nimport type { TsDsl } from '../../../ts-dsl';\nimport { $ } from '../../../ts-dsl';\nimport { useTypeData } from './shared/useType';\nimport type { PluginInstance } from './types';\n\nconst TOptionsType = 'TOptions';\n\nexport const createQueryKeyFunction = ({ plugin }: { plugin: PluginInstance }) => {\n  const symbolCreateQueryKey = plugin.symbol(\n    applyNaming('createQueryKey', {\n      case: plugin.config.case,\n    }),\n    {\n      meta: {\n        category: 'utility',\n        resource: 'createQueryKey',\n        tool: plugin.name,\n      },\n    },\n  );\n  const symbolQueryKeyType = plugin.referenceSymbol({\n    category: 'type',\n    resource: 'QueryKey',\n    tool: plugin.name,\n  });\n\n  const baseUrlKey = getClientBaseUrlKey(getTypedConfig(plugin));\n\n  const symbolClient = plugin.getSymbol({\n    category: 'client',\n  });\n\n  const symbolOptions = plugin.referenceSymbol({\n    category: 'type',\n    resource: 'client-options',\n    tool: 'sdk',\n  });\n\n  const returnType = $.type(symbolQueryKeyType).generic(TOptionsType).idx(0);\n\n  const fn = $.const(symbolCreateQueryKey).assign(\n    $.func()\n      .param('id', (p) => p.type('string'))\n      .param('options', (p) => p.optional().type(TOptionsType))\n      .param('infinite', (p) => p.optional().type('boolean'))\n      .param('tags', (p) => p.optional().type('ReadonlyArray<string>'))\n      .generic(TOptionsType, (g) => g.extends(symbolOptions))\n      .returns($.type.tuple(returnType))\n      .do(\n        $.const('params')\n          .type(returnType)\n          .assign(\n            $.object()\n              .prop('_id', 'id')\n              .prop(\n                baseUrlKey,\n                $('options')\n                  .attr(baseUrlKey)\n                  .optional()\n                  .or(\n                    $('options')\n                      .attr('client')\n                      .optional()\n                      .$if(symbolClient, (a, v) => a.coalesce(v))\n                      .attr('getConfig')\n                      .call()\n                      .attr(baseUrlKey),\n                  ),\n              )\n              .as(returnType),\n          ),\n        $.if('infinite').do($('params').attr('_infinite').assign('infinite')),\n        $.if('tags').do($('params').attr('tags').assign('tags')),\n        $.if($('options').attr('body').optional()).do(\n          $('params').attr('body').assign($('options').attr('body')),\n        ),\n        $.if($('options').attr('headers').optional()).do(\n          $('params').attr('headers').assign($('options').attr('headers')),\n        ),\n        $.if($('options').attr('path').optional()).do(\n          $('params').attr('path').assign($('options').attr('path')),\n        ),\n        $.if($('options').attr('query').optional()).do(\n          $('params').attr('query').assign($('options').attr('query')),\n        ),\n        $.return($.array().element($('params'))),\n      ),\n  );\n  plugin.node(fn);\n};\n\nconst createQueryKeyLiteral = ({\n  id,\n  isInfinite,\n  operation,\n  plugin,\n}: {\n  id: string;\n  isInfinite?: boolean;\n  operation: IR.OperationObject;\n  plugin: PluginInstance;\n}) => {\n  const config = isInfinite ? plugin.config.infiniteQueryKeys : plugin.config.queryKeys;\n  let tagsArray: TsDsl<ts.ArrayLiteralExpression> | undefined;\n  if (config.tags && operation.tags && operation.tags.length > 0) {\n    tagsArray = $.array().elements(...operation.tags);\n  }\n  const symbolCreateQueryKey = plugin.referenceSymbol({\n    category: 'utility',\n    resource: 'createQueryKey',\n    tool: plugin.name,\n  });\n  const createQueryKeyCallExpression = $(symbolCreateQueryKey).call(\n    $.literal(id),\n    'options',\n    isInfinite || tagsArray ? $.literal(Boolean(isInfinite)) : undefined,\n    tagsArray,\n  );\n  return createQueryKeyCallExpression;\n};\n\nexport const createQueryKeyType = ({ plugin }: { plugin: PluginInstance }) => {\n  const symbolOptions = plugin.referenceSymbol({\n    category: 'type',\n    resource: 'client-options',\n    tool: 'sdk',\n  });\n  const symbolQueryKeyType = plugin.symbol('QueryKey', {\n    meta: {\n      category: 'type',\n      resource: 'QueryKey',\n      tool: plugin.name,\n    },\n  });\n  const queryKeyType = $.type\n    .alias(symbolQueryKeyType)\n    .export()\n    .generic(TOptionsType, (g) => g.extends(symbolOptions))\n    .type(\n      $.type.tuple(\n        $.type.and(\n          $.type(\n            `Pick<${TOptionsType}, '${getClientBaseUrlKey(getTypedConfig(plugin))}' | 'body' | 'headers' | 'path' | 'query'>`,\n          ),\n          $.type\n            .object()\n            .prop('_id', (p) => p.type('string'))\n            .prop('_infinite', (p) => p.optional().type('boolean'))\n            .prop('tags', (p) => p.optional().type('ReadonlyArray<string>')),\n        ),\n      ),\n    );\n  plugin.node(queryKeyType);\n};\n\nexport const queryKeyStatement = ({\n  isInfinite,\n  operation,\n  plugin,\n  symbol,\n  typeQueryKey,\n}: {\n  isInfinite: boolean;\n  operation: IR.OperationObject;\n  plugin: PluginInstance;\n  symbol: Symbol;\n  typeQueryKey?: ReturnType<typeof $.type>;\n}) => {\n  const typeData = useTypeData({ operation, plugin });\n  const statement = $.const(symbol)\n    .export()\n    .assign(\n      $.func()\n        .param('options', (p) => p.required(hasOperationDataRequired(operation)).type(typeData))\n        .$if(isInfinite && typeQueryKey, (f, v) => f.returns(v))\n        .do(\n          createQueryKeyLiteral({\n            id: operation.id,\n            isInfinite,\n            operation,\n            plugin,\n          }).return(),\n        ),\n    );\n  return statement;\n};\n"
  },
  {
    "path": "packages/openapi-ts/src/plugins/@tanstack/query-core/shared/meta.ts",
    "content": "import type { IR } from '@hey-api/shared';\n\nimport { $ } from '../../../../ts-dsl';\nimport type { PluginInstance } from '../types';\n\nexport const handleMeta = (\n  plugin: PluginInstance,\n  operation: IR.OperationObject,\n  configPath: 'queryOptions' | 'infiniteQueryOptions' | 'mutationOptions',\n): ReturnType<typeof $.fromValue> | undefined => {\n  const metaFn = plugin.config[configPath].meta;\n  if (!metaFn) return;\n\n  const metaObject = metaFn(operation);\n  if (!Object.keys(metaObject).length) return;\n\n  return $.fromValue(metaObject);\n};\n"
  },
  {
    "path": "packages/openapi-ts/src/plugins/@tanstack/query-core/shared/useType.ts",
    "content": "import type { IR } from '@hey-api/shared';\n\nimport { getTypedConfig } from '../../../../config/utils';\nimport { getClientPlugin } from '../../../../plugins/@hey-api/client-core/utils';\nimport { operationOptionsType } from '../../../../plugins/@hey-api/sdk/shared/operation';\nimport { $ } from '../../../../ts-dsl';\nimport type { PluginInstance } from '../types';\n\nexport const useTypeData = ({\n  operation,\n  plugin,\n}: {\n  operation: IR.OperationObject;\n  plugin: PluginInstance;\n}): ReturnType<typeof $.type> => {\n  const pluginSdk = plugin.getPluginOrThrow('@hey-api/sdk');\n  return operationOptionsType({ operation, plugin: pluginSdk });\n};\n\nexport const useTypeError = ({\n  operation,\n  plugin,\n}: {\n  operation: IR.OperationObject;\n  plugin: PluginInstance;\n}): ReturnType<typeof $.type> => {\n  const client = getClientPlugin(getTypedConfig(plugin));\n  const symbolErrorType = plugin.querySymbol({\n    category: 'type',\n    resource: 'operation',\n    resourceId: operation.id,\n    role: 'error',\n  });\n  const symbolError = symbolErrorType || plugin.external(`${plugin.name}.DefaultError`);\n  if (client.name === '@hey-api/client-axios') {\n    const symbol = plugin.external('axios.AxiosError');\n    return $.type(symbol).generic(symbolError);\n  }\n  return $.type(symbolError);\n};\n\nexport const useTypeResponse = ({\n  operation,\n  plugin,\n}: {\n  operation: IR.OperationObject;\n  plugin: PluginInstance;\n}): ReturnType<typeof $.type> => {\n  const symbolResponseType = plugin.querySymbol({\n    category: 'type',\n    resource: 'operation',\n    resourceId: operation.id,\n    role: 'response',\n  });\n  return $.type(symbolResponseType ?? 'unknown');\n};\n"
  },
  {
    "path": "packages/openapi-ts/src/plugins/@tanstack/query-core/types.ts",
    "content": "import type { TanStackAngularQueryPlugin } from '../../../plugins/@tanstack/angular-query-experimental/types';\nimport type { TanStackPreactQueryPlugin } from '../../../plugins/@tanstack/preact-query/types';\nimport type { TanStackReactQueryPlugin } from '../../../plugins/@tanstack/react-query/types';\nimport type { TanStackSolidQueryPlugin } from '../../../plugins/@tanstack/solid-query/types';\nimport type { TanStackSvelteQueryPlugin } from '../../../plugins/@tanstack/svelte-query/types';\nimport type { TanStackVueQueryPlugin } from '../../../plugins/@tanstack/vue-query/types';\n\nexport interface PluginHandler {\n  (...args: Parameters<TanStackAngularQueryPlugin['Handler']>): void;\n  (...args: Parameters<TanStackPreactQueryPlugin['Handler']>): void;\n  (...args: Parameters<TanStackReactQueryPlugin['Handler']>): void;\n  (...args: Parameters<TanStackSolidQueryPlugin['Handler']>): void;\n  (...args: Parameters<TanStackSvelteQueryPlugin['Handler']>): void;\n  (...args: Parameters<TanStackVueQueryPlugin['Handler']>): void;\n}\n\nexport type PluginInstance =\n  | TanStackAngularQueryPlugin['Instance']\n  | TanStackPreactQueryPlugin['Instance']\n  | TanStackReactQueryPlugin['Instance']\n  | TanStackSolidQueryPlugin['Instance']\n  | TanStackSvelteQueryPlugin['Instance']\n  | TanStackVueQueryPlugin['Instance'];\n"
  },
  {
    "path": "packages/openapi-ts/src/plugins/@tanstack/query-core/v5/infiniteQueryOptions.ts",
    "content": "import type { IR } from '@hey-api/shared';\nimport { applyNaming, operationPagination } from '@hey-api/shared';\n\nimport {\n  createOperationComment,\n  isOperationOptionsRequired,\n} from '../../../../plugins/shared/utils/operation';\nimport type { TsDsl } from '../../../../ts-dsl';\nimport { $ } from '../../../../ts-dsl';\nimport { createQueryKeyFunction, createQueryKeyType, queryKeyStatement } from '../queryKey';\nimport { handleMeta } from '../shared/meta';\nimport { useTypeData, useTypeError, useTypeResponse } from '../shared/useType';\nimport type { PluginInstance } from '../types';\n\nconst createInfiniteParamsFunction = ({ plugin }: { plugin: PluginInstance }) => {\n  const symbolCreateInfiniteParams = plugin.symbol(\n    applyNaming('createInfiniteParams', {\n      case: plugin.config.case,\n    }),\n    {\n      meta: {\n        category: 'utility',\n        resource: 'createInfiniteParams',\n        tool: plugin.name,\n      },\n    },\n  );\n\n  const fn = $.const(symbolCreateInfiniteParams).assign(\n    $.func()\n      .generic('K', (g) =>\n        g.extends(\n          $.type('Pick').generics(\n            $.type('QueryKey').generic('Options').idx(0),\n            $.type.or(\n              $.type.literal('body'),\n              $.type.literal('headers'),\n              $.type.literal('path'),\n              $.type.literal('query'),\n            ),\n          ),\n        ),\n      )\n      .param('queryKey', (p) => p.type('QueryKey<Options>'))\n      .param('page', (p) => p.type('K'))\n      .do(\n        $.const('params').assign($.object().spread($('queryKey').attr(0))),\n        $.if($('page').attr('body')).do(\n          $('params')\n            .attr('body')\n            .assign(\n              $.object()\n                .pretty()\n                .spread($('queryKey').attr(0).attr('body').as('any'))\n                .spread($('page').attr('body').as('any')),\n            ),\n        ),\n        $.if($('page').attr('headers')).do(\n          $('params')\n            .attr('headers')\n            .assign(\n              $.object()\n                .pretty()\n                .spread($('queryKey').attr(0).attr('headers'))\n                .spread($('page').attr('headers')),\n            ),\n        ),\n        $.if($('page').attr('path')).do(\n          $('params')\n            .attr('path')\n            .assign(\n              $.object()\n                .pretty()\n                .spread($('queryKey').attr(0).attr('path').as('any'))\n                .spread($('page').attr('path').as('any')),\n            ),\n        ),\n        $.if($('page').attr('query')).do(\n          $('params')\n            .attr('query')\n            .assign(\n              $.object()\n                .pretty()\n                .spread($('queryKey').attr(0).attr('query').as('any'))\n                .spread($('page').attr('query').as('any')),\n            ),\n        ),\n        $.return($('params').as('unknown').as($('page').typeofType())),\n      ),\n  );\n  plugin.node(fn);\n};\n\nexport const createInfiniteQueryOptions = ({\n  operation,\n  plugin,\n}: {\n  operation: IR.OperationObject;\n  plugin: PluginInstance;\n}): void => {\n  const pagination = operationPagination({\n    context: plugin.context,\n    operation,\n  });\n\n  if (!pagination) {\n    return;\n  }\n\n  const isRequiredOptions = isOperationOptionsRequired({\n    context: plugin.context,\n    operation,\n  });\n\n  if (\n    !plugin.getSymbol({\n      category: 'utility',\n      resource: 'createQueryKey',\n      tool: plugin.name,\n    })\n  ) {\n    createQueryKeyType({ plugin });\n    createQueryKeyFunction({ plugin });\n  }\n\n  if (\n    !plugin.getSymbol({\n      category: 'utility',\n      resource: 'createInfiniteParams',\n      tool: plugin.name,\n    })\n  ) {\n    createInfiniteParamsFunction({ plugin });\n  }\n\n  const symbolInfiniteQueryOptions = plugin.external(`${plugin.name}.infiniteQueryOptions`);\n  const symbolInfiniteDataType = plugin.external(`${plugin.name}.InfiniteData`);\n\n  const typeData = useTypeData({ operation, plugin });\n  const typeResponse = useTypeResponse({ operation, plugin });\n\n  const symbolQueryKeyType = plugin.referenceSymbol({\n    category: 'type',\n    resource: 'QueryKey',\n    tool: plugin.name,\n  });\n  const typeQueryKey = $.type(symbolQueryKeyType).generic(typeData);\n  const typePageObjectParam = $.type('Pick').generics(\n    typeQueryKey.idx(0),\n    $.type.or(\n      $.type.literal('body'),\n      $.type.literal('headers'),\n      $.type.literal('path'),\n      $.type.literal('query'),\n    ),\n  );\n  const pluginTypeScript = plugin.getPluginOrThrow('@hey-api/typescript');\n  const type = pluginTypeScript.api.schemaToType(pluginTypeScript, pagination.schema);\n\n  const symbolInfiniteQueryKey = plugin.symbol(\n    applyNaming(operation.id, plugin.config.infiniteQueryKeys),\n  );\n  const node = queryKeyStatement({\n    isInfinite: true,\n    operation,\n    plugin,\n    symbol: symbolInfiniteQueryKey,\n    typeQueryKey,\n  });\n  plugin.node(node);\n\n  const awaitSdkFn = $.lazy((ctx) =>\n    ctx\n      .access(\n        plugin.referenceSymbol({\n          category: 'sdk',\n          resource: 'operation',\n          resourceId: operation.id,\n        }),\n      )\n      .call(\n        $.object()\n          .spread('options')\n          .spread('params')\n          .prop('signal', $('signal'))\n          .prop('throwOnError', $.literal(true)),\n      )\n      .await(),\n  );\n\n  const symbolCreateInfiniteParams = plugin.referenceSymbol({\n    category: 'utility',\n    resource: 'createInfiniteParams',\n    tool: plugin.name,\n  });\n\n  const statements: Array<TsDsl<any>> = [\n    $.const('page')\n      .type(typePageObjectParam)\n      .hint('@ts-ignore')\n      .assign(\n        $.ternary($('pageParam').typeofExpr().eq($.literal('object')))\n          .do('pageParam')\n          .otherwise(\n            $.object()\n              .pretty()\n              .prop(pagination.in, $.object().pretty().prop(pagination.name, $('pageParam'))),\n          ),\n      ),\n    $.const('params').assign($(symbolCreateInfiniteParams).call('queryKey', 'page')),\n  ];\n\n  if (plugin.getPluginOrThrow('@hey-api/sdk').config.responseStyle === 'data') {\n    statements.push($.return(awaitSdkFn));\n  } else {\n    statements.push($.const().object('data').assign(awaitSdkFn), $.return('data'));\n  }\n\n  const symbolInfiniteQueryOptionsFn = plugin.symbol(\n    applyNaming(operation.id, plugin.config.infiniteQueryOptions),\n  );\n  const statement = $.const(symbolInfiniteQueryOptionsFn)\n    .export()\n    .$if(plugin.config.comments && createOperationComment(operation), (c, v) => c.doc(v))\n    .assign(\n      $.func()\n        .param('options', (p) => p.required(isRequiredOptions).type(typeData))\n        .do(\n          $.return(\n            $(symbolInfiniteQueryOptions)\n              .call(\n                $.object()\n                  .pretty()\n                  .hint('@ts-ignore')\n                  .prop(\n                    'queryFn',\n                    $.func()\n                      .async()\n                      .param((p) => p.object('pageParam', 'queryKey', 'signal'))\n                      .do(...statements),\n                  )\n                  .prop('queryKey', $(symbolInfiniteQueryKey).call('options'))\n                  .$if(handleMeta(plugin, operation, 'infiniteQueryOptions'), (o, v) =>\n                    o.prop('meta', v),\n                  ),\n              )\n              .generics(\n                typeResponse,\n                useTypeError({ operation, plugin }),\n                $.type(symbolInfiniteDataType).generic(typeResponse),\n                typeQueryKey,\n                $.type.or(type, typePageObjectParam),\n              ),\n          ),\n        ),\n    );\n  plugin.node(statement);\n};\n"
  },
  {
    "path": "packages/openapi-ts/src/plugins/@tanstack/query-core/v5/mutationOptions.ts",
    "content": "import type { IR } from '@hey-api/shared';\nimport { applyNaming } from '@hey-api/shared';\n\nimport {\n  createOperationComment,\n  hasOperationSse,\n} from '../../../../plugins/shared/utils/operation';\nimport type { TsDsl } from '../../../../ts-dsl';\nimport { $ } from '../../../../ts-dsl';\nimport { handleMeta } from '../shared/meta';\nimport { useTypeData, useTypeError, useTypeResponse } from '../shared/useType';\nimport type { PluginInstance } from '../types';\n\nexport const createMutationOptions = ({\n  operation,\n  plugin,\n}: {\n  operation: IR.OperationObject;\n  plugin: PluginInstance;\n}): void => {\n  if (hasOperationSse({ operation })) {\n    return;\n  }\n\n  const symbolMutationOptionsType = plugin.external(`${plugin.name}.MutationOptions`);\n\n  const typeData = useTypeData({ operation, plugin });\n  const mutationType = $.type(symbolMutationOptionsType)\n    .generic(useTypeResponse({ operation, plugin }))\n    .generic(useTypeError({ operation, plugin }))\n    .generic(typeData);\n\n  const fnOptions = 'fnOptions';\n\n  const awaitSdkFn = $.lazy((ctx) =>\n    ctx\n      .access(\n        plugin.referenceSymbol({\n          category: 'sdk',\n          resource: 'operation',\n          resourceId: operation.id,\n        }),\n      )\n      .call($.object().spread('options').spread(fnOptions).prop('throwOnError', $.literal(true)))\n      .await(),\n  );\n\n  const statements: Array<TsDsl<any>> = [];\n  if (plugin.getPluginOrThrow('@hey-api/sdk').config.responseStyle === 'data') {\n    statements.push($.return(awaitSdkFn));\n  } else {\n    statements.push($.const().object('data').assign(awaitSdkFn), $.return('data'));\n  }\n\n  const mutationOptionsFn = 'mutationOptions';\n  const symbolMutationOptions = plugin.symbol(\n    applyNaming(operation.id, plugin.config.mutationOptions),\n    {\n      meta: {\n        category: 'hook',\n        resource: 'operation',\n        resourceId: operation.id,\n        role: 'mutationOptions',\n        tool: plugin.name,\n      },\n    },\n  );\n  const statement = $.const(symbolMutationOptions)\n    .export(plugin.config.mutationOptions.exported)\n    .$if(plugin.config.comments && createOperationComment(operation), (c, v) => c.doc(v))\n    .assign(\n      $.func()\n        .param('options', (p) => p.optional().type($.type('Partial').generic(typeData)))\n        .returns(mutationType)\n        .do(\n          $.const(mutationOptionsFn)\n            .type(mutationType)\n            .assign(\n              $.object()\n                .pretty()\n                .prop(\n                  'mutationFn',\n                  $.func()\n                    .async()\n                    .param(fnOptions)\n                    .do(...statements),\n                )\n                .$if(handleMeta(plugin, operation, 'mutationOptions'), (c, v) => c.prop('meta', v)),\n            ),\n          $(mutationOptionsFn).return(),\n        ),\n    );\n  plugin.node(statement);\n};\n"
  },
  {
    "path": "packages/openapi-ts/src/plugins/@tanstack/query-core/v5/plugin.ts",
    "content": "import type { PluginHandler } from '../types';\nimport { createInfiniteQueryOptions } from './infiniteQueryOptions';\nimport { createMutationOptions } from './mutationOptions';\nimport { createQueryOptions } from './queryOptions';\nimport { createUseMutation } from './useMutation';\nimport { createUseQuery } from './useQuery';\n\nexport const handlerV5: PluginHandler = ({ plugin }) => {\n  plugin.symbol('DefaultError', {\n    external: plugin.name,\n    kind: 'type',\n    meta: {\n      category: 'external',\n      resource: `${plugin.name}.DefaultError`,\n    },\n  });\n  plugin.symbol('InfiniteData', {\n    external: plugin.name,\n    kind: 'type',\n    meta: {\n      category: 'external',\n      resource: `${plugin.name}.InfiniteData`,\n    },\n  });\n  const mutationsType =\n    plugin.name === '@tanstack/angular-query-experimental' ||\n    plugin.name === '@tanstack/svelte-query' ||\n    plugin.name === '@tanstack/solid-query'\n      ? 'MutationOptions'\n      : 'UseMutationOptions';\n  plugin.symbol(mutationsType, {\n    external: plugin.name,\n    kind: 'type',\n    meta: {\n      category: 'external',\n      resource: `${plugin.name}.MutationOptions`,\n    },\n  });\n  plugin.symbol('infiniteQueryOptions', {\n    external: plugin.name,\n    meta: {\n      category: 'external',\n      resource: `${plugin.name}.infiniteQueryOptions`,\n    },\n  });\n  plugin.symbol('queryOptions', {\n    external: plugin.name,\n    meta: {\n      category: 'external',\n      resource: `${plugin.name}.queryOptions`,\n    },\n  });\n  plugin.symbol('useMutation', {\n    external: plugin.name,\n    meta: {\n      category: 'external',\n      resource: `${plugin.name}.useMutation`,\n    },\n  });\n  plugin.symbol('useQuery', {\n    external: plugin.name,\n    meta: {\n      category: 'external',\n      resource: `${plugin.name}.useQuery`,\n    },\n  });\n  plugin.symbol('AxiosError', {\n    external: 'axios',\n    kind: 'type',\n    meta: {\n      category: 'external',\n      resource: 'axios.AxiosError',\n    },\n  });\n\n  plugin.forEach(\n    'operation',\n    ({ operation }) => {\n      if (plugin.hooks.operation.isQuery(operation)) {\n        if (plugin.config.queryOptions.enabled) {\n          createQueryOptions({ operation, plugin });\n        }\n\n        if (plugin.config.infiniteQueryOptions.enabled) {\n          createInfiniteQueryOptions({ operation, plugin });\n        }\n\n        if ('useQuery' in plugin.config && plugin.config.useQuery.enabled) {\n          createUseQuery({ operation, plugin });\n        }\n      }\n\n      if (plugin.hooks.operation.isMutation(operation)) {\n        if (plugin.config.mutationOptions.enabled) {\n          createMutationOptions({ operation, plugin });\n        }\n\n        if ('useMutation' in plugin.config && plugin.config.useMutation.enabled) {\n          createUseMutation({ operation, plugin });\n        }\n      }\n    },\n    {\n      order: 'declarations',\n    },\n  );\n};\n"
  },
  {
    "path": "packages/openapi-ts/src/plugins/@tanstack/query-core/v5/queryOptions.ts",
    "content": "import type { IR } from '@hey-api/shared';\nimport { applyNaming } from '@hey-api/shared';\n\nimport {\n  createOperationComment,\n  hasOperationSse,\n  isOperationOptionsRequired,\n} from '../../../../plugins/shared/utils/operation';\nimport type { TsDsl } from '../../../../ts-dsl';\nimport { $ } from '../../../../ts-dsl';\nimport { createQueryKeyFunction, createQueryKeyType, queryKeyStatement } from '../queryKey';\nimport { handleMeta } from '../shared/meta';\nimport { useTypeData, useTypeError, useTypeResponse } from '../shared/useType';\nimport type { PluginInstance } from '../types';\n\nconst optionsParamName = 'options';\n\nexport const createQueryOptions = ({\n  operation,\n  plugin,\n}: {\n  operation: IR.OperationObject;\n  plugin: PluginInstance;\n}): void => {\n  if (hasOperationSse({ operation })) {\n    return;\n  }\n\n  const isRequiredOptions = isOperationOptionsRequired({\n    context: plugin.context,\n    operation,\n  });\n\n  if (\n    !plugin.getSymbol({\n      category: 'utility',\n      resource: 'createQueryKey',\n      tool: plugin.name,\n    })\n  ) {\n    createQueryKeyType({ plugin });\n    createQueryKeyFunction({ plugin });\n  }\n\n  const symbolQueryOptions = plugin.external(`${plugin.name}.queryOptions`);\n\n  const symbolQueryKey = plugin.symbol(applyNaming(operation.id, plugin.config.queryKeys));\n  const node = queryKeyStatement({\n    isInfinite: false,\n    operation,\n    plugin,\n    symbol: symbolQueryKey,\n  });\n  plugin.node(node);\n\n  const typeResponse = useTypeResponse({ operation, plugin });\n\n  const awaitSdkFn = $.lazy((ctx) =>\n    ctx\n      .access(\n        plugin.referenceSymbol({\n          category: 'sdk',\n          resource: 'operation',\n          resourceId: operation.id,\n        }),\n      )\n      .call(\n        $.object()\n          .spread(optionsParamName)\n          .spread($('queryKey').attr(0))\n          .prop('signal', $('signal'))\n          .prop('throwOnError', $.literal(true)),\n      )\n      .await(),\n  );\n\n  const statements: Array<TsDsl<any>> = [];\n  if (plugin.getPluginOrThrow('@hey-api/sdk').config.responseStyle === 'data') {\n    statements.push($.return(awaitSdkFn));\n  } else {\n    statements.push($.const().object('data').assign(awaitSdkFn), $.return('data'));\n  }\n\n  const queryOptionsObj = $.object()\n    .pretty()\n    .prop(\n      'queryFn',\n      $.func()\n        .async()\n        .param((p) => p.object('queryKey', 'signal'))\n        .do(...statements),\n    )\n    .prop('queryKey', $(symbolQueryKey).call(optionsParamName))\n    .$if(handleMeta(plugin, operation, 'queryOptions'), (o, v) => o.prop('meta', v));\n\n  const symbolQueryOptionsFn = plugin.symbol(\n    applyNaming(operation.id, plugin.config.queryOptions),\n    {\n      meta: {\n        category: 'hook',\n        resource: 'operation',\n        resourceId: operation.id,\n        role: 'queryOptions',\n        tool: plugin.name,\n      },\n    },\n  );\n  // TODO: add type error\n  // TODO: AxiosError<PutSubmissionMetaError>\n  const statement = $.const(symbolQueryOptionsFn)\n    .export(plugin.config.queryOptions.exported)\n    .$if(plugin.config.comments && createOperationComment(operation), (c, v) => c.doc(v))\n    .assign(\n      $.func()\n        .param(optionsParamName, (p) =>\n          p.required(isRequiredOptions).type(useTypeData({ operation, plugin })),\n        )\n        .do(\n          $(symbolQueryOptions)\n            .call(queryOptionsObj)\n            .generics(\n              typeResponse,\n              useTypeError({ operation, plugin }),\n              typeResponse,\n              $(symbolQueryKey).returnType(),\n            )\n            .return(),\n        ),\n    );\n  plugin.node(statement);\n};\n"
  },
  {
    "path": "packages/openapi-ts/src/plugins/@tanstack/query-core/v5/useMutation.ts",
    "content": "import type { IR } from '@hey-api/shared';\nimport { applyNaming } from '@hey-api/shared';\n\nimport { createOperationComment } from '../../../../plugins/shared/utils/operation';\nimport { $ } from '../../../../ts-dsl';\nimport { useTypeData, useTypeError, useTypeResponse } from '../shared/useType';\nimport type { PluginInstance } from '../types';\n\nconst mutationOptionsParamName = 'mutationOptions';\n\nexport const createUseMutation = ({\n  operation,\n  plugin,\n}: {\n  operation: IR.OperationObject;\n  plugin: PluginInstance;\n}): void => {\n  if (!('useMutation' in plugin.config)) {\n    return;\n  }\n\n  const symbolUseMutationFn = plugin.symbol(applyNaming(operation.id, plugin.config.useMutation));\n\n  const symbolUseMutation = plugin.external(`${plugin.name}.useMutation`);\n\n  const typeData = useTypeData({ operation, plugin });\n\n  const symbolMutationOptionsType = plugin.external(`${plugin.name}.MutationOptions`);\n  const mutationType = $.type(symbolMutationOptionsType)\n    .generic(useTypeResponse({ operation, plugin }))\n    .generic(useTypeError({ operation, plugin }))\n    .generic(typeData);\n\n  const symbolMutationOptionsFn = plugin.referenceSymbol({\n    category: 'hook',\n    resource: 'operation',\n    resourceId: operation.id,\n    role: 'mutationOptions',\n    tool: plugin.name,\n  });\n\n  const func = $.func().param(mutationOptionsParamName, (p) =>\n    p\n      .optional()\n      .type(\n        $.type('Partial').generic(\n          $.type('Omit', (t) => t.generics(mutationType, $.type.literal('mutationFn'))),\n        ),\n      ),\n  );\n\n  func.do(\n    $(symbolUseMutation)\n      .call($.object().spread($(symbolMutationOptionsFn).call()).spread(mutationOptionsParamName))\n      .return(),\n  );\n\n  const statement = $.const(symbolUseMutationFn)\n    .export()\n    .$if(plugin.config.comments && createOperationComment(operation), (c, v) => c.doc(v))\n    .assign(func);\n  plugin.node(statement);\n};\n"
  },
  {
    "path": "packages/openapi-ts/src/plugins/@tanstack/query-core/v5/useQuery.ts",
    "content": "import type { IR } from '@hey-api/shared';\nimport { applyNaming } from '@hey-api/shared';\n\nimport {\n  createOperationComment,\n  hasOperationSse,\n  isOperationOptionsRequired,\n} from '../../../../plugins/shared/utils/operation';\nimport { $ } from '../../../../ts-dsl';\nimport { useTypeData } from '../shared/useType';\nimport type { PluginInstance } from '../types';\n\nconst optionsParamName = 'options';\n\nexport const createUseQuery = ({\n  operation,\n  plugin,\n}: {\n  operation: IR.OperationObject;\n  plugin: PluginInstance;\n}): void => {\n  if (hasOperationSse({ operation })) {\n    return;\n  }\n\n  if (!('useQuery' in plugin.config)) {\n    return;\n  }\n\n  const symbolUseQueryFn = plugin.symbol(applyNaming(operation.id, plugin.config.useQuery));\n\n  const symbolUseQuery = plugin.external(`${plugin.name}.useQuery`);\n\n  const isRequiredOptions = isOperationOptionsRequired({\n    context: plugin.context,\n    operation,\n  });\n  const typeData = useTypeData({ operation, plugin });\n\n  const symbolQueryOptionsFn = plugin.referenceSymbol({\n    category: 'hook',\n    resource: 'operation',\n    resourceId: operation.id,\n    role: 'queryOptions',\n    tool: plugin.name,\n  });\n  const statement = $.const(symbolUseQueryFn)\n    .export()\n    .$if(plugin.config.comments && createOperationComment(operation), (c, v) => c.doc(v))\n    .assign(\n      $.func()\n        .param(optionsParamName, (p) => p.required(isRequiredOptions).type(typeData))\n        .do($(symbolUseQuery).call($(symbolQueryOptionsFn).call(optionsParamName)).return()),\n    );\n  plugin.node(statement);\n};\n"
  },
  {
    "path": "packages/openapi-ts/src/plugins/@tanstack/react-query/config.ts",
    "content": "import { definePluginConfig, mappers } from '@hey-api/shared';\n\nimport { handler } from '../../../plugins/@tanstack/query-core/plugin';\nimport type { TanStackReactQueryPlugin } from './types';\n\nexport const defaultConfig: TanStackReactQueryPlugin['Config'] = {\n  config: {\n    case: 'camelCase',\n    comments: true,\n    includeInEntry: false,\n  },\n  dependencies: ['@hey-api/sdk', '@hey-api/typescript'],\n  handler: handler as TanStackReactQueryPlugin['Handler'],\n  name: '@tanstack/react-query',\n  resolveConfig: (plugin, context) => {\n    plugin.config.infiniteQueryKeys = context.valueToObject({\n      defaultValue: {\n        case: plugin.config.case ?? 'camelCase',\n        enabled: true,\n        name: '{{name}}InfiniteQueryKey',\n        tags: false,\n      },\n      mappers,\n      value: plugin.config.infiniteQueryKeys,\n    });\n\n    plugin.config.infiniteQueryOptions = context.valueToObject({\n      defaultValue: {\n        case: plugin.config.case ?? 'camelCase',\n        enabled: true,\n        name: '{{name}}InfiniteOptions',\n      },\n      mappers,\n      value: plugin.config.infiniteQueryOptions,\n    });\n\n    plugin.config.mutationOptions = context.valueToObject({\n      defaultValue: {\n        case: plugin.config.case ?? 'camelCase',\n        enabled: true,\n        exported: true,\n        name: '{{name}}Mutation',\n      },\n      mappers,\n      value: plugin.config.mutationOptions,\n    });\n\n    plugin.config.queryKeys = context.valueToObject({\n      defaultValue: {\n        case: plugin.config.case ?? 'camelCase',\n        enabled: true,\n        name: '{{name}}QueryKey',\n        tags: false,\n      },\n      mappers,\n      value: plugin.config.queryKeys,\n    });\n\n    plugin.config.queryOptions = context.valueToObject({\n      defaultValue: {\n        case: plugin.config.case ?? 'camelCase',\n        enabled: true,\n        exported: true,\n        name: '{{name}}Options',\n      },\n      mappers,\n      value: plugin.config.queryOptions,\n    });\n\n    plugin.config.useMutation = context.valueToObject({\n      defaultValue: {\n        case: plugin.config.case ?? 'camelCase',\n        enabled: false,\n        name: 'use{{name}}Mutation',\n      },\n      mappers: {\n        boolean: (enabled) => ({ enabled }),\n        function: (name) => ({ enabled: true, name }),\n        object: (fields) => ({ enabled: true, ...fields }),\n        string: (name) => ({ enabled: true, name }),\n      },\n      value: plugin.config.useMutation,\n    });\n\n    plugin.config.useQuery = context.valueToObject({\n      defaultValue: {\n        case: plugin.config.case ?? 'camelCase',\n        enabled: false,\n        name: 'use{{name}}Query',\n      },\n      mappers: {\n        boolean: (enabled) => ({ enabled }),\n        function: (name) => ({ enabled: true, name }),\n        object: (fields) => ({ enabled: true, ...fields }),\n        string: (name) => ({ enabled: true, name }),\n      },\n      value: plugin.config.useQuery,\n    });\n\n    if (plugin.config.useMutation.enabled) {\n      if (!plugin.config.mutationOptions.enabled) {\n        plugin.config.mutationOptions.enabled = true;\n        plugin.config.mutationOptions.exported = false;\n      }\n    }\n\n    if (plugin.config.useQuery.enabled) {\n      if (!plugin.config.queryOptions.enabled) {\n        plugin.config.queryOptions.enabled = true;\n        plugin.config.queryOptions.exported = false;\n      }\n    }\n  },\n};\n\n/**\n * Type helper for `@tanstack/react-query` plugin, returns {@link Plugin.Config} object\n */\nexport const defineConfig = definePluginConfig(defaultConfig);\n"
  },
  {
    "path": "packages/openapi-ts/src/plugins/@tanstack/react-query/index.ts",
    "content": "export { defaultConfig, defineConfig } from './config';\nexport type { TanStackReactQueryPlugin } from './types';\n"
  },
  {
    "path": "packages/openapi-ts/src/plugins/@tanstack/react-query/types.ts",
    "content": "import type { Casing, FeatureToggle, NameTransformer, NamingOptions } from '@hey-api/shared';\nimport type { IR } from '@hey-api/shared';\nimport type { DefinePlugin, Plugin } from '@hey-api/shared';\n\nexport type UserConfig = Plugin.Name<'@tanstack/react-query'> &\n  Plugin.Hooks &\n  Plugin.UserComments &\n  Plugin.UserExports & {\n    /**\n     * Casing convention for generated names.\n     *\n     * @default 'camelCase'\n     */\n    case?: Casing;\n    /**\n     * Configuration for generated infinite query key helpers.\n     *\n     * See {@link https://tanstack.com/query/v5/docs/framework/react/reference/infiniteQueryOptions infiniteQueryOptions}\n     *\n     * Can be:\n     * - `boolean`: Shorthand for `{ enabled: boolean }`\n     * - `string` or `function`: Shorthand for `{ name: string | function }`\n     * - `object`: Full configuration object\n     *\n     * @default true\n     */\n    infiniteQueryKeys?:\n      | boolean\n      | NameTransformer\n      | {\n          /**\n           * Casing convention for generated names.\n           *\n           * @default 'camelCase'\n           */\n          case?: Casing;\n          /**\n           * Whether this feature is enabled.\n           *\n           * @default true\n           */\n          enabled?: boolean;\n          /**\n           * Naming pattern for generated names.\n           *\n           * See {@link https://tanstack.com/query/v5/docs/framework/react/reference/infiniteQueryOptions infiniteQueryOptions}\n           *\n           * @default '{{name}}InfiniteQueryKey'\n           */\n          name?: NameTransformer;\n          /**\n           * Whether to include operation tags in infinite query keys.\n           * This will make query keys larger but provides better cache invalidation capabilities.\n           *\n           * @default false\n           */\n          tags?: boolean;\n        };\n    /**\n     * Configuration for generated infinite query options helpers.\n     *\n     * See {@link https://tanstack.com/query/v5/docs/framework/react/reference/infiniteQueryOptions infiniteQueryOptions}\n     *\n     * Can be:\n     * - `boolean`: Shorthand for `{ enabled: boolean }`\n     * - `string` or `function`: Shorthand for `{ name: string | function }`\n     * - `object`: Full configuration object\n     *\n     * @default true\n     */\n    infiniteQueryOptions?:\n      | boolean\n      | NameTransformer\n      | {\n          /**\n           * Casing convention for generated names.\n           *\n           * @default 'camelCase'\n           */\n          case?: Casing;\n          /**\n           * Whether this feature is enabled.\n           *\n           * @default true\n           */\n          enabled?: boolean;\n          /**\n           * Custom function to generate metadata for the operation.\n           * Can return any valid meta object that will be included in the generated infinite query options.\n           *\n           * @param operation - The operation object containing all available metadata\n           * @returns A meta object with any properties you want to include\n           *\n           * @example\n           * ```ts\n           * meta: (operation) => ({\n           *   customField: operation.id,\n           *   isDeprecated: operation.deprecated,\n           *   tags: operation.tags,\n           *   customObject: {\n           *     method: operation.method,\n           *     path: operation.path\n           *   }\n           * })\n           * ```\n           *\n           * @default undefined\n           */\n          meta?: (operation: IR.OperationObject) => Record<string, unknown>;\n          /**\n           * Naming pattern for generated names.\n           *\n           * See {@link https://tanstack.com/query/v5/docs/framework/react/reference/infiniteQueryOptions infiniteQueryOptions}\n           *\n           * @default '{{name}}InfiniteOptions'\n           */\n          name?: NameTransformer;\n        };\n    /**\n     * Configuration for generated mutation options helpers.\n     *\n     * See {@link https://tanstack.com/query/v5/docs/framework/react/reference/useMutation useMutation}\n     *\n     * Can be:\n     * - `boolean`: Shorthand for `{ enabled: boolean }`\n     * - `string` or `function`: Shorthand for `{ name: string | function }`\n     * - `object`: Full configuration object\n     *\n     * @default true\n     */\n    mutationOptions?:\n      | boolean\n      | NameTransformer\n      | {\n          /**\n           * Casing convention for generated names.\n           *\n           * @default 'camelCase'\n           */\n          case?: Casing;\n          /**\n           * Whether this feature is enabled.\n           *\n           * @default true\n           */\n          enabled?: boolean;\n          /**\n           * Whether to export generated symbols.\n           *\n           * @default true\n           */\n          exported?: boolean;\n          /**\n           * Custom function to generate metadata for the operation.\n           * Can return any valid meta object that will be included in the generated mutation options.\n           *\n           * @param operation - The operation object containing all available metadata\n           * @returns A meta object with any properties you want to include\n           *\n           * @example\n           * ```ts\n           * meta: (operation) => ({\n           *   customField: operation.id,\n           *   isDeprecated: operation.deprecated,\n           *   tags: operation.tags,\n           *   customObject: {\n           *     method: operation.method,\n           *     path: operation.path\n           *   }\n           * })\n           * ```\n           *\n           * @default undefined\n           */\n          meta?: (operation: IR.OperationObject) => Record<string, unknown>;\n          /**\n           * Naming pattern for generated names.\n           *\n           * See {@link https://tanstack.com/query/v5/docs/framework/react/reference/useMutation useMutation}\n           *\n           * @default '{{name}}Mutation'\n           */\n          name?: NameTransformer;\n        };\n    /**\n     * Configuration for generated query keys.\n     *\n     * See {@link https://tanstack.com/query/v5/docs/framework/react/reference/queryKey queryKey}\n     *\n     * Can be:\n     * - `boolean`: Shorthand for `{ enabled: boolean }`\n     * - `string` or `function`: Shorthand for `{ name: string | function }`\n     * - `object`: Full configuration object\n     *\n     * @default true\n     */\n    queryKeys?:\n      | boolean\n      | NameTransformer\n      | {\n          /**\n           * Casing convention for generated names.\n           *\n           * @default 'camelCase'\n           */\n          case?: Casing;\n          /**\n           * Whether this feature is enabled.\n           *\n           * @default true\n           */\n          enabled?: boolean;\n          /**\n           * Naming pattern for generated names.\n           *\n           * See {@link https://tanstack.com/query/v5/docs/framework/react/guides/query-keys Query Keys}\n           *\n           * @default '{{name}}QueryKey'\n           */\n          name?: NameTransformer;\n          /**\n           * Whether to include operation tags in query keys.\n           * This will make query keys larger but provides better cache invalidation capabilities.\n           *\n           * @default false\n           */\n          tags?: boolean;\n        };\n    /**\n     * Configuration for generated query options helpers.\n     *\n     * See {@link https://tanstack.com/query/v5/docs/framework/react/reference/queryOptions queryOptions}\n     *\n     * Can be:\n     * - `boolean`: Shorthand for `{ enabled: boolean }`\n     * - `string` or `function`: Shorthand for `{ name: string | function }`\n     * - `object`: Full configuration object\n     *\n     * @default true\n     */\n    queryOptions?:\n      | boolean\n      | NameTransformer\n      | {\n          /**\n           * Casing convention for generated names.\n           *\n           * @default 'camelCase'\n           */\n          case?: Casing;\n          /**\n           * Whether this feature is enabled.\n           *\n           * @default true\n           */\n          enabled?: boolean;\n          /**\n           * Whether to export generated symbols.\n           *\n           * @default true\n           */\n          exported?: boolean;\n          /**\n           * Custom function to generate metadata for the operation.\n           * Can return any valid meta object that will be included in the generated query options.\n           *\n           * @param operation - The operation object containing all available metadata\n           * @returns A meta object with any properties you want to include\n           *\n           * @example\n           * ```ts\n           * meta: (operation) => ({\n           *   customField: operation.id,\n           *   isDeprecated: operation.deprecated,\n           *   tags: operation.tags,\n           *   customObject: {\n           *     method: operation.method,\n           *     path: operation.path\n           *   }\n           * })\n           * ```\n           *\n           * @default undefined\n           */\n          meta?: (operation: IR.OperationObject) => Record<string, unknown>;\n          /**\n           * Naming pattern for generated names.\n           *\n           * See {@link https://tanstack.com/query/v5/docs/framework/react/reference/queryOptions queryOptions}\n           *\n           * @default '{{name}}Options'\n           */\n          name?: NameTransformer;\n        };\n    /**\n     * Configuration for generated `useMutation()` function helpers.\n     *\n     * See {@link https://tanstack.com/query/v5/docs/framework/react/reference/useMutation useMutation}\n     *\n     * Can be:\n     * - `boolean`: Shorthand for `{ enabled: boolean }`\n     * - `string` or `function`: Shorthand for `{ name: string | function }`\n     * - `object`: Full configuration object\n     *\n     * @default false\n     */\n    useMutation?:\n      | boolean\n      | NameTransformer\n      | {\n          /**\n           * Casing convention for generated names.\n           *\n           * @default 'camelCase'\n           */\n          case?: Casing;\n          /**\n           * Whether this feature is enabled.\n           *\n           * @default false\n           */\n          enabled?: boolean;\n          /**\n           * Naming pattern for generated names.\n           *\n           * See {@link https://tanstack.com/query/v5/docs/framework/react/reference/useMutation useMutation}\n           *\n           * @default 'use{{name}}Mutation'\n           */\n          name?: NameTransformer;\n        };\n    /**\n     * Configuration for generated `useQuery()` function helpers.\n     *\n     * See {@link https://tanstack.com/query/v5/docs/framework/react/reference/useQuery useQuery}\n     *\n     * Can be:\n     * - `boolean`: Shorthand for `{ enabled: boolean }`\n     * - `string` or `function`: Shorthand for `{ name: string | function }`\n     * - `object`: Full configuration object\n     *\n     * @default false\n     */\n    useQuery?:\n      | boolean\n      | NameTransformer\n      | {\n          /**\n           * Casing convention for generated names.\n           *\n           * @default 'camelCase'\n           */\n          case?: Casing;\n          /**\n           * Whether this feature is enabled.\n           *\n           * @default true\n           */\n          enabled?: boolean;\n          /**\n           * Naming pattern for generated names.\n           *\n           * See {@link https://tanstack.com/query/v5/docs/framework/react/reference/useQuery useQuery}\n           *\n           * @default 'use{{name}}Query'\n           */\n          name?: NameTransformer;\n        };\n  };\n\nexport type Config = Plugin.Name<'@tanstack/react-query'> &\n  Plugin.Hooks &\n  Plugin.Comments &\n  Plugin.Exports & {\n    /**\n     * Casing convention for generated names.\n     */\n    case: Casing;\n    /**\n     * Resolved configuration for generated infinite query key helpers.\n     *\n     * See {@link https://tanstack.com/query/v5/docs/framework/react/reference/infiniteQueryOptions infiniteQueryOptions}\n     */\n    infiniteQueryKeys: NamingOptions &\n      FeatureToggle & {\n        /**\n         * Whether to include operation tags in infinite query keys.\n         * This will make query keys larger but provides better cache invalidation capabilities.\n         *\n         * @default false\n         */\n        tags: boolean;\n      };\n    /**\n     * Resolved configuration for generated infinite query options helpers.\n     *\n     * See {@link https://tanstack.com/query/v5/docs/framework/react/reference/infiniteQueryOptions infiniteQueryOptions}\n     */\n    infiniteQueryOptions: NamingOptions &\n      FeatureToggle & {\n        /**\n         * Custom function to generate metadata for the operation.\n         * Can return any valid meta object that will be included in the generated infinite query options.\n         *\n         * @param operation - The operation object containing all available metadata\n         * @returns A meta object with any properties you want to include\n         *\n         * @example\n         * ```ts\n         * meta: (operation) => ({\n         *   customField: operation.id,\n         *   isDeprecated: operation.deprecated,\n         *   tags: operation.tags,\n         *   customObject: {\n         *     method: operation.method,\n         *     path: operation.path\n         *   }\n         * })\n         * ```\n         *\n         * @default undefined\n         */\n        meta: (operation: IR.OperationObject) => Record<string, unknown>;\n      };\n    /**\n     * Resolved configuration for generated mutation options helpers.\n     *\n     * See {@link https://tanstack.com/query/v5/docs/framework/react/reference/useMutation useMutation}\n     */\n    mutationOptions: NamingOptions &\n      FeatureToggle & {\n        /**\n         * Whether to export generated symbols.\n         *\n         * @default true\n         */\n        exported: boolean;\n        /**\n         * Custom function to generate metadata for the operation.\n         * Can return any valid meta object that will be included in the generated mutation options.\n         *\n         * @param operation - The operation object containing all available metadata\n         * @returns A meta object with any properties you want to include\n         *\n         * @example\n         * ```ts\n         * meta: (operation) => ({\n         *   customField: operation.id,\n         *   isDeprecated: operation.deprecated,\n         *   tags: operation.tags,\n         *   customObject: {\n         *     method: operation.method,\n         *     path: operation.path\n         *   }\n         * })\n         * ```\n         *\n         * @default undefined\n         */\n        meta: (operation: IR.OperationObject) => Record<string, unknown>;\n      };\n    /**\n     * Resolved configuration for generated query keys.\n     *\n     * See {@link https://tanstack.com/query/v5/docs/framework/react/guides/query-keys Query Keys}\n     */\n    queryKeys: NamingOptions &\n      FeatureToggle & {\n        /**\n         * Whether to include operation tags in query keys.\n         * This will make query keys larger but provides better cache invalidation capabilities.\n         *\n         * @default false\n         */\n        tags: boolean;\n      };\n    /**\n     * Resolved configuration for generated query options helpers.\n     *\n     * See {@link https://tanstack.com/query/v5/docs/framework/react/reference/queryOptions queryOptions}\n     */\n    queryOptions: NamingOptions &\n      FeatureToggle & {\n        /**\n         * Whether to export generated symbols.\n         *\n         * @default true\n         */\n        exported: boolean;\n        /**\n         * Custom function to generate metadata for the operation.\n         * Can return any valid meta object that will be included in the generated query options.\n         *\n         * @param operation - The operation object containing all available metadata\n         * @returns A meta object with any properties you want to include\n         *\n         * @example\n         * ```ts\n         * meta: (operation) => ({\n         *   customField: operation.id,\n         *   isDeprecated: operation.deprecated,\n         *   tags: operation.tags,\n         *   customObject: {\n         *     method: operation.method,\n         *     path: operation.path\n         *   }\n         * })\n         * ```\n         *\n         * @default undefined\n         */\n        meta: (operation: IR.OperationObject) => Record<string, unknown>;\n      };\n    /**\n     * Configuration for generated `useMutation()` function helpers.\n     *\n     * See {@link https://tanstack.com/query/v5/docs/framework/react/reference/useMutation useMutation}\n     */\n    useMutation: NamingOptions & FeatureToggle;\n    /**\n     * Configuration for generated `useQuery()` function helpers.\n     *\n     * See {@link https://tanstack.com/query/v5/docs/framework/react/reference/useQuery useQuery}\n     */\n    useQuery: NamingOptions & FeatureToggle;\n  };\n\nexport type TanStackReactQueryPlugin = DefinePlugin<UserConfig, Config>;\n"
  },
  {
    "path": "packages/openapi-ts/src/plugins/@tanstack/solid-query/config.ts",
    "content": "import { definePluginConfig, mappers } from '@hey-api/shared';\n\nimport { handler } from '../../../plugins/@tanstack/query-core/plugin';\nimport type { TanStackSolidQueryPlugin } from './types';\n\nexport const defaultConfig: TanStackSolidQueryPlugin['Config'] = {\n  config: {\n    case: 'camelCase',\n    comments: true,\n    includeInEntry: false,\n  },\n  dependencies: ['@hey-api/sdk', '@hey-api/typescript'],\n  handler: handler as TanStackSolidQueryPlugin['Handler'],\n  name: '@tanstack/solid-query',\n  resolveConfig: (plugin, context) => {\n    plugin.config.infiniteQueryKeys = context.valueToObject({\n      defaultValue: {\n        case: plugin.config.case ?? 'camelCase',\n        enabled: true,\n        name: '{{name}}InfiniteQueryKey',\n        tags: false,\n      },\n      mappers,\n      value: plugin.config.infiniteQueryKeys,\n    });\n\n    plugin.config.infiniteQueryOptions = context.valueToObject({\n      defaultValue: {\n        case: plugin.config.case ?? 'camelCase',\n        enabled: true,\n        name: '{{name}}InfiniteOptions',\n      },\n      mappers,\n      value: plugin.config.infiniteQueryOptions,\n    });\n\n    plugin.config.mutationOptions = context.valueToObject({\n      defaultValue: {\n        case: plugin.config.case ?? 'camelCase',\n        enabled: true,\n        exported: true,\n        name: '{{name}}Mutation',\n      },\n      mappers,\n      value: plugin.config.mutationOptions,\n    });\n\n    plugin.config.queryKeys = context.valueToObject({\n      defaultValue: {\n        case: plugin.config.case ?? 'camelCase',\n        enabled: true,\n        name: '{{name}}QueryKey',\n        tags: false,\n      },\n      mappers,\n      value: plugin.config.queryKeys,\n    });\n\n    plugin.config.queryOptions = context.valueToObject({\n      defaultValue: {\n        case: plugin.config.case ?? 'camelCase',\n        enabled: true,\n        exported: true,\n        name: '{{name}}Options',\n      },\n      mappers,\n      value: plugin.config.queryOptions,\n    });\n  },\n};\n\n/**\n * Type helper for `@tanstack/solid-query` plugin, returns {@link Plugin.Config} object\n */\nexport const defineConfig = definePluginConfig(defaultConfig);\n"
  },
  {
    "path": "packages/openapi-ts/src/plugins/@tanstack/solid-query/index.ts",
    "content": "export { defaultConfig, defineConfig } from './config';\nexport type { TanStackSolidQueryPlugin } from './types';\n"
  },
  {
    "path": "packages/openapi-ts/src/plugins/@tanstack/solid-query/types.ts",
    "content": "import type {\n  Casing,\n  DefinePlugin,\n  FeatureToggle,\n  IR,\n  NameTransformer,\n  NamingOptions,\n  Plugin,\n} from '@hey-api/shared';\n\nexport type UserConfig = Plugin.Name<'@tanstack/solid-query'> &\n  Plugin.Hooks &\n  Plugin.UserComments &\n  Plugin.UserExports & {\n    /**\n     * Casing convention for generated names.\n     *\n     * @default 'camelCase'\n     */\n    case?: Casing;\n    /**\n     * Configuration for generated infinite query key helpers.\n     *\n     * See {@link https://tanstack.com/query/v5/docs/framework/solid/reference/createInfiniteQuery}\n     *\n     * Can be:\n     * - `boolean`: Shorthand for `{ enabled: boolean }`\n     * - `string` or `function`: Shorthand for `{ name: string | function }`\n     * - `object`: Full configuration object\n     *\n     * @default true\n     */\n    infiniteQueryKeys?:\n      | boolean\n      | NameTransformer\n      | {\n          /**\n           * Casing convention for generated names.\n           *\n           * @default 'camelCase'\n           */\n          case?: Casing;\n          /**\n           * Whether this feature is enabled.\n           *\n           * @default true\n           */\n          enabled?: boolean;\n          /**\n           * Naming pattern for generated names.\n           *\n           * @default '{{name}}InfiniteQueryKey'\n           * @see https://tanstack.com/query/v5/docs/framework/solid/reference/createInfiniteQuery\n           */\n          name?: NameTransformer;\n          /**\n           * Whether to include operation tags in infinite query keys.\n           * This will make query keys larger but provides better cache invalidation capabilities.\n           *\n           * @default false\n           */\n          tags?: boolean;\n        };\n    /**\n     * Configuration for generated infinite query options helpers.\n     *\n     * See {@link https://tanstack.com/query/v5/docs/framework/solid/reference/createInfiniteQuery}\n     *\n     * Can be:\n     * - `boolean`: Shorthand for `{ enabled: boolean }`\n     * - `string` or `function`: Shorthand for `{ name: string | function }`\n     * - `object`: Full configuration object\n     *\n     * @default true\n     */\n    infiniteQueryOptions?:\n      | boolean\n      | NameTransformer\n      | {\n          /**\n           * Casing convention for generated names.\n           *\n           * @default 'camelCase'\n           */\n          case?: Casing;\n          /**\n           * Whether this feature is enabled.\n           *\n           * @default true\n           */\n          enabled?: boolean;\n          /**\n           * Custom function to generate metadata for the operation.\n           * Can return any valid meta object that will be included in the generated infinite query options.\n           *\n           * @param operation - The operation object containing all available metadata\n           * @returns A meta object with any properties you want to include\n           *\n           * @example\n           * ```ts\n           * meta: (operation) => ({\n           *   customField: operation.id,\n           *   isDeprecated: operation.deprecated,\n           *   tags: operation.tags,\n           *   customObject: {\n           *     method: operation.method,\n           *     path: operation.path\n           *   }\n           * })\n           * ```\n           *\n           * @default undefined\n           */\n          meta?: (operation: IR.OperationObject) => Record<string, unknown>;\n          /**\n           * Naming pattern for generated names.\n           *\n           * @default '{{name}}InfiniteOptions'\n           * @see https://tanstack.com/query/v5/docs/framework/solid/reference/createInfiniteQuery\n           */\n          name?: NameTransformer;\n        };\n    /**\n     * Configuration for generated mutation options helpers.\n     *\n     * See {@link https://tanstack.com/query/v5/docs/framework/solid/reference/createMutation}\n     *\n     * Can be:\n     * - `boolean`: Shorthand for `{ enabled: boolean }`\n     * - `string` or `function`: Shorthand for `{ name: string | function }`\n     * - `object`: Full configuration object\n     *\n     * @default true\n     */\n    mutationOptions?:\n      | boolean\n      | NameTransformer\n      | {\n          /**\n           * Casing convention for generated names.\n           *\n           * @default 'camelCase'\n           */\n          case?: Casing;\n          /**\n           * Whether this feature is enabled.\n           *\n           * @default true\n           */\n          enabled?: boolean;\n          /**\n           * Whether to export generated symbols.\n           *\n           * @default true\n           */\n          exported?: boolean;\n          /**\n           * Custom function to generate metadata for the operation.\n           * Can return any valid meta object that will be included in the generated mutation options.\n           * @param operation - The operation object containing all available metadata\n           * @returns A meta object with any properties you want to include\n           *\n           * @example\n           * ```ts\n           * meta: (operation) => ({\n           *   customField: operation.id,\n           *   isDeprecated: operation.deprecated,\n           *   tags: operation.tags,\n           *   customObject: {\n           *     method: operation.method,\n           *     path: operation.path\n           *   }\n           * })\n           * ```\n           *\n           * @default undefined\n           */\n          meta?: (operation: IR.OperationObject) => Record<string, unknown>;\n          /**\n           * Naming pattern for generated names.\n           *\n           * @default '{{name}}Mutation'\n           * @see https://tanstack.com/query/v5/docs/framework/solid/reference/createMutation\n           */\n          name?: NameTransformer;\n        };\n    /**\n     * Configuration for generated query keys.\n     *\n     * See {@link https://tanstack.com/query/v5/docs/framework/solid/reference/queryKey}\n     *\n     * Can be:\n     * - `boolean`: Shorthand for `{ enabled: boolean }`\n     * - `string` or `function`: Shorthand for `{ name: string | function }`\n     * - `object`: Full configuration object\n     *\n     * @default true\n     */\n    queryKeys?:\n      | boolean\n      | NameTransformer\n      | {\n          /**\n           * Casing convention for generated names.\n           *\n           * @default 'camelCase'\n           */\n          case?: Casing;\n          /**\n           * Whether this feature is enabled.\n           *\n           * @default true\n           */\n          enabled?: boolean;\n          /**\n           * Naming pattern for generated names.\n           *\n           * @default '{{name}}QueryKey'\n           * @see https://tanstack.com/query/v5/docs/framework/solid/reference/queryKey\n           */\n          name?: NameTransformer;\n          /**\n           * Whether to include operation tags in query keys.\n           * This will make query keys larger but provides better cache invalidation capabilities.\n           *\n           * @default false\n           */\n          tags?: boolean;\n        };\n    /**\n     * Configuration for generated query options helpers.\n     *\n     * See {@link https://tanstack.com/query/v5/docs/framework/solid/reference/createQuery}\n     *\n     * Can be:\n     * - `boolean`: Shorthand for `{ enabled: boolean }`\n     * - `string` or `function`: Shorthand for `{ name: string | function }`\n     * - `object`: Full configuration object\n     *\n     * @default true\n     */\n    queryOptions?:\n      | boolean\n      | NameTransformer\n      | {\n          /**\n           * Casing convention for generated names.\n           *\n           * @default 'camelCase'\n           */\n          case?: Casing;\n          /**\n           * Whether this feature is enabled.\n           *\n           * @default true\n           */\n          enabled?: boolean;\n          /**\n           * Whether to export generated symbols.\n           *\n           * @default true\n           */\n          exported?: boolean;\n          /**\n           * Custom function to generate metadata for the operation.\n           * Can return any valid meta object that will be included in the generated query options.\n           * @param operation - The operation object containing all available metadata\n           * @returns A meta object with any properties you want to include\n           *\n           * @example\n           * ```ts\n           * meta: (operation) => ({\n           *   customField: operation.id,\n           *   isDeprecated: operation.deprecated,\n           *   tags: operation.tags,\n           *   customObject: {\n           *     method: operation.method,\n           *     path: operation.path\n           *   }\n           * })\n           * ```\n           *\n           * @default undefined\n           */\n          meta?: (operation: IR.OperationObject) => Record<string, unknown>;\n          /**\n           * Naming pattern for generated names.\n           *\n           * @default '{{name}}Options'\n           * @see https://tanstack.com/query/v5/docs/framework/solid/reference/createQuery\n           */\n          name?: NameTransformer;\n        };\n  };\n\nexport type Config = Plugin.Name<'@tanstack/solid-query'> &\n  Plugin.Hooks &\n  Plugin.Comments &\n  Plugin.Exports & {\n    /**\n     * Casing convention for generated names.\n     */\n    case: Casing;\n    /**\n     * Resolved configuration for generated infinite query key helpers.\n     *\n     * @see https://tanstack.com/query/v5/docs/framework/solid/reference/createInfiniteQuery\n     */\n    infiniteQueryKeys: NamingOptions &\n      FeatureToggle & {\n        /**\n         * Whether to include operation tags in infinite query keys.\n         * This will make query keys larger but provides better cache invalidation capabilities.\n         *\n         * @default false\n         */\n        tags: boolean;\n      };\n    /**\n     * Resolved configuration for generated infinite query options helpers.\n     *\n     * @see https://tanstack.com/query/v5/docs/framework/solid/reference/createInfiniteQuery\n     */\n    infiniteQueryOptions: NamingOptions &\n      FeatureToggle & {\n        /**\n         * Custom function to generate metadata for the operation.\n         * Can return any valid meta object that will be included in the generated infinite query options.\n         * @param operation - The operation object containing all available metadata\n         * @returns A meta object with any properties you want to include\n         *\n         * @example\n         * ```ts\n         * meta: (operation) => ({\n         *   customField: operation.id,\n         *   isDeprecated: operation.deprecated,\n         *   tags: operation.tags,\n         *   customObject: {\n         *     method: operation.method,\n         *     path: operation.path\n         *   }\n         * })\n         * ```\n         *\n         * @default undefined\n         */\n        meta: (operation: IR.OperationObject) => Record<string, unknown>;\n      };\n    /**\n     * Resolved configuration for generated mutation options helpers.\n     *\n     * @see https://tanstack.com/query/v5/docs/framework/solid/reference/createMutation\n     */\n    mutationOptions: NamingOptions &\n      FeatureToggle & {\n        /**\n         * Whether to export generated symbols.\n         *\n         * @default true\n         */\n        exported: boolean;\n        /**\n         * Custom function to generate metadata for the operation.\n         * Can return any valid meta object that will be included in the generated mutation options.\n         * @param operation - The operation object containing all available metadata\n         * @returns A meta object with any properties you want to include\n         *\n         * @example\n         * ```ts\n         * meta: (operation) => ({\n         *   customField: operation.id,\n         *   isDeprecated: operation.deprecated,\n         *   tags: operation.tags,\n         *   customObject: {\n         *     method: operation.method,\n         *     path: operation.path\n         *   }\n         * })\n         * ```\n         *\n         * @default undefined\n         */\n        meta: (operation: IR.OperationObject) => Record<string, unknown>;\n      };\n    /**\n     * Resolved configuration for generated query keys.\n     *\n     * @see https://tanstack.com/query/v5/docs/framework/solid/reference/queryKey\n     */\n    queryKeys: NamingOptions &\n      FeatureToggle & {\n        /**\n         * Whether to include operation tags in query keys.\n         * This will make query keys larger but provides better cache invalidation capabilities.\n         *\n         * @default false\n         */\n        tags: boolean;\n      };\n    /**\n     * Resolved configuration for generated query options helpers.\n     *\n     * @see https://tanstack.com/query/v5/docs/framework/solid/reference/createQuery\n     */\n    queryOptions: NamingOptions &\n      FeatureToggle & {\n        /**\n         * Whether to export generated symbols.\n         *\n         * @default true\n         */\n        exported: boolean;\n        /**\n         * Custom function to generate metadata for the operation.\n         * Can return any valid meta object that will be included in the generated query options.\n         * @param operation - The operation object containing all available metadata\n         * @returns A meta object with any properties you want to include\n         *\n         * @example\n         * ```ts\n         * meta: (operation) => ({\n         *   customField: operation.id,\n         *   isDeprecated: operation.deprecated,\n         *   tags: operation.tags,\n         *   customObject: {\n         *     method: operation.method,\n         *     path: operation.path\n         *   }\n         * })\n         * ```\n         *\n         * @default undefined\n         */\n        meta: (operation: IR.OperationObject) => Record<string, unknown>;\n      };\n  };\n\nexport type TanStackSolidQueryPlugin = DefinePlugin<UserConfig, Config>;\n"
  },
  {
    "path": "packages/openapi-ts/src/plugins/@tanstack/svelte-query/config.ts",
    "content": "import { definePluginConfig, mappers } from '@hey-api/shared';\n\nimport { handler } from '../../../plugins/@tanstack/query-core/plugin';\nimport type { TanStackSvelteQueryPlugin } from './types';\n\nexport const defaultConfig: TanStackSvelteQueryPlugin['Config'] = {\n  config: {\n    case: 'camelCase',\n    comments: true,\n    includeInEntry: false,\n  },\n  dependencies: ['@hey-api/sdk', '@hey-api/typescript'],\n  handler: handler as TanStackSvelteQueryPlugin['Handler'],\n  name: '@tanstack/svelte-query',\n  resolveConfig: (plugin, context) => {\n    plugin.config.infiniteQueryKeys = context.valueToObject({\n      defaultValue: {\n        case: plugin.config.case ?? 'camelCase',\n        enabled: true,\n        name: '{{name}}InfiniteQueryKey',\n        tags: false,\n      },\n      mappers,\n      value: plugin.config.infiniteQueryKeys,\n    });\n\n    plugin.config.infiniteQueryOptions = context.valueToObject({\n      defaultValue: {\n        case: plugin.config.case ?? 'camelCase',\n        enabled: true,\n        name: '{{name}}InfiniteOptions',\n      },\n      mappers,\n      value: plugin.config.infiniteQueryOptions,\n    });\n\n    plugin.config.mutationOptions = context.valueToObject({\n      defaultValue: {\n        case: plugin.config.case ?? 'camelCase',\n        enabled: true,\n        exported: true,\n        name: '{{name}}Mutation',\n      },\n      mappers,\n      value: plugin.config.mutationOptions,\n    });\n\n    plugin.config.queryKeys = context.valueToObject({\n      defaultValue: {\n        case: plugin.config.case ?? 'camelCase',\n        enabled: true,\n        name: '{{name}}QueryKey',\n        tags: false,\n      },\n      mappers,\n      value: plugin.config.queryKeys,\n    });\n\n    plugin.config.queryOptions = context.valueToObject({\n      defaultValue: {\n        case: plugin.config.case ?? 'camelCase',\n        enabled: true,\n        exported: true,\n        name: '{{name}}Options',\n      },\n      mappers,\n      value: plugin.config.queryOptions,\n    });\n  },\n};\n\n/**\n * Type helper for `@tanstack/svelte-query` plugin, returns {@link Plugin.Config} object\n */\nexport const defineConfig = definePluginConfig(defaultConfig);\n"
  },
  {
    "path": "packages/openapi-ts/src/plugins/@tanstack/svelte-query/index.ts",
    "content": "export { defaultConfig, defineConfig } from './config';\nexport type { TanStackSvelteQueryPlugin } from './types';\n"
  },
  {
    "path": "packages/openapi-ts/src/plugins/@tanstack/svelte-query/types.ts",
    "content": "import type {\n  Casing,\n  DefinePlugin,\n  FeatureToggle,\n  IR,\n  NameTransformer,\n  NamingOptions,\n  Plugin,\n} from '@hey-api/shared';\n\nexport type UserConfig = Plugin.Name<'@tanstack/svelte-query'> &\n  Plugin.Hooks &\n  Plugin.UserComments &\n  Plugin.UserExports & {\n    /**\n     * Casing convention for generated names.\n     *\n     * @default 'camelCase'\n     */\n    case?: Casing;\n    /**\n     * Configuration for generated infinite query key helpers.\n     *\n     * See {@link https://tanstack.com/query/v5/docs/framework/svelte/reference/functions/createinfinitequery}\n     *\n     * Can be:\n     * - `boolean`: Shorthand for `{ enabled: boolean }`\n     * - `string` or `function`: Shorthand for `{ name: string | function }`\n     * - `object`: Full configuration object\n     *\n     * @default true\n     */\n    infiniteQueryKeys?:\n      | boolean\n      | NameTransformer\n      | {\n          /**\n           * Casing convention for generated names.\n           *\n           * @default 'camelCase'\n           */\n          case?: Casing;\n          /**\n           * Whether this feature is enabled.\n           *\n           * @default true\n           */\n          enabled?: boolean;\n          /**\n           * Naming pattern for generated names.\n           *\n           * @default '{{name}}InfiniteQueryKey'\n           * @see https://tanstack.com/query/v5/docs/framework/svelte/reference/functions/createinfinitequery\n           */\n          name?: NameTransformer;\n          /**\n           * Whether to include operation tags in infinite query keys.\n           * This will make query keys larger but provides better cache invalidation capabilities.\n           *\n           * @default false\n           */\n          tags?: boolean;\n        };\n    /**\n     * Configuration for generated infinite query options helpers.\n     *\n     * See {@link https://tanstack.com/query/v5/docs/framework/svelte/reference/functions/createinfinitequery}\n     *\n     * Can be:\n     * - `boolean`: Shorthand for `{ enabled: boolean }`\n     * - `string` or `function`: Shorthand for `{ name: string | function }`\n     * - `object`: Full configuration object\n     *\n     * @default true\n     */\n    infiniteQueryOptions?:\n      | boolean\n      | NameTransformer\n      | {\n          /**\n           * Casing convention for generated names.\n           *\n           * @default 'camelCase'\n           */\n          case?: Casing;\n          /**\n           * Whether this feature is enabled.\n           *\n           * @default true\n           */\n          enabled?: boolean;\n          /**\n           * Custom function to generate metadata for the operation.\n           * Can return any valid meta object that will be included in the generated infinite query options.\n           * @param operation - The operation object containing all available metadata\n           * @returns A meta object with any properties you want to include\n           *\n           * @example\n           * ```ts\n           * meta: (operation) => ({\n           *   customField: operation.id,\n           *   isDeprecated: operation.deprecated,\n           *   tags: operation.tags,\n           *   customObject: {\n           *     method: operation.method,\n           *     path: operation.path\n           *   }\n           * })\n           * ```\n           *\n           * @default undefined\n           */\n          meta?: (operation: IR.OperationObject) => Record<string, unknown>;\n          /**\n           * Naming pattern for generated names.\n           *\n           * @default '{{name}}InfiniteOptions'\n           * @see https://tanstack.com/query/v5/docs/framework/svelte/reference/functions/createinfinitequery\n           */\n          name?: NameTransformer;\n        };\n    /**\n     * Configuration for generated mutation options helpers.\n     *\n     * See {@link https://tanstack.com/query/v5/docs/framework/svelte/reference/functions/createmutation}\n     *\n     * Can be:\n     * - `boolean`: Shorthand for `{ enabled: boolean }`\n     * - `string` or `function`: Shorthand for `{ name: string | function }`\n     * - `object`: Full configuration object\n     *\n     * @default true\n     */\n    mutationOptions?:\n      | boolean\n      | NameTransformer\n      | {\n          /**\n           * Casing convention for generated names.\n           *\n           * @default 'camelCase'\n           */\n          case?: Casing;\n          /**\n           * Whether this feature is enabled.\n           *\n           * @default true\n           */\n          enabled?: boolean;\n          /**\n           * Whether to export generated symbols.\n           *\n           * @default true\n           */\n          exported?: boolean;\n          /**\n           * Custom function to generate metadata for the operation.\n           * Can return any valid meta object that will be included in the generated mutation options.\n           * @param operation - The operation object containing all available metadata\n           * @returns A meta object with any properties you want to include\n           *\n           * @example\n           * ```ts\n           * meta: (operation) => ({\n           *   customField: operation.id,\n           *   isDeprecated: operation.deprecated,\n           *   tags: operation.tags,\n           *   customObject: {\n           *     method: operation.method,\n           *     path: operation.path\n           *   }\n           * })\n           * ```\n           *\n           * @default undefined\n           */\n          meta?: (operation: IR.OperationObject) => Record<string, unknown>;\n          /**\n           * Naming pattern for generated names.\n           *\n           * @default '{{name}}Mutation'\n           * @see https://tanstack.com/query/v5/docs/framework/svelte/reference/functions/createmutation\n           */\n          name?: NameTransformer;\n        };\n    /**\n     * Configuration for generated query keys.\n     *\n     * See {@link https://tanstack.com/query/v5/docs/framework/react/guides/query-keys}\n     *\n     * Can be:\n     * - `boolean`: Shorthand for `{ enabled: boolean }`\n     * - `string` or `function`: Shorthand for `{ name: string | function }`\n     * - `object`: Full configuration object\n     *\n     * @default true\n     */\n    queryKeys?:\n      | boolean\n      | NameTransformer\n      | {\n          /**\n           * Casing convention for generated names.\n           *\n           * @default 'camelCase'\n           */\n          case?: Casing;\n          /**\n           * Whether this feature is enabled.\n           *\n           * @default true\n           */\n          enabled?: boolean;\n          /**\n           * Naming pattern for generated names.\n           *\n           * @default '{{name}}QueryKey'\n           * @see https://tanstack.com/query/v5/docs/framework/react/guides/query-keys\n           */\n          name?: NameTransformer;\n          /**\n           * Whether to include operation tags in query keys.\n           * This will make query keys larger but provides better cache invalidation capabilities.\n           *\n           * @default false\n           */\n          tags?: boolean;\n        };\n    /**\n     * Configuration for generated query options helpers.\n     *\n     * See {@link https://tanstack.com/query/v5/docs/framework/svelte/reference/functions/createquery}\n     *\n     * Can be:\n     * - `boolean`: Shorthand for `{ enabled: boolean }`\n     * - `string` or `function`: Shorthand for `{ name: string | function }`\n     * - `object`: Full configuration object\n     *\n     * @default true\n     */\n    queryOptions?:\n      | boolean\n      | NameTransformer\n      | {\n          /**\n           * Casing convention for generated names.\n           *\n           * @default 'camelCase'\n           */\n          case?: Casing;\n          /**\n           * Whether this feature is enabled.\n           *\n           * @default true\n           */\n          enabled?: boolean;\n          /**\n           * Whether to export generated symbols.\n           *\n           * @default true\n           */\n          exported?: boolean;\n          /**\n           * Custom function to generate metadata for the operation.\n           * Can return any valid meta object that will be included in the generated query options.\n           * @param operation - The operation object containing all available metadata\n           * @returns A meta object with any properties you want to include\n           *\n           * @example\n           * ```ts\n           * meta: (operation) => ({\n           *   customField: operation.id,\n           *   isDeprecated: operation.deprecated,\n           *   tags: operation.tags,\n           *   customObject: {\n           *     method: operation.method,\n           *     path: operation.path\n           *   }\n           * })\n           * ```\n           *\n           * @default undefined\n           */\n          meta?: (operation: IR.OperationObject) => Record<string, unknown>;\n          /**\n           * Naming pattern for generated names.\n           *\n           * @default '{{name}}Options'\n           * @see https://tanstack.com/query/v5/docs/framework/svelte/reference/functions/createquery\n           */\n          name?: NameTransformer;\n        };\n  };\n\nexport type Config = Plugin.Name<'@tanstack/svelte-query'> &\n  Plugin.Hooks &\n  Plugin.Comments &\n  Plugin.Exports & {\n    /**\n     * Casing convention for generated names.\n     */\n    case: Casing;\n    /**\n     * Resolved configuration for generated infinite query key helpers.\n     *\n     * @see https://tanstack.com/query/v5/docs/framework/svelte/reference/functions/createinfinitequery\n     */\n    infiniteQueryKeys: NamingOptions &\n      FeatureToggle & {\n        /**\n         * Whether to include operation tags in infinite query keys.\n         * This will make query keys larger but provides better cache invalidation capabilities.\n         *\n         * @default false\n         */\n        tags: boolean;\n      };\n    /**\n     * Resolved configuration for generated infinite query options helpers.\n     *\n     * @see https://tanstack.com/query/v5/docs/framework/svelte/reference/functions/createinfinitequery\n     */\n    infiniteQueryOptions: NamingOptions &\n      FeatureToggle & {\n        /**\n         * Custom function to generate metadata for the operation.\n         * Can return any valid meta object that will be included in the generated infinite query options.\n         * @param operation - The operation object containing all available metadata\n         * @returns A meta object with any properties you want to include\n         *\n         * @example\n         * ```ts\n         * meta: (operation) => ({\n         *   customField: operation.id,\n         *   isDeprecated: operation.deprecated,\n         *   tags: operation.tags,\n         *   customObject: {\n         *     method: operation.method,\n         *     path: operation.path\n         *   }\n         * })\n         * ```\n         *\n         * @default undefined\n         */\n        meta: (operation: IR.OperationObject) => Record<string, unknown>;\n      };\n    /**\n     * Resolved configuration for generated mutation options helpers.\n     *\n     * @see https://tanstack.com/query/v5/docs/framework/svelte/reference/functions/createmutation\n     */\n    mutationOptions: NamingOptions &\n      FeatureToggle & {\n        /**\n         * Whether to export generated symbols.\n         *\n         * @default true\n         */\n        exported: boolean;\n        /**\n         * Custom function to generate metadata for the operation.\n         * Can return any valid meta object that will be included in the generated mutation options.\n         * @param operation - The operation object containing all available metadata\n         * @returns A meta object with any properties you want to include\n         *\n         * @example\n         * ```ts\n         * meta: (operation) => ({\n         *   customField: operation.id,\n         *   isDeprecated: operation.deprecated,\n         *   tags: operation.tags,\n         *   customObject: {\n         *     method: operation.method,\n         *     path: operation.path\n         *   }\n         * })\n         * ```\n         *\n         * @default undefined\n         */\n        meta: (operation: IR.OperationObject) => Record<string, unknown>;\n      };\n    /**\n     * Resolved configuration for generated query keys.\n     *\n     * @see https://tanstack.com/query/v5/docs/framework/react/guides/query-keys\n     */\n    queryKeys: NamingOptions &\n      FeatureToggle & {\n        /**\n         * Whether to include operation tags in query keys.\n         * This will make query keys larger but provides better cache invalidation capabilities.\n         *\n         * @default false\n         */\n        tags: boolean;\n      };\n    /**\n     * Resolved configuration for generated query options helpers.\n     *\n     * @see https://tanstack.com/query/v5/docs/framework/svelte/reference/functions/createquery\n     */\n    queryOptions: NamingOptions &\n      FeatureToggle & {\n        /**\n         * Whether to export generated symbols.\n         *\n         * @default true\n         */\n        exported: boolean;\n        /**\n         * Custom function to generate metadata for the operation.\n         * Can return any valid meta object that will be included in the generated query options.\n         * @param operation - The operation object containing all available metadata\n         * @returns A meta object with any properties you want to include\n         *\n         * @example\n         * ```ts\n         * meta: (operation) => ({\n         *   customField: operation.id,\n         *   isDeprecated: operation.deprecated,\n         *   tags: operation.tags,\n         *   customObject: {\n         *     method: operation.method,\n         *     path: operation.path\n         *   }\n         * })\n         * ```\n         *\n         * @default undefined\n         */\n        meta: (operation: IR.OperationObject) => Record<string, unknown>;\n      };\n  };\n\nexport type TanStackSvelteQueryPlugin = DefinePlugin<UserConfig, Config>;\n"
  },
  {
    "path": "packages/openapi-ts/src/plugins/@tanstack/vue-query/config.ts",
    "content": "import { definePluginConfig, mappers } from '@hey-api/shared';\n\nimport { handler } from '../../../plugins/@tanstack/query-core/plugin';\nimport type { TanStackVueQueryPlugin } from './types';\n\nexport const defaultConfig: TanStackVueQueryPlugin['Config'] = {\n  config: {\n    case: 'camelCase',\n    comments: true,\n    includeInEntry: false,\n  },\n  dependencies: ['@hey-api/sdk', '@hey-api/typescript'],\n  handler: handler as TanStackVueQueryPlugin['Handler'],\n  name: '@tanstack/vue-query',\n  resolveConfig: (plugin, context) => {\n    plugin.config.infiniteQueryKeys = context.valueToObject({\n      defaultValue: {\n        case: plugin.config.case ?? 'camelCase',\n        enabled: true,\n        name: '{{name}}InfiniteQueryKey',\n        tags: false,\n      },\n      mappers,\n      value: plugin.config.infiniteQueryKeys,\n    });\n\n    plugin.config.infiniteQueryOptions = context.valueToObject({\n      defaultValue: {\n        case: plugin.config.case ?? 'camelCase',\n        enabled: true,\n        name: '{{name}}InfiniteOptions',\n      },\n      mappers,\n      value: plugin.config.infiniteQueryOptions,\n    });\n\n    plugin.config.mutationOptions = context.valueToObject({\n      defaultValue: {\n        case: plugin.config.case ?? 'camelCase',\n        enabled: true,\n        exported: true,\n        name: '{{name}}Mutation',\n      },\n      mappers,\n      value: plugin.config.mutationOptions,\n    });\n\n    plugin.config.queryKeys = context.valueToObject({\n      defaultValue: {\n        case: plugin.config.case ?? 'camelCase',\n        enabled: true,\n        name: '{{name}}QueryKey',\n        tags: false,\n      },\n      mappers,\n      value: plugin.config.queryKeys,\n    });\n\n    plugin.config.queryOptions = context.valueToObject({\n      defaultValue: {\n        case: plugin.config.case ?? 'camelCase',\n        enabled: true,\n        exported: true,\n        name: '{{name}}Options',\n      },\n      mappers,\n      value: plugin.config.queryOptions,\n    });\n  },\n};\n\n/**\n * Type helper for `@tanstack/vue-query` plugin, returns {@link Plugin.Config} object\n */\nexport const defineConfig = definePluginConfig(defaultConfig);\n"
  },
  {
    "path": "packages/openapi-ts/src/plugins/@tanstack/vue-query/index.ts",
    "content": "export { defaultConfig, defineConfig } from './config';\nexport type { TanStackVueQueryPlugin } from './types';\n"
  },
  {
    "path": "packages/openapi-ts/src/plugins/@tanstack/vue-query/types.ts",
    "content": "import type {\n  Casing,\n  DefinePlugin,\n  FeatureToggle,\n  IR,\n  NameTransformer,\n  NamingOptions,\n  Plugin,\n} from '@hey-api/shared';\n\nexport type UserConfig = Plugin.Name<'@tanstack/vue-query'> &\n  Plugin.Hooks &\n  Plugin.UserComments &\n  Plugin.UserExports & {\n    /**\n     * Casing convention for generated names.\n     *\n     * @default 'camelCase'\n     */\n    case?: Casing;\n    /**\n     * Configuration for generated infinite query key helpers.\n     *\n     * See {@link https://tanstack.com/query/v5/docs/framework/vue/reference/infiniteQueryOptions}\n     *\n     * Can be:\n     * - `boolean`: Shorthand for `{ enabled: boolean }`\n     * - `string` or `function`: Shorthand for `{ name: string | function }`\n     * - `object`: Full configuration object\n     *\n     * @default true\n     */\n    infiniteQueryKeys?:\n      | boolean\n      | NameTransformer\n      | {\n          /**\n           * Casing convention for generated names.\n           *\n           * @default 'camelCase'\n           */\n          case?: Casing;\n          /**\n           * Whether this feature is enabled.\n           *\n           * @default true\n           */\n          enabled?: boolean;\n          /**\n           * Naming pattern for generated names.\n           *\n           * @default '{{name}}InfiniteQueryKey'\n           * @see https://tanstack.com/query/v5/docs/framework/vue/reference/infiniteQueryOptions\n           */\n          name?: NameTransformer;\n          /**\n           * Whether to include operation tags in infinite query keys.\n           * This will make query keys larger but provides better cache invalidation capabilities.\n           *\n           * @default false\n           */\n          tags?: boolean;\n        };\n    /**\n     * Configuration for generated infinite query options helpers.\n     *\n     * See {@link https://tanstack.com/query/v5/docs/framework/vue/reference/infiniteQueryOptions}\n     *\n     * Can be:\n     * - `boolean`: Shorthand for `{ enabled: boolean }`\n     * - `string` or `function`: Shorthand for `{ name: string | function }`\n     * - `object`: Full configuration object\n     *\n     * @default true\n     */\n    infiniteQueryOptions?:\n      | boolean\n      | NameTransformer\n      | {\n          /**\n           * Casing convention for generated names.\n           *\n           * @default 'camelCase'\n           */\n          case?: Casing;\n          /**\n           * Whether this feature is enabled.\n           *\n           * @default true\n           */\n          enabled?: boolean;\n          /**\n           * Custom function to generate metadata for the operation.\n           * Can return any valid meta object that will be included in the generated infinite query options.\n           *\n           * @param operation - The operation object containing all available metadata\n           * @returns A meta object with any properties you want to include\n           *\n           * @example\n           * ```ts\n           * meta: (operation) => ({\n           *   customField: operation.id,\n           *   isDeprecated: operation.deprecated,\n           *   tags: operation.tags,\n           *   customObject: {\n           *     method: operation.method,\n           *     path: operation.path\n           *   }\n           * })\n           * ```\n           *\n           * @default undefined\n           */\n          meta?: (operation: IR.OperationObject) => Record<string, unknown>;\n          /**\n           * Naming pattern for generated names.\n           *\n           * @default '{{name}}InfiniteOptions'\n           * @see https://tanstack.com/query/v5/docs/framework/vue/reference/infiniteQueryOptions\n           */\n          name?: NameTransformer;\n        };\n    /**\n     * Configuration for generated mutation options helpers.\n     *\n     * See {@link https://tanstack.com/query/v5/docs/framework/vue/reference/useMutation}\n     *\n     * Can be:\n     * - `boolean`: Shorthand for `{ enabled: boolean }`\n     * - `string` or `function`: Shorthand for `{ name: string | function }`\n     * - `object`: Full configuration object\n     *\n     * @default true\n     */\n    mutationOptions?:\n      | boolean\n      | NameTransformer\n      | {\n          /**\n           * Casing convention for generated names.\n           *\n           * @default 'camelCase'\n           */\n          case?: Casing;\n          /**\n           * Whether this feature is enabled.\n           *\n           * @default true\n           */\n          enabled?: boolean;\n          /**\n           * Whether to export generated symbols.\n           *\n           * @default true\n           */\n          exported?: boolean;\n          /**\n           * Custom function to generate metadata for the operation.\n           * Can return any valid meta object that will be included in the generated mutation options.\n           *\n           * @param operation - The operation object containing all available metadata\n           * @returns A meta object with any properties you want to include\n           *\n           * @example\n           * ```ts\n           * meta: (operation) => ({\n           *   customField: operation.id,\n           *   isDeprecated: operation.deprecated,\n           *   tags: operation.tags,\n           *   customObject: {\n           *     method: operation.method,\n           *     path: operation.path\n           *   }\n           * })\n           * ```\n           *\n           * @default undefined\n           */\n          meta?: (operation: IR.OperationObject) => Record<string, unknown>;\n          /**\n           * Naming pattern for generated names.\n           *\n           * @default '{{name}}Mutation'\n           * @see https://tanstack.com/query/v5/docs/framework/vue/reference/useMutation\n           */\n          name?: NameTransformer;\n        };\n    /**\n     * Configuration for generated query keys.\n     *\n     * See {@link https://tanstack.com/query/v5/docs/framework/vue/reference/queryKey}\n     *\n     * Can be:\n     * - `boolean`: Shorthand for `{ enabled: boolean }`\n     * - `string` or `function`: Shorthand for `{ name: string | function }`\n     * - `object`: Full configuration object\n     *\n     * @default true\n     */\n    queryKeys?:\n      | boolean\n      | NameTransformer\n      | {\n          /**\n           * Casing convention for generated names.\n           *\n           * @default 'camelCase'\n           */\n          case?: Casing;\n          /**\n           * Whether this feature is enabled.\n           *\n           * @default true\n           */\n          enabled?: boolean;\n          /**\n           * Naming pattern for generated names.\n           *\n           * @default '{{name}}QueryKey'\n           * @see https://tanstack.com/query/v5/docs/framework/vue/reference/queryKey\n           */\n          name?: NameTransformer;\n          /**\n           * Whether to include operation tags in query keys.\n           * This will make query keys larger but provides better cache invalidation capabilities.\n           *\n           * @default false\n           */\n          tags?: boolean;\n        };\n    /**\n     * Configuration for generated query options helpers.\n     *\n     * See {@link https://tanstack.com/query/v5/docs/framework/vue/reference/queryOptions}\n     *\n     * Can be:\n     * - `boolean`: Shorthand for `{ enabled: boolean }`\n     * - `string` or `function`: Shorthand for `{ name: string | function }`\n     * - `object`: Full configuration object\n     *\n     * @default true\n     */\n    queryOptions?:\n      | boolean\n      | NameTransformer\n      | {\n          /**\n           * Casing convention for generated names.\n           *\n           * @default 'camelCase'\n           */\n          case?: Casing;\n          /**\n           * Whether this feature is enabled.\n           *\n           * @default true\n           */\n          enabled?: boolean;\n          /**\n           * Whether to export generated symbols.\n           *\n           * @default true\n           */\n          exported?: boolean;\n          /**\n           * Custom function to generate metadata for the operation.\n           * Can return any valid meta object that will be included in the generated query options.\n           *\n           * @param operation - The operation object containing all available metadata\n           * @returns A meta object with any properties you want to include\n           *\n           * @example\n           * ```ts\n           * meta: (operation) => ({\n           *   customField: operation.id,\n           *   isDeprecated: operation.deprecated,\n           *   tags: operation.tags,\n           *   customObject: {\n           *     method: operation.method,\n           *     path: operation.path\n           *   }\n           * })\n           * ```\n           *\n           * @default undefined\n           */\n          meta?: (operation: IR.OperationObject) => Record<string, unknown>;\n          /**\n           * Naming pattern for generated names.\n           *\n           * @default '{{name}}Options'\n           * @see https://tanstack.com/query/v5/docs/framework/vue/reference/queryOptions\n           */\n          name?: NameTransformer;\n        };\n  };\n\nexport type Config = Plugin.Name<'@tanstack/vue-query'> &\n  Plugin.Hooks &\n  Plugin.Comments &\n  Plugin.Exports & {\n    /**\n     * Casing convention for generated names.\n     */\n    case: Casing;\n    /**\n     * Resolved configuration for generated infinite query key helpers.\n     *\n     * @see https://tanstack.com/query/v5/docs/framework/vue/reference/infiniteQueryOptions\n     */\n    infiniteQueryKeys: NamingOptions &\n      FeatureToggle & {\n        /**\n         * Whether to include operation tags in infinite query keys.\n         * This will make query keys larger but provides better cache invalidation capabilities.\n         *\n         * @default false\n         */\n        tags: boolean;\n      };\n    /**\n     * Resolved configuration for generated infinite query options helpers.\n     *\n     * @see https://tanstack.com/query/v5/docs/framework/vue/reference/infiniteQueryOptions\n     */\n    infiniteQueryOptions: NamingOptions &\n      FeatureToggle & {\n        /**\n         * Custom function to generate metadata for the operation.\n         * Can return any valid meta object that will be included in the generated infinite query options.\n         *\n         * @param operation - The operation object containing all available metadata\n         * @returns A meta object with any properties you want to include\n         *\n         * @example\n         * ```ts\n         * meta: (operation) => ({\n         *   customField: operation.id,\n         *   isDeprecated: operation.deprecated,\n         *   tags: operation.tags,\n         *   customObject: {\n         *     method: operation.method,\n         *     path: operation.path\n         *   }\n         * })\n         * ```\n         *\n         * @default undefined\n         */\n        meta: (operation: IR.OperationObject) => Record<string, unknown>;\n      };\n    /**\n     * Resolved configuration for generated mutation options helpers.\n     *\n     * @see https://tanstack.com/query/v5/docs/framework/vue/reference/useMutation\n     */\n    mutationOptions: NamingOptions &\n      FeatureToggle & {\n        /**\n         * Whether to export generated symbols.\n         *\n         * @default true\n         */\n        exported: boolean;\n        /**\n         * Custom function to generate metadata for the operation.\n         * Can return any valid meta object that will be included in the generated mutation options.\n         *\n         * @param operation - The operation object containing all available metadata\n         * @returns A meta object with any properties you want to include\n         *\n         * @example\n         * ```ts\n         * meta: (operation) => ({\n         *   customField: operation.id,\n         *   isDeprecated: operation.deprecated,\n         *   tags: operation.tags,\n         *   customObject: {\n         *     method: operation.method,\n         *     path: operation.path\n         *   }\n         * })\n         * ```\n         *\n         * @default undefined\n         */\n        meta: (operation: IR.OperationObject) => Record<string, unknown>;\n      };\n    /**\n     * Resolved configuration for generated query keys.\n     *\n     * @see https://tanstack.com/query/v5/docs/framework/vue/reference/queryKey\n     */\n    queryKeys: NamingOptions &\n      FeatureToggle & {\n        /**\n         * Whether to include operation tags in query keys.\n         * This will make query keys larger but provides better cache invalidation capabilities.\n         *\n         * @default false\n         */\n        tags: boolean;\n      };\n    /**\n     * Resolved configuration for generated query options helpers.\n     *\n     * @see https://tanstack.com/query/v5/docs/framework/vue/reference/queryOptions\n     */\n    queryOptions: NamingOptions &\n      FeatureToggle & {\n        /**\n         * Whether to export generated symbols.\n         *\n         * @default true\n         */\n        exported: boolean;\n        /**\n         * Custom function to generate metadata for the operation.\n         * Can return any valid meta object that will be included in the generated query options.\n         *\n         * @param operation - The operation object containing all available metadata\n         * @returns A meta object with any properties you want to include\n         *\n         * @example\n         * ```ts\n         * meta: (operation) => ({\n         *   customField: operation.id,\n         *   isDeprecated: operation.deprecated,\n         *   tags: operation.tags,\n         *   customObject: {\n         *     method: operation.method,\n         *     path: operation.path\n         *   }\n         * })\n         * ```\n         *\n         * @default undefined\n         */\n        meta: (operation: IR.OperationObject) => Record<string, unknown>;\n      };\n  };\n\nexport type TanStackVueQueryPlugin = DefinePlugin<UserConfig, Config>;\n"
  },
  {
    "path": "packages/openapi-ts/src/plugins/arktype/api.ts",
    "content": "import type { $ } from '../../ts-dsl';\nimport type { ValidatorArgs } from './shared/types';\nimport { createRequestValidatorV2, createResponseValidatorV2 } from './v2/api';\n\nexport type IApi = {\n  createRequestValidator: (args: ValidatorArgs) => ReturnType<typeof $.func> | undefined;\n  createResponseValidator: (args: ValidatorArgs) => ReturnType<typeof $.func> | undefined;\n};\n\nexport class Api implements IApi {\n  createRequestValidator(args: ValidatorArgs): ReturnType<typeof $.func> | undefined {\n    return createRequestValidatorV2(args);\n  }\n\n  createResponseValidator(args: ValidatorArgs): ReturnType<typeof $.func> | undefined {\n    return createResponseValidatorV2(args);\n  }\n}\n"
  },
  {
    "path": "packages/openapi-ts/src/plugins/arktype/config.ts",
    "content": "import { definePluginConfig, mappers } from '@hey-api/shared';\n\nimport { Api } from './api';\nimport { handler } from './plugin';\nimport type { ArktypePlugin } from './types';\n\nexport const defaultConfig: ArktypePlugin['Config'] = {\n  api: new Api(),\n  config: {\n    case: 'PascalCase',\n    comments: true,\n    includeInEntry: false,\n    metadata: false,\n  },\n  handler,\n  name: 'arktype',\n  resolveConfig: (plugin, context) => {\n    plugin.config.types = context.valueToObject({\n      defaultValue: {\n        infer: {\n          case: 'PascalCase',\n          enabled: false,\n        },\n      },\n      mappers: {\n        object: (fields, defaultValue) => ({\n          ...fields,\n          infer: context.valueToObject({\n            defaultValue: {\n              ...(defaultValue.infer as Extract<\n                typeof defaultValue.infer,\n                Record<string, unknown>\n              >),\n              enabled:\n                fields.infer !== undefined\n                  ? Boolean(fields.infer)\n                  : (\n                      defaultValue.infer as Extract<\n                        typeof defaultValue.infer,\n                        Record<string, unknown>\n                      >\n                    ).enabled,\n            },\n            mappers,\n            value: fields.infer,\n          }),\n        }),\n      },\n      value: plugin.config.types,\n    });\n\n    plugin.config.definitions = context.valueToObject({\n      defaultValue: {\n        case: plugin.config.case ?? 'PascalCase',\n        enabled: true,\n        name: '{{name}}',\n        types: {\n          ...plugin.config.types,\n          infer: {\n            ...(plugin.config.types.infer as Extract<\n              typeof plugin.config.types.infer,\n              Record<string, unknown>\n            >),\n            name: '{{name}}',\n          },\n        },\n      },\n      mappers: {\n        ...mappers,\n        object: (fields, defaultValue) => ({\n          ...fields,\n          types: context.valueToObject({\n            defaultValue: defaultValue.types!,\n            mappers: {\n              object: (fields, defaultValue) => ({\n                ...fields,\n                infer: context.valueToObject({\n                  defaultValue: {\n                    ...(defaultValue.infer as Extract<\n                      typeof defaultValue.infer,\n                      Record<string, unknown>\n                    >),\n                    enabled:\n                      fields.infer !== undefined\n                        ? Boolean(fields.infer)\n                        : (\n                            defaultValue.infer as Extract<\n                              typeof defaultValue.infer,\n                              Record<string, unknown>\n                            >\n                          ).enabled,\n                  },\n                  mappers,\n                  value: fields.infer,\n                }),\n              }),\n            },\n            value: fields.types,\n          }),\n        }),\n      },\n      value: plugin.config.definitions,\n    });\n\n    plugin.config.requests = context.valueToObject({\n      defaultValue: {\n        case: plugin.config.case ?? 'PascalCase',\n        enabled: true,\n        name: '{{name}}Data',\n        types: {\n          ...plugin.config.types,\n          infer: {\n            ...(plugin.config.types.infer as Extract<\n              typeof plugin.config.types.infer,\n              Record<string, unknown>\n            >),\n            name: '{{name}}Data',\n          },\n        },\n      },\n      mappers: {\n        ...mappers,\n        object: (fields, defaultValue) => ({\n          ...fields,\n          types: context.valueToObject({\n            defaultValue: defaultValue.types!,\n            mappers: {\n              object: (fields, defaultValue) => ({\n                ...fields,\n                infer: context.valueToObject({\n                  defaultValue: {\n                    ...(defaultValue.infer as Extract<\n                      typeof defaultValue.infer,\n                      Record<string, unknown>\n                    >),\n                    enabled:\n                      fields.infer !== undefined\n                        ? Boolean(fields.infer)\n                        : (\n                            defaultValue.infer as Extract<\n                              typeof defaultValue.infer,\n                              Record<string, unknown>\n                            >\n                          ).enabled,\n                  },\n                  mappers,\n                  value: fields.infer,\n                }),\n              }),\n            },\n            value: fields.types,\n          }),\n        }),\n      },\n      value: plugin.config.requests,\n    });\n\n    plugin.config.responses = context.valueToObject({\n      defaultValue: {\n        case: plugin.config.case ?? 'PascalCase',\n        enabled: true,\n        name: '{{name}}Response',\n        types: {\n          ...plugin.config.types,\n          infer: {\n            ...(plugin.config.types.infer as Extract<\n              typeof plugin.config.types.infer,\n              Record<string, unknown>\n            >),\n            name: '{{name}}Response',\n          },\n        },\n      },\n      mappers: {\n        ...mappers,\n        object: (fields, defaultValue) => ({\n          ...fields,\n          types: context.valueToObject({\n            defaultValue: defaultValue.types!,\n            mappers: {\n              object: (fields, defaultValue) => ({\n                ...fields,\n                infer: context.valueToObject({\n                  defaultValue: {\n                    ...(defaultValue.infer as Extract<\n                      typeof defaultValue.infer,\n                      Record<string, unknown>\n                    >),\n                    enabled:\n                      fields.infer !== undefined\n                        ? Boolean(fields.infer)\n                        : (\n                            defaultValue.infer as Extract<\n                              typeof defaultValue.infer,\n                              Record<string, unknown>\n                            >\n                          ).enabled,\n                  },\n                  mappers,\n                  value: fields.infer,\n                }),\n              }),\n            },\n            value: fields.types,\n          }),\n        }),\n      },\n      value: plugin.config.responses,\n    });\n\n    plugin.config.webhooks = context.valueToObject({\n      defaultValue: {\n        case: plugin.config.case ?? 'PascalCase',\n        enabled: true,\n        name: '{{name}}WebhookRequest',\n        types: {\n          ...plugin.config.types,\n          infer: {\n            ...(plugin.config.types.infer as Extract<\n              typeof plugin.config.types.infer,\n              Record<string, unknown>\n            >),\n            name: '{{name}}WebhookRequest',\n          },\n        },\n      },\n      mappers: {\n        ...mappers,\n        object: (fields, defaultValue) => ({\n          ...fields,\n          types: context.valueToObject({\n            defaultValue: defaultValue.types!,\n            mappers: {\n              object: (fields, defaultValue) => ({\n                ...fields,\n                infer: context.valueToObject({\n                  defaultValue: {\n                    ...(defaultValue.infer as Extract<\n                      typeof defaultValue.infer,\n                      Record<string, unknown>\n                    >),\n                    enabled:\n                      fields.infer !== undefined\n                        ? Boolean(fields.infer)\n                        : (\n                            defaultValue.infer as Extract<\n                              typeof defaultValue.infer,\n                              Record<string, unknown>\n                            >\n                          ).enabled,\n                  },\n                  mappers,\n                  value: fields.infer,\n                }),\n              }),\n            },\n            value: fields.types,\n          }),\n        }),\n      },\n      value: plugin.config.webhooks,\n    });\n  },\n  tags: ['validator'],\n};\n\n/**\n * Type helper for Arktype plugin, returns {@link Plugin.Config} object\n */\nexport const defineConfig = definePluginConfig(defaultConfig);\n"
  },
  {
    "path": "packages/openapi-ts/src/plugins/arktype/constants.ts",
    "content": "export const identifiers = {\n  keywords: {\n    false: 'false',\n    true: 'true',\n  },\n  /**\n   * {@link https://arktype.io/docs/primitives#number Number}\n   */\n  number: {\n    Infinity: 'Infinity',\n    NaN: 'NaN',\n    NegativeInfinity: 'NegativeInfinity',\n    epoch: 'epoch',\n    integer: 'integer',\n    safe: 'safe',\n  },\n  /**\n   * {@link https://arktype.io/docs/primitives Primitives}\n   */\n  primitives: {\n    bigint: 'bigint',\n    boolean: 'boolean',\n    keywords: 'keywords',\n    null: 'null',\n    number: 'number',\n    string: 'string',\n    symbol: 'symbol',\n    undefined: 'undefined',\n    unit: 'unit',\n  },\n  /**\n   * {@link https://arktype.io/docs/primitives#string String}\n   */\n  string: {\n    NFC: 'NFC',\n    NFD: 'NFD',\n    NFKC: 'NFKC',\n    NFKD: 'NFKD',\n    alpha: 'alpha',\n    alphanumeric: 'alphanumeric',\n    base64: 'base64',\n    capitalize: 'capitalize',\n    creditCard: 'creditCard',\n    date: 'date',\n    digits: 'digits',\n    email: 'email',\n    epoch: 'epoch',\n    hex: 'hex',\n    integer: 'integer',\n    ip: 'ip',\n    iso: 'iso',\n    json: 'json',\n    lower: 'lower',\n    normalize: 'normalize',\n    numeric: 'numeric',\n    parse: 'parse',\n    preformatted: 'preformatted',\n    regex: 'regex',\n    semver: 'semver',\n    trim: 'trim',\n    upper: 'upper',\n    url: 'url',\n    uuid: 'uuid',\n    v1: 'v1',\n    v2: 'v2',\n    v3: 'v3',\n    v4: 'v4',\n    v5: 'v5',\n    v6: 'v6',\n    v7: 'v7',\n    v8: 'v8',\n  },\n  /**\n   * {@link https://arktype.io/docs/type-api Type API}\n   */\n  type: {\n    $: '$',\n    allows: 'allows',\n    and: 'and',\n    array: 'array',\n    as: 'as',\n    assert: 'assert',\n    brand: 'brand',\n    configure: 'configure',\n    default: 'default',\n    describe: 'describe',\n    description: 'description',\n    equals: 'equals',\n    exclude: 'exclude',\n    expression: 'expression',\n    extends: 'extends',\n    extract: 'extract',\n    filter: 'filter',\n    from: 'from',\n    ifEquals: 'ifEquals',\n    ifExtends: 'ifExtends',\n    infer: 'infer',\n    inferIn: 'inferIn',\n    intersect: 'intersect',\n    json: 'json',\n    meta: 'meta',\n    narrow: 'narrow',\n    onDeepUndeclaredKey: 'onDeepUndeclaredKey',\n    onUndeclaredKey: 'onUndeclaredKey',\n    optional: 'optional',\n    or: 'or',\n    overlaps: 'overlaps',\n    pipe: 'pipe',\n    select: 'select',\n    to: 'to',\n    toJsonSchema: 'toJsonSchema',\n  },\n};\n"
  },
  {
    "path": "packages/openapi-ts/src/plugins/arktype/index.ts",
    "content": "export { defaultConfig, defineConfig } from './config';\nexport type { ArktypePlugin } from './types';\n"
  },
  {
    "path": "packages/openapi-ts/src/plugins/arktype/plugin.ts",
    "content": "import type { ArktypePlugin } from './types';\nimport { handlerV2 } from './v2/plugin';\n\nexport const handler: ArktypePlugin['Handler'] = (args) => handlerV2(args);\n"
  },
  {
    "path": "packages/openapi-ts/src/plugins/arktype/shared/export.ts",
    "content": "import type { Symbol } from '@hey-api/codegen-core';\nimport type { IR } from '@hey-api/shared';\n\nimport { createSchemaComment } from '../../../plugins/shared/utils/schema';\nimport { $ } from '../../../ts-dsl';\nimport { identifiers } from '../constants';\nimport type { ArktypePlugin } from '../types';\nimport type { Ast } from './types';\n\nexport function exportAst({\n  ast,\n  plugin,\n  schema,\n  symbol,\n  typeInferSymbol,\n}: {\n  ast: Ast;\n  plugin: ArktypePlugin['Instance'];\n  schema: IR.SchemaObject;\n  symbol: Symbol;\n  typeInferSymbol: Symbol | undefined;\n}): void {\n  const type = plugin.external('arktype.type');\n\n  const statement = $.const(symbol)\n    .export()\n    .$if(plugin.config.comments && createSchemaComment(schema), (c, v) => c.doc(v))\n    // .type(\n    //   ast.typeName\n    //     ? (tsc.propertyAccessExpression({\n    //         expression: z,\n    //         name: ast.typeName,\n    //       }) as unknown as ts.TypeNode)\n    //     : undefined,\n    // )\n    .assign($(type).call(ast.def ? $.literal(ast.def) : ast.expression));\n  plugin.node(statement);\n\n  if (typeInferSymbol) {\n    const inferType = $.type\n      .alias(typeInferSymbol)\n      .export()\n      .type($.type(symbol).attr(identifiers.type.infer).typeofType());\n    plugin.node(inferType);\n  }\n}\n"
  },
  {
    "path": "packages/openapi-ts/src/plugins/arktype/shared/types.ts",
    "content": "import type { Refs, SymbolMeta } from '@hey-api/codegen-core';\nimport type { IR, SchemaExtractor } from '@hey-api/shared';\nimport type ts from 'typescript';\n\nimport type { $ } from '../../../ts-dsl';\nimport type { ArktypePlugin } from '../types';\n\nexport type Ast = {\n  def: string;\n  expression: ReturnType<typeof $.call | typeof $.expr | typeof $.object>;\n  hasLazyExpression?: boolean;\n  typeName?: string | ts.Identifier;\n};\n\nexport type IrSchemaToAstOptions = {\n  /** The plugin instance. */\n  plugin: ArktypePlugin['Instance'];\n  /** Optional schema extractor function. */\n  schemaExtractor?: SchemaExtractor;\n  /** The plugin state references. */\n  state: Refs<PluginState>;\n};\n\nexport type PluginState = Pick<Required<SymbolMeta>, 'path'> &\n  Pick<Partial<SymbolMeta>, 'tags'> & {\n    hasLazyExpression: boolean;\n  };\n\nexport type ValidatorArgs = {\n  operation: IR.OperationObject;\n  plugin: ArktypePlugin['Instance'];\n};\n"
  },
  {
    "path": "packages/openapi-ts/src/plugins/arktype/types.ts",
    "content": "import type {\n  Casing,\n  DefinePlugin,\n  FeatureToggle,\n  NameTransformer,\n  NamingOptions,\n  Plugin,\n} from '@hey-api/shared';\n\nimport type { IApi } from './api';\n\nexport type UserConfig = Plugin.Name<'arktype'> &\n  Plugin.Hooks &\n  Plugin.UserComments &\n  Plugin.UserExports & {\n    /**\n     * Casing convention for generated names.\n     *\n     * @default 'PascalCase'\n     */\n    case?: Casing;\n    /**\n     * Configuration for reusable schema definitions.\n     *\n     * Controls generation of shared Arktype schemas that can be referenced\n     * across requests and responses.\n     *\n     * Can be:\n     * - `boolean`: Shorthand for `{ enabled: boolean }`\n     * - `string` or `function`: Shorthand for `{ name: string | function }`\n     * - `object`: Full configuration object\n     */\n    definitions?:\n      | boolean\n      | NameTransformer\n      | {\n          /**\n           * Casing convention for generated names.\n           *\n           * @default 'PascalCase'\n           */\n          case?: Casing;\n          /**\n           * Whether this feature is enabled.\n           *\n           * @default true\n           */\n          enabled?: boolean;\n          /**\n           * Naming pattern for generated names.\n           *\n           * @default '{{name}}'\n           */\n          name?: NameTransformer;\n          /**\n           * Configuration for TypeScript type generation from Arktype schemas.\n           *\n           * Controls generation of TypeScript types based on the generated Arktype schemas.\n           */\n          types?: {\n            /**\n             * Configuration for `infer` types.\n             *\n             * Can be:\n             * - `boolean`: Shorthand for `{ enabled: boolean }`\n             * - `string` or `function`: Shorthand for `{ name: string | function }`\n             * - `object`: Full configuration object\n             *\n             * @default false\n             */\n            infer?:\n              | boolean\n              | NameTransformer\n              | {\n                  /**\n                   * Casing convention for generated names.\n                   *\n                   * @default 'PascalCase'\n                   */\n                  case?: Casing;\n                  /**\n                   * Whether this feature is enabled.\n                   *\n                   * @default true\n                   */\n                  enabled?: boolean;\n                  /**\n                   * Naming pattern for generated names.\n                   *\n                   * @default '{{name}}'\n                   */\n                  name?: NameTransformer;\n                };\n          };\n        };\n    /**\n     * Enable Arktype metadata support? It's often useful to associate a schema\n     * with some additional metadata for documentation, code generation, AI\n     * structured outputs, form validation, and other purposes.\n     *\n     * @default false\n     */\n    metadata?: boolean;\n    /**\n     * Configuration for request-specific Arktype schemas.\n     *\n     * Controls generation of Arktype schemas for request bodies, query parameters, path\n     * parameters, and headers.\n     *\n     * Can be:\n     * - `boolean`: Shorthand for `{ enabled: boolean }`\n     * - `string` or `function`: Shorthand for `{ name: string | function }`\n     * - `object`: Full configuration object\n     *\n     * @default true\n     */\n    requests?:\n      | boolean\n      | NameTransformer\n      | {\n          /**\n           * Casing convention for generated names.\n           *\n           * @default 'PascalCase'\n           */\n          case?: Casing;\n          /**\n           * Whether this feature is enabled.\n           *\n           * @default true\n           */\n          enabled?: boolean;\n          /**\n           * Naming pattern for generated names.\n           *\n           * @default '{{name}}Data'\n           */\n          name?: NameTransformer;\n          /**\n           * Configuration for TypeScript type generation from Arktype schemas.\n           *\n           * Controls generation of TypeScript types based on the generated Arktype schemas.\n           */\n          types?: {\n            /**\n             * Configuration for `infer` types.\n             *\n             * Can be:\n             * - `boolean`: Shorthand for `{ enabled: boolean }`\n             * - `string` or `function`: Shorthand for `{ name: string | function }`\n             * - `object`: Full configuration object\n             *\n             * @default false\n             */\n            infer?:\n              | boolean\n              | NameTransformer\n              | {\n                  /**\n                   * Casing convention for generated names.\n                   *\n                   * @default 'PascalCase'\n                   */\n                  case?: Casing;\n                  /**\n                   * Whether this feature is enabled.\n                   *\n                   * @default true\n                   */\n                  enabled?: boolean;\n                  /**\n                   * Naming pattern for generated names.\n                   *\n                   * @default '{{name}}Data'\n                   */\n                  name?: NameTransformer;\n                };\n          };\n        };\n    /**\n     * Configuration for response-specific Arktype schemas.\n     *\n     * Controls generation of Arktype schemas for response bodies, error responses,\n     * and status codes.\n     *\n     * Can be:\n     * - `boolean`: Shorthand for `{ enabled: boolean }`\n     * - `string` or `function`: Shorthand for `{ name: string | function }`\n     * - `object`: Full configuration object\n     *\n     * @default true\n     */\n    responses?:\n      | boolean\n      | NameTransformer\n      | {\n          /**\n           * Casing convention for generated names.\n           *\n           * @default 'PascalCase'\n           */\n          case?: Casing;\n          /**\n           * Whether this feature is enabled.\n           *\n           * @default true\n           */\n          enabled?: boolean;\n          /**\n           * Naming pattern for generated names.\n           *\n           * @default '{{name}}Response'\n           */\n          name?: NameTransformer;\n          /**\n           * Configuration for TypeScript type generation from Arktype schemas.\n           *\n           * Controls generation of TypeScript types based on the generated Arktype schemas.\n           */\n          types?: {\n            /**\n             * Configuration for `infer` types.\n             *\n             * Can be:\n             * - `boolean`: Shorthand for `{ enabled: boolean }`\n             * - `string` or `function`: Shorthand for `{ name: string | function }`\n             * - `object`: Full configuration object\n             *\n             * @default false\n             */\n            infer?:\n              | boolean\n              | NameTransformer\n              | {\n                  /**\n                   * Casing convention for generated names.\n                   *\n                   * @default 'PascalCase'\n                   */\n                  case?: Casing;\n                  /**\n                   * Whether this feature is enabled.\n                   *\n                   * @default true\n                   */\n                  enabled?: boolean;\n                  /**\n                   * Naming pattern for generated names.\n                   *\n                   * @default '{{name}}Response'\n                   */\n                  name?: NameTransformer;\n                };\n          };\n        };\n    /**\n     * Configuration for TypeScript type generation from Arktype schemas.\n     *\n     * Controls generation of TypeScript types based on the generated Arktype schemas.\n     */\n    types?: {\n      /**\n       * Configuration for `infer` types.\n       *\n       * Can be:\n       * - `boolean`: Shorthand for `{ enabled: boolean }`\n       * - `string` or `function`: Shorthand for `{ name: string | function }`\n       * - `object`: Full configuration object\n       *\n       * @default false\n       */\n      infer?:\n        | boolean\n        | NameTransformer\n        | {\n            /**\n             * Casing convention for generated names.\n             *\n             * @default 'PascalCase'\n             */\n            case?: Casing;\n            /**\n             * Whether this feature is enabled.\n             *\n             * @default true\n             */\n            enabled?: boolean;\n          };\n    };\n    /**\n     * Configuration for webhook-specific Arktype schemas.\n     *\n     * Controls generation of Arktype schemas for webhook payloads.\n     *\n     * Can be:\n     * - `boolean`: Shorthand for `{ enabled: boolean }`\n     * - `string` or `function`: Shorthand for `{ name: string | function }`\n     * - `object`: Full configuration object\n     *\n     * @default true\n     */\n    webhooks?:\n      | boolean\n      | NameTransformer\n      | {\n          /**\n           * Casing convention for generated names.\n           *\n           * @default 'PascalCase'\n           */\n          case?: Casing;\n          /**\n           * Whether this feature is enabled.\n           *\n           * @default true\n           */\n          enabled?: boolean;\n          /**\n           * Naming pattern for generated names.\n           *\n           * @default '{{name}}WebhookRequest'\n           */\n          name?: NameTransformer;\n          /**\n           * Configuration for TypeScript type generation from Arktype schemas.\n           *\n           * Controls generation of TypeScript types based on the generated Arktype schemas.\n           */\n          types?: {\n            /**\n             * Configuration for `infer` types.\n             *\n             * Can be:\n             * - `boolean`: Shorthand for `{ enabled: boolean }`\n             * - `string` or `function`: Shorthand for `{ name: string | function }`\n             * - `object`: Full configuration object\n             *\n             * @default false\n             */\n            infer?:\n              | boolean\n              | NameTransformer\n              | {\n                  /**\n                   * Casing convention for generated names.\n                   *\n                   * @default 'PascalCase'\n                   */\n                  case?: Casing;\n                  /**\n                   * Whether this feature is enabled.\n                   *\n                   * @default true\n                   */\n                  enabled?: boolean;\n                  /**\n                   * Naming pattern for generated names.\n                   *\n                   * @default '{{name}}WebhookRequest'\n                   */\n                  name?: NameTransformer;\n                };\n          };\n        };\n  };\n\nexport type Config = Plugin.Name<'arktype'> &\n  Plugin.Hooks &\n  Plugin.Comments &\n  Plugin.Exports & {\n    /**\n     * Casing convention for generated names.\n     */\n    case: Casing;\n    /**\n     * Configuration for reusable schema definitions.\n     *\n     * Controls generation of shared Arktype schemas that can be referenced across\n     * requests and responses.\n     */\n    definitions: NamingOptions &\n      FeatureToggle & {\n        /**\n         * Configuration for TypeScript type generation from Arktype schemas.\n         *\n         * Controls generation of TypeScript types based on the generated Arktype schemas.\n         */\n        types: {\n          /**\n           * Configuration for `infer` types.\n           */\n          infer: NamingOptions & FeatureToggle;\n        };\n      };\n    /**\n     * Enable Arktype metadata support? It's often useful to associate a schema with\n     * some additional metadata for documentation, code generation, AI\n     * structured outputs, form validation, and other purposes.\n     *\n     * @default false\n     */\n    metadata: boolean;\n    /**\n     * Configuration for request-specific Arktype schemas.\n     *\n     * Controls generation of Arktype schemas for request bodies, query parameters, path\n     * parameters, and headers.\n     */\n    requests: NamingOptions &\n      FeatureToggle & {\n        /**\n         * Configuration for TypeScript type generation from Arktype schemas.\n         *\n         * Controls generation of TypeScript types based on the generated Arktype schemas.\n         */\n        types: {\n          /**\n           * Configuration for `infer` types.\n           */\n          infer: NamingOptions & FeatureToggle;\n        };\n      };\n    /**\n     * Configuration for response-specific Arktype schemas.\n     *\n     * Controls generation of Arktype schemas for response bodies, error responses,\n     * and status codes.\n     */\n    responses: NamingOptions &\n      FeatureToggle & {\n        /**\n         * Configuration for TypeScript type generation from Arktype schemas.\n         *\n         * Controls generation of TypeScript types based on the generated Arktype schemas.\n         */\n        types: {\n          /**\n           * Configuration for `infer` types.\n           */\n          infer: NamingOptions & FeatureToggle;\n        };\n      };\n    /**\n     * Configuration for TypeScript type generation from Arktype schemas.\n     *\n     * Controls generation of TypeScript types based on the generated Arktype schemas.\n     */\n    types: {\n      /**\n       * Configuration for `infer` types.\n       */\n      infer: FeatureToggle & {\n        /**\n         * Casing convention for generated names.\n         */\n        case: Casing;\n      };\n    };\n    /**\n     * Configuration for webhook-specific Arktype schemas.\n     *\n     * Controls generation of Arktype schemas for webhook payloads.\n     */\n    webhooks: NamingOptions &\n      FeatureToggle & {\n        /**\n         * Configuration for TypeScript type generation from Arktype schemas.\n         *\n         * Controls generation of TypeScript types based on the generated Arktype schemas.\n         */\n        types: {\n          /**\n           * Configuration for `infer` types.\n           */\n          infer: NamingOptions & FeatureToggle;\n        };\n      };\n  };\n\nexport type ArktypePlugin = DefinePlugin<UserConfig, Config, IApi>;\n"
  },
  {
    "path": "packages/openapi-ts/src/plugins/arktype/v2/api.ts",
    "content": "import { $ } from '../../../ts-dsl';\nimport type { ValidatorArgs } from '../shared/types';\n\nexport const createRequestValidatorV2 = ({\n  operation,\n  plugin,\n}: ValidatorArgs): ReturnType<typeof $.func> | undefined => {\n  const symbol = plugin.getSymbol({\n    category: 'schema',\n    resource: 'operation',\n    resourceId: operation.id,\n    role: 'data',\n    tool: 'arktype',\n  });\n  if (!symbol) return;\n\n  // const out = User({\n  //   name: \"Alan Turing\",\n  //   device: {\n  //     platform: \"enigma\",\n  //     versions: [0, \"1\", 0n]\n  //   }\n  // })\n  // if (out instanceof type.errors) {\n  //   // hover out.summary to see validation errors\n  //   console.error(out.summary)\n  // } else {\n  //   // hover out to see your validated data\n  //   console.log(`Hello, ${out.name}`)\n  // }\n  const dataParameterName = 'data';\n  return $.func()\n    .async()\n    .param(dataParameterName)\n    .do($(symbol).attr('parseAsync').call(dataParameterName).await().return());\n};\n\nexport const createResponseValidatorV2 = ({\n  operation,\n  plugin,\n}: ValidatorArgs): ReturnType<typeof $.func> | undefined => {\n  const symbol = plugin.getSymbol({\n    category: 'schema',\n    resource: 'operation',\n    resourceId: operation.id,\n    role: 'responses',\n    tool: 'arktype',\n  });\n  if (!symbol) return;\n\n  const dataParameterName = 'data';\n  return $.func()\n    .async()\n    .param(dataParameterName)\n    .do($(symbol).attr('parseAsync').call(dataParameterName).await().return());\n};\n"
  },
  {
    "path": "packages/openapi-ts/src/plugins/arktype/v2/plugin.ts",
    "content": "import type { SymbolMeta } from '@hey-api/codegen-core';\nimport { fromRef, refs } from '@hey-api/codegen-core';\nimport type { IR, SchemaWithType } from '@hey-api/shared';\nimport { applyNaming, deduplicateSchema, pathToJsonPointer, refToName } from '@hey-api/shared';\n\nimport { $ } from '../../../ts-dsl';\nimport { exportAst } from '../shared/export';\nimport type { Ast, IrSchemaToAstOptions, PluginState } from '../shared/types';\nimport type { ArktypePlugin } from '../types';\nimport { irSchemaWithTypeToAst } from './toAst';\n\nexport function irSchemaToAst({\n  // optional,\n  plugin,\n  schema,\n  schemaExtractor,\n  state,\n}: IrSchemaToAstOptions & {\n  /**\n   * Accept `optional` to handle optional object properties. We can't handle\n   * this inside the object function because `.optional()` must come before\n   * `.default()` which is handled in this function.\n   */\n  optional?: boolean;\n  schema: IR.SchemaObject;\n}): Ast {\n  if (schemaExtractor && !schema.$ref) {\n    const extracted = schemaExtractor({\n      meta: {\n        resource: 'definition',\n        resourceId: pathToJsonPointer(fromRef(state.path)),\n      },\n      path: fromRef(state.path),\n      schema,\n    });\n    if (extracted !== schema) schema = extracted;\n  }\n\n  let ast: Partial<Ast> = {};\n\n  // const z = plugin.referenceSymbol({\n  //   category: 'external',\n  //   resource: 'arktype.type',\n  // });\n\n  if (schema.$ref) {\n    const query: SymbolMeta = {\n      category: 'schema',\n      resource: 'definition',\n      resourceId: schema.$ref,\n      tool: 'arktype',\n    };\n    const refSymbol = plugin.referenceSymbol(query);\n    if (plugin.isSymbolRegistered(query)) {\n      const ref = $(refSymbol);\n      ast.expression = ref;\n    } else {\n      // expression: z,\n      // name: identifiers.lazy,\n      const lazyExpression = $('TODO')\n        .attr('TODO')\n        .call($.func().returns('any').do($.return(refSymbol)));\n      ast.expression = lazyExpression;\n      ast.hasLazyExpression = true;\n      state.hasLazyExpression['~ref'] = true;\n    }\n  } else if (schema.type) {\n    const typeAst = irSchemaWithTypeToAst({\n      plugin,\n      schema: schema as SchemaWithType,\n      state,\n    });\n    ast.def = typeAst.def;\n    ast.expression = typeAst.expression;\n    ast.hasLazyExpression = typeAst.hasLazyExpression;\n\n    if (plugin.config.metadata && schema.description) {\n      // TODO: add description\n      // ast.expression = tsc.callExpression({\n      //   functionName: tsc.propertyAccessExpression({\n      //     expression: ast.expression,\n      //     name: identifiers.register,\n      //   }),\n      //   parameters: [\n      //     tsc.propertyAccessExpression({\n      //       expression: z,\n      //       name: identifiers.globalRegistry,\n      //     }),\n      //     tsc.objectExpression({\n      //       obj: [\n      //         {\n      //           key: 'description',\n      //           value: tsc.stringLiteral({ text: schema.description }),\n      //         },\n      //       ],\n      //     }),\n      //   ],\n      // });\n    }\n  } else if (schema.items) {\n    schema = deduplicateSchema({ schema });\n\n    if (schema.items) {\n      //     const itemSchemas = schema.items.map((item, index) =>\n      //       irSchemaToAst({\n      //         plugin,\n      //         schema: item,\n      //         state: {\n      //           ...state,\n      //           _path: [...state._path, 'items', index],\n      //         },\n      //       }),\n      //     );\n      //     if (schema.logicalOperator === 'and') {\n      //       const firstSchema = schema.items[0]!;\n      //       // we want to add an intersection, but not every schema can use the same API.\n      //       // if the first item contains another array or not an object, we cannot use\n      //       // `.merge()` as that does not exist on `.union()` and non-object schemas.\n      //       if (\n      //         firstSchema.logicalOperator === 'or' ||\n      //         (firstSchema.type && firstSchema.type !== 'object')\n      //       ) {\n      //         ast.expression = tsc.callExpression({\n      //           functionName: tsc.propertyAccessExpression({\n      //             expression: z,\n      //             name: identifiers.intersection,\n      //           }),\n      //           parameters: itemSchemas.map((schema) => schema.expression),\n      //         });\n      //       } else {\n      //         ast.expression = itemSchemas[0]!.expression;\n      //         itemSchemas.slice(1).forEach((schema) => {\n      //           ast.expression = tsc.callExpression({\n      //             functionName: tsc.propertyAccessExpression({\n      //               expression: ast.expression!,\n      //               name: identifiers.and,\n      //             }),\n      //             parameters: [\n      //               schema.hasCircularReference\n      //                 ? tsc.callExpression({\n      //                     functionName: tsc.propertyAccessExpression({\n      //                       expression: z,\n      //                       name: identifiers.lazy,\n      //                     }),\n      //                     parameters: [\n      //                       tsc.arrowFunction({\n      //                         statements: [\n      //                           tsc.returnStatement({\n      //                             expression: schema.expression,\n      //                           }),\n      //                         ],\n      //                       }),\n      //                     ],\n      //                   })\n      //                 : schema.expression,\n      //             ],\n      //           });\n      //         });\n      //       }\n      //     } else {\n      //       ast.expression = tsc.callExpression({\n      //         functionName: tsc.propertyAccessExpression({\n      //           expression: z,\n      //           name: identifiers.union,\n      //         }),\n      //         parameters: [\n      //           tsc.arrayLiteralExpression({\n      //             elements: itemSchemas.map((schema) => schema.expression),\n      //           }),\n      //         ],\n      //       });\n      //     }\n    } else {\n      ast = irSchemaToAst({ plugin, schema, state });\n    }\n  } else {\n    // catch-all fallback for failed schemas\n    const typeAst = irSchemaWithTypeToAst({\n      plugin,\n      schema: {\n        type: 'unknown',\n      },\n      state,\n    });\n    ast.def = typeAst.def;\n    ast.expression = typeAst.expression;\n  }\n\n  // TODO: remove later\n  if (!ast.expression) {\n    const typeAst = irSchemaWithTypeToAst({\n      plugin,\n      schema: {\n        type: 'unknown',\n      },\n      state,\n    });\n    ast.expression = typeAst.expression;\n  }\n  // END TODO: remove later\n\n  // if (ast.expression) {\n  //   if (schema.accessScope === 'read') {\n  //     ast.expression = tsc.callExpression({\n  //       functionName: tsc.propertyAccessExpression({\n  //         expression: ast.expression,\n  //         name: identifiers.readonly,\n  //       }),\n  //     });\n  //   }\n\n  //   if (optional) {\n  //     ast.expression = tsc.callExpression({\n  //       functionName: tsc.propertyAccessExpression({\n  //         expression: z,\n  //         name: identifiers.optional,\n  //       }),\n  //       parameters: [ast.expression],\n  //     });\n  //     ast.typeName = identifiers.ZodOptional;\n  //   }\n\n  //   if (schema.default !== undefined) {\n  //     const isBigInt = schema.type === 'integer' && schema.format === 'int64';\n  //     const callParameter = numberParameter({\n  //       isBigInt,\n  //       value: schema.default,\n  //     });\n  //     if (callParameter) {\n  //       ast.expression = tsc.callExpression({\n  //         functionName: tsc.propertyAccessExpression({\n  //           expression: ast.expression,\n  //           name: identifiers.default,\n  //         }),\n  //         parameters: [callParameter],\n  //       });\n  //     }\n  //   }\n  // }\n\n  return ast as Ast;\n}\n\nfunction handleComponent({\n  plugin,\n  schema,\n  state,\n}: IrSchemaToAstOptions & {\n  schema: IR.SchemaObject;\n}): void {\n  const $ref = pathToJsonPointer(fromRef(state.path));\n  const ast = irSchemaToAst({ plugin, schema, state });\n  const baseName = refToName($ref);\n  const symbol = plugin.symbol(applyNaming(baseName, plugin.config.definitions), {\n    meta: {\n      category: 'schema',\n      path: fromRef(state.path),\n      resource: 'definition',\n      resourceId: $ref,\n      tags: fromRef(state.tags),\n      tool: 'arktype',\n    },\n  });\n  const typeInferSymbol = plugin.config.definitions.types.infer.enabled\n    ? plugin.symbol(applyNaming(baseName, plugin.config.definitions.types.infer), {\n        meta: {\n          category: 'type',\n          path: fromRef(state.path),\n          resource: 'definition',\n          resourceId: $ref,\n          tool: 'arktype',\n          variant: 'infer',\n        },\n      })\n    : undefined;\n  exportAst({\n    ast,\n    plugin,\n    schema,\n    symbol,\n    typeInferSymbol,\n  });\n}\n\nexport const handlerV2: ArktypePlugin['Handler'] = ({ plugin }) => {\n  plugin.symbol('type', {\n    external: 'arktype',\n    meta: {\n      category: 'external',\n      resource: 'arktype.type',\n    },\n  });\n\n  plugin.forEach('operation', 'parameter', 'requestBody', 'schema', 'webhook', (event) => {\n    const state = refs<PluginState>({\n      hasLazyExpression: false,\n      path: event._path,\n      tags: event.tags,\n    });\n    switch (event.type) {\n      //   case 'operation':\n      //     operationToZodSchema({\n      //       getZodSchema: (schema) => {\n      //         const state: State = {\n      //           circularReferenceTracker: [],\n      //           currentReferenceTracker: [],\n      //           hasCircularReference: false,\n      //         };\n      //         return schemaToZodSchema({ plugin, schema, state });\n      //       },\n      //       operation: event.operation,\n      //       plugin,\n      //     });\n      //     break;\n      case 'parameter':\n        handleComponent({\n          plugin,\n          schema: event.parameter.schema,\n          state,\n        });\n        break;\n      case 'requestBody':\n        handleComponent({\n          plugin,\n          schema: event.requestBody.schema,\n          state,\n        });\n        break;\n      case 'schema':\n        handleComponent({\n          plugin,\n          schema: event.schema,\n          state,\n        });\n        break;\n      //   case 'webhook':\n      //     webhookToZodSchema({\n      //       getZodSchema: (schema) => {\n      //         const state: State = {\n      //           circularReferenceTracker: [],\n      //           currentReferenceTracker: [],\n      //           hasCircularReference: false,\n      //         };\n      //         return schemaToZodSchema({ plugin, schema, state });\n      //       },\n      //       operation: event.operation,\n      //       plugin,\n      //     });\n      //     break;\n    }\n  });\n};\n"
  },
  {
    "path": "packages/openapi-ts/src/plugins/arktype/v2/toAst/index.ts",
    "content": "import type { SchemaWithType } from '@hey-api/shared';\n\nimport { $ } from '../../../../ts-dsl';\nimport type { Ast, IrSchemaToAstOptions } from '../../shared/types';\nimport { nullToAst } from './null';\nimport { objectToAst } from './object';\nimport { stringToAst } from './string';\n// import { arrayToAst } from \"./array\";\n// import { booleanToAst } from \"./boolean\";\n// import { enumToAst } from \"./enum\";\n// import { neverToAst } from \"./never\";\n// import { numberToAst } from \"./number\";\n// import { tupleToAst } from \"./tuple\";\n// import { undefinedToAst } from \"./undefined\";\n// import { unknownToAst } from \"./unknown\";\n// import { voidToAst } from \"./void\";\n\nexport function irSchemaWithTypeToAst({\n  schema,\n  ...args\n}: IrSchemaToAstOptions & {\n  schema: SchemaWithType;\n}): Omit<Ast, 'typeName'> {\n  switch (schema.type) {\n    // case 'array':\n    //   return arrayToAst({\n    //     ...args,\n    //     schema: schema as SchemaWithType<'array'>,\n    //   });\n    // case 'boolean':\n    //   return booleanToAst({\n    //     ...args,\n    //     schema: schema as SchemaWithType<'boolean'>,\n    //   });\n    // case 'enum':\n    //   return enumToAst({\n    //     ...args,\n    //     schema: schema as SchemaWithType<'enum'>,\n    //   });\n    // case 'integer':\n    // case 'number':\n    //   return numberToAst({\n    //     ...args,\n    //     schema: schema as SchemaWithType<'integer' | 'number'>,\n    //   });\n    // case 'never':\n    //   return neverToAst({\n    //     ...args,\n    //     schema: schema as SchemaWithType<'never'>,\n    //   });\n    case 'null':\n      return nullToAst({\n        ...args,\n        schema: schema as SchemaWithType<'null'>,\n      });\n    case 'object':\n      return objectToAst({\n        ...args,\n        schema: schema as SchemaWithType<'object'>,\n      });\n    case 'string':\n      return stringToAst({\n        ...args,\n        schema: schema as SchemaWithType<'string'>,\n      });\n    // case 'tuple':\n    //   return tupleToAst({\n    //     ...args,\n    //     schema: schema as SchemaWithType<'tuple'>,\n    //   });\n    // case 'undefined':\n    //   return undefinedToAst({\n    //     ...args,\n    //     schema: schema as SchemaWithType<'undefined'>,\n    //   });\n    // case 'unknown':\n    //   return unknownToAst({\n    //     ...args,\n    //     schema: schema as SchemaWithType<'unknown'>,\n    //   });\n    // case 'void':\n    //   return voidToAst({\n    //     ...args,\n    //     schema: schema as SchemaWithType<'void'>,\n    //   });\n  }\n\n  const type = args.plugin.external('arktype.type');\n\n  const expression = $(type).call(\n    $.object()\n      .prop('name', $.literal('string'))\n      .prop('platform', $.literal(\"'android' | 'ios'\"))\n      .prop('versions?', $.literal('(number | string)[]')),\n  );\n\n  return {\n    def: '',\n    expression,\n    hasLazyExpression: false,\n  };\n}\n"
  },
  {
    "path": "packages/openapi-ts/src/plugins/arktype/v2/toAst/null.ts",
    "content": "import type { SchemaWithType } from '@hey-api/shared';\n\nimport { identifiers } from '../../constants';\nimport type { Ast, IrSchemaToAstOptions } from '../../shared/types';\n\nexport const nullToAst = (\n  // eslint-disable-next-line @typescript-eslint/no-unused-vars\n  _args: IrSchemaToAstOptions & {\n    schema: SchemaWithType<'null'>;\n  },\n): Omit<Ast, 'typeName'> => {\n  const result: Partial<Omit<Ast, 'typeName'>> = {};\n  result.def = identifiers.primitives.null;\n  return result as Omit<Ast, 'typeName'>;\n};\n"
  },
  {
    "path": "packages/openapi-ts/src/plugins/arktype/v2/toAst/object.ts",
    "content": "import { fromRef, ref } from '@hey-api/codegen-core';\nimport type { SchemaWithType } from '@hey-api/shared';\n\nimport { $ } from '../../../../ts-dsl';\n// import { identifiers } from '../../constants';\nimport type { Ast, IrSchemaToAstOptions } from '../../shared/types';\nimport { irSchemaToAst } from '../plugin';\n\nexport function objectToAst({\n  plugin,\n  schema,\n  state,\n}: IrSchemaToAstOptions & {\n  schema: SchemaWithType<'object'>;\n}): Omit<Ast, 'typeName'> {\n  const result: Partial<Omit<Ast, 'typeName'>> = {};\n\n  // TODO: parser - handle constants\n\n  const shape = $.object().pretty();\n\n  const required = schema.required ?? [];\n\n  for (const name in schema.properties) {\n    const property = schema.properties[name]!;\n    const isRequired = required.includes(name);\n\n    const propertyAst = irSchemaToAst({\n      optional: !isRequired,\n      plugin,\n      schema: property,\n      state: {\n        ...state,\n        path: ref([...fromRef(state.path), 'properties', name]),\n      },\n    });\n    if (propertyAst.hasLazyExpression) {\n      result.hasLazyExpression = true;\n    }\n\n    // if (propertyAst.hasCircularReference) {\n    //   properties.push(\n    //     tsc.getAccessorDeclaration({\n    //       name: propertyName,\n    //       // @ts-expect-error\n    //       returnType: propertyAst.typeName\n    //         ? tsc.propertyAccessExpression({\n    //             expression: 'TODO',\n    //             name: propertyAst.typeName,\n    //           })\n    //         : undefined,\n    //       statements: [\n    //         tsc.returnStatement({\n    //           expression: propertyAst.expression,\n    //         }),\n    //       ],\n    //     }),\n    //   );\n    // } else {\n    //   properties.push(\n    //     tsc.propertyAssignment({\n    //       initializer: propertyAst.expression,\n    //       name: ts.factory.createComputedPropertyName(\n    //         ts.factory.createStringLiteral(`${propertyName}?`),\n    //       ),\n    //     }),\n    //   );\n    // }\n\n    shape.prop(isRequired ? name : `${name}?`, propertyAst.expression);\n  }\n\n  if (\n    schema.additionalProperties &&\n    (!schema.properties || !Object.keys(schema.properties).length)\n  ) {\n    const additionalAst = irSchemaToAst({\n      plugin,\n      schema: schema.additionalProperties,\n      state: {\n        ...state,\n        path: ref([...fromRef(state.path), 'additionalProperties']),\n      },\n    });\n    // name: identifiers.record,\n    result.expression = $('TODO').attr('record').call(\n      // name: identifiers.string,\n      $('TODO').attr('string').call(),\n      additionalAst.expression,\n    );\n    if (additionalAst.hasLazyExpression) {\n      result.hasLazyExpression = true;\n    }\n\n    return result as Omit<Ast, 'typeName'>;\n  }\n\n  result.expression = shape;\n\n  // return with typeName for circular references\n  if (result.hasLazyExpression) {\n    return {\n      ...result,\n      typeName: 'TODO',\n    } as Ast;\n  }\n\n  return result as Omit<Ast, 'typeName'>;\n}\n"
  },
  {
    "path": "packages/openapi-ts/src/plugins/arktype/v2/toAst/string.ts",
    "content": "import type { SchemaWithType } from '@hey-api/shared';\n\nimport { identifiers } from '../../constants';\nimport type { Ast, IrSchemaToAstOptions } from '../../shared/types';\n\nexport const stringToAst = ({\n  schema,\n}: IrSchemaToAstOptions & {\n  schema: SchemaWithType<'string'>;\n}): Omit<Ast, 'typeName'> => {\n  const result: Partial<Omit<Ast, 'typeName'>> = {};\n\n  if (typeof schema.const === 'string') {\n    result.def = schema.const;\n    return result as Omit<Ast, 'typeName'>;\n  }\n\n  let def = identifiers.primitives.string;\n\n  if (schema.format) {\n    switch (schema.format) {\n      case 'date':\n      case 'date-time':\n      case 'time':\n        def = `${def}.${identifiers.string.date}.${identifiers.string.iso}`;\n        break;\n      case 'email':\n        def = `${def}.${identifiers.string.email}`;\n        break;\n      case 'ipv4':\n        def = `${def}.${identifiers.string.ip}.${identifiers.string.v4}`;\n        break;\n      case 'ipv6':\n        def = `${def}.${identifiers.string.ip}.${identifiers.string.v6}`;\n        break;\n      case 'uri':\n        def = `${def}.${identifiers.string.url}`;\n        break;\n      case 'uuid':\n        def = `${def}.${identifiers.string.uuid}`;\n        break;\n    }\n  }\n\n  if (schema.minLength === schema.maxLength && schema.minLength !== undefined) {\n    def = `${schema.minLength} <= ${def} <= ${schema.maxLength}`;\n  } else {\n    if (schema.maxLength !== undefined) {\n      def = `${def} <= ${schema.maxLength}`;\n\n      if (schema.minLength !== undefined) {\n        def = `${schema.minLength} <= ${def}`;\n      }\n    } else if (schema.minLength !== undefined) {\n      def = `${def} >= ${schema.minLength}`;\n    }\n  }\n\n  if (schema.pattern) {\n    def = `/${schema.pattern}/`;\n  }\n\n  result.def = def;\n\n  return result as Omit<Ast, 'typeName'>;\n};\n"
  },
  {
    "path": "packages/openapi-ts/src/plugins/config.ts",
    "content": "import type { Plugin, PluginConfigMap, PluginNames } from '@hey-api/shared';\n\nimport { defaultConfig as angularCommon } from '../plugins/@angular/common';\nimport { defaultConfig as fakerJsFaker } from '../plugins/@faker-js/faker';\nimport { defaultConfig as heyApiClientAngular } from '../plugins/@hey-api/client-angular';\nimport { defaultConfig as heyApiClientAxios } from '../plugins/@hey-api/client-axios';\nimport { defaultConfig as heyApiClientFetch } from '../plugins/@hey-api/client-fetch';\nimport { defaultConfig as heyApiClientKy } from '../plugins/@hey-api/client-ky';\nimport { defaultConfig as heyApiClientNext } from '../plugins/@hey-api/client-next';\nimport { defaultConfig as heyApiClientNuxt } from '../plugins/@hey-api/client-nuxt';\nimport { defaultConfig as heyApiClientOfetch } from '../plugins/@hey-api/client-ofetch';\nimport { defaultConfig as heyApiSchemas } from '../plugins/@hey-api/schemas';\nimport { defaultConfig as heyApiSdk } from '../plugins/@hey-api/sdk';\nimport { defaultConfig as heyApiTransformers } from '../plugins/@hey-api/transformers';\nimport { defaultConfig as heyApiTypeScript } from '../plugins/@hey-api/typescript';\nimport { defaultConfig as piniaColada } from '../plugins/@pinia/colada';\nimport { defaultConfig as tanStackAngularQuery } from '../plugins/@tanstack/angular-query-experimental';\nimport { defaultConfig as tanStackPreactQuery } from '../plugins/@tanstack/preact-query';\nimport { defaultConfig as tanStackReactQuery } from '../plugins/@tanstack/react-query';\nimport { defaultConfig as tanStackSolidQuery } from '../plugins/@tanstack/solid-query';\nimport { defaultConfig as tanStackSvelteQuery } from '../plugins/@tanstack/svelte-query';\nimport { defaultConfig as tanStackVueQuery } from '../plugins/@tanstack/vue-query';\nimport { defaultConfig as arktype } from '../plugins/arktype';\nimport { defaultConfig as fastify } from '../plugins/fastify';\nimport { defaultConfig as nestjs } from '../plugins/nestjs';\nimport { defaultConfig as orpc } from '../plugins/orpc';\nimport { defaultConfig as swr } from '../plugins/swr';\nimport { defaultConfig as valibot } from '../plugins/valibot';\nimport { defaultConfig as zod } from '../plugins/zod';\n\nexport const defaultPluginConfigs: {\n  [K in PluginNames]: Plugin.Config<PluginConfigMap[K]>;\n} = {\n  '@angular/common': angularCommon,\n  '@faker-js/faker': fakerJsFaker,\n  '@hey-api/client-angular': heyApiClientAngular,\n  '@hey-api/client-axios': heyApiClientAxios,\n  '@hey-api/client-fetch': heyApiClientFetch,\n  '@hey-api/client-ky': heyApiClientKy,\n  '@hey-api/client-next': heyApiClientNext,\n  '@hey-api/client-nuxt': heyApiClientNuxt,\n  '@hey-api/client-ofetch': heyApiClientOfetch,\n  '@hey-api/schemas': heyApiSchemas,\n  '@hey-api/sdk': heyApiSdk,\n  '@hey-api/transformers': heyApiTransformers,\n  '@hey-api/typescript': heyApiTypeScript,\n  '@pinia/colada': piniaColada,\n  '@tanstack/angular-query-experimental': tanStackAngularQuery,\n  '@tanstack/preact-query': tanStackPreactQuery,\n  '@tanstack/react-query': tanStackReactQuery,\n  '@tanstack/solid-query': tanStackSolidQuery,\n  '@tanstack/svelte-query': tanStackSvelteQuery,\n  '@tanstack/vue-query': tanStackVueQuery,\n  arktype,\n  fastify,\n  nestjs,\n  orpc,\n  swr,\n  valibot,\n  zod,\n};\n"
  },
  {
    "path": "packages/openapi-ts/src/plugins/fastify/config.ts",
    "content": "import { definePluginConfig } from '@hey-api/shared';\n\nimport { handler } from './plugin';\nimport type { FastifyPlugin } from './types';\n\nexport const defaultConfig: FastifyPlugin['Config'] = {\n  config: {\n    includeInEntry: false,\n  },\n  dependencies: ['@hey-api/typescript'],\n  handler,\n  name: 'fastify',\n};\n\n/**\n * Type helper for `fastify` plugin, returns {@link Plugin.Config} object\n */\nexport const defineConfig = definePluginConfig(defaultConfig);\n"
  },
  {
    "path": "packages/openapi-ts/src/plugins/fastify/index.ts",
    "content": "export { defaultConfig, defineConfig } from './config';\nexport type { FastifyPlugin } from './types';\n"
  },
  {
    "path": "packages/openapi-ts/src/plugins/fastify/plugin.ts",
    "content": "import type { IR } from '@hey-api/shared';\nimport { hasParameterGroupObjectRequired, operationResponsesMap } from '@hey-api/shared';\n\nimport { $ } from '../../ts-dsl';\nimport type { FastifyPlugin } from './types';\n\nconst operationToRouteHandler = ({\n  operation,\n  plugin,\n}: {\n  operation: IR.OperationObject;\n  plugin: FastifyPlugin['Instance'];\n}) => {\n  const type = $.type.object();\n\n  const symbolDataType = plugin.querySymbol({\n    category: 'type',\n    resource: 'operation',\n    resourceId: operation.id,\n    role: 'data',\n    tool: 'typescript',\n  });\n  if (symbolDataType) {\n    if (operation.body) {\n      type.prop('Body', (p) =>\n        p\n          .required(operation.body!.required)\n          .type($.type(symbolDataType).idx($.type.literal('body'))),\n      );\n    }\n\n    if (operation.parameters) {\n      if (operation.parameters.header) {\n        type.prop('Headers', (p) =>\n          p\n            .required(hasParameterGroupObjectRequired(operation.parameters!.header))\n            .type($.type(symbolDataType).idx($.type.literal('headers'))),\n        );\n      }\n\n      if (operation.parameters.path) {\n        type.prop('Params', (p) =>\n          p\n            .required(hasParameterGroupObjectRequired(operation.parameters!.path))\n            .type($.type(symbolDataType).idx($.type.literal('path'))),\n        );\n      }\n\n      if (operation.parameters.query) {\n        type.prop('Querystring', (p) =>\n          p\n            .required(hasParameterGroupObjectRequired(operation.parameters!.query))\n            .type($.type(symbolDataType).idx($.type.literal('query'))),\n        );\n      }\n    }\n  }\n\n  const { errors, responses } = operationResponsesMap(operation);\n\n  let errorsTypeReference: ReturnType<typeof $.type> | undefined;\n  const symbolErrorType = plugin.querySymbol({\n    category: 'type',\n    resource: 'operation',\n    resourceId: operation.id,\n    role: 'errors',\n  });\n  if (symbolErrorType && errors && errors.properties) {\n    const keys = Object.keys(errors.properties);\n    if (keys.length) {\n      const hasDefaultResponse = keys.includes('default');\n      if (!hasDefaultResponse) {\n        errorsTypeReference = $.type(symbolErrorType);\n      } else if (keys.length > 1) {\n        errorsTypeReference = $.type('Omit', (t) =>\n          t.generics($.type(symbolErrorType), $.type.literal('default')),\n        );\n      }\n    }\n  }\n\n  let responsesTypeReference: ReturnType<typeof $.type> | undefined = undefined;\n  const symbolResponseType = plugin.querySymbol({\n    category: 'type',\n    resource: 'operation',\n    resourceId: operation.id,\n    role: 'responses',\n  });\n  if (symbolResponseType && responses && responses.properties) {\n    const keys = Object.keys(responses.properties);\n    if (keys.length) {\n      const hasDefaultResponse = keys.includes('default');\n      if (!hasDefaultResponse) {\n        responsesTypeReference = $.type(symbolResponseType);\n      } else if (keys.length > 1) {\n        responsesTypeReference = $.type('Omit', (t) =>\n          t.generics($.type(symbolResponseType), $.type.literal('default')),\n        );\n      }\n    }\n  }\n\n  const replyTypes = [errorsTypeReference, responsesTypeReference].filter(\n    (t): t is ReturnType<typeof $.type> => t !== undefined,\n  );\n  if (replyTypes.length) {\n    type.prop('Reply', (p) => p.type($.type.and(...replyTypes)));\n  }\n\n  if (type.isEmpty) {\n    return;\n  }\n\n  const symbolRouteHandler = plugin.referenceSymbol({\n    category: 'type',\n    resource: 'route-handler',\n    tool: 'fastify',\n  });\n  return {\n    name: operation.id,\n    type: $.type(symbolRouteHandler, (t) => t.generic(type)),\n  };\n};\n\nexport const handler: FastifyPlugin['Handler'] = ({ plugin }) => {\n  plugin.symbol('RouteHandler', {\n    external: 'fastify',\n    kind: 'type',\n    meta: {\n      category: 'type',\n      resource: 'route-handler',\n      tool: 'fastify',\n    },\n  });\n\n  const symbolRouteHandlers = plugin.symbol('RouteHandlers');\n\n  const type = $.type.object();\n\n  plugin.forEach(\n    'operation',\n    ({ operation }) => {\n      const routeHandler = operationToRouteHandler({ operation, plugin });\n      if (routeHandler) {\n        type.prop(routeHandler.name, (p) => p.type(routeHandler.type));\n      }\n    },\n    {\n      order: 'declarations',\n    },\n  );\n\n  const node = $.type.alias(symbolRouteHandlers).export().type(type);\n  plugin.node(node);\n};\n"
  },
  {
    "path": "packages/openapi-ts/src/plugins/fastify/types.ts",
    "content": "import type { DefinePlugin, Plugin } from '@hey-api/shared';\n\nexport type UserConfig = Plugin.Name<'fastify'> & Plugin.Hooks & Plugin.UserExports;\n\nexport type FastifyPlugin = DefinePlugin<UserConfig, UserConfig>;\n"
  },
  {
    "path": "packages/openapi-ts/src/plugins/nestjs/config.ts",
    "content": "import { definePluginConfig } from '@hey-api/shared';\n\nimport { handler } from './plugin';\nimport type { NestJsPlugin } from './types';\n\nexport const defaultConfig: NestJsPlugin['Config'] = {\n  config: {\n    includeInEntry: false,\n  },\n  dependencies: ['@hey-api/typescript'],\n  handler,\n  name: 'nestjs',\n};\n\n/**\n * Type helper for `nestjs` plugin, returns {@link Plugin.Config} object\n */\nexport const defineConfig = definePluginConfig(defaultConfig);\n"
  },
  {
    "path": "packages/openapi-ts/src/plugins/nestjs/index.ts",
    "content": "export { defaultConfig, defineConfig } from './config';\nexport type { NestJsPlugin } from './types';\n"
  },
  {
    "path": "packages/openapi-ts/src/plugins/nestjs/plugin.ts",
    "content": "import type { IR } from '@hey-api/shared';\nimport { hasParameterGroupObjectRequired, operationResponsesMap, toCase } from '@hey-api/shared';\n\nimport { $ } from '../../ts-dsl';\nimport type { NestJsPlugin } from './types';\n\nconst operationToMethod = ({\n  operation,\n  plugin,\n}: {\n  operation: IR.OperationObject;\n  plugin: NestJsPlugin['Instance'];\n}) => {\n  const funcType = $.type.func();\n\n  const symbolDataType = plugin.querySymbol({\n    category: 'type',\n    resource: 'operation',\n    resourceId: operation.id,\n    role: 'data',\n    tool: 'typescript',\n  });\n\n  if (symbolDataType) {\n    // Collect params so we can sort required before optional.\n    // Without this, TypeScript would reject signatures like\n    // (query?: T, body: U) => ... where optional precedes required.\n    const params: Array<{\n      isRequired: boolean;\n      key: string;\n    }> = [];\n\n    if (operation.parameters?.path) {\n      params.push({\n        isRequired: hasParameterGroupObjectRequired(operation.parameters.path),\n        key: 'path',\n      });\n    }\n\n    if (operation.parameters?.query) {\n      params.push({\n        isRequired: hasParameterGroupObjectRequired(operation.parameters.query),\n        key: 'query',\n      });\n    }\n\n    if (operation.body) {\n      params.push({\n        isRequired: operation.body.required ?? false,\n        key: 'body',\n      });\n    }\n\n    if (operation.parameters?.header) {\n      params.push({\n        isRequired: hasParameterGroupObjectRequired(operation.parameters.header),\n        key: 'headers',\n      });\n    }\n\n    // Stable sort: required params first, optional params last\n    params.sort((a, b) => (a.isRequired === b.isRequired ? 0 : a.isRequired ? -1 : 1));\n\n    for (const param of params) {\n      funcType.param(param.key, (p) =>\n        p.required(param.isRequired).type($.type(symbolDataType).idx($.type.literal(param.key))),\n      );\n    }\n  }\n\n  // Use the response type alias (union of success bodies), not the\n  // status-code-indexed responses map. NestJS controllers return values\n  // directly, not status-code mappings.\n  const { responses } = operationResponsesMap(operation);\n\n  const symbolResponseType = plugin.querySymbol({\n    category: 'type',\n    resource: 'operation',\n    resourceId: operation.id,\n    role: 'response',\n    tool: 'typescript',\n  });\n\n  if (symbolResponseType && responses) {\n    funcType.returns($.type('Promise', (t) => t.generic($.type(symbolResponseType))));\n  } else {\n    funcType.returns($.type('Promise', (t) => t.generic($.type('void'))));\n  }\n\n  return {\n    name: operation.id,\n    type: funcType,\n  };\n};\n\nconst emitTypeAlias = ({\n  methods,\n  plugin,\n  typeName,\n}: {\n  methods: Array<{ name: string; type: ReturnType<typeof $.type.func> }>;\n  plugin: NestJsPlugin['Instance'];\n  typeName: string;\n}) => {\n  const symbol = plugin.symbol(typeName);\n  const type = $.type.object();\n  for (const method of methods) {\n    type.prop(method.name, (p) => p.type(method.type));\n  }\n  plugin.node($.type.alias(symbol).export().type(type));\n};\n\nexport const handler: NestJsPlugin['Handler'] = ({ plugin }) => {\n  // Collect operations by tag, then emit per-tag types\n  const operationsByTag = new Map<\n    string,\n    Array<{ name: string; type: ReturnType<typeof $.type.func> }>\n  >();\n\n  plugin.forEach(\n    'operation',\n    ({ operation, tags }) => {\n      const tag = tags?.[0] ?? 'default';\n      if (!operationsByTag.has(tag)) {\n        operationsByTag.set(tag, []);\n      }\n      const method = operationToMethod({ operation, plugin });\n      operationsByTag.get(tag)!.push(method);\n    },\n    {\n      order: 'declarations',\n    },\n  );\n\n  for (const [tag, methods] of operationsByTag) {\n    const pascalTag = toCase(tag, 'PascalCase');\n    emitTypeAlias({\n      methods,\n      plugin,\n      typeName: `${pascalTag}ControllerMethods`,\n    });\n  }\n};\n"
  },
  {
    "path": "packages/openapi-ts/src/plugins/nestjs/types.ts",
    "content": "import type { DefinePlugin, Plugin } from '@hey-api/shared';\n\nexport type UserConfig = Plugin.Name<'nestjs'> & Plugin.Hooks & Plugin.UserExports;\n\nexport type NestJsPlugin = DefinePlugin<UserConfig, UserConfig>;\n"
  },
  {
    "path": "packages/openapi-ts/src/plugins/orpc/config.ts",
    "content": "import { log } from '@hey-api/codegen-core';\nimport { definePluginConfig } from '@hey-api/shared';\n\nimport { resolveContracts } from './contracts/config';\nimport { handler } from './plugin';\nimport type { OrpcPlugin } from './types';\n\nconst validatorInferWarn =\n  'You set `validator: true` but no validator plugin was found in your plugins. Add a validator plugin like `zod` to enable this feature. The validator option has been disabled.';\n\nexport const defaultConfig: OrpcPlugin['Config'] = {\n  config: {\n    includeInEntry: false,\n  },\n  handler,\n  name: 'orpc',\n  resolveConfig: (plugin, context) => {\n    if (typeof plugin.config.validator !== 'object') {\n      plugin.config.validator = {\n        input: plugin.config.validator,\n        output: plugin.config.validator,\n      };\n    }\n\n    if (plugin.config.validator.input || plugin.config.validator.input === undefined) {\n      if (\n        typeof plugin.config.validator.input === 'boolean' ||\n        plugin.config.validator.input === undefined\n      ) {\n        try {\n          plugin.config.validator.input = context.pluginByTag('validator');\n          plugin.dependencies.add(plugin.config.validator.input!);\n        } catch {\n          // avoid showing the warning with default configuration as it would be confusing\n          if (plugin.config.validator.input !== undefined) {\n            log.warn(validatorInferWarn);\n          }\n          plugin.config.validator.input = false;\n        }\n      } else {\n        plugin.dependencies.add(plugin.config.validator.input);\n      }\n    } else {\n      plugin.config.validator.input = false;\n    }\n\n    if (plugin.config.validator.output || plugin.config.validator.output === undefined) {\n      if (\n        typeof plugin.config.validator.output === 'boolean' ||\n        plugin.config.validator.output === undefined\n      ) {\n        try {\n          plugin.config.validator.output = context.pluginByTag('validator');\n          plugin.dependencies.add(plugin.config.validator.output!);\n        } catch {\n          // avoid showing the warning with default configuration as it would be confusing\n          if (plugin.config.validator.output !== undefined) {\n            log.warn(validatorInferWarn);\n          }\n          plugin.config.validator.output = false;\n        }\n      } else {\n        plugin.dependencies.add(plugin.config.validator.output);\n      }\n    } else {\n      plugin.config.validator.output = false;\n    }\n\n    plugin.config.contracts = resolveContracts(plugin.config, context);\n  },\n};\n\n/**\n * Type helper for oRPC plugin, returns {@link Plugin.Config} object\n */\nexport const defineConfig = definePluginConfig(defaultConfig);\n"
  },
  {
    "path": "packages/openapi-ts/src/plugins/orpc/contracts/config.ts",
    "content": "import type { PluginContext } from '@hey-api/shared';\n\nimport type { UserConfig } from '../types';\nimport type { ContractsConfig } from './types';\n\ntype Config = Omit<UserConfig, 'name'>;\n\nexport function resolveContracts(config: Config, context: PluginContext): ContractsConfig {\n  return normalizeConfig(config.contracts, context);\n}\n\nfunction normalizeConfig(input: Config['contracts'], context: PluginContext): ContractsConfig {\n  if (!input || typeof input === 'string' || typeof input === 'function') {\n    input = { strategy: input };\n  }\n\n  const strategy = input.strategy ?? 'single';\n\n  return context.valueToObject({\n    defaultValue: {\n      container: 'object',\n      nesting: 'operationId',\n      nestingDelimiters: /[./]/,\n      strategy,\n      strategyDefaultTag: 'default',\n    },\n    mappers: {\n      object(value) {\n        value.containerName = context.valueToObject({\n          defaultValue:\n            strategy === 'single'\n              ? { casing: 'camelCase', name: 'contract' }\n              : { casing: 'camelCase' },\n          mappers: {\n            function: (name) => ({ name }),\n            string: (name) => ({ name }),\n          },\n          value: value.containerName,\n        });\n        value.contractName = context.valueToObject({\n          defaultValue: { casing: 'camelCase' },\n          mappers: {\n            function: (name) => ({ name }),\n            string: (name) => ({ name }),\n          },\n          value: value.contractName,\n        });\n        value.segmentName = context.valueToObject({\n          defaultValue: { casing: 'camelCase' },\n          mappers: {\n            function: (name) => ({ name }),\n            string: (name) => ({ name }),\n          },\n          value: value.segmentName,\n        });\n        return value;\n      },\n    },\n    value: input,\n  }) as ContractsConfig;\n}\n"
  },
  {
    "path": "packages/openapi-ts/src/plugins/orpc/contracts/index.ts",
    "content": "export { resolveContracts } from './config';\nexport { type ContractItem, createShell, source, toNode } from './node';\nexport { resolveStrategy } from './resolve';\nexport type { ContractsConfig, UserContractsConfig } from './types';\n"
  },
  {
    "path": "packages/openapi-ts/src/plugins/orpc/contracts/node.ts",
    "content": "import type {\n  StructureItem,\n  StructureNode,\n  StructureShell,\n  Symbol,\n  SymbolMeta,\n} from '@hey-api/codegen-core';\nimport type { IR } from '@hey-api/shared';\nimport { applyNaming } from '@hey-api/shared';\n\nimport { $ } from '../../../ts-dsl';\nimport { createOperationComment } from '../../shared/utils/operation';\nimport { getSuccessResponse, getTags, hasInput } from '../shared/operation';\nimport type { OrpcPlugin } from '../types';\n\nexport interface ContractItem {\n  operation: IR.OperationObject;\n  path: ReadonlyArray<string | number>;\n  tags: ReadonlyArray<string> | undefined;\n}\n\nexport const source = globalThis.Symbol('orpc');\n\nfunction createShellMeta(node: StructureNode): SymbolMeta {\n  return {\n    category: 'contract',\n    resource: 'container',\n    resourceId: node.getPath().join('.'),\n    tool: 'orpc',\n  };\n}\n\nfunction createContractSymbol(\n  plugin: OrpcPlugin['Instance'],\n  item: StructureItem & { data: ContractItem },\n): Symbol {\n  const { operation, path, tags } = item.data;\n  const name = item.location[item.location.length - 1]!;\n  return plugin.symbol(applyNaming(name, plugin.config.contracts.contractName), {\n    meta: {\n      category: 'contract',\n      path,\n      resource: 'operation',\n      resourceId: operation.id,\n      role: 'contract',\n      tags,\n      tool: plugin.name,\n    },\n  });\n}\n\nfunction createContractExpression(\n  plugin: OrpcPlugin['Instance'],\n  operation: IR.OperationObject,\n  baseSymbol: Symbol,\n) {\n  const successResponse = getSuccessResponse(operation);\n  const tags = getTags(operation, plugin.config.contracts.strategyDefaultTag);\n\n  let expression = $(baseSymbol)\n    .attr('route')\n    .call(\n      $.object()\n        .$if(operation.deprecated, (o, v) => o.prop('deprecated', $.literal(v)))\n        .$if(operation.description, (o, v) => o.prop('description', $.literal(v)))\n        .prop('method', $.literal(operation.method.toUpperCase()))\n        .$if(operation.operationId, (o, v) => o.prop('operationId', $.literal(v)))\n        .prop('path', $.literal(operation.path))\n        .$if(\n          successResponse.hasOutput &&\n            successResponse.statusCode !== 200 &&\n            successResponse.statusCode,\n          (o, v) => o.prop('successStatus', $.literal(v)),\n        )\n        .$if(operation.summary, (o, v) => o.prop('summary', $.literal(v)))\n        .$if(tags.length > 0 && tags, (o, v) => o.prop('tags', $.fromValue(v))),\n    );\n\n  if (hasInput(operation) && plugin.config.validator.input) {\n    expression = expression.attr('input').call(\n      plugin.referenceSymbol({\n        category: 'schema',\n        resource: 'operation',\n        resourceId: operation.id,\n        role: 'data',\n        tool: plugin.config.validator.input,\n      }),\n    );\n  }\n\n  if (successResponse.hasOutput && plugin.config.validator.output) {\n    expression = expression.attr('output').call(\n      plugin.referenceSymbol({\n        category: 'schema',\n        resource: 'operation',\n        resourceId: operation.id,\n        role: 'responses',\n        tool: plugin.config.validator.output,\n      }),\n    );\n  }\n\n  return expression;\n}\n\nfunction buildContainerObject(\n  node: StructureNode,\n  plugin: OrpcPlugin['Instance'],\n  symbols: Map<string, Symbol>,\n): ReturnType<typeof $.object> {\n  const obj = $.object();\n\n  for (const item of node.itemsFrom<ContractItem>(source)) {\n    const { operation } = item.data;\n    const contractSymbol = symbols.get(operation.id)!;\n    const name = item.location[item.location.length - 1]!;\n    const propName = applyNaming(name, plugin.config.contracts.contractName);\n    obj.prop(propName, contractSymbol);\n  }\n\n  for (const child of node.children.values()) {\n    if (child.shell) {\n      const childShell = child.shell.define(child);\n      const childNode = childShell.node as ReturnType<typeof $.const>;\n      const childSymbol = childNode.symbol;\n      if (childSymbol) {\n        const propName = applyNaming(child.name, plugin.config.contracts.segmentName);\n        obj.prop(propName, childSymbol);\n      }\n    }\n  }\n\n  return obj;\n}\n\nexport function createShell(plugin: OrpcPlugin['Instance']): StructureShell {\n  const cache = new Map<string | number, ReturnType<typeof $.const>>();\n\n  return {\n    define: (node) => {\n      const resourceId = node.getPath().join('.');\n      const cached = cache.get(resourceId);\n      if (cached) {\n        return { dependencies: [], node: cached };\n      }\n      const symbol = plugin.symbol(\n        applyNaming(\n          node.name,\n          node.isRoot ? plugin.config.contracts.containerName : plugin.config.contracts.segmentName,\n        ),\n        {\n          meta: createShellMeta(node),\n        },\n      );\n\n      const o = $.const(symbol).export().assign($.object());\n      cache.set(resourceId, o);\n\n      return { dependencies: [], node: o };\n    },\n  };\n}\n\nexport function toNode(\n  model: StructureNode,\n  plugin: OrpcPlugin['Instance'],\n  baseSymbol: Symbol,\n): {\n  nodes: ReadonlyArray<ReturnType<typeof $.const>>;\n  symbols?: Map<string, Symbol>;\n} {\n  if (model.virtual) {\n    const nodes: Array<ReturnType<typeof $.const>> = [];\n    const symbols = new Map<string, Symbol>();\n\n    for (const item of model.itemsFrom<ContractItem>(source)) {\n      const { operation } = item.data;\n      const contractSymbol = createContractSymbol(plugin, item);\n      const expression = createContractExpression(plugin, operation, baseSymbol);\n\n      const node = $.const(contractSymbol)\n        .export()\n        .$if(createOperationComment(operation), (n, v) => n.doc(v))\n        .assign(expression);\n      nodes.push(node);\n      symbols.set(operation.id, contractSymbol);\n    }\n    return { nodes, symbols };\n  }\n\n  if (!model.shell) {\n    return { nodes: [] };\n  }\n\n  const nodes: Array<ReturnType<typeof $.const>> = [];\n  const symbols = new Map<string, Symbol>();\n\n  for (const item of model.itemsFrom<ContractItem>(source)) {\n    const { operation } = item.data;\n    const contractSymbol = createContractSymbol(plugin, item);\n    const expression = createContractExpression(plugin, operation, baseSymbol);\n\n    const node = $.const(contractSymbol)\n      .export()\n      .$if(createOperationComment(operation), (n, v) => n.doc(v))\n      .assign(expression);\n    nodes.push(node);\n    symbols.set(operation.id, contractSymbol);\n  }\n\n  const shell = model.shell.define(model);\n  const containerSymbol = shell.node.symbol!;\n  const obj = buildContainerObject(model, plugin, symbols);\n  const containerNode = $.const(containerSymbol).export().assign(obj.pretty());\n  nodes.push(containerNode);\n\n  return { nodes, symbols };\n}\n"
  },
  {
    "path": "packages/openapi-ts/src/plugins/orpc/contracts/resolve.ts",
    "content": "import type { OperationPathStrategy, OperationStructureStrategy } from '@hey-api/shared';\nimport { OperationPath, OperationStrategy } from '@hey-api/shared';\n\nimport type { OrpcPlugin } from '../types';\n\nfunction resolvePath(plugin: OrpcPlugin['Instance']): OperationPathStrategy {\n  if (plugin.config.contracts.nesting === 'id') {\n    return OperationPath.id();\n  }\n\n  if (plugin.config.contracts.nesting === 'operationId') {\n    return OperationPath.fromOperationId({\n      delimiters: plugin.config.contracts.nestingDelimiters,\n      fallback: OperationPath.id(),\n    });\n  }\n\n  return plugin.config.contracts.nesting;\n}\n\nexport function resolveStrategy(plugin: OrpcPlugin['Instance']): OperationStructureStrategy {\n  if (plugin.config.contracts.strategy === 'flat') {\n    return OperationStrategy.flat({\n      path: (operation) => [resolvePath(plugin)(operation).join('.')],\n    });\n  }\n\n  if (plugin.config.contracts.strategy === 'single') {\n    const root = plugin.config.contracts.containerName;\n    return OperationStrategy.single({\n      path: resolvePath(plugin),\n      root: typeof root.name === 'string' ? root.name : (root.name?.('') ?? ''),\n    });\n  }\n\n  if (plugin.config.contracts.strategy === 'byTags') {\n    return OperationStrategy.byTags({\n      fallback: plugin.config.contracts.strategyDefaultTag,\n      path: resolvePath(plugin),\n    });\n  }\n\n  return plugin.config.contracts.strategy;\n}\n"
  },
  {
    "path": "packages/openapi-ts/src/plugins/orpc/contracts/types.ts",
    "content": "import type {\n  NamingConfig,\n  NamingRule,\n  OperationPathStrategy,\n  OperationsStrategy,\n} from '@hey-api/shared';\n\nexport interface UserContractsConfig {\n  /**\n   * Type of container for grouped contracts.\n   *\n   * Ignored when `strategy` is `'flat'`.\n   *\n   * - `'object'` - Object with properties\n   *\n   * @default 'object'\n   */\n  container?: 'object';\n  /**\n   * Customize container names.\n   *\n   * For `'single'` strategy, this sets the root container name.\n   * For `'byTags'` strategy, this transforms tag names.\n   *\n   * @default 'contract' for `'single'` strategy\n   *\n   * @example\n   * // Set root name for single strategy\n   * containerName: 'myContract'\n   *\n   * @example\n   * // Transform tag names with suffix\n   * containerName: '{{name}}Contract'\n   *\n   * @example\n   * // With casing\n   * containerName: { name: '{{name}}Contract', casing: 'camelCase' }\n   */\n  containerName?: NamingRule;\n  /**\n   * Customize contract names.\n   *\n   * Applied to the final segment of the path (the contract name).\n   */\n  contractName?: NamingRule;\n  /**\n   * How to derive nesting structure from operations.\n   *\n   * - `'operationId'` - Split operationId by delimiters (e.g., `users.list` → `Users.list()`)\n   * - `'id'` - Use operation id as-is, no nesting\n   * - Custom function for full control\n   *\n   * @default 'operationId'\n   */\n  nesting?: 'operationId' | 'id' | OperationPathStrategy;\n  /**\n   * Delimiters for splitting operationId.\n   *\n   * Only applies when `nesting` is `'operationId'`.\n   *\n   * @default /[./]/\n   */\n  nestingDelimiters?: RegExp;\n  /**\n   * Customize nesting segment names.\n   *\n   * Applied to intermediate path segments (not the contract name).\n   */\n  segmentName?: NamingRule;\n  /**\n   * Grouping strategy.\n   *\n   * - `'flat'` - Standalone contracts, no grouping\n   * - `'byTags'` - One container per operation tag\n   * - `'single'` - All contracts in one container\n   * - Custom function for full control\n   *\n   * @default 'single'\n   */\n  strategy?: OperationsStrategy;\n  /**\n   * Default container name for operations without tags.\n   *\n   * Only applies when `strategy` is `'byTags'`.\n   *\n   * @default 'default'\n   */\n  strategyDefaultTag?: string;\n}\n\nexport interface ContractsConfig {\n  /** Type of container for grouped operations. */\n  container: 'object';\n  /** Customize container names. */\n  containerName: NamingConfig;\n  /** Customize contract names. */\n  contractName: NamingConfig;\n  /** How to derive nesting structure from operations. */\n  nesting: 'operationId' | 'id' | OperationPathStrategy;\n  /** Delimiters for splitting operationId. */\n  nestingDelimiters: RegExp;\n  /** Customize nesting segment names. */\n  segmentName: NamingConfig;\n  /** Grouping strategy. */\n  strategy: OperationsStrategy;\n  /** Default container name for operations without tags. */\n  strategyDefaultTag: string;\n}\n"
  },
  {
    "path": "packages/openapi-ts/src/plugins/orpc/index.ts",
    "content": "export { defaultConfig, defineConfig } from './config';\nexport type { OrpcPlugin } from './types';\n"
  },
  {
    "path": "packages/openapi-ts/src/plugins/orpc/plugin.ts",
    "content": "import type { OrpcPlugin } from './types';\nimport { handlerV1 } from './v1/plugin';\n\nexport const handler: OrpcPlugin['Handler'] = (args) => handlerV1(args);\n"
  },
  {
    "path": "packages/openapi-ts/src/plugins/orpc/shared/operation.ts",
    "content": "import type { IR } from '@hey-api/shared';\n\nexport function hasInput(operation: IR.OperationObject): boolean {\n  const hasPathParams = Boolean(\n    operation.parameters?.path && Object.keys(operation.parameters.path).length > 0,\n  );\n  const hasQueryParams = Boolean(\n    operation.parameters?.query && Object.keys(operation.parameters.query).length > 0,\n  );\n  const hasHeaderParams = Boolean(\n    operation.parameters?.header && Object.keys(operation.parameters.header).length > 0,\n  );\n  const hasBody = Boolean(operation.body);\n  return hasPathParams || hasQueryParams || hasHeaderParams || hasBody;\n}\n\nexport function getSuccessResponse(\n  operation: IR.OperationObject,\n): { hasOutput: true; statusCode: number } | { hasOutput: false; statusCode?: undefined } {\n  if (operation.responses) {\n    for (const [statusCode, response] of Object.entries(operation.responses)) {\n      const statusCodeNumber = Number.parseInt(statusCode, 10);\n      if (\n        statusCodeNumber >= 200 &&\n        statusCodeNumber <= 399 &&\n        response?.mediaType &&\n        response?.schema\n      ) {\n        return { hasOutput: true, statusCode: statusCodeNumber };\n      }\n    }\n  }\n  return { hasOutput: false, statusCode: undefined };\n}\n\nexport function getTags(operation: IR.OperationObject, defaultTag: string): ReadonlyArray<string> {\n  return operation.tags && operation.tags.length > 0 ? [...operation.tags] : [defaultTag];\n}\n"
  },
  {
    "path": "packages/openapi-ts/src/plugins/orpc/types.ts",
    "content": "import type { DefinePlugin, OperationsStrategy, Plugin } from '@hey-api/shared';\n\nimport type { PluginValidatorNames } from '../types';\nimport type { ContractsConfig, UserContractsConfig } from './contracts/types';\n\nexport type UserConfig = Plugin.Name<'orpc'> &\n  Plugin.Hooks &\n  Plugin.UserExports & {\n    /**\n     * Define the structure of generated oRPC contracts.\n     *\n     * String shorthand:\n     * - `'byTags'` – one container per operation tag\n     * - `'flat'` – standalone functions, no container\n     * - `'single'` – all operations in a single container\n     * - custom function for full control\n     *\n     * Use the object form for advanced configuration.\n     *\n     * @default 'single'\n     */\n    contracts?: OperationsStrategy | UserContractsConfig;\n    /**\n     * Validate input/output schemas.\n     *\n     * @default true\n     */\n    validator?:\n      | PluginValidatorNames\n      | boolean\n      | {\n          /**\n           * The validator plugin to use for input schemas.\n           *\n           * Can be a validator plugin name or boolean (true to auto-select, false\n           * to disable).\n           *\n           * @default true\n           */\n          input?: PluginValidatorNames | boolean;\n          /**\n           * The validator plugin to use for output schemas.\n           *\n           * Can be a validator plugin name or boolean (true to auto-select, false\n           * to disable).\n           *\n           * @default true\n           */\n          output?: PluginValidatorNames | boolean;\n        };\n  };\n\nexport type Config = Plugin.Name<'orpc'> &\n  Plugin.Hooks &\n  Plugin.Exports & {\n    /** Define the structure of generated oRPC contracts. */\n    contracts: ContractsConfig;\n    /** Validate input/output schemas. */\n    validator: {\n      /** The validator plugin to use for input schemas. */\n      input: PluginValidatorNames | false;\n      /** The validator plugin to use for output schemas. */\n      output: PluginValidatorNames | false;\n    };\n  };\n\nexport type OrpcPlugin = DefinePlugin<UserConfig, Config>;\n"
  },
  {
    "path": "packages/openapi-ts/src/plugins/orpc/v1/plugin.ts",
    "content": "import { StructureModel } from '@hey-api/codegen-core';\n\nimport { $ } from '../../../ts-dsl';\nimport type { ContractItem } from '../contracts';\nimport { createShell, resolveStrategy, source, toNode } from '../contracts';\nimport type { OrpcPlugin } from '../types';\n\nexport const handlerV1: OrpcPlugin['Handler'] = ({ plugin }) => {\n  const oc = plugin.symbol('oc', {\n    external: '@orpc/contract',\n  });\n  const baseSymbol = plugin.symbol('base');\n\n  const baseNode = $.const(baseSymbol)\n    .export()\n    .assign(\n      $(oc)\n        .attr('$route')\n        .call($.object().prop('inputStructure', $.literal('detailed'))),\n    );\n  plugin.node(baseNode);\n\n  const structure = new StructureModel();\n  const shell = createShell(plugin);\n  const strategy = resolveStrategy(plugin);\n\n  plugin.forEach(\n    'operation',\n    (event) => {\n      structure.insert({\n        data: {\n          operation: event.operation,\n          path: event._path,\n          tags: event.tags,\n        } satisfies ContractItem,\n        locations: strategy(event.operation).map((path) => ({ path, shell })),\n        source,\n      });\n    },\n    { order: 'declarations' },\n  );\n\n  const allNodes: Array<ReturnType<typeof $.class | typeof $.var>> = [];\n\n  for (const node of structure.walk()) {\n    const { nodes } = toNode(node, plugin, baseSymbol);\n    allNodes.push(...nodes);\n  }\n\n  for (const node of allNodes) {\n    plugin.node(node);\n  }\n};\n"
  },
  {
    "path": "packages/openapi-ts/src/plugins/shared/utils/coerce.ts",
    "content": "import { $ } from '../../../ts-dsl';\n\nexport type MaybeBigInt = (\n  value: unknown,\n  format: string | undefined,\n) => ReturnType<typeof $.fromValue>;\nexport type ShouldCoerceToBigInt = (format: string | undefined) => boolean;\n\nexport const shouldCoerceToBigInt: ShouldCoerceToBigInt = (format) =>\n  format === 'int64' || format === 'uint64';\n\nexport const maybeBigInt: MaybeBigInt = (value, format) => {\n  if (!shouldCoerceToBigInt(format)) {\n    return $.fromValue(value);\n  }\n\n  if (typeof value === 'string') {\n    // handle invalid input\n    if (value.endsWith('n')) value = value.slice(0, -1);\n    return $('BigInt').call($.fromValue(value));\n  }\n\n  if (typeof value === 'number') {\n    return $('BigInt').call($.fromValue(value));\n  }\n\n  return $.fromValue(value);\n};\n"
  },
  {
    "path": "packages/openapi-ts/src/plugins/shared/utils/formats.ts",
    "content": "type Range = number | string;\n\ninterface IntegerLimit {\n  maxError: string;\n  maxValue: Range;\n  minError: string;\n  minValue: Range;\n}\n\nexport type GetIntegerLimit = (format: string | undefined) => IntegerLimit | undefined;\n\nconst rangeErrors = (format: string, range: [Range, Range]) => ({\n  maxError: `Invalid value: Expected ${format} to be <= ${range[1]}`,\n  minError: `Invalid value: Expected ${format} to be >= ${range[0]}`,\n});\n\nconst integerRange: Record<string, [Range, Range]> = {\n  int16: [-32768, 32767],\n  int32: [-2147483648, 2147483647],\n  int64: ['-9223372036854775808', '9223372036854775807'],\n  int8: [-128, 127],\n  uint16: [0, 65535],\n  uint32: [0, 4294967295],\n  uint64: ['0', '18446744073709551615'],\n  uint8: [0, 255],\n};\n\nexport const getIntegerLimit: GetIntegerLimit = (format) => {\n  if (!format) return;\n  const range = integerRange[format];\n  if (!range) return;\n  const errors = rangeErrors(format, range);\n  return { maxValue: range[1], minValue: range[0], ...errors };\n};\n"
  },
  {
    "path": "packages/openapi-ts/src/plugins/shared/utils/operation.ts",
    "content": "import type { Context, IR } from '@hey-api/shared';\nimport { escapeComment, hasOperationDataRequired } from '@hey-api/shared';\n\nimport { getTypedConfig } from '../../../config/utils';\nimport { getClientPlugin } from '../../../plugins/@hey-api/client-core/utils';\nimport type { HeyApiSdkPlugin } from '../../../plugins/@hey-api/sdk';\nimport { isInstance } from '../../../plugins/@hey-api/sdk/v1/node';\n\nexport function createOperationComment(\n  operation: IR.OperationObject,\n): ReadonlyArray<string> | undefined {\n  const comments: Array<string> = [];\n\n  if (operation.summary) {\n    comments.push(escapeComment(operation.summary));\n  }\n\n  if (operation.description) {\n    if (comments.length) {\n      comments.push(''); // Add an empty line between summary and description\n    }\n\n    comments.push(escapeComment(operation.description));\n  }\n\n  if (operation.deprecated) {\n    if (comments.length) {\n      comments.push(''); // Add an empty line before deprecated\n    }\n\n    comments.push('@deprecated');\n  }\n\n  return comments.length ? comments : undefined;\n}\n\n/**\n * TODO: replace with plugin logic...\n *\n * @deprecated this needs to be refactored\n */\nexport function isOperationOptionsRequired({\n  context,\n  operation,\n}: {\n  context: Context;\n  operation: IR.OperationObject;\n}): boolean {\n  const config = getTypedConfig(context);\n  const client = getClientPlugin(config);\n  const isNuxtClient = client.name === '@hey-api/client-nuxt';\n  const plugin = config.plugins['@hey-api/sdk'];\n  if (plugin) {\n    if (!plugin.config.client && !isInstance(plugin as unknown as HeyApiSdkPlugin['Instance'])) {\n      return true;\n    }\n    if (plugin.config.paramsStructure === 'flat') {\n      return false;\n    }\n  }\n  return isNuxtClient || hasOperationDataRequired(operation);\n}\n\nexport function hasOperationSse({ operation }: { operation: IR.OperationObject }): boolean {\n  for (const statusCode in operation.responses) {\n    const response = operation.responses[statusCode]!;\n    if (response.mediaType === 'text/event-stream') {\n      return true;\n    }\n  }\n  return false;\n}\n"
  },
  {
    "path": "packages/openapi-ts/src/plugins/shared/utils/schema.ts",
    "content": "import { escapeComment, type IR } from '@hey-api/shared';\n\nexport const createSchemaComment = (schema: IR.SchemaObject): ReadonlyArray<string> | undefined => {\n  const comments: Array<string> = [];\n\n  if (schema.title) {\n    comments.push(escapeComment(schema.title));\n  }\n\n  if (schema.description) {\n    if (comments.length) {\n      comments.push(''); // Add an empty line between title and description\n    }\n    comments.push(escapeComment(schema.description));\n  }\n\n  if (schema.deprecated) {\n    if (comments.length) {\n      comments.push(''); // Add an empty line before deprecated\n    }\n    comments.push('@deprecated');\n  }\n\n  return comments.length ? comments : undefined;\n};\n"
  },
  {
    "path": "packages/openapi-ts/src/plugins/swr/config.ts",
    "content": "import { definePluginConfig, mappers } from '@hey-api/shared';\n\nimport { handler } from './plugin';\nimport type { SwrPlugin } from './types';\n\nexport const defaultConfig: SwrPlugin['Config'] = {\n  config: {\n    case: 'camelCase',\n    comments: true,\n    includeInEntry: false,\n  },\n  dependencies: ['@hey-api/sdk', '@hey-api/typescript'],\n  handler: handler as SwrPlugin['Handler'],\n  name: 'swr',\n  resolveConfig: (plugin, context) => {\n    plugin.config.infiniteQueryKeys = context.valueToObject({\n      defaultValue: {\n        case: plugin.config.case ?? 'camelCase',\n        enabled: true,\n        name: '{{name}}InfiniteQueryKey',\n        tags: false,\n      },\n      mappers,\n      value: plugin.config.infiniteQueryKeys,\n    });\n\n    plugin.config.infiniteQueryOptions = context.valueToObject({\n      defaultValue: {\n        case: plugin.config.case ?? 'camelCase',\n        enabled: true,\n        name: '{{name}}InfiniteOptions',\n      },\n      mappers,\n      value: plugin.config.infiniteQueryOptions,\n    });\n\n    plugin.config.mutationOptions = context.valueToObject({\n      defaultValue: {\n        case: plugin.config.case ?? 'camelCase',\n        enabled: true,\n        name: '{{name}}Mutation',\n      },\n      mappers,\n      value: plugin.config.mutationOptions,\n    });\n\n    plugin.config.queryKeys = context.valueToObject({\n      defaultValue: {\n        case: plugin.config.case ?? 'camelCase',\n        enabled: true,\n        name: '{{name}}QueryKey',\n        tags: false,\n      },\n      mappers,\n      value: plugin.config.queryKeys,\n    });\n\n    plugin.config.queryOptions = context.valueToObject({\n      defaultValue: {\n        case: plugin.config.case ?? 'camelCase',\n        enabled: true,\n        exported: true,\n        name: '{{name}}Options',\n      },\n      mappers,\n      value: plugin.config.queryOptions,\n    });\n\n    plugin.config.useSwr = context.valueToObject({\n      defaultValue: {\n        case: plugin.config.case ?? 'camelCase',\n        enabled: true,\n        name: 'use{{name}}',\n      },\n      mappers: {\n        boolean: (enabled) => ({ enabled }),\n        function: (name) => ({ enabled: true, name }),\n        object: (fields) => ({ enabled: true, ...fields }),\n        string: (name) => ({ enabled: true, name }),\n      },\n      value: plugin.config.useSwr,\n    });\n\n    if (plugin.config.useSwr.enabled) {\n      // useSwr hooks consume queryOptions\n      if (!plugin.config.queryOptions.enabled) {\n        plugin.config.queryOptions.enabled = true;\n        plugin.config.queryOptions.exported = false;\n      }\n    }\n  },\n};\n\n/**\n * Type helper for `swr` plugin, returns {@link Plugin.Config} object\n */\nexport const defineConfig = definePluginConfig(defaultConfig);\n"
  },
  {
    "path": "packages/openapi-ts/src/plugins/swr/index.ts",
    "content": "export { defaultConfig, defineConfig } from './config';\nexport type { SwrPlugin } from './types';\n"
  },
  {
    "path": "packages/openapi-ts/src/plugins/swr/plugin.ts",
    "content": "import type { SwrPlugin } from './types';\nimport { handlerV2 } from './v2/plugin';\n\nexport const handler: SwrPlugin['Handler'] = (args) => handlerV2(args);\n"
  },
  {
    "path": "packages/openapi-ts/src/plugins/swr/types.ts",
    "content": "import type {\n  Casing,\n  DefinePlugin,\n  FeatureToggle,\n  IR,\n  NameTransformer,\n  NamingOptions,\n  Plugin,\n} from '@hey-api/shared';\n\nexport type UserConfig = Plugin.Name<'swr'> &\n  Plugin.Hooks &\n  Plugin.UserComments &\n  Plugin.UserExports & {\n    /**\n     * Casing convention for generated names.\n     *\n     * @default 'camelCase'\n     */\n    case?: Casing;\n    /**\n     * Configuration for generated infinite query key helpers.\n     *\n     * See {@link https://tanstack.com/query/v5/docs/framework/react/reference/infiniteQueryOptions infiniteQueryOptions}\n     *\n     * Can be:\n     * - `boolean`: Shorthand for `{ enabled: boolean }`\n     * - `string` or `function`: Shorthand for `{ name: string | function }`\n     * - `object`: Full configuration object\n     *\n     * @default true\n     */\n    infiniteQueryKeys?:\n      | boolean\n      | NameTransformer\n      | {\n          /**\n           * Casing convention for generated names.\n           *\n           * @default 'camelCase'\n           */\n          case?: Casing;\n          /**\n           * Whether this feature is enabled.\n           *\n           * @default true\n           */\n          enabled?: boolean;\n          /**\n           * Naming pattern for generated names.\n           *\n           * See {@link https://tanstack.com/query/v5/docs/framework/react/reference/infiniteQueryOptions infiniteQueryOptions}\n           *\n           * @default '{{name}}InfiniteQueryKey'\n           */\n          name?: NameTransformer;\n          /**\n           * Whether to include operation tags in infinite query keys.\n           * This will make query keys larger but provides better cache invalidation capabilities.\n           *\n           * @default false\n           */\n          tags?: boolean;\n        };\n    /**\n     * Configuration for generated infinite query options helpers.\n     *\n     * See {@link https://tanstack.com/query/v5/docs/framework/react/reference/infiniteQueryOptions infiniteQueryOptions}\n     *\n     * Can be:\n     * - `boolean`: Shorthand for `{ enabled: boolean }`\n     * - `string` or `function`: Shorthand for `{ name: string | function }`\n     * - `object`: Full configuration object\n     *\n     * @default true\n     */\n    infiniteQueryOptions?:\n      | boolean\n      | NameTransformer\n      | {\n          /**\n           * Casing convention for generated names.\n           *\n           * @default 'camelCase'\n           */\n          case?: Casing;\n          /**\n           * Whether this feature is enabled.\n           *\n           * @default true\n           */\n          enabled?: boolean;\n          /**\n           * Custom function to generate metadata for the operation.\n           * Can return any valid meta object that will be included in the generated infinite query options.\n           *\n           * @param operation - The operation object containing all available metadata\n           * @returns A meta object with any properties you want to include\n           *\n           * @example\n           * ```ts\n           * meta: (operation) => ({\n           *   customField: operation.id,\n           *   isDeprecated: operation.deprecated,\n           *   tags: operation.tags,\n           *   customObject: {\n           *     method: operation.method,\n           *     path: operation.path\n           *   }\n           * })\n           * ```\n           *\n           * @default undefined\n           */\n          meta?: (operation: IR.OperationObject) => Record<string, unknown>;\n          /**\n           * Naming pattern for generated names.\n           *\n           * See {@link https://tanstack.com/query/v5/docs/framework/react/reference/infiniteQueryOptions infiniteQueryOptions}\n           *\n           * @default '{{name}}InfiniteOptions'\n           */\n          name?: NameTransformer;\n        };\n    /**\n     * Configuration for generated mutation options helpers.\n     *\n     * See {@link https://tanstack.com/query/v5/docs/framework/react/reference/useMutation useMutation}\n     *\n     * Can be:\n     * - `boolean`: Shorthand for `{ enabled: boolean }`\n     * - `string` or `function`: Shorthand for `{ name: string | function }`\n     * - `object`: Full configuration object\n     *\n     * @default true\n     */\n    mutationOptions?:\n      | boolean\n      | NameTransformer\n      | {\n          /**\n           * Casing convention for generated names.\n           *\n           * @default 'camelCase'\n           */\n          case?: Casing;\n          /**\n           * Whether this feature is enabled.\n           *\n           * @default true\n           */\n          enabled?: boolean;\n          /**\n           * Custom function to generate metadata for the operation.\n           * Can return any valid meta object that will be included in the generated mutation options.\n           *\n           * @param operation - The operation object containing all available metadata\n           * @returns A meta object with any properties you want to include\n           *\n           * @example\n           * ```ts\n           * meta: (operation) => ({\n           *   customField: operation.id,\n           *   isDeprecated: operation.deprecated,\n           *   tags: operation.tags,\n           *   customObject: {\n           *     method: operation.method,\n           *     path: operation.path\n           *   }\n           * })\n           * ```\n           *\n           * @default undefined\n           */\n          meta?: (operation: IR.OperationObject) => Record<string, unknown>;\n          /**\n           * Naming pattern for generated names.\n           *\n           * See {@link https://tanstack.com/query/v5/docs/framework/react/reference/useMutation useMutation}\n           *\n           * @default '{{name}}Mutation'\n           */\n          name?: NameTransformer;\n        };\n    /**\n     * Configuration for generated query keys.\n     *\n     * See {@link https://tanstack.com/query/v5/docs/framework/react/reference/queryKey queryKey}\n     *\n     * Can be:\n     * - `boolean`: Shorthand for `{ enabled: boolean }`\n     * - `string` or `function`: Shorthand for `{ name: string | function }`\n     * - `object`: Full configuration object\n     *\n     * @default true\n     */\n    queryKeys?:\n      | boolean\n      | NameTransformer\n      | {\n          /**\n           * Casing convention for generated names.\n           *\n           * @default 'camelCase'\n           */\n          case?: Casing;\n          /**\n           * Whether this feature is enabled.\n           *\n           * @default true\n           */\n          enabled?: boolean;\n          /**\n           * Naming pattern for generated names.\n           *\n           * See {@link https://tanstack.com/query/v5/docs/framework/react/guides/query-keys Query Keys}\n           *\n           * @default '{{name}}QueryKey'\n           */\n          name?: NameTransformer;\n          /**\n           * Whether to include operation tags in query keys.\n           * This will make query keys larger but provides better cache invalidation capabilities.\n           *\n           * @default false\n           */\n          tags?: boolean;\n        };\n    /**\n     * Configuration for generated query options helpers.\n     *\n     * See {@link https://tanstack.com/query/v5/docs/framework/react/reference/queryOptions queryOptions}\n     *\n     * Can be:\n     * - `boolean`: Shorthand for `{ enabled: boolean }`\n     * - `string` or `function`: Shorthand for `{ name: string | function }`\n     * - `object`: Full configuration object\n     *\n     * @default true\n     */\n    queryOptions?:\n      | boolean\n      | NameTransformer\n      | {\n          /**\n           * Casing convention for generated names.\n           *\n           * @default 'camelCase'\n           */\n          case?: Casing;\n          /**\n           * Whether this feature is enabled.\n           *\n           * @default true\n           */\n          enabled?: boolean;\n          /**\n           * Whether to export generated symbols.\n           *\n           * @default true\n           */\n          exported?: boolean;\n          /**\n           * Custom function to generate metadata for the operation.\n           * Can return any valid meta object that will be included in the generated query options.\n           *\n           * @param operation - The operation object containing all available metadata\n           * @returns A meta object with any properties you want to include\n           *\n           * @example\n           * ```ts\n           * meta: (operation) => ({\n           *   customField: operation.id,\n           *   isDeprecated: operation.deprecated,\n           *   tags: operation.tags,\n           *   customObject: {\n           *     method: operation.method,\n           *     path: operation.path\n           *   }\n           * })\n           * ```\n           *\n           * @default undefined\n           */\n          meta?: (operation: IR.OperationObject) => Record<string, unknown>;\n          /**\n           * Naming pattern for generated names.\n           *\n           * See {@link https://tanstack.com/query/v5/docs/framework/react/reference/queryOptions queryOptions}\n           *\n           * @default '{{name}}Options'\n           */\n          name?: NameTransformer;\n        };\n    /**\n     * Configuration for generated `useSwr()` function helpers.\n     *\n     * See {@link https://swr.vercel.app/docs/api API}\n     *\n     * Can be:\n     * - `boolean`: Shorthand for `{ enabled: boolean }`\n     * - `string` or `function`: Shorthand for `{ name: string | function }`\n     * - `object`: Full configuration object\n     *\n     * @default true\n     */\n    useSwr?:\n      | boolean\n      | NameTransformer\n      | {\n          /**\n           * Casing convention for generated names.\n           *\n           * @default 'camelCase'\n           */\n          case?: Casing;\n          /**\n           * Whether this feature is enabled.\n           *\n           * @default true\n           */\n          enabled?: boolean;\n          /**\n           * Naming pattern for generated names.\n           *\n           * See {@link https://swr.vercel.app/docs/api API}\n           *\n           * @default 'use{{name}}'\n           */\n          name?: NameTransformer;\n        };\n  };\n\nexport type Config = Plugin.Name<'swr'> &\n  Plugin.Hooks &\n  Plugin.Comments &\n  Plugin.Exports & {\n    /**\n     * Casing convention for generated names.\n     */\n    case: Casing;\n    /**\n     * Resolved configuration for generated infinite query key helpers.\n     *\n     * See {@link https://tanstack.com/query/v5/docs/framework/react/reference/infiniteQueryOptions infiniteQueryOptions}\n     */\n    infiniteQueryKeys: NamingOptions &\n      FeatureToggle & {\n        /**\n         * Whether to include operation tags in infinite query keys.\n         * This will make query keys larger but provides better cache invalidation capabilities.\n         *\n         * @default false\n         */\n        tags: boolean;\n      };\n    /**\n     * Resolved configuration for generated infinite query options helpers.\n     *\n     * See {@link https://tanstack.com/query/v5/docs/framework/react/reference/infiniteQueryOptions infiniteQueryOptions}\n     */\n    infiniteQueryOptions: NamingOptions &\n      FeatureToggle & {\n        /**\n         * Custom function to generate metadata for the operation.\n         * Can return any valid meta object that will be included in the generated infinite query options.\n         *\n         * @param operation - The operation object containing all available metadata\n         * @returns A meta object with any properties you want to include\n         *\n         * @example\n         * ```ts\n         * meta: (operation) => ({\n         *   customField: operation.id,\n         *   isDeprecated: operation.deprecated,\n         *   tags: operation.tags,\n         *   customObject: {\n         *     method: operation.method,\n         *     path: operation.path\n         *   }\n         * })\n         * ```\n         *\n         * @default undefined\n         */\n        meta: (operation: IR.OperationObject) => Record<string, unknown>;\n      };\n    /**\n     * Resolved configuration for generated mutation options helpers.\n     *\n     * See {@link https://tanstack.com/query/v5/docs/framework/react/reference/useMutation useMutation}\n     */\n    mutationOptions: NamingOptions &\n      FeatureToggle & {\n        /**\n         * Custom function to generate metadata for the operation.\n         * Can return any valid meta object that will be included in the generated mutation options.\n         *\n         * @param operation - The operation object containing all available metadata\n         * @returns A meta object with any properties you want to include\n         *\n         * @example\n         * ```ts\n         * meta: (operation) => ({\n         *   customField: operation.id,\n         *   isDeprecated: operation.deprecated,\n         *   tags: operation.tags,\n         *   customObject: {\n         *     method: operation.method,\n         *     path: operation.path\n         *   }\n         * })\n         * ```\n         *\n         * @default undefined\n         */\n        meta: (operation: IR.OperationObject) => Record<string, unknown>;\n      };\n    /**\n     * Resolved configuration for generated query keys.\n     *\n     * See {@link https://tanstack.com/query/v5/docs/framework/react/guides/query-keys Query Keys}\n     */\n    queryKeys: NamingOptions &\n      FeatureToggle & {\n        /**\n         * Whether to include operation tags in query keys.\n         * This will make query keys larger but provides better cache invalidation capabilities.\n         *\n         * @default false\n         */\n        tags: boolean;\n      };\n    /**\n     * Resolved configuration for generated query options helpers.\n     *\n     * See {@link https://tanstack.com/query/v5/docs/framework/react/reference/queryOptions queryOptions}\n     */\n    queryOptions: NamingOptions &\n      FeatureToggle & {\n        /**\n         * Whether to export generated symbols.\n         *\n         * @default true\n         */\n        exported: boolean;\n        /**\n         * Custom function to generate metadata for the operation.\n         * Can return any valid meta object that will be included in the generated query options.\n         *\n         * @param operation - The operation object containing all available metadata\n         * @returns A meta object with any properties you want to include\n         *\n         * @example\n         * ```ts\n         * meta: (operation) => ({\n         *   customField: operation.id,\n         *   isDeprecated: operation.deprecated,\n         *   tags: operation.tags,\n         *   customObject: {\n         *     method: operation.method,\n         *     path: operation.path\n         *   }\n         * })\n         * ```\n         *\n         * @default undefined\n         */\n        meta: (operation: IR.OperationObject) => Record<string, unknown>;\n      };\n    /**\n     * Configuration for generated `useSwr()` function helpers.\n     *\n     * See {@link https://swr.vercel.app/docs/api API}\n     */\n    useSwr: NamingOptions & FeatureToggle;\n  };\n\nexport type SwrPlugin = DefinePlugin<UserConfig, Config>;\n"
  },
  {
    "path": "packages/openapi-ts/src/plugins/swr/v2/plugin.ts",
    "content": "import type { SwrPlugin } from '../types';\nimport { createUseSwr } from './useSwr';\n\nexport const handlerV2: SwrPlugin['Handler'] = ({ plugin }) => {\n  plugin.symbol('useSWR', {\n    external: 'swr',\n    importKind: 'default',\n    kind: 'function',\n    meta: {\n      category: 'external',\n      resource: 'swr',\n    },\n  });\n\n  plugin.forEach(\n    'operation',\n    ({ operation }) => {\n      if (plugin.hooks.operation.isQuery(operation)) {\n        // if (plugin.config.queryOptions.enabled) {\n        //   createQueryOptions({ operation, plugin });\n        // }\n\n        // if (plugin.config.infiniteQueryOptions.enabled) {\n        //   createInfiniteQueryOptions({ operation, plugin });\n        // }\n\n        if (plugin.config.useSwr.enabled) {\n          createUseSwr({ operation, plugin });\n        }\n      }\n    },\n    {\n      order: 'declarations',\n    },\n  );\n};\n"
  },
  {
    "path": "packages/openapi-ts/src/plugins/swr/v2/useSwr.ts",
    "content": "import type { IR } from '@hey-api/shared';\nimport { applyNaming } from '@hey-api/shared';\n\nimport { createOperationComment, hasOperationSse } from '../../../plugins/shared/utils/operation';\nimport type { TsDsl } from '../../../ts-dsl';\nimport { $ } from '../../../ts-dsl';\nimport type { SwrPlugin } from '../types';\n\nexport const createUseSwr = ({\n  operation,\n  plugin,\n}: {\n  operation: IR.OperationObject;\n  plugin: SwrPlugin['Instance'];\n}): void => {\n  if (hasOperationSse({ operation })) {\n    return;\n  }\n\n  const symbolUseSwr = plugin.external('swr');\n  const symbolUseQueryFn = plugin.symbol(applyNaming(operation.id, plugin.config.useSwr));\n\n  const awaitSdkFn = $.lazy((ctx) =>\n    ctx\n      .access(\n        plugin.referenceSymbol({\n          category: 'sdk',\n          resource: 'operation',\n          resourceId: operation.id,\n        }),\n      )\n      .call($.object().prop('throwOnError', $.literal(true)))\n      .await(),\n  );\n\n  const statements: Array<TsDsl<any>> = [];\n  if (plugin.getPluginOrThrow('@hey-api/sdk').config.responseStyle === 'data') {\n    statements.push($.return(awaitSdkFn));\n  } else {\n    statements.push($.const().object('data').assign(awaitSdkFn), $.return('data'));\n  }\n\n  const statement = $.const(symbolUseQueryFn)\n    .export()\n    .$if(plugin.config.comments && createOperationComment(operation), (c, v) => c.doc(v))\n    .assign(\n      $.func().do(\n        $(symbolUseSwr)\n          .call(\n            $.literal(operation.path),\n            $.func()\n              .async()\n              .do(...statements),\n          )\n          .return(),\n      ),\n    );\n  plugin.node(statement);\n};\n"
  },
  {
    "path": "packages/openapi-ts/src/plugins/types.ts",
    "content": "export type PluginClientNames =\n  | '@hey-api/client-angular'\n  | '@hey-api/client-axios'\n  | '@hey-api/client-fetch'\n  | '@hey-api/client-ky'\n  | '@hey-api/client-next'\n  | '@hey-api/client-nuxt'\n  | '@hey-api/client-ofetch';\n\nexport type PluginMockNames = '@faker-js/faker';\n\nexport type PluginTransformerNames = '@hey-api/transformers';\n\nexport type PluginValidatorNames = 'arktype' | 'valibot' | 'zod';\n"
  },
  {
    "path": "packages/openapi-ts/src/plugins/valibot/api.ts",
    "content": "import type { $ } from '../../ts-dsl';\nimport type { ValidatorArgs } from './shared/types';\nimport { createRequestValidatorV1, createResponseValidatorV1 } from './v1/api';\n\nexport type IApi = {\n  createRequestValidator: (args: ValidatorArgs) => ReturnType<typeof $.func> | undefined;\n  createResponseValidator: (args: ValidatorArgs) => ReturnType<typeof $.func> | undefined;\n};\n\nexport class Api implements IApi {\n  createRequestValidator(args: ValidatorArgs): ReturnType<typeof $.func> | undefined {\n    return createRequestValidatorV1(args);\n  }\n\n  createResponseValidator(args: ValidatorArgs): ReturnType<typeof $.func> | undefined {\n    return createResponseValidatorV1(args);\n  }\n}\n"
  },
  {
    "path": "packages/openapi-ts/src/plugins/valibot/config.ts",
    "content": "import { definePluginConfig, mappers } from '@hey-api/shared';\n\nimport { Api } from './api';\nimport { handler } from './plugin';\nimport type { ValibotPlugin } from './types';\n\nexport const defaultConfig: ValibotPlugin['Config'] = {\n  api: new Api(),\n  config: {\n    case: 'camelCase',\n    comments: true,\n    includeInEntry: false,\n    metadata: false,\n  },\n  handler,\n  name: 'valibot',\n  resolveConfig: (plugin, context) => {\n    plugin.config.definitions = context.valueToObject({\n      defaultValue: {\n        case: plugin.config.case ?? 'camelCase',\n        enabled: true,\n        name: 'v{{name}}',\n      },\n      mappers,\n      value: plugin.config.definitions,\n    });\n\n    plugin.config.requests = context.valueToObject({\n      defaultValue: {\n        case: plugin.config.case ?? 'camelCase',\n        enabled: true,\n        name: 'v{{name}}Data',\n      },\n      mappers,\n      value: plugin.config.requests,\n    });\n\n    plugin.config.responses = context.valueToObject({\n      defaultValue: {\n        case: plugin.config.case ?? 'camelCase',\n        enabled: true,\n        name: 'v{{name}}Response',\n      },\n      mappers,\n      value: plugin.config.responses,\n    });\n\n    plugin.config.webhooks = context.valueToObject({\n      defaultValue: {\n        case: plugin.config.case ?? 'camelCase',\n        enabled: true,\n        name: 'v{{name}}WebhookRequest',\n      },\n      mappers,\n      value: plugin.config.webhooks,\n    });\n  },\n  tags: ['validator'],\n};\n\n/**\n * Type helper for Valibot plugin, returns {@link Plugin.Config} object\n */\nexport const defineConfig = definePluginConfig(defaultConfig);\n"
  },
  {
    "path": "packages/openapi-ts/src/plugins/valibot/index.ts",
    "content": "export { defaultConfig, defineConfig } from './config';\nexport type { ValibotResolvers } from './resolvers';\nexport type { ValibotPlugin } from './types';\n"
  },
  {
    "path": "packages/openapi-ts/src/plugins/valibot/plugin.ts",
    "content": "import type { ValibotPlugin } from './types';\nimport { handlerV1 } from './v1/plugin';\n\nexport const handler: ValibotPlugin['Handler'] = (args) => handlerV1(args);\n"
  },
  {
    "path": "packages/openapi-ts/src/plugins/valibot/resolvers.ts",
    "content": "import type { Symbol } from '@hey-api/codegen-core';\nimport type { IR, Plugin, SchemaVisitorContext, SchemaWithType, Walker } from '@hey-api/shared';\n\nimport type { MaybeBigInt, ShouldCoerceToBigInt } from '../../plugins/shared/utils/coerce';\nimport type { GetIntegerLimit } from '../../plugins/shared/utils/formats';\nimport type { $, DollarTsDsl } from '../../ts-dsl';\nimport type { Pipe, PipeResult, Pipes, PipesUtils } from './shared/pipes';\nimport type { ValibotFinal, ValibotResult } from './shared/types';\nimport type { ValibotPlugin } from './types';\n\nexport type ValibotResolvers = Plugin.Resolvers<{\n  /**\n   * Resolver for array schemas.\n   *\n   * Allows customization of how array types are rendered.\n   *\n   * Returning `undefined` will execute the default resolver logic.\n   */\n  array?: (ctx: ArrayResolverContext) => PipeResult;\n  /**\n   * Resolver for boolean schemas.\n   *\n   * Allows customization of how boolean types are rendered.\n   *\n   * Returning `undefined` will execute the default resolver logic.\n   */\n  boolean?: (ctx: BooleanResolverContext) => PipeResult;\n  /**\n   * Resolver for enum schemas.\n   *\n   * Allows customization of how enum types are rendered.\n   *\n   * Returning `undefined` will execute the default resolver logic.\n   */\n  enum?: (ctx: EnumResolverContext) => PipeResult;\n  /**\n   * Resolver for intersection schemas.\n   *\n   * Allows customization of how intersection types are rendered.\n   *\n   * Returning `undefined` will execute the default resolver logic.\n   */\n  intersection?: (ctx: IntersectionResolverContext) => PipeResult;\n  /**\n   * Resolver for never schemas.\n   *\n   * Allows customization of how never types are rendered.\n   *\n   * Returning `undefined` will execute the default resolver logic.\n   */\n  never?: (ctx: NeverResolverContext) => PipeResult;\n  /**\n   * Resolver for null schemas.\n   *\n   * Allows customization of how null types are rendered.\n   *\n   * Returning `undefined` will execute the default resolver logic.\n   */\n  null?: (ctx: NullResolverContext) => PipeResult;\n  /**\n   * Resolver for number schemas.\n   *\n   * Allows customization of how number types are rendered.\n   *\n   * Returning `undefined` will execute the default resolver logic.\n   */\n  number?: (ctx: NumberResolverContext) => PipeResult;\n  /**\n   * Resolver for object schemas.\n   *\n   * Allows customization of how object types are rendered.\n   *\n   * Returning `undefined` will execute the default resolver logic.\n   */\n  object?: (ctx: ObjectResolverContext) => PipeResult;\n  /**\n   * Resolver for string schemas.\n   *\n   * Allows customization of how string types are rendered.\n   *\n   * Returning `undefined` will execute the default resolver logic.\n   */\n  string?: (ctx: StringResolverContext) => PipeResult;\n  /**\n   * Resolver for tuple schemas.\n   *\n   * Allows customization of how tuple types are rendered.\n   *\n   * Returning `undefined` will execute the default resolver logic.\n   */\n  tuple?: (ctx: TupleResolverContext) => PipeResult;\n  /**\n   * Resolver for undefined schemas.\n   *\n   * Allows customization of how undefined types are rendered.\n   *\n   * Returning `undefined` will execute the default resolver logic.\n   */\n  undefined?: (ctx: UndefinedResolverContext) => PipeResult;\n  /**\n   * Resolver for union schemas.\n   *\n   * Allows customization of how union types are rendered.\n   *\n   * Returning `undefined` will execute the default resolver logic.\n   */\n  union?: (ctx: UnionResolverContext) => PipeResult;\n  /**\n   * Resolver for unknown schemas.\n   *\n   * Allows customization of how unknown types are rendered.\n   *\n   * Returning `undefined` will execute the default resolver logic.\n   */\n  unknown?: (ctx: UnknownResolverContext) => PipeResult;\n  /**\n   * Resolvers for request and response validators.\n   *\n   * Allow customization of validator function bodies.\n   *\n   * Example path: `~resolvers.validator.request` or `~resolvers.validator.response`\n   *\n   * Returning `undefined` will execute the default resolver logic.\n   */\n  validator?:\n    | ValidatorResolver\n    | {\n        /**\n         * Controls how the request validator function body is generated.\n         *\n         * Returning `undefined` will execute the default resolver logic.\n         */\n        request?: ValidatorResolver;\n        /**\n         * Controls how the response validator function body is generated.\n         *\n         * Returning `undefined` will execute the default resolver logic.\n         */\n        response?: ValidatorResolver;\n      };\n  /**\n   * Resolver for void schemas.\n   *\n   * Allows customization of how void types are rendered.\n   *\n   * Returning `undefined` will execute the default resolver logic.\n   */\n  void?: (ctx: VoidResolverContext) => PipeResult;\n}>;\n\ntype ValidatorResolver = (ctx: ValidatorResolverContext) => PipeResult | null | undefined;\n\ninterface BaseContext extends DollarTsDsl {\n  /**\n   * Functions for working with pipes.\n   */\n  pipes: PipesUtils & {\n    /**\n     * The current pipe.\n     *\n     * In Valibot, this represents a list of call expressions (\"pipes\")\n     * being assembled to form a schema definition.\n     *\n     * Each pipe can be extended, modified, or replaced to customize\n     * the resulting schema.\n     */\n    current: Pipes;\n  };\n  /** The plugin instance. */\n  plugin: ValibotPlugin['Instance'];\n  /**\n   * Provides access to commonly used symbols within the plugin.\n   */\n  symbols: {\n    v: Symbol;\n  };\n}\n\nexport interface ArrayResolverContext extends BaseContext {\n  applyModifiers: (result: ValibotResult, opts?: { optional?: boolean }) => ValibotFinal;\n  /**\n   * Nodes used to build different parts of the result.\n   */\n  nodes: {\n    base: (ctx: ArrayResolverContext) => PipeResult;\n    length: (ctx: ArrayResolverContext) => PipeResult;\n    maxLength: (ctx: ArrayResolverContext) => PipeResult;\n    minLength: (ctx: ArrayResolverContext) => PipeResult;\n  };\n  schema: SchemaWithType<'array'>;\n  walk: Walker<ValibotResult, ValibotPlugin['Instance']>;\n  walkerCtx: SchemaVisitorContext<ValibotPlugin['Instance']>;\n}\n\nexport interface BooleanResolverContext extends BaseContext {\n  /**\n   * Nodes used to build different parts of the result.\n   */\n  nodes: {\n    base: (ctx: BooleanResolverContext) => PipeResult;\n    const: (ctx: BooleanResolverContext) => PipeResult;\n  };\n  schema: SchemaWithType<'boolean'>;\n}\n\nexport interface EnumResolverContext extends BaseContext {\n  /**\n   * Nodes used to build different parts of the result.\n   */\n  nodes: {\n    /**\n     * Returns the base enum expression (v.picklist([...])).\n     */\n    base: (ctx: EnumResolverContext) => PipeResult;\n    /**\n     * Returns parsed enum items with metadata about the enum members.\n     */\n    items: (ctx: EnumResolverContext) => {\n      /**\n       * String literal values for use with v.picklist([...]).\n       */\n      enumMembers: Array<ReturnType<typeof $.literal>>;\n      /**\n       * Whether the enum includes a null value.\n       */\n      isNullable: boolean;\n    };\n  };\n  schema: SchemaWithType<'enum'>;\n}\n\nexport interface IntersectionResolverContext extends BaseContext {\n  applyModifiers: (result: ValibotResult, opts?: { optional?: boolean }) => ValibotFinal;\n  childResults: Array<ValibotResult>;\n  /**\n   * Nodes used to build different parts of the result.\n   */\n  nodes: {\n    base: (ctx: IntersectionResolverContext) => PipeResult;\n  };\n  parentSchema: IR.SchemaObject;\n  schema: IR.SchemaObject;\n}\n\nexport interface NeverResolverContext extends BaseContext {\n  /**\n   * Nodes used to build different parts of the result.\n   */\n  nodes: {\n    base: (ctx: NeverResolverContext) => PipeResult;\n  };\n  schema: SchemaWithType<'never'>;\n}\n\nexport interface NullResolverContext extends BaseContext {\n  /**\n   * Nodes used to build different parts of the result.\n   */\n  nodes: {\n    base: (ctx: NullResolverContext) => PipeResult;\n  };\n  schema: SchemaWithType<'null'>;\n}\n\nexport interface NumberResolverContext extends BaseContext {\n  /**\n   * Nodes used to build different parts of the result.\n   */\n  nodes: {\n    base: (ctx: NumberResolverContext) => PipeResult;\n    const: (ctx: NumberResolverContext) => PipeResult;\n    max: (ctx: NumberResolverContext) => PipeResult;\n    min: (ctx: NumberResolverContext) => PipeResult;\n  };\n  schema: SchemaWithType<'integer' | 'number'>;\n  /**\n   * Utility functions for number schema processing.\n   */\n  utils: {\n    getIntegerLimit: GetIntegerLimit;\n    maybeBigInt: MaybeBigInt;\n    shouldCoerceToBigInt: ShouldCoerceToBigInt;\n  };\n}\n\nexport interface ObjectResolverContext extends BaseContext {\n  _childResults: Array<ValibotResult>;\n  applyModifiers: (result: ValibotResult, opts: { optional?: boolean }) => ValibotFinal;\n  /**\n   * Nodes used to build different parts of the result.\n   */\n  nodes: {\n    additionalProperties: (ctx: ObjectResolverContext) => Pipe | null | undefined;\n    base: (ctx: ObjectResolverContext) => Pipes | Pipe;\n    shape: (ctx: ObjectResolverContext) => ReturnType<typeof $.object>;\n  };\n  schema: SchemaWithType<'object'>;\n  walk: Walker<ValibotResult, ValibotPlugin['Instance']>;\n  walkerCtx: SchemaVisitorContext<ValibotPlugin['Instance']>;\n}\n\nexport interface StringResolverContext extends BaseContext {\n  /**\n   * Nodes used to build different parts of the result.\n   */\n  nodes: {\n    base: (ctx: StringResolverContext) => PipeResult;\n    const: (ctx: StringResolverContext) => PipeResult;\n    format: (ctx: StringResolverContext) => PipeResult;\n    length: (ctx: StringResolverContext) => PipeResult;\n    maxLength: (ctx: StringResolverContext) => PipeResult;\n    minLength: (ctx: StringResolverContext) => PipeResult;\n    pattern: (ctx: StringResolverContext) => PipeResult;\n  };\n  schema: SchemaWithType<'string'>;\n}\n\nexport interface TupleResolverContext extends BaseContext {\n  applyModifiers: (result: ValibotResult, opts?: { optional?: boolean }) => ValibotFinal;\n  /**\n   * Nodes used to build different parts of the result.\n   */\n  nodes: {\n    base: (ctx: TupleResolverContext) => PipeResult;\n    const: (ctx: TupleResolverContext) => PipeResult;\n  };\n  schema: SchemaWithType<'tuple'>;\n  walk: Walker<ValibotResult, ValibotPlugin['Instance']>;\n  walkerCtx: SchemaVisitorContext<ValibotPlugin['Instance']>;\n}\n\nexport interface UndefinedResolverContext extends BaseContext {\n  /**\n   * Nodes used to build different parts of the result.\n   */\n  nodes: {\n    base: (ctx: UndefinedResolverContext) => PipeResult;\n  };\n  schema: SchemaWithType<'undefined'>;\n}\n\nexport interface UnionResolverContext extends BaseContext {\n  applyModifiers: (result: ValibotResult, opts?: { optional?: boolean }) => ValibotFinal;\n  childResults: Array<ValibotResult>;\n  /**\n   * Nodes used to build different parts of the result.\n   */\n  nodes: {\n    base: (ctx: UnionResolverContext) => PipeResult;\n  };\n  parentSchema: IR.SchemaObject;\n  schema: IR.SchemaObject;\n  schemas: ReadonlyArray<IR.SchemaObject>;\n}\n\nexport interface UnknownResolverContext extends BaseContext {\n  /**\n   * Nodes used to build different parts of the result.\n   */\n  nodes: {\n    base: (ctx: UnknownResolverContext) => PipeResult;\n  };\n  schema: SchemaWithType<'unknown'>;\n}\n\nexport interface ValidatorResolverContext extends BaseContext {\n  operation: IR.OperationObject;\n  /**\n   * Provides access to commonly used symbols within the plugin.\n   */\n  symbols: BaseContext['symbols'] & {\n    schema: Symbol;\n  };\n}\n\nexport interface VoidResolverContext extends BaseContext {\n  /**\n   * Nodes used to build different parts of the result.\n   */\n  nodes: {\n    base: (ctx: VoidResolverContext) => PipeResult;\n  };\n  schema: SchemaWithType<'void'>;\n}\n"
  },
  {
    "path": "packages/openapi-ts/src/plugins/valibot/shared/export.ts",
    "content": "import { buildSymbolIn, pathToName } from '@hey-api/shared';\n\nimport { createSchemaComment } from '../../../plugins/shared/utils/schema';\nimport { $ } from '../../../ts-dsl';\nimport { pipesToNode } from './pipes';\nimport type { ProcessorContext } from './processor';\nimport type { ValibotFinal } from './types';\n\nexport function exportAst({\n  final,\n  meta,\n  naming,\n  namingAnchor,\n  path,\n  plugin,\n  schema,\n  tags,\n}: ProcessorContext & {\n  final: ValibotFinal;\n}): void {\n  const v = plugin.external('valibot.v');\n\n  const name = pathToName(path, { anchor: namingAnchor });\n\n  const symbol = plugin.registerSymbol(\n    buildSymbolIn({\n      meta: {\n        category: 'schema',\n        path,\n        tags,\n        tool: 'valibot',\n        ...meta,\n      },\n      name,\n      naming,\n      plugin,\n      schema,\n    }),\n  );\n\n  const statement = $.const(symbol)\n    .export()\n    .$if(plugin.config.comments && createSchemaComment(schema), (c, v) => c.doc(v))\n    .$if(final.typeName, (c) => c.type($.type(v).attr(final.typeName!)))\n    .assign(pipesToNode(final.pipes, plugin));\n\n  plugin.node(statement);\n}\n"
  },
  {
    "path": "packages/openapi-ts/src/plugins/valibot/shared/meta.ts",
    "content": "import type { IR } from '@hey-api/shared';\n\nimport type { ValibotMeta, ValibotResult } from './types';\n\n/**\n * Creates default metadata from a schema.\n */\nexport function defaultMeta(schema: IR.SchemaObject): ValibotMeta {\n  return {\n    default: schema.default,\n    format: schema.format,\n    hasLazy: false,\n    nullable: false,\n    readonly: schema.accessScope === 'read',\n  };\n}\n\n/**\n * Composes metadata from child results.\n *\n * @param children - Results from walking child schemas\n * @param overrides - Explicit overrides (e.g., from parent schema)\n */\nexport function composeMeta(\n  children: ReadonlyArray<ValibotResult>,\n  overrides?: Partial<ValibotMeta>,\n): ValibotMeta {\n  return {\n    default: overrides?.default,\n    format: overrides?.format,\n    hasLazy: overrides?.hasLazy ?? children.some((c) => c.meta.hasLazy),\n    nullable: overrides?.nullable ?? children.some((c) => c.meta.nullable),\n    readonly: overrides?.readonly ?? children.some((c) => c.meta.readonly),\n  };\n}\n\n/**\n * Merges parent schema metadata with composed child metadata.\n *\n * @param parent - The parent schema\n * @param children - Results from walking child schemas\n */\nexport function inheritMeta(\n  parent: IR.SchemaObject,\n  children: ReadonlyArray<ValibotResult>,\n): ValibotMeta {\n  return composeMeta(children, {\n    default: parent.default,\n    format: parent.format,\n    nullable: false,\n    readonly: parent.accessScope === 'read',\n  });\n}\n"
  },
  {
    "path": "packages/openapi-ts/src/plugins/valibot/shared/operation-schema.ts",
    "content": "import type { IR } from '@hey-api/shared';\n\nexport interface OperationSchemaResult {\n  required: ReadonlyArray<string>;\n  schema: IR.SchemaObject;\n}\n\nexport function buildOperationSchema(operation: IR.OperationObject): OperationSchemaResult {\n  const requiredProperties = new Set<string>();\n\n  const schema: IR.SchemaObject = {\n    properties: {\n      body: { type: 'never' },\n      path: { type: 'never' },\n      query: { type: 'never' },\n    },\n    type: 'object',\n  };\n\n  if (operation.parameters) {\n    // TODO: add support for cookies\n\n    for (const location of ['header', 'path', 'query'] satisfies ReadonlyArray<\n      keyof typeof operation.parameters\n    >) {\n      const params = operation.parameters[location];\n      if (!params) continue;\n\n      const properties: Record<string, IR.SchemaObject> = {};\n      const required: Array<string> = [];\n      const propKey = location === 'header' ? 'headers' : location;\n\n      for (const key in params) {\n        const parameter = params[key]!;\n        properties[parameter.name] = parameter.schema;\n        if (parameter.required) {\n          required.push(parameter.name);\n          requiredProperties.add(propKey);\n        }\n      }\n\n      if (Object.keys(properties).length) {\n        schema.properties![propKey] = { properties, required, type: 'object' };\n      }\n    }\n  }\n\n  if (operation.body) {\n    schema.properties!.body = operation.body.schema;\n    if (operation.body.required) {\n      requiredProperties.add('body');\n    }\n  }\n\n  schema.required = [...requiredProperties];\n\n  return { required: schema.required, schema };\n}\n"
  },
  {
    "path": "packages/openapi-ts/src/plugins/valibot/shared/operation.ts",
    "content": "import type { IR } from '@hey-api/shared';\nimport { operationResponsesMap } from '@hey-api/shared';\n\nimport { buildOperationSchema } from './operation-schema';\nimport type { ProcessorContext, ProcessorResult } from './processor';\n\nexport function irOperationToAst({\n  operation,\n  path,\n  plugin,\n  processor,\n  tags,\n}: Pick<ProcessorContext, 'path' | 'plugin' | 'tags'> & {\n  operation: IR.OperationObject;\n  processor: ProcessorResult;\n}): void {\n  if (plugin.config.requests.enabled) {\n    const { schema } = buildOperationSchema(operation);\n\n    processor.process({\n      meta: {\n        resource: 'operation',\n        resourceId: operation.id,\n        role: 'data',\n      },\n      naming: plugin.config.requests,\n      namingAnchor: operation.id,\n      path,\n      plugin,\n      schema,\n      tags,\n    });\n  }\n\n  if (plugin.config.responses.enabled) {\n    if (operation.responses) {\n      const { response } = operationResponsesMap(operation);\n\n      if (response) {\n        processor.process({\n          meta: {\n            resource: 'operation',\n            resourceId: operation.id,\n            role: 'responses',\n          },\n          naming: plugin.config.responses,\n          namingAnchor: operation.id,\n          path: [...path, 'responses'],\n          plugin,\n          schema: response,\n          tags,\n        });\n      }\n    }\n  }\n}\n"
  },
  {
    "path": "packages/openapi-ts/src/plugins/valibot/shared/pipes.ts",
    "content": "import { $ } from '../../../ts-dsl';\nimport type { ValibotPlugin } from '../types';\nimport { identifiers } from '../v1/constants';\n\nexport type Pipe = ReturnType<typeof $.call | typeof $.expr>;\nexport type Pipes = Array<Pipe>;\nexport type PipeResult = Pipes | Pipe | undefined;\n\nexport interface PipesUtils {\n  /**\n   * Pushes a pipe result onto a pipes array.\n   *\n   * Handles single pipes, arrays of pipes, and undefined.\n   */\n  push: (target: Pipes, result: PipeResult) => Pipes;\n  /**\n   * Converts a pipes array to a single node expression.\n   */\n  toNode: (pipes: Pipes | Pipe, plugin: ValibotPlugin['Instance']) => Pipe;\n}\n\nfunction push(target: Pipes, result: PipeResult): Pipes {\n  if (result === undefined) {\n    return target;\n  }\n  if (result instanceof Array) {\n    target.push(...result);\n  } else {\n    target.push(result);\n  }\n  return target;\n}\n\nfunction toNode(pipes: Pipes | Pipe, plugin: ValibotPlugin['Instance']): Pipe {\n  if (!(pipes instanceof Array)) {\n    return pipes;\n  }\n  if (pipes.length === 0) {\n    const v = plugin.external('valibot.v');\n    return $(v).attr(identifiers.schemas.unknown).call();\n  }\n  if (pipes.length === 1) {\n    return pipes[0]!;\n  }\n  const v = plugin.external('valibot.v');\n  return $(v)\n    .attr(identifiers.methods.pipe)\n    .call(...pipes);\n}\n\n/**\n * Functions for working with pipes.\n */\nexport const pipes: PipesUtils = {\n  push,\n  toNode,\n};\n\n/**\n * Convenience function for converting pipes to a node.\n *\n * Re-exported for backward compatibility.\n */\nexport function pipesToNode(pipes: Pipes | Pipe, plugin: ValibotPlugin['Instance']): Pipe {\n  return toNode(pipes, plugin);\n}\n"
  },
  {
    "path": "packages/openapi-ts/src/plugins/valibot/shared/processor.ts",
    "content": "import type { IR, NamingConfig, SchemaProcessorContext } from '@hey-api/shared';\n\nimport type { ValibotPlugin } from '../types';\nimport type { ValibotFinal } from './types';\n\nexport type ProcessorContext = SchemaProcessorContext & {\n  /** Whether to export the result (default: true) */\n  export?: boolean;\n  naming: NamingConfig;\n  /** The plugin instance. */\n  plugin: ValibotPlugin['Instance'];\n  schema: IR.SchemaObject;\n};\n\nexport type ProcessorResult = {\n  process: (ctx: ProcessorContext) => ValibotFinal | void;\n};\n"
  },
  {
    "path": "packages/openapi-ts/src/plugins/valibot/shared/types.ts",
    "content": "import type { IR } from '@hey-api/shared';\nimport type ts from 'typescript';\n\nimport type { ValibotPlugin } from '../types';\nimport type { Pipes } from './pipes';\n\nexport type ValidatorArgs = {\n  operation: IR.OperationObject;\n  /** The plugin instance. */\n  plugin: ValibotPlugin['Instance'];\n};\n\n/**\n * Metadata that flows through schema walking.\n */\nexport interface ValibotMeta {\n  /** Default value from schema. */\n  default?: unknown;\n  /** Original format (for BigInt coercion). */\n  format?: string;\n  /** Whether this or any child contains a lazy reference. */\n  hasLazy: boolean;\n  /** Does this schema explicitly allow null? */\n  nullable: boolean;\n  /** Is this schema read-only? */\n  readonly: boolean;\n}\n\n/**\n * Result from walking a schema node.\n */\nexport interface ValibotResult {\n  meta: ValibotMeta;\n  pipes: Pipes;\n}\n\n/**\n * Finalized result after applyModifiers.\n */\nexport interface ValibotFinal extends Pick<ValibotResult, 'pipes'> {\n  /** Type annotation for schemas requiring explicit typing (e.g., lazy). */\n  typeName?: string | ts.Identifier;\n}\n\n/**\n * Result from composite handlers that walk children.\n */\nexport interface CompositeHandlerResult {\n  childResults: Array<ValibotResult>;\n  pipes: Pipes;\n}\n"
  },
  {
    "path": "packages/openapi-ts/src/plugins/valibot/shared/webhook.ts",
    "content": "import type { IR } from '@hey-api/shared';\n\nimport { buildOperationSchema } from './operation-schema';\nimport type { ProcessorContext, ProcessorResult } from './processor';\n\nexport function irWebhookToAst({\n  operation,\n  path,\n  plugin,\n  processor,\n  tags,\n}: Pick<ProcessorContext, 'path' | 'plugin' | 'tags'> & {\n  operation: IR.OperationObject;\n  processor: ProcessorResult;\n}): void {\n  if (plugin.config.webhooks.enabled) {\n    const { schema } = buildOperationSchema(operation);\n\n    processor.process({\n      meta: {\n        resource: 'webhook',\n        resourceId: operation.id,\n        role: 'data',\n      },\n      naming: plugin.config.webhooks,\n      namingAnchor: operation.id,\n      path,\n      plugin,\n      schema,\n      tags,\n    });\n  }\n}\n"
  },
  {
    "path": "packages/openapi-ts/src/plugins/valibot/types.ts",
    "content": "import type {\n  Casing,\n  DefinePlugin,\n  FeatureToggle,\n  IR,\n  NameTransformer,\n  NamingOptions,\n  Plugin,\n} from '@hey-api/shared';\n\nimport type { $, DollarTsDsl } from '../../ts-dsl';\nimport type { IApi } from './api';\nimport type { ValibotResolvers } from './resolvers';\n\nexport type UserConfig = Plugin.Name<'valibot'> &\n  Plugin.Hooks &\n  Plugin.UserComments &\n  Plugin.UserExports &\n  ValibotResolvers & {\n    /**\n     * Casing convention for generated names.\n     *\n     * @default 'camelCase'\n     */\n    case?: Casing;\n    /**\n     * Configuration for reusable schema definitions.\n     *\n     * Controls generation of shared Valibot schemas that can be referenced\n     * across requests and responses.\n     *\n     * Can be:\n     * - `boolean`: Shorthand for `{ enabled: boolean }`\n     * - `string` or `function`: Shorthand for `{ name: string | function }`\n     * - `object`: Full configuration object\n     *\n     * @default true\n     */\n    definitions?:\n      | boolean\n      | NameTransformer\n      | {\n          /**\n           * Casing convention for generated names.\n           *\n           * @default 'camelCase'\n           */\n          case?: Casing;\n          /**\n           * Whether this feature is enabled.\n           *\n           * @default true\n           */\n          enabled?: boolean;\n          /**\n           * Naming pattern for generated names.\n           *\n           * @default 'v{{name}}'\n           */\n          name?: NameTransformer;\n        };\n    /**\n     * Enable Valibot metadata support? It's often useful to associate a schema\n     * with some additional metadata for documentation, code generation, AI\n     * structured outputs, form validation, and other purposes.\n     *\n     * Can be:\n     * - `boolean`: Shorthand for the default metadata builder. When `true`,\n     *   attaches `{ description }` from the schema (if present) to the\n     *   generated Valibot schema via the metadata action.\n     * - `function`: Custom metadata builder. Receives `{ $, node, schema }`,\n     *   where `node` is a pre-initialized `$.object()` node. Add properties to\n     *   `node` to populate the metadata object. Return value is ignored; an\n     *   empty `node` skips metadata for that schema.\n     *\n     * @default false\n     */\n    metadata?:\n      | boolean\n      | ((\n          ctx: DollarTsDsl & { node: ReturnType<typeof $.object>; schema: IR.SchemaObject },\n        ) => void);\n    /**\n     * Configuration for request-specific Valibot schemas.\n     *\n     * Controls generation of Valibot schemas for request bodies, query\n     * parameters, path parameters, and headers.\n     *\n     * Can be:\n     * - `boolean`: Shorthand for `{ enabled: boolean }`\n     * - `string` or `function`: Shorthand for `{ name: string | function }`\n     * - `object`: Full configuration object\n     *\n     * @default true\n     */\n    requests?:\n      | boolean\n      | NameTransformer\n      | {\n          /**\n           * Casing convention for generated names.\n           *\n           * @default 'camelCase'\n           */\n          case?: Casing;\n          /**\n           * Whether this feature is enabled.\n           *\n           * @default true\n           */\n          enabled?: boolean;\n          /**\n           * Naming pattern for generated names.\n           *\n           * @default 'v{{name}}Data'\n           */\n          name?: NameTransformer;\n        };\n    /**\n     * Configuration for response-specific Valibot schemas.\n     *\n     * Controls generation of Valibot schemas for response bodies, error\n     * responses, and status codes.\n     *\n     * Can be:\n     * - `boolean`: Shorthand for `{ enabled: boolean }`\n     * - `string` or `function`: Shorthand for `{ name: string | function }`\n     * - `object`: Full configuration object\n     *\n     * @default true\n     */\n    responses?:\n      | boolean\n      | NameTransformer\n      | {\n          /**\n           * Casing convention for generated names.\n           *\n           * @default 'camelCase'\n           */\n          case?: Casing;\n          /**\n           * Whether this feature is enabled.\n           *\n           * @default true\n           */\n          enabled?: boolean;\n          /**\n           * Naming pattern for generated names.\n           *\n           * @default 'v{{name}}Response'\n           */\n          name?: NameTransformer;\n        };\n    /**\n     * Configuration for webhook-specific Valibot schemas.\n     *\n     * Controls generation of Valibot schemas for webhook payloads.\n     *\n     * Can be:\n     * - `boolean`: Shorthand for `{ enabled: boolean }`\n     * - `string` or `function`: Shorthand for `{ name: string | function }`\n     * - `object`: Full configuration object\n     *\n     * @default true\n     */\n    webhooks?:\n      | boolean\n      | NameTransformer\n      | {\n          /**\n           * Casing convention for generated names.\n           *\n           * @default 'camelCase'\n           */\n          case?: Casing;\n          /**\n           * Whether this feature is enabled.\n           *\n           * @default true\n           */\n          enabled?: boolean;\n          /**\n           * Naming pattern for generated names.\n           *\n           * @default 'v{{name}}WebhookRequest'\n           */\n          name?: NameTransformer;\n        };\n  };\n\nexport type Config = Plugin.Name<'valibot'> &\n  Plugin.Hooks &\n  Plugin.Comments &\n  Plugin.Exports &\n  ValibotResolvers & {\n    /** Casing convention for generated names. */\n    case: Casing;\n    /** Configuration for reusable schema definitions. */\n    definitions: NamingOptions & FeatureToggle;\n    /** Enable Valibot metadata support? */\n    metadata:\n      | boolean\n      | ((\n          ctx: DollarTsDsl & { node: ReturnType<typeof $.object>; schema: IR.SchemaObject },\n        ) => void);\n    /** Configuration for request-specific Valibot schemas. */\n    requests: NamingOptions & FeatureToggle;\n    /** Configuration for response-specific Valibot schemas. */\n    responses: NamingOptions & FeatureToggle;\n    /** Configuration for webhook-specific Valibot schemas. */\n    webhooks: NamingOptions & FeatureToggle;\n  };\n\nexport type ValibotPlugin = DefinePlugin<UserConfig, Config, IApi>;\n"
  },
  {
    "path": "packages/openapi-ts/src/plugins/valibot/v1/api.ts",
    "content": "import { $ } from '../../../ts-dsl';\nimport type { ValidatorResolverContext } from '../resolvers';\nimport { pipes } from '../shared/pipes';\nimport type { ValidatorArgs } from '../shared/types';\nimport { identifiers } from './constants';\n\nconst validatorResolver = (ctx: ValidatorResolverContext): ReturnType<typeof $.return> => {\n  const { schema, v } = ctx.symbols;\n  return $(v).attr(identifiers.async.parseAsync).call(schema, 'data').await().return();\n};\n\nexport const createRequestValidatorV1 = ({\n  operation,\n  plugin,\n}: ValidatorArgs): ReturnType<typeof $.func> | undefined => {\n  const symbol = plugin.getSymbol({\n    category: 'schema',\n    resource: 'operation',\n    resourceId: operation.id,\n    role: 'data',\n    tool: 'valibot',\n  });\n  if (!symbol) return;\n\n  const ctx: ValidatorResolverContext = {\n    $,\n    operation,\n    pipes: {\n      ...pipes,\n      current: [],\n    },\n    plugin,\n    symbols: {\n      schema: symbol,\n      v: plugin.external('valibot.v'),\n    },\n  };\n  const validator = plugin.config['~resolvers']?.validator;\n  const resolver = typeof validator === 'function' ? validator : validator?.request;\n  const candidates = [resolver, validatorResolver];\n  for (const candidate of candidates) {\n    const statements = candidate?.(ctx);\n    if (statements === null) return;\n    if (statements !== undefined) {\n      return $.func()\n        .async()\n        .param('data')\n        .do(...(statements instanceof Array ? statements : [statements]));\n    }\n  }\n};\n\nexport const createResponseValidatorV1 = ({\n  operation,\n  plugin,\n}: ValidatorArgs): ReturnType<typeof $.func> | undefined => {\n  const symbol = plugin.getSymbol({\n    category: 'schema',\n    resource: 'operation',\n    resourceId: operation.id,\n    role: 'responses',\n    tool: 'valibot',\n  });\n  if (!symbol) return;\n\n  const ctx: ValidatorResolverContext = {\n    $,\n    operation,\n    pipes: {\n      ...pipes,\n      current: [],\n    },\n    plugin,\n    symbols: {\n      schema: symbol,\n      v: plugin.external('valibot.v'),\n    },\n  };\n  const validator = plugin.config['~resolvers']?.validator;\n  const resolver = typeof validator === 'function' ? validator : validator?.response;\n  const candidates = [resolver, validatorResolver];\n  for (const candidate of candidates) {\n    const statements = candidate?.(ctx);\n    if (statements === null) return;\n    if (statements !== undefined) {\n      return $.func()\n        .async()\n        .param('data')\n        .do(...(statements instanceof Array ? statements : [statements]));\n    }\n  }\n};\n"
  },
  {
    "path": "packages/openapi-ts/src/plugins/valibot/v1/constants.ts",
    "content": "export const identifiers = {\n  /**\n   * {@link https://valibot.dev/api/#actions Actions}\n   */\n  actions: {\n    args: 'args',\n    base64: 'base64',\n    bic: 'bic',\n    brand: 'brand',\n    bytes: 'bytes',\n    check: 'check',\n    checkItems: 'checkItems',\n    creditCard: 'creditCard',\n    cuid2: 'cuid2',\n    decimal: 'decimal',\n    description: 'description',\n    digits: 'digits',\n    email: 'email',\n    emoji: 'emoji',\n    empty: 'empty',\n    endsWith: 'endsWith',\n    entries: 'entries',\n    everyItem: 'everyItem',\n    excludes: 'excludes',\n    filterItems: 'filterItems',\n    findItem: 'findItem',\n    finite: 'finite',\n    flavor: 'flavor',\n    graphemes: 'graphemes',\n    gtValue: 'gtValue',\n    hash: 'hash',\n    hexColor: 'hexColor',\n    hexadecimal: 'hexadecimal',\n    imei: 'imei',\n    includes: 'includes',\n    integer: 'integer',\n    ip: 'ip',\n    ipv4: 'ipv4',\n    ipv6: 'ipv6',\n    isoDate: 'isoDate',\n    isoDateTime: 'isoDateTime',\n    isoTime: 'isoTime',\n    isoTimeSecond: 'isoTimeSecond',\n    isoTimestamp: 'isoTimestamp',\n    isoWeek: 'isoWeek',\n    length: 'length',\n    ltValue: 'ltValue',\n    mac: 'mac',\n    mac48: 'mac48',\n    mac64: 'mac64',\n    mapItems: 'mapItems',\n    maxBytes: 'maxBytes',\n    maxEntries: 'maxEntries',\n    maxGraphemes: 'maxGraphemes',\n    maxLength: 'maxLength',\n    maxSize: 'maxSize',\n    maxValue: 'maxValue',\n    maxWords: 'maxWords',\n    metadata: 'metadata',\n    mimeType: 'mimeType',\n    minBytes: 'minBytes',\n    minEntries: 'minEntries',\n    minGraphemes: 'minGraphemes',\n    minLength: 'minLength',\n    minSize: 'minSize',\n    minValue: 'minValue',\n    minWords: 'minWords',\n    multipleOf: 'multipleOf',\n    nanoid: 'nanoid',\n    nonEmpty: 'nonEmpty',\n    normalize: 'normalize',\n    notBytes: 'notBytes',\n    notEntries: 'notEntries',\n    notGraphemes: 'notGraphemes',\n    notLength: 'notLength',\n    notSize: 'notSize',\n    notValue: 'notValue',\n    notValues: 'notValues',\n    notWords: 'notWords',\n    octal: 'octal',\n    parseJson: 'parseJson',\n    partialCheck: 'partialCheck',\n    rawCheck: 'rawCheck',\n    rawTransform: 'rawTransform',\n    readonly: 'readonly',\n    reduceItems: 'reduceItems',\n    regex: 'regex',\n    returns: 'returns',\n    rfcEmail: 'rfcEmail',\n    safeInteger: 'safeInteger',\n    size: 'size',\n    slug: 'slug',\n    someItem: 'someItem',\n    sortItems: 'sortItems',\n    startsWith: 'startsWith',\n    stringifyJson: 'stringifyJson',\n    title: 'title',\n    toLowerCase: 'toLowerCase',\n    toMaxValue: 'toMaxValue',\n    toMinValue: 'toMinValue',\n    toUpperCase: 'toUpperCase',\n    transform: 'transform',\n    trim: 'trim',\n    trimEnd: 'trimEnd',\n    trimStart: 'trimStart',\n    ulid: 'ulid',\n    url: 'url',\n    uuid: 'uuid',\n    value: 'value',\n    values: 'values',\n    words: 'words',\n  },\n  /**\n   * {@link https://valibot.dev/api/#async Async}\n   */\n  async: {\n    argsAsync: 'argsAsync',\n    arrayAsync: 'arrayAsync',\n    awaitAsync: 'awaitAsync',\n    checkAsync: 'checkAsync',\n    checkItemsAsync: 'checkItemsAsync',\n    customAsync: 'customAsync',\n    exactOptionalAsync: 'exactOptionalAsync',\n    fallbackAsync: 'fallbackAsync',\n    forwardAsync: 'forwardAsync',\n    getDefaultsAsync: 'getDefaultsAsync',\n    getFallbacksAsync: 'getFallbacksAsync',\n    intersectAsync: 'intersectAsync',\n    lazyAsync: 'lazyAsync',\n    looseObjectAsync: 'looseObjectAsync',\n    looseTupleAsync: 'looseTupleAsync',\n    mapAsync: 'mapAsync',\n    nonNullableAsync: 'nonNullableAsync',\n    nonNullishAsync: 'nonNullishAsync',\n    nonOptionalAsync: 'nonOptionalAsync',\n    nullableAsync: 'nullableAsync',\n    nullishAsync: 'nullishAsync',\n    objectAsync: 'objectAsync',\n    objectWithRestAsync: 'objectWithRestAsync',\n    optionalAsync: 'optionalAsync',\n    parseAsync: 'parseAsync',\n    parserAsync: 'parserAsync',\n    partialAsync: 'partialAsync',\n    partialCheckAsync: 'partialCheckAsync',\n    pipeAsync: 'pipeAsync',\n    rawCheckAsync: 'rawCheckAsync',\n    rawTransformAsync: 'rawTransformAsync',\n    recordAsync: 'recordAsync',\n    requiredAsync: 'requiredAsync',\n    returnsAsync: 'returnsAsync',\n    safeParseAsync: 'safeParseAsync',\n    safeParserAsync: 'safeParserAsync',\n    setAsync: 'setAsync',\n    strictObjectAsync: 'strictObjectAsync',\n    strictTupleAsync: 'strictTupleAsync',\n    transformAsync: 'transformAsync',\n    tupleAsync: 'tupleAsync',\n    tupleWithRestAsync: 'tupleWithRestAsync',\n    undefinedableAsync: 'undefinedableAsync',\n    unionAsync: 'unionAsync',\n    variantAsync: 'variantAsync',\n  },\n  /**\n   * {@link https://valibot.dev/api/#methods Methods}\n   */\n  methods: {\n    assert: 'assert',\n    config: 'config',\n    fallback: 'fallback',\n    flatten: 'flatten',\n    forward: 'forward',\n    getDefault: 'getDefault',\n    getDefaults: 'getDefaults',\n    getDescription: 'getDescription',\n    getFallback: 'getFallback',\n    getFallbacks: 'getFallbacks',\n    getMetadata: 'getMetadata',\n    getTitle: 'getTitle',\n    is: 'is',\n    keyof: 'keyof',\n    message: 'message',\n    omit: 'omit',\n    parse: 'parse',\n    parser: 'parser',\n    partial: 'partial',\n    pick: 'pick',\n    pipe: 'pipe',\n    required: 'required',\n    safeParse: 'safeParse',\n    safeParser: 'safeParser',\n    summarize: 'summarize',\n    unwrap: 'unwrap',\n  },\n  /**\n   * {@link https://valibot.dev/api/#schemas Schemas}\n   */\n  schemas: {\n    any: 'any',\n    array: 'array',\n    bigInt: 'bigint',\n    blob: 'blob',\n    boolean: 'boolean',\n    custom: 'custom',\n    date: 'date',\n    enum: 'enum',\n    exactOptional: 'exactOptional',\n    file: 'file',\n    function: 'function',\n    instance: 'instance',\n    intersect: 'intersect',\n    lazy: 'lazy',\n    literal: 'literal',\n    looseObject: 'looseObject',\n    looseTuple: 'looseTuple',\n    map: 'map',\n    nan: 'nan',\n    never: 'never',\n    nonNullable: 'nonNullable',\n    nonNullish: 'nonNullish',\n    nonOptional: 'nonOptional',\n    null: 'null',\n    nullable: 'nullable',\n    nullish: 'nullish',\n    number: 'number',\n    object: 'object',\n    objectWithRest: 'objectWithRest',\n    optional: 'optional',\n    picklist: 'picklist',\n    promise: 'promise',\n    record: 'record',\n    set: 'set',\n    strictObject: 'strictObject',\n    strictTuple: 'strictTuple',\n    string: 'string',\n    symbol: 'symbol',\n    tuple: 'tuple',\n    tupleWithRest: 'tupleWithRest',\n    undefined: 'undefined',\n    undefinedable: 'undefinedable',\n    union: 'union',\n    unknown: 'unknown',\n    variant: 'variant',\n    void: 'void',\n  },\n  /**\n   * {@link https://valibot.dev/api/#storages Storages}\n   */\n  storages: {\n    // TODO: implement if necessary\n  },\n  /**\n   * {@link https://valibot.dev/api/#types Types}\n   */\n  types: {\n    // TODO: implement if necessary\n    GenericSchema: 'GenericSchema',\n  },\n  /**\n   * {@link https://valibot.dev/api/#utils Utils}\n   */\n  utils: {\n    // TODO: implement if necessary\n  },\n};\n"
  },
  {
    "path": "packages/openapi-ts/src/plugins/valibot/v1/plugin.ts",
    "content": "import { pathToJsonPointer } from '@hey-api/shared';\n\nimport { irOperationToAst } from '../shared/operation';\nimport { irWebhookToAst } from '../shared/webhook';\nimport type { ValibotPlugin } from '../types';\nimport { createProcessor } from './processor';\n\nexport const handlerV1: ValibotPlugin['Handler'] = ({ plugin }) => {\n  plugin.symbol('v', {\n    external: 'valibot',\n    importKind: 'namespace',\n    meta: {\n      category: 'external',\n      resource: 'valibot.v',\n    },\n  });\n\n  const processor = createProcessor(plugin);\n\n  plugin.forEach('operation', 'parameter', 'requestBody', 'schema', 'webhook', (event) => {\n    switch (event.type) {\n      case 'operation':\n        irOperationToAst({\n          operation: event.operation,\n          path: event._path,\n          plugin,\n          processor,\n          tags: event.tags,\n        });\n        break;\n      case 'parameter':\n        processor.process({\n          meta: {\n            resource: 'definition',\n            resourceId: pathToJsonPointer(event._path),\n          },\n          naming: plugin.config.definitions,\n          path: event._path,\n          plugin,\n          schema: event.parameter.schema,\n          tags: event.tags,\n        });\n        break;\n      case 'requestBody':\n        processor.process({\n          meta: {\n            resource: 'definition',\n            resourceId: pathToJsonPointer(event._path),\n          },\n          naming: plugin.config.definitions,\n          path: event._path,\n          plugin,\n          schema: event.requestBody.schema,\n          tags: event.tags,\n        });\n        break;\n      case 'schema':\n        processor.process({\n          meta: {\n            resource: 'definition',\n            resourceId: pathToJsonPointer(event._path),\n          },\n          naming: plugin.config.definitions,\n          path: event._path,\n          plugin,\n          schema: event.schema,\n          tags: event.tags,\n        });\n        break;\n      case 'webhook':\n        irWebhookToAst({\n          operation: event.operation,\n          path: event._path,\n          plugin,\n          processor,\n          tags: event.tags,\n        });\n        break;\n    }\n  });\n};\n"
  },
  {
    "path": "packages/openapi-ts/src/plugins/valibot/v1/processor.ts",
    "content": "import { ref } from '@hey-api/codegen-core';\nimport type { Hooks, IR } from '@hey-api/shared';\nimport { createSchemaProcessor, createSchemaWalker, pathToJsonPointer } from '@hey-api/shared';\n\nimport { exportAst } from '../shared/export';\nimport type { ProcessorContext, ProcessorResult } from '../shared/processor';\nimport type { ValibotFinal } from '../shared/types';\nimport type { ValibotPlugin } from '../types';\nimport { createVisitor } from './walker';\n\nexport function createProcessor(plugin: ValibotPlugin['Instance']): ProcessorResult {\n  const processor = createSchemaProcessor();\n\n  const extractorHooks: ReadonlyArray<NonNullable<Hooks['schemas']>['shouldExtract']> = [\n    plugin.config['~hooks']?.schemas?.shouldExtract,\n    plugin.context.config.parser.hooks.schemas?.shouldExtract,\n  ];\n\n  function extractor(ctx: ProcessorContext): IR.SchemaObject {\n    if (processor.hasEmitted(ctx.path)) {\n      return ctx.schema;\n    }\n\n    for (const hook of extractorHooks) {\n      const result = hook?.(ctx);\n      if (result) {\n        process({\n          namingAnchor: processor.context.anchor,\n          tags: processor.context.tags,\n          ...ctx,\n        });\n        return { $ref: pathToJsonPointer(ctx.path) };\n      }\n    }\n\n    return ctx.schema;\n  }\n\n  function process(ctx: ProcessorContext): ValibotFinal | void {\n    if (!processor.markEmitted(ctx.path)) return;\n\n    const shouldExport = ctx.export !== false;\n\n    return processor.withContext({ anchor: ctx.namingAnchor, tags: ctx.tags }, () => {\n      const visitor = createVisitor({ schemaExtractor: extractor });\n      const walk = createSchemaWalker(visitor);\n\n      const result = walk(ctx.schema, {\n        path: ref(ctx.path),\n        plugin,\n      });\n\n      const final = visitor.applyModifiers(result, {\n        path: ref(ctx.path),\n        plugin,\n      }) as ValibotFinal;\n\n      if (shouldExport) {\n        exportAst({ ...ctx, final, plugin });\n        return;\n      }\n\n      return final;\n    });\n  }\n\n  return { process };\n}\n"
  },
  {
    "path": "packages/openapi-ts/src/plugins/valibot/v1/toAst/array.ts",
    "content": "import type { SchemaVisitorContext, SchemaWithType, Walker } from '@hey-api/shared';\nimport { childContext, deduplicateSchema } from '@hey-api/shared';\n\nimport { $ } from '../../../../ts-dsl';\nimport type { ArrayResolverContext } from '../../resolvers';\nimport type { PipeResult, Pipes } from '../../shared/pipes';\nimport { pipes } from '../../shared/pipes';\nimport type { CompositeHandlerResult, ValibotFinal, ValibotResult } from '../../shared/types';\nimport type { ValibotPlugin } from '../../types';\nimport { identifiers } from '../constants';\nimport { unknownToPipes } from './unknown';\n\ninterface ArrayToPipesContext {\n  applyModifiers: (result: ValibotResult, options?: { optional?: boolean }) => ValibotFinal;\n  plugin: ValibotPlugin['Instance'];\n  schema: SchemaWithType<'array'>;\n  walk: Walker<ValibotResult, ValibotPlugin['Instance']>;\n  walkerCtx: SchemaVisitorContext<ValibotPlugin['Instance']>;\n}\n\nfunction baseNode(ctx: ArrayResolverContext): PipeResult {\n  const { plugin, symbols } = ctx;\n  const { v } = symbols;\n\n  const arrayFn = $(v).attr(identifiers.schemas.array);\n\n  let { schema: normalizedSchema } = ctx;\n  if (normalizedSchema.items) {\n    normalizedSchema = deduplicateSchema({ schema: normalizedSchema });\n  }\n\n  if (!normalizedSchema.items) {\n    return arrayFn.call(unknownToPipes({ plugin }));\n  }\n\n  const childResults: Array<ValibotResult> = [];\n  const { applyModifiers, pipes, walk, walkerCtx } = ctx;\n\n  for (let i = 0; i < normalizedSchema.items!.length; i++) {\n    const item = normalizedSchema.items![i]!;\n    const result = walk!(item, childContext(walkerCtx!, 'items', i));\n    childResults.push(result);\n  }\n\n  if (childResults.length === 1) {\n    const itemNode = pipes.toNode(applyModifiers!(childResults[0]!).pipes, plugin);\n    return arrayFn.call(itemNode);\n  }\n\n  return arrayFn.call(unknownToPipes({ plugin }));\n}\n\nfunction lengthNode(ctx: ArrayResolverContext): PipeResult {\n  const { schema, symbols } = ctx;\n  const { v } = symbols;\n  if (schema.minItems === schema.maxItems && schema.minItems !== undefined) {\n    return $(v).attr(identifiers.actions.length).call($.fromValue(schema.minItems));\n  }\n}\n\nfunction maxLengthNode(ctx: ArrayResolverContext): PipeResult {\n  const { schema, symbols } = ctx;\n  const { v } = symbols;\n  if (schema.maxItems === undefined) return;\n  return $(v).attr(identifiers.actions.maxLength).call($.fromValue(schema.maxItems));\n}\n\nfunction minLengthNode(ctx: ArrayResolverContext): PipeResult {\n  const { schema, symbols } = ctx;\n  const { v } = symbols;\n  if (schema.minItems === undefined) return;\n  return $(v).attr(identifiers.actions.minLength).call($.fromValue(schema.minItems));\n}\n\nfunction arrayResolver(ctx: ArrayResolverContext): Pipes {\n  const baseResult = ctx.nodes.base(ctx);\n  if (baseResult) {\n    ctx.pipes.push(ctx.pipes.current, baseResult);\n  }\n\n  const lengthResult = ctx.nodes.length(ctx);\n  if (lengthResult) {\n    ctx.pipes.push(ctx.pipes.current, lengthResult);\n  } else {\n    const minLengthResult = ctx.nodes.minLength(ctx);\n    if (minLengthResult) {\n      ctx.pipes.push(ctx.pipes.current, minLengthResult);\n    }\n\n    const maxLengthResult = ctx.nodes.maxLength(ctx);\n    if (maxLengthResult) {\n      ctx.pipes.push(ctx.pipes.current, maxLengthResult);\n    }\n  }\n\n  return ctx.pipes.current;\n}\n\nexport function arrayToPipes(ctx: ArrayToPipesContext): CompositeHandlerResult {\n  const { plugin, schema, walk, walkerCtx } = ctx;\n  const childResults: Array<ValibotResult> = [];\n\n  if (schema.items) {\n    const normalizedSchema = deduplicateSchema({ schema });\n    for (let i = 0; i < normalizedSchema.items!.length; i++) {\n      const item = normalizedSchema.items![i]!;\n      const result = walk(item, childContext(walkerCtx, 'items', i));\n      childResults.push(result);\n    }\n  }\n\n  const resolverCtx: ArrayResolverContext = {\n    $,\n    applyModifiers: ctx.applyModifiers,\n    nodes: {\n      base: baseNode,\n      length: lengthNode,\n      maxLength: maxLengthNode,\n      minLength: minLengthNode,\n    },\n    pipes: {\n      ...pipes,\n      current: [],\n    },\n    plugin,\n    schema,\n    symbols: {\n      v: plugin.external('valibot.v'),\n    },\n    walk,\n    walkerCtx,\n  };\n\n  const resolver = plugin.config['~resolvers']?.array;\n  const node = resolver?.(resolverCtx) ?? arrayResolver(resolverCtx);\n\n  return {\n    childResults,\n    pipes: [resolverCtx.pipes.toNode(node, plugin)],\n  };\n}\n"
  },
  {
    "path": "packages/openapi-ts/src/plugins/valibot/v1/toAst/boolean.ts",
    "content": "import type { SchemaWithType } from '@hey-api/shared';\n\nimport { $ } from '../../../../ts-dsl';\nimport type { BooleanResolverContext } from '../../resolvers';\nimport type { Pipe, PipeResult, Pipes } from '../../shared/pipes';\nimport { pipes } from '../../shared/pipes';\nimport type { ValibotPlugin } from '../../types';\nimport { identifiers } from '../constants';\n\nfunction baseNode(ctx: BooleanResolverContext): PipeResult {\n  const { symbols } = ctx;\n  const { v } = symbols;\n  return $(v).attr(identifiers.schemas.boolean).call();\n}\n\nfunction constNode(ctx: BooleanResolverContext): PipeResult {\n  const { schema, symbols } = ctx;\n  const { v } = symbols;\n  if (typeof schema.const !== 'boolean') return;\n  return $(v).attr(identifiers.schemas.literal).call($.literal(schema.const));\n}\n\nfunction booleanResolver(ctx: BooleanResolverContext): Pipes {\n  const constResult = ctx.nodes.const(ctx);\n  if (constResult) {\n    return ctx.pipes.push(ctx.pipes.current, constResult);\n  }\n\n  const baseResult = ctx.nodes.base(ctx);\n  if (baseResult) {\n    ctx.pipes.push(ctx.pipes.current, baseResult);\n  }\n\n  return ctx.pipes.current;\n}\n\nexport function booleanToPipes({\n  plugin,\n  schema,\n}: {\n  plugin: ValibotPlugin['Instance'];\n  schema: SchemaWithType<'boolean'>;\n}): Pipe {\n  const ctx: BooleanResolverContext = {\n    $,\n    nodes: {\n      base: baseNode,\n      const: constNode,\n    },\n    pipes: {\n      ...pipes,\n      current: [],\n    },\n    plugin,\n    schema,\n    symbols: {\n      v: plugin.external('valibot.v'),\n    },\n  };\n\n  const resolver = plugin.config['~resolvers']?.boolean;\n  const node = resolver?.(ctx) ?? booleanResolver(ctx);\n  return ctx.pipes.toNode(node, plugin);\n}\n"
  },
  {
    "path": "packages/openapi-ts/src/plugins/valibot/v1/toAst/enum.ts",
    "content": "import type { SchemaWithType } from '@hey-api/shared';\n\nimport { $ } from '../../../../ts-dsl';\nimport type { EnumResolverContext } from '../../resolvers';\nimport type { Pipe, PipeResult, Pipes } from '../../shared/pipes';\nimport { pipes } from '../../shared/pipes';\nimport type { ValibotPlugin } from '../../types';\nimport { identifiers } from '../constants';\nimport { unknownToPipes } from './unknown';\n\nfunction itemsNode(ctx: EnumResolverContext): ReturnType<EnumResolverContext['nodes']['items']> {\n  const { schema } = ctx;\n  const enumMembers: Array<ReturnType<typeof $.literal>> = [];\n  let isNullable = false;\n\n  for (const item of schema.items ?? []) {\n    if (item.type === 'string' && typeof item.const === 'string') {\n      enumMembers.push($.literal(item.const));\n    } else if (item.type === 'null' || item.const === null) {\n      isNullable = true;\n    }\n  }\n\n  return { enumMembers, isNullable };\n}\n\nfunction baseNode(ctx: EnumResolverContext): PipeResult {\n  const { symbols } = ctx;\n  const { v } = symbols;\n  const { enumMembers } = ctx.nodes.items(ctx);\n  return $(v)\n    .attr(identifiers.schemas.picklist)\n    .call($.array(...enumMembers));\n}\n\nfunction enumResolver(ctx: EnumResolverContext): Pipes {\n  const { enumMembers } = ctx.nodes.items(ctx);\n\n  if (!enumMembers.length) {\n    return ctx.pipes.current;\n  }\n\n  const baseExpression = ctx.nodes.base(ctx);\n  ctx.pipes.push(ctx.pipes.current, baseExpression);\n\n  return ctx.pipes.current;\n}\n\nexport interface EnumToPipesResult {\n  isNullable: boolean;\n  pipe: Pipe;\n}\n\nexport function enumToPipes({\n  plugin,\n  schema,\n}: {\n  plugin: ValibotPlugin['Instance'];\n  schema: SchemaWithType<'enum'>;\n}): EnumToPipesResult {\n  const v = plugin.external('valibot.v');\n\n  const { enumMembers, isNullable } = itemsNode({\n    $,\n    nodes: { base: baseNode, items: itemsNode },\n    pipes: { ...pipes, current: [] },\n    plugin,\n    schema,\n    symbols: { v },\n  });\n\n  if (!enumMembers.length) {\n    return {\n      isNullable,\n      pipe: unknownToPipes({ plugin }),\n    };\n  }\n\n  const ctx: EnumResolverContext = {\n    $,\n    nodes: {\n      base: baseNode,\n      items: itemsNode,\n    },\n    pipes: {\n      ...pipes,\n      current: [],\n    },\n    plugin,\n    schema,\n    symbols: { v },\n  };\n\n  const resolver = plugin.config['~resolvers']?.enum;\n  const node = resolver?.(ctx) ?? enumResolver(ctx);\n\n  return {\n    isNullable,\n    pipe: ctx.pipes.toNode(node, plugin),\n  };\n}\n"
  },
  {
    "path": "packages/openapi-ts/src/plugins/valibot/v1/toAst/intersection.ts",
    "content": "import type { IR } from '@hey-api/shared';\n\nimport { $ } from '../../../../ts-dsl';\nimport type { IntersectionResolverContext } from '../../resolvers';\nimport type { PipeResult, Pipes } from '../../shared/pipes';\nimport { pipes, pipesToNode } from '../../shared/pipes';\nimport type { CompositeHandlerResult, ValibotFinal, ValibotResult } from '../../shared/types';\nimport type { ValibotPlugin } from '../../types';\nimport { identifiers } from '../constants';\n\nfunction baseNode(ctx: IntersectionResolverContext): PipeResult {\n  const { applyModifiers, childResults, plugin, symbols } = ctx;\n  const { v } = symbols;\n\n  if (childResults.length === 0) {\n    return $(v).attr(identifiers.schemas.any).call();\n  }\n\n  if (childResults.length === 1) {\n    const finalResult = applyModifiers!(childResults[0]!);\n    return finalResult.pipes;\n  }\n\n  const itemNodes = childResults.map((item) => pipesToNode(item.pipes, plugin));\n  return $(v)\n    .attr(identifiers.schemas.intersect)\n    .call($.array(...itemNodes));\n}\n\nfunction intersectionResolver(ctx: IntersectionResolverContext): Pipes {\n  const base = ctx.nodes.base(ctx);\n  if (base) {\n    ctx.pipes.push(ctx.pipes.current, base);\n  }\n  return ctx.pipes.current;\n}\n\nexport function intersectionToPipes(ctx: {\n  applyModifiers: (result: ValibotResult, options?: { optional?: boolean }) => ValibotFinal;\n  childResults: Array<ValibotResult>;\n  parentSchema: IR.SchemaObject;\n  plugin: ValibotPlugin['Instance'];\n}): CompositeHandlerResult {\n  const { applyModifiers, childResults, parentSchema, plugin } = ctx;\n\n  const resolverCtx: IntersectionResolverContext = {\n    $,\n    applyModifiers,\n    childResults,\n    nodes: {\n      base: baseNode,\n    },\n    parentSchema,\n    pipes: {\n      ...pipes,\n      current: [],\n    },\n    plugin,\n    schema: parentSchema,\n    symbols: {\n      v: plugin.external('valibot.v'),\n    },\n  };\n\n  const resolver = plugin.config['~resolvers']?.intersection;\n  const node = resolver?.(resolverCtx) ?? intersectionResolver(resolverCtx);\n\n  return {\n    childResults,\n    pipes: [resolverCtx.pipes.toNode(node, plugin)],\n  };\n}\n"
  },
  {
    "path": "packages/openapi-ts/src/plugins/valibot/v1/toAst/never.ts",
    "content": "import type { SchemaWithType } from '@hey-api/shared';\n\nimport { $ } from '../../../../ts-dsl';\nimport type { NeverResolverContext } from '../../resolvers';\nimport type { Pipe, PipeResult, Pipes } from '../../shared/pipes';\nimport { pipes } from '../../shared/pipes';\nimport type { ValibotPlugin } from '../../types';\nimport { identifiers } from '../constants';\n\nfunction baseNode(ctx: NeverResolverContext): PipeResult {\n  const { symbols } = ctx;\n  const { v } = symbols;\n  return $(v).attr(identifiers.schemas.never).call();\n}\n\nfunction neverResolver(ctx: NeverResolverContext): Pipes {\n  const base = ctx.nodes.base(ctx);\n  ctx.pipes.push(ctx.pipes.current, base);\n  return ctx.pipes.current;\n}\n\nexport function neverToPipes({\n  plugin,\n  schema,\n}: {\n  plugin: ValibotPlugin['Instance'];\n  schema: SchemaWithType<'never'>;\n}): Pipe {\n  const ctx: NeverResolverContext = {\n    $,\n    nodes: {\n      base: baseNode,\n    },\n    pipes: {\n      ...pipes,\n      current: [],\n    },\n    plugin,\n    schema,\n    symbols: {\n      v: plugin.external('valibot.v'),\n    },\n  };\n\n  const resolver = plugin.config['~resolvers']?.never;\n  const node = resolver?.(ctx) ?? neverResolver(ctx);\n  return ctx.pipes.toNode(node, plugin);\n}\n"
  },
  {
    "path": "packages/openapi-ts/src/plugins/valibot/v1/toAst/null.ts",
    "content": "import type { SchemaWithType } from '@hey-api/shared';\n\nimport { $ } from '../../../../ts-dsl';\nimport type { NullResolverContext } from '../../resolvers';\nimport type { Pipe, PipeResult, Pipes } from '../../shared/pipes';\nimport { pipes } from '../../shared/pipes';\nimport type { ValibotPlugin } from '../../types';\nimport { identifiers } from '../constants';\n\nfunction baseNode(ctx: NullResolverContext): PipeResult {\n  const { symbols } = ctx;\n  const { v } = symbols;\n  return $(v).attr(identifiers.schemas.null).call();\n}\n\nfunction nullResolver(ctx: NullResolverContext): Pipes {\n  const base = ctx.nodes.base(ctx);\n  ctx.pipes.push(ctx.pipes.current, base);\n  return ctx.pipes.current;\n}\n\nexport function nullToPipes({\n  plugin,\n  schema,\n}: {\n  plugin: ValibotPlugin['Instance'];\n  schema: SchemaWithType<'null'>;\n}): Pipe {\n  const ctx: NullResolverContext = {\n    $,\n    nodes: {\n      base: baseNode,\n    },\n    pipes: {\n      ...pipes,\n      current: [],\n    },\n    plugin,\n    schema,\n    symbols: {\n      v: plugin.external('valibot.v'),\n    },\n  };\n\n  const resolver = plugin.config['~resolvers']?.null;\n  const node = resolver?.(ctx) ?? nullResolver(ctx);\n  return ctx.pipes.toNode(node, plugin);\n}\n"
  },
  {
    "path": "packages/openapi-ts/src/plugins/valibot/v1/toAst/number.ts",
    "content": "import type { SchemaWithType } from '@hey-api/shared';\n\nimport { maybeBigInt, shouldCoerceToBigInt } from '../../../../plugins/shared/utils/coerce';\nimport { getIntegerLimit } from '../../../../plugins/shared/utils/formats';\nimport { $ } from '../../../../ts-dsl';\nimport type { NumberResolverContext } from '../../resolvers';\nimport type { Pipe, PipeResult, Pipes } from '../../shared/pipes';\nimport { pipes } from '../../shared/pipes';\nimport type { ValibotPlugin } from '../../types';\nimport { identifiers } from '../constants';\n\nfunction baseNode(ctx: NumberResolverContext): PipeResult {\n  const { schema, symbols } = ctx;\n  const { v } = symbols;\n\n  if (ctx.utils.shouldCoerceToBigInt(schema.format)) {\n    return [\n      $(v)\n        .attr(identifiers.schemas.union)\n        .call(\n          $.array(\n            $(v).attr(identifiers.schemas.number).call(),\n            $(v).attr(identifiers.schemas.string).call(),\n            $(v).attr(identifiers.schemas.bigInt).call(),\n          ),\n        ),\n      $(v)\n        .attr(identifiers.actions.transform)\n        .call($.func().param('x').do($('BigInt').call('x').return())),\n    ];\n  }\n\n  const result: Pipes = [];\n  result.push($(v).attr(identifiers.schemas.number).call());\n\n  if (schema.type === 'integer') {\n    result.push($(v).attr(identifiers.actions.integer).call());\n  }\n\n  return result;\n}\n\nfunction constNode(ctx: NumberResolverContext): PipeResult {\n  const { schema, symbols } = ctx;\n  const { v } = symbols;\n\n  if (schema.const === undefined) {\n    return;\n  }\n\n  return $(v)\n    .attr(identifiers.schemas.literal)\n    .call(ctx.utils.maybeBigInt(schema.const, schema.format));\n}\n\nfunction maxNode(ctx: NumberResolverContext): PipeResult {\n  const { schema, symbols } = ctx;\n  const { v } = symbols;\n\n  if (schema.exclusiveMaximum !== undefined) {\n    return $(v)\n      .attr(identifiers.actions.ltValue)\n      .call(ctx.utils.maybeBigInt(schema.exclusiveMaximum, schema.format));\n  }\n\n  if (schema.maximum !== undefined) {\n    return $(v)\n      .attr(identifiers.actions.maxValue)\n      .call(ctx.utils.maybeBigInt(schema.maximum, schema.format));\n  }\n\n  const limit = ctx.utils.getIntegerLimit(schema.format);\n  if (limit) {\n    return $(v)\n      .attr(identifiers.actions.maxValue)\n      .call(ctx.utils.maybeBigInt(limit.maxValue, schema.format), $.literal(limit.maxError));\n  }\n}\n\nfunction minNode(ctx: NumberResolverContext): PipeResult {\n  const { schema, symbols } = ctx;\n  const { v } = symbols;\n\n  if (schema.exclusiveMinimum !== undefined) {\n    return $(v)\n      .attr(identifiers.actions.gtValue)\n      .call(ctx.utils.maybeBigInt(schema.exclusiveMinimum, schema.format));\n  }\n\n  if (schema.minimum !== undefined) {\n    return $(v)\n      .attr(identifiers.actions.minValue)\n      .call(ctx.utils.maybeBigInt(schema.minimum, schema.format));\n  }\n\n  const limit = ctx.utils.getIntegerLimit(schema.format);\n  if (limit) {\n    return $(v)\n      .attr(identifiers.actions.minValue)\n      .call(ctx.utils.maybeBigInt(limit.minValue, schema.format), $.literal(limit.minError));\n  }\n}\n\nfunction numberResolver(ctx: NumberResolverContext): Pipes {\n  const constResult = ctx.nodes.const(ctx);\n  if (constResult) {\n    return ctx.pipes.push(ctx.pipes.current, constResult);\n  }\n\n  const baseResult = ctx.nodes.base(ctx);\n  if (baseResult) {\n    ctx.pipes.push(ctx.pipes.current, baseResult);\n  }\n\n  const minResult = ctx.nodes.min(ctx);\n  if (minResult) {\n    ctx.pipes.push(ctx.pipes.current, minResult);\n  }\n\n  const maxResult = ctx.nodes.max(ctx);\n  if (maxResult) {\n    ctx.pipes.push(ctx.pipes.current, maxResult);\n  }\n\n  return ctx.pipes.current;\n}\n\nexport function numberToPipes({\n  plugin,\n  schema,\n}: {\n  plugin: ValibotPlugin['Instance'];\n  schema: SchemaWithType<'integer' | 'number'>;\n}): Pipe {\n  const ctx: NumberResolverContext = {\n    $,\n    nodes: {\n      base: baseNode,\n      const: constNode,\n      max: maxNode,\n      min: minNode,\n    },\n    pipes: {\n      ...pipes,\n      current: [],\n    },\n    plugin,\n    schema,\n    symbols: {\n      v: plugin.external('valibot.v'),\n    },\n    utils: {\n      getIntegerLimit,\n      maybeBigInt,\n      shouldCoerceToBigInt,\n    },\n  };\n\n  const resolver = plugin.config['~resolvers']?.number;\n  const node = resolver?.(ctx) ?? numberResolver(ctx);\n  return ctx.pipes.toNode(node, plugin);\n}\n"
  },
  {
    "path": "packages/openapi-ts/src/plugins/valibot/v1/toAst/object.ts",
    "content": "import { childContext } from '@hey-api/shared';\n\nimport { $ } from '../../../../ts-dsl';\nimport type { ObjectResolverContext } from '../../resolvers';\nimport type { Pipe, Pipes } from '../../shared/pipes';\nimport { pipes } from '../../shared/pipes';\nimport type { CompositeHandlerResult, ValibotResult } from '../../shared/types';\nimport { identifiers } from '../constants';\n\nfunction additionalPropertiesNode(ctx: ObjectResolverContext): Pipe | null | undefined {\n  const { pipes, schema } = ctx;\n\n  if (!schema.additionalProperties || !schema.additionalProperties.type) return;\n  if (schema.additionalProperties.type === 'never') return null;\n\n  const additionalResult = ctx.walk(\n    schema.additionalProperties,\n    childContext(ctx.walkerCtx, 'additionalProperties'),\n  );\n  ctx._childResults.push(additionalResult);\n\n  return pipes.toNode(additionalResult.pipes, ctx.plugin);\n}\n\nfunction baseNode(ctx: ObjectResolverContext): Pipes | Pipe {\n  const { v } = ctx.symbols;\n\n  const additional = ctx.nodes.additionalProperties(ctx);\n  const shape = ctx.nodes.shape(ctx);\n\n  if (additional === null) {\n    return $(v).attr(identifiers.schemas.strictObject).call(shape);\n  }\n\n  if (additional) {\n    if (shape.isEmpty) {\n      return $(v)\n        .attr(identifiers.schemas.record)\n        .call($(v).attr(identifiers.schemas.string).call(), additional);\n    }\n\n    return $(v).attr(identifiers.schemas.objectWithRest).call(shape, additional);\n  }\n\n  return $(v).attr(identifiers.schemas.object).call(shape);\n}\n\nfunction objectResolver(ctx: ObjectResolverContext): Pipes | Pipe {\n  // TODO: parser - handle constants\n  return ctx.nodes.base(ctx);\n}\n\nfunction shapeNode(ctx: ObjectResolverContext): ReturnType<typeof $.object> {\n  const { pipes, schema } = ctx;\n  const shape = $.object().pretty();\n\n  for (const name in schema.properties) {\n    const property = schema.properties[name]!;\n    const isOptional = !schema.required?.includes(name);\n\n    const propertyResult = ctx.walk(property, childContext(ctx.walkerCtx, 'properties', name));\n    ctx._childResults.push(propertyResult);\n\n    const finalExpr = ctx.applyModifiers(propertyResult, { optional: isOptional });\n    shape.prop(name, pipes.toNode(finalExpr.pipes, ctx.plugin));\n  }\n\n  return shape;\n}\n\nexport function objectToPipes(\n  ctx: Pick<ObjectResolverContext, 'applyModifiers' | 'plugin' | 'schema' | 'walk' | 'walkerCtx'>,\n): CompositeHandlerResult {\n  const { applyModifiers, plugin, schema, walk, walkerCtx } = ctx;\n\n  const childResults: Array<ValibotResult> = [];\n\n  const resolverCtx: ObjectResolverContext = {\n    $,\n    _childResults: childResults,\n    applyModifiers,\n    nodes: {\n      additionalProperties: additionalPropertiesNode,\n      base: baseNode,\n      shape: shapeNode,\n    },\n    pipes: {\n      ...pipes,\n      current: [],\n    },\n    plugin,\n    schema,\n    symbols: {\n      v: plugin.external('valibot.v'),\n    },\n    walk,\n    walkerCtx,\n  };\n\n  const resolver = plugin.config['~resolvers']?.object;\n  const node = resolver?.(resolverCtx) ?? objectResolver(resolverCtx);\n\n  return {\n    childResults,\n    pipes: [resolverCtx.pipes.toNode(node, plugin)],\n  };\n}\n"
  },
  {
    "path": "packages/openapi-ts/src/plugins/valibot/v1/toAst/string.ts",
    "content": "import type { SchemaWithType } from '@hey-api/shared';\n\nimport { shouldCoerceToBigInt } from '../../../../plugins/shared/utils/coerce';\nimport { $ } from '../../../../ts-dsl';\nimport type { StringResolverContext } from '../../resolvers';\nimport type { Pipe, PipeResult, Pipes } from '../../shared/pipes';\nimport { pipes } from '../../shared/pipes';\nimport type { ValibotPlugin } from '../../types';\nimport { identifiers } from '../constants';\nimport { numberToPipes } from './number';\n\nfunction baseNode(ctx: StringResolverContext): PipeResult {\n  const { v } = ctx.symbols;\n  return $(v).attr(identifiers.schemas.string).call();\n}\n\nfunction constNode(ctx: StringResolverContext): PipeResult {\n  const { schema, symbols } = ctx;\n  const { v } = symbols;\n  if (typeof schema.const !== 'string') return;\n  return $(v).attr(identifiers.schemas.literal).call($.literal(schema.const));\n}\n\nfunction formatNode(ctx: StringResolverContext): PipeResult {\n  const { schema, symbols } = ctx;\n  const { v } = symbols;\n  switch (schema.format) {\n    case 'date':\n      return $(v).attr(identifiers.actions.isoDate).call();\n    case 'date-time':\n      return $(v).attr(identifiers.actions.isoTimestamp).call();\n    case 'email':\n      return $(v).attr(identifiers.actions.email).call();\n    case 'ipv4':\n    case 'ipv6':\n      return $(v).attr(identifiers.actions.ip).call();\n    case 'time':\n      return $(v).attr(identifiers.actions.isoTimeSecond).call();\n    case 'uri':\n      return $(v).attr(identifiers.actions.url).call();\n    case 'uuid':\n      return $(v).attr(identifiers.actions.uuid).call();\n  }\n}\n\nfunction lengthNode(ctx: StringResolverContext): PipeResult {\n  const { schema, symbols } = ctx;\n  const { v } = symbols;\n  if (schema.minLength === undefined || schema.minLength !== schema.maxLength) return;\n  return $(v).attr(identifiers.actions.length).call($.literal(schema.minLength));\n}\n\nfunction maxLengthNode(ctx: StringResolverContext): PipeResult {\n  const { schema, symbols } = ctx;\n  const { v } = symbols;\n  if (schema.maxLength === undefined) return;\n  return $(v).attr(identifiers.actions.maxLength).call($.literal(schema.maxLength));\n}\n\nfunction minLengthNode(ctx: StringResolverContext): PipeResult {\n  const { schema, symbols } = ctx;\n  const { v } = symbols;\n  if (schema.minLength === undefined) return;\n  return $(v).attr(identifiers.actions.minLength).call($.literal(schema.minLength));\n}\n\nfunction patternNode(ctx: StringResolverContext): PipeResult {\n  const { schema, symbols } = ctx;\n  const { v } = symbols;\n  if (!schema.pattern) return;\n  const flags = /\\\\[pP]\\{/.test(schema.pattern) ? 'u' : undefined;\n  return $(v).attr(identifiers.actions.regex).call($.regexp(schema.pattern, flags));\n}\n\nfunction stringResolver(ctx: StringResolverContext): Pipes {\n  const constNode = ctx.nodes.const(ctx);\n  if (constNode) return ctx.pipes.push(ctx.pipes.current, constNode);\n\n  const baseNode = ctx.nodes.base(ctx);\n  if (baseNode) ctx.pipes.push(ctx.pipes.current, baseNode);\n\n  const formatNode = ctx.nodes.format(ctx);\n  if (formatNode) ctx.pipes.push(ctx.pipes.current, formatNode);\n\n  const lengthNode = ctx.nodes.length(ctx);\n  if (lengthNode) {\n    ctx.pipes.push(ctx.pipes.current, lengthNode);\n  } else {\n    const minLengthNode = ctx.nodes.minLength(ctx);\n    if (minLengthNode) ctx.pipes.push(ctx.pipes.current, minLengthNode);\n\n    const maxLengthNode = ctx.nodes.maxLength(ctx);\n    if (maxLengthNode) ctx.pipes.push(ctx.pipes.current, maxLengthNode);\n  }\n\n  const patternNode = ctx.nodes.pattern(ctx);\n  if (patternNode) ctx.pipes.push(ctx.pipes.current, patternNode);\n\n  return ctx.pipes.current;\n}\n\nexport function stringToPipes({\n  plugin,\n  schema,\n}: {\n  plugin: ValibotPlugin['Instance'];\n  schema: SchemaWithType<'string'>;\n}): Pipe {\n  if (shouldCoerceToBigInt(schema.format)) {\n    return numberToPipes({\n      plugin,\n      schema: { ...schema, type: 'number' },\n    });\n  }\n\n  const ctx: StringResolverContext = {\n    $,\n    nodes: {\n      base: baseNode,\n      const: constNode,\n      format: formatNode,\n      length: lengthNode,\n      maxLength: maxLengthNode,\n      minLength: minLengthNode,\n      pattern: patternNode,\n    },\n    pipes: {\n      ...pipes,\n      current: [],\n    },\n    plugin,\n    schema,\n    symbols: {\n      v: plugin.external('valibot.v'),\n    },\n  };\n\n  const resolver = plugin.config['~resolvers']?.string;\n  const node = resolver?.(ctx) ?? stringResolver(ctx);\n  return ctx.pipes.toNode(node, plugin);\n}\n"
  },
  {
    "path": "packages/openapi-ts/src/plugins/valibot/v1/toAst/tuple.ts",
    "content": "import type { SchemaVisitorContext, SchemaWithType, Walker } from '@hey-api/shared';\nimport { childContext } from '@hey-api/shared';\n\nimport { $ } from '../../../../ts-dsl';\nimport type { TupleResolverContext } from '../../resolvers';\nimport type { PipeResult, Pipes } from '../../shared/pipes';\nimport { pipes } from '../../shared/pipes';\nimport type { CompositeHandlerResult, ValibotFinal, ValibotResult } from '../../shared/types';\nimport type { ValibotPlugin } from '../../types';\nimport { identifiers } from '../constants';\nimport { unknownToPipes } from './unknown';\n\ninterface TupleToPipesContext {\n  applyModifiers: (result: ValibotResult, options?: { optional?: boolean }) => ValibotFinal;\n  plugin: ValibotPlugin['Instance'];\n  schema: SchemaWithType<'tuple'>;\n  walk: Walker<ValibotResult, ValibotPlugin['Instance']>;\n  walkerCtx: SchemaVisitorContext<ValibotPlugin['Instance']>;\n}\n\nfunction baseNode(ctx: TupleResolverContext): PipeResult {\n  const { applyModifiers, pipes, plugin, schema, symbols, walk, walkerCtx } = ctx;\n\n  if (!schema.items) {\n    return unknownToPipes({ plugin });\n  }\n\n  const { v } = symbols;\n  const childResults: Array<ValibotResult> = [];\n\n  for (let i = 0; i < schema.items.length; i++) {\n    const item = schema.items[i]!;\n    const result = walk!(item, childContext(walkerCtx!, 'items', i));\n    childResults.push(result);\n  }\n\n  const tupleElements = childResults.map((r) => pipes.toNode(applyModifiers!(r).pipes, plugin));\n\n  return $(v)\n    .attr(identifiers.schemas.tuple)\n    .call($.array(...tupleElements));\n}\n\nfunction constNode(ctx: TupleResolverContext): PipeResult {\n  const { schema, symbols } = ctx;\n  const { v } = symbols;\n\n  if (!schema.const || !Array.isArray(schema.const)) return;\n\n  const tupleElements = schema.const.map((value) =>\n    $(v).attr(identifiers.schemas.literal).call($.fromValue(value)),\n  );\n\n  return $(v)\n    .attr(identifiers.schemas.tuple)\n    .call($.array(...tupleElements));\n}\n\nfunction tupleResolver(ctx: TupleResolverContext): Pipes {\n  const constResult = ctx.nodes.const(ctx);\n  if (constResult) {\n    return ctx.pipes.push(ctx.pipes.current, constResult);\n  }\n\n  const baseResult = ctx.nodes.base(ctx);\n  if (baseResult) {\n    ctx.pipes.push(ctx.pipes.current, baseResult);\n  }\n\n  return ctx.pipes.current;\n}\n\nexport function tupleToPipes(ctx: TupleToPipesContext): CompositeHandlerResult {\n  const { plugin, schema, walk, walkerCtx } = ctx;\n  const childResults: Array<ValibotResult> = [];\n\n  if (schema.items) {\n    for (let i = 0; i < schema.items.length; i++) {\n      const item = schema.items[i]!;\n      const result = walk(item, childContext(walkerCtx, 'items', i));\n      childResults.push(result);\n    }\n  }\n\n  const resolverCtx: TupleResolverContext = {\n    $,\n    applyModifiers: ctx.applyModifiers,\n    nodes: {\n      base: baseNode,\n      const: constNode,\n    },\n    pipes: {\n      ...pipes,\n      current: [],\n    },\n    plugin,\n    schema,\n    symbols: {\n      v: plugin.external('valibot.v'),\n    },\n    walk,\n    walkerCtx,\n  };\n\n  const resolver = plugin.config['~resolvers']?.tuple;\n  const node = resolver?.(resolverCtx) ?? tupleResolver(resolverCtx);\n\n  return {\n    childResults,\n    pipes: [resolverCtx.pipes.toNode(node, plugin)],\n  };\n}\n"
  },
  {
    "path": "packages/openapi-ts/src/plugins/valibot/v1/toAst/undefined.ts",
    "content": "import type { SchemaWithType } from '@hey-api/shared';\n\nimport { $ } from '../../../../ts-dsl';\nimport type { UndefinedResolverContext } from '../../resolvers';\nimport type { Pipe, PipeResult, Pipes } from '../../shared/pipes';\nimport { pipes } from '../../shared/pipes';\nimport type { ValibotPlugin } from '../../types';\nimport { identifiers } from '../constants';\n\nfunction baseNode(ctx: UndefinedResolverContext): PipeResult {\n  const { symbols } = ctx;\n  const { v } = symbols;\n  return $(v).attr(identifiers.schemas.undefined).call();\n}\n\nfunction undefinedResolver(ctx: UndefinedResolverContext): Pipes {\n  const base = ctx.nodes.base(ctx);\n  ctx.pipes.push(ctx.pipes.current, base);\n  return ctx.pipes.current;\n}\n\nexport function undefinedToPipes({\n  plugin,\n  schema,\n}: {\n  plugin: ValibotPlugin['Instance'];\n  schema: SchemaWithType<'undefined'>;\n}): Pipe {\n  const ctx: UndefinedResolverContext = {\n    $,\n    nodes: {\n      base: baseNode,\n    },\n    pipes: {\n      ...pipes,\n      current: [],\n    },\n    plugin,\n    schema,\n    symbols: {\n      v: plugin.external('valibot.v'),\n    },\n  };\n\n  const resolver = plugin.config['~resolvers']?.undefined;\n  const node = resolver?.(ctx) ?? undefinedResolver(ctx);\n  return ctx.pipes.toNode(node, plugin);\n}\n"
  },
  {
    "path": "packages/openapi-ts/src/plugins/valibot/v1/toAst/union.ts",
    "content": "import type { IR } from '@hey-api/shared';\n\nimport { $ } from '../../../../ts-dsl';\nimport type { UnionResolverContext } from '../../resolvers';\nimport type { PipeResult, Pipes } from '../../shared/pipes';\nimport { pipes, pipesToNode } from '../../shared/pipes';\nimport type { CompositeHandlerResult, ValibotFinal, ValibotResult } from '../../shared/types';\nimport type { ValibotPlugin } from '../../types';\nimport { identifiers } from '../constants';\n\nfunction baseNode(ctx: UnionResolverContext): PipeResult {\n  const { childResults, plugin, schemas, symbols } = ctx;\n  const { v } = symbols;\n\n  const nonNullItems: Array<ValibotResult> = [];\n  childResults.forEach((item, index) => {\n    const schema = schemas[index]!;\n    if (schema.type !== 'null' && schema.const !== null) {\n      nonNullItems.push(item);\n    }\n  });\n\n  if (nonNullItems.length === 0) {\n    return $(v).attr(identifiers.schemas.null).call();\n  }\n\n  if (nonNullItems.length === 1) {\n    return nonNullItems[0]!.pipes;\n  }\n\n  const itemNodes = nonNullItems.map((i) => pipesToNode(i.pipes, plugin));\n  return $(v)\n    .attr(identifiers.schemas.union)\n    .call($.array(...itemNodes));\n}\n\nfunction unionResolver(ctx: UnionResolverContext): Pipes {\n  const base = ctx.nodes.base(ctx);\n  if (base) {\n    ctx.pipes.push(ctx.pipes.current, base);\n  }\n  return ctx.pipes.current;\n}\n\nexport function unionToPipes(ctx: {\n  applyModifiers: (result: ValibotResult, options?: { optional?: boolean }) => ValibotFinal;\n  childResults: Array<ValibotResult>;\n  parentSchema: IR.SchemaObject;\n  plugin: ValibotPlugin['Instance'];\n  schemas: ReadonlyArray<IR.SchemaObject>;\n}): CompositeHandlerResult {\n  const { applyModifiers, childResults, parentSchema, plugin, schemas } = ctx;\n\n  const resolverCtx: UnionResolverContext = {\n    $,\n    applyModifiers,\n    childResults,\n    nodes: {\n      base: baseNode,\n    },\n    parentSchema,\n    pipes: {\n      ...pipes,\n      current: [],\n    },\n    plugin,\n    schema: parentSchema,\n    schemas,\n    symbols: {\n      v: plugin.external('valibot.v'),\n    },\n  };\n\n  const resolver = plugin.config['~resolvers']?.union;\n  const node = resolver?.(resolverCtx) ?? unionResolver(resolverCtx);\n\n  return {\n    childResults,\n    pipes: [resolverCtx.pipes.toNode(node, plugin)],\n  };\n}\n"
  },
  {
    "path": "packages/openapi-ts/src/plugins/valibot/v1/toAst/unknown.ts",
    "content": "import type { SchemaWithType } from '@hey-api/shared';\n\nimport { $ } from '../../../../ts-dsl';\nimport type { UnknownResolverContext } from '../../resolvers';\nimport type { Pipe, PipeResult, Pipes } from '../../shared/pipes';\nimport { pipes } from '../../shared/pipes';\nimport type { ValibotPlugin } from '../../types';\nimport { identifiers } from '../constants';\n\nfunction baseNode(ctx: UnknownResolverContext): PipeResult {\n  const { symbols } = ctx;\n  const { v } = symbols;\n  return $(v).attr(identifiers.schemas.unknown).call();\n}\n\nfunction unknownResolver(ctx: UnknownResolverContext): Pipes {\n  const base = ctx.nodes.base(ctx);\n  ctx.pipes.push(ctx.pipes.current, base);\n  return ctx.pipes.current;\n}\n\nexport function unknownToPipes({\n  plugin,\n  schema,\n}: {\n  plugin: ValibotPlugin['Instance'];\n  schema?: SchemaWithType<'unknown'>;\n}): Pipe {\n  const ctx: UnknownResolverContext = {\n    $,\n    nodes: {\n      base: baseNode,\n    },\n    pipes: {\n      ...pipes,\n      current: [],\n    },\n    plugin,\n    schema: schema ?? { type: 'unknown' },\n    symbols: {\n      v: plugin.external('valibot.v'),\n    },\n  };\n\n  const resolver = plugin.config['~resolvers']?.unknown;\n  const node = resolver?.(ctx) ?? unknownResolver(ctx);\n  return ctx.pipes.toNode(node, plugin);\n}\n"
  },
  {
    "path": "packages/openapi-ts/src/plugins/valibot/v1/toAst/void.ts",
    "content": "import type { SchemaWithType } from '@hey-api/shared';\n\nimport { $ } from '../../../../ts-dsl';\nimport type { VoidResolverContext } from '../../resolvers';\nimport type { Pipe, PipeResult, Pipes } from '../../shared/pipes';\nimport { pipes } from '../../shared/pipes';\nimport type { ValibotPlugin } from '../../types';\nimport { identifiers } from '../constants';\n\nfunction baseNode(ctx: VoidResolverContext): PipeResult {\n  const { symbols } = ctx;\n  const { v } = symbols;\n  return $(v).attr(identifiers.schemas.void).call();\n}\n\nfunction voidResolver(ctx: VoidResolverContext): Pipes {\n  const base = ctx.nodes.base(ctx);\n  ctx.pipes.push(ctx.pipes.current, base);\n  return ctx.pipes.current;\n}\n\nexport function voidToPipes({\n  plugin,\n  schema,\n}: {\n  plugin: ValibotPlugin['Instance'];\n  schema: SchemaWithType<'void'>;\n}): Pipe {\n  const ctx: VoidResolverContext = {\n    $,\n    nodes: {\n      base: baseNode,\n    },\n    pipes: {\n      ...pipes,\n      current: [],\n    },\n    plugin,\n    schema,\n    symbols: {\n      v: plugin.external('valibot.v'),\n    },\n  };\n\n  const resolver = plugin.config['~resolvers']?.void;\n  const node = resolver?.(ctx) ?? voidResolver(ctx);\n  return ctx.pipes.toNode(node, plugin);\n}\n"
  },
  {
    "path": "packages/openapi-ts/src/plugins/valibot/v1/walker.ts",
    "content": "import type { SymbolMeta } from '@hey-api/codegen-core';\nimport { fromRef } from '@hey-api/codegen-core';\nimport type { SchemaExtractor, SchemaVisitor } from '@hey-api/shared';\nimport { pathToJsonPointer } from '@hey-api/shared';\n\nimport { $ } from '../../../ts-dsl';\nimport { maybeBigInt } from '../../shared/utils/coerce';\nimport { composeMeta, defaultMeta, inheritMeta } from '../shared/meta';\nimport type { Pipes } from '../shared/pipes';\nimport { pipesToNode } from '../shared/pipes';\nimport type { ProcessorContext } from '../shared/processor';\nimport type { ValibotFinal, ValibotMeta, ValibotResult } from '../shared/types';\nimport type { ValibotPlugin } from '../types';\nimport { identifiers } from './constants';\nimport { arrayToPipes } from './toAst/array';\nimport { booleanToPipes } from './toAst/boolean';\nimport { enumToPipes } from './toAst/enum';\nimport { intersectionToPipes } from './toAst/intersection';\nimport { neverToPipes } from './toAst/never';\nimport { nullToPipes } from './toAst/null';\nimport { numberToPipes } from './toAst/number';\nimport { objectToPipes } from './toAst/object';\nimport { stringToPipes } from './toAst/string';\nimport { tupleToPipes } from './toAst/tuple';\nimport { undefinedToPipes } from './toAst/undefined';\nimport { unionToPipes } from './toAst/union';\nimport { unknownToPipes } from './toAst/unknown';\nimport { voidToPipes } from './toAst/void';\n\nexport interface VisitorConfig {\n  /** Optional schema extractor function. */\n  schemaExtractor?: SchemaExtractor<ProcessorContext>;\n}\n\nfunction getDefaultValue(meta: ValibotMeta): ReturnType<typeof $.fromValue> {\n  return meta.format ? maybeBigInt(meta.default, meta.format) : $.fromValue(meta.default);\n}\n\nexport function createVisitor(\n  config: VisitorConfig,\n): SchemaVisitor<ValibotResult, ValibotPlugin['Instance']> {\n  const { schemaExtractor } = config;\n\n  return {\n    applyModifiers(result, ctx, options = {}): ValibotFinal {\n      const { optional } = options;\n      const v = ctx.plugin.external('valibot.v');\n      const pipes: Pipes = [...result.pipes];\n\n      if (result.meta.readonly) {\n        pipes.push($(v).attr(identifiers.actions.readonly).call());\n      }\n\n      const hasDefault = result.meta.default !== undefined;\n      const needsOptional = optional || hasDefault;\n      const needsNullable = result.meta.nullable;\n      const innerNode = pipesToNode(pipes, ctx.plugin);\n\n      let finalPipes: Pipes;\n\n      if (needsOptional && needsNullable) {\n        if (hasDefault) {\n          finalPipes = [\n            $(v).attr(identifiers.schemas.nullish).call(innerNode, getDefaultValue(result.meta)),\n          ];\n        } else {\n          finalPipes = [$(v).attr(identifiers.schemas.nullish).call(innerNode)];\n        }\n      } else if (needsOptional) {\n        if (hasDefault) {\n          finalPipes = [\n            $(v).attr(identifiers.schemas.optional).call(innerNode, getDefaultValue(result.meta)),\n          ];\n        } else {\n          finalPipes = [$(v).attr(identifiers.schemas.optional).call(innerNode)];\n        }\n      } else if (needsNullable) {\n        finalPipes = [$(v).attr(identifiers.schemas.nullable).call(innerNode)];\n      } else {\n        finalPipes = pipes;\n      }\n\n      return {\n        pipes: finalPipes,\n        typeName: result.meta.hasLazy ? identifiers.types.GenericSchema : undefined,\n      };\n    },\n    array(schema, ctx, walk) {\n      const applyModifiers: Parameters<typeof arrayToPipes>[0]['applyModifiers'] = (result, opts) =>\n        this.applyModifiers(result, ctx, opts) as ValibotFinal;\n\n      const { childResults, pipes } = arrayToPipes({\n        applyModifiers,\n        plugin: ctx.plugin,\n        schema,\n        walk,\n        walkerCtx: ctx,\n      });\n\n      return {\n        meta: inheritMeta(schema, childResults),\n        pipes,\n      };\n    },\n    boolean(schema, ctx) {\n      const pipe = booleanToPipes({ plugin: ctx.plugin, schema });\n      return {\n        meta: defaultMeta(schema),\n        pipes: [pipe],\n      };\n    },\n    enum(schema, ctx) {\n      const { isNullable, pipe } = enumToPipes({ plugin: ctx.plugin, schema });\n      return {\n        meta: {\n          ...defaultMeta(schema),\n          nullable: isNullable,\n        },\n        pipes: [pipe],\n      };\n    },\n    integer(schema, ctx) {\n      const pipe = numberToPipes({ plugin: ctx.plugin, schema });\n      return {\n        meta: defaultMeta(schema),\n        pipes: [pipe],\n      };\n    },\n    intercept(schema, ctx, walk) {\n      if (schemaExtractor && !schema.$ref) {\n        const extracted = schemaExtractor({\n          meta: {\n            resource: 'definition',\n            resourceId: pathToJsonPointer(fromRef(ctx.path)),\n          },\n          naming: ctx.plugin.config.definitions,\n          path: fromRef(ctx.path),\n          plugin: ctx.plugin,\n          schema,\n        });\n\n        if (extracted !== schema) {\n          return walk(extracted, ctx);\n        }\n      }\n    },\n    intersection(items, schemas, parentSchema, ctx) {\n      const applyModifiers: Parameters<typeof intersectionToPipes>[0]['applyModifiers'] = (\n        result,\n        opts,\n      ) => this.applyModifiers(result, ctx, opts) as ValibotFinal;\n\n      const { pipes } = intersectionToPipes({\n        applyModifiers,\n        childResults: items,\n        parentSchema,\n        plugin: ctx.plugin,\n      });\n\n      return {\n        meta: composeMeta(items, { default: parentSchema.default }),\n        pipes,\n      };\n    },\n    never(schema, ctx) {\n      const pipe = neverToPipes({ plugin: ctx.plugin, schema });\n      return {\n        meta: {\n          ...defaultMeta(schema),\n          nullable: false,\n          readonly: false,\n        },\n        pipes: [pipe],\n      };\n    },\n    null(schema, ctx) {\n      const pipe = nullToPipes({ plugin: ctx.plugin, schema });\n      return {\n        meta: {\n          ...defaultMeta(schema),\n          nullable: false,\n          readonly: false,\n        },\n        pipes: [pipe],\n      };\n    },\n    number(schema, ctx) {\n      const pipe = numberToPipes({ plugin: ctx.plugin, schema });\n      return {\n        meta: defaultMeta(schema),\n        pipes: [pipe],\n      };\n    },\n    object(schema, ctx, walk) {\n      const applyModifiers: Parameters<typeof objectToPipes>[0]['applyModifiers'] = (\n        result,\n        opts,\n      ) => this.applyModifiers(result, ctx, opts) as ValibotFinal;\n\n      const { childResults, pipes } = objectToPipes({\n        applyModifiers,\n        plugin: ctx.plugin,\n        schema,\n        walk,\n        walkerCtx: ctx,\n      });\n\n      return {\n        meta: inheritMeta(schema, childResults),\n        pipes,\n      };\n    },\n    postProcess(result, schema, ctx) {\n      const metadata = ctx.plugin.config.metadata;\n      if (!metadata) {\n        return result;\n      }\n      const node = $.object();\n      if (typeof metadata === 'function') {\n        metadata({ $, node, schema });\n      } else if (schema.description) {\n        node.prop('description', $.literal(schema.description));\n      }\n      if (node.isEmpty) {\n        return result;\n      }\n      const v = ctx.plugin.external('valibot.v');\n      const metadataExpr = $(v).attr(identifiers.actions.metadata).call(node);\n\n      return {\n        meta: result.meta,\n        pipes: [...result.pipes, metadataExpr],\n      };\n    },\n    reference($ref, schema, ctx) {\n      const v = ctx.plugin.external('valibot.v');\n      const query: SymbolMeta = {\n        category: 'schema',\n        resource: 'definition',\n        resourceId: $ref,\n        tool: 'valibot',\n      };\n\n      const refSymbol = ctx.plugin.referenceSymbol(query);\n      const isRegistered = ctx.plugin.isSymbolRegistered(query);\n\n      if (isRegistered) {\n        return {\n          meta: defaultMeta(schema),\n          pipes: [$(refSymbol)],\n        };\n      }\n\n      return {\n        meta: {\n          ...defaultMeta(schema),\n          hasLazy: true,\n        },\n        pipes: [\n          $(v)\n            .attr(identifiers.schemas.lazy)\n            .call($.func().do($(refSymbol).return())),\n        ],\n      };\n    },\n    string(schema, ctx) {\n      const pipe = stringToPipes({ plugin: ctx.plugin, schema });\n      return {\n        meta: defaultMeta(schema),\n        pipes: [pipe],\n      };\n    },\n    tuple(schema, ctx, walk) {\n      const applyModifiers: Parameters<typeof tupleToPipes>[0]['applyModifiers'] = (result, opts) =>\n        this.applyModifiers(result, ctx, opts) as ValibotFinal;\n\n      const { childResults, pipes } = tupleToPipes({\n        applyModifiers,\n        plugin: ctx.plugin,\n        schema,\n        walk,\n        walkerCtx: ctx,\n      });\n\n      return {\n        meta: inheritMeta(schema, childResults),\n        pipes,\n      };\n    },\n    undefined(schema, ctx) {\n      const pipe = undefinedToPipes({ plugin: ctx.plugin, schema });\n      return {\n        meta: {\n          ...defaultMeta(schema),\n          nullable: false,\n          readonly: false,\n        },\n        pipes: [pipe],\n      };\n    },\n    union(items, schemas, parentSchema, ctx) {\n      const applyModifiers: Parameters<typeof unionToPipes>[0]['applyModifiers'] = (result, opts) =>\n        this.applyModifiers(result, ctx, opts) as ValibotFinal;\n\n      const hasNull = schemas.some((s) => s.type === 'null') || items.some((i) => i.meta.nullable);\n\n      const { pipes } = unionToPipes({\n        applyModifiers,\n        childResults: items,\n        parentSchema,\n        plugin: ctx.plugin,\n        schemas,\n      });\n\n      return {\n        meta: composeMeta(items, {\n          default: parentSchema.default,\n          nullable: hasNull,\n        }),\n        pipes,\n      };\n    },\n    unknown(schema, ctx) {\n      const pipe = unknownToPipes({ plugin: ctx.plugin });\n      return {\n        meta: {\n          ...defaultMeta(schema),\n          nullable: false,\n          readonly: false,\n        },\n        pipes: [pipe],\n      };\n    },\n    void(schema, ctx) {\n      const pipe = voidToPipes({ plugin: ctx.plugin, schema });\n      return {\n        meta: {\n          ...defaultMeta(schema),\n          nullable: false,\n          readonly: false,\n        },\n        pipes: [pipe],\n      };\n    },\n  };\n}\n"
  },
  {
    "path": "packages/openapi-ts/src/plugins/zod/api.ts",
    "content": "import type { $ } from '../../ts-dsl';\nimport { createRequestValidatorMini, createResponseValidatorMini } from './mini/api';\nimport type { ValidatorArgs } from './shared/types';\nimport { createRequestValidatorV3, createResponseValidatorV3 } from './v3/api';\nimport { createRequestValidatorV4, createResponseValidatorV4 } from './v4/api';\n\nexport type IApi = {\n  createRequestValidator: (args: ValidatorArgs) => ReturnType<typeof $.func> | undefined;\n  createResponseValidator: (args: ValidatorArgs) => ReturnType<typeof $.func> | undefined;\n};\n\nexport class Api implements IApi {\n  createRequestValidator(args: ValidatorArgs): ReturnType<typeof $.func> | undefined {\n    const { plugin } = args;\n    switch (plugin.config.compatibilityVersion) {\n      case 3:\n        return createRequestValidatorV3(args);\n      case 'mini':\n        return createRequestValidatorMini(args);\n      case 4:\n      default:\n        return createRequestValidatorV4(args);\n    }\n  }\n\n  createResponseValidator(args: ValidatorArgs): ReturnType<typeof $.func> | undefined {\n    const { plugin } = args;\n    switch (plugin.config.compatibilityVersion) {\n      case 3:\n        return createResponseValidatorV3(args);\n      case 'mini':\n        return createResponseValidatorMini(args);\n      case 4:\n      default:\n        return createResponseValidatorV4(args);\n    }\n  }\n}\n"
  },
  {
    "path": "packages/openapi-ts/src/plugins/zod/config.ts",
    "content": "import { definePluginConfig, mappers } from '@hey-api/shared';\nimport colors from 'ansi-colors';\n\nimport { Api } from './api';\nimport { handler } from './plugin';\nimport type { ZodPlugin } from './types';\n\ntype CompatibilityVersion = NonNullable<ZodPlugin['Config']['config']['compatibilityVersion']>;\n\nexport const defaultConfig: ZodPlugin['Config'] = {\n  api: new Api(),\n  config: {\n    case: 'camelCase',\n    comments: true,\n    includeInEntry: false,\n    metadata: false,\n  },\n  handler,\n  name: 'zod',\n  resolveConfig: (plugin, context) => {\n    const packageName = 'zod';\n    const version = context.package.getVersion(packageName);\n\n    const inferCompatibleVersion = (): CompatibilityVersion => {\n      if (version && (version.major === 4 || version.major === 3)) {\n        return version.major;\n      }\n\n      // default compatibility version\n      return 4;\n    };\n\n    const ensureCompatibleVersion = (\n      compatibilityVersion: CompatibilityVersion | undefined,\n    ): CompatibilityVersion => {\n      if (!compatibilityVersion) {\n        return inferCompatibleVersion();\n      }\n\n      if (!version) {\n        return compatibilityVersion;\n      }\n\n      if (\n        compatibilityVersion === 4 ||\n        compatibilityVersion === 3 ||\n        compatibilityVersion === 'mini'\n      ) {\n        if (!context.package.satisfies(version, '>=3.25.0 <5.0.0')) {\n          const compatibleVersion = inferCompatibleVersion();\n          console.warn(\n            `🔌 ${colors.yellow('Warning:')} Installed ${colors.cyan(packageName)} ${colors.cyan(`v${version.version}`)} does not support compatibility version ${colors.yellow(String(compatibilityVersion))}, using ${colors.yellow(String(compatibleVersion))}.`,\n          );\n          return compatibleVersion;\n        }\n      }\n\n      return compatibilityVersion;\n    };\n\n    plugin.config.compatibilityVersion = ensureCompatibleVersion(\n      plugin.config.compatibilityVersion,\n    );\n\n    plugin.config.dates = context.valueToObject({\n      defaultValue: {\n        local: false,\n        offset: false,\n      },\n      value: plugin.config.dates,\n    });\n\n    plugin.config.types = context.valueToObject({\n      defaultValue: {\n        infer: {\n          case: 'PascalCase',\n          enabled: false,\n        },\n      },\n      mappers: {\n        object: (fields, defaultValue) => ({\n          ...fields,\n          infer: context.valueToObject({\n            defaultValue: {\n              ...(defaultValue.infer as Extract<\n                typeof defaultValue.infer,\n                Record<string, unknown>\n              >),\n              enabled:\n                fields.infer !== undefined\n                  ? Boolean(fields.infer)\n                  : (\n                      defaultValue.infer as Extract<\n                        typeof defaultValue.infer,\n                        Record<string, unknown>\n                      >\n                    ).enabled,\n            },\n            mappers,\n            value: fields.infer,\n          }),\n        }),\n      },\n      value: plugin.config.types,\n    });\n\n    plugin.config.definitions = context.valueToObject({\n      defaultValue: {\n        case: plugin.config.case ?? 'camelCase',\n        enabled: true,\n        name: 'z{{name}}',\n        types: {\n          ...plugin.config.types,\n          infer: {\n            ...(plugin.config.types.infer as Extract<\n              typeof plugin.config.types.infer,\n              Record<string, unknown>\n            >),\n            name: '{{name}}ZodType',\n          },\n        },\n      },\n      mappers: {\n        ...mappers,\n        object: (fields, defaultValue) => ({\n          ...fields,\n          types: context.valueToObject({\n            defaultValue: defaultValue.types!,\n            mappers: {\n              object: (fields, defaultValue) => ({\n                ...fields,\n                infer: context.valueToObject({\n                  defaultValue: {\n                    ...(defaultValue.infer as Extract<\n                      typeof defaultValue.infer,\n                      Record<string, unknown>\n                    >),\n                    enabled:\n                      fields.infer !== undefined\n                        ? Boolean(fields.infer)\n                        : (\n                            defaultValue.infer as Extract<\n                              typeof defaultValue.infer,\n                              Record<string, unknown>\n                            >\n                          ).enabled,\n                  },\n                  mappers,\n                  value: fields.infer,\n                }),\n              }),\n            },\n            value: fields.types,\n          }),\n        }),\n      },\n      value: plugin.config.definitions,\n    });\n\n    plugin.config.requests = context.valueToObject({\n      defaultValue: {\n        case: plugin.config.case ?? 'camelCase',\n        enabled: true,\n        name: 'z{{name}}Data',\n        types: {\n          ...plugin.config.types,\n          infer: {\n            ...(plugin.config.types.infer as Extract<\n              typeof plugin.config.types.infer,\n              Record<string, unknown>\n            >),\n            name: '{{name}}DataZodType',\n          },\n        },\n      },\n      mappers: {\n        ...mappers,\n        object: (fields, defaultValue) => ({\n          ...fields,\n          types: context.valueToObject({\n            defaultValue: defaultValue.types!,\n            mappers: {\n              object: (fields, defaultValue) => ({\n                ...fields,\n                infer: context.valueToObject({\n                  defaultValue: {\n                    ...(defaultValue.infer as Extract<\n                      typeof defaultValue.infer,\n                      Record<string, unknown>\n                    >),\n                    enabled:\n                      fields.infer !== undefined\n                        ? Boolean(fields.infer)\n                        : (\n                            defaultValue.infer as Extract<\n                              typeof defaultValue.infer,\n                              Record<string, unknown>\n                            >\n                          ).enabled,\n                  },\n                  mappers,\n                  value: fields.infer,\n                }),\n              }),\n            },\n            value: fields.types,\n          }),\n        }),\n      },\n      value: plugin.config.requests,\n    });\n\n    plugin.config.responses = context.valueToObject({\n      defaultValue: {\n        case: plugin.config.case ?? 'camelCase',\n        enabled: true,\n        name: 'z{{name}}Response',\n        types: {\n          ...plugin.config.types,\n          infer: {\n            ...(plugin.config.types.infer as Extract<\n              typeof plugin.config.types.infer,\n              Record<string, unknown>\n            >),\n            name: '{{name}}ResponseZodType',\n          },\n        },\n      },\n      mappers: {\n        ...mappers,\n        object: (fields, defaultValue) => ({\n          ...fields,\n          types: context.valueToObject({\n            defaultValue: defaultValue.types!,\n            mappers: {\n              object: (fields, defaultValue) => ({\n                ...fields,\n                infer: context.valueToObject({\n                  defaultValue: {\n                    ...(defaultValue.infer as Extract<\n                      typeof defaultValue.infer,\n                      Record<string, unknown>\n                    >),\n                    enabled:\n                      fields.infer !== undefined\n                        ? Boolean(fields.infer)\n                        : (\n                            defaultValue.infer as Extract<\n                              typeof defaultValue.infer,\n                              Record<string, unknown>\n                            >\n                          ).enabled,\n                  },\n                  mappers,\n                  value: fields.infer,\n                }),\n              }),\n            },\n            value: fields.types,\n          }),\n        }),\n      },\n      value: plugin.config.responses,\n    });\n\n    plugin.config.webhooks = context.valueToObject({\n      defaultValue: {\n        case: plugin.config.case ?? 'camelCase',\n        enabled: true,\n        name: 'z{{name}}WebhookRequest',\n        types: {\n          ...plugin.config.types,\n          infer: {\n            ...(plugin.config.types.infer as Extract<\n              typeof plugin.config.types.infer,\n              Record<string, unknown>\n            >),\n            name: '{{name}}WebhookRequestZodType',\n          },\n        },\n      },\n      mappers: {\n        ...mappers,\n        object: (fields, defaultValue) => ({\n          ...fields,\n          types: context.valueToObject({\n            defaultValue: defaultValue.types!,\n            mappers: {\n              object: (fields, defaultValue) => ({\n                ...fields,\n                infer: context.valueToObject({\n                  defaultValue: {\n                    ...(defaultValue.infer as Extract<\n                      typeof defaultValue.infer,\n                      Record<string, unknown>\n                    >),\n                    enabled:\n                      fields.infer !== undefined\n                        ? Boolean(fields.infer)\n                        : (\n                            defaultValue.infer as Extract<\n                              typeof defaultValue.infer,\n                              Record<string, unknown>\n                            >\n                          ).enabled,\n                  },\n                  mappers,\n                  value: fields.infer,\n                }),\n              }),\n            },\n            value: fields.types,\n          }),\n        }),\n      },\n      value: plugin.config.webhooks,\n    });\n  },\n  tags: ['validator'],\n};\n\n/**\n * Type helper for Zod plugin, returns {@link Plugin.Config} object\n */\nexport const defineConfig = definePluginConfig(defaultConfig);\n"
  },
  {
    "path": "packages/openapi-ts/src/plugins/zod/constants.ts",
    "content": "// TODO: this is inaccurate, it combines identifiers for all supported versions\nexport const identifiers = {\n  AnyZodObject: 'AnyZodObject',\n  ZodMiniOptional: 'ZodMiniOptional',\n  ZodOptional: 'ZodOptional',\n  ZodTypeAny: 'ZodTypeAny',\n  _default: '_default',\n  and: 'and',\n  array: 'array',\n  bigint: 'bigint',\n  boolean: 'boolean',\n  check: 'check',\n  coerce: 'coerce',\n  date: 'date',\n  datetime: 'datetime',\n  default: 'default',\n  describe: 'describe',\n  email: 'email',\n  enum: 'enum',\n  globalRegistry: 'globalRegistry',\n  gt: 'gt',\n  gte: 'gte',\n  guid: 'guid',\n  infer: 'infer',\n  int: 'int',\n  intersection: 'intersection',\n  ip: 'ip',\n  ipv4: 'ipv4',\n  ipv6: 'ipv6',\n  iso: 'iso',\n  lazy: 'lazy',\n  length: 'length',\n  literal: 'literal',\n  lt: 'lt',\n  lte: 'lte',\n  max: 'max',\n  maxLength: 'maxLength',\n  maximum: 'maximum', // Zod Mini\n  min: 'min',\n  minLength: 'minLength',\n  minimum: 'minimum', // Zod Mini\n  never: 'never',\n  null: 'null',\n  nullable: 'nullable',\n  nullish: 'nullish',\n  number: 'number',\n  object: 'object',\n  optional: 'optional',\n  parseAsync: 'parseAsync',\n  readonly: 'readonly',\n  record: 'record',\n  regex: 'regex',\n  register: 'register',\n  string: 'string',\n  time: 'time',\n  tuple: 'tuple',\n  undefined: 'undefined',\n  union: 'union',\n  unknown: 'unknown',\n  url: 'url',\n  uuid: 'uuid',\n  void: 'void',\n};\n"
  },
  {
    "path": "packages/openapi-ts/src/plugins/zod/index.ts",
    "content": "export { defaultConfig, defineConfig } from './config';\nexport type { ZodResolvers } from './resolvers';\nexport type { ZodPlugin } from './types';\n"
  },
  {
    "path": "packages/openapi-ts/src/plugins/zod/mini/api.ts",
    "content": "import { $ } from '../../../ts-dsl';\nimport { identifiers } from '../constants';\nimport type { ValidatorResolverContext } from '../resolvers';\nimport type { ValidatorArgs } from '../shared/types';\n\nconst validatorResolver = (ctx: ValidatorResolverContext): ReturnType<typeof $.return> => {\n  const { schema } = ctx.symbols;\n  return $(schema).attr(identifiers.parseAsync).call('data').await().return();\n};\n\nexport const createRequestValidatorMini = ({\n  operation,\n  plugin,\n}: ValidatorArgs): ReturnType<typeof $.func> | undefined => {\n  const symbol = plugin.getSymbol({\n    category: 'schema',\n    resource: 'operation',\n    resourceId: operation.id,\n    role: 'data',\n    tool: 'zod',\n  });\n  if (!symbol) return;\n\n  const z = plugin.external('zod.z');\n  const ctx: ValidatorResolverContext = {\n    $,\n    chain: {\n      current: $(z),\n    },\n    operation,\n    plugin,\n    symbols: {\n      schema: symbol,\n      z,\n    },\n  };\n  const validator = plugin.config['~resolvers']?.validator;\n  const resolver = typeof validator === 'function' ? validator : validator?.request;\n  const candidates = [resolver, validatorResolver];\n  for (const candidate of candidates) {\n    const statements = candidate?.(ctx);\n    if (statements === null) return;\n    if (statements !== undefined) {\n      return $.func()\n        .async()\n        .param('data')\n        .do(...(statements instanceof Array ? statements : [statements]));\n    }\n  }\n  return;\n};\n\nexport const createResponseValidatorMini = ({\n  operation,\n  plugin,\n}: ValidatorArgs): ReturnType<typeof $.func> | undefined => {\n  const symbol = plugin.getSymbol({\n    category: 'schema',\n    resource: 'operation',\n    resourceId: operation.id,\n    role: 'responses',\n    tool: 'zod',\n  });\n  if (!symbol) return;\n\n  const z = plugin.external('zod.z');\n  const ctx: ValidatorResolverContext = {\n    $,\n    chain: {\n      current: $(z),\n    },\n    operation,\n    plugin,\n    symbols: {\n      schema: symbol,\n      z,\n    },\n  };\n  const validator = plugin.config['~resolvers']?.validator;\n  const resolver = typeof validator === 'function' ? validator : validator?.response;\n  const candidates = [resolver, validatorResolver];\n  for (const candidate of candidates) {\n    const statements = candidate?.(ctx);\n    if (statements === null) return;\n    if (statements !== undefined) {\n      return $.func()\n        .async()\n        .param('data')\n        .do(...(statements instanceof Array ? statements : [statements]));\n    }\n  }\n  return;\n};\n"
  },
  {
    "path": "packages/openapi-ts/src/plugins/zod/mini/plugin.ts",
    "content": "import { pathToJsonPointer } from '@hey-api/shared';\n\nimport { getZodModule } from '../shared/module';\nimport { irOperationToAst } from '../shared/operation';\nimport { irWebhookToAst } from '../shared/webhook';\nimport type { ZodPlugin } from '../types';\nimport { createProcessor } from './processor';\n\nexport const handlerMini: ZodPlugin['Handler'] = ({ plugin }) => {\n  plugin.symbol('z', {\n    external: getZodModule({ plugin }),\n    importKind: 'namespace',\n    meta: {\n      category: 'external',\n      resource: 'zod.z',\n    },\n  });\n\n  const processor = createProcessor(plugin);\n\n  plugin.forEach('operation', 'parameter', 'requestBody', 'schema', 'webhook', (event) => {\n    switch (event.type) {\n      case 'operation':\n        irOperationToAst({\n          operation: event.operation,\n          path: event._path,\n          plugin,\n          processor,\n          tags: event.tags,\n        });\n        break;\n      case 'parameter':\n        processor.process({\n          meta: {\n            resource: 'definition',\n            resourceId: pathToJsonPointer(event._path),\n          },\n          naming: plugin.config.definitions,\n          path: event._path,\n          plugin,\n          schema: event.parameter.schema,\n          tags: event.tags,\n        });\n        break;\n      case 'requestBody':\n        processor.process({\n          meta: {\n            resource: 'definition',\n            resourceId: pathToJsonPointer(event._path),\n          },\n          naming: plugin.config.definitions,\n          path: event._path,\n          plugin,\n          schema: event.requestBody.schema,\n          tags: event.tags,\n        });\n        break;\n      case 'schema':\n        processor.process({\n          meta: {\n            resource: 'definition',\n            resourceId: pathToJsonPointer(event._path),\n          },\n          naming: plugin.config.definitions,\n          path: event._path,\n          plugin,\n          schema: event.schema,\n          tags: event.tags,\n        });\n        break;\n      case 'webhook':\n        irWebhookToAst({\n          operation: event.operation,\n          path: event._path,\n          plugin,\n          processor,\n          tags: event.tags,\n        });\n        break;\n    }\n  });\n};\n"
  },
  {
    "path": "packages/openapi-ts/src/plugins/zod/mini/processor.ts",
    "content": "import { ref } from '@hey-api/codegen-core';\nimport type { IR } from '@hey-api/shared';\nimport { createSchemaProcessor, createSchemaWalker, pathToJsonPointer } from '@hey-api/shared';\n\nimport { exportAst } from '../shared/export';\nimport type { ProcessorContext, ProcessorResult } from '../shared/processor';\nimport type { ZodFinal } from '../shared/types';\nimport type { ZodPlugin } from '../types';\nimport { createVisitor } from './walker';\n\nexport function createProcessor(plugin: ZodPlugin['Instance']): ProcessorResult {\n  const processor = createSchemaProcessor();\n\n  const hooks = [plugin.config['~hooks']?.schemas, plugin.context.config.parser.hooks.schemas];\n\n  function extractor(ctx: ProcessorContext): IR.SchemaObject {\n    if (processor.hasEmitted(ctx.path)) {\n      return ctx.schema;\n    }\n\n    for (const hook of hooks) {\n      const result = hook?.shouldExtract?.(ctx);\n      if (result) {\n        process({\n          namingAnchor: processor.context.anchor,\n          tags: processor.context.tags,\n          ...ctx,\n        });\n        return { $ref: pathToJsonPointer(ctx.path) };\n      }\n    }\n\n    return ctx.schema;\n  }\n\n  function process(ctx: ProcessorContext): ZodFinal | void {\n    if (!processor.markEmitted(ctx.path)) return;\n\n    const shouldExport = ctx.export !== false;\n\n    return processor.withContext({ anchor: ctx.namingAnchor, tags: ctx.tags }, () => {\n      const visitor = createVisitor({ schemaExtractor: extractor });\n      const walk = createSchemaWalker(visitor);\n\n      const result = walk(ctx.schema, {\n        path: ref(ctx.path),\n        plugin,\n      });\n\n      const final = visitor.applyModifiers(result, {\n        path: ref(ctx.path),\n        plugin,\n      }) as ZodFinal;\n\n      if (shouldExport) {\n        exportAst({ ...ctx, final, plugin });\n        return;\n      }\n\n      return final;\n    });\n  }\n\n  return { process };\n}\n"
  },
  {
    "path": "packages/openapi-ts/src/plugins/zod/mini/toAst/array.ts",
    "content": "import { childContext, deduplicateSchema } from '@hey-api/shared';\n\nimport { $ } from '../../../../ts-dsl';\nimport { identifiers } from '../../constants';\nimport type { ArrayResolverContext } from '../../resolvers';\nimport type { Chain, ChainResult } from '../../shared/chain';\nimport type { CompositeHandlerResult, ZodResult } from '../../shared/types';\nimport { unknownToAst } from './unknown';\n\ntype ArrayToAstOptions = Pick<\n  ArrayResolverContext,\n  'applyModifiers' | 'plugin' | 'schema' | 'walk' | 'walkerCtx'\n>;\n\nfunction baseNode(ctx: ArrayResolverContext): Chain {\n  const { applyModifiers, childResults, plugin, schema, symbols } = ctx;\n  const { z } = symbols;\n\n  const arrayFn = $(z).attr(identifiers.array);\n\n  let normalizedSchema = schema;\n  if (normalizedSchema.items) {\n    normalizedSchema = deduplicateSchema({ schema: normalizedSchema });\n  }\n\n  if (!normalizedSchema.items) {\n    return arrayFn.call(\n      unknownToAst({\n        plugin,\n        schema: {\n          type: 'unknown',\n        },\n      }),\n    );\n  }\n\n  if (childResults.length === 1) {\n    const itemNode = applyModifiers(childResults[0]!, { optional: false }).expression;\n    return arrayFn.call(itemNode);\n  }\n\n  if (childResults.length > 1) {\n    const itemExpressions: Array<Chain> = childResults.map(\n      (result) => applyModifiers(result, { optional: false }).expression,\n    );\n\n    if (normalizedSchema.logicalOperator === 'and') {\n      return arrayFn.call(\n        $(z)\n          .attr(identifiers.intersection)\n          .call(...itemExpressions),\n      );\n    } else {\n      return arrayFn.call(\n        $(z)\n          .attr(identifiers.union)\n          .call($.array(...itemExpressions)),\n      );\n    }\n  }\n\n  return arrayFn.call(\n    unknownToAst({\n      plugin,\n      schema: {\n        type: 'unknown',\n      },\n    }),\n  );\n}\n\nfunction lengthNode(ctx: ArrayResolverContext): ChainResult {\n  const { schema } = ctx;\n  if (schema.minItems === schema.maxItems && schema.minItems !== undefined) {\n    return ctx.chain.current.attr(identifiers.length).call($.fromValue(schema.minItems));\n  }\n}\n\nfunction maxLengthNode(ctx: ArrayResolverContext): ChainResult {\n  const { schema, symbols } = ctx;\n  const { z } = symbols;\n  if (schema.maxItems === undefined) return;\n  return $(z).attr(identifiers.maxLength).call($.fromValue(schema.maxItems));\n}\n\nfunction minLengthNode(ctx: ArrayResolverContext): ChainResult {\n  const { schema, symbols } = ctx;\n  const { z } = symbols;\n  if (schema.minItems === undefined) return;\n  return $(z).attr(identifiers.minLength).call($.fromValue(schema.minItems));\n}\n\nfunction arrayResolver(ctx: ArrayResolverContext): Chain {\n  const baseResult = ctx.nodes.base(ctx);\n  ctx.chain.current = baseResult;\n\n  const lengthResult = ctx.nodes.length(ctx);\n  if (lengthResult) {\n    ctx.chain.current = lengthResult;\n  } else {\n    const minLengthResult = ctx.nodes.minLength(ctx);\n    const maxLengthResult = ctx.nodes.maxLength(ctx);\n\n    if (minLengthResult && maxLengthResult) {\n      ctx.chain.current = ctx.chain.current\n        .attr(identifiers.check)\n        .call(minLengthResult, maxLengthResult);\n    } else if (minLengthResult) {\n      ctx.chain.current = ctx.chain.current.attr(identifiers.check).call(minLengthResult);\n    } else if (maxLengthResult) {\n      ctx.chain.current = ctx.chain.current.attr(identifiers.check).call(maxLengthResult);\n    }\n  }\n\n  return ctx.chain.current;\n}\n\nexport function arrayToAst({\n  applyModifiers,\n  plugin,\n  schema,\n  walk,\n  walkerCtx,\n}: ArrayToAstOptions): CompositeHandlerResult {\n  const childResults: Array<ZodResult> = [];\n  let schemaCopy = schema;\n\n  const z = plugin.external('zod.z');\n\n  if (schemaCopy.items) {\n    schemaCopy = deduplicateSchema({ schema: schemaCopy });\n\n    schemaCopy.items!.forEach((item, index) => {\n      const itemResult = walk(item, childContext(walkerCtx, 'items', index));\n      childResults.push(itemResult);\n    });\n  }\n\n  const ctx: ArrayResolverContext = {\n    $,\n    applyModifiers,\n    chain: {\n      current: $(z),\n    },\n    childResults,\n    nodes: {\n      base: baseNode,\n      length: lengthNode,\n      maxLength: maxLengthNode,\n      minLength: minLengthNode,\n    },\n    plugin,\n    schema,\n    symbols: {\n      z,\n    },\n    walk,\n    walkerCtx,\n  };\n\n  const resolver = plugin.config['~resolvers']?.array;\n  const expression = resolver?.(ctx) ?? arrayResolver(ctx);\n\n  return {\n    childResults,\n    expression,\n  };\n}\n"
  },
  {
    "path": "packages/openapi-ts/src/plugins/zod/mini/toAst/boolean.ts",
    "content": "import type { SchemaWithType } from '@hey-api/shared';\n\nimport { $ } from '../../../../ts-dsl';\nimport { identifiers } from '../../constants';\nimport type { BooleanResolverContext } from '../../resolvers';\nimport type { Chain, ChainResult } from '../../shared/chain';\nimport type { ZodPlugin } from '../../types';\n\nfunction baseNode(ctx: BooleanResolverContext): Chain {\n  const { symbols } = ctx;\n  const { z } = symbols;\n  return $(z).attr(identifiers.boolean).call();\n}\n\nfunction constNode(ctx: BooleanResolverContext): ChainResult {\n  const { schema, symbols } = ctx;\n  const { z } = symbols;\n  if (typeof schema.const !== 'boolean') return;\n  return $(z).attr(identifiers.literal).call($.literal(schema.const));\n}\n\nfunction booleanResolver(ctx: BooleanResolverContext): Chain {\n  const constResult = ctx.nodes.const(ctx);\n  if (constResult) {\n    ctx.chain.current = constResult;\n    return ctx.chain.current;\n  }\n\n  const baseResult = ctx.nodes.base(ctx);\n  ctx.chain.current = baseResult;\n\n  return ctx.chain.current;\n}\n\nexport function booleanToAst({\n  plugin,\n  schema,\n}: {\n  plugin: ZodPlugin['Instance'];\n  schema: SchemaWithType<'boolean'>;\n}): Chain {\n  const z = plugin.external('zod.z');\n  const ctx: BooleanResolverContext = {\n    $,\n    chain: {\n      current: $(z),\n    },\n    nodes: {\n      base: baseNode,\n      const: constNode,\n    },\n    plugin,\n    schema,\n    symbols: {\n      z,\n    },\n  };\n\n  const resolver = plugin.config['~resolvers']?.boolean;\n  return resolver?.(ctx) ?? booleanResolver(ctx);\n}\n"
  },
  {
    "path": "packages/openapi-ts/src/plugins/zod/mini/toAst/enum.ts",
    "content": "import type { SchemaWithType } from '@hey-api/shared';\n\nimport { $ } from '../../../../ts-dsl';\nimport { identifiers } from '../../constants';\nimport type { EnumResolverContext } from '../../resolvers';\nimport type { Chain } from '../../shared/chain';\nimport type { ZodPlugin } from '../../types';\nimport { unknownToAst } from './unknown';\n\nfunction itemsNode(ctx: EnumResolverContext): ReturnType<EnumResolverContext['nodes']['items']> {\n  const { schema, symbols } = ctx;\n  const { z } = symbols;\n\n  const enumMembers: Array<ReturnType<typeof $.literal>> = [];\n  const literalMembers: Array<Chain> = [];\n\n  let isNullable = false;\n  let allStrings = true;\n\n  for (const item of schema.items ?? []) {\n    if (item.type === 'string' && typeof item.const === 'string') {\n      const literal = $.literal(item.const);\n      enumMembers.push(literal);\n      literalMembers.push($(z).attr(identifiers.literal).call(literal));\n    } else if (\n      (item.type === 'number' || item.type === 'integer') &&\n      typeof item.const === 'number'\n    ) {\n      allStrings = false;\n      const literal = $.literal(item.const);\n      literalMembers.push($(z).attr(identifiers.literal).call(literal));\n    } else if (item.type === 'boolean' && typeof item.const === 'boolean') {\n      allStrings = false;\n      const literal = $.literal(item.const);\n      literalMembers.push($(z).attr(identifiers.literal).call(literal));\n    } else if (item.type === 'null' || item.const === null) {\n      isNullable = true;\n    }\n  }\n\n  return {\n    allStrings,\n    enumMembers,\n    isNullable,\n    literalMembers,\n  };\n}\n\nfunction baseNode(ctx: EnumResolverContext): Chain {\n  const { symbols } = ctx;\n  const { z } = symbols;\n  const { allStrings, enumMembers, literalMembers } = ctx.nodes.items(ctx);\n\n  if (allStrings && enumMembers.length > 0) {\n    return $(z)\n      .attr(identifiers.enum)\n      .call($.array(...enumMembers));\n  }\n\n  if (literalMembers.length === 1) {\n    return literalMembers[0]!;\n  }\n\n  return $(z)\n    .attr(identifiers.union)\n    .call($.array(...literalMembers));\n}\n\nfunction enumResolver(ctx: EnumResolverContext): Chain {\n  const { literalMembers } = ctx.nodes.items(ctx);\n\n  if (!literalMembers.length) {\n    return ctx.chain.current;\n  }\n\n  const baseExpression = ctx.nodes.base(ctx);\n  ctx.chain.current = baseExpression;\n\n  return ctx.chain.current;\n}\n\nexport function enumToAst({\n  plugin,\n  schema,\n}: {\n  plugin: ZodPlugin['Instance'];\n  schema: SchemaWithType<'enum'>;\n}): Chain {\n  const z = plugin.external('zod.z');\n\n  const ctx: EnumResolverContext = {\n    $,\n    chain: {\n      current: $(z),\n    },\n    nodes: {\n      base: baseNode,\n      items: itemsNode,\n    },\n    plugin,\n    schema,\n    symbols: {\n      z,\n    },\n  };\n\n  const { literalMembers } = itemsNode(ctx);\n\n  if (!literalMembers.length) {\n    return unknownToAst({\n      plugin,\n      schema: {\n        type: 'unknown',\n      },\n    });\n  }\n\n  const resolver = plugin.config['~resolvers']?.enum;\n  return resolver?.(ctx) ?? enumResolver(ctx);\n}\n"
  },
  {
    "path": "packages/openapi-ts/src/plugins/zod/mini/toAst/never.ts",
    "content": "import type { SchemaWithType } from '@hey-api/shared';\n\nimport { $ } from '../../../../ts-dsl';\nimport { identifiers } from '../../constants';\nimport type { NeverResolverContext } from '../../resolvers';\nimport type { Chain } from '../../shared/chain';\nimport type { ZodPlugin } from '../../types';\n\nfunction baseNode(ctx: NeverResolverContext): Chain {\n  const { symbols } = ctx;\n  const { z } = symbols;\n  return $(z).attr(identifiers.never).call();\n}\n\nfunction neverResolver(ctx: NeverResolverContext): Chain {\n  const baseResult = ctx.nodes.base(ctx);\n  ctx.chain.current = baseResult;\n  return ctx.chain.current;\n}\n\nexport function neverToAst({\n  plugin,\n  schema,\n}: {\n  plugin: ZodPlugin['Instance'];\n  schema: SchemaWithType<'never'>;\n}): Chain {\n  const z = plugin.external('zod.z');\n  const ctx: NeverResolverContext = {\n    $,\n    chain: {\n      current: $(z),\n    },\n    nodes: {\n      base: baseNode,\n    },\n    plugin,\n    schema,\n    symbols: {\n      z,\n    },\n  };\n\n  const resolver = plugin.config['~resolvers']?.never;\n  return resolver?.(ctx) ?? neverResolver(ctx);\n}\n"
  },
  {
    "path": "packages/openapi-ts/src/plugins/zod/mini/toAst/null.ts",
    "content": "import type { SchemaWithType } from '@hey-api/shared';\n\nimport { $ } from '../../../../ts-dsl';\nimport { identifiers } from '../../constants';\nimport type { NullResolverContext } from '../../resolvers';\nimport type { Chain } from '../../shared/chain';\nimport type { ZodPlugin } from '../../types';\n\nfunction baseNode(ctx: NullResolverContext): Chain {\n  const { symbols } = ctx;\n  const { z } = symbols;\n  return $(z).attr(identifiers.null).call();\n}\n\nfunction nullResolver(ctx: NullResolverContext): Chain {\n  const baseResult = ctx.nodes.base(ctx);\n  ctx.chain.current = baseResult;\n  return ctx.chain.current;\n}\n\nexport function nullToAst({\n  plugin,\n  schema,\n}: {\n  plugin: ZodPlugin['Instance'];\n  schema: SchemaWithType<'null'>;\n}): Chain {\n  const z = plugin.external('zod.z');\n  const ctx: NullResolverContext = {\n    $,\n    chain: {\n      current: $(z),\n    },\n    nodes: {\n      base: baseNode,\n    },\n    plugin,\n    schema,\n    symbols: {\n      z,\n    },\n  };\n\n  const resolver = plugin.config['~resolvers']?.null;\n  return resolver?.(ctx) ?? nullResolver(ctx);\n}\n"
  },
  {
    "path": "packages/openapi-ts/src/plugins/zod/mini/toAst/number.ts",
    "content": "import type { SchemaWithType } from '@hey-api/shared';\n\nimport { maybeBigInt, shouldCoerceToBigInt } from '../../../../plugins/shared/utils/coerce';\nimport { getIntegerLimit } from '../../../../plugins/shared/utils/formats';\nimport { $ } from '../../../../ts-dsl';\nimport { identifiers } from '../../constants';\nimport type { NumberResolverContext } from '../../resolvers';\nimport type { Chain, ChainResult } from '../../shared/chain';\nimport type { ZodPlugin } from '../../types';\n\nfunction baseNode(ctx: NumberResolverContext): Chain {\n  const { schema, symbols } = ctx;\n  const { z } = symbols;\n  if (ctx.utils.shouldCoerceToBigInt(schema.format)) {\n    return $(z).attr(identifiers.coerce).attr(identifiers.bigint).call();\n  }\n  let chain = $(z).attr(identifiers.number).call();\n  if (schema.type === 'integer') {\n    chain = $(z).attr(identifiers.int).call();\n  }\n  return chain;\n}\n\nfunction constNode(ctx: NumberResolverContext): ChainResult {\n  const { schema, symbols } = ctx;\n  const { z } = symbols;\n  if (schema.const === undefined) return;\n  return $(z).attr(identifiers.literal).call(ctx.utils.maybeBigInt(schema.const, schema.format));\n}\n\nfunction maxNode(ctx: NumberResolverContext): ChainResult {\n  const { schema, symbols } = ctx;\n  const { z } = symbols;\n  if (schema.exclusiveMaximum !== undefined) {\n    return $(z)\n      .attr(identifiers.lt)\n      .call(ctx.utils.maybeBigInt(schema.exclusiveMaximum, schema.format));\n  }\n  if (schema.maximum !== undefined) {\n    return $(z).attr(identifiers.lte).call(ctx.utils.maybeBigInt(schema.maximum, schema.format));\n  }\n  const limit = ctx.utils.getIntegerLimit(schema.format);\n  if (limit) {\n    return $(z)\n      .attr(identifiers.maximum)\n      .call(\n        ctx.utils.maybeBigInt(limit.maxValue, schema.format),\n        $.object().prop('error', $.literal(limit.maxError)),\n      );\n  }\n  return;\n}\n\nfunction minNode(ctx: NumberResolverContext): ChainResult {\n  const { schema, symbols } = ctx;\n  const { z } = symbols;\n  if (schema.exclusiveMinimum !== undefined) {\n    return $(z)\n      .attr(identifiers.gt)\n      .call(ctx.utils.maybeBigInt(schema.exclusiveMinimum, schema.format));\n  }\n  if (schema.minimum !== undefined) {\n    return $(z).attr(identifiers.gte).call(ctx.utils.maybeBigInt(schema.minimum, schema.format));\n  }\n  const limit = ctx.utils.getIntegerLimit(schema.format);\n  if (limit) {\n    return $(z)\n      .attr(identifiers.minimum)\n      .call(\n        ctx.utils.maybeBigInt(limit.minValue, schema.format),\n        $.object().prop('error', $.literal(limit.minError)),\n      );\n  }\n  return;\n}\n\nfunction numberResolver(ctx: NumberResolverContext): Chain {\n  const constNode = ctx.nodes.const(ctx);\n  if (constNode) {\n    ctx.chain.current = constNode;\n    return ctx.chain.current;\n  }\n\n  const baseNode = ctx.nodes.base(ctx);\n  if (baseNode) ctx.chain.current = baseNode;\n\n  const checks: Array<Chain> = [];\n\n  const minNode = ctx.nodes.min(ctx);\n  if (minNode) checks.push(minNode);\n\n  const maxNode = ctx.nodes.max(ctx);\n  if (maxNode) checks.push(maxNode);\n\n  if (checks.length > 0) {\n    ctx.chain.current = ctx.chain.current.attr(identifiers.check).call(...checks);\n  }\n\n  return ctx.chain.current;\n}\n\nexport function numberToNode({\n  plugin,\n  schema,\n}: {\n  plugin: ZodPlugin['Instance'];\n  schema: SchemaWithType<'integer' | 'number'>;\n}): Chain {\n  const z = plugin.external('zod.z');\n  const ctx: NumberResolverContext = {\n    $,\n    chain: {\n      current: $(z),\n    },\n    nodes: {\n      base: baseNode,\n      const: constNode,\n      max: maxNode,\n      min: minNode,\n    },\n    plugin,\n    schema,\n    symbols: {\n      z,\n    },\n    utils: {\n      getIntegerLimit,\n      maybeBigInt,\n      shouldCoerceToBigInt,\n    },\n  };\n  const resolver = plugin.config['~resolvers']?.number;\n  return resolver?.(ctx) ?? numberResolver(ctx);\n}\n"
  },
  {
    "path": "packages/openapi-ts/src/plugins/zod/mini/toAst/object.ts",
    "content": "import type { SchemaVisitorContext, SchemaWithType, Walker } from '@hey-api/shared';\nimport { childContext } from '@hey-api/shared';\n\nimport { $ } from '../../../../ts-dsl';\nimport { identifiers } from '../../constants';\nimport type { ObjectResolverContext } from '../../resolvers';\nimport type { Chain } from '../../shared/chain';\nimport type { CompositeHandlerResult, ZodFinal, ZodResult } from '../../shared/types';\nimport type { ZodPlugin } from '../../types';\n\ntype WalkerCtx = SchemaVisitorContext<ZodPlugin['Instance']>;\n\ninterface ObjectToAstOptions {\n  applyModifiers: (result: ZodResult, opts: { optional?: boolean }) => ZodFinal;\n  plugin: ZodPlugin['Instance'];\n  schema: SchemaWithType<'object'>;\n  walk: Walker<ZodResult, ZodPlugin['Instance']>;\n  walkerCtx: WalkerCtx;\n}\n\ntype ExtendedContext = ObjectResolverContext & {\n  applyModifiers: ObjectToAstOptions['applyModifiers'];\n  walk: ObjectToAstOptions['walk'];\n  walkerCtx: ObjectToAstOptions['walkerCtx'];\n};\n\nfunction additionalPropertiesNode(ctx: ExtendedContext): Chain | null | undefined {\n  const { _childResults, applyModifiers, schema, walk, walkerCtx } = ctx;\n\n  if (\n    !schema.additionalProperties ||\n    (schema.properties && Object.keys(schema.properties).length > 0)\n  ) {\n    return;\n  }\n\n  const additionalResult = walk(\n    schema.additionalProperties,\n    childContext(walkerCtx, 'additionalProperties'),\n  );\n  _childResults.push(additionalResult);\n  const finalExpr = applyModifiers(additionalResult, {});\n  return finalExpr.expression;\n}\n\nfunction baseNode(ctx: ExtendedContext): Chain {\n  const { nodes, symbols } = ctx;\n  const { z } = symbols;\n\n  const additional = nodes.additionalProperties(ctx);\n  const shape = nodes.shape(ctx);\n\n  if (additional) {\n    return $(z).attr(identifiers.record).call($(z).attr(identifiers.string).call(), additional);\n  }\n\n  return $(z).attr(identifiers.object).call(shape);\n}\n\nfunction objectResolver(ctx: ExtendedContext): Chain {\n  return ctx.nodes.base(ctx);\n}\n\nfunction shapeNode(ctx: ExtendedContext): ReturnType<typeof $.object> {\n  const { _childResults, applyModifiers, schema, walk, walkerCtx } = ctx;\n  const shape = $.object().pretty();\n\n  for (const name in schema.properties) {\n    const property = schema.properties[name]!;\n    const isOptional = !schema.required?.includes(name);\n\n    const propertyResult = walk(property, childContext(walkerCtx, 'properties', name));\n    _childResults.push(propertyResult);\n\n    const finalExpr = applyModifiers(propertyResult, {\n      optional: isOptional,\n    });\n\n    shape.prop(name, finalExpr.expression);\n  }\n\n  return shape;\n}\n\nexport function objectToAst(options: ObjectToAstOptions): CompositeHandlerResult {\n  const { applyModifiers, plugin, schema, walk, walkerCtx } = options;\n  const childResults: Array<ZodResult> = [];\n  const z = plugin.external('zod.z');\n  const ctx: ExtendedContext = {\n    $,\n    _childResults: childResults,\n    applyModifiers,\n    chain: {\n      current: $(z),\n    },\n    nodes: {\n      additionalProperties: additionalPropertiesNode,\n      base: baseNode,\n      shape: shapeNode,\n    },\n    plugin,\n    schema,\n    symbols: {\n      z,\n    },\n    walk,\n    walkerCtx,\n  };\n  const resolver = plugin.config['~resolvers']?.object;\n  const node = resolver?.(ctx) ?? objectResolver(ctx);\n\n  return {\n    childResults,\n    expression: node,\n  };\n}\n"
  },
  {
    "path": "packages/openapi-ts/src/plugins/zod/mini/toAst/string.ts",
    "content": "import type { SchemaWithType } from '@hey-api/shared';\n\nimport { $ } from '../../../../ts-dsl';\nimport { identifiers } from '../../constants';\nimport type { StringResolverContext } from '../../resolvers';\nimport type { Chain, ChainResult } from '../../shared/chain';\nimport type { ZodPlugin } from '../../types';\n\nfunction baseNode(ctx: StringResolverContext): Chain {\n  const { z } = ctx.symbols;\n  return $(z).attr(identifiers.string).call();\n}\n\nfunction constNode(ctx: StringResolverContext): ChainResult {\n  const { schema, symbols } = ctx;\n  const { z } = symbols;\n  if (typeof schema.const !== 'string') return;\n  return $(z).attr(identifiers.literal).call($.literal(schema.const));\n}\n\nfunction formatNode(ctx: StringResolverContext): ChainResult {\n  const { plugin, schema, symbols } = ctx;\n  const { z } = symbols;\n\n  switch (schema.format) {\n    case 'date':\n      return $(z).attr(identifiers.iso).attr(identifiers.date).call();\n    case 'date-time': {\n      const obj = $.object()\n        .$if(plugin.config.dates.offset, (o) => o.prop('offset', $.literal(true)))\n        .$if(plugin.config.dates.local, (o) => o.prop('local', $.literal(true)));\n      return $(z)\n        .attr(identifiers.iso)\n        .attr(identifiers.datetime)\n        .call(obj.hasProps() ? obj : undefined);\n    }\n    case 'email':\n      return $(z).attr(identifiers.email).call();\n    case 'guid':\n      return $(z).attr(identifiers.guid).call();\n    case 'ipv4':\n      return $(z).attr(identifiers.ipv4).call();\n    case 'ipv6':\n      return $(z).attr(identifiers.ipv6).call();\n    case 'time':\n      return $(z).attr(identifiers.iso).attr(identifiers.time).call();\n    case 'uri':\n      return $(z).attr(identifiers.url).call();\n    case 'uuid':\n      return $(z).attr(identifiers.uuid).call();\n  }\n\n  return;\n}\n\nfunction lengthNode(ctx: StringResolverContext): ChainResult {\n  const { schema, symbols } = ctx;\n  const { z } = symbols;\n  if (schema.minLength === undefined || schema.minLength !== schema.maxLength) return;\n  return $(z).attr(identifiers.length).call($.literal(schema.minLength));\n}\n\nfunction maxLengthNode(ctx: StringResolverContext): ChainResult {\n  const { schema, symbols } = ctx;\n  const { z } = symbols;\n  if (schema.maxLength === undefined) return;\n  return $(z).attr(identifiers.maxLength).call($.literal(schema.maxLength));\n}\n\nfunction minLengthNode(ctx: StringResolverContext): ChainResult {\n  const { schema, symbols } = ctx;\n  const { z } = symbols;\n  if (schema.minLength === undefined) return;\n  return $(z).attr(identifiers.minLength).call($.literal(schema.minLength));\n}\n\nfunction patternNode(ctx: StringResolverContext): ChainResult {\n  const { schema, symbols } = ctx;\n  const { z } = symbols;\n  if (!schema.pattern) return;\n  const flags = /\\\\[pP]\\{/.test(schema.pattern) ? 'u' : undefined;\n  return $(z).attr(identifiers.regex).call($.regexp(schema.pattern, flags));\n}\n\nfunction stringResolver(ctx: StringResolverContext): Chain {\n  const constNode = ctx.nodes.const(ctx);\n  if (constNode) {\n    ctx.chain.current = constNode;\n    return ctx.chain.current;\n  }\n\n  const baseNode = ctx.nodes.base(ctx);\n  if (baseNode) ctx.chain.current = baseNode;\n\n  const formatNode = ctx.nodes.format(ctx);\n  if (formatNode) ctx.chain.current = formatNode;\n\n  const checks: Array<Chain> = [];\n\n  const lengthNode = ctx.nodes.length(ctx);\n  if (lengthNode) {\n    checks.push(lengthNode);\n  } else {\n    const minLengthNode = ctx.nodes.minLength(ctx);\n    if (minLengthNode) checks.push(minLengthNode);\n\n    const maxLengthNode = ctx.nodes.maxLength(ctx);\n    if (maxLengthNode) checks.push(maxLengthNode);\n  }\n\n  const patternNode = ctx.nodes.pattern(ctx);\n  if (patternNode) checks.push(patternNode);\n\n  if (checks.length > 0) {\n    ctx.chain.current = ctx.chain.current.attr(identifiers.check).call(...checks);\n  }\n\n  return ctx.chain.current;\n}\n\nexport function stringToNode({\n  plugin,\n  schema,\n}: {\n  plugin: ZodPlugin['Instance'];\n  schema: SchemaWithType<'string'>;\n}): Chain {\n  const z = plugin.external('zod.z');\n  const ctx: StringResolverContext = {\n    $,\n    chain: {\n      current: $(z),\n    },\n    nodes: {\n      base: baseNode,\n      const: constNode,\n      format: formatNode,\n      length: lengthNode,\n      maxLength: maxLengthNode,\n      minLength: minLengthNode,\n      pattern: patternNode,\n    },\n    plugin,\n    schema,\n    symbols: {\n      z,\n    },\n  };\n  const resolver = plugin.config['~resolvers']?.string;\n  return resolver?.(ctx) ?? stringResolver(ctx);\n}\n"
  },
  {
    "path": "packages/openapi-ts/src/plugins/zod/mini/toAst/tuple.ts",
    "content": "import { childContext } from '@hey-api/shared';\n\nimport { $ } from '../../../../ts-dsl';\nimport { identifiers } from '../../constants';\nimport type { TupleResolverContext } from '../../resolvers';\nimport type { Chain, ChainResult } from '../../shared/chain';\nimport type { CompositeHandlerResult, ZodResult } from '../../shared/types';\n\ntype TupleToAstOptions = Pick<\n  TupleResolverContext,\n  'applyModifiers' | 'plugin' | 'schema' | 'walk' | 'walkerCtx'\n>;\n\nfunction baseNode(ctx: TupleResolverContext): Chain {\n  const { applyModifiers, childResults, symbols } = ctx;\n  const { z } = symbols;\n\n  const tupleFn = $(z).attr(identifiers.tuple);\n\n  if (childResults.length === 0) {\n    return tupleFn.call($.array());\n  }\n\n  const tupleElements = childResults.map(\n    (result) => applyModifiers(result, { optional: false }).expression,\n  );\n\n  return tupleFn.call($.array(...tupleElements));\n}\n\nfunction constNode(ctx: TupleResolverContext): ChainResult {\n  const { schema, symbols } = ctx;\n  const { z } = symbols;\n\n  if (!schema.const || !Array.isArray(schema.const)) return;\n\n  const tupleElements = schema.const.map((value) =>\n    $(z).attr(identifiers.literal).call($.fromValue(value)),\n  );\n\n  return $(z)\n    .attr(identifiers.tuple)\n    .call($.array(...tupleElements));\n}\n\nfunction tupleResolver(ctx: TupleResolverContext): Chain {\n  const constResult = ctx.nodes.const(ctx);\n  if (constResult) {\n    ctx.chain.current = constResult;\n    return ctx.chain.current;\n  }\n\n  const baseResult = ctx.nodes.base(ctx);\n  ctx.chain.current = baseResult;\n\n  return ctx.chain.current;\n}\n\nexport function tupleToAst({\n  applyModifiers,\n  plugin,\n  schema,\n  walk,\n  walkerCtx,\n}: TupleToAstOptions): CompositeHandlerResult {\n  const childResults: Array<ZodResult> = [];\n\n  const z = plugin.external('zod.z');\n\n  if (schema.items) {\n    schema.items.forEach((item, index) => {\n      const itemResult = walk(item, childContext(walkerCtx, 'items', index));\n      childResults.push(itemResult);\n    });\n  }\n\n  const ctx: TupleResolverContext = {\n    $,\n    applyModifiers,\n    chain: {\n      current: $(z),\n    },\n    childResults,\n    nodes: {\n      base: baseNode,\n      const: constNode,\n    },\n    plugin,\n    schema,\n    symbols: {\n      z,\n    },\n    walk,\n    walkerCtx,\n  };\n\n  const resolver = plugin.config['~resolvers']?.tuple;\n  const expression = resolver?.(ctx) ?? tupleResolver(ctx);\n\n  return {\n    childResults,\n    expression,\n  };\n}\n"
  },
  {
    "path": "packages/openapi-ts/src/plugins/zod/mini/toAst/undefined.ts",
    "content": "import type { SchemaWithType } from '@hey-api/shared';\n\nimport { $ } from '../../../../ts-dsl';\nimport { identifiers } from '../../constants';\nimport type { UndefinedResolverContext } from '../../resolvers';\nimport type { Chain } from '../../shared/chain';\nimport type { ZodPlugin } from '../../types';\n\nfunction baseNode(ctx: UndefinedResolverContext): Chain {\n  const { symbols } = ctx;\n  const { z } = symbols;\n  return $(z).attr(identifiers.undefined).call();\n}\n\nfunction undefinedResolver(ctx: UndefinedResolverContext): Chain {\n  const baseResult = ctx.nodes.base(ctx);\n  ctx.chain.current = baseResult;\n  return ctx.chain.current;\n}\n\nexport function undefinedToAst({\n  plugin,\n  schema,\n}: {\n  plugin: ZodPlugin['Instance'];\n  schema: SchemaWithType<'undefined'>;\n}): Chain {\n  const z = plugin.external('zod.z');\n  const ctx: UndefinedResolverContext = {\n    $,\n    chain: {\n      current: $(z),\n    },\n    nodes: {\n      base: baseNode,\n    },\n    plugin,\n    schema,\n    symbols: {\n      z,\n    },\n  };\n\n  const resolver = plugin.config['~resolvers']?.undefined;\n  return resolver?.(ctx) ?? undefinedResolver(ctx);\n}\n"
  },
  {
    "path": "packages/openapi-ts/src/plugins/zod/mini/toAst/unknown.ts",
    "content": "import type { SchemaWithType } from '@hey-api/shared';\n\nimport { $ } from '../../../../ts-dsl';\nimport { identifiers } from '../../constants';\nimport type { UnknownResolverContext } from '../../resolvers';\nimport type { Chain } from '../../shared/chain';\nimport type { ZodPlugin } from '../../types';\n\nfunction baseNode(ctx: UnknownResolverContext): Chain {\n  const { symbols } = ctx;\n  const { z } = symbols;\n  return $(z).attr(identifiers.unknown).call();\n}\n\nfunction unknownResolver(ctx: UnknownResolverContext): Chain {\n  const baseResult = ctx.nodes.base(ctx);\n  ctx.chain.current = baseResult;\n  return ctx.chain.current;\n}\n\nexport function unknownToAst({\n  plugin,\n  schema,\n}: {\n  plugin: ZodPlugin['Instance'];\n  schema: SchemaWithType<'unknown'>;\n}): Chain {\n  const z = plugin.external('zod.z');\n  const ctx: UnknownResolverContext = {\n    $,\n    chain: {\n      current: $(z),\n    },\n    nodes: {\n      base: baseNode,\n    },\n    plugin,\n    schema,\n    symbols: {\n      z,\n    },\n  };\n\n  const resolver = plugin.config['~resolvers']?.unknown;\n  return resolver?.(ctx) ?? unknownResolver(ctx);\n}\n"
  },
  {
    "path": "packages/openapi-ts/src/plugins/zod/mini/toAst/void.ts",
    "content": "import type { SchemaWithType } from '@hey-api/shared';\n\nimport { $ } from '../../../../ts-dsl';\nimport { identifiers } from '../../constants';\nimport type { VoidResolverContext } from '../../resolvers';\nimport type { Chain } from '../../shared/chain';\nimport type { ZodPlugin } from '../../types';\n\nfunction baseNode(ctx: VoidResolverContext): Chain {\n  const { symbols } = ctx;\n  const { z } = symbols;\n  return $(z).attr(identifiers.void).call();\n}\n\nfunction voidResolver(ctx: VoidResolverContext): Chain {\n  const baseResult = ctx.nodes.base(ctx);\n  ctx.chain.current = baseResult;\n  return ctx.chain.current;\n}\n\nexport function voidToAst({\n  plugin,\n  schema,\n}: {\n  plugin: ZodPlugin['Instance'];\n  schema: SchemaWithType<'void'>;\n}): Chain {\n  const z = plugin.external('zod.z');\n  const ctx: VoidResolverContext = {\n    $,\n    chain: {\n      current: $(z),\n    },\n    nodes: {\n      base: baseNode,\n    },\n    plugin,\n    schema,\n    symbols: {\n      z,\n    },\n  };\n\n  const resolver = plugin.config['~resolvers']?.void;\n  return resolver?.(ctx) ?? voidResolver(ctx);\n}\n"
  },
  {
    "path": "packages/openapi-ts/src/plugins/zod/mini/walker.ts",
    "content": "import type { SymbolMeta } from '@hey-api/codegen-core';\nimport { fromRef } from '@hey-api/codegen-core';\nimport type { SchemaExtractor, SchemaVisitor } from '@hey-api/shared';\nimport { pathToJsonPointer } from '@hey-api/shared';\n\nimport { $ } from '../../../ts-dsl';\nimport { maybeBigInt, shouldCoerceToBigInt } from '../../shared/utils/coerce';\nimport { identifiers } from '../constants';\nimport type { Chain } from '../shared/chain';\nimport { defaultMeta, inheritMeta } from '../shared/meta';\nimport type { ProcessorContext } from '../shared/processor';\nimport type { ZodFinal, ZodResult } from '../shared/types';\nimport type { ZodPlugin } from '../types';\nimport { arrayToAst } from './toAst/array';\nimport { booleanToAst } from './toAst/boolean';\nimport { enumToAst } from './toAst/enum';\nimport { neverToAst } from './toAst/never';\nimport { nullToAst } from './toAst/null';\nimport { numberToNode } from './toAst/number';\nimport { objectToAst } from './toAst/object';\nimport { stringToNode } from './toAst/string';\nimport { tupleToAst } from './toAst/tuple';\nimport { undefinedToAst } from './toAst/undefined';\nimport { unknownToAst } from './toAst/unknown';\nimport { voidToAst } from './toAst/void';\n\nexport interface VisitorConfig {\n  /** Optional schema extractor function. */\n  schemaExtractor?: SchemaExtractor<ProcessorContext>;\n}\n\nexport function createVisitor(\n  config: VisitorConfig,\n): SchemaVisitor<ZodResult, ZodPlugin['Instance']> {\n  const { schemaExtractor } = config;\n\n  return {\n    applyModifiers(result, ctx, options = {}): ZodFinal {\n      const { optional } = options;\n      const z = ctx.plugin.external('zod.z');\n      let expression = result.expression;\n\n      if (result.meta.readonly) {\n        expression = $(z).attr(identifiers.readonly).call(expression);\n      }\n\n      const hasDefault = result.meta.default !== undefined;\n      const needsNullable = result.meta.nullable;\n\n      if (optional && needsNullable) {\n        expression = $(z).attr(identifiers.nullish).call(expression);\n      } else if (optional) {\n        expression = $(z).attr(identifiers.optional).call(expression);\n      } else if (needsNullable) {\n        expression = $(z).attr(identifiers.nullable).call(expression);\n      }\n\n      if (hasDefault) {\n        expression = $(z)\n          .attr(identifiers._default)\n          .call(\n            expression,\n            result.meta.format\n              ? maybeBigInt(result.meta.default, result.meta.format)\n              : $.fromValue(result.meta.default),\n          );\n      }\n\n      return {\n        expression,\n      };\n    },\n    array(schema, ctx, walk) {\n      const applyModifiers: Parameters<typeof arrayToAst>[0]['applyModifiers'] = (result, opts) =>\n        this.applyModifiers(result, ctx, opts) as ZodFinal;\n      const { childResults, expression } = arrayToAst({\n        applyModifiers,\n        plugin: ctx.plugin,\n        schema,\n        walk,\n        walkerCtx: ctx,\n      });\n\n      return {\n        expression,\n        meta: inheritMeta(schema, childResults),\n      };\n    },\n    boolean(schema, ctx) {\n      const expression = booleanToAst({ plugin: ctx.plugin, schema });\n      return {\n        expression,\n        meta: defaultMeta(schema),\n      };\n    },\n    enum(schema, ctx) {\n      const expression = enumToAst({ plugin: ctx.plugin, schema });\n      const hasNull =\n        schema.items?.some((item) => item.type === 'null' || item.const === null) ?? false;\n      return {\n        expression,\n        meta: {\n          ...defaultMeta(schema),\n          nullable: hasNull,\n        },\n      };\n    },\n    integer(schema, ctx) {\n      const expression = numberToNode({ plugin: ctx.plugin, schema });\n      return {\n        expression,\n        meta: {\n          ...defaultMeta(schema),\n          format: schema.format,\n        },\n      };\n    },\n    intercept(schema, ctx, walk) {\n      if (schemaExtractor && !schema.$ref) {\n        const extracted = schemaExtractor({\n          meta: {\n            resource: 'definition',\n            resourceId: pathToJsonPointer(fromRef(ctx.path)),\n          },\n          naming: ctx.plugin.config.definitions,\n          path: fromRef(ctx.path),\n          plugin: ctx.plugin,\n          schema,\n        });\n        if (extracted !== schema) {\n          return walk(extracted, ctx);\n        }\n      }\n    },\n    intersection(items, schemas, parentSchema, ctx) {\n      const z = ctx.plugin.external('zod.z');\n      const hasAnyLazy = items.some((item) => item.meta.hasLazy);\n\n      let expression = items[0]!.expression;\n      items.slice(1).forEach((item) => {\n        expression = $(z)\n          .attr(identifiers.intersection)\n          .call(\n            expression,\n            item.meta.hasLazy\n              ? $(z).attr(identifiers.lazy).call($.func().do(item.expression.return()))\n              : item.expression,\n          );\n      });\n\n      return {\n        expression,\n        meta: {\n          default: parentSchema.default,\n          format: parentSchema.format,\n          hasLazy: hasAnyLazy,\n          isLazy: false,\n          nullable: items.some((i) => i.meta.nullable),\n          readonly: items.some((i) => i.meta.readonly),\n        },\n      };\n    },\n    never(schema, ctx) {\n      const expression = neverToAst({ plugin: ctx.plugin, schema });\n      return {\n        expression,\n        meta: {\n          ...defaultMeta(schema),\n          nullable: false,\n          readonly: false,\n        },\n      };\n    },\n    null(schema, ctx) {\n      const expression = nullToAst({ plugin: ctx.plugin, schema });\n      return {\n        expression,\n        meta: {\n          ...defaultMeta(schema),\n          nullable: false,\n          readonly: false,\n        },\n      };\n    },\n    number(schema, ctx) {\n      const expression = numberToNode({ plugin: ctx.plugin, schema });\n      return {\n        expression,\n        meta: {\n          ...defaultMeta(schema),\n          format: schema.format,\n        },\n      };\n    },\n    object(schema, ctx, walk) {\n      const applyModifiers: Parameters<typeof objectToAst>[0]['applyModifiers'] = (result, opts) =>\n        this.applyModifiers(result, ctx, opts) as ZodFinal;\n      const { childResults, expression } = objectToAst({\n        applyModifiers,\n        plugin: ctx.plugin,\n        schema,\n        walk,\n        walkerCtx: ctx,\n      });\n\n      return {\n        expression,\n        meta: inheritMeta(schema, childResults),\n      };\n    },\n    postProcess(result, schema, ctx) {\n      const { metadata } = ctx.plugin.config;\n\n      if (!metadata) {\n        return result;\n      }\n\n      const node = $.object();\n\n      if (metadata === true) {\n        if (!schema.description) {\n          return result;\n        }\n        node.pretty().prop('description', $.literal(schema.description));\n      } else {\n        metadata({ $, node, schema });\n      }\n\n      if (node.isEmpty) {\n        return result;\n      }\n\n      const z = ctx.plugin.external('zod.z');\n\n      return {\n        ...result,\n        expression: result.expression\n          .attr(identifiers.register)\n          .call($(z).attr(identifiers.globalRegistry), node),\n      };\n    },\n    reference($ref, schema, ctx) {\n      const z = ctx.plugin.external('zod.z');\n      const query: SymbolMeta = {\n        category: 'schema',\n        resource: 'definition',\n        resourceId: $ref,\n        tool: 'zod',\n      };\n\n      const refSymbol = ctx.plugin.referenceSymbol(query);\n\n      if (ctx.plugin.isSymbolRegistered(query)) {\n        return {\n          expression: $(refSymbol),\n          meta: defaultMeta(schema),\n        };\n      }\n\n      return {\n        expression: $(z)\n          .attr(identifiers.lazy)\n          .call($.func().returns('any').do($(refSymbol).return())),\n        meta: {\n          ...defaultMeta(schema),\n          hasLazy: true,\n          isLazy: true,\n        },\n      };\n    },\n    string(schema, ctx) {\n      if (shouldCoerceToBigInt(schema.format)) {\n        const expression = numberToNode({\n          plugin: ctx.plugin,\n          schema: { ...schema, type: 'number' },\n        });\n        return {\n          expression,\n          meta: defaultMeta(schema),\n        };\n      }\n\n      const expression = stringToNode({ plugin: ctx.plugin, schema });\n      return {\n        expression,\n        meta: defaultMeta(schema),\n      };\n    },\n    tuple(schema, ctx, walk) {\n      const applyModifiers: Parameters<typeof tupleToAst>[0]['applyModifiers'] = (result, opts) =>\n        this.applyModifiers(result, ctx, opts) as ZodFinal;\n      const { childResults, expression } = tupleToAst({\n        applyModifiers,\n        plugin: ctx.plugin,\n        schema,\n        walk,\n        walkerCtx: ctx,\n      });\n\n      return {\n        expression,\n        meta: inheritMeta(schema, childResults),\n      };\n    },\n    undefined(schema, ctx) {\n      const expression = undefinedToAst({ plugin: ctx.plugin, schema });\n      return {\n        expression,\n        meta: {\n          ...defaultMeta(schema),\n          nullable: false,\n          readonly: false,\n        },\n      };\n    },\n    union(items, schemas, parentSchema, ctx) {\n      const z = ctx.plugin.external('zod.z');\n      const hasAnyLazy = items.some((item) => item.meta.hasLazy);\n\n      const hasNull = schemas.some((s) => s.type === 'null') || items.some((i) => i.meta.nullable);\n\n      const nonNullItems: typeof items = [];\n\n      items.forEach((item, index) => {\n        const schema = schemas[index]!;\n        if (schema.type !== 'null' && schema.const !== null) {\n          nonNullItems.push(item);\n        }\n      });\n\n      let expression: Chain;\n      if (nonNullItems.length === 0) {\n        expression = $(z).attr(identifiers.null).call();\n      } else if (nonNullItems.length === 1) {\n        expression = nonNullItems[0]!.expression;\n      } else {\n        expression = $(z)\n          .attr(identifiers.union)\n          .call(\n            $.array()\n              .pretty()\n              .elements(...nonNullItems.map((item) => item.expression)),\n          );\n      }\n\n      return {\n        expression,\n        meta: {\n          default: parentSchema.default,\n          format: parentSchema.format,\n          hasLazy: hasAnyLazy,\n          isLazy: false,\n          nullable: hasNull,\n          readonly: items.some((i) => i.meta.readonly),\n        },\n      };\n    },\n    unknown(schema, ctx) {\n      const expression = unknownToAst({ plugin: ctx.plugin, schema });\n      return {\n        expression,\n        meta: {\n          ...defaultMeta(schema),\n          nullable: false,\n          readonly: false,\n        },\n      };\n    },\n    void(schema, ctx) {\n      const expression = voidToAst({ plugin: ctx.plugin, schema });\n      return {\n        expression,\n        meta: {\n          ...defaultMeta(schema),\n          nullable: false,\n          readonly: false,\n        },\n      };\n    },\n  };\n}\n"
  },
  {
    "path": "packages/openapi-ts/src/plugins/zod/plugin.ts",
    "content": "import { handlerMini } from './mini/plugin';\nimport type { ZodPlugin } from './types';\nimport { handlerV3 } from './v3/plugin';\nimport { handlerV4 } from './v4/plugin';\n\nexport const handler: ZodPlugin['Handler'] = (args) => {\n  const { plugin } = args;\n  switch (plugin.config.compatibilityVersion) {\n    case 3:\n      return handlerV3(args);\n    case 'mini':\n      return handlerMini(args);\n    case 4:\n    default:\n      return handlerV4(args);\n  }\n};\n"
  },
  {
    "path": "packages/openapi-ts/src/plugins/zod/resolvers.ts",
    "content": "import type { Symbol } from '@hey-api/codegen-core';\nimport type { IR, Plugin, SchemaVisitorContext, SchemaWithType, Walker } from '@hey-api/shared';\nimport type { MaybeArray } from '@hey-api/types';\nimport type ts from 'typescript';\n\nimport type { MaybeBigInt, ShouldCoerceToBigInt } from '../../plugins/shared/utils/coerce';\nimport type { GetIntegerLimit } from '../../plugins/shared/utils/formats';\nimport type { $, DollarTsDsl, TsDsl } from '../../ts-dsl';\nimport type { Chain, ChainResult } from './shared/chain';\nimport type { ZodFinal, ZodResult } from './shared/types';\nimport type { ZodPlugin } from './types';\n\nexport type ZodResolvers = Plugin.Resolvers<{\n  /**\n   * Resolver for array schemas.\n   *\n   * Allows customization of how array types are rendered.\n   *\n   * Returning `undefined` will execute the default resolver logic.\n   */\n  array?: (ctx: ArrayResolverContext) => ChainResult;\n  /**\n   * Resolver for boolean schemas.\n   *\n   * Allows customization of how boolean types are rendered.\n   *\n   * Returning `undefined` will execute the default resolver logic.\n   */\n  boolean?: (ctx: BooleanResolverContext) => ChainResult;\n  /**\n   * Resolver for enum schemas.\n   *\n   * Allows customization of how enum types are rendered.\n   *\n   * Returning `undefined` will execute the default resolver logic.\n   */\n  enum?: (ctx: EnumResolverContext) => ChainResult;\n  /**\n   * Resolver for intersection schemas.\n   *\n   * Allows customization of how intersection types are rendered.\n   *\n   * Returning `undefined` will execute the default resolver logic.\n   */\n  intersection?: (ctx: IntersectionResolverContext) => ChainResult;\n  /**\n   * Resolver for never schemas.\n   *\n   * Allows customization of how never types are rendered.\n   *\n   * Returning `undefined` will execute the default resolver logic.\n   */\n  never?: (ctx: NeverResolverContext) => ChainResult;\n  /**\n   * Resolver for null schemas.\n   *\n   * Allows customization of how null types are rendered.\n   *\n   * Returning `undefined` will execute the default resolver logic.\n   */\n  null?: (ctx: NullResolverContext) => ChainResult;\n  /**\n   * Resolver for number schemas.\n   *\n   * Allows customization of how number types are rendered.\n   *\n   * Returning `undefined` will execute the default resolver logic.\n   */\n  number?: (ctx: NumberResolverContext) => ChainResult;\n  /**\n   * Resolver for object schemas.\n   *\n   * Allows customization of how object types are rendered.\n   *\n   * Returning `undefined` will execute the default resolver logic.\n   */\n  object?: (ctx: ObjectResolverContext) => ChainResult;\n  /**\n   * Resolver for string schemas.\n   *\n   * Allows customization of how string types are rendered.\n   *\n   * Returning `undefined` will execute the default resolver logic.\n   */\n  string?: (ctx: StringResolverContext) => ChainResult;\n  /**\n   * Resolver for tuple schemas.\n   *\n   * Allows customization of how tuple types are rendered.\n   *\n   * Returning `undefined` will execute the default resolver logic.\n   */\n  tuple?: (ctx: TupleResolverContext) => ChainResult;\n  /**\n   * Resolver for undefined schemas.\n   *\n   * Allows customization of how undefined types are rendered.\n   *\n   * Returning `undefined` will execute the default resolver logic.\n   */\n  undefined?: (ctx: UndefinedResolverContext) => ChainResult;\n  /**\n   * Resolver for union schemas.\n   *\n   * Allows customization of how union types are rendered.\n   *\n   * Returning `undefined` will execute the default resolver logic.\n   */\n  union?: (ctx: UnionResolverContext) => ChainResult;\n  /**\n   * Resolver for unknown schemas.\n   *\n   * Allows customization of how unknown types are rendered.\n   *\n   * Returning `undefined` will execute the default resolver logic.\n   */\n  unknown?: (ctx: UnknownResolverContext) => ChainResult;\n  /**\n   * Resolvers for request and response validators.\n   *\n   * Allow customization of validator function bodies.\n   *\n   * Example path: `~resolvers.validator.request` or `~resolvers.validator.response`\n   *\n   * Returning `undefined` will execute the default resolver logic.\n   */\n  validator?:\n    | ValidatorResolver\n    | {\n        /**\n         * Controls how the request validator function body is generated.\n         *\n         * Returning `undefined` will execute the default resolver logic.\n         */\n        request?: ValidatorResolver;\n        /**\n         * Controls how the response validator function body is generated.\n         *\n         * Returning `undefined` will execute the default resolver logic.\n         */\n        response?: ValidatorResolver;\n      };\n  /**\n   * Resolver for void schemas.\n   *\n   * Allows customization of how void types are rendered.\n   *\n   * Returning `undefined` will execute the default resolver logic.\n   */\n  void?: (ctx: VoidResolverContext) => ChainResult;\n}>;\n\ntype ValidatorResolver = (\n  ctx: ValidatorResolverContext,\n) => MaybeArray<TsDsl<ts.Statement>> | null | undefined;\n\ninterface BaseContext extends DollarTsDsl {\n  /**\n   * Functions for working with chains.\n   */\n  chain: {\n    /**\n     * The current chain.\n     *\n     * In Zod, this represents a chain of method calls being assembled\n     * to form a schema definition (e.g., `z.string().min(1).max(10)`).\n     *\n     * Each method can be extended, modified, or replaced to customize\n     * the resulting schema.\n     */\n    current: Chain;\n  };\n  /** The plugin instance. */\n  plugin: ZodPlugin['Instance'];\n  /**\n   * Provides access to commonly used symbols within the plugin.\n   */\n  symbols: {\n    z: Symbol;\n  };\n}\n\nexport interface ArrayResolverContext extends BaseContext {\n  applyModifiers: (result: ZodResult, opts?: { optional?: boolean }) => ZodFinal;\n  /**\n   * Child results from processing array items.\n   */\n  childResults: Array<ZodResult>;\n  /**\n   * Nodes used to build different parts of the result.\n   */\n  nodes: {\n    /**\n     * Returns the base array expression (z.array(...)).\n     */\n    base: (ctx: ArrayResolverContext) => Chain;\n    /**\n     * Returns a length constraint (when minItems === maxItems), if applicable.\n     */\n    length: (ctx: ArrayResolverContext) => ChainResult;\n    /**\n     * Returns a maxItems constraint, if applicable.\n     */\n    maxLength: (ctx: ArrayResolverContext) => ChainResult;\n    /**\n     * Returns a minItems constraint, if applicable.\n     */\n    minLength: (ctx: ArrayResolverContext) => ChainResult;\n  };\n  schema: SchemaWithType<'array'>;\n  walk: Walker<ZodResult, ZodPlugin['Instance']>;\n  walkerCtx: SchemaVisitorContext<ZodPlugin['Instance']>;\n}\n\nexport interface BooleanResolverContext extends BaseContext {\n  /**\n   * Nodes used to build different parts of the result.\n   */\n  nodes: {\n    /**\n     * Returns the base boolean expression (z.boolean()).\n     */\n    base: (ctx: BooleanResolverContext) => Chain;\n    /**\n     * Returns a literal expression for the const value, if present.\n     */\n    const: (ctx: BooleanResolverContext) => ChainResult;\n  };\n  schema: SchemaWithType<'boolean'>;\n}\n\nexport interface EnumResolverContext extends BaseContext {\n  /**\n   * Nodes used to build different parts of the result.\n   */\n  nodes: {\n    /**\n     * Returns the base enum expression (z.enum([...]) or z.union([...])).\n     */\n    base: (ctx: EnumResolverContext) => Chain;\n    /**\n     * Returns parsed enum items with metadata about the enum members.\n     */\n    items: (ctx: EnumResolverContext) => {\n      /**\n       * Whether all enum members are strings.\n       */\n      allStrings: boolean;\n      /**\n       * String literal values for use with z.enum([...]).\n       */\n      enumMembers: Array<ReturnType<typeof $.literal>>;\n      /**\n       * Whether the enum includes a null value.\n       */\n      isNullable: boolean;\n      /**\n       * Zod literal expressions for each enum member.\n       */\n      literalMembers: Array<Chain>;\n    };\n  };\n  schema: SchemaWithType<'enum'>;\n}\n\nexport interface IntersectionResolverContext extends BaseContext {\n  childResults: Array<ZodResult>;\n  /**\n   * Nodes used to build different parts of the result.\n   */\n  nodes: {\n    /**\n     * Returns the base intersection expression.\n     */\n    base: (ctx: IntersectionResolverContext) => Chain;\n  };\n  parentSchema: IR.SchemaObject;\n  schema: IR.SchemaObject;\n  walk: Walker<ZodResult, ZodPlugin['Instance']>;\n  walkerCtx: SchemaVisitorContext<ZodPlugin['Instance']>;\n}\n\nexport interface NeverResolverContext extends BaseContext {\n  /**\n   * Nodes used to build different parts of the result.\n   */\n  nodes: {\n    /**\n     * Returns the base never expression (z.never()).\n     */\n    base: (ctx: NeverResolverContext) => Chain;\n  };\n  schema: SchemaWithType<'never'>;\n}\n\nexport interface NullResolverContext extends BaseContext {\n  /**\n   * Nodes used to build different parts of the result.\n   */\n  nodes: {\n    /**\n     * Returns the base null expression (z.null()).\n     */\n    base: (ctx: NullResolverContext) => Chain;\n  };\n  schema: SchemaWithType<'null'>;\n}\n\nexport interface NumberResolverContext extends BaseContext {\n  /**\n   * Nodes used to build different parts of the result.\n   */\n  nodes: {\n    /**\n     * Returns the base number expression (z.number() or z.coerce.number()).\n     */\n    base: (ctx: NumberResolverContext) => Chain;\n    /**\n     * Returns a literal expression for the const value, if present.\n     */\n    const: (ctx: NumberResolverContext) => ChainResult;\n    /**\n     * Returns the maximum value constraint.\n     */\n    max: (ctx: NumberResolverContext) => ChainResult;\n    /**\n     * Returns the minimum value constraint.\n     */\n    min: (ctx: NumberResolverContext) => ChainResult;\n  };\n  schema: SchemaWithType<'integer' | 'number'>;\n  /**\n   * Utility functions for number schema processing.\n   */\n  utils: {\n    getIntegerLimit: GetIntegerLimit;\n    maybeBigInt: MaybeBigInt;\n    shouldCoerceToBigInt: ShouldCoerceToBigInt;\n  };\n}\n\nexport interface ObjectResolverContext extends BaseContext {\n  /**\n   * Child results from processing object properties.\n   * Used for metadata composition.\n   */\n  _childResults: Array<ZodResult>;\n  applyModifiers: (result: ZodResult, opts: { optional?: boolean }) => ZodFinal;\n  /**\n   * Nodes used to build different parts of the result.\n   */\n  nodes: {\n    /**\n     * Returns the additional properties expression, if any.\n     */\n    additionalProperties: (ctx: ObjectResolverContext) => Chain | null | undefined;\n    /**\n     * Returns the base object expression (z.object({...}) or z.record(...)).\n     */\n    base: (ctx: ObjectResolverContext) => Chain;\n    /**\n     * Returns the object shape (property definitions).\n     */\n    shape: (ctx: ObjectResolverContext) => ReturnType<typeof $.object>;\n  };\n  schema: SchemaWithType<'object'>;\n  walk: Walker<ZodResult, ZodPlugin['Instance']>;\n  walkerCtx: SchemaVisitorContext<ZodPlugin['Instance']>;\n}\n\nexport interface StringResolverContext extends BaseContext {\n  /**\n   * Nodes used to build different parts of the result.\n   */\n  nodes: {\n    /**\n     * Returns the base string expression (z.string()).\n     */\n    base: (ctx: StringResolverContext) => Chain;\n    /**\n     * Returns a literal expression for the const value, if present.\n     */\n    const: (ctx: StringResolverContext) => ChainResult;\n    /**\n     * Returns a format validation expression, if applicable.\n     */\n    format: (ctx: StringResolverContext) => ChainResult;\n    /**\n     * Returns a length constraint (when min === max), if applicable.\n     */\n    length: (ctx: StringResolverContext) => ChainResult;\n    /**\n     * Returns a maxLength constraint, if applicable.\n     */\n    maxLength: (ctx: StringResolverContext) => ChainResult;\n    /**\n     * Returns a minLength constraint, if applicable.\n     */\n    minLength: (ctx: StringResolverContext) => ChainResult;\n    /**\n     * Returns a pattern (regex) constraint, if applicable.\n     */\n    pattern: (ctx: StringResolverContext) => ChainResult;\n  };\n  schema: SchemaWithType<'string'>;\n}\n\nexport interface TupleResolverContext extends BaseContext {\n  applyModifiers: (result: ZodResult, opts?: { optional?: boolean }) => ZodFinal;\n  childResults: Array<ZodResult>;\n  /**\n   * Nodes used to build different parts of the result.\n   */\n  nodes: {\n    /**\n     * Returns the base tuple expression (z.tuple([...])).\n     */\n    base: (ctx: TupleResolverContext) => Chain;\n    /**\n     * Returns a literal expression for the const value, if present.\n     */\n    const: (ctx: TupleResolverContext) => ChainResult;\n  };\n  schema: SchemaWithType<'tuple'>;\n  walk: Walker<ZodResult, ZodPlugin['Instance']>;\n  walkerCtx: SchemaVisitorContext<ZodPlugin['Instance']>;\n}\n\nexport interface UndefinedResolverContext extends BaseContext {\n  /**\n   * Nodes used to build different parts of the result.\n   */\n  nodes: {\n    /**\n     * Returns the base undefined expression (z.undefined()).\n     */\n    base: (ctx: UndefinedResolverContext) => Chain;\n  };\n  schema: SchemaWithType<'undefined'>;\n}\n\nexport interface UnionResolverContext extends BaseContext {\n  childResults: Array<ZodResult>;\n  /**\n   * Nodes used to build different parts of the result.\n   */\n  nodes: {\n    /**\n     * Returns the base union expression.\n     */\n    base: (ctx: UnionResolverContext) => Chain;\n  };\n  parentSchema: IR.SchemaObject;\n  schema: IR.SchemaObject;\n  schemas: ReadonlyArray<IR.SchemaObject>;\n  walk: Walker<ZodResult, ZodPlugin['Instance']>;\n  walkerCtx: SchemaVisitorContext<ZodPlugin['Instance']>;\n}\n\nexport interface UnknownResolverContext extends BaseContext {\n  /**\n   * Nodes used to build different parts of the result.\n   */\n  nodes: {\n    /**\n     * Returns the base unknown expression (z.unknown()).\n     */\n    base: (ctx: UnknownResolverContext) => Chain;\n  };\n  schema: SchemaWithType<'unknown'>;\n}\n\nexport interface ValidatorResolverContext extends BaseContext {\n  operation: IR.OperationObject;\n  /**\n   * Provides access to commonly used symbols within the plugin.\n   */\n  symbols: BaseContext['symbols'] & {\n    schema: Symbol;\n  };\n}\n\nexport interface VoidResolverContext extends BaseContext {\n  /**\n   * Nodes used to build different parts of the result.\n   */\n  nodes: {\n    /**\n     * Returns the base void expression (z.void()).\n     */\n    base: (ctx: VoidResolverContext) => Chain;\n  };\n  schema: SchemaWithType<'void'>;\n}\n"
  },
  {
    "path": "packages/openapi-ts/src/plugins/zod/shared/chain.ts",
    "content": "import type { $ } from '../../../ts-dsl';\n\nexport type Chain = ReturnType<typeof $.call | typeof $.expr>;\nexport type ChainResult = Chain | undefined;\n"
  },
  {
    "path": "packages/openapi-ts/src/plugins/zod/shared/export.ts",
    "content": "import { buildSymbolIn, pathToName } from '@hey-api/shared';\n\nimport { createSchemaComment } from '../../../plugins/shared/utils/schema';\nimport { $ } from '../../../ts-dsl';\nimport { identifiers } from '../constants';\nimport type { ProcessorContext } from './processor';\nimport type { ZodFinal } from './types';\n\nexport function exportAst({\n  final,\n  meta,\n  naming,\n  namingAnchor,\n  path,\n  plugin,\n  schema,\n  tags,\n}: ProcessorContext & {\n  final: ZodFinal;\n  meta?: Record<string, unknown>;\n}): void {\n  const z = plugin.external('zod.z');\n\n  const name = pathToName(path, { anchor: namingAnchor });\n\n  const symbol = plugin.registerSymbol(\n    buildSymbolIn({\n      meta: {\n        category: 'schema',\n        path,\n        tags,\n        tool: 'zod',\n        ...meta,\n      },\n      name,\n      naming,\n      plugin,\n      schema,\n    }),\n  );\n\n  const typeInferSymbol = naming.types.infer.enabled\n    ? plugin.registerSymbol(\n        buildSymbolIn({\n          meta: {\n            category: 'type',\n            path,\n            tags,\n            tool: 'zod',\n            variant: 'infer',\n            ...meta,\n          },\n          name,\n          naming: naming.types.infer,\n          plugin,\n          schema,\n        }),\n      )\n    : undefined;\n\n  const statement = $.const(symbol)\n    .export()\n    .$if(plugin.config.comments && createSchemaComment(schema), (c, v) => c.doc(v))\n    .$if(final.typeName, (c) => c.type($.type(z).attr(final.typeName!)))\n    .assign(final.expression);\n  plugin.node(statement);\n\n  if (typeInferSymbol) {\n    const inferType = $.type\n      .alias(typeInferSymbol)\n      .export()\n      .type($.type(z).attr(identifiers.infer).generic($(symbol).typeofType()));\n    plugin.node(inferType);\n  }\n}\n"
  },
  {
    "path": "packages/openapi-ts/src/plugins/zod/shared/meta.ts",
    "content": "import type { IR } from '@hey-api/shared';\n\nimport type { ZodMeta, ZodResult } from './types';\n\n/**\n * Creates default metadata from a schema.\n */\nexport function defaultMeta(schema: IR.SchemaObject): ZodMeta {\n  return {\n    default: schema.default,\n    format: schema.format,\n    hasLazy: false,\n    isLazy: false,\n    isObject: false,\n    nullable: false,\n    readonly: schema.accessScope === 'read',\n  };\n}\n\n/**\n * Composes metadata from child results.\n *\n * @param children - Results from walking child schemas\n * @param overrides - Explicit overrides (e.g., from parent schema)\n */\nexport function composeMeta(\n  children: ReadonlyArray<ZodResult>,\n  overrides?: Partial<ZodMeta>,\n): ZodMeta {\n  return {\n    default: overrides?.default,\n    format: overrides?.format,\n    hasLazy: overrides?.hasLazy ?? children.some((c) => c.meta.hasLazy),\n    isLazy: overrides?.isLazy ?? children.some((c) => c.meta.isLazy),\n    isObject: overrides?.isObject ?? children.some((c) => c.meta.isObject),\n    nullable: overrides?.nullable ?? children.some((c) => c.meta.nullable),\n    readonly: overrides?.readonly ?? children.some((c) => c.meta.readonly),\n  };\n}\n\n/**\n * Merges parent schema metadata with composed child metadata.\n *\n * @param parent - The parent schema\n * @param children - Results from walking child schemas\n */\nexport function inheritMeta(parent: IR.SchemaObject, children: ReadonlyArray<ZodResult>): ZodMeta {\n  return composeMeta(children, {\n    default: parent.default,\n    format: parent.format,\n    nullable: false,\n    readonly: parent.accessScope === 'read',\n  });\n}\n"
  },
  {
    "path": "packages/openapi-ts/src/plugins/zod/shared/module.ts",
    "content": "import type { ZodPlugin } from '../types';\n\nexport function getZodModule({ plugin }: { plugin: ZodPlugin['Instance'] }): string {\n  const version = plugin.package.getVersion('zod');\n\n  if (version) {\n    if (plugin.package.satisfies(version, '<4.0.0')) {\n      switch (plugin.config.compatibilityVersion) {\n        case 3:\n        default:\n          return 'zod';\n        case 4:\n          return 'zod/v4';\n        case 'mini':\n          return 'zod/v4-mini';\n      }\n    }\n  }\n\n  switch (plugin.config.compatibilityVersion) {\n    case 3:\n      return 'zod/v3';\n    case 4:\n    default:\n      return 'zod';\n    case 'mini':\n      return 'zod/mini';\n  }\n}\n"
  },
  {
    "path": "packages/openapi-ts/src/plugins/zod/shared/operation-schema.ts",
    "content": "import type { IR } from '@hey-api/shared';\n\nexport interface OperationSchemaResult {\n  required: ReadonlyArray<string>;\n  schema: IR.SchemaObject;\n}\n\nexport function buildOperationSchema(operation: IR.OperationObject): OperationSchemaResult {\n  const requiredProperties = new Set<string>();\n\n  const schema: IR.SchemaObject = {\n    properties: {\n      body: { type: 'never' },\n      path: { type: 'never' },\n      query: { type: 'never' },\n    },\n    type: 'object',\n  };\n\n  if (operation.parameters) {\n    // TODO: add support for cookies\n\n    for (const location of ['header', 'path', 'query'] satisfies ReadonlyArray<\n      keyof typeof operation.parameters\n    >) {\n      const params = operation.parameters[location];\n      if (!params) continue;\n\n      const properties: Record<string, IR.SchemaObject> = {};\n      const required: Array<string> = [];\n      const propKey = location === 'header' ? 'headers' : location;\n\n      for (const key in params) {\n        const parameter = params[key]!;\n        properties[parameter.name] = parameter.schema;\n        if (parameter.required) {\n          required.push(parameter.name);\n          requiredProperties.add(propKey);\n        }\n      }\n\n      if (Object.keys(properties).length) {\n        schema.properties![propKey] = { properties, required, type: 'object' };\n      }\n    }\n  }\n\n  if (operation.body) {\n    schema.properties!.body = operation.body.schema;\n    if (operation.body.required) {\n      requiredProperties.add('body');\n    }\n  }\n\n  schema.required = [...requiredProperties];\n\n  return { required: schema.required, schema };\n}\n"
  },
  {
    "path": "packages/openapi-ts/src/plugins/zod/shared/operation.ts",
    "content": "import type { IR } from '@hey-api/shared';\nimport { operationResponsesMap } from '@hey-api/shared';\n\nimport { buildOperationSchema } from './operation-schema';\nimport type { ProcessorContext, ProcessorResult } from './processor';\n\nexport function irOperationToAst({\n  operation,\n  path,\n  plugin,\n  processor,\n  tags,\n}: Pick<ProcessorContext, 'path' | 'plugin' | 'tags'> & {\n  operation: IR.OperationObject;\n  processor: ProcessorResult;\n}): void {\n  if (plugin.config.requests.enabled) {\n    const { schema } = buildOperationSchema(operation);\n\n    processor.process({\n      meta: {\n        resource: 'operation',\n        resourceId: operation.id,\n        role: 'data',\n      },\n      naming: plugin.config.requests,\n      namingAnchor: operation.id,\n      path,\n      plugin,\n      schema,\n      tags,\n    });\n  }\n\n  if (plugin.config.responses.enabled) {\n    if (operation.responses) {\n      const { response } = operationResponsesMap(operation);\n\n      if (response) {\n        processor.process({\n          meta: {\n            resource: 'operation',\n            resourceId: operation.id,\n            role: 'responses',\n          },\n          naming: plugin.config.responses,\n          namingAnchor: operation.id,\n          path: [...path, 'responses'],\n          plugin,\n          schema: response,\n          tags,\n        });\n      }\n    }\n  }\n}\n"
  },
  {
    "path": "packages/openapi-ts/src/plugins/zod/shared/processor.ts",
    "content": "import type { IR, NamingConfig, SchemaProcessorContext } from '@hey-api/shared';\n\nimport type { ZodPlugin } from '../types';\nimport type { TypeOptions, ZodFinal } from './types';\n\nexport type ProcessorContext = SchemaProcessorContext & {\n  /** Whether to export the result (default: true) */\n  export?: boolean;\n  naming: NamingConfig & TypeOptions;\n  /** The plugin instance. */\n  plugin: ZodPlugin['Instance'];\n  schema: IR.SchemaObject;\n};\n\nexport type ProcessorResult = {\n  process: (ctx: ProcessorContext) => ZodFinal | void;\n};\n"
  },
  {
    "path": "packages/openapi-ts/src/plugins/zod/shared/types.ts",
    "content": "import type { FeatureToggle, IR, NamingOptions } from '@hey-api/shared';\nimport type ts from 'typescript';\n\nimport type { ZodPlugin } from '../types';\nimport type { Chain } from './chain';\n\nexport type ValidatorArgs = {\n  operation: IR.OperationObject;\n  /** The plugin instance. */\n  plugin: ZodPlugin['Instance'];\n};\n\nexport type TypeOptions = {\n  types: {\n    infer: NamingOptions & FeatureToggle;\n  };\n};\n\n/**\n * Metadata that flows through schema walking.\n */\nexport interface ZodMeta {\n  /** Default value from schema. */\n  default?: unknown;\n  /** Original format (for BigInt coercion). */\n  format?: string;\n  /** Whether this or any child contains a lazy reference. */\n  hasLazy: boolean;\n  /** Whether this schema itself is emitted as lazy. */\n  isLazy: boolean;\n  /** Whether this schema resolves to an object shape. */\n  isObject?: boolean;\n  /** Does this schema explicitly allow null? */\n  nullable: boolean;\n  /** Is this schema read-only? */\n  readonly: boolean;\n}\n\n/**\n * Result from walking a schema node.\n */\nexport interface ZodResult {\n  expression: Chain;\n  meta: ZodMeta;\n}\n\n/**\n * Finalized result after applyModifiers.\n */\nexport interface ZodFinal extends Pick<ZodResult, 'expression'> {\n  /** Type annotation for schemas requiring explicit typing (e.g., lazy). */\n  typeName?: string | ts.Identifier;\n}\n\n/**\n * Result from composite handlers that walk children.\n */\nexport interface CompositeHandlerResult extends Pick<ZodResult, 'expression'> {\n  childResults: Array<ZodResult>;\n}\n"
  },
  {
    "path": "packages/openapi-ts/src/plugins/zod/shared/webhook.ts",
    "content": "import type { IR } from '@hey-api/shared';\n\nimport { buildOperationSchema } from './operation-schema';\nimport type { ProcessorContext, ProcessorResult } from './processor';\n\nexport function irWebhookToAst({\n  operation,\n  path,\n  plugin,\n  processor,\n  tags,\n}: Pick<ProcessorContext, 'path' | 'plugin' | 'tags'> & {\n  operation: IR.OperationObject;\n  processor: ProcessorResult;\n}): void {\n  if (plugin.config.webhooks.enabled) {\n    const { schema } = buildOperationSchema(operation);\n\n    processor.process({\n      meta: {\n        resource: 'webhook',\n        resourceId: operation.id,\n        role: 'data',\n      },\n      naming: plugin.config.webhooks,\n      namingAnchor: operation.id,\n      path,\n      plugin,\n      schema,\n      tags,\n    });\n  }\n}\n"
  },
  {
    "path": "packages/openapi-ts/src/plugins/zod/types.ts",
    "content": "import type {\n  Casing,\n  DefinePlugin,\n  FeatureToggle,\n  IR,\n  NameTransformer,\n  NamingOptions,\n  Plugin,\n} from '@hey-api/shared';\n\nimport type { $, DollarTsDsl } from '../../ts-dsl';\nimport type { IApi } from './api';\nimport type { ZodResolvers } from './resolvers';\nimport type { TypeOptions } from './shared/types';\n\nexport type UserConfig = Plugin.Name<'zod'> &\n  Plugin.Hooks &\n  Plugin.UserComments &\n  Plugin.UserExports &\n  ZodResolvers & {\n    /**\n     * Casing convention for generated names.\n     *\n     * @default 'camelCase'\n     */\n    case?: Casing;\n    /**\n     * The compatibility version to target for generated output.\n     *\n     * Can be:\n     * - `4`: [Zod 4](https://zod.dev/packages/zod) (default).\n     * - `3`: [Zod 3](https://v3.zod.dev/).\n     * - `'mini'`: [Zod Mini](https://zod.dev/packages/mini).\n     *\n     * @default 4\n     */\n    compatibilityVersion?: 3 | 4 | 'mini';\n    /**\n     * Configuration for date handling in generated Zod schemas.\n     *\n     * Controls how date values are processed and validated using Zod's\n     * date validation features.\n     */\n    dates?: {\n      /**\n       * Whether to allow unqualified (timezone-less) datetimes:\n       *\n       * When enabled, Zod will accept datetime strings without timezone information.\n       * When disabled, Zod will require timezone information in datetime strings.\n       *\n       * @default false\n       */\n      local?: boolean;\n      /**\n       * Whether to include timezone offset information when handling dates.\n       *\n       * When enabled, date strings will preserve timezone information.\n       * When disabled, dates will be treated as local time.\n       *\n       * @default false\n       */\n      offset?: boolean;\n    };\n    /**\n     * Configuration for reusable schema definitions.\n     *\n     * Controls generation of shared Zod schemas that can be referenced across\n     * requests and responses.\n     *\n     * Can be:\n     * - `boolean`: Shorthand for `{ enabled: boolean }`\n     * - `string` or `function`: Shorthand for `{ name: string | function }`\n     * - `object`: Full configuration object\n     *\n     * @default true\n     */\n    definitions?:\n      | boolean\n      | NameTransformer\n      | {\n          /**\n           * Casing convention for generated names.\n           *\n           * @default 'camelCase'\n           */\n          case?: Casing;\n          /**\n           * Whether this feature is enabled.\n           *\n           * @default true\n           */\n          enabled?: boolean;\n          /**\n           * Naming pattern for generated names.\n           *\n           * @default 'z{{name}}'\n           */\n          name?: NameTransformer;\n          /**\n           * Configuration for TypeScript type generation from Zod schemas.\n           *\n           * Controls generation of TypeScript types based on the generated Zod schemas.\n           */\n          types?: {\n            /**\n             * Configuration for `infer` types.\n             *\n             * Can be:\n             * - `boolean`: Shorthand for `{ enabled: boolean }`\n             * - `string` or `function`: Shorthand for `{ name: string | function }`\n             * - `object`: Full configuration object\n             *\n             * @default false\n             */\n            infer?:\n              | boolean\n              | NameTransformer\n              | {\n                  /**\n                   * Casing convention for generated names.\n                   *\n                   * @default 'PascalCase'\n                   */\n                  case?: Casing;\n                  /**\n                   * Whether this feature is enabled.\n                   *\n                   * @default true\n                   */\n                  enabled?: boolean;\n                  /**\n                   * Naming pattern for generated names.\n                   *\n                   * @default '{{name}}ZodType'\n                   */\n                  name?: NameTransformer;\n                };\n          };\n        };\n    /**\n     * Enable Zod metadata support? It's often useful to associate a schema with\n     * some additional metadata for documentation, code generation, AI\n     * structured outputs, form validation, and other purposes.\n     *\n     * Can be:\n     * - `boolean`: Shorthand for the default metadata builder. When `true`,\n     *   attaches `{ description }` from the schema (if present) to the\n     *   generated Zod schema via the metadata API.\n     * - `function`: Custom metadata builder. Receives `{ $, node, schema }`,\n     *   where `node` is a pre-initialized `$.object().pretty()` node. Add\n     *   properties to `node` to populate the metadata object. Return value is\n     *   ignored; an empty `node` skips metadata for that schema.\n     *   Note: **not supported for Zod 3** (use `boolean` only).\n     *\n     * @default false\n     */\n    metadata?:\n      | boolean\n      | ((\n          ctx: DollarTsDsl & { node: ReturnType<typeof $.object>; schema: IR.SchemaObject },\n        ) => void);\n    /**\n     * Configuration for request-specific Zod schemas.\n     *\n     * Controls generation of Zod schemas for request bodies, query parameters, path\n     * parameters, and headers.\n     *\n     * Can be:\n     * - `boolean`: Shorthand for `{ enabled: boolean }`\n     * - `string` or `function`: Shorthand for `{ name: string | function }`\n     * - `object`: Full configuration object\n     *\n     * @default true\n     */\n    requests?:\n      | boolean\n      | NameTransformer\n      | {\n          /**\n           * Casing convention for generated names.\n           *\n           * @default 'camelCase'\n           */\n          case?: Casing;\n          /**\n           * Whether this feature is enabled.\n           *\n           * @default true\n           */\n          enabled?: boolean;\n          /**\n           * Naming pattern for generated names.\n           *\n           * @default 'z{{name}}Data'\n           */\n          name?: NameTransformer;\n          /**\n           * Configuration for TypeScript type generation from Zod schemas.\n           *\n           * Controls generation of TypeScript types based on the generated Zod schemas.\n           */\n          types?: {\n            /**\n             * Configuration for `infer` types.\n             *\n             * Can be:\n             * - `boolean`: Shorthand for `{ enabled: boolean }`\n             * - `string` or `function`: Shorthand for `{ name: string | function }`\n             * - `object`: Full configuration object\n             *\n             * @default false\n             */\n            infer?:\n              | boolean\n              | NameTransformer\n              | {\n                  /**\n                   * Casing convention for generated names.\n                   *\n                   * @default 'PascalCase'\n                   */\n                  case?: Casing;\n                  /**\n                   * Whether this feature is enabled.\n                   *\n                   * @default true\n                   */\n                  enabled?: boolean;\n                  /**\n                   * Naming pattern for generated names.\n                   *\n                   * @default '{{name}}DataZodType'\n                   */\n                  name?: NameTransformer;\n                };\n          };\n        };\n    /**\n     * Configuration for response-specific Zod schemas.\n     *\n     * Controls generation of Zod schemas for response bodies, error responses,\n     * and status codes.\n     *\n     * Can be:\n     * - `boolean`: Shorthand for `{ enabled: boolean }`\n     * - `string` or `function`: Shorthand for `{ name: string | function }`\n     * - `object`: Full configuration object\n     *\n     * @default true\n     */\n    responses?:\n      | boolean\n      | NameTransformer\n      | {\n          /**\n           * Casing convention for generated names.\n           *\n           * @default 'camelCase'\n           */\n          case?: Casing;\n          /**\n           * Whether this feature is enabled.\n           *\n           * @default true\n           */\n          enabled?: boolean;\n          /**\n           * Naming pattern for generated names.\n           *\n           * @default 'z{{name}}Response'\n           */\n          name?: NameTransformer;\n          /**\n           * Configuration for TypeScript type generation from Zod schemas.\n           *\n           * Controls generation of TypeScript types based on the generated Zod schemas.\n           */\n          types?: {\n            /**\n             * Configuration for `infer` types.\n             *\n             * Can be:\n             * - `boolean`: Shorthand for `{ enabled: boolean }`\n             * - `string` or `function`: Shorthand for `{ name: string | function }`\n             * - `object`: Full configuration object\n             *\n             * @default false\n             */\n            infer?:\n              | boolean\n              | NameTransformer\n              | {\n                  /**\n                   * Casing convention for generated names.\n                   *\n                   * @default 'PascalCase'\n                   */\n                  case?: Casing;\n                  /**\n                   * Whether this feature is enabled.\n                   *\n                   * @default true\n                   */\n                  enabled?: boolean;\n                  /**\n                   * Naming pattern for generated names.\n                   *\n                   * @default '{{name}}ResponseZodType'\n                   */\n                  name?: NameTransformer;\n                };\n          };\n        };\n    /**\n     * Configuration for TypeScript type generation from Zod schemas.\n     *\n     * Controls generation of TypeScript types based on the generated Zod schemas.\n     */\n    types?: {\n      /**\n       * Configuration for `infer` types.\n       *\n       * Can be:\n       * - `boolean`: Shorthand for `{ enabled: boolean }`\n       * - `string` or `function`: Shorthand for `{ name: string | function }`\n       * - `object`: Full configuration object\n       *\n       * @default false\n       */\n      infer?:\n        | boolean\n        | NameTransformer\n        | {\n            /**\n             * Casing convention for generated names.\n             *\n             * @default 'PascalCase'\n             */\n            case?: Casing;\n            /**\n             * Whether this feature is enabled.\n             *\n             * @default true\n             */\n            enabled?: boolean;\n          };\n    };\n    /**\n     * Configuration for webhook-specific Zod schemas.\n     *\n     * Controls generation of Zod schemas for webhook payloads.\n     *\n     * Can be:\n     * - `boolean`: Shorthand for `{ enabled: boolean }`\n     * - `string` or `function`: Shorthand for `{ name: string | function }`\n     * - `object`: Full configuration object\n     *\n     * @default true\n     */\n    webhooks?:\n      | boolean\n      | NameTransformer\n      | {\n          /**\n           * Casing convention for generated names.\n           *\n           * @default 'camelCase'\n           */\n          case?: Casing;\n          /**\n           * Whether this feature is enabled.\n           *\n           * @default true\n           */\n          enabled?: boolean;\n          /**\n           * Naming pattern for generated names.\n           *\n           * @default 'z{{name}}WebhookRequest'\n           */\n          name?: NameTransformer;\n          /**\n           * Configuration for TypeScript type generation from Zod schemas.\n           *\n           * Controls generation of TypeScript types based on the generated Zod schemas.\n           */\n          types?: {\n            /**\n             * Configuration for `infer` types.\n             *\n             * Can be:\n             * - `boolean`: Shorthand for `{ enabled: boolean }`\n             * - `string` or `function`: Shorthand for `{ name: string | function }`\n             * - `object`: Full configuration object\n             *\n             * @default false\n             */\n            infer?:\n              | boolean\n              | NameTransformer\n              | {\n                  /**\n                   * Casing convention for generated names.\n                   *\n                   * @default 'PascalCase'\n                   */\n                  case?: Casing;\n                  /**\n                   * Whether this feature is enabled.\n                   *\n                   * @default true\n                   */\n                  enabled?: boolean;\n                  /**\n                   * Naming pattern for generated names.\n                   *\n                   * @default '{{name}}WebhookRequestZodType'\n                   */\n                  name?: NameTransformer;\n                };\n          };\n        };\n  };\n\nexport type Config = Plugin.Name<'zod'> &\n  Plugin.Hooks &\n  Plugin.Comments &\n  Plugin.Exports &\n  ZodResolvers & {\n    /** Casing convention for generated names. */\n    case: Casing;\n    /** The compatibility version to target for generated output. */\n    compatibilityVersion: 3 | 4 | 'mini';\n    /** Configuration for date handling in generated Zod schemas. */\n    dates: {\n      /** Whether to allow unqualified (timezone-less) datetimes. */\n      local: boolean;\n      /** Whether to include timezone offset information when handling dates. */\n      offset: boolean;\n    };\n    /** Configuration for reusable schema definitions. */\n    definitions: NamingOptions & FeatureToggle & TypeOptions;\n    /** Enable Zod metadata support? */\n    metadata:\n      | boolean\n      | ((\n          ctx: DollarTsDsl & { node: ReturnType<typeof $.object>; schema: IR.SchemaObject },\n        ) => void);\n    /** Configuration for request-specific Zod schemas. */\n    requests: NamingOptions & FeatureToggle & TypeOptions;\n    /** Configuration for response-specific Zod schemas. */\n    responses: NamingOptions & FeatureToggle & TypeOptions;\n    /** Configuration for TypeScript type generation from Zod schemas. */\n    types: {\n      /** Configuration for `infer` types. */\n      infer: FeatureToggle & {\n        /** Casing convention for generated names. */\n        case: Casing;\n      };\n    };\n    /** Configuration for webhook-specific Zod schemas. */\n    webhooks: NamingOptions & FeatureToggle & TypeOptions;\n  };\n\nexport type ZodPlugin = DefinePlugin<UserConfig, Config, IApi>;\n"
  },
  {
    "path": "packages/openapi-ts/src/plugins/zod/v3/api.ts",
    "content": "import { $ } from '../../../ts-dsl';\nimport { identifiers } from '../constants';\nimport type { ValidatorResolverContext } from '../resolvers';\nimport type { ValidatorArgs } from '../shared/types';\n\nconst validatorResolver = (ctx: ValidatorResolverContext): ReturnType<typeof $.return> => {\n  const { schema } = ctx.symbols;\n  return $(schema).attr(identifiers.parseAsync).call('data').await().return();\n};\n\nexport const createRequestValidatorV3 = ({\n  operation,\n  plugin,\n}: ValidatorArgs): ReturnType<typeof $.func> | undefined => {\n  const symbol = plugin.getSymbol({\n    category: 'schema',\n    resource: 'operation',\n    resourceId: operation.id,\n    role: 'data',\n    tool: 'zod',\n  });\n  if (!symbol) return;\n\n  const z = plugin.external('zod.z');\n  const ctx: ValidatorResolverContext = {\n    $,\n    chain: {\n      current: $(z),\n    },\n    operation,\n    plugin,\n    symbols: {\n      schema: symbol,\n      z,\n    },\n  };\n  const validator = plugin.config['~resolvers']?.validator;\n  const resolver = typeof validator === 'function' ? validator : validator?.request;\n  const candidates = [resolver, validatorResolver];\n  for (const candidate of candidates) {\n    const statements = candidate?.(ctx);\n    if (statements === null) return;\n    if (statements !== undefined) {\n      return $.func()\n        .async()\n        .param('data')\n        .do(...(statements instanceof Array ? statements : [statements]));\n    }\n  }\n  return;\n};\n\nexport const createResponseValidatorV3 = ({\n  operation,\n  plugin,\n}: ValidatorArgs): ReturnType<typeof $.func> | undefined => {\n  const symbol = plugin.getSymbol({\n    category: 'schema',\n    resource: 'operation',\n    resourceId: operation.id,\n    role: 'responses',\n    tool: 'zod',\n  });\n  if (!symbol) return;\n\n  const z = plugin.external('zod.z');\n  const ctx: ValidatorResolverContext = {\n    $,\n    chain: {\n      current: $(z),\n    },\n    operation,\n    plugin,\n    symbols: {\n      schema: symbol,\n      z,\n    },\n  };\n  const validator = plugin.config['~resolvers']?.validator;\n  const resolver = typeof validator === 'function' ? validator : validator?.response;\n  const candidates = [resolver, validatorResolver];\n  for (const candidate of candidates) {\n    const statements = candidate?.(ctx);\n    if (statements === null) return;\n    if (statements !== undefined) {\n      return $.func()\n        .async()\n        .param('data')\n        .do(...(statements instanceof Array ? statements : [statements]));\n    }\n  }\n  return;\n};\n"
  },
  {
    "path": "packages/openapi-ts/src/plugins/zod/v3/plugin.ts",
    "content": "import { pathToJsonPointer } from '@hey-api/shared';\n\nimport { getZodModule } from '../shared/module';\nimport { irOperationToAst } from '../shared/operation';\nimport { irWebhookToAst } from '../shared/webhook';\nimport type { ZodPlugin } from '../types';\nimport { createProcessor } from './processor';\n\nexport const handlerV3: ZodPlugin['Handler'] = ({ plugin }) => {\n  plugin.symbol('z', {\n    external: getZodModule({ plugin }),\n    meta: {\n      category: 'external',\n      resource: 'zod.z',\n    },\n  });\n\n  const processor = createProcessor(plugin);\n\n  plugin.forEach('operation', 'parameter', 'requestBody', 'schema', 'webhook', (event) => {\n    switch (event.type) {\n      case 'operation':\n        irOperationToAst({\n          operation: event.operation,\n          path: event._path,\n          plugin,\n          processor,\n          tags: event.tags,\n        });\n        break;\n      case 'parameter':\n        processor.process({\n          meta: {\n            resource: 'definition',\n            resourceId: pathToJsonPointer(event._path),\n          },\n          naming: plugin.config.definitions,\n          path: event._path,\n          plugin,\n          schema: event.parameter.schema,\n          tags: event.tags,\n        });\n        break;\n      case 'requestBody':\n        processor.process({\n          meta: {\n            resource: 'definition',\n            resourceId: pathToJsonPointer(event._path),\n          },\n          naming: plugin.config.definitions,\n          path: event._path,\n          plugin,\n          schema: event.requestBody.schema,\n          tags: event.tags,\n        });\n        break;\n      case 'schema':\n        processor.process({\n          meta: {\n            resource: 'definition',\n            resourceId: pathToJsonPointer(event._path),\n          },\n          naming: plugin.config.definitions,\n          path: event._path,\n          plugin,\n          schema: event.schema,\n          tags: event.tags,\n        });\n        break;\n      case 'webhook':\n        irWebhookToAst({\n          operation: event.operation,\n          path: event._path,\n          plugin,\n          processor,\n          tags: event.tags,\n        });\n        break;\n    }\n  });\n};\n"
  },
  {
    "path": "packages/openapi-ts/src/plugins/zod/v3/processor.ts",
    "content": "import { ref } from '@hey-api/codegen-core';\nimport type { IR } from '@hey-api/shared';\nimport { createSchemaProcessor, createSchemaWalker, pathToJsonPointer } from '@hey-api/shared';\n\nimport { exportAst } from '../shared/export';\nimport type { ProcessorContext, ProcessorResult } from '../shared/processor';\nimport type { ZodFinal } from '../shared/types';\nimport type { ZodPlugin } from '../types';\nimport { createVisitor } from './walker';\n\nexport function createProcessor(plugin: ZodPlugin['Instance']): ProcessorResult {\n  const processor = createSchemaProcessor();\n\n  const hooks = [plugin.config['~hooks']?.schemas, plugin.context.config.parser.hooks.schemas];\n\n  function extractor(ctx: ProcessorContext): IR.SchemaObject {\n    if (processor.hasEmitted(ctx.path)) {\n      return ctx.schema;\n    }\n\n    for (const hook of hooks) {\n      const result = hook?.shouldExtract?.(ctx);\n      if (result) {\n        process({\n          namingAnchor: processor.context.anchor,\n          tags: processor.context.tags,\n          ...ctx,\n        });\n        return { $ref: pathToJsonPointer(ctx.path) };\n      }\n    }\n\n    return ctx.schema;\n  }\n\n  function process(ctx: ProcessorContext): ZodFinal | void {\n    if (!processor.markEmitted(ctx.path)) return;\n\n    const shouldExport = ctx.export !== false;\n\n    return processor.withContext({ anchor: ctx.namingAnchor, tags: ctx.tags }, () => {\n      const visitor = createVisitor({ schemaExtractor: extractor });\n      const walk = createSchemaWalker(visitor);\n\n      const result = walk(ctx.schema, {\n        path: ref(ctx.path),\n        plugin,\n      });\n\n      const final = visitor.applyModifiers(result, {\n        path: ref(ctx.path),\n        plugin,\n      }) as ZodFinal;\n\n      if (shouldExport) {\n        exportAst({ ...ctx, final, plugin });\n        return;\n      }\n\n      return final;\n    });\n  }\n\n  return { process };\n}\n"
  },
  {
    "path": "packages/openapi-ts/src/plugins/zod/v3/toAst/array.ts",
    "content": "import { childContext, deduplicateSchema } from '@hey-api/shared';\n\nimport { $ } from '../../../../ts-dsl';\nimport { identifiers } from '../../constants';\nimport type { ArrayResolverContext } from '../../resolvers';\nimport type { Chain, ChainResult } from '../../shared/chain';\nimport type { CompositeHandlerResult, ZodResult } from '../../shared/types';\nimport { unknownToAst } from './unknown';\n\ntype ArrayToAstOptions = Pick<\n  ArrayResolverContext,\n  'applyModifiers' | 'plugin' | 'schema' | 'walk' | 'walkerCtx'\n>;\n\nfunction baseNode(ctx: ArrayResolverContext): Chain {\n  const { applyModifiers, childResults, plugin, schema, symbols } = ctx;\n  const { z } = symbols;\n\n  const arrayFn = $(z).attr(identifiers.array);\n\n  let normalizedSchema = schema;\n  if (normalizedSchema.items) {\n    normalizedSchema = deduplicateSchema({ schema: normalizedSchema });\n  }\n\n  if (!normalizedSchema.items) {\n    return arrayFn.call(\n      unknownToAst({\n        plugin,\n        schema: {\n          type: 'unknown',\n        },\n      }),\n    );\n  }\n\n  if (childResults.length === 1) {\n    const itemNode = applyModifiers(childResults[0]!, { optional: false }).expression;\n    return arrayFn.call(itemNode);\n  }\n\n  if (childResults.length > 1) {\n    const itemExpressions: Array<Chain> = childResults.map(\n      (result) => applyModifiers(result, { optional: false }).expression,\n    );\n\n    const firstSchema = normalizedSchema.items[0];\n    if (normalizedSchema.logicalOperator === 'and') {\n      let intersectionExpression: Chain;\n      if (\n        firstSchema?.logicalOperator === 'or' ||\n        (firstSchema?.type && firstSchema.type !== 'object')\n      ) {\n        intersectionExpression = $(z)\n          .attr(identifiers.intersection)\n          .call(...itemExpressions);\n      } else {\n        intersectionExpression = itemExpressions[0]!;\n        for (let i = 1; i < itemExpressions.length; i++) {\n          intersectionExpression = intersectionExpression\n            .attr(identifiers.and)\n            .call(itemExpressions[i]);\n        }\n      }\n\n      return arrayFn.call(intersectionExpression);\n    } else {\n      return arrayFn.call(\n        $(z)\n          .attr(identifiers.union)\n          .call($.array(...itemExpressions)),\n      );\n    }\n  }\n\n  return arrayFn.call(\n    unknownToAst({\n      plugin,\n      schema: {\n        type: 'unknown',\n      },\n    }),\n  );\n}\n\nfunction lengthNode(ctx: ArrayResolverContext): ChainResult {\n  const { schema } = ctx;\n  if (schema.minItems === schema.maxItems && schema.minItems !== undefined) {\n    return ctx.chain.current.attr(identifiers.length).call($.fromValue(schema.minItems));\n  }\n}\n\nfunction maxLengthNode(ctx: ArrayResolverContext): ChainResult {\n  const { schema } = ctx;\n  if (schema.maxItems === undefined) return;\n  return ctx.chain.current.attr(identifiers.max).call($.fromValue(schema.maxItems));\n}\n\nfunction minLengthNode(ctx: ArrayResolverContext): ChainResult {\n  const { schema } = ctx;\n  if (schema.minItems === undefined) return;\n  return ctx.chain.current.attr(identifiers.min).call($.fromValue(schema.minItems));\n}\n\nfunction arrayResolver(ctx: ArrayResolverContext): Chain {\n  const baseResult = ctx.nodes.base(ctx);\n  ctx.chain.current = baseResult;\n\n  const lengthResult = ctx.nodes.length(ctx);\n  if (lengthResult) {\n    ctx.chain.current = lengthResult;\n  } else {\n    const minLengthResult = ctx.nodes.minLength(ctx);\n    if (minLengthResult) {\n      ctx.chain.current = minLengthResult;\n    }\n\n    const maxLengthResult = ctx.nodes.maxLength(ctx);\n    if (maxLengthResult) {\n      ctx.chain.current = maxLengthResult;\n    }\n  }\n\n  return ctx.chain.current;\n}\n\nexport function arrayToAst({\n  applyModifiers,\n  plugin,\n  schema,\n  walk,\n  walkerCtx,\n}: ArrayToAstOptions): CompositeHandlerResult {\n  const childResults: Array<ZodResult> = [];\n  let schemaCopy = schema;\n\n  const z = plugin.external('zod.z');\n\n  if (schemaCopy.items) {\n    schemaCopy = deduplicateSchema({ schema: schemaCopy });\n\n    schemaCopy.items!.forEach((item, index) => {\n      const itemResult = walk(item, childContext(walkerCtx, 'items', index));\n      childResults.push(itemResult);\n    });\n  }\n\n  const ctx: ArrayResolverContext = {\n    $,\n    applyModifiers,\n    chain: {\n      current: $(z),\n    },\n    childResults,\n    nodes: {\n      base: baseNode,\n      length: lengthNode,\n      maxLength: maxLengthNode,\n      minLength: minLengthNode,\n    },\n    plugin,\n    schema,\n    symbols: {\n      z,\n    },\n    walk,\n    walkerCtx,\n  };\n\n  const resolver = plugin.config['~resolvers']?.array;\n  const expression = resolver?.(ctx) ?? arrayResolver(ctx);\n\n  return {\n    childResults,\n    expression,\n  };\n}\n"
  },
  {
    "path": "packages/openapi-ts/src/plugins/zod/v3/toAst/boolean.ts",
    "content": "import type { SchemaWithType } from '@hey-api/shared';\n\nimport { $ } from '../../../../ts-dsl';\nimport { identifiers } from '../../constants';\nimport type { BooleanResolverContext } from '../../resolvers';\nimport type { Chain, ChainResult } from '../../shared/chain';\nimport type { ZodPlugin } from '../../types';\n\nfunction baseNode(ctx: BooleanResolverContext): Chain {\n  const { symbols } = ctx;\n  const { z } = symbols;\n  return $(z).attr(identifiers.boolean).call();\n}\n\nfunction constNode(ctx: BooleanResolverContext): ChainResult {\n  const { schema, symbols } = ctx;\n  const { z } = symbols;\n  if (typeof schema.const !== 'boolean') return;\n  return $(z).attr(identifiers.literal).call($.literal(schema.const));\n}\n\nfunction booleanResolver(ctx: BooleanResolverContext): Chain {\n  const constResult = ctx.nodes.const(ctx);\n  if (constResult) {\n    ctx.chain.current = constResult;\n    return ctx.chain.current;\n  }\n\n  const baseResult = ctx.nodes.base(ctx);\n  ctx.chain.current = baseResult;\n\n  return ctx.chain.current;\n}\n\nexport function booleanToAst({\n  plugin,\n  schema,\n}: {\n  plugin: ZodPlugin['Instance'];\n  schema: SchemaWithType<'boolean'>;\n}): Chain {\n  const z = plugin.external('zod.z');\n  const ctx: BooleanResolverContext = {\n    $,\n    chain: {\n      current: $(z),\n    },\n    nodes: {\n      base: baseNode,\n      const: constNode,\n    },\n    plugin,\n    schema,\n    symbols: {\n      z,\n    },\n  };\n\n  const resolver = plugin.config['~resolvers']?.boolean;\n  return resolver?.(ctx) ?? booleanResolver(ctx);\n}\n"
  },
  {
    "path": "packages/openapi-ts/src/plugins/zod/v3/toAst/enum.ts",
    "content": "import type { SchemaWithType } from '@hey-api/shared';\n\nimport { $ } from '../../../../ts-dsl';\nimport { identifiers } from '../../constants';\nimport type { EnumResolverContext } from '../../resolvers';\nimport type { Chain } from '../../shared/chain';\nimport type { ZodPlugin } from '../../types';\n\nfunction itemsNode(ctx: EnumResolverContext): ReturnType<EnumResolverContext['nodes']['items']> {\n  const { schema, symbols } = ctx;\n  const { z } = symbols;\n\n  const enumMembers: Array<ReturnType<typeof $.literal>> = [];\n  const literalMembers: Array<Chain> = [];\n\n  let isNullable = false;\n  let allStrings = true;\n\n  for (const item of schema.items ?? []) {\n    if (item.type === 'string' && typeof item.const === 'string') {\n      const literal = $.literal(item.const);\n      enumMembers.push(literal);\n      literalMembers.push($(z).attr(identifiers.literal).call(literal));\n    } else if (\n      (item.type === 'number' || item.type === 'integer') &&\n      typeof item.const === 'number'\n    ) {\n      allStrings = false;\n      const literal = $.literal(item.const);\n      literalMembers.push($(z).attr(identifiers.literal).call(literal));\n    } else if (item.type === 'boolean' && typeof item.const === 'boolean') {\n      allStrings = false;\n      const literal = $.literal(item.const);\n      literalMembers.push($(z).attr(identifiers.literal).call(literal));\n    } else if (item.type === 'null' || item.const === null) {\n      isNullable = true;\n    }\n  }\n\n  return {\n    allStrings,\n    enumMembers,\n    isNullable,\n    literalMembers,\n  };\n}\n\nfunction baseNode(ctx: EnumResolverContext): Chain {\n  const { symbols } = ctx;\n  const { z } = symbols;\n  const { allStrings, enumMembers, literalMembers } = ctx.nodes.items(ctx);\n\n  if (allStrings && enumMembers.length > 0) {\n    return $(z)\n      .attr(identifiers.enum)\n      .call($.array(...enumMembers));\n  } else if (literalMembers.length === 1) {\n    return literalMembers[0]!;\n  } else {\n    return $(z)\n      .attr(identifiers.union)\n      .call($.array(...literalMembers));\n  }\n}\n\nfunction enumResolver(ctx: EnumResolverContext): Chain {\n  const { literalMembers } = ctx.nodes.items(ctx);\n\n  if (!literalMembers.length) {\n    return ctx.chain.current;\n  }\n\n  const baseExpression = ctx.nodes.base(ctx);\n  ctx.chain.current = baseExpression;\n\n  return ctx.chain.current;\n}\n\nexport function enumToAst({\n  plugin,\n  schema,\n}: {\n  plugin: ZodPlugin['Instance'];\n  schema: SchemaWithType<'enum'>;\n}): Chain {\n  const z = plugin.external('zod.z');\n\n  const ctx: EnumResolverContext = {\n    $,\n    chain: {\n      current: $(z),\n    },\n    nodes: {\n      base: baseNode,\n      items: itemsNode,\n    },\n    plugin,\n    schema,\n    symbols: {\n      z,\n    },\n  };\n\n  const resolver = plugin.config['~resolvers']?.enum;\n  return resolver?.(ctx) ?? enumResolver(ctx);\n}\n"
  },
  {
    "path": "packages/openapi-ts/src/plugins/zod/v3/toAst/never.ts",
    "content": "import type { SchemaWithType } from '@hey-api/shared';\n\nimport { $ } from '../../../../ts-dsl';\nimport { identifiers } from '../../constants';\nimport type { NeverResolverContext } from '../../resolvers';\nimport type { Chain } from '../../shared/chain';\nimport type { ZodPlugin } from '../../types';\n\nfunction baseNode(ctx: NeverResolverContext): Chain {\n  const { symbols } = ctx;\n  const { z } = symbols;\n  return $(z).attr(identifiers.never).call();\n}\n\nfunction neverResolver(ctx: NeverResolverContext): Chain {\n  const baseResult = ctx.nodes.base(ctx);\n  ctx.chain.current = baseResult;\n  return ctx.chain.current;\n}\n\nexport function neverToAst({\n  plugin,\n  schema,\n}: {\n  plugin: ZodPlugin['Instance'];\n  schema: SchemaWithType<'never'>;\n}): Chain {\n  const z = plugin.external('zod.z');\n  const ctx: NeverResolverContext = {\n    $,\n    chain: {\n      current: $(z),\n    },\n    nodes: {\n      base: baseNode,\n    },\n    plugin,\n    schema,\n    symbols: {\n      z,\n    },\n  };\n\n  const resolver = plugin.config['~resolvers']?.never;\n  return resolver?.(ctx) ?? neverResolver(ctx);\n}\n"
  },
  {
    "path": "packages/openapi-ts/src/plugins/zod/v3/toAst/null.ts",
    "content": "import type { SchemaWithType } from '@hey-api/shared';\n\nimport { $ } from '../../../../ts-dsl';\nimport { identifiers } from '../../constants';\nimport type { NullResolverContext } from '../../resolvers';\nimport type { Chain } from '../../shared/chain';\nimport type { ZodPlugin } from '../../types';\n\nfunction baseNode(ctx: NullResolverContext): Chain {\n  const { symbols } = ctx;\n  const { z } = symbols;\n  return $(z).attr(identifiers.null).call();\n}\n\nfunction nullResolver(ctx: NullResolverContext): Chain {\n  const baseResult = ctx.nodes.base(ctx);\n  ctx.chain.current = baseResult;\n  return ctx.chain.current;\n}\n\nexport function nullToAst({\n  plugin,\n  schema,\n}: {\n  plugin: ZodPlugin['Instance'];\n  schema: SchemaWithType<'null'>;\n}): Chain {\n  const z = plugin.external('zod.z');\n  const ctx: NullResolverContext = {\n    $,\n    chain: {\n      current: $(z),\n    },\n    nodes: {\n      base: baseNode,\n    },\n    plugin,\n    schema,\n    symbols: {\n      z,\n    },\n  };\n\n  const resolver = plugin.config['~resolvers']?.null;\n  return resolver?.(ctx) ?? nullResolver(ctx);\n}\n"
  },
  {
    "path": "packages/openapi-ts/src/plugins/zod/v3/toAst/number.ts",
    "content": "import type { SchemaWithType } from '@hey-api/shared';\n\nimport { maybeBigInt, shouldCoerceToBigInt } from '../../../../plugins/shared/utils/coerce';\nimport { getIntegerLimit } from '../../../../plugins/shared/utils/formats';\nimport { $ } from '../../../../ts-dsl';\nimport { identifiers } from '../../constants';\nimport type { NumberResolverContext } from '../../resolvers';\nimport type { Chain, ChainResult } from '../../shared/chain';\nimport type { ZodPlugin } from '../../types';\n\nfunction baseNode(ctx: NumberResolverContext): Chain {\n  const { schema, symbols } = ctx;\n  const { z } = symbols;\n  if (ctx.utils.shouldCoerceToBigInt(schema.format)) {\n    return $(z).attr(identifiers.coerce).attr(identifiers.bigint).call();\n  }\n  let chain = $(z).attr(identifiers.number).call();\n  if (schema.type === 'integer') {\n    chain = chain.attr(identifiers.int).call();\n  }\n  return chain;\n}\n\nfunction constNode(ctx: NumberResolverContext): ChainResult {\n  const { schema, symbols } = ctx;\n  const { z } = symbols;\n  if (schema.const === undefined) return;\n  return $(z).attr(identifiers.literal).call(ctx.utils.maybeBigInt(schema.const, schema.format));\n}\n\nfunction maxNode(ctx: NumberResolverContext): ChainResult {\n  const { chain, schema } = ctx;\n  if (schema.exclusiveMaximum !== undefined) {\n    return chain.current\n      .attr(identifiers.lt)\n      .call(ctx.utils.maybeBigInt(schema.exclusiveMaximum, schema.format));\n  }\n  if (schema.maximum !== undefined) {\n    return chain.current\n      .attr(identifiers.lte)\n      .call(ctx.utils.maybeBigInt(schema.maximum, schema.format));\n  }\n  const limit = ctx.utils.getIntegerLimit(schema.format);\n  if (limit) {\n    return chain.current\n      .attr(identifiers.max)\n      .call(\n        ctx.utils.maybeBigInt(limit.maxValue, schema.format),\n        $.object().prop('message', $.literal(limit.maxError)),\n      );\n  }\n  return;\n}\n\nfunction minNode(ctx: NumberResolverContext): ChainResult {\n  const { chain, schema } = ctx;\n  if (schema.exclusiveMinimum !== undefined) {\n    return chain.current\n      .attr(identifiers.gt)\n      .call(ctx.utils.maybeBigInt(schema.exclusiveMinimum, schema.format));\n  }\n  if (schema.minimum !== undefined) {\n    return chain.current\n      .attr(identifiers.gte)\n      .call(ctx.utils.maybeBigInt(schema.minimum, schema.format));\n  }\n  const limit = ctx.utils.getIntegerLimit(schema.format);\n  if (limit) {\n    return chain.current\n      .attr(identifiers.min)\n      .call(\n        ctx.utils.maybeBigInt(limit.minValue, schema.format),\n        $.object().prop('message', $.literal(limit.minError)),\n      );\n  }\n  return;\n}\n\nfunction numberResolver(ctx: NumberResolverContext): Chain {\n  const constNode = ctx.nodes.const(ctx);\n  if (constNode) {\n    ctx.chain.current = constNode;\n    return ctx.chain.current;\n  }\n\n  const baseNode = ctx.nodes.base(ctx);\n  if (baseNode) ctx.chain.current = baseNode;\n\n  const minNode = ctx.nodes.min(ctx);\n  if (minNode) ctx.chain.current = minNode;\n\n  const maxNode = ctx.nodes.max(ctx);\n  if (maxNode) ctx.chain.current = maxNode;\n\n  return ctx.chain.current;\n}\n\nexport function numberToNode({\n  plugin,\n  schema,\n}: {\n  plugin: ZodPlugin['Instance'];\n  schema: SchemaWithType<'integer' | 'number'>;\n}): Chain {\n  const z = plugin.external('zod.z');\n  const ctx: NumberResolverContext = {\n    $,\n    chain: {\n      current: $(z),\n    },\n    nodes: {\n      base: baseNode,\n      const: constNode,\n      max: maxNode,\n      min: minNode,\n    },\n    plugin,\n    schema,\n    symbols: {\n      z,\n    },\n    utils: {\n      getIntegerLimit,\n      maybeBigInt,\n      shouldCoerceToBigInt,\n    },\n  };\n  const resolver = plugin.config['~resolvers']?.number;\n  return resolver?.(ctx) ?? numberResolver(ctx);\n}\n"
  },
  {
    "path": "packages/openapi-ts/src/plugins/zod/v3/toAst/object.ts",
    "content": "import type { SchemaVisitorContext, SchemaWithType, Walker } from '@hey-api/shared';\nimport { childContext } from '@hey-api/shared';\n\nimport { $ } from '../../../../ts-dsl';\nimport { identifiers } from '../../constants';\nimport type { ObjectResolverContext } from '../../resolvers';\nimport type { Chain } from '../../shared/chain';\nimport type { CompositeHandlerResult, ZodFinal, ZodResult } from '../../shared/types';\nimport type { ZodPlugin } from '../../types';\n\ntype WalkerCtx = SchemaVisitorContext<ZodPlugin['Instance']>;\n\ninterface ObjectToAstOptions {\n  applyModifiers: (result: ZodResult, opts: { optional?: boolean }) => ZodFinal;\n  plugin: ZodPlugin['Instance'];\n  schema: SchemaWithType<'object'>;\n  walk: Walker<ZodResult, ZodPlugin['Instance']>;\n  walkerCtx: WalkerCtx;\n}\n\ntype ExtendedContext = ObjectResolverContext;\n\nfunction additionalPropertiesNode(ctx: ExtendedContext): Chain | null | undefined {\n  const { applyModifiers, schema, walk, walkerCtx } = ctx;\n\n  if (\n    !schema.additionalProperties ||\n    (schema.properties && Object.keys(schema.properties).length > 0)\n  ) {\n    return;\n  }\n\n  const additionalResult = walk(\n    schema.additionalProperties,\n    childContext(walkerCtx, 'additionalProperties'),\n  );\n  ctx._childResults.push(additionalResult);\n  const finalExpr = applyModifiers(additionalResult, {});\n  return finalExpr.expression;\n}\n\nfunction baseNode(ctx: ExtendedContext): Chain {\n  const { nodes, symbols } = ctx;\n  const { z } = symbols;\n\n  const additional = nodes.additionalProperties(ctx);\n  const shape = nodes.shape(ctx);\n\n  if (additional) {\n    return $(z).attr(identifiers.record).call(additional);\n  }\n\n  return $(z).attr(identifiers.object).call(shape);\n}\n\nfunction objectResolver(ctx: ExtendedContext): Chain {\n  return ctx.nodes.base(ctx);\n}\n\nfunction shapeNode(ctx: ExtendedContext): ReturnType<typeof $.object> {\n  const { applyModifiers, schema, walk, walkerCtx } = ctx;\n  const shape = $.object().pretty();\n\n  for (const name in schema.properties) {\n    const property = schema.properties[name]!;\n    const isOptional = !schema.required?.includes(name);\n\n    const propertyResult = walk(property, childContext(walkerCtx, 'properties', name));\n    ctx._childResults.push(propertyResult);\n\n    const finalExpr = applyModifiers(propertyResult, {\n      optional: isOptional,\n    });\n\n    shape.prop(name, finalExpr.expression);\n  }\n\n  return shape;\n}\n\nexport function objectToAst(options: ObjectToAstOptions): CompositeHandlerResult {\n  const { applyModifiers, plugin, schema, walk, walkerCtx } = options;\n  const childResults: Array<ZodResult> = [];\n  const z = plugin.external('zod.z');\n  const ctx: ExtendedContext = {\n    $,\n    _childResults: childResults,\n    applyModifiers,\n    chain: {\n      current: $(z),\n    },\n    nodes: {\n      additionalProperties: additionalPropertiesNode,\n      base: baseNode,\n      shape: shapeNode,\n    },\n    plugin,\n    schema,\n    symbols: {\n      z,\n    },\n    walk,\n    walkerCtx,\n  };\n  const resolver = plugin.config['~resolvers']?.object;\n  const node = resolver?.(ctx) ?? objectResolver(ctx);\n\n  return {\n    childResults,\n    expression: node,\n  };\n}\n"
  },
  {
    "path": "packages/openapi-ts/src/plugins/zod/v3/toAst/string.ts",
    "content": "import type { SchemaWithType } from '@hey-api/shared';\n\nimport { $ } from '../../../../ts-dsl';\nimport { identifiers } from '../../constants';\nimport type { StringResolverContext } from '../../resolvers';\nimport type { Chain, ChainResult } from '../../shared/chain';\nimport type { ZodPlugin } from '../../types';\n\nfunction baseNode(ctx: StringResolverContext): Chain {\n  const { z } = ctx.symbols;\n  return $(z).attr(identifiers.string).call();\n}\n\nfunction constNode(ctx: StringResolverContext): ChainResult {\n  const { schema, symbols } = ctx;\n  const { z } = symbols;\n  if (typeof schema.const !== 'string') return;\n  return $(z).attr(identifiers.literal).call($.literal(schema.const));\n}\n\nfunction formatNode(ctx: StringResolverContext): ChainResult {\n  const { chain, plugin, schema } = ctx;\n\n  switch (schema.format) {\n    case 'date':\n      return chain.current.attr(identifiers.date).call();\n    case 'date-time': {\n      const obj = $.object()\n        .$if(plugin.config.dates.offset, (o) => o.prop('offset', $.literal(true)))\n        .$if(plugin.config.dates.local, (o) => o.prop('local', $.literal(true)));\n      return chain.current.attr(identifiers.datetime).call(obj.hasProps() ? obj : undefined);\n    }\n    case 'email':\n      return chain.current.attr(identifiers.email).call();\n    case 'ipv4':\n    case 'ipv6':\n      return chain.current.attr(identifiers.ip).call();\n    case 'time':\n      return chain.current.attr(identifiers.time).call();\n    case 'uri':\n      return chain.current.attr(identifiers.url).call();\n    case 'uuid':\n      return chain.current.attr(identifiers.uuid).call();\n  }\n\n  return;\n}\n\nfunction lengthNode(ctx: StringResolverContext): ChainResult {\n  const { chain, schema } = ctx;\n  if (schema.minLength === undefined || schema.minLength !== schema.maxLength) return;\n  return chain.current.attr(identifiers.length).call($.literal(schema.minLength));\n}\n\nfunction maxLengthNode(ctx: StringResolverContext): ChainResult {\n  const { chain, schema } = ctx;\n  if (schema.maxLength === undefined) return;\n  return chain.current.attr(identifiers.max).call($.literal(schema.maxLength));\n}\n\nfunction minLengthNode(ctx: StringResolverContext): ChainResult {\n  const { chain, schema } = ctx;\n  if (schema.minLength === undefined) return;\n  return chain.current.attr(identifiers.min).call($.literal(schema.minLength));\n}\n\nfunction patternNode(ctx: StringResolverContext): ChainResult {\n  const { chain, schema } = ctx;\n  if (!schema.pattern) return;\n  const flags = /\\\\[pP]\\{/.test(schema.pattern) ? 'u' : undefined;\n  return chain.current.attr(identifiers.regex).call($.regexp(schema.pattern, flags));\n}\n\nfunction stringResolver(ctx: StringResolverContext): Chain {\n  const constNode = ctx.nodes.const(ctx);\n  if (constNode) {\n    ctx.chain.current = constNode;\n    return ctx.chain.current;\n  }\n\n  const baseNode = ctx.nodes.base(ctx);\n  if (baseNode) ctx.chain.current = baseNode;\n\n  const formatNode = ctx.nodes.format(ctx);\n  if (formatNode) ctx.chain.current = formatNode;\n\n  const lengthNode = ctx.nodes.length(ctx);\n  if (lengthNode) {\n    ctx.chain.current = lengthNode;\n  } else {\n    const minLengthNode = ctx.nodes.minLength(ctx);\n    if (minLengthNode) ctx.chain.current = minLengthNode;\n\n    const maxLengthNode = ctx.nodes.maxLength(ctx);\n    if (maxLengthNode) ctx.chain.current = maxLengthNode;\n  }\n\n  const patternNode = ctx.nodes.pattern(ctx);\n  if (patternNode) ctx.chain.current = patternNode;\n\n  return ctx.chain.current;\n}\n\nexport function stringToNode({\n  plugin,\n  schema,\n}: {\n  plugin: ZodPlugin['Instance'];\n  schema: SchemaWithType<'string'>;\n}): Chain {\n  const z = plugin.external('zod.z');\n  const ctx: StringResolverContext = {\n    $,\n    chain: {\n      current: $(z),\n    },\n    nodes: {\n      base: baseNode,\n      const: constNode,\n      format: formatNode,\n      length: lengthNode,\n      maxLength: maxLengthNode,\n      minLength: minLengthNode,\n      pattern: patternNode,\n    },\n    plugin,\n    schema,\n    symbols: {\n      z,\n    },\n  };\n  const resolver = plugin.config['~resolvers']?.string;\n  return resolver?.(ctx) ?? stringResolver(ctx);\n}\n"
  },
  {
    "path": "packages/openapi-ts/src/plugins/zod/v3/toAst/tuple.ts",
    "content": "import { childContext } from '@hey-api/shared';\n\nimport { $ } from '../../../../ts-dsl';\nimport { identifiers } from '../../constants';\nimport type { TupleResolverContext } from '../../resolvers';\nimport type { Chain, ChainResult } from '../../shared/chain';\nimport type { CompositeHandlerResult, ZodResult } from '../../shared/types';\n\ntype TupleToAstOptions = Pick<\n  TupleResolverContext,\n  'applyModifiers' | 'plugin' | 'schema' | 'walk' | 'walkerCtx'\n>;\n\nfunction baseNode(ctx: TupleResolverContext): Chain {\n  const { applyModifiers, childResults, symbols } = ctx;\n  const { z } = symbols;\n\n  const tupleFn = $(z).attr(identifiers.tuple);\n\n  if (childResults.length === 0) {\n    return tupleFn.call($.array());\n  }\n\n  const tupleElements = childResults.map(\n    (result) => applyModifiers(result, { optional: false }).expression,\n  );\n\n  return tupleFn.call($.array(...tupleElements));\n}\n\nfunction constNode(ctx: TupleResolverContext): ChainResult {\n  const { schema, symbols } = ctx;\n  const { z } = symbols;\n\n  if (!schema.const || !Array.isArray(schema.const)) return;\n\n  const tupleElements = schema.const.map((value) =>\n    $(z).attr(identifiers.literal).call($.fromValue(value)),\n  );\n\n  return $(z)\n    .attr(identifiers.tuple)\n    .call($.array(...tupleElements));\n}\n\nfunction tupleResolver(ctx: TupleResolverContext): Chain {\n  const constResult = ctx.nodes.const(ctx);\n  if (constResult) {\n    ctx.chain.current = constResult;\n    return ctx.chain.current;\n  }\n\n  const baseResult = ctx.nodes.base(ctx);\n  ctx.chain.current = baseResult;\n\n  return ctx.chain.current;\n}\n\nexport function tupleToAst({\n  applyModifiers,\n  plugin,\n  schema,\n  walk,\n  walkerCtx,\n}: TupleToAstOptions): CompositeHandlerResult {\n  const childResults: Array<ZodResult> = [];\n\n  const z = plugin.external('zod.z');\n\n  if (schema.items) {\n    schema.items.forEach((item, index) => {\n      const itemResult = walk(item, childContext(walkerCtx, 'items', index));\n      childResults.push(itemResult);\n    });\n  }\n\n  const ctx: TupleResolverContext = {\n    $,\n    applyModifiers,\n    chain: {\n      current: $(z),\n    },\n    childResults,\n    nodes: {\n      base: baseNode,\n      const: constNode,\n    },\n    plugin,\n    schema,\n    symbols: {\n      z,\n    },\n    walk,\n    walkerCtx,\n  };\n\n  const resolver = plugin.config['~resolvers']?.tuple;\n  const expression = resolver?.(ctx) ?? tupleResolver(ctx);\n\n  return {\n    childResults,\n    expression,\n  };\n}\n"
  },
  {
    "path": "packages/openapi-ts/src/plugins/zod/v3/toAst/undefined.ts",
    "content": "import type { SchemaWithType } from '@hey-api/shared';\n\nimport { $ } from '../../../../ts-dsl';\nimport { identifiers } from '../../constants';\nimport type { UndefinedResolverContext } from '../../resolvers';\nimport type { Chain } from '../../shared/chain';\nimport type { ZodPlugin } from '../../types';\n\nfunction baseNode(ctx: UndefinedResolverContext): Chain {\n  const { symbols } = ctx;\n  const { z } = symbols;\n  return $(z).attr(identifiers.undefined).call();\n}\n\nfunction undefinedResolver(ctx: UndefinedResolverContext): Chain {\n  const baseResult = ctx.nodes.base(ctx);\n  ctx.chain.current = baseResult;\n  return ctx.chain.current;\n}\n\nexport function undefinedToAst({\n  plugin,\n  schema,\n}: {\n  plugin: ZodPlugin['Instance'];\n  schema: SchemaWithType<'undefined'>;\n}): Chain {\n  const z = plugin.external('zod.z');\n  const ctx: UndefinedResolverContext = {\n    $,\n    chain: {\n      current: $(z),\n    },\n    nodes: {\n      base: baseNode,\n    },\n    plugin,\n    schema,\n    symbols: {\n      z,\n    },\n  };\n\n  const resolver = plugin.config['~resolvers']?.undefined;\n  return resolver?.(ctx) ?? undefinedResolver(ctx);\n}\n"
  },
  {
    "path": "packages/openapi-ts/src/plugins/zod/v3/toAst/unknown.ts",
    "content": "import type { SchemaWithType } from '@hey-api/shared';\n\nimport { $ } from '../../../../ts-dsl';\nimport { identifiers } from '../../constants';\nimport type { UnknownResolverContext } from '../../resolvers';\nimport type { Chain } from '../../shared/chain';\nimport type { ZodPlugin } from '../../types';\n\nfunction baseNode(ctx: UnknownResolverContext): Chain {\n  const { symbols } = ctx;\n  const { z } = symbols;\n  return $(z).attr(identifiers.unknown).call();\n}\n\nfunction unknownResolver(ctx: UnknownResolverContext): Chain {\n  const baseResult = ctx.nodes.base(ctx);\n  ctx.chain.current = baseResult;\n  return ctx.chain.current;\n}\n\nexport function unknownToAst({\n  plugin,\n  schema,\n}: {\n  plugin: ZodPlugin['Instance'];\n  schema: SchemaWithType<'unknown'>;\n}): Chain {\n  const z = plugin.external('zod.z');\n  const ctx: UnknownResolverContext = {\n    $,\n    chain: {\n      current: $(z),\n    },\n    nodes: {\n      base: baseNode,\n    },\n    plugin,\n    schema,\n    symbols: {\n      z,\n    },\n  };\n\n  const resolver = plugin.config['~resolvers']?.unknown;\n  return resolver?.(ctx) ?? unknownResolver(ctx);\n}\n"
  },
  {
    "path": "packages/openapi-ts/src/plugins/zod/v3/toAst/void.ts",
    "content": "import type { SchemaWithType } from '@hey-api/shared';\n\nimport { $ } from '../../../../ts-dsl';\nimport { identifiers } from '../../constants';\nimport type { VoidResolverContext } from '../../resolvers';\nimport type { Chain } from '../../shared/chain';\nimport type { ZodPlugin } from '../../types';\n\nfunction baseNode(ctx: VoidResolverContext): Chain {\n  const { symbols } = ctx;\n  const { z } = symbols;\n  return $(z).attr(identifiers.void).call();\n}\n\nfunction voidResolver(ctx: VoidResolverContext): Chain {\n  const baseResult = ctx.nodes.base(ctx);\n  ctx.chain.current = baseResult;\n  return ctx.chain.current;\n}\n\nexport function voidToAst({\n  plugin,\n  schema,\n}: {\n  plugin: ZodPlugin['Instance'];\n  schema: SchemaWithType<'void'>;\n}): Chain {\n  const z = plugin.external('zod.z');\n  const ctx: VoidResolverContext = {\n    $,\n    chain: {\n      current: $(z),\n    },\n    nodes: {\n      base: baseNode,\n    },\n    plugin,\n    schema,\n    symbols: {\n      z,\n    },\n  };\n\n  const resolver = plugin.config['~resolvers']?.void;\n  return resolver?.(ctx) ?? voidResolver(ctx);\n}\n"
  },
  {
    "path": "packages/openapi-ts/src/plugins/zod/v3/walker.ts",
    "content": "import type { SymbolMeta } from '@hey-api/codegen-core';\nimport { fromRef } from '@hey-api/codegen-core';\nimport type { SchemaExtractor, SchemaVisitor } from '@hey-api/shared';\nimport { pathToJsonPointer } from '@hey-api/shared';\n\nimport { $ } from '../../../ts-dsl';\nimport { maybeBigInt, shouldCoerceToBigInt } from '../../shared/utils/coerce';\nimport { identifiers } from '../constants';\nimport type { Chain } from '../shared/chain';\nimport { defaultMeta, inheritMeta } from '../shared/meta';\nimport type { ProcessorContext } from '../shared/processor';\nimport type { ZodFinal, ZodResult } from '../shared/types';\nimport type { ZodPlugin } from '../types';\nimport { arrayToAst } from './toAst/array';\nimport { booleanToAst } from './toAst/boolean';\nimport { enumToAst } from './toAst/enum';\nimport { neverToAst } from './toAst/never';\nimport { nullToAst } from './toAst/null';\nimport { numberToNode } from './toAst/number';\nimport { objectToAst } from './toAst/object';\nimport { stringToNode } from './toAst/string';\nimport { tupleToAst } from './toAst/tuple';\nimport { undefinedToAst } from './toAst/undefined';\nimport { unknownToAst } from './toAst/unknown';\nimport { voidToAst } from './toAst/void';\n\nexport interface VisitorConfig {\n  /** Optional schema extractor function. */\n  schemaExtractor?: SchemaExtractor<ProcessorContext>;\n}\n\nexport function createVisitor(\n  config: VisitorConfig,\n): SchemaVisitor<ZodResult, ZodPlugin['Instance']> {\n  const { schemaExtractor } = config;\n\n  return {\n    applyModifiers(result, ctx, options = {}): ZodFinal {\n      const { optional } = options;\n      let expression = result.expression;\n\n      if (result.meta.readonly) {\n        expression = expression.attr(identifiers.readonly).call();\n      }\n\n      const hasDefault = result.meta.default !== undefined;\n      const needsNullable = result.meta.nullable;\n\n      if (optional && needsNullable) {\n        expression = expression.attr(identifiers.nullish).call();\n      } else if (optional) {\n        expression = expression.attr(identifiers.optional).call();\n      } else if (needsNullable) {\n        expression = expression.attr(identifiers.nullable).call();\n      }\n\n      if (hasDefault) {\n        expression = expression\n          .attr(identifiers.default)\n          .call(\n            result.meta.format\n              ? maybeBigInt(result.meta.default, result.meta.format)\n              : $.fromValue(result.meta.default),\n          );\n      }\n\n      return {\n        expression,\n        typeName: result.meta.hasLazy\n          ? result.meta.isObject\n            ? identifiers.AnyZodObject\n            : identifiers.ZodTypeAny\n          : undefined,\n      };\n    },\n    array(schema, ctx, walk) {\n      const applyModifiers: Parameters<typeof arrayToAst>[0]['applyModifiers'] = (result, opts) =>\n        this.applyModifiers(result, ctx, opts) as ZodFinal;\n      const { childResults, expression } = arrayToAst({\n        applyModifiers,\n        plugin: ctx.plugin,\n        schema,\n        walk,\n        walkerCtx: ctx,\n      });\n\n      return {\n        expression,\n        meta: inheritMeta(schema, childResults),\n      };\n    },\n    boolean(schema, ctx) {\n      const expression = booleanToAst({ plugin: ctx.plugin, schema });\n      return {\n        expression,\n        meta: defaultMeta(schema),\n      };\n    },\n    enum(schema, ctx) {\n      const expression = enumToAst({ plugin: ctx.plugin, schema });\n      const hasNull =\n        schema.items?.some((item) => item.type === 'null' || item.const === null) ?? false;\n      return {\n        expression,\n        meta: {\n          ...defaultMeta(schema),\n          nullable: hasNull,\n        },\n      };\n    },\n    integer(schema, ctx) {\n      const expression = numberToNode({ plugin: ctx.plugin, schema });\n      return {\n        expression,\n        meta: {\n          ...defaultMeta(schema),\n          format: schema.format,\n        },\n      };\n    },\n    intercept(schema, ctx, walk) {\n      if (schemaExtractor && !schema.$ref) {\n        const extracted = schemaExtractor({\n          meta: {\n            resource: 'definition',\n            resourceId: pathToJsonPointer(fromRef(ctx.path)),\n          },\n          naming: ctx.plugin.config.definitions,\n          path: fromRef(ctx.path),\n          plugin: ctx.plugin,\n          schema,\n        });\n        if (extracted !== schema) {\n          return walk(extracted, ctx);\n        }\n      }\n    },\n    intersection(items, schemas, parentSchema, ctx) {\n      const z = ctx.plugin.external('zod.z');\n      const hasAnyLazy = items.some((item) => item.meta.hasLazy);\n\n      const firstSchema = schemas[0];\n      let expression: Chain;\n\n      if (\n        firstSchema?.logicalOperator === 'or' ||\n        (firstSchema?.type && firstSchema.type !== 'object')\n      ) {\n        expression = $(z)\n          .attr(identifiers.intersection)\n          .call(...items.map((item) => item.expression));\n      } else {\n        expression = items[0]!.expression;\n        items.slice(1).forEach((item) => {\n          expression = expression\n            .attr(identifiers.and)\n            .call(\n              item.meta.hasLazy && !item.meta.isLazy\n                ? $(z).attr(identifiers.lazy).call($.func().do(item.expression.return()))\n                : item.expression,\n            );\n        });\n      }\n\n      return {\n        expression,\n        meta: {\n          default: parentSchema.default,\n          format: parentSchema.format,\n          hasLazy: hasAnyLazy,\n          isLazy: false,\n          nullable: items.some((i) => i.meta.nullable),\n          readonly: items.some((i) => i.meta.readonly),\n        },\n      };\n    },\n    never(schema, ctx) {\n      const expression = neverToAst({ plugin: ctx.plugin, schema });\n      return {\n        expression,\n        meta: {\n          ...defaultMeta(schema),\n          nullable: false,\n          readonly: false,\n        },\n      };\n    },\n    null(schema, ctx) {\n      const expression = nullToAst({ plugin: ctx.plugin, schema });\n      return {\n        expression,\n        meta: {\n          ...defaultMeta(schema),\n          nullable: false,\n          readonly: false,\n        },\n      };\n    },\n    number(schema, ctx) {\n      const expression = numberToNode({ plugin: ctx.plugin, schema });\n      return {\n        expression,\n        meta: {\n          ...defaultMeta(schema),\n          format: schema.format,\n        },\n      };\n    },\n    object(schema, ctx, walk) {\n      const applyModifiers: Parameters<typeof objectToAst>[0]['applyModifiers'] = (result, opts) =>\n        this.applyModifiers(result, ctx, opts) as ZodFinal;\n      const { childResults, expression } = objectToAst({\n        applyModifiers,\n        plugin: ctx.plugin,\n        schema,\n        walk,\n        walkerCtx: ctx,\n      });\n\n      return {\n        expression,\n        meta: {\n          ...inheritMeta(schema, childResults),\n          isObject: true,\n        },\n      };\n    },\n    postProcess(result, schema, ctx) {\n      if (ctx.plugin.config.metadata && schema.description) {\n        return {\n          ...result,\n          expression: result.expression\n            .attr(identifiers.describe)\n            .call($.literal(schema.description)),\n        };\n      }\n      return result;\n    },\n    reference($ref, schema, ctx) {\n      const z = ctx.plugin.external('zod.z');\n      const query: SymbolMeta = {\n        category: 'schema',\n        resource: 'definition',\n        resourceId: $ref,\n        tool: 'zod',\n      };\n\n      const refSymbol = ctx.plugin.referenceSymbol(query);\n\n      if (ctx.plugin.isSymbolRegistered(query)) {\n        return {\n          expression: $(refSymbol),\n          meta: defaultMeta(schema),\n        };\n      }\n\n      return {\n        expression: $(z)\n          .attr(identifiers.lazy)\n          .call($.func().do($(refSymbol).return())),\n        meta: {\n          ...defaultMeta(schema),\n          hasLazy: true,\n          isLazy: true,\n        },\n      };\n    },\n    string(schema, ctx) {\n      if (shouldCoerceToBigInt(schema.format)) {\n        const expression = numberToNode({\n          plugin: ctx.plugin,\n          schema: { ...schema, type: 'number' },\n        });\n        return {\n          expression,\n          meta: defaultMeta(schema),\n        };\n      }\n\n      const expression = stringToNode({ plugin: ctx.plugin, schema });\n      return {\n        expression,\n        meta: defaultMeta(schema),\n      };\n    },\n    tuple(schema, ctx, walk) {\n      const applyModifiers: Parameters<typeof tupleToAst>[0]['applyModifiers'] = (result, opts) =>\n        this.applyModifiers(result, ctx, opts) as ZodFinal;\n      const { childResults, expression } = tupleToAst({\n        applyModifiers,\n        plugin: ctx.plugin,\n        schema,\n        walk,\n        walkerCtx: ctx,\n      });\n\n      return {\n        expression,\n        meta: inheritMeta(schema, childResults),\n      };\n    },\n    undefined(schema, ctx) {\n      const expression = undefinedToAst({ plugin: ctx.plugin, schema });\n      return {\n        expression,\n        meta: {\n          ...defaultMeta(schema),\n          nullable: false,\n          readonly: false,\n        },\n      };\n    },\n    union(items, schemas, parentSchema, ctx) {\n      const z = ctx.plugin.external('zod.z');\n      const hasAnyLazy = items.some((item) => item.meta.hasLazy);\n\n      const hasNull = schemas.some((s) => s.type === 'null') || items.some((i) => i.meta.nullable);\n\n      const nonNullItems: typeof items = [];\n\n      items.forEach((item, index) => {\n        const schema = schemas[index]!;\n        if (schema.type !== 'null' && schema.const !== null) {\n          nonNullItems.push(item);\n        }\n      });\n\n      let expression: Chain;\n      if (nonNullItems.length === 0) {\n        expression = $(z).attr(identifiers.null).call();\n      } else if (nonNullItems.length === 1) {\n        expression = nonNullItems[0]!.expression;\n      } else {\n        expression = $(z)\n          .attr(identifiers.union)\n          .call(\n            $.array()\n              .pretty()\n              .elements(...nonNullItems.map((item) => item.expression)),\n          );\n      }\n\n      return {\n        expression,\n        meta: {\n          default: parentSchema.default,\n          format: parentSchema.format,\n          hasLazy: hasAnyLazy,\n          isLazy: false,\n          nullable: hasNull,\n          readonly: items.some((i) => i.meta.readonly),\n        },\n      };\n    },\n    unknown(schema, ctx) {\n      const expression = unknownToAst({ plugin: ctx.plugin, schema });\n      return {\n        expression,\n        meta: {\n          ...defaultMeta(schema),\n          nullable: false,\n          readonly: false,\n        },\n      };\n    },\n    void(schema, ctx) {\n      const expression = voidToAst({ plugin: ctx.plugin, schema });\n      return {\n        expression,\n        meta: {\n          ...defaultMeta(schema),\n          nullable: false,\n          readonly: false,\n        },\n      };\n    },\n  };\n}\n"
  },
  {
    "path": "packages/openapi-ts/src/plugins/zod/v4/api.ts",
    "content": "import { $ } from '../../../ts-dsl';\nimport { identifiers } from '../constants';\nimport type { ValidatorResolverContext } from '../resolvers';\nimport type { ValidatorArgs } from '../shared/types';\n\nconst validatorResolver = (ctx: ValidatorResolverContext): ReturnType<typeof $.return> => {\n  const { schema } = ctx.symbols;\n  return $(schema).attr(identifiers.parseAsync).call('data').await().return();\n};\n\nexport const createRequestValidatorV4 = ({\n  operation,\n  plugin,\n}: ValidatorArgs): ReturnType<typeof $.func> | undefined => {\n  const symbol = plugin.getSymbol({\n    category: 'schema',\n    resource: 'operation',\n    resourceId: operation.id,\n    role: 'data',\n    tool: 'zod',\n  });\n  if (!symbol) return;\n\n  const z = plugin.external('zod.z');\n  const ctx: ValidatorResolverContext = {\n    $,\n    chain: {\n      current: $(z),\n    },\n    operation,\n    plugin,\n    symbols: {\n      schema: symbol,\n      z,\n    },\n  };\n  const validator = plugin.config['~resolvers']?.validator;\n  const resolver = typeof validator === 'function' ? validator : validator?.request;\n  const candidates = [resolver, validatorResolver];\n  for (const candidate of candidates) {\n    const statements = candidate?.(ctx);\n    if (statements === null) return;\n    if (statements !== undefined) {\n      return $.func()\n        .async()\n        .param('data')\n        .do(...(statements instanceof Array ? statements : [statements]));\n    }\n  }\n  return;\n};\n\nexport const createResponseValidatorV4 = ({\n  operation,\n  plugin,\n}: ValidatorArgs): ReturnType<typeof $.func> | undefined => {\n  const symbol = plugin.getSymbol({\n    category: 'schema',\n    resource: 'operation',\n    resourceId: operation.id,\n    role: 'responses',\n    tool: 'zod',\n  });\n  if (!symbol) return;\n\n  const z = plugin.external('zod.z');\n  const ctx: ValidatorResolverContext = {\n    $,\n    chain: {\n      current: $(z),\n    },\n    operation,\n    plugin,\n    symbols: {\n      schema: symbol,\n      z,\n    },\n  };\n  const validator = plugin.config['~resolvers']?.validator;\n  const resolver = typeof validator === 'function' ? validator : validator?.response;\n  const candidates = [resolver, validatorResolver];\n  for (const candidate of candidates) {\n    const statements = candidate?.(ctx);\n    if (statements === null) return;\n    if (statements !== undefined) {\n      return $.func()\n        .async()\n        .param('data')\n        .do(...(statements instanceof Array ? statements : [statements]));\n    }\n  }\n  return;\n};\n"
  },
  {
    "path": "packages/openapi-ts/src/plugins/zod/v4/plugin.ts",
    "content": "import { pathToJsonPointer } from '@hey-api/shared';\n\nimport { getZodModule } from '../shared/module';\nimport { irOperationToAst } from '../shared/operation';\nimport { irWebhookToAst } from '../shared/webhook';\nimport type { ZodPlugin } from '../types';\nimport { createProcessor } from './processor';\n\nexport const handlerV4: ZodPlugin['Handler'] = ({ plugin }) => {\n  plugin.symbol('z', {\n    external: getZodModule({ plugin }),\n    importKind: 'namespace',\n    meta: {\n      category: 'external',\n      resource: 'zod.z',\n    },\n  });\n\n  const processor = createProcessor(plugin);\n\n  plugin.forEach('operation', 'parameter', 'requestBody', 'schema', 'webhook', (event) => {\n    switch (event.type) {\n      case 'operation':\n        irOperationToAst({\n          operation: event.operation,\n          path: event._path,\n          plugin,\n          processor,\n          tags: event.tags,\n        });\n        break;\n      case 'parameter':\n        processor.process({\n          meta: {\n            resource: 'definition',\n            resourceId: pathToJsonPointer(event._path),\n          },\n          naming: plugin.config.definitions,\n          path: event._path,\n          plugin,\n          schema: event.parameter.schema,\n          tags: event.tags,\n        });\n        break;\n      case 'requestBody':\n        processor.process({\n          meta: {\n            resource: 'definition',\n            resourceId: pathToJsonPointer(event._path),\n          },\n          naming: plugin.config.definitions,\n          path: event._path,\n          plugin,\n          schema: event.requestBody.schema,\n          tags: event.tags,\n        });\n        break;\n      case 'schema':\n        processor.process({\n          meta: {\n            resource: 'definition',\n            resourceId: pathToJsonPointer(event._path),\n          },\n          naming: plugin.config.definitions,\n          path: event._path,\n          plugin,\n          schema: event.schema,\n          tags: event.tags,\n        });\n        break;\n      case 'webhook':\n        irWebhookToAst({\n          operation: event.operation,\n          path: event._path,\n          plugin,\n          processor,\n          tags: event.tags,\n        });\n        break;\n    }\n  });\n};\n"
  },
  {
    "path": "packages/openapi-ts/src/plugins/zod/v4/processor.ts",
    "content": "import { ref } from '@hey-api/codegen-core';\nimport type { IR } from '@hey-api/shared';\nimport { createSchemaProcessor, createSchemaWalker, pathToJsonPointer } from '@hey-api/shared';\n\nimport { exportAst } from '../shared/export';\nimport type { ProcessorContext, ProcessorResult } from '../shared/processor';\nimport type { ZodFinal } from '../shared/types';\nimport type { ZodPlugin } from '../types';\nimport { createVisitor } from './walker';\n\nexport function createProcessor(plugin: ZodPlugin['Instance']): ProcessorResult {\n  const processor = createSchemaProcessor();\n\n  const hooks = [plugin.config['~hooks']?.schemas, plugin.context.config.parser.hooks.schemas];\n\n  function extractor(ctx: ProcessorContext): IR.SchemaObject {\n    if (processor.hasEmitted(ctx.path)) {\n      return ctx.schema;\n    }\n\n    for (const hook of hooks) {\n      const result = hook?.shouldExtract?.(ctx);\n      if (result) {\n        process({\n          namingAnchor: processor.context.anchor,\n          tags: processor.context.tags,\n          ...ctx,\n        });\n        return { $ref: pathToJsonPointer(ctx.path) };\n      }\n    }\n\n    return ctx.schema;\n  }\n\n  function process(ctx: ProcessorContext): ZodFinal | void {\n    if (!processor.markEmitted(ctx.path)) return;\n\n    const shouldExport = ctx.export !== false;\n\n    return processor.withContext({ anchor: ctx.namingAnchor, tags: ctx.tags }, () => {\n      const visitor = createVisitor({ schemaExtractor: extractor });\n      const walk = createSchemaWalker(visitor);\n\n      const result = walk(ctx.schema, {\n        path: ref(ctx.path),\n        plugin,\n      });\n\n      const final = visitor.applyModifiers(result, {\n        path: ref(ctx.path),\n        plugin,\n      }) as ZodFinal;\n\n      if (shouldExport) {\n        exportAst({ ...ctx, final, plugin });\n        return;\n      }\n\n      return final;\n    });\n  }\n\n  return { process };\n}\n"
  },
  {
    "path": "packages/openapi-ts/src/plugins/zod/v4/toAst/array.ts",
    "content": "import { childContext, deduplicateSchema } from '@hey-api/shared';\n\nimport { $ } from '../../../../ts-dsl';\nimport { identifiers } from '../../constants';\nimport type { ArrayResolverContext } from '../../resolvers';\nimport type { Chain, ChainResult } from '../../shared/chain';\nimport type { CompositeHandlerResult, ZodResult } from '../../shared/types';\nimport { unknownToAst } from './unknown';\n\ntype ArrayToAstOptions = Pick<\n  ArrayResolverContext,\n  'applyModifiers' | 'plugin' | 'schema' | 'walk' | 'walkerCtx'\n>;\n\nfunction baseNode(ctx: ArrayResolverContext): Chain {\n  const { applyModifiers, childResults, plugin, schema, symbols } = ctx;\n  const { z } = symbols;\n\n  const arrayFn = $(z).attr(identifiers.array);\n\n  let normalizedSchema = schema;\n  if (normalizedSchema.items) {\n    normalizedSchema = deduplicateSchema({ schema: normalizedSchema });\n  }\n\n  if (!normalizedSchema.items) {\n    return arrayFn.call(\n      unknownToAst({\n        plugin,\n        schema: {\n          type: 'unknown',\n        },\n      }),\n    );\n  }\n\n  if (childResults.length === 1) {\n    const itemNode = applyModifiers(childResults[0]!, { optional: false }).expression;\n    return arrayFn.call(itemNode);\n  }\n\n  if (childResults.length > 1) {\n    const itemExpressions: Array<Chain> = childResults.map(\n      (result) => applyModifiers(result, { optional: false }).expression,\n    );\n\n    const firstSchema = normalizedSchema.items[0];\n    if (normalizedSchema.logicalOperator === 'and') {\n      let intersectionExpression: Chain;\n      if (\n        firstSchema?.logicalOperator === 'or' ||\n        (firstSchema?.type && firstSchema.type !== 'object')\n      ) {\n        intersectionExpression = $(z)\n          .attr(identifiers.intersection)\n          .call(...itemExpressions);\n      } else {\n        intersectionExpression = itemExpressions[0]!;\n        for (let i = 1; i < itemExpressions.length; i++) {\n          intersectionExpression = intersectionExpression\n            .attr(identifiers.and)\n            .call(itemExpressions[i]);\n        }\n      }\n\n      return arrayFn.call(intersectionExpression);\n    } else {\n      return arrayFn.call(\n        $(z)\n          .attr(identifiers.union)\n          .call($.array(...itemExpressions)),\n      );\n    }\n  }\n\n  return arrayFn.call(\n    unknownToAst({\n      plugin,\n      schema: {\n        type: 'unknown',\n      },\n    }),\n  );\n}\n\nfunction lengthNode(ctx: ArrayResolverContext): ChainResult {\n  const { schema } = ctx;\n  if (schema.minItems === schema.maxItems && schema.minItems !== undefined) {\n    return ctx.chain.current.attr(identifiers.length).call($.fromValue(schema.minItems));\n  }\n}\n\nfunction maxLengthNode(ctx: ArrayResolverContext): ChainResult {\n  const { schema } = ctx;\n  if (schema.maxItems === undefined) return;\n  return ctx.chain.current.attr(identifiers.max).call($.fromValue(schema.maxItems));\n}\n\nfunction minLengthNode(ctx: ArrayResolverContext): ChainResult {\n  const { schema } = ctx;\n  if (schema.minItems === undefined) return;\n  return ctx.chain.current.attr(identifiers.min).call($.fromValue(schema.minItems));\n}\n\nfunction arrayResolver(ctx: ArrayResolverContext): Chain {\n  const baseResult = ctx.nodes.base(ctx);\n  ctx.chain.current = baseResult;\n\n  const lengthResult = ctx.nodes.length(ctx);\n  if (lengthResult) {\n    ctx.chain.current = lengthResult;\n  } else {\n    const minLengthResult = ctx.nodes.minLength(ctx);\n    if (minLengthResult) {\n      ctx.chain.current = minLengthResult;\n    }\n\n    const maxLengthResult = ctx.nodes.maxLength(ctx);\n    if (maxLengthResult) {\n      ctx.chain.current = maxLengthResult;\n    }\n  }\n\n  return ctx.chain.current;\n}\n\nexport function arrayToAst({\n  applyModifiers,\n  plugin,\n  schema,\n  walk,\n  walkerCtx,\n}: ArrayToAstOptions): CompositeHandlerResult {\n  const childResults: Array<ZodResult> = [];\n  let schemaCopy = schema;\n\n  const z = plugin.external('zod.z');\n\n  if (schemaCopy.items) {\n    schemaCopy = deduplicateSchema({ schema: schemaCopy });\n\n    schemaCopy.items!.forEach((item, index) => {\n      const itemResult = walk(item, childContext(walkerCtx, 'items', index));\n      childResults.push(itemResult);\n    });\n  }\n\n  const ctx: ArrayResolverContext = {\n    $,\n    applyModifiers,\n    chain: {\n      current: $(z),\n    },\n    childResults,\n    nodes: {\n      base: baseNode,\n      length: lengthNode,\n      maxLength: maxLengthNode,\n      minLength: minLengthNode,\n    },\n    plugin,\n    schema,\n    symbols: {\n      z,\n    },\n    walk,\n    walkerCtx,\n  };\n\n  const resolver = plugin.config['~resolvers']?.array;\n  const expression = resolver?.(ctx) ?? arrayResolver(ctx);\n\n  return {\n    childResults,\n    expression,\n  };\n}\n"
  },
  {
    "path": "packages/openapi-ts/src/plugins/zod/v4/toAst/boolean.ts",
    "content": "import type { SchemaWithType } from '@hey-api/shared';\n\nimport { $ } from '../../../../ts-dsl';\nimport { identifiers } from '../../constants';\nimport type { BooleanResolverContext } from '../../resolvers';\nimport type { Chain, ChainResult } from '../../shared/chain';\nimport type { ZodPlugin } from '../../types';\n\nfunction baseNode(ctx: BooleanResolverContext): Chain {\n  const { symbols } = ctx;\n  const { z } = symbols;\n  return $(z).attr(identifiers.boolean).call();\n}\n\nfunction constNode(ctx: BooleanResolverContext): ChainResult {\n  const { schema, symbols } = ctx;\n  const { z } = symbols;\n  if (typeof schema.const !== 'boolean') return;\n  return $(z).attr(identifiers.literal).call($.literal(schema.const));\n}\n\nfunction booleanResolver(ctx: BooleanResolverContext): Chain {\n  const constResult = ctx.nodes.const(ctx);\n  if (constResult) {\n    ctx.chain.current = constResult;\n    return ctx.chain.current;\n  }\n\n  const baseResult = ctx.nodes.base(ctx);\n  ctx.chain.current = baseResult;\n\n  return ctx.chain.current;\n}\n\nexport function booleanToAst({\n  plugin,\n  schema,\n}: {\n  plugin: ZodPlugin['Instance'];\n  schema: SchemaWithType<'boolean'>;\n}): Chain {\n  const z = plugin.external('zod.z');\n  const ctx: BooleanResolverContext = {\n    $,\n    chain: {\n      current: $(z),\n    },\n    nodes: {\n      base: baseNode,\n      const: constNode,\n    },\n    plugin,\n    schema,\n    symbols: {\n      z,\n    },\n  };\n\n  const resolver = plugin.config['~resolvers']?.boolean;\n  return resolver?.(ctx) ?? booleanResolver(ctx);\n}\n"
  },
  {
    "path": "packages/openapi-ts/src/plugins/zod/v4/toAst/enum.ts",
    "content": "import type { SchemaWithType } from '@hey-api/shared';\n\nimport { $ } from '../../../../ts-dsl';\nimport { identifiers } from '../../constants';\nimport type { EnumResolverContext } from '../../resolvers';\nimport type { Chain } from '../../shared/chain';\nimport type { ZodPlugin } from '../../types';\nimport { unknownToAst } from './unknown';\n\nfunction itemsNode(ctx: EnumResolverContext): ReturnType<EnumResolverContext['nodes']['items']> {\n  const { schema, symbols } = ctx;\n  const { z } = symbols;\n\n  const enumMembers: Array<ReturnType<typeof $.literal>> = [];\n  const literalMembers: Array<Chain> = [];\n\n  let isNullable = false;\n  let allStrings = true;\n\n  for (const item of schema.items ?? []) {\n    if (item.type === 'string' && typeof item.const === 'string') {\n      const literal = $.literal(item.const);\n      enumMembers.push(literal);\n      literalMembers.push($(z).attr(identifiers.literal).call(literal));\n    } else if (\n      (item.type === 'number' || item.type === 'integer') &&\n      typeof item.const === 'number'\n    ) {\n      allStrings = false;\n      const literal = $.literal(item.const);\n      literalMembers.push($(z).attr(identifiers.literal).call(literal));\n    } else if (item.type === 'boolean' && typeof item.const === 'boolean') {\n      allStrings = false;\n      const literal = $.literal(item.const);\n      literalMembers.push($(z).attr(identifiers.literal).call(literal));\n    } else if (item.type === 'null' || item.const === null) {\n      isNullable = true;\n    }\n  }\n\n  return {\n    allStrings,\n    enumMembers,\n    isNullable,\n    literalMembers,\n  };\n}\n\nfunction baseNode(ctx: EnumResolverContext): Chain {\n  const { symbols } = ctx;\n  const { z } = symbols;\n  const { allStrings, enumMembers, literalMembers } = ctx.nodes.items(ctx);\n\n  if (allStrings && enumMembers.length > 0) {\n    return $(z)\n      .attr(identifiers.enum)\n      .call($.array(...enumMembers));\n  }\n\n  if (literalMembers.length === 1) {\n    return literalMembers[0]!;\n  }\n\n  return $(z)\n    .attr(identifiers.union)\n    .call($.array(...literalMembers));\n}\n\nfunction enumResolver(ctx: EnumResolverContext): Chain {\n  const { literalMembers } = ctx.nodes.items(ctx);\n\n  if (!literalMembers.length) {\n    return ctx.chain.current;\n  }\n\n  const baseExpression = ctx.nodes.base(ctx);\n  ctx.chain.current = baseExpression;\n\n  return ctx.chain.current;\n}\n\nexport function enumToAst({\n  plugin,\n  schema,\n}: {\n  plugin: ZodPlugin['Instance'];\n  schema: SchemaWithType<'enum'>;\n}): Chain {\n  const z = plugin.external('zod.z');\n\n  const ctx: EnumResolverContext = {\n    $,\n    chain: {\n      current: $(z),\n    },\n    nodes: {\n      base: baseNode,\n      items: itemsNode,\n    },\n    plugin,\n    schema,\n    symbols: {\n      z,\n    },\n  };\n\n  const { literalMembers } = itemsNode(ctx);\n\n  if (!literalMembers.length) {\n    return unknownToAst({\n      plugin,\n      schema: {\n        type: 'unknown',\n      },\n    });\n  }\n\n  const resolver = plugin.config['~resolvers']?.enum;\n  return resolver?.(ctx) ?? enumResolver(ctx);\n}\n"
  },
  {
    "path": "packages/openapi-ts/src/plugins/zod/v4/toAst/intersection.ts",
    "content": "import type { IR } from '@hey-api/shared';\nimport { childContext } from '@hey-api/shared';\n\nimport { $ } from '../../../../ts-dsl';\nimport { identifiers } from '../../constants';\nimport type { IntersectionResolverContext } from '../../resolvers';\nimport type { Chain } from '../../shared/chain';\nimport type { ZodResult } from '../../shared/types';\n\ntype IntersectionToAstOptions = Pick<\n  IntersectionResolverContext,\n  'parentSchema' | 'plugin' | 'walk' | 'walkerCtx'\n> & {\n  schemas: ReadonlyArray<IR.SchemaObject>;\n};\n\nfunction baseNode(ctx: IntersectionResolverContext): Chain {\n  const { childResults, symbols } = ctx;\n  const { z } = symbols;\n\n  if (childResults.length === 0) {\n    return $(z).attr(identifiers.never).call();\n  }\n\n  return $(z)\n    .attr(identifiers.intersection)\n    .call(...childResults.map((result) => result.expression));\n}\n\nfunction intersectionResolver(ctx: IntersectionResolverContext): Chain {\n  const baseResult = ctx.nodes.base(ctx);\n  ctx.chain.current = baseResult;\n  return ctx.chain.current;\n}\n\nexport function intersectionToAst({\n  parentSchema,\n  plugin,\n  schemas,\n  walk,\n  walkerCtx,\n}: IntersectionToAstOptions): {\n  childResults: Array<ZodResult>;\n  expression: Chain;\n} {\n  const z = plugin.external('zod.z');\n\n  const childResults: Array<ZodResult> = [];\n  schemas.forEach((schema, index) => {\n    const itemResult = walk(schema, childContext(walkerCtx, 'allOf', index));\n    childResults.push(itemResult);\n  });\n\n  const ctx: IntersectionResolverContext = {\n    $,\n    chain: {\n      current: $(z),\n    },\n    childResults,\n    nodes: {\n      base: baseNode,\n    },\n    parentSchema,\n    plugin,\n    schema: parentSchema,\n    symbols: {\n      z,\n    },\n    walk,\n    walkerCtx,\n  };\n\n  const resolver = plugin.config['~resolvers']?.intersection;\n  const expression = resolver?.(ctx) ?? intersectionResolver(ctx);\n\n  return {\n    childResults,\n    expression,\n  };\n}\n"
  },
  {
    "path": "packages/openapi-ts/src/plugins/zod/v4/toAst/never.ts",
    "content": "import type { SchemaWithType } from '@hey-api/shared';\n\nimport { $ } from '../../../../ts-dsl';\nimport { identifiers } from '../../constants';\nimport type { NeverResolverContext } from '../../resolvers';\nimport type { Chain } from '../../shared/chain';\nimport type { ZodPlugin } from '../../types';\n\nfunction baseNode(ctx: NeverResolverContext): Chain {\n  const { symbols } = ctx;\n  const { z } = symbols;\n  return $(z).attr(identifiers.never).call();\n}\n\nfunction neverResolver(ctx: NeverResolverContext): Chain {\n  const baseResult = ctx.nodes.base(ctx);\n  ctx.chain.current = baseResult;\n  return ctx.chain.current;\n}\n\nexport function neverToAst({\n  plugin,\n  schema,\n}: {\n  plugin: ZodPlugin['Instance'];\n  schema: SchemaWithType<'never'>;\n}): Chain {\n  const z = plugin.external('zod.z');\n  const ctx: NeverResolverContext = {\n    $,\n    chain: {\n      current: $(z),\n    },\n    nodes: {\n      base: baseNode,\n    },\n    plugin,\n    schema,\n    symbols: {\n      z,\n    },\n  };\n\n  const resolver = plugin.config['~resolvers']?.never;\n  return resolver?.(ctx) ?? neverResolver(ctx);\n}\n"
  },
  {
    "path": "packages/openapi-ts/src/plugins/zod/v4/toAst/null.ts",
    "content": "import type { SchemaWithType } from '@hey-api/shared';\n\nimport { $ } from '../../../../ts-dsl';\nimport { identifiers } from '../../constants';\nimport type { NullResolverContext } from '../../resolvers';\nimport type { Chain } from '../../shared/chain';\nimport type { ZodPlugin } from '../../types';\n\nfunction baseNode(ctx: NullResolverContext): Chain {\n  const { symbols } = ctx;\n  const { z } = symbols;\n  return $(z).attr(identifiers.null).call();\n}\n\nfunction nullResolver(ctx: NullResolverContext): Chain {\n  const baseResult = ctx.nodes.base(ctx);\n  ctx.chain.current = baseResult;\n  return ctx.chain.current;\n}\n\nexport function nullToAst({\n  plugin,\n  schema,\n}: {\n  plugin: ZodPlugin['Instance'];\n  schema: SchemaWithType<'null'>;\n}): Chain {\n  const z = plugin.external('zod.z');\n  const ctx: NullResolverContext = {\n    $,\n    chain: {\n      current: $(z),\n    },\n    nodes: {\n      base: baseNode,\n    },\n    plugin,\n    schema,\n    symbols: {\n      z,\n    },\n  };\n\n  const resolver = plugin.config['~resolvers']?.null;\n  return resolver?.(ctx) ?? nullResolver(ctx);\n}\n"
  },
  {
    "path": "packages/openapi-ts/src/plugins/zod/v4/toAst/number.ts",
    "content": "import type { SchemaWithType } from '@hey-api/shared';\n\nimport { maybeBigInt, shouldCoerceToBigInt } from '../../../../plugins/shared/utils/coerce';\nimport { getIntegerLimit } from '../../../../plugins/shared/utils/formats';\nimport { $ } from '../../../../ts-dsl';\nimport { identifiers } from '../../constants';\nimport type { NumberResolverContext } from '../../resolvers';\nimport type { Chain, ChainResult } from '../../shared/chain';\nimport type { ZodPlugin } from '../../types';\n\nfunction baseNode(ctx: NumberResolverContext): Chain {\n  const { schema, symbols } = ctx;\n  const { z } = symbols;\n  if (ctx.utils.shouldCoerceToBigInt(schema.format)) {\n    return $(z).attr(identifiers.coerce).attr(identifiers.bigint).call();\n  }\n  let chain = $(z).attr(identifiers.number).call();\n  if (schema.type === 'integer') {\n    chain = $(z).attr(identifiers.int).call();\n  }\n  return chain;\n}\n\nfunction constNode(ctx: NumberResolverContext): ChainResult {\n  const { schema, symbols } = ctx;\n  const { z } = symbols;\n  if (schema.const === undefined) return;\n  return $(z).attr(identifiers.literal).call(ctx.utils.maybeBigInt(schema.const, schema.format));\n}\n\nfunction maxNode(ctx: NumberResolverContext): ChainResult {\n  const { chain, schema } = ctx;\n  if (schema.exclusiveMaximum !== undefined) {\n    return chain.current\n      .attr(identifiers.lt)\n      .call(ctx.utils.maybeBigInt(schema.exclusiveMaximum, schema.format));\n  }\n  if (schema.maximum !== undefined) {\n    return chain.current\n      .attr(identifiers.lte)\n      .call(ctx.utils.maybeBigInt(schema.maximum, schema.format));\n  }\n  const limit = ctx.utils.getIntegerLimit(schema.format);\n  if (limit) {\n    return chain.current\n      .attr(identifiers.max)\n      .call(\n        ctx.utils.maybeBigInt(limit.maxValue, schema.format),\n        $.object().prop('error', $.literal(limit.maxError)),\n      );\n  }\n  return;\n}\n\nfunction minNode(ctx: NumberResolverContext): ChainResult {\n  const { chain, schema } = ctx;\n  if (schema.exclusiveMinimum !== undefined) {\n    return chain.current\n      .attr(identifiers.gt)\n      .call(ctx.utils.maybeBigInt(schema.exclusiveMinimum, schema.format));\n  }\n  if (schema.minimum !== undefined) {\n    return chain.current\n      .attr(identifiers.gte)\n      .call(ctx.utils.maybeBigInt(schema.minimum, schema.format));\n  }\n  const limit = ctx.utils.getIntegerLimit(schema.format);\n  if (limit) {\n    return chain.current\n      .attr(identifiers.min)\n      .call(\n        ctx.utils.maybeBigInt(limit.minValue, schema.format),\n        $.object().prop('error', $.literal(limit.minError)),\n      );\n  }\n  return;\n}\n\nfunction numberResolver(ctx: NumberResolverContext): Chain {\n  const constNode = ctx.nodes.const(ctx);\n  if (constNode) {\n    ctx.chain.current = constNode;\n    return ctx.chain.current;\n  }\n\n  const baseNode = ctx.nodes.base(ctx);\n  if (baseNode) ctx.chain.current = baseNode;\n\n  const minNode = ctx.nodes.min(ctx);\n  if (minNode) ctx.chain.current = minNode;\n\n  const maxNode = ctx.nodes.max(ctx);\n  if (maxNode) ctx.chain.current = maxNode;\n\n  return ctx.chain.current;\n}\n\nexport function numberToNode({\n  plugin,\n  schema,\n}: {\n  plugin: ZodPlugin['Instance'];\n  schema: SchemaWithType<'integer' | 'number'>;\n}): Chain {\n  const z = plugin.external('zod.z');\n  const ctx: NumberResolverContext = {\n    $,\n    chain: {\n      current: $(z),\n    },\n    nodes: {\n      base: baseNode,\n      const: constNode,\n      max: maxNode,\n      min: minNode,\n    },\n    plugin,\n    schema,\n    symbols: {\n      z,\n    },\n    utils: {\n      getIntegerLimit,\n      maybeBigInt,\n      shouldCoerceToBigInt,\n    },\n  };\n  const resolver = plugin.config['~resolvers']?.number;\n  return resolver?.(ctx) ?? numberResolver(ctx);\n}\n"
  },
  {
    "path": "packages/openapi-ts/src/plugins/zod/v4/toAst/object.ts",
    "content": "import type { SchemaVisitorContext, SchemaWithType, Walker } from '@hey-api/shared';\nimport { childContext } from '@hey-api/shared';\n\nimport { $ } from '../../../../ts-dsl';\nimport { identifiers } from '../../constants';\nimport type { ObjectResolverContext } from '../../resolvers';\nimport type { Chain } from '../../shared/chain';\nimport type { CompositeHandlerResult, ZodFinal, ZodResult } from '../../shared/types';\nimport type { ZodPlugin } from '../../types';\n\ntype WalkerCtx = SchemaVisitorContext<ZodPlugin['Instance']>;\n\ninterface ObjectToAstOptions {\n  applyModifiers: (result: ZodResult, opts: { optional?: boolean }) => ZodFinal;\n  plugin: ZodPlugin['Instance'];\n  schema: SchemaWithType<'object'>;\n  walk: Walker<ZodResult, ZodPlugin['Instance']>;\n  walkerCtx: WalkerCtx;\n}\n\ntype ExtendedContext = ObjectResolverContext & {\n  applyModifiers: ObjectToAstOptions['applyModifiers'];\n  walk: ObjectToAstOptions['walk'];\n  walkerCtx: ObjectToAstOptions['walkerCtx'];\n};\n\nfunction additionalPropertiesNode(ctx: ExtendedContext): Chain | null | undefined {\n  const { _childResults, applyModifiers, schema, walk, walkerCtx } = ctx;\n\n  if (\n    !schema.additionalProperties ||\n    (schema.properties && Object.keys(schema.properties).length > 0)\n  ) {\n    return;\n  }\n\n  const additionalResult = walk(\n    schema.additionalProperties,\n    childContext(walkerCtx, 'additionalProperties'),\n  );\n  _childResults.push(additionalResult);\n  const finalExpr = applyModifiers(additionalResult, {});\n  return finalExpr.expression;\n}\n\nfunction baseNode(ctx: ExtendedContext): Chain {\n  const { nodes, symbols } = ctx;\n  const { z } = symbols;\n\n  const additional = nodes.additionalProperties(ctx);\n  const shape = nodes.shape(ctx);\n\n  if (additional) {\n    return $(z).attr(identifiers.record).call($(z).attr(identifiers.string).call(), additional);\n  }\n\n  return $(z).attr(identifiers.object).call(shape);\n}\n\nfunction objectResolver(ctx: ExtendedContext): Chain {\n  return ctx.nodes.base(ctx);\n}\n\nfunction shapeNode(ctx: ExtendedContext): ReturnType<typeof $.object> {\n  const { _childResults, applyModifiers, schema, walk, walkerCtx } = ctx;\n  const shape = $.object().pretty();\n\n  for (const name in schema.properties) {\n    const property = schema.properties[name]!;\n    const isOptional = !schema.required?.includes(name);\n\n    const propertyResult = walk(property, childContext(walkerCtx, 'properties', name));\n    _childResults.push(propertyResult);\n\n    const finalExpr = applyModifiers(propertyResult, {\n      optional: isOptional,\n    });\n\n    shape.prop(name, finalExpr.expression);\n  }\n\n  return shape;\n}\n\nexport function objectToAst(options: ObjectToAstOptions): CompositeHandlerResult {\n  const { applyModifiers, plugin, schema, walk, walkerCtx } = options;\n  const childResults: Array<ZodResult> = [];\n  const z = plugin.external('zod.z');\n  const ctx: ExtendedContext = {\n    $,\n    _childResults: childResults,\n    applyModifiers,\n    chain: {\n      current: $(z),\n    },\n    nodes: {\n      additionalProperties: additionalPropertiesNode,\n      base: baseNode,\n      shape: shapeNode,\n    },\n    plugin,\n    schema,\n    symbols: {\n      z,\n    },\n    walk,\n    walkerCtx,\n  };\n  const resolver = plugin.config['~resolvers']?.object;\n  const node = resolver?.(ctx) ?? objectResolver(ctx);\n\n  return {\n    childResults,\n    expression: node,\n  };\n}\n"
  },
  {
    "path": "packages/openapi-ts/src/plugins/zod/v4/toAst/string.ts",
    "content": "import type { SchemaWithType } from '@hey-api/shared';\n\nimport { $ } from '../../../../ts-dsl';\nimport { identifiers } from '../../constants';\nimport type { StringResolverContext } from '../../resolvers';\nimport type { Chain, ChainResult } from '../../shared/chain';\nimport type { ZodPlugin } from '../../types';\n\nfunction baseNode(ctx: StringResolverContext): Chain {\n  const { z } = ctx.symbols;\n  return $(z).attr(identifiers.string).call();\n}\n\nfunction constNode(ctx: StringResolverContext): ChainResult {\n  const { schema, symbols } = ctx;\n  const { z } = symbols;\n  if (typeof schema.const !== 'string') return;\n  return $(z).attr(identifiers.literal).call($.literal(schema.const));\n}\n\nfunction formatNode(ctx: StringResolverContext): ChainResult {\n  const { plugin, schema, symbols } = ctx;\n  const { z } = symbols;\n\n  switch (schema.format) {\n    case 'date':\n      return $(z).attr(identifiers.iso).attr(identifiers.date).call();\n    case 'date-time': {\n      const obj = $.object()\n        .$if(plugin.config.dates.offset, (o) => o.prop('offset', $.literal(true)))\n        .$if(plugin.config.dates.local, (o) => o.prop('local', $.literal(true)));\n      return $(z)\n        .attr(identifiers.iso)\n        .attr(identifiers.datetime)\n        .call(obj.hasProps() ? obj : undefined);\n    }\n    case 'email':\n      return $(z).attr(identifiers.email).call();\n    case 'guid':\n      return $(z).attr(identifiers.guid).call();\n    case 'ipv4':\n      return $(z).attr(identifiers.ipv4).call();\n    case 'ipv6':\n      return $(z).attr(identifiers.ipv6).call();\n    case 'time':\n      return $(z).attr(identifiers.iso).attr(identifiers.time).call();\n    case 'uri':\n      return $(z).attr(identifiers.url).call();\n    case 'uuid':\n      return $(z).attr(identifiers.uuid).call();\n  }\n\n  return;\n}\n\nfunction lengthNode(ctx: StringResolverContext): ChainResult {\n  const { chain, schema } = ctx;\n  if (schema.minLength === undefined || schema.minLength !== schema.maxLength) return;\n  return chain.current.attr(identifiers.length).call($.literal(schema.minLength));\n}\n\nfunction maxLengthNode(ctx: StringResolverContext): ChainResult {\n  const { chain, schema } = ctx;\n  if (schema.maxLength === undefined) return;\n  return chain.current.attr(identifiers.max).call($.literal(schema.maxLength));\n}\n\nfunction minLengthNode(ctx: StringResolverContext): ChainResult {\n  const { chain, schema } = ctx;\n  if (schema.minLength === undefined) return;\n  return chain.current.attr(identifiers.min).call($.literal(schema.minLength));\n}\n\nfunction patternNode(ctx: StringResolverContext): ChainResult {\n  const { chain, schema } = ctx;\n  if (!schema.pattern) return;\n  const flags = /\\\\[pP]\\{/.test(schema.pattern) ? 'u' : undefined;\n  return chain.current.attr(identifiers.regex).call($.regexp(schema.pattern, flags));\n}\n\nfunction stringResolver(ctx: StringResolverContext): Chain {\n  const constNode = ctx.nodes.const(ctx);\n  if (constNode) {\n    ctx.chain.current = constNode;\n    return ctx.chain.current;\n  }\n\n  const baseNode = ctx.nodes.base(ctx);\n  if (baseNode) ctx.chain.current = baseNode;\n\n  const formatNode = ctx.nodes.format(ctx);\n  if (formatNode) ctx.chain.current = formatNode;\n\n  const lengthNode = ctx.nodes.length(ctx);\n  if (lengthNode) {\n    ctx.chain.current = lengthNode;\n  } else {\n    const minLengthNode = ctx.nodes.minLength(ctx);\n    if (minLengthNode) ctx.chain.current = minLengthNode;\n\n    const maxLengthNode = ctx.nodes.maxLength(ctx);\n    if (maxLengthNode) ctx.chain.current = maxLengthNode;\n  }\n\n  const patternNode = ctx.nodes.pattern(ctx);\n  if (patternNode) ctx.chain.current = patternNode;\n\n  return ctx.chain.current;\n}\n\nexport function stringToNode({\n  plugin,\n  schema,\n}: {\n  plugin: ZodPlugin['Instance'];\n  schema: SchemaWithType<'string'>;\n}): Chain {\n  const z = plugin.external('zod.z');\n  const ctx: StringResolverContext = {\n    $,\n    chain: {\n      current: $(z),\n    },\n    nodes: {\n      base: baseNode,\n      const: constNode,\n      format: formatNode,\n      length: lengthNode,\n      maxLength: maxLengthNode,\n      minLength: minLengthNode,\n      pattern: patternNode,\n    },\n    plugin,\n    schema,\n    symbols: {\n      z,\n    },\n  };\n  const resolver = plugin.config['~resolvers']?.string;\n  return resolver?.(ctx) ?? stringResolver(ctx);\n}\n"
  },
  {
    "path": "packages/openapi-ts/src/plugins/zod/v4/toAst/tuple.ts",
    "content": "import { childContext } from '@hey-api/shared';\n\nimport { $ } from '../../../../ts-dsl';\nimport { identifiers } from '../../constants';\nimport type { TupleResolverContext } from '../../resolvers';\nimport type { Chain, ChainResult } from '../../shared/chain';\nimport type { CompositeHandlerResult, ZodResult } from '../../shared/types';\n\ntype TupleToAstOptions = Pick<\n  TupleResolverContext,\n  'applyModifiers' | 'plugin' | 'schema' | 'walk' | 'walkerCtx'\n>;\n\nfunction baseNode(ctx: TupleResolverContext): Chain {\n  const { applyModifiers, childResults, symbols } = ctx;\n  const { z } = symbols;\n\n  const tupleFn = $(z).attr(identifiers.tuple);\n\n  if (childResults.length === 0) {\n    return tupleFn.call($.array());\n  }\n\n  const tupleElements = childResults.map(\n    (result) => applyModifiers(result, { optional: false }).expression,\n  );\n\n  return tupleFn.call($.array(...tupleElements));\n}\n\nfunction constNode(ctx: TupleResolverContext): ChainResult {\n  const { schema, symbols } = ctx;\n  const { z } = symbols;\n\n  if (!schema.const || !Array.isArray(schema.const)) return;\n\n  const tupleElements = schema.const.map((value) =>\n    $(z).attr(identifiers.literal).call($.fromValue(value)),\n  );\n\n  return $(z)\n    .attr(identifiers.tuple)\n    .call($.array(...tupleElements));\n}\n\nfunction tupleResolver(ctx: TupleResolverContext): Chain {\n  const constResult = ctx.nodes.const(ctx);\n  if (constResult) {\n    ctx.chain.current = constResult;\n    return ctx.chain.current;\n  }\n\n  const baseResult = ctx.nodes.base(ctx);\n  ctx.chain.current = baseResult;\n\n  return ctx.chain.current;\n}\n\nexport function tupleToAst({\n  applyModifiers,\n  plugin,\n  schema,\n  walk,\n  walkerCtx,\n}: TupleToAstOptions): CompositeHandlerResult {\n  const childResults: Array<ZodResult> = [];\n\n  const z = plugin.external('zod.z');\n\n  if (schema.items) {\n    schema.items.forEach((item, index) => {\n      const itemResult = walk(item, childContext(walkerCtx, 'items', index));\n      childResults.push(itemResult);\n    });\n  }\n\n  const ctx: TupleResolverContext = {\n    $,\n    applyModifiers,\n    chain: {\n      current: $(z),\n    },\n    childResults,\n    nodes: {\n      base: baseNode,\n      const: constNode,\n    },\n    plugin,\n    schema,\n    symbols: {\n      z,\n    },\n    walk,\n    walkerCtx,\n  };\n\n  const resolver = plugin.config['~resolvers']?.tuple;\n  const expression = resolver?.(ctx) ?? tupleResolver(ctx);\n\n  return {\n    childResults,\n    expression,\n  };\n}\n"
  },
  {
    "path": "packages/openapi-ts/src/plugins/zod/v4/toAst/undefined.ts",
    "content": "import type { SchemaWithType } from '@hey-api/shared';\n\nimport { $ } from '../../../../ts-dsl';\nimport { identifiers } from '../../constants';\nimport type { UndefinedResolverContext } from '../../resolvers';\nimport type { Chain } from '../../shared/chain';\nimport type { ZodPlugin } from '../../types';\n\nfunction baseNode(ctx: UndefinedResolverContext): Chain {\n  const { symbols } = ctx;\n  const { z } = symbols;\n  return $(z).attr(identifiers.undefined).call();\n}\n\nfunction undefinedResolver(ctx: UndefinedResolverContext): Chain {\n  const baseResult = ctx.nodes.base(ctx);\n  ctx.chain.current = baseResult;\n  return ctx.chain.current;\n}\n\nexport function undefinedToAst({\n  plugin,\n  schema,\n}: {\n  plugin: ZodPlugin['Instance'];\n  schema: SchemaWithType<'undefined'>;\n}): Chain {\n  const z = plugin.external('zod.z');\n  const ctx: UndefinedResolverContext = {\n    $,\n    chain: {\n      current: $(z),\n    },\n    nodes: {\n      base: baseNode,\n    },\n    plugin,\n    schema,\n    symbols: {\n      z,\n    },\n  };\n\n  const resolver = plugin.config['~resolvers']?.undefined;\n  return resolver?.(ctx) ?? undefinedResolver(ctx);\n}\n"
  },
  {
    "path": "packages/openapi-ts/src/plugins/zod/v4/toAst/union.ts",
    "content": "import { childContext } from '@hey-api/shared';\n\nimport { $ } from '../../../../ts-dsl';\nimport { identifiers } from '../../constants';\nimport type { UnionResolverContext } from '../../resolvers';\nimport type { Chain } from '../../shared/chain';\nimport type { ZodResult } from '../../shared/types';\n\ntype UnionToAstOptions = Pick<\n  UnionResolverContext,\n  'parentSchema' | 'plugin' | 'schemas' | 'walk' | 'walkerCtx'\n>;\n\nfunction baseNode(ctx: UnionResolverContext): Chain {\n  const { childResults, schemas, symbols } = ctx;\n  const { z } = symbols;\n\n  if (childResults.length === 0) {\n    return $(z).attr(identifiers.null).call();\n  }\n\n  const nonNullItems: Array<ZodResult> = [];\n  childResults.forEach((result, index) => {\n    const schema = schemas[index]!;\n    if (schema.type !== 'null' && schema.const !== null) {\n      nonNullItems.push(result);\n    }\n  });\n\n  let expression: Chain;\n  if (nonNullItems.length === 0) {\n    expression = $(z).attr(identifiers.null).call();\n  } else if (nonNullItems.length === 1) {\n    expression = nonNullItems[0]!.expression;\n  } else {\n    expression = $(z)\n      .attr(identifiers.union)\n      .call(\n        $.array()\n          .pretty()\n          .elements(...nonNullItems.map((item) => item.expression)),\n      );\n  }\n\n  return expression;\n}\n\nfunction unionResolver(ctx: UnionResolverContext): Chain {\n  const baseResult = ctx.nodes.base(ctx);\n  ctx.chain.current = baseResult;\n  return ctx.chain.current;\n}\n\nexport function unionToAst({ parentSchema, plugin, schemas, walk, walkerCtx }: UnionToAstOptions): {\n  childResults: Array<ZodResult>;\n  expression: Chain;\n} {\n  const z = plugin.external('zod.z');\n\n  const childResults: Array<ZodResult> = [];\n  schemas.forEach((schema, index) => {\n    const itemResult = walk(schema, childContext(walkerCtx, 'anyOf', index));\n    childResults.push(itemResult);\n  });\n\n  const ctx: UnionResolverContext = {\n    $,\n    chain: {\n      current: $(z),\n    },\n    childResults,\n    nodes: {\n      base: baseNode,\n    },\n    parentSchema,\n    plugin,\n    schema: parentSchema,\n    schemas,\n    symbols: {\n      z,\n    },\n    walk,\n    walkerCtx,\n  };\n\n  const resolver = plugin.config['~resolvers']?.union;\n  const expression = resolver?.(ctx) ?? unionResolver(ctx);\n\n  return {\n    childResults,\n    expression,\n  };\n}\n"
  },
  {
    "path": "packages/openapi-ts/src/plugins/zod/v4/toAst/unknown.ts",
    "content": "import type { SchemaWithType } from '@hey-api/shared';\n\nimport { $ } from '../../../../ts-dsl';\nimport { identifiers } from '../../constants';\nimport type { UnknownResolverContext } from '../../resolvers';\nimport type { Chain } from '../../shared/chain';\nimport type { ZodPlugin } from '../../types';\n\nfunction baseNode(ctx: UnknownResolverContext): Chain {\n  const { symbols } = ctx;\n  const { z } = symbols;\n  return $(z).attr(identifiers.unknown).call();\n}\n\nfunction unknownResolver(ctx: UnknownResolverContext): Chain {\n  const baseResult = ctx.nodes.base(ctx);\n  ctx.chain.current = baseResult;\n  return ctx.chain.current;\n}\n\nexport function unknownToAst({\n  plugin,\n  schema,\n}: {\n  plugin: ZodPlugin['Instance'];\n  schema: SchemaWithType<'unknown'>;\n}): Chain {\n  const z = plugin.external('zod.z');\n  const ctx: UnknownResolverContext = {\n    $,\n    chain: {\n      current: $(z),\n    },\n    nodes: {\n      base: baseNode,\n    },\n    plugin,\n    schema,\n    symbols: {\n      z,\n    },\n  };\n\n  const resolver = plugin.config['~resolvers']?.unknown;\n  return resolver?.(ctx) ?? unknownResolver(ctx);\n}\n"
  },
  {
    "path": "packages/openapi-ts/src/plugins/zod/v4/toAst/void.ts",
    "content": "import type { SchemaWithType } from '@hey-api/shared';\n\nimport { $ } from '../../../../ts-dsl';\nimport { identifiers } from '../../constants';\nimport type { VoidResolverContext } from '../../resolvers';\nimport type { Chain } from '../../shared/chain';\nimport type { ZodPlugin } from '../../types';\n\nfunction baseNode(ctx: VoidResolverContext): Chain {\n  const { symbols } = ctx;\n  const { z } = symbols;\n  return $(z).attr(identifiers.void).call();\n}\n\nfunction voidResolver(ctx: VoidResolverContext): Chain {\n  const baseResult = ctx.nodes.base(ctx);\n  ctx.chain.current = baseResult;\n  return ctx.chain.current;\n}\n\nexport function voidToAst({\n  plugin,\n  schema,\n}: {\n  plugin: ZodPlugin['Instance'];\n  schema: SchemaWithType<'void'>;\n}): Chain {\n  const z = plugin.external('zod.z');\n  const ctx: VoidResolverContext = {\n    $,\n    chain: {\n      current: $(z),\n    },\n    nodes: {\n      base: baseNode,\n    },\n    plugin,\n    schema,\n    symbols: {\n      z,\n    },\n  };\n\n  const resolver = plugin.config['~resolvers']?.void;\n  return resolver?.(ctx) ?? voidResolver(ctx);\n}\n"
  },
  {
    "path": "packages/openapi-ts/src/plugins/zod/v4/walker.ts",
    "content": "import type { SymbolMeta } from '@hey-api/codegen-core';\nimport { fromRef } from '@hey-api/codegen-core';\nimport type { SchemaExtractor, SchemaVisitor } from '@hey-api/shared';\nimport { pathToJsonPointer } from '@hey-api/shared';\n\nimport { $ } from '../../../ts-dsl';\nimport { maybeBigInt, shouldCoerceToBigInt } from '../../shared/utils/coerce';\nimport { identifiers } from '../constants';\nimport type { Chain } from '../shared/chain';\nimport { defaultMeta, inheritMeta } from '../shared/meta';\nimport type { ProcessorContext } from '../shared/processor';\nimport type { ZodFinal, ZodResult } from '../shared/types';\nimport type { ZodPlugin } from '../types';\nimport { arrayToAst } from './toAst/array';\nimport { booleanToAst } from './toAst/boolean';\nimport { enumToAst } from './toAst/enum';\nimport { neverToAst } from './toAst/never';\nimport { nullToAst } from './toAst/null';\nimport { numberToNode } from './toAst/number';\nimport { objectToAst } from './toAst/object';\nimport { stringToNode } from './toAst/string';\nimport { tupleToAst } from './toAst/tuple';\nimport { undefinedToAst } from './toAst/undefined';\nimport { unknownToAst } from './toAst/unknown';\nimport { voidToAst } from './toAst/void';\n\nexport interface VisitorConfig {\n  /** Optional schema extractor function. */\n  schemaExtractor?: SchemaExtractor<ProcessorContext>;\n}\n\nexport function createVisitor(\n  config: VisitorConfig,\n): SchemaVisitor<ZodResult, ZodPlugin['Instance']> {\n  const { schemaExtractor } = config;\n\n  return {\n    applyModifiers(result, ctx, options = {}): ZodFinal {\n      const { optional } = options;\n      let expression = result.expression;\n\n      if (result.meta.readonly) {\n        expression = expression.attr(identifiers.readonly).call();\n      }\n\n      const hasDefault = result.meta.default !== undefined;\n      const needsNullable = result.meta.nullable;\n\n      if (optional && needsNullable) {\n        expression = expression.attr(identifiers.nullish).call();\n      } else if (optional) {\n        expression = expression.attr(identifiers.optional).call();\n      } else if (needsNullable) {\n        expression = expression.attr(identifiers.nullable).call();\n      }\n\n      if (hasDefault) {\n        expression = expression\n          .attr(identifiers.default)\n          .call(\n            result.meta.format\n              ? maybeBigInt(result.meta.default, result.meta.format)\n              : $.fromValue(result.meta.default),\n          );\n      }\n\n      return {\n        expression,\n      };\n    },\n    array(schema, ctx, walk) {\n      const applyModifiers: Parameters<typeof arrayToAst>[0]['applyModifiers'] = (result, opts) =>\n        this.applyModifiers(result, ctx, opts) as ZodFinal;\n      const { childResults, expression } = arrayToAst({\n        applyModifiers,\n        plugin: ctx.plugin,\n        schema,\n        walk,\n        walkerCtx: ctx,\n      });\n\n      return {\n        expression,\n        meta: inheritMeta(schema, childResults),\n      };\n    },\n    boolean(schema, ctx) {\n      const expression = booleanToAst({ plugin: ctx.plugin, schema });\n      return {\n        expression,\n        meta: defaultMeta(schema),\n      };\n    },\n    enum(schema, ctx) {\n      const expression = enumToAst({ plugin: ctx.plugin, schema });\n      const hasNull =\n        schema.items?.some((item) => item.type === 'null' || item.const === null) ?? false;\n      return {\n        expression,\n        meta: {\n          ...defaultMeta(schema),\n          nullable: hasNull,\n        },\n      };\n    },\n    integer(schema, ctx) {\n      const expression = numberToNode({ plugin: ctx.plugin, schema });\n      return {\n        expression,\n        meta: {\n          ...defaultMeta(schema),\n          format: schema.format,\n        },\n      };\n    },\n    intercept(schema, ctx, walk) {\n      if (schemaExtractor && !schema.$ref) {\n        const extracted = schemaExtractor({\n          meta: {\n            resource: 'definition',\n            resourceId: pathToJsonPointer(fromRef(ctx.path)),\n          },\n          naming: ctx.plugin.config.definitions,\n          path: fromRef(ctx.path),\n          plugin: ctx.plugin,\n          schema,\n        });\n        if (extracted !== schema) {\n          return walk(extracted, ctx);\n        }\n      }\n    },\n    intersection(items, schemas, parentSchema, ctx) {\n      const z = ctx.plugin.external('zod.z');\n      const hasAnyLazy = items.some((item) => item.meta.hasLazy);\n\n      const firstSchema = schemas[0];\n      let expression: Chain;\n\n      if (\n        firstSchema?.logicalOperator === 'or' ||\n        (firstSchema?.type && firstSchema.type !== 'object')\n      ) {\n        expression = $(z)\n          .attr(identifiers.intersection)\n          .call(...items.map((item) => item.expression));\n      } else {\n        expression = items[0]!.expression;\n        items.slice(1).forEach((item) => {\n          expression = expression\n            .attr(identifiers.and)\n            .call(\n              item.meta.hasLazy\n                ? $(z).attr(identifiers.lazy).call($.func().do(item.expression.return()))\n                : item.expression,\n            );\n        });\n      }\n\n      return {\n        expression,\n        meta: {\n          default: parentSchema.default,\n          format: parentSchema.format,\n          hasLazy: hasAnyLazy,\n          isLazy: false,\n          nullable: items.some((i) => i.meta.nullable),\n          readonly: items.some((i) => i.meta.readonly),\n        },\n      };\n    },\n    never(schema, ctx) {\n      const expression = neverToAst({ plugin: ctx.plugin, schema });\n      return {\n        expression,\n        meta: {\n          ...defaultMeta(schema),\n          nullable: false,\n          readonly: false,\n        },\n      };\n    },\n    null(schema, ctx) {\n      const expression = nullToAst({ plugin: ctx.plugin, schema });\n      return {\n        expression,\n        meta: {\n          ...defaultMeta(schema),\n          nullable: false,\n          readonly: false,\n        },\n      };\n    },\n    number(schema, ctx) {\n      const expression = numberToNode({ plugin: ctx.plugin, schema });\n      return {\n        expression,\n        meta: {\n          ...defaultMeta(schema),\n          format: schema.format,\n        },\n      };\n    },\n    object(schema, ctx, walk) {\n      const applyModifiers: Parameters<typeof objectToAst>[0]['applyModifiers'] = (result, opts) =>\n        this.applyModifiers(result, ctx, opts) as ZodFinal;\n      const { childResults, expression } = objectToAst({\n        applyModifiers,\n        plugin: ctx.plugin,\n        schema,\n        walk,\n        walkerCtx: ctx,\n      });\n\n      return {\n        expression,\n        meta: inheritMeta(schema, childResults),\n      };\n    },\n    postProcess(result, schema, ctx) {\n      const { metadata } = ctx.plugin.config;\n\n      if (!metadata) {\n        return result;\n      }\n\n      const node = $.object();\n\n      if (metadata === true) {\n        if (!schema.description) {\n          return result;\n        }\n        node.pretty().prop('description', $.literal(schema.description));\n      } else {\n        metadata({ $, node, schema });\n      }\n\n      if (node.isEmpty) {\n        return result;\n      }\n\n      const z = ctx.plugin.external('zod.z');\n\n      return {\n        ...result,\n        expression: result.expression\n          .attr(identifiers.register)\n          .call($(z).attr(identifiers.globalRegistry), node),\n      };\n    },\n    reference($ref, schema, ctx) {\n      const z = ctx.plugin.external('zod.z');\n      const query: SymbolMeta = {\n        category: 'schema',\n        resource: 'definition',\n        resourceId: $ref,\n        tool: 'zod',\n      };\n\n      const refSymbol = ctx.plugin.referenceSymbol(query);\n\n      if (ctx.plugin.isSymbolRegistered(query)) {\n        return {\n          expression: $(refSymbol),\n          meta: defaultMeta(schema),\n        };\n      }\n\n      return {\n        expression: $(z)\n          .attr(identifiers.lazy)\n          .call($.func().returns('any').do($(refSymbol).return())),\n        meta: {\n          ...defaultMeta(schema),\n          hasLazy: true,\n          isLazy: true,\n        },\n      };\n    },\n    string(schema, ctx) {\n      if (shouldCoerceToBigInt(schema.format)) {\n        const expression = numberToNode({\n          plugin: ctx.plugin,\n          schema: { ...schema, type: 'number' },\n        });\n        return {\n          expression,\n          meta: defaultMeta(schema),\n        };\n      }\n\n      const expression = stringToNode({ plugin: ctx.plugin, schema });\n      return {\n        expression,\n        meta: defaultMeta(schema),\n      };\n    },\n    tuple(schema, ctx, walk) {\n      const applyModifiers: Parameters<typeof tupleToAst>[0]['applyModifiers'] = (result, opts) =>\n        this.applyModifiers(result, ctx, opts) as ZodFinal;\n      const { childResults, expression } = tupleToAst({\n        applyModifiers,\n        plugin: ctx.plugin,\n        schema,\n        walk,\n        walkerCtx: ctx,\n      });\n\n      return {\n        expression,\n        meta: inheritMeta(schema, childResults),\n      };\n    },\n    undefined(schema, ctx) {\n      const expression = undefinedToAst({ plugin: ctx.plugin, schema });\n      return {\n        expression,\n        meta: {\n          ...defaultMeta(schema),\n          nullable: false,\n          readonly: false,\n        },\n      };\n    },\n    union(items, schemas, parentSchema, ctx) {\n      const z = ctx.plugin.external('zod.z');\n      const hasAnyLazy = items.some((item) => item.meta.hasLazy);\n\n      const hasNull = schemas.some((s) => s.type === 'null') || items.some((i) => i.meta.nullable);\n\n      const nonNullItems: typeof items = [];\n\n      items.forEach((item, index) => {\n        const schema = schemas[index]!;\n        if (schema.type !== 'null' && schema.const !== null) {\n          nonNullItems.push(item);\n        }\n      });\n\n      let expression: Chain;\n      if (nonNullItems.length === 0) {\n        expression = $(z).attr(identifiers.null).call();\n      } else if (nonNullItems.length === 1) {\n        expression = nonNullItems[0]!.expression;\n      } else {\n        expression = $(z)\n          .attr(identifiers.union)\n          .call(\n            $.array()\n              .pretty()\n              .elements(...nonNullItems.map((item) => item.expression)),\n          );\n      }\n\n      return {\n        expression,\n        meta: {\n          default: parentSchema.default,\n          format: parentSchema.format,\n          hasLazy: hasAnyLazy,\n          isLazy: false,\n          nullable: hasNull,\n          readonly: items.some((i) => i.meta.readonly),\n        },\n      };\n    },\n    unknown(schema, ctx) {\n      const expression = unknownToAst({ plugin: ctx.plugin, schema });\n      return {\n        expression,\n        meta: {\n          ...defaultMeta(schema),\n          nullable: false,\n          readonly: false,\n        },\n      };\n    },\n    void(schema, ctx) {\n      const expression = voidToAst({ plugin: ctx.plugin, schema });\n      return {\n        expression,\n        meta: {\n          ...defaultMeta(schema),\n          nullable: false,\n          readonly: false,\n        },\n      };\n    },\n  };\n}\n"
  },
  {
    "path": "packages/openapi-ts/src/run.ts",
    "content": "#!/usr/bin/env node\n\nimport { runCli } from './cli';\n\nrunCli();\n"
  },
  {
    "path": "packages/openapi-ts/src/ts-compiler/__snapshots__/nodes/expressions/identifier/identifier.ts",
    "content": "let x;\nlet y;\ny = 42;\nx = y;\n"
  },
  {
    "path": "packages/openapi-ts/src/ts-compiler/__snapshots__/nodes/expressions/literal/primitive.ts",
    "content": "let s;\nlet n;\nlet b;\nlet c;\nlet none;\ns = \"hello\";\nn = 123;\nb = true;\nc = false;\nnone = null;\n"
  },
  {
    "path": "packages/openapi-ts/src/ts-compiler/__snapshots__/nodes/statements/var/const.ts",
    "content": "const answer = 42;\n"
  },
  {
    "path": "packages/openapi-ts/src/ts-compiler/__snapshots__/nodes/statements/var/let.ts",
    "content": "let message = \"hello\";\n"
  },
  {
    "path": "packages/openapi-ts/src/ts-compiler/__snapshots__/nodes/statements/var/var.ts",
    "content": "var count = 0;\n"
  },
  {
    "path": "packages/openapi-ts/src/ts-compiler/__tests__/constants.ts",
    "content": "import path from 'node:path';\n\nexport const snapshotsDir = path.join(__dirname, '..', '__snapshots__');\nexport const tmpDir = path.join(__dirname, '..', '.tmp');\n"
  },
  {
    "path": "packages/openapi-ts/src/ts-compiler/__tests__/globalTeardown.ts",
    "content": "import fs from 'node:fs';\n\nimport { tmpDir } from './constants';\n\nexport function teardown() {\n  fs.rmSync(tmpDir, { force: true, recursive: true });\n}\n"
  },
  {
    "path": "packages/openapi-ts/src/ts-compiler/__tests__/nodes/expressions/identifier.test.ts",
    "content": "import { ts } from '../../../index';\nimport { assertPrintedMatchesSnapshot } from '../utils';\n\ndescribe('identifier expression', () => {\n  it('assignment', async () => {\n    const file = ts.factory.createSourceFile([\n      ts.factory.createVariableStatement('let', 'x'),\n      ts.factory.createVariableStatement('let', 'y'),\n      ts.factory.createAssignment(\n        ts.factory.createIdentifier('y'),\n        undefined,\n        ts.factory.createLiteral(42),\n      ),\n      ts.factory.createAssignment(\n        ts.factory.createIdentifier('x'),\n        undefined,\n        ts.factory.createIdentifier('y'),\n      ),\n    ]);\n    await assertPrintedMatchesSnapshot(file, 'identifier.ts');\n  });\n});\n"
  },
  {
    "path": "packages/openapi-ts/src/ts-compiler/__tests__/nodes/expressions/literal.test.ts",
    "content": "import { ts } from '../../../index';\nimport { assertPrintedMatchesSnapshot } from '../utils';\n\ndescribe('literal expression', () => {\n  it('primitive variables', async () => {\n    const file = ts.factory.createSourceFile([\n      ts.factory.createVariableStatement('let', 's'),\n      ts.factory.createVariableStatement('let', 'n'),\n      ts.factory.createVariableStatement('let', 'b'),\n      ts.factory.createVariableStatement('let', 'c'),\n      ts.factory.createVariableStatement('let', 'none'),\n      ts.factory.createAssignment(\n        ts.factory.createIdentifier('s'),\n        undefined,\n        ts.factory.createLiteral('hello'),\n      ),\n      ts.factory.createAssignment(\n        ts.factory.createIdentifier('n'),\n        undefined,\n        ts.factory.createLiteral(123),\n      ),\n      ts.factory.createAssignment(\n        ts.factory.createIdentifier('b'),\n        undefined,\n        ts.factory.createLiteral(true),\n      ),\n      ts.factory.createAssignment(\n        ts.factory.createIdentifier('c'),\n        undefined,\n        ts.factory.createLiteral(false),\n      ),\n      ts.factory.createAssignment(\n        ts.factory.createIdentifier('none'),\n        undefined,\n        ts.factory.createLiteral(null),\n      ),\n    ]);\n    await assertPrintedMatchesSnapshot(file, 'primitive.ts');\n  });\n});\n"
  },
  {
    "path": "packages/openapi-ts/src/ts-compiler/__tests__/nodes/statements/var.test.ts",
    "content": "import { ts } from '../../../index';\nimport { assertPrintedMatchesSnapshot } from '../utils';\n\ndescribe('variable statement', () => {\n  it('const', async () => {\n    const file = ts.factory.createSourceFile([\n      ts.factory.createVariableStatement('const', 'answer', ts.factory.createLiteral(42)),\n    ]);\n    await assertPrintedMatchesSnapshot(file, 'const.ts');\n  });\n\n  it('let', async () => {\n    const file = ts.factory.createSourceFile([\n      ts.factory.createVariableStatement('let', 'message', ts.factory.createLiteral('hello')),\n    ]);\n    await assertPrintedMatchesSnapshot(file, 'let.ts');\n  });\n\n  it('var', async () => {\n    const file = ts.factory.createSourceFile([\n      ts.factory.createVariableStatement('var', 'count', ts.factory.createLiteral(0)),\n    ]);\n    await assertPrintedMatchesSnapshot(file, 'var.ts');\n  });\n});\n"
  },
  {
    "path": "packages/openapi-ts/src/ts-compiler/__tests__/nodes/utils.ts",
    "content": "import fs from 'node:fs';\nimport path from 'node:path';\n\nimport { ts } from '../../index';\nimport { snapshotsDir, tmpDir } from '../constants';\n\nfunction getCallerFile(): string {\n  const error = new Error();\n  const stack = (error.stack ?? '').split('\\n');\n  const callerLine = stack.find((line) => line.includes('.test.ts'));\n  if (!callerLine) {\n    throw new Error('Could not find test file in stack trace');\n  }\n  const match = callerLine.match(/\\(([^)]+)\\)/) || callerLine.match(/at (.+):\\d+:\\d+/);\n  if (!match?.[1]) {\n    throw new Error('Could not extract file path');\n  }\n  return match[1];\n}\n\nexport async function assertPrintedMatchesSnapshot(\n  file: ts.SourceFile,\n  filename: string,\n): Promise<void> {\n  const result = ts.createPrinter().printFile(file);\n\n  const caller = getCallerFile();\n  const relPath = path\n    .relative(path.join(process.cwd(), 'src', 'ts-compiler', '__tests__'), caller)\n    .replace(/\\.test\\.ts$/, '');\n  const outputPath = path.join(tmpDir, relPath, filename);\n  const outputDir = path.dirname(outputPath);\n\n  fs.mkdirSync(outputDir, { recursive: true });\n  fs.writeFileSync(outputPath, result);\n\n  const snapshotPath = path.join(snapshotsDir, relPath, filename);\n\n  const snapshotDir = path.dirname(snapshotPath);\n  fs.mkdirSync(snapshotDir, { recursive: true });\n\n  await expect(result).toMatchFileSnapshot(snapshotPath);\n}\n"
  },
  {
    "path": "packages/openapi-ts/src/ts-compiler/index.ts",
    "content": "import type { TsNode as _TsNode, TsNodeBase as _TsNodeBase } from './nodes/base';\nimport type { TsExpression as _TsExpression } from './nodes/expression';\nimport type { TsIdentifier as _TsIdentifier } from './nodes/expressions/identifier';\nimport type {\n  TsLiteral as _TsLiteral,\n  TsLiteralValue as _TsLiteralValue,\n} from './nodes/expressions/literal';\nimport { factory } from './nodes/factory';\nimport { TsNodeKind } from './nodes/kinds';\nimport type { TsStatement as _TsStatement } from './nodes/statement';\nimport type { TsAssignment as _TsAssignment } from './nodes/statements/assignment';\nimport type { TsVariableStatement as _TsVariableStatement } from './nodes/statements/var';\nimport type { TsSourceFile } from './nodes/structure/sourceFile';\nimport type { TsType as _TsType } from './nodes/type';\nimport type { TsPrinterOptions as _TsPrinterOptions } from './printer';\nimport { createPrinter, printAst } from './printer';\n\n// eslint-disable-next-line @typescript-eslint/no-namespace\nexport namespace ts {\n  // Base / Core\n  export type Node = _TsNode;\n  export type NodeBase = _TsNodeBase;\n  export type NodeKind = TsNodeKind;\n  export type Expression = _TsExpression;\n  export type Statement = _TsStatement;\n  export type Type = _TsType;\n\n  // Structure\n  export type SourceFile = TsSourceFile;\n\n  // Declarations\n  // ...\n\n  // Statements\n  export type Assignment = _TsAssignment;\n  export type VariableStatement = _TsVariableStatement;\n\n  // Expressions\n  export type Identifier = _TsIdentifier;\n  export type Literal = _TsLiteral;\n\n  // Printer\n  export type PrinterOptions = _TsPrinterOptions;\n\n  // Miscellaneous\n  export type LiteralValue = _TsLiteralValue;\n}\n\nexport const ts = {\n  TsNodeKind,\n  createPrinter,\n  factory,\n  printAst,\n} as const;\n\nexport { factory };\n"
  },
  {
    "path": "packages/openapi-ts/src/ts-compiler/nodes/base.ts",
    "content": "import type { TsExpression } from './expression';\nimport type { TsNodeKind } from './kinds';\nimport type { TsStatement } from './statement';\n// import type { TsBlock } from './statements/block';\nimport type { TsSourceFile } from './structure/sourceFile';\n\nexport interface TsNodeBase {\n  kind: TsNodeKind;\n  leadingComments?: ReadonlyArray<string>;\n  trailingComments?: ReadonlyArray<string>;\n}\n\n// TsBlock |\nexport type TsNode = TsExpression | TsSourceFile | TsStatement;\n"
  },
  {
    "path": "packages/openapi-ts/src/ts-compiler/nodes/expression.ts",
    "content": "import type { TsIdentifier } from './expressions/identifier';\nimport type { TsLiteral } from './expressions/literal';\n\nexport type TsExpression = TsIdentifier | TsLiteral;\n"
  },
  {
    "path": "packages/openapi-ts/src/ts-compiler/nodes/expressions/identifier.ts",
    "content": "import type { TsNodeBase } from '../base';\nimport { TsNodeKind } from '../kinds';\n\nexport interface TsIdentifier extends TsNodeBase {\n  kind: TsNodeKind.Identifier;\n  text: string;\n}\n\nexport function createIdentifier(\n  text: string,\n  leadingComments?: ReadonlyArray<string>,\n  trailingComments?: ReadonlyArray<string>,\n): TsIdentifier {\n  return {\n    kind: TsNodeKind.Identifier,\n    leadingComments,\n    text,\n    trailingComments,\n  };\n}\n"
  },
  {
    "path": "packages/openapi-ts/src/ts-compiler/nodes/expressions/literal.ts",
    "content": "import type { TsNodeBase } from '../base';\nimport { TsNodeKind } from '../kinds';\n\nexport type TsLiteralValue = string | number | boolean | bigint | null;\n\nexport interface TsLiteral extends TsNodeBase {\n  kind: TsNodeKind.Literal;\n  value: TsLiteralValue;\n}\n\nexport function createLiteral(\n  value: TsLiteralValue,\n  leadingComments?: ReadonlyArray<string>,\n  trailingComments?: ReadonlyArray<string>,\n): TsLiteral {\n  return {\n    kind: TsNodeKind.Literal,\n    leadingComments,\n    trailingComments,\n    value,\n  };\n}\n"
  },
  {
    "path": "packages/openapi-ts/src/ts-compiler/nodes/factory.ts",
    "content": "import { createIdentifier } from './expressions/identifier';\nimport { createLiteral } from './expressions/literal';\nimport { createAssignment } from './statements/assignment';\nimport { createVariableStatement } from './statements/var';\nimport { createSourceFile } from './structure/sourceFile';\n\nexport const factory = {\n  createAssignment,\n  createIdentifier,\n  createLiteral,\n  createSourceFile,\n  createVariableStatement,\n};\n"
  },
  {
    "path": "packages/openapi-ts/src/ts-compiler/nodes/kinds.ts",
    "content": "export enum TsNodeKind {\n  Assignment = 'Assignment',\n  Identifier = 'Identifier',\n  Literal = 'Literal',\n  SourceFile = 'SourceFile',\n  VariableStatement = 'VariableStatement',\n}\n"
  },
  {
    "path": "packages/openapi-ts/src/ts-compiler/nodes/statement.ts",
    "content": "import type { TsAssignment } from './statements/assignment';\nimport type { TsVariableStatement } from './statements/var';\n\nexport type TsStatement = TsAssignment | TsVariableStatement;\n"
  },
  {
    "path": "packages/openapi-ts/src/ts-compiler/nodes/statements/assignment.ts",
    "content": "import type { TsNodeBase } from '../base';\nimport type { TsExpression } from '../expression';\nimport { TsNodeKind } from '../kinds';\n\nexport interface TsAssignment extends TsNodeBase {\n  kind: TsNodeKind.Assignment;\n  target: TsExpression;\n  type?: TsExpression;\n  value?: TsExpression;\n}\n\nexport function createAssignment(\n  target: TsExpression,\n  type?: TsExpression,\n  value?: TsExpression,\n  leadingComments?: ReadonlyArray<string>,\n  trailingComments?: ReadonlyArray<string>,\n): TsAssignment {\n  if (!type && !value) {\n    throw new Error('Assignment requires at least type or value');\n  }\n\n  return {\n    kind: TsNodeKind.Assignment,\n    leadingComments,\n    target,\n    trailingComments,\n    type,\n    value,\n  };\n}\n"
  },
  {
    "path": "packages/openapi-ts/src/ts-compiler/nodes/statements/var.ts",
    "content": "import type { TsNodeBase } from '../base';\nimport type { TsExpression } from '../expression';\nimport { TsNodeKind } from '../kinds';\nimport type { TsType } from '../type';\n\nexport type TsVariableKeyword = 'var' | 'let' | 'const';\n\nexport interface TsVariableStatement extends TsNodeBase {\n  initializer?: TsExpression;\n  keyword: TsVariableKeyword;\n  kind: TsNodeKind.VariableStatement;\n  name: string;\n  typeAnnotation?: TsType;\n}\n\nexport function createVariableStatement(\n  keyword: TsVariableKeyword,\n  name: string,\n  initializer?: TsExpression,\n  typeAnnotation?: TsType,\n  leadingComments?: ReadonlyArray<string>,\n  trailingComments?: ReadonlyArray<string>,\n): TsVariableStatement {\n  return {\n    initializer,\n    keyword,\n    kind: TsNodeKind.VariableStatement,\n    leadingComments,\n    name,\n    trailingComments,\n    typeAnnotation,\n  };\n}\n"
  },
  {
    "path": "packages/openapi-ts/src/ts-compiler/nodes/structure/sourceFile.ts",
    "content": "import type { TsNode, TsNodeBase } from '../base';\nimport { TsNodeKind } from '../kinds';\n\nexport interface TsSourceFile extends TsNodeBase {\n  kind: TsNodeKind.SourceFile;\n  statements: ReadonlyArray<TsNode>;\n}\n\nexport function createSourceFile(\n  statements: ReadonlyArray<TsNode>,\n  leadingComments?: ReadonlyArray<string>,\n  trailingComments?: ReadonlyArray<string>,\n): TsSourceFile {\n  return {\n    kind: TsNodeKind.SourceFile,\n    leadingComments,\n    statements,\n    trailingComments,\n  };\n}\n"
  },
  {
    "path": "packages/openapi-ts/src/ts-compiler/nodes/type.ts",
    "content": "export type TsType = never;\n"
  },
  {
    "path": "packages/openapi-ts/src/ts-compiler/printer.ts",
    "content": "import type { TsNode } from './nodes/base';\nimport { TsNodeKind } from './nodes/kinds';\n\nexport interface TsPrinterOptions {\n  /**\n   * Number of spaces per indentation level.\n   *\n   * @default 2\n   */\n  indentSize?: number;\n  /**\n   * Whether to add trailing semicolons to statements.\n   *\n   * @default true\n   */\n  semicolons?: boolean;\n}\n\nconst DEFAULT_INDENT_SIZE = 2;\nconst DEFAULT_SEMICOLONS = true;\n\nexport function createPrinter(options?: TsPrinterOptions) {\n  const indentSize = options?.indentSize ?? DEFAULT_INDENT_SIZE;\n  const semicolons = options?.semicolons ?? DEFAULT_SEMICOLONS;\n\n  let indentLevel = 0;\n\n  function printComments(\n    parts: Array<string>,\n    lines: ReadonlyArray<string>,\n    indent?: boolean,\n  ): void {\n    if (indent) indentLevel += 1;\n    parts.push(...lines.map((line) => printLine(`// ${line}`)));\n    if (indent) indentLevel -= 1;\n  }\n\n  function printLine(line: string): string {\n    if (line === '') return '';\n    return ' '.repeat(indentLevel * indentSize) + line;\n  }\n\n  function printNode(node: TsNode): string {\n    const parts: Array<string> = [];\n\n    if (node.leadingComments) {\n      printComments(parts, node.leadingComments);\n    }\n\n    switch (node.kind) {\n      case TsNodeKind.Assignment: {\n        const target = printNode(node.target);\n        if (node.type) {\n          const type = printNode(node.type);\n          if (node.value) {\n            parts.push(printLine(`${target}: ${type} = ${printNode(node.value)}`));\n          } else {\n            parts.push(printLine(`${target}: ${type}`));\n          }\n        } else {\n          parts.push(printLine(`${target} = ${printNode(node.value!)}`));\n        }\n        if (semicolons) {\n          const lastIndex = parts.length - 1;\n          parts[lastIndex] += ';';\n        }\n        break;\n      }\n\n      case TsNodeKind.Identifier:\n        parts.push(node.text);\n        break;\n\n      case TsNodeKind.Literal:\n        if (typeof node.value === 'string') {\n          parts.push(`\"${node.value}\"`);\n        } else if (typeof node.value === 'boolean') {\n          parts.push(node.value ? 'true' : 'false');\n        } else if (node.value === null) {\n          parts.push('null');\n        } else {\n          parts.push(String(node.value));\n        }\n        break;\n\n      case TsNodeKind.SourceFile:\n        parts.push(...node.statements.map(printNode));\n        break;\n\n      case TsNodeKind.VariableStatement: {\n        const keyword = node.keyword;\n        const name = node.name;\n        let line = `${keyword} ${name}`;\n        if (node.typeAnnotation) {\n          line += `: ${printNode(node.typeAnnotation)}`;\n        }\n        if (node.initializer) {\n          line += ` = ${printNode(node.initializer)}`;\n        }\n        if (semicolons) {\n          line += ';';\n        }\n        parts.push(printLine(line));\n        break;\n      }\n\n      default:\n        throw new Error(`Unsupported node kind: ${(node as { kind: string }).kind}`);\n    }\n\n    if (node.trailingComments) {\n      printComments(parts, node.trailingComments);\n    }\n\n    return parts.join('\\n');\n  }\n\n  function printFile(node: TsNode): string {\n    const parts: Array<string> = [printNode(node), ''];\n    return parts.join('\\n');\n  }\n\n  return {\n    printFile,\n  };\n}\n\nexport function printAst(node: TsNode): string {\n  return JSON.stringify(node, null, 2);\n}\n"
  },
  {
    "path": "packages/openapi-ts/src/ts-dsl/base.ts",
    "content": "// TODO: symbol should be protected, but needs to be public to satisfy types\nimport type {\n  AnalysisContext,\n  File,\n  FromRef,\n  Language,\n  Node,\n  NodeName,\n  NodeNameSanitizer,\n  NodeRelationship,\n  NodeScope,\n  Ref,\n  Symbol,\n} from '@hey-api/codegen-core';\nimport { fromRef, isNode, isRef, isSymbol, nodeBrand, ref } from '@hey-api/codegen-core';\nimport type { AnyString } from '@hey-api/types';\nimport ts from 'typescript';\n\nimport type { AccessOptions } from './utils/context';\n\nexport abstract class TsDsl<T extends ts.Node = ts.Node> implements Node<T> {\n  // eslint-disable-next-line @typescript-eslint/no-unused-vars\n  analyze(_: AnalysisContext): void {}\n  clone(): this {\n    const cloned = Object.create(Object.getPrototypeOf(this));\n    Object.assign(cloned, this);\n    return cloned;\n  }\n  exported?: boolean;\n  file?: File;\n  get name(): Node['name'] {\n    return {\n      ...this._name,\n      set: (value) => {\n        this._name = ref(value);\n        if (isSymbol(value)) {\n          value.setNode(this);\n        }\n      },\n      toString: () => (this._name ? this.$name(this._name) : ''),\n    } as Node['name'];\n  }\n  readonly nameSanitizer?: NodeNameSanitizer;\n  language: Language = 'typescript';\n  parent?: Node;\n  root: boolean = false;\n  scope?: NodeScope = 'value';\n  structuralChildren?: Map<TsDsl, NodeRelationship>;\n  structuralParents?: Map<TsDsl, NodeRelationship>;\n  symbol?: Symbol;\n  toAst(): T {\n    return undefined as unknown as T;\n  }\n  readonly '~brand' = nodeBrand;\n\n  /** Branding property to identify the DSL class at runtime. */\n  abstract readonly '~dsl': AnyString;\n\n  /** Conditionally applies a callback to this builder. */\n  $if<T extends TsDsl, V, R extends TsDsl = T>(\n    this: T,\n    value: V,\n    ifTrue: (self: T, v: Exclude<V, false | null | undefined>) => R | void,\n    ifFalse?: (self: T, v: Extract<V, false | null | undefined>) => R | void,\n  ): R | T;\n  $if<T extends TsDsl, V, R extends TsDsl = T>(\n    this: T,\n    value: V,\n    ifTrue: (v: Exclude<V, false | null | undefined>) => R | void,\n    ifFalse?: (v: Extract<V, false | null | undefined>) => R | void,\n  ): R | T;\n  $if<T extends TsDsl, V, R extends TsDsl = T>(\n    this: T,\n    value: V,\n    ifTrue: () => R | void,\n    ifFalse?: () => R | void,\n  ): R | T;\n  $if<T extends TsDsl, V, R extends TsDsl = T>(\n    this: T,\n    value: V,\n    ifTrue: any,\n    ifFalse?: any,\n  ): R | T {\n    if (value) {\n      // Try calling with (self, value), then (value), then ()\n      let result: R | void | undefined;\n      try {\n        result = ifTrue?.(this, value as Exclude<V, false | null | undefined>);\n      } catch {\n        // ignore and try other signatures\n      }\n      if (result === undefined) {\n        try {\n          result = ifTrue?.(value as Exclude<V, false | null | undefined>);\n        } catch {\n          // ignore and try zero-arg\n        }\n      }\n      if (result === undefined) {\n        try {\n          result = ifTrue?.();\n        } catch {\n          // swallow\n        }\n      }\n      return (result ?? this) as R | T;\n    }\n    if (ifFalse) {\n      let result: R | void | undefined;\n      try {\n        result = ifFalse?.(this, value as Extract<V, false | null | undefined>);\n      } catch {\n        // ignore\n      }\n      if (result === undefined) {\n        try {\n          result = ifFalse?.(value as Extract<V, false | null | undefined>);\n        } catch {\n          // ignore\n        }\n      }\n      if (result === undefined) {\n        try {\n          result = ifFalse?.();\n        } catch {\n          // ignore\n        }\n      }\n      return (result ?? this) as R | T;\n    }\n    return this;\n  }\n\n  /** Access patterns for this node. */\n  toAccessNode?(\n    node: this,\n    options: AccessOptions,\n    ctx: {\n      /** The full chain. */\n      chain: ReadonlyArray<TsDsl>;\n      /** Position in the chain (0 = root). */\n      index: number;\n      /** Is this the leaf node? */\n      isLeaf: boolean;\n      /** Is this the root node? */\n      isRoot: boolean;\n      /** Total length of the chain. */\n      length: number;\n    },\n  ): TsDsl | undefined;\n\n  protected $maybeId<T extends string | ts.Expression>(\n    expr: T,\n  ): T extends string ? ts.Identifier : T {\n    return (typeof expr === 'string' ? ts.factory.createIdentifier(expr) : expr) as T extends string\n      ? ts.Identifier\n      : T;\n  }\n\n  protected $name(name: Ref<NodeName>): string {\n    const value = fromRef(name);\n    if (isSymbol(value)) {\n      try {\n        return value.finalName;\n      } catch {\n        return value.name;\n      }\n    }\n    return String(value);\n  }\n\n  protected $node<I>(value: I): NodeOfMaybe<I> {\n    if (value === undefined) {\n      return undefined as NodeOfMaybe<I>;\n    }\n    // @ts-expect-error\n    if (isRef(value)) value = fromRef(value);\n    if (isSymbol(value)) {\n      return this.$maybeId(value.finalName) as NodeOfMaybe<I>;\n    }\n    if (typeof value === 'string') {\n      return this.$maybeId(value) as NodeOfMaybe<I>;\n    }\n    if (value instanceof Array) {\n      return value.map((item) => {\n        if (isRef(item)) item = fromRef(item);\n        return this.unwrap(item);\n      }) as NodeOfMaybe<I>;\n    }\n    return this.unwrap(value as any) as NodeOfMaybe<I>;\n  }\n\n  protected $type<I>(value: I, args?: ReadonlyArray<ts.TypeNode>): TypeOfMaybe<I> {\n    if (value === undefined) {\n      return undefined as TypeOfMaybe<I>;\n    }\n    // @ts-expect-error\n    if (isRef(value)) value = fromRef(value);\n    if (isSymbol(value)) {\n      return ts.factory.createTypeReferenceNode(value.finalName, args) as TypeOfMaybe<I>;\n    }\n    if (typeof value === 'string') {\n      return ts.factory.createTypeReferenceNode(value, args) as TypeOfMaybe<I>;\n    }\n    if (typeof value === 'boolean') {\n      const literal = value ? ts.factory.createTrue() : ts.factory.createFalse();\n      return ts.factory.createLiteralTypeNode(literal) as TypeOfMaybe<I>;\n    }\n    if (typeof value === 'number') {\n      return ts.factory.createLiteralTypeNode(\n        ts.factory.createNumericLiteral(value),\n      ) as TypeOfMaybe<I>;\n    }\n    if (value instanceof Array) {\n      return value.map((item) => this.$type(item, args)) as TypeOfMaybe<I>;\n    }\n    return this.unwrap(value as any) as TypeOfMaybe<I>;\n  }\n\n  private _name?: Ref<NodeName>;\n\n  /** Unwraps nested nodes into raw TypeScript AST. */\n  private unwrap<I>(value: I): I extends TsDsl<infer N> ? N : I {\n    return (isNode(value) ? value.toAst() : value) as I extends TsDsl<infer N> ? N : I;\n  }\n}\n\ntype NodeOfMaybe<I> = undefined extends I\n  ? NodeOf<NonNullable<FromRef<I>>> | undefined\n  : NodeOf<FromRef<I>>;\n\ntype NodeOf<I> =\n  I extends ReadonlyArray<infer U>\n    ? ReadonlyArray<U extends TsDsl<infer N> ? N : U>\n    : I extends string\n      ? ts.Expression\n      : I extends TsDsl<infer N>\n        ? N\n        : I extends ts.Node\n          ? I\n          : never;\n\nexport type MaybeTsDsl<T> =\n  T extends TsDsl<infer U> ? U | TsDsl<U> : T extends ts.Node ? T | TsDsl<T> : never;\n\nexport abstract class TypeTsDsl<\n  T extends\n    | ts.LiteralTypeNode\n    | ts.QualifiedName\n    | ts.TypeElement\n    | ts.TypeNode\n    | ts.TypeParameterDeclaration = ts.TypeNode,\n> extends TsDsl<T> {}\n\ntype TypeOfMaybe<I> = undefined extends I\n  ? TypeOf<NonNullable<FromRef<I>>> | undefined\n  : TypeOf<FromRef<I>>;\n\ntype TypeOf<I> =\n  I extends ReadonlyArray<infer U>\n    ? ReadonlyArray<TypeOf<U>>\n    : I extends string\n      ? ts.TypeNode\n      : I extends boolean\n        ? ts.LiteralTypeNode\n        : I extends TsDsl<infer N>\n          ? N\n          : I extends ts.TypeNode\n            ? I\n            : never;\n"
  },
  {
    "path": "packages/openapi-ts/src/ts-dsl/decl/class.ts",
    "content": "import type { AnalysisContext, NodeName, Ref } from '@hey-api/codegen-core';\nimport { isSymbol, ref } from '@hey-api/codegen-core';\nimport ts from 'typescript';\n\nimport type { MaybeTsDsl } from '../base';\nimport { TsDsl } from '../base';\nimport { NewlineTsDsl } from '../layout/newline';\nimport { DecoratorMixin } from '../mixins/decorator';\nimport { DocMixin } from '../mixins/doc';\nimport { AbstractMixin, DefaultMixin, ExportMixin } from '../mixins/modifiers';\nimport { TypeParamsMixin } from '../mixins/type-params';\nimport { safeRuntimeName } from '../utils/name';\nimport { FieldTsDsl } from './field';\nimport { InitTsDsl } from './init';\nimport { MethodTsDsl } from './method';\n\ntype Body = Array<MaybeTsDsl<ts.ClassElement | ts.Node>>;\n\nconst Mixed = AbstractMixin(\n  DecoratorMixin(DefaultMixin(DocMixin(ExportMixin(TypeParamsMixin(TsDsl<ts.ClassDeclaration>))))),\n);\n\nexport class ClassTsDsl extends Mixed {\n  readonly '~dsl' = 'ClassTsDsl';\n  override readonly nameSanitizer = safeRuntimeName;\n\n  protected baseClass?: Ref<NodeName>;\n  protected body: Body = [];\n\n  constructor(name: NodeName) {\n    super();\n    this.name.set(name);\n    if (isSymbol(name)) {\n      name.setKind('class');\n    }\n  }\n\n  override analyze(ctx: AnalysisContext): void {\n    super.analyze(ctx);\n    ctx.analyze(this.baseClass);\n    ctx.analyze(this.name);\n    ctx.pushScope();\n    try {\n      for (const item of this.body) {\n        ctx.analyze(item);\n      }\n    } finally {\n      ctx.popScope();\n    }\n  }\n\n  /** Returns true if the class has any members. */\n  get hasBody(): boolean {\n    return this.body.length > 0;\n  }\n\n  /** Adds one or more class members (fields, methods, etc.). */\n  do(...items: Body): this {\n    this.body.push(...items);\n    return this;\n  }\n\n  /** Records a base class to extend from. */\n  extends(base?: NodeName): this {\n    this.baseClass = base ? ref(base) : undefined;\n    return this;\n  }\n\n  /** Adds a class field. */\n  field(name: NodeName, fn?: (f: FieldTsDsl) => void): this {\n    const f = new FieldTsDsl(name, fn);\n    this.body.push(f);\n    return this;\n  }\n\n  /** Adds a class constructor. */\n  init(fn?: InitTsDsl | ((i: InitTsDsl) => void)): this {\n    const i = typeof fn === 'function' ? new InitTsDsl(fn) : fn || new InitTsDsl();\n    this.body.push(i);\n    return this;\n  }\n\n  /** Adds a class method. */\n  method(name: NodeName, fn?: (m: MethodTsDsl) => void): this {\n    const m = new MethodTsDsl(name, fn);\n    this.body.push(m);\n    return this;\n  }\n\n  /** Inserts an empty line between members for formatting. */\n  newline(): this {\n    this.body.push(new NewlineTsDsl());\n    return this;\n  }\n\n  override toAst() {\n    const body = this.$node(this.body) as ReadonlyArray<ts.ClassElement>;\n    const node = ts.factory.createClassDeclaration(\n      [...this.$decorators(), ...this.modifiers],\n      this.$node(this.name) as ts.Identifier,\n      this.$generics(),\n      this._heritage(),\n      body,\n    );\n    return this.$docs(node);\n  }\n\n  /** Builds heritage clauses (extends). */\n  private _heritage(): ReadonlyArray<ts.HeritageClause> {\n    const node = this.$node(this.baseClass);\n    if (!node) return [];\n    return [\n      ts.factory.createHeritageClause(ts.SyntaxKind.ExtendsKeyword, [\n        ts.factory.createExpressionWithTypeArguments(node, undefined),\n      ]),\n    ];\n  }\n}\n"
  },
  {
    "path": "packages/openapi-ts/src/ts-dsl/decl/decorator.ts",
    "content": "import type { AnalysisContext, NodeName } from '@hey-api/codegen-core';\nimport ts from 'typescript';\n\nimport type { MaybeTsDsl } from '../base';\nimport { TsDsl } from '../base';\nimport { ArgsMixin } from '../mixins/args';\nimport { safeRuntimeName } from '../utils/name';\n\nconst Mixed = ArgsMixin(TsDsl<ts.Decorator>);\n\nexport class DecoratorTsDsl extends Mixed {\n  readonly '~dsl' = 'DecoratorTsDsl';\n  override readonly nameSanitizer = safeRuntimeName;\n\n  constructor(name: NodeName, ...args: ReadonlyArray<string | MaybeTsDsl<ts.Expression>>) {\n    super();\n    this.name.set(name);\n    this.args(...args);\n  }\n\n  override analyze(ctx: AnalysisContext): void {\n    super.analyze(ctx);\n    ctx.analyze(this.name);\n  }\n\n  override toAst() {\n    const target = this.$node(this.name);\n    const args = this.$args();\n    return ts.factory.createDecorator(\n      args.length ? ts.factory.createCallExpression(target, undefined, args) : target,\n    );\n  }\n}\n"
  },
  {
    "path": "packages/openapi-ts/src/ts-dsl/decl/enum.ts",
    "content": "import type { AnalysisContext, NodeName } from '@hey-api/codegen-core';\nimport { isSymbol } from '@hey-api/codegen-core';\nimport ts from 'typescript';\n\nimport type { MaybeTsDsl } from '../base';\nimport { TsDsl } from '../base';\nimport { DocMixin } from '../mixins/doc';\nimport { ConstMixin, ExportMixin } from '../mixins/modifiers';\nimport { safeRuntimeName } from '../utils/name';\nimport { EnumMemberTsDsl } from './member';\n\ntype Value = string | number | MaybeTsDsl<ts.Expression>;\ntype ValueFn = Value | ((m: EnumMemberTsDsl) => void);\n\nconst Mixed = ConstMixin(DocMixin(ExportMixin(TsDsl<ts.EnumDeclaration>)));\n\nexport class EnumTsDsl extends Mixed {\n  readonly '~dsl' = 'EnumTsDsl';\n  override readonly nameSanitizer = safeRuntimeName;\n\n  private _members: Array<EnumMemberTsDsl> = [];\n\n  constructor(name: NodeName, fn?: (e: EnumTsDsl) => void) {\n    super();\n    this.name.set(name);\n    if (isSymbol(name)) {\n      name.setKind('enum');\n    }\n    fn?.(this);\n  }\n\n  override analyze(ctx: AnalysisContext): void {\n    super.analyze(ctx);\n    ctx.analyze(this.name);\n    ctx.pushScope();\n    try {\n      for (const member of this._members) {\n        ctx.analyze(member);\n      }\n    } finally {\n      ctx.popScope();\n    }\n  }\n\n  /** Adds an enum member. */\n  member(name: string, value?: ValueFn): this {\n    const m = new EnumMemberTsDsl(name, value);\n    this._members.push(m);\n    return this;\n  }\n\n  /** Adds multiple enum members. */\n  members(...members: ReadonlyArray<EnumMemberTsDsl>): this {\n    this._members.push(...members);\n    return this;\n  }\n\n  override toAst() {\n    const node = ts.factory.createEnumDeclaration(\n      this.modifiers,\n      this.$node(this.name) as ts.Identifier,\n      this.$node(this._members) as ReadonlyArray<ts.EnumMember>,\n    );\n    return this.$docs(node);\n  }\n}\n"
  },
  {
    "path": "packages/openapi-ts/src/ts-dsl/decl/field.ts",
    "content": "import type { AnalysisContext, NodeName } from '@hey-api/codegen-core';\nimport ts from 'typescript';\n\nimport { TsDsl, TypeTsDsl } from '../base';\nimport { DecoratorMixin } from '../mixins/decorator';\nimport { DocMixin } from '../mixins/doc';\nimport {\n  PrivateMixin,\n  ProtectedMixin,\n  PublicMixin,\n  ReadonlyMixin,\n  StaticMixin,\n} from '../mixins/modifiers';\nimport { OptionalMixin } from '../mixins/optional';\nimport { ValueMixin } from '../mixins/value';\nimport { TokenTsDsl } from '../token';\nimport { TypeExprTsDsl } from '../type/expr';\nimport { safeAccessorName } from '../utils/name';\n\nexport type FieldType = NodeName | TypeTsDsl;\n\nconst Mixed = DecoratorMixin(\n  DocMixin(\n    OptionalMixin(\n      PrivateMixin(\n        ProtectedMixin(\n          PublicMixin(ReadonlyMixin(StaticMixin(ValueMixin(TsDsl<ts.PropertyDeclaration>)))),\n        ),\n      ),\n    ),\n  ),\n);\n\nexport class FieldTsDsl extends Mixed {\n  readonly '~dsl' = 'FieldTsDsl';\n  override readonly nameSanitizer = safeAccessorName;\n\n  protected _type?: TypeTsDsl;\n\n  constructor(name: NodeName, fn?: (f: FieldTsDsl) => void) {\n    super();\n    this.name.set(name);\n    fn?.(this);\n  }\n\n  override analyze(ctx: AnalysisContext): void {\n    super.analyze(ctx);\n    ctx.analyze(this.name);\n    ctx.analyze(this._type);\n  }\n\n  /** Sets the field type. */\n  type(type: FieldType): this {\n    this._type = type instanceof TypeTsDsl ? type : new TypeExprTsDsl(type);\n    return this;\n  }\n\n  override toAst() {\n    const node = ts.factory.createPropertyDeclaration(\n      [...this.$decorators(), ...this.modifiers],\n      this.$node(this.name) as ts.PropertyName,\n      this._optional ? this.$node(new TokenTsDsl().optional()) : undefined,\n      this.$type(this._type),\n      this.$value(),\n    );\n    return this.$docs(node);\n  }\n}\n"
  },
  {
    "path": "packages/openapi-ts/src/ts-dsl/decl/func.ts",
    "content": "import type { AnalysisContext, NodeName } from '@hey-api/codegen-core';\nimport { isSymbol } from '@hey-api/codegen-core';\nimport ts from 'typescript';\n\nimport { TsDsl } from '../base';\nimport { AsMixin } from '../mixins/as';\nimport { DecoratorMixin } from '../mixins/decorator';\nimport { DoMixin } from '../mixins/do';\nimport { DocMixin } from '../mixins/doc';\nimport {\n  AbstractMixin,\n  AsyncMixin,\n  PrivateMixin,\n  ProtectedMixin,\n  PublicMixin,\n  StaticMixin,\n} from '../mixins/modifiers';\nimport { ParamMixin } from '../mixins/param';\nimport { TypeParamsMixin } from '../mixins/type-params';\nimport { TypeReturnsMixin } from '../mixins/type-returns';\nimport { BlockTsDsl } from '../stmt/block';\nimport { safeRuntimeName } from '../utils/name';\n\nexport type FuncMode = 'arrow' | 'decl' | 'expr';\n\nconst Mixed = AbstractMixin(\n  AsMixin(\n    AsyncMixin(\n      DecoratorMixin(\n        DoMixin(\n          DocMixin(\n            ParamMixin(\n              PrivateMixin(\n                ProtectedMixin(\n                  PublicMixin(\n                    StaticMixin(TypeParamsMixin(TypeReturnsMixin(TsDsl<ts.ArrowFunction>))),\n                  ),\n                ),\n              ),\n            ),\n          ),\n        ),\n      ),\n    ),\n  ),\n);\n\nclass ImplFuncTsDsl<M extends FuncMode = 'arrow'> extends Mixed {\n  readonly '~dsl' = 'FuncTsDsl';\n  override readonly nameSanitizer = safeRuntimeName;\n\n  protected mode?: FuncMode;\n\n  constructor();\n  constructor(fn: (f: ImplFuncTsDsl<'arrow'>) => void);\n  constructor(name: NodeName);\n  constructor(name: NodeName, fn: (f: ImplFuncTsDsl<'decl'>) => void);\n  constructor(\n    name?: NodeName | ((f: ImplFuncTsDsl<'arrow'>) => void),\n    fn?: (f: ImplFuncTsDsl<'decl'>) => void,\n  ) {\n    super();\n    if (typeof name === 'function') {\n      this.mode = 'arrow';\n      name(this as unknown as FuncTsDsl<'arrow'>);\n    } else if (name) {\n      this.mode = 'decl';\n      this.name.set(name);\n      if (isSymbol(name)) {\n        name.setKind('function');\n      }\n      fn?.(this as unknown as FuncTsDsl<'decl'>);\n    }\n  }\n\n  override analyze(ctx: AnalysisContext): void {\n    ctx.pushScope();\n    try {\n      super.analyze(ctx);\n      ctx.analyze(this.name);\n    } finally {\n      ctx.popScope();\n    }\n  }\n\n  /** Returns true when all required builder calls are present. */\n  get isValid(): boolean {\n    return this.missingRequiredCalls().length === 0;\n  }\n\n  /** Switches the function to an arrow function form. */\n  arrow(): FuncTsDsl<'arrow'> {\n    this.mode = 'arrow';\n    return this as unknown as FuncTsDsl<'arrow'>;\n  }\n\n  /** Switches the function to a function declaration form. */\n  decl(): FuncTsDsl<'decl'> {\n    this.mode = 'decl';\n    return this as unknown as FuncTsDsl<'decl'>;\n  }\n\n  /** Switches the function to a function expression form. */\n  expr(): FuncTsDsl<'expr'> {\n    this.mode = 'expr';\n    return this as unknown as FuncTsDsl<'expr'>;\n  }\n\n  // @ts-expect-error --- need to fix types ---\n  override toAst(): M extends 'decl'\n    ? ts.FunctionDeclaration\n    : M extends 'expr'\n      ? ts.FunctionExpression\n      : ts.ArrowFunction {\n    this.$validate();\n    const body = this.$node(new BlockTsDsl(...this._do).pretty());\n\n    if (this.mode === 'decl') {\n      const node = ts.factory.createFunctionDeclaration(\n        [...this.$decorators(), ...this.modifiers],\n        undefined,\n        this.$node(this.name) as ts.Identifier,\n        this.$generics(),\n        this.$params(),\n        this.$returns(),\n        body,\n      ) as any;\n      return this.$docs(node);\n    }\n\n    if (this.mode === 'expr') {\n      const node = ts.factory.createFunctionExpression(\n        this.modifiers,\n        undefined,\n        this.$node(this.name) as ts.Identifier,\n        this.$generics(),\n        this.$params(),\n        this.$returns(),\n        body,\n      ) as any;\n      return this.$docs(node);\n    }\n\n    const node = ts.factory.createArrowFunction(\n      this.modifiers,\n      this.$generics(),\n      this.$params(),\n      this.$returns(),\n      undefined,\n      body.statements.length === 1 &&\n        ts.isReturnStatement(body.statements[0]!) &&\n        body.statements[0].expression\n        ? body.statements[0].expression\n        : body,\n    ) as any;\n    return this.$docs(node);\n  }\n\n  $validate(): asserts this {\n    const missing = this.missingRequiredCalls();\n    if (missing.length === 0) return;\n    throw new Error(`Function ${this.mode} missing ${missing.join(' and ')}`);\n  }\n\n  private missingRequiredCalls(): ReadonlyArray<string> {\n    const missing: Array<string> = [];\n    if (this.mode === 'decl' && !this.name.toString()) missing.push('name');\n    return missing;\n  }\n}\n\nexport const FuncTsDsl = ImplFuncTsDsl as {\n  new (): FuncTsDsl<'arrow'>;\n  new (fn: (f: FuncTsDsl<'arrow'>) => void): FuncTsDsl<'arrow'>;\n  new (name: NodeName): FuncTsDsl<'decl'>;\n  new (name: NodeName, fn: (f: FuncTsDsl<'decl'>) => void): FuncTsDsl<'decl'>;\n} & typeof ImplFuncTsDsl;\nexport type FuncTsDsl<M extends FuncMode = 'arrow'> = ImplFuncTsDsl<M>;\n"
  },
  {
    "path": "packages/openapi-ts/src/ts-dsl/decl/getter.ts",
    "content": "import type { AnalysisContext, NodeName } from '@hey-api/codegen-core';\nimport ts from 'typescript';\n\nimport { TsDsl } from '../base';\nimport { DecoratorMixin } from '../mixins/decorator';\nimport { DoMixin } from '../mixins/do';\nimport { DocMixin } from '../mixins/doc';\nimport {\n  AbstractMixin,\n  AsyncMixin,\n  PrivateMixin,\n  ProtectedMixin,\n  PublicMixin,\n  StaticMixin,\n} from '../mixins/modifiers';\nimport { ParamMixin } from '../mixins/param';\nimport { TypeReturnsMixin } from '../mixins/type-returns';\nimport { BlockTsDsl } from '../stmt/block';\nimport { safeAccessorName } from '../utils/name';\n\nconst Mixed = AbstractMixin(\n  AsyncMixin(\n    DecoratorMixin(\n      DoMixin(\n        DocMixin(\n          ParamMixin(\n            PrivateMixin(\n              ProtectedMixin(\n                PublicMixin(StaticMixin(TypeReturnsMixin(TsDsl<ts.GetAccessorDeclaration>))),\n              ),\n            ),\n          ),\n        ),\n      ),\n    ),\n  ),\n);\n\nexport class GetterTsDsl extends Mixed {\n  readonly '~dsl' = 'GetterTsDsl';\n  override readonly nameSanitizer = safeAccessorName;\n\n  constructor(name: NodeName, fn?: (g: GetterTsDsl) => void) {\n    super();\n    this.name.set(name);\n    fn?.(this);\n  }\n\n  override analyze(ctx: AnalysisContext): void {\n    ctx.analyze(this.name);\n\n    ctx.pushScope();\n    try {\n      super.analyze(ctx);\n    } finally {\n      ctx.popScope();\n    }\n  }\n\n  override toAst() {\n    const node = ts.factory.createGetAccessorDeclaration(\n      [...this.$decorators(), ...this.modifiers],\n      this.$node(this.name) as ts.PropertyName,\n      this.$params(),\n      this.$returns(),\n      this.$node(new BlockTsDsl(...this._do).pretty()),\n    );\n    return this.$docs(node);\n  }\n}\n"
  },
  {
    "path": "packages/openapi-ts/src/ts-dsl/decl/init.ts",
    "content": "import type { AnalysisContext } from '@hey-api/codegen-core';\nimport ts from 'typescript';\n\nimport { TsDsl } from '../base';\nimport { DecoratorMixin } from '../mixins/decorator';\nimport { DoMixin } from '../mixins/do';\nimport { DocMixin } from '../mixins/doc';\nimport { PrivateMixin, ProtectedMixin, PublicMixin } from '../mixins/modifiers';\nimport { ParamMixin } from '../mixins/param';\nimport { BlockTsDsl } from '../stmt/block';\n\nconst Mixed = DecoratorMixin(\n  DoMixin(\n    DocMixin(\n      ParamMixin(PrivateMixin(ProtectedMixin(PublicMixin(TsDsl<ts.ConstructorDeclaration>)))),\n    ),\n  ),\n);\n\nexport class InitTsDsl extends Mixed {\n  readonly '~dsl' = 'InitTsDsl';\n\n  constructor(fn?: (i: InitTsDsl) => void) {\n    super();\n    fn?.(this);\n  }\n\n  override analyze(ctx: AnalysisContext): void {\n    ctx.pushScope();\n    try {\n      super.analyze(ctx);\n    } finally {\n      ctx.popScope();\n    }\n  }\n\n  override toAst() {\n    const node = ts.factory.createConstructorDeclaration(\n      [...this.$decorators(), ...this.modifiers],\n      this.$params(),\n      this.$node(new BlockTsDsl(...this._do).pretty()),\n    );\n    return this.$docs(node);\n  }\n}\n"
  },
  {
    "path": "packages/openapi-ts/src/ts-dsl/decl/member.ts",
    "content": "import type { AnalysisContext, NodeName } from '@hey-api/codegen-core';\nimport ts from 'typescript';\n\nimport type { MaybeTsDsl } from '../base';\nimport { TsDsl } from '../base';\nimport { DocMixin } from '../mixins/doc';\nimport { safeMemberName } from '../utils/name';\n\ntype Value = string | number | MaybeTsDsl<ts.Expression>;\ntype ValueFn = Value | ((m: EnumMemberTsDsl) => void);\n\nconst Mixed = DocMixin(TsDsl<ts.EnumMember>);\n\nexport class EnumMemberTsDsl extends Mixed {\n  readonly '~dsl' = 'EnumMemberTsDsl';\n\n  private _value?: Value;\n\n  constructor(name: NodeName, value?: ValueFn) {\n    super();\n    this.name.set(name);\n    if (typeof value === 'function') {\n      value(this);\n    } else {\n      this.value(value);\n    }\n  }\n\n  override analyze(ctx: AnalysisContext): void {\n    super.analyze(ctx);\n    ctx.analyze(this._value);\n  }\n\n  /** Sets the enum member value. */\n  value(value?: Value): this {\n    this._value = value;\n    return this;\n  }\n\n  override toAst() {\n    const node = ts.factory.createEnumMember(\n      this.$node(safeMemberName(this.name.toString())),\n      this.$node(this._value),\n    );\n    return this.$docs(node);\n  }\n}\n"
  },
  {
    "path": "packages/openapi-ts/src/ts-dsl/decl/method.ts",
    "content": "import type { AnalysisContext, NodeName } from '@hey-api/codegen-core';\nimport ts from 'typescript';\n\nimport { TsDsl } from '../base';\nimport { DecoratorMixin } from '../mixins/decorator';\nimport { DoMixin } from '../mixins/do';\nimport { DocMixin } from '../mixins/doc';\nimport {\n  AbstractMixin,\n  AsyncMixin,\n  PrivateMixin,\n  ProtectedMixin,\n  PublicMixin,\n  StaticMixin,\n} from '../mixins/modifiers';\nimport { OptionalMixin } from '../mixins/optional';\nimport { ParamMixin } from '../mixins/param';\nimport { TypeParamsMixin } from '../mixins/type-params';\nimport { TypeReturnsMixin } from '../mixins/type-returns';\nimport { BlockTsDsl } from '../stmt/block';\nimport { TokenTsDsl } from '../token';\nimport { safeAccessorName } from '../utils/name';\n\nconst Mixed = AbstractMixin(\n  AsyncMixin(\n    DecoratorMixin(\n      DoMixin(\n        DocMixin(\n          OptionalMixin(\n            ParamMixin(\n              PrivateMixin(\n                ProtectedMixin(\n                  PublicMixin(\n                    StaticMixin(TypeParamsMixin(TypeReturnsMixin(TsDsl<ts.MethodDeclaration>))),\n                  ),\n                ),\n              ),\n            ),\n          ),\n        ),\n      ),\n    ),\n  ),\n);\n\nexport class MethodTsDsl extends Mixed {\n  readonly '~dsl' = 'MethodTsDsl';\n  override readonly nameSanitizer = safeAccessorName;\n\n  constructor(name: NodeName, fn?: (m: MethodTsDsl) => void) {\n    super();\n    this.name.set(name);\n    fn?.(this);\n  }\n\n  override analyze(ctx: AnalysisContext): void {\n    ctx.analyze(this.name);\n\n    ctx.pushScope();\n    try {\n      super.analyze(ctx);\n    } finally {\n      ctx.popScope();\n    }\n  }\n\n  override toAst() {\n    const node = ts.factory.createMethodDeclaration(\n      [...this.$decorators(), ...this.modifiers],\n      undefined,\n      this.$node(this.name) as ts.PropertyName,\n      this._optional ? this.$node(new TokenTsDsl().optional()) : undefined,\n      this.$generics(),\n      this.$params(),\n      this.$returns(),\n      this.$node(new BlockTsDsl(...this._do).pretty()),\n    );\n    return this.$docs(node);\n  }\n}\n"
  },
  {
    "path": "packages/openapi-ts/src/ts-dsl/decl/param.ts",
    "content": "import type { AnalysisContext, NodeName } from '@hey-api/codegen-core';\nimport ts from 'typescript';\n\nimport { TsDsl, TypeTsDsl } from '../base';\nimport { DecoratorMixin } from '../mixins/decorator';\nimport { OptionalMixin } from '../mixins/optional';\nimport { PatternMixin } from '../mixins/pattern';\nimport { ValueMixin } from '../mixins/value';\nimport { TokenTsDsl } from '../token';\nimport { TypeExprTsDsl } from '../type/expr';\n\nexport type ParamName = NodeName | ParamFn;\nexport type ParamFn = (p: ParamTsDsl) => void;\n\nexport type ParamCtor = (name: ParamName, fn?: ParamFn) => ParamTsDsl;\n\nconst Mixed = DecoratorMixin(\n  OptionalMixin(PatternMixin(ValueMixin(TsDsl<ts.ParameterDeclaration>))),\n);\n\nexport class ParamTsDsl extends Mixed {\n  readonly '~dsl' = 'ParamTsDsl';\n\n  protected _type?: TypeTsDsl;\n\n  constructor(name: ParamName, fn?: ParamFn) {\n    super();\n    if (typeof name === 'function') {\n      name(this);\n    } else {\n      this.name.set(name);\n      fn?.(this);\n    }\n  }\n\n  override analyze(ctx: AnalysisContext): void {\n    super.analyze(ctx);\n    ctx.analyze(this.name);\n    ctx.analyze(this._type);\n  }\n\n  /** Returns true when all required builder calls are present. */\n  get isValid(): boolean {\n    return this.missingRequiredCalls().length === 0;\n  }\n\n  /** Sets the parameter type. */\n  type(type: string | TypeTsDsl): this {\n    this._type = type instanceof TypeTsDsl ? type : new TypeExprTsDsl(type);\n    return this;\n  }\n\n  override toAst() {\n    this.$validate();\n    return ts.factory.createParameterDeclaration(\n      this.$decorators(),\n      undefined,\n      this.$pattern() ?? this.name.toString(),\n      this._optional ? this.$node(new TokenTsDsl().optional()) : undefined,\n      this.$type(this._type),\n      this.$value(),\n    );\n  }\n\n  $validate(): asserts this {\n    const missing = this.missingRequiredCalls();\n    if (missing.length === 0) return;\n    throw new Error(`Parameter missing ${missing.join(' and ')}`);\n  }\n\n  private missingRequiredCalls(): ReadonlyArray<string> {\n    const missing: Array<string> = [];\n    if (!this.$pattern() && !this.name.toString())\n      missing.push('name or pattern (.array()/.object())');\n    return missing;\n  }\n}\n"
  },
  {
    "path": "packages/openapi-ts/src/ts-dsl/decl/pattern.ts",
    "content": "import type { AnalysisContext } from '@hey-api/codegen-core';\nimport type { MaybeArray } from '@hey-api/types';\nimport ts from 'typescript';\n\nimport { TsDsl } from '../base';\nimport { IdTsDsl } from '../expr/id';\nimport { TokenTsDsl } from '../token';\n\nconst Mixed = TsDsl<ts.BindingName>;\n\n/**\n * Builds binding patterns (e.g. `{ foo, bar }`, `[a, b, ...rest]`).\n */\nexport class PatternTsDsl extends Mixed {\n  readonly '~dsl' = 'PatternTsDsl';\n\n  protected pattern?:\n    | { kind: 'array'; values: ReadonlyArray<string> }\n    | { kind: 'object'; values: Record<string, string> };\n  protected _spread?: string;\n\n  override analyze(ctx: AnalysisContext): void {\n    super.analyze(ctx);\n  }\n\n  /** Returns true when all required builder calls are present. */\n  get isValid(): boolean {\n    return this.missingRequiredCalls().length === 0;\n  }\n\n  /** Defines an array pattern (e.g. `[a, b, c]`). */\n  array(...props: ReadonlyArray<string> | [ReadonlyArray<string>]): this {\n    const values = props[0] instanceof Array ? [...props[0]] : (props as ReadonlyArray<string>);\n    this.pattern = { kind: 'array', values };\n    return this;\n  }\n\n  /** Defines an object pattern (e.g. `{ a, b: alias }`). */\n  object(...props: ReadonlyArray<MaybeArray<string> | Record<string, string>>): this {\n    const entries: Record<string, string> = {};\n    for (const p of props) {\n      if (typeof p === 'string') entries[p] = p;\n      else if (p instanceof Array) for (const n of p) entries[n] = n;\n      else Object.assign(entries, p);\n    }\n    this.pattern = { kind: 'object', values: entries };\n    return this;\n  }\n\n  /** Adds a spread element (e.g. `...rest`, `...options`, `...args`). */\n  spread(name: string): this {\n    this._spread = name;\n    return this;\n  }\n\n  override toAst() {\n    this.$validate();\n\n    if (this.pattern.kind === 'object') {\n      const elements = Object.entries(this.pattern.values).map(([key, alias]) =>\n        key === alias\n          ? ts.factory.createBindingElement(undefined, undefined, key, undefined)\n          : ts.factory.createBindingElement(undefined, key, alias, undefined),\n      );\n      const spread = this.createSpread();\n      if (spread) elements.push(spread);\n      return ts.factory.createObjectBindingPattern(elements);\n    }\n\n    if (this.pattern.kind === 'array') {\n      const elements = this.pattern.values.map((p) =>\n        ts.factory.createBindingElement(undefined, undefined, p, undefined),\n      );\n      const spread = this.createSpread();\n      if (spread) elements.push(spread);\n      return ts.factory.createArrayBindingPattern(elements);\n    }\n\n    throw new Error('PatternTsDsl requires object() or array() pattern');\n  }\n\n  $validate(): asserts this is this & {\n    pattern:\n      | { kind: 'array'; values: ReadonlyArray<string> }\n      | { kind: 'object'; values: Record<string, string> };\n  } {\n    const missing = this.missingRequiredCalls();\n    if (missing.length === 0) return;\n    throw new Error(`Binding pattern missing ${missing.join(' and ')}`);\n  }\n\n  private missingRequiredCalls(): ReadonlyArray<string> {\n    const missing: Array<string> = [];\n    if (!this.pattern) missing.push('.array() or .object()');\n    return missing;\n  }\n\n  private createSpread(): ts.BindingElement | undefined {\n    return this._spread\n      ? ts.factory.createBindingElement(\n          this.$node(new TokenTsDsl().spread()),\n          undefined,\n          this.$node(new IdTsDsl(this._spread)),\n        )\n      : undefined;\n  }\n}\n"
  },
  {
    "path": "packages/openapi-ts/src/ts-dsl/decl/setter.ts",
    "content": "import type { AnalysisContext, NodeName } from '@hey-api/codegen-core';\nimport ts from 'typescript';\n\nimport { TsDsl } from '../base';\nimport { DecoratorMixin } from '../mixins/decorator';\nimport { DoMixin } from '../mixins/do';\nimport { DocMixin } from '../mixins/doc';\nimport {\n  AbstractMixin,\n  AsyncMixin,\n  PrivateMixin,\n  ProtectedMixin,\n  PublicMixin,\n  StaticMixin,\n} from '../mixins/modifiers';\nimport { ParamMixin } from '../mixins/param';\nimport { BlockTsDsl } from '../stmt/block';\nimport { safeAccessorName } from '../utils/name';\n\nconst Mixed = AbstractMixin(\n  AsyncMixin(\n    DecoratorMixin(\n      DoMixin(\n        DocMixin(\n          ParamMixin(\n            PrivateMixin(\n              ProtectedMixin(PublicMixin(StaticMixin(TsDsl<ts.SetAccessorDeclaration>))),\n            ),\n          ),\n        ),\n      ),\n    ),\n  ),\n);\n\nexport class SetterTsDsl extends Mixed {\n  readonly '~dsl' = 'SetterTsDsl';\n  override readonly nameSanitizer = safeAccessorName;\n\n  constructor(name: NodeName, fn?: (s: SetterTsDsl) => void) {\n    super();\n    this.name.set(name);\n    fn?.(this);\n  }\n\n  override analyze(ctx: AnalysisContext): void {\n    ctx.analyze(this.name);\n\n    ctx.pushScope();\n    try {\n      super.analyze(ctx);\n    } finally {\n      ctx.popScope();\n    }\n  }\n\n  override toAst() {\n    const node = ts.factory.createSetAccessorDeclaration(\n      [...this.$decorators(), ...this.modifiers],\n      this.$node(this.name) as ts.PropertyName,\n      this.$params(),\n      this.$node(new BlockTsDsl(...this._do).pretty()),\n    );\n    return this.$docs(node);\n  }\n}\n"
  },
  {
    "path": "packages/openapi-ts/src/ts-dsl/expr/array.ts",
    "content": "import type { AnalysisContext } from '@hey-api/codegen-core';\nimport ts from 'typescript';\n\nimport type { MaybeTsDsl } from '../base';\nimport { TsDsl } from '../base';\nimport { AsMixin } from '../mixins/as';\nimport { LayoutMixin } from '../mixins/layout';\nimport { LiteralTsDsl } from './literal';\n\nconst Mixed = AsMixin(LayoutMixin(TsDsl<ts.ArrayLiteralExpression>));\n\nexport class ArrayTsDsl extends Mixed {\n  readonly '~dsl' = 'ArrayTsDsl';\n\n  protected _elements: Array<\n    | { expr: MaybeTsDsl<ts.Expression>; kind: 'element' }\n    | { expr: MaybeTsDsl<ts.Expression>; kind: 'spread' }\n  > = [];\n\n  constructor(...exprs: Array<string | number | boolean | MaybeTsDsl<ts.Expression>>) {\n    super();\n    this.elements(...exprs);\n  }\n\n  override analyze(ctx: AnalysisContext): void {\n    super.analyze(ctx);\n    for (const item of this._elements) {\n      ctx.analyze(item.expr);\n    }\n  }\n\n  /** Adds a single array element. */\n  element(expr: string | number | boolean | MaybeTsDsl<ts.Expression>): this {\n    const node =\n      typeof expr === 'string' || typeof expr === 'number' || typeof expr === 'boolean'\n        ? new LiteralTsDsl(expr)\n        : expr;\n    this._elements.push({ expr: node, kind: 'element' });\n    return this;\n  }\n\n  /** Adds multiple array elements. */\n  elements(...exprs: ReadonlyArray<string | number | boolean | MaybeTsDsl<ts.Expression>>): this {\n    for (const expr of exprs) this.element(expr);\n    return this;\n  }\n\n  /** Adds a spread element (`...expr`). */\n  spread(expr: MaybeTsDsl<ts.Expression>): this {\n    this._elements.push({ expr, kind: 'spread' });\n    return this;\n  }\n\n  override toAst() {\n    const elements = this._elements.map((item) => {\n      const node = this.$node(item.expr);\n      return item.kind === 'spread' ? ts.factory.createSpreadElement(node) : node;\n    });\n\n    return ts.factory.createArrayLiteralExpression(\n      elements,\n      this.$multiline(this._elements.length),\n    );\n  }\n}\n"
  },
  {
    "path": "packages/openapi-ts/src/ts-dsl/expr/as.ts",
    "content": "import type { AnalysisContext, NodeName, Ref } from '@hey-api/codegen-core';\nimport { ref } from '@hey-api/codegen-core';\nimport ts from 'typescript';\n\nimport type { MaybeTsDsl, TypeTsDsl } from '../base';\nimport { TsDsl } from '../base';\nimport { AsMixin } from '../mixins/as';\nimport { ExprMixin } from '../mixins/expr';\nimport { f } from '../utils/factories';\n\nexport type AsExpr = NodeName | MaybeTsDsl<ts.Expression>;\nexport type AsType = NodeName | TypeTsDsl;\nexport type AsCtor = (expr: AsExpr, type: AsType) => AsTsDsl;\n\nconst Mixed = AsMixin(ExprMixin(TsDsl<ts.AsExpression>));\n\nexport class AsTsDsl extends Mixed {\n  readonly '~dsl' = 'AsTsDsl';\n\n  protected expr: Ref<AsExpr>;\n  protected type: Ref<AsType>;\n\n  constructor(expr: AsExpr, type: AsType) {\n    super();\n    this.expr = ref(expr);\n    this.type = ref(type);\n  }\n\n  override analyze(ctx: AnalysisContext): void {\n    super.analyze(ctx);\n    ctx.analyze(this.expr);\n    ctx.analyze(this.type);\n  }\n\n  override toAst() {\n    return ts.factory.createAsExpression(this.$node(this.expr), this.$type(this.type));\n  }\n}\n\nf.as.set((...args) => new AsTsDsl(...args));\n"
  },
  {
    "path": "packages/openapi-ts/src/ts-dsl/expr/attr.ts",
    "content": "import type { AnalysisContext, NodeName, Ref } from '@hey-api/codegen-core';\nimport { fromRef, isSymbol, ref } from '@hey-api/codegen-core';\nimport ts from 'typescript';\n\nimport type { MaybeTsDsl } from '../base';\nimport { TsDsl } from '../base';\nimport { AsMixin } from '../mixins/as';\nimport { ExprMixin } from '../mixins/expr';\nimport { OperatorMixin } from '../mixins/operator';\nimport { OptionalMixin } from '../mixins/optional';\nimport { TokenTsDsl } from '../token';\nimport { f } from '../utils/factories';\nimport { regexp } from '../utils/regexp';\nimport { LiteralTsDsl } from './literal';\n\nexport type AttrLeft = NodeName | MaybeTsDsl<ts.Expression>;\nexport type AttrCtor = (left: AttrLeft, right: NodeName) => AttrTsDsl;\n\nconst Mixed = AsMixin(\n  ExprMixin(\n    OperatorMixin(OptionalMixin(TsDsl<ts.PropertyAccessExpression | ts.ElementAccessExpression>)),\n  ),\n);\n\nexport class AttrTsDsl extends Mixed {\n  readonly '~dsl' = 'AttrTsDsl';\n\n  protected left: Ref<AttrLeft>;\n\n  constructor(left: AttrLeft, right: NodeName) {\n    super();\n    this.left = ref(left);\n    this.name.set(right);\n  }\n\n  override analyze(ctx: AnalysisContext): void {\n    super.analyze(ctx);\n    ctx.analyze(this.left);\n    ctx.analyze(this.name);\n  }\n\n  override toAst() {\n    const leftNode = this.$node(this.left);\n    regexp.typeScriptIdentifier.lastIndex = 0;\n    const right = fromRef(this.name);\n    if (!regexp.typeScriptIdentifier.test(this.name.toString())) {\n      let value = isSymbol(right) ? right.finalName : right;\n      if (typeof value === 'string') {\n        if (\n          (value.startsWith(\"'\") && value.endsWith(\"'\")) ||\n          (value.startsWith('\"') && value.endsWith('\"'))\n        ) {\n          value = value.slice(1, -1);\n        }\n      }\n      if (this._optional) {\n        return ts.factory.createElementAccessChain(\n          leftNode,\n          this.$node(new TokenTsDsl().questionDot()),\n          this.$node(new LiteralTsDsl(value)),\n        );\n      }\n      return ts.factory.createElementAccessExpression(\n        leftNode,\n        this.$node(new LiteralTsDsl(value)),\n      );\n    }\n    if (this._optional) {\n      return ts.factory.createPropertyAccessChain(\n        leftNode,\n        this.$node(new TokenTsDsl().questionDot()),\n        this.$node(this.name) as ts.MemberName,\n      );\n    }\n    return ts.factory.createPropertyAccessExpression(\n      leftNode,\n      this.$node(this.name) as ts.MemberName,\n    );\n  }\n}\n\nf.attr.set((...args) => new AttrTsDsl(...args));\n"
  },
  {
    "path": "packages/openapi-ts/src/ts-dsl/expr/await.ts",
    "content": "import type { AnalysisContext, NodeName, Ref } from '@hey-api/codegen-core';\nimport { ref } from '@hey-api/codegen-core';\nimport ts from 'typescript';\n\nimport type { MaybeTsDsl } from '../base';\nimport { TsDsl } from '../base';\nimport { ExprMixin } from '../mixins/expr';\nimport { f } from '../utils/factories';\n\nexport type AwaitExpr = NodeName | MaybeTsDsl<ts.Expression>;\nexport type AwaitCtor = (expr: AwaitExpr) => AwaitTsDsl;\n\nconst Mixed = ExprMixin(TsDsl<ts.AwaitExpression>);\n\nexport class AwaitTsDsl extends Mixed {\n  readonly '~dsl' = 'AwaitTsDsl';\n\n  protected _awaitExpr: Ref<AwaitExpr>;\n\n  constructor(expr: AwaitExpr) {\n    super();\n    this._awaitExpr = ref(expr);\n  }\n\n  override analyze(ctx: AnalysisContext): void {\n    super.analyze(ctx);\n    ctx.analyze(this._awaitExpr);\n  }\n\n  override toAst() {\n    return ts.factory.createAwaitExpression(this.$node(this._awaitExpr));\n  }\n}\n\nf.await.set((...args) => new AwaitTsDsl(...args));\n"
  },
  {
    "path": "packages/openapi-ts/src/ts-dsl/expr/binary.ts",
    "content": "import type { AnalysisContext, NodeName, Ref } from '@hey-api/codegen-core';\nimport { ref } from '@hey-api/codegen-core';\nimport ts from 'typescript';\n\nimport type { MaybeTsDsl } from '../base';\nimport { TsDsl } from '../base';\nimport { AsMixin } from '../mixins/as';\nimport { ExprMixin } from '../mixins/expr';\n\ntype Expr = NodeName | MaybeTsDsl<ts.Expression>;\ntype Op = Operator | ts.BinaryOperator;\ntype Operator =\n  | '!='\n  | '!=='\n  | '&&'\n  | '*'\n  | '+'\n  | '-'\n  | '/'\n  | '<'\n  | '<='\n  | '='\n  | '=='\n  | '==='\n  | '>'\n  | '>='\n  | '??'\n  | '??='\n  | '||';\n\nconst Mixed = AsMixin(ExprMixin(TsDsl<ts.BinaryExpression>));\n\nexport class BinaryTsDsl extends Mixed {\n  readonly '~dsl' = 'BinaryTsDsl';\n\n  protected _base: Ref<Expr>;\n  protected _expr?: Ref<Expr>;\n  protected _op?: Op;\n\n  constructor(base: Expr, op?: Op, expr?: Expr) {\n    super();\n    this._base = ref(base);\n    this._op = op;\n    if (expr) this._expr = ref(expr);\n  }\n\n  override analyze(ctx: AnalysisContext): void {\n    super.analyze(ctx);\n    ctx.analyze(this._base);\n    ctx.analyze(this._expr);\n  }\n\n  /** Returns true when all required builder calls are present. */\n  get isValid(): boolean {\n    return this.missingRequiredCalls().length === 0;\n  }\n\n  /** Logical AND — `this && expr` */\n  and(expr: Expr): this {\n    return this.opAndExpr('&&', expr);\n  }\n\n  /** Creates an assignment expression (e.g. `this = expr`). */\n  assign(expr: Expr): this {\n    return this.opAndExpr('=', expr);\n  }\n\n  /** Nullish coalescing — `this ?? expr` */\n  coalesce(expr: Expr): this {\n    return this.opAndExpr('??', expr);\n  }\n\n  /** Division — `this / expr` */\n  div(expr: Expr): this {\n    return this.opAndExpr('/', expr);\n  }\n\n  /** Strict equality — `this === expr` */\n  eq(expr: Expr): this {\n    return this.opAndExpr('===', expr);\n  }\n\n  /** Greater than — `this > expr` */\n  gt(expr: Expr): this {\n    return this.opAndExpr('>', expr);\n  }\n\n  /** Greater than or equal — `this >= expr` */\n  gte(expr: Expr): this {\n    return this.opAndExpr('>=', expr);\n  }\n\n  /** Loose equality — `this == expr` */\n  looseEq(expr: Expr): this {\n    return this.opAndExpr('==', expr);\n  }\n\n  /** Loose inequality — `this != expr` */\n  looseNeq(expr: Expr): this {\n    return this.opAndExpr('!=', expr);\n  }\n\n  /** Less than — `this < expr` */\n  lt(expr: Expr): this {\n    return this.opAndExpr('<', expr);\n  }\n\n  /** Less than or equal — `this <= expr` */\n  lte(expr: Expr): this {\n    return this.opAndExpr('<=', expr);\n  }\n\n  /** Subtraction — `this - expr` */\n  minus(expr: Expr): this {\n    return this.opAndExpr('-', expr);\n  }\n\n  /** Strict inequality — `this !== expr` */\n  neq(expr: Expr): this {\n    return this.opAndExpr('!==', expr);\n  }\n\n  /** Nullish assignment — `this ??= expr` */\n  nullishAssign(expr: Expr): this {\n    return this.opAndExpr('??=', expr);\n  }\n\n  /** Logical OR — `this || expr` */\n  or(expr: Expr): this {\n    return this.opAndExpr('||', expr);\n  }\n\n  /** Addition — `this + expr` */\n  plus(expr: Expr): this {\n    return this.opAndExpr('+', expr);\n  }\n\n  /** Multiplication — `this * expr` */\n  times(expr: Expr): this {\n    return this.opAndExpr('*', expr);\n  }\n\n  override toAst() {\n    this.$validate();\n    const base = this.$node(this._base);\n    const operator = typeof this._op === 'string' ? this.opToToken(this._op) : this._op;\n    return ts.factory.createBinaryExpression(base, operator, this.$node(this._expr));\n  }\n\n  $validate(): asserts this is this & {\n    _expr: Ref<Expr>;\n    _op: Op;\n  } {\n    const missing = this.missingRequiredCalls();\n    if (missing.length === 0) return;\n    throw new Error(`Binary expression missing ${missing.join(' and ')}`);\n  }\n\n  private missingRequiredCalls(): ReadonlyArray<string> {\n    const missing: Array<string> = [];\n    if (!this._op) missing.push('operator (e.g., .eq(), .plus())');\n    if (!this._expr) missing.push('right-hand expression');\n    return missing;\n  }\n\n  /** Sets the binary operator and right-hand operand for this expression. */\n  private opAndExpr(op: Op, expr: Expr): this {\n    this._expr = ref(expr);\n    this._op = op;\n    return this;\n  }\n\n  private opToToken(op: Operator): ts.BinaryOperator | ts.BinaryOperatorToken {\n    const tokenMap: Record<Operator, ts.BinaryOperator> = {\n      '!=': ts.SyntaxKind.ExclamationEqualsToken,\n      '!==': ts.SyntaxKind.ExclamationEqualsEqualsToken,\n      '&&': ts.SyntaxKind.AmpersandAmpersandToken,\n      '*': ts.SyntaxKind.AsteriskToken,\n      '+': ts.SyntaxKind.PlusToken,\n      '-': ts.SyntaxKind.MinusToken,\n      '/': ts.SyntaxKind.SlashToken,\n      '<': ts.SyntaxKind.LessThanToken,\n      '<=': ts.SyntaxKind.LessThanEqualsToken,\n      '=': ts.SyntaxKind.EqualsToken,\n      '==': ts.SyntaxKind.EqualsEqualsToken,\n      '===': ts.SyntaxKind.EqualsEqualsEqualsToken,\n      '>': ts.SyntaxKind.GreaterThanToken,\n      '>=': ts.SyntaxKind.GreaterThanEqualsToken,\n      '??': ts.SyntaxKind.QuestionQuestionToken,\n      '??=': ts.SyntaxKind.QuestionQuestionEqualsToken,\n      '||': ts.SyntaxKind.BarBarToken,\n    };\n    const token = tokenMap[op];\n    if (!token) {\n      throw new Error(`Unsupported operator: ${op}`);\n    }\n    return token;\n  }\n}\n"
  },
  {
    "path": "packages/openapi-ts/src/ts-dsl/expr/call.ts",
    "content": "import type { AnalysisContext, NodeName, Ref } from '@hey-api/codegen-core';\nimport { ref } from '@hey-api/codegen-core';\nimport ts from 'typescript';\n\nimport type { MaybeTsDsl } from '../base';\nimport { TsDsl } from '../base';\nimport { ArgsMixin } from '../mixins/args';\nimport { AsMixin } from '../mixins/as';\nimport { ExprMixin } from '../mixins/expr';\nimport { TypeArgsMixin } from '../mixins/type-args';\nimport { f } from '../utils/factories';\n\nexport type CallArgs = ReadonlyArray<CallCallee | undefined>;\nexport type CallCallee = NodeName | MaybeTsDsl<ts.Expression>;\nexport type CallCtor = (callee: CallCallee, ...args: CallArgs) => CallTsDsl;\n\nconst Mixed = ArgsMixin(AsMixin(ExprMixin(TypeArgsMixin(TsDsl<ts.CallExpression>))));\n\nexport class CallTsDsl extends Mixed {\n  readonly '~dsl' = 'CallTsDsl';\n\n  protected _callee: Ref<CallCallee>;\n\n  constructor(callee: CallCallee, ...args: CallArgs) {\n    super();\n    this._callee = ref(callee);\n    this.args(...args);\n  }\n\n  override analyze(ctx: AnalysisContext): void {\n    super.analyze(ctx);\n    ctx.analyze(this._callee);\n  }\n\n  override toAst() {\n    return ts.factory.createCallExpression(\n      this.$node(this._callee),\n      this.$generics(),\n      this.$args(),\n    );\n  }\n}\n\nf.call.set((...args) => new CallTsDsl(...args));\n"
  },
  {
    "path": "packages/openapi-ts/src/ts-dsl/expr/expr.ts",
    "content": "import type { AnalysisContext, NodeName, Ref } from '@hey-api/codegen-core';\nimport { isNode, isSymbol, ref } from '@hey-api/codegen-core';\nimport type ts from 'typescript';\n\nimport type { MaybeTsDsl } from '../base';\nimport { TsDsl } from '../base';\nimport { AsMixin } from '../mixins/as';\nimport { ExprMixin } from '../mixins/expr';\nimport { OperatorMixin } from '../mixins/operator';\nimport { TypeExprMixin } from '../mixins/type-expr';\n\ntype Id = NodeName | MaybeTsDsl<ts.Expression>;\n\nconst Mixed = AsMixin(ExprMixin(OperatorMixin(TypeExprMixin(TsDsl<ts.Expression>))));\n\nexport class ExprTsDsl extends Mixed {\n  readonly '~dsl' = 'ExprTsDsl';\n\n  protected _exprInput: Ref<Id>;\n\n  constructor(id: Id) {\n    super();\n    this._exprInput = ref(id);\n    if (typeof id === 'string' || isSymbol(id)) {\n      this.name.set(id);\n    } else if (isNode(id)) {\n      this.name.set(id.name);\n    }\n  }\n\n  override analyze(ctx: AnalysisContext): void {\n    super.analyze(ctx);\n    ctx.analyze(this._exprInput);\n  }\n\n  override toAst() {\n    return this.$node(this._exprInput);\n  }\n}\n"
  },
  {
    "path": "packages/openapi-ts/src/ts-dsl/expr/fromValue.ts",
    "content": "import { isNode } from '@hey-api/codegen-core';\nimport type ts from 'typescript';\n\nimport type { TsDsl } from '../base';\nimport { ArrayTsDsl } from './array';\nimport { LiteralTsDsl } from './literal';\nimport { ObjectTsDsl } from './object';\n\nexport const fromValue = (\n  input: unknown,\n  options?: {\n    layout?: 'pretty';\n  },\n): TsDsl<ts.Expression> => {\n  if (isNode(input)) {\n    return input as TsDsl<ts.Expression>;\n  }\n\n  if (\n    input === null ||\n    typeof input === 'number' ||\n    typeof input === 'boolean' ||\n    typeof input === 'string' ||\n    typeof input === 'bigint'\n  ) {\n    return new LiteralTsDsl(input);\n  }\n\n  if (input instanceof Array) {\n    const arr = new ArrayTsDsl(...input.map((v) => fromValue(v, options)));\n    if (options?.layout === 'pretty') arr.pretty();\n    return arr;\n  }\n\n  if (typeof input === 'object') {\n    const obj = new ObjectTsDsl();\n    for (const [key, val] of Object.entries(input)) {\n      const expr = fromValue(val, options);\n      obj.prop(key, expr);\n    }\n    if (options?.layout === 'pretty') obj.pretty();\n    return obj;\n  }\n\n  throw new Error(`$.fromValue(): Unsupported input type ${String(input)}`);\n};\n"
  },
  {
    "path": "packages/openapi-ts/src/ts-dsl/expr/id.ts",
    "content": "import type { AnalysisContext } from '@hey-api/codegen-core';\nimport ts from 'typescript';\n\nimport { TsDsl } from '../base';\n\nconst Mixed = TsDsl<ts.Identifier>;\n\nexport class IdTsDsl extends Mixed {\n  readonly '~dsl' = 'IdTsDsl';\n\n  constructor(name: string) {\n    super();\n    this.name.set(name);\n  }\n\n  override analyze(ctx: AnalysisContext): void {\n    super.analyze(ctx);\n  }\n\n  override toAst() {\n    return ts.factory.createIdentifier(this.name.toString());\n  }\n}\n"
  },
  {
    "path": "packages/openapi-ts/src/ts-dsl/expr/literal.ts",
    "content": "import type { AnalysisContext } from '@hey-api/codegen-core';\nimport tsOld from 'typescript';\n\nimport type { ts } from '../../ts-compiler';\nimport { TsDsl } from '../base';\nimport { PrefixTsDsl } from '../expr/prefix';\nimport { AsMixin } from '../mixins/as';\n\nconst Mixed = AsMixin(\n  TsDsl<\n    | tsOld.BigIntLiteral\n    | tsOld.BooleanLiteral\n    | tsOld.NullLiteral\n    | tsOld.NumericLiteral\n    | tsOld.PrefixUnaryExpression\n    | tsOld.StringLiteral\n  >,\n);\n\nexport class LiteralTsDsl extends Mixed {\n  readonly '~dsl' = 'LiteralTsDsl';\n\n  protected value: ts.LiteralValue;\n\n  constructor(value: ts.LiteralValue) {\n    super();\n    this.value = value;\n  }\n\n  override analyze(ctx: AnalysisContext): void {\n    super.analyze(ctx);\n  }\n\n  override toAst() {\n    if (typeof this.value === 'boolean') {\n      return this.value ? tsOld.factory.createTrue() : tsOld.factory.createFalse();\n    }\n    if (typeof this.value === 'number') {\n      const expr = tsOld.factory.createNumericLiteral(Math.abs(this.value));\n      return this.value < 0 ? this.$node(new PrefixTsDsl(expr).neg()) : expr;\n    }\n    if (typeof this.value === 'string') {\n      return tsOld.factory.createStringLiteral(this.value, true);\n    }\n    if (typeof this.value === 'bigint') {\n      return tsOld.factory.createBigIntLiteral(this.value.toString());\n    }\n    if (this.value === null) {\n      return tsOld.factory.createNull();\n    }\n    throw new Error(`Unsupported literal: ${String(this.value)}`);\n  }\n}\n"
  },
  {
    "path": "packages/openapi-ts/src/ts-dsl/expr/new.ts",
    "content": "import type { AnalysisContext, NodeName, Ref } from '@hey-api/codegen-core';\nimport { ref } from '@hey-api/codegen-core';\nimport ts from 'typescript';\n\nimport type { MaybeTsDsl } from '../base';\nimport { TsDsl } from '../base';\nimport { ArgsMixin } from '../mixins/args';\nimport { AsMixin } from '../mixins/as';\nimport { ExprMixin } from '../mixins/expr';\nimport { TypeArgsMixin } from '../mixins/type-args';\nimport { f } from '../utils/factories';\n\nexport type NewArgs = ReadonlyArray<NewExpr | undefined>;\nexport type NewExpr = NodeName | MaybeTsDsl<ts.Expression>;\nexport type NewCtor = (expr: NewExpr, ...args: NewArgs) => NewTsDsl;\n\nconst Mixed = ArgsMixin(AsMixin(ExprMixin(TypeArgsMixin(TsDsl<ts.NewExpression>))));\n\nexport class NewTsDsl extends Mixed {\n  readonly '~dsl' = 'NewTsDsl';\n\n  protected _newExpr: Ref<NewExpr>;\n\n  constructor(expr: NewExpr, ...args: NewArgs) {\n    super();\n    this._newExpr = ref(expr);\n    this.args(...args);\n  }\n\n  override analyze(ctx: AnalysisContext): void {\n    super.analyze(ctx);\n    ctx.analyze(this._newExpr);\n  }\n\n  override toAst() {\n    return ts.factory.createNewExpression(\n      this.$node(this._newExpr),\n      this.$generics(),\n      this.$args(),\n    );\n  }\n}\n\nf.new.set((...args) => new NewTsDsl(...args));\n"
  },
  {
    "path": "packages/openapi-ts/src/ts-dsl/expr/object.ts",
    "content": "import type { AnalysisContext, NodeName } from '@hey-api/codegen-core';\nimport ts from 'typescript';\n\nimport type { MaybeTsDsl } from '../base';\nimport { TsDsl } from '../base';\nimport { AsMixin } from '../mixins/as';\nimport { ExprMixin } from '../mixins/expr';\nimport { HintMixin } from '../mixins/hint';\nimport { LayoutMixin } from '../mixins/layout';\nimport { ObjectPropTsDsl } from './prop';\n\ntype Expr = NodeName | MaybeTsDsl<ts.Expression>;\ntype Stmt = NodeName | MaybeTsDsl<ts.Statement>;\ntype ExprFn = Expr | ((p: ObjectPropTsDsl) => void);\ntype StmtFn = Stmt | ((p: ObjectPropTsDsl) => void);\n\nconst Mixed = AsMixin(ExprMixin(HintMixin(LayoutMixin(TsDsl<ts.ObjectLiteralExpression>))));\n\nexport class ObjectTsDsl extends Mixed {\n  readonly '~dsl' = 'ObjectTsDsl';\n\n  protected _props = new Map<string, ObjectPropTsDsl>();\n  protected _spreadCounter = 0;\n\n  constructor(...props: Array<ObjectPropTsDsl>) {\n    super();\n    this.props(...props);\n  }\n\n  override analyze(ctx: AnalysisContext): void {\n    super.analyze(ctx);\n    for (const prop of this._props.values()) {\n      ctx.analyze(prop);\n    }\n  }\n\n  /** Returns composite key for the property. */\n  private _propKey(prop: ObjectPropTsDsl): string {\n    if (prop.kind === 'spread') {\n      return `spread:${this._spreadCounter++}`;\n    }\n    return `${prop.kind}:${prop.propName}`;\n  }\n\n  /** Adds a computed property (e.g. `{ [expr]: value }`), or removes if null. */\n  computed(name: string, expr: ExprFn | null): this {\n    if (expr === null) {\n      this._props.delete(`computed:${name}`);\n    } else {\n      this._props.set(\n        `computed:${name}`,\n        new ObjectPropTsDsl({ kind: 'computed', name }).value(expr),\n      );\n    }\n    return this;\n  }\n\n  /** Adds a getter property (e.g. `{ get foo() { ... } }`), or removes if null. */\n  getter(name: string, stmt: StmtFn | null): this {\n    if (stmt === null) {\n      this._props.delete(`getter:${name}`);\n    } else {\n      this._props.set(`getter:${name}`, new ObjectPropTsDsl({ kind: 'getter', name }).value(stmt));\n    }\n    return this;\n  }\n\n  /** Returns true if object has at least one property or spread. */\n  hasProps(): boolean {\n    return this._props.size > 0;\n  }\n\n  /** Returns true if object has no properties or spreads. */\n  get isEmpty(): boolean {\n    return this._props.size === 0;\n  }\n\n  /** Adds a property assignment, or removes if null. */\n  prop(name: string, expr: ExprFn | null): this {\n    if (expr === null) {\n      this._props.delete(`prop:${name}`);\n    } else {\n      this._props.set(`prop:${name}`, new ObjectPropTsDsl({ kind: 'prop', name }).value(expr));\n    }\n    return this;\n  }\n\n  /** Adds multiple properties. */\n  props(...props: ReadonlyArray<ObjectPropTsDsl>): this {\n    for (const prop of props) {\n      this._props.set(this._propKey(prop), prop);\n    }\n    return this;\n  }\n\n  /** Adds a setter property (e.g. `{ set foo(v) { ... } }`), or removes if null. */\n  setter(name: string, stmt: StmtFn | null): this {\n    if (stmt === null) {\n      this._props.delete(`setter:${name}`);\n    } else {\n      this._props.set(`setter:${name}`, new ObjectPropTsDsl({ kind: 'setter', name }).value(stmt));\n    }\n    return this;\n  }\n\n  /** Adds a spread property (e.g. `{ ...options }`). */\n  spread(expr: ExprFn): this {\n    const key = `spread:${this._spreadCounter++}`;\n    this._props.set(key, new ObjectPropTsDsl({ kind: 'spread' }).value(expr));\n    return this;\n  }\n\n  override toAst() {\n    const props = [...this._props.values()];\n    const node = ts.factory.createObjectLiteralExpression(\n      this.$node(props),\n      this.$multiline(props.length),\n    );\n    return this.$hint(node);\n  }\n}\n"
  },
  {
    "path": "packages/openapi-ts/src/ts-dsl/expr/prefix.ts",
    "content": "import type { AnalysisContext } from '@hey-api/codegen-core';\nimport ts from 'typescript';\n\nimport type { MaybeTsDsl } from '../base';\nimport { TsDsl } from '../base';\n\nconst Mixed = TsDsl<ts.PrefixUnaryExpression>;\n\nexport class PrefixTsDsl extends Mixed {\n  readonly '~dsl' = 'PrefixTsDsl';\n\n  protected _expr?: string | MaybeTsDsl<ts.Expression>;\n  protected _op?: ts.PrefixUnaryOperator;\n\n  constructor(expr?: string | MaybeTsDsl<ts.Expression>, op?: ts.PrefixUnaryOperator) {\n    super();\n    this._expr = expr;\n    this._op = op;\n  }\n\n  override analyze(ctx: AnalysisContext): void {\n    super.analyze(ctx);\n    ctx.analyze(this._expr);\n  }\n\n  /** Returns true when all required builder calls are present. */\n  get isValid(): boolean {\n    return this.missingRequiredCalls().length === 0;\n  }\n\n  /** Sets the operand (the expression being prefixed). */\n  expr(expr: string | MaybeTsDsl<ts.Expression>): this {\n    this._expr = expr;\n    return this;\n  }\n\n  /** Sets the operator to MinusToken for negation (`-`). */\n  neg(): this {\n    this._op = ts.SyntaxKind.MinusToken;\n    return this;\n  }\n\n  /** Sets the operator to ExclamationToken for logical NOT (`!`). */\n  not(): this {\n    this._op = ts.SyntaxKind.ExclamationToken;\n    return this;\n  }\n\n  /** Sets the operator (e.g. `ts.SyntaxKind.ExclamationToken` for `!`). */\n  op(op: ts.PrefixUnaryOperator): this {\n    this._op = op;\n    return this;\n  }\n\n  override toAst() {\n    this.$validate();\n    return ts.factory.createPrefixUnaryExpression(this._op, this.$node(this._expr));\n  }\n\n  $validate(): asserts this is this & {\n    _expr: string | MaybeTsDsl<ts.Expression>;\n    _op: ts.PrefixUnaryOperator;\n  } {\n    const missing = this.missingRequiredCalls();\n    if (missing.length === 0) return;\n    throw new Error(`Prefix unary expression missing ${missing.join(' and ')}`);\n  }\n\n  private missingRequiredCalls(): ReadonlyArray<string> {\n    const missing: Array<string> = [];\n    if (!this._expr) missing.push('.expr()');\n    if (!this._op) missing.push('operator (e.g., .not(), .neg())');\n    return missing;\n  }\n}\n"
  },
  {
    "path": "packages/openapi-ts/src/ts-dsl/expr/prop.ts",
    "content": "import type { AnalysisContext, NodeName, Ref } from '@hey-api/codegen-core';\nimport { ref } from '@hey-api/codegen-core';\nimport ts from 'typescript';\n\nimport type { MaybeTsDsl } from '../base';\nimport { TsDsl } from '../base';\nimport { GetterTsDsl } from '../decl/getter';\nimport { SetterTsDsl } from '../decl/setter';\nimport { DocMixin } from '../mixins/doc';\nimport { safePropName } from '../utils/name';\nimport { IdTsDsl } from './id';\n\ntype Expr = NodeName | MaybeTsDsl<ts.Expression>;\ntype Stmt = NodeName | MaybeTsDsl<ts.Statement>;\n\nexport type ObjectPropKind = 'computed' | 'getter' | 'prop' | 'setter' | 'spread';\n\ntype Meta =\n  | { kind: 'computed'; name: string }\n  | { kind: 'getter'; name: string }\n  | { kind: 'prop'; name: string }\n  | { kind: 'setter'; name: string }\n  | { kind: 'spread'; name?: undefined };\n\nconst Mixed = DocMixin(TsDsl<ts.ObjectLiteralElementLike>);\n\nexport class ObjectPropTsDsl extends Mixed {\n  readonly '~dsl' = 'ObjectPropTsDsl';\n\n  protected _value?: Ref<Expr | Stmt>;\n  protected _meta: Meta;\n\n  constructor(meta: Meta) {\n    super();\n    this._meta = meta;\n  }\n\n  get kind(): ObjectPropKind {\n    return this._meta.kind;\n  }\n\n  get propName(): string | undefined {\n    return this._meta.name;\n  }\n\n  override analyze(ctx: AnalysisContext): void {\n    super.analyze(ctx);\n    ctx.analyze(this._value);\n  }\n\n  get isValid(): boolean {\n    return this.missingRequiredCalls().length === 0;\n  }\n\n  value(value: Expr | Stmt | ((p: ObjectPropTsDsl) => void)) {\n    if (typeof value === 'function') {\n      value(this);\n    } else {\n      this._value = ref(value);\n    }\n    return this;\n  }\n\n  override toAst() {\n    this.$validate();\n    const node = this.$node(this._value);\n    if (this._meta.kind === 'spread') {\n      if (ts.isStatement(node)) {\n        throw new Error('Invalid spread: object spread must be an expression, not a statement.');\n      }\n      const result = ts.factory.createSpreadAssignment(node);\n      return this.$docs(result);\n    }\n    if (this._meta.kind === 'getter') {\n      const getter = new GetterTsDsl(this._meta.name).do(node);\n      const result = this.$node(getter);\n      return this.$docs(result);\n    }\n    if (this._meta.kind === 'setter') {\n      const setter = new SetterTsDsl(this._meta.name).do(node);\n      const result = this.$node(setter);\n      return this.$docs(result);\n    }\n    if (ts.isIdentifier(node) && node.text === this._meta.name) {\n      const result = ts.factory.createShorthandPropertyAssignment(this._meta.name);\n      return this.$docs(result);\n    }\n    if (ts.isStatement(node)) {\n      throw new Error(\n        'Invalid property: object property value must be an expression, not a statement.',\n      );\n    }\n    const result = ts.factory.createPropertyAssignment(\n      this._meta.kind === 'computed'\n        ? ts.factory.createComputedPropertyName(this.$node(new IdTsDsl(this._meta.name)))\n        : this.$node(safePropName(this._meta.name)),\n      node,\n    );\n    return this.$docs(result);\n  }\n\n  $validate(): asserts this is this & {\n    _value: Expr | Stmt;\n    kind: ObjectPropKind;\n  } {\n    const missing = this.missingRequiredCalls();\n    if (missing.length === 0) return;\n    throw new Error(\n      `Object property${this._meta.name ? ` \"${this._meta.name}\"` : ''} missing ${missing.join(' and ')}`,\n    );\n  }\n\n  private missingRequiredCalls(): ReadonlyArray<string> {\n    const missing: Array<string> = [];\n    if (!this._value) missing.push('.value()');\n    return missing;\n  }\n}\n"
  },
  {
    "path": "packages/openapi-ts/src/ts-dsl/expr/regexp.ts",
    "content": "import type { AnalysisContext } from '@hey-api/codegen-core';\nimport ts from 'typescript';\n\nimport { TsDsl } from '../base';\n\ntype RegexFlag = 'g' | 'i' | 'm' | 's' | 'u' | 'y';\n\ntype RegexFlags<Avail extends string = RegexFlag> =\n  | ''\n  | {\n      [K in Avail]: `${K}${RegexFlags<Exclude<Avail, K>>}`;\n    }[Avail];\n\nconst Mixed = TsDsl<ts.RegularExpressionLiteral>;\n\nexport class RegExpTsDsl extends Mixed {\n  readonly '~dsl' = 'RegExpTsDsl';\n\n  protected pattern: string;\n  protected flags?: RegexFlags;\n\n  constructor(pattern: string, flags?: RegexFlags) {\n    super();\n    this.pattern = pattern;\n    this.flags = flags;\n  }\n\n  override analyze(ctx: AnalysisContext): void {\n    super.analyze(ctx);\n  }\n\n  override toAst() {\n    const patternContent =\n      this.pattern.startsWith('/') && this.pattern.endsWith('/')\n        ? this.pattern.slice(1, -1)\n        : this.pattern;\n    const escapedPattern = patternContent.replace(/(?<!\\\\)\\//g, '\\\\/');\n    const literal = `/${escapedPattern}/${this.flags ?? ''}`;\n    return ts.factory.createRegularExpressionLiteral(literal);\n  }\n}\n"
  },
  {
    "path": "packages/openapi-ts/src/ts-dsl/expr/template.ts",
    "content": "import type { AnalysisContext, NodeName, Ref } from '@hey-api/codegen-core';\nimport { fromRef, isSymbol, ref } from '@hey-api/codegen-core';\nimport ts from 'typescript';\n\nimport type { MaybeTsDsl } from '../base';\nimport { TsDsl } from '../base';\n\nexport type TemplatePart = NodeName | MaybeTsDsl<ts.Expression>;\n\nconst Mixed = TsDsl<ts.TemplateExpression | ts.NoSubstitutionTemplateLiteral>;\n\nexport class TemplateTsDsl extends Mixed {\n  readonly '~dsl' = 'TemplateTsDsl';\n\n  protected parts: Array<Ref<TemplatePart>> = [];\n\n  constructor(value?: TemplatePart) {\n    super();\n    if (value !== undefined) this.add(value);\n  }\n\n  override analyze(ctx: AnalysisContext): void {\n    super.analyze(ctx);\n    for (const part of this.parts) {\n      ctx.analyze(part);\n    }\n  }\n\n  add(value: TemplatePart): this {\n    this.parts.push(ref(value));\n    return this;\n  }\n\n  override toAst() {\n    const parts = this.$node(\n      this.parts.map((p) => {\n        const part = fromRef(p);\n        return isSymbol(part) ? part.finalName : part;\n      }),\n    );\n\n    const normalized: Array<string | ts.Expression> = [];\n    // merge consecutive string parts\n    for (let index = 0; index < parts.length; index++) {\n      const current = parts[index]!;\n      if (typeof current === 'string') {\n        let merged = current;\n        while (index + 1 < parts.length && typeof parts[index + 1] === 'string') {\n          merged += parts[index + 1];\n          index++;\n        }\n        normalized.push(merged);\n      } else if (typeof current === 'number') {\n        normalized.push(String(current));\n      } else {\n        normalized.push(current);\n      }\n    }\n\n    if (normalized.length === 0 || typeof normalized[0] !== 'string') {\n      normalized.unshift('');\n    }\n\n    if (normalized.length === 1 && typeof normalized[0] === 'string') {\n      return ts.factory.createNoSubstitutionTemplateLiteral(normalized[0]);\n    }\n\n    if (\n      normalized.length === 2 &&\n      typeof normalized[0] === 'string' &&\n      typeof normalized[1] !== 'string'\n    ) {\n      return ts.factory.createTemplateExpression(ts.factory.createTemplateHead(normalized[0]), [\n        ts.factory.createTemplateSpan(normalized[1]!, ts.factory.createTemplateTail('')),\n      ]);\n    }\n\n    const head = ts.factory.createTemplateHead(normalized.shift() as string);\n    const spans: Array<ts.TemplateSpan> = [];\n\n    while (normalized.length) {\n      const expr = normalized.shift() as ts.Expression;\n      const next = typeof normalized[0] === 'string' ? (normalized.shift() as string) : '';\n      const isLast = normalized.length === 0;\n      spans.push(\n        ts.factory.createTemplateSpan(\n          expr,\n          isLast ? ts.factory.createTemplateTail(next) : ts.factory.createTemplateMiddle(next),\n        ),\n      );\n    }\n\n    return ts.factory.createTemplateExpression(head, spans);\n  }\n}\n"
  },
  {
    "path": "packages/openapi-ts/src/ts-dsl/expr/ternary.ts",
    "content": "import type { AnalysisContext } from '@hey-api/codegen-core';\nimport ts from 'typescript';\n\nimport type { MaybeTsDsl } from '../base';\nimport { TsDsl } from '../base';\n\nconst Mixed = TsDsl<ts.ConditionalExpression>;\n\nexport class TernaryTsDsl extends Mixed {\n  readonly '~dsl' = 'TernaryTsDsl';\n\n  protected _condition?: string | MaybeTsDsl<ts.Expression>;\n  protected _then?: string | MaybeTsDsl<ts.Expression>;\n  protected _else?: string | MaybeTsDsl<ts.Expression>;\n\n  constructor(condition?: string | MaybeTsDsl<ts.Expression>) {\n    super();\n    if (condition) this.condition(condition);\n  }\n\n  override analyze(ctx: AnalysisContext): void {\n    super.analyze(ctx);\n    ctx.analyze(this._condition);\n    ctx.analyze(this._then);\n    ctx.analyze(this._else);\n  }\n\n  /** Returns true when all required builder calls are present. */\n  get isValid(): boolean {\n    return this.missingRequiredCalls().length === 0;\n  }\n\n  condition(condition: string | MaybeTsDsl<ts.Expression>) {\n    this._condition = condition;\n    return this;\n  }\n\n  do(expr: string | MaybeTsDsl<ts.Expression>) {\n    this._then = expr;\n    return this;\n  }\n\n  otherwise(expr: string | MaybeTsDsl<ts.Expression>) {\n    this._else = expr;\n    return this;\n  }\n\n  override toAst() {\n    this.$validate();\n    return ts.factory.createConditionalExpression(\n      this.$node(this._condition),\n      undefined,\n      this.$node(this._then),\n      undefined,\n      this.$node(this._else),\n    );\n  }\n\n  $validate(): asserts this is this & {\n    _condition: string | MaybeTsDsl<ts.Expression>;\n    _else: string | MaybeTsDsl<ts.Expression>;\n    _then: string | MaybeTsDsl<ts.Expression>;\n  } {\n    const missing = this.missingRequiredCalls();\n    if (missing.length === 0) return;\n    throw new Error(`Ternary expression missing ${missing.join(' and ')}`);\n  }\n\n  private missingRequiredCalls(): ReadonlyArray<string> {\n    const missing: Array<string> = [];\n    if (!this._condition) missing.push('.condition()');\n    if (!this._then) missing.push('.do()');\n    if (!this._else) missing.push('.otherwise()');\n    return missing;\n  }\n}\n"
  },
  {
    "path": "packages/openapi-ts/src/ts-dsl/expr/typeof.ts",
    "content": "import type { AnalysisContext } from '@hey-api/codegen-core';\nimport ts from 'typescript';\n\nimport type { MaybeTsDsl } from '../base';\nimport { TsDsl } from '../base';\nimport { OperatorMixin } from '../mixins/operator';\nimport { f } from '../utils/factories';\n\nexport type TypeOfExpr = string | MaybeTsDsl<ts.Expression>;\nexport type TypeOfExprCtor = (expr: TypeOfExpr) => TypeOfExprTsDsl;\n\nconst Mixed = OperatorMixin(TsDsl<ts.TypeOfExpression>);\n\nexport class TypeOfExprTsDsl extends Mixed {\n  readonly '~dsl' = 'TypeOfExprTsDsl';\n\n  protected _expr: TypeOfExpr;\n\n  constructor(expr: TypeOfExpr) {\n    super();\n    this._expr = expr;\n  }\n\n  override analyze(ctx: AnalysisContext): void {\n    super.analyze(ctx);\n    ctx.analyze(this._expr);\n  }\n\n  override toAst() {\n    return ts.factory.createTypeOfExpression(this.$node(this._expr));\n  }\n}\n\nf.typeofExpr.set((...args) => new TypeOfExprTsDsl(...args));\n"
  },
  {
    "path": "packages/openapi-ts/src/ts-dsl/index.ts",
    "content": "import type ts from 'typescript';\n\nimport { ClassTsDsl } from './decl/class';\nimport { DecoratorTsDsl } from './decl/decorator';\nimport { EnumTsDsl } from './decl/enum';\nimport { FieldTsDsl } from './decl/field';\nimport { FuncTsDsl } from './decl/func';\nimport { GetterTsDsl } from './decl/getter';\nimport { InitTsDsl } from './decl/init';\nimport { EnumMemberTsDsl } from './decl/member';\nimport { MethodTsDsl } from './decl/method';\nimport { ParamTsDsl } from './decl/param';\nimport { PatternTsDsl } from './decl/pattern';\nimport { SetterTsDsl } from './decl/setter';\nimport { ArrayTsDsl } from './expr/array';\nimport { AsTsDsl } from './expr/as';\nimport { AttrTsDsl } from './expr/attr';\nimport { AwaitTsDsl } from './expr/await';\nimport { BinaryTsDsl } from './expr/binary';\nimport { CallTsDsl } from './expr/call';\nimport { ExprTsDsl } from './expr/expr';\nimport { fromValue as exprValue } from './expr/fromValue';\nimport { IdTsDsl } from './expr/id';\nimport { LiteralTsDsl } from './expr/literal';\nimport { NewTsDsl } from './expr/new';\nimport { ObjectTsDsl } from './expr/object';\nimport { PrefixTsDsl } from './expr/prefix';\nimport { ObjectPropTsDsl } from './expr/prop';\nimport { RegExpTsDsl } from './expr/regexp';\nimport { TemplateTsDsl } from './expr/template';\nimport { TernaryTsDsl } from './expr/ternary';\nimport { TypeOfExprTsDsl } from './expr/typeof';\nimport { DocTsDsl } from './layout/doc';\nimport { HintTsDsl } from './layout/hint';\nimport { NewlineTsDsl } from './layout/newline';\nimport { NoteTsDsl } from './layout/note';\nimport { BlockTsDsl } from './stmt/block';\nimport { IfTsDsl } from './stmt/if';\nimport { ReturnTsDsl } from './stmt/return';\nimport { StmtTsDsl } from './stmt/stmt';\nimport { ThrowTsDsl } from './stmt/throw';\nimport { TryTsDsl } from './stmt/try';\nimport { VarTsDsl } from './stmt/var';\nimport { TokenTsDsl } from './token';\nimport { TypeAliasTsDsl } from './type/alias';\nimport { TypeAndTsDsl } from './type/and';\nimport { TypeAttrTsDsl } from './type/attr';\nimport { TypeExprTsDsl } from './type/expr';\nimport { fromValue as typeValue } from './type/fromValue';\nimport { TypeFuncTsDsl } from './type/func';\nimport { TypeIdxTsDsl } from './type/idx';\nimport { TypeLiteralTsDsl } from './type/literal';\nimport { TypeMappedTsDsl } from './type/mapped';\nimport { TypeObjectTsDsl } from './type/object';\nimport { TypeOperatorTsDsl } from './type/operator';\nimport { TypeOrTsDsl } from './type/or';\nimport { TypeParamTsDsl } from './type/param';\nimport { TypeQueryTsDsl } from './type/query';\nimport { TypeTemplateTsDsl } from './type/template';\nimport { TypeTupleTsDsl } from './type/tuple';\nimport { LazyTsDsl } from './utils/lazy';\n\nconst tsDsl = {\n  /** Creates an array literal expression (e.g. `[1, 2, 3]`). */\n  array: (...args: ConstructorParameters<typeof ArrayTsDsl>) => new ArrayTsDsl(...args),\n\n  /** Creates an `as` type assertion expression (e.g. `value as Type`). */\n  as: (...args: ConstructorParameters<typeof AsTsDsl>) => new AsTsDsl(...args),\n\n  /** Creates a property access expression (e.g. `obj.foo`). */\n  attr: (...args: ConstructorParameters<typeof AttrTsDsl>) => new AttrTsDsl(...args),\n\n  /** Creates an await expression (e.g. `await promise`). */\n  await: (...args: ConstructorParameters<typeof AwaitTsDsl>) => new AwaitTsDsl(...args),\n\n  /** Creates a binary expression (e.g. `a + b`). */\n  binary: (...args: ConstructorParameters<typeof BinaryTsDsl>) => new BinaryTsDsl(...args),\n\n  /** Creates a statement block (`{ ... }`). */\n  block: (...args: ConstructorParameters<typeof BlockTsDsl>) => new BlockTsDsl(...args),\n\n  /** Creates a function or method call expression (e.g. `fn(arg)`). */\n  call: (...args: ConstructorParameters<typeof CallTsDsl>) => new CallTsDsl(...args),\n\n  /** Creates a class declaration or expression. */\n  class: (...args: ConstructorParameters<typeof ClassTsDsl>) => new ClassTsDsl(...args),\n\n  /** Creates a constant variable declaration (`const`). */\n  const: (...args: ConstructorParameters<typeof VarTsDsl>) => new VarTsDsl(...args).const(),\n\n  /** Creates a decorator expression (e.g. `@decorator`). */\n  decorator: (...args: ConstructorParameters<typeof DecoratorTsDsl>) => new DecoratorTsDsl(...args),\n\n  /** Creates a JSDoc documentation block. */\n  doc: (...args: ConstructorParameters<typeof DocTsDsl>) => new DocTsDsl(...args),\n\n  /** Creates an enum declaration. */\n  enum: (...args: ConstructorParameters<typeof EnumTsDsl>) => new EnumTsDsl(...args),\n\n  /** Creates a general expression node. */\n  expr: (...args: ConstructorParameters<typeof ExprTsDsl>) => new ExprTsDsl(...args),\n\n  /** Creates a field declaration in a class or object. */\n  field: (...args: ConstructorParameters<typeof FieldTsDsl>) => new FieldTsDsl(...args),\n\n  /** Converts a runtime value into a corresponding expression node. */\n  fromValue: (...args: Parameters<typeof exprValue>) => exprValue(...args),\n\n  /** Creates a function expression or declaration. */\n  func: ((nameOrFn?: any, fn?: any) => {\n    if (nameOrFn === undefined) return new FuncTsDsl();\n    if (typeof nameOrFn !== 'string') return new FuncTsDsl(nameOrFn);\n    if (fn === undefined) return new FuncTsDsl(nameOrFn);\n    return new FuncTsDsl(nameOrFn, fn);\n  }) as {\n    (): FuncTsDsl<'arrow'>;\n    (fn: (f: FuncTsDsl<'arrow'>) => void): FuncTsDsl<'arrow'>;\n    (name: string): FuncTsDsl<'decl'>;\n    (name: string, fn: (f: FuncTsDsl<'decl'>) => void): FuncTsDsl<'decl'>;\n    (name?: string, fn?: (f: FuncTsDsl<'decl'>) => void): FuncTsDsl<'arrow'> | FuncTsDsl<'decl'>;\n  },\n\n  /** Creates a getter method declaration. */\n  getter: (...args: ConstructorParameters<typeof GetterTsDsl>) => new GetterTsDsl(...args),\n\n  /** Creates a single-line comment (//). */\n  hint: (...args: ConstructorParameters<typeof HintTsDsl>) => new HintTsDsl(...args),\n\n  /** Creates an identifier (e.g. `foo`). */\n  id: (...args: ConstructorParameters<typeof IdTsDsl>) => new IdTsDsl(...args),\n\n  /** Creates an if statement. */\n  if: (...args: ConstructorParameters<typeof IfTsDsl>) => new IfTsDsl(...args),\n\n  /** Creates an initialization block or statement. */\n  init: (...args: ConstructorParameters<typeof InitTsDsl>) => new InitTsDsl(...args),\n\n  /** Creates a lazy, context-aware node with deferred evaluation. */\n  lazy: <T extends ts.Node>(...args: ConstructorParameters<typeof LazyTsDsl<T>>) =>\n    new LazyTsDsl<T>(...args),\n\n  /** Creates a let variable declaration (`let`). */\n  let: (...args: ConstructorParameters<typeof VarTsDsl>) => new VarTsDsl(...args).let(),\n\n  /** Creates a literal value (e.g. string, number, boolean). */\n  literal: (...args: ConstructorParameters<typeof LiteralTsDsl>) => new LiteralTsDsl(...args),\n\n  /** Creates an enum member declaration. */\n  member: (...args: ConstructorParameters<typeof EnumMemberTsDsl>) => new EnumMemberTsDsl(...args),\n\n  /** Creates a method declaration inside a class or object. */\n  method: (...args: ConstructorParameters<typeof MethodTsDsl>) => new MethodTsDsl(...args),\n\n  /** Creates a negation expression (`-x`). */\n  neg: (...args: ConstructorParameters<typeof PrefixTsDsl>) => new PrefixTsDsl(...args).neg(),\n\n  /** Creates a new expression (e.g. `new ClassName()`). */\n  new: (...args: ConstructorParameters<typeof NewTsDsl>) => new NewTsDsl(...args),\n\n  /** Creates a newline (for formatting purposes). */\n  newline: (...args: ConstructorParameters<typeof NewlineTsDsl>) => new NewlineTsDsl(...args),\n\n  /** Creates a logical NOT expression (`!x`). */\n  not: (...args: ConstructorParameters<typeof PrefixTsDsl>) => new PrefixTsDsl(...args).not(),\n\n  /** Creates a block comment (/* ... *\\/). */\n  note: (...args: ConstructorParameters<typeof NoteTsDsl>) => new NoteTsDsl(...args),\n\n  /** Creates an object literal expression. */\n  object: (...args: ConstructorParameters<typeof ObjectTsDsl>) => new ObjectTsDsl(...args),\n\n  /** Creates a parameter declaration for functions or methods. */\n  param: (...args: ConstructorParameters<typeof ParamTsDsl>) => new ParamTsDsl(...args),\n\n  /** Creates a pattern for destructuring or matching. */\n  pattern: (...args: ConstructorParameters<typeof PatternTsDsl>) => new PatternTsDsl(...args),\n\n  /** Creates a prefix unary expression (e.g. `-x`, `!x`, `~x`). */\n  prefix: (...args: ConstructorParameters<typeof PrefixTsDsl>) => new PrefixTsDsl(...args),\n\n  /** Creates an object literal property (e.g. `{ foo: bar }`). */\n  prop: (...args: ConstructorParameters<typeof ObjectPropTsDsl>) => new ObjectPropTsDsl(...args),\n\n  /** Creates a regular expression literal (e.g. `/foo/gi`). */\n  regexp: (...args: ConstructorParameters<typeof RegExpTsDsl>) => new RegExpTsDsl(...args),\n\n  /** Creates a return statement. */\n  return: (...args: ConstructorParameters<typeof ReturnTsDsl>) => new ReturnTsDsl(...args),\n\n  /** Creates a setter method declaration. */\n  setter: (...args: ConstructorParameters<typeof SetterTsDsl>) => new SetterTsDsl(...args),\n\n  /** Wraps an expression or statement-like value into a `StmtTsDsl`. */\n  stmt: (...args: ConstructorParameters<typeof StmtTsDsl>) => new StmtTsDsl(...args),\n\n  /** Creates a template literal expression. */\n  template: (...args: ConstructorParameters<typeof TemplateTsDsl>) => new TemplateTsDsl(...args),\n\n  /** Creates a ternary conditional expression (if ? then : else). */\n  ternary: (...args: ConstructorParameters<typeof TernaryTsDsl>) => new TernaryTsDsl(...args),\n\n  /** Creates a throw statement. */\n  throw: (...args: ConstructorParameters<typeof ThrowTsDsl>) => new ThrowTsDsl(...args),\n\n  /** Creates a syntax token (e.g. `?`, `readonly`, `+`, `-`). */\n  token: (...args: ConstructorParameters<typeof TokenTsDsl>) => new TokenTsDsl(...args),\n\n  /** Creates a try/catch/finally statement. */\n  try: (...args: ConstructorParameters<typeof TryTsDsl>) => new TryTsDsl(...args),\n\n  /** Creates a basic type reference or type expression (e.g. Foo or Foo<T>). */\n  type: Object.assign(\n    (...args: ConstructorParameters<typeof TypeExprTsDsl>) => new TypeExprTsDsl(...args),\n    {\n      /** Creates a type alias declaration (e.g. `type Foo = Bar`). */\n      alias: (...args: ConstructorParameters<typeof TypeAliasTsDsl>) => new TypeAliasTsDsl(...args),\n\n      /** Creates an intersection type (e.g. `A & B`). */\n      and: (...args: ConstructorParameters<typeof TypeAndTsDsl>) => new TypeAndTsDsl(...args),\n\n      /** Creates a qualified type reference (e.g. Foo.Bar). */\n      attr: (...args: ConstructorParameters<typeof TypeAttrTsDsl>) => new TypeAttrTsDsl(...args),\n\n      /** Creates a basic type reference or type expression (e.g. Foo or Foo<T>). */\n      expr: (...args: ConstructorParameters<typeof TypeExprTsDsl>) => new TypeExprTsDsl(...args),\n\n      /** Converts a runtime value into a corresponding type expression node. */\n      fromValue: (...args: Parameters<typeof typeValue>) => typeValue(...args),\n\n      /** Creates a function type node (e.g. `(a: string) => number`). */\n      func: (...args: ConstructorParameters<typeof TypeFuncTsDsl>) => new TypeFuncTsDsl(...args),\n\n      /** Creates an indexed-access type (e.g. `Foo<T>[K]`). */\n      idx: (...args: ConstructorParameters<typeof TypeIdxTsDsl>) => new TypeIdxTsDsl(...args),\n\n      /** Creates a literal type node (e.g. 'foo', 42, or true). */\n      literal: (...args: ConstructorParameters<typeof TypeLiteralTsDsl>) =>\n        new TypeLiteralTsDsl(...args),\n\n      /** Creates a mapped type (e.g. `{ [K in keyof T]: U }`). */\n      mapped: (...args: ConstructorParameters<typeof TypeMappedTsDsl>) =>\n        new TypeMappedTsDsl(...args),\n\n      /** Creates a type literal node (e.g. { foo: string }). */\n      object: (...args: ConstructorParameters<typeof TypeObjectTsDsl>) =>\n        new TypeObjectTsDsl(...args),\n\n      /** Creates a type operator node (e.g. `readonly T`, `keyof T`, `unique T`). */\n      operator: (...args: ConstructorParameters<typeof TypeOperatorTsDsl>) =>\n        new TypeOperatorTsDsl(...args),\n\n      /** Represents a union type (e.g. `A | B | C`). */\n      or: (...args: ConstructorParameters<typeof TypeOrTsDsl>) => new TypeOrTsDsl(...args),\n\n      /** Creates a type parameter (e.g. `<T>`). */\n      param: (...args: ConstructorParameters<typeof TypeParamTsDsl>) => new TypeParamTsDsl(...args),\n\n      /** Creates a type query node (e.g. `typeof Foo`). */\n      query: (...args: ConstructorParameters<typeof TypeQueryTsDsl>) => new TypeQueryTsDsl(...args),\n\n      /** Builds a TypeScript template literal *type* (e.g. `${Foo}-${Bar}` as a type). */\n      template: (...args: ConstructorParameters<typeof TypeTemplateTsDsl>) =>\n        new TypeTemplateTsDsl(...args),\n\n      /** Creates a tuple type (e.g. [A, B, C]). */\n      tuple: (...args: ConstructorParameters<typeof TypeTupleTsDsl>) => new TypeTupleTsDsl(...args),\n    },\n  ),\n\n  /** Creates a `typeof` expression (e.g. `typeof value`). */\n  typeofExpr: (...args: ConstructorParameters<typeof TypeOfExprTsDsl>) =>\n    new TypeOfExprTsDsl(...args),\n\n  /** Creates a variable declaration (`var`). */\n  var: (...args: ConstructorParameters<typeof VarTsDsl>) => new VarTsDsl(...args),\n};\n\nexport const $ = Object.assign(\n  (...args: ConstructorParameters<typeof ExprTsDsl>) => new ExprTsDsl(...args),\n  tsDsl,\n);\n\nexport type DollarTsDsl = {\n  /**\n   * Entry point to the TypeScript DSL.\n   *\n   * `$` creates a general expression node by default, but also exposes\n   * builders for all other constructs such as `.type()`, `.call()`,\n   * `.object()`, `.func()`, etc.\n   *\n   * Example:\n   * ```ts\n   * const node = $('console').attr('log').call($.literal('Hello'));\n   * ```\n   *\n   * Returns:\n   * - A new `ExprTsDsl` instance when called directly.\n   * - The `tsDsl` object for constructing more specific nodes.\n   */\n  $: typeof $;\n};\n\nexport type { MaybeTsDsl, TypeTsDsl } from './base';\nexport { TsDsl } from './base';\nexport type { CallArgs } from './expr/call';\nexport type { ExampleOptions } from './utils/context';\nexport { ctx, TsDslContext } from './utils/context';\nexport { keywords } from './utils/keywords';\nexport { regexp } from './utils/regexp';\nexport { TypeScriptRenderer } from './utils/render';\nexport { reserved } from './utils/reserved';\n"
  },
  {
    "path": "packages/openapi-ts/src/ts-dsl/layout/doc.ts",
    "content": "import type { AnalysisContext } from '@hey-api/codegen-core';\nimport type { MaybeArray } from '@hey-api/types';\nimport ts from 'typescript';\n\nimport { TsDsl } from '../base';\nimport { IdTsDsl } from '../expr/id';\nimport type { TsDslContext } from '../utils/context';\nimport { ctx } from '../utils/context';\n\ntype DocMaybeLazy<T> = ((ctx: TsDslContext) => T) | T;\nexport type DocFn = (d: DocTsDsl) => void;\nexport type DocLines = DocMaybeLazy<MaybeArray<string>>;\n\nexport class DocTsDsl extends TsDsl<ts.Node> {\n  readonly '~dsl' = 'DocTsDsl';\n\n  protected _lines: Array<DocLines> = [];\n\n  constructor(lines?: DocLines, fn?: DocFn) {\n    super();\n    if (lines) this.add(lines);\n    fn?.(this);\n  }\n\n  override analyze(ctx: AnalysisContext): void {\n    super.analyze(ctx);\n  }\n\n  add(lines: DocLines): this {\n    this._lines.push(lines);\n    return this;\n  }\n\n  apply<T extends ts.Node>(node: T): T {\n    const lines = this._lines.reduce((lines: Array<string>, line: DocLines) => {\n      if (typeof line === 'function') line = line(ctx);\n      for (const l of typeof line === 'string' ? [line] : line) {\n        if (l || l === '') lines.push(l);\n      }\n      return lines;\n    }, []);\n    if (!lines.length) return node;\n\n    const jsdocTexts = lines.map((line) => ts.factory.createJSDocText(`${line}\\n`));\n\n    const jsdoc = ts.factory.createJSDocComment(ts.factory.createNodeArray(jsdocTexts), undefined);\n\n    const cleanedJsdoc = ts\n      .createPrinter()\n      .printNode(\n        ts.EmitHint.Unspecified,\n        jsdoc,\n        node.getSourceFile?.() ?? ts.createSourceFile('', '', ts.ScriptTarget.Latest),\n      )\n      .replace('/*', '')\n      .replace('*  */', '');\n\n    ts.addSyntheticLeadingComment(node, ts.SyntaxKind.MultiLineCommentTrivia, cleanedJsdoc, true);\n\n    return node;\n  }\n\n  override toAst() {\n    // this class does not build a standalone node;\n    // it modifies other nodes via `apply()`.\n    // Return a dummy comment node for compliance.\n    return this.$node(new IdTsDsl(''));\n  }\n}\n"
  },
  {
    "path": "packages/openapi-ts/src/ts-dsl/layout/hint.ts",
    "content": "import type { AnalysisContext } from '@hey-api/codegen-core';\nimport type { MaybeArray } from '@hey-api/types';\nimport ts from 'typescript';\n\nimport { TsDsl } from '../base';\nimport { IdTsDsl } from '../expr/id';\nimport type { TsDslContext } from '../utils/context';\nimport { ctx } from '../utils/context';\n\ntype HintMaybeLazy<T> = ((ctx: TsDslContext) => T) | T;\nexport type HintFn = (d: HintTsDsl) => void;\nexport type HintLines = HintMaybeLazy<MaybeArray<string>>;\n\nexport class HintTsDsl extends TsDsl<ts.Node> {\n  readonly '~dsl' = 'HintTsDsl';\n\n  protected _lines: Array<HintLines> = [];\n\n  constructor(lines?: HintLines, fn?: HintFn) {\n    super();\n    if (lines) this.add(lines);\n    fn?.(this);\n  }\n\n  override analyze(ctx: AnalysisContext): void {\n    super.analyze(ctx);\n  }\n\n  add(lines: HintLines): this {\n    this._lines.push(lines);\n    return this;\n  }\n\n  apply<T extends ts.Node>(node: T): T {\n    const lines = this._lines.reduce((lines: Array<string>, line: HintLines) => {\n      if (typeof line === 'function') line = line(ctx);\n      for (const l of typeof line === 'string' ? [line] : line) {\n        if (l || l === '') lines.push(l);\n      }\n      return lines;\n    }, []);\n    if (!lines.length) return node;\n\n    for (const line of lines) {\n      ts.addSyntheticLeadingComment(node, ts.SyntaxKind.SingleLineCommentTrivia, ` ${line}`, false);\n    }\n\n    return node;\n  }\n\n  override toAst() {\n    // this class does not build a standalone node;\n    // it modifies other nodes via `apply()`.\n    // Return a dummy comment node for compliance.\n    return this.$node(new IdTsDsl(''));\n  }\n}\n"
  },
  {
    "path": "packages/openapi-ts/src/ts-dsl/layout/newline.ts",
    "content": "import type { AnalysisContext } from '@hey-api/codegen-core';\nimport type ts from 'typescript';\n\nimport { TsDsl } from '../base';\nimport { IdTsDsl } from '../expr/id';\n\nexport class NewlineTsDsl extends TsDsl<ts.Identifier> {\n  readonly '~dsl' = 'NewlineTsDsl';\n\n  override analyze(ctx: AnalysisContext): void {\n    super.analyze(ctx);\n  }\n\n  override toAst() {\n    return this.$node(new IdTsDsl('\\n'));\n  }\n}\n"
  },
  {
    "path": "packages/openapi-ts/src/ts-dsl/layout/note.ts",
    "content": "import type { AnalysisContext } from '@hey-api/codegen-core';\nimport type { MaybeArray } from '@hey-api/types';\nimport ts from 'typescript';\n\nimport { TsDsl } from '../base';\nimport { IdTsDsl } from '../expr/id';\nimport type { TsDslContext } from '../utils/context';\nimport { ctx } from '../utils/context';\n\ntype NoteMaybeLazy<T> = ((ctx: TsDslContext) => T) | T;\nexport type NoteFn = (d: NoteTsDsl) => void;\nexport type NoteLines = NoteMaybeLazy<MaybeArray<string>>;\n\nexport class NoteTsDsl extends TsDsl<ts.Node> {\n  readonly '~dsl' = 'NoteTsDsl';\n\n  protected _lines: Array<NoteLines> = [];\n\n  constructor(lines?: NoteLines, fn?: NoteFn) {\n    super();\n    if (lines) this.add(lines);\n    fn?.(this);\n  }\n\n  override analyze(ctx: AnalysisContext): void {\n    super.analyze(ctx);\n  }\n\n  add(lines: NoteLines): this {\n    this._lines.push(lines);\n    return this;\n  }\n\n  apply<T extends ts.Node>(node: T): T {\n    const lines = this._lines.reduce((lines: Array<string>, line: NoteLines) => {\n      if (typeof line === 'function') line = line(ctx);\n      for (const l of typeof line === 'string' ? [line] : line) {\n        if (l || l === '') lines.push(l);\n      }\n      return lines;\n    }, []);\n    if (!lines.length) return node;\n\n    ts.addSyntheticLeadingComment(\n      node,\n      ts.SyntaxKind.MultiLineCommentTrivia,\n      `\\n${lines.join('\\n')}\\n`,\n      true,\n    );\n\n    return node;\n  }\n\n  override toAst() {\n    // this class does not build a standalone node;\n    // it modifies other nodes via `apply()`.\n    // Return a dummy comment node for compliance.\n    return this.$node(new IdTsDsl(''));\n  }\n}\n"
  },
  {
    "path": "packages/openapi-ts/src/ts-dsl/mixins/args.ts",
    "content": "import type { AnalysisContext, Node, NodeName, Ref } from '@hey-api/codegen-core';\nimport { ref } from '@hey-api/codegen-core';\nimport type ts from 'typescript';\n\nimport type { MaybeTsDsl } from '../base';\nimport type { BaseCtor, MixinCtor } from './types';\n\ntype Arg = NodeName | MaybeTsDsl<ts.Expression>;\n\nexport interface ArgsMethods extends Node {\n  /** Renders the arguments into an array of `Expression`s. */\n  $args(): ReadonlyArray<ts.Expression>;\n  /** Adds a single expression argument. */\n  arg(arg: Arg | undefined): this;\n  /** Adds one or more expression arguments. */\n  args(...args: ReadonlyArray<Arg | undefined>): this;\n}\n\n/**\n * Adds `.arg()` and `.args()` for managing expression arguments in call-like nodes.\n */\nexport function ArgsMixin<T extends ts.Node, TBase extends BaseCtor<T>>(Base: TBase) {\n  abstract class Args extends Base {\n    protected _args: Array<Ref<Arg>> = [];\n\n    override analyze(ctx: AnalysisContext): void {\n      super.analyze(ctx);\n      for (const arg of this._args) {\n        ctx.analyze(arg);\n      }\n    }\n\n    protected arg(arg: Arg | undefined): this {\n      if (arg !== undefined) this._args.push(ref(arg));\n      return this;\n    }\n\n    protected args(...args: ReadonlyArray<Arg | undefined>): this {\n      this._args.push(\n        ...args.filter((a): a is NonNullable<typeof a> => a !== undefined).map((a) => ref(a)),\n      );\n      return this;\n    }\n\n    protected $args(): ReadonlyArray<ts.Expression> {\n      return this.$node(this._args).map((arg) => this.$node(arg));\n    }\n  }\n\n  return Args as unknown as MixinCtor<TBase, ArgsMethods>;\n}\n"
  },
  {
    "path": "packages/openapi-ts/src/ts-dsl/mixins/as.ts",
    "content": "import type { AnalysisContext, Node } from '@hey-api/codegen-core';\nimport type ts from 'typescript';\n\nimport { f } from '../utils/factories';\nimport type { BaseCtor, DropFirst, MixinCtor } from './types';\n\nexport interface AsMethods extends Node {\n  /** Creates an `as` type assertion expression (e.g. `value as Type`). */\n  as(...args: DropFirst<Parameters<typeof f.as>>): ReturnType<typeof f.as>;\n}\n\nexport function AsMixin<T extends ts.Expression, TBase extends BaseCtor<T>>(Base: TBase) {\n  abstract class As extends Base {\n    override analyze(ctx: AnalysisContext): void {\n      super.analyze(ctx);\n    }\n\n    protected as(...args: DropFirst<Parameters<typeof f.as>>): ReturnType<typeof f.as> {\n      return f.as(this, ...args);\n    }\n  }\n\n  return As as unknown as MixinCtor<TBase, AsMethods>;\n}\n"
  },
  {
    "path": "packages/openapi-ts/src/ts-dsl/mixins/decorator.ts",
    "content": "import type { AnalysisContext, Node, NodeName } from '@hey-api/codegen-core';\nimport type ts from 'typescript';\n\nimport type { MaybeTsDsl } from '../base';\nimport { DecoratorTsDsl } from '../decl/decorator';\nimport type { BaseCtor, MixinCtor } from './types';\n\nexport interface DecoratorMethods extends Node {\n  /** Renders the decorators into an array of `ts.Decorator`s. */\n  $decorators(): ReadonlyArray<ts.Decorator>;\n  /** Adds a decorator (e.g. `@sealed({ in: 'root' })`). */\n  decorator(\n    name: NodeName | MaybeTsDsl<ts.Expression>,\n    ...args: ReadonlyArray<string | MaybeTsDsl<ts.Expression>>\n  ): this;\n}\n\nexport function DecoratorMixin<T extends ts.Node, TBase extends BaseCtor<T>>(Base: TBase) {\n  abstract class Decorator extends Base {\n    protected decorators: Array<DecoratorTsDsl> = [];\n\n    override analyze(ctx: AnalysisContext): void {\n      super.analyze(ctx);\n      for (const decorator of this.decorators) {\n        ctx.analyze(decorator);\n      }\n    }\n\n    protected decorator(\n      name: NodeName,\n      ...args: ReadonlyArray<string | MaybeTsDsl<ts.Expression>>\n    ): this {\n      this.decorators.push(new DecoratorTsDsl(name, ...args));\n      return this;\n    }\n\n    protected $decorators(): ReadonlyArray<ts.Decorator> {\n      return this.$node(this.decorators);\n    }\n  }\n\n  return Decorator as unknown as MixinCtor<TBase, DecoratorMethods>;\n}\n"
  },
  {
    "path": "packages/openapi-ts/src/ts-dsl/mixins/do.ts",
    "content": "import type { AnalysisContext, Node } from '@hey-api/codegen-core';\nimport type ts from 'typescript';\n\nimport type { MaybeTsDsl } from '../base';\nimport { StmtTsDsl } from '../stmt/stmt';\nimport type { BaseCtor, MixinCtor } from './types';\n\nexport type DoExpr = MaybeTsDsl<ts.Expression | ts.Statement>;\n\nexport interface DoMethods extends Node {\n  /** Renders the collected `.do()` calls into an array of `Statement` nodes. */\n  $do(): ReadonlyArray<ts.Statement>;\n  _do: Array<DoExpr>;\n  /** Adds one or more expressions/statements to the body. */\n  do(...items: ReadonlyArray<DoExpr>): this;\n}\n\n/**\n * Adds `.do()` for appending statements or expressions to a body.\n */\nexport function DoMixin<T extends ts.Node, TBase extends BaseCtor<T>>(Base: TBase) {\n  abstract class Do extends Base {\n    protected _do: Array<DoExpr> = [];\n\n    override analyze(ctx: AnalysisContext): void {\n      super.analyze(ctx);\n      ctx.pushScope();\n      try {\n        for (const item of this._do) {\n          ctx.analyze(item);\n        }\n      } finally {\n        ctx.popScope();\n      }\n    }\n\n    protected do(...items: ReadonlyArray<DoExpr>): this {\n      this._do.push(...items);\n      return this;\n    }\n\n    protected $do(): ReadonlyArray<ts.Statement> {\n      return this.$node(this._do.map((item) => new StmtTsDsl(item)));\n    }\n  }\n\n  return Do as unknown as MixinCtor<TBase, DoMethods>;\n}\n"
  },
  {
    "path": "packages/openapi-ts/src/ts-dsl/mixins/doc.ts",
    "content": "import type { AnalysisContext, Node } from '@hey-api/codegen-core';\nimport type ts from 'typescript';\n\nimport type { DocFn, DocLines } from '../layout/doc';\nimport { DocTsDsl } from '../layout/doc';\nimport type { BaseCtor, MixinCtor } from './types';\n\nexport interface DocMethods extends Node {\n  $docs<T extends ts.Node>(node: T): T;\n  doc(lines?: DocLines, fn?: DocFn): this;\n}\n\nexport function DocMixin<T extends ts.Node, TBase extends BaseCtor<T>>(Base: TBase) {\n  abstract class Doc extends Base {\n    private _doc?: DocTsDsl;\n\n    override analyze(ctx: AnalysisContext): void {\n      super.analyze(ctx);\n    }\n\n    protected doc(lines?: DocLines, fn?: DocFn): this {\n      this._doc = new DocTsDsl(lines, fn);\n      return this;\n    }\n\n    protected $docs<T extends ts.Node>(node: T): T {\n      return this._doc ? this._doc.apply(node) : node;\n    }\n  }\n\n  return Doc as unknown as MixinCtor<TBase, DocMethods>;\n}\n"
  },
  {
    "path": "packages/openapi-ts/src/ts-dsl/mixins/expr.ts",
    "content": "import type { AnalysisContext, Node } from '@hey-api/codegen-core';\nimport type ts from 'typescript';\n\nimport { f } from '../utils/factories';\nimport type { BaseCtor, DropFirst, MixinCtor } from './types';\n\nexport interface ExprMethods extends Node {\n  /** Accesses a property on the current expression (e.g. `this.foo`). */\n  attr(...args: DropFirst<Parameters<typeof f.attr>>): ReturnType<typeof f.attr>;\n  /** Awaits the current expression (e.g. `await expr`). */\n  await(): ReturnType<typeof f.await>;\n  /** Calls the current expression (e.g. `fn(arg1, arg2)`). */\n  call(...args: DropFirst<Parameters<typeof f.call>>): ReturnType<typeof f.call>;\n  /** Produces a `return` statement returning the current expression. */\n  return(): ReturnType<typeof f.return>;\n}\n\nexport function ExprMixin<T extends ts.Expression, TBase extends BaseCtor<T>>(Base: TBase) {\n  abstract class Expr extends Base {\n    override analyze(ctx: AnalysisContext): void {\n      super.analyze(ctx);\n    }\n\n    protected attr(...args: DropFirst<Parameters<typeof f.attr>>): ReturnType<typeof f.attr> {\n      return f.attr(this, ...args);\n    }\n\n    protected await(): ReturnType<typeof f.await> {\n      return f.await(this);\n    }\n\n    protected call(...args: DropFirst<Parameters<typeof f.call>>): ReturnType<typeof f.call> {\n      return f.call(this, ...args);\n    }\n\n    protected return(): ReturnType<typeof f.return> {\n      return f.return(this);\n    }\n  }\n\n  return Expr as unknown as MixinCtor<TBase, ExprMethods>;\n}\n"
  },
  {
    "path": "packages/openapi-ts/src/ts-dsl/mixins/hint.ts",
    "content": "import type { AnalysisContext, Node } from '@hey-api/codegen-core';\nimport type ts from 'typescript';\n\nimport type { HintFn, HintLines } from '../layout/hint';\nimport { HintTsDsl } from '../layout/hint';\nimport type { BaseCtor, MixinCtor } from './types';\n\nexport interface HintMethods extends Node {\n  $hint<T extends ts.Node>(node: T): T;\n  hint(lines?: HintLines, fn?: HintFn): this;\n}\n\nexport function HintMixin<T extends ts.Node, TBase extends BaseCtor<T>>(Base: TBase) {\n  abstract class Hint extends Base {\n    private _hint?: HintTsDsl;\n\n    override analyze(ctx: AnalysisContext): void {\n      super.analyze(ctx);\n    }\n\n    protected hint(lines?: HintLines, fn?: HintFn): this {\n      this._hint = new HintTsDsl(lines, fn);\n      return this;\n    }\n\n    protected $hint<T extends ts.Node>(node: T): T {\n      return this._hint ? this._hint.apply(node) : node;\n    }\n  }\n\n  return Hint as unknown as MixinCtor<TBase, HintMethods>;\n}\n"
  },
  {
    "path": "packages/openapi-ts/src/ts-dsl/mixins/layout.ts",
    "content": "import type { AnalysisContext, Node } from '@hey-api/codegen-core';\nimport type ts from 'typescript';\n\nimport type { BaseCtor, MixinCtor } from './types';\n\nexport interface LayoutMethods extends Node {\n  /** Computes whether output should be multiline based on layout setting and element count. */\n  $multiline(count: number): boolean;\n  /** Sets automatic line output with optional threshold (default: 3). */\n  auto(threshold?: number): this;\n  /** Sets single line output. */\n  inline(): this;\n  /** Sets multi line output. */\n  pretty(): this;\n}\n\nexport function LayoutMixin<T extends ts.Node, TBase extends BaseCtor<T>>(Base: TBase) {\n  abstract class Layout extends Base {\n    protected static readonly DEFAULT_THRESHOLD = 3;\n    protected layout: boolean | number | undefined;\n\n    override analyze(ctx: AnalysisContext): void {\n      super.analyze(ctx);\n    }\n\n    protected auto(threshold: number = Layout.DEFAULT_THRESHOLD): this {\n      this.layout = threshold;\n      return this;\n    }\n\n    protected inline(): this {\n      this.layout = false;\n      return this;\n    }\n\n    protected pretty(): this {\n      this.layout = true;\n      return this;\n    }\n\n    protected $multiline(count: number): boolean {\n      if (this.layout === undefined) {\n        this.layout = Layout.DEFAULT_THRESHOLD;\n      }\n      if (count === 0) return false;\n      return typeof this.layout === 'number' ? count >= this.layout : this.layout;\n    }\n  }\n\n  return Layout as unknown as MixinCtor<TBase, LayoutMethods>;\n}\n"
  },
  {
    "path": "packages/openapi-ts/src/ts-dsl/mixins/modifiers.ts",
    "content": "import type { AnalysisContext } from '@hey-api/codegen-core';\nimport ts from 'typescript';\n\nimport type { BaseCtor, MixinCtor } from './types';\n\nexport type Modifiers = {\n  /**\n   * Checks if the specified modifier is present.\n   *\n   * @param modifier - The modifier to check.\n   * @returns True if the modifier is present, false otherwise.\n   */\n  hasModifier(modifier: Modifier): boolean;\n  modifiers: Array<ts.Modifier>;\n};\n\ntype Modifier =\n  | 'abstract'\n  | 'async'\n  | 'const'\n  | 'declare'\n  | 'default'\n  | 'export'\n  | 'override'\n  | 'private'\n  | 'protected'\n  | 'public'\n  | 'readonly'\n  | 'static';\n\nexport interface ModifierMethods extends Modifiers {\n  /**\n   * Adds a modifier of the specified kind to the modifiers list if the condition is true.\n   *\n   * @param modifier - The modifier to add.\n   * @param condition - Whether to add the modifier.\n   * @returns The parent node for chaining.\n   */\n  _m(modifier: Modifier, condition: boolean): this;\n}\n\nfunction modifierToKind(modifier: Modifier): ts.ModifierSyntaxKind {\n  switch (modifier) {\n    case 'abstract':\n      return ts.SyntaxKind.AbstractKeyword;\n    case 'async':\n      return ts.SyntaxKind.AsyncKeyword;\n    case 'const':\n      return ts.SyntaxKind.ConstKeyword;\n    case 'declare':\n      return ts.SyntaxKind.DeclareKeyword;\n    case 'default':\n      return ts.SyntaxKind.DefaultKeyword;\n    case 'export':\n      return ts.SyntaxKind.ExportKeyword;\n    case 'override':\n      return ts.SyntaxKind.OverrideKeyword;\n    case 'private':\n      return ts.SyntaxKind.PrivateKeyword;\n    case 'protected':\n      return ts.SyntaxKind.ProtectedKeyword;\n    case 'public':\n      return ts.SyntaxKind.PublicKeyword;\n    case 'readonly':\n      return ts.SyntaxKind.ReadonlyKeyword;\n    case 'static':\n      return ts.SyntaxKind.StaticKeyword;\n  }\n}\n\nfunction ModifiersMixin<T extends ts.Node, TBase extends BaseCtor<T>>(Base: TBase) {\n  abstract class Modifiers extends Base {\n    protected modifiers: Array<ts.Modifier> = [];\n\n    override analyze(ctx: AnalysisContext): void {\n      super.analyze(ctx);\n    }\n\n    protected hasModifier(modifier: Modifier): boolean {\n      const kind = modifierToKind(modifier);\n      return Boolean(this.modifiers.find((mod) => mod.kind === kind));\n    }\n\n    protected _m(modifier: Modifier, condition: boolean): this {\n      if (condition) {\n        const kind = modifierToKind(modifier);\n        this.modifiers.push(ts.factory.createModifier(kind));\n      }\n      return this;\n    }\n  }\n\n  return Modifiers as unknown as MixinCtor<TBase, ModifierMethods>;\n}\n\nexport interface AbstractMethods extends Modifiers {\n  /**\n   * Adds the `abstract` keyword modifier if the condition is true.\n   *\n   * @param condition - Whether to add the modifier (default: true).\n   * @returns The target object for chaining.\n   */\n  abstract(condition?: boolean): this;\n}\n\n/**\n * Mixin that adds an `abstract` modifier to a node.\n */\nexport function AbstractMixin<T extends ts.Node, TBase extends BaseCtor<T>>(Base: TBase) {\n  const Mixed = ModifiersMixin(Base as BaseCtor<T>);\n\n  abstract class Abstract extends Mixed {\n    protected abstract(condition?: boolean): this {\n      const cond = arguments.length === 0 ? true : Boolean(condition);\n      return this._m('abstract', cond);\n    }\n  }\n\n  return Abstract as unknown as MixinCtor<TBase, AbstractMethods>;\n}\n\nexport interface AsyncMethods extends Modifiers {\n  /**\n   * Adds the `async` keyword modifier if the condition is true.\n   *\n   * @param condition - Whether to add the modifier (default: true).\n   * @returns The target object for chaining.\n   */\n  async(condition?: boolean): this;\n}\n\n/**\n * Mixin that adds an `async` modifier to a node.\n */\nexport function AsyncMixin<T extends ts.Node, TBase extends BaseCtor<T>>(Base: TBase) {\n  const Mixed = ModifiersMixin(Base as BaseCtor<T>);\n\n  abstract class Async extends Mixed {\n    protected async(condition?: boolean): this {\n      const cond = arguments.length === 0 ? true : Boolean(condition);\n      return this._m('async', cond);\n    }\n  }\n\n  return Async as unknown as MixinCtor<TBase, AsyncMethods>;\n}\n\nexport interface ConstMethods extends Modifiers {\n  /**\n   * Adds the `const` keyword modifier if the condition is true.\n   *\n   * @param condition - Whether to add the modifier (default: true).\n   * @returns The target object for chaining.\n   */\n  const(condition?: boolean): this;\n}\n\n/**\n * Mixin that adds a `const` modifier to a node.\n */\nexport function ConstMixin<T extends ts.Node, TBase extends BaseCtor<T>>(Base: TBase) {\n  const Mixed = ModifiersMixin(Base as BaseCtor<T>);\n\n  abstract class Const extends Mixed {\n    protected const(condition?: boolean): this {\n      const cond = arguments.length === 0 ? true : Boolean(condition);\n      return this._m('const', cond);\n    }\n  }\n\n  return Const as unknown as MixinCtor<TBase, ConstMethods>;\n}\n\nexport interface DeclareMethods extends Modifiers {\n  /**\n   * Adds the `declare` keyword modifier if the condition is true.\n   *\n   * @param condition - Whether to add the modifier (default: true).\n   * @returns The target object for chaining.\n   */\n  declare(condition?: boolean): this;\n}\n\n/**\n * Mixin that adds a `declare` modifier to a node.\n */\nexport function DeclareMixin<T extends ts.Node, TBase extends BaseCtor<T>>(Base: TBase) {\n  const Mixed = ModifiersMixin(Base as BaseCtor<T>);\n\n  abstract class Declare extends Mixed {\n    protected declare(condition?: boolean): this {\n      const cond = arguments.length === 0 ? true : Boolean(condition);\n      return this._m('declare', cond);\n    }\n  }\n\n  return Declare as unknown as MixinCtor<TBase, DeclareMethods>;\n}\n\nexport interface DefaultMethods extends Modifiers {\n  /**\n   * Adds the `default` keyword modifier if the condition is true.\n   *\n   * @param condition - Whether to add the modifier (default: true).\n   * @returns The target object for chaining.\n   */\n  default(condition?: boolean): this;\n}\n\n/**\n * Mixin that adds a `default` modifier to a node.\n */\nexport function DefaultMixin<T extends ts.Node, TBase extends BaseCtor<T>>(Base: TBase) {\n  const Mixed = ModifiersMixin(Base as BaseCtor<T>);\n\n  abstract class Default extends Mixed {\n    /**\n     * Adds the `default` keyword modifier if the condition is true.\n     *\n     * @param condition - Whether to add the modifier (default: true).\n     * @returns The target object for chaining.\n     */\n    protected default(condition?: boolean): this {\n      const cond = arguments.length === 0 ? true : Boolean(condition);\n      return this._m('default', cond);\n    }\n  }\n\n  return Default as unknown as MixinCtor<TBase, DefaultMethods>;\n}\n\nexport interface ExportMethods extends Modifiers {\n  /**\n   * Adds the `export` keyword modifier if the condition is true.\n   *\n   * @param condition - Whether to add the modifier (default: true).\n   * @returns The target object for chaining.\n   */\n  export(condition?: boolean): this;\n}\n\n/**\n * Mixin that adds an `export` modifier to a node.\n */\nexport function ExportMixin<T extends ts.Node, TBase extends BaseCtor<T>>(Base: TBase) {\n  const Mixed = ModifiersMixin(Base as BaseCtor<T>);\n\n  abstract class Export extends Mixed {\n    /**\n     * Adds the `export` keyword modifier if the condition is true.\n     *\n     * @param condition - Whether to add the modifier (default: true).\n     * @returns The target object for chaining.\n     */\n    protected export(condition?: boolean): this {\n      const cond = arguments.length === 0 ? true : Boolean(condition);\n      this.exported = cond;\n      // TODO: remove this side-effect once planner handles exported flag\n      if (this.symbol) this.symbol.setExported(cond);\n      return this._m('export', cond);\n    }\n  }\n\n  return Export as unknown as MixinCtor<TBase, ExportMethods>;\n}\n\nexport interface OverrideMethods extends Modifiers {\n  /**\n   * Adds the `override` keyword modifier if the condition is true.\n   *\n   * @param condition - Whether to add the modifier (default: true).\n   * @returns The target object for chaining.\n   */\n  override(condition?: boolean): this;\n}\n\n/**\n * Mixin that adds an `override` modifier to a node.\n */\nexport function OverrideMixin<T extends ts.Node, TBase extends BaseCtor<T>>(Base: TBase) {\n  const Mixed = ModifiersMixin(Base as BaseCtor<T>);\n\n  abstract class Override extends Mixed {\n    protected override(condition?: boolean): this {\n      const cond = arguments.length === 0 ? true : Boolean(condition);\n      return this._m('override', cond);\n    }\n  }\n\n  return Override as unknown as MixinCtor<TBase, OverrideMethods>;\n}\n\nexport interface PrivateMethods extends Modifiers {\n  /**\n   * Adds the `private` keyword modifier if the condition is true.\n   *\n   * @param condition - Whether to add the modifier (default: true).\n   * @returns The target object for chaining.\n   */\n  private(condition?: boolean): this;\n}\n\n/**\n * Mixin that adds a `private` modifier to a node.\n */\nexport function PrivateMixin<T extends ts.Node, TBase extends BaseCtor<T>>(Base: TBase) {\n  const Mixed = ModifiersMixin(Base as BaseCtor<T>);\n\n  abstract class Private extends Mixed {\n    protected private(condition?: boolean): this {\n      const cond = arguments.length === 0 ? true : Boolean(condition);\n      return this._m('private', cond);\n    }\n  }\n\n  return Private as unknown as MixinCtor<TBase, PrivateMethods>;\n}\n\nexport interface ProtectedMethods extends Modifiers {\n  /**\n   * Adds the `protected` keyword modifier if the condition is true.\n   *\n   * @param condition - Whether to add the modifier (default: true).\n   * @returns The target object for chaining.\n   */\n  protected(condition?: boolean): this;\n}\n\n/**\n * Mixin that adds a `protected` modifier to a node.\n */\nexport function ProtectedMixin<T extends ts.Node, TBase extends BaseCtor<T>>(Base: TBase) {\n  const Mixed = ModifiersMixin(Base as BaseCtor<T>);\n\n  abstract class Protected extends Mixed {\n    protected protected(condition?: boolean): this {\n      const cond = arguments.length === 0 ? true : Boolean(condition);\n      return this._m('protected', cond);\n    }\n  }\n\n  return Protected as unknown as MixinCtor<TBase, ProtectedMethods>;\n}\n\nexport interface PublicMethods extends Modifiers {\n  /**\n   * Adds the `public` keyword modifier if the condition is true.\n   *\n   * @param condition - Whether to add the modifier (default: true).\n   * @returns The target object for chaining.\n   */\n  public(condition?: boolean): this;\n}\n\n/**\n * Mixin that adds a `public` modifier to a node.\n */\nexport function PublicMixin<T extends ts.Node, TBase extends BaseCtor<T>>(Base: TBase) {\n  const Mixed = ModifiersMixin(Base as BaseCtor<T>);\n\n  abstract class Public extends Mixed {\n    protected public(condition?: boolean): this {\n      const cond = arguments.length === 0 ? true : Boolean(condition);\n      return this._m('public', cond);\n    }\n  }\n\n  return Public as unknown as MixinCtor<TBase, PublicMethods>;\n}\n\nexport interface ReadonlyMethods extends Modifiers {\n  /**\n   * Adds the `readonly` keyword modifier if the condition is true.\n   *\n   * @param condition - Whether to add the modifier (default: true).\n   * @returns The target object for chaining.\n   */\n  readonly(condition?: boolean): this;\n}\n\n/**\n * Mixin that adds a `readonly` modifier to a node.\n */\nexport function ReadonlyMixin<T extends ts.Node, TBase extends BaseCtor<T>>(Base: TBase) {\n  const Mixed = ModifiersMixin(Base as BaseCtor<T>);\n\n  abstract class Readonly extends Mixed {\n    protected readonly(condition?: boolean): this {\n      const cond = arguments.length === 0 ? true : Boolean(condition);\n      return this._m('readonly', cond);\n    }\n  }\n\n  return Readonly as unknown as MixinCtor<TBase, ReadonlyMethods>;\n}\n\nexport interface StaticMethods extends Modifiers {\n  /**\n   * Adds the `static` keyword modifier if the condition is true.\n   *\n   * @param condition - Whether to add the modifier (default: true).\n   * @returns The target object for chaining.\n   */\n  static(condition?: boolean): this;\n}\n\n/**\n * Mixin that adds a `static` modifier to a node.\n */\nexport function StaticMixin<T extends ts.Node, TBase extends BaseCtor<T>>(Base: TBase) {\n  const Mixed = ModifiersMixin(Base as BaseCtor<T>);\n\n  abstract class Static extends Mixed {\n    protected static(condition?: boolean): this {\n      const cond = arguments.length === 0 ? true : Boolean(condition);\n      return this._m('static', cond);\n    }\n  }\n\n  return Static as unknown as MixinCtor<TBase, StaticMethods>;\n}\n"
  },
  {
    "path": "packages/openapi-ts/src/ts-dsl/mixins/note.ts",
    "content": "import type { AnalysisContext, Node } from '@hey-api/codegen-core';\nimport type ts from 'typescript';\n\nimport type { NoteFn, NoteLines } from '../layout/note';\nimport { NoteTsDsl } from '../layout/note';\nimport type { BaseCtor, MixinCtor } from './types';\n\nexport interface NoteMethods extends Node {\n  $note<T extends ts.Node>(node: T): T;\n  note(lines?: NoteLines, fn?: NoteFn): this;\n}\n\nexport function NoteMixin<T extends ts.Node, TBase extends BaseCtor<T>>(Base: TBase) {\n  abstract class Note extends Base {\n    private _note?: NoteTsDsl;\n\n    override analyze(ctx: AnalysisContext): void {\n      super.analyze(ctx);\n    }\n\n    protected note(lines?: NoteLines, fn?: NoteFn): this {\n      this._note = new NoteTsDsl(lines, fn);\n      return this;\n    }\n\n    protected $note<T extends ts.Node>(node: T): T {\n      return this._note ? this._note.apply(node) : node;\n    }\n  }\n\n  return Note as unknown as MixinCtor<TBase, NoteMethods>;\n}\n"
  },
  {
    "path": "packages/openapi-ts/src/ts-dsl/mixins/operator.ts",
    "content": "import type { AnalysisContext, Node, NodeName } from '@hey-api/codegen-core';\nimport type ts from 'typescript';\n\nimport type { MaybeTsDsl } from '../base';\nimport { BinaryTsDsl } from '../expr/binary';\nimport type { BaseCtor, MixinCtor } from './types';\n\ntype Expr = NodeName | MaybeTsDsl<ts.Expression>;\n\nexport interface OperatorMethods extends Node {\n  /** Logical AND — `this && expr` */\n  and(expr: Expr): BinaryTsDsl;\n  /** Creates an assignment expression (e.g. `this = expr`). */\n  assign(expr: Expr): BinaryTsDsl;\n  /** Nullish coalescing — `this ?? expr` */\n  coalesce(expr: Expr): BinaryTsDsl;\n  /** Division — `this / expr` */\n  div(expr: Expr): BinaryTsDsl;\n  /** Strict equality — `this === expr` */\n  eq(expr: Expr): BinaryTsDsl;\n  /** Greater than — `this > expr` */\n  gt(expr: Expr): BinaryTsDsl;\n  /** Greater than or equal — `this >= expr` */\n  gte(expr: Expr): BinaryTsDsl;\n  /** Loose equality — `this == expr` */\n  looseEq(expr: Expr): BinaryTsDsl;\n  /** Loose inequality — `this != expr` */\n  looseNeq(expr: Expr): BinaryTsDsl;\n  /** Less than — `this < expr` */\n  lt(expr: Expr): BinaryTsDsl;\n  /** Less than or equal — `this <= expr` */\n  lte(expr: Expr): BinaryTsDsl;\n  /** Subtraction — `this - expr` */\n  minus(expr: Expr): BinaryTsDsl;\n  /** Strict inequality — `this !== expr` */\n  neq(expr: Expr): BinaryTsDsl;\n  /** Nullish assignment — `this ??= expr` */\n  nullishAssign(expr: Expr): BinaryTsDsl;\n  /** Logical OR — `this || expr` */\n  or(expr: Expr): BinaryTsDsl;\n  /** Addition — `this + expr` */\n  plus(expr: Expr): BinaryTsDsl;\n  /** Multiplication — `this * expr` */\n  times(expr: Expr): BinaryTsDsl;\n}\n\nexport function OperatorMixin<T extends ts.Expression, TBase extends BaseCtor<T>>(Base: TBase) {\n  abstract class Operator extends Base {\n    override analyze(ctx: AnalysisContext): void {\n      super.analyze(ctx);\n    }\n\n    protected and(expr: Expr): BinaryTsDsl {\n      return new BinaryTsDsl(this).and(expr);\n    }\n\n    protected assign(expr: Expr): BinaryTsDsl {\n      return new BinaryTsDsl(this, '=', expr);\n    }\n\n    protected coalesce(expr: Expr): BinaryTsDsl {\n      return new BinaryTsDsl(this).coalesce(expr);\n    }\n\n    protected div(expr: Expr): BinaryTsDsl {\n      return new BinaryTsDsl(this).div(expr);\n    }\n\n    protected eq(expr: Expr): BinaryTsDsl {\n      return new BinaryTsDsl(this).eq(expr);\n    }\n\n    protected gt(expr: Expr): BinaryTsDsl {\n      return new BinaryTsDsl(this).gt(expr);\n    }\n\n    protected gte(expr: Expr): BinaryTsDsl {\n      return new BinaryTsDsl(this).gte(expr);\n    }\n\n    protected looseEq(expr: Expr): BinaryTsDsl {\n      return new BinaryTsDsl(this).looseEq(expr);\n    }\n\n    protected looseNeq(expr: Expr): BinaryTsDsl {\n      return new BinaryTsDsl(this).looseNeq(expr);\n    }\n\n    protected lt(expr: Expr): BinaryTsDsl {\n      return new BinaryTsDsl(this).lt(expr);\n    }\n\n    protected lte(expr: Expr): BinaryTsDsl {\n      return new BinaryTsDsl(this).lte(expr);\n    }\n\n    protected minus(expr: Expr): BinaryTsDsl {\n      return new BinaryTsDsl(this).minus(expr);\n    }\n\n    protected neq(expr: Expr): BinaryTsDsl {\n      return new BinaryTsDsl(this).neq(expr);\n    }\n\n    protected nullishAssign(expr: Expr): BinaryTsDsl {\n      return new BinaryTsDsl(this).nullishAssign(expr);\n    }\n\n    protected or(expr: Expr): BinaryTsDsl {\n      return new BinaryTsDsl(this).or(expr);\n    }\n\n    protected plus(expr: Expr): BinaryTsDsl {\n      return new BinaryTsDsl(this).plus(expr);\n    }\n\n    protected times(expr: Expr): BinaryTsDsl {\n      return new BinaryTsDsl(this).times(expr);\n    }\n  }\n\n  return Operator as unknown as MixinCtor<TBase, OperatorMethods>;\n}\n"
  },
  {
    "path": "packages/openapi-ts/src/ts-dsl/mixins/optional.ts",
    "content": "import type { AnalysisContext, Node } from '@hey-api/codegen-core';\nimport type ts from 'typescript';\n\nimport type { BaseCtor, MixinCtor } from './types';\n\nexport interface OptionalMethods extends Node {\n  _optional?: boolean;\n  /** Marks the node as optional when the condition is true. */\n  optional(condition?: boolean): this;\n  /** Marks the node as required when the condition is true. */\n  required(condition?: boolean): this;\n}\n\nexport function OptionalMixin<T extends ts.Node, TBase extends BaseCtor<T>>(Base: TBase) {\n  abstract class Optional extends Base {\n    protected _optional?: boolean;\n\n    override analyze(ctx: AnalysisContext): void {\n      super.analyze(ctx);\n    }\n\n    protected optional(condition?: boolean): this {\n      this._optional = arguments.length === 0 ? true : Boolean(condition);\n      return this;\n    }\n\n    protected required(condition?: boolean): this {\n      this._optional = arguments.length === 0 ? false : !condition;\n      return this;\n    }\n  }\n\n  return Optional as unknown as MixinCtor<TBase, OptionalMethods>;\n}\n"
  },
  {
    "path": "packages/openapi-ts/src/ts-dsl/mixins/param.ts",
    "content": "import type { AnalysisContext, Node } from '@hey-api/codegen-core';\nimport type ts from 'typescript';\n\nimport type { MaybeTsDsl } from '../base';\nimport type { ParamCtor, ParamFn, ParamName } from '../decl/param';\nimport { ParamTsDsl } from '../decl/param';\nimport type { BaseCtor, MixinCtor } from './types';\n\nexport interface ParamMethods extends Node {\n  /** Renders the parameters into an array of `ParameterDeclaration`s. */\n  $params(): ReadonlyArray<ts.ParameterDeclaration>;\n  /** Adds a parameter. */\n  param(...args: Parameters<ParamCtor>): this;\n  /** Adds multiple parameters. */\n  params(...params: ReadonlyArray<MaybeTsDsl<ts.ParameterDeclaration>>): this;\n}\n\nexport function ParamMixin<T extends ts.Node, TBase extends BaseCtor<T>>(Base: TBase) {\n  abstract class Param extends Base {\n    protected _params: Array<MaybeTsDsl<ts.ParameterDeclaration>> = [];\n\n    override analyze(ctx: AnalysisContext): void {\n      super.analyze(ctx);\n      for (const param of this._params) {\n        ctx.analyze(param);\n      }\n    }\n\n    protected param(name: ParamName, fn?: ParamFn): this {\n      const p = new ParamTsDsl(name, fn);\n      this._params.push(p);\n      return this;\n    }\n\n    protected params(...params: ReadonlyArray<MaybeTsDsl<ts.ParameterDeclaration>>): this {\n      this._params.push(...params);\n      return this;\n    }\n\n    protected $params(): ReadonlyArray<ts.ParameterDeclaration> {\n      return this.$node(this._params);\n    }\n  }\n\n  return Param as unknown as MixinCtor<TBase, ParamMethods>;\n}\n"
  },
  {
    "path": "packages/openapi-ts/src/ts-dsl/mixins/pattern.ts",
    "content": "import type { AnalysisContext, Node } from '@hey-api/codegen-core';\nimport type { MaybeArray } from '@hey-api/types';\nimport type ts from 'typescript';\n\nimport { PatternTsDsl } from '../decl/pattern';\nimport type { BaseCtor, MixinCtor } from './types';\n\nexport interface PatternMethods extends Node {\n  /** Renders the pattern into a `BindingName`. */\n  $pattern(): ts.BindingName | undefined;\n  /** Defines an array binding pattern. */\n  array(...props: ReadonlyArray<string> | [ReadonlyArray<string>]): this;\n  /** Defines an object binding pattern. */\n  object(...props: ReadonlyArray<MaybeArray<string> | Record<string, string>>): this;\n  /** Adds a spread element (e.g. `...args`, `...options`) to the pattern. */\n  spread(name: string): this;\n}\n\n/**\n * Mixin providing `.array()`, `.object()`, and `.spread()` methods for defining destructuring patterns.\n */\nexport function PatternMixin<T extends ts.Node, TBase extends BaseCtor<T>>(Base: TBase) {\n  abstract class Pattern extends Base {\n    protected pattern?: PatternTsDsl;\n\n    override analyze(ctx: AnalysisContext): void {\n      super.analyze(ctx);\n      ctx.analyze(this.pattern);\n    }\n\n    protected array(...props: ReadonlyArray<string> | [ReadonlyArray<string>]): this {\n      (this.pattern ??= new PatternTsDsl()).array(...props);\n      return this;\n    }\n\n    protected object(...props: ReadonlyArray<MaybeArray<string> | Record<string, string>>): this {\n      (this.pattern ??= new PatternTsDsl()).object(...props);\n      return this;\n    }\n\n    /** Adds a spread element (e.g. `...args`, `...options`) to the pattern. */\n    protected spread(name: string): this {\n      (this.pattern ??= new PatternTsDsl()).spread(name);\n      return this;\n    }\n\n    /** Renders the pattern into a `BindingName`. */\n    protected $pattern(): ts.BindingName | undefined {\n      if (!this.pattern) return;\n      return this.$node(this.pattern);\n    }\n  }\n\n  return Pattern as unknown as MixinCtor<TBase, PatternMethods>;\n}\n"
  },
  {
    "path": "packages/openapi-ts/src/ts-dsl/mixins/type-args.ts",
    "content": "import type { AnalysisContext, Node, NodeName, Ref } from '@hey-api/codegen-core';\nimport { ref } from '@hey-api/codegen-core';\nimport type ts from 'typescript';\n\nimport type { MaybeTsDsl, TypeTsDsl } from '../base';\nimport type { BaseCtor, MixinCtor } from './types';\n\ntype Arg = NodeName | MaybeTsDsl<TypeTsDsl>;\n\nexport interface TypeArgsMethods extends Node {\n  /** Returns the type arguments as an array of ts.TypeNode nodes. */\n  $generics(): ReadonlyArray<ts.TypeNode> | undefined;\n  /** Adds a single type argument (e.g. `string` in `Foo<string>`). */\n  generic(arg: Arg): this;\n  /** Adds type arguments (e.g. `Map<string, number>`). */\n  generics(...args: ReadonlyArray<Arg>): this;\n}\n\nexport function TypeArgsMixin<T extends ts.Node, TBase extends BaseCtor<T>>(Base: TBase) {\n  abstract class TypeArgs extends Base {\n    protected _generics: Array<Ref<Arg>> = [];\n\n    override analyze(ctx: AnalysisContext): void {\n      super.analyze(ctx);\n      for (const g of this._generics) {\n        ctx.analyze(g);\n      }\n    }\n\n    protected generic(arg: Arg): this {\n      this._generics.push(ref(arg));\n      return this;\n    }\n\n    protected generics(...args: ReadonlyArray<Arg>): this {\n      this._generics.push(...args.map((a) => ref(a)));\n      return this;\n    }\n\n    protected $generics(): ReadonlyArray<ts.TypeNode> | undefined {\n      return this.$type(this._generics);\n    }\n  }\n\n  return TypeArgs as unknown as MixinCtor<TBase, TypeArgsMethods>;\n}\n"
  },
  {
    "path": "packages/openapi-ts/src/ts-dsl/mixins/type-expr.ts",
    "content": "import type { AnalysisContext, Node } from '@hey-api/codegen-core';\nimport type ts from 'typescript';\n\nimport type { MaybeTsDsl, TypeTsDsl } from '../base';\nimport { f } from '../utils/factories';\nimport type { BaseCtor, DropFirst, MixinCtor } from './types';\n\nexport interface TypeExprMethods extends Node {\n  /** Creates an indexed-access type (e.g. `Foo<T>[K]`). */\n  idx(\n    this: Parameters<typeof f.type.idx>[0],\n    ...args: DropFirst<Parameters<typeof f.type.idx>>\n  ): ReturnType<typeof f.type.idx>;\n  /** Shorthand: builds `keyof T`. */\n  keyof(this: MaybeTsDsl<TypeTsDsl>): ReturnType<typeof f.type.operator>;\n  /** Shorthand: builds `readonly T`. */\n  readonly(this: MaybeTsDsl<TypeTsDsl>): ReturnType<typeof f.type.operator>;\n  /** Create a TypeExpr node representing ReturnType<this>. */\n  returnType(\n    this: Parameters<typeof f.type.query>[0],\n    ...args: DropFirst<Parameters<typeof f.type.query>>\n  ): ReturnType<typeof f.type.expr>;\n  /** Create a TypeOfExpr node representing typeof this. */\n  typeofExpr(\n    this: Parameters<typeof f.typeofExpr>[0],\n    ...args: DropFirst<Parameters<typeof f.typeofExpr>>\n  ): ReturnType<typeof f.typeofExpr>;\n  /** Create a TypeQuery node representing typeof this. */\n  typeofType(\n    this: Parameters<typeof f.type.query>[0],\n    ...args: DropFirst<Parameters<typeof f.type.query>>\n  ): ReturnType<typeof f.type.query>;\n  /** Shorthand: builds `unique T`. */\n  unique(this: MaybeTsDsl<TypeTsDsl>): ReturnType<typeof f.type.operator>;\n}\n\nexport function TypeExprMixin<T extends ts.Node, TBase extends BaseCtor<T>>(Base: TBase) {\n  abstract class TypeExpr extends Base {\n    override analyze(ctx: AnalysisContext): void {\n      super.analyze(ctx);\n    }\n\n    protected idx(\n      this: Parameters<typeof f.type.idx>[0],\n      ...args: DropFirst<Parameters<typeof f.type.idx>>\n    ): ReturnType<typeof f.type.idx> {\n      return f.type.idx(this, ...args);\n    }\n\n    protected keyof(this: TypeTsDsl): ReturnType<typeof f.type.operator> {\n      return f.type.operator().keyof(this);\n    }\n\n    protected readonly(this: TypeTsDsl): ReturnType<typeof f.type.operator> {\n      return f.type.operator().readonly(this);\n    }\n\n    protected returnType(\n      this: Parameters<typeof f.type.query>[0],\n      ...args: DropFirst<Parameters<typeof f.type.query>>\n    ): ReturnType<typeof f.type.expr> {\n      return f.type.expr('ReturnType').generic(f.type.query(this, ...args));\n    }\n\n    protected typeofExpr(\n      this: Parameters<typeof f.typeofExpr>[0],\n      ...args: DropFirst<Parameters<typeof f.typeofExpr>>\n    ): ReturnType<typeof f.typeofExpr> {\n      return f.typeofExpr(this, ...args);\n    }\n\n    protected typeofType(\n      this: Parameters<typeof f.type.query>[0],\n      ...args: DropFirst<Parameters<typeof f.type.query>>\n    ): ReturnType<typeof f.type.query> {\n      return f.type.query(this, ...args);\n    }\n\n    protected unique(this: TypeTsDsl): ReturnType<typeof f.type.operator> {\n      return f.type.operator().unique(this);\n    }\n  }\n\n  return TypeExpr as unknown as MixinCtor<TBase, TypeExprMethods>;\n}\n"
  },
  {
    "path": "packages/openapi-ts/src/ts-dsl/mixins/type-params.ts",
    "content": "import type { AnalysisContext, Node, NodeName } from '@hey-api/codegen-core';\nimport { isRef, isSymbol } from '@hey-api/codegen-core';\nimport type ts from 'typescript';\n\nimport type { MaybeTsDsl } from '../base';\nimport { TypeParamTsDsl } from '../type/param';\nimport type { BaseCtor, MixinCtor } from './types';\n\nexport interface TypeParamsMethods extends Node {\n  /** Returns the type parameters as an array of ts.TypeParameterDeclaration nodes. */\n  $generics(): ReadonlyArray<ts.TypeParameterDeclaration> | undefined;\n  /** Adds a single type parameter (e.g. `T` in `Array<T>`). */\n  generic(...args: ConstructorParameters<typeof TypeParamTsDsl>): this;\n  /** Adds type parameters (e.g. `Map<string, T>`). */\n  generics(...args: ReadonlyArray<NodeName | MaybeTsDsl<TypeParamTsDsl>>): this;\n}\n\nexport function TypeParamsMixin<T extends ts.Node, TBase extends BaseCtor<T>>(Base: TBase) {\n  abstract class TypeParams extends Base {\n    protected _generics: Array<MaybeTsDsl<TypeParamTsDsl>> = [];\n\n    override analyze(ctx: AnalysisContext): void {\n      super.analyze(ctx);\n      for (const g of this._generics) {\n        ctx.analyze(g);\n      }\n    }\n\n    protected generic(...args: ConstructorParameters<typeof TypeParamTsDsl>): this {\n      const g = new TypeParamTsDsl(...args);\n      this._generics.push(g);\n      return this;\n    }\n\n    protected generics(...args: ReadonlyArray<NodeName | MaybeTsDsl<TypeParamTsDsl>>): this {\n      for (let arg of args) {\n        if (typeof arg === 'string' || typeof arg === 'number' || isSymbol(arg) || isRef(arg)) {\n          arg = new TypeParamTsDsl(arg);\n        }\n        this._generics.push(arg);\n      }\n      return this;\n    }\n\n    protected $generics(): ReadonlyArray<ts.TypeParameterDeclaration> | undefined {\n      return this.$node(this._generics);\n    }\n  }\n\n  return TypeParams as unknown as MixinCtor<TBase, TypeParamsMethods>;\n}\n"
  },
  {
    "path": "packages/openapi-ts/src/ts-dsl/mixins/type-returns.ts",
    "content": "import type { AnalysisContext, Node, NodeName } from '@hey-api/codegen-core';\nimport type ts from 'typescript';\n\nimport { TypeTsDsl } from '../base';\nimport { TypeExprTsDsl } from '../type/expr';\nimport type { BaseCtor, MixinCtor } from './types';\n\nexport interface TypeReturnsMethods extends Node {\n  /** Returns the return type node. */\n  $returns(): ts.TypeNode | undefined;\n  /** Sets the return type. */\n  returns(type: NodeName | TypeTsDsl): this;\n}\n\nexport function TypeReturnsMixin<T extends ts.Node, TBase extends BaseCtor<T>>(Base: TBase) {\n  abstract class TypeReturns extends Base {\n    protected _returns?: TypeTsDsl;\n\n    override analyze(ctx: AnalysisContext): void {\n      super.analyze(ctx);\n      ctx.analyze(this._returns);\n    }\n\n    protected returns(type: NodeName | TypeTsDsl): this {\n      this._returns = type instanceof TypeTsDsl ? type : new TypeExprTsDsl(type);\n      return this;\n    }\n\n    protected $returns(): ts.TypeNode | undefined {\n      return this.$type(this._returns);\n    }\n  }\n\n  return TypeReturns as unknown as MixinCtor<TBase, TypeReturnsMethods>;\n}\n"
  },
  {
    "path": "packages/openapi-ts/src/ts-dsl/mixins/types.ts",
    "content": "import type ts from 'typescript';\n\nimport type { TsDsl } from '../base';\n\nexport type BaseCtor<T extends ts.Node> = abstract new (...args: Array<any>) => TsDsl<T>;\n\nexport type DropFirst<T extends Array<any>> = T extends [any, ...infer Rest] ? Rest : never;\n\nexport type MixinCtor<T extends BaseCtor<any>, K> = abstract new (\n  ...args: Array<any>\n) => InstanceType<T> & K;\n"
  },
  {
    "path": "packages/openapi-ts/src/ts-dsl/mixins/value.ts",
    "content": "import type { AnalysisContext, Node } from '@hey-api/codegen-core';\nimport type ts from 'typescript';\n\nimport type { MaybeTsDsl } from '../base';\nimport type { BaseCtor, MixinCtor } from './types';\n\nexport type ValueExpr = string | MaybeTsDsl<ts.Expression>;\n\nexport interface ValueMethods extends Node {\n  $value(): ts.Expression | undefined;\n  /** Sets the initializer expression (e.g. `= expr`). */\n  assign(expr: ValueExpr): this;\n}\n\nexport function ValueMixin<T extends ts.Node, TBase extends BaseCtor<T>>(Base: TBase) {\n  abstract class Value extends Base {\n    protected value?: ValueExpr;\n\n    override analyze(ctx: AnalysisContext): void {\n      super.analyze(ctx);\n      ctx.analyze(this.value);\n    }\n\n    protected assign(expr: ValueExpr): this {\n      this.value = expr;\n      return this;\n    }\n\n    protected $value(): ts.Expression | undefined {\n      return this.$node(this.value);\n    }\n  }\n\n  return Value as unknown as MixinCtor<TBase, ValueMethods>;\n}\n"
  },
  {
    "path": "packages/openapi-ts/src/ts-dsl/stmt/block.ts",
    "content": "import type { AnalysisContext } from '@hey-api/codegen-core';\nimport ts from 'typescript';\n\nimport { TsDsl } from '../base';\nimport type { DoExpr } from '../mixins/do';\nimport { DoMixin } from '../mixins/do';\nimport { LayoutMixin } from '../mixins/layout';\n\nconst Mixed = DoMixin(LayoutMixin(TsDsl<ts.Block>));\n\nexport class BlockTsDsl extends Mixed {\n  readonly '~dsl' = 'BlockTsDsl';\n\n  constructor(...items: Array<DoExpr>) {\n    super();\n    this.do(...items);\n  }\n\n  override analyze(ctx: AnalysisContext) {\n    super.analyze(ctx);\n  }\n\n  override toAst() {\n    const statements = this.$do();\n    return ts.factory.createBlock(statements, this.$multiline(statements.length));\n  }\n}\n"
  },
  {
    "path": "packages/openapi-ts/src/ts-dsl/stmt/if.ts",
    "content": "import type { AnalysisContext } from '@hey-api/codegen-core';\nimport ts from 'typescript';\n\nimport type { MaybeTsDsl } from '../base';\nimport { TsDsl } from '../base';\nimport type { DoExpr } from '../mixins/do';\nimport { DoMixin } from '../mixins/do';\nimport { BlockTsDsl } from './block';\n\nexport type IfCondition = string | MaybeTsDsl<ts.Expression>;\n\nconst Mixed = DoMixin(TsDsl<ts.IfStatement>);\n\nexport class IfTsDsl extends Mixed {\n  readonly '~dsl' = 'IfTsDsl';\n\n  protected _condition?: IfCondition;\n  protected _else?: Array<DoExpr>;\n\n  constructor(condition?: IfCondition) {\n    super();\n    if (condition) this.condition(condition);\n  }\n\n  override analyze(ctx: AnalysisContext): void {\n    super.analyze(ctx);\n    ctx.analyze(this._condition);\n    if (this._else) {\n      ctx.pushScope();\n      try {\n        for (const stmt of this._else) {\n          ctx.analyze(stmt);\n        }\n      } finally {\n        ctx.popScope();\n      }\n    }\n  }\n\n  /** Returns true when all required builder calls are present. */\n  get isValid(): boolean {\n    return this.missingRequiredCalls().length === 0;\n  }\n\n  condition(condition: IfCondition): this {\n    this._condition = condition;\n    return this;\n  }\n\n  otherwise(...items: Array<DoExpr>): this {\n    this._else = items;\n    return this;\n  }\n\n  override toAst() {\n    this.$validate();\n    return ts.factory.createIfStatement(\n      this.$node(this._condition),\n      this.$node(new BlockTsDsl(...this._do).pretty()),\n      this._else ? this.$node(new BlockTsDsl(...this._else).pretty()) : undefined,\n    );\n  }\n\n  $validate(): asserts this is this & {\n    _condition: IfCondition;\n  } {\n    const missing = this.missingRequiredCalls();\n    if (missing.length === 0) return;\n    throw new Error(`If statement missing ${missing.join(' and ')}`);\n  }\n\n  private missingRequiredCalls(): ReadonlyArray<string> {\n    const missing: Array<string> = [];\n    if (!this._condition) missing.push('.condition()');\n    if (this._do.length === 0) missing.push('.do()');\n    return missing;\n  }\n}\n"
  },
  {
    "path": "packages/openapi-ts/src/ts-dsl/stmt/return.ts",
    "content": "import type { AnalysisContext, NodeName, Ref } from '@hey-api/codegen-core';\nimport { ref } from '@hey-api/codegen-core';\nimport ts from 'typescript';\n\nimport type { MaybeTsDsl } from '../base';\nimport { TsDsl } from '../base';\nimport { f } from '../utils/factories';\n\nexport type ReturnExpr = NodeName | MaybeTsDsl<ts.Expression>;\nexport type ReturnCtor = (expr?: ReturnExpr) => ReturnTsDsl;\n\nconst Mixed = TsDsl<ts.ReturnStatement>;\n\nexport class ReturnTsDsl extends Mixed {\n  readonly '~dsl' = 'ReturnTsDsl';\n\n  protected _returnExpr?: Ref<ReturnExpr>;\n\n  constructor(expr?: ReturnExpr) {\n    super();\n    if (expr) this._returnExpr = ref(expr);\n  }\n\n  override analyze(ctx: AnalysisContext): void {\n    super.analyze(ctx);\n    ctx.analyze(this._returnExpr);\n  }\n\n  override toAst() {\n    return ts.factory.createReturnStatement(this.$node(this._returnExpr));\n  }\n}\n\nf.return.set((...args) => new ReturnTsDsl(...args));\n"
  },
  {
    "path": "packages/openapi-ts/src/ts-dsl/stmt/stmt.ts",
    "content": "import type { AnalysisContext } from '@hey-api/codegen-core';\nimport ts from 'typescript';\n\nimport { TsDsl } from '../base';\n\nconst Mixed = TsDsl<ts.Statement>;\n\nexport class StmtTsDsl extends Mixed {\n  readonly '~dsl' = 'StmtTsDsl';\n\n  protected _inner: ts.Expression | ts.Statement | TsDsl<any>;\n\n  constructor(inner: ts.Expression | ts.Statement | TsDsl<any>) {\n    super();\n    this._inner = inner;\n  }\n\n  override analyze(ctx: AnalysisContext): void {\n    super.analyze(ctx);\n    ctx.analyze(this._inner);\n  }\n\n  override toAst() {\n    const node = this.$node(this._inner);\n    return ts.isStatement(node) ? node : ts.factory.createExpressionStatement(node);\n  }\n}\n"
  },
  {
    "path": "packages/openapi-ts/src/ts-dsl/stmt/throw.ts",
    "content": "import type { AnalysisContext } from '@hey-api/codegen-core';\nimport ts from 'typescript';\n\nimport type { MaybeTsDsl } from '../base';\nimport { TsDsl } from '../base';\nimport { LiteralTsDsl } from '../expr/literal';\n\nconst Mixed = TsDsl<ts.ThrowStatement>;\n\nexport class ThrowTsDsl extends Mixed {\n  readonly '~dsl' = 'ThrowTsDsl';\n\n  protected error: string | MaybeTsDsl<ts.Expression>;\n  protected msg?: string | MaybeTsDsl<ts.Expression>;\n  protected useNew: boolean;\n\n  constructor(error: string | MaybeTsDsl<ts.Expression>, useNew = true) {\n    super();\n    this.error = error;\n    this.useNew = useNew;\n  }\n\n  override analyze(ctx: AnalysisContext): void {\n    super.analyze(ctx);\n    ctx.analyze(this.error);\n    ctx.analyze(this.msg);\n  }\n\n  message(value: string | MaybeTsDsl<ts.Expression>): this {\n    this.msg = value;\n    return this;\n  }\n\n  override toAst() {\n    const errorNode = this.$node(this.error);\n    const messageNode = this.$node(this.msg ? [this.msg] : []).map((expr) =>\n      typeof expr === 'string' ? this.$node(new LiteralTsDsl(expr)) : expr,\n    );\n    if (this.useNew) {\n      return ts.factory.createThrowStatement(\n        ts.factory.createNewExpression(errorNode, undefined, messageNode),\n      );\n    }\n    const args = messageNode.length\n      ? [ts.factory.createCallExpression(errorNode, undefined, messageNode)]\n      : [errorNode];\n    return ts.factory.createThrowStatement(args[0]!);\n  }\n}\n"
  },
  {
    "path": "packages/openapi-ts/src/ts-dsl/stmt/try.ts",
    "content": "import type { AnalysisContext, NodeName } from '@hey-api/codegen-core';\nimport ts from 'typescript';\n\nimport { TsDsl } from '../base';\nimport type { DoExpr } from '../mixins/do';\nimport { BlockTsDsl } from './block';\n\nconst Mixed = TsDsl<ts.TryStatement>;\n\nexport class TryTsDsl extends Mixed {\n  readonly '~dsl' = 'TryTsDsl';\n\n  protected _catch?: Array<DoExpr>;\n  protected _catchArg?: NodeName;\n  protected _finally?: Array<DoExpr>;\n  protected _try?: Array<DoExpr>;\n\n  constructor(...tryBlock: Array<DoExpr>) {\n    super();\n    this.try(...tryBlock);\n  }\n\n  override analyze(ctx: AnalysisContext): void {\n    super.analyze(ctx);\n\n    if (this._try) {\n      ctx.pushScope();\n      try {\n        for (const stmt of this._try) ctx.analyze(stmt);\n      } finally {\n        ctx.popScope();\n      }\n    }\n\n    if (this._catch || this._catchArg) {\n      ctx.pushScope();\n      try {\n        ctx.analyze(this._catchArg);\n        if (this._catch) {\n          for (const stmt of this._catch) ctx.analyze(stmt);\n        }\n      } finally {\n        ctx.popScope();\n      }\n    }\n\n    if (this._finally) {\n      ctx.pushScope();\n      try {\n        for (const stmt of this._finally) ctx.analyze(stmt);\n      } finally {\n        ctx.popScope();\n      }\n    }\n  }\n\n  /** Returns true when all required builder calls are present. */\n  get isValid(): boolean {\n    return this.missingRequiredCalls().length === 0;\n  }\n\n  catch(...items: Array<DoExpr>): this {\n    this._catch = items;\n    return this;\n  }\n\n  catchArg(arg: NodeName): this {\n    this._catchArg = arg;\n    return this;\n  }\n\n  finally(...items: Array<DoExpr>): this {\n    this._finally = items;\n    return this;\n  }\n\n  try(...items: Array<DoExpr>): this {\n    this._try = items;\n    return this;\n  }\n\n  override toAst() {\n    this.$validate();\n    const catchParam = this._catchArg ? (this.$node(this._catchArg) as ts.BindingName) : undefined;\n\n    return ts.factory.createTryStatement(\n      this.$node(new BlockTsDsl(...this._try).pretty()),\n      ts.factory.createCatchClause(\n        catchParam ? ts.factory.createVariableDeclaration(catchParam) : undefined,\n        this.$node(new BlockTsDsl(...(this._catch ?? [])).pretty()),\n      ),\n      this._finally ? this.$node(new BlockTsDsl(...this._finally).pretty()) : undefined,\n    );\n  }\n\n  $validate(): asserts this is this & {\n    _try: Array<DoExpr>;\n  } {\n    const missing = this.missingRequiredCalls();\n    if (missing.length === 0) return;\n    throw new Error(`Try statement missing ${missing.join(' and ')}`);\n  }\n\n  private missingRequiredCalls(): ReadonlyArray<string> {\n    const missing: Array<string> = [];\n    if (!this._try || this._try.length === 0) missing.push('.try()');\n    return missing;\n  }\n}\n"
  },
  {
    "path": "packages/openapi-ts/src/ts-dsl/stmt/var.ts",
    "content": "import type { AnalysisContext, NodeName } from '@hey-api/codegen-core';\nimport { isSymbol } from '@hey-api/codegen-core';\nimport ts from 'typescript';\n\nimport { TsDsl, TypeTsDsl } from '../base';\nimport { DocMixin } from '../mixins/doc';\nimport { HintMixin } from '../mixins/hint';\nimport { DefaultMixin, ExportMixin } from '../mixins/modifiers';\nimport { PatternMixin } from '../mixins/pattern';\nimport { ValueMixin } from '../mixins/value';\nimport { TypeExprTsDsl } from '../type/expr';\nimport { safeRuntimeName } from '../utils/name';\n\nconst Mixed = DefaultMixin(\n  DocMixin(ExportMixin(HintMixin(PatternMixin(ValueMixin(TsDsl<ts.VariableStatement>))))),\n);\n\nexport class VarTsDsl extends Mixed {\n  readonly '~dsl' = 'VarTsDsl';\n  override readonly nameSanitizer = safeRuntimeName;\n\n  protected kind: ts.NodeFlags = ts.NodeFlags.None;\n  protected _type?: TypeTsDsl;\n\n  constructor(name?: NodeName) {\n    super();\n    if (name) this.name.set(name);\n    if (isSymbol(name)) {\n      name.setKind('var');\n    }\n  }\n\n  override analyze(ctx: AnalysisContext): void {\n    super.analyze(ctx);\n    ctx.analyze(this.name);\n    ctx.analyze(this._type);\n  }\n\n  /** Returns true when all required builder calls are present. */\n  get isValid(): boolean {\n    return this.missingRequiredCalls().length === 0;\n  }\n\n  const(): this {\n    this.kind = ts.NodeFlags.Const;\n    return this;\n  }\n\n  let(): this {\n    this.kind = ts.NodeFlags.Let;\n    return this;\n  }\n\n  /** Sets the variable type. */\n  type(type: string | TypeTsDsl): this {\n    this._type = type instanceof TypeTsDsl ? type : new TypeExprTsDsl(type);\n    return this;\n  }\n\n  var(): this {\n    this.kind = ts.NodeFlags.None;\n    return this;\n  }\n\n  override toAst() {\n    this.$validate();\n    const node = ts.factory.createVariableStatement(\n      this.modifiers,\n      ts.factory.createVariableDeclarationList(\n        [\n          ts.factory.createVariableDeclaration(\n            this.$pattern() ?? (this.$node(this.name) as ts.BindingName),\n            undefined,\n            this.$type(this._type),\n            this.$value(),\n          ),\n        ],\n        this.kind,\n      ),\n    );\n    return this.$docs(this.$hint(node));\n  }\n\n  $validate(): asserts this {\n    const missing = this.missingRequiredCalls();\n    if (missing.length === 0) return;\n    throw new Error(`Variable declaration missing ${missing.join(' and ')}`);\n  }\n\n  private missingRequiredCalls(): ReadonlyArray<string> {\n    const missing: Array<string> = [];\n    if (!this.$pattern() && !this.name.toString())\n      missing.push('name or pattern (.array()/.object())');\n    return missing;\n  }\n}\n"
  },
  {
    "path": "packages/openapi-ts/src/ts-dsl/token.ts",
    "content": "import ts from 'typescript';\n\nimport { TsDsl } from './base';\n\nexport class TokenTsDsl<K extends ts.SyntaxKind = never> extends TsDsl<ts.Token<K>> {\n  readonly '~dsl' = 'TokenTsDsl';\n\n  protected _kind?: K;\n\n  /** Sets the token kind */\n  kind(kind: K): this {\n    this._kind = kind;\n    return this;\n  }\n\n  /** Creates `-` */\n  minus(): TokenTsDsl<ts.SyntaxKind.MinusToken> {\n    return (this as TokenTsDsl<ts.SyntaxKind.MinusToken>).kind(ts.SyntaxKind.MinusToken);\n  }\n\n  /** Creates `?` (optional) */\n  optional(): TokenTsDsl<ts.SyntaxKind.QuestionToken> {\n    return (this as TokenTsDsl<ts.SyntaxKind.QuestionToken>).kind(ts.SyntaxKind.QuestionToken);\n  }\n\n  /** Creates `+` */\n  plus(): TokenTsDsl<ts.SyntaxKind.PlusToken> {\n    return (this as TokenTsDsl<ts.SyntaxKind.PlusToken>).kind(ts.SyntaxKind.PlusToken);\n  }\n\n  /** Creates `?.` (optional chaining token) */\n  questionDot(): TokenTsDsl<ts.SyntaxKind.QuestionDotToken> {\n    return (this as TokenTsDsl<ts.SyntaxKind.QuestionDotToken>).kind(\n      ts.SyntaxKind.QuestionDotToken,\n    );\n  }\n\n  /** Creates `readonly` */\n  readonly(): TokenTsDsl<ts.SyntaxKind.ReadonlyKeyword> {\n    return (this as TokenTsDsl<ts.SyntaxKind.ReadonlyKeyword>).kind(ts.SyntaxKind.ReadonlyKeyword);\n  }\n\n  /** Creates `...` (spread / rest) */\n  spread(): TokenTsDsl<ts.SyntaxKind.DotDotDotToken> {\n    return (this as TokenTsDsl<ts.SyntaxKind.DotDotDotToken>).kind(ts.SyntaxKind.DotDotDotToken);\n  }\n\n  override toAst(): ts.Token<K> {\n    this.$validate();\n    // @ts-expect-error\n    return ts.factory.createToken(this._kind);\n  }\n\n  $validate(): asserts this is this & {\n    _kind: K;\n  } {\n    const missing = this.missingRequiredCalls();\n    if (missing.length === 0) return;\n    throw new Error(`Token missing ${missing.join(' and ')}`);\n  }\n\n  private missingRequiredCalls(): ReadonlyArray<string> {\n    const missing: Array<string> = [];\n    if (!this._kind) missing.push('.kind()');\n    return missing;\n  }\n\n  /** Returns true when all required builder calls are present. */\n  get isValid(): boolean {\n    return this.missingRequiredCalls().length === 0;\n  }\n}\n"
  },
  {
    "path": "packages/openapi-ts/src/ts-dsl/type/alias.ts",
    "content": "import type { AnalysisContext, NodeName, NodeScope } from '@hey-api/codegen-core';\nimport { isSymbol } from '@hey-api/codegen-core';\nimport ts from 'typescript';\n\nimport type { MaybeTsDsl } from '../base';\nimport { TsDsl } from '../base';\nimport { DocMixin } from '../mixins/doc';\nimport { ExportMixin } from '../mixins/modifiers';\nimport { TypeParamsMixin } from '../mixins/type-params';\nimport { safeTypeName } from '../utils/name';\n\ntype Value = MaybeTsDsl<ts.TypeNode>;\n\nconst Mixed = DocMixin(ExportMixin(TypeParamsMixin(TsDsl<ts.TypeAliasDeclaration>)));\n\nexport class TypeAliasTsDsl extends Mixed {\n  readonly '~dsl' = 'TypeAliasTsDsl';\n  override readonly nameSanitizer = safeTypeName;\n  override scope: NodeScope = 'type';\n\n  protected value?: Value;\n\n  constructor(name: NodeName, fn?: (t: TypeAliasTsDsl) => void) {\n    super();\n    this.name.set(name);\n    if (isSymbol(name)) {\n      name.setKind('type');\n    }\n    fn?.(this);\n  }\n\n  override analyze(ctx: AnalysisContext): void {\n    super.analyze(ctx);\n    ctx.analyze(this.name);\n    ctx.analyze(this.value);\n  }\n\n  /** Returns true when all required builder calls are present. */\n  get isValid(): boolean {\n    return this.missingRequiredCalls().length === 0;\n  }\n\n  /** Sets the type expression on the right-hand side of `= ...`. */\n  type(node: Value): this {\n    this.value = node;\n    return this;\n  }\n\n  override toAst() {\n    this.$validate();\n    const node = ts.factory.createTypeAliasDeclaration(\n      this.modifiers,\n      this.$node(this.name) as ts.Identifier,\n      this.$generics(),\n      this.$type(this.value),\n    );\n    return this.$docs(node);\n  }\n\n  $validate(): asserts this is this & {\n    value: Value;\n  } {\n    const missing = this.missingRequiredCalls();\n    if (missing.length === 0) return;\n    const name = this.name.toString();\n    throw new Error(`Type alias${name ? ` \"${name}\"` : ''} missing ${missing.join(' and ')}`);\n  }\n\n  private missingRequiredCalls(): ReadonlyArray<string> {\n    const missing: Array<string> = [];\n    if (!this.value) missing.push('.type()');\n    return missing;\n  }\n}\n"
  },
  {
    "path": "packages/openapi-ts/src/ts-dsl/type/and.ts",
    "content": "import type { AnalysisContext, NodeName, NodeScope, Ref } from '@hey-api/codegen-core';\nimport { ref } from '@hey-api/codegen-core';\nimport ts from 'typescript';\n\nimport type { TypeTsDsl } from '../base';\nimport { TsDsl } from '../base';\n\ntype Type = NodeName | ts.TypeNode | TypeTsDsl;\n\nconst Mixed = TsDsl<ts.IntersectionTypeNode>;\n\nexport class TypeAndTsDsl extends Mixed {\n  readonly '~dsl' = 'TypeAndTsDsl';\n  override scope: NodeScope = 'type';\n\n  protected _types: Array<Ref<Type>> = [];\n\n  constructor(...nodes: Array<Type>) {\n    super();\n    this.types(...nodes);\n  }\n\n  override analyze(ctx: AnalysisContext): void {\n    super.analyze(ctx);\n    for (const type of this._types) {\n      ctx.analyze(type);\n    }\n  }\n\n  types(...nodes: Array<Type>): this {\n    this._types.push(...nodes.map((n) => ref(n)));\n    return this;\n  }\n\n  override toAst() {\n    const flat: Array<ts.TypeNode> = [];\n\n    for (const node of this._types) {\n      const type = this.$type(node);\n      if (ts.isIntersectionTypeNode(type)) {\n        flat.push(...type.types);\n      } else {\n        flat.push(type);\n      }\n    }\n\n    return ts.factory.createIntersectionTypeNode(flat);\n  }\n}\n"
  },
  {
    "path": "packages/openapi-ts/src/ts-dsl/type/attr.ts",
    "content": "import type { AnalysisContext, NodeName, NodeScope, Ref } from '@hey-api/codegen-core';\nimport { isRef, ref } from '@hey-api/codegen-core';\nimport ts from 'typescript';\n\nimport type { MaybeTsDsl } from '../base';\nimport { TsDsl } from '../base';\nimport { TypeExprMixin } from '../mixins/type-expr';\n\ntype Base = NodeName | MaybeTsDsl<ts.EntityName>;\ntype Right = NodeName | ts.Identifier;\n\nconst Mixed = TypeExprMixin(TsDsl<ts.QualifiedName>);\n\nexport class TypeAttrTsDsl extends Mixed {\n  readonly '~dsl' = 'TypeAttrTsDsl';\n  override scope: NodeScope = 'type';\n\n  protected _base?: Ref<Base>;\n  protected _right!: Ref<Right>;\n\n  constructor(base: Base | Ref<Base>, right: string | ts.Identifier);\n  constructor(right: Right);\n  constructor(base: Base | Ref<Base>, right?: Right) {\n    super();\n    if (right) {\n      this.base(base);\n      this.right(right);\n    } else {\n      this.base();\n      this.right(base as Right);\n    }\n  }\n\n  override analyze(ctx: AnalysisContext): void {\n    super.analyze(ctx);\n    ctx.analyze(this._base);\n    ctx.analyze(this._right);\n  }\n\n  /** Returns true when all required builder calls are present. */\n  get isValid(): boolean {\n    return this.missingRequiredCalls().length === 0;\n  }\n\n  base(base?: Base | Ref<Base>): this {\n    if (isRef(base)) {\n      this._base = base;\n    } else {\n      this._base = base ? ref(base) : undefined;\n    }\n    return this;\n  }\n\n  right(right: Right): this {\n    this._right = ref(right);\n    return this;\n  }\n\n  override toAst() {\n    this.$validate();\n    const left = this.$node(this._base);\n    if (!ts.isEntityName(left)) {\n      throw new Error('TypeAttrTsDsl: base must be an EntityName');\n    }\n    return ts.factory.createQualifiedName(left, this.$node(this._right) as ts.Identifier);\n  }\n\n  $validate(): asserts this is this & {\n    _base: Ref<Base>;\n    _right: Ref<Right>;\n  } {\n    const missing = this.missingRequiredCalls();\n    if (missing.length === 0) return;\n    throw new Error(`Type attribute missing ${missing.join(' and ')}`);\n  }\n\n  private missingRequiredCalls(): ReadonlyArray<string> {\n    const missing: Array<string> = [];\n    if (!this._base) missing.push('.base()');\n    if (!this._right) missing.push('.right()');\n    return missing;\n  }\n}\n"
  },
  {
    "path": "packages/openapi-ts/src/ts-dsl/type/expr.ts",
    "content": "import type { AnalysisContext, NodeName, NodeScope, Ref } from '@hey-api/codegen-core';\nimport { isNode, ref } from '@hey-api/codegen-core';\nimport ts from 'typescript';\n\nimport { TsDsl } from '../base';\nimport { TypeArgsMixin } from '../mixins/type-args';\nimport { TypeExprMixin } from '../mixins/type-expr';\nimport { f } from '../utils/factories';\nimport { TypeAttrTsDsl } from './attr';\n\nexport type TypeExprExpr = NodeName | TypeAttrTsDsl;\nexport type TypeExprFn = (t: TypeExprTsDsl) => void;\nexport type TypeExprCtor = (nameOrFn?: NodeName | TypeExprFn, fn?: TypeExprFn) => TypeExprTsDsl;\n\nconst Mixed = TypeArgsMixin(TypeExprMixin(TsDsl<ts.TypeReferenceNode>));\n\nexport class TypeExprTsDsl extends Mixed {\n  readonly '~dsl' = 'TypeExprTsDsl';\n  override scope: NodeScope = 'type';\n\n  protected _exprInput?: Ref<TypeExprExpr>;\n\n  constructor();\n  constructor(fn: TypeExprFn);\n  constructor(name: NodeName);\n  constructor(name: NodeName, fn?: TypeExprFn);\n  constructor(name?: NodeName | TypeExprFn, fn?: TypeExprFn) {\n    super();\n    if (typeof name === 'function') {\n      name(this);\n    } else {\n      this._exprInput = name ? ref(name) : undefined;\n      fn?.(this);\n    }\n  }\n\n  override analyze(ctx: AnalysisContext): void {\n    super.analyze(ctx);\n    ctx.analyze(this._exprInput);\n  }\n\n  /** Returns true when all required builder calls are present. */\n  get isValid(): boolean {\n    return this.missingRequiredCalls().length === 0;\n  }\n\n  /** Accesses a nested type (e.g. `Foo.Bar`). */\n  attr(right: string | ts.Identifier | TypeAttrTsDsl): this {\n    this._exprInput = isNode(right)\n      ? ref(right.base(this._exprInput))\n      : ref(new TypeAttrTsDsl(this._exprInput!, right));\n    return this;\n  }\n\n  override toAst() {\n    this.$validate();\n    return ts.factory.createTypeReferenceNode(\n      this.$type(this._exprInput) as ts.EntityName,\n      this.$generics(),\n    );\n  }\n\n  $validate(): asserts this is this & {\n    _exprInput: Ref<TypeExprExpr>;\n  } {\n    const missing = this.missingRequiredCalls();\n    if (missing.length === 0) return;\n    throw new Error(`Type expression missing ${missing.join(' and ')}`);\n  }\n\n  private missingRequiredCalls(): ReadonlyArray<string> {\n    const missing: Array<string> = [];\n    if (!this._exprInput) missing.push('name or .attr()');\n    return missing;\n  }\n}\n\nf.type.expr.set(\n  (...args) => new TypeExprTsDsl(...(args as ConstructorParameters<typeof TypeExprTsDsl>)),\n);\n"
  },
  {
    "path": "packages/openapi-ts/src/ts-dsl/type/fromValue.ts",
    "content": "import { isNode } from '@hey-api/codegen-core';\nimport type ts from 'typescript';\n\nimport type { TsDsl } from '../base';\nimport { TypeLiteralTsDsl } from './literal';\nimport { TypeObjectTsDsl } from './object';\nimport { TypeTupleTsDsl } from './tuple';\n\nexport const fromValue = (input: unknown): TsDsl<ts.TypeNode> => {\n  if (isNode(input)) {\n    return input as TsDsl<ts.TypeNode>;\n  }\n\n  if (input === null) {\n    return new TypeLiteralTsDsl(input);\n  }\n\n  if (\n    typeof input === 'number' ||\n    typeof input === 'boolean' ||\n    typeof input === 'string' ||\n    typeof input === 'bigint'\n  ) {\n    return new TypeLiteralTsDsl(input);\n  }\n\n  if (input instanceof Array) {\n    const arr = new TypeTupleTsDsl(...input.map((v) => fromValue(v)));\n    return arr;\n  }\n\n  if (typeof input === 'object') {\n    const obj = new TypeObjectTsDsl();\n    for (const [key, val] of Object.entries(input)) {\n      const type = fromValue(val);\n      obj.prop(key, (p) => p.type(type));\n    }\n    return obj;\n  }\n\n  throw new Error(`$.type.fromValue(): Unsupported input type ${String(input)}`);\n};\n"
  },
  {
    "path": "packages/openapi-ts/src/ts-dsl/type/func.ts",
    "content": "import type { AnalysisContext, NodeScope } from '@hey-api/codegen-core';\nimport ts from 'typescript';\n\nimport { TsDsl } from '../base';\nimport { DocMixin } from '../mixins/doc';\nimport { ParamMixin } from '../mixins/param';\nimport { TypeParamsMixin } from '../mixins/type-params';\nimport { TypeReturnsMixin } from '../mixins/type-returns';\n\nconst Mixed = DocMixin(ParamMixin(TypeParamsMixin(TypeReturnsMixin(TsDsl<ts.FunctionTypeNode>))));\n\nexport class TypeFuncTsDsl extends Mixed {\n  readonly '~dsl' = 'TypeFuncTsDsl';\n  override scope: NodeScope = 'type';\n\n  override analyze(ctx: AnalysisContext): void {\n    super.analyze(ctx);\n  }\n\n  /** Returns true when all required builder calls are present. */\n  get isValid(): boolean {\n    return this.missingRequiredCalls().length === 0;\n  }\n\n  override toAst() {\n    this.$validate();\n    const node = ts.factory.createFunctionTypeNode(\n      this.$generics(),\n      this.$params(),\n      this.$returns()!,\n    );\n    return this.$docs(node);\n  }\n\n  $validate(): asserts this {\n    const missing = this.missingRequiredCalls();\n    if (missing.length === 0) return;\n    throw new Error(`Function type missing ${missing.join(' and ')}`);\n  }\n\n  private missingRequiredCalls(): ReadonlyArray<string> {\n    const missing: Array<string> = [];\n    if (this.$returns() === undefined) missing.push('.returns()');\n    return missing;\n  }\n}\n"
  },
  {
    "path": "packages/openapi-ts/src/ts-dsl/type/idx-sig.ts",
    "content": "import type { AnalysisContext, NodeName, NodeScope } from '@hey-api/codegen-core';\nimport ts from 'typescript';\n\nimport type { MaybeTsDsl } from '../base';\nimport { TsDsl } from '../base';\nimport { DocMixin } from '../mixins/doc';\nimport { ReadonlyMixin } from '../mixins/modifiers';\n\nexport type TypeIdxSigType = string | MaybeTsDsl<ts.TypeNode>;\nexport type TypeIdxSigKind = 'idxSig';\n\nconst Mixed = DocMixin(ReadonlyMixin(TsDsl<ts.IndexSignatureDeclaration>));\n\nexport class TypeIdxSigTsDsl extends Mixed {\n  readonly '~dsl' = 'TypeIdxSigTsDsl';\n  override scope: NodeScope = 'type';\n\n  protected _key?: TypeIdxSigType;\n  protected _type?: TypeIdxSigType;\n\n  constructor(name: NodeName, fn?: (i: TypeIdxSigTsDsl) => void) {\n    super();\n    this.name.set(name);\n    fn?.(this);\n  }\n\n  /** Element kind. */\n  get kind(): TypeIdxSigKind {\n    return 'idxSig';\n  }\n\n  /** Index signature parameter name. */\n  get propName(): string {\n    return this.name.toString();\n  }\n\n  override analyze(ctx: AnalysisContext): void {\n    super.analyze(ctx);\n    ctx.analyze(this._key);\n    ctx.analyze(this._type);\n  }\n\n  /** Returns true when all required builder calls are present. */\n  get isValid(): boolean {\n    return this.missingRequiredCalls().length === 0;\n  }\n\n  /** Sets the key type: `[name: T]` */\n  key(type: TypeIdxSigType): this {\n    this._key = type;\n    return this;\n  }\n\n  /** Sets the property type. */\n  type(type: TypeIdxSigType): this {\n    this._type = type;\n    return this;\n  }\n\n  override toAst() {\n    this.$validate();\n    const node = ts.factory.createIndexSignature(\n      this.modifiers,\n      [\n        ts.factory.createParameterDeclaration(\n          undefined,\n          undefined,\n          this.$node(this.name) as ts.BindingName,\n          undefined,\n          this.$type(this._key),\n        ),\n      ],\n      this.$type(this._type),\n    );\n    return this.$docs(node);\n  }\n\n  $validate(): asserts this is this & {\n    _key: TypeIdxSigType;\n    _type: TypeIdxSigType;\n  } {\n    const missing = this.missingRequiredCalls();\n    if (missing.length === 0) return;\n    const name = this.name.toString();\n    throw new Error(`Index signature${name ? ` \"${name}\"` : ''} missing ${missing.join(' and ')}`);\n  }\n\n  private missingRequiredCalls(): ReadonlyArray<string> {\n    const missing: Array<string> = [];\n    if (!this._key) missing.push('.key()');\n    if (!this._type) missing.push('.\\u200Btype()');\n    return missing;\n  }\n}\n"
  },
  {
    "path": "packages/openapi-ts/src/ts-dsl/type/idx.ts",
    "content": "import type { AnalysisContext, NodeScope } from '@hey-api/codegen-core';\nimport ts from 'typescript';\n\nimport type { MaybeTsDsl } from '../base';\nimport { TsDsl } from '../base';\nimport { TypeExprMixin } from '../mixins/type-expr';\nimport { f } from '../utils/factories';\n\ntype Base = string | MaybeTsDsl<ts.TypeNode>;\ntype Index = string | number | MaybeTsDsl<ts.TypeNode>;\nexport type TypeIdxCtor = (base: Base, index: Index) => TypeIdxTsDsl;\n\nconst Mixed = TypeExprMixin(TsDsl<ts.IndexedAccessTypeNode>);\n\nexport class TypeIdxTsDsl extends Mixed {\n  readonly '~dsl' = 'TypeIdxTsDsl';\n  override scope: NodeScope = 'type';\n\n  protected _base!: Base;\n  protected _index!: Index;\n\n  constructor(base: Base, index: Index) {\n    super();\n    this.base(base);\n    this.index(index);\n  }\n\n  override analyze(ctx: AnalysisContext): void {\n    super.analyze(ctx);\n    ctx.analyze(this._base);\n    ctx.analyze(this._index);\n  }\n\n  /** Returns true when all required builder calls are present. */\n  get isValid(): boolean {\n    return this.missingRequiredCalls().length === 0;\n  }\n\n  base(base: Base): this {\n    this._base = base;\n    return this;\n  }\n\n  index(index: Index): this {\n    this._index = index;\n    return this;\n  }\n\n  override toAst() {\n    this.$validate();\n    return ts.factory.createIndexedAccessTypeNode(this.$type(this._base), this.$type(this._index));\n  }\n\n  $validate(): asserts this is this & {\n    _base: Base;\n    _index: Index;\n  } {\n    const missing = this.missingRequiredCalls();\n    if (missing.length === 0) return;\n    throw new Error(`Indexed access type missing ${missing.join(' and ')}`);\n  }\n\n  private missingRequiredCalls(): ReadonlyArray<string> {\n    const missing: Array<string> = [];\n    if (this._base === undefined) missing.push('.base()');\n    if (this._index === undefined) missing.push('.index()');\n    return missing;\n  }\n}\n\nf.type.idx.set((...args) => new TypeIdxTsDsl(...args));\n"
  },
  {
    "path": "packages/openapi-ts/src/ts-dsl/type/literal.ts",
    "content": "import type { AnalysisContext, NodeScope } from '@hey-api/codegen-core';\nimport tsOld from 'typescript';\n\nimport type { ts } from '../../ts-compiler';\nimport { TsDsl } from '../base';\nimport { LiteralTsDsl } from '../expr/literal';\n\nconst Mixed = TsDsl<tsOld.LiteralTypeNode>;\n\nexport class TypeLiteralTsDsl extends Mixed {\n  readonly '~dsl' = 'TypeLiteralTsDsl';\n  override scope: NodeScope = 'type';\n\n  protected value: ts.LiteralValue;\n\n  constructor(value: ts.LiteralValue) {\n    super();\n    this.value = value;\n  }\n\n  override analyze(ctx: AnalysisContext): void {\n    super.analyze(ctx);\n  }\n\n  override toAst() {\n    return tsOld.factory.createLiteralTypeNode(this.$node(new LiteralTsDsl(this.value)));\n  }\n}\n"
  },
  {
    "path": "packages/openapi-ts/src/ts-dsl/type/mapped.ts",
    "content": "import type { AnalysisContext, NodeName, NodeScope } from '@hey-api/codegen-core';\nimport ts from 'typescript';\n\nimport type { MaybeTsDsl } from '../base';\nimport { TsDsl } from '../base';\nimport { TokenTsDsl } from '../token';\n\nconst Mixed = TsDsl<ts.MappedTypeNode>;\n\nexport class TypeMappedTsDsl extends Mixed {\n  readonly '~dsl' = 'TypeMappedTsDsl';\n  override scope: NodeScope = 'type';\n\n  protected questionToken?: TokenTsDsl<\n    ts.SyntaxKind.QuestionToken | ts.SyntaxKind.PlusToken | ts.SyntaxKind.MinusToken\n  >;\n  protected readonlyToken?: TokenTsDsl<\n    ts.SyntaxKind.ReadonlyKeyword | ts.SyntaxKind.MinusToken | ts.SyntaxKind.PlusToken\n  >;\n  protected _key?: string | MaybeTsDsl<ts.TypeNode>;\n  protected _type?: string | MaybeTsDsl<ts.TypeNode>;\n\n  constructor(name?: NodeName) {\n    super();\n    if (name) this.name.set(name);\n  }\n\n  override analyze(ctx: AnalysisContext): void {\n    super.analyze(ctx);\n    ctx.analyze(this.questionToken);\n    ctx.analyze(this.readonlyToken);\n    ctx.analyze(this._key);\n    ctx.analyze(this._type);\n  }\n\n  /** Returns true when all required builder calls are present. */\n  get isValid(): boolean {\n    return this.missingRequiredCalls().length === 0;\n  }\n\n  /** Sets the key constraint: `[K in Constraint]` */\n  key(type: string | MaybeTsDsl<ts.TypeNode>): this {\n    this._key = type;\n    return this;\n  }\n\n  /** Removes `readonly` from the mapped members (`[K in X]-readonly`). */\n  mutable(): this {\n    this.readonlyToken = new TokenTsDsl().minus();\n    return this;\n  }\n\n  /** Makes `[K in X]?:` optional. */\n  optional(): this {\n    this.questionToken = new TokenTsDsl().optional();\n    return this;\n  }\n\n  /** Makes `[K in X]` readonly */\n  readonly(): this {\n    this.readonlyToken = new TokenTsDsl().readonly();\n    return this;\n  }\n\n  /** Removes `?` from the mapped members (`[K in X]-?:`). */\n  required(): this {\n    this.questionToken = new TokenTsDsl().minus();\n    return this;\n  }\n\n  /** Sets the mapped value type: `[K in X]: ValueType` */\n  type(type: string | MaybeTsDsl<ts.TypeNode>): this {\n    this._type = type;\n    return this;\n  }\n\n  override toAst() {\n    this.$validate();\n    return ts.factory.createMappedTypeNode(\n      this.$node(this.readonlyToken),\n      ts.factory.createTypeParameterDeclaration(\n        undefined,\n        this.$node(this.name) as ts.Identifier,\n        this.$type(this._key),\n        undefined,\n      ),\n      undefined,\n      this.$node(this.questionToken),\n      this.$type(this._type),\n      undefined,\n    );\n  }\n\n  $validate(): asserts this is this & {\n    _key: string | MaybeTsDsl<ts.TypeNode>;\n    _type: string | MaybeTsDsl<ts.TypeNode>;\n  } {\n    const missing = this.missingRequiredCalls();\n    if (missing.length === 0) return;\n    const name = this.name.toString();\n    throw new Error(`Mapped type${name ? ` \"${name}\"` : ''} missing ${missing.join(' and ')}`);\n  }\n\n  private missingRequiredCalls(): ReadonlyArray<string> {\n    const missing: Array<string> = [];\n    if (!this._key) missing.push('.key()');\n    if (!this._type) missing.push('.\\u200Btype()');\n    return missing;\n  }\n}\n"
  },
  {
    "path": "packages/openapi-ts/src/ts-dsl/type/object.ts",
    "content": "import type { AnalysisContext, NodeScope } from '@hey-api/codegen-core';\nimport ts from 'typescript';\n\nimport { TsDsl } from '../base';\nimport { TypeIdxSigTsDsl } from './idx-sig';\nimport { TypePropTsDsl } from './prop';\n\nconst Mixed = TsDsl<ts.TypeNode>;\n\nexport class TypeObjectTsDsl extends Mixed {\n  readonly '~dsl' = 'TypeObjectTsDsl';\n  override scope: NodeScope = 'type';\n\n  protected _props = new Map<string, TypePropTsDsl | TypeIdxSigTsDsl>();\n\n  override analyze(ctx: AnalysisContext): void {\n    super.analyze(ctx);\n    for (const prop of this._props.values()) {\n      ctx.analyze(prop);\n    }\n  }\n\n  /** Returns true if object has at least one property or index signature. */\n  hasProps(): boolean {\n    return this._props.size > 0;\n  }\n\n  /** Adds an index signature to the object type, or removes if fn is null. */\n  idxSig(name: string, fn: ((i: TypeIdxSigTsDsl) => void) | null): this {\n    const key = `idxSig:${name}`;\n    if (fn === null) {\n      this._props.delete(key);\n    } else {\n      this._props.set(key, new TypeIdxSigTsDsl(name, fn));\n    }\n    return this;\n  }\n\n  /** Returns true if object has no properties or index signatures. */\n  get isEmpty(): boolean {\n    return this._props.size === 0;\n  }\n\n  /** Adds a property signature, or removes if fn is null. */\n  prop(name: string, fn: ((p: TypePropTsDsl) => void) | null): this {\n    const key = `prop:${name}`;\n    if (fn === null) {\n      this._props.delete(key);\n    } else {\n      this._props.set(key, new TypePropTsDsl(name, fn));\n    }\n    return this;\n  }\n\n  /** Adds multiple properties/index signatures. */\n  props(...members: ReadonlyArray<TypePropTsDsl | TypeIdxSigTsDsl>): this {\n    for (const member of members) {\n      this._props.set(`${member.kind}:${member.propName}`, member);\n    }\n    return this;\n  }\n\n  override toAst() {\n    return ts.factory.createTypeLiteralNode(this.$node([...this._props.values()]));\n  }\n}\n"
  },
  {
    "path": "packages/openapi-ts/src/ts-dsl/type/operator.ts",
    "content": "import type { AnalysisContext, NodeScope } from '@hey-api/codegen-core';\nimport ts from 'typescript';\n\nimport type { MaybeTsDsl } from '../base';\nimport { TsDsl } from '../base';\nimport { f } from '../utils/factories';\n\ntype Op = ts.SyntaxKind.KeyOfKeyword | ts.SyntaxKind.ReadonlyKeyword | ts.SyntaxKind.UniqueKeyword;\ntype Type = string | MaybeTsDsl<ts.TypeNode>;\nexport type TypeOperatorCtor = () => TypeOperatorTsDsl;\n\nconst Mixed = TsDsl<ts.TypeOperatorNode>;\n\n/**\n * Builds a TypeScript `TypeOperatorNode`, such as:\n *\n * - `keyof T`\n * - `readonly U`\n * - `unique V`\n *\n * This DSL provides both a generic `.operator()` API and convenient\n * shorthand methods (`.keyof()`, `.readonly()`, `.unique()`).\n *\n * The node will throw during render if required fields are missing.\n */\nexport class TypeOperatorTsDsl extends Mixed {\n  readonly '~dsl' = 'TypeOperatorTsDsl';\n  override scope: NodeScope = 'type';\n\n  protected _op?: Op;\n  protected _type?: Type;\n\n  override analyze(ctx: AnalysisContext): void {\n    super.analyze(ctx);\n    ctx.analyze(this._type);\n  }\n\n  /** Shorthand: builds `keyof T`. */\n  keyof(type: Type): this {\n    this.operator(ts.SyntaxKind.KeyOfKeyword);\n    this.type(type);\n    return this;\n  }\n\n  /** Sets the operator explicitly. */\n  operator(op: Op): this {\n    this._op = op;\n    return this;\n  }\n\n  /** Shorthand: builds `readonly T`. */\n  readonly(type: Type): this {\n    this.operator(ts.SyntaxKind.ReadonlyKeyword);\n    this.type(type);\n    return this;\n  }\n\n  /** Sets the target type of the operator. */\n  type(type: Type): this {\n    this._type = type;\n    return this;\n  }\n\n  /** Shorthand: builds `unique T`. */\n  unique(type: Type): this {\n    this.operator(ts.SyntaxKind.UniqueKeyword);\n    this.type(type);\n    return this;\n  }\n\n  override toAst() {\n    this.$validate();\n    return ts.factory.createTypeOperatorNode(this._op, this.$type(this._type));\n  }\n\n  /** Throws if required fields are not set. */\n  $validate(): asserts this is this & {\n    _op: Op;\n    _type: Type;\n  } {\n    const missing = this.missingRequiredCalls();\n    if (missing.length === 0) return;\n    throw new Error(`Type operator missing ${missing.join(' and ')}`);\n  }\n\n  private missingRequiredCalls(): ReadonlyArray<string> {\n    const missing: Array<string> = [];\n    if (!this._op) missing.push('.operator()');\n    if (!this._type) missing.push('.\\u200Btype()');\n    return missing;\n  }\n}\n\nf.type.operator.set((...args) => new TypeOperatorTsDsl(...args));\n"
  },
  {
    "path": "packages/openapi-ts/src/ts-dsl/type/or.ts",
    "content": "import type { AnalysisContext, NodeName, NodeScope, Ref } from '@hey-api/codegen-core';\nimport { ref } from '@hey-api/codegen-core';\nimport ts from 'typescript';\n\nimport type { TypeTsDsl } from '../base';\nimport { TsDsl } from '../base';\n\ntype Type = NodeName | ts.TypeNode | TypeTsDsl;\n\nconst Mixed = TsDsl<ts.UnionTypeNode>;\n\nexport class TypeOrTsDsl extends Mixed {\n  readonly '~dsl' = 'TypeOrTsDsl';\n  override scope: NodeScope = 'type';\n\n  protected _types: Array<Ref<Type>> = [];\n\n  constructor(...nodes: Array<Type>) {\n    super();\n    this.types(...nodes);\n  }\n\n  override analyze(ctx: AnalysisContext): void {\n    super.analyze(ctx);\n    for (const type of this._types) {\n      ctx.analyze(type);\n    }\n  }\n\n  types(...nodes: Array<Type>): this {\n    this._types.push(...nodes.map((n) => ref(n)));\n    return this;\n  }\n\n  override toAst() {\n    const flat: Array<ts.TypeNode> = [];\n\n    for (const node of this._types) {\n      const type = this.$type(node);\n      if (ts.isUnionTypeNode(type)) {\n        flat.push(...type.types);\n      } else {\n        flat.push(type);\n      }\n    }\n\n    return ts.factory.createUnionTypeNode(flat);\n  }\n}\n"
  },
  {
    "path": "packages/openapi-ts/src/ts-dsl/type/param.ts",
    "content": "import type { AnalysisContext, NodeName, NodeScope, Ref } from '@hey-api/codegen-core';\nimport { ref } from '@hey-api/codegen-core';\nimport ts from 'typescript';\n\nimport type { MaybeTsDsl, TypeTsDsl } from '../base';\nimport { TsDsl } from '../base';\n\nexport type TypeParamExpr = NodeName | boolean | MaybeTsDsl<TypeTsDsl>;\n\nconst Mixed = TsDsl<ts.TypeParameterDeclaration>;\n\nexport class TypeParamTsDsl extends Mixed {\n  readonly '~dsl' = 'TypeParamTsDsl';\n  override scope: NodeScope = 'type';\n\n  protected constraint?: Ref<TypeParamExpr>;\n  protected defaultValue?: Ref<TypeParamExpr>;\n\n  constructor(name?: NodeName, fn?: (name: TypeParamTsDsl) => void) {\n    super();\n    if (name) this.name.set(name);\n    fn?.(this);\n  }\n\n  override analyze(ctx: AnalysisContext): void {\n    super.analyze(ctx);\n    ctx.analyze(this.name);\n    ctx.analyze(this.constraint);\n    ctx.analyze(this.defaultValue);\n  }\n\n  /** Sets the parameter default value. */\n  default(value: TypeParamExpr): this {\n    this.defaultValue = ref(value);\n    return this;\n  }\n\n  extends(constraint: TypeParamExpr): this {\n    this.constraint = ref(constraint);\n    return this;\n  }\n\n  override toAst() {\n    const name = this.name.toString();\n    if (!name) throw new Error('Missing type name');\n    return ts.factory.createTypeParameterDeclaration(\n      undefined,\n      this.$node(this.name) as ts.Identifier,\n      this.$type(this.constraint),\n      this.$type(this.defaultValue),\n    );\n  }\n}\n"
  },
  {
    "path": "packages/openapi-ts/src/ts-dsl/type/prop.ts",
    "content": "import type { AnalysisContext, NodeName, NodeScope, Ref } from '@hey-api/codegen-core';\nimport { ref } from '@hey-api/codegen-core';\nimport ts from 'typescript';\n\nimport type { MaybeTsDsl } from '../base';\nimport { TsDsl } from '../base';\nimport { DocMixin } from '../mixins/doc';\nimport { ReadonlyMixin } from '../mixins/modifiers';\nimport { OptionalMixin } from '../mixins/optional';\nimport { TokenTsDsl } from '../token';\nimport { safePropName } from '../utils/name';\n\nexport type TypePropType = NodeName | MaybeTsDsl<ts.TypeNode>;\nexport type TypePropKind = 'prop';\n\nconst Mixed = DocMixin(OptionalMixin(ReadonlyMixin(TsDsl<ts.TypeElement>)));\n\nexport class TypePropTsDsl extends Mixed {\n  readonly '~dsl' = 'TypePropTsDsl';\n  override scope: NodeScope = 'type';\n\n  protected _type?: Ref<TypePropType>;\n\n  constructor(name: NodeName, fn: (p: TypePropTsDsl) => void) {\n    super();\n    this.name.set(name);\n    fn(this);\n  }\n\n  /** Element kind. */\n  get kind(): TypePropKind {\n    return 'prop';\n  }\n\n  /** Property name. */\n  get propName(): string {\n    return this.name.toString();\n  }\n\n  override analyze(ctx: AnalysisContext): void {\n    super.analyze(ctx);\n    ctx.analyze(this._type);\n  }\n\n  /** Returns true when all required builder calls are present. */\n  get isValid(): boolean {\n    return this.missingRequiredCalls().length === 0;\n  }\n\n  /** Sets the property type. */\n  type(type: TypePropType): this {\n    this._type = ref(type);\n    return this;\n  }\n\n  override toAst() {\n    this.$validate();\n    const name = this.name.toString();\n    const node = ts.factory.createPropertySignature(\n      this.modifiers,\n      this.$node(safePropName(name)),\n      this._optional ? this.$node(new TokenTsDsl().optional()) : undefined,\n      this.$type(this._type),\n    );\n    return this.$docs(node);\n  }\n\n  $validate(): asserts this is this & {\n    _type: Ref<TypePropType>;\n  } {\n    const missing = this.missingRequiredCalls();\n    if (missing.length === 0) return;\n    const name = this.name.toString();\n    throw new Error(`Type property${name ? ` \"${name}\"` : ''} missing ${missing.join(' and ')}`);\n  }\n\n  private missingRequiredCalls(): ReadonlyArray<string> {\n    const missing: Array<string> = [];\n    if (!this._type) missing.push('.type()');\n    return missing;\n  }\n}\n"
  },
  {
    "path": "packages/openapi-ts/src/ts-dsl/type/query.ts",
    "content": "import type { AnalysisContext, NodeName, NodeScope, Ref } from '@hey-api/codegen-core';\nimport { ref } from '@hey-api/codegen-core';\nimport ts from 'typescript';\n\nimport type { MaybeTsDsl, TypeTsDsl } from '../base';\nimport { TsDsl } from '../base';\nimport { TypeExprMixin } from '../mixins/type-expr';\nimport { f } from '../utils/factories';\n\nexport type TypeQueryExpr = NodeName | MaybeTsDsl<TypeTsDsl | ts.Expression>;\nexport type TypeQueryCtor = (expr: TypeQueryExpr) => TypeQueryTsDsl;\n\nconst Mixed = TypeExprMixin(TsDsl<ts.TypeQueryNode>);\n\nexport class TypeQueryTsDsl extends Mixed {\n  readonly '~dsl' = 'TypeQueryTsDsl';\n  override scope: NodeScope = 'type';\n\n  protected _expr: Ref<TypeQueryExpr>;\n\n  constructor(expr: TypeQueryExpr) {\n    super();\n    this._expr = ref(expr);\n  }\n\n  override analyze(ctx: AnalysisContext): void {\n    super.analyze(ctx);\n    ctx.analyze(this._expr);\n  }\n\n  override toAst() {\n    const expr = this.$node(this._expr);\n    return ts.factory.createTypeQueryNode(expr as unknown as ts.EntityName);\n  }\n}\n\nf.type.query.set((...args) => new TypeQueryTsDsl(...args));\n"
  },
  {
    "path": "packages/openapi-ts/src/ts-dsl/type/template.ts",
    "content": "import type { AnalysisContext, NodeScope } from '@hey-api/codegen-core';\nimport ts from 'typescript';\n\nimport type { MaybeTsDsl } from '../base';\nimport { TsDsl } from '../base';\n\nconst Mixed = TsDsl<ts.TemplateLiteralTypeNode>;\n\nexport class TypeTemplateTsDsl extends Mixed {\n  readonly '~dsl' = 'TypeTemplateTsDsl';\n  override scope: NodeScope = 'type';\n\n  protected parts: Array<string | MaybeTsDsl<ts.TypeNode>> = [];\n\n  constructor(value?: string | MaybeTsDsl<ts.TypeNode>) {\n    super();\n    if (value !== undefined) this.add(value);\n  }\n\n  override analyze(ctx: AnalysisContext): void {\n    super.analyze(ctx);\n    for (const part of this.parts) {\n      ctx.analyze(part);\n    }\n  }\n\n  /** Adds a raw string segment or embedded type expression. */\n  add(part: string | MaybeTsDsl<ts.TypeNode>): this {\n    this.parts.push(part);\n    return this;\n  }\n\n  override toAst() {\n    const parts = this.$node(this.parts);\n\n    const normalized: Array<string | ts.TypeNode> = [];\n    // merge consecutive string parts\n    for (let index = 0; index < parts.length; index++) {\n      const current = parts[index]!;\n      if (typeof current === 'string') {\n        let merged = current;\n        while (index + 1 < parts.length && typeof parts[index + 1] === 'string') {\n          merged += parts[index + 1]!;\n          index++;\n        }\n        normalized.push(merged);\n      } else {\n        normalized.push(current);\n      }\n    }\n\n    if (normalized.length === 0 || typeof normalized[0] !== 'string') {\n      normalized.unshift('');\n    }\n\n    if (normalized.length === 1 && typeof normalized[0] === 'string') {\n      return ts.factory.createTemplateLiteralType(ts.factory.createTemplateHead(normalized[0]), []);\n    }\n\n    if (\n      normalized.length === 2 &&\n      typeof normalized[0] === 'string' &&\n      typeof normalized[1] !== 'string'\n    ) {\n      return ts.factory.createTemplateLiteralType(ts.factory.createTemplateHead(normalized[0]), [\n        ts.factory.createTemplateLiteralTypeSpan(normalized[1]!, ts.factory.createTemplateTail('')),\n      ]);\n    }\n\n    const head = ts.factory.createTemplateHead(normalized.shift() as string);\n    const spans: Array<ts.TemplateLiteralTypeSpan> = [];\n\n    while (normalized.length) {\n      const type = normalized.shift() as ts.TypeNode;\n      const next = typeof normalized[0] === 'string' ? (normalized.shift() as string) : '';\n      const isLast = normalized.length === 0;\n      spans.push(\n        ts.factory.createTemplateLiteralTypeSpan(\n          type,\n          isLast ? ts.factory.createTemplateTail(next) : ts.factory.createTemplateMiddle(next),\n        ),\n      );\n    }\n\n    return ts.factory.createTemplateLiteralType(head, spans);\n  }\n}\n"
  },
  {
    "path": "packages/openapi-ts/src/ts-dsl/type/tuple.ts",
    "content": "import type { AnalysisContext, NodeScope } from '@hey-api/codegen-core';\nimport ts from 'typescript';\n\nimport type { TypeTsDsl } from '../base';\nimport { TsDsl } from '../base';\n\nconst Mixed = TsDsl<ts.TupleTypeNode>;\n\nexport class TypeTupleTsDsl extends Mixed {\n  readonly '~dsl' = 'TypeTupleTsDsl';\n  override scope: NodeScope = 'type';\n\n  protected _elements: Array<string | ts.TypeNode | TypeTsDsl> = [];\n\n  constructor(...nodes: Array<string | ts.TypeNode | TypeTsDsl>) {\n    super();\n    this.elements(...nodes);\n  }\n\n  override analyze(ctx: AnalysisContext): void {\n    super.analyze(ctx);\n    for (const type of this._elements) {\n      ctx.analyze(type);\n    }\n  }\n\n  elements(...types: Array<string | ts.TypeNode | TypeTsDsl>): this {\n    this._elements.push(...types);\n    return this;\n  }\n\n  override toAst() {\n    return ts.factory.createTupleTypeNode(this._elements.map((t) => this.$type(t)));\n  }\n}\n"
  },
  {
    "path": "packages/openapi-ts/src/ts-dsl/utils/__tests__/name.test.ts",
    "content": "import { safeRuntimeName } from '../name';\n\ndescribe('safeRuntimeName', () => {\n  const scenarios: ReadonlyArray<{\n    name: string;\n    output: string;\n  }> = [\n    // browser globals\n    {\n      name: 'document',\n      output: 'document_',\n    },\n    {\n      name: 'fetch',\n      output: 'fetch_',\n    },\n    {\n      name: 'history',\n      output: 'history_',\n    },\n    {\n      name: 'location',\n      output: 'location_',\n    },\n    {\n      name: 'navigator',\n      output: 'navigator_',\n    },\n    {\n      name: 'window',\n      output: 'window_',\n    },\n    {\n      name: 'AbortController',\n      output: 'AbortController_',\n    },\n    {\n      name: 'AbortSignal',\n      output: 'AbortSignal_',\n    },\n    {\n      name: 'Blob',\n      output: 'Blob_',\n    },\n    {\n      name: 'CustomEvent',\n      output: 'CustomEvent_',\n    },\n    {\n      name: 'Event',\n      output: 'Event_',\n    },\n    {\n      name: 'EventTarget',\n      output: 'EventTarget_',\n    },\n    {\n      name: 'File',\n      output: 'File_',\n    },\n    {\n      name: 'FileList',\n      output: 'FileList_',\n    },\n    {\n      name: 'FileReader',\n      output: 'FileReader_',\n    },\n    {\n      name: 'FormData',\n      output: 'FormData_',\n    },\n    {\n      name: 'Headers',\n      output: 'Headers_',\n    },\n    {\n      name: 'Request',\n      output: 'Request_',\n    },\n    {\n      name: 'Response',\n      output: 'Response_',\n    },\n    {\n      name: 'TextDecoder',\n      output: 'TextDecoder_',\n    },\n    {\n      name: 'TextEncoder',\n      output: 'TextEncoder_',\n    },\n    {\n      name: 'URL',\n      output: 'URL_',\n    },\n    {\n      name: 'URLSearchParams',\n      output: 'URLSearchParams_',\n    },\n    // JavaScript globals\n    {\n      name: 'Array',\n      output: 'Array_',\n    },\n    {\n      name: 'ArrayBuffer',\n      output: 'ArrayBuffer_',\n    },\n    {\n      name: 'atob',\n      output: 'atob_',\n    },\n    {\n      name: 'BigInt',\n      output: 'BigInt_',\n    },\n    {\n      name: 'Boolean',\n      output: 'Boolean_',\n    },\n    {\n      name: 'btoa',\n      output: 'btoa_',\n    },\n    {\n      name: 'clearInterval',\n      output: 'clearInterval_',\n    },\n    {\n      name: 'clearTimeout',\n      output: 'clearTimeout_',\n    },\n    {\n      name: 'console',\n      output: 'console_',\n    },\n    {\n      name: 'crypto',\n      output: 'crypto_',\n    },\n    {\n      name: 'DataView',\n      output: 'DataView_',\n    },\n    {\n      name: 'Date',\n      output: 'Date_',\n    },\n    {\n      name: 'Error',\n      output: 'Error_',\n    },\n    {\n      name: 'Function',\n      output: 'Function_',\n    },\n    {\n      name: 'globalThis',\n      output: 'globalThis_',\n    },\n    {\n      name: 'Infinity',\n      output: 'Infinity_',\n    },\n    {\n      name: 'Intl',\n      output: 'Intl_',\n    },\n    {\n      name: 'JSON',\n      output: 'JSON_',\n    },\n    {\n      name: 'Map',\n      output: 'Map_',\n    },\n    {\n      name: 'Math',\n      output: 'Math_',\n    },\n    {\n      name: 'NaN',\n      output: 'NaN_',\n    },\n    {\n      name: 'Number',\n      output: 'Number_',\n    },\n    {\n      name: 'Object',\n      output: 'Object_',\n    },\n    {\n      name: 'performance',\n      output: 'performance_',\n    },\n    {\n      name: 'Promise',\n      output: 'Promise_',\n    },\n    {\n      name: 'Proxy',\n      output: 'Proxy_',\n    },\n    {\n      name: 'queueMicrotask',\n      output: 'queueMicrotask_',\n    },\n    {\n      name: 'Reflect',\n      output: 'Reflect_',\n    },\n    {\n      name: 'RegExp',\n      output: 'RegExp_',\n    },\n    {\n      name: 'Set',\n      output: 'Set_',\n    },\n    {\n      name: 'setInterval',\n      output: 'setInterval_',\n    },\n    {\n      name: 'setTimeout',\n      output: 'setTimeout_',\n    },\n    {\n      name: 'String',\n      output: 'String_',\n    },\n    {\n      name: 'structuredClone',\n      output: 'structuredClone_',\n    },\n    {\n      name: 'Symbol',\n      output: 'Symbol_',\n    },\n    {\n      name: 'WeakMap',\n      output: 'WeakMap_',\n    },\n    {\n      name: 'WeakSet',\n      output: 'WeakSet_',\n    },\n    // JavaScript keywords\n    {\n      name: 'arguments',\n      output: 'arguments_',\n    },\n    {\n      name: 'async',\n      output: 'async_',\n    },\n    {\n      name: 'await',\n      output: 'await_',\n    },\n    {\n      name: 'break',\n      output: 'break_',\n    },\n    {\n      name: 'case',\n      output: 'case_',\n    },\n    {\n      name: 'catch',\n      output: 'catch_',\n    },\n    {\n      name: 'class',\n      output: 'class_',\n    },\n    {\n      name: 'const',\n      output: 'const_',\n    },\n    {\n      name: 'continue',\n      output: 'continue_',\n    },\n    {\n      name: 'debugger',\n      output: 'debugger_',\n    },\n    {\n      name: 'default',\n      output: 'default_',\n    },\n    {\n      name: 'delete',\n      output: 'delete_',\n    },\n    {\n      name: 'do',\n      output: 'do_',\n    },\n    {\n      name: 'else',\n      output: 'else_',\n    },\n    {\n      name: 'enum',\n      output: 'enum_',\n    },\n    {\n      name: 'eval',\n      output: 'eval_',\n    },\n    {\n      name: 'export',\n      output: 'export_',\n    },\n    {\n      name: 'extends',\n      output: 'extends_',\n    },\n    {\n      name: 'false',\n      output: 'false_',\n    },\n    {\n      name: 'finally',\n      output: 'finally_',\n    },\n    {\n      name: 'for',\n      output: 'for_',\n    },\n    {\n      name: 'from',\n      output: 'from_',\n    },\n    {\n      name: 'function',\n      output: 'function_',\n    },\n    {\n      name: 'if',\n      output: 'if_',\n    },\n    {\n      name: 'implements',\n      output: 'implements_',\n    },\n    {\n      name: 'import',\n      output: 'import_',\n    },\n    {\n      name: 'in',\n      output: 'in_',\n    },\n    {\n      name: 'instanceof',\n      output: 'instanceof_',\n    },\n    {\n      name: 'interface',\n      output: 'interface_',\n    },\n    {\n      name: 'let',\n      output: 'let_',\n    },\n    {\n      name: 'new',\n      output: 'new_',\n    },\n    {\n      name: 'null',\n      output: 'null_',\n    },\n    {\n      name: 'package',\n      output: 'package_',\n    },\n    {\n      name: 'private',\n      output: 'private_',\n    },\n    {\n      name: 'protected',\n      output: 'protected_',\n    },\n    {\n      name: 'public',\n      output: 'public_',\n    },\n    {\n      name: 'return',\n      output: 'return_',\n    },\n    {\n      name: 'static',\n      output: 'static_',\n    },\n    {\n      name: 'super',\n      output: 'super_',\n    },\n    {\n      name: 'switch',\n      output: 'switch_',\n    },\n    {\n      name: 'this',\n      output: 'this_',\n    },\n    {\n      name: 'throw',\n      output: 'throw_',\n    },\n    {\n      name: 'true',\n      output: 'true_',\n    },\n    {\n      name: 'try',\n      output: 'try_',\n    },\n    {\n      name: 'typeof',\n      output: 'typeof_',\n    },\n    {\n      name: 'var',\n      output: 'var_',\n    },\n    {\n      name: 'void',\n      output: 'void_',\n    },\n    {\n      name: 'while',\n      output: 'while_',\n    },\n    {\n      name: 'with',\n      output: 'with_',\n    },\n    {\n      name: 'yield',\n      output: 'yield_',\n    },\n    // Node.js globals\n    {\n      name: '__dirname',\n      output: '__dirname_',\n    },\n    {\n      name: '__filename',\n      output: '__filename_',\n    },\n    {\n      name: 'exports',\n      output: 'exports_',\n    },\n    {\n      name: 'global',\n      output: 'global_',\n    },\n    {\n      name: 'module',\n      output: 'module_',\n    },\n    {\n      name: 'process',\n      output: 'process_',\n    },\n    {\n      name: 'require',\n      output: 'require_',\n    },\n    {\n      name: 'Buffer',\n      output: 'Buffer_',\n    },\n    // TypeScript keywords\n    {\n      name: 'any',\n      output: 'any_',\n    },\n    {\n      name: 'as',\n      output: 'as_',\n    },\n    {\n      name: 'bigint',\n      output: 'bigint_',\n    },\n    {\n      name: 'boolean',\n      output: 'boolean_',\n    },\n    {\n      name: 'namespace',\n      output: 'namespace_',\n    },\n    {\n      name: 'never',\n      output: 'never_',\n    },\n    {\n      name: 'null',\n      output: 'null_',\n    },\n    {\n      name: 'number',\n      output: 'number_',\n    },\n    {\n      name: 'string',\n      output: 'string_',\n    },\n    {\n      name: 'symbol',\n      output: 'symbol_',\n    },\n    {\n      name: 'type',\n      output: 'type_',\n    },\n    {\n      name: 'undefined',\n      output: 'undefined_',\n    },\n    {\n      name: 'unknown',\n      output: 'unknown_',\n    },\n    {\n      name: 'void',\n      output: 'void_',\n    },\n  ];\n\n  it.each(scenarios)('transforms $name -> $output', async ({ name, output }) => {\n    expect(safeRuntimeName(name)).toEqual(output);\n  });\n});\n"
  },
  {
    "path": "packages/openapi-ts/src/ts-dsl/utils/__tests__/render.test.ts",
    "content": "import type { RenderContext } from '@hey-api/codegen-core';\nimport { Project } from '@hey-api/codegen-core';\nimport ts from 'typescript';\n\nimport type { TsDsl } from '../../../ts-dsl';\nimport { TypeScriptRenderer } from '../render';\nimport type { ModuleExport, ModuleImport } from '../render-utils';\n\ndescribe('TypeScriptRenderer', () => {\n  const renderer = new TypeScriptRenderer();\n\n  const mockFile = (overrides: any = {}) => ({\n    exports: [],\n    imports: [],\n    language: 'typescript',\n    nodes: [],\n    ...overrides,\n  });\n\n  const mockCtx = (fileOverrides = {}, projectOverrides = {}): RenderContext<TsDsl> => ({\n    file: mockFile(fileOverrides),\n    project: new Project({\n      root: '/root',\n      ...projectOverrides,\n    }),\n  });\n\n  it('supports() returns true only for typescript files', () => {\n    expect(renderer.supports(mockCtx({ language: 'typescript' }))).toBe(true);\n    expect(renderer.supports(mockCtx({ language: 'javascript' }))).toBe(false);\n  });\n\n  it('renderImport() generates named and namespace imports correctly', () => {\n    const group: ModuleImport = {\n      imports: [\n        {\n          isTypeOnly: false,\n          localName: 'A',\n          sourceName: 'A',\n        },\n      ],\n      isTypeOnly: false,\n      kind: 'named',\n      localName: undefined,\n      modulePath: 'foo',\n    };\n    const node = TypeScriptRenderer.toImportAst(group);\n    expect(ts.isImportDeclaration(node)).toBe(true);\n  });\n\n  it('renderExport() generates named and namespace exports correctly', () => {\n    const group: ModuleExport = {\n      canExportAll: false,\n      exports: [\n        {\n          exportedName: 'B',\n          isTypeOnly: false,\n          kind: 'named',\n          sourceName: 'B',\n        },\n      ],\n      isTypeOnly: false,\n      modulePath: 'bar',\n      namespaceExport: undefined,\n    };\n    const node = TypeScriptRenderer.toExportAst(group);\n    expect(ts.isExportDeclaration(node)).toBe(true);\n  });\n});\n"
  },
  {
    "path": "packages/openapi-ts/src/ts-dsl/utils/context.ts",
    "content": "import type { BindingKind, NodeScope, Symbol } from '@hey-api/codegen-core';\nimport { isSymbol } from '@hey-api/codegen-core';\nimport type { MaybeFunc } from '@hey-api/types';\nimport type ts from 'typescript';\n\nimport type { DollarTsDsl } from '../../ts-dsl';\nimport { $, TypeScriptRenderer } from '../../ts-dsl';\nimport type { TsDsl } from '../base';\nimport type { CallArgs } from '../expr/call';\n\nexport type NodeChain = ReadonlyArray<TsDsl>;\n\nexport interface AccessOptions {\n  /** The access context. */\n  context?: 'example';\n  /** Enable debug mode. */\n  debug?: boolean;\n  /** Transform function for each node in the access chain. */\n  transform?: (node: TsDsl, index: number, chain: NodeChain) => TsDsl;\n}\n\nexport type AccessResult = ReturnType<typeof $.expr | typeof $.attr | typeof $.call | typeof $.new>;\n\nexport interface ExampleOptions {\n  /** Import kind for the root node. */\n  importKind?: BindingKind;\n  /** Import name for the root node. */\n  importName?: string;\n  /** Setup to run before calling the example. */\n  importSetup?: MaybeFunc<\n    (\n      ctx: DollarTsDsl & {\n        /** The imported expression. */\n        node: TsDsl<ts.Expression>;\n      },\n    ) => TsDsl<ts.Expression>\n  >;\n  /** Module to import from. */\n  moduleName?: string;\n  /** Example request payload. */\n  payload?: MaybeFunc<(ctx: DollarTsDsl) => CallArgs | CallArgs[number]>;\n  /** Variable name for setup node. */\n  setupName?: string;\n}\n\nfunction accessChainToNode<T = AccessResult>(accessChain: NodeChain): T {\n  let result!: AccessResult;\n  accessChain.forEach((node, index) => {\n    if (index === 0) {\n      // assume correct node\n      result = node as typeof result;\n    } else {\n      result = result.attr(node.name);\n    }\n  });\n  return result as T;\n}\n\nfunction getAccessChainForNode(node: TsDsl): NodeChain {\n  const structuralChain = [...getStructuralChainForNode(node, new Set())];\n  const accessChain = structuralToAccessChain(structuralChain);\n  if (accessChain.length === 0) {\n    // I _think_ this should not happen, but it does and this fix works for now.\n    // I assume this will cause issues with imports in some cases, investigate\n    // when it actually happens.\n    return [node.clone()];\n  }\n  return accessChain.map((node) => node.clone());\n}\n\nfunction getScope(node: TsDsl): NodeScope {\n  return node.scope ?? 'value';\n}\n\nfunction getStructuralChainForNode(node: TsDsl, visited: Set<TsDsl>): NodeChain {\n  if (visited.has(node)) return [];\n  visited.add(node);\n\n  if (isStopNode(node)) return [];\n\n  if (node.structuralParents) {\n    for (const [parent] of node.structuralParents) {\n      if (getScope(parent) !== getScope(node)) continue;\n\n      const chain = getStructuralChainForNode(parent, visited);\n      if (chain.length > 0) return [...chain, node];\n    }\n  }\n\n  if (!node.root) return [];\n\n  return [node];\n}\n\nfunction isAccessorNode(node: TsDsl): boolean {\n  return (\n    node['~dsl'] === 'FieldTsDsl' ||\n    node['~dsl'] === 'GetterTsDsl' ||\n    node['~dsl'] === 'MethodTsDsl'\n  );\n}\n\nfunction isStopNode(node: TsDsl): boolean {\n  return node['~dsl'] === 'FuncTsDsl' || node['~dsl'] === 'TemplateTsDsl';\n}\n\n/**\n * Fold a structural chain to an access chain by removing\n * non-accessor nodes.\n */\nfunction structuralToAccessChain(structuralChain: NodeChain): NodeChain {\n  const accessChain: Array<TsDsl> = [];\n  structuralChain.forEach((node, index) => {\n    // assume first node is always included\n    if (index === 0) {\n      accessChain.push(node);\n    } else if (isAccessorNode(node)) {\n      accessChain.push(node);\n    }\n  });\n  return accessChain;\n}\n\nfunction transformAccessChain(accessChain: NodeChain, options: AccessOptions = {}): NodeChain {\n  return accessChain.map((node, index) => {\n    const transformedNode = options.transform?.(node, index, accessChain);\n    if (transformedNode) return transformedNode;\n    const accessNode = node.toAccessNode?.(node, options, {\n      chain: accessChain,\n      index,\n      isLeaf: index === accessChain.length - 1,\n      isRoot: index === 0,\n      length: accessChain.length,\n    });\n    if (accessNode) return accessNode;\n    if (index === 0) {\n      if (node['~dsl'] === 'ClassTsDsl') {\n        const nextNode = accessChain[index + 1];\n        if (nextNode && isAccessorNode(nextNode)) {\n          if ((nextNode as ReturnType<typeof $.field>).hasModifier('static')) {\n            return $(node.name);\n          }\n        }\n        return $.new(node.name).args();\n      }\n      return $(node.name);\n    }\n    return node;\n  });\n}\n\nexport class TsDslContext {\n  /**\n   * Build an expression for accessing the node.\n   *\n   * @param node - The node or symbol to build access for\n   * @param options - Access options\n   * @returns Expression for accessing the node\n   *\n   * @example\n   * ```ts\n   * ctx.access(node); // → Expression for accessing the node\n   * ```\n   */\n  access<T = AccessResult>(node: TsDsl | Symbol<TsDsl>, options?: AccessOptions): T {\n    const n = isSymbol(node) ? node.node : node;\n    if (!n) {\n      throw new Error(`Symbol ${node.name} is not resolved to a node.`);\n    }\n    const accessChain = getAccessChainForNode(n);\n    const finalChain = transformAccessChain(accessChain, options);\n    return accessChainToNode<T>(finalChain);\n  }\n\n  /**\n   * Build an example.\n   *\n   * @param node - The node to generate an example for\n   * @param options - Example options\n   * @returns Full example string\n   *\n   * @example\n   * ```ts\n   * ctx.example(node, { moduleName: 'my-sdk' }); // → Full example string\n   * ```\n   */\n  example(\n    node: TsDsl,\n    options?: ExampleOptions,\n    astOptions?: Parameters<typeof TypeScriptRenderer.astToString>[0],\n  ): string {\n    if (astOptions) {\n      return TypeScriptRenderer.astToString(astOptions);\n    }\n\n    options ||= {};\n\n    const accessChain = getAccessChainForNode(node);\n    if (options.importName) {\n      accessChain[0]!.name.set(options.importName);\n    }\n    const importNode = $(accessChain[0]!.name.toString()); // must store name before transform\n    const finalChain = transformAccessChain(accessChain, {\n      context: 'example',\n    });\n\n    const setupNode = options.importSetup\n      ? typeof options.importSetup === 'function'\n        ? options.importSetup({ $, node: importNode })\n        : options.importSetup\n      : (finalChain[0]! as TsDsl<ts.Expression>);\n    const setupName = options.setupName;\n    let payload = typeof options.payload === 'function' ? options.payload({ $ }) : options.payload;\n    payload = payload instanceof Array ? payload : payload ? [payload] : [];\n\n    let nodes: Array<TsDsl> = [];\n    if (setupName) {\n      nodes = [\n        $.const(setupName).assign(setupNode),\n        $.await(accessChainToNode([$(setupName), ...finalChain.slice(1)]).call(...payload)),\n      ];\n    } else {\n      nodes = [$.await(accessChainToNode([setupNode, ...finalChain.slice(1)]).call(...payload))];\n    }\n\n    const localName = importNode.name.toString();\n    return TypeScriptRenderer.astToString({\n      imports: [\n        [\n          {\n            imports:\n              !options.importKind || options.importKind === 'named'\n                ? [\n                    {\n                      isTypeOnly: false,\n                      localName,\n                      sourceName: localName,\n                    },\n                  ]\n                : [],\n            isTypeOnly: false,\n            kind: options.importKind ?? 'named',\n            localName: options.importKind !== 'named' ? localName : undefined,\n            modulePath: options.moduleName ?? 'your-package',\n          },\n        ],\n      ],\n      nodes,\n      trailingNewline: false,\n    });\n  }\n}\n\nexport const ctx = new TsDslContext();\n"
  },
  {
    "path": "packages/openapi-ts/src/ts-dsl/utils/factories.ts",
    "content": "import type { AsCtor } from '../expr/as';\nimport type { AttrCtor } from '../expr/attr';\nimport type { AwaitCtor } from '../expr/await';\nimport type { CallCtor } from '../expr/call';\nimport type { NewCtor } from '../expr/new';\nimport type { TypeOfExprCtor } from '../expr/typeof';\nimport type { ReturnCtor } from '../stmt/return';\nimport type { TypeExprCtor } from '../type/expr';\nimport type { TypeIdxCtor } from '../type/idx';\nimport type { TypeOperatorCtor } from '../type/operator';\nimport type { TypeQueryCtor } from '../type/query';\n\ntype Ctor = (...args: Array<any>) => any;\n\ntype Factory<T extends Ctor> = {\n  (...args: Parameters<T>): ReturnType<T>;\n  /** Sets the implementation of this factory. */\n  set(fn: T): void;\n};\n\nfunction createFactory<T extends Ctor>(name: string): Factory<T> {\n  let impl: T | undefined;\n\n  const slot = ((...args: Parameters<T>) => {\n    if (!impl) throw new Error(`${name} factory not registered`);\n    return impl(...args);\n  }) as Factory<T>;\n\n  slot.set = (fn: T) => {\n    impl = fn;\n  };\n\n  return slot;\n}\n\nexport const f = {\n  /** Factory for creating `as` type assertion expressions (e.g. `value as Type`). */\n  as: createFactory<AsCtor>('as'),\n\n  /** Factory for creating property access expressions (e.g. `obj.foo`). */\n  attr: createFactory<AttrCtor>('attr'),\n\n  /** Factory for creating await expressions (e.g. `await promise`). */\n  await: createFactory<AwaitCtor>('await'),\n\n  /** Factory for creating function or method call expressions (e.g. `fn(arg)`). */\n  call: createFactory<CallCtor>('call'),\n\n  /** Factory for creating new expressions (e.g. `new ClassName()`). */\n  new: createFactory<NewCtor>('new'),\n\n  /** Factory for creating return statements. */\n  return: createFactory<ReturnCtor>('return'),\n\n  /** Factories for creating type nodes. */\n  type: {\n    /** Factory for creating basic type references or type expressions (e.g. Foo or Foo<T>). */\n    expr: createFactory<TypeExprCtor>('type.expr'),\n\n    /** Factory for creating indexed-access types (e.g. `Foo<T>[K]`). */\n    idx: createFactory<TypeIdxCtor>('type.idx'),\n\n    /** Factory for creating type operator nodes (e.g. `readonly T`, `keyof T`, `unique T`). */\n    operator: createFactory<TypeOperatorCtor>('type.operator'),\n\n    /** Factory for creating type query nodes (e.g. `typeof Foo`). */\n    query: createFactory<TypeQueryCtor>('type.query'),\n  },\n\n  /** Factory for creating `typeof` expressions (e.g. `typeof value`). */\n  typeofExpr: createFactory<TypeOfExprCtor>('typeofExpr'),\n};\n"
  },
  {
    "path": "packages/openapi-ts/src/ts-dsl/utils/keywords.ts",
    "content": "const browserGlobals = [\n  'AbortController',\n  'AbortSignal',\n  'Blob',\n  'CustomEvent',\n  'document',\n  'Event',\n  'EventTarget',\n  'fetch',\n  'File',\n  'FileList',\n  'FileReader',\n  'FormData',\n  'Headers',\n  'history',\n  'location',\n  'navigator',\n  'Request',\n  'Response',\n  'TextDecoder',\n  'TextEncoder',\n  'URL',\n  'URLSearchParams',\n  'window',\n];\n\nconst javaScriptGlobals = [\n  'Array',\n  'ArrayBuffer',\n  'atob',\n  'BigInt',\n  'Boolean',\n  'btoa',\n  'clearInterval',\n  'clearTimeout',\n  'console',\n  'crypto',\n  'DataView',\n  'Date',\n  'Error',\n  'Function',\n  'globalThis',\n  'Infinity',\n  'Intl',\n  'JSON',\n  'Map',\n  'Math',\n  'NaN',\n  'Number',\n  'Object',\n  'performance',\n  'Promise',\n  'Proxy',\n  'queueMicrotask',\n  'Reflect',\n  'RegExp',\n  'Set',\n  'setInterval',\n  'setTimeout',\n  'String',\n  'structuredClone',\n  'Symbol',\n  'WeakMap',\n  'WeakSet',\n];\n\nconst javaScriptKeywords = [\n  'arguments',\n  'async',\n  'await',\n  'break',\n  'case',\n  'catch',\n  'class',\n  'const',\n  'continue',\n  'debugger',\n  'default',\n  'delete',\n  'do',\n  'else',\n  'enum',\n  'eval',\n  'export',\n  'extends',\n  'false',\n  'finally',\n  'for',\n  'from',\n  'function',\n  'if',\n  'implements',\n  'import',\n  'in',\n  'instanceof',\n  'interface',\n  'let',\n  'new',\n  'null',\n  'package',\n  'private',\n  'protected',\n  'public',\n  'return',\n  'static',\n  'super',\n  'switch',\n  'this',\n  'throw',\n  'true',\n  'try',\n  'typeof',\n  'var',\n  'void',\n  'while',\n  'with',\n  'yield',\n];\n\nconst nodeGlobals = [\n  '__dirname',\n  '__filename',\n  'Buffer',\n  'exports',\n  'global',\n  'module',\n  'process',\n  'require',\n];\n\nconst typeScriptKeywords = [\n  'any',\n  'as',\n  'bigint',\n  'boolean',\n  'namespace',\n  'never',\n  'null',\n  'number',\n  'string',\n  'symbol',\n  'type',\n  'undefined',\n  'unknown',\n  'void',\n];\n\nexport const keywords = {\n  browserGlobals,\n  javaScriptGlobals,\n  javaScriptKeywords,\n  nodeGlobals,\n  typeScriptKeywords,\n};\n"
  },
  {
    "path": "packages/openapi-ts/src/ts-dsl/utils/lazy.ts",
    "content": "import type { AnalysisContext } from '@hey-api/codegen-core';\nimport type ts from 'typescript';\n\nimport { TsDsl } from '../base';\nimport type { TsDslContext } from './context';\nimport { ctx } from './context';\n\nexport type LazyThunk<T extends ts.Node> = (ctx: TsDslContext) => TsDsl<T>;\n\nexport class LazyTsDsl<T extends ts.Node = ts.Node> extends TsDsl<T> {\n  readonly '~dsl' = 'LazyTsDsl';\n\n  private _thunk: LazyThunk<T>;\n\n  constructor(thunk: LazyThunk<T>) {\n    super();\n    this._thunk = thunk;\n  }\n\n  override analyze(ctx: AnalysisContext): void {\n    super.analyze(ctx);\n    ctx.analyze(this.toResult());\n  }\n\n  toResult(): TsDsl<T> {\n    return this._thunk(ctx);\n  }\n\n  override toAst() {\n    return this.toResult().toAst();\n  }\n}\n"
  },
  {
    "path": "packages/openapi-ts/src/ts-dsl/utils/name.ts",
    "content": "import type ts from 'typescript';\n\nimport type { TsDsl } from '../base';\nimport { IdTsDsl } from '../expr/id';\nimport { LiteralTsDsl } from '../expr/literal';\nimport { regexp } from './regexp';\nimport type { ReservedList } from './reserved';\nimport { reserved } from './reserved';\n\nexport const safeAccessorName = (name: string): string => {\n  regexp.number.lastIndex = 0;\n  if (regexp.number.test(name)) {\n    return name.startsWith('-') ? `'${name}'` : name;\n  }\n\n  regexp.typeScriptIdentifier.lastIndex = 0;\n  if (regexp.typeScriptIdentifier.test(name)) {\n    return name;\n  }\n  return `'${name}'`;\n};\n\nexport const safeMemberName = (name: string): TsDsl<ts.StringLiteral> | IdTsDsl => {\n  regexp.typeScriptIdentifier.lastIndex = 0;\n  if (regexp.typeScriptIdentifier.test(name)) {\n    return new IdTsDsl(name);\n  }\n  return new LiteralTsDsl(name) as TsDsl<ts.StringLiteral>;\n};\n\nexport const safePropName = (\n  name: string,\n): TsDsl<ts.StringLiteral | ts.NumericLiteral> | IdTsDsl => {\n  regexp.number.lastIndex = 0;\n  if (regexp.number.test(name)) {\n    return name.startsWith('-')\n      ? (new LiteralTsDsl(name) as TsDsl<ts.StringLiteral>)\n      : (new LiteralTsDsl(Number(name)) as TsDsl<ts.NumericLiteral>);\n  }\n\n  regexp.typeScriptIdentifier.lastIndex = 0;\n  if (regexp.typeScriptIdentifier.test(name)) {\n    return new IdTsDsl(name);\n  }\n\n  return new LiteralTsDsl(name) as TsDsl<ts.StringLiteral>;\n};\n\nconst validTypeScriptChar = /^[\\u200c\\u200d\\p{ID_Continue}]$/u;\n\nconst safeName = (name: string, reserved: ReservedList): string => {\n  let sanitized = '';\n  let index: number;\n\n  const first = name[0] ?? '';\n  regexp.illegalStartCharacters.lastIndex = 0;\n  if (regexp.illegalStartCharacters.test(first)) {\n    // Check if character becomes valid when not in leading position (e.g., digits)\n    if (validTypeScriptChar.test(first)) {\n      sanitized += '_';\n      index = 0;\n    } else {\n      sanitized += '_';\n      index = 1;\n    }\n  } else {\n    sanitized += first;\n    index = 1;\n  }\n\n  while (index < name.length) {\n    const char = name[index] ?? '';\n    sanitized += validTypeScriptChar.test(char) ? char : '_';\n    index += 1;\n  }\n\n  if (reserved['~values'].has(sanitized)) {\n    sanitized = `${sanitized}_`;\n  }\n\n  return sanitized || '_';\n};\n\nexport const safeRuntimeName = (name: string): string => safeName(name, reserved.runtime);\n\nexport const safeTypeName = (name: string): string => safeName(name, reserved.type);\n"
  },
  {
    "path": "packages/openapi-ts/src/ts-dsl/utils/regexp.ts",
    "content": "/**\n * Matches characters from the start as long as they're not allowed.\n */\nconst illegalStartCharactersRegExp = /^[^$_\\p{ID_Start}]+/u;\n\n/**\n * Matches string if it contains only digits and optionally decimal point or\n * leading minus sign.\n */\nconst numberRegExp = /^-?\\d+(\\.\\d+)?$/;\n\n/**\n * Javascript identifier regexp pattern retrieved from\n * {@link} https://developer.mozilla.org/docs/Web/JavaScript/Reference/Lexical_grammar#identifiers\n */\nconst validTypescriptIdentifierRegExp = /^[$_\\p{ID_Start}][$\\u200c\\u200d\\p{ID_Continue}]*$/u;\n\nexport const regexp = {\n  /**\n   * Matches characters from the start as long as they're not allowed.\n   */\n  illegalStartCharacters: illegalStartCharactersRegExp,\n  /**\n   * Matches string if it contains only digits and optionally decimal point or\n   * leading minus sign.\n   */\n  number: numberRegExp,\n  /**\n   * Javascript identifier regexp pattern retrieved from\n   * {@link} https://developer.mozilla.org/docs/Web/JavaScript/Reference/Lexical_grammar#identifiers\n   */\n  typeScriptIdentifier: validTypescriptIdentifierRegExp,\n};\n"
  },
  {
    "path": "packages/openapi-ts/src/ts-dsl/utils/render-utils.ts",
    "content": "import path from 'node:path';\n\nimport type { ExportModule, File, ImportModule } from '@hey-api/codegen-core';\nimport ts from 'typescript';\n\nconst printer = ts.createPrinter({\n  newLine: ts.NewLineKind.LineFeed,\n  removeComments: false,\n});\n\nconst blankFile = ts.createSourceFile('', '', ts.ScriptTarget.ESNext, false, ts.ScriptKind.TS);\n\n/** Print a TypeScript node to a string. */\nexport function astToString(node: ts.Node): string {\n  const result = printer.printNode(ts.EmitHint.Unspecified, node, blankFile);\n\n  try {\n    /**\n     * TypeScript Compiler API escapes unicode characters by default and there\n     * is no way to disable this behavior\n     * {@link https://github.com/microsoft/TypeScript/issues/36174}\n     */\n    return result.replace(/\\\\u([0-9a-fA-F]{4})/g, (_, hex: string) =>\n      String.fromCharCode(Number.parseInt(hex, 16)),\n    );\n  } catch {\n    return result;\n  }\n}\n\nexport const nodeBuiltins = new Set([\n  'buffer',\n  'child_process',\n  'cluster',\n  'console',\n  'constants',\n  'crypto',\n  'dgram',\n  'dns',\n  'domain',\n  'events',\n  'freelist',\n  'fs',\n  'http',\n  'https',\n  'module',\n  'net',\n  'os',\n  'path',\n  'process',\n  'punycode',\n  'querystring',\n  'readline',\n  'repl',\n  'stream',\n  'string_decoder',\n  'timers',\n  'tls',\n  'tty',\n  'url',\n  'util',\n  'v8',\n  'vm',\n  'worker_threads',\n  'zlib',\n]);\n\nexport type SortGroup = number;\nexport type SortDistance = number;\nexport type SortModule = string;\nexport type SortKey = [SortGroup, SortDistance, SortModule];\n\nexport type ModuleExport = Omit<ExportModule, 'from'> & {\n  /** Module specifier for re-exports, e.g. `./foo`. */\n  modulePath: string;\n};\n\nexport type ModuleImport = Omit<ImportModule, 'from'> & {\n  /** Module specifier for imports, e.g. `./foo`. */\n  modulePath: string;\n};\n\nexport function moduleSortKey({\n  file,\n  fromFile,\n  preferFileExtension,\n  root,\n}: {\n  file: Pick<File, 'finalPath'>;\n  fromFile: Pick<File, 'finalPath' | 'extension' | 'external' | 'name'>;\n  preferFileExtension: string;\n  root: string;\n}): SortKey {\n  const filePath = file.finalPath!.split(path.sep).join('/');\n  let modulePath = fromFile.finalPath!.split(path.sep).join('/');\n\n  // built-ins\n  // TODO: based on nodeBuiltins set\n\n  // external\n  if (fromFile.external && !path.isAbsolute(modulePath)) {\n    return [0, 0, modulePath];\n  }\n\n  // outside project root\n  if (!modulePath.startsWith(root.split(path.sep).join('/'))) {\n    return [1, 0, modulePath];\n  }\n\n  // local\n  const rel = path\n    .relative(path.dirname(filePath), path.dirname(modulePath))\n    .split(path.sep)\n    .join('/');\n\n  let parentCount: number;\n  // same folder\n  if (!rel.startsWith('..')) {\n    modulePath = `./${rel ? `${rel}/` : ''}${fromFile.name}${fromFile.extension ?? ''}`;\n    parentCount = 0;\n  } else {\n    modulePath = `${rel}/${fromFile.name}${fromFile.extension ?? ''}`;\n    parentCount = rel.split(path.sep).filter((segment) => segment === '..').length;\n  }\n\n  if (modulePath.endsWith('.ts')) {\n    modulePath = modulePath.slice(0, -'.ts'.length);\n  }\n  if (preferFileExtension) {\n    modulePath += preferFileExtension;\n  } else if (modulePath.endsWith('/index')) {\n    modulePath = modulePath.slice(0, -'/index'.length);\n  }\n\n  return [2, parentCount, modulePath];\n}\n"
  },
  {
    "path": "packages/openapi-ts/src/ts-dsl/utils/render.ts",
    "content": "import type { RenderContext, Renderer } from '@hey-api/codegen-core';\nimport type { BaseOutput } from '@hey-api/shared';\nimport type { MaybeArray, MaybeFunc } from '@hey-api/types';\nimport ts from 'typescript';\n\nimport type { TsDsl } from '../../ts-dsl';\nimport { $ } from '../../ts-dsl';\nimport type { ModuleExport, ModuleImport, SortGroup, SortKey, SortModule } from './render-utils';\nimport { astToString, moduleSortKey } from './render-utils';\n\ntype Exports = ReadonlyArray<ReadonlyArray<ModuleExport>>;\ntype ExportsOptions = {\n  preferExportAll?: boolean;\n};\ntype Header = MaybeArray<string> | null | undefined;\ntype HeaderArg = MaybeFunc<(ctx: RenderContext<TsDsl>) => Header>;\ntype Imports = ReadonlyArray<ReadonlyArray<ModuleImport>>;\n\nfunction headerToLines(header: Header): ReadonlyArray<string> {\n  if (!header) return [];\n  const lines: Array<string> = [];\n  if (typeof header === 'string') {\n    lines.push(...header.split(/\\r?\\n/));\n    return lines;\n  }\n  for (const line of header) {\n    lines.push(...line.split(/\\r?\\n/));\n  }\n  return lines;\n}\n\nexport class TypeScriptRenderer implements Renderer {\n  /**\n   * Function to generate a file header.\n   *\n   * @private\n   */\n  private _header?: HeaderArg;\n  /**\n   * Options for module specifier resolution.\n   *\n   * @private\n   */\n  private _module?: Partial<BaseOutput>['module'];\n  /**\n   * Whether `export * from 'module'` should be used when possible instead of named exports.\n   *\n   * @private\n   */\n  private _preferExportAll: boolean;\n\n  constructor(\n    args: Pick<Partial<BaseOutput>, 'module'> & {\n      header?: HeaderArg;\n      preferExportAll?: boolean;\n    } = {},\n  ) {\n    this._header = args.header;\n    this._module = args.module;\n    this._preferExportAll = args.preferExportAll ?? false;\n  }\n\n  render(ctx: RenderContext<TsDsl>): string {\n    const header = typeof this._header === 'function' ? this._header(ctx) : this._header;\n    return TypeScriptRenderer.astToString({\n      exports: this.getExports(ctx),\n      exportsOptions: {\n        preferExportAll: this._preferExportAll,\n      },\n      header,\n      imports: this.getImports(ctx),\n      nodes: ctx.file.nodes,\n    });\n  }\n\n  supports(ctx: RenderContext): boolean {\n    return ctx.file.language === 'typescript';\n  }\n\n  static astToString(args: {\n    exports?: Exports;\n    exportsOptions?: ExportsOptions;\n    header?: Header;\n    imports?: Imports;\n    nodes?: ReadonlyArray<TsDsl>;\n    /**\n     * Whether to include a trailing newline at the end of the file.\n     *\n     * @default true\n     */\n    trailingNewline?: boolean;\n  }): string {\n    let text = '';\n    for (const header of headerToLines(args.header)) {\n      text += `${header}\\n`;\n    }\n\n    let imports = '';\n    for (const group of args.imports ?? []) {\n      if (imports) imports += '\\n';\n      for (const imp of group) {\n        imports += `${astToString(TypeScriptRenderer.toImportAst(imp))}\\n`;\n      }\n    }\n    text = `${text}${text && imports ? '\\n' : ''}${imports}`;\n\n    let nodes = '';\n    for (const node of args.nodes ?? []) {\n      if (nodes) nodes += '\\n';\n      nodes += `${astToString(node.toAst())}\\n`;\n    }\n    text = `${text}${text && nodes ? '\\n' : ''}${nodes}`;\n\n    let exports = '';\n    for (const group of args.exports ?? []) {\n      if ((!exports && nodes) || exports) exports += '\\n';\n      for (const exp of group) {\n        exports += `${astToString(TypeScriptRenderer.toExportAst(exp, args.exportsOptions))}\\n`;\n      }\n    }\n    text = `${text}${text && exports ? '\\n' : ''}${exports}`;\n\n    if (args.trailingNewline === false && text.endsWith('\\n')) {\n      text = text.slice(0, -1);\n    }\n\n    return text;\n  }\n\n  static toExportAst(group: ModuleExport, options?: ExportsOptions): ts.ExportDeclaration {\n    const specifiers = group.exports.map((exp) => {\n      const specifier = ts.factory.createExportSpecifier(\n        exp.isTypeOnly,\n        exp.sourceName !== exp.exportedName ? $.id(exp.sourceName).toAst() : undefined,\n        $.id(exp.exportedName).toAst(),\n      );\n      return specifier;\n    });\n    const exportClause = group.namespaceExport\n      ? ts.factory.createNamespaceExport($.id(group.namespaceExport).toAst())\n      : (!group.canExportAll || !options?.preferExportAll) && specifiers.length\n        ? ts.factory.createNamedExports(specifiers)\n        : undefined;\n    return ts.factory.createExportDeclaration(\n      undefined,\n      group.isTypeOnly,\n      exportClause,\n      $.literal(group.modulePath).toAst(),\n    );\n  }\n\n  static toImportAst(group: ModuleImport): ts.ImportDeclaration {\n    const specifiers = group.imports.map((imp) => {\n      const specifier = ts.factory.createImportSpecifier(\n        imp.isTypeOnly,\n        imp.sourceName !== imp.localName ? $.id(imp.sourceName).toAst() : undefined,\n        $.id(imp.localName).toAst(),\n      );\n      return specifier;\n    });\n    const importClause = ts.factory.createImportClause(\n      group.isTypeOnly,\n      group.kind === 'default' ? $.id(group.localName ?? '').toAst() : undefined,\n      group.kind === 'namespace'\n        ? ts.factory.createNamespaceImport($.id(group.localName ?? '').toAst())\n        : specifiers.length > 0\n          ? ts.factory.createNamedImports(specifiers)\n          : undefined,\n    );\n    return ts.factory.createImportDeclaration(\n      undefined,\n      importClause,\n      $.literal(group.modulePath).toAst(),\n    );\n  }\n\n  private getExports(ctx: RenderContext): Exports {\n    type ModuleEntry = {\n      group: ModuleExport;\n      sortKey: SortKey;\n    };\n\n    const groups = new Map<SortGroup, Map<SortModule, ModuleEntry>>();\n\n    for (const exp of ctx.file.exports) {\n      const sortKey = moduleSortKey({\n        file: ctx.file,\n        fromFile: exp.from,\n        preferFileExtension: this._module?.extension || '',\n        root: ctx.project.root,\n      });\n      const modulePath = this._module?.resolve?.(sortKey[2], ctx) ?? sortKey[2];\n      const [groupIndex] = sortKey;\n\n      if (!groups.has(groupIndex)) groups.set(groupIndex, new Map());\n      const moduleMap = groups.get(groupIndex)!;\n\n      if (!moduleMap.has(modulePath)) {\n        moduleMap.set(modulePath, {\n          group: {\n            canExportAll: exp.canExportAll,\n            exports: exp.exports,\n            isTypeOnly: exp.isTypeOnly,\n            modulePath,\n            namespaceExport: exp.namespaceExport,\n          },\n          sortKey,\n        });\n      }\n    }\n\n    const exports: Array<Array<ModuleExport>> = Array.from(groups.entries())\n      .sort((a, b) => a[0] - b[0])\n      .map(([, moduleMap]) => {\n        const entries = Array.from(moduleMap.values());\n\n        entries.sort((a, b) => {\n          const d = a.sortKey[1] - b.sortKey[1];\n          return d !== 0 ? d : a.group.modulePath.localeCompare(b.group.modulePath);\n        });\n\n        return entries.map((e) => {\n          const group = e.group;\n          if (group.namespaceExport) {\n            group.exports = [];\n          } else {\n            const isTypeOnly = !group.exports.find((exp) => !exp.isTypeOnly);\n            if (isTypeOnly) {\n              group.isTypeOnly = true;\n              for (const exp of group.exports) {\n                exp.isTypeOnly = false;\n              }\n            }\n            group.exports.sort((a, b) => a.exportedName.localeCompare(b.exportedName));\n          }\n          return group;\n        });\n      });\n\n    return exports;\n  }\n\n  private getImports(ctx: RenderContext): Imports {\n    type ModuleEntry = {\n      group: ModuleImport;\n      sortKey: SortKey;\n    };\n\n    const groups = new Map<SortGroup, Map<SortModule, ModuleEntry>>();\n\n    for (const imp of ctx.file.imports) {\n      const sortKey = moduleSortKey({\n        file: ctx.file,\n        fromFile: imp.from,\n        preferFileExtension: this._module?.extension || '',\n        root: ctx.project.root,\n      });\n      const modulePath = this._module?.resolve?.(sortKey[2], ctx) ?? sortKey[2];\n      const [groupIndex] = sortKey;\n\n      if (!groups.has(groupIndex)) groups.set(groupIndex, new Map());\n      const moduleMap = groups.get(groupIndex)!;\n\n      if (!moduleMap.has(modulePath)) {\n        moduleMap.set(modulePath, {\n          group: {\n            imports: [],\n            isTypeOnly: false,\n            kind: imp.kind,\n            modulePath,\n          },\n          sortKey,\n        });\n      }\n\n      const entry = moduleMap.get(modulePath)!;\n      const group = entry.group;\n\n      if (imp.kind !== 'named') {\n        group.isTypeOnly = imp.isTypeOnly;\n        group.kind = imp.kind;\n        group.localName = imp.localName;\n      } else {\n        group.imports.push(...imp.imports);\n      }\n    }\n\n    const imports: Array<Array<ModuleImport>> = Array.from(groups.entries())\n      .sort((a, b) => a[0] - b[0])\n      .map(([, moduleMap]) => {\n        const entries = Array.from(moduleMap.values());\n\n        entries.sort((a, b) => {\n          const d = a.sortKey[1] - b.sortKey[1];\n          return d !== 0 ? d : a.group.modulePath.localeCompare(b.group.modulePath);\n        });\n\n        return entries.map((e) => {\n          const group = e.group;\n          if (group.kind === 'namespace') {\n            group.imports = [];\n          } else {\n            const isTypeOnly = !group.imports.find((imp) => !imp.isTypeOnly);\n            if (isTypeOnly) {\n              group.isTypeOnly = true;\n              for (const imp of group.imports) {\n                imp.isTypeOnly = false;\n              }\n            }\n            group.imports.sort((a, b) => a.localName.localeCompare(b.localName));\n          }\n          return group;\n        });\n      });\n\n    return imports;\n  }\n}\n"
  },
  {
    "path": "packages/openapi-ts/src/ts-dsl/utils/reserved.ts",
    "content": "import { keywords } from './keywords';\n\ntype List = ReadonlyArray<string>;\n\nexport class ReservedList {\n  private _array: List;\n  private _set: Set<string>;\n\n  constructor(values: List) {\n    this._array = values;\n    this._set = new Set(values);\n  }\n\n  get '~values'() {\n    return this._set;\n  }\n\n  /**\n   * Updates the reserved list with new values.\n   *\n   * @param values New reserved values or a function that receives the previous\n   * reserved values and returns the new ones.\n   */\n  set(values: List | ((prev: List) => List)): void {\n    const vals = typeof values === 'function' ? values(this._array) : values;\n    this._array = vals;\n    this._set = new Set(vals);\n  }\n}\n\nconst runtimeReserved = new ReservedList([\n  ...keywords.browserGlobals,\n  ...keywords.javaScriptGlobals,\n  ...keywords.javaScriptKeywords,\n  ...keywords.nodeGlobals,\n  ...keywords.typeScriptKeywords,\n]);\n\nconst typeReserved = new ReservedList([\n  ...keywords.javaScriptKeywords,\n  ...keywords.typeScriptKeywords,\n]);\n\n/**\n * Reserved names for identifiers. These names will not be used\n * for variables, functions, classes, or other identifiers in generated code.\n */\nexport const reserved = {\n  /**\n   * Reserved names for runtime identifiers. These names will not be used\n   * for variables, functions, classes, or other runtime identifiers in\n   * generated code.\n   */\n  runtime: runtimeReserved,\n  /**\n   * Reserved names for type identifiers. These names will not be used\n   * for type or interface identifiers in generated code.\n   */\n  type: typeReserved,\n};\n"
  },
  {
    "path": "packages/openapi-ts/tsconfig.json",
    "content": "{\n  \"extends\": \"../../tsconfig.base.json\",\n  \"compilerOptions\": {\n    \"composite\": true,\n    \"rootDir\": \"src\",\n    \"outDir\": \"dist\",\n    \"types\": [\"vitest/globals\", \"node\"]\n  },\n  \"include\": [\"src\"],\n  \"references\": [\n    { \"path\": \"../types\" },\n    { \"path\": \"../codegen-core\" },\n    { \"path\": \"../shared\" },\n    { \"path\": \"../json-schema-ref-parser\" }\n  ]\n}\n"
  },
  {
    "path": "packages/openapi-ts/tsdown.config.ts",
    "content": "import fs from 'node:fs';\nimport path from 'node:path';\nimport { fileURLToPath } from 'node:url';\n\nimport { defineConfig } from 'tsdown';\n\nconst __dirname = path.dirname(fileURLToPath(import.meta.url));\n\nconst replaceCoreImports = (filePath: string) => {\n  let content = fs.readFileSync(filePath, 'utf8');\n  // Replace '../../client-core/bundle' with '../core'\n  content = content.replace(/from ['\"]\\.\\.\\/\\.\\.\\/client-core\\/bundle/g, \"from '../core\");\n  fs.writeFileSync(filePath, content, 'utf8');\n};\n\nexport default defineConfig({\n  clean: true,\n  deps: {\n    neverBundle: [\n      '@angular/common/http',\n      '@angular/core',\n      'axios',\n      'ky',\n      'nuxt/app',\n      'ofetch',\n      'rxjs',\n      'vue',\n    ],\n  },\n  dts: true,\n  entry: ['./src/{index,internal,run}.ts'],\n  format: ['esm'],\n  minify: false,\n  onSuccess: async () => {\n    // Copy client files to dist folder for runtime access\n    const pluginNames = [\n      'client-angular',\n      'client-axios',\n      'client-core',\n      'client-fetch',\n      'client-ky',\n      'client-next',\n      'client-nuxt',\n      'client-ofetch',\n    ];\n\n    for (const pluginName of pluginNames) {\n      const srcPath = path.resolve(__dirname, 'src', 'plugins', '@hey-api', pluginName, 'bundle');\n      const destPath = path.resolve(\n        __dirname,\n        'dist',\n        'clients',\n        pluginName.slice('client-'.length),\n      );\n\n      if (fs.existsSync(srcPath)) {\n        fs.mkdirSync(path.dirname(destPath), { recursive: true });\n        fs.cpSync(srcPath, destPath, { recursive: true });\n\n        // replace core imports in client bundle\n        const clientFiles = fs.readdirSync(destPath);\n        for (const file of clientFiles) {\n          replaceCoreImports(path.resolve(destPath, file));\n        }\n      }\n    }\n  },\n  sourcemap: true,\n  treeshake: true,\n});\n"
  },
  {
    "path": "packages/openapi-ts/turbo.json",
    "content": "{\n  \"$schema\": \"../../node_modules/turbo/schema.json\",\n  \"extends\": [\"//\"],\n  \"tasks\": {\n    \"build\": {\n      \"dependsOn\": [\"^build\"],\n      \"outputs\": [\"dist/**\"]\n    }\n  }\n}\n"
  },
  {
    "path": "packages/openapi-ts/vitest.setup.ts",
    "content": "import 'zone.js'; // Angular needs zones\n\nimport { fileURLToPath } from 'node:url';\n\nimport { TestBed } from '@angular/core/testing';\nimport { BrowserTestingModule, platformBrowserTesting } from '@angular/platform-browser/testing';\nimport { beforeAll } from 'vitest';\n\nTestBed.initTestEnvironment(BrowserTestingModule, platformBrowserTesting());\n\nbeforeAll(() => {\n  process.chdir(fileURLToPath(new URL('.', import.meta.url)));\n});\n"
  },
  {
    "path": "packages/openapi-ts-tests/__snapshots__/plugins/@tanstack/meta/@tanstack/angular-query-experimental.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport { type DefaultError, queryOptions } from '@tanstack/angular-query-experimental';\n\nimport { client } from '../client.gen';\nimport { getBar, getFoo, type Options } from '../sdk.gen';\nimport type { GetBarData, GetFooData } from '../types.gen';\n\nexport type QueryKey<TOptions extends Options> = [\n    Pick<TOptions, 'baseUrl' | 'body' | 'headers' | 'path' | 'query'> & {\n        _id: string;\n        _infinite?: boolean;\n        tags?: ReadonlyArray<string>;\n    }\n];\n\nconst createQueryKey = <TOptions extends Options>(id: string, options?: TOptions, infinite?: boolean, tags?: ReadonlyArray<string>): [\n    QueryKey<TOptions>[0]\n] => {\n    const params: QueryKey<TOptions>[0] = { _id: id, baseUrl: options?.baseUrl || (options?.client ?? client).getConfig().baseUrl } as QueryKey<TOptions>[0];\n    if (infinite) {\n        params._infinite = infinite;\n    }\n    if (tags) {\n        params.tags = tags;\n    }\n    if (options?.body) {\n        params.body = options.body;\n    }\n    if (options?.headers) {\n        params.headers = options.headers;\n    }\n    if (options?.path) {\n        params.path = options.path;\n    }\n    if (options?.query) {\n        params.query = options.query;\n    }\n    return [params];\n};\n\nexport const getFooQueryKey = (options?: Options<GetFooData>) => createQueryKey('getFoo', options);\n\nexport const getFooOptions = (options?: Options<GetFooData>) => queryOptions<unknown, DefaultError, unknown, ReturnType<typeof getFooQueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await getFoo({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: getFooQueryKey(options),\n    meta: {\n        id: 'getFoo',\n        method: 'get',\n        path: '/foo'\n    }\n});\n\nexport const getBarQueryKey = (options?: Options<GetBarData>) => createQueryKey('getBar', options);\n\nexport const getBarOptions = (options?: Options<GetBarData>) => queryOptions<unknown, DefaultError, unknown, ReturnType<typeof getBarQueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await getBar({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: getBarQueryKey(options),\n    meta: {\n        id: 'getBar',\n        method: 'get',\n        path: '/bar'\n    }\n});\n"
  },
  {
    "path": "packages/openapi-ts-tests/__snapshots__/plugins/@tanstack/meta/@tanstack/preact-query.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport { type DefaultError, queryOptions } from '@tanstack/preact-query';\n\nimport { client } from '../client.gen';\nimport { getBar, getFoo, type Options } from '../sdk.gen';\nimport type { GetBarData, GetFooData } from '../types.gen';\n\nexport type QueryKey<TOptions extends Options> = [\n    Pick<TOptions, 'baseUrl' | 'body' | 'headers' | 'path' | 'query'> & {\n        _id: string;\n        _infinite?: boolean;\n        tags?: ReadonlyArray<string>;\n    }\n];\n\nconst createQueryKey = <TOptions extends Options>(id: string, options?: TOptions, infinite?: boolean, tags?: ReadonlyArray<string>): [\n    QueryKey<TOptions>[0]\n] => {\n    const params: QueryKey<TOptions>[0] = { _id: id, baseUrl: options?.baseUrl || (options?.client ?? client).getConfig().baseUrl } as QueryKey<TOptions>[0];\n    if (infinite) {\n        params._infinite = infinite;\n    }\n    if (tags) {\n        params.tags = tags;\n    }\n    if (options?.body) {\n        params.body = options.body;\n    }\n    if (options?.headers) {\n        params.headers = options.headers;\n    }\n    if (options?.path) {\n        params.path = options.path;\n    }\n    if (options?.query) {\n        params.query = options.query;\n    }\n    return [params];\n};\n\nexport const getFooQueryKey = (options?: Options<GetFooData>) => createQueryKey('getFoo', options);\n\nexport const getFooOptions = (options?: Options<GetFooData>) => queryOptions<unknown, DefaultError, unknown, ReturnType<typeof getFooQueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await getFoo({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: getFooQueryKey(options),\n    meta: {\n        id: 'getFoo',\n        method: 'get',\n        path: '/foo'\n    }\n});\n\nexport const getBarQueryKey = (options?: Options<GetBarData>) => createQueryKey('getBar', options);\n\nexport const getBarOptions = (options?: Options<GetBarData>) => queryOptions<unknown, DefaultError, unknown, ReturnType<typeof getBarQueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await getBar({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: getBarQueryKey(options),\n    meta: {\n        id: 'getBar',\n        method: 'get',\n        path: '/bar'\n    }\n});\n"
  },
  {
    "path": "packages/openapi-ts-tests/__snapshots__/plugins/@tanstack/meta/@tanstack/react-query.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport { type DefaultError, queryOptions } from '@tanstack/react-query';\n\nimport { client } from '../client.gen';\nimport { getBar, getFoo, type Options } from '../sdk.gen';\nimport type { GetBarData, GetFooData } from '../types.gen';\n\nexport type QueryKey<TOptions extends Options> = [\n    Pick<TOptions, 'baseUrl' | 'body' | 'headers' | 'path' | 'query'> & {\n        _id: string;\n        _infinite?: boolean;\n        tags?: ReadonlyArray<string>;\n    }\n];\n\nconst createQueryKey = <TOptions extends Options>(id: string, options?: TOptions, infinite?: boolean, tags?: ReadonlyArray<string>): [\n    QueryKey<TOptions>[0]\n] => {\n    const params: QueryKey<TOptions>[0] = { _id: id, baseUrl: options?.baseUrl || (options?.client ?? client).getConfig().baseUrl } as QueryKey<TOptions>[0];\n    if (infinite) {\n        params._infinite = infinite;\n    }\n    if (tags) {\n        params.tags = tags;\n    }\n    if (options?.body) {\n        params.body = options.body;\n    }\n    if (options?.headers) {\n        params.headers = options.headers;\n    }\n    if (options?.path) {\n        params.path = options.path;\n    }\n    if (options?.query) {\n        params.query = options.query;\n    }\n    return [params];\n};\n\nexport const getFooQueryKey = (options?: Options<GetFooData>) => createQueryKey('getFoo', options);\n\nexport const getFooOptions = (options?: Options<GetFooData>) => queryOptions<unknown, DefaultError, unknown, ReturnType<typeof getFooQueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await getFoo({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: getFooQueryKey(options),\n    meta: {\n        id: 'getFoo',\n        method: 'get',\n        path: '/foo'\n    }\n});\n\nexport const getBarQueryKey = (options?: Options<GetBarData>) => createQueryKey('getBar', options);\n\nexport const getBarOptions = (options?: Options<GetBarData>) => queryOptions<unknown, DefaultError, unknown, ReturnType<typeof getBarQueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await getBar({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: getBarQueryKey(options),\n    meta: {\n        id: 'getBar',\n        method: 'get',\n        path: '/bar'\n    }\n});\n"
  },
  {
    "path": "packages/openapi-ts-tests/__snapshots__/plugins/@tanstack/meta/@tanstack/solid-query.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport { type DefaultError, queryOptions } from '@tanstack/solid-query';\n\nimport { client } from '../client.gen';\nimport { getBar, getFoo, type Options } from '../sdk.gen';\nimport type { GetBarData, GetFooData } from '../types.gen';\n\nexport type QueryKey<TOptions extends Options> = [\n    Pick<TOptions, 'baseUrl' | 'body' | 'headers' | 'path' | 'query'> & {\n        _id: string;\n        _infinite?: boolean;\n        tags?: ReadonlyArray<string>;\n    }\n];\n\nconst createQueryKey = <TOptions extends Options>(id: string, options?: TOptions, infinite?: boolean, tags?: ReadonlyArray<string>): [\n    QueryKey<TOptions>[0]\n] => {\n    const params: QueryKey<TOptions>[0] = { _id: id, baseUrl: options?.baseUrl || (options?.client ?? client).getConfig().baseUrl } as QueryKey<TOptions>[0];\n    if (infinite) {\n        params._infinite = infinite;\n    }\n    if (tags) {\n        params.tags = tags;\n    }\n    if (options?.body) {\n        params.body = options.body;\n    }\n    if (options?.headers) {\n        params.headers = options.headers;\n    }\n    if (options?.path) {\n        params.path = options.path;\n    }\n    if (options?.query) {\n        params.query = options.query;\n    }\n    return [params];\n};\n\nexport const getFooQueryKey = (options?: Options<GetFooData>) => createQueryKey('getFoo', options);\n\nexport const getFooOptions = (options?: Options<GetFooData>) => queryOptions<unknown, DefaultError, unknown, ReturnType<typeof getFooQueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await getFoo({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: getFooQueryKey(options),\n    meta: {\n        id: 'getFoo',\n        method: 'get',\n        path: '/foo'\n    }\n});\n\nexport const getBarQueryKey = (options?: Options<GetBarData>) => createQueryKey('getBar', options);\n\nexport const getBarOptions = (options?: Options<GetBarData>) => queryOptions<unknown, DefaultError, unknown, ReturnType<typeof getBarQueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await getBar({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: getBarQueryKey(options),\n    meta: {\n        id: 'getBar',\n        method: 'get',\n        path: '/bar'\n    }\n});\n"
  },
  {
    "path": "packages/openapi-ts-tests/__snapshots__/plugins/@tanstack/meta/@tanstack/svelte-query.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport { type DefaultError, queryOptions } from '@tanstack/svelte-query';\n\nimport { client } from '../client.gen';\nimport { getBar, getFoo, type Options } from '../sdk.gen';\nimport type { GetBarData, GetFooData } from '../types.gen';\n\nexport type QueryKey<TOptions extends Options> = [\n    Pick<TOptions, 'baseUrl' | 'body' | 'headers' | 'path' | 'query'> & {\n        _id: string;\n        _infinite?: boolean;\n        tags?: ReadonlyArray<string>;\n    }\n];\n\nconst createQueryKey = <TOptions extends Options>(id: string, options?: TOptions, infinite?: boolean, tags?: ReadonlyArray<string>): [\n    QueryKey<TOptions>[0]\n] => {\n    const params: QueryKey<TOptions>[0] = { _id: id, baseUrl: options?.baseUrl || (options?.client ?? client).getConfig().baseUrl } as QueryKey<TOptions>[0];\n    if (infinite) {\n        params._infinite = infinite;\n    }\n    if (tags) {\n        params.tags = tags;\n    }\n    if (options?.body) {\n        params.body = options.body;\n    }\n    if (options?.headers) {\n        params.headers = options.headers;\n    }\n    if (options?.path) {\n        params.path = options.path;\n    }\n    if (options?.query) {\n        params.query = options.query;\n    }\n    return [params];\n};\n\nexport const getFooQueryKey = (options?: Options<GetFooData>) => createQueryKey('getFoo', options);\n\nexport const getFooOptions = (options?: Options<GetFooData>) => queryOptions<unknown, DefaultError, unknown, ReturnType<typeof getFooQueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await getFoo({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: getFooQueryKey(options),\n    meta: {\n        id: 'getFoo',\n        method: 'get',\n        path: '/foo'\n    }\n});\n\nexport const getBarQueryKey = (options?: Options<GetBarData>) => createQueryKey('getBar', options);\n\nexport const getBarOptions = (options?: Options<GetBarData>) => queryOptions<unknown, DefaultError, unknown, ReturnType<typeof getBarQueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await getBar({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: getBarQueryKey(options),\n    meta: {\n        id: 'getBar',\n        method: 'get',\n        path: '/bar'\n    }\n});\n"
  },
  {
    "path": "packages/openapi-ts-tests/__snapshots__/plugins/@tanstack/meta/@tanstack/vue-query.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport { type DefaultError, queryOptions } from '@tanstack/vue-query';\n\nimport { client } from '../client.gen';\nimport { getBar, getFoo, type Options } from '../sdk.gen';\nimport type { GetBarData, GetFooData } from '../types.gen';\n\nexport type QueryKey<TOptions extends Options> = [\n    Pick<TOptions, 'baseUrl' | 'body' | 'headers' | 'path' | 'query'> & {\n        _id: string;\n        _infinite?: boolean;\n        tags?: ReadonlyArray<string>;\n    }\n];\n\nconst createQueryKey = <TOptions extends Options>(id: string, options?: TOptions, infinite?: boolean, tags?: ReadonlyArray<string>): [\n    QueryKey<TOptions>[0]\n] => {\n    const params: QueryKey<TOptions>[0] = { _id: id, baseUrl: options?.baseUrl || (options?.client ?? client).getConfig().baseUrl } as QueryKey<TOptions>[0];\n    if (infinite) {\n        params._infinite = infinite;\n    }\n    if (tags) {\n        params.tags = tags;\n    }\n    if (options?.body) {\n        params.body = options.body;\n    }\n    if (options?.headers) {\n        params.headers = options.headers;\n    }\n    if (options?.path) {\n        params.path = options.path;\n    }\n    if (options?.query) {\n        params.query = options.query;\n    }\n    return [params];\n};\n\nexport const getFooQueryKey = (options?: Options<GetFooData>) => createQueryKey('getFoo', options);\n\nexport const getFooOptions = (options?: Options<GetFooData>) => queryOptions<unknown, DefaultError, unknown, ReturnType<typeof getFooQueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await getFoo({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: getFooQueryKey(options),\n    meta: {\n        id: 'getFoo',\n        method: 'get',\n        path: '/foo'\n    }\n});\n\nexport const getBarQueryKey = (options?: Options<GetBarData>) => createQueryKey('getBar', options);\n\nexport const getBarOptions = (options?: Options<GetBarData>) => queryOptions<unknown, DefaultError, unknown, ReturnType<typeof getBarQueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await getBar({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: getBarQueryKey(options),\n    meta: {\n        id: 'getBar',\n        method: 'get',\n        path: '/bar'\n    }\n});\n"
  },
  {
    "path": "packages/openapi-ts-tests/__snapshots__/plugins/@tanstack/meta/client/client.gen.ts",
    "content": "// 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 (options: RequestOptions) => {\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 url = buildUrl(opts);\n\n    return { opts, url };\n  };\n\n  const request: Client['request'] = async (options) => {\n    // @ts-expect-error\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"
  },
  {
    "path": "packages/openapi-ts-tests/__snapshots__/plugins/@tanstack/meta/client/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type { Auth } from '../core/auth.gen';\nexport type { QuerySerializerOptions } from '../core/bodySerializer.gen';\nexport {\n  formDataBodySerializer,\n  jsonBodySerializer,\n  urlSearchParamsBodySerializer,\n} from '../core/bodySerializer.gen';\nexport { buildClientParams } from '../core/params.gen';\nexport { serializeQueryKeyValue } from '../core/queryKeySerializer.gen';\nexport { createClient } from './client.gen';\nexport type {\n  Client,\n  ClientOptions,\n  Config,\n  CreateClientConfig,\n  Options,\n  RequestOptions,\n  RequestResult,\n  ResolvedRequestOptions,\n  ResponseStyle,\n  TDataShape,\n} from './types.gen';\nexport { createConfig, mergeHeaders } from './utils.gen';\n"
  },
  {
    "path": "packages/openapi-ts-tests/__snapshots__/plugins/@tanstack/meta/client/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { Auth } from '../core/auth.gen';\nimport type {\n  ServerSentEventsOptions,\n  ServerSentEventsResult,\n} from '../core/serverSentEvents.gen';\nimport type { Client as CoreClient, Config as CoreConfig } from '../core/types.gen';\nimport type { Middleware } from './utils.gen';\n\nexport type ResponseStyle = 'data' | 'fields';\n\nexport interface Config<T extends ClientOptions = ClientOptions>\n  extends Omit<RequestInit, 'body' | 'headers' | 'method'>, CoreConfig {\n  /**\n   * Base URL for all requests made by this client.\n   */\n  baseUrl?: T['baseUrl'];\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   * Please don't use the Fetch client for Next.js applications. The `next`\n   * options won't have any effect.\n   *\n   * Install {@link https://www.npmjs.com/package/@hey-api/client-next `@hey-api/client-next`} instead.\n   */\n  next?: never;\n  /**\n   * Return the response data parsed in a specified format. By default, `auto`\n   * will infer the appropriate method from the `Content-Type` response header.\n   * You can override this behavior with any of the {@link Body} methods.\n   * Select `stream` if you don't want to parse response data at all.\n   *\n   * @default 'auto'\n   */\n  parseAs?: 'arrayBuffer' | 'auto' | 'blob' | 'formData' | 'json' | 'stream' | 'text';\n  /**\n   * Should we return only data or multiple fields (data, error, response, etc.)?\n   *\n   * @default 'fields'\n   */\n  responseStyle?: ResponseStyle;\n  /**\n   * Throw an error instead of returning it in the response?\n   *\n   * @default false\n   */\n  throwOnError?: T['throwOnError'];\n}\n\nexport interface RequestOptions<\n  TData = unknown,\n  TResponseStyle extends ResponseStyle = 'fields',\n  ThrowOnError extends boolean = boolean,\n  Url extends string = string,\n>\n  extends\n    Config<{\n      responseStyle: TResponseStyle;\n      throwOnError: ThrowOnError;\n    }>,\n    Pick<\n      ServerSentEventsOptions<TData>,\n      | 'onRequest'\n      | 'onSseError'\n      | 'onSseEvent'\n      | 'sseDefaultRetryDelay'\n      | 'sseMaxRetryAttempts'\n      | 'sseMaxRetryDelay'\n    > {\n  /**\n   * Any body that you want to add to your request.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/fetch#body}\n   */\n  body?: unknown;\n  path?: Record<string, unknown>;\n  query?: Record<string, unknown>;\n  /**\n   * Security mechanism(s) to use for the request.\n   */\n  security?: ReadonlyArray<Auth>;\n  url: Url;\n}\n\nexport interface ResolvedRequestOptions<\n  TResponseStyle extends ResponseStyle = 'fields',\n  ThrowOnError extends boolean = boolean,\n  Url extends string = string,\n> extends RequestOptions<unknown, TResponseStyle, ThrowOnError, Url> {\n  serializedBody?: string;\n}\n\nexport type RequestResult<\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = boolean,\n  TResponseStyle extends ResponseStyle = 'fields',\n> = ThrowOnError extends true\n  ? Promise<\n      TResponseStyle extends 'data'\n        ? TData extends Record<string, unknown>\n          ? TData[keyof TData]\n          : TData\n        : {\n            data: TData extends Record<string, unknown> ? TData[keyof TData] : TData;\n            request: Request;\n            response: Response;\n          }\n    >\n  : Promise<\n      TResponseStyle extends 'data'\n        ? (TData extends Record<string, unknown> ? TData[keyof TData] : TData) | undefined\n        : (\n            | {\n                data: TData extends Record<string, unknown> ? TData[keyof TData] : TData;\n                error: undefined;\n              }\n            | {\n                data: undefined;\n                error: TError extends Record<string, unknown> ? TError[keyof TError] : TError;\n              }\n          ) & {\n            request: Request;\n            response: Response;\n          }\n    >;\n\nexport interface ClientOptions {\n  baseUrl?: string;\n  responseStyle?: ResponseStyle;\n  throwOnError?: boolean;\n}\n\ntype MethodFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'>,\n) => RequestResult<TData, TError, ThrowOnError, TResponseStyle>;\n\ntype SseFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'>,\n) => Promise<ServerSentEventsResult<TData, TError>>;\n\ntype RequestFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'> &\n    Pick<Required<RequestOptions<TData, TResponseStyle, ThrowOnError>>, 'method'>,\n) => RequestResult<TData, TError, ThrowOnError, TResponseStyle>;\n\ntype BuildUrlFn = <\n  TData extends {\n    body?: unknown;\n    path?: Record<string, unknown>;\n    query?: Record<string, unknown>;\n    url: string;\n  },\n>(\n  options: TData & Options<TData>,\n) => string;\n\nexport type Client = CoreClient<RequestFn, Config, MethodFn, BuildUrlFn, SseFn> & {\n  interceptors: Middleware<Request, Response, unknown, ResolvedRequestOptions>;\n};\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 = ClientOptions> = (\n  override?: Config<ClientOptions & T>,\n) => Config<Required<ClientOptions> & T>;\n\nexport interface TDataShape {\n  body?: unknown;\n  headers?: unknown;\n  path?: unknown;\n  query?: unknown;\n  url: string;\n}\n\ntype OmitKeys<T, K> = Pick<T, Exclude<keyof T, K>>;\n\nexport type Options<\n  TData extends TDataShape = TDataShape,\n  ThrowOnError extends boolean = boolean,\n  TResponse = unknown,\n  TResponseStyle extends ResponseStyle = 'fields',\n> = OmitKeys<\n  RequestOptions<TResponse, TResponseStyle, ThrowOnError>,\n  'body' | 'path' | 'query' | 'url'\n> &\n  ([TData] extends [never] ? unknown : Omit<TData, 'url'>);\n"
  },
  {
    "path": "packages/openapi-ts-tests/__snapshots__/plugins/@tanstack/meta/client/utils.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/__snapshots__/plugins/@tanstack/meta/client.gen.ts",
    "content": "// 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>());\n"
  },
  {
    "path": "packages/openapi-ts-tests/__snapshots__/plugins/@tanstack/meta/core/auth.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/__snapshots__/plugins/@tanstack/meta/core/bodySerializer.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/__snapshots__/plugins/@tanstack/meta/core/params.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/__snapshots__/plugins/@tanstack/meta/core/pathSerializer.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/__snapshots__/plugins/@tanstack/meta/core/queryKeySerializer.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\n/**\n * JSON-friendly union that mirrors what Pinia Colada can hash.\n */\nexport type JsonValue =\n  | null\n  | string\n  | number\n  | boolean\n  | JsonValue[]\n  | { [key: string]: JsonValue };\n\n/**\n * Replacer that converts non-JSON values (bigint, Date, etc.) to safe substitutes.\n */\nexport const queryKeyJsonReplacer = (_key: string, value: unknown) => {\n  if (value === undefined || typeof value === 'function' || typeof value === 'symbol') {\n    return undefined;\n  }\n  if (typeof value === 'bigint') {\n    return value.toString();\n  }\n  if (value instanceof Date) {\n    return value.toISOString();\n  }\n  return value;\n};\n\n/**\n * Safely stringifies a value and parses it back into a JsonValue.\n */\nexport const stringifyToJsonValue = (input: unknown): JsonValue | undefined => {\n  try {\n    const json = JSON.stringify(input, queryKeyJsonReplacer);\n    if (json === undefined) {\n      return undefined;\n    }\n    return JSON.parse(json) as JsonValue;\n  } catch {\n    return undefined;\n  }\n};\n\n/**\n * Detects plain objects (including objects with a null prototype).\n */\nconst isPlainObject = (value: unknown): value is Record<string, unknown> => {\n  if (value === null || typeof value !== 'object') {\n    return false;\n  }\n  const prototype = Object.getPrototypeOf(value as object);\n  return prototype === Object.prototype || prototype === null;\n};\n\n/**\n * Turns URLSearchParams into a sorted JSON object for deterministic keys.\n */\nconst serializeSearchParams = (params: URLSearchParams): JsonValue => {\n  const entries = Array.from(params.entries()).sort(([a], [b]) => a.localeCompare(b));\n  const result: Record<string, JsonValue> = {};\n\n  for (const [key, value] of entries) {\n    const existing = result[key];\n    if (existing === undefined) {\n      result[key] = value;\n      continue;\n    }\n\n    if (Array.isArray(existing)) {\n      (existing as string[]).push(value);\n    } else {\n      result[key] = [existing, value];\n    }\n  }\n\n  return result;\n};\n\n/**\n * Normalizes any accepted value into a JSON-friendly shape for query keys.\n */\nexport const serializeQueryKeyValue = (value: unknown): JsonValue | undefined => {\n  if (value === null) {\n    return null;\n  }\n\n  if (typeof value === 'string' || typeof value === 'number' || typeof value === 'boolean') {\n    return value;\n  }\n\n  if (value === undefined || typeof value === 'function' || typeof value === 'symbol') {\n    return undefined;\n  }\n\n  if (typeof value === 'bigint') {\n    return value.toString();\n  }\n\n  if (value instanceof Date) {\n    return value.toISOString();\n  }\n\n  if (Array.isArray(value)) {\n    return stringifyToJsonValue(value);\n  }\n\n  if (typeof URLSearchParams !== 'undefined' && value instanceof URLSearchParams) {\n    return serializeSearchParams(value);\n  }\n\n  if (isPlainObject(value)) {\n    return stringifyToJsonValue(value);\n  }\n\n  return undefined;\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/__snapshots__/plugins/@tanstack/meta/core/serverSentEvents.gen.ts",
    "content": "// 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 const 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            // Normalize line endings: CRLF -> LF, then CR -> LF\n            buffer = buffer.replace(/\\r\\n/g, '\\n').replace(/\\r/g, '\\n');\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"
  },
  {
    "path": "packages/openapi-ts-tests/__snapshots__/plugins/@tanstack/meta/core/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { Auth, AuthToken } from './auth.gen';\nimport type { BodySerializer, QuerySerializer, QuerySerializerOptions } from './bodySerializer.gen';\n\nexport type HttpMethod =\n  | 'connect'\n  | 'delete'\n  | 'get'\n  | 'head'\n  | 'options'\n  | 'patch'\n  | 'post'\n  | 'put'\n  | 'trace';\n\nexport type Client<\n  RequestFn = never,\n  Config = unknown,\n  MethodFn = never,\n  BuildUrlFn = never,\n  SseFn = never,\n> = {\n  /**\n   * Returns the final request URL.\n   */\n  buildUrl: BuildUrlFn;\n  getConfig: () => Config;\n  request: RequestFn;\n  setConfig: (config: Config) => Config;\n} & {\n  [K in HttpMethod]: MethodFn;\n} & ([SseFn] extends [never] ? { sse?: never } : { sse: { [K in HttpMethod]: SseFn } });\n\nexport interface Config {\n  /**\n   * Auth token or a function returning auth token. The resolved value will be\n   * added to the request payload as defined by its `security` array.\n   */\n  auth?: ((auth: Auth) => Promise<AuthToken> | AuthToken) | AuthToken;\n  /**\n   * A function for serializing request body parameter. By default,\n   * {@link JSON.stringify()} will be used.\n   */\n  bodySerializer?: BodySerializer | null;\n  /**\n   * An object containing any HTTP headers that you want to pre-populate your\n   * `Headers` object with.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/Headers/Headers#init See more}\n   */\n  headers?:\n    | RequestInit['headers']\n    | Record<\n        string,\n        string | number | boolean | (string | number | boolean)[] | null | undefined | unknown\n      >;\n  /**\n   * The request method.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/fetch#method See more}\n   */\n  method?: Uppercase<HttpMethod>;\n  /**\n   * A function for serializing request query parameters. By default, arrays\n   * will be exploded in form style, objects will be exploded in deepObject\n   * style, and reserved characters are percent-encoded.\n   *\n   * This method will have no effect if the native `paramsSerializer()` Axios\n   * API function is used.\n   *\n   * {@link https://swagger.io/docs/specification/serialization/#query View examples}\n   */\n  querySerializer?: QuerySerializer | QuerySerializerOptions;\n  /**\n   * A function validating request data. This is useful if you want to ensure\n   * the request conforms to the desired shape, so it can be safely sent to\n   * the server.\n   */\n  requestValidator?: (data: unknown) => Promise<unknown>;\n  /**\n   * A function transforming response data before it's returned. This is useful\n   * for post-processing data, e.g. converting ISO strings into Date objects.\n   */\n  responseTransformer?: (data: unknown) => Promise<unknown>;\n  /**\n   * A function validating response data. This is useful if you want to ensure\n   * the response conforms to the desired shape, so it can be safely passed to\n   * the transformers and returned to the user.\n   */\n  responseValidator?: (data: unknown) => Promise<unknown>;\n}\n\ntype IsExactlyNeverOrNeverUndefined<T> = [T] extends [never]\n  ? true\n  : [T] extends [never | undefined]\n    ? [undefined] extends [T]\n      ? false\n      : true\n    : false;\n\nexport type OmitNever<T extends Record<string, unknown>> = {\n  [K in keyof T as IsExactlyNeverOrNeverUndefined<T[K]> extends true ? never : K]: T[K];\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/__snapshots__/plugins/@tanstack/meta/core/utils.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/__snapshots__/plugins/@tanstack/meta/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport { getBar, getFoo, type Options } from './sdk.gen';\nexport type { ClientOptions, GetBarData, GetBarResponses, GetFooData, GetFooResponses } from './types.gen';\n"
  },
  {
    "path": "packages/openapi-ts-tests/__snapshots__/plugins/@tanstack/meta/sdk.gen.ts",
    "content": "// 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 { GetBarData, GetBarResponses, GetFooData, GetFooResponses } from './types.gen';\n\nexport type Options<TData extends TDataShape = TDataShape, ThrowOnError extends boolean = boolean> = Options2<TData, ThrowOnError> & {\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\nexport const getFoo = <ThrowOnError extends boolean = false>(options?: Options<GetFooData, ThrowOnError>) => (options?.client ?? client).get<GetFooResponses, unknown, ThrowOnError>({\n    security: [{\n            in: 'query',\n            name: 'foo',\n            type: 'apiKey'\n        }],\n    url: '/foo',\n    ...options\n});\n\nexport const getBar = <ThrowOnError extends boolean = false>(options?: Options<GetBarData, ThrowOnError>) => (options?.client ?? client).get<GetBarResponses, unknown, ThrowOnError>({\n    security: [{\n            in: 'cookie',\n            name: 'bar',\n            type: 'apiKey'\n        }],\n    url: '/bar',\n    ...options\n});\n"
  },
  {
    "path": "packages/openapi-ts-tests/__snapshots__/plugins/@tanstack/meta/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type ClientOptions = {\n    baseUrl: `${string}://${string}` | (string & {});\n};\n\nexport type GetFooData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/foo';\n};\n\nexport type GetFooResponses = {\n    /**\n     * OK\n     */\n    200: unknown;\n};\n\nexport type GetBarData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/bar';\n};\n\nexport type GetBarResponses = {\n    /**\n     * OK\n     */\n    200: unknown;\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/.gitignore",
    "content": ".DS_Store\n.idea\n.tmp\n.tsdown\nlogs\nnode_modules\ntemp\n\n.env\ncoverage\ndist\n\n# test files\n.gen\ntest/generated\ngenerated/\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/package.json",
    "content": "{\n  \"name\": \"@test/openapi-ts\",\n  \"version\": \"0.0.0\",\n  \"private\": true,\n  \"type\": \"module\",\n  \"scripts\": {\n    \"typecheck\": \"tsgo --noEmit\"\n  },\n  \"devDependencies\": {\n    \"@angular-devkit/build-angular\": \"21.1.2\",\n    \"@angular/animations\": \"21.1.2\",\n    \"@angular/cli\": \"21.1.2\",\n    \"@angular/common\": \"21.1.2\",\n    \"@angular/compiler\": \"21.1.2\",\n    \"@angular/compiler-cli\": \"21.1.2\",\n    \"@angular/core\": \"21.1.2\",\n    \"@angular/forms\": \"21.1.2\",\n    \"@angular/platform-browser\": \"21.1.2\",\n    \"@angular/platform-browser-dynamic\": \"21.1.2\",\n    \"@angular/router\": \"21.1.2\",\n    \"@hey-api/codegen-core\": \"workspace:*\",\n    \"@hey-api/custom-client\": \"workspace:*\",\n    \"@hey-api/openapi-ts\": \"workspace:*\",\n    \"@pinia/colada\": \"0.19.1\",\n    \"@tanstack/angular-query-experimental\": \"5.90.25\",\n    \"@tanstack/preact-query\": \"5.93.0\",\n    \"@tanstack/react-query\": \"5.90.21\",\n    \"@tanstack/solid-query\": \"5.90.23\",\n    \"@tanstack/svelte-query\": \"5.90.2\",\n    \"@tanstack/vue-query\": \"5.92.9\",\n    \"@types/cross-spawn\": \"6.0.6\",\n    \"ajv\": \"8.17.1\",\n    \"arktype\": \"2.1.29\",\n    \"axios\": \"1.13.4\",\n    \"cross-spawn\": \"7.0.6\",\n    \"eslint\": \"9.39.1\",\n    \"fastify\": \"5.7.4\",\n    \"ky\": \"1.14.3\",\n    \"node-fetch\": \"3.3.2\",\n    \"nuxt\": \"3.14.1592\",\n    \"ofetch\": \"1.5.1\",\n    \"rxjs\": \"7.8.2\",\n    \"tslib\": \"2.8.1\",\n    \"typescript\": \"5.9.3\",\n    \"vue\": \"3.5.25\",\n    \"zod\": \"4.3.6\"\n  },\n  \"engines\": {\n    \"node\": \">=20.19.0\"\n  }\n}\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/2.0.x.test.ts",
    "content": "import fs from 'node:fs';\nimport path from 'node:path';\nimport { fileURLToPath } from 'node:url';\n\nimport { createClient, type UserConfig } from '@hey-api/openapi-ts';\n\nimport { getFilePaths, getSpecsPath } from '../../utils';\n\nconst __filename = fileURLToPath(import.meta.url);\nconst __dirname = path.dirname(__filename);\n\nconst version = '2.0.x';\n\nconst outputDir = path.join(__dirname, 'generated', version);\n\ndescribe(`OpenAPI ${version}`, () => {\n  const createConfig = (userConfig: UserConfig) => {\n    const input = userConfig.input instanceof Array ? userConfig.input[0] : userConfig.input;\n    const inputPath = path.join(\n      getSpecsPath(),\n      version,\n      typeof input === 'string' ? input : ((input?.path as string) ?? ''),\n    );\n    return {\n      plugins: ['@hey-api/typescript'],\n      ...userConfig,\n      input:\n        typeof userConfig.input === 'string'\n          ? inputPath\n          : {\n              ...userConfig.input,\n              path: inputPath,\n            },\n      logs: {\n        level: 'silent',\n      },\n      output: path.join(outputDir, typeof userConfig.output === 'string' ? userConfig.output : ''),\n    } as const satisfies UserConfig;\n  };\n\n  const scenarios = [\n    {\n      config: createConfig({\n        input: 'external.yaml',\n        output: 'external',\n      }),\n      description: 'handles external references',\n    },\n    {\n      config: createConfig({\n        input: 'additional-properties-false.json',\n        output: 'additional-properties-false',\n      }),\n      description: 'forbids arbitrary properties on objects',\n    },\n    {\n      config: createConfig({\n        input: 'additional-properties-true.json',\n        output: 'additional-properties-true',\n      }),\n      description: 'allows arbitrary properties on objects',\n    },\n    {\n      config: createConfig({\n        input: 'body-response-text-plain.yaml',\n        output: 'body-response-text-plain',\n        plugins: ['@hey-api/client-fetch', '@hey-api/typescript', '@hey-api/sdk'],\n      }),\n      description: 'handle text/plain content type',\n    },\n    {\n      config: createConfig({\n        input: 'enum-names-values.json',\n        output: 'enum-names-values',\n      }),\n      description: 'handles various enum names and values',\n    },\n    {\n      config: createConfig({\n        input: 'enum-names-values.json',\n        output: 'enum-names-values-javascript-SCREAMING_SNAKE_CASE',\n        plugins: [\n          {\n            enums: {\n              case: 'SCREAMING_SNAKE_CASE',\n              mode: 'javascript',\n            },\n            name: '@hey-api/typescript',\n          },\n        ],\n      }),\n      description: 'handles various enum names and values (JavaScript, SCREAMING_SNAKE_CASE)',\n    },\n    {\n      config: createConfig({\n        input: 'enum-names-values.json',\n        output: 'enum-names-values-javascript-PascalCase',\n        plugins: [\n          {\n            enums: {\n              case: 'PascalCase',\n              mode: 'javascript',\n            },\n            name: '@hey-api/typescript',\n          },\n        ],\n      }),\n      description: 'handles various enum names and values (JavaScript, PascalCase)',\n    },\n    {\n      config: createConfig({\n        input: 'enum-names-values.json',\n        output: 'enum-names-values-javascript-camelCase',\n        plugins: [\n          {\n            enums: {\n              case: 'camelCase',\n              mode: 'javascript',\n            },\n            name: '@hey-api/typescript',\n          },\n        ],\n      }),\n      description: 'handles various enum names and values (JavaScript, camelCase)',\n    },\n    {\n      config: createConfig({\n        input: 'enum-names-values.json',\n        output: 'enum-names-values-javascript-snake_case',\n        plugins: [\n          {\n            enums: {\n              case: 'snake_case',\n              mode: 'javascript',\n            },\n            name: '@hey-api/typescript',\n          },\n        ],\n      }),\n      description: 'handles various enum names and values (JavaScript, snake_case)',\n    },\n    {\n      config: createConfig({\n        input: 'enum-names-values.json',\n        output: 'enum-names-values-javascript-preserve',\n        plugins: [\n          {\n            enums: {\n              case: 'preserve',\n              mode: 'javascript',\n            },\n            name: '@hey-api/typescript',\n          },\n        ],\n      }),\n      description: 'handles various enum names and values (JavaScript, preserve)',\n    },\n    {\n      config: createConfig({\n        input: 'enum-names-values.json',\n        output: 'enum-names-values-typescript-SCREAMING_SNAKE_CASE',\n        plugins: [\n          {\n            enums: {\n              case: 'SCREAMING_SNAKE_CASE',\n              mode: 'typescript',\n            },\n            name: '@hey-api/typescript',\n          },\n        ],\n      }),\n      description: 'handles various enum names and values (TypeScript, SCREAMING_SNAKE_CASE)',\n    },\n    {\n      config: createConfig({\n        input: 'enum-names-values.json',\n        output: 'enum-names-values-typescript-PascalCase',\n        plugins: [\n          {\n            enums: {\n              case: 'PascalCase',\n              mode: 'typescript',\n            },\n            name: '@hey-api/typescript',\n          },\n        ],\n      }),\n      description: 'handles various enum names and values (TypeScript, PascalCase)',\n    },\n    {\n      config: createConfig({\n        input: 'enum-names-values.json',\n        output: 'enum-names-values-typescript-camelCase',\n        plugins: [\n          {\n            enums: {\n              case: 'camelCase',\n              mode: 'typescript',\n            },\n            name: '@hey-api/typescript',\n          },\n        ],\n      }),\n      description: 'handles various enum names and values (TypeScript, camelCase)',\n    },\n    {\n      config: createConfig({\n        input: 'enum-names-values.json',\n        output: 'enum-names-values-typescript-snake_case',\n        plugins: [\n          {\n            enums: {\n              case: 'snake_case',\n              mode: 'typescript',\n            },\n            name: '@hey-api/typescript',\n          },\n        ],\n      }),\n      description: 'handles various enum names and values (TypeScript, snake_case)',\n    },\n    {\n      config: createConfig({\n        input: 'enum-names-values.json',\n        output: 'enum-names-values-typescript-preserve',\n        plugins: [\n          {\n            enums: {\n              case: 'preserve',\n              mode: 'typescript',\n            },\n            name: '@hey-api/typescript',\n          },\n        ],\n      }),\n      description: 'handles various enum names and values (TypeScript, preserve)',\n    },\n    {\n      config: createConfig({\n        input: 'enum-names-values.json',\n        output: 'enum-names-values-typescript-const',\n        plugins: [\n          {\n            enums: {\n              case: 'camelCase',\n              mode: 'typescript-const',\n            },\n            name: '@hey-api/typescript',\n          },\n        ],\n      }),\n      description: 'handles TypeScript const enum modifier',\n    },\n    {\n      config: createConfig({\n        input: 'exclude-deprecated.yaml',\n        output: 'exclude-deprecated',\n        parser: {\n          filters: {\n            deprecated: false,\n          },\n        },\n      }),\n      description: 'excludes deprecated fields',\n    },\n    {\n      config: createConfig({\n        input: 'form-data.json',\n        output: 'form-data',\n        plugins: ['@hey-api/client-fetch', '@hey-api/sdk'],\n      }),\n      description: 'handles form data',\n    },\n    {\n      config: createConfig({\n        input: 'ref-deep.yaml',\n        output: 'ref-deep',\n        plugins: ['@hey-api/typescript'],\n      }),\n      description: 'handles deep references',\n    },\n    {\n      config: createConfig({\n        input: 'transforms-read-write.yaml',\n        output: 'transforms-read-write',\n        plugins: ['@hey-api/client-fetch', '@hey-api/typescript'],\n      }),\n      description: 'handles read-only and write-only types',\n    },\n    {\n      config: createConfig({\n        input: 'transforms-schemas-name.yaml',\n        output: 'transforms-schemas-name',\n        parser: {\n          transforms: {\n            schemaName: (name: string) => {\n              // Strip version markers: User_v1_0_0_User → User\n              let clean = name.replace(/([A-Za-z\\d]+)_v\\d+_\\d+_\\d+_([A-Za-z\\d]*)/g, (_, p1, p2) =>\n                p2.startsWith(p1) ? p2 : p1 + p2,\n              );\n              // Deduplicate prefixes: Foo_Foo → Foo\n              const m = clean.match(/^([A-Za-z\\d]+)_\\1([A-Za-z\\d]*)$/);\n              if (m) clean = m[1]! + m[2]!;\n              return clean;\n            },\n          },\n        },\n        plugins: ['@hey-api/typescript'],\n      }),\n      description: 'handles schema name transforms',\n    },\n    {\n      config: createConfig({\n        input: 'schema-unknown.yaml',\n        output: 'schema-unknown',\n        plugins: ['@hey-api/client-fetch', '@hey-api/sdk'],\n      }),\n      description: 'generates correct schemas instead of unknown',\n    },\n    {\n      config: createConfig({\n        input: 'security-api-key.yaml',\n        output: 'security-api-key',\n        plugins: [\n          '@hey-api/client-fetch',\n          {\n            auth: true,\n            name: '@hey-api/sdk',\n          },\n        ],\n      }),\n      description: 'generates SDK functions with auth (api key)',\n    },\n    {\n      config: createConfig({\n        input: 'security-basic.json',\n        output: 'security-basic',\n        plugins: [\n          '@hey-api/client-fetch',\n          {\n            auth: true,\n            name: '@hey-api/sdk',\n          },\n        ],\n      }),\n      description: 'generates SDK functions with auth (basic)',\n    },\n    {\n      config: createConfig({\n        input: 'security-oauth2.yaml',\n        output: 'security-oauth2',\n        plugins: [\n          '@hey-api/client-fetch',\n          {\n            auth: true,\n            name: '@hey-api/sdk',\n          },\n        ],\n      }),\n      description: 'generates SDK functions with auth (oauth2)',\n    },\n    {\n      config: createConfig({\n        input: 'security-oauth2.yaml',\n        output: 'security-false',\n        plugins: [\n          '@hey-api/client-fetch',\n          {\n            auth: false,\n            name: '@hey-api/sdk',\n          },\n        ],\n      }),\n      description: 'generates SDK functions without auth',\n    },\n    {\n      config: createConfig({\n        input: 'servers.yaml',\n        output: 'servers',\n        plugins: ['@hey-api/client-fetch', '@hey-api/typescript'],\n      }),\n      description: 'generates baseUrl',\n    },\n    {\n      config: createConfig({\n        input: 'servers-base-path.yaml',\n        output: 'servers-base-path',\n        plugins: ['@hey-api/client-fetch', '@hey-api/typescript'],\n      }),\n      description: 'generates baseUrl from basePath',\n    },\n    {\n      config: createConfig({\n        input: 'servers-host.yaml',\n        output: 'servers-host',\n        plugins: ['@hey-api/client-fetch', '@hey-api/typescript'],\n      }),\n      description: 'generates baseUrl from host',\n    },\n  ];\n\n  it.each(scenarios)('$description', async ({ config }) => {\n    await createClient(config);\n\n    const filePaths = getFilePaths(config.output);\n\n    await Promise.all(\n      filePaths.map(async (filePath) => {\n        const fileContent = fs.readFileSync(filePath, 'utf-8');\n        await expect(fileContent).toMatchFileSnapshot(\n          path.join(__dirname, '__snapshots__', version, filePath.slice(outputDir.length + 1)),\n        );\n      }),\n    );\n  });\n});\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/3.0.x.test.ts",
    "content": "import fs from 'node:fs';\nimport path from 'node:path';\nimport { fileURLToPath } from 'node:url';\n\nimport { createClient, type UserConfig } from '@hey-api/openapi-ts';\n\nimport { getFilePaths, getSpecsPath } from '../../utils';\n\nconst __filename = fileURLToPath(import.meta.url);\nconst __dirname = path.dirname(__filename);\n\nconst version = '3.0.x';\n\nconst outputDir = path.join(__dirname, 'generated', version);\n\ndescribe(`OpenAPI ${version}`, () => {\n  const createConfig = (userConfig: UserConfig) => {\n    const input = userConfig.input instanceof Array ? userConfig.input[0] : userConfig.input;\n    const inputPath = path.join(\n      getSpecsPath(),\n      version,\n      typeof input === 'string' ? input : ((input?.path as string) ?? ''),\n    );\n    const output = userConfig.output instanceof Array ? userConfig.output[0] : userConfig.output;\n    const outputPath = path.join(\n      outputDir,\n      typeof output === 'string' ? output : ((output?.path as string) ?? ''),\n    );\n    const nameConflictResolver =\n      typeof output === 'string' ? undefined : output?.nameConflictResolver;\n    return {\n      plugins: ['@hey-api/typescript'],\n      ...userConfig,\n      input:\n        typeof userConfig.input === 'string'\n          ? inputPath\n          : {\n              ...userConfig.input,\n              path: inputPath,\n            },\n      logs: {\n        level: 'silent',\n      },\n      output: {\n        nameConflictResolver,\n        path: outputPath,\n      },\n    } as const satisfies UserConfig;\n  };\n\n  const scenarios = [\n    {\n      config: createConfig({\n        input: 'external.yaml',\n        output: 'external',\n      }),\n      description: 'handles external references',\n    },\n    {\n      config: createConfig({\n        input: 'additional-properties-false.json',\n        output: 'additional-properties-false',\n      }),\n      description: 'forbids arbitrary properties on objects',\n    },\n    {\n      config: createConfig({\n        input: 'additional-properties-true.json',\n        output: 'additional-properties-true',\n      }),\n      description: 'allows arbitrary properties on objects',\n    },\n    {\n      config: createConfig({\n        input: 'additional-properties-undefined.json',\n        output: 'additional-properties-undefined',\n      }),\n      description: 'allows arbitrary properties on objects',\n    },\n    {\n      config: createConfig({\n        input: 'array-items-one-of-length-1.yaml',\n        output: 'array-items-one-of-length-1',\n      }),\n      description: 'generates correct array when items are oneOf array with single item',\n    },\n    {\n      config: createConfig({\n        input: 'array-nested-one-of.yaml',\n        output: 'array-nested-one-of',\n      }),\n      description: 'generates union of arrays when items use nested oneOf',\n    },\n    {\n      config: createConfig({\n        input: 'body-response-text-plain.yaml',\n        output: 'body-response-text-plain',\n        plugins: ['@hey-api/client-fetch', '@hey-api/typescript', '@hey-api/sdk'],\n      }),\n      description: 'handle text/plain content type',\n    },\n    {\n      config: createConfig({\n        input: 'case.yaml',\n        output: 'case-preserve',\n        plugins: [\n          {\n            case: 'preserve',\n            name: '@hey-api/typescript',\n          },\n        ],\n      }),\n      description: 'handles preserved identifier casing',\n    },\n    {\n      config: createConfig({\n        input: 'case.yaml',\n        output: 'case-PascalCase',\n        plugins: [\n          {\n            case: 'PascalCase',\n            name: '@hey-api/typescript',\n          },\n        ],\n      }),\n      description: 'handles PascalCase identifier casing',\n    },\n    {\n      config: createConfig({\n        input: 'case.yaml',\n        output: 'case-camelCase',\n        plugins: [\n          {\n            case: 'camelCase',\n            name: '@hey-api/typescript',\n          },\n        ],\n      }),\n      description: 'handles camelCase identifier casing',\n    },\n    {\n      config: createConfig({\n        input: 'case.yaml',\n        output: 'case-snake_case',\n        plugins: [\n          {\n            case: 'snake_case',\n            name: '@hey-api/typescript',\n          },\n        ],\n      }),\n      description: 'handles snake_case identifier casing',\n    },\n    {\n      config: createConfig({\n        input: 'components-request-bodies.json',\n        output: 'components-request-bodies',\n      }),\n      description: 'handles reusable request bodies',\n    },\n    {\n      config: createConfig({\n        input: 'content-binary.json',\n        output: 'content-binary',\n      }),\n      description: 'handles binary content',\n    },\n    {\n      config: createConfig({\n        input: 'body-binary-format.yaml',\n        output: 'body-binary-format',\n        plugins: ['@hey-api/client-fetch', '@hey-api/typescript', '@hey-api/sdk'],\n      }),\n      description: 'handles binary format request body',\n    },\n    {\n      config: createConfig({\n        input: 'content-types.yaml',\n        output: 'content-types',\n        plugins: ['@hey-api/client-axios', '@hey-api/typescript', '@hey-api/sdk'],\n      }),\n      description: 'handles content types',\n    },\n    {\n      config: createConfig({\n        input: 'discriminator-all-of.yaml',\n        output: 'discriminator-all-of',\n      }),\n      description: 'handles discriminator with and without mapping',\n    },\n    {\n      config: createConfig({\n        input: 'discriminator-any-of.yaml',\n        output: 'discriminator-any-of',\n      }),\n      description: 'handles discriminator with and without mapping',\n    },\n    {\n      config: createConfig({\n        input: 'discriminator-mapped-many.yaml',\n        output: 'discriminator-mapped-many',\n      }),\n      description: 'handles discriminator with multiple mappings',\n    },\n    {\n      config: createConfig({\n        input: 'discriminator-one-of.yaml',\n        output: 'discriminator-one-of',\n      }),\n      description: 'handles discriminator with and without mapping',\n    },\n    {\n      config: createConfig({\n        input: 'discriminator-allof-nested.json',\n        output: 'discriminator-allof-nested',\n      }),\n      description: 'handles nested allOf with discriminators',\n    },\n    {\n      config: createConfig({\n        input: 'discriminator-allof-inline.json',\n        output: 'discriminator-allof-inline',\n      }),\n      description:\n        'handles allOf where inline schema discriminator mapping should take priority over $ref discriminator fallback',\n    },\n    {\n      config: createConfig({\n        input: 'discriminator-object-self-mapped.json',\n        output: 'discriminator-object-self-mapped',\n      }),\n      description: 'handles object discriminator mappings that include the schema itself',\n    },\n    {\n      config: createConfig({\n        input: 'discriminator-non-string.yaml',\n        output: 'discriminator-non-string',\n      }),\n      description: 'handles non-string discriminator property types',\n    },\n    {\n      config: createConfig({\n        input: 'enum-escape.json',\n        output: 'enum-escape',\n      }),\n      description: 'escapes enum values',\n    },\n    {\n      config: createConfig({\n        input: 'enum-inline.json',\n        output: 'enum-inline',\n        parser: {\n          transforms: {\n            enums: 'root',\n          },\n        },\n      }),\n      description: 'exports inline enums',\n    },\n    {\n      config: createConfig({\n        input: 'enum-inline.json',\n        output: 'enum-inline-javascript',\n        parser: {\n          transforms: {\n            enums: 'root',\n          },\n        },\n        plugins: [\n          {\n            enums: 'javascript',\n            name: '@hey-api/typescript',\n          },\n        ],\n      }),\n      description: 'exports inline enums (JavaScript)',\n    },\n    {\n      config: createConfig({\n        input: 'enum-inline.json',\n        output: 'enum-inline-typescript',\n        parser: {\n          transforms: {\n            enums: 'root',\n          },\n        },\n        plugins: [\n          {\n            enums: 'typescript',\n            name: '@hey-api/typescript',\n          },\n        ],\n      }),\n      description: 'exports inline enums (TypeScript)',\n    },\n    {\n      config: createConfig({\n        input: 'enum-inline.json',\n        output: {\n          nameConflictResolver: ({ attempt, baseName }) =>\n            attempt === 0 ? baseName : `${baseName}_N${attempt + 1}`,\n          path: 'enum-inline-name-resolver',\n        },\n        parser: {\n          transforms: {\n            enums: 'root',\n          },\n        },\n        plugins: [\n          {\n            enums: 'javascript',\n            name: '@hey-api/typescript',\n          },\n        ],\n      }),\n      description: 'exports inline enums with name conflict resolver',\n    },\n    {\n      config: createConfig({\n        input: 'enum-inline.json',\n        output: {\n          nameConflictResolver: () => null,\n          path: 'enum-inline-name-resolver-null',\n        },\n        parser: {\n          transforms: {\n            enums: 'root',\n          },\n        },\n        plugins: [\n          {\n            enums: 'javascript',\n            name: '@hey-api/typescript',\n          },\n        ],\n      }),\n      description: 'exports inline enums with name conflict resolver returning null',\n    },\n    {\n      config: createConfig({\n        input: 'enum-names-values.json',\n        output: 'enum-names-values',\n      }),\n      description: 'handles various enum names and values',\n    },\n    {\n      config: createConfig({\n        input: 'enum-names-values.json',\n        output: 'enum-names-values-javascript-SCREAMING_SNAKE_CASE',\n        plugins: [\n          {\n            enums: {\n              case: 'SCREAMING_SNAKE_CASE',\n              mode: 'javascript',\n            },\n            name: '@hey-api/typescript',\n          },\n        ],\n      }),\n      description: 'handles various enum names and values (JavaScript, SCREAMING_SNAKE_CASE)',\n    },\n    {\n      config: createConfig({\n        input: 'enum-names-values.json',\n        output: 'enum-names-values-javascript-PascalCase',\n        plugins: [\n          {\n            enums: {\n              case: 'PascalCase',\n              mode: 'javascript',\n            },\n            name: '@hey-api/typescript',\n          },\n        ],\n      }),\n      description: 'handles various enum names and values (JavaScript, PascalCase)',\n    },\n    {\n      config: createConfig({\n        input: 'enum-names-values.json',\n        output: 'enum-names-values-javascript-camelCase',\n        plugins: [\n          {\n            enums: {\n              case: 'camelCase',\n              mode: 'javascript',\n            },\n            name: '@hey-api/typescript',\n          },\n        ],\n      }),\n      description: 'handles various enum names and values (JavaScript, camelCase)',\n    },\n    {\n      config: createConfig({\n        input: 'enum-names-values.json',\n        output: 'enum-names-values-javascript-snake_case',\n        plugins: [\n          {\n            enums: {\n              case: 'snake_case',\n              mode: 'javascript',\n            },\n            name: '@hey-api/typescript',\n          },\n        ],\n      }),\n      description: 'handles various enum names and values (JavaScript, snake_case)',\n    },\n    {\n      config: createConfig({\n        input: 'enum-names-values.json',\n        output: 'enum-names-values-javascript-preserve',\n        plugins: [\n          {\n            enums: {\n              case: 'preserve',\n              mode: 'javascript',\n            },\n            name: '@hey-api/typescript',\n          },\n        ],\n      }),\n      description: 'handles various enum names and values (JavaScript, preserve)',\n    },\n    {\n      config: createConfig({\n        input: 'enum-names-values.json',\n        output: 'enum-names-values-javascript-ignore-null',\n        plugins: [\n          {\n            enums: {\n              case: 'preserve',\n              constantsIgnoreNull: true,\n              mode: 'javascript',\n            },\n            name: '@hey-api/typescript',\n          },\n        ],\n      }),\n      description: 'handles various enum names and values (JavaScript, preserve, ignore null)',\n    },\n    {\n      config: createConfig({\n        input: 'enum-names-values.json',\n        output: 'enum-names-values-typescript-SCREAMING_SNAKE_CASE',\n        plugins: [\n          {\n            enums: {\n              case: 'SCREAMING_SNAKE_CASE',\n              mode: 'typescript',\n            },\n            name: '@hey-api/typescript',\n          },\n        ],\n      }),\n      description: 'handles various enum names and values (TypeScript, SCREAMING_SNAKE_CASE)',\n    },\n    {\n      config: createConfig({\n        input: 'enum-names-values.json',\n        output: 'enum-names-values-typescript-PascalCase',\n        plugins: [\n          {\n            enums: {\n              case: 'PascalCase',\n              mode: 'typescript',\n            },\n            name: '@hey-api/typescript',\n          },\n        ],\n      }),\n      description: 'handles various enum names and values (TypeScript, PascalCase)',\n    },\n    {\n      config: createConfig({\n        input: 'enum-names-values.json',\n        output: 'enum-names-values-typescript-camelCase',\n        plugins: [\n          {\n            enums: {\n              case: 'camelCase',\n              mode: 'typescript',\n            },\n            name: '@hey-api/typescript',\n          },\n        ],\n      }),\n      description: 'handles various enum names and values (TypeScript, camelCase)',\n    },\n    {\n      config: createConfig({\n        input: 'enum-names-values.json',\n        output: 'enum-names-values-typescript-snake_case',\n        plugins: [\n          {\n            enums: {\n              case: 'snake_case',\n              mode: 'typescript',\n            },\n            name: '@hey-api/typescript',\n          },\n        ],\n      }),\n      description: 'handles various enum names and values (TypeScript, snake_case)',\n    },\n    {\n      config: createConfig({\n        input: 'enum-names-values.json',\n        output: 'enum-names-values-typescript-preserve',\n        plugins: [\n          {\n            enums: {\n              case: 'preserve',\n              mode: 'typescript',\n            },\n            name: '@hey-api/typescript',\n          },\n        ],\n      }),\n      description: 'handles various enum names and values (TypeScript, preserve)',\n    },\n    {\n      config: createConfig({\n        input: 'enum-names-values.json',\n        output: 'enum-names-values-typescript-const',\n        plugins: [\n          {\n            enums: {\n              case: 'camelCase',\n              mode: 'typescript-const',\n            },\n            name: '@hey-api/typescript',\n          },\n        ],\n      }),\n      description: 'handles TypeScript const enum modifier',\n    },\n    {\n      config: createConfig({\n        input: 'enum-null.json',\n        output: 'enum-null',\n      }),\n      description: 'handles null enums',\n    },\n    {\n      config: createConfig({\n        input: 'exclude-deprecated.yaml',\n        output: 'exclude-deprecated',\n        parser: {\n          filters: {\n            deprecated: false,\n          },\n        },\n      }),\n      description: 'excludes deprecated fields',\n    },\n    {\n      config: createConfig({\n        input: 'internal-name-conflict.json',\n        output: 'internal-name-conflict',\n        plugins: ['@hey-api/client-fetch', '@tanstack/react-query'],\n      }),\n      description: 'handles conflict between generated code and internal artifacts',\n    },\n    {\n      config: createConfig({\n        input: 'operation-204.json',\n        output: 'operation-204',\n      }),\n      description: 'handles empty response status codes',\n    },\n    {\n      config: createConfig({\n        input: 'parameter-explode-false.json',\n        output: 'parameter-explode-false',\n        plugins: ['@hey-api/client-fetch', '@hey-api/sdk'],\n      }),\n      description: 'handles non-exploded array query parameters',\n    },\n    {\n      config: createConfig({\n        input: 'parameter-explode-false.json',\n        output: 'parameter-explode-false-axios',\n        plugins: ['@hey-api/client-axios', '@hey-api/sdk'],\n      }),\n      description: 'handles non-exploded array query parameters (Axios)',\n    },\n    {\n      config: createConfig({\n        input: 'ref-deep.yaml',\n        output: 'ref-deep',\n      }),\n      description: 'handles deep references',\n    },\n    {\n      config: createConfig({\n        input: 'transforms-read-write.yaml',\n        output: 'transforms-read-write',\n        plugins: ['@hey-api/client-fetch', '@hey-api/typescript'],\n      }),\n      description: 'handles read-only and write-only types',\n    },\n    {\n      config: createConfig({\n        input: 'transforms-schemas-name.yaml',\n        output: 'transforms-schemas-name',\n        parser: {\n          transforms: {\n            schemaName: (name: string) => {\n              // Strip version markers: User_v1_0_0_User → User\n              let clean = name.replace(/([A-Za-z\\d]+)_v\\d+_\\d+_\\d+_([A-Za-z\\d]*)/g, (_, p1, p2) =>\n                p2.startsWith(p1) ? p2 : p1 + p2,\n              );\n              // Deduplicate prefixes: Foo_Foo → Foo\n              const m = clean.match(/^([A-Za-z\\d]+)_\\1([A-Za-z\\d]*)$/);\n              if (m) clean = m[1]! + m[2]!;\n              return clean;\n            },\n          },\n        },\n      }),\n      description: 'handles schema name transforms',\n    },\n    {\n      config: createConfig({\n        input: 'transforms-schemas-name-collision.yaml',\n        output: 'transforms-schemas-name-collision',\n        parser: {\n          transforms: {\n            schemaName: (name: string) =>\n              // Try to rename all _vX_User schemas to \"User\"\n              // This should cause collisions since \"User\" already exists\n              name.replace(/_v\\d+_User$/, ''),\n          },\n        },\n      }),\n      description: 'handles schema name collision prevention',\n    },\n    {\n      config: createConfig({\n        input: 'security-api-key.yaml',\n        output: 'security-api-key',\n        plugins: [\n          '@hey-api/client-fetch',\n          {\n            auth: true,\n            name: '@hey-api/sdk',\n          },\n        ],\n      }),\n      description: 'generates SDK functions with auth (api key)',\n    },\n    {\n      config: createConfig({\n        input: 'security-http-bearer.json',\n        output: 'security-http-bearer',\n        plugins: [\n          '@hey-api/client-fetch',\n          {\n            auth: true,\n            name: '@hey-api/sdk',\n          },\n        ],\n      }),\n      description: 'generates SDK functions with auth (Bearer token)',\n    },\n    {\n      config: createConfig({\n        input: 'security-oauth2.yaml',\n        output: 'security-oauth2',\n        plugins: [\n          '@hey-api/client-fetch',\n          {\n            auth: true,\n            name: '@hey-api/sdk',\n          },\n        ],\n      }),\n      description: 'generates SDK functions with auth (oauth2)',\n    },\n    {\n      config: createConfig({\n        input: 'security-open-id-connect.yaml',\n        output: 'security-open-id-connect',\n        plugins: [\n          '@hey-api/client-fetch',\n          {\n            auth: true,\n            name: '@hey-api/sdk',\n          },\n        ],\n      }),\n      description: 'generates SDK functions with auth (OpenID Connect)',\n    },\n    {\n      config: createConfig({\n        input: 'security-oauth2.yaml',\n        output: 'security-false',\n        plugins: [\n          '@hey-api/client-fetch',\n          {\n            auth: false,\n            name: '@hey-api/sdk',\n          },\n        ],\n      }),\n      description: 'generates SDK functions without auth',\n    },\n    {\n      config: createConfig({\n        input: 'servers.yaml',\n        output: 'servers',\n        plugins: ['@hey-api/client-fetch', '@hey-api/typescript'],\n      }),\n      description: 'generates baseUrl',\n    },\n    {\n      config: createConfig({\n        input: 'transformers-all-of.yaml',\n        output: 'transformers-all-of',\n        plugins: ['@hey-api/client-fetch', '@hey-api/transformers'],\n      }),\n      description: 'transforms nested date in all of composition',\n    },\n    {\n      config: createConfig({\n        input: 'transformers-allof-response-wrapper.json',\n        output: 'transformers-allof-response-wrapper',\n        plugins: ['@hey-api/client-fetch', '@hey-api/transformers'],\n      }),\n      description: 'transforms dates in allOf response wrapper (paginated response)',\n    },\n    {\n      config: createConfig({\n        input: 'transformers-any-of-null.json',\n        output: 'transformers-any-of-null',\n        plugins: ['@hey-api/client-fetch', '@hey-api/transformers'],\n      }),\n      description: 'transforms nullable date property',\n    },\n    {\n      config: createConfig({\n        input: 'transformers-array.json',\n        output: 'transformers-array',\n        plugins: ['@hey-api/client-fetch', '@hey-api/transformers'],\n      }),\n      description: 'transforms an array',\n    },\n    {\n      config: createConfig({\n        input: 'transformers-recursive.json',\n        output: 'transformers-recursive',\n        plugins: ['@hey-api/client-fetch', '@hey-api/transformers'],\n      }),\n      description: 'transforms recursive/self-referential schemas',\n    },\n    {\n      config: createConfig({\n        input: 'dutchie.json',\n        output: 'transforms-properties-required-by-default',\n        parser: {\n          transforms: {\n            propertiesRequiredByDefault: true,\n          },\n        },\n      }),\n      description: 'makes all object properties required by default',\n    },\n    {\n      config: createConfig({\n        input: 'type-invalid.json',\n        output: 'type-invalid',\n      }),\n      description: 'gracefully handles invalid type',\n    },\n  ];\n\n  it.each(scenarios)('$description', async ({ config }) => {\n    await createClient(config);\n\n    const filePaths = getFilePaths(config.output.path);\n\n    await Promise.all(\n      filePaths.map(async (filePath) => {\n        const fileContent = fs.readFileSync(filePath, 'utf-8');\n        await expect(fileContent).toMatchFileSnapshot(\n          path.join(__dirname, '__snapshots__', version, filePath.slice(outputDir.length + 1)),\n        );\n      }),\n    );\n  });\n});\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/3.1.x.test.ts",
    "content": "import fs from 'node:fs';\nimport path from 'node:path';\nimport { fileURLToPath } from 'node:url';\n\nimport { createClient, type UserConfig } from '@hey-api/openapi-ts';\n\nimport { getFilePaths, getSpecsPath } from '../../utils';\n\nconst __filename = fileURLToPath(import.meta.url);\nconst __dirname = path.dirname(__filename);\n\nconst version = '3.1.x';\n\nconst outputDir = path.join(__dirname, 'generated', version);\n\ndescribe(`OpenAPI ${version}`, () => {\n  const createConfig = (userConfig: UserConfig) => {\n    const input = userConfig.input instanceof Array ? userConfig.input[0] : userConfig.input;\n    const inputPath = path.join(\n      getSpecsPath(),\n      version,\n      typeof input === 'string' ? input : ((input?.path as string) ?? ''),\n    );\n    const output = userConfig.output instanceof Array ? userConfig.output[0] : userConfig.output;\n    const outputPath = path.join(\n      outputDir,\n      typeof output === 'string' ? output : ((output?.path as string) ?? ''),\n    );\n    const nameConflictResolver =\n      typeof output === 'string' ? undefined : output?.nameConflictResolver;\n    return {\n      plugins: ['@hey-api/typescript'],\n      ...userConfig,\n      input:\n        typeof userConfig.input === 'string'\n          ? inputPath\n          : {\n              ...userConfig.input,\n              path: inputPath,\n            },\n      logs: {\n        level: 'silent',\n      },\n      output: {\n        nameConflictResolver,\n        path: outputPath,\n      },\n    } as const satisfies UserConfig;\n  };\n\n  const scenarios = [\n    {\n      config: createConfig({\n        input: 'external.yaml',\n        output: 'external',\n      }),\n      description: 'handles external references',\n    },\n    {\n      config: createConfig({\n        input: 'pattern-properties.json',\n        output: 'pattern-properties',\n      }),\n      description: 'handles pattern properties',\n    },\n    {\n      config: createConfig({\n        input: 'additional-properties-false.json',\n        output: 'additional-properties-false',\n      }),\n      description: 'forbids arbitrary properties on objects',\n    },\n    {\n      config: createConfig({\n        input: 'additional-properties-true.json',\n        output: 'additional-properties-true',\n      }),\n      description: 'allows arbitrary properties on objects (unknown top type)',\n    },\n    {\n      config: createConfig({\n        input: 'additional-properties-true.json',\n        output: 'additional-properties-true-any',\n        plugins: [\n          {\n            name: '@hey-api/typescript',\n            topType: 'any',\n          },\n        ],\n      }),\n      description: 'allows arbitrary properties on objects (any top type)',\n    },\n    {\n      config: createConfig({\n        input: 'additional-properties-undefined.json',\n        output: 'additional-properties-undefined',\n      }),\n      description: 'allows arbitrary properties on objects',\n    },\n    {\n      config: createConfig({\n        input: 'array-items-one-of-length-1.yaml',\n        output: 'array-items-one-of-length-1',\n      }),\n      description: 'generates correct array when items are oneOf array with single item',\n    },\n    {\n      config: createConfig({\n        input: 'array-nested-one-of.yaml',\n        output: 'array-nested-one-of',\n      }),\n      description: 'generates union of arrays when items use nested oneOf',\n    },\n    {\n      config: createConfig({\n        input: 'body-response-text-plain.yaml',\n        output: 'body-response-text-plain',\n        plugins: ['@hey-api/client-fetch', '@hey-api/typescript', '@hey-api/sdk'],\n      }),\n      description: 'handle text/plain content type',\n    },\n    {\n      config: createConfig({\n        input: 'case.yaml',\n        output: 'case-preserve',\n        plugins: [\n          {\n            case: 'preserve',\n            name: '@hey-api/typescript',\n          },\n        ],\n      }),\n      description: 'handles preserved identifier casing',\n    },\n    {\n      config: createConfig({\n        input: 'case.yaml',\n        output: 'case-PascalCase',\n        plugins: [\n          {\n            case: 'PascalCase',\n            name: '@hey-api/typescript',\n          },\n        ],\n      }),\n      description: 'handles PascalCase identifier casing',\n    },\n    {\n      config: createConfig({\n        input: 'case.yaml',\n        output: 'case-camelCase',\n        plugins: [\n          {\n            case: 'camelCase',\n            name: '@hey-api/typescript',\n          },\n        ],\n      }),\n      description: 'handles camelCase identifier casing',\n    },\n    {\n      config: createConfig({\n        input: 'case.yaml',\n        output: 'case-snake_case',\n        plugins: [\n          {\n            case: 'snake_case',\n            name: '@hey-api/typescript',\n          },\n        ],\n      }),\n      description: 'handles snake_case identifier casing',\n    },\n    {\n      config: createConfig({\n        input: 'components-request-bodies.json',\n        output: 'components-request-bodies',\n      }),\n      description: 'handles reusable request bodies',\n    },\n    {\n      config: createConfig({\n        input: 'const.json',\n        output: 'const',\n      }),\n      description: 'handles const keyword',\n    },\n    {\n      config: createConfig({\n        input: 'content-binary.json',\n        output: 'content-binary',\n      }),\n      description: 'handles binary content',\n    },\n    {\n      config: createConfig({\n        input: 'content-media-type.yaml',\n        output: 'content-media-type',\n      }),\n      description: 'handles contentMediaType schema property for file uploads',\n    },\n    {\n      config: createConfig({\n        input: 'content-types.yaml',\n        output: 'content-types',\n        plugins: ['@hey-api/client-axios', '@hey-api/typescript', '@hey-api/sdk'],\n      }),\n      description: 'handles content types',\n    },\n    {\n      config: createConfig({\n        input: 'discriminator-all-of.yaml',\n        output: 'discriminator-all-of',\n      }),\n      description: 'handles discriminator with and without mapping',\n    },\n    {\n      config: createConfig({\n        input: 'discriminator-any-of.yaml',\n        output: 'discriminator-any-of',\n      }),\n      description: 'handles discriminator with and without mapping',\n    },\n    {\n      config: createConfig({\n        input: 'discriminator-mapped-many.yaml',\n        output: 'discriminator-mapped-many',\n      }),\n      description: 'handles discriminator with multiple mappings',\n    },\n    {\n      config: createConfig({\n        input: 'discriminator-one-of.yaml',\n        output: 'discriminator-one-of',\n      }),\n      description: 'handles discriminator with and without mapping',\n    },\n    {\n      config: createConfig({\n        input: 'discriminator-allof-nested.json',\n        output: 'discriminator-allof-nested',\n      }),\n      description: 'handles nested allOf with discriminators',\n    },\n    {\n      config: createConfig({\n        input: 'discriminator-allof-inline.json',\n        output: 'discriminator-allof-inline',\n      }),\n      description:\n        'handles allOf where inline schema discriminator mapping should take priority over $ref discriminator fallback',\n    },\n    {\n      config: createConfig({\n        input: 'discriminator-object-self-mapped.json',\n        output: 'discriminator-object-self-mapped',\n      }),\n      description: 'handles object discriminator mappings that include the schema itself',\n    },\n    {\n      config: createConfig({\n        input: 'discriminator-non-string.yaml',\n        output: 'discriminator-non-string',\n      }),\n      description: 'handles non-string discriminator property types',\n    },\n    {\n      config: createConfig({\n        input: 'discriminator-one-of-read-write.yaml',\n        output: 'discriminator-one-of-read-write',\n      }),\n      description: 'handles discriminator with oneOf and read/write transforms',\n    },\n    {\n      config: createConfig({\n        input: 'duplicate-null.json',\n        output: 'duplicate-null',\n      }),\n      description: 'does not generate duplicate null',\n    },\n    {\n      config: createConfig({\n        input: 'enum-escape.json',\n        output: 'enum-escape',\n      }),\n      description: 'escapes enum values',\n    },\n    {\n      config: createConfig({\n        input: 'enum-inline.yaml',\n        output: 'enum-inline',\n        parser: {\n          transforms: {\n            enums: 'root',\n          },\n        },\n      }),\n      description: 'exports inline enums',\n    },\n    {\n      config: createConfig({\n        input: 'enum-inline.yaml',\n        output: 'enum-inline-javascript',\n        parser: {\n          transforms: {\n            enums: 'root',\n          },\n        },\n        plugins: [\n          {\n            enums: 'javascript',\n            name: '@hey-api/typescript',\n          },\n        ],\n      }),\n      description: 'exports inline enums (JavaScript)',\n    },\n    {\n      config: createConfig({\n        input: 'enum-inline.yaml',\n        output: 'enum-inline-typescript',\n        parser: {\n          transforms: {\n            enums: 'root',\n          },\n        },\n        plugins: [\n          {\n            enums: 'typescript',\n            name: '@hey-api/typescript',\n          },\n        ],\n      }),\n      description: 'exports inline enums (TypeScript)',\n    },\n    {\n      config: createConfig({\n        input: 'enum-inline.yaml',\n        output: {\n          nameConflictResolver: ({ attempt, baseName }) =>\n            attempt === 0 ? baseName : `${baseName}_N${attempt + 1}`,\n          path: 'enum-inline-name-resolver',\n        },\n        parser: {\n          transforms: {\n            enums: 'root',\n          },\n        },\n        plugins: [\n          {\n            enums: 'javascript',\n            name: '@hey-api/typescript',\n          },\n        ],\n      }),\n      description: 'exports inline enums with name conflict resolver',\n    },\n    {\n      config: createConfig({\n        input: 'enum-inline.yaml',\n        output: {\n          nameConflictResolver: () => null,\n          path: 'enum-inline-name-resolver-null',\n        },\n        parser: {\n          transforms: {\n            enums: 'root',\n          },\n        },\n        plugins: [\n          {\n            enums: 'javascript',\n            name: '@hey-api/typescript',\n          },\n        ],\n      }),\n      description: 'exports inline enums with name conflict resolver returning null',\n    },\n    {\n      config: createConfig({\n        input: 'enum-names-values.yaml',\n        output: 'enum-names-values',\n      }),\n      description: 'handles various enum names and values',\n    },\n    {\n      config: createConfig({\n        input: 'enum-names-values.yaml',\n        output: 'enum-names-values-javascript-SCREAMING_SNAKE_CASE',\n        plugins: [\n          {\n            enums: {\n              case: 'SCREAMING_SNAKE_CASE',\n              mode: 'javascript',\n            },\n            name: '@hey-api/typescript',\n          },\n        ],\n      }),\n      description: 'handles various enum names and values (JavaScript, SCREAMING_SNAKE_CASE)',\n    },\n    {\n      config: createConfig({\n        input: 'enum-names-values.yaml',\n        output: 'enum-names-values-javascript-PascalCase',\n        plugins: [\n          {\n            enums: {\n              case: 'PascalCase',\n              mode: 'javascript',\n            },\n            name: '@hey-api/typescript',\n          },\n        ],\n      }),\n      description: 'handles various enum names and values (JavaScript, PascalCase)',\n    },\n    {\n      config: createConfig({\n        input: 'enum-names-values.yaml',\n        output: 'enum-names-values-javascript-camelCase',\n        plugins: [\n          {\n            enums: {\n              case: 'camelCase',\n              mode: 'javascript',\n            },\n            name: '@hey-api/typescript',\n          },\n        ],\n      }),\n      description: 'handles various enum names and values (JavaScript, camelCase)',\n    },\n    {\n      config: createConfig({\n        input: 'enum-names-values.yaml',\n        output: 'enum-names-values-javascript-snake_case',\n        plugins: [\n          {\n            enums: {\n              case: 'snake_case',\n              mode: 'javascript',\n            },\n            name: '@hey-api/typescript',\n          },\n        ],\n      }),\n      description: 'handles various enum names and values (JavaScript, snake_case)',\n    },\n    {\n      config: createConfig({\n        input: 'enum-names-values.yaml',\n        output: 'enum-names-values-javascript-preserve',\n        plugins: [\n          {\n            enums: {\n              case: 'preserve',\n              mode: 'javascript',\n            },\n            name: '@hey-api/typescript',\n          },\n        ],\n      }),\n      description: 'handles various enum names and values (JavaScript, preserve)',\n    },\n    {\n      config: createConfig({\n        input: 'enum-names-values.yaml',\n        output: 'enum-names-values-javascript-ignore-null',\n        plugins: [\n          {\n            enums: {\n              case: 'preserve',\n              constantsIgnoreNull: true,\n              mode: 'javascript',\n            },\n            name: '@hey-api/typescript',\n          },\n        ],\n      }),\n      description: 'handles various enum names and values (JavaScript, preserve, ignore null)',\n    },\n    {\n      config: createConfig({\n        input: 'enum-names-values.yaml',\n        output: 'enum-names-values-typescript-SCREAMING_SNAKE_CASE',\n        plugins: [\n          {\n            enums: {\n              case: 'SCREAMING_SNAKE_CASE',\n              mode: 'typescript',\n            },\n            name: '@hey-api/typescript',\n          },\n        ],\n      }),\n      description: 'handles various enum names and values (TypeScript, SCREAMING_SNAKE_CASE)',\n    },\n    {\n      config: createConfig({\n        input: 'enum-names-values.yaml',\n        output: 'enum-names-values-typescript-PascalCase',\n        plugins: [\n          {\n            enums: {\n              case: 'PascalCase',\n              mode: 'typescript',\n            },\n            name: '@hey-api/typescript',\n          },\n        ],\n      }),\n      description: 'handles various enum names and values (TypeScript, PascalCase)',\n    },\n    {\n      config: createConfig({\n        input: 'enum-names-values.yaml',\n        output: 'enum-names-values-typescript-camelCase',\n        plugins: [\n          {\n            enums: {\n              case: 'camelCase',\n              mode: 'typescript',\n            },\n            name: '@hey-api/typescript',\n          },\n        ],\n      }),\n      description: 'handles various enum names and values (TypeScript, camelCase)',\n    },\n    {\n      config: createConfig({\n        input: 'enum-names-values.yaml',\n        output: 'enum-names-values-typescript-snake_case',\n        plugins: [\n          {\n            enums: {\n              case: 'snake_case',\n              mode: 'typescript',\n            },\n            name: '@hey-api/typescript',\n          },\n        ],\n      }),\n      description: 'handles various enum names and values (TypeScript, snake_case)',\n    },\n    {\n      config: createConfig({\n        input: 'enum-names-values.yaml',\n        output: 'enum-names-values-typescript-preserve',\n        plugins: [\n          {\n            enums: {\n              case: 'preserve',\n              mode: 'typescript',\n            },\n            name: '@hey-api/typescript',\n          },\n        ],\n      }),\n      description: 'handles various enum names and values (TypeScript, preserve)',\n    },\n    {\n      config: createConfig({\n        input: 'enum-names-values.yaml',\n        output: 'enum-names-values-typescript-const',\n        plugins: [\n          {\n            enums: {\n              case: 'camelCase',\n              mode: 'typescript-const',\n            },\n            name: '@hey-api/typescript',\n          },\n        ],\n      }),\n      description: 'handles TypeScript const enum modifier',\n    },\n    {\n      config: createConfig({\n        input: 'union-types.json',\n        output: 'union-types',\n      }),\n      description: 'handles union of primitive types',\n    },\n    {\n      config: createConfig({\n        input: 'enum-null.json',\n        output: 'enum-null',\n      }),\n      description: 'handles null enums',\n    },\n    {\n      config: createConfig({\n        input: 'exclude-deprecated.yaml',\n        output: 'exclude-deprecated',\n        parser: {\n          filters: {\n            deprecated: false,\n          },\n        },\n      }),\n      description: 'excludes deprecated fields',\n    },\n    {\n      config: createConfig({\n        input: 'headers.yaml',\n        output: 'headers',\n        plugins: ['@hey-api/client-fetch', '@hey-api/typescript', '@hey-api/sdk'],\n      }),\n      description: 'handles various headers',\n    },\n    {\n      config: createConfig({\n        input: 'internal-name-conflict.json',\n        output: 'internal-name-conflict',\n        plugins: ['@hey-api/client-fetch', '@tanstack/react-query'],\n      }),\n      description: 'handles conflict between generated code and internal artifacts',\n    },\n    {\n      config: createConfig({\n        input: 'negative-property-names.json',\n        output: 'negative-property-names',\n      }),\n      description: 'handles negative property names correctly',\n    },\n    {\n      config: createConfig({\n        input: 'object-properties-all-of.json',\n        output: 'object-properties-all-of',\n      }),\n      description:\n        'sets correct logical operator and brackets on object with properties and allOf composition',\n    },\n    {\n      config: createConfig({\n        input: 'object-properties-any-of.json',\n        output: 'object-properties-any-of',\n      }),\n      description:\n        'sets correct logical operator and brackets on object with properties and anyOf composition',\n    },\n    {\n      config: createConfig({\n        input: 'object-properties-one-of.json',\n        output: 'object-properties-one-of',\n      }),\n      description:\n        'sets correct logical operator and brackets on object with properties and oneOf composition',\n    },\n    {\n      config: createConfig({\n        input: 'object-property-names.yaml',\n        output: 'object-property-names',\n      }),\n      description: 'sets correct index signature type on object with property names',\n    },\n    {\n      config: createConfig({\n        input: 'operation-204.json',\n        output: 'operation-204',\n      }),\n      description: 'handles empty response status codes',\n    },\n    {\n      config: createConfig({\n        input: 'pagination-ref.yaml',\n        output: 'pagination-ref',\n        plugins: ['@hey-api/client-fetch', '@tanstack/react-query'],\n      }),\n      description: 'detects pagination fields',\n    },\n    {\n      config: createConfig({\n        input: 'parameter-explode-false.json',\n        output: 'parameter-explode-false',\n        plugins: ['@hey-api/client-fetch', '@hey-api/sdk'],\n      }),\n      description: 'handles non-exploded array query parameters',\n    },\n    {\n      config: createConfig({\n        input: 'parameter-explode-false.json',\n        output: 'parameter-explode-false-axios',\n        plugins: ['@hey-api/client-axios', '@hey-api/sdk'],\n      }),\n      description: 'handles non-exploded array query parameters (Axios)',\n    },\n    {\n      config: createConfig({\n        input: 'parameter-tuple.json',\n        output: 'parameter-tuple',\n      }),\n      description: 'handles tuple query parameters',\n    },\n    {\n      config: createConfig({\n        input: 'ref-deep.yaml',\n        output: 'ref-deep',\n      }),\n      description: 'handles deep references',\n    },\n    {\n      config: createConfig({\n        input: 'transforms-read-write.yaml',\n        output: 'transforms-read-write',\n        plugins: ['@hey-api/client-fetch', '@hey-api/typescript'],\n      }),\n      description: 'handles read-only and write-only types',\n    },\n    {\n      config: createConfig({\n        input: 'transforms-schemas-name.yaml',\n        output: 'transforms-schemas-name',\n        parser: {\n          transforms: {\n            schemaName: (name: string) => {\n              // Strip version markers: User_v1_0_0_User → User\n              let clean = name.replace(/([A-Za-z\\d]+)_v\\d+_\\d+_\\d+_([A-Za-z\\d]*)/g, (_, p1, p2) =>\n                p2.startsWith(p1) ? p2 : p1 + p2,\n              );\n              // Deduplicate prefixes: Foo_Foo → Foo\n              const m = clean.match(/^([A-Za-z\\d]+)_\\1([A-Za-z\\d]*)$/);\n              if (m) clean = m[1]! + m[2]!;\n              return clean;\n            },\n          },\n        },\n      }),\n      description: 'handles schema name transforms',\n    },\n    {\n      config: createConfig({\n        input: 'transforms-read-write-nested.yaml',\n        output: 'transforms-read-write-nested',\n      }),\n      description: 'handles write-only types in nested schemas',\n    },\n    {\n      config: createConfig({\n        input: 'transforms-read-write-response.yaml',\n        output: 'transforms-read-write-response',\n      }),\n      description: 'handles read-only types in nested response schemas',\n    },\n    {\n      config: createConfig({\n        input: 'transforms-read-write-unevaluated.yaml',\n        output: 'transforms-read-write-unevaluated',\n      }),\n      description: 'preserves unevaluatedProperties in schemas with readOnly fields',\n    },\n    {\n      config: createConfig({\n        input: 'ref-type.json',\n        output: 'ref-type',\n      }),\n      description: 'handles extended $ref with type keyword',\n    },\n    {\n      config: createConfig({\n        input: 'required-all-of-ref.json',\n        output: 'required-all-of-ref',\n      }),\n      description: 'sets allOf composition ref model properties as required',\n    },\n    {\n      config: createConfig({\n        input: 'required-any-of-ref.json',\n        output: 'required-any-of-ref',\n      }),\n      description: 'does not set anyOf composition ref model properties as required',\n    },\n    {\n      config: createConfig({\n        input: 'required-one-of-ref.json',\n        output: 'required-one-of-ref',\n      }),\n      description: 'does not set oneOf composition ref model properties as required',\n    },\n    {\n      config: createConfig({\n        input: 'schema-const.yaml',\n        output: 'schema-const',\n      }),\n      description: 'handles various constants',\n    },\n    {\n      config: createConfig({\n        input: 'security-api-key.yaml',\n        output: 'security-api-key',\n        plugins: [\n          '@hey-api/client-fetch',\n          {\n            auth: true,\n            name: '@hey-api/sdk',\n          },\n        ],\n      }),\n      description: 'generates SDK functions with auth (api key)',\n    },\n    {\n      config: createConfig({\n        input: 'security-http-bearer.json',\n        output: 'security-http-bearer',\n        plugins: [\n          '@hey-api/client-fetch',\n          {\n            auth: true,\n            name: '@hey-api/sdk',\n          },\n        ],\n      }),\n      description: 'generates SDK functions with auth (Bearer token)',\n    },\n    {\n      config: createConfig({\n        input: 'security-oauth2.yaml',\n        output: 'security-oauth2',\n        plugins: [\n          '@hey-api/client-fetch',\n          {\n            auth: true,\n            name: '@hey-api/sdk',\n          },\n        ],\n      }),\n      description: 'generates SDK functions with auth (oauth2)',\n    },\n    {\n      config: createConfig({\n        input: 'security-open-id-connect.yaml',\n        output: 'security-open-id-connect',\n        plugins: [\n          '@hey-api/client-fetch',\n          {\n            auth: true,\n            name: '@hey-api/sdk',\n          },\n        ],\n      }),\n      description: 'generates SDK functions with auth (OpenID Connect)',\n    },\n    {\n      config: createConfig({\n        input: 'security-oauth2.yaml',\n        output: 'security-false',\n        plugins: [\n          '@hey-api/client-fetch',\n          {\n            auth: false,\n            name: '@hey-api/sdk',\n          },\n        ],\n      }),\n      description: 'generates SDK functions without auth',\n    },\n    {\n      config: createConfig({\n        input: 'servers.yaml',\n        output: 'servers',\n        plugins: ['@hey-api/client-fetch', '@hey-api/typescript'],\n      }),\n      description: 'generates baseUrl',\n    },\n    {\n      config: createConfig({\n        input: 'transformers-all-of.yaml',\n        output: 'transformers-all-of',\n        plugins: ['@hey-api/client-fetch', '@hey-api/transformers'],\n      }),\n      description: 'transforms nested date in all of composition',\n    },\n    {\n      config: createConfig({\n        input: 'transformers-allof-response-wrapper.json',\n        output: 'transformers-allof-response-wrapper',\n        plugins: ['@hey-api/client-fetch', '@hey-api/transformers'],\n      }),\n      description: 'transforms dates in allOf response wrapper (paginated response)',\n    },\n    {\n      config: createConfig({\n        input: 'transformers-any-of-null.json',\n        output: 'transformers-any-of-null',\n        plugins: ['@hey-api/client-fetch', '@hey-api/transformers'],\n      }),\n      description: 'transforms nullable date property',\n    },\n    {\n      config: createConfig({\n        input: 'transformers-array.json',\n        output: 'transformers-array',\n        plugins: ['@hey-api/client-fetch', '@hey-api/transformers'],\n      }),\n      description: 'transforms an array',\n    },\n    {\n      config: createConfig({\n        input: 'transformers-recursive.json',\n        output: 'transformers-recursive',\n        plugins: ['@hey-api/client-fetch', '@hey-api/transformers'],\n      }),\n      description: 'transforms recursive/self-referential schemas',\n    },\n    {\n      config: createConfig({\n        input: 'transformers-one-of-discriminated.yaml',\n        output: 'transformers-one-of-discriminated',\n        plugins: ['@hey-api/client-fetch', '@hey-api/transformers'],\n      }),\n      description: 'transforms discriminated oneOf without warning',\n    },\n    {\n      config: createConfig({\n        input: 'type-invalid.json',\n        output: 'type-invalid',\n      }),\n      description: 'gracefully handles invalid type',\n    },\n    {\n      config: createConfig({\n        input: 'opencode.yaml',\n        output: 'sse-angular',\n        parser: {\n          filters: {\n            operations: {\n              include: ['GET /event'],\n            },\n          },\n        },\n        plugins: ['@hey-api/client-angular', '@hey-api/sdk'],\n      }),\n      description: 'client with SSE (Angular)',\n    },\n    {\n      config: createConfig({\n        input: 'opencode.yaml',\n        output: 'sse-axios',\n        parser: {\n          filters: {\n            operations: {\n              include: ['GET /event'],\n            },\n          },\n        },\n        plugins: ['@hey-api/client-axios', '@hey-api/sdk'],\n      }),\n      description: 'client with SSE (Axios)',\n    },\n    {\n      config: createConfig({\n        input: 'opencode.yaml',\n        output: 'sse-fetch',\n        parser: {\n          filters: {\n            operations: {\n              include: ['GET /event'],\n            },\n          },\n        },\n        plugins: ['@hey-api/client-fetch', '@hey-api/sdk'],\n      }),\n      description: 'client with SSE (Fetch)',\n    },\n    {\n      config: createConfig({\n        input: 'opencode.yaml',\n        output: 'sse-ofetch',\n        parser: {\n          filters: {\n            operations: {\n              include: ['GET /event'],\n            },\n          },\n        },\n        plugins: ['@hey-api/client-ofetch', '@hey-api/sdk'],\n      }),\n      description: 'client with SSE (ofetch)',\n    },\n    {\n      config: createConfig({\n        input: 'opencode.yaml',\n        output: 'sse-next',\n        parser: {\n          filters: {\n            operations: {\n              include: ['GET /event'],\n            },\n          },\n        },\n        plugins: ['@hey-api/client-next', '@hey-api/sdk'],\n      }),\n      description: 'client with SSE (Next.js)',\n    },\n    {\n      config: createConfig({\n        input: 'opencode.yaml',\n        output: 'sse-nuxt',\n        parser: {\n          filters: {\n            operations: {\n              include: ['GET /event'],\n            },\n          },\n        },\n        plugins: ['@hey-api/client-nuxt', '@hey-api/sdk'],\n      }),\n      description: 'client with SSE (Nuxt)',\n    },\n    {\n      config: createConfig({\n        input: 'sse-post.yaml',\n        output: 'sse-tanstack-react-query',\n        plugins: ['@hey-api/client-fetch', '@tanstack/react-query'],\n      }),\n      description: 'SSE POST endpoint is excluded from TanStack React Query mutations',\n    },\n    {\n      config: createConfig({\n        input: 'zoom-video-sdk.json',\n        output: 'webhooks',\n      }),\n      description: 'webhook types',\n    },\n    {\n      config: createConfig({\n        input: 'string-with-format.yaml',\n        output: 'string-with-format',\n      }),\n      description: 'anyOf string and binary string',\n    },\n  ];\n\n  it.each(scenarios)('$description', async ({ config }) => {\n    await createClient(config);\n\n    const filePaths = getFilePaths(config.output.path);\n\n    await Promise.all(\n      filePaths.map(async (filePath) => {\n        const fileContent = fs.readFileSync(filePath, 'utf-8');\n        await expect(fileContent).toMatchFileSnapshot(\n          path.join(__dirname, '__snapshots__', version, filePath.slice(outputDir.length + 1)),\n        );\n      }),\n    );\n  });\n});\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/additional-properties-false/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type { Bar, Baz, ClientOptions, Foo } from './types.gen';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/additional-properties-false/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type ClientOptions = {\n    baseUrl: string;\n};\n\nexport type Foo = {\n    foo: string;\n};\n\nexport type Bar = Foo & {};\n\nexport type Baz = Foo & {\n    bar: string;\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/additional-properties-true/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type { Bar, Baz, ClientOptions, Foo, Qux } from './types.gen';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/additional-properties-true/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type ClientOptions = {\n    baseUrl: string;\n};\n\nexport type Foo = {\n    foo: string;\n    [key: string]: unknown;\n};\n\nexport type Bar = Foo & {\n    [key: string]: unknown;\n};\n\nexport type Baz = Foo & {\n    bar: string;\n    [key: string]: unknown;\n};\n\nexport type Qux = {\n    [key: string]: unknown;\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/body-response-text-plain/client/client.gen.ts",
    "content": "// 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 (options: RequestOptions) => {\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 url = buildUrl(opts);\n\n    return { opts, url };\n  };\n\n  const request: Client['request'] = async (options) => {\n    // @ts-expect-error\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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/body-response-text-plain/client/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type { Auth } from '../core/auth.gen';\nexport type { QuerySerializerOptions } from '../core/bodySerializer.gen';\nexport {\n  formDataBodySerializer,\n  jsonBodySerializer,\n  urlSearchParamsBodySerializer,\n} from '../core/bodySerializer.gen';\nexport { buildClientParams } from '../core/params.gen';\nexport { serializeQueryKeyValue } from '../core/queryKeySerializer.gen';\nexport { createClient } from './client.gen';\nexport type {\n  Client,\n  ClientOptions,\n  Config,\n  CreateClientConfig,\n  Options,\n  RequestOptions,\n  RequestResult,\n  ResolvedRequestOptions,\n  ResponseStyle,\n  TDataShape,\n} from './types.gen';\nexport { createConfig, mergeHeaders } from './utils.gen';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/body-response-text-plain/client/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { Auth } from '../core/auth.gen';\nimport type {\n  ServerSentEventsOptions,\n  ServerSentEventsResult,\n} from '../core/serverSentEvents.gen';\nimport type { Client as CoreClient, Config as CoreConfig } from '../core/types.gen';\nimport type { Middleware } from './utils.gen';\n\nexport type ResponseStyle = 'data' | 'fields';\n\nexport interface Config<T extends ClientOptions = ClientOptions>\n  extends Omit<RequestInit, 'body' | 'headers' | 'method'>, CoreConfig {\n  /**\n   * Base URL for all requests made by this client.\n   */\n  baseUrl?: T['baseUrl'];\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   * Please don't use the Fetch client for Next.js applications. The `next`\n   * options won't have any effect.\n   *\n   * Install {@link https://www.npmjs.com/package/@hey-api/client-next `@hey-api/client-next`} instead.\n   */\n  next?: never;\n  /**\n   * Return the response data parsed in a specified format. By default, `auto`\n   * will infer the appropriate method from the `Content-Type` response header.\n   * You can override this behavior with any of the {@link Body} methods.\n   * Select `stream` if you don't want to parse response data at all.\n   *\n   * @default 'auto'\n   */\n  parseAs?: 'arrayBuffer' | 'auto' | 'blob' | 'formData' | 'json' | 'stream' | 'text';\n  /**\n   * Should we return only data or multiple fields (data, error, response, etc.)?\n   *\n   * @default 'fields'\n   */\n  responseStyle?: ResponseStyle;\n  /**\n   * Throw an error instead of returning it in the response?\n   *\n   * @default false\n   */\n  throwOnError?: T['throwOnError'];\n}\n\nexport interface RequestOptions<\n  TData = unknown,\n  TResponseStyle extends ResponseStyle = 'fields',\n  ThrowOnError extends boolean = boolean,\n  Url extends string = string,\n>\n  extends\n    Config<{\n      responseStyle: TResponseStyle;\n      throwOnError: ThrowOnError;\n    }>,\n    Pick<\n      ServerSentEventsOptions<TData>,\n      | 'onRequest'\n      | 'onSseError'\n      | 'onSseEvent'\n      | 'sseDefaultRetryDelay'\n      | 'sseMaxRetryAttempts'\n      | 'sseMaxRetryDelay'\n    > {\n  /**\n   * Any body that you want to add to your request.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/fetch#body}\n   */\n  body?: unknown;\n  path?: Record<string, unknown>;\n  query?: Record<string, unknown>;\n  /**\n   * Security mechanism(s) to use for the request.\n   */\n  security?: ReadonlyArray<Auth>;\n  url: Url;\n}\n\nexport interface ResolvedRequestOptions<\n  TResponseStyle extends ResponseStyle = 'fields',\n  ThrowOnError extends boolean = boolean,\n  Url extends string = string,\n> extends RequestOptions<unknown, TResponseStyle, ThrowOnError, Url> {\n  serializedBody?: string;\n}\n\nexport type RequestResult<\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = boolean,\n  TResponseStyle extends ResponseStyle = 'fields',\n> = ThrowOnError extends true\n  ? Promise<\n      TResponseStyle extends 'data'\n        ? TData extends Record<string, unknown>\n          ? TData[keyof TData]\n          : TData\n        : {\n            data: TData extends Record<string, unknown> ? TData[keyof TData] : TData;\n            request: Request;\n            response: Response;\n          }\n    >\n  : Promise<\n      TResponseStyle extends 'data'\n        ? (TData extends Record<string, unknown> ? TData[keyof TData] : TData) | undefined\n        : (\n            | {\n                data: TData extends Record<string, unknown> ? TData[keyof TData] : TData;\n                error: undefined;\n              }\n            | {\n                data: undefined;\n                error: TError extends Record<string, unknown> ? TError[keyof TError] : TError;\n              }\n          ) & {\n            request: Request;\n            response: Response;\n          }\n    >;\n\nexport interface ClientOptions {\n  baseUrl?: string;\n  responseStyle?: ResponseStyle;\n  throwOnError?: boolean;\n}\n\ntype MethodFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'>,\n) => RequestResult<TData, TError, ThrowOnError, TResponseStyle>;\n\ntype SseFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'>,\n) => Promise<ServerSentEventsResult<TData, TError>>;\n\ntype RequestFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'> &\n    Pick<Required<RequestOptions<TData, TResponseStyle, ThrowOnError>>, 'method'>,\n) => RequestResult<TData, TError, ThrowOnError, TResponseStyle>;\n\ntype BuildUrlFn = <\n  TData extends {\n    body?: unknown;\n    path?: Record<string, unknown>;\n    query?: Record<string, unknown>;\n    url: string;\n  },\n>(\n  options: TData & Options<TData>,\n) => string;\n\nexport type Client = CoreClient<RequestFn, Config, MethodFn, BuildUrlFn, SseFn> & {\n  interceptors: Middleware<Request, Response, unknown, ResolvedRequestOptions>;\n};\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 = ClientOptions> = (\n  override?: Config<ClientOptions & T>,\n) => Config<Required<ClientOptions> & T>;\n\nexport interface TDataShape {\n  body?: unknown;\n  headers?: unknown;\n  path?: unknown;\n  query?: unknown;\n  url: string;\n}\n\ntype OmitKeys<T, K> = Pick<T, Exclude<keyof T, K>>;\n\nexport type Options<\n  TData extends TDataShape = TDataShape,\n  ThrowOnError extends boolean = boolean,\n  TResponse = unknown,\n  TResponseStyle extends ResponseStyle = 'fields',\n> = OmitKeys<\n  RequestOptions<TResponse, TResponseStyle, ThrowOnError>,\n  'body' | 'path' | 'query' | 'url'\n> &\n  ([TData] extends [never] ? unknown : Omit<TData, 'url'>);\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/body-response-text-plain/client/utils.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/body-response-text-plain/client.gen.ts",
    "content": "// 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>());\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/body-response-text-plain/core/auth.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/body-response-text-plain/core/bodySerializer.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/body-response-text-plain/core/params.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/body-response-text-plain/core/pathSerializer.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/body-response-text-plain/core/queryKeySerializer.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\n/**\n * JSON-friendly union that mirrors what Pinia Colada can hash.\n */\nexport type JsonValue =\n  | null\n  | string\n  | number\n  | boolean\n  | JsonValue[]\n  | { [key: string]: JsonValue };\n\n/**\n * Replacer that converts non-JSON values (bigint, Date, etc.) to safe substitutes.\n */\nexport const queryKeyJsonReplacer = (_key: string, value: unknown) => {\n  if (value === undefined || typeof value === 'function' || typeof value === 'symbol') {\n    return undefined;\n  }\n  if (typeof value === 'bigint') {\n    return value.toString();\n  }\n  if (value instanceof Date) {\n    return value.toISOString();\n  }\n  return value;\n};\n\n/**\n * Safely stringifies a value and parses it back into a JsonValue.\n */\nexport const stringifyToJsonValue = (input: unknown): JsonValue | undefined => {\n  try {\n    const json = JSON.stringify(input, queryKeyJsonReplacer);\n    if (json === undefined) {\n      return undefined;\n    }\n    return JSON.parse(json) as JsonValue;\n  } catch {\n    return undefined;\n  }\n};\n\n/**\n * Detects plain objects (including objects with a null prototype).\n */\nconst isPlainObject = (value: unknown): value is Record<string, unknown> => {\n  if (value === null || typeof value !== 'object') {\n    return false;\n  }\n  const prototype = Object.getPrototypeOf(value as object);\n  return prototype === Object.prototype || prototype === null;\n};\n\n/**\n * Turns URLSearchParams into a sorted JSON object for deterministic keys.\n */\nconst serializeSearchParams = (params: URLSearchParams): JsonValue => {\n  const entries = Array.from(params.entries()).sort(([a], [b]) => a.localeCompare(b));\n  const result: Record<string, JsonValue> = {};\n\n  for (const [key, value] of entries) {\n    const existing = result[key];\n    if (existing === undefined) {\n      result[key] = value;\n      continue;\n    }\n\n    if (Array.isArray(existing)) {\n      (existing as string[]).push(value);\n    } else {\n      result[key] = [existing, value];\n    }\n  }\n\n  return result;\n};\n\n/**\n * Normalizes any accepted value into a JSON-friendly shape for query keys.\n */\nexport const serializeQueryKeyValue = (value: unknown): JsonValue | undefined => {\n  if (value === null) {\n    return null;\n  }\n\n  if (typeof value === 'string' || typeof value === 'number' || typeof value === 'boolean') {\n    return value;\n  }\n\n  if (value === undefined || typeof value === 'function' || typeof value === 'symbol') {\n    return undefined;\n  }\n\n  if (typeof value === 'bigint') {\n    return value.toString();\n  }\n\n  if (value instanceof Date) {\n    return value.toISOString();\n  }\n\n  if (Array.isArray(value)) {\n    return stringifyToJsonValue(value);\n  }\n\n  if (typeof URLSearchParams !== 'undefined' && value instanceof URLSearchParams) {\n    return serializeSearchParams(value);\n  }\n\n  if (isPlainObject(value)) {\n    return stringifyToJsonValue(value);\n  }\n\n  return undefined;\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/body-response-text-plain/core/serverSentEvents.gen.ts",
    "content": "// 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 const 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            // Normalize line endings: CRLF -> LF, then CR -> LF\n            buffer = buffer.replace(/\\r\\n/g, '\\n').replace(/\\r/g, '\\n');\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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/body-response-text-plain/core/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { Auth, AuthToken } from './auth.gen';\nimport type { BodySerializer, QuerySerializer, QuerySerializerOptions } from './bodySerializer.gen';\n\nexport type HttpMethod =\n  | 'connect'\n  | 'delete'\n  | 'get'\n  | 'head'\n  | 'options'\n  | 'patch'\n  | 'post'\n  | 'put'\n  | 'trace';\n\nexport type Client<\n  RequestFn = never,\n  Config = unknown,\n  MethodFn = never,\n  BuildUrlFn = never,\n  SseFn = never,\n> = {\n  /**\n   * Returns the final request URL.\n   */\n  buildUrl: BuildUrlFn;\n  getConfig: () => Config;\n  request: RequestFn;\n  setConfig: (config: Config) => Config;\n} & {\n  [K in HttpMethod]: MethodFn;\n} & ([SseFn] extends [never] ? { sse?: never } : { sse: { [K in HttpMethod]: SseFn } });\n\nexport interface Config {\n  /**\n   * Auth token or a function returning auth token. The resolved value will be\n   * added to the request payload as defined by its `security` array.\n   */\n  auth?: ((auth: Auth) => Promise<AuthToken> | AuthToken) | AuthToken;\n  /**\n   * A function for serializing request body parameter. By default,\n   * {@link JSON.stringify()} will be used.\n   */\n  bodySerializer?: BodySerializer | null;\n  /**\n   * An object containing any HTTP headers that you want to pre-populate your\n   * `Headers` object with.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/Headers/Headers#init See more}\n   */\n  headers?:\n    | RequestInit['headers']\n    | Record<\n        string,\n        string | number | boolean | (string | number | boolean)[] | null | undefined | unknown\n      >;\n  /**\n   * The request method.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/fetch#method See more}\n   */\n  method?: Uppercase<HttpMethod>;\n  /**\n   * A function for serializing request query parameters. By default, arrays\n   * will be exploded in form style, objects will be exploded in deepObject\n   * style, and reserved characters are percent-encoded.\n   *\n   * This method will have no effect if the native `paramsSerializer()` Axios\n   * API function is used.\n   *\n   * {@link https://swagger.io/docs/specification/serialization/#query View examples}\n   */\n  querySerializer?: QuerySerializer | QuerySerializerOptions;\n  /**\n   * A function validating request data. This is useful if you want to ensure\n   * the request conforms to the desired shape, so it can be safely sent to\n   * the server.\n   */\n  requestValidator?: (data: unknown) => Promise<unknown>;\n  /**\n   * A function transforming response data before it's returned. This is useful\n   * for post-processing data, e.g. converting ISO strings into Date objects.\n   */\n  responseTransformer?: (data: unknown) => Promise<unknown>;\n  /**\n   * A function validating response data. This is useful if you want to ensure\n   * the response conforms to the desired shape, so it can be safely passed to\n   * the transformers and returned to the user.\n   */\n  responseValidator?: (data: unknown) => Promise<unknown>;\n}\n\ntype IsExactlyNeverOrNeverUndefined<T> = [T] extends [never]\n  ? true\n  : [T] extends [never | undefined]\n    ? [undefined] extends [T]\n      ? false\n      : true\n    : false;\n\nexport type OmitNever<T extends Record<string, unknown>> = {\n  [K in keyof T as IsExactlyNeverOrNeverUndefined<T[K]> extends true ? never : K]: T[K];\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/body-response-text-plain/core/utils.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/body-response-text-plain/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport { type Options, postFoo } from './sdk.gen';\nexport type { ClientOptions, PostFooData, PostFooResponse, PostFooResponses } from './types.gen';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/body-response-text-plain/sdk.gen.ts",
    "content": "// 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 { PostFooData, PostFooResponses } from './types.gen';\n\nexport type Options<TData extends TDataShape = TDataShape, ThrowOnError extends boolean = boolean> = Options2<TData, ThrowOnError> & {\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\nexport const postFoo = <ThrowOnError extends boolean = false>(options: Options<PostFooData, ThrowOnError>) => (options.client ?? client).post<PostFooResponses, unknown, ThrowOnError>({\n    bodySerializer: null,\n    url: '/foo',\n    ...options,\n    headers: {\n        'Content-Type': 'text/plain',\n        ...options.headers\n    }\n});\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/body-response-text-plain/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type ClientOptions = {\n    baseUrl: string;\n};\n\nexport type PostFooData = {\n    body: string;\n    path?: never;\n    query?: never;\n    url: '/foo';\n};\n\nexport type PostFooResponses = {\n    /**\n     * OK\n     */\n    200: string;\n};\n\nexport type PostFooResponse = PostFooResponses[keyof PostFooResponses];\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/enum-names-values/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type { _110, Arrays, ClientOptions, Foo, MyFoo, MyFoo2, Numbers } from './types.gen';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/enum-names-values/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type ClientOptions = {\n    baseUrl: string;\n};\n\nexport type _110 = '1-10' | '11-20';\n\nexport type MyFoo = 'myFoo' | 'myBar';\n\nexport type MyFoo2 = 'MyFoo' | 'MyBar';\n\nexport type Foo = 'foo' | 'bar' | '' | true | false;\n\nexport type Numbers = 100 | 200 | 300 | -100 | -200 | -300;\n\nexport type Arrays = [\n    'foo'\n] | [\n    'bar'\n] | [\n    'baz'\n];\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/enum-names-values-javascript-PascalCase/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport { _110, Arrays, type ClientOptions, Foo, MyFoo, MyFoo2, Numbers } from './types.gen';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/enum-names-values-javascript-PascalCase/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type ClientOptions = {\n    baseUrl: string;\n};\n\nexport const _110 = { 110: '1-10', 1120: '11-20' } as const;\n\nexport type _110 = typeof _110[keyof typeof _110];\n\nexport const MyFoo = { MyFoo: 'myFoo', MyBar: 'myBar' } as const;\n\nexport type MyFoo = typeof MyFoo[keyof typeof MyFoo];\n\nexport const MyFoo2 = { MyFoo: 'MyFoo', MyBar: 'MyBar' } as const;\n\nexport type MyFoo2 = typeof MyFoo2[keyof typeof MyFoo2];\n\nexport const Foo = {\n    Foo: 'foo',\n    Bar: 'bar',\n    '': '',\n    True: true,\n    False: false\n} as const;\n\nexport type Foo = typeof Foo[keyof typeof Foo];\n\nexport const Numbers = {\n    100: 100,\n    200: 200,\n    300: 300,\n    '-100': -100,\n    '-200': -200,\n    '-300': -300\n} as const;\n\nexport type Numbers = typeof Numbers[keyof typeof Numbers];\n\nexport const Arrays = {\n    0: ['foo'],\n    1: ['bar'],\n    2: ['baz']\n} as const;\n\nexport type Arrays = typeof Arrays[keyof typeof Arrays];\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/enum-names-values-javascript-SCREAMING_SNAKE_CASE/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport { _110, Arrays, type ClientOptions, Foo, MyFoo, MyFoo2, Numbers } from './types.gen';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/enum-names-values-javascript-SCREAMING_SNAKE_CASE/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type ClientOptions = {\n    baseUrl: string;\n};\n\nexport const _110 = { '1_10': '1-10', '11_20': '11-20' } as const;\n\nexport type _110 = typeof _110[keyof typeof _110];\n\nexport const MyFoo = { MY_FOO: 'myFoo', MY_BAR: 'myBar' } as const;\n\nexport type MyFoo = typeof MyFoo[keyof typeof MyFoo];\n\nexport const MyFoo2 = { MY_FOO: 'MyFoo', MY_BAR: 'MyBar' } as const;\n\nexport type MyFoo2 = typeof MyFoo2[keyof typeof MyFoo2];\n\nexport const Foo = {\n    FOO: 'foo',\n    BAR: 'bar',\n    '': '',\n    TRUE: true,\n    FALSE: false\n} as const;\n\nexport type Foo = typeof Foo[keyof typeof Foo];\n\nexport const Numbers = {\n    100: 100,\n    200: 200,\n    300: 300,\n    '-100': -100,\n    '-200': -200,\n    '-300': -300\n} as const;\n\nexport type Numbers = typeof Numbers[keyof typeof Numbers];\n\nexport const Arrays = {\n    0: ['foo'],\n    1: ['bar'],\n    2: ['baz']\n} as const;\n\nexport type Arrays = typeof Arrays[keyof typeof Arrays];\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/enum-names-values-javascript-camelCase/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport { _110, Arrays, type ClientOptions, Foo, MyFoo, MyFoo2, Numbers } from './types.gen';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/enum-names-values-javascript-camelCase/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type ClientOptions = {\n    baseUrl: string;\n};\n\nexport const _110 = { 110: '1-10', 1120: '11-20' } as const;\n\nexport type _110 = typeof _110[keyof typeof _110];\n\nexport const MyFoo = { myFoo: 'myFoo', myBar: 'myBar' } as const;\n\nexport type MyFoo = typeof MyFoo[keyof typeof MyFoo];\n\nexport const MyFoo2 = { myFoo: 'MyFoo', myBar: 'MyBar' } as const;\n\nexport type MyFoo2 = typeof MyFoo2[keyof typeof MyFoo2];\n\nexport const Foo = {\n    foo: 'foo',\n    bar: 'bar',\n    '': '',\n    true: true,\n    false: false\n} as const;\n\nexport type Foo = typeof Foo[keyof typeof Foo];\n\nexport const Numbers = {\n    100: 100,\n    200: 200,\n    300: 300,\n    '-100': -100,\n    '-200': -200,\n    '-300': -300\n} as const;\n\nexport type Numbers = typeof Numbers[keyof typeof Numbers];\n\nexport const Arrays = {\n    0: ['foo'],\n    1: ['bar'],\n    2: ['baz']\n} as const;\n\nexport type Arrays = typeof Arrays[keyof typeof Arrays];\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/enum-names-values-javascript-preserve/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport { _110, Arrays, type ClientOptions, Foo, MyFoo, MyFoo2, Numbers } from './types.gen';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/enum-names-values-javascript-preserve/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type ClientOptions = {\n    baseUrl: string;\n};\n\nexport const _110 = { '1-10': '1-10', '11-20': '11-20' } as const;\n\nexport type _110 = typeof _110[keyof typeof _110];\n\nexport const MyFoo = { myFoo: 'myFoo', myBar: 'myBar' } as const;\n\nexport type MyFoo = typeof MyFoo[keyof typeof MyFoo];\n\nexport const MyFoo2 = { MyFoo: 'MyFoo', MyBar: 'MyBar' } as const;\n\nexport type MyFoo2 = typeof MyFoo2[keyof typeof MyFoo2];\n\nexport const Foo = {\n    foo: 'foo',\n    bar: 'bar',\n    '': '',\n    true: true,\n    false: false\n} as const;\n\nexport type Foo = typeof Foo[keyof typeof Foo];\n\nexport const Numbers = {\n    100: 100,\n    200: 200,\n    300: 300,\n    '-100': -100,\n    '-200': -200,\n    '-300': -300\n} as const;\n\nexport type Numbers = typeof Numbers[keyof typeof Numbers];\n\nexport const Arrays = {\n    0: ['foo'],\n    1: ['bar'],\n    2: ['baz']\n} as const;\n\nexport type Arrays = typeof Arrays[keyof typeof Arrays];\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/enum-names-values-javascript-snake_case/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport { _110, Arrays, type ClientOptions, Foo, MyFoo, MyFoo2, Numbers } from './types.gen';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/enum-names-values-javascript-snake_case/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type ClientOptions = {\n    baseUrl: string;\n};\n\nexport const _110 = { '1_10': '1-10', '11_20': '11-20' } as const;\n\nexport type _110 = typeof _110[keyof typeof _110];\n\nexport const MyFoo = { my_foo: 'myFoo', my_bar: 'myBar' } as const;\n\nexport type MyFoo = typeof MyFoo[keyof typeof MyFoo];\n\nexport const MyFoo2 = { my_foo: 'MyFoo', my_bar: 'MyBar' } as const;\n\nexport type MyFoo2 = typeof MyFoo2[keyof typeof MyFoo2];\n\nexport const Foo = {\n    foo: 'foo',\n    bar: 'bar',\n    '': '',\n    true: true,\n    false: false\n} as const;\n\nexport type Foo = typeof Foo[keyof typeof Foo];\n\nexport const Numbers = {\n    100: 100,\n    200: 200,\n    300: 300,\n    '-100': -100,\n    '-200': -200,\n    '-300': -300\n} as const;\n\nexport type Numbers = typeof Numbers[keyof typeof Numbers];\n\nexport const Arrays = {\n    0: ['foo'],\n    1: ['bar'],\n    2: ['baz']\n} as const;\n\nexport type Arrays = typeof Arrays[keyof typeof Arrays];\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/enum-names-values-typescript-PascalCase/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport { _110, type Arrays, type ClientOptions, type Foo, MyFoo, MyFoo2, Numbers } from './types.gen';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/enum-names-values-typescript-PascalCase/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type ClientOptions = {\n    baseUrl: string;\n};\n\nexport enum _110 {\n    _110 = '1-10',\n    _1120 = '11-20'\n}\n\nexport enum MyFoo {\n    MyFoo = 'myFoo',\n    MyBar = 'myBar'\n}\n\nexport enum MyFoo2 {\n    MyFoo = 'MyFoo',\n    MyBar = 'MyBar'\n}\n\nexport type Foo = 'foo' | 'bar' | '' | true | false;\n\nexport enum Numbers {\n    _100 = 100,\n    _200 = 200,\n    _300 = 300,\n    '_-100' = -100,\n    '_-200' = -200,\n    '_-300' = -300\n}\n\nexport type Arrays = [\n    'foo'\n] | [\n    'bar'\n] | [\n    'baz'\n];\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/enum-names-values-typescript-SCREAMING_SNAKE_CASE/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport { _110, type Arrays, type ClientOptions, type Foo, MyFoo, MyFoo2, Numbers } from './types.gen';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/enum-names-values-typescript-SCREAMING_SNAKE_CASE/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type ClientOptions = {\n    baseUrl: string;\n};\n\nexport enum _110 {\n    '1_10' = '1-10',\n    '11_20' = '11-20'\n}\n\nexport enum MyFoo {\n    MY_FOO = 'myFoo',\n    MY_BAR = 'myBar'\n}\n\nexport enum MyFoo2 {\n    MY_FOO = 'MyFoo',\n    MY_BAR = 'MyBar'\n}\n\nexport type Foo = 'foo' | 'bar' | '' | true | false;\n\nexport enum Numbers {\n    _100 = 100,\n    _200 = 200,\n    _300 = 300,\n    '_-100' = -100,\n    '_-200' = -200,\n    '_-300' = -300\n}\n\nexport type Arrays = [\n    'foo'\n] | [\n    'bar'\n] | [\n    'baz'\n];\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/enum-names-values-typescript-camelCase/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport { _110, type Arrays, type ClientOptions, type Foo, MyFoo, MyFoo2, Numbers } from './types.gen';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/enum-names-values-typescript-camelCase/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type ClientOptions = {\n    baseUrl: string;\n};\n\nexport enum _110 {\n    _110 = '1-10',\n    _1120 = '11-20'\n}\n\nexport enum MyFoo {\n    myFoo = 'myFoo',\n    myBar = 'myBar'\n}\n\nexport enum MyFoo2 {\n    myFoo = 'MyFoo',\n    myBar = 'MyBar'\n}\n\nexport type Foo = 'foo' | 'bar' | '' | true | false;\n\nexport enum Numbers {\n    _100 = 100,\n    _200 = 200,\n    _300 = 300,\n    '_-100' = -100,\n    '_-200' = -200,\n    '_-300' = -300\n}\n\nexport type Arrays = [\n    'foo'\n] | [\n    'bar'\n] | [\n    'baz'\n];\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/enum-names-values-typescript-const/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport { _110, type Arrays, type ClientOptions, type Foo, MyFoo, MyFoo2, Numbers } from './types.gen';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/enum-names-values-typescript-const/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type ClientOptions = {\n    baseUrl: string;\n};\n\nexport const enum _110 {\n    _110 = '1-10',\n    _1120 = '11-20'\n}\n\nexport const enum MyFoo {\n    myFoo = 'myFoo',\n    myBar = 'myBar'\n}\n\nexport const enum MyFoo2 {\n    myFoo = 'MyFoo',\n    myBar = 'MyBar'\n}\n\nexport type Foo = 'foo' | 'bar' | '' | true | false;\n\nexport const enum Numbers {\n    _100 = 100,\n    _200 = 200,\n    _300 = 300,\n    '_-100' = -100,\n    '_-200' = -200,\n    '_-300' = -300\n}\n\nexport type Arrays = [\n    'foo'\n] | [\n    'bar'\n] | [\n    'baz'\n];\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/enum-names-values-typescript-preserve/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport { _110, type Arrays, type ClientOptions, type Foo, MyFoo, MyFoo2, Numbers } from './types.gen';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/enum-names-values-typescript-preserve/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type ClientOptions = {\n    baseUrl: string;\n};\n\nexport enum _110 {\n    '1-10' = '1-10',\n    '11-20' = '11-20'\n}\n\nexport enum MyFoo {\n    myFoo = 'myFoo',\n    myBar = 'myBar'\n}\n\nexport enum MyFoo2 {\n    MyFoo = 'MyFoo',\n    MyBar = 'MyBar'\n}\n\nexport type Foo = 'foo' | 'bar' | '' | true | false;\n\nexport enum Numbers {\n    _100 = 100,\n    _200 = 200,\n    _300 = 300,\n    '_-100' = -100,\n    '_-200' = -200,\n    '_-300' = -300\n}\n\nexport type Arrays = [\n    'foo'\n] | [\n    'bar'\n] | [\n    'baz'\n];\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/enum-names-values-typescript-snake_case/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport { _110, type Arrays, type ClientOptions, type Foo, MyFoo, MyFoo2, Numbers } from './types.gen';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/enum-names-values-typescript-snake_case/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type ClientOptions = {\n    baseUrl: string;\n};\n\nexport enum _110 {\n    '1_10' = '1-10',\n    '11_20' = '11-20'\n}\n\nexport enum MyFoo {\n    my_foo = 'myFoo',\n    my_bar = 'myBar'\n}\n\nexport enum MyFoo2 {\n    my_foo = 'MyFoo',\n    my_bar = 'MyBar'\n}\n\nexport type Foo = 'foo' | 'bar' | '' | true | false;\n\nexport enum Numbers {\n    _100 = 100,\n    _200 = 200,\n    _300 = 300,\n    '_-100' = -100,\n    '_-200' = -200,\n    '_-300' = -300\n}\n\nexport type Arrays = [\n    'foo'\n] | [\n    'bar'\n] | [\n    'baz'\n];\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/exclude-deprecated/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type { ClientOptions, Foo, PostFooData, PostFooResponses } from './types.gen';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/exclude-deprecated/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type ClientOptions = {\n    baseUrl: string;\n};\n\nexport type Foo = string;\n\nexport type PostFooData = {\n    body: Foo;\n    path?: never;\n    query?: never;\n    url: '/foo';\n};\n\nexport type PostFooResponses = {\n    /**\n     * OK\n     */\n    200: unknown;\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/external/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type { _1, ClientOptions, Deep, ExternalAllOfSchema, ExternalAnyOfSchema, ExternalArraySchema, ExternalDoubleNestedNumeric, ExternalDoubleNestedProp, ExternalMixedProperties, ExternalNested, ExternalNestedNumeric, ExternalNestedNumericObjectA, ExternalNestedNumericObjectB, ExternalNestedObjectA, ExternalNestedObjectB, ExternalSchemaA, ExternalSchemaB, ExternalSchemaC, ExternalSchemaExternalProp, ExternalSchemaExternalPropAlias, ExternalSchemaPathA, ExternalSchemaPathB, ExternalSchemaPropertyA, ExternalSchemaPropertyB, ExternalSchemaPropertyC, ExternalSchemaPropertyD, ExternalSharedModel, ExternalSharedModelWithUuid, ExternalUnionSchema, GetExternalArrayData, GetExternalArrayResponse, GetExternalArrayResponses, GetExternalMixedData, GetExternalMixedResponse, GetExternalMixedResponses, GetExternalModelData, GetExternalModelError, GetExternalModelErrors, GetExternalModelResponse, GetExternalModelResponses, GetExternalNestedData, GetExternalNestedResponse, GetExternalNestedResponses, GetExternalPropertiesByIdData, GetExternalPropertiesByIdResponse, GetExternalPropertiesByIdResponses, GetExternalUnionData, GetExternalUnionResponses, GetExternalUuidData, GetExternalUuidResponse, GetExternalUuidResponses, Id, Name, PostExternalArrayData, PostExternalArrayResponse, PostExternalArrayResponses, PostExternalMixedData, PostExternalMixedResponse, PostExternalMixedResponses, PostExternalModelData, PostExternalModelErrors, PostExternalModelResponse, PostExternalModelResponses, PostExternalNestedData, PostExternalNestedResponse, PostExternalNestedResponses, PostExternalUnionData, PostExternalUnionResponses, PutExternalUuidData, PutExternalUuidResponse, PutExternalUuidResponses } from './types.gen';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/external/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type ClientOptions = {\n    baseUrl: string;\n};\n\nexport type _1 = string;\n\nexport type ExternalSchemaA = ExternalSharedModel;\n\nexport type ExternalSchemaB = ExternalSharedModel;\n\nexport type ExternalSchemaC = ExternalSharedModel;\n\nexport type ExternalSchemaPathA = ExternalSharedModel;\n\nexport type ExternalSchemaPathB = ExternalSharedModel;\n\n/**\n * External schema property (A)\n */\nexport type ExternalSchemaPropertyA = {\n    uuid1?: ExternalSharedModelWithUuid;\n};\n\n/**\n * External schema property (B) - second use of UUID\n */\nexport type ExternalSchemaPropertyB = {\n    uuid2?: ExternalSharedModelWithUuid;\n};\n\n/**\n * External schema property (C) - third use of UUID\n */\nexport type ExternalSchemaPropertyC = {\n    uuid3?: ExternalSharedModelWithUuid;\n};\n\n/**\n * External schema property with duplicate refs (D)\n */\nexport type ExternalSchemaPropertyD = {\n    uuid4?: ExternalSharedModelWithUuid;\n    uuid5?: ExternalSharedModelWithUuid;\n};\n\n/**\n * External schema property via external property ref (id)\n */\nexport type ExternalSchemaExternalProp = {\n    id3?: Id;\n    id4?: Id;\n};\n\n/**\n * Alias to external property via component property ref\n */\nexport type ExternalSchemaExternalPropAlias = {\n    id5?: Id;\n    id6?: Id;\n};\n\n/**\n * External double nested prop via property ref\n */\nexport type ExternalDoubleNestedProp = {\n    deep1?: Deep;\n    deep2?: Deep;\n};\n\n/**\n * External double nested numeric properties\n */\nexport type ExternalDoubleNestedNumeric = {\n    numeric1?: _1;\n    numeric2?: _1;\n};\n\nexport type ExternalNestedObjectA = ExternalNested;\n\nexport type ExternalNestedObjectB = ExternalNested;\n\nexport type ExternalNestedNumericObjectA = ExternalNestedNumeric;\n\nexport type ExternalNestedNumericObjectB = ExternalNestedNumeric;\n\n/**\n * Mixed external property references\n */\nexport type ExternalMixedProperties = {\n    id7?: Id;\n    name1?: Name;\n    uuid6?: ExternalSharedModelWithUuid;\n    deep3?: Deep;\n    numeric3?: _1;\n};\n\n/**\n * Array containing external references\n */\nexport type ExternalArraySchema = {\n    items?: Array<ExternalSharedModel>;\n    uuidItems?: Array<ExternalSharedModelWithUuid>;\n};\n\n/**\n * Union type with external references\n */\nexport type ExternalUnionSchema = unknown;\n\n/**\n * AllOf with external references\n */\nexport type ExternalAllOfSchema = ExternalSharedModel & {\n    additional?: ExternalSharedModelWithUuid;\n};\n\n/**\n * AnyOf with external references\n */\nexport type ExternalAnyOfSchema = unknown;\n\nexport type ExternalNested = {\n    inner?: {\n        deep?: string;\n    };\n};\n\nexport type Deep = string;\n\nexport type ExternalNestedNumeric = {\n    0?: {\n        1?: string;\n    };\n};\n\nexport type ExternalSharedModel = {\n    id: string;\n    name?: string;\n};\n\nexport type Id = string;\n\nexport type Name = string;\n\nexport type ExternalSharedModelWithUuid = string;\n\nexport type GetExternalModelData = {\n    body?: never;\n    path: {\n        id: unknown;\n    };\n    query?: {\n        uuid?: unknown;\n    };\n    url: '/external-model';\n};\n\nexport type GetExternalModelErrors = {\n    /**\n     * Response using external UUID\n     */\n    400: ExternalSharedModelWithUuid;\n};\n\nexport type GetExternalModelError = GetExternalModelErrors[keyof GetExternalModelErrors];\n\nexport type GetExternalModelResponses = {\n    /**\n     * Response using external model\n     */\n    200: ExternalSharedModel;\n};\n\nexport type GetExternalModelResponse = GetExternalModelResponses[keyof GetExternalModelResponses];\n\nexport type PostExternalModelData = {\n    /**\n     * Request body using external model\n     */\n    body: ExternalSharedModel;\n    path?: never;\n    query?: never;\n    url: '/external-model';\n};\n\nexport type PostExternalModelErrors = {\n    /**\n     * Response with union of external types\n     */\n    422: unknown;\n};\n\nexport type PostExternalModelResponses = {\n    /**\n     * Response using external model\n     */\n    201: ExternalSharedModel;\n};\n\nexport type PostExternalModelResponse = PostExternalModelResponses[keyof PostExternalModelResponses];\n\nexport type GetExternalUuidData = {\n    body?: never;\n    path?: never;\n    query?: {\n        uuid?: unknown;\n    };\n    url: '/external-uuid';\n};\n\nexport type GetExternalUuidResponses = {\n    /**\n     * Response using external UUID\n     */\n    200: ExternalSharedModelWithUuid;\n};\n\nexport type GetExternalUuidResponse = GetExternalUuidResponses[keyof GetExternalUuidResponses];\n\nexport type PutExternalUuidData = {\n    /**\n     * Request body using external UUID\n     */\n    body?: ExternalSharedModelWithUuid;\n    path?: never;\n    query?: never;\n    url: '/external-uuid';\n};\n\nexport type PutExternalUuidResponses = {\n    /**\n     * Response using external UUID\n     */\n    200: ExternalSharedModelWithUuid;\n};\n\nexport type PutExternalUuidResponse = PutExternalUuidResponses[keyof PutExternalUuidResponses];\n\nexport type GetExternalNestedData = {\n    body?: never;\n    headers?: {\n        deep?: unknown;\n    };\n    path?: never;\n    query?: never;\n    url: '/external-nested';\n};\n\nexport type GetExternalNestedResponses = {\n    /**\n     * Response using external nested object\n     */\n    200: ExternalNested;\n};\n\nexport type GetExternalNestedResponse = GetExternalNestedResponses[keyof GetExternalNestedResponses];\n\nexport type PostExternalNestedData = {\n    /**\n     * Request body using external nested object\n     */\n    body?: ExternalNested;\n    path?: never;\n    query?: never;\n    url: '/external-nested';\n};\n\nexport type PostExternalNestedResponses = {\n    /**\n     * Response using external nested object\n     */\n    201: ExternalNested;\n};\n\nexport type PostExternalNestedResponse = PostExternalNestedResponses[keyof PostExternalNestedResponses];\n\nexport type GetExternalMixedData = {\n    body?: never;\n    headers?: {\n        deep?: unknown;\n    };\n    path: {\n        id: unknown;\n    };\n    query?: {\n        uuid?: unknown;\n        numeric?: unknown;\n    };\n    url: '/external-mixed';\n};\n\nexport type GetExternalMixedResponses = {\n    /**\n     * Response with array of external models\n     */\n    200: Array<ExternalSharedModel>;\n};\n\nexport type GetExternalMixedResponse = GetExternalMixedResponses[keyof GetExternalMixedResponses];\n\nexport type PostExternalMixedData = {\n    /**\n     * Request body with mixed external properties\n     */\n    body?: {\n        id?: Id;\n        name?: Name;\n        uuid?: ExternalSharedModelWithUuid;\n        deep?: Deep;\n    };\n    path?: never;\n    query?: never;\n    url: '/external-mixed';\n};\n\nexport type PostExternalMixedResponses = {\n    /**\n     * Response using external model\n     */\n    201: ExternalSharedModel;\n};\n\nexport type PostExternalMixedResponse = PostExternalMixedResponses[keyof PostExternalMixedResponses];\n\nexport type GetExternalArrayData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/external-array';\n};\n\nexport type GetExternalArrayResponses = {\n    /**\n     * Response with array of external models\n     */\n    200: Array<ExternalSharedModel>;\n};\n\nexport type GetExternalArrayResponse = GetExternalArrayResponses[keyof GetExternalArrayResponses];\n\nexport type PostExternalArrayData = {\n    body: Array<ExternalSharedModel>;\n    path?: never;\n    query?: never;\n    url: '/external-array';\n};\n\nexport type PostExternalArrayResponses = {\n    /**\n     * Response with array of external models\n     */\n    201: Array<ExternalSharedModel>;\n};\n\nexport type PostExternalArrayResponse = PostExternalArrayResponses[keyof PostExternalArrayResponses];\n\nexport type GetExternalUnionData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/external-union';\n};\n\nexport type GetExternalUnionResponses = {\n    /**\n     * Response with union of external types\n     */\n    200: unknown;\n};\n\nexport type PostExternalUnionData = {\n    body: unknown;\n    path?: never;\n    query?: never;\n    url: '/external-union';\n};\n\nexport type PostExternalUnionResponses = {\n    /**\n     * Response with union of external types\n     */\n    201: unknown;\n};\n\nexport type GetExternalPropertiesByIdData = {\n    body?: never;\n    headers?: {\n        deep?: unknown;\n    };\n    path: {\n        id: unknown;\n    };\n    query?: {\n        uuid?: unknown;\n    };\n    url: '/external-properties/{id}';\n};\n\nexport type GetExternalPropertiesByIdResponses = {\n    200: {\n        id?: Id;\n        name?: Name;\n        uuid?: ExternalSharedModelWithUuid;\n        deep?: Deep;\n        numeric?: _1;\n    };\n};\n\nexport type GetExternalPropertiesByIdResponse = GetExternalPropertiesByIdResponses[keyof GetExternalPropertiesByIdResponses];\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/form-data/client/client.gen.ts",
    "content": "// 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 (options: RequestOptions) => {\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 url = buildUrl(opts);\n\n    return { opts, url };\n  };\n\n  const request: Client['request'] = async (options) => {\n    // @ts-expect-error\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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/form-data/client/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type { Auth } from '../core/auth.gen';\nexport type { QuerySerializerOptions } from '../core/bodySerializer.gen';\nexport {\n  formDataBodySerializer,\n  jsonBodySerializer,\n  urlSearchParamsBodySerializer,\n} from '../core/bodySerializer.gen';\nexport { buildClientParams } from '../core/params.gen';\nexport { serializeQueryKeyValue } from '../core/queryKeySerializer.gen';\nexport { createClient } from './client.gen';\nexport type {\n  Client,\n  ClientOptions,\n  Config,\n  CreateClientConfig,\n  Options,\n  RequestOptions,\n  RequestResult,\n  ResolvedRequestOptions,\n  ResponseStyle,\n  TDataShape,\n} from './types.gen';\nexport { createConfig, mergeHeaders } from './utils.gen';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/form-data/client/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { Auth } from '../core/auth.gen';\nimport type {\n  ServerSentEventsOptions,\n  ServerSentEventsResult,\n} from '../core/serverSentEvents.gen';\nimport type { Client as CoreClient, Config as CoreConfig } from '../core/types.gen';\nimport type { Middleware } from './utils.gen';\n\nexport type ResponseStyle = 'data' | 'fields';\n\nexport interface Config<T extends ClientOptions = ClientOptions>\n  extends Omit<RequestInit, 'body' | 'headers' | 'method'>, CoreConfig {\n  /**\n   * Base URL for all requests made by this client.\n   */\n  baseUrl?: T['baseUrl'];\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   * Please don't use the Fetch client for Next.js applications. The `next`\n   * options won't have any effect.\n   *\n   * Install {@link https://www.npmjs.com/package/@hey-api/client-next `@hey-api/client-next`} instead.\n   */\n  next?: never;\n  /**\n   * Return the response data parsed in a specified format. By default, `auto`\n   * will infer the appropriate method from the `Content-Type` response header.\n   * You can override this behavior with any of the {@link Body} methods.\n   * Select `stream` if you don't want to parse response data at all.\n   *\n   * @default 'auto'\n   */\n  parseAs?: 'arrayBuffer' | 'auto' | 'blob' | 'formData' | 'json' | 'stream' | 'text';\n  /**\n   * Should we return only data or multiple fields (data, error, response, etc.)?\n   *\n   * @default 'fields'\n   */\n  responseStyle?: ResponseStyle;\n  /**\n   * Throw an error instead of returning it in the response?\n   *\n   * @default false\n   */\n  throwOnError?: T['throwOnError'];\n}\n\nexport interface RequestOptions<\n  TData = unknown,\n  TResponseStyle extends ResponseStyle = 'fields',\n  ThrowOnError extends boolean = boolean,\n  Url extends string = string,\n>\n  extends\n    Config<{\n      responseStyle: TResponseStyle;\n      throwOnError: ThrowOnError;\n    }>,\n    Pick<\n      ServerSentEventsOptions<TData>,\n      | 'onRequest'\n      | 'onSseError'\n      | 'onSseEvent'\n      | 'sseDefaultRetryDelay'\n      | 'sseMaxRetryAttempts'\n      | 'sseMaxRetryDelay'\n    > {\n  /**\n   * Any body that you want to add to your request.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/fetch#body}\n   */\n  body?: unknown;\n  path?: Record<string, unknown>;\n  query?: Record<string, unknown>;\n  /**\n   * Security mechanism(s) to use for the request.\n   */\n  security?: ReadonlyArray<Auth>;\n  url: Url;\n}\n\nexport interface ResolvedRequestOptions<\n  TResponseStyle extends ResponseStyle = 'fields',\n  ThrowOnError extends boolean = boolean,\n  Url extends string = string,\n> extends RequestOptions<unknown, TResponseStyle, ThrowOnError, Url> {\n  serializedBody?: string;\n}\n\nexport type RequestResult<\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = boolean,\n  TResponseStyle extends ResponseStyle = 'fields',\n> = ThrowOnError extends true\n  ? Promise<\n      TResponseStyle extends 'data'\n        ? TData extends Record<string, unknown>\n          ? TData[keyof TData]\n          : TData\n        : {\n            data: TData extends Record<string, unknown> ? TData[keyof TData] : TData;\n            request: Request;\n            response: Response;\n          }\n    >\n  : Promise<\n      TResponseStyle extends 'data'\n        ? (TData extends Record<string, unknown> ? TData[keyof TData] : TData) | undefined\n        : (\n            | {\n                data: TData extends Record<string, unknown> ? TData[keyof TData] : TData;\n                error: undefined;\n              }\n            | {\n                data: undefined;\n                error: TError extends Record<string, unknown> ? TError[keyof TError] : TError;\n              }\n          ) & {\n            request: Request;\n            response: Response;\n          }\n    >;\n\nexport interface ClientOptions {\n  baseUrl?: string;\n  responseStyle?: ResponseStyle;\n  throwOnError?: boolean;\n}\n\ntype MethodFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'>,\n) => RequestResult<TData, TError, ThrowOnError, TResponseStyle>;\n\ntype SseFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'>,\n) => Promise<ServerSentEventsResult<TData, TError>>;\n\ntype RequestFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'> &\n    Pick<Required<RequestOptions<TData, TResponseStyle, ThrowOnError>>, 'method'>,\n) => RequestResult<TData, TError, ThrowOnError, TResponseStyle>;\n\ntype BuildUrlFn = <\n  TData extends {\n    body?: unknown;\n    path?: Record<string, unknown>;\n    query?: Record<string, unknown>;\n    url: string;\n  },\n>(\n  options: TData & Options<TData>,\n) => string;\n\nexport type Client = CoreClient<RequestFn, Config, MethodFn, BuildUrlFn, SseFn> & {\n  interceptors: Middleware<Request, Response, unknown, ResolvedRequestOptions>;\n};\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 = ClientOptions> = (\n  override?: Config<ClientOptions & T>,\n) => Config<Required<ClientOptions> & T>;\n\nexport interface TDataShape {\n  body?: unknown;\n  headers?: unknown;\n  path?: unknown;\n  query?: unknown;\n  url: string;\n}\n\ntype OmitKeys<T, K> = Pick<T, Exclude<keyof T, K>>;\n\nexport type Options<\n  TData extends TDataShape = TDataShape,\n  ThrowOnError extends boolean = boolean,\n  TResponse = unknown,\n  TResponseStyle extends ResponseStyle = 'fields',\n> = OmitKeys<\n  RequestOptions<TResponse, TResponseStyle, ThrowOnError>,\n  'body' | 'path' | 'query' | 'url'\n> &\n  ([TData] extends [never] ? unknown : Omit<TData, 'url'>);\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/form-data/client/utils.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/form-data/client.gen.ts",
    "content": "// 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>());\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/form-data/core/auth.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/form-data/core/bodySerializer.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/form-data/core/params.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/form-data/core/pathSerializer.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/form-data/core/queryKeySerializer.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\n/**\n * JSON-friendly union that mirrors what Pinia Colada can hash.\n */\nexport type JsonValue =\n  | null\n  | string\n  | number\n  | boolean\n  | JsonValue[]\n  | { [key: string]: JsonValue };\n\n/**\n * Replacer that converts non-JSON values (bigint, Date, etc.) to safe substitutes.\n */\nexport const queryKeyJsonReplacer = (_key: string, value: unknown) => {\n  if (value === undefined || typeof value === 'function' || typeof value === 'symbol') {\n    return undefined;\n  }\n  if (typeof value === 'bigint') {\n    return value.toString();\n  }\n  if (value instanceof Date) {\n    return value.toISOString();\n  }\n  return value;\n};\n\n/**\n * Safely stringifies a value and parses it back into a JsonValue.\n */\nexport const stringifyToJsonValue = (input: unknown): JsonValue | undefined => {\n  try {\n    const json = JSON.stringify(input, queryKeyJsonReplacer);\n    if (json === undefined) {\n      return undefined;\n    }\n    return JSON.parse(json) as JsonValue;\n  } catch {\n    return undefined;\n  }\n};\n\n/**\n * Detects plain objects (including objects with a null prototype).\n */\nconst isPlainObject = (value: unknown): value is Record<string, unknown> => {\n  if (value === null || typeof value !== 'object') {\n    return false;\n  }\n  const prototype = Object.getPrototypeOf(value as object);\n  return prototype === Object.prototype || prototype === null;\n};\n\n/**\n * Turns URLSearchParams into a sorted JSON object for deterministic keys.\n */\nconst serializeSearchParams = (params: URLSearchParams): JsonValue => {\n  const entries = Array.from(params.entries()).sort(([a], [b]) => a.localeCompare(b));\n  const result: Record<string, JsonValue> = {};\n\n  for (const [key, value] of entries) {\n    const existing = result[key];\n    if (existing === undefined) {\n      result[key] = value;\n      continue;\n    }\n\n    if (Array.isArray(existing)) {\n      (existing as string[]).push(value);\n    } else {\n      result[key] = [existing, value];\n    }\n  }\n\n  return result;\n};\n\n/**\n * Normalizes any accepted value into a JSON-friendly shape for query keys.\n */\nexport const serializeQueryKeyValue = (value: unknown): JsonValue | undefined => {\n  if (value === null) {\n    return null;\n  }\n\n  if (typeof value === 'string' || typeof value === 'number' || typeof value === 'boolean') {\n    return value;\n  }\n\n  if (value === undefined || typeof value === 'function' || typeof value === 'symbol') {\n    return undefined;\n  }\n\n  if (typeof value === 'bigint') {\n    return value.toString();\n  }\n\n  if (value instanceof Date) {\n    return value.toISOString();\n  }\n\n  if (Array.isArray(value)) {\n    return stringifyToJsonValue(value);\n  }\n\n  if (typeof URLSearchParams !== 'undefined' && value instanceof URLSearchParams) {\n    return serializeSearchParams(value);\n  }\n\n  if (isPlainObject(value)) {\n    return stringifyToJsonValue(value);\n  }\n\n  return undefined;\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/form-data/core/serverSentEvents.gen.ts",
    "content": "// 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 const 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            // Normalize line endings: CRLF -> LF, then CR -> LF\n            buffer = buffer.replace(/\\r\\n/g, '\\n').replace(/\\r/g, '\\n');\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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/form-data/core/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { Auth, AuthToken } from './auth.gen';\nimport type { BodySerializer, QuerySerializer, QuerySerializerOptions } from './bodySerializer.gen';\n\nexport type HttpMethod =\n  | 'connect'\n  | 'delete'\n  | 'get'\n  | 'head'\n  | 'options'\n  | 'patch'\n  | 'post'\n  | 'put'\n  | 'trace';\n\nexport type Client<\n  RequestFn = never,\n  Config = unknown,\n  MethodFn = never,\n  BuildUrlFn = never,\n  SseFn = never,\n> = {\n  /**\n   * Returns the final request URL.\n   */\n  buildUrl: BuildUrlFn;\n  getConfig: () => Config;\n  request: RequestFn;\n  setConfig: (config: Config) => Config;\n} & {\n  [K in HttpMethod]: MethodFn;\n} & ([SseFn] extends [never] ? { sse?: never } : { sse: { [K in HttpMethod]: SseFn } });\n\nexport interface Config {\n  /**\n   * Auth token or a function returning auth token. The resolved value will be\n   * added to the request payload as defined by its `security` array.\n   */\n  auth?: ((auth: Auth) => Promise<AuthToken> | AuthToken) | AuthToken;\n  /**\n   * A function for serializing request body parameter. By default,\n   * {@link JSON.stringify()} will be used.\n   */\n  bodySerializer?: BodySerializer | null;\n  /**\n   * An object containing any HTTP headers that you want to pre-populate your\n   * `Headers` object with.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/Headers/Headers#init See more}\n   */\n  headers?:\n    | RequestInit['headers']\n    | Record<\n        string,\n        string | number | boolean | (string | number | boolean)[] | null | undefined | unknown\n      >;\n  /**\n   * The request method.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/fetch#method See more}\n   */\n  method?: Uppercase<HttpMethod>;\n  /**\n   * A function for serializing request query parameters. By default, arrays\n   * will be exploded in form style, objects will be exploded in deepObject\n   * style, and reserved characters are percent-encoded.\n   *\n   * This method will have no effect if the native `paramsSerializer()` Axios\n   * API function is used.\n   *\n   * {@link https://swagger.io/docs/specification/serialization/#query View examples}\n   */\n  querySerializer?: QuerySerializer | QuerySerializerOptions;\n  /**\n   * A function validating request data. This is useful if you want to ensure\n   * the request conforms to the desired shape, so it can be safely sent to\n   * the server.\n   */\n  requestValidator?: (data: unknown) => Promise<unknown>;\n  /**\n   * A function transforming response data before it's returned. This is useful\n   * for post-processing data, e.g. converting ISO strings into Date objects.\n   */\n  responseTransformer?: (data: unknown) => Promise<unknown>;\n  /**\n   * A function validating response data. This is useful if you want to ensure\n   * the response conforms to the desired shape, so it can be safely passed to\n   * the transformers and returned to the user.\n   */\n  responseValidator?: (data: unknown) => Promise<unknown>;\n}\n\ntype IsExactlyNeverOrNeverUndefined<T> = [T] extends [never]\n  ? true\n  : [T] extends [never | undefined]\n    ? [undefined] extends [T]\n      ? false\n      : true\n    : false;\n\nexport type OmitNever<T extends Record<string, unknown>> = {\n  [K in keyof T as IsExactlyNeverOrNeverUndefined<T[K]> extends true ? never : K]: T[K];\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/form-data/core/utils.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/form-data/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport { type Options, postV1Foo } from './sdk.gen';\nexport type { ClientOptions, Foo, PostV1FooData, PostV1FooResponse, PostV1FooResponses } from './types.gen';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/form-data/sdk.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport { type Client, formDataBodySerializer, type Options as Options2, type TDataShape } from './client';\nimport { client } from './client.gen';\nimport type { PostV1FooData, PostV1FooResponses } from './types.gen';\n\nexport type Options<TData extends TDataShape = TDataShape, ThrowOnError extends boolean = boolean> = Options2<TData, ThrowOnError> & {\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\nexport const postV1Foo = <ThrowOnError extends boolean = false>(options: Options<PostV1FooData, ThrowOnError>) => (options.client ?? client).post<PostV1FooResponses, unknown, ThrowOnError>({\n    ...formDataBodySerializer,\n    url: '/v1/foo',\n    ...options,\n    headers: {\n        'Content-Type': null,\n        ...options.headers\n    }\n});\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/form-data/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type ClientOptions = {\n    baseUrl: string;\n};\n\nexport type Foo = {\n    status?: number;\n};\n\nexport type PostV1FooData = {\n    body: {\n        file: Blob | File;\n        info: string;\n    };\n    path?: never;\n    query?: never;\n    url: '/v1/foo';\n};\n\nexport type PostV1FooResponses = {\n    /**\n     * OK\n     */\n    200: Foo;\n};\n\nexport type PostV1FooResponse = PostV1FooResponses[keyof PostV1FooResponses];\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@angular/common/default/client/client.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { HttpResponse } from '@angular/common/http';\nimport { HttpClient, HttpErrorResponse, HttpEventType, HttpRequest } from '@angular/common/http';\nimport {\n  assertInInjectionContext,\n  inject,\n  provideAppInitializer,\n  runInInjectionContext,\n} from '@angular/core';\nimport { firstValueFrom } from 'rxjs';\nimport { filter } from 'rxjs/operators';\n\nimport { createSseClient } from '../core/serverSentEvents.gen';\nimport type { HttpMethod } from '../core/types.gen';\nimport { getValidRequestBody } from '../core/utils.gen';\nimport type {\n  Client,\n  Config,\n  RequestOptions,\n  ResolvedRequestOptions,\n  ResponseStyle,\n} from './types.gen';\nimport {\n  buildUrl,\n  createConfig,\n  createInterceptors,\n  mergeConfigs,\n  mergeHeaders,\n  setAuthParams,\n} from './utils.gen';\n\nexport function provideHeyApiClient(client: Client) {\n  return provideAppInitializer(() => {\n    const httpClient = inject(HttpClient);\n    client.setConfig({ httpClient });\n  });\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<\n    HttpRequest<unknown>,\n    HttpResponse<unknown>,\n    unknown,\n    ResolvedRequestOptions\n  >();\n\n  const requestOptions = <\n    TData = unknown,\n    ThrowOnError extends boolean = false,\n    TResponseStyle extends ResponseStyle = 'fields',\n  >(\n    options: RequestOptions<TData, TResponseStyle, ThrowOnError>,\n  ) => {\n    const opts = {\n      ..._config,\n      ...options,\n      headers: mergeHeaders(_config.headers, options.headers),\n      httpClient: options.httpClient ?? _config.httpClient,\n      serializedBody: undefined as string | undefined,\n    };\n\n    if (!opts.httpClient) {\n      if (opts.injector) {\n        opts.httpClient = runInInjectionContext(opts.injector, () => inject(HttpClient));\n      } else {\n        assertInInjectionContext(requestOptions);\n        opts.httpClient = inject(HttpClient);\n      }\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 url = buildUrl(opts as any);\n\n    const req = new HttpRequest<unknown>(opts.method ?? 'GET', url, getValidRequestBody(opts), {\n      redirect: 'follow',\n      ...opts,\n    });\n\n    return { opts, req, url };\n  };\n\n  const beforeRequest = async (options: RequestOptions) => {\n    const { opts, req, url } = requestOptions(options);\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    return { opts, req, url };\n  };\n\n  const request: Client['request'] = async (options) => {\n    // @ts-expect-error\n    const { opts, req: initialReq } = await beforeRequest(options);\n\n    let req = initialReq;\n\n    for (const fn of interceptors.request.fns) {\n      if (fn) {\n        req = await fn(req, opts as any);\n      }\n    }\n\n    const result: {\n      request: HttpRequest<unknown>;\n      response: any;\n    } = {\n      request: req,\n      response: null,\n    };\n\n    try {\n      result.response = (await firstValueFrom(\n        opts\n          .httpClient!.request(req)\n          .pipe(filter((event) => event.type === HttpEventType.Response)),\n      )) as HttpResponse<unknown>;\n\n      for (const fn of interceptors.response.fns) {\n        if (fn) {\n          result.response = await fn(result.response, req, opts as any);\n        }\n      }\n\n      let bodyResponse = result.response.body;\n\n      if (opts.responseValidator) {\n        await opts.responseValidator(bodyResponse);\n      }\n\n      if (opts.responseTransformer) {\n        bodyResponse = await opts.responseTransformer(bodyResponse);\n      }\n\n      return opts.responseStyle === 'data' ? bodyResponse : { data: bodyResponse, ...result };\n    } catch (error) {\n      if (error instanceof HttpErrorResponse) {\n        result.response = error;\n      }\n\n      let finalError = error instanceof HttpErrorResponse ? error.error : error;\n\n      for (const fn of interceptors.error.fns) {\n        if (fn) {\n          finalError = (await fn(finalError, result.response as any, req, opts as any)) as string;\n        }\n      }\n\n      if (opts.throwOnError) {\n        throw finalError;\n      }\n\n      return opts.responseStyle === 'data'\n        ? undefined\n        : {\n            error: finalError,\n            ...result,\n          };\n    }\n  };\n\n  const makeMethodFn = (method: Uppercase<HttpMethod>) => (options: RequestOptions) =>\n    request({ ...options, method });\n\n  const makeSseFn = (method: Uppercase<HttpMethod>) => async (options: RequestOptions) => {\n    const { opts, url } = await beforeRequest(options);\n    return createSseClient({\n      ...opts,\n      body: opts.body as BodyInit | null | undefined,\n      headers: opts.headers as unknown as Record<string, string>,\n      method,\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    requestOptions: (options) => {\n      if (options.security) {\n        throw new Error('Security is not supported in requestOptions');\n      }\n\n      if (options.requestValidator) {\n        throw new Error('Request validation is not supported in requestOptions');\n      }\n\n      return requestOptions(options).req;\n    },\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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@angular/common/default/client/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type { Auth } from '../core/auth.gen';\nexport type { QuerySerializerOptions } from '../core/bodySerializer.gen';\nexport {\n  formDataBodySerializer,\n  jsonBodySerializer,\n  urlSearchParamsBodySerializer,\n} from '../core/bodySerializer.gen';\nexport { buildClientParams } from '../core/params.gen';\nexport { serializeQueryKeyValue } from '../core/queryKeySerializer.gen';\nexport { createClient } from './client.gen';\nexport type {\n  Client,\n  ClientOptions,\n  Config,\n  CreateClientConfig,\n  Options,\n  RequestOptions,\n  RequestResult,\n  ResolvedRequestOptions,\n  ResponseStyle,\n  TDataShape,\n} from './types.gen';\nexport { createConfig, mergeHeaders } from './utils.gen';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@angular/common/default/client/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type {\n  HttpClient,\n  HttpErrorResponse,\n  HttpHeaders,\n  HttpRequest,\n  HttpResponse,\n} from '@angular/common/http';\nimport type { Injector } from '@angular/core';\n\nimport type { Auth } from '../core/auth.gen';\nimport type {\n  ServerSentEventsOptions,\n  ServerSentEventsResult,\n} from '../core/serverSentEvents.gen';\nimport type { Client as CoreClient, Config as CoreConfig } from '../core/types.gen';\nimport type { Middleware } from './utils.gen';\n\nexport type ResponseStyle = 'data' | 'fields';\n\nexport interface Config<T extends ClientOptions = ClientOptions>\n  extends Omit<RequestInit, 'body' | 'headers' | 'method'>, Omit<CoreConfig, 'headers'> {\n  /**\n   * Base URL for all requests made by this client.\n   */\n  baseUrl?: T['baseUrl'];\n  /**\n   * An object containing any HTTP headers that you want to pre-populate your\n   * `HttpHeaders` object with.\n   *\n   * {@link https://angular.dev/api/common/http/HttpHeaders#constructor See more}\n   */\n  headers?:\n    | HttpHeaders\n    | Record<\n        string,\n        string | number | boolean | (string | number | boolean)[] | null | undefined | unknown\n      >;\n  /**\n   * The HTTP client to use for making requests.\n   */\n  httpClient?: HttpClient;\n  /**\n   * Should we return only data or multiple fields (data, error, response, etc.)?\n   *\n   * @default 'fields'\n   */\n  responseStyle?: ResponseStyle;\n\n  /**\n   * Throw an error instead of returning it in the response?\n   *\n   * @default false\n   */\n  throwOnError?: T['throwOnError'];\n}\n\nexport interface RequestOptions<\n  TData = unknown,\n  TResponseStyle extends ResponseStyle = 'fields',\n  ThrowOnError extends boolean = boolean,\n  Url extends string = string,\n>\n  extends\n    Config<{\n      responseStyle: TResponseStyle;\n      throwOnError: ThrowOnError;\n    }>,\n    Pick<\n      ServerSentEventsOptions<TData>,\n      | 'onRequest'\n      | 'onSseError'\n      | 'onSseEvent'\n      | 'sseDefaultRetryDelay'\n      | 'sseMaxRetryAttempts'\n      | 'sseMaxRetryDelay'\n    > {\n  /**\n   * Any body that you want to add to your request.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/fetch#body}\n   */\n  body?: unknown;\n  /**\n   * Optional custom injector for dependency resolution if you don't implicitly or explicitly provide one.\n   */\n  injector?: Injector;\n  path?: Record<string, unknown>;\n  query?: Record<string, unknown>;\n  /**\n   * Security mechanism(s) to use for the request.\n   */\n  security?: ReadonlyArray<Auth>;\n  url: Url;\n}\n\nexport interface ResolvedRequestOptions<\n  TResponseStyle extends ResponseStyle = 'fields',\n  ThrowOnError extends boolean = boolean,\n  Url extends string = string,\n> extends RequestOptions<unknown, TResponseStyle, ThrowOnError, Url> {\n  serializedBody?: string;\n}\n\nexport type RequestResult<\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = boolean,\n  TResponseStyle extends ResponseStyle = 'fields',\n> = Promise<\n  ThrowOnError extends true\n    ? TResponseStyle extends 'data'\n      ? TData extends Record<string, unknown>\n        ? TData[keyof TData]\n        : TData\n      : {\n          data: TData extends Record<string, unknown> ? TData[keyof TData] : TData;\n          request: HttpRequest<unknown>;\n          response: HttpResponse<TData>;\n        }\n    : TResponseStyle extends 'data'\n      ? (TData extends Record<string, unknown> ? TData[keyof TData] : TData) | undefined\n      :\n          | {\n              data: TData extends Record<string, unknown> ? TData[keyof TData] : TData;\n              error: undefined;\n              request: HttpRequest<unknown>;\n              response: HttpResponse<TData>;\n            }\n          | {\n              data: undefined;\n              error: TError[keyof TError];\n              request: HttpRequest<unknown>;\n              response: HttpErrorResponse & {\n                error: TError[keyof TError] | null;\n              };\n            }\n>;\n\nexport interface ClientOptions {\n  baseUrl?: string;\n  responseStyle?: ResponseStyle;\n  throwOnError?: boolean;\n}\n\ntype MethodFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'>,\n) => RequestResult<TData, TError, ThrowOnError, TResponseStyle>;\n\ntype SseFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'>,\n) => Promise<ServerSentEventsResult<TData, TError>>;\n\ntype RequestFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'> &\n    Pick<Required<RequestOptions<TData, TResponseStyle, ThrowOnError>>, 'method'>,\n) => RequestResult<TData, TError, ThrowOnError, TResponseStyle>;\n\ntype RequestOptionsFn = <\n  T,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: RequestOptions<T, TResponseStyle, ThrowOnError>,\n) => HttpRequest<T>;\n\ntype BuildUrlFn = <\n  TData extends {\n    body?: unknown;\n    path?: Record<string, unknown>;\n    query?: Record<string, unknown>;\n    url: string;\n  },\n>(\n  options: TData & Options<TData>,\n) => string;\n\nexport type Client = CoreClient<RequestFn, Config, MethodFn, BuildUrlFn, SseFn> & {\n  interceptors: Middleware<\n    HttpRequest<unknown>,\n    HttpResponse<unknown>,\n    unknown,\n    ResolvedRequestOptions\n  >;\n  requestOptions: RequestOptionsFn;\n};\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 = ClientOptions> = (\n  override?: Config<ClientOptions & T>,\n) => Config<Required<ClientOptions> & T>;\n\nexport interface TDataShape {\n  body?: unknown;\n  headers?: unknown;\n  path?: unknown;\n  query?: unknown;\n  url: string;\n}\n\ntype OmitKeys<T, K> = Pick<T, Exclude<keyof T, K>>;\n\nexport type Options<\n  TData extends TDataShape = TDataShape,\n  ThrowOnError extends boolean = boolean,\n  TResponse = unknown,\n  TResponseStyle extends ResponseStyle = 'fields',\n> = OmitKeys<\n  RequestOptions<TResponse, TResponseStyle, ThrowOnError>,\n  'body' | 'path' | 'query' | 'url'\n> &\n  ([TData] extends [never] ? unknown : Omit<TData, 'url'>);\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@angular/common/default/client/utils.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport { HttpHeaders } from '@angular/common/http';\n\nimport { getAuthToken } from '../core/auth.gen';\nimport type {\n  QuerySerializer,\n  QuerySerializerOptions,\n} from '../core/bodySerializer.gen';\nimport {\n  serializeArrayParam,\n  serializeObjectParam,\n  serializePrimitiveParam,\n} from '../core/pathSerializer.gen';\nimport type { Client, ClientOptions, Config, RequestOptions } from './types.gen';\n\ninterface PathSerializer {\n  path: Record<string, unknown>;\n  url: string;\n}\n\nconst PATH_PARAM_RE = /\\{[^{}]+\\}/g;\n\ntype ArrayStyle = 'form' | 'spaceDelimited' | 'pipeDelimited';\ntype MatrixStyle = 'label' | 'matrix' | 'simple';\ntype ArraySeparatorStyle = ArrayStyle | MatrixStyle;\n\nconst 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 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 = (\n  contentType: string | null,\n): 'blob' | 'formData' | 'json' | 'stream' | 'text' | undefined => {\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\nexport const setAuthParams = async (\n  options: Pick<Required<RequestOptions>, 'security'> &\n    Pick<RequestOptions, 'auth' | 'query'> & {\n      headers: HttpHeaders;\n    },\n) => {\n  for (const auth of options.security) {\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 = options.headers.append('Cookie', `${name}=${token}`);\n        break;\n      case 'header':\n      default:\n        options.headers = options.headers.set(name, token);\n        break;\n    }\n\n    return;\n  }\n};\n\nexport const buildUrl: Client['buildUrl'] = (options) => {\n  const url = 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  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 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\nexport const mergeHeaders = (\n  ...headers: Array<Required<Config>['headers'] | undefined>\n): HttpHeaders => {\n  let mergedHeaders = new HttpHeaders();\n\n  for (const header of headers) {\n    if (!header || typeof header !== 'object') {\n      continue;\n    }\n\n    if (header instanceof HttpHeaders) {\n      // Merge HttpHeaders instance\n      header.keys().forEach((key) => {\n        const values = header.getAll(key);\n        if (values) {\n          values.forEach((value) => {\n            mergedHeaders = mergedHeaders.append(key, value);\n          });\n        }\n      });\n    } else {\n      // Merge plain object headers\n      for (const [key, value] of Object.entries(header)) {\n        if (value === null) {\n          mergedHeaders = mergedHeaders.delete(key);\n        } else if (Array.isArray(value)) {\n          for (const v of value) {\n            mergedHeaders = 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 = mergedHeaders.set(\n            key,\n            typeof value === 'object' ? JSON.stringify(value) : (value as string),\n          );\n        }\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  headers: defaultHeaders,\n  querySerializer: defaultQuerySerializer,\n  ...override,\n});\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@angular/common/default/client.gen.ts",
    "content": "// 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: 'http://localhost:3000/base' }));\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@angular/common/default/core/auth.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@angular/common/default/core/bodySerializer.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@angular/common/default/core/params.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@angular/common/default/core/pathSerializer.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@angular/common/default/core/queryKeySerializer.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\n/**\n * JSON-friendly union that mirrors what Pinia Colada can hash.\n */\nexport type JsonValue =\n  | null\n  | string\n  | number\n  | boolean\n  | JsonValue[]\n  | { [key: string]: JsonValue };\n\n/**\n * Replacer that converts non-JSON values (bigint, Date, etc.) to safe substitutes.\n */\nexport const queryKeyJsonReplacer = (_key: string, value: unknown) => {\n  if (value === undefined || typeof value === 'function' || typeof value === 'symbol') {\n    return undefined;\n  }\n  if (typeof value === 'bigint') {\n    return value.toString();\n  }\n  if (value instanceof Date) {\n    return value.toISOString();\n  }\n  return value;\n};\n\n/**\n * Safely stringifies a value and parses it back into a JsonValue.\n */\nexport const stringifyToJsonValue = (input: unknown): JsonValue | undefined => {\n  try {\n    const json = JSON.stringify(input, queryKeyJsonReplacer);\n    if (json === undefined) {\n      return undefined;\n    }\n    return JSON.parse(json) as JsonValue;\n  } catch {\n    return undefined;\n  }\n};\n\n/**\n * Detects plain objects (including objects with a null prototype).\n */\nconst isPlainObject = (value: unknown): value is Record<string, unknown> => {\n  if (value === null || typeof value !== 'object') {\n    return false;\n  }\n  const prototype = Object.getPrototypeOf(value as object);\n  return prototype === Object.prototype || prototype === null;\n};\n\n/**\n * Turns URLSearchParams into a sorted JSON object for deterministic keys.\n */\nconst serializeSearchParams = (params: URLSearchParams): JsonValue => {\n  const entries = Array.from(params.entries()).sort(([a], [b]) => a.localeCompare(b));\n  const result: Record<string, JsonValue> = {};\n\n  for (const [key, value] of entries) {\n    const existing = result[key];\n    if (existing === undefined) {\n      result[key] = value;\n      continue;\n    }\n\n    if (Array.isArray(existing)) {\n      (existing as string[]).push(value);\n    } else {\n      result[key] = [existing, value];\n    }\n  }\n\n  return result;\n};\n\n/**\n * Normalizes any accepted value into a JSON-friendly shape for query keys.\n */\nexport const serializeQueryKeyValue = (value: unknown): JsonValue | undefined => {\n  if (value === null) {\n    return null;\n  }\n\n  if (typeof value === 'string' || typeof value === 'number' || typeof value === 'boolean') {\n    return value;\n  }\n\n  if (value === undefined || typeof value === 'function' || typeof value === 'symbol') {\n    return undefined;\n  }\n\n  if (typeof value === 'bigint') {\n    return value.toString();\n  }\n\n  if (value instanceof Date) {\n    return value.toISOString();\n  }\n\n  if (Array.isArray(value)) {\n    return stringifyToJsonValue(value);\n  }\n\n  if (typeof URLSearchParams !== 'undefined' && value instanceof URLSearchParams) {\n    return serializeSearchParams(value);\n  }\n\n  if (isPlainObject(value)) {\n    return stringifyToJsonValue(value);\n  }\n\n  return undefined;\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@angular/common/default/core/serverSentEvents.gen.ts",
    "content": "// 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 const 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            // Normalize line endings: CRLF -> LF, then CR -> LF\n            buffer = buffer.replace(/\\r\\n/g, '\\n').replace(/\\r/g, '\\n');\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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@angular/common/default/core/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { Auth, AuthToken } from './auth.gen';\nimport type { BodySerializer, QuerySerializer, QuerySerializerOptions } from './bodySerializer.gen';\n\nexport type HttpMethod =\n  | 'connect'\n  | 'delete'\n  | 'get'\n  | 'head'\n  | 'options'\n  | 'patch'\n  | 'post'\n  | 'put'\n  | 'trace';\n\nexport type Client<\n  RequestFn = never,\n  Config = unknown,\n  MethodFn = never,\n  BuildUrlFn = never,\n  SseFn = never,\n> = {\n  /**\n   * Returns the final request URL.\n   */\n  buildUrl: BuildUrlFn;\n  getConfig: () => Config;\n  request: RequestFn;\n  setConfig: (config: Config) => Config;\n} & {\n  [K in HttpMethod]: MethodFn;\n} & ([SseFn] extends [never] ? { sse?: never } : { sse: { [K in HttpMethod]: SseFn } });\n\nexport interface Config {\n  /**\n   * Auth token or a function returning auth token. The resolved value will be\n   * added to the request payload as defined by its `security` array.\n   */\n  auth?: ((auth: Auth) => Promise<AuthToken> | AuthToken) | AuthToken;\n  /**\n   * A function for serializing request body parameter. By default,\n   * {@link JSON.stringify()} will be used.\n   */\n  bodySerializer?: BodySerializer | null;\n  /**\n   * An object containing any HTTP headers that you want to pre-populate your\n   * `Headers` object with.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/Headers/Headers#init See more}\n   */\n  headers?:\n    | RequestInit['headers']\n    | Record<\n        string,\n        string | number | boolean | (string | number | boolean)[] | null | undefined | unknown\n      >;\n  /**\n   * The request method.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/fetch#method See more}\n   */\n  method?: Uppercase<HttpMethod>;\n  /**\n   * A function for serializing request query parameters. By default, arrays\n   * will be exploded in form style, objects will be exploded in deepObject\n   * style, and reserved characters are percent-encoded.\n   *\n   * This method will have no effect if the native `paramsSerializer()` Axios\n   * API function is used.\n   *\n   * {@link https://swagger.io/docs/specification/serialization/#query View examples}\n   */\n  querySerializer?: QuerySerializer | QuerySerializerOptions;\n  /**\n   * A function validating request data. This is useful if you want to ensure\n   * the request conforms to the desired shape, so it can be safely sent to\n   * the server.\n   */\n  requestValidator?: (data: unknown) => Promise<unknown>;\n  /**\n   * A function transforming response data before it's returned. This is useful\n   * for post-processing data, e.g. converting ISO strings into Date objects.\n   */\n  responseTransformer?: (data: unknown) => Promise<unknown>;\n  /**\n   * A function validating response data. This is useful if you want to ensure\n   * the response conforms to the desired shape, so it can be safely passed to\n   * the transformers and returned to the user.\n   */\n  responseValidator?: (data: unknown) => Promise<unknown>;\n}\n\ntype IsExactlyNeverOrNeverUndefined<T> = [T] extends [never]\n  ? true\n  : [T] extends [never | undefined]\n    ? [undefined] extends [T]\n      ? false\n      : true\n    : false;\n\nexport type OmitNever<T extends Record<string, unknown>> = {\n  [K in keyof T as IsExactlyNeverOrNeverUndefined<T[K]> extends true ? never : K]: T[K];\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@angular/common/default/core/utils.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@angular/common/default/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport { callToTestOrderOfParams, callWithDefaultOptionalParameters, callWithDefaultParameters, callWithDescriptions, callWithDuplicateResponses, callWithNoContentResponse, callWithParameters, callWithResponse, callWithResponseAndNoContentResponse, callWithResponses, callWithResultFromHeader, callWithWeirdParameterNames, collectionFormat, complexTypes, deleteCallWithoutParametersAndResponse, dummyA, dummyB, duplicateName, duplicateName2, duplicateName3, duplicateName4, fooWow, getCallWithoutParametersAndResponse, headCallWithoutParametersAndResponse, nonAsciiæøåÆøÅöôêÊ字符串, type Options, optionsCallWithoutParametersAndResponse, patchApiVbyApiVersionNoTag, patchCallWithoutParametersAndResponse, postApiVbyApiVersionBody, postCallWithoutParametersAndResponse, putCallWithoutParametersAndResponse, serviceWithEmptyTag, testErrorCode, types } from './sdk.gen';\nexport type { ArrayWithArray, ArrayWithBooleans, ArrayWithNumbers, ArrayWithProperties, ArrayWithReferences, ArrayWithStrings, CallToTestOrderOfParamsData, CallWithDefaultOptionalParametersData, CallWithDefaultParametersData, CallWithDescriptionsData, CallWithDuplicateResponsesData, CallWithDuplicateResponsesError, CallWithDuplicateResponsesErrors, CallWithDuplicateResponsesResponse, CallWithDuplicateResponsesResponses, CallWithNoContentResponseData, CallWithNoContentResponseResponses, CallWithParametersData, CallWithResponseAndNoContentResponseData, CallWithResponseAndNoContentResponseResponse, CallWithResponseAndNoContentResponseResponses, CallWithResponseData, CallWithResponseResponse, CallWithResponseResponses, CallWithResponsesData, CallWithResponsesError, CallWithResponsesErrors, CallWithResponsesResponse, CallWithResponsesResponses, CallWithResultFromHeaderData, CallWithResultFromHeaderErrors, CallWithResultFromHeaderResponses, CallWithWeirdParameterNamesData, ClientOptions, CollectionFormatData, CommentWithBackticks, CommentWithBackticksAndQuotes, CommentWithBreaks, CommentWithExpressionPlaceholders, CommentWithQuotes, CommentWithReservedCharacters, CommentWithSlashes, ComplexTypesData, ComplexTypesErrors, ComplexTypesResponse, ComplexTypesResponses, Date, Default, DeleteCallWithoutParametersAndResponseData, DictionaryWithArray, DictionaryWithDictionary, DictionaryWithProperties, DictionaryWithReference, DictionaryWithString, DummyAData, DummyAResponses, DummyBData, DummyBResponses, DuplicateName2Data, DuplicateName3Data, DuplicateName4Data, DuplicateNameData, EnumFromDescription, EnumWithExtensions, EnumWithNumbers, EnumWithStrings, ExternalRefA, ExternalRefB, ExternalSharedModel, FailureFailure, FooWowData, FooWowResponses, GetCallWithoutParametersAndResponseData, HeadCallWithoutParametersAndResponseData, ModelThatExtends, ModelThatExtendsExtends, ModelWithArray, ModelWithBoolean, ModelWithCircularReference, ModelWithDictionary, ModelWithDuplicateImports, ModelWithDuplicateProperties, ModelWithEnum, ModelWithEnumFromDescription, ModelWithInteger, ModelWithNestedEnums, ModelWithNestedProperties, ModelWithNullableString, ModelWithOrderedProperties, ModelWithPattern, ModelWithPatternWritable, ModelWithProperties, ModelWithPropertiesWritable, ModelWithReference, ModelWithReferenceWritable, ModelWithString, ModelWithStringError, NonAsciiæøåÆøÅöôêÊ字符串Data, NonAsciiæøåÆøÅöôêÊ字符串Response, NonAsciiæøåÆøÅöôêÊ字符串Responses, NonAsciiStringæøåÆøÅöôêÊ字符串, OptionsCallWithoutParametersAndResponseData, ParameterActivityParams, PatchApiVbyApiVersionNoTagData, PatchApiVbyApiVersionNoTagResponses, PatchCallWithoutParametersAndResponseData, PostApiVbyApiVersionBodyData, PostApiVbyApiVersionBodyError, PostApiVbyApiVersionBodyErrors, PostApiVbyApiVersionBodyResponse, PostApiVbyApiVersionBodyResponses, PostCallWithoutParametersAndResponseData, PutCallWithoutParametersAndResponseData, ResponsePostActivityResponse, ServiceWithEmptyTagData, SimpleBoolean, SimpleFile, SimpleInteger, SimpleReference, SimpleString, SimpleStringWithPattern, TestErrorCodeData, TestErrorCodeErrors, TestErrorCodeResponses, TypesData, TypesResponse, TypesResponses } from './types.gen';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@angular/common/default/sdk.gen.ts",
    "content": "// 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 { CallToTestOrderOfParamsData, CallWithDefaultOptionalParametersData, CallWithDefaultParametersData, CallWithDescriptionsData, CallWithDuplicateResponsesData, CallWithDuplicateResponsesErrors, CallWithDuplicateResponsesResponses, CallWithNoContentResponseData, CallWithNoContentResponseResponses, CallWithParametersData, CallWithResponseAndNoContentResponseData, CallWithResponseAndNoContentResponseResponses, CallWithResponseData, CallWithResponseResponses, CallWithResponsesData, CallWithResponsesErrors, CallWithResponsesResponses, CallWithResultFromHeaderData, CallWithResultFromHeaderErrors, CallWithResultFromHeaderResponses, CallWithWeirdParameterNamesData, CollectionFormatData, ComplexTypesData, ComplexTypesErrors, ComplexTypesResponses, DeleteCallWithoutParametersAndResponseData, DummyAData, DummyAResponses, DummyBData, DummyBResponses, DuplicateName2Data, DuplicateName3Data, DuplicateName4Data, DuplicateNameData, FooWowData, FooWowResponses, GetCallWithoutParametersAndResponseData, HeadCallWithoutParametersAndResponseData, NonAsciiæøåÆøÅöôêÊ字符串Data, NonAsciiæøåÆøÅöôêÊ字符串Responses, OptionsCallWithoutParametersAndResponseData, PatchApiVbyApiVersionNoTagData, PatchApiVbyApiVersionNoTagResponses, PatchCallWithoutParametersAndResponseData, PostApiVbyApiVersionBodyData, PostApiVbyApiVersionBodyErrors, PostApiVbyApiVersionBodyResponses, PostCallWithoutParametersAndResponseData, PutCallWithoutParametersAndResponseData, ServiceWithEmptyTagData, TestErrorCodeData, TestErrorCodeErrors, TestErrorCodeResponses, TypesData, TypesResponses } from './types.gen';\n\nexport type Options<TData extends TDataShape = TDataShape, ThrowOnError extends boolean = boolean> = Options2<TData, ThrowOnError> & {\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\nexport const serviceWithEmptyTag = <ThrowOnError extends boolean = false>(options?: Options<ServiceWithEmptyTagData, ThrowOnError>) => (options?.client ?? client).get<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/no+tag', ...options });\n\nexport const patchApiVbyApiVersionNoTag = <ThrowOnError extends boolean = false>(options?: Options<PatchApiVbyApiVersionNoTagData, ThrowOnError>) => (options?.client ?? client).patch<PatchApiVbyApiVersionNoTagResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/no+tag', ...options });\n\nexport const fooWow = <ThrowOnError extends boolean = false>(options?: Options<FooWowData, ThrowOnError>) => (options?.client ?? client).put<FooWowResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/no+tag', ...options });\n\nexport const deleteCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<DeleteCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).delete<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const getCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<GetCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).get<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const headCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<HeadCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).head<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const optionsCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<OptionsCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).options<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const patchCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<PatchCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).patch<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const postCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<PostCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).post<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const putCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<PutCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).put<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const callWithDescriptions = <ThrowOnError extends boolean = false>(options?: Options<CallWithDescriptionsData, ThrowOnError>) => (options?.client ?? client).post<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/descriptions/', ...options });\n\nexport const callWithParameters = <ThrowOnError extends boolean = false>(options: Options<CallWithParametersData, ThrowOnError>) => (options.client ?? client).post<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/parameters/{parameterPath}', ...options });\n\nexport const callWithWeirdParameterNames = <ThrowOnError extends boolean = false>(options: Options<CallWithWeirdParameterNamesData, ThrowOnError>) => (options.client ?? client).post<unknown, unknown, ThrowOnError>({\n    url: '/api/v{api-version}/parameters/{parameter.path.1}/{parameter-path-2}/{PARAMETER-PATH-3}',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options.headers\n    }\n});\n\nexport const callWithDefaultParameters = <ThrowOnError extends boolean = false>(options: Options<CallWithDefaultParametersData, ThrowOnError>) => (options.client ?? client).get<unknown, unknown, ThrowOnError>({\n    querySerializer: { parameters: { parameterModel: { object: { explode: false, style: 'form' } } } },\n    url: '/api/v{api-version}/defaults',\n    ...options\n});\n\nexport const callWithDefaultOptionalParameters = <ThrowOnError extends boolean = false>(options?: Options<CallWithDefaultOptionalParametersData, ThrowOnError>) => (options?.client ?? client).post<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/defaults', ...options });\n\nexport const callToTestOrderOfParams = <ThrowOnError extends boolean = false>(options: Options<CallToTestOrderOfParamsData, ThrowOnError>) => (options.client ?? client).put<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/defaults', ...options });\n\nexport const duplicateName = <ThrowOnError extends boolean = false>(options?: Options<DuplicateNameData, ThrowOnError>) => (options?.client ?? client).delete<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/duplicate', ...options });\n\nexport const duplicateName2 = <ThrowOnError extends boolean = false>(options?: Options<DuplicateName2Data, ThrowOnError>) => (options?.client ?? client).get<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/duplicate', ...options });\n\nexport const duplicateName3 = <ThrowOnError extends boolean = false>(options?: Options<DuplicateName3Data, ThrowOnError>) => (options?.client ?? client).post<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/duplicate', ...options });\n\nexport const duplicateName4 = <ThrowOnError extends boolean = false>(options?: Options<DuplicateName4Data, ThrowOnError>) => (options?.client ?? client).put<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/duplicate', ...options });\n\nexport const callWithNoContentResponse = <ThrowOnError extends boolean = false>(options?: Options<CallWithNoContentResponseData, ThrowOnError>) => (options?.client ?? client).get<CallWithNoContentResponseResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/no-content', ...options });\n\nexport const callWithResponseAndNoContentResponse = <ThrowOnError extends boolean = false>(options?: Options<CallWithResponseAndNoContentResponseData, ThrowOnError>) => (options?.client ?? client).get<CallWithResponseAndNoContentResponseResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/multiple-tags/response-and-no-content', ...options });\n\nexport const dummyA = <ThrowOnError extends boolean = false>(options?: Options<DummyAData, ThrowOnError>) => (options?.client ?? client).get<DummyAResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/multiple-tags/a', ...options });\n\nexport const dummyB = <ThrowOnError extends boolean = false>(options?: Options<DummyBData, ThrowOnError>) => (options?.client ?? client).get<DummyBResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/multiple-tags/b', ...options });\n\nexport const callWithResponse = <ThrowOnError extends boolean = false>(options?: Options<CallWithResponseData, ThrowOnError>) => (options?.client ?? client).get<CallWithResponseResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/response', ...options });\n\nexport const callWithDuplicateResponses = <ThrowOnError extends boolean = false>(options?: Options<CallWithDuplicateResponsesData, ThrowOnError>) => (options?.client ?? client).post<CallWithDuplicateResponsesResponses, CallWithDuplicateResponsesErrors, ThrowOnError>({ url: '/api/v{api-version}/response', ...options });\n\nexport const callWithResponses = <ThrowOnError extends boolean = false>(options?: Options<CallWithResponsesData, ThrowOnError>) => (options?.client ?? client).put<CallWithResponsesResponses, CallWithResponsesErrors, ThrowOnError>({ url: '/api/v{api-version}/response', ...options });\n\nexport const collectionFormat = <ThrowOnError extends boolean = false>(options: Options<CollectionFormatData, ThrowOnError>) => (options.client ?? client).get<unknown, unknown, ThrowOnError>({\n    querySerializer: { parameters: {\n            parameterArrayCSV: { array: { explode: false } },\n            parameterArraySSV: { array: { explode: false } },\n            parameterArrayTSV: { array: { explode: false } },\n            parameterArrayPipes: { array: { explode: false } }\n        } },\n    url: '/api/v{api-version}/collectionFormat',\n    ...options\n});\n\nexport const types = <ThrowOnError extends boolean = false>(options: Options<TypesData, ThrowOnError>) => (options.client ?? client).get<TypesResponses, unknown, ThrowOnError>({\n    querySerializer: { parameters: { parameterArray: { array: { explode: false } }, parameterDictionary: { object: { explode: false, style: 'form' } } } },\n    url: '/api/v{api-version}/types',\n    ...options\n});\n\nexport const complexTypes = <ThrowOnError extends boolean = false>(options: Options<ComplexTypesData, ThrowOnError>) => (options.client ?? client).get<ComplexTypesResponses, ComplexTypesErrors, ThrowOnError>({\n    querySerializer: { parameters: { parameterObject: { object: { explode: false, style: 'form' } }, parameterReference: { object: { explode: false, style: 'form' } } } },\n    url: '/api/v{api-version}/complex',\n    ...options\n});\n\nexport const callWithResultFromHeader = <ThrowOnError extends boolean = false>(options?: Options<CallWithResultFromHeaderData, ThrowOnError>) => (options?.client ?? client).post<CallWithResultFromHeaderResponses, CallWithResultFromHeaderErrors, ThrowOnError>({ url: '/api/v{api-version}/header', ...options });\n\nexport const testErrorCode = <ThrowOnError extends boolean = false>(options: Options<TestErrorCodeData, ThrowOnError>) => (options.client ?? client).post<TestErrorCodeResponses, TestErrorCodeErrors, ThrowOnError>({ url: '/api/v{api-version}/error', ...options });\n\nexport const nonAsciiæøåÆøÅöôêÊ字符串 = <ThrowOnError extends boolean = false>(options: Options<NonAsciiæøåÆøÅöôêÊ字符串Data, ThrowOnError>) => (options.client ?? client).post<NonAsciiæøåÆøÅöôêÊ字符串Responses, unknown, ThrowOnError>({ url: '/api/v{api-version}/non-ascii-æøåÆØÅöôêÊ字符串', ...options });\n\n/**\n * Body should not be unknown\n *\n * Body should not be unknown\n */\nexport const postApiVbyApiVersionBody = <ThrowOnError extends boolean = false>(options: Options<PostApiVbyApiVersionBodyData, ThrowOnError>) => (options.client ?? client).post<PostApiVbyApiVersionBodyResponses, PostApiVbyApiVersionBodyErrors, ThrowOnError>({\n    url: '/api/v{api-version}/body',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options.headers\n    }\n});\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@angular/common/default/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type ClientOptions = {\n    baseUrl: 'http://localhost:3000/base' | (string & {});\n};\n\nexport type ExternalRefA = ExternalSharedModel;\n\nexport type ExternalRefB = ExternalSharedModel;\n\n/**\n * Testing multiline comments in string: First line\n * Second line\n *\n * Fourth line\n */\nexport type CommentWithBreaks = number;\n\n/**\n * Testing backticks in string: `backticks` and ```multiple backticks``` should work\n */\nexport type CommentWithBackticks = number;\n\n/**\n * Testing backticks and quotes in string: `backticks`, 'quotes', \"double quotes\" and ```multiple backticks``` should work\n */\nexport type CommentWithBackticksAndQuotes = number;\n\n/**\n * Testing slashes in string: \\backwards\\\\\\ and /forwards/// should work\n */\nexport type CommentWithSlashes = number;\n\n/**\n * Testing expression placeholders in string: ${expression} should work\n */\nexport type CommentWithExpressionPlaceholders = number;\n\n/**\n * Testing quotes in string: 'single quote''' and \"double quotes\"\"\" should work\n */\nexport type CommentWithQuotes = number;\n\n/**\n * Testing reserved characters in string: * inline * and ** inline ** should work\n */\nexport type CommentWithReservedCharacters = number;\n\n/**\n * This is a simple number\n */\nexport type SimpleInteger = number;\n\n/**\n * This is a simple boolean\n */\nexport type SimpleBoolean = boolean;\n\n/**\n * This is a simple string\n */\nexport type SimpleString = string;\n\n/**\n * A string with non-ascii (unicode) characters valid in typescript identifiers (æøåÆØÅöÔèÈ字符串)\n */\nexport type NonAsciiStringæøåÆøÅöôêÊ字符串 = string;\n\n/**\n * This is a simple file\n */\nexport type SimpleFile = Blob | File;\n\nexport type SimpleReference = ModelWithString;\n\n/**\n * This is a simple string\n */\nexport type SimpleStringWithPattern = string;\n\n/**\n * This is a simple enum with strings\n */\nexport type EnumWithStrings = 'Success' | 'Warning' | 'Error' | '\\'Single Quote\\'' | '\"Double Quotes\"' | 'Non-ascii: øæåôöØÆÅÔÖ字符串';\n\n/**\n * This is a simple enum with numbers\n */\nexport type EnumWithNumbers = 1 | 2 | 3 | 1.1 | 1.2 | 1.3 | 100 | 200 | 300 | -100 | -200 | -300 | -1.1 | -1.2 | -1.3;\n\n/**\n * Success=1,Warning=2,Error=3\n */\nexport type EnumFromDescription = number;\n\n/**\n * This is a simple enum with numbers\n */\nexport type EnumWithExtensions = 200 | 400 | 500;\n\n/**\n * This is a simple array with numbers\n */\nexport type ArrayWithNumbers = Array<number>;\n\n/**\n * This is a simple array with booleans\n */\nexport type ArrayWithBooleans = Array<boolean>;\n\n/**\n * This is a simple array with strings\n */\nexport type ArrayWithStrings = Array<string>;\n\n/**\n * This is a simple array with references\n */\nexport type ArrayWithReferences = Array<ModelWithString>;\n\n/**\n * This is a simple array containing an array\n */\nexport type ArrayWithArray = Array<Array<ModelWithString>>;\n\n/**\n * This is a simple array with properties\n */\nexport type ArrayWithProperties = Array<{\n    foo?: string;\n    bar?: string;\n}>;\n\n/**\n * This is a string dictionary\n */\nexport type DictionaryWithString = {\n    [key: string]: string;\n};\n\n/**\n * This is a string reference\n */\nexport type DictionaryWithReference = {\n    [key: string]: ModelWithString;\n};\n\n/**\n * This is a complex dictionary\n */\nexport type DictionaryWithArray = {\n    [key: string]: Array<ModelWithString>;\n};\n\n/**\n * This is a string dictionary\n */\nexport type DictionaryWithDictionary = {\n    [key: string]: {\n        [key: string]: string;\n    };\n};\n\n/**\n * This is a complex dictionary\n */\nexport type DictionaryWithProperties = {\n    [key: string]: {\n        foo?: string;\n        bar?: string;\n    };\n};\n\n/**\n * This is a type-only model that defines Date as a string\n */\nexport type Date = string;\n\n/**\n * This is a model with one number property\n */\nexport type ModelWithInteger = {\n    /**\n     * This is a simple number property\n     */\n    prop?: number;\n};\n\n/**\n * This is a model with one boolean property\n */\nexport type ModelWithBoolean = {\n    /**\n     * This is a simple boolean property\n     */\n    prop?: boolean;\n};\n\n/**\n * This is a model with one string property\n */\nexport type ModelWithString = {\n    /**\n     * This is a simple string property\n     */\n    prop?: string;\n};\n\n/**\n * This is a model with one string property\n */\nexport type ModelWithStringError = {\n    /**\n     * This is a simple string property\n     */\n    prop?: string;\n};\n\n/**\n * This is a model with one string property\n */\nexport type ModelWithNullableString = {\n    /**\n     * This is a simple string property\n     */\n    nullableProp?: string | null;\n    /**\n     * This is a simple string property\n     */\n    nullableRequiredProp: string | null;\n};\n\n/**\n * This is a model with one enum\n */\nexport type ModelWithEnum = {\n    /**\n     * This is a simple enum with strings\n     */\n    test?: 'Success' | 'Warning' | 'Error' | 'ØÆÅ字符串';\n    /**\n     * These are the HTTP error code enums\n     */\n    statusCode?: '100' | '200 FOO' | '300 FOO_BAR' | '400 foo-bar' | '500 foo.bar' | '600 foo&bar';\n    /**\n     * Simple boolean enum\n     */\n    bool?: true;\n};\n\n/**\n * This is a model with one enum\n */\nexport type ModelWithEnumFromDescription = {\n    /**\n     * Success=1,Warning=2,Error=3\n     */\n    test?: number;\n};\n\n/**\n * This is a model with nested enums\n */\nexport type ModelWithNestedEnums = {\n    dictionaryWithEnum?: {\n        [key: string]: 'Success' | 'Warning' | 'Error';\n    };\n    dictionaryWithEnumFromDescription?: {\n        [key: string]: number;\n    };\n    arrayWithEnum?: Array<'Success' | 'Warning' | 'Error'>;\n    arrayWithDescription?: Array<number>;\n};\n\n/**\n * This is a model with one property containing a reference\n */\nexport type ModelWithReference = {\n    prop?: ModelWithProperties;\n};\n\n/**\n * This is a model with one property containing an array\n */\nexport type ModelWithArray = {\n    prop?: Array<ModelWithString>;\n    propWithFile?: Array<Blob | File>;\n    propWithNumber?: Array<number>;\n};\n\n/**\n * This is a model with one property containing a dictionary\n */\nexport type ModelWithDictionary = {\n    prop?: {\n        [key: string]: string;\n    };\n};\n\n/**\n * This is a model with one property containing a circular reference\n */\nexport type ModelWithCircularReference = {\n    prop?: ModelWithCircularReference;\n};\n\n/**\n * This is a model with one nested property\n */\nexport type ModelWithProperties = {\n    required: string;\n    readonly requiredAndReadOnly: string;\n    string?: string;\n    number?: number;\n    boolean?: boolean;\n    reference?: ModelWithString;\n    'property with space'?: string;\n    default?: string;\n    try?: string;\n    readonly '@namespace.string'?: string;\n    readonly '@namespace.integer'?: number;\n};\n\n/**\n * This is a model with one nested property\n */\nexport type ModelWithNestedProperties = {\n    readonly first: {\n        readonly second: {\n            readonly third: string;\n        };\n    };\n};\n\n/**\n * This is a model with duplicated properties\n */\nexport type ModelWithDuplicateProperties = {\n    prop?: ModelWithString;\n};\n\n/**\n * This is a model with ordered properties\n */\nexport type ModelWithOrderedProperties = {\n    zebra?: string;\n    apple?: string;\n    hawaii?: string;\n};\n\n/**\n * This is a model with duplicated imports\n */\nexport type ModelWithDuplicateImports = {\n    propA?: ModelWithString;\n    propB?: ModelWithString;\n    propC?: ModelWithString;\n};\n\n/**\n * This is a model that extends another model\n */\nexport type ModelThatExtends = ModelWithString & {\n    propExtendsA?: string;\n    propExtendsB?: ModelWithString;\n};\n\n/**\n * This is a model that extends another model\n */\nexport type ModelThatExtendsExtends = ModelWithString & ModelThatExtends & {\n    propExtendsC?: string;\n    propExtendsD?: ModelWithString;\n};\n\nexport type Default = {\n    name?: string;\n};\n\n/**\n * This is a model that contains a some patterns\n */\nexport type ModelWithPattern = {\n    key: string;\n    name: string;\n    readonly enabled?: boolean;\n    readonly modified?: string;\n    id?: string;\n    text?: string;\n    patternWithSingleQuotes?: string;\n    patternWithNewline?: string;\n    patternWithBacktick?: string;\n    patternWithUnicode?: string;\n};\n\nexport type ParameterActivityParams = {\n    description?: string;\n    graduate_id?: number;\n    organization_id?: number;\n    parent_activity?: number;\n    post_id?: number;\n};\n\nexport type ResponsePostActivityResponse = {\n    description?: string;\n    graduate_id?: number;\n    organization_id?: number;\n    parent_activity_id?: number;\n    post_id?: number;\n};\n\nexport type FailureFailure = {\n    error?: string;\n    message?: string;\n    reference_code?: string;\n};\n\nexport type ExternalSharedModel = {\n    id: string;\n    name?: string;\n};\n\n/**\n * This is a model with one property containing a reference\n */\nexport type ModelWithReferenceWritable = {\n    prop?: ModelWithPropertiesWritable;\n};\n\n/**\n * This is a model with one nested property\n */\nexport type ModelWithPropertiesWritable = {\n    required: string;\n    string?: string;\n    number?: number;\n    boolean?: boolean;\n    reference?: ModelWithString;\n    'property with space'?: string;\n    default?: string;\n    try?: string;\n};\n\n/**\n * This is a model that contains a some patterns\n */\nexport type ModelWithPatternWritable = {\n    key: string;\n    name: string;\n    id?: string;\n    text?: string;\n    patternWithSingleQuotes?: string;\n    patternWithNewline?: string;\n    patternWithBacktick?: string;\n    patternWithUnicode?: string;\n};\n\nexport type ServiceWithEmptyTagData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no+tag';\n};\n\nexport type PatchApiVbyApiVersionNoTagData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no+tag';\n};\n\nexport type PatchApiVbyApiVersionNoTagResponses = {\n    /**\n     * OK\n     */\n    default: unknown;\n};\n\nexport type FooWowData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no+tag';\n};\n\nexport type FooWowResponses = {\n    /**\n     * OK\n     */\n    default: unknown;\n};\n\nexport type DeleteCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type GetCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type HeadCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type OptionsCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type PatchCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type PostCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type PutCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type CallWithDescriptionsData = {\n    body?: never;\n    path?: never;\n    query?: {\n        /**\n         * Testing multiline comments in string: First line\n         * Second line\n         *\n         * Fourth line\n         */\n        parameterWithBreaks?: string;\n        /**\n         * Testing backticks in string: `backticks` and ```multiple backticks``` should work\n         */\n        parameterWithBackticks?: string;\n        /**\n         * Testing slashes in string: \\backwards\\\\\\ and /forwards/// should work\n         */\n        parameterWithSlashes?: string;\n        /**\n         * Testing expression placeholders in string: ${expression} should work\n         */\n        parameterWithExpressionPlaceholders?: string;\n        /**\n         * Testing quotes in string: 'single quote''' and \"double quotes\"\"\" should work\n         */\n        parameterWithQuotes?: string;\n        /**\n         * Testing reserved characters in string: * inline * and ** inline ** should work\n         */\n        parameterWithReservedCharacters?: string;\n    };\n    url: '/api/v{api-version}/descriptions/';\n};\n\nexport type CallWithParametersData = {\n    body?: never;\n    headers: {\n        /**\n         * This is the parameter that goes into the header\n         */\n        parameterHeader: string;\n    };\n    path: {\n        /**\n         * This is the parameter that goes into the path\n         */\n        parameterPath: string;\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string;\n    };\n    query: {\n        /**\n         * This is the parameter that goes into the query params\n         */\n        parameterQuery: string;\n    };\n    url: '/api/v{api-version}/parameters/{parameterPath}';\n};\n\nexport type CallWithWeirdParameterNamesData = {\n    /**\n     * This is the parameter that is sent as request body\n     */\n    body: string;\n    headers: {\n        /**\n         * This is the parameter that goes into the request header\n         */\n        'parameter.header': string;\n    };\n    path: {\n        /**\n         * This is the parameter that goes into the path\n         */\n        'parameter.path.1'?: string;\n        /**\n         * This is the parameter that goes into the path\n         */\n        'parameter-path-2'?: string;\n        /**\n         * This is the parameter that goes into the path\n         */\n        'PARAMETER-PATH-3'?: string;\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string;\n    };\n    query: {\n        /**\n         * This is the parameter with a reserved keyword\n         */\n        default?: string;\n        /**\n         * This is the parameter that goes into the request query params\n         */\n        'parameter-query': string;\n    };\n    url: '/api/v{api-version}/parameters/{parameter.path.1}/{parameter-path-2}/{PARAMETER-PATH-3}';\n};\n\nexport type CallWithDefaultParametersData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * This is a simple string with default value\n         */\n        parameterString: string;\n        /**\n         * This is a simple number with default value\n         */\n        parameterNumber: number;\n        /**\n         * This is a simple boolean with default value\n         */\n        parameterBoolean: boolean;\n        /**\n         * This is a simple enum with default value\n         */\n        parameterEnum: 'Success' | 'Warning' | 'Error';\n        /**\n         * This is a model with one string property\n         */\n        parameterModel: {\n            /**\n             * This is a simple string property\n             */\n            prop?: string;\n        };\n    };\n    url: '/api/v{api-version}/defaults';\n};\n\nexport type CallWithDefaultOptionalParametersData = {\n    body?: never;\n    path?: never;\n    query?: {\n        /**\n         * This is a simple string that is optional with default value\n         */\n        parameterString?: string;\n        /**\n         * This is a simple number that is optional with default value\n         */\n        parameterNumber?: number;\n        /**\n         * This is a simple boolean that is optional with default value\n         */\n        parameterBoolean?: boolean;\n        /**\n         * This is a simple enum that is optional with default value\n         */\n        parameterEnum?: 'Success' | 'Warning' | 'Error';\n    };\n    url: '/api/v{api-version}/defaults';\n};\n\nexport type CallToTestOrderOfParamsData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * This is a optional string with default\n         */\n        parameterOptionalStringWithDefault?: string;\n        /**\n         * This is a optional string with empty default\n         */\n        parameterOptionalStringWithEmptyDefault?: string;\n        /**\n         * This is a optional string with no default\n         */\n        parameterOptionalStringWithNoDefault?: string;\n        /**\n         * This is a string with default\n         */\n        parameterStringWithDefault: string;\n        /**\n         * This is a string with empty default\n         */\n        parameterStringWithEmptyDefault: string;\n        /**\n         * This is a string with no default\n         */\n        parameterStringWithNoDefault: string;\n        /**\n         * This is a string that can be null with no default\n         */\n        parameterStringNullableWithNoDefault?: string | null;\n        /**\n         * This is a string that can be null with default\n         */\n        parameterStringNullableWithDefault?: string | null;\n    };\n    url: '/api/v{api-version}/defaults';\n};\n\nexport type DuplicateNameData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/duplicate';\n};\n\nexport type DuplicateName2Data = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/duplicate';\n};\n\nexport type DuplicateName3Data = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/duplicate';\n};\n\nexport type DuplicateName4Data = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/duplicate';\n};\n\nexport type CallWithNoContentResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no-content';\n};\n\nexport type CallWithNoContentResponseResponses = {\n    /**\n     * Success\n     */\n    204: unknown;\n};\n\nexport type CallWithResponseAndNoContentResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multiple-tags/response-and-no-content';\n};\n\nexport type CallWithResponseAndNoContentResponseResponses = {\n    /**\n     * Response is a simple number\n     */\n    200: number;\n    /**\n     * Success\n     */\n    204: unknown;\n};\n\nexport type CallWithResponseAndNoContentResponseResponse = CallWithResponseAndNoContentResponseResponses[keyof CallWithResponseAndNoContentResponseResponses];\n\nexport type DummyAData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multiple-tags/a';\n};\n\nexport type DummyAResponses = {\n    /**\n     * Success\n     */\n    204: unknown;\n};\n\nexport type DummyBData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multiple-tags/b';\n};\n\nexport type DummyBResponses = {\n    /**\n     * Success\n     */\n    204: unknown;\n};\n\nexport type CallWithResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/response';\n};\n\nexport type CallWithResponseResponses = {\n    /**\n     * Message for default response\n     */\n    default: ModelWithString;\n};\n\nexport type CallWithResponseResponse = CallWithResponseResponses[keyof CallWithResponseResponses];\n\nexport type CallWithDuplicateResponsesData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/response';\n};\n\nexport type CallWithDuplicateResponsesErrors = {\n    /**\n     * Message for 500 error\n     */\n    500: ModelWithStringError;\n    /**\n     * Message for 501 error\n     */\n    501: ModelWithStringError;\n    /**\n     * Message for 502 error\n     */\n    502: ModelWithStringError;\n    /**\n     * Message for default response\n     */\n    default: ModelWithString;\n};\n\nexport type CallWithDuplicateResponsesError = CallWithDuplicateResponsesErrors[keyof CallWithDuplicateResponsesErrors];\n\nexport type CallWithDuplicateResponsesResponses = {\n    /**\n     * Message for 201 response\n     */\n    201: ModelWithString;\n    /**\n     * Message for 202 response\n     */\n    202: ModelWithString;\n};\n\nexport type CallWithDuplicateResponsesResponse = CallWithDuplicateResponsesResponses[keyof CallWithDuplicateResponsesResponses];\n\nexport type CallWithResponsesData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/response';\n};\n\nexport type CallWithResponsesErrors = {\n    /**\n     * Message for 500 error\n     */\n    500: ModelWithStringError;\n    /**\n     * Message for 501 error\n     */\n    501: ModelWithStringError;\n    /**\n     * Message for 502 error\n     */\n    502: ModelWithStringError;\n    /**\n     * Message for default response\n     */\n    default: ModelWithString;\n};\n\nexport type CallWithResponsesError = CallWithResponsesErrors[keyof CallWithResponsesErrors];\n\nexport type CallWithResponsesResponses = {\n    /**\n     * Message for 200 response\n     */\n    200: {\n        readonly '@namespace.string'?: string;\n        readonly '@namespace.integer'?: number;\n        readonly value?: Array<ModelWithString>;\n    };\n    /**\n     * Message for 201 response\n     */\n    201: ModelThatExtends;\n    /**\n     * Message for 202 response\n     */\n    202: ModelThatExtendsExtends;\n};\n\nexport type CallWithResponsesResponse = CallWithResponsesResponses[keyof CallWithResponsesResponses];\n\nexport type CollectionFormatData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * This is an array parameter that is sent as csv format (comma-separated values)\n         */\n        parameterArrayCSV: Array<string>;\n        /**\n         * This is an array parameter that is sent as ssv format (space-separated values)\n         */\n        parameterArraySSV: Array<string>;\n        /**\n         * This is an array parameter that is sent as tsv format (tab-separated values)\n         */\n        parameterArrayTSV: Array<string>;\n        /**\n         * This is an array parameter that is sent as pipes format (pipe-separated values)\n         */\n        parameterArrayPipes: Array<string>;\n        /**\n         * This is an array parameter that is sent as multi format (multiple parameter instances)\n         */\n        parameterArrayMulti: Array<string>;\n    };\n    url: '/api/v{api-version}/collectionFormat';\n};\n\nexport type TypesData = {\n    body?: never;\n    path?: {\n        /**\n         * This is a number parameter\n         */\n        id?: number;\n    };\n    query: {\n        /**\n         * This is a number parameter\n         */\n        parameterNumber: number;\n        /**\n         * This is a string parameter\n         */\n        parameterString: string;\n        /**\n         * This is a boolean parameter\n         */\n        parameterBoolean: boolean;\n        /**\n         * This is an array parameter\n         */\n        parameterArray: Array<string>;\n        /**\n         * This is a dictionary parameter\n         */\n        parameterDictionary: {\n            [key: string]: unknown;\n        };\n        /**\n         * This is an enum parameter\n         */\n        parameterEnum: 'Success' | 'Warning' | 'Error';\n    };\n    url: '/api/v{api-version}/types';\n};\n\nexport type TypesResponses = {\n    /**\n     * Response is a simple number\n     */\n    200: number;\n    /**\n     * Response is a simple string\n     */\n    201: string;\n    /**\n     * Response is a simple boolean\n     */\n    202: boolean;\n    /**\n     * Response is a simple object\n     */\n    203: {\n        [key: string]: unknown;\n    };\n};\n\nexport type TypesResponse = TypesResponses[keyof TypesResponses];\n\nexport type ComplexTypesData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * Parameter containing object\n         */\n        parameterObject: {\n            first?: {\n                second?: {\n                    third?: string;\n                };\n            };\n        };\n        /**\n         * This is a model with one string property\n         */\n        parameterReference: {\n            /**\n             * This is a simple string property\n             */\n            prop?: string;\n        };\n    };\n    url: '/api/v{api-version}/complex';\n};\n\nexport type ComplexTypesErrors = {\n    /**\n     * 400 server error\n     */\n    400: unknown;\n    /**\n     * 500 server error\n     */\n    500: unknown;\n};\n\nexport type ComplexTypesResponses = {\n    /**\n     * Successful response\n     */\n    200: Array<ModelWithString>;\n};\n\nexport type ComplexTypesResponse = ComplexTypesResponses[keyof ComplexTypesResponses];\n\nexport type CallWithResultFromHeaderData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/header';\n};\n\nexport type CallWithResultFromHeaderErrors = {\n    /**\n     * 400 server error\n     */\n    400: unknown;\n    /**\n     * 500 server error\n     */\n    500: unknown;\n};\n\nexport type CallWithResultFromHeaderResponses = {\n    /**\n     * Successful response\n     */\n    200: unknown;\n};\n\nexport type TestErrorCodeData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * Status code to return\n         */\n        status: string;\n    };\n    url: '/api/v{api-version}/error';\n};\n\nexport type TestErrorCodeErrors = {\n    /**\n     * Custom message: Internal Server Error\n     */\n    500: unknown;\n    /**\n     * Custom message: Not Implemented\n     */\n    501: unknown;\n    /**\n     * Custom message: Bad Gateway\n     */\n    502: unknown;\n    /**\n     * Custom message: Service Unavailable\n     */\n    503: unknown;\n};\n\nexport type TestErrorCodeResponses = {\n    /**\n     * Custom message: Successful response\n     */\n    200: unknown;\n};\n\nexport type NonAsciiæøåÆøÅöôêÊ字符串Data = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * Dummy input param\n         */\n        nonAsciiParamæøåÆØÅöôêÊ: number;\n    };\n    url: '/api/v{api-version}/non-ascii-æøåÆØÅöôêÊ字符串';\n};\n\nexport type NonAsciiæøåÆøÅöôêÊ字符串Responses = {\n    /**\n     * Successful response\n     */\n    200: NonAsciiStringæøåÆøÅöôêÊ字符串;\n};\n\nexport type NonAsciiæøåÆøÅöôêÊ字符串Response = NonAsciiæøåÆøÅöôêÊ字符串Responses[keyof NonAsciiæøåÆøÅöôêÊ字符串Responses];\n\nexport type PostApiVbyApiVersionBodyData = {\n    /**\n     * Body should not be unknown\n     */\n    body: ParameterActivityParams;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/body';\n};\n\nexport type PostApiVbyApiVersionBodyErrors = {\n    /**\n     * Bad Request\n     */\n    400: FailureFailure;\n    /**\n     * Internal Server Error\n     */\n    500: FailureFailure;\n};\n\nexport type PostApiVbyApiVersionBodyError = PostApiVbyApiVersionBodyErrors[keyof PostApiVbyApiVersionBodyErrors];\n\nexport type PostApiVbyApiVersionBodyResponses = {\n    /**\n     * OK\n     */\n    200: ResponsePostActivityResponse;\n};\n\nexport type PostApiVbyApiVersionBodyResponse = PostApiVbyApiVersionBodyResponses[keyof PostApiVbyApiVersionBodyResponses];\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@angular/common/default-class/@angular/common.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport { type HttpRequest, httpResource } from '@angular/common/http';\nimport { inject, Injectable } from '@angular/core';\n\nimport { client } from '../client.gen';\nimport type { Options } from '../sdk.gen';\nimport type { CallToTestOrderOfParamsData, CallWithDefaultOptionalParametersData, CallWithDefaultParametersData, CallWithDescriptionsData, CallWithDuplicateResponsesData, CallWithDuplicateResponsesResponse, CallWithNoContentResponseData, CallWithParametersData, CallWithResponseAndNoContentResponseData, CallWithResponseAndNoContentResponseResponse, CallWithResponseData, CallWithResponseResponse, CallWithResponsesData, CallWithResponsesResponse, CallWithResultFromHeaderData, CallWithWeirdParameterNamesData, CollectionFormatData, ComplexTypesData, ComplexTypesResponse, DeleteCallWithoutParametersAndResponseData, DummyAData, DummyBData, DuplicateName2Data, DuplicateName3Data, DuplicateName4Data, DuplicateNameData, FooWowData, GetCallWithoutParametersAndResponseData, HeadCallWithoutParametersAndResponseData, NonAsciiæøåÆøÅöôêÊ字符串Data, NonAsciiæøåÆøÅöôêÊ字符串Response, OptionsCallWithoutParametersAndResponseData, PatchApiVbyApiVersionNoTagData, PatchCallWithoutParametersAndResponseData, PostApiVbyApiVersionBodyData, PostApiVbyApiVersionBodyResponse, PostCallWithoutParametersAndResponseData, PutCallWithoutParametersAndResponseData, ServiceWithEmptyTagData, TestErrorCodeData, TypesData, TypesResponse } from '../types.gen';\n\n@Injectable({ providedIn: 'root' })\nexport class DefaultServiceRequests {\n    public serviceWithEmptyTag<ThrowOnError extends boolean = false>(options?: Options<ServiceWithEmptyTagData, ThrowOnError>): HttpRequest<unknown> {\n        return (options?.client ?? client).requestOptions<unknown, ThrowOnError>({\n            responseStyle: 'data',\n            method: 'GET',\n            url: '/api/v{api-version}/no+tag',\n            ...options\n        });\n    }\n    \n    public patchApiVbyApiVersionNoTag<ThrowOnError extends boolean = false>(options?: Options<PatchApiVbyApiVersionNoTagData, ThrowOnError>): HttpRequest<unknown> {\n        return (options?.client ?? client).requestOptions<unknown, ThrowOnError>({\n            responseStyle: 'data',\n            method: 'PATCH',\n            url: '/api/v{api-version}/no+tag',\n            ...options\n        });\n    }\n    \n    public fooWow<ThrowOnError extends boolean = false>(options?: Options<FooWowData, ThrowOnError>): HttpRequest<unknown> {\n        return (options?.client ?? client).requestOptions<unknown, ThrowOnError>({\n            responseStyle: 'data',\n            method: 'PUT',\n            url: '/api/v{api-version}/no+tag',\n            ...options\n        });\n    }\n    \n    /**\n     * Body should not be unknown\n     *\n     * Body should not be unknown\n     */\n    public postApiVbyApiVersionBody<ThrowOnError extends boolean = false>(options: Options<PostApiVbyApiVersionBodyData, ThrowOnError>): HttpRequest<PostApiVbyApiVersionBodyResponse> {\n        return (options?.client ?? client).requestOptions<PostApiVbyApiVersionBodyResponse, ThrowOnError>({\n            responseStyle: 'data',\n            method: 'POST',\n            url: '/api/v{api-version}/body',\n            ...options\n        });\n    }\n}\n\n@Injectable({ providedIn: 'root' })\nexport class SimpleServiceRequests {\n    public deleteCallWithoutParametersAndResponse<ThrowOnError extends boolean = false>(options?: Options<DeleteCallWithoutParametersAndResponseData, ThrowOnError>): HttpRequest<unknown> {\n        return (options?.client ?? client).requestOptions<unknown, ThrowOnError>({\n            responseStyle: 'data',\n            method: 'DELETE',\n            url: '/api/v{api-version}/simple',\n            ...options\n        });\n    }\n    \n    public getCallWithoutParametersAndResponse<ThrowOnError extends boolean = false>(options?: Options<GetCallWithoutParametersAndResponseData, ThrowOnError>): HttpRequest<unknown> {\n        return (options?.client ?? client).requestOptions<unknown, ThrowOnError>({\n            responseStyle: 'data',\n            method: 'GET',\n            url: '/api/v{api-version}/simple',\n            ...options\n        });\n    }\n    \n    public headCallWithoutParametersAndResponse<ThrowOnError extends boolean = false>(options?: Options<HeadCallWithoutParametersAndResponseData, ThrowOnError>): HttpRequest<unknown> {\n        return (options?.client ?? client).requestOptions<unknown, ThrowOnError>({\n            responseStyle: 'data',\n            method: 'HEAD',\n            url: '/api/v{api-version}/simple',\n            ...options\n        });\n    }\n    \n    public optionsCallWithoutParametersAndResponse<ThrowOnError extends boolean = false>(options?: Options<OptionsCallWithoutParametersAndResponseData, ThrowOnError>): HttpRequest<unknown> {\n        return (options?.client ?? client).requestOptions<unknown, ThrowOnError>({\n            responseStyle: 'data',\n            method: 'OPTIONS',\n            url: '/api/v{api-version}/simple',\n            ...options\n        });\n    }\n    \n    public patchCallWithoutParametersAndResponse<ThrowOnError extends boolean = false>(options?: Options<PatchCallWithoutParametersAndResponseData, ThrowOnError>): HttpRequest<unknown> {\n        return (options?.client ?? client).requestOptions<unknown, ThrowOnError>({\n            responseStyle: 'data',\n            method: 'PATCH',\n            url: '/api/v{api-version}/simple',\n            ...options\n        });\n    }\n    \n    public postCallWithoutParametersAndResponse<ThrowOnError extends boolean = false>(options?: Options<PostCallWithoutParametersAndResponseData, ThrowOnError>): HttpRequest<unknown> {\n        return (options?.client ?? client).requestOptions<unknown, ThrowOnError>({\n            responseStyle: 'data',\n            method: 'POST',\n            url: '/api/v{api-version}/simple',\n            ...options\n        });\n    }\n    \n    public putCallWithoutParametersAndResponse<ThrowOnError extends boolean = false>(options?: Options<PutCallWithoutParametersAndResponseData, ThrowOnError>): HttpRequest<unknown> {\n        return (options?.client ?? client).requestOptions<unknown, ThrowOnError>({\n            responseStyle: 'data',\n            method: 'PUT',\n            url: '/api/v{api-version}/simple',\n            ...options\n        });\n    }\n}\n\n@Injectable({ providedIn: 'root' })\nexport class DescriptionsServiceRequests {\n    public callWithDescriptions<ThrowOnError extends boolean = false>(options?: Options<CallWithDescriptionsData, ThrowOnError>): HttpRequest<unknown> {\n        return (options?.client ?? client).requestOptions<unknown, ThrowOnError>({\n            responseStyle: 'data',\n            method: 'POST',\n            url: '/api/v{api-version}/descriptions/',\n            ...options\n        });\n    }\n}\n\n@Injectable({ providedIn: 'root' })\nexport class ParametersServiceRequests {\n    public callWithParameters<ThrowOnError extends boolean = false>(options: Options<CallWithParametersData, ThrowOnError>): HttpRequest<unknown> {\n        return (options?.client ?? client).requestOptions<unknown, ThrowOnError>({\n            responseStyle: 'data',\n            method: 'POST',\n            url: '/api/v{api-version}/parameters/{parameterPath}',\n            ...options\n        });\n    }\n    \n    public callWithWeirdParameterNames<ThrowOnError extends boolean = false>(options: Options<CallWithWeirdParameterNamesData, ThrowOnError>): HttpRequest<unknown> {\n        return (options?.client ?? client).requestOptions<unknown, ThrowOnError>({\n            responseStyle: 'data',\n            method: 'POST',\n            url: '/api/v{api-version}/parameters/{parameter.path.1}/{parameter-path-2}/{PARAMETER-PATH-3}',\n            ...options\n        });\n    }\n}\n\n@Injectable({ providedIn: 'root' })\nexport class DefaultsServiceRequests {\n    public callWithDefaultParameters<ThrowOnError extends boolean = false>(options: Options<CallWithDefaultParametersData, ThrowOnError>): HttpRequest<unknown> {\n        return (options?.client ?? client).requestOptions<unknown, ThrowOnError>({\n            responseStyle: 'data',\n            method: 'GET',\n            url: '/api/v{api-version}/defaults',\n            ...options\n        });\n    }\n    \n    public callWithDefaultOptionalParameters<ThrowOnError extends boolean = false>(options?: Options<CallWithDefaultOptionalParametersData, ThrowOnError>): HttpRequest<unknown> {\n        return (options?.client ?? client).requestOptions<unknown, ThrowOnError>({\n            responseStyle: 'data',\n            method: 'POST',\n            url: '/api/v{api-version}/defaults',\n            ...options\n        });\n    }\n    \n    public callToTestOrderOfParams<ThrowOnError extends boolean = false>(options: Options<CallToTestOrderOfParamsData, ThrowOnError>): HttpRequest<unknown> {\n        return (options?.client ?? client).requestOptions<unknown, ThrowOnError>({\n            responseStyle: 'data',\n            method: 'PUT',\n            url: '/api/v{api-version}/defaults',\n            ...options\n        });\n    }\n}\n\n@Injectable({ providedIn: 'root' })\nexport class DuplicateServiceRequests {\n    public duplicateName<ThrowOnError extends boolean = false>(options?: Options<DuplicateNameData, ThrowOnError>): HttpRequest<unknown> {\n        return (options?.client ?? client).requestOptions<unknown, ThrowOnError>({\n            responseStyle: 'data',\n            method: 'DELETE',\n            url: '/api/v{api-version}/duplicate',\n            ...options\n        });\n    }\n    \n    public duplicateName2<ThrowOnError extends boolean = false>(options?: Options<DuplicateName2Data, ThrowOnError>): HttpRequest<unknown> {\n        return (options?.client ?? client).requestOptions<unknown, ThrowOnError>({\n            responseStyle: 'data',\n            method: 'GET',\n            url: '/api/v{api-version}/duplicate',\n            ...options\n        });\n    }\n    \n    public duplicateName3<ThrowOnError extends boolean = false>(options?: Options<DuplicateName3Data, ThrowOnError>): HttpRequest<unknown> {\n        return (options?.client ?? client).requestOptions<unknown, ThrowOnError>({\n            responseStyle: 'data',\n            method: 'POST',\n            url: '/api/v{api-version}/duplicate',\n            ...options\n        });\n    }\n    \n    public duplicateName4<ThrowOnError extends boolean = false>(options?: Options<DuplicateName4Data, ThrowOnError>): HttpRequest<unknown> {\n        return (options?.client ?? client).requestOptions<unknown, ThrowOnError>({\n            responseStyle: 'data',\n            method: 'PUT',\n            url: '/api/v{api-version}/duplicate',\n            ...options\n        });\n    }\n}\n\n@Injectable({ providedIn: 'root' })\nexport class NoContentServiceRequests {\n    public callWithNoContentResponse<ThrowOnError extends boolean = false>(options?: Options<CallWithNoContentResponseData, ThrowOnError>): HttpRequest<unknown> {\n        return (options?.client ?? client).requestOptions<unknown, ThrowOnError>({\n            responseStyle: 'data',\n            method: 'GET',\n            url: '/api/v{api-version}/no-content',\n            ...options\n        });\n    }\n    \n    public callWithResponseAndNoContentResponse<ThrowOnError extends boolean = false>(options?: Options<CallWithResponseAndNoContentResponseData, ThrowOnError>): HttpRequest<CallWithResponseAndNoContentResponseResponse> {\n        return (options?.client ?? client).requestOptions<CallWithResponseAndNoContentResponseResponse, ThrowOnError>({\n            responseStyle: 'data',\n            method: 'GET',\n            url: '/api/v{api-version}/multiple-tags/response-and-no-content',\n            ...options\n        });\n    }\n}\n\n@Injectable({ providedIn: 'root' })\nexport class ResponseServiceRequests {\n    public callWithResponseAndNoContentResponse<ThrowOnError extends boolean = false>(options?: Options<CallWithResponseAndNoContentResponseData, ThrowOnError>): HttpRequest<CallWithResponseAndNoContentResponseResponse> {\n        return (options?.client ?? client).requestOptions<CallWithResponseAndNoContentResponseResponse, ThrowOnError>({\n            responseStyle: 'data',\n            method: 'GET',\n            url: '/api/v{api-version}/multiple-tags/response-and-no-content',\n            ...options\n        });\n    }\n    \n    public callWithResponse<ThrowOnError extends boolean = false>(options?: Options<CallWithResponseData, ThrowOnError>): HttpRequest<CallWithResponseResponse> {\n        return (options?.client ?? client).requestOptions<CallWithResponseResponse, ThrowOnError>({\n            responseStyle: 'data',\n            method: 'GET',\n            url: '/api/v{api-version}/response',\n            ...options\n        });\n    }\n    \n    public callWithDuplicateResponses<ThrowOnError extends boolean = false>(options?: Options<CallWithDuplicateResponsesData, ThrowOnError>): HttpRequest<CallWithDuplicateResponsesResponse> {\n        return (options?.client ?? client).requestOptions<CallWithDuplicateResponsesResponse, ThrowOnError>({\n            responseStyle: 'data',\n            method: 'POST',\n            url: '/api/v{api-version}/response',\n            ...options\n        });\n    }\n    \n    public callWithResponses<ThrowOnError extends boolean = false>(options?: Options<CallWithResponsesData, ThrowOnError>): HttpRequest<CallWithResponsesResponse> {\n        return (options?.client ?? client).requestOptions<CallWithResponsesResponse, ThrowOnError>({\n            responseStyle: 'data',\n            method: 'PUT',\n            url: '/api/v{api-version}/response',\n            ...options\n        });\n    }\n}\n\n@Injectable({ providedIn: 'root' })\nexport class MultipleTags1ServiceRequests {\n    public dummyA<ThrowOnError extends boolean = false>(options?: Options<DummyAData, ThrowOnError>): HttpRequest<unknown> {\n        return (options?.client ?? client).requestOptions<unknown, ThrowOnError>({\n            responseStyle: 'data',\n            method: 'GET',\n            url: '/api/v{api-version}/multiple-tags/a',\n            ...options\n        });\n    }\n    \n    public dummyB<ThrowOnError extends boolean = false>(options?: Options<DummyBData, ThrowOnError>): HttpRequest<unknown> {\n        return (options?.client ?? client).requestOptions<unknown, ThrowOnError>({\n            responseStyle: 'data',\n            method: 'GET',\n            url: '/api/v{api-version}/multiple-tags/b',\n            ...options\n        });\n    }\n}\n\n@Injectable({ providedIn: 'root' })\nexport class MultipleTags2ServiceRequests {\n    public dummyA<ThrowOnError extends boolean = false>(options?: Options<DummyAData, ThrowOnError>): HttpRequest<unknown> {\n        return (options?.client ?? client).requestOptions<unknown, ThrowOnError>({\n            responseStyle: 'data',\n            method: 'GET',\n            url: '/api/v{api-version}/multiple-tags/a',\n            ...options\n        });\n    }\n    \n    public dummyB<ThrowOnError extends boolean = false>(options?: Options<DummyBData, ThrowOnError>): HttpRequest<unknown> {\n        return (options?.client ?? client).requestOptions<unknown, ThrowOnError>({\n            responseStyle: 'data',\n            method: 'GET',\n            url: '/api/v{api-version}/multiple-tags/b',\n            ...options\n        });\n    }\n}\n\n@Injectable({ providedIn: 'root' })\nexport class MultipleTags3ServiceRequests {\n    public dummyB<ThrowOnError extends boolean = false>(options?: Options<DummyBData, ThrowOnError>): HttpRequest<unknown> {\n        return (options?.client ?? client).requestOptions<unknown, ThrowOnError>({\n            responseStyle: 'data',\n            method: 'GET',\n            url: '/api/v{api-version}/multiple-tags/b',\n            ...options\n        });\n    }\n}\n\n@Injectable({ providedIn: 'root' })\nexport class CollectionFormatServiceRequests {\n    public collectionFormat<ThrowOnError extends boolean = false>(options: Options<CollectionFormatData, ThrowOnError>): HttpRequest<unknown> {\n        return (options?.client ?? client).requestOptions<unknown, ThrowOnError>({\n            responseStyle: 'data',\n            method: 'GET',\n            url: '/api/v{api-version}/collectionFormat',\n            ...options\n        });\n    }\n}\n\n@Injectable({ providedIn: 'root' })\nexport class TypesServiceRequests {\n    public types<ThrowOnError extends boolean = false>(options: Options<TypesData, ThrowOnError>): HttpRequest<TypesResponse> {\n        return (options?.client ?? client).requestOptions<TypesResponse, ThrowOnError>({\n            responseStyle: 'data',\n            method: 'GET',\n            url: '/api/v{api-version}/types',\n            ...options\n        });\n    }\n}\n\n@Injectable({ providedIn: 'root' })\nexport class ComplexServiceRequests {\n    public complexTypes<ThrowOnError extends boolean = false>(options: Options<ComplexTypesData, ThrowOnError>): HttpRequest<ComplexTypesResponse> {\n        return (options?.client ?? client).requestOptions<ComplexTypesResponse, ThrowOnError>({\n            responseStyle: 'data',\n            method: 'GET',\n            url: '/api/v{api-version}/complex',\n            ...options\n        });\n    }\n}\n\n@Injectable({ providedIn: 'root' })\nexport class HeaderServiceRequests {\n    public callWithResultFromHeader<ThrowOnError extends boolean = false>(options?: Options<CallWithResultFromHeaderData, ThrowOnError>): HttpRequest<unknown> {\n        return (options?.client ?? client).requestOptions<unknown, ThrowOnError>({\n            responseStyle: 'data',\n            method: 'POST',\n            url: '/api/v{api-version}/header',\n            ...options\n        });\n    }\n}\n\n@Injectable({ providedIn: 'root' })\nexport class ErrorServiceRequests {\n    public testErrorCode<ThrowOnError extends boolean = false>(options: Options<TestErrorCodeData, ThrowOnError>): HttpRequest<unknown> {\n        return (options?.client ?? client).requestOptions<unknown, ThrowOnError>({\n            responseStyle: 'data',\n            method: 'POST',\n            url: '/api/v{api-version}/error',\n            ...options\n        });\n    }\n}\n\n@Injectable({ providedIn: 'root' })\nexport class NonAsciiÆøåÆøÅöôêÊServiceRequests {\n    public nonAsciiæøåÆøÅöôêÊ字符串<ThrowOnError extends boolean = false>(options: Options<NonAsciiæøåÆøÅöôêÊ字符串Data, ThrowOnError>): HttpRequest<NonAsciiæøåÆøÅöôêÊ字符串Response> {\n        return (options?.client ?? client).requestOptions<NonAsciiæøåÆøÅöôêÊ字符串Response, ThrowOnError>({\n            responseStyle: 'data',\n            method: 'POST',\n            url: '/api/v{api-version}/non-ascii-æøåÆØÅöôêÊ字符串',\n            ...options\n        });\n    }\n}\n\n@Injectable({ providedIn: 'root' })\nexport class DefaultServiceResources {\n    public serviceWithEmptyTag<ThrowOnError extends boolean = false>(options?: () => Options<ServiceWithEmptyTagData, ThrowOnError> | undefined) {\n        return httpResource<unknown>(() => {\n            const opts = options ? options() : undefined;\n            return opts ? inject(DefaultServiceRequests).serviceWithEmptyTag(opts) : undefined;\n        });\n    }\n    \n    public patchApiVbyApiVersionNoTag<ThrowOnError extends boolean = false>(options?: () => Options<PatchApiVbyApiVersionNoTagData, ThrowOnError> | undefined) {\n        return httpResource<unknown>(() => {\n            const opts = options ? options() : undefined;\n            return opts ? inject(DefaultServiceRequests).patchApiVbyApiVersionNoTag(opts) : undefined;\n        });\n    }\n    \n    public fooWow<ThrowOnError extends boolean = false>(options?: () => Options<FooWowData, ThrowOnError> | undefined) {\n        return httpResource<unknown>(() => {\n            const opts = options ? options() : undefined;\n            return opts ? inject(DefaultServiceRequests).fooWow(opts) : undefined;\n        });\n    }\n    \n    /**\n     * Body should not be unknown\n     *\n     * Body should not be unknown\n     */\n    public postApiVbyApiVersionBody<ThrowOnError extends boolean = false>(options: () => Options<PostApiVbyApiVersionBodyData, ThrowOnError> | undefined) {\n        return httpResource<PostApiVbyApiVersionBodyResponse>(() => {\n            const opts = options ? options() : undefined;\n            return opts ? inject(DefaultServiceRequests).postApiVbyApiVersionBody(opts) : undefined;\n        });\n    }\n}\n\n@Injectable({ providedIn: 'root' })\nexport class SimpleServiceResources {\n    public deleteCallWithoutParametersAndResponse<ThrowOnError extends boolean = false>(options?: () => Options<DeleteCallWithoutParametersAndResponseData, ThrowOnError> | undefined) {\n        return httpResource<unknown>(() => {\n            const opts = options ? options() : undefined;\n            return opts ? inject(SimpleServiceRequests).deleteCallWithoutParametersAndResponse(opts) : undefined;\n        });\n    }\n    \n    public getCallWithoutParametersAndResponse<ThrowOnError extends boolean = false>(options?: () => Options<GetCallWithoutParametersAndResponseData, ThrowOnError> | undefined) {\n        return httpResource<unknown>(() => {\n            const opts = options ? options() : undefined;\n            return opts ? inject(SimpleServiceRequests).getCallWithoutParametersAndResponse(opts) : undefined;\n        });\n    }\n    \n    public headCallWithoutParametersAndResponse<ThrowOnError extends boolean = false>(options?: () => Options<HeadCallWithoutParametersAndResponseData, ThrowOnError> | undefined) {\n        return httpResource<unknown>(() => {\n            const opts = options ? options() : undefined;\n            return opts ? inject(SimpleServiceRequests).headCallWithoutParametersAndResponse(opts) : undefined;\n        });\n    }\n    \n    public optionsCallWithoutParametersAndResponse<ThrowOnError extends boolean = false>(options?: () => Options<OptionsCallWithoutParametersAndResponseData, ThrowOnError> | undefined) {\n        return httpResource<unknown>(() => {\n            const opts = options ? options() : undefined;\n            return opts ? inject(SimpleServiceRequests).optionsCallWithoutParametersAndResponse(opts) : undefined;\n        });\n    }\n    \n    public patchCallWithoutParametersAndResponse<ThrowOnError extends boolean = false>(options?: () => Options<PatchCallWithoutParametersAndResponseData, ThrowOnError> | undefined) {\n        return httpResource<unknown>(() => {\n            const opts = options ? options() : undefined;\n            return opts ? inject(SimpleServiceRequests).patchCallWithoutParametersAndResponse(opts) : undefined;\n        });\n    }\n    \n    public postCallWithoutParametersAndResponse<ThrowOnError extends boolean = false>(options?: () => Options<PostCallWithoutParametersAndResponseData, ThrowOnError> | undefined) {\n        return httpResource<unknown>(() => {\n            const opts = options ? options() : undefined;\n            return opts ? inject(SimpleServiceRequests).postCallWithoutParametersAndResponse(opts) : undefined;\n        });\n    }\n    \n    public putCallWithoutParametersAndResponse<ThrowOnError extends boolean = false>(options?: () => Options<PutCallWithoutParametersAndResponseData, ThrowOnError> | undefined) {\n        return httpResource<unknown>(() => {\n            const opts = options ? options() : undefined;\n            return opts ? inject(SimpleServiceRequests).putCallWithoutParametersAndResponse(opts) : undefined;\n        });\n    }\n}\n\n@Injectable({ providedIn: 'root' })\nexport class DescriptionsServiceResources {\n    public callWithDescriptions<ThrowOnError extends boolean = false>(options?: () => Options<CallWithDescriptionsData, ThrowOnError> | undefined) {\n        return httpResource<unknown>(() => {\n            const opts = options ? options() : undefined;\n            return opts ? inject(DescriptionsServiceRequests).callWithDescriptions(opts) : undefined;\n        });\n    }\n}\n\n@Injectable({ providedIn: 'root' })\nexport class ParametersServiceResources {\n    public callWithParameters<ThrowOnError extends boolean = false>(options: () => Options<CallWithParametersData, ThrowOnError> | undefined) {\n        return httpResource<unknown>(() => {\n            const opts = options ? options() : undefined;\n            return opts ? inject(ParametersServiceRequests).callWithParameters(opts) : undefined;\n        });\n    }\n    \n    public callWithWeirdParameterNames<ThrowOnError extends boolean = false>(options: () => Options<CallWithWeirdParameterNamesData, ThrowOnError> | undefined) {\n        return httpResource<unknown>(() => {\n            const opts = options ? options() : undefined;\n            return opts ? inject(ParametersServiceRequests).callWithWeirdParameterNames(opts) : undefined;\n        });\n    }\n}\n\n@Injectable({ providedIn: 'root' })\nexport class DefaultsServiceResources {\n    public callWithDefaultParameters<ThrowOnError extends boolean = false>(options: () => Options<CallWithDefaultParametersData, ThrowOnError> | undefined) {\n        return httpResource<unknown>(() => {\n            const opts = options ? options() : undefined;\n            return opts ? inject(DefaultsServiceRequests).callWithDefaultParameters(opts) : undefined;\n        });\n    }\n    \n    public callWithDefaultOptionalParameters<ThrowOnError extends boolean = false>(options?: () => Options<CallWithDefaultOptionalParametersData, ThrowOnError> | undefined) {\n        return httpResource<unknown>(() => {\n            const opts = options ? options() : undefined;\n            return opts ? inject(DefaultsServiceRequests).callWithDefaultOptionalParameters(opts) : undefined;\n        });\n    }\n    \n    public callToTestOrderOfParams<ThrowOnError extends boolean = false>(options: () => Options<CallToTestOrderOfParamsData, ThrowOnError> | undefined) {\n        return httpResource<unknown>(() => {\n            const opts = options ? options() : undefined;\n            return opts ? inject(DefaultsServiceRequests).callToTestOrderOfParams(opts) : undefined;\n        });\n    }\n}\n\n@Injectable({ providedIn: 'root' })\nexport class DuplicateServiceResources {\n    public duplicateName<ThrowOnError extends boolean = false>(options?: () => Options<DuplicateNameData, ThrowOnError> | undefined) {\n        return httpResource<unknown>(() => {\n            const opts = options ? options() : undefined;\n            return opts ? inject(DuplicateServiceRequests).duplicateName(opts) : undefined;\n        });\n    }\n    \n    public duplicateName2<ThrowOnError extends boolean = false>(options?: () => Options<DuplicateName2Data, ThrowOnError> | undefined) {\n        return httpResource<unknown>(() => {\n            const opts = options ? options() : undefined;\n            return opts ? inject(DuplicateServiceRequests).duplicateName2(opts) : undefined;\n        });\n    }\n    \n    public duplicateName3<ThrowOnError extends boolean = false>(options?: () => Options<DuplicateName3Data, ThrowOnError> | undefined) {\n        return httpResource<unknown>(() => {\n            const opts = options ? options() : undefined;\n            return opts ? inject(DuplicateServiceRequests).duplicateName3(opts) : undefined;\n        });\n    }\n    \n    public duplicateName4<ThrowOnError extends boolean = false>(options?: () => Options<DuplicateName4Data, ThrowOnError> | undefined) {\n        return httpResource<unknown>(() => {\n            const opts = options ? options() : undefined;\n            return opts ? inject(DuplicateServiceRequests).duplicateName4(opts) : undefined;\n        });\n    }\n}\n\n@Injectable({ providedIn: 'root' })\nexport class NoContentServiceResources {\n    public callWithNoContentResponse<ThrowOnError extends boolean = false>(options?: () => Options<CallWithNoContentResponseData, ThrowOnError> | undefined) {\n        return httpResource<unknown>(() => {\n            const opts = options ? options() : undefined;\n            return opts ? inject(NoContentServiceRequests).callWithNoContentResponse(opts) : undefined;\n        });\n    }\n    \n    public callWithResponseAndNoContentResponse<ThrowOnError extends boolean = false>(options?: () => Options<CallWithResponseAndNoContentResponseData, ThrowOnError> | undefined) {\n        return httpResource<CallWithResponseAndNoContentResponseResponse>(() => {\n            const opts = options ? options() : undefined;\n            return opts ? inject(NoContentServiceRequests).callWithResponseAndNoContentResponse(opts) : undefined;\n        });\n    }\n}\n\n@Injectable({ providedIn: 'root' })\nexport class ResponseServiceResources {\n    public callWithResponseAndNoContentResponse<ThrowOnError extends boolean = false>(options?: () => Options<CallWithResponseAndNoContentResponseData, ThrowOnError> | undefined) {\n        return httpResource<CallWithResponseAndNoContentResponseResponse>(() => {\n            const opts = options ? options() : undefined;\n            return opts ? inject(NoContentServiceRequests).callWithResponseAndNoContentResponse(opts) : undefined;\n        });\n    }\n    \n    public callWithResponse<ThrowOnError extends boolean = false>(options?: () => Options<CallWithResponseData, ThrowOnError> | undefined) {\n        return httpResource<CallWithResponseResponse>(() => {\n            const opts = options ? options() : undefined;\n            return opts ? inject(ResponseServiceRequests).callWithResponse(opts) : undefined;\n        });\n    }\n    \n    public callWithDuplicateResponses<ThrowOnError extends boolean = false>(options?: () => Options<CallWithDuplicateResponsesData, ThrowOnError> | undefined) {\n        return httpResource<CallWithDuplicateResponsesResponse>(() => {\n            const opts = options ? options() : undefined;\n            return opts ? inject(ResponseServiceRequests).callWithDuplicateResponses(opts) : undefined;\n        });\n    }\n    \n    public callWithResponses<ThrowOnError extends boolean = false>(options?: () => Options<CallWithResponsesData, ThrowOnError> | undefined) {\n        return httpResource<CallWithResponsesResponse>(() => {\n            const opts = options ? options() : undefined;\n            return opts ? inject(ResponseServiceRequests).callWithResponses(opts) : undefined;\n        });\n    }\n}\n\n@Injectable({ providedIn: 'root' })\nexport class MultipleTags1ServiceResources {\n    public dummyA<ThrowOnError extends boolean = false>(options?: () => Options<DummyAData, ThrowOnError> | undefined) {\n        return httpResource<unknown>(() => {\n            const opts = options ? options() : undefined;\n            return opts ? inject(MultipleTags1ServiceRequests).dummyA(opts) : undefined;\n        });\n    }\n    \n    public dummyB<ThrowOnError extends boolean = false>(options?: () => Options<DummyBData, ThrowOnError> | undefined) {\n        return httpResource<unknown>(() => {\n            const opts = options ? options() : undefined;\n            return opts ? inject(MultipleTags1ServiceRequests).dummyB(opts) : undefined;\n        });\n    }\n}\n\n@Injectable({ providedIn: 'root' })\nexport class MultipleTags2ServiceResources {\n    public dummyA<ThrowOnError extends boolean = false>(options?: () => Options<DummyAData, ThrowOnError> | undefined) {\n        return httpResource<unknown>(() => {\n            const opts = options ? options() : undefined;\n            return opts ? inject(MultipleTags1ServiceRequests).dummyA(opts) : undefined;\n        });\n    }\n    \n    public dummyB<ThrowOnError extends boolean = false>(options?: () => Options<DummyBData, ThrowOnError> | undefined) {\n        return httpResource<unknown>(() => {\n            const opts = options ? options() : undefined;\n            return opts ? inject(MultipleTags1ServiceRequests).dummyB(opts) : undefined;\n        });\n    }\n}\n\n@Injectable({ providedIn: 'root' })\nexport class MultipleTags3ServiceResources {\n    public dummyB<ThrowOnError extends boolean = false>(options?: () => Options<DummyBData, ThrowOnError> | undefined) {\n        return httpResource<unknown>(() => {\n            const opts = options ? options() : undefined;\n            return opts ? inject(MultipleTags1ServiceRequests).dummyB(opts) : undefined;\n        });\n    }\n}\n\n@Injectable({ providedIn: 'root' })\nexport class CollectionFormatServiceResources {\n    public collectionFormat<ThrowOnError extends boolean = false>(options: () => Options<CollectionFormatData, ThrowOnError> | undefined) {\n        return httpResource<unknown>(() => {\n            const opts = options ? options() : undefined;\n            return opts ? inject(CollectionFormatServiceRequests).collectionFormat(opts) : undefined;\n        });\n    }\n}\n\n@Injectable({ providedIn: 'root' })\nexport class TypesServiceResources {\n    public types<ThrowOnError extends boolean = false>(options: () => Options<TypesData, ThrowOnError> | undefined) {\n        return httpResource<TypesResponse>(() => {\n            const opts = options ? options() : undefined;\n            return opts ? inject(TypesServiceRequests).types(opts) : undefined;\n        });\n    }\n}\n\n@Injectable({ providedIn: 'root' })\nexport class ComplexServiceResources {\n    public complexTypes<ThrowOnError extends boolean = false>(options: () => Options<ComplexTypesData, ThrowOnError> | undefined) {\n        return httpResource<ComplexTypesResponse>(() => {\n            const opts = options ? options() : undefined;\n            return opts ? inject(ComplexServiceRequests).complexTypes(opts) : undefined;\n        });\n    }\n}\n\n@Injectable({ providedIn: 'root' })\nexport class HeaderServiceResources {\n    public callWithResultFromHeader<ThrowOnError extends boolean = false>(options?: () => Options<CallWithResultFromHeaderData, ThrowOnError> | undefined) {\n        return httpResource<unknown>(() => {\n            const opts = options ? options() : undefined;\n            return opts ? inject(HeaderServiceRequests).callWithResultFromHeader(opts) : undefined;\n        });\n    }\n}\n\n@Injectable({ providedIn: 'root' })\nexport class ErrorServiceResources {\n    public testErrorCode<ThrowOnError extends boolean = false>(options: () => Options<TestErrorCodeData, ThrowOnError> | undefined) {\n        return httpResource<unknown>(() => {\n            const opts = options ? options() : undefined;\n            return opts ? inject(ErrorServiceRequests).testErrorCode(opts) : undefined;\n        });\n    }\n}\n\n@Injectable({ providedIn: 'root' })\nexport class NonAsciiÆøåÆøÅöôêÊServiceResources {\n    public nonAsciiæøåÆøÅöôêÊ字符串<ThrowOnError extends boolean = false>(options: () => Options<NonAsciiæøåÆøÅöôêÊ字符串Data, ThrowOnError> | undefined) {\n        return httpResource<NonAsciiæøåÆøÅöôêÊ字符串Response>(() => {\n            const opts = options ? options() : undefined;\n            return opts ? inject(NonAsciiÆøåÆøÅöôêÊServiceRequests).nonAsciiæøåÆøÅöôêÊ字符串(opts) : undefined;\n        });\n    }\n}\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@angular/common/default-class/client/client.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { HttpResponse } from '@angular/common/http';\nimport { HttpClient, HttpErrorResponse, HttpEventType, HttpRequest } from '@angular/common/http';\nimport {\n  assertInInjectionContext,\n  inject,\n  provideAppInitializer,\n  runInInjectionContext,\n} from '@angular/core';\nimport { firstValueFrom } from 'rxjs';\nimport { filter } from 'rxjs/operators';\n\nimport { createSseClient } from '../core/serverSentEvents.gen';\nimport type { HttpMethod } from '../core/types.gen';\nimport { getValidRequestBody } from '../core/utils.gen';\nimport type {\n  Client,\n  Config,\n  RequestOptions,\n  ResolvedRequestOptions,\n  ResponseStyle,\n} from './types.gen';\nimport {\n  buildUrl,\n  createConfig,\n  createInterceptors,\n  mergeConfigs,\n  mergeHeaders,\n  setAuthParams,\n} from './utils.gen';\n\nexport function provideHeyApiClient(client: Client) {\n  return provideAppInitializer(() => {\n    const httpClient = inject(HttpClient);\n    client.setConfig({ httpClient });\n  });\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<\n    HttpRequest<unknown>,\n    HttpResponse<unknown>,\n    unknown,\n    ResolvedRequestOptions\n  >();\n\n  const requestOptions = <\n    TData = unknown,\n    ThrowOnError extends boolean = false,\n    TResponseStyle extends ResponseStyle = 'fields',\n  >(\n    options: RequestOptions<TData, TResponseStyle, ThrowOnError>,\n  ) => {\n    const opts = {\n      ..._config,\n      ...options,\n      headers: mergeHeaders(_config.headers, options.headers),\n      httpClient: options.httpClient ?? _config.httpClient,\n      serializedBody: undefined as string | undefined,\n    };\n\n    if (!opts.httpClient) {\n      if (opts.injector) {\n        opts.httpClient = runInInjectionContext(opts.injector, () => inject(HttpClient));\n      } else {\n        assertInInjectionContext(requestOptions);\n        opts.httpClient = inject(HttpClient);\n      }\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 url = buildUrl(opts as any);\n\n    const req = new HttpRequest<unknown>(opts.method ?? 'GET', url, getValidRequestBody(opts), {\n      redirect: 'follow',\n      ...opts,\n    });\n\n    return { opts, req, url };\n  };\n\n  const beforeRequest = async (options: RequestOptions) => {\n    const { opts, req, url } = requestOptions(options);\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    return { opts, req, url };\n  };\n\n  const request: Client['request'] = async (options) => {\n    // @ts-expect-error\n    const { opts, req: initialReq } = await beforeRequest(options);\n\n    let req = initialReq;\n\n    for (const fn of interceptors.request.fns) {\n      if (fn) {\n        req = await fn(req, opts as any);\n      }\n    }\n\n    const result: {\n      request: HttpRequest<unknown>;\n      response: any;\n    } = {\n      request: req,\n      response: null,\n    };\n\n    try {\n      result.response = (await firstValueFrom(\n        opts\n          .httpClient!.request(req)\n          .pipe(filter((event) => event.type === HttpEventType.Response)),\n      )) as HttpResponse<unknown>;\n\n      for (const fn of interceptors.response.fns) {\n        if (fn) {\n          result.response = await fn(result.response, req, opts as any);\n        }\n      }\n\n      let bodyResponse = result.response.body;\n\n      if (opts.responseValidator) {\n        await opts.responseValidator(bodyResponse);\n      }\n\n      if (opts.responseTransformer) {\n        bodyResponse = await opts.responseTransformer(bodyResponse);\n      }\n\n      return opts.responseStyle === 'data' ? bodyResponse : { data: bodyResponse, ...result };\n    } catch (error) {\n      if (error instanceof HttpErrorResponse) {\n        result.response = error;\n      }\n\n      let finalError = error instanceof HttpErrorResponse ? error.error : error;\n\n      for (const fn of interceptors.error.fns) {\n        if (fn) {\n          finalError = (await fn(finalError, result.response as any, req, opts as any)) as string;\n        }\n      }\n\n      if (opts.throwOnError) {\n        throw finalError;\n      }\n\n      return opts.responseStyle === 'data'\n        ? undefined\n        : {\n            error: finalError,\n            ...result,\n          };\n    }\n  };\n\n  const makeMethodFn = (method: Uppercase<HttpMethod>) => (options: RequestOptions) =>\n    request({ ...options, method });\n\n  const makeSseFn = (method: Uppercase<HttpMethod>) => async (options: RequestOptions) => {\n    const { opts, url } = await beforeRequest(options);\n    return createSseClient({\n      ...opts,\n      body: opts.body as BodyInit | null | undefined,\n      headers: opts.headers as unknown as Record<string, string>,\n      method,\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    requestOptions: (options) => {\n      if (options.security) {\n        throw new Error('Security is not supported in requestOptions');\n      }\n\n      if (options.requestValidator) {\n        throw new Error('Request validation is not supported in requestOptions');\n      }\n\n      return requestOptions(options).req;\n    },\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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@angular/common/default-class/client/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type { Auth } from '../core/auth.gen';\nexport type { QuerySerializerOptions } from '../core/bodySerializer.gen';\nexport {\n  formDataBodySerializer,\n  jsonBodySerializer,\n  urlSearchParamsBodySerializer,\n} from '../core/bodySerializer.gen';\nexport { buildClientParams } from '../core/params.gen';\nexport { serializeQueryKeyValue } from '../core/queryKeySerializer.gen';\nexport { createClient } from './client.gen';\nexport type {\n  Client,\n  ClientOptions,\n  Config,\n  CreateClientConfig,\n  Options,\n  RequestOptions,\n  RequestResult,\n  ResolvedRequestOptions,\n  ResponseStyle,\n  TDataShape,\n} from './types.gen';\nexport { createConfig, mergeHeaders } from './utils.gen';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@angular/common/default-class/client/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type {\n  HttpClient,\n  HttpErrorResponse,\n  HttpHeaders,\n  HttpRequest,\n  HttpResponse,\n} from '@angular/common/http';\nimport type { Injector } from '@angular/core';\n\nimport type { Auth } from '../core/auth.gen';\nimport type {\n  ServerSentEventsOptions,\n  ServerSentEventsResult,\n} from '../core/serverSentEvents.gen';\nimport type { Client as CoreClient, Config as CoreConfig } from '../core/types.gen';\nimport type { Middleware } from './utils.gen';\n\nexport type ResponseStyle = 'data' | 'fields';\n\nexport interface Config<T extends ClientOptions = ClientOptions>\n  extends Omit<RequestInit, 'body' | 'headers' | 'method'>, Omit<CoreConfig, 'headers'> {\n  /**\n   * Base URL for all requests made by this client.\n   */\n  baseUrl?: T['baseUrl'];\n  /**\n   * An object containing any HTTP headers that you want to pre-populate your\n   * `HttpHeaders` object with.\n   *\n   * {@link https://angular.dev/api/common/http/HttpHeaders#constructor See more}\n   */\n  headers?:\n    | HttpHeaders\n    | Record<\n        string,\n        string | number | boolean | (string | number | boolean)[] | null | undefined | unknown\n      >;\n  /**\n   * The HTTP client to use for making requests.\n   */\n  httpClient?: HttpClient;\n  /**\n   * Should we return only data or multiple fields (data, error, response, etc.)?\n   *\n   * @default 'fields'\n   */\n  responseStyle?: ResponseStyle;\n\n  /**\n   * Throw an error instead of returning it in the response?\n   *\n   * @default false\n   */\n  throwOnError?: T['throwOnError'];\n}\n\nexport interface RequestOptions<\n  TData = unknown,\n  TResponseStyle extends ResponseStyle = 'fields',\n  ThrowOnError extends boolean = boolean,\n  Url extends string = string,\n>\n  extends\n    Config<{\n      responseStyle: TResponseStyle;\n      throwOnError: ThrowOnError;\n    }>,\n    Pick<\n      ServerSentEventsOptions<TData>,\n      | 'onRequest'\n      | 'onSseError'\n      | 'onSseEvent'\n      | 'sseDefaultRetryDelay'\n      | 'sseMaxRetryAttempts'\n      | 'sseMaxRetryDelay'\n    > {\n  /**\n   * Any body that you want to add to your request.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/fetch#body}\n   */\n  body?: unknown;\n  /**\n   * Optional custom injector for dependency resolution if you don't implicitly or explicitly provide one.\n   */\n  injector?: Injector;\n  path?: Record<string, unknown>;\n  query?: Record<string, unknown>;\n  /**\n   * Security mechanism(s) to use for the request.\n   */\n  security?: ReadonlyArray<Auth>;\n  url: Url;\n}\n\nexport interface ResolvedRequestOptions<\n  TResponseStyle extends ResponseStyle = 'fields',\n  ThrowOnError extends boolean = boolean,\n  Url extends string = string,\n> extends RequestOptions<unknown, TResponseStyle, ThrowOnError, Url> {\n  serializedBody?: string;\n}\n\nexport type RequestResult<\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = boolean,\n  TResponseStyle extends ResponseStyle = 'fields',\n> = Promise<\n  ThrowOnError extends true\n    ? TResponseStyle extends 'data'\n      ? TData extends Record<string, unknown>\n        ? TData[keyof TData]\n        : TData\n      : {\n          data: TData extends Record<string, unknown> ? TData[keyof TData] : TData;\n          request: HttpRequest<unknown>;\n          response: HttpResponse<TData>;\n        }\n    : TResponseStyle extends 'data'\n      ? (TData extends Record<string, unknown> ? TData[keyof TData] : TData) | undefined\n      :\n          | {\n              data: TData extends Record<string, unknown> ? TData[keyof TData] : TData;\n              error: undefined;\n              request: HttpRequest<unknown>;\n              response: HttpResponse<TData>;\n            }\n          | {\n              data: undefined;\n              error: TError[keyof TError];\n              request: HttpRequest<unknown>;\n              response: HttpErrorResponse & {\n                error: TError[keyof TError] | null;\n              };\n            }\n>;\n\nexport interface ClientOptions {\n  baseUrl?: string;\n  responseStyle?: ResponseStyle;\n  throwOnError?: boolean;\n}\n\ntype MethodFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'>,\n) => RequestResult<TData, TError, ThrowOnError, TResponseStyle>;\n\ntype SseFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'>,\n) => Promise<ServerSentEventsResult<TData, TError>>;\n\ntype RequestFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'> &\n    Pick<Required<RequestOptions<TData, TResponseStyle, ThrowOnError>>, 'method'>,\n) => RequestResult<TData, TError, ThrowOnError, TResponseStyle>;\n\ntype RequestOptionsFn = <\n  T,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: RequestOptions<T, TResponseStyle, ThrowOnError>,\n) => HttpRequest<T>;\n\ntype BuildUrlFn = <\n  TData extends {\n    body?: unknown;\n    path?: Record<string, unknown>;\n    query?: Record<string, unknown>;\n    url: string;\n  },\n>(\n  options: TData & Options<TData>,\n) => string;\n\nexport type Client = CoreClient<RequestFn, Config, MethodFn, BuildUrlFn, SseFn> & {\n  interceptors: Middleware<\n    HttpRequest<unknown>,\n    HttpResponse<unknown>,\n    unknown,\n    ResolvedRequestOptions\n  >;\n  requestOptions: RequestOptionsFn;\n};\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 = ClientOptions> = (\n  override?: Config<ClientOptions & T>,\n) => Config<Required<ClientOptions> & T>;\n\nexport interface TDataShape {\n  body?: unknown;\n  headers?: unknown;\n  path?: unknown;\n  query?: unknown;\n  url: string;\n}\n\ntype OmitKeys<T, K> = Pick<T, Exclude<keyof T, K>>;\n\nexport type Options<\n  TData extends TDataShape = TDataShape,\n  ThrowOnError extends boolean = boolean,\n  TResponse = unknown,\n  TResponseStyle extends ResponseStyle = 'fields',\n> = OmitKeys<\n  RequestOptions<TResponse, TResponseStyle, ThrowOnError>,\n  'body' | 'path' | 'query' | 'url'\n> &\n  ([TData] extends [never] ? unknown : Omit<TData, 'url'>);\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@angular/common/default-class/client/utils.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport { HttpHeaders } from '@angular/common/http';\n\nimport { getAuthToken } from '../core/auth.gen';\nimport type {\n  QuerySerializer,\n  QuerySerializerOptions,\n} from '../core/bodySerializer.gen';\nimport {\n  serializeArrayParam,\n  serializeObjectParam,\n  serializePrimitiveParam,\n} from '../core/pathSerializer.gen';\nimport type { Client, ClientOptions, Config, RequestOptions } from './types.gen';\n\ninterface PathSerializer {\n  path: Record<string, unknown>;\n  url: string;\n}\n\nconst PATH_PARAM_RE = /\\{[^{}]+\\}/g;\n\ntype ArrayStyle = 'form' | 'spaceDelimited' | 'pipeDelimited';\ntype MatrixStyle = 'label' | 'matrix' | 'simple';\ntype ArraySeparatorStyle = ArrayStyle | MatrixStyle;\n\nconst 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 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 = (\n  contentType: string | null,\n): 'blob' | 'formData' | 'json' | 'stream' | 'text' | undefined => {\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\nexport const setAuthParams = async (\n  options: Pick<Required<RequestOptions>, 'security'> &\n    Pick<RequestOptions, 'auth' | 'query'> & {\n      headers: HttpHeaders;\n    },\n) => {\n  for (const auth of options.security) {\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 = options.headers.append('Cookie', `${name}=${token}`);\n        break;\n      case 'header':\n      default:\n        options.headers = options.headers.set(name, token);\n        break;\n    }\n\n    return;\n  }\n};\n\nexport const buildUrl: Client['buildUrl'] = (options) => {\n  const url = 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  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 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\nexport const mergeHeaders = (\n  ...headers: Array<Required<Config>['headers'] | undefined>\n): HttpHeaders => {\n  let mergedHeaders = new HttpHeaders();\n\n  for (const header of headers) {\n    if (!header || typeof header !== 'object') {\n      continue;\n    }\n\n    if (header instanceof HttpHeaders) {\n      // Merge HttpHeaders instance\n      header.keys().forEach((key) => {\n        const values = header.getAll(key);\n        if (values) {\n          values.forEach((value) => {\n            mergedHeaders = mergedHeaders.append(key, value);\n          });\n        }\n      });\n    } else {\n      // Merge plain object headers\n      for (const [key, value] of Object.entries(header)) {\n        if (value === null) {\n          mergedHeaders = mergedHeaders.delete(key);\n        } else if (Array.isArray(value)) {\n          for (const v of value) {\n            mergedHeaders = 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 = mergedHeaders.set(\n            key,\n            typeof value === 'object' ? JSON.stringify(value) : (value as string),\n          );\n        }\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  headers: defaultHeaders,\n  querySerializer: defaultQuerySerializer,\n  ...override,\n});\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@angular/common/default-class/client.gen.ts",
    "content": "// 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: 'http://localhost:3000/base' }));\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@angular/common/default-class/core/auth.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@angular/common/default-class/core/bodySerializer.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@angular/common/default-class/core/params.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@angular/common/default-class/core/pathSerializer.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@angular/common/default-class/core/queryKeySerializer.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\n/**\n * JSON-friendly union that mirrors what Pinia Colada can hash.\n */\nexport type JsonValue =\n  | null\n  | string\n  | number\n  | boolean\n  | JsonValue[]\n  | { [key: string]: JsonValue };\n\n/**\n * Replacer that converts non-JSON values (bigint, Date, etc.) to safe substitutes.\n */\nexport const queryKeyJsonReplacer = (_key: string, value: unknown) => {\n  if (value === undefined || typeof value === 'function' || typeof value === 'symbol') {\n    return undefined;\n  }\n  if (typeof value === 'bigint') {\n    return value.toString();\n  }\n  if (value instanceof Date) {\n    return value.toISOString();\n  }\n  return value;\n};\n\n/**\n * Safely stringifies a value and parses it back into a JsonValue.\n */\nexport const stringifyToJsonValue = (input: unknown): JsonValue | undefined => {\n  try {\n    const json = JSON.stringify(input, queryKeyJsonReplacer);\n    if (json === undefined) {\n      return undefined;\n    }\n    return JSON.parse(json) as JsonValue;\n  } catch {\n    return undefined;\n  }\n};\n\n/**\n * Detects plain objects (including objects with a null prototype).\n */\nconst isPlainObject = (value: unknown): value is Record<string, unknown> => {\n  if (value === null || typeof value !== 'object') {\n    return false;\n  }\n  const prototype = Object.getPrototypeOf(value as object);\n  return prototype === Object.prototype || prototype === null;\n};\n\n/**\n * Turns URLSearchParams into a sorted JSON object for deterministic keys.\n */\nconst serializeSearchParams = (params: URLSearchParams): JsonValue => {\n  const entries = Array.from(params.entries()).sort(([a], [b]) => a.localeCompare(b));\n  const result: Record<string, JsonValue> = {};\n\n  for (const [key, value] of entries) {\n    const existing = result[key];\n    if (existing === undefined) {\n      result[key] = value;\n      continue;\n    }\n\n    if (Array.isArray(existing)) {\n      (existing as string[]).push(value);\n    } else {\n      result[key] = [existing, value];\n    }\n  }\n\n  return result;\n};\n\n/**\n * Normalizes any accepted value into a JSON-friendly shape for query keys.\n */\nexport const serializeQueryKeyValue = (value: unknown): JsonValue | undefined => {\n  if (value === null) {\n    return null;\n  }\n\n  if (typeof value === 'string' || typeof value === 'number' || typeof value === 'boolean') {\n    return value;\n  }\n\n  if (value === undefined || typeof value === 'function' || typeof value === 'symbol') {\n    return undefined;\n  }\n\n  if (typeof value === 'bigint') {\n    return value.toString();\n  }\n\n  if (value instanceof Date) {\n    return value.toISOString();\n  }\n\n  if (Array.isArray(value)) {\n    return stringifyToJsonValue(value);\n  }\n\n  if (typeof URLSearchParams !== 'undefined' && value instanceof URLSearchParams) {\n    return serializeSearchParams(value);\n  }\n\n  if (isPlainObject(value)) {\n    return stringifyToJsonValue(value);\n  }\n\n  return undefined;\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@angular/common/default-class/core/serverSentEvents.gen.ts",
    "content": "// 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 const 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            // Normalize line endings: CRLF -> LF, then CR -> LF\n            buffer = buffer.replace(/\\r\\n/g, '\\n').replace(/\\r/g, '\\n');\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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@angular/common/default-class/core/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { Auth, AuthToken } from './auth.gen';\nimport type { BodySerializer, QuerySerializer, QuerySerializerOptions } from './bodySerializer.gen';\n\nexport type HttpMethod =\n  | 'connect'\n  | 'delete'\n  | 'get'\n  | 'head'\n  | 'options'\n  | 'patch'\n  | 'post'\n  | 'put'\n  | 'trace';\n\nexport type Client<\n  RequestFn = never,\n  Config = unknown,\n  MethodFn = never,\n  BuildUrlFn = never,\n  SseFn = never,\n> = {\n  /**\n   * Returns the final request URL.\n   */\n  buildUrl: BuildUrlFn;\n  getConfig: () => Config;\n  request: RequestFn;\n  setConfig: (config: Config) => Config;\n} & {\n  [K in HttpMethod]: MethodFn;\n} & ([SseFn] extends [never] ? { sse?: never } : { sse: { [K in HttpMethod]: SseFn } });\n\nexport interface Config {\n  /**\n   * Auth token or a function returning auth token. The resolved value will be\n   * added to the request payload as defined by its `security` array.\n   */\n  auth?: ((auth: Auth) => Promise<AuthToken> | AuthToken) | AuthToken;\n  /**\n   * A function for serializing request body parameter. By default,\n   * {@link JSON.stringify()} will be used.\n   */\n  bodySerializer?: BodySerializer | null;\n  /**\n   * An object containing any HTTP headers that you want to pre-populate your\n   * `Headers` object with.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/Headers/Headers#init See more}\n   */\n  headers?:\n    | RequestInit['headers']\n    | Record<\n        string,\n        string | number | boolean | (string | number | boolean)[] | null | undefined | unknown\n      >;\n  /**\n   * The request method.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/fetch#method See more}\n   */\n  method?: Uppercase<HttpMethod>;\n  /**\n   * A function for serializing request query parameters. By default, arrays\n   * will be exploded in form style, objects will be exploded in deepObject\n   * style, and reserved characters are percent-encoded.\n   *\n   * This method will have no effect if the native `paramsSerializer()` Axios\n   * API function is used.\n   *\n   * {@link https://swagger.io/docs/specification/serialization/#query View examples}\n   */\n  querySerializer?: QuerySerializer | QuerySerializerOptions;\n  /**\n   * A function validating request data. This is useful if you want to ensure\n   * the request conforms to the desired shape, so it can be safely sent to\n   * the server.\n   */\n  requestValidator?: (data: unknown) => Promise<unknown>;\n  /**\n   * A function transforming response data before it's returned. This is useful\n   * for post-processing data, e.g. converting ISO strings into Date objects.\n   */\n  responseTransformer?: (data: unknown) => Promise<unknown>;\n  /**\n   * A function validating response data. This is useful if you want to ensure\n   * the response conforms to the desired shape, so it can be safely passed to\n   * the transformers and returned to the user.\n   */\n  responseValidator?: (data: unknown) => Promise<unknown>;\n}\n\ntype IsExactlyNeverOrNeverUndefined<T> = [T] extends [never]\n  ? true\n  : [T] extends [never | undefined]\n    ? [undefined] extends [T]\n      ? false\n      : true\n    : false;\n\nexport type OmitNever<T extends Record<string, unknown>> = {\n  [K in keyof T as IsExactlyNeverOrNeverUndefined<T[K]> extends true ? never : K]: T[K];\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@angular/common/default-class/core/utils.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@angular/common/default-class/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport { callToTestOrderOfParams, callWithDefaultOptionalParameters, callWithDefaultParameters, callWithDescriptions, callWithDuplicateResponses, callWithNoContentResponse, callWithParameters, callWithResponse, callWithResponseAndNoContentResponse, callWithResponses, callWithResultFromHeader, callWithWeirdParameterNames, collectionFormat, complexTypes, deleteCallWithoutParametersAndResponse, dummyA, dummyB, duplicateName, duplicateName2, duplicateName3, duplicateName4, fooWow, getCallWithoutParametersAndResponse, headCallWithoutParametersAndResponse, nonAsciiæøåÆøÅöôêÊ字符串, type Options, optionsCallWithoutParametersAndResponse, patchApiVbyApiVersionNoTag, patchCallWithoutParametersAndResponse, postApiVbyApiVersionBody, postCallWithoutParametersAndResponse, putCallWithoutParametersAndResponse, serviceWithEmptyTag, testErrorCode, types } from './sdk.gen';\nexport type { ArrayWithArray, ArrayWithBooleans, ArrayWithNumbers, ArrayWithProperties, ArrayWithReferences, ArrayWithStrings, CallToTestOrderOfParamsData, CallWithDefaultOptionalParametersData, CallWithDefaultParametersData, CallWithDescriptionsData, CallWithDuplicateResponsesData, CallWithDuplicateResponsesError, CallWithDuplicateResponsesErrors, CallWithDuplicateResponsesResponse, CallWithDuplicateResponsesResponses, CallWithNoContentResponseData, CallWithNoContentResponseResponses, CallWithParametersData, CallWithResponseAndNoContentResponseData, CallWithResponseAndNoContentResponseResponse, CallWithResponseAndNoContentResponseResponses, CallWithResponseData, CallWithResponseResponse, CallWithResponseResponses, CallWithResponsesData, CallWithResponsesError, CallWithResponsesErrors, CallWithResponsesResponse, CallWithResponsesResponses, CallWithResultFromHeaderData, CallWithResultFromHeaderErrors, CallWithResultFromHeaderResponses, CallWithWeirdParameterNamesData, ClientOptions, CollectionFormatData, CommentWithBackticks, CommentWithBackticksAndQuotes, CommentWithBreaks, CommentWithExpressionPlaceholders, CommentWithQuotes, CommentWithReservedCharacters, CommentWithSlashes, ComplexTypesData, ComplexTypesErrors, ComplexTypesResponse, ComplexTypesResponses, Date, Default, DeleteCallWithoutParametersAndResponseData, DictionaryWithArray, DictionaryWithDictionary, DictionaryWithProperties, DictionaryWithReference, DictionaryWithString, DummyAData, DummyAResponses, DummyBData, DummyBResponses, DuplicateName2Data, DuplicateName3Data, DuplicateName4Data, DuplicateNameData, EnumFromDescription, EnumWithExtensions, EnumWithNumbers, EnumWithStrings, ExternalRefA, ExternalRefB, ExternalSharedModel, FailureFailure, FooWowData, FooWowResponses, GetCallWithoutParametersAndResponseData, HeadCallWithoutParametersAndResponseData, ModelThatExtends, ModelThatExtendsExtends, ModelWithArray, ModelWithBoolean, ModelWithCircularReference, ModelWithDictionary, ModelWithDuplicateImports, ModelWithDuplicateProperties, ModelWithEnum, ModelWithEnumFromDescription, ModelWithInteger, ModelWithNestedEnums, ModelWithNestedProperties, ModelWithNullableString, ModelWithOrderedProperties, ModelWithPattern, ModelWithPatternWritable, ModelWithProperties, ModelWithPropertiesWritable, ModelWithReference, ModelWithReferenceWritable, ModelWithString, ModelWithStringError, NonAsciiæøåÆøÅöôêÊ字符串Data, NonAsciiæøåÆøÅöôêÊ字符串Response, NonAsciiæøåÆøÅöôêÊ字符串Responses, NonAsciiStringæøåÆøÅöôêÊ字符串, OptionsCallWithoutParametersAndResponseData, ParameterActivityParams, PatchApiVbyApiVersionNoTagData, PatchApiVbyApiVersionNoTagResponses, PatchCallWithoutParametersAndResponseData, PostApiVbyApiVersionBodyData, PostApiVbyApiVersionBodyError, PostApiVbyApiVersionBodyErrors, PostApiVbyApiVersionBodyResponse, PostApiVbyApiVersionBodyResponses, PostCallWithoutParametersAndResponseData, PutCallWithoutParametersAndResponseData, ResponsePostActivityResponse, ServiceWithEmptyTagData, SimpleBoolean, SimpleFile, SimpleInteger, SimpleReference, SimpleString, SimpleStringWithPattern, TestErrorCodeData, TestErrorCodeErrors, TestErrorCodeResponses, TypesData, TypesResponse, TypesResponses } from './types.gen';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@angular/common/default-class/sdk.gen.ts",
    "content": "// 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 { CallToTestOrderOfParamsData, CallWithDefaultOptionalParametersData, CallWithDefaultParametersData, CallWithDescriptionsData, CallWithDuplicateResponsesData, CallWithDuplicateResponsesErrors, CallWithDuplicateResponsesResponses, CallWithNoContentResponseData, CallWithNoContentResponseResponses, CallWithParametersData, CallWithResponseAndNoContentResponseData, CallWithResponseAndNoContentResponseResponses, CallWithResponseData, CallWithResponseResponses, CallWithResponsesData, CallWithResponsesErrors, CallWithResponsesResponses, CallWithResultFromHeaderData, CallWithResultFromHeaderErrors, CallWithResultFromHeaderResponses, CallWithWeirdParameterNamesData, CollectionFormatData, ComplexTypesData, ComplexTypesErrors, ComplexTypesResponses, DeleteCallWithoutParametersAndResponseData, DummyAData, DummyAResponses, DummyBData, DummyBResponses, DuplicateName2Data, DuplicateName3Data, DuplicateName4Data, DuplicateNameData, FooWowData, FooWowResponses, GetCallWithoutParametersAndResponseData, HeadCallWithoutParametersAndResponseData, NonAsciiæøåÆøÅöôêÊ字符串Data, NonAsciiæøåÆøÅöôêÊ字符串Responses, OptionsCallWithoutParametersAndResponseData, PatchApiVbyApiVersionNoTagData, PatchApiVbyApiVersionNoTagResponses, PatchCallWithoutParametersAndResponseData, PostApiVbyApiVersionBodyData, PostApiVbyApiVersionBodyErrors, PostApiVbyApiVersionBodyResponses, PostCallWithoutParametersAndResponseData, PutCallWithoutParametersAndResponseData, ServiceWithEmptyTagData, TestErrorCodeData, TestErrorCodeErrors, TestErrorCodeResponses, TypesData, TypesResponses } from './types.gen';\n\nexport type Options<TData extends TDataShape = TDataShape, ThrowOnError extends boolean = boolean> = Options2<TData, ThrowOnError> & {\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\nexport const serviceWithEmptyTag = <ThrowOnError extends boolean = false>(options?: Options<ServiceWithEmptyTagData, ThrowOnError>) => (options?.client ?? client).get<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/no+tag', ...options });\n\nexport const patchApiVbyApiVersionNoTag = <ThrowOnError extends boolean = false>(options?: Options<PatchApiVbyApiVersionNoTagData, ThrowOnError>) => (options?.client ?? client).patch<PatchApiVbyApiVersionNoTagResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/no+tag', ...options });\n\nexport const fooWow = <ThrowOnError extends boolean = false>(options?: Options<FooWowData, ThrowOnError>) => (options?.client ?? client).put<FooWowResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/no+tag', ...options });\n\nexport const deleteCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<DeleteCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).delete<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const getCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<GetCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).get<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const headCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<HeadCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).head<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const optionsCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<OptionsCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).options<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const patchCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<PatchCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).patch<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const postCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<PostCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).post<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const putCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<PutCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).put<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const callWithDescriptions = <ThrowOnError extends boolean = false>(options?: Options<CallWithDescriptionsData, ThrowOnError>) => (options?.client ?? client).post<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/descriptions/', ...options });\n\nexport const callWithParameters = <ThrowOnError extends boolean = false>(options: Options<CallWithParametersData, ThrowOnError>) => (options.client ?? client).post<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/parameters/{parameterPath}', ...options });\n\nexport const callWithWeirdParameterNames = <ThrowOnError extends boolean = false>(options: Options<CallWithWeirdParameterNamesData, ThrowOnError>) => (options.client ?? client).post<unknown, unknown, ThrowOnError>({\n    url: '/api/v{api-version}/parameters/{parameter.path.1}/{parameter-path-2}/{PARAMETER-PATH-3}',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options.headers\n    }\n});\n\nexport const callWithDefaultParameters = <ThrowOnError extends boolean = false>(options: Options<CallWithDefaultParametersData, ThrowOnError>) => (options.client ?? client).get<unknown, unknown, ThrowOnError>({\n    querySerializer: { parameters: { parameterModel: { object: { explode: false, style: 'form' } } } },\n    url: '/api/v{api-version}/defaults',\n    ...options\n});\n\nexport const callWithDefaultOptionalParameters = <ThrowOnError extends boolean = false>(options?: Options<CallWithDefaultOptionalParametersData, ThrowOnError>) => (options?.client ?? client).post<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/defaults', ...options });\n\nexport const callToTestOrderOfParams = <ThrowOnError extends boolean = false>(options: Options<CallToTestOrderOfParamsData, ThrowOnError>) => (options.client ?? client).put<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/defaults', ...options });\n\nexport const duplicateName = <ThrowOnError extends boolean = false>(options?: Options<DuplicateNameData, ThrowOnError>) => (options?.client ?? client).delete<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/duplicate', ...options });\n\nexport const duplicateName2 = <ThrowOnError extends boolean = false>(options?: Options<DuplicateName2Data, ThrowOnError>) => (options?.client ?? client).get<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/duplicate', ...options });\n\nexport const duplicateName3 = <ThrowOnError extends boolean = false>(options?: Options<DuplicateName3Data, ThrowOnError>) => (options?.client ?? client).post<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/duplicate', ...options });\n\nexport const duplicateName4 = <ThrowOnError extends boolean = false>(options?: Options<DuplicateName4Data, ThrowOnError>) => (options?.client ?? client).put<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/duplicate', ...options });\n\nexport const callWithNoContentResponse = <ThrowOnError extends boolean = false>(options?: Options<CallWithNoContentResponseData, ThrowOnError>) => (options?.client ?? client).get<CallWithNoContentResponseResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/no-content', ...options });\n\nexport const callWithResponseAndNoContentResponse = <ThrowOnError extends boolean = false>(options?: Options<CallWithResponseAndNoContentResponseData, ThrowOnError>) => (options?.client ?? client).get<CallWithResponseAndNoContentResponseResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/multiple-tags/response-and-no-content', ...options });\n\nexport const dummyA = <ThrowOnError extends boolean = false>(options?: Options<DummyAData, ThrowOnError>) => (options?.client ?? client).get<DummyAResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/multiple-tags/a', ...options });\n\nexport const dummyB = <ThrowOnError extends boolean = false>(options?: Options<DummyBData, ThrowOnError>) => (options?.client ?? client).get<DummyBResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/multiple-tags/b', ...options });\n\nexport const callWithResponse = <ThrowOnError extends boolean = false>(options?: Options<CallWithResponseData, ThrowOnError>) => (options?.client ?? client).get<CallWithResponseResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/response', ...options });\n\nexport const callWithDuplicateResponses = <ThrowOnError extends boolean = false>(options?: Options<CallWithDuplicateResponsesData, ThrowOnError>) => (options?.client ?? client).post<CallWithDuplicateResponsesResponses, CallWithDuplicateResponsesErrors, ThrowOnError>({ url: '/api/v{api-version}/response', ...options });\n\nexport const callWithResponses = <ThrowOnError extends boolean = false>(options?: Options<CallWithResponsesData, ThrowOnError>) => (options?.client ?? client).put<CallWithResponsesResponses, CallWithResponsesErrors, ThrowOnError>({ url: '/api/v{api-version}/response', ...options });\n\nexport const collectionFormat = <ThrowOnError extends boolean = false>(options: Options<CollectionFormatData, ThrowOnError>) => (options.client ?? client).get<unknown, unknown, ThrowOnError>({\n    querySerializer: { parameters: {\n            parameterArrayCSV: { array: { explode: false } },\n            parameterArraySSV: { array: { explode: false } },\n            parameterArrayTSV: { array: { explode: false } },\n            parameterArrayPipes: { array: { explode: false } }\n        } },\n    url: '/api/v{api-version}/collectionFormat',\n    ...options\n});\n\nexport const types = <ThrowOnError extends boolean = false>(options: Options<TypesData, ThrowOnError>) => (options.client ?? client).get<TypesResponses, unknown, ThrowOnError>({\n    querySerializer: { parameters: { parameterArray: { array: { explode: false } }, parameterDictionary: { object: { explode: false, style: 'form' } } } },\n    url: '/api/v{api-version}/types',\n    ...options\n});\n\nexport const complexTypes = <ThrowOnError extends boolean = false>(options: Options<ComplexTypesData, ThrowOnError>) => (options.client ?? client).get<ComplexTypesResponses, ComplexTypesErrors, ThrowOnError>({\n    querySerializer: { parameters: { parameterObject: { object: { explode: false, style: 'form' } }, parameterReference: { object: { explode: false, style: 'form' } } } },\n    url: '/api/v{api-version}/complex',\n    ...options\n});\n\nexport const callWithResultFromHeader = <ThrowOnError extends boolean = false>(options?: Options<CallWithResultFromHeaderData, ThrowOnError>) => (options?.client ?? client).post<CallWithResultFromHeaderResponses, CallWithResultFromHeaderErrors, ThrowOnError>({ url: '/api/v{api-version}/header', ...options });\n\nexport const testErrorCode = <ThrowOnError extends boolean = false>(options: Options<TestErrorCodeData, ThrowOnError>) => (options.client ?? client).post<TestErrorCodeResponses, TestErrorCodeErrors, ThrowOnError>({ url: '/api/v{api-version}/error', ...options });\n\nexport const nonAsciiæøåÆøÅöôêÊ字符串 = <ThrowOnError extends boolean = false>(options: Options<NonAsciiæøåÆøÅöôêÊ字符串Data, ThrowOnError>) => (options.client ?? client).post<NonAsciiæøåÆøÅöôêÊ字符串Responses, unknown, ThrowOnError>({ url: '/api/v{api-version}/non-ascii-æøåÆØÅöôêÊ字符串', ...options });\n\n/**\n * Body should not be unknown\n *\n * Body should not be unknown\n */\nexport const postApiVbyApiVersionBody = <ThrowOnError extends boolean = false>(options: Options<PostApiVbyApiVersionBodyData, ThrowOnError>) => (options.client ?? client).post<PostApiVbyApiVersionBodyResponses, PostApiVbyApiVersionBodyErrors, ThrowOnError>({\n    url: '/api/v{api-version}/body',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options.headers\n    }\n});\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@angular/common/default-class/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type ClientOptions = {\n    baseUrl: 'http://localhost:3000/base' | (string & {});\n};\n\nexport type ExternalRefA = ExternalSharedModel;\n\nexport type ExternalRefB = ExternalSharedModel;\n\n/**\n * Testing multiline comments in string: First line\n * Second line\n *\n * Fourth line\n */\nexport type CommentWithBreaks = number;\n\n/**\n * Testing backticks in string: `backticks` and ```multiple backticks``` should work\n */\nexport type CommentWithBackticks = number;\n\n/**\n * Testing backticks and quotes in string: `backticks`, 'quotes', \"double quotes\" and ```multiple backticks``` should work\n */\nexport type CommentWithBackticksAndQuotes = number;\n\n/**\n * Testing slashes in string: \\backwards\\\\\\ and /forwards/// should work\n */\nexport type CommentWithSlashes = number;\n\n/**\n * Testing expression placeholders in string: ${expression} should work\n */\nexport type CommentWithExpressionPlaceholders = number;\n\n/**\n * Testing quotes in string: 'single quote''' and \"double quotes\"\"\" should work\n */\nexport type CommentWithQuotes = number;\n\n/**\n * Testing reserved characters in string: * inline * and ** inline ** should work\n */\nexport type CommentWithReservedCharacters = number;\n\n/**\n * This is a simple number\n */\nexport type SimpleInteger = number;\n\n/**\n * This is a simple boolean\n */\nexport type SimpleBoolean = boolean;\n\n/**\n * This is a simple string\n */\nexport type SimpleString = string;\n\n/**\n * A string with non-ascii (unicode) characters valid in typescript identifiers (æøåÆØÅöÔèÈ字符串)\n */\nexport type NonAsciiStringæøåÆøÅöôêÊ字符串 = string;\n\n/**\n * This is a simple file\n */\nexport type SimpleFile = Blob | File;\n\nexport type SimpleReference = ModelWithString;\n\n/**\n * This is a simple string\n */\nexport type SimpleStringWithPattern = string;\n\n/**\n * This is a simple enum with strings\n */\nexport type EnumWithStrings = 'Success' | 'Warning' | 'Error' | '\\'Single Quote\\'' | '\"Double Quotes\"' | 'Non-ascii: øæåôöØÆÅÔÖ字符串';\n\n/**\n * This is a simple enum with numbers\n */\nexport type EnumWithNumbers = 1 | 2 | 3 | 1.1 | 1.2 | 1.3 | 100 | 200 | 300 | -100 | -200 | -300 | -1.1 | -1.2 | -1.3;\n\n/**\n * Success=1,Warning=2,Error=3\n */\nexport type EnumFromDescription = number;\n\n/**\n * This is a simple enum with numbers\n */\nexport type EnumWithExtensions = 200 | 400 | 500;\n\n/**\n * This is a simple array with numbers\n */\nexport type ArrayWithNumbers = Array<number>;\n\n/**\n * This is a simple array with booleans\n */\nexport type ArrayWithBooleans = Array<boolean>;\n\n/**\n * This is a simple array with strings\n */\nexport type ArrayWithStrings = Array<string>;\n\n/**\n * This is a simple array with references\n */\nexport type ArrayWithReferences = Array<ModelWithString>;\n\n/**\n * This is a simple array containing an array\n */\nexport type ArrayWithArray = Array<Array<ModelWithString>>;\n\n/**\n * This is a simple array with properties\n */\nexport type ArrayWithProperties = Array<{\n    foo?: string;\n    bar?: string;\n}>;\n\n/**\n * This is a string dictionary\n */\nexport type DictionaryWithString = {\n    [key: string]: string;\n};\n\n/**\n * This is a string reference\n */\nexport type DictionaryWithReference = {\n    [key: string]: ModelWithString;\n};\n\n/**\n * This is a complex dictionary\n */\nexport type DictionaryWithArray = {\n    [key: string]: Array<ModelWithString>;\n};\n\n/**\n * This is a string dictionary\n */\nexport type DictionaryWithDictionary = {\n    [key: string]: {\n        [key: string]: string;\n    };\n};\n\n/**\n * This is a complex dictionary\n */\nexport type DictionaryWithProperties = {\n    [key: string]: {\n        foo?: string;\n        bar?: string;\n    };\n};\n\n/**\n * This is a type-only model that defines Date as a string\n */\nexport type Date = string;\n\n/**\n * This is a model with one number property\n */\nexport type ModelWithInteger = {\n    /**\n     * This is a simple number property\n     */\n    prop?: number;\n};\n\n/**\n * This is a model with one boolean property\n */\nexport type ModelWithBoolean = {\n    /**\n     * This is a simple boolean property\n     */\n    prop?: boolean;\n};\n\n/**\n * This is a model with one string property\n */\nexport type ModelWithString = {\n    /**\n     * This is a simple string property\n     */\n    prop?: string;\n};\n\n/**\n * This is a model with one string property\n */\nexport type ModelWithStringError = {\n    /**\n     * This is a simple string property\n     */\n    prop?: string;\n};\n\n/**\n * This is a model with one string property\n */\nexport type ModelWithNullableString = {\n    /**\n     * This is a simple string property\n     */\n    nullableProp?: string | null;\n    /**\n     * This is a simple string property\n     */\n    nullableRequiredProp: string | null;\n};\n\n/**\n * This is a model with one enum\n */\nexport type ModelWithEnum = {\n    /**\n     * This is a simple enum with strings\n     */\n    test?: 'Success' | 'Warning' | 'Error' | 'ØÆÅ字符串';\n    /**\n     * These are the HTTP error code enums\n     */\n    statusCode?: '100' | '200 FOO' | '300 FOO_BAR' | '400 foo-bar' | '500 foo.bar' | '600 foo&bar';\n    /**\n     * Simple boolean enum\n     */\n    bool?: true;\n};\n\n/**\n * This is a model with one enum\n */\nexport type ModelWithEnumFromDescription = {\n    /**\n     * Success=1,Warning=2,Error=3\n     */\n    test?: number;\n};\n\n/**\n * This is a model with nested enums\n */\nexport type ModelWithNestedEnums = {\n    dictionaryWithEnum?: {\n        [key: string]: 'Success' | 'Warning' | 'Error';\n    };\n    dictionaryWithEnumFromDescription?: {\n        [key: string]: number;\n    };\n    arrayWithEnum?: Array<'Success' | 'Warning' | 'Error'>;\n    arrayWithDescription?: Array<number>;\n};\n\n/**\n * This is a model with one property containing a reference\n */\nexport type ModelWithReference = {\n    prop?: ModelWithProperties;\n};\n\n/**\n * This is a model with one property containing an array\n */\nexport type ModelWithArray = {\n    prop?: Array<ModelWithString>;\n    propWithFile?: Array<Blob | File>;\n    propWithNumber?: Array<number>;\n};\n\n/**\n * This is a model with one property containing a dictionary\n */\nexport type ModelWithDictionary = {\n    prop?: {\n        [key: string]: string;\n    };\n};\n\n/**\n * This is a model with one property containing a circular reference\n */\nexport type ModelWithCircularReference = {\n    prop?: ModelWithCircularReference;\n};\n\n/**\n * This is a model with one nested property\n */\nexport type ModelWithProperties = {\n    required: string;\n    readonly requiredAndReadOnly: string;\n    string?: string;\n    number?: number;\n    boolean?: boolean;\n    reference?: ModelWithString;\n    'property with space'?: string;\n    default?: string;\n    try?: string;\n    readonly '@namespace.string'?: string;\n    readonly '@namespace.integer'?: number;\n};\n\n/**\n * This is a model with one nested property\n */\nexport type ModelWithNestedProperties = {\n    readonly first: {\n        readonly second: {\n            readonly third: string;\n        };\n    };\n};\n\n/**\n * This is a model with duplicated properties\n */\nexport type ModelWithDuplicateProperties = {\n    prop?: ModelWithString;\n};\n\n/**\n * This is a model with ordered properties\n */\nexport type ModelWithOrderedProperties = {\n    zebra?: string;\n    apple?: string;\n    hawaii?: string;\n};\n\n/**\n * This is a model with duplicated imports\n */\nexport type ModelWithDuplicateImports = {\n    propA?: ModelWithString;\n    propB?: ModelWithString;\n    propC?: ModelWithString;\n};\n\n/**\n * This is a model that extends another model\n */\nexport type ModelThatExtends = ModelWithString & {\n    propExtendsA?: string;\n    propExtendsB?: ModelWithString;\n};\n\n/**\n * This is a model that extends another model\n */\nexport type ModelThatExtendsExtends = ModelWithString & ModelThatExtends & {\n    propExtendsC?: string;\n    propExtendsD?: ModelWithString;\n};\n\nexport type Default = {\n    name?: string;\n};\n\n/**\n * This is a model that contains a some patterns\n */\nexport type ModelWithPattern = {\n    key: string;\n    name: string;\n    readonly enabled?: boolean;\n    readonly modified?: string;\n    id?: string;\n    text?: string;\n    patternWithSingleQuotes?: string;\n    patternWithNewline?: string;\n    patternWithBacktick?: string;\n    patternWithUnicode?: string;\n};\n\nexport type ParameterActivityParams = {\n    description?: string;\n    graduate_id?: number;\n    organization_id?: number;\n    parent_activity?: number;\n    post_id?: number;\n};\n\nexport type ResponsePostActivityResponse = {\n    description?: string;\n    graduate_id?: number;\n    organization_id?: number;\n    parent_activity_id?: number;\n    post_id?: number;\n};\n\nexport type FailureFailure = {\n    error?: string;\n    message?: string;\n    reference_code?: string;\n};\n\nexport type ExternalSharedModel = {\n    id: string;\n    name?: string;\n};\n\n/**\n * This is a model with one property containing a reference\n */\nexport type ModelWithReferenceWritable = {\n    prop?: ModelWithPropertiesWritable;\n};\n\n/**\n * This is a model with one nested property\n */\nexport type ModelWithPropertiesWritable = {\n    required: string;\n    string?: string;\n    number?: number;\n    boolean?: boolean;\n    reference?: ModelWithString;\n    'property with space'?: string;\n    default?: string;\n    try?: string;\n};\n\n/**\n * This is a model that contains a some patterns\n */\nexport type ModelWithPatternWritable = {\n    key: string;\n    name: string;\n    id?: string;\n    text?: string;\n    patternWithSingleQuotes?: string;\n    patternWithNewline?: string;\n    patternWithBacktick?: string;\n    patternWithUnicode?: string;\n};\n\nexport type ServiceWithEmptyTagData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no+tag';\n};\n\nexport type PatchApiVbyApiVersionNoTagData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no+tag';\n};\n\nexport type PatchApiVbyApiVersionNoTagResponses = {\n    /**\n     * OK\n     */\n    default: unknown;\n};\n\nexport type FooWowData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no+tag';\n};\n\nexport type FooWowResponses = {\n    /**\n     * OK\n     */\n    default: unknown;\n};\n\nexport type DeleteCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type GetCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type HeadCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type OptionsCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type PatchCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type PostCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type PutCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type CallWithDescriptionsData = {\n    body?: never;\n    path?: never;\n    query?: {\n        /**\n         * Testing multiline comments in string: First line\n         * Second line\n         *\n         * Fourth line\n         */\n        parameterWithBreaks?: string;\n        /**\n         * Testing backticks in string: `backticks` and ```multiple backticks``` should work\n         */\n        parameterWithBackticks?: string;\n        /**\n         * Testing slashes in string: \\backwards\\\\\\ and /forwards/// should work\n         */\n        parameterWithSlashes?: string;\n        /**\n         * Testing expression placeholders in string: ${expression} should work\n         */\n        parameterWithExpressionPlaceholders?: string;\n        /**\n         * Testing quotes in string: 'single quote''' and \"double quotes\"\"\" should work\n         */\n        parameterWithQuotes?: string;\n        /**\n         * Testing reserved characters in string: * inline * and ** inline ** should work\n         */\n        parameterWithReservedCharacters?: string;\n    };\n    url: '/api/v{api-version}/descriptions/';\n};\n\nexport type CallWithParametersData = {\n    body?: never;\n    headers: {\n        /**\n         * This is the parameter that goes into the header\n         */\n        parameterHeader: string;\n    };\n    path: {\n        /**\n         * This is the parameter that goes into the path\n         */\n        parameterPath: string;\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string;\n    };\n    query: {\n        /**\n         * This is the parameter that goes into the query params\n         */\n        parameterQuery: string;\n    };\n    url: '/api/v{api-version}/parameters/{parameterPath}';\n};\n\nexport type CallWithWeirdParameterNamesData = {\n    /**\n     * This is the parameter that is sent as request body\n     */\n    body: string;\n    headers: {\n        /**\n         * This is the parameter that goes into the request header\n         */\n        'parameter.header': string;\n    };\n    path: {\n        /**\n         * This is the parameter that goes into the path\n         */\n        'parameter.path.1'?: string;\n        /**\n         * This is the parameter that goes into the path\n         */\n        'parameter-path-2'?: string;\n        /**\n         * This is the parameter that goes into the path\n         */\n        'PARAMETER-PATH-3'?: string;\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string;\n    };\n    query: {\n        /**\n         * This is the parameter with a reserved keyword\n         */\n        default?: string;\n        /**\n         * This is the parameter that goes into the request query params\n         */\n        'parameter-query': string;\n    };\n    url: '/api/v{api-version}/parameters/{parameter.path.1}/{parameter-path-2}/{PARAMETER-PATH-3}';\n};\n\nexport type CallWithDefaultParametersData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * This is a simple string with default value\n         */\n        parameterString: string;\n        /**\n         * This is a simple number with default value\n         */\n        parameterNumber: number;\n        /**\n         * This is a simple boolean with default value\n         */\n        parameterBoolean: boolean;\n        /**\n         * This is a simple enum with default value\n         */\n        parameterEnum: 'Success' | 'Warning' | 'Error';\n        /**\n         * This is a model with one string property\n         */\n        parameterModel: {\n            /**\n             * This is a simple string property\n             */\n            prop?: string;\n        };\n    };\n    url: '/api/v{api-version}/defaults';\n};\n\nexport type CallWithDefaultOptionalParametersData = {\n    body?: never;\n    path?: never;\n    query?: {\n        /**\n         * This is a simple string that is optional with default value\n         */\n        parameterString?: string;\n        /**\n         * This is a simple number that is optional with default value\n         */\n        parameterNumber?: number;\n        /**\n         * This is a simple boolean that is optional with default value\n         */\n        parameterBoolean?: boolean;\n        /**\n         * This is a simple enum that is optional with default value\n         */\n        parameterEnum?: 'Success' | 'Warning' | 'Error';\n    };\n    url: '/api/v{api-version}/defaults';\n};\n\nexport type CallToTestOrderOfParamsData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * This is a optional string with default\n         */\n        parameterOptionalStringWithDefault?: string;\n        /**\n         * This is a optional string with empty default\n         */\n        parameterOptionalStringWithEmptyDefault?: string;\n        /**\n         * This is a optional string with no default\n         */\n        parameterOptionalStringWithNoDefault?: string;\n        /**\n         * This is a string with default\n         */\n        parameterStringWithDefault: string;\n        /**\n         * This is a string with empty default\n         */\n        parameterStringWithEmptyDefault: string;\n        /**\n         * This is a string with no default\n         */\n        parameterStringWithNoDefault: string;\n        /**\n         * This is a string that can be null with no default\n         */\n        parameterStringNullableWithNoDefault?: string | null;\n        /**\n         * This is a string that can be null with default\n         */\n        parameterStringNullableWithDefault?: string | null;\n    };\n    url: '/api/v{api-version}/defaults';\n};\n\nexport type DuplicateNameData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/duplicate';\n};\n\nexport type DuplicateName2Data = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/duplicate';\n};\n\nexport type DuplicateName3Data = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/duplicate';\n};\n\nexport type DuplicateName4Data = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/duplicate';\n};\n\nexport type CallWithNoContentResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no-content';\n};\n\nexport type CallWithNoContentResponseResponses = {\n    /**\n     * Success\n     */\n    204: unknown;\n};\n\nexport type CallWithResponseAndNoContentResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multiple-tags/response-and-no-content';\n};\n\nexport type CallWithResponseAndNoContentResponseResponses = {\n    /**\n     * Response is a simple number\n     */\n    200: number;\n    /**\n     * Success\n     */\n    204: unknown;\n};\n\nexport type CallWithResponseAndNoContentResponseResponse = CallWithResponseAndNoContentResponseResponses[keyof CallWithResponseAndNoContentResponseResponses];\n\nexport type DummyAData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multiple-tags/a';\n};\n\nexport type DummyAResponses = {\n    /**\n     * Success\n     */\n    204: unknown;\n};\n\nexport type DummyBData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multiple-tags/b';\n};\n\nexport type DummyBResponses = {\n    /**\n     * Success\n     */\n    204: unknown;\n};\n\nexport type CallWithResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/response';\n};\n\nexport type CallWithResponseResponses = {\n    /**\n     * Message for default response\n     */\n    default: ModelWithString;\n};\n\nexport type CallWithResponseResponse = CallWithResponseResponses[keyof CallWithResponseResponses];\n\nexport type CallWithDuplicateResponsesData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/response';\n};\n\nexport type CallWithDuplicateResponsesErrors = {\n    /**\n     * Message for 500 error\n     */\n    500: ModelWithStringError;\n    /**\n     * Message for 501 error\n     */\n    501: ModelWithStringError;\n    /**\n     * Message for 502 error\n     */\n    502: ModelWithStringError;\n    /**\n     * Message for default response\n     */\n    default: ModelWithString;\n};\n\nexport type CallWithDuplicateResponsesError = CallWithDuplicateResponsesErrors[keyof CallWithDuplicateResponsesErrors];\n\nexport type CallWithDuplicateResponsesResponses = {\n    /**\n     * Message for 201 response\n     */\n    201: ModelWithString;\n    /**\n     * Message for 202 response\n     */\n    202: ModelWithString;\n};\n\nexport type CallWithDuplicateResponsesResponse = CallWithDuplicateResponsesResponses[keyof CallWithDuplicateResponsesResponses];\n\nexport type CallWithResponsesData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/response';\n};\n\nexport type CallWithResponsesErrors = {\n    /**\n     * Message for 500 error\n     */\n    500: ModelWithStringError;\n    /**\n     * Message for 501 error\n     */\n    501: ModelWithStringError;\n    /**\n     * Message for 502 error\n     */\n    502: ModelWithStringError;\n    /**\n     * Message for default response\n     */\n    default: ModelWithString;\n};\n\nexport type CallWithResponsesError = CallWithResponsesErrors[keyof CallWithResponsesErrors];\n\nexport type CallWithResponsesResponses = {\n    /**\n     * Message for 200 response\n     */\n    200: {\n        readonly '@namespace.string'?: string;\n        readonly '@namespace.integer'?: number;\n        readonly value?: Array<ModelWithString>;\n    };\n    /**\n     * Message for 201 response\n     */\n    201: ModelThatExtends;\n    /**\n     * Message for 202 response\n     */\n    202: ModelThatExtendsExtends;\n};\n\nexport type CallWithResponsesResponse = CallWithResponsesResponses[keyof CallWithResponsesResponses];\n\nexport type CollectionFormatData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * This is an array parameter that is sent as csv format (comma-separated values)\n         */\n        parameterArrayCSV: Array<string>;\n        /**\n         * This is an array parameter that is sent as ssv format (space-separated values)\n         */\n        parameterArraySSV: Array<string>;\n        /**\n         * This is an array parameter that is sent as tsv format (tab-separated values)\n         */\n        parameterArrayTSV: Array<string>;\n        /**\n         * This is an array parameter that is sent as pipes format (pipe-separated values)\n         */\n        parameterArrayPipes: Array<string>;\n        /**\n         * This is an array parameter that is sent as multi format (multiple parameter instances)\n         */\n        parameterArrayMulti: Array<string>;\n    };\n    url: '/api/v{api-version}/collectionFormat';\n};\n\nexport type TypesData = {\n    body?: never;\n    path?: {\n        /**\n         * This is a number parameter\n         */\n        id?: number;\n    };\n    query: {\n        /**\n         * This is a number parameter\n         */\n        parameterNumber: number;\n        /**\n         * This is a string parameter\n         */\n        parameterString: string;\n        /**\n         * This is a boolean parameter\n         */\n        parameterBoolean: boolean;\n        /**\n         * This is an array parameter\n         */\n        parameterArray: Array<string>;\n        /**\n         * This is a dictionary parameter\n         */\n        parameterDictionary: {\n            [key: string]: unknown;\n        };\n        /**\n         * This is an enum parameter\n         */\n        parameterEnum: 'Success' | 'Warning' | 'Error';\n    };\n    url: '/api/v{api-version}/types';\n};\n\nexport type TypesResponses = {\n    /**\n     * Response is a simple number\n     */\n    200: number;\n    /**\n     * Response is a simple string\n     */\n    201: string;\n    /**\n     * Response is a simple boolean\n     */\n    202: boolean;\n    /**\n     * Response is a simple object\n     */\n    203: {\n        [key: string]: unknown;\n    };\n};\n\nexport type TypesResponse = TypesResponses[keyof TypesResponses];\n\nexport type ComplexTypesData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * Parameter containing object\n         */\n        parameterObject: {\n            first?: {\n                second?: {\n                    third?: string;\n                };\n            };\n        };\n        /**\n         * This is a model with one string property\n         */\n        parameterReference: {\n            /**\n             * This is a simple string property\n             */\n            prop?: string;\n        };\n    };\n    url: '/api/v{api-version}/complex';\n};\n\nexport type ComplexTypesErrors = {\n    /**\n     * 400 server error\n     */\n    400: unknown;\n    /**\n     * 500 server error\n     */\n    500: unknown;\n};\n\nexport type ComplexTypesResponses = {\n    /**\n     * Successful response\n     */\n    200: Array<ModelWithString>;\n};\n\nexport type ComplexTypesResponse = ComplexTypesResponses[keyof ComplexTypesResponses];\n\nexport type CallWithResultFromHeaderData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/header';\n};\n\nexport type CallWithResultFromHeaderErrors = {\n    /**\n     * 400 server error\n     */\n    400: unknown;\n    /**\n     * 500 server error\n     */\n    500: unknown;\n};\n\nexport type CallWithResultFromHeaderResponses = {\n    /**\n     * Successful response\n     */\n    200: unknown;\n};\n\nexport type TestErrorCodeData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * Status code to return\n         */\n        status: string;\n    };\n    url: '/api/v{api-version}/error';\n};\n\nexport type TestErrorCodeErrors = {\n    /**\n     * Custom message: Internal Server Error\n     */\n    500: unknown;\n    /**\n     * Custom message: Not Implemented\n     */\n    501: unknown;\n    /**\n     * Custom message: Bad Gateway\n     */\n    502: unknown;\n    /**\n     * Custom message: Service Unavailable\n     */\n    503: unknown;\n};\n\nexport type TestErrorCodeResponses = {\n    /**\n     * Custom message: Successful response\n     */\n    200: unknown;\n};\n\nexport type NonAsciiæøåÆøÅöôêÊ字符串Data = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * Dummy input param\n         */\n        nonAsciiParamæøåÆØÅöôêÊ: number;\n    };\n    url: '/api/v{api-version}/non-ascii-æøåÆØÅöôêÊ字符串';\n};\n\nexport type NonAsciiæøåÆøÅöôêÊ字符串Responses = {\n    /**\n     * Successful response\n     */\n    200: NonAsciiStringæøåÆøÅöôêÊ字符串;\n};\n\nexport type NonAsciiæøåÆøÅöôêÊ字符串Response = NonAsciiæøåÆøÅöôêÊ字符串Responses[keyof NonAsciiæøåÆøÅöôêÊ字符串Responses];\n\nexport type PostApiVbyApiVersionBodyData = {\n    /**\n     * Body should not be unknown\n     */\n    body: ParameterActivityParams;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/body';\n};\n\nexport type PostApiVbyApiVersionBodyErrors = {\n    /**\n     * Bad Request\n     */\n    400: FailureFailure;\n    /**\n     * Internal Server Error\n     */\n    500: FailureFailure;\n};\n\nexport type PostApiVbyApiVersionBodyError = PostApiVbyApiVersionBodyErrors[keyof PostApiVbyApiVersionBodyErrors];\n\nexport type PostApiVbyApiVersionBodyResponses = {\n    /**\n     * OK\n     */\n    200: ResponsePostActivityResponse;\n};\n\nexport type PostApiVbyApiVersionBodyResponse = PostApiVbyApiVersionBodyResponses[keyof PostApiVbyApiVersionBodyResponses];\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@hey-api/client-fetch/sdk-nested-classes/client/client.gen.ts",
    "content": "// 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 (options: RequestOptions) => {\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 url = buildUrl(opts);\n\n    return { opts, url };\n  };\n\n  const request: Client['request'] = async (options) => {\n    // @ts-expect-error\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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@hey-api/client-fetch/sdk-nested-classes/client/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type { Auth } from '../core/auth.gen';\nexport type { QuerySerializerOptions } from '../core/bodySerializer.gen';\nexport {\n  formDataBodySerializer,\n  jsonBodySerializer,\n  urlSearchParamsBodySerializer,\n} from '../core/bodySerializer.gen';\nexport { buildClientParams } from '../core/params.gen';\nexport { serializeQueryKeyValue } from '../core/queryKeySerializer.gen';\nexport { createClient } from './client.gen';\nexport type {\n  Client,\n  ClientOptions,\n  Config,\n  CreateClientConfig,\n  Options,\n  RequestOptions,\n  RequestResult,\n  ResolvedRequestOptions,\n  ResponseStyle,\n  TDataShape,\n} from './types.gen';\nexport { createConfig, mergeHeaders } from './utils.gen';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@hey-api/client-fetch/sdk-nested-classes/client/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { Auth } from '../core/auth.gen';\nimport type {\n  ServerSentEventsOptions,\n  ServerSentEventsResult,\n} from '../core/serverSentEvents.gen';\nimport type { Client as CoreClient, Config as CoreConfig } from '../core/types.gen';\nimport type { Middleware } from './utils.gen';\n\nexport type ResponseStyle = 'data' | 'fields';\n\nexport interface Config<T extends ClientOptions = ClientOptions>\n  extends Omit<RequestInit, 'body' | 'headers' | 'method'>, CoreConfig {\n  /**\n   * Base URL for all requests made by this client.\n   */\n  baseUrl?: T['baseUrl'];\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   * Please don't use the Fetch client for Next.js applications. The `next`\n   * options won't have any effect.\n   *\n   * Install {@link https://www.npmjs.com/package/@hey-api/client-next `@hey-api/client-next`} instead.\n   */\n  next?: never;\n  /**\n   * Return the response data parsed in a specified format. By default, `auto`\n   * will infer the appropriate method from the `Content-Type` response header.\n   * You can override this behavior with any of the {@link Body} methods.\n   * Select `stream` if you don't want to parse response data at all.\n   *\n   * @default 'auto'\n   */\n  parseAs?: 'arrayBuffer' | 'auto' | 'blob' | 'formData' | 'json' | 'stream' | 'text';\n  /**\n   * Should we return only data or multiple fields (data, error, response, etc.)?\n   *\n   * @default 'fields'\n   */\n  responseStyle?: ResponseStyle;\n  /**\n   * Throw an error instead of returning it in the response?\n   *\n   * @default false\n   */\n  throwOnError?: T['throwOnError'];\n}\n\nexport interface RequestOptions<\n  TData = unknown,\n  TResponseStyle extends ResponseStyle = 'fields',\n  ThrowOnError extends boolean = boolean,\n  Url extends string = string,\n>\n  extends\n    Config<{\n      responseStyle: TResponseStyle;\n      throwOnError: ThrowOnError;\n    }>,\n    Pick<\n      ServerSentEventsOptions<TData>,\n      | 'onRequest'\n      | 'onSseError'\n      | 'onSseEvent'\n      | 'sseDefaultRetryDelay'\n      | 'sseMaxRetryAttempts'\n      | 'sseMaxRetryDelay'\n    > {\n  /**\n   * Any body that you want to add to your request.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/fetch#body}\n   */\n  body?: unknown;\n  path?: Record<string, unknown>;\n  query?: Record<string, unknown>;\n  /**\n   * Security mechanism(s) to use for the request.\n   */\n  security?: ReadonlyArray<Auth>;\n  url: Url;\n}\n\nexport interface ResolvedRequestOptions<\n  TResponseStyle extends ResponseStyle = 'fields',\n  ThrowOnError extends boolean = boolean,\n  Url extends string = string,\n> extends RequestOptions<unknown, TResponseStyle, ThrowOnError, Url> {\n  serializedBody?: string;\n}\n\nexport type RequestResult<\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = boolean,\n  TResponseStyle extends ResponseStyle = 'fields',\n> = ThrowOnError extends true\n  ? Promise<\n      TResponseStyle extends 'data'\n        ? TData extends Record<string, unknown>\n          ? TData[keyof TData]\n          : TData\n        : {\n            data: TData extends Record<string, unknown> ? TData[keyof TData] : TData;\n            request: Request;\n            response: Response;\n          }\n    >\n  : Promise<\n      TResponseStyle extends 'data'\n        ? (TData extends Record<string, unknown> ? TData[keyof TData] : TData) | undefined\n        : (\n            | {\n                data: TData extends Record<string, unknown> ? TData[keyof TData] : TData;\n                error: undefined;\n              }\n            | {\n                data: undefined;\n                error: TError extends Record<string, unknown> ? TError[keyof TError] : TError;\n              }\n          ) & {\n            request: Request;\n            response: Response;\n          }\n    >;\n\nexport interface ClientOptions {\n  baseUrl?: string;\n  responseStyle?: ResponseStyle;\n  throwOnError?: boolean;\n}\n\ntype MethodFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'>,\n) => RequestResult<TData, TError, ThrowOnError, TResponseStyle>;\n\ntype SseFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'>,\n) => Promise<ServerSentEventsResult<TData, TError>>;\n\ntype RequestFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'> &\n    Pick<Required<RequestOptions<TData, TResponseStyle, ThrowOnError>>, 'method'>,\n) => RequestResult<TData, TError, ThrowOnError, TResponseStyle>;\n\ntype BuildUrlFn = <\n  TData extends {\n    body?: unknown;\n    path?: Record<string, unknown>;\n    query?: Record<string, unknown>;\n    url: string;\n  },\n>(\n  options: TData & Options<TData>,\n) => string;\n\nexport type Client = CoreClient<RequestFn, Config, MethodFn, BuildUrlFn, SseFn> & {\n  interceptors: Middleware<Request, Response, unknown, ResolvedRequestOptions>;\n};\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 = ClientOptions> = (\n  override?: Config<ClientOptions & T>,\n) => Config<Required<ClientOptions> & T>;\n\nexport interface TDataShape {\n  body?: unknown;\n  headers?: unknown;\n  path?: unknown;\n  query?: unknown;\n  url: string;\n}\n\ntype OmitKeys<T, K> = Pick<T, Exclude<keyof T, K>>;\n\nexport type Options<\n  TData extends TDataShape = TDataShape,\n  ThrowOnError extends boolean = boolean,\n  TResponse = unknown,\n  TResponseStyle extends ResponseStyle = 'fields',\n> = OmitKeys<\n  RequestOptions<TResponse, TResponseStyle, ThrowOnError>,\n  'body' | 'path' | 'query' | 'url'\n> &\n  ([TData] extends [never] ? unknown : Omit<TData, 'url'>);\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@hey-api/client-fetch/sdk-nested-classes/client/utils.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@hey-api/client-fetch/sdk-nested-classes/client.gen.ts",
    "content": "// 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://api.example.com/v1' }));\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@hey-api/client-fetch/sdk-nested-classes/core/auth.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@hey-api/client-fetch/sdk-nested-classes/core/bodySerializer.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@hey-api/client-fetch/sdk-nested-classes/core/params.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@hey-api/client-fetch/sdk-nested-classes/core/pathSerializer.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@hey-api/client-fetch/sdk-nested-classes/core/queryKeySerializer.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\n/**\n * JSON-friendly union that mirrors what Pinia Colada can hash.\n */\nexport type JsonValue =\n  | null\n  | string\n  | number\n  | boolean\n  | JsonValue[]\n  | { [key: string]: JsonValue };\n\n/**\n * Replacer that converts non-JSON values (bigint, Date, etc.) to safe substitutes.\n */\nexport const queryKeyJsonReplacer = (_key: string, value: unknown) => {\n  if (value === undefined || typeof value === 'function' || typeof value === 'symbol') {\n    return undefined;\n  }\n  if (typeof value === 'bigint') {\n    return value.toString();\n  }\n  if (value instanceof Date) {\n    return value.toISOString();\n  }\n  return value;\n};\n\n/**\n * Safely stringifies a value and parses it back into a JsonValue.\n */\nexport const stringifyToJsonValue = (input: unknown): JsonValue | undefined => {\n  try {\n    const json = JSON.stringify(input, queryKeyJsonReplacer);\n    if (json === undefined) {\n      return undefined;\n    }\n    return JSON.parse(json) as JsonValue;\n  } catch {\n    return undefined;\n  }\n};\n\n/**\n * Detects plain objects (including objects with a null prototype).\n */\nconst isPlainObject = (value: unknown): value is Record<string, unknown> => {\n  if (value === null || typeof value !== 'object') {\n    return false;\n  }\n  const prototype = Object.getPrototypeOf(value as object);\n  return prototype === Object.prototype || prototype === null;\n};\n\n/**\n * Turns URLSearchParams into a sorted JSON object for deterministic keys.\n */\nconst serializeSearchParams = (params: URLSearchParams): JsonValue => {\n  const entries = Array.from(params.entries()).sort(([a], [b]) => a.localeCompare(b));\n  const result: Record<string, JsonValue> = {};\n\n  for (const [key, value] of entries) {\n    const existing = result[key];\n    if (existing === undefined) {\n      result[key] = value;\n      continue;\n    }\n\n    if (Array.isArray(existing)) {\n      (existing as string[]).push(value);\n    } else {\n      result[key] = [existing, value];\n    }\n  }\n\n  return result;\n};\n\n/**\n * Normalizes any accepted value into a JSON-friendly shape for query keys.\n */\nexport const serializeQueryKeyValue = (value: unknown): JsonValue | undefined => {\n  if (value === null) {\n    return null;\n  }\n\n  if (typeof value === 'string' || typeof value === 'number' || typeof value === 'boolean') {\n    return value;\n  }\n\n  if (value === undefined || typeof value === 'function' || typeof value === 'symbol') {\n    return undefined;\n  }\n\n  if (typeof value === 'bigint') {\n    return value.toString();\n  }\n\n  if (value instanceof Date) {\n    return value.toISOString();\n  }\n\n  if (Array.isArray(value)) {\n    return stringifyToJsonValue(value);\n  }\n\n  if (typeof URLSearchParams !== 'undefined' && value instanceof URLSearchParams) {\n    return serializeSearchParams(value);\n  }\n\n  if (isPlainObject(value)) {\n    return stringifyToJsonValue(value);\n  }\n\n  return undefined;\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@hey-api/client-fetch/sdk-nested-classes/core/serverSentEvents.gen.ts",
    "content": "// 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 const 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            // Normalize line endings: CRLF -> LF, then CR -> LF\n            buffer = buffer.replace(/\\r\\n/g, '\\n').replace(/\\r/g, '\\n');\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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@hey-api/client-fetch/sdk-nested-classes/core/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { Auth, AuthToken } from './auth.gen';\nimport type { BodySerializer, QuerySerializer, QuerySerializerOptions } from './bodySerializer.gen';\n\nexport type HttpMethod =\n  | 'connect'\n  | 'delete'\n  | 'get'\n  | 'head'\n  | 'options'\n  | 'patch'\n  | 'post'\n  | 'put'\n  | 'trace';\n\nexport type Client<\n  RequestFn = never,\n  Config = unknown,\n  MethodFn = never,\n  BuildUrlFn = never,\n  SseFn = never,\n> = {\n  /**\n   * Returns the final request URL.\n   */\n  buildUrl: BuildUrlFn;\n  getConfig: () => Config;\n  request: RequestFn;\n  setConfig: (config: Config) => Config;\n} & {\n  [K in HttpMethod]: MethodFn;\n} & ([SseFn] extends [never] ? { sse?: never } : { sse: { [K in HttpMethod]: SseFn } });\n\nexport interface Config {\n  /**\n   * Auth token or a function returning auth token. The resolved value will be\n   * added to the request payload as defined by its `security` array.\n   */\n  auth?: ((auth: Auth) => Promise<AuthToken> | AuthToken) | AuthToken;\n  /**\n   * A function for serializing request body parameter. By default,\n   * {@link JSON.stringify()} will be used.\n   */\n  bodySerializer?: BodySerializer | null;\n  /**\n   * An object containing any HTTP headers that you want to pre-populate your\n   * `Headers` object with.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/Headers/Headers#init See more}\n   */\n  headers?:\n    | RequestInit['headers']\n    | Record<\n        string,\n        string | number | boolean | (string | number | boolean)[] | null | undefined | unknown\n      >;\n  /**\n   * The request method.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/fetch#method See more}\n   */\n  method?: Uppercase<HttpMethod>;\n  /**\n   * A function for serializing request query parameters. By default, arrays\n   * will be exploded in form style, objects will be exploded in deepObject\n   * style, and reserved characters are percent-encoded.\n   *\n   * This method will have no effect if the native `paramsSerializer()` Axios\n   * API function is used.\n   *\n   * {@link https://swagger.io/docs/specification/serialization/#query View examples}\n   */\n  querySerializer?: QuerySerializer | QuerySerializerOptions;\n  /**\n   * A function validating request data. This is useful if you want to ensure\n   * the request conforms to the desired shape, so it can be safely sent to\n   * the server.\n   */\n  requestValidator?: (data: unknown) => Promise<unknown>;\n  /**\n   * A function transforming response data before it's returned. This is useful\n   * for post-processing data, e.g. converting ISO strings into Date objects.\n   */\n  responseTransformer?: (data: unknown) => Promise<unknown>;\n  /**\n   * A function validating response data. This is useful if you want to ensure\n   * the response conforms to the desired shape, so it can be safely passed to\n   * the transformers and returned to the user.\n   */\n  responseValidator?: (data: unknown) => Promise<unknown>;\n}\n\ntype IsExactlyNeverOrNeverUndefined<T> = [T] extends [never]\n  ? true\n  : [T] extends [never | undefined]\n    ? [undefined] extends [T]\n      ? false\n      : true\n    : false;\n\nexport type OmitNever<T extends Record<string, unknown>> = {\n  [K in keyof T as IsExactlyNeverOrNeverUndefined<T[K]> extends true ? never : K]: T[K];\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@hey-api/client-fetch/sdk-nested-classes/core/utils.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@hey-api/client-fetch/sdk-nested-classes/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport { Business, Business2, Business3, Business4, Business5, Domains, Domains2, Domains3, Domains4, Locations, type Options, Providers, Providers2, Providers3, Providers4 } from './sdk.gen';\nexport type { BusinessGetData, BusinessGetResponse, BusinessGetResponses, BusinessProvidersDomainsGetData, BusinessProvidersDomainsGetResponse, BusinessProvidersDomainsGetResponses, BusinessProvidersDomainsPostData, BusinessProvidersDomainsPostResponse, BusinessProvidersDomainsPostResponses, ClientOptions, GetData, GetResponse, GetResponses, PutBusinessProvidersDomainsData, PutBusinessProvidersDomainsResponse, PutBusinessProvidersDomainsResponses } from './types.gen';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@hey-api/client-fetch/sdk-nested-classes/sdk.gen.ts",
    "content": "// 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 { BusinessGetData, BusinessGetResponses, BusinessProvidersDomainsGetData, BusinessProvidersDomainsGetResponses, BusinessProvidersDomainsPostData, BusinessProvidersDomainsPostResponses, GetData, GetResponses, PutBusinessProvidersDomainsData, PutBusinessProvidersDomainsResponses } from './types.gen';\n\nexport type Options<TData extends TDataShape = TDataShape, ThrowOnError extends boolean = boolean> = Options2<TData, ThrowOnError> & {\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\nexport class Domains {\n    public static get<ThrowOnError extends boolean = false>(options?: Options<BusinessProvidersDomainsGetData, ThrowOnError>) {\n        return (options?.client ?? client).get<BusinessProvidersDomainsGetResponses, unknown, ThrowOnError>({ url: '/business/providers/domains', ...options });\n    }\n    \n    public static post<ThrowOnError extends boolean = false>(options?: Options<BusinessProvidersDomainsPostData, ThrowOnError>) {\n        return (options?.client ?? client).post<BusinessProvidersDomainsPostResponses, unknown, ThrowOnError>({ url: '/business/providers/domains', ...options });\n    }\n}\n\nexport class Providers {\n    static domains = Domains;\n}\n\nexport class Business {\n    public static get<ThrowOnError extends boolean = false>(options?: Options<BusinessGetData, ThrowOnError>) {\n        return (options?.client ?? client).get<BusinessGetResponses, unknown, ThrowOnError>({ url: '/locations/businesses', ...options });\n    }\n    \n    static providers = Providers;\n}\n\nexport class Business2 {\n    static business = Business;\n}\n\nexport class Domains2 {\n    public static get<ThrowOnError extends boolean = false>(options?: Options<BusinessProvidersDomainsGetData, ThrowOnError>) {\n        return (options?.client ?? client).get<BusinessProvidersDomainsGetResponses, unknown, ThrowOnError>({ url: '/business/providers/domains', ...options });\n    }\n    \n    public static post<ThrowOnError extends boolean = false>(options?: Options<BusinessProvidersDomainsPostData, ThrowOnError>) {\n        return (options?.client ?? client).post<BusinessProvidersDomainsPostResponses, unknown, ThrowOnError>({ url: '/business/providers/domains', ...options });\n    }\n}\n\nexport class Providers2 {\n    static domains = Domains2;\n}\n\nexport class Business3 {\n    static providers = Providers2;\n}\n\nexport class Providers3 {\n    static business = Business3;\n}\n\nexport class Domains3 {\n    public static get<ThrowOnError extends boolean = false>(options?: Options<BusinessProvidersDomainsGetData, ThrowOnError>) {\n        return (options?.client ?? client).get<BusinessProvidersDomainsGetResponses, unknown, ThrowOnError>({ url: '/business/providers/domains', ...options });\n    }\n    \n    public static post<ThrowOnError extends boolean = false>(options?: Options<BusinessProvidersDomainsPostData, ThrowOnError>) {\n        return (options?.client ?? client).post<BusinessProvidersDomainsPostResponses, unknown, ThrowOnError>({ url: '/business/providers/domains', ...options });\n    }\n}\n\nexport class Providers4 {\n    static domains = Domains3;\n}\n\nexport class Business4 {\n    static providers = Providers4;\n}\n\nexport class Domains4 {\n    public static putBusinessProvidersDomains<ThrowOnError extends boolean = false>(options?: Options<PutBusinessProvidersDomainsData, ThrowOnError>) {\n        return (options?.client ?? client).put<PutBusinessProvidersDomainsResponses, unknown, ThrowOnError>({ url: '/business/providers/domains', ...options });\n    }\n    \n    static business = Business4;\n}\n\nexport class Business5 {\n    public static get<ThrowOnError extends boolean = false>(options?: Options<BusinessGetData, ThrowOnError>) {\n        return (options?.client ?? client).get<BusinessGetResponses, unknown, ThrowOnError>({ url: '/locations/businesses', ...options });\n    }\n}\n\nexport class Locations {\n    public static get<ThrowOnError extends boolean = false>(options?: Options<GetData, ThrowOnError>) {\n        return (options?.client ?? client).get<GetResponses, unknown, ThrowOnError>({ url: '/locations', ...options });\n    }\n    \n    static business = Business5;\n}\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@hey-api/client-fetch/sdk-nested-classes/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type ClientOptions = {\n    baseUrl: 'https://api.example.com/v1' | (string & {});\n};\n\nexport type BusinessProvidersDomainsGetData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/business/providers/domains';\n};\n\nexport type BusinessProvidersDomainsGetResponses = {\n    /**\n     * OK\n     */\n    200: string;\n};\n\nexport type BusinessProvidersDomainsGetResponse = BusinessProvidersDomainsGetResponses[keyof BusinessProvidersDomainsGetResponses];\n\nexport type BusinessProvidersDomainsPostData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/business/providers/domains';\n};\n\nexport type BusinessProvidersDomainsPostResponses = {\n    /**\n     * OK\n     */\n    200: string;\n};\n\nexport type BusinessProvidersDomainsPostResponse = BusinessProvidersDomainsPostResponses[keyof BusinessProvidersDomainsPostResponses];\n\nexport type PutBusinessProvidersDomainsData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/business/providers/domains';\n};\n\nexport type PutBusinessProvidersDomainsResponses = {\n    /**\n     * OK\n     */\n    200: string;\n};\n\nexport type PutBusinessProvidersDomainsResponse = PutBusinessProvidersDomainsResponses[keyof PutBusinessProvidersDomainsResponses];\n\nexport type BusinessGetData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/locations/businesses';\n};\n\nexport type BusinessGetResponses = {\n    /**\n     * OK\n     */\n    200: string;\n};\n\nexport type BusinessGetResponse = BusinessGetResponses[keyof BusinessGetResponses];\n\nexport type GetData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/locations';\n};\n\nexport type GetResponses = {\n    /**\n     * OK\n     */\n    200: string;\n};\n\nexport type GetResponse = GetResponses[keyof GetResponses];\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@hey-api/client-fetch/sdk-nested-classes-instance/client/client.gen.ts",
    "content": "// 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 (options: RequestOptions) => {\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 url = buildUrl(opts);\n\n    return { opts, url };\n  };\n\n  const request: Client['request'] = async (options) => {\n    // @ts-expect-error\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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@hey-api/client-fetch/sdk-nested-classes-instance/client/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type { Auth } from '../core/auth.gen';\nexport type { QuerySerializerOptions } from '../core/bodySerializer.gen';\nexport {\n  formDataBodySerializer,\n  jsonBodySerializer,\n  urlSearchParamsBodySerializer,\n} from '../core/bodySerializer.gen';\nexport { buildClientParams } from '../core/params.gen';\nexport { serializeQueryKeyValue } from '../core/queryKeySerializer.gen';\nexport { createClient } from './client.gen';\nexport type {\n  Client,\n  ClientOptions,\n  Config,\n  CreateClientConfig,\n  Options,\n  RequestOptions,\n  RequestResult,\n  ResolvedRequestOptions,\n  ResponseStyle,\n  TDataShape,\n} from './types.gen';\nexport { createConfig, mergeHeaders } from './utils.gen';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@hey-api/client-fetch/sdk-nested-classes-instance/client/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { Auth } from '../core/auth.gen';\nimport type {\n  ServerSentEventsOptions,\n  ServerSentEventsResult,\n} from '../core/serverSentEvents.gen';\nimport type { Client as CoreClient, Config as CoreConfig } from '../core/types.gen';\nimport type { Middleware } from './utils.gen';\n\nexport type ResponseStyle = 'data' | 'fields';\n\nexport interface Config<T extends ClientOptions = ClientOptions>\n  extends Omit<RequestInit, 'body' | 'headers' | 'method'>, CoreConfig {\n  /**\n   * Base URL for all requests made by this client.\n   */\n  baseUrl?: T['baseUrl'];\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   * Please don't use the Fetch client for Next.js applications. The `next`\n   * options won't have any effect.\n   *\n   * Install {@link https://www.npmjs.com/package/@hey-api/client-next `@hey-api/client-next`} instead.\n   */\n  next?: never;\n  /**\n   * Return the response data parsed in a specified format. By default, `auto`\n   * will infer the appropriate method from the `Content-Type` response header.\n   * You can override this behavior with any of the {@link Body} methods.\n   * Select `stream` if you don't want to parse response data at all.\n   *\n   * @default 'auto'\n   */\n  parseAs?: 'arrayBuffer' | 'auto' | 'blob' | 'formData' | 'json' | 'stream' | 'text';\n  /**\n   * Should we return only data or multiple fields (data, error, response, etc.)?\n   *\n   * @default 'fields'\n   */\n  responseStyle?: ResponseStyle;\n  /**\n   * Throw an error instead of returning it in the response?\n   *\n   * @default false\n   */\n  throwOnError?: T['throwOnError'];\n}\n\nexport interface RequestOptions<\n  TData = unknown,\n  TResponseStyle extends ResponseStyle = 'fields',\n  ThrowOnError extends boolean = boolean,\n  Url extends string = string,\n>\n  extends\n    Config<{\n      responseStyle: TResponseStyle;\n      throwOnError: ThrowOnError;\n    }>,\n    Pick<\n      ServerSentEventsOptions<TData>,\n      | 'onRequest'\n      | 'onSseError'\n      | 'onSseEvent'\n      | 'sseDefaultRetryDelay'\n      | 'sseMaxRetryAttempts'\n      | 'sseMaxRetryDelay'\n    > {\n  /**\n   * Any body that you want to add to your request.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/fetch#body}\n   */\n  body?: unknown;\n  path?: Record<string, unknown>;\n  query?: Record<string, unknown>;\n  /**\n   * Security mechanism(s) to use for the request.\n   */\n  security?: ReadonlyArray<Auth>;\n  url: Url;\n}\n\nexport interface ResolvedRequestOptions<\n  TResponseStyle extends ResponseStyle = 'fields',\n  ThrowOnError extends boolean = boolean,\n  Url extends string = string,\n> extends RequestOptions<unknown, TResponseStyle, ThrowOnError, Url> {\n  serializedBody?: string;\n}\n\nexport type RequestResult<\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = boolean,\n  TResponseStyle extends ResponseStyle = 'fields',\n> = ThrowOnError extends true\n  ? Promise<\n      TResponseStyle extends 'data'\n        ? TData extends Record<string, unknown>\n          ? TData[keyof TData]\n          : TData\n        : {\n            data: TData extends Record<string, unknown> ? TData[keyof TData] : TData;\n            request: Request;\n            response: Response;\n          }\n    >\n  : Promise<\n      TResponseStyle extends 'data'\n        ? (TData extends Record<string, unknown> ? TData[keyof TData] : TData) | undefined\n        : (\n            | {\n                data: TData extends Record<string, unknown> ? TData[keyof TData] : TData;\n                error: undefined;\n              }\n            | {\n                data: undefined;\n                error: TError extends Record<string, unknown> ? TError[keyof TError] : TError;\n              }\n          ) & {\n            request: Request;\n            response: Response;\n          }\n    >;\n\nexport interface ClientOptions {\n  baseUrl?: string;\n  responseStyle?: ResponseStyle;\n  throwOnError?: boolean;\n}\n\ntype MethodFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'>,\n) => RequestResult<TData, TError, ThrowOnError, TResponseStyle>;\n\ntype SseFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'>,\n) => Promise<ServerSentEventsResult<TData, TError>>;\n\ntype RequestFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'> &\n    Pick<Required<RequestOptions<TData, TResponseStyle, ThrowOnError>>, 'method'>,\n) => RequestResult<TData, TError, ThrowOnError, TResponseStyle>;\n\ntype BuildUrlFn = <\n  TData extends {\n    body?: unknown;\n    path?: Record<string, unknown>;\n    query?: Record<string, unknown>;\n    url: string;\n  },\n>(\n  options: TData & Options<TData>,\n) => string;\n\nexport type Client = CoreClient<RequestFn, Config, MethodFn, BuildUrlFn, SseFn> & {\n  interceptors: Middleware<Request, Response, unknown, ResolvedRequestOptions>;\n};\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 = ClientOptions> = (\n  override?: Config<ClientOptions & T>,\n) => Config<Required<ClientOptions> & T>;\n\nexport interface TDataShape {\n  body?: unknown;\n  headers?: unknown;\n  path?: unknown;\n  query?: unknown;\n  url: string;\n}\n\ntype OmitKeys<T, K> = Pick<T, Exclude<keyof T, K>>;\n\nexport type Options<\n  TData extends TDataShape = TDataShape,\n  ThrowOnError extends boolean = boolean,\n  TResponse = unknown,\n  TResponseStyle extends ResponseStyle = 'fields',\n> = OmitKeys<\n  RequestOptions<TResponse, TResponseStyle, ThrowOnError>,\n  'body' | 'path' | 'query' | 'url'\n> &\n  ([TData] extends [never] ? unknown : Omit<TData, 'url'>);\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@hey-api/client-fetch/sdk-nested-classes-instance/client/utils.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@hey-api/client-fetch/sdk-nested-classes-instance/client.gen.ts",
    "content": "// 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://api.example.com/v1' }));\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@hey-api/client-fetch/sdk-nested-classes-instance/core/auth.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@hey-api/client-fetch/sdk-nested-classes-instance/core/bodySerializer.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@hey-api/client-fetch/sdk-nested-classes-instance/core/params.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@hey-api/client-fetch/sdk-nested-classes-instance/core/pathSerializer.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@hey-api/client-fetch/sdk-nested-classes-instance/core/queryKeySerializer.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\n/**\n * JSON-friendly union that mirrors what Pinia Colada can hash.\n */\nexport type JsonValue =\n  | null\n  | string\n  | number\n  | boolean\n  | JsonValue[]\n  | { [key: string]: JsonValue };\n\n/**\n * Replacer that converts non-JSON values (bigint, Date, etc.) to safe substitutes.\n */\nexport const queryKeyJsonReplacer = (_key: string, value: unknown) => {\n  if (value === undefined || typeof value === 'function' || typeof value === 'symbol') {\n    return undefined;\n  }\n  if (typeof value === 'bigint') {\n    return value.toString();\n  }\n  if (value instanceof Date) {\n    return value.toISOString();\n  }\n  return value;\n};\n\n/**\n * Safely stringifies a value and parses it back into a JsonValue.\n */\nexport const stringifyToJsonValue = (input: unknown): JsonValue | undefined => {\n  try {\n    const json = JSON.stringify(input, queryKeyJsonReplacer);\n    if (json === undefined) {\n      return undefined;\n    }\n    return JSON.parse(json) as JsonValue;\n  } catch {\n    return undefined;\n  }\n};\n\n/**\n * Detects plain objects (including objects with a null prototype).\n */\nconst isPlainObject = (value: unknown): value is Record<string, unknown> => {\n  if (value === null || typeof value !== 'object') {\n    return false;\n  }\n  const prototype = Object.getPrototypeOf(value as object);\n  return prototype === Object.prototype || prototype === null;\n};\n\n/**\n * Turns URLSearchParams into a sorted JSON object for deterministic keys.\n */\nconst serializeSearchParams = (params: URLSearchParams): JsonValue => {\n  const entries = Array.from(params.entries()).sort(([a], [b]) => a.localeCompare(b));\n  const result: Record<string, JsonValue> = {};\n\n  for (const [key, value] of entries) {\n    const existing = result[key];\n    if (existing === undefined) {\n      result[key] = value;\n      continue;\n    }\n\n    if (Array.isArray(existing)) {\n      (existing as string[]).push(value);\n    } else {\n      result[key] = [existing, value];\n    }\n  }\n\n  return result;\n};\n\n/**\n * Normalizes any accepted value into a JSON-friendly shape for query keys.\n */\nexport const serializeQueryKeyValue = (value: unknown): JsonValue | undefined => {\n  if (value === null) {\n    return null;\n  }\n\n  if (typeof value === 'string' || typeof value === 'number' || typeof value === 'boolean') {\n    return value;\n  }\n\n  if (value === undefined || typeof value === 'function' || typeof value === 'symbol') {\n    return undefined;\n  }\n\n  if (typeof value === 'bigint') {\n    return value.toString();\n  }\n\n  if (value instanceof Date) {\n    return value.toISOString();\n  }\n\n  if (Array.isArray(value)) {\n    return stringifyToJsonValue(value);\n  }\n\n  if (typeof URLSearchParams !== 'undefined' && value instanceof URLSearchParams) {\n    return serializeSearchParams(value);\n  }\n\n  if (isPlainObject(value)) {\n    return stringifyToJsonValue(value);\n  }\n\n  return undefined;\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@hey-api/client-fetch/sdk-nested-classes-instance/core/serverSentEvents.gen.ts",
    "content": "// 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 const 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            // Normalize line endings: CRLF -> LF, then CR -> LF\n            buffer = buffer.replace(/\\r\\n/g, '\\n').replace(/\\r/g, '\\n');\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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@hey-api/client-fetch/sdk-nested-classes-instance/core/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { Auth, AuthToken } from './auth.gen';\nimport type { BodySerializer, QuerySerializer, QuerySerializerOptions } from './bodySerializer.gen';\n\nexport type HttpMethod =\n  | 'connect'\n  | 'delete'\n  | 'get'\n  | 'head'\n  | 'options'\n  | 'patch'\n  | 'post'\n  | 'put'\n  | 'trace';\n\nexport type Client<\n  RequestFn = never,\n  Config = unknown,\n  MethodFn = never,\n  BuildUrlFn = never,\n  SseFn = never,\n> = {\n  /**\n   * Returns the final request URL.\n   */\n  buildUrl: BuildUrlFn;\n  getConfig: () => Config;\n  request: RequestFn;\n  setConfig: (config: Config) => Config;\n} & {\n  [K in HttpMethod]: MethodFn;\n} & ([SseFn] extends [never] ? { sse?: never } : { sse: { [K in HttpMethod]: SseFn } });\n\nexport interface Config {\n  /**\n   * Auth token or a function returning auth token. The resolved value will be\n   * added to the request payload as defined by its `security` array.\n   */\n  auth?: ((auth: Auth) => Promise<AuthToken> | AuthToken) | AuthToken;\n  /**\n   * A function for serializing request body parameter. By default,\n   * {@link JSON.stringify()} will be used.\n   */\n  bodySerializer?: BodySerializer | null;\n  /**\n   * An object containing any HTTP headers that you want to pre-populate your\n   * `Headers` object with.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/Headers/Headers#init See more}\n   */\n  headers?:\n    | RequestInit['headers']\n    | Record<\n        string,\n        string | number | boolean | (string | number | boolean)[] | null | undefined | unknown\n      >;\n  /**\n   * The request method.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/fetch#method See more}\n   */\n  method?: Uppercase<HttpMethod>;\n  /**\n   * A function for serializing request query parameters. By default, arrays\n   * will be exploded in form style, objects will be exploded in deepObject\n   * style, and reserved characters are percent-encoded.\n   *\n   * This method will have no effect if the native `paramsSerializer()` Axios\n   * API function is used.\n   *\n   * {@link https://swagger.io/docs/specification/serialization/#query View examples}\n   */\n  querySerializer?: QuerySerializer | QuerySerializerOptions;\n  /**\n   * A function validating request data. This is useful if you want to ensure\n   * the request conforms to the desired shape, so it can be safely sent to\n   * the server.\n   */\n  requestValidator?: (data: unknown) => Promise<unknown>;\n  /**\n   * A function transforming response data before it's returned. This is useful\n   * for post-processing data, e.g. converting ISO strings into Date objects.\n   */\n  responseTransformer?: (data: unknown) => Promise<unknown>;\n  /**\n   * A function validating response data. This is useful if you want to ensure\n   * the response conforms to the desired shape, so it can be safely passed to\n   * the transformers and returned to the user.\n   */\n  responseValidator?: (data: unknown) => Promise<unknown>;\n}\n\ntype IsExactlyNeverOrNeverUndefined<T> = [T] extends [never]\n  ? true\n  : [T] extends [never | undefined]\n    ? [undefined] extends [T]\n      ? false\n      : true\n    : false;\n\nexport type OmitNever<T extends Record<string, unknown>> = {\n  [K in keyof T as IsExactlyNeverOrNeverUndefined<T[K]> extends true ? never : K]: T[K];\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@hey-api/client-fetch/sdk-nested-classes-instance/core/utils.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@hey-api/client-fetch/sdk-nested-classes-instance/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport { Business, Domains, NestedSdkWithInstance, type Options, Providers } from './sdk.gen';\nexport type { BusinessGetData, BusinessGetResponse, BusinessGetResponses, BusinessProvidersDomainsGetData, BusinessProvidersDomainsGetResponse, BusinessProvidersDomainsGetResponses, BusinessProvidersDomainsPostData, BusinessProvidersDomainsPostResponse, BusinessProvidersDomainsPostResponses, ClientOptions, GetData, GetResponse, GetResponses, PutBusinessProvidersDomainsData, PutBusinessProvidersDomainsResponse, PutBusinessProvidersDomainsResponses } from './types.gen';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@hey-api/client-fetch/sdk-nested-classes-instance/sdk.gen.ts",
    "content": "// 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 { BusinessGetData, BusinessGetResponses, BusinessProvidersDomainsGetData, BusinessProvidersDomainsGetResponses, BusinessProvidersDomainsPostData, BusinessProvidersDomainsPostResponses, GetData, GetResponses, PutBusinessProvidersDomainsData, PutBusinessProvidersDomainsResponses } from './types.gen';\n\nexport type Options<TData extends TDataShape = TDataShape, ThrowOnError extends boolean = boolean> = Options2<TData, ThrowOnError> & {\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\nclass HeyApiClient {\n    protected client: Client;\n    \n    constructor(args?: {\n        client?: Client;\n    }) {\n        this.client = args?.client ?? client;\n    }\n}\n\nclass HeyApiRegistry<T> {\n    private readonly defaultKey = 'default';\n    \n    private readonly instances: Map<string, T> = new Map();\n    \n    get(key?: string): T {\n        const instance = this.instances.get(key ?? this.defaultKey);\n        if (!instance) {\n            throw new Error(`No SDK client found. Create one with \"new NestedSdkWithInstance()\" to fix this error.`);\n        }\n        return instance;\n    }\n    \n    set(value: T, key?: string): void {\n        this.instances.set(key ?? this.defaultKey, value);\n    }\n}\n\nexport class Domains extends HeyApiClient {\n    public get<ThrowOnError extends boolean = false>(options?: Options<BusinessProvidersDomainsGetData, ThrowOnError>) {\n        return (options?.client ?? this.client).get<BusinessProvidersDomainsGetResponses, unknown, ThrowOnError>({ url: '/business/providers/domains', ...options });\n    }\n    \n    public post<ThrowOnError extends boolean = false>(options?: Options<BusinessProvidersDomainsPostData, ThrowOnError>) {\n        return (options?.client ?? this.client).post<BusinessProvidersDomainsPostResponses, unknown, ThrowOnError>({ url: '/business/providers/domains', ...options });\n    }\n}\n\nexport class Providers extends HeyApiClient {\n    private _domains?: Domains;\n    get domains(): Domains {\n        return this._domains ??= new Domains({ client: this.client });\n    }\n}\n\nexport class Business extends HeyApiClient {\n    public get<ThrowOnError extends boolean = false>(options?: Options<BusinessGetData, ThrowOnError>) {\n        return (options?.client ?? this.client).get<BusinessGetResponses, unknown, ThrowOnError>({ url: '/locations/businesses', ...options });\n    }\n    \n    private _providers?: Providers;\n    get providers(): Providers {\n        return this._providers ??= new Providers({ client: this.client });\n    }\n}\n\nexport class NestedSdkWithInstance extends HeyApiClient {\n    public static readonly __registry = new HeyApiRegistry<NestedSdkWithInstance>();\n    \n    constructor(args?: {\n        client?: Client;\n        key?: string;\n    }) {\n        super(args);\n        NestedSdkWithInstance.__registry.set(this, args?.key);\n    }\n    \n    public putBusinessProvidersDomains<ThrowOnError extends boolean = false>(options?: Options<PutBusinessProvidersDomainsData, ThrowOnError>) {\n        return (options?.client ?? this.client).put<PutBusinessProvidersDomainsResponses, unknown, ThrowOnError>({ url: '/business/providers/domains', ...options });\n    }\n    \n    public get<ThrowOnError extends boolean = false>(options?: Options<GetData, ThrowOnError>) {\n        return (options?.client ?? this.client).get<GetResponses, unknown, ThrowOnError>({ url: '/locations', ...options });\n    }\n    \n    private _business?: Business;\n    get business(): Business {\n        return this._business ??= new Business({ client: this.client });\n    }\n}\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@hey-api/client-fetch/sdk-nested-classes-instance/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type ClientOptions = {\n    baseUrl: 'https://api.example.com/v1' | (string & {});\n};\n\nexport type BusinessProvidersDomainsGetData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/business/providers/domains';\n};\n\nexport type BusinessProvidersDomainsGetResponses = {\n    /**\n     * OK\n     */\n    200: string;\n};\n\nexport type BusinessProvidersDomainsGetResponse = BusinessProvidersDomainsGetResponses[keyof BusinessProvidersDomainsGetResponses];\n\nexport type BusinessProvidersDomainsPostData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/business/providers/domains';\n};\n\nexport type BusinessProvidersDomainsPostResponses = {\n    /**\n     * OK\n     */\n    200: string;\n};\n\nexport type BusinessProvidersDomainsPostResponse = BusinessProvidersDomainsPostResponses[keyof BusinessProvidersDomainsPostResponses];\n\nexport type PutBusinessProvidersDomainsData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/business/providers/domains';\n};\n\nexport type PutBusinessProvidersDomainsResponses = {\n    /**\n     * OK\n     */\n    200: string;\n};\n\nexport type PutBusinessProvidersDomainsResponse = PutBusinessProvidersDomainsResponses[keyof PutBusinessProvidersDomainsResponses];\n\nexport type BusinessGetData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/locations/businesses';\n};\n\nexport type BusinessGetResponses = {\n    /**\n     * OK\n     */\n    200: string;\n};\n\nexport type BusinessGetResponse = BusinessGetResponses[keyof BusinessGetResponses];\n\nexport type GetData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/locations';\n};\n\nexport type GetResponses = {\n    /**\n     * OK\n     */\n    200: string;\n};\n\nexport type GetResponse = GetResponses[keyof GetResponses];\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@hey-api/schemas/default/schemas.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport const ExternalRefASchema = {\n    description: 'External ref to shared model (A)',\n    $ref: '#/definitions/ExternalSharedModel'\n} as const;\n\nexport const ExternalRefBSchema = {\n    description: 'External ref to shared model (B)',\n    $ref: '#/definitions/ExternalSharedModel'\n} as const;\n\nexport const CommentWithBreaksSchema = {\n    description: 'Testing multiline comments in string: First line\\nSecond line\\n\\nFourth line',\n    type: 'integer'\n} as const;\n\nexport const CommentWithBackticksSchema = {\n    description: 'Testing backticks in string: `backticks` and ```multiple backticks``` should work',\n    type: 'integer'\n} as const;\n\nexport const CommentWithBackticksAndQuotesSchema = {\n    description: 'Testing backticks and quotes in string: `backticks`, \\'quotes\\', \"double quotes\" and ```multiple backticks``` should work',\n    type: 'integer'\n} as const;\n\nexport const CommentWithSlashesSchema = {\n    description: 'Testing slashes in string: \\\\backwards\\\\\\\\\\\\ and /forwards/// should work',\n    type: 'integer'\n} as const;\n\nexport const CommentWithExpressionPlaceholdersSchema = {\n    description: 'Testing expression placeholders in string: ${expression} should work',\n    type: 'integer'\n} as const;\n\nexport const CommentWithQuotesSchema = {\n    description: 'Testing quotes in string: \\'single quote\\'\\'\\' and \"double quotes\"\"\" should work',\n    type: 'integer'\n} as const;\n\nexport const CommentWithReservedCharactersSchema = {\n    description: 'Testing reserved characters in string: /* inline */ and /** inline **/ should work',\n    type: 'integer'\n} as const;\n\nexport const SimpleIntegerSchema = {\n    description: 'This is a simple number',\n    type: 'integer'\n} as const;\n\nexport const SimpleBooleanSchema = {\n    description: 'This is a simple boolean',\n    type: 'boolean'\n} as const;\n\nexport const SimpleStringSchema = {\n    description: 'This is a simple string',\n    type: 'string'\n} as const;\n\nexport const NonAsciiStringæøåÆØÅöôêÊ字符串Schema = {\n    description: 'A string with non-ascii (unicode) characters valid in typescript identifiers (æøåÆØÅöÔèÈ字符串)',\n    type: 'string'\n} as const;\n\nexport const SimpleFileSchema = {\n    description: 'This is a simple file',\n    format: 'binary',\n    type: 'string'\n} as const;\n\nexport const SimpleReferenceSchema = {\n    description: 'This is a simple reference',\n    $ref: '#/definitions/ModelWithString'\n} as const;\n\nexport const SimpleStringWithPatternSchema = {\n    description: 'This is a simple string',\n    type: 'string',\n    maxLength: 64,\n    pattern: '^[a-zA-Z0-9_]*$'\n} as const;\n\nexport const EnumWithStringsSchema = {\n    description: 'This is a simple enum with strings',\n    enum: [\n        'Success',\n        'Warning',\n        'Error',\n        '\\'Single Quote\\'',\n        '\"Double Quotes\"',\n        'Non-ascii: øæåôöØÆÅÔÖ字符串'\n    ]\n} as const;\n\nexport const EnumWithNumbersSchema = {\n    description: 'This is a simple enum with numbers',\n    enum: [\n        1,\n        2,\n        3,\n        1.1,\n        1.2,\n        1.3,\n        100,\n        200,\n        300,\n        -100,\n        -200,\n        -300,\n        -1.1,\n        -1.2,\n        -1.3\n    ]\n} as const;\n\nexport const EnumFromDescriptionSchema = {\n    description: 'Success=1,Warning=2,Error=3',\n    type: 'number'\n} as const;\n\nexport const EnumWithExtensionsSchema = {\n    description: 'This is a simple enum with numbers',\n    enum: [\n        200,\n        400,\n        500\n    ],\n    'x-enum-varnames': [\n        'CUSTOM_SUCCESS',\n        'CUSTOM_WARNING',\n        'CUSTOM_ERROR'\n    ],\n    'x-enum-descriptions': [\n        'Used when the status of something is successful',\n        'Used when the status of something has a warning',\n        'Used when the status of something has an error'\n    ]\n} as const;\n\nexport const ArrayWithNumbersSchema = {\n    description: 'This is a simple array with numbers',\n    type: 'array',\n    items: {\n        type: 'integer'\n    }\n} as const;\n\nexport const ArrayWithBooleansSchema = {\n    description: 'This is a simple array with booleans',\n    type: 'array',\n    items: {\n        type: 'boolean'\n    }\n} as const;\n\nexport const ArrayWithStringsSchema = {\n    description: 'This is a simple array with strings',\n    type: 'array',\n    items: {\n        type: 'string'\n    }\n} as const;\n\nexport const ArrayWithReferencesSchema = {\n    description: 'This is a simple array with references',\n    type: 'array',\n    items: {\n        $ref: '#/definitions/ModelWithString'\n    }\n} as const;\n\nexport const ArrayWithArraySchema = {\n    description: 'This is a simple array containing an array',\n    type: 'array',\n    items: {\n        type: 'array',\n        items: {\n            $ref: '#/definitions/ModelWithString'\n        }\n    }\n} as const;\n\nexport const ArrayWithPropertiesSchema = {\n    description: 'This is a simple array with properties',\n    type: 'array',\n    items: {\n        type: 'object',\n        properties: {\n            foo: {\n                type: 'string'\n            },\n            bar: {\n                type: 'string'\n            }\n        }\n    }\n} as const;\n\nexport const DictionaryWithStringSchema = {\n    description: 'This is a string dictionary',\n    type: 'object',\n    additionalProperties: {\n        type: 'string'\n    }\n} as const;\n\nexport const DictionaryWithReferenceSchema = {\n    description: 'This is a string reference',\n    type: 'object',\n    additionalProperties: {\n        $ref: '#/definitions/ModelWithString'\n    }\n} as const;\n\nexport const DictionaryWithArraySchema = {\n    description: 'This is a complex dictionary',\n    type: 'object',\n    additionalProperties: {\n        type: 'array',\n        items: {\n            $ref: '#/definitions/ModelWithString'\n        }\n    }\n} as const;\n\nexport const DictionaryWithDictionarySchema = {\n    description: 'This is a string dictionary',\n    type: 'object',\n    additionalProperties: {\n        type: 'object',\n        additionalProperties: {\n            type: 'string'\n        }\n    }\n} as const;\n\nexport const DictionaryWithPropertiesSchema = {\n    description: 'This is a complex dictionary',\n    type: 'object',\n    additionalProperties: {\n        type: 'object',\n        properties: {\n            foo: {\n                type: 'string'\n            },\n            bar: {\n                type: 'string'\n            }\n        }\n    }\n} as const;\n\nexport const DateSchema = {\n    description: 'This is a type-only model that defines Date as a string',\n    type: 'string'\n} as const;\n\nexport const ModelWithIntegerSchema = {\n    description: 'This is a model with one number property',\n    type: 'object',\n    properties: {\n        prop: {\n            description: 'This is a simple number property',\n            type: 'integer'\n        }\n    }\n} as const;\n\nexport const ModelWithBooleanSchema = {\n    description: 'This is a model with one boolean property',\n    type: 'object',\n    properties: {\n        prop: {\n            description: 'This is a simple boolean property',\n            type: 'boolean'\n        }\n    }\n} as const;\n\nexport const ModelWithStringSchema = {\n    description: 'This is a model with one string property',\n    type: 'object',\n    properties: {\n        prop: {\n            description: 'This is a simple string property',\n            type: 'string'\n        }\n    }\n} as const;\n\nexport const ModelWithStringErrorSchema = {\n    description: 'This is a model with one string property',\n    type: 'object',\n    properties: {\n        prop: {\n            description: 'This is a simple string property',\n            type: 'string'\n        }\n    }\n} as const;\n\nexport const ModelWithNullableStringSchema = {\n    description: 'This is a model with one string property',\n    type: 'object',\n    required: [\n        'nullableRequiredProp'\n    ],\n    properties: {\n        nullableProp: {\n            description: 'This is a simple string property',\n            type: 'string',\n            'x-nullable': true\n        },\n        nullableRequiredProp: {\n            description: 'This is a simple string property',\n            type: 'string',\n            'x-nullable': true\n        }\n    }\n} as const;\n\nexport const ModelWithEnumSchema = {\n    description: 'This is a model with one enum',\n    type: 'object',\n    properties: {\n        test: {\n            description: 'This is a simple enum with strings',\n            enum: [\n                'Success',\n                'Warning',\n                'Error',\n                'ØÆÅ字符串'\n            ]\n        },\n        statusCode: {\n            description: 'These are the HTTP error code enums',\n            enum: [\n                '100',\n                '200 FOO',\n                '300 FOO_BAR',\n                '400 foo-bar',\n                '500 foo.bar',\n                '600 foo&bar'\n            ]\n        },\n        bool: {\n            description: 'Simple boolean enum',\n            type: 'boolean',\n            enum: [\n                true\n            ]\n        }\n    }\n} as const;\n\nexport const ModelWithEnumFromDescriptionSchema = {\n    description: 'This is a model with one enum',\n    type: 'object',\n    properties: {\n        test: {\n            type: 'integer',\n            description: 'Success=1,Warning=2,Error=3'\n        }\n    }\n} as const;\n\nexport const ModelWithNestedEnumsSchema = {\n    description: 'This is a model with nested enums',\n    type: 'object',\n    properties: {\n        dictionaryWithEnum: {\n            type: 'object',\n            additionalProperties: {\n                enum: [\n                    'Success',\n                    'Warning',\n                    'Error'\n                ]\n            }\n        },\n        dictionaryWithEnumFromDescription: {\n            type: 'object',\n            additionalProperties: {\n                type: 'integer',\n                description: 'Success=1,Warning=2,Error=3'\n            }\n        },\n        arrayWithEnum: {\n            type: 'array',\n            items: {\n                enum: [\n                    'Success',\n                    'Warning',\n                    'Error'\n                ]\n            }\n        },\n        arrayWithDescription: {\n            type: 'array',\n            items: {\n                type: 'integer',\n                description: 'Success=1,Warning=2,Error=3'\n            }\n        }\n    }\n} as const;\n\nexport const ModelWithReferenceSchema = {\n    description: 'This is a model with one property containing a reference',\n    type: 'object',\n    properties: {\n        prop: {\n            $ref: '#/definitions/ModelWithProperties'\n        }\n    }\n} as const;\n\nexport const ModelWithArraySchema = {\n    description: 'This is a model with one property containing an array',\n    type: 'object',\n    properties: {\n        prop: {\n            type: 'array',\n            items: {\n                $ref: '#/definitions/ModelWithString'\n            }\n        },\n        propWithFile: {\n            type: 'array',\n            items: {\n                format: 'binary',\n                type: 'string'\n            }\n        },\n        propWithNumber: {\n            type: 'array',\n            items: {\n                type: 'number'\n            }\n        }\n    }\n} as const;\n\nexport const ModelWithDictionarySchema = {\n    description: 'This is a model with one property containing a dictionary',\n    type: 'object',\n    properties: {\n        prop: {\n            type: 'object',\n            additionalProperties: {\n                type: 'string'\n            }\n        }\n    }\n} as const;\n\nexport const ModelWithCircularReferenceSchema = {\n    description: 'This is a model with one property containing a circular reference',\n    type: 'object',\n    properties: {\n        prop: {\n            $ref: '#/definitions/ModelWithCircularReference'\n        }\n    }\n} as const;\n\nexport const ModelWithPropertiesSchema = {\n    description: 'This is a model with one nested property',\n    type: 'object',\n    required: [\n        'required',\n        'requiredAndReadOnly'\n    ],\n    properties: {\n        required: {\n            type: 'string'\n        },\n        requiredAndReadOnly: {\n            type: 'string',\n            readOnly: true\n        },\n        string: {\n            type: 'string'\n        },\n        number: {\n            type: 'number'\n        },\n        boolean: {\n            type: 'boolean'\n        },\n        reference: {\n            $ref: '#/definitions/ModelWithString'\n        },\n        'property with space': {\n            type: 'string'\n        },\n        default: {\n            type: 'string'\n        },\n        try: {\n            type: 'string'\n        },\n        '@namespace.string': {\n            type: 'string',\n            readOnly: true\n        },\n        '@namespace.integer': {\n            type: 'integer',\n            readOnly: true\n        }\n    }\n} as const;\n\nexport const ModelWithNestedPropertiesSchema = {\n    description: 'This is a model with one nested property',\n    type: 'object',\n    required: [\n        'first'\n    ],\n    properties: {\n        first: {\n            type: 'object',\n            required: [\n                'second'\n            ],\n            readOnly: true,\n            properties: {\n                second: {\n                    type: 'object',\n                    required: [\n                        'third'\n                    ],\n                    readOnly: true,\n                    properties: {\n                        third: {\n                            type: 'string',\n                            readOnly: true\n                        }\n                    }\n                }\n            }\n        }\n    }\n} as const;\n\nexport const ModelWithDuplicatePropertiesSchema = {\n    description: 'This is a model with duplicated properties',\n    type: 'object',\n    properties: {\n        prop: {\n            $ref: '#/definitions/ModelWithString'\n        }\n    }\n} as const;\n\nexport const ModelWithOrderedPropertiesSchema = {\n    description: 'This is a model with ordered properties',\n    type: 'object',\n    properties: {\n        zebra: {\n            type: 'string'\n        },\n        apple: {\n            type: 'string'\n        },\n        hawaii: {\n            type: 'string'\n        }\n    }\n} as const;\n\nexport const ModelWithDuplicateImportsSchema = {\n    description: 'This is a model with duplicated imports',\n    type: 'object',\n    properties: {\n        propA: {\n            $ref: '#/definitions/ModelWithString'\n        },\n        propB: {\n            $ref: '#/definitions/ModelWithString'\n        },\n        propC: {\n            $ref: '#/definitions/ModelWithString'\n        }\n    }\n} as const;\n\nexport const ModelThatExtendsSchema = {\n    description: 'This is a model that extends another model',\n    type: 'object',\n    allOf: [\n        {\n            $ref: '#/definitions/ModelWithString'\n        },\n        {\n            type: 'object',\n            properties: {\n                propExtendsA: {\n                    type: 'string'\n                },\n                propExtendsB: {\n                    $ref: '#/definitions/ModelWithString'\n                }\n            }\n        }\n    ]\n} as const;\n\nexport const ModelThatExtendsExtendsSchema = {\n    description: 'This is a model that extends another model',\n    type: 'object',\n    allOf: [\n        {\n            $ref: '#/definitions/ModelWithString'\n        },\n        {\n            $ref: '#/definitions/ModelThatExtends'\n        },\n        {\n            type: 'object',\n            properties: {\n                propExtendsC: {\n                    type: 'string'\n                },\n                propExtendsD: {\n                    $ref: '#/definitions/ModelWithString'\n                }\n            }\n        }\n    ]\n} as const;\n\nexport const defaultSchema = {\n    type: 'object',\n    properties: {\n        name: {\n            type: 'string'\n        }\n    }\n} as const;\n\nexport const ModelWithPatternSchema = {\n    description: 'This is a model that contains a some patterns',\n    type: 'object',\n    required: [\n        'key',\n        'name'\n    ],\n    properties: {\n        key: {\n            maxLength: 64,\n            pattern: '^[a-zA-Z0-9_]*$',\n            type: 'string'\n        },\n        name: {\n            maxLength: 255,\n            type: 'string'\n        },\n        enabled: {\n            type: 'boolean',\n            readOnly: true\n        },\n        modified: {\n            type: 'string',\n            format: 'date-time',\n            readOnly: true\n        },\n        id: {\n            type: 'string',\n            pattern: '^\\\\d{2}-\\\\d{3}-\\\\d{4}$'\n        },\n        text: {\n            type: 'string',\n            pattern: '^\\\\w+$'\n        },\n        patternWithSingleQuotes: {\n            type: 'string',\n            pattern: '^[a-zA-Z0-9\\']*$'\n        },\n        patternWithNewline: {\n            type: 'string',\n            pattern: 'aaa\\\\nbbb'\n        },\n        patternWithBacktick: {\n            type: 'string',\n            pattern: 'aaa`bbb'\n        },\n        patternWithUnicode: {\n            type: 'string',\n            pattern: '^\\\\p{L}+$'\n        }\n    }\n} as const;\n\nexport const parameter_ActivityParamsSchema = {\n    type: 'object',\n    properties: {\n        description: {\n            type: 'string'\n        },\n        graduate_id: {\n            type: 'integer'\n        },\n        organization_id: {\n            type: 'integer'\n        },\n        parent_activity: {\n            type: 'integer'\n        },\n        post_id: {\n            type: 'integer'\n        }\n    }\n} as const;\n\nexport const response_PostActivityResponseSchema = {\n    type: 'object',\n    properties: {\n        description: {\n            type: 'string'\n        },\n        graduate_id: {\n            type: 'integer'\n        },\n        organization_id: {\n            type: 'integer'\n        },\n        parent_activity_id: {\n            type: 'integer'\n        },\n        post_id: {\n            type: 'integer'\n        }\n    }\n} as const;\n\nexport const failure_FailureSchema = {\n    type: 'object',\n    properties: {\n        error: {\n            type: 'string'\n        },\n        message: {\n            type: 'string'\n        },\n        reference_code: {\n            type: 'string'\n        }\n    }\n} as const;\n\nexport const ExternalSharedModelSchema = {\n    type: 'object',\n    properties: {\n        id: {\n            type: 'string'\n        },\n        name: {\n            type: 'string'\n        }\n    },\n    required: [\n        'id'\n    ]\n} as const;\n\nexport const ModelWithReferenceWritableSchema = {\n    description: 'This is a model with one property containing a reference',\n    type: 'object',\n    properties: {\n        prop: {\n            $ref: '#/definitions/ModelWithPropertiesWritable'\n        }\n    }\n} as const;\n\nexport const ModelWithPropertiesWritableSchema = {\n    description: 'This is a model with one nested property',\n    type: 'object',\n    required: [\n        'required'\n    ],\n    properties: {\n        required: {\n            type: 'string'\n        },\n        string: {\n            type: 'string'\n        },\n        number: {\n            type: 'number'\n        },\n        boolean: {\n            type: 'boolean'\n        },\n        reference: {\n            $ref: '#/definitions/ModelWithString'\n        },\n        'property with space': {\n            type: 'string'\n        },\n        default: {\n            type: 'string'\n        },\n        try: {\n            type: 'string'\n        }\n    }\n} as const;\n\nexport const ModelWithPatternWritableSchema = {\n    description: 'This is a model that contains a some patterns',\n    type: 'object',\n    required: [\n        'key',\n        'name'\n    ],\n    properties: {\n        key: {\n            maxLength: 64,\n            pattern: '^[a-zA-Z0-9_]*$',\n            type: 'string'\n        },\n        name: {\n            maxLength: 255,\n            type: 'string'\n        },\n        id: {\n            type: 'string',\n            pattern: '^\\\\d{2}-\\\\d{3}-\\\\d{4}$'\n        },\n        text: {\n            type: 'string',\n            pattern: '^\\\\w+$'\n        },\n        patternWithSingleQuotes: {\n            type: 'string',\n            pattern: '^[a-zA-Z0-9\\']*$'\n        },\n        patternWithNewline: {\n            type: 'string',\n            pattern: 'aaa\\\\nbbb'\n        },\n        patternWithBacktick: {\n            type: 'string',\n            pattern: 'aaa`bbb'\n        },\n        patternWithUnicode: {\n            type: 'string',\n            pattern: '^\\\\p{L}+$'\n        }\n    }\n} as const;\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@hey-api/sdk/default/client/client.gen.ts",
    "content": "// 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 (options: RequestOptions) => {\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 url = buildUrl(opts);\n\n    return { opts, url };\n  };\n\n  const request: Client['request'] = async (options) => {\n    // @ts-expect-error\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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@hey-api/sdk/default/client/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type { Auth } from '../core/auth.gen';\nexport type { QuerySerializerOptions } from '../core/bodySerializer.gen';\nexport {\n  formDataBodySerializer,\n  jsonBodySerializer,\n  urlSearchParamsBodySerializer,\n} from '../core/bodySerializer.gen';\nexport { buildClientParams } from '../core/params.gen';\nexport { serializeQueryKeyValue } from '../core/queryKeySerializer.gen';\nexport { createClient } from './client.gen';\nexport type {\n  Client,\n  ClientOptions,\n  Config,\n  CreateClientConfig,\n  Options,\n  RequestOptions,\n  RequestResult,\n  ResolvedRequestOptions,\n  ResponseStyle,\n  TDataShape,\n} from './types.gen';\nexport { createConfig, mergeHeaders } from './utils.gen';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@hey-api/sdk/default/client/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { Auth } from '../core/auth.gen';\nimport type {\n  ServerSentEventsOptions,\n  ServerSentEventsResult,\n} from '../core/serverSentEvents.gen';\nimport type { Client as CoreClient, Config as CoreConfig } from '../core/types.gen';\nimport type { Middleware } from './utils.gen';\n\nexport type ResponseStyle = 'data' | 'fields';\n\nexport interface Config<T extends ClientOptions = ClientOptions>\n  extends Omit<RequestInit, 'body' | 'headers' | 'method'>, CoreConfig {\n  /**\n   * Base URL for all requests made by this client.\n   */\n  baseUrl?: T['baseUrl'];\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   * Please don't use the Fetch client for Next.js applications. The `next`\n   * options won't have any effect.\n   *\n   * Install {@link https://www.npmjs.com/package/@hey-api/client-next `@hey-api/client-next`} instead.\n   */\n  next?: never;\n  /**\n   * Return the response data parsed in a specified format. By default, `auto`\n   * will infer the appropriate method from the `Content-Type` response header.\n   * You can override this behavior with any of the {@link Body} methods.\n   * Select `stream` if you don't want to parse response data at all.\n   *\n   * @default 'auto'\n   */\n  parseAs?: 'arrayBuffer' | 'auto' | 'blob' | 'formData' | 'json' | 'stream' | 'text';\n  /**\n   * Should we return only data or multiple fields (data, error, response, etc.)?\n   *\n   * @default 'fields'\n   */\n  responseStyle?: ResponseStyle;\n  /**\n   * Throw an error instead of returning it in the response?\n   *\n   * @default false\n   */\n  throwOnError?: T['throwOnError'];\n}\n\nexport interface RequestOptions<\n  TData = unknown,\n  TResponseStyle extends ResponseStyle = 'fields',\n  ThrowOnError extends boolean = boolean,\n  Url extends string = string,\n>\n  extends\n    Config<{\n      responseStyle: TResponseStyle;\n      throwOnError: ThrowOnError;\n    }>,\n    Pick<\n      ServerSentEventsOptions<TData>,\n      | 'onRequest'\n      | 'onSseError'\n      | 'onSseEvent'\n      | 'sseDefaultRetryDelay'\n      | 'sseMaxRetryAttempts'\n      | 'sseMaxRetryDelay'\n    > {\n  /**\n   * Any body that you want to add to your request.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/fetch#body}\n   */\n  body?: unknown;\n  path?: Record<string, unknown>;\n  query?: Record<string, unknown>;\n  /**\n   * Security mechanism(s) to use for the request.\n   */\n  security?: ReadonlyArray<Auth>;\n  url: Url;\n}\n\nexport interface ResolvedRequestOptions<\n  TResponseStyle extends ResponseStyle = 'fields',\n  ThrowOnError extends boolean = boolean,\n  Url extends string = string,\n> extends RequestOptions<unknown, TResponseStyle, ThrowOnError, Url> {\n  serializedBody?: string;\n}\n\nexport type RequestResult<\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = boolean,\n  TResponseStyle extends ResponseStyle = 'fields',\n> = ThrowOnError extends true\n  ? Promise<\n      TResponseStyle extends 'data'\n        ? TData extends Record<string, unknown>\n          ? TData[keyof TData]\n          : TData\n        : {\n            data: TData extends Record<string, unknown> ? TData[keyof TData] : TData;\n            request: Request;\n            response: Response;\n          }\n    >\n  : Promise<\n      TResponseStyle extends 'data'\n        ? (TData extends Record<string, unknown> ? TData[keyof TData] : TData) | undefined\n        : (\n            | {\n                data: TData extends Record<string, unknown> ? TData[keyof TData] : TData;\n                error: undefined;\n              }\n            | {\n                data: undefined;\n                error: TError extends Record<string, unknown> ? TError[keyof TError] : TError;\n              }\n          ) & {\n            request: Request;\n            response: Response;\n          }\n    >;\n\nexport interface ClientOptions {\n  baseUrl?: string;\n  responseStyle?: ResponseStyle;\n  throwOnError?: boolean;\n}\n\ntype MethodFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'>,\n) => RequestResult<TData, TError, ThrowOnError, TResponseStyle>;\n\ntype SseFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'>,\n) => Promise<ServerSentEventsResult<TData, TError>>;\n\ntype RequestFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'> &\n    Pick<Required<RequestOptions<TData, TResponseStyle, ThrowOnError>>, 'method'>,\n) => RequestResult<TData, TError, ThrowOnError, TResponseStyle>;\n\ntype BuildUrlFn = <\n  TData extends {\n    body?: unknown;\n    path?: Record<string, unknown>;\n    query?: Record<string, unknown>;\n    url: string;\n  },\n>(\n  options: TData & Options<TData>,\n) => string;\n\nexport type Client = CoreClient<RequestFn, Config, MethodFn, BuildUrlFn, SseFn> & {\n  interceptors: Middleware<Request, Response, unknown, ResolvedRequestOptions>;\n};\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 = ClientOptions> = (\n  override?: Config<ClientOptions & T>,\n) => Config<Required<ClientOptions> & T>;\n\nexport interface TDataShape {\n  body?: unknown;\n  headers?: unknown;\n  path?: unknown;\n  query?: unknown;\n  url: string;\n}\n\ntype OmitKeys<T, K> = Pick<T, Exclude<keyof T, K>>;\n\nexport type Options<\n  TData extends TDataShape = TDataShape,\n  ThrowOnError extends boolean = boolean,\n  TResponse = unknown,\n  TResponseStyle extends ResponseStyle = 'fields',\n> = OmitKeys<\n  RequestOptions<TResponse, TResponseStyle, ThrowOnError>,\n  'body' | 'path' | 'query' | 'url'\n> &\n  ([TData] extends [never] ? unknown : Omit<TData, 'url'>);\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@hey-api/sdk/default/client/utils.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@hey-api/sdk/default/client.gen.ts",
    "content": "// 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: 'http://localhost:3000/base' }));\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@hey-api/sdk/default/core/auth.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@hey-api/sdk/default/core/bodySerializer.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@hey-api/sdk/default/core/params.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@hey-api/sdk/default/core/pathSerializer.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@hey-api/sdk/default/core/queryKeySerializer.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\n/**\n * JSON-friendly union that mirrors what Pinia Colada can hash.\n */\nexport type JsonValue =\n  | null\n  | string\n  | number\n  | boolean\n  | JsonValue[]\n  | { [key: string]: JsonValue };\n\n/**\n * Replacer that converts non-JSON values (bigint, Date, etc.) to safe substitutes.\n */\nexport const queryKeyJsonReplacer = (_key: string, value: unknown) => {\n  if (value === undefined || typeof value === 'function' || typeof value === 'symbol') {\n    return undefined;\n  }\n  if (typeof value === 'bigint') {\n    return value.toString();\n  }\n  if (value instanceof Date) {\n    return value.toISOString();\n  }\n  return value;\n};\n\n/**\n * Safely stringifies a value and parses it back into a JsonValue.\n */\nexport const stringifyToJsonValue = (input: unknown): JsonValue | undefined => {\n  try {\n    const json = JSON.stringify(input, queryKeyJsonReplacer);\n    if (json === undefined) {\n      return undefined;\n    }\n    return JSON.parse(json) as JsonValue;\n  } catch {\n    return undefined;\n  }\n};\n\n/**\n * Detects plain objects (including objects with a null prototype).\n */\nconst isPlainObject = (value: unknown): value is Record<string, unknown> => {\n  if (value === null || typeof value !== 'object') {\n    return false;\n  }\n  const prototype = Object.getPrototypeOf(value as object);\n  return prototype === Object.prototype || prototype === null;\n};\n\n/**\n * Turns URLSearchParams into a sorted JSON object for deterministic keys.\n */\nconst serializeSearchParams = (params: URLSearchParams): JsonValue => {\n  const entries = Array.from(params.entries()).sort(([a], [b]) => a.localeCompare(b));\n  const result: Record<string, JsonValue> = {};\n\n  for (const [key, value] of entries) {\n    const existing = result[key];\n    if (existing === undefined) {\n      result[key] = value;\n      continue;\n    }\n\n    if (Array.isArray(existing)) {\n      (existing as string[]).push(value);\n    } else {\n      result[key] = [existing, value];\n    }\n  }\n\n  return result;\n};\n\n/**\n * Normalizes any accepted value into a JSON-friendly shape for query keys.\n */\nexport const serializeQueryKeyValue = (value: unknown): JsonValue | undefined => {\n  if (value === null) {\n    return null;\n  }\n\n  if (typeof value === 'string' || typeof value === 'number' || typeof value === 'boolean') {\n    return value;\n  }\n\n  if (value === undefined || typeof value === 'function' || typeof value === 'symbol') {\n    return undefined;\n  }\n\n  if (typeof value === 'bigint') {\n    return value.toString();\n  }\n\n  if (value instanceof Date) {\n    return value.toISOString();\n  }\n\n  if (Array.isArray(value)) {\n    return stringifyToJsonValue(value);\n  }\n\n  if (typeof URLSearchParams !== 'undefined' && value instanceof URLSearchParams) {\n    return serializeSearchParams(value);\n  }\n\n  if (isPlainObject(value)) {\n    return stringifyToJsonValue(value);\n  }\n\n  return undefined;\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@hey-api/sdk/default/core/serverSentEvents.gen.ts",
    "content": "// 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 const 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            // Normalize line endings: CRLF -> LF, then CR -> LF\n            buffer = buffer.replace(/\\r\\n/g, '\\n').replace(/\\r/g, '\\n');\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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@hey-api/sdk/default/core/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { Auth, AuthToken } from './auth.gen';\nimport type { BodySerializer, QuerySerializer, QuerySerializerOptions } from './bodySerializer.gen';\n\nexport type HttpMethod =\n  | 'connect'\n  | 'delete'\n  | 'get'\n  | 'head'\n  | 'options'\n  | 'patch'\n  | 'post'\n  | 'put'\n  | 'trace';\n\nexport type Client<\n  RequestFn = never,\n  Config = unknown,\n  MethodFn = never,\n  BuildUrlFn = never,\n  SseFn = never,\n> = {\n  /**\n   * Returns the final request URL.\n   */\n  buildUrl: BuildUrlFn;\n  getConfig: () => Config;\n  request: RequestFn;\n  setConfig: (config: Config) => Config;\n} & {\n  [K in HttpMethod]: MethodFn;\n} & ([SseFn] extends [never] ? { sse?: never } : { sse: { [K in HttpMethod]: SseFn } });\n\nexport interface Config {\n  /**\n   * Auth token or a function returning auth token. The resolved value will be\n   * added to the request payload as defined by its `security` array.\n   */\n  auth?: ((auth: Auth) => Promise<AuthToken> | AuthToken) | AuthToken;\n  /**\n   * A function for serializing request body parameter. By default,\n   * {@link JSON.stringify()} will be used.\n   */\n  bodySerializer?: BodySerializer | null;\n  /**\n   * An object containing any HTTP headers that you want to pre-populate your\n   * `Headers` object with.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/Headers/Headers#init See more}\n   */\n  headers?:\n    | RequestInit['headers']\n    | Record<\n        string,\n        string | number | boolean | (string | number | boolean)[] | null | undefined | unknown\n      >;\n  /**\n   * The request method.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/fetch#method See more}\n   */\n  method?: Uppercase<HttpMethod>;\n  /**\n   * A function for serializing request query parameters. By default, arrays\n   * will be exploded in form style, objects will be exploded in deepObject\n   * style, and reserved characters are percent-encoded.\n   *\n   * This method will have no effect if the native `paramsSerializer()` Axios\n   * API function is used.\n   *\n   * {@link https://swagger.io/docs/specification/serialization/#query View examples}\n   */\n  querySerializer?: QuerySerializer | QuerySerializerOptions;\n  /**\n   * A function validating request data. This is useful if you want to ensure\n   * the request conforms to the desired shape, so it can be safely sent to\n   * the server.\n   */\n  requestValidator?: (data: unknown) => Promise<unknown>;\n  /**\n   * A function transforming response data before it's returned. This is useful\n   * for post-processing data, e.g. converting ISO strings into Date objects.\n   */\n  responseTransformer?: (data: unknown) => Promise<unknown>;\n  /**\n   * A function validating response data. This is useful if you want to ensure\n   * the response conforms to the desired shape, so it can be safely passed to\n   * the transformers and returned to the user.\n   */\n  responseValidator?: (data: unknown) => Promise<unknown>;\n}\n\ntype IsExactlyNeverOrNeverUndefined<T> = [T] extends [never]\n  ? true\n  : [T] extends [never | undefined]\n    ? [undefined] extends [T]\n      ? false\n      : true\n    : false;\n\nexport type OmitNever<T extends Record<string, unknown>> = {\n  [K in keyof T as IsExactlyNeverOrNeverUndefined<T[K]> extends true ? never : K]: T[K];\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@hey-api/sdk/default/core/utils.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@hey-api/sdk/default/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport { callToTestOrderOfParams, callWithDefaultOptionalParameters, callWithDefaultParameters, callWithDescriptions, callWithDuplicateResponses, callWithNoContentResponse, callWithParameters, callWithResponse, callWithResponseAndNoContentResponse, callWithResponses, callWithResultFromHeader, callWithWeirdParameterNames, collectionFormat, complexTypes, deleteCallWithoutParametersAndResponse, dummyA, dummyB, duplicateName, duplicateName2, duplicateName3, duplicateName4, fooWow, getCallWithoutParametersAndResponse, headCallWithoutParametersAndResponse, nonAsciiæøåÆøÅöôêÊ字符串, type Options, optionsCallWithoutParametersAndResponse, patchApiVbyApiVersionNoTag, patchCallWithoutParametersAndResponse, postApiVbyApiVersionBody, postCallWithoutParametersAndResponse, putCallWithoutParametersAndResponse, serviceWithEmptyTag, testErrorCode, types } from './sdk.gen';\nexport type { ArrayWithArray, ArrayWithBooleans, ArrayWithNumbers, ArrayWithProperties, ArrayWithReferences, ArrayWithStrings, CallToTestOrderOfParamsData, CallWithDefaultOptionalParametersData, CallWithDefaultParametersData, CallWithDescriptionsData, CallWithDuplicateResponsesData, CallWithDuplicateResponsesError, CallWithDuplicateResponsesErrors, CallWithDuplicateResponsesResponse, CallWithDuplicateResponsesResponses, CallWithNoContentResponseData, CallWithNoContentResponseResponses, CallWithParametersData, CallWithResponseAndNoContentResponseData, CallWithResponseAndNoContentResponseResponse, CallWithResponseAndNoContentResponseResponses, CallWithResponseData, CallWithResponseResponse, CallWithResponseResponses, CallWithResponsesData, CallWithResponsesError, CallWithResponsesErrors, CallWithResponsesResponse, CallWithResponsesResponses, CallWithResultFromHeaderData, CallWithResultFromHeaderErrors, CallWithResultFromHeaderResponses, CallWithWeirdParameterNamesData, ClientOptions, CollectionFormatData, CommentWithBackticks, CommentWithBackticksAndQuotes, CommentWithBreaks, CommentWithExpressionPlaceholders, CommentWithQuotes, CommentWithReservedCharacters, CommentWithSlashes, ComplexTypesData, ComplexTypesErrors, ComplexTypesResponse, ComplexTypesResponses, Date, Default, DeleteCallWithoutParametersAndResponseData, DictionaryWithArray, DictionaryWithDictionary, DictionaryWithProperties, DictionaryWithReference, DictionaryWithString, DummyAData, DummyAResponses, DummyBData, DummyBResponses, DuplicateName2Data, DuplicateName3Data, DuplicateName4Data, DuplicateNameData, EnumFromDescription, EnumWithExtensions, EnumWithNumbers, EnumWithStrings, ExternalRefA, ExternalRefB, ExternalSharedModel, FailureFailure, FooWowData, FooWowResponses, GetCallWithoutParametersAndResponseData, HeadCallWithoutParametersAndResponseData, ModelThatExtends, ModelThatExtendsExtends, ModelWithArray, ModelWithBoolean, ModelWithCircularReference, ModelWithDictionary, ModelWithDuplicateImports, ModelWithDuplicateProperties, ModelWithEnum, ModelWithEnumFromDescription, ModelWithInteger, ModelWithNestedEnums, ModelWithNestedProperties, ModelWithNullableString, ModelWithOrderedProperties, ModelWithPattern, ModelWithPatternWritable, ModelWithProperties, ModelWithPropertiesWritable, ModelWithReference, ModelWithReferenceWritable, ModelWithString, ModelWithStringError, NonAsciiæøåÆøÅöôêÊ字符串Data, NonAsciiæøåÆøÅöôêÊ字符串Response, NonAsciiæøåÆøÅöôêÊ字符串Responses, NonAsciiStringæøåÆøÅöôêÊ字符串, OptionsCallWithoutParametersAndResponseData, ParameterActivityParams, PatchApiVbyApiVersionNoTagData, PatchApiVbyApiVersionNoTagResponses, PatchCallWithoutParametersAndResponseData, PostApiVbyApiVersionBodyData, PostApiVbyApiVersionBodyError, PostApiVbyApiVersionBodyErrors, PostApiVbyApiVersionBodyResponse, PostApiVbyApiVersionBodyResponses, PostCallWithoutParametersAndResponseData, PutCallWithoutParametersAndResponseData, ResponsePostActivityResponse, ServiceWithEmptyTagData, SimpleBoolean, SimpleFile, SimpleInteger, SimpleReference, SimpleString, SimpleStringWithPattern, TestErrorCodeData, TestErrorCodeErrors, TestErrorCodeResponses, TypesData, TypesResponse, TypesResponses } from './types.gen';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@hey-api/sdk/default/sdk.gen.ts",
    "content": "// 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 { CallToTestOrderOfParamsData, CallWithDefaultOptionalParametersData, CallWithDefaultParametersData, CallWithDescriptionsData, CallWithDuplicateResponsesData, CallWithDuplicateResponsesErrors, CallWithDuplicateResponsesResponses, CallWithNoContentResponseData, CallWithNoContentResponseResponses, CallWithParametersData, CallWithResponseAndNoContentResponseData, CallWithResponseAndNoContentResponseResponses, CallWithResponseData, CallWithResponseResponses, CallWithResponsesData, CallWithResponsesErrors, CallWithResponsesResponses, CallWithResultFromHeaderData, CallWithResultFromHeaderErrors, CallWithResultFromHeaderResponses, CallWithWeirdParameterNamesData, CollectionFormatData, ComplexTypesData, ComplexTypesErrors, ComplexTypesResponses, DeleteCallWithoutParametersAndResponseData, DummyAData, DummyAResponses, DummyBData, DummyBResponses, DuplicateName2Data, DuplicateName3Data, DuplicateName4Data, DuplicateNameData, FooWowData, FooWowResponses, GetCallWithoutParametersAndResponseData, HeadCallWithoutParametersAndResponseData, NonAsciiæøåÆøÅöôêÊ字符串Data, NonAsciiæøåÆøÅöôêÊ字符串Responses, OptionsCallWithoutParametersAndResponseData, PatchApiVbyApiVersionNoTagData, PatchApiVbyApiVersionNoTagResponses, PatchCallWithoutParametersAndResponseData, PostApiVbyApiVersionBodyData, PostApiVbyApiVersionBodyErrors, PostApiVbyApiVersionBodyResponses, PostCallWithoutParametersAndResponseData, PutCallWithoutParametersAndResponseData, ServiceWithEmptyTagData, TestErrorCodeData, TestErrorCodeErrors, TestErrorCodeResponses, TypesData, TypesResponses } from './types.gen';\n\nexport type Options<TData extends TDataShape = TDataShape, ThrowOnError extends boolean = boolean> = Options2<TData, ThrowOnError> & {\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\nexport const serviceWithEmptyTag = <ThrowOnError extends boolean = false>(options?: Options<ServiceWithEmptyTagData, ThrowOnError>) => (options?.client ?? client).get<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/no+tag', ...options });\n\nexport const patchApiVbyApiVersionNoTag = <ThrowOnError extends boolean = false>(options?: Options<PatchApiVbyApiVersionNoTagData, ThrowOnError>) => (options?.client ?? client).patch<PatchApiVbyApiVersionNoTagResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/no+tag', ...options });\n\nexport const fooWow = <ThrowOnError extends boolean = false>(options?: Options<FooWowData, ThrowOnError>) => (options?.client ?? client).put<FooWowResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/no+tag', ...options });\n\nexport const deleteCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<DeleteCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).delete<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const getCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<GetCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).get<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const headCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<HeadCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).head<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const optionsCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<OptionsCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).options<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const patchCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<PatchCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).patch<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const postCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<PostCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).post<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const putCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<PutCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).put<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const callWithDescriptions = <ThrowOnError extends boolean = false>(options?: Options<CallWithDescriptionsData, ThrowOnError>) => (options?.client ?? client).post<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/descriptions/', ...options });\n\nexport const callWithParameters = <ThrowOnError extends boolean = false>(options: Options<CallWithParametersData, ThrowOnError>) => (options.client ?? client).post<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/parameters/{parameterPath}', ...options });\n\nexport const callWithWeirdParameterNames = <ThrowOnError extends boolean = false>(options: Options<CallWithWeirdParameterNamesData, ThrowOnError>) => (options.client ?? client).post<unknown, unknown, ThrowOnError>({\n    url: '/api/v{api-version}/parameters/{parameter.path.1}/{parameter-path-2}/{PARAMETER-PATH-3}',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options.headers\n    }\n});\n\nexport const callWithDefaultParameters = <ThrowOnError extends boolean = false>(options: Options<CallWithDefaultParametersData, ThrowOnError>) => (options.client ?? client).get<unknown, unknown, ThrowOnError>({\n    querySerializer: { parameters: { parameterModel: { object: { explode: false, style: 'form' } } } },\n    url: '/api/v{api-version}/defaults',\n    ...options\n});\n\nexport const callWithDefaultOptionalParameters = <ThrowOnError extends boolean = false>(options?: Options<CallWithDefaultOptionalParametersData, ThrowOnError>) => (options?.client ?? client).post<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/defaults', ...options });\n\nexport const callToTestOrderOfParams = <ThrowOnError extends boolean = false>(options: Options<CallToTestOrderOfParamsData, ThrowOnError>) => (options.client ?? client).put<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/defaults', ...options });\n\nexport const duplicateName = <ThrowOnError extends boolean = false>(options?: Options<DuplicateNameData, ThrowOnError>) => (options?.client ?? client).delete<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/duplicate', ...options });\n\nexport const duplicateName2 = <ThrowOnError extends boolean = false>(options?: Options<DuplicateName2Data, ThrowOnError>) => (options?.client ?? client).get<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/duplicate', ...options });\n\nexport const duplicateName3 = <ThrowOnError extends boolean = false>(options?: Options<DuplicateName3Data, ThrowOnError>) => (options?.client ?? client).post<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/duplicate', ...options });\n\nexport const duplicateName4 = <ThrowOnError extends boolean = false>(options?: Options<DuplicateName4Data, ThrowOnError>) => (options?.client ?? client).put<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/duplicate', ...options });\n\nexport const callWithNoContentResponse = <ThrowOnError extends boolean = false>(options?: Options<CallWithNoContentResponseData, ThrowOnError>) => (options?.client ?? client).get<CallWithNoContentResponseResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/no-content', ...options });\n\nexport const callWithResponseAndNoContentResponse = <ThrowOnError extends boolean = false>(options?: Options<CallWithResponseAndNoContentResponseData, ThrowOnError>) => (options?.client ?? client).get<CallWithResponseAndNoContentResponseResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/multiple-tags/response-and-no-content', ...options });\n\nexport const dummyA = <ThrowOnError extends boolean = false>(options?: Options<DummyAData, ThrowOnError>) => (options?.client ?? client).get<DummyAResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/multiple-tags/a', ...options });\n\nexport const dummyB = <ThrowOnError extends boolean = false>(options?: Options<DummyBData, ThrowOnError>) => (options?.client ?? client).get<DummyBResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/multiple-tags/b', ...options });\n\nexport const callWithResponse = <ThrowOnError extends boolean = false>(options?: Options<CallWithResponseData, ThrowOnError>) => (options?.client ?? client).get<CallWithResponseResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/response', ...options });\n\nexport const callWithDuplicateResponses = <ThrowOnError extends boolean = false>(options?: Options<CallWithDuplicateResponsesData, ThrowOnError>) => (options?.client ?? client).post<CallWithDuplicateResponsesResponses, CallWithDuplicateResponsesErrors, ThrowOnError>({ url: '/api/v{api-version}/response', ...options });\n\nexport const callWithResponses = <ThrowOnError extends boolean = false>(options?: Options<CallWithResponsesData, ThrowOnError>) => (options?.client ?? client).put<CallWithResponsesResponses, CallWithResponsesErrors, ThrowOnError>({ url: '/api/v{api-version}/response', ...options });\n\nexport const collectionFormat = <ThrowOnError extends boolean = false>(options: Options<CollectionFormatData, ThrowOnError>) => (options.client ?? client).get<unknown, unknown, ThrowOnError>({\n    querySerializer: { parameters: {\n            parameterArrayCSV: { array: { explode: false } },\n            parameterArraySSV: { array: { explode: false } },\n            parameterArrayTSV: { array: { explode: false } },\n            parameterArrayPipes: { array: { explode: false } }\n        } },\n    url: '/api/v{api-version}/collectionFormat',\n    ...options\n});\n\nexport const types = <ThrowOnError extends boolean = false>(options: Options<TypesData, ThrowOnError>) => (options.client ?? client).get<TypesResponses, unknown, ThrowOnError>({\n    querySerializer: { parameters: { parameterArray: { array: { explode: false } }, parameterDictionary: { object: { explode: false, style: 'form' } } } },\n    url: '/api/v{api-version}/types',\n    ...options\n});\n\nexport const complexTypes = <ThrowOnError extends boolean = false>(options: Options<ComplexTypesData, ThrowOnError>) => (options.client ?? client).get<ComplexTypesResponses, ComplexTypesErrors, ThrowOnError>({\n    querySerializer: { parameters: { parameterObject: { object: { explode: false, style: 'form' } }, parameterReference: { object: { explode: false, style: 'form' } } } },\n    url: '/api/v{api-version}/complex',\n    ...options\n});\n\nexport const callWithResultFromHeader = <ThrowOnError extends boolean = false>(options?: Options<CallWithResultFromHeaderData, ThrowOnError>) => (options?.client ?? client).post<CallWithResultFromHeaderResponses, CallWithResultFromHeaderErrors, ThrowOnError>({ url: '/api/v{api-version}/header', ...options });\n\nexport const testErrorCode = <ThrowOnError extends boolean = false>(options: Options<TestErrorCodeData, ThrowOnError>) => (options.client ?? client).post<TestErrorCodeResponses, TestErrorCodeErrors, ThrowOnError>({ url: '/api/v{api-version}/error', ...options });\n\nexport const nonAsciiæøåÆøÅöôêÊ字符串 = <ThrowOnError extends boolean = false>(options: Options<NonAsciiæøåÆøÅöôêÊ字符串Data, ThrowOnError>) => (options.client ?? client).post<NonAsciiæøåÆøÅöôêÊ字符串Responses, unknown, ThrowOnError>({ url: '/api/v{api-version}/non-ascii-æøåÆØÅöôêÊ字符串', ...options });\n\n/**\n * Body should not be unknown\n *\n * Body should not be unknown\n */\nexport const postApiVbyApiVersionBody = <ThrowOnError extends boolean = false>(options: Options<PostApiVbyApiVersionBodyData, ThrowOnError>) => (options.client ?? client).post<PostApiVbyApiVersionBodyResponses, PostApiVbyApiVersionBodyErrors, ThrowOnError>({\n    url: '/api/v{api-version}/body',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options.headers\n    }\n});\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@hey-api/sdk/default/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type ClientOptions = {\n    baseUrl: 'http://localhost:3000/base' | (string & {});\n};\n\nexport type ExternalRefA = ExternalSharedModel;\n\nexport type ExternalRefB = ExternalSharedModel;\n\n/**\n * Testing multiline comments in string: First line\n * Second line\n *\n * Fourth line\n */\nexport type CommentWithBreaks = number;\n\n/**\n * Testing backticks in string: `backticks` and ```multiple backticks``` should work\n */\nexport type CommentWithBackticks = number;\n\n/**\n * Testing backticks and quotes in string: `backticks`, 'quotes', \"double quotes\" and ```multiple backticks``` should work\n */\nexport type CommentWithBackticksAndQuotes = number;\n\n/**\n * Testing slashes in string: \\backwards\\\\\\ and /forwards/// should work\n */\nexport type CommentWithSlashes = number;\n\n/**\n * Testing expression placeholders in string: ${expression} should work\n */\nexport type CommentWithExpressionPlaceholders = number;\n\n/**\n * Testing quotes in string: 'single quote''' and \"double quotes\"\"\" should work\n */\nexport type CommentWithQuotes = number;\n\n/**\n * Testing reserved characters in string: * inline * and ** inline ** should work\n */\nexport type CommentWithReservedCharacters = number;\n\n/**\n * This is a simple number\n */\nexport type SimpleInteger = number;\n\n/**\n * This is a simple boolean\n */\nexport type SimpleBoolean = boolean;\n\n/**\n * This is a simple string\n */\nexport type SimpleString = string;\n\n/**\n * A string with non-ascii (unicode) characters valid in typescript identifiers (æøåÆØÅöÔèÈ字符串)\n */\nexport type NonAsciiStringæøåÆøÅöôêÊ字符串 = string;\n\n/**\n * This is a simple file\n */\nexport type SimpleFile = Blob | File;\n\nexport type SimpleReference = ModelWithString;\n\n/**\n * This is a simple string\n */\nexport type SimpleStringWithPattern = string;\n\n/**\n * This is a simple enum with strings\n */\nexport type EnumWithStrings = 'Success' | 'Warning' | 'Error' | '\\'Single Quote\\'' | '\"Double Quotes\"' | 'Non-ascii: øæåôöØÆÅÔÖ字符串';\n\n/**\n * This is a simple enum with numbers\n */\nexport type EnumWithNumbers = 1 | 2 | 3 | 1.1 | 1.2 | 1.3 | 100 | 200 | 300 | -100 | -200 | -300 | -1.1 | -1.2 | -1.3;\n\n/**\n * Success=1,Warning=2,Error=3\n */\nexport type EnumFromDescription = number;\n\n/**\n * This is a simple enum with numbers\n */\nexport type EnumWithExtensions = 200 | 400 | 500;\n\n/**\n * This is a simple array with numbers\n */\nexport type ArrayWithNumbers = Array<number>;\n\n/**\n * This is a simple array with booleans\n */\nexport type ArrayWithBooleans = Array<boolean>;\n\n/**\n * This is a simple array with strings\n */\nexport type ArrayWithStrings = Array<string>;\n\n/**\n * This is a simple array with references\n */\nexport type ArrayWithReferences = Array<ModelWithString>;\n\n/**\n * This is a simple array containing an array\n */\nexport type ArrayWithArray = Array<Array<ModelWithString>>;\n\n/**\n * This is a simple array with properties\n */\nexport type ArrayWithProperties = Array<{\n    foo?: string;\n    bar?: string;\n}>;\n\n/**\n * This is a string dictionary\n */\nexport type DictionaryWithString = {\n    [key: string]: string;\n};\n\n/**\n * This is a string reference\n */\nexport type DictionaryWithReference = {\n    [key: string]: ModelWithString;\n};\n\n/**\n * This is a complex dictionary\n */\nexport type DictionaryWithArray = {\n    [key: string]: Array<ModelWithString>;\n};\n\n/**\n * This is a string dictionary\n */\nexport type DictionaryWithDictionary = {\n    [key: string]: {\n        [key: string]: string;\n    };\n};\n\n/**\n * This is a complex dictionary\n */\nexport type DictionaryWithProperties = {\n    [key: string]: {\n        foo?: string;\n        bar?: string;\n    };\n};\n\n/**\n * This is a type-only model that defines Date as a string\n */\nexport type Date = string;\n\n/**\n * This is a model with one number property\n */\nexport type ModelWithInteger = {\n    /**\n     * This is a simple number property\n     */\n    prop?: number;\n};\n\n/**\n * This is a model with one boolean property\n */\nexport type ModelWithBoolean = {\n    /**\n     * This is a simple boolean property\n     */\n    prop?: boolean;\n};\n\n/**\n * This is a model with one string property\n */\nexport type ModelWithString = {\n    /**\n     * This is a simple string property\n     */\n    prop?: string;\n};\n\n/**\n * This is a model with one string property\n */\nexport type ModelWithStringError = {\n    /**\n     * This is a simple string property\n     */\n    prop?: string;\n};\n\n/**\n * This is a model with one string property\n */\nexport type ModelWithNullableString = {\n    /**\n     * This is a simple string property\n     */\n    nullableProp?: string | null;\n    /**\n     * This is a simple string property\n     */\n    nullableRequiredProp: string | null;\n};\n\n/**\n * This is a model with one enum\n */\nexport type ModelWithEnum = {\n    /**\n     * This is a simple enum with strings\n     */\n    test?: 'Success' | 'Warning' | 'Error' | 'ØÆÅ字符串';\n    /**\n     * These are the HTTP error code enums\n     */\n    statusCode?: '100' | '200 FOO' | '300 FOO_BAR' | '400 foo-bar' | '500 foo.bar' | '600 foo&bar';\n    /**\n     * Simple boolean enum\n     */\n    bool?: true;\n};\n\n/**\n * This is a model with one enum\n */\nexport type ModelWithEnumFromDescription = {\n    /**\n     * Success=1,Warning=2,Error=3\n     */\n    test?: number;\n};\n\n/**\n * This is a model with nested enums\n */\nexport type ModelWithNestedEnums = {\n    dictionaryWithEnum?: {\n        [key: string]: 'Success' | 'Warning' | 'Error';\n    };\n    dictionaryWithEnumFromDescription?: {\n        [key: string]: number;\n    };\n    arrayWithEnum?: Array<'Success' | 'Warning' | 'Error'>;\n    arrayWithDescription?: Array<number>;\n};\n\n/**\n * This is a model with one property containing a reference\n */\nexport type ModelWithReference = {\n    prop?: ModelWithProperties;\n};\n\n/**\n * This is a model with one property containing an array\n */\nexport type ModelWithArray = {\n    prop?: Array<ModelWithString>;\n    propWithFile?: Array<Blob | File>;\n    propWithNumber?: Array<number>;\n};\n\n/**\n * This is a model with one property containing a dictionary\n */\nexport type ModelWithDictionary = {\n    prop?: {\n        [key: string]: string;\n    };\n};\n\n/**\n * This is a model with one property containing a circular reference\n */\nexport type ModelWithCircularReference = {\n    prop?: ModelWithCircularReference;\n};\n\n/**\n * This is a model with one nested property\n */\nexport type ModelWithProperties = {\n    required: string;\n    readonly requiredAndReadOnly: string;\n    string?: string;\n    number?: number;\n    boolean?: boolean;\n    reference?: ModelWithString;\n    'property with space'?: string;\n    default?: string;\n    try?: string;\n    readonly '@namespace.string'?: string;\n    readonly '@namespace.integer'?: number;\n};\n\n/**\n * This is a model with one nested property\n */\nexport type ModelWithNestedProperties = {\n    readonly first: {\n        readonly second: {\n            readonly third: string;\n        };\n    };\n};\n\n/**\n * This is a model with duplicated properties\n */\nexport type ModelWithDuplicateProperties = {\n    prop?: ModelWithString;\n};\n\n/**\n * This is a model with ordered properties\n */\nexport type ModelWithOrderedProperties = {\n    zebra?: string;\n    apple?: string;\n    hawaii?: string;\n};\n\n/**\n * This is a model with duplicated imports\n */\nexport type ModelWithDuplicateImports = {\n    propA?: ModelWithString;\n    propB?: ModelWithString;\n    propC?: ModelWithString;\n};\n\n/**\n * This is a model that extends another model\n */\nexport type ModelThatExtends = ModelWithString & {\n    propExtendsA?: string;\n    propExtendsB?: ModelWithString;\n};\n\n/**\n * This is a model that extends another model\n */\nexport type ModelThatExtendsExtends = ModelWithString & ModelThatExtends & {\n    propExtendsC?: string;\n    propExtendsD?: ModelWithString;\n};\n\nexport type Default = {\n    name?: string;\n};\n\n/**\n * This is a model that contains a some patterns\n */\nexport type ModelWithPattern = {\n    key: string;\n    name: string;\n    readonly enabled?: boolean;\n    readonly modified?: string;\n    id?: string;\n    text?: string;\n    patternWithSingleQuotes?: string;\n    patternWithNewline?: string;\n    patternWithBacktick?: string;\n    patternWithUnicode?: string;\n};\n\nexport type ParameterActivityParams = {\n    description?: string;\n    graduate_id?: number;\n    organization_id?: number;\n    parent_activity?: number;\n    post_id?: number;\n};\n\nexport type ResponsePostActivityResponse = {\n    description?: string;\n    graduate_id?: number;\n    organization_id?: number;\n    parent_activity_id?: number;\n    post_id?: number;\n};\n\nexport type FailureFailure = {\n    error?: string;\n    message?: string;\n    reference_code?: string;\n};\n\nexport type ExternalSharedModel = {\n    id: string;\n    name?: string;\n};\n\n/**\n * This is a model with one property containing a reference\n */\nexport type ModelWithReferenceWritable = {\n    prop?: ModelWithPropertiesWritable;\n};\n\n/**\n * This is a model with one nested property\n */\nexport type ModelWithPropertiesWritable = {\n    required: string;\n    string?: string;\n    number?: number;\n    boolean?: boolean;\n    reference?: ModelWithString;\n    'property with space'?: string;\n    default?: string;\n    try?: string;\n};\n\n/**\n * This is a model that contains a some patterns\n */\nexport type ModelWithPatternWritable = {\n    key: string;\n    name: string;\n    id?: string;\n    text?: string;\n    patternWithSingleQuotes?: string;\n    patternWithNewline?: string;\n    patternWithBacktick?: string;\n    patternWithUnicode?: string;\n};\n\nexport type ServiceWithEmptyTagData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no+tag';\n};\n\nexport type PatchApiVbyApiVersionNoTagData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no+tag';\n};\n\nexport type PatchApiVbyApiVersionNoTagResponses = {\n    /**\n     * OK\n     */\n    default: unknown;\n};\n\nexport type FooWowData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no+tag';\n};\n\nexport type FooWowResponses = {\n    /**\n     * OK\n     */\n    default: unknown;\n};\n\nexport type DeleteCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type GetCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type HeadCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type OptionsCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type PatchCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type PostCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type PutCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type CallWithDescriptionsData = {\n    body?: never;\n    path?: never;\n    query?: {\n        /**\n         * Testing multiline comments in string: First line\n         * Second line\n         *\n         * Fourth line\n         */\n        parameterWithBreaks?: string;\n        /**\n         * Testing backticks in string: `backticks` and ```multiple backticks``` should work\n         */\n        parameterWithBackticks?: string;\n        /**\n         * Testing slashes in string: \\backwards\\\\\\ and /forwards/// should work\n         */\n        parameterWithSlashes?: string;\n        /**\n         * Testing expression placeholders in string: ${expression} should work\n         */\n        parameterWithExpressionPlaceholders?: string;\n        /**\n         * Testing quotes in string: 'single quote''' and \"double quotes\"\"\" should work\n         */\n        parameterWithQuotes?: string;\n        /**\n         * Testing reserved characters in string: * inline * and ** inline ** should work\n         */\n        parameterWithReservedCharacters?: string;\n    };\n    url: '/api/v{api-version}/descriptions/';\n};\n\nexport type CallWithParametersData = {\n    body?: never;\n    headers: {\n        /**\n         * This is the parameter that goes into the header\n         */\n        parameterHeader: string;\n    };\n    path: {\n        /**\n         * This is the parameter that goes into the path\n         */\n        parameterPath: string;\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string;\n    };\n    query: {\n        /**\n         * This is the parameter that goes into the query params\n         */\n        parameterQuery: string;\n    };\n    url: '/api/v{api-version}/parameters/{parameterPath}';\n};\n\nexport type CallWithWeirdParameterNamesData = {\n    /**\n     * This is the parameter that is sent as request body\n     */\n    body: string;\n    headers: {\n        /**\n         * This is the parameter that goes into the request header\n         */\n        'parameter.header': string;\n    };\n    path: {\n        /**\n         * This is the parameter that goes into the path\n         */\n        'parameter.path.1'?: string;\n        /**\n         * This is the parameter that goes into the path\n         */\n        'parameter-path-2'?: string;\n        /**\n         * This is the parameter that goes into the path\n         */\n        'PARAMETER-PATH-3'?: string;\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string;\n    };\n    query: {\n        /**\n         * This is the parameter with a reserved keyword\n         */\n        default?: string;\n        /**\n         * This is the parameter that goes into the request query params\n         */\n        'parameter-query': string;\n    };\n    url: '/api/v{api-version}/parameters/{parameter.path.1}/{parameter-path-2}/{PARAMETER-PATH-3}';\n};\n\nexport type CallWithDefaultParametersData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * This is a simple string with default value\n         */\n        parameterString: string;\n        /**\n         * This is a simple number with default value\n         */\n        parameterNumber: number;\n        /**\n         * This is a simple boolean with default value\n         */\n        parameterBoolean: boolean;\n        /**\n         * This is a simple enum with default value\n         */\n        parameterEnum: 'Success' | 'Warning' | 'Error';\n        /**\n         * This is a model with one string property\n         */\n        parameterModel: {\n            /**\n             * This is a simple string property\n             */\n            prop?: string;\n        };\n    };\n    url: '/api/v{api-version}/defaults';\n};\n\nexport type CallWithDefaultOptionalParametersData = {\n    body?: never;\n    path?: never;\n    query?: {\n        /**\n         * This is a simple string that is optional with default value\n         */\n        parameterString?: string;\n        /**\n         * This is a simple number that is optional with default value\n         */\n        parameterNumber?: number;\n        /**\n         * This is a simple boolean that is optional with default value\n         */\n        parameterBoolean?: boolean;\n        /**\n         * This is a simple enum that is optional with default value\n         */\n        parameterEnum?: 'Success' | 'Warning' | 'Error';\n    };\n    url: '/api/v{api-version}/defaults';\n};\n\nexport type CallToTestOrderOfParamsData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * This is a optional string with default\n         */\n        parameterOptionalStringWithDefault?: string;\n        /**\n         * This is a optional string with empty default\n         */\n        parameterOptionalStringWithEmptyDefault?: string;\n        /**\n         * This is a optional string with no default\n         */\n        parameterOptionalStringWithNoDefault?: string;\n        /**\n         * This is a string with default\n         */\n        parameterStringWithDefault: string;\n        /**\n         * This is a string with empty default\n         */\n        parameterStringWithEmptyDefault: string;\n        /**\n         * This is a string with no default\n         */\n        parameterStringWithNoDefault: string;\n        /**\n         * This is a string that can be null with no default\n         */\n        parameterStringNullableWithNoDefault?: string | null;\n        /**\n         * This is a string that can be null with default\n         */\n        parameterStringNullableWithDefault?: string | null;\n    };\n    url: '/api/v{api-version}/defaults';\n};\n\nexport type DuplicateNameData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/duplicate';\n};\n\nexport type DuplicateName2Data = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/duplicate';\n};\n\nexport type DuplicateName3Data = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/duplicate';\n};\n\nexport type DuplicateName4Data = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/duplicate';\n};\n\nexport type CallWithNoContentResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no-content';\n};\n\nexport type CallWithNoContentResponseResponses = {\n    /**\n     * Success\n     */\n    204: unknown;\n};\n\nexport type CallWithResponseAndNoContentResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multiple-tags/response-and-no-content';\n};\n\nexport type CallWithResponseAndNoContentResponseResponses = {\n    /**\n     * Response is a simple number\n     */\n    200: number;\n    /**\n     * Success\n     */\n    204: unknown;\n};\n\nexport type CallWithResponseAndNoContentResponseResponse = CallWithResponseAndNoContentResponseResponses[keyof CallWithResponseAndNoContentResponseResponses];\n\nexport type DummyAData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multiple-tags/a';\n};\n\nexport type DummyAResponses = {\n    /**\n     * Success\n     */\n    204: unknown;\n};\n\nexport type DummyBData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multiple-tags/b';\n};\n\nexport type DummyBResponses = {\n    /**\n     * Success\n     */\n    204: unknown;\n};\n\nexport type CallWithResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/response';\n};\n\nexport type CallWithResponseResponses = {\n    /**\n     * Message for default response\n     */\n    default: ModelWithString;\n};\n\nexport type CallWithResponseResponse = CallWithResponseResponses[keyof CallWithResponseResponses];\n\nexport type CallWithDuplicateResponsesData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/response';\n};\n\nexport type CallWithDuplicateResponsesErrors = {\n    /**\n     * Message for 500 error\n     */\n    500: ModelWithStringError;\n    /**\n     * Message for 501 error\n     */\n    501: ModelWithStringError;\n    /**\n     * Message for 502 error\n     */\n    502: ModelWithStringError;\n    /**\n     * Message for default response\n     */\n    default: ModelWithString;\n};\n\nexport type CallWithDuplicateResponsesError = CallWithDuplicateResponsesErrors[keyof CallWithDuplicateResponsesErrors];\n\nexport type CallWithDuplicateResponsesResponses = {\n    /**\n     * Message for 201 response\n     */\n    201: ModelWithString;\n    /**\n     * Message for 202 response\n     */\n    202: ModelWithString;\n};\n\nexport type CallWithDuplicateResponsesResponse = CallWithDuplicateResponsesResponses[keyof CallWithDuplicateResponsesResponses];\n\nexport type CallWithResponsesData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/response';\n};\n\nexport type CallWithResponsesErrors = {\n    /**\n     * Message for 500 error\n     */\n    500: ModelWithStringError;\n    /**\n     * Message for 501 error\n     */\n    501: ModelWithStringError;\n    /**\n     * Message for 502 error\n     */\n    502: ModelWithStringError;\n    /**\n     * Message for default response\n     */\n    default: ModelWithString;\n};\n\nexport type CallWithResponsesError = CallWithResponsesErrors[keyof CallWithResponsesErrors];\n\nexport type CallWithResponsesResponses = {\n    /**\n     * Message for 200 response\n     */\n    200: {\n        readonly '@namespace.string'?: string;\n        readonly '@namespace.integer'?: number;\n        readonly value?: Array<ModelWithString>;\n    };\n    /**\n     * Message for 201 response\n     */\n    201: ModelThatExtends;\n    /**\n     * Message for 202 response\n     */\n    202: ModelThatExtendsExtends;\n};\n\nexport type CallWithResponsesResponse = CallWithResponsesResponses[keyof CallWithResponsesResponses];\n\nexport type CollectionFormatData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * This is an array parameter that is sent as csv format (comma-separated values)\n         */\n        parameterArrayCSV: Array<string>;\n        /**\n         * This is an array parameter that is sent as ssv format (space-separated values)\n         */\n        parameterArraySSV: Array<string>;\n        /**\n         * This is an array parameter that is sent as tsv format (tab-separated values)\n         */\n        parameterArrayTSV: Array<string>;\n        /**\n         * This is an array parameter that is sent as pipes format (pipe-separated values)\n         */\n        parameterArrayPipes: Array<string>;\n        /**\n         * This is an array parameter that is sent as multi format (multiple parameter instances)\n         */\n        parameterArrayMulti: Array<string>;\n    };\n    url: '/api/v{api-version}/collectionFormat';\n};\n\nexport type TypesData = {\n    body?: never;\n    path?: {\n        /**\n         * This is a number parameter\n         */\n        id?: number;\n    };\n    query: {\n        /**\n         * This is a number parameter\n         */\n        parameterNumber: number;\n        /**\n         * This is a string parameter\n         */\n        parameterString: string;\n        /**\n         * This is a boolean parameter\n         */\n        parameterBoolean: boolean;\n        /**\n         * This is an array parameter\n         */\n        parameterArray: Array<string>;\n        /**\n         * This is a dictionary parameter\n         */\n        parameterDictionary: {\n            [key: string]: unknown;\n        };\n        /**\n         * This is an enum parameter\n         */\n        parameterEnum: 'Success' | 'Warning' | 'Error';\n    };\n    url: '/api/v{api-version}/types';\n};\n\nexport type TypesResponses = {\n    /**\n     * Response is a simple number\n     */\n    200: number;\n    /**\n     * Response is a simple string\n     */\n    201: string;\n    /**\n     * Response is a simple boolean\n     */\n    202: boolean;\n    /**\n     * Response is a simple object\n     */\n    203: {\n        [key: string]: unknown;\n    };\n};\n\nexport type TypesResponse = TypesResponses[keyof TypesResponses];\n\nexport type ComplexTypesData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * Parameter containing object\n         */\n        parameterObject: {\n            first?: {\n                second?: {\n                    third?: string;\n                };\n            };\n        };\n        /**\n         * This is a model with one string property\n         */\n        parameterReference: {\n            /**\n             * This is a simple string property\n             */\n            prop?: string;\n        };\n    };\n    url: '/api/v{api-version}/complex';\n};\n\nexport type ComplexTypesErrors = {\n    /**\n     * 400 server error\n     */\n    400: unknown;\n    /**\n     * 500 server error\n     */\n    500: unknown;\n};\n\nexport type ComplexTypesResponses = {\n    /**\n     * Successful response\n     */\n    200: Array<ModelWithString>;\n};\n\nexport type ComplexTypesResponse = ComplexTypesResponses[keyof ComplexTypesResponses];\n\nexport type CallWithResultFromHeaderData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/header';\n};\n\nexport type CallWithResultFromHeaderErrors = {\n    /**\n     * 400 server error\n     */\n    400: unknown;\n    /**\n     * 500 server error\n     */\n    500: unknown;\n};\n\nexport type CallWithResultFromHeaderResponses = {\n    /**\n     * Successful response\n     */\n    200: unknown;\n};\n\nexport type TestErrorCodeData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * Status code to return\n         */\n        status: string;\n    };\n    url: '/api/v{api-version}/error';\n};\n\nexport type TestErrorCodeErrors = {\n    /**\n     * Custom message: Internal Server Error\n     */\n    500: unknown;\n    /**\n     * Custom message: Not Implemented\n     */\n    501: unknown;\n    /**\n     * Custom message: Bad Gateway\n     */\n    502: unknown;\n    /**\n     * Custom message: Service Unavailable\n     */\n    503: unknown;\n};\n\nexport type TestErrorCodeResponses = {\n    /**\n     * Custom message: Successful response\n     */\n    200: unknown;\n};\n\nexport type NonAsciiæøåÆøÅöôêÊ字符串Data = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * Dummy input param\n         */\n        nonAsciiParamæøåÆØÅöôêÊ: number;\n    };\n    url: '/api/v{api-version}/non-ascii-æøåÆØÅöôêÊ字符串';\n};\n\nexport type NonAsciiæøåÆøÅöôêÊ字符串Responses = {\n    /**\n     * Successful response\n     */\n    200: NonAsciiStringæøåÆøÅöôêÊ字符串;\n};\n\nexport type NonAsciiæøåÆøÅöôêÊ字符串Response = NonAsciiæøåÆøÅöôêÊ字符串Responses[keyof NonAsciiæøåÆøÅöôêÊ字符串Responses];\n\nexport type PostApiVbyApiVersionBodyData = {\n    /**\n     * Body should not be unknown\n     */\n    body: ParameterActivityParams;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/body';\n};\n\nexport type PostApiVbyApiVersionBodyErrors = {\n    /**\n     * Bad Request\n     */\n    400: FailureFailure;\n    /**\n     * Internal Server Error\n     */\n    500: FailureFailure;\n};\n\nexport type PostApiVbyApiVersionBodyError = PostApiVbyApiVersionBodyErrors[keyof PostApiVbyApiVersionBodyErrors];\n\nexport type PostApiVbyApiVersionBodyResponses = {\n    /**\n     * OK\n     */\n    200: ResponsePostActivityResponse;\n};\n\nexport type PostApiVbyApiVersionBodyResponse = PostApiVbyApiVersionBodyResponses[keyof PostApiVbyApiVersionBodyResponses];\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@hey-api/sdk/instance/client/client.gen.ts",
    "content": "// 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 (options: RequestOptions) => {\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 url = buildUrl(opts);\n\n    return { opts, url };\n  };\n\n  const request: Client['request'] = async (options) => {\n    // @ts-expect-error\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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@hey-api/sdk/instance/client/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type { Auth } from '../core/auth.gen';\nexport type { QuerySerializerOptions } from '../core/bodySerializer.gen';\nexport {\n  formDataBodySerializer,\n  jsonBodySerializer,\n  urlSearchParamsBodySerializer,\n} from '../core/bodySerializer.gen';\nexport { buildClientParams } from '../core/params.gen';\nexport { serializeQueryKeyValue } from '../core/queryKeySerializer.gen';\nexport { createClient } from './client.gen';\nexport type {\n  Client,\n  ClientOptions,\n  Config,\n  CreateClientConfig,\n  Options,\n  RequestOptions,\n  RequestResult,\n  ResolvedRequestOptions,\n  ResponseStyle,\n  TDataShape,\n} from './types.gen';\nexport { createConfig, mergeHeaders } from './utils.gen';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@hey-api/sdk/instance/client/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { Auth } from '../core/auth.gen';\nimport type {\n  ServerSentEventsOptions,\n  ServerSentEventsResult,\n} from '../core/serverSentEvents.gen';\nimport type { Client as CoreClient, Config as CoreConfig } from '../core/types.gen';\nimport type { Middleware } from './utils.gen';\n\nexport type ResponseStyle = 'data' | 'fields';\n\nexport interface Config<T extends ClientOptions = ClientOptions>\n  extends Omit<RequestInit, 'body' | 'headers' | 'method'>, CoreConfig {\n  /**\n   * Base URL for all requests made by this client.\n   */\n  baseUrl?: T['baseUrl'];\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   * Please don't use the Fetch client for Next.js applications. The `next`\n   * options won't have any effect.\n   *\n   * Install {@link https://www.npmjs.com/package/@hey-api/client-next `@hey-api/client-next`} instead.\n   */\n  next?: never;\n  /**\n   * Return the response data parsed in a specified format. By default, `auto`\n   * will infer the appropriate method from the `Content-Type` response header.\n   * You can override this behavior with any of the {@link Body} methods.\n   * Select `stream` if you don't want to parse response data at all.\n   *\n   * @default 'auto'\n   */\n  parseAs?: 'arrayBuffer' | 'auto' | 'blob' | 'formData' | 'json' | 'stream' | 'text';\n  /**\n   * Should we return only data or multiple fields (data, error, response, etc.)?\n   *\n   * @default 'fields'\n   */\n  responseStyle?: ResponseStyle;\n  /**\n   * Throw an error instead of returning it in the response?\n   *\n   * @default false\n   */\n  throwOnError?: T['throwOnError'];\n}\n\nexport interface RequestOptions<\n  TData = unknown,\n  TResponseStyle extends ResponseStyle = 'fields',\n  ThrowOnError extends boolean = boolean,\n  Url extends string = string,\n>\n  extends\n    Config<{\n      responseStyle: TResponseStyle;\n      throwOnError: ThrowOnError;\n    }>,\n    Pick<\n      ServerSentEventsOptions<TData>,\n      | 'onRequest'\n      | 'onSseError'\n      | 'onSseEvent'\n      | 'sseDefaultRetryDelay'\n      | 'sseMaxRetryAttempts'\n      | 'sseMaxRetryDelay'\n    > {\n  /**\n   * Any body that you want to add to your request.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/fetch#body}\n   */\n  body?: unknown;\n  path?: Record<string, unknown>;\n  query?: Record<string, unknown>;\n  /**\n   * Security mechanism(s) to use for the request.\n   */\n  security?: ReadonlyArray<Auth>;\n  url: Url;\n}\n\nexport interface ResolvedRequestOptions<\n  TResponseStyle extends ResponseStyle = 'fields',\n  ThrowOnError extends boolean = boolean,\n  Url extends string = string,\n> extends RequestOptions<unknown, TResponseStyle, ThrowOnError, Url> {\n  serializedBody?: string;\n}\n\nexport type RequestResult<\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = boolean,\n  TResponseStyle extends ResponseStyle = 'fields',\n> = ThrowOnError extends true\n  ? Promise<\n      TResponseStyle extends 'data'\n        ? TData extends Record<string, unknown>\n          ? TData[keyof TData]\n          : TData\n        : {\n            data: TData extends Record<string, unknown> ? TData[keyof TData] : TData;\n            request: Request;\n            response: Response;\n          }\n    >\n  : Promise<\n      TResponseStyle extends 'data'\n        ? (TData extends Record<string, unknown> ? TData[keyof TData] : TData) | undefined\n        : (\n            | {\n                data: TData extends Record<string, unknown> ? TData[keyof TData] : TData;\n                error: undefined;\n              }\n            | {\n                data: undefined;\n                error: TError extends Record<string, unknown> ? TError[keyof TError] : TError;\n              }\n          ) & {\n            request: Request;\n            response: Response;\n          }\n    >;\n\nexport interface ClientOptions {\n  baseUrl?: string;\n  responseStyle?: ResponseStyle;\n  throwOnError?: boolean;\n}\n\ntype MethodFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'>,\n) => RequestResult<TData, TError, ThrowOnError, TResponseStyle>;\n\ntype SseFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'>,\n) => Promise<ServerSentEventsResult<TData, TError>>;\n\ntype RequestFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'> &\n    Pick<Required<RequestOptions<TData, TResponseStyle, ThrowOnError>>, 'method'>,\n) => RequestResult<TData, TError, ThrowOnError, TResponseStyle>;\n\ntype BuildUrlFn = <\n  TData extends {\n    body?: unknown;\n    path?: Record<string, unknown>;\n    query?: Record<string, unknown>;\n    url: string;\n  },\n>(\n  options: TData & Options<TData>,\n) => string;\n\nexport type Client = CoreClient<RequestFn, Config, MethodFn, BuildUrlFn, SseFn> & {\n  interceptors: Middleware<Request, Response, unknown, ResolvedRequestOptions>;\n};\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 = ClientOptions> = (\n  override?: Config<ClientOptions & T>,\n) => Config<Required<ClientOptions> & T>;\n\nexport interface TDataShape {\n  body?: unknown;\n  headers?: unknown;\n  path?: unknown;\n  query?: unknown;\n  url: string;\n}\n\ntype OmitKeys<T, K> = Pick<T, Exclude<keyof T, K>>;\n\nexport type Options<\n  TData extends TDataShape = TDataShape,\n  ThrowOnError extends boolean = boolean,\n  TResponse = unknown,\n  TResponseStyle extends ResponseStyle = 'fields',\n> = OmitKeys<\n  RequestOptions<TResponse, TResponseStyle, ThrowOnError>,\n  'body' | 'path' | 'query' | 'url'\n> &\n  ([TData] extends [never] ? unknown : Omit<TData, 'url'>);\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@hey-api/sdk/instance/client/utils.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@hey-api/sdk/instance/client.gen.ts",
    "content": "// 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>());\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@hey-api/sdk/instance/core/auth.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@hey-api/sdk/instance/core/bodySerializer.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@hey-api/sdk/instance/core/params.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@hey-api/sdk/instance/core/pathSerializer.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@hey-api/sdk/instance/core/queryKeySerializer.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\n/**\n * JSON-friendly union that mirrors what Pinia Colada can hash.\n */\nexport type JsonValue =\n  | null\n  | string\n  | number\n  | boolean\n  | JsonValue[]\n  | { [key: string]: JsonValue };\n\n/**\n * Replacer that converts non-JSON values (bigint, Date, etc.) to safe substitutes.\n */\nexport const queryKeyJsonReplacer = (_key: string, value: unknown) => {\n  if (value === undefined || typeof value === 'function' || typeof value === 'symbol') {\n    return undefined;\n  }\n  if (typeof value === 'bigint') {\n    return value.toString();\n  }\n  if (value instanceof Date) {\n    return value.toISOString();\n  }\n  return value;\n};\n\n/**\n * Safely stringifies a value and parses it back into a JsonValue.\n */\nexport const stringifyToJsonValue = (input: unknown): JsonValue | undefined => {\n  try {\n    const json = JSON.stringify(input, queryKeyJsonReplacer);\n    if (json === undefined) {\n      return undefined;\n    }\n    return JSON.parse(json) as JsonValue;\n  } catch {\n    return undefined;\n  }\n};\n\n/**\n * Detects plain objects (including objects with a null prototype).\n */\nconst isPlainObject = (value: unknown): value is Record<string, unknown> => {\n  if (value === null || typeof value !== 'object') {\n    return false;\n  }\n  const prototype = Object.getPrototypeOf(value as object);\n  return prototype === Object.prototype || prototype === null;\n};\n\n/**\n * Turns URLSearchParams into a sorted JSON object for deterministic keys.\n */\nconst serializeSearchParams = (params: URLSearchParams): JsonValue => {\n  const entries = Array.from(params.entries()).sort(([a], [b]) => a.localeCompare(b));\n  const result: Record<string, JsonValue> = {};\n\n  for (const [key, value] of entries) {\n    const existing = result[key];\n    if (existing === undefined) {\n      result[key] = value;\n      continue;\n    }\n\n    if (Array.isArray(existing)) {\n      (existing as string[]).push(value);\n    } else {\n      result[key] = [existing, value];\n    }\n  }\n\n  return result;\n};\n\n/**\n * Normalizes any accepted value into a JSON-friendly shape for query keys.\n */\nexport const serializeQueryKeyValue = (value: unknown): JsonValue | undefined => {\n  if (value === null) {\n    return null;\n  }\n\n  if (typeof value === 'string' || typeof value === 'number' || typeof value === 'boolean') {\n    return value;\n  }\n\n  if (value === undefined || typeof value === 'function' || typeof value === 'symbol') {\n    return undefined;\n  }\n\n  if (typeof value === 'bigint') {\n    return value.toString();\n  }\n\n  if (value instanceof Date) {\n    return value.toISOString();\n  }\n\n  if (Array.isArray(value)) {\n    return stringifyToJsonValue(value);\n  }\n\n  if (typeof URLSearchParams !== 'undefined' && value instanceof URLSearchParams) {\n    return serializeSearchParams(value);\n  }\n\n  if (isPlainObject(value)) {\n    return stringifyToJsonValue(value);\n  }\n\n  return undefined;\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@hey-api/sdk/instance/core/serverSentEvents.gen.ts",
    "content": "// 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 const 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            // Normalize line endings: CRLF -> LF, then CR -> LF\n            buffer = buffer.replace(/\\r\\n/g, '\\n').replace(/\\r/g, '\\n');\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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@hey-api/sdk/instance/core/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { Auth, AuthToken } from './auth.gen';\nimport type { BodySerializer, QuerySerializer, QuerySerializerOptions } from './bodySerializer.gen';\n\nexport type HttpMethod =\n  | 'connect'\n  | 'delete'\n  | 'get'\n  | 'head'\n  | 'options'\n  | 'patch'\n  | 'post'\n  | 'put'\n  | 'trace';\n\nexport type Client<\n  RequestFn = never,\n  Config = unknown,\n  MethodFn = never,\n  BuildUrlFn = never,\n  SseFn = never,\n> = {\n  /**\n   * Returns the final request URL.\n   */\n  buildUrl: BuildUrlFn;\n  getConfig: () => Config;\n  request: RequestFn;\n  setConfig: (config: Config) => Config;\n} & {\n  [K in HttpMethod]: MethodFn;\n} & ([SseFn] extends [never] ? { sse?: never } : { sse: { [K in HttpMethod]: SseFn } });\n\nexport interface Config {\n  /**\n   * Auth token or a function returning auth token. The resolved value will be\n   * added to the request payload as defined by its `security` array.\n   */\n  auth?: ((auth: Auth) => Promise<AuthToken> | AuthToken) | AuthToken;\n  /**\n   * A function for serializing request body parameter. By default,\n   * {@link JSON.stringify()} will be used.\n   */\n  bodySerializer?: BodySerializer | null;\n  /**\n   * An object containing any HTTP headers that you want to pre-populate your\n   * `Headers` object with.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/Headers/Headers#init See more}\n   */\n  headers?:\n    | RequestInit['headers']\n    | Record<\n        string,\n        string | number | boolean | (string | number | boolean)[] | null | undefined | unknown\n      >;\n  /**\n   * The request method.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/fetch#method See more}\n   */\n  method?: Uppercase<HttpMethod>;\n  /**\n   * A function for serializing request query parameters. By default, arrays\n   * will be exploded in form style, objects will be exploded in deepObject\n   * style, and reserved characters are percent-encoded.\n   *\n   * This method will have no effect if the native `paramsSerializer()` Axios\n   * API function is used.\n   *\n   * {@link https://swagger.io/docs/specification/serialization/#query View examples}\n   */\n  querySerializer?: QuerySerializer | QuerySerializerOptions;\n  /**\n   * A function validating request data. This is useful if you want to ensure\n   * the request conforms to the desired shape, so it can be safely sent to\n   * the server.\n   */\n  requestValidator?: (data: unknown) => Promise<unknown>;\n  /**\n   * A function transforming response data before it's returned. This is useful\n   * for post-processing data, e.g. converting ISO strings into Date objects.\n   */\n  responseTransformer?: (data: unknown) => Promise<unknown>;\n  /**\n   * A function validating response data. This is useful if you want to ensure\n   * the response conforms to the desired shape, so it can be safely passed to\n   * the transformers and returned to the user.\n   */\n  responseValidator?: (data: unknown) => Promise<unknown>;\n}\n\ntype IsExactlyNeverOrNeverUndefined<T> = [T] extends [never]\n  ? true\n  : [T] extends [never | undefined]\n    ? [undefined] extends [T]\n      ? false\n      : true\n    : false;\n\nexport type OmitNever<T extends Record<string, unknown>> = {\n  [K in keyof T as IsExactlyNeverOrNeverUndefined<T[K]> extends true ? never : K]: T[K];\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@hey-api/sdk/instance/core/utils.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@hey-api/sdk/instance/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport { Bar, Foo, type Options, Sdk } from './sdk.gen';\nexport type { ClientOptions, FooBarPostData, FooBarPostResponse, FooBarPostResponses, FooBarPutData, FooBarPutResponse, FooBarPutResponses, FooPostData, FooPostResponse, FooPostResponses, FooPutData, FooPutResponse, FooPutResponses, GetFooBarData, GetFooBarResponse, GetFooBarResponses, GetFooData, GetFooResponse, GetFooResponses } from './types.gen';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@hey-api/sdk/instance/sdk.gen.ts",
    "content": "// 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 { FooBarPostData, FooBarPostResponses, FooBarPutData, FooBarPutResponses, FooPostData, FooPostResponses, FooPutData, FooPutResponses, GetFooBarData, GetFooBarResponses, GetFooData, GetFooResponses } from './types.gen';\n\nexport type Options<TData extends TDataShape = TDataShape, ThrowOnError extends boolean = boolean> = Options2<TData, ThrowOnError> & {\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\nclass HeyApiClient {\n    protected client: Client;\n    \n    constructor(args?: {\n        client?: Client;\n    }) {\n        this.client = args?.client ?? client;\n    }\n}\n\nclass HeyApiRegistry<T> {\n    private readonly defaultKey = 'default';\n    \n    private readonly instances: Map<string, T> = new Map();\n    \n    get(key?: string): T {\n        const instance = this.instances.get(key ?? this.defaultKey);\n        if (!instance) {\n            throw new Error(`No SDK client found. Create one with \"new Sdk()\" to fix this error.`);\n        }\n        return instance;\n    }\n    \n    set(value: T, key?: string): void {\n        this.instances.set(key ?? this.defaultKey, value);\n    }\n}\n\nexport class Bar extends HeyApiClient {\n    public post<ThrowOnError extends boolean = false>(options?: Options<FooBarPostData, ThrowOnError>) {\n        return (options?.client ?? this.client).post<FooBarPostResponses, unknown, ThrowOnError>({ url: '/foo/bar', ...options });\n    }\n    \n    public put<ThrowOnError extends boolean = false>(options?: Options<FooBarPutData, ThrowOnError>) {\n        return (options?.client ?? this.client).put<FooBarPutResponses, unknown, ThrowOnError>({ url: '/foo/bar', ...options });\n    }\n}\n\nexport class Foo extends HeyApiClient {\n    public post<ThrowOnError extends boolean = false>(options?: Options<FooPostData, ThrowOnError>) {\n        return (options?.client ?? this.client).post<FooPostResponses, unknown, ThrowOnError>({ url: '/foo', ...options });\n    }\n    \n    public put<ThrowOnError extends boolean = false>(options?: Options<FooPutData, ThrowOnError>) {\n        return (options?.client ?? this.client).put<FooPutResponses, unknown, ThrowOnError>({ url: '/foo', ...options });\n    }\n    \n    private _bar?: Bar;\n    get bar(): Bar {\n        return this._bar ??= new Bar({ client: this.client });\n    }\n}\n\nexport class Sdk extends HeyApiClient {\n    public static readonly __registry = new HeyApiRegistry<Sdk>();\n    \n    constructor(args?: {\n        client?: Client;\n        key?: string;\n    }) {\n        super(args);\n        Sdk.__registry.set(this, args?.key);\n    }\n    \n    public getFoo<ThrowOnError extends boolean = false>(options?: Options<GetFooData, ThrowOnError>) {\n        return (options?.client ?? this.client).get<GetFooResponses, unknown, ThrowOnError>({ url: '/foo', ...options });\n    }\n    \n    public getFooBar<ThrowOnError extends boolean = false>(options?: Options<GetFooBarData, ThrowOnError>) {\n        return (options?.client ?? this.client).get<GetFooBarResponses, unknown, ThrowOnError>({ url: '/foo/bar', ...options });\n    }\n    \n    private _foo?: Foo;\n    get foo(): Foo {\n        return this._foo ??= new Foo({ client: this.client });\n    }\n}\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@hey-api/sdk/instance/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type ClientOptions = {\n    baseUrl: string;\n};\n\nexport type GetFooData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/foo';\n};\n\nexport type GetFooResponses = {\n    /**\n     * OK\n     */\n    200: string;\n};\n\nexport type GetFooResponse = GetFooResponses[keyof GetFooResponses];\n\nexport type FooPostData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/foo';\n};\n\nexport type FooPostResponses = {\n    /**\n     * OK\n     */\n    200: string;\n};\n\nexport type FooPostResponse = FooPostResponses[keyof FooPostResponses];\n\nexport type FooPutData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/foo';\n};\n\nexport type FooPutResponses = {\n    /**\n     * OK\n     */\n    200: string;\n};\n\nexport type FooPutResponse = FooPutResponses[keyof FooPutResponses];\n\nexport type GetFooBarData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/foo/bar';\n};\n\nexport type GetFooBarResponses = {\n    /**\n     * OK\n     */\n    200: string;\n};\n\nexport type GetFooBarResponse = GetFooBarResponses[keyof GetFooBarResponses];\n\nexport type FooBarPostData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/foo/bar';\n};\n\nexport type FooBarPostResponses = {\n    /**\n     * OK\n     */\n    200: string;\n};\n\nexport type FooBarPostResponse = FooBarPostResponses[keyof FooBarPostResponses];\n\nexport type FooBarPutData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/foo/bar';\n};\n\nexport type FooBarPutResponses = {\n    /**\n     * OK\n     */\n    200: string;\n};\n\nexport type FooBarPutResponse = FooBarPutResponses[keyof FooBarPutResponses];\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@hey-api/sdk/throwOnError/client/client.gen.ts",
    "content": "// 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 (options: RequestOptions) => {\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 url = buildUrl(opts);\n\n    return { opts, url };\n  };\n\n  const request: Client['request'] = async (options) => {\n    // @ts-expect-error\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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@hey-api/sdk/throwOnError/client/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type { Auth } from '../core/auth.gen';\nexport type { QuerySerializerOptions } from '../core/bodySerializer.gen';\nexport {\n  formDataBodySerializer,\n  jsonBodySerializer,\n  urlSearchParamsBodySerializer,\n} from '../core/bodySerializer.gen';\nexport { buildClientParams } from '../core/params.gen';\nexport { serializeQueryKeyValue } from '../core/queryKeySerializer.gen';\nexport { createClient } from './client.gen';\nexport type {\n  Client,\n  ClientOptions,\n  Config,\n  CreateClientConfig,\n  Options,\n  RequestOptions,\n  RequestResult,\n  ResolvedRequestOptions,\n  ResponseStyle,\n  TDataShape,\n} from './types.gen';\nexport { createConfig, mergeHeaders } from './utils.gen';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@hey-api/sdk/throwOnError/client/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { Auth } from '../core/auth.gen';\nimport type {\n  ServerSentEventsOptions,\n  ServerSentEventsResult,\n} from '../core/serverSentEvents.gen';\nimport type { Client as CoreClient, Config as CoreConfig } from '../core/types.gen';\nimport type { Middleware } from './utils.gen';\n\nexport type ResponseStyle = 'data' | 'fields';\n\nexport interface Config<T extends ClientOptions = ClientOptions>\n  extends Omit<RequestInit, 'body' | 'headers' | 'method'>, CoreConfig {\n  /**\n   * Base URL for all requests made by this client.\n   */\n  baseUrl?: T['baseUrl'];\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   * Please don't use the Fetch client for Next.js applications. The `next`\n   * options won't have any effect.\n   *\n   * Install {@link https://www.npmjs.com/package/@hey-api/client-next `@hey-api/client-next`} instead.\n   */\n  next?: never;\n  /**\n   * Return the response data parsed in a specified format. By default, `auto`\n   * will infer the appropriate method from the `Content-Type` response header.\n   * You can override this behavior with any of the {@link Body} methods.\n   * Select `stream` if you don't want to parse response data at all.\n   *\n   * @default 'auto'\n   */\n  parseAs?: 'arrayBuffer' | 'auto' | 'blob' | 'formData' | 'json' | 'stream' | 'text';\n  /**\n   * Should we return only data or multiple fields (data, error, response, etc.)?\n   *\n   * @default 'fields'\n   */\n  responseStyle?: ResponseStyle;\n  /**\n   * Throw an error instead of returning it in the response?\n   *\n   * @default false\n   */\n  throwOnError?: T['throwOnError'];\n}\n\nexport interface RequestOptions<\n  TData = unknown,\n  TResponseStyle extends ResponseStyle = 'fields',\n  ThrowOnError extends boolean = boolean,\n  Url extends string = string,\n>\n  extends\n    Config<{\n      responseStyle: TResponseStyle;\n      throwOnError: ThrowOnError;\n    }>,\n    Pick<\n      ServerSentEventsOptions<TData>,\n      | 'onRequest'\n      | 'onSseError'\n      | 'onSseEvent'\n      | 'sseDefaultRetryDelay'\n      | 'sseMaxRetryAttempts'\n      | 'sseMaxRetryDelay'\n    > {\n  /**\n   * Any body that you want to add to your request.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/fetch#body}\n   */\n  body?: unknown;\n  path?: Record<string, unknown>;\n  query?: Record<string, unknown>;\n  /**\n   * Security mechanism(s) to use for the request.\n   */\n  security?: ReadonlyArray<Auth>;\n  url: Url;\n}\n\nexport interface ResolvedRequestOptions<\n  TResponseStyle extends ResponseStyle = 'fields',\n  ThrowOnError extends boolean = boolean,\n  Url extends string = string,\n> extends RequestOptions<unknown, TResponseStyle, ThrowOnError, Url> {\n  serializedBody?: string;\n}\n\nexport type RequestResult<\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = boolean,\n  TResponseStyle extends ResponseStyle = 'fields',\n> = ThrowOnError extends true\n  ? Promise<\n      TResponseStyle extends 'data'\n        ? TData extends Record<string, unknown>\n          ? TData[keyof TData]\n          : TData\n        : {\n            data: TData extends Record<string, unknown> ? TData[keyof TData] : TData;\n            request: Request;\n            response: Response;\n          }\n    >\n  : Promise<\n      TResponseStyle extends 'data'\n        ? (TData extends Record<string, unknown> ? TData[keyof TData] : TData) | undefined\n        : (\n            | {\n                data: TData extends Record<string, unknown> ? TData[keyof TData] : TData;\n                error: undefined;\n              }\n            | {\n                data: undefined;\n                error: TError extends Record<string, unknown> ? TError[keyof TError] : TError;\n              }\n          ) & {\n            request: Request;\n            response: Response;\n          }\n    >;\n\nexport interface ClientOptions {\n  baseUrl?: string;\n  responseStyle?: ResponseStyle;\n  throwOnError?: boolean;\n}\n\ntype MethodFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'>,\n) => RequestResult<TData, TError, ThrowOnError, TResponseStyle>;\n\ntype SseFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'>,\n) => Promise<ServerSentEventsResult<TData, TError>>;\n\ntype RequestFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'> &\n    Pick<Required<RequestOptions<TData, TResponseStyle, ThrowOnError>>, 'method'>,\n) => RequestResult<TData, TError, ThrowOnError, TResponseStyle>;\n\ntype BuildUrlFn = <\n  TData extends {\n    body?: unknown;\n    path?: Record<string, unknown>;\n    query?: Record<string, unknown>;\n    url: string;\n  },\n>(\n  options: TData & Options<TData>,\n) => string;\n\nexport type Client = CoreClient<RequestFn, Config, MethodFn, BuildUrlFn, SseFn> & {\n  interceptors: Middleware<Request, Response, unknown, ResolvedRequestOptions>;\n};\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 = ClientOptions> = (\n  override?: Config<ClientOptions & T>,\n) => Config<Required<ClientOptions> & T>;\n\nexport interface TDataShape {\n  body?: unknown;\n  headers?: unknown;\n  path?: unknown;\n  query?: unknown;\n  url: string;\n}\n\ntype OmitKeys<T, K> = Pick<T, Exclude<keyof T, K>>;\n\nexport type Options<\n  TData extends TDataShape = TDataShape,\n  ThrowOnError extends boolean = boolean,\n  TResponse = unknown,\n  TResponseStyle extends ResponseStyle = 'fields',\n> = OmitKeys<\n  RequestOptions<TResponse, TResponseStyle, ThrowOnError>,\n  'body' | 'path' | 'query' | 'url'\n> &\n  ([TData] extends [never] ? unknown : Omit<TData, 'url'>);\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@hey-api/sdk/throwOnError/client/utils.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@hey-api/sdk/throwOnError/client.gen.ts",
    "content": "// 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: 'http://localhost:3000/base', throwOnError: true }));\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@hey-api/sdk/throwOnError/core/auth.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@hey-api/sdk/throwOnError/core/bodySerializer.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@hey-api/sdk/throwOnError/core/params.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@hey-api/sdk/throwOnError/core/pathSerializer.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@hey-api/sdk/throwOnError/core/queryKeySerializer.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\n/**\n * JSON-friendly union that mirrors what Pinia Colada can hash.\n */\nexport type JsonValue =\n  | null\n  | string\n  | number\n  | boolean\n  | JsonValue[]\n  | { [key: string]: JsonValue };\n\n/**\n * Replacer that converts non-JSON values (bigint, Date, etc.) to safe substitutes.\n */\nexport const queryKeyJsonReplacer = (_key: string, value: unknown) => {\n  if (value === undefined || typeof value === 'function' || typeof value === 'symbol') {\n    return undefined;\n  }\n  if (typeof value === 'bigint') {\n    return value.toString();\n  }\n  if (value instanceof Date) {\n    return value.toISOString();\n  }\n  return value;\n};\n\n/**\n * Safely stringifies a value and parses it back into a JsonValue.\n */\nexport const stringifyToJsonValue = (input: unknown): JsonValue | undefined => {\n  try {\n    const json = JSON.stringify(input, queryKeyJsonReplacer);\n    if (json === undefined) {\n      return undefined;\n    }\n    return JSON.parse(json) as JsonValue;\n  } catch {\n    return undefined;\n  }\n};\n\n/**\n * Detects plain objects (including objects with a null prototype).\n */\nconst isPlainObject = (value: unknown): value is Record<string, unknown> => {\n  if (value === null || typeof value !== 'object') {\n    return false;\n  }\n  const prototype = Object.getPrototypeOf(value as object);\n  return prototype === Object.prototype || prototype === null;\n};\n\n/**\n * Turns URLSearchParams into a sorted JSON object for deterministic keys.\n */\nconst serializeSearchParams = (params: URLSearchParams): JsonValue => {\n  const entries = Array.from(params.entries()).sort(([a], [b]) => a.localeCompare(b));\n  const result: Record<string, JsonValue> = {};\n\n  for (const [key, value] of entries) {\n    const existing = result[key];\n    if (existing === undefined) {\n      result[key] = value;\n      continue;\n    }\n\n    if (Array.isArray(existing)) {\n      (existing as string[]).push(value);\n    } else {\n      result[key] = [existing, value];\n    }\n  }\n\n  return result;\n};\n\n/**\n * Normalizes any accepted value into a JSON-friendly shape for query keys.\n */\nexport const serializeQueryKeyValue = (value: unknown): JsonValue | undefined => {\n  if (value === null) {\n    return null;\n  }\n\n  if (typeof value === 'string' || typeof value === 'number' || typeof value === 'boolean') {\n    return value;\n  }\n\n  if (value === undefined || typeof value === 'function' || typeof value === 'symbol') {\n    return undefined;\n  }\n\n  if (typeof value === 'bigint') {\n    return value.toString();\n  }\n\n  if (value instanceof Date) {\n    return value.toISOString();\n  }\n\n  if (Array.isArray(value)) {\n    return stringifyToJsonValue(value);\n  }\n\n  if (typeof URLSearchParams !== 'undefined' && value instanceof URLSearchParams) {\n    return serializeSearchParams(value);\n  }\n\n  if (isPlainObject(value)) {\n    return stringifyToJsonValue(value);\n  }\n\n  return undefined;\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@hey-api/sdk/throwOnError/core/serverSentEvents.gen.ts",
    "content": "// 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 const 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            // Normalize line endings: CRLF -> LF, then CR -> LF\n            buffer = buffer.replace(/\\r\\n/g, '\\n').replace(/\\r/g, '\\n');\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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@hey-api/sdk/throwOnError/core/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { Auth, AuthToken } from './auth.gen';\nimport type { BodySerializer, QuerySerializer, QuerySerializerOptions } from './bodySerializer.gen';\n\nexport type HttpMethod =\n  | 'connect'\n  | 'delete'\n  | 'get'\n  | 'head'\n  | 'options'\n  | 'patch'\n  | 'post'\n  | 'put'\n  | 'trace';\n\nexport type Client<\n  RequestFn = never,\n  Config = unknown,\n  MethodFn = never,\n  BuildUrlFn = never,\n  SseFn = never,\n> = {\n  /**\n   * Returns the final request URL.\n   */\n  buildUrl: BuildUrlFn;\n  getConfig: () => Config;\n  request: RequestFn;\n  setConfig: (config: Config) => Config;\n} & {\n  [K in HttpMethod]: MethodFn;\n} & ([SseFn] extends [never] ? { sse?: never } : { sse: { [K in HttpMethod]: SseFn } });\n\nexport interface Config {\n  /**\n   * Auth token or a function returning auth token. The resolved value will be\n   * added to the request payload as defined by its `security` array.\n   */\n  auth?: ((auth: Auth) => Promise<AuthToken> | AuthToken) | AuthToken;\n  /**\n   * A function for serializing request body parameter. By default,\n   * {@link JSON.stringify()} will be used.\n   */\n  bodySerializer?: BodySerializer | null;\n  /**\n   * An object containing any HTTP headers that you want to pre-populate your\n   * `Headers` object with.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/Headers/Headers#init See more}\n   */\n  headers?:\n    | RequestInit['headers']\n    | Record<\n        string,\n        string | number | boolean | (string | number | boolean)[] | null | undefined | unknown\n      >;\n  /**\n   * The request method.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/fetch#method See more}\n   */\n  method?: Uppercase<HttpMethod>;\n  /**\n   * A function for serializing request query parameters. By default, arrays\n   * will be exploded in form style, objects will be exploded in deepObject\n   * style, and reserved characters are percent-encoded.\n   *\n   * This method will have no effect if the native `paramsSerializer()` Axios\n   * API function is used.\n   *\n   * {@link https://swagger.io/docs/specification/serialization/#query View examples}\n   */\n  querySerializer?: QuerySerializer | QuerySerializerOptions;\n  /**\n   * A function validating request data. This is useful if you want to ensure\n   * the request conforms to the desired shape, so it can be safely sent to\n   * the server.\n   */\n  requestValidator?: (data: unknown) => Promise<unknown>;\n  /**\n   * A function transforming response data before it's returned. This is useful\n   * for post-processing data, e.g. converting ISO strings into Date objects.\n   */\n  responseTransformer?: (data: unknown) => Promise<unknown>;\n  /**\n   * A function validating response data. This is useful if you want to ensure\n   * the response conforms to the desired shape, so it can be safely passed to\n   * the transformers and returned to the user.\n   */\n  responseValidator?: (data: unknown) => Promise<unknown>;\n}\n\ntype IsExactlyNeverOrNeverUndefined<T> = [T] extends [never]\n  ? true\n  : [T] extends [never | undefined]\n    ? [undefined] extends [T]\n      ? false\n      : true\n    : false;\n\nexport type OmitNever<T extends Record<string, unknown>> = {\n  [K in keyof T as IsExactlyNeverOrNeverUndefined<T[K]> extends true ? never : K]: T[K];\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@hey-api/sdk/throwOnError/core/utils.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@hey-api/sdk/throwOnError/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport { callToTestOrderOfParams, callWithDefaultOptionalParameters, callWithDefaultParameters, callWithDescriptions, callWithDuplicateResponses, callWithNoContentResponse, callWithParameters, callWithResponse, callWithResponseAndNoContentResponse, callWithResponses, callWithResultFromHeader, callWithWeirdParameterNames, collectionFormat, complexTypes, deleteCallWithoutParametersAndResponse, dummyA, dummyB, duplicateName, duplicateName2, duplicateName3, duplicateName4, fooWow, getCallWithoutParametersAndResponse, headCallWithoutParametersAndResponse, nonAsciiæøåÆøÅöôêÊ字符串, type Options, optionsCallWithoutParametersAndResponse, patchApiVbyApiVersionNoTag, patchCallWithoutParametersAndResponse, postApiVbyApiVersionBody, postCallWithoutParametersAndResponse, putCallWithoutParametersAndResponse, serviceWithEmptyTag, testErrorCode, types } from './sdk.gen';\nexport type { ArrayWithArray, ArrayWithBooleans, ArrayWithNumbers, ArrayWithProperties, ArrayWithReferences, ArrayWithStrings, CallToTestOrderOfParamsData, CallWithDefaultOptionalParametersData, CallWithDefaultParametersData, CallWithDescriptionsData, CallWithDuplicateResponsesData, CallWithDuplicateResponsesError, CallWithDuplicateResponsesErrors, CallWithDuplicateResponsesResponse, CallWithDuplicateResponsesResponses, CallWithNoContentResponseData, CallWithNoContentResponseResponses, CallWithParametersData, CallWithResponseAndNoContentResponseData, CallWithResponseAndNoContentResponseResponse, CallWithResponseAndNoContentResponseResponses, CallWithResponseData, CallWithResponseResponse, CallWithResponseResponses, CallWithResponsesData, CallWithResponsesError, CallWithResponsesErrors, CallWithResponsesResponse, CallWithResponsesResponses, CallWithResultFromHeaderData, CallWithResultFromHeaderErrors, CallWithResultFromHeaderResponses, CallWithWeirdParameterNamesData, ClientOptions, CollectionFormatData, CommentWithBackticks, CommentWithBackticksAndQuotes, CommentWithBreaks, CommentWithExpressionPlaceholders, CommentWithQuotes, CommentWithReservedCharacters, CommentWithSlashes, ComplexTypesData, ComplexTypesErrors, ComplexTypesResponse, ComplexTypesResponses, Date, Default, DeleteCallWithoutParametersAndResponseData, DictionaryWithArray, DictionaryWithDictionary, DictionaryWithProperties, DictionaryWithReference, DictionaryWithString, DummyAData, DummyAResponses, DummyBData, DummyBResponses, DuplicateName2Data, DuplicateName3Data, DuplicateName4Data, DuplicateNameData, EnumFromDescription, EnumWithExtensions, EnumWithNumbers, EnumWithStrings, ExternalRefA, ExternalRefB, ExternalSharedModel, FailureFailure, FooWowData, FooWowResponses, GetCallWithoutParametersAndResponseData, HeadCallWithoutParametersAndResponseData, ModelThatExtends, ModelThatExtendsExtends, ModelWithArray, ModelWithBoolean, ModelWithCircularReference, ModelWithDictionary, ModelWithDuplicateImports, ModelWithDuplicateProperties, ModelWithEnum, ModelWithEnumFromDescription, ModelWithInteger, ModelWithNestedEnums, ModelWithNestedProperties, ModelWithNullableString, ModelWithOrderedProperties, ModelWithPattern, ModelWithPatternWritable, ModelWithProperties, ModelWithPropertiesWritable, ModelWithReference, ModelWithReferenceWritable, ModelWithString, ModelWithStringError, NonAsciiæøåÆøÅöôêÊ字符串Data, NonAsciiæøåÆøÅöôêÊ字符串Response, NonAsciiæøåÆøÅöôêÊ字符串Responses, NonAsciiStringæøåÆøÅöôêÊ字符串, OptionsCallWithoutParametersAndResponseData, ParameterActivityParams, PatchApiVbyApiVersionNoTagData, PatchApiVbyApiVersionNoTagResponses, PatchCallWithoutParametersAndResponseData, PostApiVbyApiVersionBodyData, PostApiVbyApiVersionBodyError, PostApiVbyApiVersionBodyErrors, PostApiVbyApiVersionBodyResponse, PostApiVbyApiVersionBodyResponses, PostCallWithoutParametersAndResponseData, PutCallWithoutParametersAndResponseData, ResponsePostActivityResponse, ServiceWithEmptyTagData, SimpleBoolean, SimpleFile, SimpleInteger, SimpleReference, SimpleString, SimpleStringWithPattern, TestErrorCodeData, TestErrorCodeErrors, TestErrorCodeResponses, TypesData, TypesResponse, TypesResponses } from './types.gen';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@hey-api/sdk/throwOnError/sdk.gen.ts",
    "content": "// 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 { CallToTestOrderOfParamsData, CallWithDefaultOptionalParametersData, CallWithDefaultParametersData, CallWithDescriptionsData, CallWithDuplicateResponsesData, CallWithDuplicateResponsesErrors, CallWithDuplicateResponsesResponses, CallWithNoContentResponseData, CallWithNoContentResponseResponses, CallWithParametersData, CallWithResponseAndNoContentResponseData, CallWithResponseAndNoContentResponseResponses, CallWithResponseData, CallWithResponseResponses, CallWithResponsesData, CallWithResponsesErrors, CallWithResponsesResponses, CallWithResultFromHeaderData, CallWithResultFromHeaderErrors, CallWithResultFromHeaderResponses, CallWithWeirdParameterNamesData, CollectionFormatData, ComplexTypesData, ComplexTypesErrors, ComplexTypesResponses, DeleteCallWithoutParametersAndResponseData, DummyAData, DummyAResponses, DummyBData, DummyBResponses, DuplicateName2Data, DuplicateName3Data, DuplicateName4Data, DuplicateNameData, FooWowData, FooWowResponses, GetCallWithoutParametersAndResponseData, HeadCallWithoutParametersAndResponseData, NonAsciiæøåÆøÅöôêÊ字符串Data, NonAsciiæøåÆøÅöôêÊ字符串Responses, OptionsCallWithoutParametersAndResponseData, PatchApiVbyApiVersionNoTagData, PatchApiVbyApiVersionNoTagResponses, PatchCallWithoutParametersAndResponseData, PostApiVbyApiVersionBodyData, PostApiVbyApiVersionBodyErrors, PostApiVbyApiVersionBodyResponses, PostCallWithoutParametersAndResponseData, PutCallWithoutParametersAndResponseData, ServiceWithEmptyTagData, TestErrorCodeData, TestErrorCodeErrors, TestErrorCodeResponses, TypesData, TypesResponses } from './types.gen';\n\nexport type Options<TData extends TDataShape = TDataShape, ThrowOnError extends boolean = boolean> = Options2<TData, ThrowOnError> & {\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\nexport const serviceWithEmptyTag = <ThrowOnError extends boolean = true>(options?: Options<ServiceWithEmptyTagData, ThrowOnError>) => (options?.client ?? client).get<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/no+tag', ...options });\n\nexport const patchApiVbyApiVersionNoTag = <ThrowOnError extends boolean = true>(options?: Options<PatchApiVbyApiVersionNoTagData, ThrowOnError>) => (options?.client ?? client).patch<PatchApiVbyApiVersionNoTagResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/no+tag', ...options });\n\nexport const fooWow = <ThrowOnError extends boolean = true>(options?: Options<FooWowData, ThrowOnError>) => (options?.client ?? client).put<FooWowResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/no+tag', ...options });\n\nexport const deleteCallWithoutParametersAndResponse = <ThrowOnError extends boolean = true>(options?: Options<DeleteCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).delete<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const getCallWithoutParametersAndResponse = <ThrowOnError extends boolean = true>(options?: Options<GetCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).get<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const headCallWithoutParametersAndResponse = <ThrowOnError extends boolean = true>(options?: Options<HeadCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).head<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const optionsCallWithoutParametersAndResponse = <ThrowOnError extends boolean = true>(options?: Options<OptionsCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).options<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const patchCallWithoutParametersAndResponse = <ThrowOnError extends boolean = true>(options?: Options<PatchCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).patch<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const postCallWithoutParametersAndResponse = <ThrowOnError extends boolean = true>(options?: Options<PostCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).post<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const putCallWithoutParametersAndResponse = <ThrowOnError extends boolean = true>(options?: Options<PutCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).put<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const callWithDescriptions = <ThrowOnError extends boolean = true>(options?: Options<CallWithDescriptionsData, ThrowOnError>) => (options?.client ?? client).post<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/descriptions/', ...options });\n\nexport const callWithParameters = <ThrowOnError extends boolean = true>(options: Options<CallWithParametersData, ThrowOnError>) => (options.client ?? client).post<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/parameters/{parameterPath}', ...options });\n\nexport const callWithWeirdParameterNames = <ThrowOnError extends boolean = true>(options: Options<CallWithWeirdParameterNamesData, ThrowOnError>) => (options.client ?? client).post<unknown, unknown, ThrowOnError>({\n    url: '/api/v{api-version}/parameters/{parameter.path.1}/{parameter-path-2}/{PARAMETER-PATH-3}',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options.headers\n    }\n});\n\nexport const callWithDefaultParameters = <ThrowOnError extends boolean = true>(options: Options<CallWithDefaultParametersData, ThrowOnError>) => (options.client ?? client).get<unknown, unknown, ThrowOnError>({\n    querySerializer: { parameters: { parameterModel: { object: { explode: false, style: 'form' } } } },\n    url: '/api/v{api-version}/defaults',\n    ...options\n});\n\nexport const callWithDefaultOptionalParameters = <ThrowOnError extends boolean = true>(options?: Options<CallWithDefaultOptionalParametersData, ThrowOnError>) => (options?.client ?? client).post<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/defaults', ...options });\n\nexport const callToTestOrderOfParams = <ThrowOnError extends boolean = true>(options: Options<CallToTestOrderOfParamsData, ThrowOnError>) => (options.client ?? client).put<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/defaults', ...options });\n\nexport const duplicateName = <ThrowOnError extends boolean = true>(options?: Options<DuplicateNameData, ThrowOnError>) => (options?.client ?? client).delete<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/duplicate', ...options });\n\nexport const duplicateName2 = <ThrowOnError extends boolean = true>(options?: Options<DuplicateName2Data, ThrowOnError>) => (options?.client ?? client).get<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/duplicate', ...options });\n\nexport const duplicateName3 = <ThrowOnError extends boolean = true>(options?: Options<DuplicateName3Data, ThrowOnError>) => (options?.client ?? client).post<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/duplicate', ...options });\n\nexport const duplicateName4 = <ThrowOnError extends boolean = true>(options?: Options<DuplicateName4Data, ThrowOnError>) => (options?.client ?? client).put<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/duplicate', ...options });\n\nexport const callWithNoContentResponse = <ThrowOnError extends boolean = true>(options?: Options<CallWithNoContentResponseData, ThrowOnError>) => (options?.client ?? client).get<CallWithNoContentResponseResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/no-content', ...options });\n\nexport const callWithResponseAndNoContentResponse = <ThrowOnError extends boolean = true>(options?: Options<CallWithResponseAndNoContentResponseData, ThrowOnError>) => (options?.client ?? client).get<CallWithResponseAndNoContentResponseResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/multiple-tags/response-and-no-content', ...options });\n\nexport const dummyA = <ThrowOnError extends boolean = true>(options?: Options<DummyAData, ThrowOnError>) => (options?.client ?? client).get<DummyAResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/multiple-tags/a', ...options });\n\nexport const dummyB = <ThrowOnError extends boolean = true>(options?: Options<DummyBData, ThrowOnError>) => (options?.client ?? client).get<DummyBResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/multiple-tags/b', ...options });\n\nexport const callWithResponse = <ThrowOnError extends boolean = true>(options?: Options<CallWithResponseData, ThrowOnError>) => (options?.client ?? client).get<CallWithResponseResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/response', ...options });\n\nexport const callWithDuplicateResponses = <ThrowOnError extends boolean = true>(options?: Options<CallWithDuplicateResponsesData, ThrowOnError>) => (options?.client ?? client).post<CallWithDuplicateResponsesResponses, CallWithDuplicateResponsesErrors, ThrowOnError>({ url: '/api/v{api-version}/response', ...options });\n\nexport const callWithResponses = <ThrowOnError extends boolean = true>(options?: Options<CallWithResponsesData, ThrowOnError>) => (options?.client ?? client).put<CallWithResponsesResponses, CallWithResponsesErrors, ThrowOnError>({ url: '/api/v{api-version}/response', ...options });\n\nexport const collectionFormat = <ThrowOnError extends boolean = true>(options: Options<CollectionFormatData, ThrowOnError>) => (options.client ?? client).get<unknown, unknown, ThrowOnError>({\n    querySerializer: { parameters: {\n            parameterArrayCSV: { array: { explode: false } },\n            parameterArraySSV: { array: { explode: false } },\n            parameterArrayTSV: { array: { explode: false } },\n            parameterArrayPipes: { array: { explode: false } }\n        } },\n    url: '/api/v{api-version}/collectionFormat',\n    ...options\n});\n\nexport const types = <ThrowOnError extends boolean = true>(options: Options<TypesData, ThrowOnError>) => (options.client ?? client).get<TypesResponses, unknown, ThrowOnError>({\n    querySerializer: { parameters: { parameterArray: { array: { explode: false } }, parameterDictionary: { object: { explode: false, style: 'form' } } } },\n    url: '/api/v{api-version}/types',\n    ...options\n});\n\nexport const complexTypes = <ThrowOnError extends boolean = true>(options: Options<ComplexTypesData, ThrowOnError>) => (options.client ?? client).get<ComplexTypesResponses, ComplexTypesErrors, ThrowOnError>({\n    querySerializer: { parameters: { parameterObject: { object: { explode: false, style: 'form' } }, parameterReference: { object: { explode: false, style: 'form' } } } },\n    url: '/api/v{api-version}/complex',\n    ...options\n});\n\nexport const callWithResultFromHeader = <ThrowOnError extends boolean = true>(options?: Options<CallWithResultFromHeaderData, ThrowOnError>) => (options?.client ?? client).post<CallWithResultFromHeaderResponses, CallWithResultFromHeaderErrors, ThrowOnError>({ url: '/api/v{api-version}/header', ...options });\n\nexport const testErrorCode = <ThrowOnError extends boolean = true>(options: Options<TestErrorCodeData, ThrowOnError>) => (options.client ?? client).post<TestErrorCodeResponses, TestErrorCodeErrors, ThrowOnError>({ url: '/api/v{api-version}/error', ...options });\n\nexport const nonAsciiæøåÆøÅöôêÊ字符串 = <ThrowOnError extends boolean = true>(options: Options<NonAsciiæøåÆøÅöôêÊ字符串Data, ThrowOnError>) => (options.client ?? client).post<NonAsciiæøåÆøÅöôêÊ字符串Responses, unknown, ThrowOnError>({ url: '/api/v{api-version}/non-ascii-æøåÆØÅöôêÊ字符串', ...options });\n\n/**\n * Body should not be unknown\n *\n * Body should not be unknown\n */\nexport const postApiVbyApiVersionBody = <ThrowOnError extends boolean = true>(options: Options<PostApiVbyApiVersionBodyData, ThrowOnError>) => (options.client ?? client).post<PostApiVbyApiVersionBodyResponses, PostApiVbyApiVersionBodyErrors, ThrowOnError>({\n    url: '/api/v{api-version}/body',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options.headers\n    }\n});\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@hey-api/sdk/throwOnError/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type ClientOptions = {\n    baseUrl: 'http://localhost:3000/base' | (string & {});\n};\n\nexport type ExternalRefA = ExternalSharedModel;\n\nexport type ExternalRefB = ExternalSharedModel;\n\n/**\n * Testing multiline comments in string: First line\n * Second line\n *\n * Fourth line\n */\nexport type CommentWithBreaks = number;\n\n/**\n * Testing backticks in string: `backticks` and ```multiple backticks``` should work\n */\nexport type CommentWithBackticks = number;\n\n/**\n * Testing backticks and quotes in string: `backticks`, 'quotes', \"double quotes\" and ```multiple backticks``` should work\n */\nexport type CommentWithBackticksAndQuotes = number;\n\n/**\n * Testing slashes in string: \\backwards\\\\\\ and /forwards/// should work\n */\nexport type CommentWithSlashes = number;\n\n/**\n * Testing expression placeholders in string: ${expression} should work\n */\nexport type CommentWithExpressionPlaceholders = number;\n\n/**\n * Testing quotes in string: 'single quote''' and \"double quotes\"\"\" should work\n */\nexport type CommentWithQuotes = number;\n\n/**\n * Testing reserved characters in string: * inline * and ** inline ** should work\n */\nexport type CommentWithReservedCharacters = number;\n\n/**\n * This is a simple number\n */\nexport type SimpleInteger = number;\n\n/**\n * This is a simple boolean\n */\nexport type SimpleBoolean = boolean;\n\n/**\n * This is a simple string\n */\nexport type SimpleString = string;\n\n/**\n * A string with non-ascii (unicode) characters valid in typescript identifiers (æøåÆØÅöÔèÈ字符串)\n */\nexport type NonAsciiStringæøåÆøÅöôêÊ字符串 = string;\n\n/**\n * This is a simple file\n */\nexport type SimpleFile = Blob | File;\n\nexport type SimpleReference = ModelWithString;\n\n/**\n * This is a simple string\n */\nexport type SimpleStringWithPattern = string;\n\n/**\n * This is a simple enum with strings\n */\nexport type EnumWithStrings = 'Success' | 'Warning' | 'Error' | '\\'Single Quote\\'' | '\"Double Quotes\"' | 'Non-ascii: øæåôöØÆÅÔÖ字符串';\n\n/**\n * This is a simple enum with numbers\n */\nexport type EnumWithNumbers = 1 | 2 | 3 | 1.1 | 1.2 | 1.3 | 100 | 200 | 300 | -100 | -200 | -300 | -1.1 | -1.2 | -1.3;\n\n/**\n * Success=1,Warning=2,Error=3\n */\nexport type EnumFromDescription = number;\n\n/**\n * This is a simple enum with numbers\n */\nexport type EnumWithExtensions = 200 | 400 | 500;\n\n/**\n * This is a simple array with numbers\n */\nexport type ArrayWithNumbers = Array<number>;\n\n/**\n * This is a simple array with booleans\n */\nexport type ArrayWithBooleans = Array<boolean>;\n\n/**\n * This is a simple array with strings\n */\nexport type ArrayWithStrings = Array<string>;\n\n/**\n * This is a simple array with references\n */\nexport type ArrayWithReferences = Array<ModelWithString>;\n\n/**\n * This is a simple array containing an array\n */\nexport type ArrayWithArray = Array<Array<ModelWithString>>;\n\n/**\n * This is a simple array with properties\n */\nexport type ArrayWithProperties = Array<{\n    foo?: string;\n    bar?: string;\n}>;\n\n/**\n * This is a string dictionary\n */\nexport type DictionaryWithString = {\n    [key: string]: string;\n};\n\n/**\n * This is a string reference\n */\nexport type DictionaryWithReference = {\n    [key: string]: ModelWithString;\n};\n\n/**\n * This is a complex dictionary\n */\nexport type DictionaryWithArray = {\n    [key: string]: Array<ModelWithString>;\n};\n\n/**\n * This is a string dictionary\n */\nexport type DictionaryWithDictionary = {\n    [key: string]: {\n        [key: string]: string;\n    };\n};\n\n/**\n * This is a complex dictionary\n */\nexport type DictionaryWithProperties = {\n    [key: string]: {\n        foo?: string;\n        bar?: string;\n    };\n};\n\n/**\n * This is a type-only model that defines Date as a string\n */\nexport type Date = string;\n\n/**\n * This is a model with one number property\n */\nexport type ModelWithInteger = {\n    /**\n     * This is a simple number property\n     */\n    prop?: number;\n};\n\n/**\n * This is a model with one boolean property\n */\nexport type ModelWithBoolean = {\n    /**\n     * This is a simple boolean property\n     */\n    prop?: boolean;\n};\n\n/**\n * This is a model with one string property\n */\nexport type ModelWithString = {\n    /**\n     * This is a simple string property\n     */\n    prop?: string;\n};\n\n/**\n * This is a model with one string property\n */\nexport type ModelWithStringError = {\n    /**\n     * This is a simple string property\n     */\n    prop?: string;\n};\n\n/**\n * This is a model with one string property\n */\nexport type ModelWithNullableString = {\n    /**\n     * This is a simple string property\n     */\n    nullableProp?: string | null;\n    /**\n     * This is a simple string property\n     */\n    nullableRequiredProp: string | null;\n};\n\n/**\n * This is a model with one enum\n */\nexport type ModelWithEnum = {\n    /**\n     * This is a simple enum with strings\n     */\n    test?: 'Success' | 'Warning' | 'Error' | 'ØÆÅ字符串';\n    /**\n     * These are the HTTP error code enums\n     */\n    statusCode?: '100' | '200 FOO' | '300 FOO_BAR' | '400 foo-bar' | '500 foo.bar' | '600 foo&bar';\n    /**\n     * Simple boolean enum\n     */\n    bool?: true;\n};\n\n/**\n * This is a model with one enum\n */\nexport type ModelWithEnumFromDescription = {\n    /**\n     * Success=1,Warning=2,Error=3\n     */\n    test?: number;\n};\n\n/**\n * This is a model with nested enums\n */\nexport type ModelWithNestedEnums = {\n    dictionaryWithEnum?: {\n        [key: string]: 'Success' | 'Warning' | 'Error';\n    };\n    dictionaryWithEnumFromDescription?: {\n        [key: string]: number;\n    };\n    arrayWithEnum?: Array<'Success' | 'Warning' | 'Error'>;\n    arrayWithDescription?: Array<number>;\n};\n\n/**\n * This is a model with one property containing a reference\n */\nexport type ModelWithReference = {\n    prop?: ModelWithProperties;\n};\n\n/**\n * This is a model with one property containing an array\n */\nexport type ModelWithArray = {\n    prop?: Array<ModelWithString>;\n    propWithFile?: Array<Blob | File>;\n    propWithNumber?: Array<number>;\n};\n\n/**\n * This is a model with one property containing a dictionary\n */\nexport type ModelWithDictionary = {\n    prop?: {\n        [key: string]: string;\n    };\n};\n\n/**\n * This is a model with one property containing a circular reference\n */\nexport type ModelWithCircularReference = {\n    prop?: ModelWithCircularReference;\n};\n\n/**\n * This is a model with one nested property\n */\nexport type ModelWithProperties = {\n    required: string;\n    readonly requiredAndReadOnly: string;\n    string?: string;\n    number?: number;\n    boolean?: boolean;\n    reference?: ModelWithString;\n    'property with space'?: string;\n    default?: string;\n    try?: string;\n    readonly '@namespace.string'?: string;\n    readonly '@namespace.integer'?: number;\n};\n\n/**\n * This is a model with one nested property\n */\nexport type ModelWithNestedProperties = {\n    readonly first: {\n        readonly second: {\n            readonly third: string;\n        };\n    };\n};\n\n/**\n * This is a model with duplicated properties\n */\nexport type ModelWithDuplicateProperties = {\n    prop?: ModelWithString;\n};\n\n/**\n * This is a model with ordered properties\n */\nexport type ModelWithOrderedProperties = {\n    zebra?: string;\n    apple?: string;\n    hawaii?: string;\n};\n\n/**\n * This is a model with duplicated imports\n */\nexport type ModelWithDuplicateImports = {\n    propA?: ModelWithString;\n    propB?: ModelWithString;\n    propC?: ModelWithString;\n};\n\n/**\n * This is a model that extends another model\n */\nexport type ModelThatExtends = ModelWithString & {\n    propExtendsA?: string;\n    propExtendsB?: ModelWithString;\n};\n\n/**\n * This is a model that extends another model\n */\nexport type ModelThatExtendsExtends = ModelWithString & ModelThatExtends & {\n    propExtendsC?: string;\n    propExtendsD?: ModelWithString;\n};\n\nexport type Default = {\n    name?: string;\n};\n\n/**\n * This is a model that contains a some patterns\n */\nexport type ModelWithPattern = {\n    key: string;\n    name: string;\n    readonly enabled?: boolean;\n    readonly modified?: string;\n    id?: string;\n    text?: string;\n    patternWithSingleQuotes?: string;\n    patternWithNewline?: string;\n    patternWithBacktick?: string;\n    patternWithUnicode?: string;\n};\n\nexport type ParameterActivityParams = {\n    description?: string;\n    graduate_id?: number;\n    organization_id?: number;\n    parent_activity?: number;\n    post_id?: number;\n};\n\nexport type ResponsePostActivityResponse = {\n    description?: string;\n    graduate_id?: number;\n    organization_id?: number;\n    parent_activity_id?: number;\n    post_id?: number;\n};\n\nexport type FailureFailure = {\n    error?: string;\n    message?: string;\n    reference_code?: string;\n};\n\nexport type ExternalSharedModel = {\n    id: string;\n    name?: string;\n};\n\n/**\n * This is a model with one property containing a reference\n */\nexport type ModelWithReferenceWritable = {\n    prop?: ModelWithPropertiesWritable;\n};\n\n/**\n * This is a model with one nested property\n */\nexport type ModelWithPropertiesWritable = {\n    required: string;\n    string?: string;\n    number?: number;\n    boolean?: boolean;\n    reference?: ModelWithString;\n    'property with space'?: string;\n    default?: string;\n    try?: string;\n};\n\n/**\n * This is a model that contains a some patterns\n */\nexport type ModelWithPatternWritable = {\n    key: string;\n    name: string;\n    id?: string;\n    text?: string;\n    patternWithSingleQuotes?: string;\n    patternWithNewline?: string;\n    patternWithBacktick?: string;\n    patternWithUnicode?: string;\n};\n\nexport type ServiceWithEmptyTagData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no+tag';\n};\n\nexport type PatchApiVbyApiVersionNoTagData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no+tag';\n};\n\nexport type PatchApiVbyApiVersionNoTagResponses = {\n    /**\n     * OK\n     */\n    default: unknown;\n};\n\nexport type FooWowData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no+tag';\n};\n\nexport type FooWowResponses = {\n    /**\n     * OK\n     */\n    default: unknown;\n};\n\nexport type DeleteCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type GetCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type HeadCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type OptionsCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type PatchCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type PostCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type PutCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type CallWithDescriptionsData = {\n    body?: never;\n    path?: never;\n    query?: {\n        /**\n         * Testing multiline comments in string: First line\n         * Second line\n         *\n         * Fourth line\n         */\n        parameterWithBreaks?: string;\n        /**\n         * Testing backticks in string: `backticks` and ```multiple backticks``` should work\n         */\n        parameterWithBackticks?: string;\n        /**\n         * Testing slashes in string: \\backwards\\\\\\ and /forwards/// should work\n         */\n        parameterWithSlashes?: string;\n        /**\n         * Testing expression placeholders in string: ${expression} should work\n         */\n        parameterWithExpressionPlaceholders?: string;\n        /**\n         * Testing quotes in string: 'single quote''' and \"double quotes\"\"\" should work\n         */\n        parameterWithQuotes?: string;\n        /**\n         * Testing reserved characters in string: * inline * and ** inline ** should work\n         */\n        parameterWithReservedCharacters?: string;\n    };\n    url: '/api/v{api-version}/descriptions/';\n};\n\nexport type CallWithParametersData = {\n    body?: never;\n    headers: {\n        /**\n         * This is the parameter that goes into the header\n         */\n        parameterHeader: string;\n    };\n    path: {\n        /**\n         * This is the parameter that goes into the path\n         */\n        parameterPath: string;\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string;\n    };\n    query: {\n        /**\n         * This is the parameter that goes into the query params\n         */\n        parameterQuery: string;\n    };\n    url: '/api/v{api-version}/parameters/{parameterPath}';\n};\n\nexport type CallWithWeirdParameterNamesData = {\n    /**\n     * This is the parameter that is sent as request body\n     */\n    body: string;\n    headers: {\n        /**\n         * This is the parameter that goes into the request header\n         */\n        'parameter.header': string;\n    };\n    path: {\n        /**\n         * This is the parameter that goes into the path\n         */\n        'parameter.path.1'?: string;\n        /**\n         * This is the parameter that goes into the path\n         */\n        'parameter-path-2'?: string;\n        /**\n         * This is the parameter that goes into the path\n         */\n        'PARAMETER-PATH-3'?: string;\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string;\n    };\n    query: {\n        /**\n         * This is the parameter with a reserved keyword\n         */\n        default?: string;\n        /**\n         * This is the parameter that goes into the request query params\n         */\n        'parameter-query': string;\n    };\n    url: '/api/v{api-version}/parameters/{parameter.path.1}/{parameter-path-2}/{PARAMETER-PATH-3}';\n};\n\nexport type CallWithDefaultParametersData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * This is a simple string with default value\n         */\n        parameterString: string;\n        /**\n         * This is a simple number with default value\n         */\n        parameterNumber: number;\n        /**\n         * This is a simple boolean with default value\n         */\n        parameterBoolean: boolean;\n        /**\n         * This is a simple enum with default value\n         */\n        parameterEnum: 'Success' | 'Warning' | 'Error';\n        /**\n         * This is a model with one string property\n         */\n        parameterModel: {\n            /**\n             * This is a simple string property\n             */\n            prop?: string;\n        };\n    };\n    url: '/api/v{api-version}/defaults';\n};\n\nexport type CallWithDefaultOptionalParametersData = {\n    body?: never;\n    path?: never;\n    query?: {\n        /**\n         * This is a simple string that is optional with default value\n         */\n        parameterString?: string;\n        /**\n         * This is a simple number that is optional with default value\n         */\n        parameterNumber?: number;\n        /**\n         * This is a simple boolean that is optional with default value\n         */\n        parameterBoolean?: boolean;\n        /**\n         * This is a simple enum that is optional with default value\n         */\n        parameterEnum?: 'Success' | 'Warning' | 'Error';\n    };\n    url: '/api/v{api-version}/defaults';\n};\n\nexport type CallToTestOrderOfParamsData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * This is a optional string with default\n         */\n        parameterOptionalStringWithDefault?: string;\n        /**\n         * This is a optional string with empty default\n         */\n        parameterOptionalStringWithEmptyDefault?: string;\n        /**\n         * This is a optional string with no default\n         */\n        parameterOptionalStringWithNoDefault?: string;\n        /**\n         * This is a string with default\n         */\n        parameterStringWithDefault: string;\n        /**\n         * This is a string with empty default\n         */\n        parameterStringWithEmptyDefault: string;\n        /**\n         * This is a string with no default\n         */\n        parameterStringWithNoDefault: string;\n        /**\n         * This is a string that can be null with no default\n         */\n        parameterStringNullableWithNoDefault?: string | null;\n        /**\n         * This is a string that can be null with default\n         */\n        parameterStringNullableWithDefault?: string | null;\n    };\n    url: '/api/v{api-version}/defaults';\n};\n\nexport type DuplicateNameData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/duplicate';\n};\n\nexport type DuplicateName2Data = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/duplicate';\n};\n\nexport type DuplicateName3Data = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/duplicate';\n};\n\nexport type DuplicateName4Data = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/duplicate';\n};\n\nexport type CallWithNoContentResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no-content';\n};\n\nexport type CallWithNoContentResponseResponses = {\n    /**\n     * Success\n     */\n    204: unknown;\n};\n\nexport type CallWithResponseAndNoContentResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multiple-tags/response-and-no-content';\n};\n\nexport type CallWithResponseAndNoContentResponseResponses = {\n    /**\n     * Response is a simple number\n     */\n    200: number;\n    /**\n     * Success\n     */\n    204: unknown;\n};\n\nexport type CallWithResponseAndNoContentResponseResponse = CallWithResponseAndNoContentResponseResponses[keyof CallWithResponseAndNoContentResponseResponses];\n\nexport type DummyAData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multiple-tags/a';\n};\n\nexport type DummyAResponses = {\n    /**\n     * Success\n     */\n    204: unknown;\n};\n\nexport type DummyBData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multiple-tags/b';\n};\n\nexport type DummyBResponses = {\n    /**\n     * Success\n     */\n    204: unknown;\n};\n\nexport type CallWithResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/response';\n};\n\nexport type CallWithResponseResponses = {\n    /**\n     * Message for default response\n     */\n    default: ModelWithString;\n};\n\nexport type CallWithResponseResponse = CallWithResponseResponses[keyof CallWithResponseResponses];\n\nexport type CallWithDuplicateResponsesData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/response';\n};\n\nexport type CallWithDuplicateResponsesErrors = {\n    /**\n     * Message for 500 error\n     */\n    500: ModelWithStringError;\n    /**\n     * Message for 501 error\n     */\n    501: ModelWithStringError;\n    /**\n     * Message for 502 error\n     */\n    502: ModelWithStringError;\n    /**\n     * Message for default response\n     */\n    default: ModelWithString;\n};\n\nexport type CallWithDuplicateResponsesError = CallWithDuplicateResponsesErrors[keyof CallWithDuplicateResponsesErrors];\n\nexport type CallWithDuplicateResponsesResponses = {\n    /**\n     * Message for 201 response\n     */\n    201: ModelWithString;\n    /**\n     * Message for 202 response\n     */\n    202: ModelWithString;\n};\n\nexport type CallWithDuplicateResponsesResponse = CallWithDuplicateResponsesResponses[keyof CallWithDuplicateResponsesResponses];\n\nexport type CallWithResponsesData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/response';\n};\n\nexport type CallWithResponsesErrors = {\n    /**\n     * Message for 500 error\n     */\n    500: ModelWithStringError;\n    /**\n     * Message for 501 error\n     */\n    501: ModelWithStringError;\n    /**\n     * Message for 502 error\n     */\n    502: ModelWithStringError;\n    /**\n     * Message for default response\n     */\n    default: ModelWithString;\n};\n\nexport type CallWithResponsesError = CallWithResponsesErrors[keyof CallWithResponsesErrors];\n\nexport type CallWithResponsesResponses = {\n    /**\n     * Message for 200 response\n     */\n    200: {\n        readonly '@namespace.string'?: string;\n        readonly '@namespace.integer'?: number;\n        readonly value?: Array<ModelWithString>;\n    };\n    /**\n     * Message for 201 response\n     */\n    201: ModelThatExtends;\n    /**\n     * Message for 202 response\n     */\n    202: ModelThatExtendsExtends;\n};\n\nexport type CallWithResponsesResponse = CallWithResponsesResponses[keyof CallWithResponsesResponses];\n\nexport type CollectionFormatData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * This is an array parameter that is sent as csv format (comma-separated values)\n         */\n        parameterArrayCSV: Array<string>;\n        /**\n         * This is an array parameter that is sent as ssv format (space-separated values)\n         */\n        parameterArraySSV: Array<string>;\n        /**\n         * This is an array parameter that is sent as tsv format (tab-separated values)\n         */\n        parameterArrayTSV: Array<string>;\n        /**\n         * This is an array parameter that is sent as pipes format (pipe-separated values)\n         */\n        parameterArrayPipes: Array<string>;\n        /**\n         * This is an array parameter that is sent as multi format (multiple parameter instances)\n         */\n        parameterArrayMulti: Array<string>;\n    };\n    url: '/api/v{api-version}/collectionFormat';\n};\n\nexport type TypesData = {\n    body?: never;\n    path?: {\n        /**\n         * This is a number parameter\n         */\n        id?: number;\n    };\n    query: {\n        /**\n         * This is a number parameter\n         */\n        parameterNumber: number;\n        /**\n         * This is a string parameter\n         */\n        parameterString: string;\n        /**\n         * This is a boolean parameter\n         */\n        parameterBoolean: boolean;\n        /**\n         * This is an array parameter\n         */\n        parameterArray: Array<string>;\n        /**\n         * This is a dictionary parameter\n         */\n        parameterDictionary: {\n            [key: string]: unknown;\n        };\n        /**\n         * This is an enum parameter\n         */\n        parameterEnum: 'Success' | 'Warning' | 'Error';\n    };\n    url: '/api/v{api-version}/types';\n};\n\nexport type TypesResponses = {\n    /**\n     * Response is a simple number\n     */\n    200: number;\n    /**\n     * Response is a simple string\n     */\n    201: string;\n    /**\n     * Response is a simple boolean\n     */\n    202: boolean;\n    /**\n     * Response is a simple object\n     */\n    203: {\n        [key: string]: unknown;\n    };\n};\n\nexport type TypesResponse = TypesResponses[keyof TypesResponses];\n\nexport type ComplexTypesData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * Parameter containing object\n         */\n        parameterObject: {\n            first?: {\n                second?: {\n                    third?: string;\n                };\n            };\n        };\n        /**\n         * This is a model with one string property\n         */\n        parameterReference: {\n            /**\n             * This is a simple string property\n             */\n            prop?: string;\n        };\n    };\n    url: '/api/v{api-version}/complex';\n};\n\nexport type ComplexTypesErrors = {\n    /**\n     * 400 server error\n     */\n    400: unknown;\n    /**\n     * 500 server error\n     */\n    500: unknown;\n};\n\nexport type ComplexTypesResponses = {\n    /**\n     * Successful response\n     */\n    200: Array<ModelWithString>;\n};\n\nexport type ComplexTypesResponse = ComplexTypesResponses[keyof ComplexTypesResponses];\n\nexport type CallWithResultFromHeaderData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/header';\n};\n\nexport type CallWithResultFromHeaderErrors = {\n    /**\n     * 400 server error\n     */\n    400: unknown;\n    /**\n     * 500 server error\n     */\n    500: unknown;\n};\n\nexport type CallWithResultFromHeaderResponses = {\n    /**\n     * Successful response\n     */\n    200: unknown;\n};\n\nexport type TestErrorCodeData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * Status code to return\n         */\n        status: string;\n    };\n    url: '/api/v{api-version}/error';\n};\n\nexport type TestErrorCodeErrors = {\n    /**\n     * Custom message: Internal Server Error\n     */\n    500: unknown;\n    /**\n     * Custom message: Not Implemented\n     */\n    501: unknown;\n    /**\n     * Custom message: Bad Gateway\n     */\n    502: unknown;\n    /**\n     * Custom message: Service Unavailable\n     */\n    503: unknown;\n};\n\nexport type TestErrorCodeResponses = {\n    /**\n     * Custom message: Successful response\n     */\n    200: unknown;\n};\n\nexport type NonAsciiæøåÆøÅöôêÊ字符串Data = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * Dummy input param\n         */\n        nonAsciiParamæøåÆØÅöôêÊ: number;\n    };\n    url: '/api/v{api-version}/non-ascii-æøåÆØÅöôêÊ字符串';\n};\n\nexport type NonAsciiæøåÆøÅöôêÊ字符串Responses = {\n    /**\n     * Successful response\n     */\n    200: NonAsciiStringæøåÆøÅöôêÊ字符串;\n};\n\nexport type NonAsciiæøåÆøÅöôêÊ字符串Response = NonAsciiæøåÆøÅöôêÊ字符串Responses[keyof NonAsciiæøåÆøÅöôêÊ字符串Responses];\n\nexport type PostApiVbyApiVersionBodyData = {\n    /**\n     * Body should not be unknown\n     */\n    body: ParameterActivityParams;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/body';\n};\n\nexport type PostApiVbyApiVersionBodyErrors = {\n    /**\n     * Bad Request\n     */\n    400: FailureFailure;\n    /**\n     * Internal Server Error\n     */\n    500: FailureFailure;\n};\n\nexport type PostApiVbyApiVersionBodyError = PostApiVbyApiVersionBodyErrors[keyof PostApiVbyApiVersionBodyErrors];\n\nexport type PostApiVbyApiVersionBodyResponses = {\n    /**\n     * OK\n     */\n    200: ResponsePostActivityResponse;\n};\n\nexport type PostApiVbyApiVersionBodyResponse = PostApiVbyApiVersionBodyResponses[keyof PostApiVbyApiVersionBodyResponses];\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@hey-api/typescript/transforms-read-write-custom-name/client/client.gen.ts",
    "content": "// 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 (options: RequestOptions) => {\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 url = buildUrl(opts);\n\n    return { opts, url };\n  };\n\n  const request: Client['request'] = async (options) => {\n    // @ts-expect-error\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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@hey-api/typescript/transforms-read-write-custom-name/client/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type { Auth } from '../core/auth.gen';\nexport type { QuerySerializerOptions } from '../core/bodySerializer.gen';\nexport {\n  formDataBodySerializer,\n  jsonBodySerializer,\n  urlSearchParamsBodySerializer,\n} from '../core/bodySerializer.gen';\nexport { buildClientParams } from '../core/params.gen';\nexport { serializeQueryKeyValue } from '../core/queryKeySerializer.gen';\nexport { createClient } from './client.gen';\nexport type {\n  Client,\n  ClientOptions,\n  Config,\n  CreateClientConfig,\n  Options,\n  RequestOptions,\n  RequestResult,\n  ResolvedRequestOptions,\n  ResponseStyle,\n  TDataShape,\n} from './types.gen';\nexport { createConfig, mergeHeaders } from './utils.gen';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@hey-api/typescript/transforms-read-write-custom-name/client/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { Auth } from '../core/auth.gen';\nimport type {\n  ServerSentEventsOptions,\n  ServerSentEventsResult,\n} from '../core/serverSentEvents.gen';\nimport type { Client as CoreClient, Config as CoreConfig } from '../core/types.gen';\nimport type { Middleware } from './utils.gen';\n\nexport type ResponseStyle = 'data' | 'fields';\n\nexport interface Config<T extends ClientOptions = ClientOptions>\n  extends Omit<RequestInit, 'body' | 'headers' | 'method'>, CoreConfig {\n  /**\n   * Base URL for all requests made by this client.\n   */\n  baseUrl?: T['baseUrl'];\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   * Please don't use the Fetch client for Next.js applications. The `next`\n   * options won't have any effect.\n   *\n   * Install {@link https://www.npmjs.com/package/@hey-api/client-next `@hey-api/client-next`} instead.\n   */\n  next?: never;\n  /**\n   * Return the response data parsed in a specified format. By default, `auto`\n   * will infer the appropriate method from the `Content-Type` response header.\n   * You can override this behavior with any of the {@link Body} methods.\n   * Select `stream` if you don't want to parse response data at all.\n   *\n   * @default 'auto'\n   */\n  parseAs?: 'arrayBuffer' | 'auto' | 'blob' | 'formData' | 'json' | 'stream' | 'text';\n  /**\n   * Should we return only data or multiple fields (data, error, response, etc.)?\n   *\n   * @default 'fields'\n   */\n  responseStyle?: ResponseStyle;\n  /**\n   * Throw an error instead of returning it in the response?\n   *\n   * @default false\n   */\n  throwOnError?: T['throwOnError'];\n}\n\nexport interface RequestOptions<\n  TData = unknown,\n  TResponseStyle extends ResponseStyle = 'fields',\n  ThrowOnError extends boolean = boolean,\n  Url extends string = string,\n>\n  extends\n    Config<{\n      responseStyle: TResponseStyle;\n      throwOnError: ThrowOnError;\n    }>,\n    Pick<\n      ServerSentEventsOptions<TData>,\n      | 'onRequest'\n      | 'onSseError'\n      | 'onSseEvent'\n      | 'sseDefaultRetryDelay'\n      | 'sseMaxRetryAttempts'\n      | 'sseMaxRetryDelay'\n    > {\n  /**\n   * Any body that you want to add to your request.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/fetch#body}\n   */\n  body?: unknown;\n  path?: Record<string, unknown>;\n  query?: Record<string, unknown>;\n  /**\n   * Security mechanism(s) to use for the request.\n   */\n  security?: ReadonlyArray<Auth>;\n  url: Url;\n}\n\nexport interface ResolvedRequestOptions<\n  TResponseStyle extends ResponseStyle = 'fields',\n  ThrowOnError extends boolean = boolean,\n  Url extends string = string,\n> extends RequestOptions<unknown, TResponseStyle, ThrowOnError, Url> {\n  serializedBody?: string;\n}\n\nexport type RequestResult<\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = boolean,\n  TResponseStyle extends ResponseStyle = 'fields',\n> = ThrowOnError extends true\n  ? Promise<\n      TResponseStyle extends 'data'\n        ? TData extends Record<string, unknown>\n          ? TData[keyof TData]\n          : TData\n        : {\n            data: TData extends Record<string, unknown> ? TData[keyof TData] : TData;\n            request: Request;\n            response: Response;\n          }\n    >\n  : Promise<\n      TResponseStyle extends 'data'\n        ? (TData extends Record<string, unknown> ? TData[keyof TData] : TData) | undefined\n        : (\n            | {\n                data: TData extends Record<string, unknown> ? TData[keyof TData] : TData;\n                error: undefined;\n              }\n            | {\n                data: undefined;\n                error: TError extends Record<string, unknown> ? TError[keyof TError] : TError;\n              }\n          ) & {\n            request: Request;\n            response: Response;\n          }\n    >;\n\nexport interface ClientOptions {\n  baseUrl?: string;\n  responseStyle?: ResponseStyle;\n  throwOnError?: boolean;\n}\n\ntype MethodFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'>,\n) => RequestResult<TData, TError, ThrowOnError, TResponseStyle>;\n\ntype SseFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'>,\n) => Promise<ServerSentEventsResult<TData, TError>>;\n\ntype RequestFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'> &\n    Pick<Required<RequestOptions<TData, TResponseStyle, ThrowOnError>>, 'method'>,\n) => RequestResult<TData, TError, ThrowOnError, TResponseStyle>;\n\ntype BuildUrlFn = <\n  TData extends {\n    body?: unknown;\n    path?: Record<string, unknown>;\n    query?: Record<string, unknown>;\n    url: string;\n  },\n>(\n  options: TData & Options<TData>,\n) => string;\n\nexport type Client = CoreClient<RequestFn, Config, MethodFn, BuildUrlFn, SseFn> & {\n  interceptors: Middleware<Request, Response, unknown, ResolvedRequestOptions>;\n};\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 = ClientOptions> = (\n  override?: Config<ClientOptions & T>,\n) => Config<Required<ClientOptions> & T>;\n\nexport interface TDataShape {\n  body?: unknown;\n  headers?: unknown;\n  path?: unknown;\n  query?: unknown;\n  url: string;\n}\n\ntype OmitKeys<T, K> = Pick<T, Exclude<keyof T, K>>;\n\nexport type Options<\n  TData extends TDataShape = TDataShape,\n  ThrowOnError extends boolean = boolean,\n  TResponse = unknown,\n  TResponseStyle extends ResponseStyle = 'fields',\n> = OmitKeys<\n  RequestOptions<TResponse, TResponseStyle, ThrowOnError>,\n  'body' | 'path' | 'query' | 'url'\n> &\n  ([TData] extends [never] ? unknown : Omit<TData, 'url'>);\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@hey-api/typescript/transforms-read-write-custom-name/client/utils.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@hey-api/typescript/transforms-read-write-custom-name/client.gen.ts",
    "content": "// 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>());\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@hey-api/typescript/transforms-read-write-custom-name/core/auth.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@hey-api/typescript/transforms-read-write-custom-name/core/bodySerializer.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@hey-api/typescript/transforms-read-write-custom-name/core/params.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@hey-api/typescript/transforms-read-write-custom-name/core/pathSerializer.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@hey-api/typescript/transforms-read-write-custom-name/core/queryKeySerializer.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\n/**\n * JSON-friendly union that mirrors what Pinia Colada can hash.\n */\nexport type JsonValue =\n  | null\n  | string\n  | number\n  | boolean\n  | JsonValue[]\n  | { [key: string]: JsonValue };\n\n/**\n * Replacer that converts non-JSON values (bigint, Date, etc.) to safe substitutes.\n */\nexport const queryKeyJsonReplacer = (_key: string, value: unknown) => {\n  if (value === undefined || typeof value === 'function' || typeof value === 'symbol') {\n    return undefined;\n  }\n  if (typeof value === 'bigint') {\n    return value.toString();\n  }\n  if (value instanceof Date) {\n    return value.toISOString();\n  }\n  return value;\n};\n\n/**\n * Safely stringifies a value and parses it back into a JsonValue.\n */\nexport const stringifyToJsonValue = (input: unknown): JsonValue | undefined => {\n  try {\n    const json = JSON.stringify(input, queryKeyJsonReplacer);\n    if (json === undefined) {\n      return undefined;\n    }\n    return JSON.parse(json) as JsonValue;\n  } catch {\n    return undefined;\n  }\n};\n\n/**\n * Detects plain objects (including objects with a null prototype).\n */\nconst isPlainObject = (value: unknown): value is Record<string, unknown> => {\n  if (value === null || typeof value !== 'object') {\n    return false;\n  }\n  const prototype = Object.getPrototypeOf(value as object);\n  return prototype === Object.prototype || prototype === null;\n};\n\n/**\n * Turns URLSearchParams into a sorted JSON object for deterministic keys.\n */\nconst serializeSearchParams = (params: URLSearchParams): JsonValue => {\n  const entries = Array.from(params.entries()).sort(([a], [b]) => a.localeCompare(b));\n  const result: Record<string, JsonValue> = {};\n\n  for (const [key, value] of entries) {\n    const existing = result[key];\n    if (existing === undefined) {\n      result[key] = value;\n      continue;\n    }\n\n    if (Array.isArray(existing)) {\n      (existing as string[]).push(value);\n    } else {\n      result[key] = [existing, value];\n    }\n  }\n\n  return result;\n};\n\n/**\n * Normalizes any accepted value into a JSON-friendly shape for query keys.\n */\nexport const serializeQueryKeyValue = (value: unknown): JsonValue | undefined => {\n  if (value === null) {\n    return null;\n  }\n\n  if (typeof value === 'string' || typeof value === 'number' || typeof value === 'boolean') {\n    return value;\n  }\n\n  if (value === undefined || typeof value === 'function' || typeof value === 'symbol') {\n    return undefined;\n  }\n\n  if (typeof value === 'bigint') {\n    return value.toString();\n  }\n\n  if (value instanceof Date) {\n    return value.toISOString();\n  }\n\n  if (Array.isArray(value)) {\n    return stringifyToJsonValue(value);\n  }\n\n  if (typeof URLSearchParams !== 'undefined' && value instanceof URLSearchParams) {\n    return serializeSearchParams(value);\n  }\n\n  if (isPlainObject(value)) {\n    return stringifyToJsonValue(value);\n  }\n\n  return undefined;\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@hey-api/typescript/transforms-read-write-custom-name/core/serverSentEvents.gen.ts",
    "content": "// 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 const 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            // Normalize line endings: CRLF -> LF, then CR -> LF\n            buffer = buffer.replace(/\\r\\n/g, '\\n').replace(/\\r/g, '\\n');\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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@hey-api/typescript/transforms-read-write-custom-name/core/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { Auth, AuthToken } from './auth.gen';\nimport type { BodySerializer, QuerySerializer, QuerySerializerOptions } from './bodySerializer.gen';\n\nexport type HttpMethod =\n  | 'connect'\n  | 'delete'\n  | 'get'\n  | 'head'\n  | 'options'\n  | 'patch'\n  | 'post'\n  | 'put'\n  | 'trace';\n\nexport type Client<\n  RequestFn = never,\n  Config = unknown,\n  MethodFn = never,\n  BuildUrlFn = never,\n  SseFn = never,\n> = {\n  /**\n   * Returns the final request URL.\n   */\n  buildUrl: BuildUrlFn;\n  getConfig: () => Config;\n  request: RequestFn;\n  setConfig: (config: Config) => Config;\n} & {\n  [K in HttpMethod]: MethodFn;\n} & ([SseFn] extends [never] ? { sse?: never } : { sse: { [K in HttpMethod]: SseFn } });\n\nexport interface Config {\n  /**\n   * Auth token or a function returning auth token. The resolved value will be\n   * added to the request payload as defined by its `security` array.\n   */\n  auth?: ((auth: Auth) => Promise<AuthToken> | AuthToken) | AuthToken;\n  /**\n   * A function for serializing request body parameter. By default,\n   * {@link JSON.stringify()} will be used.\n   */\n  bodySerializer?: BodySerializer | null;\n  /**\n   * An object containing any HTTP headers that you want to pre-populate your\n   * `Headers` object with.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/Headers/Headers#init See more}\n   */\n  headers?:\n    | RequestInit['headers']\n    | Record<\n        string,\n        string | number | boolean | (string | number | boolean)[] | null | undefined | unknown\n      >;\n  /**\n   * The request method.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/fetch#method See more}\n   */\n  method?: Uppercase<HttpMethod>;\n  /**\n   * A function for serializing request query parameters. By default, arrays\n   * will be exploded in form style, objects will be exploded in deepObject\n   * style, and reserved characters are percent-encoded.\n   *\n   * This method will have no effect if the native `paramsSerializer()` Axios\n   * API function is used.\n   *\n   * {@link https://swagger.io/docs/specification/serialization/#query View examples}\n   */\n  querySerializer?: QuerySerializer | QuerySerializerOptions;\n  /**\n   * A function validating request data. This is useful if you want to ensure\n   * the request conforms to the desired shape, so it can be safely sent to\n   * the server.\n   */\n  requestValidator?: (data: unknown) => Promise<unknown>;\n  /**\n   * A function transforming response data before it's returned. This is useful\n   * for post-processing data, e.g. converting ISO strings into Date objects.\n   */\n  responseTransformer?: (data: unknown) => Promise<unknown>;\n  /**\n   * A function validating response data. This is useful if you want to ensure\n   * the response conforms to the desired shape, so it can be safely passed to\n   * the transformers and returned to the user.\n   */\n  responseValidator?: (data: unknown) => Promise<unknown>;\n}\n\ntype IsExactlyNeverOrNeverUndefined<T> = [T] extends [never]\n  ? true\n  : [T] extends [never | undefined]\n    ? [undefined] extends [T]\n      ? false\n      : true\n    : false;\n\nexport type OmitNever<T extends Record<string, unknown>> = {\n  [K in keyof T as IsExactlyNeverOrNeverUndefined<T[K]> extends true ? never : K]: T[K];\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@hey-api/typescript/transforms-read-write-custom-name/core/utils.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@hey-api/typescript/transforms-read-write-custom-name/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type { Baz, ClientOptions, PostFooReadData, PostFooReadResponse, PostFooReadResponses, QuxAllRead, ReadableBarRead, ReadableCorge, ReadableFooRead, ReadableQuux, WritableBarRead, WritableCorge, WritableFooRead, WritableQuux } from './types.gen';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@hey-api/typescript/transforms-read-write-custom-name/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type ClientOptions = {\n    baseUrl: string;\n};\n\nexport type Baz = {\n    baz?: string;\n};\n\nexport type QuxAllRead = {\n    readonly baz?: string;\n};\n\nexport type ReadableFooRead = ReadableBarRead & {\n    readonly foo?: string;\n};\n\nexport type WritableFooRead = WritableBarRead;\n\nexport type ReadableBarRead = Baz & {\n    readonly bar?: string;\n};\n\nexport type WritableBarRead = Baz;\n\nexport type ReadableQuux = {\n    baz?: Array<Baz>;\n    qux?: QuxAllRead;\n};\n\nexport type WritableQuux = {\n    baz?: Array<Baz>;\n};\n\nexport type ReadableCorge = {\n    foo?: string;\n    bar?: {\n        readonly baz?: boolean;\n    };\n};\n\nexport type WritableCorge = {\n    foo?: string;\n};\n\nexport type PostFooReadData = {\n    body: WritableFooRead;\n    path?: never;\n    query?: never;\n    url: '/foo-read';\n};\n\nexport type PostFooReadResponses = {\n    /**\n     * OK\n     */\n    200: ReadableFooRead;\n};\n\nexport type PostFooReadResponse = PostFooReadResponses[keyof PostFooReadResponses];\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@hey-api/typescript/transforms-read-write-ignore/client/client.gen.ts",
    "content": "// 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 (options: RequestOptions) => {\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 url = buildUrl(opts);\n\n    return { opts, url };\n  };\n\n  const request: Client['request'] = async (options) => {\n    // @ts-expect-error\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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@hey-api/typescript/transforms-read-write-ignore/client/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type { Auth } from '../core/auth.gen';\nexport type { QuerySerializerOptions } from '../core/bodySerializer.gen';\nexport {\n  formDataBodySerializer,\n  jsonBodySerializer,\n  urlSearchParamsBodySerializer,\n} from '../core/bodySerializer.gen';\nexport { buildClientParams } from '../core/params.gen';\nexport { serializeQueryKeyValue } from '../core/queryKeySerializer.gen';\nexport { createClient } from './client.gen';\nexport type {\n  Client,\n  ClientOptions,\n  Config,\n  CreateClientConfig,\n  Options,\n  RequestOptions,\n  RequestResult,\n  ResolvedRequestOptions,\n  ResponseStyle,\n  TDataShape,\n} from './types.gen';\nexport { createConfig, mergeHeaders } from './utils.gen';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@hey-api/typescript/transforms-read-write-ignore/client/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { Auth } from '../core/auth.gen';\nimport type {\n  ServerSentEventsOptions,\n  ServerSentEventsResult,\n} from '../core/serverSentEvents.gen';\nimport type { Client as CoreClient, Config as CoreConfig } from '../core/types.gen';\nimport type { Middleware } from './utils.gen';\n\nexport type ResponseStyle = 'data' | 'fields';\n\nexport interface Config<T extends ClientOptions = ClientOptions>\n  extends Omit<RequestInit, 'body' | 'headers' | 'method'>, CoreConfig {\n  /**\n   * Base URL for all requests made by this client.\n   */\n  baseUrl?: T['baseUrl'];\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   * Please don't use the Fetch client for Next.js applications. The `next`\n   * options won't have any effect.\n   *\n   * Install {@link https://www.npmjs.com/package/@hey-api/client-next `@hey-api/client-next`} instead.\n   */\n  next?: never;\n  /**\n   * Return the response data parsed in a specified format. By default, `auto`\n   * will infer the appropriate method from the `Content-Type` response header.\n   * You can override this behavior with any of the {@link Body} methods.\n   * Select `stream` if you don't want to parse response data at all.\n   *\n   * @default 'auto'\n   */\n  parseAs?: 'arrayBuffer' | 'auto' | 'blob' | 'formData' | 'json' | 'stream' | 'text';\n  /**\n   * Should we return only data or multiple fields (data, error, response, etc.)?\n   *\n   * @default 'fields'\n   */\n  responseStyle?: ResponseStyle;\n  /**\n   * Throw an error instead of returning it in the response?\n   *\n   * @default false\n   */\n  throwOnError?: T['throwOnError'];\n}\n\nexport interface RequestOptions<\n  TData = unknown,\n  TResponseStyle extends ResponseStyle = 'fields',\n  ThrowOnError extends boolean = boolean,\n  Url extends string = string,\n>\n  extends\n    Config<{\n      responseStyle: TResponseStyle;\n      throwOnError: ThrowOnError;\n    }>,\n    Pick<\n      ServerSentEventsOptions<TData>,\n      | 'onRequest'\n      | 'onSseError'\n      | 'onSseEvent'\n      | 'sseDefaultRetryDelay'\n      | 'sseMaxRetryAttempts'\n      | 'sseMaxRetryDelay'\n    > {\n  /**\n   * Any body that you want to add to your request.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/fetch#body}\n   */\n  body?: unknown;\n  path?: Record<string, unknown>;\n  query?: Record<string, unknown>;\n  /**\n   * Security mechanism(s) to use for the request.\n   */\n  security?: ReadonlyArray<Auth>;\n  url: Url;\n}\n\nexport interface ResolvedRequestOptions<\n  TResponseStyle extends ResponseStyle = 'fields',\n  ThrowOnError extends boolean = boolean,\n  Url extends string = string,\n> extends RequestOptions<unknown, TResponseStyle, ThrowOnError, Url> {\n  serializedBody?: string;\n}\n\nexport type RequestResult<\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = boolean,\n  TResponseStyle extends ResponseStyle = 'fields',\n> = ThrowOnError extends true\n  ? Promise<\n      TResponseStyle extends 'data'\n        ? TData extends Record<string, unknown>\n          ? TData[keyof TData]\n          : TData\n        : {\n            data: TData extends Record<string, unknown> ? TData[keyof TData] : TData;\n            request: Request;\n            response: Response;\n          }\n    >\n  : Promise<\n      TResponseStyle extends 'data'\n        ? (TData extends Record<string, unknown> ? TData[keyof TData] : TData) | undefined\n        : (\n            | {\n                data: TData extends Record<string, unknown> ? TData[keyof TData] : TData;\n                error: undefined;\n              }\n            | {\n                data: undefined;\n                error: TError extends Record<string, unknown> ? TError[keyof TError] : TError;\n              }\n          ) & {\n            request: Request;\n            response: Response;\n          }\n    >;\n\nexport interface ClientOptions {\n  baseUrl?: string;\n  responseStyle?: ResponseStyle;\n  throwOnError?: boolean;\n}\n\ntype MethodFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'>,\n) => RequestResult<TData, TError, ThrowOnError, TResponseStyle>;\n\ntype SseFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'>,\n) => Promise<ServerSentEventsResult<TData, TError>>;\n\ntype RequestFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'> &\n    Pick<Required<RequestOptions<TData, TResponseStyle, ThrowOnError>>, 'method'>,\n) => RequestResult<TData, TError, ThrowOnError, TResponseStyle>;\n\ntype BuildUrlFn = <\n  TData extends {\n    body?: unknown;\n    path?: Record<string, unknown>;\n    query?: Record<string, unknown>;\n    url: string;\n  },\n>(\n  options: TData & Options<TData>,\n) => string;\n\nexport type Client = CoreClient<RequestFn, Config, MethodFn, BuildUrlFn, SseFn> & {\n  interceptors: Middleware<Request, Response, unknown, ResolvedRequestOptions>;\n};\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 = ClientOptions> = (\n  override?: Config<ClientOptions & T>,\n) => Config<Required<ClientOptions> & T>;\n\nexport interface TDataShape {\n  body?: unknown;\n  headers?: unknown;\n  path?: unknown;\n  query?: unknown;\n  url: string;\n}\n\ntype OmitKeys<T, K> = Pick<T, Exclude<keyof T, K>>;\n\nexport type Options<\n  TData extends TDataShape = TDataShape,\n  ThrowOnError extends boolean = boolean,\n  TResponse = unknown,\n  TResponseStyle extends ResponseStyle = 'fields',\n> = OmitKeys<\n  RequestOptions<TResponse, TResponseStyle, ThrowOnError>,\n  'body' | 'path' | 'query' | 'url'\n> &\n  ([TData] extends [never] ? unknown : Omit<TData, 'url'>);\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@hey-api/typescript/transforms-read-write-ignore/client/utils.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@hey-api/typescript/transforms-read-write-ignore/client.gen.ts",
    "content": "// 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>());\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@hey-api/typescript/transforms-read-write-ignore/core/auth.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@hey-api/typescript/transforms-read-write-ignore/core/bodySerializer.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@hey-api/typescript/transforms-read-write-ignore/core/params.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@hey-api/typescript/transforms-read-write-ignore/core/pathSerializer.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@hey-api/typescript/transforms-read-write-ignore/core/queryKeySerializer.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\n/**\n * JSON-friendly union that mirrors what Pinia Colada can hash.\n */\nexport type JsonValue =\n  | null\n  | string\n  | number\n  | boolean\n  | JsonValue[]\n  | { [key: string]: JsonValue };\n\n/**\n * Replacer that converts non-JSON values (bigint, Date, etc.) to safe substitutes.\n */\nexport const queryKeyJsonReplacer = (_key: string, value: unknown) => {\n  if (value === undefined || typeof value === 'function' || typeof value === 'symbol') {\n    return undefined;\n  }\n  if (typeof value === 'bigint') {\n    return value.toString();\n  }\n  if (value instanceof Date) {\n    return value.toISOString();\n  }\n  return value;\n};\n\n/**\n * Safely stringifies a value and parses it back into a JsonValue.\n */\nexport const stringifyToJsonValue = (input: unknown): JsonValue | undefined => {\n  try {\n    const json = JSON.stringify(input, queryKeyJsonReplacer);\n    if (json === undefined) {\n      return undefined;\n    }\n    return JSON.parse(json) as JsonValue;\n  } catch {\n    return undefined;\n  }\n};\n\n/**\n * Detects plain objects (including objects with a null prototype).\n */\nconst isPlainObject = (value: unknown): value is Record<string, unknown> => {\n  if (value === null || typeof value !== 'object') {\n    return false;\n  }\n  const prototype = Object.getPrototypeOf(value as object);\n  return prototype === Object.prototype || prototype === null;\n};\n\n/**\n * Turns URLSearchParams into a sorted JSON object for deterministic keys.\n */\nconst serializeSearchParams = (params: URLSearchParams): JsonValue => {\n  const entries = Array.from(params.entries()).sort(([a], [b]) => a.localeCompare(b));\n  const result: Record<string, JsonValue> = {};\n\n  for (const [key, value] of entries) {\n    const existing = result[key];\n    if (existing === undefined) {\n      result[key] = value;\n      continue;\n    }\n\n    if (Array.isArray(existing)) {\n      (existing as string[]).push(value);\n    } else {\n      result[key] = [existing, value];\n    }\n  }\n\n  return result;\n};\n\n/**\n * Normalizes any accepted value into a JSON-friendly shape for query keys.\n */\nexport const serializeQueryKeyValue = (value: unknown): JsonValue | undefined => {\n  if (value === null) {\n    return null;\n  }\n\n  if (typeof value === 'string' || typeof value === 'number' || typeof value === 'boolean') {\n    return value;\n  }\n\n  if (value === undefined || typeof value === 'function' || typeof value === 'symbol') {\n    return undefined;\n  }\n\n  if (typeof value === 'bigint') {\n    return value.toString();\n  }\n\n  if (value instanceof Date) {\n    return value.toISOString();\n  }\n\n  if (Array.isArray(value)) {\n    return stringifyToJsonValue(value);\n  }\n\n  if (typeof URLSearchParams !== 'undefined' && value instanceof URLSearchParams) {\n    return serializeSearchParams(value);\n  }\n\n  if (isPlainObject(value)) {\n    return stringifyToJsonValue(value);\n  }\n\n  return undefined;\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@hey-api/typescript/transforms-read-write-ignore/core/serverSentEvents.gen.ts",
    "content": "// 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 const 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            // Normalize line endings: CRLF -> LF, then CR -> LF\n            buffer = buffer.replace(/\\r\\n/g, '\\n').replace(/\\r/g, '\\n');\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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@hey-api/typescript/transforms-read-write-ignore/core/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { Auth, AuthToken } from './auth.gen';\nimport type { BodySerializer, QuerySerializer, QuerySerializerOptions } from './bodySerializer.gen';\n\nexport type HttpMethod =\n  | 'connect'\n  | 'delete'\n  | 'get'\n  | 'head'\n  | 'options'\n  | 'patch'\n  | 'post'\n  | 'put'\n  | 'trace';\n\nexport type Client<\n  RequestFn = never,\n  Config = unknown,\n  MethodFn = never,\n  BuildUrlFn = never,\n  SseFn = never,\n> = {\n  /**\n   * Returns the final request URL.\n   */\n  buildUrl: BuildUrlFn;\n  getConfig: () => Config;\n  request: RequestFn;\n  setConfig: (config: Config) => Config;\n} & {\n  [K in HttpMethod]: MethodFn;\n} & ([SseFn] extends [never] ? { sse?: never } : { sse: { [K in HttpMethod]: SseFn } });\n\nexport interface Config {\n  /**\n   * Auth token or a function returning auth token. The resolved value will be\n   * added to the request payload as defined by its `security` array.\n   */\n  auth?: ((auth: Auth) => Promise<AuthToken> | AuthToken) | AuthToken;\n  /**\n   * A function for serializing request body parameter. By default,\n   * {@link JSON.stringify()} will be used.\n   */\n  bodySerializer?: BodySerializer | null;\n  /**\n   * An object containing any HTTP headers that you want to pre-populate your\n   * `Headers` object with.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/Headers/Headers#init See more}\n   */\n  headers?:\n    | RequestInit['headers']\n    | Record<\n        string,\n        string | number | boolean | (string | number | boolean)[] | null | undefined | unknown\n      >;\n  /**\n   * The request method.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/fetch#method See more}\n   */\n  method?: Uppercase<HttpMethod>;\n  /**\n   * A function for serializing request query parameters. By default, arrays\n   * will be exploded in form style, objects will be exploded in deepObject\n   * style, and reserved characters are percent-encoded.\n   *\n   * This method will have no effect if the native `paramsSerializer()` Axios\n   * API function is used.\n   *\n   * {@link https://swagger.io/docs/specification/serialization/#query View examples}\n   */\n  querySerializer?: QuerySerializer | QuerySerializerOptions;\n  /**\n   * A function validating request data. This is useful if you want to ensure\n   * the request conforms to the desired shape, so it can be safely sent to\n   * the server.\n   */\n  requestValidator?: (data: unknown) => Promise<unknown>;\n  /**\n   * A function transforming response data before it's returned. This is useful\n   * for post-processing data, e.g. converting ISO strings into Date objects.\n   */\n  responseTransformer?: (data: unknown) => Promise<unknown>;\n  /**\n   * A function validating response data. This is useful if you want to ensure\n   * the response conforms to the desired shape, so it can be safely passed to\n   * the transformers and returned to the user.\n   */\n  responseValidator?: (data: unknown) => Promise<unknown>;\n}\n\ntype IsExactlyNeverOrNeverUndefined<T> = [T] extends [never]\n  ? true\n  : [T] extends [never | undefined]\n    ? [undefined] extends [T]\n      ? false\n      : true\n    : false;\n\nexport type OmitNever<T extends Record<string, unknown>> = {\n  [K in keyof T as IsExactlyNeverOrNeverUndefined<T[K]> extends true ? never : K]: T[K];\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@hey-api/typescript/transforms-read-write-ignore/core/utils.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@hey-api/typescript/transforms-read-write-ignore/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type { BarRead, Baz, ClientOptions, Corge, FooRead, PostFooReadData, PostFooReadResponse, PostFooReadResponses, Quux, QuxAllRead } from './types.gen';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@hey-api/typescript/transforms-read-write-ignore/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type ClientOptions = {\n    baseUrl: string;\n};\n\nexport type FooRead = BarRead & {\n    readonly foo?: string;\n};\n\nexport type BarRead = Baz & {\n    readonly bar?: string;\n};\n\nexport type Baz = {\n    baz?: string;\n};\n\nexport type QuxAllRead = {\n    readonly baz?: string;\n};\n\nexport type Quux = {\n    baz?: Array<Baz>;\n    qux?: QuxAllRead;\n};\n\nexport type Corge = {\n    foo?: string;\n    bar?: {\n        readonly baz?: boolean;\n    };\n};\n\nexport type PostFooReadData = {\n    body: FooRead;\n    path?: never;\n    query?: never;\n    url: '/foo-read';\n};\n\nexport type PostFooReadResponses = {\n    /**\n     * OK\n     */\n    200: FooRead;\n};\n\nexport type PostFooReadResponse = PostFooReadResponses[keyof PostFooReadResponses];\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@pinia/colada/asClass/@pinia/colada.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport { type _JSONValue, defineQueryOptions, type UseMutationOptions } from '@pinia/colada';\n\nimport { serializeQueryKeyValue } from '../client';\nimport { client } from '../client.gen';\nimport { BarBazService, BarService, FooBazService, FooService, type Options } from '../sdk.gen';\nimport type { FooBarPostData, FooBarPostResponse, FooBarPutData, FooBarPutResponse, FooPostData, FooPostResponse, FooPutData, FooPutResponse, GetFooBarData, GetFooBarResponse, GetFooData, GetFooResponse } from '../types.gen';\n\nexport type QueryKey<TOptions extends Options> = [\n    Pick<TOptions, 'path'> & {\n        _id: string;\n        baseUrl?: _JSONValue;\n        body?: _JSONValue;\n        query?: _JSONValue;\n        tags?: _JSONValue;\n    }\n];\n\nconst createQueryKey = <TOptions extends Options>(id: string, options?: TOptions, tags?: ReadonlyArray<string>): [\n    QueryKey<TOptions>[0]\n] => {\n    const params: QueryKey<TOptions>[0] = { _id: id, baseUrl: options?.baseUrl || (options?.client ?? client).getConfig().baseUrl } as QueryKey<TOptions>[0];\n    if (tags) {\n        params.tags = tags as unknown as _JSONValue;\n    }\n    if (options?.body !== undefined) {\n        const normalizedBody = serializeQueryKeyValue(options.body);\n        if (normalizedBody !== undefined) {\n            params.body = normalizedBody;\n        }\n    }\n    if (options?.path) {\n        params.path = options.path;\n    }\n    if (options?.query !== undefined) {\n        const normalizedQuery = serializeQueryKeyValue(options.query);\n        if (normalizedQuery !== undefined) {\n            params.query = normalizedQuery;\n        }\n    }\n    return [params];\n};\n\nexport const getFooQueryKey = (options?: Options<GetFooData>) => createQueryKey('getFoo', options);\n\nexport const getFooQuery = defineQueryOptions<Options<GetFooData>, GetFooResponse, Error>((options?: Options<GetFooData>) => ({\n    key: getFooQueryKey(options),\n    query: async (context) => {\n        const { data } = await FooBazService.getFoo({\n            ...options,\n            ...context,\n            throwOnError: true\n        });\n        return data;\n    }\n}));\n\nexport const fooPostMutation = (options?: Partial<Options<FooPostData>>): UseMutationOptions<FooPostResponse, Options<FooPostData>, Error> => ({\n    mutation: async (vars) => {\n        const { data } = await FooService.post({\n            ...options,\n            ...vars,\n            throwOnError: true\n        });\n        return data;\n    }\n});\n\nexport const fooPutMutation = (options?: Partial<Options<FooPutData>>): UseMutationOptions<FooPutResponse, Options<FooPutData>, Error> => ({\n    mutation: async (vars) => {\n        const { data } = await FooService.put({\n            ...options,\n            ...vars,\n            throwOnError: true\n        });\n        return data;\n    }\n});\n\nexport const getFooBarQueryKey = (options?: Options<GetFooBarData>) => createQueryKey('getFooBar', options);\n\nexport const getFooBarQuery = defineQueryOptions<Options<GetFooBarData>, GetFooBarResponse, Error>((options?: Options<GetFooBarData>) => ({\n    key: getFooBarQueryKey(options),\n    query: async (context) => {\n        const { data } = await BarBazService.getFooBar({\n            ...options,\n            ...context,\n            throwOnError: true\n        });\n        return data;\n    }\n}));\n\nexport const fooBarPostMutation = (options?: Partial<Options<FooBarPostData>>): UseMutationOptions<FooBarPostResponse, Options<FooBarPostData>, Error> => ({\n    mutation: async (vars) => {\n        const { data } = await BarService.post({\n            ...options,\n            ...vars,\n            throwOnError: true\n        });\n        return data;\n    }\n});\n\nexport const fooBarPutMutation = (options?: Partial<Options<FooBarPutData>>): UseMutationOptions<FooBarPutResponse, Options<FooBarPutData>, Error> => ({\n    mutation: async (vars) => {\n        const { data } = await BarService.put({\n            ...options,\n            ...vars,\n            throwOnError: true\n        });\n        return data;\n    }\n});\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@pinia/colada/asClass/client/client.gen.ts",
    "content": "// 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 (options: RequestOptions) => {\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 url = buildUrl(opts);\n\n    return { opts, url };\n  };\n\n  const request: Client['request'] = async (options) => {\n    // @ts-expect-error\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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@pinia/colada/asClass/client/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type { Auth } from '../core/auth.gen';\nexport type { QuerySerializerOptions } from '../core/bodySerializer.gen';\nexport {\n  formDataBodySerializer,\n  jsonBodySerializer,\n  urlSearchParamsBodySerializer,\n} from '../core/bodySerializer.gen';\nexport { buildClientParams } from '../core/params.gen';\nexport { serializeQueryKeyValue } from '../core/queryKeySerializer.gen';\nexport { createClient } from './client.gen';\nexport type {\n  Client,\n  ClientOptions,\n  Config,\n  CreateClientConfig,\n  Options,\n  RequestOptions,\n  RequestResult,\n  ResolvedRequestOptions,\n  ResponseStyle,\n  TDataShape,\n} from './types.gen';\nexport { createConfig, mergeHeaders } from './utils.gen';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@pinia/colada/asClass/client/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { Auth } from '../core/auth.gen';\nimport type {\n  ServerSentEventsOptions,\n  ServerSentEventsResult,\n} from '../core/serverSentEvents.gen';\nimport type { Client as CoreClient, Config as CoreConfig } from '../core/types.gen';\nimport type { Middleware } from './utils.gen';\n\nexport type ResponseStyle = 'data' | 'fields';\n\nexport interface Config<T extends ClientOptions = ClientOptions>\n  extends Omit<RequestInit, 'body' | 'headers' | 'method'>, CoreConfig {\n  /**\n   * Base URL for all requests made by this client.\n   */\n  baseUrl?: T['baseUrl'];\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   * Please don't use the Fetch client for Next.js applications. The `next`\n   * options won't have any effect.\n   *\n   * Install {@link https://www.npmjs.com/package/@hey-api/client-next `@hey-api/client-next`} instead.\n   */\n  next?: never;\n  /**\n   * Return the response data parsed in a specified format. By default, `auto`\n   * will infer the appropriate method from the `Content-Type` response header.\n   * You can override this behavior with any of the {@link Body} methods.\n   * Select `stream` if you don't want to parse response data at all.\n   *\n   * @default 'auto'\n   */\n  parseAs?: 'arrayBuffer' | 'auto' | 'blob' | 'formData' | 'json' | 'stream' | 'text';\n  /**\n   * Should we return only data or multiple fields (data, error, response, etc.)?\n   *\n   * @default 'fields'\n   */\n  responseStyle?: ResponseStyle;\n  /**\n   * Throw an error instead of returning it in the response?\n   *\n   * @default false\n   */\n  throwOnError?: T['throwOnError'];\n}\n\nexport interface RequestOptions<\n  TData = unknown,\n  TResponseStyle extends ResponseStyle = 'fields',\n  ThrowOnError extends boolean = boolean,\n  Url extends string = string,\n>\n  extends\n    Config<{\n      responseStyle: TResponseStyle;\n      throwOnError: ThrowOnError;\n    }>,\n    Pick<\n      ServerSentEventsOptions<TData>,\n      | 'onRequest'\n      | 'onSseError'\n      | 'onSseEvent'\n      | 'sseDefaultRetryDelay'\n      | 'sseMaxRetryAttempts'\n      | 'sseMaxRetryDelay'\n    > {\n  /**\n   * Any body that you want to add to your request.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/fetch#body}\n   */\n  body?: unknown;\n  path?: Record<string, unknown>;\n  query?: Record<string, unknown>;\n  /**\n   * Security mechanism(s) to use for the request.\n   */\n  security?: ReadonlyArray<Auth>;\n  url: Url;\n}\n\nexport interface ResolvedRequestOptions<\n  TResponseStyle extends ResponseStyle = 'fields',\n  ThrowOnError extends boolean = boolean,\n  Url extends string = string,\n> extends RequestOptions<unknown, TResponseStyle, ThrowOnError, Url> {\n  serializedBody?: string;\n}\n\nexport type RequestResult<\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = boolean,\n  TResponseStyle extends ResponseStyle = 'fields',\n> = ThrowOnError extends true\n  ? Promise<\n      TResponseStyle extends 'data'\n        ? TData extends Record<string, unknown>\n          ? TData[keyof TData]\n          : TData\n        : {\n            data: TData extends Record<string, unknown> ? TData[keyof TData] : TData;\n            request: Request;\n            response: Response;\n          }\n    >\n  : Promise<\n      TResponseStyle extends 'data'\n        ? (TData extends Record<string, unknown> ? TData[keyof TData] : TData) | undefined\n        : (\n            | {\n                data: TData extends Record<string, unknown> ? TData[keyof TData] : TData;\n                error: undefined;\n              }\n            | {\n                data: undefined;\n                error: TError extends Record<string, unknown> ? TError[keyof TError] : TError;\n              }\n          ) & {\n            request: Request;\n            response: Response;\n          }\n    >;\n\nexport interface ClientOptions {\n  baseUrl?: string;\n  responseStyle?: ResponseStyle;\n  throwOnError?: boolean;\n}\n\ntype MethodFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'>,\n) => RequestResult<TData, TError, ThrowOnError, TResponseStyle>;\n\ntype SseFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'>,\n) => Promise<ServerSentEventsResult<TData, TError>>;\n\ntype RequestFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'> &\n    Pick<Required<RequestOptions<TData, TResponseStyle, ThrowOnError>>, 'method'>,\n) => RequestResult<TData, TError, ThrowOnError, TResponseStyle>;\n\ntype BuildUrlFn = <\n  TData extends {\n    body?: unknown;\n    path?: Record<string, unknown>;\n    query?: Record<string, unknown>;\n    url: string;\n  },\n>(\n  options: TData & Options<TData>,\n) => string;\n\nexport type Client = CoreClient<RequestFn, Config, MethodFn, BuildUrlFn, SseFn> & {\n  interceptors: Middleware<Request, Response, unknown, ResolvedRequestOptions>;\n};\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 = ClientOptions> = (\n  override?: Config<ClientOptions & T>,\n) => Config<Required<ClientOptions> & T>;\n\nexport interface TDataShape {\n  body?: unknown;\n  headers?: unknown;\n  path?: unknown;\n  query?: unknown;\n  url: string;\n}\n\ntype OmitKeys<T, K> = Pick<T, Exclude<keyof T, K>>;\n\nexport type Options<\n  TData extends TDataShape = TDataShape,\n  ThrowOnError extends boolean = boolean,\n  TResponse = unknown,\n  TResponseStyle extends ResponseStyle = 'fields',\n> = OmitKeys<\n  RequestOptions<TResponse, TResponseStyle, ThrowOnError>,\n  'body' | 'path' | 'query' | 'url'\n> &\n  ([TData] extends [never] ? unknown : Omit<TData, 'url'>);\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@pinia/colada/asClass/client/utils.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@pinia/colada/asClass/client.gen.ts",
    "content": "// 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>());\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@pinia/colada/asClass/core/auth.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@pinia/colada/asClass/core/bodySerializer.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@pinia/colada/asClass/core/params.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@pinia/colada/asClass/core/pathSerializer.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@pinia/colada/asClass/core/queryKeySerializer.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\n/**\n * JSON-friendly union that mirrors what Pinia Colada can hash.\n */\nexport type JsonValue =\n  | null\n  | string\n  | number\n  | boolean\n  | JsonValue[]\n  | { [key: string]: JsonValue };\n\n/**\n * Replacer that converts non-JSON values (bigint, Date, etc.) to safe substitutes.\n */\nexport const queryKeyJsonReplacer = (_key: string, value: unknown) => {\n  if (value === undefined || typeof value === 'function' || typeof value === 'symbol') {\n    return undefined;\n  }\n  if (typeof value === 'bigint') {\n    return value.toString();\n  }\n  if (value instanceof Date) {\n    return value.toISOString();\n  }\n  return value;\n};\n\n/**\n * Safely stringifies a value and parses it back into a JsonValue.\n */\nexport const stringifyToJsonValue = (input: unknown): JsonValue | undefined => {\n  try {\n    const json = JSON.stringify(input, queryKeyJsonReplacer);\n    if (json === undefined) {\n      return undefined;\n    }\n    return JSON.parse(json) as JsonValue;\n  } catch {\n    return undefined;\n  }\n};\n\n/**\n * Detects plain objects (including objects with a null prototype).\n */\nconst isPlainObject = (value: unknown): value is Record<string, unknown> => {\n  if (value === null || typeof value !== 'object') {\n    return false;\n  }\n  const prototype = Object.getPrototypeOf(value as object);\n  return prototype === Object.prototype || prototype === null;\n};\n\n/**\n * Turns URLSearchParams into a sorted JSON object for deterministic keys.\n */\nconst serializeSearchParams = (params: URLSearchParams): JsonValue => {\n  const entries = Array.from(params.entries()).sort(([a], [b]) => a.localeCompare(b));\n  const result: Record<string, JsonValue> = {};\n\n  for (const [key, value] of entries) {\n    const existing = result[key];\n    if (existing === undefined) {\n      result[key] = value;\n      continue;\n    }\n\n    if (Array.isArray(existing)) {\n      (existing as string[]).push(value);\n    } else {\n      result[key] = [existing, value];\n    }\n  }\n\n  return result;\n};\n\n/**\n * Normalizes any accepted value into a JSON-friendly shape for query keys.\n */\nexport const serializeQueryKeyValue = (value: unknown): JsonValue | undefined => {\n  if (value === null) {\n    return null;\n  }\n\n  if (typeof value === 'string' || typeof value === 'number' || typeof value === 'boolean') {\n    return value;\n  }\n\n  if (value === undefined || typeof value === 'function' || typeof value === 'symbol') {\n    return undefined;\n  }\n\n  if (typeof value === 'bigint') {\n    return value.toString();\n  }\n\n  if (value instanceof Date) {\n    return value.toISOString();\n  }\n\n  if (Array.isArray(value)) {\n    return stringifyToJsonValue(value);\n  }\n\n  if (typeof URLSearchParams !== 'undefined' && value instanceof URLSearchParams) {\n    return serializeSearchParams(value);\n  }\n\n  if (isPlainObject(value)) {\n    return stringifyToJsonValue(value);\n  }\n\n  return undefined;\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@pinia/colada/asClass/core/serverSentEvents.gen.ts",
    "content": "// 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 const 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            // Normalize line endings: CRLF -> LF, then CR -> LF\n            buffer = buffer.replace(/\\r\\n/g, '\\n').replace(/\\r/g, '\\n');\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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@pinia/colada/asClass/core/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { Auth, AuthToken } from './auth.gen';\nimport type { BodySerializer, QuerySerializer, QuerySerializerOptions } from './bodySerializer.gen';\n\nexport type HttpMethod =\n  | 'connect'\n  | 'delete'\n  | 'get'\n  | 'head'\n  | 'options'\n  | 'patch'\n  | 'post'\n  | 'put'\n  | 'trace';\n\nexport type Client<\n  RequestFn = never,\n  Config = unknown,\n  MethodFn = never,\n  BuildUrlFn = never,\n  SseFn = never,\n> = {\n  /**\n   * Returns the final request URL.\n   */\n  buildUrl: BuildUrlFn;\n  getConfig: () => Config;\n  request: RequestFn;\n  setConfig: (config: Config) => Config;\n} & {\n  [K in HttpMethod]: MethodFn;\n} & ([SseFn] extends [never] ? { sse?: never } : { sse: { [K in HttpMethod]: SseFn } });\n\nexport interface Config {\n  /**\n   * Auth token or a function returning auth token. The resolved value will be\n   * added to the request payload as defined by its `security` array.\n   */\n  auth?: ((auth: Auth) => Promise<AuthToken> | AuthToken) | AuthToken;\n  /**\n   * A function for serializing request body parameter. By default,\n   * {@link JSON.stringify()} will be used.\n   */\n  bodySerializer?: BodySerializer | null;\n  /**\n   * An object containing any HTTP headers that you want to pre-populate your\n   * `Headers` object with.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/Headers/Headers#init See more}\n   */\n  headers?:\n    | RequestInit['headers']\n    | Record<\n        string,\n        string | number | boolean | (string | number | boolean)[] | null | undefined | unknown\n      >;\n  /**\n   * The request method.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/fetch#method See more}\n   */\n  method?: Uppercase<HttpMethod>;\n  /**\n   * A function for serializing request query parameters. By default, arrays\n   * will be exploded in form style, objects will be exploded in deepObject\n   * style, and reserved characters are percent-encoded.\n   *\n   * This method will have no effect if the native `paramsSerializer()` Axios\n   * API function is used.\n   *\n   * {@link https://swagger.io/docs/specification/serialization/#query View examples}\n   */\n  querySerializer?: QuerySerializer | QuerySerializerOptions;\n  /**\n   * A function validating request data. This is useful if you want to ensure\n   * the request conforms to the desired shape, so it can be safely sent to\n   * the server.\n   */\n  requestValidator?: (data: unknown) => Promise<unknown>;\n  /**\n   * A function transforming response data before it's returned. This is useful\n   * for post-processing data, e.g. converting ISO strings into Date objects.\n   */\n  responseTransformer?: (data: unknown) => Promise<unknown>;\n  /**\n   * A function validating response data. This is useful if you want to ensure\n   * the response conforms to the desired shape, so it can be safely passed to\n   * the transformers and returned to the user.\n   */\n  responseValidator?: (data: unknown) => Promise<unknown>;\n}\n\ntype IsExactlyNeverOrNeverUndefined<T> = [T] extends [never]\n  ? true\n  : [T] extends [never | undefined]\n    ? [undefined] extends [T]\n      ? false\n      : true\n    : false;\n\nexport type OmitNever<T extends Record<string, unknown>> = {\n  [K in keyof T as IsExactlyNeverOrNeverUndefined<T[K]> extends true ? never : K]: T[K];\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@pinia/colada/asClass/core/utils.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@pinia/colada/asClass/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport { BarBazService, BarService, BarService2, FooBazService, FooService, FooService2, type Options } from './sdk.gen';\nexport type { ClientOptions, FooBarPostData, FooBarPostResponse, FooBarPostResponses, FooBarPutData, FooBarPutResponse, FooBarPutResponses, FooPostData, FooPostResponse, FooPostResponses, FooPutData, FooPutResponse, FooPutResponses, GetFooBarData, GetFooBarResponse, GetFooBarResponses, GetFooData, GetFooResponse, GetFooResponses } from './types.gen';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@pinia/colada/asClass/sdk.gen.ts",
    "content": "// 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 { FooBarPostData, FooBarPostResponses, FooBarPutData, FooBarPutResponses, FooPostData, FooPostResponses, FooPutData, FooPutResponses, GetFooBarData, GetFooBarResponses, GetFooData, GetFooResponses } from './types.gen';\n\nexport type Options<TData extends TDataShape = TDataShape, ThrowOnError extends boolean = boolean> = Options2<TData, ThrowOnError> & {\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\nexport class BarService {\n    public static post<ThrowOnError extends boolean = false>(options?: Options<FooBarPostData, ThrowOnError>) {\n        return (options?.client ?? client).post<FooBarPostResponses, unknown, ThrowOnError>({ url: '/foo/bar', ...options });\n    }\n    \n    public static put<ThrowOnError extends boolean = false>(options?: Options<FooBarPutData, ThrowOnError>) {\n        return (options?.client ?? client).put<FooBarPutResponses, unknown, ThrowOnError>({ url: '/foo/bar', ...options });\n    }\n}\n\nexport class FooService {\n    public static post<ThrowOnError extends boolean = false>(options?: Options<FooPostData, ThrowOnError>) {\n        return (options?.client ?? client).post<FooPostResponses, unknown, ThrowOnError>({ url: '/foo', ...options });\n    }\n    \n    public static put<ThrowOnError extends boolean = false>(options?: Options<FooPutData, ThrowOnError>) {\n        return (options?.client ?? client).put<FooPutResponses, unknown, ThrowOnError>({ url: '/foo', ...options });\n    }\n    \n    static barService = BarService;\n}\n\nexport class FooBazService {\n    public static getFoo<ThrowOnError extends boolean = false>(options?: Options<GetFooData, ThrowOnError>) {\n        return (options?.client ?? client).get<GetFooResponses, unknown, ThrowOnError>({ url: '/foo', ...options });\n    }\n    \n    static fooService = FooService;\n}\n\nexport class BarService2 {\n    public static post<ThrowOnError extends boolean = false>(options?: Options<FooBarPostData, ThrowOnError>) {\n        return (options?.client ?? client).post<FooBarPostResponses, unknown, ThrowOnError>({ url: '/foo/bar', ...options });\n    }\n    \n    public static put<ThrowOnError extends boolean = false>(options?: Options<FooBarPutData, ThrowOnError>) {\n        return (options?.client ?? client).put<FooBarPutResponses, unknown, ThrowOnError>({ url: '/foo/bar', ...options });\n    }\n}\n\nexport class FooService2 {\n    static barService = BarService2;\n}\n\nexport class BarBazService {\n    public static getFooBar<ThrowOnError extends boolean = false>(options?: Options<GetFooBarData, ThrowOnError>) {\n        return (options?.client ?? client).get<GetFooBarResponses, unknown, ThrowOnError>({ url: '/foo/bar', ...options });\n    }\n    \n    static fooService = FooService2;\n}\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@pinia/colada/asClass/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type ClientOptions = {\n    baseUrl: string;\n};\n\nexport type GetFooData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/foo';\n};\n\nexport type GetFooResponses = {\n    /**\n     * OK\n     */\n    200: string;\n};\n\nexport type GetFooResponse = GetFooResponses[keyof GetFooResponses];\n\nexport type FooPostData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/foo';\n};\n\nexport type FooPostResponses = {\n    /**\n     * OK\n     */\n    200: string;\n};\n\nexport type FooPostResponse = FooPostResponses[keyof FooPostResponses];\n\nexport type FooPutData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/foo';\n};\n\nexport type FooPutResponses = {\n    /**\n     * OK\n     */\n    200: string;\n};\n\nexport type FooPutResponse = FooPutResponses[keyof FooPutResponses];\n\nexport type GetFooBarData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/foo/bar';\n};\n\nexport type GetFooBarResponses = {\n    /**\n     * OK\n     */\n    200: string;\n};\n\nexport type GetFooBarResponse = GetFooBarResponses[keyof GetFooBarResponses];\n\nexport type FooBarPostData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/foo/bar';\n};\n\nexport type FooBarPostResponses = {\n    /**\n     * OK\n     */\n    200: string;\n};\n\nexport type FooBarPostResponse = FooBarPostResponses[keyof FooBarPostResponses];\n\nexport type FooBarPutData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/foo/bar';\n};\n\nexport type FooBarPutResponses = {\n    /**\n     * OK\n     */\n    200: string;\n};\n\nexport type FooBarPutResponse = FooBarPutResponses[keyof FooBarPutResponses];\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@pinia/colada/fetch/@pinia/colada.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport { type _JSONValue, defineQueryOptions, type UseMutationOptions } from '@pinia/colada';\n\nimport { serializeQueryKeyValue } from '../client';\nimport { client } from '../client.gen';\nimport { callToTestOrderOfParams, callWithDefaultOptionalParameters, callWithDefaultParameters, callWithDescriptions, callWithDuplicateResponses, callWithNoContentResponse, callWithParameters, callWithResponse, callWithResponseAndNoContentResponse, callWithResponses, callWithResultFromHeader, callWithWeirdParameterNames, collectionFormat, complexTypes, deleteCallWithoutParametersAndResponse, dummyA, dummyB, duplicateName, duplicateName2, duplicateName3, duplicateName4, fooWow, getCallWithoutParametersAndResponse, nonAsciiæøåÆøÅöôêÊ字符串, type Options, patchApiVbyApiVersionNoTag, patchCallWithoutParametersAndResponse, postApiVbyApiVersionBody, postCallWithoutParametersAndResponse, putCallWithoutParametersAndResponse, serviceWithEmptyTag, testErrorCode, types } from '../sdk.gen';\nimport type { CallToTestOrderOfParamsData, CallWithDefaultOptionalParametersData, CallWithDefaultParametersData, CallWithDescriptionsData, CallWithDuplicateResponsesData, CallWithDuplicateResponsesError, CallWithDuplicateResponsesResponse, CallWithNoContentResponseData, CallWithParametersData, CallWithResponseAndNoContentResponseData, CallWithResponseAndNoContentResponseResponse, CallWithResponseData, CallWithResponseResponse, CallWithResponsesData, CallWithResponsesError, CallWithResponsesResponse, CallWithResultFromHeaderData, CallWithWeirdParameterNamesData, CollectionFormatData, ComplexTypesData, ComplexTypesResponse, DeleteCallWithoutParametersAndResponseData, DummyAData, DummyBData, DuplicateName2Data, DuplicateName3Data, DuplicateName4Data, DuplicateNameData, FooWowData, GetCallWithoutParametersAndResponseData, NonAsciiæøåÆøÅöôêÊ字符串Data, NonAsciiæøåÆøÅöôêÊ字符串Response, PatchApiVbyApiVersionNoTagData, PatchCallWithoutParametersAndResponseData, PostApiVbyApiVersionBodyData, PostApiVbyApiVersionBodyError, PostApiVbyApiVersionBodyResponse, PostCallWithoutParametersAndResponseData, PutCallWithoutParametersAndResponseData, ServiceWithEmptyTagData, TestErrorCodeData, TypesData, TypesResponse } from '../types.gen';\n\nexport type QueryKey<TOptions extends Options> = [\n    Pick<TOptions, 'path'> & {\n        _id: string;\n        baseUrl?: _JSONValue;\n        body?: _JSONValue;\n        query?: _JSONValue;\n        tags?: _JSONValue;\n    }\n];\n\nconst createQueryKey = <TOptions extends Options>(id: string, options?: TOptions, tags?: ReadonlyArray<string>): [\n    QueryKey<TOptions>[0]\n] => {\n    const params: QueryKey<TOptions>[0] = { _id: id, baseUrl: options?.baseUrl || (options?.client ?? client).getConfig().baseUrl } as QueryKey<TOptions>[0];\n    if (tags) {\n        params.tags = tags as unknown as _JSONValue;\n    }\n    if (options?.body !== undefined) {\n        const normalizedBody = serializeQueryKeyValue(options.body);\n        if (normalizedBody !== undefined) {\n            params.body = normalizedBody;\n        }\n    }\n    if (options?.path) {\n        params.path = options.path;\n    }\n    if (options?.query !== undefined) {\n        const normalizedQuery = serializeQueryKeyValue(options.query);\n        if (normalizedQuery !== undefined) {\n            params.query = normalizedQuery;\n        }\n    }\n    return [params];\n};\n\nexport const serviceWithEmptyTagQueryKey = (options?: Options<ServiceWithEmptyTagData>) => createQueryKey('serviceWithEmptyTag', options);\n\nexport const serviceWithEmptyTagQuery = defineQueryOptions<Options<ServiceWithEmptyTagData>, unknown, Error>((options?: Options<ServiceWithEmptyTagData>) => ({\n    key: serviceWithEmptyTagQueryKey(options),\n    query: async (context) => {\n        const { data } = await serviceWithEmptyTag({\n            ...options,\n            ...context,\n            throwOnError: true\n        });\n        return data;\n    }\n}));\n\nexport const patchApiVbyApiVersionNoTagMutation = (options?: Partial<Options<PatchApiVbyApiVersionNoTagData>>): UseMutationOptions<unknown, Options<PatchApiVbyApiVersionNoTagData>, Error> => ({\n    mutation: async (vars) => {\n        const { data } = await patchApiVbyApiVersionNoTag({\n            ...options,\n            ...vars,\n            throwOnError: true\n        });\n        return data;\n    }\n});\n\nexport const fooWowMutation = (options?: Partial<Options<FooWowData>>): UseMutationOptions<unknown, Options<FooWowData>, Error> => ({\n    mutation: async (vars) => {\n        const { data } = await fooWow({\n            ...options,\n            ...vars,\n            throwOnError: true\n        });\n        return data;\n    }\n});\n\nexport const deleteCallWithoutParametersAndResponseMutation = (options?: Partial<Options<DeleteCallWithoutParametersAndResponseData>>): UseMutationOptions<unknown, Options<DeleteCallWithoutParametersAndResponseData>, Error> => ({\n    mutation: async (vars) => {\n        const { data } = await deleteCallWithoutParametersAndResponse({\n            ...options,\n            ...vars,\n            throwOnError: true\n        });\n        return data;\n    }\n});\n\nexport const getCallWithoutParametersAndResponseQueryKey = (options?: Options<GetCallWithoutParametersAndResponseData>) => createQueryKey('getCallWithoutParametersAndResponse', options);\n\nexport const getCallWithoutParametersAndResponseQuery = defineQueryOptions<Options<GetCallWithoutParametersAndResponseData>, unknown, Error>((options?: Options<GetCallWithoutParametersAndResponseData>) => ({\n    key: getCallWithoutParametersAndResponseQueryKey(options),\n    query: async (context) => {\n        const { data } = await getCallWithoutParametersAndResponse({\n            ...options,\n            ...context,\n            throwOnError: true\n        });\n        return data;\n    }\n}));\n\nexport const patchCallWithoutParametersAndResponseMutation = (options?: Partial<Options<PatchCallWithoutParametersAndResponseData>>): UseMutationOptions<unknown, Options<PatchCallWithoutParametersAndResponseData>, Error> => ({\n    mutation: async (vars) => {\n        const { data } = await patchCallWithoutParametersAndResponse({\n            ...options,\n            ...vars,\n            throwOnError: true\n        });\n        return data;\n    }\n});\n\nexport const postCallWithoutParametersAndResponseMutation = (options?: Partial<Options<PostCallWithoutParametersAndResponseData>>): UseMutationOptions<unknown, Options<PostCallWithoutParametersAndResponseData>, Error> => ({\n    mutation: async (vars) => {\n        const { data } = await postCallWithoutParametersAndResponse({\n            ...options,\n            ...vars,\n            throwOnError: true\n        });\n        return data;\n    }\n});\n\nexport const putCallWithoutParametersAndResponseMutation = (options?: Partial<Options<PutCallWithoutParametersAndResponseData>>): UseMutationOptions<unknown, Options<PutCallWithoutParametersAndResponseData>, Error> => ({\n    mutation: async (vars) => {\n        const { data } = await putCallWithoutParametersAndResponse({\n            ...options,\n            ...vars,\n            throwOnError: true\n        });\n        return data;\n    }\n});\n\nexport const callWithDescriptionsMutation = (options?: Partial<Options<CallWithDescriptionsData>>): UseMutationOptions<unknown, Options<CallWithDescriptionsData>, Error> => ({\n    mutation: async (vars) => {\n        const { data } = await callWithDescriptions({\n            ...options,\n            ...vars,\n            throwOnError: true\n        });\n        return data;\n    }\n});\n\nexport const callWithParametersMutation = (options?: Partial<Options<CallWithParametersData>>): UseMutationOptions<unknown, Options<CallWithParametersData>, Error> => ({\n    mutation: async (vars) => {\n        const { data } = await callWithParameters({\n            ...options,\n            ...vars,\n            throwOnError: true\n        });\n        return data;\n    }\n});\n\nexport const callWithWeirdParameterNamesMutation = (options?: Partial<Options<CallWithWeirdParameterNamesData>>): UseMutationOptions<unknown, Options<CallWithWeirdParameterNamesData>, Error> => ({\n    mutation: async (vars) => {\n        const { data } = await callWithWeirdParameterNames({\n            ...options,\n            ...vars,\n            throwOnError: true\n        });\n        return data;\n    }\n});\n\nexport const callWithDefaultParametersQueryKey = (options: Options<CallWithDefaultParametersData>) => createQueryKey('callWithDefaultParameters', options);\n\nexport const callWithDefaultParametersQuery = defineQueryOptions<Options<CallWithDefaultParametersData>, unknown, Error>((options: Options<CallWithDefaultParametersData>) => ({\n    key: callWithDefaultParametersQueryKey(options),\n    query: async (context) => {\n        const { data } = await callWithDefaultParameters({\n            ...options,\n            ...context,\n            throwOnError: true\n        });\n        return data;\n    }\n}));\n\nexport const callWithDefaultOptionalParametersMutation = (options?: Partial<Options<CallWithDefaultOptionalParametersData>>): UseMutationOptions<unknown, Options<CallWithDefaultOptionalParametersData>, Error> => ({\n    mutation: async (vars) => {\n        const { data } = await callWithDefaultOptionalParameters({\n            ...options,\n            ...vars,\n            throwOnError: true\n        });\n        return data;\n    }\n});\n\nexport const callToTestOrderOfParamsMutation = (options?: Partial<Options<CallToTestOrderOfParamsData>>): UseMutationOptions<unknown, Options<CallToTestOrderOfParamsData>, Error> => ({\n    mutation: async (vars) => {\n        const { data } = await callToTestOrderOfParams({\n            ...options,\n            ...vars,\n            throwOnError: true\n        });\n        return data;\n    }\n});\n\nexport const duplicateNameMutation = (options?: Partial<Options<DuplicateNameData>>): UseMutationOptions<unknown, Options<DuplicateNameData>, Error> => ({\n    mutation: async (vars) => {\n        const { data } = await duplicateName({\n            ...options,\n            ...vars,\n            throwOnError: true\n        });\n        return data;\n    }\n});\n\nexport const duplicateName2QueryKey = (options?: Options<DuplicateName2Data>) => createQueryKey('duplicateName2', options);\n\nexport const duplicateName2Query = defineQueryOptions<Options<DuplicateName2Data>, unknown, Error>((options?: Options<DuplicateName2Data>) => ({\n    key: duplicateName2QueryKey(options),\n    query: async (context) => {\n        const { data } = await duplicateName2({\n            ...options,\n            ...context,\n            throwOnError: true\n        });\n        return data;\n    }\n}));\n\nexport const duplicateName3Mutation = (options?: Partial<Options<DuplicateName3Data>>): UseMutationOptions<unknown, Options<DuplicateName3Data>, Error> => ({\n    mutation: async (vars) => {\n        const { data } = await duplicateName3({\n            ...options,\n            ...vars,\n            throwOnError: true\n        });\n        return data;\n    }\n});\n\nexport const duplicateName4Mutation = (options?: Partial<Options<DuplicateName4Data>>): UseMutationOptions<unknown, Options<DuplicateName4Data>, Error> => ({\n    mutation: async (vars) => {\n        const { data } = await duplicateName4({\n            ...options,\n            ...vars,\n            throwOnError: true\n        });\n        return data;\n    }\n});\n\nexport const callWithNoContentResponseQueryKey = (options?: Options<CallWithNoContentResponseData>) => createQueryKey('callWithNoContentResponse', options);\n\nexport const callWithNoContentResponseQuery = defineQueryOptions<Options<CallWithNoContentResponseData>, unknown, Error>((options?: Options<CallWithNoContentResponseData>) => ({\n    key: callWithNoContentResponseQueryKey(options),\n    query: async (context) => {\n        const { data } = await callWithNoContentResponse({\n            ...options,\n            ...context,\n            throwOnError: true\n        });\n        return data;\n    }\n}));\n\nexport const callWithResponseAndNoContentResponseQueryKey = (options?: Options<CallWithResponseAndNoContentResponseData>) => createQueryKey('callWithResponseAndNoContentResponse', options);\n\nexport const callWithResponseAndNoContentResponseQuery = defineQueryOptions<Options<CallWithResponseAndNoContentResponseData>, CallWithResponseAndNoContentResponseResponse, Error>((options?: Options<CallWithResponseAndNoContentResponseData>) => ({\n    key: callWithResponseAndNoContentResponseQueryKey(options),\n    query: async (context) => {\n        const { data } = await callWithResponseAndNoContentResponse({\n            ...options,\n            ...context,\n            throwOnError: true\n        });\n        return data;\n    }\n}));\n\nexport const dummyAQueryKey = (options?: Options<DummyAData>) => createQueryKey('dummyA', options);\n\nexport const dummyAQuery = defineQueryOptions<Options<DummyAData>, unknown, Error>((options?: Options<DummyAData>) => ({\n    key: dummyAQueryKey(options),\n    query: async (context) => {\n        const { data } = await dummyA({\n            ...options,\n            ...context,\n            throwOnError: true\n        });\n        return data;\n    }\n}));\n\nexport const dummyBQueryKey = (options?: Options<DummyBData>) => createQueryKey('dummyB', options);\n\nexport const dummyBQuery = defineQueryOptions<Options<DummyBData>, unknown, Error>((options?: Options<DummyBData>) => ({\n    key: dummyBQueryKey(options),\n    query: async (context) => {\n        const { data } = await dummyB({\n            ...options,\n            ...context,\n            throwOnError: true\n        });\n        return data;\n    }\n}));\n\nexport const callWithResponseQueryKey = (options?: Options<CallWithResponseData>) => createQueryKey('callWithResponse', options);\n\nexport const callWithResponseQuery = defineQueryOptions<Options<CallWithResponseData>, CallWithResponseResponse, Error>((options?: Options<CallWithResponseData>) => ({\n    key: callWithResponseQueryKey(options),\n    query: async (context) => {\n        const { data } = await callWithResponse({\n            ...options,\n            ...context,\n            throwOnError: true\n        });\n        return data;\n    }\n}));\n\nexport const callWithDuplicateResponsesMutation = (options?: Partial<Options<CallWithDuplicateResponsesData>>): UseMutationOptions<CallWithDuplicateResponsesResponse, Options<CallWithDuplicateResponsesData>, CallWithDuplicateResponsesError> => ({\n    mutation: async (vars) => {\n        const { data } = await callWithDuplicateResponses({\n            ...options,\n            ...vars,\n            throwOnError: true\n        });\n        return data;\n    }\n});\n\nexport const callWithResponsesMutation = (options?: Partial<Options<CallWithResponsesData>>): UseMutationOptions<CallWithResponsesResponse, Options<CallWithResponsesData>, CallWithResponsesError> => ({\n    mutation: async (vars) => {\n        const { data } = await callWithResponses({\n            ...options,\n            ...vars,\n            throwOnError: true\n        });\n        return data;\n    }\n});\n\nexport const collectionFormatQueryKey = (options: Options<CollectionFormatData>) => createQueryKey('collectionFormat', options);\n\nexport const collectionFormatQuery = defineQueryOptions<Options<CollectionFormatData>, unknown, Error>((options: Options<CollectionFormatData>) => ({\n    key: collectionFormatQueryKey(options),\n    query: async (context) => {\n        const { data } = await collectionFormat({\n            ...options,\n            ...context,\n            throwOnError: true\n        });\n        return data;\n    }\n}));\n\nexport const typesQueryKey = (options: Options<TypesData>) => createQueryKey('types', options);\n\nexport const typesQuery = defineQueryOptions<Options<TypesData>, TypesResponse, Error>((options: Options<TypesData>) => ({\n    key: typesQueryKey(options),\n    query: async (context) => {\n        const { data } = await types({\n            ...options,\n            ...context,\n            throwOnError: true\n        });\n        return data;\n    }\n}));\n\nexport const complexTypesQueryKey = (options: Options<ComplexTypesData>) => createQueryKey('complexTypes', options);\n\nexport const complexTypesQuery = defineQueryOptions<Options<ComplexTypesData>, ComplexTypesResponse, Error>((options: Options<ComplexTypesData>) => ({\n    key: complexTypesQueryKey(options),\n    query: async (context) => {\n        const { data } = await complexTypes({\n            ...options,\n            ...context,\n            throwOnError: true\n        });\n        return data;\n    }\n}));\n\nexport const callWithResultFromHeaderMutation = (options?: Partial<Options<CallWithResultFromHeaderData>>): UseMutationOptions<unknown, Options<CallWithResultFromHeaderData>, Error> => ({\n    mutation: async (vars) => {\n        const { data } = await callWithResultFromHeader({\n            ...options,\n            ...vars,\n            throwOnError: true\n        });\n        return data;\n    }\n});\n\nexport const testErrorCodeMutation = (options?: Partial<Options<TestErrorCodeData>>): UseMutationOptions<unknown, Options<TestErrorCodeData>, Error> => ({\n    mutation: async (vars) => {\n        const { data } = await testErrorCode({\n            ...options,\n            ...vars,\n            throwOnError: true\n        });\n        return data;\n    }\n});\n\nexport const nonAsciiæøåÆøÅöôêÊ字符串Mutation = (options?: Partial<Options<NonAsciiæøåÆøÅöôêÊ字符串Data>>): UseMutationOptions<NonAsciiæøåÆøÅöôêÊ字符串Response, Options<NonAsciiæøåÆøÅöôêÊ字符串Data>, Error> => ({\n    mutation: async (vars) => {\n        const { data } = await nonAsciiæøåÆøÅöôêÊ字符串({\n            ...options,\n            ...vars,\n            throwOnError: true\n        });\n        return data;\n    }\n});\n\n/**\n * Body should not be unknown\n *\n * Body should not be unknown\n */\nexport const postApiVbyApiVersionBodyMutation = (options?: Partial<Options<PostApiVbyApiVersionBodyData>>): UseMutationOptions<PostApiVbyApiVersionBodyResponse, Options<PostApiVbyApiVersionBodyData>, PostApiVbyApiVersionBodyError> => ({\n    mutation: async (vars) => {\n        const { data } = await postApiVbyApiVersionBody({\n            ...options,\n            ...vars,\n            throwOnError: true\n        });\n        return data;\n    }\n});\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@pinia/colada/fetch/client/client.gen.ts",
    "content": "// 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 (options: RequestOptions) => {\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 url = buildUrl(opts);\n\n    return { opts, url };\n  };\n\n  const request: Client['request'] = async (options) => {\n    // @ts-expect-error\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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@pinia/colada/fetch/client/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type { Auth } from '../core/auth.gen';\nexport type { QuerySerializerOptions } from '../core/bodySerializer.gen';\nexport {\n  formDataBodySerializer,\n  jsonBodySerializer,\n  urlSearchParamsBodySerializer,\n} from '../core/bodySerializer.gen';\nexport { buildClientParams } from '../core/params.gen';\nexport { serializeQueryKeyValue } from '../core/queryKeySerializer.gen';\nexport { createClient } from './client.gen';\nexport type {\n  Client,\n  ClientOptions,\n  Config,\n  CreateClientConfig,\n  Options,\n  RequestOptions,\n  RequestResult,\n  ResolvedRequestOptions,\n  ResponseStyle,\n  TDataShape,\n} from './types.gen';\nexport { createConfig, mergeHeaders } from './utils.gen';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@pinia/colada/fetch/client/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { Auth } from '../core/auth.gen';\nimport type {\n  ServerSentEventsOptions,\n  ServerSentEventsResult,\n} from '../core/serverSentEvents.gen';\nimport type { Client as CoreClient, Config as CoreConfig } from '../core/types.gen';\nimport type { Middleware } from './utils.gen';\n\nexport type ResponseStyle = 'data' | 'fields';\n\nexport interface Config<T extends ClientOptions = ClientOptions>\n  extends Omit<RequestInit, 'body' | 'headers' | 'method'>, CoreConfig {\n  /**\n   * Base URL for all requests made by this client.\n   */\n  baseUrl?: T['baseUrl'];\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   * Please don't use the Fetch client for Next.js applications. The `next`\n   * options won't have any effect.\n   *\n   * Install {@link https://www.npmjs.com/package/@hey-api/client-next `@hey-api/client-next`} instead.\n   */\n  next?: never;\n  /**\n   * Return the response data parsed in a specified format. By default, `auto`\n   * will infer the appropriate method from the `Content-Type` response header.\n   * You can override this behavior with any of the {@link Body} methods.\n   * Select `stream` if you don't want to parse response data at all.\n   *\n   * @default 'auto'\n   */\n  parseAs?: 'arrayBuffer' | 'auto' | 'blob' | 'formData' | 'json' | 'stream' | 'text';\n  /**\n   * Should we return only data or multiple fields (data, error, response, etc.)?\n   *\n   * @default 'fields'\n   */\n  responseStyle?: ResponseStyle;\n  /**\n   * Throw an error instead of returning it in the response?\n   *\n   * @default false\n   */\n  throwOnError?: T['throwOnError'];\n}\n\nexport interface RequestOptions<\n  TData = unknown,\n  TResponseStyle extends ResponseStyle = 'fields',\n  ThrowOnError extends boolean = boolean,\n  Url extends string = string,\n>\n  extends\n    Config<{\n      responseStyle: TResponseStyle;\n      throwOnError: ThrowOnError;\n    }>,\n    Pick<\n      ServerSentEventsOptions<TData>,\n      | 'onRequest'\n      | 'onSseError'\n      | 'onSseEvent'\n      | 'sseDefaultRetryDelay'\n      | 'sseMaxRetryAttempts'\n      | 'sseMaxRetryDelay'\n    > {\n  /**\n   * Any body that you want to add to your request.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/fetch#body}\n   */\n  body?: unknown;\n  path?: Record<string, unknown>;\n  query?: Record<string, unknown>;\n  /**\n   * Security mechanism(s) to use for the request.\n   */\n  security?: ReadonlyArray<Auth>;\n  url: Url;\n}\n\nexport interface ResolvedRequestOptions<\n  TResponseStyle extends ResponseStyle = 'fields',\n  ThrowOnError extends boolean = boolean,\n  Url extends string = string,\n> extends RequestOptions<unknown, TResponseStyle, ThrowOnError, Url> {\n  serializedBody?: string;\n}\n\nexport type RequestResult<\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = boolean,\n  TResponseStyle extends ResponseStyle = 'fields',\n> = ThrowOnError extends true\n  ? Promise<\n      TResponseStyle extends 'data'\n        ? TData extends Record<string, unknown>\n          ? TData[keyof TData]\n          : TData\n        : {\n            data: TData extends Record<string, unknown> ? TData[keyof TData] : TData;\n            request: Request;\n            response: Response;\n          }\n    >\n  : Promise<\n      TResponseStyle extends 'data'\n        ? (TData extends Record<string, unknown> ? TData[keyof TData] : TData) | undefined\n        : (\n            | {\n                data: TData extends Record<string, unknown> ? TData[keyof TData] : TData;\n                error: undefined;\n              }\n            | {\n                data: undefined;\n                error: TError extends Record<string, unknown> ? TError[keyof TError] : TError;\n              }\n          ) & {\n            request: Request;\n            response: Response;\n          }\n    >;\n\nexport interface ClientOptions {\n  baseUrl?: string;\n  responseStyle?: ResponseStyle;\n  throwOnError?: boolean;\n}\n\ntype MethodFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'>,\n) => RequestResult<TData, TError, ThrowOnError, TResponseStyle>;\n\ntype SseFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'>,\n) => Promise<ServerSentEventsResult<TData, TError>>;\n\ntype RequestFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'> &\n    Pick<Required<RequestOptions<TData, TResponseStyle, ThrowOnError>>, 'method'>,\n) => RequestResult<TData, TError, ThrowOnError, TResponseStyle>;\n\ntype BuildUrlFn = <\n  TData extends {\n    body?: unknown;\n    path?: Record<string, unknown>;\n    query?: Record<string, unknown>;\n    url: string;\n  },\n>(\n  options: TData & Options<TData>,\n) => string;\n\nexport type Client = CoreClient<RequestFn, Config, MethodFn, BuildUrlFn, SseFn> & {\n  interceptors: Middleware<Request, Response, unknown, ResolvedRequestOptions>;\n};\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 = ClientOptions> = (\n  override?: Config<ClientOptions & T>,\n) => Config<Required<ClientOptions> & T>;\n\nexport interface TDataShape {\n  body?: unknown;\n  headers?: unknown;\n  path?: unknown;\n  query?: unknown;\n  url: string;\n}\n\ntype OmitKeys<T, K> = Pick<T, Exclude<keyof T, K>>;\n\nexport type Options<\n  TData extends TDataShape = TDataShape,\n  ThrowOnError extends boolean = boolean,\n  TResponse = unknown,\n  TResponseStyle extends ResponseStyle = 'fields',\n> = OmitKeys<\n  RequestOptions<TResponse, TResponseStyle, ThrowOnError>,\n  'body' | 'path' | 'query' | 'url'\n> &\n  ([TData] extends [never] ? unknown : Omit<TData, 'url'>);\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@pinia/colada/fetch/client/utils.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@pinia/colada/fetch/client.gen.ts",
    "content": "// 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: 'http://localhost:3000/base' }));\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@pinia/colada/fetch/core/auth.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@pinia/colada/fetch/core/bodySerializer.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@pinia/colada/fetch/core/params.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@pinia/colada/fetch/core/pathSerializer.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@pinia/colada/fetch/core/queryKeySerializer.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\n/**\n * JSON-friendly union that mirrors what Pinia Colada can hash.\n */\nexport type JsonValue =\n  | null\n  | string\n  | number\n  | boolean\n  | JsonValue[]\n  | { [key: string]: JsonValue };\n\n/**\n * Replacer that converts non-JSON values (bigint, Date, etc.) to safe substitutes.\n */\nexport const queryKeyJsonReplacer = (_key: string, value: unknown) => {\n  if (value === undefined || typeof value === 'function' || typeof value === 'symbol') {\n    return undefined;\n  }\n  if (typeof value === 'bigint') {\n    return value.toString();\n  }\n  if (value instanceof Date) {\n    return value.toISOString();\n  }\n  return value;\n};\n\n/**\n * Safely stringifies a value and parses it back into a JsonValue.\n */\nexport const stringifyToJsonValue = (input: unknown): JsonValue | undefined => {\n  try {\n    const json = JSON.stringify(input, queryKeyJsonReplacer);\n    if (json === undefined) {\n      return undefined;\n    }\n    return JSON.parse(json) as JsonValue;\n  } catch {\n    return undefined;\n  }\n};\n\n/**\n * Detects plain objects (including objects with a null prototype).\n */\nconst isPlainObject = (value: unknown): value is Record<string, unknown> => {\n  if (value === null || typeof value !== 'object') {\n    return false;\n  }\n  const prototype = Object.getPrototypeOf(value as object);\n  return prototype === Object.prototype || prototype === null;\n};\n\n/**\n * Turns URLSearchParams into a sorted JSON object for deterministic keys.\n */\nconst serializeSearchParams = (params: URLSearchParams): JsonValue => {\n  const entries = Array.from(params.entries()).sort(([a], [b]) => a.localeCompare(b));\n  const result: Record<string, JsonValue> = {};\n\n  for (const [key, value] of entries) {\n    const existing = result[key];\n    if (existing === undefined) {\n      result[key] = value;\n      continue;\n    }\n\n    if (Array.isArray(existing)) {\n      (existing as string[]).push(value);\n    } else {\n      result[key] = [existing, value];\n    }\n  }\n\n  return result;\n};\n\n/**\n * Normalizes any accepted value into a JSON-friendly shape for query keys.\n */\nexport const serializeQueryKeyValue = (value: unknown): JsonValue | undefined => {\n  if (value === null) {\n    return null;\n  }\n\n  if (typeof value === 'string' || typeof value === 'number' || typeof value === 'boolean') {\n    return value;\n  }\n\n  if (value === undefined || typeof value === 'function' || typeof value === 'symbol') {\n    return undefined;\n  }\n\n  if (typeof value === 'bigint') {\n    return value.toString();\n  }\n\n  if (value instanceof Date) {\n    return value.toISOString();\n  }\n\n  if (Array.isArray(value)) {\n    return stringifyToJsonValue(value);\n  }\n\n  if (typeof URLSearchParams !== 'undefined' && value instanceof URLSearchParams) {\n    return serializeSearchParams(value);\n  }\n\n  if (isPlainObject(value)) {\n    return stringifyToJsonValue(value);\n  }\n\n  return undefined;\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@pinia/colada/fetch/core/serverSentEvents.gen.ts",
    "content": "// 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 const 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            // Normalize line endings: CRLF -> LF, then CR -> LF\n            buffer = buffer.replace(/\\r\\n/g, '\\n').replace(/\\r/g, '\\n');\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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@pinia/colada/fetch/core/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { Auth, AuthToken } from './auth.gen';\nimport type { BodySerializer, QuerySerializer, QuerySerializerOptions } from './bodySerializer.gen';\n\nexport type HttpMethod =\n  | 'connect'\n  | 'delete'\n  | 'get'\n  | 'head'\n  | 'options'\n  | 'patch'\n  | 'post'\n  | 'put'\n  | 'trace';\n\nexport type Client<\n  RequestFn = never,\n  Config = unknown,\n  MethodFn = never,\n  BuildUrlFn = never,\n  SseFn = never,\n> = {\n  /**\n   * Returns the final request URL.\n   */\n  buildUrl: BuildUrlFn;\n  getConfig: () => Config;\n  request: RequestFn;\n  setConfig: (config: Config) => Config;\n} & {\n  [K in HttpMethod]: MethodFn;\n} & ([SseFn] extends [never] ? { sse?: never } : { sse: { [K in HttpMethod]: SseFn } });\n\nexport interface Config {\n  /**\n   * Auth token or a function returning auth token. The resolved value will be\n   * added to the request payload as defined by its `security` array.\n   */\n  auth?: ((auth: Auth) => Promise<AuthToken> | AuthToken) | AuthToken;\n  /**\n   * A function for serializing request body parameter. By default,\n   * {@link JSON.stringify()} will be used.\n   */\n  bodySerializer?: BodySerializer | null;\n  /**\n   * An object containing any HTTP headers that you want to pre-populate your\n   * `Headers` object with.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/Headers/Headers#init See more}\n   */\n  headers?:\n    | RequestInit['headers']\n    | Record<\n        string,\n        string | number | boolean | (string | number | boolean)[] | null | undefined | unknown\n      >;\n  /**\n   * The request method.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/fetch#method See more}\n   */\n  method?: Uppercase<HttpMethod>;\n  /**\n   * A function for serializing request query parameters. By default, arrays\n   * will be exploded in form style, objects will be exploded in deepObject\n   * style, and reserved characters are percent-encoded.\n   *\n   * This method will have no effect if the native `paramsSerializer()` Axios\n   * API function is used.\n   *\n   * {@link https://swagger.io/docs/specification/serialization/#query View examples}\n   */\n  querySerializer?: QuerySerializer | QuerySerializerOptions;\n  /**\n   * A function validating request data. This is useful if you want to ensure\n   * the request conforms to the desired shape, so it can be safely sent to\n   * the server.\n   */\n  requestValidator?: (data: unknown) => Promise<unknown>;\n  /**\n   * A function transforming response data before it's returned. This is useful\n   * for post-processing data, e.g. converting ISO strings into Date objects.\n   */\n  responseTransformer?: (data: unknown) => Promise<unknown>;\n  /**\n   * A function validating response data. This is useful if you want to ensure\n   * the response conforms to the desired shape, so it can be safely passed to\n   * the transformers and returned to the user.\n   */\n  responseValidator?: (data: unknown) => Promise<unknown>;\n}\n\ntype IsExactlyNeverOrNeverUndefined<T> = [T] extends [never]\n  ? true\n  : [T] extends [never | undefined]\n    ? [undefined] extends [T]\n      ? false\n      : true\n    : false;\n\nexport type OmitNever<T extends Record<string, unknown>> = {\n  [K in keyof T as IsExactlyNeverOrNeverUndefined<T[K]> extends true ? never : K]: T[K];\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@pinia/colada/fetch/core/utils.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@pinia/colada/fetch/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport { callToTestOrderOfParams, callWithDefaultOptionalParameters, callWithDefaultParameters, callWithDescriptions, callWithDuplicateResponses, callWithNoContentResponse, callWithParameters, callWithResponse, callWithResponseAndNoContentResponse, callWithResponses, callWithResultFromHeader, callWithWeirdParameterNames, collectionFormat, complexTypes, deleteCallWithoutParametersAndResponse, dummyA, dummyB, duplicateName, duplicateName2, duplicateName3, duplicateName4, fooWow, getCallWithoutParametersAndResponse, headCallWithoutParametersAndResponse, nonAsciiæøåÆøÅöôêÊ字符串, type Options, optionsCallWithoutParametersAndResponse, patchApiVbyApiVersionNoTag, patchCallWithoutParametersAndResponse, postApiVbyApiVersionBody, postCallWithoutParametersAndResponse, putCallWithoutParametersAndResponse, serviceWithEmptyTag, testErrorCode, types } from './sdk.gen';\nexport type { ArrayWithArray, ArrayWithBooleans, ArrayWithNumbers, ArrayWithProperties, ArrayWithReferences, ArrayWithStrings, CallToTestOrderOfParamsData, CallWithDefaultOptionalParametersData, CallWithDefaultParametersData, CallWithDescriptionsData, CallWithDuplicateResponsesData, CallWithDuplicateResponsesError, CallWithDuplicateResponsesErrors, CallWithDuplicateResponsesResponse, CallWithDuplicateResponsesResponses, CallWithNoContentResponseData, CallWithNoContentResponseResponses, CallWithParametersData, CallWithResponseAndNoContentResponseData, CallWithResponseAndNoContentResponseResponse, CallWithResponseAndNoContentResponseResponses, CallWithResponseData, CallWithResponseResponse, CallWithResponseResponses, CallWithResponsesData, CallWithResponsesError, CallWithResponsesErrors, CallWithResponsesResponse, CallWithResponsesResponses, CallWithResultFromHeaderData, CallWithResultFromHeaderErrors, CallWithResultFromHeaderResponses, CallWithWeirdParameterNamesData, ClientOptions, CollectionFormatData, CommentWithBackticks, CommentWithBackticksAndQuotes, CommentWithBreaks, CommentWithExpressionPlaceholders, CommentWithQuotes, CommentWithReservedCharacters, CommentWithSlashes, ComplexTypesData, ComplexTypesErrors, ComplexTypesResponse, ComplexTypesResponses, Date, Default, DeleteCallWithoutParametersAndResponseData, DictionaryWithArray, DictionaryWithDictionary, DictionaryWithProperties, DictionaryWithReference, DictionaryWithString, DummyAData, DummyAResponses, DummyBData, DummyBResponses, DuplicateName2Data, DuplicateName3Data, DuplicateName4Data, DuplicateNameData, EnumFromDescription, EnumWithExtensions, EnumWithNumbers, EnumWithStrings, ExternalRefA, ExternalRefB, ExternalSharedModel, FailureFailure, FooWowData, FooWowResponses, GetCallWithoutParametersAndResponseData, HeadCallWithoutParametersAndResponseData, ModelThatExtends, ModelThatExtendsExtends, ModelWithArray, ModelWithBoolean, ModelWithCircularReference, ModelWithDictionary, ModelWithDuplicateImports, ModelWithDuplicateProperties, ModelWithEnum, ModelWithEnumFromDescription, ModelWithInteger, ModelWithNestedEnums, ModelWithNestedProperties, ModelWithNullableString, ModelWithOrderedProperties, ModelWithPattern, ModelWithPatternWritable, ModelWithProperties, ModelWithPropertiesWritable, ModelWithReference, ModelWithReferenceWritable, ModelWithString, ModelWithStringError, NonAsciiæøåÆøÅöôêÊ字符串Data, NonAsciiæøåÆøÅöôêÊ字符串Response, NonAsciiæøåÆøÅöôêÊ字符串Responses, NonAsciiStringæøåÆøÅöôêÊ字符串, OptionsCallWithoutParametersAndResponseData, ParameterActivityParams, PatchApiVbyApiVersionNoTagData, PatchApiVbyApiVersionNoTagResponses, PatchCallWithoutParametersAndResponseData, PostApiVbyApiVersionBodyData, PostApiVbyApiVersionBodyError, PostApiVbyApiVersionBodyErrors, PostApiVbyApiVersionBodyResponse, PostApiVbyApiVersionBodyResponses, PostCallWithoutParametersAndResponseData, PutCallWithoutParametersAndResponseData, ResponsePostActivityResponse, ServiceWithEmptyTagData, SimpleBoolean, SimpleFile, SimpleInteger, SimpleReference, SimpleString, SimpleStringWithPattern, TestErrorCodeData, TestErrorCodeErrors, TestErrorCodeResponses, TypesData, TypesResponse, TypesResponses } from './types.gen';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@pinia/colada/fetch/sdk.gen.ts",
    "content": "// 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 { CallToTestOrderOfParamsData, CallWithDefaultOptionalParametersData, CallWithDefaultParametersData, CallWithDescriptionsData, CallWithDuplicateResponsesData, CallWithDuplicateResponsesErrors, CallWithDuplicateResponsesResponses, CallWithNoContentResponseData, CallWithNoContentResponseResponses, CallWithParametersData, CallWithResponseAndNoContentResponseData, CallWithResponseAndNoContentResponseResponses, CallWithResponseData, CallWithResponseResponses, CallWithResponsesData, CallWithResponsesErrors, CallWithResponsesResponses, CallWithResultFromHeaderData, CallWithResultFromHeaderErrors, CallWithResultFromHeaderResponses, CallWithWeirdParameterNamesData, CollectionFormatData, ComplexTypesData, ComplexTypesErrors, ComplexTypesResponses, DeleteCallWithoutParametersAndResponseData, DummyAData, DummyAResponses, DummyBData, DummyBResponses, DuplicateName2Data, DuplicateName3Data, DuplicateName4Data, DuplicateNameData, FooWowData, FooWowResponses, GetCallWithoutParametersAndResponseData, HeadCallWithoutParametersAndResponseData, NonAsciiæøåÆøÅöôêÊ字符串Data, NonAsciiæøåÆøÅöôêÊ字符串Responses, OptionsCallWithoutParametersAndResponseData, PatchApiVbyApiVersionNoTagData, PatchApiVbyApiVersionNoTagResponses, PatchCallWithoutParametersAndResponseData, PostApiVbyApiVersionBodyData, PostApiVbyApiVersionBodyErrors, PostApiVbyApiVersionBodyResponses, PostCallWithoutParametersAndResponseData, PutCallWithoutParametersAndResponseData, ServiceWithEmptyTagData, TestErrorCodeData, TestErrorCodeErrors, TestErrorCodeResponses, TypesData, TypesResponses } from './types.gen';\n\nexport type Options<TData extends TDataShape = TDataShape, ThrowOnError extends boolean = boolean> = Options2<TData, ThrowOnError> & {\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\nexport const serviceWithEmptyTag = <ThrowOnError extends boolean = false>(options?: Options<ServiceWithEmptyTagData, ThrowOnError>) => (options?.client ?? client).get<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/no+tag', ...options });\n\nexport const patchApiVbyApiVersionNoTag = <ThrowOnError extends boolean = false>(options?: Options<PatchApiVbyApiVersionNoTagData, ThrowOnError>) => (options?.client ?? client).patch<PatchApiVbyApiVersionNoTagResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/no+tag', ...options });\n\nexport const fooWow = <ThrowOnError extends boolean = false>(options?: Options<FooWowData, ThrowOnError>) => (options?.client ?? client).put<FooWowResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/no+tag', ...options });\n\nexport const deleteCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<DeleteCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).delete<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const getCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<GetCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).get<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const headCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<HeadCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).head<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const optionsCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<OptionsCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).options<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const patchCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<PatchCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).patch<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const postCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<PostCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).post<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const putCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<PutCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).put<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const callWithDescriptions = <ThrowOnError extends boolean = false>(options?: Options<CallWithDescriptionsData, ThrowOnError>) => (options?.client ?? client).post<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/descriptions/', ...options });\n\nexport const callWithParameters = <ThrowOnError extends boolean = false>(options: Options<CallWithParametersData, ThrowOnError>) => (options.client ?? client).post<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/parameters/{parameterPath}', ...options });\n\nexport const callWithWeirdParameterNames = <ThrowOnError extends boolean = false>(options: Options<CallWithWeirdParameterNamesData, ThrowOnError>) => (options.client ?? client).post<unknown, unknown, ThrowOnError>({\n    url: '/api/v{api-version}/parameters/{parameter.path.1}/{parameter-path-2}/{PARAMETER-PATH-3}',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options.headers\n    }\n});\n\nexport const callWithDefaultParameters = <ThrowOnError extends boolean = false>(options: Options<CallWithDefaultParametersData, ThrowOnError>) => (options.client ?? client).get<unknown, unknown, ThrowOnError>({\n    querySerializer: { parameters: { parameterModel: { object: { explode: false, style: 'form' } } } },\n    url: '/api/v{api-version}/defaults',\n    ...options\n});\n\nexport const callWithDefaultOptionalParameters = <ThrowOnError extends boolean = false>(options?: Options<CallWithDefaultOptionalParametersData, ThrowOnError>) => (options?.client ?? client).post<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/defaults', ...options });\n\nexport const callToTestOrderOfParams = <ThrowOnError extends boolean = false>(options: Options<CallToTestOrderOfParamsData, ThrowOnError>) => (options.client ?? client).put<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/defaults', ...options });\n\nexport const duplicateName = <ThrowOnError extends boolean = false>(options?: Options<DuplicateNameData, ThrowOnError>) => (options?.client ?? client).delete<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/duplicate', ...options });\n\nexport const duplicateName2 = <ThrowOnError extends boolean = false>(options?: Options<DuplicateName2Data, ThrowOnError>) => (options?.client ?? client).get<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/duplicate', ...options });\n\nexport const duplicateName3 = <ThrowOnError extends boolean = false>(options?: Options<DuplicateName3Data, ThrowOnError>) => (options?.client ?? client).post<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/duplicate', ...options });\n\nexport const duplicateName4 = <ThrowOnError extends boolean = false>(options?: Options<DuplicateName4Data, ThrowOnError>) => (options?.client ?? client).put<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/duplicate', ...options });\n\nexport const callWithNoContentResponse = <ThrowOnError extends boolean = false>(options?: Options<CallWithNoContentResponseData, ThrowOnError>) => (options?.client ?? client).get<CallWithNoContentResponseResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/no-content', ...options });\n\nexport const callWithResponseAndNoContentResponse = <ThrowOnError extends boolean = false>(options?: Options<CallWithResponseAndNoContentResponseData, ThrowOnError>) => (options?.client ?? client).get<CallWithResponseAndNoContentResponseResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/multiple-tags/response-and-no-content', ...options });\n\nexport const dummyA = <ThrowOnError extends boolean = false>(options?: Options<DummyAData, ThrowOnError>) => (options?.client ?? client).get<DummyAResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/multiple-tags/a', ...options });\n\nexport const dummyB = <ThrowOnError extends boolean = false>(options?: Options<DummyBData, ThrowOnError>) => (options?.client ?? client).get<DummyBResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/multiple-tags/b', ...options });\n\nexport const callWithResponse = <ThrowOnError extends boolean = false>(options?: Options<CallWithResponseData, ThrowOnError>) => (options?.client ?? client).get<CallWithResponseResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/response', ...options });\n\nexport const callWithDuplicateResponses = <ThrowOnError extends boolean = false>(options?: Options<CallWithDuplicateResponsesData, ThrowOnError>) => (options?.client ?? client).post<CallWithDuplicateResponsesResponses, CallWithDuplicateResponsesErrors, ThrowOnError>({ url: '/api/v{api-version}/response', ...options });\n\nexport const callWithResponses = <ThrowOnError extends boolean = false>(options?: Options<CallWithResponsesData, ThrowOnError>) => (options?.client ?? client).put<CallWithResponsesResponses, CallWithResponsesErrors, ThrowOnError>({ url: '/api/v{api-version}/response', ...options });\n\nexport const collectionFormat = <ThrowOnError extends boolean = false>(options: Options<CollectionFormatData, ThrowOnError>) => (options.client ?? client).get<unknown, unknown, ThrowOnError>({\n    querySerializer: { parameters: {\n            parameterArrayCSV: { array: { explode: false } },\n            parameterArraySSV: { array: { explode: false } },\n            parameterArrayTSV: { array: { explode: false } },\n            parameterArrayPipes: { array: { explode: false } }\n        } },\n    url: '/api/v{api-version}/collectionFormat',\n    ...options\n});\n\nexport const types = <ThrowOnError extends boolean = false>(options: Options<TypesData, ThrowOnError>) => (options.client ?? client).get<TypesResponses, unknown, ThrowOnError>({\n    querySerializer: { parameters: { parameterArray: { array: { explode: false } }, parameterDictionary: { object: { explode: false, style: 'form' } } } },\n    url: '/api/v{api-version}/types',\n    ...options\n});\n\nexport const complexTypes = <ThrowOnError extends boolean = false>(options: Options<ComplexTypesData, ThrowOnError>) => (options.client ?? client).get<ComplexTypesResponses, ComplexTypesErrors, ThrowOnError>({\n    querySerializer: { parameters: { parameterObject: { object: { explode: false, style: 'form' } }, parameterReference: { object: { explode: false, style: 'form' } } } },\n    url: '/api/v{api-version}/complex',\n    ...options\n});\n\nexport const callWithResultFromHeader = <ThrowOnError extends boolean = false>(options?: Options<CallWithResultFromHeaderData, ThrowOnError>) => (options?.client ?? client).post<CallWithResultFromHeaderResponses, CallWithResultFromHeaderErrors, ThrowOnError>({ url: '/api/v{api-version}/header', ...options });\n\nexport const testErrorCode = <ThrowOnError extends boolean = false>(options: Options<TestErrorCodeData, ThrowOnError>) => (options.client ?? client).post<TestErrorCodeResponses, TestErrorCodeErrors, ThrowOnError>({ url: '/api/v{api-version}/error', ...options });\n\nexport const nonAsciiæøåÆøÅöôêÊ字符串 = <ThrowOnError extends boolean = false>(options: Options<NonAsciiæøåÆøÅöôêÊ字符串Data, ThrowOnError>) => (options.client ?? client).post<NonAsciiæøåÆøÅöôêÊ字符串Responses, unknown, ThrowOnError>({ url: '/api/v{api-version}/non-ascii-æøåÆØÅöôêÊ字符串', ...options });\n\n/**\n * Body should not be unknown\n *\n * Body should not be unknown\n */\nexport const postApiVbyApiVersionBody = <ThrowOnError extends boolean = false>(options: Options<PostApiVbyApiVersionBodyData, ThrowOnError>) => (options.client ?? client).post<PostApiVbyApiVersionBodyResponses, PostApiVbyApiVersionBodyErrors, ThrowOnError>({\n    url: '/api/v{api-version}/body',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options.headers\n    }\n});\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@pinia/colada/fetch/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type ClientOptions = {\n    baseUrl: 'http://localhost:3000/base' | (string & {});\n};\n\nexport type ExternalRefA = ExternalSharedModel;\n\nexport type ExternalRefB = ExternalSharedModel;\n\n/**\n * Testing multiline comments in string: First line\n * Second line\n *\n * Fourth line\n */\nexport type CommentWithBreaks = number;\n\n/**\n * Testing backticks in string: `backticks` and ```multiple backticks``` should work\n */\nexport type CommentWithBackticks = number;\n\n/**\n * Testing backticks and quotes in string: `backticks`, 'quotes', \"double quotes\" and ```multiple backticks``` should work\n */\nexport type CommentWithBackticksAndQuotes = number;\n\n/**\n * Testing slashes in string: \\backwards\\\\\\ and /forwards/// should work\n */\nexport type CommentWithSlashes = number;\n\n/**\n * Testing expression placeholders in string: ${expression} should work\n */\nexport type CommentWithExpressionPlaceholders = number;\n\n/**\n * Testing quotes in string: 'single quote''' and \"double quotes\"\"\" should work\n */\nexport type CommentWithQuotes = number;\n\n/**\n * Testing reserved characters in string: * inline * and ** inline ** should work\n */\nexport type CommentWithReservedCharacters = number;\n\n/**\n * This is a simple number\n */\nexport type SimpleInteger = number;\n\n/**\n * This is a simple boolean\n */\nexport type SimpleBoolean = boolean;\n\n/**\n * This is a simple string\n */\nexport type SimpleString = string;\n\n/**\n * A string with non-ascii (unicode) characters valid in typescript identifiers (æøåÆØÅöÔèÈ字符串)\n */\nexport type NonAsciiStringæøåÆøÅöôêÊ字符串 = string;\n\n/**\n * This is a simple file\n */\nexport type SimpleFile = Blob | File;\n\nexport type SimpleReference = ModelWithString;\n\n/**\n * This is a simple string\n */\nexport type SimpleStringWithPattern = string;\n\n/**\n * This is a simple enum with strings\n */\nexport type EnumWithStrings = 'Success' | 'Warning' | 'Error' | '\\'Single Quote\\'' | '\"Double Quotes\"' | 'Non-ascii: øæåôöØÆÅÔÖ字符串';\n\n/**\n * This is a simple enum with numbers\n */\nexport type EnumWithNumbers = 1 | 2 | 3 | 1.1 | 1.2 | 1.3 | 100 | 200 | 300 | -100 | -200 | -300 | -1.1 | -1.2 | -1.3;\n\n/**\n * Success=1,Warning=2,Error=3\n */\nexport type EnumFromDescription = number;\n\n/**\n * This is a simple enum with numbers\n */\nexport type EnumWithExtensions = 200 | 400 | 500;\n\n/**\n * This is a simple array with numbers\n */\nexport type ArrayWithNumbers = Array<number>;\n\n/**\n * This is a simple array with booleans\n */\nexport type ArrayWithBooleans = Array<boolean>;\n\n/**\n * This is a simple array with strings\n */\nexport type ArrayWithStrings = Array<string>;\n\n/**\n * This is a simple array with references\n */\nexport type ArrayWithReferences = Array<ModelWithString>;\n\n/**\n * This is a simple array containing an array\n */\nexport type ArrayWithArray = Array<Array<ModelWithString>>;\n\n/**\n * This is a simple array with properties\n */\nexport type ArrayWithProperties = Array<{\n    foo?: string;\n    bar?: string;\n}>;\n\n/**\n * This is a string dictionary\n */\nexport type DictionaryWithString = {\n    [key: string]: string;\n};\n\n/**\n * This is a string reference\n */\nexport type DictionaryWithReference = {\n    [key: string]: ModelWithString;\n};\n\n/**\n * This is a complex dictionary\n */\nexport type DictionaryWithArray = {\n    [key: string]: Array<ModelWithString>;\n};\n\n/**\n * This is a string dictionary\n */\nexport type DictionaryWithDictionary = {\n    [key: string]: {\n        [key: string]: string;\n    };\n};\n\n/**\n * This is a complex dictionary\n */\nexport type DictionaryWithProperties = {\n    [key: string]: {\n        foo?: string;\n        bar?: string;\n    };\n};\n\n/**\n * This is a type-only model that defines Date as a string\n */\nexport type Date = string;\n\n/**\n * This is a model with one number property\n */\nexport type ModelWithInteger = {\n    /**\n     * This is a simple number property\n     */\n    prop?: number;\n};\n\n/**\n * This is a model with one boolean property\n */\nexport type ModelWithBoolean = {\n    /**\n     * This is a simple boolean property\n     */\n    prop?: boolean;\n};\n\n/**\n * This is a model with one string property\n */\nexport type ModelWithString = {\n    /**\n     * This is a simple string property\n     */\n    prop?: string;\n};\n\n/**\n * This is a model with one string property\n */\nexport type ModelWithStringError = {\n    /**\n     * This is a simple string property\n     */\n    prop?: string;\n};\n\n/**\n * This is a model with one string property\n */\nexport type ModelWithNullableString = {\n    /**\n     * This is a simple string property\n     */\n    nullableProp?: string | null;\n    /**\n     * This is a simple string property\n     */\n    nullableRequiredProp: string | null;\n};\n\n/**\n * This is a model with one enum\n */\nexport type ModelWithEnum = {\n    /**\n     * This is a simple enum with strings\n     */\n    test?: 'Success' | 'Warning' | 'Error' | 'ØÆÅ字符串';\n    /**\n     * These are the HTTP error code enums\n     */\n    statusCode?: '100' | '200 FOO' | '300 FOO_BAR' | '400 foo-bar' | '500 foo.bar' | '600 foo&bar';\n    /**\n     * Simple boolean enum\n     */\n    bool?: true;\n};\n\n/**\n * This is a model with one enum\n */\nexport type ModelWithEnumFromDescription = {\n    /**\n     * Success=1,Warning=2,Error=3\n     */\n    test?: number;\n};\n\n/**\n * This is a model with nested enums\n */\nexport type ModelWithNestedEnums = {\n    dictionaryWithEnum?: {\n        [key: string]: 'Success' | 'Warning' | 'Error';\n    };\n    dictionaryWithEnumFromDescription?: {\n        [key: string]: number;\n    };\n    arrayWithEnum?: Array<'Success' | 'Warning' | 'Error'>;\n    arrayWithDescription?: Array<number>;\n};\n\n/**\n * This is a model with one property containing a reference\n */\nexport type ModelWithReference = {\n    prop?: ModelWithProperties;\n};\n\n/**\n * This is a model with one property containing an array\n */\nexport type ModelWithArray = {\n    prop?: Array<ModelWithString>;\n    propWithFile?: Array<Blob | File>;\n    propWithNumber?: Array<number>;\n};\n\n/**\n * This is a model with one property containing a dictionary\n */\nexport type ModelWithDictionary = {\n    prop?: {\n        [key: string]: string;\n    };\n};\n\n/**\n * This is a model with one property containing a circular reference\n */\nexport type ModelWithCircularReference = {\n    prop?: ModelWithCircularReference;\n};\n\n/**\n * This is a model with one nested property\n */\nexport type ModelWithProperties = {\n    required: string;\n    readonly requiredAndReadOnly: string;\n    string?: string;\n    number?: number;\n    boolean?: boolean;\n    reference?: ModelWithString;\n    'property with space'?: string;\n    default?: string;\n    try?: string;\n    readonly '@namespace.string'?: string;\n    readonly '@namespace.integer'?: number;\n};\n\n/**\n * This is a model with one nested property\n */\nexport type ModelWithNestedProperties = {\n    readonly first: {\n        readonly second: {\n            readonly third: string;\n        };\n    };\n};\n\n/**\n * This is a model with duplicated properties\n */\nexport type ModelWithDuplicateProperties = {\n    prop?: ModelWithString;\n};\n\n/**\n * This is a model with ordered properties\n */\nexport type ModelWithOrderedProperties = {\n    zebra?: string;\n    apple?: string;\n    hawaii?: string;\n};\n\n/**\n * This is a model with duplicated imports\n */\nexport type ModelWithDuplicateImports = {\n    propA?: ModelWithString;\n    propB?: ModelWithString;\n    propC?: ModelWithString;\n};\n\n/**\n * This is a model that extends another model\n */\nexport type ModelThatExtends = ModelWithString & {\n    propExtendsA?: string;\n    propExtendsB?: ModelWithString;\n};\n\n/**\n * This is a model that extends another model\n */\nexport type ModelThatExtendsExtends = ModelWithString & ModelThatExtends & {\n    propExtendsC?: string;\n    propExtendsD?: ModelWithString;\n};\n\nexport type Default = {\n    name?: string;\n};\n\n/**\n * This is a model that contains a some patterns\n */\nexport type ModelWithPattern = {\n    key: string;\n    name: string;\n    readonly enabled?: boolean;\n    readonly modified?: string;\n    id?: string;\n    text?: string;\n    patternWithSingleQuotes?: string;\n    patternWithNewline?: string;\n    patternWithBacktick?: string;\n    patternWithUnicode?: string;\n};\n\nexport type ParameterActivityParams = {\n    description?: string;\n    graduate_id?: number;\n    organization_id?: number;\n    parent_activity?: number;\n    post_id?: number;\n};\n\nexport type ResponsePostActivityResponse = {\n    description?: string;\n    graduate_id?: number;\n    organization_id?: number;\n    parent_activity_id?: number;\n    post_id?: number;\n};\n\nexport type FailureFailure = {\n    error?: string;\n    message?: string;\n    reference_code?: string;\n};\n\nexport type ExternalSharedModel = {\n    id: string;\n    name?: string;\n};\n\n/**\n * This is a model with one property containing a reference\n */\nexport type ModelWithReferenceWritable = {\n    prop?: ModelWithPropertiesWritable;\n};\n\n/**\n * This is a model with one nested property\n */\nexport type ModelWithPropertiesWritable = {\n    required: string;\n    string?: string;\n    number?: number;\n    boolean?: boolean;\n    reference?: ModelWithString;\n    'property with space'?: string;\n    default?: string;\n    try?: string;\n};\n\n/**\n * This is a model that contains a some patterns\n */\nexport type ModelWithPatternWritable = {\n    key: string;\n    name: string;\n    id?: string;\n    text?: string;\n    patternWithSingleQuotes?: string;\n    patternWithNewline?: string;\n    patternWithBacktick?: string;\n    patternWithUnicode?: string;\n};\n\nexport type ServiceWithEmptyTagData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no+tag';\n};\n\nexport type PatchApiVbyApiVersionNoTagData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no+tag';\n};\n\nexport type PatchApiVbyApiVersionNoTagResponses = {\n    /**\n     * OK\n     */\n    default: unknown;\n};\n\nexport type FooWowData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no+tag';\n};\n\nexport type FooWowResponses = {\n    /**\n     * OK\n     */\n    default: unknown;\n};\n\nexport type DeleteCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type GetCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type HeadCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type OptionsCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type PatchCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type PostCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type PutCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type CallWithDescriptionsData = {\n    body?: never;\n    path?: never;\n    query?: {\n        /**\n         * Testing multiline comments in string: First line\n         * Second line\n         *\n         * Fourth line\n         */\n        parameterWithBreaks?: string;\n        /**\n         * Testing backticks in string: `backticks` and ```multiple backticks``` should work\n         */\n        parameterWithBackticks?: string;\n        /**\n         * Testing slashes in string: \\backwards\\\\\\ and /forwards/// should work\n         */\n        parameterWithSlashes?: string;\n        /**\n         * Testing expression placeholders in string: ${expression} should work\n         */\n        parameterWithExpressionPlaceholders?: string;\n        /**\n         * Testing quotes in string: 'single quote''' and \"double quotes\"\"\" should work\n         */\n        parameterWithQuotes?: string;\n        /**\n         * Testing reserved characters in string: * inline * and ** inline ** should work\n         */\n        parameterWithReservedCharacters?: string;\n    };\n    url: '/api/v{api-version}/descriptions/';\n};\n\nexport type CallWithParametersData = {\n    body?: never;\n    headers: {\n        /**\n         * This is the parameter that goes into the header\n         */\n        parameterHeader: string;\n    };\n    path: {\n        /**\n         * This is the parameter that goes into the path\n         */\n        parameterPath: string;\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string;\n    };\n    query: {\n        /**\n         * This is the parameter that goes into the query params\n         */\n        parameterQuery: string;\n    };\n    url: '/api/v{api-version}/parameters/{parameterPath}';\n};\n\nexport type CallWithWeirdParameterNamesData = {\n    /**\n     * This is the parameter that is sent as request body\n     */\n    body: string;\n    headers: {\n        /**\n         * This is the parameter that goes into the request header\n         */\n        'parameter.header': string;\n    };\n    path: {\n        /**\n         * This is the parameter that goes into the path\n         */\n        'parameter.path.1'?: string;\n        /**\n         * This is the parameter that goes into the path\n         */\n        'parameter-path-2'?: string;\n        /**\n         * This is the parameter that goes into the path\n         */\n        'PARAMETER-PATH-3'?: string;\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string;\n    };\n    query: {\n        /**\n         * This is the parameter with a reserved keyword\n         */\n        default?: string;\n        /**\n         * This is the parameter that goes into the request query params\n         */\n        'parameter-query': string;\n    };\n    url: '/api/v{api-version}/parameters/{parameter.path.1}/{parameter-path-2}/{PARAMETER-PATH-3}';\n};\n\nexport type CallWithDefaultParametersData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * This is a simple string with default value\n         */\n        parameterString: string;\n        /**\n         * This is a simple number with default value\n         */\n        parameterNumber: number;\n        /**\n         * This is a simple boolean with default value\n         */\n        parameterBoolean: boolean;\n        /**\n         * This is a simple enum with default value\n         */\n        parameterEnum: 'Success' | 'Warning' | 'Error';\n        /**\n         * This is a model with one string property\n         */\n        parameterModel: {\n            /**\n             * This is a simple string property\n             */\n            prop?: string;\n        };\n    };\n    url: '/api/v{api-version}/defaults';\n};\n\nexport type CallWithDefaultOptionalParametersData = {\n    body?: never;\n    path?: never;\n    query?: {\n        /**\n         * This is a simple string that is optional with default value\n         */\n        parameterString?: string;\n        /**\n         * This is a simple number that is optional with default value\n         */\n        parameterNumber?: number;\n        /**\n         * This is a simple boolean that is optional with default value\n         */\n        parameterBoolean?: boolean;\n        /**\n         * This is a simple enum that is optional with default value\n         */\n        parameterEnum?: 'Success' | 'Warning' | 'Error';\n    };\n    url: '/api/v{api-version}/defaults';\n};\n\nexport type CallToTestOrderOfParamsData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * This is a optional string with default\n         */\n        parameterOptionalStringWithDefault?: string;\n        /**\n         * This is a optional string with empty default\n         */\n        parameterOptionalStringWithEmptyDefault?: string;\n        /**\n         * This is a optional string with no default\n         */\n        parameterOptionalStringWithNoDefault?: string;\n        /**\n         * This is a string with default\n         */\n        parameterStringWithDefault: string;\n        /**\n         * This is a string with empty default\n         */\n        parameterStringWithEmptyDefault: string;\n        /**\n         * This is a string with no default\n         */\n        parameterStringWithNoDefault: string;\n        /**\n         * This is a string that can be null with no default\n         */\n        parameterStringNullableWithNoDefault?: string | null;\n        /**\n         * This is a string that can be null with default\n         */\n        parameterStringNullableWithDefault?: string | null;\n    };\n    url: '/api/v{api-version}/defaults';\n};\n\nexport type DuplicateNameData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/duplicate';\n};\n\nexport type DuplicateName2Data = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/duplicate';\n};\n\nexport type DuplicateName3Data = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/duplicate';\n};\n\nexport type DuplicateName4Data = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/duplicate';\n};\n\nexport type CallWithNoContentResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no-content';\n};\n\nexport type CallWithNoContentResponseResponses = {\n    /**\n     * Success\n     */\n    204: unknown;\n};\n\nexport type CallWithResponseAndNoContentResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multiple-tags/response-and-no-content';\n};\n\nexport type CallWithResponseAndNoContentResponseResponses = {\n    /**\n     * Response is a simple number\n     */\n    200: number;\n    /**\n     * Success\n     */\n    204: unknown;\n};\n\nexport type CallWithResponseAndNoContentResponseResponse = CallWithResponseAndNoContentResponseResponses[keyof CallWithResponseAndNoContentResponseResponses];\n\nexport type DummyAData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multiple-tags/a';\n};\n\nexport type DummyAResponses = {\n    /**\n     * Success\n     */\n    204: unknown;\n};\n\nexport type DummyBData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multiple-tags/b';\n};\n\nexport type DummyBResponses = {\n    /**\n     * Success\n     */\n    204: unknown;\n};\n\nexport type CallWithResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/response';\n};\n\nexport type CallWithResponseResponses = {\n    /**\n     * Message for default response\n     */\n    default: ModelWithString;\n};\n\nexport type CallWithResponseResponse = CallWithResponseResponses[keyof CallWithResponseResponses];\n\nexport type CallWithDuplicateResponsesData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/response';\n};\n\nexport type CallWithDuplicateResponsesErrors = {\n    /**\n     * Message for 500 error\n     */\n    500: ModelWithStringError;\n    /**\n     * Message for 501 error\n     */\n    501: ModelWithStringError;\n    /**\n     * Message for 502 error\n     */\n    502: ModelWithStringError;\n    /**\n     * Message for default response\n     */\n    default: ModelWithString;\n};\n\nexport type CallWithDuplicateResponsesError = CallWithDuplicateResponsesErrors[keyof CallWithDuplicateResponsesErrors];\n\nexport type CallWithDuplicateResponsesResponses = {\n    /**\n     * Message for 201 response\n     */\n    201: ModelWithString;\n    /**\n     * Message for 202 response\n     */\n    202: ModelWithString;\n};\n\nexport type CallWithDuplicateResponsesResponse = CallWithDuplicateResponsesResponses[keyof CallWithDuplicateResponsesResponses];\n\nexport type CallWithResponsesData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/response';\n};\n\nexport type CallWithResponsesErrors = {\n    /**\n     * Message for 500 error\n     */\n    500: ModelWithStringError;\n    /**\n     * Message for 501 error\n     */\n    501: ModelWithStringError;\n    /**\n     * Message for 502 error\n     */\n    502: ModelWithStringError;\n    /**\n     * Message for default response\n     */\n    default: ModelWithString;\n};\n\nexport type CallWithResponsesError = CallWithResponsesErrors[keyof CallWithResponsesErrors];\n\nexport type CallWithResponsesResponses = {\n    /**\n     * Message for 200 response\n     */\n    200: {\n        readonly '@namespace.string'?: string;\n        readonly '@namespace.integer'?: number;\n        readonly value?: Array<ModelWithString>;\n    };\n    /**\n     * Message for 201 response\n     */\n    201: ModelThatExtends;\n    /**\n     * Message for 202 response\n     */\n    202: ModelThatExtendsExtends;\n};\n\nexport type CallWithResponsesResponse = CallWithResponsesResponses[keyof CallWithResponsesResponses];\n\nexport type CollectionFormatData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * This is an array parameter that is sent as csv format (comma-separated values)\n         */\n        parameterArrayCSV: Array<string>;\n        /**\n         * This is an array parameter that is sent as ssv format (space-separated values)\n         */\n        parameterArraySSV: Array<string>;\n        /**\n         * This is an array parameter that is sent as tsv format (tab-separated values)\n         */\n        parameterArrayTSV: Array<string>;\n        /**\n         * This is an array parameter that is sent as pipes format (pipe-separated values)\n         */\n        parameterArrayPipes: Array<string>;\n        /**\n         * This is an array parameter that is sent as multi format (multiple parameter instances)\n         */\n        parameterArrayMulti: Array<string>;\n    };\n    url: '/api/v{api-version}/collectionFormat';\n};\n\nexport type TypesData = {\n    body?: never;\n    path?: {\n        /**\n         * This is a number parameter\n         */\n        id?: number;\n    };\n    query: {\n        /**\n         * This is a number parameter\n         */\n        parameterNumber: number;\n        /**\n         * This is a string parameter\n         */\n        parameterString: string;\n        /**\n         * This is a boolean parameter\n         */\n        parameterBoolean: boolean;\n        /**\n         * This is an array parameter\n         */\n        parameterArray: Array<string>;\n        /**\n         * This is a dictionary parameter\n         */\n        parameterDictionary: {\n            [key: string]: unknown;\n        };\n        /**\n         * This is an enum parameter\n         */\n        parameterEnum: 'Success' | 'Warning' | 'Error';\n    };\n    url: '/api/v{api-version}/types';\n};\n\nexport type TypesResponses = {\n    /**\n     * Response is a simple number\n     */\n    200: number;\n    /**\n     * Response is a simple string\n     */\n    201: string;\n    /**\n     * Response is a simple boolean\n     */\n    202: boolean;\n    /**\n     * Response is a simple object\n     */\n    203: {\n        [key: string]: unknown;\n    };\n};\n\nexport type TypesResponse = TypesResponses[keyof TypesResponses];\n\nexport type ComplexTypesData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * Parameter containing object\n         */\n        parameterObject: {\n            first?: {\n                second?: {\n                    third?: string;\n                };\n            };\n        };\n        /**\n         * This is a model with one string property\n         */\n        parameterReference: {\n            /**\n             * This is a simple string property\n             */\n            prop?: string;\n        };\n    };\n    url: '/api/v{api-version}/complex';\n};\n\nexport type ComplexTypesErrors = {\n    /**\n     * 400 server error\n     */\n    400: unknown;\n    /**\n     * 500 server error\n     */\n    500: unknown;\n};\n\nexport type ComplexTypesResponses = {\n    /**\n     * Successful response\n     */\n    200: Array<ModelWithString>;\n};\n\nexport type ComplexTypesResponse = ComplexTypesResponses[keyof ComplexTypesResponses];\n\nexport type CallWithResultFromHeaderData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/header';\n};\n\nexport type CallWithResultFromHeaderErrors = {\n    /**\n     * 400 server error\n     */\n    400: unknown;\n    /**\n     * 500 server error\n     */\n    500: unknown;\n};\n\nexport type CallWithResultFromHeaderResponses = {\n    /**\n     * Successful response\n     */\n    200: unknown;\n};\n\nexport type TestErrorCodeData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * Status code to return\n         */\n        status: string;\n    };\n    url: '/api/v{api-version}/error';\n};\n\nexport type TestErrorCodeErrors = {\n    /**\n     * Custom message: Internal Server Error\n     */\n    500: unknown;\n    /**\n     * Custom message: Not Implemented\n     */\n    501: unknown;\n    /**\n     * Custom message: Bad Gateway\n     */\n    502: unknown;\n    /**\n     * Custom message: Service Unavailable\n     */\n    503: unknown;\n};\n\nexport type TestErrorCodeResponses = {\n    /**\n     * Custom message: Successful response\n     */\n    200: unknown;\n};\n\nexport type NonAsciiæøåÆøÅöôêÊ字符串Data = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * Dummy input param\n         */\n        nonAsciiParamæøåÆØÅöôêÊ: number;\n    };\n    url: '/api/v{api-version}/non-ascii-æøåÆØÅöôêÊ字符串';\n};\n\nexport type NonAsciiæøåÆøÅöôêÊ字符串Responses = {\n    /**\n     * Successful response\n     */\n    200: NonAsciiStringæøåÆøÅöôêÊ字符串;\n};\n\nexport type NonAsciiæøåÆøÅöôêÊ字符串Response = NonAsciiæøåÆøÅöôêÊ字符串Responses[keyof NonAsciiæøåÆøÅöôêÊ字符串Responses];\n\nexport type PostApiVbyApiVersionBodyData = {\n    /**\n     * Body should not be unknown\n     */\n    body: ParameterActivityParams;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/body';\n};\n\nexport type PostApiVbyApiVersionBodyErrors = {\n    /**\n     * Bad Request\n     */\n    400: FailureFailure;\n    /**\n     * Internal Server Error\n     */\n    500: FailureFailure;\n};\n\nexport type PostApiVbyApiVersionBodyError = PostApiVbyApiVersionBodyErrors[keyof PostApiVbyApiVersionBodyErrors];\n\nexport type PostApiVbyApiVersionBodyResponses = {\n    /**\n     * OK\n     */\n    200: ResponsePostActivityResponse;\n};\n\nexport type PostApiVbyApiVersionBodyResponse = PostApiVbyApiVersionBodyResponses[keyof PostApiVbyApiVersionBodyResponses];\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/angular-query-experimental/asClass/@tanstack/angular-query-experimental.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport { type DefaultError, type MutationOptions, queryOptions } from '@tanstack/angular-query-experimental';\n\nimport { client } from '../client.gen';\nimport { BarBazService, BarService, FooBazService, FooService, type Options } from '../sdk.gen';\nimport type { FooBarPostData, FooBarPostResponse, FooBarPutData, FooBarPutResponse, FooPostData, FooPostResponse, FooPutData, FooPutResponse, GetFooBarData, GetFooBarResponse, GetFooData, GetFooResponse } from '../types.gen';\n\nexport type QueryKey<TOptions extends Options> = [\n    Pick<TOptions, 'baseUrl' | 'body' | 'headers' | 'path' | 'query'> & {\n        _id: string;\n        _infinite?: boolean;\n        tags?: ReadonlyArray<string>;\n    }\n];\n\nconst createQueryKey = <TOptions extends Options>(id: string, options?: TOptions, infinite?: boolean, tags?: ReadonlyArray<string>): [\n    QueryKey<TOptions>[0]\n] => {\n    const params: QueryKey<TOptions>[0] = { _id: id, baseUrl: options?.baseUrl || (options?.client ?? client).getConfig().baseUrl } as QueryKey<TOptions>[0];\n    if (infinite) {\n        params._infinite = infinite;\n    }\n    if (tags) {\n        params.tags = tags;\n    }\n    if (options?.body) {\n        params.body = options.body;\n    }\n    if (options?.headers) {\n        params.headers = options.headers;\n    }\n    if (options?.path) {\n        params.path = options.path;\n    }\n    if (options?.query) {\n        params.query = options.query;\n    }\n    return [params];\n};\n\nexport const getFooQueryKey = (options?: Options<GetFooData>) => createQueryKey('getFoo', options);\n\nexport const getFooOptions = (options?: Options<GetFooData>) => queryOptions<GetFooResponse, DefaultError, GetFooResponse, ReturnType<typeof getFooQueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await FooBazService.getFoo({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: getFooQueryKey(options)\n});\n\nexport const fooPostMutation = (options?: Partial<Options<FooPostData>>): MutationOptions<FooPostResponse, DefaultError, Options<FooPostData>> => {\n    const mutationOptions: MutationOptions<FooPostResponse, DefaultError, Options<FooPostData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await FooService.post({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const fooPutMutation = (options?: Partial<Options<FooPutData>>): MutationOptions<FooPutResponse, DefaultError, Options<FooPutData>> => {\n    const mutationOptions: MutationOptions<FooPutResponse, DefaultError, Options<FooPutData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await FooService.put({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const getFooBarQueryKey = (options?: Options<GetFooBarData>) => createQueryKey('getFooBar', options);\n\nexport const getFooBarOptions = (options?: Options<GetFooBarData>) => queryOptions<GetFooBarResponse, DefaultError, GetFooBarResponse, ReturnType<typeof getFooBarQueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await BarBazService.getFooBar({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: getFooBarQueryKey(options)\n});\n\nexport const fooBarPostMutation = (options?: Partial<Options<FooBarPostData>>): MutationOptions<FooBarPostResponse, DefaultError, Options<FooBarPostData>> => {\n    const mutationOptions: MutationOptions<FooBarPostResponse, DefaultError, Options<FooBarPostData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await BarService.post({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const fooBarPutMutation = (options?: Partial<Options<FooBarPutData>>): MutationOptions<FooBarPutResponse, DefaultError, Options<FooBarPutData>> => {\n    const mutationOptions: MutationOptions<FooBarPutResponse, DefaultError, Options<FooBarPutData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await BarService.put({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/angular-query-experimental/asClass/client/client.gen.ts",
    "content": "// 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 (options: RequestOptions) => {\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 url = buildUrl(opts);\n\n    return { opts, url };\n  };\n\n  const request: Client['request'] = async (options) => {\n    // @ts-expect-error\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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/angular-query-experimental/asClass/client/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type { Auth } from '../core/auth.gen';\nexport type { QuerySerializerOptions } from '../core/bodySerializer.gen';\nexport {\n  formDataBodySerializer,\n  jsonBodySerializer,\n  urlSearchParamsBodySerializer,\n} from '../core/bodySerializer.gen';\nexport { buildClientParams } from '../core/params.gen';\nexport { serializeQueryKeyValue } from '../core/queryKeySerializer.gen';\nexport { createClient } from './client.gen';\nexport type {\n  Client,\n  ClientOptions,\n  Config,\n  CreateClientConfig,\n  Options,\n  RequestOptions,\n  RequestResult,\n  ResolvedRequestOptions,\n  ResponseStyle,\n  TDataShape,\n} from './types.gen';\nexport { createConfig, mergeHeaders } from './utils.gen';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/angular-query-experimental/asClass/client/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { Auth } from '../core/auth.gen';\nimport type {\n  ServerSentEventsOptions,\n  ServerSentEventsResult,\n} from '../core/serverSentEvents.gen';\nimport type { Client as CoreClient, Config as CoreConfig } from '../core/types.gen';\nimport type { Middleware } from './utils.gen';\n\nexport type ResponseStyle = 'data' | 'fields';\n\nexport interface Config<T extends ClientOptions = ClientOptions>\n  extends Omit<RequestInit, 'body' | 'headers' | 'method'>, CoreConfig {\n  /**\n   * Base URL for all requests made by this client.\n   */\n  baseUrl?: T['baseUrl'];\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   * Please don't use the Fetch client for Next.js applications. The `next`\n   * options won't have any effect.\n   *\n   * Install {@link https://www.npmjs.com/package/@hey-api/client-next `@hey-api/client-next`} instead.\n   */\n  next?: never;\n  /**\n   * Return the response data parsed in a specified format. By default, `auto`\n   * will infer the appropriate method from the `Content-Type` response header.\n   * You can override this behavior with any of the {@link Body} methods.\n   * Select `stream` if you don't want to parse response data at all.\n   *\n   * @default 'auto'\n   */\n  parseAs?: 'arrayBuffer' | 'auto' | 'blob' | 'formData' | 'json' | 'stream' | 'text';\n  /**\n   * Should we return only data or multiple fields (data, error, response, etc.)?\n   *\n   * @default 'fields'\n   */\n  responseStyle?: ResponseStyle;\n  /**\n   * Throw an error instead of returning it in the response?\n   *\n   * @default false\n   */\n  throwOnError?: T['throwOnError'];\n}\n\nexport interface RequestOptions<\n  TData = unknown,\n  TResponseStyle extends ResponseStyle = 'fields',\n  ThrowOnError extends boolean = boolean,\n  Url extends string = string,\n>\n  extends\n    Config<{\n      responseStyle: TResponseStyle;\n      throwOnError: ThrowOnError;\n    }>,\n    Pick<\n      ServerSentEventsOptions<TData>,\n      | 'onRequest'\n      | 'onSseError'\n      | 'onSseEvent'\n      | 'sseDefaultRetryDelay'\n      | 'sseMaxRetryAttempts'\n      | 'sseMaxRetryDelay'\n    > {\n  /**\n   * Any body that you want to add to your request.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/fetch#body}\n   */\n  body?: unknown;\n  path?: Record<string, unknown>;\n  query?: Record<string, unknown>;\n  /**\n   * Security mechanism(s) to use for the request.\n   */\n  security?: ReadonlyArray<Auth>;\n  url: Url;\n}\n\nexport interface ResolvedRequestOptions<\n  TResponseStyle extends ResponseStyle = 'fields',\n  ThrowOnError extends boolean = boolean,\n  Url extends string = string,\n> extends RequestOptions<unknown, TResponseStyle, ThrowOnError, Url> {\n  serializedBody?: string;\n}\n\nexport type RequestResult<\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = boolean,\n  TResponseStyle extends ResponseStyle = 'fields',\n> = ThrowOnError extends true\n  ? Promise<\n      TResponseStyle extends 'data'\n        ? TData extends Record<string, unknown>\n          ? TData[keyof TData]\n          : TData\n        : {\n            data: TData extends Record<string, unknown> ? TData[keyof TData] : TData;\n            request: Request;\n            response: Response;\n          }\n    >\n  : Promise<\n      TResponseStyle extends 'data'\n        ? (TData extends Record<string, unknown> ? TData[keyof TData] : TData) | undefined\n        : (\n            | {\n                data: TData extends Record<string, unknown> ? TData[keyof TData] : TData;\n                error: undefined;\n              }\n            | {\n                data: undefined;\n                error: TError extends Record<string, unknown> ? TError[keyof TError] : TError;\n              }\n          ) & {\n            request: Request;\n            response: Response;\n          }\n    >;\n\nexport interface ClientOptions {\n  baseUrl?: string;\n  responseStyle?: ResponseStyle;\n  throwOnError?: boolean;\n}\n\ntype MethodFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'>,\n) => RequestResult<TData, TError, ThrowOnError, TResponseStyle>;\n\ntype SseFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'>,\n) => Promise<ServerSentEventsResult<TData, TError>>;\n\ntype RequestFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'> &\n    Pick<Required<RequestOptions<TData, TResponseStyle, ThrowOnError>>, 'method'>,\n) => RequestResult<TData, TError, ThrowOnError, TResponseStyle>;\n\ntype BuildUrlFn = <\n  TData extends {\n    body?: unknown;\n    path?: Record<string, unknown>;\n    query?: Record<string, unknown>;\n    url: string;\n  },\n>(\n  options: TData & Options<TData>,\n) => string;\n\nexport type Client = CoreClient<RequestFn, Config, MethodFn, BuildUrlFn, SseFn> & {\n  interceptors: Middleware<Request, Response, unknown, ResolvedRequestOptions>;\n};\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 = ClientOptions> = (\n  override?: Config<ClientOptions & T>,\n) => Config<Required<ClientOptions> & T>;\n\nexport interface TDataShape {\n  body?: unknown;\n  headers?: unknown;\n  path?: unknown;\n  query?: unknown;\n  url: string;\n}\n\ntype OmitKeys<T, K> = Pick<T, Exclude<keyof T, K>>;\n\nexport type Options<\n  TData extends TDataShape = TDataShape,\n  ThrowOnError extends boolean = boolean,\n  TResponse = unknown,\n  TResponseStyle extends ResponseStyle = 'fields',\n> = OmitKeys<\n  RequestOptions<TResponse, TResponseStyle, ThrowOnError>,\n  'body' | 'path' | 'query' | 'url'\n> &\n  ([TData] extends [never] ? unknown : Omit<TData, 'url'>);\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/angular-query-experimental/asClass/client/utils.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/angular-query-experimental/asClass/client.gen.ts",
    "content": "// 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>());\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/angular-query-experimental/asClass/core/auth.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/angular-query-experimental/asClass/core/bodySerializer.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/angular-query-experimental/asClass/core/params.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/angular-query-experimental/asClass/core/pathSerializer.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/angular-query-experimental/asClass/core/queryKeySerializer.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\n/**\n * JSON-friendly union that mirrors what Pinia Colada can hash.\n */\nexport type JsonValue =\n  | null\n  | string\n  | number\n  | boolean\n  | JsonValue[]\n  | { [key: string]: JsonValue };\n\n/**\n * Replacer that converts non-JSON values (bigint, Date, etc.) to safe substitutes.\n */\nexport const queryKeyJsonReplacer = (_key: string, value: unknown) => {\n  if (value === undefined || typeof value === 'function' || typeof value === 'symbol') {\n    return undefined;\n  }\n  if (typeof value === 'bigint') {\n    return value.toString();\n  }\n  if (value instanceof Date) {\n    return value.toISOString();\n  }\n  return value;\n};\n\n/**\n * Safely stringifies a value and parses it back into a JsonValue.\n */\nexport const stringifyToJsonValue = (input: unknown): JsonValue | undefined => {\n  try {\n    const json = JSON.stringify(input, queryKeyJsonReplacer);\n    if (json === undefined) {\n      return undefined;\n    }\n    return JSON.parse(json) as JsonValue;\n  } catch {\n    return undefined;\n  }\n};\n\n/**\n * Detects plain objects (including objects with a null prototype).\n */\nconst isPlainObject = (value: unknown): value is Record<string, unknown> => {\n  if (value === null || typeof value !== 'object') {\n    return false;\n  }\n  const prototype = Object.getPrototypeOf(value as object);\n  return prototype === Object.prototype || prototype === null;\n};\n\n/**\n * Turns URLSearchParams into a sorted JSON object for deterministic keys.\n */\nconst serializeSearchParams = (params: URLSearchParams): JsonValue => {\n  const entries = Array.from(params.entries()).sort(([a], [b]) => a.localeCompare(b));\n  const result: Record<string, JsonValue> = {};\n\n  for (const [key, value] of entries) {\n    const existing = result[key];\n    if (existing === undefined) {\n      result[key] = value;\n      continue;\n    }\n\n    if (Array.isArray(existing)) {\n      (existing as string[]).push(value);\n    } else {\n      result[key] = [existing, value];\n    }\n  }\n\n  return result;\n};\n\n/**\n * Normalizes any accepted value into a JSON-friendly shape for query keys.\n */\nexport const serializeQueryKeyValue = (value: unknown): JsonValue | undefined => {\n  if (value === null) {\n    return null;\n  }\n\n  if (typeof value === 'string' || typeof value === 'number' || typeof value === 'boolean') {\n    return value;\n  }\n\n  if (value === undefined || typeof value === 'function' || typeof value === 'symbol') {\n    return undefined;\n  }\n\n  if (typeof value === 'bigint') {\n    return value.toString();\n  }\n\n  if (value instanceof Date) {\n    return value.toISOString();\n  }\n\n  if (Array.isArray(value)) {\n    return stringifyToJsonValue(value);\n  }\n\n  if (typeof URLSearchParams !== 'undefined' && value instanceof URLSearchParams) {\n    return serializeSearchParams(value);\n  }\n\n  if (isPlainObject(value)) {\n    return stringifyToJsonValue(value);\n  }\n\n  return undefined;\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/angular-query-experimental/asClass/core/serverSentEvents.gen.ts",
    "content": "// 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 const 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            // Normalize line endings: CRLF -> LF, then CR -> LF\n            buffer = buffer.replace(/\\r\\n/g, '\\n').replace(/\\r/g, '\\n');\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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/angular-query-experimental/asClass/core/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { Auth, AuthToken } from './auth.gen';\nimport type { BodySerializer, QuerySerializer, QuerySerializerOptions } from './bodySerializer.gen';\n\nexport type HttpMethod =\n  | 'connect'\n  | 'delete'\n  | 'get'\n  | 'head'\n  | 'options'\n  | 'patch'\n  | 'post'\n  | 'put'\n  | 'trace';\n\nexport type Client<\n  RequestFn = never,\n  Config = unknown,\n  MethodFn = never,\n  BuildUrlFn = never,\n  SseFn = never,\n> = {\n  /**\n   * Returns the final request URL.\n   */\n  buildUrl: BuildUrlFn;\n  getConfig: () => Config;\n  request: RequestFn;\n  setConfig: (config: Config) => Config;\n} & {\n  [K in HttpMethod]: MethodFn;\n} & ([SseFn] extends [never] ? { sse?: never } : { sse: { [K in HttpMethod]: SseFn } });\n\nexport interface Config {\n  /**\n   * Auth token or a function returning auth token. The resolved value will be\n   * added to the request payload as defined by its `security` array.\n   */\n  auth?: ((auth: Auth) => Promise<AuthToken> | AuthToken) | AuthToken;\n  /**\n   * A function for serializing request body parameter. By default,\n   * {@link JSON.stringify()} will be used.\n   */\n  bodySerializer?: BodySerializer | null;\n  /**\n   * An object containing any HTTP headers that you want to pre-populate your\n   * `Headers` object with.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/Headers/Headers#init See more}\n   */\n  headers?:\n    | RequestInit['headers']\n    | Record<\n        string,\n        string | number | boolean | (string | number | boolean)[] | null | undefined | unknown\n      >;\n  /**\n   * The request method.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/fetch#method See more}\n   */\n  method?: Uppercase<HttpMethod>;\n  /**\n   * A function for serializing request query parameters. By default, arrays\n   * will be exploded in form style, objects will be exploded in deepObject\n   * style, and reserved characters are percent-encoded.\n   *\n   * This method will have no effect if the native `paramsSerializer()` Axios\n   * API function is used.\n   *\n   * {@link https://swagger.io/docs/specification/serialization/#query View examples}\n   */\n  querySerializer?: QuerySerializer | QuerySerializerOptions;\n  /**\n   * A function validating request data. This is useful if you want to ensure\n   * the request conforms to the desired shape, so it can be safely sent to\n   * the server.\n   */\n  requestValidator?: (data: unknown) => Promise<unknown>;\n  /**\n   * A function transforming response data before it's returned. This is useful\n   * for post-processing data, e.g. converting ISO strings into Date objects.\n   */\n  responseTransformer?: (data: unknown) => Promise<unknown>;\n  /**\n   * A function validating response data. This is useful if you want to ensure\n   * the response conforms to the desired shape, so it can be safely passed to\n   * the transformers and returned to the user.\n   */\n  responseValidator?: (data: unknown) => Promise<unknown>;\n}\n\ntype IsExactlyNeverOrNeverUndefined<T> = [T] extends [never]\n  ? true\n  : [T] extends [never | undefined]\n    ? [undefined] extends [T]\n      ? false\n      : true\n    : false;\n\nexport type OmitNever<T extends Record<string, unknown>> = {\n  [K in keyof T as IsExactlyNeverOrNeverUndefined<T[K]> extends true ? never : K]: T[K];\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/angular-query-experimental/asClass/core/utils.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/angular-query-experimental/asClass/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport { BarBazService, BarService, BarService2, FooBazService, FooService, FooService2, type Options } from './sdk.gen';\nexport type { ClientOptions, FooBarPostData, FooBarPostResponse, FooBarPostResponses, FooBarPutData, FooBarPutResponse, FooBarPutResponses, FooPostData, FooPostResponse, FooPostResponses, FooPutData, FooPutResponse, FooPutResponses, GetFooBarData, GetFooBarResponse, GetFooBarResponses, GetFooData, GetFooResponse, GetFooResponses } from './types.gen';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/angular-query-experimental/asClass/sdk.gen.ts",
    "content": "// 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 { FooBarPostData, FooBarPostResponses, FooBarPutData, FooBarPutResponses, FooPostData, FooPostResponses, FooPutData, FooPutResponses, GetFooBarData, GetFooBarResponses, GetFooData, GetFooResponses } from './types.gen';\n\nexport type Options<TData extends TDataShape = TDataShape, ThrowOnError extends boolean = boolean> = Options2<TData, ThrowOnError> & {\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\nexport class BarService {\n    public static post<ThrowOnError extends boolean = false>(options?: Options<FooBarPostData, ThrowOnError>) {\n        return (options?.client ?? client).post<FooBarPostResponses, unknown, ThrowOnError>({ url: '/foo/bar', ...options });\n    }\n    \n    public static put<ThrowOnError extends boolean = false>(options?: Options<FooBarPutData, ThrowOnError>) {\n        return (options?.client ?? client).put<FooBarPutResponses, unknown, ThrowOnError>({ url: '/foo/bar', ...options });\n    }\n}\n\nexport class FooService {\n    public static post<ThrowOnError extends boolean = false>(options?: Options<FooPostData, ThrowOnError>) {\n        return (options?.client ?? client).post<FooPostResponses, unknown, ThrowOnError>({ url: '/foo', ...options });\n    }\n    \n    public static put<ThrowOnError extends boolean = false>(options?: Options<FooPutData, ThrowOnError>) {\n        return (options?.client ?? client).put<FooPutResponses, unknown, ThrowOnError>({ url: '/foo', ...options });\n    }\n    \n    static barService = BarService;\n}\n\nexport class FooBazService {\n    public static getFoo<ThrowOnError extends boolean = false>(options?: Options<GetFooData, ThrowOnError>) {\n        return (options?.client ?? client).get<GetFooResponses, unknown, ThrowOnError>({ url: '/foo', ...options });\n    }\n    \n    static fooService = FooService;\n}\n\nexport class BarService2 {\n    public static post<ThrowOnError extends boolean = false>(options?: Options<FooBarPostData, ThrowOnError>) {\n        return (options?.client ?? client).post<FooBarPostResponses, unknown, ThrowOnError>({ url: '/foo/bar', ...options });\n    }\n    \n    public static put<ThrowOnError extends boolean = false>(options?: Options<FooBarPutData, ThrowOnError>) {\n        return (options?.client ?? client).put<FooBarPutResponses, unknown, ThrowOnError>({ url: '/foo/bar', ...options });\n    }\n}\n\nexport class FooService2 {\n    static barService = BarService2;\n}\n\nexport class BarBazService {\n    public static getFooBar<ThrowOnError extends boolean = false>(options?: Options<GetFooBarData, ThrowOnError>) {\n        return (options?.client ?? client).get<GetFooBarResponses, unknown, ThrowOnError>({ url: '/foo/bar', ...options });\n    }\n    \n    static fooService = FooService2;\n}\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/angular-query-experimental/asClass/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type ClientOptions = {\n    baseUrl: string;\n};\n\nexport type GetFooData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/foo';\n};\n\nexport type GetFooResponses = {\n    /**\n     * OK\n     */\n    200: string;\n};\n\nexport type GetFooResponse = GetFooResponses[keyof GetFooResponses];\n\nexport type FooPostData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/foo';\n};\n\nexport type FooPostResponses = {\n    /**\n     * OK\n     */\n    200: string;\n};\n\nexport type FooPostResponse = FooPostResponses[keyof FooPostResponses];\n\nexport type FooPutData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/foo';\n};\n\nexport type FooPutResponses = {\n    /**\n     * OK\n     */\n    200: string;\n};\n\nexport type FooPutResponse = FooPutResponses[keyof FooPutResponses];\n\nexport type GetFooBarData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/foo/bar';\n};\n\nexport type GetFooBarResponses = {\n    /**\n     * OK\n     */\n    200: string;\n};\n\nexport type GetFooBarResponse = GetFooBarResponses[keyof GetFooBarResponses];\n\nexport type FooBarPostData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/foo/bar';\n};\n\nexport type FooBarPostResponses = {\n    /**\n     * OK\n     */\n    200: string;\n};\n\nexport type FooBarPostResponse = FooBarPostResponses[keyof FooBarPostResponses];\n\nexport type FooBarPutData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/foo/bar';\n};\n\nexport type FooBarPutResponses = {\n    /**\n     * OK\n     */\n    200: string;\n};\n\nexport type FooBarPutResponse = FooBarPutResponses[keyof FooBarPutResponses];\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/angular-query-experimental/axios/@tanstack/angular-query-experimental.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport { type DefaultError, type MutationOptions, queryOptions } from '@tanstack/angular-query-experimental';\nimport type { AxiosError } from 'axios';\n\nimport { client } from '../client.gen';\nimport { callToTestOrderOfParams, callWithDefaultOptionalParameters, callWithDefaultParameters, callWithDescriptions, callWithDuplicateResponses, callWithNoContentResponse, callWithParameters, callWithResponse, callWithResponseAndNoContentResponse, callWithResponses, callWithResultFromHeader, callWithWeirdParameterNames, collectionFormat, complexTypes, deleteCallWithoutParametersAndResponse, dummyA, dummyB, duplicateName, duplicateName2, duplicateName3, duplicateName4, fooWow, getCallWithoutParametersAndResponse, nonAsciiæøåÆøÅöôêÊ字符串, type Options, patchApiVbyApiVersionNoTag, patchCallWithoutParametersAndResponse, postApiVbyApiVersionBody, postCallWithoutParametersAndResponse, putCallWithoutParametersAndResponse, serviceWithEmptyTag, testErrorCode, types } from '../sdk.gen';\nimport type { CallToTestOrderOfParamsData, CallWithDefaultOptionalParametersData, CallWithDefaultParametersData, CallWithDescriptionsData, CallWithDuplicateResponsesData, CallWithDuplicateResponsesError, CallWithDuplicateResponsesResponse, CallWithNoContentResponseData, CallWithParametersData, CallWithResponseAndNoContentResponseData, CallWithResponseAndNoContentResponseResponse, CallWithResponseData, CallWithResponseResponse, CallWithResponsesData, CallWithResponsesError, CallWithResponsesResponse, CallWithResultFromHeaderData, CallWithWeirdParameterNamesData, CollectionFormatData, ComplexTypesData, ComplexTypesResponse, DeleteCallWithoutParametersAndResponseData, DummyAData, DummyBData, DuplicateName2Data, DuplicateName3Data, DuplicateName4Data, DuplicateNameData, FooWowData, GetCallWithoutParametersAndResponseData, NonAsciiæøåÆøÅöôêÊ字符串Data, NonAsciiæøåÆøÅöôêÊ字符串Response, PatchApiVbyApiVersionNoTagData, PatchCallWithoutParametersAndResponseData, PostApiVbyApiVersionBodyData, PostApiVbyApiVersionBodyError, PostApiVbyApiVersionBodyResponse, PostCallWithoutParametersAndResponseData, PutCallWithoutParametersAndResponseData, ServiceWithEmptyTagData, TestErrorCodeData, TypesData, TypesResponse } from '../types.gen';\n\nexport type QueryKey<TOptions extends Options> = [\n    Pick<TOptions, 'baseURL' | 'body' | 'headers' | 'path' | 'query'> & {\n        _id: string;\n        _infinite?: boolean;\n        tags?: ReadonlyArray<string>;\n    }\n];\n\nconst createQueryKey = <TOptions extends Options>(id: string, options?: TOptions, infinite?: boolean, tags?: ReadonlyArray<string>): [\n    QueryKey<TOptions>[0]\n] => {\n    const params: QueryKey<TOptions>[0] = { _id: id, baseURL: options?.baseURL || (options?.client ?? client).getConfig().baseURL } as QueryKey<TOptions>[0];\n    if (infinite) {\n        params._infinite = infinite;\n    }\n    if (tags) {\n        params.tags = tags;\n    }\n    if (options?.body) {\n        params.body = options.body;\n    }\n    if (options?.headers) {\n        params.headers = options.headers;\n    }\n    if (options?.path) {\n        params.path = options.path;\n    }\n    if (options?.query) {\n        params.query = options.query;\n    }\n    return [params];\n};\n\nexport const serviceWithEmptyTagQueryKey = (options?: Options<ServiceWithEmptyTagData>) => createQueryKey('serviceWithEmptyTag', options);\n\nexport const serviceWithEmptyTagOptions = (options?: Options<ServiceWithEmptyTagData>) => queryOptions<unknown, AxiosError<DefaultError>, unknown, ReturnType<typeof serviceWithEmptyTagQueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await serviceWithEmptyTag({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: serviceWithEmptyTagQueryKey(options)\n});\n\nexport const patchApiVbyApiVersionNoTagMutation = (options?: Partial<Options<PatchApiVbyApiVersionNoTagData>>): MutationOptions<unknown, AxiosError<DefaultError>, Options<PatchApiVbyApiVersionNoTagData>> => {\n    const mutationOptions: MutationOptions<unknown, AxiosError<DefaultError>, Options<PatchApiVbyApiVersionNoTagData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await patchApiVbyApiVersionNoTag({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const fooWowMutation = (options?: Partial<Options<FooWowData>>): MutationOptions<unknown, AxiosError<DefaultError>, Options<FooWowData>> => {\n    const mutationOptions: MutationOptions<unknown, AxiosError<DefaultError>, Options<FooWowData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await fooWow({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const deleteCallWithoutParametersAndResponseMutation = (options?: Partial<Options<DeleteCallWithoutParametersAndResponseData>>): MutationOptions<unknown, AxiosError<DefaultError>, Options<DeleteCallWithoutParametersAndResponseData>> => {\n    const mutationOptions: MutationOptions<unknown, AxiosError<DefaultError>, Options<DeleteCallWithoutParametersAndResponseData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await deleteCallWithoutParametersAndResponse({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const getCallWithoutParametersAndResponseQueryKey = (options?: Options<GetCallWithoutParametersAndResponseData>) => createQueryKey('getCallWithoutParametersAndResponse', options);\n\nexport const getCallWithoutParametersAndResponseOptions = (options?: Options<GetCallWithoutParametersAndResponseData>) => queryOptions<unknown, AxiosError<DefaultError>, unknown, ReturnType<typeof getCallWithoutParametersAndResponseQueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await getCallWithoutParametersAndResponse({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: getCallWithoutParametersAndResponseQueryKey(options)\n});\n\nexport const patchCallWithoutParametersAndResponseMutation = (options?: Partial<Options<PatchCallWithoutParametersAndResponseData>>): MutationOptions<unknown, AxiosError<DefaultError>, Options<PatchCallWithoutParametersAndResponseData>> => {\n    const mutationOptions: MutationOptions<unknown, AxiosError<DefaultError>, Options<PatchCallWithoutParametersAndResponseData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await patchCallWithoutParametersAndResponse({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const postCallWithoutParametersAndResponseMutation = (options?: Partial<Options<PostCallWithoutParametersAndResponseData>>): MutationOptions<unknown, AxiosError<DefaultError>, Options<PostCallWithoutParametersAndResponseData>> => {\n    const mutationOptions: MutationOptions<unknown, AxiosError<DefaultError>, Options<PostCallWithoutParametersAndResponseData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await postCallWithoutParametersAndResponse({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const putCallWithoutParametersAndResponseMutation = (options?: Partial<Options<PutCallWithoutParametersAndResponseData>>): MutationOptions<unknown, AxiosError<DefaultError>, Options<PutCallWithoutParametersAndResponseData>> => {\n    const mutationOptions: MutationOptions<unknown, AxiosError<DefaultError>, Options<PutCallWithoutParametersAndResponseData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await putCallWithoutParametersAndResponse({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const callWithDescriptionsMutation = (options?: Partial<Options<CallWithDescriptionsData>>): MutationOptions<unknown, AxiosError<DefaultError>, Options<CallWithDescriptionsData>> => {\n    const mutationOptions: MutationOptions<unknown, AxiosError<DefaultError>, Options<CallWithDescriptionsData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await callWithDescriptions({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const callWithParametersMutation = (options?: Partial<Options<CallWithParametersData>>): MutationOptions<unknown, AxiosError<DefaultError>, Options<CallWithParametersData>> => {\n    const mutationOptions: MutationOptions<unknown, AxiosError<DefaultError>, Options<CallWithParametersData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await callWithParameters({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const callWithWeirdParameterNamesMutation = (options?: Partial<Options<CallWithWeirdParameterNamesData>>): MutationOptions<unknown, AxiosError<DefaultError>, Options<CallWithWeirdParameterNamesData>> => {\n    const mutationOptions: MutationOptions<unknown, AxiosError<DefaultError>, Options<CallWithWeirdParameterNamesData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await callWithWeirdParameterNames({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const callWithDefaultParametersQueryKey = (options: Options<CallWithDefaultParametersData>) => createQueryKey('callWithDefaultParameters', options);\n\nexport const callWithDefaultParametersOptions = (options: Options<CallWithDefaultParametersData>) => queryOptions<unknown, AxiosError<DefaultError>, unknown, ReturnType<typeof callWithDefaultParametersQueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await callWithDefaultParameters({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: callWithDefaultParametersQueryKey(options)\n});\n\nexport const callWithDefaultOptionalParametersMutation = (options?: Partial<Options<CallWithDefaultOptionalParametersData>>): MutationOptions<unknown, AxiosError<DefaultError>, Options<CallWithDefaultOptionalParametersData>> => {\n    const mutationOptions: MutationOptions<unknown, AxiosError<DefaultError>, Options<CallWithDefaultOptionalParametersData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await callWithDefaultOptionalParameters({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const callToTestOrderOfParamsMutation = (options?: Partial<Options<CallToTestOrderOfParamsData>>): MutationOptions<unknown, AxiosError<DefaultError>, Options<CallToTestOrderOfParamsData>> => {\n    const mutationOptions: MutationOptions<unknown, AxiosError<DefaultError>, Options<CallToTestOrderOfParamsData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await callToTestOrderOfParams({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const duplicateNameMutation = (options?: Partial<Options<DuplicateNameData>>): MutationOptions<unknown, AxiosError<DefaultError>, Options<DuplicateNameData>> => {\n    const mutationOptions: MutationOptions<unknown, AxiosError<DefaultError>, Options<DuplicateNameData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await duplicateName({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const duplicateName2QueryKey = (options?: Options<DuplicateName2Data>) => createQueryKey('duplicateName2', options);\n\nexport const duplicateName2Options = (options?: Options<DuplicateName2Data>) => queryOptions<unknown, AxiosError<DefaultError>, unknown, ReturnType<typeof duplicateName2QueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await duplicateName2({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: duplicateName2QueryKey(options)\n});\n\nexport const duplicateName3Mutation = (options?: Partial<Options<DuplicateName3Data>>): MutationOptions<unknown, AxiosError<DefaultError>, Options<DuplicateName3Data>> => {\n    const mutationOptions: MutationOptions<unknown, AxiosError<DefaultError>, Options<DuplicateName3Data>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await duplicateName3({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const duplicateName4Mutation = (options?: Partial<Options<DuplicateName4Data>>): MutationOptions<unknown, AxiosError<DefaultError>, Options<DuplicateName4Data>> => {\n    const mutationOptions: MutationOptions<unknown, AxiosError<DefaultError>, Options<DuplicateName4Data>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await duplicateName4({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const callWithNoContentResponseQueryKey = (options?: Options<CallWithNoContentResponseData>) => createQueryKey('callWithNoContentResponse', options);\n\nexport const callWithNoContentResponseOptions = (options?: Options<CallWithNoContentResponseData>) => queryOptions<unknown, AxiosError<DefaultError>, unknown, ReturnType<typeof callWithNoContentResponseQueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await callWithNoContentResponse({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: callWithNoContentResponseQueryKey(options)\n});\n\nexport const callWithResponseAndNoContentResponseQueryKey = (options?: Options<CallWithResponseAndNoContentResponseData>) => createQueryKey('callWithResponseAndNoContentResponse', options);\n\nexport const callWithResponseAndNoContentResponseOptions = (options?: Options<CallWithResponseAndNoContentResponseData>) => queryOptions<CallWithResponseAndNoContentResponseResponse, AxiosError<DefaultError>, CallWithResponseAndNoContentResponseResponse, ReturnType<typeof callWithResponseAndNoContentResponseQueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await callWithResponseAndNoContentResponse({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: callWithResponseAndNoContentResponseQueryKey(options)\n});\n\nexport const dummyAQueryKey = (options?: Options<DummyAData>) => createQueryKey('dummyA', options);\n\nexport const dummyAOptions = (options?: Options<DummyAData>) => queryOptions<unknown, AxiosError<DefaultError>, unknown, ReturnType<typeof dummyAQueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await dummyA({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: dummyAQueryKey(options)\n});\n\nexport const dummyBQueryKey = (options?: Options<DummyBData>) => createQueryKey('dummyB', options);\n\nexport const dummyBOptions = (options?: Options<DummyBData>) => queryOptions<unknown, AxiosError<DefaultError>, unknown, ReturnType<typeof dummyBQueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await dummyB({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: dummyBQueryKey(options)\n});\n\nexport const callWithResponseQueryKey = (options?: Options<CallWithResponseData>) => createQueryKey('callWithResponse', options);\n\nexport const callWithResponseOptions = (options?: Options<CallWithResponseData>) => queryOptions<CallWithResponseResponse, AxiosError<DefaultError>, CallWithResponseResponse, ReturnType<typeof callWithResponseQueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await callWithResponse({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: callWithResponseQueryKey(options)\n});\n\nexport const callWithDuplicateResponsesMutation = (options?: Partial<Options<CallWithDuplicateResponsesData>>): MutationOptions<CallWithDuplicateResponsesResponse, AxiosError<CallWithDuplicateResponsesError>, Options<CallWithDuplicateResponsesData>> => {\n    const mutationOptions: MutationOptions<CallWithDuplicateResponsesResponse, AxiosError<CallWithDuplicateResponsesError>, Options<CallWithDuplicateResponsesData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await callWithDuplicateResponses({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const callWithResponsesMutation = (options?: Partial<Options<CallWithResponsesData>>): MutationOptions<CallWithResponsesResponse, AxiosError<CallWithResponsesError>, Options<CallWithResponsesData>> => {\n    const mutationOptions: MutationOptions<CallWithResponsesResponse, AxiosError<CallWithResponsesError>, Options<CallWithResponsesData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await callWithResponses({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const collectionFormatQueryKey = (options: Options<CollectionFormatData>) => createQueryKey('collectionFormat', options);\n\nexport const collectionFormatOptions = (options: Options<CollectionFormatData>) => queryOptions<unknown, AxiosError<DefaultError>, unknown, ReturnType<typeof collectionFormatQueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await collectionFormat({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: collectionFormatQueryKey(options)\n});\n\nexport const typesQueryKey = (options: Options<TypesData>) => createQueryKey('types', options);\n\nexport const typesOptions = (options: Options<TypesData>) => queryOptions<TypesResponse, AxiosError<DefaultError>, TypesResponse, ReturnType<typeof typesQueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await types({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: typesQueryKey(options)\n});\n\nexport const complexTypesQueryKey = (options: Options<ComplexTypesData>) => createQueryKey('complexTypes', options);\n\nexport const complexTypesOptions = (options: Options<ComplexTypesData>) => queryOptions<ComplexTypesResponse, AxiosError<DefaultError>, ComplexTypesResponse, ReturnType<typeof complexTypesQueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await complexTypes({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: complexTypesQueryKey(options)\n});\n\nexport const callWithResultFromHeaderMutation = (options?: Partial<Options<CallWithResultFromHeaderData>>): MutationOptions<unknown, AxiosError<DefaultError>, Options<CallWithResultFromHeaderData>> => {\n    const mutationOptions: MutationOptions<unknown, AxiosError<DefaultError>, Options<CallWithResultFromHeaderData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await callWithResultFromHeader({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const testErrorCodeMutation = (options?: Partial<Options<TestErrorCodeData>>): MutationOptions<unknown, AxiosError<DefaultError>, Options<TestErrorCodeData>> => {\n    const mutationOptions: MutationOptions<unknown, AxiosError<DefaultError>, Options<TestErrorCodeData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await testErrorCode({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const nonAsciiæøåÆøÅöôêÊ字符串Mutation = (options?: Partial<Options<NonAsciiæøåÆøÅöôêÊ字符串Data>>): MutationOptions<NonAsciiæøåÆøÅöôêÊ字符串Response, AxiosError<DefaultError>, Options<NonAsciiæøåÆøÅöôêÊ字符串Data>> => {\n    const mutationOptions: MutationOptions<NonAsciiæøåÆøÅöôêÊ字符串Response, AxiosError<DefaultError>, Options<NonAsciiæøåÆøÅöôêÊ字符串Data>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await nonAsciiæøåÆøÅöôêÊ字符串({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\n/**\n * Body should not be unknown\n *\n * Body should not be unknown\n */\nexport const postApiVbyApiVersionBodyMutation = (options?: Partial<Options<PostApiVbyApiVersionBodyData>>): MutationOptions<PostApiVbyApiVersionBodyResponse, AxiosError<PostApiVbyApiVersionBodyError>, Options<PostApiVbyApiVersionBodyData>> => {\n    const mutationOptions: MutationOptions<PostApiVbyApiVersionBodyResponse, AxiosError<PostApiVbyApiVersionBodyError>, Options<PostApiVbyApiVersionBodyData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await postApiVbyApiVersionBody({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/angular-query-experimental/axios/client/client.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { AxiosError, AxiosInstance, RawAxiosRequestHeaders } from 'axios';\nimport axios from 'axios';\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 } from './types.gen';\nimport { buildUrl, createConfig, mergeConfigs, mergeHeaders, setAuthParams } from './utils.gen';\n\nexport const createClient = (config: Config = {}): Client => {\n  let _config = mergeConfigs(createConfig(), config);\n\n  let instance: AxiosInstance;\n\n  if (_config.axios && !('Axios' in _config.axios)) {\n    instance = _config.axios;\n  } else {\n    // eslint-disable-next-line @typescript-eslint/no-unused-vars\n    const { auth, ...configWithoutAuth } = _config;\n    instance = axios.create(configWithoutAuth);\n  }\n\n  const getConfig = (): Config => ({ ..._config });\n\n  const setConfig = (config: Config): Config => {\n    _config = mergeConfigs(_config, config);\n    instance.defaults = {\n      ...instance.defaults,\n      ..._config,\n      // @ts-expect-error\n      headers: mergeHeaders(instance.defaults.headers, _config.headers),\n    };\n    return getConfig();\n  };\n\n  const beforeRequest = async (options: RequestOptions) => {\n    const opts = {\n      ..._config,\n      ...options,\n      axios: options.axios ?? _config.axios ?? instance,\n      headers: mergeHeaders(_config.headers, options.headers),\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.body = opts.bodySerializer(opts.body);\n    }\n\n    const url = buildUrl(opts);\n\n    return { opts, url };\n  };\n\n  // @ts-expect-error\n  const request: Client['request'] = async (options) => {\n    // @ts-expect-error\n    const { opts, url } = await beforeRequest(options);\n    try {\n      // assign Axios here for consistency with fetch\n      const _axios = opts.axios!;\n      // eslint-disable-next-line @typescript-eslint/no-unused-vars\n      const { auth, ...optsWithoutAuth } = opts;\n      const response = await _axios({\n        ...optsWithoutAuth,\n        baseURL: '', // the baseURL is already included in `url`\n        data: getValidRequestBody(opts),\n        headers: opts.headers as RawAxiosRequestHeaders,\n        // let `paramsSerializer()` handle query params if it exists\n        params: opts.paramsSerializer ? opts.query : undefined,\n        url,\n      });\n\n      let { data } = response;\n\n      if (opts.responseType === '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 {\n        ...response,\n        data: data ?? {},\n      };\n    } catch (error) {\n      const e = error as AxiosError;\n      if (opts.throwOnError) {\n        throw e;\n      }\n      // @ts-expect-error\n      e.error = e.response?.data ?? {};\n      return e;\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 Record<string, string>,\n      method,\n      serializedBody: getValidRequestBody(opts) as BodyInit | null | undefined,\n      // @ts-expect-error\n      signal: opts.signal,\n      url,\n    });\n  };\n\n  const _buildUrl: Client['buildUrl'] = (options) =>\n    buildUrl({ axios: instance, ..._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    instance,\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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/angular-query-experimental/axios/client/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type { Auth } from '../core/auth.gen';\nexport type { QuerySerializerOptions } from '../core/bodySerializer.gen';\nexport {\n  formDataBodySerializer,\n  jsonBodySerializer,\n  urlSearchParamsBodySerializer,\n} from '../core/bodySerializer.gen';\nexport { buildClientParams } from '../core/params.gen';\nexport { serializeQueryKeyValue } from '../core/queryKeySerializer.gen';\nexport { createClient } from './client.gen';\nexport type {\n  Client,\n  ClientOptions,\n  Config,\n  CreateClientConfig,\n  Options,\n  RequestOptions,\n  RequestResult,\n  TDataShape,\n} from './types.gen';\nexport { createConfig } from './utils.gen';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/angular-query-experimental/axios/client/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type {\n  AxiosError,\n  AxiosInstance,\n  AxiosRequestHeaders,\n  AxiosResponse,\n  AxiosStatic,\n  CreateAxiosDefaults,\n} from 'axios';\n\nimport type { Auth } from '../core/auth.gen';\nimport type {\n  ServerSentEventsOptions,\n  ServerSentEventsResult,\n} from '../core/serverSentEvents.gen';\nimport type { Client as CoreClient, Config as CoreConfig } from '../core/types.gen';\n\nexport interface Config<T extends ClientOptions = ClientOptions>\n  extends Omit<CreateAxiosDefaults, 'auth' | 'baseURL' | 'headers' | 'method'>, CoreConfig {\n  /**\n   * Axios implementation. You can use this option to provide either an\n   * `AxiosStatic` or an `AxiosInstance`.\n   *\n   * @default axios\n   */\n  axios?: AxiosStatic | AxiosInstance;\n  /**\n   * Base URL for all requests made by this client.\n   */\n  baseURL?: T['baseURL'];\n  /**\n   * An object containing any HTTP headers that you want to pre-populate your\n   * `Headers` object with.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/Headers/Headers#init See more}\n   */\n  headers?:\n    | AxiosRequestHeaders\n    | Record<\n        string,\n        string | number | boolean | (string | number | boolean)[] | null | undefined | unknown\n      >;\n  /**\n   * Throw an error instead of returning it in the response?\n   *\n   * @default false\n   */\n  throwOnError?: T['throwOnError'];\n}\n\nexport interface RequestOptions<\n  TData = unknown,\n  ThrowOnError extends boolean = boolean,\n  Url extends string = string,\n>\n  extends\n    Config<{\n      throwOnError: ThrowOnError;\n    }>,\n    Pick<\n      ServerSentEventsOptions<TData>,\n      | 'onRequest'\n      | 'onSseError'\n      | 'onSseEvent'\n      | 'sseDefaultRetryDelay'\n      | 'sseMaxRetryAttempts'\n      | 'sseMaxRetryDelay'\n    > {\n  /**\n   * Any body that you want to add to your request.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/fetch#body}\n   */\n  body?: unknown;\n  path?: Record<string, unknown>;\n  query?: Record<string, unknown>;\n  /**\n   * Security mechanism(s) to use for the request.\n   */\n  security?: ReadonlyArray<Auth>;\n  url: Url;\n}\n\nexport interface ClientOptions {\n  baseURL?: string;\n  throwOnError?: boolean;\n}\n\nexport type RequestResult<\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = boolean,\n> = ThrowOnError extends true\n  ? Promise<AxiosResponse<TData extends Record<string, unknown> ? TData[keyof TData] : TData>>\n  : Promise<\n      | (AxiosResponse<TData extends Record<string, unknown> ? TData[keyof TData] : TData> & {\n          error: undefined;\n        })\n      | (AxiosError<TError extends Record<string, unknown> ? TError[keyof TError] : TError> & {\n          data: undefined;\n          error: TError extends Record<string, unknown> ? TError[keyof TError] : TError;\n        })\n    >;\n\ntype MethodFn = <TData = unknown, TError = unknown, ThrowOnError extends boolean = false>(\n  options: Omit<RequestOptions<TData, ThrowOnError>, 'method'>,\n) => RequestResult<TData, TError, ThrowOnError>;\n\ntype SseFn = <TData = unknown, TError = unknown, ThrowOnError extends boolean = false>(\n  options: Omit<RequestOptions<TData, ThrowOnError>, 'method'>,\n) => Promise<ServerSentEventsResult<TData, TError>>;\n\ntype RequestFn = <TData = unknown, TError = unknown, ThrowOnError extends boolean = false>(\n  options: Omit<RequestOptions<TData, ThrowOnError>, 'method'> &\n    Pick<Required<RequestOptions<TData, ThrowOnError>>, 'method'>,\n) => RequestResult<TData, TError, ThrowOnError>;\n\ntype BuildUrlFn = <\n  TData extends {\n    body?: unknown;\n    path?: Record<string, unknown>;\n    query?: Record<string, unknown>;\n    url: string;\n  },\n>(\n  options: TData & Options<TData>,\n) => string;\n\nexport type Client = CoreClient<RequestFn, Config, MethodFn, BuildUrlFn, SseFn> & {\n  instance: AxiosInstance;\n};\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 = ClientOptions> = (\n  override?: Config<ClientOptions & T>,\n) => Config<Required<ClientOptions> & T>;\n\nexport interface TDataShape {\n  body?: unknown;\n  headers?: unknown;\n  path?: unknown;\n  query?: unknown;\n  url: string;\n}\n\ntype OmitKeys<T, K> = Pick<T, Exclude<keyof T, K>>;\n\nexport type Options<\n  TData extends TDataShape = TDataShape,\n  ThrowOnError extends boolean = boolean,\n  TResponse = unknown,\n> = OmitKeys<RequestOptions<TResponse, ThrowOnError>, 'body' | 'path' | 'query' | 'url'> &\n  ([TData] extends [never] ? unknown : Omit<TData, 'url'>);\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/angular-query-experimental/axios/client/utils.gen.ts",
    "content": "// 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 {\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\nconst checkForExistence = (\n  options: Pick<RequestOptions, 'auth' | 'query'> & {\n    headers: Record<any, unknown>;\n  },\n  name?: string,\n): boolean => {\n  if (!name) {\n    return false;\n  }\n  if (name in options.headers || options.query?.[name]) {\n    return true;\n  }\n  if (\n    'Cookie' in options.headers &&\n    options.headers['Cookie'] &&\n    typeof options.headers['Cookie'] === 'string'\n  ) {\n    return options.headers['Cookie'].includes(`${name}=`);\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: Record<any, unknown>;\n  }) => {\n  for (const auth of security) {\n    if (checkForExistence(options, auth.name)) {\n      continue;\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        const value = `${name}=${token}`;\n        if ('Cookie' in options.headers && options.headers['Cookie']) {\n          options.headers['Cookie'] = `${options.headers['Cookie']}; ${value}`;\n        } else {\n          options.headers['Cookie'] = value;\n        }\n        break;\n      }\n      case 'header':\n      default:\n        options.headers[name] = token;\n        break;\n    }\n  }\n};\n\nexport const buildUrl: Client['buildUrl'] = (options) => {\n  const instanceBaseUrl = options.axios?.defaults?.baseURL;\n\n  const baseUrl =\n    !!options.baseURL && typeof options.baseURL === 'string' ? options.baseURL : instanceBaseUrl;\n\n  return getUrl({\n    baseUrl: baseUrl as string,\n    path: options.path,\n    // let `paramsSerializer()` handle query params if it exists\n    query: !options.paramsSerializer ? options.query : undefined,\n    querySerializer:\n      typeof options.querySerializer === 'function'\n        ? options.querySerializer\n        : createQuerySerializer(options.querySerializer),\n    url: options.url,\n  });\n};\n\nexport const mergeConfigs = (a: Config, b: Config): Config => {\n  const config = { ...a, ...b };\n  config.headers = mergeHeaders(a.headers, b.headers);\n  return config;\n};\n\n/**\n * Special Axios headers keywords allowing to set headers by request method.\n */\nexport const axiosHeadersKeywords = [\n  'common',\n  'delete',\n  'get',\n  'head',\n  'patch',\n  'post',\n  'put',\n] as const;\n\nexport const mergeHeaders = (\n  ...headers: Array<Required<Config>['headers'] | undefined>\n): Record<any, unknown> => {\n  const mergedHeaders: Record<any, unknown> = {};\n  for (const header of headers) {\n    if (!header || typeof header !== 'object') {\n      continue;\n    }\n\n    const iterator = Object.entries(header);\n\n    for (const [key, value] of iterator) {\n      if (\n        axiosHeadersKeywords.includes(key as (typeof axiosHeadersKeywords)[number]) &&\n        typeof value === 'object'\n      ) {\n        mergedHeaders[key] = {\n          ...(mergedHeaders[key] as Record<any, unknown>),\n          ...value,\n        };\n      } else if (value === null) {\n        delete mergedHeaders[key];\n      } else if (Array.isArray(value)) {\n        for (const v of value) {\n          // @ts-expect-error\n          mergedHeaders[key] = [...(mergedHeaders[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[key] = typeof value === 'object' ? JSON.stringify(value) : (value as string);\n      }\n    }\n  }\n  return mergedHeaders;\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  ...override,\n});\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/angular-query-experimental/axios/client.gen.ts",
    "content": "// 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: 'http://localhost:3000/base' }));\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/angular-query-experimental/axios/core/auth.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/angular-query-experimental/axios/core/bodySerializer.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/angular-query-experimental/axios/core/params.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/angular-query-experimental/axios/core/pathSerializer.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/angular-query-experimental/axios/core/queryKeySerializer.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\n/**\n * JSON-friendly union that mirrors what Pinia Colada can hash.\n */\nexport type JsonValue =\n  | null\n  | string\n  | number\n  | boolean\n  | JsonValue[]\n  | { [key: string]: JsonValue };\n\n/**\n * Replacer that converts non-JSON values (bigint, Date, etc.) to safe substitutes.\n */\nexport const queryKeyJsonReplacer = (_key: string, value: unknown) => {\n  if (value === undefined || typeof value === 'function' || typeof value === 'symbol') {\n    return undefined;\n  }\n  if (typeof value === 'bigint') {\n    return value.toString();\n  }\n  if (value instanceof Date) {\n    return value.toISOString();\n  }\n  return value;\n};\n\n/**\n * Safely stringifies a value and parses it back into a JsonValue.\n */\nexport const stringifyToJsonValue = (input: unknown): JsonValue | undefined => {\n  try {\n    const json = JSON.stringify(input, queryKeyJsonReplacer);\n    if (json === undefined) {\n      return undefined;\n    }\n    return JSON.parse(json) as JsonValue;\n  } catch {\n    return undefined;\n  }\n};\n\n/**\n * Detects plain objects (including objects with a null prototype).\n */\nconst isPlainObject = (value: unknown): value is Record<string, unknown> => {\n  if (value === null || typeof value !== 'object') {\n    return false;\n  }\n  const prototype = Object.getPrototypeOf(value as object);\n  return prototype === Object.prototype || prototype === null;\n};\n\n/**\n * Turns URLSearchParams into a sorted JSON object for deterministic keys.\n */\nconst serializeSearchParams = (params: URLSearchParams): JsonValue => {\n  const entries = Array.from(params.entries()).sort(([a], [b]) => a.localeCompare(b));\n  const result: Record<string, JsonValue> = {};\n\n  for (const [key, value] of entries) {\n    const existing = result[key];\n    if (existing === undefined) {\n      result[key] = value;\n      continue;\n    }\n\n    if (Array.isArray(existing)) {\n      (existing as string[]).push(value);\n    } else {\n      result[key] = [existing, value];\n    }\n  }\n\n  return result;\n};\n\n/**\n * Normalizes any accepted value into a JSON-friendly shape for query keys.\n */\nexport const serializeQueryKeyValue = (value: unknown): JsonValue | undefined => {\n  if (value === null) {\n    return null;\n  }\n\n  if (typeof value === 'string' || typeof value === 'number' || typeof value === 'boolean') {\n    return value;\n  }\n\n  if (value === undefined || typeof value === 'function' || typeof value === 'symbol') {\n    return undefined;\n  }\n\n  if (typeof value === 'bigint') {\n    return value.toString();\n  }\n\n  if (value instanceof Date) {\n    return value.toISOString();\n  }\n\n  if (Array.isArray(value)) {\n    return stringifyToJsonValue(value);\n  }\n\n  if (typeof URLSearchParams !== 'undefined' && value instanceof URLSearchParams) {\n    return serializeSearchParams(value);\n  }\n\n  if (isPlainObject(value)) {\n    return stringifyToJsonValue(value);\n  }\n\n  return undefined;\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/angular-query-experimental/axios/core/serverSentEvents.gen.ts",
    "content": "// 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 const 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            // Normalize line endings: CRLF -> LF, then CR -> LF\n            buffer = buffer.replace(/\\r\\n/g, '\\n').replace(/\\r/g, '\\n');\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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/angular-query-experimental/axios/core/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { Auth, AuthToken } from './auth.gen';\nimport type { BodySerializer, QuerySerializer, QuerySerializerOptions } from './bodySerializer.gen';\n\nexport type HttpMethod =\n  | 'connect'\n  | 'delete'\n  | 'get'\n  | 'head'\n  | 'options'\n  | 'patch'\n  | 'post'\n  | 'put'\n  | 'trace';\n\nexport type Client<\n  RequestFn = never,\n  Config = unknown,\n  MethodFn = never,\n  BuildUrlFn = never,\n  SseFn = never,\n> = {\n  /**\n   * Returns the final request URL.\n   */\n  buildUrl: BuildUrlFn;\n  getConfig: () => Config;\n  request: RequestFn;\n  setConfig: (config: Config) => Config;\n} & {\n  [K in HttpMethod]: MethodFn;\n} & ([SseFn] extends [never] ? { sse?: never } : { sse: { [K in HttpMethod]: SseFn } });\n\nexport interface Config {\n  /**\n   * Auth token or a function returning auth token. The resolved value will be\n   * added to the request payload as defined by its `security` array.\n   */\n  auth?: ((auth: Auth) => Promise<AuthToken> | AuthToken) | AuthToken;\n  /**\n   * A function for serializing request body parameter. By default,\n   * {@link JSON.stringify()} will be used.\n   */\n  bodySerializer?: BodySerializer | null;\n  /**\n   * An object containing any HTTP headers that you want to pre-populate your\n   * `Headers` object with.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/Headers/Headers#init See more}\n   */\n  headers?:\n    | RequestInit['headers']\n    | Record<\n        string,\n        string | number | boolean | (string | number | boolean)[] | null | undefined | unknown\n      >;\n  /**\n   * The request method.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/fetch#method See more}\n   */\n  method?: Uppercase<HttpMethod>;\n  /**\n   * A function for serializing request query parameters. By default, arrays\n   * will be exploded in form style, objects will be exploded in deepObject\n   * style, and reserved characters are percent-encoded.\n   *\n   * This method will have no effect if the native `paramsSerializer()` Axios\n   * API function is used.\n   *\n   * {@link https://swagger.io/docs/specification/serialization/#query View examples}\n   */\n  querySerializer?: QuerySerializer | QuerySerializerOptions;\n  /**\n   * A function validating request data. This is useful if you want to ensure\n   * the request conforms to the desired shape, so it can be safely sent to\n   * the server.\n   */\n  requestValidator?: (data: unknown) => Promise<unknown>;\n  /**\n   * A function transforming response data before it's returned. This is useful\n   * for post-processing data, e.g. converting ISO strings into Date objects.\n   */\n  responseTransformer?: (data: unknown) => Promise<unknown>;\n  /**\n   * A function validating response data. This is useful if you want to ensure\n   * the response conforms to the desired shape, so it can be safely passed to\n   * the transformers and returned to the user.\n   */\n  responseValidator?: (data: unknown) => Promise<unknown>;\n}\n\ntype IsExactlyNeverOrNeverUndefined<T> = [T] extends [never]\n  ? true\n  : [T] extends [never | undefined]\n    ? [undefined] extends [T]\n      ? false\n      : true\n    : false;\n\nexport type OmitNever<T extends Record<string, unknown>> = {\n  [K in keyof T as IsExactlyNeverOrNeverUndefined<T[K]> extends true ? never : K]: T[K];\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/angular-query-experimental/axios/core/utils.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/angular-query-experimental/axios/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport { callToTestOrderOfParams, callWithDefaultOptionalParameters, callWithDefaultParameters, callWithDescriptions, callWithDuplicateResponses, callWithNoContentResponse, callWithParameters, callWithResponse, callWithResponseAndNoContentResponse, callWithResponses, callWithResultFromHeader, callWithWeirdParameterNames, collectionFormat, complexTypes, deleteCallWithoutParametersAndResponse, dummyA, dummyB, duplicateName, duplicateName2, duplicateName3, duplicateName4, fooWow, getCallWithoutParametersAndResponse, headCallWithoutParametersAndResponse, nonAsciiæøåÆøÅöôêÊ字符串, type Options, optionsCallWithoutParametersAndResponse, patchApiVbyApiVersionNoTag, patchCallWithoutParametersAndResponse, postApiVbyApiVersionBody, postCallWithoutParametersAndResponse, putCallWithoutParametersAndResponse, serviceWithEmptyTag, testErrorCode, types } from './sdk.gen';\nexport type { ArrayWithArray, ArrayWithBooleans, ArrayWithNumbers, ArrayWithProperties, ArrayWithReferences, ArrayWithStrings, CallToTestOrderOfParamsData, CallWithDefaultOptionalParametersData, CallWithDefaultParametersData, CallWithDescriptionsData, CallWithDuplicateResponsesData, CallWithDuplicateResponsesError, CallWithDuplicateResponsesErrors, CallWithDuplicateResponsesResponse, CallWithDuplicateResponsesResponses, CallWithNoContentResponseData, CallWithNoContentResponseResponses, CallWithParametersData, CallWithResponseAndNoContentResponseData, CallWithResponseAndNoContentResponseResponse, CallWithResponseAndNoContentResponseResponses, CallWithResponseData, CallWithResponseResponse, CallWithResponseResponses, CallWithResponsesData, CallWithResponsesError, CallWithResponsesErrors, CallWithResponsesResponse, CallWithResponsesResponses, CallWithResultFromHeaderData, CallWithResultFromHeaderErrors, CallWithResultFromHeaderResponses, CallWithWeirdParameterNamesData, ClientOptions, CollectionFormatData, CommentWithBackticks, CommentWithBackticksAndQuotes, CommentWithBreaks, CommentWithExpressionPlaceholders, CommentWithQuotes, CommentWithReservedCharacters, CommentWithSlashes, ComplexTypesData, ComplexTypesErrors, ComplexTypesResponse, ComplexTypesResponses, Date, Default, DeleteCallWithoutParametersAndResponseData, DictionaryWithArray, DictionaryWithDictionary, DictionaryWithProperties, DictionaryWithReference, DictionaryWithString, DummyAData, DummyAResponses, DummyBData, DummyBResponses, DuplicateName2Data, DuplicateName3Data, DuplicateName4Data, DuplicateNameData, EnumFromDescription, EnumWithExtensions, EnumWithNumbers, EnumWithStrings, ExternalRefA, ExternalRefB, ExternalSharedModel, FailureFailure, FooWowData, FooWowResponses, GetCallWithoutParametersAndResponseData, HeadCallWithoutParametersAndResponseData, ModelThatExtends, ModelThatExtendsExtends, ModelWithArray, ModelWithBoolean, ModelWithCircularReference, ModelWithDictionary, ModelWithDuplicateImports, ModelWithDuplicateProperties, ModelWithEnum, ModelWithEnumFromDescription, ModelWithInteger, ModelWithNestedEnums, ModelWithNestedProperties, ModelWithNullableString, ModelWithOrderedProperties, ModelWithPattern, ModelWithPatternWritable, ModelWithProperties, ModelWithPropertiesWritable, ModelWithReference, ModelWithReferenceWritable, ModelWithString, ModelWithStringError, NonAsciiæøåÆøÅöôêÊ字符串Data, NonAsciiæøåÆøÅöôêÊ字符串Response, NonAsciiæøåÆøÅöôêÊ字符串Responses, NonAsciiStringæøåÆøÅöôêÊ字符串, OptionsCallWithoutParametersAndResponseData, ParameterActivityParams, PatchApiVbyApiVersionNoTagData, PatchApiVbyApiVersionNoTagResponses, PatchCallWithoutParametersAndResponseData, PostApiVbyApiVersionBodyData, PostApiVbyApiVersionBodyError, PostApiVbyApiVersionBodyErrors, PostApiVbyApiVersionBodyResponse, PostApiVbyApiVersionBodyResponses, PostCallWithoutParametersAndResponseData, PutCallWithoutParametersAndResponseData, ResponsePostActivityResponse, ServiceWithEmptyTagData, SimpleBoolean, SimpleFile, SimpleInteger, SimpleReference, SimpleString, SimpleStringWithPattern, TestErrorCodeData, TestErrorCodeErrors, TestErrorCodeResponses, TypesData, TypesResponse, TypesResponses } from './types.gen';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/angular-query-experimental/axios/sdk.gen.ts",
    "content": "// 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 { CallToTestOrderOfParamsData, CallWithDefaultOptionalParametersData, CallWithDefaultParametersData, CallWithDescriptionsData, CallWithDuplicateResponsesData, CallWithDuplicateResponsesErrors, CallWithDuplicateResponsesResponses, CallWithNoContentResponseData, CallWithNoContentResponseResponses, CallWithParametersData, CallWithResponseAndNoContentResponseData, CallWithResponseAndNoContentResponseResponses, CallWithResponseData, CallWithResponseResponses, CallWithResponsesData, CallWithResponsesErrors, CallWithResponsesResponses, CallWithResultFromHeaderData, CallWithResultFromHeaderErrors, CallWithResultFromHeaderResponses, CallWithWeirdParameterNamesData, CollectionFormatData, ComplexTypesData, ComplexTypesErrors, ComplexTypesResponses, DeleteCallWithoutParametersAndResponseData, DummyAData, DummyAResponses, DummyBData, DummyBResponses, DuplicateName2Data, DuplicateName3Data, DuplicateName4Data, DuplicateNameData, FooWowData, FooWowResponses, GetCallWithoutParametersAndResponseData, HeadCallWithoutParametersAndResponseData, NonAsciiæøåÆøÅöôêÊ字符串Data, NonAsciiæøåÆøÅöôêÊ字符串Responses, OptionsCallWithoutParametersAndResponseData, PatchApiVbyApiVersionNoTagData, PatchApiVbyApiVersionNoTagResponses, PatchCallWithoutParametersAndResponseData, PostApiVbyApiVersionBodyData, PostApiVbyApiVersionBodyErrors, PostApiVbyApiVersionBodyResponses, PostCallWithoutParametersAndResponseData, PutCallWithoutParametersAndResponseData, ServiceWithEmptyTagData, TestErrorCodeData, TestErrorCodeErrors, TestErrorCodeResponses, TypesData, TypesResponses } from './types.gen';\n\nexport type Options<TData extends TDataShape = TDataShape, ThrowOnError extends boolean = boolean> = Options2<TData, ThrowOnError> & {\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\nexport const serviceWithEmptyTag = <ThrowOnError extends boolean = false>(options?: Options<ServiceWithEmptyTagData, ThrowOnError>) => (options?.client ?? client).get<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/no+tag', ...options });\n\nexport const patchApiVbyApiVersionNoTag = <ThrowOnError extends boolean = false>(options?: Options<PatchApiVbyApiVersionNoTagData, ThrowOnError>) => (options?.client ?? client).patch<PatchApiVbyApiVersionNoTagResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/no+tag', ...options });\n\nexport const fooWow = <ThrowOnError extends boolean = false>(options?: Options<FooWowData, ThrowOnError>) => (options?.client ?? client).put<FooWowResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/no+tag', ...options });\n\nexport const deleteCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<DeleteCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).delete<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const getCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<GetCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).get<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const headCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<HeadCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).head<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const optionsCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<OptionsCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).options<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const patchCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<PatchCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).patch<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const postCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<PostCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).post<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const putCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<PutCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).put<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const callWithDescriptions = <ThrowOnError extends boolean = false>(options?: Options<CallWithDescriptionsData, ThrowOnError>) => (options?.client ?? client).post<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/descriptions/', ...options });\n\nexport const callWithParameters = <ThrowOnError extends boolean = false>(options: Options<CallWithParametersData, ThrowOnError>) => (options.client ?? client).post<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/parameters/{parameterPath}', ...options });\n\nexport const callWithWeirdParameterNames = <ThrowOnError extends boolean = false>(options: Options<CallWithWeirdParameterNamesData, ThrowOnError>) => (options.client ?? client).post<unknown, unknown, ThrowOnError>({\n    url: '/api/v{api-version}/parameters/{parameter.path.1}/{parameter-path-2}/{PARAMETER-PATH-3}',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options.headers\n    }\n});\n\nexport const callWithDefaultParameters = <ThrowOnError extends boolean = false>(options: Options<CallWithDefaultParametersData, ThrowOnError>) => (options.client ?? client).get<unknown, unknown, ThrowOnError>({\n    querySerializer: { parameters: { parameterModel: { object: { explode: false, style: 'form' } } } },\n    url: '/api/v{api-version}/defaults',\n    ...options\n});\n\nexport const callWithDefaultOptionalParameters = <ThrowOnError extends boolean = false>(options?: Options<CallWithDefaultOptionalParametersData, ThrowOnError>) => (options?.client ?? client).post<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/defaults', ...options });\n\nexport const callToTestOrderOfParams = <ThrowOnError extends boolean = false>(options: Options<CallToTestOrderOfParamsData, ThrowOnError>) => (options.client ?? client).put<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/defaults', ...options });\n\nexport const duplicateName = <ThrowOnError extends boolean = false>(options?: Options<DuplicateNameData, ThrowOnError>) => (options?.client ?? client).delete<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/duplicate', ...options });\n\nexport const duplicateName2 = <ThrowOnError extends boolean = false>(options?: Options<DuplicateName2Data, ThrowOnError>) => (options?.client ?? client).get<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/duplicate', ...options });\n\nexport const duplicateName3 = <ThrowOnError extends boolean = false>(options?: Options<DuplicateName3Data, ThrowOnError>) => (options?.client ?? client).post<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/duplicate', ...options });\n\nexport const duplicateName4 = <ThrowOnError extends boolean = false>(options?: Options<DuplicateName4Data, ThrowOnError>) => (options?.client ?? client).put<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/duplicate', ...options });\n\nexport const callWithNoContentResponse = <ThrowOnError extends boolean = false>(options?: Options<CallWithNoContentResponseData, ThrowOnError>) => (options?.client ?? client).get<CallWithNoContentResponseResponses, unknown, ThrowOnError>({\n    responseType: 'json',\n    url: '/api/v{api-version}/no-content',\n    ...options\n});\n\nexport const callWithResponseAndNoContentResponse = <ThrowOnError extends boolean = false>(options?: Options<CallWithResponseAndNoContentResponseData, ThrowOnError>) => (options?.client ?? client).get<CallWithResponseAndNoContentResponseResponses, unknown, ThrowOnError>({\n    responseType: 'json',\n    url: '/api/v{api-version}/multiple-tags/response-and-no-content',\n    ...options\n});\n\nexport const dummyA = <ThrowOnError extends boolean = false>(options?: Options<DummyAData, ThrowOnError>) => (options?.client ?? client).get<DummyAResponses, unknown, ThrowOnError>({\n    responseType: 'json',\n    url: '/api/v{api-version}/multiple-tags/a',\n    ...options\n});\n\nexport const dummyB = <ThrowOnError extends boolean = false>(options?: Options<DummyBData, ThrowOnError>) => (options?.client ?? client).get<DummyBResponses, unknown, ThrowOnError>({\n    responseType: 'json',\n    url: '/api/v{api-version}/multiple-tags/b',\n    ...options\n});\n\nexport const callWithResponse = <ThrowOnError extends boolean = false>(options?: Options<CallWithResponseData, ThrowOnError>) => (options?.client ?? client).get<CallWithResponseResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/response', ...options });\n\nexport const callWithDuplicateResponses = <ThrowOnError extends boolean = false>(options?: Options<CallWithDuplicateResponsesData, ThrowOnError>) => (options?.client ?? client).post<CallWithDuplicateResponsesResponses, CallWithDuplicateResponsesErrors, ThrowOnError>({\n    responseType: 'json',\n    url: '/api/v{api-version}/response',\n    ...options\n});\n\nexport const callWithResponses = <ThrowOnError extends boolean = false>(options?: Options<CallWithResponsesData, ThrowOnError>) => (options?.client ?? client).put<CallWithResponsesResponses, CallWithResponsesErrors, ThrowOnError>({\n    responseType: 'json',\n    url: '/api/v{api-version}/response',\n    ...options\n});\n\nexport const collectionFormat = <ThrowOnError extends boolean = false>(options: Options<CollectionFormatData, ThrowOnError>) => (options.client ?? client).get<unknown, unknown, ThrowOnError>({\n    querySerializer: { parameters: {\n            parameterArrayCSV: { array: { explode: false } },\n            parameterArraySSV: { array: { explode: false } },\n            parameterArrayTSV: { array: { explode: false } },\n            parameterArrayPipes: { array: { explode: false } }\n        } },\n    url: '/api/v{api-version}/collectionFormat',\n    ...options\n});\n\nexport const types = <ThrowOnError extends boolean = false>(options: Options<TypesData, ThrowOnError>) => (options.client ?? client).get<TypesResponses, unknown, ThrowOnError>({\n    querySerializer: { parameters: { parameterArray: { array: { explode: false } }, parameterDictionary: { object: { explode: false, style: 'form' } } } },\n    responseType: 'json',\n    url: '/api/v{api-version}/types',\n    ...options\n});\n\nexport const complexTypes = <ThrowOnError extends boolean = false>(options: Options<ComplexTypesData, ThrowOnError>) => (options.client ?? client).get<ComplexTypesResponses, ComplexTypesErrors, ThrowOnError>({\n    querySerializer: { parameters: { parameterObject: { object: { explode: false, style: 'form' } }, parameterReference: { object: { explode: false, style: 'form' } } } },\n    responseType: 'json',\n    url: '/api/v{api-version}/complex',\n    ...options\n});\n\nexport const callWithResultFromHeader = <ThrowOnError extends boolean = false>(options?: Options<CallWithResultFromHeaderData, ThrowOnError>) => (options?.client ?? client).post<CallWithResultFromHeaderResponses, CallWithResultFromHeaderErrors, ThrowOnError>({\n    responseType: 'json',\n    url: '/api/v{api-version}/header',\n    ...options\n});\n\nexport const testErrorCode = <ThrowOnError extends boolean = false>(options: Options<TestErrorCodeData, ThrowOnError>) => (options.client ?? client).post<TestErrorCodeResponses, TestErrorCodeErrors, ThrowOnError>({\n    responseType: 'json',\n    url: '/api/v{api-version}/error',\n    ...options\n});\n\nexport const nonAsciiæøåÆøÅöôêÊ字符串 = <ThrowOnError extends boolean = false>(options: Options<NonAsciiæøåÆøÅöôêÊ字符串Data, ThrowOnError>) => (options.client ?? client).post<NonAsciiæøåÆøÅöôêÊ字符串Responses, unknown, ThrowOnError>({\n    responseType: 'json',\n    url: '/api/v{api-version}/non-ascii-æøåÆØÅöôêÊ字符串',\n    ...options\n});\n\n/**\n * Body should not be unknown\n *\n * Body should not be unknown\n */\nexport const postApiVbyApiVersionBody = <ThrowOnError extends boolean = false>(options: Options<PostApiVbyApiVersionBodyData, ThrowOnError>) => (options.client ?? client).post<PostApiVbyApiVersionBodyResponses, PostApiVbyApiVersionBodyErrors, ThrowOnError>({\n    responseType: 'json',\n    url: '/api/v{api-version}/body',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options.headers\n    }\n});\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/angular-query-experimental/axios/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type ClientOptions = {\n    baseURL: 'http://localhost:3000/base' | (string & {});\n};\n\nexport type ExternalRefA = ExternalSharedModel;\n\nexport type ExternalRefB = ExternalSharedModel;\n\n/**\n * Testing multiline comments in string: First line\n * Second line\n *\n * Fourth line\n */\nexport type CommentWithBreaks = number;\n\n/**\n * Testing backticks in string: `backticks` and ```multiple backticks``` should work\n */\nexport type CommentWithBackticks = number;\n\n/**\n * Testing backticks and quotes in string: `backticks`, 'quotes', \"double quotes\" and ```multiple backticks``` should work\n */\nexport type CommentWithBackticksAndQuotes = number;\n\n/**\n * Testing slashes in string: \\backwards\\\\\\ and /forwards/// should work\n */\nexport type CommentWithSlashes = number;\n\n/**\n * Testing expression placeholders in string: ${expression} should work\n */\nexport type CommentWithExpressionPlaceholders = number;\n\n/**\n * Testing quotes in string: 'single quote''' and \"double quotes\"\"\" should work\n */\nexport type CommentWithQuotes = number;\n\n/**\n * Testing reserved characters in string: * inline * and ** inline ** should work\n */\nexport type CommentWithReservedCharacters = number;\n\n/**\n * This is a simple number\n */\nexport type SimpleInteger = number;\n\n/**\n * This is a simple boolean\n */\nexport type SimpleBoolean = boolean;\n\n/**\n * This is a simple string\n */\nexport type SimpleString = string;\n\n/**\n * A string with non-ascii (unicode) characters valid in typescript identifiers (æøåÆØÅöÔèÈ字符串)\n */\nexport type NonAsciiStringæøåÆøÅöôêÊ字符串 = string;\n\n/**\n * This is a simple file\n */\nexport type SimpleFile = Blob | File;\n\nexport type SimpleReference = ModelWithString;\n\n/**\n * This is a simple string\n */\nexport type SimpleStringWithPattern = string;\n\n/**\n * This is a simple enum with strings\n */\nexport type EnumWithStrings = 'Success' | 'Warning' | 'Error' | '\\'Single Quote\\'' | '\"Double Quotes\"' | 'Non-ascii: øæåôöØÆÅÔÖ字符串';\n\n/**\n * This is a simple enum with numbers\n */\nexport type EnumWithNumbers = 1 | 2 | 3 | 1.1 | 1.2 | 1.3 | 100 | 200 | 300 | -100 | -200 | -300 | -1.1 | -1.2 | -1.3;\n\n/**\n * Success=1,Warning=2,Error=3\n */\nexport type EnumFromDescription = number;\n\n/**\n * This is a simple enum with numbers\n */\nexport type EnumWithExtensions = 200 | 400 | 500;\n\n/**\n * This is a simple array with numbers\n */\nexport type ArrayWithNumbers = Array<number>;\n\n/**\n * This is a simple array with booleans\n */\nexport type ArrayWithBooleans = Array<boolean>;\n\n/**\n * This is a simple array with strings\n */\nexport type ArrayWithStrings = Array<string>;\n\n/**\n * This is a simple array with references\n */\nexport type ArrayWithReferences = Array<ModelWithString>;\n\n/**\n * This is a simple array containing an array\n */\nexport type ArrayWithArray = Array<Array<ModelWithString>>;\n\n/**\n * This is a simple array with properties\n */\nexport type ArrayWithProperties = Array<{\n    foo?: string;\n    bar?: string;\n}>;\n\n/**\n * This is a string dictionary\n */\nexport type DictionaryWithString = {\n    [key: string]: string;\n};\n\n/**\n * This is a string reference\n */\nexport type DictionaryWithReference = {\n    [key: string]: ModelWithString;\n};\n\n/**\n * This is a complex dictionary\n */\nexport type DictionaryWithArray = {\n    [key: string]: Array<ModelWithString>;\n};\n\n/**\n * This is a string dictionary\n */\nexport type DictionaryWithDictionary = {\n    [key: string]: {\n        [key: string]: string;\n    };\n};\n\n/**\n * This is a complex dictionary\n */\nexport type DictionaryWithProperties = {\n    [key: string]: {\n        foo?: string;\n        bar?: string;\n    };\n};\n\n/**\n * This is a type-only model that defines Date as a string\n */\nexport type Date = string;\n\n/**\n * This is a model with one number property\n */\nexport type ModelWithInteger = {\n    /**\n     * This is a simple number property\n     */\n    prop?: number;\n};\n\n/**\n * This is a model with one boolean property\n */\nexport type ModelWithBoolean = {\n    /**\n     * This is a simple boolean property\n     */\n    prop?: boolean;\n};\n\n/**\n * This is a model with one string property\n */\nexport type ModelWithString = {\n    /**\n     * This is a simple string property\n     */\n    prop?: string;\n};\n\n/**\n * This is a model with one string property\n */\nexport type ModelWithStringError = {\n    /**\n     * This is a simple string property\n     */\n    prop?: string;\n};\n\n/**\n * This is a model with one string property\n */\nexport type ModelWithNullableString = {\n    /**\n     * This is a simple string property\n     */\n    nullableProp?: string | null;\n    /**\n     * This is a simple string property\n     */\n    nullableRequiredProp: string | null;\n};\n\n/**\n * This is a model with one enum\n */\nexport type ModelWithEnum = {\n    /**\n     * This is a simple enum with strings\n     */\n    test?: 'Success' | 'Warning' | 'Error' | 'ØÆÅ字符串';\n    /**\n     * These are the HTTP error code enums\n     */\n    statusCode?: '100' | '200 FOO' | '300 FOO_BAR' | '400 foo-bar' | '500 foo.bar' | '600 foo&bar';\n    /**\n     * Simple boolean enum\n     */\n    bool?: true;\n};\n\n/**\n * This is a model with one enum\n */\nexport type ModelWithEnumFromDescription = {\n    /**\n     * Success=1,Warning=2,Error=3\n     */\n    test?: number;\n};\n\n/**\n * This is a model with nested enums\n */\nexport type ModelWithNestedEnums = {\n    dictionaryWithEnum?: {\n        [key: string]: 'Success' | 'Warning' | 'Error';\n    };\n    dictionaryWithEnumFromDescription?: {\n        [key: string]: number;\n    };\n    arrayWithEnum?: Array<'Success' | 'Warning' | 'Error'>;\n    arrayWithDescription?: Array<number>;\n};\n\n/**\n * This is a model with one property containing a reference\n */\nexport type ModelWithReference = {\n    prop?: ModelWithProperties;\n};\n\n/**\n * This is a model with one property containing an array\n */\nexport type ModelWithArray = {\n    prop?: Array<ModelWithString>;\n    propWithFile?: Array<Blob | File>;\n    propWithNumber?: Array<number>;\n};\n\n/**\n * This is a model with one property containing a dictionary\n */\nexport type ModelWithDictionary = {\n    prop?: {\n        [key: string]: string;\n    };\n};\n\n/**\n * This is a model with one property containing a circular reference\n */\nexport type ModelWithCircularReference = {\n    prop?: ModelWithCircularReference;\n};\n\n/**\n * This is a model with one nested property\n */\nexport type ModelWithProperties = {\n    required: string;\n    readonly requiredAndReadOnly: string;\n    string?: string;\n    number?: number;\n    boolean?: boolean;\n    reference?: ModelWithString;\n    'property with space'?: string;\n    default?: string;\n    try?: string;\n    readonly '@namespace.string'?: string;\n    readonly '@namespace.integer'?: number;\n};\n\n/**\n * This is a model with one nested property\n */\nexport type ModelWithNestedProperties = {\n    readonly first: {\n        readonly second: {\n            readonly third: string;\n        };\n    };\n};\n\n/**\n * This is a model with duplicated properties\n */\nexport type ModelWithDuplicateProperties = {\n    prop?: ModelWithString;\n};\n\n/**\n * This is a model with ordered properties\n */\nexport type ModelWithOrderedProperties = {\n    zebra?: string;\n    apple?: string;\n    hawaii?: string;\n};\n\n/**\n * This is a model with duplicated imports\n */\nexport type ModelWithDuplicateImports = {\n    propA?: ModelWithString;\n    propB?: ModelWithString;\n    propC?: ModelWithString;\n};\n\n/**\n * This is a model that extends another model\n */\nexport type ModelThatExtends = ModelWithString & {\n    propExtendsA?: string;\n    propExtendsB?: ModelWithString;\n};\n\n/**\n * This is a model that extends another model\n */\nexport type ModelThatExtendsExtends = ModelWithString & ModelThatExtends & {\n    propExtendsC?: string;\n    propExtendsD?: ModelWithString;\n};\n\nexport type Default = {\n    name?: string;\n};\n\n/**\n * This is a model that contains a some patterns\n */\nexport type ModelWithPattern = {\n    key: string;\n    name: string;\n    readonly enabled?: boolean;\n    readonly modified?: string;\n    id?: string;\n    text?: string;\n    patternWithSingleQuotes?: string;\n    patternWithNewline?: string;\n    patternWithBacktick?: string;\n    patternWithUnicode?: string;\n};\n\nexport type ParameterActivityParams = {\n    description?: string;\n    graduate_id?: number;\n    organization_id?: number;\n    parent_activity?: number;\n    post_id?: number;\n};\n\nexport type ResponsePostActivityResponse = {\n    description?: string;\n    graduate_id?: number;\n    organization_id?: number;\n    parent_activity_id?: number;\n    post_id?: number;\n};\n\nexport type FailureFailure = {\n    error?: string;\n    message?: string;\n    reference_code?: string;\n};\n\nexport type ExternalSharedModel = {\n    id: string;\n    name?: string;\n};\n\n/**\n * This is a model with one property containing a reference\n */\nexport type ModelWithReferenceWritable = {\n    prop?: ModelWithPropertiesWritable;\n};\n\n/**\n * This is a model with one nested property\n */\nexport type ModelWithPropertiesWritable = {\n    required: string;\n    string?: string;\n    number?: number;\n    boolean?: boolean;\n    reference?: ModelWithString;\n    'property with space'?: string;\n    default?: string;\n    try?: string;\n};\n\n/**\n * This is a model that contains a some patterns\n */\nexport type ModelWithPatternWritable = {\n    key: string;\n    name: string;\n    id?: string;\n    text?: string;\n    patternWithSingleQuotes?: string;\n    patternWithNewline?: string;\n    patternWithBacktick?: string;\n    patternWithUnicode?: string;\n};\n\nexport type ServiceWithEmptyTagData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no+tag';\n};\n\nexport type PatchApiVbyApiVersionNoTagData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no+tag';\n};\n\nexport type PatchApiVbyApiVersionNoTagResponses = {\n    /**\n     * OK\n     */\n    default: unknown;\n};\n\nexport type FooWowData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no+tag';\n};\n\nexport type FooWowResponses = {\n    /**\n     * OK\n     */\n    default: unknown;\n};\n\nexport type DeleteCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type GetCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type HeadCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type OptionsCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type PatchCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type PostCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type PutCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type CallWithDescriptionsData = {\n    body?: never;\n    path?: never;\n    query?: {\n        /**\n         * Testing multiline comments in string: First line\n         * Second line\n         *\n         * Fourth line\n         */\n        parameterWithBreaks?: string;\n        /**\n         * Testing backticks in string: `backticks` and ```multiple backticks``` should work\n         */\n        parameterWithBackticks?: string;\n        /**\n         * Testing slashes in string: \\backwards\\\\\\ and /forwards/// should work\n         */\n        parameterWithSlashes?: string;\n        /**\n         * Testing expression placeholders in string: ${expression} should work\n         */\n        parameterWithExpressionPlaceholders?: string;\n        /**\n         * Testing quotes in string: 'single quote''' and \"double quotes\"\"\" should work\n         */\n        parameterWithQuotes?: string;\n        /**\n         * Testing reserved characters in string: * inline * and ** inline ** should work\n         */\n        parameterWithReservedCharacters?: string;\n    };\n    url: '/api/v{api-version}/descriptions/';\n};\n\nexport type CallWithParametersData = {\n    body?: never;\n    headers: {\n        /**\n         * This is the parameter that goes into the header\n         */\n        parameterHeader: string;\n    };\n    path: {\n        /**\n         * This is the parameter that goes into the path\n         */\n        parameterPath: string;\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string;\n    };\n    query: {\n        /**\n         * This is the parameter that goes into the query params\n         */\n        parameterQuery: string;\n    };\n    url: '/api/v{api-version}/parameters/{parameterPath}';\n};\n\nexport type CallWithWeirdParameterNamesData = {\n    /**\n     * This is the parameter that is sent as request body\n     */\n    body: string;\n    headers: {\n        /**\n         * This is the parameter that goes into the request header\n         */\n        'parameter.header': string;\n    };\n    path: {\n        /**\n         * This is the parameter that goes into the path\n         */\n        'parameter.path.1'?: string;\n        /**\n         * This is the parameter that goes into the path\n         */\n        'parameter-path-2'?: string;\n        /**\n         * This is the parameter that goes into the path\n         */\n        'PARAMETER-PATH-3'?: string;\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string;\n    };\n    query: {\n        /**\n         * This is the parameter with a reserved keyword\n         */\n        default?: string;\n        /**\n         * This is the parameter that goes into the request query params\n         */\n        'parameter-query': string;\n    };\n    url: '/api/v{api-version}/parameters/{parameter.path.1}/{parameter-path-2}/{PARAMETER-PATH-3}';\n};\n\nexport type CallWithDefaultParametersData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * This is a simple string with default value\n         */\n        parameterString: string;\n        /**\n         * This is a simple number with default value\n         */\n        parameterNumber: number;\n        /**\n         * This is a simple boolean with default value\n         */\n        parameterBoolean: boolean;\n        /**\n         * This is a simple enum with default value\n         */\n        parameterEnum: 'Success' | 'Warning' | 'Error';\n        /**\n         * This is a model with one string property\n         */\n        parameterModel: {\n            /**\n             * This is a simple string property\n             */\n            prop?: string;\n        };\n    };\n    url: '/api/v{api-version}/defaults';\n};\n\nexport type CallWithDefaultOptionalParametersData = {\n    body?: never;\n    path?: never;\n    query?: {\n        /**\n         * This is a simple string that is optional with default value\n         */\n        parameterString?: string;\n        /**\n         * This is a simple number that is optional with default value\n         */\n        parameterNumber?: number;\n        /**\n         * This is a simple boolean that is optional with default value\n         */\n        parameterBoolean?: boolean;\n        /**\n         * This is a simple enum that is optional with default value\n         */\n        parameterEnum?: 'Success' | 'Warning' | 'Error';\n    };\n    url: '/api/v{api-version}/defaults';\n};\n\nexport type CallToTestOrderOfParamsData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * This is a optional string with default\n         */\n        parameterOptionalStringWithDefault?: string;\n        /**\n         * This is a optional string with empty default\n         */\n        parameterOptionalStringWithEmptyDefault?: string;\n        /**\n         * This is a optional string with no default\n         */\n        parameterOptionalStringWithNoDefault?: string;\n        /**\n         * This is a string with default\n         */\n        parameterStringWithDefault: string;\n        /**\n         * This is a string with empty default\n         */\n        parameterStringWithEmptyDefault: string;\n        /**\n         * This is a string with no default\n         */\n        parameterStringWithNoDefault: string;\n        /**\n         * This is a string that can be null with no default\n         */\n        parameterStringNullableWithNoDefault?: string | null;\n        /**\n         * This is a string that can be null with default\n         */\n        parameterStringNullableWithDefault?: string | null;\n    };\n    url: '/api/v{api-version}/defaults';\n};\n\nexport type DuplicateNameData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/duplicate';\n};\n\nexport type DuplicateName2Data = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/duplicate';\n};\n\nexport type DuplicateName3Data = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/duplicate';\n};\n\nexport type DuplicateName4Data = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/duplicate';\n};\n\nexport type CallWithNoContentResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no-content';\n};\n\nexport type CallWithNoContentResponseResponses = {\n    /**\n     * Success\n     */\n    204: unknown;\n};\n\nexport type CallWithResponseAndNoContentResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multiple-tags/response-and-no-content';\n};\n\nexport type CallWithResponseAndNoContentResponseResponses = {\n    /**\n     * Response is a simple number\n     */\n    200: number;\n    /**\n     * Success\n     */\n    204: unknown;\n};\n\nexport type CallWithResponseAndNoContentResponseResponse = CallWithResponseAndNoContentResponseResponses[keyof CallWithResponseAndNoContentResponseResponses];\n\nexport type DummyAData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multiple-tags/a';\n};\n\nexport type DummyAResponses = {\n    /**\n     * Success\n     */\n    204: unknown;\n};\n\nexport type DummyBData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multiple-tags/b';\n};\n\nexport type DummyBResponses = {\n    /**\n     * Success\n     */\n    204: unknown;\n};\n\nexport type CallWithResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/response';\n};\n\nexport type CallWithResponseResponses = {\n    /**\n     * Message for default response\n     */\n    default: ModelWithString;\n};\n\nexport type CallWithResponseResponse = CallWithResponseResponses[keyof CallWithResponseResponses];\n\nexport type CallWithDuplicateResponsesData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/response';\n};\n\nexport type CallWithDuplicateResponsesErrors = {\n    /**\n     * Message for 500 error\n     */\n    500: ModelWithStringError;\n    /**\n     * Message for 501 error\n     */\n    501: ModelWithStringError;\n    /**\n     * Message for 502 error\n     */\n    502: ModelWithStringError;\n    /**\n     * Message for default response\n     */\n    default: ModelWithString;\n};\n\nexport type CallWithDuplicateResponsesError = CallWithDuplicateResponsesErrors[keyof CallWithDuplicateResponsesErrors];\n\nexport type CallWithDuplicateResponsesResponses = {\n    /**\n     * Message for 201 response\n     */\n    201: ModelWithString;\n    /**\n     * Message for 202 response\n     */\n    202: ModelWithString;\n};\n\nexport type CallWithDuplicateResponsesResponse = CallWithDuplicateResponsesResponses[keyof CallWithDuplicateResponsesResponses];\n\nexport type CallWithResponsesData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/response';\n};\n\nexport type CallWithResponsesErrors = {\n    /**\n     * Message for 500 error\n     */\n    500: ModelWithStringError;\n    /**\n     * Message for 501 error\n     */\n    501: ModelWithStringError;\n    /**\n     * Message for 502 error\n     */\n    502: ModelWithStringError;\n    /**\n     * Message for default response\n     */\n    default: ModelWithString;\n};\n\nexport type CallWithResponsesError = CallWithResponsesErrors[keyof CallWithResponsesErrors];\n\nexport type CallWithResponsesResponses = {\n    /**\n     * Message for 200 response\n     */\n    200: {\n        readonly '@namespace.string'?: string;\n        readonly '@namespace.integer'?: number;\n        readonly value?: Array<ModelWithString>;\n    };\n    /**\n     * Message for 201 response\n     */\n    201: ModelThatExtends;\n    /**\n     * Message for 202 response\n     */\n    202: ModelThatExtendsExtends;\n};\n\nexport type CallWithResponsesResponse = CallWithResponsesResponses[keyof CallWithResponsesResponses];\n\nexport type CollectionFormatData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * This is an array parameter that is sent as csv format (comma-separated values)\n         */\n        parameterArrayCSV: Array<string>;\n        /**\n         * This is an array parameter that is sent as ssv format (space-separated values)\n         */\n        parameterArraySSV: Array<string>;\n        /**\n         * This is an array parameter that is sent as tsv format (tab-separated values)\n         */\n        parameterArrayTSV: Array<string>;\n        /**\n         * This is an array parameter that is sent as pipes format (pipe-separated values)\n         */\n        parameterArrayPipes: Array<string>;\n        /**\n         * This is an array parameter that is sent as multi format (multiple parameter instances)\n         */\n        parameterArrayMulti: Array<string>;\n    };\n    url: '/api/v{api-version}/collectionFormat';\n};\n\nexport type TypesData = {\n    body?: never;\n    path?: {\n        /**\n         * This is a number parameter\n         */\n        id?: number;\n    };\n    query: {\n        /**\n         * This is a number parameter\n         */\n        parameterNumber: number;\n        /**\n         * This is a string parameter\n         */\n        parameterString: string;\n        /**\n         * This is a boolean parameter\n         */\n        parameterBoolean: boolean;\n        /**\n         * This is an array parameter\n         */\n        parameterArray: Array<string>;\n        /**\n         * This is a dictionary parameter\n         */\n        parameterDictionary: {\n            [key: string]: unknown;\n        };\n        /**\n         * This is an enum parameter\n         */\n        parameterEnum: 'Success' | 'Warning' | 'Error';\n    };\n    url: '/api/v{api-version}/types';\n};\n\nexport type TypesResponses = {\n    /**\n     * Response is a simple number\n     */\n    200: number;\n    /**\n     * Response is a simple string\n     */\n    201: string;\n    /**\n     * Response is a simple boolean\n     */\n    202: boolean;\n    /**\n     * Response is a simple object\n     */\n    203: {\n        [key: string]: unknown;\n    };\n};\n\nexport type TypesResponse = TypesResponses[keyof TypesResponses];\n\nexport type ComplexTypesData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * Parameter containing object\n         */\n        parameterObject: {\n            first?: {\n                second?: {\n                    third?: string;\n                };\n            };\n        };\n        /**\n         * This is a model with one string property\n         */\n        parameterReference: {\n            /**\n             * This is a simple string property\n             */\n            prop?: string;\n        };\n    };\n    url: '/api/v{api-version}/complex';\n};\n\nexport type ComplexTypesErrors = {\n    /**\n     * 400 server error\n     */\n    400: unknown;\n    /**\n     * 500 server error\n     */\n    500: unknown;\n};\n\nexport type ComplexTypesResponses = {\n    /**\n     * Successful response\n     */\n    200: Array<ModelWithString>;\n};\n\nexport type ComplexTypesResponse = ComplexTypesResponses[keyof ComplexTypesResponses];\n\nexport type CallWithResultFromHeaderData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/header';\n};\n\nexport type CallWithResultFromHeaderErrors = {\n    /**\n     * 400 server error\n     */\n    400: unknown;\n    /**\n     * 500 server error\n     */\n    500: unknown;\n};\n\nexport type CallWithResultFromHeaderResponses = {\n    /**\n     * Successful response\n     */\n    200: unknown;\n};\n\nexport type TestErrorCodeData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * Status code to return\n         */\n        status: string;\n    };\n    url: '/api/v{api-version}/error';\n};\n\nexport type TestErrorCodeErrors = {\n    /**\n     * Custom message: Internal Server Error\n     */\n    500: unknown;\n    /**\n     * Custom message: Not Implemented\n     */\n    501: unknown;\n    /**\n     * Custom message: Bad Gateway\n     */\n    502: unknown;\n    /**\n     * Custom message: Service Unavailable\n     */\n    503: unknown;\n};\n\nexport type TestErrorCodeResponses = {\n    /**\n     * Custom message: Successful response\n     */\n    200: unknown;\n};\n\nexport type NonAsciiæøåÆøÅöôêÊ字符串Data = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * Dummy input param\n         */\n        nonAsciiParamæøåÆØÅöôêÊ: number;\n    };\n    url: '/api/v{api-version}/non-ascii-æøåÆØÅöôêÊ字符串';\n};\n\nexport type NonAsciiæøåÆøÅöôêÊ字符串Responses = {\n    /**\n     * Successful response\n     */\n    200: NonAsciiStringæøåÆøÅöôêÊ字符串;\n};\n\nexport type NonAsciiæøåÆøÅöôêÊ字符串Response = NonAsciiæøåÆøÅöôêÊ字符串Responses[keyof NonAsciiæøåÆøÅöôêÊ字符串Responses];\n\nexport type PostApiVbyApiVersionBodyData = {\n    /**\n     * Body should not be unknown\n     */\n    body: ParameterActivityParams;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/body';\n};\n\nexport type PostApiVbyApiVersionBodyErrors = {\n    /**\n     * Bad Request\n     */\n    400: FailureFailure;\n    /**\n     * Internal Server Error\n     */\n    500: FailureFailure;\n};\n\nexport type PostApiVbyApiVersionBodyError = PostApiVbyApiVersionBodyErrors[keyof PostApiVbyApiVersionBodyErrors];\n\nexport type PostApiVbyApiVersionBodyResponses = {\n    /**\n     * OK\n     */\n    200: ResponsePostActivityResponse;\n};\n\nexport type PostApiVbyApiVersionBodyResponse = PostApiVbyApiVersionBodyResponses[keyof PostApiVbyApiVersionBodyResponses];\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/angular-query-experimental/fetch/@tanstack/angular-query-experimental.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport { type DefaultError, type MutationOptions, queryOptions } from '@tanstack/angular-query-experimental';\n\nimport { client } from '../client.gen';\nimport { callToTestOrderOfParams, callWithDefaultOptionalParameters, callWithDefaultParameters, callWithDescriptions, callWithDuplicateResponses, callWithNoContentResponse, callWithParameters, callWithResponse, callWithResponseAndNoContentResponse, callWithResponses, callWithResultFromHeader, callWithWeirdParameterNames, collectionFormat, complexTypes, deleteCallWithoutParametersAndResponse, dummyA, dummyB, duplicateName, duplicateName2, duplicateName3, duplicateName4, fooWow, getCallWithoutParametersAndResponse, nonAsciiæøåÆøÅöôêÊ字符串, type Options, patchApiVbyApiVersionNoTag, patchCallWithoutParametersAndResponse, postApiVbyApiVersionBody, postCallWithoutParametersAndResponse, putCallWithoutParametersAndResponse, serviceWithEmptyTag, testErrorCode, types } from '../sdk.gen';\nimport type { CallToTestOrderOfParamsData, CallWithDefaultOptionalParametersData, CallWithDefaultParametersData, CallWithDescriptionsData, CallWithDuplicateResponsesData, CallWithDuplicateResponsesError, CallWithDuplicateResponsesResponse, CallWithNoContentResponseData, CallWithParametersData, CallWithResponseAndNoContentResponseData, CallWithResponseAndNoContentResponseResponse, CallWithResponseData, CallWithResponseResponse, CallWithResponsesData, CallWithResponsesError, CallWithResponsesResponse, CallWithResultFromHeaderData, CallWithWeirdParameterNamesData, CollectionFormatData, ComplexTypesData, ComplexTypesResponse, DeleteCallWithoutParametersAndResponseData, DummyAData, DummyBData, DuplicateName2Data, DuplicateName3Data, DuplicateName4Data, DuplicateNameData, FooWowData, GetCallWithoutParametersAndResponseData, NonAsciiæøåÆøÅöôêÊ字符串Data, NonAsciiæøåÆøÅöôêÊ字符串Response, PatchApiVbyApiVersionNoTagData, PatchCallWithoutParametersAndResponseData, PostApiVbyApiVersionBodyData, PostApiVbyApiVersionBodyError, PostApiVbyApiVersionBodyResponse, PostCallWithoutParametersAndResponseData, PutCallWithoutParametersAndResponseData, ServiceWithEmptyTagData, TestErrorCodeData, TypesData, TypesResponse } from '../types.gen';\n\nexport type QueryKey<TOptions extends Options> = [\n    Pick<TOptions, 'baseUrl' | 'body' | 'headers' | 'path' | 'query'> & {\n        _id: string;\n        _infinite?: boolean;\n        tags?: ReadonlyArray<string>;\n    }\n];\n\nconst createQueryKey = <TOptions extends Options>(id: string, options?: TOptions, infinite?: boolean, tags?: ReadonlyArray<string>): [\n    QueryKey<TOptions>[0]\n] => {\n    const params: QueryKey<TOptions>[0] = { _id: id, baseUrl: options?.baseUrl || (options?.client ?? client).getConfig().baseUrl } as QueryKey<TOptions>[0];\n    if (infinite) {\n        params._infinite = infinite;\n    }\n    if (tags) {\n        params.tags = tags;\n    }\n    if (options?.body) {\n        params.body = options.body;\n    }\n    if (options?.headers) {\n        params.headers = options.headers;\n    }\n    if (options?.path) {\n        params.path = options.path;\n    }\n    if (options?.query) {\n        params.query = options.query;\n    }\n    return [params];\n};\n\nexport const serviceWithEmptyTagQueryKey = (options?: Options<ServiceWithEmptyTagData>) => createQueryKey('serviceWithEmptyTag', options);\n\nexport const serviceWithEmptyTagOptions = (options?: Options<ServiceWithEmptyTagData>) => queryOptions<unknown, DefaultError, unknown, ReturnType<typeof serviceWithEmptyTagQueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await serviceWithEmptyTag({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: serviceWithEmptyTagQueryKey(options)\n});\n\nexport const patchApiVbyApiVersionNoTagMutation = (options?: Partial<Options<PatchApiVbyApiVersionNoTagData>>): MutationOptions<unknown, DefaultError, Options<PatchApiVbyApiVersionNoTagData>> => {\n    const mutationOptions: MutationOptions<unknown, DefaultError, Options<PatchApiVbyApiVersionNoTagData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await patchApiVbyApiVersionNoTag({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const fooWowMutation = (options?: Partial<Options<FooWowData>>): MutationOptions<unknown, DefaultError, Options<FooWowData>> => {\n    const mutationOptions: MutationOptions<unknown, DefaultError, Options<FooWowData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await fooWow({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const deleteCallWithoutParametersAndResponseMutation = (options?: Partial<Options<DeleteCallWithoutParametersAndResponseData>>): MutationOptions<unknown, DefaultError, Options<DeleteCallWithoutParametersAndResponseData>> => {\n    const mutationOptions: MutationOptions<unknown, DefaultError, Options<DeleteCallWithoutParametersAndResponseData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await deleteCallWithoutParametersAndResponse({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const getCallWithoutParametersAndResponseQueryKey = (options?: Options<GetCallWithoutParametersAndResponseData>) => createQueryKey('getCallWithoutParametersAndResponse', options);\n\nexport const getCallWithoutParametersAndResponseOptions = (options?: Options<GetCallWithoutParametersAndResponseData>) => queryOptions<unknown, DefaultError, unknown, ReturnType<typeof getCallWithoutParametersAndResponseQueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await getCallWithoutParametersAndResponse({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: getCallWithoutParametersAndResponseQueryKey(options)\n});\n\nexport const patchCallWithoutParametersAndResponseMutation = (options?: Partial<Options<PatchCallWithoutParametersAndResponseData>>): MutationOptions<unknown, DefaultError, Options<PatchCallWithoutParametersAndResponseData>> => {\n    const mutationOptions: MutationOptions<unknown, DefaultError, Options<PatchCallWithoutParametersAndResponseData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await patchCallWithoutParametersAndResponse({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const postCallWithoutParametersAndResponseMutation = (options?: Partial<Options<PostCallWithoutParametersAndResponseData>>): MutationOptions<unknown, DefaultError, Options<PostCallWithoutParametersAndResponseData>> => {\n    const mutationOptions: MutationOptions<unknown, DefaultError, Options<PostCallWithoutParametersAndResponseData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await postCallWithoutParametersAndResponse({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const putCallWithoutParametersAndResponseMutation = (options?: Partial<Options<PutCallWithoutParametersAndResponseData>>): MutationOptions<unknown, DefaultError, Options<PutCallWithoutParametersAndResponseData>> => {\n    const mutationOptions: MutationOptions<unknown, DefaultError, Options<PutCallWithoutParametersAndResponseData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await putCallWithoutParametersAndResponse({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const callWithDescriptionsMutation = (options?: Partial<Options<CallWithDescriptionsData>>): MutationOptions<unknown, DefaultError, Options<CallWithDescriptionsData>> => {\n    const mutationOptions: MutationOptions<unknown, DefaultError, Options<CallWithDescriptionsData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await callWithDescriptions({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const callWithParametersMutation = (options?: Partial<Options<CallWithParametersData>>): MutationOptions<unknown, DefaultError, Options<CallWithParametersData>> => {\n    const mutationOptions: MutationOptions<unknown, DefaultError, Options<CallWithParametersData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await callWithParameters({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const callWithWeirdParameterNamesMutation = (options?: Partial<Options<CallWithWeirdParameterNamesData>>): MutationOptions<unknown, DefaultError, Options<CallWithWeirdParameterNamesData>> => {\n    const mutationOptions: MutationOptions<unknown, DefaultError, Options<CallWithWeirdParameterNamesData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await callWithWeirdParameterNames({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const callWithDefaultParametersQueryKey = (options: Options<CallWithDefaultParametersData>) => createQueryKey('callWithDefaultParameters', options);\n\nexport const callWithDefaultParametersOptions = (options: Options<CallWithDefaultParametersData>) => queryOptions<unknown, DefaultError, unknown, ReturnType<typeof callWithDefaultParametersQueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await callWithDefaultParameters({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: callWithDefaultParametersQueryKey(options)\n});\n\nexport const callWithDefaultOptionalParametersMutation = (options?: Partial<Options<CallWithDefaultOptionalParametersData>>): MutationOptions<unknown, DefaultError, Options<CallWithDefaultOptionalParametersData>> => {\n    const mutationOptions: MutationOptions<unknown, DefaultError, Options<CallWithDefaultOptionalParametersData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await callWithDefaultOptionalParameters({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const callToTestOrderOfParamsMutation = (options?: Partial<Options<CallToTestOrderOfParamsData>>): MutationOptions<unknown, DefaultError, Options<CallToTestOrderOfParamsData>> => {\n    const mutationOptions: MutationOptions<unknown, DefaultError, Options<CallToTestOrderOfParamsData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await callToTestOrderOfParams({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const duplicateNameMutation = (options?: Partial<Options<DuplicateNameData>>): MutationOptions<unknown, DefaultError, Options<DuplicateNameData>> => {\n    const mutationOptions: MutationOptions<unknown, DefaultError, Options<DuplicateNameData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await duplicateName({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const duplicateName2QueryKey = (options?: Options<DuplicateName2Data>) => createQueryKey('duplicateName2', options);\n\nexport const duplicateName2Options = (options?: Options<DuplicateName2Data>) => queryOptions<unknown, DefaultError, unknown, ReturnType<typeof duplicateName2QueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await duplicateName2({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: duplicateName2QueryKey(options)\n});\n\nexport const duplicateName3Mutation = (options?: Partial<Options<DuplicateName3Data>>): MutationOptions<unknown, DefaultError, Options<DuplicateName3Data>> => {\n    const mutationOptions: MutationOptions<unknown, DefaultError, Options<DuplicateName3Data>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await duplicateName3({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const duplicateName4Mutation = (options?: Partial<Options<DuplicateName4Data>>): MutationOptions<unknown, DefaultError, Options<DuplicateName4Data>> => {\n    const mutationOptions: MutationOptions<unknown, DefaultError, Options<DuplicateName4Data>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await duplicateName4({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const callWithNoContentResponseQueryKey = (options?: Options<CallWithNoContentResponseData>) => createQueryKey('callWithNoContentResponse', options);\n\nexport const callWithNoContentResponseOptions = (options?: Options<CallWithNoContentResponseData>) => queryOptions<unknown, DefaultError, unknown, ReturnType<typeof callWithNoContentResponseQueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await callWithNoContentResponse({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: callWithNoContentResponseQueryKey(options)\n});\n\nexport const callWithResponseAndNoContentResponseQueryKey = (options?: Options<CallWithResponseAndNoContentResponseData>) => createQueryKey('callWithResponseAndNoContentResponse', options);\n\nexport const callWithResponseAndNoContentResponseOptions = (options?: Options<CallWithResponseAndNoContentResponseData>) => queryOptions<CallWithResponseAndNoContentResponseResponse, DefaultError, CallWithResponseAndNoContentResponseResponse, ReturnType<typeof callWithResponseAndNoContentResponseQueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await callWithResponseAndNoContentResponse({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: callWithResponseAndNoContentResponseQueryKey(options)\n});\n\nexport const dummyAQueryKey = (options?: Options<DummyAData>) => createQueryKey('dummyA', options);\n\nexport const dummyAOptions = (options?: Options<DummyAData>) => queryOptions<unknown, DefaultError, unknown, ReturnType<typeof dummyAQueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await dummyA({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: dummyAQueryKey(options)\n});\n\nexport const dummyBQueryKey = (options?: Options<DummyBData>) => createQueryKey('dummyB', options);\n\nexport const dummyBOptions = (options?: Options<DummyBData>) => queryOptions<unknown, DefaultError, unknown, ReturnType<typeof dummyBQueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await dummyB({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: dummyBQueryKey(options)\n});\n\nexport const callWithResponseQueryKey = (options?: Options<CallWithResponseData>) => createQueryKey('callWithResponse', options);\n\nexport const callWithResponseOptions = (options?: Options<CallWithResponseData>) => queryOptions<CallWithResponseResponse, DefaultError, CallWithResponseResponse, ReturnType<typeof callWithResponseQueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await callWithResponse({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: callWithResponseQueryKey(options)\n});\n\nexport const callWithDuplicateResponsesMutation = (options?: Partial<Options<CallWithDuplicateResponsesData>>): MutationOptions<CallWithDuplicateResponsesResponse, CallWithDuplicateResponsesError, Options<CallWithDuplicateResponsesData>> => {\n    const mutationOptions: MutationOptions<CallWithDuplicateResponsesResponse, CallWithDuplicateResponsesError, Options<CallWithDuplicateResponsesData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await callWithDuplicateResponses({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const callWithResponsesMutation = (options?: Partial<Options<CallWithResponsesData>>): MutationOptions<CallWithResponsesResponse, CallWithResponsesError, Options<CallWithResponsesData>> => {\n    const mutationOptions: MutationOptions<CallWithResponsesResponse, CallWithResponsesError, Options<CallWithResponsesData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await callWithResponses({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const collectionFormatQueryKey = (options: Options<CollectionFormatData>) => createQueryKey('collectionFormat', options);\n\nexport const collectionFormatOptions = (options: Options<CollectionFormatData>) => queryOptions<unknown, DefaultError, unknown, ReturnType<typeof collectionFormatQueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await collectionFormat({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: collectionFormatQueryKey(options)\n});\n\nexport const typesQueryKey = (options: Options<TypesData>) => createQueryKey('types', options);\n\nexport const typesOptions = (options: Options<TypesData>) => queryOptions<TypesResponse, DefaultError, TypesResponse, ReturnType<typeof typesQueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await types({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: typesQueryKey(options)\n});\n\nexport const complexTypesQueryKey = (options: Options<ComplexTypesData>) => createQueryKey('complexTypes', options);\n\nexport const complexTypesOptions = (options: Options<ComplexTypesData>) => queryOptions<ComplexTypesResponse, DefaultError, ComplexTypesResponse, ReturnType<typeof complexTypesQueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await complexTypes({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: complexTypesQueryKey(options)\n});\n\nexport const callWithResultFromHeaderMutation = (options?: Partial<Options<CallWithResultFromHeaderData>>): MutationOptions<unknown, DefaultError, Options<CallWithResultFromHeaderData>> => {\n    const mutationOptions: MutationOptions<unknown, DefaultError, Options<CallWithResultFromHeaderData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await callWithResultFromHeader({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const testErrorCodeMutation = (options?: Partial<Options<TestErrorCodeData>>): MutationOptions<unknown, DefaultError, Options<TestErrorCodeData>> => {\n    const mutationOptions: MutationOptions<unknown, DefaultError, Options<TestErrorCodeData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await testErrorCode({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const nonAsciiæøåÆøÅöôêÊ字符串Mutation = (options?: Partial<Options<NonAsciiæøåÆøÅöôêÊ字符串Data>>): MutationOptions<NonAsciiæøåÆøÅöôêÊ字符串Response, DefaultError, Options<NonAsciiæøåÆøÅöôêÊ字符串Data>> => {\n    const mutationOptions: MutationOptions<NonAsciiæøåÆøÅöôêÊ字符串Response, DefaultError, Options<NonAsciiæøåÆøÅöôêÊ字符串Data>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await nonAsciiæøåÆøÅöôêÊ字符串({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\n/**\n * Body should not be unknown\n *\n * Body should not be unknown\n */\nexport const postApiVbyApiVersionBodyMutation = (options?: Partial<Options<PostApiVbyApiVersionBodyData>>): MutationOptions<PostApiVbyApiVersionBodyResponse, PostApiVbyApiVersionBodyError, Options<PostApiVbyApiVersionBodyData>> => {\n    const mutationOptions: MutationOptions<PostApiVbyApiVersionBodyResponse, PostApiVbyApiVersionBodyError, Options<PostApiVbyApiVersionBodyData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await postApiVbyApiVersionBody({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/angular-query-experimental/fetch/client/client.gen.ts",
    "content": "// 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 (options: RequestOptions) => {\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 url = buildUrl(opts);\n\n    return { opts, url };\n  };\n\n  const request: Client['request'] = async (options) => {\n    // @ts-expect-error\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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/angular-query-experimental/fetch/client/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type { Auth } from '../core/auth.gen';\nexport type { QuerySerializerOptions } from '../core/bodySerializer.gen';\nexport {\n  formDataBodySerializer,\n  jsonBodySerializer,\n  urlSearchParamsBodySerializer,\n} from '../core/bodySerializer.gen';\nexport { buildClientParams } from '../core/params.gen';\nexport { serializeQueryKeyValue } from '../core/queryKeySerializer.gen';\nexport { createClient } from './client.gen';\nexport type {\n  Client,\n  ClientOptions,\n  Config,\n  CreateClientConfig,\n  Options,\n  RequestOptions,\n  RequestResult,\n  ResolvedRequestOptions,\n  ResponseStyle,\n  TDataShape,\n} from './types.gen';\nexport { createConfig, mergeHeaders } from './utils.gen';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/angular-query-experimental/fetch/client/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { Auth } from '../core/auth.gen';\nimport type {\n  ServerSentEventsOptions,\n  ServerSentEventsResult,\n} from '../core/serverSentEvents.gen';\nimport type { Client as CoreClient, Config as CoreConfig } from '../core/types.gen';\nimport type { Middleware } from './utils.gen';\n\nexport type ResponseStyle = 'data' | 'fields';\n\nexport interface Config<T extends ClientOptions = ClientOptions>\n  extends Omit<RequestInit, 'body' | 'headers' | 'method'>, CoreConfig {\n  /**\n   * Base URL for all requests made by this client.\n   */\n  baseUrl?: T['baseUrl'];\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   * Please don't use the Fetch client for Next.js applications. The `next`\n   * options won't have any effect.\n   *\n   * Install {@link https://www.npmjs.com/package/@hey-api/client-next `@hey-api/client-next`} instead.\n   */\n  next?: never;\n  /**\n   * Return the response data parsed in a specified format. By default, `auto`\n   * will infer the appropriate method from the `Content-Type` response header.\n   * You can override this behavior with any of the {@link Body} methods.\n   * Select `stream` if you don't want to parse response data at all.\n   *\n   * @default 'auto'\n   */\n  parseAs?: 'arrayBuffer' | 'auto' | 'blob' | 'formData' | 'json' | 'stream' | 'text';\n  /**\n   * Should we return only data or multiple fields (data, error, response, etc.)?\n   *\n   * @default 'fields'\n   */\n  responseStyle?: ResponseStyle;\n  /**\n   * Throw an error instead of returning it in the response?\n   *\n   * @default false\n   */\n  throwOnError?: T['throwOnError'];\n}\n\nexport interface RequestOptions<\n  TData = unknown,\n  TResponseStyle extends ResponseStyle = 'fields',\n  ThrowOnError extends boolean = boolean,\n  Url extends string = string,\n>\n  extends\n    Config<{\n      responseStyle: TResponseStyle;\n      throwOnError: ThrowOnError;\n    }>,\n    Pick<\n      ServerSentEventsOptions<TData>,\n      | 'onRequest'\n      | 'onSseError'\n      | 'onSseEvent'\n      | 'sseDefaultRetryDelay'\n      | 'sseMaxRetryAttempts'\n      | 'sseMaxRetryDelay'\n    > {\n  /**\n   * Any body that you want to add to your request.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/fetch#body}\n   */\n  body?: unknown;\n  path?: Record<string, unknown>;\n  query?: Record<string, unknown>;\n  /**\n   * Security mechanism(s) to use for the request.\n   */\n  security?: ReadonlyArray<Auth>;\n  url: Url;\n}\n\nexport interface ResolvedRequestOptions<\n  TResponseStyle extends ResponseStyle = 'fields',\n  ThrowOnError extends boolean = boolean,\n  Url extends string = string,\n> extends RequestOptions<unknown, TResponseStyle, ThrowOnError, Url> {\n  serializedBody?: string;\n}\n\nexport type RequestResult<\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = boolean,\n  TResponseStyle extends ResponseStyle = 'fields',\n> = ThrowOnError extends true\n  ? Promise<\n      TResponseStyle extends 'data'\n        ? TData extends Record<string, unknown>\n          ? TData[keyof TData]\n          : TData\n        : {\n            data: TData extends Record<string, unknown> ? TData[keyof TData] : TData;\n            request: Request;\n            response: Response;\n          }\n    >\n  : Promise<\n      TResponseStyle extends 'data'\n        ? (TData extends Record<string, unknown> ? TData[keyof TData] : TData) | undefined\n        : (\n            | {\n                data: TData extends Record<string, unknown> ? TData[keyof TData] : TData;\n                error: undefined;\n              }\n            | {\n                data: undefined;\n                error: TError extends Record<string, unknown> ? TError[keyof TError] : TError;\n              }\n          ) & {\n            request: Request;\n            response: Response;\n          }\n    >;\n\nexport interface ClientOptions {\n  baseUrl?: string;\n  responseStyle?: ResponseStyle;\n  throwOnError?: boolean;\n}\n\ntype MethodFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'>,\n) => RequestResult<TData, TError, ThrowOnError, TResponseStyle>;\n\ntype SseFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'>,\n) => Promise<ServerSentEventsResult<TData, TError>>;\n\ntype RequestFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'> &\n    Pick<Required<RequestOptions<TData, TResponseStyle, ThrowOnError>>, 'method'>,\n) => RequestResult<TData, TError, ThrowOnError, TResponseStyle>;\n\ntype BuildUrlFn = <\n  TData extends {\n    body?: unknown;\n    path?: Record<string, unknown>;\n    query?: Record<string, unknown>;\n    url: string;\n  },\n>(\n  options: TData & Options<TData>,\n) => string;\n\nexport type Client = CoreClient<RequestFn, Config, MethodFn, BuildUrlFn, SseFn> & {\n  interceptors: Middleware<Request, Response, unknown, ResolvedRequestOptions>;\n};\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 = ClientOptions> = (\n  override?: Config<ClientOptions & T>,\n) => Config<Required<ClientOptions> & T>;\n\nexport interface TDataShape {\n  body?: unknown;\n  headers?: unknown;\n  path?: unknown;\n  query?: unknown;\n  url: string;\n}\n\ntype OmitKeys<T, K> = Pick<T, Exclude<keyof T, K>>;\n\nexport type Options<\n  TData extends TDataShape = TDataShape,\n  ThrowOnError extends boolean = boolean,\n  TResponse = unknown,\n  TResponseStyle extends ResponseStyle = 'fields',\n> = OmitKeys<\n  RequestOptions<TResponse, TResponseStyle, ThrowOnError>,\n  'body' | 'path' | 'query' | 'url'\n> &\n  ([TData] extends [never] ? unknown : Omit<TData, 'url'>);\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/angular-query-experimental/fetch/client/utils.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/angular-query-experimental/fetch/client.gen.ts",
    "content": "// 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: 'http://localhost:3000/base' }));\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/angular-query-experimental/fetch/core/auth.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/angular-query-experimental/fetch/core/bodySerializer.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/angular-query-experimental/fetch/core/params.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/angular-query-experimental/fetch/core/pathSerializer.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/angular-query-experimental/fetch/core/queryKeySerializer.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\n/**\n * JSON-friendly union that mirrors what Pinia Colada can hash.\n */\nexport type JsonValue =\n  | null\n  | string\n  | number\n  | boolean\n  | JsonValue[]\n  | { [key: string]: JsonValue };\n\n/**\n * Replacer that converts non-JSON values (bigint, Date, etc.) to safe substitutes.\n */\nexport const queryKeyJsonReplacer = (_key: string, value: unknown) => {\n  if (value === undefined || typeof value === 'function' || typeof value === 'symbol') {\n    return undefined;\n  }\n  if (typeof value === 'bigint') {\n    return value.toString();\n  }\n  if (value instanceof Date) {\n    return value.toISOString();\n  }\n  return value;\n};\n\n/**\n * Safely stringifies a value and parses it back into a JsonValue.\n */\nexport const stringifyToJsonValue = (input: unknown): JsonValue | undefined => {\n  try {\n    const json = JSON.stringify(input, queryKeyJsonReplacer);\n    if (json === undefined) {\n      return undefined;\n    }\n    return JSON.parse(json) as JsonValue;\n  } catch {\n    return undefined;\n  }\n};\n\n/**\n * Detects plain objects (including objects with a null prototype).\n */\nconst isPlainObject = (value: unknown): value is Record<string, unknown> => {\n  if (value === null || typeof value !== 'object') {\n    return false;\n  }\n  const prototype = Object.getPrototypeOf(value as object);\n  return prototype === Object.prototype || prototype === null;\n};\n\n/**\n * Turns URLSearchParams into a sorted JSON object for deterministic keys.\n */\nconst serializeSearchParams = (params: URLSearchParams): JsonValue => {\n  const entries = Array.from(params.entries()).sort(([a], [b]) => a.localeCompare(b));\n  const result: Record<string, JsonValue> = {};\n\n  for (const [key, value] of entries) {\n    const existing = result[key];\n    if (existing === undefined) {\n      result[key] = value;\n      continue;\n    }\n\n    if (Array.isArray(existing)) {\n      (existing as string[]).push(value);\n    } else {\n      result[key] = [existing, value];\n    }\n  }\n\n  return result;\n};\n\n/**\n * Normalizes any accepted value into a JSON-friendly shape for query keys.\n */\nexport const serializeQueryKeyValue = (value: unknown): JsonValue | undefined => {\n  if (value === null) {\n    return null;\n  }\n\n  if (typeof value === 'string' || typeof value === 'number' || typeof value === 'boolean') {\n    return value;\n  }\n\n  if (value === undefined || typeof value === 'function' || typeof value === 'symbol') {\n    return undefined;\n  }\n\n  if (typeof value === 'bigint') {\n    return value.toString();\n  }\n\n  if (value instanceof Date) {\n    return value.toISOString();\n  }\n\n  if (Array.isArray(value)) {\n    return stringifyToJsonValue(value);\n  }\n\n  if (typeof URLSearchParams !== 'undefined' && value instanceof URLSearchParams) {\n    return serializeSearchParams(value);\n  }\n\n  if (isPlainObject(value)) {\n    return stringifyToJsonValue(value);\n  }\n\n  return undefined;\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/angular-query-experimental/fetch/core/serverSentEvents.gen.ts",
    "content": "// 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 const 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            // Normalize line endings: CRLF -> LF, then CR -> LF\n            buffer = buffer.replace(/\\r\\n/g, '\\n').replace(/\\r/g, '\\n');\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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/angular-query-experimental/fetch/core/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { Auth, AuthToken } from './auth.gen';\nimport type { BodySerializer, QuerySerializer, QuerySerializerOptions } from './bodySerializer.gen';\n\nexport type HttpMethod =\n  | 'connect'\n  | 'delete'\n  | 'get'\n  | 'head'\n  | 'options'\n  | 'patch'\n  | 'post'\n  | 'put'\n  | 'trace';\n\nexport type Client<\n  RequestFn = never,\n  Config = unknown,\n  MethodFn = never,\n  BuildUrlFn = never,\n  SseFn = never,\n> = {\n  /**\n   * Returns the final request URL.\n   */\n  buildUrl: BuildUrlFn;\n  getConfig: () => Config;\n  request: RequestFn;\n  setConfig: (config: Config) => Config;\n} & {\n  [K in HttpMethod]: MethodFn;\n} & ([SseFn] extends [never] ? { sse?: never } : { sse: { [K in HttpMethod]: SseFn } });\n\nexport interface Config {\n  /**\n   * Auth token or a function returning auth token. The resolved value will be\n   * added to the request payload as defined by its `security` array.\n   */\n  auth?: ((auth: Auth) => Promise<AuthToken> | AuthToken) | AuthToken;\n  /**\n   * A function for serializing request body parameter. By default,\n   * {@link JSON.stringify()} will be used.\n   */\n  bodySerializer?: BodySerializer | null;\n  /**\n   * An object containing any HTTP headers that you want to pre-populate your\n   * `Headers` object with.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/Headers/Headers#init See more}\n   */\n  headers?:\n    | RequestInit['headers']\n    | Record<\n        string,\n        string | number | boolean | (string | number | boolean)[] | null | undefined | unknown\n      >;\n  /**\n   * The request method.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/fetch#method See more}\n   */\n  method?: Uppercase<HttpMethod>;\n  /**\n   * A function for serializing request query parameters. By default, arrays\n   * will be exploded in form style, objects will be exploded in deepObject\n   * style, and reserved characters are percent-encoded.\n   *\n   * This method will have no effect if the native `paramsSerializer()` Axios\n   * API function is used.\n   *\n   * {@link https://swagger.io/docs/specification/serialization/#query View examples}\n   */\n  querySerializer?: QuerySerializer | QuerySerializerOptions;\n  /**\n   * A function validating request data. This is useful if you want to ensure\n   * the request conforms to the desired shape, so it can be safely sent to\n   * the server.\n   */\n  requestValidator?: (data: unknown) => Promise<unknown>;\n  /**\n   * A function transforming response data before it's returned. This is useful\n   * for post-processing data, e.g. converting ISO strings into Date objects.\n   */\n  responseTransformer?: (data: unknown) => Promise<unknown>;\n  /**\n   * A function validating response data. This is useful if you want to ensure\n   * the response conforms to the desired shape, so it can be safely passed to\n   * the transformers and returned to the user.\n   */\n  responseValidator?: (data: unknown) => Promise<unknown>;\n}\n\ntype IsExactlyNeverOrNeverUndefined<T> = [T] extends [never]\n  ? true\n  : [T] extends [never | undefined]\n    ? [undefined] extends [T]\n      ? false\n      : true\n    : false;\n\nexport type OmitNever<T extends Record<string, unknown>> = {\n  [K in keyof T as IsExactlyNeverOrNeverUndefined<T[K]> extends true ? never : K]: T[K];\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/angular-query-experimental/fetch/core/utils.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/angular-query-experimental/fetch/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport { callToTestOrderOfParams, callWithDefaultOptionalParameters, callWithDefaultParameters, callWithDescriptions, callWithDuplicateResponses, callWithNoContentResponse, callWithParameters, callWithResponse, callWithResponseAndNoContentResponse, callWithResponses, callWithResultFromHeader, callWithWeirdParameterNames, collectionFormat, complexTypes, deleteCallWithoutParametersAndResponse, dummyA, dummyB, duplicateName, duplicateName2, duplicateName3, duplicateName4, fooWow, getCallWithoutParametersAndResponse, headCallWithoutParametersAndResponse, nonAsciiæøåÆøÅöôêÊ字符串, type Options, optionsCallWithoutParametersAndResponse, patchApiVbyApiVersionNoTag, patchCallWithoutParametersAndResponse, postApiVbyApiVersionBody, postCallWithoutParametersAndResponse, putCallWithoutParametersAndResponse, serviceWithEmptyTag, testErrorCode, types } from './sdk.gen';\nexport type { ArrayWithArray, ArrayWithBooleans, ArrayWithNumbers, ArrayWithProperties, ArrayWithReferences, ArrayWithStrings, CallToTestOrderOfParamsData, CallWithDefaultOptionalParametersData, CallWithDefaultParametersData, CallWithDescriptionsData, CallWithDuplicateResponsesData, CallWithDuplicateResponsesError, CallWithDuplicateResponsesErrors, CallWithDuplicateResponsesResponse, CallWithDuplicateResponsesResponses, CallWithNoContentResponseData, CallWithNoContentResponseResponses, CallWithParametersData, CallWithResponseAndNoContentResponseData, CallWithResponseAndNoContentResponseResponse, CallWithResponseAndNoContentResponseResponses, CallWithResponseData, CallWithResponseResponse, CallWithResponseResponses, CallWithResponsesData, CallWithResponsesError, CallWithResponsesErrors, CallWithResponsesResponse, CallWithResponsesResponses, CallWithResultFromHeaderData, CallWithResultFromHeaderErrors, CallWithResultFromHeaderResponses, CallWithWeirdParameterNamesData, ClientOptions, CollectionFormatData, CommentWithBackticks, CommentWithBackticksAndQuotes, CommentWithBreaks, CommentWithExpressionPlaceholders, CommentWithQuotes, CommentWithReservedCharacters, CommentWithSlashes, ComplexTypesData, ComplexTypesErrors, ComplexTypesResponse, ComplexTypesResponses, Date, Default, DeleteCallWithoutParametersAndResponseData, DictionaryWithArray, DictionaryWithDictionary, DictionaryWithProperties, DictionaryWithReference, DictionaryWithString, DummyAData, DummyAResponses, DummyBData, DummyBResponses, DuplicateName2Data, DuplicateName3Data, DuplicateName4Data, DuplicateNameData, EnumFromDescription, EnumWithExtensions, EnumWithNumbers, EnumWithStrings, ExternalRefA, ExternalRefB, ExternalSharedModel, FailureFailure, FooWowData, FooWowResponses, GetCallWithoutParametersAndResponseData, HeadCallWithoutParametersAndResponseData, ModelThatExtends, ModelThatExtendsExtends, ModelWithArray, ModelWithBoolean, ModelWithCircularReference, ModelWithDictionary, ModelWithDuplicateImports, ModelWithDuplicateProperties, ModelWithEnum, ModelWithEnumFromDescription, ModelWithInteger, ModelWithNestedEnums, ModelWithNestedProperties, ModelWithNullableString, ModelWithOrderedProperties, ModelWithPattern, ModelWithPatternWritable, ModelWithProperties, ModelWithPropertiesWritable, ModelWithReference, ModelWithReferenceWritable, ModelWithString, ModelWithStringError, NonAsciiæøåÆøÅöôêÊ字符串Data, NonAsciiæøåÆøÅöôêÊ字符串Response, NonAsciiæøåÆøÅöôêÊ字符串Responses, NonAsciiStringæøåÆøÅöôêÊ字符串, OptionsCallWithoutParametersAndResponseData, ParameterActivityParams, PatchApiVbyApiVersionNoTagData, PatchApiVbyApiVersionNoTagResponses, PatchCallWithoutParametersAndResponseData, PostApiVbyApiVersionBodyData, PostApiVbyApiVersionBodyError, PostApiVbyApiVersionBodyErrors, PostApiVbyApiVersionBodyResponse, PostApiVbyApiVersionBodyResponses, PostCallWithoutParametersAndResponseData, PutCallWithoutParametersAndResponseData, ResponsePostActivityResponse, ServiceWithEmptyTagData, SimpleBoolean, SimpleFile, SimpleInteger, SimpleReference, SimpleString, SimpleStringWithPattern, TestErrorCodeData, TestErrorCodeErrors, TestErrorCodeResponses, TypesData, TypesResponse, TypesResponses } from './types.gen';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/angular-query-experimental/fetch/sdk.gen.ts",
    "content": "// 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 { CallToTestOrderOfParamsData, CallWithDefaultOptionalParametersData, CallWithDefaultParametersData, CallWithDescriptionsData, CallWithDuplicateResponsesData, CallWithDuplicateResponsesErrors, CallWithDuplicateResponsesResponses, CallWithNoContentResponseData, CallWithNoContentResponseResponses, CallWithParametersData, CallWithResponseAndNoContentResponseData, CallWithResponseAndNoContentResponseResponses, CallWithResponseData, CallWithResponseResponses, CallWithResponsesData, CallWithResponsesErrors, CallWithResponsesResponses, CallWithResultFromHeaderData, CallWithResultFromHeaderErrors, CallWithResultFromHeaderResponses, CallWithWeirdParameterNamesData, CollectionFormatData, ComplexTypesData, ComplexTypesErrors, ComplexTypesResponses, DeleteCallWithoutParametersAndResponseData, DummyAData, DummyAResponses, DummyBData, DummyBResponses, DuplicateName2Data, DuplicateName3Data, DuplicateName4Data, DuplicateNameData, FooWowData, FooWowResponses, GetCallWithoutParametersAndResponseData, HeadCallWithoutParametersAndResponseData, NonAsciiæøåÆøÅöôêÊ字符串Data, NonAsciiæøåÆøÅöôêÊ字符串Responses, OptionsCallWithoutParametersAndResponseData, PatchApiVbyApiVersionNoTagData, PatchApiVbyApiVersionNoTagResponses, PatchCallWithoutParametersAndResponseData, PostApiVbyApiVersionBodyData, PostApiVbyApiVersionBodyErrors, PostApiVbyApiVersionBodyResponses, PostCallWithoutParametersAndResponseData, PutCallWithoutParametersAndResponseData, ServiceWithEmptyTagData, TestErrorCodeData, TestErrorCodeErrors, TestErrorCodeResponses, TypesData, TypesResponses } from './types.gen';\n\nexport type Options<TData extends TDataShape = TDataShape, ThrowOnError extends boolean = boolean> = Options2<TData, ThrowOnError> & {\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\nexport const serviceWithEmptyTag = <ThrowOnError extends boolean = false>(options?: Options<ServiceWithEmptyTagData, ThrowOnError>) => (options?.client ?? client).get<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/no+tag', ...options });\n\nexport const patchApiVbyApiVersionNoTag = <ThrowOnError extends boolean = false>(options?: Options<PatchApiVbyApiVersionNoTagData, ThrowOnError>) => (options?.client ?? client).patch<PatchApiVbyApiVersionNoTagResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/no+tag', ...options });\n\nexport const fooWow = <ThrowOnError extends boolean = false>(options?: Options<FooWowData, ThrowOnError>) => (options?.client ?? client).put<FooWowResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/no+tag', ...options });\n\nexport const deleteCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<DeleteCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).delete<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const getCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<GetCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).get<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const headCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<HeadCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).head<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const optionsCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<OptionsCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).options<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const patchCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<PatchCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).patch<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const postCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<PostCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).post<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const putCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<PutCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).put<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const callWithDescriptions = <ThrowOnError extends boolean = false>(options?: Options<CallWithDescriptionsData, ThrowOnError>) => (options?.client ?? client).post<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/descriptions/', ...options });\n\nexport const callWithParameters = <ThrowOnError extends boolean = false>(options: Options<CallWithParametersData, ThrowOnError>) => (options.client ?? client).post<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/parameters/{parameterPath}', ...options });\n\nexport const callWithWeirdParameterNames = <ThrowOnError extends boolean = false>(options: Options<CallWithWeirdParameterNamesData, ThrowOnError>) => (options.client ?? client).post<unknown, unknown, ThrowOnError>({\n    url: '/api/v{api-version}/parameters/{parameter.path.1}/{parameter-path-2}/{PARAMETER-PATH-3}',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options.headers\n    }\n});\n\nexport const callWithDefaultParameters = <ThrowOnError extends boolean = false>(options: Options<CallWithDefaultParametersData, ThrowOnError>) => (options.client ?? client).get<unknown, unknown, ThrowOnError>({\n    querySerializer: { parameters: { parameterModel: { object: { explode: false, style: 'form' } } } },\n    url: '/api/v{api-version}/defaults',\n    ...options\n});\n\nexport const callWithDefaultOptionalParameters = <ThrowOnError extends boolean = false>(options?: Options<CallWithDefaultOptionalParametersData, ThrowOnError>) => (options?.client ?? client).post<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/defaults', ...options });\n\nexport const callToTestOrderOfParams = <ThrowOnError extends boolean = false>(options: Options<CallToTestOrderOfParamsData, ThrowOnError>) => (options.client ?? client).put<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/defaults', ...options });\n\nexport const duplicateName = <ThrowOnError extends boolean = false>(options?: Options<DuplicateNameData, ThrowOnError>) => (options?.client ?? client).delete<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/duplicate', ...options });\n\nexport const duplicateName2 = <ThrowOnError extends boolean = false>(options?: Options<DuplicateName2Data, ThrowOnError>) => (options?.client ?? client).get<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/duplicate', ...options });\n\nexport const duplicateName3 = <ThrowOnError extends boolean = false>(options?: Options<DuplicateName3Data, ThrowOnError>) => (options?.client ?? client).post<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/duplicate', ...options });\n\nexport const duplicateName4 = <ThrowOnError extends boolean = false>(options?: Options<DuplicateName4Data, ThrowOnError>) => (options?.client ?? client).put<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/duplicate', ...options });\n\nexport const callWithNoContentResponse = <ThrowOnError extends boolean = false>(options?: Options<CallWithNoContentResponseData, ThrowOnError>) => (options?.client ?? client).get<CallWithNoContentResponseResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/no-content', ...options });\n\nexport const callWithResponseAndNoContentResponse = <ThrowOnError extends boolean = false>(options?: Options<CallWithResponseAndNoContentResponseData, ThrowOnError>) => (options?.client ?? client).get<CallWithResponseAndNoContentResponseResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/multiple-tags/response-and-no-content', ...options });\n\nexport const dummyA = <ThrowOnError extends boolean = false>(options?: Options<DummyAData, ThrowOnError>) => (options?.client ?? client).get<DummyAResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/multiple-tags/a', ...options });\n\nexport const dummyB = <ThrowOnError extends boolean = false>(options?: Options<DummyBData, ThrowOnError>) => (options?.client ?? client).get<DummyBResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/multiple-tags/b', ...options });\n\nexport const callWithResponse = <ThrowOnError extends boolean = false>(options?: Options<CallWithResponseData, ThrowOnError>) => (options?.client ?? client).get<CallWithResponseResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/response', ...options });\n\nexport const callWithDuplicateResponses = <ThrowOnError extends boolean = false>(options?: Options<CallWithDuplicateResponsesData, ThrowOnError>) => (options?.client ?? client).post<CallWithDuplicateResponsesResponses, CallWithDuplicateResponsesErrors, ThrowOnError>({ url: '/api/v{api-version}/response', ...options });\n\nexport const callWithResponses = <ThrowOnError extends boolean = false>(options?: Options<CallWithResponsesData, ThrowOnError>) => (options?.client ?? client).put<CallWithResponsesResponses, CallWithResponsesErrors, ThrowOnError>({ url: '/api/v{api-version}/response', ...options });\n\nexport const collectionFormat = <ThrowOnError extends boolean = false>(options: Options<CollectionFormatData, ThrowOnError>) => (options.client ?? client).get<unknown, unknown, ThrowOnError>({\n    querySerializer: { parameters: {\n            parameterArrayCSV: { array: { explode: false } },\n            parameterArraySSV: { array: { explode: false } },\n            parameterArrayTSV: { array: { explode: false } },\n            parameterArrayPipes: { array: { explode: false } }\n        } },\n    url: '/api/v{api-version}/collectionFormat',\n    ...options\n});\n\nexport const types = <ThrowOnError extends boolean = false>(options: Options<TypesData, ThrowOnError>) => (options.client ?? client).get<TypesResponses, unknown, ThrowOnError>({\n    querySerializer: { parameters: { parameterArray: { array: { explode: false } }, parameterDictionary: { object: { explode: false, style: 'form' } } } },\n    url: '/api/v{api-version}/types',\n    ...options\n});\n\nexport const complexTypes = <ThrowOnError extends boolean = false>(options: Options<ComplexTypesData, ThrowOnError>) => (options.client ?? client).get<ComplexTypesResponses, ComplexTypesErrors, ThrowOnError>({\n    querySerializer: { parameters: { parameterObject: { object: { explode: false, style: 'form' } }, parameterReference: { object: { explode: false, style: 'form' } } } },\n    url: '/api/v{api-version}/complex',\n    ...options\n});\n\nexport const callWithResultFromHeader = <ThrowOnError extends boolean = false>(options?: Options<CallWithResultFromHeaderData, ThrowOnError>) => (options?.client ?? client).post<CallWithResultFromHeaderResponses, CallWithResultFromHeaderErrors, ThrowOnError>({ url: '/api/v{api-version}/header', ...options });\n\nexport const testErrorCode = <ThrowOnError extends boolean = false>(options: Options<TestErrorCodeData, ThrowOnError>) => (options.client ?? client).post<TestErrorCodeResponses, TestErrorCodeErrors, ThrowOnError>({ url: '/api/v{api-version}/error', ...options });\n\nexport const nonAsciiæøåÆøÅöôêÊ字符串 = <ThrowOnError extends boolean = false>(options: Options<NonAsciiæøåÆøÅöôêÊ字符串Data, ThrowOnError>) => (options.client ?? client).post<NonAsciiæøåÆøÅöôêÊ字符串Responses, unknown, ThrowOnError>({ url: '/api/v{api-version}/non-ascii-æøåÆØÅöôêÊ字符串', ...options });\n\n/**\n * Body should not be unknown\n *\n * Body should not be unknown\n */\nexport const postApiVbyApiVersionBody = <ThrowOnError extends boolean = false>(options: Options<PostApiVbyApiVersionBodyData, ThrowOnError>) => (options.client ?? client).post<PostApiVbyApiVersionBodyResponses, PostApiVbyApiVersionBodyErrors, ThrowOnError>({\n    url: '/api/v{api-version}/body',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options.headers\n    }\n});\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/angular-query-experimental/fetch/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type ClientOptions = {\n    baseUrl: 'http://localhost:3000/base' | (string & {});\n};\n\nexport type ExternalRefA = ExternalSharedModel;\n\nexport type ExternalRefB = ExternalSharedModel;\n\n/**\n * Testing multiline comments in string: First line\n * Second line\n *\n * Fourth line\n */\nexport type CommentWithBreaks = number;\n\n/**\n * Testing backticks in string: `backticks` and ```multiple backticks``` should work\n */\nexport type CommentWithBackticks = number;\n\n/**\n * Testing backticks and quotes in string: `backticks`, 'quotes', \"double quotes\" and ```multiple backticks``` should work\n */\nexport type CommentWithBackticksAndQuotes = number;\n\n/**\n * Testing slashes in string: \\backwards\\\\\\ and /forwards/// should work\n */\nexport type CommentWithSlashes = number;\n\n/**\n * Testing expression placeholders in string: ${expression} should work\n */\nexport type CommentWithExpressionPlaceholders = number;\n\n/**\n * Testing quotes in string: 'single quote''' and \"double quotes\"\"\" should work\n */\nexport type CommentWithQuotes = number;\n\n/**\n * Testing reserved characters in string: * inline * and ** inline ** should work\n */\nexport type CommentWithReservedCharacters = number;\n\n/**\n * This is a simple number\n */\nexport type SimpleInteger = number;\n\n/**\n * This is a simple boolean\n */\nexport type SimpleBoolean = boolean;\n\n/**\n * This is a simple string\n */\nexport type SimpleString = string;\n\n/**\n * A string with non-ascii (unicode) characters valid in typescript identifiers (æøåÆØÅöÔèÈ字符串)\n */\nexport type NonAsciiStringæøåÆøÅöôêÊ字符串 = string;\n\n/**\n * This is a simple file\n */\nexport type SimpleFile = Blob | File;\n\nexport type SimpleReference = ModelWithString;\n\n/**\n * This is a simple string\n */\nexport type SimpleStringWithPattern = string;\n\n/**\n * This is a simple enum with strings\n */\nexport type EnumWithStrings = 'Success' | 'Warning' | 'Error' | '\\'Single Quote\\'' | '\"Double Quotes\"' | 'Non-ascii: øæåôöØÆÅÔÖ字符串';\n\n/**\n * This is a simple enum with numbers\n */\nexport type EnumWithNumbers = 1 | 2 | 3 | 1.1 | 1.2 | 1.3 | 100 | 200 | 300 | -100 | -200 | -300 | -1.1 | -1.2 | -1.3;\n\n/**\n * Success=1,Warning=2,Error=3\n */\nexport type EnumFromDescription = number;\n\n/**\n * This is a simple enum with numbers\n */\nexport type EnumWithExtensions = 200 | 400 | 500;\n\n/**\n * This is a simple array with numbers\n */\nexport type ArrayWithNumbers = Array<number>;\n\n/**\n * This is a simple array with booleans\n */\nexport type ArrayWithBooleans = Array<boolean>;\n\n/**\n * This is a simple array with strings\n */\nexport type ArrayWithStrings = Array<string>;\n\n/**\n * This is a simple array with references\n */\nexport type ArrayWithReferences = Array<ModelWithString>;\n\n/**\n * This is a simple array containing an array\n */\nexport type ArrayWithArray = Array<Array<ModelWithString>>;\n\n/**\n * This is a simple array with properties\n */\nexport type ArrayWithProperties = Array<{\n    foo?: string;\n    bar?: string;\n}>;\n\n/**\n * This is a string dictionary\n */\nexport type DictionaryWithString = {\n    [key: string]: string;\n};\n\n/**\n * This is a string reference\n */\nexport type DictionaryWithReference = {\n    [key: string]: ModelWithString;\n};\n\n/**\n * This is a complex dictionary\n */\nexport type DictionaryWithArray = {\n    [key: string]: Array<ModelWithString>;\n};\n\n/**\n * This is a string dictionary\n */\nexport type DictionaryWithDictionary = {\n    [key: string]: {\n        [key: string]: string;\n    };\n};\n\n/**\n * This is a complex dictionary\n */\nexport type DictionaryWithProperties = {\n    [key: string]: {\n        foo?: string;\n        bar?: string;\n    };\n};\n\n/**\n * This is a type-only model that defines Date as a string\n */\nexport type Date = string;\n\n/**\n * This is a model with one number property\n */\nexport type ModelWithInteger = {\n    /**\n     * This is a simple number property\n     */\n    prop?: number;\n};\n\n/**\n * This is a model with one boolean property\n */\nexport type ModelWithBoolean = {\n    /**\n     * This is a simple boolean property\n     */\n    prop?: boolean;\n};\n\n/**\n * This is a model with one string property\n */\nexport type ModelWithString = {\n    /**\n     * This is a simple string property\n     */\n    prop?: string;\n};\n\n/**\n * This is a model with one string property\n */\nexport type ModelWithStringError = {\n    /**\n     * This is a simple string property\n     */\n    prop?: string;\n};\n\n/**\n * This is a model with one string property\n */\nexport type ModelWithNullableString = {\n    /**\n     * This is a simple string property\n     */\n    nullableProp?: string | null;\n    /**\n     * This is a simple string property\n     */\n    nullableRequiredProp: string | null;\n};\n\n/**\n * This is a model with one enum\n */\nexport type ModelWithEnum = {\n    /**\n     * This is a simple enum with strings\n     */\n    test?: 'Success' | 'Warning' | 'Error' | 'ØÆÅ字符串';\n    /**\n     * These are the HTTP error code enums\n     */\n    statusCode?: '100' | '200 FOO' | '300 FOO_BAR' | '400 foo-bar' | '500 foo.bar' | '600 foo&bar';\n    /**\n     * Simple boolean enum\n     */\n    bool?: true;\n};\n\n/**\n * This is a model with one enum\n */\nexport type ModelWithEnumFromDescription = {\n    /**\n     * Success=1,Warning=2,Error=3\n     */\n    test?: number;\n};\n\n/**\n * This is a model with nested enums\n */\nexport type ModelWithNestedEnums = {\n    dictionaryWithEnum?: {\n        [key: string]: 'Success' | 'Warning' | 'Error';\n    };\n    dictionaryWithEnumFromDescription?: {\n        [key: string]: number;\n    };\n    arrayWithEnum?: Array<'Success' | 'Warning' | 'Error'>;\n    arrayWithDescription?: Array<number>;\n};\n\n/**\n * This is a model with one property containing a reference\n */\nexport type ModelWithReference = {\n    prop?: ModelWithProperties;\n};\n\n/**\n * This is a model with one property containing an array\n */\nexport type ModelWithArray = {\n    prop?: Array<ModelWithString>;\n    propWithFile?: Array<Blob | File>;\n    propWithNumber?: Array<number>;\n};\n\n/**\n * This is a model with one property containing a dictionary\n */\nexport type ModelWithDictionary = {\n    prop?: {\n        [key: string]: string;\n    };\n};\n\n/**\n * This is a model with one property containing a circular reference\n */\nexport type ModelWithCircularReference = {\n    prop?: ModelWithCircularReference;\n};\n\n/**\n * This is a model with one nested property\n */\nexport type ModelWithProperties = {\n    required: string;\n    readonly requiredAndReadOnly: string;\n    string?: string;\n    number?: number;\n    boolean?: boolean;\n    reference?: ModelWithString;\n    'property with space'?: string;\n    default?: string;\n    try?: string;\n    readonly '@namespace.string'?: string;\n    readonly '@namespace.integer'?: number;\n};\n\n/**\n * This is a model with one nested property\n */\nexport type ModelWithNestedProperties = {\n    readonly first: {\n        readonly second: {\n            readonly third: string;\n        };\n    };\n};\n\n/**\n * This is a model with duplicated properties\n */\nexport type ModelWithDuplicateProperties = {\n    prop?: ModelWithString;\n};\n\n/**\n * This is a model with ordered properties\n */\nexport type ModelWithOrderedProperties = {\n    zebra?: string;\n    apple?: string;\n    hawaii?: string;\n};\n\n/**\n * This is a model with duplicated imports\n */\nexport type ModelWithDuplicateImports = {\n    propA?: ModelWithString;\n    propB?: ModelWithString;\n    propC?: ModelWithString;\n};\n\n/**\n * This is a model that extends another model\n */\nexport type ModelThatExtends = ModelWithString & {\n    propExtendsA?: string;\n    propExtendsB?: ModelWithString;\n};\n\n/**\n * This is a model that extends another model\n */\nexport type ModelThatExtendsExtends = ModelWithString & ModelThatExtends & {\n    propExtendsC?: string;\n    propExtendsD?: ModelWithString;\n};\n\nexport type Default = {\n    name?: string;\n};\n\n/**\n * This is a model that contains a some patterns\n */\nexport type ModelWithPattern = {\n    key: string;\n    name: string;\n    readonly enabled?: boolean;\n    readonly modified?: string;\n    id?: string;\n    text?: string;\n    patternWithSingleQuotes?: string;\n    patternWithNewline?: string;\n    patternWithBacktick?: string;\n    patternWithUnicode?: string;\n};\n\nexport type ParameterActivityParams = {\n    description?: string;\n    graduate_id?: number;\n    organization_id?: number;\n    parent_activity?: number;\n    post_id?: number;\n};\n\nexport type ResponsePostActivityResponse = {\n    description?: string;\n    graduate_id?: number;\n    organization_id?: number;\n    parent_activity_id?: number;\n    post_id?: number;\n};\n\nexport type FailureFailure = {\n    error?: string;\n    message?: string;\n    reference_code?: string;\n};\n\nexport type ExternalSharedModel = {\n    id: string;\n    name?: string;\n};\n\n/**\n * This is a model with one property containing a reference\n */\nexport type ModelWithReferenceWritable = {\n    prop?: ModelWithPropertiesWritable;\n};\n\n/**\n * This is a model with one nested property\n */\nexport type ModelWithPropertiesWritable = {\n    required: string;\n    string?: string;\n    number?: number;\n    boolean?: boolean;\n    reference?: ModelWithString;\n    'property with space'?: string;\n    default?: string;\n    try?: string;\n};\n\n/**\n * This is a model that contains a some patterns\n */\nexport type ModelWithPatternWritable = {\n    key: string;\n    name: string;\n    id?: string;\n    text?: string;\n    patternWithSingleQuotes?: string;\n    patternWithNewline?: string;\n    patternWithBacktick?: string;\n    patternWithUnicode?: string;\n};\n\nexport type ServiceWithEmptyTagData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no+tag';\n};\n\nexport type PatchApiVbyApiVersionNoTagData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no+tag';\n};\n\nexport type PatchApiVbyApiVersionNoTagResponses = {\n    /**\n     * OK\n     */\n    default: unknown;\n};\n\nexport type FooWowData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no+tag';\n};\n\nexport type FooWowResponses = {\n    /**\n     * OK\n     */\n    default: unknown;\n};\n\nexport type DeleteCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type GetCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type HeadCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type OptionsCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type PatchCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type PostCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type PutCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type CallWithDescriptionsData = {\n    body?: never;\n    path?: never;\n    query?: {\n        /**\n         * Testing multiline comments in string: First line\n         * Second line\n         *\n         * Fourth line\n         */\n        parameterWithBreaks?: string;\n        /**\n         * Testing backticks in string: `backticks` and ```multiple backticks``` should work\n         */\n        parameterWithBackticks?: string;\n        /**\n         * Testing slashes in string: \\backwards\\\\\\ and /forwards/// should work\n         */\n        parameterWithSlashes?: string;\n        /**\n         * Testing expression placeholders in string: ${expression} should work\n         */\n        parameterWithExpressionPlaceholders?: string;\n        /**\n         * Testing quotes in string: 'single quote''' and \"double quotes\"\"\" should work\n         */\n        parameterWithQuotes?: string;\n        /**\n         * Testing reserved characters in string: * inline * and ** inline ** should work\n         */\n        parameterWithReservedCharacters?: string;\n    };\n    url: '/api/v{api-version}/descriptions/';\n};\n\nexport type CallWithParametersData = {\n    body?: never;\n    headers: {\n        /**\n         * This is the parameter that goes into the header\n         */\n        parameterHeader: string;\n    };\n    path: {\n        /**\n         * This is the parameter that goes into the path\n         */\n        parameterPath: string;\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string;\n    };\n    query: {\n        /**\n         * This is the parameter that goes into the query params\n         */\n        parameterQuery: string;\n    };\n    url: '/api/v{api-version}/parameters/{parameterPath}';\n};\n\nexport type CallWithWeirdParameterNamesData = {\n    /**\n     * This is the parameter that is sent as request body\n     */\n    body: string;\n    headers: {\n        /**\n         * This is the parameter that goes into the request header\n         */\n        'parameter.header': string;\n    };\n    path: {\n        /**\n         * This is the parameter that goes into the path\n         */\n        'parameter.path.1'?: string;\n        /**\n         * This is the parameter that goes into the path\n         */\n        'parameter-path-2'?: string;\n        /**\n         * This is the parameter that goes into the path\n         */\n        'PARAMETER-PATH-3'?: string;\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string;\n    };\n    query: {\n        /**\n         * This is the parameter with a reserved keyword\n         */\n        default?: string;\n        /**\n         * This is the parameter that goes into the request query params\n         */\n        'parameter-query': string;\n    };\n    url: '/api/v{api-version}/parameters/{parameter.path.1}/{parameter-path-2}/{PARAMETER-PATH-3}';\n};\n\nexport type CallWithDefaultParametersData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * This is a simple string with default value\n         */\n        parameterString: string;\n        /**\n         * This is a simple number with default value\n         */\n        parameterNumber: number;\n        /**\n         * This is a simple boolean with default value\n         */\n        parameterBoolean: boolean;\n        /**\n         * This is a simple enum with default value\n         */\n        parameterEnum: 'Success' | 'Warning' | 'Error';\n        /**\n         * This is a model with one string property\n         */\n        parameterModel: {\n            /**\n             * This is a simple string property\n             */\n            prop?: string;\n        };\n    };\n    url: '/api/v{api-version}/defaults';\n};\n\nexport type CallWithDefaultOptionalParametersData = {\n    body?: never;\n    path?: never;\n    query?: {\n        /**\n         * This is a simple string that is optional with default value\n         */\n        parameterString?: string;\n        /**\n         * This is a simple number that is optional with default value\n         */\n        parameterNumber?: number;\n        /**\n         * This is a simple boolean that is optional with default value\n         */\n        parameterBoolean?: boolean;\n        /**\n         * This is a simple enum that is optional with default value\n         */\n        parameterEnum?: 'Success' | 'Warning' | 'Error';\n    };\n    url: '/api/v{api-version}/defaults';\n};\n\nexport type CallToTestOrderOfParamsData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * This is a optional string with default\n         */\n        parameterOptionalStringWithDefault?: string;\n        /**\n         * This is a optional string with empty default\n         */\n        parameterOptionalStringWithEmptyDefault?: string;\n        /**\n         * This is a optional string with no default\n         */\n        parameterOptionalStringWithNoDefault?: string;\n        /**\n         * This is a string with default\n         */\n        parameterStringWithDefault: string;\n        /**\n         * This is a string with empty default\n         */\n        parameterStringWithEmptyDefault: string;\n        /**\n         * This is a string with no default\n         */\n        parameterStringWithNoDefault: string;\n        /**\n         * This is a string that can be null with no default\n         */\n        parameterStringNullableWithNoDefault?: string | null;\n        /**\n         * This is a string that can be null with default\n         */\n        parameterStringNullableWithDefault?: string | null;\n    };\n    url: '/api/v{api-version}/defaults';\n};\n\nexport type DuplicateNameData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/duplicate';\n};\n\nexport type DuplicateName2Data = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/duplicate';\n};\n\nexport type DuplicateName3Data = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/duplicate';\n};\n\nexport type DuplicateName4Data = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/duplicate';\n};\n\nexport type CallWithNoContentResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no-content';\n};\n\nexport type CallWithNoContentResponseResponses = {\n    /**\n     * Success\n     */\n    204: unknown;\n};\n\nexport type CallWithResponseAndNoContentResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multiple-tags/response-and-no-content';\n};\n\nexport type CallWithResponseAndNoContentResponseResponses = {\n    /**\n     * Response is a simple number\n     */\n    200: number;\n    /**\n     * Success\n     */\n    204: unknown;\n};\n\nexport type CallWithResponseAndNoContentResponseResponse = CallWithResponseAndNoContentResponseResponses[keyof CallWithResponseAndNoContentResponseResponses];\n\nexport type DummyAData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multiple-tags/a';\n};\n\nexport type DummyAResponses = {\n    /**\n     * Success\n     */\n    204: unknown;\n};\n\nexport type DummyBData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multiple-tags/b';\n};\n\nexport type DummyBResponses = {\n    /**\n     * Success\n     */\n    204: unknown;\n};\n\nexport type CallWithResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/response';\n};\n\nexport type CallWithResponseResponses = {\n    /**\n     * Message for default response\n     */\n    default: ModelWithString;\n};\n\nexport type CallWithResponseResponse = CallWithResponseResponses[keyof CallWithResponseResponses];\n\nexport type CallWithDuplicateResponsesData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/response';\n};\n\nexport type CallWithDuplicateResponsesErrors = {\n    /**\n     * Message for 500 error\n     */\n    500: ModelWithStringError;\n    /**\n     * Message for 501 error\n     */\n    501: ModelWithStringError;\n    /**\n     * Message for 502 error\n     */\n    502: ModelWithStringError;\n    /**\n     * Message for default response\n     */\n    default: ModelWithString;\n};\n\nexport type CallWithDuplicateResponsesError = CallWithDuplicateResponsesErrors[keyof CallWithDuplicateResponsesErrors];\n\nexport type CallWithDuplicateResponsesResponses = {\n    /**\n     * Message for 201 response\n     */\n    201: ModelWithString;\n    /**\n     * Message for 202 response\n     */\n    202: ModelWithString;\n};\n\nexport type CallWithDuplicateResponsesResponse = CallWithDuplicateResponsesResponses[keyof CallWithDuplicateResponsesResponses];\n\nexport type CallWithResponsesData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/response';\n};\n\nexport type CallWithResponsesErrors = {\n    /**\n     * Message for 500 error\n     */\n    500: ModelWithStringError;\n    /**\n     * Message for 501 error\n     */\n    501: ModelWithStringError;\n    /**\n     * Message for 502 error\n     */\n    502: ModelWithStringError;\n    /**\n     * Message for default response\n     */\n    default: ModelWithString;\n};\n\nexport type CallWithResponsesError = CallWithResponsesErrors[keyof CallWithResponsesErrors];\n\nexport type CallWithResponsesResponses = {\n    /**\n     * Message for 200 response\n     */\n    200: {\n        readonly '@namespace.string'?: string;\n        readonly '@namespace.integer'?: number;\n        readonly value?: Array<ModelWithString>;\n    };\n    /**\n     * Message for 201 response\n     */\n    201: ModelThatExtends;\n    /**\n     * Message for 202 response\n     */\n    202: ModelThatExtendsExtends;\n};\n\nexport type CallWithResponsesResponse = CallWithResponsesResponses[keyof CallWithResponsesResponses];\n\nexport type CollectionFormatData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * This is an array parameter that is sent as csv format (comma-separated values)\n         */\n        parameterArrayCSV: Array<string>;\n        /**\n         * This is an array parameter that is sent as ssv format (space-separated values)\n         */\n        parameterArraySSV: Array<string>;\n        /**\n         * This is an array parameter that is sent as tsv format (tab-separated values)\n         */\n        parameterArrayTSV: Array<string>;\n        /**\n         * This is an array parameter that is sent as pipes format (pipe-separated values)\n         */\n        parameterArrayPipes: Array<string>;\n        /**\n         * This is an array parameter that is sent as multi format (multiple parameter instances)\n         */\n        parameterArrayMulti: Array<string>;\n    };\n    url: '/api/v{api-version}/collectionFormat';\n};\n\nexport type TypesData = {\n    body?: never;\n    path?: {\n        /**\n         * This is a number parameter\n         */\n        id?: number;\n    };\n    query: {\n        /**\n         * This is a number parameter\n         */\n        parameterNumber: number;\n        /**\n         * This is a string parameter\n         */\n        parameterString: string;\n        /**\n         * This is a boolean parameter\n         */\n        parameterBoolean: boolean;\n        /**\n         * This is an array parameter\n         */\n        parameterArray: Array<string>;\n        /**\n         * This is a dictionary parameter\n         */\n        parameterDictionary: {\n            [key: string]: unknown;\n        };\n        /**\n         * This is an enum parameter\n         */\n        parameterEnum: 'Success' | 'Warning' | 'Error';\n    };\n    url: '/api/v{api-version}/types';\n};\n\nexport type TypesResponses = {\n    /**\n     * Response is a simple number\n     */\n    200: number;\n    /**\n     * Response is a simple string\n     */\n    201: string;\n    /**\n     * Response is a simple boolean\n     */\n    202: boolean;\n    /**\n     * Response is a simple object\n     */\n    203: {\n        [key: string]: unknown;\n    };\n};\n\nexport type TypesResponse = TypesResponses[keyof TypesResponses];\n\nexport type ComplexTypesData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * Parameter containing object\n         */\n        parameterObject: {\n            first?: {\n                second?: {\n                    third?: string;\n                };\n            };\n        };\n        /**\n         * This is a model with one string property\n         */\n        parameterReference: {\n            /**\n             * This is a simple string property\n             */\n            prop?: string;\n        };\n    };\n    url: '/api/v{api-version}/complex';\n};\n\nexport type ComplexTypesErrors = {\n    /**\n     * 400 server error\n     */\n    400: unknown;\n    /**\n     * 500 server error\n     */\n    500: unknown;\n};\n\nexport type ComplexTypesResponses = {\n    /**\n     * Successful response\n     */\n    200: Array<ModelWithString>;\n};\n\nexport type ComplexTypesResponse = ComplexTypesResponses[keyof ComplexTypesResponses];\n\nexport type CallWithResultFromHeaderData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/header';\n};\n\nexport type CallWithResultFromHeaderErrors = {\n    /**\n     * 400 server error\n     */\n    400: unknown;\n    /**\n     * 500 server error\n     */\n    500: unknown;\n};\n\nexport type CallWithResultFromHeaderResponses = {\n    /**\n     * Successful response\n     */\n    200: unknown;\n};\n\nexport type TestErrorCodeData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * Status code to return\n         */\n        status: string;\n    };\n    url: '/api/v{api-version}/error';\n};\n\nexport type TestErrorCodeErrors = {\n    /**\n     * Custom message: Internal Server Error\n     */\n    500: unknown;\n    /**\n     * Custom message: Not Implemented\n     */\n    501: unknown;\n    /**\n     * Custom message: Bad Gateway\n     */\n    502: unknown;\n    /**\n     * Custom message: Service Unavailable\n     */\n    503: unknown;\n};\n\nexport type TestErrorCodeResponses = {\n    /**\n     * Custom message: Successful response\n     */\n    200: unknown;\n};\n\nexport type NonAsciiæøåÆøÅöôêÊ字符串Data = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * Dummy input param\n         */\n        nonAsciiParamæøåÆØÅöôêÊ: number;\n    };\n    url: '/api/v{api-version}/non-ascii-æøåÆØÅöôêÊ字符串';\n};\n\nexport type NonAsciiæøåÆøÅöôêÊ字符串Responses = {\n    /**\n     * Successful response\n     */\n    200: NonAsciiStringæøåÆøÅöôêÊ字符串;\n};\n\nexport type NonAsciiæøåÆøÅöôêÊ字符串Response = NonAsciiæøåÆøÅöôêÊ字符串Responses[keyof NonAsciiæøåÆøÅöôêÊ字符串Responses];\n\nexport type PostApiVbyApiVersionBodyData = {\n    /**\n     * Body should not be unknown\n     */\n    body: ParameterActivityParams;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/body';\n};\n\nexport type PostApiVbyApiVersionBodyErrors = {\n    /**\n     * Bad Request\n     */\n    400: FailureFailure;\n    /**\n     * Internal Server Error\n     */\n    500: FailureFailure;\n};\n\nexport type PostApiVbyApiVersionBodyError = PostApiVbyApiVersionBodyErrors[keyof PostApiVbyApiVersionBodyErrors];\n\nexport type PostApiVbyApiVersionBodyResponses = {\n    /**\n     * OK\n     */\n    200: ResponsePostActivityResponse;\n};\n\nexport type PostApiVbyApiVersionBodyResponse = PostApiVbyApiVersionBodyResponses[keyof PostApiVbyApiVersionBodyResponses];\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/angular-query-experimental/name-builder/@tanstack/angular-query-experimental.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport { type DefaultError, type MutationOptions, queryOptions } from '@tanstack/angular-query-experimental';\n\nimport { client } from '../client.gen';\nimport { fooBarPost, fooBarPut, fooPost, fooPut, getFoo, getFooBar, type Options } from '../sdk.gen';\nimport type { FooBarPostData, FooBarPostResponse, FooBarPutData, FooBarPutResponse, FooPostData, FooPostResponse, FooPutData, FooPutResponse, GetFooBarData, GetFooBarResponse, GetFooData, GetFooResponse } from '../types.gen';\n\nexport type QueryKey<TOptions extends Options> = [\n    Pick<TOptions, 'baseUrl' | 'body' | 'headers' | 'path' | 'query'> & {\n        _id: string;\n        _infinite?: boolean;\n        tags?: ReadonlyArray<string>;\n    }\n];\n\nconst createQueryKey = <TOptions extends Options>(id: string, options?: TOptions, infinite?: boolean, tags?: ReadonlyArray<string>): [\n    QueryKey<TOptions>[0]\n] => {\n    const params: QueryKey<TOptions>[0] = { _id: id, baseUrl: options?.baseUrl || (options?.client ?? client).getConfig().baseUrl } as QueryKey<TOptions>[0];\n    if (infinite) {\n        params._infinite = infinite;\n    }\n    if (tags) {\n        params.tags = tags;\n    }\n    if (options?.body) {\n        params.body = options.body;\n    }\n    if (options?.headers) {\n        params.headers = options.headers;\n    }\n    if (options?.path) {\n        params.path = options.path;\n    }\n    if (options?.query) {\n        params.query = options.query;\n    }\n    return [params];\n};\n\nexport const getFooD = (options?: Options<GetFooData>) => createQueryKey('getFoo', options);\n\nexport const getFooE = (options?: Options<GetFooData>) => queryOptions<GetFooResponse, DefaultError, GetFooResponse, ReturnType<typeof getFooD>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await getFoo({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: getFooD(options)\n});\n\nexport const fooPostC = (options?: Partial<Options<FooPostData>>): MutationOptions<FooPostResponse, DefaultError, Options<FooPostData>> => {\n    const mutationOptions: MutationOptions<FooPostResponse, DefaultError, Options<FooPostData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await fooPost({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const fooPutC = (options?: Partial<Options<FooPutData>>): MutationOptions<FooPutResponse, DefaultError, Options<FooPutData>> => {\n    const mutationOptions: MutationOptions<FooPutResponse, DefaultError, Options<FooPutData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await fooPut({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const getFooBarD = (options?: Options<GetFooBarData>) => createQueryKey('getFooBar', options);\n\nexport const getFooBarE = (options?: Options<GetFooBarData>) => queryOptions<GetFooBarResponse, DefaultError, GetFooBarResponse, ReturnType<typeof getFooBarD>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await getFooBar({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: getFooBarD(options)\n});\n\nexport const fooBarPostC = (options?: Partial<Options<FooBarPostData>>): MutationOptions<FooBarPostResponse, DefaultError, Options<FooBarPostData>> => {\n    const mutationOptions: MutationOptions<FooBarPostResponse, DefaultError, Options<FooBarPostData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await fooBarPost({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const fooBarPutC = (options?: Partial<Options<FooBarPutData>>): MutationOptions<FooBarPutResponse, DefaultError, Options<FooBarPutData>> => {\n    const mutationOptions: MutationOptions<FooBarPutResponse, DefaultError, Options<FooBarPutData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await fooBarPut({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/angular-query-experimental/name-builder/client/client.gen.ts",
    "content": "// 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 (options: RequestOptions) => {\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 url = buildUrl(opts);\n\n    return { opts, url };\n  };\n\n  const request: Client['request'] = async (options) => {\n    // @ts-expect-error\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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/angular-query-experimental/name-builder/client/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type { Auth } from '../core/auth.gen';\nexport type { QuerySerializerOptions } from '../core/bodySerializer.gen';\nexport {\n  formDataBodySerializer,\n  jsonBodySerializer,\n  urlSearchParamsBodySerializer,\n} from '../core/bodySerializer.gen';\nexport { buildClientParams } from '../core/params.gen';\nexport { serializeQueryKeyValue } from '../core/queryKeySerializer.gen';\nexport { createClient } from './client.gen';\nexport type {\n  Client,\n  ClientOptions,\n  Config,\n  CreateClientConfig,\n  Options,\n  RequestOptions,\n  RequestResult,\n  ResolvedRequestOptions,\n  ResponseStyle,\n  TDataShape,\n} from './types.gen';\nexport { createConfig, mergeHeaders } from './utils.gen';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/angular-query-experimental/name-builder/client/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { Auth } from '../core/auth.gen';\nimport type {\n  ServerSentEventsOptions,\n  ServerSentEventsResult,\n} from '../core/serverSentEvents.gen';\nimport type { Client as CoreClient, Config as CoreConfig } from '../core/types.gen';\nimport type { Middleware } from './utils.gen';\n\nexport type ResponseStyle = 'data' | 'fields';\n\nexport interface Config<T extends ClientOptions = ClientOptions>\n  extends Omit<RequestInit, 'body' | 'headers' | 'method'>, CoreConfig {\n  /**\n   * Base URL for all requests made by this client.\n   */\n  baseUrl?: T['baseUrl'];\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   * Please don't use the Fetch client for Next.js applications. The `next`\n   * options won't have any effect.\n   *\n   * Install {@link https://www.npmjs.com/package/@hey-api/client-next `@hey-api/client-next`} instead.\n   */\n  next?: never;\n  /**\n   * Return the response data parsed in a specified format. By default, `auto`\n   * will infer the appropriate method from the `Content-Type` response header.\n   * You can override this behavior with any of the {@link Body} methods.\n   * Select `stream` if you don't want to parse response data at all.\n   *\n   * @default 'auto'\n   */\n  parseAs?: 'arrayBuffer' | 'auto' | 'blob' | 'formData' | 'json' | 'stream' | 'text';\n  /**\n   * Should we return only data or multiple fields (data, error, response, etc.)?\n   *\n   * @default 'fields'\n   */\n  responseStyle?: ResponseStyle;\n  /**\n   * Throw an error instead of returning it in the response?\n   *\n   * @default false\n   */\n  throwOnError?: T['throwOnError'];\n}\n\nexport interface RequestOptions<\n  TData = unknown,\n  TResponseStyle extends ResponseStyle = 'fields',\n  ThrowOnError extends boolean = boolean,\n  Url extends string = string,\n>\n  extends\n    Config<{\n      responseStyle: TResponseStyle;\n      throwOnError: ThrowOnError;\n    }>,\n    Pick<\n      ServerSentEventsOptions<TData>,\n      | 'onRequest'\n      | 'onSseError'\n      | 'onSseEvent'\n      | 'sseDefaultRetryDelay'\n      | 'sseMaxRetryAttempts'\n      | 'sseMaxRetryDelay'\n    > {\n  /**\n   * Any body that you want to add to your request.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/fetch#body}\n   */\n  body?: unknown;\n  path?: Record<string, unknown>;\n  query?: Record<string, unknown>;\n  /**\n   * Security mechanism(s) to use for the request.\n   */\n  security?: ReadonlyArray<Auth>;\n  url: Url;\n}\n\nexport interface ResolvedRequestOptions<\n  TResponseStyle extends ResponseStyle = 'fields',\n  ThrowOnError extends boolean = boolean,\n  Url extends string = string,\n> extends RequestOptions<unknown, TResponseStyle, ThrowOnError, Url> {\n  serializedBody?: string;\n}\n\nexport type RequestResult<\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = boolean,\n  TResponseStyle extends ResponseStyle = 'fields',\n> = ThrowOnError extends true\n  ? Promise<\n      TResponseStyle extends 'data'\n        ? TData extends Record<string, unknown>\n          ? TData[keyof TData]\n          : TData\n        : {\n            data: TData extends Record<string, unknown> ? TData[keyof TData] : TData;\n            request: Request;\n            response: Response;\n          }\n    >\n  : Promise<\n      TResponseStyle extends 'data'\n        ? (TData extends Record<string, unknown> ? TData[keyof TData] : TData) | undefined\n        : (\n            | {\n                data: TData extends Record<string, unknown> ? TData[keyof TData] : TData;\n                error: undefined;\n              }\n            | {\n                data: undefined;\n                error: TError extends Record<string, unknown> ? TError[keyof TError] : TError;\n              }\n          ) & {\n            request: Request;\n            response: Response;\n          }\n    >;\n\nexport interface ClientOptions {\n  baseUrl?: string;\n  responseStyle?: ResponseStyle;\n  throwOnError?: boolean;\n}\n\ntype MethodFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'>,\n) => RequestResult<TData, TError, ThrowOnError, TResponseStyle>;\n\ntype SseFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'>,\n) => Promise<ServerSentEventsResult<TData, TError>>;\n\ntype RequestFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'> &\n    Pick<Required<RequestOptions<TData, TResponseStyle, ThrowOnError>>, 'method'>,\n) => RequestResult<TData, TError, ThrowOnError, TResponseStyle>;\n\ntype BuildUrlFn = <\n  TData extends {\n    body?: unknown;\n    path?: Record<string, unknown>;\n    query?: Record<string, unknown>;\n    url: string;\n  },\n>(\n  options: TData & Options<TData>,\n) => string;\n\nexport type Client = CoreClient<RequestFn, Config, MethodFn, BuildUrlFn, SseFn> & {\n  interceptors: Middleware<Request, Response, unknown, ResolvedRequestOptions>;\n};\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 = ClientOptions> = (\n  override?: Config<ClientOptions & T>,\n) => Config<Required<ClientOptions> & T>;\n\nexport interface TDataShape {\n  body?: unknown;\n  headers?: unknown;\n  path?: unknown;\n  query?: unknown;\n  url: string;\n}\n\ntype OmitKeys<T, K> = Pick<T, Exclude<keyof T, K>>;\n\nexport type Options<\n  TData extends TDataShape = TDataShape,\n  ThrowOnError extends boolean = boolean,\n  TResponse = unknown,\n  TResponseStyle extends ResponseStyle = 'fields',\n> = OmitKeys<\n  RequestOptions<TResponse, TResponseStyle, ThrowOnError>,\n  'body' | 'path' | 'query' | 'url'\n> &\n  ([TData] extends [never] ? unknown : Omit<TData, 'url'>);\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/angular-query-experimental/name-builder/client/utils.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/angular-query-experimental/name-builder/client.gen.ts",
    "content": "// 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>());\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/angular-query-experimental/name-builder/core/auth.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/angular-query-experimental/name-builder/core/bodySerializer.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/angular-query-experimental/name-builder/core/params.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/angular-query-experimental/name-builder/core/pathSerializer.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/angular-query-experimental/name-builder/core/queryKeySerializer.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\n/**\n * JSON-friendly union that mirrors what Pinia Colada can hash.\n */\nexport type JsonValue =\n  | null\n  | string\n  | number\n  | boolean\n  | JsonValue[]\n  | { [key: string]: JsonValue };\n\n/**\n * Replacer that converts non-JSON values (bigint, Date, etc.) to safe substitutes.\n */\nexport const queryKeyJsonReplacer = (_key: string, value: unknown) => {\n  if (value === undefined || typeof value === 'function' || typeof value === 'symbol') {\n    return undefined;\n  }\n  if (typeof value === 'bigint') {\n    return value.toString();\n  }\n  if (value instanceof Date) {\n    return value.toISOString();\n  }\n  return value;\n};\n\n/**\n * Safely stringifies a value and parses it back into a JsonValue.\n */\nexport const stringifyToJsonValue = (input: unknown): JsonValue | undefined => {\n  try {\n    const json = JSON.stringify(input, queryKeyJsonReplacer);\n    if (json === undefined) {\n      return undefined;\n    }\n    return JSON.parse(json) as JsonValue;\n  } catch {\n    return undefined;\n  }\n};\n\n/**\n * Detects plain objects (including objects with a null prototype).\n */\nconst isPlainObject = (value: unknown): value is Record<string, unknown> => {\n  if (value === null || typeof value !== 'object') {\n    return false;\n  }\n  const prototype = Object.getPrototypeOf(value as object);\n  return prototype === Object.prototype || prototype === null;\n};\n\n/**\n * Turns URLSearchParams into a sorted JSON object for deterministic keys.\n */\nconst serializeSearchParams = (params: URLSearchParams): JsonValue => {\n  const entries = Array.from(params.entries()).sort(([a], [b]) => a.localeCompare(b));\n  const result: Record<string, JsonValue> = {};\n\n  for (const [key, value] of entries) {\n    const existing = result[key];\n    if (existing === undefined) {\n      result[key] = value;\n      continue;\n    }\n\n    if (Array.isArray(existing)) {\n      (existing as string[]).push(value);\n    } else {\n      result[key] = [existing, value];\n    }\n  }\n\n  return result;\n};\n\n/**\n * Normalizes any accepted value into a JSON-friendly shape for query keys.\n */\nexport const serializeQueryKeyValue = (value: unknown): JsonValue | undefined => {\n  if (value === null) {\n    return null;\n  }\n\n  if (typeof value === 'string' || typeof value === 'number' || typeof value === 'boolean') {\n    return value;\n  }\n\n  if (value === undefined || typeof value === 'function' || typeof value === 'symbol') {\n    return undefined;\n  }\n\n  if (typeof value === 'bigint') {\n    return value.toString();\n  }\n\n  if (value instanceof Date) {\n    return value.toISOString();\n  }\n\n  if (Array.isArray(value)) {\n    return stringifyToJsonValue(value);\n  }\n\n  if (typeof URLSearchParams !== 'undefined' && value instanceof URLSearchParams) {\n    return serializeSearchParams(value);\n  }\n\n  if (isPlainObject(value)) {\n    return stringifyToJsonValue(value);\n  }\n\n  return undefined;\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/angular-query-experimental/name-builder/core/serverSentEvents.gen.ts",
    "content": "// 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 const 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            // Normalize line endings: CRLF -> LF, then CR -> LF\n            buffer = buffer.replace(/\\r\\n/g, '\\n').replace(/\\r/g, '\\n');\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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/angular-query-experimental/name-builder/core/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { Auth, AuthToken } from './auth.gen';\nimport type { BodySerializer, QuerySerializer, QuerySerializerOptions } from './bodySerializer.gen';\n\nexport type HttpMethod =\n  | 'connect'\n  | 'delete'\n  | 'get'\n  | 'head'\n  | 'options'\n  | 'patch'\n  | 'post'\n  | 'put'\n  | 'trace';\n\nexport type Client<\n  RequestFn = never,\n  Config = unknown,\n  MethodFn = never,\n  BuildUrlFn = never,\n  SseFn = never,\n> = {\n  /**\n   * Returns the final request URL.\n   */\n  buildUrl: BuildUrlFn;\n  getConfig: () => Config;\n  request: RequestFn;\n  setConfig: (config: Config) => Config;\n} & {\n  [K in HttpMethod]: MethodFn;\n} & ([SseFn] extends [never] ? { sse?: never } : { sse: { [K in HttpMethod]: SseFn } });\n\nexport interface Config {\n  /**\n   * Auth token or a function returning auth token. The resolved value will be\n   * added to the request payload as defined by its `security` array.\n   */\n  auth?: ((auth: Auth) => Promise<AuthToken> | AuthToken) | AuthToken;\n  /**\n   * A function for serializing request body parameter. By default,\n   * {@link JSON.stringify()} will be used.\n   */\n  bodySerializer?: BodySerializer | null;\n  /**\n   * An object containing any HTTP headers that you want to pre-populate your\n   * `Headers` object with.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/Headers/Headers#init See more}\n   */\n  headers?:\n    | RequestInit['headers']\n    | Record<\n        string,\n        string | number | boolean | (string | number | boolean)[] | null | undefined | unknown\n      >;\n  /**\n   * The request method.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/fetch#method See more}\n   */\n  method?: Uppercase<HttpMethod>;\n  /**\n   * A function for serializing request query parameters. By default, arrays\n   * will be exploded in form style, objects will be exploded in deepObject\n   * style, and reserved characters are percent-encoded.\n   *\n   * This method will have no effect if the native `paramsSerializer()` Axios\n   * API function is used.\n   *\n   * {@link https://swagger.io/docs/specification/serialization/#query View examples}\n   */\n  querySerializer?: QuerySerializer | QuerySerializerOptions;\n  /**\n   * A function validating request data. This is useful if you want to ensure\n   * the request conforms to the desired shape, so it can be safely sent to\n   * the server.\n   */\n  requestValidator?: (data: unknown) => Promise<unknown>;\n  /**\n   * A function transforming response data before it's returned. This is useful\n   * for post-processing data, e.g. converting ISO strings into Date objects.\n   */\n  responseTransformer?: (data: unknown) => Promise<unknown>;\n  /**\n   * A function validating response data. This is useful if you want to ensure\n   * the response conforms to the desired shape, so it can be safely passed to\n   * the transformers and returned to the user.\n   */\n  responseValidator?: (data: unknown) => Promise<unknown>;\n}\n\ntype IsExactlyNeverOrNeverUndefined<T> = [T] extends [never]\n  ? true\n  : [T] extends [never | undefined]\n    ? [undefined] extends [T]\n      ? false\n      : true\n    : false;\n\nexport type OmitNever<T extends Record<string, unknown>> = {\n  [K in keyof T as IsExactlyNeverOrNeverUndefined<T[K]> extends true ? never : K]: T[K];\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/angular-query-experimental/name-builder/core/utils.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/angular-query-experimental/name-builder/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport { fooBarPost, fooBarPut, fooPost, fooPut, getFoo, getFooBar, type Options } from './sdk.gen';\nexport type { ClientOptions, FooBarPostData, FooBarPostResponse, FooBarPostResponses, FooBarPutData, FooBarPutResponse, FooBarPutResponses, FooPostData, FooPostResponse, FooPostResponses, FooPutData, FooPutResponse, FooPutResponses, GetFooBarData, GetFooBarResponse, GetFooBarResponses, GetFooData, GetFooResponse, GetFooResponses } from './types.gen';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/angular-query-experimental/name-builder/sdk.gen.ts",
    "content": "// 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 { FooBarPostData, FooBarPostResponses, FooBarPutData, FooBarPutResponses, FooPostData, FooPostResponses, FooPutData, FooPutResponses, GetFooBarData, GetFooBarResponses, GetFooData, GetFooResponses } from './types.gen';\n\nexport type Options<TData extends TDataShape = TDataShape, ThrowOnError extends boolean = boolean> = Options2<TData, ThrowOnError> & {\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\nexport const getFoo = <ThrowOnError extends boolean = false>(options?: Options<GetFooData, ThrowOnError>) => (options?.client ?? client).get<GetFooResponses, unknown, ThrowOnError>({ url: '/foo', ...options });\n\nexport const fooPost = <ThrowOnError extends boolean = false>(options?: Options<FooPostData, ThrowOnError>) => (options?.client ?? client).post<FooPostResponses, unknown, ThrowOnError>({ url: '/foo', ...options });\n\nexport const fooPut = <ThrowOnError extends boolean = false>(options?: Options<FooPutData, ThrowOnError>) => (options?.client ?? client).put<FooPutResponses, unknown, ThrowOnError>({ url: '/foo', ...options });\n\nexport const getFooBar = <ThrowOnError extends boolean = false>(options?: Options<GetFooBarData, ThrowOnError>) => (options?.client ?? client).get<GetFooBarResponses, unknown, ThrowOnError>({ url: '/foo/bar', ...options });\n\nexport const fooBarPost = <ThrowOnError extends boolean = false>(options?: Options<FooBarPostData, ThrowOnError>) => (options?.client ?? client).post<FooBarPostResponses, unknown, ThrowOnError>({ url: '/foo/bar', ...options });\n\nexport const fooBarPut = <ThrowOnError extends boolean = false>(options?: Options<FooBarPutData, ThrowOnError>) => (options?.client ?? client).put<FooBarPutResponses, unknown, ThrowOnError>({ url: '/foo/bar', ...options });\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/angular-query-experimental/name-builder/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type ClientOptions = {\n    baseUrl: string;\n};\n\nexport type GetFooData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/foo';\n};\n\nexport type GetFooResponses = {\n    /**\n     * OK\n     */\n    200: string;\n};\n\nexport type GetFooResponse = GetFooResponses[keyof GetFooResponses];\n\nexport type FooPostData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/foo';\n};\n\nexport type FooPostResponses = {\n    /**\n     * OK\n     */\n    200: string;\n};\n\nexport type FooPostResponse = FooPostResponses[keyof FooPostResponses];\n\nexport type FooPutData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/foo';\n};\n\nexport type FooPutResponses = {\n    /**\n     * OK\n     */\n    200: string;\n};\n\nexport type FooPutResponse = FooPutResponses[keyof FooPutResponses];\n\nexport type GetFooBarData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/foo/bar';\n};\n\nexport type GetFooBarResponses = {\n    /**\n     * OK\n     */\n    200: string;\n};\n\nexport type GetFooBarResponse = GetFooBarResponses[keyof GetFooBarResponses];\n\nexport type FooBarPostData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/foo/bar';\n};\n\nexport type FooBarPostResponses = {\n    /**\n     * OK\n     */\n    200: string;\n};\n\nexport type FooBarPostResponse = FooBarPostResponses[keyof FooBarPostResponses];\n\nexport type FooBarPutData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/foo/bar';\n};\n\nexport type FooBarPutResponses = {\n    /**\n     * OK\n     */\n    200: string;\n};\n\nexport type FooBarPutResponse = FooBarPutResponses[keyof FooBarPutResponses];\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/preact-query/asClass/@tanstack/preact-query.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport { type DefaultError, queryOptions, type UseMutationOptions } from '@tanstack/preact-query';\n\nimport { client } from '../client.gen';\nimport { BarBazService, BarService, FooBazService, FooService, type Options } from '../sdk.gen';\nimport type { FooBarPostData, FooBarPostResponse, FooBarPutData, FooBarPutResponse, FooPostData, FooPostResponse, FooPutData, FooPutResponse, GetFooBarData, GetFooBarResponse, GetFooData, GetFooResponse } from '../types.gen';\n\nexport type QueryKey<TOptions extends Options> = [\n    Pick<TOptions, 'baseUrl' | 'body' | 'headers' | 'path' | 'query'> & {\n        _id: string;\n        _infinite?: boolean;\n        tags?: ReadonlyArray<string>;\n    }\n];\n\nconst createQueryKey = <TOptions extends Options>(id: string, options?: TOptions, infinite?: boolean, tags?: ReadonlyArray<string>): [\n    QueryKey<TOptions>[0]\n] => {\n    const params: QueryKey<TOptions>[0] = { _id: id, baseUrl: options?.baseUrl || (options?.client ?? client).getConfig().baseUrl } as QueryKey<TOptions>[0];\n    if (infinite) {\n        params._infinite = infinite;\n    }\n    if (tags) {\n        params.tags = tags;\n    }\n    if (options?.body) {\n        params.body = options.body;\n    }\n    if (options?.headers) {\n        params.headers = options.headers;\n    }\n    if (options?.path) {\n        params.path = options.path;\n    }\n    if (options?.query) {\n        params.query = options.query;\n    }\n    return [params];\n};\n\nexport const getFooQueryKey = (options?: Options<GetFooData>) => createQueryKey('getFoo', options);\n\nexport const getFooOptions = (options?: Options<GetFooData>) => queryOptions<GetFooResponse, DefaultError, GetFooResponse, ReturnType<typeof getFooQueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await FooBazService.getFoo({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: getFooQueryKey(options)\n});\n\nexport const fooPostMutation = (options?: Partial<Options<FooPostData>>): UseMutationOptions<FooPostResponse, DefaultError, Options<FooPostData>> => {\n    const mutationOptions: UseMutationOptions<FooPostResponse, DefaultError, Options<FooPostData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await FooService.post({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const fooPutMutation = (options?: Partial<Options<FooPutData>>): UseMutationOptions<FooPutResponse, DefaultError, Options<FooPutData>> => {\n    const mutationOptions: UseMutationOptions<FooPutResponse, DefaultError, Options<FooPutData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await FooService.put({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const getFooBarQueryKey = (options?: Options<GetFooBarData>) => createQueryKey('getFooBar', options);\n\nexport const getFooBarOptions = (options?: Options<GetFooBarData>) => queryOptions<GetFooBarResponse, DefaultError, GetFooBarResponse, ReturnType<typeof getFooBarQueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await BarBazService.getFooBar({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: getFooBarQueryKey(options)\n});\n\nexport const fooBarPostMutation = (options?: Partial<Options<FooBarPostData>>): UseMutationOptions<FooBarPostResponse, DefaultError, Options<FooBarPostData>> => {\n    const mutationOptions: UseMutationOptions<FooBarPostResponse, DefaultError, Options<FooBarPostData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await BarService.post({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const fooBarPutMutation = (options?: Partial<Options<FooBarPutData>>): UseMutationOptions<FooBarPutResponse, DefaultError, Options<FooBarPutData>> => {\n    const mutationOptions: UseMutationOptions<FooBarPutResponse, DefaultError, Options<FooBarPutData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await BarService.put({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/preact-query/asClass/client/client.gen.ts",
    "content": "// 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 (options: RequestOptions) => {\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 url = buildUrl(opts);\n\n    return { opts, url };\n  };\n\n  const request: Client['request'] = async (options) => {\n    // @ts-expect-error\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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/preact-query/asClass/client/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type { Auth } from '../core/auth.gen';\nexport type { QuerySerializerOptions } from '../core/bodySerializer.gen';\nexport {\n  formDataBodySerializer,\n  jsonBodySerializer,\n  urlSearchParamsBodySerializer,\n} from '../core/bodySerializer.gen';\nexport { buildClientParams } from '../core/params.gen';\nexport { serializeQueryKeyValue } from '../core/queryKeySerializer.gen';\nexport { createClient } from './client.gen';\nexport type {\n  Client,\n  ClientOptions,\n  Config,\n  CreateClientConfig,\n  Options,\n  RequestOptions,\n  RequestResult,\n  ResolvedRequestOptions,\n  ResponseStyle,\n  TDataShape,\n} from './types.gen';\nexport { createConfig, mergeHeaders } from './utils.gen';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/preact-query/asClass/client/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { Auth } from '../core/auth.gen';\nimport type {\n  ServerSentEventsOptions,\n  ServerSentEventsResult,\n} from '../core/serverSentEvents.gen';\nimport type { Client as CoreClient, Config as CoreConfig } from '../core/types.gen';\nimport type { Middleware } from './utils.gen';\n\nexport type ResponseStyle = 'data' | 'fields';\n\nexport interface Config<T extends ClientOptions = ClientOptions>\n  extends Omit<RequestInit, 'body' | 'headers' | 'method'>, CoreConfig {\n  /**\n   * Base URL for all requests made by this client.\n   */\n  baseUrl?: T['baseUrl'];\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   * Please don't use the Fetch client for Next.js applications. The `next`\n   * options won't have any effect.\n   *\n   * Install {@link https://www.npmjs.com/package/@hey-api/client-next `@hey-api/client-next`} instead.\n   */\n  next?: never;\n  /**\n   * Return the response data parsed in a specified format. By default, `auto`\n   * will infer the appropriate method from the `Content-Type` response header.\n   * You can override this behavior with any of the {@link Body} methods.\n   * Select `stream` if you don't want to parse response data at all.\n   *\n   * @default 'auto'\n   */\n  parseAs?: 'arrayBuffer' | 'auto' | 'blob' | 'formData' | 'json' | 'stream' | 'text';\n  /**\n   * Should we return only data or multiple fields (data, error, response, etc.)?\n   *\n   * @default 'fields'\n   */\n  responseStyle?: ResponseStyle;\n  /**\n   * Throw an error instead of returning it in the response?\n   *\n   * @default false\n   */\n  throwOnError?: T['throwOnError'];\n}\n\nexport interface RequestOptions<\n  TData = unknown,\n  TResponseStyle extends ResponseStyle = 'fields',\n  ThrowOnError extends boolean = boolean,\n  Url extends string = string,\n>\n  extends\n    Config<{\n      responseStyle: TResponseStyle;\n      throwOnError: ThrowOnError;\n    }>,\n    Pick<\n      ServerSentEventsOptions<TData>,\n      | 'onRequest'\n      | 'onSseError'\n      | 'onSseEvent'\n      | 'sseDefaultRetryDelay'\n      | 'sseMaxRetryAttempts'\n      | 'sseMaxRetryDelay'\n    > {\n  /**\n   * Any body that you want to add to your request.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/fetch#body}\n   */\n  body?: unknown;\n  path?: Record<string, unknown>;\n  query?: Record<string, unknown>;\n  /**\n   * Security mechanism(s) to use for the request.\n   */\n  security?: ReadonlyArray<Auth>;\n  url: Url;\n}\n\nexport interface ResolvedRequestOptions<\n  TResponseStyle extends ResponseStyle = 'fields',\n  ThrowOnError extends boolean = boolean,\n  Url extends string = string,\n> extends RequestOptions<unknown, TResponseStyle, ThrowOnError, Url> {\n  serializedBody?: string;\n}\n\nexport type RequestResult<\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = boolean,\n  TResponseStyle extends ResponseStyle = 'fields',\n> = ThrowOnError extends true\n  ? Promise<\n      TResponseStyle extends 'data'\n        ? TData extends Record<string, unknown>\n          ? TData[keyof TData]\n          : TData\n        : {\n            data: TData extends Record<string, unknown> ? TData[keyof TData] : TData;\n            request: Request;\n            response: Response;\n          }\n    >\n  : Promise<\n      TResponseStyle extends 'data'\n        ? (TData extends Record<string, unknown> ? TData[keyof TData] : TData) | undefined\n        : (\n            | {\n                data: TData extends Record<string, unknown> ? TData[keyof TData] : TData;\n                error: undefined;\n              }\n            | {\n                data: undefined;\n                error: TError extends Record<string, unknown> ? TError[keyof TError] : TError;\n              }\n          ) & {\n            request: Request;\n            response: Response;\n          }\n    >;\n\nexport interface ClientOptions {\n  baseUrl?: string;\n  responseStyle?: ResponseStyle;\n  throwOnError?: boolean;\n}\n\ntype MethodFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'>,\n) => RequestResult<TData, TError, ThrowOnError, TResponseStyle>;\n\ntype SseFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'>,\n) => Promise<ServerSentEventsResult<TData, TError>>;\n\ntype RequestFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'> &\n    Pick<Required<RequestOptions<TData, TResponseStyle, ThrowOnError>>, 'method'>,\n) => RequestResult<TData, TError, ThrowOnError, TResponseStyle>;\n\ntype BuildUrlFn = <\n  TData extends {\n    body?: unknown;\n    path?: Record<string, unknown>;\n    query?: Record<string, unknown>;\n    url: string;\n  },\n>(\n  options: TData & Options<TData>,\n) => string;\n\nexport type Client = CoreClient<RequestFn, Config, MethodFn, BuildUrlFn, SseFn> & {\n  interceptors: Middleware<Request, Response, unknown, ResolvedRequestOptions>;\n};\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 = ClientOptions> = (\n  override?: Config<ClientOptions & T>,\n) => Config<Required<ClientOptions> & T>;\n\nexport interface TDataShape {\n  body?: unknown;\n  headers?: unknown;\n  path?: unknown;\n  query?: unknown;\n  url: string;\n}\n\ntype OmitKeys<T, K> = Pick<T, Exclude<keyof T, K>>;\n\nexport type Options<\n  TData extends TDataShape = TDataShape,\n  ThrowOnError extends boolean = boolean,\n  TResponse = unknown,\n  TResponseStyle extends ResponseStyle = 'fields',\n> = OmitKeys<\n  RequestOptions<TResponse, TResponseStyle, ThrowOnError>,\n  'body' | 'path' | 'query' | 'url'\n> &\n  ([TData] extends [never] ? unknown : Omit<TData, 'url'>);\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/preact-query/asClass/client/utils.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/preact-query/asClass/client.gen.ts",
    "content": "// 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>());\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/preact-query/asClass/core/auth.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/preact-query/asClass/core/bodySerializer.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/preact-query/asClass/core/params.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/preact-query/asClass/core/pathSerializer.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/preact-query/asClass/core/queryKeySerializer.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\n/**\n * JSON-friendly union that mirrors what Pinia Colada can hash.\n */\nexport type JsonValue =\n  | null\n  | string\n  | number\n  | boolean\n  | JsonValue[]\n  | { [key: string]: JsonValue };\n\n/**\n * Replacer that converts non-JSON values (bigint, Date, etc.) to safe substitutes.\n */\nexport const queryKeyJsonReplacer = (_key: string, value: unknown) => {\n  if (value === undefined || typeof value === 'function' || typeof value === 'symbol') {\n    return undefined;\n  }\n  if (typeof value === 'bigint') {\n    return value.toString();\n  }\n  if (value instanceof Date) {\n    return value.toISOString();\n  }\n  return value;\n};\n\n/**\n * Safely stringifies a value and parses it back into a JsonValue.\n */\nexport const stringifyToJsonValue = (input: unknown): JsonValue | undefined => {\n  try {\n    const json = JSON.stringify(input, queryKeyJsonReplacer);\n    if (json === undefined) {\n      return undefined;\n    }\n    return JSON.parse(json) as JsonValue;\n  } catch {\n    return undefined;\n  }\n};\n\n/**\n * Detects plain objects (including objects with a null prototype).\n */\nconst isPlainObject = (value: unknown): value is Record<string, unknown> => {\n  if (value === null || typeof value !== 'object') {\n    return false;\n  }\n  const prototype = Object.getPrototypeOf(value as object);\n  return prototype === Object.prototype || prototype === null;\n};\n\n/**\n * Turns URLSearchParams into a sorted JSON object for deterministic keys.\n */\nconst serializeSearchParams = (params: URLSearchParams): JsonValue => {\n  const entries = Array.from(params.entries()).sort(([a], [b]) => a.localeCompare(b));\n  const result: Record<string, JsonValue> = {};\n\n  for (const [key, value] of entries) {\n    const existing = result[key];\n    if (existing === undefined) {\n      result[key] = value;\n      continue;\n    }\n\n    if (Array.isArray(existing)) {\n      (existing as string[]).push(value);\n    } else {\n      result[key] = [existing, value];\n    }\n  }\n\n  return result;\n};\n\n/**\n * Normalizes any accepted value into a JSON-friendly shape for query keys.\n */\nexport const serializeQueryKeyValue = (value: unknown): JsonValue | undefined => {\n  if (value === null) {\n    return null;\n  }\n\n  if (typeof value === 'string' || typeof value === 'number' || typeof value === 'boolean') {\n    return value;\n  }\n\n  if (value === undefined || typeof value === 'function' || typeof value === 'symbol') {\n    return undefined;\n  }\n\n  if (typeof value === 'bigint') {\n    return value.toString();\n  }\n\n  if (value instanceof Date) {\n    return value.toISOString();\n  }\n\n  if (Array.isArray(value)) {\n    return stringifyToJsonValue(value);\n  }\n\n  if (typeof URLSearchParams !== 'undefined' && value instanceof URLSearchParams) {\n    return serializeSearchParams(value);\n  }\n\n  if (isPlainObject(value)) {\n    return stringifyToJsonValue(value);\n  }\n\n  return undefined;\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/preact-query/asClass/core/serverSentEvents.gen.ts",
    "content": "// 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 const 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            // Normalize line endings: CRLF -> LF, then CR -> LF\n            buffer = buffer.replace(/\\r\\n/g, '\\n').replace(/\\r/g, '\\n');\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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/preact-query/asClass/core/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { Auth, AuthToken } from './auth.gen';\nimport type { BodySerializer, QuerySerializer, QuerySerializerOptions } from './bodySerializer.gen';\n\nexport type HttpMethod =\n  | 'connect'\n  | 'delete'\n  | 'get'\n  | 'head'\n  | 'options'\n  | 'patch'\n  | 'post'\n  | 'put'\n  | 'trace';\n\nexport type Client<\n  RequestFn = never,\n  Config = unknown,\n  MethodFn = never,\n  BuildUrlFn = never,\n  SseFn = never,\n> = {\n  /**\n   * Returns the final request URL.\n   */\n  buildUrl: BuildUrlFn;\n  getConfig: () => Config;\n  request: RequestFn;\n  setConfig: (config: Config) => Config;\n} & {\n  [K in HttpMethod]: MethodFn;\n} & ([SseFn] extends [never] ? { sse?: never } : { sse: { [K in HttpMethod]: SseFn } });\n\nexport interface Config {\n  /**\n   * Auth token or a function returning auth token. The resolved value will be\n   * added to the request payload as defined by its `security` array.\n   */\n  auth?: ((auth: Auth) => Promise<AuthToken> | AuthToken) | AuthToken;\n  /**\n   * A function for serializing request body parameter. By default,\n   * {@link JSON.stringify()} will be used.\n   */\n  bodySerializer?: BodySerializer | null;\n  /**\n   * An object containing any HTTP headers that you want to pre-populate your\n   * `Headers` object with.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/Headers/Headers#init See more}\n   */\n  headers?:\n    | RequestInit['headers']\n    | Record<\n        string,\n        string | number | boolean | (string | number | boolean)[] | null | undefined | unknown\n      >;\n  /**\n   * The request method.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/fetch#method See more}\n   */\n  method?: Uppercase<HttpMethod>;\n  /**\n   * A function for serializing request query parameters. By default, arrays\n   * will be exploded in form style, objects will be exploded in deepObject\n   * style, and reserved characters are percent-encoded.\n   *\n   * This method will have no effect if the native `paramsSerializer()` Axios\n   * API function is used.\n   *\n   * {@link https://swagger.io/docs/specification/serialization/#query View examples}\n   */\n  querySerializer?: QuerySerializer | QuerySerializerOptions;\n  /**\n   * A function validating request data. This is useful if you want to ensure\n   * the request conforms to the desired shape, so it can be safely sent to\n   * the server.\n   */\n  requestValidator?: (data: unknown) => Promise<unknown>;\n  /**\n   * A function transforming response data before it's returned. This is useful\n   * for post-processing data, e.g. converting ISO strings into Date objects.\n   */\n  responseTransformer?: (data: unknown) => Promise<unknown>;\n  /**\n   * A function validating response data. This is useful if you want to ensure\n   * the response conforms to the desired shape, so it can be safely passed to\n   * the transformers and returned to the user.\n   */\n  responseValidator?: (data: unknown) => Promise<unknown>;\n}\n\ntype IsExactlyNeverOrNeverUndefined<T> = [T] extends [never]\n  ? true\n  : [T] extends [never | undefined]\n    ? [undefined] extends [T]\n      ? false\n      : true\n    : false;\n\nexport type OmitNever<T extends Record<string, unknown>> = {\n  [K in keyof T as IsExactlyNeverOrNeverUndefined<T[K]> extends true ? never : K]: T[K];\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/preact-query/asClass/core/utils.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/preact-query/asClass/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport { BarBazService, BarService, BarService2, FooBazService, FooService, FooService2, type Options } from './sdk.gen';\nexport type { ClientOptions, FooBarPostData, FooBarPostResponse, FooBarPostResponses, FooBarPutData, FooBarPutResponse, FooBarPutResponses, FooPostData, FooPostResponse, FooPostResponses, FooPutData, FooPutResponse, FooPutResponses, GetFooBarData, GetFooBarResponse, GetFooBarResponses, GetFooData, GetFooResponse, GetFooResponses } from './types.gen';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/preact-query/asClass/sdk.gen.ts",
    "content": "// 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 { FooBarPostData, FooBarPostResponses, FooBarPutData, FooBarPutResponses, FooPostData, FooPostResponses, FooPutData, FooPutResponses, GetFooBarData, GetFooBarResponses, GetFooData, GetFooResponses } from './types.gen';\n\nexport type Options<TData extends TDataShape = TDataShape, ThrowOnError extends boolean = boolean> = Options2<TData, ThrowOnError> & {\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\nexport class BarService {\n    public static post<ThrowOnError extends boolean = false>(options?: Options<FooBarPostData, ThrowOnError>) {\n        return (options?.client ?? client).post<FooBarPostResponses, unknown, ThrowOnError>({ url: '/foo/bar', ...options });\n    }\n    \n    public static put<ThrowOnError extends boolean = false>(options?: Options<FooBarPutData, ThrowOnError>) {\n        return (options?.client ?? client).put<FooBarPutResponses, unknown, ThrowOnError>({ url: '/foo/bar', ...options });\n    }\n}\n\nexport class FooService {\n    public static post<ThrowOnError extends boolean = false>(options?: Options<FooPostData, ThrowOnError>) {\n        return (options?.client ?? client).post<FooPostResponses, unknown, ThrowOnError>({ url: '/foo', ...options });\n    }\n    \n    public static put<ThrowOnError extends boolean = false>(options?: Options<FooPutData, ThrowOnError>) {\n        return (options?.client ?? client).put<FooPutResponses, unknown, ThrowOnError>({ url: '/foo', ...options });\n    }\n    \n    static barService = BarService;\n}\n\nexport class FooBazService {\n    public static getFoo<ThrowOnError extends boolean = false>(options?: Options<GetFooData, ThrowOnError>) {\n        return (options?.client ?? client).get<GetFooResponses, unknown, ThrowOnError>({ url: '/foo', ...options });\n    }\n    \n    static fooService = FooService;\n}\n\nexport class BarService2 {\n    public static post<ThrowOnError extends boolean = false>(options?: Options<FooBarPostData, ThrowOnError>) {\n        return (options?.client ?? client).post<FooBarPostResponses, unknown, ThrowOnError>({ url: '/foo/bar', ...options });\n    }\n    \n    public static put<ThrowOnError extends boolean = false>(options?: Options<FooBarPutData, ThrowOnError>) {\n        return (options?.client ?? client).put<FooBarPutResponses, unknown, ThrowOnError>({ url: '/foo/bar', ...options });\n    }\n}\n\nexport class FooService2 {\n    static barService = BarService2;\n}\n\nexport class BarBazService {\n    public static getFooBar<ThrowOnError extends boolean = false>(options?: Options<GetFooBarData, ThrowOnError>) {\n        return (options?.client ?? client).get<GetFooBarResponses, unknown, ThrowOnError>({ url: '/foo/bar', ...options });\n    }\n    \n    static fooService = FooService2;\n}\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/preact-query/asClass/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type ClientOptions = {\n    baseUrl: string;\n};\n\nexport type GetFooData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/foo';\n};\n\nexport type GetFooResponses = {\n    /**\n     * OK\n     */\n    200: string;\n};\n\nexport type GetFooResponse = GetFooResponses[keyof GetFooResponses];\n\nexport type FooPostData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/foo';\n};\n\nexport type FooPostResponses = {\n    /**\n     * OK\n     */\n    200: string;\n};\n\nexport type FooPostResponse = FooPostResponses[keyof FooPostResponses];\n\nexport type FooPutData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/foo';\n};\n\nexport type FooPutResponses = {\n    /**\n     * OK\n     */\n    200: string;\n};\n\nexport type FooPutResponse = FooPutResponses[keyof FooPutResponses];\n\nexport type GetFooBarData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/foo/bar';\n};\n\nexport type GetFooBarResponses = {\n    /**\n     * OK\n     */\n    200: string;\n};\n\nexport type GetFooBarResponse = GetFooBarResponses[keyof GetFooBarResponses];\n\nexport type FooBarPostData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/foo/bar';\n};\n\nexport type FooBarPostResponses = {\n    /**\n     * OK\n     */\n    200: string;\n};\n\nexport type FooBarPostResponse = FooBarPostResponses[keyof FooBarPostResponses];\n\nexport type FooBarPutData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/foo/bar';\n};\n\nexport type FooBarPutResponses = {\n    /**\n     * OK\n     */\n    200: string;\n};\n\nexport type FooBarPutResponse = FooBarPutResponses[keyof FooBarPutResponses];\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/preact-query/axios/@tanstack/preact-query.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport { type DefaultError, queryOptions, type UseMutationOptions } from '@tanstack/preact-query';\nimport type { AxiosError } from 'axios';\n\nimport { client } from '../client.gen';\nimport { callToTestOrderOfParams, callWithDefaultOptionalParameters, callWithDefaultParameters, callWithDescriptions, callWithDuplicateResponses, callWithNoContentResponse, callWithParameters, callWithResponse, callWithResponseAndNoContentResponse, callWithResponses, callWithResultFromHeader, callWithWeirdParameterNames, collectionFormat, complexTypes, deleteCallWithoutParametersAndResponse, dummyA, dummyB, duplicateName, duplicateName2, duplicateName3, duplicateName4, fooWow, getCallWithoutParametersAndResponse, nonAsciiæøåÆøÅöôêÊ字符串, type Options, patchApiVbyApiVersionNoTag, patchCallWithoutParametersAndResponse, postApiVbyApiVersionBody, postCallWithoutParametersAndResponse, putCallWithoutParametersAndResponse, serviceWithEmptyTag, testErrorCode, types } from '../sdk.gen';\nimport type { CallToTestOrderOfParamsData, CallWithDefaultOptionalParametersData, CallWithDefaultParametersData, CallWithDescriptionsData, CallWithDuplicateResponsesData, CallWithDuplicateResponsesError, CallWithDuplicateResponsesResponse, CallWithNoContentResponseData, CallWithParametersData, CallWithResponseAndNoContentResponseData, CallWithResponseAndNoContentResponseResponse, CallWithResponseData, CallWithResponseResponse, CallWithResponsesData, CallWithResponsesError, CallWithResponsesResponse, CallWithResultFromHeaderData, CallWithWeirdParameterNamesData, CollectionFormatData, ComplexTypesData, ComplexTypesResponse, DeleteCallWithoutParametersAndResponseData, DummyAData, DummyBData, DuplicateName2Data, DuplicateName3Data, DuplicateName4Data, DuplicateNameData, FooWowData, GetCallWithoutParametersAndResponseData, NonAsciiæøåÆøÅöôêÊ字符串Data, NonAsciiæøåÆøÅöôêÊ字符串Response, PatchApiVbyApiVersionNoTagData, PatchCallWithoutParametersAndResponseData, PostApiVbyApiVersionBodyData, PostApiVbyApiVersionBodyError, PostApiVbyApiVersionBodyResponse, PostCallWithoutParametersAndResponseData, PutCallWithoutParametersAndResponseData, ServiceWithEmptyTagData, TestErrorCodeData, TypesData, TypesResponse } from '../types.gen';\n\nexport type QueryKey<TOptions extends Options> = [\n    Pick<TOptions, 'baseURL' | 'body' | 'headers' | 'path' | 'query'> & {\n        _id: string;\n        _infinite?: boolean;\n        tags?: ReadonlyArray<string>;\n    }\n];\n\nconst createQueryKey = <TOptions extends Options>(id: string, options?: TOptions, infinite?: boolean, tags?: ReadonlyArray<string>): [\n    QueryKey<TOptions>[0]\n] => {\n    const params: QueryKey<TOptions>[0] = { _id: id, baseURL: options?.baseURL || (options?.client ?? client).getConfig().baseURL } as QueryKey<TOptions>[0];\n    if (infinite) {\n        params._infinite = infinite;\n    }\n    if (tags) {\n        params.tags = tags;\n    }\n    if (options?.body) {\n        params.body = options.body;\n    }\n    if (options?.headers) {\n        params.headers = options.headers;\n    }\n    if (options?.path) {\n        params.path = options.path;\n    }\n    if (options?.query) {\n        params.query = options.query;\n    }\n    return [params];\n};\n\nexport const serviceWithEmptyTagQueryKey = (options?: Options<ServiceWithEmptyTagData>) => createQueryKey('serviceWithEmptyTag', options);\n\nexport const serviceWithEmptyTagOptions = (options?: Options<ServiceWithEmptyTagData>) => queryOptions<unknown, AxiosError<DefaultError>, unknown, ReturnType<typeof serviceWithEmptyTagQueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await serviceWithEmptyTag({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: serviceWithEmptyTagQueryKey(options)\n});\n\nexport const patchApiVbyApiVersionNoTagMutation = (options?: Partial<Options<PatchApiVbyApiVersionNoTagData>>): UseMutationOptions<unknown, AxiosError<DefaultError>, Options<PatchApiVbyApiVersionNoTagData>> => {\n    const mutationOptions: UseMutationOptions<unknown, AxiosError<DefaultError>, Options<PatchApiVbyApiVersionNoTagData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await patchApiVbyApiVersionNoTag({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const fooWowMutation = (options?: Partial<Options<FooWowData>>): UseMutationOptions<unknown, AxiosError<DefaultError>, Options<FooWowData>> => {\n    const mutationOptions: UseMutationOptions<unknown, AxiosError<DefaultError>, Options<FooWowData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await fooWow({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const deleteCallWithoutParametersAndResponseMutation = (options?: Partial<Options<DeleteCallWithoutParametersAndResponseData>>): UseMutationOptions<unknown, AxiosError<DefaultError>, Options<DeleteCallWithoutParametersAndResponseData>> => {\n    const mutationOptions: UseMutationOptions<unknown, AxiosError<DefaultError>, Options<DeleteCallWithoutParametersAndResponseData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await deleteCallWithoutParametersAndResponse({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const getCallWithoutParametersAndResponseQueryKey = (options?: Options<GetCallWithoutParametersAndResponseData>) => createQueryKey('getCallWithoutParametersAndResponse', options);\n\nexport const getCallWithoutParametersAndResponseOptions = (options?: Options<GetCallWithoutParametersAndResponseData>) => queryOptions<unknown, AxiosError<DefaultError>, unknown, ReturnType<typeof getCallWithoutParametersAndResponseQueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await getCallWithoutParametersAndResponse({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: getCallWithoutParametersAndResponseQueryKey(options)\n});\n\nexport const patchCallWithoutParametersAndResponseMutation = (options?: Partial<Options<PatchCallWithoutParametersAndResponseData>>): UseMutationOptions<unknown, AxiosError<DefaultError>, Options<PatchCallWithoutParametersAndResponseData>> => {\n    const mutationOptions: UseMutationOptions<unknown, AxiosError<DefaultError>, Options<PatchCallWithoutParametersAndResponseData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await patchCallWithoutParametersAndResponse({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const postCallWithoutParametersAndResponseMutation = (options?: Partial<Options<PostCallWithoutParametersAndResponseData>>): UseMutationOptions<unknown, AxiosError<DefaultError>, Options<PostCallWithoutParametersAndResponseData>> => {\n    const mutationOptions: UseMutationOptions<unknown, AxiosError<DefaultError>, Options<PostCallWithoutParametersAndResponseData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await postCallWithoutParametersAndResponse({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const putCallWithoutParametersAndResponseMutation = (options?: Partial<Options<PutCallWithoutParametersAndResponseData>>): UseMutationOptions<unknown, AxiosError<DefaultError>, Options<PutCallWithoutParametersAndResponseData>> => {\n    const mutationOptions: UseMutationOptions<unknown, AxiosError<DefaultError>, Options<PutCallWithoutParametersAndResponseData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await putCallWithoutParametersAndResponse({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const callWithDescriptionsMutation = (options?: Partial<Options<CallWithDescriptionsData>>): UseMutationOptions<unknown, AxiosError<DefaultError>, Options<CallWithDescriptionsData>> => {\n    const mutationOptions: UseMutationOptions<unknown, AxiosError<DefaultError>, Options<CallWithDescriptionsData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await callWithDescriptions({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const callWithParametersMutation = (options?: Partial<Options<CallWithParametersData>>): UseMutationOptions<unknown, AxiosError<DefaultError>, Options<CallWithParametersData>> => {\n    const mutationOptions: UseMutationOptions<unknown, AxiosError<DefaultError>, Options<CallWithParametersData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await callWithParameters({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const callWithWeirdParameterNamesMutation = (options?: Partial<Options<CallWithWeirdParameterNamesData>>): UseMutationOptions<unknown, AxiosError<DefaultError>, Options<CallWithWeirdParameterNamesData>> => {\n    const mutationOptions: UseMutationOptions<unknown, AxiosError<DefaultError>, Options<CallWithWeirdParameterNamesData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await callWithWeirdParameterNames({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const callWithDefaultParametersQueryKey = (options: Options<CallWithDefaultParametersData>) => createQueryKey('callWithDefaultParameters', options);\n\nexport const callWithDefaultParametersOptions = (options: Options<CallWithDefaultParametersData>) => queryOptions<unknown, AxiosError<DefaultError>, unknown, ReturnType<typeof callWithDefaultParametersQueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await callWithDefaultParameters({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: callWithDefaultParametersQueryKey(options)\n});\n\nexport const callWithDefaultOptionalParametersMutation = (options?: Partial<Options<CallWithDefaultOptionalParametersData>>): UseMutationOptions<unknown, AxiosError<DefaultError>, Options<CallWithDefaultOptionalParametersData>> => {\n    const mutationOptions: UseMutationOptions<unknown, AxiosError<DefaultError>, Options<CallWithDefaultOptionalParametersData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await callWithDefaultOptionalParameters({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const callToTestOrderOfParamsMutation = (options?: Partial<Options<CallToTestOrderOfParamsData>>): UseMutationOptions<unknown, AxiosError<DefaultError>, Options<CallToTestOrderOfParamsData>> => {\n    const mutationOptions: UseMutationOptions<unknown, AxiosError<DefaultError>, Options<CallToTestOrderOfParamsData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await callToTestOrderOfParams({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const duplicateNameMutation = (options?: Partial<Options<DuplicateNameData>>): UseMutationOptions<unknown, AxiosError<DefaultError>, Options<DuplicateNameData>> => {\n    const mutationOptions: UseMutationOptions<unknown, AxiosError<DefaultError>, Options<DuplicateNameData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await duplicateName({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const duplicateName2QueryKey = (options?: Options<DuplicateName2Data>) => createQueryKey('duplicateName2', options);\n\nexport const duplicateName2Options = (options?: Options<DuplicateName2Data>) => queryOptions<unknown, AxiosError<DefaultError>, unknown, ReturnType<typeof duplicateName2QueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await duplicateName2({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: duplicateName2QueryKey(options)\n});\n\nexport const duplicateName3Mutation = (options?: Partial<Options<DuplicateName3Data>>): UseMutationOptions<unknown, AxiosError<DefaultError>, Options<DuplicateName3Data>> => {\n    const mutationOptions: UseMutationOptions<unknown, AxiosError<DefaultError>, Options<DuplicateName3Data>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await duplicateName3({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const duplicateName4Mutation = (options?: Partial<Options<DuplicateName4Data>>): UseMutationOptions<unknown, AxiosError<DefaultError>, Options<DuplicateName4Data>> => {\n    const mutationOptions: UseMutationOptions<unknown, AxiosError<DefaultError>, Options<DuplicateName4Data>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await duplicateName4({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const callWithNoContentResponseQueryKey = (options?: Options<CallWithNoContentResponseData>) => createQueryKey('callWithNoContentResponse', options);\n\nexport const callWithNoContentResponseOptions = (options?: Options<CallWithNoContentResponseData>) => queryOptions<unknown, AxiosError<DefaultError>, unknown, ReturnType<typeof callWithNoContentResponseQueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await callWithNoContentResponse({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: callWithNoContentResponseQueryKey(options)\n});\n\nexport const callWithResponseAndNoContentResponseQueryKey = (options?: Options<CallWithResponseAndNoContentResponseData>) => createQueryKey('callWithResponseAndNoContentResponse', options);\n\nexport const callWithResponseAndNoContentResponseOptions = (options?: Options<CallWithResponseAndNoContentResponseData>) => queryOptions<CallWithResponseAndNoContentResponseResponse, AxiosError<DefaultError>, CallWithResponseAndNoContentResponseResponse, ReturnType<typeof callWithResponseAndNoContentResponseQueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await callWithResponseAndNoContentResponse({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: callWithResponseAndNoContentResponseQueryKey(options)\n});\n\nexport const dummyAQueryKey = (options?: Options<DummyAData>) => createQueryKey('dummyA', options);\n\nexport const dummyAOptions = (options?: Options<DummyAData>) => queryOptions<unknown, AxiosError<DefaultError>, unknown, ReturnType<typeof dummyAQueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await dummyA({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: dummyAQueryKey(options)\n});\n\nexport const dummyBQueryKey = (options?: Options<DummyBData>) => createQueryKey('dummyB', options);\n\nexport const dummyBOptions = (options?: Options<DummyBData>) => queryOptions<unknown, AxiosError<DefaultError>, unknown, ReturnType<typeof dummyBQueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await dummyB({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: dummyBQueryKey(options)\n});\n\nexport const callWithResponseQueryKey = (options?: Options<CallWithResponseData>) => createQueryKey('callWithResponse', options);\n\nexport const callWithResponseOptions = (options?: Options<CallWithResponseData>) => queryOptions<CallWithResponseResponse, AxiosError<DefaultError>, CallWithResponseResponse, ReturnType<typeof callWithResponseQueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await callWithResponse({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: callWithResponseQueryKey(options)\n});\n\nexport const callWithDuplicateResponsesMutation = (options?: Partial<Options<CallWithDuplicateResponsesData>>): UseMutationOptions<CallWithDuplicateResponsesResponse, AxiosError<CallWithDuplicateResponsesError>, Options<CallWithDuplicateResponsesData>> => {\n    const mutationOptions: UseMutationOptions<CallWithDuplicateResponsesResponse, AxiosError<CallWithDuplicateResponsesError>, Options<CallWithDuplicateResponsesData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await callWithDuplicateResponses({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const callWithResponsesMutation = (options?: Partial<Options<CallWithResponsesData>>): UseMutationOptions<CallWithResponsesResponse, AxiosError<CallWithResponsesError>, Options<CallWithResponsesData>> => {\n    const mutationOptions: UseMutationOptions<CallWithResponsesResponse, AxiosError<CallWithResponsesError>, Options<CallWithResponsesData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await callWithResponses({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const collectionFormatQueryKey = (options: Options<CollectionFormatData>) => createQueryKey('collectionFormat', options);\n\nexport const collectionFormatOptions = (options: Options<CollectionFormatData>) => queryOptions<unknown, AxiosError<DefaultError>, unknown, ReturnType<typeof collectionFormatQueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await collectionFormat({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: collectionFormatQueryKey(options)\n});\n\nexport const typesQueryKey = (options: Options<TypesData>) => createQueryKey('types', options);\n\nexport const typesOptions = (options: Options<TypesData>) => queryOptions<TypesResponse, AxiosError<DefaultError>, TypesResponse, ReturnType<typeof typesQueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await types({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: typesQueryKey(options)\n});\n\nexport const complexTypesQueryKey = (options: Options<ComplexTypesData>) => createQueryKey('complexTypes', options);\n\nexport const complexTypesOptions = (options: Options<ComplexTypesData>) => queryOptions<ComplexTypesResponse, AxiosError<DefaultError>, ComplexTypesResponse, ReturnType<typeof complexTypesQueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await complexTypes({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: complexTypesQueryKey(options)\n});\n\nexport const callWithResultFromHeaderMutation = (options?: Partial<Options<CallWithResultFromHeaderData>>): UseMutationOptions<unknown, AxiosError<DefaultError>, Options<CallWithResultFromHeaderData>> => {\n    const mutationOptions: UseMutationOptions<unknown, AxiosError<DefaultError>, Options<CallWithResultFromHeaderData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await callWithResultFromHeader({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const testErrorCodeMutation = (options?: Partial<Options<TestErrorCodeData>>): UseMutationOptions<unknown, AxiosError<DefaultError>, Options<TestErrorCodeData>> => {\n    const mutationOptions: UseMutationOptions<unknown, AxiosError<DefaultError>, Options<TestErrorCodeData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await testErrorCode({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const nonAsciiæøåÆøÅöôêÊ字符串Mutation = (options?: Partial<Options<NonAsciiæøåÆøÅöôêÊ字符串Data>>): UseMutationOptions<NonAsciiæøåÆøÅöôêÊ字符串Response, AxiosError<DefaultError>, Options<NonAsciiæøåÆøÅöôêÊ字符串Data>> => {\n    const mutationOptions: UseMutationOptions<NonAsciiæøåÆøÅöôêÊ字符串Response, AxiosError<DefaultError>, Options<NonAsciiæøåÆøÅöôêÊ字符串Data>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await nonAsciiæøåÆøÅöôêÊ字符串({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\n/**\n * Body should not be unknown\n *\n * Body should not be unknown\n */\nexport const postApiVbyApiVersionBodyMutation = (options?: Partial<Options<PostApiVbyApiVersionBodyData>>): UseMutationOptions<PostApiVbyApiVersionBodyResponse, AxiosError<PostApiVbyApiVersionBodyError>, Options<PostApiVbyApiVersionBodyData>> => {\n    const mutationOptions: UseMutationOptions<PostApiVbyApiVersionBodyResponse, AxiosError<PostApiVbyApiVersionBodyError>, Options<PostApiVbyApiVersionBodyData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await postApiVbyApiVersionBody({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/preact-query/axios/client/client.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { AxiosError, AxiosInstance, RawAxiosRequestHeaders } from 'axios';\nimport axios from 'axios';\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 } from './types.gen';\nimport { buildUrl, createConfig, mergeConfigs, mergeHeaders, setAuthParams } from './utils.gen';\n\nexport const createClient = (config: Config = {}): Client => {\n  let _config = mergeConfigs(createConfig(), config);\n\n  let instance: AxiosInstance;\n\n  if (_config.axios && !('Axios' in _config.axios)) {\n    instance = _config.axios;\n  } else {\n    // eslint-disable-next-line @typescript-eslint/no-unused-vars\n    const { auth, ...configWithoutAuth } = _config;\n    instance = axios.create(configWithoutAuth);\n  }\n\n  const getConfig = (): Config => ({ ..._config });\n\n  const setConfig = (config: Config): Config => {\n    _config = mergeConfigs(_config, config);\n    instance.defaults = {\n      ...instance.defaults,\n      ..._config,\n      // @ts-expect-error\n      headers: mergeHeaders(instance.defaults.headers, _config.headers),\n    };\n    return getConfig();\n  };\n\n  const beforeRequest = async (options: RequestOptions) => {\n    const opts = {\n      ..._config,\n      ...options,\n      axios: options.axios ?? _config.axios ?? instance,\n      headers: mergeHeaders(_config.headers, options.headers),\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.body = opts.bodySerializer(opts.body);\n    }\n\n    const url = buildUrl(opts);\n\n    return { opts, url };\n  };\n\n  // @ts-expect-error\n  const request: Client['request'] = async (options) => {\n    // @ts-expect-error\n    const { opts, url } = await beforeRequest(options);\n    try {\n      // assign Axios here for consistency with fetch\n      const _axios = opts.axios!;\n      // eslint-disable-next-line @typescript-eslint/no-unused-vars\n      const { auth, ...optsWithoutAuth } = opts;\n      const response = await _axios({\n        ...optsWithoutAuth,\n        baseURL: '', // the baseURL is already included in `url`\n        data: getValidRequestBody(opts),\n        headers: opts.headers as RawAxiosRequestHeaders,\n        // let `paramsSerializer()` handle query params if it exists\n        params: opts.paramsSerializer ? opts.query : undefined,\n        url,\n      });\n\n      let { data } = response;\n\n      if (opts.responseType === '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 {\n        ...response,\n        data: data ?? {},\n      };\n    } catch (error) {\n      const e = error as AxiosError;\n      if (opts.throwOnError) {\n        throw e;\n      }\n      // @ts-expect-error\n      e.error = e.response?.data ?? {};\n      return e;\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 Record<string, string>,\n      method,\n      serializedBody: getValidRequestBody(opts) as BodyInit | null | undefined,\n      // @ts-expect-error\n      signal: opts.signal,\n      url,\n    });\n  };\n\n  const _buildUrl: Client['buildUrl'] = (options) =>\n    buildUrl({ axios: instance, ..._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    instance,\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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/preact-query/axios/client/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type { Auth } from '../core/auth.gen';\nexport type { QuerySerializerOptions } from '../core/bodySerializer.gen';\nexport {\n  formDataBodySerializer,\n  jsonBodySerializer,\n  urlSearchParamsBodySerializer,\n} from '../core/bodySerializer.gen';\nexport { buildClientParams } from '../core/params.gen';\nexport { serializeQueryKeyValue } from '../core/queryKeySerializer.gen';\nexport { createClient } from './client.gen';\nexport type {\n  Client,\n  ClientOptions,\n  Config,\n  CreateClientConfig,\n  Options,\n  RequestOptions,\n  RequestResult,\n  TDataShape,\n} from './types.gen';\nexport { createConfig } from './utils.gen';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/preact-query/axios/client/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type {\n  AxiosError,\n  AxiosInstance,\n  AxiosRequestHeaders,\n  AxiosResponse,\n  AxiosStatic,\n  CreateAxiosDefaults,\n} from 'axios';\n\nimport type { Auth } from '../core/auth.gen';\nimport type {\n  ServerSentEventsOptions,\n  ServerSentEventsResult,\n} from '../core/serverSentEvents.gen';\nimport type { Client as CoreClient, Config as CoreConfig } from '../core/types.gen';\n\nexport interface Config<T extends ClientOptions = ClientOptions>\n  extends Omit<CreateAxiosDefaults, 'auth' | 'baseURL' | 'headers' | 'method'>, CoreConfig {\n  /**\n   * Axios implementation. You can use this option to provide either an\n   * `AxiosStatic` or an `AxiosInstance`.\n   *\n   * @default axios\n   */\n  axios?: AxiosStatic | AxiosInstance;\n  /**\n   * Base URL for all requests made by this client.\n   */\n  baseURL?: T['baseURL'];\n  /**\n   * An object containing any HTTP headers that you want to pre-populate your\n   * `Headers` object with.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/Headers/Headers#init See more}\n   */\n  headers?:\n    | AxiosRequestHeaders\n    | Record<\n        string,\n        string | number | boolean | (string | number | boolean)[] | null | undefined | unknown\n      >;\n  /**\n   * Throw an error instead of returning it in the response?\n   *\n   * @default false\n   */\n  throwOnError?: T['throwOnError'];\n}\n\nexport interface RequestOptions<\n  TData = unknown,\n  ThrowOnError extends boolean = boolean,\n  Url extends string = string,\n>\n  extends\n    Config<{\n      throwOnError: ThrowOnError;\n    }>,\n    Pick<\n      ServerSentEventsOptions<TData>,\n      | 'onRequest'\n      | 'onSseError'\n      | 'onSseEvent'\n      | 'sseDefaultRetryDelay'\n      | 'sseMaxRetryAttempts'\n      | 'sseMaxRetryDelay'\n    > {\n  /**\n   * Any body that you want to add to your request.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/fetch#body}\n   */\n  body?: unknown;\n  path?: Record<string, unknown>;\n  query?: Record<string, unknown>;\n  /**\n   * Security mechanism(s) to use for the request.\n   */\n  security?: ReadonlyArray<Auth>;\n  url: Url;\n}\n\nexport interface ClientOptions {\n  baseURL?: string;\n  throwOnError?: boolean;\n}\n\nexport type RequestResult<\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = boolean,\n> = ThrowOnError extends true\n  ? Promise<AxiosResponse<TData extends Record<string, unknown> ? TData[keyof TData] : TData>>\n  : Promise<\n      | (AxiosResponse<TData extends Record<string, unknown> ? TData[keyof TData] : TData> & {\n          error: undefined;\n        })\n      | (AxiosError<TError extends Record<string, unknown> ? TError[keyof TError] : TError> & {\n          data: undefined;\n          error: TError extends Record<string, unknown> ? TError[keyof TError] : TError;\n        })\n    >;\n\ntype MethodFn = <TData = unknown, TError = unknown, ThrowOnError extends boolean = false>(\n  options: Omit<RequestOptions<TData, ThrowOnError>, 'method'>,\n) => RequestResult<TData, TError, ThrowOnError>;\n\ntype SseFn = <TData = unknown, TError = unknown, ThrowOnError extends boolean = false>(\n  options: Omit<RequestOptions<TData, ThrowOnError>, 'method'>,\n) => Promise<ServerSentEventsResult<TData, TError>>;\n\ntype RequestFn = <TData = unknown, TError = unknown, ThrowOnError extends boolean = false>(\n  options: Omit<RequestOptions<TData, ThrowOnError>, 'method'> &\n    Pick<Required<RequestOptions<TData, ThrowOnError>>, 'method'>,\n) => RequestResult<TData, TError, ThrowOnError>;\n\ntype BuildUrlFn = <\n  TData extends {\n    body?: unknown;\n    path?: Record<string, unknown>;\n    query?: Record<string, unknown>;\n    url: string;\n  },\n>(\n  options: TData & Options<TData>,\n) => string;\n\nexport type Client = CoreClient<RequestFn, Config, MethodFn, BuildUrlFn, SseFn> & {\n  instance: AxiosInstance;\n};\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 = ClientOptions> = (\n  override?: Config<ClientOptions & T>,\n) => Config<Required<ClientOptions> & T>;\n\nexport interface TDataShape {\n  body?: unknown;\n  headers?: unknown;\n  path?: unknown;\n  query?: unknown;\n  url: string;\n}\n\ntype OmitKeys<T, K> = Pick<T, Exclude<keyof T, K>>;\n\nexport type Options<\n  TData extends TDataShape = TDataShape,\n  ThrowOnError extends boolean = boolean,\n  TResponse = unknown,\n> = OmitKeys<RequestOptions<TResponse, ThrowOnError>, 'body' | 'path' | 'query' | 'url'> &\n  ([TData] extends [never] ? unknown : Omit<TData, 'url'>);\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/preact-query/axios/client/utils.gen.ts",
    "content": "// 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 {\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\nconst checkForExistence = (\n  options: Pick<RequestOptions, 'auth' | 'query'> & {\n    headers: Record<any, unknown>;\n  },\n  name?: string,\n): boolean => {\n  if (!name) {\n    return false;\n  }\n  if (name in options.headers || options.query?.[name]) {\n    return true;\n  }\n  if (\n    'Cookie' in options.headers &&\n    options.headers['Cookie'] &&\n    typeof options.headers['Cookie'] === 'string'\n  ) {\n    return options.headers['Cookie'].includes(`${name}=`);\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: Record<any, unknown>;\n  }) => {\n  for (const auth of security) {\n    if (checkForExistence(options, auth.name)) {\n      continue;\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        const value = `${name}=${token}`;\n        if ('Cookie' in options.headers && options.headers['Cookie']) {\n          options.headers['Cookie'] = `${options.headers['Cookie']}; ${value}`;\n        } else {\n          options.headers['Cookie'] = value;\n        }\n        break;\n      }\n      case 'header':\n      default:\n        options.headers[name] = token;\n        break;\n    }\n  }\n};\n\nexport const buildUrl: Client['buildUrl'] = (options) => {\n  const instanceBaseUrl = options.axios?.defaults?.baseURL;\n\n  const baseUrl =\n    !!options.baseURL && typeof options.baseURL === 'string' ? options.baseURL : instanceBaseUrl;\n\n  return getUrl({\n    baseUrl: baseUrl as string,\n    path: options.path,\n    // let `paramsSerializer()` handle query params if it exists\n    query: !options.paramsSerializer ? options.query : undefined,\n    querySerializer:\n      typeof options.querySerializer === 'function'\n        ? options.querySerializer\n        : createQuerySerializer(options.querySerializer),\n    url: options.url,\n  });\n};\n\nexport const mergeConfigs = (a: Config, b: Config): Config => {\n  const config = { ...a, ...b };\n  config.headers = mergeHeaders(a.headers, b.headers);\n  return config;\n};\n\n/**\n * Special Axios headers keywords allowing to set headers by request method.\n */\nexport const axiosHeadersKeywords = [\n  'common',\n  'delete',\n  'get',\n  'head',\n  'patch',\n  'post',\n  'put',\n] as const;\n\nexport const mergeHeaders = (\n  ...headers: Array<Required<Config>['headers'] | undefined>\n): Record<any, unknown> => {\n  const mergedHeaders: Record<any, unknown> = {};\n  for (const header of headers) {\n    if (!header || typeof header !== 'object') {\n      continue;\n    }\n\n    const iterator = Object.entries(header);\n\n    for (const [key, value] of iterator) {\n      if (\n        axiosHeadersKeywords.includes(key as (typeof axiosHeadersKeywords)[number]) &&\n        typeof value === 'object'\n      ) {\n        mergedHeaders[key] = {\n          ...(mergedHeaders[key] as Record<any, unknown>),\n          ...value,\n        };\n      } else if (value === null) {\n        delete mergedHeaders[key];\n      } else if (Array.isArray(value)) {\n        for (const v of value) {\n          // @ts-expect-error\n          mergedHeaders[key] = [...(mergedHeaders[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[key] = typeof value === 'object' ? JSON.stringify(value) : (value as string);\n      }\n    }\n  }\n  return mergedHeaders;\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  ...override,\n});\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/preact-query/axios/client.gen.ts",
    "content": "// 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: 'http://localhost:3000/base' }));\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/preact-query/axios/core/auth.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/preact-query/axios/core/bodySerializer.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/preact-query/axios/core/params.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/preact-query/axios/core/pathSerializer.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/preact-query/axios/core/queryKeySerializer.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\n/**\n * JSON-friendly union that mirrors what Pinia Colada can hash.\n */\nexport type JsonValue =\n  | null\n  | string\n  | number\n  | boolean\n  | JsonValue[]\n  | { [key: string]: JsonValue };\n\n/**\n * Replacer that converts non-JSON values (bigint, Date, etc.) to safe substitutes.\n */\nexport const queryKeyJsonReplacer = (_key: string, value: unknown) => {\n  if (value === undefined || typeof value === 'function' || typeof value === 'symbol') {\n    return undefined;\n  }\n  if (typeof value === 'bigint') {\n    return value.toString();\n  }\n  if (value instanceof Date) {\n    return value.toISOString();\n  }\n  return value;\n};\n\n/**\n * Safely stringifies a value and parses it back into a JsonValue.\n */\nexport const stringifyToJsonValue = (input: unknown): JsonValue | undefined => {\n  try {\n    const json = JSON.stringify(input, queryKeyJsonReplacer);\n    if (json === undefined) {\n      return undefined;\n    }\n    return JSON.parse(json) as JsonValue;\n  } catch {\n    return undefined;\n  }\n};\n\n/**\n * Detects plain objects (including objects with a null prototype).\n */\nconst isPlainObject = (value: unknown): value is Record<string, unknown> => {\n  if (value === null || typeof value !== 'object') {\n    return false;\n  }\n  const prototype = Object.getPrototypeOf(value as object);\n  return prototype === Object.prototype || prototype === null;\n};\n\n/**\n * Turns URLSearchParams into a sorted JSON object for deterministic keys.\n */\nconst serializeSearchParams = (params: URLSearchParams): JsonValue => {\n  const entries = Array.from(params.entries()).sort(([a], [b]) => a.localeCompare(b));\n  const result: Record<string, JsonValue> = {};\n\n  for (const [key, value] of entries) {\n    const existing = result[key];\n    if (existing === undefined) {\n      result[key] = value;\n      continue;\n    }\n\n    if (Array.isArray(existing)) {\n      (existing as string[]).push(value);\n    } else {\n      result[key] = [existing, value];\n    }\n  }\n\n  return result;\n};\n\n/**\n * Normalizes any accepted value into a JSON-friendly shape for query keys.\n */\nexport const serializeQueryKeyValue = (value: unknown): JsonValue | undefined => {\n  if (value === null) {\n    return null;\n  }\n\n  if (typeof value === 'string' || typeof value === 'number' || typeof value === 'boolean') {\n    return value;\n  }\n\n  if (value === undefined || typeof value === 'function' || typeof value === 'symbol') {\n    return undefined;\n  }\n\n  if (typeof value === 'bigint') {\n    return value.toString();\n  }\n\n  if (value instanceof Date) {\n    return value.toISOString();\n  }\n\n  if (Array.isArray(value)) {\n    return stringifyToJsonValue(value);\n  }\n\n  if (typeof URLSearchParams !== 'undefined' && value instanceof URLSearchParams) {\n    return serializeSearchParams(value);\n  }\n\n  if (isPlainObject(value)) {\n    return stringifyToJsonValue(value);\n  }\n\n  return undefined;\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/preact-query/axios/core/serverSentEvents.gen.ts",
    "content": "// 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 const 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            // Normalize line endings: CRLF -> LF, then CR -> LF\n            buffer = buffer.replace(/\\r\\n/g, '\\n').replace(/\\r/g, '\\n');\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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/preact-query/axios/core/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { Auth, AuthToken } from './auth.gen';\nimport type { BodySerializer, QuerySerializer, QuerySerializerOptions } from './bodySerializer.gen';\n\nexport type HttpMethod =\n  | 'connect'\n  | 'delete'\n  | 'get'\n  | 'head'\n  | 'options'\n  | 'patch'\n  | 'post'\n  | 'put'\n  | 'trace';\n\nexport type Client<\n  RequestFn = never,\n  Config = unknown,\n  MethodFn = never,\n  BuildUrlFn = never,\n  SseFn = never,\n> = {\n  /**\n   * Returns the final request URL.\n   */\n  buildUrl: BuildUrlFn;\n  getConfig: () => Config;\n  request: RequestFn;\n  setConfig: (config: Config) => Config;\n} & {\n  [K in HttpMethod]: MethodFn;\n} & ([SseFn] extends [never] ? { sse?: never } : { sse: { [K in HttpMethod]: SseFn } });\n\nexport interface Config {\n  /**\n   * Auth token or a function returning auth token. The resolved value will be\n   * added to the request payload as defined by its `security` array.\n   */\n  auth?: ((auth: Auth) => Promise<AuthToken> | AuthToken) | AuthToken;\n  /**\n   * A function for serializing request body parameter. By default,\n   * {@link JSON.stringify()} will be used.\n   */\n  bodySerializer?: BodySerializer | null;\n  /**\n   * An object containing any HTTP headers that you want to pre-populate your\n   * `Headers` object with.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/Headers/Headers#init See more}\n   */\n  headers?:\n    | RequestInit['headers']\n    | Record<\n        string,\n        string | number | boolean | (string | number | boolean)[] | null | undefined | unknown\n      >;\n  /**\n   * The request method.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/fetch#method See more}\n   */\n  method?: Uppercase<HttpMethod>;\n  /**\n   * A function for serializing request query parameters. By default, arrays\n   * will be exploded in form style, objects will be exploded in deepObject\n   * style, and reserved characters are percent-encoded.\n   *\n   * This method will have no effect if the native `paramsSerializer()` Axios\n   * API function is used.\n   *\n   * {@link https://swagger.io/docs/specification/serialization/#query View examples}\n   */\n  querySerializer?: QuerySerializer | QuerySerializerOptions;\n  /**\n   * A function validating request data. This is useful if you want to ensure\n   * the request conforms to the desired shape, so it can be safely sent to\n   * the server.\n   */\n  requestValidator?: (data: unknown) => Promise<unknown>;\n  /**\n   * A function transforming response data before it's returned. This is useful\n   * for post-processing data, e.g. converting ISO strings into Date objects.\n   */\n  responseTransformer?: (data: unknown) => Promise<unknown>;\n  /**\n   * A function validating response data. This is useful if you want to ensure\n   * the response conforms to the desired shape, so it can be safely passed to\n   * the transformers and returned to the user.\n   */\n  responseValidator?: (data: unknown) => Promise<unknown>;\n}\n\ntype IsExactlyNeverOrNeverUndefined<T> = [T] extends [never]\n  ? true\n  : [T] extends [never | undefined]\n    ? [undefined] extends [T]\n      ? false\n      : true\n    : false;\n\nexport type OmitNever<T extends Record<string, unknown>> = {\n  [K in keyof T as IsExactlyNeverOrNeverUndefined<T[K]> extends true ? never : K]: T[K];\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/preact-query/axios/core/utils.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/preact-query/axios/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport { callToTestOrderOfParams, callWithDefaultOptionalParameters, callWithDefaultParameters, callWithDescriptions, callWithDuplicateResponses, callWithNoContentResponse, callWithParameters, callWithResponse, callWithResponseAndNoContentResponse, callWithResponses, callWithResultFromHeader, callWithWeirdParameterNames, collectionFormat, complexTypes, deleteCallWithoutParametersAndResponse, dummyA, dummyB, duplicateName, duplicateName2, duplicateName3, duplicateName4, fooWow, getCallWithoutParametersAndResponse, headCallWithoutParametersAndResponse, nonAsciiæøåÆøÅöôêÊ字符串, type Options, optionsCallWithoutParametersAndResponse, patchApiVbyApiVersionNoTag, patchCallWithoutParametersAndResponse, postApiVbyApiVersionBody, postCallWithoutParametersAndResponse, putCallWithoutParametersAndResponse, serviceWithEmptyTag, testErrorCode, types } from './sdk.gen';\nexport type { ArrayWithArray, ArrayWithBooleans, ArrayWithNumbers, ArrayWithProperties, ArrayWithReferences, ArrayWithStrings, CallToTestOrderOfParamsData, CallWithDefaultOptionalParametersData, CallWithDefaultParametersData, CallWithDescriptionsData, CallWithDuplicateResponsesData, CallWithDuplicateResponsesError, CallWithDuplicateResponsesErrors, CallWithDuplicateResponsesResponse, CallWithDuplicateResponsesResponses, CallWithNoContentResponseData, CallWithNoContentResponseResponses, CallWithParametersData, CallWithResponseAndNoContentResponseData, CallWithResponseAndNoContentResponseResponse, CallWithResponseAndNoContentResponseResponses, CallWithResponseData, CallWithResponseResponse, CallWithResponseResponses, CallWithResponsesData, CallWithResponsesError, CallWithResponsesErrors, CallWithResponsesResponse, CallWithResponsesResponses, CallWithResultFromHeaderData, CallWithResultFromHeaderErrors, CallWithResultFromHeaderResponses, CallWithWeirdParameterNamesData, ClientOptions, CollectionFormatData, CommentWithBackticks, CommentWithBackticksAndQuotes, CommentWithBreaks, CommentWithExpressionPlaceholders, CommentWithQuotes, CommentWithReservedCharacters, CommentWithSlashes, ComplexTypesData, ComplexTypesErrors, ComplexTypesResponse, ComplexTypesResponses, Date, Default, DeleteCallWithoutParametersAndResponseData, DictionaryWithArray, DictionaryWithDictionary, DictionaryWithProperties, DictionaryWithReference, DictionaryWithString, DummyAData, DummyAResponses, DummyBData, DummyBResponses, DuplicateName2Data, DuplicateName3Data, DuplicateName4Data, DuplicateNameData, EnumFromDescription, EnumWithExtensions, EnumWithNumbers, EnumWithStrings, ExternalRefA, ExternalRefB, ExternalSharedModel, FailureFailure, FooWowData, FooWowResponses, GetCallWithoutParametersAndResponseData, HeadCallWithoutParametersAndResponseData, ModelThatExtends, ModelThatExtendsExtends, ModelWithArray, ModelWithBoolean, ModelWithCircularReference, ModelWithDictionary, ModelWithDuplicateImports, ModelWithDuplicateProperties, ModelWithEnum, ModelWithEnumFromDescription, ModelWithInteger, ModelWithNestedEnums, ModelWithNestedProperties, ModelWithNullableString, ModelWithOrderedProperties, ModelWithPattern, ModelWithPatternWritable, ModelWithProperties, ModelWithPropertiesWritable, ModelWithReference, ModelWithReferenceWritable, ModelWithString, ModelWithStringError, NonAsciiæøåÆøÅöôêÊ字符串Data, NonAsciiæøåÆøÅöôêÊ字符串Response, NonAsciiæøåÆøÅöôêÊ字符串Responses, NonAsciiStringæøåÆøÅöôêÊ字符串, OptionsCallWithoutParametersAndResponseData, ParameterActivityParams, PatchApiVbyApiVersionNoTagData, PatchApiVbyApiVersionNoTagResponses, PatchCallWithoutParametersAndResponseData, PostApiVbyApiVersionBodyData, PostApiVbyApiVersionBodyError, PostApiVbyApiVersionBodyErrors, PostApiVbyApiVersionBodyResponse, PostApiVbyApiVersionBodyResponses, PostCallWithoutParametersAndResponseData, PutCallWithoutParametersAndResponseData, ResponsePostActivityResponse, ServiceWithEmptyTagData, SimpleBoolean, SimpleFile, SimpleInteger, SimpleReference, SimpleString, SimpleStringWithPattern, TestErrorCodeData, TestErrorCodeErrors, TestErrorCodeResponses, TypesData, TypesResponse, TypesResponses } from './types.gen';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/preact-query/axios/sdk.gen.ts",
    "content": "// 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 { CallToTestOrderOfParamsData, CallWithDefaultOptionalParametersData, CallWithDefaultParametersData, CallWithDescriptionsData, CallWithDuplicateResponsesData, CallWithDuplicateResponsesErrors, CallWithDuplicateResponsesResponses, CallWithNoContentResponseData, CallWithNoContentResponseResponses, CallWithParametersData, CallWithResponseAndNoContentResponseData, CallWithResponseAndNoContentResponseResponses, CallWithResponseData, CallWithResponseResponses, CallWithResponsesData, CallWithResponsesErrors, CallWithResponsesResponses, CallWithResultFromHeaderData, CallWithResultFromHeaderErrors, CallWithResultFromHeaderResponses, CallWithWeirdParameterNamesData, CollectionFormatData, ComplexTypesData, ComplexTypesErrors, ComplexTypesResponses, DeleteCallWithoutParametersAndResponseData, DummyAData, DummyAResponses, DummyBData, DummyBResponses, DuplicateName2Data, DuplicateName3Data, DuplicateName4Data, DuplicateNameData, FooWowData, FooWowResponses, GetCallWithoutParametersAndResponseData, HeadCallWithoutParametersAndResponseData, NonAsciiæøåÆøÅöôêÊ字符串Data, NonAsciiæøåÆøÅöôêÊ字符串Responses, OptionsCallWithoutParametersAndResponseData, PatchApiVbyApiVersionNoTagData, PatchApiVbyApiVersionNoTagResponses, PatchCallWithoutParametersAndResponseData, PostApiVbyApiVersionBodyData, PostApiVbyApiVersionBodyErrors, PostApiVbyApiVersionBodyResponses, PostCallWithoutParametersAndResponseData, PutCallWithoutParametersAndResponseData, ServiceWithEmptyTagData, TestErrorCodeData, TestErrorCodeErrors, TestErrorCodeResponses, TypesData, TypesResponses } from './types.gen';\n\nexport type Options<TData extends TDataShape = TDataShape, ThrowOnError extends boolean = boolean> = Options2<TData, ThrowOnError> & {\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\nexport const serviceWithEmptyTag = <ThrowOnError extends boolean = false>(options?: Options<ServiceWithEmptyTagData, ThrowOnError>) => (options?.client ?? client).get<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/no+tag', ...options });\n\nexport const patchApiVbyApiVersionNoTag = <ThrowOnError extends boolean = false>(options?: Options<PatchApiVbyApiVersionNoTagData, ThrowOnError>) => (options?.client ?? client).patch<PatchApiVbyApiVersionNoTagResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/no+tag', ...options });\n\nexport const fooWow = <ThrowOnError extends boolean = false>(options?: Options<FooWowData, ThrowOnError>) => (options?.client ?? client).put<FooWowResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/no+tag', ...options });\n\nexport const deleteCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<DeleteCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).delete<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const getCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<GetCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).get<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const headCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<HeadCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).head<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const optionsCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<OptionsCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).options<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const patchCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<PatchCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).patch<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const postCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<PostCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).post<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const putCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<PutCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).put<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const callWithDescriptions = <ThrowOnError extends boolean = false>(options?: Options<CallWithDescriptionsData, ThrowOnError>) => (options?.client ?? client).post<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/descriptions/', ...options });\n\nexport const callWithParameters = <ThrowOnError extends boolean = false>(options: Options<CallWithParametersData, ThrowOnError>) => (options.client ?? client).post<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/parameters/{parameterPath}', ...options });\n\nexport const callWithWeirdParameterNames = <ThrowOnError extends boolean = false>(options: Options<CallWithWeirdParameterNamesData, ThrowOnError>) => (options.client ?? client).post<unknown, unknown, ThrowOnError>({\n    url: '/api/v{api-version}/parameters/{parameter.path.1}/{parameter-path-2}/{PARAMETER-PATH-3}',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options.headers\n    }\n});\n\nexport const callWithDefaultParameters = <ThrowOnError extends boolean = false>(options: Options<CallWithDefaultParametersData, ThrowOnError>) => (options.client ?? client).get<unknown, unknown, ThrowOnError>({\n    querySerializer: { parameters: { parameterModel: { object: { explode: false, style: 'form' } } } },\n    url: '/api/v{api-version}/defaults',\n    ...options\n});\n\nexport const callWithDefaultOptionalParameters = <ThrowOnError extends boolean = false>(options?: Options<CallWithDefaultOptionalParametersData, ThrowOnError>) => (options?.client ?? client).post<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/defaults', ...options });\n\nexport const callToTestOrderOfParams = <ThrowOnError extends boolean = false>(options: Options<CallToTestOrderOfParamsData, ThrowOnError>) => (options.client ?? client).put<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/defaults', ...options });\n\nexport const duplicateName = <ThrowOnError extends boolean = false>(options?: Options<DuplicateNameData, ThrowOnError>) => (options?.client ?? client).delete<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/duplicate', ...options });\n\nexport const duplicateName2 = <ThrowOnError extends boolean = false>(options?: Options<DuplicateName2Data, ThrowOnError>) => (options?.client ?? client).get<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/duplicate', ...options });\n\nexport const duplicateName3 = <ThrowOnError extends boolean = false>(options?: Options<DuplicateName3Data, ThrowOnError>) => (options?.client ?? client).post<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/duplicate', ...options });\n\nexport const duplicateName4 = <ThrowOnError extends boolean = false>(options?: Options<DuplicateName4Data, ThrowOnError>) => (options?.client ?? client).put<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/duplicate', ...options });\n\nexport const callWithNoContentResponse = <ThrowOnError extends boolean = false>(options?: Options<CallWithNoContentResponseData, ThrowOnError>) => (options?.client ?? client).get<CallWithNoContentResponseResponses, unknown, ThrowOnError>({\n    responseType: 'json',\n    url: '/api/v{api-version}/no-content',\n    ...options\n});\n\nexport const callWithResponseAndNoContentResponse = <ThrowOnError extends boolean = false>(options?: Options<CallWithResponseAndNoContentResponseData, ThrowOnError>) => (options?.client ?? client).get<CallWithResponseAndNoContentResponseResponses, unknown, ThrowOnError>({\n    responseType: 'json',\n    url: '/api/v{api-version}/multiple-tags/response-and-no-content',\n    ...options\n});\n\nexport const dummyA = <ThrowOnError extends boolean = false>(options?: Options<DummyAData, ThrowOnError>) => (options?.client ?? client).get<DummyAResponses, unknown, ThrowOnError>({\n    responseType: 'json',\n    url: '/api/v{api-version}/multiple-tags/a',\n    ...options\n});\n\nexport const dummyB = <ThrowOnError extends boolean = false>(options?: Options<DummyBData, ThrowOnError>) => (options?.client ?? client).get<DummyBResponses, unknown, ThrowOnError>({\n    responseType: 'json',\n    url: '/api/v{api-version}/multiple-tags/b',\n    ...options\n});\n\nexport const callWithResponse = <ThrowOnError extends boolean = false>(options?: Options<CallWithResponseData, ThrowOnError>) => (options?.client ?? client).get<CallWithResponseResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/response', ...options });\n\nexport const callWithDuplicateResponses = <ThrowOnError extends boolean = false>(options?: Options<CallWithDuplicateResponsesData, ThrowOnError>) => (options?.client ?? client).post<CallWithDuplicateResponsesResponses, CallWithDuplicateResponsesErrors, ThrowOnError>({\n    responseType: 'json',\n    url: '/api/v{api-version}/response',\n    ...options\n});\n\nexport const callWithResponses = <ThrowOnError extends boolean = false>(options?: Options<CallWithResponsesData, ThrowOnError>) => (options?.client ?? client).put<CallWithResponsesResponses, CallWithResponsesErrors, ThrowOnError>({\n    responseType: 'json',\n    url: '/api/v{api-version}/response',\n    ...options\n});\n\nexport const collectionFormat = <ThrowOnError extends boolean = false>(options: Options<CollectionFormatData, ThrowOnError>) => (options.client ?? client).get<unknown, unknown, ThrowOnError>({\n    querySerializer: { parameters: {\n            parameterArrayCSV: { array: { explode: false } },\n            parameterArraySSV: { array: { explode: false } },\n            parameterArrayTSV: { array: { explode: false } },\n            parameterArrayPipes: { array: { explode: false } }\n        } },\n    url: '/api/v{api-version}/collectionFormat',\n    ...options\n});\n\nexport const types = <ThrowOnError extends boolean = false>(options: Options<TypesData, ThrowOnError>) => (options.client ?? client).get<TypesResponses, unknown, ThrowOnError>({\n    querySerializer: { parameters: { parameterArray: { array: { explode: false } }, parameterDictionary: { object: { explode: false, style: 'form' } } } },\n    responseType: 'json',\n    url: '/api/v{api-version}/types',\n    ...options\n});\n\nexport const complexTypes = <ThrowOnError extends boolean = false>(options: Options<ComplexTypesData, ThrowOnError>) => (options.client ?? client).get<ComplexTypesResponses, ComplexTypesErrors, ThrowOnError>({\n    querySerializer: { parameters: { parameterObject: { object: { explode: false, style: 'form' } }, parameterReference: { object: { explode: false, style: 'form' } } } },\n    responseType: 'json',\n    url: '/api/v{api-version}/complex',\n    ...options\n});\n\nexport const callWithResultFromHeader = <ThrowOnError extends boolean = false>(options?: Options<CallWithResultFromHeaderData, ThrowOnError>) => (options?.client ?? client).post<CallWithResultFromHeaderResponses, CallWithResultFromHeaderErrors, ThrowOnError>({\n    responseType: 'json',\n    url: '/api/v{api-version}/header',\n    ...options\n});\n\nexport const testErrorCode = <ThrowOnError extends boolean = false>(options: Options<TestErrorCodeData, ThrowOnError>) => (options.client ?? client).post<TestErrorCodeResponses, TestErrorCodeErrors, ThrowOnError>({\n    responseType: 'json',\n    url: '/api/v{api-version}/error',\n    ...options\n});\n\nexport const nonAsciiæøåÆøÅöôêÊ字符串 = <ThrowOnError extends boolean = false>(options: Options<NonAsciiæøåÆøÅöôêÊ字符串Data, ThrowOnError>) => (options.client ?? client).post<NonAsciiæøåÆøÅöôêÊ字符串Responses, unknown, ThrowOnError>({\n    responseType: 'json',\n    url: '/api/v{api-version}/non-ascii-æøåÆØÅöôêÊ字符串',\n    ...options\n});\n\n/**\n * Body should not be unknown\n *\n * Body should not be unknown\n */\nexport const postApiVbyApiVersionBody = <ThrowOnError extends boolean = false>(options: Options<PostApiVbyApiVersionBodyData, ThrowOnError>) => (options.client ?? client).post<PostApiVbyApiVersionBodyResponses, PostApiVbyApiVersionBodyErrors, ThrowOnError>({\n    responseType: 'json',\n    url: '/api/v{api-version}/body',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options.headers\n    }\n});\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/preact-query/axios/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type ClientOptions = {\n    baseURL: 'http://localhost:3000/base' | (string & {});\n};\n\nexport type ExternalRefA = ExternalSharedModel;\n\nexport type ExternalRefB = ExternalSharedModel;\n\n/**\n * Testing multiline comments in string: First line\n * Second line\n *\n * Fourth line\n */\nexport type CommentWithBreaks = number;\n\n/**\n * Testing backticks in string: `backticks` and ```multiple backticks``` should work\n */\nexport type CommentWithBackticks = number;\n\n/**\n * Testing backticks and quotes in string: `backticks`, 'quotes', \"double quotes\" and ```multiple backticks``` should work\n */\nexport type CommentWithBackticksAndQuotes = number;\n\n/**\n * Testing slashes in string: \\backwards\\\\\\ and /forwards/// should work\n */\nexport type CommentWithSlashes = number;\n\n/**\n * Testing expression placeholders in string: ${expression} should work\n */\nexport type CommentWithExpressionPlaceholders = number;\n\n/**\n * Testing quotes in string: 'single quote''' and \"double quotes\"\"\" should work\n */\nexport type CommentWithQuotes = number;\n\n/**\n * Testing reserved characters in string: * inline * and ** inline ** should work\n */\nexport type CommentWithReservedCharacters = number;\n\n/**\n * This is a simple number\n */\nexport type SimpleInteger = number;\n\n/**\n * This is a simple boolean\n */\nexport type SimpleBoolean = boolean;\n\n/**\n * This is a simple string\n */\nexport type SimpleString = string;\n\n/**\n * A string with non-ascii (unicode) characters valid in typescript identifiers (æøåÆØÅöÔèÈ字符串)\n */\nexport type NonAsciiStringæøåÆøÅöôêÊ字符串 = string;\n\n/**\n * This is a simple file\n */\nexport type SimpleFile = Blob | File;\n\nexport type SimpleReference = ModelWithString;\n\n/**\n * This is a simple string\n */\nexport type SimpleStringWithPattern = string;\n\n/**\n * This is a simple enum with strings\n */\nexport type EnumWithStrings = 'Success' | 'Warning' | 'Error' | '\\'Single Quote\\'' | '\"Double Quotes\"' | 'Non-ascii: øæåôöØÆÅÔÖ字符串';\n\n/**\n * This is a simple enum with numbers\n */\nexport type EnumWithNumbers = 1 | 2 | 3 | 1.1 | 1.2 | 1.3 | 100 | 200 | 300 | -100 | -200 | -300 | -1.1 | -1.2 | -1.3;\n\n/**\n * Success=1,Warning=2,Error=3\n */\nexport type EnumFromDescription = number;\n\n/**\n * This is a simple enum with numbers\n */\nexport type EnumWithExtensions = 200 | 400 | 500;\n\n/**\n * This is a simple array with numbers\n */\nexport type ArrayWithNumbers = Array<number>;\n\n/**\n * This is a simple array with booleans\n */\nexport type ArrayWithBooleans = Array<boolean>;\n\n/**\n * This is a simple array with strings\n */\nexport type ArrayWithStrings = Array<string>;\n\n/**\n * This is a simple array with references\n */\nexport type ArrayWithReferences = Array<ModelWithString>;\n\n/**\n * This is a simple array containing an array\n */\nexport type ArrayWithArray = Array<Array<ModelWithString>>;\n\n/**\n * This is a simple array with properties\n */\nexport type ArrayWithProperties = Array<{\n    foo?: string;\n    bar?: string;\n}>;\n\n/**\n * This is a string dictionary\n */\nexport type DictionaryWithString = {\n    [key: string]: string;\n};\n\n/**\n * This is a string reference\n */\nexport type DictionaryWithReference = {\n    [key: string]: ModelWithString;\n};\n\n/**\n * This is a complex dictionary\n */\nexport type DictionaryWithArray = {\n    [key: string]: Array<ModelWithString>;\n};\n\n/**\n * This is a string dictionary\n */\nexport type DictionaryWithDictionary = {\n    [key: string]: {\n        [key: string]: string;\n    };\n};\n\n/**\n * This is a complex dictionary\n */\nexport type DictionaryWithProperties = {\n    [key: string]: {\n        foo?: string;\n        bar?: string;\n    };\n};\n\n/**\n * This is a type-only model that defines Date as a string\n */\nexport type Date = string;\n\n/**\n * This is a model with one number property\n */\nexport type ModelWithInteger = {\n    /**\n     * This is a simple number property\n     */\n    prop?: number;\n};\n\n/**\n * This is a model with one boolean property\n */\nexport type ModelWithBoolean = {\n    /**\n     * This is a simple boolean property\n     */\n    prop?: boolean;\n};\n\n/**\n * This is a model with one string property\n */\nexport type ModelWithString = {\n    /**\n     * This is a simple string property\n     */\n    prop?: string;\n};\n\n/**\n * This is a model with one string property\n */\nexport type ModelWithStringError = {\n    /**\n     * This is a simple string property\n     */\n    prop?: string;\n};\n\n/**\n * This is a model with one string property\n */\nexport type ModelWithNullableString = {\n    /**\n     * This is a simple string property\n     */\n    nullableProp?: string | null;\n    /**\n     * This is a simple string property\n     */\n    nullableRequiredProp: string | null;\n};\n\n/**\n * This is a model with one enum\n */\nexport type ModelWithEnum = {\n    /**\n     * This is a simple enum with strings\n     */\n    test?: 'Success' | 'Warning' | 'Error' | 'ØÆÅ字符串';\n    /**\n     * These are the HTTP error code enums\n     */\n    statusCode?: '100' | '200 FOO' | '300 FOO_BAR' | '400 foo-bar' | '500 foo.bar' | '600 foo&bar';\n    /**\n     * Simple boolean enum\n     */\n    bool?: true;\n};\n\n/**\n * This is a model with one enum\n */\nexport type ModelWithEnumFromDescription = {\n    /**\n     * Success=1,Warning=2,Error=3\n     */\n    test?: number;\n};\n\n/**\n * This is a model with nested enums\n */\nexport type ModelWithNestedEnums = {\n    dictionaryWithEnum?: {\n        [key: string]: 'Success' | 'Warning' | 'Error';\n    };\n    dictionaryWithEnumFromDescription?: {\n        [key: string]: number;\n    };\n    arrayWithEnum?: Array<'Success' | 'Warning' | 'Error'>;\n    arrayWithDescription?: Array<number>;\n};\n\n/**\n * This is a model with one property containing a reference\n */\nexport type ModelWithReference = {\n    prop?: ModelWithProperties;\n};\n\n/**\n * This is a model with one property containing an array\n */\nexport type ModelWithArray = {\n    prop?: Array<ModelWithString>;\n    propWithFile?: Array<Blob | File>;\n    propWithNumber?: Array<number>;\n};\n\n/**\n * This is a model with one property containing a dictionary\n */\nexport type ModelWithDictionary = {\n    prop?: {\n        [key: string]: string;\n    };\n};\n\n/**\n * This is a model with one property containing a circular reference\n */\nexport type ModelWithCircularReference = {\n    prop?: ModelWithCircularReference;\n};\n\n/**\n * This is a model with one nested property\n */\nexport type ModelWithProperties = {\n    required: string;\n    readonly requiredAndReadOnly: string;\n    string?: string;\n    number?: number;\n    boolean?: boolean;\n    reference?: ModelWithString;\n    'property with space'?: string;\n    default?: string;\n    try?: string;\n    readonly '@namespace.string'?: string;\n    readonly '@namespace.integer'?: number;\n};\n\n/**\n * This is a model with one nested property\n */\nexport type ModelWithNestedProperties = {\n    readonly first: {\n        readonly second: {\n            readonly third: string;\n        };\n    };\n};\n\n/**\n * This is a model with duplicated properties\n */\nexport type ModelWithDuplicateProperties = {\n    prop?: ModelWithString;\n};\n\n/**\n * This is a model with ordered properties\n */\nexport type ModelWithOrderedProperties = {\n    zebra?: string;\n    apple?: string;\n    hawaii?: string;\n};\n\n/**\n * This is a model with duplicated imports\n */\nexport type ModelWithDuplicateImports = {\n    propA?: ModelWithString;\n    propB?: ModelWithString;\n    propC?: ModelWithString;\n};\n\n/**\n * This is a model that extends another model\n */\nexport type ModelThatExtends = ModelWithString & {\n    propExtendsA?: string;\n    propExtendsB?: ModelWithString;\n};\n\n/**\n * This is a model that extends another model\n */\nexport type ModelThatExtendsExtends = ModelWithString & ModelThatExtends & {\n    propExtendsC?: string;\n    propExtendsD?: ModelWithString;\n};\n\nexport type Default = {\n    name?: string;\n};\n\n/**\n * This is a model that contains a some patterns\n */\nexport type ModelWithPattern = {\n    key: string;\n    name: string;\n    readonly enabled?: boolean;\n    readonly modified?: string;\n    id?: string;\n    text?: string;\n    patternWithSingleQuotes?: string;\n    patternWithNewline?: string;\n    patternWithBacktick?: string;\n    patternWithUnicode?: string;\n};\n\nexport type ParameterActivityParams = {\n    description?: string;\n    graduate_id?: number;\n    organization_id?: number;\n    parent_activity?: number;\n    post_id?: number;\n};\n\nexport type ResponsePostActivityResponse = {\n    description?: string;\n    graduate_id?: number;\n    organization_id?: number;\n    parent_activity_id?: number;\n    post_id?: number;\n};\n\nexport type FailureFailure = {\n    error?: string;\n    message?: string;\n    reference_code?: string;\n};\n\nexport type ExternalSharedModel = {\n    id: string;\n    name?: string;\n};\n\n/**\n * This is a model with one property containing a reference\n */\nexport type ModelWithReferenceWritable = {\n    prop?: ModelWithPropertiesWritable;\n};\n\n/**\n * This is a model with one nested property\n */\nexport type ModelWithPropertiesWritable = {\n    required: string;\n    string?: string;\n    number?: number;\n    boolean?: boolean;\n    reference?: ModelWithString;\n    'property with space'?: string;\n    default?: string;\n    try?: string;\n};\n\n/**\n * This is a model that contains a some patterns\n */\nexport type ModelWithPatternWritable = {\n    key: string;\n    name: string;\n    id?: string;\n    text?: string;\n    patternWithSingleQuotes?: string;\n    patternWithNewline?: string;\n    patternWithBacktick?: string;\n    patternWithUnicode?: string;\n};\n\nexport type ServiceWithEmptyTagData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no+tag';\n};\n\nexport type PatchApiVbyApiVersionNoTagData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no+tag';\n};\n\nexport type PatchApiVbyApiVersionNoTagResponses = {\n    /**\n     * OK\n     */\n    default: unknown;\n};\n\nexport type FooWowData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no+tag';\n};\n\nexport type FooWowResponses = {\n    /**\n     * OK\n     */\n    default: unknown;\n};\n\nexport type DeleteCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type GetCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type HeadCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type OptionsCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type PatchCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type PostCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type PutCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type CallWithDescriptionsData = {\n    body?: never;\n    path?: never;\n    query?: {\n        /**\n         * Testing multiline comments in string: First line\n         * Second line\n         *\n         * Fourth line\n         */\n        parameterWithBreaks?: string;\n        /**\n         * Testing backticks in string: `backticks` and ```multiple backticks``` should work\n         */\n        parameterWithBackticks?: string;\n        /**\n         * Testing slashes in string: \\backwards\\\\\\ and /forwards/// should work\n         */\n        parameterWithSlashes?: string;\n        /**\n         * Testing expression placeholders in string: ${expression} should work\n         */\n        parameterWithExpressionPlaceholders?: string;\n        /**\n         * Testing quotes in string: 'single quote''' and \"double quotes\"\"\" should work\n         */\n        parameterWithQuotes?: string;\n        /**\n         * Testing reserved characters in string: * inline * and ** inline ** should work\n         */\n        parameterWithReservedCharacters?: string;\n    };\n    url: '/api/v{api-version}/descriptions/';\n};\n\nexport type CallWithParametersData = {\n    body?: never;\n    headers: {\n        /**\n         * This is the parameter that goes into the header\n         */\n        parameterHeader: string;\n    };\n    path: {\n        /**\n         * This is the parameter that goes into the path\n         */\n        parameterPath: string;\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string;\n    };\n    query: {\n        /**\n         * This is the parameter that goes into the query params\n         */\n        parameterQuery: string;\n    };\n    url: '/api/v{api-version}/parameters/{parameterPath}';\n};\n\nexport type CallWithWeirdParameterNamesData = {\n    /**\n     * This is the parameter that is sent as request body\n     */\n    body: string;\n    headers: {\n        /**\n         * This is the parameter that goes into the request header\n         */\n        'parameter.header': string;\n    };\n    path: {\n        /**\n         * This is the parameter that goes into the path\n         */\n        'parameter.path.1'?: string;\n        /**\n         * This is the parameter that goes into the path\n         */\n        'parameter-path-2'?: string;\n        /**\n         * This is the parameter that goes into the path\n         */\n        'PARAMETER-PATH-3'?: string;\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string;\n    };\n    query: {\n        /**\n         * This is the parameter with a reserved keyword\n         */\n        default?: string;\n        /**\n         * This is the parameter that goes into the request query params\n         */\n        'parameter-query': string;\n    };\n    url: '/api/v{api-version}/parameters/{parameter.path.1}/{parameter-path-2}/{PARAMETER-PATH-3}';\n};\n\nexport type CallWithDefaultParametersData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * This is a simple string with default value\n         */\n        parameterString: string;\n        /**\n         * This is a simple number with default value\n         */\n        parameterNumber: number;\n        /**\n         * This is a simple boolean with default value\n         */\n        parameterBoolean: boolean;\n        /**\n         * This is a simple enum with default value\n         */\n        parameterEnum: 'Success' | 'Warning' | 'Error';\n        /**\n         * This is a model with one string property\n         */\n        parameterModel: {\n            /**\n             * This is a simple string property\n             */\n            prop?: string;\n        };\n    };\n    url: '/api/v{api-version}/defaults';\n};\n\nexport type CallWithDefaultOptionalParametersData = {\n    body?: never;\n    path?: never;\n    query?: {\n        /**\n         * This is a simple string that is optional with default value\n         */\n        parameterString?: string;\n        /**\n         * This is a simple number that is optional with default value\n         */\n        parameterNumber?: number;\n        /**\n         * This is a simple boolean that is optional with default value\n         */\n        parameterBoolean?: boolean;\n        /**\n         * This is a simple enum that is optional with default value\n         */\n        parameterEnum?: 'Success' | 'Warning' | 'Error';\n    };\n    url: '/api/v{api-version}/defaults';\n};\n\nexport type CallToTestOrderOfParamsData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * This is a optional string with default\n         */\n        parameterOptionalStringWithDefault?: string;\n        /**\n         * This is a optional string with empty default\n         */\n        parameterOptionalStringWithEmptyDefault?: string;\n        /**\n         * This is a optional string with no default\n         */\n        parameterOptionalStringWithNoDefault?: string;\n        /**\n         * This is a string with default\n         */\n        parameterStringWithDefault: string;\n        /**\n         * This is a string with empty default\n         */\n        parameterStringWithEmptyDefault: string;\n        /**\n         * This is a string with no default\n         */\n        parameterStringWithNoDefault: string;\n        /**\n         * This is a string that can be null with no default\n         */\n        parameterStringNullableWithNoDefault?: string | null;\n        /**\n         * This is a string that can be null with default\n         */\n        parameterStringNullableWithDefault?: string | null;\n    };\n    url: '/api/v{api-version}/defaults';\n};\n\nexport type DuplicateNameData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/duplicate';\n};\n\nexport type DuplicateName2Data = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/duplicate';\n};\n\nexport type DuplicateName3Data = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/duplicate';\n};\n\nexport type DuplicateName4Data = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/duplicate';\n};\n\nexport type CallWithNoContentResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no-content';\n};\n\nexport type CallWithNoContentResponseResponses = {\n    /**\n     * Success\n     */\n    204: unknown;\n};\n\nexport type CallWithResponseAndNoContentResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multiple-tags/response-and-no-content';\n};\n\nexport type CallWithResponseAndNoContentResponseResponses = {\n    /**\n     * Response is a simple number\n     */\n    200: number;\n    /**\n     * Success\n     */\n    204: unknown;\n};\n\nexport type CallWithResponseAndNoContentResponseResponse = CallWithResponseAndNoContentResponseResponses[keyof CallWithResponseAndNoContentResponseResponses];\n\nexport type DummyAData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multiple-tags/a';\n};\n\nexport type DummyAResponses = {\n    /**\n     * Success\n     */\n    204: unknown;\n};\n\nexport type DummyBData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multiple-tags/b';\n};\n\nexport type DummyBResponses = {\n    /**\n     * Success\n     */\n    204: unknown;\n};\n\nexport type CallWithResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/response';\n};\n\nexport type CallWithResponseResponses = {\n    /**\n     * Message for default response\n     */\n    default: ModelWithString;\n};\n\nexport type CallWithResponseResponse = CallWithResponseResponses[keyof CallWithResponseResponses];\n\nexport type CallWithDuplicateResponsesData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/response';\n};\n\nexport type CallWithDuplicateResponsesErrors = {\n    /**\n     * Message for 500 error\n     */\n    500: ModelWithStringError;\n    /**\n     * Message for 501 error\n     */\n    501: ModelWithStringError;\n    /**\n     * Message for 502 error\n     */\n    502: ModelWithStringError;\n    /**\n     * Message for default response\n     */\n    default: ModelWithString;\n};\n\nexport type CallWithDuplicateResponsesError = CallWithDuplicateResponsesErrors[keyof CallWithDuplicateResponsesErrors];\n\nexport type CallWithDuplicateResponsesResponses = {\n    /**\n     * Message for 201 response\n     */\n    201: ModelWithString;\n    /**\n     * Message for 202 response\n     */\n    202: ModelWithString;\n};\n\nexport type CallWithDuplicateResponsesResponse = CallWithDuplicateResponsesResponses[keyof CallWithDuplicateResponsesResponses];\n\nexport type CallWithResponsesData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/response';\n};\n\nexport type CallWithResponsesErrors = {\n    /**\n     * Message for 500 error\n     */\n    500: ModelWithStringError;\n    /**\n     * Message for 501 error\n     */\n    501: ModelWithStringError;\n    /**\n     * Message for 502 error\n     */\n    502: ModelWithStringError;\n    /**\n     * Message for default response\n     */\n    default: ModelWithString;\n};\n\nexport type CallWithResponsesError = CallWithResponsesErrors[keyof CallWithResponsesErrors];\n\nexport type CallWithResponsesResponses = {\n    /**\n     * Message for 200 response\n     */\n    200: {\n        readonly '@namespace.string'?: string;\n        readonly '@namespace.integer'?: number;\n        readonly value?: Array<ModelWithString>;\n    };\n    /**\n     * Message for 201 response\n     */\n    201: ModelThatExtends;\n    /**\n     * Message for 202 response\n     */\n    202: ModelThatExtendsExtends;\n};\n\nexport type CallWithResponsesResponse = CallWithResponsesResponses[keyof CallWithResponsesResponses];\n\nexport type CollectionFormatData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * This is an array parameter that is sent as csv format (comma-separated values)\n         */\n        parameterArrayCSV: Array<string>;\n        /**\n         * This is an array parameter that is sent as ssv format (space-separated values)\n         */\n        parameterArraySSV: Array<string>;\n        /**\n         * This is an array parameter that is sent as tsv format (tab-separated values)\n         */\n        parameterArrayTSV: Array<string>;\n        /**\n         * This is an array parameter that is sent as pipes format (pipe-separated values)\n         */\n        parameterArrayPipes: Array<string>;\n        /**\n         * This is an array parameter that is sent as multi format (multiple parameter instances)\n         */\n        parameterArrayMulti: Array<string>;\n    };\n    url: '/api/v{api-version}/collectionFormat';\n};\n\nexport type TypesData = {\n    body?: never;\n    path?: {\n        /**\n         * This is a number parameter\n         */\n        id?: number;\n    };\n    query: {\n        /**\n         * This is a number parameter\n         */\n        parameterNumber: number;\n        /**\n         * This is a string parameter\n         */\n        parameterString: string;\n        /**\n         * This is a boolean parameter\n         */\n        parameterBoolean: boolean;\n        /**\n         * This is an array parameter\n         */\n        parameterArray: Array<string>;\n        /**\n         * This is a dictionary parameter\n         */\n        parameterDictionary: {\n            [key: string]: unknown;\n        };\n        /**\n         * This is an enum parameter\n         */\n        parameterEnum: 'Success' | 'Warning' | 'Error';\n    };\n    url: '/api/v{api-version}/types';\n};\n\nexport type TypesResponses = {\n    /**\n     * Response is a simple number\n     */\n    200: number;\n    /**\n     * Response is a simple string\n     */\n    201: string;\n    /**\n     * Response is a simple boolean\n     */\n    202: boolean;\n    /**\n     * Response is a simple object\n     */\n    203: {\n        [key: string]: unknown;\n    };\n};\n\nexport type TypesResponse = TypesResponses[keyof TypesResponses];\n\nexport type ComplexTypesData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * Parameter containing object\n         */\n        parameterObject: {\n            first?: {\n                second?: {\n                    third?: string;\n                };\n            };\n        };\n        /**\n         * This is a model with one string property\n         */\n        parameterReference: {\n            /**\n             * This is a simple string property\n             */\n            prop?: string;\n        };\n    };\n    url: '/api/v{api-version}/complex';\n};\n\nexport type ComplexTypesErrors = {\n    /**\n     * 400 server error\n     */\n    400: unknown;\n    /**\n     * 500 server error\n     */\n    500: unknown;\n};\n\nexport type ComplexTypesResponses = {\n    /**\n     * Successful response\n     */\n    200: Array<ModelWithString>;\n};\n\nexport type ComplexTypesResponse = ComplexTypesResponses[keyof ComplexTypesResponses];\n\nexport type CallWithResultFromHeaderData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/header';\n};\n\nexport type CallWithResultFromHeaderErrors = {\n    /**\n     * 400 server error\n     */\n    400: unknown;\n    /**\n     * 500 server error\n     */\n    500: unknown;\n};\n\nexport type CallWithResultFromHeaderResponses = {\n    /**\n     * Successful response\n     */\n    200: unknown;\n};\n\nexport type TestErrorCodeData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * Status code to return\n         */\n        status: string;\n    };\n    url: '/api/v{api-version}/error';\n};\n\nexport type TestErrorCodeErrors = {\n    /**\n     * Custom message: Internal Server Error\n     */\n    500: unknown;\n    /**\n     * Custom message: Not Implemented\n     */\n    501: unknown;\n    /**\n     * Custom message: Bad Gateway\n     */\n    502: unknown;\n    /**\n     * Custom message: Service Unavailable\n     */\n    503: unknown;\n};\n\nexport type TestErrorCodeResponses = {\n    /**\n     * Custom message: Successful response\n     */\n    200: unknown;\n};\n\nexport type NonAsciiæøåÆøÅöôêÊ字符串Data = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * Dummy input param\n         */\n        nonAsciiParamæøåÆØÅöôêÊ: number;\n    };\n    url: '/api/v{api-version}/non-ascii-æøåÆØÅöôêÊ字符串';\n};\n\nexport type NonAsciiæøåÆøÅöôêÊ字符串Responses = {\n    /**\n     * Successful response\n     */\n    200: NonAsciiStringæøåÆøÅöôêÊ字符串;\n};\n\nexport type NonAsciiæøåÆøÅöôêÊ字符串Response = NonAsciiæøåÆøÅöôêÊ字符串Responses[keyof NonAsciiæøåÆøÅöôêÊ字符串Responses];\n\nexport type PostApiVbyApiVersionBodyData = {\n    /**\n     * Body should not be unknown\n     */\n    body: ParameterActivityParams;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/body';\n};\n\nexport type PostApiVbyApiVersionBodyErrors = {\n    /**\n     * Bad Request\n     */\n    400: FailureFailure;\n    /**\n     * Internal Server Error\n     */\n    500: FailureFailure;\n};\n\nexport type PostApiVbyApiVersionBodyError = PostApiVbyApiVersionBodyErrors[keyof PostApiVbyApiVersionBodyErrors];\n\nexport type PostApiVbyApiVersionBodyResponses = {\n    /**\n     * OK\n     */\n    200: ResponsePostActivityResponse;\n};\n\nexport type PostApiVbyApiVersionBodyResponse = PostApiVbyApiVersionBodyResponses[keyof PostApiVbyApiVersionBodyResponses];\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/preact-query/fetch/@tanstack/preact-query.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport { type DefaultError, queryOptions, type UseMutationOptions } from '@tanstack/preact-query';\n\nimport { client } from '../client.gen';\nimport { callToTestOrderOfParams, callWithDefaultOptionalParameters, callWithDefaultParameters, callWithDescriptions, callWithDuplicateResponses, callWithNoContentResponse, callWithParameters, callWithResponse, callWithResponseAndNoContentResponse, callWithResponses, callWithResultFromHeader, callWithWeirdParameterNames, collectionFormat, complexTypes, deleteCallWithoutParametersAndResponse, dummyA, dummyB, duplicateName, duplicateName2, duplicateName3, duplicateName4, fooWow, getCallWithoutParametersAndResponse, nonAsciiæøåÆøÅöôêÊ字符串, type Options, patchApiVbyApiVersionNoTag, patchCallWithoutParametersAndResponse, postApiVbyApiVersionBody, postCallWithoutParametersAndResponse, putCallWithoutParametersAndResponse, serviceWithEmptyTag, testErrorCode, types } from '../sdk.gen';\nimport type { CallToTestOrderOfParamsData, CallWithDefaultOptionalParametersData, CallWithDefaultParametersData, CallWithDescriptionsData, CallWithDuplicateResponsesData, CallWithDuplicateResponsesError, CallWithDuplicateResponsesResponse, CallWithNoContentResponseData, CallWithParametersData, CallWithResponseAndNoContentResponseData, CallWithResponseAndNoContentResponseResponse, CallWithResponseData, CallWithResponseResponse, CallWithResponsesData, CallWithResponsesError, CallWithResponsesResponse, CallWithResultFromHeaderData, CallWithWeirdParameterNamesData, CollectionFormatData, ComplexTypesData, ComplexTypesResponse, DeleteCallWithoutParametersAndResponseData, DummyAData, DummyBData, DuplicateName2Data, DuplicateName3Data, DuplicateName4Data, DuplicateNameData, FooWowData, GetCallWithoutParametersAndResponseData, NonAsciiæøåÆøÅöôêÊ字符串Data, NonAsciiæøåÆøÅöôêÊ字符串Response, PatchApiVbyApiVersionNoTagData, PatchCallWithoutParametersAndResponseData, PostApiVbyApiVersionBodyData, PostApiVbyApiVersionBodyError, PostApiVbyApiVersionBodyResponse, PostCallWithoutParametersAndResponseData, PutCallWithoutParametersAndResponseData, ServiceWithEmptyTagData, TestErrorCodeData, TypesData, TypesResponse } from '../types.gen';\n\nexport type QueryKey<TOptions extends Options> = [\n    Pick<TOptions, 'baseUrl' | 'body' | 'headers' | 'path' | 'query'> & {\n        _id: string;\n        _infinite?: boolean;\n        tags?: ReadonlyArray<string>;\n    }\n];\n\nconst createQueryKey = <TOptions extends Options>(id: string, options?: TOptions, infinite?: boolean, tags?: ReadonlyArray<string>): [\n    QueryKey<TOptions>[0]\n] => {\n    const params: QueryKey<TOptions>[0] = { _id: id, baseUrl: options?.baseUrl || (options?.client ?? client).getConfig().baseUrl } as QueryKey<TOptions>[0];\n    if (infinite) {\n        params._infinite = infinite;\n    }\n    if (tags) {\n        params.tags = tags;\n    }\n    if (options?.body) {\n        params.body = options.body;\n    }\n    if (options?.headers) {\n        params.headers = options.headers;\n    }\n    if (options?.path) {\n        params.path = options.path;\n    }\n    if (options?.query) {\n        params.query = options.query;\n    }\n    return [params];\n};\n\nexport const serviceWithEmptyTagQueryKey = (options?: Options<ServiceWithEmptyTagData>) => createQueryKey('serviceWithEmptyTag', options);\n\nexport const serviceWithEmptyTagOptions = (options?: Options<ServiceWithEmptyTagData>) => queryOptions<unknown, DefaultError, unknown, ReturnType<typeof serviceWithEmptyTagQueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await serviceWithEmptyTag({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: serviceWithEmptyTagQueryKey(options)\n});\n\nexport const patchApiVbyApiVersionNoTagMutation = (options?: Partial<Options<PatchApiVbyApiVersionNoTagData>>): UseMutationOptions<unknown, DefaultError, Options<PatchApiVbyApiVersionNoTagData>> => {\n    const mutationOptions: UseMutationOptions<unknown, DefaultError, Options<PatchApiVbyApiVersionNoTagData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await patchApiVbyApiVersionNoTag({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const fooWowMutation = (options?: Partial<Options<FooWowData>>): UseMutationOptions<unknown, DefaultError, Options<FooWowData>> => {\n    const mutationOptions: UseMutationOptions<unknown, DefaultError, Options<FooWowData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await fooWow({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const deleteCallWithoutParametersAndResponseMutation = (options?: Partial<Options<DeleteCallWithoutParametersAndResponseData>>): UseMutationOptions<unknown, DefaultError, Options<DeleteCallWithoutParametersAndResponseData>> => {\n    const mutationOptions: UseMutationOptions<unknown, DefaultError, Options<DeleteCallWithoutParametersAndResponseData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await deleteCallWithoutParametersAndResponse({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const getCallWithoutParametersAndResponseQueryKey = (options?: Options<GetCallWithoutParametersAndResponseData>) => createQueryKey('getCallWithoutParametersAndResponse', options);\n\nexport const getCallWithoutParametersAndResponseOptions = (options?: Options<GetCallWithoutParametersAndResponseData>) => queryOptions<unknown, DefaultError, unknown, ReturnType<typeof getCallWithoutParametersAndResponseQueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await getCallWithoutParametersAndResponse({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: getCallWithoutParametersAndResponseQueryKey(options)\n});\n\nexport const patchCallWithoutParametersAndResponseMutation = (options?: Partial<Options<PatchCallWithoutParametersAndResponseData>>): UseMutationOptions<unknown, DefaultError, Options<PatchCallWithoutParametersAndResponseData>> => {\n    const mutationOptions: UseMutationOptions<unknown, DefaultError, Options<PatchCallWithoutParametersAndResponseData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await patchCallWithoutParametersAndResponse({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const postCallWithoutParametersAndResponseMutation = (options?: Partial<Options<PostCallWithoutParametersAndResponseData>>): UseMutationOptions<unknown, DefaultError, Options<PostCallWithoutParametersAndResponseData>> => {\n    const mutationOptions: UseMutationOptions<unknown, DefaultError, Options<PostCallWithoutParametersAndResponseData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await postCallWithoutParametersAndResponse({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const putCallWithoutParametersAndResponseMutation = (options?: Partial<Options<PutCallWithoutParametersAndResponseData>>): UseMutationOptions<unknown, DefaultError, Options<PutCallWithoutParametersAndResponseData>> => {\n    const mutationOptions: UseMutationOptions<unknown, DefaultError, Options<PutCallWithoutParametersAndResponseData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await putCallWithoutParametersAndResponse({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const callWithDescriptionsMutation = (options?: Partial<Options<CallWithDescriptionsData>>): UseMutationOptions<unknown, DefaultError, Options<CallWithDescriptionsData>> => {\n    const mutationOptions: UseMutationOptions<unknown, DefaultError, Options<CallWithDescriptionsData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await callWithDescriptions({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const callWithParametersMutation = (options?: Partial<Options<CallWithParametersData>>): UseMutationOptions<unknown, DefaultError, Options<CallWithParametersData>> => {\n    const mutationOptions: UseMutationOptions<unknown, DefaultError, Options<CallWithParametersData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await callWithParameters({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const callWithWeirdParameterNamesMutation = (options?: Partial<Options<CallWithWeirdParameterNamesData>>): UseMutationOptions<unknown, DefaultError, Options<CallWithWeirdParameterNamesData>> => {\n    const mutationOptions: UseMutationOptions<unknown, DefaultError, Options<CallWithWeirdParameterNamesData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await callWithWeirdParameterNames({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const callWithDefaultParametersQueryKey = (options: Options<CallWithDefaultParametersData>) => createQueryKey('callWithDefaultParameters', options);\n\nexport const callWithDefaultParametersOptions = (options: Options<CallWithDefaultParametersData>) => queryOptions<unknown, DefaultError, unknown, ReturnType<typeof callWithDefaultParametersQueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await callWithDefaultParameters({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: callWithDefaultParametersQueryKey(options)\n});\n\nexport const callWithDefaultOptionalParametersMutation = (options?: Partial<Options<CallWithDefaultOptionalParametersData>>): UseMutationOptions<unknown, DefaultError, Options<CallWithDefaultOptionalParametersData>> => {\n    const mutationOptions: UseMutationOptions<unknown, DefaultError, Options<CallWithDefaultOptionalParametersData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await callWithDefaultOptionalParameters({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const callToTestOrderOfParamsMutation = (options?: Partial<Options<CallToTestOrderOfParamsData>>): UseMutationOptions<unknown, DefaultError, Options<CallToTestOrderOfParamsData>> => {\n    const mutationOptions: UseMutationOptions<unknown, DefaultError, Options<CallToTestOrderOfParamsData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await callToTestOrderOfParams({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const duplicateNameMutation = (options?: Partial<Options<DuplicateNameData>>): UseMutationOptions<unknown, DefaultError, Options<DuplicateNameData>> => {\n    const mutationOptions: UseMutationOptions<unknown, DefaultError, Options<DuplicateNameData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await duplicateName({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const duplicateName2QueryKey = (options?: Options<DuplicateName2Data>) => createQueryKey('duplicateName2', options);\n\nexport const duplicateName2Options = (options?: Options<DuplicateName2Data>) => queryOptions<unknown, DefaultError, unknown, ReturnType<typeof duplicateName2QueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await duplicateName2({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: duplicateName2QueryKey(options)\n});\n\nexport const duplicateName3Mutation = (options?: Partial<Options<DuplicateName3Data>>): UseMutationOptions<unknown, DefaultError, Options<DuplicateName3Data>> => {\n    const mutationOptions: UseMutationOptions<unknown, DefaultError, Options<DuplicateName3Data>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await duplicateName3({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const duplicateName4Mutation = (options?: Partial<Options<DuplicateName4Data>>): UseMutationOptions<unknown, DefaultError, Options<DuplicateName4Data>> => {\n    const mutationOptions: UseMutationOptions<unknown, DefaultError, Options<DuplicateName4Data>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await duplicateName4({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const callWithNoContentResponseQueryKey = (options?: Options<CallWithNoContentResponseData>) => createQueryKey('callWithNoContentResponse', options);\n\nexport const callWithNoContentResponseOptions = (options?: Options<CallWithNoContentResponseData>) => queryOptions<unknown, DefaultError, unknown, ReturnType<typeof callWithNoContentResponseQueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await callWithNoContentResponse({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: callWithNoContentResponseQueryKey(options)\n});\n\nexport const callWithResponseAndNoContentResponseQueryKey = (options?: Options<CallWithResponseAndNoContentResponseData>) => createQueryKey('callWithResponseAndNoContentResponse', options);\n\nexport const callWithResponseAndNoContentResponseOptions = (options?: Options<CallWithResponseAndNoContentResponseData>) => queryOptions<CallWithResponseAndNoContentResponseResponse, DefaultError, CallWithResponseAndNoContentResponseResponse, ReturnType<typeof callWithResponseAndNoContentResponseQueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await callWithResponseAndNoContentResponse({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: callWithResponseAndNoContentResponseQueryKey(options)\n});\n\nexport const dummyAQueryKey = (options?: Options<DummyAData>) => createQueryKey('dummyA', options);\n\nexport const dummyAOptions = (options?: Options<DummyAData>) => queryOptions<unknown, DefaultError, unknown, ReturnType<typeof dummyAQueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await dummyA({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: dummyAQueryKey(options)\n});\n\nexport const dummyBQueryKey = (options?: Options<DummyBData>) => createQueryKey('dummyB', options);\n\nexport const dummyBOptions = (options?: Options<DummyBData>) => queryOptions<unknown, DefaultError, unknown, ReturnType<typeof dummyBQueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await dummyB({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: dummyBQueryKey(options)\n});\n\nexport const callWithResponseQueryKey = (options?: Options<CallWithResponseData>) => createQueryKey('callWithResponse', options);\n\nexport const callWithResponseOptions = (options?: Options<CallWithResponseData>) => queryOptions<CallWithResponseResponse, DefaultError, CallWithResponseResponse, ReturnType<typeof callWithResponseQueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await callWithResponse({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: callWithResponseQueryKey(options)\n});\n\nexport const callWithDuplicateResponsesMutation = (options?: Partial<Options<CallWithDuplicateResponsesData>>): UseMutationOptions<CallWithDuplicateResponsesResponse, CallWithDuplicateResponsesError, Options<CallWithDuplicateResponsesData>> => {\n    const mutationOptions: UseMutationOptions<CallWithDuplicateResponsesResponse, CallWithDuplicateResponsesError, Options<CallWithDuplicateResponsesData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await callWithDuplicateResponses({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const callWithResponsesMutation = (options?: Partial<Options<CallWithResponsesData>>): UseMutationOptions<CallWithResponsesResponse, CallWithResponsesError, Options<CallWithResponsesData>> => {\n    const mutationOptions: UseMutationOptions<CallWithResponsesResponse, CallWithResponsesError, Options<CallWithResponsesData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await callWithResponses({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const collectionFormatQueryKey = (options: Options<CollectionFormatData>) => createQueryKey('collectionFormat', options);\n\nexport const collectionFormatOptions = (options: Options<CollectionFormatData>) => queryOptions<unknown, DefaultError, unknown, ReturnType<typeof collectionFormatQueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await collectionFormat({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: collectionFormatQueryKey(options)\n});\n\nexport const typesQueryKey = (options: Options<TypesData>) => createQueryKey('types', options);\n\nexport const typesOptions = (options: Options<TypesData>) => queryOptions<TypesResponse, DefaultError, TypesResponse, ReturnType<typeof typesQueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await types({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: typesQueryKey(options)\n});\n\nexport const complexTypesQueryKey = (options: Options<ComplexTypesData>) => createQueryKey('complexTypes', options);\n\nexport const complexTypesOptions = (options: Options<ComplexTypesData>) => queryOptions<ComplexTypesResponse, DefaultError, ComplexTypesResponse, ReturnType<typeof complexTypesQueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await complexTypes({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: complexTypesQueryKey(options)\n});\n\nexport const callWithResultFromHeaderMutation = (options?: Partial<Options<CallWithResultFromHeaderData>>): UseMutationOptions<unknown, DefaultError, Options<CallWithResultFromHeaderData>> => {\n    const mutationOptions: UseMutationOptions<unknown, DefaultError, Options<CallWithResultFromHeaderData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await callWithResultFromHeader({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const testErrorCodeMutation = (options?: Partial<Options<TestErrorCodeData>>): UseMutationOptions<unknown, DefaultError, Options<TestErrorCodeData>> => {\n    const mutationOptions: UseMutationOptions<unknown, DefaultError, Options<TestErrorCodeData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await testErrorCode({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const nonAsciiæøåÆøÅöôêÊ字符串Mutation = (options?: Partial<Options<NonAsciiæøåÆøÅöôêÊ字符串Data>>): UseMutationOptions<NonAsciiæøåÆøÅöôêÊ字符串Response, DefaultError, Options<NonAsciiæøåÆøÅöôêÊ字符串Data>> => {\n    const mutationOptions: UseMutationOptions<NonAsciiæøåÆøÅöôêÊ字符串Response, DefaultError, Options<NonAsciiæøåÆøÅöôêÊ字符串Data>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await nonAsciiæøåÆøÅöôêÊ字符串({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\n/**\n * Body should not be unknown\n *\n * Body should not be unknown\n */\nexport const postApiVbyApiVersionBodyMutation = (options?: Partial<Options<PostApiVbyApiVersionBodyData>>): UseMutationOptions<PostApiVbyApiVersionBodyResponse, PostApiVbyApiVersionBodyError, Options<PostApiVbyApiVersionBodyData>> => {\n    const mutationOptions: UseMutationOptions<PostApiVbyApiVersionBodyResponse, PostApiVbyApiVersionBodyError, Options<PostApiVbyApiVersionBodyData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await postApiVbyApiVersionBody({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/preact-query/fetch/client/client.gen.ts",
    "content": "// 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 (options: RequestOptions) => {\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 url = buildUrl(opts);\n\n    return { opts, url };\n  };\n\n  const request: Client['request'] = async (options) => {\n    // @ts-expect-error\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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/preact-query/fetch/client/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type { Auth } from '../core/auth.gen';\nexport type { QuerySerializerOptions } from '../core/bodySerializer.gen';\nexport {\n  formDataBodySerializer,\n  jsonBodySerializer,\n  urlSearchParamsBodySerializer,\n} from '../core/bodySerializer.gen';\nexport { buildClientParams } from '../core/params.gen';\nexport { serializeQueryKeyValue } from '../core/queryKeySerializer.gen';\nexport { createClient } from './client.gen';\nexport type {\n  Client,\n  ClientOptions,\n  Config,\n  CreateClientConfig,\n  Options,\n  RequestOptions,\n  RequestResult,\n  ResolvedRequestOptions,\n  ResponseStyle,\n  TDataShape,\n} from './types.gen';\nexport { createConfig, mergeHeaders } from './utils.gen';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/preact-query/fetch/client/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { Auth } from '../core/auth.gen';\nimport type {\n  ServerSentEventsOptions,\n  ServerSentEventsResult,\n} from '../core/serverSentEvents.gen';\nimport type { Client as CoreClient, Config as CoreConfig } from '../core/types.gen';\nimport type { Middleware } from './utils.gen';\n\nexport type ResponseStyle = 'data' | 'fields';\n\nexport interface Config<T extends ClientOptions = ClientOptions>\n  extends Omit<RequestInit, 'body' | 'headers' | 'method'>, CoreConfig {\n  /**\n   * Base URL for all requests made by this client.\n   */\n  baseUrl?: T['baseUrl'];\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   * Please don't use the Fetch client for Next.js applications. The `next`\n   * options won't have any effect.\n   *\n   * Install {@link https://www.npmjs.com/package/@hey-api/client-next `@hey-api/client-next`} instead.\n   */\n  next?: never;\n  /**\n   * Return the response data parsed in a specified format. By default, `auto`\n   * will infer the appropriate method from the `Content-Type` response header.\n   * You can override this behavior with any of the {@link Body} methods.\n   * Select `stream` if you don't want to parse response data at all.\n   *\n   * @default 'auto'\n   */\n  parseAs?: 'arrayBuffer' | 'auto' | 'blob' | 'formData' | 'json' | 'stream' | 'text';\n  /**\n   * Should we return only data or multiple fields (data, error, response, etc.)?\n   *\n   * @default 'fields'\n   */\n  responseStyle?: ResponseStyle;\n  /**\n   * Throw an error instead of returning it in the response?\n   *\n   * @default false\n   */\n  throwOnError?: T['throwOnError'];\n}\n\nexport interface RequestOptions<\n  TData = unknown,\n  TResponseStyle extends ResponseStyle = 'fields',\n  ThrowOnError extends boolean = boolean,\n  Url extends string = string,\n>\n  extends\n    Config<{\n      responseStyle: TResponseStyle;\n      throwOnError: ThrowOnError;\n    }>,\n    Pick<\n      ServerSentEventsOptions<TData>,\n      | 'onRequest'\n      | 'onSseError'\n      | 'onSseEvent'\n      | 'sseDefaultRetryDelay'\n      | 'sseMaxRetryAttempts'\n      | 'sseMaxRetryDelay'\n    > {\n  /**\n   * Any body that you want to add to your request.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/fetch#body}\n   */\n  body?: unknown;\n  path?: Record<string, unknown>;\n  query?: Record<string, unknown>;\n  /**\n   * Security mechanism(s) to use for the request.\n   */\n  security?: ReadonlyArray<Auth>;\n  url: Url;\n}\n\nexport interface ResolvedRequestOptions<\n  TResponseStyle extends ResponseStyle = 'fields',\n  ThrowOnError extends boolean = boolean,\n  Url extends string = string,\n> extends RequestOptions<unknown, TResponseStyle, ThrowOnError, Url> {\n  serializedBody?: string;\n}\n\nexport type RequestResult<\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = boolean,\n  TResponseStyle extends ResponseStyle = 'fields',\n> = ThrowOnError extends true\n  ? Promise<\n      TResponseStyle extends 'data'\n        ? TData extends Record<string, unknown>\n          ? TData[keyof TData]\n          : TData\n        : {\n            data: TData extends Record<string, unknown> ? TData[keyof TData] : TData;\n            request: Request;\n            response: Response;\n          }\n    >\n  : Promise<\n      TResponseStyle extends 'data'\n        ? (TData extends Record<string, unknown> ? TData[keyof TData] : TData) | undefined\n        : (\n            | {\n                data: TData extends Record<string, unknown> ? TData[keyof TData] : TData;\n                error: undefined;\n              }\n            | {\n                data: undefined;\n                error: TError extends Record<string, unknown> ? TError[keyof TError] : TError;\n              }\n          ) & {\n            request: Request;\n            response: Response;\n          }\n    >;\n\nexport interface ClientOptions {\n  baseUrl?: string;\n  responseStyle?: ResponseStyle;\n  throwOnError?: boolean;\n}\n\ntype MethodFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'>,\n) => RequestResult<TData, TError, ThrowOnError, TResponseStyle>;\n\ntype SseFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'>,\n) => Promise<ServerSentEventsResult<TData, TError>>;\n\ntype RequestFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'> &\n    Pick<Required<RequestOptions<TData, TResponseStyle, ThrowOnError>>, 'method'>,\n) => RequestResult<TData, TError, ThrowOnError, TResponseStyle>;\n\ntype BuildUrlFn = <\n  TData extends {\n    body?: unknown;\n    path?: Record<string, unknown>;\n    query?: Record<string, unknown>;\n    url: string;\n  },\n>(\n  options: TData & Options<TData>,\n) => string;\n\nexport type Client = CoreClient<RequestFn, Config, MethodFn, BuildUrlFn, SseFn> & {\n  interceptors: Middleware<Request, Response, unknown, ResolvedRequestOptions>;\n};\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 = ClientOptions> = (\n  override?: Config<ClientOptions & T>,\n) => Config<Required<ClientOptions> & T>;\n\nexport interface TDataShape {\n  body?: unknown;\n  headers?: unknown;\n  path?: unknown;\n  query?: unknown;\n  url: string;\n}\n\ntype OmitKeys<T, K> = Pick<T, Exclude<keyof T, K>>;\n\nexport type Options<\n  TData extends TDataShape = TDataShape,\n  ThrowOnError extends boolean = boolean,\n  TResponse = unknown,\n  TResponseStyle extends ResponseStyle = 'fields',\n> = OmitKeys<\n  RequestOptions<TResponse, TResponseStyle, ThrowOnError>,\n  'body' | 'path' | 'query' | 'url'\n> &\n  ([TData] extends [never] ? unknown : Omit<TData, 'url'>);\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/preact-query/fetch/client/utils.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/preact-query/fetch/client.gen.ts",
    "content": "// 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: 'http://localhost:3000/base' }));\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/preact-query/fetch/core/auth.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/preact-query/fetch/core/bodySerializer.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/preact-query/fetch/core/params.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/preact-query/fetch/core/pathSerializer.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/preact-query/fetch/core/queryKeySerializer.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\n/**\n * JSON-friendly union that mirrors what Pinia Colada can hash.\n */\nexport type JsonValue =\n  | null\n  | string\n  | number\n  | boolean\n  | JsonValue[]\n  | { [key: string]: JsonValue };\n\n/**\n * Replacer that converts non-JSON values (bigint, Date, etc.) to safe substitutes.\n */\nexport const queryKeyJsonReplacer = (_key: string, value: unknown) => {\n  if (value === undefined || typeof value === 'function' || typeof value === 'symbol') {\n    return undefined;\n  }\n  if (typeof value === 'bigint') {\n    return value.toString();\n  }\n  if (value instanceof Date) {\n    return value.toISOString();\n  }\n  return value;\n};\n\n/**\n * Safely stringifies a value and parses it back into a JsonValue.\n */\nexport const stringifyToJsonValue = (input: unknown): JsonValue | undefined => {\n  try {\n    const json = JSON.stringify(input, queryKeyJsonReplacer);\n    if (json === undefined) {\n      return undefined;\n    }\n    return JSON.parse(json) as JsonValue;\n  } catch {\n    return undefined;\n  }\n};\n\n/**\n * Detects plain objects (including objects with a null prototype).\n */\nconst isPlainObject = (value: unknown): value is Record<string, unknown> => {\n  if (value === null || typeof value !== 'object') {\n    return false;\n  }\n  const prototype = Object.getPrototypeOf(value as object);\n  return prototype === Object.prototype || prototype === null;\n};\n\n/**\n * Turns URLSearchParams into a sorted JSON object for deterministic keys.\n */\nconst serializeSearchParams = (params: URLSearchParams): JsonValue => {\n  const entries = Array.from(params.entries()).sort(([a], [b]) => a.localeCompare(b));\n  const result: Record<string, JsonValue> = {};\n\n  for (const [key, value] of entries) {\n    const existing = result[key];\n    if (existing === undefined) {\n      result[key] = value;\n      continue;\n    }\n\n    if (Array.isArray(existing)) {\n      (existing as string[]).push(value);\n    } else {\n      result[key] = [existing, value];\n    }\n  }\n\n  return result;\n};\n\n/**\n * Normalizes any accepted value into a JSON-friendly shape for query keys.\n */\nexport const serializeQueryKeyValue = (value: unknown): JsonValue | undefined => {\n  if (value === null) {\n    return null;\n  }\n\n  if (typeof value === 'string' || typeof value === 'number' || typeof value === 'boolean') {\n    return value;\n  }\n\n  if (value === undefined || typeof value === 'function' || typeof value === 'symbol') {\n    return undefined;\n  }\n\n  if (typeof value === 'bigint') {\n    return value.toString();\n  }\n\n  if (value instanceof Date) {\n    return value.toISOString();\n  }\n\n  if (Array.isArray(value)) {\n    return stringifyToJsonValue(value);\n  }\n\n  if (typeof URLSearchParams !== 'undefined' && value instanceof URLSearchParams) {\n    return serializeSearchParams(value);\n  }\n\n  if (isPlainObject(value)) {\n    return stringifyToJsonValue(value);\n  }\n\n  return undefined;\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/preact-query/fetch/core/serverSentEvents.gen.ts",
    "content": "// 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 const 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            // Normalize line endings: CRLF -> LF, then CR -> LF\n            buffer = buffer.replace(/\\r\\n/g, '\\n').replace(/\\r/g, '\\n');\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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/preact-query/fetch/core/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { Auth, AuthToken } from './auth.gen';\nimport type { BodySerializer, QuerySerializer, QuerySerializerOptions } from './bodySerializer.gen';\n\nexport type HttpMethod =\n  | 'connect'\n  | 'delete'\n  | 'get'\n  | 'head'\n  | 'options'\n  | 'patch'\n  | 'post'\n  | 'put'\n  | 'trace';\n\nexport type Client<\n  RequestFn = never,\n  Config = unknown,\n  MethodFn = never,\n  BuildUrlFn = never,\n  SseFn = never,\n> = {\n  /**\n   * Returns the final request URL.\n   */\n  buildUrl: BuildUrlFn;\n  getConfig: () => Config;\n  request: RequestFn;\n  setConfig: (config: Config) => Config;\n} & {\n  [K in HttpMethod]: MethodFn;\n} & ([SseFn] extends [never] ? { sse?: never } : { sse: { [K in HttpMethod]: SseFn } });\n\nexport interface Config {\n  /**\n   * Auth token or a function returning auth token. The resolved value will be\n   * added to the request payload as defined by its `security` array.\n   */\n  auth?: ((auth: Auth) => Promise<AuthToken> | AuthToken) | AuthToken;\n  /**\n   * A function for serializing request body parameter. By default,\n   * {@link JSON.stringify()} will be used.\n   */\n  bodySerializer?: BodySerializer | null;\n  /**\n   * An object containing any HTTP headers that you want to pre-populate your\n   * `Headers` object with.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/Headers/Headers#init See more}\n   */\n  headers?:\n    | RequestInit['headers']\n    | Record<\n        string,\n        string | number | boolean | (string | number | boolean)[] | null | undefined | unknown\n      >;\n  /**\n   * The request method.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/fetch#method See more}\n   */\n  method?: Uppercase<HttpMethod>;\n  /**\n   * A function for serializing request query parameters. By default, arrays\n   * will be exploded in form style, objects will be exploded in deepObject\n   * style, and reserved characters are percent-encoded.\n   *\n   * This method will have no effect if the native `paramsSerializer()` Axios\n   * API function is used.\n   *\n   * {@link https://swagger.io/docs/specification/serialization/#query View examples}\n   */\n  querySerializer?: QuerySerializer | QuerySerializerOptions;\n  /**\n   * A function validating request data. This is useful if you want to ensure\n   * the request conforms to the desired shape, so it can be safely sent to\n   * the server.\n   */\n  requestValidator?: (data: unknown) => Promise<unknown>;\n  /**\n   * A function transforming response data before it's returned. This is useful\n   * for post-processing data, e.g. converting ISO strings into Date objects.\n   */\n  responseTransformer?: (data: unknown) => Promise<unknown>;\n  /**\n   * A function validating response data. This is useful if you want to ensure\n   * the response conforms to the desired shape, so it can be safely passed to\n   * the transformers and returned to the user.\n   */\n  responseValidator?: (data: unknown) => Promise<unknown>;\n}\n\ntype IsExactlyNeverOrNeverUndefined<T> = [T] extends [never]\n  ? true\n  : [T] extends [never | undefined]\n    ? [undefined] extends [T]\n      ? false\n      : true\n    : false;\n\nexport type OmitNever<T extends Record<string, unknown>> = {\n  [K in keyof T as IsExactlyNeverOrNeverUndefined<T[K]> extends true ? never : K]: T[K];\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/preact-query/fetch/core/utils.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/preact-query/fetch/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport { callToTestOrderOfParams, callWithDefaultOptionalParameters, callWithDefaultParameters, callWithDescriptions, callWithDuplicateResponses, callWithNoContentResponse, callWithParameters, callWithResponse, callWithResponseAndNoContentResponse, callWithResponses, callWithResultFromHeader, callWithWeirdParameterNames, collectionFormat, complexTypes, deleteCallWithoutParametersAndResponse, dummyA, dummyB, duplicateName, duplicateName2, duplicateName3, duplicateName4, fooWow, getCallWithoutParametersAndResponse, headCallWithoutParametersAndResponse, nonAsciiæøåÆøÅöôêÊ字符串, type Options, optionsCallWithoutParametersAndResponse, patchApiVbyApiVersionNoTag, patchCallWithoutParametersAndResponse, postApiVbyApiVersionBody, postCallWithoutParametersAndResponse, putCallWithoutParametersAndResponse, serviceWithEmptyTag, testErrorCode, types } from './sdk.gen';\nexport type { ArrayWithArray, ArrayWithBooleans, ArrayWithNumbers, ArrayWithProperties, ArrayWithReferences, ArrayWithStrings, CallToTestOrderOfParamsData, CallWithDefaultOptionalParametersData, CallWithDefaultParametersData, CallWithDescriptionsData, CallWithDuplicateResponsesData, CallWithDuplicateResponsesError, CallWithDuplicateResponsesErrors, CallWithDuplicateResponsesResponse, CallWithDuplicateResponsesResponses, CallWithNoContentResponseData, CallWithNoContentResponseResponses, CallWithParametersData, CallWithResponseAndNoContentResponseData, CallWithResponseAndNoContentResponseResponse, CallWithResponseAndNoContentResponseResponses, CallWithResponseData, CallWithResponseResponse, CallWithResponseResponses, CallWithResponsesData, CallWithResponsesError, CallWithResponsesErrors, CallWithResponsesResponse, CallWithResponsesResponses, CallWithResultFromHeaderData, CallWithResultFromHeaderErrors, CallWithResultFromHeaderResponses, CallWithWeirdParameterNamesData, ClientOptions, CollectionFormatData, CommentWithBackticks, CommentWithBackticksAndQuotes, CommentWithBreaks, CommentWithExpressionPlaceholders, CommentWithQuotes, CommentWithReservedCharacters, CommentWithSlashes, ComplexTypesData, ComplexTypesErrors, ComplexTypesResponse, ComplexTypesResponses, Date, Default, DeleteCallWithoutParametersAndResponseData, DictionaryWithArray, DictionaryWithDictionary, DictionaryWithProperties, DictionaryWithReference, DictionaryWithString, DummyAData, DummyAResponses, DummyBData, DummyBResponses, DuplicateName2Data, DuplicateName3Data, DuplicateName4Data, DuplicateNameData, EnumFromDescription, EnumWithExtensions, EnumWithNumbers, EnumWithStrings, ExternalRefA, ExternalRefB, ExternalSharedModel, FailureFailure, FooWowData, FooWowResponses, GetCallWithoutParametersAndResponseData, HeadCallWithoutParametersAndResponseData, ModelThatExtends, ModelThatExtendsExtends, ModelWithArray, ModelWithBoolean, ModelWithCircularReference, ModelWithDictionary, ModelWithDuplicateImports, ModelWithDuplicateProperties, ModelWithEnum, ModelWithEnumFromDescription, ModelWithInteger, ModelWithNestedEnums, ModelWithNestedProperties, ModelWithNullableString, ModelWithOrderedProperties, ModelWithPattern, ModelWithPatternWritable, ModelWithProperties, ModelWithPropertiesWritable, ModelWithReference, ModelWithReferenceWritable, ModelWithString, ModelWithStringError, NonAsciiæøåÆøÅöôêÊ字符串Data, NonAsciiæøåÆøÅöôêÊ字符串Response, NonAsciiæøåÆøÅöôêÊ字符串Responses, NonAsciiStringæøåÆøÅöôêÊ字符串, OptionsCallWithoutParametersAndResponseData, ParameterActivityParams, PatchApiVbyApiVersionNoTagData, PatchApiVbyApiVersionNoTagResponses, PatchCallWithoutParametersAndResponseData, PostApiVbyApiVersionBodyData, PostApiVbyApiVersionBodyError, PostApiVbyApiVersionBodyErrors, PostApiVbyApiVersionBodyResponse, PostApiVbyApiVersionBodyResponses, PostCallWithoutParametersAndResponseData, PutCallWithoutParametersAndResponseData, ResponsePostActivityResponse, ServiceWithEmptyTagData, SimpleBoolean, SimpleFile, SimpleInteger, SimpleReference, SimpleString, SimpleStringWithPattern, TestErrorCodeData, TestErrorCodeErrors, TestErrorCodeResponses, TypesData, TypesResponse, TypesResponses } from './types.gen';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/preact-query/fetch/sdk.gen.ts",
    "content": "// 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 { CallToTestOrderOfParamsData, CallWithDefaultOptionalParametersData, CallWithDefaultParametersData, CallWithDescriptionsData, CallWithDuplicateResponsesData, CallWithDuplicateResponsesErrors, CallWithDuplicateResponsesResponses, CallWithNoContentResponseData, CallWithNoContentResponseResponses, CallWithParametersData, CallWithResponseAndNoContentResponseData, CallWithResponseAndNoContentResponseResponses, CallWithResponseData, CallWithResponseResponses, CallWithResponsesData, CallWithResponsesErrors, CallWithResponsesResponses, CallWithResultFromHeaderData, CallWithResultFromHeaderErrors, CallWithResultFromHeaderResponses, CallWithWeirdParameterNamesData, CollectionFormatData, ComplexTypesData, ComplexTypesErrors, ComplexTypesResponses, DeleteCallWithoutParametersAndResponseData, DummyAData, DummyAResponses, DummyBData, DummyBResponses, DuplicateName2Data, DuplicateName3Data, DuplicateName4Data, DuplicateNameData, FooWowData, FooWowResponses, GetCallWithoutParametersAndResponseData, HeadCallWithoutParametersAndResponseData, NonAsciiæøåÆøÅöôêÊ字符串Data, NonAsciiæøåÆøÅöôêÊ字符串Responses, OptionsCallWithoutParametersAndResponseData, PatchApiVbyApiVersionNoTagData, PatchApiVbyApiVersionNoTagResponses, PatchCallWithoutParametersAndResponseData, PostApiVbyApiVersionBodyData, PostApiVbyApiVersionBodyErrors, PostApiVbyApiVersionBodyResponses, PostCallWithoutParametersAndResponseData, PutCallWithoutParametersAndResponseData, ServiceWithEmptyTagData, TestErrorCodeData, TestErrorCodeErrors, TestErrorCodeResponses, TypesData, TypesResponses } from './types.gen';\n\nexport type Options<TData extends TDataShape = TDataShape, ThrowOnError extends boolean = boolean> = Options2<TData, ThrowOnError> & {\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\nexport const serviceWithEmptyTag = <ThrowOnError extends boolean = false>(options?: Options<ServiceWithEmptyTagData, ThrowOnError>) => (options?.client ?? client).get<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/no+tag', ...options });\n\nexport const patchApiVbyApiVersionNoTag = <ThrowOnError extends boolean = false>(options?: Options<PatchApiVbyApiVersionNoTagData, ThrowOnError>) => (options?.client ?? client).patch<PatchApiVbyApiVersionNoTagResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/no+tag', ...options });\n\nexport const fooWow = <ThrowOnError extends boolean = false>(options?: Options<FooWowData, ThrowOnError>) => (options?.client ?? client).put<FooWowResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/no+tag', ...options });\n\nexport const deleteCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<DeleteCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).delete<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const getCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<GetCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).get<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const headCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<HeadCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).head<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const optionsCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<OptionsCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).options<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const patchCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<PatchCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).patch<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const postCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<PostCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).post<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const putCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<PutCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).put<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const callWithDescriptions = <ThrowOnError extends boolean = false>(options?: Options<CallWithDescriptionsData, ThrowOnError>) => (options?.client ?? client).post<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/descriptions/', ...options });\n\nexport const callWithParameters = <ThrowOnError extends boolean = false>(options: Options<CallWithParametersData, ThrowOnError>) => (options.client ?? client).post<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/parameters/{parameterPath}', ...options });\n\nexport const callWithWeirdParameterNames = <ThrowOnError extends boolean = false>(options: Options<CallWithWeirdParameterNamesData, ThrowOnError>) => (options.client ?? client).post<unknown, unknown, ThrowOnError>({\n    url: '/api/v{api-version}/parameters/{parameter.path.1}/{parameter-path-2}/{PARAMETER-PATH-3}',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options.headers\n    }\n});\n\nexport const callWithDefaultParameters = <ThrowOnError extends boolean = false>(options: Options<CallWithDefaultParametersData, ThrowOnError>) => (options.client ?? client).get<unknown, unknown, ThrowOnError>({\n    querySerializer: { parameters: { parameterModel: { object: { explode: false, style: 'form' } } } },\n    url: '/api/v{api-version}/defaults',\n    ...options\n});\n\nexport const callWithDefaultOptionalParameters = <ThrowOnError extends boolean = false>(options?: Options<CallWithDefaultOptionalParametersData, ThrowOnError>) => (options?.client ?? client).post<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/defaults', ...options });\n\nexport const callToTestOrderOfParams = <ThrowOnError extends boolean = false>(options: Options<CallToTestOrderOfParamsData, ThrowOnError>) => (options.client ?? client).put<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/defaults', ...options });\n\nexport const duplicateName = <ThrowOnError extends boolean = false>(options?: Options<DuplicateNameData, ThrowOnError>) => (options?.client ?? client).delete<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/duplicate', ...options });\n\nexport const duplicateName2 = <ThrowOnError extends boolean = false>(options?: Options<DuplicateName2Data, ThrowOnError>) => (options?.client ?? client).get<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/duplicate', ...options });\n\nexport const duplicateName3 = <ThrowOnError extends boolean = false>(options?: Options<DuplicateName3Data, ThrowOnError>) => (options?.client ?? client).post<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/duplicate', ...options });\n\nexport const duplicateName4 = <ThrowOnError extends boolean = false>(options?: Options<DuplicateName4Data, ThrowOnError>) => (options?.client ?? client).put<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/duplicate', ...options });\n\nexport const callWithNoContentResponse = <ThrowOnError extends boolean = false>(options?: Options<CallWithNoContentResponseData, ThrowOnError>) => (options?.client ?? client).get<CallWithNoContentResponseResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/no-content', ...options });\n\nexport const callWithResponseAndNoContentResponse = <ThrowOnError extends boolean = false>(options?: Options<CallWithResponseAndNoContentResponseData, ThrowOnError>) => (options?.client ?? client).get<CallWithResponseAndNoContentResponseResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/multiple-tags/response-and-no-content', ...options });\n\nexport const dummyA = <ThrowOnError extends boolean = false>(options?: Options<DummyAData, ThrowOnError>) => (options?.client ?? client).get<DummyAResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/multiple-tags/a', ...options });\n\nexport const dummyB = <ThrowOnError extends boolean = false>(options?: Options<DummyBData, ThrowOnError>) => (options?.client ?? client).get<DummyBResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/multiple-tags/b', ...options });\n\nexport const callWithResponse = <ThrowOnError extends boolean = false>(options?: Options<CallWithResponseData, ThrowOnError>) => (options?.client ?? client).get<CallWithResponseResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/response', ...options });\n\nexport const callWithDuplicateResponses = <ThrowOnError extends boolean = false>(options?: Options<CallWithDuplicateResponsesData, ThrowOnError>) => (options?.client ?? client).post<CallWithDuplicateResponsesResponses, CallWithDuplicateResponsesErrors, ThrowOnError>({ url: '/api/v{api-version}/response', ...options });\n\nexport const callWithResponses = <ThrowOnError extends boolean = false>(options?: Options<CallWithResponsesData, ThrowOnError>) => (options?.client ?? client).put<CallWithResponsesResponses, CallWithResponsesErrors, ThrowOnError>({ url: '/api/v{api-version}/response', ...options });\n\nexport const collectionFormat = <ThrowOnError extends boolean = false>(options: Options<CollectionFormatData, ThrowOnError>) => (options.client ?? client).get<unknown, unknown, ThrowOnError>({\n    querySerializer: { parameters: {\n            parameterArrayCSV: { array: { explode: false } },\n            parameterArraySSV: { array: { explode: false } },\n            parameterArrayTSV: { array: { explode: false } },\n            parameterArrayPipes: { array: { explode: false } }\n        } },\n    url: '/api/v{api-version}/collectionFormat',\n    ...options\n});\n\nexport const types = <ThrowOnError extends boolean = false>(options: Options<TypesData, ThrowOnError>) => (options.client ?? client).get<TypesResponses, unknown, ThrowOnError>({\n    querySerializer: { parameters: { parameterArray: { array: { explode: false } }, parameterDictionary: { object: { explode: false, style: 'form' } } } },\n    url: '/api/v{api-version}/types',\n    ...options\n});\n\nexport const complexTypes = <ThrowOnError extends boolean = false>(options: Options<ComplexTypesData, ThrowOnError>) => (options.client ?? client).get<ComplexTypesResponses, ComplexTypesErrors, ThrowOnError>({\n    querySerializer: { parameters: { parameterObject: { object: { explode: false, style: 'form' } }, parameterReference: { object: { explode: false, style: 'form' } } } },\n    url: '/api/v{api-version}/complex',\n    ...options\n});\n\nexport const callWithResultFromHeader = <ThrowOnError extends boolean = false>(options?: Options<CallWithResultFromHeaderData, ThrowOnError>) => (options?.client ?? client).post<CallWithResultFromHeaderResponses, CallWithResultFromHeaderErrors, ThrowOnError>({ url: '/api/v{api-version}/header', ...options });\n\nexport const testErrorCode = <ThrowOnError extends boolean = false>(options: Options<TestErrorCodeData, ThrowOnError>) => (options.client ?? client).post<TestErrorCodeResponses, TestErrorCodeErrors, ThrowOnError>({ url: '/api/v{api-version}/error', ...options });\n\nexport const nonAsciiæøåÆøÅöôêÊ字符串 = <ThrowOnError extends boolean = false>(options: Options<NonAsciiæøåÆøÅöôêÊ字符串Data, ThrowOnError>) => (options.client ?? client).post<NonAsciiæøåÆøÅöôêÊ字符串Responses, unknown, ThrowOnError>({ url: '/api/v{api-version}/non-ascii-æøåÆØÅöôêÊ字符串', ...options });\n\n/**\n * Body should not be unknown\n *\n * Body should not be unknown\n */\nexport const postApiVbyApiVersionBody = <ThrowOnError extends boolean = false>(options: Options<PostApiVbyApiVersionBodyData, ThrowOnError>) => (options.client ?? client).post<PostApiVbyApiVersionBodyResponses, PostApiVbyApiVersionBodyErrors, ThrowOnError>({\n    url: '/api/v{api-version}/body',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options.headers\n    }\n});\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/preact-query/fetch/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type ClientOptions = {\n    baseUrl: 'http://localhost:3000/base' | (string & {});\n};\n\nexport type ExternalRefA = ExternalSharedModel;\n\nexport type ExternalRefB = ExternalSharedModel;\n\n/**\n * Testing multiline comments in string: First line\n * Second line\n *\n * Fourth line\n */\nexport type CommentWithBreaks = number;\n\n/**\n * Testing backticks in string: `backticks` and ```multiple backticks``` should work\n */\nexport type CommentWithBackticks = number;\n\n/**\n * Testing backticks and quotes in string: `backticks`, 'quotes', \"double quotes\" and ```multiple backticks``` should work\n */\nexport type CommentWithBackticksAndQuotes = number;\n\n/**\n * Testing slashes in string: \\backwards\\\\\\ and /forwards/// should work\n */\nexport type CommentWithSlashes = number;\n\n/**\n * Testing expression placeholders in string: ${expression} should work\n */\nexport type CommentWithExpressionPlaceholders = number;\n\n/**\n * Testing quotes in string: 'single quote''' and \"double quotes\"\"\" should work\n */\nexport type CommentWithQuotes = number;\n\n/**\n * Testing reserved characters in string: * inline * and ** inline ** should work\n */\nexport type CommentWithReservedCharacters = number;\n\n/**\n * This is a simple number\n */\nexport type SimpleInteger = number;\n\n/**\n * This is a simple boolean\n */\nexport type SimpleBoolean = boolean;\n\n/**\n * This is a simple string\n */\nexport type SimpleString = string;\n\n/**\n * A string with non-ascii (unicode) characters valid in typescript identifiers (æøåÆØÅöÔèÈ字符串)\n */\nexport type NonAsciiStringæøåÆøÅöôêÊ字符串 = string;\n\n/**\n * This is a simple file\n */\nexport type SimpleFile = Blob | File;\n\nexport type SimpleReference = ModelWithString;\n\n/**\n * This is a simple string\n */\nexport type SimpleStringWithPattern = string;\n\n/**\n * This is a simple enum with strings\n */\nexport type EnumWithStrings = 'Success' | 'Warning' | 'Error' | '\\'Single Quote\\'' | '\"Double Quotes\"' | 'Non-ascii: øæåôöØÆÅÔÖ字符串';\n\n/**\n * This is a simple enum with numbers\n */\nexport type EnumWithNumbers = 1 | 2 | 3 | 1.1 | 1.2 | 1.3 | 100 | 200 | 300 | -100 | -200 | -300 | -1.1 | -1.2 | -1.3;\n\n/**\n * Success=1,Warning=2,Error=3\n */\nexport type EnumFromDescription = number;\n\n/**\n * This is a simple enum with numbers\n */\nexport type EnumWithExtensions = 200 | 400 | 500;\n\n/**\n * This is a simple array with numbers\n */\nexport type ArrayWithNumbers = Array<number>;\n\n/**\n * This is a simple array with booleans\n */\nexport type ArrayWithBooleans = Array<boolean>;\n\n/**\n * This is a simple array with strings\n */\nexport type ArrayWithStrings = Array<string>;\n\n/**\n * This is a simple array with references\n */\nexport type ArrayWithReferences = Array<ModelWithString>;\n\n/**\n * This is a simple array containing an array\n */\nexport type ArrayWithArray = Array<Array<ModelWithString>>;\n\n/**\n * This is a simple array with properties\n */\nexport type ArrayWithProperties = Array<{\n    foo?: string;\n    bar?: string;\n}>;\n\n/**\n * This is a string dictionary\n */\nexport type DictionaryWithString = {\n    [key: string]: string;\n};\n\n/**\n * This is a string reference\n */\nexport type DictionaryWithReference = {\n    [key: string]: ModelWithString;\n};\n\n/**\n * This is a complex dictionary\n */\nexport type DictionaryWithArray = {\n    [key: string]: Array<ModelWithString>;\n};\n\n/**\n * This is a string dictionary\n */\nexport type DictionaryWithDictionary = {\n    [key: string]: {\n        [key: string]: string;\n    };\n};\n\n/**\n * This is a complex dictionary\n */\nexport type DictionaryWithProperties = {\n    [key: string]: {\n        foo?: string;\n        bar?: string;\n    };\n};\n\n/**\n * This is a type-only model that defines Date as a string\n */\nexport type Date = string;\n\n/**\n * This is a model with one number property\n */\nexport type ModelWithInteger = {\n    /**\n     * This is a simple number property\n     */\n    prop?: number;\n};\n\n/**\n * This is a model with one boolean property\n */\nexport type ModelWithBoolean = {\n    /**\n     * This is a simple boolean property\n     */\n    prop?: boolean;\n};\n\n/**\n * This is a model with one string property\n */\nexport type ModelWithString = {\n    /**\n     * This is a simple string property\n     */\n    prop?: string;\n};\n\n/**\n * This is a model with one string property\n */\nexport type ModelWithStringError = {\n    /**\n     * This is a simple string property\n     */\n    prop?: string;\n};\n\n/**\n * This is a model with one string property\n */\nexport type ModelWithNullableString = {\n    /**\n     * This is a simple string property\n     */\n    nullableProp?: string | null;\n    /**\n     * This is a simple string property\n     */\n    nullableRequiredProp: string | null;\n};\n\n/**\n * This is a model with one enum\n */\nexport type ModelWithEnum = {\n    /**\n     * This is a simple enum with strings\n     */\n    test?: 'Success' | 'Warning' | 'Error' | 'ØÆÅ字符串';\n    /**\n     * These are the HTTP error code enums\n     */\n    statusCode?: '100' | '200 FOO' | '300 FOO_BAR' | '400 foo-bar' | '500 foo.bar' | '600 foo&bar';\n    /**\n     * Simple boolean enum\n     */\n    bool?: true;\n};\n\n/**\n * This is a model with one enum\n */\nexport type ModelWithEnumFromDescription = {\n    /**\n     * Success=1,Warning=2,Error=3\n     */\n    test?: number;\n};\n\n/**\n * This is a model with nested enums\n */\nexport type ModelWithNestedEnums = {\n    dictionaryWithEnum?: {\n        [key: string]: 'Success' | 'Warning' | 'Error';\n    };\n    dictionaryWithEnumFromDescription?: {\n        [key: string]: number;\n    };\n    arrayWithEnum?: Array<'Success' | 'Warning' | 'Error'>;\n    arrayWithDescription?: Array<number>;\n};\n\n/**\n * This is a model with one property containing a reference\n */\nexport type ModelWithReference = {\n    prop?: ModelWithProperties;\n};\n\n/**\n * This is a model with one property containing an array\n */\nexport type ModelWithArray = {\n    prop?: Array<ModelWithString>;\n    propWithFile?: Array<Blob | File>;\n    propWithNumber?: Array<number>;\n};\n\n/**\n * This is a model with one property containing a dictionary\n */\nexport type ModelWithDictionary = {\n    prop?: {\n        [key: string]: string;\n    };\n};\n\n/**\n * This is a model with one property containing a circular reference\n */\nexport type ModelWithCircularReference = {\n    prop?: ModelWithCircularReference;\n};\n\n/**\n * This is a model with one nested property\n */\nexport type ModelWithProperties = {\n    required: string;\n    readonly requiredAndReadOnly: string;\n    string?: string;\n    number?: number;\n    boolean?: boolean;\n    reference?: ModelWithString;\n    'property with space'?: string;\n    default?: string;\n    try?: string;\n    readonly '@namespace.string'?: string;\n    readonly '@namespace.integer'?: number;\n};\n\n/**\n * This is a model with one nested property\n */\nexport type ModelWithNestedProperties = {\n    readonly first: {\n        readonly second: {\n            readonly third: string;\n        };\n    };\n};\n\n/**\n * This is a model with duplicated properties\n */\nexport type ModelWithDuplicateProperties = {\n    prop?: ModelWithString;\n};\n\n/**\n * This is a model with ordered properties\n */\nexport type ModelWithOrderedProperties = {\n    zebra?: string;\n    apple?: string;\n    hawaii?: string;\n};\n\n/**\n * This is a model with duplicated imports\n */\nexport type ModelWithDuplicateImports = {\n    propA?: ModelWithString;\n    propB?: ModelWithString;\n    propC?: ModelWithString;\n};\n\n/**\n * This is a model that extends another model\n */\nexport type ModelThatExtends = ModelWithString & {\n    propExtendsA?: string;\n    propExtendsB?: ModelWithString;\n};\n\n/**\n * This is a model that extends another model\n */\nexport type ModelThatExtendsExtends = ModelWithString & ModelThatExtends & {\n    propExtendsC?: string;\n    propExtendsD?: ModelWithString;\n};\n\nexport type Default = {\n    name?: string;\n};\n\n/**\n * This is a model that contains a some patterns\n */\nexport type ModelWithPattern = {\n    key: string;\n    name: string;\n    readonly enabled?: boolean;\n    readonly modified?: string;\n    id?: string;\n    text?: string;\n    patternWithSingleQuotes?: string;\n    patternWithNewline?: string;\n    patternWithBacktick?: string;\n    patternWithUnicode?: string;\n};\n\nexport type ParameterActivityParams = {\n    description?: string;\n    graduate_id?: number;\n    organization_id?: number;\n    parent_activity?: number;\n    post_id?: number;\n};\n\nexport type ResponsePostActivityResponse = {\n    description?: string;\n    graduate_id?: number;\n    organization_id?: number;\n    parent_activity_id?: number;\n    post_id?: number;\n};\n\nexport type FailureFailure = {\n    error?: string;\n    message?: string;\n    reference_code?: string;\n};\n\nexport type ExternalSharedModel = {\n    id: string;\n    name?: string;\n};\n\n/**\n * This is a model with one property containing a reference\n */\nexport type ModelWithReferenceWritable = {\n    prop?: ModelWithPropertiesWritable;\n};\n\n/**\n * This is a model with one nested property\n */\nexport type ModelWithPropertiesWritable = {\n    required: string;\n    string?: string;\n    number?: number;\n    boolean?: boolean;\n    reference?: ModelWithString;\n    'property with space'?: string;\n    default?: string;\n    try?: string;\n};\n\n/**\n * This is a model that contains a some patterns\n */\nexport type ModelWithPatternWritable = {\n    key: string;\n    name: string;\n    id?: string;\n    text?: string;\n    patternWithSingleQuotes?: string;\n    patternWithNewline?: string;\n    patternWithBacktick?: string;\n    patternWithUnicode?: string;\n};\n\nexport type ServiceWithEmptyTagData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no+tag';\n};\n\nexport type PatchApiVbyApiVersionNoTagData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no+tag';\n};\n\nexport type PatchApiVbyApiVersionNoTagResponses = {\n    /**\n     * OK\n     */\n    default: unknown;\n};\n\nexport type FooWowData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no+tag';\n};\n\nexport type FooWowResponses = {\n    /**\n     * OK\n     */\n    default: unknown;\n};\n\nexport type DeleteCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type GetCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type HeadCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type OptionsCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type PatchCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type PostCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type PutCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type CallWithDescriptionsData = {\n    body?: never;\n    path?: never;\n    query?: {\n        /**\n         * Testing multiline comments in string: First line\n         * Second line\n         *\n         * Fourth line\n         */\n        parameterWithBreaks?: string;\n        /**\n         * Testing backticks in string: `backticks` and ```multiple backticks``` should work\n         */\n        parameterWithBackticks?: string;\n        /**\n         * Testing slashes in string: \\backwards\\\\\\ and /forwards/// should work\n         */\n        parameterWithSlashes?: string;\n        /**\n         * Testing expression placeholders in string: ${expression} should work\n         */\n        parameterWithExpressionPlaceholders?: string;\n        /**\n         * Testing quotes in string: 'single quote''' and \"double quotes\"\"\" should work\n         */\n        parameterWithQuotes?: string;\n        /**\n         * Testing reserved characters in string: * inline * and ** inline ** should work\n         */\n        parameterWithReservedCharacters?: string;\n    };\n    url: '/api/v{api-version}/descriptions/';\n};\n\nexport type CallWithParametersData = {\n    body?: never;\n    headers: {\n        /**\n         * This is the parameter that goes into the header\n         */\n        parameterHeader: string;\n    };\n    path: {\n        /**\n         * This is the parameter that goes into the path\n         */\n        parameterPath: string;\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string;\n    };\n    query: {\n        /**\n         * This is the parameter that goes into the query params\n         */\n        parameterQuery: string;\n    };\n    url: '/api/v{api-version}/parameters/{parameterPath}';\n};\n\nexport type CallWithWeirdParameterNamesData = {\n    /**\n     * This is the parameter that is sent as request body\n     */\n    body: string;\n    headers: {\n        /**\n         * This is the parameter that goes into the request header\n         */\n        'parameter.header': string;\n    };\n    path: {\n        /**\n         * This is the parameter that goes into the path\n         */\n        'parameter.path.1'?: string;\n        /**\n         * This is the parameter that goes into the path\n         */\n        'parameter-path-2'?: string;\n        /**\n         * This is the parameter that goes into the path\n         */\n        'PARAMETER-PATH-3'?: string;\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string;\n    };\n    query: {\n        /**\n         * This is the parameter with a reserved keyword\n         */\n        default?: string;\n        /**\n         * This is the parameter that goes into the request query params\n         */\n        'parameter-query': string;\n    };\n    url: '/api/v{api-version}/parameters/{parameter.path.1}/{parameter-path-2}/{PARAMETER-PATH-3}';\n};\n\nexport type CallWithDefaultParametersData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * This is a simple string with default value\n         */\n        parameterString: string;\n        /**\n         * This is a simple number with default value\n         */\n        parameterNumber: number;\n        /**\n         * This is a simple boolean with default value\n         */\n        parameterBoolean: boolean;\n        /**\n         * This is a simple enum with default value\n         */\n        parameterEnum: 'Success' | 'Warning' | 'Error';\n        /**\n         * This is a model with one string property\n         */\n        parameterModel: {\n            /**\n             * This is a simple string property\n             */\n            prop?: string;\n        };\n    };\n    url: '/api/v{api-version}/defaults';\n};\n\nexport type CallWithDefaultOptionalParametersData = {\n    body?: never;\n    path?: never;\n    query?: {\n        /**\n         * This is a simple string that is optional with default value\n         */\n        parameterString?: string;\n        /**\n         * This is a simple number that is optional with default value\n         */\n        parameterNumber?: number;\n        /**\n         * This is a simple boolean that is optional with default value\n         */\n        parameterBoolean?: boolean;\n        /**\n         * This is a simple enum that is optional with default value\n         */\n        parameterEnum?: 'Success' | 'Warning' | 'Error';\n    };\n    url: '/api/v{api-version}/defaults';\n};\n\nexport type CallToTestOrderOfParamsData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * This is a optional string with default\n         */\n        parameterOptionalStringWithDefault?: string;\n        /**\n         * This is a optional string with empty default\n         */\n        parameterOptionalStringWithEmptyDefault?: string;\n        /**\n         * This is a optional string with no default\n         */\n        parameterOptionalStringWithNoDefault?: string;\n        /**\n         * This is a string with default\n         */\n        parameterStringWithDefault: string;\n        /**\n         * This is a string with empty default\n         */\n        parameterStringWithEmptyDefault: string;\n        /**\n         * This is a string with no default\n         */\n        parameterStringWithNoDefault: string;\n        /**\n         * This is a string that can be null with no default\n         */\n        parameterStringNullableWithNoDefault?: string | null;\n        /**\n         * This is a string that can be null with default\n         */\n        parameterStringNullableWithDefault?: string | null;\n    };\n    url: '/api/v{api-version}/defaults';\n};\n\nexport type DuplicateNameData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/duplicate';\n};\n\nexport type DuplicateName2Data = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/duplicate';\n};\n\nexport type DuplicateName3Data = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/duplicate';\n};\n\nexport type DuplicateName4Data = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/duplicate';\n};\n\nexport type CallWithNoContentResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no-content';\n};\n\nexport type CallWithNoContentResponseResponses = {\n    /**\n     * Success\n     */\n    204: unknown;\n};\n\nexport type CallWithResponseAndNoContentResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multiple-tags/response-and-no-content';\n};\n\nexport type CallWithResponseAndNoContentResponseResponses = {\n    /**\n     * Response is a simple number\n     */\n    200: number;\n    /**\n     * Success\n     */\n    204: unknown;\n};\n\nexport type CallWithResponseAndNoContentResponseResponse = CallWithResponseAndNoContentResponseResponses[keyof CallWithResponseAndNoContentResponseResponses];\n\nexport type DummyAData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multiple-tags/a';\n};\n\nexport type DummyAResponses = {\n    /**\n     * Success\n     */\n    204: unknown;\n};\n\nexport type DummyBData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multiple-tags/b';\n};\n\nexport type DummyBResponses = {\n    /**\n     * Success\n     */\n    204: unknown;\n};\n\nexport type CallWithResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/response';\n};\n\nexport type CallWithResponseResponses = {\n    /**\n     * Message for default response\n     */\n    default: ModelWithString;\n};\n\nexport type CallWithResponseResponse = CallWithResponseResponses[keyof CallWithResponseResponses];\n\nexport type CallWithDuplicateResponsesData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/response';\n};\n\nexport type CallWithDuplicateResponsesErrors = {\n    /**\n     * Message for 500 error\n     */\n    500: ModelWithStringError;\n    /**\n     * Message for 501 error\n     */\n    501: ModelWithStringError;\n    /**\n     * Message for 502 error\n     */\n    502: ModelWithStringError;\n    /**\n     * Message for default response\n     */\n    default: ModelWithString;\n};\n\nexport type CallWithDuplicateResponsesError = CallWithDuplicateResponsesErrors[keyof CallWithDuplicateResponsesErrors];\n\nexport type CallWithDuplicateResponsesResponses = {\n    /**\n     * Message for 201 response\n     */\n    201: ModelWithString;\n    /**\n     * Message for 202 response\n     */\n    202: ModelWithString;\n};\n\nexport type CallWithDuplicateResponsesResponse = CallWithDuplicateResponsesResponses[keyof CallWithDuplicateResponsesResponses];\n\nexport type CallWithResponsesData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/response';\n};\n\nexport type CallWithResponsesErrors = {\n    /**\n     * Message for 500 error\n     */\n    500: ModelWithStringError;\n    /**\n     * Message for 501 error\n     */\n    501: ModelWithStringError;\n    /**\n     * Message for 502 error\n     */\n    502: ModelWithStringError;\n    /**\n     * Message for default response\n     */\n    default: ModelWithString;\n};\n\nexport type CallWithResponsesError = CallWithResponsesErrors[keyof CallWithResponsesErrors];\n\nexport type CallWithResponsesResponses = {\n    /**\n     * Message for 200 response\n     */\n    200: {\n        readonly '@namespace.string'?: string;\n        readonly '@namespace.integer'?: number;\n        readonly value?: Array<ModelWithString>;\n    };\n    /**\n     * Message for 201 response\n     */\n    201: ModelThatExtends;\n    /**\n     * Message for 202 response\n     */\n    202: ModelThatExtendsExtends;\n};\n\nexport type CallWithResponsesResponse = CallWithResponsesResponses[keyof CallWithResponsesResponses];\n\nexport type CollectionFormatData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * This is an array parameter that is sent as csv format (comma-separated values)\n         */\n        parameterArrayCSV: Array<string>;\n        /**\n         * This is an array parameter that is sent as ssv format (space-separated values)\n         */\n        parameterArraySSV: Array<string>;\n        /**\n         * This is an array parameter that is sent as tsv format (tab-separated values)\n         */\n        parameterArrayTSV: Array<string>;\n        /**\n         * This is an array parameter that is sent as pipes format (pipe-separated values)\n         */\n        parameterArrayPipes: Array<string>;\n        /**\n         * This is an array parameter that is sent as multi format (multiple parameter instances)\n         */\n        parameterArrayMulti: Array<string>;\n    };\n    url: '/api/v{api-version}/collectionFormat';\n};\n\nexport type TypesData = {\n    body?: never;\n    path?: {\n        /**\n         * This is a number parameter\n         */\n        id?: number;\n    };\n    query: {\n        /**\n         * This is a number parameter\n         */\n        parameterNumber: number;\n        /**\n         * This is a string parameter\n         */\n        parameterString: string;\n        /**\n         * This is a boolean parameter\n         */\n        parameterBoolean: boolean;\n        /**\n         * This is an array parameter\n         */\n        parameterArray: Array<string>;\n        /**\n         * This is a dictionary parameter\n         */\n        parameterDictionary: {\n            [key: string]: unknown;\n        };\n        /**\n         * This is an enum parameter\n         */\n        parameterEnum: 'Success' | 'Warning' | 'Error';\n    };\n    url: '/api/v{api-version}/types';\n};\n\nexport type TypesResponses = {\n    /**\n     * Response is a simple number\n     */\n    200: number;\n    /**\n     * Response is a simple string\n     */\n    201: string;\n    /**\n     * Response is a simple boolean\n     */\n    202: boolean;\n    /**\n     * Response is a simple object\n     */\n    203: {\n        [key: string]: unknown;\n    };\n};\n\nexport type TypesResponse = TypesResponses[keyof TypesResponses];\n\nexport type ComplexTypesData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * Parameter containing object\n         */\n        parameterObject: {\n            first?: {\n                second?: {\n                    third?: string;\n                };\n            };\n        };\n        /**\n         * This is a model with one string property\n         */\n        parameterReference: {\n            /**\n             * This is a simple string property\n             */\n            prop?: string;\n        };\n    };\n    url: '/api/v{api-version}/complex';\n};\n\nexport type ComplexTypesErrors = {\n    /**\n     * 400 server error\n     */\n    400: unknown;\n    /**\n     * 500 server error\n     */\n    500: unknown;\n};\n\nexport type ComplexTypesResponses = {\n    /**\n     * Successful response\n     */\n    200: Array<ModelWithString>;\n};\n\nexport type ComplexTypesResponse = ComplexTypesResponses[keyof ComplexTypesResponses];\n\nexport type CallWithResultFromHeaderData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/header';\n};\n\nexport type CallWithResultFromHeaderErrors = {\n    /**\n     * 400 server error\n     */\n    400: unknown;\n    /**\n     * 500 server error\n     */\n    500: unknown;\n};\n\nexport type CallWithResultFromHeaderResponses = {\n    /**\n     * Successful response\n     */\n    200: unknown;\n};\n\nexport type TestErrorCodeData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * Status code to return\n         */\n        status: string;\n    };\n    url: '/api/v{api-version}/error';\n};\n\nexport type TestErrorCodeErrors = {\n    /**\n     * Custom message: Internal Server Error\n     */\n    500: unknown;\n    /**\n     * Custom message: Not Implemented\n     */\n    501: unknown;\n    /**\n     * Custom message: Bad Gateway\n     */\n    502: unknown;\n    /**\n     * Custom message: Service Unavailable\n     */\n    503: unknown;\n};\n\nexport type TestErrorCodeResponses = {\n    /**\n     * Custom message: Successful response\n     */\n    200: unknown;\n};\n\nexport type NonAsciiæøåÆøÅöôêÊ字符串Data = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * Dummy input param\n         */\n        nonAsciiParamæøåÆØÅöôêÊ: number;\n    };\n    url: '/api/v{api-version}/non-ascii-æøåÆØÅöôêÊ字符串';\n};\n\nexport type NonAsciiæøåÆøÅöôêÊ字符串Responses = {\n    /**\n     * Successful response\n     */\n    200: NonAsciiStringæøåÆøÅöôêÊ字符串;\n};\n\nexport type NonAsciiæøåÆøÅöôêÊ字符串Response = NonAsciiæøåÆøÅöôêÊ字符串Responses[keyof NonAsciiæøåÆøÅöôêÊ字符串Responses];\n\nexport type PostApiVbyApiVersionBodyData = {\n    /**\n     * Body should not be unknown\n     */\n    body: ParameterActivityParams;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/body';\n};\n\nexport type PostApiVbyApiVersionBodyErrors = {\n    /**\n     * Bad Request\n     */\n    400: FailureFailure;\n    /**\n     * Internal Server Error\n     */\n    500: FailureFailure;\n};\n\nexport type PostApiVbyApiVersionBodyError = PostApiVbyApiVersionBodyErrors[keyof PostApiVbyApiVersionBodyErrors];\n\nexport type PostApiVbyApiVersionBodyResponses = {\n    /**\n     * OK\n     */\n    200: ResponsePostActivityResponse;\n};\n\nexport type PostApiVbyApiVersionBodyResponse = PostApiVbyApiVersionBodyResponses[keyof PostApiVbyApiVersionBodyResponses];\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/preact-query/name-builder/@tanstack/preact-query.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport { type DefaultError, queryOptions, type UseMutationOptions } from '@tanstack/preact-query';\n\nimport { client } from '../client.gen';\nimport { fooBarPost, fooBarPut, fooPost, fooPut, getFoo, getFooBar, type Options } from '../sdk.gen';\nimport type { FooBarPostData, FooBarPostResponse, FooBarPutData, FooBarPutResponse, FooPostData, FooPostResponse, FooPutData, FooPutResponse, GetFooBarData, GetFooBarResponse, GetFooData, GetFooResponse } from '../types.gen';\n\nexport type QueryKey<TOptions extends Options> = [\n    Pick<TOptions, 'baseUrl' | 'body' | 'headers' | 'path' | 'query'> & {\n        _id: string;\n        _infinite?: boolean;\n        tags?: ReadonlyArray<string>;\n    }\n];\n\nconst createQueryKey = <TOptions extends Options>(id: string, options?: TOptions, infinite?: boolean, tags?: ReadonlyArray<string>): [\n    QueryKey<TOptions>[0]\n] => {\n    const params: QueryKey<TOptions>[0] = { _id: id, baseUrl: options?.baseUrl || (options?.client ?? client).getConfig().baseUrl } as QueryKey<TOptions>[0];\n    if (infinite) {\n        params._infinite = infinite;\n    }\n    if (tags) {\n        params.tags = tags;\n    }\n    if (options?.body) {\n        params.body = options.body;\n    }\n    if (options?.headers) {\n        params.headers = options.headers;\n    }\n    if (options?.path) {\n        params.path = options.path;\n    }\n    if (options?.query) {\n        params.query = options.query;\n    }\n    return [params];\n};\n\nexport const getFooD = (options?: Options<GetFooData>) => createQueryKey('getFoo', options);\n\nexport const getFooE = (options?: Options<GetFooData>) => queryOptions<GetFooResponse, DefaultError, GetFooResponse, ReturnType<typeof getFooD>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await getFoo({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: getFooD(options)\n});\n\nexport const fooPostC = (options?: Partial<Options<FooPostData>>): UseMutationOptions<FooPostResponse, DefaultError, Options<FooPostData>> => {\n    const mutationOptions: UseMutationOptions<FooPostResponse, DefaultError, Options<FooPostData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await fooPost({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const fooPutC = (options?: Partial<Options<FooPutData>>): UseMutationOptions<FooPutResponse, DefaultError, Options<FooPutData>> => {\n    const mutationOptions: UseMutationOptions<FooPutResponse, DefaultError, Options<FooPutData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await fooPut({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const getFooBarD = (options?: Options<GetFooBarData>) => createQueryKey('getFooBar', options);\n\nexport const getFooBarE = (options?: Options<GetFooBarData>) => queryOptions<GetFooBarResponse, DefaultError, GetFooBarResponse, ReturnType<typeof getFooBarD>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await getFooBar({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: getFooBarD(options)\n});\n\nexport const fooBarPostC = (options?: Partial<Options<FooBarPostData>>): UseMutationOptions<FooBarPostResponse, DefaultError, Options<FooBarPostData>> => {\n    const mutationOptions: UseMutationOptions<FooBarPostResponse, DefaultError, Options<FooBarPostData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await fooBarPost({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const fooBarPutC = (options?: Partial<Options<FooBarPutData>>): UseMutationOptions<FooBarPutResponse, DefaultError, Options<FooBarPutData>> => {\n    const mutationOptions: UseMutationOptions<FooBarPutResponse, DefaultError, Options<FooBarPutData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await fooBarPut({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/preact-query/name-builder/client/client.gen.ts",
    "content": "// 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 (options: RequestOptions) => {\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 url = buildUrl(opts);\n\n    return { opts, url };\n  };\n\n  const request: Client['request'] = async (options) => {\n    // @ts-expect-error\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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/preact-query/name-builder/client/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type { Auth } from '../core/auth.gen';\nexport type { QuerySerializerOptions } from '../core/bodySerializer.gen';\nexport {\n  formDataBodySerializer,\n  jsonBodySerializer,\n  urlSearchParamsBodySerializer,\n} from '../core/bodySerializer.gen';\nexport { buildClientParams } from '../core/params.gen';\nexport { serializeQueryKeyValue } from '../core/queryKeySerializer.gen';\nexport { createClient } from './client.gen';\nexport type {\n  Client,\n  ClientOptions,\n  Config,\n  CreateClientConfig,\n  Options,\n  RequestOptions,\n  RequestResult,\n  ResolvedRequestOptions,\n  ResponseStyle,\n  TDataShape,\n} from './types.gen';\nexport { createConfig, mergeHeaders } from './utils.gen';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/preact-query/name-builder/client/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { Auth } from '../core/auth.gen';\nimport type {\n  ServerSentEventsOptions,\n  ServerSentEventsResult,\n} from '../core/serverSentEvents.gen';\nimport type { Client as CoreClient, Config as CoreConfig } from '../core/types.gen';\nimport type { Middleware } from './utils.gen';\n\nexport type ResponseStyle = 'data' | 'fields';\n\nexport interface Config<T extends ClientOptions = ClientOptions>\n  extends Omit<RequestInit, 'body' | 'headers' | 'method'>, CoreConfig {\n  /**\n   * Base URL for all requests made by this client.\n   */\n  baseUrl?: T['baseUrl'];\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   * Please don't use the Fetch client for Next.js applications. The `next`\n   * options won't have any effect.\n   *\n   * Install {@link https://www.npmjs.com/package/@hey-api/client-next `@hey-api/client-next`} instead.\n   */\n  next?: never;\n  /**\n   * Return the response data parsed in a specified format. By default, `auto`\n   * will infer the appropriate method from the `Content-Type` response header.\n   * You can override this behavior with any of the {@link Body} methods.\n   * Select `stream` if you don't want to parse response data at all.\n   *\n   * @default 'auto'\n   */\n  parseAs?: 'arrayBuffer' | 'auto' | 'blob' | 'formData' | 'json' | 'stream' | 'text';\n  /**\n   * Should we return only data or multiple fields (data, error, response, etc.)?\n   *\n   * @default 'fields'\n   */\n  responseStyle?: ResponseStyle;\n  /**\n   * Throw an error instead of returning it in the response?\n   *\n   * @default false\n   */\n  throwOnError?: T['throwOnError'];\n}\n\nexport interface RequestOptions<\n  TData = unknown,\n  TResponseStyle extends ResponseStyle = 'fields',\n  ThrowOnError extends boolean = boolean,\n  Url extends string = string,\n>\n  extends\n    Config<{\n      responseStyle: TResponseStyle;\n      throwOnError: ThrowOnError;\n    }>,\n    Pick<\n      ServerSentEventsOptions<TData>,\n      | 'onRequest'\n      | 'onSseError'\n      | 'onSseEvent'\n      | 'sseDefaultRetryDelay'\n      | 'sseMaxRetryAttempts'\n      | 'sseMaxRetryDelay'\n    > {\n  /**\n   * Any body that you want to add to your request.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/fetch#body}\n   */\n  body?: unknown;\n  path?: Record<string, unknown>;\n  query?: Record<string, unknown>;\n  /**\n   * Security mechanism(s) to use for the request.\n   */\n  security?: ReadonlyArray<Auth>;\n  url: Url;\n}\n\nexport interface ResolvedRequestOptions<\n  TResponseStyle extends ResponseStyle = 'fields',\n  ThrowOnError extends boolean = boolean,\n  Url extends string = string,\n> extends RequestOptions<unknown, TResponseStyle, ThrowOnError, Url> {\n  serializedBody?: string;\n}\n\nexport type RequestResult<\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = boolean,\n  TResponseStyle extends ResponseStyle = 'fields',\n> = ThrowOnError extends true\n  ? Promise<\n      TResponseStyle extends 'data'\n        ? TData extends Record<string, unknown>\n          ? TData[keyof TData]\n          : TData\n        : {\n            data: TData extends Record<string, unknown> ? TData[keyof TData] : TData;\n            request: Request;\n            response: Response;\n          }\n    >\n  : Promise<\n      TResponseStyle extends 'data'\n        ? (TData extends Record<string, unknown> ? TData[keyof TData] : TData) | undefined\n        : (\n            | {\n                data: TData extends Record<string, unknown> ? TData[keyof TData] : TData;\n                error: undefined;\n              }\n            | {\n                data: undefined;\n                error: TError extends Record<string, unknown> ? TError[keyof TError] : TError;\n              }\n          ) & {\n            request: Request;\n            response: Response;\n          }\n    >;\n\nexport interface ClientOptions {\n  baseUrl?: string;\n  responseStyle?: ResponseStyle;\n  throwOnError?: boolean;\n}\n\ntype MethodFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'>,\n) => RequestResult<TData, TError, ThrowOnError, TResponseStyle>;\n\ntype SseFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'>,\n) => Promise<ServerSentEventsResult<TData, TError>>;\n\ntype RequestFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'> &\n    Pick<Required<RequestOptions<TData, TResponseStyle, ThrowOnError>>, 'method'>,\n) => RequestResult<TData, TError, ThrowOnError, TResponseStyle>;\n\ntype BuildUrlFn = <\n  TData extends {\n    body?: unknown;\n    path?: Record<string, unknown>;\n    query?: Record<string, unknown>;\n    url: string;\n  },\n>(\n  options: TData & Options<TData>,\n) => string;\n\nexport type Client = CoreClient<RequestFn, Config, MethodFn, BuildUrlFn, SseFn> & {\n  interceptors: Middleware<Request, Response, unknown, ResolvedRequestOptions>;\n};\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 = ClientOptions> = (\n  override?: Config<ClientOptions & T>,\n) => Config<Required<ClientOptions> & T>;\n\nexport interface TDataShape {\n  body?: unknown;\n  headers?: unknown;\n  path?: unknown;\n  query?: unknown;\n  url: string;\n}\n\ntype OmitKeys<T, K> = Pick<T, Exclude<keyof T, K>>;\n\nexport type Options<\n  TData extends TDataShape = TDataShape,\n  ThrowOnError extends boolean = boolean,\n  TResponse = unknown,\n  TResponseStyle extends ResponseStyle = 'fields',\n> = OmitKeys<\n  RequestOptions<TResponse, TResponseStyle, ThrowOnError>,\n  'body' | 'path' | 'query' | 'url'\n> &\n  ([TData] extends [never] ? unknown : Omit<TData, 'url'>);\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/preact-query/name-builder/client/utils.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/preact-query/name-builder/client.gen.ts",
    "content": "// 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>());\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/preact-query/name-builder/core/auth.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/preact-query/name-builder/core/bodySerializer.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/preact-query/name-builder/core/params.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/preact-query/name-builder/core/pathSerializer.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/preact-query/name-builder/core/queryKeySerializer.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\n/**\n * JSON-friendly union that mirrors what Pinia Colada can hash.\n */\nexport type JsonValue =\n  | null\n  | string\n  | number\n  | boolean\n  | JsonValue[]\n  | { [key: string]: JsonValue };\n\n/**\n * Replacer that converts non-JSON values (bigint, Date, etc.) to safe substitutes.\n */\nexport const queryKeyJsonReplacer = (_key: string, value: unknown) => {\n  if (value === undefined || typeof value === 'function' || typeof value === 'symbol') {\n    return undefined;\n  }\n  if (typeof value === 'bigint') {\n    return value.toString();\n  }\n  if (value instanceof Date) {\n    return value.toISOString();\n  }\n  return value;\n};\n\n/**\n * Safely stringifies a value and parses it back into a JsonValue.\n */\nexport const stringifyToJsonValue = (input: unknown): JsonValue | undefined => {\n  try {\n    const json = JSON.stringify(input, queryKeyJsonReplacer);\n    if (json === undefined) {\n      return undefined;\n    }\n    return JSON.parse(json) as JsonValue;\n  } catch {\n    return undefined;\n  }\n};\n\n/**\n * Detects plain objects (including objects with a null prototype).\n */\nconst isPlainObject = (value: unknown): value is Record<string, unknown> => {\n  if (value === null || typeof value !== 'object') {\n    return false;\n  }\n  const prototype = Object.getPrototypeOf(value as object);\n  return prototype === Object.prototype || prototype === null;\n};\n\n/**\n * Turns URLSearchParams into a sorted JSON object for deterministic keys.\n */\nconst serializeSearchParams = (params: URLSearchParams): JsonValue => {\n  const entries = Array.from(params.entries()).sort(([a], [b]) => a.localeCompare(b));\n  const result: Record<string, JsonValue> = {};\n\n  for (const [key, value] of entries) {\n    const existing = result[key];\n    if (existing === undefined) {\n      result[key] = value;\n      continue;\n    }\n\n    if (Array.isArray(existing)) {\n      (existing as string[]).push(value);\n    } else {\n      result[key] = [existing, value];\n    }\n  }\n\n  return result;\n};\n\n/**\n * Normalizes any accepted value into a JSON-friendly shape for query keys.\n */\nexport const serializeQueryKeyValue = (value: unknown): JsonValue | undefined => {\n  if (value === null) {\n    return null;\n  }\n\n  if (typeof value === 'string' || typeof value === 'number' || typeof value === 'boolean') {\n    return value;\n  }\n\n  if (value === undefined || typeof value === 'function' || typeof value === 'symbol') {\n    return undefined;\n  }\n\n  if (typeof value === 'bigint') {\n    return value.toString();\n  }\n\n  if (value instanceof Date) {\n    return value.toISOString();\n  }\n\n  if (Array.isArray(value)) {\n    return stringifyToJsonValue(value);\n  }\n\n  if (typeof URLSearchParams !== 'undefined' && value instanceof URLSearchParams) {\n    return serializeSearchParams(value);\n  }\n\n  if (isPlainObject(value)) {\n    return stringifyToJsonValue(value);\n  }\n\n  return undefined;\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/preact-query/name-builder/core/serverSentEvents.gen.ts",
    "content": "// 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 const 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            // Normalize line endings: CRLF -> LF, then CR -> LF\n            buffer = buffer.replace(/\\r\\n/g, '\\n').replace(/\\r/g, '\\n');\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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/preact-query/name-builder/core/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { Auth, AuthToken } from './auth.gen';\nimport type { BodySerializer, QuerySerializer, QuerySerializerOptions } from './bodySerializer.gen';\n\nexport type HttpMethod =\n  | 'connect'\n  | 'delete'\n  | 'get'\n  | 'head'\n  | 'options'\n  | 'patch'\n  | 'post'\n  | 'put'\n  | 'trace';\n\nexport type Client<\n  RequestFn = never,\n  Config = unknown,\n  MethodFn = never,\n  BuildUrlFn = never,\n  SseFn = never,\n> = {\n  /**\n   * Returns the final request URL.\n   */\n  buildUrl: BuildUrlFn;\n  getConfig: () => Config;\n  request: RequestFn;\n  setConfig: (config: Config) => Config;\n} & {\n  [K in HttpMethod]: MethodFn;\n} & ([SseFn] extends [never] ? { sse?: never } : { sse: { [K in HttpMethod]: SseFn } });\n\nexport interface Config {\n  /**\n   * Auth token or a function returning auth token. The resolved value will be\n   * added to the request payload as defined by its `security` array.\n   */\n  auth?: ((auth: Auth) => Promise<AuthToken> | AuthToken) | AuthToken;\n  /**\n   * A function for serializing request body parameter. By default,\n   * {@link JSON.stringify()} will be used.\n   */\n  bodySerializer?: BodySerializer | null;\n  /**\n   * An object containing any HTTP headers that you want to pre-populate your\n   * `Headers` object with.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/Headers/Headers#init See more}\n   */\n  headers?:\n    | RequestInit['headers']\n    | Record<\n        string,\n        string | number | boolean | (string | number | boolean)[] | null | undefined | unknown\n      >;\n  /**\n   * The request method.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/fetch#method See more}\n   */\n  method?: Uppercase<HttpMethod>;\n  /**\n   * A function for serializing request query parameters. By default, arrays\n   * will be exploded in form style, objects will be exploded in deepObject\n   * style, and reserved characters are percent-encoded.\n   *\n   * This method will have no effect if the native `paramsSerializer()` Axios\n   * API function is used.\n   *\n   * {@link https://swagger.io/docs/specification/serialization/#query View examples}\n   */\n  querySerializer?: QuerySerializer | QuerySerializerOptions;\n  /**\n   * A function validating request data. This is useful if you want to ensure\n   * the request conforms to the desired shape, so it can be safely sent to\n   * the server.\n   */\n  requestValidator?: (data: unknown) => Promise<unknown>;\n  /**\n   * A function transforming response data before it's returned. This is useful\n   * for post-processing data, e.g. converting ISO strings into Date objects.\n   */\n  responseTransformer?: (data: unknown) => Promise<unknown>;\n  /**\n   * A function validating response data. This is useful if you want to ensure\n   * the response conforms to the desired shape, so it can be safely passed to\n   * the transformers and returned to the user.\n   */\n  responseValidator?: (data: unknown) => Promise<unknown>;\n}\n\ntype IsExactlyNeverOrNeverUndefined<T> = [T] extends [never]\n  ? true\n  : [T] extends [never | undefined]\n    ? [undefined] extends [T]\n      ? false\n      : true\n    : false;\n\nexport type OmitNever<T extends Record<string, unknown>> = {\n  [K in keyof T as IsExactlyNeverOrNeverUndefined<T[K]> extends true ? never : K]: T[K];\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/preact-query/name-builder/core/utils.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/preact-query/name-builder/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport { fooBarPost, fooBarPut, fooPost, fooPut, getFoo, getFooBar, type Options } from './sdk.gen';\nexport type { ClientOptions, FooBarPostData, FooBarPostResponse, FooBarPostResponses, FooBarPutData, FooBarPutResponse, FooBarPutResponses, FooPostData, FooPostResponse, FooPostResponses, FooPutData, FooPutResponse, FooPutResponses, GetFooBarData, GetFooBarResponse, GetFooBarResponses, GetFooData, GetFooResponse, GetFooResponses } from './types.gen';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/preact-query/name-builder/sdk.gen.ts",
    "content": "// 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 { FooBarPostData, FooBarPostResponses, FooBarPutData, FooBarPutResponses, FooPostData, FooPostResponses, FooPutData, FooPutResponses, GetFooBarData, GetFooBarResponses, GetFooData, GetFooResponses } from './types.gen';\n\nexport type Options<TData extends TDataShape = TDataShape, ThrowOnError extends boolean = boolean> = Options2<TData, ThrowOnError> & {\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\nexport const getFoo = <ThrowOnError extends boolean = false>(options?: Options<GetFooData, ThrowOnError>) => (options?.client ?? client).get<GetFooResponses, unknown, ThrowOnError>({ url: '/foo', ...options });\n\nexport const fooPost = <ThrowOnError extends boolean = false>(options?: Options<FooPostData, ThrowOnError>) => (options?.client ?? client).post<FooPostResponses, unknown, ThrowOnError>({ url: '/foo', ...options });\n\nexport const fooPut = <ThrowOnError extends boolean = false>(options?: Options<FooPutData, ThrowOnError>) => (options?.client ?? client).put<FooPutResponses, unknown, ThrowOnError>({ url: '/foo', ...options });\n\nexport const getFooBar = <ThrowOnError extends boolean = false>(options?: Options<GetFooBarData, ThrowOnError>) => (options?.client ?? client).get<GetFooBarResponses, unknown, ThrowOnError>({ url: '/foo/bar', ...options });\n\nexport const fooBarPost = <ThrowOnError extends boolean = false>(options?: Options<FooBarPostData, ThrowOnError>) => (options?.client ?? client).post<FooBarPostResponses, unknown, ThrowOnError>({ url: '/foo/bar', ...options });\n\nexport const fooBarPut = <ThrowOnError extends boolean = false>(options?: Options<FooBarPutData, ThrowOnError>) => (options?.client ?? client).put<FooBarPutResponses, unknown, ThrowOnError>({ url: '/foo/bar', ...options });\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/preact-query/name-builder/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type ClientOptions = {\n    baseUrl: string;\n};\n\nexport type GetFooData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/foo';\n};\n\nexport type GetFooResponses = {\n    /**\n     * OK\n     */\n    200: string;\n};\n\nexport type GetFooResponse = GetFooResponses[keyof GetFooResponses];\n\nexport type FooPostData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/foo';\n};\n\nexport type FooPostResponses = {\n    /**\n     * OK\n     */\n    200: string;\n};\n\nexport type FooPostResponse = FooPostResponses[keyof FooPostResponses];\n\nexport type FooPutData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/foo';\n};\n\nexport type FooPutResponses = {\n    /**\n     * OK\n     */\n    200: string;\n};\n\nexport type FooPutResponse = FooPutResponses[keyof FooPutResponses];\n\nexport type GetFooBarData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/foo/bar';\n};\n\nexport type GetFooBarResponses = {\n    /**\n     * OK\n     */\n    200: string;\n};\n\nexport type GetFooBarResponse = GetFooBarResponses[keyof GetFooBarResponses];\n\nexport type FooBarPostData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/foo/bar';\n};\n\nexport type FooBarPostResponses = {\n    /**\n     * OK\n     */\n    200: string;\n};\n\nexport type FooBarPostResponse = FooBarPostResponses[keyof FooBarPostResponses];\n\nexport type FooBarPutData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/foo/bar';\n};\n\nexport type FooBarPutResponses = {\n    /**\n     * OK\n     */\n    200: string;\n};\n\nexport type FooBarPutResponse = FooBarPutResponses[keyof FooBarPutResponses];\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/react-query/asClass/@tanstack/react-query.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport { type DefaultError, queryOptions, type UseMutationOptions } from '@tanstack/react-query';\n\nimport { client } from '../client.gen';\nimport { BarBazService, BarService, FooBazService, FooService, type Options } from '../sdk.gen';\nimport type { FooBarPostData, FooBarPostResponse, FooBarPutData, FooBarPutResponse, FooPostData, FooPostResponse, FooPutData, FooPutResponse, GetFooBarData, GetFooBarResponse, GetFooData, GetFooResponse } from '../types.gen';\n\nexport type QueryKey<TOptions extends Options> = [\n    Pick<TOptions, 'baseUrl' | 'body' | 'headers' | 'path' | 'query'> & {\n        _id: string;\n        _infinite?: boolean;\n        tags?: ReadonlyArray<string>;\n    }\n];\n\nconst createQueryKey = <TOptions extends Options>(id: string, options?: TOptions, infinite?: boolean, tags?: ReadonlyArray<string>): [\n    QueryKey<TOptions>[0]\n] => {\n    const params: QueryKey<TOptions>[0] = { _id: id, baseUrl: options?.baseUrl || (options?.client ?? client).getConfig().baseUrl } as QueryKey<TOptions>[0];\n    if (infinite) {\n        params._infinite = infinite;\n    }\n    if (tags) {\n        params.tags = tags;\n    }\n    if (options?.body) {\n        params.body = options.body;\n    }\n    if (options?.headers) {\n        params.headers = options.headers;\n    }\n    if (options?.path) {\n        params.path = options.path;\n    }\n    if (options?.query) {\n        params.query = options.query;\n    }\n    return [params];\n};\n\nexport const getFooQueryKey = (options?: Options<GetFooData>) => createQueryKey('getFoo', options);\n\nexport const getFooOptions = (options?: Options<GetFooData>) => queryOptions<GetFooResponse, DefaultError, GetFooResponse, ReturnType<typeof getFooQueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await FooBazService.getFoo({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: getFooQueryKey(options)\n});\n\nexport const fooPostMutation = (options?: Partial<Options<FooPostData>>): UseMutationOptions<FooPostResponse, DefaultError, Options<FooPostData>> => {\n    const mutationOptions: UseMutationOptions<FooPostResponse, DefaultError, Options<FooPostData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await FooService.post({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const fooPutMutation = (options?: Partial<Options<FooPutData>>): UseMutationOptions<FooPutResponse, DefaultError, Options<FooPutData>> => {\n    const mutationOptions: UseMutationOptions<FooPutResponse, DefaultError, Options<FooPutData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await FooService.put({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const getFooBarQueryKey = (options?: Options<GetFooBarData>) => createQueryKey('getFooBar', options);\n\nexport const getFooBarOptions = (options?: Options<GetFooBarData>) => queryOptions<GetFooBarResponse, DefaultError, GetFooBarResponse, ReturnType<typeof getFooBarQueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await BarBazService.getFooBar({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: getFooBarQueryKey(options)\n});\n\nexport const fooBarPostMutation = (options?: Partial<Options<FooBarPostData>>): UseMutationOptions<FooBarPostResponse, DefaultError, Options<FooBarPostData>> => {\n    const mutationOptions: UseMutationOptions<FooBarPostResponse, DefaultError, Options<FooBarPostData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await BarService.post({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const fooBarPutMutation = (options?: Partial<Options<FooBarPutData>>): UseMutationOptions<FooBarPutResponse, DefaultError, Options<FooBarPutData>> => {\n    const mutationOptions: UseMutationOptions<FooBarPutResponse, DefaultError, Options<FooBarPutData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await BarService.put({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/react-query/asClass/client/client.gen.ts",
    "content": "// 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 (options: RequestOptions) => {\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 url = buildUrl(opts);\n\n    return { opts, url };\n  };\n\n  const request: Client['request'] = async (options) => {\n    // @ts-expect-error\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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/react-query/asClass/client/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type { Auth } from '../core/auth.gen';\nexport type { QuerySerializerOptions } from '../core/bodySerializer.gen';\nexport {\n  formDataBodySerializer,\n  jsonBodySerializer,\n  urlSearchParamsBodySerializer,\n} from '../core/bodySerializer.gen';\nexport { buildClientParams } from '../core/params.gen';\nexport { serializeQueryKeyValue } from '../core/queryKeySerializer.gen';\nexport { createClient } from './client.gen';\nexport type {\n  Client,\n  ClientOptions,\n  Config,\n  CreateClientConfig,\n  Options,\n  RequestOptions,\n  RequestResult,\n  ResolvedRequestOptions,\n  ResponseStyle,\n  TDataShape,\n} from './types.gen';\nexport { createConfig, mergeHeaders } from './utils.gen';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/react-query/asClass/client/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { Auth } from '../core/auth.gen';\nimport type {\n  ServerSentEventsOptions,\n  ServerSentEventsResult,\n} from '../core/serverSentEvents.gen';\nimport type { Client as CoreClient, Config as CoreConfig } from '../core/types.gen';\nimport type { Middleware } from './utils.gen';\n\nexport type ResponseStyle = 'data' | 'fields';\n\nexport interface Config<T extends ClientOptions = ClientOptions>\n  extends Omit<RequestInit, 'body' | 'headers' | 'method'>, CoreConfig {\n  /**\n   * Base URL for all requests made by this client.\n   */\n  baseUrl?: T['baseUrl'];\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   * Please don't use the Fetch client for Next.js applications. The `next`\n   * options won't have any effect.\n   *\n   * Install {@link https://www.npmjs.com/package/@hey-api/client-next `@hey-api/client-next`} instead.\n   */\n  next?: never;\n  /**\n   * Return the response data parsed in a specified format. By default, `auto`\n   * will infer the appropriate method from the `Content-Type` response header.\n   * You can override this behavior with any of the {@link Body} methods.\n   * Select `stream` if you don't want to parse response data at all.\n   *\n   * @default 'auto'\n   */\n  parseAs?: 'arrayBuffer' | 'auto' | 'blob' | 'formData' | 'json' | 'stream' | 'text';\n  /**\n   * Should we return only data or multiple fields (data, error, response, etc.)?\n   *\n   * @default 'fields'\n   */\n  responseStyle?: ResponseStyle;\n  /**\n   * Throw an error instead of returning it in the response?\n   *\n   * @default false\n   */\n  throwOnError?: T['throwOnError'];\n}\n\nexport interface RequestOptions<\n  TData = unknown,\n  TResponseStyle extends ResponseStyle = 'fields',\n  ThrowOnError extends boolean = boolean,\n  Url extends string = string,\n>\n  extends\n    Config<{\n      responseStyle: TResponseStyle;\n      throwOnError: ThrowOnError;\n    }>,\n    Pick<\n      ServerSentEventsOptions<TData>,\n      | 'onRequest'\n      | 'onSseError'\n      | 'onSseEvent'\n      | 'sseDefaultRetryDelay'\n      | 'sseMaxRetryAttempts'\n      | 'sseMaxRetryDelay'\n    > {\n  /**\n   * Any body that you want to add to your request.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/fetch#body}\n   */\n  body?: unknown;\n  path?: Record<string, unknown>;\n  query?: Record<string, unknown>;\n  /**\n   * Security mechanism(s) to use for the request.\n   */\n  security?: ReadonlyArray<Auth>;\n  url: Url;\n}\n\nexport interface ResolvedRequestOptions<\n  TResponseStyle extends ResponseStyle = 'fields',\n  ThrowOnError extends boolean = boolean,\n  Url extends string = string,\n> extends RequestOptions<unknown, TResponseStyle, ThrowOnError, Url> {\n  serializedBody?: string;\n}\n\nexport type RequestResult<\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = boolean,\n  TResponseStyle extends ResponseStyle = 'fields',\n> = ThrowOnError extends true\n  ? Promise<\n      TResponseStyle extends 'data'\n        ? TData extends Record<string, unknown>\n          ? TData[keyof TData]\n          : TData\n        : {\n            data: TData extends Record<string, unknown> ? TData[keyof TData] : TData;\n            request: Request;\n            response: Response;\n          }\n    >\n  : Promise<\n      TResponseStyle extends 'data'\n        ? (TData extends Record<string, unknown> ? TData[keyof TData] : TData) | undefined\n        : (\n            | {\n                data: TData extends Record<string, unknown> ? TData[keyof TData] : TData;\n                error: undefined;\n              }\n            | {\n                data: undefined;\n                error: TError extends Record<string, unknown> ? TError[keyof TError] : TError;\n              }\n          ) & {\n            request: Request;\n            response: Response;\n          }\n    >;\n\nexport interface ClientOptions {\n  baseUrl?: string;\n  responseStyle?: ResponseStyle;\n  throwOnError?: boolean;\n}\n\ntype MethodFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'>,\n) => RequestResult<TData, TError, ThrowOnError, TResponseStyle>;\n\ntype SseFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'>,\n) => Promise<ServerSentEventsResult<TData, TError>>;\n\ntype RequestFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'> &\n    Pick<Required<RequestOptions<TData, TResponseStyle, ThrowOnError>>, 'method'>,\n) => RequestResult<TData, TError, ThrowOnError, TResponseStyle>;\n\ntype BuildUrlFn = <\n  TData extends {\n    body?: unknown;\n    path?: Record<string, unknown>;\n    query?: Record<string, unknown>;\n    url: string;\n  },\n>(\n  options: TData & Options<TData>,\n) => string;\n\nexport type Client = CoreClient<RequestFn, Config, MethodFn, BuildUrlFn, SseFn> & {\n  interceptors: Middleware<Request, Response, unknown, ResolvedRequestOptions>;\n};\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 = ClientOptions> = (\n  override?: Config<ClientOptions & T>,\n) => Config<Required<ClientOptions> & T>;\n\nexport interface TDataShape {\n  body?: unknown;\n  headers?: unknown;\n  path?: unknown;\n  query?: unknown;\n  url: string;\n}\n\ntype OmitKeys<T, K> = Pick<T, Exclude<keyof T, K>>;\n\nexport type Options<\n  TData extends TDataShape = TDataShape,\n  ThrowOnError extends boolean = boolean,\n  TResponse = unknown,\n  TResponseStyle extends ResponseStyle = 'fields',\n> = OmitKeys<\n  RequestOptions<TResponse, TResponseStyle, ThrowOnError>,\n  'body' | 'path' | 'query' | 'url'\n> &\n  ([TData] extends [never] ? unknown : Omit<TData, 'url'>);\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/react-query/asClass/client/utils.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/react-query/asClass/client.gen.ts",
    "content": "// 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>());\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/react-query/asClass/core/auth.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/react-query/asClass/core/bodySerializer.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/react-query/asClass/core/params.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/react-query/asClass/core/pathSerializer.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/react-query/asClass/core/queryKeySerializer.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\n/**\n * JSON-friendly union that mirrors what Pinia Colada can hash.\n */\nexport type JsonValue =\n  | null\n  | string\n  | number\n  | boolean\n  | JsonValue[]\n  | { [key: string]: JsonValue };\n\n/**\n * Replacer that converts non-JSON values (bigint, Date, etc.) to safe substitutes.\n */\nexport const queryKeyJsonReplacer = (_key: string, value: unknown) => {\n  if (value === undefined || typeof value === 'function' || typeof value === 'symbol') {\n    return undefined;\n  }\n  if (typeof value === 'bigint') {\n    return value.toString();\n  }\n  if (value instanceof Date) {\n    return value.toISOString();\n  }\n  return value;\n};\n\n/**\n * Safely stringifies a value and parses it back into a JsonValue.\n */\nexport const stringifyToJsonValue = (input: unknown): JsonValue | undefined => {\n  try {\n    const json = JSON.stringify(input, queryKeyJsonReplacer);\n    if (json === undefined) {\n      return undefined;\n    }\n    return JSON.parse(json) as JsonValue;\n  } catch {\n    return undefined;\n  }\n};\n\n/**\n * Detects plain objects (including objects with a null prototype).\n */\nconst isPlainObject = (value: unknown): value is Record<string, unknown> => {\n  if (value === null || typeof value !== 'object') {\n    return false;\n  }\n  const prototype = Object.getPrototypeOf(value as object);\n  return prototype === Object.prototype || prototype === null;\n};\n\n/**\n * Turns URLSearchParams into a sorted JSON object for deterministic keys.\n */\nconst serializeSearchParams = (params: URLSearchParams): JsonValue => {\n  const entries = Array.from(params.entries()).sort(([a], [b]) => a.localeCompare(b));\n  const result: Record<string, JsonValue> = {};\n\n  for (const [key, value] of entries) {\n    const existing = result[key];\n    if (existing === undefined) {\n      result[key] = value;\n      continue;\n    }\n\n    if (Array.isArray(existing)) {\n      (existing as string[]).push(value);\n    } else {\n      result[key] = [existing, value];\n    }\n  }\n\n  return result;\n};\n\n/**\n * Normalizes any accepted value into a JSON-friendly shape for query keys.\n */\nexport const serializeQueryKeyValue = (value: unknown): JsonValue | undefined => {\n  if (value === null) {\n    return null;\n  }\n\n  if (typeof value === 'string' || typeof value === 'number' || typeof value === 'boolean') {\n    return value;\n  }\n\n  if (value === undefined || typeof value === 'function' || typeof value === 'symbol') {\n    return undefined;\n  }\n\n  if (typeof value === 'bigint') {\n    return value.toString();\n  }\n\n  if (value instanceof Date) {\n    return value.toISOString();\n  }\n\n  if (Array.isArray(value)) {\n    return stringifyToJsonValue(value);\n  }\n\n  if (typeof URLSearchParams !== 'undefined' && value instanceof URLSearchParams) {\n    return serializeSearchParams(value);\n  }\n\n  if (isPlainObject(value)) {\n    return stringifyToJsonValue(value);\n  }\n\n  return undefined;\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/react-query/asClass/core/serverSentEvents.gen.ts",
    "content": "// 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 const 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            // Normalize line endings: CRLF -> LF, then CR -> LF\n            buffer = buffer.replace(/\\r\\n/g, '\\n').replace(/\\r/g, '\\n');\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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/react-query/asClass/core/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { Auth, AuthToken } from './auth.gen';\nimport type { BodySerializer, QuerySerializer, QuerySerializerOptions } from './bodySerializer.gen';\n\nexport type HttpMethod =\n  | 'connect'\n  | 'delete'\n  | 'get'\n  | 'head'\n  | 'options'\n  | 'patch'\n  | 'post'\n  | 'put'\n  | 'trace';\n\nexport type Client<\n  RequestFn = never,\n  Config = unknown,\n  MethodFn = never,\n  BuildUrlFn = never,\n  SseFn = never,\n> = {\n  /**\n   * Returns the final request URL.\n   */\n  buildUrl: BuildUrlFn;\n  getConfig: () => Config;\n  request: RequestFn;\n  setConfig: (config: Config) => Config;\n} & {\n  [K in HttpMethod]: MethodFn;\n} & ([SseFn] extends [never] ? { sse?: never } : { sse: { [K in HttpMethod]: SseFn } });\n\nexport interface Config {\n  /**\n   * Auth token or a function returning auth token. The resolved value will be\n   * added to the request payload as defined by its `security` array.\n   */\n  auth?: ((auth: Auth) => Promise<AuthToken> | AuthToken) | AuthToken;\n  /**\n   * A function for serializing request body parameter. By default,\n   * {@link JSON.stringify()} will be used.\n   */\n  bodySerializer?: BodySerializer | null;\n  /**\n   * An object containing any HTTP headers that you want to pre-populate your\n   * `Headers` object with.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/Headers/Headers#init See more}\n   */\n  headers?:\n    | RequestInit['headers']\n    | Record<\n        string,\n        string | number | boolean | (string | number | boolean)[] | null | undefined | unknown\n      >;\n  /**\n   * The request method.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/fetch#method See more}\n   */\n  method?: Uppercase<HttpMethod>;\n  /**\n   * A function for serializing request query parameters. By default, arrays\n   * will be exploded in form style, objects will be exploded in deepObject\n   * style, and reserved characters are percent-encoded.\n   *\n   * This method will have no effect if the native `paramsSerializer()` Axios\n   * API function is used.\n   *\n   * {@link https://swagger.io/docs/specification/serialization/#query View examples}\n   */\n  querySerializer?: QuerySerializer | QuerySerializerOptions;\n  /**\n   * A function validating request data. This is useful if you want to ensure\n   * the request conforms to the desired shape, so it can be safely sent to\n   * the server.\n   */\n  requestValidator?: (data: unknown) => Promise<unknown>;\n  /**\n   * A function transforming response data before it's returned. This is useful\n   * for post-processing data, e.g. converting ISO strings into Date objects.\n   */\n  responseTransformer?: (data: unknown) => Promise<unknown>;\n  /**\n   * A function validating response data. This is useful if you want to ensure\n   * the response conforms to the desired shape, so it can be safely passed to\n   * the transformers and returned to the user.\n   */\n  responseValidator?: (data: unknown) => Promise<unknown>;\n}\n\ntype IsExactlyNeverOrNeverUndefined<T> = [T] extends [never]\n  ? true\n  : [T] extends [never | undefined]\n    ? [undefined] extends [T]\n      ? false\n      : true\n    : false;\n\nexport type OmitNever<T extends Record<string, unknown>> = {\n  [K in keyof T as IsExactlyNeverOrNeverUndefined<T[K]> extends true ? never : K]: T[K];\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/react-query/asClass/core/utils.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/react-query/asClass/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport { BarBazService, BarService, BarService2, FooBazService, FooService, FooService2, type Options } from './sdk.gen';\nexport type { ClientOptions, FooBarPostData, FooBarPostResponse, FooBarPostResponses, FooBarPutData, FooBarPutResponse, FooBarPutResponses, FooPostData, FooPostResponse, FooPostResponses, FooPutData, FooPutResponse, FooPutResponses, GetFooBarData, GetFooBarResponse, GetFooBarResponses, GetFooData, GetFooResponse, GetFooResponses } from './types.gen';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/react-query/asClass/sdk.gen.ts",
    "content": "// 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 { FooBarPostData, FooBarPostResponses, FooBarPutData, FooBarPutResponses, FooPostData, FooPostResponses, FooPutData, FooPutResponses, GetFooBarData, GetFooBarResponses, GetFooData, GetFooResponses } from './types.gen';\n\nexport type Options<TData extends TDataShape = TDataShape, ThrowOnError extends boolean = boolean> = Options2<TData, ThrowOnError> & {\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\nexport class BarService {\n    public static post<ThrowOnError extends boolean = false>(options?: Options<FooBarPostData, ThrowOnError>) {\n        return (options?.client ?? client).post<FooBarPostResponses, unknown, ThrowOnError>({ url: '/foo/bar', ...options });\n    }\n    \n    public static put<ThrowOnError extends boolean = false>(options?: Options<FooBarPutData, ThrowOnError>) {\n        return (options?.client ?? client).put<FooBarPutResponses, unknown, ThrowOnError>({ url: '/foo/bar', ...options });\n    }\n}\n\nexport class FooService {\n    public static post<ThrowOnError extends boolean = false>(options?: Options<FooPostData, ThrowOnError>) {\n        return (options?.client ?? client).post<FooPostResponses, unknown, ThrowOnError>({ url: '/foo', ...options });\n    }\n    \n    public static put<ThrowOnError extends boolean = false>(options?: Options<FooPutData, ThrowOnError>) {\n        return (options?.client ?? client).put<FooPutResponses, unknown, ThrowOnError>({ url: '/foo', ...options });\n    }\n    \n    static barService = BarService;\n}\n\nexport class FooBazService {\n    public static getFoo<ThrowOnError extends boolean = false>(options?: Options<GetFooData, ThrowOnError>) {\n        return (options?.client ?? client).get<GetFooResponses, unknown, ThrowOnError>({ url: '/foo', ...options });\n    }\n    \n    static fooService = FooService;\n}\n\nexport class BarService2 {\n    public static post<ThrowOnError extends boolean = false>(options?: Options<FooBarPostData, ThrowOnError>) {\n        return (options?.client ?? client).post<FooBarPostResponses, unknown, ThrowOnError>({ url: '/foo/bar', ...options });\n    }\n    \n    public static put<ThrowOnError extends boolean = false>(options?: Options<FooBarPutData, ThrowOnError>) {\n        return (options?.client ?? client).put<FooBarPutResponses, unknown, ThrowOnError>({ url: '/foo/bar', ...options });\n    }\n}\n\nexport class FooService2 {\n    static barService = BarService2;\n}\n\nexport class BarBazService {\n    public static getFooBar<ThrowOnError extends boolean = false>(options?: Options<GetFooBarData, ThrowOnError>) {\n        return (options?.client ?? client).get<GetFooBarResponses, unknown, ThrowOnError>({ url: '/foo/bar', ...options });\n    }\n    \n    static fooService = FooService2;\n}\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/react-query/asClass/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type ClientOptions = {\n    baseUrl: string;\n};\n\nexport type GetFooData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/foo';\n};\n\nexport type GetFooResponses = {\n    /**\n     * OK\n     */\n    200: string;\n};\n\nexport type GetFooResponse = GetFooResponses[keyof GetFooResponses];\n\nexport type FooPostData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/foo';\n};\n\nexport type FooPostResponses = {\n    /**\n     * OK\n     */\n    200: string;\n};\n\nexport type FooPostResponse = FooPostResponses[keyof FooPostResponses];\n\nexport type FooPutData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/foo';\n};\n\nexport type FooPutResponses = {\n    /**\n     * OK\n     */\n    200: string;\n};\n\nexport type FooPutResponse = FooPutResponses[keyof FooPutResponses];\n\nexport type GetFooBarData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/foo/bar';\n};\n\nexport type GetFooBarResponses = {\n    /**\n     * OK\n     */\n    200: string;\n};\n\nexport type GetFooBarResponse = GetFooBarResponses[keyof GetFooBarResponses];\n\nexport type FooBarPostData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/foo/bar';\n};\n\nexport type FooBarPostResponses = {\n    /**\n     * OK\n     */\n    200: string;\n};\n\nexport type FooBarPostResponse = FooBarPostResponses[keyof FooBarPostResponses];\n\nexport type FooBarPutData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/foo/bar';\n};\n\nexport type FooBarPutResponses = {\n    /**\n     * OK\n     */\n    200: string;\n};\n\nexport type FooBarPutResponse = FooBarPutResponses[keyof FooBarPutResponses];\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/react-query/axios/@tanstack/react-query.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport { type DefaultError, queryOptions, type UseMutationOptions } from '@tanstack/react-query';\nimport type { AxiosError } from 'axios';\n\nimport { client } from '../client.gen';\nimport { callToTestOrderOfParams, callWithDefaultOptionalParameters, callWithDefaultParameters, callWithDescriptions, callWithDuplicateResponses, callWithNoContentResponse, callWithParameters, callWithResponse, callWithResponseAndNoContentResponse, callWithResponses, callWithResultFromHeader, callWithWeirdParameterNames, collectionFormat, complexTypes, deleteCallWithoutParametersAndResponse, dummyA, dummyB, duplicateName, duplicateName2, duplicateName3, duplicateName4, fooWow, getCallWithoutParametersAndResponse, nonAsciiæøåÆøÅöôêÊ字符串, type Options, patchApiVbyApiVersionNoTag, patchCallWithoutParametersAndResponse, postApiVbyApiVersionBody, postCallWithoutParametersAndResponse, putCallWithoutParametersAndResponse, serviceWithEmptyTag, testErrorCode, types } from '../sdk.gen';\nimport type { CallToTestOrderOfParamsData, CallWithDefaultOptionalParametersData, CallWithDefaultParametersData, CallWithDescriptionsData, CallWithDuplicateResponsesData, CallWithDuplicateResponsesError, CallWithDuplicateResponsesResponse, CallWithNoContentResponseData, CallWithParametersData, CallWithResponseAndNoContentResponseData, CallWithResponseAndNoContentResponseResponse, CallWithResponseData, CallWithResponseResponse, CallWithResponsesData, CallWithResponsesError, CallWithResponsesResponse, CallWithResultFromHeaderData, CallWithWeirdParameterNamesData, CollectionFormatData, ComplexTypesData, ComplexTypesResponse, DeleteCallWithoutParametersAndResponseData, DummyAData, DummyBData, DuplicateName2Data, DuplicateName3Data, DuplicateName4Data, DuplicateNameData, FooWowData, GetCallWithoutParametersAndResponseData, NonAsciiæøåÆøÅöôêÊ字符串Data, NonAsciiæøåÆøÅöôêÊ字符串Response, PatchApiVbyApiVersionNoTagData, PatchCallWithoutParametersAndResponseData, PostApiVbyApiVersionBodyData, PostApiVbyApiVersionBodyError, PostApiVbyApiVersionBodyResponse, PostCallWithoutParametersAndResponseData, PutCallWithoutParametersAndResponseData, ServiceWithEmptyTagData, TestErrorCodeData, TypesData, TypesResponse } from '../types.gen';\n\nexport type QueryKey<TOptions extends Options> = [\n    Pick<TOptions, 'baseURL' | 'body' | 'headers' | 'path' | 'query'> & {\n        _id: string;\n        _infinite?: boolean;\n        tags?: ReadonlyArray<string>;\n    }\n];\n\nconst createQueryKey = <TOptions extends Options>(id: string, options?: TOptions, infinite?: boolean, tags?: ReadonlyArray<string>): [\n    QueryKey<TOptions>[0]\n] => {\n    const params: QueryKey<TOptions>[0] = { _id: id, baseURL: options?.baseURL || (options?.client ?? client).getConfig().baseURL } as QueryKey<TOptions>[0];\n    if (infinite) {\n        params._infinite = infinite;\n    }\n    if (tags) {\n        params.tags = tags;\n    }\n    if (options?.body) {\n        params.body = options.body;\n    }\n    if (options?.headers) {\n        params.headers = options.headers;\n    }\n    if (options?.path) {\n        params.path = options.path;\n    }\n    if (options?.query) {\n        params.query = options.query;\n    }\n    return [params];\n};\n\nexport const serviceWithEmptyTagQueryKey = (options?: Options<ServiceWithEmptyTagData>) => createQueryKey('serviceWithEmptyTag', options);\n\nexport const serviceWithEmptyTagOptions = (options?: Options<ServiceWithEmptyTagData>) => queryOptions<unknown, AxiosError<DefaultError>, unknown, ReturnType<typeof serviceWithEmptyTagQueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await serviceWithEmptyTag({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: serviceWithEmptyTagQueryKey(options)\n});\n\nexport const patchApiVbyApiVersionNoTagMutation = (options?: Partial<Options<PatchApiVbyApiVersionNoTagData>>): UseMutationOptions<unknown, AxiosError<DefaultError>, Options<PatchApiVbyApiVersionNoTagData>> => {\n    const mutationOptions: UseMutationOptions<unknown, AxiosError<DefaultError>, Options<PatchApiVbyApiVersionNoTagData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await patchApiVbyApiVersionNoTag({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const fooWowMutation = (options?: Partial<Options<FooWowData>>): UseMutationOptions<unknown, AxiosError<DefaultError>, Options<FooWowData>> => {\n    const mutationOptions: UseMutationOptions<unknown, AxiosError<DefaultError>, Options<FooWowData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await fooWow({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const deleteCallWithoutParametersAndResponseMutation = (options?: Partial<Options<DeleteCallWithoutParametersAndResponseData>>): UseMutationOptions<unknown, AxiosError<DefaultError>, Options<DeleteCallWithoutParametersAndResponseData>> => {\n    const mutationOptions: UseMutationOptions<unknown, AxiosError<DefaultError>, Options<DeleteCallWithoutParametersAndResponseData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await deleteCallWithoutParametersAndResponse({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const getCallWithoutParametersAndResponseQueryKey = (options?: Options<GetCallWithoutParametersAndResponseData>) => createQueryKey('getCallWithoutParametersAndResponse', options);\n\nexport const getCallWithoutParametersAndResponseOptions = (options?: Options<GetCallWithoutParametersAndResponseData>) => queryOptions<unknown, AxiosError<DefaultError>, unknown, ReturnType<typeof getCallWithoutParametersAndResponseQueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await getCallWithoutParametersAndResponse({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: getCallWithoutParametersAndResponseQueryKey(options)\n});\n\nexport const patchCallWithoutParametersAndResponseMutation = (options?: Partial<Options<PatchCallWithoutParametersAndResponseData>>): UseMutationOptions<unknown, AxiosError<DefaultError>, Options<PatchCallWithoutParametersAndResponseData>> => {\n    const mutationOptions: UseMutationOptions<unknown, AxiosError<DefaultError>, Options<PatchCallWithoutParametersAndResponseData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await patchCallWithoutParametersAndResponse({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const postCallWithoutParametersAndResponseMutation = (options?: Partial<Options<PostCallWithoutParametersAndResponseData>>): UseMutationOptions<unknown, AxiosError<DefaultError>, Options<PostCallWithoutParametersAndResponseData>> => {\n    const mutationOptions: UseMutationOptions<unknown, AxiosError<DefaultError>, Options<PostCallWithoutParametersAndResponseData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await postCallWithoutParametersAndResponse({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const putCallWithoutParametersAndResponseMutation = (options?: Partial<Options<PutCallWithoutParametersAndResponseData>>): UseMutationOptions<unknown, AxiosError<DefaultError>, Options<PutCallWithoutParametersAndResponseData>> => {\n    const mutationOptions: UseMutationOptions<unknown, AxiosError<DefaultError>, Options<PutCallWithoutParametersAndResponseData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await putCallWithoutParametersAndResponse({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const callWithDescriptionsMutation = (options?: Partial<Options<CallWithDescriptionsData>>): UseMutationOptions<unknown, AxiosError<DefaultError>, Options<CallWithDescriptionsData>> => {\n    const mutationOptions: UseMutationOptions<unknown, AxiosError<DefaultError>, Options<CallWithDescriptionsData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await callWithDescriptions({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const callWithParametersMutation = (options?: Partial<Options<CallWithParametersData>>): UseMutationOptions<unknown, AxiosError<DefaultError>, Options<CallWithParametersData>> => {\n    const mutationOptions: UseMutationOptions<unknown, AxiosError<DefaultError>, Options<CallWithParametersData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await callWithParameters({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const callWithWeirdParameterNamesMutation = (options?: Partial<Options<CallWithWeirdParameterNamesData>>): UseMutationOptions<unknown, AxiosError<DefaultError>, Options<CallWithWeirdParameterNamesData>> => {\n    const mutationOptions: UseMutationOptions<unknown, AxiosError<DefaultError>, Options<CallWithWeirdParameterNamesData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await callWithWeirdParameterNames({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const callWithDefaultParametersQueryKey = (options: Options<CallWithDefaultParametersData>) => createQueryKey('callWithDefaultParameters', options);\n\nexport const callWithDefaultParametersOptions = (options: Options<CallWithDefaultParametersData>) => queryOptions<unknown, AxiosError<DefaultError>, unknown, ReturnType<typeof callWithDefaultParametersQueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await callWithDefaultParameters({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: callWithDefaultParametersQueryKey(options)\n});\n\nexport const callWithDefaultOptionalParametersMutation = (options?: Partial<Options<CallWithDefaultOptionalParametersData>>): UseMutationOptions<unknown, AxiosError<DefaultError>, Options<CallWithDefaultOptionalParametersData>> => {\n    const mutationOptions: UseMutationOptions<unknown, AxiosError<DefaultError>, Options<CallWithDefaultOptionalParametersData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await callWithDefaultOptionalParameters({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const callToTestOrderOfParamsMutation = (options?: Partial<Options<CallToTestOrderOfParamsData>>): UseMutationOptions<unknown, AxiosError<DefaultError>, Options<CallToTestOrderOfParamsData>> => {\n    const mutationOptions: UseMutationOptions<unknown, AxiosError<DefaultError>, Options<CallToTestOrderOfParamsData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await callToTestOrderOfParams({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const duplicateNameMutation = (options?: Partial<Options<DuplicateNameData>>): UseMutationOptions<unknown, AxiosError<DefaultError>, Options<DuplicateNameData>> => {\n    const mutationOptions: UseMutationOptions<unknown, AxiosError<DefaultError>, Options<DuplicateNameData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await duplicateName({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const duplicateName2QueryKey = (options?: Options<DuplicateName2Data>) => createQueryKey('duplicateName2', options);\n\nexport const duplicateName2Options = (options?: Options<DuplicateName2Data>) => queryOptions<unknown, AxiosError<DefaultError>, unknown, ReturnType<typeof duplicateName2QueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await duplicateName2({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: duplicateName2QueryKey(options)\n});\n\nexport const duplicateName3Mutation = (options?: Partial<Options<DuplicateName3Data>>): UseMutationOptions<unknown, AxiosError<DefaultError>, Options<DuplicateName3Data>> => {\n    const mutationOptions: UseMutationOptions<unknown, AxiosError<DefaultError>, Options<DuplicateName3Data>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await duplicateName3({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const duplicateName4Mutation = (options?: Partial<Options<DuplicateName4Data>>): UseMutationOptions<unknown, AxiosError<DefaultError>, Options<DuplicateName4Data>> => {\n    const mutationOptions: UseMutationOptions<unknown, AxiosError<DefaultError>, Options<DuplicateName4Data>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await duplicateName4({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const callWithNoContentResponseQueryKey = (options?: Options<CallWithNoContentResponseData>) => createQueryKey('callWithNoContentResponse', options);\n\nexport const callWithNoContentResponseOptions = (options?: Options<CallWithNoContentResponseData>) => queryOptions<unknown, AxiosError<DefaultError>, unknown, ReturnType<typeof callWithNoContentResponseQueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await callWithNoContentResponse({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: callWithNoContentResponseQueryKey(options)\n});\n\nexport const callWithResponseAndNoContentResponseQueryKey = (options?: Options<CallWithResponseAndNoContentResponseData>) => createQueryKey('callWithResponseAndNoContentResponse', options);\n\nexport const callWithResponseAndNoContentResponseOptions = (options?: Options<CallWithResponseAndNoContentResponseData>) => queryOptions<CallWithResponseAndNoContentResponseResponse, AxiosError<DefaultError>, CallWithResponseAndNoContentResponseResponse, ReturnType<typeof callWithResponseAndNoContentResponseQueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await callWithResponseAndNoContentResponse({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: callWithResponseAndNoContentResponseQueryKey(options)\n});\n\nexport const dummyAQueryKey = (options?: Options<DummyAData>) => createQueryKey('dummyA', options);\n\nexport const dummyAOptions = (options?: Options<DummyAData>) => queryOptions<unknown, AxiosError<DefaultError>, unknown, ReturnType<typeof dummyAQueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await dummyA({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: dummyAQueryKey(options)\n});\n\nexport const dummyBQueryKey = (options?: Options<DummyBData>) => createQueryKey('dummyB', options);\n\nexport const dummyBOptions = (options?: Options<DummyBData>) => queryOptions<unknown, AxiosError<DefaultError>, unknown, ReturnType<typeof dummyBQueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await dummyB({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: dummyBQueryKey(options)\n});\n\nexport const callWithResponseQueryKey = (options?: Options<CallWithResponseData>) => createQueryKey('callWithResponse', options);\n\nexport const callWithResponseOptions = (options?: Options<CallWithResponseData>) => queryOptions<CallWithResponseResponse, AxiosError<DefaultError>, CallWithResponseResponse, ReturnType<typeof callWithResponseQueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await callWithResponse({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: callWithResponseQueryKey(options)\n});\n\nexport const callWithDuplicateResponsesMutation = (options?: Partial<Options<CallWithDuplicateResponsesData>>): UseMutationOptions<CallWithDuplicateResponsesResponse, AxiosError<CallWithDuplicateResponsesError>, Options<CallWithDuplicateResponsesData>> => {\n    const mutationOptions: UseMutationOptions<CallWithDuplicateResponsesResponse, AxiosError<CallWithDuplicateResponsesError>, Options<CallWithDuplicateResponsesData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await callWithDuplicateResponses({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const callWithResponsesMutation = (options?: Partial<Options<CallWithResponsesData>>): UseMutationOptions<CallWithResponsesResponse, AxiosError<CallWithResponsesError>, Options<CallWithResponsesData>> => {\n    const mutationOptions: UseMutationOptions<CallWithResponsesResponse, AxiosError<CallWithResponsesError>, Options<CallWithResponsesData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await callWithResponses({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const collectionFormatQueryKey = (options: Options<CollectionFormatData>) => createQueryKey('collectionFormat', options);\n\nexport const collectionFormatOptions = (options: Options<CollectionFormatData>) => queryOptions<unknown, AxiosError<DefaultError>, unknown, ReturnType<typeof collectionFormatQueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await collectionFormat({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: collectionFormatQueryKey(options)\n});\n\nexport const typesQueryKey = (options: Options<TypesData>) => createQueryKey('types', options);\n\nexport const typesOptions = (options: Options<TypesData>) => queryOptions<TypesResponse, AxiosError<DefaultError>, TypesResponse, ReturnType<typeof typesQueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await types({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: typesQueryKey(options)\n});\n\nexport const complexTypesQueryKey = (options: Options<ComplexTypesData>) => createQueryKey('complexTypes', options);\n\nexport const complexTypesOptions = (options: Options<ComplexTypesData>) => queryOptions<ComplexTypesResponse, AxiosError<DefaultError>, ComplexTypesResponse, ReturnType<typeof complexTypesQueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await complexTypes({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: complexTypesQueryKey(options)\n});\n\nexport const callWithResultFromHeaderMutation = (options?: Partial<Options<CallWithResultFromHeaderData>>): UseMutationOptions<unknown, AxiosError<DefaultError>, Options<CallWithResultFromHeaderData>> => {\n    const mutationOptions: UseMutationOptions<unknown, AxiosError<DefaultError>, Options<CallWithResultFromHeaderData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await callWithResultFromHeader({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const testErrorCodeMutation = (options?: Partial<Options<TestErrorCodeData>>): UseMutationOptions<unknown, AxiosError<DefaultError>, Options<TestErrorCodeData>> => {\n    const mutationOptions: UseMutationOptions<unknown, AxiosError<DefaultError>, Options<TestErrorCodeData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await testErrorCode({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const nonAsciiæøåÆøÅöôêÊ字符串Mutation = (options?: Partial<Options<NonAsciiæøåÆøÅöôêÊ字符串Data>>): UseMutationOptions<NonAsciiæøåÆøÅöôêÊ字符串Response, AxiosError<DefaultError>, Options<NonAsciiæøåÆøÅöôêÊ字符串Data>> => {\n    const mutationOptions: UseMutationOptions<NonAsciiæøåÆøÅöôêÊ字符串Response, AxiosError<DefaultError>, Options<NonAsciiæøåÆøÅöôêÊ字符串Data>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await nonAsciiæøåÆøÅöôêÊ字符串({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\n/**\n * Body should not be unknown\n *\n * Body should not be unknown\n */\nexport const postApiVbyApiVersionBodyMutation = (options?: Partial<Options<PostApiVbyApiVersionBodyData>>): UseMutationOptions<PostApiVbyApiVersionBodyResponse, AxiosError<PostApiVbyApiVersionBodyError>, Options<PostApiVbyApiVersionBodyData>> => {\n    const mutationOptions: UseMutationOptions<PostApiVbyApiVersionBodyResponse, AxiosError<PostApiVbyApiVersionBodyError>, Options<PostApiVbyApiVersionBodyData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await postApiVbyApiVersionBody({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/react-query/axios/client/client.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { AxiosError, AxiosInstance, RawAxiosRequestHeaders } from 'axios';\nimport axios from 'axios';\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 } from './types.gen';\nimport { buildUrl, createConfig, mergeConfigs, mergeHeaders, setAuthParams } from './utils.gen';\n\nexport const createClient = (config: Config = {}): Client => {\n  let _config = mergeConfigs(createConfig(), config);\n\n  let instance: AxiosInstance;\n\n  if (_config.axios && !('Axios' in _config.axios)) {\n    instance = _config.axios;\n  } else {\n    // eslint-disable-next-line @typescript-eslint/no-unused-vars\n    const { auth, ...configWithoutAuth } = _config;\n    instance = axios.create(configWithoutAuth);\n  }\n\n  const getConfig = (): Config => ({ ..._config });\n\n  const setConfig = (config: Config): Config => {\n    _config = mergeConfigs(_config, config);\n    instance.defaults = {\n      ...instance.defaults,\n      ..._config,\n      // @ts-expect-error\n      headers: mergeHeaders(instance.defaults.headers, _config.headers),\n    };\n    return getConfig();\n  };\n\n  const beforeRequest = async (options: RequestOptions) => {\n    const opts = {\n      ..._config,\n      ...options,\n      axios: options.axios ?? _config.axios ?? instance,\n      headers: mergeHeaders(_config.headers, options.headers),\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.body = opts.bodySerializer(opts.body);\n    }\n\n    const url = buildUrl(opts);\n\n    return { opts, url };\n  };\n\n  // @ts-expect-error\n  const request: Client['request'] = async (options) => {\n    // @ts-expect-error\n    const { opts, url } = await beforeRequest(options);\n    try {\n      // assign Axios here for consistency with fetch\n      const _axios = opts.axios!;\n      // eslint-disable-next-line @typescript-eslint/no-unused-vars\n      const { auth, ...optsWithoutAuth } = opts;\n      const response = await _axios({\n        ...optsWithoutAuth,\n        baseURL: '', // the baseURL is already included in `url`\n        data: getValidRequestBody(opts),\n        headers: opts.headers as RawAxiosRequestHeaders,\n        // let `paramsSerializer()` handle query params if it exists\n        params: opts.paramsSerializer ? opts.query : undefined,\n        url,\n      });\n\n      let { data } = response;\n\n      if (opts.responseType === '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 {\n        ...response,\n        data: data ?? {},\n      };\n    } catch (error) {\n      const e = error as AxiosError;\n      if (opts.throwOnError) {\n        throw e;\n      }\n      // @ts-expect-error\n      e.error = e.response?.data ?? {};\n      return e;\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 Record<string, string>,\n      method,\n      serializedBody: getValidRequestBody(opts) as BodyInit | null | undefined,\n      // @ts-expect-error\n      signal: opts.signal,\n      url,\n    });\n  };\n\n  const _buildUrl: Client['buildUrl'] = (options) =>\n    buildUrl({ axios: instance, ..._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    instance,\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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/react-query/axios/client/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type { Auth } from '../core/auth.gen';\nexport type { QuerySerializerOptions } from '../core/bodySerializer.gen';\nexport {\n  formDataBodySerializer,\n  jsonBodySerializer,\n  urlSearchParamsBodySerializer,\n} from '../core/bodySerializer.gen';\nexport { buildClientParams } from '../core/params.gen';\nexport { serializeQueryKeyValue } from '../core/queryKeySerializer.gen';\nexport { createClient } from './client.gen';\nexport type {\n  Client,\n  ClientOptions,\n  Config,\n  CreateClientConfig,\n  Options,\n  RequestOptions,\n  RequestResult,\n  TDataShape,\n} from './types.gen';\nexport { createConfig } from './utils.gen';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/react-query/axios/client/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type {\n  AxiosError,\n  AxiosInstance,\n  AxiosRequestHeaders,\n  AxiosResponse,\n  AxiosStatic,\n  CreateAxiosDefaults,\n} from 'axios';\n\nimport type { Auth } from '../core/auth.gen';\nimport type {\n  ServerSentEventsOptions,\n  ServerSentEventsResult,\n} from '../core/serverSentEvents.gen';\nimport type { Client as CoreClient, Config as CoreConfig } from '../core/types.gen';\n\nexport interface Config<T extends ClientOptions = ClientOptions>\n  extends Omit<CreateAxiosDefaults, 'auth' | 'baseURL' | 'headers' | 'method'>, CoreConfig {\n  /**\n   * Axios implementation. You can use this option to provide either an\n   * `AxiosStatic` or an `AxiosInstance`.\n   *\n   * @default axios\n   */\n  axios?: AxiosStatic | AxiosInstance;\n  /**\n   * Base URL for all requests made by this client.\n   */\n  baseURL?: T['baseURL'];\n  /**\n   * An object containing any HTTP headers that you want to pre-populate your\n   * `Headers` object with.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/Headers/Headers#init See more}\n   */\n  headers?:\n    | AxiosRequestHeaders\n    | Record<\n        string,\n        string | number | boolean | (string | number | boolean)[] | null | undefined | unknown\n      >;\n  /**\n   * Throw an error instead of returning it in the response?\n   *\n   * @default false\n   */\n  throwOnError?: T['throwOnError'];\n}\n\nexport interface RequestOptions<\n  TData = unknown,\n  ThrowOnError extends boolean = boolean,\n  Url extends string = string,\n>\n  extends\n    Config<{\n      throwOnError: ThrowOnError;\n    }>,\n    Pick<\n      ServerSentEventsOptions<TData>,\n      | 'onRequest'\n      | 'onSseError'\n      | 'onSseEvent'\n      | 'sseDefaultRetryDelay'\n      | 'sseMaxRetryAttempts'\n      | 'sseMaxRetryDelay'\n    > {\n  /**\n   * Any body that you want to add to your request.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/fetch#body}\n   */\n  body?: unknown;\n  path?: Record<string, unknown>;\n  query?: Record<string, unknown>;\n  /**\n   * Security mechanism(s) to use for the request.\n   */\n  security?: ReadonlyArray<Auth>;\n  url: Url;\n}\n\nexport interface ClientOptions {\n  baseURL?: string;\n  throwOnError?: boolean;\n}\n\nexport type RequestResult<\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = boolean,\n> = ThrowOnError extends true\n  ? Promise<AxiosResponse<TData extends Record<string, unknown> ? TData[keyof TData] : TData>>\n  : Promise<\n      | (AxiosResponse<TData extends Record<string, unknown> ? TData[keyof TData] : TData> & {\n          error: undefined;\n        })\n      | (AxiosError<TError extends Record<string, unknown> ? TError[keyof TError] : TError> & {\n          data: undefined;\n          error: TError extends Record<string, unknown> ? TError[keyof TError] : TError;\n        })\n    >;\n\ntype MethodFn = <TData = unknown, TError = unknown, ThrowOnError extends boolean = false>(\n  options: Omit<RequestOptions<TData, ThrowOnError>, 'method'>,\n) => RequestResult<TData, TError, ThrowOnError>;\n\ntype SseFn = <TData = unknown, TError = unknown, ThrowOnError extends boolean = false>(\n  options: Omit<RequestOptions<TData, ThrowOnError>, 'method'>,\n) => Promise<ServerSentEventsResult<TData, TError>>;\n\ntype RequestFn = <TData = unknown, TError = unknown, ThrowOnError extends boolean = false>(\n  options: Omit<RequestOptions<TData, ThrowOnError>, 'method'> &\n    Pick<Required<RequestOptions<TData, ThrowOnError>>, 'method'>,\n) => RequestResult<TData, TError, ThrowOnError>;\n\ntype BuildUrlFn = <\n  TData extends {\n    body?: unknown;\n    path?: Record<string, unknown>;\n    query?: Record<string, unknown>;\n    url: string;\n  },\n>(\n  options: TData & Options<TData>,\n) => string;\n\nexport type Client = CoreClient<RequestFn, Config, MethodFn, BuildUrlFn, SseFn> & {\n  instance: AxiosInstance;\n};\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 = ClientOptions> = (\n  override?: Config<ClientOptions & T>,\n) => Config<Required<ClientOptions> & T>;\n\nexport interface TDataShape {\n  body?: unknown;\n  headers?: unknown;\n  path?: unknown;\n  query?: unknown;\n  url: string;\n}\n\ntype OmitKeys<T, K> = Pick<T, Exclude<keyof T, K>>;\n\nexport type Options<\n  TData extends TDataShape = TDataShape,\n  ThrowOnError extends boolean = boolean,\n  TResponse = unknown,\n> = OmitKeys<RequestOptions<TResponse, ThrowOnError>, 'body' | 'path' | 'query' | 'url'> &\n  ([TData] extends [never] ? unknown : Omit<TData, 'url'>);\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/react-query/axios/client/utils.gen.ts",
    "content": "// 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 {\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\nconst checkForExistence = (\n  options: Pick<RequestOptions, 'auth' | 'query'> & {\n    headers: Record<any, unknown>;\n  },\n  name?: string,\n): boolean => {\n  if (!name) {\n    return false;\n  }\n  if (name in options.headers || options.query?.[name]) {\n    return true;\n  }\n  if (\n    'Cookie' in options.headers &&\n    options.headers['Cookie'] &&\n    typeof options.headers['Cookie'] === 'string'\n  ) {\n    return options.headers['Cookie'].includes(`${name}=`);\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: Record<any, unknown>;\n  }) => {\n  for (const auth of security) {\n    if (checkForExistence(options, auth.name)) {\n      continue;\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        const value = `${name}=${token}`;\n        if ('Cookie' in options.headers && options.headers['Cookie']) {\n          options.headers['Cookie'] = `${options.headers['Cookie']}; ${value}`;\n        } else {\n          options.headers['Cookie'] = value;\n        }\n        break;\n      }\n      case 'header':\n      default:\n        options.headers[name] = token;\n        break;\n    }\n  }\n};\n\nexport const buildUrl: Client['buildUrl'] = (options) => {\n  const instanceBaseUrl = options.axios?.defaults?.baseURL;\n\n  const baseUrl =\n    !!options.baseURL && typeof options.baseURL === 'string' ? options.baseURL : instanceBaseUrl;\n\n  return getUrl({\n    baseUrl: baseUrl as string,\n    path: options.path,\n    // let `paramsSerializer()` handle query params if it exists\n    query: !options.paramsSerializer ? options.query : undefined,\n    querySerializer:\n      typeof options.querySerializer === 'function'\n        ? options.querySerializer\n        : createQuerySerializer(options.querySerializer),\n    url: options.url,\n  });\n};\n\nexport const mergeConfigs = (a: Config, b: Config): Config => {\n  const config = { ...a, ...b };\n  config.headers = mergeHeaders(a.headers, b.headers);\n  return config;\n};\n\n/**\n * Special Axios headers keywords allowing to set headers by request method.\n */\nexport const axiosHeadersKeywords = [\n  'common',\n  'delete',\n  'get',\n  'head',\n  'patch',\n  'post',\n  'put',\n] as const;\n\nexport const mergeHeaders = (\n  ...headers: Array<Required<Config>['headers'] | undefined>\n): Record<any, unknown> => {\n  const mergedHeaders: Record<any, unknown> = {};\n  for (const header of headers) {\n    if (!header || typeof header !== 'object') {\n      continue;\n    }\n\n    const iterator = Object.entries(header);\n\n    for (const [key, value] of iterator) {\n      if (\n        axiosHeadersKeywords.includes(key as (typeof axiosHeadersKeywords)[number]) &&\n        typeof value === 'object'\n      ) {\n        mergedHeaders[key] = {\n          ...(mergedHeaders[key] as Record<any, unknown>),\n          ...value,\n        };\n      } else if (value === null) {\n        delete mergedHeaders[key];\n      } else if (Array.isArray(value)) {\n        for (const v of value) {\n          // @ts-expect-error\n          mergedHeaders[key] = [...(mergedHeaders[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[key] = typeof value === 'object' ? JSON.stringify(value) : (value as string);\n      }\n    }\n  }\n  return mergedHeaders;\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  ...override,\n});\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/react-query/axios/client.gen.ts",
    "content": "// 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: 'http://localhost:3000/base' }));\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/react-query/axios/core/auth.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/react-query/axios/core/bodySerializer.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/react-query/axios/core/params.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/react-query/axios/core/pathSerializer.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/react-query/axios/core/queryKeySerializer.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\n/**\n * JSON-friendly union that mirrors what Pinia Colada can hash.\n */\nexport type JsonValue =\n  | null\n  | string\n  | number\n  | boolean\n  | JsonValue[]\n  | { [key: string]: JsonValue };\n\n/**\n * Replacer that converts non-JSON values (bigint, Date, etc.) to safe substitutes.\n */\nexport const queryKeyJsonReplacer = (_key: string, value: unknown) => {\n  if (value === undefined || typeof value === 'function' || typeof value === 'symbol') {\n    return undefined;\n  }\n  if (typeof value === 'bigint') {\n    return value.toString();\n  }\n  if (value instanceof Date) {\n    return value.toISOString();\n  }\n  return value;\n};\n\n/**\n * Safely stringifies a value and parses it back into a JsonValue.\n */\nexport const stringifyToJsonValue = (input: unknown): JsonValue | undefined => {\n  try {\n    const json = JSON.stringify(input, queryKeyJsonReplacer);\n    if (json === undefined) {\n      return undefined;\n    }\n    return JSON.parse(json) as JsonValue;\n  } catch {\n    return undefined;\n  }\n};\n\n/**\n * Detects plain objects (including objects with a null prototype).\n */\nconst isPlainObject = (value: unknown): value is Record<string, unknown> => {\n  if (value === null || typeof value !== 'object') {\n    return false;\n  }\n  const prototype = Object.getPrototypeOf(value as object);\n  return prototype === Object.prototype || prototype === null;\n};\n\n/**\n * Turns URLSearchParams into a sorted JSON object for deterministic keys.\n */\nconst serializeSearchParams = (params: URLSearchParams): JsonValue => {\n  const entries = Array.from(params.entries()).sort(([a], [b]) => a.localeCompare(b));\n  const result: Record<string, JsonValue> = {};\n\n  for (const [key, value] of entries) {\n    const existing = result[key];\n    if (existing === undefined) {\n      result[key] = value;\n      continue;\n    }\n\n    if (Array.isArray(existing)) {\n      (existing as string[]).push(value);\n    } else {\n      result[key] = [existing, value];\n    }\n  }\n\n  return result;\n};\n\n/**\n * Normalizes any accepted value into a JSON-friendly shape for query keys.\n */\nexport const serializeQueryKeyValue = (value: unknown): JsonValue | undefined => {\n  if (value === null) {\n    return null;\n  }\n\n  if (typeof value === 'string' || typeof value === 'number' || typeof value === 'boolean') {\n    return value;\n  }\n\n  if (value === undefined || typeof value === 'function' || typeof value === 'symbol') {\n    return undefined;\n  }\n\n  if (typeof value === 'bigint') {\n    return value.toString();\n  }\n\n  if (value instanceof Date) {\n    return value.toISOString();\n  }\n\n  if (Array.isArray(value)) {\n    return stringifyToJsonValue(value);\n  }\n\n  if (typeof URLSearchParams !== 'undefined' && value instanceof URLSearchParams) {\n    return serializeSearchParams(value);\n  }\n\n  if (isPlainObject(value)) {\n    return stringifyToJsonValue(value);\n  }\n\n  return undefined;\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/react-query/axios/core/serverSentEvents.gen.ts",
    "content": "// 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 const 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            // Normalize line endings: CRLF -> LF, then CR -> LF\n            buffer = buffer.replace(/\\r\\n/g, '\\n').replace(/\\r/g, '\\n');\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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/react-query/axios/core/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { Auth, AuthToken } from './auth.gen';\nimport type { BodySerializer, QuerySerializer, QuerySerializerOptions } from './bodySerializer.gen';\n\nexport type HttpMethod =\n  | 'connect'\n  | 'delete'\n  | 'get'\n  | 'head'\n  | 'options'\n  | 'patch'\n  | 'post'\n  | 'put'\n  | 'trace';\n\nexport type Client<\n  RequestFn = never,\n  Config = unknown,\n  MethodFn = never,\n  BuildUrlFn = never,\n  SseFn = never,\n> = {\n  /**\n   * Returns the final request URL.\n   */\n  buildUrl: BuildUrlFn;\n  getConfig: () => Config;\n  request: RequestFn;\n  setConfig: (config: Config) => Config;\n} & {\n  [K in HttpMethod]: MethodFn;\n} & ([SseFn] extends [never] ? { sse?: never } : { sse: { [K in HttpMethod]: SseFn } });\n\nexport interface Config {\n  /**\n   * Auth token or a function returning auth token. The resolved value will be\n   * added to the request payload as defined by its `security` array.\n   */\n  auth?: ((auth: Auth) => Promise<AuthToken> | AuthToken) | AuthToken;\n  /**\n   * A function for serializing request body parameter. By default,\n   * {@link JSON.stringify()} will be used.\n   */\n  bodySerializer?: BodySerializer | null;\n  /**\n   * An object containing any HTTP headers that you want to pre-populate your\n   * `Headers` object with.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/Headers/Headers#init See more}\n   */\n  headers?:\n    | RequestInit['headers']\n    | Record<\n        string,\n        string | number | boolean | (string | number | boolean)[] | null | undefined | unknown\n      >;\n  /**\n   * The request method.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/fetch#method See more}\n   */\n  method?: Uppercase<HttpMethod>;\n  /**\n   * A function for serializing request query parameters. By default, arrays\n   * will be exploded in form style, objects will be exploded in deepObject\n   * style, and reserved characters are percent-encoded.\n   *\n   * This method will have no effect if the native `paramsSerializer()` Axios\n   * API function is used.\n   *\n   * {@link https://swagger.io/docs/specification/serialization/#query View examples}\n   */\n  querySerializer?: QuerySerializer | QuerySerializerOptions;\n  /**\n   * A function validating request data. This is useful if you want to ensure\n   * the request conforms to the desired shape, so it can be safely sent to\n   * the server.\n   */\n  requestValidator?: (data: unknown) => Promise<unknown>;\n  /**\n   * A function transforming response data before it's returned. This is useful\n   * for post-processing data, e.g. converting ISO strings into Date objects.\n   */\n  responseTransformer?: (data: unknown) => Promise<unknown>;\n  /**\n   * A function validating response data. This is useful if you want to ensure\n   * the response conforms to the desired shape, so it can be safely passed to\n   * the transformers and returned to the user.\n   */\n  responseValidator?: (data: unknown) => Promise<unknown>;\n}\n\ntype IsExactlyNeverOrNeverUndefined<T> = [T] extends [never]\n  ? true\n  : [T] extends [never | undefined]\n    ? [undefined] extends [T]\n      ? false\n      : true\n    : false;\n\nexport type OmitNever<T extends Record<string, unknown>> = {\n  [K in keyof T as IsExactlyNeverOrNeverUndefined<T[K]> extends true ? never : K]: T[K];\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/react-query/axios/core/utils.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/react-query/axios/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport { callToTestOrderOfParams, callWithDefaultOptionalParameters, callWithDefaultParameters, callWithDescriptions, callWithDuplicateResponses, callWithNoContentResponse, callWithParameters, callWithResponse, callWithResponseAndNoContentResponse, callWithResponses, callWithResultFromHeader, callWithWeirdParameterNames, collectionFormat, complexTypes, deleteCallWithoutParametersAndResponse, dummyA, dummyB, duplicateName, duplicateName2, duplicateName3, duplicateName4, fooWow, getCallWithoutParametersAndResponse, headCallWithoutParametersAndResponse, nonAsciiæøåÆøÅöôêÊ字符串, type Options, optionsCallWithoutParametersAndResponse, patchApiVbyApiVersionNoTag, patchCallWithoutParametersAndResponse, postApiVbyApiVersionBody, postCallWithoutParametersAndResponse, putCallWithoutParametersAndResponse, serviceWithEmptyTag, testErrorCode, types } from './sdk.gen';\nexport type { ArrayWithArray, ArrayWithBooleans, ArrayWithNumbers, ArrayWithProperties, ArrayWithReferences, ArrayWithStrings, CallToTestOrderOfParamsData, CallWithDefaultOptionalParametersData, CallWithDefaultParametersData, CallWithDescriptionsData, CallWithDuplicateResponsesData, CallWithDuplicateResponsesError, CallWithDuplicateResponsesErrors, CallWithDuplicateResponsesResponse, CallWithDuplicateResponsesResponses, CallWithNoContentResponseData, CallWithNoContentResponseResponses, CallWithParametersData, CallWithResponseAndNoContentResponseData, CallWithResponseAndNoContentResponseResponse, CallWithResponseAndNoContentResponseResponses, CallWithResponseData, CallWithResponseResponse, CallWithResponseResponses, CallWithResponsesData, CallWithResponsesError, CallWithResponsesErrors, CallWithResponsesResponse, CallWithResponsesResponses, CallWithResultFromHeaderData, CallWithResultFromHeaderErrors, CallWithResultFromHeaderResponses, CallWithWeirdParameterNamesData, ClientOptions, CollectionFormatData, CommentWithBackticks, CommentWithBackticksAndQuotes, CommentWithBreaks, CommentWithExpressionPlaceholders, CommentWithQuotes, CommentWithReservedCharacters, CommentWithSlashes, ComplexTypesData, ComplexTypesErrors, ComplexTypesResponse, ComplexTypesResponses, Date, Default, DeleteCallWithoutParametersAndResponseData, DictionaryWithArray, DictionaryWithDictionary, DictionaryWithProperties, DictionaryWithReference, DictionaryWithString, DummyAData, DummyAResponses, DummyBData, DummyBResponses, DuplicateName2Data, DuplicateName3Data, DuplicateName4Data, DuplicateNameData, EnumFromDescription, EnumWithExtensions, EnumWithNumbers, EnumWithStrings, ExternalRefA, ExternalRefB, ExternalSharedModel, FailureFailure, FooWowData, FooWowResponses, GetCallWithoutParametersAndResponseData, HeadCallWithoutParametersAndResponseData, ModelThatExtends, ModelThatExtendsExtends, ModelWithArray, ModelWithBoolean, ModelWithCircularReference, ModelWithDictionary, ModelWithDuplicateImports, ModelWithDuplicateProperties, ModelWithEnum, ModelWithEnumFromDescription, ModelWithInteger, ModelWithNestedEnums, ModelWithNestedProperties, ModelWithNullableString, ModelWithOrderedProperties, ModelWithPattern, ModelWithPatternWritable, ModelWithProperties, ModelWithPropertiesWritable, ModelWithReference, ModelWithReferenceWritable, ModelWithString, ModelWithStringError, NonAsciiæøåÆøÅöôêÊ字符串Data, NonAsciiæøåÆøÅöôêÊ字符串Response, NonAsciiæøåÆøÅöôêÊ字符串Responses, NonAsciiStringæøåÆøÅöôêÊ字符串, OptionsCallWithoutParametersAndResponseData, ParameterActivityParams, PatchApiVbyApiVersionNoTagData, PatchApiVbyApiVersionNoTagResponses, PatchCallWithoutParametersAndResponseData, PostApiVbyApiVersionBodyData, PostApiVbyApiVersionBodyError, PostApiVbyApiVersionBodyErrors, PostApiVbyApiVersionBodyResponse, PostApiVbyApiVersionBodyResponses, PostCallWithoutParametersAndResponseData, PutCallWithoutParametersAndResponseData, ResponsePostActivityResponse, ServiceWithEmptyTagData, SimpleBoolean, SimpleFile, SimpleInteger, SimpleReference, SimpleString, SimpleStringWithPattern, TestErrorCodeData, TestErrorCodeErrors, TestErrorCodeResponses, TypesData, TypesResponse, TypesResponses } from './types.gen';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/react-query/axios/sdk.gen.ts",
    "content": "// 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 { CallToTestOrderOfParamsData, CallWithDefaultOptionalParametersData, CallWithDefaultParametersData, CallWithDescriptionsData, CallWithDuplicateResponsesData, CallWithDuplicateResponsesErrors, CallWithDuplicateResponsesResponses, CallWithNoContentResponseData, CallWithNoContentResponseResponses, CallWithParametersData, CallWithResponseAndNoContentResponseData, CallWithResponseAndNoContentResponseResponses, CallWithResponseData, CallWithResponseResponses, CallWithResponsesData, CallWithResponsesErrors, CallWithResponsesResponses, CallWithResultFromHeaderData, CallWithResultFromHeaderErrors, CallWithResultFromHeaderResponses, CallWithWeirdParameterNamesData, CollectionFormatData, ComplexTypesData, ComplexTypesErrors, ComplexTypesResponses, DeleteCallWithoutParametersAndResponseData, DummyAData, DummyAResponses, DummyBData, DummyBResponses, DuplicateName2Data, DuplicateName3Data, DuplicateName4Data, DuplicateNameData, FooWowData, FooWowResponses, GetCallWithoutParametersAndResponseData, HeadCallWithoutParametersAndResponseData, NonAsciiæøåÆøÅöôêÊ字符串Data, NonAsciiæøåÆøÅöôêÊ字符串Responses, OptionsCallWithoutParametersAndResponseData, PatchApiVbyApiVersionNoTagData, PatchApiVbyApiVersionNoTagResponses, PatchCallWithoutParametersAndResponseData, PostApiVbyApiVersionBodyData, PostApiVbyApiVersionBodyErrors, PostApiVbyApiVersionBodyResponses, PostCallWithoutParametersAndResponseData, PutCallWithoutParametersAndResponseData, ServiceWithEmptyTagData, TestErrorCodeData, TestErrorCodeErrors, TestErrorCodeResponses, TypesData, TypesResponses } from './types.gen';\n\nexport type Options<TData extends TDataShape = TDataShape, ThrowOnError extends boolean = boolean> = Options2<TData, ThrowOnError> & {\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\nexport const serviceWithEmptyTag = <ThrowOnError extends boolean = false>(options?: Options<ServiceWithEmptyTagData, ThrowOnError>) => (options?.client ?? client).get<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/no+tag', ...options });\n\nexport const patchApiVbyApiVersionNoTag = <ThrowOnError extends boolean = false>(options?: Options<PatchApiVbyApiVersionNoTagData, ThrowOnError>) => (options?.client ?? client).patch<PatchApiVbyApiVersionNoTagResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/no+tag', ...options });\n\nexport const fooWow = <ThrowOnError extends boolean = false>(options?: Options<FooWowData, ThrowOnError>) => (options?.client ?? client).put<FooWowResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/no+tag', ...options });\n\nexport const deleteCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<DeleteCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).delete<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const getCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<GetCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).get<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const headCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<HeadCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).head<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const optionsCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<OptionsCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).options<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const patchCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<PatchCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).patch<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const postCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<PostCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).post<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const putCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<PutCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).put<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const callWithDescriptions = <ThrowOnError extends boolean = false>(options?: Options<CallWithDescriptionsData, ThrowOnError>) => (options?.client ?? client).post<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/descriptions/', ...options });\n\nexport const callWithParameters = <ThrowOnError extends boolean = false>(options: Options<CallWithParametersData, ThrowOnError>) => (options.client ?? client).post<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/parameters/{parameterPath}', ...options });\n\nexport const callWithWeirdParameterNames = <ThrowOnError extends boolean = false>(options: Options<CallWithWeirdParameterNamesData, ThrowOnError>) => (options.client ?? client).post<unknown, unknown, ThrowOnError>({\n    url: '/api/v{api-version}/parameters/{parameter.path.1}/{parameter-path-2}/{PARAMETER-PATH-3}',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options.headers\n    }\n});\n\nexport const callWithDefaultParameters = <ThrowOnError extends boolean = false>(options: Options<CallWithDefaultParametersData, ThrowOnError>) => (options.client ?? client).get<unknown, unknown, ThrowOnError>({\n    querySerializer: { parameters: { parameterModel: { object: { explode: false, style: 'form' } } } },\n    url: '/api/v{api-version}/defaults',\n    ...options\n});\n\nexport const callWithDefaultOptionalParameters = <ThrowOnError extends boolean = false>(options?: Options<CallWithDefaultOptionalParametersData, ThrowOnError>) => (options?.client ?? client).post<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/defaults', ...options });\n\nexport const callToTestOrderOfParams = <ThrowOnError extends boolean = false>(options: Options<CallToTestOrderOfParamsData, ThrowOnError>) => (options.client ?? client).put<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/defaults', ...options });\n\nexport const duplicateName = <ThrowOnError extends boolean = false>(options?: Options<DuplicateNameData, ThrowOnError>) => (options?.client ?? client).delete<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/duplicate', ...options });\n\nexport const duplicateName2 = <ThrowOnError extends boolean = false>(options?: Options<DuplicateName2Data, ThrowOnError>) => (options?.client ?? client).get<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/duplicate', ...options });\n\nexport const duplicateName3 = <ThrowOnError extends boolean = false>(options?: Options<DuplicateName3Data, ThrowOnError>) => (options?.client ?? client).post<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/duplicate', ...options });\n\nexport const duplicateName4 = <ThrowOnError extends boolean = false>(options?: Options<DuplicateName4Data, ThrowOnError>) => (options?.client ?? client).put<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/duplicate', ...options });\n\nexport const callWithNoContentResponse = <ThrowOnError extends boolean = false>(options?: Options<CallWithNoContentResponseData, ThrowOnError>) => (options?.client ?? client).get<CallWithNoContentResponseResponses, unknown, ThrowOnError>({\n    responseType: 'json',\n    url: '/api/v{api-version}/no-content',\n    ...options\n});\n\nexport const callWithResponseAndNoContentResponse = <ThrowOnError extends boolean = false>(options?: Options<CallWithResponseAndNoContentResponseData, ThrowOnError>) => (options?.client ?? client).get<CallWithResponseAndNoContentResponseResponses, unknown, ThrowOnError>({\n    responseType: 'json',\n    url: '/api/v{api-version}/multiple-tags/response-and-no-content',\n    ...options\n});\n\nexport const dummyA = <ThrowOnError extends boolean = false>(options?: Options<DummyAData, ThrowOnError>) => (options?.client ?? client).get<DummyAResponses, unknown, ThrowOnError>({\n    responseType: 'json',\n    url: '/api/v{api-version}/multiple-tags/a',\n    ...options\n});\n\nexport const dummyB = <ThrowOnError extends boolean = false>(options?: Options<DummyBData, ThrowOnError>) => (options?.client ?? client).get<DummyBResponses, unknown, ThrowOnError>({\n    responseType: 'json',\n    url: '/api/v{api-version}/multiple-tags/b',\n    ...options\n});\n\nexport const callWithResponse = <ThrowOnError extends boolean = false>(options?: Options<CallWithResponseData, ThrowOnError>) => (options?.client ?? client).get<CallWithResponseResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/response', ...options });\n\nexport const callWithDuplicateResponses = <ThrowOnError extends boolean = false>(options?: Options<CallWithDuplicateResponsesData, ThrowOnError>) => (options?.client ?? client).post<CallWithDuplicateResponsesResponses, CallWithDuplicateResponsesErrors, ThrowOnError>({\n    responseType: 'json',\n    url: '/api/v{api-version}/response',\n    ...options\n});\n\nexport const callWithResponses = <ThrowOnError extends boolean = false>(options?: Options<CallWithResponsesData, ThrowOnError>) => (options?.client ?? client).put<CallWithResponsesResponses, CallWithResponsesErrors, ThrowOnError>({\n    responseType: 'json',\n    url: '/api/v{api-version}/response',\n    ...options\n});\n\nexport const collectionFormat = <ThrowOnError extends boolean = false>(options: Options<CollectionFormatData, ThrowOnError>) => (options.client ?? client).get<unknown, unknown, ThrowOnError>({\n    querySerializer: { parameters: {\n            parameterArrayCSV: { array: { explode: false } },\n            parameterArraySSV: { array: { explode: false } },\n            parameterArrayTSV: { array: { explode: false } },\n            parameterArrayPipes: { array: { explode: false } }\n        } },\n    url: '/api/v{api-version}/collectionFormat',\n    ...options\n});\n\nexport const types = <ThrowOnError extends boolean = false>(options: Options<TypesData, ThrowOnError>) => (options.client ?? client).get<TypesResponses, unknown, ThrowOnError>({\n    querySerializer: { parameters: { parameterArray: { array: { explode: false } }, parameterDictionary: { object: { explode: false, style: 'form' } } } },\n    responseType: 'json',\n    url: '/api/v{api-version}/types',\n    ...options\n});\n\nexport const complexTypes = <ThrowOnError extends boolean = false>(options: Options<ComplexTypesData, ThrowOnError>) => (options.client ?? client).get<ComplexTypesResponses, ComplexTypesErrors, ThrowOnError>({\n    querySerializer: { parameters: { parameterObject: { object: { explode: false, style: 'form' } }, parameterReference: { object: { explode: false, style: 'form' } } } },\n    responseType: 'json',\n    url: '/api/v{api-version}/complex',\n    ...options\n});\n\nexport const callWithResultFromHeader = <ThrowOnError extends boolean = false>(options?: Options<CallWithResultFromHeaderData, ThrowOnError>) => (options?.client ?? client).post<CallWithResultFromHeaderResponses, CallWithResultFromHeaderErrors, ThrowOnError>({\n    responseType: 'json',\n    url: '/api/v{api-version}/header',\n    ...options\n});\n\nexport const testErrorCode = <ThrowOnError extends boolean = false>(options: Options<TestErrorCodeData, ThrowOnError>) => (options.client ?? client).post<TestErrorCodeResponses, TestErrorCodeErrors, ThrowOnError>({\n    responseType: 'json',\n    url: '/api/v{api-version}/error',\n    ...options\n});\n\nexport const nonAsciiæøåÆøÅöôêÊ字符串 = <ThrowOnError extends boolean = false>(options: Options<NonAsciiæøåÆøÅöôêÊ字符串Data, ThrowOnError>) => (options.client ?? client).post<NonAsciiæøåÆøÅöôêÊ字符串Responses, unknown, ThrowOnError>({\n    responseType: 'json',\n    url: '/api/v{api-version}/non-ascii-æøåÆØÅöôêÊ字符串',\n    ...options\n});\n\n/**\n * Body should not be unknown\n *\n * Body should not be unknown\n */\nexport const postApiVbyApiVersionBody = <ThrowOnError extends boolean = false>(options: Options<PostApiVbyApiVersionBodyData, ThrowOnError>) => (options.client ?? client).post<PostApiVbyApiVersionBodyResponses, PostApiVbyApiVersionBodyErrors, ThrowOnError>({\n    responseType: 'json',\n    url: '/api/v{api-version}/body',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options.headers\n    }\n});\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/react-query/axios/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type ClientOptions = {\n    baseURL: 'http://localhost:3000/base' | (string & {});\n};\n\nexport type ExternalRefA = ExternalSharedModel;\n\nexport type ExternalRefB = ExternalSharedModel;\n\n/**\n * Testing multiline comments in string: First line\n * Second line\n *\n * Fourth line\n */\nexport type CommentWithBreaks = number;\n\n/**\n * Testing backticks in string: `backticks` and ```multiple backticks``` should work\n */\nexport type CommentWithBackticks = number;\n\n/**\n * Testing backticks and quotes in string: `backticks`, 'quotes', \"double quotes\" and ```multiple backticks``` should work\n */\nexport type CommentWithBackticksAndQuotes = number;\n\n/**\n * Testing slashes in string: \\backwards\\\\\\ and /forwards/// should work\n */\nexport type CommentWithSlashes = number;\n\n/**\n * Testing expression placeholders in string: ${expression} should work\n */\nexport type CommentWithExpressionPlaceholders = number;\n\n/**\n * Testing quotes in string: 'single quote''' and \"double quotes\"\"\" should work\n */\nexport type CommentWithQuotes = number;\n\n/**\n * Testing reserved characters in string: * inline * and ** inline ** should work\n */\nexport type CommentWithReservedCharacters = number;\n\n/**\n * This is a simple number\n */\nexport type SimpleInteger = number;\n\n/**\n * This is a simple boolean\n */\nexport type SimpleBoolean = boolean;\n\n/**\n * This is a simple string\n */\nexport type SimpleString = string;\n\n/**\n * A string with non-ascii (unicode) characters valid in typescript identifiers (æøåÆØÅöÔèÈ字符串)\n */\nexport type NonAsciiStringæøåÆøÅöôêÊ字符串 = string;\n\n/**\n * This is a simple file\n */\nexport type SimpleFile = Blob | File;\n\nexport type SimpleReference = ModelWithString;\n\n/**\n * This is a simple string\n */\nexport type SimpleStringWithPattern = string;\n\n/**\n * This is a simple enum with strings\n */\nexport type EnumWithStrings = 'Success' | 'Warning' | 'Error' | '\\'Single Quote\\'' | '\"Double Quotes\"' | 'Non-ascii: øæåôöØÆÅÔÖ字符串';\n\n/**\n * This is a simple enum with numbers\n */\nexport type EnumWithNumbers = 1 | 2 | 3 | 1.1 | 1.2 | 1.3 | 100 | 200 | 300 | -100 | -200 | -300 | -1.1 | -1.2 | -1.3;\n\n/**\n * Success=1,Warning=2,Error=3\n */\nexport type EnumFromDescription = number;\n\n/**\n * This is a simple enum with numbers\n */\nexport type EnumWithExtensions = 200 | 400 | 500;\n\n/**\n * This is a simple array with numbers\n */\nexport type ArrayWithNumbers = Array<number>;\n\n/**\n * This is a simple array with booleans\n */\nexport type ArrayWithBooleans = Array<boolean>;\n\n/**\n * This is a simple array with strings\n */\nexport type ArrayWithStrings = Array<string>;\n\n/**\n * This is a simple array with references\n */\nexport type ArrayWithReferences = Array<ModelWithString>;\n\n/**\n * This is a simple array containing an array\n */\nexport type ArrayWithArray = Array<Array<ModelWithString>>;\n\n/**\n * This is a simple array with properties\n */\nexport type ArrayWithProperties = Array<{\n    foo?: string;\n    bar?: string;\n}>;\n\n/**\n * This is a string dictionary\n */\nexport type DictionaryWithString = {\n    [key: string]: string;\n};\n\n/**\n * This is a string reference\n */\nexport type DictionaryWithReference = {\n    [key: string]: ModelWithString;\n};\n\n/**\n * This is a complex dictionary\n */\nexport type DictionaryWithArray = {\n    [key: string]: Array<ModelWithString>;\n};\n\n/**\n * This is a string dictionary\n */\nexport type DictionaryWithDictionary = {\n    [key: string]: {\n        [key: string]: string;\n    };\n};\n\n/**\n * This is a complex dictionary\n */\nexport type DictionaryWithProperties = {\n    [key: string]: {\n        foo?: string;\n        bar?: string;\n    };\n};\n\n/**\n * This is a type-only model that defines Date as a string\n */\nexport type Date = string;\n\n/**\n * This is a model with one number property\n */\nexport type ModelWithInteger = {\n    /**\n     * This is a simple number property\n     */\n    prop?: number;\n};\n\n/**\n * This is a model with one boolean property\n */\nexport type ModelWithBoolean = {\n    /**\n     * This is a simple boolean property\n     */\n    prop?: boolean;\n};\n\n/**\n * This is a model with one string property\n */\nexport type ModelWithString = {\n    /**\n     * This is a simple string property\n     */\n    prop?: string;\n};\n\n/**\n * This is a model with one string property\n */\nexport type ModelWithStringError = {\n    /**\n     * This is a simple string property\n     */\n    prop?: string;\n};\n\n/**\n * This is a model with one string property\n */\nexport type ModelWithNullableString = {\n    /**\n     * This is a simple string property\n     */\n    nullableProp?: string | null;\n    /**\n     * This is a simple string property\n     */\n    nullableRequiredProp: string | null;\n};\n\n/**\n * This is a model with one enum\n */\nexport type ModelWithEnum = {\n    /**\n     * This is a simple enum with strings\n     */\n    test?: 'Success' | 'Warning' | 'Error' | 'ØÆÅ字符串';\n    /**\n     * These are the HTTP error code enums\n     */\n    statusCode?: '100' | '200 FOO' | '300 FOO_BAR' | '400 foo-bar' | '500 foo.bar' | '600 foo&bar';\n    /**\n     * Simple boolean enum\n     */\n    bool?: true;\n};\n\n/**\n * This is a model with one enum\n */\nexport type ModelWithEnumFromDescription = {\n    /**\n     * Success=1,Warning=2,Error=3\n     */\n    test?: number;\n};\n\n/**\n * This is a model with nested enums\n */\nexport type ModelWithNestedEnums = {\n    dictionaryWithEnum?: {\n        [key: string]: 'Success' | 'Warning' | 'Error';\n    };\n    dictionaryWithEnumFromDescription?: {\n        [key: string]: number;\n    };\n    arrayWithEnum?: Array<'Success' | 'Warning' | 'Error'>;\n    arrayWithDescription?: Array<number>;\n};\n\n/**\n * This is a model with one property containing a reference\n */\nexport type ModelWithReference = {\n    prop?: ModelWithProperties;\n};\n\n/**\n * This is a model with one property containing an array\n */\nexport type ModelWithArray = {\n    prop?: Array<ModelWithString>;\n    propWithFile?: Array<Blob | File>;\n    propWithNumber?: Array<number>;\n};\n\n/**\n * This is a model with one property containing a dictionary\n */\nexport type ModelWithDictionary = {\n    prop?: {\n        [key: string]: string;\n    };\n};\n\n/**\n * This is a model with one property containing a circular reference\n */\nexport type ModelWithCircularReference = {\n    prop?: ModelWithCircularReference;\n};\n\n/**\n * This is a model with one nested property\n */\nexport type ModelWithProperties = {\n    required: string;\n    readonly requiredAndReadOnly: string;\n    string?: string;\n    number?: number;\n    boolean?: boolean;\n    reference?: ModelWithString;\n    'property with space'?: string;\n    default?: string;\n    try?: string;\n    readonly '@namespace.string'?: string;\n    readonly '@namespace.integer'?: number;\n};\n\n/**\n * This is a model with one nested property\n */\nexport type ModelWithNestedProperties = {\n    readonly first: {\n        readonly second: {\n            readonly third: string;\n        };\n    };\n};\n\n/**\n * This is a model with duplicated properties\n */\nexport type ModelWithDuplicateProperties = {\n    prop?: ModelWithString;\n};\n\n/**\n * This is a model with ordered properties\n */\nexport type ModelWithOrderedProperties = {\n    zebra?: string;\n    apple?: string;\n    hawaii?: string;\n};\n\n/**\n * This is a model with duplicated imports\n */\nexport type ModelWithDuplicateImports = {\n    propA?: ModelWithString;\n    propB?: ModelWithString;\n    propC?: ModelWithString;\n};\n\n/**\n * This is a model that extends another model\n */\nexport type ModelThatExtends = ModelWithString & {\n    propExtendsA?: string;\n    propExtendsB?: ModelWithString;\n};\n\n/**\n * This is a model that extends another model\n */\nexport type ModelThatExtendsExtends = ModelWithString & ModelThatExtends & {\n    propExtendsC?: string;\n    propExtendsD?: ModelWithString;\n};\n\nexport type Default = {\n    name?: string;\n};\n\n/**\n * This is a model that contains a some patterns\n */\nexport type ModelWithPattern = {\n    key: string;\n    name: string;\n    readonly enabled?: boolean;\n    readonly modified?: string;\n    id?: string;\n    text?: string;\n    patternWithSingleQuotes?: string;\n    patternWithNewline?: string;\n    patternWithBacktick?: string;\n    patternWithUnicode?: string;\n};\n\nexport type ParameterActivityParams = {\n    description?: string;\n    graduate_id?: number;\n    organization_id?: number;\n    parent_activity?: number;\n    post_id?: number;\n};\n\nexport type ResponsePostActivityResponse = {\n    description?: string;\n    graduate_id?: number;\n    organization_id?: number;\n    parent_activity_id?: number;\n    post_id?: number;\n};\n\nexport type FailureFailure = {\n    error?: string;\n    message?: string;\n    reference_code?: string;\n};\n\nexport type ExternalSharedModel = {\n    id: string;\n    name?: string;\n};\n\n/**\n * This is a model with one property containing a reference\n */\nexport type ModelWithReferenceWritable = {\n    prop?: ModelWithPropertiesWritable;\n};\n\n/**\n * This is a model with one nested property\n */\nexport type ModelWithPropertiesWritable = {\n    required: string;\n    string?: string;\n    number?: number;\n    boolean?: boolean;\n    reference?: ModelWithString;\n    'property with space'?: string;\n    default?: string;\n    try?: string;\n};\n\n/**\n * This is a model that contains a some patterns\n */\nexport type ModelWithPatternWritable = {\n    key: string;\n    name: string;\n    id?: string;\n    text?: string;\n    patternWithSingleQuotes?: string;\n    patternWithNewline?: string;\n    patternWithBacktick?: string;\n    patternWithUnicode?: string;\n};\n\nexport type ServiceWithEmptyTagData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no+tag';\n};\n\nexport type PatchApiVbyApiVersionNoTagData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no+tag';\n};\n\nexport type PatchApiVbyApiVersionNoTagResponses = {\n    /**\n     * OK\n     */\n    default: unknown;\n};\n\nexport type FooWowData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no+tag';\n};\n\nexport type FooWowResponses = {\n    /**\n     * OK\n     */\n    default: unknown;\n};\n\nexport type DeleteCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type GetCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type HeadCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type OptionsCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type PatchCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type PostCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type PutCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type CallWithDescriptionsData = {\n    body?: never;\n    path?: never;\n    query?: {\n        /**\n         * Testing multiline comments in string: First line\n         * Second line\n         *\n         * Fourth line\n         */\n        parameterWithBreaks?: string;\n        /**\n         * Testing backticks in string: `backticks` and ```multiple backticks``` should work\n         */\n        parameterWithBackticks?: string;\n        /**\n         * Testing slashes in string: \\backwards\\\\\\ and /forwards/// should work\n         */\n        parameterWithSlashes?: string;\n        /**\n         * Testing expression placeholders in string: ${expression} should work\n         */\n        parameterWithExpressionPlaceholders?: string;\n        /**\n         * Testing quotes in string: 'single quote''' and \"double quotes\"\"\" should work\n         */\n        parameterWithQuotes?: string;\n        /**\n         * Testing reserved characters in string: * inline * and ** inline ** should work\n         */\n        parameterWithReservedCharacters?: string;\n    };\n    url: '/api/v{api-version}/descriptions/';\n};\n\nexport type CallWithParametersData = {\n    body?: never;\n    headers: {\n        /**\n         * This is the parameter that goes into the header\n         */\n        parameterHeader: string;\n    };\n    path: {\n        /**\n         * This is the parameter that goes into the path\n         */\n        parameterPath: string;\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string;\n    };\n    query: {\n        /**\n         * This is the parameter that goes into the query params\n         */\n        parameterQuery: string;\n    };\n    url: '/api/v{api-version}/parameters/{parameterPath}';\n};\n\nexport type CallWithWeirdParameterNamesData = {\n    /**\n     * This is the parameter that is sent as request body\n     */\n    body: string;\n    headers: {\n        /**\n         * This is the parameter that goes into the request header\n         */\n        'parameter.header': string;\n    };\n    path: {\n        /**\n         * This is the parameter that goes into the path\n         */\n        'parameter.path.1'?: string;\n        /**\n         * This is the parameter that goes into the path\n         */\n        'parameter-path-2'?: string;\n        /**\n         * This is the parameter that goes into the path\n         */\n        'PARAMETER-PATH-3'?: string;\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string;\n    };\n    query: {\n        /**\n         * This is the parameter with a reserved keyword\n         */\n        default?: string;\n        /**\n         * This is the parameter that goes into the request query params\n         */\n        'parameter-query': string;\n    };\n    url: '/api/v{api-version}/parameters/{parameter.path.1}/{parameter-path-2}/{PARAMETER-PATH-3}';\n};\n\nexport type CallWithDefaultParametersData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * This is a simple string with default value\n         */\n        parameterString: string;\n        /**\n         * This is a simple number with default value\n         */\n        parameterNumber: number;\n        /**\n         * This is a simple boolean with default value\n         */\n        parameterBoolean: boolean;\n        /**\n         * This is a simple enum with default value\n         */\n        parameterEnum: 'Success' | 'Warning' | 'Error';\n        /**\n         * This is a model with one string property\n         */\n        parameterModel: {\n            /**\n             * This is a simple string property\n             */\n            prop?: string;\n        };\n    };\n    url: '/api/v{api-version}/defaults';\n};\n\nexport type CallWithDefaultOptionalParametersData = {\n    body?: never;\n    path?: never;\n    query?: {\n        /**\n         * This is a simple string that is optional with default value\n         */\n        parameterString?: string;\n        /**\n         * This is a simple number that is optional with default value\n         */\n        parameterNumber?: number;\n        /**\n         * This is a simple boolean that is optional with default value\n         */\n        parameterBoolean?: boolean;\n        /**\n         * This is a simple enum that is optional with default value\n         */\n        parameterEnum?: 'Success' | 'Warning' | 'Error';\n    };\n    url: '/api/v{api-version}/defaults';\n};\n\nexport type CallToTestOrderOfParamsData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * This is a optional string with default\n         */\n        parameterOptionalStringWithDefault?: string;\n        /**\n         * This is a optional string with empty default\n         */\n        parameterOptionalStringWithEmptyDefault?: string;\n        /**\n         * This is a optional string with no default\n         */\n        parameterOptionalStringWithNoDefault?: string;\n        /**\n         * This is a string with default\n         */\n        parameterStringWithDefault: string;\n        /**\n         * This is a string with empty default\n         */\n        parameterStringWithEmptyDefault: string;\n        /**\n         * This is a string with no default\n         */\n        parameterStringWithNoDefault: string;\n        /**\n         * This is a string that can be null with no default\n         */\n        parameterStringNullableWithNoDefault?: string | null;\n        /**\n         * This is a string that can be null with default\n         */\n        parameterStringNullableWithDefault?: string | null;\n    };\n    url: '/api/v{api-version}/defaults';\n};\n\nexport type DuplicateNameData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/duplicate';\n};\n\nexport type DuplicateName2Data = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/duplicate';\n};\n\nexport type DuplicateName3Data = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/duplicate';\n};\n\nexport type DuplicateName4Data = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/duplicate';\n};\n\nexport type CallWithNoContentResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no-content';\n};\n\nexport type CallWithNoContentResponseResponses = {\n    /**\n     * Success\n     */\n    204: unknown;\n};\n\nexport type CallWithResponseAndNoContentResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multiple-tags/response-and-no-content';\n};\n\nexport type CallWithResponseAndNoContentResponseResponses = {\n    /**\n     * Response is a simple number\n     */\n    200: number;\n    /**\n     * Success\n     */\n    204: unknown;\n};\n\nexport type CallWithResponseAndNoContentResponseResponse = CallWithResponseAndNoContentResponseResponses[keyof CallWithResponseAndNoContentResponseResponses];\n\nexport type DummyAData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multiple-tags/a';\n};\n\nexport type DummyAResponses = {\n    /**\n     * Success\n     */\n    204: unknown;\n};\n\nexport type DummyBData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multiple-tags/b';\n};\n\nexport type DummyBResponses = {\n    /**\n     * Success\n     */\n    204: unknown;\n};\n\nexport type CallWithResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/response';\n};\n\nexport type CallWithResponseResponses = {\n    /**\n     * Message for default response\n     */\n    default: ModelWithString;\n};\n\nexport type CallWithResponseResponse = CallWithResponseResponses[keyof CallWithResponseResponses];\n\nexport type CallWithDuplicateResponsesData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/response';\n};\n\nexport type CallWithDuplicateResponsesErrors = {\n    /**\n     * Message for 500 error\n     */\n    500: ModelWithStringError;\n    /**\n     * Message for 501 error\n     */\n    501: ModelWithStringError;\n    /**\n     * Message for 502 error\n     */\n    502: ModelWithStringError;\n    /**\n     * Message for default response\n     */\n    default: ModelWithString;\n};\n\nexport type CallWithDuplicateResponsesError = CallWithDuplicateResponsesErrors[keyof CallWithDuplicateResponsesErrors];\n\nexport type CallWithDuplicateResponsesResponses = {\n    /**\n     * Message for 201 response\n     */\n    201: ModelWithString;\n    /**\n     * Message for 202 response\n     */\n    202: ModelWithString;\n};\n\nexport type CallWithDuplicateResponsesResponse = CallWithDuplicateResponsesResponses[keyof CallWithDuplicateResponsesResponses];\n\nexport type CallWithResponsesData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/response';\n};\n\nexport type CallWithResponsesErrors = {\n    /**\n     * Message for 500 error\n     */\n    500: ModelWithStringError;\n    /**\n     * Message for 501 error\n     */\n    501: ModelWithStringError;\n    /**\n     * Message for 502 error\n     */\n    502: ModelWithStringError;\n    /**\n     * Message for default response\n     */\n    default: ModelWithString;\n};\n\nexport type CallWithResponsesError = CallWithResponsesErrors[keyof CallWithResponsesErrors];\n\nexport type CallWithResponsesResponses = {\n    /**\n     * Message for 200 response\n     */\n    200: {\n        readonly '@namespace.string'?: string;\n        readonly '@namespace.integer'?: number;\n        readonly value?: Array<ModelWithString>;\n    };\n    /**\n     * Message for 201 response\n     */\n    201: ModelThatExtends;\n    /**\n     * Message for 202 response\n     */\n    202: ModelThatExtendsExtends;\n};\n\nexport type CallWithResponsesResponse = CallWithResponsesResponses[keyof CallWithResponsesResponses];\n\nexport type CollectionFormatData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * This is an array parameter that is sent as csv format (comma-separated values)\n         */\n        parameterArrayCSV: Array<string>;\n        /**\n         * This is an array parameter that is sent as ssv format (space-separated values)\n         */\n        parameterArraySSV: Array<string>;\n        /**\n         * This is an array parameter that is sent as tsv format (tab-separated values)\n         */\n        parameterArrayTSV: Array<string>;\n        /**\n         * This is an array parameter that is sent as pipes format (pipe-separated values)\n         */\n        parameterArrayPipes: Array<string>;\n        /**\n         * This is an array parameter that is sent as multi format (multiple parameter instances)\n         */\n        parameterArrayMulti: Array<string>;\n    };\n    url: '/api/v{api-version}/collectionFormat';\n};\n\nexport type TypesData = {\n    body?: never;\n    path?: {\n        /**\n         * This is a number parameter\n         */\n        id?: number;\n    };\n    query: {\n        /**\n         * This is a number parameter\n         */\n        parameterNumber: number;\n        /**\n         * This is a string parameter\n         */\n        parameterString: string;\n        /**\n         * This is a boolean parameter\n         */\n        parameterBoolean: boolean;\n        /**\n         * This is an array parameter\n         */\n        parameterArray: Array<string>;\n        /**\n         * This is a dictionary parameter\n         */\n        parameterDictionary: {\n            [key: string]: unknown;\n        };\n        /**\n         * This is an enum parameter\n         */\n        parameterEnum: 'Success' | 'Warning' | 'Error';\n    };\n    url: '/api/v{api-version}/types';\n};\n\nexport type TypesResponses = {\n    /**\n     * Response is a simple number\n     */\n    200: number;\n    /**\n     * Response is a simple string\n     */\n    201: string;\n    /**\n     * Response is a simple boolean\n     */\n    202: boolean;\n    /**\n     * Response is a simple object\n     */\n    203: {\n        [key: string]: unknown;\n    };\n};\n\nexport type TypesResponse = TypesResponses[keyof TypesResponses];\n\nexport type ComplexTypesData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * Parameter containing object\n         */\n        parameterObject: {\n            first?: {\n                second?: {\n                    third?: string;\n                };\n            };\n        };\n        /**\n         * This is a model with one string property\n         */\n        parameterReference: {\n            /**\n             * This is a simple string property\n             */\n            prop?: string;\n        };\n    };\n    url: '/api/v{api-version}/complex';\n};\n\nexport type ComplexTypesErrors = {\n    /**\n     * 400 server error\n     */\n    400: unknown;\n    /**\n     * 500 server error\n     */\n    500: unknown;\n};\n\nexport type ComplexTypesResponses = {\n    /**\n     * Successful response\n     */\n    200: Array<ModelWithString>;\n};\n\nexport type ComplexTypesResponse = ComplexTypesResponses[keyof ComplexTypesResponses];\n\nexport type CallWithResultFromHeaderData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/header';\n};\n\nexport type CallWithResultFromHeaderErrors = {\n    /**\n     * 400 server error\n     */\n    400: unknown;\n    /**\n     * 500 server error\n     */\n    500: unknown;\n};\n\nexport type CallWithResultFromHeaderResponses = {\n    /**\n     * Successful response\n     */\n    200: unknown;\n};\n\nexport type TestErrorCodeData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * Status code to return\n         */\n        status: string;\n    };\n    url: '/api/v{api-version}/error';\n};\n\nexport type TestErrorCodeErrors = {\n    /**\n     * Custom message: Internal Server Error\n     */\n    500: unknown;\n    /**\n     * Custom message: Not Implemented\n     */\n    501: unknown;\n    /**\n     * Custom message: Bad Gateway\n     */\n    502: unknown;\n    /**\n     * Custom message: Service Unavailable\n     */\n    503: unknown;\n};\n\nexport type TestErrorCodeResponses = {\n    /**\n     * Custom message: Successful response\n     */\n    200: unknown;\n};\n\nexport type NonAsciiæøåÆøÅöôêÊ字符串Data = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * Dummy input param\n         */\n        nonAsciiParamæøåÆØÅöôêÊ: number;\n    };\n    url: '/api/v{api-version}/non-ascii-æøåÆØÅöôêÊ字符串';\n};\n\nexport type NonAsciiæøåÆøÅöôêÊ字符串Responses = {\n    /**\n     * Successful response\n     */\n    200: NonAsciiStringæøåÆøÅöôêÊ字符串;\n};\n\nexport type NonAsciiæøåÆøÅöôêÊ字符串Response = NonAsciiæøåÆøÅöôêÊ字符串Responses[keyof NonAsciiæøåÆøÅöôêÊ字符串Responses];\n\nexport type PostApiVbyApiVersionBodyData = {\n    /**\n     * Body should not be unknown\n     */\n    body: ParameterActivityParams;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/body';\n};\n\nexport type PostApiVbyApiVersionBodyErrors = {\n    /**\n     * Bad Request\n     */\n    400: FailureFailure;\n    /**\n     * Internal Server Error\n     */\n    500: FailureFailure;\n};\n\nexport type PostApiVbyApiVersionBodyError = PostApiVbyApiVersionBodyErrors[keyof PostApiVbyApiVersionBodyErrors];\n\nexport type PostApiVbyApiVersionBodyResponses = {\n    /**\n     * OK\n     */\n    200: ResponsePostActivityResponse;\n};\n\nexport type PostApiVbyApiVersionBodyResponse = PostApiVbyApiVersionBodyResponses[keyof PostApiVbyApiVersionBodyResponses];\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/react-query/fetch/@tanstack/react-query.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport { type DefaultError, queryOptions, type UseMutationOptions } from '@tanstack/react-query';\n\nimport { client } from '../client.gen';\nimport { callToTestOrderOfParams, callWithDefaultOptionalParameters, callWithDefaultParameters, callWithDescriptions, callWithDuplicateResponses, callWithNoContentResponse, callWithParameters, callWithResponse, callWithResponseAndNoContentResponse, callWithResponses, callWithResultFromHeader, callWithWeirdParameterNames, collectionFormat, complexTypes, deleteCallWithoutParametersAndResponse, dummyA, dummyB, duplicateName, duplicateName2, duplicateName3, duplicateName4, fooWow, getCallWithoutParametersAndResponse, nonAsciiæøåÆøÅöôêÊ字符串, type Options, patchApiVbyApiVersionNoTag, patchCallWithoutParametersAndResponse, postApiVbyApiVersionBody, postCallWithoutParametersAndResponse, putCallWithoutParametersAndResponse, serviceWithEmptyTag, testErrorCode, types } from '../sdk.gen';\nimport type { CallToTestOrderOfParamsData, CallWithDefaultOptionalParametersData, CallWithDefaultParametersData, CallWithDescriptionsData, CallWithDuplicateResponsesData, CallWithDuplicateResponsesError, CallWithDuplicateResponsesResponse, CallWithNoContentResponseData, CallWithParametersData, CallWithResponseAndNoContentResponseData, CallWithResponseAndNoContentResponseResponse, CallWithResponseData, CallWithResponseResponse, CallWithResponsesData, CallWithResponsesError, CallWithResponsesResponse, CallWithResultFromHeaderData, CallWithWeirdParameterNamesData, CollectionFormatData, ComplexTypesData, ComplexTypesResponse, DeleteCallWithoutParametersAndResponseData, DummyAData, DummyBData, DuplicateName2Data, DuplicateName3Data, DuplicateName4Data, DuplicateNameData, FooWowData, GetCallWithoutParametersAndResponseData, NonAsciiæøåÆøÅöôêÊ字符串Data, NonAsciiæøåÆøÅöôêÊ字符串Response, PatchApiVbyApiVersionNoTagData, PatchCallWithoutParametersAndResponseData, PostApiVbyApiVersionBodyData, PostApiVbyApiVersionBodyError, PostApiVbyApiVersionBodyResponse, PostCallWithoutParametersAndResponseData, PutCallWithoutParametersAndResponseData, ServiceWithEmptyTagData, TestErrorCodeData, TypesData, TypesResponse } from '../types.gen';\n\nexport type QueryKey<TOptions extends Options> = [\n    Pick<TOptions, 'baseUrl' | 'body' | 'headers' | 'path' | 'query'> & {\n        _id: string;\n        _infinite?: boolean;\n        tags?: ReadonlyArray<string>;\n    }\n];\n\nconst createQueryKey = <TOptions extends Options>(id: string, options?: TOptions, infinite?: boolean, tags?: ReadonlyArray<string>): [\n    QueryKey<TOptions>[0]\n] => {\n    const params: QueryKey<TOptions>[0] = { _id: id, baseUrl: options?.baseUrl || (options?.client ?? client).getConfig().baseUrl } as QueryKey<TOptions>[0];\n    if (infinite) {\n        params._infinite = infinite;\n    }\n    if (tags) {\n        params.tags = tags;\n    }\n    if (options?.body) {\n        params.body = options.body;\n    }\n    if (options?.headers) {\n        params.headers = options.headers;\n    }\n    if (options?.path) {\n        params.path = options.path;\n    }\n    if (options?.query) {\n        params.query = options.query;\n    }\n    return [params];\n};\n\nexport const serviceWithEmptyTagQueryKey = (options?: Options<ServiceWithEmptyTagData>) => createQueryKey('serviceWithEmptyTag', options);\n\nexport const serviceWithEmptyTagOptions = (options?: Options<ServiceWithEmptyTagData>) => queryOptions<unknown, DefaultError, unknown, ReturnType<typeof serviceWithEmptyTagQueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await serviceWithEmptyTag({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: serviceWithEmptyTagQueryKey(options)\n});\n\nexport const patchApiVbyApiVersionNoTagMutation = (options?: Partial<Options<PatchApiVbyApiVersionNoTagData>>): UseMutationOptions<unknown, DefaultError, Options<PatchApiVbyApiVersionNoTagData>> => {\n    const mutationOptions: UseMutationOptions<unknown, DefaultError, Options<PatchApiVbyApiVersionNoTagData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await patchApiVbyApiVersionNoTag({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const fooWowMutation = (options?: Partial<Options<FooWowData>>): UseMutationOptions<unknown, DefaultError, Options<FooWowData>> => {\n    const mutationOptions: UseMutationOptions<unknown, DefaultError, Options<FooWowData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await fooWow({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const deleteCallWithoutParametersAndResponseMutation = (options?: Partial<Options<DeleteCallWithoutParametersAndResponseData>>): UseMutationOptions<unknown, DefaultError, Options<DeleteCallWithoutParametersAndResponseData>> => {\n    const mutationOptions: UseMutationOptions<unknown, DefaultError, Options<DeleteCallWithoutParametersAndResponseData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await deleteCallWithoutParametersAndResponse({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const getCallWithoutParametersAndResponseQueryKey = (options?: Options<GetCallWithoutParametersAndResponseData>) => createQueryKey('getCallWithoutParametersAndResponse', options);\n\nexport const getCallWithoutParametersAndResponseOptions = (options?: Options<GetCallWithoutParametersAndResponseData>) => queryOptions<unknown, DefaultError, unknown, ReturnType<typeof getCallWithoutParametersAndResponseQueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await getCallWithoutParametersAndResponse({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: getCallWithoutParametersAndResponseQueryKey(options)\n});\n\nexport const patchCallWithoutParametersAndResponseMutation = (options?: Partial<Options<PatchCallWithoutParametersAndResponseData>>): UseMutationOptions<unknown, DefaultError, Options<PatchCallWithoutParametersAndResponseData>> => {\n    const mutationOptions: UseMutationOptions<unknown, DefaultError, Options<PatchCallWithoutParametersAndResponseData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await patchCallWithoutParametersAndResponse({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const postCallWithoutParametersAndResponseMutation = (options?: Partial<Options<PostCallWithoutParametersAndResponseData>>): UseMutationOptions<unknown, DefaultError, Options<PostCallWithoutParametersAndResponseData>> => {\n    const mutationOptions: UseMutationOptions<unknown, DefaultError, Options<PostCallWithoutParametersAndResponseData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await postCallWithoutParametersAndResponse({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const putCallWithoutParametersAndResponseMutation = (options?: Partial<Options<PutCallWithoutParametersAndResponseData>>): UseMutationOptions<unknown, DefaultError, Options<PutCallWithoutParametersAndResponseData>> => {\n    const mutationOptions: UseMutationOptions<unknown, DefaultError, Options<PutCallWithoutParametersAndResponseData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await putCallWithoutParametersAndResponse({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const callWithDescriptionsMutation = (options?: Partial<Options<CallWithDescriptionsData>>): UseMutationOptions<unknown, DefaultError, Options<CallWithDescriptionsData>> => {\n    const mutationOptions: UseMutationOptions<unknown, DefaultError, Options<CallWithDescriptionsData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await callWithDescriptions({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const callWithParametersMutation = (options?: Partial<Options<CallWithParametersData>>): UseMutationOptions<unknown, DefaultError, Options<CallWithParametersData>> => {\n    const mutationOptions: UseMutationOptions<unknown, DefaultError, Options<CallWithParametersData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await callWithParameters({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const callWithWeirdParameterNamesMutation = (options?: Partial<Options<CallWithWeirdParameterNamesData>>): UseMutationOptions<unknown, DefaultError, Options<CallWithWeirdParameterNamesData>> => {\n    const mutationOptions: UseMutationOptions<unknown, DefaultError, Options<CallWithWeirdParameterNamesData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await callWithWeirdParameterNames({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const callWithDefaultParametersQueryKey = (options: Options<CallWithDefaultParametersData>) => createQueryKey('callWithDefaultParameters', options);\n\nexport const callWithDefaultParametersOptions = (options: Options<CallWithDefaultParametersData>) => queryOptions<unknown, DefaultError, unknown, ReturnType<typeof callWithDefaultParametersQueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await callWithDefaultParameters({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: callWithDefaultParametersQueryKey(options)\n});\n\nexport const callWithDefaultOptionalParametersMutation = (options?: Partial<Options<CallWithDefaultOptionalParametersData>>): UseMutationOptions<unknown, DefaultError, Options<CallWithDefaultOptionalParametersData>> => {\n    const mutationOptions: UseMutationOptions<unknown, DefaultError, Options<CallWithDefaultOptionalParametersData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await callWithDefaultOptionalParameters({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const callToTestOrderOfParamsMutation = (options?: Partial<Options<CallToTestOrderOfParamsData>>): UseMutationOptions<unknown, DefaultError, Options<CallToTestOrderOfParamsData>> => {\n    const mutationOptions: UseMutationOptions<unknown, DefaultError, Options<CallToTestOrderOfParamsData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await callToTestOrderOfParams({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const duplicateNameMutation = (options?: Partial<Options<DuplicateNameData>>): UseMutationOptions<unknown, DefaultError, Options<DuplicateNameData>> => {\n    const mutationOptions: UseMutationOptions<unknown, DefaultError, Options<DuplicateNameData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await duplicateName({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const duplicateName2QueryKey = (options?: Options<DuplicateName2Data>) => createQueryKey('duplicateName2', options);\n\nexport const duplicateName2Options = (options?: Options<DuplicateName2Data>) => queryOptions<unknown, DefaultError, unknown, ReturnType<typeof duplicateName2QueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await duplicateName2({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: duplicateName2QueryKey(options)\n});\n\nexport const duplicateName3Mutation = (options?: Partial<Options<DuplicateName3Data>>): UseMutationOptions<unknown, DefaultError, Options<DuplicateName3Data>> => {\n    const mutationOptions: UseMutationOptions<unknown, DefaultError, Options<DuplicateName3Data>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await duplicateName3({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const duplicateName4Mutation = (options?: Partial<Options<DuplicateName4Data>>): UseMutationOptions<unknown, DefaultError, Options<DuplicateName4Data>> => {\n    const mutationOptions: UseMutationOptions<unknown, DefaultError, Options<DuplicateName4Data>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await duplicateName4({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const callWithNoContentResponseQueryKey = (options?: Options<CallWithNoContentResponseData>) => createQueryKey('callWithNoContentResponse', options);\n\nexport const callWithNoContentResponseOptions = (options?: Options<CallWithNoContentResponseData>) => queryOptions<unknown, DefaultError, unknown, ReturnType<typeof callWithNoContentResponseQueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await callWithNoContentResponse({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: callWithNoContentResponseQueryKey(options)\n});\n\nexport const callWithResponseAndNoContentResponseQueryKey = (options?: Options<CallWithResponseAndNoContentResponseData>) => createQueryKey('callWithResponseAndNoContentResponse', options);\n\nexport const callWithResponseAndNoContentResponseOptions = (options?: Options<CallWithResponseAndNoContentResponseData>) => queryOptions<CallWithResponseAndNoContentResponseResponse, DefaultError, CallWithResponseAndNoContentResponseResponse, ReturnType<typeof callWithResponseAndNoContentResponseQueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await callWithResponseAndNoContentResponse({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: callWithResponseAndNoContentResponseQueryKey(options)\n});\n\nexport const dummyAQueryKey = (options?: Options<DummyAData>) => createQueryKey('dummyA', options);\n\nexport const dummyAOptions = (options?: Options<DummyAData>) => queryOptions<unknown, DefaultError, unknown, ReturnType<typeof dummyAQueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await dummyA({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: dummyAQueryKey(options)\n});\n\nexport const dummyBQueryKey = (options?: Options<DummyBData>) => createQueryKey('dummyB', options);\n\nexport const dummyBOptions = (options?: Options<DummyBData>) => queryOptions<unknown, DefaultError, unknown, ReturnType<typeof dummyBQueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await dummyB({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: dummyBQueryKey(options)\n});\n\nexport const callWithResponseQueryKey = (options?: Options<CallWithResponseData>) => createQueryKey('callWithResponse', options);\n\nexport const callWithResponseOptions = (options?: Options<CallWithResponseData>) => queryOptions<CallWithResponseResponse, DefaultError, CallWithResponseResponse, ReturnType<typeof callWithResponseQueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await callWithResponse({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: callWithResponseQueryKey(options)\n});\n\nexport const callWithDuplicateResponsesMutation = (options?: Partial<Options<CallWithDuplicateResponsesData>>): UseMutationOptions<CallWithDuplicateResponsesResponse, CallWithDuplicateResponsesError, Options<CallWithDuplicateResponsesData>> => {\n    const mutationOptions: UseMutationOptions<CallWithDuplicateResponsesResponse, CallWithDuplicateResponsesError, Options<CallWithDuplicateResponsesData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await callWithDuplicateResponses({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const callWithResponsesMutation = (options?: Partial<Options<CallWithResponsesData>>): UseMutationOptions<CallWithResponsesResponse, CallWithResponsesError, Options<CallWithResponsesData>> => {\n    const mutationOptions: UseMutationOptions<CallWithResponsesResponse, CallWithResponsesError, Options<CallWithResponsesData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await callWithResponses({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const collectionFormatQueryKey = (options: Options<CollectionFormatData>) => createQueryKey('collectionFormat', options);\n\nexport const collectionFormatOptions = (options: Options<CollectionFormatData>) => queryOptions<unknown, DefaultError, unknown, ReturnType<typeof collectionFormatQueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await collectionFormat({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: collectionFormatQueryKey(options)\n});\n\nexport const typesQueryKey = (options: Options<TypesData>) => createQueryKey('types', options);\n\nexport const typesOptions = (options: Options<TypesData>) => queryOptions<TypesResponse, DefaultError, TypesResponse, ReturnType<typeof typesQueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await types({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: typesQueryKey(options)\n});\n\nexport const complexTypesQueryKey = (options: Options<ComplexTypesData>) => createQueryKey('complexTypes', options);\n\nexport const complexTypesOptions = (options: Options<ComplexTypesData>) => queryOptions<ComplexTypesResponse, DefaultError, ComplexTypesResponse, ReturnType<typeof complexTypesQueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await complexTypes({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: complexTypesQueryKey(options)\n});\n\nexport const callWithResultFromHeaderMutation = (options?: Partial<Options<CallWithResultFromHeaderData>>): UseMutationOptions<unknown, DefaultError, Options<CallWithResultFromHeaderData>> => {\n    const mutationOptions: UseMutationOptions<unknown, DefaultError, Options<CallWithResultFromHeaderData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await callWithResultFromHeader({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const testErrorCodeMutation = (options?: Partial<Options<TestErrorCodeData>>): UseMutationOptions<unknown, DefaultError, Options<TestErrorCodeData>> => {\n    const mutationOptions: UseMutationOptions<unknown, DefaultError, Options<TestErrorCodeData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await testErrorCode({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const nonAsciiæøåÆøÅöôêÊ字符串Mutation = (options?: Partial<Options<NonAsciiæøåÆøÅöôêÊ字符串Data>>): UseMutationOptions<NonAsciiæøåÆøÅöôêÊ字符串Response, DefaultError, Options<NonAsciiæøåÆøÅöôêÊ字符串Data>> => {\n    const mutationOptions: UseMutationOptions<NonAsciiæøåÆøÅöôêÊ字符串Response, DefaultError, Options<NonAsciiæøåÆøÅöôêÊ字符串Data>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await nonAsciiæøåÆøÅöôêÊ字符串({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\n/**\n * Body should not be unknown\n *\n * Body should not be unknown\n */\nexport const postApiVbyApiVersionBodyMutation = (options?: Partial<Options<PostApiVbyApiVersionBodyData>>): UseMutationOptions<PostApiVbyApiVersionBodyResponse, PostApiVbyApiVersionBodyError, Options<PostApiVbyApiVersionBodyData>> => {\n    const mutationOptions: UseMutationOptions<PostApiVbyApiVersionBodyResponse, PostApiVbyApiVersionBodyError, Options<PostApiVbyApiVersionBodyData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await postApiVbyApiVersionBody({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/react-query/fetch/client/client.gen.ts",
    "content": "// 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 (options: RequestOptions) => {\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 url = buildUrl(opts);\n\n    return { opts, url };\n  };\n\n  const request: Client['request'] = async (options) => {\n    // @ts-expect-error\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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/react-query/fetch/client/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type { Auth } from '../core/auth.gen';\nexport type { QuerySerializerOptions } from '../core/bodySerializer.gen';\nexport {\n  formDataBodySerializer,\n  jsonBodySerializer,\n  urlSearchParamsBodySerializer,\n} from '../core/bodySerializer.gen';\nexport { buildClientParams } from '../core/params.gen';\nexport { serializeQueryKeyValue } from '../core/queryKeySerializer.gen';\nexport { createClient } from './client.gen';\nexport type {\n  Client,\n  ClientOptions,\n  Config,\n  CreateClientConfig,\n  Options,\n  RequestOptions,\n  RequestResult,\n  ResolvedRequestOptions,\n  ResponseStyle,\n  TDataShape,\n} from './types.gen';\nexport { createConfig, mergeHeaders } from './utils.gen';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/react-query/fetch/client/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { Auth } from '../core/auth.gen';\nimport type {\n  ServerSentEventsOptions,\n  ServerSentEventsResult,\n} from '../core/serverSentEvents.gen';\nimport type { Client as CoreClient, Config as CoreConfig } from '../core/types.gen';\nimport type { Middleware } from './utils.gen';\n\nexport type ResponseStyle = 'data' | 'fields';\n\nexport interface Config<T extends ClientOptions = ClientOptions>\n  extends Omit<RequestInit, 'body' | 'headers' | 'method'>, CoreConfig {\n  /**\n   * Base URL for all requests made by this client.\n   */\n  baseUrl?: T['baseUrl'];\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   * Please don't use the Fetch client for Next.js applications. The `next`\n   * options won't have any effect.\n   *\n   * Install {@link https://www.npmjs.com/package/@hey-api/client-next `@hey-api/client-next`} instead.\n   */\n  next?: never;\n  /**\n   * Return the response data parsed in a specified format. By default, `auto`\n   * will infer the appropriate method from the `Content-Type` response header.\n   * You can override this behavior with any of the {@link Body} methods.\n   * Select `stream` if you don't want to parse response data at all.\n   *\n   * @default 'auto'\n   */\n  parseAs?: 'arrayBuffer' | 'auto' | 'blob' | 'formData' | 'json' | 'stream' | 'text';\n  /**\n   * Should we return only data or multiple fields (data, error, response, etc.)?\n   *\n   * @default 'fields'\n   */\n  responseStyle?: ResponseStyle;\n  /**\n   * Throw an error instead of returning it in the response?\n   *\n   * @default false\n   */\n  throwOnError?: T['throwOnError'];\n}\n\nexport interface RequestOptions<\n  TData = unknown,\n  TResponseStyle extends ResponseStyle = 'fields',\n  ThrowOnError extends boolean = boolean,\n  Url extends string = string,\n>\n  extends\n    Config<{\n      responseStyle: TResponseStyle;\n      throwOnError: ThrowOnError;\n    }>,\n    Pick<\n      ServerSentEventsOptions<TData>,\n      | 'onRequest'\n      | 'onSseError'\n      | 'onSseEvent'\n      | 'sseDefaultRetryDelay'\n      | 'sseMaxRetryAttempts'\n      | 'sseMaxRetryDelay'\n    > {\n  /**\n   * Any body that you want to add to your request.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/fetch#body}\n   */\n  body?: unknown;\n  path?: Record<string, unknown>;\n  query?: Record<string, unknown>;\n  /**\n   * Security mechanism(s) to use for the request.\n   */\n  security?: ReadonlyArray<Auth>;\n  url: Url;\n}\n\nexport interface ResolvedRequestOptions<\n  TResponseStyle extends ResponseStyle = 'fields',\n  ThrowOnError extends boolean = boolean,\n  Url extends string = string,\n> extends RequestOptions<unknown, TResponseStyle, ThrowOnError, Url> {\n  serializedBody?: string;\n}\n\nexport type RequestResult<\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = boolean,\n  TResponseStyle extends ResponseStyle = 'fields',\n> = ThrowOnError extends true\n  ? Promise<\n      TResponseStyle extends 'data'\n        ? TData extends Record<string, unknown>\n          ? TData[keyof TData]\n          : TData\n        : {\n            data: TData extends Record<string, unknown> ? TData[keyof TData] : TData;\n            request: Request;\n            response: Response;\n          }\n    >\n  : Promise<\n      TResponseStyle extends 'data'\n        ? (TData extends Record<string, unknown> ? TData[keyof TData] : TData) | undefined\n        : (\n            | {\n                data: TData extends Record<string, unknown> ? TData[keyof TData] : TData;\n                error: undefined;\n              }\n            | {\n                data: undefined;\n                error: TError extends Record<string, unknown> ? TError[keyof TError] : TError;\n              }\n          ) & {\n            request: Request;\n            response: Response;\n          }\n    >;\n\nexport interface ClientOptions {\n  baseUrl?: string;\n  responseStyle?: ResponseStyle;\n  throwOnError?: boolean;\n}\n\ntype MethodFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'>,\n) => RequestResult<TData, TError, ThrowOnError, TResponseStyle>;\n\ntype SseFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'>,\n) => Promise<ServerSentEventsResult<TData, TError>>;\n\ntype RequestFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'> &\n    Pick<Required<RequestOptions<TData, TResponseStyle, ThrowOnError>>, 'method'>,\n) => RequestResult<TData, TError, ThrowOnError, TResponseStyle>;\n\ntype BuildUrlFn = <\n  TData extends {\n    body?: unknown;\n    path?: Record<string, unknown>;\n    query?: Record<string, unknown>;\n    url: string;\n  },\n>(\n  options: TData & Options<TData>,\n) => string;\n\nexport type Client = CoreClient<RequestFn, Config, MethodFn, BuildUrlFn, SseFn> & {\n  interceptors: Middleware<Request, Response, unknown, ResolvedRequestOptions>;\n};\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 = ClientOptions> = (\n  override?: Config<ClientOptions & T>,\n) => Config<Required<ClientOptions> & T>;\n\nexport interface TDataShape {\n  body?: unknown;\n  headers?: unknown;\n  path?: unknown;\n  query?: unknown;\n  url: string;\n}\n\ntype OmitKeys<T, K> = Pick<T, Exclude<keyof T, K>>;\n\nexport type Options<\n  TData extends TDataShape = TDataShape,\n  ThrowOnError extends boolean = boolean,\n  TResponse = unknown,\n  TResponseStyle extends ResponseStyle = 'fields',\n> = OmitKeys<\n  RequestOptions<TResponse, TResponseStyle, ThrowOnError>,\n  'body' | 'path' | 'query' | 'url'\n> &\n  ([TData] extends [never] ? unknown : Omit<TData, 'url'>);\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/react-query/fetch/client/utils.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/react-query/fetch/client.gen.ts",
    "content": "// 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: 'http://localhost:3000/base' }));\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/react-query/fetch/core/auth.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/react-query/fetch/core/bodySerializer.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/react-query/fetch/core/params.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/react-query/fetch/core/pathSerializer.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/react-query/fetch/core/queryKeySerializer.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\n/**\n * JSON-friendly union that mirrors what Pinia Colada can hash.\n */\nexport type JsonValue =\n  | null\n  | string\n  | number\n  | boolean\n  | JsonValue[]\n  | { [key: string]: JsonValue };\n\n/**\n * Replacer that converts non-JSON values (bigint, Date, etc.) to safe substitutes.\n */\nexport const queryKeyJsonReplacer = (_key: string, value: unknown) => {\n  if (value === undefined || typeof value === 'function' || typeof value === 'symbol') {\n    return undefined;\n  }\n  if (typeof value === 'bigint') {\n    return value.toString();\n  }\n  if (value instanceof Date) {\n    return value.toISOString();\n  }\n  return value;\n};\n\n/**\n * Safely stringifies a value and parses it back into a JsonValue.\n */\nexport const stringifyToJsonValue = (input: unknown): JsonValue | undefined => {\n  try {\n    const json = JSON.stringify(input, queryKeyJsonReplacer);\n    if (json === undefined) {\n      return undefined;\n    }\n    return JSON.parse(json) as JsonValue;\n  } catch {\n    return undefined;\n  }\n};\n\n/**\n * Detects plain objects (including objects with a null prototype).\n */\nconst isPlainObject = (value: unknown): value is Record<string, unknown> => {\n  if (value === null || typeof value !== 'object') {\n    return false;\n  }\n  const prototype = Object.getPrototypeOf(value as object);\n  return prototype === Object.prototype || prototype === null;\n};\n\n/**\n * Turns URLSearchParams into a sorted JSON object for deterministic keys.\n */\nconst serializeSearchParams = (params: URLSearchParams): JsonValue => {\n  const entries = Array.from(params.entries()).sort(([a], [b]) => a.localeCompare(b));\n  const result: Record<string, JsonValue> = {};\n\n  for (const [key, value] of entries) {\n    const existing = result[key];\n    if (existing === undefined) {\n      result[key] = value;\n      continue;\n    }\n\n    if (Array.isArray(existing)) {\n      (existing as string[]).push(value);\n    } else {\n      result[key] = [existing, value];\n    }\n  }\n\n  return result;\n};\n\n/**\n * Normalizes any accepted value into a JSON-friendly shape for query keys.\n */\nexport const serializeQueryKeyValue = (value: unknown): JsonValue | undefined => {\n  if (value === null) {\n    return null;\n  }\n\n  if (typeof value === 'string' || typeof value === 'number' || typeof value === 'boolean') {\n    return value;\n  }\n\n  if (value === undefined || typeof value === 'function' || typeof value === 'symbol') {\n    return undefined;\n  }\n\n  if (typeof value === 'bigint') {\n    return value.toString();\n  }\n\n  if (value instanceof Date) {\n    return value.toISOString();\n  }\n\n  if (Array.isArray(value)) {\n    return stringifyToJsonValue(value);\n  }\n\n  if (typeof URLSearchParams !== 'undefined' && value instanceof URLSearchParams) {\n    return serializeSearchParams(value);\n  }\n\n  if (isPlainObject(value)) {\n    return stringifyToJsonValue(value);\n  }\n\n  return undefined;\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/react-query/fetch/core/serverSentEvents.gen.ts",
    "content": "// 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 const 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            // Normalize line endings: CRLF -> LF, then CR -> LF\n            buffer = buffer.replace(/\\r\\n/g, '\\n').replace(/\\r/g, '\\n');\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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/react-query/fetch/core/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { Auth, AuthToken } from './auth.gen';\nimport type { BodySerializer, QuerySerializer, QuerySerializerOptions } from './bodySerializer.gen';\n\nexport type HttpMethod =\n  | 'connect'\n  | 'delete'\n  | 'get'\n  | 'head'\n  | 'options'\n  | 'patch'\n  | 'post'\n  | 'put'\n  | 'trace';\n\nexport type Client<\n  RequestFn = never,\n  Config = unknown,\n  MethodFn = never,\n  BuildUrlFn = never,\n  SseFn = never,\n> = {\n  /**\n   * Returns the final request URL.\n   */\n  buildUrl: BuildUrlFn;\n  getConfig: () => Config;\n  request: RequestFn;\n  setConfig: (config: Config) => Config;\n} & {\n  [K in HttpMethod]: MethodFn;\n} & ([SseFn] extends [never] ? { sse?: never } : { sse: { [K in HttpMethod]: SseFn } });\n\nexport interface Config {\n  /**\n   * Auth token or a function returning auth token. The resolved value will be\n   * added to the request payload as defined by its `security` array.\n   */\n  auth?: ((auth: Auth) => Promise<AuthToken> | AuthToken) | AuthToken;\n  /**\n   * A function for serializing request body parameter. By default,\n   * {@link JSON.stringify()} will be used.\n   */\n  bodySerializer?: BodySerializer | null;\n  /**\n   * An object containing any HTTP headers that you want to pre-populate your\n   * `Headers` object with.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/Headers/Headers#init See more}\n   */\n  headers?:\n    | RequestInit['headers']\n    | Record<\n        string,\n        string | number | boolean | (string | number | boolean)[] | null | undefined | unknown\n      >;\n  /**\n   * The request method.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/fetch#method See more}\n   */\n  method?: Uppercase<HttpMethod>;\n  /**\n   * A function for serializing request query parameters. By default, arrays\n   * will be exploded in form style, objects will be exploded in deepObject\n   * style, and reserved characters are percent-encoded.\n   *\n   * This method will have no effect if the native `paramsSerializer()` Axios\n   * API function is used.\n   *\n   * {@link https://swagger.io/docs/specification/serialization/#query View examples}\n   */\n  querySerializer?: QuerySerializer | QuerySerializerOptions;\n  /**\n   * A function validating request data. This is useful if you want to ensure\n   * the request conforms to the desired shape, so it can be safely sent to\n   * the server.\n   */\n  requestValidator?: (data: unknown) => Promise<unknown>;\n  /**\n   * A function transforming response data before it's returned. This is useful\n   * for post-processing data, e.g. converting ISO strings into Date objects.\n   */\n  responseTransformer?: (data: unknown) => Promise<unknown>;\n  /**\n   * A function validating response data. This is useful if you want to ensure\n   * the response conforms to the desired shape, so it can be safely passed to\n   * the transformers and returned to the user.\n   */\n  responseValidator?: (data: unknown) => Promise<unknown>;\n}\n\ntype IsExactlyNeverOrNeverUndefined<T> = [T] extends [never]\n  ? true\n  : [T] extends [never | undefined]\n    ? [undefined] extends [T]\n      ? false\n      : true\n    : false;\n\nexport type OmitNever<T extends Record<string, unknown>> = {\n  [K in keyof T as IsExactlyNeverOrNeverUndefined<T[K]> extends true ? never : K]: T[K];\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/react-query/fetch/core/utils.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/react-query/fetch/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport { callToTestOrderOfParams, callWithDefaultOptionalParameters, callWithDefaultParameters, callWithDescriptions, callWithDuplicateResponses, callWithNoContentResponse, callWithParameters, callWithResponse, callWithResponseAndNoContentResponse, callWithResponses, callWithResultFromHeader, callWithWeirdParameterNames, collectionFormat, complexTypes, deleteCallWithoutParametersAndResponse, dummyA, dummyB, duplicateName, duplicateName2, duplicateName3, duplicateName4, fooWow, getCallWithoutParametersAndResponse, headCallWithoutParametersAndResponse, nonAsciiæøåÆøÅöôêÊ字符串, type Options, optionsCallWithoutParametersAndResponse, patchApiVbyApiVersionNoTag, patchCallWithoutParametersAndResponse, postApiVbyApiVersionBody, postCallWithoutParametersAndResponse, putCallWithoutParametersAndResponse, serviceWithEmptyTag, testErrorCode, types } from './sdk.gen';\nexport type { ArrayWithArray, ArrayWithBooleans, ArrayWithNumbers, ArrayWithProperties, ArrayWithReferences, ArrayWithStrings, CallToTestOrderOfParamsData, CallWithDefaultOptionalParametersData, CallWithDefaultParametersData, CallWithDescriptionsData, CallWithDuplicateResponsesData, CallWithDuplicateResponsesError, CallWithDuplicateResponsesErrors, CallWithDuplicateResponsesResponse, CallWithDuplicateResponsesResponses, CallWithNoContentResponseData, CallWithNoContentResponseResponses, CallWithParametersData, CallWithResponseAndNoContentResponseData, CallWithResponseAndNoContentResponseResponse, CallWithResponseAndNoContentResponseResponses, CallWithResponseData, CallWithResponseResponse, CallWithResponseResponses, CallWithResponsesData, CallWithResponsesError, CallWithResponsesErrors, CallWithResponsesResponse, CallWithResponsesResponses, CallWithResultFromHeaderData, CallWithResultFromHeaderErrors, CallWithResultFromHeaderResponses, CallWithWeirdParameterNamesData, ClientOptions, CollectionFormatData, CommentWithBackticks, CommentWithBackticksAndQuotes, CommentWithBreaks, CommentWithExpressionPlaceholders, CommentWithQuotes, CommentWithReservedCharacters, CommentWithSlashes, ComplexTypesData, ComplexTypesErrors, ComplexTypesResponse, ComplexTypesResponses, Date, Default, DeleteCallWithoutParametersAndResponseData, DictionaryWithArray, DictionaryWithDictionary, DictionaryWithProperties, DictionaryWithReference, DictionaryWithString, DummyAData, DummyAResponses, DummyBData, DummyBResponses, DuplicateName2Data, DuplicateName3Data, DuplicateName4Data, DuplicateNameData, EnumFromDescription, EnumWithExtensions, EnumWithNumbers, EnumWithStrings, ExternalRefA, ExternalRefB, ExternalSharedModel, FailureFailure, FooWowData, FooWowResponses, GetCallWithoutParametersAndResponseData, HeadCallWithoutParametersAndResponseData, ModelThatExtends, ModelThatExtendsExtends, ModelWithArray, ModelWithBoolean, ModelWithCircularReference, ModelWithDictionary, ModelWithDuplicateImports, ModelWithDuplicateProperties, ModelWithEnum, ModelWithEnumFromDescription, ModelWithInteger, ModelWithNestedEnums, ModelWithNestedProperties, ModelWithNullableString, ModelWithOrderedProperties, ModelWithPattern, ModelWithPatternWritable, ModelWithProperties, ModelWithPropertiesWritable, ModelWithReference, ModelWithReferenceWritable, ModelWithString, ModelWithStringError, NonAsciiæøåÆøÅöôêÊ字符串Data, NonAsciiæøåÆøÅöôêÊ字符串Response, NonAsciiæøåÆøÅöôêÊ字符串Responses, NonAsciiStringæøåÆøÅöôêÊ字符串, OptionsCallWithoutParametersAndResponseData, ParameterActivityParams, PatchApiVbyApiVersionNoTagData, PatchApiVbyApiVersionNoTagResponses, PatchCallWithoutParametersAndResponseData, PostApiVbyApiVersionBodyData, PostApiVbyApiVersionBodyError, PostApiVbyApiVersionBodyErrors, PostApiVbyApiVersionBodyResponse, PostApiVbyApiVersionBodyResponses, PostCallWithoutParametersAndResponseData, PutCallWithoutParametersAndResponseData, ResponsePostActivityResponse, ServiceWithEmptyTagData, SimpleBoolean, SimpleFile, SimpleInteger, SimpleReference, SimpleString, SimpleStringWithPattern, TestErrorCodeData, TestErrorCodeErrors, TestErrorCodeResponses, TypesData, TypesResponse, TypesResponses } from './types.gen';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/react-query/fetch/sdk.gen.ts",
    "content": "// 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 { CallToTestOrderOfParamsData, CallWithDefaultOptionalParametersData, CallWithDefaultParametersData, CallWithDescriptionsData, CallWithDuplicateResponsesData, CallWithDuplicateResponsesErrors, CallWithDuplicateResponsesResponses, CallWithNoContentResponseData, CallWithNoContentResponseResponses, CallWithParametersData, CallWithResponseAndNoContentResponseData, CallWithResponseAndNoContentResponseResponses, CallWithResponseData, CallWithResponseResponses, CallWithResponsesData, CallWithResponsesErrors, CallWithResponsesResponses, CallWithResultFromHeaderData, CallWithResultFromHeaderErrors, CallWithResultFromHeaderResponses, CallWithWeirdParameterNamesData, CollectionFormatData, ComplexTypesData, ComplexTypesErrors, ComplexTypesResponses, DeleteCallWithoutParametersAndResponseData, DummyAData, DummyAResponses, DummyBData, DummyBResponses, DuplicateName2Data, DuplicateName3Data, DuplicateName4Data, DuplicateNameData, FooWowData, FooWowResponses, GetCallWithoutParametersAndResponseData, HeadCallWithoutParametersAndResponseData, NonAsciiæøåÆøÅöôêÊ字符串Data, NonAsciiæøåÆøÅöôêÊ字符串Responses, OptionsCallWithoutParametersAndResponseData, PatchApiVbyApiVersionNoTagData, PatchApiVbyApiVersionNoTagResponses, PatchCallWithoutParametersAndResponseData, PostApiVbyApiVersionBodyData, PostApiVbyApiVersionBodyErrors, PostApiVbyApiVersionBodyResponses, PostCallWithoutParametersAndResponseData, PutCallWithoutParametersAndResponseData, ServiceWithEmptyTagData, TestErrorCodeData, TestErrorCodeErrors, TestErrorCodeResponses, TypesData, TypesResponses } from './types.gen';\n\nexport type Options<TData extends TDataShape = TDataShape, ThrowOnError extends boolean = boolean> = Options2<TData, ThrowOnError> & {\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\nexport const serviceWithEmptyTag = <ThrowOnError extends boolean = false>(options?: Options<ServiceWithEmptyTagData, ThrowOnError>) => (options?.client ?? client).get<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/no+tag', ...options });\n\nexport const patchApiVbyApiVersionNoTag = <ThrowOnError extends boolean = false>(options?: Options<PatchApiVbyApiVersionNoTagData, ThrowOnError>) => (options?.client ?? client).patch<PatchApiVbyApiVersionNoTagResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/no+tag', ...options });\n\nexport const fooWow = <ThrowOnError extends boolean = false>(options?: Options<FooWowData, ThrowOnError>) => (options?.client ?? client).put<FooWowResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/no+tag', ...options });\n\nexport const deleteCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<DeleteCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).delete<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const getCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<GetCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).get<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const headCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<HeadCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).head<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const optionsCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<OptionsCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).options<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const patchCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<PatchCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).patch<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const postCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<PostCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).post<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const putCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<PutCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).put<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const callWithDescriptions = <ThrowOnError extends boolean = false>(options?: Options<CallWithDescriptionsData, ThrowOnError>) => (options?.client ?? client).post<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/descriptions/', ...options });\n\nexport const callWithParameters = <ThrowOnError extends boolean = false>(options: Options<CallWithParametersData, ThrowOnError>) => (options.client ?? client).post<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/parameters/{parameterPath}', ...options });\n\nexport const callWithWeirdParameterNames = <ThrowOnError extends boolean = false>(options: Options<CallWithWeirdParameterNamesData, ThrowOnError>) => (options.client ?? client).post<unknown, unknown, ThrowOnError>({\n    url: '/api/v{api-version}/parameters/{parameter.path.1}/{parameter-path-2}/{PARAMETER-PATH-3}',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options.headers\n    }\n});\n\nexport const callWithDefaultParameters = <ThrowOnError extends boolean = false>(options: Options<CallWithDefaultParametersData, ThrowOnError>) => (options.client ?? client).get<unknown, unknown, ThrowOnError>({\n    querySerializer: { parameters: { parameterModel: { object: { explode: false, style: 'form' } } } },\n    url: '/api/v{api-version}/defaults',\n    ...options\n});\n\nexport const callWithDefaultOptionalParameters = <ThrowOnError extends boolean = false>(options?: Options<CallWithDefaultOptionalParametersData, ThrowOnError>) => (options?.client ?? client).post<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/defaults', ...options });\n\nexport const callToTestOrderOfParams = <ThrowOnError extends boolean = false>(options: Options<CallToTestOrderOfParamsData, ThrowOnError>) => (options.client ?? client).put<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/defaults', ...options });\n\nexport const duplicateName = <ThrowOnError extends boolean = false>(options?: Options<DuplicateNameData, ThrowOnError>) => (options?.client ?? client).delete<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/duplicate', ...options });\n\nexport const duplicateName2 = <ThrowOnError extends boolean = false>(options?: Options<DuplicateName2Data, ThrowOnError>) => (options?.client ?? client).get<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/duplicate', ...options });\n\nexport const duplicateName3 = <ThrowOnError extends boolean = false>(options?: Options<DuplicateName3Data, ThrowOnError>) => (options?.client ?? client).post<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/duplicate', ...options });\n\nexport const duplicateName4 = <ThrowOnError extends boolean = false>(options?: Options<DuplicateName4Data, ThrowOnError>) => (options?.client ?? client).put<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/duplicate', ...options });\n\nexport const callWithNoContentResponse = <ThrowOnError extends boolean = false>(options?: Options<CallWithNoContentResponseData, ThrowOnError>) => (options?.client ?? client).get<CallWithNoContentResponseResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/no-content', ...options });\n\nexport const callWithResponseAndNoContentResponse = <ThrowOnError extends boolean = false>(options?: Options<CallWithResponseAndNoContentResponseData, ThrowOnError>) => (options?.client ?? client).get<CallWithResponseAndNoContentResponseResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/multiple-tags/response-and-no-content', ...options });\n\nexport const dummyA = <ThrowOnError extends boolean = false>(options?: Options<DummyAData, ThrowOnError>) => (options?.client ?? client).get<DummyAResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/multiple-tags/a', ...options });\n\nexport const dummyB = <ThrowOnError extends boolean = false>(options?: Options<DummyBData, ThrowOnError>) => (options?.client ?? client).get<DummyBResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/multiple-tags/b', ...options });\n\nexport const callWithResponse = <ThrowOnError extends boolean = false>(options?: Options<CallWithResponseData, ThrowOnError>) => (options?.client ?? client).get<CallWithResponseResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/response', ...options });\n\nexport const callWithDuplicateResponses = <ThrowOnError extends boolean = false>(options?: Options<CallWithDuplicateResponsesData, ThrowOnError>) => (options?.client ?? client).post<CallWithDuplicateResponsesResponses, CallWithDuplicateResponsesErrors, ThrowOnError>({ url: '/api/v{api-version}/response', ...options });\n\nexport const callWithResponses = <ThrowOnError extends boolean = false>(options?: Options<CallWithResponsesData, ThrowOnError>) => (options?.client ?? client).put<CallWithResponsesResponses, CallWithResponsesErrors, ThrowOnError>({ url: '/api/v{api-version}/response', ...options });\n\nexport const collectionFormat = <ThrowOnError extends boolean = false>(options: Options<CollectionFormatData, ThrowOnError>) => (options.client ?? client).get<unknown, unknown, ThrowOnError>({\n    querySerializer: { parameters: {\n            parameterArrayCSV: { array: { explode: false } },\n            parameterArraySSV: { array: { explode: false } },\n            parameterArrayTSV: { array: { explode: false } },\n            parameterArrayPipes: { array: { explode: false } }\n        } },\n    url: '/api/v{api-version}/collectionFormat',\n    ...options\n});\n\nexport const types = <ThrowOnError extends boolean = false>(options: Options<TypesData, ThrowOnError>) => (options.client ?? client).get<TypesResponses, unknown, ThrowOnError>({\n    querySerializer: { parameters: { parameterArray: { array: { explode: false } }, parameterDictionary: { object: { explode: false, style: 'form' } } } },\n    url: '/api/v{api-version}/types',\n    ...options\n});\n\nexport const complexTypes = <ThrowOnError extends boolean = false>(options: Options<ComplexTypesData, ThrowOnError>) => (options.client ?? client).get<ComplexTypesResponses, ComplexTypesErrors, ThrowOnError>({\n    querySerializer: { parameters: { parameterObject: { object: { explode: false, style: 'form' } }, parameterReference: { object: { explode: false, style: 'form' } } } },\n    url: '/api/v{api-version}/complex',\n    ...options\n});\n\nexport const callWithResultFromHeader = <ThrowOnError extends boolean = false>(options?: Options<CallWithResultFromHeaderData, ThrowOnError>) => (options?.client ?? client).post<CallWithResultFromHeaderResponses, CallWithResultFromHeaderErrors, ThrowOnError>({ url: '/api/v{api-version}/header', ...options });\n\nexport const testErrorCode = <ThrowOnError extends boolean = false>(options: Options<TestErrorCodeData, ThrowOnError>) => (options.client ?? client).post<TestErrorCodeResponses, TestErrorCodeErrors, ThrowOnError>({ url: '/api/v{api-version}/error', ...options });\n\nexport const nonAsciiæøåÆøÅöôêÊ字符串 = <ThrowOnError extends boolean = false>(options: Options<NonAsciiæøåÆøÅöôêÊ字符串Data, ThrowOnError>) => (options.client ?? client).post<NonAsciiæøåÆøÅöôêÊ字符串Responses, unknown, ThrowOnError>({ url: '/api/v{api-version}/non-ascii-æøåÆØÅöôêÊ字符串', ...options });\n\n/**\n * Body should not be unknown\n *\n * Body should not be unknown\n */\nexport const postApiVbyApiVersionBody = <ThrowOnError extends boolean = false>(options: Options<PostApiVbyApiVersionBodyData, ThrowOnError>) => (options.client ?? client).post<PostApiVbyApiVersionBodyResponses, PostApiVbyApiVersionBodyErrors, ThrowOnError>({\n    url: '/api/v{api-version}/body',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options.headers\n    }\n});\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/react-query/fetch/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type ClientOptions = {\n    baseUrl: 'http://localhost:3000/base' | (string & {});\n};\n\nexport type ExternalRefA = ExternalSharedModel;\n\nexport type ExternalRefB = ExternalSharedModel;\n\n/**\n * Testing multiline comments in string: First line\n * Second line\n *\n * Fourth line\n */\nexport type CommentWithBreaks = number;\n\n/**\n * Testing backticks in string: `backticks` and ```multiple backticks``` should work\n */\nexport type CommentWithBackticks = number;\n\n/**\n * Testing backticks and quotes in string: `backticks`, 'quotes', \"double quotes\" and ```multiple backticks``` should work\n */\nexport type CommentWithBackticksAndQuotes = number;\n\n/**\n * Testing slashes in string: \\backwards\\\\\\ and /forwards/// should work\n */\nexport type CommentWithSlashes = number;\n\n/**\n * Testing expression placeholders in string: ${expression} should work\n */\nexport type CommentWithExpressionPlaceholders = number;\n\n/**\n * Testing quotes in string: 'single quote''' and \"double quotes\"\"\" should work\n */\nexport type CommentWithQuotes = number;\n\n/**\n * Testing reserved characters in string: * inline * and ** inline ** should work\n */\nexport type CommentWithReservedCharacters = number;\n\n/**\n * This is a simple number\n */\nexport type SimpleInteger = number;\n\n/**\n * This is a simple boolean\n */\nexport type SimpleBoolean = boolean;\n\n/**\n * This is a simple string\n */\nexport type SimpleString = string;\n\n/**\n * A string with non-ascii (unicode) characters valid in typescript identifiers (æøåÆØÅöÔèÈ字符串)\n */\nexport type NonAsciiStringæøåÆøÅöôêÊ字符串 = string;\n\n/**\n * This is a simple file\n */\nexport type SimpleFile = Blob | File;\n\nexport type SimpleReference = ModelWithString;\n\n/**\n * This is a simple string\n */\nexport type SimpleStringWithPattern = string;\n\n/**\n * This is a simple enum with strings\n */\nexport type EnumWithStrings = 'Success' | 'Warning' | 'Error' | '\\'Single Quote\\'' | '\"Double Quotes\"' | 'Non-ascii: øæåôöØÆÅÔÖ字符串';\n\n/**\n * This is a simple enum with numbers\n */\nexport type EnumWithNumbers = 1 | 2 | 3 | 1.1 | 1.2 | 1.3 | 100 | 200 | 300 | -100 | -200 | -300 | -1.1 | -1.2 | -1.3;\n\n/**\n * Success=1,Warning=2,Error=3\n */\nexport type EnumFromDescription = number;\n\n/**\n * This is a simple enum with numbers\n */\nexport type EnumWithExtensions = 200 | 400 | 500;\n\n/**\n * This is a simple array with numbers\n */\nexport type ArrayWithNumbers = Array<number>;\n\n/**\n * This is a simple array with booleans\n */\nexport type ArrayWithBooleans = Array<boolean>;\n\n/**\n * This is a simple array with strings\n */\nexport type ArrayWithStrings = Array<string>;\n\n/**\n * This is a simple array with references\n */\nexport type ArrayWithReferences = Array<ModelWithString>;\n\n/**\n * This is a simple array containing an array\n */\nexport type ArrayWithArray = Array<Array<ModelWithString>>;\n\n/**\n * This is a simple array with properties\n */\nexport type ArrayWithProperties = Array<{\n    foo?: string;\n    bar?: string;\n}>;\n\n/**\n * This is a string dictionary\n */\nexport type DictionaryWithString = {\n    [key: string]: string;\n};\n\n/**\n * This is a string reference\n */\nexport type DictionaryWithReference = {\n    [key: string]: ModelWithString;\n};\n\n/**\n * This is a complex dictionary\n */\nexport type DictionaryWithArray = {\n    [key: string]: Array<ModelWithString>;\n};\n\n/**\n * This is a string dictionary\n */\nexport type DictionaryWithDictionary = {\n    [key: string]: {\n        [key: string]: string;\n    };\n};\n\n/**\n * This is a complex dictionary\n */\nexport type DictionaryWithProperties = {\n    [key: string]: {\n        foo?: string;\n        bar?: string;\n    };\n};\n\n/**\n * This is a type-only model that defines Date as a string\n */\nexport type Date = string;\n\n/**\n * This is a model with one number property\n */\nexport type ModelWithInteger = {\n    /**\n     * This is a simple number property\n     */\n    prop?: number;\n};\n\n/**\n * This is a model with one boolean property\n */\nexport type ModelWithBoolean = {\n    /**\n     * This is a simple boolean property\n     */\n    prop?: boolean;\n};\n\n/**\n * This is a model with one string property\n */\nexport type ModelWithString = {\n    /**\n     * This is a simple string property\n     */\n    prop?: string;\n};\n\n/**\n * This is a model with one string property\n */\nexport type ModelWithStringError = {\n    /**\n     * This is a simple string property\n     */\n    prop?: string;\n};\n\n/**\n * This is a model with one string property\n */\nexport type ModelWithNullableString = {\n    /**\n     * This is a simple string property\n     */\n    nullableProp?: string | null;\n    /**\n     * This is a simple string property\n     */\n    nullableRequiredProp: string | null;\n};\n\n/**\n * This is a model with one enum\n */\nexport type ModelWithEnum = {\n    /**\n     * This is a simple enum with strings\n     */\n    test?: 'Success' | 'Warning' | 'Error' | 'ØÆÅ字符串';\n    /**\n     * These are the HTTP error code enums\n     */\n    statusCode?: '100' | '200 FOO' | '300 FOO_BAR' | '400 foo-bar' | '500 foo.bar' | '600 foo&bar';\n    /**\n     * Simple boolean enum\n     */\n    bool?: true;\n};\n\n/**\n * This is a model with one enum\n */\nexport type ModelWithEnumFromDescription = {\n    /**\n     * Success=1,Warning=2,Error=3\n     */\n    test?: number;\n};\n\n/**\n * This is a model with nested enums\n */\nexport type ModelWithNestedEnums = {\n    dictionaryWithEnum?: {\n        [key: string]: 'Success' | 'Warning' | 'Error';\n    };\n    dictionaryWithEnumFromDescription?: {\n        [key: string]: number;\n    };\n    arrayWithEnum?: Array<'Success' | 'Warning' | 'Error'>;\n    arrayWithDescription?: Array<number>;\n};\n\n/**\n * This is a model with one property containing a reference\n */\nexport type ModelWithReference = {\n    prop?: ModelWithProperties;\n};\n\n/**\n * This is a model with one property containing an array\n */\nexport type ModelWithArray = {\n    prop?: Array<ModelWithString>;\n    propWithFile?: Array<Blob | File>;\n    propWithNumber?: Array<number>;\n};\n\n/**\n * This is a model with one property containing a dictionary\n */\nexport type ModelWithDictionary = {\n    prop?: {\n        [key: string]: string;\n    };\n};\n\n/**\n * This is a model with one property containing a circular reference\n */\nexport type ModelWithCircularReference = {\n    prop?: ModelWithCircularReference;\n};\n\n/**\n * This is a model with one nested property\n */\nexport type ModelWithProperties = {\n    required: string;\n    readonly requiredAndReadOnly: string;\n    string?: string;\n    number?: number;\n    boolean?: boolean;\n    reference?: ModelWithString;\n    'property with space'?: string;\n    default?: string;\n    try?: string;\n    readonly '@namespace.string'?: string;\n    readonly '@namespace.integer'?: number;\n};\n\n/**\n * This is a model with one nested property\n */\nexport type ModelWithNestedProperties = {\n    readonly first: {\n        readonly second: {\n            readonly third: string;\n        };\n    };\n};\n\n/**\n * This is a model with duplicated properties\n */\nexport type ModelWithDuplicateProperties = {\n    prop?: ModelWithString;\n};\n\n/**\n * This is a model with ordered properties\n */\nexport type ModelWithOrderedProperties = {\n    zebra?: string;\n    apple?: string;\n    hawaii?: string;\n};\n\n/**\n * This is a model with duplicated imports\n */\nexport type ModelWithDuplicateImports = {\n    propA?: ModelWithString;\n    propB?: ModelWithString;\n    propC?: ModelWithString;\n};\n\n/**\n * This is a model that extends another model\n */\nexport type ModelThatExtends = ModelWithString & {\n    propExtendsA?: string;\n    propExtendsB?: ModelWithString;\n};\n\n/**\n * This is a model that extends another model\n */\nexport type ModelThatExtendsExtends = ModelWithString & ModelThatExtends & {\n    propExtendsC?: string;\n    propExtendsD?: ModelWithString;\n};\n\nexport type Default = {\n    name?: string;\n};\n\n/**\n * This is a model that contains a some patterns\n */\nexport type ModelWithPattern = {\n    key: string;\n    name: string;\n    readonly enabled?: boolean;\n    readonly modified?: string;\n    id?: string;\n    text?: string;\n    patternWithSingleQuotes?: string;\n    patternWithNewline?: string;\n    patternWithBacktick?: string;\n    patternWithUnicode?: string;\n};\n\nexport type ParameterActivityParams = {\n    description?: string;\n    graduate_id?: number;\n    organization_id?: number;\n    parent_activity?: number;\n    post_id?: number;\n};\n\nexport type ResponsePostActivityResponse = {\n    description?: string;\n    graduate_id?: number;\n    organization_id?: number;\n    parent_activity_id?: number;\n    post_id?: number;\n};\n\nexport type FailureFailure = {\n    error?: string;\n    message?: string;\n    reference_code?: string;\n};\n\nexport type ExternalSharedModel = {\n    id: string;\n    name?: string;\n};\n\n/**\n * This is a model with one property containing a reference\n */\nexport type ModelWithReferenceWritable = {\n    prop?: ModelWithPropertiesWritable;\n};\n\n/**\n * This is a model with one nested property\n */\nexport type ModelWithPropertiesWritable = {\n    required: string;\n    string?: string;\n    number?: number;\n    boolean?: boolean;\n    reference?: ModelWithString;\n    'property with space'?: string;\n    default?: string;\n    try?: string;\n};\n\n/**\n * This is a model that contains a some patterns\n */\nexport type ModelWithPatternWritable = {\n    key: string;\n    name: string;\n    id?: string;\n    text?: string;\n    patternWithSingleQuotes?: string;\n    patternWithNewline?: string;\n    patternWithBacktick?: string;\n    patternWithUnicode?: string;\n};\n\nexport type ServiceWithEmptyTagData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no+tag';\n};\n\nexport type PatchApiVbyApiVersionNoTagData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no+tag';\n};\n\nexport type PatchApiVbyApiVersionNoTagResponses = {\n    /**\n     * OK\n     */\n    default: unknown;\n};\n\nexport type FooWowData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no+tag';\n};\n\nexport type FooWowResponses = {\n    /**\n     * OK\n     */\n    default: unknown;\n};\n\nexport type DeleteCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type GetCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type HeadCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type OptionsCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type PatchCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type PostCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type PutCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type CallWithDescriptionsData = {\n    body?: never;\n    path?: never;\n    query?: {\n        /**\n         * Testing multiline comments in string: First line\n         * Second line\n         *\n         * Fourth line\n         */\n        parameterWithBreaks?: string;\n        /**\n         * Testing backticks in string: `backticks` and ```multiple backticks``` should work\n         */\n        parameterWithBackticks?: string;\n        /**\n         * Testing slashes in string: \\backwards\\\\\\ and /forwards/// should work\n         */\n        parameterWithSlashes?: string;\n        /**\n         * Testing expression placeholders in string: ${expression} should work\n         */\n        parameterWithExpressionPlaceholders?: string;\n        /**\n         * Testing quotes in string: 'single quote''' and \"double quotes\"\"\" should work\n         */\n        parameterWithQuotes?: string;\n        /**\n         * Testing reserved characters in string: * inline * and ** inline ** should work\n         */\n        parameterWithReservedCharacters?: string;\n    };\n    url: '/api/v{api-version}/descriptions/';\n};\n\nexport type CallWithParametersData = {\n    body?: never;\n    headers: {\n        /**\n         * This is the parameter that goes into the header\n         */\n        parameterHeader: string;\n    };\n    path: {\n        /**\n         * This is the parameter that goes into the path\n         */\n        parameterPath: string;\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string;\n    };\n    query: {\n        /**\n         * This is the parameter that goes into the query params\n         */\n        parameterQuery: string;\n    };\n    url: '/api/v{api-version}/parameters/{parameterPath}';\n};\n\nexport type CallWithWeirdParameterNamesData = {\n    /**\n     * This is the parameter that is sent as request body\n     */\n    body: string;\n    headers: {\n        /**\n         * This is the parameter that goes into the request header\n         */\n        'parameter.header': string;\n    };\n    path: {\n        /**\n         * This is the parameter that goes into the path\n         */\n        'parameter.path.1'?: string;\n        /**\n         * This is the parameter that goes into the path\n         */\n        'parameter-path-2'?: string;\n        /**\n         * This is the parameter that goes into the path\n         */\n        'PARAMETER-PATH-3'?: string;\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string;\n    };\n    query: {\n        /**\n         * This is the parameter with a reserved keyword\n         */\n        default?: string;\n        /**\n         * This is the parameter that goes into the request query params\n         */\n        'parameter-query': string;\n    };\n    url: '/api/v{api-version}/parameters/{parameter.path.1}/{parameter-path-2}/{PARAMETER-PATH-3}';\n};\n\nexport type CallWithDefaultParametersData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * This is a simple string with default value\n         */\n        parameterString: string;\n        /**\n         * This is a simple number with default value\n         */\n        parameterNumber: number;\n        /**\n         * This is a simple boolean with default value\n         */\n        parameterBoolean: boolean;\n        /**\n         * This is a simple enum with default value\n         */\n        parameterEnum: 'Success' | 'Warning' | 'Error';\n        /**\n         * This is a model with one string property\n         */\n        parameterModel: {\n            /**\n             * This is a simple string property\n             */\n            prop?: string;\n        };\n    };\n    url: '/api/v{api-version}/defaults';\n};\n\nexport type CallWithDefaultOptionalParametersData = {\n    body?: never;\n    path?: never;\n    query?: {\n        /**\n         * This is a simple string that is optional with default value\n         */\n        parameterString?: string;\n        /**\n         * This is a simple number that is optional with default value\n         */\n        parameterNumber?: number;\n        /**\n         * This is a simple boolean that is optional with default value\n         */\n        parameterBoolean?: boolean;\n        /**\n         * This is a simple enum that is optional with default value\n         */\n        parameterEnum?: 'Success' | 'Warning' | 'Error';\n    };\n    url: '/api/v{api-version}/defaults';\n};\n\nexport type CallToTestOrderOfParamsData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * This is a optional string with default\n         */\n        parameterOptionalStringWithDefault?: string;\n        /**\n         * This is a optional string with empty default\n         */\n        parameterOptionalStringWithEmptyDefault?: string;\n        /**\n         * This is a optional string with no default\n         */\n        parameterOptionalStringWithNoDefault?: string;\n        /**\n         * This is a string with default\n         */\n        parameterStringWithDefault: string;\n        /**\n         * This is a string with empty default\n         */\n        parameterStringWithEmptyDefault: string;\n        /**\n         * This is a string with no default\n         */\n        parameterStringWithNoDefault: string;\n        /**\n         * This is a string that can be null with no default\n         */\n        parameterStringNullableWithNoDefault?: string | null;\n        /**\n         * This is a string that can be null with default\n         */\n        parameterStringNullableWithDefault?: string | null;\n    };\n    url: '/api/v{api-version}/defaults';\n};\n\nexport type DuplicateNameData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/duplicate';\n};\n\nexport type DuplicateName2Data = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/duplicate';\n};\n\nexport type DuplicateName3Data = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/duplicate';\n};\n\nexport type DuplicateName4Data = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/duplicate';\n};\n\nexport type CallWithNoContentResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no-content';\n};\n\nexport type CallWithNoContentResponseResponses = {\n    /**\n     * Success\n     */\n    204: unknown;\n};\n\nexport type CallWithResponseAndNoContentResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multiple-tags/response-and-no-content';\n};\n\nexport type CallWithResponseAndNoContentResponseResponses = {\n    /**\n     * Response is a simple number\n     */\n    200: number;\n    /**\n     * Success\n     */\n    204: unknown;\n};\n\nexport type CallWithResponseAndNoContentResponseResponse = CallWithResponseAndNoContentResponseResponses[keyof CallWithResponseAndNoContentResponseResponses];\n\nexport type DummyAData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multiple-tags/a';\n};\n\nexport type DummyAResponses = {\n    /**\n     * Success\n     */\n    204: unknown;\n};\n\nexport type DummyBData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multiple-tags/b';\n};\n\nexport type DummyBResponses = {\n    /**\n     * Success\n     */\n    204: unknown;\n};\n\nexport type CallWithResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/response';\n};\n\nexport type CallWithResponseResponses = {\n    /**\n     * Message for default response\n     */\n    default: ModelWithString;\n};\n\nexport type CallWithResponseResponse = CallWithResponseResponses[keyof CallWithResponseResponses];\n\nexport type CallWithDuplicateResponsesData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/response';\n};\n\nexport type CallWithDuplicateResponsesErrors = {\n    /**\n     * Message for 500 error\n     */\n    500: ModelWithStringError;\n    /**\n     * Message for 501 error\n     */\n    501: ModelWithStringError;\n    /**\n     * Message for 502 error\n     */\n    502: ModelWithStringError;\n    /**\n     * Message for default response\n     */\n    default: ModelWithString;\n};\n\nexport type CallWithDuplicateResponsesError = CallWithDuplicateResponsesErrors[keyof CallWithDuplicateResponsesErrors];\n\nexport type CallWithDuplicateResponsesResponses = {\n    /**\n     * Message for 201 response\n     */\n    201: ModelWithString;\n    /**\n     * Message for 202 response\n     */\n    202: ModelWithString;\n};\n\nexport type CallWithDuplicateResponsesResponse = CallWithDuplicateResponsesResponses[keyof CallWithDuplicateResponsesResponses];\n\nexport type CallWithResponsesData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/response';\n};\n\nexport type CallWithResponsesErrors = {\n    /**\n     * Message for 500 error\n     */\n    500: ModelWithStringError;\n    /**\n     * Message for 501 error\n     */\n    501: ModelWithStringError;\n    /**\n     * Message for 502 error\n     */\n    502: ModelWithStringError;\n    /**\n     * Message for default response\n     */\n    default: ModelWithString;\n};\n\nexport type CallWithResponsesError = CallWithResponsesErrors[keyof CallWithResponsesErrors];\n\nexport type CallWithResponsesResponses = {\n    /**\n     * Message for 200 response\n     */\n    200: {\n        readonly '@namespace.string'?: string;\n        readonly '@namespace.integer'?: number;\n        readonly value?: Array<ModelWithString>;\n    };\n    /**\n     * Message for 201 response\n     */\n    201: ModelThatExtends;\n    /**\n     * Message for 202 response\n     */\n    202: ModelThatExtendsExtends;\n};\n\nexport type CallWithResponsesResponse = CallWithResponsesResponses[keyof CallWithResponsesResponses];\n\nexport type CollectionFormatData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * This is an array parameter that is sent as csv format (comma-separated values)\n         */\n        parameterArrayCSV: Array<string>;\n        /**\n         * This is an array parameter that is sent as ssv format (space-separated values)\n         */\n        parameterArraySSV: Array<string>;\n        /**\n         * This is an array parameter that is sent as tsv format (tab-separated values)\n         */\n        parameterArrayTSV: Array<string>;\n        /**\n         * This is an array parameter that is sent as pipes format (pipe-separated values)\n         */\n        parameterArrayPipes: Array<string>;\n        /**\n         * This is an array parameter that is sent as multi format (multiple parameter instances)\n         */\n        parameterArrayMulti: Array<string>;\n    };\n    url: '/api/v{api-version}/collectionFormat';\n};\n\nexport type TypesData = {\n    body?: never;\n    path?: {\n        /**\n         * This is a number parameter\n         */\n        id?: number;\n    };\n    query: {\n        /**\n         * This is a number parameter\n         */\n        parameterNumber: number;\n        /**\n         * This is a string parameter\n         */\n        parameterString: string;\n        /**\n         * This is a boolean parameter\n         */\n        parameterBoolean: boolean;\n        /**\n         * This is an array parameter\n         */\n        parameterArray: Array<string>;\n        /**\n         * This is a dictionary parameter\n         */\n        parameterDictionary: {\n            [key: string]: unknown;\n        };\n        /**\n         * This is an enum parameter\n         */\n        parameterEnum: 'Success' | 'Warning' | 'Error';\n    };\n    url: '/api/v{api-version}/types';\n};\n\nexport type TypesResponses = {\n    /**\n     * Response is a simple number\n     */\n    200: number;\n    /**\n     * Response is a simple string\n     */\n    201: string;\n    /**\n     * Response is a simple boolean\n     */\n    202: boolean;\n    /**\n     * Response is a simple object\n     */\n    203: {\n        [key: string]: unknown;\n    };\n};\n\nexport type TypesResponse = TypesResponses[keyof TypesResponses];\n\nexport type ComplexTypesData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * Parameter containing object\n         */\n        parameterObject: {\n            first?: {\n                second?: {\n                    third?: string;\n                };\n            };\n        };\n        /**\n         * This is a model with one string property\n         */\n        parameterReference: {\n            /**\n             * This is a simple string property\n             */\n            prop?: string;\n        };\n    };\n    url: '/api/v{api-version}/complex';\n};\n\nexport type ComplexTypesErrors = {\n    /**\n     * 400 server error\n     */\n    400: unknown;\n    /**\n     * 500 server error\n     */\n    500: unknown;\n};\n\nexport type ComplexTypesResponses = {\n    /**\n     * Successful response\n     */\n    200: Array<ModelWithString>;\n};\n\nexport type ComplexTypesResponse = ComplexTypesResponses[keyof ComplexTypesResponses];\n\nexport type CallWithResultFromHeaderData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/header';\n};\n\nexport type CallWithResultFromHeaderErrors = {\n    /**\n     * 400 server error\n     */\n    400: unknown;\n    /**\n     * 500 server error\n     */\n    500: unknown;\n};\n\nexport type CallWithResultFromHeaderResponses = {\n    /**\n     * Successful response\n     */\n    200: unknown;\n};\n\nexport type TestErrorCodeData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * Status code to return\n         */\n        status: string;\n    };\n    url: '/api/v{api-version}/error';\n};\n\nexport type TestErrorCodeErrors = {\n    /**\n     * Custom message: Internal Server Error\n     */\n    500: unknown;\n    /**\n     * Custom message: Not Implemented\n     */\n    501: unknown;\n    /**\n     * Custom message: Bad Gateway\n     */\n    502: unknown;\n    /**\n     * Custom message: Service Unavailable\n     */\n    503: unknown;\n};\n\nexport type TestErrorCodeResponses = {\n    /**\n     * Custom message: Successful response\n     */\n    200: unknown;\n};\n\nexport type NonAsciiæøåÆøÅöôêÊ字符串Data = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * Dummy input param\n         */\n        nonAsciiParamæøåÆØÅöôêÊ: number;\n    };\n    url: '/api/v{api-version}/non-ascii-æøåÆØÅöôêÊ字符串';\n};\n\nexport type NonAsciiæøåÆøÅöôêÊ字符串Responses = {\n    /**\n     * Successful response\n     */\n    200: NonAsciiStringæøåÆøÅöôêÊ字符串;\n};\n\nexport type NonAsciiæøåÆøÅöôêÊ字符串Response = NonAsciiæøåÆøÅöôêÊ字符串Responses[keyof NonAsciiæøåÆøÅöôêÊ字符串Responses];\n\nexport type PostApiVbyApiVersionBodyData = {\n    /**\n     * Body should not be unknown\n     */\n    body: ParameterActivityParams;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/body';\n};\n\nexport type PostApiVbyApiVersionBodyErrors = {\n    /**\n     * Bad Request\n     */\n    400: FailureFailure;\n    /**\n     * Internal Server Error\n     */\n    500: FailureFailure;\n};\n\nexport type PostApiVbyApiVersionBodyError = PostApiVbyApiVersionBodyErrors[keyof PostApiVbyApiVersionBodyErrors];\n\nexport type PostApiVbyApiVersionBodyResponses = {\n    /**\n     * OK\n     */\n    200: ResponsePostActivityResponse;\n};\n\nexport type PostApiVbyApiVersionBodyResponse = PostApiVbyApiVersionBodyResponses[keyof PostApiVbyApiVersionBodyResponses];\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/react-query/name-builder/@tanstack/react-query.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport { type DefaultError, queryOptions, type UseMutationOptions } from '@tanstack/react-query';\n\nimport { client } from '../client.gen';\nimport { fooBarPost, fooBarPut, fooPost, fooPut, getFoo, getFooBar, type Options } from '../sdk.gen';\nimport type { FooBarPostData, FooBarPostResponse, FooBarPutData, FooBarPutResponse, FooPostData, FooPostResponse, FooPutData, FooPutResponse, GetFooBarData, GetFooBarResponse, GetFooData, GetFooResponse } from '../types.gen';\n\nexport type QueryKey<TOptions extends Options> = [\n    Pick<TOptions, 'baseUrl' | 'body' | 'headers' | 'path' | 'query'> & {\n        _id: string;\n        _infinite?: boolean;\n        tags?: ReadonlyArray<string>;\n    }\n];\n\nconst createQueryKey = <TOptions extends Options>(id: string, options?: TOptions, infinite?: boolean, tags?: ReadonlyArray<string>): [\n    QueryKey<TOptions>[0]\n] => {\n    const params: QueryKey<TOptions>[0] = { _id: id, baseUrl: options?.baseUrl || (options?.client ?? client).getConfig().baseUrl } as QueryKey<TOptions>[0];\n    if (infinite) {\n        params._infinite = infinite;\n    }\n    if (tags) {\n        params.tags = tags;\n    }\n    if (options?.body) {\n        params.body = options.body;\n    }\n    if (options?.headers) {\n        params.headers = options.headers;\n    }\n    if (options?.path) {\n        params.path = options.path;\n    }\n    if (options?.query) {\n        params.query = options.query;\n    }\n    return [params];\n};\n\nexport const getFooD = (options?: Options<GetFooData>) => createQueryKey('getFoo', options);\n\nexport const getFooE = (options?: Options<GetFooData>) => queryOptions<GetFooResponse, DefaultError, GetFooResponse, ReturnType<typeof getFooD>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await getFoo({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: getFooD(options)\n});\n\nexport const fooPostC = (options?: Partial<Options<FooPostData>>): UseMutationOptions<FooPostResponse, DefaultError, Options<FooPostData>> => {\n    const mutationOptions: UseMutationOptions<FooPostResponse, DefaultError, Options<FooPostData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await fooPost({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const fooPutC = (options?: Partial<Options<FooPutData>>): UseMutationOptions<FooPutResponse, DefaultError, Options<FooPutData>> => {\n    const mutationOptions: UseMutationOptions<FooPutResponse, DefaultError, Options<FooPutData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await fooPut({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const getFooBarD = (options?: Options<GetFooBarData>) => createQueryKey('getFooBar', options);\n\nexport const getFooBarE = (options?: Options<GetFooBarData>) => queryOptions<GetFooBarResponse, DefaultError, GetFooBarResponse, ReturnType<typeof getFooBarD>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await getFooBar({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: getFooBarD(options)\n});\n\nexport const fooBarPostC = (options?: Partial<Options<FooBarPostData>>): UseMutationOptions<FooBarPostResponse, DefaultError, Options<FooBarPostData>> => {\n    const mutationOptions: UseMutationOptions<FooBarPostResponse, DefaultError, Options<FooBarPostData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await fooBarPost({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const fooBarPutC = (options?: Partial<Options<FooBarPutData>>): UseMutationOptions<FooBarPutResponse, DefaultError, Options<FooBarPutData>> => {\n    const mutationOptions: UseMutationOptions<FooBarPutResponse, DefaultError, Options<FooBarPutData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await fooBarPut({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/react-query/name-builder/client/client.gen.ts",
    "content": "// 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 (options: RequestOptions) => {\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 url = buildUrl(opts);\n\n    return { opts, url };\n  };\n\n  const request: Client['request'] = async (options) => {\n    // @ts-expect-error\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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/react-query/name-builder/client/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type { Auth } from '../core/auth.gen';\nexport type { QuerySerializerOptions } from '../core/bodySerializer.gen';\nexport {\n  formDataBodySerializer,\n  jsonBodySerializer,\n  urlSearchParamsBodySerializer,\n} from '../core/bodySerializer.gen';\nexport { buildClientParams } from '../core/params.gen';\nexport { serializeQueryKeyValue } from '../core/queryKeySerializer.gen';\nexport { createClient } from './client.gen';\nexport type {\n  Client,\n  ClientOptions,\n  Config,\n  CreateClientConfig,\n  Options,\n  RequestOptions,\n  RequestResult,\n  ResolvedRequestOptions,\n  ResponseStyle,\n  TDataShape,\n} from './types.gen';\nexport { createConfig, mergeHeaders } from './utils.gen';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/react-query/name-builder/client/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { Auth } from '../core/auth.gen';\nimport type {\n  ServerSentEventsOptions,\n  ServerSentEventsResult,\n} from '../core/serverSentEvents.gen';\nimport type { Client as CoreClient, Config as CoreConfig } from '../core/types.gen';\nimport type { Middleware } from './utils.gen';\n\nexport type ResponseStyle = 'data' | 'fields';\n\nexport interface Config<T extends ClientOptions = ClientOptions>\n  extends Omit<RequestInit, 'body' | 'headers' | 'method'>, CoreConfig {\n  /**\n   * Base URL for all requests made by this client.\n   */\n  baseUrl?: T['baseUrl'];\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   * Please don't use the Fetch client for Next.js applications. The `next`\n   * options won't have any effect.\n   *\n   * Install {@link https://www.npmjs.com/package/@hey-api/client-next `@hey-api/client-next`} instead.\n   */\n  next?: never;\n  /**\n   * Return the response data parsed in a specified format. By default, `auto`\n   * will infer the appropriate method from the `Content-Type` response header.\n   * You can override this behavior with any of the {@link Body} methods.\n   * Select `stream` if you don't want to parse response data at all.\n   *\n   * @default 'auto'\n   */\n  parseAs?: 'arrayBuffer' | 'auto' | 'blob' | 'formData' | 'json' | 'stream' | 'text';\n  /**\n   * Should we return only data or multiple fields (data, error, response, etc.)?\n   *\n   * @default 'fields'\n   */\n  responseStyle?: ResponseStyle;\n  /**\n   * Throw an error instead of returning it in the response?\n   *\n   * @default false\n   */\n  throwOnError?: T['throwOnError'];\n}\n\nexport interface RequestOptions<\n  TData = unknown,\n  TResponseStyle extends ResponseStyle = 'fields',\n  ThrowOnError extends boolean = boolean,\n  Url extends string = string,\n>\n  extends\n    Config<{\n      responseStyle: TResponseStyle;\n      throwOnError: ThrowOnError;\n    }>,\n    Pick<\n      ServerSentEventsOptions<TData>,\n      | 'onRequest'\n      | 'onSseError'\n      | 'onSseEvent'\n      | 'sseDefaultRetryDelay'\n      | 'sseMaxRetryAttempts'\n      | 'sseMaxRetryDelay'\n    > {\n  /**\n   * Any body that you want to add to your request.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/fetch#body}\n   */\n  body?: unknown;\n  path?: Record<string, unknown>;\n  query?: Record<string, unknown>;\n  /**\n   * Security mechanism(s) to use for the request.\n   */\n  security?: ReadonlyArray<Auth>;\n  url: Url;\n}\n\nexport interface ResolvedRequestOptions<\n  TResponseStyle extends ResponseStyle = 'fields',\n  ThrowOnError extends boolean = boolean,\n  Url extends string = string,\n> extends RequestOptions<unknown, TResponseStyle, ThrowOnError, Url> {\n  serializedBody?: string;\n}\n\nexport type RequestResult<\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = boolean,\n  TResponseStyle extends ResponseStyle = 'fields',\n> = ThrowOnError extends true\n  ? Promise<\n      TResponseStyle extends 'data'\n        ? TData extends Record<string, unknown>\n          ? TData[keyof TData]\n          : TData\n        : {\n            data: TData extends Record<string, unknown> ? TData[keyof TData] : TData;\n            request: Request;\n            response: Response;\n          }\n    >\n  : Promise<\n      TResponseStyle extends 'data'\n        ? (TData extends Record<string, unknown> ? TData[keyof TData] : TData) | undefined\n        : (\n            | {\n                data: TData extends Record<string, unknown> ? TData[keyof TData] : TData;\n                error: undefined;\n              }\n            | {\n                data: undefined;\n                error: TError extends Record<string, unknown> ? TError[keyof TError] : TError;\n              }\n          ) & {\n            request: Request;\n            response: Response;\n          }\n    >;\n\nexport interface ClientOptions {\n  baseUrl?: string;\n  responseStyle?: ResponseStyle;\n  throwOnError?: boolean;\n}\n\ntype MethodFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'>,\n) => RequestResult<TData, TError, ThrowOnError, TResponseStyle>;\n\ntype SseFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'>,\n) => Promise<ServerSentEventsResult<TData, TError>>;\n\ntype RequestFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'> &\n    Pick<Required<RequestOptions<TData, TResponseStyle, ThrowOnError>>, 'method'>,\n) => RequestResult<TData, TError, ThrowOnError, TResponseStyle>;\n\ntype BuildUrlFn = <\n  TData extends {\n    body?: unknown;\n    path?: Record<string, unknown>;\n    query?: Record<string, unknown>;\n    url: string;\n  },\n>(\n  options: TData & Options<TData>,\n) => string;\n\nexport type Client = CoreClient<RequestFn, Config, MethodFn, BuildUrlFn, SseFn> & {\n  interceptors: Middleware<Request, Response, unknown, ResolvedRequestOptions>;\n};\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 = ClientOptions> = (\n  override?: Config<ClientOptions & T>,\n) => Config<Required<ClientOptions> & T>;\n\nexport interface TDataShape {\n  body?: unknown;\n  headers?: unknown;\n  path?: unknown;\n  query?: unknown;\n  url: string;\n}\n\ntype OmitKeys<T, K> = Pick<T, Exclude<keyof T, K>>;\n\nexport type Options<\n  TData extends TDataShape = TDataShape,\n  ThrowOnError extends boolean = boolean,\n  TResponse = unknown,\n  TResponseStyle extends ResponseStyle = 'fields',\n> = OmitKeys<\n  RequestOptions<TResponse, TResponseStyle, ThrowOnError>,\n  'body' | 'path' | 'query' | 'url'\n> &\n  ([TData] extends [never] ? unknown : Omit<TData, 'url'>);\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/react-query/name-builder/client/utils.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/react-query/name-builder/client.gen.ts",
    "content": "// 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>());\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/react-query/name-builder/core/auth.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/react-query/name-builder/core/bodySerializer.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/react-query/name-builder/core/params.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/react-query/name-builder/core/pathSerializer.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/react-query/name-builder/core/queryKeySerializer.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\n/**\n * JSON-friendly union that mirrors what Pinia Colada can hash.\n */\nexport type JsonValue =\n  | null\n  | string\n  | number\n  | boolean\n  | JsonValue[]\n  | { [key: string]: JsonValue };\n\n/**\n * Replacer that converts non-JSON values (bigint, Date, etc.) to safe substitutes.\n */\nexport const queryKeyJsonReplacer = (_key: string, value: unknown) => {\n  if (value === undefined || typeof value === 'function' || typeof value === 'symbol') {\n    return undefined;\n  }\n  if (typeof value === 'bigint') {\n    return value.toString();\n  }\n  if (value instanceof Date) {\n    return value.toISOString();\n  }\n  return value;\n};\n\n/**\n * Safely stringifies a value and parses it back into a JsonValue.\n */\nexport const stringifyToJsonValue = (input: unknown): JsonValue | undefined => {\n  try {\n    const json = JSON.stringify(input, queryKeyJsonReplacer);\n    if (json === undefined) {\n      return undefined;\n    }\n    return JSON.parse(json) as JsonValue;\n  } catch {\n    return undefined;\n  }\n};\n\n/**\n * Detects plain objects (including objects with a null prototype).\n */\nconst isPlainObject = (value: unknown): value is Record<string, unknown> => {\n  if (value === null || typeof value !== 'object') {\n    return false;\n  }\n  const prototype = Object.getPrototypeOf(value as object);\n  return prototype === Object.prototype || prototype === null;\n};\n\n/**\n * Turns URLSearchParams into a sorted JSON object for deterministic keys.\n */\nconst serializeSearchParams = (params: URLSearchParams): JsonValue => {\n  const entries = Array.from(params.entries()).sort(([a], [b]) => a.localeCompare(b));\n  const result: Record<string, JsonValue> = {};\n\n  for (const [key, value] of entries) {\n    const existing = result[key];\n    if (existing === undefined) {\n      result[key] = value;\n      continue;\n    }\n\n    if (Array.isArray(existing)) {\n      (existing as string[]).push(value);\n    } else {\n      result[key] = [existing, value];\n    }\n  }\n\n  return result;\n};\n\n/**\n * Normalizes any accepted value into a JSON-friendly shape for query keys.\n */\nexport const serializeQueryKeyValue = (value: unknown): JsonValue | undefined => {\n  if (value === null) {\n    return null;\n  }\n\n  if (typeof value === 'string' || typeof value === 'number' || typeof value === 'boolean') {\n    return value;\n  }\n\n  if (value === undefined || typeof value === 'function' || typeof value === 'symbol') {\n    return undefined;\n  }\n\n  if (typeof value === 'bigint') {\n    return value.toString();\n  }\n\n  if (value instanceof Date) {\n    return value.toISOString();\n  }\n\n  if (Array.isArray(value)) {\n    return stringifyToJsonValue(value);\n  }\n\n  if (typeof URLSearchParams !== 'undefined' && value instanceof URLSearchParams) {\n    return serializeSearchParams(value);\n  }\n\n  if (isPlainObject(value)) {\n    return stringifyToJsonValue(value);\n  }\n\n  return undefined;\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/react-query/name-builder/core/serverSentEvents.gen.ts",
    "content": "// 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 const 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            // Normalize line endings: CRLF -> LF, then CR -> LF\n            buffer = buffer.replace(/\\r\\n/g, '\\n').replace(/\\r/g, '\\n');\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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/react-query/name-builder/core/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { Auth, AuthToken } from './auth.gen';\nimport type { BodySerializer, QuerySerializer, QuerySerializerOptions } from './bodySerializer.gen';\n\nexport type HttpMethod =\n  | 'connect'\n  | 'delete'\n  | 'get'\n  | 'head'\n  | 'options'\n  | 'patch'\n  | 'post'\n  | 'put'\n  | 'trace';\n\nexport type Client<\n  RequestFn = never,\n  Config = unknown,\n  MethodFn = never,\n  BuildUrlFn = never,\n  SseFn = never,\n> = {\n  /**\n   * Returns the final request URL.\n   */\n  buildUrl: BuildUrlFn;\n  getConfig: () => Config;\n  request: RequestFn;\n  setConfig: (config: Config) => Config;\n} & {\n  [K in HttpMethod]: MethodFn;\n} & ([SseFn] extends [never] ? { sse?: never } : { sse: { [K in HttpMethod]: SseFn } });\n\nexport interface Config {\n  /**\n   * Auth token or a function returning auth token. The resolved value will be\n   * added to the request payload as defined by its `security` array.\n   */\n  auth?: ((auth: Auth) => Promise<AuthToken> | AuthToken) | AuthToken;\n  /**\n   * A function for serializing request body parameter. By default,\n   * {@link JSON.stringify()} will be used.\n   */\n  bodySerializer?: BodySerializer | null;\n  /**\n   * An object containing any HTTP headers that you want to pre-populate your\n   * `Headers` object with.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/Headers/Headers#init See more}\n   */\n  headers?:\n    | RequestInit['headers']\n    | Record<\n        string,\n        string | number | boolean | (string | number | boolean)[] | null | undefined | unknown\n      >;\n  /**\n   * The request method.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/fetch#method See more}\n   */\n  method?: Uppercase<HttpMethod>;\n  /**\n   * A function for serializing request query parameters. By default, arrays\n   * will be exploded in form style, objects will be exploded in deepObject\n   * style, and reserved characters are percent-encoded.\n   *\n   * This method will have no effect if the native `paramsSerializer()` Axios\n   * API function is used.\n   *\n   * {@link https://swagger.io/docs/specification/serialization/#query View examples}\n   */\n  querySerializer?: QuerySerializer | QuerySerializerOptions;\n  /**\n   * A function validating request data. This is useful if you want to ensure\n   * the request conforms to the desired shape, so it can be safely sent to\n   * the server.\n   */\n  requestValidator?: (data: unknown) => Promise<unknown>;\n  /**\n   * A function transforming response data before it's returned. This is useful\n   * for post-processing data, e.g. converting ISO strings into Date objects.\n   */\n  responseTransformer?: (data: unknown) => Promise<unknown>;\n  /**\n   * A function validating response data. This is useful if you want to ensure\n   * the response conforms to the desired shape, so it can be safely passed to\n   * the transformers and returned to the user.\n   */\n  responseValidator?: (data: unknown) => Promise<unknown>;\n}\n\ntype IsExactlyNeverOrNeverUndefined<T> = [T] extends [never]\n  ? true\n  : [T] extends [never | undefined]\n    ? [undefined] extends [T]\n      ? false\n      : true\n    : false;\n\nexport type OmitNever<T extends Record<string, unknown>> = {\n  [K in keyof T as IsExactlyNeverOrNeverUndefined<T[K]> extends true ? never : K]: T[K];\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/react-query/name-builder/core/utils.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/react-query/name-builder/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport { fooBarPost, fooBarPut, fooPost, fooPut, getFoo, getFooBar, type Options } from './sdk.gen';\nexport type { ClientOptions, FooBarPostData, FooBarPostResponse, FooBarPostResponses, FooBarPutData, FooBarPutResponse, FooBarPutResponses, FooPostData, FooPostResponse, FooPostResponses, FooPutData, FooPutResponse, FooPutResponses, GetFooBarData, GetFooBarResponse, GetFooBarResponses, GetFooData, GetFooResponse, GetFooResponses } from './types.gen';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/react-query/name-builder/sdk.gen.ts",
    "content": "// 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 { FooBarPostData, FooBarPostResponses, FooBarPutData, FooBarPutResponses, FooPostData, FooPostResponses, FooPutData, FooPutResponses, GetFooBarData, GetFooBarResponses, GetFooData, GetFooResponses } from './types.gen';\n\nexport type Options<TData extends TDataShape = TDataShape, ThrowOnError extends boolean = boolean> = Options2<TData, ThrowOnError> & {\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\nexport const getFoo = <ThrowOnError extends boolean = false>(options?: Options<GetFooData, ThrowOnError>) => (options?.client ?? client).get<GetFooResponses, unknown, ThrowOnError>({ url: '/foo', ...options });\n\nexport const fooPost = <ThrowOnError extends boolean = false>(options?: Options<FooPostData, ThrowOnError>) => (options?.client ?? client).post<FooPostResponses, unknown, ThrowOnError>({ url: '/foo', ...options });\n\nexport const fooPut = <ThrowOnError extends boolean = false>(options?: Options<FooPutData, ThrowOnError>) => (options?.client ?? client).put<FooPutResponses, unknown, ThrowOnError>({ url: '/foo', ...options });\n\nexport const getFooBar = <ThrowOnError extends boolean = false>(options?: Options<GetFooBarData, ThrowOnError>) => (options?.client ?? client).get<GetFooBarResponses, unknown, ThrowOnError>({ url: '/foo/bar', ...options });\n\nexport const fooBarPost = <ThrowOnError extends boolean = false>(options?: Options<FooBarPostData, ThrowOnError>) => (options?.client ?? client).post<FooBarPostResponses, unknown, ThrowOnError>({ url: '/foo/bar', ...options });\n\nexport const fooBarPut = <ThrowOnError extends boolean = false>(options?: Options<FooBarPutData, ThrowOnError>) => (options?.client ?? client).put<FooBarPutResponses, unknown, ThrowOnError>({ url: '/foo/bar', ...options });\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/react-query/name-builder/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type ClientOptions = {\n    baseUrl: string;\n};\n\nexport type GetFooData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/foo';\n};\n\nexport type GetFooResponses = {\n    /**\n     * OK\n     */\n    200: string;\n};\n\nexport type GetFooResponse = GetFooResponses[keyof GetFooResponses];\n\nexport type FooPostData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/foo';\n};\n\nexport type FooPostResponses = {\n    /**\n     * OK\n     */\n    200: string;\n};\n\nexport type FooPostResponse = FooPostResponses[keyof FooPostResponses];\n\nexport type FooPutData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/foo';\n};\n\nexport type FooPutResponses = {\n    /**\n     * OK\n     */\n    200: string;\n};\n\nexport type FooPutResponse = FooPutResponses[keyof FooPutResponses];\n\nexport type GetFooBarData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/foo/bar';\n};\n\nexport type GetFooBarResponses = {\n    /**\n     * OK\n     */\n    200: string;\n};\n\nexport type GetFooBarResponse = GetFooBarResponses[keyof GetFooBarResponses];\n\nexport type FooBarPostData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/foo/bar';\n};\n\nexport type FooBarPostResponses = {\n    /**\n     * OK\n     */\n    200: string;\n};\n\nexport type FooBarPostResponse = FooBarPostResponses[keyof FooBarPostResponses];\n\nexport type FooBarPutData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/foo/bar';\n};\n\nexport type FooBarPutResponses = {\n    /**\n     * OK\n     */\n    200: string;\n};\n\nexport type FooBarPutResponse = FooBarPutResponses[keyof FooBarPutResponses];\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/react-query/useMutation/@tanstack/react-query.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport { type DefaultError, queryOptions, useMutation, type UseMutationOptions } from '@tanstack/react-query';\n\nimport { client } from '../client.gen';\nimport { callToTestOrderOfParams, callWithDefaultOptionalParameters, callWithDefaultParameters, callWithDescriptions, callWithDuplicateResponses, callWithNoContentResponse, callWithParameters, callWithResponse, callWithResponseAndNoContentResponse, callWithResponses, callWithResultFromHeader, callWithWeirdParameterNames, collectionFormat, complexTypes, deleteCallWithoutParametersAndResponse, dummyA, dummyB, duplicateName, duplicateName2, duplicateName3, duplicateName4, fooWow, getCallWithoutParametersAndResponse, nonAsciiæøåÆøÅöôêÊ字符串, type Options, patchApiVbyApiVersionNoTag, patchCallWithoutParametersAndResponse, postApiVbyApiVersionBody, postCallWithoutParametersAndResponse, putCallWithoutParametersAndResponse, serviceWithEmptyTag, testErrorCode, types } from '../sdk.gen';\nimport type { CallToTestOrderOfParamsData, CallWithDefaultOptionalParametersData, CallWithDefaultParametersData, CallWithDescriptionsData, CallWithDuplicateResponsesData, CallWithDuplicateResponsesError, CallWithDuplicateResponsesResponse, CallWithNoContentResponseData, CallWithParametersData, CallWithResponseAndNoContentResponseData, CallWithResponseAndNoContentResponseResponse, CallWithResponseData, CallWithResponseResponse, CallWithResponsesData, CallWithResponsesError, CallWithResponsesResponse, CallWithResultFromHeaderData, CallWithWeirdParameterNamesData, CollectionFormatData, ComplexTypesData, ComplexTypesResponse, DeleteCallWithoutParametersAndResponseData, DummyAData, DummyBData, DuplicateName2Data, DuplicateName3Data, DuplicateName4Data, DuplicateNameData, FooWowData, GetCallWithoutParametersAndResponseData, NonAsciiæøåÆøÅöôêÊ字符串Data, NonAsciiæøåÆøÅöôêÊ字符串Response, PatchApiVbyApiVersionNoTagData, PatchCallWithoutParametersAndResponseData, PostApiVbyApiVersionBodyData, PostApiVbyApiVersionBodyError, PostApiVbyApiVersionBodyResponse, PostCallWithoutParametersAndResponseData, PutCallWithoutParametersAndResponseData, ServiceWithEmptyTagData, TestErrorCodeData, TypesData, TypesResponse } from '../types.gen';\n\nexport type QueryKey<TOptions extends Options> = [\n    Pick<TOptions, 'baseUrl' | 'body' | 'headers' | 'path' | 'query'> & {\n        _id: string;\n        _infinite?: boolean;\n        tags?: ReadonlyArray<string>;\n    }\n];\n\nconst createQueryKey = <TOptions extends Options>(id: string, options?: TOptions, infinite?: boolean, tags?: ReadonlyArray<string>): [\n    QueryKey<TOptions>[0]\n] => {\n    const params: QueryKey<TOptions>[0] = { _id: id, baseUrl: options?.baseUrl || (options?.client ?? client).getConfig().baseUrl } as QueryKey<TOptions>[0];\n    if (infinite) {\n        params._infinite = infinite;\n    }\n    if (tags) {\n        params.tags = tags;\n    }\n    if (options?.body) {\n        params.body = options.body;\n    }\n    if (options?.headers) {\n        params.headers = options.headers;\n    }\n    if (options?.path) {\n        params.path = options.path;\n    }\n    if (options?.query) {\n        params.query = options.query;\n    }\n    return [params];\n};\n\nexport const serviceWithEmptyTagQueryKey = (options?: Options<ServiceWithEmptyTagData>) => createQueryKey('serviceWithEmptyTag', options);\n\nexport const serviceWithEmptyTagOptions = (options?: Options<ServiceWithEmptyTagData>) => queryOptions<unknown, DefaultError, unknown, ReturnType<typeof serviceWithEmptyTagQueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await serviceWithEmptyTag({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: serviceWithEmptyTagQueryKey(options)\n});\n\nexport const patchApiVbyApiVersionNoTagMutation = (options?: Partial<Options<PatchApiVbyApiVersionNoTagData>>): UseMutationOptions<unknown, DefaultError, Options<PatchApiVbyApiVersionNoTagData>> => {\n    const mutationOptions: UseMutationOptions<unknown, DefaultError, Options<PatchApiVbyApiVersionNoTagData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await patchApiVbyApiVersionNoTag({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const usePatchApiVbyApiVersionNoTagMutation = (mutationOptions?: Partial<Omit<UseMutationOptions<unknown, DefaultError, Options<PatchApiVbyApiVersionNoTagData>>, 'mutationFn'>>) => useMutation({ ...patchApiVbyApiVersionNoTagMutation(), ...mutationOptions });\n\nexport const fooWowMutation = (options?: Partial<Options<FooWowData>>): UseMutationOptions<unknown, DefaultError, Options<FooWowData>> => {\n    const mutationOptions: UseMutationOptions<unknown, DefaultError, Options<FooWowData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await fooWow({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const useFooWowMutation = (mutationOptions?: Partial<Omit<UseMutationOptions<unknown, DefaultError, Options<FooWowData>>, 'mutationFn'>>) => useMutation({ ...fooWowMutation(), ...mutationOptions });\n\nexport const deleteCallWithoutParametersAndResponseMutation = (options?: Partial<Options<DeleteCallWithoutParametersAndResponseData>>): UseMutationOptions<unknown, DefaultError, Options<DeleteCallWithoutParametersAndResponseData>> => {\n    const mutationOptions: UseMutationOptions<unknown, DefaultError, Options<DeleteCallWithoutParametersAndResponseData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await deleteCallWithoutParametersAndResponse({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const useDeleteCallWithoutParametersAndResponseMutation = (mutationOptions?: Partial<Omit<UseMutationOptions<unknown, DefaultError, Options<DeleteCallWithoutParametersAndResponseData>>, 'mutationFn'>>) => useMutation({ ...deleteCallWithoutParametersAndResponseMutation(), ...mutationOptions });\n\nexport const getCallWithoutParametersAndResponseQueryKey = (options?: Options<GetCallWithoutParametersAndResponseData>) => createQueryKey('getCallWithoutParametersAndResponse', options);\n\nexport const getCallWithoutParametersAndResponseOptions = (options?: Options<GetCallWithoutParametersAndResponseData>) => queryOptions<unknown, DefaultError, unknown, ReturnType<typeof getCallWithoutParametersAndResponseQueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await getCallWithoutParametersAndResponse({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: getCallWithoutParametersAndResponseQueryKey(options)\n});\n\nexport const patchCallWithoutParametersAndResponseMutation = (options?: Partial<Options<PatchCallWithoutParametersAndResponseData>>): UseMutationOptions<unknown, DefaultError, Options<PatchCallWithoutParametersAndResponseData>> => {\n    const mutationOptions: UseMutationOptions<unknown, DefaultError, Options<PatchCallWithoutParametersAndResponseData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await patchCallWithoutParametersAndResponse({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const usePatchCallWithoutParametersAndResponseMutation = (mutationOptions?: Partial<Omit<UseMutationOptions<unknown, DefaultError, Options<PatchCallWithoutParametersAndResponseData>>, 'mutationFn'>>) => useMutation({ ...patchCallWithoutParametersAndResponseMutation(), ...mutationOptions });\n\nexport const postCallWithoutParametersAndResponseMutation = (options?: Partial<Options<PostCallWithoutParametersAndResponseData>>): UseMutationOptions<unknown, DefaultError, Options<PostCallWithoutParametersAndResponseData>> => {\n    const mutationOptions: UseMutationOptions<unknown, DefaultError, Options<PostCallWithoutParametersAndResponseData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await postCallWithoutParametersAndResponse({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const usePostCallWithoutParametersAndResponseMutation = (mutationOptions?: Partial<Omit<UseMutationOptions<unknown, DefaultError, Options<PostCallWithoutParametersAndResponseData>>, 'mutationFn'>>) => useMutation({ ...postCallWithoutParametersAndResponseMutation(), ...mutationOptions });\n\nexport const putCallWithoutParametersAndResponseMutation = (options?: Partial<Options<PutCallWithoutParametersAndResponseData>>): UseMutationOptions<unknown, DefaultError, Options<PutCallWithoutParametersAndResponseData>> => {\n    const mutationOptions: UseMutationOptions<unknown, DefaultError, Options<PutCallWithoutParametersAndResponseData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await putCallWithoutParametersAndResponse({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const usePutCallWithoutParametersAndResponseMutation = (mutationOptions?: Partial<Omit<UseMutationOptions<unknown, DefaultError, Options<PutCallWithoutParametersAndResponseData>>, 'mutationFn'>>) => useMutation({ ...putCallWithoutParametersAndResponseMutation(), ...mutationOptions });\n\nexport const callWithDescriptionsMutation = (options?: Partial<Options<CallWithDescriptionsData>>): UseMutationOptions<unknown, DefaultError, Options<CallWithDescriptionsData>> => {\n    const mutationOptions: UseMutationOptions<unknown, DefaultError, Options<CallWithDescriptionsData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await callWithDescriptions({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const useCallWithDescriptionsMutation = (mutationOptions?: Partial<Omit<UseMutationOptions<unknown, DefaultError, Options<CallWithDescriptionsData>>, 'mutationFn'>>) => useMutation({ ...callWithDescriptionsMutation(), ...mutationOptions });\n\nexport const callWithParametersMutation = (options?: Partial<Options<CallWithParametersData>>): UseMutationOptions<unknown, DefaultError, Options<CallWithParametersData>> => {\n    const mutationOptions: UseMutationOptions<unknown, DefaultError, Options<CallWithParametersData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await callWithParameters({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const useCallWithParametersMutation = (mutationOptions?: Partial<Omit<UseMutationOptions<unknown, DefaultError, Options<CallWithParametersData>>, 'mutationFn'>>) => useMutation({ ...callWithParametersMutation(), ...mutationOptions });\n\nexport const callWithWeirdParameterNamesMutation = (options?: Partial<Options<CallWithWeirdParameterNamesData>>): UseMutationOptions<unknown, DefaultError, Options<CallWithWeirdParameterNamesData>> => {\n    const mutationOptions: UseMutationOptions<unknown, DefaultError, Options<CallWithWeirdParameterNamesData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await callWithWeirdParameterNames({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const useCallWithWeirdParameterNamesMutation = (mutationOptions?: Partial<Omit<UseMutationOptions<unknown, DefaultError, Options<CallWithWeirdParameterNamesData>>, 'mutationFn'>>) => useMutation({ ...callWithWeirdParameterNamesMutation(), ...mutationOptions });\n\nexport const callWithDefaultParametersQueryKey = (options: Options<CallWithDefaultParametersData>) => createQueryKey('callWithDefaultParameters', options);\n\nexport const callWithDefaultParametersOptions = (options: Options<CallWithDefaultParametersData>) => queryOptions<unknown, DefaultError, unknown, ReturnType<typeof callWithDefaultParametersQueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await callWithDefaultParameters({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: callWithDefaultParametersQueryKey(options)\n});\n\nexport const callWithDefaultOptionalParametersMutation = (options?: Partial<Options<CallWithDefaultOptionalParametersData>>): UseMutationOptions<unknown, DefaultError, Options<CallWithDefaultOptionalParametersData>> => {\n    const mutationOptions: UseMutationOptions<unknown, DefaultError, Options<CallWithDefaultOptionalParametersData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await callWithDefaultOptionalParameters({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const useCallWithDefaultOptionalParametersMutation = (mutationOptions?: Partial<Omit<UseMutationOptions<unknown, DefaultError, Options<CallWithDefaultOptionalParametersData>>, 'mutationFn'>>) => useMutation({ ...callWithDefaultOptionalParametersMutation(), ...mutationOptions });\n\nexport const callToTestOrderOfParamsMutation = (options?: Partial<Options<CallToTestOrderOfParamsData>>): UseMutationOptions<unknown, DefaultError, Options<CallToTestOrderOfParamsData>> => {\n    const mutationOptions: UseMutationOptions<unknown, DefaultError, Options<CallToTestOrderOfParamsData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await callToTestOrderOfParams({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const useCallToTestOrderOfParamsMutation = (mutationOptions?: Partial<Omit<UseMutationOptions<unknown, DefaultError, Options<CallToTestOrderOfParamsData>>, 'mutationFn'>>) => useMutation({ ...callToTestOrderOfParamsMutation(), ...mutationOptions });\n\nexport const duplicateNameMutation = (options?: Partial<Options<DuplicateNameData>>): UseMutationOptions<unknown, DefaultError, Options<DuplicateNameData>> => {\n    const mutationOptions: UseMutationOptions<unknown, DefaultError, Options<DuplicateNameData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await duplicateName({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const useDuplicateNameMutation = (mutationOptions?: Partial<Omit<UseMutationOptions<unknown, DefaultError, Options<DuplicateNameData>>, 'mutationFn'>>) => useMutation({ ...duplicateNameMutation(), ...mutationOptions });\n\nexport const duplicateName2QueryKey = (options?: Options<DuplicateName2Data>) => createQueryKey('duplicateName2', options);\n\nexport const duplicateName2Options = (options?: Options<DuplicateName2Data>) => queryOptions<unknown, DefaultError, unknown, ReturnType<typeof duplicateName2QueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await duplicateName2({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: duplicateName2QueryKey(options)\n});\n\nexport const duplicateName3Mutation = (options?: Partial<Options<DuplicateName3Data>>): UseMutationOptions<unknown, DefaultError, Options<DuplicateName3Data>> => {\n    const mutationOptions: UseMutationOptions<unknown, DefaultError, Options<DuplicateName3Data>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await duplicateName3({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const useDuplicateName3Mutation = (mutationOptions?: Partial<Omit<UseMutationOptions<unknown, DefaultError, Options<DuplicateName3Data>>, 'mutationFn'>>) => useMutation({ ...duplicateName3Mutation(), ...mutationOptions });\n\nexport const duplicateName4Mutation = (options?: Partial<Options<DuplicateName4Data>>): UseMutationOptions<unknown, DefaultError, Options<DuplicateName4Data>> => {\n    const mutationOptions: UseMutationOptions<unknown, DefaultError, Options<DuplicateName4Data>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await duplicateName4({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const useDuplicateName4Mutation = (mutationOptions?: Partial<Omit<UseMutationOptions<unknown, DefaultError, Options<DuplicateName4Data>>, 'mutationFn'>>) => useMutation({ ...duplicateName4Mutation(), ...mutationOptions });\n\nexport const callWithNoContentResponseQueryKey = (options?: Options<CallWithNoContentResponseData>) => createQueryKey('callWithNoContentResponse', options);\n\nexport const callWithNoContentResponseOptions = (options?: Options<CallWithNoContentResponseData>) => queryOptions<unknown, DefaultError, unknown, ReturnType<typeof callWithNoContentResponseQueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await callWithNoContentResponse({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: callWithNoContentResponseQueryKey(options)\n});\n\nexport const callWithResponseAndNoContentResponseQueryKey = (options?: Options<CallWithResponseAndNoContentResponseData>) => createQueryKey('callWithResponseAndNoContentResponse', options);\n\nexport const callWithResponseAndNoContentResponseOptions = (options?: Options<CallWithResponseAndNoContentResponseData>) => queryOptions<CallWithResponseAndNoContentResponseResponse, DefaultError, CallWithResponseAndNoContentResponseResponse, ReturnType<typeof callWithResponseAndNoContentResponseQueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await callWithResponseAndNoContentResponse({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: callWithResponseAndNoContentResponseQueryKey(options)\n});\n\nexport const dummyAQueryKey = (options?: Options<DummyAData>) => createQueryKey('dummyA', options);\n\nexport const dummyAOptions = (options?: Options<DummyAData>) => queryOptions<unknown, DefaultError, unknown, ReturnType<typeof dummyAQueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await dummyA({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: dummyAQueryKey(options)\n});\n\nexport const dummyBQueryKey = (options?: Options<DummyBData>) => createQueryKey('dummyB', options);\n\nexport const dummyBOptions = (options?: Options<DummyBData>) => queryOptions<unknown, DefaultError, unknown, ReturnType<typeof dummyBQueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await dummyB({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: dummyBQueryKey(options)\n});\n\nexport const callWithResponseQueryKey = (options?: Options<CallWithResponseData>) => createQueryKey('callWithResponse', options);\n\nexport const callWithResponseOptions = (options?: Options<CallWithResponseData>) => queryOptions<CallWithResponseResponse, DefaultError, CallWithResponseResponse, ReturnType<typeof callWithResponseQueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await callWithResponse({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: callWithResponseQueryKey(options)\n});\n\nexport const callWithDuplicateResponsesMutation = (options?: Partial<Options<CallWithDuplicateResponsesData>>): UseMutationOptions<CallWithDuplicateResponsesResponse, CallWithDuplicateResponsesError, Options<CallWithDuplicateResponsesData>> => {\n    const mutationOptions: UseMutationOptions<CallWithDuplicateResponsesResponse, CallWithDuplicateResponsesError, Options<CallWithDuplicateResponsesData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await callWithDuplicateResponses({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const useCallWithDuplicateResponsesMutation = (mutationOptions?: Partial<Omit<UseMutationOptions<CallWithDuplicateResponsesResponse, CallWithDuplicateResponsesError, Options<CallWithDuplicateResponsesData>>, 'mutationFn'>>) => useMutation({ ...callWithDuplicateResponsesMutation(), ...mutationOptions });\n\nexport const callWithResponsesMutation = (options?: Partial<Options<CallWithResponsesData>>): UseMutationOptions<CallWithResponsesResponse, CallWithResponsesError, Options<CallWithResponsesData>> => {\n    const mutationOptions: UseMutationOptions<CallWithResponsesResponse, CallWithResponsesError, Options<CallWithResponsesData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await callWithResponses({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const useCallWithResponsesMutation = (mutationOptions?: Partial<Omit<UseMutationOptions<CallWithResponsesResponse, CallWithResponsesError, Options<CallWithResponsesData>>, 'mutationFn'>>) => useMutation({ ...callWithResponsesMutation(), ...mutationOptions });\n\nexport const collectionFormatQueryKey = (options: Options<CollectionFormatData>) => createQueryKey('collectionFormat', options);\n\nexport const collectionFormatOptions = (options: Options<CollectionFormatData>) => queryOptions<unknown, DefaultError, unknown, ReturnType<typeof collectionFormatQueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await collectionFormat({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: collectionFormatQueryKey(options)\n});\n\nexport const typesQueryKey = (options: Options<TypesData>) => createQueryKey('types', options);\n\nexport const typesOptions = (options: Options<TypesData>) => queryOptions<TypesResponse, DefaultError, TypesResponse, ReturnType<typeof typesQueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await types({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: typesQueryKey(options)\n});\n\nexport const complexTypesQueryKey = (options: Options<ComplexTypesData>) => createQueryKey('complexTypes', options);\n\nexport const complexTypesOptions = (options: Options<ComplexTypesData>) => queryOptions<ComplexTypesResponse, DefaultError, ComplexTypesResponse, ReturnType<typeof complexTypesQueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await complexTypes({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: complexTypesQueryKey(options)\n});\n\nexport const callWithResultFromHeaderMutation = (options?: Partial<Options<CallWithResultFromHeaderData>>): UseMutationOptions<unknown, DefaultError, Options<CallWithResultFromHeaderData>> => {\n    const mutationOptions: UseMutationOptions<unknown, DefaultError, Options<CallWithResultFromHeaderData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await callWithResultFromHeader({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const useCallWithResultFromHeaderMutation = (mutationOptions?: Partial<Omit<UseMutationOptions<unknown, DefaultError, Options<CallWithResultFromHeaderData>>, 'mutationFn'>>) => useMutation({ ...callWithResultFromHeaderMutation(), ...mutationOptions });\n\nexport const testErrorCodeMutation = (options?: Partial<Options<TestErrorCodeData>>): UseMutationOptions<unknown, DefaultError, Options<TestErrorCodeData>> => {\n    const mutationOptions: UseMutationOptions<unknown, DefaultError, Options<TestErrorCodeData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await testErrorCode({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const useTestErrorCodeMutation = (mutationOptions?: Partial<Omit<UseMutationOptions<unknown, DefaultError, Options<TestErrorCodeData>>, 'mutationFn'>>) => useMutation({ ...testErrorCodeMutation(), ...mutationOptions });\n\nexport const nonAsciiæøåÆøÅöôêÊ字符串Mutation = (options?: Partial<Options<NonAsciiæøåÆøÅöôêÊ字符串Data>>): UseMutationOptions<NonAsciiæøåÆøÅöôêÊ字符串Response, DefaultError, Options<NonAsciiæøåÆøÅöôêÊ字符串Data>> => {\n    const mutationOptions: UseMutationOptions<NonAsciiæøåÆøÅöôêÊ字符串Response, DefaultError, Options<NonAsciiæøåÆøÅöôêÊ字符串Data>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await nonAsciiæøåÆøÅöôêÊ字符串({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const useNonAsciiæøåÆøÅöôêÊ字符串Mutation = (mutationOptions?: Partial<Omit<UseMutationOptions<NonAsciiæøåÆøÅöôêÊ字符串Response, DefaultError, Options<NonAsciiæøåÆøÅöôêÊ字符串Data>>, 'mutationFn'>>) => useMutation({ ...nonAsciiæøåÆøÅöôêÊ字符串Mutation(), ...mutationOptions });\n\n/**\n * Body should not be unknown\n *\n * Body should not be unknown\n */\nexport const postApiVbyApiVersionBodyMutation = (options?: Partial<Options<PostApiVbyApiVersionBodyData>>): UseMutationOptions<PostApiVbyApiVersionBodyResponse, PostApiVbyApiVersionBodyError, Options<PostApiVbyApiVersionBodyData>> => {\n    const mutationOptions: UseMutationOptions<PostApiVbyApiVersionBodyResponse, PostApiVbyApiVersionBodyError, Options<PostApiVbyApiVersionBodyData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await postApiVbyApiVersionBody({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\n/**\n * Body should not be unknown\n *\n * Body should not be unknown\n */\nexport const usePostApiVbyApiVersionBodyMutation = (mutationOptions?: Partial<Omit<UseMutationOptions<PostApiVbyApiVersionBodyResponse, PostApiVbyApiVersionBodyError, Options<PostApiVbyApiVersionBodyData>>, 'mutationFn'>>) => useMutation({ ...postApiVbyApiVersionBodyMutation(), ...mutationOptions });\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/react-query/useMutation/client/client.gen.ts",
    "content": "// 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 (options: RequestOptions) => {\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 url = buildUrl(opts);\n\n    return { opts, url };\n  };\n\n  const request: Client['request'] = async (options) => {\n    // @ts-expect-error\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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/react-query/useMutation/client/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type { Auth } from '../core/auth.gen';\nexport type { QuerySerializerOptions } from '../core/bodySerializer.gen';\nexport {\n  formDataBodySerializer,\n  jsonBodySerializer,\n  urlSearchParamsBodySerializer,\n} from '../core/bodySerializer.gen';\nexport { buildClientParams } from '../core/params.gen';\nexport { serializeQueryKeyValue } from '../core/queryKeySerializer.gen';\nexport { createClient } from './client.gen';\nexport type {\n  Client,\n  ClientOptions,\n  Config,\n  CreateClientConfig,\n  Options,\n  RequestOptions,\n  RequestResult,\n  ResolvedRequestOptions,\n  ResponseStyle,\n  TDataShape,\n} from './types.gen';\nexport { createConfig, mergeHeaders } from './utils.gen';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/react-query/useMutation/client/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { Auth } from '../core/auth.gen';\nimport type {\n  ServerSentEventsOptions,\n  ServerSentEventsResult,\n} from '../core/serverSentEvents.gen';\nimport type { Client as CoreClient, Config as CoreConfig } from '../core/types.gen';\nimport type { Middleware } from './utils.gen';\n\nexport type ResponseStyle = 'data' | 'fields';\n\nexport interface Config<T extends ClientOptions = ClientOptions>\n  extends Omit<RequestInit, 'body' | 'headers' | 'method'>, CoreConfig {\n  /**\n   * Base URL for all requests made by this client.\n   */\n  baseUrl?: T['baseUrl'];\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   * Please don't use the Fetch client for Next.js applications. The `next`\n   * options won't have any effect.\n   *\n   * Install {@link https://www.npmjs.com/package/@hey-api/client-next `@hey-api/client-next`} instead.\n   */\n  next?: never;\n  /**\n   * Return the response data parsed in a specified format. By default, `auto`\n   * will infer the appropriate method from the `Content-Type` response header.\n   * You can override this behavior with any of the {@link Body} methods.\n   * Select `stream` if you don't want to parse response data at all.\n   *\n   * @default 'auto'\n   */\n  parseAs?: 'arrayBuffer' | 'auto' | 'blob' | 'formData' | 'json' | 'stream' | 'text';\n  /**\n   * Should we return only data or multiple fields (data, error, response, etc.)?\n   *\n   * @default 'fields'\n   */\n  responseStyle?: ResponseStyle;\n  /**\n   * Throw an error instead of returning it in the response?\n   *\n   * @default false\n   */\n  throwOnError?: T['throwOnError'];\n}\n\nexport interface RequestOptions<\n  TData = unknown,\n  TResponseStyle extends ResponseStyle = 'fields',\n  ThrowOnError extends boolean = boolean,\n  Url extends string = string,\n>\n  extends\n    Config<{\n      responseStyle: TResponseStyle;\n      throwOnError: ThrowOnError;\n    }>,\n    Pick<\n      ServerSentEventsOptions<TData>,\n      | 'onRequest'\n      | 'onSseError'\n      | 'onSseEvent'\n      | 'sseDefaultRetryDelay'\n      | 'sseMaxRetryAttempts'\n      | 'sseMaxRetryDelay'\n    > {\n  /**\n   * Any body that you want to add to your request.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/fetch#body}\n   */\n  body?: unknown;\n  path?: Record<string, unknown>;\n  query?: Record<string, unknown>;\n  /**\n   * Security mechanism(s) to use for the request.\n   */\n  security?: ReadonlyArray<Auth>;\n  url: Url;\n}\n\nexport interface ResolvedRequestOptions<\n  TResponseStyle extends ResponseStyle = 'fields',\n  ThrowOnError extends boolean = boolean,\n  Url extends string = string,\n> extends RequestOptions<unknown, TResponseStyle, ThrowOnError, Url> {\n  serializedBody?: string;\n}\n\nexport type RequestResult<\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = boolean,\n  TResponseStyle extends ResponseStyle = 'fields',\n> = ThrowOnError extends true\n  ? Promise<\n      TResponseStyle extends 'data'\n        ? TData extends Record<string, unknown>\n          ? TData[keyof TData]\n          : TData\n        : {\n            data: TData extends Record<string, unknown> ? TData[keyof TData] : TData;\n            request: Request;\n            response: Response;\n          }\n    >\n  : Promise<\n      TResponseStyle extends 'data'\n        ? (TData extends Record<string, unknown> ? TData[keyof TData] : TData) | undefined\n        : (\n            | {\n                data: TData extends Record<string, unknown> ? TData[keyof TData] : TData;\n                error: undefined;\n              }\n            | {\n                data: undefined;\n                error: TError extends Record<string, unknown> ? TError[keyof TError] : TError;\n              }\n          ) & {\n            request: Request;\n            response: Response;\n          }\n    >;\n\nexport interface ClientOptions {\n  baseUrl?: string;\n  responseStyle?: ResponseStyle;\n  throwOnError?: boolean;\n}\n\ntype MethodFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'>,\n) => RequestResult<TData, TError, ThrowOnError, TResponseStyle>;\n\ntype SseFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'>,\n) => Promise<ServerSentEventsResult<TData, TError>>;\n\ntype RequestFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'> &\n    Pick<Required<RequestOptions<TData, TResponseStyle, ThrowOnError>>, 'method'>,\n) => RequestResult<TData, TError, ThrowOnError, TResponseStyle>;\n\ntype BuildUrlFn = <\n  TData extends {\n    body?: unknown;\n    path?: Record<string, unknown>;\n    query?: Record<string, unknown>;\n    url: string;\n  },\n>(\n  options: TData & Options<TData>,\n) => string;\n\nexport type Client = CoreClient<RequestFn, Config, MethodFn, BuildUrlFn, SseFn> & {\n  interceptors: Middleware<Request, Response, unknown, ResolvedRequestOptions>;\n};\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 = ClientOptions> = (\n  override?: Config<ClientOptions & T>,\n) => Config<Required<ClientOptions> & T>;\n\nexport interface TDataShape {\n  body?: unknown;\n  headers?: unknown;\n  path?: unknown;\n  query?: unknown;\n  url: string;\n}\n\ntype OmitKeys<T, K> = Pick<T, Exclude<keyof T, K>>;\n\nexport type Options<\n  TData extends TDataShape = TDataShape,\n  ThrowOnError extends boolean = boolean,\n  TResponse = unknown,\n  TResponseStyle extends ResponseStyle = 'fields',\n> = OmitKeys<\n  RequestOptions<TResponse, TResponseStyle, ThrowOnError>,\n  'body' | 'path' | 'query' | 'url'\n> &\n  ([TData] extends [never] ? unknown : Omit<TData, 'url'>);\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/react-query/useMutation/client/utils.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/react-query/useMutation/client.gen.ts",
    "content": "// 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: 'http://localhost:3000/base' }));\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/react-query/useMutation/core/auth.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/react-query/useMutation/core/bodySerializer.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/react-query/useMutation/core/params.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/react-query/useMutation/core/pathSerializer.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/react-query/useMutation/core/queryKeySerializer.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\n/**\n * JSON-friendly union that mirrors what Pinia Colada can hash.\n */\nexport type JsonValue =\n  | null\n  | string\n  | number\n  | boolean\n  | JsonValue[]\n  | { [key: string]: JsonValue };\n\n/**\n * Replacer that converts non-JSON values (bigint, Date, etc.) to safe substitutes.\n */\nexport const queryKeyJsonReplacer = (_key: string, value: unknown) => {\n  if (value === undefined || typeof value === 'function' || typeof value === 'symbol') {\n    return undefined;\n  }\n  if (typeof value === 'bigint') {\n    return value.toString();\n  }\n  if (value instanceof Date) {\n    return value.toISOString();\n  }\n  return value;\n};\n\n/**\n * Safely stringifies a value and parses it back into a JsonValue.\n */\nexport const stringifyToJsonValue = (input: unknown): JsonValue | undefined => {\n  try {\n    const json = JSON.stringify(input, queryKeyJsonReplacer);\n    if (json === undefined) {\n      return undefined;\n    }\n    return JSON.parse(json) as JsonValue;\n  } catch {\n    return undefined;\n  }\n};\n\n/**\n * Detects plain objects (including objects with a null prototype).\n */\nconst isPlainObject = (value: unknown): value is Record<string, unknown> => {\n  if (value === null || typeof value !== 'object') {\n    return false;\n  }\n  const prototype = Object.getPrototypeOf(value as object);\n  return prototype === Object.prototype || prototype === null;\n};\n\n/**\n * Turns URLSearchParams into a sorted JSON object for deterministic keys.\n */\nconst serializeSearchParams = (params: URLSearchParams): JsonValue => {\n  const entries = Array.from(params.entries()).sort(([a], [b]) => a.localeCompare(b));\n  const result: Record<string, JsonValue> = {};\n\n  for (const [key, value] of entries) {\n    const existing = result[key];\n    if (existing === undefined) {\n      result[key] = value;\n      continue;\n    }\n\n    if (Array.isArray(existing)) {\n      (existing as string[]).push(value);\n    } else {\n      result[key] = [existing, value];\n    }\n  }\n\n  return result;\n};\n\n/**\n * Normalizes any accepted value into a JSON-friendly shape for query keys.\n */\nexport const serializeQueryKeyValue = (value: unknown): JsonValue | undefined => {\n  if (value === null) {\n    return null;\n  }\n\n  if (typeof value === 'string' || typeof value === 'number' || typeof value === 'boolean') {\n    return value;\n  }\n\n  if (value === undefined || typeof value === 'function' || typeof value === 'symbol') {\n    return undefined;\n  }\n\n  if (typeof value === 'bigint') {\n    return value.toString();\n  }\n\n  if (value instanceof Date) {\n    return value.toISOString();\n  }\n\n  if (Array.isArray(value)) {\n    return stringifyToJsonValue(value);\n  }\n\n  if (typeof URLSearchParams !== 'undefined' && value instanceof URLSearchParams) {\n    return serializeSearchParams(value);\n  }\n\n  if (isPlainObject(value)) {\n    return stringifyToJsonValue(value);\n  }\n\n  return undefined;\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/react-query/useMutation/core/serverSentEvents.gen.ts",
    "content": "// 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 const 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            // Normalize line endings: CRLF -> LF, then CR -> LF\n            buffer = buffer.replace(/\\r\\n/g, '\\n').replace(/\\r/g, '\\n');\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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/react-query/useMutation/core/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { Auth, AuthToken } from './auth.gen';\nimport type { BodySerializer, QuerySerializer, QuerySerializerOptions } from './bodySerializer.gen';\n\nexport type HttpMethod =\n  | 'connect'\n  | 'delete'\n  | 'get'\n  | 'head'\n  | 'options'\n  | 'patch'\n  | 'post'\n  | 'put'\n  | 'trace';\n\nexport type Client<\n  RequestFn = never,\n  Config = unknown,\n  MethodFn = never,\n  BuildUrlFn = never,\n  SseFn = never,\n> = {\n  /**\n   * Returns the final request URL.\n   */\n  buildUrl: BuildUrlFn;\n  getConfig: () => Config;\n  request: RequestFn;\n  setConfig: (config: Config) => Config;\n} & {\n  [K in HttpMethod]: MethodFn;\n} & ([SseFn] extends [never] ? { sse?: never } : { sse: { [K in HttpMethod]: SseFn } });\n\nexport interface Config {\n  /**\n   * Auth token or a function returning auth token. The resolved value will be\n   * added to the request payload as defined by its `security` array.\n   */\n  auth?: ((auth: Auth) => Promise<AuthToken> | AuthToken) | AuthToken;\n  /**\n   * A function for serializing request body parameter. By default,\n   * {@link JSON.stringify()} will be used.\n   */\n  bodySerializer?: BodySerializer | null;\n  /**\n   * An object containing any HTTP headers that you want to pre-populate your\n   * `Headers` object with.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/Headers/Headers#init See more}\n   */\n  headers?:\n    | RequestInit['headers']\n    | Record<\n        string,\n        string | number | boolean | (string | number | boolean)[] | null | undefined | unknown\n      >;\n  /**\n   * The request method.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/fetch#method See more}\n   */\n  method?: Uppercase<HttpMethod>;\n  /**\n   * A function for serializing request query parameters. By default, arrays\n   * will be exploded in form style, objects will be exploded in deepObject\n   * style, and reserved characters are percent-encoded.\n   *\n   * This method will have no effect if the native `paramsSerializer()` Axios\n   * API function is used.\n   *\n   * {@link https://swagger.io/docs/specification/serialization/#query View examples}\n   */\n  querySerializer?: QuerySerializer | QuerySerializerOptions;\n  /**\n   * A function validating request data. This is useful if you want to ensure\n   * the request conforms to the desired shape, so it can be safely sent to\n   * the server.\n   */\n  requestValidator?: (data: unknown) => Promise<unknown>;\n  /**\n   * A function transforming response data before it's returned. This is useful\n   * for post-processing data, e.g. converting ISO strings into Date objects.\n   */\n  responseTransformer?: (data: unknown) => Promise<unknown>;\n  /**\n   * A function validating response data. This is useful if you want to ensure\n   * the response conforms to the desired shape, so it can be safely passed to\n   * the transformers and returned to the user.\n   */\n  responseValidator?: (data: unknown) => Promise<unknown>;\n}\n\ntype IsExactlyNeverOrNeverUndefined<T> = [T] extends [never]\n  ? true\n  : [T] extends [never | undefined]\n    ? [undefined] extends [T]\n      ? false\n      : true\n    : false;\n\nexport type OmitNever<T extends Record<string, unknown>> = {\n  [K in keyof T as IsExactlyNeverOrNeverUndefined<T[K]> extends true ? never : K]: T[K];\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/react-query/useMutation/core/utils.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/react-query/useMutation/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport { callToTestOrderOfParams, callWithDefaultOptionalParameters, callWithDefaultParameters, callWithDescriptions, callWithDuplicateResponses, callWithNoContentResponse, callWithParameters, callWithResponse, callWithResponseAndNoContentResponse, callWithResponses, callWithResultFromHeader, callWithWeirdParameterNames, collectionFormat, complexTypes, deleteCallWithoutParametersAndResponse, dummyA, dummyB, duplicateName, duplicateName2, duplicateName3, duplicateName4, fooWow, getCallWithoutParametersAndResponse, headCallWithoutParametersAndResponse, nonAsciiæøåÆøÅöôêÊ字符串, type Options, optionsCallWithoutParametersAndResponse, patchApiVbyApiVersionNoTag, patchCallWithoutParametersAndResponse, postApiVbyApiVersionBody, postCallWithoutParametersAndResponse, putCallWithoutParametersAndResponse, serviceWithEmptyTag, testErrorCode, types } from './sdk.gen';\nexport type { ArrayWithArray, ArrayWithBooleans, ArrayWithNumbers, ArrayWithProperties, ArrayWithReferences, ArrayWithStrings, CallToTestOrderOfParamsData, CallWithDefaultOptionalParametersData, CallWithDefaultParametersData, CallWithDescriptionsData, CallWithDuplicateResponsesData, CallWithDuplicateResponsesError, CallWithDuplicateResponsesErrors, CallWithDuplicateResponsesResponse, CallWithDuplicateResponsesResponses, CallWithNoContentResponseData, CallWithNoContentResponseResponses, CallWithParametersData, CallWithResponseAndNoContentResponseData, CallWithResponseAndNoContentResponseResponse, CallWithResponseAndNoContentResponseResponses, CallWithResponseData, CallWithResponseResponse, CallWithResponseResponses, CallWithResponsesData, CallWithResponsesError, CallWithResponsesErrors, CallWithResponsesResponse, CallWithResponsesResponses, CallWithResultFromHeaderData, CallWithResultFromHeaderErrors, CallWithResultFromHeaderResponses, CallWithWeirdParameterNamesData, ClientOptions, CollectionFormatData, CommentWithBackticks, CommentWithBackticksAndQuotes, CommentWithBreaks, CommentWithExpressionPlaceholders, CommentWithQuotes, CommentWithReservedCharacters, CommentWithSlashes, ComplexTypesData, ComplexTypesErrors, ComplexTypesResponse, ComplexTypesResponses, Date, Default, DeleteCallWithoutParametersAndResponseData, DictionaryWithArray, DictionaryWithDictionary, DictionaryWithProperties, DictionaryWithReference, DictionaryWithString, DummyAData, DummyAResponses, DummyBData, DummyBResponses, DuplicateName2Data, DuplicateName3Data, DuplicateName4Data, DuplicateNameData, EnumFromDescription, EnumWithExtensions, EnumWithNumbers, EnumWithStrings, ExternalRefA, ExternalRefB, ExternalSharedModel, FailureFailure, FooWowData, FooWowResponses, GetCallWithoutParametersAndResponseData, HeadCallWithoutParametersAndResponseData, ModelThatExtends, ModelThatExtendsExtends, ModelWithArray, ModelWithBoolean, ModelWithCircularReference, ModelWithDictionary, ModelWithDuplicateImports, ModelWithDuplicateProperties, ModelWithEnum, ModelWithEnumFromDescription, ModelWithInteger, ModelWithNestedEnums, ModelWithNestedProperties, ModelWithNullableString, ModelWithOrderedProperties, ModelWithPattern, ModelWithPatternWritable, ModelWithProperties, ModelWithPropertiesWritable, ModelWithReference, ModelWithReferenceWritable, ModelWithString, ModelWithStringError, NonAsciiæøåÆøÅöôêÊ字符串Data, NonAsciiæøåÆøÅöôêÊ字符串Response, NonAsciiæøåÆøÅöôêÊ字符串Responses, NonAsciiStringæøåÆøÅöôêÊ字符串, OptionsCallWithoutParametersAndResponseData, ParameterActivityParams, PatchApiVbyApiVersionNoTagData, PatchApiVbyApiVersionNoTagResponses, PatchCallWithoutParametersAndResponseData, PostApiVbyApiVersionBodyData, PostApiVbyApiVersionBodyError, PostApiVbyApiVersionBodyErrors, PostApiVbyApiVersionBodyResponse, PostApiVbyApiVersionBodyResponses, PostCallWithoutParametersAndResponseData, PutCallWithoutParametersAndResponseData, ResponsePostActivityResponse, ServiceWithEmptyTagData, SimpleBoolean, SimpleFile, SimpleInteger, SimpleReference, SimpleString, SimpleStringWithPattern, TestErrorCodeData, TestErrorCodeErrors, TestErrorCodeResponses, TypesData, TypesResponse, TypesResponses } from './types.gen';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/react-query/useMutation/sdk.gen.ts",
    "content": "// 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 { CallToTestOrderOfParamsData, CallWithDefaultOptionalParametersData, CallWithDefaultParametersData, CallWithDescriptionsData, CallWithDuplicateResponsesData, CallWithDuplicateResponsesErrors, CallWithDuplicateResponsesResponses, CallWithNoContentResponseData, CallWithNoContentResponseResponses, CallWithParametersData, CallWithResponseAndNoContentResponseData, CallWithResponseAndNoContentResponseResponses, CallWithResponseData, CallWithResponseResponses, CallWithResponsesData, CallWithResponsesErrors, CallWithResponsesResponses, CallWithResultFromHeaderData, CallWithResultFromHeaderErrors, CallWithResultFromHeaderResponses, CallWithWeirdParameterNamesData, CollectionFormatData, ComplexTypesData, ComplexTypesErrors, ComplexTypesResponses, DeleteCallWithoutParametersAndResponseData, DummyAData, DummyAResponses, DummyBData, DummyBResponses, DuplicateName2Data, DuplicateName3Data, DuplicateName4Data, DuplicateNameData, FooWowData, FooWowResponses, GetCallWithoutParametersAndResponseData, HeadCallWithoutParametersAndResponseData, NonAsciiæøåÆøÅöôêÊ字符串Data, NonAsciiæøåÆøÅöôêÊ字符串Responses, OptionsCallWithoutParametersAndResponseData, PatchApiVbyApiVersionNoTagData, PatchApiVbyApiVersionNoTagResponses, PatchCallWithoutParametersAndResponseData, PostApiVbyApiVersionBodyData, PostApiVbyApiVersionBodyErrors, PostApiVbyApiVersionBodyResponses, PostCallWithoutParametersAndResponseData, PutCallWithoutParametersAndResponseData, ServiceWithEmptyTagData, TestErrorCodeData, TestErrorCodeErrors, TestErrorCodeResponses, TypesData, TypesResponses } from './types.gen';\n\nexport type Options<TData extends TDataShape = TDataShape, ThrowOnError extends boolean = boolean> = Options2<TData, ThrowOnError> & {\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\nexport const serviceWithEmptyTag = <ThrowOnError extends boolean = false>(options?: Options<ServiceWithEmptyTagData, ThrowOnError>) => (options?.client ?? client).get<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/no+tag', ...options });\n\nexport const patchApiVbyApiVersionNoTag = <ThrowOnError extends boolean = false>(options?: Options<PatchApiVbyApiVersionNoTagData, ThrowOnError>) => (options?.client ?? client).patch<PatchApiVbyApiVersionNoTagResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/no+tag', ...options });\n\nexport const fooWow = <ThrowOnError extends boolean = false>(options?: Options<FooWowData, ThrowOnError>) => (options?.client ?? client).put<FooWowResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/no+tag', ...options });\n\nexport const deleteCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<DeleteCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).delete<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const getCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<GetCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).get<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const headCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<HeadCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).head<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const optionsCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<OptionsCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).options<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const patchCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<PatchCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).patch<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const postCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<PostCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).post<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const putCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<PutCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).put<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const callWithDescriptions = <ThrowOnError extends boolean = false>(options?: Options<CallWithDescriptionsData, ThrowOnError>) => (options?.client ?? client).post<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/descriptions/', ...options });\n\nexport const callWithParameters = <ThrowOnError extends boolean = false>(options: Options<CallWithParametersData, ThrowOnError>) => (options.client ?? client).post<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/parameters/{parameterPath}', ...options });\n\nexport const callWithWeirdParameterNames = <ThrowOnError extends boolean = false>(options: Options<CallWithWeirdParameterNamesData, ThrowOnError>) => (options.client ?? client).post<unknown, unknown, ThrowOnError>({\n    url: '/api/v{api-version}/parameters/{parameter.path.1}/{parameter-path-2}/{PARAMETER-PATH-3}',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options.headers\n    }\n});\n\nexport const callWithDefaultParameters = <ThrowOnError extends boolean = false>(options: Options<CallWithDefaultParametersData, ThrowOnError>) => (options.client ?? client).get<unknown, unknown, ThrowOnError>({\n    querySerializer: { parameters: { parameterModel: { object: { explode: false, style: 'form' } } } },\n    url: '/api/v{api-version}/defaults',\n    ...options\n});\n\nexport const callWithDefaultOptionalParameters = <ThrowOnError extends boolean = false>(options?: Options<CallWithDefaultOptionalParametersData, ThrowOnError>) => (options?.client ?? client).post<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/defaults', ...options });\n\nexport const callToTestOrderOfParams = <ThrowOnError extends boolean = false>(options: Options<CallToTestOrderOfParamsData, ThrowOnError>) => (options.client ?? client).put<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/defaults', ...options });\n\nexport const duplicateName = <ThrowOnError extends boolean = false>(options?: Options<DuplicateNameData, ThrowOnError>) => (options?.client ?? client).delete<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/duplicate', ...options });\n\nexport const duplicateName2 = <ThrowOnError extends boolean = false>(options?: Options<DuplicateName2Data, ThrowOnError>) => (options?.client ?? client).get<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/duplicate', ...options });\n\nexport const duplicateName3 = <ThrowOnError extends boolean = false>(options?: Options<DuplicateName3Data, ThrowOnError>) => (options?.client ?? client).post<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/duplicate', ...options });\n\nexport const duplicateName4 = <ThrowOnError extends boolean = false>(options?: Options<DuplicateName4Data, ThrowOnError>) => (options?.client ?? client).put<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/duplicate', ...options });\n\nexport const callWithNoContentResponse = <ThrowOnError extends boolean = false>(options?: Options<CallWithNoContentResponseData, ThrowOnError>) => (options?.client ?? client).get<CallWithNoContentResponseResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/no-content', ...options });\n\nexport const callWithResponseAndNoContentResponse = <ThrowOnError extends boolean = false>(options?: Options<CallWithResponseAndNoContentResponseData, ThrowOnError>) => (options?.client ?? client).get<CallWithResponseAndNoContentResponseResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/multiple-tags/response-and-no-content', ...options });\n\nexport const dummyA = <ThrowOnError extends boolean = false>(options?: Options<DummyAData, ThrowOnError>) => (options?.client ?? client).get<DummyAResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/multiple-tags/a', ...options });\n\nexport const dummyB = <ThrowOnError extends boolean = false>(options?: Options<DummyBData, ThrowOnError>) => (options?.client ?? client).get<DummyBResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/multiple-tags/b', ...options });\n\nexport const callWithResponse = <ThrowOnError extends boolean = false>(options?: Options<CallWithResponseData, ThrowOnError>) => (options?.client ?? client).get<CallWithResponseResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/response', ...options });\n\nexport const callWithDuplicateResponses = <ThrowOnError extends boolean = false>(options?: Options<CallWithDuplicateResponsesData, ThrowOnError>) => (options?.client ?? client).post<CallWithDuplicateResponsesResponses, CallWithDuplicateResponsesErrors, ThrowOnError>({ url: '/api/v{api-version}/response', ...options });\n\nexport const callWithResponses = <ThrowOnError extends boolean = false>(options?: Options<CallWithResponsesData, ThrowOnError>) => (options?.client ?? client).put<CallWithResponsesResponses, CallWithResponsesErrors, ThrowOnError>({ url: '/api/v{api-version}/response', ...options });\n\nexport const collectionFormat = <ThrowOnError extends boolean = false>(options: Options<CollectionFormatData, ThrowOnError>) => (options.client ?? client).get<unknown, unknown, ThrowOnError>({\n    querySerializer: { parameters: {\n            parameterArrayCSV: { array: { explode: false } },\n            parameterArraySSV: { array: { explode: false } },\n            parameterArrayTSV: { array: { explode: false } },\n            parameterArrayPipes: { array: { explode: false } }\n        } },\n    url: '/api/v{api-version}/collectionFormat',\n    ...options\n});\n\nexport const types = <ThrowOnError extends boolean = false>(options: Options<TypesData, ThrowOnError>) => (options.client ?? client).get<TypesResponses, unknown, ThrowOnError>({\n    querySerializer: { parameters: { parameterArray: { array: { explode: false } }, parameterDictionary: { object: { explode: false, style: 'form' } } } },\n    url: '/api/v{api-version}/types',\n    ...options\n});\n\nexport const complexTypes = <ThrowOnError extends boolean = false>(options: Options<ComplexTypesData, ThrowOnError>) => (options.client ?? client).get<ComplexTypesResponses, ComplexTypesErrors, ThrowOnError>({\n    querySerializer: { parameters: { parameterObject: { object: { explode: false, style: 'form' } }, parameterReference: { object: { explode: false, style: 'form' } } } },\n    url: '/api/v{api-version}/complex',\n    ...options\n});\n\nexport const callWithResultFromHeader = <ThrowOnError extends boolean = false>(options?: Options<CallWithResultFromHeaderData, ThrowOnError>) => (options?.client ?? client).post<CallWithResultFromHeaderResponses, CallWithResultFromHeaderErrors, ThrowOnError>({ url: '/api/v{api-version}/header', ...options });\n\nexport const testErrorCode = <ThrowOnError extends boolean = false>(options: Options<TestErrorCodeData, ThrowOnError>) => (options.client ?? client).post<TestErrorCodeResponses, TestErrorCodeErrors, ThrowOnError>({ url: '/api/v{api-version}/error', ...options });\n\nexport const nonAsciiæøåÆøÅöôêÊ字符串 = <ThrowOnError extends boolean = false>(options: Options<NonAsciiæøåÆøÅöôêÊ字符串Data, ThrowOnError>) => (options.client ?? client).post<NonAsciiæøåÆøÅöôêÊ字符串Responses, unknown, ThrowOnError>({ url: '/api/v{api-version}/non-ascii-æøåÆØÅöôêÊ字符串', ...options });\n\n/**\n * Body should not be unknown\n *\n * Body should not be unknown\n */\nexport const postApiVbyApiVersionBody = <ThrowOnError extends boolean = false>(options: Options<PostApiVbyApiVersionBodyData, ThrowOnError>) => (options.client ?? client).post<PostApiVbyApiVersionBodyResponses, PostApiVbyApiVersionBodyErrors, ThrowOnError>({\n    url: '/api/v{api-version}/body',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options.headers\n    }\n});\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/react-query/useMutation/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type ClientOptions = {\n    baseUrl: 'http://localhost:3000/base' | (string & {});\n};\n\nexport type ExternalRefA = ExternalSharedModel;\n\nexport type ExternalRefB = ExternalSharedModel;\n\n/**\n * Testing multiline comments in string: First line\n * Second line\n *\n * Fourth line\n */\nexport type CommentWithBreaks = number;\n\n/**\n * Testing backticks in string: `backticks` and ```multiple backticks``` should work\n */\nexport type CommentWithBackticks = number;\n\n/**\n * Testing backticks and quotes in string: `backticks`, 'quotes', \"double quotes\" and ```multiple backticks``` should work\n */\nexport type CommentWithBackticksAndQuotes = number;\n\n/**\n * Testing slashes in string: \\backwards\\\\\\ and /forwards/// should work\n */\nexport type CommentWithSlashes = number;\n\n/**\n * Testing expression placeholders in string: ${expression} should work\n */\nexport type CommentWithExpressionPlaceholders = number;\n\n/**\n * Testing quotes in string: 'single quote''' and \"double quotes\"\"\" should work\n */\nexport type CommentWithQuotes = number;\n\n/**\n * Testing reserved characters in string: * inline * and ** inline ** should work\n */\nexport type CommentWithReservedCharacters = number;\n\n/**\n * This is a simple number\n */\nexport type SimpleInteger = number;\n\n/**\n * This is a simple boolean\n */\nexport type SimpleBoolean = boolean;\n\n/**\n * This is a simple string\n */\nexport type SimpleString = string;\n\n/**\n * A string with non-ascii (unicode) characters valid in typescript identifiers (æøåÆØÅöÔèÈ字符串)\n */\nexport type NonAsciiStringæøåÆøÅöôêÊ字符串 = string;\n\n/**\n * This is a simple file\n */\nexport type SimpleFile = Blob | File;\n\nexport type SimpleReference = ModelWithString;\n\n/**\n * This is a simple string\n */\nexport type SimpleStringWithPattern = string;\n\n/**\n * This is a simple enum with strings\n */\nexport type EnumWithStrings = 'Success' | 'Warning' | 'Error' | '\\'Single Quote\\'' | '\"Double Quotes\"' | 'Non-ascii: øæåôöØÆÅÔÖ字符串';\n\n/**\n * This is a simple enum with numbers\n */\nexport type EnumWithNumbers = 1 | 2 | 3 | 1.1 | 1.2 | 1.3 | 100 | 200 | 300 | -100 | -200 | -300 | -1.1 | -1.2 | -1.3;\n\n/**\n * Success=1,Warning=2,Error=3\n */\nexport type EnumFromDescription = number;\n\n/**\n * This is a simple enum with numbers\n */\nexport type EnumWithExtensions = 200 | 400 | 500;\n\n/**\n * This is a simple array with numbers\n */\nexport type ArrayWithNumbers = Array<number>;\n\n/**\n * This is a simple array with booleans\n */\nexport type ArrayWithBooleans = Array<boolean>;\n\n/**\n * This is a simple array with strings\n */\nexport type ArrayWithStrings = Array<string>;\n\n/**\n * This is a simple array with references\n */\nexport type ArrayWithReferences = Array<ModelWithString>;\n\n/**\n * This is a simple array containing an array\n */\nexport type ArrayWithArray = Array<Array<ModelWithString>>;\n\n/**\n * This is a simple array with properties\n */\nexport type ArrayWithProperties = Array<{\n    foo?: string;\n    bar?: string;\n}>;\n\n/**\n * This is a string dictionary\n */\nexport type DictionaryWithString = {\n    [key: string]: string;\n};\n\n/**\n * This is a string reference\n */\nexport type DictionaryWithReference = {\n    [key: string]: ModelWithString;\n};\n\n/**\n * This is a complex dictionary\n */\nexport type DictionaryWithArray = {\n    [key: string]: Array<ModelWithString>;\n};\n\n/**\n * This is a string dictionary\n */\nexport type DictionaryWithDictionary = {\n    [key: string]: {\n        [key: string]: string;\n    };\n};\n\n/**\n * This is a complex dictionary\n */\nexport type DictionaryWithProperties = {\n    [key: string]: {\n        foo?: string;\n        bar?: string;\n    };\n};\n\n/**\n * This is a type-only model that defines Date as a string\n */\nexport type Date = string;\n\n/**\n * This is a model with one number property\n */\nexport type ModelWithInteger = {\n    /**\n     * This is a simple number property\n     */\n    prop?: number;\n};\n\n/**\n * This is a model with one boolean property\n */\nexport type ModelWithBoolean = {\n    /**\n     * This is a simple boolean property\n     */\n    prop?: boolean;\n};\n\n/**\n * This is a model with one string property\n */\nexport type ModelWithString = {\n    /**\n     * This is a simple string property\n     */\n    prop?: string;\n};\n\n/**\n * This is a model with one string property\n */\nexport type ModelWithStringError = {\n    /**\n     * This is a simple string property\n     */\n    prop?: string;\n};\n\n/**\n * This is a model with one string property\n */\nexport type ModelWithNullableString = {\n    /**\n     * This is a simple string property\n     */\n    nullableProp?: string | null;\n    /**\n     * This is a simple string property\n     */\n    nullableRequiredProp: string | null;\n};\n\n/**\n * This is a model with one enum\n */\nexport type ModelWithEnum = {\n    /**\n     * This is a simple enum with strings\n     */\n    test?: 'Success' | 'Warning' | 'Error' | 'ØÆÅ字符串';\n    /**\n     * These are the HTTP error code enums\n     */\n    statusCode?: '100' | '200 FOO' | '300 FOO_BAR' | '400 foo-bar' | '500 foo.bar' | '600 foo&bar';\n    /**\n     * Simple boolean enum\n     */\n    bool?: true;\n};\n\n/**\n * This is a model with one enum\n */\nexport type ModelWithEnumFromDescription = {\n    /**\n     * Success=1,Warning=2,Error=3\n     */\n    test?: number;\n};\n\n/**\n * This is a model with nested enums\n */\nexport type ModelWithNestedEnums = {\n    dictionaryWithEnum?: {\n        [key: string]: 'Success' | 'Warning' | 'Error';\n    };\n    dictionaryWithEnumFromDescription?: {\n        [key: string]: number;\n    };\n    arrayWithEnum?: Array<'Success' | 'Warning' | 'Error'>;\n    arrayWithDescription?: Array<number>;\n};\n\n/**\n * This is a model with one property containing a reference\n */\nexport type ModelWithReference = {\n    prop?: ModelWithProperties;\n};\n\n/**\n * This is a model with one property containing an array\n */\nexport type ModelWithArray = {\n    prop?: Array<ModelWithString>;\n    propWithFile?: Array<Blob | File>;\n    propWithNumber?: Array<number>;\n};\n\n/**\n * This is a model with one property containing a dictionary\n */\nexport type ModelWithDictionary = {\n    prop?: {\n        [key: string]: string;\n    };\n};\n\n/**\n * This is a model with one property containing a circular reference\n */\nexport type ModelWithCircularReference = {\n    prop?: ModelWithCircularReference;\n};\n\n/**\n * This is a model with one nested property\n */\nexport type ModelWithProperties = {\n    required: string;\n    readonly requiredAndReadOnly: string;\n    string?: string;\n    number?: number;\n    boolean?: boolean;\n    reference?: ModelWithString;\n    'property with space'?: string;\n    default?: string;\n    try?: string;\n    readonly '@namespace.string'?: string;\n    readonly '@namespace.integer'?: number;\n};\n\n/**\n * This is a model with one nested property\n */\nexport type ModelWithNestedProperties = {\n    readonly first: {\n        readonly second: {\n            readonly third: string;\n        };\n    };\n};\n\n/**\n * This is a model with duplicated properties\n */\nexport type ModelWithDuplicateProperties = {\n    prop?: ModelWithString;\n};\n\n/**\n * This is a model with ordered properties\n */\nexport type ModelWithOrderedProperties = {\n    zebra?: string;\n    apple?: string;\n    hawaii?: string;\n};\n\n/**\n * This is a model with duplicated imports\n */\nexport type ModelWithDuplicateImports = {\n    propA?: ModelWithString;\n    propB?: ModelWithString;\n    propC?: ModelWithString;\n};\n\n/**\n * This is a model that extends another model\n */\nexport type ModelThatExtends = ModelWithString & {\n    propExtendsA?: string;\n    propExtendsB?: ModelWithString;\n};\n\n/**\n * This is a model that extends another model\n */\nexport type ModelThatExtendsExtends = ModelWithString & ModelThatExtends & {\n    propExtendsC?: string;\n    propExtendsD?: ModelWithString;\n};\n\nexport type Default = {\n    name?: string;\n};\n\n/**\n * This is a model that contains a some patterns\n */\nexport type ModelWithPattern = {\n    key: string;\n    name: string;\n    readonly enabled?: boolean;\n    readonly modified?: string;\n    id?: string;\n    text?: string;\n    patternWithSingleQuotes?: string;\n    patternWithNewline?: string;\n    patternWithBacktick?: string;\n    patternWithUnicode?: string;\n};\n\nexport type ParameterActivityParams = {\n    description?: string;\n    graduate_id?: number;\n    organization_id?: number;\n    parent_activity?: number;\n    post_id?: number;\n};\n\nexport type ResponsePostActivityResponse = {\n    description?: string;\n    graduate_id?: number;\n    organization_id?: number;\n    parent_activity_id?: number;\n    post_id?: number;\n};\n\nexport type FailureFailure = {\n    error?: string;\n    message?: string;\n    reference_code?: string;\n};\n\nexport type ExternalSharedModel = {\n    id: string;\n    name?: string;\n};\n\n/**\n * This is a model with one property containing a reference\n */\nexport type ModelWithReferenceWritable = {\n    prop?: ModelWithPropertiesWritable;\n};\n\n/**\n * This is a model with one nested property\n */\nexport type ModelWithPropertiesWritable = {\n    required: string;\n    string?: string;\n    number?: number;\n    boolean?: boolean;\n    reference?: ModelWithString;\n    'property with space'?: string;\n    default?: string;\n    try?: string;\n};\n\n/**\n * This is a model that contains a some patterns\n */\nexport type ModelWithPatternWritable = {\n    key: string;\n    name: string;\n    id?: string;\n    text?: string;\n    patternWithSingleQuotes?: string;\n    patternWithNewline?: string;\n    patternWithBacktick?: string;\n    patternWithUnicode?: string;\n};\n\nexport type ServiceWithEmptyTagData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no+tag';\n};\n\nexport type PatchApiVbyApiVersionNoTagData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no+tag';\n};\n\nexport type PatchApiVbyApiVersionNoTagResponses = {\n    /**\n     * OK\n     */\n    default: unknown;\n};\n\nexport type FooWowData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no+tag';\n};\n\nexport type FooWowResponses = {\n    /**\n     * OK\n     */\n    default: unknown;\n};\n\nexport type DeleteCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type GetCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type HeadCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type OptionsCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type PatchCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type PostCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type PutCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type CallWithDescriptionsData = {\n    body?: never;\n    path?: never;\n    query?: {\n        /**\n         * Testing multiline comments in string: First line\n         * Second line\n         *\n         * Fourth line\n         */\n        parameterWithBreaks?: string;\n        /**\n         * Testing backticks in string: `backticks` and ```multiple backticks``` should work\n         */\n        parameterWithBackticks?: string;\n        /**\n         * Testing slashes in string: \\backwards\\\\\\ and /forwards/// should work\n         */\n        parameterWithSlashes?: string;\n        /**\n         * Testing expression placeholders in string: ${expression} should work\n         */\n        parameterWithExpressionPlaceholders?: string;\n        /**\n         * Testing quotes in string: 'single quote''' and \"double quotes\"\"\" should work\n         */\n        parameterWithQuotes?: string;\n        /**\n         * Testing reserved characters in string: * inline * and ** inline ** should work\n         */\n        parameterWithReservedCharacters?: string;\n    };\n    url: '/api/v{api-version}/descriptions/';\n};\n\nexport type CallWithParametersData = {\n    body?: never;\n    headers: {\n        /**\n         * This is the parameter that goes into the header\n         */\n        parameterHeader: string;\n    };\n    path: {\n        /**\n         * This is the parameter that goes into the path\n         */\n        parameterPath: string;\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string;\n    };\n    query: {\n        /**\n         * This is the parameter that goes into the query params\n         */\n        parameterQuery: string;\n    };\n    url: '/api/v{api-version}/parameters/{parameterPath}';\n};\n\nexport type CallWithWeirdParameterNamesData = {\n    /**\n     * This is the parameter that is sent as request body\n     */\n    body: string;\n    headers: {\n        /**\n         * This is the parameter that goes into the request header\n         */\n        'parameter.header': string;\n    };\n    path: {\n        /**\n         * This is the parameter that goes into the path\n         */\n        'parameter.path.1'?: string;\n        /**\n         * This is the parameter that goes into the path\n         */\n        'parameter-path-2'?: string;\n        /**\n         * This is the parameter that goes into the path\n         */\n        'PARAMETER-PATH-3'?: string;\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string;\n    };\n    query: {\n        /**\n         * This is the parameter with a reserved keyword\n         */\n        default?: string;\n        /**\n         * This is the parameter that goes into the request query params\n         */\n        'parameter-query': string;\n    };\n    url: '/api/v{api-version}/parameters/{parameter.path.1}/{parameter-path-2}/{PARAMETER-PATH-3}';\n};\n\nexport type CallWithDefaultParametersData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * This is a simple string with default value\n         */\n        parameterString: string;\n        /**\n         * This is a simple number with default value\n         */\n        parameterNumber: number;\n        /**\n         * This is a simple boolean with default value\n         */\n        parameterBoolean: boolean;\n        /**\n         * This is a simple enum with default value\n         */\n        parameterEnum: 'Success' | 'Warning' | 'Error';\n        /**\n         * This is a model with one string property\n         */\n        parameterModel: {\n            /**\n             * This is a simple string property\n             */\n            prop?: string;\n        };\n    };\n    url: '/api/v{api-version}/defaults';\n};\n\nexport type CallWithDefaultOptionalParametersData = {\n    body?: never;\n    path?: never;\n    query?: {\n        /**\n         * This is a simple string that is optional with default value\n         */\n        parameterString?: string;\n        /**\n         * This is a simple number that is optional with default value\n         */\n        parameterNumber?: number;\n        /**\n         * This is a simple boolean that is optional with default value\n         */\n        parameterBoolean?: boolean;\n        /**\n         * This is a simple enum that is optional with default value\n         */\n        parameterEnum?: 'Success' | 'Warning' | 'Error';\n    };\n    url: '/api/v{api-version}/defaults';\n};\n\nexport type CallToTestOrderOfParamsData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * This is a optional string with default\n         */\n        parameterOptionalStringWithDefault?: string;\n        /**\n         * This is a optional string with empty default\n         */\n        parameterOptionalStringWithEmptyDefault?: string;\n        /**\n         * This is a optional string with no default\n         */\n        parameterOptionalStringWithNoDefault?: string;\n        /**\n         * This is a string with default\n         */\n        parameterStringWithDefault: string;\n        /**\n         * This is a string with empty default\n         */\n        parameterStringWithEmptyDefault: string;\n        /**\n         * This is a string with no default\n         */\n        parameterStringWithNoDefault: string;\n        /**\n         * This is a string that can be null with no default\n         */\n        parameterStringNullableWithNoDefault?: string | null;\n        /**\n         * This is a string that can be null with default\n         */\n        parameterStringNullableWithDefault?: string | null;\n    };\n    url: '/api/v{api-version}/defaults';\n};\n\nexport type DuplicateNameData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/duplicate';\n};\n\nexport type DuplicateName2Data = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/duplicate';\n};\n\nexport type DuplicateName3Data = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/duplicate';\n};\n\nexport type DuplicateName4Data = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/duplicate';\n};\n\nexport type CallWithNoContentResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no-content';\n};\n\nexport type CallWithNoContentResponseResponses = {\n    /**\n     * Success\n     */\n    204: unknown;\n};\n\nexport type CallWithResponseAndNoContentResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multiple-tags/response-and-no-content';\n};\n\nexport type CallWithResponseAndNoContentResponseResponses = {\n    /**\n     * Response is a simple number\n     */\n    200: number;\n    /**\n     * Success\n     */\n    204: unknown;\n};\n\nexport type CallWithResponseAndNoContentResponseResponse = CallWithResponseAndNoContentResponseResponses[keyof CallWithResponseAndNoContentResponseResponses];\n\nexport type DummyAData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multiple-tags/a';\n};\n\nexport type DummyAResponses = {\n    /**\n     * Success\n     */\n    204: unknown;\n};\n\nexport type DummyBData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multiple-tags/b';\n};\n\nexport type DummyBResponses = {\n    /**\n     * Success\n     */\n    204: unknown;\n};\n\nexport type CallWithResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/response';\n};\n\nexport type CallWithResponseResponses = {\n    /**\n     * Message for default response\n     */\n    default: ModelWithString;\n};\n\nexport type CallWithResponseResponse = CallWithResponseResponses[keyof CallWithResponseResponses];\n\nexport type CallWithDuplicateResponsesData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/response';\n};\n\nexport type CallWithDuplicateResponsesErrors = {\n    /**\n     * Message for 500 error\n     */\n    500: ModelWithStringError;\n    /**\n     * Message for 501 error\n     */\n    501: ModelWithStringError;\n    /**\n     * Message for 502 error\n     */\n    502: ModelWithStringError;\n    /**\n     * Message for default response\n     */\n    default: ModelWithString;\n};\n\nexport type CallWithDuplicateResponsesError = CallWithDuplicateResponsesErrors[keyof CallWithDuplicateResponsesErrors];\n\nexport type CallWithDuplicateResponsesResponses = {\n    /**\n     * Message for 201 response\n     */\n    201: ModelWithString;\n    /**\n     * Message for 202 response\n     */\n    202: ModelWithString;\n};\n\nexport type CallWithDuplicateResponsesResponse = CallWithDuplicateResponsesResponses[keyof CallWithDuplicateResponsesResponses];\n\nexport type CallWithResponsesData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/response';\n};\n\nexport type CallWithResponsesErrors = {\n    /**\n     * Message for 500 error\n     */\n    500: ModelWithStringError;\n    /**\n     * Message for 501 error\n     */\n    501: ModelWithStringError;\n    /**\n     * Message for 502 error\n     */\n    502: ModelWithStringError;\n    /**\n     * Message for default response\n     */\n    default: ModelWithString;\n};\n\nexport type CallWithResponsesError = CallWithResponsesErrors[keyof CallWithResponsesErrors];\n\nexport type CallWithResponsesResponses = {\n    /**\n     * Message for 200 response\n     */\n    200: {\n        readonly '@namespace.string'?: string;\n        readonly '@namespace.integer'?: number;\n        readonly value?: Array<ModelWithString>;\n    };\n    /**\n     * Message for 201 response\n     */\n    201: ModelThatExtends;\n    /**\n     * Message for 202 response\n     */\n    202: ModelThatExtendsExtends;\n};\n\nexport type CallWithResponsesResponse = CallWithResponsesResponses[keyof CallWithResponsesResponses];\n\nexport type CollectionFormatData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * This is an array parameter that is sent as csv format (comma-separated values)\n         */\n        parameterArrayCSV: Array<string>;\n        /**\n         * This is an array parameter that is sent as ssv format (space-separated values)\n         */\n        parameterArraySSV: Array<string>;\n        /**\n         * This is an array parameter that is sent as tsv format (tab-separated values)\n         */\n        parameterArrayTSV: Array<string>;\n        /**\n         * This is an array parameter that is sent as pipes format (pipe-separated values)\n         */\n        parameterArrayPipes: Array<string>;\n        /**\n         * This is an array parameter that is sent as multi format (multiple parameter instances)\n         */\n        parameterArrayMulti: Array<string>;\n    };\n    url: '/api/v{api-version}/collectionFormat';\n};\n\nexport type TypesData = {\n    body?: never;\n    path?: {\n        /**\n         * This is a number parameter\n         */\n        id?: number;\n    };\n    query: {\n        /**\n         * This is a number parameter\n         */\n        parameterNumber: number;\n        /**\n         * This is a string parameter\n         */\n        parameterString: string;\n        /**\n         * This is a boolean parameter\n         */\n        parameterBoolean: boolean;\n        /**\n         * This is an array parameter\n         */\n        parameterArray: Array<string>;\n        /**\n         * This is a dictionary parameter\n         */\n        parameterDictionary: {\n            [key: string]: unknown;\n        };\n        /**\n         * This is an enum parameter\n         */\n        parameterEnum: 'Success' | 'Warning' | 'Error';\n    };\n    url: '/api/v{api-version}/types';\n};\n\nexport type TypesResponses = {\n    /**\n     * Response is a simple number\n     */\n    200: number;\n    /**\n     * Response is a simple string\n     */\n    201: string;\n    /**\n     * Response is a simple boolean\n     */\n    202: boolean;\n    /**\n     * Response is a simple object\n     */\n    203: {\n        [key: string]: unknown;\n    };\n};\n\nexport type TypesResponse = TypesResponses[keyof TypesResponses];\n\nexport type ComplexTypesData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * Parameter containing object\n         */\n        parameterObject: {\n            first?: {\n                second?: {\n                    third?: string;\n                };\n            };\n        };\n        /**\n         * This is a model with one string property\n         */\n        parameterReference: {\n            /**\n             * This is a simple string property\n             */\n            prop?: string;\n        };\n    };\n    url: '/api/v{api-version}/complex';\n};\n\nexport type ComplexTypesErrors = {\n    /**\n     * 400 server error\n     */\n    400: unknown;\n    /**\n     * 500 server error\n     */\n    500: unknown;\n};\n\nexport type ComplexTypesResponses = {\n    /**\n     * Successful response\n     */\n    200: Array<ModelWithString>;\n};\n\nexport type ComplexTypesResponse = ComplexTypesResponses[keyof ComplexTypesResponses];\n\nexport type CallWithResultFromHeaderData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/header';\n};\n\nexport type CallWithResultFromHeaderErrors = {\n    /**\n     * 400 server error\n     */\n    400: unknown;\n    /**\n     * 500 server error\n     */\n    500: unknown;\n};\n\nexport type CallWithResultFromHeaderResponses = {\n    /**\n     * Successful response\n     */\n    200: unknown;\n};\n\nexport type TestErrorCodeData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * Status code to return\n         */\n        status: string;\n    };\n    url: '/api/v{api-version}/error';\n};\n\nexport type TestErrorCodeErrors = {\n    /**\n     * Custom message: Internal Server Error\n     */\n    500: unknown;\n    /**\n     * Custom message: Not Implemented\n     */\n    501: unknown;\n    /**\n     * Custom message: Bad Gateway\n     */\n    502: unknown;\n    /**\n     * Custom message: Service Unavailable\n     */\n    503: unknown;\n};\n\nexport type TestErrorCodeResponses = {\n    /**\n     * Custom message: Successful response\n     */\n    200: unknown;\n};\n\nexport type NonAsciiæøåÆøÅöôêÊ字符串Data = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * Dummy input param\n         */\n        nonAsciiParamæøåÆØÅöôêÊ: number;\n    };\n    url: '/api/v{api-version}/non-ascii-æøåÆØÅöôêÊ字符串';\n};\n\nexport type NonAsciiæøåÆøÅöôêÊ字符串Responses = {\n    /**\n     * Successful response\n     */\n    200: NonAsciiStringæøåÆøÅöôêÊ字符串;\n};\n\nexport type NonAsciiæøåÆøÅöôêÊ字符串Response = NonAsciiæøåÆøÅöôêÊ字符串Responses[keyof NonAsciiæøåÆøÅöôêÊ字符串Responses];\n\nexport type PostApiVbyApiVersionBodyData = {\n    /**\n     * Body should not be unknown\n     */\n    body: ParameterActivityParams;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/body';\n};\n\nexport type PostApiVbyApiVersionBodyErrors = {\n    /**\n     * Bad Request\n     */\n    400: FailureFailure;\n    /**\n     * Internal Server Error\n     */\n    500: FailureFailure;\n};\n\nexport type PostApiVbyApiVersionBodyError = PostApiVbyApiVersionBodyErrors[keyof PostApiVbyApiVersionBodyErrors];\n\nexport type PostApiVbyApiVersionBodyResponses = {\n    /**\n     * OK\n     */\n    200: ResponsePostActivityResponse;\n};\n\nexport type PostApiVbyApiVersionBodyResponse = PostApiVbyApiVersionBodyResponses[keyof PostApiVbyApiVersionBodyResponses];\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/solid-query/asClass/@tanstack/solid-query.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport { type DefaultError, type MutationOptions, queryOptions } from '@tanstack/solid-query';\n\nimport { client } from '../client.gen';\nimport { BarBazService, BarService, FooBazService, FooService, type Options } from '../sdk.gen';\nimport type { FooBarPostData, FooBarPostResponse, FooBarPutData, FooBarPutResponse, FooPostData, FooPostResponse, FooPutData, FooPutResponse, GetFooBarData, GetFooBarResponse, GetFooData, GetFooResponse } from '../types.gen';\n\nexport type QueryKey<TOptions extends Options> = [\n    Pick<TOptions, 'baseUrl' | 'body' | 'headers' | 'path' | 'query'> & {\n        _id: string;\n        _infinite?: boolean;\n        tags?: ReadonlyArray<string>;\n    }\n];\n\nconst createQueryKey = <TOptions extends Options>(id: string, options?: TOptions, infinite?: boolean, tags?: ReadonlyArray<string>): [\n    QueryKey<TOptions>[0]\n] => {\n    const params: QueryKey<TOptions>[0] = { _id: id, baseUrl: options?.baseUrl || (options?.client ?? client).getConfig().baseUrl } as QueryKey<TOptions>[0];\n    if (infinite) {\n        params._infinite = infinite;\n    }\n    if (tags) {\n        params.tags = tags;\n    }\n    if (options?.body) {\n        params.body = options.body;\n    }\n    if (options?.headers) {\n        params.headers = options.headers;\n    }\n    if (options?.path) {\n        params.path = options.path;\n    }\n    if (options?.query) {\n        params.query = options.query;\n    }\n    return [params];\n};\n\nexport const getFooQueryKey = (options?: Options<GetFooData>) => createQueryKey('getFoo', options);\n\nexport const getFooOptions = (options?: Options<GetFooData>) => queryOptions<GetFooResponse, DefaultError, GetFooResponse, ReturnType<typeof getFooQueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await FooBazService.getFoo({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: getFooQueryKey(options)\n});\n\nexport const fooPostMutation = (options?: Partial<Options<FooPostData>>): MutationOptions<FooPostResponse, DefaultError, Options<FooPostData>> => {\n    const mutationOptions: MutationOptions<FooPostResponse, DefaultError, Options<FooPostData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await FooService.post({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const fooPutMutation = (options?: Partial<Options<FooPutData>>): MutationOptions<FooPutResponse, DefaultError, Options<FooPutData>> => {\n    const mutationOptions: MutationOptions<FooPutResponse, DefaultError, Options<FooPutData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await FooService.put({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const getFooBarQueryKey = (options?: Options<GetFooBarData>) => createQueryKey('getFooBar', options);\n\nexport const getFooBarOptions = (options?: Options<GetFooBarData>) => queryOptions<GetFooBarResponse, DefaultError, GetFooBarResponse, ReturnType<typeof getFooBarQueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await BarBazService.getFooBar({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: getFooBarQueryKey(options)\n});\n\nexport const fooBarPostMutation = (options?: Partial<Options<FooBarPostData>>): MutationOptions<FooBarPostResponse, DefaultError, Options<FooBarPostData>> => {\n    const mutationOptions: MutationOptions<FooBarPostResponse, DefaultError, Options<FooBarPostData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await BarService.post({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const fooBarPutMutation = (options?: Partial<Options<FooBarPutData>>): MutationOptions<FooBarPutResponse, DefaultError, Options<FooBarPutData>> => {\n    const mutationOptions: MutationOptions<FooBarPutResponse, DefaultError, Options<FooBarPutData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await BarService.put({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/solid-query/asClass/client/client.gen.ts",
    "content": "// 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 (options: RequestOptions) => {\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 url = buildUrl(opts);\n\n    return { opts, url };\n  };\n\n  const request: Client['request'] = async (options) => {\n    // @ts-expect-error\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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/solid-query/asClass/client/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type { Auth } from '../core/auth.gen';\nexport type { QuerySerializerOptions } from '../core/bodySerializer.gen';\nexport {\n  formDataBodySerializer,\n  jsonBodySerializer,\n  urlSearchParamsBodySerializer,\n} from '../core/bodySerializer.gen';\nexport { buildClientParams } from '../core/params.gen';\nexport { serializeQueryKeyValue } from '../core/queryKeySerializer.gen';\nexport { createClient } from './client.gen';\nexport type {\n  Client,\n  ClientOptions,\n  Config,\n  CreateClientConfig,\n  Options,\n  RequestOptions,\n  RequestResult,\n  ResolvedRequestOptions,\n  ResponseStyle,\n  TDataShape,\n} from './types.gen';\nexport { createConfig, mergeHeaders } from './utils.gen';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/solid-query/asClass/client/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { Auth } from '../core/auth.gen';\nimport type {\n  ServerSentEventsOptions,\n  ServerSentEventsResult,\n} from '../core/serverSentEvents.gen';\nimport type { Client as CoreClient, Config as CoreConfig } from '../core/types.gen';\nimport type { Middleware } from './utils.gen';\n\nexport type ResponseStyle = 'data' | 'fields';\n\nexport interface Config<T extends ClientOptions = ClientOptions>\n  extends Omit<RequestInit, 'body' | 'headers' | 'method'>, CoreConfig {\n  /**\n   * Base URL for all requests made by this client.\n   */\n  baseUrl?: T['baseUrl'];\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   * Please don't use the Fetch client for Next.js applications. The `next`\n   * options won't have any effect.\n   *\n   * Install {@link https://www.npmjs.com/package/@hey-api/client-next `@hey-api/client-next`} instead.\n   */\n  next?: never;\n  /**\n   * Return the response data parsed in a specified format. By default, `auto`\n   * will infer the appropriate method from the `Content-Type` response header.\n   * You can override this behavior with any of the {@link Body} methods.\n   * Select `stream` if you don't want to parse response data at all.\n   *\n   * @default 'auto'\n   */\n  parseAs?: 'arrayBuffer' | 'auto' | 'blob' | 'formData' | 'json' | 'stream' | 'text';\n  /**\n   * Should we return only data or multiple fields (data, error, response, etc.)?\n   *\n   * @default 'fields'\n   */\n  responseStyle?: ResponseStyle;\n  /**\n   * Throw an error instead of returning it in the response?\n   *\n   * @default false\n   */\n  throwOnError?: T['throwOnError'];\n}\n\nexport interface RequestOptions<\n  TData = unknown,\n  TResponseStyle extends ResponseStyle = 'fields',\n  ThrowOnError extends boolean = boolean,\n  Url extends string = string,\n>\n  extends\n    Config<{\n      responseStyle: TResponseStyle;\n      throwOnError: ThrowOnError;\n    }>,\n    Pick<\n      ServerSentEventsOptions<TData>,\n      | 'onRequest'\n      | 'onSseError'\n      | 'onSseEvent'\n      | 'sseDefaultRetryDelay'\n      | 'sseMaxRetryAttempts'\n      | 'sseMaxRetryDelay'\n    > {\n  /**\n   * Any body that you want to add to your request.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/fetch#body}\n   */\n  body?: unknown;\n  path?: Record<string, unknown>;\n  query?: Record<string, unknown>;\n  /**\n   * Security mechanism(s) to use for the request.\n   */\n  security?: ReadonlyArray<Auth>;\n  url: Url;\n}\n\nexport interface ResolvedRequestOptions<\n  TResponseStyle extends ResponseStyle = 'fields',\n  ThrowOnError extends boolean = boolean,\n  Url extends string = string,\n> extends RequestOptions<unknown, TResponseStyle, ThrowOnError, Url> {\n  serializedBody?: string;\n}\n\nexport type RequestResult<\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = boolean,\n  TResponseStyle extends ResponseStyle = 'fields',\n> = ThrowOnError extends true\n  ? Promise<\n      TResponseStyle extends 'data'\n        ? TData extends Record<string, unknown>\n          ? TData[keyof TData]\n          : TData\n        : {\n            data: TData extends Record<string, unknown> ? TData[keyof TData] : TData;\n            request: Request;\n            response: Response;\n          }\n    >\n  : Promise<\n      TResponseStyle extends 'data'\n        ? (TData extends Record<string, unknown> ? TData[keyof TData] : TData) | undefined\n        : (\n            | {\n                data: TData extends Record<string, unknown> ? TData[keyof TData] : TData;\n                error: undefined;\n              }\n            | {\n                data: undefined;\n                error: TError extends Record<string, unknown> ? TError[keyof TError] : TError;\n              }\n          ) & {\n            request: Request;\n            response: Response;\n          }\n    >;\n\nexport interface ClientOptions {\n  baseUrl?: string;\n  responseStyle?: ResponseStyle;\n  throwOnError?: boolean;\n}\n\ntype MethodFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'>,\n) => RequestResult<TData, TError, ThrowOnError, TResponseStyle>;\n\ntype SseFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'>,\n) => Promise<ServerSentEventsResult<TData, TError>>;\n\ntype RequestFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'> &\n    Pick<Required<RequestOptions<TData, TResponseStyle, ThrowOnError>>, 'method'>,\n) => RequestResult<TData, TError, ThrowOnError, TResponseStyle>;\n\ntype BuildUrlFn = <\n  TData extends {\n    body?: unknown;\n    path?: Record<string, unknown>;\n    query?: Record<string, unknown>;\n    url: string;\n  },\n>(\n  options: TData & Options<TData>,\n) => string;\n\nexport type Client = CoreClient<RequestFn, Config, MethodFn, BuildUrlFn, SseFn> & {\n  interceptors: Middleware<Request, Response, unknown, ResolvedRequestOptions>;\n};\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 = ClientOptions> = (\n  override?: Config<ClientOptions & T>,\n) => Config<Required<ClientOptions> & T>;\n\nexport interface TDataShape {\n  body?: unknown;\n  headers?: unknown;\n  path?: unknown;\n  query?: unknown;\n  url: string;\n}\n\ntype OmitKeys<T, K> = Pick<T, Exclude<keyof T, K>>;\n\nexport type Options<\n  TData extends TDataShape = TDataShape,\n  ThrowOnError extends boolean = boolean,\n  TResponse = unknown,\n  TResponseStyle extends ResponseStyle = 'fields',\n> = OmitKeys<\n  RequestOptions<TResponse, TResponseStyle, ThrowOnError>,\n  'body' | 'path' | 'query' | 'url'\n> &\n  ([TData] extends [never] ? unknown : Omit<TData, 'url'>);\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/solid-query/asClass/client/utils.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/solid-query/asClass/client.gen.ts",
    "content": "// 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>());\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/solid-query/asClass/core/auth.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/solid-query/asClass/core/bodySerializer.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/solid-query/asClass/core/params.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/solid-query/asClass/core/pathSerializer.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/solid-query/asClass/core/queryKeySerializer.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\n/**\n * JSON-friendly union that mirrors what Pinia Colada can hash.\n */\nexport type JsonValue =\n  | null\n  | string\n  | number\n  | boolean\n  | JsonValue[]\n  | { [key: string]: JsonValue };\n\n/**\n * Replacer that converts non-JSON values (bigint, Date, etc.) to safe substitutes.\n */\nexport const queryKeyJsonReplacer = (_key: string, value: unknown) => {\n  if (value === undefined || typeof value === 'function' || typeof value === 'symbol') {\n    return undefined;\n  }\n  if (typeof value === 'bigint') {\n    return value.toString();\n  }\n  if (value instanceof Date) {\n    return value.toISOString();\n  }\n  return value;\n};\n\n/**\n * Safely stringifies a value and parses it back into a JsonValue.\n */\nexport const stringifyToJsonValue = (input: unknown): JsonValue | undefined => {\n  try {\n    const json = JSON.stringify(input, queryKeyJsonReplacer);\n    if (json === undefined) {\n      return undefined;\n    }\n    return JSON.parse(json) as JsonValue;\n  } catch {\n    return undefined;\n  }\n};\n\n/**\n * Detects plain objects (including objects with a null prototype).\n */\nconst isPlainObject = (value: unknown): value is Record<string, unknown> => {\n  if (value === null || typeof value !== 'object') {\n    return false;\n  }\n  const prototype = Object.getPrototypeOf(value as object);\n  return prototype === Object.prototype || prototype === null;\n};\n\n/**\n * Turns URLSearchParams into a sorted JSON object for deterministic keys.\n */\nconst serializeSearchParams = (params: URLSearchParams): JsonValue => {\n  const entries = Array.from(params.entries()).sort(([a], [b]) => a.localeCompare(b));\n  const result: Record<string, JsonValue> = {};\n\n  for (const [key, value] of entries) {\n    const existing = result[key];\n    if (existing === undefined) {\n      result[key] = value;\n      continue;\n    }\n\n    if (Array.isArray(existing)) {\n      (existing as string[]).push(value);\n    } else {\n      result[key] = [existing, value];\n    }\n  }\n\n  return result;\n};\n\n/**\n * Normalizes any accepted value into a JSON-friendly shape for query keys.\n */\nexport const serializeQueryKeyValue = (value: unknown): JsonValue | undefined => {\n  if (value === null) {\n    return null;\n  }\n\n  if (typeof value === 'string' || typeof value === 'number' || typeof value === 'boolean') {\n    return value;\n  }\n\n  if (value === undefined || typeof value === 'function' || typeof value === 'symbol') {\n    return undefined;\n  }\n\n  if (typeof value === 'bigint') {\n    return value.toString();\n  }\n\n  if (value instanceof Date) {\n    return value.toISOString();\n  }\n\n  if (Array.isArray(value)) {\n    return stringifyToJsonValue(value);\n  }\n\n  if (typeof URLSearchParams !== 'undefined' && value instanceof URLSearchParams) {\n    return serializeSearchParams(value);\n  }\n\n  if (isPlainObject(value)) {\n    return stringifyToJsonValue(value);\n  }\n\n  return undefined;\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/solid-query/asClass/core/serverSentEvents.gen.ts",
    "content": "// 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 const 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            // Normalize line endings: CRLF -> LF, then CR -> LF\n            buffer = buffer.replace(/\\r\\n/g, '\\n').replace(/\\r/g, '\\n');\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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/solid-query/asClass/core/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { Auth, AuthToken } from './auth.gen';\nimport type { BodySerializer, QuerySerializer, QuerySerializerOptions } from './bodySerializer.gen';\n\nexport type HttpMethod =\n  | 'connect'\n  | 'delete'\n  | 'get'\n  | 'head'\n  | 'options'\n  | 'patch'\n  | 'post'\n  | 'put'\n  | 'trace';\n\nexport type Client<\n  RequestFn = never,\n  Config = unknown,\n  MethodFn = never,\n  BuildUrlFn = never,\n  SseFn = never,\n> = {\n  /**\n   * Returns the final request URL.\n   */\n  buildUrl: BuildUrlFn;\n  getConfig: () => Config;\n  request: RequestFn;\n  setConfig: (config: Config) => Config;\n} & {\n  [K in HttpMethod]: MethodFn;\n} & ([SseFn] extends [never] ? { sse?: never } : { sse: { [K in HttpMethod]: SseFn } });\n\nexport interface Config {\n  /**\n   * Auth token or a function returning auth token. The resolved value will be\n   * added to the request payload as defined by its `security` array.\n   */\n  auth?: ((auth: Auth) => Promise<AuthToken> | AuthToken) | AuthToken;\n  /**\n   * A function for serializing request body parameter. By default,\n   * {@link JSON.stringify()} will be used.\n   */\n  bodySerializer?: BodySerializer | null;\n  /**\n   * An object containing any HTTP headers that you want to pre-populate your\n   * `Headers` object with.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/Headers/Headers#init See more}\n   */\n  headers?:\n    | RequestInit['headers']\n    | Record<\n        string,\n        string | number | boolean | (string | number | boolean)[] | null | undefined | unknown\n      >;\n  /**\n   * The request method.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/fetch#method See more}\n   */\n  method?: Uppercase<HttpMethod>;\n  /**\n   * A function for serializing request query parameters. By default, arrays\n   * will be exploded in form style, objects will be exploded in deepObject\n   * style, and reserved characters are percent-encoded.\n   *\n   * This method will have no effect if the native `paramsSerializer()` Axios\n   * API function is used.\n   *\n   * {@link https://swagger.io/docs/specification/serialization/#query View examples}\n   */\n  querySerializer?: QuerySerializer | QuerySerializerOptions;\n  /**\n   * A function validating request data. This is useful if you want to ensure\n   * the request conforms to the desired shape, so it can be safely sent to\n   * the server.\n   */\n  requestValidator?: (data: unknown) => Promise<unknown>;\n  /**\n   * A function transforming response data before it's returned. This is useful\n   * for post-processing data, e.g. converting ISO strings into Date objects.\n   */\n  responseTransformer?: (data: unknown) => Promise<unknown>;\n  /**\n   * A function validating response data. This is useful if you want to ensure\n   * the response conforms to the desired shape, so it can be safely passed to\n   * the transformers and returned to the user.\n   */\n  responseValidator?: (data: unknown) => Promise<unknown>;\n}\n\ntype IsExactlyNeverOrNeverUndefined<T> = [T] extends [never]\n  ? true\n  : [T] extends [never | undefined]\n    ? [undefined] extends [T]\n      ? false\n      : true\n    : false;\n\nexport type OmitNever<T extends Record<string, unknown>> = {\n  [K in keyof T as IsExactlyNeverOrNeverUndefined<T[K]> extends true ? never : K]: T[K];\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/solid-query/asClass/core/utils.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/solid-query/asClass/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport { BarBazService, BarService, BarService2, FooBazService, FooService, FooService2, type Options } from './sdk.gen';\nexport type { ClientOptions, FooBarPostData, FooBarPostResponse, FooBarPostResponses, FooBarPutData, FooBarPutResponse, FooBarPutResponses, FooPostData, FooPostResponse, FooPostResponses, FooPutData, FooPutResponse, FooPutResponses, GetFooBarData, GetFooBarResponse, GetFooBarResponses, GetFooData, GetFooResponse, GetFooResponses } from './types.gen';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/solid-query/asClass/sdk.gen.ts",
    "content": "// 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 { FooBarPostData, FooBarPostResponses, FooBarPutData, FooBarPutResponses, FooPostData, FooPostResponses, FooPutData, FooPutResponses, GetFooBarData, GetFooBarResponses, GetFooData, GetFooResponses } from './types.gen';\n\nexport type Options<TData extends TDataShape = TDataShape, ThrowOnError extends boolean = boolean> = Options2<TData, ThrowOnError> & {\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\nexport class BarService {\n    public static post<ThrowOnError extends boolean = false>(options?: Options<FooBarPostData, ThrowOnError>) {\n        return (options?.client ?? client).post<FooBarPostResponses, unknown, ThrowOnError>({ url: '/foo/bar', ...options });\n    }\n    \n    public static put<ThrowOnError extends boolean = false>(options?: Options<FooBarPutData, ThrowOnError>) {\n        return (options?.client ?? client).put<FooBarPutResponses, unknown, ThrowOnError>({ url: '/foo/bar', ...options });\n    }\n}\n\nexport class FooService {\n    public static post<ThrowOnError extends boolean = false>(options?: Options<FooPostData, ThrowOnError>) {\n        return (options?.client ?? client).post<FooPostResponses, unknown, ThrowOnError>({ url: '/foo', ...options });\n    }\n    \n    public static put<ThrowOnError extends boolean = false>(options?: Options<FooPutData, ThrowOnError>) {\n        return (options?.client ?? client).put<FooPutResponses, unknown, ThrowOnError>({ url: '/foo', ...options });\n    }\n    \n    static barService = BarService;\n}\n\nexport class FooBazService {\n    public static getFoo<ThrowOnError extends boolean = false>(options?: Options<GetFooData, ThrowOnError>) {\n        return (options?.client ?? client).get<GetFooResponses, unknown, ThrowOnError>({ url: '/foo', ...options });\n    }\n    \n    static fooService = FooService;\n}\n\nexport class BarService2 {\n    public static post<ThrowOnError extends boolean = false>(options?: Options<FooBarPostData, ThrowOnError>) {\n        return (options?.client ?? client).post<FooBarPostResponses, unknown, ThrowOnError>({ url: '/foo/bar', ...options });\n    }\n    \n    public static put<ThrowOnError extends boolean = false>(options?: Options<FooBarPutData, ThrowOnError>) {\n        return (options?.client ?? client).put<FooBarPutResponses, unknown, ThrowOnError>({ url: '/foo/bar', ...options });\n    }\n}\n\nexport class FooService2 {\n    static barService = BarService2;\n}\n\nexport class BarBazService {\n    public static getFooBar<ThrowOnError extends boolean = false>(options?: Options<GetFooBarData, ThrowOnError>) {\n        return (options?.client ?? client).get<GetFooBarResponses, unknown, ThrowOnError>({ url: '/foo/bar', ...options });\n    }\n    \n    static fooService = FooService2;\n}\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/solid-query/asClass/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type ClientOptions = {\n    baseUrl: string;\n};\n\nexport type GetFooData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/foo';\n};\n\nexport type GetFooResponses = {\n    /**\n     * OK\n     */\n    200: string;\n};\n\nexport type GetFooResponse = GetFooResponses[keyof GetFooResponses];\n\nexport type FooPostData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/foo';\n};\n\nexport type FooPostResponses = {\n    /**\n     * OK\n     */\n    200: string;\n};\n\nexport type FooPostResponse = FooPostResponses[keyof FooPostResponses];\n\nexport type FooPutData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/foo';\n};\n\nexport type FooPutResponses = {\n    /**\n     * OK\n     */\n    200: string;\n};\n\nexport type FooPutResponse = FooPutResponses[keyof FooPutResponses];\n\nexport type GetFooBarData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/foo/bar';\n};\n\nexport type GetFooBarResponses = {\n    /**\n     * OK\n     */\n    200: string;\n};\n\nexport type GetFooBarResponse = GetFooBarResponses[keyof GetFooBarResponses];\n\nexport type FooBarPostData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/foo/bar';\n};\n\nexport type FooBarPostResponses = {\n    /**\n     * OK\n     */\n    200: string;\n};\n\nexport type FooBarPostResponse = FooBarPostResponses[keyof FooBarPostResponses];\n\nexport type FooBarPutData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/foo/bar';\n};\n\nexport type FooBarPutResponses = {\n    /**\n     * OK\n     */\n    200: string;\n};\n\nexport type FooBarPutResponse = FooBarPutResponses[keyof FooBarPutResponses];\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/solid-query/axios/@tanstack/solid-query.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport { type DefaultError, type MutationOptions, queryOptions } from '@tanstack/solid-query';\nimport type { AxiosError } from 'axios';\n\nimport { client } from '../client.gen';\nimport { callToTestOrderOfParams, callWithDefaultOptionalParameters, callWithDefaultParameters, callWithDescriptions, callWithDuplicateResponses, callWithNoContentResponse, callWithParameters, callWithResponse, callWithResponseAndNoContentResponse, callWithResponses, callWithResultFromHeader, callWithWeirdParameterNames, collectionFormat, complexTypes, deleteCallWithoutParametersAndResponse, dummyA, dummyB, duplicateName, duplicateName2, duplicateName3, duplicateName4, fooWow, getCallWithoutParametersAndResponse, nonAsciiæøåÆøÅöôêÊ字符串, type Options, patchApiVbyApiVersionNoTag, patchCallWithoutParametersAndResponse, postApiVbyApiVersionBody, postCallWithoutParametersAndResponse, putCallWithoutParametersAndResponse, serviceWithEmptyTag, testErrorCode, types } from '../sdk.gen';\nimport type { CallToTestOrderOfParamsData, CallWithDefaultOptionalParametersData, CallWithDefaultParametersData, CallWithDescriptionsData, CallWithDuplicateResponsesData, CallWithDuplicateResponsesError, CallWithDuplicateResponsesResponse, CallWithNoContentResponseData, CallWithParametersData, CallWithResponseAndNoContentResponseData, CallWithResponseAndNoContentResponseResponse, CallWithResponseData, CallWithResponseResponse, CallWithResponsesData, CallWithResponsesError, CallWithResponsesResponse, CallWithResultFromHeaderData, CallWithWeirdParameterNamesData, CollectionFormatData, ComplexTypesData, ComplexTypesResponse, DeleteCallWithoutParametersAndResponseData, DummyAData, DummyBData, DuplicateName2Data, DuplicateName3Data, DuplicateName4Data, DuplicateNameData, FooWowData, GetCallWithoutParametersAndResponseData, NonAsciiæøåÆøÅöôêÊ字符串Data, NonAsciiæøåÆøÅöôêÊ字符串Response, PatchApiVbyApiVersionNoTagData, PatchCallWithoutParametersAndResponseData, PostApiVbyApiVersionBodyData, PostApiVbyApiVersionBodyError, PostApiVbyApiVersionBodyResponse, PostCallWithoutParametersAndResponseData, PutCallWithoutParametersAndResponseData, ServiceWithEmptyTagData, TestErrorCodeData, TypesData, TypesResponse } from '../types.gen';\n\nexport type QueryKey<TOptions extends Options> = [\n    Pick<TOptions, 'baseURL' | 'body' | 'headers' | 'path' | 'query'> & {\n        _id: string;\n        _infinite?: boolean;\n        tags?: ReadonlyArray<string>;\n    }\n];\n\nconst createQueryKey = <TOptions extends Options>(id: string, options?: TOptions, infinite?: boolean, tags?: ReadonlyArray<string>): [\n    QueryKey<TOptions>[0]\n] => {\n    const params: QueryKey<TOptions>[0] = { _id: id, baseURL: options?.baseURL || (options?.client ?? client).getConfig().baseURL } as QueryKey<TOptions>[0];\n    if (infinite) {\n        params._infinite = infinite;\n    }\n    if (tags) {\n        params.tags = tags;\n    }\n    if (options?.body) {\n        params.body = options.body;\n    }\n    if (options?.headers) {\n        params.headers = options.headers;\n    }\n    if (options?.path) {\n        params.path = options.path;\n    }\n    if (options?.query) {\n        params.query = options.query;\n    }\n    return [params];\n};\n\nexport const serviceWithEmptyTagQueryKey = (options?: Options<ServiceWithEmptyTagData>) => createQueryKey('serviceWithEmptyTag', options);\n\nexport const serviceWithEmptyTagOptions = (options?: Options<ServiceWithEmptyTagData>) => queryOptions<unknown, AxiosError<DefaultError>, unknown, ReturnType<typeof serviceWithEmptyTagQueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await serviceWithEmptyTag({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: serviceWithEmptyTagQueryKey(options)\n});\n\nexport const patchApiVbyApiVersionNoTagMutation = (options?: Partial<Options<PatchApiVbyApiVersionNoTagData>>): MutationOptions<unknown, AxiosError<DefaultError>, Options<PatchApiVbyApiVersionNoTagData>> => {\n    const mutationOptions: MutationOptions<unknown, AxiosError<DefaultError>, Options<PatchApiVbyApiVersionNoTagData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await patchApiVbyApiVersionNoTag({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const fooWowMutation = (options?: Partial<Options<FooWowData>>): MutationOptions<unknown, AxiosError<DefaultError>, Options<FooWowData>> => {\n    const mutationOptions: MutationOptions<unknown, AxiosError<DefaultError>, Options<FooWowData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await fooWow({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const deleteCallWithoutParametersAndResponseMutation = (options?: Partial<Options<DeleteCallWithoutParametersAndResponseData>>): MutationOptions<unknown, AxiosError<DefaultError>, Options<DeleteCallWithoutParametersAndResponseData>> => {\n    const mutationOptions: MutationOptions<unknown, AxiosError<DefaultError>, Options<DeleteCallWithoutParametersAndResponseData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await deleteCallWithoutParametersAndResponse({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const getCallWithoutParametersAndResponseQueryKey = (options?: Options<GetCallWithoutParametersAndResponseData>) => createQueryKey('getCallWithoutParametersAndResponse', options);\n\nexport const getCallWithoutParametersAndResponseOptions = (options?: Options<GetCallWithoutParametersAndResponseData>) => queryOptions<unknown, AxiosError<DefaultError>, unknown, ReturnType<typeof getCallWithoutParametersAndResponseQueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await getCallWithoutParametersAndResponse({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: getCallWithoutParametersAndResponseQueryKey(options)\n});\n\nexport const patchCallWithoutParametersAndResponseMutation = (options?: Partial<Options<PatchCallWithoutParametersAndResponseData>>): MutationOptions<unknown, AxiosError<DefaultError>, Options<PatchCallWithoutParametersAndResponseData>> => {\n    const mutationOptions: MutationOptions<unknown, AxiosError<DefaultError>, Options<PatchCallWithoutParametersAndResponseData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await patchCallWithoutParametersAndResponse({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const postCallWithoutParametersAndResponseMutation = (options?: Partial<Options<PostCallWithoutParametersAndResponseData>>): MutationOptions<unknown, AxiosError<DefaultError>, Options<PostCallWithoutParametersAndResponseData>> => {\n    const mutationOptions: MutationOptions<unknown, AxiosError<DefaultError>, Options<PostCallWithoutParametersAndResponseData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await postCallWithoutParametersAndResponse({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const putCallWithoutParametersAndResponseMutation = (options?: Partial<Options<PutCallWithoutParametersAndResponseData>>): MutationOptions<unknown, AxiosError<DefaultError>, Options<PutCallWithoutParametersAndResponseData>> => {\n    const mutationOptions: MutationOptions<unknown, AxiosError<DefaultError>, Options<PutCallWithoutParametersAndResponseData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await putCallWithoutParametersAndResponse({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const callWithDescriptionsMutation = (options?: Partial<Options<CallWithDescriptionsData>>): MutationOptions<unknown, AxiosError<DefaultError>, Options<CallWithDescriptionsData>> => {\n    const mutationOptions: MutationOptions<unknown, AxiosError<DefaultError>, Options<CallWithDescriptionsData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await callWithDescriptions({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const callWithParametersMutation = (options?: Partial<Options<CallWithParametersData>>): MutationOptions<unknown, AxiosError<DefaultError>, Options<CallWithParametersData>> => {\n    const mutationOptions: MutationOptions<unknown, AxiosError<DefaultError>, Options<CallWithParametersData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await callWithParameters({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const callWithWeirdParameterNamesMutation = (options?: Partial<Options<CallWithWeirdParameterNamesData>>): MutationOptions<unknown, AxiosError<DefaultError>, Options<CallWithWeirdParameterNamesData>> => {\n    const mutationOptions: MutationOptions<unknown, AxiosError<DefaultError>, Options<CallWithWeirdParameterNamesData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await callWithWeirdParameterNames({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const callWithDefaultParametersQueryKey = (options: Options<CallWithDefaultParametersData>) => createQueryKey('callWithDefaultParameters', options);\n\nexport const callWithDefaultParametersOptions = (options: Options<CallWithDefaultParametersData>) => queryOptions<unknown, AxiosError<DefaultError>, unknown, ReturnType<typeof callWithDefaultParametersQueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await callWithDefaultParameters({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: callWithDefaultParametersQueryKey(options)\n});\n\nexport const callWithDefaultOptionalParametersMutation = (options?: Partial<Options<CallWithDefaultOptionalParametersData>>): MutationOptions<unknown, AxiosError<DefaultError>, Options<CallWithDefaultOptionalParametersData>> => {\n    const mutationOptions: MutationOptions<unknown, AxiosError<DefaultError>, Options<CallWithDefaultOptionalParametersData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await callWithDefaultOptionalParameters({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const callToTestOrderOfParamsMutation = (options?: Partial<Options<CallToTestOrderOfParamsData>>): MutationOptions<unknown, AxiosError<DefaultError>, Options<CallToTestOrderOfParamsData>> => {\n    const mutationOptions: MutationOptions<unknown, AxiosError<DefaultError>, Options<CallToTestOrderOfParamsData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await callToTestOrderOfParams({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const duplicateNameMutation = (options?: Partial<Options<DuplicateNameData>>): MutationOptions<unknown, AxiosError<DefaultError>, Options<DuplicateNameData>> => {\n    const mutationOptions: MutationOptions<unknown, AxiosError<DefaultError>, Options<DuplicateNameData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await duplicateName({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const duplicateName2QueryKey = (options?: Options<DuplicateName2Data>) => createQueryKey('duplicateName2', options);\n\nexport const duplicateName2Options = (options?: Options<DuplicateName2Data>) => queryOptions<unknown, AxiosError<DefaultError>, unknown, ReturnType<typeof duplicateName2QueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await duplicateName2({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: duplicateName2QueryKey(options)\n});\n\nexport const duplicateName3Mutation = (options?: Partial<Options<DuplicateName3Data>>): MutationOptions<unknown, AxiosError<DefaultError>, Options<DuplicateName3Data>> => {\n    const mutationOptions: MutationOptions<unknown, AxiosError<DefaultError>, Options<DuplicateName3Data>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await duplicateName3({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const duplicateName4Mutation = (options?: Partial<Options<DuplicateName4Data>>): MutationOptions<unknown, AxiosError<DefaultError>, Options<DuplicateName4Data>> => {\n    const mutationOptions: MutationOptions<unknown, AxiosError<DefaultError>, Options<DuplicateName4Data>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await duplicateName4({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const callWithNoContentResponseQueryKey = (options?: Options<CallWithNoContentResponseData>) => createQueryKey('callWithNoContentResponse', options);\n\nexport const callWithNoContentResponseOptions = (options?: Options<CallWithNoContentResponseData>) => queryOptions<unknown, AxiosError<DefaultError>, unknown, ReturnType<typeof callWithNoContentResponseQueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await callWithNoContentResponse({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: callWithNoContentResponseQueryKey(options)\n});\n\nexport const callWithResponseAndNoContentResponseQueryKey = (options?: Options<CallWithResponseAndNoContentResponseData>) => createQueryKey('callWithResponseAndNoContentResponse', options);\n\nexport const callWithResponseAndNoContentResponseOptions = (options?: Options<CallWithResponseAndNoContentResponseData>) => queryOptions<CallWithResponseAndNoContentResponseResponse, AxiosError<DefaultError>, CallWithResponseAndNoContentResponseResponse, ReturnType<typeof callWithResponseAndNoContentResponseQueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await callWithResponseAndNoContentResponse({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: callWithResponseAndNoContentResponseQueryKey(options)\n});\n\nexport const dummyAQueryKey = (options?: Options<DummyAData>) => createQueryKey('dummyA', options);\n\nexport const dummyAOptions = (options?: Options<DummyAData>) => queryOptions<unknown, AxiosError<DefaultError>, unknown, ReturnType<typeof dummyAQueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await dummyA({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: dummyAQueryKey(options)\n});\n\nexport const dummyBQueryKey = (options?: Options<DummyBData>) => createQueryKey('dummyB', options);\n\nexport const dummyBOptions = (options?: Options<DummyBData>) => queryOptions<unknown, AxiosError<DefaultError>, unknown, ReturnType<typeof dummyBQueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await dummyB({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: dummyBQueryKey(options)\n});\n\nexport const callWithResponseQueryKey = (options?: Options<CallWithResponseData>) => createQueryKey('callWithResponse', options);\n\nexport const callWithResponseOptions = (options?: Options<CallWithResponseData>) => queryOptions<CallWithResponseResponse, AxiosError<DefaultError>, CallWithResponseResponse, ReturnType<typeof callWithResponseQueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await callWithResponse({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: callWithResponseQueryKey(options)\n});\n\nexport const callWithDuplicateResponsesMutation = (options?: Partial<Options<CallWithDuplicateResponsesData>>): MutationOptions<CallWithDuplicateResponsesResponse, AxiosError<CallWithDuplicateResponsesError>, Options<CallWithDuplicateResponsesData>> => {\n    const mutationOptions: MutationOptions<CallWithDuplicateResponsesResponse, AxiosError<CallWithDuplicateResponsesError>, Options<CallWithDuplicateResponsesData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await callWithDuplicateResponses({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const callWithResponsesMutation = (options?: Partial<Options<CallWithResponsesData>>): MutationOptions<CallWithResponsesResponse, AxiosError<CallWithResponsesError>, Options<CallWithResponsesData>> => {\n    const mutationOptions: MutationOptions<CallWithResponsesResponse, AxiosError<CallWithResponsesError>, Options<CallWithResponsesData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await callWithResponses({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const collectionFormatQueryKey = (options: Options<CollectionFormatData>) => createQueryKey('collectionFormat', options);\n\nexport const collectionFormatOptions = (options: Options<CollectionFormatData>) => queryOptions<unknown, AxiosError<DefaultError>, unknown, ReturnType<typeof collectionFormatQueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await collectionFormat({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: collectionFormatQueryKey(options)\n});\n\nexport const typesQueryKey = (options: Options<TypesData>) => createQueryKey('types', options);\n\nexport const typesOptions = (options: Options<TypesData>) => queryOptions<TypesResponse, AxiosError<DefaultError>, TypesResponse, ReturnType<typeof typesQueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await types({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: typesQueryKey(options)\n});\n\nexport const complexTypesQueryKey = (options: Options<ComplexTypesData>) => createQueryKey('complexTypes', options);\n\nexport const complexTypesOptions = (options: Options<ComplexTypesData>) => queryOptions<ComplexTypesResponse, AxiosError<DefaultError>, ComplexTypesResponse, ReturnType<typeof complexTypesQueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await complexTypes({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: complexTypesQueryKey(options)\n});\n\nexport const callWithResultFromHeaderMutation = (options?: Partial<Options<CallWithResultFromHeaderData>>): MutationOptions<unknown, AxiosError<DefaultError>, Options<CallWithResultFromHeaderData>> => {\n    const mutationOptions: MutationOptions<unknown, AxiosError<DefaultError>, Options<CallWithResultFromHeaderData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await callWithResultFromHeader({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const testErrorCodeMutation = (options?: Partial<Options<TestErrorCodeData>>): MutationOptions<unknown, AxiosError<DefaultError>, Options<TestErrorCodeData>> => {\n    const mutationOptions: MutationOptions<unknown, AxiosError<DefaultError>, Options<TestErrorCodeData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await testErrorCode({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const nonAsciiæøåÆøÅöôêÊ字符串Mutation = (options?: Partial<Options<NonAsciiæøåÆøÅöôêÊ字符串Data>>): MutationOptions<NonAsciiæøåÆøÅöôêÊ字符串Response, AxiosError<DefaultError>, Options<NonAsciiæøåÆøÅöôêÊ字符串Data>> => {\n    const mutationOptions: MutationOptions<NonAsciiæøåÆøÅöôêÊ字符串Response, AxiosError<DefaultError>, Options<NonAsciiæøåÆøÅöôêÊ字符串Data>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await nonAsciiæøåÆøÅöôêÊ字符串({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\n/**\n * Body should not be unknown\n *\n * Body should not be unknown\n */\nexport const postApiVbyApiVersionBodyMutation = (options?: Partial<Options<PostApiVbyApiVersionBodyData>>): MutationOptions<PostApiVbyApiVersionBodyResponse, AxiosError<PostApiVbyApiVersionBodyError>, Options<PostApiVbyApiVersionBodyData>> => {\n    const mutationOptions: MutationOptions<PostApiVbyApiVersionBodyResponse, AxiosError<PostApiVbyApiVersionBodyError>, Options<PostApiVbyApiVersionBodyData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await postApiVbyApiVersionBody({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/solid-query/axios/client/client.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { AxiosError, AxiosInstance, RawAxiosRequestHeaders } from 'axios';\nimport axios from 'axios';\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 } from './types.gen';\nimport { buildUrl, createConfig, mergeConfigs, mergeHeaders, setAuthParams } from './utils.gen';\n\nexport const createClient = (config: Config = {}): Client => {\n  let _config = mergeConfigs(createConfig(), config);\n\n  let instance: AxiosInstance;\n\n  if (_config.axios && !('Axios' in _config.axios)) {\n    instance = _config.axios;\n  } else {\n    // eslint-disable-next-line @typescript-eslint/no-unused-vars\n    const { auth, ...configWithoutAuth } = _config;\n    instance = axios.create(configWithoutAuth);\n  }\n\n  const getConfig = (): Config => ({ ..._config });\n\n  const setConfig = (config: Config): Config => {\n    _config = mergeConfigs(_config, config);\n    instance.defaults = {\n      ...instance.defaults,\n      ..._config,\n      // @ts-expect-error\n      headers: mergeHeaders(instance.defaults.headers, _config.headers),\n    };\n    return getConfig();\n  };\n\n  const beforeRequest = async (options: RequestOptions) => {\n    const opts = {\n      ..._config,\n      ...options,\n      axios: options.axios ?? _config.axios ?? instance,\n      headers: mergeHeaders(_config.headers, options.headers),\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.body = opts.bodySerializer(opts.body);\n    }\n\n    const url = buildUrl(opts);\n\n    return { opts, url };\n  };\n\n  // @ts-expect-error\n  const request: Client['request'] = async (options) => {\n    // @ts-expect-error\n    const { opts, url } = await beforeRequest(options);\n    try {\n      // assign Axios here for consistency with fetch\n      const _axios = opts.axios!;\n      // eslint-disable-next-line @typescript-eslint/no-unused-vars\n      const { auth, ...optsWithoutAuth } = opts;\n      const response = await _axios({\n        ...optsWithoutAuth,\n        baseURL: '', // the baseURL is already included in `url`\n        data: getValidRequestBody(opts),\n        headers: opts.headers as RawAxiosRequestHeaders,\n        // let `paramsSerializer()` handle query params if it exists\n        params: opts.paramsSerializer ? opts.query : undefined,\n        url,\n      });\n\n      let { data } = response;\n\n      if (opts.responseType === '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 {\n        ...response,\n        data: data ?? {},\n      };\n    } catch (error) {\n      const e = error as AxiosError;\n      if (opts.throwOnError) {\n        throw e;\n      }\n      // @ts-expect-error\n      e.error = e.response?.data ?? {};\n      return e;\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 Record<string, string>,\n      method,\n      serializedBody: getValidRequestBody(opts) as BodyInit | null | undefined,\n      // @ts-expect-error\n      signal: opts.signal,\n      url,\n    });\n  };\n\n  const _buildUrl: Client['buildUrl'] = (options) =>\n    buildUrl({ axios: instance, ..._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    instance,\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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/solid-query/axios/client/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type { Auth } from '../core/auth.gen';\nexport type { QuerySerializerOptions } from '../core/bodySerializer.gen';\nexport {\n  formDataBodySerializer,\n  jsonBodySerializer,\n  urlSearchParamsBodySerializer,\n} from '../core/bodySerializer.gen';\nexport { buildClientParams } from '../core/params.gen';\nexport { serializeQueryKeyValue } from '../core/queryKeySerializer.gen';\nexport { createClient } from './client.gen';\nexport type {\n  Client,\n  ClientOptions,\n  Config,\n  CreateClientConfig,\n  Options,\n  RequestOptions,\n  RequestResult,\n  TDataShape,\n} from './types.gen';\nexport { createConfig } from './utils.gen';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/solid-query/axios/client/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type {\n  AxiosError,\n  AxiosInstance,\n  AxiosRequestHeaders,\n  AxiosResponse,\n  AxiosStatic,\n  CreateAxiosDefaults,\n} from 'axios';\n\nimport type { Auth } from '../core/auth.gen';\nimport type {\n  ServerSentEventsOptions,\n  ServerSentEventsResult,\n} from '../core/serverSentEvents.gen';\nimport type { Client as CoreClient, Config as CoreConfig } from '../core/types.gen';\n\nexport interface Config<T extends ClientOptions = ClientOptions>\n  extends Omit<CreateAxiosDefaults, 'auth' | 'baseURL' | 'headers' | 'method'>, CoreConfig {\n  /**\n   * Axios implementation. You can use this option to provide either an\n   * `AxiosStatic` or an `AxiosInstance`.\n   *\n   * @default axios\n   */\n  axios?: AxiosStatic | AxiosInstance;\n  /**\n   * Base URL for all requests made by this client.\n   */\n  baseURL?: T['baseURL'];\n  /**\n   * An object containing any HTTP headers that you want to pre-populate your\n   * `Headers` object with.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/Headers/Headers#init See more}\n   */\n  headers?:\n    | AxiosRequestHeaders\n    | Record<\n        string,\n        string | number | boolean | (string | number | boolean)[] | null | undefined | unknown\n      >;\n  /**\n   * Throw an error instead of returning it in the response?\n   *\n   * @default false\n   */\n  throwOnError?: T['throwOnError'];\n}\n\nexport interface RequestOptions<\n  TData = unknown,\n  ThrowOnError extends boolean = boolean,\n  Url extends string = string,\n>\n  extends\n    Config<{\n      throwOnError: ThrowOnError;\n    }>,\n    Pick<\n      ServerSentEventsOptions<TData>,\n      | 'onRequest'\n      | 'onSseError'\n      | 'onSseEvent'\n      | 'sseDefaultRetryDelay'\n      | 'sseMaxRetryAttempts'\n      | 'sseMaxRetryDelay'\n    > {\n  /**\n   * Any body that you want to add to your request.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/fetch#body}\n   */\n  body?: unknown;\n  path?: Record<string, unknown>;\n  query?: Record<string, unknown>;\n  /**\n   * Security mechanism(s) to use for the request.\n   */\n  security?: ReadonlyArray<Auth>;\n  url: Url;\n}\n\nexport interface ClientOptions {\n  baseURL?: string;\n  throwOnError?: boolean;\n}\n\nexport type RequestResult<\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = boolean,\n> = ThrowOnError extends true\n  ? Promise<AxiosResponse<TData extends Record<string, unknown> ? TData[keyof TData] : TData>>\n  : Promise<\n      | (AxiosResponse<TData extends Record<string, unknown> ? TData[keyof TData] : TData> & {\n          error: undefined;\n        })\n      | (AxiosError<TError extends Record<string, unknown> ? TError[keyof TError] : TError> & {\n          data: undefined;\n          error: TError extends Record<string, unknown> ? TError[keyof TError] : TError;\n        })\n    >;\n\ntype MethodFn = <TData = unknown, TError = unknown, ThrowOnError extends boolean = false>(\n  options: Omit<RequestOptions<TData, ThrowOnError>, 'method'>,\n) => RequestResult<TData, TError, ThrowOnError>;\n\ntype SseFn = <TData = unknown, TError = unknown, ThrowOnError extends boolean = false>(\n  options: Omit<RequestOptions<TData, ThrowOnError>, 'method'>,\n) => Promise<ServerSentEventsResult<TData, TError>>;\n\ntype RequestFn = <TData = unknown, TError = unknown, ThrowOnError extends boolean = false>(\n  options: Omit<RequestOptions<TData, ThrowOnError>, 'method'> &\n    Pick<Required<RequestOptions<TData, ThrowOnError>>, 'method'>,\n) => RequestResult<TData, TError, ThrowOnError>;\n\ntype BuildUrlFn = <\n  TData extends {\n    body?: unknown;\n    path?: Record<string, unknown>;\n    query?: Record<string, unknown>;\n    url: string;\n  },\n>(\n  options: TData & Options<TData>,\n) => string;\n\nexport type Client = CoreClient<RequestFn, Config, MethodFn, BuildUrlFn, SseFn> & {\n  instance: AxiosInstance;\n};\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 = ClientOptions> = (\n  override?: Config<ClientOptions & T>,\n) => Config<Required<ClientOptions> & T>;\n\nexport interface TDataShape {\n  body?: unknown;\n  headers?: unknown;\n  path?: unknown;\n  query?: unknown;\n  url: string;\n}\n\ntype OmitKeys<T, K> = Pick<T, Exclude<keyof T, K>>;\n\nexport type Options<\n  TData extends TDataShape = TDataShape,\n  ThrowOnError extends boolean = boolean,\n  TResponse = unknown,\n> = OmitKeys<RequestOptions<TResponse, ThrowOnError>, 'body' | 'path' | 'query' | 'url'> &\n  ([TData] extends [never] ? unknown : Omit<TData, 'url'>);\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/solid-query/axios/client/utils.gen.ts",
    "content": "// 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 {\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\nconst checkForExistence = (\n  options: Pick<RequestOptions, 'auth' | 'query'> & {\n    headers: Record<any, unknown>;\n  },\n  name?: string,\n): boolean => {\n  if (!name) {\n    return false;\n  }\n  if (name in options.headers || options.query?.[name]) {\n    return true;\n  }\n  if (\n    'Cookie' in options.headers &&\n    options.headers['Cookie'] &&\n    typeof options.headers['Cookie'] === 'string'\n  ) {\n    return options.headers['Cookie'].includes(`${name}=`);\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: Record<any, unknown>;\n  }) => {\n  for (const auth of security) {\n    if (checkForExistence(options, auth.name)) {\n      continue;\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        const value = `${name}=${token}`;\n        if ('Cookie' in options.headers && options.headers['Cookie']) {\n          options.headers['Cookie'] = `${options.headers['Cookie']}; ${value}`;\n        } else {\n          options.headers['Cookie'] = value;\n        }\n        break;\n      }\n      case 'header':\n      default:\n        options.headers[name] = token;\n        break;\n    }\n  }\n};\n\nexport const buildUrl: Client['buildUrl'] = (options) => {\n  const instanceBaseUrl = options.axios?.defaults?.baseURL;\n\n  const baseUrl =\n    !!options.baseURL && typeof options.baseURL === 'string' ? options.baseURL : instanceBaseUrl;\n\n  return getUrl({\n    baseUrl: baseUrl as string,\n    path: options.path,\n    // let `paramsSerializer()` handle query params if it exists\n    query: !options.paramsSerializer ? options.query : undefined,\n    querySerializer:\n      typeof options.querySerializer === 'function'\n        ? options.querySerializer\n        : createQuerySerializer(options.querySerializer),\n    url: options.url,\n  });\n};\n\nexport const mergeConfigs = (a: Config, b: Config): Config => {\n  const config = { ...a, ...b };\n  config.headers = mergeHeaders(a.headers, b.headers);\n  return config;\n};\n\n/**\n * Special Axios headers keywords allowing to set headers by request method.\n */\nexport const axiosHeadersKeywords = [\n  'common',\n  'delete',\n  'get',\n  'head',\n  'patch',\n  'post',\n  'put',\n] as const;\n\nexport const mergeHeaders = (\n  ...headers: Array<Required<Config>['headers'] | undefined>\n): Record<any, unknown> => {\n  const mergedHeaders: Record<any, unknown> = {};\n  for (const header of headers) {\n    if (!header || typeof header !== 'object') {\n      continue;\n    }\n\n    const iterator = Object.entries(header);\n\n    for (const [key, value] of iterator) {\n      if (\n        axiosHeadersKeywords.includes(key as (typeof axiosHeadersKeywords)[number]) &&\n        typeof value === 'object'\n      ) {\n        mergedHeaders[key] = {\n          ...(mergedHeaders[key] as Record<any, unknown>),\n          ...value,\n        };\n      } else if (value === null) {\n        delete mergedHeaders[key];\n      } else if (Array.isArray(value)) {\n        for (const v of value) {\n          // @ts-expect-error\n          mergedHeaders[key] = [...(mergedHeaders[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[key] = typeof value === 'object' ? JSON.stringify(value) : (value as string);\n      }\n    }\n  }\n  return mergedHeaders;\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  ...override,\n});\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/solid-query/axios/client.gen.ts",
    "content": "// 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: 'http://localhost:3000/base' }));\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/solid-query/axios/core/auth.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/solid-query/axios/core/bodySerializer.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/solid-query/axios/core/params.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/solid-query/axios/core/pathSerializer.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/solid-query/axios/core/queryKeySerializer.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\n/**\n * JSON-friendly union that mirrors what Pinia Colada can hash.\n */\nexport type JsonValue =\n  | null\n  | string\n  | number\n  | boolean\n  | JsonValue[]\n  | { [key: string]: JsonValue };\n\n/**\n * Replacer that converts non-JSON values (bigint, Date, etc.) to safe substitutes.\n */\nexport const queryKeyJsonReplacer = (_key: string, value: unknown) => {\n  if (value === undefined || typeof value === 'function' || typeof value === 'symbol') {\n    return undefined;\n  }\n  if (typeof value === 'bigint') {\n    return value.toString();\n  }\n  if (value instanceof Date) {\n    return value.toISOString();\n  }\n  return value;\n};\n\n/**\n * Safely stringifies a value and parses it back into a JsonValue.\n */\nexport const stringifyToJsonValue = (input: unknown): JsonValue | undefined => {\n  try {\n    const json = JSON.stringify(input, queryKeyJsonReplacer);\n    if (json === undefined) {\n      return undefined;\n    }\n    return JSON.parse(json) as JsonValue;\n  } catch {\n    return undefined;\n  }\n};\n\n/**\n * Detects plain objects (including objects with a null prototype).\n */\nconst isPlainObject = (value: unknown): value is Record<string, unknown> => {\n  if (value === null || typeof value !== 'object') {\n    return false;\n  }\n  const prototype = Object.getPrototypeOf(value as object);\n  return prototype === Object.prototype || prototype === null;\n};\n\n/**\n * Turns URLSearchParams into a sorted JSON object for deterministic keys.\n */\nconst serializeSearchParams = (params: URLSearchParams): JsonValue => {\n  const entries = Array.from(params.entries()).sort(([a], [b]) => a.localeCompare(b));\n  const result: Record<string, JsonValue> = {};\n\n  for (const [key, value] of entries) {\n    const existing = result[key];\n    if (existing === undefined) {\n      result[key] = value;\n      continue;\n    }\n\n    if (Array.isArray(existing)) {\n      (existing as string[]).push(value);\n    } else {\n      result[key] = [existing, value];\n    }\n  }\n\n  return result;\n};\n\n/**\n * Normalizes any accepted value into a JSON-friendly shape for query keys.\n */\nexport const serializeQueryKeyValue = (value: unknown): JsonValue | undefined => {\n  if (value === null) {\n    return null;\n  }\n\n  if (typeof value === 'string' || typeof value === 'number' || typeof value === 'boolean') {\n    return value;\n  }\n\n  if (value === undefined || typeof value === 'function' || typeof value === 'symbol') {\n    return undefined;\n  }\n\n  if (typeof value === 'bigint') {\n    return value.toString();\n  }\n\n  if (value instanceof Date) {\n    return value.toISOString();\n  }\n\n  if (Array.isArray(value)) {\n    return stringifyToJsonValue(value);\n  }\n\n  if (typeof URLSearchParams !== 'undefined' && value instanceof URLSearchParams) {\n    return serializeSearchParams(value);\n  }\n\n  if (isPlainObject(value)) {\n    return stringifyToJsonValue(value);\n  }\n\n  return undefined;\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/solid-query/axios/core/serverSentEvents.gen.ts",
    "content": "// 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 const 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            // Normalize line endings: CRLF -> LF, then CR -> LF\n            buffer = buffer.replace(/\\r\\n/g, '\\n').replace(/\\r/g, '\\n');\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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/solid-query/axios/core/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { Auth, AuthToken } from './auth.gen';\nimport type { BodySerializer, QuerySerializer, QuerySerializerOptions } from './bodySerializer.gen';\n\nexport type HttpMethod =\n  | 'connect'\n  | 'delete'\n  | 'get'\n  | 'head'\n  | 'options'\n  | 'patch'\n  | 'post'\n  | 'put'\n  | 'trace';\n\nexport type Client<\n  RequestFn = never,\n  Config = unknown,\n  MethodFn = never,\n  BuildUrlFn = never,\n  SseFn = never,\n> = {\n  /**\n   * Returns the final request URL.\n   */\n  buildUrl: BuildUrlFn;\n  getConfig: () => Config;\n  request: RequestFn;\n  setConfig: (config: Config) => Config;\n} & {\n  [K in HttpMethod]: MethodFn;\n} & ([SseFn] extends [never] ? { sse?: never } : { sse: { [K in HttpMethod]: SseFn } });\n\nexport interface Config {\n  /**\n   * Auth token or a function returning auth token. The resolved value will be\n   * added to the request payload as defined by its `security` array.\n   */\n  auth?: ((auth: Auth) => Promise<AuthToken> | AuthToken) | AuthToken;\n  /**\n   * A function for serializing request body parameter. By default,\n   * {@link JSON.stringify()} will be used.\n   */\n  bodySerializer?: BodySerializer | null;\n  /**\n   * An object containing any HTTP headers that you want to pre-populate your\n   * `Headers` object with.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/Headers/Headers#init See more}\n   */\n  headers?:\n    | RequestInit['headers']\n    | Record<\n        string,\n        string | number | boolean | (string | number | boolean)[] | null | undefined | unknown\n      >;\n  /**\n   * The request method.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/fetch#method See more}\n   */\n  method?: Uppercase<HttpMethod>;\n  /**\n   * A function for serializing request query parameters. By default, arrays\n   * will be exploded in form style, objects will be exploded in deepObject\n   * style, and reserved characters are percent-encoded.\n   *\n   * This method will have no effect if the native `paramsSerializer()` Axios\n   * API function is used.\n   *\n   * {@link https://swagger.io/docs/specification/serialization/#query View examples}\n   */\n  querySerializer?: QuerySerializer | QuerySerializerOptions;\n  /**\n   * A function validating request data. This is useful if you want to ensure\n   * the request conforms to the desired shape, so it can be safely sent to\n   * the server.\n   */\n  requestValidator?: (data: unknown) => Promise<unknown>;\n  /**\n   * A function transforming response data before it's returned. This is useful\n   * for post-processing data, e.g. converting ISO strings into Date objects.\n   */\n  responseTransformer?: (data: unknown) => Promise<unknown>;\n  /**\n   * A function validating response data. This is useful if you want to ensure\n   * the response conforms to the desired shape, so it can be safely passed to\n   * the transformers and returned to the user.\n   */\n  responseValidator?: (data: unknown) => Promise<unknown>;\n}\n\ntype IsExactlyNeverOrNeverUndefined<T> = [T] extends [never]\n  ? true\n  : [T] extends [never | undefined]\n    ? [undefined] extends [T]\n      ? false\n      : true\n    : false;\n\nexport type OmitNever<T extends Record<string, unknown>> = {\n  [K in keyof T as IsExactlyNeverOrNeverUndefined<T[K]> extends true ? never : K]: T[K];\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/solid-query/axios/core/utils.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/solid-query/axios/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport { callToTestOrderOfParams, callWithDefaultOptionalParameters, callWithDefaultParameters, callWithDescriptions, callWithDuplicateResponses, callWithNoContentResponse, callWithParameters, callWithResponse, callWithResponseAndNoContentResponse, callWithResponses, callWithResultFromHeader, callWithWeirdParameterNames, collectionFormat, complexTypes, deleteCallWithoutParametersAndResponse, dummyA, dummyB, duplicateName, duplicateName2, duplicateName3, duplicateName4, fooWow, getCallWithoutParametersAndResponse, headCallWithoutParametersAndResponse, nonAsciiæøåÆøÅöôêÊ字符串, type Options, optionsCallWithoutParametersAndResponse, patchApiVbyApiVersionNoTag, patchCallWithoutParametersAndResponse, postApiVbyApiVersionBody, postCallWithoutParametersAndResponse, putCallWithoutParametersAndResponse, serviceWithEmptyTag, testErrorCode, types } from './sdk.gen';\nexport type { ArrayWithArray, ArrayWithBooleans, ArrayWithNumbers, ArrayWithProperties, ArrayWithReferences, ArrayWithStrings, CallToTestOrderOfParamsData, CallWithDefaultOptionalParametersData, CallWithDefaultParametersData, CallWithDescriptionsData, CallWithDuplicateResponsesData, CallWithDuplicateResponsesError, CallWithDuplicateResponsesErrors, CallWithDuplicateResponsesResponse, CallWithDuplicateResponsesResponses, CallWithNoContentResponseData, CallWithNoContentResponseResponses, CallWithParametersData, CallWithResponseAndNoContentResponseData, CallWithResponseAndNoContentResponseResponse, CallWithResponseAndNoContentResponseResponses, CallWithResponseData, CallWithResponseResponse, CallWithResponseResponses, CallWithResponsesData, CallWithResponsesError, CallWithResponsesErrors, CallWithResponsesResponse, CallWithResponsesResponses, CallWithResultFromHeaderData, CallWithResultFromHeaderErrors, CallWithResultFromHeaderResponses, CallWithWeirdParameterNamesData, ClientOptions, CollectionFormatData, CommentWithBackticks, CommentWithBackticksAndQuotes, CommentWithBreaks, CommentWithExpressionPlaceholders, CommentWithQuotes, CommentWithReservedCharacters, CommentWithSlashes, ComplexTypesData, ComplexTypesErrors, ComplexTypesResponse, ComplexTypesResponses, Date, Default, DeleteCallWithoutParametersAndResponseData, DictionaryWithArray, DictionaryWithDictionary, DictionaryWithProperties, DictionaryWithReference, DictionaryWithString, DummyAData, DummyAResponses, DummyBData, DummyBResponses, DuplicateName2Data, DuplicateName3Data, DuplicateName4Data, DuplicateNameData, EnumFromDescription, EnumWithExtensions, EnumWithNumbers, EnumWithStrings, ExternalRefA, ExternalRefB, ExternalSharedModel, FailureFailure, FooWowData, FooWowResponses, GetCallWithoutParametersAndResponseData, HeadCallWithoutParametersAndResponseData, ModelThatExtends, ModelThatExtendsExtends, ModelWithArray, ModelWithBoolean, ModelWithCircularReference, ModelWithDictionary, ModelWithDuplicateImports, ModelWithDuplicateProperties, ModelWithEnum, ModelWithEnumFromDescription, ModelWithInteger, ModelWithNestedEnums, ModelWithNestedProperties, ModelWithNullableString, ModelWithOrderedProperties, ModelWithPattern, ModelWithPatternWritable, ModelWithProperties, ModelWithPropertiesWritable, ModelWithReference, ModelWithReferenceWritable, ModelWithString, ModelWithStringError, NonAsciiæøåÆøÅöôêÊ字符串Data, NonAsciiæøåÆøÅöôêÊ字符串Response, NonAsciiæøåÆøÅöôêÊ字符串Responses, NonAsciiStringæøåÆøÅöôêÊ字符串, OptionsCallWithoutParametersAndResponseData, ParameterActivityParams, PatchApiVbyApiVersionNoTagData, PatchApiVbyApiVersionNoTagResponses, PatchCallWithoutParametersAndResponseData, PostApiVbyApiVersionBodyData, PostApiVbyApiVersionBodyError, PostApiVbyApiVersionBodyErrors, PostApiVbyApiVersionBodyResponse, PostApiVbyApiVersionBodyResponses, PostCallWithoutParametersAndResponseData, PutCallWithoutParametersAndResponseData, ResponsePostActivityResponse, ServiceWithEmptyTagData, SimpleBoolean, SimpleFile, SimpleInteger, SimpleReference, SimpleString, SimpleStringWithPattern, TestErrorCodeData, TestErrorCodeErrors, TestErrorCodeResponses, TypesData, TypesResponse, TypesResponses } from './types.gen';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/solid-query/axios/sdk.gen.ts",
    "content": "// 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 { CallToTestOrderOfParamsData, CallWithDefaultOptionalParametersData, CallWithDefaultParametersData, CallWithDescriptionsData, CallWithDuplicateResponsesData, CallWithDuplicateResponsesErrors, CallWithDuplicateResponsesResponses, CallWithNoContentResponseData, CallWithNoContentResponseResponses, CallWithParametersData, CallWithResponseAndNoContentResponseData, CallWithResponseAndNoContentResponseResponses, CallWithResponseData, CallWithResponseResponses, CallWithResponsesData, CallWithResponsesErrors, CallWithResponsesResponses, CallWithResultFromHeaderData, CallWithResultFromHeaderErrors, CallWithResultFromHeaderResponses, CallWithWeirdParameterNamesData, CollectionFormatData, ComplexTypesData, ComplexTypesErrors, ComplexTypesResponses, DeleteCallWithoutParametersAndResponseData, DummyAData, DummyAResponses, DummyBData, DummyBResponses, DuplicateName2Data, DuplicateName3Data, DuplicateName4Data, DuplicateNameData, FooWowData, FooWowResponses, GetCallWithoutParametersAndResponseData, HeadCallWithoutParametersAndResponseData, NonAsciiæøåÆøÅöôêÊ字符串Data, NonAsciiæøåÆøÅöôêÊ字符串Responses, OptionsCallWithoutParametersAndResponseData, PatchApiVbyApiVersionNoTagData, PatchApiVbyApiVersionNoTagResponses, PatchCallWithoutParametersAndResponseData, PostApiVbyApiVersionBodyData, PostApiVbyApiVersionBodyErrors, PostApiVbyApiVersionBodyResponses, PostCallWithoutParametersAndResponseData, PutCallWithoutParametersAndResponseData, ServiceWithEmptyTagData, TestErrorCodeData, TestErrorCodeErrors, TestErrorCodeResponses, TypesData, TypesResponses } from './types.gen';\n\nexport type Options<TData extends TDataShape = TDataShape, ThrowOnError extends boolean = boolean> = Options2<TData, ThrowOnError> & {\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\nexport const serviceWithEmptyTag = <ThrowOnError extends boolean = false>(options?: Options<ServiceWithEmptyTagData, ThrowOnError>) => (options?.client ?? client).get<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/no+tag', ...options });\n\nexport const patchApiVbyApiVersionNoTag = <ThrowOnError extends boolean = false>(options?: Options<PatchApiVbyApiVersionNoTagData, ThrowOnError>) => (options?.client ?? client).patch<PatchApiVbyApiVersionNoTagResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/no+tag', ...options });\n\nexport const fooWow = <ThrowOnError extends boolean = false>(options?: Options<FooWowData, ThrowOnError>) => (options?.client ?? client).put<FooWowResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/no+tag', ...options });\n\nexport const deleteCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<DeleteCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).delete<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const getCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<GetCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).get<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const headCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<HeadCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).head<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const optionsCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<OptionsCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).options<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const patchCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<PatchCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).patch<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const postCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<PostCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).post<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const putCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<PutCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).put<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const callWithDescriptions = <ThrowOnError extends boolean = false>(options?: Options<CallWithDescriptionsData, ThrowOnError>) => (options?.client ?? client).post<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/descriptions/', ...options });\n\nexport const callWithParameters = <ThrowOnError extends boolean = false>(options: Options<CallWithParametersData, ThrowOnError>) => (options.client ?? client).post<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/parameters/{parameterPath}', ...options });\n\nexport const callWithWeirdParameterNames = <ThrowOnError extends boolean = false>(options: Options<CallWithWeirdParameterNamesData, ThrowOnError>) => (options.client ?? client).post<unknown, unknown, ThrowOnError>({\n    url: '/api/v{api-version}/parameters/{parameter.path.1}/{parameter-path-2}/{PARAMETER-PATH-3}',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options.headers\n    }\n});\n\nexport const callWithDefaultParameters = <ThrowOnError extends boolean = false>(options: Options<CallWithDefaultParametersData, ThrowOnError>) => (options.client ?? client).get<unknown, unknown, ThrowOnError>({\n    querySerializer: { parameters: { parameterModel: { object: { explode: false, style: 'form' } } } },\n    url: '/api/v{api-version}/defaults',\n    ...options\n});\n\nexport const callWithDefaultOptionalParameters = <ThrowOnError extends boolean = false>(options?: Options<CallWithDefaultOptionalParametersData, ThrowOnError>) => (options?.client ?? client).post<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/defaults', ...options });\n\nexport const callToTestOrderOfParams = <ThrowOnError extends boolean = false>(options: Options<CallToTestOrderOfParamsData, ThrowOnError>) => (options.client ?? client).put<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/defaults', ...options });\n\nexport const duplicateName = <ThrowOnError extends boolean = false>(options?: Options<DuplicateNameData, ThrowOnError>) => (options?.client ?? client).delete<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/duplicate', ...options });\n\nexport const duplicateName2 = <ThrowOnError extends boolean = false>(options?: Options<DuplicateName2Data, ThrowOnError>) => (options?.client ?? client).get<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/duplicate', ...options });\n\nexport const duplicateName3 = <ThrowOnError extends boolean = false>(options?: Options<DuplicateName3Data, ThrowOnError>) => (options?.client ?? client).post<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/duplicate', ...options });\n\nexport const duplicateName4 = <ThrowOnError extends boolean = false>(options?: Options<DuplicateName4Data, ThrowOnError>) => (options?.client ?? client).put<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/duplicate', ...options });\n\nexport const callWithNoContentResponse = <ThrowOnError extends boolean = false>(options?: Options<CallWithNoContentResponseData, ThrowOnError>) => (options?.client ?? client).get<CallWithNoContentResponseResponses, unknown, ThrowOnError>({\n    responseType: 'json',\n    url: '/api/v{api-version}/no-content',\n    ...options\n});\n\nexport const callWithResponseAndNoContentResponse = <ThrowOnError extends boolean = false>(options?: Options<CallWithResponseAndNoContentResponseData, ThrowOnError>) => (options?.client ?? client).get<CallWithResponseAndNoContentResponseResponses, unknown, ThrowOnError>({\n    responseType: 'json',\n    url: '/api/v{api-version}/multiple-tags/response-and-no-content',\n    ...options\n});\n\nexport const dummyA = <ThrowOnError extends boolean = false>(options?: Options<DummyAData, ThrowOnError>) => (options?.client ?? client).get<DummyAResponses, unknown, ThrowOnError>({\n    responseType: 'json',\n    url: '/api/v{api-version}/multiple-tags/a',\n    ...options\n});\n\nexport const dummyB = <ThrowOnError extends boolean = false>(options?: Options<DummyBData, ThrowOnError>) => (options?.client ?? client).get<DummyBResponses, unknown, ThrowOnError>({\n    responseType: 'json',\n    url: '/api/v{api-version}/multiple-tags/b',\n    ...options\n});\n\nexport const callWithResponse = <ThrowOnError extends boolean = false>(options?: Options<CallWithResponseData, ThrowOnError>) => (options?.client ?? client).get<CallWithResponseResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/response', ...options });\n\nexport const callWithDuplicateResponses = <ThrowOnError extends boolean = false>(options?: Options<CallWithDuplicateResponsesData, ThrowOnError>) => (options?.client ?? client).post<CallWithDuplicateResponsesResponses, CallWithDuplicateResponsesErrors, ThrowOnError>({\n    responseType: 'json',\n    url: '/api/v{api-version}/response',\n    ...options\n});\n\nexport const callWithResponses = <ThrowOnError extends boolean = false>(options?: Options<CallWithResponsesData, ThrowOnError>) => (options?.client ?? client).put<CallWithResponsesResponses, CallWithResponsesErrors, ThrowOnError>({\n    responseType: 'json',\n    url: '/api/v{api-version}/response',\n    ...options\n});\n\nexport const collectionFormat = <ThrowOnError extends boolean = false>(options: Options<CollectionFormatData, ThrowOnError>) => (options.client ?? client).get<unknown, unknown, ThrowOnError>({\n    querySerializer: { parameters: {\n            parameterArrayCSV: { array: { explode: false } },\n            parameterArraySSV: { array: { explode: false } },\n            parameterArrayTSV: { array: { explode: false } },\n            parameterArrayPipes: { array: { explode: false } }\n        } },\n    url: '/api/v{api-version}/collectionFormat',\n    ...options\n});\n\nexport const types = <ThrowOnError extends boolean = false>(options: Options<TypesData, ThrowOnError>) => (options.client ?? client).get<TypesResponses, unknown, ThrowOnError>({\n    querySerializer: { parameters: { parameterArray: { array: { explode: false } }, parameterDictionary: { object: { explode: false, style: 'form' } } } },\n    responseType: 'json',\n    url: '/api/v{api-version}/types',\n    ...options\n});\n\nexport const complexTypes = <ThrowOnError extends boolean = false>(options: Options<ComplexTypesData, ThrowOnError>) => (options.client ?? client).get<ComplexTypesResponses, ComplexTypesErrors, ThrowOnError>({\n    querySerializer: { parameters: { parameterObject: { object: { explode: false, style: 'form' } }, parameterReference: { object: { explode: false, style: 'form' } } } },\n    responseType: 'json',\n    url: '/api/v{api-version}/complex',\n    ...options\n});\n\nexport const callWithResultFromHeader = <ThrowOnError extends boolean = false>(options?: Options<CallWithResultFromHeaderData, ThrowOnError>) => (options?.client ?? client).post<CallWithResultFromHeaderResponses, CallWithResultFromHeaderErrors, ThrowOnError>({\n    responseType: 'json',\n    url: '/api/v{api-version}/header',\n    ...options\n});\n\nexport const testErrorCode = <ThrowOnError extends boolean = false>(options: Options<TestErrorCodeData, ThrowOnError>) => (options.client ?? client).post<TestErrorCodeResponses, TestErrorCodeErrors, ThrowOnError>({\n    responseType: 'json',\n    url: '/api/v{api-version}/error',\n    ...options\n});\n\nexport const nonAsciiæøåÆøÅöôêÊ字符串 = <ThrowOnError extends boolean = false>(options: Options<NonAsciiæøåÆøÅöôêÊ字符串Data, ThrowOnError>) => (options.client ?? client).post<NonAsciiæøåÆøÅöôêÊ字符串Responses, unknown, ThrowOnError>({\n    responseType: 'json',\n    url: '/api/v{api-version}/non-ascii-æøåÆØÅöôêÊ字符串',\n    ...options\n});\n\n/**\n * Body should not be unknown\n *\n * Body should not be unknown\n */\nexport const postApiVbyApiVersionBody = <ThrowOnError extends boolean = false>(options: Options<PostApiVbyApiVersionBodyData, ThrowOnError>) => (options.client ?? client).post<PostApiVbyApiVersionBodyResponses, PostApiVbyApiVersionBodyErrors, ThrowOnError>({\n    responseType: 'json',\n    url: '/api/v{api-version}/body',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options.headers\n    }\n});\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/solid-query/axios/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type ClientOptions = {\n    baseURL: 'http://localhost:3000/base' | (string & {});\n};\n\nexport type ExternalRefA = ExternalSharedModel;\n\nexport type ExternalRefB = ExternalSharedModel;\n\n/**\n * Testing multiline comments in string: First line\n * Second line\n *\n * Fourth line\n */\nexport type CommentWithBreaks = number;\n\n/**\n * Testing backticks in string: `backticks` and ```multiple backticks``` should work\n */\nexport type CommentWithBackticks = number;\n\n/**\n * Testing backticks and quotes in string: `backticks`, 'quotes', \"double quotes\" and ```multiple backticks``` should work\n */\nexport type CommentWithBackticksAndQuotes = number;\n\n/**\n * Testing slashes in string: \\backwards\\\\\\ and /forwards/// should work\n */\nexport type CommentWithSlashes = number;\n\n/**\n * Testing expression placeholders in string: ${expression} should work\n */\nexport type CommentWithExpressionPlaceholders = number;\n\n/**\n * Testing quotes in string: 'single quote''' and \"double quotes\"\"\" should work\n */\nexport type CommentWithQuotes = number;\n\n/**\n * Testing reserved characters in string: * inline * and ** inline ** should work\n */\nexport type CommentWithReservedCharacters = number;\n\n/**\n * This is a simple number\n */\nexport type SimpleInteger = number;\n\n/**\n * This is a simple boolean\n */\nexport type SimpleBoolean = boolean;\n\n/**\n * This is a simple string\n */\nexport type SimpleString = string;\n\n/**\n * A string with non-ascii (unicode) characters valid in typescript identifiers (æøåÆØÅöÔèÈ字符串)\n */\nexport type NonAsciiStringæøåÆøÅöôêÊ字符串 = string;\n\n/**\n * This is a simple file\n */\nexport type SimpleFile = Blob | File;\n\nexport type SimpleReference = ModelWithString;\n\n/**\n * This is a simple string\n */\nexport type SimpleStringWithPattern = string;\n\n/**\n * This is a simple enum with strings\n */\nexport type EnumWithStrings = 'Success' | 'Warning' | 'Error' | '\\'Single Quote\\'' | '\"Double Quotes\"' | 'Non-ascii: øæåôöØÆÅÔÖ字符串';\n\n/**\n * This is a simple enum with numbers\n */\nexport type EnumWithNumbers = 1 | 2 | 3 | 1.1 | 1.2 | 1.3 | 100 | 200 | 300 | -100 | -200 | -300 | -1.1 | -1.2 | -1.3;\n\n/**\n * Success=1,Warning=2,Error=3\n */\nexport type EnumFromDescription = number;\n\n/**\n * This is a simple enum with numbers\n */\nexport type EnumWithExtensions = 200 | 400 | 500;\n\n/**\n * This is a simple array with numbers\n */\nexport type ArrayWithNumbers = Array<number>;\n\n/**\n * This is a simple array with booleans\n */\nexport type ArrayWithBooleans = Array<boolean>;\n\n/**\n * This is a simple array with strings\n */\nexport type ArrayWithStrings = Array<string>;\n\n/**\n * This is a simple array with references\n */\nexport type ArrayWithReferences = Array<ModelWithString>;\n\n/**\n * This is a simple array containing an array\n */\nexport type ArrayWithArray = Array<Array<ModelWithString>>;\n\n/**\n * This is a simple array with properties\n */\nexport type ArrayWithProperties = Array<{\n    foo?: string;\n    bar?: string;\n}>;\n\n/**\n * This is a string dictionary\n */\nexport type DictionaryWithString = {\n    [key: string]: string;\n};\n\n/**\n * This is a string reference\n */\nexport type DictionaryWithReference = {\n    [key: string]: ModelWithString;\n};\n\n/**\n * This is a complex dictionary\n */\nexport type DictionaryWithArray = {\n    [key: string]: Array<ModelWithString>;\n};\n\n/**\n * This is a string dictionary\n */\nexport type DictionaryWithDictionary = {\n    [key: string]: {\n        [key: string]: string;\n    };\n};\n\n/**\n * This is a complex dictionary\n */\nexport type DictionaryWithProperties = {\n    [key: string]: {\n        foo?: string;\n        bar?: string;\n    };\n};\n\n/**\n * This is a type-only model that defines Date as a string\n */\nexport type Date = string;\n\n/**\n * This is a model with one number property\n */\nexport type ModelWithInteger = {\n    /**\n     * This is a simple number property\n     */\n    prop?: number;\n};\n\n/**\n * This is a model with one boolean property\n */\nexport type ModelWithBoolean = {\n    /**\n     * This is a simple boolean property\n     */\n    prop?: boolean;\n};\n\n/**\n * This is a model with one string property\n */\nexport type ModelWithString = {\n    /**\n     * This is a simple string property\n     */\n    prop?: string;\n};\n\n/**\n * This is a model with one string property\n */\nexport type ModelWithStringError = {\n    /**\n     * This is a simple string property\n     */\n    prop?: string;\n};\n\n/**\n * This is a model with one string property\n */\nexport type ModelWithNullableString = {\n    /**\n     * This is a simple string property\n     */\n    nullableProp?: string | null;\n    /**\n     * This is a simple string property\n     */\n    nullableRequiredProp: string | null;\n};\n\n/**\n * This is a model with one enum\n */\nexport type ModelWithEnum = {\n    /**\n     * This is a simple enum with strings\n     */\n    test?: 'Success' | 'Warning' | 'Error' | 'ØÆÅ字符串';\n    /**\n     * These are the HTTP error code enums\n     */\n    statusCode?: '100' | '200 FOO' | '300 FOO_BAR' | '400 foo-bar' | '500 foo.bar' | '600 foo&bar';\n    /**\n     * Simple boolean enum\n     */\n    bool?: true;\n};\n\n/**\n * This is a model with one enum\n */\nexport type ModelWithEnumFromDescription = {\n    /**\n     * Success=1,Warning=2,Error=3\n     */\n    test?: number;\n};\n\n/**\n * This is a model with nested enums\n */\nexport type ModelWithNestedEnums = {\n    dictionaryWithEnum?: {\n        [key: string]: 'Success' | 'Warning' | 'Error';\n    };\n    dictionaryWithEnumFromDescription?: {\n        [key: string]: number;\n    };\n    arrayWithEnum?: Array<'Success' | 'Warning' | 'Error'>;\n    arrayWithDescription?: Array<number>;\n};\n\n/**\n * This is a model with one property containing a reference\n */\nexport type ModelWithReference = {\n    prop?: ModelWithProperties;\n};\n\n/**\n * This is a model with one property containing an array\n */\nexport type ModelWithArray = {\n    prop?: Array<ModelWithString>;\n    propWithFile?: Array<Blob | File>;\n    propWithNumber?: Array<number>;\n};\n\n/**\n * This is a model with one property containing a dictionary\n */\nexport type ModelWithDictionary = {\n    prop?: {\n        [key: string]: string;\n    };\n};\n\n/**\n * This is a model with one property containing a circular reference\n */\nexport type ModelWithCircularReference = {\n    prop?: ModelWithCircularReference;\n};\n\n/**\n * This is a model with one nested property\n */\nexport type ModelWithProperties = {\n    required: string;\n    readonly requiredAndReadOnly: string;\n    string?: string;\n    number?: number;\n    boolean?: boolean;\n    reference?: ModelWithString;\n    'property with space'?: string;\n    default?: string;\n    try?: string;\n    readonly '@namespace.string'?: string;\n    readonly '@namespace.integer'?: number;\n};\n\n/**\n * This is a model with one nested property\n */\nexport type ModelWithNestedProperties = {\n    readonly first: {\n        readonly second: {\n            readonly third: string;\n        };\n    };\n};\n\n/**\n * This is a model with duplicated properties\n */\nexport type ModelWithDuplicateProperties = {\n    prop?: ModelWithString;\n};\n\n/**\n * This is a model with ordered properties\n */\nexport type ModelWithOrderedProperties = {\n    zebra?: string;\n    apple?: string;\n    hawaii?: string;\n};\n\n/**\n * This is a model with duplicated imports\n */\nexport type ModelWithDuplicateImports = {\n    propA?: ModelWithString;\n    propB?: ModelWithString;\n    propC?: ModelWithString;\n};\n\n/**\n * This is a model that extends another model\n */\nexport type ModelThatExtends = ModelWithString & {\n    propExtendsA?: string;\n    propExtendsB?: ModelWithString;\n};\n\n/**\n * This is a model that extends another model\n */\nexport type ModelThatExtendsExtends = ModelWithString & ModelThatExtends & {\n    propExtendsC?: string;\n    propExtendsD?: ModelWithString;\n};\n\nexport type Default = {\n    name?: string;\n};\n\n/**\n * This is a model that contains a some patterns\n */\nexport type ModelWithPattern = {\n    key: string;\n    name: string;\n    readonly enabled?: boolean;\n    readonly modified?: string;\n    id?: string;\n    text?: string;\n    patternWithSingleQuotes?: string;\n    patternWithNewline?: string;\n    patternWithBacktick?: string;\n    patternWithUnicode?: string;\n};\n\nexport type ParameterActivityParams = {\n    description?: string;\n    graduate_id?: number;\n    organization_id?: number;\n    parent_activity?: number;\n    post_id?: number;\n};\n\nexport type ResponsePostActivityResponse = {\n    description?: string;\n    graduate_id?: number;\n    organization_id?: number;\n    parent_activity_id?: number;\n    post_id?: number;\n};\n\nexport type FailureFailure = {\n    error?: string;\n    message?: string;\n    reference_code?: string;\n};\n\nexport type ExternalSharedModel = {\n    id: string;\n    name?: string;\n};\n\n/**\n * This is a model with one property containing a reference\n */\nexport type ModelWithReferenceWritable = {\n    prop?: ModelWithPropertiesWritable;\n};\n\n/**\n * This is a model with one nested property\n */\nexport type ModelWithPropertiesWritable = {\n    required: string;\n    string?: string;\n    number?: number;\n    boolean?: boolean;\n    reference?: ModelWithString;\n    'property with space'?: string;\n    default?: string;\n    try?: string;\n};\n\n/**\n * This is a model that contains a some patterns\n */\nexport type ModelWithPatternWritable = {\n    key: string;\n    name: string;\n    id?: string;\n    text?: string;\n    patternWithSingleQuotes?: string;\n    patternWithNewline?: string;\n    patternWithBacktick?: string;\n    patternWithUnicode?: string;\n};\n\nexport type ServiceWithEmptyTagData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no+tag';\n};\n\nexport type PatchApiVbyApiVersionNoTagData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no+tag';\n};\n\nexport type PatchApiVbyApiVersionNoTagResponses = {\n    /**\n     * OK\n     */\n    default: unknown;\n};\n\nexport type FooWowData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no+tag';\n};\n\nexport type FooWowResponses = {\n    /**\n     * OK\n     */\n    default: unknown;\n};\n\nexport type DeleteCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type GetCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type HeadCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type OptionsCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type PatchCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type PostCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type PutCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type CallWithDescriptionsData = {\n    body?: never;\n    path?: never;\n    query?: {\n        /**\n         * Testing multiline comments in string: First line\n         * Second line\n         *\n         * Fourth line\n         */\n        parameterWithBreaks?: string;\n        /**\n         * Testing backticks in string: `backticks` and ```multiple backticks``` should work\n         */\n        parameterWithBackticks?: string;\n        /**\n         * Testing slashes in string: \\backwards\\\\\\ and /forwards/// should work\n         */\n        parameterWithSlashes?: string;\n        /**\n         * Testing expression placeholders in string: ${expression} should work\n         */\n        parameterWithExpressionPlaceholders?: string;\n        /**\n         * Testing quotes in string: 'single quote''' and \"double quotes\"\"\" should work\n         */\n        parameterWithQuotes?: string;\n        /**\n         * Testing reserved characters in string: * inline * and ** inline ** should work\n         */\n        parameterWithReservedCharacters?: string;\n    };\n    url: '/api/v{api-version}/descriptions/';\n};\n\nexport type CallWithParametersData = {\n    body?: never;\n    headers: {\n        /**\n         * This is the parameter that goes into the header\n         */\n        parameterHeader: string;\n    };\n    path: {\n        /**\n         * This is the parameter that goes into the path\n         */\n        parameterPath: string;\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string;\n    };\n    query: {\n        /**\n         * This is the parameter that goes into the query params\n         */\n        parameterQuery: string;\n    };\n    url: '/api/v{api-version}/parameters/{parameterPath}';\n};\n\nexport type CallWithWeirdParameterNamesData = {\n    /**\n     * This is the parameter that is sent as request body\n     */\n    body: string;\n    headers: {\n        /**\n         * This is the parameter that goes into the request header\n         */\n        'parameter.header': string;\n    };\n    path: {\n        /**\n         * This is the parameter that goes into the path\n         */\n        'parameter.path.1'?: string;\n        /**\n         * This is the parameter that goes into the path\n         */\n        'parameter-path-2'?: string;\n        /**\n         * This is the parameter that goes into the path\n         */\n        'PARAMETER-PATH-3'?: string;\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string;\n    };\n    query: {\n        /**\n         * This is the parameter with a reserved keyword\n         */\n        default?: string;\n        /**\n         * This is the parameter that goes into the request query params\n         */\n        'parameter-query': string;\n    };\n    url: '/api/v{api-version}/parameters/{parameter.path.1}/{parameter-path-2}/{PARAMETER-PATH-3}';\n};\n\nexport type CallWithDefaultParametersData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * This is a simple string with default value\n         */\n        parameterString: string;\n        /**\n         * This is a simple number with default value\n         */\n        parameterNumber: number;\n        /**\n         * This is a simple boolean with default value\n         */\n        parameterBoolean: boolean;\n        /**\n         * This is a simple enum with default value\n         */\n        parameterEnum: 'Success' | 'Warning' | 'Error';\n        /**\n         * This is a model with one string property\n         */\n        parameterModel: {\n            /**\n             * This is a simple string property\n             */\n            prop?: string;\n        };\n    };\n    url: '/api/v{api-version}/defaults';\n};\n\nexport type CallWithDefaultOptionalParametersData = {\n    body?: never;\n    path?: never;\n    query?: {\n        /**\n         * This is a simple string that is optional with default value\n         */\n        parameterString?: string;\n        /**\n         * This is a simple number that is optional with default value\n         */\n        parameterNumber?: number;\n        /**\n         * This is a simple boolean that is optional with default value\n         */\n        parameterBoolean?: boolean;\n        /**\n         * This is a simple enum that is optional with default value\n         */\n        parameterEnum?: 'Success' | 'Warning' | 'Error';\n    };\n    url: '/api/v{api-version}/defaults';\n};\n\nexport type CallToTestOrderOfParamsData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * This is a optional string with default\n         */\n        parameterOptionalStringWithDefault?: string;\n        /**\n         * This is a optional string with empty default\n         */\n        parameterOptionalStringWithEmptyDefault?: string;\n        /**\n         * This is a optional string with no default\n         */\n        parameterOptionalStringWithNoDefault?: string;\n        /**\n         * This is a string with default\n         */\n        parameterStringWithDefault: string;\n        /**\n         * This is a string with empty default\n         */\n        parameterStringWithEmptyDefault: string;\n        /**\n         * This is a string with no default\n         */\n        parameterStringWithNoDefault: string;\n        /**\n         * This is a string that can be null with no default\n         */\n        parameterStringNullableWithNoDefault?: string | null;\n        /**\n         * This is a string that can be null with default\n         */\n        parameterStringNullableWithDefault?: string | null;\n    };\n    url: '/api/v{api-version}/defaults';\n};\n\nexport type DuplicateNameData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/duplicate';\n};\n\nexport type DuplicateName2Data = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/duplicate';\n};\n\nexport type DuplicateName3Data = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/duplicate';\n};\n\nexport type DuplicateName4Data = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/duplicate';\n};\n\nexport type CallWithNoContentResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no-content';\n};\n\nexport type CallWithNoContentResponseResponses = {\n    /**\n     * Success\n     */\n    204: unknown;\n};\n\nexport type CallWithResponseAndNoContentResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multiple-tags/response-and-no-content';\n};\n\nexport type CallWithResponseAndNoContentResponseResponses = {\n    /**\n     * Response is a simple number\n     */\n    200: number;\n    /**\n     * Success\n     */\n    204: unknown;\n};\n\nexport type CallWithResponseAndNoContentResponseResponse = CallWithResponseAndNoContentResponseResponses[keyof CallWithResponseAndNoContentResponseResponses];\n\nexport type DummyAData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multiple-tags/a';\n};\n\nexport type DummyAResponses = {\n    /**\n     * Success\n     */\n    204: unknown;\n};\n\nexport type DummyBData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multiple-tags/b';\n};\n\nexport type DummyBResponses = {\n    /**\n     * Success\n     */\n    204: unknown;\n};\n\nexport type CallWithResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/response';\n};\n\nexport type CallWithResponseResponses = {\n    /**\n     * Message for default response\n     */\n    default: ModelWithString;\n};\n\nexport type CallWithResponseResponse = CallWithResponseResponses[keyof CallWithResponseResponses];\n\nexport type CallWithDuplicateResponsesData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/response';\n};\n\nexport type CallWithDuplicateResponsesErrors = {\n    /**\n     * Message for 500 error\n     */\n    500: ModelWithStringError;\n    /**\n     * Message for 501 error\n     */\n    501: ModelWithStringError;\n    /**\n     * Message for 502 error\n     */\n    502: ModelWithStringError;\n    /**\n     * Message for default response\n     */\n    default: ModelWithString;\n};\n\nexport type CallWithDuplicateResponsesError = CallWithDuplicateResponsesErrors[keyof CallWithDuplicateResponsesErrors];\n\nexport type CallWithDuplicateResponsesResponses = {\n    /**\n     * Message for 201 response\n     */\n    201: ModelWithString;\n    /**\n     * Message for 202 response\n     */\n    202: ModelWithString;\n};\n\nexport type CallWithDuplicateResponsesResponse = CallWithDuplicateResponsesResponses[keyof CallWithDuplicateResponsesResponses];\n\nexport type CallWithResponsesData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/response';\n};\n\nexport type CallWithResponsesErrors = {\n    /**\n     * Message for 500 error\n     */\n    500: ModelWithStringError;\n    /**\n     * Message for 501 error\n     */\n    501: ModelWithStringError;\n    /**\n     * Message for 502 error\n     */\n    502: ModelWithStringError;\n    /**\n     * Message for default response\n     */\n    default: ModelWithString;\n};\n\nexport type CallWithResponsesError = CallWithResponsesErrors[keyof CallWithResponsesErrors];\n\nexport type CallWithResponsesResponses = {\n    /**\n     * Message for 200 response\n     */\n    200: {\n        readonly '@namespace.string'?: string;\n        readonly '@namespace.integer'?: number;\n        readonly value?: Array<ModelWithString>;\n    };\n    /**\n     * Message for 201 response\n     */\n    201: ModelThatExtends;\n    /**\n     * Message for 202 response\n     */\n    202: ModelThatExtendsExtends;\n};\n\nexport type CallWithResponsesResponse = CallWithResponsesResponses[keyof CallWithResponsesResponses];\n\nexport type CollectionFormatData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * This is an array parameter that is sent as csv format (comma-separated values)\n         */\n        parameterArrayCSV: Array<string>;\n        /**\n         * This is an array parameter that is sent as ssv format (space-separated values)\n         */\n        parameterArraySSV: Array<string>;\n        /**\n         * This is an array parameter that is sent as tsv format (tab-separated values)\n         */\n        parameterArrayTSV: Array<string>;\n        /**\n         * This is an array parameter that is sent as pipes format (pipe-separated values)\n         */\n        parameterArrayPipes: Array<string>;\n        /**\n         * This is an array parameter that is sent as multi format (multiple parameter instances)\n         */\n        parameterArrayMulti: Array<string>;\n    };\n    url: '/api/v{api-version}/collectionFormat';\n};\n\nexport type TypesData = {\n    body?: never;\n    path?: {\n        /**\n         * This is a number parameter\n         */\n        id?: number;\n    };\n    query: {\n        /**\n         * This is a number parameter\n         */\n        parameterNumber: number;\n        /**\n         * This is a string parameter\n         */\n        parameterString: string;\n        /**\n         * This is a boolean parameter\n         */\n        parameterBoolean: boolean;\n        /**\n         * This is an array parameter\n         */\n        parameterArray: Array<string>;\n        /**\n         * This is a dictionary parameter\n         */\n        parameterDictionary: {\n            [key: string]: unknown;\n        };\n        /**\n         * This is an enum parameter\n         */\n        parameterEnum: 'Success' | 'Warning' | 'Error';\n    };\n    url: '/api/v{api-version}/types';\n};\n\nexport type TypesResponses = {\n    /**\n     * Response is a simple number\n     */\n    200: number;\n    /**\n     * Response is a simple string\n     */\n    201: string;\n    /**\n     * Response is a simple boolean\n     */\n    202: boolean;\n    /**\n     * Response is a simple object\n     */\n    203: {\n        [key: string]: unknown;\n    };\n};\n\nexport type TypesResponse = TypesResponses[keyof TypesResponses];\n\nexport type ComplexTypesData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * Parameter containing object\n         */\n        parameterObject: {\n            first?: {\n                second?: {\n                    third?: string;\n                };\n            };\n        };\n        /**\n         * This is a model with one string property\n         */\n        parameterReference: {\n            /**\n             * This is a simple string property\n             */\n            prop?: string;\n        };\n    };\n    url: '/api/v{api-version}/complex';\n};\n\nexport type ComplexTypesErrors = {\n    /**\n     * 400 server error\n     */\n    400: unknown;\n    /**\n     * 500 server error\n     */\n    500: unknown;\n};\n\nexport type ComplexTypesResponses = {\n    /**\n     * Successful response\n     */\n    200: Array<ModelWithString>;\n};\n\nexport type ComplexTypesResponse = ComplexTypesResponses[keyof ComplexTypesResponses];\n\nexport type CallWithResultFromHeaderData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/header';\n};\n\nexport type CallWithResultFromHeaderErrors = {\n    /**\n     * 400 server error\n     */\n    400: unknown;\n    /**\n     * 500 server error\n     */\n    500: unknown;\n};\n\nexport type CallWithResultFromHeaderResponses = {\n    /**\n     * Successful response\n     */\n    200: unknown;\n};\n\nexport type TestErrorCodeData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * Status code to return\n         */\n        status: string;\n    };\n    url: '/api/v{api-version}/error';\n};\n\nexport type TestErrorCodeErrors = {\n    /**\n     * Custom message: Internal Server Error\n     */\n    500: unknown;\n    /**\n     * Custom message: Not Implemented\n     */\n    501: unknown;\n    /**\n     * Custom message: Bad Gateway\n     */\n    502: unknown;\n    /**\n     * Custom message: Service Unavailable\n     */\n    503: unknown;\n};\n\nexport type TestErrorCodeResponses = {\n    /**\n     * Custom message: Successful response\n     */\n    200: unknown;\n};\n\nexport type NonAsciiæøåÆøÅöôêÊ字符串Data = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * Dummy input param\n         */\n        nonAsciiParamæøåÆØÅöôêÊ: number;\n    };\n    url: '/api/v{api-version}/non-ascii-æøåÆØÅöôêÊ字符串';\n};\n\nexport type NonAsciiæøåÆøÅöôêÊ字符串Responses = {\n    /**\n     * Successful response\n     */\n    200: NonAsciiStringæøåÆøÅöôêÊ字符串;\n};\n\nexport type NonAsciiæøåÆøÅöôêÊ字符串Response = NonAsciiæøåÆøÅöôêÊ字符串Responses[keyof NonAsciiæøåÆøÅöôêÊ字符串Responses];\n\nexport type PostApiVbyApiVersionBodyData = {\n    /**\n     * Body should not be unknown\n     */\n    body: ParameterActivityParams;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/body';\n};\n\nexport type PostApiVbyApiVersionBodyErrors = {\n    /**\n     * Bad Request\n     */\n    400: FailureFailure;\n    /**\n     * Internal Server Error\n     */\n    500: FailureFailure;\n};\n\nexport type PostApiVbyApiVersionBodyError = PostApiVbyApiVersionBodyErrors[keyof PostApiVbyApiVersionBodyErrors];\n\nexport type PostApiVbyApiVersionBodyResponses = {\n    /**\n     * OK\n     */\n    200: ResponsePostActivityResponse;\n};\n\nexport type PostApiVbyApiVersionBodyResponse = PostApiVbyApiVersionBodyResponses[keyof PostApiVbyApiVersionBodyResponses];\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/solid-query/fetch/@tanstack/solid-query.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport { type DefaultError, type MutationOptions, queryOptions } from '@tanstack/solid-query';\n\nimport { client } from '../client.gen';\nimport { callToTestOrderOfParams, callWithDefaultOptionalParameters, callWithDefaultParameters, callWithDescriptions, callWithDuplicateResponses, callWithNoContentResponse, callWithParameters, callWithResponse, callWithResponseAndNoContentResponse, callWithResponses, callWithResultFromHeader, callWithWeirdParameterNames, collectionFormat, complexTypes, deleteCallWithoutParametersAndResponse, dummyA, dummyB, duplicateName, duplicateName2, duplicateName3, duplicateName4, fooWow, getCallWithoutParametersAndResponse, nonAsciiæøåÆøÅöôêÊ字符串, type Options, patchApiVbyApiVersionNoTag, patchCallWithoutParametersAndResponse, postApiVbyApiVersionBody, postCallWithoutParametersAndResponse, putCallWithoutParametersAndResponse, serviceWithEmptyTag, testErrorCode, types } from '../sdk.gen';\nimport type { CallToTestOrderOfParamsData, CallWithDefaultOptionalParametersData, CallWithDefaultParametersData, CallWithDescriptionsData, CallWithDuplicateResponsesData, CallWithDuplicateResponsesError, CallWithDuplicateResponsesResponse, CallWithNoContentResponseData, CallWithParametersData, CallWithResponseAndNoContentResponseData, CallWithResponseAndNoContentResponseResponse, CallWithResponseData, CallWithResponseResponse, CallWithResponsesData, CallWithResponsesError, CallWithResponsesResponse, CallWithResultFromHeaderData, CallWithWeirdParameterNamesData, CollectionFormatData, ComplexTypesData, ComplexTypesResponse, DeleteCallWithoutParametersAndResponseData, DummyAData, DummyBData, DuplicateName2Data, DuplicateName3Data, DuplicateName4Data, DuplicateNameData, FooWowData, GetCallWithoutParametersAndResponseData, NonAsciiæøåÆøÅöôêÊ字符串Data, NonAsciiæøåÆøÅöôêÊ字符串Response, PatchApiVbyApiVersionNoTagData, PatchCallWithoutParametersAndResponseData, PostApiVbyApiVersionBodyData, PostApiVbyApiVersionBodyError, PostApiVbyApiVersionBodyResponse, PostCallWithoutParametersAndResponseData, PutCallWithoutParametersAndResponseData, ServiceWithEmptyTagData, TestErrorCodeData, TypesData, TypesResponse } from '../types.gen';\n\nexport type QueryKey<TOptions extends Options> = [\n    Pick<TOptions, 'baseUrl' | 'body' | 'headers' | 'path' | 'query'> & {\n        _id: string;\n        _infinite?: boolean;\n        tags?: ReadonlyArray<string>;\n    }\n];\n\nconst createQueryKey = <TOptions extends Options>(id: string, options?: TOptions, infinite?: boolean, tags?: ReadonlyArray<string>): [\n    QueryKey<TOptions>[0]\n] => {\n    const params: QueryKey<TOptions>[0] = { _id: id, baseUrl: options?.baseUrl || (options?.client ?? client).getConfig().baseUrl } as QueryKey<TOptions>[0];\n    if (infinite) {\n        params._infinite = infinite;\n    }\n    if (tags) {\n        params.tags = tags;\n    }\n    if (options?.body) {\n        params.body = options.body;\n    }\n    if (options?.headers) {\n        params.headers = options.headers;\n    }\n    if (options?.path) {\n        params.path = options.path;\n    }\n    if (options?.query) {\n        params.query = options.query;\n    }\n    return [params];\n};\n\nexport const serviceWithEmptyTagQueryKey = (options?: Options<ServiceWithEmptyTagData>) => createQueryKey('serviceWithEmptyTag', options);\n\nexport const serviceWithEmptyTagOptions = (options?: Options<ServiceWithEmptyTagData>) => queryOptions<unknown, DefaultError, unknown, ReturnType<typeof serviceWithEmptyTagQueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await serviceWithEmptyTag({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: serviceWithEmptyTagQueryKey(options)\n});\n\nexport const patchApiVbyApiVersionNoTagMutation = (options?: Partial<Options<PatchApiVbyApiVersionNoTagData>>): MutationOptions<unknown, DefaultError, Options<PatchApiVbyApiVersionNoTagData>> => {\n    const mutationOptions: MutationOptions<unknown, DefaultError, Options<PatchApiVbyApiVersionNoTagData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await patchApiVbyApiVersionNoTag({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const fooWowMutation = (options?: Partial<Options<FooWowData>>): MutationOptions<unknown, DefaultError, Options<FooWowData>> => {\n    const mutationOptions: MutationOptions<unknown, DefaultError, Options<FooWowData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await fooWow({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const deleteCallWithoutParametersAndResponseMutation = (options?: Partial<Options<DeleteCallWithoutParametersAndResponseData>>): MutationOptions<unknown, DefaultError, Options<DeleteCallWithoutParametersAndResponseData>> => {\n    const mutationOptions: MutationOptions<unknown, DefaultError, Options<DeleteCallWithoutParametersAndResponseData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await deleteCallWithoutParametersAndResponse({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const getCallWithoutParametersAndResponseQueryKey = (options?: Options<GetCallWithoutParametersAndResponseData>) => createQueryKey('getCallWithoutParametersAndResponse', options);\n\nexport const getCallWithoutParametersAndResponseOptions = (options?: Options<GetCallWithoutParametersAndResponseData>) => queryOptions<unknown, DefaultError, unknown, ReturnType<typeof getCallWithoutParametersAndResponseQueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await getCallWithoutParametersAndResponse({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: getCallWithoutParametersAndResponseQueryKey(options)\n});\n\nexport const patchCallWithoutParametersAndResponseMutation = (options?: Partial<Options<PatchCallWithoutParametersAndResponseData>>): MutationOptions<unknown, DefaultError, Options<PatchCallWithoutParametersAndResponseData>> => {\n    const mutationOptions: MutationOptions<unknown, DefaultError, Options<PatchCallWithoutParametersAndResponseData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await patchCallWithoutParametersAndResponse({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const postCallWithoutParametersAndResponseMutation = (options?: Partial<Options<PostCallWithoutParametersAndResponseData>>): MutationOptions<unknown, DefaultError, Options<PostCallWithoutParametersAndResponseData>> => {\n    const mutationOptions: MutationOptions<unknown, DefaultError, Options<PostCallWithoutParametersAndResponseData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await postCallWithoutParametersAndResponse({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const putCallWithoutParametersAndResponseMutation = (options?: Partial<Options<PutCallWithoutParametersAndResponseData>>): MutationOptions<unknown, DefaultError, Options<PutCallWithoutParametersAndResponseData>> => {\n    const mutationOptions: MutationOptions<unknown, DefaultError, Options<PutCallWithoutParametersAndResponseData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await putCallWithoutParametersAndResponse({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const callWithDescriptionsMutation = (options?: Partial<Options<CallWithDescriptionsData>>): MutationOptions<unknown, DefaultError, Options<CallWithDescriptionsData>> => {\n    const mutationOptions: MutationOptions<unknown, DefaultError, Options<CallWithDescriptionsData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await callWithDescriptions({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const callWithParametersMutation = (options?: Partial<Options<CallWithParametersData>>): MutationOptions<unknown, DefaultError, Options<CallWithParametersData>> => {\n    const mutationOptions: MutationOptions<unknown, DefaultError, Options<CallWithParametersData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await callWithParameters({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const callWithWeirdParameterNamesMutation = (options?: Partial<Options<CallWithWeirdParameterNamesData>>): MutationOptions<unknown, DefaultError, Options<CallWithWeirdParameterNamesData>> => {\n    const mutationOptions: MutationOptions<unknown, DefaultError, Options<CallWithWeirdParameterNamesData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await callWithWeirdParameterNames({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const callWithDefaultParametersQueryKey = (options: Options<CallWithDefaultParametersData>) => createQueryKey('callWithDefaultParameters', options);\n\nexport const callWithDefaultParametersOptions = (options: Options<CallWithDefaultParametersData>) => queryOptions<unknown, DefaultError, unknown, ReturnType<typeof callWithDefaultParametersQueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await callWithDefaultParameters({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: callWithDefaultParametersQueryKey(options)\n});\n\nexport const callWithDefaultOptionalParametersMutation = (options?: Partial<Options<CallWithDefaultOptionalParametersData>>): MutationOptions<unknown, DefaultError, Options<CallWithDefaultOptionalParametersData>> => {\n    const mutationOptions: MutationOptions<unknown, DefaultError, Options<CallWithDefaultOptionalParametersData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await callWithDefaultOptionalParameters({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const callToTestOrderOfParamsMutation = (options?: Partial<Options<CallToTestOrderOfParamsData>>): MutationOptions<unknown, DefaultError, Options<CallToTestOrderOfParamsData>> => {\n    const mutationOptions: MutationOptions<unknown, DefaultError, Options<CallToTestOrderOfParamsData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await callToTestOrderOfParams({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const duplicateNameMutation = (options?: Partial<Options<DuplicateNameData>>): MutationOptions<unknown, DefaultError, Options<DuplicateNameData>> => {\n    const mutationOptions: MutationOptions<unknown, DefaultError, Options<DuplicateNameData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await duplicateName({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const duplicateName2QueryKey = (options?: Options<DuplicateName2Data>) => createQueryKey('duplicateName2', options);\n\nexport const duplicateName2Options = (options?: Options<DuplicateName2Data>) => queryOptions<unknown, DefaultError, unknown, ReturnType<typeof duplicateName2QueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await duplicateName2({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: duplicateName2QueryKey(options)\n});\n\nexport const duplicateName3Mutation = (options?: Partial<Options<DuplicateName3Data>>): MutationOptions<unknown, DefaultError, Options<DuplicateName3Data>> => {\n    const mutationOptions: MutationOptions<unknown, DefaultError, Options<DuplicateName3Data>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await duplicateName3({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const duplicateName4Mutation = (options?: Partial<Options<DuplicateName4Data>>): MutationOptions<unknown, DefaultError, Options<DuplicateName4Data>> => {\n    const mutationOptions: MutationOptions<unknown, DefaultError, Options<DuplicateName4Data>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await duplicateName4({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const callWithNoContentResponseQueryKey = (options?: Options<CallWithNoContentResponseData>) => createQueryKey('callWithNoContentResponse', options);\n\nexport const callWithNoContentResponseOptions = (options?: Options<CallWithNoContentResponseData>) => queryOptions<unknown, DefaultError, unknown, ReturnType<typeof callWithNoContentResponseQueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await callWithNoContentResponse({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: callWithNoContentResponseQueryKey(options)\n});\n\nexport const callWithResponseAndNoContentResponseQueryKey = (options?: Options<CallWithResponseAndNoContentResponseData>) => createQueryKey('callWithResponseAndNoContentResponse', options);\n\nexport const callWithResponseAndNoContentResponseOptions = (options?: Options<CallWithResponseAndNoContentResponseData>) => queryOptions<CallWithResponseAndNoContentResponseResponse, DefaultError, CallWithResponseAndNoContentResponseResponse, ReturnType<typeof callWithResponseAndNoContentResponseQueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await callWithResponseAndNoContentResponse({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: callWithResponseAndNoContentResponseQueryKey(options)\n});\n\nexport const dummyAQueryKey = (options?: Options<DummyAData>) => createQueryKey('dummyA', options);\n\nexport const dummyAOptions = (options?: Options<DummyAData>) => queryOptions<unknown, DefaultError, unknown, ReturnType<typeof dummyAQueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await dummyA({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: dummyAQueryKey(options)\n});\n\nexport const dummyBQueryKey = (options?: Options<DummyBData>) => createQueryKey('dummyB', options);\n\nexport const dummyBOptions = (options?: Options<DummyBData>) => queryOptions<unknown, DefaultError, unknown, ReturnType<typeof dummyBQueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await dummyB({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: dummyBQueryKey(options)\n});\n\nexport const callWithResponseQueryKey = (options?: Options<CallWithResponseData>) => createQueryKey('callWithResponse', options);\n\nexport const callWithResponseOptions = (options?: Options<CallWithResponseData>) => queryOptions<CallWithResponseResponse, DefaultError, CallWithResponseResponse, ReturnType<typeof callWithResponseQueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await callWithResponse({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: callWithResponseQueryKey(options)\n});\n\nexport const callWithDuplicateResponsesMutation = (options?: Partial<Options<CallWithDuplicateResponsesData>>): MutationOptions<CallWithDuplicateResponsesResponse, CallWithDuplicateResponsesError, Options<CallWithDuplicateResponsesData>> => {\n    const mutationOptions: MutationOptions<CallWithDuplicateResponsesResponse, CallWithDuplicateResponsesError, Options<CallWithDuplicateResponsesData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await callWithDuplicateResponses({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const callWithResponsesMutation = (options?: Partial<Options<CallWithResponsesData>>): MutationOptions<CallWithResponsesResponse, CallWithResponsesError, Options<CallWithResponsesData>> => {\n    const mutationOptions: MutationOptions<CallWithResponsesResponse, CallWithResponsesError, Options<CallWithResponsesData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await callWithResponses({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const collectionFormatQueryKey = (options: Options<CollectionFormatData>) => createQueryKey('collectionFormat', options);\n\nexport const collectionFormatOptions = (options: Options<CollectionFormatData>) => queryOptions<unknown, DefaultError, unknown, ReturnType<typeof collectionFormatQueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await collectionFormat({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: collectionFormatQueryKey(options)\n});\n\nexport const typesQueryKey = (options: Options<TypesData>) => createQueryKey('types', options);\n\nexport const typesOptions = (options: Options<TypesData>) => queryOptions<TypesResponse, DefaultError, TypesResponse, ReturnType<typeof typesQueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await types({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: typesQueryKey(options)\n});\n\nexport const complexTypesQueryKey = (options: Options<ComplexTypesData>) => createQueryKey('complexTypes', options);\n\nexport const complexTypesOptions = (options: Options<ComplexTypesData>) => queryOptions<ComplexTypesResponse, DefaultError, ComplexTypesResponse, ReturnType<typeof complexTypesQueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await complexTypes({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: complexTypesQueryKey(options)\n});\n\nexport const callWithResultFromHeaderMutation = (options?: Partial<Options<CallWithResultFromHeaderData>>): MutationOptions<unknown, DefaultError, Options<CallWithResultFromHeaderData>> => {\n    const mutationOptions: MutationOptions<unknown, DefaultError, Options<CallWithResultFromHeaderData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await callWithResultFromHeader({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const testErrorCodeMutation = (options?: Partial<Options<TestErrorCodeData>>): MutationOptions<unknown, DefaultError, Options<TestErrorCodeData>> => {\n    const mutationOptions: MutationOptions<unknown, DefaultError, Options<TestErrorCodeData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await testErrorCode({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const nonAsciiæøåÆøÅöôêÊ字符串Mutation = (options?: Partial<Options<NonAsciiæøåÆøÅöôêÊ字符串Data>>): MutationOptions<NonAsciiæøåÆøÅöôêÊ字符串Response, DefaultError, Options<NonAsciiæøåÆøÅöôêÊ字符串Data>> => {\n    const mutationOptions: MutationOptions<NonAsciiæøåÆøÅöôêÊ字符串Response, DefaultError, Options<NonAsciiæøåÆøÅöôêÊ字符串Data>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await nonAsciiæøåÆøÅöôêÊ字符串({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\n/**\n * Body should not be unknown\n *\n * Body should not be unknown\n */\nexport const postApiVbyApiVersionBodyMutation = (options?: Partial<Options<PostApiVbyApiVersionBodyData>>): MutationOptions<PostApiVbyApiVersionBodyResponse, PostApiVbyApiVersionBodyError, Options<PostApiVbyApiVersionBodyData>> => {\n    const mutationOptions: MutationOptions<PostApiVbyApiVersionBodyResponse, PostApiVbyApiVersionBodyError, Options<PostApiVbyApiVersionBodyData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await postApiVbyApiVersionBody({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/solid-query/fetch/client/client.gen.ts",
    "content": "// 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 (options: RequestOptions) => {\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 url = buildUrl(opts);\n\n    return { opts, url };\n  };\n\n  const request: Client['request'] = async (options) => {\n    // @ts-expect-error\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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/solid-query/fetch/client/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type { Auth } from '../core/auth.gen';\nexport type { QuerySerializerOptions } from '../core/bodySerializer.gen';\nexport {\n  formDataBodySerializer,\n  jsonBodySerializer,\n  urlSearchParamsBodySerializer,\n} from '../core/bodySerializer.gen';\nexport { buildClientParams } from '../core/params.gen';\nexport { serializeQueryKeyValue } from '../core/queryKeySerializer.gen';\nexport { createClient } from './client.gen';\nexport type {\n  Client,\n  ClientOptions,\n  Config,\n  CreateClientConfig,\n  Options,\n  RequestOptions,\n  RequestResult,\n  ResolvedRequestOptions,\n  ResponseStyle,\n  TDataShape,\n} from './types.gen';\nexport { createConfig, mergeHeaders } from './utils.gen';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/solid-query/fetch/client/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { Auth } from '../core/auth.gen';\nimport type {\n  ServerSentEventsOptions,\n  ServerSentEventsResult,\n} from '../core/serverSentEvents.gen';\nimport type { Client as CoreClient, Config as CoreConfig } from '../core/types.gen';\nimport type { Middleware } from './utils.gen';\n\nexport type ResponseStyle = 'data' | 'fields';\n\nexport interface Config<T extends ClientOptions = ClientOptions>\n  extends Omit<RequestInit, 'body' | 'headers' | 'method'>, CoreConfig {\n  /**\n   * Base URL for all requests made by this client.\n   */\n  baseUrl?: T['baseUrl'];\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   * Please don't use the Fetch client for Next.js applications. The `next`\n   * options won't have any effect.\n   *\n   * Install {@link https://www.npmjs.com/package/@hey-api/client-next `@hey-api/client-next`} instead.\n   */\n  next?: never;\n  /**\n   * Return the response data parsed in a specified format. By default, `auto`\n   * will infer the appropriate method from the `Content-Type` response header.\n   * You can override this behavior with any of the {@link Body} methods.\n   * Select `stream` if you don't want to parse response data at all.\n   *\n   * @default 'auto'\n   */\n  parseAs?: 'arrayBuffer' | 'auto' | 'blob' | 'formData' | 'json' | 'stream' | 'text';\n  /**\n   * Should we return only data or multiple fields (data, error, response, etc.)?\n   *\n   * @default 'fields'\n   */\n  responseStyle?: ResponseStyle;\n  /**\n   * Throw an error instead of returning it in the response?\n   *\n   * @default false\n   */\n  throwOnError?: T['throwOnError'];\n}\n\nexport interface RequestOptions<\n  TData = unknown,\n  TResponseStyle extends ResponseStyle = 'fields',\n  ThrowOnError extends boolean = boolean,\n  Url extends string = string,\n>\n  extends\n    Config<{\n      responseStyle: TResponseStyle;\n      throwOnError: ThrowOnError;\n    }>,\n    Pick<\n      ServerSentEventsOptions<TData>,\n      | 'onRequest'\n      | 'onSseError'\n      | 'onSseEvent'\n      | 'sseDefaultRetryDelay'\n      | 'sseMaxRetryAttempts'\n      | 'sseMaxRetryDelay'\n    > {\n  /**\n   * Any body that you want to add to your request.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/fetch#body}\n   */\n  body?: unknown;\n  path?: Record<string, unknown>;\n  query?: Record<string, unknown>;\n  /**\n   * Security mechanism(s) to use for the request.\n   */\n  security?: ReadonlyArray<Auth>;\n  url: Url;\n}\n\nexport interface ResolvedRequestOptions<\n  TResponseStyle extends ResponseStyle = 'fields',\n  ThrowOnError extends boolean = boolean,\n  Url extends string = string,\n> extends RequestOptions<unknown, TResponseStyle, ThrowOnError, Url> {\n  serializedBody?: string;\n}\n\nexport type RequestResult<\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = boolean,\n  TResponseStyle extends ResponseStyle = 'fields',\n> = ThrowOnError extends true\n  ? Promise<\n      TResponseStyle extends 'data'\n        ? TData extends Record<string, unknown>\n          ? TData[keyof TData]\n          : TData\n        : {\n            data: TData extends Record<string, unknown> ? TData[keyof TData] : TData;\n            request: Request;\n            response: Response;\n          }\n    >\n  : Promise<\n      TResponseStyle extends 'data'\n        ? (TData extends Record<string, unknown> ? TData[keyof TData] : TData) | undefined\n        : (\n            | {\n                data: TData extends Record<string, unknown> ? TData[keyof TData] : TData;\n                error: undefined;\n              }\n            | {\n                data: undefined;\n                error: TError extends Record<string, unknown> ? TError[keyof TError] : TError;\n              }\n          ) & {\n            request: Request;\n            response: Response;\n          }\n    >;\n\nexport interface ClientOptions {\n  baseUrl?: string;\n  responseStyle?: ResponseStyle;\n  throwOnError?: boolean;\n}\n\ntype MethodFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'>,\n) => RequestResult<TData, TError, ThrowOnError, TResponseStyle>;\n\ntype SseFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'>,\n) => Promise<ServerSentEventsResult<TData, TError>>;\n\ntype RequestFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'> &\n    Pick<Required<RequestOptions<TData, TResponseStyle, ThrowOnError>>, 'method'>,\n) => RequestResult<TData, TError, ThrowOnError, TResponseStyle>;\n\ntype BuildUrlFn = <\n  TData extends {\n    body?: unknown;\n    path?: Record<string, unknown>;\n    query?: Record<string, unknown>;\n    url: string;\n  },\n>(\n  options: TData & Options<TData>,\n) => string;\n\nexport type Client = CoreClient<RequestFn, Config, MethodFn, BuildUrlFn, SseFn> & {\n  interceptors: Middleware<Request, Response, unknown, ResolvedRequestOptions>;\n};\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 = ClientOptions> = (\n  override?: Config<ClientOptions & T>,\n) => Config<Required<ClientOptions> & T>;\n\nexport interface TDataShape {\n  body?: unknown;\n  headers?: unknown;\n  path?: unknown;\n  query?: unknown;\n  url: string;\n}\n\ntype OmitKeys<T, K> = Pick<T, Exclude<keyof T, K>>;\n\nexport type Options<\n  TData extends TDataShape = TDataShape,\n  ThrowOnError extends boolean = boolean,\n  TResponse = unknown,\n  TResponseStyle extends ResponseStyle = 'fields',\n> = OmitKeys<\n  RequestOptions<TResponse, TResponseStyle, ThrowOnError>,\n  'body' | 'path' | 'query' | 'url'\n> &\n  ([TData] extends [never] ? unknown : Omit<TData, 'url'>);\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/solid-query/fetch/client/utils.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/solid-query/fetch/client.gen.ts",
    "content": "// 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: 'http://localhost:3000/base' }));\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/solid-query/fetch/core/auth.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/solid-query/fetch/core/bodySerializer.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/solid-query/fetch/core/params.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/solid-query/fetch/core/pathSerializer.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/solid-query/fetch/core/queryKeySerializer.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\n/**\n * JSON-friendly union that mirrors what Pinia Colada can hash.\n */\nexport type JsonValue =\n  | null\n  | string\n  | number\n  | boolean\n  | JsonValue[]\n  | { [key: string]: JsonValue };\n\n/**\n * Replacer that converts non-JSON values (bigint, Date, etc.) to safe substitutes.\n */\nexport const queryKeyJsonReplacer = (_key: string, value: unknown) => {\n  if (value === undefined || typeof value === 'function' || typeof value === 'symbol') {\n    return undefined;\n  }\n  if (typeof value === 'bigint') {\n    return value.toString();\n  }\n  if (value instanceof Date) {\n    return value.toISOString();\n  }\n  return value;\n};\n\n/**\n * Safely stringifies a value and parses it back into a JsonValue.\n */\nexport const stringifyToJsonValue = (input: unknown): JsonValue | undefined => {\n  try {\n    const json = JSON.stringify(input, queryKeyJsonReplacer);\n    if (json === undefined) {\n      return undefined;\n    }\n    return JSON.parse(json) as JsonValue;\n  } catch {\n    return undefined;\n  }\n};\n\n/**\n * Detects plain objects (including objects with a null prototype).\n */\nconst isPlainObject = (value: unknown): value is Record<string, unknown> => {\n  if (value === null || typeof value !== 'object') {\n    return false;\n  }\n  const prototype = Object.getPrototypeOf(value as object);\n  return prototype === Object.prototype || prototype === null;\n};\n\n/**\n * Turns URLSearchParams into a sorted JSON object for deterministic keys.\n */\nconst serializeSearchParams = (params: URLSearchParams): JsonValue => {\n  const entries = Array.from(params.entries()).sort(([a], [b]) => a.localeCompare(b));\n  const result: Record<string, JsonValue> = {};\n\n  for (const [key, value] of entries) {\n    const existing = result[key];\n    if (existing === undefined) {\n      result[key] = value;\n      continue;\n    }\n\n    if (Array.isArray(existing)) {\n      (existing as string[]).push(value);\n    } else {\n      result[key] = [existing, value];\n    }\n  }\n\n  return result;\n};\n\n/**\n * Normalizes any accepted value into a JSON-friendly shape for query keys.\n */\nexport const serializeQueryKeyValue = (value: unknown): JsonValue | undefined => {\n  if (value === null) {\n    return null;\n  }\n\n  if (typeof value === 'string' || typeof value === 'number' || typeof value === 'boolean') {\n    return value;\n  }\n\n  if (value === undefined || typeof value === 'function' || typeof value === 'symbol') {\n    return undefined;\n  }\n\n  if (typeof value === 'bigint') {\n    return value.toString();\n  }\n\n  if (value instanceof Date) {\n    return value.toISOString();\n  }\n\n  if (Array.isArray(value)) {\n    return stringifyToJsonValue(value);\n  }\n\n  if (typeof URLSearchParams !== 'undefined' && value instanceof URLSearchParams) {\n    return serializeSearchParams(value);\n  }\n\n  if (isPlainObject(value)) {\n    return stringifyToJsonValue(value);\n  }\n\n  return undefined;\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/solid-query/fetch/core/serverSentEvents.gen.ts",
    "content": "// 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 const 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            // Normalize line endings: CRLF -> LF, then CR -> LF\n            buffer = buffer.replace(/\\r\\n/g, '\\n').replace(/\\r/g, '\\n');\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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/solid-query/fetch/core/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { Auth, AuthToken } from './auth.gen';\nimport type { BodySerializer, QuerySerializer, QuerySerializerOptions } from './bodySerializer.gen';\n\nexport type HttpMethod =\n  | 'connect'\n  | 'delete'\n  | 'get'\n  | 'head'\n  | 'options'\n  | 'patch'\n  | 'post'\n  | 'put'\n  | 'trace';\n\nexport type Client<\n  RequestFn = never,\n  Config = unknown,\n  MethodFn = never,\n  BuildUrlFn = never,\n  SseFn = never,\n> = {\n  /**\n   * Returns the final request URL.\n   */\n  buildUrl: BuildUrlFn;\n  getConfig: () => Config;\n  request: RequestFn;\n  setConfig: (config: Config) => Config;\n} & {\n  [K in HttpMethod]: MethodFn;\n} & ([SseFn] extends [never] ? { sse?: never } : { sse: { [K in HttpMethod]: SseFn } });\n\nexport interface Config {\n  /**\n   * Auth token or a function returning auth token. The resolved value will be\n   * added to the request payload as defined by its `security` array.\n   */\n  auth?: ((auth: Auth) => Promise<AuthToken> | AuthToken) | AuthToken;\n  /**\n   * A function for serializing request body parameter. By default,\n   * {@link JSON.stringify()} will be used.\n   */\n  bodySerializer?: BodySerializer | null;\n  /**\n   * An object containing any HTTP headers that you want to pre-populate your\n   * `Headers` object with.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/Headers/Headers#init See more}\n   */\n  headers?:\n    | RequestInit['headers']\n    | Record<\n        string,\n        string | number | boolean | (string | number | boolean)[] | null | undefined | unknown\n      >;\n  /**\n   * The request method.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/fetch#method See more}\n   */\n  method?: Uppercase<HttpMethod>;\n  /**\n   * A function for serializing request query parameters. By default, arrays\n   * will be exploded in form style, objects will be exploded in deepObject\n   * style, and reserved characters are percent-encoded.\n   *\n   * This method will have no effect if the native `paramsSerializer()` Axios\n   * API function is used.\n   *\n   * {@link https://swagger.io/docs/specification/serialization/#query View examples}\n   */\n  querySerializer?: QuerySerializer | QuerySerializerOptions;\n  /**\n   * A function validating request data. This is useful if you want to ensure\n   * the request conforms to the desired shape, so it can be safely sent to\n   * the server.\n   */\n  requestValidator?: (data: unknown) => Promise<unknown>;\n  /**\n   * A function transforming response data before it's returned. This is useful\n   * for post-processing data, e.g. converting ISO strings into Date objects.\n   */\n  responseTransformer?: (data: unknown) => Promise<unknown>;\n  /**\n   * A function validating response data. This is useful if you want to ensure\n   * the response conforms to the desired shape, so it can be safely passed to\n   * the transformers and returned to the user.\n   */\n  responseValidator?: (data: unknown) => Promise<unknown>;\n}\n\ntype IsExactlyNeverOrNeverUndefined<T> = [T] extends [never]\n  ? true\n  : [T] extends [never | undefined]\n    ? [undefined] extends [T]\n      ? false\n      : true\n    : false;\n\nexport type OmitNever<T extends Record<string, unknown>> = {\n  [K in keyof T as IsExactlyNeverOrNeverUndefined<T[K]> extends true ? never : K]: T[K];\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/solid-query/fetch/core/utils.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/solid-query/fetch/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport { callToTestOrderOfParams, callWithDefaultOptionalParameters, callWithDefaultParameters, callWithDescriptions, callWithDuplicateResponses, callWithNoContentResponse, callWithParameters, callWithResponse, callWithResponseAndNoContentResponse, callWithResponses, callWithResultFromHeader, callWithWeirdParameterNames, collectionFormat, complexTypes, deleteCallWithoutParametersAndResponse, dummyA, dummyB, duplicateName, duplicateName2, duplicateName3, duplicateName4, fooWow, getCallWithoutParametersAndResponse, headCallWithoutParametersAndResponse, nonAsciiæøåÆøÅöôêÊ字符串, type Options, optionsCallWithoutParametersAndResponse, patchApiVbyApiVersionNoTag, patchCallWithoutParametersAndResponse, postApiVbyApiVersionBody, postCallWithoutParametersAndResponse, putCallWithoutParametersAndResponse, serviceWithEmptyTag, testErrorCode, types } from './sdk.gen';\nexport type { ArrayWithArray, ArrayWithBooleans, ArrayWithNumbers, ArrayWithProperties, ArrayWithReferences, ArrayWithStrings, CallToTestOrderOfParamsData, CallWithDefaultOptionalParametersData, CallWithDefaultParametersData, CallWithDescriptionsData, CallWithDuplicateResponsesData, CallWithDuplicateResponsesError, CallWithDuplicateResponsesErrors, CallWithDuplicateResponsesResponse, CallWithDuplicateResponsesResponses, CallWithNoContentResponseData, CallWithNoContentResponseResponses, CallWithParametersData, CallWithResponseAndNoContentResponseData, CallWithResponseAndNoContentResponseResponse, CallWithResponseAndNoContentResponseResponses, CallWithResponseData, CallWithResponseResponse, CallWithResponseResponses, CallWithResponsesData, CallWithResponsesError, CallWithResponsesErrors, CallWithResponsesResponse, CallWithResponsesResponses, CallWithResultFromHeaderData, CallWithResultFromHeaderErrors, CallWithResultFromHeaderResponses, CallWithWeirdParameterNamesData, ClientOptions, CollectionFormatData, CommentWithBackticks, CommentWithBackticksAndQuotes, CommentWithBreaks, CommentWithExpressionPlaceholders, CommentWithQuotes, CommentWithReservedCharacters, CommentWithSlashes, ComplexTypesData, ComplexTypesErrors, ComplexTypesResponse, ComplexTypesResponses, Date, Default, DeleteCallWithoutParametersAndResponseData, DictionaryWithArray, DictionaryWithDictionary, DictionaryWithProperties, DictionaryWithReference, DictionaryWithString, DummyAData, DummyAResponses, DummyBData, DummyBResponses, DuplicateName2Data, DuplicateName3Data, DuplicateName4Data, DuplicateNameData, EnumFromDescription, EnumWithExtensions, EnumWithNumbers, EnumWithStrings, ExternalRefA, ExternalRefB, ExternalSharedModel, FailureFailure, FooWowData, FooWowResponses, GetCallWithoutParametersAndResponseData, HeadCallWithoutParametersAndResponseData, ModelThatExtends, ModelThatExtendsExtends, ModelWithArray, ModelWithBoolean, ModelWithCircularReference, ModelWithDictionary, ModelWithDuplicateImports, ModelWithDuplicateProperties, ModelWithEnum, ModelWithEnumFromDescription, ModelWithInteger, ModelWithNestedEnums, ModelWithNestedProperties, ModelWithNullableString, ModelWithOrderedProperties, ModelWithPattern, ModelWithPatternWritable, ModelWithProperties, ModelWithPropertiesWritable, ModelWithReference, ModelWithReferenceWritable, ModelWithString, ModelWithStringError, NonAsciiæøåÆøÅöôêÊ字符串Data, NonAsciiæøåÆøÅöôêÊ字符串Response, NonAsciiæøåÆøÅöôêÊ字符串Responses, NonAsciiStringæøåÆøÅöôêÊ字符串, OptionsCallWithoutParametersAndResponseData, ParameterActivityParams, PatchApiVbyApiVersionNoTagData, PatchApiVbyApiVersionNoTagResponses, PatchCallWithoutParametersAndResponseData, PostApiVbyApiVersionBodyData, PostApiVbyApiVersionBodyError, PostApiVbyApiVersionBodyErrors, PostApiVbyApiVersionBodyResponse, PostApiVbyApiVersionBodyResponses, PostCallWithoutParametersAndResponseData, PutCallWithoutParametersAndResponseData, ResponsePostActivityResponse, ServiceWithEmptyTagData, SimpleBoolean, SimpleFile, SimpleInteger, SimpleReference, SimpleString, SimpleStringWithPattern, TestErrorCodeData, TestErrorCodeErrors, TestErrorCodeResponses, TypesData, TypesResponse, TypesResponses } from './types.gen';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/solid-query/fetch/sdk.gen.ts",
    "content": "// 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 { CallToTestOrderOfParamsData, CallWithDefaultOptionalParametersData, CallWithDefaultParametersData, CallWithDescriptionsData, CallWithDuplicateResponsesData, CallWithDuplicateResponsesErrors, CallWithDuplicateResponsesResponses, CallWithNoContentResponseData, CallWithNoContentResponseResponses, CallWithParametersData, CallWithResponseAndNoContentResponseData, CallWithResponseAndNoContentResponseResponses, CallWithResponseData, CallWithResponseResponses, CallWithResponsesData, CallWithResponsesErrors, CallWithResponsesResponses, CallWithResultFromHeaderData, CallWithResultFromHeaderErrors, CallWithResultFromHeaderResponses, CallWithWeirdParameterNamesData, CollectionFormatData, ComplexTypesData, ComplexTypesErrors, ComplexTypesResponses, DeleteCallWithoutParametersAndResponseData, DummyAData, DummyAResponses, DummyBData, DummyBResponses, DuplicateName2Data, DuplicateName3Data, DuplicateName4Data, DuplicateNameData, FooWowData, FooWowResponses, GetCallWithoutParametersAndResponseData, HeadCallWithoutParametersAndResponseData, NonAsciiæøåÆøÅöôêÊ字符串Data, NonAsciiæøåÆøÅöôêÊ字符串Responses, OptionsCallWithoutParametersAndResponseData, PatchApiVbyApiVersionNoTagData, PatchApiVbyApiVersionNoTagResponses, PatchCallWithoutParametersAndResponseData, PostApiVbyApiVersionBodyData, PostApiVbyApiVersionBodyErrors, PostApiVbyApiVersionBodyResponses, PostCallWithoutParametersAndResponseData, PutCallWithoutParametersAndResponseData, ServiceWithEmptyTagData, TestErrorCodeData, TestErrorCodeErrors, TestErrorCodeResponses, TypesData, TypesResponses } from './types.gen';\n\nexport type Options<TData extends TDataShape = TDataShape, ThrowOnError extends boolean = boolean> = Options2<TData, ThrowOnError> & {\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\nexport const serviceWithEmptyTag = <ThrowOnError extends boolean = false>(options?: Options<ServiceWithEmptyTagData, ThrowOnError>) => (options?.client ?? client).get<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/no+tag', ...options });\n\nexport const patchApiVbyApiVersionNoTag = <ThrowOnError extends boolean = false>(options?: Options<PatchApiVbyApiVersionNoTagData, ThrowOnError>) => (options?.client ?? client).patch<PatchApiVbyApiVersionNoTagResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/no+tag', ...options });\n\nexport const fooWow = <ThrowOnError extends boolean = false>(options?: Options<FooWowData, ThrowOnError>) => (options?.client ?? client).put<FooWowResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/no+tag', ...options });\n\nexport const deleteCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<DeleteCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).delete<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const getCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<GetCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).get<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const headCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<HeadCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).head<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const optionsCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<OptionsCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).options<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const patchCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<PatchCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).patch<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const postCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<PostCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).post<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const putCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<PutCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).put<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const callWithDescriptions = <ThrowOnError extends boolean = false>(options?: Options<CallWithDescriptionsData, ThrowOnError>) => (options?.client ?? client).post<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/descriptions/', ...options });\n\nexport const callWithParameters = <ThrowOnError extends boolean = false>(options: Options<CallWithParametersData, ThrowOnError>) => (options.client ?? client).post<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/parameters/{parameterPath}', ...options });\n\nexport const callWithWeirdParameterNames = <ThrowOnError extends boolean = false>(options: Options<CallWithWeirdParameterNamesData, ThrowOnError>) => (options.client ?? client).post<unknown, unknown, ThrowOnError>({\n    url: '/api/v{api-version}/parameters/{parameter.path.1}/{parameter-path-2}/{PARAMETER-PATH-3}',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options.headers\n    }\n});\n\nexport const callWithDefaultParameters = <ThrowOnError extends boolean = false>(options: Options<CallWithDefaultParametersData, ThrowOnError>) => (options.client ?? client).get<unknown, unknown, ThrowOnError>({\n    querySerializer: { parameters: { parameterModel: { object: { explode: false, style: 'form' } } } },\n    url: '/api/v{api-version}/defaults',\n    ...options\n});\n\nexport const callWithDefaultOptionalParameters = <ThrowOnError extends boolean = false>(options?: Options<CallWithDefaultOptionalParametersData, ThrowOnError>) => (options?.client ?? client).post<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/defaults', ...options });\n\nexport const callToTestOrderOfParams = <ThrowOnError extends boolean = false>(options: Options<CallToTestOrderOfParamsData, ThrowOnError>) => (options.client ?? client).put<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/defaults', ...options });\n\nexport const duplicateName = <ThrowOnError extends boolean = false>(options?: Options<DuplicateNameData, ThrowOnError>) => (options?.client ?? client).delete<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/duplicate', ...options });\n\nexport const duplicateName2 = <ThrowOnError extends boolean = false>(options?: Options<DuplicateName2Data, ThrowOnError>) => (options?.client ?? client).get<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/duplicate', ...options });\n\nexport const duplicateName3 = <ThrowOnError extends boolean = false>(options?: Options<DuplicateName3Data, ThrowOnError>) => (options?.client ?? client).post<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/duplicate', ...options });\n\nexport const duplicateName4 = <ThrowOnError extends boolean = false>(options?: Options<DuplicateName4Data, ThrowOnError>) => (options?.client ?? client).put<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/duplicate', ...options });\n\nexport const callWithNoContentResponse = <ThrowOnError extends boolean = false>(options?: Options<CallWithNoContentResponseData, ThrowOnError>) => (options?.client ?? client).get<CallWithNoContentResponseResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/no-content', ...options });\n\nexport const callWithResponseAndNoContentResponse = <ThrowOnError extends boolean = false>(options?: Options<CallWithResponseAndNoContentResponseData, ThrowOnError>) => (options?.client ?? client).get<CallWithResponseAndNoContentResponseResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/multiple-tags/response-and-no-content', ...options });\n\nexport const dummyA = <ThrowOnError extends boolean = false>(options?: Options<DummyAData, ThrowOnError>) => (options?.client ?? client).get<DummyAResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/multiple-tags/a', ...options });\n\nexport const dummyB = <ThrowOnError extends boolean = false>(options?: Options<DummyBData, ThrowOnError>) => (options?.client ?? client).get<DummyBResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/multiple-tags/b', ...options });\n\nexport const callWithResponse = <ThrowOnError extends boolean = false>(options?: Options<CallWithResponseData, ThrowOnError>) => (options?.client ?? client).get<CallWithResponseResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/response', ...options });\n\nexport const callWithDuplicateResponses = <ThrowOnError extends boolean = false>(options?: Options<CallWithDuplicateResponsesData, ThrowOnError>) => (options?.client ?? client).post<CallWithDuplicateResponsesResponses, CallWithDuplicateResponsesErrors, ThrowOnError>({ url: '/api/v{api-version}/response', ...options });\n\nexport const callWithResponses = <ThrowOnError extends boolean = false>(options?: Options<CallWithResponsesData, ThrowOnError>) => (options?.client ?? client).put<CallWithResponsesResponses, CallWithResponsesErrors, ThrowOnError>({ url: '/api/v{api-version}/response', ...options });\n\nexport const collectionFormat = <ThrowOnError extends boolean = false>(options: Options<CollectionFormatData, ThrowOnError>) => (options.client ?? client).get<unknown, unknown, ThrowOnError>({\n    querySerializer: { parameters: {\n            parameterArrayCSV: { array: { explode: false } },\n            parameterArraySSV: { array: { explode: false } },\n            parameterArrayTSV: { array: { explode: false } },\n            parameterArrayPipes: { array: { explode: false } }\n        } },\n    url: '/api/v{api-version}/collectionFormat',\n    ...options\n});\n\nexport const types = <ThrowOnError extends boolean = false>(options: Options<TypesData, ThrowOnError>) => (options.client ?? client).get<TypesResponses, unknown, ThrowOnError>({\n    querySerializer: { parameters: { parameterArray: { array: { explode: false } }, parameterDictionary: { object: { explode: false, style: 'form' } } } },\n    url: '/api/v{api-version}/types',\n    ...options\n});\n\nexport const complexTypes = <ThrowOnError extends boolean = false>(options: Options<ComplexTypesData, ThrowOnError>) => (options.client ?? client).get<ComplexTypesResponses, ComplexTypesErrors, ThrowOnError>({\n    querySerializer: { parameters: { parameterObject: { object: { explode: false, style: 'form' } }, parameterReference: { object: { explode: false, style: 'form' } } } },\n    url: '/api/v{api-version}/complex',\n    ...options\n});\n\nexport const callWithResultFromHeader = <ThrowOnError extends boolean = false>(options?: Options<CallWithResultFromHeaderData, ThrowOnError>) => (options?.client ?? client).post<CallWithResultFromHeaderResponses, CallWithResultFromHeaderErrors, ThrowOnError>({ url: '/api/v{api-version}/header', ...options });\n\nexport const testErrorCode = <ThrowOnError extends boolean = false>(options: Options<TestErrorCodeData, ThrowOnError>) => (options.client ?? client).post<TestErrorCodeResponses, TestErrorCodeErrors, ThrowOnError>({ url: '/api/v{api-version}/error', ...options });\n\nexport const nonAsciiæøåÆøÅöôêÊ字符串 = <ThrowOnError extends boolean = false>(options: Options<NonAsciiæøåÆøÅöôêÊ字符串Data, ThrowOnError>) => (options.client ?? client).post<NonAsciiæøåÆøÅöôêÊ字符串Responses, unknown, ThrowOnError>({ url: '/api/v{api-version}/non-ascii-æøåÆØÅöôêÊ字符串', ...options });\n\n/**\n * Body should not be unknown\n *\n * Body should not be unknown\n */\nexport const postApiVbyApiVersionBody = <ThrowOnError extends boolean = false>(options: Options<PostApiVbyApiVersionBodyData, ThrowOnError>) => (options.client ?? client).post<PostApiVbyApiVersionBodyResponses, PostApiVbyApiVersionBodyErrors, ThrowOnError>({\n    url: '/api/v{api-version}/body',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options.headers\n    }\n});\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/solid-query/fetch/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type ClientOptions = {\n    baseUrl: 'http://localhost:3000/base' | (string & {});\n};\n\nexport type ExternalRefA = ExternalSharedModel;\n\nexport type ExternalRefB = ExternalSharedModel;\n\n/**\n * Testing multiline comments in string: First line\n * Second line\n *\n * Fourth line\n */\nexport type CommentWithBreaks = number;\n\n/**\n * Testing backticks in string: `backticks` and ```multiple backticks``` should work\n */\nexport type CommentWithBackticks = number;\n\n/**\n * Testing backticks and quotes in string: `backticks`, 'quotes', \"double quotes\" and ```multiple backticks``` should work\n */\nexport type CommentWithBackticksAndQuotes = number;\n\n/**\n * Testing slashes in string: \\backwards\\\\\\ and /forwards/// should work\n */\nexport type CommentWithSlashes = number;\n\n/**\n * Testing expression placeholders in string: ${expression} should work\n */\nexport type CommentWithExpressionPlaceholders = number;\n\n/**\n * Testing quotes in string: 'single quote''' and \"double quotes\"\"\" should work\n */\nexport type CommentWithQuotes = number;\n\n/**\n * Testing reserved characters in string: * inline * and ** inline ** should work\n */\nexport type CommentWithReservedCharacters = number;\n\n/**\n * This is a simple number\n */\nexport type SimpleInteger = number;\n\n/**\n * This is a simple boolean\n */\nexport type SimpleBoolean = boolean;\n\n/**\n * This is a simple string\n */\nexport type SimpleString = string;\n\n/**\n * A string with non-ascii (unicode) characters valid in typescript identifiers (æøåÆØÅöÔèÈ字符串)\n */\nexport type NonAsciiStringæøåÆøÅöôêÊ字符串 = string;\n\n/**\n * This is a simple file\n */\nexport type SimpleFile = Blob | File;\n\nexport type SimpleReference = ModelWithString;\n\n/**\n * This is a simple string\n */\nexport type SimpleStringWithPattern = string;\n\n/**\n * This is a simple enum with strings\n */\nexport type EnumWithStrings = 'Success' | 'Warning' | 'Error' | '\\'Single Quote\\'' | '\"Double Quotes\"' | 'Non-ascii: øæåôöØÆÅÔÖ字符串';\n\n/**\n * This is a simple enum with numbers\n */\nexport type EnumWithNumbers = 1 | 2 | 3 | 1.1 | 1.2 | 1.3 | 100 | 200 | 300 | -100 | -200 | -300 | -1.1 | -1.2 | -1.3;\n\n/**\n * Success=1,Warning=2,Error=3\n */\nexport type EnumFromDescription = number;\n\n/**\n * This is a simple enum with numbers\n */\nexport type EnumWithExtensions = 200 | 400 | 500;\n\n/**\n * This is a simple array with numbers\n */\nexport type ArrayWithNumbers = Array<number>;\n\n/**\n * This is a simple array with booleans\n */\nexport type ArrayWithBooleans = Array<boolean>;\n\n/**\n * This is a simple array with strings\n */\nexport type ArrayWithStrings = Array<string>;\n\n/**\n * This is a simple array with references\n */\nexport type ArrayWithReferences = Array<ModelWithString>;\n\n/**\n * This is a simple array containing an array\n */\nexport type ArrayWithArray = Array<Array<ModelWithString>>;\n\n/**\n * This is a simple array with properties\n */\nexport type ArrayWithProperties = Array<{\n    foo?: string;\n    bar?: string;\n}>;\n\n/**\n * This is a string dictionary\n */\nexport type DictionaryWithString = {\n    [key: string]: string;\n};\n\n/**\n * This is a string reference\n */\nexport type DictionaryWithReference = {\n    [key: string]: ModelWithString;\n};\n\n/**\n * This is a complex dictionary\n */\nexport type DictionaryWithArray = {\n    [key: string]: Array<ModelWithString>;\n};\n\n/**\n * This is a string dictionary\n */\nexport type DictionaryWithDictionary = {\n    [key: string]: {\n        [key: string]: string;\n    };\n};\n\n/**\n * This is a complex dictionary\n */\nexport type DictionaryWithProperties = {\n    [key: string]: {\n        foo?: string;\n        bar?: string;\n    };\n};\n\n/**\n * This is a type-only model that defines Date as a string\n */\nexport type Date = string;\n\n/**\n * This is a model with one number property\n */\nexport type ModelWithInteger = {\n    /**\n     * This is a simple number property\n     */\n    prop?: number;\n};\n\n/**\n * This is a model with one boolean property\n */\nexport type ModelWithBoolean = {\n    /**\n     * This is a simple boolean property\n     */\n    prop?: boolean;\n};\n\n/**\n * This is a model with one string property\n */\nexport type ModelWithString = {\n    /**\n     * This is a simple string property\n     */\n    prop?: string;\n};\n\n/**\n * This is a model with one string property\n */\nexport type ModelWithStringError = {\n    /**\n     * This is a simple string property\n     */\n    prop?: string;\n};\n\n/**\n * This is a model with one string property\n */\nexport type ModelWithNullableString = {\n    /**\n     * This is a simple string property\n     */\n    nullableProp?: string | null;\n    /**\n     * This is a simple string property\n     */\n    nullableRequiredProp: string | null;\n};\n\n/**\n * This is a model with one enum\n */\nexport type ModelWithEnum = {\n    /**\n     * This is a simple enum with strings\n     */\n    test?: 'Success' | 'Warning' | 'Error' | 'ØÆÅ字符串';\n    /**\n     * These are the HTTP error code enums\n     */\n    statusCode?: '100' | '200 FOO' | '300 FOO_BAR' | '400 foo-bar' | '500 foo.bar' | '600 foo&bar';\n    /**\n     * Simple boolean enum\n     */\n    bool?: true;\n};\n\n/**\n * This is a model with one enum\n */\nexport type ModelWithEnumFromDescription = {\n    /**\n     * Success=1,Warning=2,Error=3\n     */\n    test?: number;\n};\n\n/**\n * This is a model with nested enums\n */\nexport type ModelWithNestedEnums = {\n    dictionaryWithEnum?: {\n        [key: string]: 'Success' | 'Warning' | 'Error';\n    };\n    dictionaryWithEnumFromDescription?: {\n        [key: string]: number;\n    };\n    arrayWithEnum?: Array<'Success' | 'Warning' | 'Error'>;\n    arrayWithDescription?: Array<number>;\n};\n\n/**\n * This is a model with one property containing a reference\n */\nexport type ModelWithReference = {\n    prop?: ModelWithProperties;\n};\n\n/**\n * This is a model with one property containing an array\n */\nexport type ModelWithArray = {\n    prop?: Array<ModelWithString>;\n    propWithFile?: Array<Blob | File>;\n    propWithNumber?: Array<number>;\n};\n\n/**\n * This is a model with one property containing a dictionary\n */\nexport type ModelWithDictionary = {\n    prop?: {\n        [key: string]: string;\n    };\n};\n\n/**\n * This is a model with one property containing a circular reference\n */\nexport type ModelWithCircularReference = {\n    prop?: ModelWithCircularReference;\n};\n\n/**\n * This is a model with one nested property\n */\nexport type ModelWithProperties = {\n    required: string;\n    readonly requiredAndReadOnly: string;\n    string?: string;\n    number?: number;\n    boolean?: boolean;\n    reference?: ModelWithString;\n    'property with space'?: string;\n    default?: string;\n    try?: string;\n    readonly '@namespace.string'?: string;\n    readonly '@namespace.integer'?: number;\n};\n\n/**\n * This is a model with one nested property\n */\nexport type ModelWithNestedProperties = {\n    readonly first: {\n        readonly second: {\n            readonly third: string;\n        };\n    };\n};\n\n/**\n * This is a model with duplicated properties\n */\nexport type ModelWithDuplicateProperties = {\n    prop?: ModelWithString;\n};\n\n/**\n * This is a model with ordered properties\n */\nexport type ModelWithOrderedProperties = {\n    zebra?: string;\n    apple?: string;\n    hawaii?: string;\n};\n\n/**\n * This is a model with duplicated imports\n */\nexport type ModelWithDuplicateImports = {\n    propA?: ModelWithString;\n    propB?: ModelWithString;\n    propC?: ModelWithString;\n};\n\n/**\n * This is a model that extends another model\n */\nexport type ModelThatExtends = ModelWithString & {\n    propExtendsA?: string;\n    propExtendsB?: ModelWithString;\n};\n\n/**\n * This is a model that extends another model\n */\nexport type ModelThatExtendsExtends = ModelWithString & ModelThatExtends & {\n    propExtendsC?: string;\n    propExtendsD?: ModelWithString;\n};\n\nexport type Default = {\n    name?: string;\n};\n\n/**\n * This is a model that contains a some patterns\n */\nexport type ModelWithPattern = {\n    key: string;\n    name: string;\n    readonly enabled?: boolean;\n    readonly modified?: string;\n    id?: string;\n    text?: string;\n    patternWithSingleQuotes?: string;\n    patternWithNewline?: string;\n    patternWithBacktick?: string;\n    patternWithUnicode?: string;\n};\n\nexport type ParameterActivityParams = {\n    description?: string;\n    graduate_id?: number;\n    organization_id?: number;\n    parent_activity?: number;\n    post_id?: number;\n};\n\nexport type ResponsePostActivityResponse = {\n    description?: string;\n    graduate_id?: number;\n    organization_id?: number;\n    parent_activity_id?: number;\n    post_id?: number;\n};\n\nexport type FailureFailure = {\n    error?: string;\n    message?: string;\n    reference_code?: string;\n};\n\nexport type ExternalSharedModel = {\n    id: string;\n    name?: string;\n};\n\n/**\n * This is a model with one property containing a reference\n */\nexport type ModelWithReferenceWritable = {\n    prop?: ModelWithPropertiesWritable;\n};\n\n/**\n * This is a model with one nested property\n */\nexport type ModelWithPropertiesWritable = {\n    required: string;\n    string?: string;\n    number?: number;\n    boolean?: boolean;\n    reference?: ModelWithString;\n    'property with space'?: string;\n    default?: string;\n    try?: string;\n};\n\n/**\n * This is a model that contains a some patterns\n */\nexport type ModelWithPatternWritable = {\n    key: string;\n    name: string;\n    id?: string;\n    text?: string;\n    patternWithSingleQuotes?: string;\n    patternWithNewline?: string;\n    patternWithBacktick?: string;\n    patternWithUnicode?: string;\n};\n\nexport type ServiceWithEmptyTagData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no+tag';\n};\n\nexport type PatchApiVbyApiVersionNoTagData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no+tag';\n};\n\nexport type PatchApiVbyApiVersionNoTagResponses = {\n    /**\n     * OK\n     */\n    default: unknown;\n};\n\nexport type FooWowData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no+tag';\n};\n\nexport type FooWowResponses = {\n    /**\n     * OK\n     */\n    default: unknown;\n};\n\nexport type DeleteCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type GetCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type HeadCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type OptionsCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type PatchCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type PostCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type PutCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type CallWithDescriptionsData = {\n    body?: never;\n    path?: never;\n    query?: {\n        /**\n         * Testing multiline comments in string: First line\n         * Second line\n         *\n         * Fourth line\n         */\n        parameterWithBreaks?: string;\n        /**\n         * Testing backticks in string: `backticks` and ```multiple backticks``` should work\n         */\n        parameterWithBackticks?: string;\n        /**\n         * Testing slashes in string: \\backwards\\\\\\ and /forwards/// should work\n         */\n        parameterWithSlashes?: string;\n        /**\n         * Testing expression placeholders in string: ${expression} should work\n         */\n        parameterWithExpressionPlaceholders?: string;\n        /**\n         * Testing quotes in string: 'single quote''' and \"double quotes\"\"\" should work\n         */\n        parameterWithQuotes?: string;\n        /**\n         * Testing reserved characters in string: * inline * and ** inline ** should work\n         */\n        parameterWithReservedCharacters?: string;\n    };\n    url: '/api/v{api-version}/descriptions/';\n};\n\nexport type CallWithParametersData = {\n    body?: never;\n    headers: {\n        /**\n         * This is the parameter that goes into the header\n         */\n        parameterHeader: string;\n    };\n    path: {\n        /**\n         * This is the parameter that goes into the path\n         */\n        parameterPath: string;\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string;\n    };\n    query: {\n        /**\n         * This is the parameter that goes into the query params\n         */\n        parameterQuery: string;\n    };\n    url: '/api/v{api-version}/parameters/{parameterPath}';\n};\n\nexport type CallWithWeirdParameterNamesData = {\n    /**\n     * This is the parameter that is sent as request body\n     */\n    body: string;\n    headers: {\n        /**\n         * This is the parameter that goes into the request header\n         */\n        'parameter.header': string;\n    };\n    path: {\n        /**\n         * This is the parameter that goes into the path\n         */\n        'parameter.path.1'?: string;\n        /**\n         * This is the parameter that goes into the path\n         */\n        'parameter-path-2'?: string;\n        /**\n         * This is the parameter that goes into the path\n         */\n        'PARAMETER-PATH-3'?: string;\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string;\n    };\n    query: {\n        /**\n         * This is the parameter with a reserved keyword\n         */\n        default?: string;\n        /**\n         * This is the parameter that goes into the request query params\n         */\n        'parameter-query': string;\n    };\n    url: '/api/v{api-version}/parameters/{parameter.path.1}/{parameter-path-2}/{PARAMETER-PATH-3}';\n};\n\nexport type CallWithDefaultParametersData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * This is a simple string with default value\n         */\n        parameterString: string;\n        /**\n         * This is a simple number with default value\n         */\n        parameterNumber: number;\n        /**\n         * This is a simple boolean with default value\n         */\n        parameterBoolean: boolean;\n        /**\n         * This is a simple enum with default value\n         */\n        parameterEnum: 'Success' | 'Warning' | 'Error';\n        /**\n         * This is a model with one string property\n         */\n        parameterModel: {\n            /**\n             * This is a simple string property\n             */\n            prop?: string;\n        };\n    };\n    url: '/api/v{api-version}/defaults';\n};\n\nexport type CallWithDefaultOptionalParametersData = {\n    body?: never;\n    path?: never;\n    query?: {\n        /**\n         * This is a simple string that is optional with default value\n         */\n        parameterString?: string;\n        /**\n         * This is a simple number that is optional with default value\n         */\n        parameterNumber?: number;\n        /**\n         * This is a simple boolean that is optional with default value\n         */\n        parameterBoolean?: boolean;\n        /**\n         * This is a simple enum that is optional with default value\n         */\n        parameterEnum?: 'Success' | 'Warning' | 'Error';\n    };\n    url: '/api/v{api-version}/defaults';\n};\n\nexport type CallToTestOrderOfParamsData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * This is a optional string with default\n         */\n        parameterOptionalStringWithDefault?: string;\n        /**\n         * This is a optional string with empty default\n         */\n        parameterOptionalStringWithEmptyDefault?: string;\n        /**\n         * This is a optional string with no default\n         */\n        parameterOptionalStringWithNoDefault?: string;\n        /**\n         * This is a string with default\n         */\n        parameterStringWithDefault: string;\n        /**\n         * This is a string with empty default\n         */\n        parameterStringWithEmptyDefault: string;\n        /**\n         * This is a string with no default\n         */\n        parameterStringWithNoDefault: string;\n        /**\n         * This is a string that can be null with no default\n         */\n        parameterStringNullableWithNoDefault?: string | null;\n        /**\n         * This is a string that can be null with default\n         */\n        parameterStringNullableWithDefault?: string | null;\n    };\n    url: '/api/v{api-version}/defaults';\n};\n\nexport type DuplicateNameData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/duplicate';\n};\n\nexport type DuplicateName2Data = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/duplicate';\n};\n\nexport type DuplicateName3Data = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/duplicate';\n};\n\nexport type DuplicateName4Data = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/duplicate';\n};\n\nexport type CallWithNoContentResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no-content';\n};\n\nexport type CallWithNoContentResponseResponses = {\n    /**\n     * Success\n     */\n    204: unknown;\n};\n\nexport type CallWithResponseAndNoContentResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multiple-tags/response-and-no-content';\n};\n\nexport type CallWithResponseAndNoContentResponseResponses = {\n    /**\n     * Response is a simple number\n     */\n    200: number;\n    /**\n     * Success\n     */\n    204: unknown;\n};\n\nexport type CallWithResponseAndNoContentResponseResponse = CallWithResponseAndNoContentResponseResponses[keyof CallWithResponseAndNoContentResponseResponses];\n\nexport type DummyAData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multiple-tags/a';\n};\n\nexport type DummyAResponses = {\n    /**\n     * Success\n     */\n    204: unknown;\n};\n\nexport type DummyBData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multiple-tags/b';\n};\n\nexport type DummyBResponses = {\n    /**\n     * Success\n     */\n    204: unknown;\n};\n\nexport type CallWithResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/response';\n};\n\nexport type CallWithResponseResponses = {\n    /**\n     * Message for default response\n     */\n    default: ModelWithString;\n};\n\nexport type CallWithResponseResponse = CallWithResponseResponses[keyof CallWithResponseResponses];\n\nexport type CallWithDuplicateResponsesData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/response';\n};\n\nexport type CallWithDuplicateResponsesErrors = {\n    /**\n     * Message for 500 error\n     */\n    500: ModelWithStringError;\n    /**\n     * Message for 501 error\n     */\n    501: ModelWithStringError;\n    /**\n     * Message for 502 error\n     */\n    502: ModelWithStringError;\n    /**\n     * Message for default response\n     */\n    default: ModelWithString;\n};\n\nexport type CallWithDuplicateResponsesError = CallWithDuplicateResponsesErrors[keyof CallWithDuplicateResponsesErrors];\n\nexport type CallWithDuplicateResponsesResponses = {\n    /**\n     * Message for 201 response\n     */\n    201: ModelWithString;\n    /**\n     * Message for 202 response\n     */\n    202: ModelWithString;\n};\n\nexport type CallWithDuplicateResponsesResponse = CallWithDuplicateResponsesResponses[keyof CallWithDuplicateResponsesResponses];\n\nexport type CallWithResponsesData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/response';\n};\n\nexport type CallWithResponsesErrors = {\n    /**\n     * Message for 500 error\n     */\n    500: ModelWithStringError;\n    /**\n     * Message for 501 error\n     */\n    501: ModelWithStringError;\n    /**\n     * Message for 502 error\n     */\n    502: ModelWithStringError;\n    /**\n     * Message for default response\n     */\n    default: ModelWithString;\n};\n\nexport type CallWithResponsesError = CallWithResponsesErrors[keyof CallWithResponsesErrors];\n\nexport type CallWithResponsesResponses = {\n    /**\n     * Message for 200 response\n     */\n    200: {\n        readonly '@namespace.string'?: string;\n        readonly '@namespace.integer'?: number;\n        readonly value?: Array<ModelWithString>;\n    };\n    /**\n     * Message for 201 response\n     */\n    201: ModelThatExtends;\n    /**\n     * Message for 202 response\n     */\n    202: ModelThatExtendsExtends;\n};\n\nexport type CallWithResponsesResponse = CallWithResponsesResponses[keyof CallWithResponsesResponses];\n\nexport type CollectionFormatData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * This is an array parameter that is sent as csv format (comma-separated values)\n         */\n        parameterArrayCSV: Array<string>;\n        /**\n         * This is an array parameter that is sent as ssv format (space-separated values)\n         */\n        parameterArraySSV: Array<string>;\n        /**\n         * This is an array parameter that is sent as tsv format (tab-separated values)\n         */\n        parameterArrayTSV: Array<string>;\n        /**\n         * This is an array parameter that is sent as pipes format (pipe-separated values)\n         */\n        parameterArrayPipes: Array<string>;\n        /**\n         * This is an array parameter that is sent as multi format (multiple parameter instances)\n         */\n        parameterArrayMulti: Array<string>;\n    };\n    url: '/api/v{api-version}/collectionFormat';\n};\n\nexport type TypesData = {\n    body?: never;\n    path?: {\n        /**\n         * This is a number parameter\n         */\n        id?: number;\n    };\n    query: {\n        /**\n         * This is a number parameter\n         */\n        parameterNumber: number;\n        /**\n         * This is a string parameter\n         */\n        parameterString: string;\n        /**\n         * This is a boolean parameter\n         */\n        parameterBoolean: boolean;\n        /**\n         * This is an array parameter\n         */\n        parameterArray: Array<string>;\n        /**\n         * This is a dictionary parameter\n         */\n        parameterDictionary: {\n            [key: string]: unknown;\n        };\n        /**\n         * This is an enum parameter\n         */\n        parameterEnum: 'Success' | 'Warning' | 'Error';\n    };\n    url: '/api/v{api-version}/types';\n};\n\nexport type TypesResponses = {\n    /**\n     * Response is a simple number\n     */\n    200: number;\n    /**\n     * Response is a simple string\n     */\n    201: string;\n    /**\n     * Response is a simple boolean\n     */\n    202: boolean;\n    /**\n     * Response is a simple object\n     */\n    203: {\n        [key: string]: unknown;\n    };\n};\n\nexport type TypesResponse = TypesResponses[keyof TypesResponses];\n\nexport type ComplexTypesData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * Parameter containing object\n         */\n        parameterObject: {\n            first?: {\n                second?: {\n                    third?: string;\n                };\n            };\n        };\n        /**\n         * This is a model with one string property\n         */\n        parameterReference: {\n            /**\n             * This is a simple string property\n             */\n            prop?: string;\n        };\n    };\n    url: '/api/v{api-version}/complex';\n};\n\nexport type ComplexTypesErrors = {\n    /**\n     * 400 server error\n     */\n    400: unknown;\n    /**\n     * 500 server error\n     */\n    500: unknown;\n};\n\nexport type ComplexTypesResponses = {\n    /**\n     * Successful response\n     */\n    200: Array<ModelWithString>;\n};\n\nexport type ComplexTypesResponse = ComplexTypesResponses[keyof ComplexTypesResponses];\n\nexport type CallWithResultFromHeaderData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/header';\n};\n\nexport type CallWithResultFromHeaderErrors = {\n    /**\n     * 400 server error\n     */\n    400: unknown;\n    /**\n     * 500 server error\n     */\n    500: unknown;\n};\n\nexport type CallWithResultFromHeaderResponses = {\n    /**\n     * Successful response\n     */\n    200: unknown;\n};\n\nexport type TestErrorCodeData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * Status code to return\n         */\n        status: string;\n    };\n    url: '/api/v{api-version}/error';\n};\n\nexport type TestErrorCodeErrors = {\n    /**\n     * Custom message: Internal Server Error\n     */\n    500: unknown;\n    /**\n     * Custom message: Not Implemented\n     */\n    501: unknown;\n    /**\n     * Custom message: Bad Gateway\n     */\n    502: unknown;\n    /**\n     * Custom message: Service Unavailable\n     */\n    503: unknown;\n};\n\nexport type TestErrorCodeResponses = {\n    /**\n     * Custom message: Successful response\n     */\n    200: unknown;\n};\n\nexport type NonAsciiæøåÆøÅöôêÊ字符串Data = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * Dummy input param\n         */\n        nonAsciiParamæøåÆØÅöôêÊ: number;\n    };\n    url: '/api/v{api-version}/non-ascii-æøåÆØÅöôêÊ字符串';\n};\n\nexport type NonAsciiæøåÆøÅöôêÊ字符串Responses = {\n    /**\n     * Successful response\n     */\n    200: NonAsciiStringæøåÆøÅöôêÊ字符串;\n};\n\nexport type NonAsciiæøåÆøÅöôêÊ字符串Response = NonAsciiæøåÆøÅöôêÊ字符串Responses[keyof NonAsciiæøåÆøÅöôêÊ字符串Responses];\n\nexport type PostApiVbyApiVersionBodyData = {\n    /**\n     * Body should not be unknown\n     */\n    body: ParameterActivityParams;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/body';\n};\n\nexport type PostApiVbyApiVersionBodyErrors = {\n    /**\n     * Bad Request\n     */\n    400: FailureFailure;\n    /**\n     * Internal Server Error\n     */\n    500: FailureFailure;\n};\n\nexport type PostApiVbyApiVersionBodyError = PostApiVbyApiVersionBodyErrors[keyof PostApiVbyApiVersionBodyErrors];\n\nexport type PostApiVbyApiVersionBodyResponses = {\n    /**\n     * OK\n     */\n    200: ResponsePostActivityResponse;\n};\n\nexport type PostApiVbyApiVersionBodyResponse = PostApiVbyApiVersionBodyResponses[keyof PostApiVbyApiVersionBodyResponses];\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/solid-query/name-builder/@tanstack/solid-query.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport { type DefaultError, type MutationOptions, queryOptions } from '@tanstack/solid-query';\n\nimport { client } from '../client.gen';\nimport { fooBarPost, fooBarPut, fooPost, fooPut, getFoo, getFooBar, type Options } from '../sdk.gen';\nimport type { FooBarPostData, FooBarPostResponse, FooBarPutData, FooBarPutResponse, FooPostData, FooPostResponse, FooPutData, FooPutResponse, GetFooBarData, GetFooBarResponse, GetFooData, GetFooResponse } from '../types.gen';\n\nexport type QueryKey<TOptions extends Options> = [\n    Pick<TOptions, 'baseUrl' | 'body' | 'headers' | 'path' | 'query'> & {\n        _id: string;\n        _infinite?: boolean;\n        tags?: ReadonlyArray<string>;\n    }\n];\n\nconst createQueryKey = <TOptions extends Options>(id: string, options?: TOptions, infinite?: boolean, tags?: ReadonlyArray<string>): [\n    QueryKey<TOptions>[0]\n] => {\n    const params: QueryKey<TOptions>[0] = { _id: id, baseUrl: options?.baseUrl || (options?.client ?? client).getConfig().baseUrl } as QueryKey<TOptions>[0];\n    if (infinite) {\n        params._infinite = infinite;\n    }\n    if (tags) {\n        params.tags = tags;\n    }\n    if (options?.body) {\n        params.body = options.body;\n    }\n    if (options?.headers) {\n        params.headers = options.headers;\n    }\n    if (options?.path) {\n        params.path = options.path;\n    }\n    if (options?.query) {\n        params.query = options.query;\n    }\n    return [params];\n};\n\nexport const getFooD = (options?: Options<GetFooData>) => createQueryKey('getFoo', options);\n\nexport const getFooE = (options?: Options<GetFooData>) => queryOptions<GetFooResponse, DefaultError, GetFooResponse, ReturnType<typeof getFooD>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await getFoo({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: getFooD(options)\n});\n\nexport const fooPostC = (options?: Partial<Options<FooPostData>>): MutationOptions<FooPostResponse, DefaultError, Options<FooPostData>> => {\n    const mutationOptions: MutationOptions<FooPostResponse, DefaultError, Options<FooPostData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await fooPost({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const fooPutC = (options?: Partial<Options<FooPutData>>): MutationOptions<FooPutResponse, DefaultError, Options<FooPutData>> => {\n    const mutationOptions: MutationOptions<FooPutResponse, DefaultError, Options<FooPutData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await fooPut({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const getFooBarD = (options?: Options<GetFooBarData>) => createQueryKey('getFooBar', options);\n\nexport const getFooBarE = (options?: Options<GetFooBarData>) => queryOptions<GetFooBarResponse, DefaultError, GetFooBarResponse, ReturnType<typeof getFooBarD>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await getFooBar({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: getFooBarD(options)\n});\n\nexport const fooBarPostC = (options?: Partial<Options<FooBarPostData>>): MutationOptions<FooBarPostResponse, DefaultError, Options<FooBarPostData>> => {\n    const mutationOptions: MutationOptions<FooBarPostResponse, DefaultError, Options<FooBarPostData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await fooBarPost({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const fooBarPutC = (options?: Partial<Options<FooBarPutData>>): MutationOptions<FooBarPutResponse, DefaultError, Options<FooBarPutData>> => {\n    const mutationOptions: MutationOptions<FooBarPutResponse, DefaultError, Options<FooBarPutData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await fooBarPut({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/solid-query/name-builder/client/client.gen.ts",
    "content": "// 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 (options: RequestOptions) => {\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 url = buildUrl(opts);\n\n    return { opts, url };\n  };\n\n  const request: Client['request'] = async (options) => {\n    // @ts-expect-error\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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/solid-query/name-builder/client/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type { Auth } from '../core/auth.gen';\nexport type { QuerySerializerOptions } from '../core/bodySerializer.gen';\nexport {\n  formDataBodySerializer,\n  jsonBodySerializer,\n  urlSearchParamsBodySerializer,\n} from '../core/bodySerializer.gen';\nexport { buildClientParams } from '../core/params.gen';\nexport { serializeQueryKeyValue } from '../core/queryKeySerializer.gen';\nexport { createClient } from './client.gen';\nexport type {\n  Client,\n  ClientOptions,\n  Config,\n  CreateClientConfig,\n  Options,\n  RequestOptions,\n  RequestResult,\n  ResolvedRequestOptions,\n  ResponseStyle,\n  TDataShape,\n} from './types.gen';\nexport { createConfig, mergeHeaders } from './utils.gen';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/solid-query/name-builder/client/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { Auth } from '../core/auth.gen';\nimport type {\n  ServerSentEventsOptions,\n  ServerSentEventsResult,\n} from '../core/serverSentEvents.gen';\nimport type { Client as CoreClient, Config as CoreConfig } from '../core/types.gen';\nimport type { Middleware } from './utils.gen';\n\nexport type ResponseStyle = 'data' | 'fields';\n\nexport interface Config<T extends ClientOptions = ClientOptions>\n  extends Omit<RequestInit, 'body' | 'headers' | 'method'>, CoreConfig {\n  /**\n   * Base URL for all requests made by this client.\n   */\n  baseUrl?: T['baseUrl'];\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   * Please don't use the Fetch client for Next.js applications. The `next`\n   * options won't have any effect.\n   *\n   * Install {@link https://www.npmjs.com/package/@hey-api/client-next `@hey-api/client-next`} instead.\n   */\n  next?: never;\n  /**\n   * Return the response data parsed in a specified format. By default, `auto`\n   * will infer the appropriate method from the `Content-Type` response header.\n   * You can override this behavior with any of the {@link Body} methods.\n   * Select `stream` if you don't want to parse response data at all.\n   *\n   * @default 'auto'\n   */\n  parseAs?: 'arrayBuffer' | 'auto' | 'blob' | 'formData' | 'json' | 'stream' | 'text';\n  /**\n   * Should we return only data or multiple fields (data, error, response, etc.)?\n   *\n   * @default 'fields'\n   */\n  responseStyle?: ResponseStyle;\n  /**\n   * Throw an error instead of returning it in the response?\n   *\n   * @default false\n   */\n  throwOnError?: T['throwOnError'];\n}\n\nexport interface RequestOptions<\n  TData = unknown,\n  TResponseStyle extends ResponseStyle = 'fields',\n  ThrowOnError extends boolean = boolean,\n  Url extends string = string,\n>\n  extends\n    Config<{\n      responseStyle: TResponseStyle;\n      throwOnError: ThrowOnError;\n    }>,\n    Pick<\n      ServerSentEventsOptions<TData>,\n      | 'onRequest'\n      | 'onSseError'\n      | 'onSseEvent'\n      | 'sseDefaultRetryDelay'\n      | 'sseMaxRetryAttempts'\n      | 'sseMaxRetryDelay'\n    > {\n  /**\n   * Any body that you want to add to your request.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/fetch#body}\n   */\n  body?: unknown;\n  path?: Record<string, unknown>;\n  query?: Record<string, unknown>;\n  /**\n   * Security mechanism(s) to use for the request.\n   */\n  security?: ReadonlyArray<Auth>;\n  url: Url;\n}\n\nexport interface ResolvedRequestOptions<\n  TResponseStyle extends ResponseStyle = 'fields',\n  ThrowOnError extends boolean = boolean,\n  Url extends string = string,\n> extends RequestOptions<unknown, TResponseStyle, ThrowOnError, Url> {\n  serializedBody?: string;\n}\n\nexport type RequestResult<\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = boolean,\n  TResponseStyle extends ResponseStyle = 'fields',\n> = ThrowOnError extends true\n  ? Promise<\n      TResponseStyle extends 'data'\n        ? TData extends Record<string, unknown>\n          ? TData[keyof TData]\n          : TData\n        : {\n            data: TData extends Record<string, unknown> ? TData[keyof TData] : TData;\n            request: Request;\n            response: Response;\n          }\n    >\n  : Promise<\n      TResponseStyle extends 'data'\n        ? (TData extends Record<string, unknown> ? TData[keyof TData] : TData) | undefined\n        : (\n            | {\n                data: TData extends Record<string, unknown> ? TData[keyof TData] : TData;\n                error: undefined;\n              }\n            | {\n                data: undefined;\n                error: TError extends Record<string, unknown> ? TError[keyof TError] : TError;\n              }\n          ) & {\n            request: Request;\n            response: Response;\n          }\n    >;\n\nexport interface ClientOptions {\n  baseUrl?: string;\n  responseStyle?: ResponseStyle;\n  throwOnError?: boolean;\n}\n\ntype MethodFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'>,\n) => RequestResult<TData, TError, ThrowOnError, TResponseStyle>;\n\ntype SseFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'>,\n) => Promise<ServerSentEventsResult<TData, TError>>;\n\ntype RequestFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'> &\n    Pick<Required<RequestOptions<TData, TResponseStyle, ThrowOnError>>, 'method'>,\n) => RequestResult<TData, TError, ThrowOnError, TResponseStyle>;\n\ntype BuildUrlFn = <\n  TData extends {\n    body?: unknown;\n    path?: Record<string, unknown>;\n    query?: Record<string, unknown>;\n    url: string;\n  },\n>(\n  options: TData & Options<TData>,\n) => string;\n\nexport type Client = CoreClient<RequestFn, Config, MethodFn, BuildUrlFn, SseFn> & {\n  interceptors: Middleware<Request, Response, unknown, ResolvedRequestOptions>;\n};\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 = ClientOptions> = (\n  override?: Config<ClientOptions & T>,\n) => Config<Required<ClientOptions> & T>;\n\nexport interface TDataShape {\n  body?: unknown;\n  headers?: unknown;\n  path?: unknown;\n  query?: unknown;\n  url: string;\n}\n\ntype OmitKeys<T, K> = Pick<T, Exclude<keyof T, K>>;\n\nexport type Options<\n  TData extends TDataShape = TDataShape,\n  ThrowOnError extends boolean = boolean,\n  TResponse = unknown,\n  TResponseStyle extends ResponseStyle = 'fields',\n> = OmitKeys<\n  RequestOptions<TResponse, TResponseStyle, ThrowOnError>,\n  'body' | 'path' | 'query' | 'url'\n> &\n  ([TData] extends [never] ? unknown : Omit<TData, 'url'>);\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/solid-query/name-builder/client/utils.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/solid-query/name-builder/client.gen.ts",
    "content": "// 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>());\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/solid-query/name-builder/core/auth.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/solid-query/name-builder/core/bodySerializer.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/solid-query/name-builder/core/params.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/solid-query/name-builder/core/pathSerializer.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/solid-query/name-builder/core/queryKeySerializer.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\n/**\n * JSON-friendly union that mirrors what Pinia Colada can hash.\n */\nexport type JsonValue =\n  | null\n  | string\n  | number\n  | boolean\n  | JsonValue[]\n  | { [key: string]: JsonValue };\n\n/**\n * Replacer that converts non-JSON values (bigint, Date, etc.) to safe substitutes.\n */\nexport const queryKeyJsonReplacer = (_key: string, value: unknown) => {\n  if (value === undefined || typeof value === 'function' || typeof value === 'symbol') {\n    return undefined;\n  }\n  if (typeof value === 'bigint') {\n    return value.toString();\n  }\n  if (value instanceof Date) {\n    return value.toISOString();\n  }\n  return value;\n};\n\n/**\n * Safely stringifies a value and parses it back into a JsonValue.\n */\nexport const stringifyToJsonValue = (input: unknown): JsonValue | undefined => {\n  try {\n    const json = JSON.stringify(input, queryKeyJsonReplacer);\n    if (json === undefined) {\n      return undefined;\n    }\n    return JSON.parse(json) as JsonValue;\n  } catch {\n    return undefined;\n  }\n};\n\n/**\n * Detects plain objects (including objects with a null prototype).\n */\nconst isPlainObject = (value: unknown): value is Record<string, unknown> => {\n  if (value === null || typeof value !== 'object') {\n    return false;\n  }\n  const prototype = Object.getPrototypeOf(value as object);\n  return prototype === Object.prototype || prototype === null;\n};\n\n/**\n * Turns URLSearchParams into a sorted JSON object for deterministic keys.\n */\nconst serializeSearchParams = (params: URLSearchParams): JsonValue => {\n  const entries = Array.from(params.entries()).sort(([a], [b]) => a.localeCompare(b));\n  const result: Record<string, JsonValue> = {};\n\n  for (const [key, value] of entries) {\n    const existing = result[key];\n    if (existing === undefined) {\n      result[key] = value;\n      continue;\n    }\n\n    if (Array.isArray(existing)) {\n      (existing as string[]).push(value);\n    } else {\n      result[key] = [existing, value];\n    }\n  }\n\n  return result;\n};\n\n/**\n * Normalizes any accepted value into a JSON-friendly shape for query keys.\n */\nexport const serializeQueryKeyValue = (value: unknown): JsonValue | undefined => {\n  if (value === null) {\n    return null;\n  }\n\n  if (typeof value === 'string' || typeof value === 'number' || typeof value === 'boolean') {\n    return value;\n  }\n\n  if (value === undefined || typeof value === 'function' || typeof value === 'symbol') {\n    return undefined;\n  }\n\n  if (typeof value === 'bigint') {\n    return value.toString();\n  }\n\n  if (value instanceof Date) {\n    return value.toISOString();\n  }\n\n  if (Array.isArray(value)) {\n    return stringifyToJsonValue(value);\n  }\n\n  if (typeof URLSearchParams !== 'undefined' && value instanceof URLSearchParams) {\n    return serializeSearchParams(value);\n  }\n\n  if (isPlainObject(value)) {\n    return stringifyToJsonValue(value);\n  }\n\n  return undefined;\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/solid-query/name-builder/core/serverSentEvents.gen.ts",
    "content": "// 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 const 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            // Normalize line endings: CRLF -> LF, then CR -> LF\n            buffer = buffer.replace(/\\r\\n/g, '\\n').replace(/\\r/g, '\\n');\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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/solid-query/name-builder/core/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { Auth, AuthToken } from './auth.gen';\nimport type { BodySerializer, QuerySerializer, QuerySerializerOptions } from './bodySerializer.gen';\n\nexport type HttpMethod =\n  | 'connect'\n  | 'delete'\n  | 'get'\n  | 'head'\n  | 'options'\n  | 'patch'\n  | 'post'\n  | 'put'\n  | 'trace';\n\nexport type Client<\n  RequestFn = never,\n  Config = unknown,\n  MethodFn = never,\n  BuildUrlFn = never,\n  SseFn = never,\n> = {\n  /**\n   * Returns the final request URL.\n   */\n  buildUrl: BuildUrlFn;\n  getConfig: () => Config;\n  request: RequestFn;\n  setConfig: (config: Config) => Config;\n} & {\n  [K in HttpMethod]: MethodFn;\n} & ([SseFn] extends [never] ? { sse?: never } : { sse: { [K in HttpMethod]: SseFn } });\n\nexport interface Config {\n  /**\n   * Auth token or a function returning auth token. The resolved value will be\n   * added to the request payload as defined by its `security` array.\n   */\n  auth?: ((auth: Auth) => Promise<AuthToken> | AuthToken) | AuthToken;\n  /**\n   * A function for serializing request body parameter. By default,\n   * {@link JSON.stringify()} will be used.\n   */\n  bodySerializer?: BodySerializer | null;\n  /**\n   * An object containing any HTTP headers that you want to pre-populate your\n   * `Headers` object with.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/Headers/Headers#init See more}\n   */\n  headers?:\n    | RequestInit['headers']\n    | Record<\n        string,\n        string | number | boolean | (string | number | boolean)[] | null | undefined | unknown\n      >;\n  /**\n   * The request method.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/fetch#method See more}\n   */\n  method?: Uppercase<HttpMethod>;\n  /**\n   * A function for serializing request query parameters. By default, arrays\n   * will be exploded in form style, objects will be exploded in deepObject\n   * style, and reserved characters are percent-encoded.\n   *\n   * This method will have no effect if the native `paramsSerializer()` Axios\n   * API function is used.\n   *\n   * {@link https://swagger.io/docs/specification/serialization/#query View examples}\n   */\n  querySerializer?: QuerySerializer | QuerySerializerOptions;\n  /**\n   * A function validating request data. This is useful if you want to ensure\n   * the request conforms to the desired shape, so it can be safely sent to\n   * the server.\n   */\n  requestValidator?: (data: unknown) => Promise<unknown>;\n  /**\n   * A function transforming response data before it's returned. This is useful\n   * for post-processing data, e.g. converting ISO strings into Date objects.\n   */\n  responseTransformer?: (data: unknown) => Promise<unknown>;\n  /**\n   * A function validating response data. This is useful if you want to ensure\n   * the response conforms to the desired shape, so it can be safely passed to\n   * the transformers and returned to the user.\n   */\n  responseValidator?: (data: unknown) => Promise<unknown>;\n}\n\ntype IsExactlyNeverOrNeverUndefined<T> = [T] extends [never]\n  ? true\n  : [T] extends [never | undefined]\n    ? [undefined] extends [T]\n      ? false\n      : true\n    : false;\n\nexport type OmitNever<T extends Record<string, unknown>> = {\n  [K in keyof T as IsExactlyNeverOrNeverUndefined<T[K]> extends true ? never : K]: T[K];\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/solid-query/name-builder/core/utils.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/solid-query/name-builder/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport { fooBarPost, fooBarPut, fooPost, fooPut, getFoo, getFooBar, type Options } from './sdk.gen';\nexport type { ClientOptions, FooBarPostData, FooBarPostResponse, FooBarPostResponses, FooBarPutData, FooBarPutResponse, FooBarPutResponses, FooPostData, FooPostResponse, FooPostResponses, FooPutData, FooPutResponse, FooPutResponses, GetFooBarData, GetFooBarResponse, GetFooBarResponses, GetFooData, GetFooResponse, GetFooResponses } from './types.gen';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/solid-query/name-builder/sdk.gen.ts",
    "content": "// 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 { FooBarPostData, FooBarPostResponses, FooBarPutData, FooBarPutResponses, FooPostData, FooPostResponses, FooPutData, FooPutResponses, GetFooBarData, GetFooBarResponses, GetFooData, GetFooResponses } from './types.gen';\n\nexport type Options<TData extends TDataShape = TDataShape, ThrowOnError extends boolean = boolean> = Options2<TData, ThrowOnError> & {\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\nexport const getFoo = <ThrowOnError extends boolean = false>(options?: Options<GetFooData, ThrowOnError>) => (options?.client ?? client).get<GetFooResponses, unknown, ThrowOnError>({ url: '/foo', ...options });\n\nexport const fooPost = <ThrowOnError extends boolean = false>(options?: Options<FooPostData, ThrowOnError>) => (options?.client ?? client).post<FooPostResponses, unknown, ThrowOnError>({ url: '/foo', ...options });\n\nexport const fooPut = <ThrowOnError extends boolean = false>(options?: Options<FooPutData, ThrowOnError>) => (options?.client ?? client).put<FooPutResponses, unknown, ThrowOnError>({ url: '/foo', ...options });\n\nexport const getFooBar = <ThrowOnError extends boolean = false>(options?: Options<GetFooBarData, ThrowOnError>) => (options?.client ?? client).get<GetFooBarResponses, unknown, ThrowOnError>({ url: '/foo/bar', ...options });\n\nexport const fooBarPost = <ThrowOnError extends boolean = false>(options?: Options<FooBarPostData, ThrowOnError>) => (options?.client ?? client).post<FooBarPostResponses, unknown, ThrowOnError>({ url: '/foo/bar', ...options });\n\nexport const fooBarPut = <ThrowOnError extends boolean = false>(options?: Options<FooBarPutData, ThrowOnError>) => (options?.client ?? client).put<FooBarPutResponses, unknown, ThrowOnError>({ url: '/foo/bar', ...options });\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/solid-query/name-builder/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type ClientOptions = {\n    baseUrl: string;\n};\n\nexport type GetFooData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/foo';\n};\n\nexport type GetFooResponses = {\n    /**\n     * OK\n     */\n    200: string;\n};\n\nexport type GetFooResponse = GetFooResponses[keyof GetFooResponses];\n\nexport type FooPostData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/foo';\n};\n\nexport type FooPostResponses = {\n    /**\n     * OK\n     */\n    200: string;\n};\n\nexport type FooPostResponse = FooPostResponses[keyof FooPostResponses];\n\nexport type FooPutData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/foo';\n};\n\nexport type FooPutResponses = {\n    /**\n     * OK\n     */\n    200: string;\n};\n\nexport type FooPutResponse = FooPutResponses[keyof FooPutResponses];\n\nexport type GetFooBarData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/foo/bar';\n};\n\nexport type GetFooBarResponses = {\n    /**\n     * OK\n     */\n    200: string;\n};\n\nexport type GetFooBarResponse = GetFooBarResponses[keyof GetFooBarResponses];\n\nexport type FooBarPostData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/foo/bar';\n};\n\nexport type FooBarPostResponses = {\n    /**\n     * OK\n     */\n    200: string;\n};\n\nexport type FooBarPostResponse = FooBarPostResponses[keyof FooBarPostResponses];\n\nexport type FooBarPutData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/foo/bar';\n};\n\nexport type FooBarPutResponses = {\n    /**\n     * OK\n     */\n    200: string;\n};\n\nexport type FooBarPutResponse = FooBarPutResponses[keyof FooBarPutResponses];\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/svelte-query/asClass/@tanstack/svelte-query.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport { type DefaultError, type MutationOptions, queryOptions } from '@tanstack/svelte-query';\n\nimport { client } from '../client.gen';\nimport { BarBazService, BarService, FooBazService, FooService, type Options } from '../sdk.gen';\nimport type { FooBarPostData, FooBarPostResponse, FooBarPutData, FooBarPutResponse, FooPostData, FooPostResponse, FooPutData, FooPutResponse, GetFooBarData, GetFooBarResponse, GetFooData, GetFooResponse } from '../types.gen';\n\nexport type QueryKey<TOptions extends Options> = [\n    Pick<TOptions, 'baseUrl' | 'body' | 'headers' | 'path' | 'query'> & {\n        _id: string;\n        _infinite?: boolean;\n        tags?: ReadonlyArray<string>;\n    }\n];\n\nconst createQueryKey = <TOptions extends Options>(id: string, options?: TOptions, infinite?: boolean, tags?: ReadonlyArray<string>): [\n    QueryKey<TOptions>[0]\n] => {\n    const params: QueryKey<TOptions>[0] = { _id: id, baseUrl: options?.baseUrl || (options?.client ?? client).getConfig().baseUrl } as QueryKey<TOptions>[0];\n    if (infinite) {\n        params._infinite = infinite;\n    }\n    if (tags) {\n        params.tags = tags;\n    }\n    if (options?.body) {\n        params.body = options.body;\n    }\n    if (options?.headers) {\n        params.headers = options.headers;\n    }\n    if (options?.path) {\n        params.path = options.path;\n    }\n    if (options?.query) {\n        params.query = options.query;\n    }\n    return [params];\n};\n\nexport const getFooQueryKey = (options?: Options<GetFooData>) => createQueryKey('getFoo', options);\n\nexport const getFooOptions = (options?: Options<GetFooData>) => queryOptions<GetFooResponse, DefaultError, GetFooResponse, ReturnType<typeof getFooQueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await FooBazService.getFoo({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: getFooQueryKey(options)\n});\n\nexport const fooPostMutation = (options?: Partial<Options<FooPostData>>): MutationOptions<FooPostResponse, DefaultError, Options<FooPostData>> => {\n    const mutationOptions: MutationOptions<FooPostResponse, DefaultError, Options<FooPostData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await FooService.post({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const fooPutMutation = (options?: Partial<Options<FooPutData>>): MutationOptions<FooPutResponse, DefaultError, Options<FooPutData>> => {\n    const mutationOptions: MutationOptions<FooPutResponse, DefaultError, Options<FooPutData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await FooService.put({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const getFooBarQueryKey = (options?: Options<GetFooBarData>) => createQueryKey('getFooBar', options);\n\nexport const getFooBarOptions = (options?: Options<GetFooBarData>) => queryOptions<GetFooBarResponse, DefaultError, GetFooBarResponse, ReturnType<typeof getFooBarQueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await BarBazService.getFooBar({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: getFooBarQueryKey(options)\n});\n\nexport const fooBarPostMutation = (options?: Partial<Options<FooBarPostData>>): MutationOptions<FooBarPostResponse, DefaultError, Options<FooBarPostData>> => {\n    const mutationOptions: MutationOptions<FooBarPostResponse, DefaultError, Options<FooBarPostData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await BarService.post({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const fooBarPutMutation = (options?: Partial<Options<FooBarPutData>>): MutationOptions<FooBarPutResponse, DefaultError, Options<FooBarPutData>> => {\n    const mutationOptions: MutationOptions<FooBarPutResponse, DefaultError, Options<FooBarPutData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await BarService.put({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/svelte-query/asClass/client/client.gen.ts",
    "content": "// 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 (options: RequestOptions) => {\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 url = buildUrl(opts);\n\n    return { opts, url };\n  };\n\n  const request: Client['request'] = async (options) => {\n    // @ts-expect-error\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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/svelte-query/asClass/client/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type { Auth } from '../core/auth.gen';\nexport type { QuerySerializerOptions } from '../core/bodySerializer.gen';\nexport {\n  formDataBodySerializer,\n  jsonBodySerializer,\n  urlSearchParamsBodySerializer,\n} from '../core/bodySerializer.gen';\nexport { buildClientParams } from '../core/params.gen';\nexport { serializeQueryKeyValue } from '../core/queryKeySerializer.gen';\nexport { createClient } from './client.gen';\nexport type {\n  Client,\n  ClientOptions,\n  Config,\n  CreateClientConfig,\n  Options,\n  RequestOptions,\n  RequestResult,\n  ResolvedRequestOptions,\n  ResponseStyle,\n  TDataShape,\n} from './types.gen';\nexport { createConfig, mergeHeaders } from './utils.gen';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/svelte-query/asClass/client/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { Auth } from '../core/auth.gen';\nimport type {\n  ServerSentEventsOptions,\n  ServerSentEventsResult,\n} from '../core/serverSentEvents.gen';\nimport type { Client as CoreClient, Config as CoreConfig } from '../core/types.gen';\nimport type { Middleware } from './utils.gen';\n\nexport type ResponseStyle = 'data' | 'fields';\n\nexport interface Config<T extends ClientOptions = ClientOptions>\n  extends Omit<RequestInit, 'body' | 'headers' | 'method'>, CoreConfig {\n  /**\n   * Base URL for all requests made by this client.\n   */\n  baseUrl?: T['baseUrl'];\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   * Please don't use the Fetch client for Next.js applications. The `next`\n   * options won't have any effect.\n   *\n   * Install {@link https://www.npmjs.com/package/@hey-api/client-next `@hey-api/client-next`} instead.\n   */\n  next?: never;\n  /**\n   * Return the response data parsed in a specified format. By default, `auto`\n   * will infer the appropriate method from the `Content-Type` response header.\n   * You can override this behavior with any of the {@link Body} methods.\n   * Select `stream` if you don't want to parse response data at all.\n   *\n   * @default 'auto'\n   */\n  parseAs?: 'arrayBuffer' | 'auto' | 'blob' | 'formData' | 'json' | 'stream' | 'text';\n  /**\n   * Should we return only data or multiple fields (data, error, response, etc.)?\n   *\n   * @default 'fields'\n   */\n  responseStyle?: ResponseStyle;\n  /**\n   * Throw an error instead of returning it in the response?\n   *\n   * @default false\n   */\n  throwOnError?: T['throwOnError'];\n}\n\nexport interface RequestOptions<\n  TData = unknown,\n  TResponseStyle extends ResponseStyle = 'fields',\n  ThrowOnError extends boolean = boolean,\n  Url extends string = string,\n>\n  extends\n    Config<{\n      responseStyle: TResponseStyle;\n      throwOnError: ThrowOnError;\n    }>,\n    Pick<\n      ServerSentEventsOptions<TData>,\n      | 'onRequest'\n      | 'onSseError'\n      | 'onSseEvent'\n      | 'sseDefaultRetryDelay'\n      | 'sseMaxRetryAttempts'\n      | 'sseMaxRetryDelay'\n    > {\n  /**\n   * Any body that you want to add to your request.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/fetch#body}\n   */\n  body?: unknown;\n  path?: Record<string, unknown>;\n  query?: Record<string, unknown>;\n  /**\n   * Security mechanism(s) to use for the request.\n   */\n  security?: ReadonlyArray<Auth>;\n  url: Url;\n}\n\nexport interface ResolvedRequestOptions<\n  TResponseStyle extends ResponseStyle = 'fields',\n  ThrowOnError extends boolean = boolean,\n  Url extends string = string,\n> extends RequestOptions<unknown, TResponseStyle, ThrowOnError, Url> {\n  serializedBody?: string;\n}\n\nexport type RequestResult<\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = boolean,\n  TResponseStyle extends ResponseStyle = 'fields',\n> = ThrowOnError extends true\n  ? Promise<\n      TResponseStyle extends 'data'\n        ? TData extends Record<string, unknown>\n          ? TData[keyof TData]\n          : TData\n        : {\n            data: TData extends Record<string, unknown> ? TData[keyof TData] : TData;\n            request: Request;\n            response: Response;\n          }\n    >\n  : Promise<\n      TResponseStyle extends 'data'\n        ? (TData extends Record<string, unknown> ? TData[keyof TData] : TData) | undefined\n        : (\n            | {\n                data: TData extends Record<string, unknown> ? TData[keyof TData] : TData;\n                error: undefined;\n              }\n            | {\n                data: undefined;\n                error: TError extends Record<string, unknown> ? TError[keyof TError] : TError;\n              }\n          ) & {\n            request: Request;\n            response: Response;\n          }\n    >;\n\nexport interface ClientOptions {\n  baseUrl?: string;\n  responseStyle?: ResponseStyle;\n  throwOnError?: boolean;\n}\n\ntype MethodFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'>,\n) => RequestResult<TData, TError, ThrowOnError, TResponseStyle>;\n\ntype SseFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'>,\n) => Promise<ServerSentEventsResult<TData, TError>>;\n\ntype RequestFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'> &\n    Pick<Required<RequestOptions<TData, TResponseStyle, ThrowOnError>>, 'method'>,\n) => RequestResult<TData, TError, ThrowOnError, TResponseStyle>;\n\ntype BuildUrlFn = <\n  TData extends {\n    body?: unknown;\n    path?: Record<string, unknown>;\n    query?: Record<string, unknown>;\n    url: string;\n  },\n>(\n  options: TData & Options<TData>,\n) => string;\n\nexport type Client = CoreClient<RequestFn, Config, MethodFn, BuildUrlFn, SseFn> & {\n  interceptors: Middleware<Request, Response, unknown, ResolvedRequestOptions>;\n};\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 = ClientOptions> = (\n  override?: Config<ClientOptions & T>,\n) => Config<Required<ClientOptions> & T>;\n\nexport interface TDataShape {\n  body?: unknown;\n  headers?: unknown;\n  path?: unknown;\n  query?: unknown;\n  url: string;\n}\n\ntype OmitKeys<T, K> = Pick<T, Exclude<keyof T, K>>;\n\nexport type Options<\n  TData extends TDataShape = TDataShape,\n  ThrowOnError extends boolean = boolean,\n  TResponse = unknown,\n  TResponseStyle extends ResponseStyle = 'fields',\n> = OmitKeys<\n  RequestOptions<TResponse, TResponseStyle, ThrowOnError>,\n  'body' | 'path' | 'query' | 'url'\n> &\n  ([TData] extends [never] ? unknown : Omit<TData, 'url'>);\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/svelte-query/asClass/client/utils.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/svelte-query/asClass/client.gen.ts",
    "content": "// 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>());\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/svelte-query/asClass/core/auth.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/svelte-query/asClass/core/bodySerializer.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/svelte-query/asClass/core/params.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/svelte-query/asClass/core/pathSerializer.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/svelte-query/asClass/core/queryKeySerializer.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\n/**\n * JSON-friendly union that mirrors what Pinia Colada can hash.\n */\nexport type JsonValue =\n  | null\n  | string\n  | number\n  | boolean\n  | JsonValue[]\n  | { [key: string]: JsonValue };\n\n/**\n * Replacer that converts non-JSON values (bigint, Date, etc.) to safe substitutes.\n */\nexport const queryKeyJsonReplacer = (_key: string, value: unknown) => {\n  if (value === undefined || typeof value === 'function' || typeof value === 'symbol') {\n    return undefined;\n  }\n  if (typeof value === 'bigint') {\n    return value.toString();\n  }\n  if (value instanceof Date) {\n    return value.toISOString();\n  }\n  return value;\n};\n\n/**\n * Safely stringifies a value and parses it back into a JsonValue.\n */\nexport const stringifyToJsonValue = (input: unknown): JsonValue | undefined => {\n  try {\n    const json = JSON.stringify(input, queryKeyJsonReplacer);\n    if (json === undefined) {\n      return undefined;\n    }\n    return JSON.parse(json) as JsonValue;\n  } catch {\n    return undefined;\n  }\n};\n\n/**\n * Detects plain objects (including objects with a null prototype).\n */\nconst isPlainObject = (value: unknown): value is Record<string, unknown> => {\n  if (value === null || typeof value !== 'object') {\n    return false;\n  }\n  const prototype = Object.getPrototypeOf(value as object);\n  return prototype === Object.prototype || prototype === null;\n};\n\n/**\n * Turns URLSearchParams into a sorted JSON object for deterministic keys.\n */\nconst serializeSearchParams = (params: URLSearchParams): JsonValue => {\n  const entries = Array.from(params.entries()).sort(([a], [b]) => a.localeCompare(b));\n  const result: Record<string, JsonValue> = {};\n\n  for (const [key, value] of entries) {\n    const existing = result[key];\n    if (existing === undefined) {\n      result[key] = value;\n      continue;\n    }\n\n    if (Array.isArray(existing)) {\n      (existing as string[]).push(value);\n    } else {\n      result[key] = [existing, value];\n    }\n  }\n\n  return result;\n};\n\n/**\n * Normalizes any accepted value into a JSON-friendly shape for query keys.\n */\nexport const serializeQueryKeyValue = (value: unknown): JsonValue | undefined => {\n  if (value === null) {\n    return null;\n  }\n\n  if (typeof value === 'string' || typeof value === 'number' || typeof value === 'boolean') {\n    return value;\n  }\n\n  if (value === undefined || typeof value === 'function' || typeof value === 'symbol') {\n    return undefined;\n  }\n\n  if (typeof value === 'bigint') {\n    return value.toString();\n  }\n\n  if (value instanceof Date) {\n    return value.toISOString();\n  }\n\n  if (Array.isArray(value)) {\n    return stringifyToJsonValue(value);\n  }\n\n  if (typeof URLSearchParams !== 'undefined' && value instanceof URLSearchParams) {\n    return serializeSearchParams(value);\n  }\n\n  if (isPlainObject(value)) {\n    return stringifyToJsonValue(value);\n  }\n\n  return undefined;\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/svelte-query/asClass/core/serverSentEvents.gen.ts",
    "content": "// 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 const 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            // Normalize line endings: CRLF -> LF, then CR -> LF\n            buffer = buffer.replace(/\\r\\n/g, '\\n').replace(/\\r/g, '\\n');\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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/svelte-query/asClass/core/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { Auth, AuthToken } from './auth.gen';\nimport type { BodySerializer, QuerySerializer, QuerySerializerOptions } from './bodySerializer.gen';\n\nexport type HttpMethod =\n  | 'connect'\n  | 'delete'\n  | 'get'\n  | 'head'\n  | 'options'\n  | 'patch'\n  | 'post'\n  | 'put'\n  | 'trace';\n\nexport type Client<\n  RequestFn = never,\n  Config = unknown,\n  MethodFn = never,\n  BuildUrlFn = never,\n  SseFn = never,\n> = {\n  /**\n   * Returns the final request URL.\n   */\n  buildUrl: BuildUrlFn;\n  getConfig: () => Config;\n  request: RequestFn;\n  setConfig: (config: Config) => Config;\n} & {\n  [K in HttpMethod]: MethodFn;\n} & ([SseFn] extends [never] ? { sse?: never } : { sse: { [K in HttpMethod]: SseFn } });\n\nexport interface Config {\n  /**\n   * Auth token or a function returning auth token. The resolved value will be\n   * added to the request payload as defined by its `security` array.\n   */\n  auth?: ((auth: Auth) => Promise<AuthToken> | AuthToken) | AuthToken;\n  /**\n   * A function for serializing request body parameter. By default,\n   * {@link JSON.stringify()} will be used.\n   */\n  bodySerializer?: BodySerializer | null;\n  /**\n   * An object containing any HTTP headers that you want to pre-populate your\n   * `Headers` object with.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/Headers/Headers#init See more}\n   */\n  headers?:\n    | RequestInit['headers']\n    | Record<\n        string,\n        string | number | boolean | (string | number | boolean)[] | null | undefined | unknown\n      >;\n  /**\n   * The request method.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/fetch#method See more}\n   */\n  method?: Uppercase<HttpMethod>;\n  /**\n   * A function for serializing request query parameters. By default, arrays\n   * will be exploded in form style, objects will be exploded in deepObject\n   * style, and reserved characters are percent-encoded.\n   *\n   * This method will have no effect if the native `paramsSerializer()` Axios\n   * API function is used.\n   *\n   * {@link https://swagger.io/docs/specification/serialization/#query View examples}\n   */\n  querySerializer?: QuerySerializer | QuerySerializerOptions;\n  /**\n   * A function validating request data. This is useful if you want to ensure\n   * the request conforms to the desired shape, so it can be safely sent to\n   * the server.\n   */\n  requestValidator?: (data: unknown) => Promise<unknown>;\n  /**\n   * A function transforming response data before it's returned. This is useful\n   * for post-processing data, e.g. converting ISO strings into Date objects.\n   */\n  responseTransformer?: (data: unknown) => Promise<unknown>;\n  /**\n   * A function validating response data. This is useful if you want to ensure\n   * the response conforms to the desired shape, so it can be safely passed to\n   * the transformers and returned to the user.\n   */\n  responseValidator?: (data: unknown) => Promise<unknown>;\n}\n\ntype IsExactlyNeverOrNeverUndefined<T> = [T] extends [never]\n  ? true\n  : [T] extends [never | undefined]\n    ? [undefined] extends [T]\n      ? false\n      : true\n    : false;\n\nexport type OmitNever<T extends Record<string, unknown>> = {\n  [K in keyof T as IsExactlyNeverOrNeverUndefined<T[K]> extends true ? never : K]: T[K];\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/svelte-query/asClass/core/utils.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/svelte-query/asClass/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport { BarBazService, BarService, BarService2, FooBazService, FooService, FooService2, type Options } from './sdk.gen';\nexport type { ClientOptions, FooBarPostData, FooBarPostResponse, FooBarPostResponses, FooBarPutData, FooBarPutResponse, FooBarPutResponses, FooPostData, FooPostResponse, FooPostResponses, FooPutData, FooPutResponse, FooPutResponses, GetFooBarData, GetFooBarResponse, GetFooBarResponses, GetFooData, GetFooResponse, GetFooResponses } from './types.gen';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/svelte-query/asClass/sdk.gen.ts",
    "content": "// 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 { FooBarPostData, FooBarPostResponses, FooBarPutData, FooBarPutResponses, FooPostData, FooPostResponses, FooPutData, FooPutResponses, GetFooBarData, GetFooBarResponses, GetFooData, GetFooResponses } from './types.gen';\n\nexport type Options<TData extends TDataShape = TDataShape, ThrowOnError extends boolean = boolean> = Options2<TData, ThrowOnError> & {\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\nexport class BarService {\n    public static post<ThrowOnError extends boolean = false>(options?: Options<FooBarPostData, ThrowOnError>) {\n        return (options?.client ?? client).post<FooBarPostResponses, unknown, ThrowOnError>({ url: '/foo/bar', ...options });\n    }\n    \n    public static put<ThrowOnError extends boolean = false>(options?: Options<FooBarPutData, ThrowOnError>) {\n        return (options?.client ?? client).put<FooBarPutResponses, unknown, ThrowOnError>({ url: '/foo/bar', ...options });\n    }\n}\n\nexport class FooService {\n    public static post<ThrowOnError extends boolean = false>(options?: Options<FooPostData, ThrowOnError>) {\n        return (options?.client ?? client).post<FooPostResponses, unknown, ThrowOnError>({ url: '/foo', ...options });\n    }\n    \n    public static put<ThrowOnError extends boolean = false>(options?: Options<FooPutData, ThrowOnError>) {\n        return (options?.client ?? client).put<FooPutResponses, unknown, ThrowOnError>({ url: '/foo', ...options });\n    }\n    \n    static barService = BarService;\n}\n\nexport class FooBazService {\n    public static getFoo<ThrowOnError extends boolean = false>(options?: Options<GetFooData, ThrowOnError>) {\n        return (options?.client ?? client).get<GetFooResponses, unknown, ThrowOnError>({ url: '/foo', ...options });\n    }\n    \n    static fooService = FooService;\n}\n\nexport class BarService2 {\n    public static post<ThrowOnError extends boolean = false>(options?: Options<FooBarPostData, ThrowOnError>) {\n        return (options?.client ?? client).post<FooBarPostResponses, unknown, ThrowOnError>({ url: '/foo/bar', ...options });\n    }\n    \n    public static put<ThrowOnError extends boolean = false>(options?: Options<FooBarPutData, ThrowOnError>) {\n        return (options?.client ?? client).put<FooBarPutResponses, unknown, ThrowOnError>({ url: '/foo/bar', ...options });\n    }\n}\n\nexport class FooService2 {\n    static barService = BarService2;\n}\n\nexport class BarBazService {\n    public static getFooBar<ThrowOnError extends boolean = false>(options?: Options<GetFooBarData, ThrowOnError>) {\n        return (options?.client ?? client).get<GetFooBarResponses, unknown, ThrowOnError>({ url: '/foo/bar', ...options });\n    }\n    \n    static fooService = FooService2;\n}\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/svelte-query/asClass/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type ClientOptions = {\n    baseUrl: string;\n};\n\nexport type GetFooData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/foo';\n};\n\nexport type GetFooResponses = {\n    /**\n     * OK\n     */\n    200: string;\n};\n\nexport type GetFooResponse = GetFooResponses[keyof GetFooResponses];\n\nexport type FooPostData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/foo';\n};\n\nexport type FooPostResponses = {\n    /**\n     * OK\n     */\n    200: string;\n};\n\nexport type FooPostResponse = FooPostResponses[keyof FooPostResponses];\n\nexport type FooPutData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/foo';\n};\n\nexport type FooPutResponses = {\n    /**\n     * OK\n     */\n    200: string;\n};\n\nexport type FooPutResponse = FooPutResponses[keyof FooPutResponses];\n\nexport type GetFooBarData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/foo/bar';\n};\n\nexport type GetFooBarResponses = {\n    /**\n     * OK\n     */\n    200: string;\n};\n\nexport type GetFooBarResponse = GetFooBarResponses[keyof GetFooBarResponses];\n\nexport type FooBarPostData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/foo/bar';\n};\n\nexport type FooBarPostResponses = {\n    /**\n     * OK\n     */\n    200: string;\n};\n\nexport type FooBarPostResponse = FooBarPostResponses[keyof FooBarPostResponses];\n\nexport type FooBarPutData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/foo/bar';\n};\n\nexport type FooBarPutResponses = {\n    /**\n     * OK\n     */\n    200: string;\n};\n\nexport type FooBarPutResponse = FooBarPutResponses[keyof FooBarPutResponses];\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/svelte-query/axios/@tanstack/svelte-query.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport { type DefaultError, type MutationOptions, queryOptions } from '@tanstack/svelte-query';\nimport type { AxiosError } from 'axios';\n\nimport { client } from '../client.gen';\nimport { callToTestOrderOfParams, callWithDefaultOptionalParameters, callWithDefaultParameters, callWithDescriptions, callWithDuplicateResponses, callWithNoContentResponse, callWithParameters, callWithResponse, callWithResponseAndNoContentResponse, callWithResponses, callWithResultFromHeader, callWithWeirdParameterNames, collectionFormat, complexTypes, deleteCallWithoutParametersAndResponse, dummyA, dummyB, duplicateName, duplicateName2, duplicateName3, duplicateName4, fooWow, getCallWithoutParametersAndResponse, nonAsciiæøåÆøÅöôêÊ字符串, type Options, patchApiVbyApiVersionNoTag, patchCallWithoutParametersAndResponse, postApiVbyApiVersionBody, postCallWithoutParametersAndResponse, putCallWithoutParametersAndResponse, serviceWithEmptyTag, testErrorCode, types } from '../sdk.gen';\nimport type { CallToTestOrderOfParamsData, CallWithDefaultOptionalParametersData, CallWithDefaultParametersData, CallWithDescriptionsData, CallWithDuplicateResponsesData, CallWithDuplicateResponsesError, CallWithDuplicateResponsesResponse, CallWithNoContentResponseData, CallWithParametersData, CallWithResponseAndNoContentResponseData, CallWithResponseAndNoContentResponseResponse, CallWithResponseData, CallWithResponseResponse, CallWithResponsesData, CallWithResponsesError, CallWithResponsesResponse, CallWithResultFromHeaderData, CallWithWeirdParameterNamesData, CollectionFormatData, ComplexTypesData, ComplexTypesResponse, DeleteCallWithoutParametersAndResponseData, DummyAData, DummyBData, DuplicateName2Data, DuplicateName3Data, DuplicateName4Data, DuplicateNameData, FooWowData, GetCallWithoutParametersAndResponseData, NonAsciiæøåÆøÅöôêÊ字符串Data, NonAsciiæøåÆøÅöôêÊ字符串Response, PatchApiVbyApiVersionNoTagData, PatchCallWithoutParametersAndResponseData, PostApiVbyApiVersionBodyData, PostApiVbyApiVersionBodyError, PostApiVbyApiVersionBodyResponse, PostCallWithoutParametersAndResponseData, PutCallWithoutParametersAndResponseData, ServiceWithEmptyTagData, TestErrorCodeData, TypesData, TypesResponse } from '../types.gen';\n\nexport type QueryKey<TOptions extends Options> = [\n    Pick<TOptions, 'baseURL' | 'body' | 'headers' | 'path' | 'query'> & {\n        _id: string;\n        _infinite?: boolean;\n        tags?: ReadonlyArray<string>;\n    }\n];\n\nconst createQueryKey = <TOptions extends Options>(id: string, options?: TOptions, infinite?: boolean, tags?: ReadonlyArray<string>): [\n    QueryKey<TOptions>[0]\n] => {\n    const params: QueryKey<TOptions>[0] = { _id: id, baseURL: options?.baseURL || (options?.client ?? client).getConfig().baseURL } as QueryKey<TOptions>[0];\n    if (infinite) {\n        params._infinite = infinite;\n    }\n    if (tags) {\n        params.tags = tags;\n    }\n    if (options?.body) {\n        params.body = options.body;\n    }\n    if (options?.headers) {\n        params.headers = options.headers;\n    }\n    if (options?.path) {\n        params.path = options.path;\n    }\n    if (options?.query) {\n        params.query = options.query;\n    }\n    return [params];\n};\n\nexport const serviceWithEmptyTagQueryKey = (options?: Options<ServiceWithEmptyTagData>) => createQueryKey('serviceWithEmptyTag', options);\n\nexport const serviceWithEmptyTagOptions = (options?: Options<ServiceWithEmptyTagData>) => queryOptions<unknown, AxiosError<DefaultError>, unknown, ReturnType<typeof serviceWithEmptyTagQueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await serviceWithEmptyTag({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: serviceWithEmptyTagQueryKey(options)\n});\n\nexport const patchApiVbyApiVersionNoTagMutation = (options?: Partial<Options<PatchApiVbyApiVersionNoTagData>>): MutationOptions<unknown, AxiosError<DefaultError>, Options<PatchApiVbyApiVersionNoTagData>> => {\n    const mutationOptions: MutationOptions<unknown, AxiosError<DefaultError>, Options<PatchApiVbyApiVersionNoTagData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await patchApiVbyApiVersionNoTag({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const fooWowMutation = (options?: Partial<Options<FooWowData>>): MutationOptions<unknown, AxiosError<DefaultError>, Options<FooWowData>> => {\n    const mutationOptions: MutationOptions<unknown, AxiosError<DefaultError>, Options<FooWowData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await fooWow({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const deleteCallWithoutParametersAndResponseMutation = (options?: Partial<Options<DeleteCallWithoutParametersAndResponseData>>): MutationOptions<unknown, AxiosError<DefaultError>, Options<DeleteCallWithoutParametersAndResponseData>> => {\n    const mutationOptions: MutationOptions<unknown, AxiosError<DefaultError>, Options<DeleteCallWithoutParametersAndResponseData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await deleteCallWithoutParametersAndResponse({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const getCallWithoutParametersAndResponseQueryKey = (options?: Options<GetCallWithoutParametersAndResponseData>) => createQueryKey('getCallWithoutParametersAndResponse', options);\n\nexport const getCallWithoutParametersAndResponseOptions = (options?: Options<GetCallWithoutParametersAndResponseData>) => queryOptions<unknown, AxiosError<DefaultError>, unknown, ReturnType<typeof getCallWithoutParametersAndResponseQueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await getCallWithoutParametersAndResponse({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: getCallWithoutParametersAndResponseQueryKey(options)\n});\n\nexport const patchCallWithoutParametersAndResponseMutation = (options?: Partial<Options<PatchCallWithoutParametersAndResponseData>>): MutationOptions<unknown, AxiosError<DefaultError>, Options<PatchCallWithoutParametersAndResponseData>> => {\n    const mutationOptions: MutationOptions<unknown, AxiosError<DefaultError>, Options<PatchCallWithoutParametersAndResponseData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await patchCallWithoutParametersAndResponse({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const postCallWithoutParametersAndResponseMutation = (options?: Partial<Options<PostCallWithoutParametersAndResponseData>>): MutationOptions<unknown, AxiosError<DefaultError>, Options<PostCallWithoutParametersAndResponseData>> => {\n    const mutationOptions: MutationOptions<unknown, AxiosError<DefaultError>, Options<PostCallWithoutParametersAndResponseData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await postCallWithoutParametersAndResponse({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const putCallWithoutParametersAndResponseMutation = (options?: Partial<Options<PutCallWithoutParametersAndResponseData>>): MutationOptions<unknown, AxiosError<DefaultError>, Options<PutCallWithoutParametersAndResponseData>> => {\n    const mutationOptions: MutationOptions<unknown, AxiosError<DefaultError>, Options<PutCallWithoutParametersAndResponseData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await putCallWithoutParametersAndResponse({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const callWithDescriptionsMutation = (options?: Partial<Options<CallWithDescriptionsData>>): MutationOptions<unknown, AxiosError<DefaultError>, Options<CallWithDescriptionsData>> => {\n    const mutationOptions: MutationOptions<unknown, AxiosError<DefaultError>, Options<CallWithDescriptionsData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await callWithDescriptions({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const callWithParametersMutation = (options?: Partial<Options<CallWithParametersData>>): MutationOptions<unknown, AxiosError<DefaultError>, Options<CallWithParametersData>> => {\n    const mutationOptions: MutationOptions<unknown, AxiosError<DefaultError>, Options<CallWithParametersData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await callWithParameters({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const callWithWeirdParameterNamesMutation = (options?: Partial<Options<CallWithWeirdParameterNamesData>>): MutationOptions<unknown, AxiosError<DefaultError>, Options<CallWithWeirdParameterNamesData>> => {\n    const mutationOptions: MutationOptions<unknown, AxiosError<DefaultError>, Options<CallWithWeirdParameterNamesData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await callWithWeirdParameterNames({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const callWithDefaultParametersQueryKey = (options: Options<CallWithDefaultParametersData>) => createQueryKey('callWithDefaultParameters', options);\n\nexport const callWithDefaultParametersOptions = (options: Options<CallWithDefaultParametersData>) => queryOptions<unknown, AxiosError<DefaultError>, unknown, ReturnType<typeof callWithDefaultParametersQueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await callWithDefaultParameters({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: callWithDefaultParametersQueryKey(options)\n});\n\nexport const callWithDefaultOptionalParametersMutation = (options?: Partial<Options<CallWithDefaultOptionalParametersData>>): MutationOptions<unknown, AxiosError<DefaultError>, Options<CallWithDefaultOptionalParametersData>> => {\n    const mutationOptions: MutationOptions<unknown, AxiosError<DefaultError>, Options<CallWithDefaultOptionalParametersData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await callWithDefaultOptionalParameters({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const callToTestOrderOfParamsMutation = (options?: Partial<Options<CallToTestOrderOfParamsData>>): MutationOptions<unknown, AxiosError<DefaultError>, Options<CallToTestOrderOfParamsData>> => {\n    const mutationOptions: MutationOptions<unknown, AxiosError<DefaultError>, Options<CallToTestOrderOfParamsData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await callToTestOrderOfParams({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const duplicateNameMutation = (options?: Partial<Options<DuplicateNameData>>): MutationOptions<unknown, AxiosError<DefaultError>, Options<DuplicateNameData>> => {\n    const mutationOptions: MutationOptions<unknown, AxiosError<DefaultError>, Options<DuplicateNameData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await duplicateName({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const duplicateName2QueryKey = (options?: Options<DuplicateName2Data>) => createQueryKey('duplicateName2', options);\n\nexport const duplicateName2Options = (options?: Options<DuplicateName2Data>) => queryOptions<unknown, AxiosError<DefaultError>, unknown, ReturnType<typeof duplicateName2QueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await duplicateName2({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: duplicateName2QueryKey(options)\n});\n\nexport const duplicateName3Mutation = (options?: Partial<Options<DuplicateName3Data>>): MutationOptions<unknown, AxiosError<DefaultError>, Options<DuplicateName3Data>> => {\n    const mutationOptions: MutationOptions<unknown, AxiosError<DefaultError>, Options<DuplicateName3Data>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await duplicateName3({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const duplicateName4Mutation = (options?: Partial<Options<DuplicateName4Data>>): MutationOptions<unknown, AxiosError<DefaultError>, Options<DuplicateName4Data>> => {\n    const mutationOptions: MutationOptions<unknown, AxiosError<DefaultError>, Options<DuplicateName4Data>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await duplicateName4({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const callWithNoContentResponseQueryKey = (options?: Options<CallWithNoContentResponseData>) => createQueryKey('callWithNoContentResponse', options);\n\nexport const callWithNoContentResponseOptions = (options?: Options<CallWithNoContentResponseData>) => queryOptions<unknown, AxiosError<DefaultError>, unknown, ReturnType<typeof callWithNoContentResponseQueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await callWithNoContentResponse({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: callWithNoContentResponseQueryKey(options)\n});\n\nexport const callWithResponseAndNoContentResponseQueryKey = (options?: Options<CallWithResponseAndNoContentResponseData>) => createQueryKey('callWithResponseAndNoContentResponse', options);\n\nexport const callWithResponseAndNoContentResponseOptions = (options?: Options<CallWithResponseAndNoContentResponseData>) => queryOptions<CallWithResponseAndNoContentResponseResponse, AxiosError<DefaultError>, CallWithResponseAndNoContentResponseResponse, ReturnType<typeof callWithResponseAndNoContentResponseQueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await callWithResponseAndNoContentResponse({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: callWithResponseAndNoContentResponseQueryKey(options)\n});\n\nexport const dummyAQueryKey = (options?: Options<DummyAData>) => createQueryKey('dummyA', options);\n\nexport const dummyAOptions = (options?: Options<DummyAData>) => queryOptions<unknown, AxiosError<DefaultError>, unknown, ReturnType<typeof dummyAQueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await dummyA({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: dummyAQueryKey(options)\n});\n\nexport const dummyBQueryKey = (options?: Options<DummyBData>) => createQueryKey('dummyB', options);\n\nexport const dummyBOptions = (options?: Options<DummyBData>) => queryOptions<unknown, AxiosError<DefaultError>, unknown, ReturnType<typeof dummyBQueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await dummyB({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: dummyBQueryKey(options)\n});\n\nexport const callWithResponseQueryKey = (options?: Options<CallWithResponseData>) => createQueryKey('callWithResponse', options);\n\nexport const callWithResponseOptions = (options?: Options<CallWithResponseData>) => queryOptions<CallWithResponseResponse, AxiosError<DefaultError>, CallWithResponseResponse, ReturnType<typeof callWithResponseQueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await callWithResponse({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: callWithResponseQueryKey(options)\n});\n\nexport const callWithDuplicateResponsesMutation = (options?: Partial<Options<CallWithDuplicateResponsesData>>): MutationOptions<CallWithDuplicateResponsesResponse, AxiosError<CallWithDuplicateResponsesError>, Options<CallWithDuplicateResponsesData>> => {\n    const mutationOptions: MutationOptions<CallWithDuplicateResponsesResponse, AxiosError<CallWithDuplicateResponsesError>, Options<CallWithDuplicateResponsesData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await callWithDuplicateResponses({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const callWithResponsesMutation = (options?: Partial<Options<CallWithResponsesData>>): MutationOptions<CallWithResponsesResponse, AxiosError<CallWithResponsesError>, Options<CallWithResponsesData>> => {\n    const mutationOptions: MutationOptions<CallWithResponsesResponse, AxiosError<CallWithResponsesError>, Options<CallWithResponsesData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await callWithResponses({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const collectionFormatQueryKey = (options: Options<CollectionFormatData>) => createQueryKey('collectionFormat', options);\n\nexport const collectionFormatOptions = (options: Options<CollectionFormatData>) => queryOptions<unknown, AxiosError<DefaultError>, unknown, ReturnType<typeof collectionFormatQueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await collectionFormat({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: collectionFormatQueryKey(options)\n});\n\nexport const typesQueryKey = (options: Options<TypesData>) => createQueryKey('types', options);\n\nexport const typesOptions = (options: Options<TypesData>) => queryOptions<TypesResponse, AxiosError<DefaultError>, TypesResponse, ReturnType<typeof typesQueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await types({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: typesQueryKey(options)\n});\n\nexport const complexTypesQueryKey = (options: Options<ComplexTypesData>) => createQueryKey('complexTypes', options);\n\nexport const complexTypesOptions = (options: Options<ComplexTypesData>) => queryOptions<ComplexTypesResponse, AxiosError<DefaultError>, ComplexTypesResponse, ReturnType<typeof complexTypesQueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await complexTypes({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: complexTypesQueryKey(options)\n});\n\nexport const callWithResultFromHeaderMutation = (options?: Partial<Options<CallWithResultFromHeaderData>>): MutationOptions<unknown, AxiosError<DefaultError>, Options<CallWithResultFromHeaderData>> => {\n    const mutationOptions: MutationOptions<unknown, AxiosError<DefaultError>, Options<CallWithResultFromHeaderData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await callWithResultFromHeader({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const testErrorCodeMutation = (options?: Partial<Options<TestErrorCodeData>>): MutationOptions<unknown, AxiosError<DefaultError>, Options<TestErrorCodeData>> => {\n    const mutationOptions: MutationOptions<unknown, AxiosError<DefaultError>, Options<TestErrorCodeData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await testErrorCode({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const nonAsciiæøåÆøÅöôêÊ字符串Mutation = (options?: Partial<Options<NonAsciiæøåÆøÅöôêÊ字符串Data>>): MutationOptions<NonAsciiæøåÆøÅöôêÊ字符串Response, AxiosError<DefaultError>, Options<NonAsciiæøåÆøÅöôêÊ字符串Data>> => {\n    const mutationOptions: MutationOptions<NonAsciiæøåÆøÅöôêÊ字符串Response, AxiosError<DefaultError>, Options<NonAsciiæøåÆøÅöôêÊ字符串Data>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await nonAsciiæøåÆøÅöôêÊ字符串({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\n/**\n * Body should not be unknown\n *\n * Body should not be unknown\n */\nexport const postApiVbyApiVersionBodyMutation = (options?: Partial<Options<PostApiVbyApiVersionBodyData>>): MutationOptions<PostApiVbyApiVersionBodyResponse, AxiosError<PostApiVbyApiVersionBodyError>, Options<PostApiVbyApiVersionBodyData>> => {\n    const mutationOptions: MutationOptions<PostApiVbyApiVersionBodyResponse, AxiosError<PostApiVbyApiVersionBodyError>, Options<PostApiVbyApiVersionBodyData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await postApiVbyApiVersionBody({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/svelte-query/axios/client/client.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { AxiosError, AxiosInstance, RawAxiosRequestHeaders } from 'axios';\nimport axios from 'axios';\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 } from './types.gen';\nimport { buildUrl, createConfig, mergeConfigs, mergeHeaders, setAuthParams } from './utils.gen';\n\nexport const createClient = (config: Config = {}): Client => {\n  let _config = mergeConfigs(createConfig(), config);\n\n  let instance: AxiosInstance;\n\n  if (_config.axios && !('Axios' in _config.axios)) {\n    instance = _config.axios;\n  } else {\n    // eslint-disable-next-line @typescript-eslint/no-unused-vars\n    const { auth, ...configWithoutAuth } = _config;\n    instance = axios.create(configWithoutAuth);\n  }\n\n  const getConfig = (): Config => ({ ..._config });\n\n  const setConfig = (config: Config): Config => {\n    _config = mergeConfigs(_config, config);\n    instance.defaults = {\n      ...instance.defaults,\n      ..._config,\n      // @ts-expect-error\n      headers: mergeHeaders(instance.defaults.headers, _config.headers),\n    };\n    return getConfig();\n  };\n\n  const beforeRequest = async (options: RequestOptions) => {\n    const opts = {\n      ..._config,\n      ...options,\n      axios: options.axios ?? _config.axios ?? instance,\n      headers: mergeHeaders(_config.headers, options.headers),\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.body = opts.bodySerializer(opts.body);\n    }\n\n    const url = buildUrl(opts);\n\n    return { opts, url };\n  };\n\n  // @ts-expect-error\n  const request: Client['request'] = async (options) => {\n    // @ts-expect-error\n    const { opts, url } = await beforeRequest(options);\n    try {\n      // assign Axios here for consistency with fetch\n      const _axios = opts.axios!;\n      // eslint-disable-next-line @typescript-eslint/no-unused-vars\n      const { auth, ...optsWithoutAuth } = opts;\n      const response = await _axios({\n        ...optsWithoutAuth,\n        baseURL: '', // the baseURL is already included in `url`\n        data: getValidRequestBody(opts),\n        headers: opts.headers as RawAxiosRequestHeaders,\n        // let `paramsSerializer()` handle query params if it exists\n        params: opts.paramsSerializer ? opts.query : undefined,\n        url,\n      });\n\n      let { data } = response;\n\n      if (opts.responseType === '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 {\n        ...response,\n        data: data ?? {},\n      };\n    } catch (error) {\n      const e = error as AxiosError;\n      if (opts.throwOnError) {\n        throw e;\n      }\n      // @ts-expect-error\n      e.error = e.response?.data ?? {};\n      return e;\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 Record<string, string>,\n      method,\n      serializedBody: getValidRequestBody(opts) as BodyInit | null | undefined,\n      // @ts-expect-error\n      signal: opts.signal,\n      url,\n    });\n  };\n\n  const _buildUrl: Client['buildUrl'] = (options) =>\n    buildUrl({ axios: instance, ..._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    instance,\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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/svelte-query/axios/client/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type { Auth } from '../core/auth.gen';\nexport type { QuerySerializerOptions } from '../core/bodySerializer.gen';\nexport {\n  formDataBodySerializer,\n  jsonBodySerializer,\n  urlSearchParamsBodySerializer,\n} from '../core/bodySerializer.gen';\nexport { buildClientParams } from '../core/params.gen';\nexport { serializeQueryKeyValue } from '../core/queryKeySerializer.gen';\nexport { createClient } from './client.gen';\nexport type {\n  Client,\n  ClientOptions,\n  Config,\n  CreateClientConfig,\n  Options,\n  RequestOptions,\n  RequestResult,\n  TDataShape,\n} from './types.gen';\nexport { createConfig } from './utils.gen';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/svelte-query/axios/client/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type {\n  AxiosError,\n  AxiosInstance,\n  AxiosRequestHeaders,\n  AxiosResponse,\n  AxiosStatic,\n  CreateAxiosDefaults,\n} from 'axios';\n\nimport type { Auth } from '../core/auth.gen';\nimport type {\n  ServerSentEventsOptions,\n  ServerSentEventsResult,\n} from '../core/serverSentEvents.gen';\nimport type { Client as CoreClient, Config as CoreConfig } from '../core/types.gen';\n\nexport interface Config<T extends ClientOptions = ClientOptions>\n  extends Omit<CreateAxiosDefaults, 'auth' | 'baseURL' | 'headers' | 'method'>, CoreConfig {\n  /**\n   * Axios implementation. You can use this option to provide either an\n   * `AxiosStatic` or an `AxiosInstance`.\n   *\n   * @default axios\n   */\n  axios?: AxiosStatic | AxiosInstance;\n  /**\n   * Base URL for all requests made by this client.\n   */\n  baseURL?: T['baseURL'];\n  /**\n   * An object containing any HTTP headers that you want to pre-populate your\n   * `Headers` object with.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/Headers/Headers#init See more}\n   */\n  headers?:\n    | AxiosRequestHeaders\n    | Record<\n        string,\n        string | number | boolean | (string | number | boolean)[] | null | undefined | unknown\n      >;\n  /**\n   * Throw an error instead of returning it in the response?\n   *\n   * @default false\n   */\n  throwOnError?: T['throwOnError'];\n}\n\nexport interface RequestOptions<\n  TData = unknown,\n  ThrowOnError extends boolean = boolean,\n  Url extends string = string,\n>\n  extends\n    Config<{\n      throwOnError: ThrowOnError;\n    }>,\n    Pick<\n      ServerSentEventsOptions<TData>,\n      | 'onRequest'\n      | 'onSseError'\n      | 'onSseEvent'\n      | 'sseDefaultRetryDelay'\n      | 'sseMaxRetryAttempts'\n      | 'sseMaxRetryDelay'\n    > {\n  /**\n   * Any body that you want to add to your request.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/fetch#body}\n   */\n  body?: unknown;\n  path?: Record<string, unknown>;\n  query?: Record<string, unknown>;\n  /**\n   * Security mechanism(s) to use for the request.\n   */\n  security?: ReadonlyArray<Auth>;\n  url: Url;\n}\n\nexport interface ClientOptions {\n  baseURL?: string;\n  throwOnError?: boolean;\n}\n\nexport type RequestResult<\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = boolean,\n> = ThrowOnError extends true\n  ? Promise<AxiosResponse<TData extends Record<string, unknown> ? TData[keyof TData] : TData>>\n  : Promise<\n      | (AxiosResponse<TData extends Record<string, unknown> ? TData[keyof TData] : TData> & {\n          error: undefined;\n        })\n      | (AxiosError<TError extends Record<string, unknown> ? TError[keyof TError] : TError> & {\n          data: undefined;\n          error: TError extends Record<string, unknown> ? TError[keyof TError] : TError;\n        })\n    >;\n\ntype MethodFn = <TData = unknown, TError = unknown, ThrowOnError extends boolean = false>(\n  options: Omit<RequestOptions<TData, ThrowOnError>, 'method'>,\n) => RequestResult<TData, TError, ThrowOnError>;\n\ntype SseFn = <TData = unknown, TError = unknown, ThrowOnError extends boolean = false>(\n  options: Omit<RequestOptions<TData, ThrowOnError>, 'method'>,\n) => Promise<ServerSentEventsResult<TData, TError>>;\n\ntype RequestFn = <TData = unknown, TError = unknown, ThrowOnError extends boolean = false>(\n  options: Omit<RequestOptions<TData, ThrowOnError>, 'method'> &\n    Pick<Required<RequestOptions<TData, ThrowOnError>>, 'method'>,\n) => RequestResult<TData, TError, ThrowOnError>;\n\ntype BuildUrlFn = <\n  TData extends {\n    body?: unknown;\n    path?: Record<string, unknown>;\n    query?: Record<string, unknown>;\n    url: string;\n  },\n>(\n  options: TData & Options<TData>,\n) => string;\n\nexport type Client = CoreClient<RequestFn, Config, MethodFn, BuildUrlFn, SseFn> & {\n  instance: AxiosInstance;\n};\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 = ClientOptions> = (\n  override?: Config<ClientOptions & T>,\n) => Config<Required<ClientOptions> & T>;\n\nexport interface TDataShape {\n  body?: unknown;\n  headers?: unknown;\n  path?: unknown;\n  query?: unknown;\n  url: string;\n}\n\ntype OmitKeys<T, K> = Pick<T, Exclude<keyof T, K>>;\n\nexport type Options<\n  TData extends TDataShape = TDataShape,\n  ThrowOnError extends boolean = boolean,\n  TResponse = unknown,\n> = OmitKeys<RequestOptions<TResponse, ThrowOnError>, 'body' | 'path' | 'query' | 'url'> &\n  ([TData] extends [never] ? unknown : Omit<TData, 'url'>);\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/svelte-query/axios/client/utils.gen.ts",
    "content": "// 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 {\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\nconst checkForExistence = (\n  options: Pick<RequestOptions, 'auth' | 'query'> & {\n    headers: Record<any, unknown>;\n  },\n  name?: string,\n): boolean => {\n  if (!name) {\n    return false;\n  }\n  if (name in options.headers || options.query?.[name]) {\n    return true;\n  }\n  if (\n    'Cookie' in options.headers &&\n    options.headers['Cookie'] &&\n    typeof options.headers['Cookie'] === 'string'\n  ) {\n    return options.headers['Cookie'].includes(`${name}=`);\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: Record<any, unknown>;\n  }) => {\n  for (const auth of security) {\n    if (checkForExistence(options, auth.name)) {\n      continue;\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        const value = `${name}=${token}`;\n        if ('Cookie' in options.headers && options.headers['Cookie']) {\n          options.headers['Cookie'] = `${options.headers['Cookie']}; ${value}`;\n        } else {\n          options.headers['Cookie'] = value;\n        }\n        break;\n      }\n      case 'header':\n      default:\n        options.headers[name] = token;\n        break;\n    }\n  }\n};\n\nexport const buildUrl: Client['buildUrl'] = (options) => {\n  const instanceBaseUrl = options.axios?.defaults?.baseURL;\n\n  const baseUrl =\n    !!options.baseURL && typeof options.baseURL === 'string' ? options.baseURL : instanceBaseUrl;\n\n  return getUrl({\n    baseUrl: baseUrl as string,\n    path: options.path,\n    // let `paramsSerializer()` handle query params if it exists\n    query: !options.paramsSerializer ? options.query : undefined,\n    querySerializer:\n      typeof options.querySerializer === 'function'\n        ? options.querySerializer\n        : createQuerySerializer(options.querySerializer),\n    url: options.url,\n  });\n};\n\nexport const mergeConfigs = (a: Config, b: Config): Config => {\n  const config = { ...a, ...b };\n  config.headers = mergeHeaders(a.headers, b.headers);\n  return config;\n};\n\n/**\n * Special Axios headers keywords allowing to set headers by request method.\n */\nexport const axiosHeadersKeywords = [\n  'common',\n  'delete',\n  'get',\n  'head',\n  'patch',\n  'post',\n  'put',\n] as const;\n\nexport const mergeHeaders = (\n  ...headers: Array<Required<Config>['headers'] | undefined>\n): Record<any, unknown> => {\n  const mergedHeaders: Record<any, unknown> = {};\n  for (const header of headers) {\n    if (!header || typeof header !== 'object') {\n      continue;\n    }\n\n    const iterator = Object.entries(header);\n\n    for (const [key, value] of iterator) {\n      if (\n        axiosHeadersKeywords.includes(key as (typeof axiosHeadersKeywords)[number]) &&\n        typeof value === 'object'\n      ) {\n        mergedHeaders[key] = {\n          ...(mergedHeaders[key] as Record<any, unknown>),\n          ...value,\n        };\n      } else if (value === null) {\n        delete mergedHeaders[key];\n      } else if (Array.isArray(value)) {\n        for (const v of value) {\n          // @ts-expect-error\n          mergedHeaders[key] = [...(mergedHeaders[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[key] = typeof value === 'object' ? JSON.stringify(value) : (value as string);\n      }\n    }\n  }\n  return mergedHeaders;\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  ...override,\n});\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/svelte-query/axios/client.gen.ts",
    "content": "// 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: 'http://localhost:3000/base' }));\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/svelte-query/axios/core/auth.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/svelte-query/axios/core/bodySerializer.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/svelte-query/axios/core/params.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/svelte-query/axios/core/pathSerializer.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/svelte-query/axios/core/queryKeySerializer.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\n/**\n * JSON-friendly union that mirrors what Pinia Colada can hash.\n */\nexport type JsonValue =\n  | null\n  | string\n  | number\n  | boolean\n  | JsonValue[]\n  | { [key: string]: JsonValue };\n\n/**\n * Replacer that converts non-JSON values (bigint, Date, etc.) to safe substitutes.\n */\nexport const queryKeyJsonReplacer = (_key: string, value: unknown) => {\n  if (value === undefined || typeof value === 'function' || typeof value === 'symbol') {\n    return undefined;\n  }\n  if (typeof value === 'bigint') {\n    return value.toString();\n  }\n  if (value instanceof Date) {\n    return value.toISOString();\n  }\n  return value;\n};\n\n/**\n * Safely stringifies a value and parses it back into a JsonValue.\n */\nexport const stringifyToJsonValue = (input: unknown): JsonValue | undefined => {\n  try {\n    const json = JSON.stringify(input, queryKeyJsonReplacer);\n    if (json === undefined) {\n      return undefined;\n    }\n    return JSON.parse(json) as JsonValue;\n  } catch {\n    return undefined;\n  }\n};\n\n/**\n * Detects plain objects (including objects with a null prototype).\n */\nconst isPlainObject = (value: unknown): value is Record<string, unknown> => {\n  if (value === null || typeof value !== 'object') {\n    return false;\n  }\n  const prototype = Object.getPrototypeOf(value as object);\n  return prototype === Object.prototype || prototype === null;\n};\n\n/**\n * Turns URLSearchParams into a sorted JSON object for deterministic keys.\n */\nconst serializeSearchParams = (params: URLSearchParams): JsonValue => {\n  const entries = Array.from(params.entries()).sort(([a], [b]) => a.localeCompare(b));\n  const result: Record<string, JsonValue> = {};\n\n  for (const [key, value] of entries) {\n    const existing = result[key];\n    if (existing === undefined) {\n      result[key] = value;\n      continue;\n    }\n\n    if (Array.isArray(existing)) {\n      (existing as string[]).push(value);\n    } else {\n      result[key] = [existing, value];\n    }\n  }\n\n  return result;\n};\n\n/**\n * Normalizes any accepted value into a JSON-friendly shape for query keys.\n */\nexport const serializeQueryKeyValue = (value: unknown): JsonValue | undefined => {\n  if (value === null) {\n    return null;\n  }\n\n  if (typeof value === 'string' || typeof value === 'number' || typeof value === 'boolean') {\n    return value;\n  }\n\n  if (value === undefined || typeof value === 'function' || typeof value === 'symbol') {\n    return undefined;\n  }\n\n  if (typeof value === 'bigint') {\n    return value.toString();\n  }\n\n  if (value instanceof Date) {\n    return value.toISOString();\n  }\n\n  if (Array.isArray(value)) {\n    return stringifyToJsonValue(value);\n  }\n\n  if (typeof URLSearchParams !== 'undefined' && value instanceof URLSearchParams) {\n    return serializeSearchParams(value);\n  }\n\n  if (isPlainObject(value)) {\n    return stringifyToJsonValue(value);\n  }\n\n  return undefined;\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/svelte-query/axios/core/serverSentEvents.gen.ts",
    "content": "// 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 const 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            // Normalize line endings: CRLF -> LF, then CR -> LF\n            buffer = buffer.replace(/\\r\\n/g, '\\n').replace(/\\r/g, '\\n');\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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/svelte-query/axios/core/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { Auth, AuthToken } from './auth.gen';\nimport type { BodySerializer, QuerySerializer, QuerySerializerOptions } from './bodySerializer.gen';\n\nexport type HttpMethod =\n  | 'connect'\n  | 'delete'\n  | 'get'\n  | 'head'\n  | 'options'\n  | 'patch'\n  | 'post'\n  | 'put'\n  | 'trace';\n\nexport type Client<\n  RequestFn = never,\n  Config = unknown,\n  MethodFn = never,\n  BuildUrlFn = never,\n  SseFn = never,\n> = {\n  /**\n   * Returns the final request URL.\n   */\n  buildUrl: BuildUrlFn;\n  getConfig: () => Config;\n  request: RequestFn;\n  setConfig: (config: Config) => Config;\n} & {\n  [K in HttpMethod]: MethodFn;\n} & ([SseFn] extends [never] ? { sse?: never } : { sse: { [K in HttpMethod]: SseFn } });\n\nexport interface Config {\n  /**\n   * Auth token or a function returning auth token. The resolved value will be\n   * added to the request payload as defined by its `security` array.\n   */\n  auth?: ((auth: Auth) => Promise<AuthToken> | AuthToken) | AuthToken;\n  /**\n   * A function for serializing request body parameter. By default,\n   * {@link JSON.stringify()} will be used.\n   */\n  bodySerializer?: BodySerializer | null;\n  /**\n   * An object containing any HTTP headers that you want to pre-populate your\n   * `Headers` object with.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/Headers/Headers#init See more}\n   */\n  headers?:\n    | RequestInit['headers']\n    | Record<\n        string,\n        string | number | boolean | (string | number | boolean)[] | null | undefined | unknown\n      >;\n  /**\n   * The request method.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/fetch#method See more}\n   */\n  method?: Uppercase<HttpMethod>;\n  /**\n   * A function for serializing request query parameters. By default, arrays\n   * will be exploded in form style, objects will be exploded in deepObject\n   * style, and reserved characters are percent-encoded.\n   *\n   * This method will have no effect if the native `paramsSerializer()` Axios\n   * API function is used.\n   *\n   * {@link https://swagger.io/docs/specification/serialization/#query View examples}\n   */\n  querySerializer?: QuerySerializer | QuerySerializerOptions;\n  /**\n   * A function validating request data. This is useful if you want to ensure\n   * the request conforms to the desired shape, so it can be safely sent to\n   * the server.\n   */\n  requestValidator?: (data: unknown) => Promise<unknown>;\n  /**\n   * A function transforming response data before it's returned. This is useful\n   * for post-processing data, e.g. converting ISO strings into Date objects.\n   */\n  responseTransformer?: (data: unknown) => Promise<unknown>;\n  /**\n   * A function validating response data. This is useful if you want to ensure\n   * the response conforms to the desired shape, so it can be safely passed to\n   * the transformers and returned to the user.\n   */\n  responseValidator?: (data: unknown) => Promise<unknown>;\n}\n\ntype IsExactlyNeverOrNeverUndefined<T> = [T] extends [never]\n  ? true\n  : [T] extends [never | undefined]\n    ? [undefined] extends [T]\n      ? false\n      : true\n    : false;\n\nexport type OmitNever<T extends Record<string, unknown>> = {\n  [K in keyof T as IsExactlyNeverOrNeverUndefined<T[K]> extends true ? never : K]: T[K];\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/svelte-query/axios/core/utils.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/svelte-query/axios/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport { callToTestOrderOfParams, callWithDefaultOptionalParameters, callWithDefaultParameters, callWithDescriptions, callWithDuplicateResponses, callWithNoContentResponse, callWithParameters, callWithResponse, callWithResponseAndNoContentResponse, callWithResponses, callWithResultFromHeader, callWithWeirdParameterNames, collectionFormat, complexTypes, deleteCallWithoutParametersAndResponse, dummyA, dummyB, duplicateName, duplicateName2, duplicateName3, duplicateName4, fooWow, getCallWithoutParametersAndResponse, headCallWithoutParametersAndResponse, nonAsciiæøåÆøÅöôêÊ字符串, type Options, optionsCallWithoutParametersAndResponse, patchApiVbyApiVersionNoTag, patchCallWithoutParametersAndResponse, postApiVbyApiVersionBody, postCallWithoutParametersAndResponse, putCallWithoutParametersAndResponse, serviceWithEmptyTag, testErrorCode, types } from './sdk.gen';\nexport type { ArrayWithArray, ArrayWithBooleans, ArrayWithNumbers, ArrayWithProperties, ArrayWithReferences, ArrayWithStrings, CallToTestOrderOfParamsData, CallWithDefaultOptionalParametersData, CallWithDefaultParametersData, CallWithDescriptionsData, CallWithDuplicateResponsesData, CallWithDuplicateResponsesError, CallWithDuplicateResponsesErrors, CallWithDuplicateResponsesResponse, CallWithDuplicateResponsesResponses, CallWithNoContentResponseData, CallWithNoContentResponseResponses, CallWithParametersData, CallWithResponseAndNoContentResponseData, CallWithResponseAndNoContentResponseResponse, CallWithResponseAndNoContentResponseResponses, CallWithResponseData, CallWithResponseResponse, CallWithResponseResponses, CallWithResponsesData, CallWithResponsesError, CallWithResponsesErrors, CallWithResponsesResponse, CallWithResponsesResponses, CallWithResultFromHeaderData, CallWithResultFromHeaderErrors, CallWithResultFromHeaderResponses, CallWithWeirdParameterNamesData, ClientOptions, CollectionFormatData, CommentWithBackticks, CommentWithBackticksAndQuotes, CommentWithBreaks, CommentWithExpressionPlaceholders, CommentWithQuotes, CommentWithReservedCharacters, CommentWithSlashes, ComplexTypesData, ComplexTypesErrors, ComplexTypesResponse, ComplexTypesResponses, Date, Default, DeleteCallWithoutParametersAndResponseData, DictionaryWithArray, DictionaryWithDictionary, DictionaryWithProperties, DictionaryWithReference, DictionaryWithString, DummyAData, DummyAResponses, DummyBData, DummyBResponses, DuplicateName2Data, DuplicateName3Data, DuplicateName4Data, DuplicateNameData, EnumFromDescription, EnumWithExtensions, EnumWithNumbers, EnumWithStrings, ExternalRefA, ExternalRefB, ExternalSharedModel, FailureFailure, FooWowData, FooWowResponses, GetCallWithoutParametersAndResponseData, HeadCallWithoutParametersAndResponseData, ModelThatExtends, ModelThatExtendsExtends, ModelWithArray, ModelWithBoolean, ModelWithCircularReference, ModelWithDictionary, ModelWithDuplicateImports, ModelWithDuplicateProperties, ModelWithEnum, ModelWithEnumFromDescription, ModelWithInteger, ModelWithNestedEnums, ModelWithNestedProperties, ModelWithNullableString, ModelWithOrderedProperties, ModelWithPattern, ModelWithPatternWritable, ModelWithProperties, ModelWithPropertiesWritable, ModelWithReference, ModelWithReferenceWritable, ModelWithString, ModelWithStringError, NonAsciiæøåÆøÅöôêÊ字符串Data, NonAsciiæøåÆøÅöôêÊ字符串Response, NonAsciiæøåÆøÅöôêÊ字符串Responses, NonAsciiStringæøåÆøÅöôêÊ字符串, OptionsCallWithoutParametersAndResponseData, ParameterActivityParams, PatchApiVbyApiVersionNoTagData, PatchApiVbyApiVersionNoTagResponses, PatchCallWithoutParametersAndResponseData, PostApiVbyApiVersionBodyData, PostApiVbyApiVersionBodyError, PostApiVbyApiVersionBodyErrors, PostApiVbyApiVersionBodyResponse, PostApiVbyApiVersionBodyResponses, PostCallWithoutParametersAndResponseData, PutCallWithoutParametersAndResponseData, ResponsePostActivityResponse, ServiceWithEmptyTagData, SimpleBoolean, SimpleFile, SimpleInteger, SimpleReference, SimpleString, SimpleStringWithPattern, TestErrorCodeData, TestErrorCodeErrors, TestErrorCodeResponses, TypesData, TypesResponse, TypesResponses } from './types.gen';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/svelte-query/axios/sdk.gen.ts",
    "content": "// 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 { CallToTestOrderOfParamsData, CallWithDefaultOptionalParametersData, CallWithDefaultParametersData, CallWithDescriptionsData, CallWithDuplicateResponsesData, CallWithDuplicateResponsesErrors, CallWithDuplicateResponsesResponses, CallWithNoContentResponseData, CallWithNoContentResponseResponses, CallWithParametersData, CallWithResponseAndNoContentResponseData, CallWithResponseAndNoContentResponseResponses, CallWithResponseData, CallWithResponseResponses, CallWithResponsesData, CallWithResponsesErrors, CallWithResponsesResponses, CallWithResultFromHeaderData, CallWithResultFromHeaderErrors, CallWithResultFromHeaderResponses, CallWithWeirdParameterNamesData, CollectionFormatData, ComplexTypesData, ComplexTypesErrors, ComplexTypesResponses, DeleteCallWithoutParametersAndResponseData, DummyAData, DummyAResponses, DummyBData, DummyBResponses, DuplicateName2Data, DuplicateName3Data, DuplicateName4Data, DuplicateNameData, FooWowData, FooWowResponses, GetCallWithoutParametersAndResponseData, HeadCallWithoutParametersAndResponseData, NonAsciiæøåÆøÅöôêÊ字符串Data, NonAsciiæøåÆøÅöôêÊ字符串Responses, OptionsCallWithoutParametersAndResponseData, PatchApiVbyApiVersionNoTagData, PatchApiVbyApiVersionNoTagResponses, PatchCallWithoutParametersAndResponseData, PostApiVbyApiVersionBodyData, PostApiVbyApiVersionBodyErrors, PostApiVbyApiVersionBodyResponses, PostCallWithoutParametersAndResponseData, PutCallWithoutParametersAndResponseData, ServiceWithEmptyTagData, TestErrorCodeData, TestErrorCodeErrors, TestErrorCodeResponses, TypesData, TypesResponses } from './types.gen';\n\nexport type Options<TData extends TDataShape = TDataShape, ThrowOnError extends boolean = boolean> = Options2<TData, ThrowOnError> & {\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\nexport const serviceWithEmptyTag = <ThrowOnError extends boolean = false>(options?: Options<ServiceWithEmptyTagData, ThrowOnError>) => (options?.client ?? client).get<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/no+tag', ...options });\n\nexport const patchApiVbyApiVersionNoTag = <ThrowOnError extends boolean = false>(options?: Options<PatchApiVbyApiVersionNoTagData, ThrowOnError>) => (options?.client ?? client).patch<PatchApiVbyApiVersionNoTagResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/no+tag', ...options });\n\nexport const fooWow = <ThrowOnError extends boolean = false>(options?: Options<FooWowData, ThrowOnError>) => (options?.client ?? client).put<FooWowResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/no+tag', ...options });\n\nexport const deleteCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<DeleteCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).delete<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const getCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<GetCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).get<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const headCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<HeadCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).head<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const optionsCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<OptionsCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).options<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const patchCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<PatchCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).patch<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const postCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<PostCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).post<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const putCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<PutCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).put<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const callWithDescriptions = <ThrowOnError extends boolean = false>(options?: Options<CallWithDescriptionsData, ThrowOnError>) => (options?.client ?? client).post<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/descriptions/', ...options });\n\nexport const callWithParameters = <ThrowOnError extends boolean = false>(options: Options<CallWithParametersData, ThrowOnError>) => (options.client ?? client).post<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/parameters/{parameterPath}', ...options });\n\nexport const callWithWeirdParameterNames = <ThrowOnError extends boolean = false>(options: Options<CallWithWeirdParameterNamesData, ThrowOnError>) => (options.client ?? client).post<unknown, unknown, ThrowOnError>({\n    url: '/api/v{api-version}/parameters/{parameter.path.1}/{parameter-path-2}/{PARAMETER-PATH-3}',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options.headers\n    }\n});\n\nexport const callWithDefaultParameters = <ThrowOnError extends boolean = false>(options: Options<CallWithDefaultParametersData, ThrowOnError>) => (options.client ?? client).get<unknown, unknown, ThrowOnError>({\n    querySerializer: { parameters: { parameterModel: { object: { explode: false, style: 'form' } } } },\n    url: '/api/v{api-version}/defaults',\n    ...options\n});\n\nexport const callWithDefaultOptionalParameters = <ThrowOnError extends boolean = false>(options?: Options<CallWithDefaultOptionalParametersData, ThrowOnError>) => (options?.client ?? client).post<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/defaults', ...options });\n\nexport const callToTestOrderOfParams = <ThrowOnError extends boolean = false>(options: Options<CallToTestOrderOfParamsData, ThrowOnError>) => (options.client ?? client).put<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/defaults', ...options });\n\nexport const duplicateName = <ThrowOnError extends boolean = false>(options?: Options<DuplicateNameData, ThrowOnError>) => (options?.client ?? client).delete<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/duplicate', ...options });\n\nexport const duplicateName2 = <ThrowOnError extends boolean = false>(options?: Options<DuplicateName2Data, ThrowOnError>) => (options?.client ?? client).get<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/duplicate', ...options });\n\nexport const duplicateName3 = <ThrowOnError extends boolean = false>(options?: Options<DuplicateName3Data, ThrowOnError>) => (options?.client ?? client).post<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/duplicate', ...options });\n\nexport const duplicateName4 = <ThrowOnError extends boolean = false>(options?: Options<DuplicateName4Data, ThrowOnError>) => (options?.client ?? client).put<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/duplicate', ...options });\n\nexport const callWithNoContentResponse = <ThrowOnError extends boolean = false>(options?: Options<CallWithNoContentResponseData, ThrowOnError>) => (options?.client ?? client).get<CallWithNoContentResponseResponses, unknown, ThrowOnError>({\n    responseType: 'json',\n    url: '/api/v{api-version}/no-content',\n    ...options\n});\n\nexport const callWithResponseAndNoContentResponse = <ThrowOnError extends boolean = false>(options?: Options<CallWithResponseAndNoContentResponseData, ThrowOnError>) => (options?.client ?? client).get<CallWithResponseAndNoContentResponseResponses, unknown, ThrowOnError>({\n    responseType: 'json',\n    url: '/api/v{api-version}/multiple-tags/response-and-no-content',\n    ...options\n});\n\nexport const dummyA = <ThrowOnError extends boolean = false>(options?: Options<DummyAData, ThrowOnError>) => (options?.client ?? client).get<DummyAResponses, unknown, ThrowOnError>({\n    responseType: 'json',\n    url: '/api/v{api-version}/multiple-tags/a',\n    ...options\n});\n\nexport const dummyB = <ThrowOnError extends boolean = false>(options?: Options<DummyBData, ThrowOnError>) => (options?.client ?? client).get<DummyBResponses, unknown, ThrowOnError>({\n    responseType: 'json',\n    url: '/api/v{api-version}/multiple-tags/b',\n    ...options\n});\n\nexport const callWithResponse = <ThrowOnError extends boolean = false>(options?: Options<CallWithResponseData, ThrowOnError>) => (options?.client ?? client).get<CallWithResponseResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/response', ...options });\n\nexport const callWithDuplicateResponses = <ThrowOnError extends boolean = false>(options?: Options<CallWithDuplicateResponsesData, ThrowOnError>) => (options?.client ?? client).post<CallWithDuplicateResponsesResponses, CallWithDuplicateResponsesErrors, ThrowOnError>({\n    responseType: 'json',\n    url: '/api/v{api-version}/response',\n    ...options\n});\n\nexport const callWithResponses = <ThrowOnError extends boolean = false>(options?: Options<CallWithResponsesData, ThrowOnError>) => (options?.client ?? client).put<CallWithResponsesResponses, CallWithResponsesErrors, ThrowOnError>({\n    responseType: 'json',\n    url: '/api/v{api-version}/response',\n    ...options\n});\n\nexport const collectionFormat = <ThrowOnError extends boolean = false>(options: Options<CollectionFormatData, ThrowOnError>) => (options.client ?? client).get<unknown, unknown, ThrowOnError>({\n    querySerializer: { parameters: {\n            parameterArrayCSV: { array: { explode: false } },\n            parameterArraySSV: { array: { explode: false } },\n            parameterArrayTSV: { array: { explode: false } },\n            parameterArrayPipes: { array: { explode: false } }\n        } },\n    url: '/api/v{api-version}/collectionFormat',\n    ...options\n});\n\nexport const types = <ThrowOnError extends boolean = false>(options: Options<TypesData, ThrowOnError>) => (options.client ?? client).get<TypesResponses, unknown, ThrowOnError>({\n    querySerializer: { parameters: { parameterArray: { array: { explode: false } }, parameterDictionary: { object: { explode: false, style: 'form' } } } },\n    responseType: 'json',\n    url: '/api/v{api-version}/types',\n    ...options\n});\n\nexport const complexTypes = <ThrowOnError extends boolean = false>(options: Options<ComplexTypesData, ThrowOnError>) => (options.client ?? client).get<ComplexTypesResponses, ComplexTypesErrors, ThrowOnError>({\n    querySerializer: { parameters: { parameterObject: { object: { explode: false, style: 'form' } }, parameterReference: { object: { explode: false, style: 'form' } } } },\n    responseType: 'json',\n    url: '/api/v{api-version}/complex',\n    ...options\n});\n\nexport const callWithResultFromHeader = <ThrowOnError extends boolean = false>(options?: Options<CallWithResultFromHeaderData, ThrowOnError>) => (options?.client ?? client).post<CallWithResultFromHeaderResponses, CallWithResultFromHeaderErrors, ThrowOnError>({\n    responseType: 'json',\n    url: '/api/v{api-version}/header',\n    ...options\n});\n\nexport const testErrorCode = <ThrowOnError extends boolean = false>(options: Options<TestErrorCodeData, ThrowOnError>) => (options.client ?? client).post<TestErrorCodeResponses, TestErrorCodeErrors, ThrowOnError>({\n    responseType: 'json',\n    url: '/api/v{api-version}/error',\n    ...options\n});\n\nexport const nonAsciiæøåÆøÅöôêÊ字符串 = <ThrowOnError extends boolean = false>(options: Options<NonAsciiæøåÆøÅöôêÊ字符串Data, ThrowOnError>) => (options.client ?? client).post<NonAsciiæøåÆøÅöôêÊ字符串Responses, unknown, ThrowOnError>({\n    responseType: 'json',\n    url: '/api/v{api-version}/non-ascii-æøåÆØÅöôêÊ字符串',\n    ...options\n});\n\n/**\n * Body should not be unknown\n *\n * Body should not be unknown\n */\nexport const postApiVbyApiVersionBody = <ThrowOnError extends boolean = false>(options: Options<PostApiVbyApiVersionBodyData, ThrowOnError>) => (options.client ?? client).post<PostApiVbyApiVersionBodyResponses, PostApiVbyApiVersionBodyErrors, ThrowOnError>({\n    responseType: 'json',\n    url: '/api/v{api-version}/body',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options.headers\n    }\n});\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/svelte-query/axios/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type ClientOptions = {\n    baseURL: 'http://localhost:3000/base' | (string & {});\n};\n\nexport type ExternalRefA = ExternalSharedModel;\n\nexport type ExternalRefB = ExternalSharedModel;\n\n/**\n * Testing multiline comments in string: First line\n * Second line\n *\n * Fourth line\n */\nexport type CommentWithBreaks = number;\n\n/**\n * Testing backticks in string: `backticks` and ```multiple backticks``` should work\n */\nexport type CommentWithBackticks = number;\n\n/**\n * Testing backticks and quotes in string: `backticks`, 'quotes', \"double quotes\" and ```multiple backticks``` should work\n */\nexport type CommentWithBackticksAndQuotes = number;\n\n/**\n * Testing slashes in string: \\backwards\\\\\\ and /forwards/// should work\n */\nexport type CommentWithSlashes = number;\n\n/**\n * Testing expression placeholders in string: ${expression} should work\n */\nexport type CommentWithExpressionPlaceholders = number;\n\n/**\n * Testing quotes in string: 'single quote''' and \"double quotes\"\"\" should work\n */\nexport type CommentWithQuotes = number;\n\n/**\n * Testing reserved characters in string: * inline * and ** inline ** should work\n */\nexport type CommentWithReservedCharacters = number;\n\n/**\n * This is a simple number\n */\nexport type SimpleInteger = number;\n\n/**\n * This is a simple boolean\n */\nexport type SimpleBoolean = boolean;\n\n/**\n * This is a simple string\n */\nexport type SimpleString = string;\n\n/**\n * A string with non-ascii (unicode) characters valid in typescript identifiers (æøåÆØÅöÔèÈ字符串)\n */\nexport type NonAsciiStringæøåÆøÅöôêÊ字符串 = string;\n\n/**\n * This is a simple file\n */\nexport type SimpleFile = Blob | File;\n\nexport type SimpleReference = ModelWithString;\n\n/**\n * This is a simple string\n */\nexport type SimpleStringWithPattern = string;\n\n/**\n * This is a simple enum with strings\n */\nexport type EnumWithStrings = 'Success' | 'Warning' | 'Error' | '\\'Single Quote\\'' | '\"Double Quotes\"' | 'Non-ascii: øæåôöØÆÅÔÖ字符串';\n\n/**\n * This is a simple enum with numbers\n */\nexport type EnumWithNumbers = 1 | 2 | 3 | 1.1 | 1.2 | 1.3 | 100 | 200 | 300 | -100 | -200 | -300 | -1.1 | -1.2 | -1.3;\n\n/**\n * Success=1,Warning=2,Error=3\n */\nexport type EnumFromDescription = number;\n\n/**\n * This is a simple enum with numbers\n */\nexport type EnumWithExtensions = 200 | 400 | 500;\n\n/**\n * This is a simple array with numbers\n */\nexport type ArrayWithNumbers = Array<number>;\n\n/**\n * This is a simple array with booleans\n */\nexport type ArrayWithBooleans = Array<boolean>;\n\n/**\n * This is a simple array with strings\n */\nexport type ArrayWithStrings = Array<string>;\n\n/**\n * This is a simple array with references\n */\nexport type ArrayWithReferences = Array<ModelWithString>;\n\n/**\n * This is a simple array containing an array\n */\nexport type ArrayWithArray = Array<Array<ModelWithString>>;\n\n/**\n * This is a simple array with properties\n */\nexport type ArrayWithProperties = Array<{\n    foo?: string;\n    bar?: string;\n}>;\n\n/**\n * This is a string dictionary\n */\nexport type DictionaryWithString = {\n    [key: string]: string;\n};\n\n/**\n * This is a string reference\n */\nexport type DictionaryWithReference = {\n    [key: string]: ModelWithString;\n};\n\n/**\n * This is a complex dictionary\n */\nexport type DictionaryWithArray = {\n    [key: string]: Array<ModelWithString>;\n};\n\n/**\n * This is a string dictionary\n */\nexport type DictionaryWithDictionary = {\n    [key: string]: {\n        [key: string]: string;\n    };\n};\n\n/**\n * This is a complex dictionary\n */\nexport type DictionaryWithProperties = {\n    [key: string]: {\n        foo?: string;\n        bar?: string;\n    };\n};\n\n/**\n * This is a type-only model that defines Date as a string\n */\nexport type Date = string;\n\n/**\n * This is a model with one number property\n */\nexport type ModelWithInteger = {\n    /**\n     * This is a simple number property\n     */\n    prop?: number;\n};\n\n/**\n * This is a model with one boolean property\n */\nexport type ModelWithBoolean = {\n    /**\n     * This is a simple boolean property\n     */\n    prop?: boolean;\n};\n\n/**\n * This is a model with one string property\n */\nexport type ModelWithString = {\n    /**\n     * This is a simple string property\n     */\n    prop?: string;\n};\n\n/**\n * This is a model with one string property\n */\nexport type ModelWithStringError = {\n    /**\n     * This is a simple string property\n     */\n    prop?: string;\n};\n\n/**\n * This is a model with one string property\n */\nexport type ModelWithNullableString = {\n    /**\n     * This is a simple string property\n     */\n    nullableProp?: string | null;\n    /**\n     * This is a simple string property\n     */\n    nullableRequiredProp: string | null;\n};\n\n/**\n * This is a model with one enum\n */\nexport type ModelWithEnum = {\n    /**\n     * This is a simple enum with strings\n     */\n    test?: 'Success' | 'Warning' | 'Error' | 'ØÆÅ字符串';\n    /**\n     * These are the HTTP error code enums\n     */\n    statusCode?: '100' | '200 FOO' | '300 FOO_BAR' | '400 foo-bar' | '500 foo.bar' | '600 foo&bar';\n    /**\n     * Simple boolean enum\n     */\n    bool?: true;\n};\n\n/**\n * This is a model with one enum\n */\nexport type ModelWithEnumFromDescription = {\n    /**\n     * Success=1,Warning=2,Error=3\n     */\n    test?: number;\n};\n\n/**\n * This is a model with nested enums\n */\nexport type ModelWithNestedEnums = {\n    dictionaryWithEnum?: {\n        [key: string]: 'Success' | 'Warning' | 'Error';\n    };\n    dictionaryWithEnumFromDescription?: {\n        [key: string]: number;\n    };\n    arrayWithEnum?: Array<'Success' | 'Warning' | 'Error'>;\n    arrayWithDescription?: Array<number>;\n};\n\n/**\n * This is a model with one property containing a reference\n */\nexport type ModelWithReference = {\n    prop?: ModelWithProperties;\n};\n\n/**\n * This is a model with one property containing an array\n */\nexport type ModelWithArray = {\n    prop?: Array<ModelWithString>;\n    propWithFile?: Array<Blob | File>;\n    propWithNumber?: Array<number>;\n};\n\n/**\n * This is a model with one property containing a dictionary\n */\nexport type ModelWithDictionary = {\n    prop?: {\n        [key: string]: string;\n    };\n};\n\n/**\n * This is a model with one property containing a circular reference\n */\nexport type ModelWithCircularReference = {\n    prop?: ModelWithCircularReference;\n};\n\n/**\n * This is a model with one nested property\n */\nexport type ModelWithProperties = {\n    required: string;\n    readonly requiredAndReadOnly: string;\n    string?: string;\n    number?: number;\n    boolean?: boolean;\n    reference?: ModelWithString;\n    'property with space'?: string;\n    default?: string;\n    try?: string;\n    readonly '@namespace.string'?: string;\n    readonly '@namespace.integer'?: number;\n};\n\n/**\n * This is a model with one nested property\n */\nexport type ModelWithNestedProperties = {\n    readonly first: {\n        readonly second: {\n            readonly third: string;\n        };\n    };\n};\n\n/**\n * This is a model with duplicated properties\n */\nexport type ModelWithDuplicateProperties = {\n    prop?: ModelWithString;\n};\n\n/**\n * This is a model with ordered properties\n */\nexport type ModelWithOrderedProperties = {\n    zebra?: string;\n    apple?: string;\n    hawaii?: string;\n};\n\n/**\n * This is a model with duplicated imports\n */\nexport type ModelWithDuplicateImports = {\n    propA?: ModelWithString;\n    propB?: ModelWithString;\n    propC?: ModelWithString;\n};\n\n/**\n * This is a model that extends another model\n */\nexport type ModelThatExtends = ModelWithString & {\n    propExtendsA?: string;\n    propExtendsB?: ModelWithString;\n};\n\n/**\n * This is a model that extends another model\n */\nexport type ModelThatExtendsExtends = ModelWithString & ModelThatExtends & {\n    propExtendsC?: string;\n    propExtendsD?: ModelWithString;\n};\n\nexport type Default = {\n    name?: string;\n};\n\n/**\n * This is a model that contains a some patterns\n */\nexport type ModelWithPattern = {\n    key: string;\n    name: string;\n    readonly enabled?: boolean;\n    readonly modified?: string;\n    id?: string;\n    text?: string;\n    patternWithSingleQuotes?: string;\n    patternWithNewline?: string;\n    patternWithBacktick?: string;\n    patternWithUnicode?: string;\n};\n\nexport type ParameterActivityParams = {\n    description?: string;\n    graduate_id?: number;\n    organization_id?: number;\n    parent_activity?: number;\n    post_id?: number;\n};\n\nexport type ResponsePostActivityResponse = {\n    description?: string;\n    graduate_id?: number;\n    organization_id?: number;\n    parent_activity_id?: number;\n    post_id?: number;\n};\n\nexport type FailureFailure = {\n    error?: string;\n    message?: string;\n    reference_code?: string;\n};\n\nexport type ExternalSharedModel = {\n    id: string;\n    name?: string;\n};\n\n/**\n * This is a model with one property containing a reference\n */\nexport type ModelWithReferenceWritable = {\n    prop?: ModelWithPropertiesWritable;\n};\n\n/**\n * This is a model with one nested property\n */\nexport type ModelWithPropertiesWritable = {\n    required: string;\n    string?: string;\n    number?: number;\n    boolean?: boolean;\n    reference?: ModelWithString;\n    'property with space'?: string;\n    default?: string;\n    try?: string;\n};\n\n/**\n * This is a model that contains a some patterns\n */\nexport type ModelWithPatternWritable = {\n    key: string;\n    name: string;\n    id?: string;\n    text?: string;\n    patternWithSingleQuotes?: string;\n    patternWithNewline?: string;\n    patternWithBacktick?: string;\n    patternWithUnicode?: string;\n};\n\nexport type ServiceWithEmptyTagData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no+tag';\n};\n\nexport type PatchApiVbyApiVersionNoTagData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no+tag';\n};\n\nexport type PatchApiVbyApiVersionNoTagResponses = {\n    /**\n     * OK\n     */\n    default: unknown;\n};\n\nexport type FooWowData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no+tag';\n};\n\nexport type FooWowResponses = {\n    /**\n     * OK\n     */\n    default: unknown;\n};\n\nexport type DeleteCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type GetCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type HeadCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type OptionsCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type PatchCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type PostCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type PutCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type CallWithDescriptionsData = {\n    body?: never;\n    path?: never;\n    query?: {\n        /**\n         * Testing multiline comments in string: First line\n         * Second line\n         *\n         * Fourth line\n         */\n        parameterWithBreaks?: string;\n        /**\n         * Testing backticks in string: `backticks` and ```multiple backticks``` should work\n         */\n        parameterWithBackticks?: string;\n        /**\n         * Testing slashes in string: \\backwards\\\\\\ and /forwards/// should work\n         */\n        parameterWithSlashes?: string;\n        /**\n         * Testing expression placeholders in string: ${expression} should work\n         */\n        parameterWithExpressionPlaceholders?: string;\n        /**\n         * Testing quotes in string: 'single quote''' and \"double quotes\"\"\" should work\n         */\n        parameterWithQuotes?: string;\n        /**\n         * Testing reserved characters in string: * inline * and ** inline ** should work\n         */\n        parameterWithReservedCharacters?: string;\n    };\n    url: '/api/v{api-version}/descriptions/';\n};\n\nexport type CallWithParametersData = {\n    body?: never;\n    headers: {\n        /**\n         * This is the parameter that goes into the header\n         */\n        parameterHeader: string;\n    };\n    path: {\n        /**\n         * This is the parameter that goes into the path\n         */\n        parameterPath: string;\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string;\n    };\n    query: {\n        /**\n         * This is the parameter that goes into the query params\n         */\n        parameterQuery: string;\n    };\n    url: '/api/v{api-version}/parameters/{parameterPath}';\n};\n\nexport type CallWithWeirdParameterNamesData = {\n    /**\n     * This is the parameter that is sent as request body\n     */\n    body: string;\n    headers: {\n        /**\n         * This is the parameter that goes into the request header\n         */\n        'parameter.header': string;\n    };\n    path: {\n        /**\n         * This is the parameter that goes into the path\n         */\n        'parameter.path.1'?: string;\n        /**\n         * This is the parameter that goes into the path\n         */\n        'parameter-path-2'?: string;\n        /**\n         * This is the parameter that goes into the path\n         */\n        'PARAMETER-PATH-3'?: string;\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string;\n    };\n    query: {\n        /**\n         * This is the parameter with a reserved keyword\n         */\n        default?: string;\n        /**\n         * This is the parameter that goes into the request query params\n         */\n        'parameter-query': string;\n    };\n    url: '/api/v{api-version}/parameters/{parameter.path.1}/{parameter-path-2}/{PARAMETER-PATH-3}';\n};\n\nexport type CallWithDefaultParametersData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * This is a simple string with default value\n         */\n        parameterString: string;\n        /**\n         * This is a simple number with default value\n         */\n        parameterNumber: number;\n        /**\n         * This is a simple boolean with default value\n         */\n        parameterBoolean: boolean;\n        /**\n         * This is a simple enum with default value\n         */\n        parameterEnum: 'Success' | 'Warning' | 'Error';\n        /**\n         * This is a model with one string property\n         */\n        parameterModel: {\n            /**\n             * This is a simple string property\n             */\n            prop?: string;\n        };\n    };\n    url: '/api/v{api-version}/defaults';\n};\n\nexport type CallWithDefaultOptionalParametersData = {\n    body?: never;\n    path?: never;\n    query?: {\n        /**\n         * This is a simple string that is optional with default value\n         */\n        parameterString?: string;\n        /**\n         * This is a simple number that is optional with default value\n         */\n        parameterNumber?: number;\n        /**\n         * This is a simple boolean that is optional with default value\n         */\n        parameterBoolean?: boolean;\n        /**\n         * This is a simple enum that is optional with default value\n         */\n        parameterEnum?: 'Success' | 'Warning' | 'Error';\n    };\n    url: '/api/v{api-version}/defaults';\n};\n\nexport type CallToTestOrderOfParamsData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * This is a optional string with default\n         */\n        parameterOptionalStringWithDefault?: string;\n        /**\n         * This is a optional string with empty default\n         */\n        parameterOptionalStringWithEmptyDefault?: string;\n        /**\n         * This is a optional string with no default\n         */\n        parameterOptionalStringWithNoDefault?: string;\n        /**\n         * This is a string with default\n         */\n        parameterStringWithDefault: string;\n        /**\n         * This is a string with empty default\n         */\n        parameterStringWithEmptyDefault: string;\n        /**\n         * This is a string with no default\n         */\n        parameterStringWithNoDefault: string;\n        /**\n         * This is a string that can be null with no default\n         */\n        parameterStringNullableWithNoDefault?: string | null;\n        /**\n         * This is a string that can be null with default\n         */\n        parameterStringNullableWithDefault?: string | null;\n    };\n    url: '/api/v{api-version}/defaults';\n};\n\nexport type DuplicateNameData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/duplicate';\n};\n\nexport type DuplicateName2Data = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/duplicate';\n};\n\nexport type DuplicateName3Data = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/duplicate';\n};\n\nexport type DuplicateName4Data = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/duplicate';\n};\n\nexport type CallWithNoContentResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no-content';\n};\n\nexport type CallWithNoContentResponseResponses = {\n    /**\n     * Success\n     */\n    204: unknown;\n};\n\nexport type CallWithResponseAndNoContentResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multiple-tags/response-and-no-content';\n};\n\nexport type CallWithResponseAndNoContentResponseResponses = {\n    /**\n     * Response is a simple number\n     */\n    200: number;\n    /**\n     * Success\n     */\n    204: unknown;\n};\n\nexport type CallWithResponseAndNoContentResponseResponse = CallWithResponseAndNoContentResponseResponses[keyof CallWithResponseAndNoContentResponseResponses];\n\nexport type DummyAData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multiple-tags/a';\n};\n\nexport type DummyAResponses = {\n    /**\n     * Success\n     */\n    204: unknown;\n};\n\nexport type DummyBData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multiple-tags/b';\n};\n\nexport type DummyBResponses = {\n    /**\n     * Success\n     */\n    204: unknown;\n};\n\nexport type CallWithResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/response';\n};\n\nexport type CallWithResponseResponses = {\n    /**\n     * Message for default response\n     */\n    default: ModelWithString;\n};\n\nexport type CallWithResponseResponse = CallWithResponseResponses[keyof CallWithResponseResponses];\n\nexport type CallWithDuplicateResponsesData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/response';\n};\n\nexport type CallWithDuplicateResponsesErrors = {\n    /**\n     * Message for 500 error\n     */\n    500: ModelWithStringError;\n    /**\n     * Message for 501 error\n     */\n    501: ModelWithStringError;\n    /**\n     * Message for 502 error\n     */\n    502: ModelWithStringError;\n    /**\n     * Message for default response\n     */\n    default: ModelWithString;\n};\n\nexport type CallWithDuplicateResponsesError = CallWithDuplicateResponsesErrors[keyof CallWithDuplicateResponsesErrors];\n\nexport type CallWithDuplicateResponsesResponses = {\n    /**\n     * Message for 201 response\n     */\n    201: ModelWithString;\n    /**\n     * Message for 202 response\n     */\n    202: ModelWithString;\n};\n\nexport type CallWithDuplicateResponsesResponse = CallWithDuplicateResponsesResponses[keyof CallWithDuplicateResponsesResponses];\n\nexport type CallWithResponsesData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/response';\n};\n\nexport type CallWithResponsesErrors = {\n    /**\n     * Message for 500 error\n     */\n    500: ModelWithStringError;\n    /**\n     * Message for 501 error\n     */\n    501: ModelWithStringError;\n    /**\n     * Message for 502 error\n     */\n    502: ModelWithStringError;\n    /**\n     * Message for default response\n     */\n    default: ModelWithString;\n};\n\nexport type CallWithResponsesError = CallWithResponsesErrors[keyof CallWithResponsesErrors];\n\nexport type CallWithResponsesResponses = {\n    /**\n     * Message for 200 response\n     */\n    200: {\n        readonly '@namespace.string'?: string;\n        readonly '@namespace.integer'?: number;\n        readonly value?: Array<ModelWithString>;\n    };\n    /**\n     * Message for 201 response\n     */\n    201: ModelThatExtends;\n    /**\n     * Message for 202 response\n     */\n    202: ModelThatExtendsExtends;\n};\n\nexport type CallWithResponsesResponse = CallWithResponsesResponses[keyof CallWithResponsesResponses];\n\nexport type CollectionFormatData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * This is an array parameter that is sent as csv format (comma-separated values)\n         */\n        parameterArrayCSV: Array<string>;\n        /**\n         * This is an array parameter that is sent as ssv format (space-separated values)\n         */\n        parameterArraySSV: Array<string>;\n        /**\n         * This is an array parameter that is sent as tsv format (tab-separated values)\n         */\n        parameterArrayTSV: Array<string>;\n        /**\n         * This is an array parameter that is sent as pipes format (pipe-separated values)\n         */\n        parameterArrayPipes: Array<string>;\n        /**\n         * This is an array parameter that is sent as multi format (multiple parameter instances)\n         */\n        parameterArrayMulti: Array<string>;\n    };\n    url: '/api/v{api-version}/collectionFormat';\n};\n\nexport type TypesData = {\n    body?: never;\n    path?: {\n        /**\n         * This is a number parameter\n         */\n        id?: number;\n    };\n    query: {\n        /**\n         * This is a number parameter\n         */\n        parameterNumber: number;\n        /**\n         * This is a string parameter\n         */\n        parameterString: string;\n        /**\n         * This is a boolean parameter\n         */\n        parameterBoolean: boolean;\n        /**\n         * This is an array parameter\n         */\n        parameterArray: Array<string>;\n        /**\n         * This is a dictionary parameter\n         */\n        parameterDictionary: {\n            [key: string]: unknown;\n        };\n        /**\n         * This is an enum parameter\n         */\n        parameterEnum: 'Success' | 'Warning' | 'Error';\n    };\n    url: '/api/v{api-version}/types';\n};\n\nexport type TypesResponses = {\n    /**\n     * Response is a simple number\n     */\n    200: number;\n    /**\n     * Response is a simple string\n     */\n    201: string;\n    /**\n     * Response is a simple boolean\n     */\n    202: boolean;\n    /**\n     * Response is a simple object\n     */\n    203: {\n        [key: string]: unknown;\n    };\n};\n\nexport type TypesResponse = TypesResponses[keyof TypesResponses];\n\nexport type ComplexTypesData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * Parameter containing object\n         */\n        parameterObject: {\n            first?: {\n                second?: {\n                    third?: string;\n                };\n            };\n        };\n        /**\n         * This is a model with one string property\n         */\n        parameterReference: {\n            /**\n             * This is a simple string property\n             */\n            prop?: string;\n        };\n    };\n    url: '/api/v{api-version}/complex';\n};\n\nexport type ComplexTypesErrors = {\n    /**\n     * 400 server error\n     */\n    400: unknown;\n    /**\n     * 500 server error\n     */\n    500: unknown;\n};\n\nexport type ComplexTypesResponses = {\n    /**\n     * Successful response\n     */\n    200: Array<ModelWithString>;\n};\n\nexport type ComplexTypesResponse = ComplexTypesResponses[keyof ComplexTypesResponses];\n\nexport type CallWithResultFromHeaderData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/header';\n};\n\nexport type CallWithResultFromHeaderErrors = {\n    /**\n     * 400 server error\n     */\n    400: unknown;\n    /**\n     * 500 server error\n     */\n    500: unknown;\n};\n\nexport type CallWithResultFromHeaderResponses = {\n    /**\n     * Successful response\n     */\n    200: unknown;\n};\n\nexport type TestErrorCodeData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * Status code to return\n         */\n        status: string;\n    };\n    url: '/api/v{api-version}/error';\n};\n\nexport type TestErrorCodeErrors = {\n    /**\n     * Custom message: Internal Server Error\n     */\n    500: unknown;\n    /**\n     * Custom message: Not Implemented\n     */\n    501: unknown;\n    /**\n     * Custom message: Bad Gateway\n     */\n    502: unknown;\n    /**\n     * Custom message: Service Unavailable\n     */\n    503: unknown;\n};\n\nexport type TestErrorCodeResponses = {\n    /**\n     * Custom message: Successful response\n     */\n    200: unknown;\n};\n\nexport type NonAsciiæøåÆøÅöôêÊ字符串Data = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * Dummy input param\n         */\n        nonAsciiParamæøåÆØÅöôêÊ: number;\n    };\n    url: '/api/v{api-version}/non-ascii-æøåÆØÅöôêÊ字符串';\n};\n\nexport type NonAsciiæøåÆøÅöôêÊ字符串Responses = {\n    /**\n     * Successful response\n     */\n    200: NonAsciiStringæøåÆøÅöôêÊ字符串;\n};\n\nexport type NonAsciiæøåÆøÅöôêÊ字符串Response = NonAsciiæøåÆøÅöôêÊ字符串Responses[keyof NonAsciiæøåÆøÅöôêÊ字符串Responses];\n\nexport type PostApiVbyApiVersionBodyData = {\n    /**\n     * Body should not be unknown\n     */\n    body: ParameterActivityParams;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/body';\n};\n\nexport type PostApiVbyApiVersionBodyErrors = {\n    /**\n     * Bad Request\n     */\n    400: FailureFailure;\n    /**\n     * Internal Server Error\n     */\n    500: FailureFailure;\n};\n\nexport type PostApiVbyApiVersionBodyError = PostApiVbyApiVersionBodyErrors[keyof PostApiVbyApiVersionBodyErrors];\n\nexport type PostApiVbyApiVersionBodyResponses = {\n    /**\n     * OK\n     */\n    200: ResponsePostActivityResponse;\n};\n\nexport type PostApiVbyApiVersionBodyResponse = PostApiVbyApiVersionBodyResponses[keyof PostApiVbyApiVersionBodyResponses];\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/svelte-query/fetch/@tanstack/svelte-query.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport { type DefaultError, type MutationOptions, queryOptions } from '@tanstack/svelte-query';\n\nimport { client } from '../client.gen';\nimport { callToTestOrderOfParams, callWithDefaultOptionalParameters, callWithDefaultParameters, callWithDescriptions, callWithDuplicateResponses, callWithNoContentResponse, callWithParameters, callWithResponse, callWithResponseAndNoContentResponse, callWithResponses, callWithResultFromHeader, callWithWeirdParameterNames, collectionFormat, complexTypes, deleteCallWithoutParametersAndResponse, dummyA, dummyB, duplicateName, duplicateName2, duplicateName3, duplicateName4, fooWow, getCallWithoutParametersAndResponse, nonAsciiæøåÆøÅöôêÊ字符串, type Options, patchApiVbyApiVersionNoTag, patchCallWithoutParametersAndResponse, postApiVbyApiVersionBody, postCallWithoutParametersAndResponse, putCallWithoutParametersAndResponse, serviceWithEmptyTag, testErrorCode, types } from '../sdk.gen';\nimport type { CallToTestOrderOfParamsData, CallWithDefaultOptionalParametersData, CallWithDefaultParametersData, CallWithDescriptionsData, CallWithDuplicateResponsesData, CallWithDuplicateResponsesError, CallWithDuplicateResponsesResponse, CallWithNoContentResponseData, CallWithParametersData, CallWithResponseAndNoContentResponseData, CallWithResponseAndNoContentResponseResponse, CallWithResponseData, CallWithResponseResponse, CallWithResponsesData, CallWithResponsesError, CallWithResponsesResponse, CallWithResultFromHeaderData, CallWithWeirdParameterNamesData, CollectionFormatData, ComplexTypesData, ComplexTypesResponse, DeleteCallWithoutParametersAndResponseData, DummyAData, DummyBData, DuplicateName2Data, DuplicateName3Data, DuplicateName4Data, DuplicateNameData, FooWowData, GetCallWithoutParametersAndResponseData, NonAsciiæøåÆøÅöôêÊ字符串Data, NonAsciiæøåÆøÅöôêÊ字符串Response, PatchApiVbyApiVersionNoTagData, PatchCallWithoutParametersAndResponseData, PostApiVbyApiVersionBodyData, PostApiVbyApiVersionBodyError, PostApiVbyApiVersionBodyResponse, PostCallWithoutParametersAndResponseData, PutCallWithoutParametersAndResponseData, ServiceWithEmptyTagData, TestErrorCodeData, TypesData, TypesResponse } from '../types.gen';\n\nexport type QueryKey<TOptions extends Options> = [\n    Pick<TOptions, 'baseUrl' | 'body' | 'headers' | 'path' | 'query'> & {\n        _id: string;\n        _infinite?: boolean;\n        tags?: ReadonlyArray<string>;\n    }\n];\n\nconst createQueryKey = <TOptions extends Options>(id: string, options?: TOptions, infinite?: boolean, tags?: ReadonlyArray<string>): [\n    QueryKey<TOptions>[0]\n] => {\n    const params: QueryKey<TOptions>[0] = { _id: id, baseUrl: options?.baseUrl || (options?.client ?? client).getConfig().baseUrl } as QueryKey<TOptions>[0];\n    if (infinite) {\n        params._infinite = infinite;\n    }\n    if (tags) {\n        params.tags = tags;\n    }\n    if (options?.body) {\n        params.body = options.body;\n    }\n    if (options?.headers) {\n        params.headers = options.headers;\n    }\n    if (options?.path) {\n        params.path = options.path;\n    }\n    if (options?.query) {\n        params.query = options.query;\n    }\n    return [params];\n};\n\nexport const serviceWithEmptyTagQueryKey = (options?: Options<ServiceWithEmptyTagData>) => createQueryKey('serviceWithEmptyTag', options);\n\nexport const serviceWithEmptyTagOptions = (options?: Options<ServiceWithEmptyTagData>) => queryOptions<unknown, DefaultError, unknown, ReturnType<typeof serviceWithEmptyTagQueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await serviceWithEmptyTag({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: serviceWithEmptyTagQueryKey(options)\n});\n\nexport const patchApiVbyApiVersionNoTagMutation = (options?: Partial<Options<PatchApiVbyApiVersionNoTagData>>): MutationOptions<unknown, DefaultError, Options<PatchApiVbyApiVersionNoTagData>> => {\n    const mutationOptions: MutationOptions<unknown, DefaultError, Options<PatchApiVbyApiVersionNoTagData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await patchApiVbyApiVersionNoTag({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const fooWowMutation = (options?: Partial<Options<FooWowData>>): MutationOptions<unknown, DefaultError, Options<FooWowData>> => {\n    const mutationOptions: MutationOptions<unknown, DefaultError, Options<FooWowData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await fooWow({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const deleteCallWithoutParametersAndResponseMutation = (options?: Partial<Options<DeleteCallWithoutParametersAndResponseData>>): MutationOptions<unknown, DefaultError, Options<DeleteCallWithoutParametersAndResponseData>> => {\n    const mutationOptions: MutationOptions<unknown, DefaultError, Options<DeleteCallWithoutParametersAndResponseData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await deleteCallWithoutParametersAndResponse({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const getCallWithoutParametersAndResponseQueryKey = (options?: Options<GetCallWithoutParametersAndResponseData>) => createQueryKey('getCallWithoutParametersAndResponse', options);\n\nexport const getCallWithoutParametersAndResponseOptions = (options?: Options<GetCallWithoutParametersAndResponseData>) => queryOptions<unknown, DefaultError, unknown, ReturnType<typeof getCallWithoutParametersAndResponseQueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await getCallWithoutParametersAndResponse({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: getCallWithoutParametersAndResponseQueryKey(options)\n});\n\nexport const patchCallWithoutParametersAndResponseMutation = (options?: Partial<Options<PatchCallWithoutParametersAndResponseData>>): MutationOptions<unknown, DefaultError, Options<PatchCallWithoutParametersAndResponseData>> => {\n    const mutationOptions: MutationOptions<unknown, DefaultError, Options<PatchCallWithoutParametersAndResponseData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await patchCallWithoutParametersAndResponse({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const postCallWithoutParametersAndResponseMutation = (options?: Partial<Options<PostCallWithoutParametersAndResponseData>>): MutationOptions<unknown, DefaultError, Options<PostCallWithoutParametersAndResponseData>> => {\n    const mutationOptions: MutationOptions<unknown, DefaultError, Options<PostCallWithoutParametersAndResponseData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await postCallWithoutParametersAndResponse({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const putCallWithoutParametersAndResponseMutation = (options?: Partial<Options<PutCallWithoutParametersAndResponseData>>): MutationOptions<unknown, DefaultError, Options<PutCallWithoutParametersAndResponseData>> => {\n    const mutationOptions: MutationOptions<unknown, DefaultError, Options<PutCallWithoutParametersAndResponseData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await putCallWithoutParametersAndResponse({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const callWithDescriptionsMutation = (options?: Partial<Options<CallWithDescriptionsData>>): MutationOptions<unknown, DefaultError, Options<CallWithDescriptionsData>> => {\n    const mutationOptions: MutationOptions<unknown, DefaultError, Options<CallWithDescriptionsData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await callWithDescriptions({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const callWithParametersMutation = (options?: Partial<Options<CallWithParametersData>>): MutationOptions<unknown, DefaultError, Options<CallWithParametersData>> => {\n    const mutationOptions: MutationOptions<unknown, DefaultError, Options<CallWithParametersData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await callWithParameters({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const callWithWeirdParameterNamesMutation = (options?: Partial<Options<CallWithWeirdParameterNamesData>>): MutationOptions<unknown, DefaultError, Options<CallWithWeirdParameterNamesData>> => {\n    const mutationOptions: MutationOptions<unknown, DefaultError, Options<CallWithWeirdParameterNamesData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await callWithWeirdParameterNames({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const callWithDefaultParametersQueryKey = (options: Options<CallWithDefaultParametersData>) => createQueryKey('callWithDefaultParameters', options);\n\nexport const callWithDefaultParametersOptions = (options: Options<CallWithDefaultParametersData>) => queryOptions<unknown, DefaultError, unknown, ReturnType<typeof callWithDefaultParametersQueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await callWithDefaultParameters({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: callWithDefaultParametersQueryKey(options)\n});\n\nexport const callWithDefaultOptionalParametersMutation = (options?: Partial<Options<CallWithDefaultOptionalParametersData>>): MutationOptions<unknown, DefaultError, Options<CallWithDefaultOptionalParametersData>> => {\n    const mutationOptions: MutationOptions<unknown, DefaultError, Options<CallWithDefaultOptionalParametersData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await callWithDefaultOptionalParameters({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const callToTestOrderOfParamsMutation = (options?: Partial<Options<CallToTestOrderOfParamsData>>): MutationOptions<unknown, DefaultError, Options<CallToTestOrderOfParamsData>> => {\n    const mutationOptions: MutationOptions<unknown, DefaultError, Options<CallToTestOrderOfParamsData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await callToTestOrderOfParams({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const duplicateNameMutation = (options?: Partial<Options<DuplicateNameData>>): MutationOptions<unknown, DefaultError, Options<DuplicateNameData>> => {\n    const mutationOptions: MutationOptions<unknown, DefaultError, Options<DuplicateNameData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await duplicateName({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const duplicateName2QueryKey = (options?: Options<DuplicateName2Data>) => createQueryKey('duplicateName2', options);\n\nexport const duplicateName2Options = (options?: Options<DuplicateName2Data>) => queryOptions<unknown, DefaultError, unknown, ReturnType<typeof duplicateName2QueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await duplicateName2({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: duplicateName2QueryKey(options)\n});\n\nexport const duplicateName3Mutation = (options?: Partial<Options<DuplicateName3Data>>): MutationOptions<unknown, DefaultError, Options<DuplicateName3Data>> => {\n    const mutationOptions: MutationOptions<unknown, DefaultError, Options<DuplicateName3Data>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await duplicateName3({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const duplicateName4Mutation = (options?: Partial<Options<DuplicateName4Data>>): MutationOptions<unknown, DefaultError, Options<DuplicateName4Data>> => {\n    const mutationOptions: MutationOptions<unknown, DefaultError, Options<DuplicateName4Data>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await duplicateName4({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const callWithNoContentResponseQueryKey = (options?: Options<CallWithNoContentResponseData>) => createQueryKey('callWithNoContentResponse', options);\n\nexport const callWithNoContentResponseOptions = (options?: Options<CallWithNoContentResponseData>) => queryOptions<unknown, DefaultError, unknown, ReturnType<typeof callWithNoContentResponseQueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await callWithNoContentResponse({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: callWithNoContentResponseQueryKey(options)\n});\n\nexport const callWithResponseAndNoContentResponseQueryKey = (options?: Options<CallWithResponseAndNoContentResponseData>) => createQueryKey('callWithResponseAndNoContentResponse', options);\n\nexport const callWithResponseAndNoContentResponseOptions = (options?: Options<CallWithResponseAndNoContentResponseData>) => queryOptions<CallWithResponseAndNoContentResponseResponse, DefaultError, CallWithResponseAndNoContentResponseResponse, ReturnType<typeof callWithResponseAndNoContentResponseQueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await callWithResponseAndNoContentResponse({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: callWithResponseAndNoContentResponseQueryKey(options)\n});\n\nexport const dummyAQueryKey = (options?: Options<DummyAData>) => createQueryKey('dummyA', options);\n\nexport const dummyAOptions = (options?: Options<DummyAData>) => queryOptions<unknown, DefaultError, unknown, ReturnType<typeof dummyAQueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await dummyA({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: dummyAQueryKey(options)\n});\n\nexport const dummyBQueryKey = (options?: Options<DummyBData>) => createQueryKey('dummyB', options);\n\nexport const dummyBOptions = (options?: Options<DummyBData>) => queryOptions<unknown, DefaultError, unknown, ReturnType<typeof dummyBQueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await dummyB({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: dummyBQueryKey(options)\n});\n\nexport const callWithResponseQueryKey = (options?: Options<CallWithResponseData>) => createQueryKey('callWithResponse', options);\n\nexport const callWithResponseOptions = (options?: Options<CallWithResponseData>) => queryOptions<CallWithResponseResponse, DefaultError, CallWithResponseResponse, ReturnType<typeof callWithResponseQueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await callWithResponse({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: callWithResponseQueryKey(options)\n});\n\nexport const callWithDuplicateResponsesMutation = (options?: Partial<Options<CallWithDuplicateResponsesData>>): MutationOptions<CallWithDuplicateResponsesResponse, CallWithDuplicateResponsesError, Options<CallWithDuplicateResponsesData>> => {\n    const mutationOptions: MutationOptions<CallWithDuplicateResponsesResponse, CallWithDuplicateResponsesError, Options<CallWithDuplicateResponsesData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await callWithDuplicateResponses({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const callWithResponsesMutation = (options?: Partial<Options<CallWithResponsesData>>): MutationOptions<CallWithResponsesResponse, CallWithResponsesError, Options<CallWithResponsesData>> => {\n    const mutationOptions: MutationOptions<CallWithResponsesResponse, CallWithResponsesError, Options<CallWithResponsesData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await callWithResponses({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const collectionFormatQueryKey = (options: Options<CollectionFormatData>) => createQueryKey('collectionFormat', options);\n\nexport const collectionFormatOptions = (options: Options<CollectionFormatData>) => queryOptions<unknown, DefaultError, unknown, ReturnType<typeof collectionFormatQueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await collectionFormat({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: collectionFormatQueryKey(options)\n});\n\nexport const typesQueryKey = (options: Options<TypesData>) => createQueryKey('types', options);\n\nexport const typesOptions = (options: Options<TypesData>) => queryOptions<TypesResponse, DefaultError, TypesResponse, ReturnType<typeof typesQueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await types({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: typesQueryKey(options)\n});\n\nexport const complexTypesQueryKey = (options: Options<ComplexTypesData>) => createQueryKey('complexTypes', options);\n\nexport const complexTypesOptions = (options: Options<ComplexTypesData>) => queryOptions<ComplexTypesResponse, DefaultError, ComplexTypesResponse, ReturnType<typeof complexTypesQueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await complexTypes({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: complexTypesQueryKey(options)\n});\n\nexport const callWithResultFromHeaderMutation = (options?: Partial<Options<CallWithResultFromHeaderData>>): MutationOptions<unknown, DefaultError, Options<CallWithResultFromHeaderData>> => {\n    const mutationOptions: MutationOptions<unknown, DefaultError, Options<CallWithResultFromHeaderData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await callWithResultFromHeader({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const testErrorCodeMutation = (options?: Partial<Options<TestErrorCodeData>>): MutationOptions<unknown, DefaultError, Options<TestErrorCodeData>> => {\n    const mutationOptions: MutationOptions<unknown, DefaultError, Options<TestErrorCodeData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await testErrorCode({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const nonAsciiæøåÆøÅöôêÊ字符串Mutation = (options?: Partial<Options<NonAsciiæøåÆøÅöôêÊ字符串Data>>): MutationOptions<NonAsciiæøåÆøÅöôêÊ字符串Response, DefaultError, Options<NonAsciiæøåÆøÅöôêÊ字符串Data>> => {\n    const mutationOptions: MutationOptions<NonAsciiæøåÆøÅöôêÊ字符串Response, DefaultError, Options<NonAsciiæøåÆøÅöôêÊ字符串Data>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await nonAsciiæøåÆøÅöôêÊ字符串({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\n/**\n * Body should not be unknown\n *\n * Body should not be unknown\n */\nexport const postApiVbyApiVersionBodyMutation = (options?: Partial<Options<PostApiVbyApiVersionBodyData>>): MutationOptions<PostApiVbyApiVersionBodyResponse, PostApiVbyApiVersionBodyError, Options<PostApiVbyApiVersionBodyData>> => {\n    const mutationOptions: MutationOptions<PostApiVbyApiVersionBodyResponse, PostApiVbyApiVersionBodyError, Options<PostApiVbyApiVersionBodyData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await postApiVbyApiVersionBody({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/svelte-query/fetch/client/client.gen.ts",
    "content": "// 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 (options: RequestOptions) => {\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 url = buildUrl(opts);\n\n    return { opts, url };\n  };\n\n  const request: Client['request'] = async (options) => {\n    // @ts-expect-error\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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/svelte-query/fetch/client/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type { Auth } from '../core/auth.gen';\nexport type { QuerySerializerOptions } from '../core/bodySerializer.gen';\nexport {\n  formDataBodySerializer,\n  jsonBodySerializer,\n  urlSearchParamsBodySerializer,\n} from '../core/bodySerializer.gen';\nexport { buildClientParams } from '../core/params.gen';\nexport { serializeQueryKeyValue } from '../core/queryKeySerializer.gen';\nexport { createClient } from './client.gen';\nexport type {\n  Client,\n  ClientOptions,\n  Config,\n  CreateClientConfig,\n  Options,\n  RequestOptions,\n  RequestResult,\n  ResolvedRequestOptions,\n  ResponseStyle,\n  TDataShape,\n} from './types.gen';\nexport { createConfig, mergeHeaders } from './utils.gen';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/svelte-query/fetch/client/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { Auth } from '../core/auth.gen';\nimport type {\n  ServerSentEventsOptions,\n  ServerSentEventsResult,\n} from '../core/serverSentEvents.gen';\nimport type { Client as CoreClient, Config as CoreConfig } from '../core/types.gen';\nimport type { Middleware } from './utils.gen';\n\nexport type ResponseStyle = 'data' | 'fields';\n\nexport interface Config<T extends ClientOptions = ClientOptions>\n  extends Omit<RequestInit, 'body' | 'headers' | 'method'>, CoreConfig {\n  /**\n   * Base URL for all requests made by this client.\n   */\n  baseUrl?: T['baseUrl'];\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   * Please don't use the Fetch client for Next.js applications. The `next`\n   * options won't have any effect.\n   *\n   * Install {@link https://www.npmjs.com/package/@hey-api/client-next `@hey-api/client-next`} instead.\n   */\n  next?: never;\n  /**\n   * Return the response data parsed in a specified format. By default, `auto`\n   * will infer the appropriate method from the `Content-Type` response header.\n   * You can override this behavior with any of the {@link Body} methods.\n   * Select `stream` if you don't want to parse response data at all.\n   *\n   * @default 'auto'\n   */\n  parseAs?: 'arrayBuffer' | 'auto' | 'blob' | 'formData' | 'json' | 'stream' | 'text';\n  /**\n   * Should we return only data or multiple fields (data, error, response, etc.)?\n   *\n   * @default 'fields'\n   */\n  responseStyle?: ResponseStyle;\n  /**\n   * Throw an error instead of returning it in the response?\n   *\n   * @default false\n   */\n  throwOnError?: T['throwOnError'];\n}\n\nexport interface RequestOptions<\n  TData = unknown,\n  TResponseStyle extends ResponseStyle = 'fields',\n  ThrowOnError extends boolean = boolean,\n  Url extends string = string,\n>\n  extends\n    Config<{\n      responseStyle: TResponseStyle;\n      throwOnError: ThrowOnError;\n    }>,\n    Pick<\n      ServerSentEventsOptions<TData>,\n      | 'onRequest'\n      | 'onSseError'\n      | 'onSseEvent'\n      | 'sseDefaultRetryDelay'\n      | 'sseMaxRetryAttempts'\n      | 'sseMaxRetryDelay'\n    > {\n  /**\n   * Any body that you want to add to your request.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/fetch#body}\n   */\n  body?: unknown;\n  path?: Record<string, unknown>;\n  query?: Record<string, unknown>;\n  /**\n   * Security mechanism(s) to use for the request.\n   */\n  security?: ReadonlyArray<Auth>;\n  url: Url;\n}\n\nexport interface ResolvedRequestOptions<\n  TResponseStyle extends ResponseStyle = 'fields',\n  ThrowOnError extends boolean = boolean,\n  Url extends string = string,\n> extends RequestOptions<unknown, TResponseStyle, ThrowOnError, Url> {\n  serializedBody?: string;\n}\n\nexport type RequestResult<\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = boolean,\n  TResponseStyle extends ResponseStyle = 'fields',\n> = ThrowOnError extends true\n  ? Promise<\n      TResponseStyle extends 'data'\n        ? TData extends Record<string, unknown>\n          ? TData[keyof TData]\n          : TData\n        : {\n            data: TData extends Record<string, unknown> ? TData[keyof TData] : TData;\n            request: Request;\n            response: Response;\n          }\n    >\n  : Promise<\n      TResponseStyle extends 'data'\n        ? (TData extends Record<string, unknown> ? TData[keyof TData] : TData) | undefined\n        : (\n            | {\n                data: TData extends Record<string, unknown> ? TData[keyof TData] : TData;\n                error: undefined;\n              }\n            | {\n                data: undefined;\n                error: TError extends Record<string, unknown> ? TError[keyof TError] : TError;\n              }\n          ) & {\n            request: Request;\n            response: Response;\n          }\n    >;\n\nexport interface ClientOptions {\n  baseUrl?: string;\n  responseStyle?: ResponseStyle;\n  throwOnError?: boolean;\n}\n\ntype MethodFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'>,\n) => RequestResult<TData, TError, ThrowOnError, TResponseStyle>;\n\ntype SseFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'>,\n) => Promise<ServerSentEventsResult<TData, TError>>;\n\ntype RequestFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'> &\n    Pick<Required<RequestOptions<TData, TResponseStyle, ThrowOnError>>, 'method'>,\n) => RequestResult<TData, TError, ThrowOnError, TResponseStyle>;\n\ntype BuildUrlFn = <\n  TData extends {\n    body?: unknown;\n    path?: Record<string, unknown>;\n    query?: Record<string, unknown>;\n    url: string;\n  },\n>(\n  options: TData & Options<TData>,\n) => string;\n\nexport type Client = CoreClient<RequestFn, Config, MethodFn, BuildUrlFn, SseFn> & {\n  interceptors: Middleware<Request, Response, unknown, ResolvedRequestOptions>;\n};\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 = ClientOptions> = (\n  override?: Config<ClientOptions & T>,\n) => Config<Required<ClientOptions> & T>;\n\nexport interface TDataShape {\n  body?: unknown;\n  headers?: unknown;\n  path?: unknown;\n  query?: unknown;\n  url: string;\n}\n\ntype OmitKeys<T, K> = Pick<T, Exclude<keyof T, K>>;\n\nexport type Options<\n  TData extends TDataShape = TDataShape,\n  ThrowOnError extends boolean = boolean,\n  TResponse = unknown,\n  TResponseStyle extends ResponseStyle = 'fields',\n> = OmitKeys<\n  RequestOptions<TResponse, TResponseStyle, ThrowOnError>,\n  'body' | 'path' | 'query' | 'url'\n> &\n  ([TData] extends [never] ? unknown : Omit<TData, 'url'>);\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/svelte-query/fetch/client/utils.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/svelte-query/fetch/client.gen.ts",
    "content": "// 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: 'http://localhost:3000/base' }));\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/svelte-query/fetch/core/auth.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/svelte-query/fetch/core/bodySerializer.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/svelte-query/fetch/core/params.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/svelte-query/fetch/core/pathSerializer.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/svelte-query/fetch/core/queryKeySerializer.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\n/**\n * JSON-friendly union that mirrors what Pinia Colada can hash.\n */\nexport type JsonValue =\n  | null\n  | string\n  | number\n  | boolean\n  | JsonValue[]\n  | { [key: string]: JsonValue };\n\n/**\n * Replacer that converts non-JSON values (bigint, Date, etc.) to safe substitutes.\n */\nexport const queryKeyJsonReplacer = (_key: string, value: unknown) => {\n  if (value === undefined || typeof value === 'function' || typeof value === 'symbol') {\n    return undefined;\n  }\n  if (typeof value === 'bigint') {\n    return value.toString();\n  }\n  if (value instanceof Date) {\n    return value.toISOString();\n  }\n  return value;\n};\n\n/**\n * Safely stringifies a value and parses it back into a JsonValue.\n */\nexport const stringifyToJsonValue = (input: unknown): JsonValue | undefined => {\n  try {\n    const json = JSON.stringify(input, queryKeyJsonReplacer);\n    if (json === undefined) {\n      return undefined;\n    }\n    return JSON.parse(json) as JsonValue;\n  } catch {\n    return undefined;\n  }\n};\n\n/**\n * Detects plain objects (including objects with a null prototype).\n */\nconst isPlainObject = (value: unknown): value is Record<string, unknown> => {\n  if (value === null || typeof value !== 'object') {\n    return false;\n  }\n  const prototype = Object.getPrototypeOf(value as object);\n  return prototype === Object.prototype || prototype === null;\n};\n\n/**\n * Turns URLSearchParams into a sorted JSON object for deterministic keys.\n */\nconst serializeSearchParams = (params: URLSearchParams): JsonValue => {\n  const entries = Array.from(params.entries()).sort(([a], [b]) => a.localeCompare(b));\n  const result: Record<string, JsonValue> = {};\n\n  for (const [key, value] of entries) {\n    const existing = result[key];\n    if (existing === undefined) {\n      result[key] = value;\n      continue;\n    }\n\n    if (Array.isArray(existing)) {\n      (existing as string[]).push(value);\n    } else {\n      result[key] = [existing, value];\n    }\n  }\n\n  return result;\n};\n\n/**\n * Normalizes any accepted value into a JSON-friendly shape for query keys.\n */\nexport const serializeQueryKeyValue = (value: unknown): JsonValue | undefined => {\n  if (value === null) {\n    return null;\n  }\n\n  if (typeof value === 'string' || typeof value === 'number' || typeof value === 'boolean') {\n    return value;\n  }\n\n  if (value === undefined || typeof value === 'function' || typeof value === 'symbol') {\n    return undefined;\n  }\n\n  if (typeof value === 'bigint') {\n    return value.toString();\n  }\n\n  if (value instanceof Date) {\n    return value.toISOString();\n  }\n\n  if (Array.isArray(value)) {\n    return stringifyToJsonValue(value);\n  }\n\n  if (typeof URLSearchParams !== 'undefined' && value instanceof URLSearchParams) {\n    return serializeSearchParams(value);\n  }\n\n  if (isPlainObject(value)) {\n    return stringifyToJsonValue(value);\n  }\n\n  return undefined;\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/svelte-query/fetch/core/serverSentEvents.gen.ts",
    "content": "// 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 const 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            // Normalize line endings: CRLF -> LF, then CR -> LF\n            buffer = buffer.replace(/\\r\\n/g, '\\n').replace(/\\r/g, '\\n');\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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/svelte-query/fetch/core/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { Auth, AuthToken } from './auth.gen';\nimport type { BodySerializer, QuerySerializer, QuerySerializerOptions } from './bodySerializer.gen';\n\nexport type HttpMethod =\n  | 'connect'\n  | 'delete'\n  | 'get'\n  | 'head'\n  | 'options'\n  | 'patch'\n  | 'post'\n  | 'put'\n  | 'trace';\n\nexport type Client<\n  RequestFn = never,\n  Config = unknown,\n  MethodFn = never,\n  BuildUrlFn = never,\n  SseFn = never,\n> = {\n  /**\n   * Returns the final request URL.\n   */\n  buildUrl: BuildUrlFn;\n  getConfig: () => Config;\n  request: RequestFn;\n  setConfig: (config: Config) => Config;\n} & {\n  [K in HttpMethod]: MethodFn;\n} & ([SseFn] extends [never] ? { sse?: never } : { sse: { [K in HttpMethod]: SseFn } });\n\nexport interface Config {\n  /**\n   * Auth token or a function returning auth token. The resolved value will be\n   * added to the request payload as defined by its `security` array.\n   */\n  auth?: ((auth: Auth) => Promise<AuthToken> | AuthToken) | AuthToken;\n  /**\n   * A function for serializing request body parameter. By default,\n   * {@link JSON.stringify()} will be used.\n   */\n  bodySerializer?: BodySerializer | null;\n  /**\n   * An object containing any HTTP headers that you want to pre-populate your\n   * `Headers` object with.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/Headers/Headers#init See more}\n   */\n  headers?:\n    | RequestInit['headers']\n    | Record<\n        string,\n        string | number | boolean | (string | number | boolean)[] | null | undefined | unknown\n      >;\n  /**\n   * The request method.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/fetch#method See more}\n   */\n  method?: Uppercase<HttpMethod>;\n  /**\n   * A function for serializing request query parameters. By default, arrays\n   * will be exploded in form style, objects will be exploded in deepObject\n   * style, and reserved characters are percent-encoded.\n   *\n   * This method will have no effect if the native `paramsSerializer()` Axios\n   * API function is used.\n   *\n   * {@link https://swagger.io/docs/specification/serialization/#query View examples}\n   */\n  querySerializer?: QuerySerializer | QuerySerializerOptions;\n  /**\n   * A function validating request data. This is useful if you want to ensure\n   * the request conforms to the desired shape, so it can be safely sent to\n   * the server.\n   */\n  requestValidator?: (data: unknown) => Promise<unknown>;\n  /**\n   * A function transforming response data before it's returned. This is useful\n   * for post-processing data, e.g. converting ISO strings into Date objects.\n   */\n  responseTransformer?: (data: unknown) => Promise<unknown>;\n  /**\n   * A function validating response data. This is useful if you want to ensure\n   * the response conforms to the desired shape, so it can be safely passed to\n   * the transformers and returned to the user.\n   */\n  responseValidator?: (data: unknown) => Promise<unknown>;\n}\n\ntype IsExactlyNeverOrNeverUndefined<T> = [T] extends [never]\n  ? true\n  : [T] extends [never | undefined]\n    ? [undefined] extends [T]\n      ? false\n      : true\n    : false;\n\nexport type OmitNever<T extends Record<string, unknown>> = {\n  [K in keyof T as IsExactlyNeverOrNeverUndefined<T[K]> extends true ? never : K]: T[K];\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/svelte-query/fetch/core/utils.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/svelte-query/fetch/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport { callToTestOrderOfParams, callWithDefaultOptionalParameters, callWithDefaultParameters, callWithDescriptions, callWithDuplicateResponses, callWithNoContentResponse, callWithParameters, callWithResponse, callWithResponseAndNoContentResponse, callWithResponses, callWithResultFromHeader, callWithWeirdParameterNames, collectionFormat, complexTypes, deleteCallWithoutParametersAndResponse, dummyA, dummyB, duplicateName, duplicateName2, duplicateName3, duplicateName4, fooWow, getCallWithoutParametersAndResponse, headCallWithoutParametersAndResponse, nonAsciiæøåÆøÅöôêÊ字符串, type Options, optionsCallWithoutParametersAndResponse, patchApiVbyApiVersionNoTag, patchCallWithoutParametersAndResponse, postApiVbyApiVersionBody, postCallWithoutParametersAndResponse, putCallWithoutParametersAndResponse, serviceWithEmptyTag, testErrorCode, types } from './sdk.gen';\nexport type { ArrayWithArray, ArrayWithBooleans, ArrayWithNumbers, ArrayWithProperties, ArrayWithReferences, ArrayWithStrings, CallToTestOrderOfParamsData, CallWithDefaultOptionalParametersData, CallWithDefaultParametersData, CallWithDescriptionsData, CallWithDuplicateResponsesData, CallWithDuplicateResponsesError, CallWithDuplicateResponsesErrors, CallWithDuplicateResponsesResponse, CallWithDuplicateResponsesResponses, CallWithNoContentResponseData, CallWithNoContentResponseResponses, CallWithParametersData, CallWithResponseAndNoContentResponseData, CallWithResponseAndNoContentResponseResponse, CallWithResponseAndNoContentResponseResponses, CallWithResponseData, CallWithResponseResponse, CallWithResponseResponses, CallWithResponsesData, CallWithResponsesError, CallWithResponsesErrors, CallWithResponsesResponse, CallWithResponsesResponses, CallWithResultFromHeaderData, CallWithResultFromHeaderErrors, CallWithResultFromHeaderResponses, CallWithWeirdParameterNamesData, ClientOptions, CollectionFormatData, CommentWithBackticks, CommentWithBackticksAndQuotes, CommentWithBreaks, CommentWithExpressionPlaceholders, CommentWithQuotes, CommentWithReservedCharacters, CommentWithSlashes, ComplexTypesData, ComplexTypesErrors, ComplexTypesResponse, ComplexTypesResponses, Date, Default, DeleteCallWithoutParametersAndResponseData, DictionaryWithArray, DictionaryWithDictionary, DictionaryWithProperties, DictionaryWithReference, DictionaryWithString, DummyAData, DummyAResponses, DummyBData, DummyBResponses, DuplicateName2Data, DuplicateName3Data, DuplicateName4Data, DuplicateNameData, EnumFromDescription, EnumWithExtensions, EnumWithNumbers, EnumWithStrings, ExternalRefA, ExternalRefB, ExternalSharedModel, FailureFailure, FooWowData, FooWowResponses, GetCallWithoutParametersAndResponseData, HeadCallWithoutParametersAndResponseData, ModelThatExtends, ModelThatExtendsExtends, ModelWithArray, ModelWithBoolean, ModelWithCircularReference, ModelWithDictionary, ModelWithDuplicateImports, ModelWithDuplicateProperties, ModelWithEnum, ModelWithEnumFromDescription, ModelWithInteger, ModelWithNestedEnums, ModelWithNestedProperties, ModelWithNullableString, ModelWithOrderedProperties, ModelWithPattern, ModelWithPatternWritable, ModelWithProperties, ModelWithPropertiesWritable, ModelWithReference, ModelWithReferenceWritable, ModelWithString, ModelWithStringError, NonAsciiæøåÆøÅöôêÊ字符串Data, NonAsciiæøåÆøÅöôêÊ字符串Response, NonAsciiæøåÆøÅöôêÊ字符串Responses, NonAsciiStringæøåÆøÅöôêÊ字符串, OptionsCallWithoutParametersAndResponseData, ParameterActivityParams, PatchApiVbyApiVersionNoTagData, PatchApiVbyApiVersionNoTagResponses, PatchCallWithoutParametersAndResponseData, PostApiVbyApiVersionBodyData, PostApiVbyApiVersionBodyError, PostApiVbyApiVersionBodyErrors, PostApiVbyApiVersionBodyResponse, PostApiVbyApiVersionBodyResponses, PostCallWithoutParametersAndResponseData, PutCallWithoutParametersAndResponseData, ResponsePostActivityResponse, ServiceWithEmptyTagData, SimpleBoolean, SimpleFile, SimpleInteger, SimpleReference, SimpleString, SimpleStringWithPattern, TestErrorCodeData, TestErrorCodeErrors, TestErrorCodeResponses, TypesData, TypesResponse, TypesResponses } from './types.gen';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/svelte-query/fetch/sdk.gen.ts",
    "content": "// 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 { CallToTestOrderOfParamsData, CallWithDefaultOptionalParametersData, CallWithDefaultParametersData, CallWithDescriptionsData, CallWithDuplicateResponsesData, CallWithDuplicateResponsesErrors, CallWithDuplicateResponsesResponses, CallWithNoContentResponseData, CallWithNoContentResponseResponses, CallWithParametersData, CallWithResponseAndNoContentResponseData, CallWithResponseAndNoContentResponseResponses, CallWithResponseData, CallWithResponseResponses, CallWithResponsesData, CallWithResponsesErrors, CallWithResponsesResponses, CallWithResultFromHeaderData, CallWithResultFromHeaderErrors, CallWithResultFromHeaderResponses, CallWithWeirdParameterNamesData, CollectionFormatData, ComplexTypesData, ComplexTypesErrors, ComplexTypesResponses, DeleteCallWithoutParametersAndResponseData, DummyAData, DummyAResponses, DummyBData, DummyBResponses, DuplicateName2Data, DuplicateName3Data, DuplicateName4Data, DuplicateNameData, FooWowData, FooWowResponses, GetCallWithoutParametersAndResponseData, HeadCallWithoutParametersAndResponseData, NonAsciiæøåÆøÅöôêÊ字符串Data, NonAsciiæøåÆøÅöôêÊ字符串Responses, OptionsCallWithoutParametersAndResponseData, PatchApiVbyApiVersionNoTagData, PatchApiVbyApiVersionNoTagResponses, PatchCallWithoutParametersAndResponseData, PostApiVbyApiVersionBodyData, PostApiVbyApiVersionBodyErrors, PostApiVbyApiVersionBodyResponses, PostCallWithoutParametersAndResponseData, PutCallWithoutParametersAndResponseData, ServiceWithEmptyTagData, TestErrorCodeData, TestErrorCodeErrors, TestErrorCodeResponses, TypesData, TypesResponses } from './types.gen';\n\nexport type Options<TData extends TDataShape = TDataShape, ThrowOnError extends boolean = boolean> = Options2<TData, ThrowOnError> & {\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\nexport const serviceWithEmptyTag = <ThrowOnError extends boolean = false>(options?: Options<ServiceWithEmptyTagData, ThrowOnError>) => (options?.client ?? client).get<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/no+tag', ...options });\n\nexport const patchApiVbyApiVersionNoTag = <ThrowOnError extends boolean = false>(options?: Options<PatchApiVbyApiVersionNoTagData, ThrowOnError>) => (options?.client ?? client).patch<PatchApiVbyApiVersionNoTagResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/no+tag', ...options });\n\nexport const fooWow = <ThrowOnError extends boolean = false>(options?: Options<FooWowData, ThrowOnError>) => (options?.client ?? client).put<FooWowResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/no+tag', ...options });\n\nexport const deleteCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<DeleteCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).delete<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const getCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<GetCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).get<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const headCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<HeadCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).head<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const optionsCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<OptionsCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).options<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const patchCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<PatchCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).patch<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const postCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<PostCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).post<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const putCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<PutCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).put<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const callWithDescriptions = <ThrowOnError extends boolean = false>(options?: Options<CallWithDescriptionsData, ThrowOnError>) => (options?.client ?? client).post<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/descriptions/', ...options });\n\nexport const callWithParameters = <ThrowOnError extends boolean = false>(options: Options<CallWithParametersData, ThrowOnError>) => (options.client ?? client).post<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/parameters/{parameterPath}', ...options });\n\nexport const callWithWeirdParameterNames = <ThrowOnError extends boolean = false>(options: Options<CallWithWeirdParameterNamesData, ThrowOnError>) => (options.client ?? client).post<unknown, unknown, ThrowOnError>({\n    url: '/api/v{api-version}/parameters/{parameter.path.1}/{parameter-path-2}/{PARAMETER-PATH-3}',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options.headers\n    }\n});\n\nexport const callWithDefaultParameters = <ThrowOnError extends boolean = false>(options: Options<CallWithDefaultParametersData, ThrowOnError>) => (options.client ?? client).get<unknown, unknown, ThrowOnError>({\n    querySerializer: { parameters: { parameterModel: { object: { explode: false, style: 'form' } } } },\n    url: '/api/v{api-version}/defaults',\n    ...options\n});\n\nexport const callWithDefaultOptionalParameters = <ThrowOnError extends boolean = false>(options?: Options<CallWithDefaultOptionalParametersData, ThrowOnError>) => (options?.client ?? client).post<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/defaults', ...options });\n\nexport const callToTestOrderOfParams = <ThrowOnError extends boolean = false>(options: Options<CallToTestOrderOfParamsData, ThrowOnError>) => (options.client ?? client).put<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/defaults', ...options });\n\nexport const duplicateName = <ThrowOnError extends boolean = false>(options?: Options<DuplicateNameData, ThrowOnError>) => (options?.client ?? client).delete<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/duplicate', ...options });\n\nexport const duplicateName2 = <ThrowOnError extends boolean = false>(options?: Options<DuplicateName2Data, ThrowOnError>) => (options?.client ?? client).get<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/duplicate', ...options });\n\nexport const duplicateName3 = <ThrowOnError extends boolean = false>(options?: Options<DuplicateName3Data, ThrowOnError>) => (options?.client ?? client).post<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/duplicate', ...options });\n\nexport const duplicateName4 = <ThrowOnError extends boolean = false>(options?: Options<DuplicateName4Data, ThrowOnError>) => (options?.client ?? client).put<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/duplicate', ...options });\n\nexport const callWithNoContentResponse = <ThrowOnError extends boolean = false>(options?: Options<CallWithNoContentResponseData, ThrowOnError>) => (options?.client ?? client).get<CallWithNoContentResponseResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/no-content', ...options });\n\nexport const callWithResponseAndNoContentResponse = <ThrowOnError extends boolean = false>(options?: Options<CallWithResponseAndNoContentResponseData, ThrowOnError>) => (options?.client ?? client).get<CallWithResponseAndNoContentResponseResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/multiple-tags/response-and-no-content', ...options });\n\nexport const dummyA = <ThrowOnError extends boolean = false>(options?: Options<DummyAData, ThrowOnError>) => (options?.client ?? client).get<DummyAResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/multiple-tags/a', ...options });\n\nexport const dummyB = <ThrowOnError extends boolean = false>(options?: Options<DummyBData, ThrowOnError>) => (options?.client ?? client).get<DummyBResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/multiple-tags/b', ...options });\n\nexport const callWithResponse = <ThrowOnError extends boolean = false>(options?: Options<CallWithResponseData, ThrowOnError>) => (options?.client ?? client).get<CallWithResponseResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/response', ...options });\n\nexport const callWithDuplicateResponses = <ThrowOnError extends boolean = false>(options?: Options<CallWithDuplicateResponsesData, ThrowOnError>) => (options?.client ?? client).post<CallWithDuplicateResponsesResponses, CallWithDuplicateResponsesErrors, ThrowOnError>({ url: '/api/v{api-version}/response', ...options });\n\nexport const callWithResponses = <ThrowOnError extends boolean = false>(options?: Options<CallWithResponsesData, ThrowOnError>) => (options?.client ?? client).put<CallWithResponsesResponses, CallWithResponsesErrors, ThrowOnError>({ url: '/api/v{api-version}/response', ...options });\n\nexport const collectionFormat = <ThrowOnError extends boolean = false>(options: Options<CollectionFormatData, ThrowOnError>) => (options.client ?? client).get<unknown, unknown, ThrowOnError>({\n    querySerializer: { parameters: {\n            parameterArrayCSV: { array: { explode: false } },\n            parameterArraySSV: { array: { explode: false } },\n            parameterArrayTSV: { array: { explode: false } },\n            parameterArrayPipes: { array: { explode: false } }\n        } },\n    url: '/api/v{api-version}/collectionFormat',\n    ...options\n});\n\nexport const types = <ThrowOnError extends boolean = false>(options: Options<TypesData, ThrowOnError>) => (options.client ?? client).get<TypesResponses, unknown, ThrowOnError>({\n    querySerializer: { parameters: { parameterArray: { array: { explode: false } }, parameterDictionary: { object: { explode: false, style: 'form' } } } },\n    url: '/api/v{api-version}/types',\n    ...options\n});\n\nexport const complexTypes = <ThrowOnError extends boolean = false>(options: Options<ComplexTypesData, ThrowOnError>) => (options.client ?? client).get<ComplexTypesResponses, ComplexTypesErrors, ThrowOnError>({\n    querySerializer: { parameters: { parameterObject: { object: { explode: false, style: 'form' } }, parameterReference: { object: { explode: false, style: 'form' } } } },\n    url: '/api/v{api-version}/complex',\n    ...options\n});\n\nexport const callWithResultFromHeader = <ThrowOnError extends boolean = false>(options?: Options<CallWithResultFromHeaderData, ThrowOnError>) => (options?.client ?? client).post<CallWithResultFromHeaderResponses, CallWithResultFromHeaderErrors, ThrowOnError>({ url: '/api/v{api-version}/header', ...options });\n\nexport const testErrorCode = <ThrowOnError extends boolean = false>(options: Options<TestErrorCodeData, ThrowOnError>) => (options.client ?? client).post<TestErrorCodeResponses, TestErrorCodeErrors, ThrowOnError>({ url: '/api/v{api-version}/error', ...options });\n\nexport const nonAsciiæøåÆøÅöôêÊ字符串 = <ThrowOnError extends boolean = false>(options: Options<NonAsciiæøåÆøÅöôêÊ字符串Data, ThrowOnError>) => (options.client ?? client).post<NonAsciiæøåÆøÅöôêÊ字符串Responses, unknown, ThrowOnError>({ url: '/api/v{api-version}/non-ascii-æøåÆØÅöôêÊ字符串', ...options });\n\n/**\n * Body should not be unknown\n *\n * Body should not be unknown\n */\nexport const postApiVbyApiVersionBody = <ThrowOnError extends boolean = false>(options: Options<PostApiVbyApiVersionBodyData, ThrowOnError>) => (options.client ?? client).post<PostApiVbyApiVersionBodyResponses, PostApiVbyApiVersionBodyErrors, ThrowOnError>({\n    url: '/api/v{api-version}/body',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options.headers\n    }\n});\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/svelte-query/fetch/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type ClientOptions = {\n    baseUrl: 'http://localhost:3000/base' | (string & {});\n};\n\nexport type ExternalRefA = ExternalSharedModel;\n\nexport type ExternalRefB = ExternalSharedModel;\n\n/**\n * Testing multiline comments in string: First line\n * Second line\n *\n * Fourth line\n */\nexport type CommentWithBreaks = number;\n\n/**\n * Testing backticks in string: `backticks` and ```multiple backticks``` should work\n */\nexport type CommentWithBackticks = number;\n\n/**\n * Testing backticks and quotes in string: `backticks`, 'quotes', \"double quotes\" and ```multiple backticks``` should work\n */\nexport type CommentWithBackticksAndQuotes = number;\n\n/**\n * Testing slashes in string: \\backwards\\\\\\ and /forwards/// should work\n */\nexport type CommentWithSlashes = number;\n\n/**\n * Testing expression placeholders in string: ${expression} should work\n */\nexport type CommentWithExpressionPlaceholders = number;\n\n/**\n * Testing quotes in string: 'single quote''' and \"double quotes\"\"\" should work\n */\nexport type CommentWithQuotes = number;\n\n/**\n * Testing reserved characters in string: * inline * and ** inline ** should work\n */\nexport type CommentWithReservedCharacters = number;\n\n/**\n * This is a simple number\n */\nexport type SimpleInteger = number;\n\n/**\n * This is a simple boolean\n */\nexport type SimpleBoolean = boolean;\n\n/**\n * This is a simple string\n */\nexport type SimpleString = string;\n\n/**\n * A string with non-ascii (unicode) characters valid in typescript identifiers (æøåÆØÅöÔèÈ字符串)\n */\nexport type NonAsciiStringæøåÆøÅöôêÊ字符串 = string;\n\n/**\n * This is a simple file\n */\nexport type SimpleFile = Blob | File;\n\nexport type SimpleReference = ModelWithString;\n\n/**\n * This is a simple string\n */\nexport type SimpleStringWithPattern = string;\n\n/**\n * This is a simple enum with strings\n */\nexport type EnumWithStrings = 'Success' | 'Warning' | 'Error' | '\\'Single Quote\\'' | '\"Double Quotes\"' | 'Non-ascii: øæåôöØÆÅÔÖ字符串';\n\n/**\n * This is a simple enum with numbers\n */\nexport type EnumWithNumbers = 1 | 2 | 3 | 1.1 | 1.2 | 1.3 | 100 | 200 | 300 | -100 | -200 | -300 | -1.1 | -1.2 | -1.3;\n\n/**\n * Success=1,Warning=2,Error=3\n */\nexport type EnumFromDescription = number;\n\n/**\n * This is a simple enum with numbers\n */\nexport type EnumWithExtensions = 200 | 400 | 500;\n\n/**\n * This is a simple array with numbers\n */\nexport type ArrayWithNumbers = Array<number>;\n\n/**\n * This is a simple array with booleans\n */\nexport type ArrayWithBooleans = Array<boolean>;\n\n/**\n * This is a simple array with strings\n */\nexport type ArrayWithStrings = Array<string>;\n\n/**\n * This is a simple array with references\n */\nexport type ArrayWithReferences = Array<ModelWithString>;\n\n/**\n * This is a simple array containing an array\n */\nexport type ArrayWithArray = Array<Array<ModelWithString>>;\n\n/**\n * This is a simple array with properties\n */\nexport type ArrayWithProperties = Array<{\n    foo?: string;\n    bar?: string;\n}>;\n\n/**\n * This is a string dictionary\n */\nexport type DictionaryWithString = {\n    [key: string]: string;\n};\n\n/**\n * This is a string reference\n */\nexport type DictionaryWithReference = {\n    [key: string]: ModelWithString;\n};\n\n/**\n * This is a complex dictionary\n */\nexport type DictionaryWithArray = {\n    [key: string]: Array<ModelWithString>;\n};\n\n/**\n * This is a string dictionary\n */\nexport type DictionaryWithDictionary = {\n    [key: string]: {\n        [key: string]: string;\n    };\n};\n\n/**\n * This is a complex dictionary\n */\nexport type DictionaryWithProperties = {\n    [key: string]: {\n        foo?: string;\n        bar?: string;\n    };\n};\n\n/**\n * This is a type-only model that defines Date as a string\n */\nexport type Date = string;\n\n/**\n * This is a model with one number property\n */\nexport type ModelWithInteger = {\n    /**\n     * This is a simple number property\n     */\n    prop?: number;\n};\n\n/**\n * This is a model with one boolean property\n */\nexport type ModelWithBoolean = {\n    /**\n     * This is a simple boolean property\n     */\n    prop?: boolean;\n};\n\n/**\n * This is a model with one string property\n */\nexport type ModelWithString = {\n    /**\n     * This is a simple string property\n     */\n    prop?: string;\n};\n\n/**\n * This is a model with one string property\n */\nexport type ModelWithStringError = {\n    /**\n     * This is a simple string property\n     */\n    prop?: string;\n};\n\n/**\n * This is a model with one string property\n */\nexport type ModelWithNullableString = {\n    /**\n     * This is a simple string property\n     */\n    nullableProp?: string | null;\n    /**\n     * This is a simple string property\n     */\n    nullableRequiredProp: string | null;\n};\n\n/**\n * This is a model with one enum\n */\nexport type ModelWithEnum = {\n    /**\n     * This is a simple enum with strings\n     */\n    test?: 'Success' | 'Warning' | 'Error' | 'ØÆÅ字符串';\n    /**\n     * These are the HTTP error code enums\n     */\n    statusCode?: '100' | '200 FOO' | '300 FOO_BAR' | '400 foo-bar' | '500 foo.bar' | '600 foo&bar';\n    /**\n     * Simple boolean enum\n     */\n    bool?: true;\n};\n\n/**\n * This is a model with one enum\n */\nexport type ModelWithEnumFromDescription = {\n    /**\n     * Success=1,Warning=2,Error=3\n     */\n    test?: number;\n};\n\n/**\n * This is a model with nested enums\n */\nexport type ModelWithNestedEnums = {\n    dictionaryWithEnum?: {\n        [key: string]: 'Success' | 'Warning' | 'Error';\n    };\n    dictionaryWithEnumFromDescription?: {\n        [key: string]: number;\n    };\n    arrayWithEnum?: Array<'Success' | 'Warning' | 'Error'>;\n    arrayWithDescription?: Array<number>;\n};\n\n/**\n * This is a model with one property containing a reference\n */\nexport type ModelWithReference = {\n    prop?: ModelWithProperties;\n};\n\n/**\n * This is a model with one property containing an array\n */\nexport type ModelWithArray = {\n    prop?: Array<ModelWithString>;\n    propWithFile?: Array<Blob | File>;\n    propWithNumber?: Array<number>;\n};\n\n/**\n * This is a model with one property containing a dictionary\n */\nexport type ModelWithDictionary = {\n    prop?: {\n        [key: string]: string;\n    };\n};\n\n/**\n * This is a model with one property containing a circular reference\n */\nexport type ModelWithCircularReference = {\n    prop?: ModelWithCircularReference;\n};\n\n/**\n * This is a model with one nested property\n */\nexport type ModelWithProperties = {\n    required: string;\n    readonly requiredAndReadOnly: string;\n    string?: string;\n    number?: number;\n    boolean?: boolean;\n    reference?: ModelWithString;\n    'property with space'?: string;\n    default?: string;\n    try?: string;\n    readonly '@namespace.string'?: string;\n    readonly '@namespace.integer'?: number;\n};\n\n/**\n * This is a model with one nested property\n */\nexport type ModelWithNestedProperties = {\n    readonly first: {\n        readonly second: {\n            readonly third: string;\n        };\n    };\n};\n\n/**\n * This is a model with duplicated properties\n */\nexport type ModelWithDuplicateProperties = {\n    prop?: ModelWithString;\n};\n\n/**\n * This is a model with ordered properties\n */\nexport type ModelWithOrderedProperties = {\n    zebra?: string;\n    apple?: string;\n    hawaii?: string;\n};\n\n/**\n * This is a model with duplicated imports\n */\nexport type ModelWithDuplicateImports = {\n    propA?: ModelWithString;\n    propB?: ModelWithString;\n    propC?: ModelWithString;\n};\n\n/**\n * This is a model that extends another model\n */\nexport type ModelThatExtends = ModelWithString & {\n    propExtendsA?: string;\n    propExtendsB?: ModelWithString;\n};\n\n/**\n * This is a model that extends another model\n */\nexport type ModelThatExtendsExtends = ModelWithString & ModelThatExtends & {\n    propExtendsC?: string;\n    propExtendsD?: ModelWithString;\n};\n\nexport type Default = {\n    name?: string;\n};\n\n/**\n * This is a model that contains a some patterns\n */\nexport type ModelWithPattern = {\n    key: string;\n    name: string;\n    readonly enabled?: boolean;\n    readonly modified?: string;\n    id?: string;\n    text?: string;\n    patternWithSingleQuotes?: string;\n    patternWithNewline?: string;\n    patternWithBacktick?: string;\n    patternWithUnicode?: string;\n};\n\nexport type ParameterActivityParams = {\n    description?: string;\n    graduate_id?: number;\n    organization_id?: number;\n    parent_activity?: number;\n    post_id?: number;\n};\n\nexport type ResponsePostActivityResponse = {\n    description?: string;\n    graduate_id?: number;\n    organization_id?: number;\n    parent_activity_id?: number;\n    post_id?: number;\n};\n\nexport type FailureFailure = {\n    error?: string;\n    message?: string;\n    reference_code?: string;\n};\n\nexport type ExternalSharedModel = {\n    id: string;\n    name?: string;\n};\n\n/**\n * This is a model with one property containing a reference\n */\nexport type ModelWithReferenceWritable = {\n    prop?: ModelWithPropertiesWritable;\n};\n\n/**\n * This is a model with one nested property\n */\nexport type ModelWithPropertiesWritable = {\n    required: string;\n    string?: string;\n    number?: number;\n    boolean?: boolean;\n    reference?: ModelWithString;\n    'property with space'?: string;\n    default?: string;\n    try?: string;\n};\n\n/**\n * This is a model that contains a some patterns\n */\nexport type ModelWithPatternWritable = {\n    key: string;\n    name: string;\n    id?: string;\n    text?: string;\n    patternWithSingleQuotes?: string;\n    patternWithNewline?: string;\n    patternWithBacktick?: string;\n    patternWithUnicode?: string;\n};\n\nexport type ServiceWithEmptyTagData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no+tag';\n};\n\nexport type PatchApiVbyApiVersionNoTagData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no+tag';\n};\n\nexport type PatchApiVbyApiVersionNoTagResponses = {\n    /**\n     * OK\n     */\n    default: unknown;\n};\n\nexport type FooWowData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no+tag';\n};\n\nexport type FooWowResponses = {\n    /**\n     * OK\n     */\n    default: unknown;\n};\n\nexport type DeleteCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type GetCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type HeadCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type OptionsCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type PatchCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type PostCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type PutCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type CallWithDescriptionsData = {\n    body?: never;\n    path?: never;\n    query?: {\n        /**\n         * Testing multiline comments in string: First line\n         * Second line\n         *\n         * Fourth line\n         */\n        parameterWithBreaks?: string;\n        /**\n         * Testing backticks in string: `backticks` and ```multiple backticks``` should work\n         */\n        parameterWithBackticks?: string;\n        /**\n         * Testing slashes in string: \\backwards\\\\\\ and /forwards/// should work\n         */\n        parameterWithSlashes?: string;\n        /**\n         * Testing expression placeholders in string: ${expression} should work\n         */\n        parameterWithExpressionPlaceholders?: string;\n        /**\n         * Testing quotes in string: 'single quote''' and \"double quotes\"\"\" should work\n         */\n        parameterWithQuotes?: string;\n        /**\n         * Testing reserved characters in string: * inline * and ** inline ** should work\n         */\n        parameterWithReservedCharacters?: string;\n    };\n    url: '/api/v{api-version}/descriptions/';\n};\n\nexport type CallWithParametersData = {\n    body?: never;\n    headers: {\n        /**\n         * This is the parameter that goes into the header\n         */\n        parameterHeader: string;\n    };\n    path: {\n        /**\n         * This is the parameter that goes into the path\n         */\n        parameterPath: string;\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string;\n    };\n    query: {\n        /**\n         * This is the parameter that goes into the query params\n         */\n        parameterQuery: string;\n    };\n    url: '/api/v{api-version}/parameters/{parameterPath}';\n};\n\nexport type CallWithWeirdParameterNamesData = {\n    /**\n     * This is the parameter that is sent as request body\n     */\n    body: string;\n    headers: {\n        /**\n         * This is the parameter that goes into the request header\n         */\n        'parameter.header': string;\n    };\n    path: {\n        /**\n         * This is the parameter that goes into the path\n         */\n        'parameter.path.1'?: string;\n        /**\n         * This is the parameter that goes into the path\n         */\n        'parameter-path-2'?: string;\n        /**\n         * This is the parameter that goes into the path\n         */\n        'PARAMETER-PATH-3'?: string;\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string;\n    };\n    query: {\n        /**\n         * This is the parameter with a reserved keyword\n         */\n        default?: string;\n        /**\n         * This is the parameter that goes into the request query params\n         */\n        'parameter-query': string;\n    };\n    url: '/api/v{api-version}/parameters/{parameter.path.1}/{parameter-path-2}/{PARAMETER-PATH-3}';\n};\n\nexport type CallWithDefaultParametersData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * This is a simple string with default value\n         */\n        parameterString: string;\n        /**\n         * This is a simple number with default value\n         */\n        parameterNumber: number;\n        /**\n         * This is a simple boolean with default value\n         */\n        parameterBoolean: boolean;\n        /**\n         * This is a simple enum with default value\n         */\n        parameterEnum: 'Success' | 'Warning' | 'Error';\n        /**\n         * This is a model with one string property\n         */\n        parameterModel: {\n            /**\n             * This is a simple string property\n             */\n            prop?: string;\n        };\n    };\n    url: '/api/v{api-version}/defaults';\n};\n\nexport type CallWithDefaultOptionalParametersData = {\n    body?: never;\n    path?: never;\n    query?: {\n        /**\n         * This is a simple string that is optional with default value\n         */\n        parameterString?: string;\n        /**\n         * This is a simple number that is optional with default value\n         */\n        parameterNumber?: number;\n        /**\n         * This is a simple boolean that is optional with default value\n         */\n        parameterBoolean?: boolean;\n        /**\n         * This is a simple enum that is optional with default value\n         */\n        parameterEnum?: 'Success' | 'Warning' | 'Error';\n    };\n    url: '/api/v{api-version}/defaults';\n};\n\nexport type CallToTestOrderOfParamsData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * This is a optional string with default\n         */\n        parameterOptionalStringWithDefault?: string;\n        /**\n         * This is a optional string with empty default\n         */\n        parameterOptionalStringWithEmptyDefault?: string;\n        /**\n         * This is a optional string with no default\n         */\n        parameterOptionalStringWithNoDefault?: string;\n        /**\n         * This is a string with default\n         */\n        parameterStringWithDefault: string;\n        /**\n         * This is a string with empty default\n         */\n        parameterStringWithEmptyDefault: string;\n        /**\n         * This is a string with no default\n         */\n        parameterStringWithNoDefault: string;\n        /**\n         * This is a string that can be null with no default\n         */\n        parameterStringNullableWithNoDefault?: string | null;\n        /**\n         * This is a string that can be null with default\n         */\n        parameterStringNullableWithDefault?: string | null;\n    };\n    url: '/api/v{api-version}/defaults';\n};\n\nexport type DuplicateNameData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/duplicate';\n};\n\nexport type DuplicateName2Data = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/duplicate';\n};\n\nexport type DuplicateName3Data = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/duplicate';\n};\n\nexport type DuplicateName4Data = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/duplicate';\n};\n\nexport type CallWithNoContentResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no-content';\n};\n\nexport type CallWithNoContentResponseResponses = {\n    /**\n     * Success\n     */\n    204: unknown;\n};\n\nexport type CallWithResponseAndNoContentResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multiple-tags/response-and-no-content';\n};\n\nexport type CallWithResponseAndNoContentResponseResponses = {\n    /**\n     * Response is a simple number\n     */\n    200: number;\n    /**\n     * Success\n     */\n    204: unknown;\n};\n\nexport type CallWithResponseAndNoContentResponseResponse = CallWithResponseAndNoContentResponseResponses[keyof CallWithResponseAndNoContentResponseResponses];\n\nexport type DummyAData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multiple-tags/a';\n};\n\nexport type DummyAResponses = {\n    /**\n     * Success\n     */\n    204: unknown;\n};\n\nexport type DummyBData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multiple-tags/b';\n};\n\nexport type DummyBResponses = {\n    /**\n     * Success\n     */\n    204: unknown;\n};\n\nexport type CallWithResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/response';\n};\n\nexport type CallWithResponseResponses = {\n    /**\n     * Message for default response\n     */\n    default: ModelWithString;\n};\n\nexport type CallWithResponseResponse = CallWithResponseResponses[keyof CallWithResponseResponses];\n\nexport type CallWithDuplicateResponsesData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/response';\n};\n\nexport type CallWithDuplicateResponsesErrors = {\n    /**\n     * Message for 500 error\n     */\n    500: ModelWithStringError;\n    /**\n     * Message for 501 error\n     */\n    501: ModelWithStringError;\n    /**\n     * Message for 502 error\n     */\n    502: ModelWithStringError;\n    /**\n     * Message for default response\n     */\n    default: ModelWithString;\n};\n\nexport type CallWithDuplicateResponsesError = CallWithDuplicateResponsesErrors[keyof CallWithDuplicateResponsesErrors];\n\nexport type CallWithDuplicateResponsesResponses = {\n    /**\n     * Message for 201 response\n     */\n    201: ModelWithString;\n    /**\n     * Message for 202 response\n     */\n    202: ModelWithString;\n};\n\nexport type CallWithDuplicateResponsesResponse = CallWithDuplicateResponsesResponses[keyof CallWithDuplicateResponsesResponses];\n\nexport type CallWithResponsesData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/response';\n};\n\nexport type CallWithResponsesErrors = {\n    /**\n     * Message for 500 error\n     */\n    500: ModelWithStringError;\n    /**\n     * Message for 501 error\n     */\n    501: ModelWithStringError;\n    /**\n     * Message for 502 error\n     */\n    502: ModelWithStringError;\n    /**\n     * Message for default response\n     */\n    default: ModelWithString;\n};\n\nexport type CallWithResponsesError = CallWithResponsesErrors[keyof CallWithResponsesErrors];\n\nexport type CallWithResponsesResponses = {\n    /**\n     * Message for 200 response\n     */\n    200: {\n        readonly '@namespace.string'?: string;\n        readonly '@namespace.integer'?: number;\n        readonly value?: Array<ModelWithString>;\n    };\n    /**\n     * Message for 201 response\n     */\n    201: ModelThatExtends;\n    /**\n     * Message for 202 response\n     */\n    202: ModelThatExtendsExtends;\n};\n\nexport type CallWithResponsesResponse = CallWithResponsesResponses[keyof CallWithResponsesResponses];\n\nexport type CollectionFormatData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * This is an array parameter that is sent as csv format (comma-separated values)\n         */\n        parameterArrayCSV: Array<string>;\n        /**\n         * This is an array parameter that is sent as ssv format (space-separated values)\n         */\n        parameterArraySSV: Array<string>;\n        /**\n         * This is an array parameter that is sent as tsv format (tab-separated values)\n         */\n        parameterArrayTSV: Array<string>;\n        /**\n         * This is an array parameter that is sent as pipes format (pipe-separated values)\n         */\n        parameterArrayPipes: Array<string>;\n        /**\n         * This is an array parameter that is sent as multi format (multiple parameter instances)\n         */\n        parameterArrayMulti: Array<string>;\n    };\n    url: '/api/v{api-version}/collectionFormat';\n};\n\nexport type TypesData = {\n    body?: never;\n    path?: {\n        /**\n         * This is a number parameter\n         */\n        id?: number;\n    };\n    query: {\n        /**\n         * This is a number parameter\n         */\n        parameterNumber: number;\n        /**\n         * This is a string parameter\n         */\n        parameterString: string;\n        /**\n         * This is a boolean parameter\n         */\n        parameterBoolean: boolean;\n        /**\n         * This is an array parameter\n         */\n        parameterArray: Array<string>;\n        /**\n         * This is a dictionary parameter\n         */\n        parameterDictionary: {\n            [key: string]: unknown;\n        };\n        /**\n         * This is an enum parameter\n         */\n        parameterEnum: 'Success' | 'Warning' | 'Error';\n    };\n    url: '/api/v{api-version}/types';\n};\n\nexport type TypesResponses = {\n    /**\n     * Response is a simple number\n     */\n    200: number;\n    /**\n     * Response is a simple string\n     */\n    201: string;\n    /**\n     * Response is a simple boolean\n     */\n    202: boolean;\n    /**\n     * Response is a simple object\n     */\n    203: {\n        [key: string]: unknown;\n    };\n};\n\nexport type TypesResponse = TypesResponses[keyof TypesResponses];\n\nexport type ComplexTypesData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * Parameter containing object\n         */\n        parameterObject: {\n            first?: {\n                second?: {\n                    third?: string;\n                };\n            };\n        };\n        /**\n         * This is a model with one string property\n         */\n        parameterReference: {\n            /**\n             * This is a simple string property\n             */\n            prop?: string;\n        };\n    };\n    url: '/api/v{api-version}/complex';\n};\n\nexport type ComplexTypesErrors = {\n    /**\n     * 400 server error\n     */\n    400: unknown;\n    /**\n     * 500 server error\n     */\n    500: unknown;\n};\n\nexport type ComplexTypesResponses = {\n    /**\n     * Successful response\n     */\n    200: Array<ModelWithString>;\n};\n\nexport type ComplexTypesResponse = ComplexTypesResponses[keyof ComplexTypesResponses];\n\nexport type CallWithResultFromHeaderData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/header';\n};\n\nexport type CallWithResultFromHeaderErrors = {\n    /**\n     * 400 server error\n     */\n    400: unknown;\n    /**\n     * 500 server error\n     */\n    500: unknown;\n};\n\nexport type CallWithResultFromHeaderResponses = {\n    /**\n     * Successful response\n     */\n    200: unknown;\n};\n\nexport type TestErrorCodeData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * Status code to return\n         */\n        status: string;\n    };\n    url: '/api/v{api-version}/error';\n};\n\nexport type TestErrorCodeErrors = {\n    /**\n     * Custom message: Internal Server Error\n     */\n    500: unknown;\n    /**\n     * Custom message: Not Implemented\n     */\n    501: unknown;\n    /**\n     * Custom message: Bad Gateway\n     */\n    502: unknown;\n    /**\n     * Custom message: Service Unavailable\n     */\n    503: unknown;\n};\n\nexport type TestErrorCodeResponses = {\n    /**\n     * Custom message: Successful response\n     */\n    200: unknown;\n};\n\nexport type NonAsciiæøåÆøÅöôêÊ字符串Data = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * Dummy input param\n         */\n        nonAsciiParamæøåÆØÅöôêÊ: number;\n    };\n    url: '/api/v{api-version}/non-ascii-æøåÆØÅöôêÊ字符串';\n};\n\nexport type NonAsciiæøåÆøÅöôêÊ字符串Responses = {\n    /**\n     * Successful response\n     */\n    200: NonAsciiStringæøåÆøÅöôêÊ字符串;\n};\n\nexport type NonAsciiæøåÆøÅöôêÊ字符串Response = NonAsciiæøåÆøÅöôêÊ字符串Responses[keyof NonAsciiæøåÆøÅöôêÊ字符串Responses];\n\nexport type PostApiVbyApiVersionBodyData = {\n    /**\n     * Body should not be unknown\n     */\n    body: ParameterActivityParams;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/body';\n};\n\nexport type PostApiVbyApiVersionBodyErrors = {\n    /**\n     * Bad Request\n     */\n    400: FailureFailure;\n    /**\n     * Internal Server Error\n     */\n    500: FailureFailure;\n};\n\nexport type PostApiVbyApiVersionBodyError = PostApiVbyApiVersionBodyErrors[keyof PostApiVbyApiVersionBodyErrors];\n\nexport type PostApiVbyApiVersionBodyResponses = {\n    /**\n     * OK\n     */\n    200: ResponsePostActivityResponse;\n};\n\nexport type PostApiVbyApiVersionBodyResponse = PostApiVbyApiVersionBodyResponses[keyof PostApiVbyApiVersionBodyResponses];\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/svelte-query/name-builder/@tanstack/svelte-query.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport { type DefaultError, type MutationOptions, queryOptions } from '@tanstack/svelte-query';\n\nimport { client } from '../client.gen';\nimport { fooBarPost, fooBarPut, fooPost, fooPut, getFoo, getFooBar, type Options } from '../sdk.gen';\nimport type { FooBarPostData, FooBarPostResponse, FooBarPutData, FooBarPutResponse, FooPostData, FooPostResponse, FooPutData, FooPutResponse, GetFooBarData, GetFooBarResponse, GetFooData, GetFooResponse } from '../types.gen';\n\nexport type QueryKey<TOptions extends Options> = [\n    Pick<TOptions, 'baseUrl' | 'body' | 'headers' | 'path' | 'query'> & {\n        _id: string;\n        _infinite?: boolean;\n        tags?: ReadonlyArray<string>;\n    }\n];\n\nconst createQueryKey = <TOptions extends Options>(id: string, options?: TOptions, infinite?: boolean, tags?: ReadonlyArray<string>): [\n    QueryKey<TOptions>[0]\n] => {\n    const params: QueryKey<TOptions>[0] = { _id: id, baseUrl: options?.baseUrl || (options?.client ?? client).getConfig().baseUrl } as QueryKey<TOptions>[0];\n    if (infinite) {\n        params._infinite = infinite;\n    }\n    if (tags) {\n        params.tags = tags;\n    }\n    if (options?.body) {\n        params.body = options.body;\n    }\n    if (options?.headers) {\n        params.headers = options.headers;\n    }\n    if (options?.path) {\n        params.path = options.path;\n    }\n    if (options?.query) {\n        params.query = options.query;\n    }\n    return [params];\n};\n\nexport const getFooD = (options?: Options<GetFooData>) => createQueryKey('getFoo', options);\n\nexport const getFooE = (options?: Options<GetFooData>) => queryOptions<GetFooResponse, DefaultError, GetFooResponse, ReturnType<typeof getFooD>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await getFoo({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: getFooD(options)\n});\n\nexport const fooPostC = (options?: Partial<Options<FooPostData>>): MutationOptions<FooPostResponse, DefaultError, Options<FooPostData>> => {\n    const mutationOptions: MutationOptions<FooPostResponse, DefaultError, Options<FooPostData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await fooPost({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const fooPutC = (options?: Partial<Options<FooPutData>>): MutationOptions<FooPutResponse, DefaultError, Options<FooPutData>> => {\n    const mutationOptions: MutationOptions<FooPutResponse, DefaultError, Options<FooPutData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await fooPut({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const getFooBarD = (options?: Options<GetFooBarData>) => createQueryKey('getFooBar', options);\n\nexport const getFooBarE = (options?: Options<GetFooBarData>) => queryOptions<GetFooBarResponse, DefaultError, GetFooBarResponse, ReturnType<typeof getFooBarD>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await getFooBar({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: getFooBarD(options)\n});\n\nexport const fooBarPostC = (options?: Partial<Options<FooBarPostData>>): MutationOptions<FooBarPostResponse, DefaultError, Options<FooBarPostData>> => {\n    const mutationOptions: MutationOptions<FooBarPostResponse, DefaultError, Options<FooBarPostData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await fooBarPost({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const fooBarPutC = (options?: Partial<Options<FooBarPutData>>): MutationOptions<FooBarPutResponse, DefaultError, Options<FooBarPutData>> => {\n    const mutationOptions: MutationOptions<FooBarPutResponse, DefaultError, Options<FooBarPutData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await fooBarPut({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/svelte-query/name-builder/client/client.gen.ts",
    "content": "// 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 (options: RequestOptions) => {\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 url = buildUrl(opts);\n\n    return { opts, url };\n  };\n\n  const request: Client['request'] = async (options) => {\n    // @ts-expect-error\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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/svelte-query/name-builder/client/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type { Auth } from '../core/auth.gen';\nexport type { QuerySerializerOptions } from '../core/bodySerializer.gen';\nexport {\n  formDataBodySerializer,\n  jsonBodySerializer,\n  urlSearchParamsBodySerializer,\n} from '../core/bodySerializer.gen';\nexport { buildClientParams } from '../core/params.gen';\nexport { serializeQueryKeyValue } from '../core/queryKeySerializer.gen';\nexport { createClient } from './client.gen';\nexport type {\n  Client,\n  ClientOptions,\n  Config,\n  CreateClientConfig,\n  Options,\n  RequestOptions,\n  RequestResult,\n  ResolvedRequestOptions,\n  ResponseStyle,\n  TDataShape,\n} from './types.gen';\nexport { createConfig, mergeHeaders } from './utils.gen';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/svelte-query/name-builder/client/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { Auth } from '../core/auth.gen';\nimport type {\n  ServerSentEventsOptions,\n  ServerSentEventsResult,\n} from '../core/serverSentEvents.gen';\nimport type { Client as CoreClient, Config as CoreConfig } from '../core/types.gen';\nimport type { Middleware } from './utils.gen';\n\nexport type ResponseStyle = 'data' | 'fields';\n\nexport interface Config<T extends ClientOptions = ClientOptions>\n  extends Omit<RequestInit, 'body' | 'headers' | 'method'>, CoreConfig {\n  /**\n   * Base URL for all requests made by this client.\n   */\n  baseUrl?: T['baseUrl'];\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   * Please don't use the Fetch client for Next.js applications. The `next`\n   * options won't have any effect.\n   *\n   * Install {@link https://www.npmjs.com/package/@hey-api/client-next `@hey-api/client-next`} instead.\n   */\n  next?: never;\n  /**\n   * Return the response data parsed in a specified format. By default, `auto`\n   * will infer the appropriate method from the `Content-Type` response header.\n   * You can override this behavior with any of the {@link Body} methods.\n   * Select `stream` if you don't want to parse response data at all.\n   *\n   * @default 'auto'\n   */\n  parseAs?: 'arrayBuffer' | 'auto' | 'blob' | 'formData' | 'json' | 'stream' | 'text';\n  /**\n   * Should we return only data or multiple fields (data, error, response, etc.)?\n   *\n   * @default 'fields'\n   */\n  responseStyle?: ResponseStyle;\n  /**\n   * Throw an error instead of returning it in the response?\n   *\n   * @default false\n   */\n  throwOnError?: T['throwOnError'];\n}\n\nexport interface RequestOptions<\n  TData = unknown,\n  TResponseStyle extends ResponseStyle = 'fields',\n  ThrowOnError extends boolean = boolean,\n  Url extends string = string,\n>\n  extends\n    Config<{\n      responseStyle: TResponseStyle;\n      throwOnError: ThrowOnError;\n    }>,\n    Pick<\n      ServerSentEventsOptions<TData>,\n      | 'onRequest'\n      | 'onSseError'\n      | 'onSseEvent'\n      | 'sseDefaultRetryDelay'\n      | 'sseMaxRetryAttempts'\n      | 'sseMaxRetryDelay'\n    > {\n  /**\n   * Any body that you want to add to your request.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/fetch#body}\n   */\n  body?: unknown;\n  path?: Record<string, unknown>;\n  query?: Record<string, unknown>;\n  /**\n   * Security mechanism(s) to use for the request.\n   */\n  security?: ReadonlyArray<Auth>;\n  url: Url;\n}\n\nexport interface ResolvedRequestOptions<\n  TResponseStyle extends ResponseStyle = 'fields',\n  ThrowOnError extends boolean = boolean,\n  Url extends string = string,\n> extends RequestOptions<unknown, TResponseStyle, ThrowOnError, Url> {\n  serializedBody?: string;\n}\n\nexport type RequestResult<\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = boolean,\n  TResponseStyle extends ResponseStyle = 'fields',\n> = ThrowOnError extends true\n  ? Promise<\n      TResponseStyle extends 'data'\n        ? TData extends Record<string, unknown>\n          ? TData[keyof TData]\n          : TData\n        : {\n            data: TData extends Record<string, unknown> ? TData[keyof TData] : TData;\n            request: Request;\n            response: Response;\n          }\n    >\n  : Promise<\n      TResponseStyle extends 'data'\n        ? (TData extends Record<string, unknown> ? TData[keyof TData] : TData) | undefined\n        : (\n            | {\n                data: TData extends Record<string, unknown> ? TData[keyof TData] : TData;\n                error: undefined;\n              }\n            | {\n                data: undefined;\n                error: TError extends Record<string, unknown> ? TError[keyof TError] : TError;\n              }\n          ) & {\n            request: Request;\n            response: Response;\n          }\n    >;\n\nexport interface ClientOptions {\n  baseUrl?: string;\n  responseStyle?: ResponseStyle;\n  throwOnError?: boolean;\n}\n\ntype MethodFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'>,\n) => RequestResult<TData, TError, ThrowOnError, TResponseStyle>;\n\ntype SseFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'>,\n) => Promise<ServerSentEventsResult<TData, TError>>;\n\ntype RequestFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'> &\n    Pick<Required<RequestOptions<TData, TResponseStyle, ThrowOnError>>, 'method'>,\n) => RequestResult<TData, TError, ThrowOnError, TResponseStyle>;\n\ntype BuildUrlFn = <\n  TData extends {\n    body?: unknown;\n    path?: Record<string, unknown>;\n    query?: Record<string, unknown>;\n    url: string;\n  },\n>(\n  options: TData & Options<TData>,\n) => string;\n\nexport type Client = CoreClient<RequestFn, Config, MethodFn, BuildUrlFn, SseFn> & {\n  interceptors: Middleware<Request, Response, unknown, ResolvedRequestOptions>;\n};\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 = ClientOptions> = (\n  override?: Config<ClientOptions & T>,\n) => Config<Required<ClientOptions> & T>;\n\nexport interface TDataShape {\n  body?: unknown;\n  headers?: unknown;\n  path?: unknown;\n  query?: unknown;\n  url: string;\n}\n\ntype OmitKeys<T, K> = Pick<T, Exclude<keyof T, K>>;\n\nexport type Options<\n  TData extends TDataShape = TDataShape,\n  ThrowOnError extends boolean = boolean,\n  TResponse = unknown,\n  TResponseStyle extends ResponseStyle = 'fields',\n> = OmitKeys<\n  RequestOptions<TResponse, TResponseStyle, ThrowOnError>,\n  'body' | 'path' | 'query' | 'url'\n> &\n  ([TData] extends [never] ? unknown : Omit<TData, 'url'>);\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/svelte-query/name-builder/client/utils.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/svelte-query/name-builder/client.gen.ts",
    "content": "// 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>());\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/svelte-query/name-builder/core/auth.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/svelte-query/name-builder/core/bodySerializer.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/svelte-query/name-builder/core/params.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/svelte-query/name-builder/core/pathSerializer.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/svelte-query/name-builder/core/queryKeySerializer.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\n/**\n * JSON-friendly union that mirrors what Pinia Colada can hash.\n */\nexport type JsonValue =\n  | null\n  | string\n  | number\n  | boolean\n  | JsonValue[]\n  | { [key: string]: JsonValue };\n\n/**\n * Replacer that converts non-JSON values (bigint, Date, etc.) to safe substitutes.\n */\nexport const queryKeyJsonReplacer = (_key: string, value: unknown) => {\n  if (value === undefined || typeof value === 'function' || typeof value === 'symbol') {\n    return undefined;\n  }\n  if (typeof value === 'bigint') {\n    return value.toString();\n  }\n  if (value instanceof Date) {\n    return value.toISOString();\n  }\n  return value;\n};\n\n/**\n * Safely stringifies a value and parses it back into a JsonValue.\n */\nexport const stringifyToJsonValue = (input: unknown): JsonValue | undefined => {\n  try {\n    const json = JSON.stringify(input, queryKeyJsonReplacer);\n    if (json === undefined) {\n      return undefined;\n    }\n    return JSON.parse(json) as JsonValue;\n  } catch {\n    return undefined;\n  }\n};\n\n/**\n * Detects plain objects (including objects with a null prototype).\n */\nconst isPlainObject = (value: unknown): value is Record<string, unknown> => {\n  if (value === null || typeof value !== 'object') {\n    return false;\n  }\n  const prototype = Object.getPrototypeOf(value as object);\n  return prototype === Object.prototype || prototype === null;\n};\n\n/**\n * Turns URLSearchParams into a sorted JSON object for deterministic keys.\n */\nconst serializeSearchParams = (params: URLSearchParams): JsonValue => {\n  const entries = Array.from(params.entries()).sort(([a], [b]) => a.localeCompare(b));\n  const result: Record<string, JsonValue> = {};\n\n  for (const [key, value] of entries) {\n    const existing = result[key];\n    if (existing === undefined) {\n      result[key] = value;\n      continue;\n    }\n\n    if (Array.isArray(existing)) {\n      (existing as string[]).push(value);\n    } else {\n      result[key] = [existing, value];\n    }\n  }\n\n  return result;\n};\n\n/**\n * Normalizes any accepted value into a JSON-friendly shape for query keys.\n */\nexport const serializeQueryKeyValue = (value: unknown): JsonValue | undefined => {\n  if (value === null) {\n    return null;\n  }\n\n  if (typeof value === 'string' || typeof value === 'number' || typeof value === 'boolean') {\n    return value;\n  }\n\n  if (value === undefined || typeof value === 'function' || typeof value === 'symbol') {\n    return undefined;\n  }\n\n  if (typeof value === 'bigint') {\n    return value.toString();\n  }\n\n  if (value instanceof Date) {\n    return value.toISOString();\n  }\n\n  if (Array.isArray(value)) {\n    return stringifyToJsonValue(value);\n  }\n\n  if (typeof URLSearchParams !== 'undefined' && value instanceof URLSearchParams) {\n    return serializeSearchParams(value);\n  }\n\n  if (isPlainObject(value)) {\n    return stringifyToJsonValue(value);\n  }\n\n  return undefined;\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/svelte-query/name-builder/core/serverSentEvents.gen.ts",
    "content": "// 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 const 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            // Normalize line endings: CRLF -> LF, then CR -> LF\n            buffer = buffer.replace(/\\r\\n/g, '\\n').replace(/\\r/g, '\\n');\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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/svelte-query/name-builder/core/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { Auth, AuthToken } from './auth.gen';\nimport type { BodySerializer, QuerySerializer, QuerySerializerOptions } from './bodySerializer.gen';\n\nexport type HttpMethod =\n  | 'connect'\n  | 'delete'\n  | 'get'\n  | 'head'\n  | 'options'\n  | 'patch'\n  | 'post'\n  | 'put'\n  | 'trace';\n\nexport type Client<\n  RequestFn = never,\n  Config = unknown,\n  MethodFn = never,\n  BuildUrlFn = never,\n  SseFn = never,\n> = {\n  /**\n   * Returns the final request URL.\n   */\n  buildUrl: BuildUrlFn;\n  getConfig: () => Config;\n  request: RequestFn;\n  setConfig: (config: Config) => Config;\n} & {\n  [K in HttpMethod]: MethodFn;\n} & ([SseFn] extends [never] ? { sse?: never } : { sse: { [K in HttpMethod]: SseFn } });\n\nexport interface Config {\n  /**\n   * Auth token or a function returning auth token. The resolved value will be\n   * added to the request payload as defined by its `security` array.\n   */\n  auth?: ((auth: Auth) => Promise<AuthToken> | AuthToken) | AuthToken;\n  /**\n   * A function for serializing request body parameter. By default,\n   * {@link JSON.stringify()} will be used.\n   */\n  bodySerializer?: BodySerializer | null;\n  /**\n   * An object containing any HTTP headers that you want to pre-populate your\n   * `Headers` object with.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/Headers/Headers#init See more}\n   */\n  headers?:\n    | RequestInit['headers']\n    | Record<\n        string,\n        string | number | boolean | (string | number | boolean)[] | null | undefined | unknown\n      >;\n  /**\n   * The request method.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/fetch#method See more}\n   */\n  method?: Uppercase<HttpMethod>;\n  /**\n   * A function for serializing request query parameters. By default, arrays\n   * will be exploded in form style, objects will be exploded in deepObject\n   * style, and reserved characters are percent-encoded.\n   *\n   * This method will have no effect if the native `paramsSerializer()` Axios\n   * API function is used.\n   *\n   * {@link https://swagger.io/docs/specification/serialization/#query View examples}\n   */\n  querySerializer?: QuerySerializer | QuerySerializerOptions;\n  /**\n   * A function validating request data. This is useful if you want to ensure\n   * the request conforms to the desired shape, so it can be safely sent to\n   * the server.\n   */\n  requestValidator?: (data: unknown) => Promise<unknown>;\n  /**\n   * A function transforming response data before it's returned. This is useful\n   * for post-processing data, e.g. converting ISO strings into Date objects.\n   */\n  responseTransformer?: (data: unknown) => Promise<unknown>;\n  /**\n   * A function validating response data. This is useful if you want to ensure\n   * the response conforms to the desired shape, so it can be safely passed to\n   * the transformers and returned to the user.\n   */\n  responseValidator?: (data: unknown) => Promise<unknown>;\n}\n\ntype IsExactlyNeverOrNeverUndefined<T> = [T] extends [never]\n  ? true\n  : [T] extends [never | undefined]\n    ? [undefined] extends [T]\n      ? false\n      : true\n    : false;\n\nexport type OmitNever<T extends Record<string, unknown>> = {\n  [K in keyof T as IsExactlyNeverOrNeverUndefined<T[K]> extends true ? never : K]: T[K];\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/svelte-query/name-builder/core/utils.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/svelte-query/name-builder/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport { fooBarPost, fooBarPut, fooPost, fooPut, getFoo, getFooBar, type Options } from './sdk.gen';\nexport type { ClientOptions, FooBarPostData, FooBarPostResponse, FooBarPostResponses, FooBarPutData, FooBarPutResponse, FooBarPutResponses, FooPostData, FooPostResponse, FooPostResponses, FooPutData, FooPutResponse, FooPutResponses, GetFooBarData, GetFooBarResponse, GetFooBarResponses, GetFooData, GetFooResponse, GetFooResponses } from './types.gen';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/svelte-query/name-builder/sdk.gen.ts",
    "content": "// 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 { FooBarPostData, FooBarPostResponses, FooBarPutData, FooBarPutResponses, FooPostData, FooPostResponses, FooPutData, FooPutResponses, GetFooBarData, GetFooBarResponses, GetFooData, GetFooResponses } from './types.gen';\n\nexport type Options<TData extends TDataShape = TDataShape, ThrowOnError extends boolean = boolean> = Options2<TData, ThrowOnError> & {\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\nexport const getFoo = <ThrowOnError extends boolean = false>(options?: Options<GetFooData, ThrowOnError>) => (options?.client ?? client).get<GetFooResponses, unknown, ThrowOnError>({ url: '/foo', ...options });\n\nexport const fooPost = <ThrowOnError extends boolean = false>(options?: Options<FooPostData, ThrowOnError>) => (options?.client ?? client).post<FooPostResponses, unknown, ThrowOnError>({ url: '/foo', ...options });\n\nexport const fooPut = <ThrowOnError extends boolean = false>(options?: Options<FooPutData, ThrowOnError>) => (options?.client ?? client).put<FooPutResponses, unknown, ThrowOnError>({ url: '/foo', ...options });\n\nexport const getFooBar = <ThrowOnError extends boolean = false>(options?: Options<GetFooBarData, ThrowOnError>) => (options?.client ?? client).get<GetFooBarResponses, unknown, ThrowOnError>({ url: '/foo/bar', ...options });\n\nexport const fooBarPost = <ThrowOnError extends boolean = false>(options?: Options<FooBarPostData, ThrowOnError>) => (options?.client ?? client).post<FooBarPostResponses, unknown, ThrowOnError>({ url: '/foo/bar', ...options });\n\nexport const fooBarPut = <ThrowOnError extends boolean = false>(options?: Options<FooBarPutData, ThrowOnError>) => (options?.client ?? client).put<FooBarPutResponses, unknown, ThrowOnError>({ url: '/foo/bar', ...options });\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/svelte-query/name-builder/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type ClientOptions = {\n    baseUrl: string;\n};\n\nexport type GetFooData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/foo';\n};\n\nexport type GetFooResponses = {\n    /**\n     * OK\n     */\n    200: string;\n};\n\nexport type GetFooResponse = GetFooResponses[keyof GetFooResponses];\n\nexport type FooPostData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/foo';\n};\n\nexport type FooPostResponses = {\n    /**\n     * OK\n     */\n    200: string;\n};\n\nexport type FooPostResponse = FooPostResponses[keyof FooPostResponses];\n\nexport type FooPutData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/foo';\n};\n\nexport type FooPutResponses = {\n    /**\n     * OK\n     */\n    200: string;\n};\n\nexport type FooPutResponse = FooPutResponses[keyof FooPutResponses];\n\nexport type GetFooBarData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/foo/bar';\n};\n\nexport type GetFooBarResponses = {\n    /**\n     * OK\n     */\n    200: string;\n};\n\nexport type GetFooBarResponse = GetFooBarResponses[keyof GetFooBarResponses];\n\nexport type FooBarPostData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/foo/bar';\n};\n\nexport type FooBarPostResponses = {\n    /**\n     * OK\n     */\n    200: string;\n};\n\nexport type FooBarPostResponse = FooBarPostResponses[keyof FooBarPostResponses];\n\nexport type FooBarPutData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/foo/bar';\n};\n\nexport type FooBarPutResponses = {\n    /**\n     * OK\n     */\n    200: string;\n};\n\nexport type FooBarPutResponse = FooBarPutResponses[keyof FooBarPutResponses];\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/vue-query/asClass/@tanstack/vue-query.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport { type DefaultError, queryOptions, type UseMutationOptions } from '@tanstack/vue-query';\n\nimport { client } from '../client.gen';\nimport { BarBazService, BarService, FooBazService, FooService, type Options } from '../sdk.gen';\nimport type { FooBarPostData, FooBarPostResponse, FooBarPutData, FooBarPutResponse, FooPostData, FooPostResponse, FooPutData, FooPutResponse, GetFooBarData, GetFooBarResponse, GetFooData, GetFooResponse } from '../types.gen';\n\nexport type QueryKey<TOptions extends Options> = [\n    Pick<TOptions, 'baseUrl' | 'body' | 'headers' | 'path' | 'query'> & {\n        _id: string;\n        _infinite?: boolean;\n        tags?: ReadonlyArray<string>;\n    }\n];\n\nconst createQueryKey = <TOptions extends Options>(id: string, options?: TOptions, infinite?: boolean, tags?: ReadonlyArray<string>): [\n    QueryKey<TOptions>[0]\n] => {\n    const params: QueryKey<TOptions>[0] = { _id: id, baseUrl: options?.baseUrl || (options?.client ?? client).getConfig().baseUrl } as QueryKey<TOptions>[0];\n    if (infinite) {\n        params._infinite = infinite;\n    }\n    if (tags) {\n        params.tags = tags;\n    }\n    if (options?.body) {\n        params.body = options.body;\n    }\n    if (options?.headers) {\n        params.headers = options.headers;\n    }\n    if (options?.path) {\n        params.path = options.path;\n    }\n    if (options?.query) {\n        params.query = options.query;\n    }\n    return [params];\n};\n\nexport const getFooQueryKey = (options?: Options<GetFooData>) => createQueryKey('getFoo', options);\n\nexport const getFooOptions = (options?: Options<GetFooData>) => queryOptions<GetFooResponse, DefaultError, GetFooResponse, ReturnType<typeof getFooQueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await FooBazService.getFoo({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: getFooQueryKey(options)\n});\n\nexport const fooPostMutation = (options?: Partial<Options<FooPostData>>): UseMutationOptions<FooPostResponse, DefaultError, Options<FooPostData>> => {\n    const mutationOptions: UseMutationOptions<FooPostResponse, DefaultError, Options<FooPostData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await FooService.post({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const fooPutMutation = (options?: Partial<Options<FooPutData>>): UseMutationOptions<FooPutResponse, DefaultError, Options<FooPutData>> => {\n    const mutationOptions: UseMutationOptions<FooPutResponse, DefaultError, Options<FooPutData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await FooService.put({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const getFooBarQueryKey = (options?: Options<GetFooBarData>) => createQueryKey('getFooBar', options);\n\nexport const getFooBarOptions = (options?: Options<GetFooBarData>) => queryOptions<GetFooBarResponse, DefaultError, GetFooBarResponse, ReturnType<typeof getFooBarQueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await BarBazService.getFooBar({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: getFooBarQueryKey(options)\n});\n\nexport const fooBarPostMutation = (options?: Partial<Options<FooBarPostData>>): UseMutationOptions<FooBarPostResponse, DefaultError, Options<FooBarPostData>> => {\n    const mutationOptions: UseMutationOptions<FooBarPostResponse, DefaultError, Options<FooBarPostData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await BarService.post({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const fooBarPutMutation = (options?: Partial<Options<FooBarPutData>>): UseMutationOptions<FooBarPutResponse, DefaultError, Options<FooBarPutData>> => {\n    const mutationOptions: UseMutationOptions<FooBarPutResponse, DefaultError, Options<FooBarPutData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await BarService.put({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/vue-query/asClass/client/client.gen.ts",
    "content": "// 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 (options: RequestOptions) => {\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 url = buildUrl(opts);\n\n    return { opts, url };\n  };\n\n  const request: Client['request'] = async (options) => {\n    // @ts-expect-error\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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/vue-query/asClass/client/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type { Auth } from '../core/auth.gen';\nexport type { QuerySerializerOptions } from '../core/bodySerializer.gen';\nexport {\n  formDataBodySerializer,\n  jsonBodySerializer,\n  urlSearchParamsBodySerializer,\n} from '../core/bodySerializer.gen';\nexport { buildClientParams } from '../core/params.gen';\nexport { serializeQueryKeyValue } from '../core/queryKeySerializer.gen';\nexport { createClient } from './client.gen';\nexport type {\n  Client,\n  ClientOptions,\n  Config,\n  CreateClientConfig,\n  Options,\n  RequestOptions,\n  RequestResult,\n  ResolvedRequestOptions,\n  ResponseStyle,\n  TDataShape,\n} from './types.gen';\nexport { createConfig, mergeHeaders } from './utils.gen';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/vue-query/asClass/client/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { Auth } from '../core/auth.gen';\nimport type {\n  ServerSentEventsOptions,\n  ServerSentEventsResult,\n} from '../core/serverSentEvents.gen';\nimport type { Client as CoreClient, Config as CoreConfig } from '../core/types.gen';\nimport type { Middleware } from './utils.gen';\n\nexport type ResponseStyle = 'data' | 'fields';\n\nexport interface Config<T extends ClientOptions = ClientOptions>\n  extends Omit<RequestInit, 'body' | 'headers' | 'method'>, CoreConfig {\n  /**\n   * Base URL for all requests made by this client.\n   */\n  baseUrl?: T['baseUrl'];\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   * Please don't use the Fetch client for Next.js applications. The `next`\n   * options won't have any effect.\n   *\n   * Install {@link https://www.npmjs.com/package/@hey-api/client-next `@hey-api/client-next`} instead.\n   */\n  next?: never;\n  /**\n   * Return the response data parsed in a specified format. By default, `auto`\n   * will infer the appropriate method from the `Content-Type` response header.\n   * You can override this behavior with any of the {@link Body} methods.\n   * Select `stream` if you don't want to parse response data at all.\n   *\n   * @default 'auto'\n   */\n  parseAs?: 'arrayBuffer' | 'auto' | 'blob' | 'formData' | 'json' | 'stream' | 'text';\n  /**\n   * Should we return only data or multiple fields (data, error, response, etc.)?\n   *\n   * @default 'fields'\n   */\n  responseStyle?: ResponseStyle;\n  /**\n   * Throw an error instead of returning it in the response?\n   *\n   * @default false\n   */\n  throwOnError?: T['throwOnError'];\n}\n\nexport interface RequestOptions<\n  TData = unknown,\n  TResponseStyle extends ResponseStyle = 'fields',\n  ThrowOnError extends boolean = boolean,\n  Url extends string = string,\n>\n  extends\n    Config<{\n      responseStyle: TResponseStyle;\n      throwOnError: ThrowOnError;\n    }>,\n    Pick<\n      ServerSentEventsOptions<TData>,\n      | 'onRequest'\n      | 'onSseError'\n      | 'onSseEvent'\n      | 'sseDefaultRetryDelay'\n      | 'sseMaxRetryAttempts'\n      | 'sseMaxRetryDelay'\n    > {\n  /**\n   * Any body that you want to add to your request.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/fetch#body}\n   */\n  body?: unknown;\n  path?: Record<string, unknown>;\n  query?: Record<string, unknown>;\n  /**\n   * Security mechanism(s) to use for the request.\n   */\n  security?: ReadonlyArray<Auth>;\n  url: Url;\n}\n\nexport interface ResolvedRequestOptions<\n  TResponseStyle extends ResponseStyle = 'fields',\n  ThrowOnError extends boolean = boolean,\n  Url extends string = string,\n> extends RequestOptions<unknown, TResponseStyle, ThrowOnError, Url> {\n  serializedBody?: string;\n}\n\nexport type RequestResult<\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = boolean,\n  TResponseStyle extends ResponseStyle = 'fields',\n> = ThrowOnError extends true\n  ? Promise<\n      TResponseStyle extends 'data'\n        ? TData extends Record<string, unknown>\n          ? TData[keyof TData]\n          : TData\n        : {\n            data: TData extends Record<string, unknown> ? TData[keyof TData] : TData;\n            request: Request;\n            response: Response;\n          }\n    >\n  : Promise<\n      TResponseStyle extends 'data'\n        ? (TData extends Record<string, unknown> ? TData[keyof TData] : TData) | undefined\n        : (\n            | {\n                data: TData extends Record<string, unknown> ? TData[keyof TData] : TData;\n                error: undefined;\n              }\n            | {\n                data: undefined;\n                error: TError extends Record<string, unknown> ? TError[keyof TError] : TError;\n              }\n          ) & {\n            request: Request;\n            response: Response;\n          }\n    >;\n\nexport interface ClientOptions {\n  baseUrl?: string;\n  responseStyle?: ResponseStyle;\n  throwOnError?: boolean;\n}\n\ntype MethodFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'>,\n) => RequestResult<TData, TError, ThrowOnError, TResponseStyle>;\n\ntype SseFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'>,\n) => Promise<ServerSentEventsResult<TData, TError>>;\n\ntype RequestFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'> &\n    Pick<Required<RequestOptions<TData, TResponseStyle, ThrowOnError>>, 'method'>,\n) => RequestResult<TData, TError, ThrowOnError, TResponseStyle>;\n\ntype BuildUrlFn = <\n  TData extends {\n    body?: unknown;\n    path?: Record<string, unknown>;\n    query?: Record<string, unknown>;\n    url: string;\n  },\n>(\n  options: TData & Options<TData>,\n) => string;\n\nexport type Client = CoreClient<RequestFn, Config, MethodFn, BuildUrlFn, SseFn> & {\n  interceptors: Middleware<Request, Response, unknown, ResolvedRequestOptions>;\n};\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 = ClientOptions> = (\n  override?: Config<ClientOptions & T>,\n) => Config<Required<ClientOptions> & T>;\n\nexport interface TDataShape {\n  body?: unknown;\n  headers?: unknown;\n  path?: unknown;\n  query?: unknown;\n  url: string;\n}\n\ntype OmitKeys<T, K> = Pick<T, Exclude<keyof T, K>>;\n\nexport type Options<\n  TData extends TDataShape = TDataShape,\n  ThrowOnError extends boolean = boolean,\n  TResponse = unknown,\n  TResponseStyle extends ResponseStyle = 'fields',\n> = OmitKeys<\n  RequestOptions<TResponse, TResponseStyle, ThrowOnError>,\n  'body' | 'path' | 'query' | 'url'\n> &\n  ([TData] extends [never] ? unknown : Omit<TData, 'url'>);\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/vue-query/asClass/client/utils.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/vue-query/asClass/client.gen.ts",
    "content": "// 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>());\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/vue-query/asClass/core/auth.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/vue-query/asClass/core/bodySerializer.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/vue-query/asClass/core/params.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/vue-query/asClass/core/pathSerializer.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/vue-query/asClass/core/queryKeySerializer.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\n/**\n * JSON-friendly union that mirrors what Pinia Colada can hash.\n */\nexport type JsonValue =\n  | null\n  | string\n  | number\n  | boolean\n  | JsonValue[]\n  | { [key: string]: JsonValue };\n\n/**\n * Replacer that converts non-JSON values (bigint, Date, etc.) to safe substitutes.\n */\nexport const queryKeyJsonReplacer = (_key: string, value: unknown) => {\n  if (value === undefined || typeof value === 'function' || typeof value === 'symbol') {\n    return undefined;\n  }\n  if (typeof value === 'bigint') {\n    return value.toString();\n  }\n  if (value instanceof Date) {\n    return value.toISOString();\n  }\n  return value;\n};\n\n/**\n * Safely stringifies a value and parses it back into a JsonValue.\n */\nexport const stringifyToJsonValue = (input: unknown): JsonValue | undefined => {\n  try {\n    const json = JSON.stringify(input, queryKeyJsonReplacer);\n    if (json === undefined) {\n      return undefined;\n    }\n    return JSON.parse(json) as JsonValue;\n  } catch {\n    return undefined;\n  }\n};\n\n/**\n * Detects plain objects (including objects with a null prototype).\n */\nconst isPlainObject = (value: unknown): value is Record<string, unknown> => {\n  if (value === null || typeof value !== 'object') {\n    return false;\n  }\n  const prototype = Object.getPrototypeOf(value as object);\n  return prototype === Object.prototype || prototype === null;\n};\n\n/**\n * Turns URLSearchParams into a sorted JSON object for deterministic keys.\n */\nconst serializeSearchParams = (params: URLSearchParams): JsonValue => {\n  const entries = Array.from(params.entries()).sort(([a], [b]) => a.localeCompare(b));\n  const result: Record<string, JsonValue> = {};\n\n  for (const [key, value] of entries) {\n    const existing = result[key];\n    if (existing === undefined) {\n      result[key] = value;\n      continue;\n    }\n\n    if (Array.isArray(existing)) {\n      (existing as string[]).push(value);\n    } else {\n      result[key] = [existing, value];\n    }\n  }\n\n  return result;\n};\n\n/**\n * Normalizes any accepted value into a JSON-friendly shape for query keys.\n */\nexport const serializeQueryKeyValue = (value: unknown): JsonValue | undefined => {\n  if (value === null) {\n    return null;\n  }\n\n  if (typeof value === 'string' || typeof value === 'number' || typeof value === 'boolean') {\n    return value;\n  }\n\n  if (value === undefined || typeof value === 'function' || typeof value === 'symbol') {\n    return undefined;\n  }\n\n  if (typeof value === 'bigint') {\n    return value.toString();\n  }\n\n  if (value instanceof Date) {\n    return value.toISOString();\n  }\n\n  if (Array.isArray(value)) {\n    return stringifyToJsonValue(value);\n  }\n\n  if (typeof URLSearchParams !== 'undefined' && value instanceof URLSearchParams) {\n    return serializeSearchParams(value);\n  }\n\n  if (isPlainObject(value)) {\n    return stringifyToJsonValue(value);\n  }\n\n  return undefined;\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/vue-query/asClass/core/serverSentEvents.gen.ts",
    "content": "// 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 const 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            // Normalize line endings: CRLF -> LF, then CR -> LF\n            buffer = buffer.replace(/\\r\\n/g, '\\n').replace(/\\r/g, '\\n');\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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/vue-query/asClass/core/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { Auth, AuthToken } from './auth.gen';\nimport type { BodySerializer, QuerySerializer, QuerySerializerOptions } from './bodySerializer.gen';\n\nexport type HttpMethod =\n  | 'connect'\n  | 'delete'\n  | 'get'\n  | 'head'\n  | 'options'\n  | 'patch'\n  | 'post'\n  | 'put'\n  | 'trace';\n\nexport type Client<\n  RequestFn = never,\n  Config = unknown,\n  MethodFn = never,\n  BuildUrlFn = never,\n  SseFn = never,\n> = {\n  /**\n   * Returns the final request URL.\n   */\n  buildUrl: BuildUrlFn;\n  getConfig: () => Config;\n  request: RequestFn;\n  setConfig: (config: Config) => Config;\n} & {\n  [K in HttpMethod]: MethodFn;\n} & ([SseFn] extends [never] ? { sse?: never } : { sse: { [K in HttpMethod]: SseFn } });\n\nexport interface Config {\n  /**\n   * Auth token or a function returning auth token. The resolved value will be\n   * added to the request payload as defined by its `security` array.\n   */\n  auth?: ((auth: Auth) => Promise<AuthToken> | AuthToken) | AuthToken;\n  /**\n   * A function for serializing request body parameter. By default,\n   * {@link JSON.stringify()} will be used.\n   */\n  bodySerializer?: BodySerializer | null;\n  /**\n   * An object containing any HTTP headers that you want to pre-populate your\n   * `Headers` object with.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/Headers/Headers#init See more}\n   */\n  headers?:\n    | RequestInit['headers']\n    | Record<\n        string,\n        string | number | boolean | (string | number | boolean)[] | null | undefined | unknown\n      >;\n  /**\n   * The request method.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/fetch#method See more}\n   */\n  method?: Uppercase<HttpMethod>;\n  /**\n   * A function for serializing request query parameters. By default, arrays\n   * will be exploded in form style, objects will be exploded in deepObject\n   * style, and reserved characters are percent-encoded.\n   *\n   * This method will have no effect if the native `paramsSerializer()` Axios\n   * API function is used.\n   *\n   * {@link https://swagger.io/docs/specification/serialization/#query View examples}\n   */\n  querySerializer?: QuerySerializer | QuerySerializerOptions;\n  /**\n   * A function validating request data. This is useful if you want to ensure\n   * the request conforms to the desired shape, so it can be safely sent to\n   * the server.\n   */\n  requestValidator?: (data: unknown) => Promise<unknown>;\n  /**\n   * A function transforming response data before it's returned. This is useful\n   * for post-processing data, e.g. converting ISO strings into Date objects.\n   */\n  responseTransformer?: (data: unknown) => Promise<unknown>;\n  /**\n   * A function validating response data. This is useful if you want to ensure\n   * the response conforms to the desired shape, so it can be safely passed to\n   * the transformers and returned to the user.\n   */\n  responseValidator?: (data: unknown) => Promise<unknown>;\n}\n\ntype IsExactlyNeverOrNeverUndefined<T> = [T] extends [never]\n  ? true\n  : [T] extends [never | undefined]\n    ? [undefined] extends [T]\n      ? false\n      : true\n    : false;\n\nexport type OmitNever<T extends Record<string, unknown>> = {\n  [K in keyof T as IsExactlyNeverOrNeverUndefined<T[K]> extends true ? never : K]: T[K];\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/vue-query/asClass/core/utils.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/vue-query/asClass/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport { BarBazService, BarService, BarService2, FooBazService, FooService, FooService2, type Options } from './sdk.gen';\nexport type { ClientOptions, FooBarPostData, FooBarPostResponse, FooBarPostResponses, FooBarPutData, FooBarPutResponse, FooBarPutResponses, FooPostData, FooPostResponse, FooPostResponses, FooPutData, FooPutResponse, FooPutResponses, GetFooBarData, GetFooBarResponse, GetFooBarResponses, GetFooData, GetFooResponse, GetFooResponses } from './types.gen';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/vue-query/asClass/sdk.gen.ts",
    "content": "// 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 { FooBarPostData, FooBarPostResponses, FooBarPutData, FooBarPutResponses, FooPostData, FooPostResponses, FooPutData, FooPutResponses, GetFooBarData, GetFooBarResponses, GetFooData, GetFooResponses } from './types.gen';\n\nexport type Options<TData extends TDataShape = TDataShape, ThrowOnError extends boolean = boolean> = Options2<TData, ThrowOnError> & {\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\nexport class BarService {\n    public static post<ThrowOnError extends boolean = false>(options?: Options<FooBarPostData, ThrowOnError>) {\n        return (options?.client ?? client).post<FooBarPostResponses, unknown, ThrowOnError>({ url: '/foo/bar', ...options });\n    }\n    \n    public static put<ThrowOnError extends boolean = false>(options?: Options<FooBarPutData, ThrowOnError>) {\n        return (options?.client ?? client).put<FooBarPutResponses, unknown, ThrowOnError>({ url: '/foo/bar', ...options });\n    }\n}\n\nexport class FooService {\n    public static post<ThrowOnError extends boolean = false>(options?: Options<FooPostData, ThrowOnError>) {\n        return (options?.client ?? client).post<FooPostResponses, unknown, ThrowOnError>({ url: '/foo', ...options });\n    }\n    \n    public static put<ThrowOnError extends boolean = false>(options?: Options<FooPutData, ThrowOnError>) {\n        return (options?.client ?? client).put<FooPutResponses, unknown, ThrowOnError>({ url: '/foo', ...options });\n    }\n    \n    static barService = BarService;\n}\n\nexport class FooBazService {\n    public static getFoo<ThrowOnError extends boolean = false>(options?: Options<GetFooData, ThrowOnError>) {\n        return (options?.client ?? client).get<GetFooResponses, unknown, ThrowOnError>({ url: '/foo', ...options });\n    }\n    \n    static fooService = FooService;\n}\n\nexport class BarService2 {\n    public static post<ThrowOnError extends boolean = false>(options?: Options<FooBarPostData, ThrowOnError>) {\n        return (options?.client ?? client).post<FooBarPostResponses, unknown, ThrowOnError>({ url: '/foo/bar', ...options });\n    }\n    \n    public static put<ThrowOnError extends boolean = false>(options?: Options<FooBarPutData, ThrowOnError>) {\n        return (options?.client ?? client).put<FooBarPutResponses, unknown, ThrowOnError>({ url: '/foo/bar', ...options });\n    }\n}\n\nexport class FooService2 {\n    static barService = BarService2;\n}\n\nexport class BarBazService {\n    public static getFooBar<ThrowOnError extends boolean = false>(options?: Options<GetFooBarData, ThrowOnError>) {\n        return (options?.client ?? client).get<GetFooBarResponses, unknown, ThrowOnError>({ url: '/foo/bar', ...options });\n    }\n    \n    static fooService = FooService2;\n}\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/vue-query/asClass/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type ClientOptions = {\n    baseUrl: string;\n};\n\nexport type GetFooData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/foo';\n};\n\nexport type GetFooResponses = {\n    /**\n     * OK\n     */\n    200: string;\n};\n\nexport type GetFooResponse = GetFooResponses[keyof GetFooResponses];\n\nexport type FooPostData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/foo';\n};\n\nexport type FooPostResponses = {\n    /**\n     * OK\n     */\n    200: string;\n};\n\nexport type FooPostResponse = FooPostResponses[keyof FooPostResponses];\n\nexport type FooPutData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/foo';\n};\n\nexport type FooPutResponses = {\n    /**\n     * OK\n     */\n    200: string;\n};\n\nexport type FooPutResponse = FooPutResponses[keyof FooPutResponses];\n\nexport type GetFooBarData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/foo/bar';\n};\n\nexport type GetFooBarResponses = {\n    /**\n     * OK\n     */\n    200: string;\n};\n\nexport type GetFooBarResponse = GetFooBarResponses[keyof GetFooBarResponses];\n\nexport type FooBarPostData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/foo/bar';\n};\n\nexport type FooBarPostResponses = {\n    /**\n     * OK\n     */\n    200: string;\n};\n\nexport type FooBarPostResponse = FooBarPostResponses[keyof FooBarPostResponses];\n\nexport type FooBarPutData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/foo/bar';\n};\n\nexport type FooBarPutResponses = {\n    /**\n     * OK\n     */\n    200: string;\n};\n\nexport type FooBarPutResponse = FooBarPutResponses[keyof FooBarPutResponses];\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/vue-query/axios/@tanstack/vue-query.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport { type DefaultError, queryOptions, type UseMutationOptions } from '@tanstack/vue-query';\nimport type { AxiosError } from 'axios';\n\nimport { client } from '../client.gen';\nimport { callToTestOrderOfParams, callWithDefaultOptionalParameters, callWithDefaultParameters, callWithDescriptions, callWithDuplicateResponses, callWithNoContentResponse, callWithParameters, callWithResponse, callWithResponseAndNoContentResponse, callWithResponses, callWithResultFromHeader, callWithWeirdParameterNames, collectionFormat, complexTypes, deleteCallWithoutParametersAndResponse, dummyA, dummyB, duplicateName, duplicateName2, duplicateName3, duplicateName4, fooWow, getCallWithoutParametersAndResponse, nonAsciiæøåÆøÅöôêÊ字符串, type Options, patchApiVbyApiVersionNoTag, patchCallWithoutParametersAndResponse, postApiVbyApiVersionBody, postCallWithoutParametersAndResponse, putCallWithoutParametersAndResponse, serviceWithEmptyTag, testErrorCode, types } from '../sdk.gen';\nimport type { CallToTestOrderOfParamsData, CallWithDefaultOptionalParametersData, CallWithDefaultParametersData, CallWithDescriptionsData, CallWithDuplicateResponsesData, CallWithDuplicateResponsesError, CallWithDuplicateResponsesResponse, CallWithNoContentResponseData, CallWithParametersData, CallWithResponseAndNoContentResponseData, CallWithResponseAndNoContentResponseResponse, CallWithResponseData, CallWithResponseResponse, CallWithResponsesData, CallWithResponsesError, CallWithResponsesResponse, CallWithResultFromHeaderData, CallWithWeirdParameterNamesData, CollectionFormatData, ComplexTypesData, ComplexTypesResponse, DeleteCallWithoutParametersAndResponseData, DummyAData, DummyBData, DuplicateName2Data, DuplicateName3Data, DuplicateName4Data, DuplicateNameData, FooWowData, GetCallWithoutParametersAndResponseData, NonAsciiæøåÆøÅöôêÊ字符串Data, NonAsciiæøåÆøÅöôêÊ字符串Response, PatchApiVbyApiVersionNoTagData, PatchCallWithoutParametersAndResponseData, PostApiVbyApiVersionBodyData, PostApiVbyApiVersionBodyError, PostApiVbyApiVersionBodyResponse, PostCallWithoutParametersAndResponseData, PutCallWithoutParametersAndResponseData, ServiceWithEmptyTagData, TestErrorCodeData, TypesData, TypesResponse } from '../types.gen';\n\nexport type QueryKey<TOptions extends Options> = [\n    Pick<TOptions, 'baseURL' | 'body' | 'headers' | 'path' | 'query'> & {\n        _id: string;\n        _infinite?: boolean;\n        tags?: ReadonlyArray<string>;\n    }\n];\n\nconst createQueryKey = <TOptions extends Options>(id: string, options?: TOptions, infinite?: boolean, tags?: ReadonlyArray<string>): [\n    QueryKey<TOptions>[0]\n] => {\n    const params: QueryKey<TOptions>[0] = { _id: id, baseURL: options?.baseURL || (options?.client ?? client).getConfig().baseURL } as QueryKey<TOptions>[0];\n    if (infinite) {\n        params._infinite = infinite;\n    }\n    if (tags) {\n        params.tags = tags;\n    }\n    if (options?.body) {\n        params.body = options.body;\n    }\n    if (options?.headers) {\n        params.headers = options.headers;\n    }\n    if (options?.path) {\n        params.path = options.path;\n    }\n    if (options?.query) {\n        params.query = options.query;\n    }\n    return [params];\n};\n\nexport const serviceWithEmptyTagQueryKey = (options?: Options<ServiceWithEmptyTagData>) => createQueryKey('serviceWithEmptyTag', options);\n\nexport const serviceWithEmptyTagOptions = (options?: Options<ServiceWithEmptyTagData>) => queryOptions<unknown, AxiosError<DefaultError>, unknown, ReturnType<typeof serviceWithEmptyTagQueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await serviceWithEmptyTag({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: serviceWithEmptyTagQueryKey(options)\n});\n\nexport const patchApiVbyApiVersionNoTagMutation = (options?: Partial<Options<PatchApiVbyApiVersionNoTagData>>): UseMutationOptions<unknown, AxiosError<DefaultError>, Options<PatchApiVbyApiVersionNoTagData>> => {\n    const mutationOptions: UseMutationOptions<unknown, AxiosError<DefaultError>, Options<PatchApiVbyApiVersionNoTagData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await patchApiVbyApiVersionNoTag({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const fooWowMutation = (options?: Partial<Options<FooWowData>>): UseMutationOptions<unknown, AxiosError<DefaultError>, Options<FooWowData>> => {\n    const mutationOptions: UseMutationOptions<unknown, AxiosError<DefaultError>, Options<FooWowData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await fooWow({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const deleteCallWithoutParametersAndResponseMutation = (options?: Partial<Options<DeleteCallWithoutParametersAndResponseData>>): UseMutationOptions<unknown, AxiosError<DefaultError>, Options<DeleteCallWithoutParametersAndResponseData>> => {\n    const mutationOptions: UseMutationOptions<unknown, AxiosError<DefaultError>, Options<DeleteCallWithoutParametersAndResponseData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await deleteCallWithoutParametersAndResponse({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const getCallWithoutParametersAndResponseQueryKey = (options?: Options<GetCallWithoutParametersAndResponseData>) => createQueryKey('getCallWithoutParametersAndResponse', options);\n\nexport const getCallWithoutParametersAndResponseOptions = (options?: Options<GetCallWithoutParametersAndResponseData>) => queryOptions<unknown, AxiosError<DefaultError>, unknown, ReturnType<typeof getCallWithoutParametersAndResponseQueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await getCallWithoutParametersAndResponse({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: getCallWithoutParametersAndResponseQueryKey(options)\n});\n\nexport const patchCallWithoutParametersAndResponseMutation = (options?: Partial<Options<PatchCallWithoutParametersAndResponseData>>): UseMutationOptions<unknown, AxiosError<DefaultError>, Options<PatchCallWithoutParametersAndResponseData>> => {\n    const mutationOptions: UseMutationOptions<unknown, AxiosError<DefaultError>, Options<PatchCallWithoutParametersAndResponseData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await patchCallWithoutParametersAndResponse({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const postCallWithoutParametersAndResponseMutation = (options?: Partial<Options<PostCallWithoutParametersAndResponseData>>): UseMutationOptions<unknown, AxiosError<DefaultError>, Options<PostCallWithoutParametersAndResponseData>> => {\n    const mutationOptions: UseMutationOptions<unknown, AxiosError<DefaultError>, Options<PostCallWithoutParametersAndResponseData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await postCallWithoutParametersAndResponse({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const putCallWithoutParametersAndResponseMutation = (options?: Partial<Options<PutCallWithoutParametersAndResponseData>>): UseMutationOptions<unknown, AxiosError<DefaultError>, Options<PutCallWithoutParametersAndResponseData>> => {\n    const mutationOptions: UseMutationOptions<unknown, AxiosError<DefaultError>, Options<PutCallWithoutParametersAndResponseData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await putCallWithoutParametersAndResponse({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const callWithDescriptionsMutation = (options?: Partial<Options<CallWithDescriptionsData>>): UseMutationOptions<unknown, AxiosError<DefaultError>, Options<CallWithDescriptionsData>> => {\n    const mutationOptions: UseMutationOptions<unknown, AxiosError<DefaultError>, Options<CallWithDescriptionsData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await callWithDescriptions({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const callWithParametersMutation = (options?: Partial<Options<CallWithParametersData>>): UseMutationOptions<unknown, AxiosError<DefaultError>, Options<CallWithParametersData>> => {\n    const mutationOptions: UseMutationOptions<unknown, AxiosError<DefaultError>, Options<CallWithParametersData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await callWithParameters({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const callWithWeirdParameterNamesMutation = (options?: Partial<Options<CallWithWeirdParameterNamesData>>): UseMutationOptions<unknown, AxiosError<DefaultError>, Options<CallWithWeirdParameterNamesData>> => {\n    const mutationOptions: UseMutationOptions<unknown, AxiosError<DefaultError>, Options<CallWithWeirdParameterNamesData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await callWithWeirdParameterNames({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const callWithDefaultParametersQueryKey = (options: Options<CallWithDefaultParametersData>) => createQueryKey('callWithDefaultParameters', options);\n\nexport const callWithDefaultParametersOptions = (options: Options<CallWithDefaultParametersData>) => queryOptions<unknown, AxiosError<DefaultError>, unknown, ReturnType<typeof callWithDefaultParametersQueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await callWithDefaultParameters({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: callWithDefaultParametersQueryKey(options)\n});\n\nexport const callWithDefaultOptionalParametersMutation = (options?: Partial<Options<CallWithDefaultOptionalParametersData>>): UseMutationOptions<unknown, AxiosError<DefaultError>, Options<CallWithDefaultOptionalParametersData>> => {\n    const mutationOptions: UseMutationOptions<unknown, AxiosError<DefaultError>, Options<CallWithDefaultOptionalParametersData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await callWithDefaultOptionalParameters({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const callToTestOrderOfParamsMutation = (options?: Partial<Options<CallToTestOrderOfParamsData>>): UseMutationOptions<unknown, AxiosError<DefaultError>, Options<CallToTestOrderOfParamsData>> => {\n    const mutationOptions: UseMutationOptions<unknown, AxiosError<DefaultError>, Options<CallToTestOrderOfParamsData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await callToTestOrderOfParams({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const duplicateNameMutation = (options?: Partial<Options<DuplicateNameData>>): UseMutationOptions<unknown, AxiosError<DefaultError>, Options<DuplicateNameData>> => {\n    const mutationOptions: UseMutationOptions<unknown, AxiosError<DefaultError>, Options<DuplicateNameData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await duplicateName({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const duplicateName2QueryKey = (options?: Options<DuplicateName2Data>) => createQueryKey('duplicateName2', options);\n\nexport const duplicateName2Options = (options?: Options<DuplicateName2Data>) => queryOptions<unknown, AxiosError<DefaultError>, unknown, ReturnType<typeof duplicateName2QueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await duplicateName2({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: duplicateName2QueryKey(options)\n});\n\nexport const duplicateName3Mutation = (options?: Partial<Options<DuplicateName3Data>>): UseMutationOptions<unknown, AxiosError<DefaultError>, Options<DuplicateName3Data>> => {\n    const mutationOptions: UseMutationOptions<unknown, AxiosError<DefaultError>, Options<DuplicateName3Data>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await duplicateName3({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const duplicateName4Mutation = (options?: Partial<Options<DuplicateName4Data>>): UseMutationOptions<unknown, AxiosError<DefaultError>, Options<DuplicateName4Data>> => {\n    const mutationOptions: UseMutationOptions<unknown, AxiosError<DefaultError>, Options<DuplicateName4Data>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await duplicateName4({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const callWithNoContentResponseQueryKey = (options?: Options<CallWithNoContentResponseData>) => createQueryKey('callWithNoContentResponse', options);\n\nexport const callWithNoContentResponseOptions = (options?: Options<CallWithNoContentResponseData>) => queryOptions<unknown, AxiosError<DefaultError>, unknown, ReturnType<typeof callWithNoContentResponseQueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await callWithNoContentResponse({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: callWithNoContentResponseQueryKey(options)\n});\n\nexport const callWithResponseAndNoContentResponseQueryKey = (options?: Options<CallWithResponseAndNoContentResponseData>) => createQueryKey('callWithResponseAndNoContentResponse', options);\n\nexport const callWithResponseAndNoContentResponseOptions = (options?: Options<CallWithResponseAndNoContentResponseData>) => queryOptions<CallWithResponseAndNoContentResponseResponse, AxiosError<DefaultError>, CallWithResponseAndNoContentResponseResponse, ReturnType<typeof callWithResponseAndNoContentResponseQueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await callWithResponseAndNoContentResponse({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: callWithResponseAndNoContentResponseQueryKey(options)\n});\n\nexport const dummyAQueryKey = (options?: Options<DummyAData>) => createQueryKey('dummyA', options);\n\nexport const dummyAOptions = (options?: Options<DummyAData>) => queryOptions<unknown, AxiosError<DefaultError>, unknown, ReturnType<typeof dummyAQueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await dummyA({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: dummyAQueryKey(options)\n});\n\nexport const dummyBQueryKey = (options?: Options<DummyBData>) => createQueryKey('dummyB', options);\n\nexport const dummyBOptions = (options?: Options<DummyBData>) => queryOptions<unknown, AxiosError<DefaultError>, unknown, ReturnType<typeof dummyBQueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await dummyB({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: dummyBQueryKey(options)\n});\n\nexport const callWithResponseQueryKey = (options?: Options<CallWithResponseData>) => createQueryKey('callWithResponse', options);\n\nexport const callWithResponseOptions = (options?: Options<CallWithResponseData>) => queryOptions<CallWithResponseResponse, AxiosError<DefaultError>, CallWithResponseResponse, ReturnType<typeof callWithResponseQueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await callWithResponse({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: callWithResponseQueryKey(options)\n});\n\nexport const callWithDuplicateResponsesMutation = (options?: Partial<Options<CallWithDuplicateResponsesData>>): UseMutationOptions<CallWithDuplicateResponsesResponse, AxiosError<CallWithDuplicateResponsesError>, Options<CallWithDuplicateResponsesData>> => {\n    const mutationOptions: UseMutationOptions<CallWithDuplicateResponsesResponse, AxiosError<CallWithDuplicateResponsesError>, Options<CallWithDuplicateResponsesData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await callWithDuplicateResponses({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const callWithResponsesMutation = (options?: Partial<Options<CallWithResponsesData>>): UseMutationOptions<CallWithResponsesResponse, AxiosError<CallWithResponsesError>, Options<CallWithResponsesData>> => {\n    const mutationOptions: UseMutationOptions<CallWithResponsesResponse, AxiosError<CallWithResponsesError>, Options<CallWithResponsesData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await callWithResponses({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const collectionFormatQueryKey = (options: Options<CollectionFormatData>) => createQueryKey('collectionFormat', options);\n\nexport const collectionFormatOptions = (options: Options<CollectionFormatData>) => queryOptions<unknown, AxiosError<DefaultError>, unknown, ReturnType<typeof collectionFormatQueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await collectionFormat({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: collectionFormatQueryKey(options)\n});\n\nexport const typesQueryKey = (options: Options<TypesData>) => createQueryKey('types', options);\n\nexport const typesOptions = (options: Options<TypesData>) => queryOptions<TypesResponse, AxiosError<DefaultError>, TypesResponse, ReturnType<typeof typesQueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await types({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: typesQueryKey(options)\n});\n\nexport const complexTypesQueryKey = (options: Options<ComplexTypesData>) => createQueryKey('complexTypes', options);\n\nexport const complexTypesOptions = (options: Options<ComplexTypesData>) => queryOptions<ComplexTypesResponse, AxiosError<DefaultError>, ComplexTypesResponse, ReturnType<typeof complexTypesQueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await complexTypes({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: complexTypesQueryKey(options)\n});\n\nexport const callWithResultFromHeaderMutation = (options?: Partial<Options<CallWithResultFromHeaderData>>): UseMutationOptions<unknown, AxiosError<DefaultError>, Options<CallWithResultFromHeaderData>> => {\n    const mutationOptions: UseMutationOptions<unknown, AxiosError<DefaultError>, Options<CallWithResultFromHeaderData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await callWithResultFromHeader({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const testErrorCodeMutation = (options?: Partial<Options<TestErrorCodeData>>): UseMutationOptions<unknown, AxiosError<DefaultError>, Options<TestErrorCodeData>> => {\n    const mutationOptions: UseMutationOptions<unknown, AxiosError<DefaultError>, Options<TestErrorCodeData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await testErrorCode({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const nonAsciiæøåÆøÅöôêÊ字符串Mutation = (options?: Partial<Options<NonAsciiæøåÆøÅöôêÊ字符串Data>>): UseMutationOptions<NonAsciiæøåÆøÅöôêÊ字符串Response, AxiosError<DefaultError>, Options<NonAsciiæøåÆøÅöôêÊ字符串Data>> => {\n    const mutationOptions: UseMutationOptions<NonAsciiæøåÆøÅöôêÊ字符串Response, AxiosError<DefaultError>, Options<NonAsciiæøåÆøÅöôêÊ字符串Data>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await nonAsciiæøåÆøÅöôêÊ字符串({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\n/**\n * Body should not be unknown\n *\n * Body should not be unknown\n */\nexport const postApiVbyApiVersionBodyMutation = (options?: Partial<Options<PostApiVbyApiVersionBodyData>>): UseMutationOptions<PostApiVbyApiVersionBodyResponse, AxiosError<PostApiVbyApiVersionBodyError>, Options<PostApiVbyApiVersionBodyData>> => {\n    const mutationOptions: UseMutationOptions<PostApiVbyApiVersionBodyResponse, AxiosError<PostApiVbyApiVersionBodyError>, Options<PostApiVbyApiVersionBodyData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await postApiVbyApiVersionBody({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/vue-query/axios/client/client.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { AxiosError, AxiosInstance, RawAxiosRequestHeaders } from 'axios';\nimport axios from 'axios';\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 } from './types.gen';\nimport { buildUrl, createConfig, mergeConfigs, mergeHeaders, setAuthParams } from './utils.gen';\n\nexport const createClient = (config: Config = {}): Client => {\n  let _config = mergeConfigs(createConfig(), config);\n\n  let instance: AxiosInstance;\n\n  if (_config.axios && !('Axios' in _config.axios)) {\n    instance = _config.axios;\n  } else {\n    // eslint-disable-next-line @typescript-eslint/no-unused-vars\n    const { auth, ...configWithoutAuth } = _config;\n    instance = axios.create(configWithoutAuth);\n  }\n\n  const getConfig = (): Config => ({ ..._config });\n\n  const setConfig = (config: Config): Config => {\n    _config = mergeConfigs(_config, config);\n    instance.defaults = {\n      ...instance.defaults,\n      ..._config,\n      // @ts-expect-error\n      headers: mergeHeaders(instance.defaults.headers, _config.headers),\n    };\n    return getConfig();\n  };\n\n  const beforeRequest = async (options: RequestOptions) => {\n    const opts = {\n      ..._config,\n      ...options,\n      axios: options.axios ?? _config.axios ?? instance,\n      headers: mergeHeaders(_config.headers, options.headers),\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.body = opts.bodySerializer(opts.body);\n    }\n\n    const url = buildUrl(opts);\n\n    return { opts, url };\n  };\n\n  // @ts-expect-error\n  const request: Client['request'] = async (options) => {\n    // @ts-expect-error\n    const { opts, url } = await beforeRequest(options);\n    try {\n      // assign Axios here for consistency with fetch\n      const _axios = opts.axios!;\n      // eslint-disable-next-line @typescript-eslint/no-unused-vars\n      const { auth, ...optsWithoutAuth } = opts;\n      const response = await _axios({\n        ...optsWithoutAuth,\n        baseURL: '', // the baseURL is already included in `url`\n        data: getValidRequestBody(opts),\n        headers: opts.headers as RawAxiosRequestHeaders,\n        // let `paramsSerializer()` handle query params if it exists\n        params: opts.paramsSerializer ? opts.query : undefined,\n        url,\n      });\n\n      let { data } = response;\n\n      if (opts.responseType === '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 {\n        ...response,\n        data: data ?? {},\n      };\n    } catch (error) {\n      const e = error as AxiosError;\n      if (opts.throwOnError) {\n        throw e;\n      }\n      // @ts-expect-error\n      e.error = e.response?.data ?? {};\n      return e;\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 Record<string, string>,\n      method,\n      serializedBody: getValidRequestBody(opts) as BodyInit | null | undefined,\n      // @ts-expect-error\n      signal: opts.signal,\n      url,\n    });\n  };\n\n  const _buildUrl: Client['buildUrl'] = (options) =>\n    buildUrl({ axios: instance, ..._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    instance,\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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/vue-query/axios/client/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type { Auth } from '../core/auth.gen';\nexport type { QuerySerializerOptions } from '../core/bodySerializer.gen';\nexport {\n  formDataBodySerializer,\n  jsonBodySerializer,\n  urlSearchParamsBodySerializer,\n} from '../core/bodySerializer.gen';\nexport { buildClientParams } from '../core/params.gen';\nexport { serializeQueryKeyValue } from '../core/queryKeySerializer.gen';\nexport { createClient } from './client.gen';\nexport type {\n  Client,\n  ClientOptions,\n  Config,\n  CreateClientConfig,\n  Options,\n  RequestOptions,\n  RequestResult,\n  TDataShape,\n} from './types.gen';\nexport { createConfig } from './utils.gen';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/vue-query/axios/client/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type {\n  AxiosError,\n  AxiosInstance,\n  AxiosRequestHeaders,\n  AxiosResponse,\n  AxiosStatic,\n  CreateAxiosDefaults,\n} from 'axios';\n\nimport type { Auth } from '../core/auth.gen';\nimport type {\n  ServerSentEventsOptions,\n  ServerSentEventsResult,\n} from '../core/serverSentEvents.gen';\nimport type { Client as CoreClient, Config as CoreConfig } from '../core/types.gen';\n\nexport interface Config<T extends ClientOptions = ClientOptions>\n  extends Omit<CreateAxiosDefaults, 'auth' | 'baseURL' | 'headers' | 'method'>, CoreConfig {\n  /**\n   * Axios implementation. You can use this option to provide either an\n   * `AxiosStatic` or an `AxiosInstance`.\n   *\n   * @default axios\n   */\n  axios?: AxiosStatic | AxiosInstance;\n  /**\n   * Base URL for all requests made by this client.\n   */\n  baseURL?: T['baseURL'];\n  /**\n   * An object containing any HTTP headers that you want to pre-populate your\n   * `Headers` object with.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/Headers/Headers#init See more}\n   */\n  headers?:\n    | AxiosRequestHeaders\n    | Record<\n        string,\n        string | number | boolean | (string | number | boolean)[] | null | undefined | unknown\n      >;\n  /**\n   * Throw an error instead of returning it in the response?\n   *\n   * @default false\n   */\n  throwOnError?: T['throwOnError'];\n}\n\nexport interface RequestOptions<\n  TData = unknown,\n  ThrowOnError extends boolean = boolean,\n  Url extends string = string,\n>\n  extends\n    Config<{\n      throwOnError: ThrowOnError;\n    }>,\n    Pick<\n      ServerSentEventsOptions<TData>,\n      | 'onRequest'\n      | 'onSseError'\n      | 'onSseEvent'\n      | 'sseDefaultRetryDelay'\n      | 'sseMaxRetryAttempts'\n      | 'sseMaxRetryDelay'\n    > {\n  /**\n   * Any body that you want to add to your request.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/fetch#body}\n   */\n  body?: unknown;\n  path?: Record<string, unknown>;\n  query?: Record<string, unknown>;\n  /**\n   * Security mechanism(s) to use for the request.\n   */\n  security?: ReadonlyArray<Auth>;\n  url: Url;\n}\n\nexport interface ClientOptions {\n  baseURL?: string;\n  throwOnError?: boolean;\n}\n\nexport type RequestResult<\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = boolean,\n> = ThrowOnError extends true\n  ? Promise<AxiosResponse<TData extends Record<string, unknown> ? TData[keyof TData] : TData>>\n  : Promise<\n      | (AxiosResponse<TData extends Record<string, unknown> ? TData[keyof TData] : TData> & {\n          error: undefined;\n        })\n      | (AxiosError<TError extends Record<string, unknown> ? TError[keyof TError] : TError> & {\n          data: undefined;\n          error: TError extends Record<string, unknown> ? TError[keyof TError] : TError;\n        })\n    >;\n\ntype MethodFn = <TData = unknown, TError = unknown, ThrowOnError extends boolean = false>(\n  options: Omit<RequestOptions<TData, ThrowOnError>, 'method'>,\n) => RequestResult<TData, TError, ThrowOnError>;\n\ntype SseFn = <TData = unknown, TError = unknown, ThrowOnError extends boolean = false>(\n  options: Omit<RequestOptions<TData, ThrowOnError>, 'method'>,\n) => Promise<ServerSentEventsResult<TData, TError>>;\n\ntype RequestFn = <TData = unknown, TError = unknown, ThrowOnError extends boolean = false>(\n  options: Omit<RequestOptions<TData, ThrowOnError>, 'method'> &\n    Pick<Required<RequestOptions<TData, ThrowOnError>>, 'method'>,\n) => RequestResult<TData, TError, ThrowOnError>;\n\ntype BuildUrlFn = <\n  TData extends {\n    body?: unknown;\n    path?: Record<string, unknown>;\n    query?: Record<string, unknown>;\n    url: string;\n  },\n>(\n  options: TData & Options<TData>,\n) => string;\n\nexport type Client = CoreClient<RequestFn, Config, MethodFn, BuildUrlFn, SseFn> & {\n  instance: AxiosInstance;\n};\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 = ClientOptions> = (\n  override?: Config<ClientOptions & T>,\n) => Config<Required<ClientOptions> & T>;\n\nexport interface TDataShape {\n  body?: unknown;\n  headers?: unknown;\n  path?: unknown;\n  query?: unknown;\n  url: string;\n}\n\ntype OmitKeys<T, K> = Pick<T, Exclude<keyof T, K>>;\n\nexport type Options<\n  TData extends TDataShape = TDataShape,\n  ThrowOnError extends boolean = boolean,\n  TResponse = unknown,\n> = OmitKeys<RequestOptions<TResponse, ThrowOnError>, 'body' | 'path' | 'query' | 'url'> &\n  ([TData] extends [never] ? unknown : Omit<TData, 'url'>);\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/vue-query/axios/client/utils.gen.ts",
    "content": "// 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 {\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\nconst checkForExistence = (\n  options: Pick<RequestOptions, 'auth' | 'query'> & {\n    headers: Record<any, unknown>;\n  },\n  name?: string,\n): boolean => {\n  if (!name) {\n    return false;\n  }\n  if (name in options.headers || options.query?.[name]) {\n    return true;\n  }\n  if (\n    'Cookie' in options.headers &&\n    options.headers['Cookie'] &&\n    typeof options.headers['Cookie'] === 'string'\n  ) {\n    return options.headers['Cookie'].includes(`${name}=`);\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: Record<any, unknown>;\n  }) => {\n  for (const auth of security) {\n    if (checkForExistence(options, auth.name)) {\n      continue;\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        const value = `${name}=${token}`;\n        if ('Cookie' in options.headers && options.headers['Cookie']) {\n          options.headers['Cookie'] = `${options.headers['Cookie']}; ${value}`;\n        } else {\n          options.headers['Cookie'] = value;\n        }\n        break;\n      }\n      case 'header':\n      default:\n        options.headers[name] = token;\n        break;\n    }\n  }\n};\n\nexport const buildUrl: Client['buildUrl'] = (options) => {\n  const instanceBaseUrl = options.axios?.defaults?.baseURL;\n\n  const baseUrl =\n    !!options.baseURL && typeof options.baseURL === 'string' ? options.baseURL : instanceBaseUrl;\n\n  return getUrl({\n    baseUrl: baseUrl as string,\n    path: options.path,\n    // let `paramsSerializer()` handle query params if it exists\n    query: !options.paramsSerializer ? options.query : undefined,\n    querySerializer:\n      typeof options.querySerializer === 'function'\n        ? options.querySerializer\n        : createQuerySerializer(options.querySerializer),\n    url: options.url,\n  });\n};\n\nexport const mergeConfigs = (a: Config, b: Config): Config => {\n  const config = { ...a, ...b };\n  config.headers = mergeHeaders(a.headers, b.headers);\n  return config;\n};\n\n/**\n * Special Axios headers keywords allowing to set headers by request method.\n */\nexport const axiosHeadersKeywords = [\n  'common',\n  'delete',\n  'get',\n  'head',\n  'patch',\n  'post',\n  'put',\n] as const;\n\nexport const mergeHeaders = (\n  ...headers: Array<Required<Config>['headers'] | undefined>\n): Record<any, unknown> => {\n  const mergedHeaders: Record<any, unknown> = {};\n  for (const header of headers) {\n    if (!header || typeof header !== 'object') {\n      continue;\n    }\n\n    const iterator = Object.entries(header);\n\n    for (const [key, value] of iterator) {\n      if (\n        axiosHeadersKeywords.includes(key as (typeof axiosHeadersKeywords)[number]) &&\n        typeof value === 'object'\n      ) {\n        mergedHeaders[key] = {\n          ...(mergedHeaders[key] as Record<any, unknown>),\n          ...value,\n        };\n      } else if (value === null) {\n        delete mergedHeaders[key];\n      } else if (Array.isArray(value)) {\n        for (const v of value) {\n          // @ts-expect-error\n          mergedHeaders[key] = [...(mergedHeaders[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[key] = typeof value === 'object' ? JSON.stringify(value) : (value as string);\n      }\n    }\n  }\n  return mergedHeaders;\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  ...override,\n});\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/vue-query/axios/client.gen.ts",
    "content": "// 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: 'http://localhost:3000/base' }));\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/vue-query/axios/core/auth.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/vue-query/axios/core/bodySerializer.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/vue-query/axios/core/params.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/vue-query/axios/core/pathSerializer.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/vue-query/axios/core/queryKeySerializer.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\n/**\n * JSON-friendly union that mirrors what Pinia Colada can hash.\n */\nexport type JsonValue =\n  | null\n  | string\n  | number\n  | boolean\n  | JsonValue[]\n  | { [key: string]: JsonValue };\n\n/**\n * Replacer that converts non-JSON values (bigint, Date, etc.) to safe substitutes.\n */\nexport const queryKeyJsonReplacer = (_key: string, value: unknown) => {\n  if (value === undefined || typeof value === 'function' || typeof value === 'symbol') {\n    return undefined;\n  }\n  if (typeof value === 'bigint') {\n    return value.toString();\n  }\n  if (value instanceof Date) {\n    return value.toISOString();\n  }\n  return value;\n};\n\n/**\n * Safely stringifies a value and parses it back into a JsonValue.\n */\nexport const stringifyToJsonValue = (input: unknown): JsonValue | undefined => {\n  try {\n    const json = JSON.stringify(input, queryKeyJsonReplacer);\n    if (json === undefined) {\n      return undefined;\n    }\n    return JSON.parse(json) as JsonValue;\n  } catch {\n    return undefined;\n  }\n};\n\n/**\n * Detects plain objects (including objects with a null prototype).\n */\nconst isPlainObject = (value: unknown): value is Record<string, unknown> => {\n  if (value === null || typeof value !== 'object') {\n    return false;\n  }\n  const prototype = Object.getPrototypeOf(value as object);\n  return prototype === Object.prototype || prototype === null;\n};\n\n/**\n * Turns URLSearchParams into a sorted JSON object for deterministic keys.\n */\nconst serializeSearchParams = (params: URLSearchParams): JsonValue => {\n  const entries = Array.from(params.entries()).sort(([a], [b]) => a.localeCompare(b));\n  const result: Record<string, JsonValue> = {};\n\n  for (const [key, value] of entries) {\n    const existing = result[key];\n    if (existing === undefined) {\n      result[key] = value;\n      continue;\n    }\n\n    if (Array.isArray(existing)) {\n      (existing as string[]).push(value);\n    } else {\n      result[key] = [existing, value];\n    }\n  }\n\n  return result;\n};\n\n/**\n * Normalizes any accepted value into a JSON-friendly shape for query keys.\n */\nexport const serializeQueryKeyValue = (value: unknown): JsonValue | undefined => {\n  if (value === null) {\n    return null;\n  }\n\n  if (typeof value === 'string' || typeof value === 'number' || typeof value === 'boolean') {\n    return value;\n  }\n\n  if (value === undefined || typeof value === 'function' || typeof value === 'symbol') {\n    return undefined;\n  }\n\n  if (typeof value === 'bigint') {\n    return value.toString();\n  }\n\n  if (value instanceof Date) {\n    return value.toISOString();\n  }\n\n  if (Array.isArray(value)) {\n    return stringifyToJsonValue(value);\n  }\n\n  if (typeof URLSearchParams !== 'undefined' && value instanceof URLSearchParams) {\n    return serializeSearchParams(value);\n  }\n\n  if (isPlainObject(value)) {\n    return stringifyToJsonValue(value);\n  }\n\n  return undefined;\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/vue-query/axios/core/serverSentEvents.gen.ts",
    "content": "// 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 const 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            // Normalize line endings: CRLF -> LF, then CR -> LF\n            buffer = buffer.replace(/\\r\\n/g, '\\n').replace(/\\r/g, '\\n');\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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/vue-query/axios/core/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { Auth, AuthToken } from './auth.gen';\nimport type { BodySerializer, QuerySerializer, QuerySerializerOptions } from './bodySerializer.gen';\n\nexport type HttpMethod =\n  | 'connect'\n  | 'delete'\n  | 'get'\n  | 'head'\n  | 'options'\n  | 'patch'\n  | 'post'\n  | 'put'\n  | 'trace';\n\nexport type Client<\n  RequestFn = never,\n  Config = unknown,\n  MethodFn = never,\n  BuildUrlFn = never,\n  SseFn = never,\n> = {\n  /**\n   * Returns the final request URL.\n   */\n  buildUrl: BuildUrlFn;\n  getConfig: () => Config;\n  request: RequestFn;\n  setConfig: (config: Config) => Config;\n} & {\n  [K in HttpMethod]: MethodFn;\n} & ([SseFn] extends [never] ? { sse?: never } : { sse: { [K in HttpMethod]: SseFn } });\n\nexport interface Config {\n  /**\n   * Auth token or a function returning auth token. The resolved value will be\n   * added to the request payload as defined by its `security` array.\n   */\n  auth?: ((auth: Auth) => Promise<AuthToken> | AuthToken) | AuthToken;\n  /**\n   * A function for serializing request body parameter. By default,\n   * {@link JSON.stringify()} will be used.\n   */\n  bodySerializer?: BodySerializer | null;\n  /**\n   * An object containing any HTTP headers that you want to pre-populate your\n   * `Headers` object with.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/Headers/Headers#init See more}\n   */\n  headers?:\n    | RequestInit['headers']\n    | Record<\n        string,\n        string | number | boolean | (string | number | boolean)[] | null | undefined | unknown\n      >;\n  /**\n   * The request method.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/fetch#method See more}\n   */\n  method?: Uppercase<HttpMethod>;\n  /**\n   * A function for serializing request query parameters. By default, arrays\n   * will be exploded in form style, objects will be exploded in deepObject\n   * style, and reserved characters are percent-encoded.\n   *\n   * This method will have no effect if the native `paramsSerializer()` Axios\n   * API function is used.\n   *\n   * {@link https://swagger.io/docs/specification/serialization/#query View examples}\n   */\n  querySerializer?: QuerySerializer | QuerySerializerOptions;\n  /**\n   * A function validating request data. This is useful if you want to ensure\n   * the request conforms to the desired shape, so it can be safely sent to\n   * the server.\n   */\n  requestValidator?: (data: unknown) => Promise<unknown>;\n  /**\n   * A function transforming response data before it's returned. This is useful\n   * for post-processing data, e.g. converting ISO strings into Date objects.\n   */\n  responseTransformer?: (data: unknown) => Promise<unknown>;\n  /**\n   * A function validating response data. This is useful if you want to ensure\n   * the response conforms to the desired shape, so it can be safely passed to\n   * the transformers and returned to the user.\n   */\n  responseValidator?: (data: unknown) => Promise<unknown>;\n}\n\ntype IsExactlyNeverOrNeverUndefined<T> = [T] extends [never]\n  ? true\n  : [T] extends [never | undefined]\n    ? [undefined] extends [T]\n      ? false\n      : true\n    : false;\n\nexport type OmitNever<T extends Record<string, unknown>> = {\n  [K in keyof T as IsExactlyNeverOrNeverUndefined<T[K]> extends true ? never : K]: T[K];\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/vue-query/axios/core/utils.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/vue-query/axios/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport { callToTestOrderOfParams, callWithDefaultOptionalParameters, callWithDefaultParameters, callWithDescriptions, callWithDuplicateResponses, callWithNoContentResponse, callWithParameters, callWithResponse, callWithResponseAndNoContentResponse, callWithResponses, callWithResultFromHeader, callWithWeirdParameterNames, collectionFormat, complexTypes, deleteCallWithoutParametersAndResponse, dummyA, dummyB, duplicateName, duplicateName2, duplicateName3, duplicateName4, fooWow, getCallWithoutParametersAndResponse, headCallWithoutParametersAndResponse, nonAsciiæøåÆøÅöôêÊ字符串, type Options, optionsCallWithoutParametersAndResponse, patchApiVbyApiVersionNoTag, patchCallWithoutParametersAndResponse, postApiVbyApiVersionBody, postCallWithoutParametersAndResponse, putCallWithoutParametersAndResponse, serviceWithEmptyTag, testErrorCode, types } from './sdk.gen';\nexport type { ArrayWithArray, ArrayWithBooleans, ArrayWithNumbers, ArrayWithProperties, ArrayWithReferences, ArrayWithStrings, CallToTestOrderOfParamsData, CallWithDefaultOptionalParametersData, CallWithDefaultParametersData, CallWithDescriptionsData, CallWithDuplicateResponsesData, CallWithDuplicateResponsesError, CallWithDuplicateResponsesErrors, CallWithDuplicateResponsesResponse, CallWithDuplicateResponsesResponses, CallWithNoContentResponseData, CallWithNoContentResponseResponses, CallWithParametersData, CallWithResponseAndNoContentResponseData, CallWithResponseAndNoContentResponseResponse, CallWithResponseAndNoContentResponseResponses, CallWithResponseData, CallWithResponseResponse, CallWithResponseResponses, CallWithResponsesData, CallWithResponsesError, CallWithResponsesErrors, CallWithResponsesResponse, CallWithResponsesResponses, CallWithResultFromHeaderData, CallWithResultFromHeaderErrors, CallWithResultFromHeaderResponses, CallWithWeirdParameterNamesData, ClientOptions, CollectionFormatData, CommentWithBackticks, CommentWithBackticksAndQuotes, CommentWithBreaks, CommentWithExpressionPlaceholders, CommentWithQuotes, CommentWithReservedCharacters, CommentWithSlashes, ComplexTypesData, ComplexTypesErrors, ComplexTypesResponse, ComplexTypesResponses, Date, Default, DeleteCallWithoutParametersAndResponseData, DictionaryWithArray, DictionaryWithDictionary, DictionaryWithProperties, DictionaryWithReference, DictionaryWithString, DummyAData, DummyAResponses, DummyBData, DummyBResponses, DuplicateName2Data, DuplicateName3Data, DuplicateName4Data, DuplicateNameData, EnumFromDescription, EnumWithExtensions, EnumWithNumbers, EnumWithStrings, ExternalRefA, ExternalRefB, ExternalSharedModel, FailureFailure, FooWowData, FooWowResponses, GetCallWithoutParametersAndResponseData, HeadCallWithoutParametersAndResponseData, ModelThatExtends, ModelThatExtendsExtends, ModelWithArray, ModelWithBoolean, ModelWithCircularReference, ModelWithDictionary, ModelWithDuplicateImports, ModelWithDuplicateProperties, ModelWithEnum, ModelWithEnumFromDescription, ModelWithInteger, ModelWithNestedEnums, ModelWithNestedProperties, ModelWithNullableString, ModelWithOrderedProperties, ModelWithPattern, ModelWithPatternWritable, ModelWithProperties, ModelWithPropertiesWritable, ModelWithReference, ModelWithReferenceWritable, ModelWithString, ModelWithStringError, NonAsciiæøåÆøÅöôêÊ字符串Data, NonAsciiæøåÆøÅöôêÊ字符串Response, NonAsciiæøåÆøÅöôêÊ字符串Responses, NonAsciiStringæøåÆøÅöôêÊ字符串, OptionsCallWithoutParametersAndResponseData, ParameterActivityParams, PatchApiVbyApiVersionNoTagData, PatchApiVbyApiVersionNoTagResponses, PatchCallWithoutParametersAndResponseData, PostApiVbyApiVersionBodyData, PostApiVbyApiVersionBodyError, PostApiVbyApiVersionBodyErrors, PostApiVbyApiVersionBodyResponse, PostApiVbyApiVersionBodyResponses, PostCallWithoutParametersAndResponseData, PutCallWithoutParametersAndResponseData, ResponsePostActivityResponse, ServiceWithEmptyTagData, SimpleBoolean, SimpleFile, SimpleInteger, SimpleReference, SimpleString, SimpleStringWithPattern, TestErrorCodeData, TestErrorCodeErrors, TestErrorCodeResponses, TypesData, TypesResponse, TypesResponses } from './types.gen';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/vue-query/axios/sdk.gen.ts",
    "content": "// 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 { CallToTestOrderOfParamsData, CallWithDefaultOptionalParametersData, CallWithDefaultParametersData, CallWithDescriptionsData, CallWithDuplicateResponsesData, CallWithDuplicateResponsesErrors, CallWithDuplicateResponsesResponses, CallWithNoContentResponseData, CallWithNoContentResponseResponses, CallWithParametersData, CallWithResponseAndNoContentResponseData, CallWithResponseAndNoContentResponseResponses, CallWithResponseData, CallWithResponseResponses, CallWithResponsesData, CallWithResponsesErrors, CallWithResponsesResponses, CallWithResultFromHeaderData, CallWithResultFromHeaderErrors, CallWithResultFromHeaderResponses, CallWithWeirdParameterNamesData, CollectionFormatData, ComplexTypesData, ComplexTypesErrors, ComplexTypesResponses, DeleteCallWithoutParametersAndResponseData, DummyAData, DummyAResponses, DummyBData, DummyBResponses, DuplicateName2Data, DuplicateName3Data, DuplicateName4Data, DuplicateNameData, FooWowData, FooWowResponses, GetCallWithoutParametersAndResponseData, HeadCallWithoutParametersAndResponseData, NonAsciiæøåÆøÅöôêÊ字符串Data, NonAsciiæøåÆøÅöôêÊ字符串Responses, OptionsCallWithoutParametersAndResponseData, PatchApiVbyApiVersionNoTagData, PatchApiVbyApiVersionNoTagResponses, PatchCallWithoutParametersAndResponseData, PostApiVbyApiVersionBodyData, PostApiVbyApiVersionBodyErrors, PostApiVbyApiVersionBodyResponses, PostCallWithoutParametersAndResponseData, PutCallWithoutParametersAndResponseData, ServiceWithEmptyTagData, TestErrorCodeData, TestErrorCodeErrors, TestErrorCodeResponses, TypesData, TypesResponses } from './types.gen';\n\nexport type Options<TData extends TDataShape = TDataShape, ThrowOnError extends boolean = boolean> = Options2<TData, ThrowOnError> & {\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\nexport const serviceWithEmptyTag = <ThrowOnError extends boolean = false>(options?: Options<ServiceWithEmptyTagData, ThrowOnError>) => (options?.client ?? client).get<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/no+tag', ...options });\n\nexport const patchApiVbyApiVersionNoTag = <ThrowOnError extends boolean = false>(options?: Options<PatchApiVbyApiVersionNoTagData, ThrowOnError>) => (options?.client ?? client).patch<PatchApiVbyApiVersionNoTagResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/no+tag', ...options });\n\nexport const fooWow = <ThrowOnError extends boolean = false>(options?: Options<FooWowData, ThrowOnError>) => (options?.client ?? client).put<FooWowResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/no+tag', ...options });\n\nexport const deleteCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<DeleteCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).delete<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const getCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<GetCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).get<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const headCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<HeadCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).head<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const optionsCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<OptionsCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).options<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const patchCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<PatchCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).patch<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const postCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<PostCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).post<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const putCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<PutCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).put<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const callWithDescriptions = <ThrowOnError extends boolean = false>(options?: Options<CallWithDescriptionsData, ThrowOnError>) => (options?.client ?? client).post<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/descriptions/', ...options });\n\nexport const callWithParameters = <ThrowOnError extends boolean = false>(options: Options<CallWithParametersData, ThrowOnError>) => (options.client ?? client).post<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/parameters/{parameterPath}', ...options });\n\nexport const callWithWeirdParameterNames = <ThrowOnError extends boolean = false>(options: Options<CallWithWeirdParameterNamesData, ThrowOnError>) => (options.client ?? client).post<unknown, unknown, ThrowOnError>({\n    url: '/api/v{api-version}/parameters/{parameter.path.1}/{parameter-path-2}/{PARAMETER-PATH-3}',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options.headers\n    }\n});\n\nexport const callWithDefaultParameters = <ThrowOnError extends boolean = false>(options: Options<CallWithDefaultParametersData, ThrowOnError>) => (options.client ?? client).get<unknown, unknown, ThrowOnError>({\n    querySerializer: { parameters: { parameterModel: { object: { explode: false, style: 'form' } } } },\n    url: '/api/v{api-version}/defaults',\n    ...options\n});\n\nexport const callWithDefaultOptionalParameters = <ThrowOnError extends boolean = false>(options?: Options<CallWithDefaultOptionalParametersData, ThrowOnError>) => (options?.client ?? client).post<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/defaults', ...options });\n\nexport const callToTestOrderOfParams = <ThrowOnError extends boolean = false>(options: Options<CallToTestOrderOfParamsData, ThrowOnError>) => (options.client ?? client).put<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/defaults', ...options });\n\nexport const duplicateName = <ThrowOnError extends boolean = false>(options?: Options<DuplicateNameData, ThrowOnError>) => (options?.client ?? client).delete<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/duplicate', ...options });\n\nexport const duplicateName2 = <ThrowOnError extends boolean = false>(options?: Options<DuplicateName2Data, ThrowOnError>) => (options?.client ?? client).get<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/duplicate', ...options });\n\nexport const duplicateName3 = <ThrowOnError extends boolean = false>(options?: Options<DuplicateName3Data, ThrowOnError>) => (options?.client ?? client).post<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/duplicate', ...options });\n\nexport const duplicateName4 = <ThrowOnError extends boolean = false>(options?: Options<DuplicateName4Data, ThrowOnError>) => (options?.client ?? client).put<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/duplicate', ...options });\n\nexport const callWithNoContentResponse = <ThrowOnError extends boolean = false>(options?: Options<CallWithNoContentResponseData, ThrowOnError>) => (options?.client ?? client).get<CallWithNoContentResponseResponses, unknown, ThrowOnError>({\n    responseType: 'json',\n    url: '/api/v{api-version}/no-content',\n    ...options\n});\n\nexport const callWithResponseAndNoContentResponse = <ThrowOnError extends boolean = false>(options?: Options<CallWithResponseAndNoContentResponseData, ThrowOnError>) => (options?.client ?? client).get<CallWithResponseAndNoContentResponseResponses, unknown, ThrowOnError>({\n    responseType: 'json',\n    url: '/api/v{api-version}/multiple-tags/response-and-no-content',\n    ...options\n});\n\nexport const dummyA = <ThrowOnError extends boolean = false>(options?: Options<DummyAData, ThrowOnError>) => (options?.client ?? client).get<DummyAResponses, unknown, ThrowOnError>({\n    responseType: 'json',\n    url: '/api/v{api-version}/multiple-tags/a',\n    ...options\n});\n\nexport const dummyB = <ThrowOnError extends boolean = false>(options?: Options<DummyBData, ThrowOnError>) => (options?.client ?? client).get<DummyBResponses, unknown, ThrowOnError>({\n    responseType: 'json',\n    url: '/api/v{api-version}/multiple-tags/b',\n    ...options\n});\n\nexport const callWithResponse = <ThrowOnError extends boolean = false>(options?: Options<CallWithResponseData, ThrowOnError>) => (options?.client ?? client).get<CallWithResponseResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/response', ...options });\n\nexport const callWithDuplicateResponses = <ThrowOnError extends boolean = false>(options?: Options<CallWithDuplicateResponsesData, ThrowOnError>) => (options?.client ?? client).post<CallWithDuplicateResponsesResponses, CallWithDuplicateResponsesErrors, ThrowOnError>({\n    responseType: 'json',\n    url: '/api/v{api-version}/response',\n    ...options\n});\n\nexport const callWithResponses = <ThrowOnError extends boolean = false>(options?: Options<CallWithResponsesData, ThrowOnError>) => (options?.client ?? client).put<CallWithResponsesResponses, CallWithResponsesErrors, ThrowOnError>({\n    responseType: 'json',\n    url: '/api/v{api-version}/response',\n    ...options\n});\n\nexport const collectionFormat = <ThrowOnError extends boolean = false>(options: Options<CollectionFormatData, ThrowOnError>) => (options.client ?? client).get<unknown, unknown, ThrowOnError>({\n    querySerializer: { parameters: {\n            parameterArrayCSV: { array: { explode: false } },\n            parameterArraySSV: { array: { explode: false } },\n            parameterArrayTSV: { array: { explode: false } },\n            parameterArrayPipes: { array: { explode: false } }\n        } },\n    url: '/api/v{api-version}/collectionFormat',\n    ...options\n});\n\nexport const types = <ThrowOnError extends boolean = false>(options: Options<TypesData, ThrowOnError>) => (options.client ?? client).get<TypesResponses, unknown, ThrowOnError>({\n    querySerializer: { parameters: { parameterArray: { array: { explode: false } }, parameterDictionary: { object: { explode: false, style: 'form' } } } },\n    responseType: 'json',\n    url: '/api/v{api-version}/types',\n    ...options\n});\n\nexport const complexTypes = <ThrowOnError extends boolean = false>(options: Options<ComplexTypesData, ThrowOnError>) => (options.client ?? client).get<ComplexTypesResponses, ComplexTypesErrors, ThrowOnError>({\n    querySerializer: { parameters: { parameterObject: { object: { explode: false, style: 'form' } }, parameterReference: { object: { explode: false, style: 'form' } } } },\n    responseType: 'json',\n    url: '/api/v{api-version}/complex',\n    ...options\n});\n\nexport const callWithResultFromHeader = <ThrowOnError extends boolean = false>(options?: Options<CallWithResultFromHeaderData, ThrowOnError>) => (options?.client ?? client).post<CallWithResultFromHeaderResponses, CallWithResultFromHeaderErrors, ThrowOnError>({\n    responseType: 'json',\n    url: '/api/v{api-version}/header',\n    ...options\n});\n\nexport const testErrorCode = <ThrowOnError extends boolean = false>(options: Options<TestErrorCodeData, ThrowOnError>) => (options.client ?? client).post<TestErrorCodeResponses, TestErrorCodeErrors, ThrowOnError>({\n    responseType: 'json',\n    url: '/api/v{api-version}/error',\n    ...options\n});\n\nexport const nonAsciiæøåÆøÅöôêÊ字符串 = <ThrowOnError extends boolean = false>(options: Options<NonAsciiæøåÆøÅöôêÊ字符串Data, ThrowOnError>) => (options.client ?? client).post<NonAsciiæøåÆøÅöôêÊ字符串Responses, unknown, ThrowOnError>({\n    responseType: 'json',\n    url: '/api/v{api-version}/non-ascii-æøåÆØÅöôêÊ字符串',\n    ...options\n});\n\n/**\n * Body should not be unknown\n *\n * Body should not be unknown\n */\nexport const postApiVbyApiVersionBody = <ThrowOnError extends boolean = false>(options: Options<PostApiVbyApiVersionBodyData, ThrowOnError>) => (options.client ?? client).post<PostApiVbyApiVersionBodyResponses, PostApiVbyApiVersionBodyErrors, ThrowOnError>({\n    responseType: 'json',\n    url: '/api/v{api-version}/body',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options.headers\n    }\n});\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/vue-query/axios/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type ClientOptions = {\n    baseURL: 'http://localhost:3000/base' | (string & {});\n};\n\nexport type ExternalRefA = ExternalSharedModel;\n\nexport type ExternalRefB = ExternalSharedModel;\n\n/**\n * Testing multiline comments in string: First line\n * Second line\n *\n * Fourth line\n */\nexport type CommentWithBreaks = number;\n\n/**\n * Testing backticks in string: `backticks` and ```multiple backticks``` should work\n */\nexport type CommentWithBackticks = number;\n\n/**\n * Testing backticks and quotes in string: `backticks`, 'quotes', \"double quotes\" and ```multiple backticks``` should work\n */\nexport type CommentWithBackticksAndQuotes = number;\n\n/**\n * Testing slashes in string: \\backwards\\\\\\ and /forwards/// should work\n */\nexport type CommentWithSlashes = number;\n\n/**\n * Testing expression placeholders in string: ${expression} should work\n */\nexport type CommentWithExpressionPlaceholders = number;\n\n/**\n * Testing quotes in string: 'single quote''' and \"double quotes\"\"\" should work\n */\nexport type CommentWithQuotes = number;\n\n/**\n * Testing reserved characters in string: * inline * and ** inline ** should work\n */\nexport type CommentWithReservedCharacters = number;\n\n/**\n * This is a simple number\n */\nexport type SimpleInteger = number;\n\n/**\n * This is a simple boolean\n */\nexport type SimpleBoolean = boolean;\n\n/**\n * This is a simple string\n */\nexport type SimpleString = string;\n\n/**\n * A string with non-ascii (unicode) characters valid in typescript identifiers (æøåÆØÅöÔèÈ字符串)\n */\nexport type NonAsciiStringæøåÆøÅöôêÊ字符串 = string;\n\n/**\n * This is a simple file\n */\nexport type SimpleFile = Blob | File;\n\nexport type SimpleReference = ModelWithString;\n\n/**\n * This is a simple string\n */\nexport type SimpleStringWithPattern = string;\n\n/**\n * This is a simple enum with strings\n */\nexport type EnumWithStrings = 'Success' | 'Warning' | 'Error' | '\\'Single Quote\\'' | '\"Double Quotes\"' | 'Non-ascii: øæåôöØÆÅÔÖ字符串';\n\n/**\n * This is a simple enum with numbers\n */\nexport type EnumWithNumbers = 1 | 2 | 3 | 1.1 | 1.2 | 1.3 | 100 | 200 | 300 | -100 | -200 | -300 | -1.1 | -1.2 | -1.3;\n\n/**\n * Success=1,Warning=2,Error=3\n */\nexport type EnumFromDescription = number;\n\n/**\n * This is a simple enum with numbers\n */\nexport type EnumWithExtensions = 200 | 400 | 500;\n\n/**\n * This is a simple array with numbers\n */\nexport type ArrayWithNumbers = Array<number>;\n\n/**\n * This is a simple array with booleans\n */\nexport type ArrayWithBooleans = Array<boolean>;\n\n/**\n * This is a simple array with strings\n */\nexport type ArrayWithStrings = Array<string>;\n\n/**\n * This is a simple array with references\n */\nexport type ArrayWithReferences = Array<ModelWithString>;\n\n/**\n * This is a simple array containing an array\n */\nexport type ArrayWithArray = Array<Array<ModelWithString>>;\n\n/**\n * This is a simple array with properties\n */\nexport type ArrayWithProperties = Array<{\n    foo?: string;\n    bar?: string;\n}>;\n\n/**\n * This is a string dictionary\n */\nexport type DictionaryWithString = {\n    [key: string]: string;\n};\n\n/**\n * This is a string reference\n */\nexport type DictionaryWithReference = {\n    [key: string]: ModelWithString;\n};\n\n/**\n * This is a complex dictionary\n */\nexport type DictionaryWithArray = {\n    [key: string]: Array<ModelWithString>;\n};\n\n/**\n * This is a string dictionary\n */\nexport type DictionaryWithDictionary = {\n    [key: string]: {\n        [key: string]: string;\n    };\n};\n\n/**\n * This is a complex dictionary\n */\nexport type DictionaryWithProperties = {\n    [key: string]: {\n        foo?: string;\n        bar?: string;\n    };\n};\n\n/**\n * This is a type-only model that defines Date as a string\n */\nexport type Date = string;\n\n/**\n * This is a model with one number property\n */\nexport type ModelWithInteger = {\n    /**\n     * This is a simple number property\n     */\n    prop?: number;\n};\n\n/**\n * This is a model with one boolean property\n */\nexport type ModelWithBoolean = {\n    /**\n     * This is a simple boolean property\n     */\n    prop?: boolean;\n};\n\n/**\n * This is a model with one string property\n */\nexport type ModelWithString = {\n    /**\n     * This is a simple string property\n     */\n    prop?: string;\n};\n\n/**\n * This is a model with one string property\n */\nexport type ModelWithStringError = {\n    /**\n     * This is a simple string property\n     */\n    prop?: string;\n};\n\n/**\n * This is a model with one string property\n */\nexport type ModelWithNullableString = {\n    /**\n     * This is a simple string property\n     */\n    nullableProp?: string | null;\n    /**\n     * This is a simple string property\n     */\n    nullableRequiredProp: string | null;\n};\n\n/**\n * This is a model with one enum\n */\nexport type ModelWithEnum = {\n    /**\n     * This is a simple enum with strings\n     */\n    test?: 'Success' | 'Warning' | 'Error' | 'ØÆÅ字符串';\n    /**\n     * These are the HTTP error code enums\n     */\n    statusCode?: '100' | '200 FOO' | '300 FOO_BAR' | '400 foo-bar' | '500 foo.bar' | '600 foo&bar';\n    /**\n     * Simple boolean enum\n     */\n    bool?: true;\n};\n\n/**\n * This is a model with one enum\n */\nexport type ModelWithEnumFromDescription = {\n    /**\n     * Success=1,Warning=2,Error=3\n     */\n    test?: number;\n};\n\n/**\n * This is a model with nested enums\n */\nexport type ModelWithNestedEnums = {\n    dictionaryWithEnum?: {\n        [key: string]: 'Success' | 'Warning' | 'Error';\n    };\n    dictionaryWithEnumFromDescription?: {\n        [key: string]: number;\n    };\n    arrayWithEnum?: Array<'Success' | 'Warning' | 'Error'>;\n    arrayWithDescription?: Array<number>;\n};\n\n/**\n * This is a model with one property containing a reference\n */\nexport type ModelWithReference = {\n    prop?: ModelWithProperties;\n};\n\n/**\n * This is a model with one property containing an array\n */\nexport type ModelWithArray = {\n    prop?: Array<ModelWithString>;\n    propWithFile?: Array<Blob | File>;\n    propWithNumber?: Array<number>;\n};\n\n/**\n * This is a model with one property containing a dictionary\n */\nexport type ModelWithDictionary = {\n    prop?: {\n        [key: string]: string;\n    };\n};\n\n/**\n * This is a model with one property containing a circular reference\n */\nexport type ModelWithCircularReference = {\n    prop?: ModelWithCircularReference;\n};\n\n/**\n * This is a model with one nested property\n */\nexport type ModelWithProperties = {\n    required: string;\n    readonly requiredAndReadOnly: string;\n    string?: string;\n    number?: number;\n    boolean?: boolean;\n    reference?: ModelWithString;\n    'property with space'?: string;\n    default?: string;\n    try?: string;\n    readonly '@namespace.string'?: string;\n    readonly '@namespace.integer'?: number;\n};\n\n/**\n * This is a model with one nested property\n */\nexport type ModelWithNestedProperties = {\n    readonly first: {\n        readonly second: {\n            readonly third: string;\n        };\n    };\n};\n\n/**\n * This is a model with duplicated properties\n */\nexport type ModelWithDuplicateProperties = {\n    prop?: ModelWithString;\n};\n\n/**\n * This is a model with ordered properties\n */\nexport type ModelWithOrderedProperties = {\n    zebra?: string;\n    apple?: string;\n    hawaii?: string;\n};\n\n/**\n * This is a model with duplicated imports\n */\nexport type ModelWithDuplicateImports = {\n    propA?: ModelWithString;\n    propB?: ModelWithString;\n    propC?: ModelWithString;\n};\n\n/**\n * This is a model that extends another model\n */\nexport type ModelThatExtends = ModelWithString & {\n    propExtendsA?: string;\n    propExtendsB?: ModelWithString;\n};\n\n/**\n * This is a model that extends another model\n */\nexport type ModelThatExtendsExtends = ModelWithString & ModelThatExtends & {\n    propExtendsC?: string;\n    propExtendsD?: ModelWithString;\n};\n\nexport type Default = {\n    name?: string;\n};\n\n/**\n * This is a model that contains a some patterns\n */\nexport type ModelWithPattern = {\n    key: string;\n    name: string;\n    readonly enabled?: boolean;\n    readonly modified?: string;\n    id?: string;\n    text?: string;\n    patternWithSingleQuotes?: string;\n    patternWithNewline?: string;\n    patternWithBacktick?: string;\n    patternWithUnicode?: string;\n};\n\nexport type ParameterActivityParams = {\n    description?: string;\n    graduate_id?: number;\n    organization_id?: number;\n    parent_activity?: number;\n    post_id?: number;\n};\n\nexport type ResponsePostActivityResponse = {\n    description?: string;\n    graduate_id?: number;\n    organization_id?: number;\n    parent_activity_id?: number;\n    post_id?: number;\n};\n\nexport type FailureFailure = {\n    error?: string;\n    message?: string;\n    reference_code?: string;\n};\n\nexport type ExternalSharedModel = {\n    id: string;\n    name?: string;\n};\n\n/**\n * This is a model with one property containing a reference\n */\nexport type ModelWithReferenceWritable = {\n    prop?: ModelWithPropertiesWritable;\n};\n\n/**\n * This is a model with one nested property\n */\nexport type ModelWithPropertiesWritable = {\n    required: string;\n    string?: string;\n    number?: number;\n    boolean?: boolean;\n    reference?: ModelWithString;\n    'property with space'?: string;\n    default?: string;\n    try?: string;\n};\n\n/**\n * This is a model that contains a some patterns\n */\nexport type ModelWithPatternWritable = {\n    key: string;\n    name: string;\n    id?: string;\n    text?: string;\n    patternWithSingleQuotes?: string;\n    patternWithNewline?: string;\n    patternWithBacktick?: string;\n    patternWithUnicode?: string;\n};\n\nexport type ServiceWithEmptyTagData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no+tag';\n};\n\nexport type PatchApiVbyApiVersionNoTagData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no+tag';\n};\n\nexport type PatchApiVbyApiVersionNoTagResponses = {\n    /**\n     * OK\n     */\n    default: unknown;\n};\n\nexport type FooWowData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no+tag';\n};\n\nexport type FooWowResponses = {\n    /**\n     * OK\n     */\n    default: unknown;\n};\n\nexport type DeleteCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type GetCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type HeadCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type OptionsCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type PatchCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type PostCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type PutCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type CallWithDescriptionsData = {\n    body?: never;\n    path?: never;\n    query?: {\n        /**\n         * Testing multiline comments in string: First line\n         * Second line\n         *\n         * Fourth line\n         */\n        parameterWithBreaks?: string;\n        /**\n         * Testing backticks in string: `backticks` and ```multiple backticks``` should work\n         */\n        parameterWithBackticks?: string;\n        /**\n         * Testing slashes in string: \\backwards\\\\\\ and /forwards/// should work\n         */\n        parameterWithSlashes?: string;\n        /**\n         * Testing expression placeholders in string: ${expression} should work\n         */\n        parameterWithExpressionPlaceholders?: string;\n        /**\n         * Testing quotes in string: 'single quote''' and \"double quotes\"\"\" should work\n         */\n        parameterWithQuotes?: string;\n        /**\n         * Testing reserved characters in string: * inline * and ** inline ** should work\n         */\n        parameterWithReservedCharacters?: string;\n    };\n    url: '/api/v{api-version}/descriptions/';\n};\n\nexport type CallWithParametersData = {\n    body?: never;\n    headers: {\n        /**\n         * This is the parameter that goes into the header\n         */\n        parameterHeader: string;\n    };\n    path: {\n        /**\n         * This is the parameter that goes into the path\n         */\n        parameterPath: string;\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string;\n    };\n    query: {\n        /**\n         * This is the parameter that goes into the query params\n         */\n        parameterQuery: string;\n    };\n    url: '/api/v{api-version}/parameters/{parameterPath}';\n};\n\nexport type CallWithWeirdParameterNamesData = {\n    /**\n     * This is the parameter that is sent as request body\n     */\n    body: string;\n    headers: {\n        /**\n         * This is the parameter that goes into the request header\n         */\n        'parameter.header': string;\n    };\n    path: {\n        /**\n         * This is the parameter that goes into the path\n         */\n        'parameter.path.1'?: string;\n        /**\n         * This is the parameter that goes into the path\n         */\n        'parameter-path-2'?: string;\n        /**\n         * This is the parameter that goes into the path\n         */\n        'PARAMETER-PATH-3'?: string;\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string;\n    };\n    query: {\n        /**\n         * This is the parameter with a reserved keyword\n         */\n        default?: string;\n        /**\n         * This is the parameter that goes into the request query params\n         */\n        'parameter-query': string;\n    };\n    url: '/api/v{api-version}/parameters/{parameter.path.1}/{parameter-path-2}/{PARAMETER-PATH-3}';\n};\n\nexport type CallWithDefaultParametersData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * This is a simple string with default value\n         */\n        parameterString: string;\n        /**\n         * This is a simple number with default value\n         */\n        parameterNumber: number;\n        /**\n         * This is a simple boolean with default value\n         */\n        parameterBoolean: boolean;\n        /**\n         * This is a simple enum with default value\n         */\n        parameterEnum: 'Success' | 'Warning' | 'Error';\n        /**\n         * This is a model with one string property\n         */\n        parameterModel: {\n            /**\n             * This is a simple string property\n             */\n            prop?: string;\n        };\n    };\n    url: '/api/v{api-version}/defaults';\n};\n\nexport type CallWithDefaultOptionalParametersData = {\n    body?: never;\n    path?: never;\n    query?: {\n        /**\n         * This is a simple string that is optional with default value\n         */\n        parameterString?: string;\n        /**\n         * This is a simple number that is optional with default value\n         */\n        parameterNumber?: number;\n        /**\n         * This is a simple boolean that is optional with default value\n         */\n        parameterBoolean?: boolean;\n        /**\n         * This is a simple enum that is optional with default value\n         */\n        parameterEnum?: 'Success' | 'Warning' | 'Error';\n    };\n    url: '/api/v{api-version}/defaults';\n};\n\nexport type CallToTestOrderOfParamsData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * This is a optional string with default\n         */\n        parameterOptionalStringWithDefault?: string;\n        /**\n         * This is a optional string with empty default\n         */\n        parameterOptionalStringWithEmptyDefault?: string;\n        /**\n         * This is a optional string with no default\n         */\n        parameterOptionalStringWithNoDefault?: string;\n        /**\n         * This is a string with default\n         */\n        parameterStringWithDefault: string;\n        /**\n         * This is a string with empty default\n         */\n        parameterStringWithEmptyDefault: string;\n        /**\n         * This is a string with no default\n         */\n        parameterStringWithNoDefault: string;\n        /**\n         * This is a string that can be null with no default\n         */\n        parameterStringNullableWithNoDefault?: string | null;\n        /**\n         * This is a string that can be null with default\n         */\n        parameterStringNullableWithDefault?: string | null;\n    };\n    url: '/api/v{api-version}/defaults';\n};\n\nexport type DuplicateNameData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/duplicate';\n};\n\nexport type DuplicateName2Data = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/duplicate';\n};\n\nexport type DuplicateName3Data = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/duplicate';\n};\n\nexport type DuplicateName4Data = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/duplicate';\n};\n\nexport type CallWithNoContentResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no-content';\n};\n\nexport type CallWithNoContentResponseResponses = {\n    /**\n     * Success\n     */\n    204: unknown;\n};\n\nexport type CallWithResponseAndNoContentResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multiple-tags/response-and-no-content';\n};\n\nexport type CallWithResponseAndNoContentResponseResponses = {\n    /**\n     * Response is a simple number\n     */\n    200: number;\n    /**\n     * Success\n     */\n    204: unknown;\n};\n\nexport type CallWithResponseAndNoContentResponseResponse = CallWithResponseAndNoContentResponseResponses[keyof CallWithResponseAndNoContentResponseResponses];\n\nexport type DummyAData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multiple-tags/a';\n};\n\nexport type DummyAResponses = {\n    /**\n     * Success\n     */\n    204: unknown;\n};\n\nexport type DummyBData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multiple-tags/b';\n};\n\nexport type DummyBResponses = {\n    /**\n     * Success\n     */\n    204: unknown;\n};\n\nexport type CallWithResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/response';\n};\n\nexport type CallWithResponseResponses = {\n    /**\n     * Message for default response\n     */\n    default: ModelWithString;\n};\n\nexport type CallWithResponseResponse = CallWithResponseResponses[keyof CallWithResponseResponses];\n\nexport type CallWithDuplicateResponsesData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/response';\n};\n\nexport type CallWithDuplicateResponsesErrors = {\n    /**\n     * Message for 500 error\n     */\n    500: ModelWithStringError;\n    /**\n     * Message for 501 error\n     */\n    501: ModelWithStringError;\n    /**\n     * Message for 502 error\n     */\n    502: ModelWithStringError;\n    /**\n     * Message for default response\n     */\n    default: ModelWithString;\n};\n\nexport type CallWithDuplicateResponsesError = CallWithDuplicateResponsesErrors[keyof CallWithDuplicateResponsesErrors];\n\nexport type CallWithDuplicateResponsesResponses = {\n    /**\n     * Message for 201 response\n     */\n    201: ModelWithString;\n    /**\n     * Message for 202 response\n     */\n    202: ModelWithString;\n};\n\nexport type CallWithDuplicateResponsesResponse = CallWithDuplicateResponsesResponses[keyof CallWithDuplicateResponsesResponses];\n\nexport type CallWithResponsesData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/response';\n};\n\nexport type CallWithResponsesErrors = {\n    /**\n     * Message for 500 error\n     */\n    500: ModelWithStringError;\n    /**\n     * Message for 501 error\n     */\n    501: ModelWithStringError;\n    /**\n     * Message for 502 error\n     */\n    502: ModelWithStringError;\n    /**\n     * Message for default response\n     */\n    default: ModelWithString;\n};\n\nexport type CallWithResponsesError = CallWithResponsesErrors[keyof CallWithResponsesErrors];\n\nexport type CallWithResponsesResponses = {\n    /**\n     * Message for 200 response\n     */\n    200: {\n        readonly '@namespace.string'?: string;\n        readonly '@namespace.integer'?: number;\n        readonly value?: Array<ModelWithString>;\n    };\n    /**\n     * Message for 201 response\n     */\n    201: ModelThatExtends;\n    /**\n     * Message for 202 response\n     */\n    202: ModelThatExtendsExtends;\n};\n\nexport type CallWithResponsesResponse = CallWithResponsesResponses[keyof CallWithResponsesResponses];\n\nexport type CollectionFormatData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * This is an array parameter that is sent as csv format (comma-separated values)\n         */\n        parameterArrayCSV: Array<string>;\n        /**\n         * This is an array parameter that is sent as ssv format (space-separated values)\n         */\n        parameterArraySSV: Array<string>;\n        /**\n         * This is an array parameter that is sent as tsv format (tab-separated values)\n         */\n        parameterArrayTSV: Array<string>;\n        /**\n         * This is an array parameter that is sent as pipes format (pipe-separated values)\n         */\n        parameterArrayPipes: Array<string>;\n        /**\n         * This is an array parameter that is sent as multi format (multiple parameter instances)\n         */\n        parameterArrayMulti: Array<string>;\n    };\n    url: '/api/v{api-version}/collectionFormat';\n};\n\nexport type TypesData = {\n    body?: never;\n    path?: {\n        /**\n         * This is a number parameter\n         */\n        id?: number;\n    };\n    query: {\n        /**\n         * This is a number parameter\n         */\n        parameterNumber: number;\n        /**\n         * This is a string parameter\n         */\n        parameterString: string;\n        /**\n         * This is a boolean parameter\n         */\n        parameterBoolean: boolean;\n        /**\n         * This is an array parameter\n         */\n        parameterArray: Array<string>;\n        /**\n         * This is a dictionary parameter\n         */\n        parameterDictionary: {\n            [key: string]: unknown;\n        };\n        /**\n         * This is an enum parameter\n         */\n        parameterEnum: 'Success' | 'Warning' | 'Error';\n    };\n    url: '/api/v{api-version}/types';\n};\n\nexport type TypesResponses = {\n    /**\n     * Response is a simple number\n     */\n    200: number;\n    /**\n     * Response is a simple string\n     */\n    201: string;\n    /**\n     * Response is a simple boolean\n     */\n    202: boolean;\n    /**\n     * Response is a simple object\n     */\n    203: {\n        [key: string]: unknown;\n    };\n};\n\nexport type TypesResponse = TypesResponses[keyof TypesResponses];\n\nexport type ComplexTypesData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * Parameter containing object\n         */\n        parameterObject: {\n            first?: {\n                second?: {\n                    third?: string;\n                };\n            };\n        };\n        /**\n         * This is a model with one string property\n         */\n        parameterReference: {\n            /**\n             * This is a simple string property\n             */\n            prop?: string;\n        };\n    };\n    url: '/api/v{api-version}/complex';\n};\n\nexport type ComplexTypesErrors = {\n    /**\n     * 400 server error\n     */\n    400: unknown;\n    /**\n     * 500 server error\n     */\n    500: unknown;\n};\n\nexport type ComplexTypesResponses = {\n    /**\n     * Successful response\n     */\n    200: Array<ModelWithString>;\n};\n\nexport type ComplexTypesResponse = ComplexTypesResponses[keyof ComplexTypesResponses];\n\nexport type CallWithResultFromHeaderData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/header';\n};\n\nexport type CallWithResultFromHeaderErrors = {\n    /**\n     * 400 server error\n     */\n    400: unknown;\n    /**\n     * 500 server error\n     */\n    500: unknown;\n};\n\nexport type CallWithResultFromHeaderResponses = {\n    /**\n     * Successful response\n     */\n    200: unknown;\n};\n\nexport type TestErrorCodeData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * Status code to return\n         */\n        status: string;\n    };\n    url: '/api/v{api-version}/error';\n};\n\nexport type TestErrorCodeErrors = {\n    /**\n     * Custom message: Internal Server Error\n     */\n    500: unknown;\n    /**\n     * Custom message: Not Implemented\n     */\n    501: unknown;\n    /**\n     * Custom message: Bad Gateway\n     */\n    502: unknown;\n    /**\n     * Custom message: Service Unavailable\n     */\n    503: unknown;\n};\n\nexport type TestErrorCodeResponses = {\n    /**\n     * Custom message: Successful response\n     */\n    200: unknown;\n};\n\nexport type NonAsciiæøåÆøÅöôêÊ字符串Data = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * Dummy input param\n         */\n        nonAsciiParamæøåÆØÅöôêÊ: number;\n    };\n    url: '/api/v{api-version}/non-ascii-æøåÆØÅöôêÊ字符串';\n};\n\nexport type NonAsciiæøåÆøÅöôêÊ字符串Responses = {\n    /**\n     * Successful response\n     */\n    200: NonAsciiStringæøåÆøÅöôêÊ字符串;\n};\n\nexport type NonAsciiæøåÆøÅöôêÊ字符串Response = NonAsciiæøåÆøÅöôêÊ字符串Responses[keyof NonAsciiæøåÆøÅöôêÊ字符串Responses];\n\nexport type PostApiVbyApiVersionBodyData = {\n    /**\n     * Body should not be unknown\n     */\n    body: ParameterActivityParams;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/body';\n};\n\nexport type PostApiVbyApiVersionBodyErrors = {\n    /**\n     * Bad Request\n     */\n    400: FailureFailure;\n    /**\n     * Internal Server Error\n     */\n    500: FailureFailure;\n};\n\nexport type PostApiVbyApiVersionBodyError = PostApiVbyApiVersionBodyErrors[keyof PostApiVbyApiVersionBodyErrors];\n\nexport type PostApiVbyApiVersionBodyResponses = {\n    /**\n     * OK\n     */\n    200: ResponsePostActivityResponse;\n};\n\nexport type PostApiVbyApiVersionBodyResponse = PostApiVbyApiVersionBodyResponses[keyof PostApiVbyApiVersionBodyResponses];\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/vue-query/fetch/@tanstack/vue-query.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport { type DefaultError, queryOptions, type UseMutationOptions } from '@tanstack/vue-query';\n\nimport { client } from '../client.gen';\nimport { callToTestOrderOfParams, callWithDefaultOptionalParameters, callWithDefaultParameters, callWithDescriptions, callWithDuplicateResponses, callWithNoContentResponse, callWithParameters, callWithResponse, callWithResponseAndNoContentResponse, callWithResponses, callWithResultFromHeader, callWithWeirdParameterNames, collectionFormat, complexTypes, deleteCallWithoutParametersAndResponse, dummyA, dummyB, duplicateName, duplicateName2, duplicateName3, duplicateName4, fooWow, getCallWithoutParametersAndResponse, nonAsciiæøåÆøÅöôêÊ字符串, type Options, patchApiVbyApiVersionNoTag, patchCallWithoutParametersAndResponse, postApiVbyApiVersionBody, postCallWithoutParametersAndResponse, putCallWithoutParametersAndResponse, serviceWithEmptyTag, testErrorCode, types } from '../sdk.gen';\nimport type { CallToTestOrderOfParamsData, CallWithDefaultOptionalParametersData, CallWithDefaultParametersData, CallWithDescriptionsData, CallWithDuplicateResponsesData, CallWithDuplicateResponsesError, CallWithDuplicateResponsesResponse, CallWithNoContentResponseData, CallWithParametersData, CallWithResponseAndNoContentResponseData, CallWithResponseAndNoContentResponseResponse, CallWithResponseData, CallWithResponseResponse, CallWithResponsesData, CallWithResponsesError, CallWithResponsesResponse, CallWithResultFromHeaderData, CallWithWeirdParameterNamesData, CollectionFormatData, ComplexTypesData, ComplexTypesResponse, DeleteCallWithoutParametersAndResponseData, DummyAData, DummyBData, DuplicateName2Data, DuplicateName3Data, DuplicateName4Data, DuplicateNameData, FooWowData, GetCallWithoutParametersAndResponseData, NonAsciiæøåÆøÅöôêÊ字符串Data, NonAsciiæøåÆøÅöôêÊ字符串Response, PatchApiVbyApiVersionNoTagData, PatchCallWithoutParametersAndResponseData, PostApiVbyApiVersionBodyData, PostApiVbyApiVersionBodyError, PostApiVbyApiVersionBodyResponse, PostCallWithoutParametersAndResponseData, PutCallWithoutParametersAndResponseData, ServiceWithEmptyTagData, TestErrorCodeData, TypesData, TypesResponse } from '../types.gen';\n\nexport type QueryKey<TOptions extends Options> = [\n    Pick<TOptions, 'baseUrl' | 'body' | 'headers' | 'path' | 'query'> & {\n        _id: string;\n        _infinite?: boolean;\n        tags?: ReadonlyArray<string>;\n    }\n];\n\nconst createQueryKey = <TOptions extends Options>(id: string, options?: TOptions, infinite?: boolean, tags?: ReadonlyArray<string>): [\n    QueryKey<TOptions>[0]\n] => {\n    const params: QueryKey<TOptions>[0] = { _id: id, baseUrl: options?.baseUrl || (options?.client ?? client).getConfig().baseUrl } as QueryKey<TOptions>[0];\n    if (infinite) {\n        params._infinite = infinite;\n    }\n    if (tags) {\n        params.tags = tags;\n    }\n    if (options?.body) {\n        params.body = options.body;\n    }\n    if (options?.headers) {\n        params.headers = options.headers;\n    }\n    if (options?.path) {\n        params.path = options.path;\n    }\n    if (options?.query) {\n        params.query = options.query;\n    }\n    return [params];\n};\n\nexport const serviceWithEmptyTagQueryKey = (options?: Options<ServiceWithEmptyTagData>) => createQueryKey('serviceWithEmptyTag', options);\n\nexport const serviceWithEmptyTagOptions = (options?: Options<ServiceWithEmptyTagData>) => queryOptions<unknown, DefaultError, unknown, ReturnType<typeof serviceWithEmptyTagQueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await serviceWithEmptyTag({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: serviceWithEmptyTagQueryKey(options)\n});\n\nexport const patchApiVbyApiVersionNoTagMutation = (options?: Partial<Options<PatchApiVbyApiVersionNoTagData>>): UseMutationOptions<unknown, DefaultError, Options<PatchApiVbyApiVersionNoTagData>> => {\n    const mutationOptions: UseMutationOptions<unknown, DefaultError, Options<PatchApiVbyApiVersionNoTagData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await patchApiVbyApiVersionNoTag({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const fooWowMutation = (options?: Partial<Options<FooWowData>>): UseMutationOptions<unknown, DefaultError, Options<FooWowData>> => {\n    const mutationOptions: UseMutationOptions<unknown, DefaultError, Options<FooWowData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await fooWow({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const deleteCallWithoutParametersAndResponseMutation = (options?: Partial<Options<DeleteCallWithoutParametersAndResponseData>>): UseMutationOptions<unknown, DefaultError, Options<DeleteCallWithoutParametersAndResponseData>> => {\n    const mutationOptions: UseMutationOptions<unknown, DefaultError, Options<DeleteCallWithoutParametersAndResponseData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await deleteCallWithoutParametersAndResponse({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const getCallWithoutParametersAndResponseQueryKey = (options?: Options<GetCallWithoutParametersAndResponseData>) => createQueryKey('getCallWithoutParametersAndResponse', options);\n\nexport const getCallWithoutParametersAndResponseOptions = (options?: Options<GetCallWithoutParametersAndResponseData>) => queryOptions<unknown, DefaultError, unknown, ReturnType<typeof getCallWithoutParametersAndResponseQueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await getCallWithoutParametersAndResponse({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: getCallWithoutParametersAndResponseQueryKey(options)\n});\n\nexport const patchCallWithoutParametersAndResponseMutation = (options?: Partial<Options<PatchCallWithoutParametersAndResponseData>>): UseMutationOptions<unknown, DefaultError, Options<PatchCallWithoutParametersAndResponseData>> => {\n    const mutationOptions: UseMutationOptions<unknown, DefaultError, Options<PatchCallWithoutParametersAndResponseData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await patchCallWithoutParametersAndResponse({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const postCallWithoutParametersAndResponseMutation = (options?: Partial<Options<PostCallWithoutParametersAndResponseData>>): UseMutationOptions<unknown, DefaultError, Options<PostCallWithoutParametersAndResponseData>> => {\n    const mutationOptions: UseMutationOptions<unknown, DefaultError, Options<PostCallWithoutParametersAndResponseData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await postCallWithoutParametersAndResponse({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const putCallWithoutParametersAndResponseMutation = (options?: Partial<Options<PutCallWithoutParametersAndResponseData>>): UseMutationOptions<unknown, DefaultError, Options<PutCallWithoutParametersAndResponseData>> => {\n    const mutationOptions: UseMutationOptions<unknown, DefaultError, Options<PutCallWithoutParametersAndResponseData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await putCallWithoutParametersAndResponse({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const callWithDescriptionsMutation = (options?: Partial<Options<CallWithDescriptionsData>>): UseMutationOptions<unknown, DefaultError, Options<CallWithDescriptionsData>> => {\n    const mutationOptions: UseMutationOptions<unknown, DefaultError, Options<CallWithDescriptionsData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await callWithDescriptions({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const callWithParametersMutation = (options?: Partial<Options<CallWithParametersData>>): UseMutationOptions<unknown, DefaultError, Options<CallWithParametersData>> => {\n    const mutationOptions: UseMutationOptions<unknown, DefaultError, Options<CallWithParametersData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await callWithParameters({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const callWithWeirdParameterNamesMutation = (options?: Partial<Options<CallWithWeirdParameterNamesData>>): UseMutationOptions<unknown, DefaultError, Options<CallWithWeirdParameterNamesData>> => {\n    const mutationOptions: UseMutationOptions<unknown, DefaultError, Options<CallWithWeirdParameterNamesData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await callWithWeirdParameterNames({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const callWithDefaultParametersQueryKey = (options: Options<CallWithDefaultParametersData>) => createQueryKey('callWithDefaultParameters', options);\n\nexport const callWithDefaultParametersOptions = (options: Options<CallWithDefaultParametersData>) => queryOptions<unknown, DefaultError, unknown, ReturnType<typeof callWithDefaultParametersQueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await callWithDefaultParameters({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: callWithDefaultParametersQueryKey(options)\n});\n\nexport const callWithDefaultOptionalParametersMutation = (options?: Partial<Options<CallWithDefaultOptionalParametersData>>): UseMutationOptions<unknown, DefaultError, Options<CallWithDefaultOptionalParametersData>> => {\n    const mutationOptions: UseMutationOptions<unknown, DefaultError, Options<CallWithDefaultOptionalParametersData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await callWithDefaultOptionalParameters({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const callToTestOrderOfParamsMutation = (options?: Partial<Options<CallToTestOrderOfParamsData>>): UseMutationOptions<unknown, DefaultError, Options<CallToTestOrderOfParamsData>> => {\n    const mutationOptions: UseMutationOptions<unknown, DefaultError, Options<CallToTestOrderOfParamsData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await callToTestOrderOfParams({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const duplicateNameMutation = (options?: Partial<Options<DuplicateNameData>>): UseMutationOptions<unknown, DefaultError, Options<DuplicateNameData>> => {\n    const mutationOptions: UseMutationOptions<unknown, DefaultError, Options<DuplicateNameData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await duplicateName({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const duplicateName2QueryKey = (options?: Options<DuplicateName2Data>) => createQueryKey('duplicateName2', options);\n\nexport const duplicateName2Options = (options?: Options<DuplicateName2Data>) => queryOptions<unknown, DefaultError, unknown, ReturnType<typeof duplicateName2QueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await duplicateName2({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: duplicateName2QueryKey(options)\n});\n\nexport const duplicateName3Mutation = (options?: Partial<Options<DuplicateName3Data>>): UseMutationOptions<unknown, DefaultError, Options<DuplicateName3Data>> => {\n    const mutationOptions: UseMutationOptions<unknown, DefaultError, Options<DuplicateName3Data>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await duplicateName3({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const duplicateName4Mutation = (options?: Partial<Options<DuplicateName4Data>>): UseMutationOptions<unknown, DefaultError, Options<DuplicateName4Data>> => {\n    const mutationOptions: UseMutationOptions<unknown, DefaultError, Options<DuplicateName4Data>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await duplicateName4({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const callWithNoContentResponseQueryKey = (options?: Options<CallWithNoContentResponseData>) => createQueryKey('callWithNoContentResponse', options);\n\nexport const callWithNoContentResponseOptions = (options?: Options<CallWithNoContentResponseData>) => queryOptions<unknown, DefaultError, unknown, ReturnType<typeof callWithNoContentResponseQueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await callWithNoContentResponse({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: callWithNoContentResponseQueryKey(options)\n});\n\nexport const callWithResponseAndNoContentResponseQueryKey = (options?: Options<CallWithResponseAndNoContentResponseData>) => createQueryKey('callWithResponseAndNoContentResponse', options);\n\nexport const callWithResponseAndNoContentResponseOptions = (options?: Options<CallWithResponseAndNoContentResponseData>) => queryOptions<CallWithResponseAndNoContentResponseResponse, DefaultError, CallWithResponseAndNoContentResponseResponse, ReturnType<typeof callWithResponseAndNoContentResponseQueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await callWithResponseAndNoContentResponse({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: callWithResponseAndNoContentResponseQueryKey(options)\n});\n\nexport const dummyAQueryKey = (options?: Options<DummyAData>) => createQueryKey('dummyA', options);\n\nexport const dummyAOptions = (options?: Options<DummyAData>) => queryOptions<unknown, DefaultError, unknown, ReturnType<typeof dummyAQueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await dummyA({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: dummyAQueryKey(options)\n});\n\nexport const dummyBQueryKey = (options?: Options<DummyBData>) => createQueryKey('dummyB', options);\n\nexport const dummyBOptions = (options?: Options<DummyBData>) => queryOptions<unknown, DefaultError, unknown, ReturnType<typeof dummyBQueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await dummyB({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: dummyBQueryKey(options)\n});\n\nexport const callWithResponseQueryKey = (options?: Options<CallWithResponseData>) => createQueryKey('callWithResponse', options);\n\nexport const callWithResponseOptions = (options?: Options<CallWithResponseData>) => queryOptions<CallWithResponseResponse, DefaultError, CallWithResponseResponse, ReturnType<typeof callWithResponseQueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await callWithResponse({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: callWithResponseQueryKey(options)\n});\n\nexport const callWithDuplicateResponsesMutation = (options?: Partial<Options<CallWithDuplicateResponsesData>>): UseMutationOptions<CallWithDuplicateResponsesResponse, CallWithDuplicateResponsesError, Options<CallWithDuplicateResponsesData>> => {\n    const mutationOptions: UseMutationOptions<CallWithDuplicateResponsesResponse, CallWithDuplicateResponsesError, Options<CallWithDuplicateResponsesData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await callWithDuplicateResponses({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const callWithResponsesMutation = (options?: Partial<Options<CallWithResponsesData>>): UseMutationOptions<CallWithResponsesResponse, CallWithResponsesError, Options<CallWithResponsesData>> => {\n    const mutationOptions: UseMutationOptions<CallWithResponsesResponse, CallWithResponsesError, Options<CallWithResponsesData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await callWithResponses({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const collectionFormatQueryKey = (options: Options<CollectionFormatData>) => createQueryKey('collectionFormat', options);\n\nexport const collectionFormatOptions = (options: Options<CollectionFormatData>) => queryOptions<unknown, DefaultError, unknown, ReturnType<typeof collectionFormatQueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await collectionFormat({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: collectionFormatQueryKey(options)\n});\n\nexport const typesQueryKey = (options: Options<TypesData>) => createQueryKey('types', options);\n\nexport const typesOptions = (options: Options<TypesData>) => queryOptions<TypesResponse, DefaultError, TypesResponse, ReturnType<typeof typesQueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await types({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: typesQueryKey(options)\n});\n\nexport const complexTypesQueryKey = (options: Options<ComplexTypesData>) => createQueryKey('complexTypes', options);\n\nexport const complexTypesOptions = (options: Options<ComplexTypesData>) => queryOptions<ComplexTypesResponse, DefaultError, ComplexTypesResponse, ReturnType<typeof complexTypesQueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await complexTypes({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: complexTypesQueryKey(options)\n});\n\nexport const callWithResultFromHeaderMutation = (options?: Partial<Options<CallWithResultFromHeaderData>>): UseMutationOptions<unknown, DefaultError, Options<CallWithResultFromHeaderData>> => {\n    const mutationOptions: UseMutationOptions<unknown, DefaultError, Options<CallWithResultFromHeaderData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await callWithResultFromHeader({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const testErrorCodeMutation = (options?: Partial<Options<TestErrorCodeData>>): UseMutationOptions<unknown, DefaultError, Options<TestErrorCodeData>> => {\n    const mutationOptions: UseMutationOptions<unknown, DefaultError, Options<TestErrorCodeData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await testErrorCode({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const nonAsciiæøåÆøÅöôêÊ字符串Mutation = (options?: Partial<Options<NonAsciiæøåÆøÅöôêÊ字符串Data>>): UseMutationOptions<NonAsciiæøåÆøÅöôêÊ字符串Response, DefaultError, Options<NonAsciiæøåÆøÅöôêÊ字符串Data>> => {\n    const mutationOptions: UseMutationOptions<NonAsciiæøåÆøÅöôêÊ字符串Response, DefaultError, Options<NonAsciiæøåÆøÅöôêÊ字符串Data>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await nonAsciiæøåÆøÅöôêÊ字符串({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\n/**\n * Body should not be unknown\n *\n * Body should not be unknown\n */\nexport const postApiVbyApiVersionBodyMutation = (options?: Partial<Options<PostApiVbyApiVersionBodyData>>): UseMutationOptions<PostApiVbyApiVersionBodyResponse, PostApiVbyApiVersionBodyError, Options<PostApiVbyApiVersionBodyData>> => {\n    const mutationOptions: UseMutationOptions<PostApiVbyApiVersionBodyResponse, PostApiVbyApiVersionBodyError, Options<PostApiVbyApiVersionBodyData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await postApiVbyApiVersionBody({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/vue-query/fetch/client/client.gen.ts",
    "content": "// 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 (options: RequestOptions) => {\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 url = buildUrl(opts);\n\n    return { opts, url };\n  };\n\n  const request: Client['request'] = async (options) => {\n    // @ts-expect-error\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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/vue-query/fetch/client/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type { Auth } from '../core/auth.gen';\nexport type { QuerySerializerOptions } from '../core/bodySerializer.gen';\nexport {\n  formDataBodySerializer,\n  jsonBodySerializer,\n  urlSearchParamsBodySerializer,\n} from '../core/bodySerializer.gen';\nexport { buildClientParams } from '../core/params.gen';\nexport { serializeQueryKeyValue } from '../core/queryKeySerializer.gen';\nexport { createClient } from './client.gen';\nexport type {\n  Client,\n  ClientOptions,\n  Config,\n  CreateClientConfig,\n  Options,\n  RequestOptions,\n  RequestResult,\n  ResolvedRequestOptions,\n  ResponseStyle,\n  TDataShape,\n} from './types.gen';\nexport { createConfig, mergeHeaders } from './utils.gen';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/vue-query/fetch/client/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { Auth } from '../core/auth.gen';\nimport type {\n  ServerSentEventsOptions,\n  ServerSentEventsResult,\n} from '../core/serverSentEvents.gen';\nimport type { Client as CoreClient, Config as CoreConfig } from '../core/types.gen';\nimport type { Middleware } from './utils.gen';\n\nexport type ResponseStyle = 'data' | 'fields';\n\nexport interface Config<T extends ClientOptions = ClientOptions>\n  extends Omit<RequestInit, 'body' | 'headers' | 'method'>, CoreConfig {\n  /**\n   * Base URL for all requests made by this client.\n   */\n  baseUrl?: T['baseUrl'];\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   * Please don't use the Fetch client for Next.js applications. The `next`\n   * options won't have any effect.\n   *\n   * Install {@link https://www.npmjs.com/package/@hey-api/client-next `@hey-api/client-next`} instead.\n   */\n  next?: never;\n  /**\n   * Return the response data parsed in a specified format. By default, `auto`\n   * will infer the appropriate method from the `Content-Type` response header.\n   * You can override this behavior with any of the {@link Body} methods.\n   * Select `stream` if you don't want to parse response data at all.\n   *\n   * @default 'auto'\n   */\n  parseAs?: 'arrayBuffer' | 'auto' | 'blob' | 'formData' | 'json' | 'stream' | 'text';\n  /**\n   * Should we return only data or multiple fields (data, error, response, etc.)?\n   *\n   * @default 'fields'\n   */\n  responseStyle?: ResponseStyle;\n  /**\n   * Throw an error instead of returning it in the response?\n   *\n   * @default false\n   */\n  throwOnError?: T['throwOnError'];\n}\n\nexport interface RequestOptions<\n  TData = unknown,\n  TResponseStyle extends ResponseStyle = 'fields',\n  ThrowOnError extends boolean = boolean,\n  Url extends string = string,\n>\n  extends\n    Config<{\n      responseStyle: TResponseStyle;\n      throwOnError: ThrowOnError;\n    }>,\n    Pick<\n      ServerSentEventsOptions<TData>,\n      | 'onRequest'\n      | 'onSseError'\n      | 'onSseEvent'\n      | 'sseDefaultRetryDelay'\n      | 'sseMaxRetryAttempts'\n      | 'sseMaxRetryDelay'\n    > {\n  /**\n   * Any body that you want to add to your request.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/fetch#body}\n   */\n  body?: unknown;\n  path?: Record<string, unknown>;\n  query?: Record<string, unknown>;\n  /**\n   * Security mechanism(s) to use for the request.\n   */\n  security?: ReadonlyArray<Auth>;\n  url: Url;\n}\n\nexport interface ResolvedRequestOptions<\n  TResponseStyle extends ResponseStyle = 'fields',\n  ThrowOnError extends boolean = boolean,\n  Url extends string = string,\n> extends RequestOptions<unknown, TResponseStyle, ThrowOnError, Url> {\n  serializedBody?: string;\n}\n\nexport type RequestResult<\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = boolean,\n  TResponseStyle extends ResponseStyle = 'fields',\n> = ThrowOnError extends true\n  ? Promise<\n      TResponseStyle extends 'data'\n        ? TData extends Record<string, unknown>\n          ? TData[keyof TData]\n          : TData\n        : {\n            data: TData extends Record<string, unknown> ? TData[keyof TData] : TData;\n            request: Request;\n            response: Response;\n          }\n    >\n  : Promise<\n      TResponseStyle extends 'data'\n        ? (TData extends Record<string, unknown> ? TData[keyof TData] : TData) | undefined\n        : (\n            | {\n                data: TData extends Record<string, unknown> ? TData[keyof TData] : TData;\n                error: undefined;\n              }\n            | {\n                data: undefined;\n                error: TError extends Record<string, unknown> ? TError[keyof TError] : TError;\n              }\n          ) & {\n            request: Request;\n            response: Response;\n          }\n    >;\n\nexport interface ClientOptions {\n  baseUrl?: string;\n  responseStyle?: ResponseStyle;\n  throwOnError?: boolean;\n}\n\ntype MethodFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'>,\n) => RequestResult<TData, TError, ThrowOnError, TResponseStyle>;\n\ntype SseFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'>,\n) => Promise<ServerSentEventsResult<TData, TError>>;\n\ntype RequestFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'> &\n    Pick<Required<RequestOptions<TData, TResponseStyle, ThrowOnError>>, 'method'>,\n) => RequestResult<TData, TError, ThrowOnError, TResponseStyle>;\n\ntype BuildUrlFn = <\n  TData extends {\n    body?: unknown;\n    path?: Record<string, unknown>;\n    query?: Record<string, unknown>;\n    url: string;\n  },\n>(\n  options: TData & Options<TData>,\n) => string;\n\nexport type Client = CoreClient<RequestFn, Config, MethodFn, BuildUrlFn, SseFn> & {\n  interceptors: Middleware<Request, Response, unknown, ResolvedRequestOptions>;\n};\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 = ClientOptions> = (\n  override?: Config<ClientOptions & T>,\n) => Config<Required<ClientOptions> & T>;\n\nexport interface TDataShape {\n  body?: unknown;\n  headers?: unknown;\n  path?: unknown;\n  query?: unknown;\n  url: string;\n}\n\ntype OmitKeys<T, K> = Pick<T, Exclude<keyof T, K>>;\n\nexport type Options<\n  TData extends TDataShape = TDataShape,\n  ThrowOnError extends boolean = boolean,\n  TResponse = unknown,\n  TResponseStyle extends ResponseStyle = 'fields',\n> = OmitKeys<\n  RequestOptions<TResponse, TResponseStyle, ThrowOnError>,\n  'body' | 'path' | 'query' | 'url'\n> &\n  ([TData] extends [never] ? unknown : Omit<TData, 'url'>);\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/vue-query/fetch/client/utils.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/vue-query/fetch/client.gen.ts",
    "content": "// 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: 'http://localhost:3000/base' }));\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/vue-query/fetch/core/auth.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/vue-query/fetch/core/bodySerializer.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/vue-query/fetch/core/params.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/vue-query/fetch/core/pathSerializer.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/vue-query/fetch/core/queryKeySerializer.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\n/**\n * JSON-friendly union that mirrors what Pinia Colada can hash.\n */\nexport type JsonValue =\n  | null\n  | string\n  | number\n  | boolean\n  | JsonValue[]\n  | { [key: string]: JsonValue };\n\n/**\n * Replacer that converts non-JSON values (bigint, Date, etc.) to safe substitutes.\n */\nexport const queryKeyJsonReplacer = (_key: string, value: unknown) => {\n  if (value === undefined || typeof value === 'function' || typeof value === 'symbol') {\n    return undefined;\n  }\n  if (typeof value === 'bigint') {\n    return value.toString();\n  }\n  if (value instanceof Date) {\n    return value.toISOString();\n  }\n  return value;\n};\n\n/**\n * Safely stringifies a value and parses it back into a JsonValue.\n */\nexport const stringifyToJsonValue = (input: unknown): JsonValue | undefined => {\n  try {\n    const json = JSON.stringify(input, queryKeyJsonReplacer);\n    if (json === undefined) {\n      return undefined;\n    }\n    return JSON.parse(json) as JsonValue;\n  } catch {\n    return undefined;\n  }\n};\n\n/**\n * Detects plain objects (including objects with a null prototype).\n */\nconst isPlainObject = (value: unknown): value is Record<string, unknown> => {\n  if (value === null || typeof value !== 'object') {\n    return false;\n  }\n  const prototype = Object.getPrototypeOf(value as object);\n  return prototype === Object.prototype || prototype === null;\n};\n\n/**\n * Turns URLSearchParams into a sorted JSON object for deterministic keys.\n */\nconst serializeSearchParams = (params: URLSearchParams): JsonValue => {\n  const entries = Array.from(params.entries()).sort(([a], [b]) => a.localeCompare(b));\n  const result: Record<string, JsonValue> = {};\n\n  for (const [key, value] of entries) {\n    const existing = result[key];\n    if (existing === undefined) {\n      result[key] = value;\n      continue;\n    }\n\n    if (Array.isArray(existing)) {\n      (existing as string[]).push(value);\n    } else {\n      result[key] = [existing, value];\n    }\n  }\n\n  return result;\n};\n\n/**\n * Normalizes any accepted value into a JSON-friendly shape for query keys.\n */\nexport const serializeQueryKeyValue = (value: unknown): JsonValue | undefined => {\n  if (value === null) {\n    return null;\n  }\n\n  if (typeof value === 'string' || typeof value === 'number' || typeof value === 'boolean') {\n    return value;\n  }\n\n  if (value === undefined || typeof value === 'function' || typeof value === 'symbol') {\n    return undefined;\n  }\n\n  if (typeof value === 'bigint') {\n    return value.toString();\n  }\n\n  if (value instanceof Date) {\n    return value.toISOString();\n  }\n\n  if (Array.isArray(value)) {\n    return stringifyToJsonValue(value);\n  }\n\n  if (typeof URLSearchParams !== 'undefined' && value instanceof URLSearchParams) {\n    return serializeSearchParams(value);\n  }\n\n  if (isPlainObject(value)) {\n    return stringifyToJsonValue(value);\n  }\n\n  return undefined;\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/vue-query/fetch/core/serverSentEvents.gen.ts",
    "content": "// 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 const 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            // Normalize line endings: CRLF -> LF, then CR -> LF\n            buffer = buffer.replace(/\\r\\n/g, '\\n').replace(/\\r/g, '\\n');\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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/vue-query/fetch/core/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { Auth, AuthToken } from './auth.gen';\nimport type { BodySerializer, QuerySerializer, QuerySerializerOptions } from './bodySerializer.gen';\n\nexport type HttpMethod =\n  | 'connect'\n  | 'delete'\n  | 'get'\n  | 'head'\n  | 'options'\n  | 'patch'\n  | 'post'\n  | 'put'\n  | 'trace';\n\nexport type Client<\n  RequestFn = never,\n  Config = unknown,\n  MethodFn = never,\n  BuildUrlFn = never,\n  SseFn = never,\n> = {\n  /**\n   * Returns the final request URL.\n   */\n  buildUrl: BuildUrlFn;\n  getConfig: () => Config;\n  request: RequestFn;\n  setConfig: (config: Config) => Config;\n} & {\n  [K in HttpMethod]: MethodFn;\n} & ([SseFn] extends [never] ? { sse?: never } : { sse: { [K in HttpMethod]: SseFn } });\n\nexport interface Config {\n  /**\n   * Auth token or a function returning auth token. The resolved value will be\n   * added to the request payload as defined by its `security` array.\n   */\n  auth?: ((auth: Auth) => Promise<AuthToken> | AuthToken) | AuthToken;\n  /**\n   * A function for serializing request body parameter. By default,\n   * {@link JSON.stringify()} will be used.\n   */\n  bodySerializer?: BodySerializer | null;\n  /**\n   * An object containing any HTTP headers that you want to pre-populate your\n   * `Headers` object with.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/Headers/Headers#init See more}\n   */\n  headers?:\n    | RequestInit['headers']\n    | Record<\n        string,\n        string | number | boolean | (string | number | boolean)[] | null | undefined | unknown\n      >;\n  /**\n   * The request method.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/fetch#method See more}\n   */\n  method?: Uppercase<HttpMethod>;\n  /**\n   * A function for serializing request query parameters. By default, arrays\n   * will be exploded in form style, objects will be exploded in deepObject\n   * style, and reserved characters are percent-encoded.\n   *\n   * This method will have no effect if the native `paramsSerializer()` Axios\n   * API function is used.\n   *\n   * {@link https://swagger.io/docs/specification/serialization/#query View examples}\n   */\n  querySerializer?: QuerySerializer | QuerySerializerOptions;\n  /**\n   * A function validating request data. This is useful if you want to ensure\n   * the request conforms to the desired shape, so it can be safely sent to\n   * the server.\n   */\n  requestValidator?: (data: unknown) => Promise<unknown>;\n  /**\n   * A function transforming response data before it's returned. This is useful\n   * for post-processing data, e.g. converting ISO strings into Date objects.\n   */\n  responseTransformer?: (data: unknown) => Promise<unknown>;\n  /**\n   * A function validating response data. This is useful if you want to ensure\n   * the response conforms to the desired shape, so it can be safely passed to\n   * the transformers and returned to the user.\n   */\n  responseValidator?: (data: unknown) => Promise<unknown>;\n}\n\ntype IsExactlyNeverOrNeverUndefined<T> = [T] extends [never]\n  ? true\n  : [T] extends [never | undefined]\n    ? [undefined] extends [T]\n      ? false\n      : true\n    : false;\n\nexport type OmitNever<T extends Record<string, unknown>> = {\n  [K in keyof T as IsExactlyNeverOrNeverUndefined<T[K]> extends true ? never : K]: T[K];\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/vue-query/fetch/core/utils.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/vue-query/fetch/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport { callToTestOrderOfParams, callWithDefaultOptionalParameters, callWithDefaultParameters, callWithDescriptions, callWithDuplicateResponses, callWithNoContentResponse, callWithParameters, callWithResponse, callWithResponseAndNoContentResponse, callWithResponses, callWithResultFromHeader, callWithWeirdParameterNames, collectionFormat, complexTypes, deleteCallWithoutParametersAndResponse, dummyA, dummyB, duplicateName, duplicateName2, duplicateName3, duplicateName4, fooWow, getCallWithoutParametersAndResponse, headCallWithoutParametersAndResponse, nonAsciiæøåÆøÅöôêÊ字符串, type Options, optionsCallWithoutParametersAndResponse, patchApiVbyApiVersionNoTag, patchCallWithoutParametersAndResponse, postApiVbyApiVersionBody, postCallWithoutParametersAndResponse, putCallWithoutParametersAndResponse, serviceWithEmptyTag, testErrorCode, types } from './sdk.gen';\nexport type { ArrayWithArray, ArrayWithBooleans, ArrayWithNumbers, ArrayWithProperties, ArrayWithReferences, ArrayWithStrings, CallToTestOrderOfParamsData, CallWithDefaultOptionalParametersData, CallWithDefaultParametersData, CallWithDescriptionsData, CallWithDuplicateResponsesData, CallWithDuplicateResponsesError, CallWithDuplicateResponsesErrors, CallWithDuplicateResponsesResponse, CallWithDuplicateResponsesResponses, CallWithNoContentResponseData, CallWithNoContentResponseResponses, CallWithParametersData, CallWithResponseAndNoContentResponseData, CallWithResponseAndNoContentResponseResponse, CallWithResponseAndNoContentResponseResponses, CallWithResponseData, CallWithResponseResponse, CallWithResponseResponses, CallWithResponsesData, CallWithResponsesError, CallWithResponsesErrors, CallWithResponsesResponse, CallWithResponsesResponses, CallWithResultFromHeaderData, CallWithResultFromHeaderErrors, CallWithResultFromHeaderResponses, CallWithWeirdParameterNamesData, ClientOptions, CollectionFormatData, CommentWithBackticks, CommentWithBackticksAndQuotes, CommentWithBreaks, CommentWithExpressionPlaceholders, CommentWithQuotes, CommentWithReservedCharacters, CommentWithSlashes, ComplexTypesData, ComplexTypesErrors, ComplexTypesResponse, ComplexTypesResponses, Date, Default, DeleteCallWithoutParametersAndResponseData, DictionaryWithArray, DictionaryWithDictionary, DictionaryWithProperties, DictionaryWithReference, DictionaryWithString, DummyAData, DummyAResponses, DummyBData, DummyBResponses, DuplicateName2Data, DuplicateName3Data, DuplicateName4Data, DuplicateNameData, EnumFromDescription, EnumWithExtensions, EnumWithNumbers, EnumWithStrings, ExternalRefA, ExternalRefB, ExternalSharedModel, FailureFailure, FooWowData, FooWowResponses, GetCallWithoutParametersAndResponseData, HeadCallWithoutParametersAndResponseData, ModelThatExtends, ModelThatExtendsExtends, ModelWithArray, ModelWithBoolean, ModelWithCircularReference, ModelWithDictionary, ModelWithDuplicateImports, ModelWithDuplicateProperties, ModelWithEnum, ModelWithEnumFromDescription, ModelWithInteger, ModelWithNestedEnums, ModelWithNestedProperties, ModelWithNullableString, ModelWithOrderedProperties, ModelWithPattern, ModelWithPatternWritable, ModelWithProperties, ModelWithPropertiesWritable, ModelWithReference, ModelWithReferenceWritable, ModelWithString, ModelWithStringError, NonAsciiæøåÆøÅöôêÊ字符串Data, NonAsciiæøåÆøÅöôêÊ字符串Response, NonAsciiæøåÆøÅöôêÊ字符串Responses, NonAsciiStringæøåÆøÅöôêÊ字符串, OptionsCallWithoutParametersAndResponseData, ParameterActivityParams, PatchApiVbyApiVersionNoTagData, PatchApiVbyApiVersionNoTagResponses, PatchCallWithoutParametersAndResponseData, PostApiVbyApiVersionBodyData, PostApiVbyApiVersionBodyError, PostApiVbyApiVersionBodyErrors, PostApiVbyApiVersionBodyResponse, PostApiVbyApiVersionBodyResponses, PostCallWithoutParametersAndResponseData, PutCallWithoutParametersAndResponseData, ResponsePostActivityResponse, ServiceWithEmptyTagData, SimpleBoolean, SimpleFile, SimpleInteger, SimpleReference, SimpleString, SimpleStringWithPattern, TestErrorCodeData, TestErrorCodeErrors, TestErrorCodeResponses, TypesData, TypesResponse, TypesResponses } from './types.gen';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/vue-query/fetch/sdk.gen.ts",
    "content": "// 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 { CallToTestOrderOfParamsData, CallWithDefaultOptionalParametersData, CallWithDefaultParametersData, CallWithDescriptionsData, CallWithDuplicateResponsesData, CallWithDuplicateResponsesErrors, CallWithDuplicateResponsesResponses, CallWithNoContentResponseData, CallWithNoContentResponseResponses, CallWithParametersData, CallWithResponseAndNoContentResponseData, CallWithResponseAndNoContentResponseResponses, CallWithResponseData, CallWithResponseResponses, CallWithResponsesData, CallWithResponsesErrors, CallWithResponsesResponses, CallWithResultFromHeaderData, CallWithResultFromHeaderErrors, CallWithResultFromHeaderResponses, CallWithWeirdParameterNamesData, CollectionFormatData, ComplexTypesData, ComplexTypesErrors, ComplexTypesResponses, DeleteCallWithoutParametersAndResponseData, DummyAData, DummyAResponses, DummyBData, DummyBResponses, DuplicateName2Data, DuplicateName3Data, DuplicateName4Data, DuplicateNameData, FooWowData, FooWowResponses, GetCallWithoutParametersAndResponseData, HeadCallWithoutParametersAndResponseData, NonAsciiæøåÆøÅöôêÊ字符串Data, NonAsciiæøåÆøÅöôêÊ字符串Responses, OptionsCallWithoutParametersAndResponseData, PatchApiVbyApiVersionNoTagData, PatchApiVbyApiVersionNoTagResponses, PatchCallWithoutParametersAndResponseData, PostApiVbyApiVersionBodyData, PostApiVbyApiVersionBodyErrors, PostApiVbyApiVersionBodyResponses, PostCallWithoutParametersAndResponseData, PutCallWithoutParametersAndResponseData, ServiceWithEmptyTagData, TestErrorCodeData, TestErrorCodeErrors, TestErrorCodeResponses, TypesData, TypesResponses } from './types.gen';\n\nexport type Options<TData extends TDataShape = TDataShape, ThrowOnError extends boolean = boolean> = Options2<TData, ThrowOnError> & {\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\nexport const serviceWithEmptyTag = <ThrowOnError extends boolean = false>(options?: Options<ServiceWithEmptyTagData, ThrowOnError>) => (options?.client ?? client).get<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/no+tag', ...options });\n\nexport const patchApiVbyApiVersionNoTag = <ThrowOnError extends boolean = false>(options?: Options<PatchApiVbyApiVersionNoTagData, ThrowOnError>) => (options?.client ?? client).patch<PatchApiVbyApiVersionNoTagResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/no+tag', ...options });\n\nexport const fooWow = <ThrowOnError extends boolean = false>(options?: Options<FooWowData, ThrowOnError>) => (options?.client ?? client).put<FooWowResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/no+tag', ...options });\n\nexport const deleteCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<DeleteCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).delete<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const getCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<GetCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).get<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const headCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<HeadCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).head<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const optionsCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<OptionsCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).options<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const patchCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<PatchCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).patch<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const postCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<PostCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).post<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const putCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<PutCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).put<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const callWithDescriptions = <ThrowOnError extends boolean = false>(options?: Options<CallWithDescriptionsData, ThrowOnError>) => (options?.client ?? client).post<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/descriptions/', ...options });\n\nexport const callWithParameters = <ThrowOnError extends boolean = false>(options: Options<CallWithParametersData, ThrowOnError>) => (options.client ?? client).post<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/parameters/{parameterPath}', ...options });\n\nexport const callWithWeirdParameterNames = <ThrowOnError extends boolean = false>(options: Options<CallWithWeirdParameterNamesData, ThrowOnError>) => (options.client ?? client).post<unknown, unknown, ThrowOnError>({\n    url: '/api/v{api-version}/parameters/{parameter.path.1}/{parameter-path-2}/{PARAMETER-PATH-3}',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options.headers\n    }\n});\n\nexport const callWithDefaultParameters = <ThrowOnError extends boolean = false>(options: Options<CallWithDefaultParametersData, ThrowOnError>) => (options.client ?? client).get<unknown, unknown, ThrowOnError>({\n    querySerializer: { parameters: { parameterModel: { object: { explode: false, style: 'form' } } } },\n    url: '/api/v{api-version}/defaults',\n    ...options\n});\n\nexport const callWithDefaultOptionalParameters = <ThrowOnError extends boolean = false>(options?: Options<CallWithDefaultOptionalParametersData, ThrowOnError>) => (options?.client ?? client).post<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/defaults', ...options });\n\nexport const callToTestOrderOfParams = <ThrowOnError extends boolean = false>(options: Options<CallToTestOrderOfParamsData, ThrowOnError>) => (options.client ?? client).put<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/defaults', ...options });\n\nexport const duplicateName = <ThrowOnError extends boolean = false>(options?: Options<DuplicateNameData, ThrowOnError>) => (options?.client ?? client).delete<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/duplicate', ...options });\n\nexport const duplicateName2 = <ThrowOnError extends boolean = false>(options?: Options<DuplicateName2Data, ThrowOnError>) => (options?.client ?? client).get<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/duplicate', ...options });\n\nexport const duplicateName3 = <ThrowOnError extends boolean = false>(options?: Options<DuplicateName3Data, ThrowOnError>) => (options?.client ?? client).post<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/duplicate', ...options });\n\nexport const duplicateName4 = <ThrowOnError extends boolean = false>(options?: Options<DuplicateName4Data, ThrowOnError>) => (options?.client ?? client).put<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/duplicate', ...options });\n\nexport const callWithNoContentResponse = <ThrowOnError extends boolean = false>(options?: Options<CallWithNoContentResponseData, ThrowOnError>) => (options?.client ?? client).get<CallWithNoContentResponseResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/no-content', ...options });\n\nexport const callWithResponseAndNoContentResponse = <ThrowOnError extends boolean = false>(options?: Options<CallWithResponseAndNoContentResponseData, ThrowOnError>) => (options?.client ?? client).get<CallWithResponseAndNoContentResponseResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/multiple-tags/response-and-no-content', ...options });\n\nexport const dummyA = <ThrowOnError extends boolean = false>(options?: Options<DummyAData, ThrowOnError>) => (options?.client ?? client).get<DummyAResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/multiple-tags/a', ...options });\n\nexport const dummyB = <ThrowOnError extends boolean = false>(options?: Options<DummyBData, ThrowOnError>) => (options?.client ?? client).get<DummyBResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/multiple-tags/b', ...options });\n\nexport const callWithResponse = <ThrowOnError extends boolean = false>(options?: Options<CallWithResponseData, ThrowOnError>) => (options?.client ?? client).get<CallWithResponseResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/response', ...options });\n\nexport const callWithDuplicateResponses = <ThrowOnError extends boolean = false>(options?: Options<CallWithDuplicateResponsesData, ThrowOnError>) => (options?.client ?? client).post<CallWithDuplicateResponsesResponses, CallWithDuplicateResponsesErrors, ThrowOnError>({ url: '/api/v{api-version}/response', ...options });\n\nexport const callWithResponses = <ThrowOnError extends boolean = false>(options?: Options<CallWithResponsesData, ThrowOnError>) => (options?.client ?? client).put<CallWithResponsesResponses, CallWithResponsesErrors, ThrowOnError>({ url: '/api/v{api-version}/response', ...options });\n\nexport const collectionFormat = <ThrowOnError extends boolean = false>(options: Options<CollectionFormatData, ThrowOnError>) => (options.client ?? client).get<unknown, unknown, ThrowOnError>({\n    querySerializer: { parameters: {\n            parameterArrayCSV: { array: { explode: false } },\n            parameterArraySSV: { array: { explode: false } },\n            parameterArrayTSV: { array: { explode: false } },\n            parameterArrayPipes: { array: { explode: false } }\n        } },\n    url: '/api/v{api-version}/collectionFormat',\n    ...options\n});\n\nexport const types = <ThrowOnError extends boolean = false>(options: Options<TypesData, ThrowOnError>) => (options.client ?? client).get<TypesResponses, unknown, ThrowOnError>({\n    querySerializer: { parameters: { parameterArray: { array: { explode: false } }, parameterDictionary: { object: { explode: false, style: 'form' } } } },\n    url: '/api/v{api-version}/types',\n    ...options\n});\n\nexport const complexTypes = <ThrowOnError extends boolean = false>(options: Options<ComplexTypesData, ThrowOnError>) => (options.client ?? client).get<ComplexTypesResponses, ComplexTypesErrors, ThrowOnError>({\n    querySerializer: { parameters: { parameterObject: { object: { explode: false, style: 'form' } }, parameterReference: { object: { explode: false, style: 'form' } } } },\n    url: '/api/v{api-version}/complex',\n    ...options\n});\n\nexport const callWithResultFromHeader = <ThrowOnError extends boolean = false>(options?: Options<CallWithResultFromHeaderData, ThrowOnError>) => (options?.client ?? client).post<CallWithResultFromHeaderResponses, CallWithResultFromHeaderErrors, ThrowOnError>({ url: '/api/v{api-version}/header', ...options });\n\nexport const testErrorCode = <ThrowOnError extends boolean = false>(options: Options<TestErrorCodeData, ThrowOnError>) => (options.client ?? client).post<TestErrorCodeResponses, TestErrorCodeErrors, ThrowOnError>({ url: '/api/v{api-version}/error', ...options });\n\nexport const nonAsciiæøåÆøÅöôêÊ字符串 = <ThrowOnError extends boolean = false>(options: Options<NonAsciiæøåÆøÅöôêÊ字符串Data, ThrowOnError>) => (options.client ?? client).post<NonAsciiæøåÆøÅöôêÊ字符串Responses, unknown, ThrowOnError>({ url: '/api/v{api-version}/non-ascii-æøåÆØÅöôêÊ字符串', ...options });\n\n/**\n * Body should not be unknown\n *\n * Body should not be unknown\n */\nexport const postApiVbyApiVersionBody = <ThrowOnError extends boolean = false>(options: Options<PostApiVbyApiVersionBodyData, ThrowOnError>) => (options.client ?? client).post<PostApiVbyApiVersionBodyResponses, PostApiVbyApiVersionBodyErrors, ThrowOnError>({\n    url: '/api/v{api-version}/body',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options.headers\n    }\n});\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/vue-query/fetch/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type ClientOptions = {\n    baseUrl: 'http://localhost:3000/base' | (string & {});\n};\n\nexport type ExternalRefA = ExternalSharedModel;\n\nexport type ExternalRefB = ExternalSharedModel;\n\n/**\n * Testing multiline comments in string: First line\n * Second line\n *\n * Fourth line\n */\nexport type CommentWithBreaks = number;\n\n/**\n * Testing backticks in string: `backticks` and ```multiple backticks``` should work\n */\nexport type CommentWithBackticks = number;\n\n/**\n * Testing backticks and quotes in string: `backticks`, 'quotes', \"double quotes\" and ```multiple backticks``` should work\n */\nexport type CommentWithBackticksAndQuotes = number;\n\n/**\n * Testing slashes in string: \\backwards\\\\\\ and /forwards/// should work\n */\nexport type CommentWithSlashes = number;\n\n/**\n * Testing expression placeholders in string: ${expression} should work\n */\nexport type CommentWithExpressionPlaceholders = number;\n\n/**\n * Testing quotes in string: 'single quote''' and \"double quotes\"\"\" should work\n */\nexport type CommentWithQuotes = number;\n\n/**\n * Testing reserved characters in string: * inline * and ** inline ** should work\n */\nexport type CommentWithReservedCharacters = number;\n\n/**\n * This is a simple number\n */\nexport type SimpleInteger = number;\n\n/**\n * This is a simple boolean\n */\nexport type SimpleBoolean = boolean;\n\n/**\n * This is a simple string\n */\nexport type SimpleString = string;\n\n/**\n * A string with non-ascii (unicode) characters valid in typescript identifiers (æøåÆØÅöÔèÈ字符串)\n */\nexport type NonAsciiStringæøåÆøÅöôêÊ字符串 = string;\n\n/**\n * This is a simple file\n */\nexport type SimpleFile = Blob | File;\n\nexport type SimpleReference = ModelWithString;\n\n/**\n * This is a simple string\n */\nexport type SimpleStringWithPattern = string;\n\n/**\n * This is a simple enum with strings\n */\nexport type EnumWithStrings = 'Success' | 'Warning' | 'Error' | '\\'Single Quote\\'' | '\"Double Quotes\"' | 'Non-ascii: øæåôöØÆÅÔÖ字符串';\n\n/**\n * This is a simple enum with numbers\n */\nexport type EnumWithNumbers = 1 | 2 | 3 | 1.1 | 1.2 | 1.3 | 100 | 200 | 300 | -100 | -200 | -300 | -1.1 | -1.2 | -1.3;\n\n/**\n * Success=1,Warning=2,Error=3\n */\nexport type EnumFromDescription = number;\n\n/**\n * This is a simple enum with numbers\n */\nexport type EnumWithExtensions = 200 | 400 | 500;\n\n/**\n * This is a simple array with numbers\n */\nexport type ArrayWithNumbers = Array<number>;\n\n/**\n * This is a simple array with booleans\n */\nexport type ArrayWithBooleans = Array<boolean>;\n\n/**\n * This is a simple array with strings\n */\nexport type ArrayWithStrings = Array<string>;\n\n/**\n * This is a simple array with references\n */\nexport type ArrayWithReferences = Array<ModelWithString>;\n\n/**\n * This is a simple array containing an array\n */\nexport type ArrayWithArray = Array<Array<ModelWithString>>;\n\n/**\n * This is a simple array with properties\n */\nexport type ArrayWithProperties = Array<{\n    foo?: string;\n    bar?: string;\n}>;\n\n/**\n * This is a string dictionary\n */\nexport type DictionaryWithString = {\n    [key: string]: string;\n};\n\n/**\n * This is a string reference\n */\nexport type DictionaryWithReference = {\n    [key: string]: ModelWithString;\n};\n\n/**\n * This is a complex dictionary\n */\nexport type DictionaryWithArray = {\n    [key: string]: Array<ModelWithString>;\n};\n\n/**\n * This is a string dictionary\n */\nexport type DictionaryWithDictionary = {\n    [key: string]: {\n        [key: string]: string;\n    };\n};\n\n/**\n * This is a complex dictionary\n */\nexport type DictionaryWithProperties = {\n    [key: string]: {\n        foo?: string;\n        bar?: string;\n    };\n};\n\n/**\n * This is a type-only model that defines Date as a string\n */\nexport type Date = string;\n\n/**\n * This is a model with one number property\n */\nexport type ModelWithInteger = {\n    /**\n     * This is a simple number property\n     */\n    prop?: number;\n};\n\n/**\n * This is a model with one boolean property\n */\nexport type ModelWithBoolean = {\n    /**\n     * This is a simple boolean property\n     */\n    prop?: boolean;\n};\n\n/**\n * This is a model with one string property\n */\nexport type ModelWithString = {\n    /**\n     * This is a simple string property\n     */\n    prop?: string;\n};\n\n/**\n * This is a model with one string property\n */\nexport type ModelWithStringError = {\n    /**\n     * This is a simple string property\n     */\n    prop?: string;\n};\n\n/**\n * This is a model with one string property\n */\nexport type ModelWithNullableString = {\n    /**\n     * This is a simple string property\n     */\n    nullableProp?: string | null;\n    /**\n     * This is a simple string property\n     */\n    nullableRequiredProp: string | null;\n};\n\n/**\n * This is a model with one enum\n */\nexport type ModelWithEnum = {\n    /**\n     * This is a simple enum with strings\n     */\n    test?: 'Success' | 'Warning' | 'Error' | 'ØÆÅ字符串';\n    /**\n     * These are the HTTP error code enums\n     */\n    statusCode?: '100' | '200 FOO' | '300 FOO_BAR' | '400 foo-bar' | '500 foo.bar' | '600 foo&bar';\n    /**\n     * Simple boolean enum\n     */\n    bool?: true;\n};\n\n/**\n * This is a model with one enum\n */\nexport type ModelWithEnumFromDescription = {\n    /**\n     * Success=1,Warning=2,Error=3\n     */\n    test?: number;\n};\n\n/**\n * This is a model with nested enums\n */\nexport type ModelWithNestedEnums = {\n    dictionaryWithEnum?: {\n        [key: string]: 'Success' | 'Warning' | 'Error';\n    };\n    dictionaryWithEnumFromDescription?: {\n        [key: string]: number;\n    };\n    arrayWithEnum?: Array<'Success' | 'Warning' | 'Error'>;\n    arrayWithDescription?: Array<number>;\n};\n\n/**\n * This is a model with one property containing a reference\n */\nexport type ModelWithReference = {\n    prop?: ModelWithProperties;\n};\n\n/**\n * This is a model with one property containing an array\n */\nexport type ModelWithArray = {\n    prop?: Array<ModelWithString>;\n    propWithFile?: Array<Blob | File>;\n    propWithNumber?: Array<number>;\n};\n\n/**\n * This is a model with one property containing a dictionary\n */\nexport type ModelWithDictionary = {\n    prop?: {\n        [key: string]: string;\n    };\n};\n\n/**\n * This is a model with one property containing a circular reference\n */\nexport type ModelWithCircularReference = {\n    prop?: ModelWithCircularReference;\n};\n\n/**\n * This is a model with one nested property\n */\nexport type ModelWithProperties = {\n    required: string;\n    readonly requiredAndReadOnly: string;\n    string?: string;\n    number?: number;\n    boolean?: boolean;\n    reference?: ModelWithString;\n    'property with space'?: string;\n    default?: string;\n    try?: string;\n    readonly '@namespace.string'?: string;\n    readonly '@namespace.integer'?: number;\n};\n\n/**\n * This is a model with one nested property\n */\nexport type ModelWithNestedProperties = {\n    readonly first: {\n        readonly second: {\n            readonly third: string;\n        };\n    };\n};\n\n/**\n * This is a model with duplicated properties\n */\nexport type ModelWithDuplicateProperties = {\n    prop?: ModelWithString;\n};\n\n/**\n * This is a model with ordered properties\n */\nexport type ModelWithOrderedProperties = {\n    zebra?: string;\n    apple?: string;\n    hawaii?: string;\n};\n\n/**\n * This is a model with duplicated imports\n */\nexport type ModelWithDuplicateImports = {\n    propA?: ModelWithString;\n    propB?: ModelWithString;\n    propC?: ModelWithString;\n};\n\n/**\n * This is a model that extends another model\n */\nexport type ModelThatExtends = ModelWithString & {\n    propExtendsA?: string;\n    propExtendsB?: ModelWithString;\n};\n\n/**\n * This is a model that extends another model\n */\nexport type ModelThatExtendsExtends = ModelWithString & ModelThatExtends & {\n    propExtendsC?: string;\n    propExtendsD?: ModelWithString;\n};\n\nexport type Default = {\n    name?: string;\n};\n\n/**\n * This is a model that contains a some patterns\n */\nexport type ModelWithPattern = {\n    key: string;\n    name: string;\n    readonly enabled?: boolean;\n    readonly modified?: string;\n    id?: string;\n    text?: string;\n    patternWithSingleQuotes?: string;\n    patternWithNewline?: string;\n    patternWithBacktick?: string;\n    patternWithUnicode?: string;\n};\n\nexport type ParameterActivityParams = {\n    description?: string;\n    graduate_id?: number;\n    organization_id?: number;\n    parent_activity?: number;\n    post_id?: number;\n};\n\nexport type ResponsePostActivityResponse = {\n    description?: string;\n    graduate_id?: number;\n    organization_id?: number;\n    parent_activity_id?: number;\n    post_id?: number;\n};\n\nexport type FailureFailure = {\n    error?: string;\n    message?: string;\n    reference_code?: string;\n};\n\nexport type ExternalSharedModel = {\n    id: string;\n    name?: string;\n};\n\n/**\n * This is a model with one property containing a reference\n */\nexport type ModelWithReferenceWritable = {\n    prop?: ModelWithPropertiesWritable;\n};\n\n/**\n * This is a model with one nested property\n */\nexport type ModelWithPropertiesWritable = {\n    required: string;\n    string?: string;\n    number?: number;\n    boolean?: boolean;\n    reference?: ModelWithString;\n    'property with space'?: string;\n    default?: string;\n    try?: string;\n};\n\n/**\n * This is a model that contains a some patterns\n */\nexport type ModelWithPatternWritable = {\n    key: string;\n    name: string;\n    id?: string;\n    text?: string;\n    patternWithSingleQuotes?: string;\n    patternWithNewline?: string;\n    patternWithBacktick?: string;\n    patternWithUnicode?: string;\n};\n\nexport type ServiceWithEmptyTagData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no+tag';\n};\n\nexport type PatchApiVbyApiVersionNoTagData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no+tag';\n};\n\nexport type PatchApiVbyApiVersionNoTagResponses = {\n    /**\n     * OK\n     */\n    default: unknown;\n};\n\nexport type FooWowData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no+tag';\n};\n\nexport type FooWowResponses = {\n    /**\n     * OK\n     */\n    default: unknown;\n};\n\nexport type DeleteCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type GetCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type HeadCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type OptionsCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type PatchCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type PostCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type PutCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type CallWithDescriptionsData = {\n    body?: never;\n    path?: never;\n    query?: {\n        /**\n         * Testing multiline comments in string: First line\n         * Second line\n         *\n         * Fourth line\n         */\n        parameterWithBreaks?: string;\n        /**\n         * Testing backticks in string: `backticks` and ```multiple backticks``` should work\n         */\n        parameterWithBackticks?: string;\n        /**\n         * Testing slashes in string: \\backwards\\\\\\ and /forwards/// should work\n         */\n        parameterWithSlashes?: string;\n        /**\n         * Testing expression placeholders in string: ${expression} should work\n         */\n        parameterWithExpressionPlaceholders?: string;\n        /**\n         * Testing quotes in string: 'single quote''' and \"double quotes\"\"\" should work\n         */\n        parameterWithQuotes?: string;\n        /**\n         * Testing reserved characters in string: * inline * and ** inline ** should work\n         */\n        parameterWithReservedCharacters?: string;\n    };\n    url: '/api/v{api-version}/descriptions/';\n};\n\nexport type CallWithParametersData = {\n    body?: never;\n    headers: {\n        /**\n         * This is the parameter that goes into the header\n         */\n        parameterHeader: string;\n    };\n    path: {\n        /**\n         * This is the parameter that goes into the path\n         */\n        parameterPath: string;\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string;\n    };\n    query: {\n        /**\n         * This is the parameter that goes into the query params\n         */\n        parameterQuery: string;\n    };\n    url: '/api/v{api-version}/parameters/{parameterPath}';\n};\n\nexport type CallWithWeirdParameterNamesData = {\n    /**\n     * This is the parameter that is sent as request body\n     */\n    body: string;\n    headers: {\n        /**\n         * This is the parameter that goes into the request header\n         */\n        'parameter.header': string;\n    };\n    path: {\n        /**\n         * This is the parameter that goes into the path\n         */\n        'parameter.path.1'?: string;\n        /**\n         * This is the parameter that goes into the path\n         */\n        'parameter-path-2'?: string;\n        /**\n         * This is the parameter that goes into the path\n         */\n        'PARAMETER-PATH-3'?: string;\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string;\n    };\n    query: {\n        /**\n         * This is the parameter with a reserved keyword\n         */\n        default?: string;\n        /**\n         * This is the parameter that goes into the request query params\n         */\n        'parameter-query': string;\n    };\n    url: '/api/v{api-version}/parameters/{parameter.path.1}/{parameter-path-2}/{PARAMETER-PATH-3}';\n};\n\nexport type CallWithDefaultParametersData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * This is a simple string with default value\n         */\n        parameterString: string;\n        /**\n         * This is a simple number with default value\n         */\n        parameterNumber: number;\n        /**\n         * This is a simple boolean with default value\n         */\n        parameterBoolean: boolean;\n        /**\n         * This is a simple enum with default value\n         */\n        parameterEnum: 'Success' | 'Warning' | 'Error';\n        /**\n         * This is a model with one string property\n         */\n        parameterModel: {\n            /**\n             * This is a simple string property\n             */\n            prop?: string;\n        };\n    };\n    url: '/api/v{api-version}/defaults';\n};\n\nexport type CallWithDefaultOptionalParametersData = {\n    body?: never;\n    path?: never;\n    query?: {\n        /**\n         * This is a simple string that is optional with default value\n         */\n        parameterString?: string;\n        /**\n         * This is a simple number that is optional with default value\n         */\n        parameterNumber?: number;\n        /**\n         * This is a simple boolean that is optional with default value\n         */\n        parameterBoolean?: boolean;\n        /**\n         * This is a simple enum that is optional with default value\n         */\n        parameterEnum?: 'Success' | 'Warning' | 'Error';\n    };\n    url: '/api/v{api-version}/defaults';\n};\n\nexport type CallToTestOrderOfParamsData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * This is a optional string with default\n         */\n        parameterOptionalStringWithDefault?: string;\n        /**\n         * This is a optional string with empty default\n         */\n        parameterOptionalStringWithEmptyDefault?: string;\n        /**\n         * This is a optional string with no default\n         */\n        parameterOptionalStringWithNoDefault?: string;\n        /**\n         * This is a string with default\n         */\n        parameterStringWithDefault: string;\n        /**\n         * This is a string with empty default\n         */\n        parameterStringWithEmptyDefault: string;\n        /**\n         * This is a string with no default\n         */\n        parameterStringWithNoDefault: string;\n        /**\n         * This is a string that can be null with no default\n         */\n        parameterStringNullableWithNoDefault?: string | null;\n        /**\n         * This is a string that can be null with default\n         */\n        parameterStringNullableWithDefault?: string | null;\n    };\n    url: '/api/v{api-version}/defaults';\n};\n\nexport type DuplicateNameData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/duplicate';\n};\n\nexport type DuplicateName2Data = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/duplicate';\n};\n\nexport type DuplicateName3Data = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/duplicate';\n};\n\nexport type DuplicateName4Data = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/duplicate';\n};\n\nexport type CallWithNoContentResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no-content';\n};\n\nexport type CallWithNoContentResponseResponses = {\n    /**\n     * Success\n     */\n    204: unknown;\n};\n\nexport type CallWithResponseAndNoContentResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multiple-tags/response-and-no-content';\n};\n\nexport type CallWithResponseAndNoContentResponseResponses = {\n    /**\n     * Response is a simple number\n     */\n    200: number;\n    /**\n     * Success\n     */\n    204: unknown;\n};\n\nexport type CallWithResponseAndNoContentResponseResponse = CallWithResponseAndNoContentResponseResponses[keyof CallWithResponseAndNoContentResponseResponses];\n\nexport type DummyAData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multiple-tags/a';\n};\n\nexport type DummyAResponses = {\n    /**\n     * Success\n     */\n    204: unknown;\n};\n\nexport type DummyBData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multiple-tags/b';\n};\n\nexport type DummyBResponses = {\n    /**\n     * Success\n     */\n    204: unknown;\n};\n\nexport type CallWithResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/response';\n};\n\nexport type CallWithResponseResponses = {\n    /**\n     * Message for default response\n     */\n    default: ModelWithString;\n};\n\nexport type CallWithResponseResponse = CallWithResponseResponses[keyof CallWithResponseResponses];\n\nexport type CallWithDuplicateResponsesData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/response';\n};\n\nexport type CallWithDuplicateResponsesErrors = {\n    /**\n     * Message for 500 error\n     */\n    500: ModelWithStringError;\n    /**\n     * Message for 501 error\n     */\n    501: ModelWithStringError;\n    /**\n     * Message for 502 error\n     */\n    502: ModelWithStringError;\n    /**\n     * Message for default response\n     */\n    default: ModelWithString;\n};\n\nexport type CallWithDuplicateResponsesError = CallWithDuplicateResponsesErrors[keyof CallWithDuplicateResponsesErrors];\n\nexport type CallWithDuplicateResponsesResponses = {\n    /**\n     * Message for 201 response\n     */\n    201: ModelWithString;\n    /**\n     * Message for 202 response\n     */\n    202: ModelWithString;\n};\n\nexport type CallWithDuplicateResponsesResponse = CallWithDuplicateResponsesResponses[keyof CallWithDuplicateResponsesResponses];\n\nexport type CallWithResponsesData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/response';\n};\n\nexport type CallWithResponsesErrors = {\n    /**\n     * Message for 500 error\n     */\n    500: ModelWithStringError;\n    /**\n     * Message for 501 error\n     */\n    501: ModelWithStringError;\n    /**\n     * Message for 502 error\n     */\n    502: ModelWithStringError;\n    /**\n     * Message for default response\n     */\n    default: ModelWithString;\n};\n\nexport type CallWithResponsesError = CallWithResponsesErrors[keyof CallWithResponsesErrors];\n\nexport type CallWithResponsesResponses = {\n    /**\n     * Message for 200 response\n     */\n    200: {\n        readonly '@namespace.string'?: string;\n        readonly '@namespace.integer'?: number;\n        readonly value?: Array<ModelWithString>;\n    };\n    /**\n     * Message for 201 response\n     */\n    201: ModelThatExtends;\n    /**\n     * Message for 202 response\n     */\n    202: ModelThatExtendsExtends;\n};\n\nexport type CallWithResponsesResponse = CallWithResponsesResponses[keyof CallWithResponsesResponses];\n\nexport type CollectionFormatData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * This is an array parameter that is sent as csv format (comma-separated values)\n         */\n        parameterArrayCSV: Array<string>;\n        /**\n         * This is an array parameter that is sent as ssv format (space-separated values)\n         */\n        parameterArraySSV: Array<string>;\n        /**\n         * This is an array parameter that is sent as tsv format (tab-separated values)\n         */\n        parameterArrayTSV: Array<string>;\n        /**\n         * This is an array parameter that is sent as pipes format (pipe-separated values)\n         */\n        parameterArrayPipes: Array<string>;\n        /**\n         * This is an array parameter that is sent as multi format (multiple parameter instances)\n         */\n        parameterArrayMulti: Array<string>;\n    };\n    url: '/api/v{api-version}/collectionFormat';\n};\n\nexport type TypesData = {\n    body?: never;\n    path?: {\n        /**\n         * This is a number parameter\n         */\n        id?: number;\n    };\n    query: {\n        /**\n         * This is a number parameter\n         */\n        parameterNumber: number;\n        /**\n         * This is a string parameter\n         */\n        parameterString: string;\n        /**\n         * This is a boolean parameter\n         */\n        parameterBoolean: boolean;\n        /**\n         * This is an array parameter\n         */\n        parameterArray: Array<string>;\n        /**\n         * This is a dictionary parameter\n         */\n        parameterDictionary: {\n            [key: string]: unknown;\n        };\n        /**\n         * This is an enum parameter\n         */\n        parameterEnum: 'Success' | 'Warning' | 'Error';\n    };\n    url: '/api/v{api-version}/types';\n};\n\nexport type TypesResponses = {\n    /**\n     * Response is a simple number\n     */\n    200: number;\n    /**\n     * Response is a simple string\n     */\n    201: string;\n    /**\n     * Response is a simple boolean\n     */\n    202: boolean;\n    /**\n     * Response is a simple object\n     */\n    203: {\n        [key: string]: unknown;\n    };\n};\n\nexport type TypesResponse = TypesResponses[keyof TypesResponses];\n\nexport type ComplexTypesData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * Parameter containing object\n         */\n        parameterObject: {\n            first?: {\n                second?: {\n                    third?: string;\n                };\n            };\n        };\n        /**\n         * This is a model with one string property\n         */\n        parameterReference: {\n            /**\n             * This is a simple string property\n             */\n            prop?: string;\n        };\n    };\n    url: '/api/v{api-version}/complex';\n};\n\nexport type ComplexTypesErrors = {\n    /**\n     * 400 server error\n     */\n    400: unknown;\n    /**\n     * 500 server error\n     */\n    500: unknown;\n};\n\nexport type ComplexTypesResponses = {\n    /**\n     * Successful response\n     */\n    200: Array<ModelWithString>;\n};\n\nexport type ComplexTypesResponse = ComplexTypesResponses[keyof ComplexTypesResponses];\n\nexport type CallWithResultFromHeaderData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/header';\n};\n\nexport type CallWithResultFromHeaderErrors = {\n    /**\n     * 400 server error\n     */\n    400: unknown;\n    /**\n     * 500 server error\n     */\n    500: unknown;\n};\n\nexport type CallWithResultFromHeaderResponses = {\n    /**\n     * Successful response\n     */\n    200: unknown;\n};\n\nexport type TestErrorCodeData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * Status code to return\n         */\n        status: string;\n    };\n    url: '/api/v{api-version}/error';\n};\n\nexport type TestErrorCodeErrors = {\n    /**\n     * Custom message: Internal Server Error\n     */\n    500: unknown;\n    /**\n     * Custom message: Not Implemented\n     */\n    501: unknown;\n    /**\n     * Custom message: Bad Gateway\n     */\n    502: unknown;\n    /**\n     * Custom message: Service Unavailable\n     */\n    503: unknown;\n};\n\nexport type TestErrorCodeResponses = {\n    /**\n     * Custom message: Successful response\n     */\n    200: unknown;\n};\n\nexport type NonAsciiæøåÆøÅöôêÊ字符串Data = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * Dummy input param\n         */\n        nonAsciiParamæøåÆØÅöôêÊ: number;\n    };\n    url: '/api/v{api-version}/non-ascii-æøåÆØÅöôêÊ字符串';\n};\n\nexport type NonAsciiæøåÆøÅöôêÊ字符串Responses = {\n    /**\n     * Successful response\n     */\n    200: NonAsciiStringæøåÆøÅöôêÊ字符串;\n};\n\nexport type NonAsciiæøåÆøÅöôêÊ字符串Response = NonAsciiæøåÆøÅöôêÊ字符串Responses[keyof NonAsciiæøåÆøÅöôêÊ字符串Responses];\n\nexport type PostApiVbyApiVersionBodyData = {\n    /**\n     * Body should not be unknown\n     */\n    body: ParameterActivityParams;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/body';\n};\n\nexport type PostApiVbyApiVersionBodyErrors = {\n    /**\n     * Bad Request\n     */\n    400: FailureFailure;\n    /**\n     * Internal Server Error\n     */\n    500: FailureFailure;\n};\n\nexport type PostApiVbyApiVersionBodyError = PostApiVbyApiVersionBodyErrors[keyof PostApiVbyApiVersionBodyErrors];\n\nexport type PostApiVbyApiVersionBodyResponses = {\n    /**\n     * OK\n     */\n    200: ResponsePostActivityResponse;\n};\n\nexport type PostApiVbyApiVersionBodyResponse = PostApiVbyApiVersionBodyResponses[keyof PostApiVbyApiVersionBodyResponses];\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/vue-query/name-builder/@tanstack/vue-query.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport { type DefaultError, queryOptions, type UseMutationOptions } from '@tanstack/vue-query';\n\nimport { client } from '../client.gen';\nimport { fooBarPost, fooBarPut, fooPost, fooPut, getFoo, getFooBar, type Options } from '../sdk.gen';\nimport type { FooBarPostData, FooBarPostResponse, FooBarPutData, FooBarPutResponse, FooPostData, FooPostResponse, FooPutData, FooPutResponse, GetFooBarData, GetFooBarResponse, GetFooData, GetFooResponse } from '../types.gen';\n\nexport type QueryKey<TOptions extends Options> = [\n    Pick<TOptions, 'baseUrl' | 'body' | 'headers' | 'path' | 'query'> & {\n        _id: string;\n        _infinite?: boolean;\n        tags?: ReadonlyArray<string>;\n    }\n];\n\nconst createQueryKey = <TOptions extends Options>(id: string, options?: TOptions, infinite?: boolean, tags?: ReadonlyArray<string>): [\n    QueryKey<TOptions>[0]\n] => {\n    const params: QueryKey<TOptions>[0] = { _id: id, baseUrl: options?.baseUrl || (options?.client ?? client).getConfig().baseUrl } as QueryKey<TOptions>[0];\n    if (infinite) {\n        params._infinite = infinite;\n    }\n    if (tags) {\n        params.tags = tags;\n    }\n    if (options?.body) {\n        params.body = options.body;\n    }\n    if (options?.headers) {\n        params.headers = options.headers;\n    }\n    if (options?.path) {\n        params.path = options.path;\n    }\n    if (options?.query) {\n        params.query = options.query;\n    }\n    return [params];\n};\n\nexport const getFooD = (options?: Options<GetFooData>) => createQueryKey('getFoo', options);\n\nexport const getFooE = (options?: Options<GetFooData>) => queryOptions<GetFooResponse, DefaultError, GetFooResponse, ReturnType<typeof getFooD>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await getFoo({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: getFooD(options)\n});\n\nexport const fooPostC = (options?: Partial<Options<FooPostData>>): UseMutationOptions<FooPostResponse, DefaultError, Options<FooPostData>> => {\n    const mutationOptions: UseMutationOptions<FooPostResponse, DefaultError, Options<FooPostData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await fooPost({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const fooPutC = (options?: Partial<Options<FooPutData>>): UseMutationOptions<FooPutResponse, DefaultError, Options<FooPutData>> => {\n    const mutationOptions: UseMutationOptions<FooPutResponse, DefaultError, Options<FooPutData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await fooPut({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const getFooBarD = (options?: Options<GetFooBarData>) => createQueryKey('getFooBar', options);\n\nexport const getFooBarE = (options?: Options<GetFooBarData>) => queryOptions<GetFooBarResponse, DefaultError, GetFooBarResponse, ReturnType<typeof getFooBarD>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await getFooBar({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: getFooBarD(options)\n});\n\nexport const fooBarPostC = (options?: Partial<Options<FooBarPostData>>): UseMutationOptions<FooBarPostResponse, DefaultError, Options<FooBarPostData>> => {\n    const mutationOptions: UseMutationOptions<FooBarPostResponse, DefaultError, Options<FooBarPostData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await fooBarPost({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const fooBarPutC = (options?: Partial<Options<FooBarPutData>>): UseMutationOptions<FooBarPutResponse, DefaultError, Options<FooBarPutData>> => {\n    const mutationOptions: UseMutationOptions<FooBarPutResponse, DefaultError, Options<FooBarPutData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await fooBarPut({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/vue-query/name-builder/client/client.gen.ts",
    "content": "// 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 (options: RequestOptions) => {\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 url = buildUrl(opts);\n\n    return { opts, url };\n  };\n\n  const request: Client['request'] = async (options) => {\n    // @ts-expect-error\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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/vue-query/name-builder/client/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type { Auth } from '../core/auth.gen';\nexport type { QuerySerializerOptions } from '../core/bodySerializer.gen';\nexport {\n  formDataBodySerializer,\n  jsonBodySerializer,\n  urlSearchParamsBodySerializer,\n} from '../core/bodySerializer.gen';\nexport { buildClientParams } from '../core/params.gen';\nexport { serializeQueryKeyValue } from '../core/queryKeySerializer.gen';\nexport { createClient } from './client.gen';\nexport type {\n  Client,\n  ClientOptions,\n  Config,\n  CreateClientConfig,\n  Options,\n  RequestOptions,\n  RequestResult,\n  ResolvedRequestOptions,\n  ResponseStyle,\n  TDataShape,\n} from './types.gen';\nexport { createConfig, mergeHeaders } from './utils.gen';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/vue-query/name-builder/client/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { Auth } from '../core/auth.gen';\nimport type {\n  ServerSentEventsOptions,\n  ServerSentEventsResult,\n} from '../core/serverSentEvents.gen';\nimport type { Client as CoreClient, Config as CoreConfig } from '../core/types.gen';\nimport type { Middleware } from './utils.gen';\n\nexport type ResponseStyle = 'data' | 'fields';\n\nexport interface Config<T extends ClientOptions = ClientOptions>\n  extends Omit<RequestInit, 'body' | 'headers' | 'method'>, CoreConfig {\n  /**\n   * Base URL for all requests made by this client.\n   */\n  baseUrl?: T['baseUrl'];\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   * Please don't use the Fetch client for Next.js applications. The `next`\n   * options won't have any effect.\n   *\n   * Install {@link https://www.npmjs.com/package/@hey-api/client-next `@hey-api/client-next`} instead.\n   */\n  next?: never;\n  /**\n   * Return the response data parsed in a specified format. By default, `auto`\n   * will infer the appropriate method from the `Content-Type` response header.\n   * You can override this behavior with any of the {@link Body} methods.\n   * Select `stream` if you don't want to parse response data at all.\n   *\n   * @default 'auto'\n   */\n  parseAs?: 'arrayBuffer' | 'auto' | 'blob' | 'formData' | 'json' | 'stream' | 'text';\n  /**\n   * Should we return only data or multiple fields (data, error, response, etc.)?\n   *\n   * @default 'fields'\n   */\n  responseStyle?: ResponseStyle;\n  /**\n   * Throw an error instead of returning it in the response?\n   *\n   * @default false\n   */\n  throwOnError?: T['throwOnError'];\n}\n\nexport interface RequestOptions<\n  TData = unknown,\n  TResponseStyle extends ResponseStyle = 'fields',\n  ThrowOnError extends boolean = boolean,\n  Url extends string = string,\n>\n  extends\n    Config<{\n      responseStyle: TResponseStyle;\n      throwOnError: ThrowOnError;\n    }>,\n    Pick<\n      ServerSentEventsOptions<TData>,\n      | 'onRequest'\n      | 'onSseError'\n      | 'onSseEvent'\n      | 'sseDefaultRetryDelay'\n      | 'sseMaxRetryAttempts'\n      | 'sseMaxRetryDelay'\n    > {\n  /**\n   * Any body that you want to add to your request.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/fetch#body}\n   */\n  body?: unknown;\n  path?: Record<string, unknown>;\n  query?: Record<string, unknown>;\n  /**\n   * Security mechanism(s) to use for the request.\n   */\n  security?: ReadonlyArray<Auth>;\n  url: Url;\n}\n\nexport interface ResolvedRequestOptions<\n  TResponseStyle extends ResponseStyle = 'fields',\n  ThrowOnError extends boolean = boolean,\n  Url extends string = string,\n> extends RequestOptions<unknown, TResponseStyle, ThrowOnError, Url> {\n  serializedBody?: string;\n}\n\nexport type RequestResult<\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = boolean,\n  TResponseStyle extends ResponseStyle = 'fields',\n> = ThrowOnError extends true\n  ? Promise<\n      TResponseStyle extends 'data'\n        ? TData extends Record<string, unknown>\n          ? TData[keyof TData]\n          : TData\n        : {\n            data: TData extends Record<string, unknown> ? TData[keyof TData] : TData;\n            request: Request;\n            response: Response;\n          }\n    >\n  : Promise<\n      TResponseStyle extends 'data'\n        ? (TData extends Record<string, unknown> ? TData[keyof TData] : TData) | undefined\n        : (\n            | {\n                data: TData extends Record<string, unknown> ? TData[keyof TData] : TData;\n                error: undefined;\n              }\n            | {\n                data: undefined;\n                error: TError extends Record<string, unknown> ? TError[keyof TError] : TError;\n              }\n          ) & {\n            request: Request;\n            response: Response;\n          }\n    >;\n\nexport interface ClientOptions {\n  baseUrl?: string;\n  responseStyle?: ResponseStyle;\n  throwOnError?: boolean;\n}\n\ntype MethodFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'>,\n) => RequestResult<TData, TError, ThrowOnError, TResponseStyle>;\n\ntype SseFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'>,\n) => Promise<ServerSentEventsResult<TData, TError>>;\n\ntype RequestFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'> &\n    Pick<Required<RequestOptions<TData, TResponseStyle, ThrowOnError>>, 'method'>,\n) => RequestResult<TData, TError, ThrowOnError, TResponseStyle>;\n\ntype BuildUrlFn = <\n  TData extends {\n    body?: unknown;\n    path?: Record<string, unknown>;\n    query?: Record<string, unknown>;\n    url: string;\n  },\n>(\n  options: TData & Options<TData>,\n) => string;\n\nexport type Client = CoreClient<RequestFn, Config, MethodFn, BuildUrlFn, SseFn> & {\n  interceptors: Middleware<Request, Response, unknown, ResolvedRequestOptions>;\n};\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 = ClientOptions> = (\n  override?: Config<ClientOptions & T>,\n) => Config<Required<ClientOptions> & T>;\n\nexport interface TDataShape {\n  body?: unknown;\n  headers?: unknown;\n  path?: unknown;\n  query?: unknown;\n  url: string;\n}\n\ntype OmitKeys<T, K> = Pick<T, Exclude<keyof T, K>>;\n\nexport type Options<\n  TData extends TDataShape = TDataShape,\n  ThrowOnError extends boolean = boolean,\n  TResponse = unknown,\n  TResponseStyle extends ResponseStyle = 'fields',\n> = OmitKeys<\n  RequestOptions<TResponse, TResponseStyle, ThrowOnError>,\n  'body' | 'path' | 'query' | 'url'\n> &\n  ([TData] extends [never] ? unknown : Omit<TData, 'url'>);\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/vue-query/name-builder/client/utils.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/vue-query/name-builder/client.gen.ts",
    "content": "// 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>());\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/vue-query/name-builder/core/auth.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/vue-query/name-builder/core/bodySerializer.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/vue-query/name-builder/core/params.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/vue-query/name-builder/core/pathSerializer.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/vue-query/name-builder/core/queryKeySerializer.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\n/**\n * JSON-friendly union that mirrors what Pinia Colada can hash.\n */\nexport type JsonValue =\n  | null\n  | string\n  | number\n  | boolean\n  | JsonValue[]\n  | { [key: string]: JsonValue };\n\n/**\n * Replacer that converts non-JSON values (bigint, Date, etc.) to safe substitutes.\n */\nexport const queryKeyJsonReplacer = (_key: string, value: unknown) => {\n  if (value === undefined || typeof value === 'function' || typeof value === 'symbol') {\n    return undefined;\n  }\n  if (typeof value === 'bigint') {\n    return value.toString();\n  }\n  if (value instanceof Date) {\n    return value.toISOString();\n  }\n  return value;\n};\n\n/**\n * Safely stringifies a value and parses it back into a JsonValue.\n */\nexport const stringifyToJsonValue = (input: unknown): JsonValue | undefined => {\n  try {\n    const json = JSON.stringify(input, queryKeyJsonReplacer);\n    if (json === undefined) {\n      return undefined;\n    }\n    return JSON.parse(json) as JsonValue;\n  } catch {\n    return undefined;\n  }\n};\n\n/**\n * Detects plain objects (including objects with a null prototype).\n */\nconst isPlainObject = (value: unknown): value is Record<string, unknown> => {\n  if (value === null || typeof value !== 'object') {\n    return false;\n  }\n  const prototype = Object.getPrototypeOf(value as object);\n  return prototype === Object.prototype || prototype === null;\n};\n\n/**\n * Turns URLSearchParams into a sorted JSON object for deterministic keys.\n */\nconst serializeSearchParams = (params: URLSearchParams): JsonValue => {\n  const entries = Array.from(params.entries()).sort(([a], [b]) => a.localeCompare(b));\n  const result: Record<string, JsonValue> = {};\n\n  for (const [key, value] of entries) {\n    const existing = result[key];\n    if (existing === undefined) {\n      result[key] = value;\n      continue;\n    }\n\n    if (Array.isArray(existing)) {\n      (existing as string[]).push(value);\n    } else {\n      result[key] = [existing, value];\n    }\n  }\n\n  return result;\n};\n\n/**\n * Normalizes any accepted value into a JSON-friendly shape for query keys.\n */\nexport const serializeQueryKeyValue = (value: unknown): JsonValue | undefined => {\n  if (value === null) {\n    return null;\n  }\n\n  if (typeof value === 'string' || typeof value === 'number' || typeof value === 'boolean') {\n    return value;\n  }\n\n  if (value === undefined || typeof value === 'function' || typeof value === 'symbol') {\n    return undefined;\n  }\n\n  if (typeof value === 'bigint') {\n    return value.toString();\n  }\n\n  if (value instanceof Date) {\n    return value.toISOString();\n  }\n\n  if (Array.isArray(value)) {\n    return stringifyToJsonValue(value);\n  }\n\n  if (typeof URLSearchParams !== 'undefined' && value instanceof URLSearchParams) {\n    return serializeSearchParams(value);\n  }\n\n  if (isPlainObject(value)) {\n    return stringifyToJsonValue(value);\n  }\n\n  return undefined;\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/vue-query/name-builder/core/serverSentEvents.gen.ts",
    "content": "// 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 const 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            // Normalize line endings: CRLF -> LF, then CR -> LF\n            buffer = buffer.replace(/\\r\\n/g, '\\n').replace(/\\r/g, '\\n');\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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/vue-query/name-builder/core/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { Auth, AuthToken } from './auth.gen';\nimport type { BodySerializer, QuerySerializer, QuerySerializerOptions } from './bodySerializer.gen';\n\nexport type HttpMethod =\n  | 'connect'\n  | 'delete'\n  | 'get'\n  | 'head'\n  | 'options'\n  | 'patch'\n  | 'post'\n  | 'put'\n  | 'trace';\n\nexport type Client<\n  RequestFn = never,\n  Config = unknown,\n  MethodFn = never,\n  BuildUrlFn = never,\n  SseFn = never,\n> = {\n  /**\n   * Returns the final request URL.\n   */\n  buildUrl: BuildUrlFn;\n  getConfig: () => Config;\n  request: RequestFn;\n  setConfig: (config: Config) => Config;\n} & {\n  [K in HttpMethod]: MethodFn;\n} & ([SseFn] extends [never] ? { sse?: never } : { sse: { [K in HttpMethod]: SseFn } });\n\nexport interface Config {\n  /**\n   * Auth token or a function returning auth token. The resolved value will be\n   * added to the request payload as defined by its `security` array.\n   */\n  auth?: ((auth: Auth) => Promise<AuthToken> | AuthToken) | AuthToken;\n  /**\n   * A function for serializing request body parameter. By default,\n   * {@link JSON.stringify()} will be used.\n   */\n  bodySerializer?: BodySerializer | null;\n  /**\n   * An object containing any HTTP headers that you want to pre-populate your\n   * `Headers` object with.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/Headers/Headers#init See more}\n   */\n  headers?:\n    | RequestInit['headers']\n    | Record<\n        string,\n        string | number | boolean | (string | number | boolean)[] | null | undefined | unknown\n      >;\n  /**\n   * The request method.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/fetch#method See more}\n   */\n  method?: Uppercase<HttpMethod>;\n  /**\n   * A function for serializing request query parameters. By default, arrays\n   * will be exploded in form style, objects will be exploded in deepObject\n   * style, and reserved characters are percent-encoded.\n   *\n   * This method will have no effect if the native `paramsSerializer()` Axios\n   * API function is used.\n   *\n   * {@link https://swagger.io/docs/specification/serialization/#query View examples}\n   */\n  querySerializer?: QuerySerializer | QuerySerializerOptions;\n  /**\n   * A function validating request data. This is useful if you want to ensure\n   * the request conforms to the desired shape, so it can be safely sent to\n   * the server.\n   */\n  requestValidator?: (data: unknown) => Promise<unknown>;\n  /**\n   * A function transforming response data before it's returned. This is useful\n   * for post-processing data, e.g. converting ISO strings into Date objects.\n   */\n  responseTransformer?: (data: unknown) => Promise<unknown>;\n  /**\n   * A function validating response data. This is useful if you want to ensure\n   * the response conforms to the desired shape, so it can be safely passed to\n   * the transformers and returned to the user.\n   */\n  responseValidator?: (data: unknown) => Promise<unknown>;\n}\n\ntype IsExactlyNeverOrNeverUndefined<T> = [T] extends [never]\n  ? true\n  : [T] extends [never | undefined]\n    ? [undefined] extends [T]\n      ? false\n      : true\n    : false;\n\nexport type OmitNever<T extends Record<string, unknown>> = {\n  [K in keyof T as IsExactlyNeverOrNeverUndefined<T[K]> extends true ? never : K]: T[K];\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/vue-query/name-builder/core/utils.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/vue-query/name-builder/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport { fooBarPost, fooBarPut, fooPost, fooPut, getFoo, getFooBar, type Options } from './sdk.gen';\nexport type { ClientOptions, FooBarPostData, FooBarPostResponse, FooBarPostResponses, FooBarPutData, FooBarPutResponse, FooBarPutResponses, FooPostData, FooPostResponse, FooPostResponses, FooPutData, FooPutResponse, FooPutResponses, GetFooBarData, GetFooBarResponse, GetFooBarResponses, GetFooData, GetFooResponse, GetFooResponses } from './types.gen';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/vue-query/name-builder/sdk.gen.ts",
    "content": "// 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 { FooBarPostData, FooBarPostResponses, FooBarPutData, FooBarPutResponses, FooPostData, FooPostResponses, FooPutData, FooPutResponses, GetFooBarData, GetFooBarResponses, GetFooData, GetFooResponses } from './types.gen';\n\nexport type Options<TData extends TDataShape = TDataShape, ThrowOnError extends boolean = boolean> = Options2<TData, ThrowOnError> & {\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\nexport const getFoo = <ThrowOnError extends boolean = false>(options?: Options<GetFooData, ThrowOnError>) => (options?.client ?? client).get<GetFooResponses, unknown, ThrowOnError>({ url: '/foo', ...options });\n\nexport const fooPost = <ThrowOnError extends boolean = false>(options?: Options<FooPostData, ThrowOnError>) => (options?.client ?? client).post<FooPostResponses, unknown, ThrowOnError>({ url: '/foo', ...options });\n\nexport const fooPut = <ThrowOnError extends boolean = false>(options?: Options<FooPutData, ThrowOnError>) => (options?.client ?? client).put<FooPutResponses, unknown, ThrowOnError>({ url: '/foo', ...options });\n\nexport const getFooBar = <ThrowOnError extends boolean = false>(options?: Options<GetFooBarData, ThrowOnError>) => (options?.client ?? client).get<GetFooBarResponses, unknown, ThrowOnError>({ url: '/foo/bar', ...options });\n\nexport const fooBarPost = <ThrowOnError extends boolean = false>(options?: Options<FooBarPostData, ThrowOnError>) => (options?.client ?? client).post<FooBarPostResponses, unknown, ThrowOnError>({ url: '/foo/bar', ...options });\n\nexport const fooBarPut = <ThrowOnError extends boolean = false>(options?: Options<FooBarPutData, ThrowOnError>) => (options?.client ?? client).put<FooBarPutResponses, unknown, ThrowOnError>({ url: '/foo/bar', ...options });\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/vue-query/name-builder/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type ClientOptions = {\n    baseUrl: string;\n};\n\nexport type GetFooData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/foo';\n};\n\nexport type GetFooResponses = {\n    /**\n     * OK\n     */\n    200: string;\n};\n\nexport type GetFooResponse = GetFooResponses[keyof GetFooResponses];\n\nexport type FooPostData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/foo';\n};\n\nexport type FooPostResponses = {\n    /**\n     * OK\n     */\n    200: string;\n};\n\nexport type FooPostResponse = FooPostResponses[keyof FooPostResponses];\n\nexport type FooPutData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/foo';\n};\n\nexport type FooPutResponses = {\n    /**\n     * OK\n     */\n    200: string;\n};\n\nexport type FooPutResponse = FooPutResponses[keyof FooPutResponses];\n\nexport type GetFooBarData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/foo/bar';\n};\n\nexport type GetFooBarResponses = {\n    /**\n     * OK\n     */\n    200: string;\n};\n\nexport type GetFooBarResponse = GetFooBarResponses[keyof GetFooBarResponses];\n\nexport type FooBarPostData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/foo/bar';\n};\n\nexport type FooBarPostResponses = {\n    /**\n     * OK\n     */\n    200: string;\n};\n\nexport type FooBarPostResponse = FooBarPostResponses[keyof FooBarPostResponses];\n\nexport type FooBarPutData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/foo/bar';\n};\n\nexport type FooBarPutResponses = {\n    /**\n     * OK\n     */\n    200: string;\n};\n\nexport type FooBarPutResponse = FooBarPutResponses[keyof FooBarPutResponses];\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/fastify/default/fastify.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { RouteHandler } from 'fastify';\n\nimport type { CallToTestOrderOfParamsData, CallWithDefaultOptionalParametersData, CallWithDefaultParametersData, CallWithDescriptionsData, CallWithDuplicateResponsesErrors, CallWithDuplicateResponsesResponses, CallWithNoContentResponseResponses, CallWithParametersData, CallWithResponseAndNoContentResponseResponses, CallWithResponsesErrors, CallWithResponsesResponses, CallWithResultFromHeaderErrors, CallWithResultFromHeaderResponses, CallWithWeirdParameterNamesData, CollectionFormatData, ComplexTypesData, ComplexTypesErrors, ComplexTypesResponses, DummyAResponses, DummyBResponses, NonAsciiæøåÆøÅöôêÊ字符串Data, NonAsciiæøåÆøÅöôêÊ字符串Responses, PostApiVbyApiVersionBodyData, PostApiVbyApiVersionBodyErrors, PostApiVbyApiVersionBodyResponses, TestErrorCodeData, TestErrorCodeErrors, TestErrorCodeResponses, TypesData, TypesResponses } from './types.gen';\n\nexport type RouteHandlers = {\n    callWithDescriptions: RouteHandler<{\n        Querystring?: CallWithDescriptionsData['query'];\n    }>;\n    callWithParameters: RouteHandler<{\n        Headers: CallWithParametersData['headers'];\n        Params: CallWithParametersData['path'];\n        Querystring: CallWithParametersData['query'];\n    }>;\n    callWithWeirdParameterNames: RouteHandler<{\n        Body: CallWithWeirdParameterNamesData['body'];\n        Headers: CallWithWeirdParameterNamesData['headers'];\n        Params: CallWithWeirdParameterNamesData['path'];\n        Querystring: CallWithWeirdParameterNamesData['query'];\n    }>;\n    callWithDefaultParameters: RouteHandler<{\n        Querystring: CallWithDefaultParametersData['query'];\n    }>;\n    callWithDefaultOptionalParameters: RouteHandler<{\n        Querystring?: CallWithDefaultOptionalParametersData['query'];\n    }>;\n    callToTestOrderOfParams: RouteHandler<{\n        Querystring: CallToTestOrderOfParamsData['query'];\n    }>;\n    callWithNoContentResponse: RouteHandler<{\n        Reply: CallWithNoContentResponseResponses;\n    }>;\n    callWithResponseAndNoContentResponse: RouteHandler<{\n        Reply: CallWithResponseAndNoContentResponseResponses;\n    }>;\n    dummyA: RouteHandler<{\n        Reply: DummyAResponses;\n    }>;\n    dummyB: RouteHandler<{\n        Reply: DummyBResponses;\n    }>;\n    callWithDuplicateResponses: RouteHandler<{\n        Reply: Omit<CallWithDuplicateResponsesErrors, 'default'> & CallWithDuplicateResponsesResponses;\n    }>;\n    callWithResponses: RouteHandler<{\n        Reply: Omit<CallWithResponsesErrors, 'default'> & CallWithResponsesResponses;\n    }>;\n    collectionFormat: RouteHandler<{\n        Querystring: CollectionFormatData['query'];\n    }>;\n    types: RouteHandler<{\n        Params?: TypesData['path'];\n        Querystring: TypesData['query'];\n        Reply: TypesResponses;\n    }>;\n    complexTypes: RouteHandler<{\n        Querystring: ComplexTypesData['query'];\n        Reply: ComplexTypesErrors & ComplexTypesResponses;\n    }>;\n    callWithResultFromHeader: RouteHandler<{\n        Reply: CallWithResultFromHeaderErrors & CallWithResultFromHeaderResponses;\n    }>;\n    testErrorCode: RouteHandler<{\n        Querystring: TestErrorCodeData['query'];\n        Reply: TestErrorCodeErrors & TestErrorCodeResponses;\n    }>;\n    nonAsciiæøåÆøÅöôêÊ字符串: RouteHandler<{\n        Querystring: NonAsciiæøåÆøÅöôêÊ字符串Data['query'];\n        Reply: NonAsciiæøåÆøÅöôêÊ字符串Responses;\n    }>;\n    postApiVbyApiVersionBody: RouteHandler<{\n        Body: PostApiVbyApiVersionBodyData['body'];\n        Reply: PostApiVbyApiVersionBodyErrors & PostApiVbyApiVersionBodyResponses;\n    }>;\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/fastify/default/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type { ArrayWithArray, ArrayWithBooleans, ArrayWithNumbers, ArrayWithProperties, ArrayWithReferences, ArrayWithStrings, CallToTestOrderOfParamsData, CallWithDefaultOptionalParametersData, CallWithDefaultParametersData, CallWithDescriptionsData, CallWithDuplicateResponsesData, CallWithDuplicateResponsesError, CallWithDuplicateResponsesErrors, CallWithDuplicateResponsesResponse, CallWithDuplicateResponsesResponses, CallWithNoContentResponseData, CallWithNoContentResponseResponses, CallWithParametersData, CallWithResponseAndNoContentResponseData, CallWithResponseAndNoContentResponseResponse, CallWithResponseAndNoContentResponseResponses, CallWithResponseData, CallWithResponseResponse, CallWithResponseResponses, CallWithResponsesData, CallWithResponsesError, CallWithResponsesErrors, CallWithResponsesResponse, CallWithResponsesResponses, CallWithResultFromHeaderData, CallWithResultFromHeaderErrors, CallWithResultFromHeaderResponses, CallWithWeirdParameterNamesData, ClientOptions, CollectionFormatData, CommentWithBackticks, CommentWithBackticksAndQuotes, CommentWithBreaks, CommentWithExpressionPlaceholders, CommentWithQuotes, CommentWithReservedCharacters, CommentWithSlashes, ComplexTypesData, ComplexTypesErrors, ComplexTypesResponse, ComplexTypesResponses, Date, Default, DeleteCallWithoutParametersAndResponseData, DictionaryWithArray, DictionaryWithDictionary, DictionaryWithProperties, DictionaryWithReference, DictionaryWithString, DummyAData, DummyAResponses, DummyBData, DummyBResponses, DuplicateName2Data, DuplicateName3Data, DuplicateName4Data, DuplicateNameData, EnumFromDescription, EnumWithExtensions, EnumWithNumbers, EnumWithStrings, ExternalRefA, ExternalRefB, ExternalSharedModel, FailureFailure, FooWowData, FooWowResponses, GetCallWithoutParametersAndResponseData, HeadCallWithoutParametersAndResponseData, ModelThatExtends, ModelThatExtendsExtends, ModelWithArray, ModelWithBoolean, ModelWithCircularReference, ModelWithDictionary, ModelWithDuplicateImports, ModelWithDuplicateProperties, ModelWithEnum, ModelWithEnumFromDescription, ModelWithInteger, ModelWithNestedEnums, ModelWithNestedProperties, ModelWithNullableString, ModelWithOrderedProperties, ModelWithPattern, ModelWithPatternWritable, ModelWithProperties, ModelWithPropertiesWritable, ModelWithReference, ModelWithReferenceWritable, ModelWithString, ModelWithStringError, NonAsciiæøåÆøÅöôêÊ字符串Data, NonAsciiæøåÆøÅöôêÊ字符串Response, NonAsciiæøåÆøÅöôêÊ字符串Responses, NonAsciiStringæøåÆøÅöôêÊ字符串, OptionsCallWithoutParametersAndResponseData, ParameterActivityParams, PatchApiVbyApiVersionNoTagData, PatchApiVbyApiVersionNoTagResponses, PatchCallWithoutParametersAndResponseData, PostApiVbyApiVersionBodyData, PostApiVbyApiVersionBodyError, PostApiVbyApiVersionBodyErrors, PostApiVbyApiVersionBodyResponse, PostApiVbyApiVersionBodyResponses, PostCallWithoutParametersAndResponseData, PutCallWithoutParametersAndResponseData, ResponsePostActivityResponse, ServiceWithEmptyTagData, SimpleBoolean, SimpleFile, SimpleInteger, SimpleReference, SimpleString, SimpleStringWithPattern, TestErrorCodeData, TestErrorCodeErrors, TestErrorCodeResponses, TypesData, TypesResponse, TypesResponses } from './types.gen';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/fastify/default/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type ClientOptions = {\n    baseUrl: 'http://localhost:3000/base' | (string & {});\n};\n\nexport type ExternalRefA = ExternalSharedModel;\n\nexport type ExternalRefB = ExternalSharedModel;\n\n/**\n * Testing multiline comments in string: First line\n * Second line\n *\n * Fourth line\n */\nexport type CommentWithBreaks = number;\n\n/**\n * Testing backticks in string: `backticks` and ```multiple backticks``` should work\n */\nexport type CommentWithBackticks = number;\n\n/**\n * Testing backticks and quotes in string: `backticks`, 'quotes', \"double quotes\" and ```multiple backticks``` should work\n */\nexport type CommentWithBackticksAndQuotes = number;\n\n/**\n * Testing slashes in string: \\backwards\\\\\\ and /forwards/// should work\n */\nexport type CommentWithSlashes = number;\n\n/**\n * Testing expression placeholders in string: ${expression} should work\n */\nexport type CommentWithExpressionPlaceholders = number;\n\n/**\n * Testing quotes in string: 'single quote''' and \"double quotes\"\"\" should work\n */\nexport type CommentWithQuotes = number;\n\n/**\n * Testing reserved characters in string: * inline * and ** inline ** should work\n */\nexport type CommentWithReservedCharacters = number;\n\n/**\n * This is a simple number\n */\nexport type SimpleInteger = number;\n\n/**\n * This is a simple boolean\n */\nexport type SimpleBoolean = boolean;\n\n/**\n * This is a simple string\n */\nexport type SimpleString = string;\n\n/**\n * A string with non-ascii (unicode) characters valid in typescript identifiers (æøåÆØÅöÔèÈ字符串)\n */\nexport type NonAsciiStringæøåÆøÅöôêÊ字符串 = string;\n\n/**\n * This is a simple file\n */\nexport type SimpleFile = Blob | File;\n\nexport type SimpleReference = ModelWithString;\n\n/**\n * This is a simple string\n */\nexport type SimpleStringWithPattern = string;\n\n/**\n * This is a simple enum with strings\n */\nexport type EnumWithStrings = 'Success' | 'Warning' | 'Error' | '\\'Single Quote\\'' | '\"Double Quotes\"' | 'Non-ascii: øæåôöØÆÅÔÖ字符串';\n\n/**\n * This is a simple enum with numbers\n */\nexport type EnumWithNumbers = 1 | 2 | 3 | 1.1 | 1.2 | 1.3 | 100 | 200 | 300 | -100 | -200 | -300 | -1.1 | -1.2 | -1.3;\n\n/**\n * Success=1,Warning=2,Error=3\n */\nexport type EnumFromDescription = number;\n\n/**\n * This is a simple enum with numbers\n */\nexport type EnumWithExtensions = 200 | 400 | 500;\n\n/**\n * This is a simple array with numbers\n */\nexport type ArrayWithNumbers = Array<number>;\n\n/**\n * This is a simple array with booleans\n */\nexport type ArrayWithBooleans = Array<boolean>;\n\n/**\n * This is a simple array with strings\n */\nexport type ArrayWithStrings = Array<string>;\n\n/**\n * This is a simple array with references\n */\nexport type ArrayWithReferences = Array<ModelWithString>;\n\n/**\n * This is a simple array containing an array\n */\nexport type ArrayWithArray = Array<Array<ModelWithString>>;\n\n/**\n * This is a simple array with properties\n */\nexport type ArrayWithProperties = Array<{\n    foo?: string;\n    bar?: string;\n}>;\n\n/**\n * This is a string dictionary\n */\nexport type DictionaryWithString = {\n    [key: string]: string;\n};\n\n/**\n * This is a string reference\n */\nexport type DictionaryWithReference = {\n    [key: string]: ModelWithString;\n};\n\n/**\n * This is a complex dictionary\n */\nexport type DictionaryWithArray = {\n    [key: string]: Array<ModelWithString>;\n};\n\n/**\n * This is a string dictionary\n */\nexport type DictionaryWithDictionary = {\n    [key: string]: {\n        [key: string]: string;\n    };\n};\n\n/**\n * This is a complex dictionary\n */\nexport type DictionaryWithProperties = {\n    [key: string]: {\n        foo?: string;\n        bar?: string;\n    };\n};\n\n/**\n * This is a type-only model that defines Date as a string\n */\nexport type Date = string;\n\n/**\n * This is a model with one number property\n */\nexport type ModelWithInteger = {\n    /**\n     * This is a simple number property\n     */\n    prop?: number;\n};\n\n/**\n * This is a model with one boolean property\n */\nexport type ModelWithBoolean = {\n    /**\n     * This is a simple boolean property\n     */\n    prop?: boolean;\n};\n\n/**\n * This is a model with one string property\n */\nexport type ModelWithString = {\n    /**\n     * This is a simple string property\n     */\n    prop?: string;\n};\n\n/**\n * This is a model with one string property\n */\nexport type ModelWithStringError = {\n    /**\n     * This is a simple string property\n     */\n    prop?: string;\n};\n\n/**\n * This is a model with one string property\n */\nexport type ModelWithNullableString = {\n    /**\n     * This is a simple string property\n     */\n    nullableProp?: string | null;\n    /**\n     * This is a simple string property\n     */\n    nullableRequiredProp: string | null;\n};\n\n/**\n * This is a model with one enum\n */\nexport type ModelWithEnum = {\n    /**\n     * This is a simple enum with strings\n     */\n    test?: 'Success' | 'Warning' | 'Error' | 'ØÆÅ字符串';\n    /**\n     * These are the HTTP error code enums\n     */\n    statusCode?: '100' | '200 FOO' | '300 FOO_BAR' | '400 foo-bar' | '500 foo.bar' | '600 foo&bar';\n    /**\n     * Simple boolean enum\n     */\n    bool?: true;\n};\n\n/**\n * This is a model with one enum\n */\nexport type ModelWithEnumFromDescription = {\n    /**\n     * Success=1,Warning=2,Error=3\n     */\n    test?: number;\n};\n\n/**\n * This is a model with nested enums\n */\nexport type ModelWithNestedEnums = {\n    dictionaryWithEnum?: {\n        [key: string]: 'Success' | 'Warning' | 'Error';\n    };\n    dictionaryWithEnumFromDescription?: {\n        [key: string]: number;\n    };\n    arrayWithEnum?: Array<'Success' | 'Warning' | 'Error'>;\n    arrayWithDescription?: Array<number>;\n};\n\n/**\n * This is a model with one property containing a reference\n */\nexport type ModelWithReference = {\n    prop?: ModelWithProperties;\n};\n\n/**\n * This is a model with one property containing an array\n */\nexport type ModelWithArray = {\n    prop?: Array<ModelWithString>;\n    propWithFile?: Array<Blob | File>;\n    propWithNumber?: Array<number>;\n};\n\n/**\n * This is a model with one property containing a dictionary\n */\nexport type ModelWithDictionary = {\n    prop?: {\n        [key: string]: string;\n    };\n};\n\n/**\n * This is a model with one property containing a circular reference\n */\nexport type ModelWithCircularReference = {\n    prop?: ModelWithCircularReference;\n};\n\n/**\n * This is a model with one nested property\n */\nexport type ModelWithProperties = {\n    required: string;\n    readonly requiredAndReadOnly: string;\n    string?: string;\n    number?: number;\n    boolean?: boolean;\n    reference?: ModelWithString;\n    'property with space'?: string;\n    default?: string;\n    try?: string;\n    readonly '@namespace.string'?: string;\n    readonly '@namespace.integer'?: number;\n};\n\n/**\n * This is a model with one nested property\n */\nexport type ModelWithNestedProperties = {\n    readonly first: {\n        readonly second: {\n            readonly third: string;\n        };\n    };\n};\n\n/**\n * This is a model with duplicated properties\n */\nexport type ModelWithDuplicateProperties = {\n    prop?: ModelWithString;\n};\n\n/**\n * This is a model with ordered properties\n */\nexport type ModelWithOrderedProperties = {\n    zebra?: string;\n    apple?: string;\n    hawaii?: string;\n};\n\n/**\n * This is a model with duplicated imports\n */\nexport type ModelWithDuplicateImports = {\n    propA?: ModelWithString;\n    propB?: ModelWithString;\n    propC?: ModelWithString;\n};\n\n/**\n * This is a model that extends another model\n */\nexport type ModelThatExtends = ModelWithString & {\n    propExtendsA?: string;\n    propExtendsB?: ModelWithString;\n};\n\n/**\n * This is a model that extends another model\n */\nexport type ModelThatExtendsExtends = ModelWithString & ModelThatExtends & {\n    propExtendsC?: string;\n    propExtendsD?: ModelWithString;\n};\n\nexport type Default = {\n    name?: string;\n};\n\n/**\n * This is a model that contains a some patterns\n */\nexport type ModelWithPattern = {\n    key: string;\n    name: string;\n    readonly enabled?: boolean;\n    readonly modified?: string;\n    id?: string;\n    text?: string;\n    patternWithSingleQuotes?: string;\n    patternWithNewline?: string;\n    patternWithBacktick?: string;\n    patternWithUnicode?: string;\n};\n\nexport type ParameterActivityParams = {\n    description?: string;\n    graduate_id?: number;\n    organization_id?: number;\n    parent_activity?: number;\n    post_id?: number;\n};\n\nexport type ResponsePostActivityResponse = {\n    description?: string;\n    graduate_id?: number;\n    organization_id?: number;\n    parent_activity_id?: number;\n    post_id?: number;\n};\n\nexport type FailureFailure = {\n    error?: string;\n    message?: string;\n    reference_code?: string;\n};\n\nexport type ExternalSharedModel = {\n    id: string;\n    name?: string;\n};\n\n/**\n * This is a model with one property containing a reference\n */\nexport type ModelWithReferenceWritable = {\n    prop?: ModelWithPropertiesWritable;\n};\n\n/**\n * This is a model with one nested property\n */\nexport type ModelWithPropertiesWritable = {\n    required: string;\n    string?: string;\n    number?: number;\n    boolean?: boolean;\n    reference?: ModelWithString;\n    'property with space'?: string;\n    default?: string;\n    try?: string;\n};\n\n/**\n * This is a model that contains a some patterns\n */\nexport type ModelWithPatternWritable = {\n    key: string;\n    name: string;\n    id?: string;\n    text?: string;\n    patternWithSingleQuotes?: string;\n    patternWithNewline?: string;\n    patternWithBacktick?: string;\n    patternWithUnicode?: string;\n};\n\nexport type ServiceWithEmptyTagData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no+tag';\n};\n\nexport type PatchApiVbyApiVersionNoTagData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no+tag';\n};\n\nexport type PatchApiVbyApiVersionNoTagResponses = {\n    /**\n     * OK\n     */\n    default: unknown;\n};\n\nexport type FooWowData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no+tag';\n};\n\nexport type FooWowResponses = {\n    /**\n     * OK\n     */\n    default: unknown;\n};\n\nexport type DeleteCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type GetCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type HeadCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type OptionsCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type PatchCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type PostCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type PutCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type CallWithDescriptionsData = {\n    body?: never;\n    path?: never;\n    query?: {\n        /**\n         * Testing multiline comments in string: First line\n         * Second line\n         *\n         * Fourth line\n         */\n        parameterWithBreaks?: string;\n        /**\n         * Testing backticks in string: `backticks` and ```multiple backticks``` should work\n         */\n        parameterWithBackticks?: string;\n        /**\n         * Testing slashes in string: \\backwards\\\\\\ and /forwards/// should work\n         */\n        parameterWithSlashes?: string;\n        /**\n         * Testing expression placeholders in string: ${expression} should work\n         */\n        parameterWithExpressionPlaceholders?: string;\n        /**\n         * Testing quotes in string: 'single quote''' and \"double quotes\"\"\" should work\n         */\n        parameterWithQuotes?: string;\n        /**\n         * Testing reserved characters in string: * inline * and ** inline ** should work\n         */\n        parameterWithReservedCharacters?: string;\n    };\n    url: '/api/v{api-version}/descriptions/';\n};\n\nexport type CallWithParametersData = {\n    body?: never;\n    headers: {\n        /**\n         * This is the parameter that goes into the header\n         */\n        parameterHeader: string;\n    };\n    path: {\n        /**\n         * This is the parameter that goes into the path\n         */\n        parameterPath: string;\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string;\n    };\n    query: {\n        /**\n         * This is the parameter that goes into the query params\n         */\n        parameterQuery: string;\n    };\n    url: '/api/v{api-version}/parameters/{parameterPath}';\n};\n\nexport type CallWithWeirdParameterNamesData = {\n    /**\n     * This is the parameter that is sent as request body\n     */\n    body: string;\n    headers: {\n        /**\n         * This is the parameter that goes into the request header\n         */\n        'parameter.header': string;\n    };\n    path: {\n        /**\n         * This is the parameter that goes into the path\n         */\n        'parameter.path.1'?: string;\n        /**\n         * This is the parameter that goes into the path\n         */\n        'parameter-path-2'?: string;\n        /**\n         * This is the parameter that goes into the path\n         */\n        'PARAMETER-PATH-3'?: string;\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string;\n    };\n    query: {\n        /**\n         * This is the parameter with a reserved keyword\n         */\n        default?: string;\n        /**\n         * This is the parameter that goes into the request query params\n         */\n        'parameter-query': string;\n    };\n    url: '/api/v{api-version}/parameters/{parameter.path.1}/{parameter-path-2}/{PARAMETER-PATH-3}';\n};\n\nexport type CallWithDefaultParametersData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * This is a simple string with default value\n         */\n        parameterString: string;\n        /**\n         * This is a simple number with default value\n         */\n        parameterNumber: number;\n        /**\n         * This is a simple boolean with default value\n         */\n        parameterBoolean: boolean;\n        /**\n         * This is a simple enum with default value\n         */\n        parameterEnum: 'Success' | 'Warning' | 'Error';\n        /**\n         * This is a model with one string property\n         */\n        parameterModel: {\n            /**\n             * This is a simple string property\n             */\n            prop?: string;\n        };\n    };\n    url: '/api/v{api-version}/defaults';\n};\n\nexport type CallWithDefaultOptionalParametersData = {\n    body?: never;\n    path?: never;\n    query?: {\n        /**\n         * This is a simple string that is optional with default value\n         */\n        parameterString?: string;\n        /**\n         * This is a simple number that is optional with default value\n         */\n        parameterNumber?: number;\n        /**\n         * This is a simple boolean that is optional with default value\n         */\n        parameterBoolean?: boolean;\n        /**\n         * This is a simple enum that is optional with default value\n         */\n        parameterEnum?: 'Success' | 'Warning' | 'Error';\n    };\n    url: '/api/v{api-version}/defaults';\n};\n\nexport type CallToTestOrderOfParamsData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * This is a optional string with default\n         */\n        parameterOptionalStringWithDefault?: string;\n        /**\n         * This is a optional string with empty default\n         */\n        parameterOptionalStringWithEmptyDefault?: string;\n        /**\n         * This is a optional string with no default\n         */\n        parameterOptionalStringWithNoDefault?: string;\n        /**\n         * This is a string with default\n         */\n        parameterStringWithDefault: string;\n        /**\n         * This is a string with empty default\n         */\n        parameterStringWithEmptyDefault: string;\n        /**\n         * This is a string with no default\n         */\n        parameterStringWithNoDefault: string;\n        /**\n         * This is a string that can be null with no default\n         */\n        parameterStringNullableWithNoDefault?: string | null;\n        /**\n         * This is a string that can be null with default\n         */\n        parameterStringNullableWithDefault?: string | null;\n    };\n    url: '/api/v{api-version}/defaults';\n};\n\nexport type DuplicateNameData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/duplicate';\n};\n\nexport type DuplicateName2Data = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/duplicate';\n};\n\nexport type DuplicateName3Data = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/duplicate';\n};\n\nexport type DuplicateName4Data = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/duplicate';\n};\n\nexport type CallWithNoContentResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no-content';\n};\n\nexport type CallWithNoContentResponseResponses = {\n    /**\n     * Success\n     */\n    204: unknown;\n};\n\nexport type CallWithResponseAndNoContentResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multiple-tags/response-and-no-content';\n};\n\nexport type CallWithResponseAndNoContentResponseResponses = {\n    /**\n     * Response is a simple number\n     */\n    200: number;\n    /**\n     * Success\n     */\n    204: unknown;\n};\n\nexport type CallWithResponseAndNoContentResponseResponse = CallWithResponseAndNoContentResponseResponses[keyof CallWithResponseAndNoContentResponseResponses];\n\nexport type DummyAData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multiple-tags/a';\n};\n\nexport type DummyAResponses = {\n    /**\n     * Success\n     */\n    204: unknown;\n};\n\nexport type DummyBData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multiple-tags/b';\n};\n\nexport type DummyBResponses = {\n    /**\n     * Success\n     */\n    204: unknown;\n};\n\nexport type CallWithResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/response';\n};\n\nexport type CallWithResponseResponses = {\n    /**\n     * Message for default response\n     */\n    default: ModelWithString;\n};\n\nexport type CallWithResponseResponse = CallWithResponseResponses[keyof CallWithResponseResponses];\n\nexport type CallWithDuplicateResponsesData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/response';\n};\n\nexport type CallWithDuplicateResponsesErrors = {\n    /**\n     * Message for 500 error\n     */\n    500: ModelWithStringError;\n    /**\n     * Message for 501 error\n     */\n    501: ModelWithStringError;\n    /**\n     * Message for 502 error\n     */\n    502: ModelWithStringError;\n    /**\n     * Message for default response\n     */\n    default: ModelWithString;\n};\n\nexport type CallWithDuplicateResponsesError = CallWithDuplicateResponsesErrors[keyof CallWithDuplicateResponsesErrors];\n\nexport type CallWithDuplicateResponsesResponses = {\n    /**\n     * Message for 201 response\n     */\n    201: ModelWithString;\n    /**\n     * Message for 202 response\n     */\n    202: ModelWithString;\n};\n\nexport type CallWithDuplicateResponsesResponse = CallWithDuplicateResponsesResponses[keyof CallWithDuplicateResponsesResponses];\n\nexport type CallWithResponsesData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/response';\n};\n\nexport type CallWithResponsesErrors = {\n    /**\n     * Message for 500 error\n     */\n    500: ModelWithStringError;\n    /**\n     * Message for 501 error\n     */\n    501: ModelWithStringError;\n    /**\n     * Message for 502 error\n     */\n    502: ModelWithStringError;\n    /**\n     * Message for default response\n     */\n    default: ModelWithString;\n};\n\nexport type CallWithResponsesError = CallWithResponsesErrors[keyof CallWithResponsesErrors];\n\nexport type CallWithResponsesResponses = {\n    /**\n     * Message for 200 response\n     */\n    200: {\n        readonly '@namespace.string'?: string;\n        readonly '@namespace.integer'?: number;\n        readonly value?: Array<ModelWithString>;\n    };\n    /**\n     * Message for 201 response\n     */\n    201: ModelThatExtends;\n    /**\n     * Message for 202 response\n     */\n    202: ModelThatExtendsExtends;\n};\n\nexport type CallWithResponsesResponse = CallWithResponsesResponses[keyof CallWithResponsesResponses];\n\nexport type CollectionFormatData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * This is an array parameter that is sent as csv format (comma-separated values)\n         */\n        parameterArrayCSV: Array<string>;\n        /**\n         * This is an array parameter that is sent as ssv format (space-separated values)\n         */\n        parameterArraySSV: Array<string>;\n        /**\n         * This is an array parameter that is sent as tsv format (tab-separated values)\n         */\n        parameterArrayTSV: Array<string>;\n        /**\n         * This is an array parameter that is sent as pipes format (pipe-separated values)\n         */\n        parameterArrayPipes: Array<string>;\n        /**\n         * This is an array parameter that is sent as multi format (multiple parameter instances)\n         */\n        parameterArrayMulti: Array<string>;\n    };\n    url: '/api/v{api-version}/collectionFormat';\n};\n\nexport type TypesData = {\n    body?: never;\n    path?: {\n        /**\n         * This is a number parameter\n         */\n        id?: number;\n    };\n    query: {\n        /**\n         * This is a number parameter\n         */\n        parameterNumber: number;\n        /**\n         * This is a string parameter\n         */\n        parameterString: string;\n        /**\n         * This is a boolean parameter\n         */\n        parameterBoolean: boolean;\n        /**\n         * This is an array parameter\n         */\n        parameterArray: Array<string>;\n        /**\n         * This is a dictionary parameter\n         */\n        parameterDictionary: {\n            [key: string]: unknown;\n        };\n        /**\n         * This is an enum parameter\n         */\n        parameterEnum: 'Success' | 'Warning' | 'Error';\n    };\n    url: '/api/v{api-version}/types';\n};\n\nexport type TypesResponses = {\n    /**\n     * Response is a simple number\n     */\n    200: number;\n    /**\n     * Response is a simple string\n     */\n    201: string;\n    /**\n     * Response is a simple boolean\n     */\n    202: boolean;\n    /**\n     * Response is a simple object\n     */\n    203: {\n        [key: string]: unknown;\n    };\n};\n\nexport type TypesResponse = TypesResponses[keyof TypesResponses];\n\nexport type ComplexTypesData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * Parameter containing object\n         */\n        parameterObject: {\n            first?: {\n                second?: {\n                    third?: string;\n                };\n            };\n        };\n        /**\n         * This is a model with one string property\n         */\n        parameterReference: {\n            /**\n             * This is a simple string property\n             */\n            prop?: string;\n        };\n    };\n    url: '/api/v{api-version}/complex';\n};\n\nexport type ComplexTypesErrors = {\n    /**\n     * 400 server error\n     */\n    400: unknown;\n    /**\n     * 500 server error\n     */\n    500: unknown;\n};\n\nexport type ComplexTypesResponses = {\n    /**\n     * Successful response\n     */\n    200: Array<ModelWithString>;\n};\n\nexport type ComplexTypesResponse = ComplexTypesResponses[keyof ComplexTypesResponses];\n\nexport type CallWithResultFromHeaderData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/header';\n};\n\nexport type CallWithResultFromHeaderErrors = {\n    /**\n     * 400 server error\n     */\n    400: unknown;\n    /**\n     * 500 server error\n     */\n    500: unknown;\n};\n\nexport type CallWithResultFromHeaderResponses = {\n    /**\n     * Successful response\n     */\n    200: unknown;\n};\n\nexport type TestErrorCodeData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * Status code to return\n         */\n        status: string;\n    };\n    url: '/api/v{api-version}/error';\n};\n\nexport type TestErrorCodeErrors = {\n    /**\n     * Custom message: Internal Server Error\n     */\n    500: unknown;\n    /**\n     * Custom message: Not Implemented\n     */\n    501: unknown;\n    /**\n     * Custom message: Bad Gateway\n     */\n    502: unknown;\n    /**\n     * Custom message: Service Unavailable\n     */\n    503: unknown;\n};\n\nexport type TestErrorCodeResponses = {\n    /**\n     * Custom message: Successful response\n     */\n    200: unknown;\n};\n\nexport type NonAsciiæøåÆøÅöôêÊ字符串Data = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * Dummy input param\n         */\n        nonAsciiParamæøåÆØÅöôêÊ: number;\n    };\n    url: '/api/v{api-version}/non-ascii-æøåÆØÅöôêÊ字符串';\n};\n\nexport type NonAsciiæøåÆøÅöôêÊ字符串Responses = {\n    /**\n     * Successful response\n     */\n    200: NonAsciiStringæøåÆøÅöôêÊ字符串;\n};\n\nexport type NonAsciiæøåÆøÅöôêÊ字符串Response = NonAsciiæøåÆøÅöôêÊ字符串Responses[keyof NonAsciiæøåÆøÅöôêÊ字符串Responses];\n\nexport type PostApiVbyApiVersionBodyData = {\n    /**\n     * Body should not be unknown\n     */\n    body: ParameterActivityParams;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/body';\n};\n\nexport type PostApiVbyApiVersionBodyErrors = {\n    /**\n     * Bad Request\n     */\n    400: FailureFailure;\n    /**\n     * Internal Server Error\n     */\n    500: FailureFailure;\n};\n\nexport type PostApiVbyApiVersionBodyError = PostApiVbyApiVersionBodyErrors[keyof PostApiVbyApiVersionBodyErrors];\n\nexport type PostApiVbyApiVersionBodyResponses = {\n    /**\n     * OK\n     */\n    200: ResponsePostActivityResponse;\n};\n\nexport type PostApiVbyApiVersionBodyResponse = PostApiVbyApiVersionBodyResponses[keyof PostApiVbyApiVersionBodyResponses];\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/ref-deep/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type { Bar, ClientOptions, Foo, GetFooData, GetFooResponses, PostFooData, PostFooResponses } from './types.gen';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/ref-deep/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type ClientOptions = {\n    baseUrl: string;\n};\n\nexport type Foo = {\n    foo?: Array<{\n        baz?: string;\n    }>;\n    bar?: Array<{\n        baz?: string;\n    }>;\n};\n\nexport type Bar = {\n    foo?: Array<{\n        baz?: string;\n    }>;\n    bar?: Array<{\n        baz?: string;\n    }>;\n};\n\nexport type GetFooData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/foo';\n};\n\nexport type GetFooResponses = {\n    /**\n     * OK\n     */\n    200: unknown;\n};\n\nexport type PostFooData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/foo';\n};\n\nexport type PostFooResponses = {\n    /**\n     * OK\n     */\n    200: unknown;\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/schema-unknown/client/client.gen.ts",
    "content": "// 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 (options: RequestOptions) => {\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 url = buildUrl(opts);\n\n    return { opts, url };\n  };\n\n  const request: Client['request'] = async (options) => {\n    // @ts-expect-error\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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/schema-unknown/client/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type { Auth } from '../core/auth.gen';\nexport type { QuerySerializerOptions } from '../core/bodySerializer.gen';\nexport {\n  formDataBodySerializer,\n  jsonBodySerializer,\n  urlSearchParamsBodySerializer,\n} from '../core/bodySerializer.gen';\nexport { buildClientParams } from '../core/params.gen';\nexport { serializeQueryKeyValue } from '../core/queryKeySerializer.gen';\nexport { createClient } from './client.gen';\nexport type {\n  Client,\n  ClientOptions,\n  Config,\n  CreateClientConfig,\n  Options,\n  RequestOptions,\n  RequestResult,\n  ResolvedRequestOptions,\n  ResponseStyle,\n  TDataShape,\n} from './types.gen';\nexport { createConfig, mergeHeaders } from './utils.gen';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/schema-unknown/client/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { Auth } from '../core/auth.gen';\nimport type {\n  ServerSentEventsOptions,\n  ServerSentEventsResult,\n} from '../core/serverSentEvents.gen';\nimport type { Client as CoreClient, Config as CoreConfig } from '../core/types.gen';\nimport type { Middleware } from './utils.gen';\n\nexport type ResponseStyle = 'data' | 'fields';\n\nexport interface Config<T extends ClientOptions = ClientOptions>\n  extends Omit<RequestInit, 'body' | 'headers' | 'method'>, CoreConfig {\n  /**\n   * Base URL for all requests made by this client.\n   */\n  baseUrl?: T['baseUrl'];\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   * Please don't use the Fetch client for Next.js applications. The `next`\n   * options won't have any effect.\n   *\n   * Install {@link https://www.npmjs.com/package/@hey-api/client-next `@hey-api/client-next`} instead.\n   */\n  next?: never;\n  /**\n   * Return the response data parsed in a specified format. By default, `auto`\n   * will infer the appropriate method from the `Content-Type` response header.\n   * You can override this behavior with any of the {@link Body} methods.\n   * Select `stream` if you don't want to parse response data at all.\n   *\n   * @default 'auto'\n   */\n  parseAs?: 'arrayBuffer' | 'auto' | 'blob' | 'formData' | 'json' | 'stream' | 'text';\n  /**\n   * Should we return only data or multiple fields (data, error, response, etc.)?\n   *\n   * @default 'fields'\n   */\n  responseStyle?: ResponseStyle;\n  /**\n   * Throw an error instead of returning it in the response?\n   *\n   * @default false\n   */\n  throwOnError?: T['throwOnError'];\n}\n\nexport interface RequestOptions<\n  TData = unknown,\n  TResponseStyle extends ResponseStyle = 'fields',\n  ThrowOnError extends boolean = boolean,\n  Url extends string = string,\n>\n  extends\n    Config<{\n      responseStyle: TResponseStyle;\n      throwOnError: ThrowOnError;\n    }>,\n    Pick<\n      ServerSentEventsOptions<TData>,\n      | 'onRequest'\n      | 'onSseError'\n      | 'onSseEvent'\n      | 'sseDefaultRetryDelay'\n      | 'sseMaxRetryAttempts'\n      | 'sseMaxRetryDelay'\n    > {\n  /**\n   * Any body that you want to add to your request.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/fetch#body}\n   */\n  body?: unknown;\n  path?: Record<string, unknown>;\n  query?: Record<string, unknown>;\n  /**\n   * Security mechanism(s) to use for the request.\n   */\n  security?: ReadonlyArray<Auth>;\n  url: Url;\n}\n\nexport interface ResolvedRequestOptions<\n  TResponseStyle extends ResponseStyle = 'fields',\n  ThrowOnError extends boolean = boolean,\n  Url extends string = string,\n> extends RequestOptions<unknown, TResponseStyle, ThrowOnError, Url> {\n  serializedBody?: string;\n}\n\nexport type RequestResult<\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = boolean,\n  TResponseStyle extends ResponseStyle = 'fields',\n> = ThrowOnError extends true\n  ? Promise<\n      TResponseStyle extends 'data'\n        ? TData extends Record<string, unknown>\n          ? TData[keyof TData]\n          : TData\n        : {\n            data: TData extends Record<string, unknown> ? TData[keyof TData] : TData;\n            request: Request;\n            response: Response;\n          }\n    >\n  : Promise<\n      TResponseStyle extends 'data'\n        ? (TData extends Record<string, unknown> ? TData[keyof TData] : TData) | undefined\n        : (\n            | {\n                data: TData extends Record<string, unknown> ? TData[keyof TData] : TData;\n                error: undefined;\n              }\n            | {\n                data: undefined;\n                error: TError extends Record<string, unknown> ? TError[keyof TError] : TError;\n              }\n          ) & {\n            request: Request;\n            response: Response;\n          }\n    >;\n\nexport interface ClientOptions {\n  baseUrl?: string;\n  responseStyle?: ResponseStyle;\n  throwOnError?: boolean;\n}\n\ntype MethodFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'>,\n) => RequestResult<TData, TError, ThrowOnError, TResponseStyle>;\n\ntype SseFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'>,\n) => Promise<ServerSentEventsResult<TData, TError>>;\n\ntype RequestFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'> &\n    Pick<Required<RequestOptions<TData, TResponseStyle, ThrowOnError>>, 'method'>,\n) => RequestResult<TData, TError, ThrowOnError, TResponseStyle>;\n\ntype BuildUrlFn = <\n  TData extends {\n    body?: unknown;\n    path?: Record<string, unknown>;\n    query?: Record<string, unknown>;\n    url: string;\n  },\n>(\n  options: TData & Options<TData>,\n) => string;\n\nexport type Client = CoreClient<RequestFn, Config, MethodFn, BuildUrlFn, SseFn> & {\n  interceptors: Middleware<Request, Response, unknown, ResolvedRequestOptions>;\n};\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 = ClientOptions> = (\n  override?: Config<ClientOptions & T>,\n) => Config<Required<ClientOptions> & T>;\n\nexport interface TDataShape {\n  body?: unknown;\n  headers?: unknown;\n  path?: unknown;\n  query?: unknown;\n  url: string;\n}\n\ntype OmitKeys<T, K> = Pick<T, Exclude<keyof T, K>>;\n\nexport type Options<\n  TData extends TDataShape = TDataShape,\n  ThrowOnError extends boolean = boolean,\n  TResponse = unknown,\n  TResponseStyle extends ResponseStyle = 'fields',\n> = OmitKeys<\n  RequestOptions<TResponse, TResponseStyle, ThrowOnError>,\n  'body' | 'path' | 'query' | 'url'\n> &\n  ([TData] extends [never] ? unknown : Omit<TData, 'url'>);\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/schema-unknown/client/utils.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/schema-unknown/client.gen.ts",
    "content": "// 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>());\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/schema-unknown/core/auth.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/schema-unknown/core/bodySerializer.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/schema-unknown/core/params.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/schema-unknown/core/pathSerializer.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/schema-unknown/core/queryKeySerializer.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\n/**\n * JSON-friendly union that mirrors what Pinia Colada can hash.\n */\nexport type JsonValue =\n  | null\n  | string\n  | number\n  | boolean\n  | JsonValue[]\n  | { [key: string]: JsonValue };\n\n/**\n * Replacer that converts non-JSON values (bigint, Date, etc.) to safe substitutes.\n */\nexport const queryKeyJsonReplacer = (_key: string, value: unknown) => {\n  if (value === undefined || typeof value === 'function' || typeof value === 'symbol') {\n    return undefined;\n  }\n  if (typeof value === 'bigint') {\n    return value.toString();\n  }\n  if (value instanceof Date) {\n    return value.toISOString();\n  }\n  return value;\n};\n\n/**\n * Safely stringifies a value and parses it back into a JsonValue.\n */\nexport const stringifyToJsonValue = (input: unknown): JsonValue | undefined => {\n  try {\n    const json = JSON.stringify(input, queryKeyJsonReplacer);\n    if (json === undefined) {\n      return undefined;\n    }\n    return JSON.parse(json) as JsonValue;\n  } catch {\n    return undefined;\n  }\n};\n\n/**\n * Detects plain objects (including objects with a null prototype).\n */\nconst isPlainObject = (value: unknown): value is Record<string, unknown> => {\n  if (value === null || typeof value !== 'object') {\n    return false;\n  }\n  const prototype = Object.getPrototypeOf(value as object);\n  return prototype === Object.prototype || prototype === null;\n};\n\n/**\n * Turns URLSearchParams into a sorted JSON object for deterministic keys.\n */\nconst serializeSearchParams = (params: URLSearchParams): JsonValue => {\n  const entries = Array.from(params.entries()).sort(([a], [b]) => a.localeCompare(b));\n  const result: Record<string, JsonValue> = {};\n\n  for (const [key, value] of entries) {\n    const existing = result[key];\n    if (existing === undefined) {\n      result[key] = value;\n      continue;\n    }\n\n    if (Array.isArray(existing)) {\n      (existing as string[]).push(value);\n    } else {\n      result[key] = [existing, value];\n    }\n  }\n\n  return result;\n};\n\n/**\n * Normalizes any accepted value into a JSON-friendly shape for query keys.\n */\nexport const serializeQueryKeyValue = (value: unknown): JsonValue | undefined => {\n  if (value === null) {\n    return null;\n  }\n\n  if (typeof value === 'string' || typeof value === 'number' || typeof value === 'boolean') {\n    return value;\n  }\n\n  if (value === undefined || typeof value === 'function' || typeof value === 'symbol') {\n    return undefined;\n  }\n\n  if (typeof value === 'bigint') {\n    return value.toString();\n  }\n\n  if (value instanceof Date) {\n    return value.toISOString();\n  }\n\n  if (Array.isArray(value)) {\n    return stringifyToJsonValue(value);\n  }\n\n  if (typeof URLSearchParams !== 'undefined' && value instanceof URLSearchParams) {\n    return serializeSearchParams(value);\n  }\n\n  if (isPlainObject(value)) {\n    return stringifyToJsonValue(value);\n  }\n\n  return undefined;\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/schema-unknown/core/serverSentEvents.gen.ts",
    "content": "// 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 const 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            // Normalize line endings: CRLF -> LF, then CR -> LF\n            buffer = buffer.replace(/\\r\\n/g, '\\n').replace(/\\r/g, '\\n');\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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/schema-unknown/core/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { Auth, AuthToken } from './auth.gen';\nimport type { BodySerializer, QuerySerializer, QuerySerializerOptions } from './bodySerializer.gen';\n\nexport type HttpMethod =\n  | 'connect'\n  | 'delete'\n  | 'get'\n  | 'head'\n  | 'options'\n  | 'patch'\n  | 'post'\n  | 'put'\n  | 'trace';\n\nexport type Client<\n  RequestFn = never,\n  Config = unknown,\n  MethodFn = never,\n  BuildUrlFn = never,\n  SseFn = never,\n> = {\n  /**\n   * Returns the final request URL.\n   */\n  buildUrl: BuildUrlFn;\n  getConfig: () => Config;\n  request: RequestFn;\n  setConfig: (config: Config) => Config;\n} & {\n  [K in HttpMethod]: MethodFn;\n} & ([SseFn] extends [never] ? { sse?: never } : { sse: { [K in HttpMethod]: SseFn } });\n\nexport interface Config {\n  /**\n   * Auth token or a function returning auth token. The resolved value will be\n   * added to the request payload as defined by its `security` array.\n   */\n  auth?: ((auth: Auth) => Promise<AuthToken> | AuthToken) | AuthToken;\n  /**\n   * A function for serializing request body parameter. By default,\n   * {@link JSON.stringify()} will be used.\n   */\n  bodySerializer?: BodySerializer | null;\n  /**\n   * An object containing any HTTP headers that you want to pre-populate your\n   * `Headers` object with.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/Headers/Headers#init See more}\n   */\n  headers?:\n    | RequestInit['headers']\n    | Record<\n        string,\n        string | number | boolean | (string | number | boolean)[] | null | undefined | unknown\n      >;\n  /**\n   * The request method.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/fetch#method See more}\n   */\n  method?: Uppercase<HttpMethod>;\n  /**\n   * A function for serializing request query parameters. By default, arrays\n   * will be exploded in form style, objects will be exploded in deepObject\n   * style, and reserved characters are percent-encoded.\n   *\n   * This method will have no effect if the native `paramsSerializer()` Axios\n   * API function is used.\n   *\n   * {@link https://swagger.io/docs/specification/serialization/#query View examples}\n   */\n  querySerializer?: QuerySerializer | QuerySerializerOptions;\n  /**\n   * A function validating request data. This is useful if you want to ensure\n   * the request conforms to the desired shape, so it can be safely sent to\n   * the server.\n   */\n  requestValidator?: (data: unknown) => Promise<unknown>;\n  /**\n   * A function transforming response data before it's returned. This is useful\n   * for post-processing data, e.g. converting ISO strings into Date objects.\n   */\n  responseTransformer?: (data: unknown) => Promise<unknown>;\n  /**\n   * A function validating response data. This is useful if you want to ensure\n   * the response conforms to the desired shape, so it can be safely passed to\n   * the transformers and returned to the user.\n   */\n  responseValidator?: (data: unknown) => Promise<unknown>;\n}\n\ntype IsExactlyNeverOrNeverUndefined<T> = [T] extends [never]\n  ? true\n  : [T] extends [never | undefined]\n    ? [undefined] extends [T]\n      ? false\n      : true\n    : false;\n\nexport type OmitNever<T extends Record<string, unknown>> = {\n  [K in keyof T as IsExactlyNeverOrNeverUndefined<T[K]> extends true ? never : K]: T[K];\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/schema-unknown/core/utils.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/schema-unknown/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport { type Options, sendEmail } from './sdk.gen';\nexport type { Attachment, AttachmentCollection, ClientOptions, HeaderCollection, MessageHeader, SendEmailData, SendEmailError, SendEmailErrors, SendEmailRequest, SendEmailResponse, SendEmailResponse2, SendEmailResponses, StandardPostmarkResponse } from './types.gen';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/schema-unknown/sdk.gen.ts",
    "content": "// 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 { SendEmailData, SendEmailErrors, SendEmailResponses } from './types.gen';\n\nexport type Options<TData extends TDataShape = TDataShape, ThrowOnError extends boolean = boolean> = Options2<TData, ThrowOnError> & {\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 * Send a single email\n */\nexport const sendEmail = <ThrowOnError extends boolean = false>(options: Options<SendEmailData, ThrowOnError>) => (options.client ?? client).post<SendEmailResponses, SendEmailErrors, ThrowOnError>({\n    url: '/email',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options.headers\n    }\n});\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/schema-unknown/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type ClientOptions = {\n    baseUrl: `${string}://api.postmarkapp.com` | (string & {});\n};\n\nexport type SendEmailRequest = {\n    /**\n     * The sender email address. Must have a registered and confirmed Sender Signature.\n     */\n    From?: string;\n    /**\n     * Recipient email address. Multiple addresses are comma seperated. Max 50.\n     */\n    To?: string;\n    /**\n     * Recipient email address. Multiple addresses are comma seperated. Max 50.\n     */\n    Cc?: string;\n    /**\n     * Bcc recipient email address. Multiple addresses are comma seperated. Max 50.\n     */\n    Bcc?: string;\n    /**\n     * Email Subject\n     */\n    Subject?: string;\n    /**\n     * Email tag that allows you to categorize outgoing emails and get detailed statistics.\n     */\n    Tag?: string;\n    /**\n     * If no TextBody specified HTML email message\n     */\n    HtmlBody?: string;\n    /**\n     * If no HtmlBody specified Plain text email message\n     */\n    TextBody?: string;\n    /**\n     * Reply To override email address. Defaults to the Reply To set in the sender signature.\n     */\n    ReplyTo?: string;\n    /**\n     * Activate open tracking for this email.\n     */\n    TrackOpens?: boolean;\n    /**\n     * Replace links in content to enable \"click tracking\" stats. Default is 'null', which uses the server's LinkTracking setting'.\n     */\n    TrackLinks?: 'None' | 'HtmlAndText' | 'HtmlOnly' | 'TextOnly';\n    Headers?: HeaderCollection;\n    Attachments?: AttachmentCollection;\n};\n\n/**\n * A single header for an email message.\n */\nexport type MessageHeader = {\n    /**\n     * The header's name.\n     */\n    Name?: string;\n    /**\n     * The header's value.\n     */\n    Value?: string;\n};\n\nexport type HeaderCollection = Array<MessageHeader>;\n\n/**\n * An attachment for an email message.\n */\nexport type Attachment = {\n    Name?: string;\n    Content?: string;\n    ContentType?: string;\n    ContentID?: string;\n};\n\nexport type AttachmentCollection = Array<Attachment>;\n\n/**\n * The standard response when a postmark message is sent\n */\nexport type SendEmailResponse = {\n    To?: string;\n    SubmittedAt?: string;\n    MessageID?: string;\n    ErrorCode?: number;\n    Message?: string;\n};\n\n/**\n * A Postmark API error.\n */\nexport type StandardPostmarkResponse = {\n    ErrorCode?: number;\n    Message?: string;\n};\n\nexport type SendEmailData = {\n    body?: SendEmailRequest;\n    headers: {\n        /**\n         * The token associated with the Server on which this request will operate.\n         */\n        'X-Postmark-Server-Token': string;\n    };\n    path?: never;\n    query?: never;\n    url: '/email';\n};\n\nexport type SendEmailErrors = {\n    /**\n     * An error was generated due to incorrect use of the API. See the Message associated with this response for more information.\n     */\n    422: StandardPostmarkResponse;\n    /**\n     * Indicates an internal server error occurred.\n     */\n    500: unknown;\n};\n\nexport type SendEmailError = SendEmailErrors[keyof SendEmailErrors];\n\nexport type SendEmailResponses = {\n    /**\n     * OK\n     */\n    200: SendEmailResponse;\n};\n\nexport type SendEmailResponse2 = SendEmailResponses[keyof SendEmailResponses];\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/security-api-key/client/client.gen.ts",
    "content": "// 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 (options: RequestOptions) => {\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 url = buildUrl(opts);\n\n    return { opts, url };\n  };\n\n  const request: Client['request'] = async (options) => {\n    // @ts-expect-error\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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/security-api-key/client/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type { Auth } from '../core/auth.gen';\nexport type { QuerySerializerOptions } from '../core/bodySerializer.gen';\nexport {\n  formDataBodySerializer,\n  jsonBodySerializer,\n  urlSearchParamsBodySerializer,\n} from '../core/bodySerializer.gen';\nexport { buildClientParams } from '../core/params.gen';\nexport { serializeQueryKeyValue } from '../core/queryKeySerializer.gen';\nexport { createClient } from './client.gen';\nexport type {\n  Client,\n  ClientOptions,\n  Config,\n  CreateClientConfig,\n  Options,\n  RequestOptions,\n  RequestResult,\n  ResolvedRequestOptions,\n  ResponseStyle,\n  TDataShape,\n} from './types.gen';\nexport { createConfig, mergeHeaders } from './utils.gen';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/security-api-key/client/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { Auth } from '../core/auth.gen';\nimport type {\n  ServerSentEventsOptions,\n  ServerSentEventsResult,\n} from '../core/serverSentEvents.gen';\nimport type { Client as CoreClient, Config as CoreConfig } from '../core/types.gen';\nimport type { Middleware } from './utils.gen';\n\nexport type ResponseStyle = 'data' | 'fields';\n\nexport interface Config<T extends ClientOptions = ClientOptions>\n  extends Omit<RequestInit, 'body' | 'headers' | 'method'>, CoreConfig {\n  /**\n   * Base URL for all requests made by this client.\n   */\n  baseUrl?: T['baseUrl'];\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   * Please don't use the Fetch client for Next.js applications. The `next`\n   * options won't have any effect.\n   *\n   * Install {@link https://www.npmjs.com/package/@hey-api/client-next `@hey-api/client-next`} instead.\n   */\n  next?: never;\n  /**\n   * Return the response data parsed in a specified format. By default, `auto`\n   * will infer the appropriate method from the `Content-Type` response header.\n   * You can override this behavior with any of the {@link Body} methods.\n   * Select `stream` if you don't want to parse response data at all.\n   *\n   * @default 'auto'\n   */\n  parseAs?: 'arrayBuffer' | 'auto' | 'blob' | 'formData' | 'json' | 'stream' | 'text';\n  /**\n   * Should we return only data or multiple fields (data, error, response, etc.)?\n   *\n   * @default 'fields'\n   */\n  responseStyle?: ResponseStyle;\n  /**\n   * Throw an error instead of returning it in the response?\n   *\n   * @default false\n   */\n  throwOnError?: T['throwOnError'];\n}\n\nexport interface RequestOptions<\n  TData = unknown,\n  TResponseStyle extends ResponseStyle = 'fields',\n  ThrowOnError extends boolean = boolean,\n  Url extends string = string,\n>\n  extends\n    Config<{\n      responseStyle: TResponseStyle;\n      throwOnError: ThrowOnError;\n    }>,\n    Pick<\n      ServerSentEventsOptions<TData>,\n      | 'onRequest'\n      | 'onSseError'\n      | 'onSseEvent'\n      | 'sseDefaultRetryDelay'\n      | 'sseMaxRetryAttempts'\n      | 'sseMaxRetryDelay'\n    > {\n  /**\n   * Any body that you want to add to your request.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/fetch#body}\n   */\n  body?: unknown;\n  path?: Record<string, unknown>;\n  query?: Record<string, unknown>;\n  /**\n   * Security mechanism(s) to use for the request.\n   */\n  security?: ReadonlyArray<Auth>;\n  url: Url;\n}\n\nexport interface ResolvedRequestOptions<\n  TResponseStyle extends ResponseStyle = 'fields',\n  ThrowOnError extends boolean = boolean,\n  Url extends string = string,\n> extends RequestOptions<unknown, TResponseStyle, ThrowOnError, Url> {\n  serializedBody?: string;\n}\n\nexport type RequestResult<\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = boolean,\n  TResponseStyle extends ResponseStyle = 'fields',\n> = ThrowOnError extends true\n  ? Promise<\n      TResponseStyle extends 'data'\n        ? TData extends Record<string, unknown>\n          ? TData[keyof TData]\n          : TData\n        : {\n            data: TData extends Record<string, unknown> ? TData[keyof TData] : TData;\n            request: Request;\n            response: Response;\n          }\n    >\n  : Promise<\n      TResponseStyle extends 'data'\n        ? (TData extends Record<string, unknown> ? TData[keyof TData] : TData) | undefined\n        : (\n            | {\n                data: TData extends Record<string, unknown> ? TData[keyof TData] : TData;\n                error: undefined;\n              }\n            | {\n                data: undefined;\n                error: TError extends Record<string, unknown> ? TError[keyof TError] : TError;\n              }\n          ) & {\n            request: Request;\n            response: Response;\n          }\n    >;\n\nexport interface ClientOptions {\n  baseUrl?: string;\n  responseStyle?: ResponseStyle;\n  throwOnError?: boolean;\n}\n\ntype MethodFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'>,\n) => RequestResult<TData, TError, ThrowOnError, TResponseStyle>;\n\ntype SseFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'>,\n) => Promise<ServerSentEventsResult<TData, TError>>;\n\ntype RequestFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'> &\n    Pick<Required<RequestOptions<TData, TResponseStyle, ThrowOnError>>, 'method'>,\n) => RequestResult<TData, TError, ThrowOnError, TResponseStyle>;\n\ntype BuildUrlFn = <\n  TData extends {\n    body?: unknown;\n    path?: Record<string, unknown>;\n    query?: Record<string, unknown>;\n    url: string;\n  },\n>(\n  options: TData & Options<TData>,\n) => string;\n\nexport type Client = CoreClient<RequestFn, Config, MethodFn, BuildUrlFn, SseFn> & {\n  interceptors: Middleware<Request, Response, unknown, ResolvedRequestOptions>;\n};\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 = ClientOptions> = (\n  override?: Config<ClientOptions & T>,\n) => Config<Required<ClientOptions> & T>;\n\nexport interface TDataShape {\n  body?: unknown;\n  headers?: unknown;\n  path?: unknown;\n  query?: unknown;\n  url: string;\n}\n\ntype OmitKeys<T, K> = Pick<T, Exclude<keyof T, K>>;\n\nexport type Options<\n  TData extends TDataShape = TDataShape,\n  ThrowOnError extends boolean = boolean,\n  TResponse = unknown,\n  TResponseStyle extends ResponseStyle = 'fields',\n> = OmitKeys<\n  RequestOptions<TResponse, TResponseStyle, ThrowOnError>,\n  'body' | 'path' | 'query' | 'url'\n> &\n  ([TData] extends [never] ? unknown : Omit<TData, 'url'>);\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/security-api-key/client/utils.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/security-api-key/client.gen.ts",
    "content": "// 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>());\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/security-api-key/core/auth.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/security-api-key/core/bodySerializer.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/security-api-key/core/params.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/security-api-key/core/pathSerializer.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/security-api-key/core/queryKeySerializer.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\n/**\n * JSON-friendly union that mirrors what Pinia Colada can hash.\n */\nexport type JsonValue =\n  | null\n  | string\n  | number\n  | boolean\n  | JsonValue[]\n  | { [key: string]: JsonValue };\n\n/**\n * Replacer that converts non-JSON values (bigint, Date, etc.) to safe substitutes.\n */\nexport const queryKeyJsonReplacer = (_key: string, value: unknown) => {\n  if (value === undefined || typeof value === 'function' || typeof value === 'symbol') {\n    return undefined;\n  }\n  if (typeof value === 'bigint') {\n    return value.toString();\n  }\n  if (value instanceof Date) {\n    return value.toISOString();\n  }\n  return value;\n};\n\n/**\n * Safely stringifies a value and parses it back into a JsonValue.\n */\nexport const stringifyToJsonValue = (input: unknown): JsonValue | undefined => {\n  try {\n    const json = JSON.stringify(input, queryKeyJsonReplacer);\n    if (json === undefined) {\n      return undefined;\n    }\n    return JSON.parse(json) as JsonValue;\n  } catch {\n    return undefined;\n  }\n};\n\n/**\n * Detects plain objects (including objects with a null prototype).\n */\nconst isPlainObject = (value: unknown): value is Record<string, unknown> => {\n  if (value === null || typeof value !== 'object') {\n    return false;\n  }\n  const prototype = Object.getPrototypeOf(value as object);\n  return prototype === Object.prototype || prototype === null;\n};\n\n/**\n * Turns URLSearchParams into a sorted JSON object for deterministic keys.\n */\nconst serializeSearchParams = (params: URLSearchParams): JsonValue => {\n  const entries = Array.from(params.entries()).sort(([a], [b]) => a.localeCompare(b));\n  const result: Record<string, JsonValue> = {};\n\n  for (const [key, value] of entries) {\n    const existing = result[key];\n    if (existing === undefined) {\n      result[key] = value;\n      continue;\n    }\n\n    if (Array.isArray(existing)) {\n      (existing as string[]).push(value);\n    } else {\n      result[key] = [existing, value];\n    }\n  }\n\n  return result;\n};\n\n/**\n * Normalizes any accepted value into a JSON-friendly shape for query keys.\n */\nexport const serializeQueryKeyValue = (value: unknown): JsonValue | undefined => {\n  if (value === null) {\n    return null;\n  }\n\n  if (typeof value === 'string' || typeof value === 'number' || typeof value === 'boolean') {\n    return value;\n  }\n\n  if (value === undefined || typeof value === 'function' || typeof value === 'symbol') {\n    return undefined;\n  }\n\n  if (typeof value === 'bigint') {\n    return value.toString();\n  }\n\n  if (value instanceof Date) {\n    return value.toISOString();\n  }\n\n  if (Array.isArray(value)) {\n    return stringifyToJsonValue(value);\n  }\n\n  if (typeof URLSearchParams !== 'undefined' && value instanceof URLSearchParams) {\n    return serializeSearchParams(value);\n  }\n\n  if (isPlainObject(value)) {\n    return stringifyToJsonValue(value);\n  }\n\n  return undefined;\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/security-api-key/core/serverSentEvents.gen.ts",
    "content": "// 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 const 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            // Normalize line endings: CRLF -> LF, then CR -> LF\n            buffer = buffer.replace(/\\r\\n/g, '\\n').replace(/\\r/g, '\\n');\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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/security-api-key/core/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { Auth, AuthToken } from './auth.gen';\nimport type { BodySerializer, QuerySerializer, QuerySerializerOptions } from './bodySerializer.gen';\n\nexport type HttpMethod =\n  | 'connect'\n  | 'delete'\n  | 'get'\n  | 'head'\n  | 'options'\n  | 'patch'\n  | 'post'\n  | 'put'\n  | 'trace';\n\nexport type Client<\n  RequestFn = never,\n  Config = unknown,\n  MethodFn = never,\n  BuildUrlFn = never,\n  SseFn = never,\n> = {\n  /**\n   * Returns the final request URL.\n   */\n  buildUrl: BuildUrlFn;\n  getConfig: () => Config;\n  request: RequestFn;\n  setConfig: (config: Config) => Config;\n} & {\n  [K in HttpMethod]: MethodFn;\n} & ([SseFn] extends [never] ? { sse?: never } : { sse: { [K in HttpMethod]: SseFn } });\n\nexport interface Config {\n  /**\n   * Auth token or a function returning auth token. The resolved value will be\n   * added to the request payload as defined by its `security` array.\n   */\n  auth?: ((auth: Auth) => Promise<AuthToken> | AuthToken) | AuthToken;\n  /**\n   * A function for serializing request body parameter. By default,\n   * {@link JSON.stringify()} will be used.\n   */\n  bodySerializer?: BodySerializer | null;\n  /**\n   * An object containing any HTTP headers that you want to pre-populate your\n   * `Headers` object with.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/Headers/Headers#init See more}\n   */\n  headers?:\n    | RequestInit['headers']\n    | Record<\n        string,\n        string | number | boolean | (string | number | boolean)[] | null | undefined | unknown\n      >;\n  /**\n   * The request method.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/fetch#method See more}\n   */\n  method?: Uppercase<HttpMethod>;\n  /**\n   * A function for serializing request query parameters. By default, arrays\n   * will be exploded in form style, objects will be exploded in deepObject\n   * style, and reserved characters are percent-encoded.\n   *\n   * This method will have no effect if the native `paramsSerializer()` Axios\n   * API function is used.\n   *\n   * {@link https://swagger.io/docs/specification/serialization/#query View examples}\n   */\n  querySerializer?: QuerySerializer | QuerySerializerOptions;\n  /**\n   * A function validating request data. This is useful if you want to ensure\n   * the request conforms to the desired shape, so it can be safely sent to\n   * the server.\n   */\n  requestValidator?: (data: unknown) => Promise<unknown>;\n  /**\n   * A function transforming response data before it's returned. This is useful\n   * for post-processing data, e.g. converting ISO strings into Date objects.\n   */\n  responseTransformer?: (data: unknown) => Promise<unknown>;\n  /**\n   * A function validating response data. This is useful if you want to ensure\n   * the response conforms to the desired shape, so it can be safely passed to\n   * the transformers and returned to the user.\n   */\n  responseValidator?: (data: unknown) => Promise<unknown>;\n}\n\ntype IsExactlyNeverOrNeverUndefined<T> = [T] extends [never]\n  ? true\n  : [T] extends [never | undefined]\n    ? [undefined] extends [T]\n      ? false\n      : true\n    : false;\n\nexport type OmitNever<T extends Record<string, unknown>> = {\n  [K in keyof T as IsExactlyNeverOrNeverUndefined<T[K]> extends true ? never : K]: T[K];\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/security-api-key/core/utils.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/security-api-key/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport { getFoo, type Options } from './sdk.gen';\nexport type { ClientOptions, GetFooData, GetFooResponses } from './types.gen';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/security-api-key/sdk.gen.ts",
    "content": "// 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 { GetFooData, GetFooResponses } from './types.gen';\n\nexport type Options<TData extends TDataShape = TDataShape, ThrowOnError extends boolean = boolean> = Options2<TData, ThrowOnError> & {\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\nexport const getFoo = <ThrowOnError extends boolean = false>(options?: Options<GetFooData, ThrowOnError>) => (options?.client ?? client).get<GetFooResponses, unknown, ThrowOnError>({\n    security: [{\n            in: 'query',\n            name: 'foo',\n            type: 'apiKey'\n        }],\n    url: '/foo',\n    ...options\n});\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/security-api-key/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type ClientOptions = {\n    baseUrl: string;\n};\n\nexport type GetFooData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/foo';\n};\n\nexport type GetFooResponses = {\n    /**\n     * OK\n     */\n    200: unknown;\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/security-basic/client/client.gen.ts",
    "content": "// 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 (options: RequestOptions) => {\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 url = buildUrl(opts);\n\n    return { opts, url };\n  };\n\n  const request: Client['request'] = async (options) => {\n    // @ts-expect-error\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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/security-basic/client/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type { Auth } from '../core/auth.gen';\nexport type { QuerySerializerOptions } from '../core/bodySerializer.gen';\nexport {\n  formDataBodySerializer,\n  jsonBodySerializer,\n  urlSearchParamsBodySerializer,\n} from '../core/bodySerializer.gen';\nexport { buildClientParams } from '../core/params.gen';\nexport { serializeQueryKeyValue } from '../core/queryKeySerializer.gen';\nexport { createClient } from './client.gen';\nexport type {\n  Client,\n  ClientOptions,\n  Config,\n  CreateClientConfig,\n  Options,\n  RequestOptions,\n  RequestResult,\n  ResolvedRequestOptions,\n  ResponseStyle,\n  TDataShape,\n} from './types.gen';\nexport { createConfig, mergeHeaders } from './utils.gen';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/security-basic/client/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { Auth } from '../core/auth.gen';\nimport type {\n  ServerSentEventsOptions,\n  ServerSentEventsResult,\n} from '../core/serverSentEvents.gen';\nimport type { Client as CoreClient, Config as CoreConfig } from '../core/types.gen';\nimport type { Middleware } from './utils.gen';\n\nexport type ResponseStyle = 'data' | 'fields';\n\nexport interface Config<T extends ClientOptions = ClientOptions>\n  extends Omit<RequestInit, 'body' | 'headers' | 'method'>, CoreConfig {\n  /**\n   * Base URL for all requests made by this client.\n   */\n  baseUrl?: T['baseUrl'];\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   * Please don't use the Fetch client for Next.js applications. The `next`\n   * options won't have any effect.\n   *\n   * Install {@link https://www.npmjs.com/package/@hey-api/client-next `@hey-api/client-next`} instead.\n   */\n  next?: never;\n  /**\n   * Return the response data parsed in a specified format. By default, `auto`\n   * will infer the appropriate method from the `Content-Type` response header.\n   * You can override this behavior with any of the {@link Body} methods.\n   * Select `stream` if you don't want to parse response data at all.\n   *\n   * @default 'auto'\n   */\n  parseAs?: 'arrayBuffer' | 'auto' | 'blob' | 'formData' | 'json' | 'stream' | 'text';\n  /**\n   * Should we return only data or multiple fields (data, error, response, etc.)?\n   *\n   * @default 'fields'\n   */\n  responseStyle?: ResponseStyle;\n  /**\n   * Throw an error instead of returning it in the response?\n   *\n   * @default false\n   */\n  throwOnError?: T['throwOnError'];\n}\n\nexport interface RequestOptions<\n  TData = unknown,\n  TResponseStyle extends ResponseStyle = 'fields',\n  ThrowOnError extends boolean = boolean,\n  Url extends string = string,\n>\n  extends\n    Config<{\n      responseStyle: TResponseStyle;\n      throwOnError: ThrowOnError;\n    }>,\n    Pick<\n      ServerSentEventsOptions<TData>,\n      | 'onRequest'\n      | 'onSseError'\n      | 'onSseEvent'\n      | 'sseDefaultRetryDelay'\n      | 'sseMaxRetryAttempts'\n      | 'sseMaxRetryDelay'\n    > {\n  /**\n   * Any body that you want to add to your request.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/fetch#body}\n   */\n  body?: unknown;\n  path?: Record<string, unknown>;\n  query?: Record<string, unknown>;\n  /**\n   * Security mechanism(s) to use for the request.\n   */\n  security?: ReadonlyArray<Auth>;\n  url: Url;\n}\n\nexport interface ResolvedRequestOptions<\n  TResponseStyle extends ResponseStyle = 'fields',\n  ThrowOnError extends boolean = boolean,\n  Url extends string = string,\n> extends RequestOptions<unknown, TResponseStyle, ThrowOnError, Url> {\n  serializedBody?: string;\n}\n\nexport type RequestResult<\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = boolean,\n  TResponseStyle extends ResponseStyle = 'fields',\n> = ThrowOnError extends true\n  ? Promise<\n      TResponseStyle extends 'data'\n        ? TData extends Record<string, unknown>\n          ? TData[keyof TData]\n          : TData\n        : {\n            data: TData extends Record<string, unknown> ? TData[keyof TData] : TData;\n            request: Request;\n            response: Response;\n          }\n    >\n  : Promise<\n      TResponseStyle extends 'data'\n        ? (TData extends Record<string, unknown> ? TData[keyof TData] : TData) | undefined\n        : (\n            | {\n                data: TData extends Record<string, unknown> ? TData[keyof TData] : TData;\n                error: undefined;\n              }\n            | {\n                data: undefined;\n                error: TError extends Record<string, unknown> ? TError[keyof TError] : TError;\n              }\n          ) & {\n            request: Request;\n            response: Response;\n          }\n    >;\n\nexport interface ClientOptions {\n  baseUrl?: string;\n  responseStyle?: ResponseStyle;\n  throwOnError?: boolean;\n}\n\ntype MethodFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'>,\n) => RequestResult<TData, TError, ThrowOnError, TResponseStyle>;\n\ntype SseFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'>,\n) => Promise<ServerSentEventsResult<TData, TError>>;\n\ntype RequestFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'> &\n    Pick<Required<RequestOptions<TData, TResponseStyle, ThrowOnError>>, 'method'>,\n) => RequestResult<TData, TError, ThrowOnError, TResponseStyle>;\n\ntype BuildUrlFn = <\n  TData extends {\n    body?: unknown;\n    path?: Record<string, unknown>;\n    query?: Record<string, unknown>;\n    url: string;\n  },\n>(\n  options: TData & Options<TData>,\n) => string;\n\nexport type Client = CoreClient<RequestFn, Config, MethodFn, BuildUrlFn, SseFn> & {\n  interceptors: Middleware<Request, Response, unknown, ResolvedRequestOptions>;\n};\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 = ClientOptions> = (\n  override?: Config<ClientOptions & T>,\n) => Config<Required<ClientOptions> & T>;\n\nexport interface TDataShape {\n  body?: unknown;\n  headers?: unknown;\n  path?: unknown;\n  query?: unknown;\n  url: string;\n}\n\ntype OmitKeys<T, K> = Pick<T, Exclude<keyof T, K>>;\n\nexport type Options<\n  TData extends TDataShape = TDataShape,\n  ThrowOnError extends boolean = boolean,\n  TResponse = unknown,\n  TResponseStyle extends ResponseStyle = 'fields',\n> = OmitKeys<\n  RequestOptions<TResponse, TResponseStyle, ThrowOnError>,\n  'body' | 'path' | 'query' | 'url'\n> &\n  ([TData] extends [never] ? unknown : Omit<TData, 'url'>);\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/security-basic/client/utils.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/security-basic/client.gen.ts",
    "content": "// 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>());\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/security-basic/core/auth.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/security-basic/core/bodySerializer.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/security-basic/core/params.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/security-basic/core/pathSerializer.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/security-basic/core/queryKeySerializer.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\n/**\n * JSON-friendly union that mirrors what Pinia Colada can hash.\n */\nexport type JsonValue =\n  | null\n  | string\n  | number\n  | boolean\n  | JsonValue[]\n  | { [key: string]: JsonValue };\n\n/**\n * Replacer that converts non-JSON values (bigint, Date, etc.) to safe substitutes.\n */\nexport const queryKeyJsonReplacer = (_key: string, value: unknown) => {\n  if (value === undefined || typeof value === 'function' || typeof value === 'symbol') {\n    return undefined;\n  }\n  if (typeof value === 'bigint') {\n    return value.toString();\n  }\n  if (value instanceof Date) {\n    return value.toISOString();\n  }\n  return value;\n};\n\n/**\n * Safely stringifies a value and parses it back into a JsonValue.\n */\nexport const stringifyToJsonValue = (input: unknown): JsonValue | undefined => {\n  try {\n    const json = JSON.stringify(input, queryKeyJsonReplacer);\n    if (json === undefined) {\n      return undefined;\n    }\n    return JSON.parse(json) as JsonValue;\n  } catch {\n    return undefined;\n  }\n};\n\n/**\n * Detects plain objects (including objects with a null prototype).\n */\nconst isPlainObject = (value: unknown): value is Record<string, unknown> => {\n  if (value === null || typeof value !== 'object') {\n    return false;\n  }\n  const prototype = Object.getPrototypeOf(value as object);\n  return prototype === Object.prototype || prototype === null;\n};\n\n/**\n * Turns URLSearchParams into a sorted JSON object for deterministic keys.\n */\nconst serializeSearchParams = (params: URLSearchParams): JsonValue => {\n  const entries = Array.from(params.entries()).sort(([a], [b]) => a.localeCompare(b));\n  const result: Record<string, JsonValue> = {};\n\n  for (const [key, value] of entries) {\n    const existing = result[key];\n    if (existing === undefined) {\n      result[key] = value;\n      continue;\n    }\n\n    if (Array.isArray(existing)) {\n      (existing as string[]).push(value);\n    } else {\n      result[key] = [existing, value];\n    }\n  }\n\n  return result;\n};\n\n/**\n * Normalizes any accepted value into a JSON-friendly shape for query keys.\n */\nexport const serializeQueryKeyValue = (value: unknown): JsonValue | undefined => {\n  if (value === null) {\n    return null;\n  }\n\n  if (typeof value === 'string' || typeof value === 'number' || typeof value === 'boolean') {\n    return value;\n  }\n\n  if (value === undefined || typeof value === 'function' || typeof value === 'symbol') {\n    return undefined;\n  }\n\n  if (typeof value === 'bigint') {\n    return value.toString();\n  }\n\n  if (value instanceof Date) {\n    return value.toISOString();\n  }\n\n  if (Array.isArray(value)) {\n    return stringifyToJsonValue(value);\n  }\n\n  if (typeof URLSearchParams !== 'undefined' && value instanceof URLSearchParams) {\n    return serializeSearchParams(value);\n  }\n\n  if (isPlainObject(value)) {\n    return stringifyToJsonValue(value);\n  }\n\n  return undefined;\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/security-basic/core/serverSentEvents.gen.ts",
    "content": "// 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 const 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            // Normalize line endings: CRLF -> LF, then CR -> LF\n            buffer = buffer.replace(/\\r\\n/g, '\\n').replace(/\\r/g, '\\n');\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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/security-basic/core/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { Auth, AuthToken } from './auth.gen';\nimport type { BodySerializer, QuerySerializer, QuerySerializerOptions } from './bodySerializer.gen';\n\nexport type HttpMethod =\n  | 'connect'\n  | 'delete'\n  | 'get'\n  | 'head'\n  | 'options'\n  | 'patch'\n  | 'post'\n  | 'put'\n  | 'trace';\n\nexport type Client<\n  RequestFn = never,\n  Config = unknown,\n  MethodFn = never,\n  BuildUrlFn = never,\n  SseFn = never,\n> = {\n  /**\n   * Returns the final request URL.\n   */\n  buildUrl: BuildUrlFn;\n  getConfig: () => Config;\n  request: RequestFn;\n  setConfig: (config: Config) => Config;\n} & {\n  [K in HttpMethod]: MethodFn;\n} & ([SseFn] extends [never] ? { sse?: never } : { sse: { [K in HttpMethod]: SseFn } });\n\nexport interface Config {\n  /**\n   * Auth token or a function returning auth token. The resolved value will be\n   * added to the request payload as defined by its `security` array.\n   */\n  auth?: ((auth: Auth) => Promise<AuthToken> | AuthToken) | AuthToken;\n  /**\n   * A function for serializing request body parameter. By default,\n   * {@link JSON.stringify()} will be used.\n   */\n  bodySerializer?: BodySerializer | null;\n  /**\n   * An object containing any HTTP headers that you want to pre-populate your\n   * `Headers` object with.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/Headers/Headers#init See more}\n   */\n  headers?:\n    | RequestInit['headers']\n    | Record<\n        string,\n        string | number | boolean | (string | number | boolean)[] | null | undefined | unknown\n      >;\n  /**\n   * The request method.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/fetch#method See more}\n   */\n  method?: Uppercase<HttpMethod>;\n  /**\n   * A function for serializing request query parameters. By default, arrays\n   * will be exploded in form style, objects will be exploded in deepObject\n   * style, and reserved characters are percent-encoded.\n   *\n   * This method will have no effect if the native `paramsSerializer()` Axios\n   * API function is used.\n   *\n   * {@link https://swagger.io/docs/specification/serialization/#query View examples}\n   */\n  querySerializer?: QuerySerializer | QuerySerializerOptions;\n  /**\n   * A function validating request data. This is useful if you want to ensure\n   * the request conforms to the desired shape, so it can be safely sent to\n   * the server.\n   */\n  requestValidator?: (data: unknown) => Promise<unknown>;\n  /**\n   * A function transforming response data before it's returned. This is useful\n   * for post-processing data, e.g. converting ISO strings into Date objects.\n   */\n  responseTransformer?: (data: unknown) => Promise<unknown>;\n  /**\n   * A function validating response data. This is useful if you want to ensure\n   * the response conforms to the desired shape, so it can be safely passed to\n   * the transformers and returned to the user.\n   */\n  responseValidator?: (data: unknown) => Promise<unknown>;\n}\n\ntype IsExactlyNeverOrNeverUndefined<T> = [T] extends [never]\n  ? true\n  : [T] extends [never | undefined]\n    ? [undefined] extends [T]\n      ? false\n      : true\n    : false;\n\nexport type OmitNever<T extends Record<string, unknown>> = {\n  [K in keyof T as IsExactlyNeverOrNeverUndefined<T[K]> extends true ? never : K]: T[K];\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/security-basic/core/utils.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/security-basic/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport { getFoo, type Options } from './sdk.gen';\nexport type { ClientOptions, GetFooData, GetFooResponses } from './types.gen';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/security-basic/sdk.gen.ts",
    "content": "// 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 { GetFooData, GetFooResponses } from './types.gen';\n\nexport type Options<TData extends TDataShape = TDataShape, ThrowOnError extends boolean = boolean> = Options2<TData, ThrowOnError> & {\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\nexport const getFoo = <ThrowOnError extends boolean = false>(options?: Options<GetFooData, ThrowOnError>) => (options?.client ?? client).get<GetFooResponses, unknown, ThrowOnError>({\n    security: [{ scheme: 'basic', type: 'http' }],\n    url: '/foo',\n    ...options\n});\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/security-basic/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type ClientOptions = {\n    baseUrl: string;\n};\n\nexport type GetFooData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/foo';\n};\n\nexport type GetFooResponses = {\n    /**\n     * OK\n     */\n    200: unknown;\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/security-false/client/client.gen.ts",
    "content": "// 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 (options: RequestOptions) => {\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 url = buildUrl(opts);\n\n    return { opts, url };\n  };\n\n  const request: Client['request'] = async (options) => {\n    // @ts-expect-error\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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/security-false/client/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type { Auth } from '../core/auth.gen';\nexport type { QuerySerializerOptions } from '../core/bodySerializer.gen';\nexport {\n  formDataBodySerializer,\n  jsonBodySerializer,\n  urlSearchParamsBodySerializer,\n} from '../core/bodySerializer.gen';\nexport { buildClientParams } from '../core/params.gen';\nexport { serializeQueryKeyValue } from '../core/queryKeySerializer.gen';\nexport { createClient } from './client.gen';\nexport type {\n  Client,\n  ClientOptions,\n  Config,\n  CreateClientConfig,\n  Options,\n  RequestOptions,\n  RequestResult,\n  ResolvedRequestOptions,\n  ResponseStyle,\n  TDataShape,\n} from './types.gen';\nexport { createConfig, mergeHeaders } from './utils.gen';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/security-false/client/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { Auth } from '../core/auth.gen';\nimport type {\n  ServerSentEventsOptions,\n  ServerSentEventsResult,\n} from '../core/serverSentEvents.gen';\nimport type { Client as CoreClient, Config as CoreConfig } from '../core/types.gen';\nimport type { Middleware } from './utils.gen';\n\nexport type ResponseStyle = 'data' | 'fields';\n\nexport interface Config<T extends ClientOptions = ClientOptions>\n  extends Omit<RequestInit, 'body' | 'headers' | 'method'>, CoreConfig {\n  /**\n   * Base URL for all requests made by this client.\n   */\n  baseUrl?: T['baseUrl'];\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   * Please don't use the Fetch client for Next.js applications. The `next`\n   * options won't have any effect.\n   *\n   * Install {@link https://www.npmjs.com/package/@hey-api/client-next `@hey-api/client-next`} instead.\n   */\n  next?: never;\n  /**\n   * Return the response data parsed in a specified format. By default, `auto`\n   * will infer the appropriate method from the `Content-Type` response header.\n   * You can override this behavior with any of the {@link Body} methods.\n   * Select `stream` if you don't want to parse response data at all.\n   *\n   * @default 'auto'\n   */\n  parseAs?: 'arrayBuffer' | 'auto' | 'blob' | 'formData' | 'json' | 'stream' | 'text';\n  /**\n   * Should we return only data or multiple fields (data, error, response, etc.)?\n   *\n   * @default 'fields'\n   */\n  responseStyle?: ResponseStyle;\n  /**\n   * Throw an error instead of returning it in the response?\n   *\n   * @default false\n   */\n  throwOnError?: T['throwOnError'];\n}\n\nexport interface RequestOptions<\n  TData = unknown,\n  TResponseStyle extends ResponseStyle = 'fields',\n  ThrowOnError extends boolean = boolean,\n  Url extends string = string,\n>\n  extends\n    Config<{\n      responseStyle: TResponseStyle;\n      throwOnError: ThrowOnError;\n    }>,\n    Pick<\n      ServerSentEventsOptions<TData>,\n      | 'onRequest'\n      | 'onSseError'\n      | 'onSseEvent'\n      | 'sseDefaultRetryDelay'\n      | 'sseMaxRetryAttempts'\n      | 'sseMaxRetryDelay'\n    > {\n  /**\n   * Any body that you want to add to your request.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/fetch#body}\n   */\n  body?: unknown;\n  path?: Record<string, unknown>;\n  query?: Record<string, unknown>;\n  /**\n   * Security mechanism(s) to use for the request.\n   */\n  security?: ReadonlyArray<Auth>;\n  url: Url;\n}\n\nexport interface ResolvedRequestOptions<\n  TResponseStyle extends ResponseStyle = 'fields',\n  ThrowOnError extends boolean = boolean,\n  Url extends string = string,\n> extends RequestOptions<unknown, TResponseStyle, ThrowOnError, Url> {\n  serializedBody?: string;\n}\n\nexport type RequestResult<\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = boolean,\n  TResponseStyle extends ResponseStyle = 'fields',\n> = ThrowOnError extends true\n  ? Promise<\n      TResponseStyle extends 'data'\n        ? TData extends Record<string, unknown>\n          ? TData[keyof TData]\n          : TData\n        : {\n            data: TData extends Record<string, unknown> ? TData[keyof TData] : TData;\n            request: Request;\n            response: Response;\n          }\n    >\n  : Promise<\n      TResponseStyle extends 'data'\n        ? (TData extends Record<string, unknown> ? TData[keyof TData] : TData) | undefined\n        : (\n            | {\n                data: TData extends Record<string, unknown> ? TData[keyof TData] : TData;\n                error: undefined;\n              }\n            | {\n                data: undefined;\n                error: TError extends Record<string, unknown> ? TError[keyof TError] : TError;\n              }\n          ) & {\n            request: Request;\n            response: Response;\n          }\n    >;\n\nexport interface ClientOptions {\n  baseUrl?: string;\n  responseStyle?: ResponseStyle;\n  throwOnError?: boolean;\n}\n\ntype MethodFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'>,\n) => RequestResult<TData, TError, ThrowOnError, TResponseStyle>;\n\ntype SseFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'>,\n) => Promise<ServerSentEventsResult<TData, TError>>;\n\ntype RequestFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'> &\n    Pick<Required<RequestOptions<TData, TResponseStyle, ThrowOnError>>, 'method'>,\n) => RequestResult<TData, TError, ThrowOnError, TResponseStyle>;\n\ntype BuildUrlFn = <\n  TData extends {\n    body?: unknown;\n    path?: Record<string, unknown>;\n    query?: Record<string, unknown>;\n    url: string;\n  },\n>(\n  options: TData & Options<TData>,\n) => string;\n\nexport type Client = CoreClient<RequestFn, Config, MethodFn, BuildUrlFn, SseFn> & {\n  interceptors: Middleware<Request, Response, unknown, ResolvedRequestOptions>;\n};\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 = ClientOptions> = (\n  override?: Config<ClientOptions & T>,\n) => Config<Required<ClientOptions> & T>;\n\nexport interface TDataShape {\n  body?: unknown;\n  headers?: unknown;\n  path?: unknown;\n  query?: unknown;\n  url: string;\n}\n\ntype OmitKeys<T, K> = Pick<T, Exclude<keyof T, K>>;\n\nexport type Options<\n  TData extends TDataShape = TDataShape,\n  ThrowOnError extends boolean = boolean,\n  TResponse = unknown,\n  TResponseStyle extends ResponseStyle = 'fields',\n> = OmitKeys<\n  RequestOptions<TResponse, TResponseStyle, ThrowOnError>,\n  'body' | 'path' | 'query' | 'url'\n> &\n  ([TData] extends [never] ? unknown : Omit<TData, 'url'>);\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/security-false/client/utils.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/security-false/client.gen.ts",
    "content": "// 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>());\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/security-false/core/auth.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/security-false/core/bodySerializer.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/security-false/core/params.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/security-false/core/pathSerializer.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/security-false/core/queryKeySerializer.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\n/**\n * JSON-friendly union that mirrors what Pinia Colada can hash.\n */\nexport type JsonValue =\n  | null\n  | string\n  | number\n  | boolean\n  | JsonValue[]\n  | { [key: string]: JsonValue };\n\n/**\n * Replacer that converts non-JSON values (bigint, Date, etc.) to safe substitutes.\n */\nexport const queryKeyJsonReplacer = (_key: string, value: unknown) => {\n  if (value === undefined || typeof value === 'function' || typeof value === 'symbol') {\n    return undefined;\n  }\n  if (typeof value === 'bigint') {\n    return value.toString();\n  }\n  if (value instanceof Date) {\n    return value.toISOString();\n  }\n  return value;\n};\n\n/**\n * Safely stringifies a value and parses it back into a JsonValue.\n */\nexport const stringifyToJsonValue = (input: unknown): JsonValue | undefined => {\n  try {\n    const json = JSON.stringify(input, queryKeyJsonReplacer);\n    if (json === undefined) {\n      return undefined;\n    }\n    return JSON.parse(json) as JsonValue;\n  } catch {\n    return undefined;\n  }\n};\n\n/**\n * Detects plain objects (including objects with a null prototype).\n */\nconst isPlainObject = (value: unknown): value is Record<string, unknown> => {\n  if (value === null || typeof value !== 'object') {\n    return false;\n  }\n  const prototype = Object.getPrototypeOf(value as object);\n  return prototype === Object.prototype || prototype === null;\n};\n\n/**\n * Turns URLSearchParams into a sorted JSON object for deterministic keys.\n */\nconst serializeSearchParams = (params: URLSearchParams): JsonValue => {\n  const entries = Array.from(params.entries()).sort(([a], [b]) => a.localeCompare(b));\n  const result: Record<string, JsonValue> = {};\n\n  for (const [key, value] of entries) {\n    const existing = result[key];\n    if (existing === undefined) {\n      result[key] = value;\n      continue;\n    }\n\n    if (Array.isArray(existing)) {\n      (existing as string[]).push(value);\n    } else {\n      result[key] = [existing, value];\n    }\n  }\n\n  return result;\n};\n\n/**\n * Normalizes any accepted value into a JSON-friendly shape for query keys.\n */\nexport const serializeQueryKeyValue = (value: unknown): JsonValue | undefined => {\n  if (value === null) {\n    return null;\n  }\n\n  if (typeof value === 'string' || typeof value === 'number' || typeof value === 'boolean') {\n    return value;\n  }\n\n  if (value === undefined || typeof value === 'function' || typeof value === 'symbol') {\n    return undefined;\n  }\n\n  if (typeof value === 'bigint') {\n    return value.toString();\n  }\n\n  if (value instanceof Date) {\n    return value.toISOString();\n  }\n\n  if (Array.isArray(value)) {\n    return stringifyToJsonValue(value);\n  }\n\n  if (typeof URLSearchParams !== 'undefined' && value instanceof URLSearchParams) {\n    return serializeSearchParams(value);\n  }\n\n  if (isPlainObject(value)) {\n    return stringifyToJsonValue(value);\n  }\n\n  return undefined;\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/security-false/core/serverSentEvents.gen.ts",
    "content": "// 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 const 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            // Normalize line endings: CRLF -> LF, then CR -> LF\n            buffer = buffer.replace(/\\r\\n/g, '\\n').replace(/\\r/g, '\\n');\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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/security-false/core/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { Auth, AuthToken } from './auth.gen';\nimport type { BodySerializer, QuerySerializer, QuerySerializerOptions } from './bodySerializer.gen';\n\nexport type HttpMethod =\n  | 'connect'\n  | 'delete'\n  | 'get'\n  | 'head'\n  | 'options'\n  | 'patch'\n  | 'post'\n  | 'put'\n  | 'trace';\n\nexport type Client<\n  RequestFn = never,\n  Config = unknown,\n  MethodFn = never,\n  BuildUrlFn = never,\n  SseFn = never,\n> = {\n  /**\n   * Returns the final request URL.\n   */\n  buildUrl: BuildUrlFn;\n  getConfig: () => Config;\n  request: RequestFn;\n  setConfig: (config: Config) => Config;\n} & {\n  [K in HttpMethod]: MethodFn;\n} & ([SseFn] extends [never] ? { sse?: never } : { sse: { [K in HttpMethod]: SseFn } });\n\nexport interface Config {\n  /**\n   * Auth token or a function returning auth token. The resolved value will be\n   * added to the request payload as defined by its `security` array.\n   */\n  auth?: ((auth: Auth) => Promise<AuthToken> | AuthToken) | AuthToken;\n  /**\n   * A function for serializing request body parameter. By default,\n   * {@link JSON.stringify()} will be used.\n   */\n  bodySerializer?: BodySerializer | null;\n  /**\n   * An object containing any HTTP headers that you want to pre-populate your\n   * `Headers` object with.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/Headers/Headers#init See more}\n   */\n  headers?:\n    | RequestInit['headers']\n    | Record<\n        string,\n        string | number | boolean | (string | number | boolean)[] | null | undefined | unknown\n      >;\n  /**\n   * The request method.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/fetch#method See more}\n   */\n  method?: Uppercase<HttpMethod>;\n  /**\n   * A function for serializing request query parameters. By default, arrays\n   * will be exploded in form style, objects will be exploded in deepObject\n   * style, and reserved characters are percent-encoded.\n   *\n   * This method will have no effect if the native `paramsSerializer()` Axios\n   * API function is used.\n   *\n   * {@link https://swagger.io/docs/specification/serialization/#query View examples}\n   */\n  querySerializer?: QuerySerializer | QuerySerializerOptions;\n  /**\n   * A function validating request data. This is useful if you want to ensure\n   * the request conforms to the desired shape, so it can be safely sent to\n   * the server.\n   */\n  requestValidator?: (data: unknown) => Promise<unknown>;\n  /**\n   * A function transforming response data before it's returned. This is useful\n   * for post-processing data, e.g. converting ISO strings into Date objects.\n   */\n  responseTransformer?: (data: unknown) => Promise<unknown>;\n  /**\n   * A function validating response data. This is useful if you want to ensure\n   * the response conforms to the desired shape, so it can be safely passed to\n   * the transformers and returned to the user.\n   */\n  responseValidator?: (data: unknown) => Promise<unknown>;\n}\n\ntype IsExactlyNeverOrNeverUndefined<T> = [T] extends [never]\n  ? true\n  : [T] extends [never | undefined]\n    ? [undefined] extends [T]\n      ? false\n      : true\n    : false;\n\nexport type OmitNever<T extends Record<string, unknown>> = {\n  [K in keyof T as IsExactlyNeverOrNeverUndefined<T[K]> extends true ? never : K]: T[K];\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/security-false/core/utils.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/security-false/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport { getFoo, type Options } from './sdk.gen';\nexport type { ClientOptions, GetFooData, GetFooResponses } from './types.gen';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/security-false/sdk.gen.ts",
    "content": "// 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 { GetFooData, GetFooResponses } from './types.gen';\n\nexport type Options<TData extends TDataShape = TDataShape, ThrowOnError extends boolean = boolean> = Options2<TData, ThrowOnError> & {\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\nexport const getFoo = <ThrowOnError extends boolean = false>(options?: Options<GetFooData, ThrowOnError>) => (options?.client ?? client).get<GetFooResponses, unknown, ThrowOnError>({ url: '/foo', ...options });\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/security-false/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type ClientOptions = {\n    baseUrl: string;\n};\n\nexport type GetFooData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/foo';\n};\n\nexport type GetFooResponses = {\n    /**\n     * OK\n     */\n    200: unknown;\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/security-oauth2/client/client.gen.ts",
    "content": "// 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 (options: RequestOptions) => {\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 url = buildUrl(opts);\n\n    return { opts, url };\n  };\n\n  const request: Client['request'] = async (options) => {\n    // @ts-expect-error\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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/security-oauth2/client/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type { Auth } from '../core/auth.gen';\nexport type { QuerySerializerOptions } from '../core/bodySerializer.gen';\nexport {\n  formDataBodySerializer,\n  jsonBodySerializer,\n  urlSearchParamsBodySerializer,\n} from '../core/bodySerializer.gen';\nexport { buildClientParams } from '../core/params.gen';\nexport { serializeQueryKeyValue } from '../core/queryKeySerializer.gen';\nexport { createClient } from './client.gen';\nexport type {\n  Client,\n  ClientOptions,\n  Config,\n  CreateClientConfig,\n  Options,\n  RequestOptions,\n  RequestResult,\n  ResolvedRequestOptions,\n  ResponseStyle,\n  TDataShape,\n} from './types.gen';\nexport { createConfig, mergeHeaders } from './utils.gen';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/security-oauth2/client/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { Auth } from '../core/auth.gen';\nimport type {\n  ServerSentEventsOptions,\n  ServerSentEventsResult,\n} from '../core/serverSentEvents.gen';\nimport type { Client as CoreClient, Config as CoreConfig } from '../core/types.gen';\nimport type { Middleware } from './utils.gen';\n\nexport type ResponseStyle = 'data' | 'fields';\n\nexport interface Config<T extends ClientOptions = ClientOptions>\n  extends Omit<RequestInit, 'body' | 'headers' | 'method'>, CoreConfig {\n  /**\n   * Base URL for all requests made by this client.\n   */\n  baseUrl?: T['baseUrl'];\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   * Please don't use the Fetch client for Next.js applications. The `next`\n   * options won't have any effect.\n   *\n   * Install {@link https://www.npmjs.com/package/@hey-api/client-next `@hey-api/client-next`} instead.\n   */\n  next?: never;\n  /**\n   * Return the response data parsed in a specified format. By default, `auto`\n   * will infer the appropriate method from the `Content-Type` response header.\n   * You can override this behavior with any of the {@link Body} methods.\n   * Select `stream` if you don't want to parse response data at all.\n   *\n   * @default 'auto'\n   */\n  parseAs?: 'arrayBuffer' | 'auto' | 'blob' | 'formData' | 'json' | 'stream' | 'text';\n  /**\n   * Should we return only data or multiple fields (data, error, response, etc.)?\n   *\n   * @default 'fields'\n   */\n  responseStyle?: ResponseStyle;\n  /**\n   * Throw an error instead of returning it in the response?\n   *\n   * @default false\n   */\n  throwOnError?: T['throwOnError'];\n}\n\nexport interface RequestOptions<\n  TData = unknown,\n  TResponseStyle extends ResponseStyle = 'fields',\n  ThrowOnError extends boolean = boolean,\n  Url extends string = string,\n>\n  extends\n    Config<{\n      responseStyle: TResponseStyle;\n      throwOnError: ThrowOnError;\n    }>,\n    Pick<\n      ServerSentEventsOptions<TData>,\n      | 'onRequest'\n      | 'onSseError'\n      | 'onSseEvent'\n      | 'sseDefaultRetryDelay'\n      | 'sseMaxRetryAttempts'\n      | 'sseMaxRetryDelay'\n    > {\n  /**\n   * Any body that you want to add to your request.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/fetch#body}\n   */\n  body?: unknown;\n  path?: Record<string, unknown>;\n  query?: Record<string, unknown>;\n  /**\n   * Security mechanism(s) to use for the request.\n   */\n  security?: ReadonlyArray<Auth>;\n  url: Url;\n}\n\nexport interface ResolvedRequestOptions<\n  TResponseStyle extends ResponseStyle = 'fields',\n  ThrowOnError extends boolean = boolean,\n  Url extends string = string,\n> extends RequestOptions<unknown, TResponseStyle, ThrowOnError, Url> {\n  serializedBody?: string;\n}\n\nexport type RequestResult<\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = boolean,\n  TResponseStyle extends ResponseStyle = 'fields',\n> = ThrowOnError extends true\n  ? Promise<\n      TResponseStyle extends 'data'\n        ? TData extends Record<string, unknown>\n          ? TData[keyof TData]\n          : TData\n        : {\n            data: TData extends Record<string, unknown> ? TData[keyof TData] : TData;\n            request: Request;\n            response: Response;\n          }\n    >\n  : Promise<\n      TResponseStyle extends 'data'\n        ? (TData extends Record<string, unknown> ? TData[keyof TData] : TData) | undefined\n        : (\n            | {\n                data: TData extends Record<string, unknown> ? TData[keyof TData] : TData;\n                error: undefined;\n              }\n            | {\n                data: undefined;\n                error: TError extends Record<string, unknown> ? TError[keyof TError] : TError;\n              }\n          ) & {\n            request: Request;\n            response: Response;\n          }\n    >;\n\nexport interface ClientOptions {\n  baseUrl?: string;\n  responseStyle?: ResponseStyle;\n  throwOnError?: boolean;\n}\n\ntype MethodFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'>,\n) => RequestResult<TData, TError, ThrowOnError, TResponseStyle>;\n\ntype SseFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'>,\n) => Promise<ServerSentEventsResult<TData, TError>>;\n\ntype RequestFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'> &\n    Pick<Required<RequestOptions<TData, TResponseStyle, ThrowOnError>>, 'method'>,\n) => RequestResult<TData, TError, ThrowOnError, TResponseStyle>;\n\ntype BuildUrlFn = <\n  TData extends {\n    body?: unknown;\n    path?: Record<string, unknown>;\n    query?: Record<string, unknown>;\n    url: string;\n  },\n>(\n  options: TData & Options<TData>,\n) => string;\n\nexport type Client = CoreClient<RequestFn, Config, MethodFn, BuildUrlFn, SseFn> & {\n  interceptors: Middleware<Request, Response, unknown, ResolvedRequestOptions>;\n};\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 = ClientOptions> = (\n  override?: Config<ClientOptions & T>,\n) => Config<Required<ClientOptions> & T>;\n\nexport interface TDataShape {\n  body?: unknown;\n  headers?: unknown;\n  path?: unknown;\n  query?: unknown;\n  url: string;\n}\n\ntype OmitKeys<T, K> = Pick<T, Exclude<keyof T, K>>;\n\nexport type Options<\n  TData extends TDataShape = TDataShape,\n  ThrowOnError extends boolean = boolean,\n  TResponse = unknown,\n  TResponseStyle extends ResponseStyle = 'fields',\n> = OmitKeys<\n  RequestOptions<TResponse, TResponseStyle, ThrowOnError>,\n  'body' | 'path' | 'query' | 'url'\n> &\n  ([TData] extends [never] ? unknown : Omit<TData, 'url'>);\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/security-oauth2/client/utils.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/security-oauth2/client.gen.ts",
    "content": "// 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>());\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/security-oauth2/core/auth.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/security-oauth2/core/bodySerializer.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/security-oauth2/core/params.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/security-oauth2/core/pathSerializer.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/security-oauth2/core/queryKeySerializer.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\n/**\n * JSON-friendly union that mirrors what Pinia Colada can hash.\n */\nexport type JsonValue =\n  | null\n  | string\n  | number\n  | boolean\n  | JsonValue[]\n  | { [key: string]: JsonValue };\n\n/**\n * Replacer that converts non-JSON values (bigint, Date, etc.) to safe substitutes.\n */\nexport const queryKeyJsonReplacer = (_key: string, value: unknown) => {\n  if (value === undefined || typeof value === 'function' || typeof value === 'symbol') {\n    return undefined;\n  }\n  if (typeof value === 'bigint') {\n    return value.toString();\n  }\n  if (value instanceof Date) {\n    return value.toISOString();\n  }\n  return value;\n};\n\n/**\n * Safely stringifies a value and parses it back into a JsonValue.\n */\nexport const stringifyToJsonValue = (input: unknown): JsonValue | undefined => {\n  try {\n    const json = JSON.stringify(input, queryKeyJsonReplacer);\n    if (json === undefined) {\n      return undefined;\n    }\n    return JSON.parse(json) as JsonValue;\n  } catch {\n    return undefined;\n  }\n};\n\n/**\n * Detects plain objects (including objects with a null prototype).\n */\nconst isPlainObject = (value: unknown): value is Record<string, unknown> => {\n  if (value === null || typeof value !== 'object') {\n    return false;\n  }\n  const prototype = Object.getPrototypeOf(value as object);\n  return prototype === Object.prototype || prototype === null;\n};\n\n/**\n * Turns URLSearchParams into a sorted JSON object for deterministic keys.\n */\nconst serializeSearchParams = (params: URLSearchParams): JsonValue => {\n  const entries = Array.from(params.entries()).sort(([a], [b]) => a.localeCompare(b));\n  const result: Record<string, JsonValue> = {};\n\n  for (const [key, value] of entries) {\n    const existing = result[key];\n    if (existing === undefined) {\n      result[key] = value;\n      continue;\n    }\n\n    if (Array.isArray(existing)) {\n      (existing as string[]).push(value);\n    } else {\n      result[key] = [existing, value];\n    }\n  }\n\n  return result;\n};\n\n/**\n * Normalizes any accepted value into a JSON-friendly shape for query keys.\n */\nexport const serializeQueryKeyValue = (value: unknown): JsonValue | undefined => {\n  if (value === null) {\n    return null;\n  }\n\n  if (typeof value === 'string' || typeof value === 'number' || typeof value === 'boolean') {\n    return value;\n  }\n\n  if (value === undefined || typeof value === 'function' || typeof value === 'symbol') {\n    return undefined;\n  }\n\n  if (typeof value === 'bigint') {\n    return value.toString();\n  }\n\n  if (value instanceof Date) {\n    return value.toISOString();\n  }\n\n  if (Array.isArray(value)) {\n    return stringifyToJsonValue(value);\n  }\n\n  if (typeof URLSearchParams !== 'undefined' && value instanceof URLSearchParams) {\n    return serializeSearchParams(value);\n  }\n\n  if (isPlainObject(value)) {\n    return stringifyToJsonValue(value);\n  }\n\n  return undefined;\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/security-oauth2/core/serverSentEvents.gen.ts",
    "content": "// 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 const 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            // Normalize line endings: CRLF -> LF, then CR -> LF\n            buffer = buffer.replace(/\\r\\n/g, '\\n').replace(/\\r/g, '\\n');\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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/security-oauth2/core/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { Auth, AuthToken } from './auth.gen';\nimport type { BodySerializer, QuerySerializer, QuerySerializerOptions } from './bodySerializer.gen';\n\nexport type HttpMethod =\n  | 'connect'\n  | 'delete'\n  | 'get'\n  | 'head'\n  | 'options'\n  | 'patch'\n  | 'post'\n  | 'put'\n  | 'trace';\n\nexport type Client<\n  RequestFn = never,\n  Config = unknown,\n  MethodFn = never,\n  BuildUrlFn = never,\n  SseFn = never,\n> = {\n  /**\n   * Returns the final request URL.\n   */\n  buildUrl: BuildUrlFn;\n  getConfig: () => Config;\n  request: RequestFn;\n  setConfig: (config: Config) => Config;\n} & {\n  [K in HttpMethod]: MethodFn;\n} & ([SseFn] extends [never] ? { sse?: never } : { sse: { [K in HttpMethod]: SseFn } });\n\nexport interface Config {\n  /**\n   * Auth token or a function returning auth token. The resolved value will be\n   * added to the request payload as defined by its `security` array.\n   */\n  auth?: ((auth: Auth) => Promise<AuthToken> | AuthToken) | AuthToken;\n  /**\n   * A function for serializing request body parameter. By default,\n   * {@link JSON.stringify()} will be used.\n   */\n  bodySerializer?: BodySerializer | null;\n  /**\n   * An object containing any HTTP headers that you want to pre-populate your\n   * `Headers` object with.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/Headers/Headers#init See more}\n   */\n  headers?:\n    | RequestInit['headers']\n    | Record<\n        string,\n        string | number | boolean | (string | number | boolean)[] | null | undefined | unknown\n      >;\n  /**\n   * The request method.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/fetch#method See more}\n   */\n  method?: Uppercase<HttpMethod>;\n  /**\n   * A function for serializing request query parameters. By default, arrays\n   * will be exploded in form style, objects will be exploded in deepObject\n   * style, and reserved characters are percent-encoded.\n   *\n   * This method will have no effect if the native `paramsSerializer()` Axios\n   * API function is used.\n   *\n   * {@link https://swagger.io/docs/specification/serialization/#query View examples}\n   */\n  querySerializer?: QuerySerializer | QuerySerializerOptions;\n  /**\n   * A function validating request data. This is useful if you want to ensure\n   * the request conforms to the desired shape, so it can be safely sent to\n   * the server.\n   */\n  requestValidator?: (data: unknown) => Promise<unknown>;\n  /**\n   * A function transforming response data before it's returned. This is useful\n   * for post-processing data, e.g. converting ISO strings into Date objects.\n   */\n  responseTransformer?: (data: unknown) => Promise<unknown>;\n  /**\n   * A function validating response data. This is useful if you want to ensure\n   * the response conforms to the desired shape, so it can be safely passed to\n   * the transformers and returned to the user.\n   */\n  responseValidator?: (data: unknown) => Promise<unknown>;\n}\n\ntype IsExactlyNeverOrNeverUndefined<T> = [T] extends [never]\n  ? true\n  : [T] extends [never | undefined]\n    ? [undefined] extends [T]\n      ? false\n      : true\n    : false;\n\nexport type OmitNever<T extends Record<string, unknown>> = {\n  [K in keyof T as IsExactlyNeverOrNeverUndefined<T[K]> extends true ? never : K]: T[K];\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/security-oauth2/core/utils.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/security-oauth2/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport { getFoo, type Options } from './sdk.gen';\nexport type { ClientOptions, GetFooData, GetFooResponses } from './types.gen';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/security-oauth2/sdk.gen.ts",
    "content": "// 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 { GetFooData, GetFooResponses } from './types.gen';\n\nexport type Options<TData extends TDataShape = TDataShape, ThrowOnError extends boolean = boolean> = Options2<TData, ThrowOnError> & {\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\nexport const getFoo = <ThrowOnError extends boolean = false>(options?: Options<GetFooData, ThrowOnError>) => (options?.client ?? client).get<GetFooResponses, unknown, ThrowOnError>({\n    security: [{ scheme: 'bearer', type: 'http' }],\n    url: '/foo',\n    ...options\n});\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/security-oauth2/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type ClientOptions = {\n    baseUrl: string;\n};\n\nexport type GetFooData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/foo';\n};\n\nexport type GetFooResponses = {\n    /**\n     * OK\n     */\n    200: unknown;\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/servers/client/client.gen.ts",
    "content": "// 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 (options: RequestOptions) => {\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 url = buildUrl(opts);\n\n    return { opts, url };\n  };\n\n  const request: Client['request'] = async (options) => {\n    // @ts-expect-error\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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/servers/client/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type { Auth } from '../core/auth.gen';\nexport type { QuerySerializerOptions } from '../core/bodySerializer.gen';\nexport {\n  formDataBodySerializer,\n  jsonBodySerializer,\n  urlSearchParamsBodySerializer,\n} from '../core/bodySerializer.gen';\nexport { buildClientParams } from '../core/params.gen';\nexport { serializeQueryKeyValue } from '../core/queryKeySerializer.gen';\nexport { createClient } from './client.gen';\nexport type {\n  Client,\n  ClientOptions,\n  Config,\n  CreateClientConfig,\n  Options,\n  RequestOptions,\n  RequestResult,\n  ResolvedRequestOptions,\n  ResponseStyle,\n  TDataShape,\n} from './types.gen';\nexport { createConfig, mergeHeaders } from './utils.gen';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/servers/client/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { Auth } from '../core/auth.gen';\nimport type {\n  ServerSentEventsOptions,\n  ServerSentEventsResult,\n} from '../core/serverSentEvents.gen';\nimport type { Client as CoreClient, Config as CoreConfig } from '../core/types.gen';\nimport type { Middleware } from './utils.gen';\n\nexport type ResponseStyle = 'data' | 'fields';\n\nexport interface Config<T extends ClientOptions = ClientOptions>\n  extends Omit<RequestInit, 'body' | 'headers' | 'method'>, CoreConfig {\n  /**\n   * Base URL for all requests made by this client.\n   */\n  baseUrl?: T['baseUrl'];\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   * Please don't use the Fetch client for Next.js applications. The `next`\n   * options won't have any effect.\n   *\n   * Install {@link https://www.npmjs.com/package/@hey-api/client-next `@hey-api/client-next`} instead.\n   */\n  next?: never;\n  /**\n   * Return the response data parsed in a specified format. By default, `auto`\n   * will infer the appropriate method from the `Content-Type` response header.\n   * You can override this behavior with any of the {@link Body} methods.\n   * Select `stream` if you don't want to parse response data at all.\n   *\n   * @default 'auto'\n   */\n  parseAs?: 'arrayBuffer' | 'auto' | 'blob' | 'formData' | 'json' | 'stream' | 'text';\n  /**\n   * Should we return only data or multiple fields (data, error, response, etc.)?\n   *\n   * @default 'fields'\n   */\n  responseStyle?: ResponseStyle;\n  /**\n   * Throw an error instead of returning it in the response?\n   *\n   * @default false\n   */\n  throwOnError?: T['throwOnError'];\n}\n\nexport interface RequestOptions<\n  TData = unknown,\n  TResponseStyle extends ResponseStyle = 'fields',\n  ThrowOnError extends boolean = boolean,\n  Url extends string = string,\n>\n  extends\n    Config<{\n      responseStyle: TResponseStyle;\n      throwOnError: ThrowOnError;\n    }>,\n    Pick<\n      ServerSentEventsOptions<TData>,\n      | 'onRequest'\n      | 'onSseError'\n      | 'onSseEvent'\n      | 'sseDefaultRetryDelay'\n      | 'sseMaxRetryAttempts'\n      | 'sseMaxRetryDelay'\n    > {\n  /**\n   * Any body that you want to add to your request.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/fetch#body}\n   */\n  body?: unknown;\n  path?: Record<string, unknown>;\n  query?: Record<string, unknown>;\n  /**\n   * Security mechanism(s) to use for the request.\n   */\n  security?: ReadonlyArray<Auth>;\n  url: Url;\n}\n\nexport interface ResolvedRequestOptions<\n  TResponseStyle extends ResponseStyle = 'fields',\n  ThrowOnError extends boolean = boolean,\n  Url extends string = string,\n> extends RequestOptions<unknown, TResponseStyle, ThrowOnError, Url> {\n  serializedBody?: string;\n}\n\nexport type RequestResult<\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = boolean,\n  TResponseStyle extends ResponseStyle = 'fields',\n> = ThrowOnError extends true\n  ? Promise<\n      TResponseStyle extends 'data'\n        ? TData extends Record<string, unknown>\n          ? TData[keyof TData]\n          : TData\n        : {\n            data: TData extends Record<string, unknown> ? TData[keyof TData] : TData;\n            request: Request;\n            response: Response;\n          }\n    >\n  : Promise<\n      TResponseStyle extends 'data'\n        ? (TData extends Record<string, unknown> ? TData[keyof TData] : TData) | undefined\n        : (\n            | {\n                data: TData extends Record<string, unknown> ? TData[keyof TData] : TData;\n                error: undefined;\n              }\n            | {\n                data: undefined;\n                error: TError extends Record<string, unknown> ? TError[keyof TError] : TError;\n              }\n          ) & {\n            request: Request;\n            response: Response;\n          }\n    >;\n\nexport interface ClientOptions {\n  baseUrl?: string;\n  responseStyle?: ResponseStyle;\n  throwOnError?: boolean;\n}\n\ntype MethodFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'>,\n) => RequestResult<TData, TError, ThrowOnError, TResponseStyle>;\n\ntype SseFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'>,\n) => Promise<ServerSentEventsResult<TData, TError>>;\n\ntype RequestFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'> &\n    Pick<Required<RequestOptions<TData, TResponseStyle, ThrowOnError>>, 'method'>,\n) => RequestResult<TData, TError, ThrowOnError, TResponseStyle>;\n\ntype BuildUrlFn = <\n  TData extends {\n    body?: unknown;\n    path?: Record<string, unknown>;\n    query?: Record<string, unknown>;\n    url: string;\n  },\n>(\n  options: TData & Options<TData>,\n) => string;\n\nexport type Client = CoreClient<RequestFn, Config, MethodFn, BuildUrlFn, SseFn> & {\n  interceptors: Middleware<Request, Response, unknown, ResolvedRequestOptions>;\n};\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 = ClientOptions> = (\n  override?: Config<ClientOptions & T>,\n) => Config<Required<ClientOptions> & T>;\n\nexport interface TDataShape {\n  body?: unknown;\n  headers?: unknown;\n  path?: unknown;\n  query?: unknown;\n  url: string;\n}\n\ntype OmitKeys<T, K> = Pick<T, Exclude<keyof T, K>>;\n\nexport type Options<\n  TData extends TDataShape = TDataShape,\n  ThrowOnError extends boolean = boolean,\n  TResponse = unknown,\n  TResponseStyle extends ResponseStyle = 'fields',\n> = OmitKeys<\n  RequestOptions<TResponse, TResponseStyle, ThrowOnError>,\n  'body' | 'path' | 'query' | 'url'\n> &\n  ([TData] extends [never] ? unknown : Omit<TData, 'url'>);\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/servers/client/utils.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/servers/client.gen.ts",
    "content": "// 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://foo.com/v1' }));\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/servers/core/auth.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/servers/core/bodySerializer.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/servers/core/params.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/servers/core/pathSerializer.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/servers/core/queryKeySerializer.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\n/**\n * JSON-friendly union that mirrors what Pinia Colada can hash.\n */\nexport type JsonValue =\n  | null\n  | string\n  | number\n  | boolean\n  | JsonValue[]\n  | { [key: string]: JsonValue };\n\n/**\n * Replacer that converts non-JSON values (bigint, Date, etc.) to safe substitutes.\n */\nexport const queryKeyJsonReplacer = (_key: string, value: unknown) => {\n  if (value === undefined || typeof value === 'function' || typeof value === 'symbol') {\n    return undefined;\n  }\n  if (typeof value === 'bigint') {\n    return value.toString();\n  }\n  if (value instanceof Date) {\n    return value.toISOString();\n  }\n  return value;\n};\n\n/**\n * Safely stringifies a value and parses it back into a JsonValue.\n */\nexport const stringifyToJsonValue = (input: unknown): JsonValue | undefined => {\n  try {\n    const json = JSON.stringify(input, queryKeyJsonReplacer);\n    if (json === undefined) {\n      return undefined;\n    }\n    return JSON.parse(json) as JsonValue;\n  } catch {\n    return undefined;\n  }\n};\n\n/**\n * Detects plain objects (including objects with a null prototype).\n */\nconst isPlainObject = (value: unknown): value is Record<string, unknown> => {\n  if (value === null || typeof value !== 'object') {\n    return false;\n  }\n  const prototype = Object.getPrototypeOf(value as object);\n  return prototype === Object.prototype || prototype === null;\n};\n\n/**\n * Turns URLSearchParams into a sorted JSON object for deterministic keys.\n */\nconst serializeSearchParams = (params: URLSearchParams): JsonValue => {\n  const entries = Array.from(params.entries()).sort(([a], [b]) => a.localeCompare(b));\n  const result: Record<string, JsonValue> = {};\n\n  for (const [key, value] of entries) {\n    const existing = result[key];\n    if (existing === undefined) {\n      result[key] = value;\n      continue;\n    }\n\n    if (Array.isArray(existing)) {\n      (existing as string[]).push(value);\n    } else {\n      result[key] = [existing, value];\n    }\n  }\n\n  return result;\n};\n\n/**\n * Normalizes any accepted value into a JSON-friendly shape for query keys.\n */\nexport const serializeQueryKeyValue = (value: unknown): JsonValue | undefined => {\n  if (value === null) {\n    return null;\n  }\n\n  if (typeof value === 'string' || typeof value === 'number' || typeof value === 'boolean') {\n    return value;\n  }\n\n  if (value === undefined || typeof value === 'function' || typeof value === 'symbol') {\n    return undefined;\n  }\n\n  if (typeof value === 'bigint') {\n    return value.toString();\n  }\n\n  if (value instanceof Date) {\n    return value.toISOString();\n  }\n\n  if (Array.isArray(value)) {\n    return stringifyToJsonValue(value);\n  }\n\n  if (typeof URLSearchParams !== 'undefined' && value instanceof URLSearchParams) {\n    return serializeSearchParams(value);\n  }\n\n  if (isPlainObject(value)) {\n    return stringifyToJsonValue(value);\n  }\n\n  return undefined;\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/servers/core/serverSentEvents.gen.ts",
    "content": "// 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 const 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            // Normalize line endings: CRLF -> LF, then CR -> LF\n            buffer = buffer.replace(/\\r\\n/g, '\\n').replace(/\\r/g, '\\n');\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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/servers/core/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { Auth, AuthToken } from './auth.gen';\nimport type { BodySerializer, QuerySerializer, QuerySerializerOptions } from './bodySerializer.gen';\n\nexport type HttpMethod =\n  | 'connect'\n  | 'delete'\n  | 'get'\n  | 'head'\n  | 'options'\n  | 'patch'\n  | 'post'\n  | 'put'\n  | 'trace';\n\nexport type Client<\n  RequestFn = never,\n  Config = unknown,\n  MethodFn = never,\n  BuildUrlFn = never,\n  SseFn = never,\n> = {\n  /**\n   * Returns the final request URL.\n   */\n  buildUrl: BuildUrlFn;\n  getConfig: () => Config;\n  request: RequestFn;\n  setConfig: (config: Config) => Config;\n} & {\n  [K in HttpMethod]: MethodFn;\n} & ([SseFn] extends [never] ? { sse?: never } : { sse: { [K in HttpMethod]: SseFn } });\n\nexport interface Config {\n  /**\n   * Auth token or a function returning auth token. The resolved value will be\n   * added to the request payload as defined by its `security` array.\n   */\n  auth?: ((auth: Auth) => Promise<AuthToken> | AuthToken) | AuthToken;\n  /**\n   * A function for serializing request body parameter. By default,\n   * {@link JSON.stringify()} will be used.\n   */\n  bodySerializer?: BodySerializer | null;\n  /**\n   * An object containing any HTTP headers that you want to pre-populate your\n   * `Headers` object with.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/Headers/Headers#init See more}\n   */\n  headers?:\n    | RequestInit['headers']\n    | Record<\n        string,\n        string | number | boolean | (string | number | boolean)[] | null | undefined | unknown\n      >;\n  /**\n   * The request method.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/fetch#method See more}\n   */\n  method?: Uppercase<HttpMethod>;\n  /**\n   * A function for serializing request query parameters. By default, arrays\n   * will be exploded in form style, objects will be exploded in deepObject\n   * style, and reserved characters are percent-encoded.\n   *\n   * This method will have no effect if the native `paramsSerializer()` Axios\n   * API function is used.\n   *\n   * {@link https://swagger.io/docs/specification/serialization/#query View examples}\n   */\n  querySerializer?: QuerySerializer | QuerySerializerOptions;\n  /**\n   * A function validating request data. This is useful if you want to ensure\n   * the request conforms to the desired shape, so it can be safely sent to\n   * the server.\n   */\n  requestValidator?: (data: unknown) => Promise<unknown>;\n  /**\n   * A function transforming response data before it's returned. This is useful\n   * for post-processing data, e.g. converting ISO strings into Date objects.\n   */\n  responseTransformer?: (data: unknown) => Promise<unknown>;\n  /**\n   * A function validating response data. This is useful if you want to ensure\n   * the response conforms to the desired shape, so it can be safely passed to\n   * the transformers and returned to the user.\n   */\n  responseValidator?: (data: unknown) => Promise<unknown>;\n}\n\ntype IsExactlyNeverOrNeverUndefined<T> = [T] extends [never]\n  ? true\n  : [T] extends [never | undefined]\n    ? [undefined] extends [T]\n      ? false\n      : true\n    : false;\n\nexport type OmitNever<T extends Record<string, unknown>> = {\n  [K in keyof T as IsExactlyNeverOrNeverUndefined<T[K]> extends true ? never : K]: T[K];\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/servers/core/utils.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/servers/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type { ClientOptions, GetFooData, GetFooResponse, GetFooResponses } from './types.gen';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/servers/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type ClientOptions = {\n    baseUrl: 'https://foo.com/v1' | (string & {});\n};\n\nexport type GetFooData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/foo';\n};\n\nexport type GetFooResponses = {\n    /**\n     * OK\n     */\n    200: string;\n};\n\nexport type GetFooResponse = GetFooResponses[keyof GetFooResponses];\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/servers-base-path/client/client.gen.ts",
    "content": "// 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 (options: RequestOptions) => {\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 url = buildUrl(opts);\n\n    return { opts, url };\n  };\n\n  const request: Client['request'] = async (options) => {\n    // @ts-expect-error\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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/servers-base-path/client/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type { Auth } from '../core/auth.gen';\nexport type { QuerySerializerOptions } from '../core/bodySerializer.gen';\nexport {\n  formDataBodySerializer,\n  jsonBodySerializer,\n  urlSearchParamsBodySerializer,\n} from '../core/bodySerializer.gen';\nexport { buildClientParams } from '../core/params.gen';\nexport { serializeQueryKeyValue } from '../core/queryKeySerializer.gen';\nexport { createClient } from './client.gen';\nexport type {\n  Client,\n  ClientOptions,\n  Config,\n  CreateClientConfig,\n  Options,\n  RequestOptions,\n  RequestResult,\n  ResolvedRequestOptions,\n  ResponseStyle,\n  TDataShape,\n} from './types.gen';\nexport { createConfig, mergeHeaders } from './utils.gen';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/servers-base-path/client/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { Auth } from '../core/auth.gen';\nimport type {\n  ServerSentEventsOptions,\n  ServerSentEventsResult,\n} from '../core/serverSentEvents.gen';\nimport type { Client as CoreClient, Config as CoreConfig } from '../core/types.gen';\nimport type { Middleware } from './utils.gen';\n\nexport type ResponseStyle = 'data' | 'fields';\n\nexport interface Config<T extends ClientOptions = ClientOptions>\n  extends Omit<RequestInit, 'body' | 'headers' | 'method'>, CoreConfig {\n  /**\n   * Base URL for all requests made by this client.\n   */\n  baseUrl?: T['baseUrl'];\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   * Please don't use the Fetch client for Next.js applications. The `next`\n   * options won't have any effect.\n   *\n   * Install {@link https://www.npmjs.com/package/@hey-api/client-next `@hey-api/client-next`} instead.\n   */\n  next?: never;\n  /**\n   * Return the response data parsed in a specified format. By default, `auto`\n   * will infer the appropriate method from the `Content-Type` response header.\n   * You can override this behavior with any of the {@link Body} methods.\n   * Select `stream` if you don't want to parse response data at all.\n   *\n   * @default 'auto'\n   */\n  parseAs?: 'arrayBuffer' | 'auto' | 'blob' | 'formData' | 'json' | 'stream' | 'text';\n  /**\n   * Should we return only data or multiple fields (data, error, response, etc.)?\n   *\n   * @default 'fields'\n   */\n  responseStyle?: ResponseStyle;\n  /**\n   * Throw an error instead of returning it in the response?\n   *\n   * @default false\n   */\n  throwOnError?: T['throwOnError'];\n}\n\nexport interface RequestOptions<\n  TData = unknown,\n  TResponseStyle extends ResponseStyle = 'fields',\n  ThrowOnError extends boolean = boolean,\n  Url extends string = string,\n>\n  extends\n    Config<{\n      responseStyle: TResponseStyle;\n      throwOnError: ThrowOnError;\n    }>,\n    Pick<\n      ServerSentEventsOptions<TData>,\n      | 'onRequest'\n      | 'onSseError'\n      | 'onSseEvent'\n      | 'sseDefaultRetryDelay'\n      | 'sseMaxRetryAttempts'\n      | 'sseMaxRetryDelay'\n    > {\n  /**\n   * Any body that you want to add to your request.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/fetch#body}\n   */\n  body?: unknown;\n  path?: Record<string, unknown>;\n  query?: Record<string, unknown>;\n  /**\n   * Security mechanism(s) to use for the request.\n   */\n  security?: ReadonlyArray<Auth>;\n  url: Url;\n}\n\nexport interface ResolvedRequestOptions<\n  TResponseStyle extends ResponseStyle = 'fields',\n  ThrowOnError extends boolean = boolean,\n  Url extends string = string,\n> extends RequestOptions<unknown, TResponseStyle, ThrowOnError, Url> {\n  serializedBody?: string;\n}\n\nexport type RequestResult<\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = boolean,\n  TResponseStyle extends ResponseStyle = 'fields',\n> = ThrowOnError extends true\n  ? Promise<\n      TResponseStyle extends 'data'\n        ? TData extends Record<string, unknown>\n          ? TData[keyof TData]\n          : TData\n        : {\n            data: TData extends Record<string, unknown> ? TData[keyof TData] : TData;\n            request: Request;\n            response: Response;\n          }\n    >\n  : Promise<\n      TResponseStyle extends 'data'\n        ? (TData extends Record<string, unknown> ? TData[keyof TData] : TData) | undefined\n        : (\n            | {\n                data: TData extends Record<string, unknown> ? TData[keyof TData] : TData;\n                error: undefined;\n              }\n            | {\n                data: undefined;\n                error: TError extends Record<string, unknown> ? TError[keyof TError] : TError;\n              }\n          ) & {\n            request: Request;\n            response: Response;\n          }\n    >;\n\nexport interface ClientOptions {\n  baseUrl?: string;\n  responseStyle?: ResponseStyle;\n  throwOnError?: boolean;\n}\n\ntype MethodFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'>,\n) => RequestResult<TData, TError, ThrowOnError, TResponseStyle>;\n\ntype SseFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'>,\n) => Promise<ServerSentEventsResult<TData, TError>>;\n\ntype RequestFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'> &\n    Pick<Required<RequestOptions<TData, TResponseStyle, ThrowOnError>>, 'method'>,\n) => RequestResult<TData, TError, ThrowOnError, TResponseStyle>;\n\ntype BuildUrlFn = <\n  TData extends {\n    body?: unknown;\n    path?: Record<string, unknown>;\n    query?: Record<string, unknown>;\n    url: string;\n  },\n>(\n  options: TData & Options<TData>,\n) => string;\n\nexport type Client = CoreClient<RequestFn, Config, MethodFn, BuildUrlFn, SseFn> & {\n  interceptors: Middleware<Request, Response, unknown, ResolvedRequestOptions>;\n};\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 = ClientOptions> = (\n  override?: Config<ClientOptions & T>,\n) => Config<Required<ClientOptions> & T>;\n\nexport interface TDataShape {\n  body?: unknown;\n  headers?: unknown;\n  path?: unknown;\n  query?: unknown;\n  url: string;\n}\n\ntype OmitKeys<T, K> = Pick<T, Exclude<keyof T, K>>;\n\nexport type Options<\n  TData extends TDataShape = TDataShape,\n  ThrowOnError extends boolean = boolean,\n  TResponse = unknown,\n  TResponseStyle extends ResponseStyle = 'fields',\n> = OmitKeys<\n  RequestOptions<TResponse, TResponseStyle, ThrowOnError>,\n  'body' | 'path' | 'query' | 'url'\n> &\n  ([TData] extends [never] ? unknown : Omit<TData, 'url'>);\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/servers-base-path/client/utils.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/servers-base-path/client.gen.ts",
    "content": "// 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: '/v1' }));\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/servers-base-path/core/auth.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/servers-base-path/core/bodySerializer.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/servers-base-path/core/params.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/servers-base-path/core/pathSerializer.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/servers-base-path/core/queryKeySerializer.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\n/**\n * JSON-friendly union that mirrors what Pinia Colada can hash.\n */\nexport type JsonValue =\n  | null\n  | string\n  | number\n  | boolean\n  | JsonValue[]\n  | { [key: string]: JsonValue };\n\n/**\n * Replacer that converts non-JSON values (bigint, Date, etc.) to safe substitutes.\n */\nexport const queryKeyJsonReplacer = (_key: string, value: unknown) => {\n  if (value === undefined || typeof value === 'function' || typeof value === 'symbol') {\n    return undefined;\n  }\n  if (typeof value === 'bigint') {\n    return value.toString();\n  }\n  if (value instanceof Date) {\n    return value.toISOString();\n  }\n  return value;\n};\n\n/**\n * Safely stringifies a value and parses it back into a JsonValue.\n */\nexport const stringifyToJsonValue = (input: unknown): JsonValue | undefined => {\n  try {\n    const json = JSON.stringify(input, queryKeyJsonReplacer);\n    if (json === undefined) {\n      return undefined;\n    }\n    return JSON.parse(json) as JsonValue;\n  } catch {\n    return undefined;\n  }\n};\n\n/**\n * Detects plain objects (including objects with a null prototype).\n */\nconst isPlainObject = (value: unknown): value is Record<string, unknown> => {\n  if (value === null || typeof value !== 'object') {\n    return false;\n  }\n  const prototype = Object.getPrototypeOf(value as object);\n  return prototype === Object.prototype || prototype === null;\n};\n\n/**\n * Turns URLSearchParams into a sorted JSON object for deterministic keys.\n */\nconst serializeSearchParams = (params: URLSearchParams): JsonValue => {\n  const entries = Array.from(params.entries()).sort(([a], [b]) => a.localeCompare(b));\n  const result: Record<string, JsonValue> = {};\n\n  for (const [key, value] of entries) {\n    const existing = result[key];\n    if (existing === undefined) {\n      result[key] = value;\n      continue;\n    }\n\n    if (Array.isArray(existing)) {\n      (existing as string[]).push(value);\n    } else {\n      result[key] = [existing, value];\n    }\n  }\n\n  return result;\n};\n\n/**\n * Normalizes any accepted value into a JSON-friendly shape for query keys.\n */\nexport const serializeQueryKeyValue = (value: unknown): JsonValue | undefined => {\n  if (value === null) {\n    return null;\n  }\n\n  if (typeof value === 'string' || typeof value === 'number' || typeof value === 'boolean') {\n    return value;\n  }\n\n  if (value === undefined || typeof value === 'function' || typeof value === 'symbol') {\n    return undefined;\n  }\n\n  if (typeof value === 'bigint') {\n    return value.toString();\n  }\n\n  if (value instanceof Date) {\n    return value.toISOString();\n  }\n\n  if (Array.isArray(value)) {\n    return stringifyToJsonValue(value);\n  }\n\n  if (typeof URLSearchParams !== 'undefined' && value instanceof URLSearchParams) {\n    return serializeSearchParams(value);\n  }\n\n  if (isPlainObject(value)) {\n    return stringifyToJsonValue(value);\n  }\n\n  return undefined;\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/servers-base-path/core/serverSentEvents.gen.ts",
    "content": "// 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 const 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            // Normalize line endings: CRLF -> LF, then CR -> LF\n            buffer = buffer.replace(/\\r\\n/g, '\\n').replace(/\\r/g, '\\n');\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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/servers-base-path/core/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { Auth, AuthToken } from './auth.gen';\nimport type { BodySerializer, QuerySerializer, QuerySerializerOptions } from './bodySerializer.gen';\n\nexport type HttpMethod =\n  | 'connect'\n  | 'delete'\n  | 'get'\n  | 'head'\n  | 'options'\n  | 'patch'\n  | 'post'\n  | 'put'\n  | 'trace';\n\nexport type Client<\n  RequestFn = never,\n  Config = unknown,\n  MethodFn = never,\n  BuildUrlFn = never,\n  SseFn = never,\n> = {\n  /**\n   * Returns the final request URL.\n   */\n  buildUrl: BuildUrlFn;\n  getConfig: () => Config;\n  request: RequestFn;\n  setConfig: (config: Config) => Config;\n} & {\n  [K in HttpMethod]: MethodFn;\n} & ([SseFn] extends [never] ? { sse?: never } : { sse: { [K in HttpMethod]: SseFn } });\n\nexport interface Config {\n  /**\n   * Auth token or a function returning auth token. The resolved value will be\n   * added to the request payload as defined by its `security` array.\n   */\n  auth?: ((auth: Auth) => Promise<AuthToken> | AuthToken) | AuthToken;\n  /**\n   * A function for serializing request body parameter. By default,\n   * {@link JSON.stringify()} will be used.\n   */\n  bodySerializer?: BodySerializer | null;\n  /**\n   * An object containing any HTTP headers that you want to pre-populate your\n   * `Headers` object with.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/Headers/Headers#init See more}\n   */\n  headers?:\n    | RequestInit['headers']\n    | Record<\n        string,\n        string | number | boolean | (string | number | boolean)[] | null | undefined | unknown\n      >;\n  /**\n   * The request method.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/fetch#method See more}\n   */\n  method?: Uppercase<HttpMethod>;\n  /**\n   * A function for serializing request query parameters. By default, arrays\n   * will be exploded in form style, objects will be exploded in deepObject\n   * style, and reserved characters are percent-encoded.\n   *\n   * This method will have no effect if the native `paramsSerializer()` Axios\n   * API function is used.\n   *\n   * {@link https://swagger.io/docs/specification/serialization/#query View examples}\n   */\n  querySerializer?: QuerySerializer | QuerySerializerOptions;\n  /**\n   * A function validating request data. This is useful if you want to ensure\n   * the request conforms to the desired shape, so it can be safely sent to\n   * the server.\n   */\n  requestValidator?: (data: unknown) => Promise<unknown>;\n  /**\n   * A function transforming response data before it's returned. This is useful\n   * for post-processing data, e.g. converting ISO strings into Date objects.\n   */\n  responseTransformer?: (data: unknown) => Promise<unknown>;\n  /**\n   * A function validating response data. This is useful if you want to ensure\n   * the response conforms to the desired shape, so it can be safely passed to\n   * the transformers and returned to the user.\n   */\n  responseValidator?: (data: unknown) => Promise<unknown>;\n}\n\ntype IsExactlyNeverOrNeverUndefined<T> = [T] extends [never]\n  ? true\n  : [T] extends [never | undefined]\n    ? [undefined] extends [T]\n      ? false\n      : true\n    : false;\n\nexport type OmitNever<T extends Record<string, unknown>> = {\n  [K in keyof T as IsExactlyNeverOrNeverUndefined<T[K]> extends true ? never : K]: T[K];\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/servers-base-path/core/utils.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/servers-base-path/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type { ClientOptions, GetFooData, GetFooResponse, GetFooResponses } from './types.gen';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/servers-base-path/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type ClientOptions = {\n    baseUrl: `${string}://${string}/v1` | (string & {});\n};\n\nexport type GetFooData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/foo';\n};\n\nexport type GetFooResponses = {\n    /**\n     * OK\n     */\n    200: string;\n};\n\nexport type GetFooResponse = GetFooResponses[keyof GetFooResponses];\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/servers-host/client/client.gen.ts",
    "content": "// 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 (options: RequestOptions) => {\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 url = buildUrl(opts);\n\n    return { opts, url };\n  };\n\n  const request: Client['request'] = async (options) => {\n    // @ts-expect-error\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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/servers-host/client/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type { Auth } from '../core/auth.gen';\nexport type { QuerySerializerOptions } from '../core/bodySerializer.gen';\nexport {\n  formDataBodySerializer,\n  jsonBodySerializer,\n  urlSearchParamsBodySerializer,\n} from '../core/bodySerializer.gen';\nexport { buildClientParams } from '../core/params.gen';\nexport { serializeQueryKeyValue } from '../core/queryKeySerializer.gen';\nexport { createClient } from './client.gen';\nexport type {\n  Client,\n  ClientOptions,\n  Config,\n  CreateClientConfig,\n  Options,\n  RequestOptions,\n  RequestResult,\n  ResolvedRequestOptions,\n  ResponseStyle,\n  TDataShape,\n} from './types.gen';\nexport { createConfig, mergeHeaders } from './utils.gen';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/servers-host/client/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { Auth } from '../core/auth.gen';\nimport type {\n  ServerSentEventsOptions,\n  ServerSentEventsResult,\n} from '../core/serverSentEvents.gen';\nimport type { Client as CoreClient, Config as CoreConfig } from '../core/types.gen';\nimport type { Middleware } from './utils.gen';\n\nexport type ResponseStyle = 'data' | 'fields';\n\nexport interface Config<T extends ClientOptions = ClientOptions>\n  extends Omit<RequestInit, 'body' | 'headers' | 'method'>, CoreConfig {\n  /**\n   * Base URL for all requests made by this client.\n   */\n  baseUrl?: T['baseUrl'];\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   * Please don't use the Fetch client for Next.js applications. The `next`\n   * options won't have any effect.\n   *\n   * Install {@link https://www.npmjs.com/package/@hey-api/client-next `@hey-api/client-next`} instead.\n   */\n  next?: never;\n  /**\n   * Return the response data parsed in a specified format. By default, `auto`\n   * will infer the appropriate method from the `Content-Type` response header.\n   * You can override this behavior with any of the {@link Body} methods.\n   * Select `stream` if you don't want to parse response data at all.\n   *\n   * @default 'auto'\n   */\n  parseAs?: 'arrayBuffer' | 'auto' | 'blob' | 'formData' | 'json' | 'stream' | 'text';\n  /**\n   * Should we return only data or multiple fields (data, error, response, etc.)?\n   *\n   * @default 'fields'\n   */\n  responseStyle?: ResponseStyle;\n  /**\n   * Throw an error instead of returning it in the response?\n   *\n   * @default false\n   */\n  throwOnError?: T['throwOnError'];\n}\n\nexport interface RequestOptions<\n  TData = unknown,\n  TResponseStyle extends ResponseStyle = 'fields',\n  ThrowOnError extends boolean = boolean,\n  Url extends string = string,\n>\n  extends\n    Config<{\n      responseStyle: TResponseStyle;\n      throwOnError: ThrowOnError;\n    }>,\n    Pick<\n      ServerSentEventsOptions<TData>,\n      | 'onRequest'\n      | 'onSseError'\n      | 'onSseEvent'\n      | 'sseDefaultRetryDelay'\n      | 'sseMaxRetryAttempts'\n      | 'sseMaxRetryDelay'\n    > {\n  /**\n   * Any body that you want to add to your request.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/fetch#body}\n   */\n  body?: unknown;\n  path?: Record<string, unknown>;\n  query?: Record<string, unknown>;\n  /**\n   * Security mechanism(s) to use for the request.\n   */\n  security?: ReadonlyArray<Auth>;\n  url: Url;\n}\n\nexport interface ResolvedRequestOptions<\n  TResponseStyle extends ResponseStyle = 'fields',\n  ThrowOnError extends boolean = boolean,\n  Url extends string = string,\n> extends RequestOptions<unknown, TResponseStyle, ThrowOnError, Url> {\n  serializedBody?: string;\n}\n\nexport type RequestResult<\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = boolean,\n  TResponseStyle extends ResponseStyle = 'fields',\n> = ThrowOnError extends true\n  ? Promise<\n      TResponseStyle extends 'data'\n        ? TData extends Record<string, unknown>\n          ? TData[keyof TData]\n          : TData\n        : {\n            data: TData extends Record<string, unknown> ? TData[keyof TData] : TData;\n            request: Request;\n            response: Response;\n          }\n    >\n  : Promise<\n      TResponseStyle extends 'data'\n        ? (TData extends Record<string, unknown> ? TData[keyof TData] : TData) | undefined\n        : (\n            | {\n                data: TData extends Record<string, unknown> ? TData[keyof TData] : TData;\n                error: undefined;\n              }\n            | {\n                data: undefined;\n                error: TError extends Record<string, unknown> ? TError[keyof TError] : TError;\n              }\n          ) & {\n            request: Request;\n            response: Response;\n          }\n    >;\n\nexport interface ClientOptions {\n  baseUrl?: string;\n  responseStyle?: ResponseStyle;\n  throwOnError?: boolean;\n}\n\ntype MethodFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'>,\n) => RequestResult<TData, TError, ThrowOnError, TResponseStyle>;\n\ntype SseFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'>,\n) => Promise<ServerSentEventsResult<TData, TError>>;\n\ntype RequestFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'> &\n    Pick<Required<RequestOptions<TData, TResponseStyle, ThrowOnError>>, 'method'>,\n) => RequestResult<TData, TError, ThrowOnError, TResponseStyle>;\n\ntype BuildUrlFn = <\n  TData extends {\n    body?: unknown;\n    path?: Record<string, unknown>;\n    query?: Record<string, unknown>;\n    url: string;\n  },\n>(\n  options: TData & Options<TData>,\n) => string;\n\nexport type Client = CoreClient<RequestFn, Config, MethodFn, BuildUrlFn, SseFn> & {\n  interceptors: Middleware<Request, Response, unknown, ResolvedRequestOptions>;\n};\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 = ClientOptions> = (\n  override?: Config<ClientOptions & T>,\n) => Config<Required<ClientOptions> & T>;\n\nexport interface TDataShape {\n  body?: unknown;\n  headers?: unknown;\n  path?: unknown;\n  query?: unknown;\n  url: string;\n}\n\ntype OmitKeys<T, K> = Pick<T, Exclude<keyof T, K>>;\n\nexport type Options<\n  TData extends TDataShape = TDataShape,\n  ThrowOnError extends boolean = boolean,\n  TResponse = unknown,\n  TResponseStyle extends ResponseStyle = 'fields',\n> = OmitKeys<\n  RequestOptions<TResponse, TResponseStyle, ThrowOnError>,\n  'body' | 'path' | 'query' | 'url'\n> &\n  ([TData] extends [never] ? unknown : Omit<TData, 'url'>);\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/servers-host/client/utils.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/servers-host/client.gen.ts",
    "content": "// 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>());\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/servers-host/core/auth.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/servers-host/core/bodySerializer.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/servers-host/core/params.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/servers-host/core/pathSerializer.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/servers-host/core/queryKeySerializer.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\n/**\n * JSON-friendly union that mirrors what Pinia Colada can hash.\n */\nexport type JsonValue =\n  | null\n  | string\n  | number\n  | boolean\n  | JsonValue[]\n  | { [key: string]: JsonValue };\n\n/**\n * Replacer that converts non-JSON values (bigint, Date, etc.) to safe substitutes.\n */\nexport const queryKeyJsonReplacer = (_key: string, value: unknown) => {\n  if (value === undefined || typeof value === 'function' || typeof value === 'symbol') {\n    return undefined;\n  }\n  if (typeof value === 'bigint') {\n    return value.toString();\n  }\n  if (value instanceof Date) {\n    return value.toISOString();\n  }\n  return value;\n};\n\n/**\n * Safely stringifies a value and parses it back into a JsonValue.\n */\nexport const stringifyToJsonValue = (input: unknown): JsonValue | undefined => {\n  try {\n    const json = JSON.stringify(input, queryKeyJsonReplacer);\n    if (json === undefined) {\n      return undefined;\n    }\n    return JSON.parse(json) as JsonValue;\n  } catch {\n    return undefined;\n  }\n};\n\n/**\n * Detects plain objects (including objects with a null prototype).\n */\nconst isPlainObject = (value: unknown): value is Record<string, unknown> => {\n  if (value === null || typeof value !== 'object') {\n    return false;\n  }\n  const prototype = Object.getPrototypeOf(value as object);\n  return prototype === Object.prototype || prototype === null;\n};\n\n/**\n * Turns URLSearchParams into a sorted JSON object for deterministic keys.\n */\nconst serializeSearchParams = (params: URLSearchParams): JsonValue => {\n  const entries = Array.from(params.entries()).sort(([a], [b]) => a.localeCompare(b));\n  const result: Record<string, JsonValue> = {};\n\n  for (const [key, value] of entries) {\n    const existing = result[key];\n    if (existing === undefined) {\n      result[key] = value;\n      continue;\n    }\n\n    if (Array.isArray(existing)) {\n      (existing as string[]).push(value);\n    } else {\n      result[key] = [existing, value];\n    }\n  }\n\n  return result;\n};\n\n/**\n * Normalizes any accepted value into a JSON-friendly shape for query keys.\n */\nexport const serializeQueryKeyValue = (value: unknown): JsonValue | undefined => {\n  if (value === null) {\n    return null;\n  }\n\n  if (typeof value === 'string' || typeof value === 'number' || typeof value === 'boolean') {\n    return value;\n  }\n\n  if (value === undefined || typeof value === 'function' || typeof value === 'symbol') {\n    return undefined;\n  }\n\n  if (typeof value === 'bigint') {\n    return value.toString();\n  }\n\n  if (value instanceof Date) {\n    return value.toISOString();\n  }\n\n  if (Array.isArray(value)) {\n    return stringifyToJsonValue(value);\n  }\n\n  if (typeof URLSearchParams !== 'undefined' && value instanceof URLSearchParams) {\n    return serializeSearchParams(value);\n  }\n\n  if (isPlainObject(value)) {\n    return stringifyToJsonValue(value);\n  }\n\n  return undefined;\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/servers-host/core/serverSentEvents.gen.ts",
    "content": "// 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 const 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            // Normalize line endings: CRLF -> LF, then CR -> LF\n            buffer = buffer.replace(/\\r\\n/g, '\\n').replace(/\\r/g, '\\n');\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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/servers-host/core/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { Auth, AuthToken } from './auth.gen';\nimport type { BodySerializer, QuerySerializer, QuerySerializerOptions } from './bodySerializer.gen';\n\nexport type HttpMethod =\n  | 'connect'\n  | 'delete'\n  | 'get'\n  | 'head'\n  | 'options'\n  | 'patch'\n  | 'post'\n  | 'put'\n  | 'trace';\n\nexport type Client<\n  RequestFn = never,\n  Config = unknown,\n  MethodFn = never,\n  BuildUrlFn = never,\n  SseFn = never,\n> = {\n  /**\n   * Returns the final request URL.\n   */\n  buildUrl: BuildUrlFn;\n  getConfig: () => Config;\n  request: RequestFn;\n  setConfig: (config: Config) => Config;\n} & {\n  [K in HttpMethod]: MethodFn;\n} & ([SseFn] extends [never] ? { sse?: never } : { sse: { [K in HttpMethod]: SseFn } });\n\nexport interface Config {\n  /**\n   * Auth token or a function returning auth token. The resolved value will be\n   * added to the request payload as defined by its `security` array.\n   */\n  auth?: ((auth: Auth) => Promise<AuthToken> | AuthToken) | AuthToken;\n  /**\n   * A function for serializing request body parameter. By default,\n   * {@link JSON.stringify()} will be used.\n   */\n  bodySerializer?: BodySerializer | null;\n  /**\n   * An object containing any HTTP headers that you want to pre-populate your\n   * `Headers` object with.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/Headers/Headers#init See more}\n   */\n  headers?:\n    | RequestInit['headers']\n    | Record<\n        string,\n        string | number | boolean | (string | number | boolean)[] | null | undefined | unknown\n      >;\n  /**\n   * The request method.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/fetch#method See more}\n   */\n  method?: Uppercase<HttpMethod>;\n  /**\n   * A function for serializing request query parameters. By default, arrays\n   * will be exploded in form style, objects will be exploded in deepObject\n   * style, and reserved characters are percent-encoded.\n   *\n   * This method will have no effect if the native `paramsSerializer()` Axios\n   * API function is used.\n   *\n   * {@link https://swagger.io/docs/specification/serialization/#query View examples}\n   */\n  querySerializer?: QuerySerializer | QuerySerializerOptions;\n  /**\n   * A function validating request data. This is useful if you want to ensure\n   * the request conforms to the desired shape, so it can be safely sent to\n   * the server.\n   */\n  requestValidator?: (data: unknown) => Promise<unknown>;\n  /**\n   * A function transforming response data before it's returned. This is useful\n   * for post-processing data, e.g. converting ISO strings into Date objects.\n   */\n  responseTransformer?: (data: unknown) => Promise<unknown>;\n  /**\n   * A function validating response data. This is useful if you want to ensure\n   * the response conforms to the desired shape, so it can be safely passed to\n   * the transformers and returned to the user.\n   */\n  responseValidator?: (data: unknown) => Promise<unknown>;\n}\n\ntype IsExactlyNeverOrNeverUndefined<T> = [T] extends [never]\n  ? true\n  : [T] extends [never | undefined]\n    ? [undefined] extends [T]\n      ? false\n      : true\n    : false;\n\nexport type OmitNever<T extends Record<string, unknown>> = {\n  [K in keyof T as IsExactlyNeverOrNeverUndefined<T[K]> extends true ? never : K]: T[K];\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/servers-host/core/utils.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/servers-host/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type { ClientOptions, GetFooData, GetFooResponse, GetFooResponses } from './types.gen';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/servers-host/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type ClientOptions = {\n    baseUrl: `${string}://foo.com` | (string & {});\n};\n\nexport type GetFooData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/foo';\n};\n\nexport type GetFooResponses = {\n    /**\n     * OK\n     */\n    200: string;\n};\n\nexport type GetFooResponse = GetFooResponses[keyof GetFooResponses];\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/transforms-read-write/client/client.gen.ts",
    "content": "// 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 (options: RequestOptions) => {\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 url = buildUrl(opts);\n\n    return { opts, url };\n  };\n\n  const request: Client['request'] = async (options) => {\n    // @ts-expect-error\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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/transforms-read-write/client/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type { Auth } from '../core/auth.gen';\nexport type { QuerySerializerOptions } from '../core/bodySerializer.gen';\nexport {\n  formDataBodySerializer,\n  jsonBodySerializer,\n  urlSearchParamsBodySerializer,\n} from '../core/bodySerializer.gen';\nexport { buildClientParams } from '../core/params.gen';\nexport { serializeQueryKeyValue } from '../core/queryKeySerializer.gen';\nexport { createClient } from './client.gen';\nexport type {\n  Client,\n  ClientOptions,\n  Config,\n  CreateClientConfig,\n  Options,\n  RequestOptions,\n  RequestResult,\n  ResolvedRequestOptions,\n  ResponseStyle,\n  TDataShape,\n} from './types.gen';\nexport { createConfig, mergeHeaders } from './utils.gen';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/transforms-read-write/client/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { Auth } from '../core/auth.gen';\nimport type {\n  ServerSentEventsOptions,\n  ServerSentEventsResult,\n} from '../core/serverSentEvents.gen';\nimport type { Client as CoreClient, Config as CoreConfig } from '../core/types.gen';\nimport type { Middleware } from './utils.gen';\n\nexport type ResponseStyle = 'data' | 'fields';\n\nexport interface Config<T extends ClientOptions = ClientOptions>\n  extends Omit<RequestInit, 'body' | 'headers' | 'method'>, CoreConfig {\n  /**\n   * Base URL for all requests made by this client.\n   */\n  baseUrl?: T['baseUrl'];\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   * Please don't use the Fetch client for Next.js applications. The `next`\n   * options won't have any effect.\n   *\n   * Install {@link https://www.npmjs.com/package/@hey-api/client-next `@hey-api/client-next`} instead.\n   */\n  next?: never;\n  /**\n   * Return the response data parsed in a specified format. By default, `auto`\n   * will infer the appropriate method from the `Content-Type` response header.\n   * You can override this behavior with any of the {@link Body} methods.\n   * Select `stream` if you don't want to parse response data at all.\n   *\n   * @default 'auto'\n   */\n  parseAs?: 'arrayBuffer' | 'auto' | 'blob' | 'formData' | 'json' | 'stream' | 'text';\n  /**\n   * Should we return only data or multiple fields (data, error, response, etc.)?\n   *\n   * @default 'fields'\n   */\n  responseStyle?: ResponseStyle;\n  /**\n   * Throw an error instead of returning it in the response?\n   *\n   * @default false\n   */\n  throwOnError?: T['throwOnError'];\n}\n\nexport interface RequestOptions<\n  TData = unknown,\n  TResponseStyle extends ResponseStyle = 'fields',\n  ThrowOnError extends boolean = boolean,\n  Url extends string = string,\n>\n  extends\n    Config<{\n      responseStyle: TResponseStyle;\n      throwOnError: ThrowOnError;\n    }>,\n    Pick<\n      ServerSentEventsOptions<TData>,\n      | 'onRequest'\n      | 'onSseError'\n      | 'onSseEvent'\n      | 'sseDefaultRetryDelay'\n      | 'sseMaxRetryAttempts'\n      | 'sseMaxRetryDelay'\n    > {\n  /**\n   * Any body that you want to add to your request.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/fetch#body}\n   */\n  body?: unknown;\n  path?: Record<string, unknown>;\n  query?: Record<string, unknown>;\n  /**\n   * Security mechanism(s) to use for the request.\n   */\n  security?: ReadonlyArray<Auth>;\n  url: Url;\n}\n\nexport interface ResolvedRequestOptions<\n  TResponseStyle extends ResponseStyle = 'fields',\n  ThrowOnError extends boolean = boolean,\n  Url extends string = string,\n> extends RequestOptions<unknown, TResponseStyle, ThrowOnError, Url> {\n  serializedBody?: string;\n}\n\nexport type RequestResult<\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = boolean,\n  TResponseStyle extends ResponseStyle = 'fields',\n> = ThrowOnError extends true\n  ? Promise<\n      TResponseStyle extends 'data'\n        ? TData extends Record<string, unknown>\n          ? TData[keyof TData]\n          : TData\n        : {\n            data: TData extends Record<string, unknown> ? TData[keyof TData] : TData;\n            request: Request;\n            response: Response;\n          }\n    >\n  : Promise<\n      TResponseStyle extends 'data'\n        ? (TData extends Record<string, unknown> ? TData[keyof TData] : TData) | undefined\n        : (\n            | {\n                data: TData extends Record<string, unknown> ? TData[keyof TData] : TData;\n                error: undefined;\n              }\n            | {\n                data: undefined;\n                error: TError extends Record<string, unknown> ? TError[keyof TError] : TError;\n              }\n          ) & {\n            request: Request;\n            response: Response;\n          }\n    >;\n\nexport interface ClientOptions {\n  baseUrl?: string;\n  responseStyle?: ResponseStyle;\n  throwOnError?: boolean;\n}\n\ntype MethodFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'>,\n) => RequestResult<TData, TError, ThrowOnError, TResponseStyle>;\n\ntype SseFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'>,\n) => Promise<ServerSentEventsResult<TData, TError>>;\n\ntype RequestFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'> &\n    Pick<Required<RequestOptions<TData, TResponseStyle, ThrowOnError>>, 'method'>,\n) => RequestResult<TData, TError, ThrowOnError, TResponseStyle>;\n\ntype BuildUrlFn = <\n  TData extends {\n    body?: unknown;\n    path?: Record<string, unknown>;\n    query?: Record<string, unknown>;\n    url: string;\n  },\n>(\n  options: TData & Options<TData>,\n) => string;\n\nexport type Client = CoreClient<RequestFn, Config, MethodFn, BuildUrlFn, SseFn> & {\n  interceptors: Middleware<Request, Response, unknown, ResolvedRequestOptions>;\n};\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 = ClientOptions> = (\n  override?: Config<ClientOptions & T>,\n) => Config<Required<ClientOptions> & T>;\n\nexport interface TDataShape {\n  body?: unknown;\n  headers?: unknown;\n  path?: unknown;\n  query?: unknown;\n  url: string;\n}\n\ntype OmitKeys<T, K> = Pick<T, Exclude<keyof T, K>>;\n\nexport type Options<\n  TData extends TDataShape = TDataShape,\n  ThrowOnError extends boolean = boolean,\n  TResponse = unknown,\n  TResponseStyle extends ResponseStyle = 'fields',\n> = OmitKeys<\n  RequestOptions<TResponse, TResponseStyle, ThrowOnError>,\n  'body' | 'path' | 'query' | 'url'\n> &\n  ([TData] extends [never] ? unknown : Omit<TData, 'url'>);\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/transforms-read-write/client/utils.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/transforms-read-write/client.gen.ts",
    "content": "// 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>());\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/transforms-read-write/core/auth.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/transforms-read-write/core/bodySerializer.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/transforms-read-write/core/params.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/transforms-read-write/core/pathSerializer.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/transforms-read-write/core/queryKeySerializer.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\n/**\n * JSON-friendly union that mirrors what Pinia Colada can hash.\n */\nexport type JsonValue =\n  | null\n  | string\n  | number\n  | boolean\n  | JsonValue[]\n  | { [key: string]: JsonValue };\n\n/**\n * Replacer that converts non-JSON values (bigint, Date, etc.) to safe substitutes.\n */\nexport const queryKeyJsonReplacer = (_key: string, value: unknown) => {\n  if (value === undefined || typeof value === 'function' || typeof value === 'symbol') {\n    return undefined;\n  }\n  if (typeof value === 'bigint') {\n    return value.toString();\n  }\n  if (value instanceof Date) {\n    return value.toISOString();\n  }\n  return value;\n};\n\n/**\n * Safely stringifies a value and parses it back into a JsonValue.\n */\nexport const stringifyToJsonValue = (input: unknown): JsonValue | undefined => {\n  try {\n    const json = JSON.stringify(input, queryKeyJsonReplacer);\n    if (json === undefined) {\n      return undefined;\n    }\n    return JSON.parse(json) as JsonValue;\n  } catch {\n    return undefined;\n  }\n};\n\n/**\n * Detects plain objects (including objects with a null prototype).\n */\nconst isPlainObject = (value: unknown): value is Record<string, unknown> => {\n  if (value === null || typeof value !== 'object') {\n    return false;\n  }\n  const prototype = Object.getPrototypeOf(value as object);\n  return prototype === Object.prototype || prototype === null;\n};\n\n/**\n * Turns URLSearchParams into a sorted JSON object for deterministic keys.\n */\nconst serializeSearchParams = (params: URLSearchParams): JsonValue => {\n  const entries = Array.from(params.entries()).sort(([a], [b]) => a.localeCompare(b));\n  const result: Record<string, JsonValue> = {};\n\n  for (const [key, value] of entries) {\n    const existing = result[key];\n    if (existing === undefined) {\n      result[key] = value;\n      continue;\n    }\n\n    if (Array.isArray(existing)) {\n      (existing as string[]).push(value);\n    } else {\n      result[key] = [existing, value];\n    }\n  }\n\n  return result;\n};\n\n/**\n * Normalizes any accepted value into a JSON-friendly shape for query keys.\n */\nexport const serializeQueryKeyValue = (value: unknown): JsonValue | undefined => {\n  if (value === null) {\n    return null;\n  }\n\n  if (typeof value === 'string' || typeof value === 'number' || typeof value === 'boolean') {\n    return value;\n  }\n\n  if (value === undefined || typeof value === 'function' || typeof value === 'symbol') {\n    return undefined;\n  }\n\n  if (typeof value === 'bigint') {\n    return value.toString();\n  }\n\n  if (value instanceof Date) {\n    return value.toISOString();\n  }\n\n  if (Array.isArray(value)) {\n    return stringifyToJsonValue(value);\n  }\n\n  if (typeof URLSearchParams !== 'undefined' && value instanceof URLSearchParams) {\n    return serializeSearchParams(value);\n  }\n\n  if (isPlainObject(value)) {\n    return stringifyToJsonValue(value);\n  }\n\n  return undefined;\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/transforms-read-write/core/serverSentEvents.gen.ts",
    "content": "// 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 const 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            // Normalize line endings: CRLF -> LF, then CR -> LF\n            buffer = buffer.replace(/\\r\\n/g, '\\n').replace(/\\r/g, '\\n');\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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/transforms-read-write/core/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { Auth, AuthToken } from './auth.gen';\nimport type { BodySerializer, QuerySerializer, QuerySerializerOptions } from './bodySerializer.gen';\n\nexport type HttpMethod =\n  | 'connect'\n  | 'delete'\n  | 'get'\n  | 'head'\n  | 'options'\n  | 'patch'\n  | 'post'\n  | 'put'\n  | 'trace';\n\nexport type Client<\n  RequestFn = never,\n  Config = unknown,\n  MethodFn = never,\n  BuildUrlFn = never,\n  SseFn = never,\n> = {\n  /**\n   * Returns the final request URL.\n   */\n  buildUrl: BuildUrlFn;\n  getConfig: () => Config;\n  request: RequestFn;\n  setConfig: (config: Config) => Config;\n} & {\n  [K in HttpMethod]: MethodFn;\n} & ([SseFn] extends [never] ? { sse?: never } : { sse: { [K in HttpMethod]: SseFn } });\n\nexport interface Config {\n  /**\n   * Auth token or a function returning auth token. The resolved value will be\n   * added to the request payload as defined by its `security` array.\n   */\n  auth?: ((auth: Auth) => Promise<AuthToken> | AuthToken) | AuthToken;\n  /**\n   * A function for serializing request body parameter. By default,\n   * {@link JSON.stringify()} will be used.\n   */\n  bodySerializer?: BodySerializer | null;\n  /**\n   * An object containing any HTTP headers that you want to pre-populate your\n   * `Headers` object with.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/Headers/Headers#init See more}\n   */\n  headers?:\n    | RequestInit['headers']\n    | Record<\n        string,\n        string | number | boolean | (string | number | boolean)[] | null | undefined | unknown\n      >;\n  /**\n   * The request method.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/fetch#method See more}\n   */\n  method?: Uppercase<HttpMethod>;\n  /**\n   * A function for serializing request query parameters. By default, arrays\n   * will be exploded in form style, objects will be exploded in deepObject\n   * style, and reserved characters are percent-encoded.\n   *\n   * This method will have no effect if the native `paramsSerializer()` Axios\n   * API function is used.\n   *\n   * {@link https://swagger.io/docs/specification/serialization/#query View examples}\n   */\n  querySerializer?: QuerySerializer | QuerySerializerOptions;\n  /**\n   * A function validating request data. This is useful if you want to ensure\n   * the request conforms to the desired shape, so it can be safely sent to\n   * the server.\n   */\n  requestValidator?: (data: unknown) => Promise<unknown>;\n  /**\n   * A function transforming response data before it's returned. This is useful\n   * for post-processing data, e.g. converting ISO strings into Date objects.\n   */\n  responseTransformer?: (data: unknown) => Promise<unknown>;\n  /**\n   * A function validating response data. This is useful if you want to ensure\n   * the response conforms to the desired shape, so it can be safely passed to\n   * the transformers and returned to the user.\n   */\n  responseValidator?: (data: unknown) => Promise<unknown>;\n}\n\ntype IsExactlyNeverOrNeverUndefined<T> = [T] extends [never]\n  ? true\n  : [T] extends [never | undefined]\n    ? [undefined] extends [T]\n      ? false\n      : true\n    : false;\n\nexport type OmitNever<T extends Record<string, unknown>> = {\n  [K in keyof T as IsExactlyNeverOrNeverUndefined<T[K]> extends true ? never : K]: T[K];\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/transforms-read-write/core/utils.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/transforms-read-write/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type { BarRead, BarReadWritable, Baz, ClientOptions, Corge, CorgeWritable, FooRead, FooReadWritable, PostFooReadData, PostFooReadResponse, PostFooReadResponses, Quux, QuuxWritable, QuxAllRead } from './types.gen';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/transforms-read-write/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type ClientOptions = {\n    baseUrl: string;\n};\n\nexport type FooRead = BarRead & {\n    readonly foo?: string;\n};\n\nexport type BarRead = Baz & {\n    readonly bar?: string;\n};\n\nexport type Baz = {\n    baz?: string;\n};\n\nexport type QuxAllRead = {\n    readonly baz?: string;\n};\n\nexport type Quux = {\n    baz?: Array<Baz>;\n    qux?: QuxAllRead;\n};\n\nexport type Corge = {\n    foo?: string;\n    bar?: {\n        readonly baz?: boolean;\n    };\n};\n\nexport type FooReadWritable = BarReadWritable;\n\nexport type BarReadWritable = Baz;\n\nexport type QuuxWritable = {\n    baz?: Array<Baz>;\n};\n\nexport type CorgeWritable = {\n    foo?: string;\n};\n\nexport type PostFooReadData = {\n    body: FooReadWritable;\n    path?: never;\n    query?: never;\n    url: '/foo-read';\n};\n\nexport type PostFooReadResponses = {\n    /**\n     * OK\n     */\n    200: FooRead;\n};\n\nexport type PostFooReadResponse = PostFooReadResponses[keyof PostFooReadResponses];\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/transforms-schemas-name/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type { ClientOptions, Comment, GetUsersData, GetUsersResponse, GetUsersResponses, Post, PostPostsData, PostPostsResponse, PostPostsResponses, User, UserProfile } from './types.gen';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/transforms-schemas-name/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type ClientOptions = {\n    baseUrl: string;\n};\n\nexport type User = {\n    id?: string;\n    name?: string;\n    profile?: UserProfile;\n};\n\nexport type UserProfile = {\n    bio?: string;\n    avatar?: string;\n};\n\nexport type Post = {\n    id?: string;\n    title?: string;\n    author?: User;\n    comments?: Array<Comment>;\n};\n\nexport type Comment = {\n    id?: string;\n    text?: string;\n    author?: User;\n};\n\nexport type GetUsersData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/users';\n};\n\nexport type GetUsersResponses = {\n    /**\n     * Success\n     */\n    200: User;\n};\n\nexport type GetUsersResponse = GetUsersResponses[keyof GetUsersResponses];\n\nexport type PostPostsData = {\n    body?: Post;\n    path?: never;\n    query?: never;\n    url: '/posts';\n};\n\nexport type PostPostsResponses = {\n    /**\n     * Created\n     */\n    201: Post;\n};\n\nexport type PostPostsResponse = PostPostsResponses[keyof PostPostsResponses];\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/additional-properties-false/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type { Bar, Baz, ClientOptions, Foo } from './types.gen';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/additional-properties-false/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type ClientOptions = {\n    baseUrl: `${string}://${string}` | (string & {});\n};\n\nexport type Foo = {\n    foo: string;\n};\n\nexport type Bar = Foo & {};\n\nexport type Baz = Foo & {\n    bar: string;\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/additional-properties-true/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type { Bar, Baz, ClientOptions, Foo, Qux } from './types.gen';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/additional-properties-true/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type ClientOptions = {\n    baseUrl: `${string}://${string}` | (string & {});\n};\n\nexport type Foo = {\n    foo: string;\n    [key: string]: unknown;\n};\n\nexport type Bar = Foo & {\n    [key: string]: unknown;\n};\n\nexport type Baz = Foo & {\n    bar: string;\n    [key: string]: unknown;\n};\n\nexport type Qux = {\n    [key: string]: unknown;\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/additional-properties-undefined/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type { ClientOptions, Foo } from './types.gen';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/additional-properties-undefined/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type ClientOptions = {\n    baseUrl: `${string}://${string}` | (string & {});\n};\n\nexport type Foo = {\n    foo: {\n        [key: string]: unknown;\n    };\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/array-items-one-of-length-1/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type { Bar, ClientOptions, Foo } from './types.gen';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/array-items-one-of-length-1/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type ClientOptions = {\n    baseUrl: `${string}://${string}` | (string & {});\n};\n\nexport type Foo = {\n    foo?: Array<Bar>;\n};\n\nexport type Bar = string;\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/array-nested-one-of/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type { ClientOptions, Foo } from './types.gen';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/array-nested-one-of/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type ClientOptions = {\n    baseUrl: `${string}://${string}` | (string & {});\n};\n\nexport type Foo = Array<{\n    foo?: string;\n    bar?: string;\n} | {\n    baz?: string;\n    qux?: string;\n}> | Array<{\n    foo?: string;\n    bar?: string;\n}>;\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/body-binary-format/client/client.gen.ts",
    "content": "// 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 (options: RequestOptions) => {\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 url = buildUrl(opts);\n\n    return { opts, url };\n  };\n\n  const request: Client['request'] = async (options) => {\n    // @ts-expect-error\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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/body-binary-format/client/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type { Auth } from '../core/auth.gen';\nexport type { QuerySerializerOptions } from '../core/bodySerializer.gen';\nexport {\n  formDataBodySerializer,\n  jsonBodySerializer,\n  urlSearchParamsBodySerializer,\n} from '../core/bodySerializer.gen';\nexport { buildClientParams } from '../core/params.gen';\nexport { serializeQueryKeyValue } from '../core/queryKeySerializer.gen';\nexport { createClient } from './client.gen';\nexport type {\n  Client,\n  ClientOptions,\n  Config,\n  CreateClientConfig,\n  Options,\n  RequestOptions,\n  RequestResult,\n  ResolvedRequestOptions,\n  ResponseStyle,\n  TDataShape,\n} from './types.gen';\nexport { createConfig, mergeHeaders } from './utils.gen';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/body-binary-format/client/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { Auth } from '../core/auth.gen';\nimport type {\n  ServerSentEventsOptions,\n  ServerSentEventsResult,\n} from '../core/serverSentEvents.gen';\nimport type { Client as CoreClient, Config as CoreConfig } from '../core/types.gen';\nimport type { Middleware } from './utils.gen';\n\nexport type ResponseStyle = 'data' | 'fields';\n\nexport interface Config<T extends ClientOptions = ClientOptions>\n  extends Omit<RequestInit, 'body' | 'headers' | 'method'>, CoreConfig {\n  /**\n   * Base URL for all requests made by this client.\n   */\n  baseUrl?: T['baseUrl'];\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   * Please don't use the Fetch client for Next.js applications. The `next`\n   * options won't have any effect.\n   *\n   * Install {@link https://www.npmjs.com/package/@hey-api/client-next `@hey-api/client-next`} instead.\n   */\n  next?: never;\n  /**\n   * Return the response data parsed in a specified format. By default, `auto`\n   * will infer the appropriate method from the `Content-Type` response header.\n   * You can override this behavior with any of the {@link Body} methods.\n   * Select `stream` if you don't want to parse response data at all.\n   *\n   * @default 'auto'\n   */\n  parseAs?: 'arrayBuffer' | 'auto' | 'blob' | 'formData' | 'json' | 'stream' | 'text';\n  /**\n   * Should we return only data or multiple fields (data, error, response, etc.)?\n   *\n   * @default 'fields'\n   */\n  responseStyle?: ResponseStyle;\n  /**\n   * Throw an error instead of returning it in the response?\n   *\n   * @default false\n   */\n  throwOnError?: T['throwOnError'];\n}\n\nexport interface RequestOptions<\n  TData = unknown,\n  TResponseStyle extends ResponseStyle = 'fields',\n  ThrowOnError extends boolean = boolean,\n  Url extends string = string,\n>\n  extends\n    Config<{\n      responseStyle: TResponseStyle;\n      throwOnError: ThrowOnError;\n    }>,\n    Pick<\n      ServerSentEventsOptions<TData>,\n      | 'onRequest'\n      | 'onSseError'\n      | 'onSseEvent'\n      | 'sseDefaultRetryDelay'\n      | 'sseMaxRetryAttempts'\n      | 'sseMaxRetryDelay'\n    > {\n  /**\n   * Any body that you want to add to your request.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/fetch#body}\n   */\n  body?: unknown;\n  path?: Record<string, unknown>;\n  query?: Record<string, unknown>;\n  /**\n   * Security mechanism(s) to use for the request.\n   */\n  security?: ReadonlyArray<Auth>;\n  url: Url;\n}\n\nexport interface ResolvedRequestOptions<\n  TResponseStyle extends ResponseStyle = 'fields',\n  ThrowOnError extends boolean = boolean,\n  Url extends string = string,\n> extends RequestOptions<unknown, TResponseStyle, ThrowOnError, Url> {\n  serializedBody?: string;\n}\n\nexport type RequestResult<\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = boolean,\n  TResponseStyle extends ResponseStyle = 'fields',\n> = ThrowOnError extends true\n  ? Promise<\n      TResponseStyle extends 'data'\n        ? TData extends Record<string, unknown>\n          ? TData[keyof TData]\n          : TData\n        : {\n            data: TData extends Record<string, unknown> ? TData[keyof TData] : TData;\n            request: Request;\n            response: Response;\n          }\n    >\n  : Promise<\n      TResponseStyle extends 'data'\n        ? (TData extends Record<string, unknown> ? TData[keyof TData] : TData) | undefined\n        : (\n            | {\n                data: TData extends Record<string, unknown> ? TData[keyof TData] : TData;\n                error: undefined;\n              }\n            | {\n                data: undefined;\n                error: TError extends Record<string, unknown> ? TError[keyof TError] : TError;\n              }\n          ) & {\n            request: Request;\n            response: Response;\n          }\n    >;\n\nexport interface ClientOptions {\n  baseUrl?: string;\n  responseStyle?: ResponseStyle;\n  throwOnError?: boolean;\n}\n\ntype MethodFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'>,\n) => RequestResult<TData, TError, ThrowOnError, TResponseStyle>;\n\ntype SseFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'>,\n) => Promise<ServerSentEventsResult<TData, TError>>;\n\ntype RequestFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'> &\n    Pick<Required<RequestOptions<TData, TResponseStyle, ThrowOnError>>, 'method'>,\n) => RequestResult<TData, TError, ThrowOnError, TResponseStyle>;\n\ntype BuildUrlFn = <\n  TData extends {\n    body?: unknown;\n    path?: Record<string, unknown>;\n    query?: Record<string, unknown>;\n    url: string;\n  },\n>(\n  options: TData & Options<TData>,\n) => string;\n\nexport type Client = CoreClient<RequestFn, Config, MethodFn, BuildUrlFn, SseFn> & {\n  interceptors: Middleware<Request, Response, unknown, ResolvedRequestOptions>;\n};\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 = ClientOptions> = (\n  override?: Config<ClientOptions & T>,\n) => Config<Required<ClientOptions> & T>;\n\nexport interface TDataShape {\n  body?: unknown;\n  headers?: unknown;\n  path?: unknown;\n  query?: unknown;\n  url: string;\n}\n\ntype OmitKeys<T, K> = Pick<T, Exclude<keyof T, K>>;\n\nexport type Options<\n  TData extends TDataShape = TDataShape,\n  ThrowOnError extends boolean = boolean,\n  TResponse = unknown,\n  TResponseStyle extends ResponseStyle = 'fields',\n> = OmitKeys<\n  RequestOptions<TResponse, TResponseStyle, ThrowOnError>,\n  'body' | 'path' | 'query' | 'url'\n> &\n  ([TData] extends [never] ? unknown : Omit<TData, 'url'>);\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/body-binary-format/client/utils.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/body-binary-format/client.gen.ts",
    "content": "// 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>());\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/body-binary-format/core/auth.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/body-binary-format/core/bodySerializer.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/body-binary-format/core/params.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/body-binary-format/core/pathSerializer.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/body-binary-format/core/queryKeySerializer.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\n/**\n * JSON-friendly union that mirrors what Pinia Colada can hash.\n */\nexport type JsonValue =\n  | null\n  | string\n  | number\n  | boolean\n  | JsonValue[]\n  | { [key: string]: JsonValue };\n\n/**\n * Replacer that converts non-JSON values (bigint, Date, etc.) to safe substitutes.\n */\nexport const queryKeyJsonReplacer = (_key: string, value: unknown) => {\n  if (value === undefined || typeof value === 'function' || typeof value === 'symbol') {\n    return undefined;\n  }\n  if (typeof value === 'bigint') {\n    return value.toString();\n  }\n  if (value instanceof Date) {\n    return value.toISOString();\n  }\n  return value;\n};\n\n/**\n * Safely stringifies a value and parses it back into a JsonValue.\n */\nexport const stringifyToJsonValue = (input: unknown): JsonValue | undefined => {\n  try {\n    const json = JSON.stringify(input, queryKeyJsonReplacer);\n    if (json === undefined) {\n      return undefined;\n    }\n    return JSON.parse(json) as JsonValue;\n  } catch {\n    return undefined;\n  }\n};\n\n/**\n * Detects plain objects (including objects with a null prototype).\n */\nconst isPlainObject = (value: unknown): value is Record<string, unknown> => {\n  if (value === null || typeof value !== 'object') {\n    return false;\n  }\n  const prototype = Object.getPrototypeOf(value as object);\n  return prototype === Object.prototype || prototype === null;\n};\n\n/**\n * Turns URLSearchParams into a sorted JSON object for deterministic keys.\n */\nconst serializeSearchParams = (params: URLSearchParams): JsonValue => {\n  const entries = Array.from(params.entries()).sort(([a], [b]) => a.localeCompare(b));\n  const result: Record<string, JsonValue> = {};\n\n  for (const [key, value] of entries) {\n    const existing = result[key];\n    if (existing === undefined) {\n      result[key] = value;\n      continue;\n    }\n\n    if (Array.isArray(existing)) {\n      (existing as string[]).push(value);\n    } else {\n      result[key] = [existing, value];\n    }\n  }\n\n  return result;\n};\n\n/**\n * Normalizes any accepted value into a JSON-friendly shape for query keys.\n */\nexport const serializeQueryKeyValue = (value: unknown): JsonValue | undefined => {\n  if (value === null) {\n    return null;\n  }\n\n  if (typeof value === 'string' || typeof value === 'number' || typeof value === 'boolean') {\n    return value;\n  }\n\n  if (value === undefined || typeof value === 'function' || typeof value === 'symbol') {\n    return undefined;\n  }\n\n  if (typeof value === 'bigint') {\n    return value.toString();\n  }\n\n  if (value instanceof Date) {\n    return value.toISOString();\n  }\n\n  if (Array.isArray(value)) {\n    return stringifyToJsonValue(value);\n  }\n\n  if (typeof URLSearchParams !== 'undefined' && value instanceof URLSearchParams) {\n    return serializeSearchParams(value);\n  }\n\n  if (isPlainObject(value)) {\n    return stringifyToJsonValue(value);\n  }\n\n  return undefined;\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/body-binary-format/core/serverSentEvents.gen.ts",
    "content": "// 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 const 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            // Normalize line endings: CRLF -> LF, then CR -> LF\n            buffer = buffer.replace(/\\r\\n/g, '\\n').replace(/\\r/g, '\\n');\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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/body-binary-format/core/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { Auth, AuthToken } from './auth.gen';\nimport type { BodySerializer, QuerySerializer, QuerySerializerOptions } from './bodySerializer.gen';\n\nexport type HttpMethod =\n  | 'connect'\n  | 'delete'\n  | 'get'\n  | 'head'\n  | 'options'\n  | 'patch'\n  | 'post'\n  | 'put'\n  | 'trace';\n\nexport type Client<\n  RequestFn = never,\n  Config = unknown,\n  MethodFn = never,\n  BuildUrlFn = never,\n  SseFn = never,\n> = {\n  /**\n   * Returns the final request URL.\n   */\n  buildUrl: BuildUrlFn;\n  getConfig: () => Config;\n  request: RequestFn;\n  setConfig: (config: Config) => Config;\n} & {\n  [K in HttpMethod]: MethodFn;\n} & ([SseFn] extends [never] ? { sse?: never } : { sse: { [K in HttpMethod]: SseFn } });\n\nexport interface Config {\n  /**\n   * Auth token or a function returning auth token. The resolved value will be\n   * added to the request payload as defined by its `security` array.\n   */\n  auth?: ((auth: Auth) => Promise<AuthToken> | AuthToken) | AuthToken;\n  /**\n   * A function for serializing request body parameter. By default,\n   * {@link JSON.stringify()} will be used.\n   */\n  bodySerializer?: BodySerializer | null;\n  /**\n   * An object containing any HTTP headers that you want to pre-populate your\n   * `Headers` object with.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/Headers/Headers#init See more}\n   */\n  headers?:\n    | RequestInit['headers']\n    | Record<\n        string,\n        string | number | boolean | (string | number | boolean)[] | null | undefined | unknown\n      >;\n  /**\n   * The request method.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/fetch#method See more}\n   */\n  method?: Uppercase<HttpMethod>;\n  /**\n   * A function for serializing request query parameters. By default, arrays\n   * will be exploded in form style, objects will be exploded in deepObject\n   * style, and reserved characters are percent-encoded.\n   *\n   * This method will have no effect if the native `paramsSerializer()` Axios\n   * API function is used.\n   *\n   * {@link https://swagger.io/docs/specification/serialization/#query View examples}\n   */\n  querySerializer?: QuerySerializer | QuerySerializerOptions;\n  /**\n   * A function validating request data. This is useful if you want to ensure\n   * the request conforms to the desired shape, so it can be safely sent to\n   * the server.\n   */\n  requestValidator?: (data: unknown) => Promise<unknown>;\n  /**\n   * A function transforming response data before it's returned. This is useful\n   * for post-processing data, e.g. converting ISO strings into Date objects.\n   */\n  responseTransformer?: (data: unknown) => Promise<unknown>;\n  /**\n   * A function validating response data. This is useful if you want to ensure\n   * the response conforms to the desired shape, so it can be safely passed to\n   * the transformers and returned to the user.\n   */\n  responseValidator?: (data: unknown) => Promise<unknown>;\n}\n\ntype IsExactlyNeverOrNeverUndefined<T> = [T] extends [never]\n  ? true\n  : [T] extends [never | undefined]\n    ? [undefined] extends [T]\n      ? false\n      : true\n    : false;\n\nexport type OmitNever<T extends Record<string, unknown>> = {\n  [K in keyof T as IsExactlyNeverOrNeverUndefined<T[K]> extends true ? never : K]: T[K];\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/body-binary-format/core/utils.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/body-binary-format/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport { type Options, uploadBinary, uploadPdf, uploadZip } from './sdk.gen';\nexport type { ClientOptions, UploadBinaryData, UploadBinaryResponse, UploadBinaryResponses, UploadPdfData, UploadPdfResponse, UploadPdfResponses, UploadZipData, UploadZipResponse, UploadZipResponses } from './types.gen';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/body-binary-format/sdk.gen.ts",
    "content": "// 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 { UploadBinaryData, UploadBinaryResponses, UploadPdfData, UploadPdfResponses, UploadZipData, UploadZipResponses } from './types.gen';\n\nexport type Options<TData extends TDataShape = TDataShape, ThrowOnError extends boolean = boolean> = Options2<TData, ThrowOnError> & {\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 * Upload a zip file\n */\nexport const uploadZip = <ThrowOnError extends boolean = false>(options: Options<UploadZipData, ThrowOnError>) => (options.client ?? client).post<UploadZipResponses, unknown, ThrowOnError>({\n    bodySerializer: null,\n    url: '/upload-zip',\n    ...options,\n    headers: {\n        'Content-Type': 'application/zip',\n        ...options.headers\n    }\n});\n\n/**\n * Upload a PDF file\n */\nexport const uploadPdf = <ThrowOnError extends boolean = false>(options: Options<UploadPdfData, ThrowOnError>) => (options.client ?? client).post<UploadPdfResponses, unknown, ThrowOnError>({\n    bodySerializer: null,\n    url: '/upload-pdf',\n    ...options,\n    headers: {\n        'Content-Type': 'application/pdf',\n        ...options.headers\n    }\n});\n\n/**\n * Upload binary data\n */\nexport const uploadBinary = <ThrowOnError extends boolean = false>(options: Options<UploadBinaryData, ThrowOnError>) => (options.client ?? client).post<UploadBinaryResponses, unknown, ThrowOnError>({\n    bodySerializer: null,\n    url: '/upload-binary',\n    ...options,\n    headers: {\n        'Content-Type': 'application/octet-stream',\n        ...options.headers\n    }\n});\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/body-binary-format/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type ClientOptions = {\n    baseUrl: `${string}://${string}` | (string & {});\n};\n\nexport type UploadZipData = {\n    body: Blob | File;\n    path?: never;\n    query?: never;\n    url: '/upload-zip';\n};\n\nexport type UploadZipResponses = {\n    /**\n     * Successfully uploaded\n     */\n    204: void;\n};\n\nexport type UploadZipResponse = UploadZipResponses[keyof UploadZipResponses];\n\nexport type UploadPdfData = {\n    body: Blob | File;\n    path?: never;\n    query?: never;\n    url: '/upload-pdf';\n};\n\nexport type UploadPdfResponses = {\n    /**\n     * Successfully uploaded\n     */\n    204: void;\n};\n\nexport type UploadPdfResponse = UploadPdfResponses[keyof UploadPdfResponses];\n\nexport type UploadBinaryData = {\n    body: Blob | File;\n    path?: never;\n    query?: never;\n    url: '/upload-binary';\n};\n\nexport type UploadBinaryResponses = {\n    /**\n     * Successfully uploaded\n     */\n    204: void;\n};\n\nexport type UploadBinaryResponse = UploadBinaryResponses[keyof UploadBinaryResponses];\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/body-response-text-plain/client/client.gen.ts",
    "content": "// 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 (options: RequestOptions) => {\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 url = buildUrl(opts);\n\n    return { opts, url };\n  };\n\n  const request: Client['request'] = async (options) => {\n    // @ts-expect-error\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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/body-response-text-plain/client/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type { Auth } from '../core/auth.gen';\nexport type { QuerySerializerOptions } from '../core/bodySerializer.gen';\nexport {\n  formDataBodySerializer,\n  jsonBodySerializer,\n  urlSearchParamsBodySerializer,\n} from '../core/bodySerializer.gen';\nexport { buildClientParams } from '../core/params.gen';\nexport { serializeQueryKeyValue } from '../core/queryKeySerializer.gen';\nexport { createClient } from './client.gen';\nexport type {\n  Client,\n  ClientOptions,\n  Config,\n  CreateClientConfig,\n  Options,\n  RequestOptions,\n  RequestResult,\n  ResolvedRequestOptions,\n  ResponseStyle,\n  TDataShape,\n} from './types.gen';\nexport { createConfig, mergeHeaders } from './utils.gen';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/body-response-text-plain/client/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { Auth } from '../core/auth.gen';\nimport type {\n  ServerSentEventsOptions,\n  ServerSentEventsResult,\n} from '../core/serverSentEvents.gen';\nimport type { Client as CoreClient, Config as CoreConfig } from '../core/types.gen';\nimport type { Middleware } from './utils.gen';\n\nexport type ResponseStyle = 'data' | 'fields';\n\nexport interface Config<T extends ClientOptions = ClientOptions>\n  extends Omit<RequestInit, 'body' | 'headers' | 'method'>, CoreConfig {\n  /**\n   * Base URL for all requests made by this client.\n   */\n  baseUrl?: T['baseUrl'];\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   * Please don't use the Fetch client for Next.js applications. The `next`\n   * options won't have any effect.\n   *\n   * Install {@link https://www.npmjs.com/package/@hey-api/client-next `@hey-api/client-next`} instead.\n   */\n  next?: never;\n  /**\n   * Return the response data parsed in a specified format. By default, `auto`\n   * will infer the appropriate method from the `Content-Type` response header.\n   * You can override this behavior with any of the {@link Body} methods.\n   * Select `stream` if you don't want to parse response data at all.\n   *\n   * @default 'auto'\n   */\n  parseAs?: 'arrayBuffer' | 'auto' | 'blob' | 'formData' | 'json' | 'stream' | 'text';\n  /**\n   * Should we return only data or multiple fields (data, error, response, etc.)?\n   *\n   * @default 'fields'\n   */\n  responseStyle?: ResponseStyle;\n  /**\n   * Throw an error instead of returning it in the response?\n   *\n   * @default false\n   */\n  throwOnError?: T['throwOnError'];\n}\n\nexport interface RequestOptions<\n  TData = unknown,\n  TResponseStyle extends ResponseStyle = 'fields',\n  ThrowOnError extends boolean = boolean,\n  Url extends string = string,\n>\n  extends\n    Config<{\n      responseStyle: TResponseStyle;\n      throwOnError: ThrowOnError;\n    }>,\n    Pick<\n      ServerSentEventsOptions<TData>,\n      | 'onRequest'\n      | 'onSseError'\n      | 'onSseEvent'\n      | 'sseDefaultRetryDelay'\n      | 'sseMaxRetryAttempts'\n      | 'sseMaxRetryDelay'\n    > {\n  /**\n   * Any body that you want to add to your request.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/fetch#body}\n   */\n  body?: unknown;\n  path?: Record<string, unknown>;\n  query?: Record<string, unknown>;\n  /**\n   * Security mechanism(s) to use for the request.\n   */\n  security?: ReadonlyArray<Auth>;\n  url: Url;\n}\n\nexport interface ResolvedRequestOptions<\n  TResponseStyle extends ResponseStyle = 'fields',\n  ThrowOnError extends boolean = boolean,\n  Url extends string = string,\n> extends RequestOptions<unknown, TResponseStyle, ThrowOnError, Url> {\n  serializedBody?: string;\n}\n\nexport type RequestResult<\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = boolean,\n  TResponseStyle extends ResponseStyle = 'fields',\n> = ThrowOnError extends true\n  ? Promise<\n      TResponseStyle extends 'data'\n        ? TData extends Record<string, unknown>\n          ? TData[keyof TData]\n          : TData\n        : {\n            data: TData extends Record<string, unknown> ? TData[keyof TData] : TData;\n            request: Request;\n            response: Response;\n          }\n    >\n  : Promise<\n      TResponseStyle extends 'data'\n        ? (TData extends Record<string, unknown> ? TData[keyof TData] : TData) | undefined\n        : (\n            | {\n                data: TData extends Record<string, unknown> ? TData[keyof TData] : TData;\n                error: undefined;\n              }\n            | {\n                data: undefined;\n                error: TError extends Record<string, unknown> ? TError[keyof TError] : TError;\n              }\n          ) & {\n            request: Request;\n            response: Response;\n          }\n    >;\n\nexport interface ClientOptions {\n  baseUrl?: string;\n  responseStyle?: ResponseStyle;\n  throwOnError?: boolean;\n}\n\ntype MethodFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'>,\n) => RequestResult<TData, TError, ThrowOnError, TResponseStyle>;\n\ntype SseFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'>,\n) => Promise<ServerSentEventsResult<TData, TError>>;\n\ntype RequestFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'> &\n    Pick<Required<RequestOptions<TData, TResponseStyle, ThrowOnError>>, 'method'>,\n) => RequestResult<TData, TError, ThrowOnError, TResponseStyle>;\n\ntype BuildUrlFn = <\n  TData extends {\n    body?: unknown;\n    path?: Record<string, unknown>;\n    query?: Record<string, unknown>;\n    url: string;\n  },\n>(\n  options: TData & Options<TData>,\n) => string;\n\nexport type Client = CoreClient<RequestFn, Config, MethodFn, BuildUrlFn, SseFn> & {\n  interceptors: Middleware<Request, Response, unknown, ResolvedRequestOptions>;\n};\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 = ClientOptions> = (\n  override?: Config<ClientOptions & T>,\n) => Config<Required<ClientOptions> & T>;\n\nexport interface TDataShape {\n  body?: unknown;\n  headers?: unknown;\n  path?: unknown;\n  query?: unknown;\n  url: string;\n}\n\ntype OmitKeys<T, K> = Pick<T, Exclude<keyof T, K>>;\n\nexport type Options<\n  TData extends TDataShape = TDataShape,\n  ThrowOnError extends boolean = boolean,\n  TResponse = unknown,\n  TResponseStyle extends ResponseStyle = 'fields',\n> = OmitKeys<\n  RequestOptions<TResponse, TResponseStyle, ThrowOnError>,\n  'body' | 'path' | 'query' | 'url'\n> &\n  ([TData] extends [never] ? unknown : Omit<TData, 'url'>);\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/body-response-text-plain/client/utils.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/body-response-text-plain/client.gen.ts",
    "content": "// 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>());\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/body-response-text-plain/core/auth.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/body-response-text-plain/core/bodySerializer.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/body-response-text-plain/core/params.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/body-response-text-plain/core/pathSerializer.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/body-response-text-plain/core/queryKeySerializer.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\n/**\n * JSON-friendly union that mirrors what Pinia Colada can hash.\n */\nexport type JsonValue =\n  | null\n  | string\n  | number\n  | boolean\n  | JsonValue[]\n  | { [key: string]: JsonValue };\n\n/**\n * Replacer that converts non-JSON values (bigint, Date, etc.) to safe substitutes.\n */\nexport const queryKeyJsonReplacer = (_key: string, value: unknown) => {\n  if (value === undefined || typeof value === 'function' || typeof value === 'symbol') {\n    return undefined;\n  }\n  if (typeof value === 'bigint') {\n    return value.toString();\n  }\n  if (value instanceof Date) {\n    return value.toISOString();\n  }\n  return value;\n};\n\n/**\n * Safely stringifies a value and parses it back into a JsonValue.\n */\nexport const stringifyToJsonValue = (input: unknown): JsonValue | undefined => {\n  try {\n    const json = JSON.stringify(input, queryKeyJsonReplacer);\n    if (json === undefined) {\n      return undefined;\n    }\n    return JSON.parse(json) as JsonValue;\n  } catch {\n    return undefined;\n  }\n};\n\n/**\n * Detects plain objects (including objects with a null prototype).\n */\nconst isPlainObject = (value: unknown): value is Record<string, unknown> => {\n  if (value === null || typeof value !== 'object') {\n    return false;\n  }\n  const prototype = Object.getPrototypeOf(value as object);\n  return prototype === Object.prototype || prototype === null;\n};\n\n/**\n * Turns URLSearchParams into a sorted JSON object for deterministic keys.\n */\nconst serializeSearchParams = (params: URLSearchParams): JsonValue => {\n  const entries = Array.from(params.entries()).sort(([a], [b]) => a.localeCompare(b));\n  const result: Record<string, JsonValue> = {};\n\n  for (const [key, value] of entries) {\n    const existing = result[key];\n    if (existing === undefined) {\n      result[key] = value;\n      continue;\n    }\n\n    if (Array.isArray(existing)) {\n      (existing as string[]).push(value);\n    } else {\n      result[key] = [existing, value];\n    }\n  }\n\n  return result;\n};\n\n/**\n * Normalizes any accepted value into a JSON-friendly shape for query keys.\n */\nexport const serializeQueryKeyValue = (value: unknown): JsonValue | undefined => {\n  if (value === null) {\n    return null;\n  }\n\n  if (typeof value === 'string' || typeof value === 'number' || typeof value === 'boolean') {\n    return value;\n  }\n\n  if (value === undefined || typeof value === 'function' || typeof value === 'symbol') {\n    return undefined;\n  }\n\n  if (typeof value === 'bigint') {\n    return value.toString();\n  }\n\n  if (value instanceof Date) {\n    return value.toISOString();\n  }\n\n  if (Array.isArray(value)) {\n    return stringifyToJsonValue(value);\n  }\n\n  if (typeof URLSearchParams !== 'undefined' && value instanceof URLSearchParams) {\n    return serializeSearchParams(value);\n  }\n\n  if (isPlainObject(value)) {\n    return stringifyToJsonValue(value);\n  }\n\n  return undefined;\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/body-response-text-plain/core/serverSentEvents.gen.ts",
    "content": "// 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 const 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            // Normalize line endings: CRLF -> LF, then CR -> LF\n            buffer = buffer.replace(/\\r\\n/g, '\\n').replace(/\\r/g, '\\n');\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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/body-response-text-plain/core/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { Auth, AuthToken } from './auth.gen';\nimport type { BodySerializer, QuerySerializer, QuerySerializerOptions } from './bodySerializer.gen';\n\nexport type HttpMethod =\n  | 'connect'\n  | 'delete'\n  | 'get'\n  | 'head'\n  | 'options'\n  | 'patch'\n  | 'post'\n  | 'put'\n  | 'trace';\n\nexport type Client<\n  RequestFn = never,\n  Config = unknown,\n  MethodFn = never,\n  BuildUrlFn = never,\n  SseFn = never,\n> = {\n  /**\n   * Returns the final request URL.\n   */\n  buildUrl: BuildUrlFn;\n  getConfig: () => Config;\n  request: RequestFn;\n  setConfig: (config: Config) => Config;\n} & {\n  [K in HttpMethod]: MethodFn;\n} & ([SseFn] extends [never] ? { sse?: never } : { sse: { [K in HttpMethod]: SseFn } });\n\nexport interface Config {\n  /**\n   * Auth token or a function returning auth token. The resolved value will be\n   * added to the request payload as defined by its `security` array.\n   */\n  auth?: ((auth: Auth) => Promise<AuthToken> | AuthToken) | AuthToken;\n  /**\n   * A function for serializing request body parameter. By default,\n   * {@link JSON.stringify()} will be used.\n   */\n  bodySerializer?: BodySerializer | null;\n  /**\n   * An object containing any HTTP headers that you want to pre-populate your\n   * `Headers` object with.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/Headers/Headers#init See more}\n   */\n  headers?:\n    | RequestInit['headers']\n    | Record<\n        string,\n        string | number | boolean | (string | number | boolean)[] | null | undefined | unknown\n      >;\n  /**\n   * The request method.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/fetch#method See more}\n   */\n  method?: Uppercase<HttpMethod>;\n  /**\n   * A function for serializing request query parameters. By default, arrays\n   * will be exploded in form style, objects will be exploded in deepObject\n   * style, and reserved characters are percent-encoded.\n   *\n   * This method will have no effect if the native `paramsSerializer()` Axios\n   * API function is used.\n   *\n   * {@link https://swagger.io/docs/specification/serialization/#query View examples}\n   */\n  querySerializer?: QuerySerializer | QuerySerializerOptions;\n  /**\n   * A function validating request data. This is useful if you want to ensure\n   * the request conforms to the desired shape, so it can be safely sent to\n   * the server.\n   */\n  requestValidator?: (data: unknown) => Promise<unknown>;\n  /**\n   * A function transforming response data before it's returned. This is useful\n   * for post-processing data, e.g. converting ISO strings into Date objects.\n   */\n  responseTransformer?: (data: unknown) => Promise<unknown>;\n  /**\n   * A function validating response data. This is useful if you want to ensure\n   * the response conforms to the desired shape, so it can be safely passed to\n   * the transformers and returned to the user.\n   */\n  responseValidator?: (data: unknown) => Promise<unknown>;\n}\n\ntype IsExactlyNeverOrNeverUndefined<T> = [T] extends [never]\n  ? true\n  : [T] extends [never | undefined]\n    ? [undefined] extends [T]\n      ? false\n      : true\n    : false;\n\nexport type OmitNever<T extends Record<string, unknown>> = {\n  [K in keyof T as IsExactlyNeverOrNeverUndefined<T[K]> extends true ? never : K]: T[K];\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/body-response-text-plain/core/utils.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/body-response-text-plain/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport { type Options, postFoo } from './sdk.gen';\nexport type { ClientOptions, PostFooData, PostFooResponse, PostFooResponses } from './types.gen';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/body-response-text-plain/sdk.gen.ts",
    "content": "// 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 { PostFooData, PostFooResponses } from './types.gen';\n\nexport type Options<TData extends TDataShape = TDataShape, ThrowOnError extends boolean = boolean> = Options2<TData, ThrowOnError> & {\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\nexport const postFoo = <ThrowOnError extends boolean = false>(options: Options<PostFooData, ThrowOnError>) => (options.client ?? client).post<PostFooResponses, unknown, ThrowOnError>({\n    bodySerializer: null,\n    url: '/foo',\n    ...options,\n    headers: {\n        'Content-Type': 'text/plain',\n        ...options.headers\n    }\n});\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/body-response-text-plain/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type ClientOptions = {\n    baseUrl: `${string}://${string}` | (string & {});\n};\n\nexport type PostFooData = {\n    body: string;\n    path?: never;\n    query?: never;\n    url: '/foo';\n};\n\nexport type PostFooResponses = {\n    /**\n     * OK\n     */\n    200: string;\n};\n\nexport type PostFooResponse = PostFooResponses[keyof PostFooResponses];\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/case-PascalCase/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type { _201, ClientOptions, Foo, FooBar, FooBar2, FooBar3, GetFooData, GetFooResponse, GetFooResponses } from './types.gen';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/case-PascalCase/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type ClientOptions = {\n    baseUrl: `${string}://${string}` | (string & {});\n};\n\n/**\n * original name: 201\n */\nexport type _201 = number;\n\n/**\n * original name: Foo\n */\nexport type Foo = {\n    /**\n     * original name: fooBar\n     */\n    fooBar: FooBar;\n    /**\n     * original name: BarBaz\n     */\n    BarBaz: Foo;\n    /**\n     * original name: qux_quux\n     */\n    qux_quux: {\n        /**\n         * original name: fooBar\n         */\n        fooBar: FooBar2;\n        /**\n         * original name: BarBaz\n         */\n        BarBaz: FooBar3;\n        /**\n         * original name: qux_quux\n         */\n        qux_quux: boolean;\n    };\n};\n\n/**\n * original name: foo_bar\n */\nexport type FooBar = boolean;\n\n/**\n * original name: fooBar\n */\nexport type FooBar2 = number;\n\n/**\n * original name: FooBar\n */\nexport type FooBar3 = string;\n\nexport type GetFooData = {\n    body: Foo;\n    path?: never;\n    query: {\n        /**\n         * original name: fooBar\n         */\n        fooBar: string;\n        /**\n         * original name: BarBaz\n         */\n        BarBaz: string;\n        /**\n         * original name: qux_quux\n         */\n        qux_quux: string;\n    };\n    url: '/foo';\n};\n\nexport type GetFooResponses = {\n    /**\n     * OK\n     */\n    200: Foo;\n    /**\n     * OK\n     */\n    201: _201;\n};\n\nexport type GetFooResponse = GetFooResponses[keyof GetFooResponses];\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/case-camelCase/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type { _201, clientOptions, foo, fooBar, fooBar2, fooBar3, getFooData, getFooResponse, getFooResponses } from './types.gen';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/case-camelCase/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type clientOptions = {\n    baseUrl: `${string}://${string}` | (string & {});\n};\n\n/**\n * original name: 201\n */\nexport type _201 = number;\n\n/**\n * original name: Foo\n */\nexport type foo = {\n    /**\n     * original name: fooBar\n     */\n    fooBar: fooBar;\n    /**\n     * original name: BarBaz\n     */\n    BarBaz: foo;\n    /**\n     * original name: qux_quux\n     */\n    qux_quux: {\n        /**\n         * original name: fooBar\n         */\n        fooBar: fooBar2;\n        /**\n         * original name: BarBaz\n         */\n        BarBaz: fooBar3;\n        /**\n         * original name: qux_quux\n         */\n        qux_quux: boolean;\n    };\n};\n\n/**\n * original name: foo_bar\n */\nexport type fooBar = boolean;\n\n/**\n * original name: fooBar\n */\nexport type fooBar2 = number;\n\n/**\n * original name: FooBar\n */\nexport type fooBar3 = string;\n\nexport type getFooData = {\n    body: foo;\n    path?: never;\n    query: {\n        /**\n         * original name: fooBar\n         */\n        fooBar: string;\n        /**\n         * original name: BarBaz\n         */\n        BarBaz: string;\n        /**\n         * original name: qux_quux\n         */\n        qux_quux: string;\n    };\n    url: '/foo';\n};\n\nexport type getFooResponses = {\n    /**\n     * OK\n     */\n    200: foo;\n    /**\n     * OK\n     */\n    201: _201;\n};\n\nexport type getFooResponse = getFooResponses[keyof getFooResponses];\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/case-preserve/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type { _201, ClientOptions, Foo, foo_bar, fooBar, FooBar, getFooData, getFooResponse, getFooResponses } from './types.gen';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/case-preserve/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type ClientOptions = {\n    baseUrl: `${string}://${string}` | (string & {});\n};\n\n/**\n * original name: 201\n */\nexport type _201 = number;\n\n/**\n * original name: Foo\n */\nexport type Foo = {\n    /**\n     * original name: fooBar\n     */\n    fooBar: foo_bar;\n    /**\n     * original name: BarBaz\n     */\n    BarBaz: Foo;\n    /**\n     * original name: qux_quux\n     */\n    qux_quux: {\n        /**\n         * original name: fooBar\n         */\n        fooBar: fooBar;\n        /**\n         * original name: BarBaz\n         */\n        BarBaz: FooBar;\n        /**\n         * original name: qux_quux\n         */\n        qux_quux: boolean;\n    };\n};\n\n/**\n * original name: foo_bar\n */\nexport type foo_bar = boolean;\n\n/**\n * original name: fooBar\n */\nexport type fooBar = number;\n\n/**\n * original name: FooBar\n */\nexport type FooBar = string;\n\nexport type getFooData = {\n    body: Foo;\n    path?: never;\n    query: {\n        /**\n         * original name: fooBar\n         */\n        fooBar: string;\n        /**\n         * original name: BarBaz\n         */\n        BarBaz: string;\n        /**\n         * original name: qux_quux\n         */\n        qux_quux: string;\n    };\n    url: '/foo';\n};\n\nexport type getFooResponses = {\n    /**\n     * OK\n     */\n    200: Foo;\n    /**\n     * OK\n     */\n    201: _201;\n};\n\nexport type getFooResponse = getFooResponses[keyof getFooResponses];\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/case-snake_case/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type { _201, client_options, foo, foo_bar, foo_bar2, foo_bar3, get_foo_data, get_foo_response, get_foo_responses } from './types.gen';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/case-snake_case/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type client_options = {\n    baseUrl: `${string}://${string}` | (string & {});\n};\n\n/**\n * original name: 201\n */\nexport type _201 = number;\n\n/**\n * original name: Foo\n */\nexport type foo = {\n    /**\n     * original name: fooBar\n     */\n    fooBar: foo_bar;\n    /**\n     * original name: BarBaz\n     */\n    BarBaz: foo;\n    /**\n     * original name: qux_quux\n     */\n    qux_quux: {\n        /**\n         * original name: fooBar\n         */\n        fooBar: foo_bar2;\n        /**\n         * original name: BarBaz\n         */\n        BarBaz: foo_bar3;\n        /**\n         * original name: qux_quux\n         */\n        qux_quux: boolean;\n    };\n};\n\n/**\n * original name: foo_bar\n */\nexport type foo_bar = boolean;\n\n/**\n * original name: fooBar\n */\nexport type foo_bar2 = number;\n\n/**\n * original name: FooBar\n */\nexport type foo_bar3 = string;\n\nexport type get_foo_data = {\n    body: foo;\n    path?: never;\n    query: {\n        /**\n         * original name: fooBar\n         */\n        fooBar: string;\n        /**\n         * original name: BarBaz\n         */\n        BarBaz: string;\n        /**\n         * original name: qux_quux\n         */\n        qux_quux: string;\n    };\n    url: '/foo';\n};\n\nexport type get_foo_responses = {\n    /**\n     * OK\n     */\n    200: foo;\n    /**\n     * OK\n     */\n    201: _201;\n};\n\nexport type get_foo_response = get_foo_responses[keyof get_foo_responses];\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/components-request-bodies/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type { ClientOptions, Foo, PostFooData, PostFooResponses } from './types.gen';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/components-request-bodies/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type ClientOptions = {\n    baseUrl: `${string}://${string}` | (string & {});\n};\n\n/**\n * Foo\n */\nexport type Foo = {\n    page?: number;\n};\n\nexport type PostFooData = {\n    /**\n     * Foo\n     */\n    body: Foo;\n    path?: never;\n    query?: never;\n    url: '/foo';\n};\n\nexport type PostFooResponses = {\n    /**\n     * OK\n     */\n    200: unknown;\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/content-binary/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type { ClientOptions, GetBarData, GetBarResponse, GetBarResponses, GetFooData, GetFooResponse, GetFooResponses } from './types.gen';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/content-binary/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type ClientOptions = {\n    baseUrl: `${string}://${string}` | (string & {});\n};\n\nexport type GetFooData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/foo';\n};\n\nexport type GetFooResponses = {\n    200: string;\n};\n\nexport type GetFooResponse = GetFooResponses[keyof GetFooResponses];\n\nexport type GetBarData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/bar';\n};\n\nexport type GetBarResponses = {\n    200: Blob | File;\n};\n\nexport type GetBarResponse = GetBarResponses[keyof GetBarResponses];\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/content-types/client/client.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { AxiosError, AxiosInstance, RawAxiosRequestHeaders } from 'axios';\nimport axios from 'axios';\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 } from './types.gen';\nimport { buildUrl, createConfig, mergeConfigs, mergeHeaders, setAuthParams } from './utils.gen';\n\nexport const createClient = (config: Config = {}): Client => {\n  let _config = mergeConfigs(createConfig(), config);\n\n  let instance: AxiosInstance;\n\n  if (_config.axios && !('Axios' in _config.axios)) {\n    instance = _config.axios;\n  } else {\n    // eslint-disable-next-line @typescript-eslint/no-unused-vars\n    const { auth, ...configWithoutAuth } = _config;\n    instance = axios.create(configWithoutAuth);\n  }\n\n  const getConfig = (): Config => ({ ..._config });\n\n  const setConfig = (config: Config): Config => {\n    _config = mergeConfigs(_config, config);\n    instance.defaults = {\n      ...instance.defaults,\n      ..._config,\n      // @ts-expect-error\n      headers: mergeHeaders(instance.defaults.headers, _config.headers),\n    };\n    return getConfig();\n  };\n\n  const beforeRequest = async (options: RequestOptions) => {\n    const opts = {\n      ..._config,\n      ...options,\n      axios: options.axios ?? _config.axios ?? instance,\n      headers: mergeHeaders(_config.headers, options.headers),\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.body = opts.bodySerializer(opts.body);\n    }\n\n    const url = buildUrl(opts);\n\n    return { opts, url };\n  };\n\n  // @ts-expect-error\n  const request: Client['request'] = async (options) => {\n    // @ts-expect-error\n    const { opts, url } = await beforeRequest(options);\n    try {\n      // assign Axios here for consistency with fetch\n      const _axios = opts.axios!;\n      // eslint-disable-next-line @typescript-eslint/no-unused-vars\n      const { auth, ...optsWithoutAuth } = opts;\n      const response = await _axios({\n        ...optsWithoutAuth,\n        baseURL: '', // the baseURL is already included in `url`\n        data: getValidRequestBody(opts),\n        headers: opts.headers as RawAxiosRequestHeaders,\n        // let `paramsSerializer()` handle query params if it exists\n        params: opts.paramsSerializer ? opts.query : undefined,\n        url,\n      });\n\n      let { data } = response;\n\n      if (opts.responseType === '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 {\n        ...response,\n        data: data ?? {},\n      };\n    } catch (error) {\n      const e = error as AxiosError;\n      if (opts.throwOnError) {\n        throw e;\n      }\n      // @ts-expect-error\n      e.error = e.response?.data ?? {};\n      return e;\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 Record<string, string>,\n      method,\n      serializedBody: getValidRequestBody(opts) as BodyInit | null | undefined,\n      // @ts-expect-error\n      signal: opts.signal,\n      url,\n    });\n  };\n\n  const _buildUrl: Client['buildUrl'] = (options) =>\n    buildUrl({ axios: instance, ..._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    instance,\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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/content-types/client/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type { Auth } from '../core/auth.gen';\nexport type { QuerySerializerOptions } from '../core/bodySerializer.gen';\nexport {\n  formDataBodySerializer,\n  jsonBodySerializer,\n  urlSearchParamsBodySerializer,\n} from '../core/bodySerializer.gen';\nexport { buildClientParams } from '../core/params.gen';\nexport { serializeQueryKeyValue } from '../core/queryKeySerializer.gen';\nexport { createClient } from './client.gen';\nexport type {\n  Client,\n  ClientOptions,\n  Config,\n  CreateClientConfig,\n  Options,\n  RequestOptions,\n  RequestResult,\n  TDataShape,\n} from './types.gen';\nexport { createConfig } from './utils.gen';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/content-types/client/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type {\n  AxiosError,\n  AxiosInstance,\n  AxiosRequestHeaders,\n  AxiosResponse,\n  AxiosStatic,\n  CreateAxiosDefaults,\n} from 'axios';\n\nimport type { Auth } from '../core/auth.gen';\nimport type {\n  ServerSentEventsOptions,\n  ServerSentEventsResult,\n} from '../core/serverSentEvents.gen';\nimport type { Client as CoreClient, Config as CoreConfig } from '../core/types.gen';\n\nexport interface Config<T extends ClientOptions = ClientOptions>\n  extends Omit<CreateAxiosDefaults, 'auth' | 'baseURL' | 'headers' | 'method'>, CoreConfig {\n  /**\n   * Axios implementation. You can use this option to provide either an\n   * `AxiosStatic` or an `AxiosInstance`.\n   *\n   * @default axios\n   */\n  axios?: AxiosStatic | AxiosInstance;\n  /**\n   * Base URL for all requests made by this client.\n   */\n  baseURL?: T['baseURL'];\n  /**\n   * An object containing any HTTP headers that you want to pre-populate your\n   * `Headers` object with.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/Headers/Headers#init See more}\n   */\n  headers?:\n    | AxiosRequestHeaders\n    | Record<\n        string,\n        string | number | boolean | (string | number | boolean)[] | null | undefined | unknown\n      >;\n  /**\n   * Throw an error instead of returning it in the response?\n   *\n   * @default false\n   */\n  throwOnError?: T['throwOnError'];\n}\n\nexport interface RequestOptions<\n  TData = unknown,\n  ThrowOnError extends boolean = boolean,\n  Url extends string = string,\n>\n  extends\n    Config<{\n      throwOnError: ThrowOnError;\n    }>,\n    Pick<\n      ServerSentEventsOptions<TData>,\n      | 'onRequest'\n      | 'onSseError'\n      | 'onSseEvent'\n      | 'sseDefaultRetryDelay'\n      | 'sseMaxRetryAttempts'\n      | 'sseMaxRetryDelay'\n    > {\n  /**\n   * Any body that you want to add to your request.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/fetch#body}\n   */\n  body?: unknown;\n  path?: Record<string, unknown>;\n  query?: Record<string, unknown>;\n  /**\n   * Security mechanism(s) to use for the request.\n   */\n  security?: ReadonlyArray<Auth>;\n  url: Url;\n}\n\nexport interface ClientOptions {\n  baseURL?: string;\n  throwOnError?: boolean;\n}\n\nexport type RequestResult<\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = boolean,\n> = ThrowOnError extends true\n  ? Promise<AxiosResponse<TData extends Record<string, unknown> ? TData[keyof TData] : TData>>\n  : Promise<\n      | (AxiosResponse<TData extends Record<string, unknown> ? TData[keyof TData] : TData> & {\n          error: undefined;\n        })\n      | (AxiosError<TError extends Record<string, unknown> ? TError[keyof TError] : TError> & {\n          data: undefined;\n          error: TError extends Record<string, unknown> ? TError[keyof TError] : TError;\n        })\n    >;\n\ntype MethodFn = <TData = unknown, TError = unknown, ThrowOnError extends boolean = false>(\n  options: Omit<RequestOptions<TData, ThrowOnError>, 'method'>,\n) => RequestResult<TData, TError, ThrowOnError>;\n\ntype SseFn = <TData = unknown, TError = unknown, ThrowOnError extends boolean = false>(\n  options: Omit<RequestOptions<TData, ThrowOnError>, 'method'>,\n) => Promise<ServerSentEventsResult<TData, TError>>;\n\ntype RequestFn = <TData = unknown, TError = unknown, ThrowOnError extends boolean = false>(\n  options: Omit<RequestOptions<TData, ThrowOnError>, 'method'> &\n    Pick<Required<RequestOptions<TData, ThrowOnError>>, 'method'>,\n) => RequestResult<TData, TError, ThrowOnError>;\n\ntype BuildUrlFn = <\n  TData extends {\n    body?: unknown;\n    path?: Record<string, unknown>;\n    query?: Record<string, unknown>;\n    url: string;\n  },\n>(\n  options: TData & Options<TData>,\n) => string;\n\nexport type Client = CoreClient<RequestFn, Config, MethodFn, BuildUrlFn, SseFn> & {\n  instance: AxiosInstance;\n};\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 = ClientOptions> = (\n  override?: Config<ClientOptions & T>,\n) => Config<Required<ClientOptions> & T>;\n\nexport interface TDataShape {\n  body?: unknown;\n  headers?: unknown;\n  path?: unknown;\n  query?: unknown;\n  url: string;\n}\n\ntype OmitKeys<T, K> = Pick<T, Exclude<keyof T, K>>;\n\nexport type Options<\n  TData extends TDataShape = TDataShape,\n  ThrowOnError extends boolean = boolean,\n  TResponse = unknown,\n> = OmitKeys<RequestOptions<TResponse, ThrowOnError>, 'body' | 'path' | 'query' | 'url'> &\n  ([TData] extends [never] ? unknown : Omit<TData, 'url'>);\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/content-types/client/utils.gen.ts",
    "content": "// 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 {\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\nconst checkForExistence = (\n  options: Pick<RequestOptions, 'auth' | 'query'> & {\n    headers: Record<any, unknown>;\n  },\n  name?: string,\n): boolean => {\n  if (!name) {\n    return false;\n  }\n  if (name in options.headers || options.query?.[name]) {\n    return true;\n  }\n  if (\n    'Cookie' in options.headers &&\n    options.headers['Cookie'] &&\n    typeof options.headers['Cookie'] === 'string'\n  ) {\n    return options.headers['Cookie'].includes(`${name}=`);\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: Record<any, unknown>;\n  }) => {\n  for (const auth of security) {\n    if (checkForExistence(options, auth.name)) {\n      continue;\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        const value = `${name}=${token}`;\n        if ('Cookie' in options.headers && options.headers['Cookie']) {\n          options.headers['Cookie'] = `${options.headers['Cookie']}; ${value}`;\n        } else {\n          options.headers['Cookie'] = value;\n        }\n        break;\n      }\n      case 'header':\n      default:\n        options.headers[name] = token;\n        break;\n    }\n  }\n};\n\nexport const buildUrl: Client['buildUrl'] = (options) => {\n  const instanceBaseUrl = options.axios?.defaults?.baseURL;\n\n  const baseUrl =\n    !!options.baseURL && typeof options.baseURL === 'string' ? options.baseURL : instanceBaseUrl;\n\n  return getUrl({\n    baseUrl: baseUrl as string,\n    path: options.path,\n    // let `paramsSerializer()` handle query params if it exists\n    query: !options.paramsSerializer ? options.query : undefined,\n    querySerializer:\n      typeof options.querySerializer === 'function'\n        ? options.querySerializer\n        : createQuerySerializer(options.querySerializer),\n    url: options.url,\n  });\n};\n\nexport const mergeConfigs = (a: Config, b: Config): Config => {\n  const config = { ...a, ...b };\n  config.headers = mergeHeaders(a.headers, b.headers);\n  return config;\n};\n\n/**\n * Special Axios headers keywords allowing to set headers by request method.\n */\nexport const axiosHeadersKeywords = [\n  'common',\n  'delete',\n  'get',\n  'head',\n  'patch',\n  'post',\n  'put',\n] as const;\n\nexport const mergeHeaders = (\n  ...headers: Array<Required<Config>['headers'] | undefined>\n): Record<any, unknown> => {\n  const mergedHeaders: Record<any, unknown> = {};\n  for (const header of headers) {\n    if (!header || typeof header !== 'object') {\n      continue;\n    }\n\n    const iterator = Object.entries(header);\n\n    for (const [key, value] of iterator) {\n      if (\n        axiosHeadersKeywords.includes(key as (typeof axiosHeadersKeywords)[number]) &&\n        typeof value === 'object'\n      ) {\n        mergedHeaders[key] = {\n          ...(mergedHeaders[key] as Record<any, unknown>),\n          ...value,\n        };\n      } else if (value === null) {\n        delete mergedHeaders[key];\n      } else if (Array.isArray(value)) {\n        for (const v of value) {\n          // @ts-expect-error\n          mergedHeaders[key] = [...(mergedHeaders[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[key] = typeof value === 'object' ? JSON.stringify(value) : (value as string);\n      }\n    }\n  }\n  return mergedHeaders;\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  ...override,\n});\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/content-types/client.gen.ts",
    "content": "// 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>());\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/content-types/core/auth.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/content-types/core/bodySerializer.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/content-types/core/params.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/content-types/core/pathSerializer.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/content-types/core/queryKeySerializer.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\n/**\n * JSON-friendly union that mirrors what Pinia Colada can hash.\n */\nexport type JsonValue =\n  | null\n  | string\n  | number\n  | boolean\n  | JsonValue[]\n  | { [key: string]: JsonValue };\n\n/**\n * Replacer that converts non-JSON values (bigint, Date, etc.) to safe substitutes.\n */\nexport const queryKeyJsonReplacer = (_key: string, value: unknown) => {\n  if (value === undefined || typeof value === 'function' || typeof value === 'symbol') {\n    return undefined;\n  }\n  if (typeof value === 'bigint') {\n    return value.toString();\n  }\n  if (value instanceof Date) {\n    return value.toISOString();\n  }\n  return value;\n};\n\n/**\n * Safely stringifies a value and parses it back into a JsonValue.\n */\nexport const stringifyToJsonValue = (input: unknown): JsonValue | undefined => {\n  try {\n    const json = JSON.stringify(input, queryKeyJsonReplacer);\n    if (json === undefined) {\n      return undefined;\n    }\n    return JSON.parse(json) as JsonValue;\n  } catch {\n    return undefined;\n  }\n};\n\n/**\n * Detects plain objects (including objects with a null prototype).\n */\nconst isPlainObject = (value: unknown): value is Record<string, unknown> => {\n  if (value === null || typeof value !== 'object') {\n    return false;\n  }\n  const prototype = Object.getPrototypeOf(value as object);\n  return prototype === Object.prototype || prototype === null;\n};\n\n/**\n * Turns URLSearchParams into a sorted JSON object for deterministic keys.\n */\nconst serializeSearchParams = (params: URLSearchParams): JsonValue => {\n  const entries = Array.from(params.entries()).sort(([a], [b]) => a.localeCompare(b));\n  const result: Record<string, JsonValue> = {};\n\n  for (const [key, value] of entries) {\n    const existing = result[key];\n    if (existing === undefined) {\n      result[key] = value;\n      continue;\n    }\n\n    if (Array.isArray(existing)) {\n      (existing as string[]).push(value);\n    } else {\n      result[key] = [existing, value];\n    }\n  }\n\n  return result;\n};\n\n/**\n * Normalizes any accepted value into a JSON-friendly shape for query keys.\n */\nexport const serializeQueryKeyValue = (value: unknown): JsonValue | undefined => {\n  if (value === null) {\n    return null;\n  }\n\n  if (typeof value === 'string' || typeof value === 'number' || typeof value === 'boolean') {\n    return value;\n  }\n\n  if (value === undefined || typeof value === 'function' || typeof value === 'symbol') {\n    return undefined;\n  }\n\n  if (typeof value === 'bigint') {\n    return value.toString();\n  }\n\n  if (value instanceof Date) {\n    return value.toISOString();\n  }\n\n  if (Array.isArray(value)) {\n    return stringifyToJsonValue(value);\n  }\n\n  if (typeof URLSearchParams !== 'undefined' && value instanceof URLSearchParams) {\n    return serializeSearchParams(value);\n  }\n\n  if (isPlainObject(value)) {\n    return stringifyToJsonValue(value);\n  }\n\n  return undefined;\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/content-types/core/serverSentEvents.gen.ts",
    "content": "// 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 const 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            // Normalize line endings: CRLF -> LF, then CR -> LF\n            buffer = buffer.replace(/\\r\\n/g, '\\n').replace(/\\r/g, '\\n');\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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/content-types/core/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { Auth, AuthToken } from './auth.gen';\nimport type { BodySerializer, QuerySerializer, QuerySerializerOptions } from './bodySerializer.gen';\n\nexport type HttpMethod =\n  | 'connect'\n  | 'delete'\n  | 'get'\n  | 'head'\n  | 'options'\n  | 'patch'\n  | 'post'\n  | 'put'\n  | 'trace';\n\nexport type Client<\n  RequestFn = never,\n  Config = unknown,\n  MethodFn = never,\n  BuildUrlFn = never,\n  SseFn = never,\n> = {\n  /**\n   * Returns the final request URL.\n   */\n  buildUrl: BuildUrlFn;\n  getConfig: () => Config;\n  request: RequestFn;\n  setConfig: (config: Config) => Config;\n} & {\n  [K in HttpMethod]: MethodFn;\n} & ([SseFn] extends [never] ? { sse?: never } : { sse: { [K in HttpMethod]: SseFn } });\n\nexport interface Config {\n  /**\n   * Auth token or a function returning auth token. The resolved value will be\n   * added to the request payload as defined by its `security` array.\n   */\n  auth?: ((auth: Auth) => Promise<AuthToken> | AuthToken) | AuthToken;\n  /**\n   * A function for serializing request body parameter. By default,\n   * {@link JSON.stringify()} will be used.\n   */\n  bodySerializer?: BodySerializer | null;\n  /**\n   * An object containing any HTTP headers that you want to pre-populate your\n   * `Headers` object with.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/Headers/Headers#init See more}\n   */\n  headers?:\n    | RequestInit['headers']\n    | Record<\n        string,\n        string | number | boolean | (string | number | boolean)[] | null | undefined | unknown\n      >;\n  /**\n   * The request method.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/fetch#method See more}\n   */\n  method?: Uppercase<HttpMethod>;\n  /**\n   * A function for serializing request query parameters. By default, arrays\n   * will be exploded in form style, objects will be exploded in deepObject\n   * style, and reserved characters are percent-encoded.\n   *\n   * This method will have no effect if the native `paramsSerializer()` Axios\n   * API function is used.\n   *\n   * {@link https://swagger.io/docs/specification/serialization/#query View examples}\n   */\n  querySerializer?: QuerySerializer | QuerySerializerOptions;\n  /**\n   * A function validating request data. This is useful if you want to ensure\n   * the request conforms to the desired shape, so it can be safely sent to\n   * the server.\n   */\n  requestValidator?: (data: unknown) => Promise<unknown>;\n  /**\n   * A function transforming response data before it's returned. This is useful\n   * for post-processing data, e.g. converting ISO strings into Date objects.\n   */\n  responseTransformer?: (data: unknown) => Promise<unknown>;\n  /**\n   * A function validating response data. This is useful if you want to ensure\n   * the response conforms to the desired shape, so it can be safely passed to\n   * the transformers and returned to the user.\n   */\n  responseValidator?: (data: unknown) => Promise<unknown>;\n}\n\ntype IsExactlyNeverOrNeverUndefined<T> = [T] extends [never]\n  ? true\n  : [T] extends [never | undefined]\n    ? [undefined] extends [T]\n      ? false\n      : true\n    : false;\n\nexport type OmitNever<T extends Record<string, unknown>> = {\n  [K in keyof T as IsExactlyNeverOrNeverUndefined<T[K]> extends true ? never : K]: T[K];\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/content-types/core/utils.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/content-types/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport { getFoo, type Options } from './sdk.gen';\nexport type { ClientOptions, GetFooData, GetFooResponse, GetFooResponses } from './types.gen';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/content-types/sdk.gen.ts",
    "content": "// 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 { GetFooData, GetFooResponses } from './types.gen';\n\nexport type Options<TData extends TDataShape = TDataShape, ThrowOnError extends boolean = boolean> = Options2<TData, ThrowOnError> & {\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\nexport const getFoo = <ThrowOnError extends boolean = false>(options?: Options<GetFooData, ThrowOnError>) => (options?.client ?? client).get<GetFooResponses, unknown, ThrowOnError>({\n    responseType: 'json',\n    url: '/foo',\n    ...options\n});\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/content-types/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type ClientOptions = {\n    baseURL: `${string}://${string}` | (string & {});\n};\n\nexport type GetFooData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/foo';\n};\n\nexport type GetFooResponses = {\n    /**\n     * OK\n     */\n    200: string;\n};\n\nexport type GetFooResponse = GetFooResponses[keyof GetFooResponses];\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/discriminator-all-of/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type { Bar, BarMapped, BarUnion, Baz, BazMapped, BazUnion, ClientOptions, Foo, FooMapped, FooUnion, Qux, QuxExtend, QuxMapped } from './types.gen';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/discriminator-all-of/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type ClientOptions = {\n    baseUrl: `${string}://${string}` | (string & {});\n};\n\nexport type Foo = {\n    id: string;\n};\n\nexport type Bar = Omit<Foo, 'id'> & {\n    bar?: string;\n    id: 'Bar';\n};\n\nexport type Baz = Omit<Foo, 'id'> & {\n    baz?: string;\n    id: 'Baz';\n};\n\nexport type Qux = Omit<Foo, 'id'> & {\n    qux?: boolean;\n    id: 'Qux';\n};\n\nexport type FooMapped = {\n    id: string;\n};\n\nexport type BarMapped = Omit<FooMapped, 'id'> & {\n    bar?: string;\n    id: 'bar';\n};\n\nexport type BazMapped = Omit<FooMapped, 'id'> & {\n    baz?: string;\n    id: 'baz';\n};\n\nexport type QuxMapped = Omit<FooMapped, 'id'> & {\n    qux?: boolean;\n    id: 'QuxMapped';\n};\n\nexport type FooUnion = ({\n    id: 'bar';\n} & BarUnion) | ({\n    id: 'baz';\n} & BazUnion);\n\nexport type BarUnion = {\n    id?: string;\n    bar?: string;\n};\n\nexport type BazUnion = {\n    id?: string;\n    baz?: string;\n};\n\nexport type QuxExtend = FooUnion;\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/discriminator-allof-inline/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type { Bar, Baz, ClientOptions, Foo, GetFoosData, GetFoosResponse, GetFoosResponses, Qux } from './types.gen';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/discriminator-allof-inline/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type ClientOptions = {\n    baseUrl: `${string}://${string}` | (string & {});\n};\n\nexport type Foo = {\n    $type: string;\n    foo?: string;\n};\n\nexport type Bar = Omit<Foo, '$type'> & {\n    $type: 'FooBar';\n    bar?: string;\n};\n\nexport type Baz = Omit<Foo, '$type'> & {\n    baz?: string;\n    $type: 'FooBaz';\n};\n\nexport type Qux = Omit<Bar, '$type'> & {\n    qux?: string;\n    $type: 'BarQux';\n};\n\nexport type GetFoosData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/foos';\n};\n\nexport type GetFoosResponses = {\n    /**\n     * OK\n     */\n    200: Bar | Baz | Qux;\n};\n\nexport type GetFoosResponse = GetFoosResponses[keyof GetFoosResponses];\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/discriminator-allof-nested/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type { CarDto, ClientOptions, GetCarsData, GetCarsResponse, GetCarsResponses, VehicleDto, VolvoDto } from './types.gen';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/discriminator-allof-nested/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type ClientOptions = {\n    baseUrl: `${string}://${string}` | (string & {});\n};\n\nexport type VehicleDto = {\n    $type: string;\n    id: number;\n};\n\nexport type CarDto = Omit<VehicleDto, '$type'> & {\n    modelName: string;\n    $type: 'Car';\n};\n\nexport type VolvoDto = Omit<CarDto, '$type'> & {\n    seatbeltCount: number;\n    $type: 'Volvo';\n};\n\nexport type GetCarsData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/cars';\n};\n\nexport type GetCarsResponses = {\n    /**\n     * List of cars\n     */\n    200: Array<CarDto | VolvoDto>;\n};\n\nexport type GetCarsResponse = GetCarsResponses[keyof GetCarsResponses];\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/discriminator-any-of/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type { Bar, Baz, ClientOptions, Foo, Quux, Quuz, Qux, Spæcial } from './types.gen';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/discriminator-any-of/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type ClientOptions = {\n    baseUrl: `${string}://${string}` | (string & {});\n};\n\nexport type Foo = ({\n    type?: 'Bar';\n} & Bar) | ({\n    type?: 'Baz';\n} & Baz);\n\nexport type Baz = Qux;\n\nexport type Bar = Qux;\n\nexport type Spæcial = Qux;\n\nexport type Qux = {\n    id: string;\n    type: Quux;\n};\n\nexport type Quux = 'Bar' | 'Baz';\n\nexport type Quuz = ({\n    type?: 'bar';\n} & Bar) | ({\n    type?: 'baz';\n} & Baz) | ({\n    type?: 'non-ascii';\n} & Spæcial);\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/discriminator-mapped-many/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type { Bar, Baz, ClientOptions, Foo, Spæcial } from './types.gen';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/discriminator-mapped-many/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type ClientOptions = {\n    baseUrl: `${string}://${string}` | (string & {});\n};\n\nexport type Foo = ({\n    foo: 'one' | 'two';\n} & Bar) | ({\n    foo: 'three';\n} & Baz) | ({\n    foo: 'four';\n} & Spæcial);\n\nexport type Bar = {\n    foo?: 'one' | 'two';\n};\n\nexport type Baz = {\n    foo?: 'three';\n};\n\nexport type Spæcial = {\n    foo?: 'four';\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/discriminator-non-string/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type { AutoConfig, BooleanAnyOf, BooleanOneOf, ClientOptions, CustomConfig, IntegerAllOfBase, IntegerAllOfChildA, IntegerAllOfChildB, IntegerOneOf, NumberOneOf, TypeOne, TypeTwo, VersionAlpha, VersionBeta } from './types.gen';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/discriminator-non-string/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type ClientOptions = {\n    baseUrl: `${string}://${string}` | (string & {});\n};\n\nexport type BooleanOneOf = ({\n    use_custom: false;\n} & AutoConfig) | ({\n    use_custom: true;\n} & CustomConfig);\n\nexport type AutoConfig = {\n    use_custom: boolean;\n    auto_setting: string;\n};\n\nexport type CustomConfig = {\n    use_custom: boolean;\n    custom_value: number;\n};\n\nexport type BooleanAnyOf = ({\n    use_custom?: false;\n} & AutoConfig) | ({\n    use_custom?: true;\n} & CustomConfig);\n\nexport type IntegerOneOf = ({\n    type_id: 1;\n} & TypeOne) | ({\n    type_id: 2;\n} & TypeTwo);\n\nexport type TypeOne = {\n    type_id: number;\n    one_data: string;\n};\n\nexport type TypeTwo = {\n    type_id: number;\n    two_data: string;\n};\n\nexport type NumberOneOf = ({\n    version: 1;\n} & VersionAlpha) | ({\n    version: 2.5;\n} & VersionBeta);\n\nexport type VersionAlpha = {\n    version: number;\n    alpha_field: string;\n};\n\nexport type VersionBeta = {\n    version: number;\n    beta_field: string;\n};\n\nexport type IntegerAllOfBase = {\n    kind: number;\n};\n\nexport type IntegerAllOfChildA = Omit<IntegerAllOfBase, 'kind'> & {\n    child_a_field: string;\n    kind: 1;\n};\n\nexport type IntegerAllOfChildB = Omit<IntegerAllOfBase, 'kind'> & {\n    child_b_field: string;\n    kind: 2;\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/discriminator-object-self-mapped/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type { BlogPostDto, BlogPostWithImageDto, ClientOptions, GetBlogPostsData, GetBlogPostsResponse, GetBlogPostsResponses } from './types.gen';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/discriminator-object-self-mapped/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type ClientOptions = {\n    baseUrl: `${string}://${string}` | (string & {});\n};\n\nexport type BlogPostDto = {\n    $type: 'BlogPost';\n    id: number;\n    title: string;\n};\n\nexport type BlogPostWithImageDto = Omit<BlogPostDto, '$type'> & {\n    imageUrl: string;\n    $type: 'BlogPostWithImage';\n};\n\nexport type GetBlogPostsData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/blog-posts';\n};\n\nexport type GetBlogPostsResponses = {\n    /**\n     * List of blog posts\n     */\n    200: Array<BlogPostDto | BlogPostWithImageDto>;\n};\n\nexport type GetBlogPostsResponse = GetBlogPostsResponses[keyof GetBlogPostsResponses];\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/discriminator-one-of/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type { Bar, Baz, ClientOptions, Foo, Quux, Quuz, Qux, Spæcial } from './types.gen';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/discriminator-one-of/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type ClientOptions = {\n    baseUrl: `${string}://${string}` | (string & {});\n};\n\nexport type Foo = ({\n    type: 'Bar';\n} & Bar) | ({\n    type: 'Baz';\n} & Baz);\n\nexport type Baz = Qux;\n\nexport type Bar = Qux;\n\nexport type Spæcial = Qux;\n\nexport type Qux = {\n    id: string;\n    type: Quux;\n};\n\nexport type Quux = 'Bar' | 'Baz';\n\nexport type Quuz = ({\n    type: 'bar';\n} & Bar) | ({\n    type: 'baz';\n} & Baz) | ({\n    type: 'non-ascii';\n} & Spæcial);\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/enum-escape/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type { Bar, ClientOptions, Foo } from './types.gen';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/enum-escape/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type ClientOptions = {\n    baseUrl: `${string}://${string}` | (string & {});\n};\n\nexport type Foo = {\n    foo?: 'foo\\'bar' | 'foo\"bar';\n};\n\nexport type Bar = 'foo\\'bar' | 'foo\"bar';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/enum-inline/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type { ClientOptions, Foo, TypeEnum } from './types.gen';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/enum-inline/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type ClientOptions = {\n    baseUrl: `${string}://${string}` | (string & {});\n};\n\nexport type Foo = {\n    type?: TypeEnum;\n};\n\nexport type TypeEnum = 'foo' | 'bar' | 'FooBar' | 'fooBar' | 'foo bar';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/enum-inline-javascript/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport { type ClientOptions, type Foo, TypeEnum } from './types.gen';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/enum-inline-javascript/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type ClientOptions = {\n    baseUrl: `${string}://${string}` | (string & {});\n};\n\nexport type Foo = {\n    type?: TypeEnum;\n};\n\nexport const TypeEnum = {\n    FOO: 'foo',\n    BAR: 'bar',\n    FOO_BAR: 'FooBar',\n    FOO_BAR2: 'fooBar',\n    FOO_BAR3: 'foo bar'\n} as const;\n\nexport type TypeEnum = typeof TypeEnum[keyof typeof TypeEnum];\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/enum-inline-name-resolver/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport { type ClientOptions, type Foo, TypeEnum } from './types.gen';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/enum-inline-name-resolver/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type ClientOptions = {\n    baseUrl: `${string}://${string}` | (string & {});\n};\n\nexport type Foo = {\n    type?: TypeEnum;\n};\n\nexport const TypeEnum = {\n    FOO: 'foo',\n    BAR: 'bar',\n    FOO_BAR: 'FooBar',\n    FOO_BAR_N2: 'fooBar',\n    FOO_BAR_N3: 'foo bar'\n} as const;\n\nexport type TypeEnum = typeof TypeEnum[keyof typeof TypeEnum];\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/enum-inline-name-resolver-null/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport { type ClientOptions, type Foo, TypeEnum } from './types.gen';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/enum-inline-name-resolver-null/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type ClientOptions = {\n    baseUrl: `${string}://${string}` | (string & {});\n};\n\nexport type Foo = {\n    type?: TypeEnum;\n};\n\nexport const TypeEnum = {\n    FOO: 'foo',\n    BAR: 'bar',\n    FOO_BAR: 'FooBar',\n    FOO_BAR2: 'fooBar',\n    FOO_BAR3: 'foo bar'\n} as const;\n\nexport type TypeEnum = typeof TypeEnum[keyof typeof TypeEnum];\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/enum-inline-typescript/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport { type ClientOptions, type Foo, TypeEnum } from './types.gen';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/enum-inline-typescript/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type ClientOptions = {\n    baseUrl: `${string}://${string}` | (string & {});\n};\n\nexport type Foo = {\n    type?: TypeEnum;\n};\n\nexport enum TypeEnum {\n    FOO = 'foo',\n    BAR = 'bar',\n    FOO_BAR = 'FooBar',\n    FOO_BAR2 = 'fooBar',\n    FOO_BAR3 = 'foo bar'\n}\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/enum-names-values/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type { _110, Arrays, ClientOptions, Foo, MyFoo, MyFoo2, Numbers } from './types.gen';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/enum-names-values/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type ClientOptions = {\n    baseUrl: `${string}://${string}` | (string & {});\n};\n\nexport type _110 = '1-10' | '11-20';\n\nexport type MyFoo = 'myFoo' | 'myBar';\n\nexport type MyFoo2 = 'MyFoo' | 'MyBar';\n\nexport type Foo = 'foo' | 'bar' | null | '' | true | false;\n\nexport type Numbers = 100 | 200 | 300 | -100 | -200 | -300;\n\nexport type Arrays = [\n    'foo'\n] | [\n    'bar'\n] | [\n    'baz'\n];\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/enum-names-values-javascript-PascalCase/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport { _110, Arrays, type ClientOptions, Foo, MyFoo, MyFoo2, Numbers } from './types.gen';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/enum-names-values-javascript-PascalCase/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type ClientOptions = {\n    baseUrl: `${string}://${string}` | (string & {});\n};\n\nexport const _110 = { 110: '1-10', 1120: '11-20' } as const;\n\nexport type _110 = typeof _110[keyof typeof _110];\n\nexport const MyFoo = { MyFoo: 'myFoo', MyBar: 'myBar' } as const;\n\nexport type MyFoo = typeof MyFoo[keyof typeof MyFoo];\n\nexport const MyFoo2 = { MyFoo: 'MyFoo', MyBar: 'MyBar' } as const;\n\nexport type MyFoo2 = typeof MyFoo2[keyof typeof MyFoo2];\n\nexport const Foo = {\n    Foo: 'foo',\n    Bar: 'bar',\n    Null: null,\n    '': '',\n    True: true,\n    False: false\n} as const;\n\nexport type Foo = typeof Foo[keyof typeof Foo];\n\nexport const Numbers = {\n    100: 100,\n    200: 200,\n    300: 300,\n    '-100': -100,\n    '-200': -200,\n    '-300': -300\n} as const;\n\nexport type Numbers = typeof Numbers[keyof typeof Numbers];\n\nexport const Arrays = {\n    0: ['foo'],\n    1: ['bar'],\n    2: ['baz']\n} as const;\n\nexport type Arrays = typeof Arrays[keyof typeof Arrays];\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/enum-names-values-javascript-SCREAMING_SNAKE_CASE/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport { _110, Arrays, type ClientOptions, Foo, MyFoo, MyFoo2, Numbers } from './types.gen';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/enum-names-values-javascript-SCREAMING_SNAKE_CASE/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type ClientOptions = {\n    baseUrl: `${string}://${string}` | (string & {});\n};\n\nexport const _110 = { '1_10': '1-10', '11_20': '11-20' } as const;\n\nexport type _110 = typeof _110[keyof typeof _110];\n\nexport const MyFoo = { MY_FOO: 'myFoo', MY_BAR: 'myBar' } as const;\n\nexport type MyFoo = typeof MyFoo[keyof typeof MyFoo];\n\nexport const MyFoo2 = { MY_FOO: 'MyFoo', MY_BAR: 'MyBar' } as const;\n\nexport type MyFoo2 = typeof MyFoo2[keyof typeof MyFoo2];\n\nexport const Foo = {\n    FOO: 'foo',\n    BAR: 'bar',\n    NULL: null,\n    '': '',\n    TRUE: true,\n    FALSE: false\n} as const;\n\nexport type Foo = typeof Foo[keyof typeof Foo];\n\nexport const Numbers = {\n    100: 100,\n    200: 200,\n    300: 300,\n    '-100': -100,\n    '-200': -200,\n    '-300': -300\n} as const;\n\nexport type Numbers = typeof Numbers[keyof typeof Numbers];\n\nexport const Arrays = {\n    0: ['foo'],\n    1: ['bar'],\n    2: ['baz']\n} as const;\n\nexport type Arrays = typeof Arrays[keyof typeof Arrays];\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/enum-names-values-javascript-camelCase/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport { _110, Arrays, type ClientOptions, Foo, MyFoo, MyFoo2, Numbers } from './types.gen';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/enum-names-values-javascript-camelCase/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type ClientOptions = {\n    baseUrl: `${string}://${string}` | (string & {});\n};\n\nexport const _110 = { 110: '1-10', 1120: '11-20' } as const;\n\nexport type _110 = typeof _110[keyof typeof _110];\n\nexport const MyFoo = { myFoo: 'myFoo', myBar: 'myBar' } as const;\n\nexport type MyFoo = typeof MyFoo[keyof typeof MyFoo];\n\nexport const MyFoo2 = { myFoo: 'MyFoo', myBar: 'MyBar' } as const;\n\nexport type MyFoo2 = typeof MyFoo2[keyof typeof MyFoo2];\n\nexport const Foo = {\n    foo: 'foo',\n    bar: 'bar',\n    null: null,\n    '': '',\n    true: true,\n    false: false\n} as const;\n\nexport type Foo = typeof Foo[keyof typeof Foo];\n\nexport const Numbers = {\n    100: 100,\n    200: 200,\n    300: 300,\n    '-100': -100,\n    '-200': -200,\n    '-300': -300\n} as const;\n\nexport type Numbers = typeof Numbers[keyof typeof Numbers];\n\nexport const Arrays = {\n    0: ['foo'],\n    1: ['bar'],\n    2: ['baz']\n} as const;\n\nexport type Arrays = typeof Arrays[keyof typeof Arrays];\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/enum-names-values-javascript-ignore-null/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport { _110, Arrays, type ClientOptions, Foo, MyFoo, MyFoo2, Numbers } from './types.gen';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/enum-names-values-javascript-ignore-null/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type ClientOptions = {\n    baseUrl: `${string}://${string}` | (string & {});\n};\n\nexport const _110 = { '1-10': '1-10', '11-20': '11-20' } as const;\n\nexport type _110 = typeof _110[keyof typeof _110];\n\nexport const MyFoo = { myFoo: 'myFoo', myBar: 'myBar' } as const;\n\nexport type MyFoo = typeof MyFoo[keyof typeof MyFoo];\n\nexport const MyFoo2 = { MyFoo: 'MyFoo', MyBar: 'MyBar' } as const;\n\nexport type MyFoo2 = typeof MyFoo2[keyof typeof MyFoo2];\n\nexport const Foo = {\n    foo: 'foo',\n    bar: 'bar',\n    '': '',\n    true: true,\n    false: false\n} as const;\n\nexport type Foo = typeof Foo[keyof typeof Foo];\n\nexport const Numbers = {\n    100: 100,\n    200: 200,\n    300: 300,\n    '-100': -100,\n    '-200': -200,\n    '-300': -300\n} as const;\n\nexport type Numbers = typeof Numbers[keyof typeof Numbers];\n\nexport const Arrays = {\n    0: ['foo'],\n    1: ['bar'],\n    2: ['baz']\n} as const;\n\nexport type Arrays = typeof Arrays[keyof typeof Arrays];\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/enum-names-values-javascript-preserve/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport { _110, Arrays, type ClientOptions, Foo, MyFoo, MyFoo2, Numbers } from './types.gen';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/enum-names-values-javascript-preserve/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type ClientOptions = {\n    baseUrl: `${string}://${string}` | (string & {});\n};\n\nexport const _110 = { '1-10': '1-10', '11-20': '11-20' } as const;\n\nexport type _110 = typeof _110[keyof typeof _110];\n\nexport const MyFoo = { myFoo: 'myFoo', myBar: 'myBar' } as const;\n\nexport type MyFoo = typeof MyFoo[keyof typeof MyFoo];\n\nexport const MyFoo2 = { MyFoo: 'MyFoo', MyBar: 'MyBar' } as const;\n\nexport type MyFoo2 = typeof MyFoo2[keyof typeof MyFoo2];\n\nexport const Foo = {\n    foo: 'foo',\n    bar: 'bar',\n    null: null,\n    '': '',\n    true: true,\n    false: false\n} as const;\n\nexport type Foo = typeof Foo[keyof typeof Foo];\n\nexport const Numbers = {\n    100: 100,\n    200: 200,\n    300: 300,\n    '-100': -100,\n    '-200': -200,\n    '-300': -300\n} as const;\n\nexport type Numbers = typeof Numbers[keyof typeof Numbers];\n\nexport const Arrays = {\n    0: ['foo'],\n    1: ['bar'],\n    2: ['baz']\n} as const;\n\nexport type Arrays = typeof Arrays[keyof typeof Arrays];\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/enum-names-values-javascript-snake_case/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport { _110, Arrays, type ClientOptions, Foo, MyFoo, MyFoo2, Numbers } from './types.gen';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/enum-names-values-javascript-snake_case/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type ClientOptions = {\n    baseUrl: `${string}://${string}` | (string & {});\n};\n\nexport const _110 = { '1_10': '1-10', '11_20': '11-20' } as const;\n\nexport type _110 = typeof _110[keyof typeof _110];\n\nexport const MyFoo = { my_foo: 'myFoo', my_bar: 'myBar' } as const;\n\nexport type MyFoo = typeof MyFoo[keyof typeof MyFoo];\n\nexport const MyFoo2 = { my_foo: 'MyFoo', my_bar: 'MyBar' } as const;\n\nexport type MyFoo2 = typeof MyFoo2[keyof typeof MyFoo2];\n\nexport const Foo = {\n    foo: 'foo',\n    bar: 'bar',\n    null: null,\n    '': '',\n    true: true,\n    false: false\n} as const;\n\nexport type Foo = typeof Foo[keyof typeof Foo];\n\nexport const Numbers = {\n    100: 100,\n    200: 200,\n    300: 300,\n    '-100': -100,\n    '-200': -200,\n    '-300': -300\n} as const;\n\nexport type Numbers = typeof Numbers[keyof typeof Numbers];\n\nexport const Arrays = {\n    0: ['foo'],\n    1: ['bar'],\n    2: ['baz']\n} as const;\n\nexport type Arrays = typeof Arrays[keyof typeof Arrays];\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/enum-names-values-typescript-PascalCase/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport { _110, type Arrays, type ClientOptions, type Foo, MyFoo, MyFoo2, Numbers } from './types.gen';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/enum-names-values-typescript-PascalCase/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type ClientOptions = {\n    baseUrl: `${string}://${string}` | (string & {});\n};\n\nexport enum _110 {\n    _110 = '1-10',\n    _1120 = '11-20'\n}\n\nexport enum MyFoo {\n    MyFoo = 'myFoo',\n    MyBar = 'myBar'\n}\n\nexport enum MyFoo2 {\n    MyFoo = 'MyFoo',\n    MyBar = 'MyBar'\n}\n\nexport type Foo = 'foo' | 'bar' | null | '' | true | false;\n\nexport enum Numbers {\n    _100 = 100,\n    _200 = 200,\n    _300 = 300,\n    '_-100' = -100,\n    '_-200' = -200,\n    '_-300' = -300\n}\n\nexport type Arrays = [\n    'foo'\n] | [\n    'bar'\n] | [\n    'baz'\n];\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/enum-names-values-typescript-SCREAMING_SNAKE_CASE/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport { _110, type Arrays, type ClientOptions, type Foo, MyFoo, MyFoo2, Numbers } from './types.gen';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/enum-names-values-typescript-SCREAMING_SNAKE_CASE/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type ClientOptions = {\n    baseUrl: `${string}://${string}` | (string & {});\n};\n\nexport enum _110 {\n    '1_10' = '1-10',\n    '11_20' = '11-20'\n}\n\nexport enum MyFoo {\n    MY_FOO = 'myFoo',\n    MY_BAR = 'myBar'\n}\n\nexport enum MyFoo2 {\n    MY_FOO = 'MyFoo',\n    MY_BAR = 'MyBar'\n}\n\nexport type Foo = 'foo' | 'bar' | null | '' | true | false;\n\nexport enum Numbers {\n    _100 = 100,\n    _200 = 200,\n    _300 = 300,\n    '_-100' = -100,\n    '_-200' = -200,\n    '_-300' = -300\n}\n\nexport type Arrays = [\n    'foo'\n] | [\n    'bar'\n] | [\n    'baz'\n];\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/enum-names-values-typescript-camelCase/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport { _110, type Arrays, type ClientOptions, type Foo, MyFoo, MyFoo2, Numbers } from './types.gen';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/enum-names-values-typescript-camelCase/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type ClientOptions = {\n    baseUrl: `${string}://${string}` | (string & {});\n};\n\nexport enum _110 {\n    _110 = '1-10',\n    _1120 = '11-20'\n}\n\nexport enum MyFoo {\n    myFoo = 'myFoo',\n    myBar = 'myBar'\n}\n\nexport enum MyFoo2 {\n    myFoo = 'MyFoo',\n    myBar = 'MyBar'\n}\n\nexport type Foo = 'foo' | 'bar' | null | '' | true | false;\n\nexport enum Numbers {\n    _100 = 100,\n    _200 = 200,\n    _300 = 300,\n    '_-100' = -100,\n    '_-200' = -200,\n    '_-300' = -300\n}\n\nexport type Arrays = [\n    'foo'\n] | [\n    'bar'\n] | [\n    'baz'\n];\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/enum-names-values-typescript-const/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport { _110, type Arrays, type ClientOptions, type Foo, MyFoo, MyFoo2, Numbers } from './types.gen';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/enum-names-values-typescript-const/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type ClientOptions = {\n    baseUrl: `${string}://${string}` | (string & {});\n};\n\nexport const enum _110 {\n    _110 = '1-10',\n    _1120 = '11-20'\n}\n\nexport const enum MyFoo {\n    myFoo = 'myFoo',\n    myBar = 'myBar'\n}\n\nexport const enum MyFoo2 {\n    myFoo = 'MyFoo',\n    myBar = 'MyBar'\n}\n\nexport type Foo = 'foo' | 'bar' | null | '' | true | false;\n\nexport const enum Numbers {\n    _100 = 100,\n    _200 = 200,\n    _300 = 300,\n    '_-100' = -100,\n    '_-200' = -200,\n    '_-300' = -300\n}\n\nexport type Arrays = [\n    'foo'\n] | [\n    'bar'\n] | [\n    'baz'\n];\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/enum-names-values-typescript-preserve/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport { _110, type Arrays, type ClientOptions, type Foo, MyFoo, MyFoo2, Numbers } from './types.gen';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/enum-names-values-typescript-preserve/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type ClientOptions = {\n    baseUrl: `${string}://${string}` | (string & {});\n};\n\nexport enum _110 {\n    '1-10' = '1-10',\n    '11-20' = '11-20'\n}\n\nexport enum MyFoo {\n    myFoo = 'myFoo',\n    myBar = 'myBar'\n}\n\nexport enum MyFoo2 {\n    MyFoo = 'MyFoo',\n    MyBar = 'MyBar'\n}\n\nexport type Foo = 'foo' | 'bar' | null | '' | true | false;\n\nexport enum Numbers {\n    _100 = 100,\n    _200 = 200,\n    _300 = 300,\n    '_-100' = -100,\n    '_-200' = -200,\n    '_-300' = -300\n}\n\nexport type Arrays = [\n    'foo'\n] | [\n    'bar'\n] | [\n    'baz'\n];\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/enum-names-values-typescript-snake_case/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport { _110, type Arrays, type ClientOptions, type Foo, MyFoo, MyFoo2, Numbers } from './types.gen';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/enum-names-values-typescript-snake_case/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type ClientOptions = {\n    baseUrl: `${string}://${string}` | (string & {});\n};\n\nexport enum _110 {\n    '1_10' = '1-10',\n    '11_20' = '11-20'\n}\n\nexport enum MyFoo {\n    my_foo = 'myFoo',\n    my_bar = 'myBar'\n}\n\nexport enum MyFoo2 {\n    my_foo = 'MyFoo',\n    my_bar = 'MyBar'\n}\n\nexport type Foo = 'foo' | 'bar' | null | '' | true | false;\n\nexport enum Numbers {\n    _100 = 100,\n    _200 = 200,\n    _300 = 300,\n    '_-100' = -100,\n    '_-200' = -200,\n    '_-300' = -300\n}\n\nexport type Arrays = [\n    'foo'\n] | [\n    'bar'\n] | [\n    'baz'\n];\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/enum-null/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type { Bar, Baz, ClientOptions, Foo } from './types.gen';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/enum-null/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type ClientOptions = {\n    baseUrl: `${string}://${string}` | (string & {});\n};\n\nexport type Foo = 'foo' | 'bar' | null;\n\nexport type Bar = 'foo' | 'bar';\n\nexport type Baz = 'foo' | 'bar';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/exclude-deprecated/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type { ClientOptions, Foo, PostFooData, PostFooResponses } from './types.gen';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/exclude-deprecated/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type ClientOptions = {\n    baseUrl: `${string}://${string}` | (string & {});\n};\n\nexport type Foo = string;\n\nexport type PostFooData = {\n    body: Foo;\n    path?: never;\n    query?: never;\n    url: '/foo';\n};\n\nexport type PostFooResponses = {\n    /**\n     * OK\n     */\n    200: unknown;\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/external/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type { _1, ClientOptions, Deep, ExternalAllOfSchema, ExternalAnyOfSchema, ExternalArraySchema, ExternalDeepParam, ExternalDoubleNestedNumeric, ExternalDoubleNestedProp, ExternalIdParam, ExternalMixedBody, ExternalMixedProperties, ExternalModelBody, ExternalNested, ExternalNestedBody, ExternalNestedNumeric, ExternalNestedNumericObjectA, ExternalNestedNumericObjectB, ExternalNestedObjectA, ExternalNestedObjectB, ExternalNumericParam, ExternalSchemaA, ExternalSchemaB, ExternalSchemaC, ExternalSchemaExternalProp, ExternalSchemaExternalPropAlias, ExternalSchemaPathA, ExternalSchemaPathB, ExternalSchemaPropertyA, ExternalSchemaPropertyB, ExternalSchemaPropertyC, ExternalSchemaPropertyD, ExternalSharedModel, ExternalSharedModelWithUuid, ExternalUnionSchema, ExternalUuidBody, ExternalUuidParam, GetExternalArrayData, GetExternalArrayResponse, GetExternalArrayResponses, GetExternalMixedData, GetExternalMixedResponse, GetExternalMixedResponses, GetExternalModelData, GetExternalModelError, GetExternalModelErrors, GetExternalModelResponse, GetExternalModelResponses, GetExternalNestedData, GetExternalNestedResponse, GetExternalNestedResponses, GetExternalPropertiesByIdData, GetExternalPropertiesByIdResponse, GetExternalPropertiesByIdResponses, GetExternalUnionData, GetExternalUnionResponse, GetExternalUnionResponses, GetExternalUuidData, GetExternalUuidResponse, GetExternalUuidResponses, Id, Name, PostExternalArrayData, PostExternalArrayResponse, PostExternalArrayResponses, PostExternalMixedData, PostExternalMixedResponse, PostExternalMixedResponses, PostExternalModelData, PostExternalModelError, PostExternalModelErrors, PostExternalModelResponse, PostExternalModelResponses, PostExternalNestedData, PostExternalNestedResponse, PostExternalNestedResponses, PostExternalUnionData, PostExternalUnionResponse, PostExternalUnionResponses, PutExternalUuidData, PutExternalUuidResponse, PutExternalUuidResponses } from './types.gen';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/external/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type ClientOptions = {\n    baseUrl: `${string}://${string}` | (string & {});\n};\n\nexport type _1 = string;\n\nexport type ExternalSchemaA = ExternalSharedModel;\n\nexport type ExternalSchemaB = ExternalSharedModel;\n\nexport type ExternalSchemaC = ExternalSharedModel;\n\nexport type ExternalSchemaPathA = ExternalSharedModel;\n\nexport type ExternalSchemaPathB = ExternalSharedModel;\n\n/**\n * External schema property (A)\n */\nexport type ExternalSchemaPropertyA = {\n    uuid1?: ExternalSharedModelWithUuid;\n};\n\n/**\n * External schema property (B) - second use of UUID\n */\nexport type ExternalSchemaPropertyB = {\n    uuid2?: ExternalSharedModelWithUuid;\n};\n\n/**\n * External schema property (C) - third use of UUID\n */\nexport type ExternalSchemaPropertyC = {\n    uuid3?: ExternalSharedModelWithUuid;\n};\n\n/**\n * External schema property with duplicate refs (D)\n */\nexport type ExternalSchemaPropertyD = {\n    uuid4?: ExternalSharedModelWithUuid;\n    uuid5?: ExternalSharedModelWithUuid;\n};\n\n/**\n * External schema property via external property ref (id)\n */\nexport type ExternalSchemaExternalProp = {\n    id3?: Id;\n    id4?: Id;\n};\n\n/**\n * Alias to external property via component property ref\n */\nexport type ExternalSchemaExternalPropAlias = {\n    id5?: Id;\n    id6?: Id;\n};\n\n/**\n * External double nested prop via property ref\n */\nexport type ExternalDoubleNestedProp = {\n    deep1?: Deep;\n    deep2?: Deep;\n};\n\n/**\n * External double nested numeric properties\n */\nexport type ExternalDoubleNestedNumeric = {\n    numeric1?: _1;\n    numeric2?: _1;\n};\n\nexport type ExternalNestedObjectA = ExternalNested;\n\nexport type ExternalNestedObjectB = ExternalNested;\n\nexport type ExternalNestedNumericObjectA = ExternalNestedNumeric;\n\nexport type ExternalNestedNumericObjectB = ExternalNestedNumeric;\n\n/**\n * Mixed external property references\n */\nexport type ExternalMixedProperties = {\n    id7?: Id;\n    name1?: Name;\n    uuid6?: ExternalSharedModelWithUuid;\n    deep3?: Deep;\n    numeric3?: _1;\n};\n\n/**\n * Array containing external references\n */\nexport type ExternalArraySchema = {\n    items?: Array<ExternalSharedModel>;\n    uuidItems?: Array<ExternalSharedModelWithUuid>;\n};\n\n/**\n * Union type with external references\n */\nexport type ExternalUnionSchema = ExternalSharedModel | ExternalSharedModelWithUuid;\n\n/**\n * AllOf with external references\n */\nexport type ExternalAllOfSchema = ExternalSharedModel & {\n    additional?: ExternalSharedModelWithUuid;\n};\n\n/**\n * AnyOf with external references\n */\nexport type ExternalAnyOfSchema = ExternalNested | ExternalNestedNumeric;\n\nexport type ExternalNested = {\n    inner?: {\n        deep?: string;\n    };\n};\n\nexport type Deep = string;\n\nexport type ExternalNestedNumeric = {\n    0?: {\n        1?: string;\n    };\n};\n\nexport type ExternalSharedModel = {\n    id: string;\n    name?: string;\n};\n\nexport type Id = string;\n\nexport type Name = string;\n\nexport type ExternalSharedModelWithUuid = string;\n\nexport type ExternalIdParam = Id;\n\nexport type ExternalUuidParam = ExternalSharedModelWithUuid;\n\nexport type ExternalDeepParam = Deep;\n\nexport type ExternalNumericParam = _1;\n\nexport type ExternalModelBody = ExternalSharedModel;\n\nexport type ExternalUuidBody = ExternalSharedModelWithUuid;\n\nexport type ExternalNestedBody = ExternalNested;\n\n/**\n * Request body with mixed external properties\n */\nexport type ExternalMixedBody = {\n    id?: Id;\n    name?: Name;\n    uuid?: ExternalSharedModelWithUuid;\n    deep?: Deep;\n};\n\nexport type GetExternalModelData = {\n    body?: never;\n    path: {\n        id: Id;\n    };\n    query?: {\n        uuid?: ExternalSharedModelWithUuid;\n    };\n    url: '/external-model';\n};\n\nexport type GetExternalModelErrors = {\n    /**\n     * Response using external UUID\n     */\n    400: ExternalSharedModelWithUuid;\n};\n\nexport type GetExternalModelError = GetExternalModelErrors[keyof GetExternalModelErrors];\n\nexport type GetExternalModelResponses = {\n    /**\n     * Response using external model\n     */\n    200: ExternalSharedModel;\n};\n\nexport type GetExternalModelResponse = GetExternalModelResponses[keyof GetExternalModelResponses];\n\nexport type PostExternalModelData = {\n    /**\n     * Request body using external model\n     */\n    body: ExternalModelBody;\n    path?: never;\n    query?: never;\n    url: '/external-model';\n};\n\nexport type PostExternalModelErrors = {\n    /**\n     * Response with union of external types\n     */\n    422: ExternalSharedModel | ExternalSharedModelWithUuid | ExternalNested;\n};\n\nexport type PostExternalModelError = PostExternalModelErrors[keyof PostExternalModelErrors];\n\nexport type PostExternalModelResponses = {\n    /**\n     * Response using external model\n     */\n    201: ExternalSharedModel;\n};\n\nexport type PostExternalModelResponse = PostExternalModelResponses[keyof PostExternalModelResponses];\n\nexport type GetExternalUuidData = {\n    body?: never;\n    path?: never;\n    query?: {\n        uuid?: ExternalSharedModelWithUuid;\n    };\n    url: '/external-uuid';\n};\n\nexport type GetExternalUuidResponses = {\n    /**\n     * Response using external UUID\n     */\n    200: ExternalSharedModelWithUuid;\n};\n\nexport type GetExternalUuidResponse = GetExternalUuidResponses[keyof GetExternalUuidResponses];\n\nexport type PutExternalUuidData = {\n    /**\n     * Request body using external UUID\n     */\n    body?: ExternalUuidBody;\n    path?: never;\n    query?: never;\n    url: '/external-uuid';\n};\n\nexport type PutExternalUuidResponses = {\n    /**\n     * Response using external UUID\n     */\n    200: ExternalSharedModelWithUuid;\n};\n\nexport type PutExternalUuidResponse = PutExternalUuidResponses[keyof PutExternalUuidResponses];\n\nexport type GetExternalNestedData = {\n    body?: never;\n    headers?: {\n        deep?: Deep;\n    };\n    path?: never;\n    query?: never;\n    url: '/external-nested';\n};\n\nexport type GetExternalNestedResponses = {\n    /**\n     * Response using external nested object\n     */\n    200: ExternalNested;\n};\n\nexport type GetExternalNestedResponse = GetExternalNestedResponses[keyof GetExternalNestedResponses];\n\nexport type PostExternalNestedData = {\n    /**\n     * Request body using external nested object\n     */\n    body?: ExternalNestedBody;\n    path?: never;\n    query?: never;\n    url: '/external-nested';\n};\n\nexport type PostExternalNestedResponses = {\n    /**\n     * Response using external nested object\n     */\n    201: ExternalNested;\n};\n\nexport type PostExternalNestedResponse = PostExternalNestedResponses[keyof PostExternalNestedResponses];\n\nexport type GetExternalMixedData = {\n    body?: never;\n    headers?: {\n        deep?: Deep;\n    };\n    path: {\n        id: Id;\n    };\n    query?: {\n        uuid?: ExternalSharedModelWithUuid;\n        numeric?: _1;\n    };\n    url: '/external-mixed';\n};\n\nexport type GetExternalMixedResponses = {\n    /**\n     * Response with array of external models\n     */\n    200: Array<ExternalSharedModel>;\n};\n\nexport type GetExternalMixedResponse = GetExternalMixedResponses[keyof GetExternalMixedResponses];\n\nexport type PostExternalMixedData = {\n    /**\n     * Request body with mixed external properties\n     */\n    body?: ExternalMixedBody;\n    path?: never;\n    query?: never;\n    url: '/external-mixed';\n};\n\nexport type PostExternalMixedResponses = {\n    /**\n     * Response using external model\n     */\n    201: ExternalSharedModel;\n};\n\nexport type PostExternalMixedResponse = PostExternalMixedResponses[keyof PostExternalMixedResponses];\n\nexport type GetExternalArrayData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/external-array';\n};\n\nexport type GetExternalArrayResponses = {\n    /**\n     * Response with array of external models\n     */\n    200: Array<ExternalSharedModel>;\n};\n\nexport type GetExternalArrayResponse = GetExternalArrayResponses[keyof GetExternalArrayResponses];\n\nexport type PostExternalArrayData = {\n    body: Array<ExternalSharedModel>;\n    path?: never;\n    query?: never;\n    url: '/external-array';\n};\n\nexport type PostExternalArrayResponses = {\n    /**\n     * Response with array of external models\n     */\n    201: Array<ExternalSharedModel>;\n};\n\nexport type PostExternalArrayResponse = PostExternalArrayResponses[keyof PostExternalArrayResponses];\n\nexport type GetExternalUnionData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/external-union';\n};\n\nexport type GetExternalUnionResponses = {\n    /**\n     * Response with union of external types\n     */\n    200: ExternalSharedModel | ExternalSharedModelWithUuid | ExternalNested;\n};\n\nexport type GetExternalUnionResponse = GetExternalUnionResponses[keyof GetExternalUnionResponses];\n\nexport type PostExternalUnionData = {\n    body: ExternalSharedModel | ExternalSharedModelWithUuid | ExternalNested;\n    path?: never;\n    query?: never;\n    url: '/external-union';\n};\n\nexport type PostExternalUnionResponses = {\n    /**\n     * Response with union of external types\n     */\n    201: ExternalSharedModel | ExternalSharedModelWithUuid | ExternalNested;\n};\n\nexport type PostExternalUnionResponse = PostExternalUnionResponses[keyof PostExternalUnionResponses];\n\nexport type GetExternalPropertiesByIdData = {\n    body?: never;\n    headers?: {\n        deep?: Deep;\n    };\n    path: {\n        id: Id;\n    };\n    query?: {\n        uuid?: ExternalSharedModelWithUuid;\n    };\n    url: '/external-properties/{id}';\n};\n\nexport type GetExternalPropertiesByIdResponses = {\n    200: {\n        id?: Id;\n        name?: Name;\n        uuid?: ExternalSharedModelWithUuid;\n        deep?: Deep;\n        numeric?: _1;\n    };\n};\n\nexport type GetExternalPropertiesByIdResponse = GetExternalPropertiesByIdResponses[keyof GetExternalPropertiesByIdResponses];\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/internal-name-conflict/@tanstack/react-query.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport { type DefaultError, queryOptions, type UseMutationOptions } from '@tanstack/react-query';\n\nimport { client } from '../client.gen';\nimport { create, create2, create3, type Options } from '../sdk.gen';\nimport type { Create2Data, Create3Data, CreateData } from '../types.gen';\n\nexport type QueryKey<TOptions extends Options> = [\n    Pick<TOptions, 'baseUrl' | 'body' | 'headers' | 'path' | 'query'> & {\n        _id: string;\n        _infinite?: boolean;\n        tags?: ReadonlyArray<string>;\n    }\n];\n\nconst createQueryKey = <TOptions extends Options>(id: string, options?: TOptions, infinite?: boolean, tags?: ReadonlyArray<string>): [\n    QueryKey<TOptions>[0]\n] => {\n    const params: QueryKey<TOptions>[0] = { _id: id, baseUrl: options?.baseUrl || (options?.client ?? client).getConfig().baseUrl } as QueryKey<TOptions>[0];\n    if (infinite) {\n        params._infinite = infinite;\n    }\n    if (tags) {\n        params.tags = tags;\n    }\n    if (options?.body) {\n        params.body = options.body;\n    }\n    if (options?.headers) {\n        params.headers = options.headers;\n    }\n    if (options?.path) {\n        params.path = options.path;\n    }\n    if (options?.query) {\n        params.query = options.query;\n    }\n    return [params];\n};\n\nexport const createQueryKey2 = (options?: Options<CreateData>) => createQueryKey('create', options);\n\nexport const createOptions = (options?: Options<CreateData>) => queryOptions<unknown, DefaultError, unknown, ReturnType<typeof createQueryKey2>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await create({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: createQueryKey2(options)\n});\n\nexport const create2Mutation = (options?: Partial<Options<Create2Data>>): UseMutationOptions<unknown, DefaultError, Options<Create2Data>> => {\n    const mutationOptions: UseMutationOptions<unknown, DefaultError, Options<Create2Data>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await create2({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const create3Mutation = (options?: Partial<Options<Create3Data>>): UseMutationOptions<unknown, DefaultError, Options<Create3Data>> => {\n    const mutationOptions: UseMutationOptions<unknown, DefaultError, Options<Create3Data>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await create3({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/internal-name-conflict/client/client.gen.ts",
    "content": "// 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 (options: RequestOptions) => {\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 url = buildUrl(opts);\n\n    return { opts, url };\n  };\n\n  const request: Client['request'] = async (options) => {\n    // @ts-expect-error\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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/internal-name-conflict/client/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type { Auth } from '../core/auth.gen';\nexport type { QuerySerializerOptions } from '../core/bodySerializer.gen';\nexport {\n  formDataBodySerializer,\n  jsonBodySerializer,\n  urlSearchParamsBodySerializer,\n} from '../core/bodySerializer.gen';\nexport { buildClientParams } from '../core/params.gen';\nexport { serializeQueryKeyValue } from '../core/queryKeySerializer.gen';\nexport { createClient } from './client.gen';\nexport type {\n  Client,\n  ClientOptions,\n  Config,\n  CreateClientConfig,\n  Options,\n  RequestOptions,\n  RequestResult,\n  ResolvedRequestOptions,\n  ResponseStyle,\n  TDataShape,\n} from './types.gen';\nexport { createConfig, mergeHeaders } from './utils.gen';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/internal-name-conflict/client/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { Auth } from '../core/auth.gen';\nimport type {\n  ServerSentEventsOptions,\n  ServerSentEventsResult,\n} from '../core/serverSentEvents.gen';\nimport type { Client as CoreClient, Config as CoreConfig } from '../core/types.gen';\nimport type { Middleware } from './utils.gen';\n\nexport type ResponseStyle = 'data' | 'fields';\n\nexport interface Config<T extends ClientOptions = ClientOptions>\n  extends Omit<RequestInit, 'body' | 'headers' | 'method'>, CoreConfig {\n  /**\n   * Base URL for all requests made by this client.\n   */\n  baseUrl?: T['baseUrl'];\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   * Please don't use the Fetch client for Next.js applications. The `next`\n   * options won't have any effect.\n   *\n   * Install {@link https://www.npmjs.com/package/@hey-api/client-next `@hey-api/client-next`} instead.\n   */\n  next?: never;\n  /**\n   * Return the response data parsed in a specified format. By default, `auto`\n   * will infer the appropriate method from the `Content-Type` response header.\n   * You can override this behavior with any of the {@link Body} methods.\n   * Select `stream` if you don't want to parse response data at all.\n   *\n   * @default 'auto'\n   */\n  parseAs?: 'arrayBuffer' | 'auto' | 'blob' | 'formData' | 'json' | 'stream' | 'text';\n  /**\n   * Should we return only data or multiple fields (data, error, response, etc.)?\n   *\n   * @default 'fields'\n   */\n  responseStyle?: ResponseStyle;\n  /**\n   * Throw an error instead of returning it in the response?\n   *\n   * @default false\n   */\n  throwOnError?: T['throwOnError'];\n}\n\nexport interface RequestOptions<\n  TData = unknown,\n  TResponseStyle extends ResponseStyle = 'fields',\n  ThrowOnError extends boolean = boolean,\n  Url extends string = string,\n>\n  extends\n    Config<{\n      responseStyle: TResponseStyle;\n      throwOnError: ThrowOnError;\n    }>,\n    Pick<\n      ServerSentEventsOptions<TData>,\n      | 'onRequest'\n      | 'onSseError'\n      | 'onSseEvent'\n      | 'sseDefaultRetryDelay'\n      | 'sseMaxRetryAttempts'\n      | 'sseMaxRetryDelay'\n    > {\n  /**\n   * Any body that you want to add to your request.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/fetch#body}\n   */\n  body?: unknown;\n  path?: Record<string, unknown>;\n  query?: Record<string, unknown>;\n  /**\n   * Security mechanism(s) to use for the request.\n   */\n  security?: ReadonlyArray<Auth>;\n  url: Url;\n}\n\nexport interface ResolvedRequestOptions<\n  TResponseStyle extends ResponseStyle = 'fields',\n  ThrowOnError extends boolean = boolean,\n  Url extends string = string,\n> extends RequestOptions<unknown, TResponseStyle, ThrowOnError, Url> {\n  serializedBody?: string;\n}\n\nexport type RequestResult<\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = boolean,\n  TResponseStyle extends ResponseStyle = 'fields',\n> = ThrowOnError extends true\n  ? Promise<\n      TResponseStyle extends 'data'\n        ? TData extends Record<string, unknown>\n          ? TData[keyof TData]\n          : TData\n        : {\n            data: TData extends Record<string, unknown> ? TData[keyof TData] : TData;\n            request: Request;\n            response: Response;\n          }\n    >\n  : Promise<\n      TResponseStyle extends 'data'\n        ? (TData extends Record<string, unknown> ? TData[keyof TData] : TData) | undefined\n        : (\n            | {\n                data: TData extends Record<string, unknown> ? TData[keyof TData] : TData;\n                error: undefined;\n              }\n            | {\n                data: undefined;\n                error: TError extends Record<string, unknown> ? TError[keyof TError] : TError;\n              }\n          ) & {\n            request: Request;\n            response: Response;\n          }\n    >;\n\nexport interface ClientOptions {\n  baseUrl?: string;\n  responseStyle?: ResponseStyle;\n  throwOnError?: boolean;\n}\n\ntype MethodFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'>,\n) => RequestResult<TData, TError, ThrowOnError, TResponseStyle>;\n\ntype SseFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'>,\n) => Promise<ServerSentEventsResult<TData, TError>>;\n\ntype RequestFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'> &\n    Pick<Required<RequestOptions<TData, TResponseStyle, ThrowOnError>>, 'method'>,\n) => RequestResult<TData, TError, ThrowOnError, TResponseStyle>;\n\ntype BuildUrlFn = <\n  TData extends {\n    body?: unknown;\n    path?: Record<string, unknown>;\n    query?: Record<string, unknown>;\n    url: string;\n  },\n>(\n  options: TData & Options<TData>,\n) => string;\n\nexport type Client = CoreClient<RequestFn, Config, MethodFn, BuildUrlFn, SseFn> & {\n  interceptors: Middleware<Request, Response, unknown, ResolvedRequestOptions>;\n};\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 = ClientOptions> = (\n  override?: Config<ClientOptions & T>,\n) => Config<Required<ClientOptions> & T>;\n\nexport interface TDataShape {\n  body?: unknown;\n  headers?: unknown;\n  path?: unknown;\n  query?: unknown;\n  url: string;\n}\n\ntype OmitKeys<T, K> = Pick<T, Exclude<keyof T, K>>;\n\nexport type Options<\n  TData extends TDataShape = TDataShape,\n  ThrowOnError extends boolean = boolean,\n  TResponse = unknown,\n  TResponseStyle extends ResponseStyle = 'fields',\n> = OmitKeys<\n  RequestOptions<TResponse, TResponseStyle, ThrowOnError>,\n  'body' | 'path' | 'query' | 'url'\n> &\n  ([TData] extends [never] ? unknown : Omit<TData, 'url'>);\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/internal-name-conflict/client/utils.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/internal-name-conflict/client.gen.ts",
    "content": "// 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>());\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/internal-name-conflict/core/auth.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/internal-name-conflict/core/bodySerializer.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/internal-name-conflict/core/params.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/internal-name-conflict/core/pathSerializer.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/internal-name-conflict/core/queryKeySerializer.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\n/**\n * JSON-friendly union that mirrors what Pinia Colada can hash.\n */\nexport type JsonValue =\n  | null\n  | string\n  | number\n  | boolean\n  | JsonValue[]\n  | { [key: string]: JsonValue };\n\n/**\n * Replacer that converts non-JSON values (bigint, Date, etc.) to safe substitutes.\n */\nexport const queryKeyJsonReplacer = (_key: string, value: unknown) => {\n  if (value === undefined || typeof value === 'function' || typeof value === 'symbol') {\n    return undefined;\n  }\n  if (typeof value === 'bigint') {\n    return value.toString();\n  }\n  if (value instanceof Date) {\n    return value.toISOString();\n  }\n  return value;\n};\n\n/**\n * Safely stringifies a value and parses it back into a JsonValue.\n */\nexport const stringifyToJsonValue = (input: unknown): JsonValue | undefined => {\n  try {\n    const json = JSON.stringify(input, queryKeyJsonReplacer);\n    if (json === undefined) {\n      return undefined;\n    }\n    return JSON.parse(json) as JsonValue;\n  } catch {\n    return undefined;\n  }\n};\n\n/**\n * Detects plain objects (including objects with a null prototype).\n */\nconst isPlainObject = (value: unknown): value is Record<string, unknown> => {\n  if (value === null || typeof value !== 'object') {\n    return false;\n  }\n  const prototype = Object.getPrototypeOf(value as object);\n  return prototype === Object.prototype || prototype === null;\n};\n\n/**\n * Turns URLSearchParams into a sorted JSON object for deterministic keys.\n */\nconst serializeSearchParams = (params: URLSearchParams): JsonValue => {\n  const entries = Array.from(params.entries()).sort(([a], [b]) => a.localeCompare(b));\n  const result: Record<string, JsonValue> = {};\n\n  for (const [key, value] of entries) {\n    const existing = result[key];\n    if (existing === undefined) {\n      result[key] = value;\n      continue;\n    }\n\n    if (Array.isArray(existing)) {\n      (existing as string[]).push(value);\n    } else {\n      result[key] = [existing, value];\n    }\n  }\n\n  return result;\n};\n\n/**\n * Normalizes any accepted value into a JSON-friendly shape for query keys.\n */\nexport const serializeQueryKeyValue = (value: unknown): JsonValue | undefined => {\n  if (value === null) {\n    return null;\n  }\n\n  if (typeof value === 'string' || typeof value === 'number' || typeof value === 'boolean') {\n    return value;\n  }\n\n  if (value === undefined || typeof value === 'function' || typeof value === 'symbol') {\n    return undefined;\n  }\n\n  if (typeof value === 'bigint') {\n    return value.toString();\n  }\n\n  if (value instanceof Date) {\n    return value.toISOString();\n  }\n\n  if (Array.isArray(value)) {\n    return stringifyToJsonValue(value);\n  }\n\n  if (typeof URLSearchParams !== 'undefined' && value instanceof URLSearchParams) {\n    return serializeSearchParams(value);\n  }\n\n  if (isPlainObject(value)) {\n    return stringifyToJsonValue(value);\n  }\n\n  return undefined;\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/internal-name-conflict/core/serverSentEvents.gen.ts",
    "content": "// 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 const 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            // Normalize line endings: CRLF -> LF, then CR -> LF\n            buffer = buffer.replace(/\\r\\n/g, '\\n').replace(/\\r/g, '\\n');\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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/internal-name-conflict/core/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { Auth, AuthToken } from './auth.gen';\nimport type { BodySerializer, QuerySerializer, QuerySerializerOptions } from './bodySerializer.gen';\n\nexport type HttpMethod =\n  | 'connect'\n  | 'delete'\n  | 'get'\n  | 'head'\n  | 'options'\n  | 'patch'\n  | 'post'\n  | 'put'\n  | 'trace';\n\nexport type Client<\n  RequestFn = never,\n  Config = unknown,\n  MethodFn = never,\n  BuildUrlFn = never,\n  SseFn = never,\n> = {\n  /**\n   * Returns the final request URL.\n   */\n  buildUrl: BuildUrlFn;\n  getConfig: () => Config;\n  request: RequestFn;\n  setConfig: (config: Config) => Config;\n} & {\n  [K in HttpMethod]: MethodFn;\n} & ([SseFn] extends [never] ? { sse?: never } : { sse: { [K in HttpMethod]: SseFn } });\n\nexport interface Config {\n  /**\n   * Auth token or a function returning auth token. The resolved value will be\n   * added to the request payload as defined by its `security` array.\n   */\n  auth?: ((auth: Auth) => Promise<AuthToken> | AuthToken) | AuthToken;\n  /**\n   * A function for serializing request body parameter. By default,\n   * {@link JSON.stringify()} will be used.\n   */\n  bodySerializer?: BodySerializer | null;\n  /**\n   * An object containing any HTTP headers that you want to pre-populate your\n   * `Headers` object with.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/Headers/Headers#init See more}\n   */\n  headers?:\n    | RequestInit['headers']\n    | Record<\n        string,\n        string | number | boolean | (string | number | boolean)[] | null | undefined | unknown\n      >;\n  /**\n   * The request method.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/fetch#method See more}\n   */\n  method?: Uppercase<HttpMethod>;\n  /**\n   * A function for serializing request query parameters. By default, arrays\n   * will be exploded in form style, objects will be exploded in deepObject\n   * style, and reserved characters are percent-encoded.\n   *\n   * This method will have no effect if the native `paramsSerializer()` Axios\n   * API function is used.\n   *\n   * {@link https://swagger.io/docs/specification/serialization/#query View examples}\n   */\n  querySerializer?: QuerySerializer | QuerySerializerOptions;\n  /**\n   * A function validating request data. This is useful if you want to ensure\n   * the request conforms to the desired shape, so it can be safely sent to\n   * the server.\n   */\n  requestValidator?: (data: unknown) => Promise<unknown>;\n  /**\n   * A function transforming response data before it's returned. This is useful\n   * for post-processing data, e.g. converting ISO strings into Date objects.\n   */\n  responseTransformer?: (data: unknown) => Promise<unknown>;\n  /**\n   * A function validating response data. This is useful if you want to ensure\n   * the response conforms to the desired shape, so it can be safely passed to\n   * the transformers and returned to the user.\n   */\n  responseValidator?: (data: unknown) => Promise<unknown>;\n}\n\ntype IsExactlyNeverOrNeverUndefined<T> = [T] extends [never]\n  ? true\n  : [T] extends [never | undefined]\n    ? [undefined] extends [T]\n      ? false\n      : true\n    : false;\n\nexport type OmitNever<T extends Record<string, unknown>> = {\n  [K in keyof T as IsExactlyNeverOrNeverUndefined<T[K]> extends true ? never : K]: T[K];\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/internal-name-conflict/core/utils.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/internal-name-conflict/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport { create, create2, create3, type Options } from './sdk.gen';\nexport type { ClientOptions, Create2Data, Create2Responses, Create3Data, Create3Responses, CreateData, CreateResponses } from './types.gen';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/internal-name-conflict/sdk.gen.ts",
    "content": "// 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 { Create2Data, Create2Responses, Create3Data, Create3Responses, CreateData, CreateResponses } from './types.gen';\n\nexport type Options<TData extends TDataShape = TDataShape, ThrowOnError extends boolean = boolean> = Options2<TData, ThrowOnError> & {\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\nexport const create = <ThrowOnError extends boolean = false>(options?: Options<CreateData, ThrowOnError>) => (options?.client ?? client).get<CreateResponses, unknown, ThrowOnError>({ url: '/foo', ...options });\n\nexport const create2 = <ThrowOnError extends boolean = false>(options?: Options<Create2Data, ThrowOnError>) => (options?.client ?? client).patch<Create2Responses, unknown, ThrowOnError>({ url: '/foo', ...options });\n\nexport const create3 = <ThrowOnError extends boolean = false>(options?: Options<Create3Data, ThrowOnError>) => (options?.client ?? client).post<Create3Responses, unknown, ThrowOnError>({ url: '/foo', ...options });\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/internal-name-conflict/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type ClientOptions = {\n    baseUrl: `${string}://${string}` | (string & {});\n};\n\nexport type CreateData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/foo';\n};\n\nexport type CreateResponses = {\n    /**\n     * OK\n     */\n    200: unknown;\n};\n\nexport type Create2Data = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/foo';\n};\n\nexport type Create2Responses = {\n    /**\n     * OK\n     */\n    200: unknown;\n};\n\nexport type Create3Data = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/foo';\n};\n\nexport type Create3Responses = {\n    /**\n     * OK\n     */\n    200: unknown;\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/operation-204/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type { ClientOptions, PostFooData, PostFooResponse, PostFooResponses } from './types.gen';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/operation-204/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type ClientOptions = {\n    baseUrl: `${string}://${string}` | (string & {});\n};\n\nexport type PostFooData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/foo';\n};\n\nexport type PostFooResponses = {\n    /**\n     * OK\n     */\n    200: string;\n    /**\n     * Created\n     */\n    204: void;\n};\n\nexport type PostFooResponse = PostFooResponses[keyof PostFooResponses];\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/parameter-explode-false/client/client.gen.ts",
    "content": "// 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 (options: RequestOptions) => {\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 url = buildUrl(opts);\n\n    return { opts, url };\n  };\n\n  const request: Client['request'] = async (options) => {\n    // @ts-expect-error\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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/parameter-explode-false/client/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type { Auth } from '../core/auth.gen';\nexport type { QuerySerializerOptions } from '../core/bodySerializer.gen';\nexport {\n  formDataBodySerializer,\n  jsonBodySerializer,\n  urlSearchParamsBodySerializer,\n} from '../core/bodySerializer.gen';\nexport { buildClientParams } from '../core/params.gen';\nexport { serializeQueryKeyValue } from '../core/queryKeySerializer.gen';\nexport { createClient } from './client.gen';\nexport type {\n  Client,\n  ClientOptions,\n  Config,\n  CreateClientConfig,\n  Options,\n  RequestOptions,\n  RequestResult,\n  ResolvedRequestOptions,\n  ResponseStyle,\n  TDataShape,\n} from './types.gen';\nexport { createConfig, mergeHeaders } from './utils.gen';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/parameter-explode-false/client/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { Auth } from '../core/auth.gen';\nimport type {\n  ServerSentEventsOptions,\n  ServerSentEventsResult,\n} from '../core/serverSentEvents.gen';\nimport type { Client as CoreClient, Config as CoreConfig } from '../core/types.gen';\nimport type { Middleware } from './utils.gen';\n\nexport type ResponseStyle = 'data' | 'fields';\n\nexport interface Config<T extends ClientOptions = ClientOptions>\n  extends Omit<RequestInit, 'body' | 'headers' | 'method'>, CoreConfig {\n  /**\n   * Base URL for all requests made by this client.\n   */\n  baseUrl?: T['baseUrl'];\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   * Please don't use the Fetch client for Next.js applications. The `next`\n   * options won't have any effect.\n   *\n   * Install {@link https://www.npmjs.com/package/@hey-api/client-next `@hey-api/client-next`} instead.\n   */\n  next?: never;\n  /**\n   * Return the response data parsed in a specified format. By default, `auto`\n   * will infer the appropriate method from the `Content-Type` response header.\n   * You can override this behavior with any of the {@link Body} methods.\n   * Select `stream` if you don't want to parse response data at all.\n   *\n   * @default 'auto'\n   */\n  parseAs?: 'arrayBuffer' | 'auto' | 'blob' | 'formData' | 'json' | 'stream' | 'text';\n  /**\n   * Should we return only data or multiple fields (data, error, response, etc.)?\n   *\n   * @default 'fields'\n   */\n  responseStyle?: ResponseStyle;\n  /**\n   * Throw an error instead of returning it in the response?\n   *\n   * @default false\n   */\n  throwOnError?: T['throwOnError'];\n}\n\nexport interface RequestOptions<\n  TData = unknown,\n  TResponseStyle extends ResponseStyle = 'fields',\n  ThrowOnError extends boolean = boolean,\n  Url extends string = string,\n>\n  extends\n    Config<{\n      responseStyle: TResponseStyle;\n      throwOnError: ThrowOnError;\n    }>,\n    Pick<\n      ServerSentEventsOptions<TData>,\n      | 'onRequest'\n      | 'onSseError'\n      | 'onSseEvent'\n      | 'sseDefaultRetryDelay'\n      | 'sseMaxRetryAttempts'\n      | 'sseMaxRetryDelay'\n    > {\n  /**\n   * Any body that you want to add to your request.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/fetch#body}\n   */\n  body?: unknown;\n  path?: Record<string, unknown>;\n  query?: Record<string, unknown>;\n  /**\n   * Security mechanism(s) to use for the request.\n   */\n  security?: ReadonlyArray<Auth>;\n  url: Url;\n}\n\nexport interface ResolvedRequestOptions<\n  TResponseStyle extends ResponseStyle = 'fields',\n  ThrowOnError extends boolean = boolean,\n  Url extends string = string,\n> extends RequestOptions<unknown, TResponseStyle, ThrowOnError, Url> {\n  serializedBody?: string;\n}\n\nexport type RequestResult<\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = boolean,\n  TResponseStyle extends ResponseStyle = 'fields',\n> = ThrowOnError extends true\n  ? Promise<\n      TResponseStyle extends 'data'\n        ? TData extends Record<string, unknown>\n          ? TData[keyof TData]\n          : TData\n        : {\n            data: TData extends Record<string, unknown> ? TData[keyof TData] : TData;\n            request: Request;\n            response: Response;\n          }\n    >\n  : Promise<\n      TResponseStyle extends 'data'\n        ? (TData extends Record<string, unknown> ? TData[keyof TData] : TData) | undefined\n        : (\n            | {\n                data: TData extends Record<string, unknown> ? TData[keyof TData] : TData;\n                error: undefined;\n              }\n            | {\n                data: undefined;\n                error: TError extends Record<string, unknown> ? TError[keyof TError] : TError;\n              }\n          ) & {\n            request: Request;\n            response: Response;\n          }\n    >;\n\nexport interface ClientOptions {\n  baseUrl?: string;\n  responseStyle?: ResponseStyle;\n  throwOnError?: boolean;\n}\n\ntype MethodFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'>,\n) => RequestResult<TData, TError, ThrowOnError, TResponseStyle>;\n\ntype SseFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'>,\n) => Promise<ServerSentEventsResult<TData, TError>>;\n\ntype RequestFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'> &\n    Pick<Required<RequestOptions<TData, TResponseStyle, ThrowOnError>>, 'method'>,\n) => RequestResult<TData, TError, ThrowOnError, TResponseStyle>;\n\ntype BuildUrlFn = <\n  TData extends {\n    body?: unknown;\n    path?: Record<string, unknown>;\n    query?: Record<string, unknown>;\n    url: string;\n  },\n>(\n  options: TData & Options<TData>,\n) => string;\n\nexport type Client = CoreClient<RequestFn, Config, MethodFn, BuildUrlFn, SseFn> & {\n  interceptors: Middleware<Request, Response, unknown, ResolvedRequestOptions>;\n};\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 = ClientOptions> = (\n  override?: Config<ClientOptions & T>,\n) => Config<Required<ClientOptions> & T>;\n\nexport interface TDataShape {\n  body?: unknown;\n  headers?: unknown;\n  path?: unknown;\n  query?: unknown;\n  url: string;\n}\n\ntype OmitKeys<T, K> = Pick<T, Exclude<keyof T, K>>;\n\nexport type Options<\n  TData extends TDataShape = TDataShape,\n  ThrowOnError extends boolean = boolean,\n  TResponse = unknown,\n  TResponseStyle extends ResponseStyle = 'fields',\n> = OmitKeys<\n  RequestOptions<TResponse, TResponseStyle, ThrowOnError>,\n  'body' | 'path' | 'query' | 'url'\n> &\n  ([TData] extends [never] ? unknown : Omit<TData, 'url'>);\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/parameter-explode-false/client/utils.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/parameter-explode-false/client.gen.ts",
    "content": "// 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>());\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/parameter-explode-false/core/auth.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/parameter-explode-false/core/bodySerializer.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/parameter-explode-false/core/params.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/parameter-explode-false/core/pathSerializer.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/parameter-explode-false/core/queryKeySerializer.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\n/**\n * JSON-friendly union that mirrors what Pinia Colada can hash.\n */\nexport type JsonValue =\n  | null\n  | string\n  | number\n  | boolean\n  | JsonValue[]\n  | { [key: string]: JsonValue };\n\n/**\n * Replacer that converts non-JSON values (bigint, Date, etc.) to safe substitutes.\n */\nexport const queryKeyJsonReplacer = (_key: string, value: unknown) => {\n  if (value === undefined || typeof value === 'function' || typeof value === 'symbol') {\n    return undefined;\n  }\n  if (typeof value === 'bigint') {\n    return value.toString();\n  }\n  if (value instanceof Date) {\n    return value.toISOString();\n  }\n  return value;\n};\n\n/**\n * Safely stringifies a value and parses it back into a JsonValue.\n */\nexport const stringifyToJsonValue = (input: unknown): JsonValue | undefined => {\n  try {\n    const json = JSON.stringify(input, queryKeyJsonReplacer);\n    if (json === undefined) {\n      return undefined;\n    }\n    return JSON.parse(json) as JsonValue;\n  } catch {\n    return undefined;\n  }\n};\n\n/**\n * Detects plain objects (including objects with a null prototype).\n */\nconst isPlainObject = (value: unknown): value is Record<string, unknown> => {\n  if (value === null || typeof value !== 'object') {\n    return false;\n  }\n  const prototype = Object.getPrototypeOf(value as object);\n  return prototype === Object.prototype || prototype === null;\n};\n\n/**\n * Turns URLSearchParams into a sorted JSON object for deterministic keys.\n */\nconst serializeSearchParams = (params: URLSearchParams): JsonValue => {\n  const entries = Array.from(params.entries()).sort(([a], [b]) => a.localeCompare(b));\n  const result: Record<string, JsonValue> = {};\n\n  for (const [key, value] of entries) {\n    const existing = result[key];\n    if (existing === undefined) {\n      result[key] = value;\n      continue;\n    }\n\n    if (Array.isArray(existing)) {\n      (existing as string[]).push(value);\n    } else {\n      result[key] = [existing, value];\n    }\n  }\n\n  return result;\n};\n\n/**\n * Normalizes any accepted value into a JSON-friendly shape for query keys.\n */\nexport const serializeQueryKeyValue = (value: unknown): JsonValue | undefined => {\n  if (value === null) {\n    return null;\n  }\n\n  if (typeof value === 'string' || typeof value === 'number' || typeof value === 'boolean') {\n    return value;\n  }\n\n  if (value === undefined || typeof value === 'function' || typeof value === 'symbol') {\n    return undefined;\n  }\n\n  if (typeof value === 'bigint') {\n    return value.toString();\n  }\n\n  if (value instanceof Date) {\n    return value.toISOString();\n  }\n\n  if (Array.isArray(value)) {\n    return stringifyToJsonValue(value);\n  }\n\n  if (typeof URLSearchParams !== 'undefined' && value instanceof URLSearchParams) {\n    return serializeSearchParams(value);\n  }\n\n  if (isPlainObject(value)) {\n    return stringifyToJsonValue(value);\n  }\n\n  return undefined;\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/parameter-explode-false/core/serverSentEvents.gen.ts",
    "content": "// 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 const 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            // Normalize line endings: CRLF -> LF, then CR -> LF\n            buffer = buffer.replace(/\\r\\n/g, '\\n').replace(/\\r/g, '\\n');\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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/parameter-explode-false/core/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { Auth, AuthToken } from './auth.gen';\nimport type { BodySerializer, QuerySerializer, QuerySerializerOptions } from './bodySerializer.gen';\n\nexport type HttpMethod =\n  | 'connect'\n  | 'delete'\n  | 'get'\n  | 'head'\n  | 'options'\n  | 'patch'\n  | 'post'\n  | 'put'\n  | 'trace';\n\nexport type Client<\n  RequestFn = never,\n  Config = unknown,\n  MethodFn = never,\n  BuildUrlFn = never,\n  SseFn = never,\n> = {\n  /**\n   * Returns the final request URL.\n   */\n  buildUrl: BuildUrlFn;\n  getConfig: () => Config;\n  request: RequestFn;\n  setConfig: (config: Config) => Config;\n} & {\n  [K in HttpMethod]: MethodFn;\n} & ([SseFn] extends [never] ? { sse?: never } : { sse: { [K in HttpMethod]: SseFn } });\n\nexport interface Config {\n  /**\n   * Auth token or a function returning auth token. The resolved value will be\n   * added to the request payload as defined by its `security` array.\n   */\n  auth?: ((auth: Auth) => Promise<AuthToken> | AuthToken) | AuthToken;\n  /**\n   * A function for serializing request body parameter. By default,\n   * {@link JSON.stringify()} will be used.\n   */\n  bodySerializer?: BodySerializer | null;\n  /**\n   * An object containing any HTTP headers that you want to pre-populate your\n   * `Headers` object with.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/Headers/Headers#init See more}\n   */\n  headers?:\n    | RequestInit['headers']\n    | Record<\n        string,\n        string | number | boolean | (string | number | boolean)[] | null | undefined | unknown\n      >;\n  /**\n   * The request method.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/fetch#method See more}\n   */\n  method?: Uppercase<HttpMethod>;\n  /**\n   * A function for serializing request query parameters. By default, arrays\n   * will be exploded in form style, objects will be exploded in deepObject\n   * style, and reserved characters are percent-encoded.\n   *\n   * This method will have no effect if the native `paramsSerializer()` Axios\n   * API function is used.\n   *\n   * {@link https://swagger.io/docs/specification/serialization/#query View examples}\n   */\n  querySerializer?: QuerySerializer | QuerySerializerOptions;\n  /**\n   * A function validating request data. This is useful if you want to ensure\n   * the request conforms to the desired shape, so it can be safely sent to\n   * the server.\n   */\n  requestValidator?: (data: unknown) => Promise<unknown>;\n  /**\n   * A function transforming response data before it's returned. This is useful\n   * for post-processing data, e.g. converting ISO strings into Date objects.\n   */\n  responseTransformer?: (data: unknown) => Promise<unknown>;\n  /**\n   * A function validating response data. This is useful if you want to ensure\n   * the response conforms to the desired shape, so it can be safely passed to\n   * the transformers and returned to the user.\n   */\n  responseValidator?: (data: unknown) => Promise<unknown>;\n}\n\ntype IsExactlyNeverOrNeverUndefined<T> = [T] extends [never]\n  ? true\n  : [T] extends [never | undefined]\n    ? [undefined] extends [T]\n      ? false\n      : true\n    : false;\n\nexport type OmitNever<T extends Record<string, unknown>> = {\n  [K in keyof T as IsExactlyNeverOrNeverUndefined<T[K]> extends true ? never : K]: T[K];\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/parameter-explode-false/core/utils.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/parameter-explode-false/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport { type Options, postFoo } from './sdk.gen';\nexport type { ClientOptions, PostFooData, PostFooResponses } from './types.gen';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/parameter-explode-false/sdk.gen.ts",
    "content": "// 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 { PostFooData, PostFooResponses } from './types.gen';\n\nexport type Options<TData extends TDataShape = TDataShape, ThrowOnError extends boolean = boolean> = Options2<TData, ThrowOnError> & {\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\nexport const postFoo = <ThrowOnError extends boolean = false>(options?: Options<PostFooData, ThrowOnError>) => (options?.client ?? client).post<PostFooResponses, unknown, ThrowOnError>({\n    querySerializer: { parameters: { foo: { array: { explode: false } } } },\n    url: '/foo',\n    ...options\n});\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/parameter-explode-false/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type ClientOptions = {\n    baseUrl: `${string}://${string}` | (string & {});\n};\n\nexport type PostFooData = {\n    body?: never;\n    path?: never;\n    query?: {\n        foo?: Array<string>;\n    };\n    url: '/foo';\n};\n\nexport type PostFooResponses = {\n    /**\n     * OK\n     */\n    default: unknown;\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/parameter-explode-false-axios/client/client.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { AxiosError, AxiosInstance, RawAxiosRequestHeaders } from 'axios';\nimport axios from 'axios';\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 } from './types.gen';\nimport { buildUrl, createConfig, mergeConfigs, mergeHeaders, setAuthParams } from './utils.gen';\n\nexport const createClient = (config: Config = {}): Client => {\n  let _config = mergeConfigs(createConfig(), config);\n\n  let instance: AxiosInstance;\n\n  if (_config.axios && !('Axios' in _config.axios)) {\n    instance = _config.axios;\n  } else {\n    // eslint-disable-next-line @typescript-eslint/no-unused-vars\n    const { auth, ...configWithoutAuth } = _config;\n    instance = axios.create(configWithoutAuth);\n  }\n\n  const getConfig = (): Config => ({ ..._config });\n\n  const setConfig = (config: Config): Config => {\n    _config = mergeConfigs(_config, config);\n    instance.defaults = {\n      ...instance.defaults,\n      ..._config,\n      // @ts-expect-error\n      headers: mergeHeaders(instance.defaults.headers, _config.headers),\n    };\n    return getConfig();\n  };\n\n  const beforeRequest = async (options: RequestOptions) => {\n    const opts = {\n      ..._config,\n      ...options,\n      axios: options.axios ?? _config.axios ?? instance,\n      headers: mergeHeaders(_config.headers, options.headers),\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.body = opts.bodySerializer(opts.body);\n    }\n\n    const url = buildUrl(opts);\n\n    return { opts, url };\n  };\n\n  // @ts-expect-error\n  const request: Client['request'] = async (options) => {\n    // @ts-expect-error\n    const { opts, url } = await beforeRequest(options);\n    try {\n      // assign Axios here for consistency with fetch\n      const _axios = opts.axios!;\n      // eslint-disable-next-line @typescript-eslint/no-unused-vars\n      const { auth, ...optsWithoutAuth } = opts;\n      const response = await _axios({\n        ...optsWithoutAuth,\n        baseURL: '', // the baseURL is already included in `url`\n        data: getValidRequestBody(opts),\n        headers: opts.headers as RawAxiosRequestHeaders,\n        // let `paramsSerializer()` handle query params if it exists\n        params: opts.paramsSerializer ? opts.query : undefined,\n        url,\n      });\n\n      let { data } = response;\n\n      if (opts.responseType === '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 {\n        ...response,\n        data: data ?? {},\n      };\n    } catch (error) {\n      const e = error as AxiosError;\n      if (opts.throwOnError) {\n        throw e;\n      }\n      // @ts-expect-error\n      e.error = e.response?.data ?? {};\n      return e;\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 Record<string, string>,\n      method,\n      serializedBody: getValidRequestBody(opts) as BodyInit | null | undefined,\n      // @ts-expect-error\n      signal: opts.signal,\n      url,\n    });\n  };\n\n  const _buildUrl: Client['buildUrl'] = (options) =>\n    buildUrl({ axios: instance, ..._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    instance,\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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/parameter-explode-false-axios/client/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type { Auth } from '../core/auth.gen';\nexport type { QuerySerializerOptions } from '../core/bodySerializer.gen';\nexport {\n  formDataBodySerializer,\n  jsonBodySerializer,\n  urlSearchParamsBodySerializer,\n} from '../core/bodySerializer.gen';\nexport { buildClientParams } from '../core/params.gen';\nexport { serializeQueryKeyValue } from '../core/queryKeySerializer.gen';\nexport { createClient } from './client.gen';\nexport type {\n  Client,\n  ClientOptions,\n  Config,\n  CreateClientConfig,\n  Options,\n  RequestOptions,\n  RequestResult,\n  TDataShape,\n} from './types.gen';\nexport { createConfig } from './utils.gen';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/parameter-explode-false-axios/client/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type {\n  AxiosError,\n  AxiosInstance,\n  AxiosRequestHeaders,\n  AxiosResponse,\n  AxiosStatic,\n  CreateAxiosDefaults,\n} from 'axios';\n\nimport type { Auth } from '../core/auth.gen';\nimport type {\n  ServerSentEventsOptions,\n  ServerSentEventsResult,\n} from '../core/serverSentEvents.gen';\nimport type { Client as CoreClient, Config as CoreConfig } from '../core/types.gen';\n\nexport interface Config<T extends ClientOptions = ClientOptions>\n  extends Omit<CreateAxiosDefaults, 'auth' | 'baseURL' | 'headers' | 'method'>, CoreConfig {\n  /**\n   * Axios implementation. You can use this option to provide either an\n   * `AxiosStatic` or an `AxiosInstance`.\n   *\n   * @default axios\n   */\n  axios?: AxiosStatic | AxiosInstance;\n  /**\n   * Base URL for all requests made by this client.\n   */\n  baseURL?: T['baseURL'];\n  /**\n   * An object containing any HTTP headers that you want to pre-populate your\n   * `Headers` object with.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/Headers/Headers#init See more}\n   */\n  headers?:\n    | AxiosRequestHeaders\n    | Record<\n        string,\n        string | number | boolean | (string | number | boolean)[] | null | undefined | unknown\n      >;\n  /**\n   * Throw an error instead of returning it in the response?\n   *\n   * @default false\n   */\n  throwOnError?: T['throwOnError'];\n}\n\nexport interface RequestOptions<\n  TData = unknown,\n  ThrowOnError extends boolean = boolean,\n  Url extends string = string,\n>\n  extends\n    Config<{\n      throwOnError: ThrowOnError;\n    }>,\n    Pick<\n      ServerSentEventsOptions<TData>,\n      | 'onRequest'\n      | 'onSseError'\n      | 'onSseEvent'\n      | 'sseDefaultRetryDelay'\n      | 'sseMaxRetryAttempts'\n      | 'sseMaxRetryDelay'\n    > {\n  /**\n   * Any body that you want to add to your request.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/fetch#body}\n   */\n  body?: unknown;\n  path?: Record<string, unknown>;\n  query?: Record<string, unknown>;\n  /**\n   * Security mechanism(s) to use for the request.\n   */\n  security?: ReadonlyArray<Auth>;\n  url: Url;\n}\n\nexport interface ClientOptions {\n  baseURL?: string;\n  throwOnError?: boolean;\n}\n\nexport type RequestResult<\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = boolean,\n> = ThrowOnError extends true\n  ? Promise<AxiosResponse<TData extends Record<string, unknown> ? TData[keyof TData] : TData>>\n  : Promise<\n      | (AxiosResponse<TData extends Record<string, unknown> ? TData[keyof TData] : TData> & {\n          error: undefined;\n        })\n      | (AxiosError<TError extends Record<string, unknown> ? TError[keyof TError] : TError> & {\n          data: undefined;\n          error: TError extends Record<string, unknown> ? TError[keyof TError] : TError;\n        })\n    >;\n\ntype MethodFn = <TData = unknown, TError = unknown, ThrowOnError extends boolean = false>(\n  options: Omit<RequestOptions<TData, ThrowOnError>, 'method'>,\n) => RequestResult<TData, TError, ThrowOnError>;\n\ntype SseFn = <TData = unknown, TError = unknown, ThrowOnError extends boolean = false>(\n  options: Omit<RequestOptions<TData, ThrowOnError>, 'method'>,\n) => Promise<ServerSentEventsResult<TData, TError>>;\n\ntype RequestFn = <TData = unknown, TError = unknown, ThrowOnError extends boolean = false>(\n  options: Omit<RequestOptions<TData, ThrowOnError>, 'method'> &\n    Pick<Required<RequestOptions<TData, ThrowOnError>>, 'method'>,\n) => RequestResult<TData, TError, ThrowOnError>;\n\ntype BuildUrlFn = <\n  TData extends {\n    body?: unknown;\n    path?: Record<string, unknown>;\n    query?: Record<string, unknown>;\n    url: string;\n  },\n>(\n  options: TData & Options<TData>,\n) => string;\n\nexport type Client = CoreClient<RequestFn, Config, MethodFn, BuildUrlFn, SseFn> & {\n  instance: AxiosInstance;\n};\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 = ClientOptions> = (\n  override?: Config<ClientOptions & T>,\n) => Config<Required<ClientOptions> & T>;\n\nexport interface TDataShape {\n  body?: unknown;\n  headers?: unknown;\n  path?: unknown;\n  query?: unknown;\n  url: string;\n}\n\ntype OmitKeys<T, K> = Pick<T, Exclude<keyof T, K>>;\n\nexport type Options<\n  TData extends TDataShape = TDataShape,\n  ThrowOnError extends boolean = boolean,\n  TResponse = unknown,\n> = OmitKeys<RequestOptions<TResponse, ThrowOnError>, 'body' | 'path' | 'query' | 'url'> &\n  ([TData] extends [never] ? unknown : Omit<TData, 'url'>);\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/parameter-explode-false-axios/client/utils.gen.ts",
    "content": "// 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 {\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\nconst checkForExistence = (\n  options: Pick<RequestOptions, 'auth' | 'query'> & {\n    headers: Record<any, unknown>;\n  },\n  name?: string,\n): boolean => {\n  if (!name) {\n    return false;\n  }\n  if (name in options.headers || options.query?.[name]) {\n    return true;\n  }\n  if (\n    'Cookie' in options.headers &&\n    options.headers['Cookie'] &&\n    typeof options.headers['Cookie'] === 'string'\n  ) {\n    return options.headers['Cookie'].includes(`${name}=`);\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: Record<any, unknown>;\n  }) => {\n  for (const auth of security) {\n    if (checkForExistence(options, auth.name)) {\n      continue;\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        const value = `${name}=${token}`;\n        if ('Cookie' in options.headers && options.headers['Cookie']) {\n          options.headers['Cookie'] = `${options.headers['Cookie']}; ${value}`;\n        } else {\n          options.headers['Cookie'] = value;\n        }\n        break;\n      }\n      case 'header':\n      default:\n        options.headers[name] = token;\n        break;\n    }\n  }\n};\n\nexport const buildUrl: Client['buildUrl'] = (options) => {\n  const instanceBaseUrl = options.axios?.defaults?.baseURL;\n\n  const baseUrl =\n    !!options.baseURL && typeof options.baseURL === 'string' ? options.baseURL : instanceBaseUrl;\n\n  return getUrl({\n    baseUrl: baseUrl as string,\n    path: options.path,\n    // let `paramsSerializer()` handle query params if it exists\n    query: !options.paramsSerializer ? options.query : undefined,\n    querySerializer:\n      typeof options.querySerializer === 'function'\n        ? options.querySerializer\n        : createQuerySerializer(options.querySerializer),\n    url: options.url,\n  });\n};\n\nexport const mergeConfigs = (a: Config, b: Config): Config => {\n  const config = { ...a, ...b };\n  config.headers = mergeHeaders(a.headers, b.headers);\n  return config;\n};\n\n/**\n * Special Axios headers keywords allowing to set headers by request method.\n */\nexport const axiosHeadersKeywords = [\n  'common',\n  'delete',\n  'get',\n  'head',\n  'patch',\n  'post',\n  'put',\n] as const;\n\nexport const mergeHeaders = (\n  ...headers: Array<Required<Config>['headers'] | undefined>\n): Record<any, unknown> => {\n  const mergedHeaders: Record<any, unknown> = {};\n  for (const header of headers) {\n    if (!header || typeof header !== 'object') {\n      continue;\n    }\n\n    const iterator = Object.entries(header);\n\n    for (const [key, value] of iterator) {\n      if (\n        axiosHeadersKeywords.includes(key as (typeof axiosHeadersKeywords)[number]) &&\n        typeof value === 'object'\n      ) {\n        mergedHeaders[key] = {\n          ...(mergedHeaders[key] as Record<any, unknown>),\n          ...value,\n        };\n      } else if (value === null) {\n        delete mergedHeaders[key];\n      } else if (Array.isArray(value)) {\n        for (const v of value) {\n          // @ts-expect-error\n          mergedHeaders[key] = [...(mergedHeaders[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[key] = typeof value === 'object' ? JSON.stringify(value) : (value as string);\n      }\n    }\n  }\n  return mergedHeaders;\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  ...override,\n});\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/parameter-explode-false-axios/client.gen.ts",
    "content": "// 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>());\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/parameter-explode-false-axios/core/auth.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/parameter-explode-false-axios/core/bodySerializer.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/parameter-explode-false-axios/core/params.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/parameter-explode-false-axios/core/pathSerializer.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/parameter-explode-false-axios/core/queryKeySerializer.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\n/**\n * JSON-friendly union that mirrors what Pinia Colada can hash.\n */\nexport type JsonValue =\n  | null\n  | string\n  | number\n  | boolean\n  | JsonValue[]\n  | { [key: string]: JsonValue };\n\n/**\n * Replacer that converts non-JSON values (bigint, Date, etc.) to safe substitutes.\n */\nexport const queryKeyJsonReplacer = (_key: string, value: unknown) => {\n  if (value === undefined || typeof value === 'function' || typeof value === 'symbol') {\n    return undefined;\n  }\n  if (typeof value === 'bigint') {\n    return value.toString();\n  }\n  if (value instanceof Date) {\n    return value.toISOString();\n  }\n  return value;\n};\n\n/**\n * Safely stringifies a value and parses it back into a JsonValue.\n */\nexport const stringifyToJsonValue = (input: unknown): JsonValue | undefined => {\n  try {\n    const json = JSON.stringify(input, queryKeyJsonReplacer);\n    if (json === undefined) {\n      return undefined;\n    }\n    return JSON.parse(json) as JsonValue;\n  } catch {\n    return undefined;\n  }\n};\n\n/**\n * Detects plain objects (including objects with a null prototype).\n */\nconst isPlainObject = (value: unknown): value is Record<string, unknown> => {\n  if (value === null || typeof value !== 'object') {\n    return false;\n  }\n  const prototype = Object.getPrototypeOf(value as object);\n  return prototype === Object.prototype || prototype === null;\n};\n\n/**\n * Turns URLSearchParams into a sorted JSON object for deterministic keys.\n */\nconst serializeSearchParams = (params: URLSearchParams): JsonValue => {\n  const entries = Array.from(params.entries()).sort(([a], [b]) => a.localeCompare(b));\n  const result: Record<string, JsonValue> = {};\n\n  for (const [key, value] of entries) {\n    const existing = result[key];\n    if (existing === undefined) {\n      result[key] = value;\n      continue;\n    }\n\n    if (Array.isArray(existing)) {\n      (existing as string[]).push(value);\n    } else {\n      result[key] = [existing, value];\n    }\n  }\n\n  return result;\n};\n\n/**\n * Normalizes any accepted value into a JSON-friendly shape for query keys.\n */\nexport const serializeQueryKeyValue = (value: unknown): JsonValue | undefined => {\n  if (value === null) {\n    return null;\n  }\n\n  if (typeof value === 'string' || typeof value === 'number' || typeof value === 'boolean') {\n    return value;\n  }\n\n  if (value === undefined || typeof value === 'function' || typeof value === 'symbol') {\n    return undefined;\n  }\n\n  if (typeof value === 'bigint') {\n    return value.toString();\n  }\n\n  if (value instanceof Date) {\n    return value.toISOString();\n  }\n\n  if (Array.isArray(value)) {\n    return stringifyToJsonValue(value);\n  }\n\n  if (typeof URLSearchParams !== 'undefined' && value instanceof URLSearchParams) {\n    return serializeSearchParams(value);\n  }\n\n  if (isPlainObject(value)) {\n    return stringifyToJsonValue(value);\n  }\n\n  return undefined;\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/parameter-explode-false-axios/core/serverSentEvents.gen.ts",
    "content": "// 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 const 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            // Normalize line endings: CRLF -> LF, then CR -> LF\n            buffer = buffer.replace(/\\r\\n/g, '\\n').replace(/\\r/g, '\\n');\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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/parameter-explode-false-axios/core/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { Auth, AuthToken } from './auth.gen';\nimport type { BodySerializer, QuerySerializer, QuerySerializerOptions } from './bodySerializer.gen';\n\nexport type HttpMethod =\n  | 'connect'\n  | 'delete'\n  | 'get'\n  | 'head'\n  | 'options'\n  | 'patch'\n  | 'post'\n  | 'put'\n  | 'trace';\n\nexport type Client<\n  RequestFn = never,\n  Config = unknown,\n  MethodFn = never,\n  BuildUrlFn = never,\n  SseFn = never,\n> = {\n  /**\n   * Returns the final request URL.\n   */\n  buildUrl: BuildUrlFn;\n  getConfig: () => Config;\n  request: RequestFn;\n  setConfig: (config: Config) => Config;\n} & {\n  [K in HttpMethod]: MethodFn;\n} & ([SseFn] extends [never] ? { sse?: never } : { sse: { [K in HttpMethod]: SseFn } });\n\nexport interface Config {\n  /**\n   * Auth token or a function returning auth token. The resolved value will be\n   * added to the request payload as defined by its `security` array.\n   */\n  auth?: ((auth: Auth) => Promise<AuthToken> | AuthToken) | AuthToken;\n  /**\n   * A function for serializing request body parameter. By default,\n   * {@link JSON.stringify()} will be used.\n   */\n  bodySerializer?: BodySerializer | null;\n  /**\n   * An object containing any HTTP headers that you want to pre-populate your\n   * `Headers` object with.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/Headers/Headers#init See more}\n   */\n  headers?:\n    | RequestInit['headers']\n    | Record<\n        string,\n        string | number | boolean | (string | number | boolean)[] | null | undefined | unknown\n      >;\n  /**\n   * The request method.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/fetch#method See more}\n   */\n  method?: Uppercase<HttpMethod>;\n  /**\n   * A function for serializing request query parameters. By default, arrays\n   * will be exploded in form style, objects will be exploded in deepObject\n   * style, and reserved characters are percent-encoded.\n   *\n   * This method will have no effect if the native `paramsSerializer()` Axios\n   * API function is used.\n   *\n   * {@link https://swagger.io/docs/specification/serialization/#query View examples}\n   */\n  querySerializer?: QuerySerializer | QuerySerializerOptions;\n  /**\n   * A function validating request data. This is useful if you want to ensure\n   * the request conforms to the desired shape, so it can be safely sent to\n   * the server.\n   */\n  requestValidator?: (data: unknown) => Promise<unknown>;\n  /**\n   * A function transforming response data before it's returned. This is useful\n   * for post-processing data, e.g. converting ISO strings into Date objects.\n   */\n  responseTransformer?: (data: unknown) => Promise<unknown>;\n  /**\n   * A function validating response data. This is useful if you want to ensure\n   * the response conforms to the desired shape, so it can be safely passed to\n   * the transformers and returned to the user.\n   */\n  responseValidator?: (data: unknown) => Promise<unknown>;\n}\n\ntype IsExactlyNeverOrNeverUndefined<T> = [T] extends [never]\n  ? true\n  : [T] extends [never | undefined]\n    ? [undefined] extends [T]\n      ? false\n      : true\n    : false;\n\nexport type OmitNever<T extends Record<string, unknown>> = {\n  [K in keyof T as IsExactlyNeverOrNeverUndefined<T[K]> extends true ? never : K]: T[K];\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/parameter-explode-false-axios/core/utils.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/parameter-explode-false-axios/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport { type Options, postFoo } from './sdk.gen';\nexport type { ClientOptions, PostFooData, PostFooResponses } from './types.gen';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/parameter-explode-false-axios/sdk.gen.ts",
    "content": "// 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 { PostFooData, PostFooResponses } from './types.gen';\n\nexport type Options<TData extends TDataShape = TDataShape, ThrowOnError extends boolean = boolean> = Options2<TData, ThrowOnError> & {\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\nexport const postFoo = <ThrowOnError extends boolean = false>(options?: Options<PostFooData, ThrowOnError>) => (options?.client ?? client).post<PostFooResponses, unknown, ThrowOnError>({\n    querySerializer: { parameters: { foo: { array: { explode: false } } } },\n    url: '/foo',\n    ...options\n});\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/parameter-explode-false-axios/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type ClientOptions = {\n    baseURL: `${string}://${string}` | (string & {});\n};\n\nexport type PostFooData = {\n    body?: never;\n    path?: never;\n    query?: {\n        foo?: Array<string>;\n    };\n    url: '/foo';\n};\n\nexport type PostFooResponses = {\n    /**\n     * OK\n     */\n    default: unknown;\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@angular/common/default/client/client.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { HttpResponse } from '@angular/common/http';\nimport { HttpClient, HttpErrorResponse, HttpEventType, HttpRequest } from '@angular/common/http';\nimport {\n  assertInInjectionContext,\n  inject,\n  provideAppInitializer,\n  runInInjectionContext,\n} from '@angular/core';\nimport { firstValueFrom } from 'rxjs';\nimport { filter } from 'rxjs/operators';\n\nimport { createSseClient } from '../core/serverSentEvents.gen';\nimport type { HttpMethod } from '../core/types.gen';\nimport { getValidRequestBody } from '../core/utils.gen';\nimport type {\n  Client,\n  Config,\n  RequestOptions,\n  ResolvedRequestOptions,\n  ResponseStyle,\n} from './types.gen';\nimport {\n  buildUrl,\n  createConfig,\n  createInterceptors,\n  mergeConfigs,\n  mergeHeaders,\n  setAuthParams,\n} from './utils.gen';\n\nexport function provideHeyApiClient(client: Client) {\n  return provideAppInitializer(() => {\n    const httpClient = inject(HttpClient);\n    client.setConfig({ httpClient });\n  });\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<\n    HttpRequest<unknown>,\n    HttpResponse<unknown>,\n    unknown,\n    ResolvedRequestOptions\n  >();\n\n  const requestOptions = <\n    TData = unknown,\n    ThrowOnError extends boolean = false,\n    TResponseStyle extends ResponseStyle = 'fields',\n  >(\n    options: RequestOptions<TData, TResponseStyle, ThrowOnError>,\n  ) => {\n    const opts = {\n      ..._config,\n      ...options,\n      headers: mergeHeaders(_config.headers, options.headers),\n      httpClient: options.httpClient ?? _config.httpClient,\n      serializedBody: undefined as string | undefined,\n    };\n\n    if (!opts.httpClient) {\n      if (opts.injector) {\n        opts.httpClient = runInInjectionContext(opts.injector, () => inject(HttpClient));\n      } else {\n        assertInInjectionContext(requestOptions);\n        opts.httpClient = inject(HttpClient);\n      }\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 url = buildUrl(opts as any);\n\n    const req = new HttpRequest<unknown>(opts.method ?? 'GET', url, getValidRequestBody(opts), {\n      redirect: 'follow',\n      ...opts,\n    });\n\n    return { opts, req, url };\n  };\n\n  const beforeRequest = async (options: RequestOptions) => {\n    const { opts, req, url } = requestOptions(options);\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    return { opts, req, url };\n  };\n\n  const request: Client['request'] = async (options) => {\n    // @ts-expect-error\n    const { opts, req: initialReq } = await beforeRequest(options);\n\n    let req = initialReq;\n\n    for (const fn of interceptors.request.fns) {\n      if (fn) {\n        req = await fn(req, opts as any);\n      }\n    }\n\n    const result: {\n      request: HttpRequest<unknown>;\n      response: any;\n    } = {\n      request: req,\n      response: null,\n    };\n\n    try {\n      result.response = (await firstValueFrom(\n        opts\n          .httpClient!.request(req)\n          .pipe(filter((event) => event.type === HttpEventType.Response)),\n      )) as HttpResponse<unknown>;\n\n      for (const fn of interceptors.response.fns) {\n        if (fn) {\n          result.response = await fn(result.response, req, opts as any);\n        }\n      }\n\n      let bodyResponse = result.response.body;\n\n      if (opts.responseValidator) {\n        await opts.responseValidator(bodyResponse);\n      }\n\n      if (opts.responseTransformer) {\n        bodyResponse = await opts.responseTransformer(bodyResponse);\n      }\n\n      return opts.responseStyle === 'data' ? bodyResponse : { data: bodyResponse, ...result };\n    } catch (error) {\n      if (error instanceof HttpErrorResponse) {\n        result.response = error;\n      }\n\n      let finalError = error instanceof HttpErrorResponse ? error.error : error;\n\n      for (const fn of interceptors.error.fns) {\n        if (fn) {\n          finalError = (await fn(finalError, result.response as any, req, opts as any)) as string;\n        }\n      }\n\n      if (opts.throwOnError) {\n        throw finalError;\n      }\n\n      return opts.responseStyle === 'data'\n        ? undefined\n        : {\n            error: finalError,\n            ...result,\n          };\n    }\n  };\n\n  const makeMethodFn = (method: Uppercase<HttpMethod>) => (options: RequestOptions) =>\n    request({ ...options, method });\n\n  const makeSseFn = (method: Uppercase<HttpMethod>) => async (options: RequestOptions) => {\n    const { opts, url } = await beforeRequest(options);\n    return createSseClient({\n      ...opts,\n      body: opts.body as BodyInit | null | undefined,\n      headers: opts.headers as unknown as Record<string, string>,\n      method,\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    requestOptions: (options) => {\n      if (options.security) {\n        throw new Error('Security is not supported in requestOptions');\n      }\n\n      if (options.requestValidator) {\n        throw new Error('Request validation is not supported in requestOptions');\n      }\n\n      return requestOptions(options).req;\n    },\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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@angular/common/default/client/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type { Auth } from '../core/auth.gen';\nexport type { QuerySerializerOptions } from '../core/bodySerializer.gen';\nexport {\n  formDataBodySerializer,\n  jsonBodySerializer,\n  urlSearchParamsBodySerializer,\n} from '../core/bodySerializer.gen';\nexport { buildClientParams } from '../core/params.gen';\nexport { serializeQueryKeyValue } from '../core/queryKeySerializer.gen';\nexport { createClient } from './client.gen';\nexport type {\n  Client,\n  ClientOptions,\n  Config,\n  CreateClientConfig,\n  Options,\n  RequestOptions,\n  RequestResult,\n  ResolvedRequestOptions,\n  ResponseStyle,\n  TDataShape,\n} from './types.gen';\nexport { createConfig, mergeHeaders } from './utils.gen';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@angular/common/default/client/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type {\n  HttpClient,\n  HttpErrorResponse,\n  HttpHeaders,\n  HttpRequest,\n  HttpResponse,\n} from '@angular/common/http';\nimport type { Injector } from '@angular/core';\n\nimport type { Auth } from '../core/auth.gen';\nimport type {\n  ServerSentEventsOptions,\n  ServerSentEventsResult,\n} from '../core/serverSentEvents.gen';\nimport type { Client as CoreClient, Config as CoreConfig } from '../core/types.gen';\nimport type { Middleware } from './utils.gen';\n\nexport type ResponseStyle = 'data' | 'fields';\n\nexport interface Config<T extends ClientOptions = ClientOptions>\n  extends Omit<RequestInit, 'body' | 'headers' | 'method'>, Omit<CoreConfig, 'headers'> {\n  /**\n   * Base URL for all requests made by this client.\n   */\n  baseUrl?: T['baseUrl'];\n  /**\n   * An object containing any HTTP headers that you want to pre-populate your\n   * `HttpHeaders` object with.\n   *\n   * {@link https://angular.dev/api/common/http/HttpHeaders#constructor See more}\n   */\n  headers?:\n    | HttpHeaders\n    | Record<\n        string,\n        string | number | boolean | (string | number | boolean)[] | null | undefined | unknown\n      >;\n  /**\n   * The HTTP client to use for making requests.\n   */\n  httpClient?: HttpClient;\n  /**\n   * Should we return only data or multiple fields (data, error, response, etc.)?\n   *\n   * @default 'fields'\n   */\n  responseStyle?: ResponseStyle;\n\n  /**\n   * Throw an error instead of returning it in the response?\n   *\n   * @default false\n   */\n  throwOnError?: T['throwOnError'];\n}\n\nexport interface RequestOptions<\n  TData = unknown,\n  TResponseStyle extends ResponseStyle = 'fields',\n  ThrowOnError extends boolean = boolean,\n  Url extends string = string,\n>\n  extends\n    Config<{\n      responseStyle: TResponseStyle;\n      throwOnError: ThrowOnError;\n    }>,\n    Pick<\n      ServerSentEventsOptions<TData>,\n      | 'onRequest'\n      | 'onSseError'\n      | 'onSseEvent'\n      | 'sseDefaultRetryDelay'\n      | 'sseMaxRetryAttempts'\n      | 'sseMaxRetryDelay'\n    > {\n  /**\n   * Any body that you want to add to your request.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/fetch#body}\n   */\n  body?: unknown;\n  /**\n   * Optional custom injector for dependency resolution if you don't implicitly or explicitly provide one.\n   */\n  injector?: Injector;\n  path?: Record<string, unknown>;\n  query?: Record<string, unknown>;\n  /**\n   * Security mechanism(s) to use for the request.\n   */\n  security?: ReadonlyArray<Auth>;\n  url: Url;\n}\n\nexport interface ResolvedRequestOptions<\n  TResponseStyle extends ResponseStyle = 'fields',\n  ThrowOnError extends boolean = boolean,\n  Url extends string = string,\n> extends RequestOptions<unknown, TResponseStyle, ThrowOnError, Url> {\n  serializedBody?: string;\n}\n\nexport type RequestResult<\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = boolean,\n  TResponseStyle extends ResponseStyle = 'fields',\n> = Promise<\n  ThrowOnError extends true\n    ? TResponseStyle extends 'data'\n      ? TData extends Record<string, unknown>\n        ? TData[keyof TData]\n        : TData\n      : {\n          data: TData extends Record<string, unknown> ? TData[keyof TData] : TData;\n          request: HttpRequest<unknown>;\n          response: HttpResponse<TData>;\n        }\n    : TResponseStyle extends 'data'\n      ? (TData extends Record<string, unknown> ? TData[keyof TData] : TData) | undefined\n      :\n          | {\n              data: TData extends Record<string, unknown> ? TData[keyof TData] : TData;\n              error: undefined;\n              request: HttpRequest<unknown>;\n              response: HttpResponse<TData>;\n            }\n          | {\n              data: undefined;\n              error: TError[keyof TError];\n              request: HttpRequest<unknown>;\n              response: HttpErrorResponse & {\n                error: TError[keyof TError] | null;\n              };\n            }\n>;\n\nexport interface ClientOptions {\n  baseUrl?: string;\n  responseStyle?: ResponseStyle;\n  throwOnError?: boolean;\n}\n\ntype MethodFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'>,\n) => RequestResult<TData, TError, ThrowOnError, TResponseStyle>;\n\ntype SseFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'>,\n) => Promise<ServerSentEventsResult<TData, TError>>;\n\ntype RequestFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'> &\n    Pick<Required<RequestOptions<TData, TResponseStyle, ThrowOnError>>, 'method'>,\n) => RequestResult<TData, TError, ThrowOnError, TResponseStyle>;\n\ntype RequestOptionsFn = <\n  T,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: RequestOptions<T, TResponseStyle, ThrowOnError>,\n) => HttpRequest<T>;\n\ntype BuildUrlFn = <\n  TData extends {\n    body?: unknown;\n    path?: Record<string, unknown>;\n    query?: Record<string, unknown>;\n    url: string;\n  },\n>(\n  options: TData & Options<TData>,\n) => string;\n\nexport type Client = CoreClient<RequestFn, Config, MethodFn, BuildUrlFn, SseFn> & {\n  interceptors: Middleware<\n    HttpRequest<unknown>,\n    HttpResponse<unknown>,\n    unknown,\n    ResolvedRequestOptions\n  >;\n  requestOptions: RequestOptionsFn;\n};\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 = ClientOptions> = (\n  override?: Config<ClientOptions & T>,\n) => Config<Required<ClientOptions> & T>;\n\nexport interface TDataShape {\n  body?: unknown;\n  headers?: unknown;\n  path?: unknown;\n  query?: unknown;\n  url: string;\n}\n\ntype OmitKeys<T, K> = Pick<T, Exclude<keyof T, K>>;\n\nexport type Options<\n  TData extends TDataShape = TDataShape,\n  ThrowOnError extends boolean = boolean,\n  TResponse = unknown,\n  TResponseStyle extends ResponseStyle = 'fields',\n> = OmitKeys<\n  RequestOptions<TResponse, TResponseStyle, ThrowOnError>,\n  'body' | 'path' | 'query' | 'url'\n> &\n  ([TData] extends [never] ? unknown : Omit<TData, 'url'>);\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@angular/common/default/client/utils.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport { HttpHeaders } from '@angular/common/http';\n\nimport { getAuthToken } from '../core/auth.gen';\nimport type {\n  QuerySerializer,\n  QuerySerializerOptions,\n} from '../core/bodySerializer.gen';\nimport {\n  serializeArrayParam,\n  serializeObjectParam,\n  serializePrimitiveParam,\n} from '../core/pathSerializer.gen';\nimport type { Client, ClientOptions, Config, RequestOptions } from './types.gen';\n\ninterface PathSerializer {\n  path: Record<string, unknown>;\n  url: string;\n}\n\nconst PATH_PARAM_RE = /\\{[^{}]+\\}/g;\n\ntype ArrayStyle = 'form' | 'spaceDelimited' | 'pipeDelimited';\ntype MatrixStyle = 'label' | 'matrix' | 'simple';\ntype ArraySeparatorStyle = ArrayStyle | MatrixStyle;\n\nconst 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 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 = (\n  contentType: string | null,\n): 'blob' | 'formData' | 'json' | 'stream' | 'text' | undefined => {\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\nexport const setAuthParams = async (\n  options: Pick<Required<RequestOptions>, 'security'> &\n    Pick<RequestOptions, 'auth' | 'query'> & {\n      headers: HttpHeaders;\n    },\n) => {\n  for (const auth of options.security) {\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 = options.headers.append('Cookie', `${name}=${token}`);\n        break;\n      case 'header':\n      default:\n        options.headers = options.headers.set(name, token);\n        break;\n    }\n\n    return;\n  }\n};\n\nexport const buildUrl: Client['buildUrl'] = (options) => {\n  const url = 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  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 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\nexport const mergeHeaders = (\n  ...headers: Array<Required<Config>['headers'] | undefined>\n): HttpHeaders => {\n  let mergedHeaders = new HttpHeaders();\n\n  for (const header of headers) {\n    if (!header || typeof header !== 'object') {\n      continue;\n    }\n\n    if (header instanceof HttpHeaders) {\n      // Merge HttpHeaders instance\n      header.keys().forEach((key) => {\n        const values = header.getAll(key);\n        if (values) {\n          values.forEach((value) => {\n            mergedHeaders = mergedHeaders.append(key, value);\n          });\n        }\n      });\n    } else {\n      // Merge plain object headers\n      for (const [key, value] of Object.entries(header)) {\n        if (value === null) {\n          mergedHeaders = mergedHeaders.delete(key);\n        } else if (Array.isArray(value)) {\n          for (const v of value) {\n            mergedHeaders = 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 = mergedHeaders.set(\n            key,\n            typeof value === 'object' ? JSON.stringify(value) : (value as string),\n          );\n        }\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  headers: defaultHeaders,\n  querySerializer: defaultQuerySerializer,\n  ...override,\n});\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@angular/common/default/client.gen.ts",
    "content": "// 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: 'http://localhost:3000/base' }));\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@angular/common/default/core/auth.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@angular/common/default/core/bodySerializer.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@angular/common/default/core/params.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@angular/common/default/core/pathSerializer.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@angular/common/default/core/queryKeySerializer.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\n/**\n * JSON-friendly union that mirrors what Pinia Colada can hash.\n */\nexport type JsonValue =\n  | null\n  | string\n  | number\n  | boolean\n  | JsonValue[]\n  | { [key: string]: JsonValue };\n\n/**\n * Replacer that converts non-JSON values (bigint, Date, etc.) to safe substitutes.\n */\nexport const queryKeyJsonReplacer = (_key: string, value: unknown) => {\n  if (value === undefined || typeof value === 'function' || typeof value === 'symbol') {\n    return undefined;\n  }\n  if (typeof value === 'bigint') {\n    return value.toString();\n  }\n  if (value instanceof Date) {\n    return value.toISOString();\n  }\n  return value;\n};\n\n/**\n * Safely stringifies a value and parses it back into a JsonValue.\n */\nexport const stringifyToJsonValue = (input: unknown): JsonValue | undefined => {\n  try {\n    const json = JSON.stringify(input, queryKeyJsonReplacer);\n    if (json === undefined) {\n      return undefined;\n    }\n    return JSON.parse(json) as JsonValue;\n  } catch {\n    return undefined;\n  }\n};\n\n/**\n * Detects plain objects (including objects with a null prototype).\n */\nconst isPlainObject = (value: unknown): value is Record<string, unknown> => {\n  if (value === null || typeof value !== 'object') {\n    return false;\n  }\n  const prototype = Object.getPrototypeOf(value as object);\n  return prototype === Object.prototype || prototype === null;\n};\n\n/**\n * Turns URLSearchParams into a sorted JSON object for deterministic keys.\n */\nconst serializeSearchParams = (params: URLSearchParams): JsonValue => {\n  const entries = Array.from(params.entries()).sort(([a], [b]) => a.localeCompare(b));\n  const result: Record<string, JsonValue> = {};\n\n  for (const [key, value] of entries) {\n    const existing = result[key];\n    if (existing === undefined) {\n      result[key] = value;\n      continue;\n    }\n\n    if (Array.isArray(existing)) {\n      (existing as string[]).push(value);\n    } else {\n      result[key] = [existing, value];\n    }\n  }\n\n  return result;\n};\n\n/**\n * Normalizes any accepted value into a JSON-friendly shape for query keys.\n */\nexport const serializeQueryKeyValue = (value: unknown): JsonValue | undefined => {\n  if (value === null) {\n    return null;\n  }\n\n  if (typeof value === 'string' || typeof value === 'number' || typeof value === 'boolean') {\n    return value;\n  }\n\n  if (value === undefined || typeof value === 'function' || typeof value === 'symbol') {\n    return undefined;\n  }\n\n  if (typeof value === 'bigint') {\n    return value.toString();\n  }\n\n  if (value instanceof Date) {\n    return value.toISOString();\n  }\n\n  if (Array.isArray(value)) {\n    return stringifyToJsonValue(value);\n  }\n\n  if (typeof URLSearchParams !== 'undefined' && value instanceof URLSearchParams) {\n    return serializeSearchParams(value);\n  }\n\n  if (isPlainObject(value)) {\n    return stringifyToJsonValue(value);\n  }\n\n  return undefined;\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@angular/common/default/core/serverSentEvents.gen.ts",
    "content": "// 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 const 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            // Normalize line endings: CRLF -> LF, then CR -> LF\n            buffer = buffer.replace(/\\r\\n/g, '\\n').replace(/\\r/g, '\\n');\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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@angular/common/default/core/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { Auth, AuthToken } from './auth.gen';\nimport type { BodySerializer, QuerySerializer, QuerySerializerOptions } from './bodySerializer.gen';\n\nexport type HttpMethod =\n  | 'connect'\n  | 'delete'\n  | 'get'\n  | 'head'\n  | 'options'\n  | 'patch'\n  | 'post'\n  | 'put'\n  | 'trace';\n\nexport type Client<\n  RequestFn = never,\n  Config = unknown,\n  MethodFn = never,\n  BuildUrlFn = never,\n  SseFn = never,\n> = {\n  /**\n   * Returns the final request URL.\n   */\n  buildUrl: BuildUrlFn;\n  getConfig: () => Config;\n  request: RequestFn;\n  setConfig: (config: Config) => Config;\n} & {\n  [K in HttpMethod]: MethodFn;\n} & ([SseFn] extends [never] ? { sse?: never } : { sse: { [K in HttpMethod]: SseFn } });\n\nexport interface Config {\n  /**\n   * Auth token or a function returning auth token. The resolved value will be\n   * added to the request payload as defined by its `security` array.\n   */\n  auth?: ((auth: Auth) => Promise<AuthToken> | AuthToken) | AuthToken;\n  /**\n   * A function for serializing request body parameter. By default,\n   * {@link JSON.stringify()} will be used.\n   */\n  bodySerializer?: BodySerializer | null;\n  /**\n   * An object containing any HTTP headers that you want to pre-populate your\n   * `Headers` object with.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/Headers/Headers#init See more}\n   */\n  headers?:\n    | RequestInit['headers']\n    | Record<\n        string,\n        string | number | boolean | (string | number | boolean)[] | null | undefined | unknown\n      >;\n  /**\n   * The request method.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/fetch#method See more}\n   */\n  method?: Uppercase<HttpMethod>;\n  /**\n   * A function for serializing request query parameters. By default, arrays\n   * will be exploded in form style, objects will be exploded in deepObject\n   * style, and reserved characters are percent-encoded.\n   *\n   * This method will have no effect if the native `paramsSerializer()` Axios\n   * API function is used.\n   *\n   * {@link https://swagger.io/docs/specification/serialization/#query View examples}\n   */\n  querySerializer?: QuerySerializer | QuerySerializerOptions;\n  /**\n   * A function validating request data. This is useful if you want to ensure\n   * the request conforms to the desired shape, so it can be safely sent to\n   * the server.\n   */\n  requestValidator?: (data: unknown) => Promise<unknown>;\n  /**\n   * A function transforming response data before it's returned. This is useful\n   * for post-processing data, e.g. converting ISO strings into Date objects.\n   */\n  responseTransformer?: (data: unknown) => Promise<unknown>;\n  /**\n   * A function validating response data. This is useful if you want to ensure\n   * the response conforms to the desired shape, so it can be safely passed to\n   * the transformers and returned to the user.\n   */\n  responseValidator?: (data: unknown) => Promise<unknown>;\n}\n\ntype IsExactlyNeverOrNeverUndefined<T> = [T] extends [never]\n  ? true\n  : [T] extends [never | undefined]\n    ? [undefined] extends [T]\n      ? false\n      : true\n    : false;\n\nexport type OmitNever<T extends Record<string, unknown>> = {\n  [K in keyof T as IsExactlyNeverOrNeverUndefined<T[K]> extends true ? never : K]: T[K];\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@angular/common/default/core/utils.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@angular/common/default/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport { apiVVersionODataControllerCount, callToTestOrderOfParams, callWithDefaultOptionalParameters, callWithDefaultParameters, callWithDescriptions, callWithDuplicateResponses, callWithNoContentResponse, callWithParameters, callWithResponse, callWithResponseAndNoContentResponse, callWithResponses, callWithResultFromHeader, callWithWeirdParameterNames, collectionFormat, complexParams, complexTypes, deleteCallWithoutParametersAndResponse, deleteFoo, deprecatedCall, dummyA, dummyB, duplicateName, duplicateName2, duplicateName3, duplicateName4, export_, fileResponse, fooWow, getApiVbyApiVersionSimpleOperation, getCallWithOptionalParam, getCallWithoutParametersAndResponse, headCallWithoutParametersAndResponse, import_, multipartRequest, multipartResponse, nonAsciiæøåÆøÅöôêÊ字符串, type Options, optionsCallWithoutParametersAndResponse, patchApiVbyApiVersionNoTag, patchCallWithoutParametersAndResponse, postApiVbyApiVersionFormData, postApiVbyApiVersionRequestBody, postCallWithOptionalParam, postCallWithoutParametersAndResponse, putCallWithoutParametersAndResponse, putWithFormUrlEncoded, testErrorCode, types, uploadFile } from './sdk.gen';\nexport type { _3eNum1Период, _400, AdditionalPropertiesIntegerIssue, AdditionalPropertiesUnknownIssue, AdditionalPropertiesUnknownIssue2, AdditionalPropertiesUnknownIssue3, AdditionalPropertiesUnknownIssueWritable, AnyOfAnyAndNull, AnyOfArrays, ApiVVersionODataControllerCountData, ApiVVersionODataControllerCountResponse, ApiVVersionODataControllerCountResponses, ArrayWithAnyOfProperties, ArrayWithArray, ArrayWithBooleans, ArrayWithNumbers, ArrayWithProperties, ArrayWithReferences, ArrayWithStrings, CallToTestOrderOfParamsData, CallWithDefaultOptionalParametersData, CallWithDefaultParametersData, CallWithDescriptionsData, CallWithDuplicateResponsesData, CallWithDuplicateResponsesError, CallWithDuplicateResponsesErrors, CallWithDuplicateResponsesResponse, CallWithDuplicateResponsesResponses, CallWithNoContentResponseData, CallWithNoContentResponseResponse, CallWithNoContentResponseResponses, CallWithParametersData, CallWithResponseAndNoContentResponseData, CallWithResponseAndNoContentResponseResponse, CallWithResponseAndNoContentResponseResponses, CallWithResponseData, CallWithResponseResponse, CallWithResponseResponses, CallWithResponsesData, CallWithResponsesError, CallWithResponsesErrors, CallWithResponsesResponse, CallWithResponsesResponses, CallWithResultFromHeaderData, CallWithResultFromHeaderErrors, CallWithResultFromHeaderResponses, CallWithWeirdParameterNamesData, CamelCaseCommentWithBreaks, CharactersInDescription, ClientOptions, CollectionFormatData, CommentWithBackticks, CommentWithBackticksAndQuotes, CommentWithBreaks, CommentWithExpressionPlaceholders, CommentWithQuotes, CommentWithReservedCharacters, CommentWithSlashes, ComplexParamsData, ComplexParamsResponse, ComplexParamsResponses, ComplexTypesData, ComplexTypesErrors, ComplexTypesResponse, ComplexTypesResponses, CompositionBaseModel, CompositionExtendedModel, CompositionWithAllOfAndNullable, CompositionWithAnyOf, CompositionWithAnyOfAndNullable, CompositionWithAnyOfAnonymous, CompositionWithNestedAnyAndTypeNull, CompositionWithNestedAnyOfAndNull, CompositionWithOneOf, CompositionWithOneOfAndComplexArrayDictionary, CompositionWithOneOfAndNullable, CompositionWithOneOfAndProperties, CompositionWithOneOfAndSimpleArrayDictionary, CompositionWithOneOfAndSimpleDictionary, CompositionWithOneOfAnonymous, CompositionWithOneOfDiscriminator, ConstValue, Default, DeleteCallWithoutParametersAndResponseData, DeleteFooData, DeleteFooData2, DeleteFooData3, DeprecatedCallData, DeprecatedModel, DictionaryWithArray, DictionaryWithDictionary, DictionaryWithProperties, DictionaryWithPropertiesAndAdditionalProperties, DictionaryWithReference, DictionaryWithString, DummyAData, DummyAResponse, DummyAResponses, DummyBData, DummyBResponse, DummyBResponses, DuplicateName2Data, DuplicateName3Data, DuplicateName4Data, DuplicateNameData, EnumFromDescription, EnumWithExtensions, EnumWithNumbers, EnumWithReplacedCharacters, EnumWithStrings, EnumWithXEnumNames, ExportData, ExternalRefA, ExternalRefB, ExternalSharedModel, File, FileResponseData, FileResponseResponse, FileResponseResponses, FileWritable, FooWowData, FooWowResponses, FreeFormObjectWithAdditionalPropertiesEqEmptyObject, FreeFormObjectWithAdditionalPropertiesEqTrue, FreeFormObjectWithoutAdditionalProperties, GenericSchemaDuplicateIssue1SystemBoolean, GenericSchemaDuplicateIssue1SystemBooleanWritable, GenericSchemaDuplicateIssue1SystemString, GenericSchemaDuplicateIssue1SystemStringWritable, GetApiVbyApiVersionSimpleOperationData, GetApiVbyApiVersionSimpleOperationError, GetApiVbyApiVersionSimpleOperationErrors, GetApiVbyApiVersionSimpleOperationResponse, GetApiVbyApiVersionSimpleOperationResponses, GetCallWithOptionalParamData, GetCallWithoutParametersAndResponseData, HeadCallWithoutParametersAndResponseData, Import, ImportData, ImportResponse, ImportResponses, IoK8sApimachineryPkgApisMetaV1DeleteOptions, IoK8sApimachineryPkgApisMetaV1Preconditions, ModelCircle, ModelFromZendesk, ModelSquare, ModelThatExtends, ModelThatExtendsExtends, ModelWithAdditionalPropertiesEqTrue, ModelWithAdditionalPropertiesRef, ModelWithAnyOfConstantSizeArray, ModelWithAnyOfConstantSizeArrayAndIntersect, ModelWithAnyOfConstantSizeArrayNullable, ModelWithAnyOfConstantSizeArrayWithNSizeAndOptions, ModelWithAnyOfConstantSizeArrayWithNSizeAndOptionsWritable, ModelWithArray, ModelWithArrayReadOnlyAndWriteOnly, ModelWithArrayReadOnlyAndWriteOnlyWritable, ModelWithBackticksInDescription, ModelWithBoolean, ModelWithCircularReference, ModelWithConst, ModelWithConstantSizeArray, ModelWithDictionary, ModelWithDuplicateImports, ModelWithDuplicateProperties, ModelWithEnum, ModelWithEnumFromDescription, ModelWithEnumWithHyphen, ModelWithInteger, ModelWithNestedArrayEnums, ModelWithNestedArrayEnumsData, ModelWithNestedArrayEnumsDataBar, ModelWithNestedArrayEnumsDataFoo, ModelWithNestedCompositionEnums, ModelWithNestedEnums, ModelWithNestedProperties, ModelWithNullableObject, ModelWithNullableString, ModelWithNumericEnumUnion, ModelWithOneOfAndProperties, ModelWithOneOfEnum, ModelWithOrderedProperties, ModelWithPattern, ModelWithPatternWritable, ModelWithPrefixItemsConstantSizeArray, ModelWithProperties, ModelWithPropertiesWritable, ModelWithReadOnlyAndWriteOnly, ModelWithReadOnlyAndWriteOnlyWritable, ModelWithReference, ModelWithReferenceWritable, ModelWithString, ModelWithStringError, MultipartRequestData, MultipartResponseData, MultipartResponseResponse, MultipartResponseResponses, NestedAnyOfArraysNullable, NonAsciiæøåÆøÅöôêÊ字符串Data, NonAsciiæøåÆøÅöôêÊ字符串Response, NonAsciiæøåÆøÅöôêÊ字符串Responses, NonAsciiStringæøåÆøÅöôêÊ字符串, NullableObject, OneOfAllOfIssue, OneOfAllOfIssueWritable, OptionsCallWithoutParametersAndResponseData, Pageable, ParameterSimpleParameterUnused, PatchApiVbyApiVersionNoTagData, PatchApiVbyApiVersionNoTagResponses, PatchCallWithoutParametersAndResponseData, PostApiVbyApiVersionFormDataData, PostApiVbyApiVersionRequestBodyData, PostCallWithOptionalParamData, PostCallWithOptionalParamResponse, PostCallWithOptionalParamResponses, PostCallWithoutParametersAndResponseData, PostServiceWithEmptyTagResponse, PostServiceWithEmptyTagResponse2, PutCallWithoutParametersAndResponseData, PutWithFormUrlEncodedData, SchemaWithFormRestrictedKeys, SimpleBoolean, SimpleFile, SimpleFormData, SimpleInteger, SimpleParameter, SimpleReference, SimpleRequestBody, SimpleString, SimpleStringWithPattern, TestErrorCodeData, TestErrorCodeErrors, TestErrorCodeResponses, TypesData, TypesResponse, TypesResponses, UploadFileData, UploadFileResponse, UploadFileResponses, XFooBar } from './types.gen';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@angular/common/default/sdk.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport { type Client, formDataBodySerializer, type Options as Options2, type TDataShape, urlSearchParamsBodySerializer } from './client';\nimport { client } from './client.gen';\nimport type { ApiVVersionODataControllerCountData, ApiVVersionODataControllerCountResponses, CallToTestOrderOfParamsData, CallWithDefaultOptionalParametersData, CallWithDefaultParametersData, CallWithDescriptionsData, CallWithDuplicateResponsesData, CallWithDuplicateResponsesErrors, CallWithDuplicateResponsesResponses, CallWithNoContentResponseData, CallWithNoContentResponseResponses, CallWithParametersData, CallWithResponseAndNoContentResponseData, CallWithResponseAndNoContentResponseResponses, CallWithResponseData, CallWithResponseResponses, CallWithResponsesData, CallWithResponsesErrors, CallWithResponsesResponses, CallWithResultFromHeaderData, CallWithResultFromHeaderErrors, CallWithResultFromHeaderResponses, CallWithWeirdParameterNamesData, CollectionFormatData, ComplexParamsData, ComplexParamsResponses, ComplexTypesData, ComplexTypesErrors, ComplexTypesResponses, DeleteCallWithoutParametersAndResponseData, DeleteFooData3, DeprecatedCallData, DummyAData, DummyAResponses, DummyBData, DummyBResponses, DuplicateName2Data, DuplicateName3Data, DuplicateName4Data, DuplicateNameData, ExportData, FileResponseData, FileResponseResponses, FooWowData, FooWowResponses, GetApiVbyApiVersionSimpleOperationData, GetApiVbyApiVersionSimpleOperationErrors, GetApiVbyApiVersionSimpleOperationResponses, GetCallWithOptionalParamData, GetCallWithoutParametersAndResponseData, HeadCallWithoutParametersAndResponseData, ImportData, ImportResponses, MultipartRequestData, MultipartResponseData, MultipartResponseResponses, NonAsciiæøåÆøÅöôêÊ字符串Data, NonAsciiæøåÆøÅöôêÊ字符串Responses, OptionsCallWithoutParametersAndResponseData, PatchApiVbyApiVersionNoTagData, PatchApiVbyApiVersionNoTagResponses, PatchCallWithoutParametersAndResponseData, PostApiVbyApiVersionFormDataData, PostApiVbyApiVersionRequestBodyData, PostCallWithOptionalParamData, PostCallWithOptionalParamResponses, PostCallWithoutParametersAndResponseData, PutCallWithoutParametersAndResponseData, PutWithFormUrlEncodedData, TestErrorCodeData, TestErrorCodeErrors, TestErrorCodeResponses, TypesData, TypesResponses, UploadFileData, UploadFileResponses } from './types.gen';\n\nexport type Options<TData extends TDataShape = TDataShape, ThrowOnError extends boolean = boolean> = Options2<TData, ThrowOnError> & {\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\nexport const export_ = <ThrowOnError extends boolean = false>(options?: Options<ExportData, ThrowOnError>) => (options?.client ?? client).get<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/no+tag', ...options });\n\nexport const patchApiVbyApiVersionNoTag = <ThrowOnError extends boolean = false>(options?: Options<PatchApiVbyApiVersionNoTagData, ThrowOnError>) => (options?.client ?? client).patch<PatchApiVbyApiVersionNoTagResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/no+tag', ...options });\n\nexport const import_ = <ThrowOnError extends boolean = false>(options: Options<ImportData, ThrowOnError>) => (options.client ?? client).post<ImportResponses, unknown, ThrowOnError>({\n    url: '/api/v{api-version}/no+tag',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options.headers\n    }\n});\n\nexport const fooWow = <ThrowOnError extends boolean = false>(options?: Options<FooWowData, ThrowOnError>) => (options?.client ?? client).put<FooWowResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/no+tag', ...options });\n\nexport const apiVVersionODataControllerCount = <ThrowOnError extends boolean = false>(options?: Options<ApiVVersionODataControllerCountData, ThrowOnError>) => (options?.client ?? client).get<ApiVVersionODataControllerCountResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple/$count', ...options });\n\nexport const getApiVbyApiVersionSimpleOperation = <ThrowOnError extends boolean = false>(options: Options<GetApiVbyApiVersionSimpleOperationData, ThrowOnError>) => (options.client ?? client).get<GetApiVbyApiVersionSimpleOperationResponses, GetApiVbyApiVersionSimpleOperationErrors, ThrowOnError>({ url: '/api/v{api-version}/simple:operation', ...options });\n\nexport const deleteCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<DeleteCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).delete<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const getCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<GetCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).get<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const headCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<HeadCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).head<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const optionsCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<OptionsCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).options<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const patchCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<PatchCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).patch<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const postCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<PostCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).post<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const putCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<PutCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).put<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const deleteFoo = <ThrowOnError extends boolean = false>(options: Options<DeleteFooData3, ThrowOnError>) => (options.client ?? client).delete<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/foo/{foo_param}/bar/{BarParam}', ...options });\n\nexport const callWithDescriptions = <ThrowOnError extends boolean = false>(options?: Options<CallWithDescriptionsData, ThrowOnError>) => (options?.client ?? client).post<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/descriptions', ...options });\n\n/**\n * @deprecated\n */\nexport const deprecatedCall = <ThrowOnError extends boolean = false>(options: Options<DeprecatedCallData, ThrowOnError>) => (options.client ?? client).post<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/parameters/deprecated', ...options });\n\nexport const callWithParameters = <ThrowOnError extends boolean = false>(options: Options<CallWithParametersData, ThrowOnError>) => (options.client ?? client).post<unknown, unknown, ThrowOnError>({\n    url: '/api/v{api-version}/parameters/{parameterPath}',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options.headers\n    }\n});\n\nexport const callWithWeirdParameterNames = <ThrowOnError extends boolean = false>(options: Options<CallWithWeirdParameterNamesData, ThrowOnError>) => (options.client ?? client).post<unknown, unknown, ThrowOnError>({\n    url: '/api/v{api-version}/parameters/{parameter.path.1}/{parameter-path-2}/{PARAMETER-PATH-3}',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options.headers\n    }\n});\n\nexport const getCallWithOptionalParam = <ThrowOnError extends boolean = false>(options: Options<GetCallWithOptionalParamData, ThrowOnError>) => (options.client ?? client).get<unknown, unknown, ThrowOnError>({\n    url: '/api/v{api-version}/parameters',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options.headers\n    }\n});\n\nexport const postCallWithOptionalParam = <ThrowOnError extends boolean = false>(options: Options<PostCallWithOptionalParamData, ThrowOnError>) => (options.client ?? client).post<PostCallWithOptionalParamResponses, unknown, ThrowOnError>({\n    url: '/api/v{api-version}/parameters',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options.headers\n    }\n});\n\nexport const postApiVbyApiVersionRequestBody = <ThrowOnError extends boolean = false>(options?: Options<PostApiVbyApiVersionRequestBodyData, ThrowOnError>) => (options?.client ?? client).post<unknown, unknown, ThrowOnError>({\n    url: '/api/v{api-version}/requestBody',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options?.headers\n    }\n});\n\nexport const postApiVbyApiVersionFormData = <ThrowOnError extends boolean = false>(options?: Options<PostApiVbyApiVersionFormDataData, ThrowOnError>) => (options?.client ?? client).post<unknown, unknown, ThrowOnError>({\n    ...formDataBodySerializer,\n    url: '/api/v{api-version}/formData',\n    ...options,\n    headers: {\n        'Content-Type': null,\n        ...options?.headers\n    }\n});\n\nexport const callWithDefaultParameters = <ThrowOnError extends boolean = false>(options?: Options<CallWithDefaultParametersData, ThrowOnError>) => (options?.client ?? client).get<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/defaults', ...options });\n\nexport const callWithDefaultOptionalParameters = <ThrowOnError extends boolean = false>(options?: Options<CallWithDefaultOptionalParametersData, ThrowOnError>) => (options?.client ?? client).post<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/defaults', ...options });\n\nexport const callToTestOrderOfParams = <ThrowOnError extends boolean = false>(options: Options<CallToTestOrderOfParamsData, ThrowOnError>) => (options.client ?? client).put<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/defaults', ...options });\n\nexport const duplicateName = <ThrowOnError extends boolean = false>(options?: Options<DuplicateNameData, ThrowOnError>) => (options?.client ?? client).delete<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/duplicate', ...options });\n\nexport const duplicateName2 = <ThrowOnError extends boolean = false>(options?: Options<DuplicateName2Data, ThrowOnError>) => (options?.client ?? client).get<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/duplicate', ...options });\n\nexport const duplicateName3 = <ThrowOnError extends boolean = false>(options?: Options<DuplicateName3Data, ThrowOnError>) => (options?.client ?? client).post<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/duplicate', ...options });\n\nexport const duplicateName4 = <ThrowOnError extends boolean = false>(options?: Options<DuplicateName4Data, ThrowOnError>) => (options?.client ?? client).put<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/duplicate', ...options });\n\nexport const callWithNoContentResponse = <ThrowOnError extends boolean = false>(options?: Options<CallWithNoContentResponseData, ThrowOnError>) => (options?.client ?? client).get<CallWithNoContentResponseResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/no-content', ...options });\n\nexport const callWithResponseAndNoContentResponse = <ThrowOnError extends boolean = false>(options?: Options<CallWithResponseAndNoContentResponseData, ThrowOnError>) => (options?.client ?? client).get<CallWithResponseAndNoContentResponseResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/multiple-tags/response-and-no-content', ...options });\n\nexport const dummyA = <ThrowOnError extends boolean = false>(options?: Options<DummyAData, ThrowOnError>) => (options?.client ?? client).get<DummyAResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/multiple-tags/a', ...options });\n\nexport const dummyB = <ThrowOnError extends boolean = false>(options?: Options<DummyBData, ThrowOnError>) => (options?.client ?? client).get<DummyBResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/multiple-tags/b', ...options });\n\nexport const callWithResponse = <ThrowOnError extends boolean = false>(options?: Options<CallWithResponseData, ThrowOnError>) => (options?.client ?? client).get<CallWithResponseResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/response', ...options });\n\nexport const callWithDuplicateResponses = <ThrowOnError extends boolean = false>(options?: Options<CallWithDuplicateResponsesData, ThrowOnError>) => (options?.client ?? client).post<CallWithDuplicateResponsesResponses, CallWithDuplicateResponsesErrors, ThrowOnError>({ url: '/api/v{api-version}/response', ...options });\n\nexport const callWithResponses = <ThrowOnError extends boolean = false>(options?: Options<CallWithResponsesData, ThrowOnError>) => (options?.client ?? client).put<CallWithResponsesResponses, CallWithResponsesErrors, ThrowOnError>({ url: '/api/v{api-version}/response', ...options });\n\nexport const collectionFormat = <ThrowOnError extends boolean = false>(options: Options<CollectionFormatData, ThrowOnError>) => (options.client ?? client).get<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/collectionFormat', ...options });\n\nexport const types = <ThrowOnError extends boolean = false>(options: Options<TypesData, ThrowOnError>) => (options.client ?? client).get<TypesResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/types', ...options });\n\nexport const uploadFile = <ThrowOnError extends boolean = false>(options: Options<UploadFileData, ThrowOnError>) => (options.client ?? client).post<UploadFileResponses, unknown, ThrowOnError>({\n    ...urlSearchParamsBodySerializer,\n    url: '/api/v{api-version}/upload',\n    ...options,\n    headers: {\n        'Content-Type': 'application/x-www-form-urlencoded',\n        ...options.headers\n    }\n});\n\nexport const fileResponse = <ThrowOnError extends boolean = false>(options: Options<FileResponseData, ThrowOnError>) => (options.client ?? client).get<FileResponseResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/file/{id}', ...options });\n\nexport const complexTypes = <ThrowOnError extends boolean = false>(options: Options<ComplexTypesData, ThrowOnError>) => (options.client ?? client).get<ComplexTypesResponses, ComplexTypesErrors, ThrowOnError>({\n    querySerializer: { parameters: { parameterObject: { object: { style: 'form' } } } },\n    url: '/api/v{api-version}/complex',\n    ...options\n});\n\nexport const multipartResponse = <ThrowOnError extends boolean = false>(options?: Options<MultipartResponseData, ThrowOnError>) => (options?.client ?? client).get<MultipartResponseResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/multipart', ...options });\n\nexport const multipartRequest = <ThrowOnError extends boolean = false>(options?: Options<MultipartRequestData, ThrowOnError>) => (options?.client ?? client).post<unknown, unknown, ThrowOnError>({\n    ...formDataBodySerializer,\n    url: '/api/v{api-version}/multipart',\n    ...options,\n    headers: {\n        'Content-Type': null,\n        ...options?.headers\n    }\n});\n\nexport const complexParams = <ThrowOnError extends boolean = false>(options: Options<ComplexParamsData, ThrowOnError>) => (options.client ?? client).put<ComplexParamsResponses, unknown, ThrowOnError>({\n    url: '/api/v{api-version}/complex/{id}',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json-patch+json',\n        ...options.headers\n    }\n});\n\nexport const callWithResultFromHeader = <ThrowOnError extends boolean = false>(options?: Options<CallWithResultFromHeaderData, ThrowOnError>) => (options?.client ?? client).post<CallWithResultFromHeaderResponses, CallWithResultFromHeaderErrors, ThrowOnError>({ url: '/api/v{api-version}/header', ...options });\n\nexport const testErrorCode = <ThrowOnError extends boolean = false>(options: Options<TestErrorCodeData, ThrowOnError>) => (options.client ?? client).post<TestErrorCodeResponses, TestErrorCodeErrors, ThrowOnError>({ url: '/api/v{api-version}/error', ...options });\n\nexport const nonAsciiæøåÆøÅöôêÊ字符串 = <ThrowOnError extends boolean = false>(options: Options<NonAsciiæøåÆøÅöôêÊ字符串Data, ThrowOnError>) => (options.client ?? client).post<NonAsciiæøåÆøÅöôêÊ字符串Responses, unknown, ThrowOnError>({ url: '/api/v{api-version}/non-ascii-æøåÆØÅöôêÊ字符串', ...options });\n\n/**\n * Login User\n */\nexport const putWithFormUrlEncoded = <ThrowOnError extends boolean = false>(options: Options<PutWithFormUrlEncodedData, ThrowOnError>) => (options.client ?? client).put<unknown, unknown, ThrowOnError>({\n    ...urlSearchParamsBodySerializer,\n    url: '/api/v{api-version}/non-ascii-æøåÆØÅöôêÊ字符串',\n    ...options,\n    headers: {\n        'Content-Type': 'application/x-www-form-urlencoded',\n        ...options.headers\n    }\n});\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@angular/common/default/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type ClientOptions = {\n    baseUrl: 'http://localhost:3000/base' | (string & {});\n};\n\n/**\n * Model with number-only name\n */\nexport type _400 = string;\n\nexport type ExternalRefA = ExternalSharedModel;\n\nexport type ExternalRefB = ExternalSharedModel;\n\n/**\n * Testing multiline comments in string: First line\n * Second line\n *\n * Fourth line\n */\nexport type CamelCaseCommentWithBreaks = number;\n\n/**\n * Testing multiline comments in string: First line\n * Second line\n *\n * Fourth line\n */\nexport type CommentWithBreaks = number;\n\n/**\n * Testing backticks in string: `backticks` and ```multiple backticks``` should work\n */\nexport type CommentWithBackticks = number;\n\n/**\n * Testing backticks and quotes in string: `backticks`, 'quotes', \"double quotes\" and ```multiple backticks``` should work\n */\nexport type CommentWithBackticksAndQuotes = number;\n\n/**\n * Testing slashes in string: \\backwards\\\\\\ and /forwards/// should work\n */\nexport type CommentWithSlashes = number;\n\n/**\n * Testing expression placeholders in string: ${expression} should work\n */\nexport type CommentWithExpressionPlaceholders = number;\n\n/**\n * Testing quotes in string: 'single quote''' and \"double quotes\"\"\" should work\n */\nexport type CommentWithQuotes = number;\n\n/**\n * Testing reserved characters in string: * inline * and ** inline ** should work\n */\nexport type CommentWithReservedCharacters = number;\n\n/**\n * This is a simple number\n */\nexport type SimpleInteger = number;\n\n/**\n * This is a simple boolean\n */\nexport type SimpleBoolean = boolean;\n\n/**\n * This is a simple string\n */\nexport type SimpleString = string;\n\n/**\n * A string with non-ascii (unicode) characters valid in typescript identifiers (æøåÆØÅöÔèÈ字符串)\n */\nexport type NonAsciiStringæøåÆøÅöôêÊ字符串 = string;\n\n/**\n * This is a simple file\n */\nexport type SimpleFile = Blob | File;\n\n/**\n * This is a simple reference\n */\nexport type SimpleReference = ModelWithString;\n\n/**\n * This is a simple string\n */\nexport type SimpleStringWithPattern = string | null;\n\n/**\n * This is a simple enum with strings\n */\nexport type EnumWithStrings = 'Success' | 'Warning' | 'Error' | '\\'Single Quote\\'' | '\"Double Quotes\"' | 'Non-ascii: øæåôöØÆÅÔÖ字符串';\n\nexport type EnumWithReplacedCharacters = '\\'Single Quote\\'' | '\"Double Quotes\"' | 'øæåôöØÆÅÔÖ字符串' | 3.1 | '';\n\n/**\n * This is a simple enum with numbers\n */\nexport type EnumWithNumbers = 1 | 2 | 3 | 1.1 | 1.2 | 1.3 | 100 | 200 | 300 | -100 | -200 | -300 | -1.1 | -1.2 | -1.3;\n\n/**\n * Success=1,Warning=2,Error=3\n */\nexport type EnumFromDescription = number;\n\n/**\n * This is a simple enum with numbers\n */\nexport type EnumWithExtensions = 200 | 400 | 500;\n\nexport type EnumWithXEnumNames = 0 | 1 | 2;\n\n/**\n * This is a simple array with numbers\n */\nexport type ArrayWithNumbers = Array<number>;\n\n/**\n * This is a simple array with booleans\n */\nexport type ArrayWithBooleans = Array<boolean>;\n\n/**\n * This is a simple array with strings\n */\nexport type ArrayWithStrings = Array<string>;\n\n/**\n * This is a simple array with references\n */\nexport type ArrayWithReferences = Array<ModelWithString>;\n\n/**\n * This is a simple array containing an array\n */\nexport type ArrayWithArray = Array<Array<ModelWithString>>;\n\n/**\n * This is a simple array with properties\n */\nexport type ArrayWithProperties = Array<{\n    '16x16'?: CamelCaseCommentWithBreaks;\n    bar?: string;\n}>;\n\n/**\n * This is a simple array with any of properties\n */\nexport type ArrayWithAnyOfProperties = Array<{\n    foo?: string;\n} | {\n    bar?: string;\n}>;\n\nexport type AnyOfAnyAndNull = {\n    data?: unknown;\n};\n\n/**\n * This is a simple array with any of properties\n */\nexport type AnyOfArrays = {\n    results?: Array<{\n        foo?: string;\n    } | {\n        bar?: string;\n    }>;\n};\n\n/**\n * This is a string dictionary\n */\nexport type DictionaryWithString = {\n    [key: string]: string;\n};\n\nexport type DictionaryWithPropertiesAndAdditionalProperties = {\n    foo?: number;\n    bar?: boolean;\n    [key: string]: string | number | boolean | undefined;\n};\n\n/**\n * This is a string reference\n */\nexport type DictionaryWithReference = {\n    [key: string]: ModelWithString;\n};\n\n/**\n * This is a complex dictionary\n */\nexport type DictionaryWithArray = {\n    [key: string]: Array<ModelWithString>;\n};\n\n/**\n * This is a string dictionary\n */\nexport type DictionaryWithDictionary = {\n    [key: string]: {\n        [key: string]: string;\n    };\n};\n\n/**\n * This is a complex dictionary\n */\nexport type DictionaryWithProperties = {\n    [key: string]: {\n        foo?: string;\n        bar?: string;\n    };\n};\n\n/**\n * This is a model with one number property\n */\nexport type ModelWithInteger = {\n    /**\n     * This is a simple number property\n     */\n    prop?: number;\n};\n\n/**\n * This is a model with one boolean property\n */\nexport type ModelWithBoolean = {\n    /**\n     * This is a simple boolean property\n     */\n    prop?: boolean;\n};\n\n/**\n * This is a model with one string property\n */\nexport type ModelWithString = {\n    /**\n     * This is a simple string property\n     */\n    prop?: string;\n};\n\n/**\n * This is a model with one string property\n */\nexport type ModelWithStringError = {\n    /**\n     * This is a simple string property\n     */\n    prop?: string;\n};\n\n/**\n * `Comment` or `VoiceComment`. The JSON object for adding voice comments to tickets is different. See [Adding voice comments to tickets](/documentation/ticketing/managing-tickets/adding-voice-comments-to-tickets)\n */\nexport type ModelFromZendesk = string;\n\n/**\n * This is a model with one string property\n */\nexport type ModelWithNullableString = {\n    /**\n     * This is a simple string property\n     */\n    nullableProp1?: string | null;\n    /**\n     * This is a simple string property\n     */\n    nullableRequiredProp1: string | null;\n    /**\n     * This is a simple string property\n     */\n    nullableProp2?: string | null;\n    /**\n     * This is a simple string property\n     */\n    nullableRequiredProp2: string | null;\n    /**\n     * This is a simple enum with strings\n     */\n    'foo_bar-enum'?: 'Success' | 'Warning' | 'Error' | 'ØÆÅ字符串';\n};\n\n/**\n * This is a model with one enum\n */\nexport type ModelWithEnum = {\n    /**\n     * This is a simple enum with strings\n     */\n    'foo_bar-enum'?: 'Success' | 'Warning' | 'Error' | 'ØÆÅ字符串';\n    /**\n     * These are the HTTP error code enums\n     */\n    statusCode?: '100' | '200 FOO' | '300 FOO_BAR' | '400 foo-bar' | '500 foo.bar' | '600 foo&bar';\n    /**\n     * Simple boolean enum\n     */\n    bool?: true;\n};\n\n/**\n * This is a model with one enum with escaped name\n */\nexport type ModelWithEnumWithHyphen = {\n    /**\n     * Foo-Bar-Baz-Qux\n     */\n    'foo-bar-baz-qux'?: '3.0';\n};\n\n/**\n * This is a model with one enum\n */\nexport type ModelWithEnumFromDescription = {\n    /**\n     * Success=1,Warning=2,Error=3\n     */\n    test?: number;\n};\n\n/**\n * This is a model with nested enums\n */\nexport type ModelWithNestedEnums = {\n    dictionaryWithEnum?: {\n        [key: string]: 'Success' | 'Warning' | 'Error';\n    };\n    dictionaryWithEnumFromDescription?: {\n        [key: string]: number;\n    };\n    arrayWithEnum?: Array<'Success' | 'Warning' | 'Error'>;\n    arrayWithDescription?: Array<number>;\n    /**\n     * This is a simple enum with strings\n     */\n    'foo_bar-enum'?: 'Success' | 'Warning' | 'Error' | 'ØÆÅ字符串';\n};\n\n/**\n * This is a model with one property containing a reference\n */\nexport type ModelWithReference = {\n    prop?: ModelWithProperties;\n};\n\n/**\n * This is a model with one property containing an array\n */\nexport type ModelWithArrayReadOnlyAndWriteOnly = {\n    prop?: Array<ModelWithReadOnlyAndWriteOnly>;\n    propWithFile?: Array<Blob | File>;\n    propWithNumber?: Array<number>;\n};\n\n/**\n * This is a model with one property containing an array\n */\nexport type ModelWithArray = {\n    prop?: Array<ModelWithString>;\n    propWithFile?: Array<Blob | File>;\n    propWithNumber?: Array<number>;\n};\n\n/**\n * This is a model with one property containing a dictionary\n */\nexport type ModelWithDictionary = {\n    prop?: {\n        [key: string]: string;\n    };\n};\n\n/**\n * This is a deprecated model with a deprecated property\n *\n * @deprecated\n */\nexport type DeprecatedModel = {\n    /**\n     * This is a deprecated property\n     *\n     * @deprecated\n     */\n    prop?: string;\n};\n\n/**\n * This is a model with one property containing a circular reference\n */\nexport type ModelWithCircularReference = {\n    prop?: ModelWithCircularReference;\n};\n\n/**\n * This is a model with one property with a 'one of' relationship\n */\nexport type CompositionWithOneOf = {\n    propA?: ModelWithString | ModelWithEnum | ModelWithArray | ModelWithDictionary;\n};\n\n/**\n * This is a model with one property with a 'one of' relationship where the options are not $ref\n */\nexport type CompositionWithOneOfAnonymous = {\n    propA?: {\n        propA?: string;\n    } | string | number;\n};\n\n/**\n * Circle\n */\nexport type ModelCircle = {\n    kind: string;\n    radius?: number;\n};\n\n/**\n * Square\n */\nexport type ModelSquare = {\n    kind: string;\n    sideLength?: number;\n};\n\n/**\n * This is a model with one property with a 'one of' relationship where the options are not $ref\n */\nexport type CompositionWithOneOfDiscriminator = ({\n    kind: 'circle';\n} & ModelCircle) | ({\n    kind: 'square';\n} & ModelSquare);\n\n/**\n * This is a model with one property with a 'any of' relationship\n */\nexport type CompositionWithAnyOf = {\n    propA?: ModelWithString | ModelWithEnum | ModelWithArray | ModelWithDictionary;\n};\n\n/**\n * This is a model with one property with a 'any of' relationship where the options are not $ref\n */\nexport type CompositionWithAnyOfAnonymous = {\n    propA?: {\n        propA?: string;\n    } | string | number;\n};\n\n/**\n * This is a model with nested 'any of' property with a type null\n */\nexport type CompositionWithNestedAnyAndTypeNull = {\n    propA?: Array<ModelWithDictionary | null> | Array<ModelWithArray | null>;\n};\n\nexport type _3eNum1Период = 'Bird' | 'Dog';\n\nexport type ConstValue = 'ConstValue';\n\n/**\n * This is a model with one property with a 'any of' relationship where the options are not $ref\n */\nexport type CompositionWithNestedAnyOfAndNull = {\n    propA?: Array<_3eNum1Период | ConstValue> | null;\n};\n\n/**\n * This is a model with one property with a 'one of' relationship\n */\nexport type CompositionWithOneOfAndNullable = {\n    propA?: {\n        boolean?: boolean;\n    } | ModelWithEnum | ModelWithArray | ModelWithDictionary | null;\n};\n\n/**\n * This is a model that contains a simple dictionary within composition\n */\nexport type CompositionWithOneOfAndSimpleDictionary = {\n    propA?: boolean | {\n        [key: string]: number;\n    };\n};\n\n/**\n * This is a model that contains a dictionary of simple arrays within composition\n */\nexport type CompositionWithOneOfAndSimpleArrayDictionary = {\n    propA?: boolean | {\n        [key: string]: Array<boolean>;\n    };\n};\n\n/**\n * This is a model that contains a dictionary of complex arrays (composited) within composition\n */\nexport type CompositionWithOneOfAndComplexArrayDictionary = {\n    propA?: boolean | {\n        [key: string]: Array<number | string>;\n    };\n};\n\n/**\n * This is a model with one property with a 'all of' relationship\n */\nexport type CompositionWithAllOfAndNullable = {\n    propA?: ({\n        boolean?: boolean;\n    } & ModelWithEnum & ModelWithArray & ModelWithDictionary) | null;\n};\n\n/**\n * This is a model with one property with a 'any of' relationship\n */\nexport type CompositionWithAnyOfAndNullable = {\n    propA?: {\n        boolean?: boolean;\n    } | ModelWithEnum | ModelWithArray | ModelWithDictionary | null;\n};\n\n/**\n * This is a base model with two simple optional properties\n */\nexport type CompositionBaseModel = {\n    firstName?: string;\n    lastname?: string;\n};\n\n/**\n * This is a model that extends the base model\n */\nexport type CompositionExtendedModel = CompositionBaseModel & {\n    age: number;\n    firstName: string;\n    lastname: string;\n};\n\n/**\n * This is a model with one nested property\n */\nexport type ModelWithProperties = {\n    required: string;\n    readonly requiredAndReadOnly: string;\n    requiredAndNullable: string | null;\n    string?: string;\n    number?: number;\n    boolean?: boolean;\n    reference?: ModelWithString;\n    'property with space'?: string;\n    default?: string;\n    try?: string;\n    readonly '@namespace.string'?: string;\n    readonly '@namespace.integer'?: number;\n};\n\n/**\n * This is a model with one nested property\n */\nexport type ModelWithNestedProperties = {\n    readonly first: {\n        readonly second: {\n            readonly third: string | null;\n        } | null;\n    } | null;\n};\n\n/**\n * This is a model with duplicated properties\n */\nexport type ModelWithDuplicateProperties = {\n    prop?: ModelWithString;\n};\n\n/**\n * This is a model with ordered properties\n */\nexport type ModelWithOrderedProperties = {\n    zebra?: string;\n    apple?: string;\n    hawaii?: string;\n};\n\n/**\n * This is a model with duplicated imports\n */\nexport type ModelWithDuplicateImports = {\n    propA?: ModelWithString;\n    propB?: ModelWithString;\n    propC?: ModelWithString;\n};\n\n/**\n * This is a model that extends another model\n */\nexport type ModelThatExtends = ModelWithString & {\n    propExtendsA?: string;\n    propExtendsB?: ModelWithString;\n};\n\n/**\n * This is a model that extends another model\n */\nexport type ModelThatExtendsExtends = ModelWithString & ModelThatExtends & {\n    propExtendsC?: string;\n    propExtendsD?: ModelWithString;\n};\n\n/**\n * This is a model that contains a some patterns\n */\nexport type ModelWithPattern = {\n    key: string;\n    name: string;\n    readonly enabled?: boolean;\n    readonly modified?: string;\n    id?: string;\n    text?: string;\n    patternWithSingleQuotes?: string;\n    patternWithNewline?: string;\n    patternWithBacktick?: string;\n    patternWithUnicode?: string;\n};\n\nexport type File = {\n    /**\n     * Id\n     */\n    readonly id?: string;\n    /**\n     * Updated at\n     */\n    readonly updated_at?: string;\n    /**\n     * Created at\n     */\n    readonly created_at?: string;\n    /**\n     * Mime\n     */\n    mime: string;\n    /**\n     * File\n     */\n    readonly file?: string;\n};\n\nexport type Default = {\n    name?: string;\n};\n\nexport type Pageable = {\n    page?: number;\n    size?: number;\n    sort?: Array<string>;\n};\n\n/**\n * This is a free-form object without additionalProperties.\n */\nexport type FreeFormObjectWithoutAdditionalProperties = {\n    [key: string]: unknown;\n};\n\n/**\n * This is a free-form object with additionalProperties: true.\n */\nexport type FreeFormObjectWithAdditionalPropertiesEqTrue = {\n    [key: string]: unknown;\n};\n\n/**\n * This is a free-form object with additionalProperties: {}.\n */\nexport type FreeFormObjectWithAdditionalPropertiesEqEmptyObject = {\n    [key: string]: unknown;\n};\n\nexport type ModelWithConst = {\n    String?: 'String';\n    number?: 0;\n    null?: unknown;\n    withType?: 'Some string';\n};\n\n/**\n * This is a model with one property and additionalProperties: true\n */\nexport type ModelWithAdditionalPropertiesEqTrue = {\n    /**\n     * This is a simple string property\n     */\n    prop?: string;\n    [key: string]: unknown;\n};\n\nexport type NestedAnyOfArraysNullable = {\n    nullableArray?: Array<string | boolean> | null;\n};\n\nexport type CompositionWithOneOfAndProperties = ({\n    foo: SimpleParameter;\n} | {\n    bar: NonAsciiStringæøåÆøÅöôêÊ字符串;\n}) & {\n    baz: number | null;\n    qux: number;\n};\n\n/**\n * An object that can be null\n */\nexport type NullableObject = {\n    foo?: string;\n} | null;\n\n/**\n * Some % character\n */\nexport type CharactersInDescription = string;\n\nexport type ModelWithNullableObject = {\n    data?: NullableObject;\n};\n\n/**\n * An object with additional properties that can be null\n */\nexport type ModelWithAdditionalPropertiesRef = {\n    [key: string]: NullableObject | null;\n};\n\nexport type ModelWithOneOfEnum = {\n    foo: 'Bar';\n} | {\n    foo: 'Baz';\n} | {\n    foo: 'Qux';\n} | {\n    content: string;\n    foo: 'Quux';\n} | {\n    content: [\n        string,\n        string\n    ];\n    foo: 'Corge';\n};\n\nexport type ModelWithNestedArrayEnumsDataFoo = 'foo' | 'bar';\n\nexport type ModelWithNestedArrayEnumsDataBar = 'baz' | 'qux';\n\nexport type ModelWithNestedArrayEnumsData = {\n    foo?: Array<ModelWithNestedArrayEnumsDataFoo>;\n    bar?: Array<ModelWithNestedArrayEnumsDataBar>;\n};\n\nexport type ModelWithNestedArrayEnums = {\n    array_strings?: Array<string>;\n    data?: ModelWithNestedArrayEnumsData;\n};\n\nexport type ModelWithNestedCompositionEnums = {\n    foo?: ModelWithNestedArrayEnumsDataFoo;\n};\n\nexport type ModelWithReadOnlyAndWriteOnly = {\n    foo: string;\n    readonly bar: string;\n};\n\nexport type ModelWithConstantSizeArray = [\n    number,\n    number\n];\n\nexport type ModelWithAnyOfConstantSizeArray = [\n    number | string,\n    number | string,\n    number | string\n];\n\nexport type ModelWithPrefixItemsConstantSizeArray = Array<ModelWithInteger | number | string>;\n\nexport type ModelWithAnyOfConstantSizeArrayNullable = [\n    number | null | string,\n    number | null | string,\n    number | null | string\n];\n\nexport type ModelWithAnyOfConstantSizeArrayWithNSizeAndOptions = [\n    number | Import,\n    number | Import\n];\n\nexport type ModelWithAnyOfConstantSizeArrayAndIntersect = [\n    number & string,\n    number & string\n];\n\nexport type ModelWithNumericEnumUnion = {\n    /**\n     * Период\n     */\n    value?: -10 | -1 | 0 | 1 | 3 | 6 | 12;\n};\n\n/**\n * Some description with `back ticks`\n */\nexport type ModelWithBackticksInDescription = {\n    /**\n     * The template `that` should be used for parsing and importing the contents of the CSV file.\n     *\n     * <br/><p>There is one placeholder currently supported:<ul>     <li><b>${x}</b> - refers to the n-th column in the CSV file, e.g. ${1}, ${2}, ...)</li></ul><p>Example of a correct JSON template:</p>\n     * <pre>\n     * [\n     * {\n     * \"resourceType\": \"Asset\",\n     * \"identifier\": {\n     * \"name\": \"${1}\",\n     * \"domain\": {\n     * \"name\": \"${2}\",\n     * \"community\": {\n     * \"name\": \"Some Community\"\n     * }\n     * }\n     * },\n     * \"attributes\" : {\n     * \"00000000-0000-0000-0000-000000003115\" : [ {\n     * \"value\" : \"${3}\"\n     * } ],\n     * \"00000000-0000-0000-0000-000000000222\" : [ {\n     * \"value\" : \"${4}\"\n     * } ]\n     * }\n     * }\n     * ]\n     * </pre>\n     */\n    template?: string;\n};\n\nexport type ModelWithOneOfAndProperties = (SimpleParameter | NonAsciiStringæøåÆøÅöôêÊ字符串) & {\n    baz: number | null;\n    qux: number;\n};\n\n/**\n * Model used to test deduplication strategy (unused)\n */\nexport type ParameterSimpleParameterUnused = string;\n\n/**\n * Model used to test deduplication strategy\n */\nexport type PostServiceWithEmptyTagResponse = string;\n\n/**\n * Model used to test deduplication strategy\n */\nexport type PostServiceWithEmptyTagResponse2 = string;\n\n/**\n * Model used to test deduplication strategy\n */\nexport type DeleteFooData = string;\n\n/**\n * Model used to test deduplication strategy\n */\nexport type DeleteFooData2 = string;\n\n/**\n * Model with restricted keyword name\n */\nexport type Import = string;\n\nexport type SchemaWithFormRestrictedKeys = {\n    description?: string;\n    'x-enum-descriptions'?: string;\n    'x-enum-varnames'?: string;\n    'x-enumNames'?: string;\n    title?: string;\n    object?: {\n        description?: string;\n        'x-enum-descriptions'?: string;\n        'x-enum-varnames'?: string;\n        'x-enumNames'?: string;\n        title?: string;\n    };\n    array?: Array<{\n        description?: string;\n        'x-enum-descriptions'?: string;\n        'x-enum-varnames'?: string;\n        'x-enumNames'?: string;\n        title?: string;\n    }>;\n};\n\n/**\n * This schema was giving PascalCase transformations a hard time\n */\nexport type IoK8sApimachineryPkgApisMetaV1DeleteOptions = {\n    /**\n     * Must be fulfilled before a deletion is carried out. If not possible, a 409 Conflict status will be returned.\n     */\n    preconditions?: IoK8sApimachineryPkgApisMetaV1Preconditions;\n};\n\n/**\n * This schema was giving PascalCase transformations a hard time\n */\nexport type IoK8sApimachineryPkgApisMetaV1Preconditions = {\n    /**\n     * Specifies the target ResourceVersion\n     */\n    resourceVersion?: string;\n    /**\n     * Specifies the target UID.\n     */\n    uid?: string;\n};\n\nexport type AdditionalPropertiesUnknownIssue = {\n    [key: string]: string | number;\n};\n\nexport type AdditionalPropertiesUnknownIssue2 = {\n    [key: string]: string | number;\n};\n\nexport type AdditionalPropertiesUnknownIssue3 = string & {\n    entries: {\n        [key: string]: AdditionalPropertiesUnknownIssue;\n    };\n};\n\nexport type AdditionalPropertiesIntegerIssue = {\n    value: number;\n    [key: string]: number;\n};\n\nexport type OneOfAllOfIssue = ((ConstValue | GenericSchemaDuplicateIssue1SystemBoolean) & _3eNum1Период) | GenericSchemaDuplicateIssue1SystemString;\n\nexport type GenericSchemaDuplicateIssue1SystemBoolean = {\n    item?: boolean;\n    error?: string | null;\n    readonly hasError?: boolean;\n    data?: {\n        [key: string]: never;\n    };\n};\n\nexport type GenericSchemaDuplicateIssue1SystemString = {\n    item?: string | null;\n    error?: string | null;\n    readonly hasError?: boolean;\n};\n\nexport type ExternalSharedModel = {\n    id: string;\n    name?: string;\n};\n\n/**\n * This is a model with one property containing a reference\n */\nexport type ModelWithReferenceWritable = {\n    prop?: ModelWithPropertiesWritable;\n};\n\n/**\n * This is a model with one property containing an array\n */\nexport type ModelWithArrayReadOnlyAndWriteOnlyWritable = {\n    prop?: Array<ModelWithReadOnlyAndWriteOnlyWritable>;\n    propWithFile?: Array<Blob | File>;\n    propWithNumber?: Array<number>;\n};\n\n/**\n * This is a model with one nested property\n */\nexport type ModelWithPropertiesWritable = {\n    required: string;\n    requiredAndNullable: string | null;\n    string?: string;\n    number?: number;\n    boolean?: boolean;\n    reference?: ModelWithString;\n    'property with space'?: string;\n    default?: string;\n    try?: string;\n};\n\n/**\n * This is a model that contains a some patterns\n */\nexport type ModelWithPatternWritable = {\n    key: string;\n    name: string;\n    id?: string;\n    text?: string;\n    patternWithSingleQuotes?: string;\n    patternWithNewline?: string;\n    patternWithBacktick?: string;\n    patternWithUnicode?: string;\n};\n\nexport type FileWritable = {\n    /**\n     * Mime\n     */\n    mime: string;\n};\n\nexport type ModelWithReadOnlyAndWriteOnlyWritable = {\n    foo: string;\n    baz: string;\n};\n\nexport type ModelWithAnyOfConstantSizeArrayWithNSizeAndOptionsWritable = [\n    number | Import,\n    number | Import\n];\n\nexport type AdditionalPropertiesUnknownIssueWritable = {\n    [key: string]: string | number;\n};\n\nexport type OneOfAllOfIssueWritable = ((ConstValue | GenericSchemaDuplicateIssue1SystemBoolean) & _3eNum1Период) | GenericSchemaDuplicateIssue1SystemString;\n\nexport type GenericSchemaDuplicateIssue1SystemBooleanWritable = {\n    item?: boolean;\n    error?: string | null;\n    data?: {\n        [key: string]: never;\n    };\n};\n\nexport type GenericSchemaDuplicateIssue1SystemStringWritable = {\n    item?: string | null;\n    error?: string | null;\n};\n\n/**\n * This is a reusable parameter\n */\nexport type SimpleParameter = string;\n\n/**\n * Parameter with illegal characters\n */\nexport type XFooBar = ModelWithString;\n\nexport type SimpleRequestBody = ModelWithString;\n\nexport type SimpleFormData = ModelWithString;\n\nexport type ExportData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no+tag';\n};\n\nexport type PatchApiVbyApiVersionNoTagData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no+tag';\n};\n\nexport type PatchApiVbyApiVersionNoTagResponses = {\n    /**\n     * OK\n     */\n    default: unknown;\n};\n\nexport type ImportData = {\n    body: ModelWithReadOnlyAndWriteOnlyWritable | ModelWithArrayReadOnlyAndWriteOnlyWritable;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no+tag';\n};\n\nexport type ImportResponses = {\n    /**\n     * Success\n     */\n    200: ModelFromZendesk;\n    /**\n     * Default success response\n     */\n    default: ModelWithReadOnlyAndWriteOnly;\n};\n\nexport type ImportResponse = ImportResponses[keyof ImportResponses];\n\nexport type FooWowData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no+tag';\n};\n\nexport type FooWowResponses = {\n    /**\n     * OK\n     */\n    default: unknown;\n};\n\nexport type ApiVVersionODataControllerCountData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple/$count';\n};\n\nexport type ApiVVersionODataControllerCountResponses = {\n    /**\n     * Success\n     */\n    200: ModelFromZendesk;\n};\n\nexport type ApiVVersionODataControllerCountResponse = ApiVVersionODataControllerCountResponses[keyof ApiVVersionODataControllerCountResponses];\n\nexport type GetApiVbyApiVersionSimpleOperationData = {\n    body?: never;\n    path: {\n        /**\n         * foo in method\n         */\n        foo_param: string;\n    };\n    query?: never;\n    url: '/api/v{api-version}/simple:operation';\n};\n\nexport type GetApiVbyApiVersionSimpleOperationErrors = {\n    /**\n     * Default error response\n     */\n    default: ModelWithBoolean;\n};\n\nexport type GetApiVbyApiVersionSimpleOperationError = GetApiVbyApiVersionSimpleOperationErrors[keyof GetApiVbyApiVersionSimpleOperationErrors];\n\nexport type GetApiVbyApiVersionSimpleOperationResponses = {\n    /**\n     * Response is a simple number\n     */\n    200: number;\n};\n\nexport type GetApiVbyApiVersionSimpleOperationResponse = GetApiVbyApiVersionSimpleOperationResponses[keyof GetApiVbyApiVersionSimpleOperationResponses];\n\nexport type DeleteCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type GetCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type HeadCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type OptionsCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type PatchCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type PostCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type PutCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type DeleteFooData3 = {\n    body?: never;\n    headers: {\n        /**\n         * Parameter with illegal characters\n         */\n        'x-Foo-Bar': ModelWithString;\n    };\n    path: {\n        /**\n         * foo in method\n         */\n        foo_param: string;\n        /**\n         * bar in method\n         */\n        BarParam: string;\n    };\n    query?: never;\n    url: '/api/v{api-version}/foo/{foo_param}/bar/{BarParam}';\n};\n\nexport type CallWithDescriptionsData = {\n    body?: never;\n    path?: never;\n    query?: {\n        /**\n         * Testing multiline comments in string: First line\n         * Second line\n         *\n         * Fourth line\n         */\n        parameterWithBreaks?: string;\n        /**\n         * Testing backticks in string: `backticks` and ```multiple backticks``` should work\n         */\n        parameterWithBackticks?: string;\n        /**\n         * Testing slashes in string: \\backwards\\\\\\ and /forwards/// should work\n         */\n        parameterWithSlashes?: string;\n        /**\n         * Testing expression placeholders in string: ${expression} should work\n         */\n        parameterWithExpressionPlaceholders?: string;\n        /**\n         * Testing quotes in string: 'single quote''' and \"double quotes\"\"\" should work\n         */\n        parameterWithQuotes?: string;\n        /**\n         * Testing reserved characters in string: * inline * and ** inline ** should work\n         */\n        parameterWithReservedCharacters?: string;\n    };\n    url: '/api/v{api-version}/descriptions';\n};\n\nexport type DeprecatedCallData = {\n    body?: never;\n    headers: {\n        /**\n         * This parameter is deprecated\n         *\n         * @deprecated\n         */\n        parameter: DeprecatedModel | null;\n    };\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/parameters/deprecated';\n};\n\nexport type CallWithParametersData = {\n    /**\n     * This is the parameter that goes into the body\n     */\n    body: {\n        [key: string]: unknown;\n    } | null;\n    headers: {\n        /**\n         * This is the parameter that goes into the header\n         */\n        parameterHeader: string | null;\n    };\n    path: {\n        /**\n         * This is the parameter that goes into the path\n         */\n        parameterPath: string | null;\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string | null;\n    };\n    query: {\n        foo_ref_enum?: ModelWithNestedArrayEnumsDataFoo;\n        foo_all_of_enum: ModelWithNestedArrayEnumsDataFoo;\n        /**\n         * This is the parameter that goes into the query params\n         */\n        cursor: string | null;\n    };\n    url: '/api/v{api-version}/parameters/{parameterPath}';\n};\n\nexport type CallWithWeirdParameterNamesData = {\n    /**\n     * This is the parameter that goes into the body\n     */\n    body: ModelWithString | null;\n    headers: {\n        /**\n         * This is the parameter that goes into the request header\n         */\n        'parameter.header': string | null;\n    };\n    path: {\n        /**\n         * This is the parameter that goes into the path\n         */\n        'parameter.path.1'?: string;\n        /**\n         * This is the parameter that goes into the path\n         */\n        'parameter-path-2'?: string;\n        /**\n         * This is the parameter that goes into the path\n         */\n        'PARAMETER-PATH-3'?: string;\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string | null;\n    };\n    query: {\n        /**\n         * This is the parameter with a reserved keyword\n         */\n        default?: string;\n        /**\n         * This is the parameter that goes into the request query params\n         */\n        'parameter-query': string | null;\n    };\n    url: '/api/v{api-version}/parameters/{parameter.path.1}/{parameter-path-2}/{PARAMETER-PATH-3}';\n};\n\nexport type GetCallWithOptionalParamData = {\n    /**\n     * This is a required parameter\n     */\n    body: ModelWithOneOfEnum;\n    path?: never;\n    query?: {\n        /**\n         * This is an optional parameter\n         */\n        page?: number;\n    };\n    url: '/api/v{api-version}/parameters';\n};\n\nexport type PostCallWithOptionalParamData = {\n    /**\n     * This is an optional parameter\n     */\n    body?: {\n        offset?: number | null;\n    };\n    path?: never;\n    query: {\n        /**\n         * This is a required parameter\n         */\n        parameter: Pageable;\n    };\n    url: '/api/v{api-version}/parameters';\n};\n\nexport type PostCallWithOptionalParamResponses = {\n    /**\n     * Response is a simple number\n     */\n    200: number;\n    /**\n     * Success\n     */\n    204: void;\n};\n\nexport type PostCallWithOptionalParamResponse = PostCallWithOptionalParamResponses[keyof PostCallWithOptionalParamResponses];\n\nexport type PostApiVbyApiVersionRequestBodyData = {\n    /**\n     * A reusable request body\n     */\n    body?: SimpleRequestBody;\n    path?: never;\n    query?: {\n        /**\n         * This is a reusable parameter\n         */\n        parameter?: string;\n    };\n    url: '/api/v{api-version}/requestBody';\n};\n\nexport type PostApiVbyApiVersionFormDataData = {\n    /**\n     * A reusable request body\n     */\n    body?: SimpleFormData;\n    path?: never;\n    query?: {\n        /**\n         * This is a reusable parameter\n         */\n        parameter?: string;\n    };\n    url: '/api/v{api-version}/formData';\n};\n\nexport type CallWithDefaultParametersData = {\n    body?: never;\n    path?: never;\n    query?: {\n        /**\n         * This is a simple string with default value\n         */\n        parameterString?: string | null;\n        /**\n         * This is a simple number with default value\n         */\n        parameterNumber?: number | null;\n        /**\n         * This is a simple boolean with default value\n         */\n        parameterBoolean?: boolean | null;\n        /**\n         * This is a simple enum with default value\n         */\n        parameterEnum?: 'Success' | 'Warning' | 'Error';\n        /**\n         * This is a simple model with default value\n         */\n        parameterModel?: ModelWithString | null;\n    };\n    url: '/api/v{api-version}/defaults';\n};\n\nexport type CallWithDefaultOptionalParametersData = {\n    body?: never;\n    path?: never;\n    query?: {\n        /**\n         * This is a simple string that is optional with default value\n         */\n        parameterString?: string;\n        /**\n         * This is a simple number that is optional with default value\n         */\n        parameterNumber?: number;\n        /**\n         * This is a simple boolean that is optional with default value\n         */\n        parameterBoolean?: boolean;\n        /**\n         * This is a simple enum that is optional with default value\n         */\n        parameterEnum?: 'Success' | 'Warning' | 'Error';\n        /**\n         * This is a simple model that is optional with default value\n         */\n        parameterModel?: ModelWithString;\n    };\n    url: '/api/v{api-version}/defaults';\n};\n\nexport type CallToTestOrderOfParamsData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * This is a optional string with default\n         */\n        parameterOptionalStringWithDefault?: string;\n        /**\n         * This is a optional string with empty default\n         */\n        parameterOptionalStringWithEmptyDefault?: string;\n        /**\n         * This is a optional string with no default\n         */\n        parameterOptionalStringWithNoDefault?: string;\n        /**\n         * This is a string with default\n         */\n        parameterStringWithDefault: string;\n        /**\n         * This is a string with empty default\n         */\n        parameterStringWithEmptyDefault: string;\n        /**\n         * This is a string with no default\n         */\n        parameterStringWithNoDefault: string;\n        /**\n         * This is a string that can be null with no default\n         */\n        parameterStringNullableWithNoDefault?: string | null;\n        /**\n         * This is a string that can be null with default\n         */\n        parameterStringNullableWithDefault?: string | null;\n    };\n    url: '/api/v{api-version}/defaults';\n};\n\nexport type DuplicateNameData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/duplicate';\n};\n\nexport type DuplicateName2Data = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/duplicate';\n};\n\nexport type DuplicateName3Data = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/duplicate';\n};\n\nexport type DuplicateName4Data = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/duplicate';\n};\n\nexport type CallWithNoContentResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no-content';\n};\n\nexport type CallWithNoContentResponseResponses = {\n    /**\n     * Success\n     */\n    204: void;\n};\n\nexport type CallWithNoContentResponseResponse = CallWithNoContentResponseResponses[keyof CallWithNoContentResponseResponses];\n\nexport type CallWithResponseAndNoContentResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multiple-tags/response-and-no-content';\n};\n\nexport type CallWithResponseAndNoContentResponseResponses = {\n    /**\n     * Response is a simple number\n     */\n    200: number;\n    /**\n     * Success\n     */\n    204: void;\n};\n\nexport type CallWithResponseAndNoContentResponseResponse = CallWithResponseAndNoContentResponseResponses[keyof CallWithResponseAndNoContentResponseResponses];\n\nexport type DummyAData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multiple-tags/a';\n};\n\nexport type DummyAResponses = {\n    200: _400;\n};\n\nexport type DummyAResponse = DummyAResponses[keyof DummyAResponses];\n\nexport type DummyBData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multiple-tags/b';\n};\n\nexport type DummyBResponses = {\n    /**\n     * Success\n     */\n    204: void;\n};\n\nexport type DummyBResponse = DummyBResponses[keyof DummyBResponses];\n\nexport type CallWithResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/response';\n};\n\nexport type CallWithResponseResponses = {\n    default: Import;\n};\n\nexport type CallWithResponseResponse = CallWithResponseResponses[keyof CallWithResponseResponses];\n\nexport type CallWithDuplicateResponsesData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/response';\n};\n\nexport type CallWithDuplicateResponsesErrors = {\n    /**\n     * Message for 500 error\n     */\n    500: ModelWithStringError;\n    /**\n     * Message for 501 error\n     */\n    501: ModelWithStringError;\n    /**\n     * Message for 502 error\n     */\n    502: ModelWithStringError;\n    /**\n     * Message for 4XX errors\n     */\n    '4XX': DictionaryWithArray;\n    /**\n     * Default error response\n     */\n    default: ModelWithBoolean;\n};\n\nexport type CallWithDuplicateResponsesError = CallWithDuplicateResponsesErrors[keyof CallWithDuplicateResponsesErrors];\n\nexport type CallWithDuplicateResponsesResponses = {\n    /**\n     * Message for 200 response\n     */\n    200: ModelWithBoolean & ModelWithInteger;\n    /**\n     * Message for 201 response\n     */\n    201: ModelWithString;\n    /**\n     * Message for 202 response\n     */\n    202: ModelWithString;\n};\n\nexport type CallWithDuplicateResponsesResponse = CallWithDuplicateResponsesResponses[keyof CallWithDuplicateResponsesResponses];\n\nexport type CallWithResponsesData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/response';\n};\n\nexport type CallWithResponsesErrors = {\n    /**\n     * Message for 500 error\n     */\n    500: ModelWithStringError;\n    /**\n     * Message for 501 error\n     */\n    501: ModelWithStringError;\n    /**\n     * Message for 502 error\n     */\n    502: ModelWithStringError;\n    /**\n     * Message for default response\n     */\n    default: ModelWithStringError;\n};\n\nexport type CallWithResponsesError = CallWithResponsesErrors[keyof CallWithResponsesErrors];\n\nexport type CallWithResponsesResponses = {\n    /**\n     * Message for 200 response\n     */\n    200: {\n        readonly '@namespace.string'?: string;\n        readonly '@namespace.integer'?: number;\n        readonly value?: Array<ModelWithString>;\n    };\n    /**\n     * Message for 201 response\n     */\n    201: ModelThatExtends;\n    /**\n     * Message for 202 response\n     */\n    202: ModelThatExtendsExtends;\n};\n\nexport type CallWithResponsesResponse = CallWithResponsesResponses[keyof CallWithResponsesResponses];\n\nexport type CollectionFormatData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * This is an array parameter that is sent as csv format (comma-separated values)\n         */\n        parameterArrayCSV: Array<string> | null;\n        /**\n         * This is an array parameter that is sent as ssv format (space-separated values)\n         */\n        parameterArraySSV: Array<string> | null;\n        /**\n         * This is an array parameter that is sent as tsv format (tab-separated values)\n         */\n        parameterArrayTSV: Array<string> | null;\n        /**\n         * This is an array parameter that is sent as pipes format (pipe-separated values)\n         */\n        parameterArrayPipes: Array<string> | null;\n        /**\n         * This is an array parameter that is sent as multi format (multiple parameter instances)\n         */\n        parameterArrayMulti: Array<string> | null;\n    };\n    url: '/api/v{api-version}/collectionFormat';\n};\n\nexport type TypesData = {\n    body?: never;\n    path?: {\n        /**\n         * This is a number parameter\n         */\n        id?: number;\n    };\n    query: {\n        /**\n         * This is a number parameter\n         */\n        parameterNumber: number;\n        /**\n         * This is a string parameter\n         */\n        parameterString: string | null;\n        /**\n         * This is a boolean parameter\n         */\n        parameterBoolean: boolean | null;\n        /**\n         * This is an object parameter\n         */\n        parameterObject: {\n            [key: string]: unknown;\n        } | null;\n        /**\n         * This is an array parameter\n         */\n        parameterArray: Array<string> | null;\n        /**\n         * This is a dictionary parameter\n         */\n        parameterDictionary: {\n            [key: string]: unknown;\n        } | null;\n        /**\n         * This is an enum parameter\n         */\n        parameterEnum: 'Success' | 'Warning' | 'Error';\n    };\n    url: '/api/v{api-version}/types';\n};\n\nexport type TypesResponses = {\n    /**\n     * Response is a simple number\n     */\n    200: number;\n    /**\n     * Response is a simple string\n     */\n    201: string;\n    /**\n     * Response is a simple boolean\n     */\n    202: boolean;\n    /**\n     * Response is a simple object\n     */\n    203: {\n        [key: string]: unknown;\n    };\n};\n\nexport type TypesResponse = TypesResponses[keyof TypesResponses];\n\nexport type UploadFileData = {\n    body: Blob | File;\n    path: {\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string | null;\n    };\n    query?: never;\n    url: '/api/v{api-version}/upload';\n};\n\nexport type UploadFileResponses = {\n    200: boolean;\n};\n\nexport type UploadFileResponse = UploadFileResponses[keyof UploadFileResponses];\n\nexport type FileResponseData = {\n    body?: never;\n    path: {\n        id: string;\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string;\n    };\n    query?: never;\n    url: '/api/v{api-version}/file/{id}';\n};\n\nexport type FileResponseResponses = {\n    /**\n     * Success\n     */\n    200: Blob | File;\n};\n\nexport type FileResponseResponse = FileResponseResponses[keyof FileResponseResponses];\n\nexport type ComplexTypesData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * Parameter containing object\n         */\n        parameterObject: {\n            first?: {\n                second?: {\n                    third?: string;\n                };\n            };\n        };\n        /**\n         * Parameter containing reference\n         */\n        parameterReference: ModelWithString;\n    };\n    url: '/api/v{api-version}/complex';\n};\n\nexport type ComplexTypesErrors = {\n    /**\n     * 400 `server` error\n     */\n    400: unknown;\n    /**\n     * 500 server error\n     */\n    500: unknown;\n};\n\nexport type ComplexTypesResponses = {\n    /**\n     * Successful response\n     */\n    200: Array<ModelWithString>;\n};\n\nexport type ComplexTypesResponse = ComplexTypesResponses[keyof ComplexTypesResponses];\n\nexport type MultipartResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multipart';\n};\n\nexport type MultipartResponseResponses = {\n    /**\n     * OK\n     */\n    200: {\n        file?: Blob | File;\n        metadata?: {\n            foo?: string;\n            bar?: string;\n        };\n    };\n};\n\nexport type MultipartResponseResponse = MultipartResponseResponses[keyof MultipartResponseResponses];\n\nexport type MultipartRequestData = {\n    body?: {\n        content?: Blob | File;\n        data?: ModelWithString | null;\n    };\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multipart';\n};\n\nexport type ComplexParamsData = {\n    body?: {\n        readonly key: string | null;\n        name: string | null;\n        enabled?: boolean;\n        type: 'Monkey' | 'Horse' | 'Bird';\n        listOfModels?: Array<ModelWithString> | null;\n        listOfStrings?: Array<string> | null;\n        parameters: ModelWithString | ModelWithEnum | ModelWithArray | ModelWithDictionary;\n        readonly user?: {\n            readonly id?: number;\n            readonly name?: string | null;\n        };\n    };\n    path: {\n        id: number;\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string;\n    };\n    query?: never;\n    url: '/api/v{api-version}/complex/{id}';\n};\n\nexport type ComplexParamsResponses = {\n    /**\n     * Success\n     */\n    200: ModelWithString;\n};\n\nexport type ComplexParamsResponse = ComplexParamsResponses[keyof ComplexParamsResponses];\n\nexport type CallWithResultFromHeaderData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/header';\n};\n\nexport type CallWithResultFromHeaderErrors = {\n    /**\n     * 400 server error\n     */\n    400: unknown;\n    /**\n     * 500 server error\n     */\n    500: unknown;\n};\n\nexport type CallWithResultFromHeaderResponses = {\n    /**\n     * Successful response\n     */\n    200: unknown;\n};\n\nexport type TestErrorCodeData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * Status code to return\n         */\n        status: number;\n    };\n    url: '/api/v{api-version}/error';\n};\n\nexport type TestErrorCodeErrors = {\n    /**\n     * Custom message: Internal Server Error\n     */\n    500: unknown;\n    /**\n     * Custom message: Not Implemented\n     */\n    501: unknown;\n    /**\n     * Custom message: Bad Gateway\n     */\n    502: unknown;\n    /**\n     * Custom message: Service Unavailable\n     */\n    503: unknown;\n};\n\nexport type TestErrorCodeResponses = {\n    /**\n     * Custom message: Successful response\n     */\n    200: unknown;\n};\n\nexport type NonAsciiæøåÆøÅöôêÊ字符串Data = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * Dummy input param\n         */\n        nonAsciiParamæøåÆØÅöôêÊ: number;\n    };\n    url: '/api/v{api-version}/non-ascii-æøåÆØÅöôêÊ字符串';\n};\n\nexport type NonAsciiæøåÆøÅöôêÊ字符串Responses = {\n    /**\n     * Successful response\n     */\n    200: Array<NonAsciiStringæøåÆøÅöôêÊ字符串>;\n};\n\nexport type NonAsciiæøåÆøÅöôêÊ字符串Response = NonAsciiæøåÆøÅöôêÊ字符串Responses[keyof NonAsciiæøåÆøÅöôêÊ字符串Responses];\n\nexport type PutWithFormUrlEncodedData = {\n    body: ArrayWithStrings;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/non-ascii-æøåÆØÅöôêÊ字符串';\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@angular/common/default-class/@angular/common.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport { type HttpRequest, httpResource } from '@angular/common/http';\nimport { inject, Injectable } from '@angular/core';\n\nimport { client } from '../client.gen';\nimport type { Options } from '../sdk.gen';\nimport type { ApiVVersionODataControllerCountData, ApiVVersionODataControllerCountResponse, CallToTestOrderOfParamsData, CallWithDefaultOptionalParametersData, CallWithDefaultParametersData, CallWithDescriptionsData, CallWithDuplicateResponsesData, CallWithDuplicateResponsesResponse, CallWithNoContentResponseData, CallWithNoContentResponseResponse, CallWithParametersData, CallWithResponseAndNoContentResponseData, CallWithResponseAndNoContentResponseResponse, CallWithResponseData, CallWithResponseResponse, CallWithResponsesData, CallWithResponsesResponse, CallWithResultFromHeaderData, CallWithWeirdParameterNamesData, CollectionFormatData, ComplexParamsData, ComplexParamsResponse, ComplexTypesData, ComplexTypesResponse, DeleteCallWithoutParametersAndResponseData, DeleteFooData3, DeprecatedCallData, DummyAData, DummyAResponse, DummyBData, DummyBResponse, DuplicateName2Data, DuplicateName3Data, DuplicateName4Data, DuplicateNameData, ExportData, FileResponseData, FileResponseResponse, FooWowData, GetApiVbyApiVersionSimpleOperationData, GetApiVbyApiVersionSimpleOperationResponse, GetCallWithOptionalParamData, GetCallWithoutParametersAndResponseData, HeadCallWithoutParametersAndResponseData, ImportData, ImportResponse, MultipartRequestData, MultipartResponseData, MultipartResponseResponse, NonAsciiæøåÆøÅöôêÊ字符串Data, NonAsciiæøåÆøÅöôêÊ字符串Response, OptionsCallWithoutParametersAndResponseData, PatchApiVbyApiVersionNoTagData, PatchCallWithoutParametersAndResponseData, PostApiVbyApiVersionFormDataData, PostApiVbyApiVersionRequestBodyData, PostCallWithOptionalParamData, PostCallWithOptionalParamResponse, PostCallWithoutParametersAndResponseData, PutCallWithoutParametersAndResponseData, PutWithFormUrlEncodedData, TestErrorCodeData, TypesData, TypesResponse, UploadFileData, UploadFileResponse } from '../types.gen';\n\n@Injectable({ providedIn: 'root' })\nexport class DefaultServiceRequests {\n    public export<ThrowOnError extends boolean = false>(options?: Options<ExportData, ThrowOnError>): HttpRequest<unknown> {\n        return (options?.client ?? client).requestOptions<unknown, ThrowOnError>({\n            responseStyle: 'data',\n            method: 'GET',\n            url: '/api/v{api-version}/no+tag',\n            ...options\n        });\n    }\n    \n    public patchApiVbyApiVersionNoTag<ThrowOnError extends boolean = false>(options?: Options<PatchApiVbyApiVersionNoTagData, ThrowOnError>): HttpRequest<unknown> {\n        return (options?.client ?? client).requestOptions<unknown, ThrowOnError>({\n            responseStyle: 'data',\n            method: 'PATCH',\n            url: '/api/v{api-version}/no+tag',\n            ...options\n        });\n    }\n    \n    public import<ThrowOnError extends boolean = false>(options: Options<ImportData, ThrowOnError>): HttpRequest<ImportResponse> {\n        return (options?.client ?? client).requestOptions<ImportResponse, ThrowOnError>({\n            responseStyle: 'data',\n            method: 'POST',\n            url: '/api/v{api-version}/no+tag',\n            ...options\n        });\n    }\n    \n    public fooWow<ThrowOnError extends boolean = false>(options?: Options<FooWowData, ThrowOnError>): HttpRequest<unknown> {\n        return (options?.client ?? client).requestOptions<unknown, ThrowOnError>({\n            responseStyle: 'data',\n            method: 'PUT',\n            url: '/api/v{api-version}/no+tag',\n            ...options\n        });\n    }\n    \n    public getApiVbyApiVersionSimpleOperation<ThrowOnError extends boolean = false>(options: Options<GetApiVbyApiVersionSimpleOperationData, ThrowOnError>): HttpRequest<GetApiVbyApiVersionSimpleOperationResponse> {\n        return (options?.client ?? client).requestOptions<GetApiVbyApiVersionSimpleOperationResponse, ThrowOnError>({\n            responseStyle: 'data',\n            method: 'GET',\n            url: '/api/v{api-version}/simple:operation',\n            ...options\n        });\n    }\n}\n\nexport class ODataControllerService {\n    public count<ThrowOnError extends boolean = false>(options?: Options<ApiVVersionODataControllerCountData, ThrowOnError>): HttpRequest<ApiVVersionODataControllerCountResponse> {\n        return (options?.client ?? client).requestOptions<ApiVVersionODataControllerCountResponse, ThrowOnError>({\n            responseStyle: 'data',\n            method: 'GET',\n            url: '/api/v{api-version}/simple/$count',\n            ...options\n        });\n    }\n}\n\nexport class VVersionService {\n    private _oDataControllerService?: ODataControllerService;\n    get oDataControllerService(): ODataControllerService {\n        return this._oDataControllerService ??= new ODataControllerService();\n    }\n}\n\nexport class ApiService {\n    private _vVersionService?: VVersionService;\n    get vVersionService(): VVersionService {\n        return this._vVersionService ??= new VVersionService();\n    }\n}\n\n@Injectable({ providedIn: 'root' })\nexport class SimpleServiceRequests {\n    public deleteCallWithoutParametersAndResponse<ThrowOnError extends boolean = false>(options?: Options<DeleteCallWithoutParametersAndResponseData, ThrowOnError>): HttpRequest<unknown> {\n        return (options?.client ?? client).requestOptions<unknown, ThrowOnError>({\n            responseStyle: 'data',\n            method: 'DELETE',\n            url: '/api/v{api-version}/simple',\n            ...options\n        });\n    }\n    \n    public getCallWithoutParametersAndResponse<ThrowOnError extends boolean = false>(options?: Options<GetCallWithoutParametersAndResponseData, ThrowOnError>): HttpRequest<unknown> {\n        return (options?.client ?? client).requestOptions<unknown, ThrowOnError>({\n            responseStyle: 'data',\n            method: 'GET',\n            url: '/api/v{api-version}/simple',\n            ...options\n        });\n    }\n    \n    public headCallWithoutParametersAndResponse<ThrowOnError extends boolean = false>(options?: Options<HeadCallWithoutParametersAndResponseData, ThrowOnError>): HttpRequest<unknown> {\n        return (options?.client ?? client).requestOptions<unknown, ThrowOnError>({\n            responseStyle: 'data',\n            method: 'HEAD',\n            url: '/api/v{api-version}/simple',\n            ...options\n        });\n    }\n    \n    public optionsCallWithoutParametersAndResponse<ThrowOnError extends boolean = false>(options?: Options<OptionsCallWithoutParametersAndResponseData, ThrowOnError>): HttpRequest<unknown> {\n        return (options?.client ?? client).requestOptions<unknown, ThrowOnError>({\n            responseStyle: 'data',\n            method: 'OPTIONS',\n            url: '/api/v{api-version}/simple',\n            ...options\n        });\n    }\n    \n    public patchCallWithoutParametersAndResponse<ThrowOnError extends boolean = false>(options?: Options<PatchCallWithoutParametersAndResponseData, ThrowOnError>): HttpRequest<unknown> {\n        return (options?.client ?? client).requestOptions<unknown, ThrowOnError>({\n            responseStyle: 'data',\n            method: 'PATCH',\n            url: '/api/v{api-version}/simple',\n            ...options\n        });\n    }\n    \n    public postCallWithoutParametersAndResponse<ThrowOnError extends boolean = false>(options?: Options<PostCallWithoutParametersAndResponseData, ThrowOnError>): HttpRequest<unknown> {\n        return (options?.client ?? client).requestOptions<unknown, ThrowOnError>({\n            responseStyle: 'data',\n            method: 'POST',\n            url: '/api/v{api-version}/simple',\n            ...options\n        });\n    }\n    \n    public putCallWithoutParametersAndResponse<ThrowOnError extends boolean = false>(options?: Options<PutCallWithoutParametersAndResponseData, ThrowOnError>): HttpRequest<unknown> {\n        return (options?.client ?? client).requestOptions<unknown, ThrowOnError>({\n            responseStyle: 'data',\n            method: 'PUT',\n            url: '/api/v{api-version}/simple',\n            ...options\n        });\n    }\n    \n    private _apiService?: ApiService;\n    get apiService(): ApiService {\n        return this._apiService ??= new ApiService();\n    }\n}\n\n@Injectable({ providedIn: 'root' })\nexport class ParametersServiceRequests {\n    public deleteFoo<ThrowOnError extends boolean = false>(options: Options<DeleteFooData3, ThrowOnError>): HttpRequest<unknown> {\n        return (options?.client ?? client).requestOptions<unknown, ThrowOnError>({\n            responseStyle: 'data',\n            method: 'DELETE',\n            url: '/api/v{api-version}/foo/{foo_param}/bar/{BarParam}',\n            ...options\n        });\n    }\n    \n    public callWithParameters<ThrowOnError extends boolean = false>(options: Options<CallWithParametersData, ThrowOnError>): HttpRequest<unknown> {\n        return (options?.client ?? client).requestOptions<unknown, ThrowOnError>({\n            responseStyle: 'data',\n            method: 'POST',\n            url: '/api/v{api-version}/parameters/{parameterPath}',\n            ...options\n        });\n    }\n    \n    public callWithWeirdParameterNames<ThrowOnError extends boolean = false>(options: Options<CallWithWeirdParameterNamesData, ThrowOnError>): HttpRequest<unknown> {\n        return (options?.client ?? client).requestOptions<unknown, ThrowOnError>({\n            responseStyle: 'data',\n            method: 'POST',\n            url: '/api/v{api-version}/parameters/{parameter.path.1}/{parameter-path-2}/{PARAMETER-PATH-3}',\n            ...options\n        });\n    }\n    \n    public getCallWithOptionalParam<ThrowOnError extends boolean = false>(options: Options<GetCallWithOptionalParamData, ThrowOnError>): HttpRequest<unknown> {\n        return (options?.client ?? client).requestOptions<unknown, ThrowOnError>({\n            responseStyle: 'data',\n            method: 'GET',\n            url: '/api/v{api-version}/parameters',\n            ...options\n        });\n    }\n    \n    public postCallWithOptionalParam<ThrowOnError extends boolean = false>(options: Options<PostCallWithOptionalParamData, ThrowOnError>): HttpRequest<PostCallWithOptionalParamResponse> {\n        return (options?.client ?? client).requestOptions<PostCallWithOptionalParamResponse, ThrowOnError>({\n            responseStyle: 'data',\n            method: 'POST',\n            url: '/api/v{api-version}/parameters',\n            ...options\n        });\n    }\n}\n\n@Injectable({ providedIn: 'root' })\nexport class DescriptionsServiceRequests {\n    public callWithDescriptions<ThrowOnError extends boolean = false>(options?: Options<CallWithDescriptionsData, ThrowOnError>): HttpRequest<unknown> {\n        return (options?.client ?? client).requestOptions<unknown, ThrowOnError>({\n            responseStyle: 'data',\n            method: 'POST',\n            url: '/api/v{api-version}/descriptions',\n            ...options\n        });\n    }\n}\n\n@Injectable({ providedIn: 'root' })\nexport class DeprecatedServiceRequests {\n    /**\n     * @deprecated\n     */\n    public deprecatedCall<ThrowOnError extends boolean = false>(options: Options<DeprecatedCallData, ThrowOnError>): HttpRequest<unknown> {\n        return (options?.client ?? client).requestOptions<unknown, ThrowOnError>({\n            responseStyle: 'data',\n            method: 'POST',\n            url: '/api/v{api-version}/parameters/deprecated',\n            ...options\n        });\n    }\n}\n\n@Injectable({ providedIn: 'root' })\nexport class RequestBodyServiceRequests {\n    public postApiVbyApiVersionRequestBody<ThrowOnError extends boolean = false>(options?: Options<PostApiVbyApiVersionRequestBodyData, ThrowOnError>): HttpRequest<unknown> {\n        return (options?.client ?? client).requestOptions<unknown, ThrowOnError>({\n            responseStyle: 'data',\n            method: 'POST',\n            url: '/api/v{api-version}/requestBody',\n            ...options\n        });\n    }\n}\n\n@Injectable({ providedIn: 'root' })\nexport class FormDataServiceRequests {\n    public postApiVbyApiVersionFormData<ThrowOnError extends boolean = false>(options?: Options<PostApiVbyApiVersionFormDataData, ThrowOnError>): HttpRequest<unknown> {\n        return (options?.client ?? client).requestOptions<unknown, ThrowOnError>({\n            responseStyle: 'data',\n            method: 'POST',\n            url: '/api/v{api-version}/formData',\n            ...options\n        });\n    }\n}\n\n@Injectable({ providedIn: 'root' })\nexport class DefaultsServiceRequests {\n    public callWithDefaultParameters<ThrowOnError extends boolean = false>(options?: Options<CallWithDefaultParametersData, ThrowOnError>): HttpRequest<unknown> {\n        return (options?.client ?? client).requestOptions<unknown, ThrowOnError>({\n            responseStyle: 'data',\n            method: 'GET',\n            url: '/api/v{api-version}/defaults',\n            ...options\n        });\n    }\n    \n    public callWithDefaultOptionalParameters<ThrowOnError extends boolean = false>(options?: Options<CallWithDefaultOptionalParametersData, ThrowOnError>): HttpRequest<unknown> {\n        return (options?.client ?? client).requestOptions<unknown, ThrowOnError>({\n            responseStyle: 'data',\n            method: 'POST',\n            url: '/api/v{api-version}/defaults',\n            ...options\n        });\n    }\n    \n    public callToTestOrderOfParams<ThrowOnError extends boolean = false>(options: Options<CallToTestOrderOfParamsData, ThrowOnError>): HttpRequest<unknown> {\n        return (options?.client ?? client).requestOptions<unknown, ThrowOnError>({\n            responseStyle: 'data',\n            method: 'PUT',\n            url: '/api/v{api-version}/defaults',\n            ...options\n        });\n    }\n}\n\n@Injectable({ providedIn: 'root' })\nexport class DuplicateServiceRequests {\n    public duplicateName<ThrowOnError extends boolean = false>(options?: Options<DuplicateNameData, ThrowOnError>): HttpRequest<unknown> {\n        return (options?.client ?? client).requestOptions<unknown, ThrowOnError>({\n            responseStyle: 'data',\n            method: 'DELETE',\n            url: '/api/v{api-version}/duplicate',\n            ...options\n        });\n    }\n    \n    public duplicateName2<ThrowOnError extends boolean = false>(options?: Options<DuplicateName2Data, ThrowOnError>): HttpRequest<unknown> {\n        return (options?.client ?? client).requestOptions<unknown, ThrowOnError>({\n            responseStyle: 'data',\n            method: 'GET',\n            url: '/api/v{api-version}/duplicate',\n            ...options\n        });\n    }\n    \n    public duplicateName3<ThrowOnError extends boolean = false>(options?: Options<DuplicateName3Data, ThrowOnError>): HttpRequest<unknown> {\n        return (options?.client ?? client).requestOptions<unknown, ThrowOnError>({\n            responseStyle: 'data',\n            method: 'POST',\n            url: '/api/v{api-version}/duplicate',\n            ...options\n        });\n    }\n    \n    public duplicateName4<ThrowOnError extends boolean = false>(options?: Options<DuplicateName4Data, ThrowOnError>): HttpRequest<unknown> {\n        return (options?.client ?? client).requestOptions<unknown, ThrowOnError>({\n            responseStyle: 'data',\n            method: 'PUT',\n            url: '/api/v{api-version}/duplicate',\n            ...options\n        });\n    }\n}\n\n@Injectable({ providedIn: 'root' })\nexport class NoContentServiceRequests {\n    public callWithNoContentResponse<ThrowOnError extends boolean = false>(options?: Options<CallWithNoContentResponseData, ThrowOnError>): HttpRequest<CallWithNoContentResponseResponse> {\n        return (options?.client ?? client).requestOptions<CallWithNoContentResponseResponse, ThrowOnError>({\n            responseStyle: 'data',\n            method: 'GET',\n            url: '/api/v{api-version}/no-content',\n            ...options\n        });\n    }\n    \n    public callWithResponseAndNoContentResponse<ThrowOnError extends boolean = false>(options?: Options<CallWithResponseAndNoContentResponseData, ThrowOnError>): HttpRequest<CallWithResponseAndNoContentResponseResponse> {\n        return (options?.client ?? client).requestOptions<CallWithResponseAndNoContentResponseResponse, ThrowOnError>({\n            responseStyle: 'data',\n            method: 'GET',\n            url: '/api/v{api-version}/multiple-tags/response-and-no-content',\n            ...options\n        });\n    }\n}\n\n@Injectable({ providedIn: 'root' })\nexport class ResponseServiceRequests {\n    public callWithResponseAndNoContentResponse<ThrowOnError extends boolean = false>(options?: Options<CallWithResponseAndNoContentResponseData, ThrowOnError>): HttpRequest<CallWithResponseAndNoContentResponseResponse> {\n        return (options?.client ?? client).requestOptions<CallWithResponseAndNoContentResponseResponse, ThrowOnError>({\n            responseStyle: 'data',\n            method: 'GET',\n            url: '/api/v{api-version}/multiple-tags/response-and-no-content',\n            ...options\n        });\n    }\n    \n    public callWithResponse<ThrowOnError extends boolean = false>(options?: Options<CallWithResponseData, ThrowOnError>): HttpRequest<CallWithResponseResponse> {\n        return (options?.client ?? client).requestOptions<CallWithResponseResponse, ThrowOnError>({\n            responseStyle: 'data',\n            method: 'GET',\n            url: '/api/v{api-version}/response',\n            ...options\n        });\n    }\n    \n    public callWithDuplicateResponses<ThrowOnError extends boolean = false>(options?: Options<CallWithDuplicateResponsesData, ThrowOnError>): HttpRequest<CallWithDuplicateResponsesResponse> {\n        return (options?.client ?? client).requestOptions<CallWithDuplicateResponsesResponse, ThrowOnError>({\n            responseStyle: 'data',\n            method: 'POST',\n            url: '/api/v{api-version}/response',\n            ...options\n        });\n    }\n    \n    public callWithResponses<ThrowOnError extends boolean = false>(options?: Options<CallWithResponsesData, ThrowOnError>): HttpRequest<CallWithResponsesResponse> {\n        return (options?.client ?? client).requestOptions<CallWithResponsesResponse, ThrowOnError>({\n            responseStyle: 'data',\n            method: 'PUT',\n            url: '/api/v{api-version}/response',\n            ...options\n        });\n    }\n}\n\n@Injectable({ providedIn: 'root' })\nexport class MultipleTags1ServiceRequests {\n    public dummyA<ThrowOnError extends boolean = false>(options?: Options<DummyAData, ThrowOnError>): HttpRequest<DummyAResponse> {\n        return (options?.client ?? client).requestOptions<DummyAResponse, ThrowOnError>({\n            responseStyle: 'data',\n            method: 'GET',\n            url: '/api/v{api-version}/multiple-tags/a',\n            ...options\n        });\n    }\n    \n    public dummyB<ThrowOnError extends boolean = false>(options?: Options<DummyBData, ThrowOnError>): HttpRequest<DummyBResponse> {\n        return (options?.client ?? client).requestOptions<DummyBResponse, ThrowOnError>({\n            responseStyle: 'data',\n            method: 'GET',\n            url: '/api/v{api-version}/multiple-tags/b',\n            ...options\n        });\n    }\n}\n\n@Injectable({ providedIn: 'root' })\nexport class MultipleTags2ServiceRequests {\n    public dummyA<ThrowOnError extends boolean = false>(options?: Options<DummyAData, ThrowOnError>): HttpRequest<DummyAResponse> {\n        return (options?.client ?? client).requestOptions<DummyAResponse, ThrowOnError>({\n            responseStyle: 'data',\n            method: 'GET',\n            url: '/api/v{api-version}/multiple-tags/a',\n            ...options\n        });\n    }\n    \n    public dummyB<ThrowOnError extends boolean = false>(options?: Options<DummyBData, ThrowOnError>): HttpRequest<DummyBResponse> {\n        return (options?.client ?? client).requestOptions<DummyBResponse, ThrowOnError>({\n            responseStyle: 'data',\n            method: 'GET',\n            url: '/api/v{api-version}/multiple-tags/b',\n            ...options\n        });\n    }\n}\n\n@Injectable({ providedIn: 'root' })\nexport class MultipleTags3ServiceRequests {\n    public dummyB<ThrowOnError extends boolean = false>(options?: Options<DummyBData, ThrowOnError>): HttpRequest<DummyBResponse> {\n        return (options?.client ?? client).requestOptions<DummyBResponse, ThrowOnError>({\n            responseStyle: 'data',\n            method: 'GET',\n            url: '/api/v{api-version}/multiple-tags/b',\n            ...options\n        });\n    }\n}\n\n@Injectable({ providedIn: 'root' })\nexport class CollectionFormatServiceRequests {\n    public collectionFormat<ThrowOnError extends boolean = false>(options: Options<CollectionFormatData, ThrowOnError>): HttpRequest<unknown> {\n        return (options?.client ?? client).requestOptions<unknown, ThrowOnError>({\n            responseStyle: 'data',\n            method: 'GET',\n            url: '/api/v{api-version}/collectionFormat',\n            ...options\n        });\n    }\n}\n\n@Injectable({ providedIn: 'root' })\nexport class TypesServiceRequests {\n    public types<ThrowOnError extends boolean = false>(options: Options<TypesData, ThrowOnError>): HttpRequest<TypesResponse> {\n        return (options?.client ?? client).requestOptions<TypesResponse, ThrowOnError>({\n            responseStyle: 'data',\n            method: 'GET',\n            url: '/api/v{api-version}/types',\n            ...options\n        });\n    }\n}\n\n@Injectable({ providedIn: 'root' })\nexport class UploadServiceRequests {\n    public uploadFile<ThrowOnError extends boolean = false>(options: Options<UploadFileData, ThrowOnError>): HttpRequest<UploadFileResponse> {\n        return (options?.client ?? client).requestOptions<UploadFileResponse, ThrowOnError>({\n            responseStyle: 'data',\n            method: 'POST',\n            url: '/api/v{api-version}/upload',\n            ...options\n        });\n    }\n}\n\n@Injectable({ providedIn: 'root' })\nexport class FileResponseServiceRequests {\n    public fileResponse<ThrowOnError extends boolean = false>(options: Options<FileResponseData, ThrowOnError>): HttpRequest<FileResponseResponse> {\n        return (options?.client ?? client).requestOptions<FileResponseResponse, ThrowOnError>({\n            responseStyle: 'data',\n            method: 'GET',\n            url: '/api/v{api-version}/file/{id}',\n            ...options\n        });\n    }\n}\n\n@Injectable({ providedIn: 'root' })\nexport class ComplexServiceRequests {\n    public complexTypes<ThrowOnError extends boolean = false>(options: Options<ComplexTypesData, ThrowOnError>): HttpRequest<ComplexTypesResponse> {\n        return (options?.client ?? client).requestOptions<ComplexTypesResponse, ThrowOnError>({\n            responseStyle: 'data',\n            method: 'GET',\n            url: '/api/v{api-version}/complex',\n            ...options\n        });\n    }\n    \n    public complexParams<ThrowOnError extends boolean = false>(options: Options<ComplexParamsData, ThrowOnError>): HttpRequest<ComplexParamsResponse> {\n        return (options?.client ?? client).requestOptions<ComplexParamsResponse, ThrowOnError>({\n            responseStyle: 'data',\n            method: 'PUT',\n            url: '/api/v{api-version}/complex/{id}',\n            ...options\n        });\n    }\n}\n\n@Injectable({ providedIn: 'root' })\nexport class MultipartServiceRequests {\n    public multipartResponse<ThrowOnError extends boolean = false>(options?: Options<MultipartResponseData, ThrowOnError>): HttpRequest<MultipartResponseResponse> {\n        return (options?.client ?? client).requestOptions<MultipartResponseResponse, ThrowOnError>({\n            responseStyle: 'data',\n            method: 'GET',\n            url: '/api/v{api-version}/multipart',\n            ...options\n        });\n    }\n    \n    public multipartRequest<ThrowOnError extends boolean = false>(options?: Options<MultipartRequestData, ThrowOnError>): HttpRequest<unknown> {\n        return (options?.client ?? client).requestOptions<unknown, ThrowOnError>({\n            responseStyle: 'data',\n            method: 'POST',\n            url: '/api/v{api-version}/multipart',\n            ...options\n        });\n    }\n}\n\n@Injectable({ providedIn: 'root' })\nexport class HeaderServiceRequests {\n    public callWithResultFromHeader<ThrowOnError extends boolean = false>(options?: Options<CallWithResultFromHeaderData, ThrowOnError>): HttpRequest<unknown> {\n        return (options?.client ?? client).requestOptions<unknown, ThrowOnError>({\n            responseStyle: 'data',\n            method: 'POST',\n            url: '/api/v{api-version}/header',\n            ...options\n        });\n    }\n}\n\n@Injectable({ providedIn: 'root' })\nexport class ErrorServiceRequests {\n    public testErrorCode<ThrowOnError extends boolean = false>(options: Options<TestErrorCodeData, ThrowOnError>): HttpRequest<unknown> {\n        return (options?.client ?? client).requestOptions<unknown, ThrowOnError>({\n            responseStyle: 'data',\n            method: 'POST',\n            url: '/api/v{api-version}/error',\n            ...options\n        });\n    }\n}\n\n@Injectable({ providedIn: 'root' })\nexport class NonAsciiÆøåÆøÅöôêÊServiceRequests {\n    public nonAsciiæøåÆøÅöôêÊ字符串<ThrowOnError extends boolean = false>(options: Options<NonAsciiæøåÆøÅöôêÊ字符串Data, ThrowOnError>): HttpRequest<NonAsciiæøåÆøÅöôêÊ字符串Response> {\n        return (options?.client ?? client).requestOptions<NonAsciiæøåÆøÅöôêÊ字符串Response, ThrowOnError>({\n            responseStyle: 'data',\n            method: 'POST',\n            url: '/api/v{api-version}/non-ascii-æøåÆØÅöôêÊ字符串',\n            ...options\n        });\n    }\n    \n    /**\n     * Login User\n     */\n    public putWithFormUrlEncoded<ThrowOnError extends boolean = false>(options: Options<PutWithFormUrlEncodedData, ThrowOnError>): HttpRequest<unknown> {\n        return (options?.client ?? client).requestOptions<unknown, ThrowOnError>({\n            responseStyle: 'data',\n            method: 'PUT',\n            url: '/api/v{api-version}/non-ascii-æøåÆØÅöôêÊ字符串',\n            ...options\n        });\n    }\n}\n\n@Injectable({ providedIn: 'root' })\nexport class DefaultServiceResources {\n    public export<ThrowOnError extends boolean = false>(options?: () => Options<ExportData, ThrowOnError> | undefined) {\n        return httpResource<unknown>(() => {\n            const opts = options ? options() : undefined;\n            return opts ? inject(DefaultServiceRequests).export(opts) : undefined;\n        });\n    }\n    \n    public patchApiVbyApiVersionNoTag<ThrowOnError extends boolean = false>(options?: () => Options<PatchApiVbyApiVersionNoTagData, ThrowOnError> | undefined) {\n        return httpResource<unknown>(() => {\n            const opts = options ? options() : undefined;\n            return opts ? inject(DefaultServiceRequests).patchApiVbyApiVersionNoTag(opts) : undefined;\n        });\n    }\n    \n    public import<ThrowOnError extends boolean = false>(options: () => Options<ImportData, ThrowOnError> | undefined) {\n        return httpResource<ImportResponse>(() => {\n            const opts = options ? options() : undefined;\n            return opts ? inject(DefaultServiceRequests).import(opts) : undefined;\n        });\n    }\n    \n    public fooWow<ThrowOnError extends boolean = false>(options?: () => Options<FooWowData, ThrowOnError> | undefined) {\n        return httpResource<unknown>(() => {\n            const opts = options ? options() : undefined;\n            return opts ? inject(DefaultServiceRequests).fooWow(opts) : undefined;\n        });\n    }\n    \n    public getApiVbyApiVersionSimpleOperation<ThrowOnError extends boolean = false>(options: () => Options<GetApiVbyApiVersionSimpleOperationData, ThrowOnError> | undefined) {\n        return httpResource<GetApiVbyApiVersionSimpleOperationResponse>(() => {\n            const opts = options ? options() : undefined;\n            return opts ? inject(DefaultServiceRequests).getApiVbyApiVersionSimpleOperation(opts) : undefined;\n        });\n    }\n}\n\nexport class ODataControllerService2 {\n    public count<ThrowOnError extends boolean = false>(options?: () => Options<ApiVVersionODataControllerCountData, ThrowOnError> | undefined) {\n        return httpResource<ApiVVersionODataControllerCountResponse>(() => {\n            const opts = options ? options() : undefined;\n            return opts ? inject(SimpleServiceRequests).apiService.vVersionService.oDataControllerService.count(opts) : undefined;\n        });\n    }\n}\n\nexport class VVersionService2 {\n    private _oDataControllerService?: ODataControllerService2;\n    get oDataControllerService(): ODataControllerService2 {\n        return this._oDataControllerService ??= new ODataControllerService2();\n    }\n}\n\nexport class ApiService2 {\n    private _vVersionService?: VVersionService2;\n    get vVersionService(): VVersionService2 {\n        return this._vVersionService ??= new VVersionService2();\n    }\n}\n\n@Injectable({ providedIn: 'root' })\nexport class SimpleServiceResources {\n    public deleteCallWithoutParametersAndResponse<ThrowOnError extends boolean = false>(options?: () => Options<DeleteCallWithoutParametersAndResponseData, ThrowOnError> | undefined) {\n        return httpResource<unknown>(() => {\n            const opts = options ? options() : undefined;\n            return opts ? inject(SimpleServiceRequests).deleteCallWithoutParametersAndResponse(opts) : undefined;\n        });\n    }\n    \n    public getCallWithoutParametersAndResponse<ThrowOnError extends boolean = false>(options?: () => Options<GetCallWithoutParametersAndResponseData, ThrowOnError> | undefined) {\n        return httpResource<unknown>(() => {\n            const opts = options ? options() : undefined;\n            return opts ? inject(SimpleServiceRequests).getCallWithoutParametersAndResponse(opts) : undefined;\n        });\n    }\n    \n    public headCallWithoutParametersAndResponse<ThrowOnError extends boolean = false>(options?: () => Options<HeadCallWithoutParametersAndResponseData, ThrowOnError> | undefined) {\n        return httpResource<unknown>(() => {\n            const opts = options ? options() : undefined;\n            return opts ? inject(SimpleServiceRequests).headCallWithoutParametersAndResponse(opts) : undefined;\n        });\n    }\n    \n    public optionsCallWithoutParametersAndResponse<ThrowOnError extends boolean = false>(options?: () => Options<OptionsCallWithoutParametersAndResponseData, ThrowOnError> | undefined) {\n        return httpResource<unknown>(() => {\n            const opts = options ? options() : undefined;\n            return opts ? inject(SimpleServiceRequests).optionsCallWithoutParametersAndResponse(opts) : undefined;\n        });\n    }\n    \n    public patchCallWithoutParametersAndResponse<ThrowOnError extends boolean = false>(options?: () => Options<PatchCallWithoutParametersAndResponseData, ThrowOnError> | undefined) {\n        return httpResource<unknown>(() => {\n            const opts = options ? options() : undefined;\n            return opts ? inject(SimpleServiceRequests).patchCallWithoutParametersAndResponse(opts) : undefined;\n        });\n    }\n    \n    public postCallWithoutParametersAndResponse<ThrowOnError extends boolean = false>(options?: () => Options<PostCallWithoutParametersAndResponseData, ThrowOnError> | undefined) {\n        return httpResource<unknown>(() => {\n            const opts = options ? options() : undefined;\n            return opts ? inject(SimpleServiceRequests).postCallWithoutParametersAndResponse(opts) : undefined;\n        });\n    }\n    \n    public putCallWithoutParametersAndResponse<ThrowOnError extends boolean = false>(options?: () => Options<PutCallWithoutParametersAndResponseData, ThrowOnError> | undefined) {\n        return httpResource<unknown>(() => {\n            const opts = options ? options() : undefined;\n            return opts ? inject(SimpleServiceRequests).putCallWithoutParametersAndResponse(opts) : undefined;\n        });\n    }\n    \n    private _apiService?: ApiService2;\n    get apiService(): ApiService2 {\n        return this._apiService ??= new ApiService2();\n    }\n}\n\n@Injectable({ providedIn: 'root' })\nexport class ParametersServiceResources {\n    public deleteFoo<ThrowOnError extends boolean = false>(options: () => Options<DeleteFooData3, ThrowOnError> | undefined) {\n        return httpResource<unknown>(() => {\n            const opts = options ? options() : undefined;\n            return opts ? inject(ParametersServiceRequests).deleteFoo(opts) : undefined;\n        });\n    }\n    \n    public callWithParameters<ThrowOnError extends boolean = false>(options: () => Options<CallWithParametersData, ThrowOnError> | undefined) {\n        return httpResource<unknown>(() => {\n            const opts = options ? options() : undefined;\n            return opts ? inject(ParametersServiceRequests).callWithParameters(opts) : undefined;\n        });\n    }\n    \n    public callWithWeirdParameterNames<ThrowOnError extends boolean = false>(options: () => Options<CallWithWeirdParameterNamesData, ThrowOnError> | undefined) {\n        return httpResource<unknown>(() => {\n            const opts = options ? options() : undefined;\n            return opts ? inject(ParametersServiceRequests).callWithWeirdParameterNames(opts) : undefined;\n        });\n    }\n    \n    public getCallWithOptionalParam<ThrowOnError extends boolean = false>(options: () => Options<GetCallWithOptionalParamData, ThrowOnError> | undefined) {\n        return httpResource<unknown>(() => {\n            const opts = options ? options() : undefined;\n            return opts ? inject(ParametersServiceRequests).getCallWithOptionalParam(opts) : undefined;\n        });\n    }\n    \n    public postCallWithOptionalParam<ThrowOnError extends boolean = false>(options: () => Options<PostCallWithOptionalParamData, ThrowOnError> | undefined) {\n        return httpResource<PostCallWithOptionalParamResponse>(() => {\n            const opts = options ? options() : undefined;\n            return opts ? inject(ParametersServiceRequests).postCallWithOptionalParam(opts) : undefined;\n        });\n    }\n}\n\n@Injectable({ providedIn: 'root' })\nexport class DescriptionsServiceResources {\n    public callWithDescriptions<ThrowOnError extends boolean = false>(options?: () => Options<CallWithDescriptionsData, ThrowOnError> | undefined) {\n        return httpResource<unknown>(() => {\n            const opts = options ? options() : undefined;\n            return opts ? inject(DescriptionsServiceRequests).callWithDescriptions(opts) : undefined;\n        });\n    }\n}\n\n@Injectable({ providedIn: 'root' })\nexport class DeprecatedServiceResources {\n    /**\n     * @deprecated\n     */\n    public deprecatedCall<ThrowOnError extends boolean = false>(options: () => Options<DeprecatedCallData, ThrowOnError> | undefined) {\n        return httpResource<unknown>(() => {\n            const opts = options ? options() : undefined;\n            return opts ? inject(DeprecatedServiceRequests).deprecatedCall(opts) : undefined;\n        });\n    }\n}\n\n@Injectable({ providedIn: 'root' })\nexport class RequestBodyServiceResources {\n    public postApiVbyApiVersionRequestBody<ThrowOnError extends boolean = false>(options?: () => Options<PostApiVbyApiVersionRequestBodyData, ThrowOnError> | undefined) {\n        return httpResource<unknown>(() => {\n            const opts = options ? options() : undefined;\n            return opts ? inject(RequestBodyServiceRequests).postApiVbyApiVersionRequestBody(opts) : undefined;\n        });\n    }\n}\n\n@Injectable({ providedIn: 'root' })\nexport class FormDataServiceResources {\n    public postApiVbyApiVersionFormData<ThrowOnError extends boolean = false>(options?: () => Options<PostApiVbyApiVersionFormDataData, ThrowOnError> | undefined) {\n        return httpResource<unknown>(() => {\n            const opts = options ? options() : undefined;\n            return opts ? inject(FormDataServiceRequests).postApiVbyApiVersionFormData(opts) : undefined;\n        });\n    }\n}\n\n@Injectable({ providedIn: 'root' })\nexport class DefaultsServiceResources {\n    public callWithDefaultParameters<ThrowOnError extends boolean = false>(options?: () => Options<CallWithDefaultParametersData, ThrowOnError> | undefined) {\n        return httpResource<unknown>(() => {\n            const opts = options ? options() : undefined;\n            return opts ? inject(DefaultsServiceRequests).callWithDefaultParameters(opts) : undefined;\n        });\n    }\n    \n    public callWithDefaultOptionalParameters<ThrowOnError extends boolean = false>(options?: () => Options<CallWithDefaultOptionalParametersData, ThrowOnError> | undefined) {\n        return httpResource<unknown>(() => {\n            const opts = options ? options() : undefined;\n            return opts ? inject(DefaultsServiceRequests).callWithDefaultOptionalParameters(opts) : undefined;\n        });\n    }\n    \n    public callToTestOrderOfParams<ThrowOnError extends boolean = false>(options: () => Options<CallToTestOrderOfParamsData, ThrowOnError> | undefined) {\n        return httpResource<unknown>(() => {\n            const opts = options ? options() : undefined;\n            return opts ? inject(DefaultsServiceRequests).callToTestOrderOfParams(opts) : undefined;\n        });\n    }\n}\n\n@Injectable({ providedIn: 'root' })\nexport class DuplicateServiceResources {\n    public duplicateName<ThrowOnError extends boolean = false>(options?: () => Options<DuplicateNameData, ThrowOnError> | undefined) {\n        return httpResource<unknown>(() => {\n            const opts = options ? options() : undefined;\n            return opts ? inject(DuplicateServiceRequests).duplicateName(opts) : undefined;\n        });\n    }\n    \n    public duplicateName2<ThrowOnError extends boolean = false>(options?: () => Options<DuplicateName2Data, ThrowOnError> | undefined) {\n        return httpResource<unknown>(() => {\n            const opts = options ? options() : undefined;\n            return opts ? inject(DuplicateServiceRequests).duplicateName2(opts) : undefined;\n        });\n    }\n    \n    public duplicateName3<ThrowOnError extends boolean = false>(options?: () => Options<DuplicateName3Data, ThrowOnError> | undefined) {\n        return httpResource<unknown>(() => {\n            const opts = options ? options() : undefined;\n            return opts ? inject(DuplicateServiceRequests).duplicateName3(opts) : undefined;\n        });\n    }\n    \n    public duplicateName4<ThrowOnError extends boolean = false>(options?: () => Options<DuplicateName4Data, ThrowOnError> | undefined) {\n        return httpResource<unknown>(() => {\n            const opts = options ? options() : undefined;\n            return opts ? inject(DuplicateServiceRequests).duplicateName4(opts) : undefined;\n        });\n    }\n}\n\n@Injectable({ providedIn: 'root' })\nexport class NoContentServiceResources {\n    public callWithNoContentResponse<ThrowOnError extends boolean = false>(options?: () => Options<CallWithNoContentResponseData, ThrowOnError> | undefined) {\n        return httpResource<CallWithNoContentResponseResponse>(() => {\n            const opts = options ? options() : undefined;\n            return opts ? inject(NoContentServiceRequests).callWithNoContentResponse(opts) : undefined;\n        });\n    }\n    \n    public callWithResponseAndNoContentResponse<ThrowOnError extends boolean = false>(options?: () => Options<CallWithResponseAndNoContentResponseData, ThrowOnError> | undefined) {\n        return httpResource<CallWithResponseAndNoContentResponseResponse>(() => {\n            const opts = options ? options() : undefined;\n            return opts ? inject(NoContentServiceRequests).callWithResponseAndNoContentResponse(opts) : undefined;\n        });\n    }\n}\n\n@Injectable({ providedIn: 'root' })\nexport class ResponseServiceResources {\n    public callWithResponseAndNoContentResponse<ThrowOnError extends boolean = false>(options?: () => Options<CallWithResponseAndNoContentResponseData, ThrowOnError> | undefined) {\n        return httpResource<CallWithResponseAndNoContentResponseResponse>(() => {\n            const opts = options ? options() : undefined;\n            return opts ? inject(NoContentServiceRequests).callWithResponseAndNoContentResponse(opts) : undefined;\n        });\n    }\n    \n    public callWithResponse<ThrowOnError extends boolean = false>(options?: () => Options<CallWithResponseData, ThrowOnError> | undefined) {\n        return httpResource<CallWithResponseResponse>(() => {\n            const opts = options ? options() : undefined;\n            return opts ? inject(ResponseServiceRequests).callWithResponse(opts) : undefined;\n        });\n    }\n    \n    public callWithDuplicateResponses<ThrowOnError extends boolean = false>(options?: () => Options<CallWithDuplicateResponsesData, ThrowOnError> | undefined) {\n        return httpResource<CallWithDuplicateResponsesResponse>(() => {\n            const opts = options ? options() : undefined;\n            return opts ? inject(ResponseServiceRequests).callWithDuplicateResponses(opts) : undefined;\n        });\n    }\n    \n    public callWithResponses<ThrowOnError extends boolean = false>(options?: () => Options<CallWithResponsesData, ThrowOnError> | undefined) {\n        return httpResource<CallWithResponsesResponse>(() => {\n            const opts = options ? options() : undefined;\n            return opts ? inject(ResponseServiceRequests).callWithResponses(opts) : undefined;\n        });\n    }\n}\n\n@Injectable({ providedIn: 'root' })\nexport class MultipleTags1ServiceResources {\n    public dummyA<ThrowOnError extends boolean = false>(options?: () => Options<DummyAData, ThrowOnError> | undefined) {\n        return httpResource<DummyAResponse>(() => {\n            const opts = options ? options() : undefined;\n            return opts ? inject(MultipleTags1ServiceRequests).dummyA(opts) : undefined;\n        });\n    }\n    \n    public dummyB<ThrowOnError extends boolean = false>(options?: () => Options<DummyBData, ThrowOnError> | undefined) {\n        return httpResource<DummyBResponse>(() => {\n            const opts = options ? options() : undefined;\n            return opts ? inject(MultipleTags1ServiceRequests).dummyB(opts) : undefined;\n        });\n    }\n}\n\n@Injectable({ providedIn: 'root' })\nexport class MultipleTags2ServiceResources {\n    public dummyA<ThrowOnError extends boolean = false>(options?: () => Options<DummyAData, ThrowOnError> | undefined) {\n        return httpResource<DummyAResponse>(() => {\n            const opts = options ? options() : undefined;\n            return opts ? inject(MultipleTags1ServiceRequests).dummyA(opts) : undefined;\n        });\n    }\n    \n    public dummyB<ThrowOnError extends boolean = false>(options?: () => Options<DummyBData, ThrowOnError> | undefined) {\n        return httpResource<DummyBResponse>(() => {\n            const opts = options ? options() : undefined;\n            return opts ? inject(MultipleTags1ServiceRequests).dummyB(opts) : undefined;\n        });\n    }\n}\n\n@Injectable({ providedIn: 'root' })\nexport class MultipleTags3ServiceResources {\n    public dummyB<ThrowOnError extends boolean = false>(options?: () => Options<DummyBData, ThrowOnError> | undefined) {\n        return httpResource<DummyBResponse>(() => {\n            const opts = options ? options() : undefined;\n            return opts ? inject(MultipleTags1ServiceRequests).dummyB(opts) : undefined;\n        });\n    }\n}\n\n@Injectable({ providedIn: 'root' })\nexport class CollectionFormatServiceResources {\n    public collectionFormat<ThrowOnError extends boolean = false>(options: () => Options<CollectionFormatData, ThrowOnError> | undefined) {\n        return httpResource<unknown>(() => {\n            const opts = options ? options() : undefined;\n            return opts ? inject(CollectionFormatServiceRequests).collectionFormat(opts) : undefined;\n        });\n    }\n}\n\n@Injectable({ providedIn: 'root' })\nexport class TypesServiceResources {\n    public types<ThrowOnError extends boolean = false>(options: () => Options<TypesData, ThrowOnError> | undefined) {\n        return httpResource<TypesResponse>(() => {\n            const opts = options ? options() : undefined;\n            return opts ? inject(TypesServiceRequests).types(opts) : undefined;\n        });\n    }\n}\n\n@Injectable({ providedIn: 'root' })\nexport class UploadServiceResources {\n    public uploadFile<ThrowOnError extends boolean = false>(options: () => Options<UploadFileData, ThrowOnError> | undefined) {\n        return httpResource<UploadFileResponse>(() => {\n            const opts = options ? options() : undefined;\n            return opts ? inject(UploadServiceRequests).uploadFile(opts) : undefined;\n        });\n    }\n}\n\n@Injectable({ providedIn: 'root' })\nexport class FileResponseServiceResources {\n    public fileResponse<ThrowOnError extends boolean = false>(options: () => Options<FileResponseData, ThrowOnError> | undefined) {\n        return httpResource<FileResponseResponse>(() => {\n            const opts = options ? options() : undefined;\n            return opts ? inject(FileResponseServiceRequests).fileResponse(opts) : undefined;\n        });\n    }\n}\n\n@Injectable({ providedIn: 'root' })\nexport class ComplexServiceResources {\n    public complexTypes<ThrowOnError extends boolean = false>(options: () => Options<ComplexTypesData, ThrowOnError> | undefined) {\n        return httpResource<ComplexTypesResponse>(() => {\n            const opts = options ? options() : undefined;\n            return opts ? inject(ComplexServiceRequests).complexTypes(opts) : undefined;\n        });\n    }\n    \n    public complexParams<ThrowOnError extends boolean = false>(options: () => Options<ComplexParamsData, ThrowOnError> | undefined) {\n        return httpResource<ComplexParamsResponse>(() => {\n            const opts = options ? options() : undefined;\n            return opts ? inject(ComplexServiceRequests).complexParams(opts) : undefined;\n        });\n    }\n}\n\n@Injectable({ providedIn: 'root' })\nexport class MultipartServiceResources {\n    public multipartResponse<ThrowOnError extends boolean = false>(options?: () => Options<MultipartResponseData, ThrowOnError> | undefined) {\n        return httpResource<MultipartResponseResponse>(() => {\n            const opts = options ? options() : undefined;\n            return opts ? inject(MultipartServiceRequests).multipartResponse(opts) : undefined;\n        });\n    }\n    \n    public multipartRequest<ThrowOnError extends boolean = false>(options?: () => Options<MultipartRequestData, ThrowOnError> | undefined) {\n        return httpResource<unknown>(() => {\n            const opts = options ? options() : undefined;\n            return opts ? inject(MultipartServiceRequests).multipartRequest(opts) : undefined;\n        });\n    }\n}\n\n@Injectable({ providedIn: 'root' })\nexport class HeaderServiceResources {\n    public callWithResultFromHeader<ThrowOnError extends boolean = false>(options?: () => Options<CallWithResultFromHeaderData, ThrowOnError> | undefined) {\n        return httpResource<unknown>(() => {\n            const opts = options ? options() : undefined;\n            return opts ? inject(HeaderServiceRequests).callWithResultFromHeader(opts) : undefined;\n        });\n    }\n}\n\n@Injectable({ providedIn: 'root' })\nexport class ErrorServiceResources {\n    public testErrorCode<ThrowOnError extends boolean = false>(options: () => Options<TestErrorCodeData, ThrowOnError> | undefined) {\n        return httpResource<unknown>(() => {\n            const opts = options ? options() : undefined;\n            return opts ? inject(ErrorServiceRequests).testErrorCode(opts) : undefined;\n        });\n    }\n}\n\n@Injectable({ providedIn: 'root' })\nexport class NonAsciiÆøåÆøÅöôêÊServiceResources {\n    public nonAsciiæøåÆøÅöôêÊ字符串<ThrowOnError extends boolean = false>(options: () => Options<NonAsciiæøåÆøÅöôêÊ字符串Data, ThrowOnError> | undefined) {\n        return httpResource<NonAsciiæøåÆøÅöôêÊ字符串Response>(() => {\n            const opts = options ? options() : undefined;\n            return opts ? inject(NonAsciiÆøåÆøÅöôêÊServiceRequests).nonAsciiæøåÆøÅöôêÊ字符串(opts) : undefined;\n        });\n    }\n    \n    /**\n     * Login User\n     */\n    public putWithFormUrlEncoded<ThrowOnError extends boolean = false>(options: () => Options<PutWithFormUrlEncodedData, ThrowOnError> | undefined) {\n        return httpResource<unknown>(() => {\n            const opts = options ? options() : undefined;\n            return opts ? inject(NonAsciiÆøåÆøÅöôêÊServiceRequests).putWithFormUrlEncoded(opts) : undefined;\n        });\n    }\n}\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@angular/common/default-class/client/client.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { HttpResponse } from '@angular/common/http';\nimport { HttpClient, HttpErrorResponse, HttpEventType, HttpRequest } from '@angular/common/http';\nimport {\n  assertInInjectionContext,\n  inject,\n  provideAppInitializer,\n  runInInjectionContext,\n} from '@angular/core';\nimport { firstValueFrom } from 'rxjs';\nimport { filter } from 'rxjs/operators';\n\nimport { createSseClient } from '../core/serverSentEvents.gen';\nimport type { HttpMethod } from '../core/types.gen';\nimport { getValidRequestBody } from '../core/utils.gen';\nimport type {\n  Client,\n  Config,\n  RequestOptions,\n  ResolvedRequestOptions,\n  ResponseStyle,\n} from './types.gen';\nimport {\n  buildUrl,\n  createConfig,\n  createInterceptors,\n  mergeConfigs,\n  mergeHeaders,\n  setAuthParams,\n} from './utils.gen';\n\nexport function provideHeyApiClient(client: Client) {\n  return provideAppInitializer(() => {\n    const httpClient = inject(HttpClient);\n    client.setConfig({ httpClient });\n  });\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<\n    HttpRequest<unknown>,\n    HttpResponse<unknown>,\n    unknown,\n    ResolvedRequestOptions\n  >();\n\n  const requestOptions = <\n    TData = unknown,\n    ThrowOnError extends boolean = false,\n    TResponseStyle extends ResponseStyle = 'fields',\n  >(\n    options: RequestOptions<TData, TResponseStyle, ThrowOnError>,\n  ) => {\n    const opts = {\n      ..._config,\n      ...options,\n      headers: mergeHeaders(_config.headers, options.headers),\n      httpClient: options.httpClient ?? _config.httpClient,\n      serializedBody: undefined as string | undefined,\n    };\n\n    if (!opts.httpClient) {\n      if (opts.injector) {\n        opts.httpClient = runInInjectionContext(opts.injector, () => inject(HttpClient));\n      } else {\n        assertInInjectionContext(requestOptions);\n        opts.httpClient = inject(HttpClient);\n      }\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 url = buildUrl(opts as any);\n\n    const req = new HttpRequest<unknown>(opts.method ?? 'GET', url, getValidRequestBody(opts), {\n      redirect: 'follow',\n      ...opts,\n    });\n\n    return { opts, req, url };\n  };\n\n  const beforeRequest = async (options: RequestOptions) => {\n    const { opts, req, url } = requestOptions(options);\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    return { opts, req, url };\n  };\n\n  const request: Client['request'] = async (options) => {\n    // @ts-expect-error\n    const { opts, req: initialReq } = await beforeRequest(options);\n\n    let req = initialReq;\n\n    for (const fn of interceptors.request.fns) {\n      if (fn) {\n        req = await fn(req, opts as any);\n      }\n    }\n\n    const result: {\n      request: HttpRequest<unknown>;\n      response: any;\n    } = {\n      request: req,\n      response: null,\n    };\n\n    try {\n      result.response = (await firstValueFrom(\n        opts\n          .httpClient!.request(req)\n          .pipe(filter((event) => event.type === HttpEventType.Response)),\n      )) as HttpResponse<unknown>;\n\n      for (const fn of interceptors.response.fns) {\n        if (fn) {\n          result.response = await fn(result.response, req, opts as any);\n        }\n      }\n\n      let bodyResponse = result.response.body;\n\n      if (opts.responseValidator) {\n        await opts.responseValidator(bodyResponse);\n      }\n\n      if (opts.responseTransformer) {\n        bodyResponse = await opts.responseTransformer(bodyResponse);\n      }\n\n      return opts.responseStyle === 'data' ? bodyResponse : { data: bodyResponse, ...result };\n    } catch (error) {\n      if (error instanceof HttpErrorResponse) {\n        result.response = error;\n      }\n\n      let finalError = error instanceof HttpErrorResponse ? error.error : error;\n\n      for (const fn of interceptors.error.fns) {\n        if (fn) {\n          finalError = (await fn(finalError, result.response as any, req, opts as any)) as string;\n        }\n      }\n\n      if (opts.throwOnError) {\n        throw finalError;\n      }\n\n      return opts.responseStyle === 'data'\n        ? undefined\n        : {\n            error: finalError,\n            ...result,\n          };\n    }\n  };\n\n  const makeMethodFn = (method: Uppercase<HttpMethod>) => (options: RequestOptions) =>\n    request({ ...options, method });\n\n  const makeSseFn = (method: Uppercase<HttpMethod>) => async (options: RequestOptions) => {\n    const { opts, url } = await beforeRequest(options);\n    return createSseClient({\n      ...opts,\n      body: opts.body as BodyInit | null | undefined,\n      headers: opts.headers as unknown as Record<string, string>,\n      method,\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    requestOptions: (options) => {\n      if (options.security) {\n        throw new Error('Security is not supported in requestOptions');\n      }\n\n      if (options.requestValidator) {\n        throw new Error('Request validation is not supported in requestOptions');\n      }\n\n      return requestOptions(options).req;\n    },\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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@angular/common/default-class/client/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type { Auth } from '../core/auth.gen';\nexport type { QuerySerializerOptions } from '../core/bodySerializer.gen';\nexport {\n  formDataBodySerializer,\n  jsonBodySerializer,\n  urlSearchParamsBodySerializer,\n} from '../core/bodySerializer.gen';\nexport { buildClientParams } from '../core/params.gen';\nexport { serializeQueryKeyValue } from '../core/queryKeySerializer.gen';\nexport { createClient } from './client.gen';\nexport type {\n  Client,\n  ClientOptions,\n  Config,\n  CreateClientConfig,\n  Options,\n  RequestOptions,\n  RequestResult,\n  ResolvedRequestOptions,\n  ResponseStyle,\n  TDataShape,\n} from './types.gen';\nexport { createConfig, mergeHeaders } from './utils.gen';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@angular/common/default-class/client/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type {\n  HttpClient,\n  HttpErrorResponse,\n  HttpHeaders,\n  HttpRequest,\n  HttpResponse,\n} from '@angular/common/http';\nimport type { Injector } from '@angular/core';\n\nimport type { Auth } from '../core/auth.gen';\nimport type {\n  ServerSentEventsOptions,\n  ServerSentEventsResult,\n} from '../core/serverSentEvents.gen';\nimport type { Client as CoreClient, Config as CoreConfig } from '../core/types.gen';\nimport type { Middleware } from './utils.gen';\n\nexport type ResponseStyle = 'data' | 'fields';\n\nexport interface Config<T extends ClientOptions = ClientOptions>\n  extends Omit<RequestInit, 'body' | 'headers' | 'method'>, Omit<CoreConfig, 'headers'> {\n  /**\n   * Base URL for all requests made by this client.\n   */\n  baseUrl?: T['baseUrl'];\n  /**\n   * An object containing any HTTP headers that you want to pre-populate your\n   * `HttpHeaders` object with.\n   *\n   * {@link https://angular.dev/api/common/http/HttpHeaders#constructor See more}\n   */\n  headers?:\n    | HttpHeaders\n    | Record<\n        string,\n        string | number | boolean | (string | number | boolean)[] | null | undefined | unknown\n      >;\n  /**\n   * The HTTP client to use for making requests.\n   */\n  httpClient?: HttpClient;\n  /**\n   * Should we return only data or multiple fields (data, error, response, etc.)?\n   *\n   * @default 'fields'\n   */\n  responseStyle?: ResponseStyle;\n\n  /**\n   * Throw an error instead of returning it in the response?\n   *\n   * @default false\n   */\n  throwOnError?: T['throwOnError'];\n}\n\nexport interface RequestOptions<\n  TData = unknown,\n  TResponseStyle extends ResponseStyle = 'fields',\n  ThrowOnError extends boolean = boolean,\n  Url extends string = string,\n>\n  extends\n    Config<{\n      responseStyle: TResponseStyle;\n      throwOnError: ThrowOnError;\n    }>,\n    Pick<\n      ServerSentEventsOptions<TData>,\n      | 'onRequest'\n      | 'onSseError'\n      | 'onSseEvent'\n      | 'sseDefaultRetryDelay'\n      | 'sseMaxRetryAttempts'\n      | 'sseMaxRetryDelay'\n    > {\n  /**\n   * Any body that you want to add to your request.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/fetch#body}\n   */\n  body?: unknown;\n  /**\n   * Optional custom injector for dependency resolution if you don't implicitly or explicitly provide one.\n   */\n  injector?: Injector;\n  path?: Record<string, unknown>;\n  query?: Record<string, unknown>;\n  /**\n   * Security mechanism(s) to use for the request.\n   */\n  security?: ReadonlyArray<Auth>;\n  url: Url;\n}\n\nexport interface ResolvedRequestOptions<\n  TResponseStyle extends ResponseStyle = 'fields',\n  ThrowOnError extends boolean = boolean,\n  Url extends string = string,\n> extends RequestOptions<unknown, TResponseStyle, ThrowOnError, Url> {\n  serializedBody?: string;\n}\n\nexport type RequestResult<\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = boolean,\n  TResponseStyle extends ResponseStyle = 'fields',\n> = Promise<\n  ThrowOnError extends true\n    ? TResponseStyle extends 'data'\n      ? TData extends Record<string, unknown>\n        ? TData[keyof TData]\n        : TData\n      : {\n          data: TData extends Record<string, unknown> ? TData[keyof TData] : TData;\n          request: HttpRequest<unknown>;\n          response: HttpResponse<TData>;\n        }\n    : TResponseStyle extends 'data'\n      ? (TData extends Record<string, unknown> ? TData[keyof TData] : TData) | undefined\n      :\n          | {\n              data: TData extends Record<string, unknown> ? TData[keyof TData] : TData;\n              error: undefined;\n              request: HttpRequest<unknown>;\n              response: HttpResponse<TData>;\n            }\n          | {\n              data: undefined;\n              error: TError[keyof TError];\n              request: HttpRequest<unknown>;\n              response: HttpErrorResponse & {\n                error: TError[keyof TError] | null;\n              };\n            }\n>;\n\nexport interface ClientOptions {\n  baseUrl?: string;\n  responseStyle?: ResponseStyle;\n  throwOnError?: boolean;\n}\n\ntype MethodFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'>,\n) => RequestResult<TData, TError, ThrowOnError, TResponseStyle>;\n\ntype SseFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'>,\n) => Promise<ServerSentEventsResult<TData, TError>>;\n\ntype RequestFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'> &\n    Pick<Required<RequestOptions<TData, TResponseStyle, ThrowOnError>>, 'method'>,\n) => RequestResult<TData, TError, ThrowOnError, TResponseStyle>;\n\ntype RequestOptionsFn = <\n  T,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: RequestOptions<T, TResponseStyle, ThrowOnError>,\n) => HttpRequest<T>;\n\ntype BuildUrlFn = <\n  TData extends {\n    body?: unknown;\n    path?: Record<string, unknown>;\n    query?: Record<string, unknown>;\n    url: string;\n  },\n>(\n  options: TData & Options<TData>,\n) => string;\n\nexport type Client = CoreClient<RequestFn, Config, MethodFn, BuildUrlFn, SseFn> & {\n  interceptors: Middleware<\n    HttpRequest<unknown>,\n    HttpResponse<unknown>,\n    unknown,\n    ResolvedRequestOptions\n  >;\n  requestOptions: RequestOptionsFn;\n};\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 = ClientOptions> = (\n  override?: Config<ClientOptions & T>,\n) => Config<Required<ClientOptions> & T>;\n\nexport interface TDataShape {\n  body?: unknown;\n  headers?: unknown;\n  path?: unknown;\n  query?: unknown;\n  url: string;\n}\n\ntype OmitKeys<T, K> = Pick<T, Exclude<keyof T, K>>;\n\nexport type Options<\n  TData extends TDataShape = TDataShape,\n  ThrowOnError extends boolean = boolean,\n  TResponse = unknown,\n  TResponseStyle extends ResponseStyle = 'fields',\n> = OmitKeys<\n  RequestOptions<TResponse, TResponseStyle, ThrowOnError>,\n  'body' | 'path' | 'query' | 'url'\n> &\n  ([TData] extends [never] ? unknown : Omit<TData, 'url'>);\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@angular/common/default-class/client/utils.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport { HttpHeaders } from '@angular/common/http';\n\nimport { getAuthToken } from '../core/auth.gen';\nimport type {\n  QuerySerializer,\n  QuerySerializerOptions,\n} from '../core/bodySerializer.gen';\nimport {\n  serializeArrayParam,\n  serializeObjectParam,\n  serializePrimitiveParam,\n} from '../core/pathSerializer.gen';\nimport type { Client, ClientOptions, Config, RequestOptions } from './types.gen';\n\ninterface PathSerializer {\n  path: Record<string, unknown>;\n  url: string;\n}\n\nconst PATH_PARAM_RE = /\\{[^{}]+\\}/g;\n\ntype ArrayStyle = 'form' | 'spaceDelimited' | 'pipeDelimited';\ntype MatrixStyle = 'label' | 'matrix' | 'simple';\ntype ArraySeparatorStyle = ArrayStyle | MatrixStyle;\n\nconst 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 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 = (\n  contentType: string | null,\n): 'blob' | 'formData' | 'json' | 'stream' | 'text' | undefined => {\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\nexport const setAuthParams = async (\n  options: Pick<Required<RequestOptions>, 'security'> &\n    Pick<RequestOptions, 'auth' | 'query'> & {\n      headers: HttpHeaders;\n    },\n) => {\n  for (const auth of options.security) {\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 = options.headers.append('Cookie', `${name}=${token}`);\n        break;\n      case 'header':\n      default:\n        options.headers = options.headers.set(name, token);\n        break;\n    }\n\n    return;\n  }\n};\n\nexport const buildUrl: Client['buildUrl'] = (options) => {\n  const url = 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  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 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\nexport const mergeHeaders = (\n  ...headers: Array<Required<Config>['headers'] | undefined>\n): HttpHeaders => {\n  let mergedHeaders = new HttpHeaders();\n\n  for (const header of headers) {\n    if (!header || typeof header !== 'object') {\n      continue;\n    }\n\n    if (header instanceof HttpHeaders) {\n      // Merge HttpHeaders instance\n      header.keys().forEach((key) => {\n        const values = header.getAll(key);\n        if (values) {\n          values.forEach((value) => {\n            mergedHeaders = mergedHeaders.append(key, value);\n          });\n        }\n      });\n    } else {\n      // Merge plain object headers\n      for (const [key, value] of Object.entries(header)) {\n        if (value === null) {\n          mergedHeaders = mergedHeaders.delete(key);\n        } else if (Array.isArray(value)) {\n          for (const v of value) {\n            mergedHeaders = 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 = mergedHeaders.set(\n            key,\n            typeof value === 'object' ? JSON.stringify(value) : (value as string),\n          );\n        }\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  headers: defaultHeaders,\n  querySerializer: defaultQuerySerializer,\n  ...override,\n});\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@angular/common/default-class/client.gen.ts",
    "content": "// 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: 'http://localhost:3000/base' }));\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@angular/common/default-class/core/auth.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@angular/common/default-class/core/bodySerializer.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@angular/common/default-class/core/params.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@angular/common/default-class/core/pathSerializer.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@angular/common/default-class/core/queryKeySerializer.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\n/**\n * JSON-friendly union that mirrors what Pinia Colada can hash.\n */\nexport type JsonValue =\n  | null\n  | string\n  | number\n  | boolean\n  | JsonValue[]\n  | { [key: string]: JsonValue };\n\n/**\n * Replacer that converts non-JSON values (bigint, Date, etc.) to safe substitutes.\n */\nexport const queryKeyJsonReplacer = (_key: string, value: unknown) => {\n  if (value === undefined || typeof value === 'function' || typeof value === 'symbol') {\n    return undefined;\n  }\n  if (typeof value === 'bigint') {\n    return value.toString();\n  }\n  if (value instanceof Date) {\n    return value.toISOString();\n  }\n  return value;\n};\n\n/**\n * Safely stringifies a value and parses it back into a JsonValue.\n */\nexport const stringifyToJsonValue = (input: unknown): JsonValue | undefined => {\n  try {\n    const json = JSON.stringify(input, queryKeyJsonReplacer);\n    if (json === undefined) {\n      return undefined;\n    }\n    return JSON.parse(json) as JsonValue;\n  } catch {\n    return undefined;\n  }\n};\n\n/**\n * Detects plain objects (including objects with a null prototype).\n */\nconst isPlainObject = (value: unknown): value is Record<string, unknown> => {\n  if (value === null || typeof value !== 'object') {\n    return false;\n  }\n  const prototype = Object.getPrototypeOf(value as object);\n  return prototype === Object.prototype || prototype === null;\n};\n\n/**\n * Turns URLSearchParams into a sorted JSON object for deterministic keys.\n */\nconst serializeSearchParams = (params: URLSearchParams): JsonValue => {\n  const entries = Array.from(params.entries()).sort(([a], [b]) => a.localeCompare(b));\n  const result: Record<string, JsonValue> = {};\n\n  for (const [key, value] of entries) {\n    const existing = result[key];\n    if (existing === undefined) {\n      result[key] = value;\n      continue;\n    }\n\n    if (Array.isArray(existing)) {\n      (existing as string[]).push(value);\n    } else {\n      result[key] = [existing, value];\n    }\n  }\n\n  return result;\n};\n\n/**\n * Normalizes any accepted value into a JSON-friendly shape for query keys.\n */\nexport const serializeQueryKeyValue = (value: unknown): JsonValue | undefined => {\n  if (value === null) {\n    return null;\n  }\n\n  if (typeof value === 'string' || typeof value === 'number' || typeof value === 'boolean') {\n    return value;\n  }\n\n  if (value === undefined || typeof value === 'function' || typeof value === 'symbol') {\n    return undefined;\n  }\n\n  if (typeof value === 'bigint') {\n    return value.toString();\n  }\n\n  if (value instanceof Date) {\n    return value.toISOString();\n  }\n\n  if (Array.isArray(value)) {\n    return stringifyToJsonValue(value);\n  }\n\n  if (typeof URLSearchParams !== 'undefined' && value instanceof URLSearchParams) {\n    return serializeSearchParams(value);\n  }\n\n  if (isPlainObject(value)) {\n    return stringifyToJsonValue(value);\n  }\n\n  return undefined;\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@angular/common/default-class/core/serverSentEvents.gen.ts",
    "content": "// 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 const 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            // Normalize line endings: CRLF -> LF, then CR -> LF\n            buffer = buffer.replace(/\\r\\n/g, '\\n').replace(/\\r/g, '\\n');\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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@angular/common/default-class/core/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { Auth, AuthToken } from './auth.gen';\nimport type { BodySerializer, QuerySerializer, QuerySerializerOptions } from './bodySerializer.gen';\n\nexport type HttpMethod =\n  | 'connect'\n  | 'delete'\n  | 'get'\n  | 'head'\n  | 'options'\n  | 'patch'\n  | 'post'\n  | 'put'\n  | 'trace';\n\nexport type Client<\n  RequestFn = never,\n  Config = unknown,\n  MethodFn = never,\n  BuildUrlFn = never,\n  SseFn = never,\n> = {\n  /**\n   * Returns the final request URL.\n   */\n  buildUrl: BuildUrlFn;\n  getConfig: () => Config;\n  request: RequestFn;\n  setConfig: (config: Config) => Config;\n} & {\n  [K in HttpMethod]: MethodFn;\n} & ([SseFn] extends [never] ? { sse?: never } : { sse: { [K in HttpMethod]: SseFn } });\n\nexport interface Config {\n  /**\n   * Auth token or a function returning auth token. The resolved value will be\n   * added to the request payload as defined by its `security` array.\n   */\n  auth?: ((auth: Auth) => Promise<AuthToken> | AuthToken) | AuthToken;\n  /**\n   * A function for serializing request body parameter. By default,\n   * {@link JSON.stringify()} will be used.\n   */\n  bodySerializer?: BodySerializer | null;\n  /**\n   * An object containing any HTTP headers that you want to pre-populate your\n   * `Headers` object with.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/Headers/Headers#init See more}\n   */\n  headers?:\n    | RequestInit['headers']\n    | Record<\n        string,\n        string | number | boolean | (string | number | boolean)[] | null | undefined | unknown\n      >;\n  /**\n   * The request method.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/fetch#method See more}\n   */\n  method?: Uppercase<HttpMethod>;\n  /**\n   * A function for serializing request query parameters. By default, arrays\n   * will be exploded in form style, objects will be exploded in deepObject\n   * style, and reserved characters are percent-encoded.\n   *\n   * This method will have no effect if the native `paramsSerializer()` Axios\n   * API function is used.\n   *\n   * {@link https://swagger.io/docs/specification/serialization/#query View examples}\n   */\n  querySerializer?: QuerySerializer | QuerySerializerOptions;\n  /**\n   * A function validating request data. This is useful if you want to ensure\n   * the request conforms to the desired shape, so it can be safely sent to\n   * the server.\n   */\n  requestValidator?: (data: unknown) => Promise<unknown>;\n  /**\n   * A function transforming response data before it's returned. This is useful\n   * for post-processing data, e.g. converting ISO strings into Date objects.\n   */\n  responseTransformer?: (data: unknown) => Promise<unknown>;\n  /**\n   * A function validating response data. This is useful if you want to ensure\n   * the response conforms to the desired shape, so it can be safely passed to\n   * the transformers and returned to the user.\n   */\n  responseValidator?: (data: unknown) => Promise<unknown>;\n}\n\ntype IsExactlyNeverOrNeverUndefined<T> = [T] extends [never]\n  ? true\n  : [T] extends [never | undefined]\n    ? [undefined] extends [T]\n      ? false\n      : true\n    : false;\n\nexport type OmitNever<T extends Record<string, unknown>> = {\n  [K in keyof T as IsExactlyNeverOrNeverUndefined<T[K]> extends true ? never : K]: T[K];\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@angular/common/default-class/core/utils.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@angular/common/default-class/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport { apiVVersionODataControllerCount, callToTestOrderOfParams, callWithDefaultOptionalParameters, callWithDefaultParameters, callWithDescriptions, callWithDuplicateResponses, callWithNoContentResponse, callWithParameters, callWithResponse, callWithResponseAndNoContentResponse, callWithResponses, callWithResultFromHeader, callWithWeirdParameterNames, collectionFormat, complexParams, complexTypes, deleteCallWithoutParametersAndResponse, deleteFoo, deprecatedCall, dummyA, dummyB, duplicateName, duplicateName2, duplicateName3, duplicateName4, export_, fileResponse, fooWow, getApiVbyApiVersionSimpleOperation, getCallWithOptionalParam, getCallWithoutParametersAndResponse, headCallWithoutParametersAndResponse, import_, multipartRequest, multipartResponse, nonAsciiæøåÆøÅöôêÊ字符串, type Options, optionsCallWithoutParametersAndResponse, patchApiVbyApiVersionNoTag, patchCallWithoutParametersAndResponse, postApiVbyApiVersionFormData, postApiVbyApiVersionRequestBody, postCallWithOptionalParam, postCallWithoutParametersAndResponse, putCallWithoutParametersAndResponse, putWithFormUrlEncoded, testErrorCode, types, uploadFile } from './sdk.gen';\nexport type { _3eNum1Период, _400, AdditionalPropertiesIntegerIssue, AdditionalPropertiesUnknownIssue, AdditionalPropertiesUnknownIssue2, AdditionalPropertiesUnknownIssue3, AdditionalPropertiesUnknownIssueWritable, AnyOfAnyAndNull, AnyOfArrays, ApiVVersionODataControllerCountData, ApiVVersionODataControllerCountResponse, ApiVVersionODataControllerCountResponses, ArrayWithAnyOfProperties, ArrayWithArray, ArrayWithBooleans, ArrayWithNumbers, ArrayWithProperties, ArrayWithReferences, ArrayWithStrings, CallToTestOrderOfParamsData, CallWithDefaultOptionalParametersData, CallWithDefaultParametersData, CallWithDescriptionsData, CallWithDuplicateResponsesData, CallWithDuplicateResponsesError, CallWithDuplicateResponsesErrors, CallWithDuplicateResponsesResponse, CallWithDuplicateResponsesResponses, CallWithNoContentResponseData, CallWithNoContentResponseResponse, CallWithNoContentResponseResponses, CallWithParametersData, CallWithResponseAndNoContentResponseData, CallWithResponseAndNoContentResponseResponse, CallWithResponseAndNoContentResponseResponses, CallWithResponseData, CallWithResponseResponse, CallWithResponseResponses, CallWithResponsesData, CallWithResponsesError, CallWithResponsesErrors, CallWithResponsesResponse, CallWithResponsesResponses, CallWithResultFromHeaderData, CallWithResultFromHeaderErrors, CallWithResultFromHeaderResponses, CallWithWeirdParameterNamesData, CamelCaseCommentWithBreaks, CharactersInDescription, ClientOptions, CollectionFormatData, CommentWithBackticks, CommentWithBackticksAndQuotes, CommentWithBreaks, CommentWithExpressionPlaceholders, CommentWithQuotes, CommentWithReservedCharacters, CommentWithSlashes, ComplexParamsData, ComplexParamsResponse, ComplexParamsResponses, ComplexTypesData, ComplexTypesErrors, ComplexTypesResponse, ComplexTypesResponses, CompositionBaseModel, CompositionExtendedModel, CompositionWithAllOfAndNullable, CompositionWithAnyOf, CompositionWithAnyOfAndNullable, CompositionWithAnyOfAnonymous, CompositionWithNestedAnyAndTypeNull, CompositionWithNestedAnyOfAndNull, CompositionWithOneOf, CompositionWithOneOfAndComplexArrayDictionary, CompositionWithOneOfAndNullable, CompositionWithOneOfAndProperties, CompositionWithOneOfAndSimpleArrayDictionary, CompositionWithOneOfAndSimpleDictionary, CompositionWithOneOfAnonymous, CompositionWithOneOfDiscriminator, ConstValue, Default, DeleteCallWithoutParametersAndResponseData, DeleteFooData, DeleteFooData2, DeleteFooData3, DeprecatedCallData, DeprecatedModel, DictionaryWithArray, DictionaryWithDictionary, DictionaryWithProperties, DictionaryWithPropertiesAndAdditionalProperties, DictionaryWithReference, DictionaryWithString, DummyAData, DummyAResponse, DummyAResponses, DummyBData, DummyBResponse, DummyBResponses, DuplicateName2Data, DuplicateName3Data, DuplicateName4Data, DuplicateNameData, EnumFromDescription, EnumWithExtensions, EnumWithNumbers, EnumWithReplacedCharacters, EnumWithStrings, EnumWithXEnumNames, ExportData, ExternalRefA, ExternalRefB, ExternalSharedModel, File, FileResponseData, FileResponseResponse, FileResponseResponses, FileWritable, FooWowData, FooWowResponses, FreeFormObjectWithAdditionalPropertiesEqEmptyObject, FreeFormObjectWithAdditionalPropertiesEqTrue, FreeFormObjectWithoutAdditionalProperties, GenericSchemaDuplicateIssue1SystemBoolean, GenericSchemaDuplicateIssue1SystemBooleanWritable, GenericSchemaDuplicateIssue1SystemString, GenericSchemaDuplicateIssue1SystemStringWritable, GetApiVbyApiVersionSimpleOperationData, GetApiVbyApiVersionSimpleOperationError, GetApiVbyApiVersionSimpleOperationErrors, GetApiVbyApiVersionSimpleOperationResponse, GetApiVbyApiVersionSimpleOperationResponses, GetCallWithOptionalParamData, GetCallWithoutParametersAndResponseData, HeadCallWithoutParametersAndResponseData, Import, ImportData, ImportResponse, ImportResponses, IoK8sApimachineryPkgApisMetaV1DeleteOptions, IoK8sApimachineryPkgApisMetaV1Preconditions, ModelCircle, ModelFromZendesk, ModelSquare, ModelThatExtends, ModelThatExtendsExtends, ModelWithAdditionalPropertiesEqTrue, ModelWithAdditionalPropertiesRef, ModelWithAnyOfConstantSizeArray, ModelWithAnyOfConstantSizeArrayAndIntersect, ModelWithAnyOfConstantSizeArrayNullable, ModelWithAnyOfConstantSizeArrayWithNSizeAndOptions, ModelWithAnyOfConstantSizeArrayWithNSizeAndOptionsWritable, ModelWithArray, ModelWithArrayReadOnlyAndWriteOnly, ModelWithArrayReadOnlyAndWriteOnlyWritable, ModelWithBackticksInDescription, ModelWithBoolean, ModelWithCircularReference, ModelWithConst, ModelWithConstantSizeArray, ModelWithDictionary, ModelWithDuplicateImports, ModelWithDuplicateProperties, ModelWithEnum, ModelWithEnumFromDescription, ModelWithEnumWithHyphen, ModelWithInteger, ModelWithNestedArrayEnums, ModelWithNestedArrayEnumsData, ModelWithNestedArrayEnumsDataBar, ModelWithNestedArrayEnumsDataFoo, ModelWithNestedCompositionEnums, ModelWithNestedEnums, ModelWithNestedProperties, ModelWithNullableObject, ModelWithNullableString, ModelWithNumericEnumUnion, ModelWithOneOfAndProperties, ModelWithOneOfEnum, ModelWithOrderedProperties, ModelWithPattern, ModelWithPatternWritable, ModelWithPrefixItemsConstantSizeArray, ModelWithProperties, ModelWithPropertiesWritable, ModelWithReadOnlyAndWriteOnly, ModelWithReadOnlyAndWriteOnlyWritable, ModelWithReference, ModelWithReferenceWritable, ModelWithString, ModelWithStringError, MultipartRequestData, MultipartResponseData, MultipartResponseResponse, MultipartResponseResponses, NestedAnyOfArraysNullable, NonAsciiæøåÆøÅöôêÊ字符串Data, NonAsciiæøåÆøÅöôêÊ字符串Response, NonAsciiæøåÆøÅöôêÊ字符串Responses, NonAsciiStringæøåÆøÅöôêÊ字符串, NullableObject, OneOfAllOfIssue, OneOfAllOfIssueWritable, OptionsCallWithoutParametersAndResponseData, Pageable, ParameterSimpleParameterUnused, PatchApiVbyApiVersionNoTagData, PatchApiVbyApiVersionNoTagResponses, PatchCallWithoutParametersAndResponseData, PostApiVbyApiVersionFormDataData, PostApiVbyApiVersionRequestBodyData, PostCallWithOptionalParamData, PostCallWithOptionalParamResponse, PostCallWithOptionalParamResponses, PostCallWithoutParametersAndResponseData, PostServiceWithEmptyTagResponse, PostServiceWithEmptyTagResponse2, PutCallWithoutParametersAndResponseData, PutWithFormUrlEncodedData, SchemaWithFormRestrictedKeys, SimpleBoolean, SimpleFile, SimpleFormData, SimpleInteger, SimpleParameter, SimpleReference, SimpleRequestBody, SimpleString, SimpleStringWithPattern, TestErrorCodeData, TestErrorCodeErrors, TestErrorCodeResponses, TypesData, TypesResponse, TypesResponses, UploadFileData, UploadFileResponse, UploadFileResponses, XFooBar } from './types.gen';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@angular/common/default-class/sdk.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport { type Client, formDataBodySerializer, type Options as Options2, type TDataShape, urlSearchParamsBodySerializer } from './client';\nimport { client } from './client.gen';\nimport type { ApiVVersionODataControllerCountData, ApiVVersionODataControllerCountResponses, CallToTestOrderOfParamsData, CallWithDefaultOptionalParametersData, CallWithDefaultParametersData, CallWithDescriptionsData, CallWithDuplicateResponsesData, CallWithDuplicateResponsesErrors, CallWithDuplicateResponsesResponses, CallWithNoContentResponseData, CallWithNoContentResponseResponses, CallWithParametersData, CallWithResponseAndNoContentResponseData, CallWithResponseAndNoContentResponseResponses, CallWithResponseData, CallWithResponseResponses, CallWithResponsesData, CallWithResponsesErrors, CallWithResponsesResponses, CallWithResultFromHeaderData, CallWithResultFromHeaderErrors, CallWithResultFromHeaderResponses, CallWithWeirdParameterNamesData, CollectionFormatData, ComplexParamsData, ComplexParamsResponses, ComplexTypesData, ComplexTypesErrors, ComplexTypesResponses, DeleteCallWithoutParametersAndResponseData, DeleteFooData3, DeprecatedCallData, DummyAData, DummyAResponses, DummyBData, DummyBResponses, DuplicateName2Data, DuplicateName3Data, DuplicateName4Data, DuplicateNameData, ExportData, FileResponseData, FileResponseResponses, FooWowData, FooWowResponses, GetApiVbyApiVersionSimpleOperationData, GetApiVbyApiVersionSimpleOperationErrors, GetApiVbyApiVersionSimpleOperationResponses, GetCallWithOptionalParamData, GetCallWithoutParametersAndResponseData, HeadCallWithoutParametersAndResponseData, ImportData, ImportResponses, MultipartRequestData, MultipartResponseData, MultipartResponseResponses, NonAsciiæøåÆøÅöôêÊ字符串Data, NonAsciiæøåÆøÅöôêÊ字符串Responses, OptionsCallWithoutParametersAndResponseData, PatchApiVbyApiVersionNoTagData, PatchApiVbyApiVersionNoTagResponses, PatchCallWithoutParametersAndResponseData, PostApiVbyApiVersionFormDataData, PostApiVbyApiVersionRequestBodyData, PostCallWithOptionalParamData, PostCallWithOptionalParamResponses, PostCallWithoutParametersAndResponseData, PutCallWithoutParametersAndResponseData, PutWithFormUrlEncodedData, TestErrorCodeData, TestErrorCodeErrors, TestErrorCodeResponses, TypesData, TypesResponses, UploadFileData, UploadFileResponses } from './types.gen';\n\nexport type Options<TData extends TDataShape = TDataShape, ThrowOnError extends boolean = boolean> = Options2<TData, ThrowOnError> & {\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\nexport const export_ = <ThrowOnError extends boolean = false>(options?: Options<ExportData, ThrowOnError>) => (options?.client ?? client).get<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/no+tag', ...options });\n\nexport const patchApiVbyApiVersionNoTag = <ThrowOnError extends boolean = false>(options?: Options<PatchApiVbyApiVersionNoTagData, ThrowOnError>) => (options?.client ?? client).patch<PatchApiVbyApiVersionNoTagResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/no+tag', ...options });\n\nexport const import_ = <ThrowOnError extends boolean = false>(options: Options<ImportData, ThrowOnError>) => (options.client ?? client).post<ImportResponses, unknown, ThrowOnError>({\n    url: '/api/v{api-version}/no+tag',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options.headers\n    }\n});\n\nexport const fooWow = <ThrowOnError extends boolean = false>(options?: Options<FooWowData, ThrowOnError>) => (options?.client ?? client).put<FooWowResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/no+tag', ...options });\n\nexport const apiVVersionODataControllerCount = <ThrowOnError extends boolean = false>(options?: Options<ApiVVersionODataControllerCountData, ThrowOnError>) => (options?.client ?? client).get<ApiVVersionODataControllerCountResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple/$count', ...options });\n\nexport const getApiVbyApiVersionSimpleOperation = <ThrowOnError extends boolean = false>(options: Options<GetApiVbyApiVersionSimpleOperationData, ThrowOnError>) => (options.client ?? client).get<GetApiVbyApiVersionSimpleOperationResponses, GetApiVbyApiVersionSimpleOperationErrors, ThrowOnError>({ url: '/api/v{api-version}/simple:operation', ...options });\n\nexport const deleteCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<DeleteCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).delete<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const getCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<GetCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).get<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const headCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<HeadCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).head<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const optionsCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<OptionsCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).options<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const patchCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<PatchCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).patch<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const postCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<PostCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).post<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const putCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<PutCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).put<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const deleteFoo = <ThrowOnError extends boolean = false>(options: Options<DeleteFooData3, ThrowOnError>) => (options.client ?? client).delete<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/foo/{foo_param}/bar/{BarParam}', ...options });\n\nexport const callWithDescriptions = <ThrowOnError extends boolean = false>(options?: Options<CallWithDescriptionsData, ThrowOnError>) => (options?.client ?? client).post<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/descriptions', ...options });\n\n/**\n * @deprecated\n */\nexport const deprecatedCall = <ThrowOnError extends boolean = false>(options: Options<DeprecatedCallData, ThrowOnError>) => (options.client ?? client).post<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/parameters/deprecated', ...options });\n\nexport const callWithParameters = <ThrowOnError extends boolean = false>(options: Options<CallWithParametersData, ThrowOnError>) => (options.client ?? client).post<unknown, unknown, ThrowOnError>({\n    url: '/api/v{api-version}/parameters/{parameterPath}',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options.headers\n    }\n});\n\nexport const callWithWeirdParameterNames = <ThrowOnError extends boolean = false>(options: Options<CallWithWeirdParameterNamesData, ThrowOnError>) => (options.client ?? client).post<unknown, unknown, ThrowOnError>({\n    url: '/api/v{api-version}/parameters/{parameter.path.1}/{parameter-path-2}/{PARAMETER-PATH-3}',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options.headers\n    }\n});\n\nexport const getCallWithOptionalParam = <ThrowOnError extends boolean = false>(options: Options<GetCallWithOptionalParamData, ThrowOnError>) => (options.client ?? client).get<unknown, unknown, ThrowOnError>({\n    url: '/api/v{api-version}/parameters',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options.headers\n    }\n});\n\nexport const postCallWithOptionalParam = <ThrowOnError extends boolean = false>(options: Options<PostCallWithOptionalParamData, ThrowOnError>) => (options.client ?? client).post<PostCallWithOptionalParamResponses, unknown, ThrowOnError>({\n    url: '/api/v{api-version}/parameters',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options.headers\n    }\n});\n\nexport const postApiVbyApiVersionRequestBody = <ThrowOnError extends boolean = false>(options?: Options<PostApiVbyApiVersionRequestBodyData, ThrowOnError>) => (options?.client ?? client).post<unknown, unknown, ThrowOnError>({\n    url: '/api/v{api-version}/requestBody',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options?.headers\n    }\n});\n\nexport const postApiVbyApiVersionFormData = <ThrowOnError extends boolean = false>(options?: Options<PostApiVbyApiVersionFormDataData, ThrowOnError>) => (options?.client ?? client).post<unknown, unknown, ThrowOnError>({\n    ...formDataBodySerializer,\n    url: '/api/v{api-version}/formData',\n    ...options,\n    headers: {\n        'Content-Type': null,\n        ...options?.headers\n    }\n});\n\nexport const callWithDefaultParameters = <ThrowOnError extends boolean = false>(options?: Options<CallWithDefaultParametersData, ThrowOnError>) => (options?.client ?? client).get<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/defaults', ...options });\n\nexport const callWithDefaultOptionalParameters = <ThrowOnError extends boolean = false>(options?: Options<CallWithDefaultOptionalParametersData, ThrowOnError>) => (options?.client ?? client).post<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/defaults', ...options });\n\nexport const callToTestOrderOfParams = <ThrowOnError extends boolean = false>(options: Options<CallToTestOrderOfParamsData, ThrowOnError>) => (options.client ?? client).put<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/defaults', ...options });\n\nexport const duplicateName = <ThrowOnError extends boolean = false>(options?: Options<DuplicateNameData, ThrowOnError>) => (options?.client ?? client).delete<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/duplicate', ...options });\n\nexport const duplicateName2 = <ThrowOnError extends boolean = false>(options?: Options<DuplicateName2Data, ThrowOnError>) => (options?.client ?? client).get<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/duplicate', ...options });\n\nexport const duplicateName3 = <ThrowOnError extends boolean = false>(options?: Options<DuplicateName3Data, ThrowOnError>) => (options?.client ?? client).post<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/duplicate', ...options });\n\nexport const duplicateName4 = <ThrowOnError extends boolean = false>(options?: Options<DuplicateName4Data, ThrowOnError>) => (options?.client ?? client).put<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/duplicate', ...options });\n\nexport const callWithNoContentResponse = <ThrowOnError extends boolean = false>(options?: Options<CallWithNoContentResponseData, ThrowOnError>) => (options?.client ?? client).get<CallWithNoContentResponseResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/no-content', ...options });\n\nexport const callWithResponseAndNoContentResponse = <ThrowOnError extends boolean = false>(options?: Options<CallWithResponseAndNoContentResponseData, ThrowOnError>) => (options?.client ?? client).get<CallWithResponseAndNoContentResponseResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/multiple-tags/response-and-no-content', ...options });\n\nexport const dummyA = <ThrowOnError extends boolean = false>(options?: Options<DummyAData, ThrowOnError>) => (options?.client ?? client).get<DummyAResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/multiple-tags/a', ...options });\n\nexport const dummyB = <ThrowOnError extends boolean = false>(options?: Options<DummyBData, ThrowOnError>) => (options?.client ?? client).get<DummyBResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/multiple-tags/b', ...options });\n\nexport const callWithResponse = <ThrowOnError extends boolean = false>(options?: Options<CallWithResponseData, ThrowOnError>) => (options?.client ?? client).get<CallWithResponseResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/response', ...options });\n\nexport const callWithDuplicateResponses = <ThrowOnError extends boolean = false>(options?: Options<CallWithDuplicateResponsesData, ThrowOnError>) => (options?.client ?? client).post<CallWithDuplicateResponsesResponses, CallWithDuplicateResponsesErrors, ThrowOnError>({ url: '/api/v{api-version}/response', ...options });\n\nexport const callWithResponses = <ThrowOnError extends boolean = false>(options?: Options<CallWithResponsesData, ThrowOnError>) => (options?.client ?? client).put<CallWithResponsesResponses, CallWithResponsesErrors, ThrowOnError>({ url: '/api/v{api-version}/response', ...options });\n\nexport const collectionFormat = <ThrowOnError extends boolean = false>(options: Options<CollectionFormatData, ThrowOnError>) => (options.client ?? client).get<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/collectionFormat', ...options });\n\nexport const types = <ThrowOnError extends boolean = false>(options: Options<TypesData, ThrowOnError>) => (options.client ?? client).get<TypesResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/types', ...options });\n\nexport const uploadFile = <ThrowOnError extends boolean = false>(options: Options<UploadFileData, ThrowOnError>) => (options.client ?? client).post<UploadFileResponses, unknown, ThrowOnError>({\n    ...urlSearchParamsBodySerializer,\n    url: '/api/v{api-version}/upload',\n    ...options,\n    headers: {\n        'Content-Type': 'application/x-www-form-urlencoded',\n        ...options.headers\n    }\n});\n\nexport const fileResponse = <ThrowOnError extends boolean = false>(options: Options<FileResponseData, ThrowOnError>) => (options.client ?? client).get<FileResponseResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/file/{id}', ...options });\n\nexport const complexTypes = <ThrowOnError extends boolean = false>(options: Options<ComplexTypesData, ThrowOnError>) => (options.client ?? client).get<ComplexTypesResponses, ComplexTypesErrors, ThrowOnError>({\n    querySerializer: { parameters: { parameterObject: { object: { style: 'form' } } } },\n    url: '/api/v{api-version}/complex',\n    ...options\n});\n\nexport const multipartResponse = <ThrowOnError extends boolean = false>(options?: Options<MultipartResponseData, ThrowOnError>) => (options?.client ?? client).get<MultipartResponseResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/multipart', ...options });\n\nexport const multipartRequest = <ThrowOnError extends boolean = false>(options?: Options<MultipartRequestData, ThrowOnError>) => (options?.client ?? client).post<unknown, unknown, ThrowOnError>({\n    ...formDataBodySerializer,\n    url: '/api/v{api-version}/multipart',\n    ...options,\n    headers: {\n        'Content-Type': null,\n        ...options?.headers\n    }\n});\n\nexport const complexParams = <ThrowOnError extends boolean = false>(options: Options<ComplexParamsData, ThrowOnError>) => (options.client ?? client).put<ComplexParamsResponses, unknown, ThrowOnError>({\n    url: '/api/v{api-version}/complex/{id}',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json-patch+json',\n        ...options.headers\n    }\n});\n\nexport const callWithResultFromHeader = <ThrowOnError extends boolean = false>(options?: Options<CallWithResultFromHeaderData, ThrowOnError>) => (options?.client ?? client).post<CallWithResultFromHeaderResponses, CallWithResultFromHeaderErrors, ThrowOnError>({ url: '/api/v{api-version}/header', ...options });\n\nexport const testErrorCode = <ThrowOnError extends boolean = false>(options: Options<TestErrorCodeData, ThrowOnError>) => (options.client ?? client).post<TestErrorCodeResponses, TestErrorCodeErrors, ThrowOnError>({ url: '/api/v{api-version}/error', ...options });\n\nexport const nonAsciiæøåÆøÅöôêÊ字符串 = <ThrowOnError extends boolean = false>(options: Options<NonAsciiæøåÆøÅöôêÊ字符串Data, ThrowOnError>) => (options.client ?? client).post<NonAsciiæøåÆøÅöôêÊ字符串Responses, unknown, ThrowOnError>({ url: '/api/v{api-version}/non-ascii-æøåÆØÅöôêÊ字符串', ...options });\n\n/**\n * Login User\n */\nexport const putWithFormUrlEncoded = <ThrowOnError extends boolean = false>(options: Options<PutWithFormUrlEncodedData, ThrowOnError>) => (options.client ?? client).put<unknown, unknown, ThrowOnError>({\n    ...urlSearchParamsBodySerializer,\n    url: '/api/v{api-version}/non-ascii-æøåÆØÅöôêÊ字符串',\n    ...options,\n    headers: {\n        'Content-Type': 'application/x-www-form-urlencoded',\n        ...options.headers\n    }\n});\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@angular/common/default-class/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type ClientOptions = {\n    baseUrl: 'http://localhost:3000/base' | (string & {});\n};\n\n/**\n * Model with number-only name\n */\nexport type _400 = string;\n\nexport type ExternalRefA = ExternalSharedModel;\n\nexport type ExternalRefB = ExternalSharedModel;\n\n/**\n * Testing multiline comments in string: First line\n * Second line\n *\n * Fourth line\n */\nexport type CamelCaseCommentWithBreaks = number;\n\n/**\n * Testing multiline comments in string: First line\n * Second line\n *\n * Fourth line\n */\nexport type CommentWithBreaks = number;\n\n/**\n * Testing backticks in string: `backticks` and ```multiple backticks``` should work\n */\nexport type CommentWithBackticks = number;\n\n/**\n * Testing backticks and quotes in string: `backticks`, 'quotes', \"double quotes\" and ```multiple backticks``` should work\n */\nexport type CommentWithBackticksAndQuotes = number;\n\n/**\n * Testing slashes in string: \\backwards\\\\\\ and /forwards/// should work\n */\nexport type CommentWithSlashes = number;\n\n/**\n * Testing expression placeholders in string: ${expression} should work\n */\nexport type CommentWithExpressionPlaceholders = number;\n\n/**\n * Testing quotes in string: 'single quote''' and \"double quotes\"\"\" should work\n */\nexport type CommentWithQuotes = number;\n\n/**\n * Testing reserved characters in string: * inline * and ** inline ** should work\n */\nexport type CommentWithReservedCharacters = number;\n\n/**\n * This is a simple number\n */\nexport type SimpleInteger = number;\n\n/**\n * This is a simple boolean\n */\nexport type SimpleBoolean = boolean;\n\n/**\n * This is a simple string\n */\nexport type SimpleString = string;\n\n/**\n * A string with non-ascii (unicode) characters valid in typescript identifiers (æøåÆØÅöÔèÈ字符串)\n */\nexport type NonAsciiStringæøåÆøÅöôêÊ字符串 = string;\n\n/**\n * This is a simple file\n */\nexport type SimpleFile = Blob | File;\n\n/**\n * This is a simple reference\n */\nexport type SimpleReference = ModelWithString;\n\n/**\n * This is a simple string\n */\nexport type SimpleStringWithPattern = string | null;\n\n/**\n * This is a simple enum with strings\n */\nexport type EnumWithStrings = 'Success' | 'Warning' | 'Error' | '\\'Single Quote\\'' | '\"Double Quotes\"' | 'Non-ascii: øæåôöØÆÅÔÖ字符串';\n\nexport type EnumWithReplacedCharacters = '\\'Single Quote\\'' | '\"Double Quotes\"' | 'øæåôöØÆÅÔÖ字符串' | 3.1 | '';\n\n/**\n * This is a simple enum with numbers\n */\nexport type EnumWithNumbers = 1 | 2 | 3 | 1.1 | 1.2 | 1.3 | 100 | 200 | 300 | -100 | -200 | -300 | -1.1 | -1.2 | -1.3;\n\n/**\n * Success=1,Warning=2,Error=3\n */\nexport type EnumFromDescription = number;\n\n/**\n * This is a simple enum with numbers\n */\nexport type EnumWithExtensions = 200 | 400 | 500;\n\nexport type EnumWithXEnumNames = 0 | 1 | 2;\n\n/**\n * This is a simple array with numbers\n */\nexport type ArrayWithNumbers = Array<number>;\n\n/**\n * This is a simple array with booleans\n */\nexport type ArrayWithBooleans = Array<boolean>;\n\n/**\n * This is a simple array with strings\n */\nexport type ArrayWithStrings = Array<string>;\n\n/**\n * This is a simple array with references\n */\nexport type ArrayWithReferences = Array<ModelWithString>;\n\n/**\n * This is a simple array containing an array\n */\nexport type ArrayWithArray = Array<Array<ModelWithString>>;\n\n/**\n * This is a simple array with properties\n */\nexport type ArrayWithProperties = Array<{\n    '16x16'?: CamelCaseCommentWithBreaks;\n    bar?: string;\n}>;\n\n/**\n * This is a simple array with any of properties\n */\nexport type ArrayWithAnyOfProperties = Array<{\n    foo?: string;\n} | {\n    bar?: string;\n}>;\n\nexport type AnyOfAnyAndNull = {\n    data?: unknown;\n};\n\n/**\n * This is a simple array with any of properties\n */\nexport type AnyOfArrays = {\n    results?: Array<{\n        foo?: string;\n    } | {\n        bar?: string;\n    }>;\n};\n\n/**\n * This is a string dictionary\n */\nexport type DictionaryWithString = {\n    [key: string]: string;\n};\n\nexport type DictionaryWithPropertiesAndAdditionalProperties = {\n    foo?: number;\n    bar?: boolean;\n    [key: string]: string | number | boolean | undefined;\n};\n\n/**\n * This is a string reference\n */\nexport type DictionaryWithReference = {\n    [key: string]: ModelWithString;\n};\n\n/**\n * This is a complex dictionary\n */\nexport type DictionaryWithArray = {\n    [key: string]: Array<ModelWithString>;\n};\n\n/**\n * This is a string dictionary\n */\nexport type DictionaryWithDictionary = {\n    [key: string]: {\n        [key: string]: string;\n    };\n};\n\n/**\n * This is a complex dictionary\n */\nexport type DictionaryWithProperties = {\n    [key: string]: {\n        foo?: string;\n        bar?: string;\n    };\n};\n\n/**\n * This is a model with one number property\n */\nexport type ModelWithInteger = {\n    /**\n     * This is a simple number property\n     */\n    prop?: number;\n};\n\n/**\n * This is a model with one boolean property\n */\nexport type ModelWithBoolean = {\n    /**\n     * This is a simple boolean property\n     */\n    prop?: boolean;\n};\n\n/**\n * This is a model with one string property\n */\nexport type ModelWithString = {\n    /**\n     * This is a simple string property\n     */\n    prop?: string;\n};\n\n/**\n * This is a model with one string property\n */\nexport type ModelWithStringError = {\n    /**\n     * This is a simple string property\n     */\n    prop?: string;\n};\n\n/**\n * `Comment` or `VoiceComment`. The JSON object for adding voice comments to tickets is different. See [Adding voice comments to tickets](/documentation/ticketing/managing-tickets/adding-voice-comments-to-tickets)\n */\nexport type ModelFromZendesk = string;\n\n/**\n * This is a model with one string property\n */\nexport type ModelWithNullableString = {\n    /**\n     * This is a simple string property\n     */\n    nullableProp1?: string | null;\n    /**\n     * This is a simple string property\n     */\n    nullableRequiredProp1: string | null;\n    /**\n     * This is a simple string property\n     */\n    nullableProp2?: string | null;\n    /**\n     * This is a simple string property\n     */\n    nullableRequiredProp2: string | null;\n    /**\n     * This is a simple enum with strings\n     */\n    'foo_bar-enum'?: 'Success' | 'Warning' | 'Error' | 'ØÆÅ字符串';\n};\n\n/**\n * This is a model with one enum\n */\nexport type ModelWithEnum = {\n    /**\n     * This is a simple enum with strings\n     */\n    'foo_bar-enum'?: 'Success' | 'Warning' | 'Error' | 'ØÆÅ字符串';\n    /**\n     * These are the HTTP error code enums\n     */\n    statusCode?: '100' | '200 FOO' | '300 FOO_BAR' | '400 foo-bar' | '500 foo.bar' | '600 foo&bar';\n    /**\n     * Simple boolean enum\n     */\n    bool?: true;\n};\n\n/**\n * This is a model with one enum with escaped name\n */\nexport type ModelWithEnumWithHyphen = {\n    /**\n     * Foo-Bar-Baz-Qux\n     */\n    'foo-bar-baz-qux'?: '3.0';\n};\n\n/**\n * This is a model with one enum\n */\nexport type ModelWithEnumFromDescription = {\n    /**\n     * Success=1,Warning=2,Error=3\n     */\n    test?: number;\n};\n\n/**\n * This is a model with nested enums\n */\nexport type ModelWithNestedEnums = {\n    dictionaryWithEnum?: {\n        [key: string]: 'Success' | 'Warning' | 'Error';\n    };\n    dictionaryWithEnumFromDescription?: {\n        [key: string]: number;\n    };\n    arrayWithEnum?: Array<'Success' | 'Warning' | 'Error'>;\n    arrayWithDescription?: Array<number>;\n    /**\n     * This is a simple enum with strings\n     */\n    'foo_bar-enum'?: 'Success' | 'Warning' | 'Error' | 'ØÆÅ字符串';\n};\n\n/**\n * This is a model with one property containing a reference\n */\nexport type ModelWithReference = {\n    prop?: ModelWithProperties;\n};\n\n/**\n * This is a model with one property containing an array\n */\nexport type ModelWithArrayReadOnlyAndWriteOnly = {\n    prop?: Array<ModelWithReadOnlyAndWriteOnly>;\n    propWithFile?: Array<Blob | File>;\n    propWithNumber?: Array<number>;\n};\n\n/**\n * This is a model with one property containing an array\n */\nexport type ModelWithArray = {\n    prop?: Array<ModelWithString>;\n    propWithFile?: Array<Blob | File>;\n    propWithNumber?: Array<number>;\n};\n\n/**\n * This is a model with one property containing a dictionary\n */\nexport type ModelWithDictionary = {\n    prop?: {\n        [key: string]: string;\n    };\n};\n\n/**\n * This is a deprecated model with a deprecated property\n *\n * @deprecated\n */\nexport type DeprecatedModel = {\n    /**\n     * This is a deprecated property\n     *\n     * @deprecated\n     */\n    prop?: string;\n};\n\n/**\n * This is a model with one property containing a circular reference\n */\nexport type ModelWithCircularReference = {\n    prop?: ModelWithCircularReference;\n};\n\n/**\n * This is a model with one property with a 'one of' relationship\n */\nexport type CompositionWithOneOf = {\n    propA?: ModelWithString | ModelWithEnum | ModelWithArray | ModelWithDictionary;\n};\n\n/**\n * This is a model with one property with a 'one of' relationship where the options are not $ref\n */\nexport type CompositionWithOneOfAnonymous = {\n    propA?: {\n        propA?: string;\n    } | string | number;\n};\n\n/**\n * Circle\n */\nexport type ModelCircle = {\n    kind: string;\n    radius?: number;\n};\n\n/**\n * Square\n */\nexport type ModelSquare = {\n    kind: string;\n    sideLength?: number;\n};\n\n/**\n * This is a model with one property with a 'one of' relationship where the options are not $ref\n */\nexport type CompositionWithOneOfDiscriminator = ({\n    kind: 'circle';\n} & ModelCircle) | ({\n    kind: 'square';\n} & ModelSquare);\n\n/**\n * This is a model with one property with a 'any of' relationship\n */\nexport type CompositionWithAnyOf = {\n    propA?: ModelWithString | ModelWithEnum | ModelWithArray | ModelWithDictionary;\n};\n\n/**\n * This is a model with one property with a 'any of' relationship where the options are not $ref\n */\nexport type CompositionWithAnyOfAnonymous = {\n    propA?: {\n        propA?: string;\n    } | string | number;\n};\n\n/**\n * This is a model with nested 'any of' property with a type null\n */\nexport type CompositionWithNestedAnyAndTypeNull = {\n    propA?: Array<ModelWithDictionary | null> | Array<ModelWithArray | null>;\n};\n\nexport type _3eNum1Период = 'Bird' | 'Dog';\n\nexport type ConstValue = 'ConstValue';\n\n/**\n * This is a model with one property with a 'any of' relationship where the options are not $ref\n */\nexport type CompositionWithNestedAnyOfAndNull = {\n    propA?: Array<_3eNum1Период | ConstValue> | null;\n};\n\n/**\n * This is a model with one property with a 'one of' relationship\n */\nexport type CompositionWithOneOfAndNullable = {\n    propA?: {\n        boolean?: boolean;\n    } | ModelWithEnum | ModelWithArray | ModelWithDictionary | null;\n};\n\n/**\n * This is a model that contains a simple dictionary within composition\n */\nexport type CompositionWithOneOfAndSimpleDictionary = {\n    propA?: boolean | {\n        [key: string]: number;\n    };\n};\n\n/**\n * This is a model that contains a dictionary of simple arrays within composition\n */\nexport type CompositionWithOneOfAndSimpleArrayDictionary = {\n    propA?: boolean | {\n        [key: string]: Array<boolean>;\n    };\n};\n\n/**\n * This is a model that contains a dictionary of complex arrays (composited) within composition\n */\nexport type CompositionWithOneOfAndComplexArrayDictionary = {\n    propA?: boolean | {\n        [key: string]: Array<number | string>;\n    };\n};\n\n/**\n * This is a model with one property with a 'all of' relationship\n */\nexport type CompositionWithAllOfAndNullable = {\n    propA?: ({\n        boolean?: boolean;\n    } & ModelWithEnum & ModelWithArray & ModelWithDictionary) | null;\n};\n\n/**\n * This is a model with one property with a 'any of' relationship\n */\nexport type CompositionWithAnyOfAndNullable = {\n    propA?: {\n        boolean?: boolean;\n    } | ModelWithEnum | ModelWithArray | ModelWithDictionary | null;\n};\n\n/**\n * This is a base model with two simple optional properties\n */\nexport type CompositionBaseModel = {\n    firstName?: string;\n    lastname?: string;\n};\n\n/**\n * This is a model that extends the base model\n */\nexport type CompositionExtendedModel = CompositionBaseModel & {\n    age: number;\n    firstName: string;\n    lastname: string;\n};\n\n/**\n * This is a model with one nested property\n */\nexport type ModelWithProperties = {\n    required: string;\n    readonly requiredAndReadOnly: string;\n    requiredAndNullable: string | null;\n    string?: string;\n    number?: number;\n    boolean?: boolean;\n    reference?: ModelWithString;\n    'property with space'?: string;\n    default?: string;\n    try?: string;\n    readonly '@namespace.string'?: string;\n    readonly '@namespace.integer'?: number;\n};\n\n/**\n * This is a model with one nested property\n */\nexport type ModelWithNestedProperties = {\n    readonly first: {\n        readonly second: {\n            readonly third: string | null;\n        } | null;\n    } | null;\n};\n\n/**\n * This is a model with duplicated properties\n */\nexport type ModelWithDuplicateProperties = {\n    prop?: ModelWithString;\n};\n\n/**\n * This is a model with ordered properties\n */\nexport type ModelWithOrderedProperties = {\n    zebra?: string;\n    apple?: string;\n    hawaii?: string;\n};\n\n/**\n * This is a model with duplicated imports\n */\nexport type ModelWithDuplicateImports = {\n    propA?: ModelWithString;\n    propB?: ModelWithString;\n    propC?: ModelWithString;\n};\n\n/**\n * This is a model that extends another model\n */\nexport type ModelThatExtends = ModelWithString & {\n    propExtendsA?: string;\n    propExtendsB?: ModelWithString;\n};\n\n/**\n * This is a model that extends another model\n */\nexport type ModelThatExtendsExtends = ModelWithString & ModelThatExtends & {\n    propExtendsC?: string;\n    propExtendsD?: ModelWithString;\n};\n\n/**\n * This is a model that contains a some patterns\n */\nexport type ModelWithPattern = {\n    key: string;\n    name: string;\n    readonly enabled?: boolean;\n    readonly modified?: string;\n    id?: string;\n    text?: string;\n    patternWithSingleQuotes?: string;\n    patternWithNewline?: string;\n    patternWithBacktick?: string;\n    patternWithUnicode?: string;\n};\n\nexport type File = {\n    /**\n     * Id\n     */\n    readonly id?: string;\n    /**\n     * Updated at\n     */\n    readonly updated_at?: string;\n    /**\n     * Created at\n     */\n    readonly created_at?: string;\n    /**\n     * Mime\n     */\n    mime: string;\n    /**\n     * File\n     */\n    readonly file?: string;\n};\n\nexport type Default = {\n    name?: string;\n};\n\nexport type Pageable = {\n    page?: number;\n    size?: number;\n    sort?: Array<string>;\n};\n\n/**\n * This is a free-form object without additionalProperties.\n */\nexport type FreeFormObjectWithoutAdditionalProperties = {\n    [key: string]: unknown;\n};\n\n/**\n * This is a free-form object with additionalProperties: true.\n */\nexport type FreeFormObjectWithAdditionalPropertiesEqTrue = {\n    [key: string]: unknown;\n};\n\n/**\n * This is a free-form object with additionalProperties: {}.\n */\nexport type FreeFormObjectWithAdditionalPropertiesEqEmptyObject = {\n    [key: string]: unknown;\n};\n\nexport type ModelWithConst = {\n    String?: 'String';\n    number?: 0;\n    null?: unknown;\n    withType?: 'Some string';\n};\n\n/**\n * This is a model with one property and additionalProperties: true\n */\nexport type ModelWithAdditionalPropertiesEqTrue = {\n    /**\n     * This is a simple string property\n     */\n    prop?: string;\n    [key: string]: unknown;\n};\n\nexport type NestedAnyOfArraysNullable = {\n    nullableArray?: Array<string | boolean> | null;\n};\n\nexport type CompositionWithOneOfAndProperties = ({\n    foo: SimpleParameter;\n} | {\n    bar: NonAsciiStringæøåÆøÅöôêÊ字符串;\n}) & {\n    baz: number | null;\n    qux: number;\n};\n\n/**\n * An object that can be null\n */\nexport type NullableObject = {\n    foo?: string;\n} | null;\n\n/**\n * Some % character\n */\nexport type CharactersInDescription = string;\n\nexport type ModelWithNullableObject = {\n    data?: NullableObject;\n};\n\n/**\n * An object with additional properties that can be null\n */\nexport type ModelWithAdditionalPropertiesRef = {\n    [key: string]: NullableObject | null;\n};\n\nexport type ModelWithOneOfEnum = {\n    foo: 'Bar';\n} | {\n    foo: 'Baz';\n} | {\n    foo: 'Qux';\n} | {\n    content: string;\n    foo: 'Quux';\n} | {\n    content: [\n        string,\n        string\n    ];\n    foo: 'Corge';\n};\n\nexport type ModelWithNestedArrayEnumsDataFoo = 'foo' | 'bar';\n\nexport type ModelWithNestedArrayEnumsDataBar = 'baz' | 'qux';\n\nexport type ModelWithNestedArrayEnumsData = {\n    foo?: Array<ModelWithNestedArrayEnumsDataFoo>;\n    bar?: Array<ModelWithNestedArrayEnumsDataBar>;\n};\n\nexport type ModelWithNestedArrayEnums = {\n    array_strings?: Array<string>;\n    data?: ModelWithNestedArrayEnumsData;\n};\n\nexport type ModelWithNestedCompositionEnums = {\n    foo?: ModelWithNestedArrayEnumsDataFoo;\n};\n\nexport type ModelWithReadOnlyAndWriteOnly = {\n    foo: string;\n    readonly bar: string;\n};\n\nexport type ModelWithConstantSizeArray = [\n    number,\n    number\n];\n\nexport type ModelWithAnyOfConstantSizeArray = [\n    number | string,\n    number | string,\n    number | string\n];\n\nexport type ModelWithPrefixItemsConstantSizeArray = Array<ModelWithInteger | number | string>;\n\nexport type ModelWithAnyOfConstantSizeArrayNullable = [\n    number | null | string,\n    number | null | string,\n    number | null | string\n];\n\nexport type ModelWithAnyOfConstantSizeArrayWithNSizeAndOptions = [\n    number | Import,\n    number | Import\n];\n\nexport type ModelWithAnyOfConstantSizeArrayAndIntersect = [\n    number & string,\n    number & string\n];\n\nexport type ModelWithNumericEnumUnion = {\n    /**\n     * Период\n     */\n    value?: -10 | -1 | 0 | 1 | 3 | 6 | 12;\n};\n\n/**\n * Some description with `back ticks`\n */\nexport type ModelWithBackticksInDescription = {\n    /**\n     * The template `that` should be used for parsing and importing the contents of the CSV file.\n     *\n     * <br/><p>There is one placeholder currently supported:<ul>     <li><b>${x}</b> - refers to the n-th column in the CSV file, e.g. ${1}, ${2}, ...)</li></ul><p>Example of a correct JSON template:</p>\n     * <pre>\n     * [\n     * {\n     * \"resourceType\": \"Asset\",\n     * \"identifier\": {\n     * \"name\": \"${1}\",\n     * \"domain\": {\n     * \"name\": \"${2}\",\n     * \"community\": {\n     * \"name\": \"Some Community\"\n     * }\n     * }\n     * },\n     * \"attributes\" : {\n     * \"00000000-0000-0000-0000-000000003115\" : [ {\n     * \"value\" : \"${3}\"\n     * } ],\n     * \"00000000-0000-0000-0000-000000000222\" : [ {\n     * \"value\" : \"${4}\"\n     * } ]\n     * }\n     * }\n     * ]\n     * </pre>\n     */\n    template?: string;\n};\n\nexport type ModelWithOneOfAndProperties = (SimpleParameter | NonAsciiStringæøåÆøÅöôêÊ字符串) & {\n    baz: number | null;\n    qux: number;\n};\n\n/**\n * Model used to test deduplication strategy (unused)\n */\nexport type ParameterSimpleParameterUnused = string;\n\n/**\n * Model used to test deduplication strategy\n */\nexport type PostServiceWithEmptyTagResponse = string;\n\n/**\n * Model used to test deduplication strategy\n */\nexport type PostServiceWithEmptyTagResponse2 = string;\n\n/**\n * Model used to test deduplication strategy\n */\nexport type DeleteFooData = string;\n\n/**\n * Model used to test deduplication strategy\n */\nexport type DeleteFooData2 = string;\n\n/**\n * Model with restricted keyword name\n */\nexport type Import = string;\n\nexport type SchemaWithFormRestrictedKeys = {\n    description?: string;\n    'x-enum-descriptions'?: string;\n    'x-enum-varnames'?: string;\n    'x-enumNames'?: string;\n    title?: string;\n    object?: {\n        description?: string;\n        'x-enum-descriptions'?: string;\n        'x-enum-varnames'?: string;\n        'x-enumNames'?: string;\n        title?: string;\n    };\n    array?: Array<{\n        description?: string;\n        'x-enum-descriptions'?: string;\n        'x-enum-varnames'?: string;\n        'x-enumNames'?: string;\n        title?: string;\n    }>;\n};\n\n/**\n * This schema was giving PascalCase transformations a hard time\n */\nexport type IoK8sApimachineryPkgApisMetaV1DeleteOptions = {\n    /**\n     * Must be fulfilled before a deletion is carried out. If not possible, a 409 Conflict status will be returned.\n     */\n    preconditions?: IoK8sApimachineryPkgApisMetaV1Preconditions;\n};\n\n/**\n * This schema was giving PascalCase transformations a hard time\n */\nexport type IoK8sApimachineryPkgApisMetaV1Preconditions = {\n    /**\n     * Specifies the target ResourceVersion\n     */\n    resourceVersion?: string;\n    /**\n     * Specifies the target UID.\n     */\n    uid?: string;\n};\n\nexport type AdditionalPropertiesUnknownIssue = {\n    [key: string]: string | number;\n};\n\nexport type AdditionalPropertiesUnknownIssue2 = {\n    [key: string]: string | number;\n};\n\nexport type AdditionalPropertiesUnknownIssue3 = string & {\n    entries: {\n        [key: string]: AdditionalPropertiesUnknownIssue;\n    };\n};\n\nexport type AdditionalPropertiesIntegerIssue = {\n    value: number;\n    [key: string]: number;\n};\n\nexport type OneOfAllOfIssue = ((ConstValue | GenericSchemaDuplicateIssue1SystemBoolean) & _3eNum1Период) | GenericSchemaDuplicateIssue1SystemString;\n\nexport type GenericSchemaDuplicateIssue1SystemBoolean = {\n    item?: boolean;\n    error?: string | null;\n    readonly hasError?: boolean;\n    data?: {\n        [key: string]: never;\n    };\n};\n\nexport type GenericSchemaDuplicateIssue1SystemString = {\n    item?: string | null;\n    error?: string | null;\n    readonly hasError?: boolean;\n};\n\nexport type ExternalSharedModel = {\n    id: string;\n    name?: string;\n};\n\n/**\n * This is a model with one property containing a reference\n */\nexport type ModelWithReferenceWritable = {\n    prop?: ModelWithPropertiesWritable;\n};\n\n/**\n * This is a model with one property containing an array\n */\nexport type ModelWithArrayReadOnlyAndWriteOnlyWritable = {\n    prop?: Array<ModelWithReadOnlyAndWriteOnlyWritable>;\n    propWithFile?: Array<Blob | File>;\n    propWithNumber?: Array<number>;\n};\n\n/**\n * This is a model with one nested property\n */\nexport type ModelWithPropertiesWritable = {\n    required: string;\n    requiredAndNullable: string | null;\n    string?: string;\n    number?: number;\n    boolean?: boolean;\n    reference?: ModelWithString;\n    'property with space'?: string;\n    default?: string;\n    try?: string;\n};\n\n/**\n * This is a model that contains a some patterns\n */\nexport type ModelWithPatternWritable = {\n    key: string;\n    name: string;\n    id?: string;\n    text?: string;\n    patternWithSingleQuotes?: string;\n    patternWithNewline?: string;\n    patternWithBacktick?: string;\n    patternWithUnicode?: string;\n};\n\nexport type FileWritable = {\n    /**\n     * Mime\n     */\n    mime: string;\n};\n\nexport type ModelWithReadOnlyAndWriteOnlyWritable = {\n    foo: string;\n    baz: string;\n};\n\nexport type ModelWithAnyOfConstantSizeArrayWithNSizeAndOptionsWritable = [\n    number | Import,\n    number | Import\n];\n\nexport type AdditionalPropertiesUnknownIssueWritable = {\n    [key: string]: string | number;\n};\n\nexport type OneOfAllOfIssueWritable = ((ConstValue | GenericSchemaDuplicateIssue1SystemBoolean) & _3eNum1Период) | GenericSchemaDuplicateIssue1SystemString;\n\nexport type GenericSchemaDuplicateIssue1SystemBooleanWritable = {\n    item?: boolean;\n    error?: string | null;\n    data?: {\n        [key: string]: never;\n    };\n};\n\nexport type GenericSchemaDuplicateIssue1SystemStringWritable = {\n    item?: string | null;\n    error?: string | null;\n};\n\n/**\n * This is a reusable parameter\n */\nexport type SimpleParameter = string;\n\n/**\n * Parameter with illegal characters\n */\nexport type XFooBar = ModelWithString;\n\nexport type SimpleRequestBody = ModelWithString;\n\nexport type SimpleFormData = ModelWithString;\n\nexport type ExportData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no+tag';\n};\n\nexport type PatchApiVbyApiVersionNoTagData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no+tag';\n};\n\nexport type PatchApiVbyApiVersionNoTagResponses = {\n    /**\n     * OK\n     */\n    default: unknown;\n};\n\nexport type ImportData = {\n    body: ModelWithReadOnlyAndWriteOnlyWritable | ModelWithArrayReadOnlyAndWriteOnlyWritable;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no+tag';\n};\n\nexport type ImportResponses = {\n    /**\n     * Success\n     */\n    200: ModelFromZendesk;\n    /**\n     * Default success response\n     */\n    default: ModelWithReadOnlyAndWriteOnly;\n};\n\nexport type ImportResponse = ImportResponses[keyof ImportResponses];\n\nexport type FooWowData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no+tag';\n};\n\nexport type FooWowResponses = {\n    /**\n     * OK\n     */\n    default: unknown;\n};\n\nexport type ApiVVersionODataControllerCountData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple/$count';\n};\n\nexport type ApiVVersionODataControllerCountResponses = {\n    /**\n     * Success\n     */\n    200: ModelFromZendesk;\n};\n\nexport type ApiVVersionODataControllerCountResponse = ApiVVersionODataControllerCountResponses[keyof ApiVVersionODataControllerCountResponses];\n\nexport type GetApiVbyApiVersionSimpleOperationData = {\n    body?: never;\n    path: {\n        /**\n         * foo in method\n         */\n        foo_param: string;\n    };\n    query?: never;\n    url: '/api/v{api-version}/simple:operation';\n};\n\nexport type GetApiVbyApiVersionSimpleOperationErrors = {\n    /**\n     * Default error response\n     */\n    default: ModelWithBoolean;\n};\n\nexport type GetApiVbyApiVersionSimpleOperationError = GetApiVbyApiVersionSimpleOperationErrors[keyof GetApiVbyApiVersionSimpleOperationErrors];\n\nexport type GetApiVbyApiVersionSimpleOperationResponses = {\n    /**\n     * Response is a simple number\n     */\n    200: number;\n};\n\nexport type GetApiVbyApiVersionSimpleOperationResponse = GetApiVbyApiVersionSimpleOperationResponses[keyof GetApiVbyApiVersionSimpleOperationResponses];\n\nexport type DeleteCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type GetCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type HeadCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type OptionsCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type PatchCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type PostCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type PutCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type DeleteFooData3 = {\n    body?: never;\n    headers: {\n        /**\n         * Parameter with illegal characters\n         */\n        'x-Foo-Bar': ModelWithString;\n    };\n    path: {\n        /**\n         * foo in method\n         */\n        foo_param: string;\n        /**\n         * bar in method\n         */\n        BarParam: string;\n    };\n    query?: never;\n    url: '/api/v{api-version}/foo/{foo_param}/bar/{BarParam}';\n};\n\nexport type CallWithDescriptionsData = {\n    body?: never;\n    path?: never;\n    query?: {\n        /**\n         * Testing multiline comments in string: First line\n         * Second line\n         *\n         * Fourth line\n         */\n        parameterWithBreaks?: string;\n        /**\n         * Testing backticks in string: `backticks` and ```multiple backticks``` should work\n         */\n        parameterWithBackticks?: string;\n        /**\n         * Testing slashes in string: \\backwards\\\\\\ and /forwards/// should work\n         */\n        parameterWithSlashes?: string;\n        /**\n         * Testing expression placeholders in string: ${expression} should work\n         */\n        parameterWithExpressionPlaceholders?: string;\n        /**\n         * Testing quotes in string: 'single quote''' and \"double quotes\"\"\" should work\n         */\n        parameterWithQuotes?: string;\n        /**\n         * Testing reserved characters in string: * inline * and ** inline ** should work\n         */\n        parameterWithReservedCharacters?: string;\n    };\n    url: '/api/v{api-version}/descriptions';\n};\n\nexport type DeprecatedCallData = {\n    body?: never;\n    headers: {\n        /**\n         * This parameter is deprecated\n         *\n         * @deprecated\n         */\n        parameter: DeprecatedModel | null;\n    };\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/parameters/deprecated';\n};\n\nexport type CallWithParametersData = {\n    /**\n     * This is the parameter that goes into the body\n     */\n    body: {\n        [key: string]: unknown;\n    } | null;\n    headers: {\n        /**\n         * This is the parameter that goes into the header\n         */\n        parameterHeader: string | null;\n    };\n    path: {\n        /**\n         * This is the parameter that goes into the path\n         */\n        parameterPath: string | null;\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string | null;\n    };\n    query: {\n        foo_ref_enum?: ModelWithNestedArrayEnumsDataFoo;\n        foo_all_of_enum: ModelWithNestedArrayEnumsDataFoo;\n        /**\n         * This is the parameter that goes into the query params\n         */\n        cursor: string | null;\n    };\n    url: '/api/v{api-version}/parameters/{parameterPath}';\n};\n\nexport type CallWithWeirdParameterNamesData = {\n    /**\n     * This is the parameter that goes into the body\n     */\n    body: ModelWithString | null;\n    headers: {\n        /**\n         * This is the parameter that goes into the request header\n         */\n        'parameter.header': string | null;\n    };\n    path: {\n        /**\n         * This is the parameter that goes into the path\n         */\n        'parameter.path.1'?: string;\n        /**\n         * This is the parameter that goes into the path\n         */\n        'parameter-path-2'?: string;\n        /**\n         * This is the parameter that goes into the path\n         */\n        'PARAMETER-PATH-3'?: string;\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string | null;\n    };\n    query: {\n        /**\n         * This is the parameter with a reserved keyword\n         */\n        default?: string;\n        /**\n         * This is the parameter that goes into the request query params\n         */\n        'parameter-query': string | null;\n    };\n    url: '/api/v{api-version}/parameters/{parameter.path.1}/{parameter-path-2}/{PARAMETER-PATH-3}';\n};\n\nexport type GetCallWithOptionalParamData = {\n    /**\n     * This is a required parameter\n     */\n    body: ModelWithOneOfEnum;\n    path?: never;\n    query?: {\n        /**\n         * This is an optional parameter\n         */\n        page?: number;\n    };\n    url: '/api/v{api-version}/parameters';\n};\n\nexport type PostCallWithOptionalParamData = {\n    /**\n     * This is an optional parameter\n     */\n    body?: {\n        offset?: number | null;\n    };\n    path?: never;\n    query: {\n        /**\n         * This is a required parameter\n         */\n        parameter: Pageable;\n    };\n    url: '/api/v{api-version}/parameters';\n};\n\nexport type PostCallWithOptionalParamResponses = {\n    /**\n     * Response is a simple number\n     */\n    200: number;\n    /**\n     * Success\n     */\n    204: void;\n};\n\nexport type PostCallWithOptionalParamResponse = PostCallWithOptionalParamResponses[keyof PostCallWithOptionalParamResponses];\n\nexport type PostApiVbyApiVersionRequestBodyData = {\n    /**\n     * A reusable request body\n     */\n    body?: SimpleRequestBody;\n    path?: never;\n    query?: {\n        /**\n         * This is a reusable parameter\n         */\n        parameter?: string;\n    };\n    url: '/api/v{api-version}/requestBody';\n};\n\nexport type PostApiVbyApiVersionFormDataData = {\n    /**\n     * A reusable request body\n     */\n    body?: SimpleFormData;\n    path?: never;\n    query?: {\n        /**\n         * This is a reusable parameter\n         */\n        parameter?: string;\n    };\n    url: '/api/v{api-version}/formData';\n};\n\nexport type CallWithDefaultParametersData = {\n    body?: never;\n    path?: never;\n    query?: {\n        /**\n         * This is a simple string with default value\n         */\n        parameterString?: string | null;\n        /**\n         * This is a simple number with default value\n         */\n        parameterNumber?: number | null;\n        /**\n         * This is a simple boolean with default value\n         */\n        parameterBoolean?: boolean | null;\n        /**\n         * This is a simple enum with default value\n         */\n        parameterEnum?: 'Success' | 'Warning' | 'Error';\n        /**\n         * This is a simple model with default value\n         */\n        parameterModel?: ModelWithString | null;\n    };\n    url: '/api/v{api-version}/defaults';\n};\n\nexport type CallWithDefaultOptionalParametersData = {\n    body?: never;\n    path?: never;\n    query?: {\n        /**\n         * This is a simple string that is optional with default value\n         */\n        parameterString?: string;\n        /**\n         * This is a simple number that is optional with default value\n         */\n        parameterNumber?: number;\n        /**\n         * This is a simple boolean that is optional with default value\n         */\n        parameterBoolean?: boolean;\n        /**\n         * This is a simple enum that is optional with default value\n         */\n        parameterEnum?: 'Success' | 'Warning' | 'Error';\n        /**\n         * This is a simple model that is optional with default value\n         */\n        parameterModel?: ModelWithString;\n    };\n    url: '/api/v{api-version}/defaults';\n};\n\nexport type CallToTestOrderOfParamsData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * This is a optional string with default\n         */\n        parameterOptionalStringWithDefault?: string;\n        /**\n         * This is a optional string with empty default\n         */\n        parameterOptionalStringWithEmptyDefault?: string;\n        /**\n         * This is a optional string with no default\n         */\n        parameterOptionalStringWithNoDefault?: string;\n        /**\n         * This is a string with default\n         */\n        parameterStringWithDefault: string;\n        /**\n         * This is a string with empty default\n         */\n        parameterStringWithEmptyDefault: string;\n        /**\n         * This is a string with no default\n         */\n        parameterStringWithNoDefault: string;\n        /**\n         * This is a string that can be null with no default\n         */\n        parameterStringNullableWithNoDefault?: string | null;\n        /**\n         * This is a string that can be null with default\n         */\n        parameterStringNullableWithDefault?: string | null;\n    };\n    url: '/api/v{api-version}/defaults';\n};\n\nexport type DuplicateNameData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/duplicate';\n};\n\nexport type DuplicateName2Data = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/duplicate';\n};\n\nexport type DuplicateName3Data = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/duplicate';\n};\n\nexport type DuplicateName4Data = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/duplicate';\n};\n\nexport type CallWithNoContentResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no-content';\n};\n\nexport type CallWithNoContentResponseResponses = {\n    /**\n     * Success\n     */\n    204: void;\n};\n\nexport type CallWithNoContentResponseResponse = CallWithNoContentResponseResponses[keyof CallWithNoContentResponseResponses];\n\nexport type CallWithResponseAndNoContentResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multiple-tags/response-and-no-content';\n};\n\nexport type CallWithResponseAndNoContentResponseResponses = {\n    /**\n     * Response is a simple number\n     */\n    200: number;\n    /**\n     * Success\n     */\n    204: void;\n};\n\nexport type CallWithResponseAndNoContentResponseResponse = CallWithResponseAndNoContentResponseResponses[keyof CallWithResponseAndNoContentResponseResponses];\n\nexport type DummyAData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multiple-tags/a';\n};\n\nexport type DummyAResponses = {\n    200: _400;\n};\n\nexport type DummyAResponse = DummyAResponses[keyof DummyAResponses];\n\nexport type DummyBData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multiple-tags/b';\n};\n\nexport type DummyBResponses = {\n    /**\n     * Success\n     */\n    204: void;\n};\n\nexport type DummyBResponse = DummyBResponses[keyof DummyBResponses];\n\nexport type CallWithResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/response';\n};\n\nexport type CallWithResponseResponses = {\n    default: Import;\n};\n\nexport type CallWithResponseResponse = CallWithResponseResponses[keyof CallWithResponseResponses];\n\nexport type CallWithDuplicateResponsesData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/response';\n};\n\nexport type CallWithDuplicateResponsesErrors = {\n    /**\n     * Message for 500 error\n     */\n    500: ModelWithStringError;\n    /**\n     * Message for 501 error\n     */\n    501: ModelWithStringError;\n    /**\n     * Message for 502 error\n     */\n    502: ModelWithStringError;\n    /**\n     * Message for 4XX errors\n     */\n    '4XX': DictionaryWithArray;\n    /**\n     * Default error response\n     */\n    default: ModelWithBoolean;\n};\n\nexport type CallWithDuplicateResponsesError = CallWithDuplicateResponsesErrors[keyof CallWithDuplicateResponsesErrors];\n\nexport type CallWithDuplicateResponsesResponses = {\n    /**\n     * Message for 200 response\n     */\n    200: ModelWithBoolean & ModelWithInteger;\n    /**\n     * Message for 201 response\n     */\n    201: ModelWithString;\n    /**\n     * Message for 202 response\n     */\n    202: ModelWithString;\n};\n\nexport type CallWithDuplicateResponsesResponse = CallWithDuplicateResponsesResponses[keyof CallWithDuplicateResponsesResponses];\n\nexport type CallWithResponsesData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/response';\n};\n\nexport type CallWithResponsesErrors = {\n    /**\n     * Message for 500 error\n     */\n    500: ModelWithStringError;\n    /**\n     * Message for 501 error\n     */\n    501: ModelWithStringError;\n    /**\n     * Message for 502 error\n     */\n    502: ModelWithStringError;\n    /**\n     * Message for default response\n     */\n    default: ModelWithStringError;\n};\n\nexport type CallWithResponsesError = CallWithResponsesErrors[keyof CallWithResponsesErrors];\n\nexport type CallWithResponsesResponses = {\n    /**\n     * Message for 200 response\n     */\n    200: {\n        readonly '@namespace.string'?: string;\n        readonly '@namespace.integer'?: number;\n        readonly value?: Array<ModelWithString>;\n    };\n    /**\n     * Message for 201 response\n     */\n    201: ModelThatExtends;\n    /**\n     * Message for 202 response\n     */\n    202: ModelThatExtendsExtends;\n};\n\nexport type CallWithResponsesResponse = CallWithResponsesResponses[keyof CallWithResponsesResponses];\n\nexport type CollectionFormatData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * This is an array parameter that is sent as csv format (comma-separated values)\n         */\n        parameterArrayCSV: Array<string> | null;\n        /**\n         * This is an array parameter that is sent as ssv format (space-separated values)\n         */\n        parameterArraySSV: Array<string> | null;\n        /**\n         * This is an array parameter that is sent as tsv format (tab-separated values)\n         */\n        parameterArrayTSV: Array<string> | null;\n        /**\n         * This is an array parameter that is sent as pipes format (pipe-separated values)\n         */\n        parameterArrayPipes: Array<string> | null;\n        /**\n         * This is an array parameter that is sent as multi format (multiple parameter instances)\n         */\n        parameterArrayMulti: Array<string> | null;\n    };\n    url: '/api/v{api-version}/collectionFormat';\n};\n\nexport type TypesData = {\n    body?: never;\n    path?: {\n        /**\n         * This is a number parameter\n         */\n        id?: number;\n    };\n    query: {\n        /**\n         * This is a number parameter\n         */\n        parameterNumber: number;\n        /**\n         * This is a string parameter\n         */\n        parameterString: string | null;\n        /**\n         * This is a boolean parameter\n         */\n        parameterBoolean: boolean | null;\n        /**\n         * This is an object parameter\n         */\n        parameterObject: {\n            [key: string]: unknown;\n        } | null;\n        /**\n         * This is an array parameter\n         */\n        parameterArray: Array<string> | null;\n        /**\n         * This is a dictionary parameter\n         */\n        parameterDictionary: {\n            [key: string]: unknown;\n        } | null;\n        /**\n         * This is an enum parameter\n         */\n        parameterEnum: 'Success' | 'Warning' | 'Error';\n    };\n    url: '/api/v{api-version}/types';\n};\n\nexport type TypesResponses = {\n    /**\n     * Response is a simple number\n     */\n    200: number;\n    /**\n     * Response is a simple string\n     */\n    201: string;\n    /**\n     * Response is a simple boolean\n     */\n    202: boolean;\n    /**\n     * Response is a simple object\n     */\n    203: {\n        [key: string]: unknown;\n    };\n};\n\nexport type TypesResponse = TypesResponses[keyof TypesResponses];\n\nexport type UploadFileData = {\n    body: Blob | File;\n    path: {\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string | null;\n    };\n    query?: never;\n    url: '/api/v{api-version}/upload';\n};\n\nexport type UploadFileResponses = {\n    200: boolean;\n};\n\nexport type UploadFileResponse = UploadFileResponses[keyof UploadFileResponses];\n\nexport type FileResponseData = {\n    body?: never;\n    path: {\n        id: string;\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string;\n    };\n    query?: never;\n    url: '/api/v{api-version}/file/{id}';\n};\n\nexport type FileResponseResponses = {\n    /**\n     * Success\n     */\n    200: Blob | File;\n};\n\nexport type FileResponseResponse = FileResponseResponses[keyof FileResponseResponses];\n\nexport type ComplexTypesData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * Parameter containing object\n         */\n        parameterObject: {\n            first?: {\n                second?: {\n                    third?: string;\n                };\n            };\n        };\n        /**\n         * Parameter containing reference\n         */\n        parameterReference: ModelWithString;\n    };\n    url: '/api/v{api-version}/complex';\n};\n\nexport type ComplexTypesErrors = {\n    /**\n     * 400 `server` error\n     */\n    400: unknown;\n    /**\n     * 500 server error\n     */\n    500: unknown;\n};\n\nexport type ComplexTypesResponses = {\n    /**\n     * Successful response\n     */\n    200: Array<ModelWithString>;\n};\n\nexport type ComplexTypesResponse = ComplexTypesResponses[keyof ComplexTypesResponses];\n\nexport type MultipartResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multipart';\n};\n\nexport type MultipartResponseResponses = {\n    /**\n     * OK\n     */\n    200: {\n        file?: Blob | File;\n        metadata?: {\n            foo?: string;\n            bar?: string;\n        };\n    };\n};\n\nexport type MultipartResponseResponse = MultipartResponseResponses[keyof MultipartResponseResponses];\n\nexport type MultipartRequestData = {\n    body?: {\n        content?: Blob | File;\n        data?: ModelWithString | null;\n    };\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multipart';\n};\n\nexport type ComplexParamsData = {\n    body?: {\n        readonly key: string | null;\n        name: string | null;\n        enabled?: boolean;\n        type: 'Monkey' | 'Horse' | 'Bird';\n        listOfModels?: Array<ModelWithString> | null;\n        listOfStrings?: Array<string> | null;\n        parameters: ModelWithString | ModelWithEnum | ModelWithArray | ModelWithDictionary;\n        readonly user?: {\n            readonly id?: number;\n            readonly name?: string | null;\n        };\n    };\n    path: {\n        id: number;\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string;\n    };\n    query?: never;\n    url: '/api/v{api-version}/complex/{id}';\n};\n\nexport type ComplexParamsResponses = {\n    /**\n     * Success\n     */\n    200: ModelWithString;\n};\n\nexport type ComplexParamsResponse = ComplexParamsResponses[keyof ComplexParamsResponses];\n\nexport type CallWithResultFromHeaderData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/header';\n};\n\nexport type CallWithResultFromHeaderErrors = {\n    /**\n     * 400 server error\n     */\n    400: unknown;\n    /**\n     * 500 server error\n     */\n    500: unknown;\n};\n\nexport type CallWithResultFromHeaderResponses = {\n    /**\n     * Successful response\n     */\n    200: unknown;\n};\n\nexport type TestErrorCodeData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * Status code to return\n         */\n        status: number;\n    };\n    url: '/api/v{api-version}/error';\n};\n\nexport type TestErrorCodeErrors = {\n    /**\n     * Custom message: Internal Server Error\n     */\n    500: unknown;\n    /**\n     * Custom message: Not Implemented\n     */\n    501: unknown;\n    /**\n     * Custom message: Bad Gateway\n     */\n    502: unknown;\n    /**\n     * Custom message: Service Unavailable\n     */\n    503: unknown;\n};\n\nexport type TestErrorCodeResponses = {\n    /**\n     * Custom message: Successful response\n     */\n    200: unknown;\n};\n\nexport type NonAsciiæøåÆøÅöôêÊ字符串Data = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * Dummy input param\n         */\n        nonAsciiParamæøåÆØÅöôêÊ: number;\n    };\n    url: '/api/v{api-version}/non-ascii-æøåÆØÅöôêÊ字符串';\n};\n\nexport type NonAsciiæøåÆøÅöôêÊ字符串Responses = {\n    /**\n     * Successful response\n     */\n    200: Array<NonAsciiStringæøåÆøÅöôêÊ字符串>;\n};\n\nexport type NonAsciiæøåÆøÅöôêÊ字符串Response = NonAsciiæøåÆøÅöôêÊ字符串Responses[keyof NonAsciiæøåÆøÅöôêÊ字符串Responses];\n\nexport type PutWithFormUrlEncodedData = {\n    body: ArrayWithStrings;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/non-ascii-æøåÆØÅöôêÊ字符串';\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@hey-api/client-fetch/sdk-nested-classes/client/client.gen.ts",
    "content": "// 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 (options: RequestOptions) => {\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 url = buildUrl(opts);\n\n    return { opts, url };\n  };\n\n  const request: Client['request'] = async (options) => {\n    // @ts-expect-error\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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@hey-api/client-fetch/sdk-nested-classes/client/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type { Auth } from '../core/auth.gen';\nexport type { QuerySerializerOptions } from '../core/bodySerializer.gen';\nexport {\n  formDataBodySerializer,\n  jsonBodySerializer,\n  urlSearchParamsBodySerializer,\n} from '../core/bodySerializer.gen';\nexport { buildClientParams } from '../core/params.gen';\nexport { serializeQueryKeyValue } from '../core/queryKeySerializer.gen';\nexport { createClient } from './client.gen';\nexport type {\n  Client,\n  ClientOptions,\n  Config,\n  CreateClientConfig,\n  Options,\n  RequestOptions,\n  RequestResult,\n  ResolvedRequestOptions,\n  ResponseStyle,\n  TDataShape,\n} from './types.gen';\nexport { createConfig, mergeHeaders } from './utils.gen';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@hey-api/client-fetch/sdk-nested-classes/client/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { Auth } from '../core/auth.gen';\nimport type {\n  ServerSentEventsOptions,\n  ServerSentEventsResult,\n} from '../core/serverSentEvents.gen';\nimport type { Client as CoreClient, Config as CoreConfig } from '../core/types.gen';\nimport type { Middleware } from './utils.gen';\n\nexport type ResponseStyle = 'data' | 'fields';\n\nexport interface Config<T extends ClientOptions = ClientOptions>\n  extends Omit<RequestInit, 'body' | 'headers' | 'method'>, CoreConfig {\n  /**\n   * Base URL for all requests made by this client.\n   */\n  baseUrl?: T['baseUrl'];\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   * Please don't use the Fetch client for Next.js applications. The `next`\n   * options won't have any effect.\n   *\n   * Install {@link https://www.npmjs.com/package/@hey-api/client-next `@hey-api/client-next`} instead.\n   */\n  next?: never;\n  /**\n   * Return the response data parsed in a specified format. By default, `auto`\n   * will infer the appropriate method from the `Content-Type` response header.\n   * You can override this behavior with any of the {@link Body} methods.\n   * Select `stream` if you don't want to parse response data at all.\n   *\n   * @default 'auto'\n   */\n  parseAs?: 'arrayBuffer' | 'auto' | 'blob' | 'formData' | 'json' | 'stream' | 'text';\n  /**\n   * Should we return only data or multiple fields (data, error, response, etc.)?\n   *\n   * @default 'fields'\n   */\n  responseStyle?: ResponseStyle;\n  /**\n   * Throw an error instead of returning it in the response?\n   *\n   * @default false\n   */\n  throwOnError?: T['throwOnError'];\n}\n\nexport interface RequestOptions<\n  TData = unknown,\n  TResponseStyle extends ResponseStyle = 'fields',\n  ThrowOnError extends boolean = boolean,\n  Url extends string = string,\n>\n  extends\n    Config<{\n      responseStyle: TResponseStyle;\n      throwOnError: ThrowOnError;\n    }>,\n    Pick<\n      ServerSentEventsOptions<TData>,\n      | 'onRequest'\n      | 'onSseError'\n      | 'onSseEvent'\n      | 'sseDefaultRetryDelay'\n      | 'sseMaxRetryAttempts'\n      | 'sseMaxRetryDelay'\n    > {\n  /**\n   * Any body that you want to add to your request.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/fetch#body}\n   */\n  body?: unknown;\n  path?: Record<string, unknown>;\n  query?: Record<string, unknown>;\n  /**\n   * Security mechanism(s) to use for the request.\n   */\n  security?: ReadonlyArray<Auth>;\n  url: Url;\n}\n\nexport interface ResolvedRequestOptions<\n  TResponseStyle extends ResponseStyle = 'fields',\n  ThrowOnError extends boolean = boolean,\n  Url extends string = string,\n> extends RequestOptions<unknown, TResponseStyle, ThrowOnError, Url> {\n  serializedBody?: string;\n}\n\nexport type RequestResult<\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = boolean,\n  TResponseStyle extends ResponseStyle = 'fields',\n> = ThrowOnError extends true\n  ? Promise<\n      TResponseStyle extends 'data'\n        ? TData extends Record<string, unknown>\n          ? TData[keyof TData]\n          : TData\n        : {\n            data: TData extends Record<string, unknown> ? TData[keyof TData] : TData;\n            request: Request;\n            response: Response;\n          }\n    >\n  : Promise<\n      TResponseStyle extends 'data'\n        ? (TData extends Record<string, unknown> ? TData[keyof TData] : TData) | undefined\n        : (\n            | {\n                data: TData extends Record<string, unknown> ? TData[keyof TData] : TData;\n                error: undefined;\n              }\n            | {\n                data: undefined;\n                error: TError extends Record<string, unknown> ? TError[keyof TError] : TError;\n              }\n          ) & {\n            request: Request;\n            response: Response;\n          }\n    >;\n\nexport interface ClientOptions {\n  baseUrl?: string;\n  responseStyle?: ResponseStyle;\n  throwOnError?: boolean;\n}\n\ntype MethodFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'>,\n) => RequestResult<TData, TError, ThrowOnError, TResponseStyle>;\n\ntype SseFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'>,\n) => Promise<ServerSentEventsResult<TData, TError>>;\n\ntype RequestFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'> &\n    Pick<Required<RequestOptions<TData, TResponseStyle, ThrowOnError>>, 'method'>,\n) => RequestResult<TData, TError, ThrowOnError, TResponseStyle>;\n\ntype BuildUrlFn = <\n  TData extends {\n    body?: unknown;\n    path?: Record<string, unknown>;\n    query?: Record<string, unknown>;\n    url: string;\n  },\n>(\n  options: TData & Options<TData>,\n) => string;\n\nexport type Client = CoreClient<RequestFn, Config, MethodFn, BuildUrlFn, SseFn> & {\n  interceptors: Middleware<Request, Response, unknown, ResolvedRequestOptions>;\n};\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 = ClientOptions> = (\n  override?: Config<ClientOptions & T>,\n) => Config<Required<ClientOptions> & T>;\n\nexport interface TDataShape {\n  body?: unknown;\n  headers?: unknown;\n  path?: unknown;\n  query?: unknown;\n  url: string;\n}\n\ntype OmitKeys<T, K> = Pick<T, Exclude<keyof T, K>>;\n\nexport type Options<\n  TData extends TDataShape = TDataShape,\n  ThrowOnError extends boolean = boolean,\n  TResponse = unknown,\n  TResponseStyle extends ResponseStyle = 'fields',\n> = OmitKeys<\n  RequestOptions<TResponse, TResponseStyle, ThrowOnError>,\n  'body' | 'path' | 'query' | 'url'\n> &\n  ([TData] extends [never] ? unknown : Omit<TData, 'url'>);\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@hey-api/client-fetch/sdk-nested-classes/client/utils.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@hey-api/client-fetch/sdk-nested-classes/client.gen.ts",
    "content": "// 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://api.example.com/v1' }));\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@hey-api/client-fetch/sdk-nested-classes/core/auth.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@hey-api/client-fetch/sdk-nested-classes/core/bodySerializer.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@hey-api/client-fetch/sdk-nested-classes/core/params.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@hey-api/client-fetch/sdk-nested-classes/core/pathSerializer.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@hey-api/client-fetch/sdk-nested-classes/core/queryKeySerializer.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\n/**\n * JSON-friendly union that mirrors what Pinia Colada can hash.\n */\nexport type JsonValue =\n  | null\n  | string\n  | number\n  | boolean\n  | JsonValue[]\n  | { [key: string]: JsonValue };\n\n/**\n * Replacer that converts non-JSON values (bigint, Date, etc.) to safe substitutes.\n */\nexport const queryKeyJsonReplacer = (_key: string, value: unknown) => {\n  if (value === undefined || typeof value === 'function' || typeof value === 'symbol') {\n    return undefined;\n  }\n  if (typeof value === 'bigint') {\n    return value.toString();\n  }\n  if (value instanceof Date) {\n    return value.toISOString();\n  }\n  return value;\n};\n\n/**\n * Safely stringifies a value and parses it back into a JsonValue.\n */\nexport const stringifyToJsonValue = (input: unknown): JsonValue | undefined => {\n  try {\n    const json = JSON.stringify(input, queryKeyJsonReplacer);\n    if (json === undefined) {\n      return undefined;\n    }\n    return JSON.parse(json) as JsonValue;\n  } catch {\n    return undefined;\n  }\n};\n\n/**\n * Detects plain objects (including objects with a null prototype).\n */\nconst isPlainObject = (value: unknown): value is Record<string, unknown> => {\n  if (value === null || typeof value !== 'object') {\n    return false;\n  }\n  const prototype = Object.getPrototypeOf(value as object);\n  return prototype === Object.prototype || prototype === null;\n};\n\n/**\n * Turns URLSearchParams into a sorted JSON object for deterministic keys.\n */\nconst serializeSearchParams = (params: URLSearchParams): JsonValue => {\n  const entries = Array.from(params.entries()).sort(([a], [b]) => a.localeCompare(b));\n  const result: Record<string, JsonValue> = {};\n\n  for (const [key, value] of entries) {\n    const existing = result[key];\n    if (existing === undefined) {\n      result[key] = value;\n      continue;\n    }\n\n    if (Array.isArray(existing)) {\n      (existing as string[]).push(value);\n    } else {\n      result[key] = [existing, value];\n    }\n  }\n\n  return result;\n};\n\n/**\n * Normalizes any accepted value into a JSON-friendly shape for query keys.\n */\nexport const serializeQueryKeyValue = (value: unknown): JsonValue | undefined => {\n  if (value === null) {\n    return null;\n  }\n\n  if (typeof value === 'string' || typeof value === 'number' || typeof value === 'boolean') {\n    return value;\n  }\n\n  if (value === undefined || typeof value === 'function' || typeof value === 'symbol') {\n    return undefined;\n  }\n\n  if (typeof value === 'bigint') {\n    return value.toString();\n  }\n\n  if (value instanceof Date) {\n    return value.toISOString();\n  }\n\n  if (Array.isArray(value)) {\n    return stringifyToJsonValue(value);\n  }\n\n  if (typeof URLSearchParams !== 'undefined' && value instanceof URLSearchParams) {\n    return serializeSearchParams(value);\n  }\n\n  if (isPlainObject(value)) {\n    return stringifyToJsonValue(value);\n  }\n\n  return undefined;\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@hey-api/client-fetch/sdk-nested-classes/core/serverSentEvents.gen.ts",
    "content": "// 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 const 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            // Normalize line endings: CRLF -> LF, then CR -> LF\n            buffer = buffer.replace(/\\r\\n/g, '\\n').replace(/\\r/g, '\\n');\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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@hey-api/client-fetch/sdk-nested-classes/core/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { Auth, AuthToken } from './auth.gen';\nimport type { BodySerializer, QuerySerializer, QuerySerializerOptions } from './bodySerializer.gen';\n\nexport type HttpMethod =\n  | 'connect'\n  | 'delete'\n  | 'get'\n  | 'head'\n  | 'options'\n  | 'patch'\n  | 'post'\n  | 'put'\n  | 'trace';\n\nexport type Client<\n  RequestFn = never,\n  Config = unknown,\n  MethodFn = never,\n  BuildUrlFn = never,\n  SseFn = never,\n> = {\n  /**\n   * Returns the final request URL.\n   */\n  buildUrl: BuildUrlFn;\n  getConfig: () => Config;\n  request: RequestFn;\n  setConfig: (config: Config) => Config;\n} & {\n  [K in HttpMethod]: MethodFn;\n} & ([SseFn] extends [never] ? { sse?: never } : { sse: { [K in HttpMethod]: SseFn } });\n\nexport interface Config {\n  /**\n   * Auth token or a function returning auth token. The resolved value will be\n   * added to the request payload as defined by its `security` array.\n   */\n  auth?: ((auth: Auth) => Promise<AuthToken> | AuthToken) | AuthToken;\n  /**\n   * A function for serializing request body parameter. By default,\n   * {@link JSON.stringify()} will be used.\n   */\n  bodySerializer?: BodySerializer | null;\n  /**\n   * An object containing any HTTP headers that you want to pre-populate your\n   * `Headers` object with.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/Headers/Headers#init See more}\n   */\n  headers?:\n    | RequestInit['headers']\n    | Record<\n        string,\n        string | number | boolean | (string | number | boolean)[] | null | undefined | unknown\n      >;\n  /**\n   * The request method.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/fetch#method See more}\n   */\n  method?: Uppercase<HttpMethod>;\n  /**\n   * A function for serializing request query parameters. By default, arrays\n   * will be exploded in form style, objects will be exploded in deepObject\n   * style, and reserved characters are percent-encoded.\n   *\n   * This method will have no effect if the native `paramsSerializer()` Axios\n   * API function is used.\n   *\n   * {@link https://swagger.io/docs/specification/serialization/#query View examples}\n   */\n  querySerializer?: QuerySerializer | QuerySerializerOptions;\n  /**\n   * A function validating request data. This is useful if you want to ensure\n   * the request conforms to the desired shape, so it can be safely sent to\n   * the server.\n   */\n  requestValidator?: (data: unknown) => Promise<unknown>;\n  /**\n   * A function transforming response data before it's returned. This is useful\n   * for post-processing data, e.g. converting ISO strings into Date objects.\n   */\n  responseTransformer?: (data: unknown) => Promise<unknown>;\n  /**\n   * A function validating response data. This is useful if you want to ensure\n   * the response conforms to the desired shape, so it can be safely passed to\n   * the transformers and returned to the user.\n   */\n  responseValidator?: (data: unknown) => Promise<unknown>;\n}\n\ntype IsExactlyNeverOrNeverUndefined<T> = [T] extends [never]\n  ? true\n  : [T] extends [never | undefined]\n    ? [undefined] extends [T]\n      ? false\n      : true\n    : false;\n\nexport type OmitNever<T extends Record<string, unknown>> = {\n  [K in keyof T as IsExactlyNeverOrNeverUndefined<T[K]> extends true ? never : K]: T[K];\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@hey-api/client-fetch/sdk-nested-classes/core/utils.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@hey-api/client-fetch/sdk-nested-classes/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport { Business, Business2, Business3, Business4, Business5, Domains, Domains2, Domains3, Domains4, Locations, type Options, Providers, Providers2, Providers3, Providers4 } from './sdk.gen';\nexport type { BusinessGetData, BusinessGetResponse, BusinessGetResponses, BusinessProvidersDomainsGetData, BusinessProvidersDomainsGetResponse, BusinessProvidersDomainsGetResponses, BusinessProvidersDomainsPostData, BusinessProvidersDomainsPostResponse, BusinessProvidersDomainsPostResponses, ClientOptions, GetData, GetResponse, GetResponses, PutBusinessProvidersDomainsData, PutBusinessProvidersDomainsResponse, PutBusinessProvidersDomainsResponses } from './types.gen';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@hey-api/client-fetch/sdk-nested-classes/sdk.gen.ts",
    "content": "// 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 { BusinessGetData, BusinessGetResponses, BusinessProvidersDomainsGetData, BusinessProvidersDomainsGetResponses, BusinessProvidersDomainsPostData, BusinessProvidersDomainsPostResponses, GetData, GetResponses, PutBusinessProvidersDomainsData, PutBusinessProvidersDomainsResponses } from './types.gen';\n\nexport type Options<TData extends TDataShape = TDataShape, ThrowOnError extends boolean = boolean> = Options2<TData, ThrowOnError> & {\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\nexport class Domains {\n    public static get<ThrowOnError extends boolean = false>(options?: Options<BusinessProvidersDomainsGetData, ThrowOnError>) {\n        return (options?.client ?? client).get<BusinessProvidersDomainsGetResponses, unknown, ThrowOnError>({ url: '/business/providers/domains', ...options });\n    }\n    \n    public static post<ThrowOnError extends boolean = false>(options?: Options<BusinessProvidersDomainsPostData, ThrowOnError>) {\n        return (options?.client ?? client).post<BusinessProvidersDomainsPostResponses, unknown, ThrowOnError>({ url: '/business/providers/domains', ...options });\n    }\n}\n\nexport class Providers {\n    static domains = Domains;\n}\n\nexport class Business {\n    public static get<ThrowOnError extends boolean = false>(options?: Options<BusinessGetData, ThrowOnError>) {\n        return (options?.client ?? client).get<BusinessGetResponses, unknown, ThrowOnError>({ url: '/locations/businesses', ...options });\n    }\n    \n    static providers = Providers;\n}\n\nexport class Business2 {\n    static business = Business;\n}\n\nexport class Domains2 {\n    public static get<ThrowOnError extends boolean = false>(options?: Options<BusinessProvidersDomainsGetData, ThrowOnError>) {\n        return (options?.client ?? client).get<BusinessProvidersDomainsGetResponses, unknown, ThrowOnError>({ url: '/business/providers/domains', ...options });\n    }\n    \n    public static post<ThrowOnError extends boolean = false>(options?: Options<BusinessProvidersDomainsPostData, ThrowOnError>) {\n        return (options?.client ?? client).post<BusinessProvidersDomainsPostResponses, unknown, ThrowOnError>({ url: '/business/providers/domains', ...options });\n    }\n}\n\nexport class Providers2 {\n    static domains = Domains2;\n}\n\nexport class Business3 {\n    static providers = Providers2;\n}\n\nexport class Providers3 {\n    static business = Business3;\n}\n\nexport class Domains3 {\n    public static get<ThrowOnError extends boolean = false>(options?: Options<BusinessProvidersDomainsGetData, ThrowOnError>) {\n        return (options?.client ?? client).get<BusinessProvidersDomainsGetResponses, unknown, ThrowOnError>({ url: '/business/providers/domains', ...options });\n    }\n    \n    public static post<ThrowOnError extends boolean = false>(options?: Options<BusinessProvidersDomainsPostData, ThrowOnError>) {\n        return (options?.client ?? client).post<BusinessProvidersDomainsPostResponses, unknown, ThrowOnError>({ url: '/business/providers/domains', ...options });\n    }\n}\n\nexport class Providers4 {\n    static domains = Domains3;\n}\n\nexport class Business4 {\n    static providers = Providers4;\n}\n\nexport class Domains4 {\n    public static putBusinessProvidersDomains<ThrowOnError extends boolean = false>(options?: Options<PutBusinessProvidersDomainsData, ThrowOnError>) {\n        return (options?.client ?? client).put<PutBusinessProvidersDomainsResponses, unknown, ThrowOnError>({ url: '/business/providers/domains', ...options });\n    }\n    \n    static business = Business4;\n}\n\nexport class Business5 {\n    public static get<ThrowOnError extends boolean = false>(options?: Options<BusinessGetData, ThrowOnError>) {\n        return (options?.client ?? client).get<BusinessGetResponses, unknown, ThrowOnError>({ url: '/locations/businesses', ...options });\n    }\n}\n\nexport class Locations {\n    public static get<ThrowOnError extends boolean = false>(options?: Options<GetData, ThrowOnError>) {\n        return (options?.client ?? client).get<GetResponses, unknown, ThrowOnError>({ url: '/locations', ...options });\n    }\n    \n    static business = Business5;\n}\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@hey-api/client-fetch/sdk-nested-classes/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type ClientOptions = {\n    baseUrl: 'https://api.example.com/v1' | (string & {});\n};\n\nexport type BusinessProvidersDomainsGetData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/business/providers/domains';\n};\n\nexport type BusinessProvidersDomainsGetResponses = {\n    /**\n     * OK\n     */\n    200: string;\n};\n\nexport type BusinessProvidersDomainsGetResponse = BusinessProvidersDomainsGetResponses[keyof BusinessProvidersDomainsGetResponses];\n\nexport type BusinessProvidersDomainsPostData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/business/providers/domains';\n};\n\nexport type BusinessProvidersDomainsPostResponses = {\n    /**\n     * OK\n     */\n    200: string;\n};\n\nexport type BusinessProvidersDomainsPostResponse = BusinessProvidersDomainsPostResponses[keyof BusinessProvidersDomainsPostResponses];\n\nexport type PutBusinessProvidersDomainsData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/business/providers/domains';\n};\n\nexport type PutBusinessProvidersDomainsResponses = {\n    /**\n     * OK\n     */\n    200: string;\n};\n\nexport type PutBusinessProvidersDomainsResponse = PutBusinessProvidersDomainsResponses[keyof PutBusinessProvidersDomainsResponses];\n\nexport type BusinessGetData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/locations/businesses';\n};\n\nexport type BusinessGetResponses = {\n    /**\n     * OK\n     */\n    200: string;\n};\n\nexport type BusinessGetResponse = BusinessGetResponses[keyof BusinessGetResponses];\n\nexport type GetData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/locations';\n};\n\nexport type GetResponses = {\n    /**\n     * OK\n     */\n    200: string;\n};\n\nexport type GetResponse = GetResponses[keyof GetResponses];\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@hey-api/client-fetch/sdk-nested-classes-instance/client/client.gen.ts",
    "content": "// 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 (options: RequestOptions) => {\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 url = buildUrl(opts);\n\n    return { opts, url };\n  };\n\n  const request: Client['request'] = async (options) => {\n    // @ts-expect-error\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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@hey-api/client-fetch/sdk-nested-classes-instance/client/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type { Auth } from '../core/auth.gen';\nexport type { QuerySerializerOptions } from '../core/bodySerializer.gen';\nexport {\n  formDataBodySerializer,\n  jsonBodySerializer,\n  urlSearchParamsBodySerializer,\n} from '../core/bodySerializer.gen';\nexport { buildClientParams } from '../core/params.gen';\nexport { serializeQueryKeyValue } from '../core/queryKeySerializer.gen';\nexport { createClient } from './client.gen';\nexport type {\n  Client,\n  ClientOptions,\n  Config,\n  CreateClientConfig,\n  Options,\n  RequestOptions,\n  RequestResult,\n  ResolvedRequestOptions,\n  ResponseStyle,\n  TDataShape,\n} from './types.gen';\nexport { createConfig, mergeHeaders } from './utils.gen';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@hey-api/client-fetch/sdk-nested-classes-instance/client/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { Auth } from '../core/auth.gen';\nimport type {\n  ServerSentEventsOptions,\n  ServerSentEventsResult,\n} from '../core/serverSentEvents.gen';\nimport type { Client as CoreClient, Config as CoreConfig } from '../core/types.gen';\nimport type { Middleware } from './utils.gen';\n\nexport type ResponseStyle = 'data' | 'fields';\n\nexport interface Config<T extends ClientOptions = ClientOptions>\n  extends Omit<RequestInit, 'body' | 'headers' | 'method'>, CoreConfig {\n  /**\n   * Base URL for all requests made by this client.\n   */\n  baseUrl?: T['baseUrl'];\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   * Please don't use the Fetch client for Next.js applications. The `next`\n   * options won't have any effect.\n   *\n   * Install {@link https://www.npmjs.com/package/@hey-api/client-next `@hey-api/client-next`} instead.\n   */\n  next?: never;\n  /**\n   * Return the response data parsed in a specified format. By default, `auto`\n   * will infer the appropriate method from the `Content-Type` response header.\n   * You can override this behavior with any of the {@link Body} methods.\n   * Select `stream` if you don't want to parse response data at all.\n   *\n   * @default 'auto'\n   */\n  parseAs?: 'arrayBuffer' | 'auto' | 'blob' | 'formData' | 'json' | 'stream' | 'text';\n  /**\n   * Should we return only data or multiple fields (data, error, response, etc.)?\n   *\n   * @default 'fields'\n   */\n  responseStyle?: ResponseStyle;\n  /**\n   * Throw an error instead of returning it in the response?\n   *\n   * @default false\n   */\n  throwOnError?: T['throwOnError'];\n}\n\nexport interface RequestOptions<\n  TData = unknown,\n  TResponseStyle extends ResponseStyle = 'fields',\n  ThrowOnError extends boolean = boolean,\n  Url extends string = string,\n>\n  extends\n    Config<{\n      responseStyle: TResponseStyle;\n      throwOnError: ThrowOnError;\n    }>,\n    Pick<\n      ServerSentEventsOptions<TData>,\n      | 'onRequest'\n      | 'onSseError'\n      | 'onSseEvent'\n      | 'sseDefaultRetryDelay'\n      | 'sseMaxRetryAttempts'\n      | 'sseMaxRetryDelay'\n    > {\n  /**\n   * Any body that you want to add to your request.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/fetch#body}\n   */\n  body?: unknown;\n  path?: Record<string, unknown>;\n  query?: Record<string, unknown>;\n  /**\n   * Security mechanism(s) to use for the request.\n   */\n  security?: ReadonlyArray<Auth>;\n  url: Url;\n}\n\nexport interface ResolvedRequestOptions<\n  TResponseStyle extends ResponseStyle = 'fields',\n  ThrowOnError extends boolean = boolean,\n  Url extends string = string,\n> extends RequestOptions<unknown, TResponseStyle, ThrowOnError, Url> {\n  serializedBody?: string;\n}\n\nexport type RequestResult<\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = boolean,\n  TResponseStyle extends ResponseStyle = 'fields',\n> = ThrowOnError extends true\n  ? Promise<\n      TResponseStyle extends 'data'\n        ? TData extends Record<string, unknown>\n          ? TData[keyof TData]\n          : TData\n        : {\n            data: TData extends Record<string, unknown> ? TData[keyof TData] : TData;\n            request: Request;\n            response: Response;\n          }\n    >\n  : Promise<\n      TResponseStyle extends 'data'\n        ? (TData extends Record<string, unknown> ? TData[keyof TData] : TData) | undefined\n        : (\n            | {\n                data: TData extends Record<string, unknown> ? TData[keyof TData] : TData;\n                error: undefined;\n              }\n            | {\n                data: undefined;\n                error: TError extends Record<string, unknown> ? TError[keyof TError] : TError;\n              }\n          ) & {\n            request: Request;\n            response: Response;\n          }\n    >;\n\nexport interface ClientOptions {\n  baseUrl?: string;\n  responseStyle?: ResponseStyle;\n  throwOnError?: boolean;\n}\n\ntype MethodFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'>,\n) => RequestResult<TData, TError, ThrowOnError, TResponseStyle>;\n\ntype SseFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'>,\n) => Promise<ServerSentEventsResult<TData, TError>>;\n\ntype RequestFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'> &\n    Pick<Required<RequestOptions<TData, TResponseStyle, ThrowOnError>>, 'method'>,\n) => RequestResult<TData, TError, ThrowOnError, TResponseStyle>;\n\ntype BuildUrlFn = <\n  TData extends {\n    body?: unknown;\n    path?: Record<string, unknown>;\n    query?: Record<string, unknown>;\n    url: string;\n  },\n>(\n  options: TData & Options<TData>,\n) => string;\n\nexport type Client = CoreClient<RequestFn, Config, MethodFn, BuildUrlFn, SseFn> & {\n  interceptors: Middleware<Request, Response, unknown, ResolvedRequestOptions>;\n};\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 = ClientOptions> = (\n  override?: Config<ClientOptions & T>,\n) => Config<Required<ClientOptions> & T>;\n\nexport interface TDataShape {\n  body?: unknown;\n  headers?: unknown;\n  path?: unknown;\n  query?: unknown;\n  url: string;\n}\n\ntype OmitKeys<T, K> = Pick<T, Exclude<keyof T, K>>;\n\nexport type Options<\n  TData extends TDataShape = TDataShape,\n  ThrowOnError extends boolean = boolean,\n  TResponse = unknown,\n  TResponseStyle extends ResponseStyle = 'fields',\n> = OmitKeys<\n  RequestOptions<TResponse, TResponseStyle, ThrowOnError>,\n  'body' | 'path' | 'query' | 'url'\n> &\n  ([TData] extends [never] ? unknown : Omit<TData, 'url'>);\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@hey-api/client-fetch/sdk-nested-classes-instance/client/utils.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@hey-api/client-fetch/sdk-nested-classes-instance/client.gen.ts",
    "content": "// 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://api.example.com/v1' }));\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@hey-api/client-fetch/sdk-nested-classes-instance/core/auth.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@hey-api/client-fetch/sdk-nested-classes-instance/core/bodySerializer.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@hey-api/client-fetch/sdk-nested-classes-instance/core/params.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@hey-api/client-fetch/sdk-nested-classes-instance/core/pathSerializer.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@hey-api/client-fetch/sdk-nested-classes-instance/core/queryKeySerializer.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\n/**\n * JSON-friendly union that mirrors what Pinia Colada can hash.\n */\nexport type JsonValue =\n  | null\n  | string\n  | number\n  | boolean\n  | JsonValue[]\n  | { [key: string]: JsonValue };\n\n/**\n * Replacer that converts non-JSON values (bigint, Date, etc.) to safe substitutes.\n */\nexport const queryKeyJsonReplacer = (_key: string, value: unknown) => {\n  if (value === undefined || typeof value === 'function' || typeof value === 'symbol') {\n    return undefined;\n  }\n  if (typeof value === 'bigint') {\n    return value.toString();\n  }\n  if (value instanceof Date) {\n    return value.toISOString();\n  }\n  return value;\n};\n\n/**\n * Safely stringifies a value and parses it back into a JsonValue.\n */\nexport const stringifyToJsonValue = (input: unknown): JsonValue | undefined => {\n  try {\n    const json = JSON.stringify(input, queryKeyJsonReplacer);\n    if (json === undefined) {\n      return undefined;\n    }\n    return JSON.parse(json) as JsonValue;\n  } catch {\n    return undefined;\n  }\n};\n\n/**\n * Detects plain objects (including objects with a null prototype).\n */\nconst isPlainObject = (value: unknown): value is Record<string, unknown> => {\n  if (value === null || typeof value !== 'object') {\n    return false;\n  }\n  const prototype = Object.getPrototypeOf(value as object);\n  return prototype === Object.prototype || prototype === null;\n};\n\n/**\n * Turns URLSearchParams into a sorted JSON object for deterministic keys.\n */\nconst serializeSearchParams = (params: URLSearchParams): JsonValue => {\n  const entries = Array.from(params.entries()).sort(([a], [b]) => a.localeCompare(b));\n  const result: Record<string, JsonValue> = {};\n\n  for (const [key, value] of entries) {\n    const existing = result[key];\n    if (existing === undefined) {\n      result[key] = value;\n      continue;\n    }\n\n    if (Array.isArray(existing)) {\n      (existing as string[]).push(value);\n    } else {\n      result[key] = [existing, value];\n    }\n  }\n\n  return result;\n};\n\n/**\n * Normalizes any accepted value into a JSON-friendly shape for query keys.\n */\nexport const serializeQueryKeyValue = (value: unknown): JsonValue | undefined => {\n  if (value === null) {\n    return null;\n  }\n\n  if (typeof value === 'string' || typeof value === 'number' || typeof value === 'boolean') {\n    return value;\n  }\n\n  if (value === undefined || typeof value === 'function' || typeof value === 'symbol') {\n    return undefined;\n  }\n\n  if (typeof value === 'bigint') {\n    return value.toString();\n  }\n\n  if (value instanceof Date) {\n    return value.toISOString();\n  }\n\n  if (Array.isArray(value)) {\n    return stringifyToJsonValue(value);\n  }\n\n  if (typeof URLSearchParams !== 'undefined' && value instanceof URLSearchParams) {\n    return serializeSearchParams(value);\n  }\n\n  if (isPlainObject(value)) {\n    return stringifyToJsonValue(value);\n  }\n\n  return undefined;\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@hey-api/client-fetch/sdk-nested-classes-instance/core/serverSentEvents.gen.ts",
    "content": "// 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 const 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            // Normalize line endings: CRLF -> LF, then CR -> LF\n            buffer = buffer.replace(/\\r\\n/g, '\\n').replace(/\\r/g, '\\n');\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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@hey-api/client-fetch/sdk-nested-classes-instance/core/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { Auth, AuthToken } from './auth.gen';\nimport type { BodySerializer, QuerySerializer, QuerySerializerOptions } from './bodySerializer.gen';\n\nexport type HttpMethod =\n  | 'connect'\n  | 'delete'\n  | 'get'\n  | 'head'\n  | 'options'\n  | 'patch'\n  | 'post'\n  | 'put'\n  | 'trace';\n\nexport type Client<\n  RequestFn = never,\n  Config = unknown,\n  MethodFn = never,\n  BuildUrlFn = never,\n  SseFn = never,\n> = {\n  /**\n   * Returns the final request URL.\n   */\n  buildUrl: BuildUrlFn;\n  getConfig: () => Config;\n  request: RequestFn;\n  setConfig: (config: Config) => Config;\n} & {\n  [K in HttpMethod]: MethodFn;\n} & ([SseFn] extends [never] ? { sse?: never } : { sse: { [K in HttpMethod]: SseFn } });\n\nexport interface Config {\n  /**\n   * Auth token or a function returning auth token. The resolved value will be\n   * added to the request payload as defined by its `security` array.\n   */\n  auth?: ((auth: Auth) => Promise<AuthToken> | AuthToken) | AuthToken;\n  /**\n   * A function for serializing request body parameter. By default,\n   * {@link JSON.stringify()} will be used.\n   */\n  bodySerializer?: BodySerializer | null;\n  /**\n   * An object containing any HTTP headers that you want to pre-populate your\n   * `Headers` object with.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/Headers/Headers#init See more}\n   */\n  headers?:\n    | RequestInit['headers']\n    | Record<\n        string,\n        string | number | boolean | (string | number | boolean)[] | null | undefined | unknown\n      >;\n  /**\n   * The request method.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/fetch#method See more}\n   */\n  method?: Uppercase<HttpMethod>;\n  /**\n   * A function for serializing request query parameters. By default, arrays\n   * will be exploded in form style, objects will be exploded in deepObject\n   * style, and reserved characters are percent-encoded.\n   *\n   * This method will have no effect if the native `paramsSerializer()` Axios\n   * API function is used.\n   *\n   * {@link https://swagger.io/docs/specification/serialization/#query View examples}\n   */\n  querySerializer?: QuerySerializer | QuerySerializerOptions;\n  /**\n   * A function validating request data. This is useful if you want to ensure\n   * the request conforms to the desired shape, so it can be safely sent to\n   * the server.\n   */\n  requestValidator?: (data: unknown) => Promise<unknown>;\n  /**\n   * A function transforming response data before it's returned. This is useful\n   * for post-processing data, e.g. converting ISO strings into Date objects.\n   */\n  responseTransformer?: (data: unknown) => Promise<unknown>;\n  /**\n   * A function validating response data. This is useful if you want to ensure\n   * the response conforms to the desired shape, so it can be safely passed to\n   * the transformers and returned to the user.\n   */\n  responseValidator?: (data: unknown) => Promise<unknown>;\n}\n\ntype IsExactlyNeverOrNeverUndefined<T> = [T] extends [never]\n  ? true\n  : [T] extends [never | undefined]\n    ? [undefined] extends [T]\n      ? false\n      : true\n    : false;\n\nexport type OmitNever<T extends Record<string, unknown>> = {\n  [K in keyof T as IsExactlyNeverOrNeverUndefined<T[K]> extends true ? never : K]: T[K];\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@hey-api/client-fetch/sdk-nested-classes-instance/core/utils.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@hey-api/client-fetch/sdk-nested-classes-instance/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport { Business, Domains, NestedSdkWithInstance, type Options, Providers } from './sdk.gen';\nexport type { BusinessGetData, BusinessGetResponse, BusinessGetResponses, BusinessProvidersDomainsGetData, BusinessProvidersDomainsGetResponse, BusinessProvidersDomainsGetResponses, BusinessProvidersDomainsPostData, BusinessProvidersDomainsPostResponse, BusinessProvidersDomainsPostResponses, ClientOptions, GetData, GetResponse, GetResponses, PutBusinessProvidersDomainsData, PutBusinessProvidersDomainsResponse, PutBusinessProvidersDomainsResponses } from './types.gen';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@hey-api/client-fetch/sdk-nested-classes-instance/sdk.gen.ts",
    "content": "// 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 { BusinessGetData, BusinessGetResponses, BusinessProvidersDomainsGetData, BusinessProvidersDomainsGetResponses, BusinessProvidersDomainsPostData, BusinessProvidersDomainsPostResponses, GetData, GetResponses, PutBusinessProvidersDomainsData, PutBusinessProvidersDomainsResponses } from './types.gen';\n\nexport type Options<TData extends TDataShape = TDataShape, ThrowOnError extends boolean = boolean> = Options2<TData, ThrowOnError> & {\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\nclass HeyApiClient {\n    protected client: Client;\n    \n    constructor(args?: {\n        client?: Client;\n    }) {\n        this.client = args?.client ?? client;\n    }\n}\n\nclass HeyApiRegistry<T> {\n    private readonly defaultKey = 'default';\n    \n    private readonly instances: Map<string, T> = new Map();\n    \n    get(key?: string): T {\n        const instance = this.instances.get(key ?? this.defaultKey);\n        if (!instance) {\n            throw new Error(`No SDK client found. Create one with \"new NestedSdkWithInstance()\" to fix this error.`);\n        }\n        return instance;\n    }\n    \n    set(value: T, key?: string): void {\n        this.instances.set(key ?? this.defaultKey, value);\n    }\n}\n\nexport class Domains extends HeyApiClient {\n    public get<ThrowOnError extends boolean = false>(options?: Options<BusinessProvidersDomainsGetData, ThrowOnError>) {\n        return (options?.client ?? this.client).get<BusinessProvidersDomainsGetResponses, unknown, ThrowOnError>({ url: '/business/providers/domains', ...options });\n    }\n    \n    public post<ThrowOnError extends boolean = false>(options?: Options<BusinessProvidersDomainsPostData, ThrowOnError>) {\n        return (options?.client ?? this.client).post<BusinessProvidersDomainsPostResponses, unknown, ThrowOnError>({ url: '/business/providers/domains', ...options });\n    }\n}\n\nexport class Providers extends HeyApiClient {\n    private _domains?: Domains;\n    get domains(): Domains {\n        return this._domains ??= new Domains({ client: this.client });\n    }\n}\n\nexport class Business extends HeyApiClient {\n    public get<ThrowOnError extends boolean = false>(options?: Options<BusinessGetData, ThrowOnError>) {\n        return (options?.client ?? this.client).get<BusinessGetResponses, unknown, ThrowOnError>({ url: '/locations/businesses', ...options });\n    }\n    \n    private _providers?: Providers;\n    get providers(): Providers {\n        return this._providers ??= new Providers({ client: this.client });\n    }\n}\n\nexport class NestedSdkWithInstance extends HeyApiClient {\n    public static readonly __registry = new HeyApiRegistry<NestedSdkWithInstance>();\n    \n    constructor(args?: {\n        client?: Client;\n        key?: string;\n    }) {\n        super(args);\n        NestedSdkWithInstance.__registry.set(this, args?.key);\n    }\n    \n    public putBusinessProvidersDomains<ThrowOnError extends boolean = false>(options?: Options<PutBusinessProvidersDomainsData, ThrowOnError>) {\n        return (options?.client ?? this.client).put<PutBusinessProvidersDomainsResponses, unknown, ThrowOnError>({ url: '/business/providers/domains', ...options });\n    }\n    \n    public get<ThrowOnError extends boolean = false>(options?: Options<GetData, ThrowOnError>) {\n        return (options?.client ?? this.client).get<GetResponses, unknown, ThrowOnError>({ url: '/locations', ...options });\n    }\n    \n    private _business?: Business;\n    get business(): Business {\n        return this._business ??= new Business({ client: this.client });\n    }\n}\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@hey-api/client-fetch/sdk-nested-classes-instance/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type ClientOptions = {\n    baseUrl: 'https://api.example.com/v1' | (string & {});\n};\n\nexport type BusinessProvidersDomainsGetData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/business/providers/domains';\n};\n\nexport type BusinessProvidersDomainsGetResponses = {\n    /**\n     * OK\n     */\n    200: string;\n};\n\nexport type BusinessProvidersDomainsGetResponse = BusinessProvidersDomainsGetResponses[keyof BusinessProvidersDomainsGetResponses];\n\nexport type BusinessProvidersDomainsPostData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/business/providers/domains';\n};\n\nexport type BusinessProvidersDomainsPostResponses = {\n    /**\n     * OK\n     */\n    200: string;\n};\n\nexport type BusinessProvidersDomainsPostResponse = BusinessProvidersDomainsPostResponses[keyof BusinessProvidersDomainsPostResponses];\n\nexport type PutBusinessProvidersDomainsData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/business/providers/domains';\n};\n\nexport type PutBusinessProvidersDomainsResponses = {\n    /**\n     * OK\n     */\n    200: string;\n};\n\nexport type PutBusinessProvidersDomainsResponse = PutBusinessProvidersDomainsResponses[keyof PutBusinessProvidersDomainsResponses];\n\nexport type BusinessGetData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/locations/businesses';\n};\n\nexport type BusinessGetResponses = {\n    /**\n     * OK\n     */\n    200: string;\n};\n\nexport type BusinessGetResponse = BusinessGetResponses[keyof BusinessGetResponses];\n\nexport type GetData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/locations';\n};\n\nexport type GetResponses = {\n    /**\n     * OK\n     */\n    200: string;\n};\n\nexport type GetResponse = GetResponses[keyof GetResponses];\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@hey-api/schemas/default/schemas.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport const _400Schema = {\n    description: 'Model with number-only name',\n    type: 'string'\n} as const;\n\nexport const ExternalRefASchema = {\n    description: 'External ref to shared model (A)',\n    $ref: '#/components/schemas/ExternalSharedModel'\n} as const;\n\nexport const ExternalRefBSchema = {\n    description: 'External ref to shared model (B)',\n    $ref: '#/components/schemas/ExternalSharedModel'\n} as const;\n\nexport const camelCaseCommentWithBreaksSchema = {\n    description: 'Testing multiline comments in string: First line\\nSecond line\\n\\nFourth line',\n    type: 'integer'\n} as const;\n\nexport const CommentWithBreaksSchema = {\n    description: 'Testing multiline comments in string: First line\\nSecond line\\n\\nFourth line',\n    type: 'integer'\n} as const;\n\nexport const CommentWithBackticksSchema = {\n    description: 'Testing backticks in string: `backticks` and ```multiple backticks``` should work',\n    type: 'integer'\n} as const;\n\nexport const CommentWithBackticksAndQuotesSchema = {\n    description: 'Testing backticks and quotes in string: `backticks`, \\'quotes\\', \"double quotes\" and ```multiple backticks``` should work',\n    type: 'integer'\n} as const;\n\nexport const CommentWithSlashesSchema = {\n    description: 'Testing slashes in string: \\\\backwards\\\\\\\\\\\\ and /forwards/// should work',\n    type: 'integer'\n} as const;\n\nexport const CommentWithExpressionPlaceholdersSchema = {\n    description: 'Testing expression placeholders in string: ${expression} should work',\n    type: 'integer'\n} as const;\n\nexport const CommentWithQuotesSchema = {\n    description: 'Testing quotes in string: \\'single quote\\'\\'\\' and \"double quotes\"\"\" should work',\n    type: 'integer'\n} as const;\n\nexport const CommentWithReservedCharactersSchema = {\n    description: 'Testing reserved characters in string: /* inline */ and /** inline **/ should work',\n    type: 'integer'\n} as const;\n\nexport const SimpleIntegerSchema = {\n    description: 'This is a simple number',\n    type: 'integer'\n} as const;\n\nexport const SimpleBooleanSchema = {\n    description: 'This is a simple boolean',\n    type: 'boolean'\n} as const;\n\nexport const SimpleStringSchema = {\n    description: 'This is a simple string',\n    type: 'string'\n} as const;\n\nexport const NonAsciiStringæøåÆØÅöôêÊ字符串Schema = {\n    description: 'A string with non-ascii (unicode) characters valid in typescript identifiers (æøåÆØÅöÔèÈ字符串)',\n    type: 'string'\n} as const;\n\nexport const SimpleFileSchema = {\n    description: 'This is a simple file',\n    format: 'binary',\n    type: 'string'\n} as const;\n\nexport const SimpleReferenceSchema = {\n    description: 'This is a simple reference',\n    allOf: [\n        {\n            $ref: '#/components/schemas/ModelWithString'\n        }\n    ]\n} as const;\n\nexport const SimpleStringWithPatternSchema = {\n    description: 'This is a simple string',\n    type: 'string',\n    nullable: true,\n    maxLength: 64,\n    pattern: '^[a-zA-Z0-9_]*$'\n} as const;\n\nexport const EnumWithStringsSchema = {\n    description: 'This is a simple enum with strings',\n    enum: [\n        'Success',\n        'Warning',\n        'Error',\n        '\\'Single Quote\\'',\n        '\"Double Quotes\"',\n        'Non-ascii: øæåôöØÆÅÔÖ字符串'\n    ]\n} as const;\n\nexport const EnumWithReplacedCharactersSchema = {\n    enum: [\n        '\\'Single Quote\\'',\n        '\"Double Quotes\"',\n        'øæåôöØÆÅÔÖ字符串',\n        3.1,\n        ''\n    ],\n    type: 'string'\n} as const;\n\nexport const EnumWithNumbersSchema = {\n    description: 'This is a simple enum with numbers',\n    enum: [\n        1,\n        2,\n        3,\n        1.1,\n        1.2,\n        1.3,\n        100,\n        200,\n        300,\n        -100,\n        -200,\n        -300,\n        -1.1,\n        -1.2,\n        -1.3\n    ],\n    default: 200\n} as const;\n\nexport const EnumFromDescriptionSchema = {\n    description: 'Success=1,Warning=2,Error=3',\n    type: 'number'\n} as const;\n\nexport const EnumWithExtensionsSchema = {\n    description: 'This is a simple enum with numbers',\n    enum: [\n        200,\n        400,\n        500\n    ],\n    'x-enum-varnames': [\n        'CUSTOM_SUCCESS',\n        'CUSTOM_WARNING',\n        'CUSTOM_ERROR'\n    ],\n    'x-enum-descriptions': [\n        'Used when the status of something is successful',\n        'Used when the status of something has a warning',\n        'Used when the status of something has an error'\n    ]\n} as const;\n\nexport const EnumWithXEnumNamesSchema = {\n    enum: [\n        0,\n        1,\n        2\n    ],\n    'x-enumNames': [\n        'zero',\n        'one',\n        'two'\n    ]\n} as const;\n\nexport const ArrayWithNumbersSchema = {\n    description: 'This is a simple array with numbers',\n    type: 'array',\n    items: {\n        type: 'integer'\n    }\n} as const;\n\nexport const ArrayWithBooleansSchema = {\n    description: 'This is a simple array with booleans',\n    type: 'array',\n    items: {\n        type: 'boolean'\n    }\n} as const;\n\nexport const ArrayWithStringsSchema = {\n    description: 'This is a simple array with strings',\n    type: 'array',\n    items: {\n        type: 'string'\n    },\n    default: [\n        'test'\n    ]\n} as const;\n\nexport const ArrayWithReferencesSchema = {\n    description: 'This is a simple array with references',\n    type: 'array',\n    items: {\n        $ref: '#/components/schemas/ModelWithString'\n    }\n} as const;\n\nexport const ArrayWithArraySchema = {\n    description: 'This is a simple array containing an array',\n    type: 'array',\n    items: {\n        type: 'array',\n        items: {\n            $ref: '#/components/schemas/ModelWithString'\n        }\n    }\n} as const;\n\nexport const ArrayWithPropertiesSchema = {\n    description: 'This is a simple array with properties',\n    type: 'array',\n    items: {\n        type: 'object',\n        properties: {\n            '16x16': {\n                $ref: '#/components/schemas/camelCaseCommentWithBreaks'\n            },\n            bar: {\n                type: 'string'\n            }\n        }\n    }\n} as const;\n\nexport const ArrayWithAnyOfPropertiesSchema = {\n    description: 'This is a simple array with any of properties',\n    type: 'array',\n    items: {\n        anyOf: [\n            {\n                type: 'object',\n                properties: {\n                    foo: {\n                        type: 'string',\n                        default: 'test'\n                    }\n                }\n            },\n            {\n                type: 'object',\n                properties: {\n                    bar: {\n                        type: 'string'\n                    }\n                }\n            }\n        ]\n    }\n} as const;\n\nexport const AnyOfAnyAndNullSchema = {\n    type: 'object',\n    properties: {\n        data: {\n            anyOf: [\n                {},\n                {\n                    nullable: true\n                }\n            ]\n        }\n    }\n} as const;\n\nexport const AnyOfArraysSchema = {\n    description: 'This is a simple array with any of properties',\n    type: 'object',\n    properties: {\n        results: {\n            items: {\n                anyOf: [\n                    {\n                        type: 'object',\n                        properties: {\n                            foo: {\n                                type: 'string'\n                            }\n                        }\n                    },\n                    {\n                        type: 'object',\n                        properties: {\n                            bar: {\n                                type: 'string'\n                            }\n                        }\n                    }\n                ]\n            },\n            type: 'array'\n        }\n    }\n} as const;\n\nexport const DictionaryWithStringSchema = {\n    description: 'This is a string dictionary',\n    type: 'object',\n    additionalProperties: {\n        type: 'string'\n    }\n} as const;\n\nexport const DictionaryWithPropertiesAndAdditionalPropertiesSchema = {\n    type: 'object',\n    properties: {\n        foo: {\n            type: 'number'\n        },\n        bar: {\n            type: 'boolean'\n        }\n    },\n    additionalProperties: {\n        type: 'string'\n    }\n} as const;\n\nexport const DictionaryWithReferenceSchema = {\n    description: 'This is a string reference',\n    type: 'object',\n    additionalProperties: {\n        $ref: '#/components/schemas/ModelWithString'\n    }\n} as const;\n\nexport const DictionaryWithArraySchema = {\n    description: 'This is a complex dictionary',\n    type: 'object',\n    additionalProperties: {\n        type: 'array',\n        items: {\n            $ref: '#/components/schemas/ModelWithString'\n        }\n    }\n} as const;\n\nexport const DictionaryWithDictionarySchema = {\n    description: 'This is a string dictionary',\n    type: 'object',\n    additionalProperties: {\n        type: 'object',\n        additionalProperties: {\n            type: 'string'\n        }\n    }\n} as const;\n\nexport const DictionaryWithPropertiesSchema = {\n    description: 'This is a complex dictionary',\n    type: 'object',\n    additionalProperties: {\n        type: 'object',\n        properties: {\n            foo: {\n                type: 'string'\n            },\n            bar: {\n                type: 'string'\n            }\n        }\n    }\n} as const;\n\nexport const ModelWithIntegerSchema = {\n    description: 'This is a model with one number property',\n    type: 'object',\n    properties: {\n        prop: {\n            description: 'This is a simple number property',\n            type: 'integer'\n        }\n    }\n} as const;\n\nexport const ModelWithBooleanSchema = {\n    description: 'This is a model with one boolean property',\n    type: 'object',\n    properties: {\n        prop: {\n            description: 'This is a simple boolean property',\n            type: 'boolean'\n        }\n    }\n} as const;\n\nexport const ModelWithStringSchema = {\n    description: 'This is a model with one string property',\n    type: 'object',\n    properties: {\n        prop: {\n            description: 'This is a simple string property',\n            type: 'string'\n        }\n    }\n} as const;\n\nexport const ModelWithStringErrorSchema = {\n    description: 'This is a model with one string property',\n    type: 'object',\n    properties: {\n        prop: {\n            description: 'This is a simple string property',\n            type: 'string'\n        }\n    }\n} as const;\n\nexport const Model_From_ZendeskSchema = {\n    description: '`Comment` or `VoiceComment`. The JSON object for adding voice comments to tickets is different. See [Adding voice comments to tickets](/documentation/ticketing/managing-tickets/adding-voice-comments-to-tickets)',\n    type: 'string'\n} as const;\n\nexport const ModelWithNullableStringSchema = {\n    description: 'This is a model with one string property',\n    type: 'object',\n    required: [\n        'nullableRequiredProp1',\n        'nullableRequiredProp2'\n    ],\n    properties: {\n        nullableProp1: {\n            description: 'This is a simple string property',\n            type: 'string',\n            nullable: true\n        },\n        nullableRequiredProp1: {\n            description: 'This is a simple string property',\n            type: 'string',\n            nullable: true\n        },\n        nullableProp2: {\n            description: 'This is a simple string property',\n            nullable: true,\n            type: 'string'\n        },\n        nullableRequiredProp2: {\n            description: 'This is a simple string property',\n            nullable: true,\n            type: 'string'\n        },\n        'foo_bar-enum': {\n            description: 'This is a simple enum with strings',\n            enum: [\n                'Success',\n                'Warning',\n                'Error',\n                'ØÆÅ字符串'\n            ]\n        }\n    }\n} as const;\n\nexport const ModelWithEnumSchema = {\n    description: 'This is a model with one enum',\n    type: 'object',\n    properties: {\n        'foo_bar-enum': {\n            description: 'This is a simple enum with strings',\n            enum: [\n                'Success',\n                'Warning',\n                'Error',\n                'ØÆÅ字符串'\n            ]\n        },\n        statusCode: {\n            description: 'These are the HTTP error code enums',\n            enum: [\n                '100',\n                '200 FOO',\n                '300 FOO_BAR',\n                '400 foo-bar',\n                '500 foo.bar',\n                '600 foo&bar'\n            ]\n        },\n        bool: {\n            description: 'Simple boolean enum',\n            type: 'boolean',\n            enum: [\n                true\n            ]\n        }\n    }\n} as const;\n\nexport const ModelWithEnumWithHyphenSchema = {\n    description: 'This is a model with one enum with escaped name',\n    type: 'object',\n    properties: {\n        'foo-bar-baz-qux': {\n            type: 'string',\n            enum: [\n                '3.0'\n            ],\n            title: 'Foo-Bar-Baz-Qux',\n            default: '3.0'\n        }\n    }\n} as const;\n\nexport const ModelWithEnumFromDescriptionSchema = {\n    description: 'This is a model with one enum',\n    type: 'object',\n    properties: {\n        test: {\n            type: 'integer',\n            description: 'Success=1,Warning=2,Error=3'\n        }\n    }\n} as const;\n\nexport const ModelWithNestedEnumsSchema = {\n    description: 'This is a model with nested enums',\n    type: 'object',\n    properties: {\n        dictionaryWithEnum: {\n            type: 'object',\n            additionalProperties: {\n                enum: [\n                    'Success',\n                    'Warning',\n                    'Error'\n                ]\n            }\n        },\n        dictionaryWithEnumFromDescription: {\n            type: 'object',\n            additionalProperties: {\n                type: 'integer',\n                description: 'Success=1,Warning=2,Error=3'\n            }\n        },\n        arrayWithEnum: {\n            type: 'array',\n            items: {\n                enum: [\n                    'Success',\n                    'Warning',\n                    'Error'\n                ]\n            }\n        },\n        arrayWithDescription: {\n            type: 'array',\n            items: {\n                type: 'integer',\n                description: 'Success=1,Warning=2,Error=3'\n            }\n        },\n        'foo_bar-enum': {\n            description: 'This is a simple enum with strings',\n            enum: [\n                'Success',\n                'Warning',\n                'Error',\n                'ØÆÅ字符串'\n            ]\n        }\n    }\n} as const;\n\nexport const ModelWithReferenceSchema = {\n    description: 'This is a model with one property containing a reference',\n    type: 'object',\n    properties: {\n        prop: {\n            $ref: '#/components/schemas/ModelWithProperties'\n        }\n    }\n} as const;\n\nexport const ModelWithArrayReadOnlyAndWriteOnlySchema = {\n    description: 'This is a model with one property containing an array',\n    type: 'object',\n    properties: {\n        prop: {\n            type: 'array',\n            items: {\n                $ref: '#/components/schemas/ModelWithReadOnlyAndWriteOnly'\n            }\n        },\n        propWithFile: {\n            type: 'array',\n            items: {\n                format: 'binary',\n                type: 'string'\n            }\n        },\n        propWithNumber: {\n            type: 'array',\n            items: {\n                type: 'number'\n            }\n        }\n    }\n} as const;\n\nexport const ModelWithArraySchema = {\n    description: 'This is a model with one property containing an array',\n    type: 'object',\n    properties: {\n        prop: {\n            type: 'array',\n            items: {\n                $ref: '#/components/schemas/ModelWithString'\n            }\n        },\n        propWithFile: {\n            type: 'array',\n            items: {\n                format: 'binary',\n                type: 'string'\n            }\n        },\n        propWithNumber: {\n            type: 'array',\n            items: {\n                type: 'number'\n            }\n        }\n    }\n} as const;\n\nexport const ModelWithDictionarySchema = {\n    description: 'This is a model with one property containing a dictionary',\n    type: 'object',\n    properties: {\n        prop: {\n            type: 'object',\n            additionalProperties: {\n                type: 'string'\n            }\n        }\n    }\n} as const;\n\nexport const DeprecatedModelSchema = {\n    deprecated: true,\n    description: 'This is a deprecated model with a deprecated property',\n    type: 'object',\n    properties: {\n        prop: {\n            deprecated: true,\n            description: 'This is a deprecated property',\n            type: 'string'\n        }\n    }\n} as const;\n\nexport const ModelWithCircularReferenceSchema = {\n    description: 'This is a model with one property containing a circular reference',\n    type: 'object',\n    properties: {\n        prop: {\n            $ref: '#/components/schemas/ModelWithCircularReference'\n        }\n    }\n} as const;\n\nexport const CompositionWithOneOfSchema = {\n    description: 'This is a model with one property with a \\'one of\\' relationship',\n    type: 'object',\n    properties: {\n        propA: {\n            type: 'object',\n            oneOf: [\n                {\n                    $ref: '#/components/schemas/ModelWithString'\n                },\n                {\n                    $ref: '#/components/schemas/ModelWithEnum'\n                },\n                {\n                    $ref: '#/components/schemas/ModelWithArray'\n                },\n                {\n                    $ref: '#/components/schemas/ModelWithDictionary'\n                }\n            ]\n        }\n    }\n} as const;\n\nexport const CompositionWithOneOfAnonymousSchema = {\n    description: 'This is a model with one property with a \\'one of\\' relationship where the options are not $ref',\n    type: 'object',\n    properties: {\n        propA: {\n            type: 'object',\n            oneOf: [\n                {\n                    description: 'Anonymous object type',\n                    type: 'object',\n                    properties: {\n                        propA: {\n                            type: 'string'\n                        }\n                    }\n                },\n                {\n                    description: 'Anonymous string type',\n                    type: 'string'\n                },\n                {\n                    description: 'Anonymous integer type',\n                    type: 'integer'\n                }\n            ]\n        }\n    }\n} as const;\n\nexport const ModelCircleSchema = {\n    description: 'Circle',\n    type: 'object',\n    required: [\n        'kind'\n    ],\n    properties: {\n        kind: {\n            type: 'string'\n        },\n        radius: {\n            type: 'number'\n        }\n    }\n} as const;\n\nexport const ModelSquareSchema = {\n    description: 'Square',\n    type: 'object',\n    required: [\n        'kind'\n    ],\n    properties: {\n        kind: {\n            type: 'string'\n        },\n        sideLength: {\n            type: 'number'\n        }\n    }\n} as const;\n\nexport const CompositionWithOneOfDiscriminatorSchema = {\n    description: 'This is a model with one property with a \\'one of\\' relationship where the options are not $ref',\n    type: 'object',\n    oneOf: [\n        {\n            $ref: '#/components/schemas/ModelCircle'\n        },\n        {\n            $ref: '#/components/schemas/ModelSquare'\n        }\n    ],\n    discriminator: {\n        propertyName: 'kind',\n        mapping: {\n            circle: '#/components/schemas/ModelCircle',\n            square: '#/components/schemas/ModelSquare'\n        }\n    }\n} as const;\n\nexport const CompositionWithAnyOfSchema = {\n    description: 'This is a model with one property with a \\'any of\\' relationship',\n    type: 'object',\n    properties: {\n        propA: {\n            type: 'object',\n            anyOf: [\n                {\n                    $ref: '#/components/schemas/ModelWithString'\n                },\n                {\n                    $ref: '#/components/schemas/ModelWithEnum'\n                },\n                {\n                    $ref: '#/components/schemas/ModelWithArray'\n                },\n                {\n                    $ref: '#/components/schemas/ModelWithDictionary'\n                }\n            ]\n        }\n    }\n} as const;\n\nexport const CompositionWithAnyOfAnonymousSchema = {\n    description: 'This is a model with one property with a \\'any of\\' relationship where the options are not $ref',\n    type: 'object',\n    properties: {\n        propA: {\n            type: 'object',\n            anyOf: [\n                {\n                    description: 'Anonymous object type',\n                    type: 'object',\n                    properties: {\n                        propA: {\n                            type: 'string'\n                        }\n                    }\n                },\n                {\n                    description: 'Anonymous string type',\n                    type: 'string'\n                },\n                {\n                    description: 'Anonymous integer type',\n                    type: 'integer'\n                }\n            ]\n        }\n    }\n} as const;\n\nexport const CompositionWithNestedAnyAndTypeNullSchema = {\n    description: 'This is a model with nested \\'any of\\' property with a type null',\n    type: 'object',\n    properties: {\n        propA: {\n            type: 'object',\n            anyOf: [\n                {\n                    items: {\n                        nullable: true,\n                        allOf: [\n                            {\n                                $ref: '#/components/schemas/ModelWithDictionary'\n                            }\n                        ]\n                    },\n                    type: 'array'\n                },\n                {\n                    items: {\n                        nullable: true,\n                        allOf: [\n                            {\n                                $ref: '#/components/schemas/ModelWithArray'\n                            }\n                        ]\n                    },\n                    type: 'array'\n                }\n            ]\n        }\n    }\n} as const;\n\nexport const _3e_num_1ПериодSchema = {\n    enum: [\n        'Bird',\n        'Dog'\n    ],\n    type: 'string'\n} as const;\n\nexport const ConstValueSchema = {\n    enum: [\n        'ConstValue'\n    ],\n    type: 'string'\n} as const;\n\nexport const CompositionWithNestedAnyOfAndNullSchema = {\n    description: 'This is a model with one property with a \\'any of\\' relationship where the options are not $ref',\n    type: 'object',\n    properties: {\n        propA: {\n            nullable: true,\n            allOf: [\n                {\n                    items: {\n                        anyOf: [\n                            {\n                                $ref: '#/components/schemas/3e-num_1Период'\n                            },\n                            {\n                                $ref: '#/components/schemas/ConstValue'\n                            }\n                        ]\n                    },\n                    type: 'array'\n                }\n            ],\n            title: 'Scopes'\n        }\n    }\n} as const;\n\nexport const CompositionWithOneOfAndNullableSchema = {\n    description: 'This is a model with one property with a \\'one of\\' relationship',\n    type: 'object',\n    properties: {\n        propA: {\n            nullable: true,\n            type: 'object',\n            oneOf: [\n                {\n                    type: 'object',\n                    properties: {\n                        boolean: {\n                            type: 'boolean'\n                        }\n                    }\n                },\n                {\n                    $ref: '#/components/schemas/ModelWithEnum'\n                },\n                {\n                    $ref: '#/components/schemas/ModelWithArray'\n                },\n                {\n                    $ref: '#/components/schemas/ModelWithDictionary'\n                }\n            ]\n        }\n    }\n} as const;\n\nexport const CompositionWithOneOfAndSimpleDictionarySchema = {\n    description: 'This is a model that contains a simple dictionary within composition',\n    type: 'object',\n    properties: {\n        propA: {\n            oneOf: [\n                {\n                    type: 'boolean'\n                },\n                {\n                    type: 'object',\n                    additionalProperties: {\n                        type: 'number'\n                    }\n                }\n            ]\n        }\n    }\n} as const;\n\nexport const CompositionWithOneOfAndSimpleArrayDictionarySchema = {\n    description: 'This is a model that contains a dictionary of simple arrays within composition',\n    type: 'object',\n    properties: {\n        propA: {\n            oneOf: [\n                {\n                    type: 'boolean'\n                },\n                {\n                    type: 'object',\n                    additionalProperties: {\n                        type: 'array',\n                        items: {\n                            type: 'boolean'\n                        }\n                    }\n                }\n            ]\n        }\n    }\n} as const;\n\nexport const CompositionWithOneOfAndComplexArrayDictionarySchema = {\n    description: 'This is a model that contains a dictionary of complex arrays (composited) within composition',\n    type: 'object',\n    properties: {\n        propA: {\n            oneOf: [\n                {\n                    type: 'boolean'\n                },\n                {\n                    type: 'object',\n                    additionalProperties: {\n                        type: 'array',\n                        items: {\n                            oneOf: [\n                                {\n                                    type: 'number'\n                                },\n                                {\n                                    type: 'string'\n                                }\n                            ]\n                        }\n                    }\n                }\n            ]\n        }\n    }\n} as const;\n\nexport const CompositionWithAllOfAndNullableSchema = {\n    description: 'This is a model with one property with a \\'all of\\' relationship',\n    type: 'object',\n    properties: {\n        propA: {\n            nullable: true,\n            type: 'object',\n            allOf: [\n                {\n                    type: 'object',\n                    properties: {\n                        boolean: {\n                            type: 'boolean'\n                        }\n                    }\n                },\n                {\n                    $ref: '#/components/schemas/ModelWithEnum'\n                },\n                {\n                    $ref: '#/components/schemas/ModelWithArray'\n                },\n                {\n                    $ref: '#/components/schemas/ModelWithDictionary'\n                }\n            ]\n        }\n    }\n} as const;\n\nexport const CompositionWithAnyOfAndNullableSchema = {\n    description: 'This is a model with one property with a \\'any of\\' relationship',\n    type: 'object',\n    properties: {\n        propA: {\n            nullable: true,\n            type: 'object',\n            anyOf: [\n                {\n                    type: 'object',\n                    properties: {\n                        boolean: {\n                            type: 'boolean'\n                        }\n                    }\n                },\n                {\n                    $ref: '#/components/schemas/ModelWithEnum'\n                },\n                {\n                    $ref: '#/components/schemas/ModelWithArray'\n                },\n                {\n                    $ref: '#/components/schemas/ModelWithDictionary'\n                }\n            ]\n        }\n    }\n} as const;\n\nexport const CompositionBaseModelSchema = {\n    description: 'This is a base model with two simple optional properties',\n    type: 'object',\n    properties: {\n        firstName: {\n            type: 'string'\n        },\n        lastname: {\n            type: 'string'\n        }\n    }\n} as const;\n\nexport const CompositionExtendedModelSchema = {\n    description: 'This is a model that extends the base model',\n    type: 'object',\n    allOf: [\n        {\n            $ref: '#/components/schemas/CompositionBaseModel'\n        }\n    ],\n    properties: {\n        age: {\n            type: 'number'\n        }\n    },\n    required: [\n        'firstName',\n        'lastname',\n        'age'\n    ]\n} as const;\n\nexport const ModelWithPropertiesSchema = {\n    description: 'This is a model with one nested property',\n    type: 'object',\n    required: [\n        'required',\n        'requiredAndReadOnly',\n        'requiredAndNullable'\n    ],\n    properties: {\n        required: {\n            type: 'string'\n        },\n        requiredAndReadOnly: {\n            type: 'string',\n            readOnly: true\n        },\n        requiredAndNullable: {\n            type: 'string',\n            nullable: true\n        },\n        string: {\n            type: 'string'\n        },\n        number: {\n            type: 'number'\n        },\n        boolean: {\n            type: 'boolean'\n        },\n        reference: {\n            $ref: '#/components/schemas/ModelWithString'\n        },\n        'property with space': {\n            type: 'string'\n        },\n        default: {\n            type: 'string'\n        },\n        try: {\n            type: 'string'\n        },\n        '@namespace.string': {\n            type: 'string',\n            readOnly: true\n        },\n        '@namespace.integer': {\n            type: 'integer',\n            readOnly: true\n        }\n    }\n} as const;\n\nexport const ModelWithNestedPropertiesSchema = {\n    description: 'This is a model with one nested property',\n    type: 'object',\n    required: [\n        'first'\n    ],\n    properties: {\n        first: {\n            type: 'object',\n            required: [\n                'second'\n            ],\n            readOnly: true,\n            nullable: true,\n            properties: {\n                second: {\n                    type: 'object',\n                    required: [\n                        'third'\n                    ],\n                    readOnly: true,\n                    nullable: true,\n                    properties: {\n                        third: {\n                            type: 'string',\n                            required: true,\n                            readOnly: true,\n                            nullable: true\n                        }\n                    }\n                }\n            }\n        }\n    }\n} as const;\n\nexport const ModelWithDuplicatePropertiesSchema = {\n    description: 'This is a model with duplicated properties',\n    type: 'object',\n    properties: {\n        prop: {\n            $ref: '#/components/schemas/ModelWithString'\n        }\n    }\n} as const;\n\nexport const ModelWithOrderedPropertiesSchema = {\n    description: 'This is a model with ordered properties',\n    type: 'object',\n    properties: {\n        zebra: {\n            type: 'string'\n        },\n        apple: {\n            type: 'string'\n        },\n        hawaii: {\n            type: 'string'\n        }\n    }\n} as const;\n\nexport const ModelWithDuplicateImportsSchema = {\n    description: 'This is a model with duplicated imports',\n    type: 'object',\n    properties: {\n        propA: {\n            $ref: '#/components/schemas/ModelWithString'\n        },\n        propB: {\n            $ref: '#/components/schemas/ModelWithString'\n        },\n        propC: {\n            $ref: '#/components/schemas/ModelWithString'\n        }\n    }\n} as const;\n\nexport const ModelThatExtendsSchema = {\n    description: 'This is a model that extends another model',\n    type: 'object',\n    allOf: [\n        {\n            $ref: '#/components/schemas/ModelWithString'\n        },\n        {\n            type: 'object',\n            properties: {\n                propExtendsA: {\n                    type: 'string'\n                },\n                propExtendsB: {\n                    $ref: '#/components/schemas/ModelWithString'\n                }\n            }\n        }\n    ]\n} as const;\n\nexport const ModelThatExtendsExtendsSchema = {\n    description: 'This is a model that extends another model',\n    type: 'object',\n    allOf: [\n        {\n            $ref: '#/components/schemas/ModelWithString'\n        },\n        {\n            $ref: '#/components/schemas/ModelThatExtends'\n        },\n        {\n            type: 'object',\n            properties: {\n                propExtendsC: {\n                    type: 'string'\n                },\n                propExtendsD: {\n                    $ref: '#/components/schemas/ModelWithString'\n                }\n            }\n        }\n    ]\n} as const;\n\nexport const ModelWithPatternSchema = {\n    description: 'This is a model that contains a some patterns',\n    type: 'object',\n    required: [\n        'key',\n        'name'\n    ],\n    properties: {\n        key: {\n            maxLength: 64,\n            pattern: '^[a-zA-Z0-9_]*$',\n            type: 'string'\n        },\n        name: {\n            maxLength: 255,\n            type: 'string'\n        },\n        enabled: {\n            type: 'boolean',\n            readOnly: true\n        },\n        modified: {\n            type: 'string',\n            format: 'date-time',\n            readOnly: true\n        },\n        id: {\n            type: 'string',\n            pattern: '^\\\\d{2}-\\\\d{3}-\\\\d{4}$'\n        },\n        text: {\n            type: 'string',\n            pattern: '^\\\\w+$'\n        },\n        patternWithSingleQuotes: {\n            type: 'string',\n            pattern: '^[a-zA-Z0-9\\']*$'\n        },\n        patternWithNewline: {\n            type: 'string',\n            pattern: 'aaa\\\\nbbb'\n        },\n        patternWithBacktick: {\n            type: 'string',\n            pattern: 'aaa`bbb'\n        },\n        patternWithUnicode: {\n            type: 'string',\n            pattern: '^\\\\p{L}+$'\n        }\n    }\n} as const;\n\nexport const FileSchema = {\n    required: [\n        'mime'\n    ],\n    type: 'object',\n    properties: {\n        id: {\n            title: 'Id',\n            type: 'string',\n            readOnly: true,\n            minLength: 1\n        },\n        updated_at: {\n            title: 'Updated at',\n            type: 'string',\n            format: 'date-time',\n            readOnly: true\n        },\n        created_at: {\n            title: 'Created at',\n            type: 'string',\n            format: 'date-time',\n            readOnly: true\n        },\n        mime: {\n            title: 'Mime',\n            type: 'string',\n            maxLength: 24,\n            minLength: 1\n        },\n        file: {\n            title: 'File',\n            type: 'string',\n            readOnly: true,\n            format: 'uri'\n        }\n    }\n} as const;\n\nexport const defaultSchema = {\n    type: 'object',\n    properties: {\n        name: {\n            type: 'string'\n        }\n    }\n} as const;\n\nexport const PageableSchema = {\n    type: 'object',\n    properties: {\n        page: {\n            minimum: 0,\n            type: 'integer',\n            format: 'int32',\n            default: 0\n        },\n        size: {\n            minimum: 1,\n            type: 'integer',\n            format: 'int32'\n        },\n        sort: {\n            type: 'array',\n            items: {\n                type: 'string'\n            }\n        }\n    }\n} as const;\n\nexport const FreeFormObjectWithoutAdditionalPropertiesSchema = {\n    description: 'This is a free-form object without additionalProperties.',\n    type: 'object'\n} as const;\n\nexport const FreeFormObjectWithAdditionalPropertiesEqTrueSchema = {\n    description: 'This is a free-form object with additionalProperties: true.',\n    type: 'object',\n    additionalProperties: true\n} as const;\n\nexport const FreeFormObjectWithAdditionalPropertiesEqEmptyObjectSchema = {\n    description: 'This is a free-form object with additionalProperties: {}.',\n    type: 'object',\n    additionalProperties: {}\n} as const;\n\nexport const ModelWithConstSchema = {\n    type: 'object',\n    properties: {\n        String: {\n            enum: [\n                'String'\n            ],\n            type: 'string'\n        },\n        number: {\n            enum: [\n                0\n            ],\n            type: 'number'\n        },\n        null: {\n            nullable: true\n        },\n        withType: {\n            enum: [\n                'Some string'\n            ],\n            type: 'string'\n        }\n    }\n} as const;\n\nexport const ModelWithAdditionalPropertiesEqTrueSchema = {\n    description: 'This is a model with one property and additionalProperties: true',\n    type: 'object',\n    properties: {\n        prop: {\n            description: 'This is a simple string property',\n            type: 'string'\n        }\n    },\n    additionalProperties: true\n} as const;\n\nexport const NestedAnyOfArraysNullableSchema = {\n    properties: {\n        nullableArray: {\n            nullable: true,\n            allOf: [\n                {\n                    items: {\n                        anyOf: [\n                            {\n                                type: 'string'\n                            },\n                            {\n                                type: 'boolean'\n                            }\n                        ]\n                    },\n                    type: 'array'\n                }\n            ]\n        }\n    },\n    type: 'object'\n} as const;\n\nexport const CompositionWithOneOfAndPropertiesSchema = {\n    type: 'object',\n    oneOf: [\n        {\n            type: 'object',\n            required: [\n                'foo'\n            ],\n            properties: {\n                foo: {\n                    $ref: '#/components/parameters/SimpleParameter'\n                }\n            },\n            additionalProperties: false\n        },\n        {\n            type: 'object',\n            required: [\n                'bar'\n            ],\n            properties: {\n                bar: {\n                    $ref: '#/components/schemas/NonAsciiStringæøåÆØÅöôêÊ字符串'\n                }\n            },\n            additionalProperties: false\n        }\n    ],\n    required: [\n        'baz',\n        'qux'\n    ],\n    properties: {\n        baz: {\n            type: 'integer',\n            format: 'uint16',\n            minimum: 0,\n            nullable: true\n        },\n        qux: {\n            type: 'integer',\n            format: 'uint8',\n            minimum: 0\n        }\n    }\n} as const;\n\nexport const NullableObjectSchema = {\n    description: 'An object that can be null',\n    nullable: true,\n    type: 'object',\n    properties: {\n        foo: {\n            type: 'string'\n        }\n    },\n    default: null\n} as const;\n\nexport const CharactersInDescriptionSchema = {\n    type: 'string',\n    description: 'Some % character'\n} as const;\n\nexport const ModelWithNullableObjectSchema = {\n    type: 'object',\n    properties: {\n        data: {\n            $ref: '#/components/schemas/NullableObject'\n        }\n    }\n} as const;\n\nexport const ModelWithAdditionalPropertiesRefSchema = {\n    type: 'object',\n    description: 'An object with additional properties that can be null',\n    additionalProperties: {\n        nullable: true,\n        allOf: [\n            {\n                $ref: '#/components/schemas/NullableObject'\n            }\n        ]\n    }\n} as const;\n\nexport const ModelWithOneOfEnumSchema = {\n    oneOf: [\n        {\n            type: 'object',\n            required: [\n                'foo'\n            ],\n            properties: {\n                foo: {\n                    type: 'string',\n                    enum: [\n                        'Bar'\n                    ]\n                }\n            }\n        },\n        {\n            type: 'object',\n            required: [\n                'foo'\n            ],\n            properties: {\n                foo: {\n                    type: 'string',\n                    enum: [\n                        'Baz'\n                    ]\n                }\n            }\n        },\n        {\n            type: 'object',\n            required: [\n                'foo'\n            ],\n            properties: {\n                foo: {\n                    type: 'string',\n                    enum: [\n                        'Qux'\n                    ]\n                }\n            }\n        },\n        {\n            type: 'object',\n            required: [\n                'content',\n                'foo'\n            ],\n            properties: {\n                content: {\n                    type: 'string',\n                    format: 'date-time'\n                },\n                foo: {\n                    type: 'string',\n                    enum: [\n                        'Quux'\n                    ]\n                }\n            }\n        },\n        {\n            type: 'object',\n            required: [\n                'content',\n                'foo'\n            ],\n            properties: {\n                content: {\n                    type: 'array',\n                    items: {\n                        type: 'string',\n                        format: 'date-time'\n                    },\n                    maxItems: 2,\n                    minItems: 2\n                },\n                foo: {\n                    type: 'string',\n                    enum: [\n                        'Corge'\n                    ]\n                }\n            }\n        }\n    ]\n} as const;\n\nexport const ModelWithNestedArrayEnumsDataFooSchema = {\n    enum: [\n        'foo',\n        'bar'\n    ],\n    type: 'string'\n} as const;\n\nexport const ModelWithNestedArrayEnumsDataBarSchema = {\n    enum: [\n        'baz',\n        'qux'\n    ],\n    type: 'string'\n} as const;\n\nexport const ModelWithNestedArrayEnumsDataSchema = {\n    type: 'object',\n    properties: {\n        foo: {\n            type: 'array',\n            items: {\n                $ref: '#/components/schemas/ModelWithNestedArrayEnumsDataFoo'\n            }\n        },\n        bar: {\n            type: 'array',\n            items: {\n                $ref: '#/components/schemas/ModelWithNestedArrayEnumsDataBar'\n            }\n        }\n    }\n} as const;\n\nexport const ModelWithNestedArrayEnumsSchema = {\n    type: 'object',\n    properties: {\n        array_strings: {\n            type: 'array',\n            items: {\n                type: 'string'\n            }\n        },\n        data: {\n            allOf: [\n                {\n                    $ref: '#/components/schemas/ModelWithNestedArrayEnumsData'\n                }\n            ]\n        }\n    }\n} as const;\n\nexport const ModelWithNestedCompositionEnumsSchema = {\n    type: 'object',\n    properties: {\n        foo: {\n            allOf: [\n                {\n                    $ref: '#/components/schemas/ModelWithNestedArrayEnumsDataFoo'\n                }\n            ]\n        }\n    }\n} as const;\n\nexport const ModelWithReadOnlyAndWriteOnlySchema = {\n    type: 'object',\n    required: [\n        'foo',\n        'bar'\n    ],\n    properties: {\n        foo: {\n            type: 'string'\n        },\n        bar: {\n            readOnly: true,\n            type: 'string'\n        }\n    }\n} as const;\n\nexport const ModelWithConstantSizeArraySchema = {\n    type: 'array',\n    items: {\n        type: 'number'\n    },\n    minItems: 2,\n    maxItems: 2\n} as const;\n\nexport const ModelWithAnyOfConstantSizeArraySchema = {\n    type: 'array',\n    items: {\n        oneOf: [\n            {\n                type: 'number'\n            },\n            {\n                type: 'string'\n            }\n        ]\n    },\n    minItems: 3,\n    maxItems: 3\n} as const;\n\nexport const ModelWithPrefixItemsConstantSizeArraySchema = {\n    type: 'array',\n    items: {\n        oneOf: [\n            {\n                $ref: '#/components/schemas/ModelWithInteger'\n            },\n            {\n                type: 'number'\n            },\n            {\n                type: 'string'\n            }\n        ]\n    }\n} as const;\n\nexport const ModelWithAnyOfConstantSizeArrayNullableSchema = {\n    type: 'array',\n    items: {\n        oneOf: [\n            {\n                type: 'number',\n                nullable: true\n            },\n            {\n                type: 'string'\n            }\n        ]\n    },\n    minItems: 3,\n    maxItems: 3\n} as const;\n\nexport const ModelWithAnyOfConstantSizeArrayWithNSizeAndOptionsSchema = {\n    type: 'array',\n    items: {\n        oneOf: [\n            {\n                type: 'number'\n            },\n            {\n                $ref: '#/components/schemas/import'\n            }\n        ]\n    },\n    minItems: 2,\n    maxItems: 2\n} as const;\n\nexport const ModelWithAnyOfConstantSizeArrayAndIntersectSchema = {\n    type: 'array',\n    items: {\n        allOf: [\n            {\n                type: 'number'\n            },\n            {\n                type: 'string'\n            }\n        ]\n    },\n    minItems: 2,\n    maxItems: 2\n} as const;\n\nexport const ModelWithNumericEnumUnionSchema = {\n    type: 'object',\n    properties: {\n        value: {\n            type: 'number',\n            description: 'Период',\n            enum: [\n                -10,\n                -1,\n                0,\n                1,\n                3,\n                6,\n                12\n            ]\n        }\n    }\n} as const;\n\nexport const ModelWithBackticksInDescriptionSchema = {\n    description: 'Some description with `back ticks`',\n    type: 'object',\n    properties: {\n        template: {\n            type: 'string',\n            description: 'The template `that` should be used for parsing and importing the contents of the CSV file.\\n\\n<br/><p>There is one placeholder currently supported:<ul>     <li><b>${x}</b> - refers to the n-th column in the CSV file, e.g. ${1}, ${2}, ...)</li></ul><p>Example of a correct JSON template:</p>\\n<pre>\\n[\\n  {\\n    \"resourceType\": \"Asset\",\\n    \"identifier\": {\\n      \"name\": \"${1}\",\\n      \"domain\": {\\n        \"name\": \"${2}\",\\n        \"community\": {\\n          \"name\": \"Some Community\"\\n        }\\n      }\\n    },\\n    \"attributes\" : {\\n      \"00000000-0000-0000-0000-000000003115\" : [ {\\n        \"value\" : \"${3}\"\\n      } ],\\n      \"00000000-0000-0000-0000-000000000222\" : [ {\\n        \"value\" : \"${4}\"\\n      } ]\\n    }\\n  }\\n]\\n</pre>'\n        }\n    }\n} as const;\n\nexport const ModelWithOneOfAndPropertiesSchema = {\n    type: 'object',\n    oneOf: [\n        {\n            $ref: '#/components/parameters/SimpleParameter'\n        },\n        {\n            $ref: '#/components/schemas/NonAsciiStringæøåÆØÅöôêÊ字符串'\n        }\n    ],\n    required: [\n        'baz',\n        'qux'\n    ],\n    properties: {\n        baz: {\n            type: 'integer',\n            format: 'uint16',\n            minimum: 0,\n            nullable: true\n        },\n        qux: {\n            type: 'integer',\n            format: 'uint8',\n            minimum: 0\n        }\n    }\n} as const;\n\nexport const ParameterSimpleParameterUnusedSchema = {\n    description: 'Model used to test deduplication strategy (unused)',\n    type: 'string'\n} as const;\n\nexport const PostServiceWithEmptyTagResponseSchema = {\n    description: 'Model used to test deduplication strategy',\n    type: 'string'\n} as const;\n\nexport const PostServiceWithEmptyTagResponse2Schema = {\n    description: 'Model used to test deduplication strategy',\n    type: 'string'\n} as const;\n\nexport const DeleteFooDataSchema = {\n    description: 'Model used to test deduplication strategy',\n    type: 'string'\n} as const;\n\nexport const DeleteFooData2Schema = {\n    description: 'Model used to test deduplication strategy',\n    type: 'string'\n} as const;\n\nexport const importSchema = {\n    description: 'Model with restricted keyword name',\n    type: 'string'\n} as const;\n\nexport const SchemaWithFormRestrictedKeysSchema = {\n    properties: {\n        description: {\n            type: 'string'\n        },\n        'x-enum-descriptions': {\n            type: 'string'\n        },\n        'x-enum-varnames': {\n            type: 'string'\n        },\n        'x-enumNames': {\n            type: 'string'\n        },\n        title: {\n            type: 'string'\n        },\n        object: {\n            type: 'object',\n            properties: {\n                description: {\n                    type: 'string'\n                },\n                'x-enum-descriptions': {\n                    type: 'string'\n                },\n                'x-enum-varnames': {\n                    type: 'string'\n                },\n                'x-enumNames': {\n                    type: 'string'\n                },\n                title: {\n                    type: 'string'\n                }\n            }\n        },\n        array: {\n            type: 'array',\n            items: {\n                type: 'object',\n                properties: {\n                    description: {\n                        type: 'string'\n                    },\n                    'x-enum-descriptions': {\n                        type: 'string'\n                    },\n                    'x-enum-varnames': {\n                        type: 'string'\n                    },\n                    'x-enumNames': {\n                        type: 'string'\n                    },\n                    title: {\n                        type: 'string'\n                    }\n                }\n            }\n        }\n    }\n} as const;\n\nexport const io_k8s_apimachinery_pkg_apis_meta_v1_DeleteOptionsSchema = {\n    description: 'This schema was giving PascalCase transformations a hard time',\n    properties: {\n        preconditions: {\n            allOf: [\n                {\n                    $ref: '#/components/schemas/io.k8s.apimachinery.pkg.apis.meta.v1.Preconditions'\n                }\n            ],\n            description: 'Must be fulfilled before a deletion is carried out. If not possible, a 409 Conflict status will be returned.'\n        }\n    },\n    type: 'object'\n} as const;\n\nexport const io_k8s_apimachinery_pkg_apis_meta_v1_PreconditionsSchema = {\n    description: 'This schema was giving PascalCase transformations a hard time',\n    properties: {\n        resourceVersion: {\n            description: 'Specifies the target ResourceVersion',\n            type: 'string'\n        },\n        uid: {\n            description: 'Specifies the target UID.',\n            type: 'string'\n        }\n    },\n    type: 'object'\n} as const;\n\nexport const AdditionalPropertiesUnknownIssueSchema = {\n    type: 'object',\n    additionalProperties: {\n        anyOf: [\n            {\n                type: 'string'\n            },\n            {\n                type: 'number'\n            }\n        ]\n    }\n} as const;\n\nexport const AdditionalPropertiesUnknownIssue2Schema = {\n    type: 'object',\n    additionalProperties: {\n        anyOf: [\n            {\n                type: 'string'\n            },\n            {\n                type: 'number'\n            }\n        ]\n    }\n} as const;\n\nexport const AdditionalPropertiesUnknownIssue3Schema = {\n    type: 'object',\n    allOf: [\n        {\n            type: 'string'\n        },\n        {\n            type: 'object',\n            required: [\n                'entries'\n            ],\n            properties: {\n                entries: {\n                    type: 'object',\n                    additionalProperties: {\n                        $ref: '#/components/schemas/AdditionalPropertiesUnknownIssue'\n                    }\n                }\n            }\n        }\n    ]\n} as const;\n\nexport const AdditionalPropertiesIntegerIssueSchema = {\n    type: 'object',\n    required: [\n        'value'\n    ],\n    properties: {\n        value: {\n            type: 'integer'\n        }\n    },\n    additionalProperties: {\n        type: 'integer'\n    }\n} as const;\n\nexport const OneOfAllOfIssueSchema = {\n    oneOf: [\n        {\n            allOf: [\n                {\n                    oneOf: [\n                        {\n                            $ref: '#/components/schemas/ConstValue'\n                        },\n                        {\n                            $ref: '#/components/schemas/Generic.Schema.Duplicate.Issue`1[System.Boolean]'\n                        }\n                    ]\n                },\n                {\n                    $ref: '#/components/schemas/3e-num_1Период'\n                }\n            ]\n        },\n        {\n            $ref: '#/components/schemas/Generic.Schema.Duplicate.Issue`1[System.String]'\n        }\n    ]\n} as const;\n\nexport const Generic_Schema_Duplicate_Issue_1_System_Boolean_Schema = {\n    type: 'object',\n    properties: {\n        item: {\n            type: 'boolean'\n        },\n        error: {\n            type: 'string',\n            nullable: true\n        },\n        hasError: {\n            type: 'boolean',\n            readOnly: true\n        },\n        data: {\n            type: 'object',\n            additionalProperties: false\n        }\n    },\n    additionalProperties: false\n} as const;\n\nexport const Generic_Schema_Duplicate_Issue_1_System_String_Schema = {\n    type: 'object',\n    properties: {\n        item: {\n            type: 'string',\n            nullable: true\n        },\n        error: {\n            type: 'string',\n            nullable: true\n        },\n        hasError: {\n            type: 'boolean',\n            readOnly: true\n        }\n    },\n    additionalProperties: false\n} as const;\n\nexport const ExternalSharedModelSchema = {\n    type: 'object',\n    properties: {\n        id: {\n            type: 'string'\n        },\n        name: {\n            type: 'string'\n        }\n    },\n    required: [\n        'id'\n    ]\n} as const;\n\nexport const ModelWithReferenceWritableSchema = {\n    description: 'This is a model with one property containing a reference',\n    type: 'object',\n    properties: {\n        prop: {\n            $ref: '#/components/schemas/ModelWithPropertiesWritable'\n        }\n    }\n} as const;\n\nexport const ModelWithArrayReadOnlyAndWriteOnlyWritableSchema = {\n    description: 'This is a model with one property containing an array',\n    type: 'object',\n    properties: {\n        prop: {\n            type: 'array',\n            items: {\n                $ref: '#/components/schemas/ModelWithReadOnlyAndWriteOnlyWritable'\n            }\n        },\n        propWithFile: {\n            type: 'array',\n            items: {\n                format: 'binary',\n                type: 'string'\n            }\n        },\n        propWithNumber: {\n            type: 'array',\n            items: {\n                type: 'number'\n            }\n        }\n    }\n} as const;\n\nexport const ModelWithPropertiesWritableSchema = {\n    description: 'This is a model with one nested property',\n    type: 'object',\n    required: [\n        'required',\n        'requiredAndNullable'\n    ],\n    properties: {\n        required: {\n            type: 'string'\n        },\n        requiredAndNullable: {\n            type: 'string',\n            nullable: true\n        },\n        string: {\n            type: 'string'\n        },\n        number: {\n            type: 'number'\n        },\n        boolean: {\n            type: 'boolean'\n        },\n        reference: {\n            $ref: '#/components/schemas/ModelWithString'\n        },\n        'property with space': {\n            type: 'string'\n        },\n        default: {\n            type: 'string'\n        },\n        try: {\n            type: 'string'\n        }\n    }\n} as const;\n\nexport const ModelWithPatternWritableSchema = {\n    description: 'This is a model that contains a some patterns',\n    type: 'object',\n    required: [\n        'key',\n        'name'\n    ],\n    properties: {\n        key: {\n            maxLength: 64,\n            pattern: '^[a-zA-Z0-9_]*$',\n            type: 'string'\n        },\n        name: {\n            maxLength: 255,\n            type: 'string'\n        },\n        id: {\n            type: 'string',\n            pattern: '^\\\\d{2}-\\\\d{3}-\\\\d{4}$'\n        },\n        text: {\n            type: 'string',\n            pattern: '^\\\\w+$'\n        },\n        patternWithSingleQuotes: {\n            type: 'string',\n            pattern: '^[a-zA-Z0-9\\']*$'\n        },\n        patternWithNewline: {\n            type: 'string',\n            pattern: 'aaa\\\\nbbb'\n        },\n        patternWithBacktick: {\n            type: 'string',\n            pattern: 'aaa`bbb'\n        },\n        patternWithUnicode: {\n            type: 'string',\n            pattern: '^\\\\p{L}+$'\n        }\n    }\n} as const;\n\nexport const FileWritableSchema = {\n    required: [\n        'mime'\n    ],\n    type: 'object',\n    properties: {\n        mime: {\n            title: 'Mime',\n            type: 'string',\n            maxLength: 24,\n            minLength: 1\n        }\n    }\n} as const;\n\nexport const ModelWithReadOnlyAndWriteOnlyWritableSchema = {\n    type: 'object',\n    required: [\n        'foo',\n        'baz'\n    ],\n    properties: {\n        foo: {\n            type: 'string'\n        },\n        baz: {\n            type: 'string',\n            writeOnly: true\n        }\n    }\n} as const;\n\nexport const ModelWithAnyOfConstantSizeArrayWithNSizeAndOptionsWritableSchema = {\n    type: 'array',\n    items: {\n        oneOf: [\n            {\n                type: 'number'\n            },\n            {\n                $ref: '#/components/schemas/import'\n            }\n        ]\n    },\n    minItems: 2,\n    maxItems: 2\n} as const;\n\nexport const AdditionalPropertiesUnknownIssueWritableSchema = {\n    type: 'object',\n    additionalProperties: {\n        anyOf: [\n            {\n                type: 'string'\n            },\n            {\n                type: 'number'\n            }\n        ]\n    }\n} as const;\n\nexport const OneOfAllOfIssueWritableSchema = {\n    oneOf: [\n        {\n            allOf: [\n                {\n                    oneOf: [\n                        {\n                            $ref: '#/components/schemas/ConstValue'\n                        },\n                        {\n                            $ref: '#/components/schemas/Generic.Schema.Duplicate.Issue`1[System.Boolean]'\n                        }\n                    ]\n                },\n                {\n                    $ref: '#/components/schemas/3e-num_1Период'\n                }\n            ]\n        },\n        {\n            $ref: '#/components/schemas/Generic.Schema.Duplicate.Issue`1[System.String]'\n        }\n    ]\n} as const;\n\nexport const Generic_Schema_Duplicate_Issue_1_System_Boolean_WritableSchema = {\n    type: 'object',\n    properties: {\n        item: {\n            type: 'boolean'\n        },\n        error: {\n            type: 'string',\n            nullable: true\n        },\n        data: {\n            type: 'object',\n            additionalProperties: false\n        }\n    },\n    additionalProperties: false\n} as const;\n\nexport const Generic_Schema_Duplicate_Issue_1_System_String_WritableSchema = {\n    type: 'object',\n    properties: {\n        item: {\n            type: 'string',\n            nullable: true\n        },\n        error: {\n            type: 'string',\n            nullable: true\n        }\n    },\n    additionalProperties: false\n} as const;\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@hey-api/sdk/default/client/client.gen.ts",
    "content": "// 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 (options: RequestOptions) => {\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 url = buildUrl(opts);\n\n    return { opts, url };\n  };\n\n  const request: Client['request'] = async (options) => {\n    // @ts-expect-error\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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@hey-api/sdk/default/client/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type { Auth } from '../core/auth.gen';\nexport type { QuerySerializerOptions } from '../core/bodySerializer.gen';\nexport {\n  formDataBodySerializer,\n  jsonBodySerializer,\n  urlSearchParamsBodySerializer,\n} from '../core/bodySerializer.gen';\nexport { buildClientParams } from '../core/params.gen';\nexport { serializeQueryKeyValue } from '../core/queryKeySerializer.gen';\nexport { createClient } from './client.gen';\nexport type {\n  Client,\n  ClientOptions,\n  Config,\n  CreateClientConfig,\n  Options,\n  RequestOptions,\n  RequestResult,\n  ResolvedRequestOptions,\n  ResponseStyle,\n  TDataShape,\n} from './types.gen';\nexport { createConfig, mergeHeaders } from './utils.gen';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@hey-api/sdk/default/client/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { Auth } from '../core/auth.gen';\nimport type {\n  ServerSentEventsOptions,\n  ServerSentEventsResult,\n} from '../core/serverSentEvents.gen';\nimport type { Client as CoreClient, Config as CoreConfig } from '../core/types.gen';\nimport type { Middleware } from './utils.gen';\n\nexport type ResponseStyle = 'data' | 'fields';\n\nexport interface Config<T extends ClientOptions = ClientOptions>\n  extends Omit<RequestInit, 'body' | 'headers' | 'method'>, CoreConfig {\n  /**\n   * Base URL for all requests made by this client.\n   */\n  baseUrl?: T['baseUrl'];\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   * Please don't use the Fetch client for Next.js applications. The `next`\n   * options won't have any effect.\n   *\n   * Install {@link https://www.npmjs.com/package/@hey-api/client-next `@hey-api/client-next`} instead.\n   */\n  next?: never;\n  /**\n   * Return the response data parsed in a specified format. By default, `auto`\n   * will infer the appropriate method from the `Content-Type` response header.\n   * You can override this behavior with any of the {@link Body} methods.\n   * Select `stream` if you don't want to parse response data at all.\n   *\n   * @default 'auto'\n   */\n  parseAs?: 'arrayBuffer' | 'auto' | 'blob' | 'formData' | 'json' | 'stream' | 'text';\n  /**\n   * Should we return only data or multiple fields (data, error, response, etc.)?\n   *\n   * @default 'fields'\n   */\n  responseStyle?: ResponseStyle;\n  /**\n   * Throw an error instead of returning it in the response?\n   *\n   * @default false\n   */\n  throwOnError?: T['throwOnError'];\n}\n\nexport interface RequestOptions<\n  TData = unknown,\n  TResponseStyle extends ResponseStyle = 'fields',\n  ThrowOnError extends boolean = boolean,\n  Url extends string = string,\n>\n  extends\n    Config<{\n      responseStyle: TResponseStyle;\n      throwOnError: ThrowOnError;\n    }>,\n    Pick<\n      ServerSentEventsOptions<TData>,\n      | 'onRequest'\n      | 'onSseError'\n      | 'onSseEvent'\n      | 'sseDefaultRetryDelay'\n      | 'sseMaxRetryAttempts'\n      | 'sseMaxRetryDelay'\n    > {\n  /**\n   * Any body that you want to add to your request.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/fetch#body}\n   */\n  body?: unknown;\n  path?: Record<string, unknown>;\n  query?: Record<string, unknown>;\n  /**\n   * Security mechanism(s) to use for the request.\n   */\n  security?: ReadonlyArray<Auth>;\n  url: Url;\n}\n\nexport interface ResolvedRequestOptions<\n  TResponseStyle extends ResponseStyle = 'fields',\n  ThrowOnError extends boolean = boolean,\n  Url extends string = string,\n> extends RequestOptions<unknown, TResponseStyle, ThrowOnError, Url> {\n  serializedBody?: string;\n}\n\nexport type RequestResult<\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = boolean,\n  TResponseStyle extends ResponseStyle = 'fields',\n> = ThrowOnError extends true\n  ? Promise<\n      TResponseStyle extends 'data'\n        ? TData extends Record<string, unknown>\n          ? TData[keyof TData]\n          : TData\n        : {\n            data: TData extends Record<string, unknown> ? TData[keyof TData] : TData;\n            request: Request;\n            response: Response;\n          }\n    >\n  : Promise<\n      TResponseStyle extends 'data'\n        ? (TData extends Record<string, unknown> ? TData[keyof TData] : TData) | undefined\n        : (\n            | {\n                data: TData extends Record<string, unknown> ? TData[keyof TData] : TData;\n                error: undefined;\n              }\n            | {\n                data: undefined;\n                error: TError extends Record<string, unknown> ? TError[keyof TError] : TError;\n              }\n          ) & {\n            request: Request;\n            response: Response;\n          }\n    >;\n\nexport interface ClientOptions {\n  baseUrl?: string;\n  responseStyle?: ResponseStyle;\n  throwOnError?: boolean;\n}\n\ntype MethodFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'>,\n) => RequestResult<TData, TError, ThrowOnError, TResponseStyle>;\n\ntype SseFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'>,\n) => Promise<ServerSentEventsResult<TData, TError>>;\n\ntype RequestFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'> &\n    Pick<Required<RequestOptions<TData, TResponseStyle, ThrowOnError>>, 'method'>,\n) => RequestResult<TData, TError, ThrowOnError, TResponseStyle>;\n\ntype BuildUrlFn = <\n  TData extends {\n    body?: unknown;\n    path?: Record<string, unknown>;\n    query?: Record<string, unknown>;\n    url: string;\n  },\n>(\n  options: TData & Options<TData>,\n) => string;\n\nexport type Client = CoreClient<RequestFn, Config, MethodFn, BuildUrlFn, SseFn> & {\n  interceptors: Middleware<Request, Response, unknown, ResolvedRequestOptions>;\n};\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 = ClientOptions> = (\n  override?: Config<ClientOptions & T>,\n) => Config<Required<ClientOptions> & T>;\n\nexport interface TDataShape {\n  body?: unknown;\n  headers?: unknown;\n  path?: unknown;\n  query?: unknown;\n  url: string;\n}\n\ntype OmitKeys<T, K> = Pick<T, Exclude<keyof T, K>>;\n\nexport type Options<\n  TData extends TDataShape = TDataShape,\n  ThrowOnError extends boolean = boolean,\n  TResponse = unknown,\n  TResponseStyle extends ResponseStyle = 'fields',\n> = OmitKeys<\n  RequestOptions<TResponse, TResponseStyle, ThrowOnError>,\n  'body' | 'path' | 'query' | 'url'\n> &\n  ([TData] extends [never] ? unknown : Omit<TData, 'url'>);\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@hey-api/sdk/default/client/utils.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@hey-api/sdk/default/client.gen.ts",
    "content": "// 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: 'http://localhost:3000/base' }));\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@hey-api/sdk/default/core/auth.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@hey-api/sdk/default/core/bodySerializer.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@hey-api/sdk/default/core/params.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@hey-api/sdk/default/core/pathSerializer.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@hey-api/sdk/default/core/queryKeySerializer.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\n/**\n * JSON-friendly union that mirrors what Pinia Colada can hash.\n */\nexport type JsonValue =\n  | null\n  | string\n  | number\n  | boolean\n  | JsonValue[]\n  | { [key: string]: JsonValue };\n\n/**\n * Replacer that converts non-JSON values (bigint, Date, etc.) to safe substitutes.\n */\nexport const queryKeyJsonReplacer = (_key: string, value: unknown) => {\n  if (value === undefined || typeof value === 'function' || typeof value === 'symbol') {\n    return undefined;\n  }\n  if (typeof value === 'bigint') {\n    return value.toString();\n  }\n  if (value instanceof Date) {\n    return value.toISOString();\n  }\n  return value;\n};\n\n/**\n * Safely stringifies a value and parses it back into a JsonValue.\n */\nexport const stringifyToJsonValue = (input: unknown): JsonValue | undefined => {\n  try {\n    const json = JSON.stringify(input, queryKeyJsonReplacer);\n    if (json === undefined) {\n      return undefined;\n    }\n    return JSON.parse(json) as JsonValue;\n  } catch {\n    return undefined;\n  }\n};\n\n/**\n * Detects plain objects (including objects with a null prototype).\n */\nconst isPlainObject = (value: unknown): value is Record<string, unknown> => {\n  if (value === null || typeof value !== 'object') {\n    return false;\n  }\n  const prototype = Object.getPrototypeOf(value as object);\n  return prototype === Object.prototype || prototype === null;\n};\n\n/**\n * Turns URLSearchParams into a sorted JSON object for deterministic keys.\n */\nconst serializeSearchParams = (params: URLSearchParams): JsonValue => {\n  const entries = Array.from(params.entries()).sort(([a], [b]) => a.localeCompare(b));\n  const result: Record<string, JsonValue> = {};\n\n  for (const [key, value] of entries) {\n    const existing = result[key];\n    if (existing === undefined) {\n      result[key] = value;\n      continue;\n    }\n\n    if (Array.isArray(existing)) {\n      (existing as string[]).push(value);\n    } else {\n      result[key] = [existing, value];\n    }\n  }\n\n  return result;\n};\n\n/**\n * Normalizes any accepted value into a JSON-friendly shape for query keys.\n */\nexport const serializeQueryKeyValue = (value: unknown): JsonValue | undefined => {\n  if (value === null) {\n    return null;\n  }\n\n  if (typeof value === 'string' || typeof value === 'number' || typeof value === 'boolean') {\n    return value;\n  }\n\n  if (value === undefined || typeof value === 'function' || typeof value === 'symbol') {\n    return undefined;\n  }\n\n  if (typeof value === 'bigint') {\n    return value.toString();\n  }\n\n  if (value instanceof Date) {\n    return value.toISOString();\n  }\n\n  if (Array.isArray(value)) {\n    return stringifyToJsonValue(value);\n  }\n\n  if (typeof URLSearchParams !== 'undefined' && value instanceof URLSearchParams) {\n    return serializeSearchParams(value);\n  }\n\n  if (isPlainObject(value)) {\n    return stringifyToJsonValue(value);\n  }\n\n  return undefined;\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@hey-api/sdk/default/core/serverSentEvents.gen.ts",
    "content": "// 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 const 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            // Normalize line endings: CRLF -> LF, then CR -> LF\n            buffer = buffer.replace(/\\r\\n/g, '\\n').replace(/\\r/g, '\\n');\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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@hey-api/sdk/default/core/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { Auth, AuthToken } from './auth.gen';\nimport type { BodySerializer, QuerySerializer, QuerySerializerOptions } from './bodySerializer.gen';\n\nexport type HttpMethod =\n  | 'connect'\n  | 'delete'\n  | 'get'\n  | 'head'\n  | 'options'\n  | 'patch'\n  | 'post'\n  | 'put'\n  | 'trace';\n\nexport type Client<\n  RequestFn = never,\n  Config = unknown,\n  MethodFn = never,\n  BuildUrlFn = never,\n  SseFn = never,\n> = {\n  /**\n   * Returns the final request URL.\n   */\n  buildUrl: BuildUrlFn;\n  getConfig: () => Config;\n  request: RequestFn;\n  setConfig: (config: Config) => Config;\n} & {\n  [K in HttpMethod]: MethodFn;\n} & ([SseFn] extends [never] ? { sse?: never } : { sse: { [K in HttpMethod]: SseFn } });\n\nexport interface Config {\n  /**\n   * Auth token or a function returning auth token. The resolved value will be\n   * added to the request payload as defined by its `security` array.\n   */\n  auth?: ((auth: Auth) => Promise<AuthToken> | AuthToken) | AuthToken;\n  /**\n   * A function for serializing request body parameter. By default,\n   * {@link JSON.stringify()} will be used.\n   */\n  bodySerializer?: BodySerializer | null;\n  /**\n   * An object containing any HTTP headers that you want to pre-populate your\n   * `Headers` object with.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/Headers/Headers#init See more}\n   */\n  headers?:\n    | RequestInit['headers']\n    | Record<\n        string,\n        string | number | boolean | (string | number | boolean)[] | null | undefined | unknown\n      >;\n  /**\n   * The request method.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/fetch#method See more}\n   */\n  method?: Uppercase<HttpMethod>;\n  /**\n   * A function for serializing request query parameters. By default, arrays\n   * will be exploded in form style, objects will be exploded in deepObject\n   * style, and reserved characters are percent-encoded.\n   *\n   * This method will have no effect if the native `paramsSerializer()` Axios\n   * API function is used.\n   *\n   * {@link https://swagger.io/docs/specification/serialization/#query View examples}\n   */\n  querySerializer?: QuerySerializer | QuerySerializerOptions;\n  /**\n   * A function validating request data. This is useful if you want to ensure\n   * the request conforms to the desired shape, so it can be safely sent to\n   * the server.\n   */\n  requestValidator?: (data: unknown) => Promise<unknown>;\n  /**\n   * A function transforming response data before it's returned. This is useful\n   * for post-processing data, e.g. converting ISO strings into Date objects.\n   */\n  responseTransformer?: (data: unknown) => Promise<unknown>;\n  /**\n   * A function validating response data. This is useful if you want to ensure\n   * the response conforms to the desired shape, so it can be safely passed to\n   * the transformers and returned to the user.\n   */\n  responseValidator?: (data: unknown) => Promise<unknown>;\n}\n\ntype IsExactlyNeverOrNeverUndefined<T> = [T] extends [never]\n  ? true\n  : [T] extends [never | undefined]\n    ? [undefined] extends [T]\n      ? false\n      : true\n    : false;\n\nexport type OmitNever<T extends Record<string, unknown>> = {\n  [K in keyof T as IsExactlyNeverOrNeverUndefined<T[K]> extends true ? never : K]: T[K];\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@hey-api/sdk/default/core/utils.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@hey-api/sdk/default/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport { apiVVersionODataControllerCount, callToTestOrderOfParams, callWithDefaultOptionalParameters, callWithDefaultParameters, callWithDescriptions, callWithDuplicateResponses, callWithNoContentResponse, callWithParameters, callWithResponse, callWithResponseAndNoContentResponse, callWithResponses, callWithResultFromHeader, callWithWeirdParameterNames, collectionFormat, complexParams, complexTypes, deleteCallWithoutParametersAndResponse, deleteFoo, deprecatedCall, dummyA, dummyB, duplicateName, duplicateName2, duplicateName3, duplicateName4, export_, fileResponse, fooWow, getApiVbyApiVersionSimpleOperation, getCallWithOptionalParam, getCallWithoutParametersAndResponse, headCallWithoutParametersAndResponse, import_, multipartRequest, multipartResponse, nonAsciiæøåÆøÅöôêÊ字符串, type Options, optionsCallWithoutParametersAndResponse, patchApiVbyApiVersionNoTag, patchCallWithoutParametersAndResponse, postApiVbyApiVersionFormData, postApiVbyApiVersionRequestBody, postCallWithOptionalParam, postCallWithoutParametersAndResponse, putCallWithoutParametersAndResponse, putWithFormUrlEncoded, testErrorCode, types, uploadFile } from './sdk.gen';\nexport type { _3eNum1Период, _400, AdditionalPropertiesIntegerIssue, AdditionalPropertiesUnknownIssue, AdditionalPropertiesUnknownIssue2, AdditionalPropertiesUnknownIssue3, AdditionalPropertiesUnknownIssueWritable, AnyOfAnyAndNull, AnyOfArrays, ApiVVersionODataControllerCountData, ApiVVersionODataControllerCountResponse, ApiVVersionODataControllerCountResponses, ArrayWithAnyOfProperties, ArrayWithArray, ArrayWithBooleans, ArrayWithNumbers, ArrayWithProperties, ArrayWithReferences, ArrayWithStrings, CallToTestOrderOfParamsData, CallWithDefaultOptionalParametersData, CallWithDefaultParametersData, CallWithDescriptionsData, CallWithDuplicateResponsesData, CallWithDuplicateResponsesError, CallWithDuplicateResponsesErrors, CallWithDuplicateResponsesResponse, CallWithDuplicateResponsesResponses, CallWithNoContentResponseData, CallWithNoContentResponseResponse, CallWithNoContentResponseResponses, CallWithParametersData, CallWithResponseAndNoContentResponseData, CallWithResponseAndNoContentResponseResponse, CallWithResponseAndNoContentResponseResponses, CallWithResponseData, CallWithResponseResponse, CallWithResponseResponses, CallWithResponsesData, CallWithResponsesError, CallWithResponsesErrors, CallWithResponsesResponse, CallWithResponsesResponses, CallWithResultFromHeaderData, CallWithResultFromHeaderErrors, CallWithResultFromHeaderResponses, CallWithWeirdParameterNamesData, CamelCaseCommentWithBreaks, CharactersInDescription, ClientOptions, CollectionFormatData, CommentWithBackticks, CommentWithBackticksAndQuotes, CommentWithBreaks, CommentWithExpressionPlaceholders, CommentWithQuotes, CommentWithReservedCharacters, CommentWithSlashes, ComplexParamsData, ComplexParamsResponse, ComplexParamsResponses, ComplexTypesData, ComplexTypesErrors, ComplexTypesResponse, ComplexTypesResponses, CompositionBaseModel, CompositionExtendedModel, CompositionWithAllOfAndNullable, CompositionWithAnyOf, CompositionWithAnyOfAndNullable, CompositionWithAnyOfAnonymous, CompositionWithNestedAnyAndTypeNull, CompositionWithNestedAnyOfAndNull, CompositionWithOneOf, CompositionWithOneOfAndComplexArrayDictionary, CompositionWithOneOfAndNullable, CompositionWithOneOfAndProperties, CompositionWithOneOfAndSimpleArrayDictionary, CompositionWithOneOfAndSimpleDictionary, CompositionWithOneOfAnonymous, CompositionWithOneOfDiscriminator, ConstValue, Default, DeleteCallWithoutParametersAndResponseData, DeleteFooData, DeleteFooData2, DeleteFooData3, DeprecatedCallData, DeprecatedModel, DictionaryWithArray, DictionaryWithDictionary, DictionaryWithProperties, DictionaryWithPropertiesAndAdditionalProperties, DictionaryWithReference, DictionaryWithString, DummyAData, DummyAResponse, DummyAResponses, DummyBData, DummyBResponse, DummyBResponses, DuplicateName2Data, DuplicateName3Data, DuplicateName4Data, DuplicateNameData, EnumFromDescription, EnumWithExtensions, EnumWithNumbers, EnumWithReplacedCharacters, EnumWithStrings, EnumWithXEnumNames, ExportData, ExternalRefA, ExternalRefB, ExternalSharedModel, File, FileResponseData, FileResponseResponse, FileResponseResponses, FileWritable, FooWowData, FooWowResponses, FreeFormObjectWithAdditionalPropertiesEqEmptyObject, FreeFormObjectWithAdditionalPropertiesEqTrue, FreeFormObjectWithoutAdditionalProperties, GenericSchemaDuplicateIssue1SystemBoolean, GenericSchemaDuplicateIssue1SystemBooleanWritable, GenericSchemaDuplicateIssue1SystemString, GenericSchemaDuplicateIssue1SystemStringWritable, GetApiVbyApiVersionSimpleOperationData, GetApiVbyApiVersionSimpleOperationError, GetApiVbyApiVersionSimpleOperationErrors, GetApiVbyApiVersionSimpleOperationResponse, GetApiVbyApiVersionSimpleOperationResponses, GetCallWithOptionalParamData, GetCallWithoutParametersAndResponseData, HeadCallWithoutParametersAndResponseData, Import, ImportData, ImportResponse, ImportResponses, IoK8sApimachineryPkgApisMetaV1DeleteOptions, IoK8sApimachineryPkgApisMetaV1Preconditions, ModelCircle, ModelFromZendesk, ModelSquare, ModelThatExtends, ModelThatExtendsExtends, ModelWithAdditionalPropertiesEqTrue, ModelWithAdditionalPropertiesRef, ModelWithAnyOfConstantSizeArray, ModelWithAnyOfConstantSizeArrayAndIntersect, ModelWithAnyOfConstantSizeArrayNullable, ModelWithAnyOfConstantSizeArrayWithNSizeAndOptions, ModelWithAnyOfConstantSizeArrayWithNSizeAndOptionsWritable, ModelWithArray, ModelWithArrayReadOnlyAndWriteOnly, ModelWithArrayReadOnlyAndWriteOnlyWritable, ModelWithBackticksInDescription, ModelWithBoolean, ModelWithCircularReference, ModelWithConst, ModelWithConstantSizeArray, ModelWithDictionary, ModelWithDuplicateImports, ModelWithDuplicateProperties, ModelWithEnum, ModelWithEnumFromDescription, ModelWithEnumWithHyphen, ModelWithInteger, ModelWithNestedArrayEnums, ModelWithNestedArrayEnumsData, ModelWithNestedArrayEnumsDataBar, ModelWithNestedArrayEnumsDataFoo, ModelWithNestedCompositionEnums, ModelWithNestedEnums, ModelWithNestedProperties, ModelWithNullableObject, ModelWithNullableString, ModelWithNumericEnumUnion, ModelWithOneOfAndProperties, ModelWithOneOfEnum, ModelWithOrderedProperties, ModelWithPattern, ModelWithPatternWritable, ModelWithPrefixItemsConstantSizeArray, ModelWithProperties, ModelWithPropertiesWritable, ModelWithReadOnlyAndWriteOnly, ModelWithReadOnlyAndWriteOnlyWritable, ModelWithReference, ModelWithReferenceWritable, ModelWithString, ModelWithStringError, MultipartRequestData, MultipartResponseData, MultipartResponseResponse, MultipartResponseResponses, NestedAnyOfArraysNullable, NonAsciiæøåÆøÅöôêÊ字符串Data, NonAsciiæøåÆøÅöôêÊ字符串Response, NonAsciiæøåÆøÅöôêÊ字符串Responses, NonAsciiStringæøåÆøÅöôêÊ字符串, NullableObject, OneOfAllOfIssue, OneOfAllOfIssueWritable, OptionsCallWithoutParametersAndResponseData, Pageable, ParameterSimpleParameterUnused, PatchApiVbyApiVersionNoTagData, PatchApiVbyApiVersionNoTagResponses, PatchCallWithoutParametersAndResponseData, PostApiVbyApiVersionFormDataData, PostApiVbyApiVersionRequestBodyData, PostCallWithOptionalParamData, PostCallWithOptionalParamResponse, PostCallWithOptionalParamResponses, PostCallWithoutParametersAndResponseData, PostServiceWithEmptyTagResponse, PostServiceWithEmptyTagResponse2, PutCallWithoutParametersAndResponseData, PutWithFormUrlEncodedData, SchemaWithFormRestrictedKeys, SimpleBoolean, SimpleFile, SimpleFormData, SimpleInteger, SimpleParameter, SimpleReference, SimpleRequestBody, SimpleString, SimpleStringWithPattern, TestErrorCodeData, TestErrorCodeErrors, TestErrorCodeResponses, TypesData, TypesResponse, TypesResponses, UploadFileData, UploadFileResponse, UploadFileResponses, XFooBar } from './types.gen';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@hey-api/sdk/default/sdk.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport { type Client, formDataBodySerializer, type Options as Options2, type TDataShape, urlSearchParamsBodySerializer } from './client';\nimport { client } from './client.gen';\nimport type { ApiVVersionODataControllerCountData, ApiVVersionODataControllerCountResponses, CallToTestOrderOfParamsData, CallWithDefaultOptionalParametersData, CallWithDefaultParametersData, CallWithDescriptionsData, CallWithDuplicateResponsesData, CallWithDuplicateResponsesErrors, CallWithDuplicateResponsesResponses, CallWithNoContentResponseData, CallWithNoContentResponseResponses, CallWithParametersData, CallWithResponseAndNoContentResponseData, CallWithResponseAndNoContentResponseResponses, CallWithResponseData, CallWithResponseResponses, CallWithResponsesData, CallWithResponsesErrors, CallWithResponsesResponses, CallWithResultFromHeaderData, CallWithResultFromHeaderErrors, CallWithResultFromHeaderResponses, CallWithWeirdParameterNamesData, CollectionFormatData, ComplexParamsData, ComplexParamsResponses, ComplexTypesData, ComplexTypesErrors, ComplexTypesResponses, DeleteCallWithoutParametersAndResponseData, DeleteFooData3, DeprecatedCallData, DummyAData, DummyAResponses, DummyBData, DummyBResponses, DuplicateName2Data, DuplicateName3Data, DuplicateName4Data, DuplicateNameData, ExportData, FileResponseData, FileResponseResponses, FooWowData, FooWowResponses, GetApiVbyApiVersionSimpleOperationData, GetApiVbyApiVersionSimpleOperationErrors, GetApiVbyApiVersionSimpleOperationResponses, GetCallWithOptionalParamData, GetCallWithoutParametersAndResponseData, HeadCallWithoutParametersAndResponseData, ImportData, ImportResponses, MultipartRequestData, MultipartResponseData, MultipartResponseResponses, NonAsciiæøåÆøÅöôêÊ字符串Data, NonAsciiæøåÆøÅöôêÊ字符串Responses, OptionsCallWithoutParametersAndResponseData, PatchApiVbyApiVersionNoTagData, PatchApiVbyApiVersionNoTagResponses, PatchCallWithoutParametersAndResponseData, PostApiVbyApiVersionFormDataData, PostApiVbyApiVersionRequestBodyData, PostCallWithOptionalParamData, PostCallWithOptionalParamResponses, PostCallWithoutParametersAndResponseData, PutCallWithoutParametersAndResponseData, PutWithFormUrlEncodedData, TestErrorCodeData, TestErrorCodeErrors, TestErrorCodeResponses, TypesData, TypesResponses, UploadFileData, UploadFileResponses } from './types.gen';\n\nexport type Options<TData extends TDataShape = TDataShape, ThrowOnError extends boolean = boolean> = Options2<TData, ThrowOnError> & {\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\nexport const export_ = <ThrowOnError extends boolean = false>(options?: Options<ExportData, ThrowOnError>) => (options?.client ?? client).get<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/no+tag', ...options });\n\nexport const patchApiVbyApiVersionNoTag = <ThrowOnError extends boolean = false>(options?: Options<PatchApiVbyApiVersionNoTagData, ThrowOnError>) => (options?.client ?? client).patch<PatchApiVbyApiVersionNoTagResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/no+tag', ...options });\n\nexport const import_ = <ThrowOnError extends boolean = false>(options: Options<ImportData, ThrowOnError>) => (options.client ?? client).post<ImportResponses, unknown, ThrowOnError>({\n    url: '/api/v{api-version}/no+tag',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options.headers\n    }\n});\n\nexport const fooWow = <ThrowOnError extends boolean = false>(options?: Options<FooWowData, ThrowOnError>) => (options?.client ?? client).put<FooWowResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/no+tag', ...options });\n\nexport const apiVVersionODataControllerCount = <ThrowOnError extends boolean = false>(options?: Options<ApiVVersionODataControllerCountData, ThrowOnError>) => (options?.client ?? client).get<ApiVVersionODataControllerCountResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple/$count', ...options });\n\nexport const getApiVbyApiVersionSimpleOperation = <ThrowOnError extends boolean = false>(options: Options<GetApiVbyApiVersionSimpleOperationData, ThrowOnError>) => (options.client ?? client).get<GetApiVbyApiVersionSimpleOperationResponses, GetApiVbyApiVersionSimpleOperationErrors, ThrowOnError>({ url: '/api/v{api-version}/simple:operation', ...options });\n\nexport const deleteCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<DeleteCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).delete<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const getCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<GetCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).get<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const headCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<HeadCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).head<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const optionsCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<OptionsCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).options<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const patchCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<PatchCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).patch<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const postCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<PostCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).post<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const putCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<PutCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).put<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const deleteFoo = <ThrowOnError extends boolean = false>(options: Options<DeleteFooData3, ThrowOnError>) => (options.client ?? client).delete<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/foo/{foo_param}/bar/{BarParam}', ...options });\n\nexport const callWithDescriptions = <ThrowOnError extends boolean = false>(options?: Options<CallWithDescriptionsData, ThrowOnError>) => (options?.client ?? client).post<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/descriptions', ...options });\n\n/**\n * @deprecated\n */\nexport const deprecatedCall = <ThrowOnError extends boolean = false>(options: Options<DeprecatedCallData, ThrowOnError>) => (options.client ?? client).post<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/parameters/deprecated', ...options });\n\nexport const callWithParameters = <ThrowOnError extends boolean = false>(options: Options<CallWithParametersData, ThrowOnError>) => (options.client ?? client).post<unknown, unknown, ThrowOnError>({\n    url: '/api/v{api-version}/parameters/{parameterPath}',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options.headers\n    }\n});\n\nexport const callWithWeirdParameterNames = <ThrowOnError extends boolean = false>(options: Options<CallWithWeirdParameterNamesData, ThrowOnError>) => (options.client ?? client).post<unknown, unknown, ThrowOnError>({\n    url: '/api/v{api-version}/parameters/{parameter.path.1}/{parameter-path-2}/{PARAMETER-PATH-3}',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options.headers\n    }\n});\n\nexport const getCallWithOptionalParam = <ThrowOnError extends boolean = false>(options: Options<GetCallWithOptionalParamData, ThrowOnError>) => (options.client ?? client).get<unknown, unknown, ThrowOnError>({\n    url: '/api/v{api-version}/parameters',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options.headers\n    }\n});\n\nexport const postCallWithOptionalParam = <ThrowOnError extends boolean = false>(options: Options<PostCallWithOptionalParamData, ThrowOnError>) => (options.client ?? client).post<PostCallWithOptionalParamResponses, unknown, ThrowOnError>({\n    url: '/api/v{api-version}/parameters',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options.headers\n    }\n});\n\nexport const postApiVbyApiVersionRequestBody = <ThrowOnError extends boolean = false>(options?: Options<PostApiVbyApiVersionRequestBodyData, ThrowOnError>) => (options?.client ?? client).post<unknown, unknown, ThrowOnError>({\n    url: '/api/v{api-version}/requestBody',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options?.headers\n    }\n});\n\nexport const postApiVbyApiVersionFormData = <ThrowOnError extends boolean = false>(options?: Options<PostApiVbyApiVersionFormDataData, ThrowOnError>) => (options?.client ?? client).post<unknown, unknown, ThrowOnError>({\n    ...formDataBodySerializer,\n    url: '/api/v{api-version}/formData',\n    ...options,\n    headers: {\n        'Content-Type': null,\n        ...options?.headers\n    }\n});\n\nexport const callWithDefaultParameters = <ThrowOnError extends boolean = false>(options?: Options<CallWithDefaultParametersData, ThrowOnError>) => (options?.client ?? client).get<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/defaults', ...options });\n\nexport const callWithDefaultOptionalParameters = <ThrowOnError extends boolean = false>(options?: Options<CallWithDefaultOptionalParametersData, ThrowOnError>) => (options?.client ?? client).post<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/defaults', ...options });\n\nexport const callToTestOrderOfParams = <ThrowOnError extends boolean = false>(options: Options<CallToTestOrderOfParamsData, ThrowOnError>) => (options.client ?? client).put<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/defaults', ...options });\n\nexport const duplicateName = <ThrowOnError extends boolean = false>(options?: Options<DuplicateNameData, ThrowOnError>) => (options?.client ?? client).delete<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/duplicate', ...options });\n\nexport const duplicateName2 = <ThrowOnError extends boolean = false>(options?: Options<DuplicateName2Data, ThrowOnError>) => (options?.client ?? client).get<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/duplicate', ...options });\n\nexport const duplicateName3 = <ThrowOnError extends boolean = false>(options?: Options<DuplicateName3Data, ThrowOnError>) => (options?.client ?? client).post<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/duplicate', ...options });\n\nexport const duplicateName4 = <ThrowOnError extends boolean = false>(options?: Options<DuplicateName4Data, ThrowOnError>) => (options?.client ?? client).put<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/duplicate', ...options });\n\nexport const callWithNoContentResponse = <ThrowOnError extends boolean = false>(options?: Options<CallWithNoContentResponseData, ThrowOnError>) => (options?.client ?? client).get<CallWithNoContentResponseResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/no-content', ...options });\n\nexport const callWithResponseAndNoContentResponse = <ThrowOnError extends boolean = false>(options?: Options<CallWithResponseAndNoContentResponseData, ThrowOnError>) => (options?.client ?? client).get<CallWithResponseAndNoContentResponseResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/multiple-tags/response-and-no-content', ...options });\n\nexport const dummyA = <ThrowOnError extends boolean = false>(options?: Options<DummyAData, ThrowOnError>) => (options?.client ?? client).get<DummyAResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/multiple-tags/a', ...options });\n\nexport const dummyB = <ThrowOnError extends boolean = false>(options?: Options<DummyBData, ThrowOnError>) => (options?.client ?? client).get<DummyBResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/multiple-tags/b', ...options });\n\nexport const callWithResponse = <ThrowOnError extends boolean = false>(options?: Options<CallWithResponseData, ThrowOnError>) => (options?.client ?? client).get<CallWithResponseResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/response', ...options });\n\nexport const callWithDuplicateResponses = <ThrowOnError extends boolean = false>(options?: Options<CallWithDuplicateResponsesData, ThrowOnError>) => (options?.client ?? client).post<CallWithDuplicateResponsesResponses, CallWithDuplicateResponsesErrors, ThrowOnError>({ url: '/api/v{api-version}/response', ...options });\n\nexport const callWithResponses = <ThrowOnError extends boolean = false>(options?: Options<CallWithResponsesData, ThrowOnError>) => (options?.client ?? client).put<CallWithResponsesResponses, CallWithResponsesErrors, ThrowOnError>({ url: '/api/v{api-version}/response', ...options });\n\nexport const collectionFormat = <ThrowOnError extends boolean = false>(options: Options<CollectionFormatData, ThrowOnError>) => (options.client ?? client).get<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/collectionFormat', ...options });\n\nexport const types = <ThrowOnError extends boolean = false>(options: Options<TypesData, ThrowOnError>) => (options.client ?? client).get<TypesResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/types', ...options });\n\nexport const uploadFile = <ThrowOnError extends boolean = false>(options: Options<UploadFileData, ThrowOnError>) => (options.client ?? client).post<UploadFileResponses, unknown, ThrowOnError>({\n    ...urlSearchParamsBodySerializer,\n    url: '/api/v{api-version}/upload',\n    ...options,\n    headers: {\n        'Content-Type': 'application/x-www-form-urlencoded',\n        ...options.headers\n    }\n});\n\nexport const fileResponse = <ThrowOnError extends boolean = false>(options: Options<FileResponseData, ThrowOnError>) => (options.client ?? client).get<FileResponseResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/file/{id}', ...options });\n\nexport const complexTypes = <ThrowOnError extends boolean = false>(options: Options<ComplexTypesData, ThrowOnError>) => (options.client ?? client).get<ComplexTypesResponses, ComplexTypesErrors, ThrowOnError>({\n    querySerializer: { parameters: { parameterObject: { object: { style: 'form' } } } },\n    url: '/api/v{api-version}/complex',\n    ...options\n});\n\nexport const multipartResponse = <ThrowOnError extends boolean = false>(options?: Options<MultipartResponseData, ThrowOnError>) => (options?.client ?? client).get<MultipartResponseResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/multipart', ...options });\n\nexport const multipartRequest = <ThrowOnError extends boolean = false>(options?: Options<MultipartRequestData, ThrowOnError>) => (options?.client ?? client).post<unknown, unknown, ThrowOnError>({\n    ...formDataBodySerializer,\n    url: '/api/v{api-version}/multipart',\n    ...options,\n    headers: {\n        'Content-Type': null,\n        ...options?.headers\n    }\n});\n\nexport const complexParams = <ThrowOnError extends boolean = false>(options: Options<ComplexParamsData, ThrowOnError>) => (options.client ?? client).put<ComplexParamsResponses, unknown, ThrowOnError>({\n    url: '/api/v{api-version}/complex/{id}',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json-patch+json',\n        ...options.headers\n    }\n});\n\nexport const callWithResultFromHeader = <ThrowOnError extends boolean = false>(options?: Options<CallWithResultFromHeaderData, ThrowOnError>) => (options?.client ?? client).post<CallWithResultFromHeaderResponses, CallWithResultFromHeaderErrors, ThrowOnError>({ url: '/api/v{api-version}/header', ...options });\n\nexport const testErrorCode = <ThrowOnError extends boolean = false>(options: Options<TestErrorCodeData, ThrowOnError>) => (options.client ?? client).post<TestErrorCodeResponses, TestErrorCodeErrors, ThrowOnError>({ url: '/api/v{api-version}/error', ...options });\n\nexport const nonAsciiæøåÆøÅöôêÊ字符串 = <ThrowOnError extends boolean = false>(options: Options<NonAsciiæøåÆøÅöôêÊ字符串Data, ThrowOnError>) => (options.client ?? client).post<NonAsciiæøåÆøÅöôêÊ字符串Responses, unknown, ThrowOnError>({ url: '/api/v{api-version}/non-ascii-æøåÆØÅöôêÊ字符串', ...options });\n\n/**\n * Login User\n */\nexport const putWithFormUrlEncoded = <ThrowOnError extends boolean = false>(options: Options<PutWithFormUrlEncodedData, ThrowOnError>) => (options.client ?? client).put<unknown, unknown, ThrowOnError>({\n    ...urlSearchParamsBodySerializer,\n    url: '/api/v{api-version}/non-ascii-æøåÆØÅöôêÊ字符串',\n    ...options,\n    headers: {\n        'Content-Type': 'application/x-www-form-urlencoded',\n        ...options.headers\n    }\n});\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@hey-api/sdk/default/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type ClientOptions = {\n    baseUrl: 'http://localhost:3000/base' | (string & {});\n};\n\n/**\n * Model with number-only name\n */\nexport type _400 = string;\n\nexport type ExternalRefA = ExternalSharedModel;\n\nexport type ExternalRefB = ExternalSharedModel;\n\n/**\n * Testing multiline comments in string: First line\n * Second line\n *\n * Fourth line\n */\nexport type CamelCaseCommentWithBreaks = number;\n\n/**\n * Testing multiline comments in string: First line\n * Second line\n *\n * Fourth line\n */\nexport type CommentWithBreaks = number;\n\n/**\n * Testing backticks in string: `backticks` and ```multiple backticks``` should work\n */\nexport type CommentWithBackticks = number;\n\n/**\n * Testing backticks and quotes in string: `backticks`, 'quotes', \"double quotes\" and ```multiple backticks``` should work\n */\nexport type CommentWithBackticksAndQuotes = number;\n\n/**\n * Testing slashes in string: \\backwards\\\\\\ and /forwards/// should work\n */\nexport type CommentWithSlashes = number;\n\n/**\n * Testing expression placeholders in string: ${expression} should work\n */\nexport type CommentWithExpressionPlaceholders = number;\n\n/**\n * Testing quotes in string: 'single quote''' and \"double quotes\"\"\" should work\n */\nexport type CommentWithQuotes = number;\n\n/**\n * Testing reserved characters in string: * inline * and ** inline ** should work\n */\nexport type CommentWithReservedCharacters = number;\n\n/**\n * This is a simple number\n */\nexport type SimpleInteger = number;\n\n/**\n * This is a simple boolean\n */\nexport type SimpleBoolean = boolean;\n\n/**\n * This is a simple string\n */\nexport type SimpleString = string;\n\n/**\n * A string with non-ascii (unicode) characters valid in typescript identifiers (æøåÆØÅöÔèÈ字符串)\n */\nexport type NonAsciiStringæøåÆøÅöôêÊ字符串 = string;\n\n/**\n * This is a simple file\n */\nexport type SimpleFile = Blob | File;\n\n/**\n * This is a simple reference\n */\nexport type SimpleReference = ModelWithString;\n\n/**\n * This is a simple string\n */\nexport type SimpleStringWithPattern = string | null;\n\n/**\n * This is a simple enum with strings\n */\nexport type EnumWithStrings = 'Success' | 'Warning' | 'Error' | '\\'Single Quote\\'' | '\"Double Quotes\"' | 'Non-ascii: øæåôöØÆÅÔÖ字符串';\n\nexport type EnumWithReplacedCharacters = '\\'Single Quote\\'' | '\"Double Quotes\"' | 'øæåôöØÆÅÔÖ字符串' | 3.1 | '';\n\n/**\n * This is a simple enum with numbers\n */\nexport type EnumWithNumbers = 1 | 2 | 3 | 1.1 | 1.2 | 1.3 | 100 | 200 | 300 | -100 | -200 | -300 | -1.1 | -1.2 | -1.3;\n\n/**\n * Success=1,Warning=2,Error=3\n */\nexport type EnumFromDescription = number;\n\n/**\n * This is a simple enum with numbers\n */\nexport type EnumWithExtensions = 200 | 400 | 500;\n\nexport type EnumWithXEnumNames = 0 | 1 | 2;\n\n/**\n * This is a simple array with numbers\n */\nexport type ArrayWithNumbers = Array<number>;\n\n/**\n * This is a simple array with booleans\n */\nexport type ArrayWithBooleans = Array<boolean>;\n\n/**\n * This is a simple array with strings\n */\nexport type ArrayWithStrings = Array<string>;\n\n/**\n * This is a simple array with references\n */\nexport type ArrayWithReferences = Array<ModelWithString>;\n\n/**\n * This is a simple array containing an array\n */\nexport type ArrayWithArray = Array<Array<ModelWithString>>;\n\n/**\n * This is a simple array with properties\n */\nexport type ArrayWithProperties = Array<{\n    '16x16'?: CamelCaseCommentWithBreaks;\n    bar?: string;\n}>;\n\n/**\n * This is a simple array with any of properties\n */\nexport type ArrayWithAnyOfProperties = Array<{\n    foo?: string;\n} | {\n    bar?: string;\n}>;\n\nexport type AnyOfAnyAndNull = {\n    data?: unknown;\n};\n\n/**\n * This is a simple array with any of properties\n */\nexport type AnyOfArrays = {\n    results?: Array<{\n        foo?: string;\n    } | {\n        bar?: string;\n    }>;\n};\n\n/**\n * This is a string dictionary\n */\nexport type DictionaryWithString = {\n    [key: string]: string;\n};\n\nexport type DictionaryWithPropertiesAndAdditionalProperties = {\n    foo?: number;\n    bar?: boolean;\n    [key: string]: string | number | boolean | undefined;\n};\n\n/**\n * This is a string reference\n */\nexport type DictionaryWithReference = {\n    [key: string]: ModelWithString;\n};\n\n/**\n * This is a complex dictionary\n */\nexport type DictionaryWithArray = {\n    [key: string]: Array<ModelWithString>;\n};\n\n/**\n * This is a string dictionary\n */\nexport type DictionaryWithDictionary = {\n    [key: string]: {\n        [key: string]: string;\n    };\n};\n\n/**\n * This is a complex dictionary\n */\nexport type DictionaryWithProperties = {\n    [key: string]: {\n        foo?: string;\n        bar?: string;\n    };\n};\n\n/**\n * This is a model with one number property\n */\nexport type ModelWithInteger = {\n    /**\n     * This is a simple number property\n     */\n    prop?: number;\n};\n\n/**\n * This is a model with one boolean property\n */\nexport type ModelWithBoolean = {\n    /**\n     * This is a simple boolean property\n     */\n    prop?: boolean;\n};\n\n/**\n * This is a model with one string property\n */\nexport type ModelWithString = {\n    /**\n     * This is a simple string property\n     */\n    prop?: string;\n};\n\n/**\n * This is a model with one string property\n */\nexport type ModelWithStringError = {\n    /**\n     * This is a simple string property\n     */\n    prop?: string;\n};\n\n/**\n * `Comment` or `VoiceComment`. The JSON object for adding voice comments to tickets is different. See [Adding voice comments to tickets](/documentation/ticketing/managing-tickets/adding-voice-comments-to-tickets)\n */\nexport type ModelFromZendesk = string;\n\n/**\n * This is a model with one string property\n */\nexport type ModelWithNullableString = {\n    /**\n     * This is a simple string property\n     */\n    nullableProp1?: string | null;\n    /**\n     * This is a simple string property\n     */\n    nullableRequiredProp1: string | null;\n    /**\n     * This is a simple string property\n     */\n    nullableProp2?: string | null;\n    /**\n     * This is a simple string property\n     */\n    nullableRequiredProp2: string | null;\n    /**\n     * This is a simple enum with strings\n     */\n    'foo_bar-enum'?: 'Success' | 'Warning' | 'Error' | 'ØÆÅ字符串';\n};\n\n/**\n * This is a model with one enum\n */\nexport type ModelWithEnum = {\n    /**\n     * This is a simple enum with strings\n     */\n    'foo_bar-enum'?: 'Success' | 'Warning' | 'Error' | 'ØÆÅ字符串';\n    /**\n     * These are the HTTP error code enums\n     */\n    statusCode?: '100' | '200 FOO' | '300 FOO_BAR' | '400 foo-bar' | '500 foo.bar' | '600 foo&bar';\n    /**\n     * Simple boolean enum\n     */\n    bool?: true;\n};\n\n/**\n * This is a model with one enum with escaped name\n */\nexport type ModelWithEnumWithHyphen = {\n    /**\n     * Foo-Bar-Baz-Qux\n     */\n    'foo-bar-baz-qux'?: '3.0';\n};\n\n/**\n * This is a model with one enum\n */\nexport type ModelWithEnumFromDescription = {\n    /**\n     * Success=1,Warning=2,Error=3\n     */\n    test?: number;\n};\n\n/**\n * This is a model with nested enums\n */\nexport type ModelWithNestedEnums = {\n    dictionaryWithEnum?: {\n        [key: string]: 'Success' | 'Warning' | 'Error';\n    };\n    dictionaryWithEnumFromDescription?: {\n        [key: string]: number;\n    };\n    arrayWithEnum?: Array<'Success' | 'Warning' | 'Error'>;\n    arrayWithDescription?: Array<number>;\n    /**\n     * This is a simple enum with strings\n     */\n    'foo_bar-enum'?: 'Success' | 'Warning' | 'Error' | 'ØÆÅ字符串';\n};\n\n/**\n * This is a model with one property containing a reference\n */\nexport type ModelWithReference = {\n    prop?: ModelWithProperties;\n};\n\n/**\n * This is a model with one property containing an array\n */\nexport type ModelWithArrayReadOnlyAndWriteOnly = {\n    prop?: Array<ModelWithReadOnlyAndWriteOnly>;\n    propWithFile?: Array<Blob | File>;\n    propWithNumber?: Array<number>;\n};\n\n/**\n * This is a model with one property containing an array\n */\nexport type ModelWithArray = {\n    prop?: Array<ModelWithString>;\n    propWithFile?: Array<Blob | File>;\n    propWithNumber?: Array<number>;\n};\n\n/**\n * This is a model with one property containing a dictionary\n */\nexport type ModelWithDictionary = {\n    prop?: {\n        [key: string]: string;\n    };\n};\n\n/**\n * This is a deprecated model with a deprecated property\n *\n * @deprecated\n */\nexport type DeprecatedModel = {\n    /**\n     * This is a deprecated property\n     *\n     * @deprecated\n     */\n    prop?: string;\n};\n\n/**\n * This is a model with one property containing a circular reference\n */\nexport type ModelWithCircularReference = {\n    prop?: ModelWithCircularReference;\n};\n\n/**\n * This is a model with one property with a 'one of' relationship\n */\nexport type CompositionWithOneOf = {\n    propA?: ModelWithString | ModelWithEnum | ModelWithArray | ModelWithDictionary;\n};\n\n/**\n * This is a model with one property with a 'one of' relationship where the options are not $ref\n */\nexport type CompositionWithOneOfAnonymous = {\n    propA?: {\n        propA?: string;\n    } | string | number;\n};\n\n/**\n * Circle\n */\nexport type ModelCircle = {\n    kind: string;\n    radius?: number;\n};\n\n/**\n * Square\n */\nexport type ModelSquare = {\n    kind: string;\n    sideLength?: number;\n};\n\n/**\n * This is a model with one property with a 'one of' relationship where the options are not $ref\n */\nexport type CompositionWithOneOfDiscriminator = ({\n    kind: 'circle';\n} & ModelCircle) | ({\n    kind: 'square';\n} & ModelSquare);\n\n/**\n * This is a model with one property with a 'any of' relationship\n */\nexport type CompositionWithAnyOf = {\n    propA?: ModelWithString | ModelWithEnum | ModelWithArray | ModelWithDictionary;\n};\n\n/**\n * This is a model with one property with a 'any of' relationship where the options are not $ref\n */\nexport type CompositionWithAnyOfAnonymous = {\n    propA?: {\n        propA?: string;\n    } | string | number;\n};\n\n/**\n * This is a model with nested 'any of' property with a type null\n */\nexport type CompositionWithNestedAnyAndTypeNull = {\n    propA?: Array<ModelWithDictionary | null> | Array<ModelWithArray | null>;\n};\n\nexport type _3eNum1Период = 'Bird' | 'Dog';\n\nexport type ConstValue = 'ConstValue';\n\n/**\n * This is a model with one property with a 'any of' relationship where the options are not $ref\n */\nexport type CompositionWithNestedAnyOfAndNull = {\n    propA?: Array<_3eNum1Период | ConstValue> | null;\n};\n\n/**\n * This is a model with one property with a 'one of' relationship\n */\nexport type CompositionWithOneOfAndNullable = {\n    propA?: {\n        boolean?: boolean;\n    } | ModelWithEnum | ModelWithArray | ModelWithDictionary | null;\n};\n\n/**\n * This is a model that contains a simple dictionary within composition\n */\nexport type CompositionWithOneOfAndSimpleDictionary = {\n    propA?: boolean | {\n        [key: string]: number;\n    };\n};\n\n/**\n * This is a model that contains a dictionary of simple arrays within composition\n */\nexport type CompositionWithOneOfAndSimpleArrayDictionary = {\n    propA?: boolean | {\n        [key: string]: Array<boolean>;\n    };\n};\n\n/**\n * This is a model that contains a dictionary of complex arrays (composited) within composition\n */\nexport type CompositionWithOneOfAndComplexArrayDictionary = {\n    propA?: boolean | {\n        [key: string]: Array<number | string>;\n    };\n};\n\n/**\n * This is a model with one property with a 'all of' relationship\n */\nexport type CompositionWithAllOfAndNullable = {\n    propA?: ({\n        boolean?: boolean;\n    } & ModelWithEnum & ModelWithArray & ModelWithDictionary) | null;\n};\n\n/**\n * This is a model with one property with a 'any of' relationship\n */\nexport type CompositionWithAnyOfAndNullable = {\n    propA?: {\n        boolean?: boolean;\n    } | ModelWithEnum | ModelWithArray | ModelWithDictionary | null;\n};\n\n/**\n * This is a base model with two simple optional properties\n */\nexport type CompositionBaseModel = {\n    firstName?: string;\n    lastname?: string;\n};\n\n/**\n * This is a model that extends the base model\n */\nexport type CompositionExtendedModel = CompositionBaseModel & {\n    age: number;\n    firstName: string;\n    lastname: string;\n};\n\n/**\n * This is a model with one nested property\n */\nexport type ModelWithProperties = {\n    required: string;\n    readonly requiredAndReadOnly: string;\n    requiredAndNullable: string | null;\n    string?: string;\n    number?: number;\n    boolean?: boolean;\n    reference?: ModelWithString;\n    'property with space'?: string;\n    default?: string;\n    try?: string;\n    readonly '@namespace.string'?: string;\n    readonly '@namespace.integer'?: number;\n};\n\n/**\n * This is a model with one nested property\n */\nexport type ModelWithNestedProperties = {\n    readonly first: {\n        readonly second: {\n            readonly third: string | null;\n        } | null;\n    } | null;\n};\n\n/**\n * This is a model with duplicated properties\n */\nexport type ModelWithDuplicateProperties = {\n    prop?: ModelWithString;\n};\n\n/**\n * This is a model with ordered properties\n */\nexport type ModelWithOrderedProperties = {\n    zebra?: string;\n    apple?: string;\n    hawaii?: string;\n};\n\n/**\n * This is a model with duplicated imports\n */\nexport type ModelWithDuplicateImports = {\n    propA?: ModelWithString;\n    propB?: ModelWithString;\n    propC?: ModelWithString;\n};\n\n/**\n * This is a model that extends another model\n */\nexport type ModelThatExtends = ModelWithString & {\n    propExtendsA?: string;\n    propExtendsB?: ModelWithString;\n};\n\n/**\n * This is a model that extends another model\n */\nexport type ModelThatExtendsExtends = ModelWithString & ModelThatExtends & {\n    propExtendsC?: string;\n    propExtendsD?: ModelWithString;\n};\n\n/**\n * This is a model that contains a some patterns\n */\nexport type ModelWithPattern = {\n    key: string;\n    name: string;\n    readonly enabled?: boolean;\n    readonly modified?: string;\n    id?: string;\n    text?: string;\n    patternWithSingleQuotes?: string;\n    patternWithNewline?: string;\n    patternWithBacktick?: string;\n    patternWithUnicode?: string;\n};\n\nexport type File = {\n    /**\n     * Id\n     */\n    readonly id?: string;\n    /**\n     * Updated at\n     */\n    readonly updated_at?: string;\n    /**\n     * Created at\n     */\n    readonly created_at?: string;\n    /**\n     * Mime\n     */\n    mime: string;\n    /**\n     * File\n     */\n    readonly file?: string;\n};\n\nexport type Default = {\n    name?: string;\n};\n\nexport type Pageable = {\n    page?: number;\n    size?: number;\n    sort?: Array<string>;\n};\n\n/**\n * This is a free-form object without additionalProperties.\n */\nexport type FreeFormObjectWithoutAdditionalProperties = {\n    [key: string]: unknown;\n};\n\n/**\n * This is a free-form object with additionalProperties: true.\n */\nexport type FreeFormObjectWithAdditionalPropertiesEqTrue = {\n    [key: string]: unknown;\n};\n\n/**\n * This is a free-form object with additionalProperties: {}.\n */\nexport type FreeFormObjectWithAdditionalPropertiesEqEmptyObject = {\n    [key: string]: unknown;\n};\n\nexport type ModelWithConst = {\n    String?: 'String';\n    number?: 0;\n    null?: unknown;\n    withType?: 'Some string';\n};\n\n/**\n * This is a model with one property and additionalProperties: true\n */\nexport type ModelWithAdditionalPropertiesEqTrue = {\n    /**\n     * This is a simple string property\n     */\n    prop?: string;\n    [key: string]: unknown;\n};\n\nexport type NestedAnyOfArraysNullable = {\n    nullableArray?: Array<string | boolean> | null;\n};\n\nexport type CompositionWithOneOfAndProperties = ({\n    foo: SimpleParameter;\n} | {\n    bar: NonAsciiStringæøåÆøÅöôêÊ字符串;\n}) & {\n    baz: number | null;\n    qux: number;\n};\n\n/**\n * An object that can be null\n */\nexport type NullableObject = {\n    foo?: string;\n} | null;\n\n/**\n * Some % character\n */\nexport type CharactersInDescription = string;\n\nexport type ModelWithNullableObject = {\n    data?: NullableObject;\n};\n\n/**\n * An object with additional properties that can be null\n */\nexport type ModelWithAdditionalPropertiesRef = {\n    [key: string]: NullableObject | null;\n};\n\nexport type ModelWithOneOfEnum = {\n    foo: 'Bar';\n} | {\n    foo: 'Baz';\n} | {\n    foo: 'Qux';\n} | {\n    content: string;\n    foo: 'Quux';\n} | {\n    content: [\n        string,\n        string\n    ];\n    foo: 'Corge';\n};\n\nexport type ModelWithNestedArrayEnumsDataFoo = 'foo' | 'bar';\n\nexport type ModelWithNestedArrayEnumsDataBar = 'baz' | 'qux';\n\nexport type ModelWithNestedArrayEnumsData = {\n    foo?: Array<ModelWithNestedArrayEnumsDataFoo>;\n    bar?: Array<ModelWithNestedArrayEnumsDataBar>;\n};\n\nexport type ModelWithNestedArrayEnums = {\n    array_strings?: Array<string>;\n    data?: ModelWithNestedArrayEnumsData;\n};\n\nexport type ModelWithNestedCompositionEnums = {\n    foo?: ModelWithNestedArrayEnumsDataFoo;\n};\n\nexport type ModelWithReadOnlyAndWriteOnly = {\n    foo: string;\n    readonly bar: string;\n};\n\nexport type ModelWithConstantSizeArray = [\n    number,\n    number\n];\n\nexport type ModelWithAnyOfConstantSizeArray = [\n    number | string,\n    number | string,\n    number | string\n];\n\nexport type ModelWithPrefixItemsConstantSizeArray = Array<ModelWithInteger | number | string>;\n\nexport type ModelWithAnyOfConstantSizeArrayNullable = [\n    number | null | string,\n    number | null | string,\n    number | null | string\n];\n\nexport type ModelWithAnyOfConstantSizeArrayWithNSizeAndOptions = [\n    number | Import,\n    number | Import\n];\n\nexport type ModelWithAnyOfConstantSizeArrayAndIntersect = [\n    number & string,\n    number & string\n];\n\nexport type ModelWithNumericEnumUnion = {\n    /**\n     * Период\n     */\n    value?: -10 | -1 | 0 | 1 | 3 | 6 | 12;\n};\n\n/**\n * Some description with `back ticks`\n */\nexport type ModelWithBackticksInDescription = {\n    /**\n     * The template `that` should be used for parsing and importing the contents of the CSV file.\n     *\n     * <br/><p>There is one placeholder currently supported:<ul>     <li><b>${x}</b> - refers to the n-th column in the CSV file, e.g. ${1}, ${2}, ...)</li></ul><p>Example of a correct JSON template:</p>\n     * <pre>\n     * [\n     * {\n     * \"resourceType\": \"Asset\",\n     * \"identifier\": {\n     * \"name\": \"${1}\",\n     * \"domain\": {\n     * \"name\": \"${2}\",\n     * \"community\": {\n     * \"name\": \"Some Community\"\n     * }\n     * }\n     * },\n     * \"attributes\" : {\n     * \"00000000-0000-0000-0000-000000003115\" : [ {\n     * \"value\" : \"${3}\"\n     * } ],\n     * \"00000000-0000-0000-0000-000000000222\" : [ {\n     * \"value\" : \"${4}\"\n     * } ]\n     * }\n     * }\n     * ]\n     * </pre>\n     */\n    template?: string;\n};\n\nexport type ModelWithOneOfAndProperties = (SimpleParameter | NonAsciiStringæøåÆøÅöôêÊ字符串) & {\n    baz: number | null;\n    qux: number;\n};\n\n/**\n * Model used to test deduplication strategy (unused)\n */\nexport type ParameterSimpleParameterUnused = string;\n\n/**\n * Model used to test deduplication strategy\n */\nexport type PostServiceWithEmptyTagResponse = string;\n\n/**\n * Model used to test deduplication strategy\n */\nexport type PostServiceWithEmptyTagResponse2 = string;\n\n/**\n * Model used to test deduplication strategy\n */\nexport type DeleteFooData = string;\n\n/**\n * Model used to test deduplication strategy\n */\nexport type DeleteFooData2 = string;\n\n/**\n * Model with restricted keyword name\n */\nexport type Import = string;\n\nexport type SchemaWithFormRestrictedKeys = {\n    description?: string;\n    'x-enum-descriptions'?: string;\n    'x-enum-varnames'?: string;\n    'x-enumNames'?: string;\n    title?: string;\n    object?: {\n        description?: string;\n        'x-enum-descriptions'?: string;\n        'x-enum-varnames'?: string;\n        'x-enumNames'?: string;\n        title?: string;\n    };\n    array?: Array<{\n        description?: string;\n        'x-enum-descriptions'?: string;\n        'x-enum-varnames'?: string;\n        'x-enumNames'?: string;\n        title?: string;\n    }>;\n};\n\n/**\n * This schema was giving PascalCase transformations a hard time\n */\nexport type IoK8sApimachineryPkgApisMetaV1DeleteOptions = {\n    /**\n     * Must be fulfilled before a deletion is carried out. If not possible, a 409 Conflict status will be returned.\n     */\n    preconditions?: IoK8sApimachineryPkgApisMetaV1Preconditions;\n};\n\n/**\n * This schema was giving PascalCase transformations a hard time\n */\nexport type IoK8sApimachineryPkgApisMetaV1Preconditions = {\n    /**\n     * Specifies the target ResourceVersion\n     */\n    resourceVersion?: string;\n    /**\n     * Specifies the target UID.\n     */\n    uid?: string;\n};\n\nexport type AdditionalPropertiesUnknownIssue = {\n    [key: string]: string | number;\n};\n\nexport type AdditionalPropertiesUnknownIssue2 = {\n    [key: string]: string | number;\n};\n\nexport type AdditionalPropertiesUnknownIssue3 = string & {\n    entries: {\n        [key: string]: AdditionalPropertiesUnknownIssue;\n    };\n};\n\nexport type AdditionalPropertiesIntegerIssue = {\n    value: number;\n    [key: string]: number;\n};\n\nexport type OneOfAllOfIssue = ((ConstValue | GenericSchemaDuplicateIssue1SystemBoolean) & _3eNum1Период) | GenericSchemaDuplicateIssue1SystemString;\n\nexport type GenericSchemaDuplicateIssue1SystemBoolean = {\n    item?: boolean;\n    error?: string | null;\n    readonly hasError?: boolean;\n    data?: {\n        [key: string]: never;\n    };\n};\n\nexport type GenericSchemaDuplicateIssue1SystemString = {\n    item?: string | null;\n    error?: string | null;\n    readonly hasError?: boolean;\n};\n\nexport type ExternalSharedModel = {\n    id: string;\n    name?: string;\n};\n\n/**\n * This is a model with one property containing a reference\n */\nexport type ModelWithReferenceWritable = {\n    prop?: ModelWithPropertiesWritable;\n};\n\n/**\n * This is a model with one property containing an array\n */\nexport type ModelWithArrayReadOnlyAndWriteOnlyWritable = {\n    prop?: Array<ModelWithReadOnlyAndWriteOnlyWritable>;\n    propWithFile?: Array<Blob | File>;\n    propWithNumber?: Array<number>;\n};\n\n/**\n * This is a model with one nested property\n */\nexport type ModelWithPropertiesWritable = {\n    required: string;\n    requiredAndNullable: string | null;\n    string?: string;\n    number?: number;\n    boolean?: boolean;\n    reference?: ModelWithString;\n    'property with space'?: string;\n    default?: string;\n    try?: string;\n};\n\n/**\n * This is a model that contains a some patterns\n */\nexport type ModelWithPatternWritable = {\n    key: string;\n    name: string;\n    id?: string;\n    text?: string;\n    patternWithSingleQuotes?: string;\n    patternWithNewline?: string;\n    patternWithBacktick?: string;\n    patternWithUnicode?: string;\n};\n\nexport type FileWritable = {\n    /**\n     * Mime\n     */\n    mime: string;\n};\n\nexport type ModelWithReadOnlyAndWriteOnlyWritable = {\n    foo: string;\n    baz: string;\n};\n\nexport type ModelWithAnyOfConstantSizeArrayWithNSizeAndOptionsWritable = [\n    number | Import,\n    number | Import\n];\n\nexport type AdditionalPropertiesUnknownIssueWritable = {\n    [key: string]: string | number;\n};\n\nexport type OneOfAllOfIssueWritable = ((ConstValue | GenericSchemaDuplicateIssue1SystemBoolean) & _3eNum1Период) | GenericSchemaDuplicateIssue1SystemString;\n\nexport type GenericSchemaDuplicateIssue1SystemBooleanWritable = {\n    item?: boolean;\n    error?: string | null;\n    data?: {\n        [key: string]: never;\n    };\n};\n\nexport type GenericSchemaDuplicateIssue1SystemStringWritable = {\n    item?: string | null;\n    error?: string | null;\n};\n\n/**\n * This is a reusable parameter\n */\nexport type SimpleParameter = string;\n\n/**\n * Parameter with illegal characters\n */\nexport type XFooBar = ModelWithString;\n\nexport type SimpleRequestBody = ModelWithString;\n\nexport type SimpleFormData = ModelWithString;\n\nexport type ExportData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no+tag';\n};\n\nexport type PatchApiVbyApiVersionNoTagData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no+tag';\n};\n\nexport type PatchApiVbyApiVersionNoTagResponses = {\n    /**\n     * OK\n     */\n    default: unknown;\n};\n\nexport type ImportData = {\n    body: ModelWithReadOnlyAndWriteOnlyWritable | ModelWithArrayReadOnlyAndWriteOnlyWritable;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no+tag';\n};\n\nexport type ImportResponses = {\n    /**\n     * Success\n     */\n    200: ModelFromZendesk;\n    /**\n     * Default success response\n     */\n    default: ModelWithReadOnlyAndWriteOnly;\n};\n\nexport type ImportResponse = ImportResponses[keyof ImportResponses];\n\nexport type FooWowData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no+tag';\n};\n\nexport type FooWowResponses = {\n    /**\n     * OK\n     */\n    default: unknown;\n};\n\nexport type ApiVVersionODataControllerCountData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple/$count';\n};\n\nexport type ApiVVersionODataControllerCountResponses = {\n    /**\n     * Success\n     */\n    200: ModelFromZendesk;\n};\n\nexport type ApiVVersionODataControllerCountResponse = ApiVVersionODataControllerCountResponses[keyof ApiVVersionODataControllerCountResponses];\n\nexport type GetApiVbyApiVersionSimpleOperationData = {\n    body?: never;\n    path: {\n        /**\n         * foo in method\n         */\n        foo_param: string;\n    };\n    query?: never;\n    url: '/api/v{api-version}/simple:operation';\n};\n\nexport type GetApiVbyApiVersionSimpleOperationErrors = {\n    /**\n     * Default error response\n     */\n    default: ModelWithBoolean;\n};\n\nexport type GetApiVbyApiVersionSimpleOperationError = GetApiVbyApiVersionSimpleOperationErrors[keyof GetApiVbyApiVersionSimpleOperationErrors];\n\nexport type GetApiVbyApiVersionSimpleOperationResponses = {\n    /**\n     * Response is a simple number\n     */\n    200: number;\n};\n\nexport type GetApiVbyApiVersionSimpleOperationResponse = GetApiVbyApiVersionSimpleOperationResponses[keyof GetApiVbyApiVersionSimpleOperationResponses];\n\nexport type DeleteCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type GetCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type HeadCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type OptionsCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type PatchCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type PostCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type PutCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type DeleteFooData3 = {\n    body?: never;\n    headers: {\n        /**\n         * Parameter with illegal characters\n         */\n        'x-Foo-Bar': ModelWithString;\n    };\n    path: {\n        /**\n         * foo in method\n         */\n        foo_param: string;\n        /**\n         * bar in method\n         */\n        BarParam: string;\n    };\n    query?: never;\n    url: '/api/v{api-version}/foo/{foo_param}/bar/{BarParam}';\n};\n\nexport type CallWithDescriptionsData = {\n    body?: never;\n    path?: never;\n    query?: {\n        /**\n         * Testing multiline comments in string: First line\n         * Second line\n         *\n         * Fourth line\n         */\n        parameterWithBreaks?: string;\n        /**\n         * Testing backticks in string: `backticks` and ```multiple backticks``` should work\n         */\n        parameterWithBackticks?: string;\n        /**\n         * Testing slashes in string: \\backwards\\\\\\ and /forwards/// should work\n         */\n        parameterWithSlashes?: string;\n        /**\n         * Testing expression placeholders in string: ${expression} should work\n         */\n        parameterWithExpressionPlaceholders?: string;\n        /**\n         * Testing quotes in string: 'single quote''' and \"double quotes\"\"\" should work\n         */\n        parameterWithQuotes?: string;\n        /**\n         * Testing reserved characters in string: * inline * and ** inline ** should work\n         */\n        parameterWithReservedCharacters?: string;\n    };\n    url: '/api/v{api-version}/descriptions';\n};\n\nexport type DeprecatedCallData = {\n    body?: never;\n    headers: {\n        /**\n         * This parameter is deprecated\n         *\n         * @deprecated\n         */\n        parameter: DeprecatedModel | null;\n    };\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/parameters/deprecated';\n};\n\nexport type CallWithParametersData = {\n    /**\n     * This is the parameter that goes into the body\n     */\n    body: {\n        [key: string]: unknown;\n    } | null;\n    headers: {\n        /**\n         * This is the parameter that goes into the header\n         */\n        parameterHeader: string | null;\n    };\n    path: {\n        /**\n         * This is the parameter that goes into the path\n         */\n        parameterPath: string | null;\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string | null;\n    };\n    query: {\n        foo_ref_enum?: ModelWithNestedArrayEnumsDataFoo;\n        foo_all_of_enum: ModelWithNestedArrayEnumsDataFoo;\n        /**\n         * This is the parameter that goes into the query params\n         */\n        cursor: string | null;\n    };\n    url: '/api/v{api-version}/parameters/{parameterPath}';\n};\n\nexport type CallWithWeirdParameterNamesData = {\n    /**\n     * This is the parameter that goes into the body\n     */\n    body: ModelWithString | null;\n    headers: {\n        /**\n         * This is the parameter that goes into the request header\n         */\n        'parameter.header': string | null;\n    };\n    path: {\n        /**\n         * This is the parameter that goes into the path\n         */\n        'parameter.path.1'?: string;\n        /**\n         * This is the parameter that goes into the path\n         */\n        'parameter-path-2'?: string;\n        /**\n         * This is the parameter that goes into the path\n         */\n        'PARAMETER-PATH-3'?: string;\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string | null;\n    };\n    query: {\n        /**\n         * This is the parameter with a reserved keyword\n         */\n        default?: string;\n        /**\n         * This is the parameter that goes into the request query params\n         */\n        'parameter-query': string | null;\n    };\n    url: '/api/v{api-version}/parameters/{parameter.path.1}/{parameter-path-2}/{PARAMETER-PATH-3}';\n};\n\nexport type GetCallWithOptionalParamData = {\n    /**\n     * This is a required parameter\n     */\n    body: ModelWithOneOfEnum;\n    path?: never;\n    query?: {\n        /**\n         * This is an optional parameter\n         */\n        page?: number;\n    };\n    url: '/api/v{api-version}/parameters';\n};\n\nexport type PostCallWithOptionalParamData = {\n    /**\n     * This is an optional parameter\n     */\n    body?: {\n        offset?: number | null;\n    };\n    path?: never;\n    query: {\n        /**\n         * This is a required parameter\n         */\n        parameter: Pageable;\n    };\n    url: '/api/v{api-version}/parameters';\n};\n\nexport type PostCallWithOptionalParamResponses = {\n    /**\n     * Response is a simple number\n     */\n    200: number;\n    /**\n     * Success\n     */\n    204: void;\n};\n\nexport type PostCallWithOptionalParamResponse = PostCallWithOptionalParamResponses[keyof PostCallWithOptionalParamResponses];\n\nexport type PostApiVbyApiVersionRequestBodyData = {\n    /**\n     * A reusable request body\n     */\n    body?: SimpleRequestBody;\n    path?: never;\n    query?: {\n        /**\n         * This is a reusable parameter\n         */\n        parameter?: string;\n    };\n    url: '/api/v{api-version}/requestBody';\n};\n\nexport type PostApiVbyApiVersionFormDataData = {\n    /**\n     * A reusable request body\n     */\n    body?: SimpleFormData;\n    path?: never;\n    query?: {\n        /**\n         * This is a reusable parameter\n         */\n        parameter?: string;\n    };\n    url: '/api/v{api-version}/formData';\n};\n\nexport type CallWithDefaultParametersData = {\n    body?: never;\n    path?: never;\n    query?: {\n        /**\n         * This is a simple string with default value\n         */\n        parameterString?: string | null;\n        /**\n         * This is a simple number with default value\n         */\n        parameterNumber?: number | null;\n        /**\n         * This is a simple boolean with default value\n         */\n        parameterBoolean?: boolean | null;\n        /**\n         * This is a simple enum with default value\n         */\n        parameterEnum?: 'Success' | 'Warning' | 'Error';\n        /**\n         * This is a simple model with default value\n         */\n        parameterModel?: ModelWithString | null;\n    };\n    url: '/api/v{api-version}/defaults';\n};\n\nexport type CallWithDefaultOptionalParametersData = {\n    body?: never;\n    path?: never;\n    query?: {\n        /**\n         * This is a simple string that is optional with default value\n         */\n        parameterString?: string;\n        /**\n         * This is a simple number that is optional with default value\n         */\n        parameterNumber?: number;\n        /**\n         * This is a simple boolean that is optional with default value\n         */\n        parameterBoolean?: boolean;\n        /**\n         * This is a simple enum that is optional with default value\n         */\n        parameterEnum?: 'Success' | 'Warning' | 'Error';\n        /**\n         * This is a simple model that is optional with default value\n         */\n        parameterModel?: ModelWithString;\n    };\n    url: '/api/v{api-version}/defaults';\n};\n\nexport type CallToTestOrderOfParamsData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * This is a optional string with default\n         */\n        parameterOptionalStringWithDefault?: string;\n        /**\n         * This is a optional string with empty default\n         */\n        parameterOptionalStringWithEmptyDefault?: string;\n        /**\n         * This is a optional string with no default\n         */\n        parameterOptionalStringWithNoDefault?: string;\n        /**\n         * This is a string with default\n         */\n        parameterStringWithDefault: string;\n        /**\n         * This is a string with empty default\n         */\n        parameterStringWithEmptyDefault: string;\n        /**\n         * This is a string with no default\n         */\n        parameterStringWithNoDefault: string;\n        /**\n         * This is a string that can be null with no default\n         */\n        parameterStringNullableWithNoDefault?: string | null;\n        /**\n         * This is a string that can be null with default\n         */\n        parameterStringNullableWithDefault?: string | null;\n    };\n    url: '/api/v{api-version}/defaults';\n};\n\nexport type DuplicateNameData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/duplicate';\n};\n\nexport type DuplicateName2Data = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/duplicate';\n};\n\nexport type DuplicateName3Data = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/duplicate';\n};\n\nexport type DuplicateName4Data = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/duplicate';\n};\n\nexport type CallWithNoContentResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no-content';\n};\n\nexport type CallWithNoContentResponseResponses = {\n    /**\n     * Success\n     */\n    204: void;\n};\n\nexport type CallWithNoContentResponseResponse = CallWithNoContentResponseResponses[keyof CallWithNoContentResponseResponses];\n\nexport type CallWithResponseAndNoContentResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multiple-tags/response-and-no-content';\n};\n\nexport type CallWithResponseAndNoContentResponseResponses = {\n    /**\n     * Response is a simple number\n     */\n    200: number;\n    /**\n     * Success\n     */\n    204: void;\n};\n\nexport type CallWithResponseAndNoContentResponseResponse = CallWithResponseAndNoContentResponseResponses[keyof CallWithResponseAndNoContentResponseResponses];\n\nexport type DummyAData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multiple-tags/a';\n};\n\nexport type DummyAResponses = {\n    200: _400;\n};\n\nexport type DummyAResponse = DummyAResponses[keyof DummyAResponses];\n\nexport type DummyBData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multiple-tags/b';\n};\n\nexport type DummyBResponses = {\n    /**\n     * Success\n     */\n    204: void;\n};\n\nexport type DummyBResponse = DummyBResponses[keyof DummyBResponses];\n\nexport type CallWithResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/response';\n};\n\nexport type CallWithResponseResponses = {\n    default: Import;\n};\n\nexport type CallWithResponseResponse = CallWithResponseResponses[keyof CallWithResponseResponses];\n\nexport type CallWithDuplicateResponsesData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/response';\n};\n\nexport type CallWithDuplicateResponsesErrors = {\n    /**\n     * Message for 500 error\n     */\n    500: ModelWithStringError;\n    /**\n     * Message for 501 error\n     */\n    501: ModelWithStringError;\n    /**\n     * Message for 502 error\n     */\n    502: ModelWithStringError;\n    /**\n     * Message for 4XX errors\n     */\n    '4XX': DictionaryWithArray;\n    /**\n     * Default error response\n     */\n    default: ModelWithBoolean;\n};\n\nexport type CallWithDuplicateResponsesError = CallWithDuplicateResponsesErrors[keyof CallWithDuplicateResponsesErrors];\n\nexport type CallWithDuplicateResponsesResponses = {\n    /**\n     * Message for 200 response\n     */\n    200: ModelWithBoolean & ModelWithInteger;\n    /**\n     * Message for 201 response\n     */\n    201: ModelWithString;\n    /**\n     * Message for 202 response\n     */\n    202: ModelWithString;\n};\n\nexport type CallWithDuplicateResponsesResponse = CallWithDuplicateResponsesResponses[keyof CallWithDuplicateResponsesResponses];\n\nexport type CallWithResponsesData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/response';\n};\n\nexport type CallWithResponsesErrors = {\n    /**\n     * Message for 500 error\n     */\n    500: ModelWithStringError;\n    /**\n     * Message for 501 error\n     */\n    501: ModelWithStringError;\n    /**\n     * Message for 502 error\n     */\n    502: ModelWithStringError;\n    /**\n     * Message for default response\n     */\n    default: ModelWithStringError;\n};\n\nexport type CallWithResponsesError = CallWithResponsesErrors[keyof CallWithResponsesErrors];\n\nexport type CallWithResponsesResponses = {\n    /**\n     * Message for 200 response\n     */\n    200: {\n        readonly '@namespace.string'?: string;\n        readonly '@namespace.integer'?: number;\n        readonly value?: Array<ModelWithString>;\n    };\n    /**\n     * Message for 201 response\n     */\n    201: ModelThatExtends;\n    /**\n     * Message for 202 response\n     */\n    202: ModelThatExtendsExtends;\n};\n\nexport type CallWithResponsesResponse = CallWithResponsesResponses[keyof CallWithResponsesResponses];\n\nexport type CollectionFormatData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * This is an array parameter that is sent as csv format (comma-separated values)\n         */\n        parameterArrayCSV: Array<string> | null;\n        /**\n         * This is an array parameter that is sent as ssv format (space-separated values)\n         */\n        parameterArraySSV: Array<string> | null;\n        /**\n         * This is an array parameter that is sent as tsv format (tab-separated values)\n         */\n        parameterArrayTSV: Array<string> | null;\n        /**\n         * This is an array parameter that is sent as pipes format (pipe-separated values)\n         */\n        parameterArrayPipes: Array<string> | null;\n        /**\n         * This is an array parameter that is sent as multi format (multiple parameter instances)\n         */\n        parameterArrayMulti: Array<string> | null;\n    };\n    url: '/api/v{api-version}/collectionFormat';\n};\n\nexport type TypesData = {\n    body?: never;\n    path?: {\n        /**\n         * This is a number parameter\n         */\n        id?: number;\n    };\n    query: {\n        /**\n         * This is a number parameter\n         */\n        parameterNumber: number;\n        /**\n         * This is a string parameter\n         */\n        parameterString: string | null;\n        /**\n         * This is a boolean parameter\n         */\n        parameterBoolean: boolean | null;\n        /**\n         * This is an object parameter\n         */\n        parameterObject: {\n            [key: string]: unknown;\n        } | null;\n        /**\n         * This is an array parameter\n         */\n        parameterArray: Array<string> | null;\n        /**\n         * This is a dictionary parameter\n         */\n        parameterDictionary: {\n            [key: string]: unknown;\n        } | null;\n        /**\n         * This is an enum parameter\n         */\n        parameterEnum: 'Success' | 'Warning' | 'Error';\n    };\n    url: '/api/v{api-version}/types';\n};\n\nexport type TypesResponses = {\n    /**\n     * Response is a simple number\n     */\n    200: number;\n    /**\n     * Response is a simple string\n     */\n    201: string;\n    /**\n     * Response is a simple boolean\n     */\n    202: boolean;\n    /**\n     * Response is a simple object\n     */\n    203: {\n        [key: string]: unknown;\n    };\n};\n\nexport type TypesResponse = TypesResponses[keyof TypesResponses];\n\nexport type UploadFileData = {\n    body: Blob | File;\n    path: {\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string | null;\n    };\n    query?: never;\n    url: '/api/v{api-version}/upload';\n};\n\nexport type UploadFileResponses = {\n    200: boolean;\n};\n\nexport type UploadFileResponse = UploadFileResponses[keyof UploadFileResponses];\n\nexport type FileResponseData = {\n    body?: never;\n    path: {\n        id: string;\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string;\n    };\n    query?: never;\n    url: '/api/v{api-version}/file/{id}';\n};\n\nexport type FileResponseResponses = {\n    /**\n     * Success\n     */\n    200: Blob | File;\n};\n\nexport type FileResponseResponse = FileResponseResponses[keyof FileResponseResponses];\n\nexport type ComplexTypesData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * Parameter containing object\n         */\n        parameterObject: {\n            first?: {\n                second?: {\n                    third?: string;\n                };\n            };\n        };\n        /**\n         * Parameter containing reference\n         */\n        parameterReference: ModelWithString;\n    };\n    url: '/api/v{api-version}/complex';\n};\n\nexport type ComplexTypesErrors = {\n    /**\n     * 400 `server` error\n     */\n    400: unknown;\n    /**\n     * 500 server error\n     */\n    500: unknown;\n};\n\nexport type ComplexTypesResponses = {\n    /**\n     * Successful response\n     */\n    200: Array<ModelWithString>;\n};\n\nexport type ComplexTypesResponse = ComplexTypesResponses[keyof ComplexTypesResponses];\n\nexport type MultipartResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multipart';\n};\n\nexport type MultipartResponseResponses = {\n    /**\n     * OK\n     */\n    200: {\n        file?: Blob | File;\n        metadata?: {\n            foo?: string;\n            bar?: string;\n        };\n    };\n};\n\nexport type MultipartResponseResponse = MultipartResponseResponses[keyof MultipartResponseResponses];\n\nexport type MultipartRequestData = {\n    body?: {\n        content?: Blob | File;\n        data?: ModelWithString | null;\n    };\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multipart';\n};\n\nexport type ComplexParamsData = {\n    body?: {\n        readonly key: string | null;\n        name: string | null;\n        enabled?: boolean;\n        type: 'Monkey' | 'Horse' | 'Bird';\n        listOfModels?: Array<ModelWithString> | null;\n        listOfStrings?: Array<string> | null;\n        parameters: ModelWithString | ModelWithEnum | ModelWithArray | ModelWithDictionary;\n        readonly user?: {\n            readonly id?: number;\n            readonly name?: string | null;\n        };\n    };\n    path: {\n        id: number;\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string;\n    };\n    query?: never;\n    url: '/api/v{api-version}/complex/{id}';\n};\n\nexport type ComplexParamsResponses = {\n    /**\n     * Success\n     */\n    200: ModelWithString;\n};\n\nexport type ComplexParamsResponse = ComplexParamsResponses[keyof ComplexParamsResponses];\n\nexport type CallWithResultFromHeaderData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/header';\n};\n\nexport type CallWithResultFromHeaderErrors = {\n    /**\n     * 400 server error\n     */\n    400: unknown;\n    /**\n     * 500 server error\n     */\n    500: unknown;\n};\n\nexport type CallWithResultFromHeaderResponses = {\n    /**\n     * Successful response\n     */\n    200: unknown;\n};\n\nexport type TestErrorCodeData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * Status code to return\n         */\n        status: number;\n    };\n    url: '/api/v{api-version}/error';\n};\n\nexport type TestErrorCodeErrors = {\n    /**\n     * Custom message: Internal Server Error\n     */\n    500: unknown;\n    /**\n     * Custom message: Not Implemented\n     */\n    501: unknown;\n    /**\n     * Custom message: Bad Gateway\n     */\n    502: unknown;\n    /**\n     * Custom message: Service Unavailable\n     */\n    503: unknown;\n};\n\nexport type TestErrorCodeResponses = {\n    /**\n     * Custom message: Successful response\n     */\n    200: unknown;\n};\n\nexport type NonAsciiæøåÆøÅöôêÊ字符串Data = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * Dummy input param\n         */\n        nonAsciiParamæøåÆØÅöôêÊ: number;\n    };\n    url: '/api/v{api-version}/non-ascii-æøåÆØÅöôêÊ字符串';\n};\n\nexport type NonAsciiæøåÆøÅöôêÊ字符串Responses = {\n    /**\n     * Successful response\n     */\n    200: Array<NonAsciiStringæøåÆøÅöôêÊ字符串>;\n};\n\nexport type NonAsciiæøåÆøÅöôêÊ字符串Response = NonAsciiæøåÆøÅöôêÊ字符串Responses[keyof NonAsciiæøåÆøÅöôêÊ字符串Responses];\n\nexport type PutWithFormUrlEncodedData = {\n    body: ArrayWithStrings;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/non-ascii-æøåÆØÅöôêÊ字符串';\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@hey-api/sdk/instance/client/client.gen.ts",
    "content": "// 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 (options: RequestOptions) => {\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 url = buildUrl(opts);\n\n    return { opts, url };\n  };\n\n  const request: Client['request'] = async (options) => {\n    // @ts-expect-error\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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@hey-api/sdk/instance/client/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type { Auth } from '../core/auth.gen';\nexport type { QuerySerializerOptions } from '../core/bodySerializer.gen';\nexport {\n  formDataBodySerializer,\n  jsonBodySerializer,\n  urlSearchParamsBodySerializer,\n} from '../core/bodySerializer.gen';\nexport { buildClientParams } from '../core/params.gen';\nexport { serializeQueryKeyValue } from '../core/queryKeySerializer.gen';\nexport { createClient } from './client.gen';\nexport type {\n  Client,\n  ClientOptions,\n  Config,\n  CreateClientConfig,\n  Options,\n  RequestOptions,\n  RequestResult,\n  ResolvedRequestOptions,\n  ResponseStyle,\n  TDataShape,\n} from './types.gen';\nexport { createConfig, mergeHeaders } from './utils.gen';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@hey-api/sdk/instance/client/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { Auth } from '../core/auth.gen';\nimport type {\n  ServerSentEventsOptions,\n  ServerSentEventsResult,\n} from '../core/serverSentEvents.gen';\nimport type { Client as CoreClient, Config as CoreConfig } from '../core/types.gen';\nimport type { Middleware } from './utils.gen';\n\nexport type ResponseStyle = 'data' | 'fields';\n\nexport interface Config<T extends ClientOptions = ClientOptions>\n  extends Omit<RequestInit, 'body' | 'headers' | 'method'>, CoreConfig {\n  /**\n   * Base URL for all requests made by this client.\n   */\n  baseUrl?: T['baseUrl'];\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   * Please don't use the Fetch client for Next.js applications. The `next`\n   * options won't have any effect.\n   *\n   * Install {@link https://www.npmjs.com/package/@hey-api/client-next `@hey-api/client-next`} instead.\n   */\n  next?: never;\n  /**\n   * Return the response data parsed in a specified format. By default, `auto`\n   * will infer the appropriate method from the `Content-Type` response header.\n   * You can override this behavior with any of the {@link Body} methods.\n   * Select `stream` if you don't want to parse response data at all.\n   *\n   * @default 'auto'\n   */\n  parseAs?: 'arrayBuffer' | 'auto' | 'blob' | 'formData' | 'json' | 'stream' | 'text';\n  /**\n   * Should we return only data or multiple fields (data, error, response, etc.)?\n   *\n   * @default 'fields'\n   */\n  responseStyle?: ResponseStyle;\n  /**\n   * Throw an error instead of returning it in the response?\n   *\n   * @default false\n   */\n  throwOnError?: T['throwOnError'];\n}\n\nexport interface RequestOptions<\n  TData = unknown,\n  TResponseStyle extends ResponseStyle = 'fields',\n  ThrowOnError extends boolean = boolean,\n  Url extends string = string,\n>\n  extends\n    Config<{\n      responseStyle: TResponseStyle;\n      throwOnError: ThrowOnError;\n    }>,\n    Pick<\n      ServerSentEventsOptions<TData>,\n      | 'onRequest'\n      | 'onSseError'\n      | 'onSseEvent'\n      | 'sseDefaultRetryDelay'\n      | 'sseMaxRetryAttempts'\n      | 'sseMaxRetryDelay'\n    > {\n  /**\n   * Any body that you want to add to your request.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/fetch#body}\n   */\n  body?: unknown;\n  path?: Record<string, unknown>;\n  query?: Record<string, unknown>;\n  /**\n   * Security mechanism(s) to use for the request.\n   */\n  security?: ReadonlyArray<Auth>;\n  url: Url;\n}\n\nexport interface ResolvedRequestOptions<\n  TResponseStyle extends ResponseStyle = 'fields',\n  ThrowOnError extends boolean = boolean,\n  Url extends string = string,\n> extends RequestOptions<unknown, TResponseStyle, ThrowOnError, Url> {\n  serializedBody?: string;\n}\n\nexport type RequestResult<\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = boolean,\n  TResponseStyle extends ResponseStyle = 'fields',\n> = ThrowOnError extends true\n  ? Promise<\n      TResponseStyle extends 'data'\n        ? TData extends Record<string, unknown>\n          ? TData[keyof TData]\n          : TData\n        : {\n            data: TData extends Record<string, unknown> ? TData[keyof TData] : TData;\n            request: Request;\n            response: Response;\n          }\n    >\n  : Promise<\n      TResponseStyle extends 'data'\n        ? (TData extends Record<string, unknown> ? TData[keyof TData] : TData) | undefined\n        : (\n            | {\n                data: TData extends Record<string, unknown> ? TData[keyof TData] : TData;\n                error: undefined;\n              }\n            | {\n                data: undefined;\n                error: TError extends Record<string, unknown> ? TError[keyof TError] : TError;\n              }\n          ) & {\n            request: Request;\n            response: Response;\n          }\n    >;\n\nexport interface ClientOptions {\n  baseUrl?: string;\n  responseStyle?: ResponseStyle;\n  throwOnError?: boolean;\n}\n\ntype MethodFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'>,\n) => RequestResult<TData, TError, ThrowOnError, TResponseStyle>;\n\ntype SseFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'>,\n) => Promise<ServerSentEventsResult<TData, TError>>;\n\ntype RequestFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'> &\n    Pick<Required<RequestOptions<TData, TResponseStyle, ThrowOnError>>, 'method'>,\n) => RequestResult<TData, TError, ThrowOnError, TResponseStyle>;\n\ntype BuildUrlFn = <\n  TData extends {\n    body?: unknown;\n    path?: Record<string, unknown>;\n    query?: Record<string, unknown>;\n    url: string;\n  },\n>(\n  options: TData & Options<TData>,\n) => string;\n\nexport type Client = CoreClient<RequestFn, Config, MethodFn, BuildUrlFn, SseFn> & {\n  interceptors: Middleware<Request, Response, unknown, ResolvedRequestOptions>;\n};\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 = ClientOptions> = (\n  override?: Config<ClientOptions & T>,\n) => Config<Required<ClientOptions> & T>;\n\nexport interface TDataShape {\n  body?: unknown;\n  headers?: unknown;\n  path?: unknown;\n  query?: unknown;\n  url: string;\n}\n\ntype OmitKeys<T, K> = Pick<T, Exclude<keyof T, K>>;\n\nexport type Options<\n  TData extends TDataShape = TDataShape,\n  ThrowOnError extends boolean = boolean,\n  TResponse = unknown,\n  TResponseStyle extends ResponseStyle = 'fields',\n> = OmitKeys<\n  RequestOptions<TResponse, TResponseStyle, ThrowOnError>,\n  'body' | 'path' | 'query' | 'url'\n> &\n  ([TData] extends [never] ? unknown : Omit<TData, 'url'>);\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@hey-api/sdk/instance/client/utils.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@hey-api/sdk/instance/client.gen.ts",
    "content": "// 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>());\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@hey-api/sdk/instance/core/auth.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@hey-api/sdk/instance/core/bodySerializer.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@hey-api/sdk/instance/core/params.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@hey-api/sdk/instance/core/pathSerializer.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@hey-api/sdk/instance/core/queryKeySerializer.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\n/**\n * JSON-friendly union that mirrors what Pinia Colada can hash.\n */\nexport type JsonValue =\n  | null\n  | string\n  | number\n  | boolean\n  | JsonValue[]\n  | { [key: string]: JsonValue };\n\n/**\n * Replacer that converts non-JSON values (bigint, Date, etc.) to safe substitutes.\n */\nexport const queryKeyJsonReplacer = (_key: string, value: unknown) => {\n  if (value === undefined || typeof value === 'function' || typeof value === 'symbol') {\n    return undefined;\n  }\n  if (typeof value === 'bigint') {\n    return value.toString();\n  }\n  if (value instanceof Date) {\n    return value.toISOString();\n  }\n  return value;\n};\n\n/**\n * Safely stringifies a value and parses it back into a JsonValue.\n */\nexport const stringifyToJsonValue = (input: unknown): JsonValue | undefined => {\n  try {\n    const json = JSON.stringify(input, queryKeyJsonReplacer);\n    if (json === undefined) {\n      return undefined;\n    }\n    return JSON.parse(json) as JsonValue;\n  } catch {\n    return undefined;\n  }\n};\n\n/**\n * Detects plain objects (including objects with a null prototype).\n */\nconst isPlainObject = (value: unknown): value is Record<string, unknown> => {\n  if (value === null || typeof value !== 'object') {\n    return false;\n  }\n  const prototype = Object.getPrototypeOf(value as object);\n  return prototype === Object.prototype || prototype === null;\n};\n\n/**\n * Turns URLSearchParams into a sorted JSON object for deterministic keys.\n */\nconst serializeSearchParams = (params: URLSearchParams): JsonValue => {\n  const entries = Array.from(params.entries()).sort(([a], [b]) => a.localeCompare(b));\n  const result: Record<string, JsonValue> = {};\n\n  for (const [key, value] of entries) {\n    const existing = result[key];\n    if (existing === undefined) {\n      result[key] = value;\n      continue;\n    }\n\n    if (Array.isArray(existing)) {\n      (existing as string[]).push(value);\n    } else {\n      result[key] = [existing, value];\n    }\n  }\n\n  return result;\n};\n\n/**\n * Normalizes any accepted value into a JSON-friendly shape for query keys.\n */\nexport const serializeQueryKeyValue = (value: unknown): JsonValue | undefined => {\n  if (value === null) {\n    return null;\n  }\n\n  if (typeof value === 'string' || typeof value === 'number' || typeof value === 'boolean') {\n    return value;\n  }\n\n  if (value === undefined || typeof value === 'function' || typeof value === 'symbol') {\n    return undefined;\n  }\n\n  if (typeof value === 'bigint') {\n    return value.toString();\n  }\n\n  if (value instanceof Date) {\n    return value.toISOString();\n  }\n\n  if (Array.isArray(value)) {\n    return stringifyToJsonValue(value);\n  }\n\n  if (typeof URLSearchParams !== 'undefined' && value instanceof URLSearchParams) {\n    return serializeSearchParams(value);\n  }\n\n  if (isPlainObject(value)) {\n    return stringifyToJsonValue(value);\n  }\n\n  return undefined;\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@hey-api/sdk/instance/core/serverSentEvents.gen.ts",
    "content": "// 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 const 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            // Normalize line endings: CRLF -> LF, then CR -> LF\n            buffer = buffer.replace(/\\r\\n/g, '\\n').replace(/\\r/g, '\\n');\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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@hey-api/sdk/instance/core/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { Auth, AuthToken } from './auth.gen';\nimport type { BodySerializer, QuerySerializer, QuerySerializerOptions } from './bodySerializer.gen';\n\nexport type HttpMethod =\n  | 'connect'\n  | 'delete'\n  | 'get'\n  | 'head'\n  | 'options'\n  | 'patch'\n  | 'post'\n  | 'put'\n  | 'trace';\n\nexport type Client<\n  RequestFn = never,\n  Config = unknown,\n  MethodFn = never,\n  BuildUrlFn = never,\n  SseFn = never,\n> = {\n  /**\n   * Returns the final request URL.\n   */\n  buildUrl: BuildUrlFn;\n  getConfig: () => Config;\n  request: RequestFn;\n  setConfig: (config: Config) => Config;\n} & {\n  [K in HttpMethod]: MethodFn;\n} & ([SseFn] extends [never] ? { sse?: never } : { sse: { [K in HttpMethod]: SseFn } });\n\nexport interface Config {\n  /**\n   * Auth token or a function returning auth token. The resolved value will be\n   * added to the request payload as defined by its `security` array.\n   */\n  auth?: ((auth: Auth) => Promise<AuthToken> | AuthToken) | AuthToken;\n  /**\n   * A function for serializing request body parameter. By default,\n   * {@link JSON.stringify()} will be used.\n   */\n  bodySerializer?: BodySerializer | null;\n  /**\n   * An object containing any HTTP headers that you want to pre-populate your\n   * `Headers` object with.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/Headers/Headers#init See more}\n   */\n  headers?:\n    | RequestInit['headers']\n    | Record<\n        string,\n        string | number | boolean | (string | number | boolean)[] | null | undefined | unknown\n      >;\n  /**\n   * The request method.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/fetch#method See more}\n   */\n  method?: Uppercase<HttpMethod>;\n  /**\n   * A function for serializing request query parameters. By default, arrays\n   * will be exploded in form style, objects will be exploded in deepObject\n   * style, and reserved characters are percent-encoded.\n   *\n   * This method will have no effect if the native `paramsSerializer()` Axios\n   * API function is used.\n   *\n   * {@link https://swagger.io/docs/specification/serialization/#query View examples}\n   */\n  querySerializer?: QuerySerializer | QuerySerializerOptions;\n  /**\n   * A function validating request data. This is useful if you want to ensure\n   * the request conforms to the desired shape, so it can be safely sent to\n   * the server.\n   */\n  requestValidator?: (data: unknown) => Promise<unknown>;\n  /**\n   * A function transforming response data before it's returned. This is useful\n   * for post-processing data, e.g. converting ISO strings into Date objects.\n   */\n  responseTransformer?: (data: unknown) => Promise<unknown>;\n  /**\n   * A function validating response data. This is useful if you want to ensure\n   * the response conforms to the desired shape, so it can be safely passed to\n   * the transformers and returned to the user.\n   */\n  responseValidator?: (data: unknown) => Promise<unknown>;\n}\n\ntype IsExactlyNeverOrNeverUndefined<T> = [T] extends [never]\n  ? true\n  : [T] extends [never | undefined]\n    ? [undefined] extends [T]\n      ? false\n      : true\n    : false;\n\nexport type OmitNever<T extends Record<string, unknown>> = {\n  [K in keyof T as IsExactlyNeverOrNeverUndefined<T[K]> extends true ? never : K]: T[K];\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@hey-api/sdk/instance/core/utils.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@hey-api/sdk/instance/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport { Bar, Foo, type Options, Sdk } from './sdk.gen';\nexport type { ClientOptions, FooBarPostData, FooBarPostResponse, FooBarPostResponses, FooBarPutData, FooBarPutResponse, FooBarPutResponses, FooPostData, FooPostResponse, FooPostResponses, FooPutData, FooPutResponse, FooPutResponses, GetFooBarData, GetFooBarResponse, GetFooBarResponses, GetFooData, GetFooResponse, GetFooResponses } from './types.gen';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@hey-api/sdk/instance/sdk.gen.ts",
    "content": "// 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 { FooBarPostData, FooBarPostResponses, FooBarPutData, FooBarPutResponses, FooPostData, FooPostResponses, FooPutData, FooPutResponses, GetFooBarData, GetFooBarResponses, GetFooData, GetFooResponses } from './types.gen';\n\nexport type Options<TData extends TDataShape = TDataShape, ThrowOnError extends boolean = boolean> = Options2<TData, ThrowOnError> & {\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\nclass HeyApiClient {\n    protected client: Client;\n    \n    constructor(args?: {\n        client?: Client;\n    }) {\n        this.client = args?.client ?? client;\n    }\n}\n\nclass HeyApiRegistry<T> {\n    private readonly defaultKey = 'default';\n    \n    private readonly instances: Map<string, T> = new Map();\n    \n    get(key?: string): T {\n        const instance = this.instances.get(key ?? this.defaultKey);\n        if (!instance) {\n            throw new Error(`No SDK client found. Create one with \"new Sdk()\" to fix this error.`);\n        }\n        return instance;\n    }\n    \n    set(value: T, key?: string): void {\n        this.instances.set(key ?? this.defaultKey, value);\n    }\n}\n\nexport class Bar extends HeyApiClient {\n    public post<ThrowOnError extends boolean = false>(options?: Options<FooBarPostData, ThrowOnError>) {\n        return (options?.client ?? this.client).post<FooBarPostResponses, unknown, ThrowOnError>({ url: '/foo/bar', ...options });\n    }\n    \n    public put<ThrowOnError extends boolean = false>(options?: Options<FooBarPutData, ThrowOnError>) {\n        return (options?.client ?? this.client).put<FooBarPutResponses, unknown, ThrowOnError>({ url: '/foo/bar', ...options });\n    }\n}\n\nexport class Foo extends HeyApiClient {\n    public post<ThrowOnError extends boolean = false>(options?: Options<FooPostData, ThrowOnError>) {\n        return (options?.client ?? this.client).post<FooPostResponses, unknown, ThrowOnError>({ url: '/foo', ...options });\n    }\n    \n    public put<ThrowOnError extends boolean = false>(options?: Options<FooPutData, ThrowOnError>) {\n        return (options?.client ?? this.client).put<FooPutResponses, unknown, ThrowOnError>({ url: '/foo', ...options });\n    }\n    \n    private _bar?: Bar;\n    get bar(): Bar {\n        return this._bar ??= new Bar({ client: this.client });\n    }\n}\n\nexport class Sdk extends HeyApiClient {\n    public static readonly __registry = new HeyApiRegistry<Sdk>();\n    \n    constructor(args?: {\n        client?: Client;\n        key?: string;\n    }) {\n        super(args);\n        Sdk.__registry.set(this, args?.key);\n    }\n    \n    public getFoo<ThrowOnError extends boolean = false>(options?: Options<GetFooData, ThrowOnError>) {\n        return (options?.client ?? this.client).get<GetFooResponses, unknown, ThrowOnError>({ url: '/foo', ...options });\n    }\n    \n    public getFooBar<ThrowOnError extends boolean = false>(options?: Options<GetFooBarData, ThrowOnError>) {\n        return (options?.client ?? this.client).get<GetFooBarResponses, unknown, ThrowOnError>({ url: '/foo/bar', ...options });\n    }\n    \n    private _foo?: Foo;\n    get foo(): Foo {\n        return this._foo ??= new Foo({ client: this.client });\n    }\n}\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@hey-api/sdk/instance/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type ClientOptions = {\n    baseUrl: `${string}://${string}` | (string & {});\n};\n\nexport type GetFooData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/foo';\n};\n\nexport type GetFooResponses = {\n    /**\n     * OK\n     */\n    200: string;\n};\n\nexport type GetFooResponse = GetFooResponses[keyof GetFooResponses];\n\nexport type FooPostData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/foo';\n};\n\nexport type FooPostResponses = {\n    /**\n     * OK\n     */\n    200: string;\n};\n\nexport type FooPostResponse = FooPostResponses[keyof FooPostResponses];\n\nexport type FooPutData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/foo';\n};\n\nexport type FooPutResponses = {\n    /**\n     * OK\n     */\n    200: string;\n};\n\nexport type FooPutResponse = FooPutResponses[keyof FooPutResponses];\n\nexport type GetFooBarData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/foo/bar';\n};\n\nexport type GetFooBarResponses = {\n    /**\n     * OK\n     */\n    200: string;\n};\n\nexport type GetFooBarResponse = GetFooBarResponses[keyof GetFooBarResponses];\n\nexport type FooBarPostData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/foo/bar';\n};\n\nexport type FooBarPostResponses = {\n    /**\n     * OK\n     */\n    200: string;\n};\n\nexport type FooBarPostResponse = FooBarPostResponses[keyof FooBarPostResponses];\n\nexport type FooBarPutData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/foo/bar';\n};\n\nexport type FooBarPutResponses = {\n    /**\n     * OK\n     */\n    200: string;\n};\n\nexport type FooBarPutResponse = FooBarPutResponses[keyof FooBarPutResponses];\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@hey-api/sdk/throwOnError/client/client.gen.ts",
    "content": "// 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 (options: RequestOptions) => {\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 url = buildUrl(opts);\n\n    return { opts, url };\n  };\n\n  const request: Client['request'] = async (options) => {\n    // @ts-expect-error\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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@hey-api/sdk/throwOnError/client/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type { Auth } from '../core/auth.gen';\nexport type { QuerySerializerOptions } from '../core/bodySerializer.gen';\nexport {\n  formDataBodySerializer,\n  jsonBodySerializer,\n  urlSearchParamsBodySerializer,\n} from '../core/bodySerializer.gen';\nexport { buildClientParams } from '../core/params.gen';\nexport { serializeQueryKeyValue } from '../core/queryKeySerializer.gen';\nexport { createClient } from './client.gen';\nexport type {\n  Client,\n  ClientOptions,\n  Config,\n  CreateClientConfig,\n  Options,\n  RequestOptions,\n  RequestResult,\n  ResolvedRequestOptions,\n  ResponseStyle,\n  TDataShape,\n} from './types.gen';\nexport { createConfig, mergeHeaders } from './utils.gen';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@hey-api/sdk/throwOnError/client/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { Auth } from '../core/auth.gen';\nimport type {\n  ServerSentEventsOptions,\n  ServerSentEventsResult,\n} from '../core/serverSentEvents.gen';\nimport type { Client as CoreClient, Config as CoreConfig } from '../core/types.gen';\nimport type { Middleware } from './utils.gen';\n\nexport type ResponseStyle = 'data' | 'fields';\n\nexport interface Config<T extends ClientOptions = ClientOptions>\n  extends Omit<RequestInit, 'body' | 'headers' | 'method'>, CoreConfig {\n  /**\n   * Base URL for all requests made by this client.\n   */\n  baseUrl?: T['baseUrl'];\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   * Please don't use the Fetch client for Next.js applications. The `next`\n   * options won't have any effect.\n   *\n   * Install {@link https://www.npmjs.com/package/@hey-api/client-next `@hey-api/client-next`} instead.\n   */\n  next?: never;\n  /**\n   * Return the response data parsed in a specified format. By default, `auto`\n   * will infer the appropriate method from the `Content-Type` response header.\n   * You can override this behavior with any of the {@link Body} methods.\n   * Select `stream` if you don't want to parse response data at all.\n   *\n   * @default 'auto'\n   */\n  parseAs?: 'arrayBuffer' | 'auto' | 'blob' | 'formData' | 'json' | 'stream' | 'text';\n  /**\n   * Should we return only data or multiple fields (data, error, response, etc.)?\n   *\n   * @default 'fields'\n   */\n  responseStyle?: ResponseStyle;\n  /**\n   * Throw an error instead of returning it in the response?\n   *\n   * @default false\n   */\n  throwOnError?: T['throwOnError'];\n}\n\nexport interface RequestOptions<\n  TData = unknown,\n  TResponseStyle extends ResponseStyle = 'fields',\n  ThrowOnError extends boolean = boolean,\n  Url extends string = string,\n>\n  extends\n    Config<{\n      responseStyle: TResponseStyle;\n      throwOnError: ThrowOnError;\n    }>,\n    Pick<\n      ServerSentEventsOptions<TData>,\n      | 'onRequest'\n      | 'onSseError'\n      | 'onSseEvent'\n      | 'sseDefaultRetryDelay'\n      | 'sseMaxRetryAttempts'\n      | 'sseMaxRetryDelay'\n    > {\n  /**\n   * Any body that you want to add to your request.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/fetch#body}\n   */\n  body?: unknown;\n  path?: Record<string, unknown>;\n  query?: Record<string, unknown>;\n  /**\n   * Security mechanism(s) to use for the request.\n   */\n  security?: ReadonlyArray<Auth>;\n  url: Url;\n}\n\nexport interface ResolvedRequestOptions<\n  TResponseStyle extends ResponseStyle = 'fields',\n  ThrowOnError extends boolean = boolean,\n  Url extends string = string,\n> extends RequestOptions<unknown, TResponseStyle, ThrowOnError, Url> {\n  serializedBody?: string;\n}\n\nexport type RequestResult<\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = boolean,\n  TResponseStyle extends ResponseStyle = 'fields',\n> = ThrowOnError extends true\n  ? Promise<\n      TResponseStyle extends 'data'\n        ? TData extends Record<string, unknown>\n          ? TData[keyof TData]\n          : TData\n        : {\n            data: TData extends Record<string, unknown> ? TData[keyof TData] : TData;\n            request: Request;\n            response: Response;\n          }\n    >\n  : Promise<\n      TResponseStyle extends 'data'\n        ? (TData extends Record<string, unknown> ? TData[keyof TData] : TData) | undefined\n        : (\n            | {\n                data: TData extends Record<string, unknown> ? TData[keyof TData] : TData;\n                error: undefined;\n              }\n            | {\n                data: undefined;\n                error: TError extends Record<string, unknown> ? TError[keyof TError] : TError;\n              }\n          ) & {\n            request: Request;\n            response: Response;\n          }\n    >;\n\nexport interface ClientOptions {\n  baseUrl?: string;\n  responseStyle?: ResponseStyle;\n  throwOnError?: boolean;\n}\n\ntype MethodFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'>,\n) => RequestResult<TData, TError, ThrowOnError, TResponseStyle>;\n\ntype SseFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'>,\n) => Promise<ServerSentEventsResult<TData, TError>>;\n\ntype RequestFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'> &\n    Pick<Required<RequestOptions<TData, TResponseStyle, ThrowOnError>>, 'method'>,\n) => RequestResult<TData, TError, ThrowOnError, TResponseStyle>;\n\ntype BuildUrlFn = <\n  TData extends {\n    body?: unknown;\n    path?: Record<string, unknown>;\n    query?: Record<string, unknown>;\n    url: string;\n  },\n>(\n  options: TData & Options<TData>,\n) => string;\n\nexport type Client = CoreClient<RequestFn, Config, MethodFn, BuildUrlFn, SseFn> & {\n  interceptors: Middleware<Request, Response, unknown, ResolvedRequestOptions>;\n};\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 = ClientOptions> = (\n  override?: Config<ClientOptions & T>,\n) => Config<Required<ClientOptions> & T>;\n\nexport interface TDataShape {\n  body?: unknown;\n  headers?: unknown;\n  path?: unknown;\n  query?: unknown;\n  url: string;\n}\n\ntype OmitKeys<T, K> = Pick<T, Exclude<keyof T, K>>;\n\nexport type Options<\n  TData extends TDataShape = TDataShape,\n  ThrowOnError extends boolean = boolean,\n  TResponse = unknown,\n  TResponseStyle extends ResponseStyle = 'fields',\n> = OmitKeys<\n  RequestOptions<TResponse, TResponseStyle, ThrowOnError>,\n  'body' | 'path' | 'query' | 'url'\n> &\n  ([TData] extends [never] ? unknown : Omit<TData, 'url'>);\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@hey-api/sdk/throwOnError/client/utils.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@hey-api/sdk/throwOnError/client.gen.ts",
    "content": "// 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: 'http://localhost:3000/base', throwOnError: true }));\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@hey-api/sdk/throwOnError/core/auth.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@hey-api/sdk/throwOnError/core/bodySerializer.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@hey-api/sdk/throwOnError/core/params.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@hey-api/sdk/throwOnError/core/pathSerializer.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@hey-api/sdk/throwOnError/core/queryKeySerializer.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\n/**\n * JSON-friendly union that mirrors what Pinia Colada can hash.\n */\nexport type JsonValue =\n  | null\n  | string\n  | number\n  | boolean\n  | JsonValue[]\n  | { [key: string]: JsonValue };\n\n/**\n * Replacer that converts non-JSON values (bigint, Date, etc.) to safe substitutes.\n */\nexport const queryKeyJsonReplacer = (_key: string, value: unknown) => {\n  if (value === undefined || typeof value === 'function' || typeof value === 'symbol') {\n    return undefined;\n  }\n  if (typeof value === 'bigint') {\n    return value.toString();\n  }\n  if (value instanceof Date) {\n    return value.toISOString();\n  }\n  return value;\n};\n\n/**\n * Safely stringifies a value and parses it back into a JsonValue.\n */\nexport const stringifyToJsonValue = (input: unknown): JsonValue | undefined => {\n  try {\n    const json = JSON.stringify(input, queryKeyJsonReplacer);\n    if (json === undefined) {\n      return undefined;\n    }\n    return JSON.parse(json) as JsonValue;\n  } catch {\n    return undefined;\n  }\n};\n\n/**\n * Detects plain objects (including objects with a null prototype).\n */\nconst isPlainObject = (value: unknown): value is Record<string, unknown> => {\n  if (value === null || typeof value !== 'object') {\n    return false;\n  }\n  const prototype = Object.getPrototypeOf(value as object);\n  return prototype === Object.prototype || prototype === null;\n};\n\n/**\n * Turns URLSearchParams into a sorted JSON object for deterministic keys.\n */\nconst serializeSearchParams = (params: URLSearchParams): JsonValue => {\n  const entries = Array.from(params.entries()).sort(([a], [b]) => a.localeCompare(b));\n  const result: Record<string, JsonValue> = {};\n\n  for (const [key, value] of entries) {\n    const existing = result[key];\n    if (existing === undefined) {\n      result[key] = value;\n      continue;\n    }\n\n    if (Array.isArray(existing)) {\n      (existing as string[]).push(value);\n    } else {\n      result[key] = [existing, value];\n    }\n  }\n\n  return result;\n};\n\n/**\n * Normalizes any accepted value into a JSON-friendly shape for query keys.\n */\nexport const serializeQueryKeyValue = (value: unknown): JsonValue | undefined => {\n  if (value === null) {\n    return null;\n  }\n\n  if (typeof value === 'string' || typeof value === 'number' || typeof value === 'boolean') {\n    return value;\n  }\n\n  if (value === undefined || typeof value === 'function' || typeof value === 'symbol') {\n    return undefined;\n  }\n\n  if (typeof value === 'bigint') {\n    return value.toString();\n  }\n\n  if (value instanceof Date) {\n    return value.toISOString();\n  }\n\n  if (Array.isArray(value)) {\n    return stringifyToJsonValue(value);\n  }\n\n  if (typeof URLSearchParams !== 'undefined' && value instanceof URLSearchParams) {\n    return serializeSearchParams(value);\n  }\n\n  if (isPlainObject(value)) {\n    return stringifyToJsonValue(value);\n  }\n\n  return undefined;\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@hey-api/sdk/throwOnError/core/serverSentEvents.gen.ts",
    "content": "// 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 const 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            // Normalize line endings: CRLF -> LF, then CR -> LF\n            buffer = buffer.replace(/\\r\\n/g, '\\n').replace(/\\r/g, '\\n');\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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@hey-api/sdk/throwOnError/core/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { Auth, AuthToken } from './auth.gen';\nimport type { BodySerializer, QuerySerializer, QuerySerializerOptions } from './bodySerializer.gen';\n\nexport type HttpMethod =\n  | 'connect'\n  | 'delete'\n  | 'get'\n  | 'head'\n  | 'options'\n  | 'patch'\n  | 'post'\n  | 'put'\n  | 'trace';\n\nexport type Client<\n  RequestFn = never,\n  Config = unknown,\n  MethodFn = never,\n  BuildUrlFn = never,\n  SseFn = never,\n> = {\n  /**\n   * Returns the final request URL.\n   */\n  buildUrl: BuildUrlFn;\n  getConfig: () => Config;\n  request: RequestFn;\n  setConfig: (config: Config) => Config;\n} & {\n  [K in HttpMethod]: MethodFn;\n} & ([SseFn] extends [never] ? { sse?: never } : { sse: { [K in HttpMethod]: SseFn } });\n\nexport interface Config {\n  /**\n   * Auth token or a function returning auth token. The resolved value will be\n   * added to the request payload as defined by its `security` array.\n   */\n  auth?: ((auth: Auth) => Promise<AuthToken> | AuthToken) | AuthToken;\n  /**\n   * A function for serializing request body parameter. By default,\n   * {@link JSON.stringify()} will be used.\n   */\n  bodySerializer?: BodySerializer | null;\n  /**\n   * An object containing any HTTP headers that you want to pre-populate your\n   * `Headers` object with.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/Headers/Headers#init See more}\n   */\n  headers?:\n    | RequestInit['headers']\n    | Record<\n        string,\n        string | number | boolean | (string | number | boolean)[] | null | undefined | unknown\n      >;\n  /**\n   * The request method.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/fetch#method See more}\n   */\n  method?: Uppercase<HttpMethod>;\n  /**\n   * A function for serializing request query parameters. By default, arrays\n   * will be exploded in form style, objects will be exploded in deepObject\n   * style, and reserved characters are percent-encoded.\n   *\n   * This method will have no effect if the native `paramsSerializer()` Axios\n   * API function is used.\n   *\n   * {@link https://swagger.io/docs/specification/serialization/#query View examples}\n   */\n  querySerializer?: QuerySerializer | QuerySerializerOptions;\n  /**\n   * A function validating request data. This is useful if you want to ensure\n   * the request conforms to the desired shape, so it can be safely sent to\n   * the server.\n   */\n  requestValidator?: (data: unknown) => Promise<unknown>;\n  /**\n   * A function transforming response data before it's returned. This is useful\n   * for post-processing data, e.g. converting ISO strings into Date objects.\n   */\n  responseTransformer?: (data: unknown) => Promise<unknown>;\n  /**\n   * A function validating response data. This is useful if you want to ensure\n   * the response conforms to the desired shape, so it can be safely passed to\n   * the transformers and returned to the user.\n   */\n  responseValidator?: (data: unknown) => Promise<unknown>;\n}\n\ntype IsExactlyNeverOrNeverUndefined<T> = [T] extends [never]\n  ? true\n  : [T] extends [never | undefined]\n    ? [undefined] extends [T]\n      ? false\n      : true\n    : false;\n\nexport type OmitNever<T extends Record<string, unknown>> = {\n  [K in keyof T as IsExactlyNeverOrNeverUndefined<T[K]> extends true ? never : K]: T[K];\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@hey-api/sdk/throwOnError/core/utils.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@hey-api/sdk/throwOnError/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport { apiVVersionODataControllerCount, callToTestOrderOfParams, callWithDefaultOptionalParameters, callWithDefaultParameters, callWithDescriptions, callWithDuplicateResponses, callWithNoContentResponse, callWithParameters, callWithResponse, callWithResponseAndNoContentResponse, callWithResponses, callWithResultFromHeader, callWithWeirdParameterNames, collectionFormat, complexParams, complexTypes, deleteCallWithoutParametersAndResponse, deleteFoo, deprecatedCall, dummyA, dummyB, duplicateName, duplicateName2, duplicateName3, duplicateName4, export_, fileResponse, fooWow, getApiVbyApiVersionSimpleOperation, getCallWithOptionalParam, getCallWithoutParametersAndResponse, headCallWithoutParametersAndResponse, import_, multipartRequest, multipartResponse, nonAsciiæøåÆøÅöôêÊ字符串, type Options, optionsCallWithoutParametersAndResponse, patchApiVbyApiVersionNoTag, patchCallWithoutParametersAndResponse, postApiVbyApiVersionFormData, postApiVbyApiVersionRequestBody, postCallWithOptionalParam, postCallWithoutParametersAndResponse, putCallWithoutParametersAndResponse, putWithFormUrlEncoded, testErrorCode, types, uploadFile } from './sdk.gen';\nexport type { _3eNum1Период, _400, AdditionalPropertiesIntegerIssue, AdditionalPropertiesUnknownIssue, AdditionalPropertiesUnknownIssue2, AdditionalPropertiesUnknownIssue3, AdditionalPropertiesUnknownIssueWritable, AnyOfAnyAndNull, AnyOfArrays, ApiVVersionODataControllerCountData, ApiVVersionODataControllerCountResponse, ApiVVersionODataControllerCountResponses, ArrayWithAnyOfProperties, ArrayWithArray, ArrayWithBooleans, ArrayWithNumbers, ArrayWithProperties, ArrayWithReferences, ArrayWithStrings, CallToTestOrderOfParamsData, CallWithDefaultOptionalParametersData, CallWithDefaultParametersData, CallWithDescriptionsData, CallWithDuplicateResponsesData, CallWithDuplicateResponsesError, CallWithDuplicateResponsesErrors, CallWithDuplicateResponsesResponse, CallWithDuplicateResponsesResponses, CallWithNoContentResponseData, CallWithNoContentResponseResponse, CallWithNoContentResponseResponses, CallWithParametersData, CallWithResponseAndNoContentResponseData, CallWithResponseAndNoContentResponseResponse, CallWithResponseAndNoContentResponseResponses, CallWithResponseData, CallWithResponseResponse, CallWithResponseResponses, CallWithResponsesData, CallWithResponsesError, CallWithResponsesErrors, CallWithResponsesResponse, CallWithResponsesResponses, CallWithResultFromHeaderData, CallWithResultFromHeaderErrors, CallWithResultFromHeaderResponses, CallWithWeirdParameterNamesData, CamelCaseCommentWithBreaks, CharactersInDescription, ClientOptions, CollectionFormatData, CommentWithBackticks, CommentWithBackticksAndQuotes, CommentWithBreaks, CommentWithExpressionPlaceholders, CommentWithQuotes, CommentWithReservedCharacters, CommentWithSlashes, ComplexParamsData, ComplexParamsResponse, ComplexParamsResponses, ComplexTypesData, ComplexTypesErrors, ComplexTypesResponse, ComplexTypesResponses, CompositionBaseModel, CompositionExtendedModel, CompositionWithAllOfAndNullable, CompositionWithAnyOf, CompositionWithAnyOfAndNullable, CompositionWithAnyOfAnonymous, CompositionWithNestedAnyAndTypeNull, CompositionWithNestedAnyOfAndNull, CompositionWithOneOf, CompositionWithOneOfAndComplexArrayDictionary, CompositionWithOneOfAndNullable, CompositionWithOneOfAndProperties, CompositionWithOneOfAndSimpleArrayDictionary, CompositionWithOneOfAndSimpleDictionary, CompositionWithOneOfAnonymous, CompositionWithOneOfDiscriminator, ConstValue, Default, DeleteCallWithoutParametersAndResponseData, DeleteFooData, DeleteFooData2, DeleteFooData3, DeprecatedCallData, DeprecatedModel, DictionaryWithArray, DictionaryWithDictionary, DictionaryWithProperties, DictionaryWithPropertiesAndAdditionalProperties, DictionaryWithReference, DictionaryWithString, DummyAData, DummyAResponse, DummyAResponses, DummyBData, DummyBResponse, DummyBResponses, DuplicateName2Data, DuplicateName3Data, DuplicateName4Data, DuplicateNameData, EnumFromDescription, EnumWithExtensions, EnumWithNumbers, EnumWithReplacedCharacters, EnumWithStrings, EnumWithXEnumNames, ExportData, ExternalRefA, ExternalRefB, ExternalSharedModel, File, FileResponseData, FileResponseResponse, FileResponseResponses, FileWritable, FooWowData, FooWowResponses, FreeFormObjectWithAdditionalPropertiesEqEmptyObject, FreeFormObjectWithAdditionalPropertiesEqTrue, FreeFormObjectWithoutAdditionalProperties, GenericSchemaDuplicateIssue1SystemBoolean, GenericSchemaDuplicateIssue1SystemBooleanWritable, GenericSchemaDuplicateIssue1SystemString, GenericSchemaDuplicateIssue1SystemStringWritable, GetApiVbyApiVersionSimpleOperationData, GetApiVbyApiVersionSimpleOperationError, GetApiVbyApiVersionSimpleOperationErrors, GetApiVbyApiVersionSimpleOperationResponse, GetApiVbyApiVersionSimpleOperationResponses, GetCallWithOptionalParamData, GetCallWithoutParametersAndResponseData, HeadCallWithoutParametersAndResponseData, Import, ImportData, ImportResponse, ImportResponses, IoK8sApimachineryPkgApisMetaV1DeleteOptions, IoK8sApimachineryPkgApisMetaV1Preconditions, ModelCircle, ModelFromZendesk, ModelSquare, ModelThatExtends, ModelThatExtendsExtends, ModelWithAdditionalPropertiesEqTrue, ModelWithAdditionalPropertiesRef, ModelWithAnyOfConstantSizeArray, ModelWithAnyOfConstantSizeArrayAndIntersect, ModelWithAnyOfConstantSizeArrayNullable, ModelWithAnyOfConstantSizeArrayWithNSizeAndOptions, ModelWithAnyOfConstantSizeArrayWithNSizeAndOptionsWritable, ModelWithArray, ModelWithArrayReadOnlyAndWriteOnly, ModelWithArrayReadOnlyAndWriteOnlyWritable, ModelWithBackticksInDescription, ModelWithBoolean, ModelWithCircularReference, ModelWithConst, ModelWithConstantSizeArray, ModelWithDictionary, ModelWithDuplicateImports, ModelWithDuplicateProperties, ModelWithEnum, ModelWithEnumFromDescription, ModelWithEnumWithHyphen, ModelWithInteger, ModelWithNestedArrayEnums, ModelWithNestedArrayEnumsData, ModelWithNestedArrayEnumsDataBar, ModelWithNestedArrayEnumsDataFoo, ModelWithNestedCompositionEnums, ModelWithNestedEnums, ModelWithNestedProperties, ModelWithNullableObject, ModelWithNullableString, ModelWithNumericEnumUnion, ModelWithOneOfAndProperties, ModelWithOneOfEnum, ModelWithOrderedProperties, ModelWithPattern, ModelWithPatternWritable, ModelWithPrefixItemsConstantSizeArray, ModelWithProperties, ModelWithPropertiesWritable, ModelWithReadOnlyAndWriteOnly, ModelWithReadOnlyAndWriteOnlyWritable, ModelWithReference, ModelWithReferenceWritable, ModelWithString, ModelWithStringError, MultipartRequestData, MultipartResponseData, MultipartResponseResponse, MultipartResponseResponses, NestedAnyOfArraysNullable, NonAsciiæøåÆøÅöôêÊ字符串Data, NonAsciiæøåÆøÅöôêÊ字符串Response, NonAsciiæøåÆøÅöôêÊ字符串Responses, NonAsciiStringæøåÆøÅöôêÊ字符串, NullableObject, OneOfAllOfIssue, OneOfAllOfIssueWritable, OptionsCallWithoutParametersAndResponseData, Pageable, ParameterSimpleParameterUnused, PatchApiVbyApiVersionNoTagData, PatchApiVbyApiVersionNoTagResponses, PatchCallWithoutParametersAndResponseData, PostApiVbyApiVersionFormDataData, PostApiVbyApiVersionRequestBodyData, PostCallWithOptionalParamData, PostCallWithOptionalParamResponse, PostCallWithOptionalParamResponses, PostCallWithoutParametersAndResponseData, PostServiceWithEmptyTagResponse, PostServiceWithEmptyTagResponse2, PutCallWithoutParametersAndResponseData, PutWithFormUrlEncodedData, SchemaWithFormRestrictedKeys, SimpleBoolean, SimpleFile, SimpleFormData, SimpleInteger, SimpleParameter, SimpleReference, SimpleRequestBody, SimpleString, SimpleStringWithPattern, TestErrorCodeData, TestErrorCodeErrors, TestErrorCodeResponses, TypesData, TypesResponse, TypesResponses, UploadFileData, UploadFileResponse, UploadFileResponses, XFooBar } from './types.gen';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@hey-api/sdk/throwOnError/sdk.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport { type Client, formDataBodySerializer, type Options as Options2, type TDataShape, urlSearchParamsBodySerializer } from './client';\nimport { client } from './client.gen';\nimport type { ApiVVersionODataControllerCountData, ApiVVersionODataControllerCountResponses, CallToTestOrderOfParamsData, CallWithDefaultOptionalParametersData, CallWithDefaultParametersData, CallWithDescriptionsData, CallWithDuplicateResponsesData, CallWithDuplicateResponsesErrors, CallWithDuplicateResponsesResponses, CallWithNoContentResponseData, CallWithNoContentResponseResponses, CallWithParametersData, CallWithResponseAndNoContentResponseData, CallWithResponseAndNoContentResponseResponses, CallWithResponseData, CallWithResponseResponses, CallWithResponsesData, CallWithResponsesErrors, CallWithResponsesResponses, CallWithResultFromHeaderData, CallWithResultFromHeaderErrors, CallWithResultFromHeaderResponses, CallWithWeirdParameterNamesData, CollectionFormatData, ComplexParamsData, ComplexParamsResponses, ComplexTypesData, ComplexTypesErrors, ComplexTypesResponses, DeleteCallWithoutParametersAndResponseData, DeleteFooData3, DeprecatedCallData, DummyAData, DummyAResponses, DummyBData, DummyBResponses, DuplicateName2Data, DuplicateName3Data, DuplicateName4Data, DuplicateNameData, ExportData, FileResponseData, FileResponseResponses, FooWowData, FooWowResponses, GetApiVbyApiVersionSimpleOperationData, GetApiVbyApiVersionSimpleOperationErrors, GetApiVbyApiVersionSimpleOperationResponses, GetCallWithOptionalParamData, GetCallWithoutParametersAndResponseData, HeadCallWithoutParametersAndResponseData, ImportData, ImportResponses, MultipartRequestData, MultipartResponseData, MultipartResponseResponses, NonAsciiæøåÆøÅöôêÊ字符串Data, NonAsciiæøåÆøÅöôêÊ字符串Responses, OptionsCallWithoutParametersAndResponseData, PatchApiVbyApiVersionNoTagData, PatchApiVbyApiVersionNoTagResponses, PatchCallWithoutParametersAndResponseData, PostApiVbyApiVersionFormDataData, PostApiVbyApiVersionRequestBodyData, PostCallWithOptionalParamData, PostCallWithOptionalParamResponses, PostCallWithoutParametersAndResponseData, PutCallWithoutParametersAndResponseData, PutWithFormUrlEncodedData, TestErrorCodeData, TestErrorCodeErrors, TestErrorCodeResponses, TypesData, TypesResponses, UploadFileData, UploadFileResponses } from './types.gen';\n\nexport type Options<TData extends TDataShape = TDataShape, ThrowOnError extends boolean = boolean> = Options2<TData, ThrowOnError> & {\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\nexport const export_ = <ThrowOnError extends boolean = true>(options?: Options<ExportData, ThrowOnError>) => (options?.client ?? client).get<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/no+tag', ...options });\n\nexport const patchApiVbyApiVersionNoTag = <ThrowOnError extends boolean = true>(options?: Options<PatchApiVbyApiVersionNoTagData, ThrowOnError>) => (options?.client ?? client).patch<PatchApiVbyApiVersionNoTagResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/no+tag', ...options });\n\nexport const import_ = <ThrowOnError extends boolean = true>(options: Options<ImportData, ThrowOnError>) => (options.client ?? client).post<ImportResponses, unknown, ThrowOnError>({\n    url: '/api/v{api-version}/no+tag',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options.headers\n    }\n});\n\nexport const fooWow = <ThrowOnError extends boolean = true>(options?: Options<FooWowData, ThrowOnError>) => (options?.client ?? client).put<FooWowResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/no+tag', ...options });\n\nexport const apiVVersionODataControllerCount = <ThrowOnError extends boolean = true>(options?: Options<ApiVVersionODataControllerCountData, ThrowOnError>) => (options?.client ?? client).get<ApiVVersionODataControllerCountResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple/$count', ...options });\n\nexport const getApiVbyApiVersionSimpleOperation = <ThrowOnError extends boolean = true>(options: Options<GetApiVbyApiVersionSimpleOperationData, ThrowOnError>) => (options.client ?? client).get<GetApiVbyApiVersionSimpleOperationResponses, GetApiVbyApiVersionSimpleOperationErrors, ThrowOnError>({ url: '/api/v{api-version}/simple:operation', ...options });\n\nexport const deleteCallWithoutParametersAndResponse = <ThrowOnError extends boolean = true>(options?: Options<DeleteCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).delete<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const getCallWithoutParametersAndResponse = <ThrowOnError extends boolean = true>(options?: Options<GetCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).get<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const headCallWithoutParametersAndResponse = <ThrowOnError extends boolean = true>(options?: Options<HeadCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).head<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const optionsCallWithoutParametersAndResponse = <ThrowOnError extends boolean = true>(options?: Options<OptionsCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).options<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const patchCallWithoutParametersAndResponse = <ThrowOnError extends boolean = true>(options?: Options<PatchCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).patch<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const postCallWithoutParametersAndResponse = <ThrowOnError extends boolean = true>(options?: Options<PostCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).post<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const putCallWithoutParametersAndResponse = <ThrowOnError extends boolean = true>(options?: Options<PutCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).put<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const deleteFoo = <ThrowOnError extends boolean = true>(options: Options<DeleteFooData3, ThrowOnError>) => (options.client ?? client).delete<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/foo/{foo_param}/bar/{BarParam}', ...options });\n\nexport const callWithDescriptions = <ThrowOnError extends boolean = true>(options?: Options<CallWithDescriptionsData, ThrowOnError>) => (options?.client ?? client).post<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/descriptions', ...options });\n\n/**\n * @deprecated\n */\nexport const deprecatedCall = <ThrowOnError extends boolean = true>(options: Options<DeprecatedCallData, ThrowOnError>) => (options.client ?? client).post<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/parameters/deprecated', ...options });\n\nexport const callWithParameters = <ThrowOnError extends boolean = true>(options: Options<CallWithParametersData, ThrowOnError>) => (options.client ?? client).post<unknown, unknown, ThrowOnError>({\n    url: '/api/v{api-version}/parameters/{parameterPath}',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options.headers\n    }\n});\n\nexport const callWithWeirdParameterNames = <ThrowOnError extends boolean = true>(options: Options<CallWithWeirdParameterNamesData, ThrowOnError>) => (options.client ?? client).post<unknown, unknown, ThrowOnError>({\n    url: '/api/v{api-version}/parameters/{parameter.path.1}/{parameter-path-2}/{PARAMETER-PATH-3}',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options.headers\n    }\n});\n\nexport const getCallWithOptionalParam = <ThrowOnError extends boolean = true>(options: Options<GetCallWithOptionalParamData, ThrowOnError>) => (options.client ?? client).get<unknown, unknown, ThrowOnError>({\n    url: '/api/v{api-version}/parameters',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options.headers\n    }\n});\n\nexport const postCallWithOptionalParam = <ThrowOnError extends boolean = true>(options: Options<PostCallWithOptionalParamData, ThrowOnError>) => (options.client ?? client).post<PostCallWithOptionalParamResponses, unknown, ThrowOnError>({\n    url: '/api/v{api-version}/parameters',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options.headers\n    }\n});\n\nexport const postApiVbyApiVersionRequestBody = <ThrowOnError extends boolean = true>(options?: Options<PostApiVbyApiVersionRequestBodyData, ThrowOnError>) => (options?.client ?? client).post<unknown, unknown, ThrowOnError>({\n    url: '/api/v{api-version}/requestBody',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options?.headers\n    }\n});\n\nexport const postApiVbyApiVersionFormData = <ThrowOnError extends boolean = true>(options?: Options<PostApiVbyApiVersionFormDataData, ThrowOnError>) => (options?.client ?? client).post<unknown, unknown, ThrowOnError>({\n    ...formDataBodySerializer,\n    url: '/api/v{api-version}/formData',\n    ...options,\n    headers: {\n        'Content-Type': null,\n        ...options?.headers\n    }\n});\n\nexport const callWithDefaultParameters = <ThrowOnError extends boolean = true>(options?: Options<CallWithDefaultParametersData, ThrowOnError>) => (options?.client ?? client).get<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/defaults', ...options });\n\nexport const callWithDefaultOptionalParameters = <ThrowOnError extends boolean = true>(options?: Options<CallWithDefaultOptionalParametersData, ThrowOnError>) => (options?.client ?? client).post<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/defaults', ...options });\n\nexport const callToTestOrderOfParams = <ThrowOnError extends boolean = true>(options: Options<CallToTestOrderOfParamsData, ThrowOnError>) => (options.client ?? client).put<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/defaults', ...options });\n\nexport const duplicateName = <ThrowOnError extends boolean = true>(options?: Options<DuplicateNameData, ThrowOnError>) => (options?.client ?? client).delete<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/duplicate', ...options });\n\nexport const duplicateName2 = <ThrowOnError extends boolean = true>(options?: Options<DuplicateName2Data, ThrowOnError>) => (options?.client ?? client).get<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/duplicate', ...options });\n\nexport const duplicateName3 = <ThrowOnError extends boolean = true>(options?: Options<DuplicateName3Data, ThrowOnError>) => (options?.client ?? client).post<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/duplicate', ...options });\n\nexport const duplicateName4 = <ThrowOnError extends boolean = true>(options?: Options<DuplicateName4Data, ThrowOnError>) => (options?.client ?? client).put<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/duplicate', ...options });\n\nexport const callWithNoContentResponse = <ThrowOnError extends boolean = true>(options?: Options<CallWithNoContentResponseData, ThrowOnError>) => (options?.client ?? client).get<CallWithNoContentResponseResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/no-content', ...options });\n\nexport const callWithResponseAndNoContentResponse = <ThrowOnError extends boolean = true>(options?: Options<CallWithResponseAndNoContentResponseData, ThrowOnError>) => (options?.client ?? client).get<CallWithResponseAndNoContentResponseResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/multiple-tags/response-and-no-content', ...options });\n\nexport const dummyA = <ThrowOnError extends boolean = true>(options?: Options<DummyAData, ThrowOnError>) => (options?.client ?? client).get<DummyAResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/multiple-tags/a', ...options });\n\nexport const dummyB = <ThrowOnError extends boolean = true>(options?: Options<DummyBData, ThrowOnError>) => (options?.client ?? client).get<DummyBResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/multiple-tags/b', ...options });\n\nexport const callWithResponse = <ThrowOnError extends boolean = true>(options?: Options<CallWithResponseData, ThrowOnError>) => (options?.client ?? client).get<CallWithResponseResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/response', ...options });\n\nexport const callWithDuplicateResponses = <ThrowOnError extends boolean = true>(options?: Options<CallWithDuplicateResponsesData, ThrowOnError>) => (options?.client ?? client).post<CallWithDuplicateResponsesResponses, CallWithDuplicateResponsesErrors, ThrowOnError>({ url: '/api/v{api-version}/response', ...options });\n\nexport const callWithResponses = <ThrowOnError extends boolean = true>(options?: Options<CallWithResponsesData, ThrowOnError>) => (options?.client ?? client).put<CallWithResponsesResponses, CallWithResponsesErrors, ThrowOnError>({ url: '/api/v{api-version}/response', ...options });\n\nexport const collectionFormat = <ThrowOnError extends boolean = true>(options: Options<CollectionFormatData, ThrowOnError>) => (options.client ?? client).get<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/collectionFormat', ...options });\n\nexport const types = <ThrowOnError extends boolean = true>(options: Options<TypesData, ThrowOnError>) => (options.client ?? client).get<TypesResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/types', ...options });\n\nexport const uploadFile = <ThrowOnError extends boolean = true>(options: Options<UploadFileData, ThrowOnError>) => (options.client ?? client).post<UploadFileResponses, unknown, ThrowOnError>({\n    ...urlSearchParamsBodySerializer,\n    url: '/api/v{api-version}/upload',\n    ...options,\n    headers: {\n        'Content-Type': 'application/x-www-form-urlencoded',\n        ...options.headers\n    }\n});\n\nexport const fileResponse = <ThrowOnError extends boolean = true>(options: Options<FileResponseData, ThrowOnError>) => (options.client ?? client).get<FileResponseResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/file/{id}', ...options });\n\nexport const complexTypes = <ThrowOnError extends boolean = true>(options: Options<ComplexTypesData, ThrowOnError>) => (options.client ?? client).get<ComplexTypesResponses, ComplexTypesErrors, ThrowOnError>({\n    querySerializer: { parameters: { parameterObject: { object: { style: 'form' } } } },\n    url: '/api/v{api-version}/complex',\n    ...options\n});\n\nexport const multipartResponse = <ThrowOnError extends boolean = true>(options?: Options<MultipartResponseData, ThrowOnError>) => (options?.client ?? client).get<MultipartResponseResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/multipart', ...options });\n\nexport const multipartRequest = <ThrowOnError extends boolean = true>(options?: Options<MultipartRequestData, ThrowOnError>) => (options?.client ?? client).post<unknown, unknown, ThrowOnError>({\n    ...formDataBodySerializer,\n    url: '/api/v{api-version}/multipart',\n    ...options,\n    headers: {\n        'Content-Type': null,\n        ...options?.headers\n    }\n});\n\nexport const complexParams = <ThrowOnError extends boolean = true>(options: Options<ComplexParamsData, ThrowOnError>) => (options.client ?? client).put<ComplexParamsResponses, unknown, ThrowOnError>({\n    url: '/api/v{api-version}/complex/{id}',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json-patch+json',\n        ...options.headers\n    }\n});\n\nexport const callWithResultFromHeader = <ThrowOnError extends boolean = true>(options?: Options<CallWithResultFromHeaderData, ThrowOnError>) => (options?.client ?? client).post<CallWithResultFromHeaderResponses, CallWithResultFromHeaderErrors, ThrowOnError>({ url: '/api/v{api-version}/header', ...options });\n\nexport const testErrorCode = <ThrowOnError extends boolean = true>(options: Options<TestErrorCodeData, ThrowOnError>) => (options.client ?? client).post<TestErrorCodeResponses, TestErrorCodeErrors, ThrowOnError>({ url: '/api/v{api-version}/error', ...options });\n\nexport const nonAsciiæøåÆøÅöôêÊ字符串 = <ThrowOnError extends boolean = true>(options: Options<NonAsciiæøåÆøÅöôêÊ字符串Data, ThrowOnError>) => (options.client ?? client).post<NonAsciiæøåÆøÅöôêÊ字符串Responses, unknown, ThrowOnError>({ url: '/api/v{api-version}/non-ascii-æøåÆØÅöôêÊ字符串', ...options });\n\n/**\n * Login User\n */\nexport const putWithFormUrlEncoded = <ThrowOnError extends boolean = true>(options: Options<PutWithFormUrlEncodedData, ThrowOnError>) => (options.client ?? client).put<unknown, unknown, ThrowOnError>({\n    ...urlSearchParamsBodySerializer,\n    url: '/api/v{api-version}/non-ascii-æøåÆØÅöôêÊ字符串',\n    ...options,\n    headers: {\n        'Content-Type': 'application/x-www-form-urlencoded',\n        ...options.headers\n    }\n});\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@hey-api/sdk/throwOnError/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type ClientOptions = {\n    baseUrl: 'http://localhost:3000/base' | (string & {});\n};\n\n/**\n * Model with number-only name\n */\nexport type _400 = string;\n\nexport type ExternalRefA = ExternalSharedModel;\n\nexport type ExternalRefB = ExternalSharedModel;\n\n/**\n * Testing multiline comments in string: First line\n * Second line\n *\n * Fourth line\n */\nexport type CamelCaseCommentWithBreaks = number;\n\n/**\n * Testing multiline comments in string: First line\n * Second line\n *\n * Fourth line\n */\nexport type CommentWithBreaks = number;\n\n/**\n * Testing backticks in string: `backticks` and ```multiple backticks``` should work\n */\nexport type CommentWithBackticks = number;\n\n/**\n * Testing backticks and quotes in string: `backticks`, 'quotes', \"double quotes\" and ```multiple backticks``` should work\n */\nexport type CommentWithBackticksAndQuotes = number;\n\n/**\n * Testing slashes in string: \\backwards\\\\\\ and /forwards/// should work\n */\nexport type CommentWithSlashes = number;\n\n/**\n * Testing expression placeholders in string: ${expression} should work\n */\nexport type CommentWithExpressionPlaceholders = number;\n\n/**\n * Testing quotes in string: 'single quote''' and \"double quotes\"\"\" should work\n */\nexport type CommentWithQuotes = number;\n\n/**\n * Testing reserved characters in string: * inline * and ** inline ** should work\n */\nexport type CommentWithReservedCharacters = number;\n\n/**\n * This is a simple number\n */\nexport type SimpleInteger = number;\n\n/**\n * This is a simple boolean\n */\nexport type SimpleBoolean = boolean;\n\n/**\n * This is a simple string\n */\nexport type SimpleString = string;\n\n/**\n * A string with non-ascii (unicode) characters valid in typescript identifiers (æøåÆØÅöÔèÈ字符串)\n */\nexport type NonAsciiStringæøåÆøÅöôêÊ字符串 = string;\n\n/**\n * This is a simple file\n */\nexport type SimpleFile = Blob | File;\n\n/**\n * This is a simple reference\n */\nexport type SimpleReference = ModelWithString;\n\n/**\n * This is a simple string\n */\nexport type SimpleStringWithPattern = string | null;\n\n/**\n * This is a simple enum with strings\n */\nexport type EnumWithStrings = 'Success' | 'Warning' | 'Error' | '\\'Single Quote\\'' | '\"Double Quotes\"' | 'Non-ascii: øæåôöØÆÅÔÖ字符串';\n\nexport type EnumWithReplacedCharacters = '\\'Single Quote\\'' | '\"Double Quotes\"' | 'øæåôöØÆÅÔÖ字符串' | 3.1 | '';\n\n/**\n * This is a simple enum with numbers\n */\nexport type EnumWithNumbers = 1 | 2 | 3 | 1.1 | 1.2 | 1.3 | 100 | 200 | 300 | -100 | -200 | -300 | -1.1 | -1.2 | -1.3;\n\n/**\n * Success=1,Warning=2,Error=3\n */\nexport type EnumFromDescription = number;\n\n/**\n * This is a simple enum with numbers\n */\nexport type EnumWithExtensions = 200 | 400 | 500;\n\nexport type EnumWithXEnumNames = 0 | 1 | 2;\n\n/**\n * This is a simple array with numbers\n */\nexport type ArrayWithNumbers = Array<number>;\n\n/**\n * This is a simple array with booleans\n */\nexport type ArrayWithBooleans = Array<boolean>;\n\n/**\n * This is a simple array with strings\n */\nexport type ArrayWithStrings = Array<string>;\n\n/**\n * This is a simple array with references\n */\nexport type ArrayWithReferences = Array<ModelWithString>;\n\n/**\n * This is a simple array containing an array\n */\nexport type ArrayWithArray = Array<Array<ModelWithString>>;\n\n/**\n * This is a simple array with properties\n */\nexport type ArrayWithProperties = Array<{\n    '16x16'?: CamelCaseCommentWithBreaks;\n    bar?: string;\n}>;\n\n/**\n * This is a simple array with any of properties\n */\nexport type ArrayWithAnyOfProperties = Array<{\n    foo?: string;\n} | {\n    bar?: string;\n}>;\n\nexport type AnyOfAnyAndNull = {\n    data?: unknown;\n};\n\n/**\n * This is a simple array with any of properties\n */\nexport type AnyOfArrays = {\n    results?: Array<{\n        foo?: string;\n    } | {\n        bar?: string;\n    }>;\n};\n\n/**\n * This is a string dictionary\n */\nexport type DictionaryWithString = {\n    [key: string]: string;\n};\n\nexport type DictionaryWithPropertiesAndAdditionalProperties = {\n    foo?: number;\n    bar?: boolean;\n    [key: string]: string | number | boolean | undefined;\n};\n\n/**\n * This is a string reference\n */\nexport type DictionaryWithReference = {\n    [key: string]: ModelWithString;\n};\n\n/**\n * This is a complex dictionary\n */\nexport type DictionaryWithArray = {\n    [key: string]: Array<ModelWithString>;\n};\n\n/**\n * This is a string dictionary\n */\nexport type DictionaryWithDictionary = {\n    [key: string]: {\n        [key: string]: string;\n    };\n};\n\n/**\n * This is a complex dictionary\n */\nexport type DictionaryWithProperties = {\n    [key: string]: {\n        foo?: string;\n        bar?: string;\n    };\n};\n\n/**\n * This is a model with one number property\n */\nexport type ModelWithInteger = {\n    /**\n     * This is a simple number property\n     */\n    prop?: number;\n};\n\n/**\n * This is a model with one boolean property\n */\nexport type ModelWithBoolean = {\n    /**\n     * This is a simple boolean property\n     */\n    prop?: boolean;\n};\n\n/**\n * This is a model with one string property\n */\nexport type ModelWithString = {\n    /**\n     * This is a simple string property\n     */\n    prop?: string;\n};\n\n/**\n * This is a model with one string property\n */\nexport type ModelWithStringError = {\n    /**\n     * This is a simple string property\n     */\n    prop?: string;\n};\n\n/**\n * `Comment` or `VoiceComment`. The JSON object for adding voice comments to tickets is different. See [Adding voice comments to tickets](/documentation/ticketing/managing-tickets/adding-voice-comments-to-tickets)\n */\nexport type ModelFromZendesk = string;\n\n/**\n * This is a model with one string property\n */\nexport type ModelWithNullableString = {\n    /**\n     * This is a simple string property\n     */\n    nullableProp1?: string | null;\n    /**\n     * This is a simple string property\n     */\n    nullableRequiredProp1: string | null;\n    /**\n     * This is a simple string property\n     */\n    nullableProp2?: string | null;\n    /**\n     * This is a simple string property\n     */\n    nullableRequiredProp2: string | null;\n    /**\n     * This is a simple enum with strings\n     */\n    'foo_bar-enum'?: 'Success' | 'Warning' | 'Error' | 'ØÆÅ字符串';\n};\n\n/**\n * This is a model with one enum\n */\nexport type ModelWithEnum = {\n    /**\n     * This is a simple enum with strings\n     */\n    'foo_bar-enum'?: 'Success' | 'Warning' | 'Error' | 'ØÆÅ字符串';\n    /**\n     * These are the HTTP error code enums\n     */\n    statusCode?: '100' | '200 FOO' | '300 FOO_BAR' | '400 foo-bar' | '500 foo.bar' | '600 foo&bar';\n    /**\n     * Simple boolean enum\n     */\n    bool?: true;\n};\n\n/**\n * This is a model with one enum with escaped name\n */\nexport type ModelWithEnumWithHyphen = {\n    /**\n     * Foo-Bar-Baz-Qux\n     */\n    'foo-bar-baz-qux'?: '3.0';\n};\n\n/**\n * This is a model with one enum\n */\nexport type ModelWithEnumFromDescription = {\n    /**\n     * Success=1,Warning=2,Error=3\n     */\n    test?: number;\n};\n\n/**\n * This is a model with nested enums\n */\nexport type ModelWithNestedEnums = {\n    dictionaryWithEnum?: {\n        [key: string]: 'Success' | 'Warning' | 'Error';\n    };\n    dictionaryWithEnumFromDescription?: {\n        [key: string]: number;\n    };\n    arrayWithEnum?: Array<'Success' | 'Warning' | 'Error'>;\n    arrayWithDescription?: Array<number>;\n    /**\n     * This is a simple enum with strings\n     */\n    'foo_bar-enum'?: 'Success' | 'Warning' | 'Error' | 'ØÆÅ字符串';\n};\n\n/**\n * This is a model with one property containing a reference\n */\nexport type ModelWithReference = {\n    prop?: ModelWithProperties;\n};\n\n/**\n * This is a model with one property containing an array\n */\nexport type ModelWithArrayReadOnlyAndWriteOnly = {\n    prop?: Array<ModelWithReadOnlyAndWriteOnly>;\n    propWithFile?: Array<Blob | File>;\n    propWithNumber?: Array<number>;\n};\n\n/**\n * This is a model with one property containing an array\n */\nexport type ModelWithArray = {\n    prop?: Array<ModelWithString>;\n    propWithFile?: Array<Blob | File>;\n    propWithNumber?: Array<number>;\n};\n\n/**\n * This is a model with one property containing a dictionary\n */\nexport type ModelWithDictionary = {\n    prop?: {\n        [key: string]: string;\n    };\n};\n\n/**\n * This is a deprecated model with a deprecated property\n *\n * @deprecated\n */\nexport type DeprecatedModel = {\n    /**\n     * This is a deprecated property\n     *\n     * @deprecated\n     */\n    prop?: string;\n};\n\n/**\n * This is a model with one property containing a circular reference\n */\nexport type ModelWithCircularReference = {\n    prop?: ModelWithCircularReference;\n};\n\n/**\n * This is a model with one property with a 'one of' relationship\n */\nexport type CompositionWithOneOf = {\n    propA?: ModelWithString | ModelWithEnum | ModelWithArray | ModelWithDictionary;\n};\n\n/**\n * This is a model with one property with a 'one of' relationship where the options are not $ref\n */\nexport type CompositionWithOneOfAnonymous = {\n    propA?: {\n        propA?: string;\n    } | string | number;\n};\n\n/**\n * Circle\n */\nexport type ModelCircle = {\n    kind: string;\n    radius?: number;\n};\n\n/**\n * Square\n */\nexport type ModelSquare = {\n    kind: string;\n    sideLength?: number;\n};\n\n/**\n * This is a model with one property with a 'one of' relationship where the options are not $ref\n */\nexport type CompositionWithOneOfDiscriminator = ({\n    kind: 'circle';\n} & ModelCircle) | ({\n    kind: 'square';\n} & ModelSquare);\n\n/**\n * This is a model with one property with a 'any of' relationship\n */\nexport type CompositionWithAnyOf = {\n    propA?: ModelWithString | ModelWithEnum | ModelWithArray | ModelWithDictionary;\n};\n\n/**\n * This is a model with one property with a 'any of' relationship where the options are not $ref\n */\nexport type CompositionWithAnyOfAnonymous = {\n    propA?: {\n        propA?: string;\n    } | string | number;\n};\n\n/**\n * This is a model with nested 'any of' property with a type null\n */\nexport type CompositionWithNestedAnyAndTypeNull = {\n    propA?: Array<ModelWithDictionary | null> | Array<ModelWithArray | null>;\n};\n\nexport type _3eNum1Период = 'Bird' | 'Dog';\n\nexport type ConstValue = 'ConstValue';\n\n/**\n * This is a model with one property with a 'any of' relationship where the options are not $ref\n */\nexport type CompositionWithNestedAnyOfAndNull = {\n    propA?: Array<_3eNum1Период | ConstValue> | null;\n};\n\n/**\n * This is a model with one property with a 'one of' relationship\n */\nexport type CompositionWithOneOfAndNullable = {\n    propA?: {\n        boolean?: boolean;\n    } | ModelWithEnum | ModelWithArray | ModelWithDictionary | null;\n};\n\n/**\n * This is a model that contains a simple dictionary within composition\n */\nexport type CompositionWithOneOfAndSimpleDictionary = {\n    propA?: boolean | {\n        [key: string]: number;\n    };\n};\n\n/**\n * This is a model that contains a dictionary of simple arrays within composition\n */\nexport type CompositionWithOneOfAndSimpleArrayDictionary = {\n    propA?: boolean | {\n        [key: string]: Array<boolean>;\n    };\n};\n\n/**\n * This is a model that contains a dictionary of complex arrays (composited) within composition\n */\nexport type CompositionWithOneOfAndComplexArrayDictionary = {\n    propA?: boolean | {\n        [key: string]: Array<number | string>;\n    };\n};\n\n/**\n * This is a model with one property with a 'all of' relationship\n */\nexport type CompositionWithAllOfAndNullable = {\n    propA?: ({\n        boolean?: boolean;\n    } & ModelWithEnum & ModelWithArray & ModelWithDictionary) | null;\n};\n\n/**\n * This is a model with one property with a 'any of' relationship\n */\nexport type CompositionWithAnyOfAndNullable = {\n    propA?: {\n        boolean?: boolean;\n    } | ModelWithEnum | ModelWithArray | ModelWithDictionary | null;\n};\n\n/**\n * This is a base model with two simple optional properties\n */\nexport type CompositionBaseModel = {\n    firstName?: string;\n    lastname?: string;\n};\n\n/**\n * This is a model that extends the base model\n */\nexport type CompositionExtendedModel = CompositionBaseModel & {\n    age: number;\n    firstName: string;\n    lastname: string;\n};\n\n/**\n * This is a model with one nested property\n */\nexport type ModelWithProperties = {\n    required: string;\n    readonly requiredAndReadOnly: string;\n    requiredAndNullable: string | null;\n    string?: string;\n    number?: number;\n    boolean?: boolean;\n    reference?: ModelWithString;\n    'property with space'?: string;\n    default?: string;\n    try?: string;\n    readonly '@namespace.string'?: string;\n    readonly '@namespace.integer'?: number;\n};\n\n/**\n * This is a model with one nested property\n */\nexport type ModelWithNestedProperties = {\n    readonly first: {\n        readonly second: {\n            readonly third: string | null;\n        } | null;\n    } | null;\n};\n\n/**\n * This is a model with duplicated properties\n */\nexport type ModelWithDuplicateProperties = {\n    prop?: ModelWithString;\n};\n\n/**\n * This is a model with ordered properties\n */\nexport type ModelWithOrderedProperties = {\n    zebra?: string;\n    apple?: string;\n    hawaii?: string;\n};\n\n/**\n * This is a model with duplicated imports\n */\nexport type ModelWithDuplicateImports = {\n    propA?: ModelWithString;\n    propB?: ModelWithString;\n    propC?: ModelWithString;\n};\n\n/**\n * This is a model that extends another model\n */\nexport type ModelThatExtends = ModelWithString & {\n    propExtendsA?: string;\n    propExtendsB?: ModelWithString;\n};\n\n/**\n * This is a model that extends another model\n */\nexport type ModelThatExtendsExtends = ModelWithString & ModelThatExtends & {\n    propExtendsC?: string;\n    propExtendsD?: ModelWithString;\n};\n\n/**\n * This is a model that contains a some patterns\n */\nexport type ModelWithPattern = {\n    key: string;\n    name: string;\n    readonly enabled?: boolean;\n    readonly modified?: string;\n    id?: string;\n    text?: string;\n    patternWithSingleQuotes?: string;\n    patternWithNewline?: string;\n    patternWithBacktick?: string;\n    patternWithUnicode?: string;\n};\n\nexport type File = {\n    /**\n     * Id\n     */\n    readonly id?: string;\n    /**\n     * Updated at\n     */\n    readonly updated_at?: string;\n    /**\n     * Created at\n     */\n    readonly created_at?: string;\n    /**\n     * Mime\n     */\n    mime: string;\n    /**\n     * File\n     */\n    readonly file?: string;\n};\n\nexport type Default = {\n    name?: string;\n};\n\nexport type Pageable = {\n    page?: number;\n    size?: number;\n    sort?: Array<string>;\n};\n\n/**\n * This is a free-form object without additionalProperties.\n */\nexport type FreeFormObjectWithoutAdditionalProperties = {\n    [key: string]: unknown;\n};\n\n/**\n * This is a free-form object with additionalProperties: true.\n */\nexport type FreeFormObjectWithAdditionalPropertiesEqTrue = {\n    [key: string]: unknown;\n};\n\n/**\n * This is a free-form object with additionalProperties: {}.\n */\nexport type FreeFormObjectWithAdditionalPropertiesEqEmptyObject = {\n    [key: string]: unknown;\n};\n\nexport type ModelWithConst = {\n    String?: 'String';\n    number?: 0;\n    null?: unknown;\n    withType?: 'Some string';\n};\n\n/**\n * This is a model with one property and additionalProperties: true\n */\nexport type ModelWithAdditionalPropertiesEqTrue = {\n    /**\n     * This is a simple string property\n     */\n    prop?: string;\n    [key: string]: unknown;\n};\n\nexport type NestedAnyOfArraysNullable = {\n    nullableArray?: Array<string | boolean> | null;\n};\n\nexport type CompositionWithOneOfAndProperties = ({\n    foo: SimpleParameter;\n} | {\n    bar: NonAsciiStringæøåÆøÅöôêÊ字符串;\n}) & {\n    baz: number | null;\n    qux: number;\n};\n\n/**\n * An object that can be null\n */\nexport type NullableObject = {\n    foo?: string;\n} | null;\n\n/**\n * Some % character\n */\nexport type CharactersInDescription = string;\n\nexport type ModelWithNullableObject = {\n    data?: NullableObject;\n};\n\n/**\n * An object with additional properties that can be null\n */\nexport type ModelWithAdditionalPropertiesRef = {\n    [key: string]: NullableObject | null;\n};\n\nexport type ModelWithOneOfEnum = {\n    foo: 'Bar';\n} | {\n    foo: 'Baz';\n} | {\n    foo: 'Qux';\n} | {\n    content: string;\n    foo: 'Quux';\n} | {\n    content: [\n        string,\n        string\n    ];\n    foo: 'Corge';\n};\n\nexport type ModelWithNestedArrayEnumsDataFoo = 'foo' | 'bar';\n\nexport type ModelWithNestedArrayEnumsDataBar = 'baz' | 'qux';\n\nexport type ModelWithNestedArrayEnumsData = {\n    foo?: Array<ModelWithNestedArrayEnumsDataFoo>;\n    bar?: Array<ModelWithNestedArrayEnumsDataBar>;\n};\n\nexport type ModelWithNestedArrayEnums = {\n    array_strings?: Array<string>;\n    data?: ModelWithNestedArrayEnumsData;\n};\n\nexport type ModelWithNestedCompositionEnums = {\n    foo?: ModelWithNestedArrayEnumsDataFoo;\n};\n\nexport type ModelWithReadOnlyAndWriteOnly = {\n    foo: string;\n    readonly bar: string;\n};\n\nexport type ModelWithConstantSizeArray = [\n    number,\n    number\n];\n\nexport type ModelWithAnyOfConstantSizeArray = [\n    number | string,\n    number | string,\n    number | string\n];\n\nexport type ModelWithPrefixItemsConstantSizeArray = Array<ModelWithInteger | number | string>;\n\nexport type ModelWithAnyOfConstantSizeArrayNullable = [\n    number | null | string,\n    number | null | string,\n    number | null | string\n];\n\nexport type ModelWithAnyOfConstantSizeArrayWithNSizeAndOptions = [\n    number | Import,\n    number | Import\n];\n\nexport type ModelWithAnyOfConstantSizeArrayAndIntersect = [\n    number & string,\n    number & string\n];\n\nexport type ModelWithNumericEnumUnion = {\n    /**\n     * Период\n     */\n    value?: -10 | -1 | 0 | 1 | 3 | 6 | 12;\n};\n\n/**\n * Some description with `back ticks`\n */\nexport type ModelWithBackticksInDescription = {\n    /**\n     * The template `that` should be used for parsing and importing the contents of the CSV file.\n     *\n     * <br/><p>There is one placeholder currently supported:<ul>     <li><b>${x}</b> - refers to the n-th column in the CSV file, e.g. ${1}, ${2}, ...)</li></ul><p>Example of a correct JSON template:</p>\n     * <pre>\n     * [\n     * {\n     * \"resourceType\": \"Asset\",\n     * \"identifier\": {\n     * \"name\": \"${1}\",\n     * \"domain\": {\n     * \"name\": \"${2}\",\n     * \"community\": {\n     * \"name\": \"Some Community\"\n     * }\n     * }\n     * },\n     * \"attributes\" : {\n     * \"00000000-0000-0000-0000-000000003115\" : [ {\n     * \"value\" : \"${3}\"\n     * } ],\n     * \"00000000-0000-0000-0000-000000000222\" : [ {\n     * \"value\" : \"${4}\"\n     * } ]\n     * }\n     * }\n     * ]\n     * </pre>\n     */\n    template?: string;\n};\n\nexport type ModelWithOneOfAndProperties = (SimpleParameter | NonAsciiStringæøåÆøÅöôêÊ字符串) & {\n    baz: number | null;\n    qux: number;\n};\n\n/**\n * Model used to test deduplication strategy (unused)\n */\nexport type ParameterSimpleParameterUnused = string;\n\n/**\n * Model used to test deduplication strategy\n */\nexport type PostServiceWithEmptyTagResponse = string;\n\n/**\n * Model used to test deduplication strategy\n */\nexport type PostServiceWithEmptyTagResponse2 = string;\n\n/**\n * Model used to test deduplication strategy\n */\nexport type DeleteFooData = string;\n\n/**\n * Model used to test deduplication strategy\n */\nexport type DeleteFooData2 = string;\n\n/**\n * Model with restricted keyword name\n */\nexport type Import = string;\n\nexport type SchemaWithFormRestrictedKeys = {\n    description?: string;\n    'x-enum-descriptions'?: string;\n    'x-enum-varnames'?: string;\n    'x-enumNames'?: string;\n    title?: string;\n    object?: {\n        description?: string;\n        'x-enum-descriptions'?: string;\n        'x-enum-varnames'?: string;\n        'x-enumNames'?: string;\n        title?: string;\n    };\n    array?: Array<{\n        description?: string;\n        'x-enum-descriptions'?: string;\n        'x-enum-varnames'?: string;\n        'x-enumNames'?: string;\n        title?: string;\n    }>;\n};\n\n/**\n * This schema was giving PascalCase transformations a hard time\n */\nexport type IoK8sApimachineryPkgApisMetaV1DeleteOptions = {\n    /**\n     * Must be fulfilled before a deletion is carried out. If not possible, a 409 Conflict status will be returned.\n     */\n    preconditions?: IoK8sApimachineryPkgApisMetaV1Preconditions;\n};\n\n/**\n * This schema was giving PascalCase transformations a hard time\n */\nexport type IoK8sApimachineryPkgApisMetaV1Preconditions = {\n    /**\n     * Specifies the target ResourceVersion\n     */\n    resourceVersion?: string;\n    /**\n     * Specifies the target UID.\n     */\n    uid?: string;\n};\n\nexport type AdditionalPropertiesUnknownIssue = {\n    [key: string]: string | number;\n};\n\nexport type AdditionalPropertiesUnknownIssue2 = {\n    [key: string]: string | number;\n};\n\nexport type AdditionalPropertiesUnknownIssue3 = string & {\n    entries: {\n        [key: string]: AdditionalPropertiesUnknownIssue;\n    };\n};\n\nexport type AdditionalPropertiesIntegerIssue = {\n    value: number;\n    [key: string]: number;\n};\n\nexport type OneOfAllOfIssue = ((ConstValue | GenericSchemaDuplicateIssue1SystemBoolean) & _3eNum1Период) | GenericSchemaDuplicateIssue1SystemString;\n\nexport type GenericSchemaDuplicateIssue1SystemBoolean = {\n    item?: boolean;\n    error?: string | null;\n    readonly hasError?: boolean;\n    data?: {\n        [key: string]: never;\n    };\n};\n\nexport type GenericSchemaDuplicateIssue1SystemString = {\n    item?: string | null;\n    error?: string | null;\n    readonly hasError?: boolean;\n};\n\nexport type ExternalSharedModel = {\n    id: string;\n    name?: string;\n};\n\n/**\n * This is a model with one property containing a reference\n */\nexport type ModelWithReferenceWritable = {\n    prop?: ModelWithPropertiesWritable;\n};\n\n/**\n * This is a model with one property containing an array\n */\nexport type ModelWithArrayReadOnlyAndWriteOnlyWritable = {\n    prop?: Array<ModelWithReadOnlyAndWriteOnlyWritable>;\n    propWithFile?: Array<Blob | File>;\n    propWithNumber?: Array<number>;\n};\n\n/**\n * This is a model with one nested property\n */\nexport type ModelWithPropertiesWritable = {\n    required: string;\n    requiredAndNullable: string | null;\n    string?: string;\n    number?: number;\n    boolean?: boolean;\n    reference?: ModelWithString;\n    'property with space'?: string;\n    default?: string;\n    try?: string;\n};\n\n/**\n * This is a model that contains a some patterns\n */\nexport type ModelWithPatternWritable = {\n    key: string;\n    name: string;\n    id?: string;\n    text?: string;\n    patternWithSingleQuotes?: string;\n    patternWithNewline?: string;\n    patternWithBacktick?: string;\n    patternWithUnicode?: string;\n};\n\nexport type FileWritable = {\n    /**\n     * Mime\n     */\n    mime: string;\n};\n\nexport type ModelWithReadOnlyAndWriteOnlyWritable = {\n    foo: string;\n    baz: string;\n};\n\nexport type ModelWithAnyOfConstantSizeArrayWithNSizeAndOptionsWritable = [\n    number | Import,\n    number | Import\n];\n\nexport type AdditionalPropertiesUnknownIssueWritable = {\n    [key: string]: string | number;\n};\n\nexport type OneOfAllOfIssueWritable = ((ConstValue | GenericSchemaDuplicateIssue1SystemBoolean) & _3eNum1Период) | GenericSchemaDuplicateIssue1SystemString;\n\nexport type GenericSchemaDuplicateIssue1SystemBooleanWritable = {\n    item?: boolean;\n    error?: string | null;\n    data?: {\n        [key: string]: never;\n    };\n};\n\nexport type GenericSchemaDuplicateIssue1SystemStringWritable = {\n    item?: string | null;\n    error?: string | null;\n};\n\n/**\n * This is a reusable parameter\n */\nexport type SimpleParameter = string;\n\n/**\n * Parameter with illegal characters\n */\nexport type XFooBar = ModelWithString;\n\nexport type SimpleRequestBody = ModelWithString;\n\nexport type SimpleFormData = ModelWithString;\n\nexport type ExportData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no+tag';\n};\n\nexport type PatchApiVbyApiVersionNoTagData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no+tag';\n};\n\nexport type PatchApiVbyApiVersionNoTagResponses = {\n    /**\n     * OK\n     */\n    default: unknown;\n};\n\nexport type ImportData = {\n    body: ModelWithReadOnlyAndWriteOnlyWritable | ModelWithArrayReadOnlyAndWriteOnlyWritable;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no+tag';\n};\n\nexport type ImportResponses = {\n    /**\n     * Success\n     */\n    200: ModelFromZendesk;\n    /**\n     * Default success response\n     */\n    default: ModelWithReadOnlyAndWriteOnly;\n};\n\nexport type ImportResponse = ImportResponses[keyof ImportResponses];\n\nexport type FooWowData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no+tag';\n};\n\nexport type FooWowResponses = {\n    /**\n     * OK\n     */\n    default: unknown;\n};\n\nexport type ApiVVersionODataControllerCountData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple/$count';\n};\n\nexport type ApiVVersionODataControllerCountResponses = {\n    /**\n     * Success\n     */\n    200: ModelFromZendesk;\n};\n\nexport type ApiVVersionODataControllerCountResponse = ApiVVersionODataControllerCountResponses[keyof ApiVVersionODataControllerCountResponses];\n\nexport type GetApiVbyApiVersionSimpleOperationData = {\n    body?: never;\n    path: {\n        /**\n         * foo in method\n         */\n        foo_param: string;\n    };\n    query?: never;\n    url: '/api/v{api-version}/simple:operation';\n};\n\nexport type GetApiVbyApiVersionSimpleOperationErrors = {\n    /**\n     * Default error response\n     */\n    default: ModelWithBoolean;\n};\n\nexport type GetApiVbyApiVersionSimpleOperationError = GetApiVbyApiVersionSimpleOperationErrors[keyof GetApiVbyApiVersionSimpleOperationErrors];\n\nexport type GetApiVbyApiVersionSimpleOperationResponses = {\n    /**\n     * Response is a simple number\n     */\n    200: number;\n};\n\nexport type GetApiVbyApiVersionSimpleOperationResponse = GetApiVbyApiVersionSimpleOperationResponses[keyof GetApiVbyApiVersionSimpleOperationResponses];\n\nexport type DeleteCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type GetCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type HeadCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type OptionsCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type PatchCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type PostCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type PutCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type DeleteFooData3 = {\n    body?: never;\n    headers: {\n        /**\n         * Parameter with illegal characters\n         */\n        'x-Foo-Bar': ModelWithString;\n    };\n    path: {\n        /**\n         * foo in method\n         */\n        foo_param: string;\n        /**\n         * bar in method\n         */\n        BarParam: string;\n    };\n    query?: never;\n    url: '/api/v{api-version}/foo/{foo_param}/bar/{BarParam}';\n};\n\nexport type CallWithDescriptionsData = {\n    body?: never;\n    path?: never;\n    query?: {\n        /**\n         * Testing multiline comments in string: First line\n         * Second line\n         *\n         * Fourth line\n         */\n        parameterWithBreaks?: string;\n        /**\n         * Testing backticks in string: `backticks` and ```multiple backticks``` should work\n         */\n        parameterWithBackticks?: string;\n        /**\n         * Testing slashes in string: \\backwards\\\\\\ and /forwards/// should work\n         */\n        parameterWithSlashes?: string;\n        /**\n         * Testing expression placeholders in string: ${expression} should work\n         */\n        parameterWithExpressionPlaceholders?: string;\n        /**\n         * Testing quotes in string: 'single quote''' and \"double quotes\"\"\" should work\n         */\n        parameterWithQuotes?: string;\n        /**\n         * Testing reserved characters in string: * inline * and ** inline ** should work\n         */\n        parameterWithReservedCharacters?: string;\n    };\n    url: '/api/v{api-version}/descriptions';\n};\n\nexport type DeprecatedCallData = {\n    body?: never;\n    headers: {\n        /**\n         * This parameter is deprecated\n         *\n         * @deprecated\n         */\n        parameter: DeprecatedModel | null;\n    };\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/parameters/deprecated';\n};\n\nexport type CallWithParametersData = {\n    /**\n     * This is the parameter that goes into the body\n     */\n    body: {\n        [key: string]: unknown;\n    } | null;\n    headers: {\n        /**\n         * This is the parameter that goes into the header\n         */\n        parameterHeader: string | null;\n    };\n    path: {\n        /**\n         * This is the parameter that goes into the path\n         */\n        parameterPath: string | null;\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string | null;\n    };\n    query: {\n        foo_ref_enum?: ModelWithNestedArrayEnumsDataFoo;\n        foo_all_of_enum: ModelWithNestedArrayEnumsDataFoo;\n        /**\n         * This is the parameter that goes into the query params\n         */\n        cursor: string | null;\n    };\n    url: '/api/v{api-version}/parameters/{parameterPath}';\n};\n\nexport type CallWithWeirdParameterNamesData = {\n    /**\n     * This is the parameter that goes into the body\n     */\n    body: ModelWithString | null;\n    headers: {\n        /**\n         * This is the parameter that goes into the request header\n         */\n        'parameter.header': string | null;\n    };\n    path: {\n        /**\n         * This is the parameter that goes into the path\n         */\n        'parameter.path.1'?: string;\n        /**\n         * This is the parameter that goes into the path\n         */\n        'parameter-path-2'?: string;\n        /**\n         * This is the parameter that goes into the path\n         */\n        'PARAMETER-PATH-3'?: string;\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string | null;\n    };\n    query: {\n        /**\n         * This is the parameter with a reserved keyword\n         */\n        default?: string;\n        /**\n         * This is the parameter that goes into the request query params\n         */\n        'parameter-query': string | null;\n    };\n    url: '/api/v{api-version}/parameters/{parameter.path.1}/{parameter-path-2}/{PARAMETER-PATH-3}';\n};\n\nexport type GetCallWithOptionalParamData = {\n    /**\n     * This is a required parameter\n     */\n    body: ModelWithOneOfEnum;\n    path?: never;\n    query?: {\n        /**\n         * This is an optional parameter\n         */\n        page?: number;\n    };\n    url: '/api/v{api-version}/parameters';\n};\n\nexport type PostCallWithOptionalParamData = {\n    /**\n     * This is an optional parameter\n     */\n    body?: {\n        offset?: number | null;\n    };\n    path?: never;\n    query: {\n        /**\n         * This is a required parameter\n         */\n        parameter: Pageable;\n    };\n    url: '/api/v{api-version}/parameters';\n};\n\nexport type PostCallWithOptionalParamResponses = {\n    /**\n     * Response is a simple number\n     */\n    200: number;\n    /**\n     * Success\n     */\n    204: void;\n};\n\nexport type PostCallWithOptionalParamResponse = PostCallWithOptionalParamResponses[keyof PostCallWithOptionalParamResponses];\n\nexport type PostApiVbyApiVersionRequestBodyData = {\n    /**\n     * A reusable request body\n     */\n    body?: SimpleRequestBody;\n    path?: never;\n    query?: {\n        /**\n         * This is a reusable parameter\n         */\n        parameter?: string;\n    };\n    url: '/api/v{api-version}/requestBody';\n};\n\nexport type PostApiVbyApiVersionFormDataData = {\n    /**\n     * A reusable request body\n     */\n    body?: SimpleFormData;\n    path?: never;\n    query?: {\n        /**\n         * This is a reusable parameter\n         */\n        parameter?: string;\n    };\n    url: '/api/v{api-version}/formData';\n};\n\nexport type CallWithDefaultParametersData = {\n    body?: never;\n    path?: never;\n    query?: {\n        /**\n         * This is a simple string with default value\n         */\n        parameterString?: string | null;\n        /**\n         * This is a simple number with default value\n         */\n        parameterNumber?: number | null;\n        /**\n         * This is a simple boolean with default value\n         */\n        parameterBoolean?: boolean | null;\n        /**\n         * This is a simple enum with default value\n         */\n        parameterEnum?: 'Success' | 'Warning' | 'Error';\n        /**\n         * This is a simple model with default value\n         */\n        parameterModel?: ModelWithString | null;\n    };\n    url: '/api/v{api-version}/defaults';\n};\n\nexport type CallWithDefaultOptionalParametersData = {\n    body?: never;\n    path?: never;\n    query?: {\n        /**\n         * This is a simple string that is optional with default value\n         */\n        parameterString?: string;\n        /**\n         * This is a simple number that is optional with default value\n         */\n        parameterNumber?: number;\n        /**\n         * This is a simple boolean that is optional with default value\n         */\n        parameterBoolean?: boolean;\n        /**\n         * This is a simple enum that is optional with default value\n         */\n        parameterEnum?: 'Success' | 'Warning' | 'Error';\n        /**\n         * This is a simple model that is optional with default value\n         */\n        parameterModel?: ModelWithString;\n    };\n    url: '/api/v{api-version}/defaults';\n};\n\nexport type CallToTestOrderOfParamsData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * This is a optional string with default\n         */\n        parameterOptionalStringWithDefault?: string;\n        /**\n         * This is a optional string with empty default\n         */\n        parameterOptionalStringWithEmptyDefault?: string;\n        /**\n         * This is a optional string with no default\n         */\n        parameterOptionalStringWithNoDefault?: string;\n        /**\n         * This is a string with default\n         */\n        parameterStringWithDefault: string;\n        /**\n         * This is a string with empty default\n         */\n        parameterStringWithEmptyDefault: string;\n        /**\n         * This is a string with no default\n         */\n        parameterStringWithNoDefault: string;\n        /**\n         * This is a string that can be null with no default\n         */\n        parameterStringNullableWithNoDefault?: string | null;\n        /**\n         * This is a string that can be null with default\n         */\n        parameterStringNullableWithDefault?: string | null;\n    };\n    url: '/api/v{api-version}/defaults';\n};\n\nexport type DuplicateNameData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/duplicate';\n};\n\nexport type DuplicateName2Data = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/duplicate';\n};\n\nexport type DuplicateName3Data = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/duplicate';\n};\n\nexport type DuplicateName4Data = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/duplicate';\n};\n\nexport type CallWithNoContentResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no-content';\n};\n\nexport type CallWithNoContentResponseResponses = {\n    /**\n     * Success\n     */\n    204: void;\n};\n\nexport type CallWithNoContentResponseResponse = CallWithNoContentResponseResponses[keyof CallWithNoContentResponseResponses];\n\nexport type CallWithResponseAndNoContentResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multiple-tags/response-and-no-content';\n};\n\nexport type CallWithResponseAndNoContentResponseResponses = {\n    /**\n     * Response is a simple number\n     */\n    200: number;\n    /**\n     * Success\n     */\n    204: void;\n};\n\nexport type CallWithResponseAndNoContentResponseResponse = CallWithResponseAndNoContentResponseResponses[keyof CallWithResponseAndNoContentResponseResponses];\n\nexport type DummyAData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multiple-tags/a';\n};\n\nexport type DummyAResponses = {\n    200: _400;\n};\n\nexport type DummyAResponse = DummyAResponses[keyof DummyAResponses];\n\nexport type DummyBData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multiple-tags/b';\n};\n\nexport type DummyBResponses = {\n    /**\n     * Success\n     */\n    204: void;\n};\n\nexport type DummyBResponse = DummyBResponses[keyof DummyBResponses];\n\nexport type CallWithResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/response';\n};\n\nexport type CallWithResponseResponses = {\n    default: Import;\n};\n\nexport type CallWithResponseResponse = CallWithResponseResponses[keyof CallWithResponseResponses];\n\nexport type CallWithDuplicateResponsesData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/response';\n};\n\nexport type CallWithDuplicateResponsesErrors = {\n    /**\n     * Message for 500 error\n     */\n    500: ModelWithStringError;\n    /**\n     * Message for 501 error\n     */\n    501: ModelWithStringError;\n    /**\n     * Message for 502 error\n     */\n    502: ModelWithStringError;\n    /**\n     * Message for 4XX errors\n     */\n    '4XX': DictionaryWithArray;\n    /**\n     * Default error response\n     */\n    default: ModelWithBoolean;\n};\n\nexport type CallWithDuplicateResponsesError = CallWithDuplicateResponsesErrors[keyof CallWithDuplicateResponsesErrors];\n\nexport type CallWithDuplicateResponsesResponses = {\n    /**\n     * Message for 200 response\n     */\n    200: ModelWithBoolean & ModelWithInteger;\n    /**\n     * Message for 201 response\n     */\n    201: ModelWithString;\n    /**\n     * Message for 202 response\n     */\n    202: ModelWithString;\n};\n\nexport type CallWithDuplicateResponsesResponse = CallWithDuplicateResponsesResponses[keyof CallWithDuplicateResponsesResponses];\n\nexport type CallWithResponsesData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/response';\n};\n\nexport type CallWithResponsesErrors = {\n    /**\n     * Message for 500 error\n     */\n    500: ModelWithStringError;\n    /**\n     * Message for 501 error\n     */\n    501: ModelWithStringError;\n    /**\n     * Message for 502 error\n     */\n    502: ModelWithStringError;\n    /**\n     * Message for default response\n     */\n    default: ModelWithStringError;\n};\n\nexport type CallWithResponsesError = CallWithResponsesErrors[keyof CallWithResponsesErrors];\n\nexport type CallWithResponsesResponses = {\n    /**\n     * Message for 200 response\n     */\n    200: {\n        readonly '@namespace.string'?: string;\n        readonly '@namespace.integer'?: number;\n        readonly value?: Array<ModelWithString>;\n    };\n    /**\n     * Message for 201 response\n     */\n    201: ModelThatExtends;\n    /**\n     * Message for 202 response\n     */\n    202: ModelThatExtendsExtends;\n};\n\nexport type CallWithResponsesResponse = CallWithResponsesResponses[keyof CallWithResponsesResponses];\n\nexport type CollectionFormatData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * This is an array parameter that is sent as csv format (comma-separated values)\n         */\n        parameterArrayCSV: Array<string> | null;\n        /**\n         * This is an array parameter that is sent as ssv format (space-separated values)\n         */\n        parameterArraySSV: Array<string> | null;\n        /**\n         * This is an array parameter that is sent as tsv format (tab-separated values)\n         */\n        parameterArrayTSV: Array<string> | null;\n        /**\n         * This is an array parameter that is sent as pipes format (pipe-separated values)\n         */\n        parameterArrayPipes: Array<string> | null;\n        /**\n         * This is an array parameter that is sent as multi format (multiple parameter instances)\n         */\n        parameterArrayMulti: Array<string> | null;\n    };\n    url: '/api/v{api-version}/collectionFormat';\n};\n\nexport type TypesData = {\n    body?: never;\n    path?: {\n        /**\n         * This is a number parameter\n         */\n        id?: number;\n    };\n    query: {\n        /**\n         * This is a number parameter\n         */\n        parameterNumber: number;\n        /**\n         * This is a string parameter\n         */\n        parameterString: string | null;\n        /**\n         * This is a boolean parameter\n         */\n        parameterBoolean: boolean | null;\n        /**\n         * This is an object parameter\n         */\n        parameterObject: {\n            [key: string]: unknown;\n        } | null;\n        /**\n         * This is an array parameter\n         */\n        parameterArray: Array<string> | null;\n        /**\n         * This is a dictionary parameter\n         */\n        parameterDictionary: {\n            [key: string]: unknown;\n        } | null;\n        /**\n         * This is an enum parameter\n         */\n        parameterEnum: 'Success' | 'Warning' | 'Error';\n    };\n    url: '/api/v{api-version}/types';\n};\n\nexport type TypesResponses = {\n    /**\n     * Response is a simple number\n     */\n    200: number;\n    /**\n     * Response is a simple string\n     */\n    201: string;\n    /**\n     * Response is a simple boolean\n     */\n    202: boolean;\n    /**\n     * Response is a simple object\n     */\n    203: {\n        [key: string]: unknown;\n    };\n};\n\nexport type TypesResponse = TypesResponses[keyof TypesResponses];\n\nexport type UploadFileData = {\n    body: Blob | File;\n    path: {\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string | null;\n    };\n    query?: never;\n    url: '/api/v{api-version}/upload';\n};\n\nexport type UploadFileResponses = {\n    200: boolean;\n};\n\nexport type UploadFileResponse = UploadFileResponses[keyof UploadFileResponses];\n\nexport type FileResponseData = {\n    body?: never;\n    path: {\n        id: string;\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string;\n    };\n    query?: never;\n    url: '/api/v{api-version}/file/{id}';\n};\n\nexport type FileResponseResponses = {\n    /**\n     * Success\n     */\n    200: Blob | File;\n};\n\nexport type FileResponseResponse = FileResponseResponses[keyof FileResponseResponses];\n\nexport type ComplexTypesData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * Parameter containing object\n         */\n        parameterObject: {\n            first?: {\n                second?: {\n                    third?: string;\n                };\n            };\n        };\n        /**\n         * Parameter containing reference\n         */\n        parameterReference: ModelWithString;\n    };\n    url: '/api/v{api-version}/complex';\n};\n\nexport type ComplexTypesErrors = {\n    /**\n     * 400 `server` error\n     */\n    400: unknown;\n    /**\n     * 500 server error\n     */\n    500: unknown;\n};\n\nexport type ComplexTypesResponses = {\n    /**\n     * Successful response\n     */\n    200: Array<ModelWithString>;\n};\n\nexport type ComplexTypesResponse = ComplexTypesResponses[keyof ComplexTypesResponses];\n\nexport type MultipartResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multipart';\n};\n\nexport type MultipartResponseResponses = {\n    /**\n     * OK\n     */\n    200: {\n        file?: Blob | File;\n        metadata?: {\n            foo?: string;\n            bar?: string;\n        };\n    };\n};\n\nexport type MultipartResponseResponse = MultipartResponseResponses[keyof MultipartResponseResponses];\n\nexport type MultipartRequestData = {\n    body?: {\n        content?: Blob | File;\n        data?: ModelWithString | null;\n    };\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multipart';\n};\n\nexport type ComplexParamsData = {\n    body?: {\n        readonly key: string | null;\n        name: string | null;\n        enabled?: boolean;\n        type: 'Monkey' | 'Horse' | 'Bird';\n        listOfModels?: Array<ModelWithString> | null;\n        listOfStrings?: Array<string> | null;\n        parameters: ModelWithString | ModelWithEnum | ModelWithArray | ModelWithDictionary;\n        readonly user?: {\n            readonly id?: number;\n            readonly name?: string | null;\n        };\n    };\n    path: {\n        id: number;\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string;\n    };\n    query?: never;\n    url: '/api/v{api-version}/complex/{id}';\n};\n\nexport type ComplexParamsResponses = {\n    /**\n     * Success\n     */\n    200: ModelWithString;\n};\n\nexport type ComplexParamsResponse = ComplexParamsResponses[keyof ComplexParamsResponses];\n\nexport type CallWithResultFromHeaderData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/header';\n};\n\nexport type CallWithResultFromHeaderErrors = {\n    /**\n     * 400 server error\n     */\n    400: unknown;\n    /**\n     * 500 server error\n     */\n    500: unknown;\n};\n\nexport type CallWithResultFromHeaderResponses = {\n    /**\n     * Successful response\n     */\n    200: unknown;\n};\n\nexport type TestErrorCodeData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * Status code to return\n         */\n        status: number;\n    };\n    url: '/api/v{api-version}/error';\n};\n\nexport type TestErrorCodeErrors = {\n    /**\n     * Custom message: Internal Server Error\n     */\n    500: unknown;\n    /**\n     * Custom message: Not Implemented\n     */\n    501: unknown;\n    /**\n     * Custom message: Bad Gateway\n     */\n    502: unknown;\n    /**\n     * Custom message: Service Unavailable\n     */\n    503: unknown;\n};\n\nexport type TestErrorCodeResponses = {\n    /**\n     * Custom message: Successful response\n     */\n    200: unknown;\n};\n\nexport type NonAsciiæøåÆøÅöôêÊ字符串Data = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * Dummy input param\n         */\n        nonAsciiParamæøåÆØÅöôêÊ: number;\n    };\n    url: '/api/v{api-version}/non-ascii-æøåÆØÅöôêÊ字符串';\n};\n\nexport type NonAsciiæøåÆøÅöôêÊ字符串Responses = {\n    /**\n     * Successful response\n     */\n    200: Array<NonAsciiStringæøåÆøÅöôêÊ字符串>;\n};\n\nexport type NonAsciiæøåÆøÅöôêÊ字符串Response = NonAsciiæøåÆøÅöôêÊ字符串Responses[keyof NonAsciiæøåÆøÅöôêÊ字符串Responses];\n\nexport type PutWithFormUrlEncodedData = {\n    body: ArrayWithStrings;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/non-ascii-æøåÆØÅöôêÊ字符串';\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@hey-api/typescript/transforms-read-write-custom-name/client/client.gen.ts",
    "content": "// 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 (options: RequestOptions) => {\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 url = buildUrl(opts);\n\n    return { opts, url };\n  };\n\n  const request: Client['request'] = async (options) => {\n    // @ts-expect-error\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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@hey-api/typescript/transforms-read-write-custom-name/client/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type { Auth } from '../core/auth.gen';\nexport type { QuerySerializerOptions } from '../core/bodySerializer.gen';\nexport {\n  formDataBodySerializer,\n  jsonBodySerializer,\n  urlSearchParamsBodySerializer,\n} from '../core/bodySerializer.gen';\nexport { buildClientParams } from '../core/params.gen';\nexport { serializeQueryKeyValue } from '../core/queryKeySerializer.gen';\nexport { createClient } from './client.gen';\nexport type {\n  Client,\n  ClientOptions,\n  Config,\n  CreateClientConfig,\n  Options,\n  RequestOptions,\n  RequestResult,\n  ResolvedRequestOptions,\n  ResponseStyle,\n  TDataShape,\n} from './types.gen';\nexport { createConfig, mergeHeaders } from './utils.gen';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@hey-api/typescript/transforms-read-write-custom-name/client/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { Auth } from '../core/auth.gen';\nimport type {\n  ServerSentEventsOptions,\n  ServerSentEventsResult,\n} from '../core/serverSentEvents.gen';\nimport type { Client as CoreClient, Config as CoreConfig } from '../core/types.gen';\nimport type { Middleware } from './utils.gen';\n\nexport type ResponseStyle = 'data' | 'fields';\n\nexport interface Config<T extends ClientOptions = ClientOptions>\n  extends Omit<RequestInit, 'body' | 'headers' | 'method'>, CoreConfig {\n  /**\n   * Base URL for all requests made by this client.\n   */\n  baseUrl?: T['baseUrl'];\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   * Please don't use the Fetch client for Next.js applications. The `next`\n   * options won't have any effect.\n   *\n   * Install {@link https://www.npmjs.com/package/@hey-api/client-next `@hey-api/client-next`} instead.\n   */\n  next?: never;\n  /**\n   * Return the response data parsed in a specified format. By default, `auto`\n   * will infer the appropriate method from the `Content-Type` response header.\n   * You can override this behavior with any of the {@link Body} methods.\n   * Select `stream` if you don't want to parse response data at all.\n   *\n   * @default 'auto'\n   */\n  parseAs?: 'arrayBuffer' | 'auto' | 'blob' | 'formData' | 'json' | 'stream' | 'text';\n  /**\n   * Should we return only data or multiple fields (data, error, response, etc.)?\n   *\n   * @default 'fields'\n   */\n  responseStyle?: ResponseStyle;\n  /**\n   * Throw an error instead of returning it in the response?\n   *\n   * @default false\n   */\n  throwOnError?: T['throwOnError'];\n}\n\nexport interface RequestOptions<\n  TData = unknown,\n  TResponseStyle extends ResponseStyle = 'fields',\n  ThrowOnError extends boolean = boolean,\n  Url extends string = string,\n>\n  extends\n    Config<{\n      responseStyle: TResponseStyle;\n      throwOnError: ThrowOnError;\n    }>,\n    Pick<\n      ServerSentEventsOptions<TData>,\n      | 'onRequest'\n      | 'onSseError'\n      | 'onSseEvent'\n      | 'sseDefaultRetryDelay'\n      | 'sseMaxRetryAttempts'\n      | 'sseMaxRetryDelay'\n    > {\n  /**\n   * Any body that you want to add to your request.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/fetch#body}\n   */\n  body?: unknown;\n  path?: Record<string, unknown>;\n  query?: Record<string, unknown>;\n  /**\n   * Security mechanism(s) to use for the request.\n   */\n  security?: ReadonlyArray<Auth>;\n  url: Url;\n}\n\nexport interface ResolvedRequestOptions<\n  TResponseStyle extends ResponseStyle = 'fields',\n  ThrowOnError extends boolean = boolean,\n  Url extends string = string,\n> extends RequestOptions<unknown, TResponseStyle, ThrowOnError, Url> {\n  serializedBody?: string;\n}\n\nexport type RequestResult<\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = boolean,\n  TResponseStyle extends ResponseStyle = 'fields',\n> = ThrowOnError extends true\n  ? Promise<\n      TResponseStyle extends 'data'\n        ? TData extends Record<string, unknown>\n          ? TData[keyof TData]\n          : TData\n        : {\n            data: TData extends Record<string, unknown> ? TData[keyof TData] : TData;\n            request: Request;\n            response: Response;\n          }\n    >\n  : Promise<\n      TResponseStyle extends 'data'\n        ? (TData extends Record<string, unknown> ? TData[keyof TData] : TData) | undefined\n        : (\n            | {\n                data: TData extends Record<string, unknown> ? TData[keyof TData] : TData;\n                error: undefined;\n              }\n            | {\n                data: undefined;\n                error: TError extends Record<string, unknown> ? TError[keyof TError] : TError;\n              }\n          ) & {\n            request: Request;\n            response: Response;\n          }\n    >;\n\nexport interface ClientOptions {\n  baseUrl?: string;\n  responseStyle?: ResponseStyle;\n  throwOnError?: boolean;\n}\n\ntype MethodFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'>,\n) => RequestResult<TData, TError, ThrowOnError, TResponseStyle>;\n\ntype SseFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'>,\n) => Promise<ServerSentEventsResult<TData, TError>>;\n\ntype RequestFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'> &\n    Pick<Required<RequestOptions<TData, TResponseStyle, ThrowOnError>>, 'method'>,\n) => RequestResult<TData, TError, ThrowOnError, TResponseStyle>;\n\ntype BuildUrlFn = <\n  TData extends {\n    body?: unknown;\n    path?: Record<string, unknown>;\n    query?: Record<string, unknown>;\n    url: string;\n  },\n>(\n  options: TData & Options<TData>,\n) => string;\n\nexport type Client = CoreClient<RequestFn, Config, MethodFn, BuildUrlFn, SseFn> & {\n  interceptors: Middleware<Request, Response, unknown, ResolvedRequestOptions>;\n};\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 = ClientOptions> = (\n  override?: Config<ClientOptions & T>,\n) => Config<Required<ClientOptions> & T>;\n\nexport interface TDataShape {\n  body?: unknown;\n  headers?: unknown;\n  path?: unknown;\n  query?: unknown;\n  url: string;\n}\n\ntype OmitKeys<T, K> = Pick<T, Exclude<keyof T, K>>;\n\nexport type Options<\n  TData extends TDataShape = TDataShape,\n  ThrowOnError extends boolean = boolean,\n  TResponse = unknown,\n  TResponseStyle extends ResponseStyle = 'fields',\n> = OmitKeys<\n  RequestOptions<TResponse, TResponseStyle, ThrowOnError>,\n  'body' | 'path' | 'query' | 'url'\n> &\n  ([TData] extends [never] ? unknown : Omit<TData, 'url'>);\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@hey-api/typescript/transforms-read-write-custom-name/client/utils.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@hey-api/typescript/transforms-read-write-custom-name/client.gen.ts",
    "content": "// 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>());\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@hey-api/typescript/transforms-read-write-custom-name/core/auth.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@hey-api/typescript/transforms-read-write-custom-name/core/bodySerializer.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@hey-api/typescript/transforms-read-write-custom-name/core/params.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@hey-api/typescript/transforms-read-write-custom-name/core/pathSerializer.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@hey-api/typescript/transforms-read-write-custom-name/core/queryKeySerializer.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\n/**\n * JSON-friendly union that mirrors what Pinia Colada can hash.\n */\nexport type JsonValue =\n  | null\n  | string\n  | number\n  | boolean\n  | JsonValue[]\n  | { [key: string]: JsonValue };\n\n/**\n * Replacer that converts non-JSON values (bigint, Date, etc.) to safe substitutes.\n */\nexport const queryKeyJsonReplacer = (_key: string, value: unknown) => {\n  if (value === undefined || typeof value === 'function' || typeof value === 'symbol') {\n    return undefined;\n  }\n  if (typeof value === 'bigint') {\n    return value.toString();\n  }\n  if (value instanceof Date) {\n    return value.toISOString();\n  }\n  return value;\n};\n\n/**\n * Safely stringifies a value and parses it back into a JsonValue.\n */\nexport const stringifyToJsonValue = (input: unknown): JsonValue | undefined => {\n  try {\n    const json = JSON.stringify(input, queryKeyJsonReplacer);\n    if (json === undefined) {\n      return undefined;\n    }\n    return JSON.parse(json) as JsonValue;\n  } catch {\n    return undefined;\n  }\n};\n\n/**\n * Detects plain objects (including objects with a null prototype).\n */\nconst isPlainObject = (value: unknown): value is Record<string, unknown> => {\n  if (value === null || typeof value !== 'object') {\n    return false;\n  }\n  const prototype = Object.getPrototypeOf(value as object);\n  return prototype === Object.prototype || prototype === null;\n};\n\n/**\n * Turns URLSearchParams into a sorted JSON object for deterministic keys.\n */\nconst serializeSearchParams = (params: URLSearchParams): JsonValue => {\n  const entries = Array.from(params.entries()).sort(([a], [b]) => a.localeCompare(b));\n  const result: Record<string, JsonValue> = {};\n\n  for (const [key, value] of entries) {\n    const existing = result[key];\n    if (existing === undefined) {\n      result[key] = value;\n      continue;\n    }\n\n    if (Array.isArray(existing)) {\n      (existing as string[]).push(value);\n    } else {\n      result[key] = [existing, value];\n    }\n  }\n\n  return result;\n};\n\n/**\n * Normalizes any accepted value into a JSON-friendly shape for query keys.\n */\nexport const serializeQueryKeyValue = (value: unknown): JsonValue | undefined => {\n  if (value === null) {\n    return null;\n  }\n\n  if (typeof value === 'string' || typeof value === 'number' || typeof value === 'boolean') {\n    return value;\n  }\n\n  if (value === undefined || typeof value === 'function' || typeof value === 'symbol') {\n    return undefined;\n  }\n\n  if (typeof value === 'bigint') {\n    return value.toString();\n  }\n\n  if (value instanceof Date) {\n    return value.toISOString();\n  }\n\n  if (Array.isArray(value)) {\n    return stringifyToJsonValue(value);\n  }\n\n  if (typeof URLSearchParams !== 'undefined' && value instanceof URLSearchParams) {\n    return serializeSearchParams(value);\n  }\n\n  if (isPlainObject(value)) {\n    return stringifyToJsonValue(value);\n  }\n\n  return undefined;\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@hey-api/typescript/transforms-read-write-custom-name/core/serverSentEvents.gen.ts",
    "content": "// 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 const 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            // Normalize line endings: CRLF -> LF, then CR -> LF\n            buffer = buffer.replace(/\\r\\n/g, '\\n').replace(/\\r/g, '\\n');\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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@hey-api/typescript/transforms-read-write-custom-name/core/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { Auth, AuthToken } from './auth.gen';\nimport type { BodySerializer, QuerySerializer, QuerySerializerOptions } from './bodySerializer.gen';\n\nexport type HttpMethod =\n  | 'connect'\n  | 'delete'\n  | 'get'\n  | 'head'\n  | 'options'\n  | 'patch'\n  | 'post'\n  | 'put'\n  | 'trace';\n\nexport type Client<\n  RequestFn = never,\n  Config = unknown,\n  MethodFn = never,\n  BuildUrlFn = never,\n  SseFn = never,\n> = {\n  /**\n   * Returns the final request URL.\n   */\n  buildUrl: BuildUrlFn;\n  getConfig: () => Config;\n  request: RequestFn;\n  setConfig: (config: Config) => Config;\n} & {\n  [K in HttpMethod]: MethodFn;\n} & ([SseFn] extends [never] ? { sse?: never } : { sse: { [K in HttpMethod]: SseFn } });\n\nexport interface Config {\n  /**\n   * Auth token or a function returning auth token. The resolved value will be\n   * added to the request payload as defined by its `security` array.\n   */\n  auth?: ((auth: Auth) => Promise<AuthToken> | AuthToken) | AuthToken;\n  /**\n   * A function for serializing request body parameter. By default,\n   * {@link JSON.stringify()} will be used.\n   */\n  bodySerializer?: BodySerializer | null;\n  /**\n   * An object containing any HTTP headers that you want to pre-populate your\n   * `Headers` object with.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/Headers/Headers#init See more}\n   */\n  headers?:\n    | RequestInit['headers']\n    | Record<\n        string,\n        string | number | boolean | (string | number | boolean)[] | null | undefined | unknown\n      >;\n  /**\n   * The request method.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/fetch#method See more}\n   */\n  method?: Uppercase<HttpMethod>;\n  /**\n   * A function for serializing request query parameters. By default, arrays\n   * will be exploded in form style, objects will be exploded in deepObject\n   * style, and reserved characters are percent-encoded.\n   *\n   * This method will have no effect if the native `paramsSerializer()` Axios\n   * API function is used.\n   *\n   * {@link https://swagger.io/docs/specification/serialization/#query View examples}\n   */\n  querySerializer?: QuerySerializer | QuerySerializerOptions;\n  /**\n   * A function validating request data. This is useful if you want to ensure\n   * the request conforms to the desired shape, so it can be safely sent to\n   * the server.\n   */\n  requestValidator?: (data: unknown) => Promise<unknown>;\n  /**\n   * A function transforming response data before it's returned. This is useful\n   * for post-processing data, e.g. converting ISO strings into Date objects.\n   */\n  responseTransformer?: (data: unknown) => Promise<unknown>;\n  /**\n   * A function validating response data. This is useful if you want to ensure\n   * the response conforms to the desired shape, so it can be safely passed to\n   * the transformers and returned to the user.\n   */\n  responseValidator?: (data: unknown) => Promise<unknown>;\n}\n\ntype IsExactlyNeverOrNeverUndefined<T> = [T] extends [never]\n  ? true\n  : [T] extends [never | undefined]\n    ? [undefined] extends [T]\n      ? false\n      : true\n    : false;\n\nexport type OmitNever<T extends Record<string, unknown>> = {\n  [K in keyof T as IsExactlyNeverOrNeverUndefined<T[K]> extends true ? never : K]: T[K];\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@hey-api/typescript/transforms-read-write-custom-name/core/utils.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@hey-api/typescript/transforms-read-write-custom-name/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type { Baz, ClientOptions, PostFooReadData, PostFooReadResponse, PostFooReadResponses, PostFooReadWriteData, PostFooReadWriteResponse, PostFooReadWriteResponses, PostFooWriteData, PostFooWriteResponse, PostFooWriteResponses, QuxAllRead, ReadableBarRead, ReadableBarWrite, ReadableCorge, ReadableFooRead, ReadableFooReadWrite, ReadableFooWrite, ReadableQuux, WritableBarRead, WritableBarWrite, WritableCorge, WritableFooRead, WritableFooReadWrite, WritableFooWrite, WritableQuux } from './types.gen';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@hey-api/typescript/transforms-read-write-custom-name/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type ClientOptions = {\n    baseUrl: `${string}://${string}` | (string & {});\n};\n\nexport type Baz = {\n    baz?: string;\n};\n\nexport type QuxAllRead = {\n    readonly baz?: string;\n};\n\nexport type ReadableFooReadWrite = ReadableBarRead;\n\nexport type WritableFooReadWrite = WritableBarRead & {\n    foo?: string;\n};\n\nexport type ReadableFooRead = ReadableBarRead & {\n    readonly foo?: string;\n};\n\nexport type WritableFooRead = WritableBarRead;\n\nexport type ReadableFooWrite = ReadableBarWrite;\n\nexport type WritableFooWrite = WritableBarWrite & {\n    foo?: string;\n};\n\nexport type ReadableBarRead = Baz | {\n    readonly bar?: string;\n};\n\nexport type WritableBarRead = Baz;\n\nexport type ReadableBarWrite = Baz;\n\nexport type WritableBarWrite = Baz | {\n    bar?: string;\n};\n\nexport type ReadableQuux = {\n    baz?: Array<Baz>;\n    qux?: QuxAllRead;\n};\n\nexport type WritableQuux = {\n    baz?: Array<Baz>;\n};\n\nexport type ReadableCorge = {\n    bar?: {\n        readonly baz?: boolean;\n    };\n};\n\nexport type WritableCorge = {\n    foo?: {\n        baz?: boolean;\n    };\n};\n\nexport type PostFooReadWriteData = {\n    body: WritableFooReadWrite;\n    path?: never;\n    query?: never;\n    url: '/foo-read-write';\n};\n\nexport type PostFooReadWriteResponses = {\n    /**\n     * OK\n     */\n    200: ReadableFooReadWrite;\n};\n\nexport type PostFooReadWriteResponse = PostFooReadWriteResponses[keyof PostFooReadWriteResponses];\n\nexport type PostFooReadData = {\n    body: WritableFooRead;\n    path?: never;\n    query?: never;\n    url: '/foo-read';\n};\n\nexport type PostFooReadResponses = {\n    /**\n     * OK\n     */\n    200: ReadableFooRead;\n};\n\nexport type PostFooReadResponse = PostFooReadResponses[keyof PostFooReadResponses];\n\nexport type PostFooWriteData = {\n    body: WritableFooWrite;\n    path?: never;\n    query?: never;\n    url: '/foo-write';\n};\n\nexport type PostFooWriteResponses = {\n    /**\n     * OK\n     */\n    200: ReadableFooWrite;\n};\n\nexport type PostFooWriteResponse = PostFooWriteResponses[keyof PostFooWriteResponses];\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@hey-api/typescript/transforms-read-write-ignore/client/client.gen.ts",
    "content": "// 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 (options: RequestOptions) => {\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 url = buildUrl(opts);\n\n    return { opts, url };\n  };\n\n  const request: Client['request'] = async (options) => {\n    // @ts-expect-error\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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@hey-api/typescript/transforms-read-write-ignore/client/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type { Auth } from '../core/auth.gen';\nexport type { QuerySerializerOptions } from '../core/bodySerializer.gen';\nexport {\n  formDataBodySerializer,\n  jsonBodySerializer,\n  urlSearchParamsBodySerializer,\n} from '../core/bodySerializer.gen';\nexport { buildClientParams } from '../core/params.gen';\nexport { serializeQueryKeyValue } from '../core/queryKeySerializer.gen';\nexport { createClient } from './client.gen';\nexport type {\n  Client,\n  ClientOptions,\n  Config,\n  CreateClientConfig,\n  Options,\n  RequestOptions,\n  RequestResult,\n  ResolvedRequestOptions,\n  ResponseStyle,\n  TDataShape,\n} from './types.gen';\nexport { createConfig, mergeHeaders } from './utils.gen';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@hey-api/typescript/transforms-read-write-ignore/client/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { Auth } from '../core/auth.gen';\nimport type {\n  ServerSentEventsOptions,\n  ServerSentEventsResult,\n} from '../core/serverSentEvents.gen';\nimport type { Client as CoreClient, Config as CoreConfig } from '../core/types.gen';\nimport type { Middleware } from './utils.gen';\n\nexport type ResponseStyle = 'data' | 'fields';\n\nexport interface Config<T extends ClientOptions = ClientOptions>\n  extends Omit<RequestInit, 'body' | 'headers' | 'method'>, CoreConfig {\n  /**\n   * Base URL for all requests made by this client.\n   */\n  baseUrl?: T['baseUrl'];\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   * Please don't use the Fetch client for Next.js applications. The `next`\n   * options won't have any effect.\n   *\n   * Install {@link https://www.npmjs.com/package/@hey-api/client-next `@hey-api/client-next`} instead.\n   */\n  next?: never;\n  /**\n   * Return the response data parsed in a specified format. By default, `auto`\n   * will infer the appropriate method from the `Content-Type` response header.\n   * You can override this behavior with any of the {@link Body} methods.\n   * Select `stream` if you don't want to parse response data at all.\n   *\n   * @default 'auto'\n   */\n  parseAs?: 'arrayBuffer' | 'auto' | 'blob' | 'formData' | 'json' | 'stream' | 'text';\n  /**\n   * Should we return only data or multiple fields (data, error, response, etc.)?\n   *\n   * @default 'fields'\n   */\n  responseStyle?: ResponseStyle;\n  /**\n   * Throw an error instead of returning it in the response?\n   *\n   * @default false\n   */\n  throwOnError?: T['throwOnError'];\n}\n\nexport interface RequestOptions<\n  TData = unknown,\n  TResponseStyle extends ResponseStyle = 'fields',\n  ThrowOnError extends boolean = boolean,\n  Url extends string = string,\n>\n  extends\n    Config<{\n      responseStyle: TResponseStyle;\n      throwOnError: ThrowOnError;\n    }>,\n    Pick<\n      ServerSentEventsOptions<TData>,\n      | 'onRequest'\n      | 'onSseError'\n      | 'onSseEvent'\n      | 'sseDefaultRetryDelay'\n      | 'sseMaxRetryAttempts'\n      | 'sseMaxRetryDelay'\n    > {\n  /**\n   * Any body that you want to add to your request.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/fetch#body}\n   */\n  body?: unknown;\n  path?: Record<string, unknown>;\n  query?: Record<string, unknown>;\n  /**\n   * Security mechanism(s) to use for the request.\n   */\n  security?: ReadonlyArray<Auth>;\n  url: Url;\n}\n\nexport interface ResolvedRequestOptions<\n  TResponseStyle extends ResponseStyle = 'fields',\n  ThrowOnError extends boolean = boolean,\n  Url extends string = string,\n> extends RequestOptions<unknown, TResponseStyle, ThrowOnError, Url> {\n  serializedBody?: string;\n}\n\nexport type RequestResult<\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = boolean,\n  TResponseStyle extends ResponseStyle = 'fields',\n> = ThrowOnError extends true\n  ? Promise<\n      TResponseStyle extends 'data'\n        ? TData extends Record<string, unknown>\n          ? TData[keyof TData]\n          : TData\n        : {\n            data: TData extends Record<string, unknown> ? TData[keyof TData] : TData;\n            request: Request;\n            response: Response;\n          }\n    >\n  : Promise<\n      TResponseStyle extends 'data'\n        ? (TData extends Record<string, unknown> ? TData[keyof TData] : TData) | undefined\n        : (\n            | {\n                data: TData extends Record<string, unknown> ? TData[keyof TData] : TData;\n                error: undefined;\n              }\n            | {\n                data: undefined;\n                error: TError extends Record<string, unknown> ? TError[keyof TError] : TError;\n              }\n          ) & {\n            request: Request;\n            response: Response;\n          }\n    >;\n\nexport interface ClientOptions {\n  baseUrl?: string;\n  responseStyle?: ResponseStyle;\n  throwOnError?: boolean;\n}\n\ntype MethodFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'>,\n) => RequestResult<TData, TError, ThrowOnError, TResponseStyle>;\n\ntype SseFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'>,\n) => Promise<ServerSentEventsResult<TData, TError>>;\n\ntype RequestFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'> &\n    Pick<Required<RequestOptions<TData, TResponseStyle, ThrowOnError>>, 'method'>,\n) => RequestResult<TData, TError, ThrowOnError, TResponseStyle>;\n\ntype BuildUrlFn = <\n  TData extends {\n    body?: unknown;\n    path?: Record<string, unknown>;\n    query?: Record<string, unknown>;\n    url: string;\n  },\n>(\n  options: TData & Options<TData>,\n) => string;\n\nexport type Client = CoreClient<RequestFn, Config, MethodFn, BuildUrlFn, SseFn> & {\n  interceptors: Middleware<Request, Response, unknown, ResolvedRequestOptions>;\n};\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 = ClientOptions> = (\n  override?: Config<ClientOptions & T>,\n) => Config<Required<ClientOptions> & T>;\n\nexport interface TDataShape {\n  body?: unknown;\n  headers?: unknown;\n  path?: unknown;\n  query?: unknown;\n  url: string;\n}\n\ntype OmitKeys<T, K> = Pick<T, Exclude<keyof T, K>>;\n\nexport type Options<\n  TData extends TDataShape = TDataShape,\n  ThrowOnError extends boolean = boolean,\n  TResponse = unknown,\n  TResponseStyle extends ResponseStyle = 'fields',\n> = OmitKeys<\n  RequestOptions<TResponse, TResponseStyle, ThrowOnError>,\n  'body' | 'path' | 'query' | 'url'\n> &\n  ([TData] extends [never] ? unknown : Omit<TData, 'url'>);\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@hey-api/typescript/transforms-read-write-ignore/client/utils.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@hey-api/typescript/transforms-read-write-ignore/client.gen.ts",
    "content": "// 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>());\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@hey-api/typescript/transforms-read-write-ignore/core/auth.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@hey-api/typescript/transforms-read-write-ignore/core/bodySerializer.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@hey-api/typescript/transforms-read-write-ignore/core/params.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@hey-api/typescript/transforms-read-write-ignore/core/pathSerializer.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@hey-api/typescript/transforms-read-write-ignore/core/queryKeySerializer.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\n/**\n * JSON-friendly union that mirrors what Pinia Colada can hash.\n */\nexport type JsonValue =\n  | null\n  | string\n  | number\n  | boolean\n  | JsonValue[]\n  | { [key: string]: JsonValue };\n\n/**\n * Replacer that converts non-JSON values (bigint, Date, etc.) to safe substitutes.\n */\nexport const queryKeyJsonReplacer = (_key: string, value: unknown) => {\n  if (value === undefined || typeof value === 'function' || typeof value === 'symbol') {\n    return undefined;\n  }\n  if (typeof value === 'bigint') {\n    return value.toString();\n  }\n  if (value instanceof Date) {\n    return value.toISOString();\n  }\n  return value;\n};\n\n/**\n * Safely stringifies a value and parses it back into a JsonValue.\n */\nexport const stringifyToJsonValue = (input: unknown): JsonValue | undefined => {\n  try {\n    const json = JSON.stringify(input, queryKeyJsonReplacer);\n    if (json === undefined) {\n      return undefined;\n    }\n    return JSON.parse(json) as JsonValue;\n  } catch {\n    return undefined;\n  }\n};\n\n/**\n * Detects plain objects (including objects with a null prototype).\n */\nconst isPlainObject = (value: unknown): value is Record<string, unknown> => {\n  if (value === null || typeof value !== 'object') {\n    return false;\n  }\n  const prototype = Object.getPrototypeOf(value as object);\n  return prototype === Object.prototype || prototype === null;\n};\n\n/**\n * Turns URLSearchParams into a sorted JSON object for deterministic keys.\n */\nconst serializeSearchParams = (params: URLSearchParams): JsonValue => {\n  const entries = Array.from(params.entries()).sort(([a], [b]) => a.localeCompare(b));\n  const result: Record<string, JsonValue> = {};\n\n  for (const [key, value] of entries) {\n    const existing = result[key];\n    if (existing === undefined) {\n      result[key] = value;\n      continue;\n    }\n\n    if (Array.isArray(existing)) {\n      (existing as string[]).push(value);\n    } else {\n      result[key] = [existing, value];\n    }\n  }\n\n  return result;\n};\n\n/**\n * Normalizes any accepted value into a JSON-friendly shape for query keys.\n */\nexport const serializeQueryKeyValue = (value: unknown): JsonValue | undefined => {\n  if (value === null) {\n    return null;\n  }\n\n  if (typeof value === 'string' || typeof value === 'number' || typeof value === 'boolean') {\n    return value;\n  }\n\n  if (value === undefined || typeof value === 'function' || typeof value === 'symbol') {\n    return undefined;\n  }\n\n  if (typeof value === 'bigint') {\n    return value.toString();\n  }\n\n  if (value instanceof Date) {\n    return value.toISOString();\n  }\n\n  if (Array.isArray(value)) {\n    return stringifyToJsonValue(value);\n  }\n\n  if (typeof URLSearchParams !== 'undefined' && value instanceof URLSearchParams) {\n    return serializeSearchParams(value);\n  }\n\n  if (isPlainObject(value)) {\n    return stringifyToJsonValue(value);\n  }\n\n  return undefined;\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@hey-api/typescript/transforms-read-write-ignore/core/serverSentEvents.gen.ts",
    "content": "// 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 const 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            // Normalize line endings: CRLF -> LF, then CR -> LF\n            buffer = buffer.replace(/\\r\\n/g, '\\n').replace(/\\r/g, '\\n');\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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@hey-api/typescript/transforms-read-write-ignore/core/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { Auth, AuthToken } from './auth.gen';\nimport type { BodySerializer, QuerySerializer, QuerySerializerOptions } from './bodySerializer.gen';\n\nexport type HttpMethod =\n  | 'connect'\n  | 'delete'\n  | 'get'\n  | 'head'\n  | 'options'\n  | 'patch'\n  | 'post'\n  | 'put'\n  | 'trace';\n\nexport type Client<\n  RequestFn = never,\n  Config = unknown,\n  MethodFn = never,\n  BuildUrlFn = never,\n  SseFn = never,\n> = {\n  /**\n   * Returns the final request URL.\n   */\n  buildUrl: BuildUrlFn;\n  getConfig: () => Config;\n  request: RequestFn;\n  setConfig: (config: Config) => Config;\n} & {\n  [K in HttpMethod]: MethodFn;\n} & ([SseFn] extends [never] ? { sse?: never } : { sse: { [K in HttpMethod]: SseFn } });\n\nexport interface Config {\n  /**\n   * Auth token or a function returning auth token. The resolved value will be\n   * added to the request payload as defined by its `security` array.\n   */\n  auth?: ((auth: Auth) => Promise<AuthToken> | AuthToken) | AuthToken;\n  /**\n   * A function for serializing request body parameter. By default,\n   * {@link JSON.stringify()} will be used.\n   */\n  bodySerializer?: BodySerializer | null;\n  /**\n   * An object containing any HTTP headers that you want to pre-populate your\n   * `Headers` object with.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/Headers/Headers#init See more}\n   */\n  headers?:\n    | RequestInit['headers']\n    | Record<\n        string,\n        string | number | boolean | (string | number | boolean)[] | null | undefined | unknown\n      >;\n  /**\n   * The request method.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/fetch#method See more}\n   */\n  method?: Uppercase<HttpMethod>;\n  /**\n   * A function for serializing request query parameters. By default, arrays\n   * will be exploded in form style, objects will be exploded in deepObject\n   * style, and reserved characters are percent-encoded.\n   *\n   * This method will have no effect if the native `paramsSerializer()` Axios\n   * API function is used.\n   *\n   * {@link https://swagger.io/docs/specification/serialization/#query View examples}\n   */\n  querySerializer?: QuerySerializer | QuerySerializerOptions;\n  /**\n   * A function validating request data. This is useful if you want to ensure\n   * the request conforms to the desired shape, so it can be safely sent to\n   * the server.\n   */\n  requestValidator?: (data: unknown) => Promise<unknown>;\n  /**\n   * A function transforming response data before it's returned. This is useful\n   * for post-processing data, e.g. converting ISO strings into Date objects.\n   */\n  responseTransformer?: (data: unknown) => Promise<unknown>;\n  /**\n   * A function validating response data. This is useful if you want to ensure\n   * the response conforms to the desired shape, so it can be safely passed to\n   * the transformers and returned to the user.\n   */\n  responseValidator?: (data: unknown) => Promise<unknown>;\n}\n\ntype IsExactlyNeverOrNeverUndefined<T> = [T] extends [never]\n  ? true\n  : [T] extends [never | undefined]\n    ? [undefined] extends [T]\n      ? false\n      : true\n    : false;\n\nexport type OmitNever<T extends Record<string, unknown>> = {\n  [K in keyof T as IsExactlyNeverOrNeverUndefined<T[K]> extends true ? never : K]: T[K];\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@hey-api/typescript/transforms-read-write-ignore/core/utils.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@hey-api/typescript/transforms-read-write-ignore/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type { BarRead, BarWrite, Baz, ClientOptions, Corge, FooRead, FooReadWrite, FooWrite, PostFooReadData, PostFooReadResponse, PostFooReadResponses, PostFooReadWriteData, PostFooReadWriteResponse, PostFooReadWriteResponses, PostFooWriteData, PostFooWriteResponse, PostFooWriteResponses, Quux, QuxAllRead } from './types.gen';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@hey-api/typescript/transforms-read-write-ignore/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type ClientOptions = {\n    baseUrl: `${string}://${string}` | (string & {});\n};\n\nexport type FooReadWrite = BarRead & {\n    foo?: string;\n};\n\nexport type FooRead = BarRead & {\n    readonly foo?: string;\n};\n\nexport type FooWrite = BarWrite & {\n    foo?: string;\n};\n\nexport type BarRead = Baz | {\n    readonly bar?: string;\n};\n\nexport type BarWrite = Baz | {\n    bar?: string;\n};\n\nexport type Baz = {\n    baz?: string;\n};\n\nexport type QuxAllRead = {\n    readonly baz?: string;\n};\n\nexport type Quux = {\n    baz?: Array<Baz>;\n    qux?: QuxAllRead;\n};\n\nexport type Corge = {\n    foo?: {\n        baz?: boolean;\n    };\n    bar?: {\n        readonly baz?: boolean;\n    };\n};\n\nexport type PostFooReadWriteData = {\n    body: FooReadWrite;\n    path?: never;\n    query?: never;\n    url: '/foo-read-write';\n};\n\nexport type PostFooReadWriteResponses = {\n    /**\n     * OK\n     */\n    200: FooReadWrite;\n};\n\nexport type PostFooReadWriteResponse = PostFooReadWriteResponses[keyof PostFooReadWriteResponses];\n\nexport type PostFooReadData = {\n    body: FooRead;\n    path?: never;\n    query?: never;\n    url: '/foo-read';\n};\n\nexport type PostFooReadResponses = {\n    /**\n     * OK\n     */\n    200: FooRead;\n};\n\nexport type PostFooReadResponse = PostFooReadResponses[keyof PostFooReadResponses];\n\nexport type PostFooWriteData = {\n    body: FooWrite;\n    path?: never;\n    query?: never;\n    url: '/foo-write';\n};\n\nexport type PostFooWriteResponses = {\n    /**\n     * OK\n     */\n    200: FooWrite;\n};\n\nexport type PostFooWriteResponse = PostFooWriteResponses[keyof PostFooWriteResponses];\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@pinia/colada/asClass/@pinia/colada.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport { type _JSONValue, defineQueryOptions, type UseMutationOptions } from '@pinia/colada';\n\nimport { serializeQueryKeyValue } from '../client';\nimport { client } from '../client.gen';\nimport { BarBazService, BarService, FooBazService, FooService, type Options } from '../sdk.gen';\nimport type { FooBarPostData, FooBarPostResponse, FooBarPutData, FooBarPutResponse, FooPostData, FooPostResponse, FooPutData, FooPutResponse, GetFooBarData, GetFooBarResponse, GetFooData, GetFooResponse } from '../types.gen';\n\nexport type QueryKey<TOptions extends Options> = [\n    Pick<TOptions, 'path'> & {\n        _id: string;\n        baseUrl?: _JSONValue;\n        body?: _JSONValue;\n        query?: _JSONValue;\n        tags?: _JSONValue;\n    }\n];\n\nconst createQueryKey = <TOptions extends Options>(id: string, options?: TOptions, tags?: ReadonlyArray<string>): [\n    QueryKey<TOptions>[0]\n] => {\n    const params: QueryKey<TOptions>[0] = { _id: id, baseUrl: options?.baseUrl || (options?.client ?? client).getConfig().baseUrl } as QueryKey<TOptions>[0];\n    if (tags) {\n        params.tags = tags as unknown as _JSONValue;\n    }\n    if (options?.body !== undefined) {\n        const normalizedBody = serializeQueryKeyValue(options.body);\n        if (normalizedBody !== undefined) {\n            params.body = normalizedBody;\n        }\n    }\n    if (options?.path) {\n        params.path = options.path;\n    }\n    if (options?.query !== undefined) {\n        const normalizedQuery = serializeQueryKeyValue(options.query);\n        if (normalizedQuery !== undefined) {\n            params.query = normalizedQuery;\n        }\n    }\n    return [params];\n};\n\nexport const getFooQueryKey = (options?: Options<GetFooData>) => createQueryKey('getFoo', options);\n\nexport const getFooQuery = defineQueryOptions<Options<GetFooData>, GetFooResponse, Error>((options?: Options<GetFooData>) => ({\n    key: getFooQueryKey(options),\n    query: async (context) => {\n        const { data } = await FooBazService.getFoo({\n            ...options,\n            ...context,\n            throwOnError: true\n        });\n        return data;\n    }\n}));\n\nexport const fooPostMutation = (options?: Partial<Options<FooPostData>>): UseMutationOptions<FooPostResponse, Options<FooPostData>, Error> => ({\n    mutation: async (vars) => {\n        const { data } = await FooService.post({\n            ...options,\n            ...vars,\n            throwOnError: true\n        });\n        return data;\n    }\n});\n\nexport const fooPutMutation = (options?: Partial<Options<FooPutData>>): UseMutationOptions<FooPutResponse, Options<FooPutData>, Error> => ({\n    mutation: async (vars) => {\n        const { data } = await FooService.put({\n            ...options,\n            ...vars,\n            throwOnError: true\n        });\n        return data;\n    }\n});\n\nexport const getFooBarQueryKey = (options?: Options<GetFooBarData>) => createQueryKey('getFooBar', options);\n\nexport const getFooBarQuery = defineQueryOptions<Options<GetFooBarData>, GetFooBarResponse, Error>((options?: Options<GetFooBarData>) => ({\n    key: getFooBarQueryKey(options),\n    query: async (context) => {\n        const { data } = await BarBazService.getFooBar({\n            ...options,\n            ...context,\n            throwOnError: true\n        });\n        return data;\n    }\n}));\n\nexport const fooBarPostMutation = (options?: Partial<Options<FooBarPostData>>): UseMutationOptions<FooBarPostResponse, Options<FooBarPostData>, Error> => ({\n    mutation: async (vars) => {\n        const { data } = await BarService.post({\n            ...options,\n            ...vars,\n            throwOnError: true\n        });\n        return data;\n    }\n});\n\nexport const fooBarPutMutation = (options?: Partial<Options<FooBarPutData>>): UseMutationOptions<FooBarPutResponse, Options<FooBarPutData>, Error> => ({\n    mutation: async (vars) => {\n        const { data } = await BarService.put({\n            ...options,\n            ...vars,\n            throwOnError: true\n        });\n        return data;\n    }\n});\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@pinia/colada/asClass/client/client.gen.ts",
    "content": "// 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 (options: RequestOptions) => {\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 url = buildUrl(opts);\n\n    return { opts, url };\n  };\n\n  const request: Client['request'] = async (options) => {\n    // @ts-expect-error\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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@pinia/colada/asClass/client/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type { Auth } from '../core/auth.gen';\nexport type { QuerySerializerOptions } from '../core/bodySerializer.gen';\nexport {\n  formDataBodySerializer,\n  jsonBodySerializer,\n  urlSearchParamsBodySerializer,\n} from '../core/bodySerializer.gen';\nexport { buildClientParams } from '../core/params.gen';\nexport { serializeQueryKeyValue } from '../core/queryKeySerializer.gen';\nexport { createClient } from './client.gen';\nexport type {\n  Client,\n  ClientOptions,\n  Config,\n  CreateClientConfig,\n  Options,\n  RequestOptions,\n  RequestResult,\n  ResolvedRequestOptions,\n  ResponseStyle,\n  TDataShape,\n} from './types.gen';\nexport { createConfig, mergeHeaders } from './utils.gen';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@pinia/colada/asClass/client/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { Auth } from '../core/auth.gen';\nimport type {\n  ServerSentEventsOptions,\n  ServerSentEventsResult,\n} from '../core/serverSentEvents.gen';\nimport type { Client as CoreClient, Config as CoreConfig } from '../core/types.gen';\nimport type { Middleware } from './utils.gen';\n\nexport type ResponseStyle = 'data' | 'fields';\n\nexport interface Config<T extends ClientOptions = ClientOptions>\n  extends Omit<RequestInit, 'body' | 'headers' | 'method'>, CoreConfig {\n  /**\n   * Base URL for all requests made by this client.\n   */\n  baseUrl?: T['baseUrl'];\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   * Please don't use the Fetch client for Next.js applications. The `next`\n   * options won't have any effect.\n   *\n   * Install {@link https://www.npmjs.com/package/@hey-api/client-next `@hey-api/client-next`} instead.\n   */\n  next?: never;\n  /**\n   * Return the response data parsed in a specified format. By default, `auto`\n   * will infer the appropriate method from the `Content-Type` response header.\n   * You can override this behavior with any of the {@link Body} methods.\n   * Select `stream` if you don't want to parse response data at all.\n   *\n   * @default 'auto'\n   */\n  parseAs?: 'arrayBuffer' | 'auto' | 'blob' | 'formData' | 'json' | 'stream' | 'text';\n  /**\n   * Should we return only data or multiple fields (data, error, response, etc.)?\n   *\n   * @default 'fields'\n   */\n  responseStyle?: ResponseStyle;\n  /**\n   * Throw an error instead of returning it in the response?\n   *\n   * @default false\n   */\n  throwOnError?: T['throwOnError'];\n}\n\nexport interface RequestOptions<\n  TData = unknown,\n  TResponseStyle extends ResponseStyle = 'fields',\n  ThrowOnError extends boolean = boolean,\n  Url extends string = string,\n>\n  extends\n    Config<{\n      responseStyle: TResponseStyle;\n      throwOnError: ThrowOnError;\n    }>,\n    Pick<\n      ServerSentEventsOptions<TData>,\n      | 'onRequest'\n      | 'onSseError'\n      | 'onSseEvent'\n      | 'sseDefaultRetryDelay'\n      | 'sseMaxRetryAttempts'\n      | 'sseMaxRetryDelay'\n    > {\n  /**\n   * Any body that you want to add to your request.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/fetch#body}\n   */\n  body?: unknown;\n  path?: Record<string, unknown>;\n  query?: Record<string, unknown>;\n  /**\n   * Security mechanism(s) to use for the request.\n   */\n  security?: ReadonlyArray<Auth>;\n  url: Url;\n}\n\nexport interface ResolvedRequestOptions<\n  TResponseStyle extends ResponseStyle = 'fields',\n  ThrowOnError extends boolean = boolean,\n  Url extends string = string,\n> extends RequestOptions<unknown, TResponseStyle, ThrowOnError, Url> {\n  serializedBody?: string;\n}\n\nexport type RequestResult<\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = boolean,\n  TResponseStyle extends ResponseStyle = 'fields',\n> = ThrowOnError extends true\n  ? Promise<\n      TResponseStyle extends 'data'\n        ? TData extends Record<string, unknown>\n          ? TData[keyof TData]\n          : TData\n        : {\n            data: TData extends Record<string, unknown> ? TData[keyof TData] : TData;\n            request: Request;\n            response: Response;\n          }\n    >\n  : Promise<\n      TResponseStyle extends 'data'\n        ? (TData extends Record<string, unknown> ? TData[keyof TData] : TData) | undefined\n        : (\n            | {\n                data: TData extends Record<string, unknown> ? TData[keyof TData] : TData;\n                error: undefined;\n              }\n            | {\n                data: undefined;\n                error: TError extends Record<string, unknown> ? TError[keyof TError] : TError;\n              }\n          ) & {\n            request: Request;\n            response: Response;\n          }\n    >;\n\nexport interface ClientOptions {\n  baseUrl?: string;\n  responseStyle?: ResponseStyle;\n  throwOnError?: boolean;\n}\n\ntype MethodFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'>,\n) => RequestResult<TData, TError, ThrowOnError, TResponseStyle>;\n\ntype SseFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'>,\n) => Promise<ServerSentEventsResult<TData, TError>>;\n\ntype RequestFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'> &\n    Pick<Required<RequestOptions<TData, TResponseStyle, ThrowOnError>>, 'method'>,\n) => RequestResult<TData, TError, ThrowOnError, TResponseStyle>;\n\ntype BuildUrlFn = <\n  TData extends {\n    body?: unknown;\n    path?: Record<string, unknown>;\n    query?: Record<string, unknown>;\n    url: string;\n  },\n>(\n  options: TData & Options<TData>,\n) => string;\n\nexport type Client = CoreClient<RequestFn, Config, MethodFn, BuildUrlFn, SseFn> & {\n  interceptors: Middleware<Request, Response, unknown, ResolvedRequestOptions>;\n};\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 = ClientOptions> = (\n  override?: Config<ClientOptions & T>,\n) => Config<Required<ClientOptions> & T>;\n\nexport interface TDataShape {\n  body?: unknown;\n  headers?: unknown;\n  path?: unknown;\n  query?: unknown;\n  url: string;\n}\n\ntype OmitKeys<T, K> = Pick<T, Exclude<keyof T, K>>;\n\nexport type Options<\n  TData extends TDataShape = TDataShape,\n  ThrowOnError extends boolean = boolean,\n  TResponse = unknown,\n  TResponseStyle extends ResponseStyle = 'fields',\n> = OmitKeys<\n  RequestOptions<TResponse, TResponseStyle, ThrowOnError>,\n  'body' | 'path' | 'query' | 'url'\n> &\n  ([TData] extends [never] ? unknown : Omit<TData, 'url'>);\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@pinia/colada/asClass/client/utils.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@pinia/colada/asClass/client.gen.ts",
    "content": "// 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>());\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@pinia/colada/asClass/core/auth.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@pinia/colada/asClass/core/bodySerializer.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@pinia/colada/asClass/core/params.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@pinia/colada/asClass/core/pathSerializer.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@pinia/colada/asClass/core/queryKeySerializer.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\n/**\n * JSON-friendly union that mirrors what Pinia Colada can hash.\n */\nexport type JsonValue =\n  | null\n  | string\n  | number\n  | boolean\n  | JsonValue[]\n  | { [key: string]: JsonValue };\n\n/**\n * Replacer that converts non-JSON values (bigint, Date, etc.) to safe substitutes.\n */\nexport const queryKeyJsonReplacer = (_key: string, value: unknown) => {\n  if (value === undefined || typeof value === 'function' || typeof value === 'symbol') {\n    return undefined;\n  }\n  if (typeof value === 'bigint') {\n    return value.toString();\n  }\n  if (value instanceof Date) {\n    return value.toISOString();\n  }\n  return value;\n};\n\n/**\n * Safely stringifies a value and parses it back into a JsonValue.\n */\nexport const stringifyToJsonValue = (input: unknown): JsonValue | undefined => {\n  try {\n    const json = JSON.stringify(input, queryKeyJsonReplacer);\n    if (json === undefined) {\n      return undefined;\n    }\n    return JSON.parse(json) as JsonValue;\n  } catch {\n    return undefined;\n  }\n};\n\n/**\n * Detects plain objects (including objects with a null prototype).\n */\nconst isPlainObject = (value: unknown): value is Record<string, unknown> => {\n  if (value === null || typeof value !== 'object') {\n    return false;\n  }\n  const prototype = Object.getPrototypeOf(value as object);\n  return prototype === Object.prototype || prototype === null;\n};\n\n/**\n * Turns URLSearchParams into a sorted JSON object for deterministic keys.\n */\nconst serializeSearchParams = (params: URLSearchParams): JsonValue => {\n  const entries = Array.from(params.entries()).sort(([a], [b]) => a.localeCompare(b));\n  const result: Record<string, JsonValue> = {};\n\n  for (const [key, value] of entries) {\n    const existing = result[key];\n    if (existing === undefined) {\n      result[key] = value;\n      continue;\n    }\n\n    if (Array.isArray(existing)) {\n      (existing as string[]).push(value);\n    } else {\n      result[key] = [existing, value];\n    }\n  }\n\n  return result;\n};\n\n/**\n * Normalizes any accepted value into a JSON-friendly shape for query keys.\n */\nexport const serializeQueryKeyValue = (value: unknown): JsonValue | undefined => {\n  if (value === null) {\n    return null;\n  }\n\n  if (typeof value === 'string' || typeof value === 'number' || typeof value === 'boolean') {\n    return value;\n  }\n\n  if (value === undefined || typeof value === 'function' || typeof value === 'symbol') {\n    return undefined;\n  }\n\n  if (typeof value === 'bigint') {\n    return value.toString();\n  }\n\n  if (value instanceof Date) {\n    return value.toISOString();\n  }\n\n  if (Array.isArray(value)) {\n    return stringifyToJsonValue(value);\n  }\n\n  if (typeof URLSearchParams !== 'undefined' && value instanceof URLSearchParams) {\n    return serializeSearchParams(value);\n  }\n\n  if (isPlainObject(value)) {\n    return stringifyToJsonValue(value);\n  }\n\n  return undefined;\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@pinia/colada/asClass/core/serverSentEvents.gen.ts",
    "content": "// 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 const 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            // Normalize line endings: CRLF -> LF, then CR -> LF\n            buffer = buffer.replace(/\\r\\n/g, '\\n').replace(/\\r/g, '\\n');\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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@pinia/colada/asClass/core/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { Auth, AuthToken } from './auth.gen';\nimport type { BodySerializer, QuerySerializer, QuerySerializerOptions } from './bodySerializer.gen';\n\nexport type HttpMethod =\n  | 'connect'\n  | 'delete'\n  | 'get'\n  | 'head'\n  | 'options'\n  | 'patch'\n  | 'post'\n  | 'put'\n  | 'trace';\n\nexport type Client<\n  RequestFn = never,\n  Config = unknown,\n  MethodFn = never,\n  BuildUrlFn = never,\n  SseFn = never,\n> = {\n  /**\n   * Returns the final request URL.\n   */\n  buildUrl: BuildUrlFn;\n  getConfig: () => Config;\n  request: RequestFn;\n  setConfig: (config: Config) => Config;\n} & {\n  [K in HttpMethod]: MethodFn;\n} & ([SseFn] extends [never] ? { sse?: never } : { sse: { [K in HttpMethod]: SseFn } });\n\nexport interface Config {\n  /**\n   * Auth token or a function returning auth token. The resolved value will be\n   * added to the request payload as defined by its `security` array.\n   */\n  auth?: ((auth: Auth) => Promise<AuthToken> | AuthToken) | AuthToken;\n  /**\n   * A function for serializing request body parameter. By default,\n   * {@link JSON.stringify()} will be used.\n   */\n  bodySerializer?: BodySerializer | null;\n  /**\n   * An object containing any HTTP headers that you want to pre-populate your\n   * `Headers` object with.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/Headers/Headers#init See more}\n   */\n  headers?:\n    | RequestInit['headers']\n    | Record<\n        string,\n        string | number | boolean | (string | number | boolean)[] | null | undefined | unknown\n      >;\n  /**\n   * The request method.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/fetch#method See more}\n   */\n  method?: Uppercase<HttpMethod>;\n  /**\n   * A function for serializing request query parameters. By default, arrays\n   * will be exploded in form style, objects will be exploded in deepObject\n   * style, and reserved characters are percent-encoded.\n   *\n   * This method will have no effect if the native `paramsSerializer()` Axios\n   * API function is used.\n   *\n   * {@link https://swagger.io/docs/specification/serialization/#query View examples}\n   */\n  querySerializer?: QuerySerializer | QuerySerializerOptions;\n  /**\n   * A function validating request data. This is useful if you want to ensure\n   * the request conforms to the desired shape, so it can be safely sent to\n   * the server.\n   */\n  requestValidator?: (data: unknown) => Promise<unknown>;\n  /**\n   * A function transforming response data before it's returned. This is useful\n   * for post-processing data, e.g. converting ISO strings into Date objects.\n   */\n  responseTransformer?: (data: unknown) => Promise<unknown>;\n  /**\n   * A function validating response data. This is useful if you want to ensure\n   * the response conforms to the desired shape, so it can be safely passed to\n   * the transformers and returned to the user.\n   */\n  responseValidator?: (data: unknown) => Promise<unknown>;\n}\n\ntype IsExactlyNeverOrNeverUndefined<T> = [T] extends [never]\n  ? true\n  : [T] extends [never | undefined]\n    ? [undefined] extends [T]\n      ? false\n      : true\n    : false;\n\nexport type OmitNever<T extends Record<string, unknown>> = {\n  [K in keyof T as IsExactlyNeverOrNeverUndefined<T[K]> extends true ? never : K]: T[K];\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@pinia/colada/asClass/core/utils.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@pinia/colada/asClass/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport { BarBazService, BarService, BarService2, FooBazService, FooService, FooService2, type Options } from './sdk.gen';\nexport type { ClientOptions, FooBarPostData, FooBarPostResponse, FooBarPostResponses, FooBarPutData, FooBarPutResponse, FooBarPutResponses, FooPostData, FooPostResponse, FooPostResponses, FooPutData, FooPutResponse, FooPutResponses, GetFooBarData, GetFooBarResponse, GetFooBarResponses, GetFooData, GetFooResponse, GetFooResponses } from './types.gen';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@pinia/colada/asClass/sdk.gen.ts",
    "content": "// 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 { FooBarPostData, FooBarPostResponses, FooBarPutData, FooBarPutResponses, FooPostData, FooPostResponses, FooPutData, FooPutResponses, GetFooBarData, GetFooBarResponses, GetFooData, GetFooResponses } from './types.gen';\n\nexport type Options<TData extends TDataShape = TDataShape, ThrowOnError extends boolean = boolean> = Options2<TData, ThrowOnError> & {\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\nexport class BarService {\n    public static post<ThrowOnError extends boolean = false>(options?: Options<FooBarPostData, ThrowOnError>) {\n        return (options?.client ?? client).post<FooBarPostResponses, unknown, ThrowOnError>({ url: '/foo/bar', ...options });\n    }\n    \n    public static put<ThrowOnError extends boolean = false>(options?: Options<FooBarPutData, ThrowOnError>) {\n        return (options?.client ?? client).put<FooBarPutResponses, unknown, ThrowOnError>({ url: '/foo/bar', ...options });\n    }\n}\n\nexport class FooService {\n    public static post<ThrowOnError extends boolean = false>(options?: Options<FooPostData, ThrowOnError>) {\n        return (options?.client ?? client).post<FooPostResponses, unknown, ThrowOnError>({ url: '/foo', ...options });\n    }\n    \n    public static put<ThrowOnError extends boolean = false>(options?: Options<FooPutData, ThrowOnError>) {\n        return (options?.client ?? client).put<FooPutResponses, unknown, ThrowOnError>({ url: '/foo', ...options });\n    }\n    \n    static barService = BarService;\n}\n\nexport class FooBazService {\n    public static getFoo<ThrowOnError extends boolean = false>(options?: Options<GetFooData, ThrowOnError>) {\n        return (options?.client ?? client).get<GetFooResponses, unknown, ThrowOnError>({ url: '/foo', ...options });\n    }\n    \n    static fooService = FooService;\n}\n\nexport class BarService2 {\n    public static post<ThrowOnError extends boolean = false>(options?: Options<FooBarPostData, ThrowOnError>) {\n        return (options?.client ?? client).post<FooBarPostResponses, unknown, ThrowOnError>({ url: '/foo/bar', ...options });\n    }\n    \n    public static put<ThrowOnError extends boolean = false>(options?: Options<FooBarPutData, ThrowOnError>) {\n        return (options?.client ?? client).put<FooBarPutResponses, unknown, ThrowOnError>({ url: '/foo/bar', ...options });\n    }\n}\n\nexport class FooService2 {\n    static barService = BarService2;\n}\n\nexport class BarBazService {\n    public static getFooBar<ThrowOnError extends boolean = false>(options?: Options<GetFooBarData, ThrowOnError>) {\n        return (options?.client ?? client).get<GetFooBarResponses, unknown, ThrowOnError>({ url: '/foo/bar', ...options });\n    }\n    \n    static fooService = FooService2;\n}\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@pinia/colada/asClass/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type ClientOptions = {\n    baseUrl: `${string}://${string}` | (string & {});\n};\n\nexport type GetFooData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/foo';\n};\n\nexport type GetFooResponses = {\n    /**\n     * OK\n     */\n    200: string;\n};\n\nexport type GetFooResponse = GetFooResponses[keyof GetFooResponses];\n\nexport type FooPostData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/foo';\n};\n\nexport type FooPostResponses = {\n    /**\n     * OK\n     */\n    200: string;\n};\n\nexport type FooPostResponse = FooPostResponses[keyof FooPostResponses];\n\nexport type FooPutData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/foo';\n};\n\nexport type FooPutResponses = {\n    /**\n     * OK\n     */\n    200: string;\n};\n\nexport type FooPutResponse = FooPutResponses[keyof FooPutResponses];\n\nexport type GetFooBarData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/foo/bar';\n};\n\nexport type GetFooBarResponses = {\n    /**\n     * OK\n     */\n    200: string;\n};\n\nexport type GetFooBarResponse = GetFooBarResponses[keyof GetFooBarResponses];\n\nexport type FooBarPostData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/foo/bar';\n};\n\nexport type FooBarPostResponses = {\n    /**\n     * OK\n     */\n    200: string;\n};\n\nexport type FooBarPostResponse = FooBarPostResponses[keyof FooBarPostResponses];\n\nexport type FooBarPutData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/foo/bar';\n};\n\nexport type FooBarPutResponses = {\n    /**\n     * OK\n     */\n    200: string;\n};\n\nexport type FooBarPutResponse = FooBarPutResponses[keyof FooBarPutResponses];\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@pinia/colada/fetch/@pinia/colada.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport { type _JSONValue, defineQueryOptions, type UseMutationOptions } from '@pinia/colada';\n\nimport { serializeQueryKeyValue } from '../client';\nimport { client } from '../client.gen';\nimport { apiVVersionODataControllerCount, callToTestOrderOfParams, callWithDefaultOptionalParameters, callWithDefaultParameters, callWithDescriptions, callWithDuplicateResponses, callWithNoContentResponse, callWithParameters, callWithResponse, callWithResponseAndNoContentResponse, callWithResponses, callWithResultFromHeader, callWithWeirdParameterNames, collectionFormat, complexParams, complexTypes, deleteCallWithoutParametersAndResponse, deleteFoo, deprecatedCall, dummyA, dummyB, duplicateName, duplicateName2, duplicateName3, duplicateName4, export_, fileResponse, fooWow, getApiVbyApiVersionSimpleOperation, getCallWithOptionalParam, getCallWithoutParametersAndResponse, import_, multipartRequest, multipartResponse, nonAsciiæøåÆøÅöôêÊ字符串, type Options, patchApiVbyApiVersionNoTag, patchCallWithoutParametersAndResponse, postApiVbyApiVersionFormData, postApiVbyApiVersionRequestBody, postCallWithOptionalParam, postCallWithoutParametersAndResponse, putCallWithoutParametersAndResponse, putWithFormUrlEncoded, testErrorCode, types, uploadFile } from '../sdk.gen';\nimport type { ApiVVersionODataControllerCountData, ApiVVersionODataControllerCountResponse, CallToTestOrderOfParamsData, CallWithDefaultOptionalParametersData, CallWithDefaultParametersData, CallWithDescriptionsData, CallWithDuplicateResponsesData, CallWithDuplicateResponsesError, CallWithDuplicateResponsesResponse, CallWithNoContentResponseData, CallWithNoContentResponseResponse, CallWithParametersData, CallWithResponseAndNoContentResponseData, CallWithResponseAndNoContentResponseResponse, CallWithResponseData, CallWithResponseResponse, CallWithResponsesData, CallWithResponsesError, CallWithResponsesResponse, CallWithResultFromHeaderData, CallWithWeirdParameterNamesData, CollectionFormatData, ComplexParamsData, ComplexParamsResponse, ComplexTypesData, ComplexTypesResponse, DeleteCallWithoutParametersAndResponseData, DeleteFooData3, DeprecatedCallData, DummyAData, DummyAResponse, DummyBData, DummyBResponse, DuplicateName2Data, DuplicateName3Data, DuplicateName4Data, DuplicateNameData, ExportData, FileResponseData, FileResponseResponse, FooWowData, GetApiVbyApiVersionSimpleOperationData, GetApiVbyApiVersionSimpleOperationError, GetApiVbyApiVersionSimpleOperationResponse, GetCallWithOptionalParamData, GetCallWithoutParametersAndResponseData, ImportData, ImportResponse, MultipartRequestData, MultipartResponseData, MultipartResponseResponse, NonAsciiæøåÆøÅöôêÊ字符串Data, NonAsciiæøåÆøÅöôêÊ字符串Response, PatchApiVbyApiVersionNoTagData, PatchCallWithoutParametersAndResponseData, PostApiVbyApiVersionFormDataData, PostApiVbyApiVersionRequestBodyData, PostCallWithOptionalParamData, PostCallWithOptionalParamResponse, PostCallWithoutParametersAndResponseData, PutCallWithoutParametersAndResponseData, PutWithFormUrlEncodedData, TestErrorCodeData, TypesData, TypesResponse, UploadFileData, UploadFileResponse } from '../types.gen';\n\nexport type QueryKey<TOptions extends Options> = [\n    Pick<TOptions, 'path'> & {\n        _id: string;\n        baseUrl?: _JSONValue;\n        body?: _JSONValue;\n        query?: _JSONValue;\n        tags?: _JSONValue;\n    }\n];\n\nconst createQueryKey = <TOptions extends Options>(id: string, options?: TOptions, tags?: ReadonlyArray<string>): [\n    QueryKey<TOptions>[0]\n] => {\n    const params: QueryKey<TOptions>[0] = { _id: id, baseUrl: options?.baseUrl || (options?.client ?? client).getConfig().baseUrl } as QueryKey<TOptions>[0];\n    if (tags) {\n        params.tags = tags as unknown as _JSONValue;\n    }\n    if (options?.body !== undefined) {\n        const normalizedBody = serializeQueryKeyValue(options.body);\n        if (normalizedBody !== undefined) {\n            params.body = normalizedBody;\n        }\n    }\n    if (options?.path) {\n        params.path = options.path;\n    }\n    if (options?.query !== undefined) {\n        const normalizedQuery = serializeQueryKeyValue(options.query);\n        if (normalizedQuery !== undefined) {\n            params.query = normalizedQuery;\n        }\n    }\n    return [params];\n};\n\nexport const exportQueryKey = (options?: Options<ExportData>) => createQueryKey('export', options);\n\nexport const exportQuery = defineQueryOptions<Options<ExportData>, unknown, Error>((options?: Options<ExportData>) => ({\n    key: exportQueryKey(options),\n    query: async (context) => {\n        const { data } = await export_({\n            ...options,\n            ...context,\n            throwOnError: true\n        });\n        return data;\n    }\n}));\n\nexport const patchApiVbyApiVersionNoTagMutation = (options?: Partial<Options<PatchApiVbyApiVersionNoTagData>>): UseMutationOptions<unknown, Options<PatchApiVbyApiVersionNoTagData>, Error> => ({\n    mutation: async (vars) => {\n        const { data } = await patchApiVbyApiVersionNoTag({\n            ...options,\n            ...vars,\n            throwOnError: true\n        });\n        return data;\n    }\n});\n\nexport const importMutation = (options?: Partial<Options<ImportData>>): UseMutationOptions<ImportResponse, Options<ImportData>, Error> => ({\n    mutation: async (vars) => {\n        const { data } = await import_({\n            ...options,\n            ...vars,\n            throwOnError: true\n        });\n        return data;\n    }\n});\n\nexport const fooWowMutation = (options?: Partial<Options<FooWowData>>): UseMutationOptions<unknown, Options<FooWowData>, Error> => ({\n    mutation: async (vars) => {\n        const { data } = await fooWow({\n            ...options,\n            ...vars,\n            throwOnError: true\n        });\n        return data;\n    }\n});\n\nexport const apiVVersionODataControllerCountQueryKey = (options?: Options<ApiVVersionODataControllerCountData>) => createQueryKey('apiVVersionODataControllerCount', options);\n\nexport const apiVVersionODataControllerCountQuery = defineQueryOptions<Options<ApiVVersionODataControllerCountData>, ApiVVersionODataControllerCountResponse, Error>((options?: Options<ApiVVersionODataControllerCountData>) => ({\n    key: apiVVersionODataControllerCountQueryKey(options),\n    query: async (context) => {\n        const { data } = await apiVVersionODataControllerCount({\n            ...options,\n            ...context,\n            throwOnError: true\n        });\n        return data;\n    }\n}));\n\nexport const getApiVbyApiVersionSimpleOperationQueryKey = (options: Options<GetApiVbyApiVersionSimpleOperationData>) => createQueryKey('getApiVbyApiVersionSimpleOperation', options);\n\nexport const getApiVbyApiVersionSimpleOperationQuery = defineQueryOptions<Options<GetApiVbyApiVersionSimpleOperationData>, GetApiVbyApiVersionSimpleOperationResponse, GetApiVbyApiVersionSimpleOperationError>((options: Options<GetApiVbyApiVersionSimpleOperationData>) => ({\n    key: getApiVbyApiVersionSimpleOperationQueryKey(options),\n    query: async (context) => {\n        const { data } = await getApiVbyApiVersionSimpleOperation({\n            ...options,\n            ...context,\n            throwOnError: true\n        });\n        return data;\n    }\n}));\n\nexport const deleteCallWithoutParametersAndResponseMutation = (options?: Partial<Options<DeleteCallWithoutParametersAndResponseData>>): UseMutationOptions<unknown, Options<DeleteCallWithoutParametersAndResponseData>, Error> => ({\n    mutation: async (vars) => {\n        const { data } = await deleteCallWithoutParametersAndResponse({\n            ...options,\n            ...vars,\n            throwOnError: true\n        });\n        return data;\n    }\n});\n\nexport const getCallWithoutParametersAndResponseQueryKey = (options?: Options<GetCallWithoutParametersAndResponseData>) => createQueryKey('getCallWithoutParametersAndResponse', options);\n\nexport const getCallWithoutParametersAndResponseQuery = defineQueryOptions<Options<GetCallWithoutParametersAndResponseData>, unknown, Error>((options?: Options<GetCallWithoutParametersAndResponseData>) => ({\n    key: getCallWithoutParametersAndResponseQueryKey(options),\n    query: async (context) => {\n        const { data } = await getCallWithoutParametersAndResponse({\n            ...options,\n            ...context,\n            throwOnError: true\n        });\n        return data;\n    }\n}));\n\nexport const patchCallWithoutParametersAndResponseMutation = (options?: Partial<Options<PatchCallWithoutParametersAndResponseData>>): UseMutationOptions<unknown, Options<PatchCallWithoutParametersAndResponseData>, Error> => ({\n    mutation: async (vars) => {\n        const { data } = await patchCallWithoutParametersAndResponse({\n            ...options,\n            ...vars,\n            throwOnError: true\n        });\n        return data;\n    }\n});\n\nexport const postCallWithoutParametersAndResponseMutation = (options?: Partial<Options<PostCallWithoutParametersAndResponseData>>): UseMutationOptions<unknown, Options<PostCallWithoutParametersAndResponseData>, Error> => ({\n    mutation: async (vars) => {\n        const { data } = await postCallWithoutParametersAndResponse({\n            ...options,\n            ...vars,\n            throwOnError: true\n        });\n        return data;\n    }\n});\n\nexport const putCallWithoutParametersAndResponseMutation = (options?: Partial<Options<PutCallWithoutParametersAndResponseData>>): UseMutationOptions<unknown, Options<PutCallWithoutParametersAndResponseData>, Error> => ({\n    mutation: async (vars) => {\n        const { data } = await putCallWithoutParametersAndResponse({\n            ...options,\n            ...vars,\n            throwOnError: true\n        });\n        return data;\n    }\n});\n\nexport const deleteFooMutation = (options?: Partial<Options<DeleteFooData3>>): UseMutationOptions<unknown, Options<DeleteFooData3>, Error> => ({\n    mutation: async (vars) => {\n        const { data } = await deleteFoo({\n            ...options,\n            ...vars,\n            throwOnError: true\n        });\n        return data;\n    }\n});\n\nexport const callWithDescriptionsMutation = (options?: Partial<Options<CallWithDescriptionsData>>): UseMutationOptions<unknown, Options<CallWithDescriptionsData>, Error> => ({\n    mutation: async (vars) => {\n        const { data } = await callWithDescriptions({\n            ...options,\n            ...vars,\n            throwOnError: true\n        });\n        return data;\n    }\n});\n\n/**\n * @deprecated\n */\nexport const deprecatedCallMutation = (options?: Partial<Options<DeprecatedCallData>>): UseMutationOptions<unknown, Options<DeprecatedCallData>, Error> => ({\n    mutation: async (vars) => {\n        const { data } = await deprecatedCall({\n            ...options,\n            ...vars,\n            throwOnError: true\n        });\n        return data;\n    }\n});\n\nexport const callWithParametersMutation = (options?: Partial<Options<CallWithParametersData>>): UseMutationOptions<unknown, Options<CallWithParametersData>, Error> => ({\n    mutation: async (vars) => {\n        const { data } = await callWithParameters({\n            ...options,\n            ...vars,\n            throwOnError: true\n        });\n        return data;\n    }\n});\n\nexport const callWithWeirdParameterNamesMutation = (options?: Partial<Options<CallWithWeirdParameterNamesData>>): UseMutationOptions<unknown, Options<CallWithWeirdParameterNamesData>, Error> => ({\n    mutation: async (vars) => {\n        const { data } = await callWithWeirdParameterNames({\n            ...options,\n            ...vars,\n            throwOnError: true\n        });\n        return data;\n    }\n});\n\nexport const getCallWithOptionalParamQueryKey = (options: Options<GetCallWithOptionalParamData>) => createQueryKey('getCallWithOptionalParam', options);\n\nexport const getCallWithOptionalParamQuery = defineQueryOptions<Options<GetCallWithOptionalParamData>, unknown, Error>((options: Options<GetCallWithOptionalParamData>) => ({\n    key: getCallWithOptionalParamQueryKey(options),\n    query: async (context) => {\n        const { data } = await getCallWithOptionalParam({\n            ...options,\n            ...context,\n            throwOnError: true\n        });\n        return data;\n    }\n}));\n\nexport const postCallWithOptionalParamMutation = (options?: Partial<Options<PostCallWithOptionalParamData>>): UseMutationOptions<PostCallWithOptionalParamResponse, Options<PostCallWithOptionalParamData>, Error> => ({\n    mutation: async (vars) => {\n        const { data } = await postCallWithOptionalParam({\n            ...options,\n            ...vars,\n            throwOnError: true\n        });\n        return data;\n    }\n});\n\nexport const postApiVbyApiVersionRequestBodyMutation = (options?: Partial<Options<PostApiVbyApiVersionRequestBodyData>>): UseMutationOptions<unknown, Options<PostApiVbyApiVersionRequestBodyData>, Error> => ({\n    mutation: async (vars) => {\n        const { data } = await postApiVbyApiVersionRequestBody({\n            ...options,\n            ...vars,\n            throwOnError: true\n        });\n        return data;\n    }\n});\n\nexport const postApiVbyApiVersionFormDataMutation = (options?: Partial<Options<PostApiVbyApiVersionFormDataData>>): UseMutationOptions<unknown, Options<PostApiVbyApiVersionFormDataData>, Error> => ({\n    mutation: async (vars) => {\n        const { data } = await postApiVbyApiVersionFormData({\n            ...options,\n            ...vars,\n            throwOnError: true\n        });\n        return data;\n    }\n});\n\nexport const callWithDefaultParametersQueryKey = (options?: Options<CallWithDefaultParametersData>) => createQueryKey('callWithDefaultParameters', options);\n\nexport const callWithDefaultParametersQuery = defineQueryOptions<Options<CallWithDefaultParametersData>, unknown, Error>((options?: Options<CallWithDefaultParametersData>) => ({\n    key: callWithDefaultParametersQueryKey(options),\n    query: async (context) => {\n        const { data } = await callWithDefaultParameters({\n            ...options,\n            ...context,\n            throwOnError: true\n        });\n        return data;\n    }\n}));\n\nexport const callWithDefaultOptionalParametersMutation = (options?: Partial<Options<CallWithDefaultOptionalParametersData>>): UseMutationOptions<unknown, Options<CallWithDefaultOptionalParametersData>, Error> => ({\n    mutation: async (vars) => {\n        const { data } = await callWithDefaultOptionalParameters({\n            ...options,\n            ...vars,\n            throwOnError: true\n        });\n        return data;\n    }\n});\n\nexport const callToTestOrderOfParamsMutation = (options?: Partial<Options<CallToTestOrderOfParamsData>>): UseMutationOptions<unknown, Options<CallToTestOrderOfParamsData>, Error> => ({\n    mutation: async (vars) => {\n        const { data } = await callToTestOrderOfParams({\n            ...options,\n            ...vars,\n            throwOnError: true\n        });\n        return data;\n    }\n});\n\nexport const duplicateNameMutation = (options?: Partial<Options<DuplicateNameData>>): UseMutationOptions<unknown, Options<DuplicateNameData>, Error> => ({\n    mutation: async (vars) => {\n        const { data } = await duplicateName({\n            ...options,\n            ...vars,\n            throwOnError: true\n        });\n        return data;\n    }\n});\n\nexport const duplicateName2QueryKey = (options?: Options<DuplicateName2Data>) => createQueryKey('duplicateName2', options);\n\nexport const duplicateName2Query = defineQueryOptions<Options<DuplicateName2Data>, unknown, Error>((options?: Options<DuplicateName2Data>) => ({\n    key: duplicateName2QueryKey(options),\n    query: async (context) => {\n        const { data } = await duplicateName2({\n            ...options,\n            ...context,\n            throwOnError: true\n        });\n        return data;\n    }\n}));\n\nexport const duplicateName3Mutation = (options?: Partial<Options<DuplicateName3Data>>): UseMutationOptions<unknown, Options<DuplicateName3Data>, Error> => ({\n    mutation: async (vars) => {\n        const { data } = await duplicateName3({\n            ...options,\n            ...vars,\n            throwOnError: true\n        });\n        return data;\n    }\n});\n\nexport const duplicateName4Mutation = (options?: Partial<Options<DuplicateName4Data>>): UseMutationOptions<unknown, Options<DuplicateName4Data>, Error> => ({\n    mutation: async (vars) => {\n        const { data } = await duplicateName4({\n            ...options,\n            ...vars,\n            throwOnError: true\n        });\n        return data;\n    }\n});\n\nexport const callWithNoContentResponseQueryKey = (options?: Options<CallWithNoContentResponseData>) => createQueryKey('callWithNoContentResponse', options);\n\nexport const callWithNoContentResponseQuery = defineQueryOptions<Options<CallWithNoContentResponseData>, CallWithNoContentResponseResponse, Error>((options?: Options<CallWithNoContentResponseData>) => ({\n    key: callWithNoContentResponseQueryKey(options),\n    query: async (context) => {\n        const { data } = await callWithNoContentResponse({\n            ...options,\n            ...context,\n            throwOnError: true\n        });\n        return data;\n    }\n}));\n\nexport const callWithResponseAndNoContentResponseQueryKey = (options?: Options<CallWithResponseAndNoContentResponseData>) => createQueryKey('callWithResponseAndNoContentResponse', options);\n\nexport const callWithResponseAndNoContentResponseQuery = defineQueryOptions<Options<CallWithResponseAndNoContentResponseData>, CallWithResponseAndNoContentResponseResponse, Error>((options?: Options<CallWithResponseAndNoContentResponseData>) => ({\n    key: callWithResponseAndNoContentResponseQueryKey(options),\n    query: async (context) => {\n        const { data } = await callWithResponseAndNoContentResponse({\n            ...options,\n            ...context,\n            throwOnError: true\n        });\n        return data;\n    }\n}));\n\nexport const dummyAQueryKey = (options?: Options<DummyAData>) => createQueryKey('dummyA', options);\n\nexport const dummyAQuery = defineQueryOptions<Options<DummyAData>, DummyAResponse, Error>((options?: Options<DummyAData>) => ({\n    key: dummyAQueryKey(options),\n    query: async (context) => {\n        const { data } = await dummyA({\n            ...options,\n            ...context,\n            throwOnError: true\n        });\n        return data;\n    }\n}));\n\nexport const dummyBQueryKey = (options?: Options<DummyBData>) => createQueryKey('dummyB', options);\n\nexport const dummyBQuery = defineQueryOptions<Options<DummyBData>, DummyBResponse, Error>((options?: Options<DummyBData>) => ({\n    key: dummyBQueryKey(options),\n    query: async (context) => {\n        const { data } = await dummyB({\n            ...options,\n            ...context,\n            throwOnError: true\n        });\n        return data;\n    }\n}));\n\nexport const callWithResponseQueryKey = (options?: Options<CallWithResponseData>) => createQueryKey('callWithResponse', options);\n\nexport const callWithResponseQuery = defineQueryOptions<Options<CallWithResponseData>, CallWithResponseResponse, Error>((options?: Options<CallWithResponseData>) => ({\n    key: callWithResponseQueryKey(options),\n    query: async (context) => {\n        const { data } = await callWithResponse({\n            ...options,\n            ...context,\n            throwOnError: true\n        });\n        return data;\n    }\n}));\n\nexport const callWithDuplicateResponsesMutation = (options?: Partial<Options<CallWithDuplicateResponsesData>>): UseMutationOptions<CallWithDuplicateResponsesResponse, Options<CallWithDuplicateResponsesData>, CallWithDuplicateResponsesError> => ({\n    mutation: async (vars) => {\n        const { data } = await callWithDuplicateResponses({\n            ...options,\n            ...vars,\n            throwOnError: true\n        });\n        return data;\n    }\n});\n\nexport const callWithResponsesMutation = (options?: Partial<Options<CallWithResponsesData>>): UseMutationOptions<CallWithResponsesResponse, Options<CallWithResponsesData>, CallWithResponsesError> => ({\n    mutation: async (vars) => {\n        const { data } = await callWithResponses({\n            ...options,\n            ...vars,\n            throwOnError: true\n        });\n        return data;\n    }\n});\n\nexport const collectionFormatQueryKey = (options: Options<CollectionFormatData>) => createQueryKey('collectionFormat', options);\n\nexport const collectionFormatQuery = defineQueryOptions<Options<CollectionFormatData>, unknown, Error>((options: Options<CollectionFormatData>) => ({\n    key: collectionFormatQueryKey(options),\n    query: async (context) => {\n        const { data } = await collectionFormat({\n            ...options,\n            ...context,\n            throwOnError: true\n        });\n        return data;\n    }\n}));\n\nexport const typesQueryKey = (options: Options<TypesData>) => createQueryKey('types', options);\n\nexport const typesQuery = defineQueryOptions<Options<TypesData>, TypesResponse, Error>((options: Options<TypesData>) => ({\n    key: typesQueryKey(options),\n    query: async (context) => {\n        const { data } = await types({\n            ...options,\n            ...context,\n            throwOnError: true\n        });\n        return data;\n    }\n}));\n\nexport const uploadFileMutation = (options?: Partial<Options<UploadFileData>>): UseMutationOptions<UploadFileResponse, Options<UploadFileData>, Error> => ({\n    mutation: async (vars) => {\n        const { data } = await uploadFile({\n            ...options,\n            ...vars,\n            throwOnError: true\n        });\n        return data;\n    }\n});\n\nexport const fileResponseQueryKey = (options: Options<FileResponseData>) => createQueryKey('fileResponse', options);\n\nexport const fileResponseQuery = defineQueryOptions<Options<FileResponseData>, FileResponseResponse, Error>((options: Options<FileResponseData>) => ({\n    key: fileResponseQueryKey(options),\n    query: async (context) => {\n        const { data } = await fileResponse({\n            ...options,\n            ...context,\n            throwOnError: true\n        });\n        return data;\n    }\n}));\n\nexport const complexTypesQueryKey = (options: Options<ComplexTypesData>) => createQueryKey('complexTypes', options);\n\nexport const complexTypesQuery = defineQueryOptions<Options<ComplexTypesData>, ComplexTypesResponse, Error>((options: Options<ComplexTypesData>) => ({\n    key: complexTypesQueryKey(options),\n    query: async (context) => {\n        const { data } = await complexTypes({\n            ...options,\n            ...context,\n            throwOnError: true\n        });\n        return data;\n    }\n}));\n\nexport const multipartResponseQueryKey = (options?: Options<MultipartResponseData>) => createQueryKey('multipartResponse', options);\n\nexport const multipartResponseQuery = defineQueryOptions<Options<MultipartResponseData>, MultipartResponseResponse, Error>((options?: Options<MultipartResponseData>) => ({\n    key: multipartResponseQueryKey(options),\n    query: async (context) => {\n        const { data } = await multipartResponse({\n            ...options,\n            ...context,\n            throwOnError: true\n        });\n        return data;\n    }\n}));\n\nexport const multipartRequestMutation = (options?: Partial<Options<MultipartRequestData>>): UseMutationOptions<unknown, Options<MultipartRequestData>, Error> => ({\n    mutation: async (vars) => {\n        const { data } = await multipartRequest({\n            ...options,\n            ...vars,\n            throwOnError: true\n        });\n        return data;\n    }\n});\n\nexport const complexParamsMutation = (options?: Partial<Options<ComplexParamsData>>): UseMutationOptions<ComplexParamsResponse, Options<ComplexParamsData>, Error> => ({\n    mutation: async (vars) => {\n        const { data } = await complexParams({\n            ...options,\n            ...vars,\n            throwOnError: true\n        });\n        return data;\n    }\n});\n\nexport const callWithResultFromHeaderMutation = (options?: Partial<Options<CallWithResultFromHeaderData>>): UseMutationOptions<unknown, Options<CallWithResultFromHeaderData>, Error> => ({\n    mutation: async (vars) => {\n        const { data } = await callWithResultFromHeader({\n            ...options,\n            ...vars,\n            throwOnError: true\n        });\n        return data;\n    }\n});\n\nexport const testErrorCodeMutation = (options?: Partial<Options<TestErrorCodeData>>): UseMutationOptions<unknown, Options<TestErrorCodeData>, Error> => ({\n    mutation: async (vars) => {\n        const { data } = await testErrorCode({\n            ...options,\n            ...vars,\n            throwOnError: true\n        });\n        return data;\n    }\n});\n\nexport const nonAsciiæøåÆøÅöôêÊ字符串Mutation = (options?: Partial<Options<NonAsciiæøåÆøÅöôêÊ字符串Data>>): UseMutationOptions<NonAsciiæøåÆøÅöôêÊ字符串Response, Options<NonAsciiæøåÆøÅöôêÊ字符串Data>, Error> => ({\n    mutation: async (vars) => {\n        const { data } = await nonAsciiæøåÆøÅöôêÊ字符串({\n            ...options,\n            ...vars,\n            throwOnError: true\n        });\n        return data;\n    }\n});\n\n/**\n * Login User\n */\nexport const putWithFormUrlEncodedMutation = (options?: Partial<Options<PutWithFormUrlEncodedData>>): UseMutationOptions<unknown, Options<PutWithFormUrlEncodedData>, Error> => ({\n    mutation: async (vars) => {\n        const { data } = await putWithFormUrlEncoded({\n            ...options,\n            ...vars,\n            throwOnError: true\n        });\n        return data;\n    }\n});\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@pinia/colada/fetch/client/client.gen.ts",
    "content": "// 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 (options: RequestOptions) => {\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 url = buildUrl(opts);\n\n    return { opts, url };\n  };\n\n  const request: Client['request'] = async (options) => {\n    // @ts-expect-error\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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@pinia/colada/fetch/client/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type { Auth } from '../core/auth.gen';\nexport type { QuerySerializerOptions } from '../core/bodySerializer.gen';\nexport {\n  formDataBodySerializer,\n  jsonBodySerializer,\n  urlSearchParamsBodySerializer,\n} from '../core/bodySerializer.gen';\nexport { buildClientParams } from '../core/params.gen';\nexport { serializeQueryKeyValue } from '../core/queryKeySerializer.gen';\nexport { createClient } from './client.gen';\nexport type {\n  Client,\n  ClientOptions,\n  Config,\n  CreateClientConfig,\n  Options,\n  RequestOptions,\n  RequestResult,\n  ResolvedRequestOptions,\n  ResponseStyle,\n  TDataShape,\n} from './types.gen';\nexport { createConfig, mergeHeaders } from './utils.gen';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@pinia/colada/fetch/client/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { Auth } from '../core/auth.gen';\nimport type {\n  ServerSentEventsOptions,\n  ServerSentEventsResult,\n} from '../core/serverSentEvents.gen';\nimport type { Client as CoreClient, Config as CoreConfig } from '../core/types.gen';\nimport type { Middleware } from './utils.gen';\n\nexport type ResponseStyle = 'data' | 'fields';\n\nexport interface Config<T extends ClientOptions = ClientOptions>\n  extends Omit<RequestInit, 'body' | 'headers' | 'method'>, CoreConfig {\n  /**\n   * Base URL for all requests made by this client.\n   */\n  baseUrl?: T['baseUrl'];\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   * Please don't use the Fetch client for Next.js applications. The `next`\n   * options won't have any effect.\n   *\n   * Install {@link https://www.npmjs.com/package/@hey-api/client-next `@hey-api/client-next`} instead.\n   */\n  next?: never;\n  /**\n   * Return the response data parsed in a specified format. By default, `auto`\n   * will infer the appropriate method from the `Content-Type` response header.\n   * You can override this behavior with any of the {@link Body} methods.\n   * Select `stream` if you don't want to parse response data at all.\n   *\n   * @default 'auto'\n   */\n  parseAs?: 'arrayBuffer' | 'auto' | 'blob' | 'formData' | 'json' | 'stream' | 'text';\n  /**\n   * Should we return only data or multiple fields (data, error, response, etc.)?\n   *\n   * @default 'fields'\n   */\n  responseStyle?: ResponseStyle;\n  /**\n   * Throw an error instead of returning it in the response?\n   *\n   * @default false\n   */\n  throwOnError?: T['throwOnError'];\n}\n\nexport interface RequestOptions<\n  TData = unknown,\n  TResponseStyle extends ResponseStyle = 'fields',\n  ThrowOnError extends boolean = boolean,\n  Url extends string = string,\n>\n  extends\n    Config<{\n      responseStyle: TResponseStyle;\n      throwOnError: ThrowOnError;\n    }>,\n    Pick<\n      ServerSentEventsOptions<TData>,\n      | 'onRequest'\n      | 'onSseError'\n      | 'onSseEvent'\n      | 'sseDefaultRetryDelay'\n      | 'sseMaxRetryAttempts'\n      | 'sseMaxRetryDelay'\n    > {\n  /**\n   * Any body that you want to add to your request.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/fetch#body}\n   */\n  body?: unknown;\n  path?: Record<string, unknown>;\n  query?: Record<string, unknown>;\n  /**\n   * Security mechanism(s) to use for the request.\n   */\n  security?: ReadonlyArray<Auth>;\n  url: Url;\n}\n\nexport interface ResolvedRequestOptions<\n  TResponseStyle extends ResponseStyle = 'fields',\n  ThrowOnError extends boolean = boolean,\n  Url extends string = string,\n> extends RequestOptions<unknown, TResponseStyle, ThrowOnError, Url> {\n  serializedBody?: string;\n}\n\nexport type RequestResult<\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = boolean,\n  TResponseStyle extends ResponseStyle = 'fields',\n> = ThrowOnError extends true\n  ? Promise<\n      TResponseStyle extends 'data'\n        ? TData extends Record<string, unknown>\n          ? TData[keyof TData]\n          : TData\n        : {\n            data: TData extends Record<string, unknown> ? TData[keyof TData] : TData;\n            request: Request;\n            response: Response;\n          }\n    >\n  : Promise<\n      TResponseStyle extends 'data'\n        ? (TData extends Record<string, unknown> ? TData[keyof TData] : TData) | undefined\n        : (\n            | {\n                data: TData extends Record<string, unknown> ? TData[keyof TData] : TData;\n                error: undefined;\n              }\n            | {\n                data: undefined;\n                error: TError extends Record<string, unknown> ? TError[keyof TError] : TError;\n              }\n          ) & {\n            request: Request;\n            response: Response;\n          }\n    >;\n\nexport interface ClientOptions {\n  baseUrl?: string;\n  responseStyle?: ResponseStyle;\n  throwOnError?: boolean;\n}\n\ntype MethodFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'>,\n) => RequestResult<TData, TError, ThrowOnError, TResponseStyle>;\n\ntype SseFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'>,\n) => Promise<ServerSentEventsResult<TData, TError>>;\n\ntype RequestFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'> &\n    Pick<Required<RequestOptions<TData, TResponseStyle, ThrowOnError>>, 'method'>,\n) => RequestResult<TData, TError, ThrowOnError, TResponseStyle>;\n\ntype BuildUrlFn = <\n  TData extends {\n    body?: unknown;\n    path?: Record<string, unknown>;\n    query?: Record<string, unknown>;\n    url: string;\n  },\n>(\n  options: TData & Options<TData>,\n) => string;\n\nexport type Client = CoreClient<RequestFn, Config, MethodFn, BuildUrlFn, SseFn> & {\n  interceptors: Middleware<Request, Response, unknown, ResolvedRequestOptions>;\n};\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 = ClientOptions> = (\n  override?: Config<ClientOptions & T>,\n) => Config<Required<ClientOptions> & T>;\n\nexport interface TDataShape {\n  body?: unknown;\n  headers?: unknown;\n  path?: unknown;\n  query?: unknown;\n  url: string;\n}\n\ntype OmitKeys<T, K> = Pick<T, Exclude<keyof T, K>>;\n\nexport type Options<\n  TData extends TDataShape = TDataShape,\n  ThrowOnError extends boolean = boolean,\n  TResponse = unknown,\n  TResponseStyle extends ResponseStyle = 'fields',\n> = OmitKeys<\n  RequestOptions<TResponse, TResponseStyle, ThrowOnError>,\n  'body' | 'path' | 'query' | 'url'\n> &\n  ([TData] extends [never] ? unknown : Omit<TData, 'url'>);\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@pinia/colada/fetch/client/utils.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@pinia/colada/fetch/client.gen.ts",
    "content": "// 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: 'http://localhost:3000/base' }));\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@pinia/colada/fetch/core/auth.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@pinia/colada/fetch/core/bodySerializer.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@pinia/colada/fetch/core/params.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@pinia/colada/fetch/core/pathSerializer.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@pinia/colada/fetch/core/queryKeySerializer.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\n/**\n * JSON-friendly union that mirrors what Pinia Colada can hash.\n */\nexport type JsonValue =\n  | null\n  | string\n  | number\n  | boolean\n  | JsonValue[]\n  | { [key: string]: JsonValue };\n\n/**\n * Replacer that converts non-JSON values (bigint, Date, etc.) to safe substitutes.\n */\nexport const queryKeyJsonReplacer = (_key: string, value: unknown) => {\n  if (value === undefined || typeof value === 'function' || typeof value === 'symbol') {\n    return undefined;\n  }\n  if (typeof value === 'bigint') {\n    return value.toString();\n  }\n  if (value instanceof Date) {\n    return value.toISOString();\n  }\n  return value;\n};\n\n/**\n * Safely stringifies a value and parses it back into a JsonValue.\n */\nexport const stringifyToJsonValue = (input: unknown): JsonValue | undefined => {\n  try {\n    const json = JSON.stringify(input, queryKeyJsonReplacer);\n    if (json === undefined) {\n      return undefined;\n    }\n    return JSON.parse(json) as JsonValue;\n  } catch {\n    return undefined;\n  }\n};\n\n/**\n * Detects plain objects (including objects with a null prototype).\n */\nconst isPlainObject = (value: unknown): value is Record<string, unknown> => {\n  if (value === null || typeof value !== 'object') {\n    return false;\n  }\n  const prototype = Object.getPrototypeOf(value as object);\n  return prototype === Object.prototype || prototype === null;\n};\n\n/**\n * Turns URLSearchParams into a sorted JSON object for deterministic keys.\n */\nconst serializeSearchParams = (params: URLSearchParams): JsonValue => {\n  const entries = Array.from(params.entries()).sort(([a], [b]) => a.localeCompare(b));\n  const result: Record<string, JsonValue> = {};\n\n  for (const [key, value] of entries) {\n    const existing = result[key];\n    if (existing === undefined) {\n      result[key] = value;\n      continue;\n    }\n\n    if (Array.isArray(existing)) {\n      (existing as string[]).push(value);\n    } else {\n      result[key] = [existing, value];\n    }\n  }\n\n  return result;\n};\n\n/**\n * Normalizes any accepted value into a JSON-friendly shape for query keys.\n */\nexport const serializeQueryKeyValue = (value: unknown): JsonValue | undefined => {\n  if (value === null) {\n    return null;\n  }\n\n  if (typeof value === 'string' || typeof value === 'number' || typeof value === 'boolean') {\n    return value;\n  }\n\n  if (value === undefined || typeof value === 'function' || typeof value === 'symbol') {\n    return undefined;\n  }\n\n  if (typeof value === 'bigint') {\n    return value.toString();\n  }\n\n  if (value instanceof Date) {\n    return value.toISOString();\n  }\n\n  if (Array.isArray(value)) {\n    return stringifyToJsonValue(value);\n  }\n\n  if (typeof URLSearchParams !== 'undefined' && value instanceof URLSearchParams) {\n    return serializeSearchParams(value);\n  }\n\n  if (isPlainObject(value)) {\n    return stringifyToJsonValue(value);\n  }\n\n  return undefined;\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@pinia/colada/fetch/core/serverSentEvents.gen.ts",
    "content": "// 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 const 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            // Normalize line endings: CRLF -> LF, then CR -> LF\n            buffer = buffer.replace(/\\r\\n/g, '\\n').replace(/\\r/g, '\\n');\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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@pinia/colada/fetch/core/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { Auth, AuthToken } from './auth.gen';\nimport type { BodySerializer, QuerySerializer, QuerySerializerOptions } from './bodySerializer.gen';\n\nexport type HttpMethod =\n  | 'connect'\n  | 'delete'\n  | 'get'\n  | 'head'\n  | 'options'\n  | 'patch'\n  | 'post'\n  | 'put'\n  | 'trace';\n\nexport type Client<\n  RequestFn = never,\n  Config = unknown,\n  MethodFn = never,\n  BuildUrlFn = never,\n  SseFn = never,\n> = {\n  /**\n   * Returns the final request URL.\n   */\n  buildUrl: BuildUrlFn;\n  getConfig: () => Config;\n  request: RequestFn;\n  setConfig: (config: Config) => Config;\n} & {\n  [K in HttpMethod]: MethodFn;\n} & ([SseFn] extends [never] ? { sse?: never } : { sse: { [K in HttpMethod]: SseFn } });\n\nexport interface Config {\n  /**\n   * Auth token or a function returning auth token. The resolved value will be\n   * added to the request payload as defined by its `security` array.\n   */\n  auth?: ((auth: Auth) => Promise<AuthToken> | AuthToken) | AuthToken;\n  /**\n   * A function for serializing request body parameter. By default,\n   * {@link JSON.stringify()} will be used.\n   */\n  bodySerializer?: BodySerializer | null;\n  /**\n   * An object containing any HTTP headers that you want to pre-populate your\n   * `Headers` object with.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/Headers/Headers#init See more}\n   */\n  headers?:\n    | RequestInit['headers']\n    | Record<\n        string,\n        string | number | boolean | (string | number | boolean)[] | null | undefined | unknown\n      >;\n  /**\n   * The request method.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/fetch#method See more}\n   */\n  method?: Uppercase<HttpMethod>;\n  /**\n   * A function for serializing request query parameters. By default, arrays\n   * will be exploded in form style, objects will be exploded in deepObject\n   * style, and reserved characters are percent-encoded.\n   *\n   * This method will have no effect if the native `paramsSerializer()` Axios\n   * API function is used.\n   *\n   * {@link https://swagger.io/docs/specification/serialization/#query View examples}\n   */\n  querySerializer?: QuerySerializer | QuerySerializerOptions;\n  /**\n   * A function validating request data. This is useful if you want to ensure\n   * the request conforms to the desired shape, so it can be safely sent to\n   * the server.\n   */\n  requestValidator?: (data: unknown) => Promise<unknown>;\n  /**\n   * A function transforming response data before it's returned. This is useful\n   * for post-processing data, e.g. converting ISO strings into Date objects.\n   */\n  responseTransformer?: (data: unknown) => Promise<unknown>;\n  /**\n   * A function validating response data. This is useful if you want to ensure\n   * the response conforms to the desired shape, so it can be safely passed to\n   * the transformers and returned to the user.\n   */\n  responseValidator?: (data: unknown) => Promise<unknown>;\n}\n\ntype IsExactlyNeverOrNeverUndefined<T> = [T] extends [never]\n  ? true\n  : [T] extends [never | undefined]\n    ? [undefined] extends [T]\n      ? false\n      : true\n    : false;\n\nexport type OmitNever<T extends Record<string, unknown>> = {\n  [K in keyof T as IsExactlyNeverOrNeverUndefined<T[K]> extends true ? never : K]: T[K];\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@pinia/colada/fetch/core/utils.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@pinia/colada/fetch/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport { apiVVersionODataControllerCount, callToTestOrderOfParams, callWithDefaultOptionalParameters, callWithDefaultParameters, callWithDescriptions, callWithDuplicateResponses, callWithNoContentResponse, callWithParameters, callWithResponse, callWithResponseAndNoContentResponse, callWithResponses, callWithResultFromHeader, callWithWeirdParameterNames, collectionFormat, complexParams, complexTypes, deleteCallWithoutParametersAndResponse, deleteFoo, deprecatedCall, dummyA, dummyB, duplicateName, duplicateName2, duplicateName3, duplicateName4, export_, fileResponse, fooWow, getApiVbyApiVersionSimpleOperation, getCallWithOptionalParam, getCallWithoutParametersAndResponse, headCallWithoutParametersAndResponse, import_, multipartRequest, multipartResponse, nonAsciiæøåÆøÅöôêÊ字符串, type Options, optionsCallWithoutParametersAndResponse, patchApiVbyApiVersionNoTag, patchCallWithoutParametersAndResponse, postApiVbyApiVersionFormData, postApiVbyApiVersionRequestBody, postCallWithOptionalParam, postCallWithoutParametersAndResponse, putCallWithoutParametersAndResponse, putWithFormUrlEncoded, testErrorCode, types, uploadFile } from './sdk.gen';\nexport type { _3eNum1Период, _400, AdditionalPropertiesIntegerIssue, AdditionalPropertiesUnknownIssue, AdditionalPropertiesUnknownIssue2, AdditionalPropertiesUnknownIssue3, AdditionalPropertiesUnknownIssueWritable, AnyOfAnyAndNull, AnyOfArrays, ApiVVersionODataControllerCountData, ApiVVersionODataControllerCountResponse, ApiVVersionODataControllerCountResponses, ArrayWithAnyOfProperties, ArrayWithArray, ArrayWithBooleans, ArrayWithNumbers, ArrayWithProperties, ArrayWithReferences, ArrayWithStrings, CallToTestOrderOfParamsData, CallWithDefaultOptionalParametersData, CallWithDefaultParametersData, CallWithDescriptionsData, CallWithDuplicateResponsesData, CallWithDuplicateResponsesError, CallWithDuplicateResponsesErrors, CallWithDuplicateResponsesResponse, CallWithDuplicateResponsesResponses, CallWithNoContentResponseData, CallWithNoContentResponseResponse, CallWithNoContentResponseResponses, CallWithParametersData, CallWithResponseAndNoContentResponseData, CallWithResponseAndNoContentResponseResponse, CallWithResponseAndNoContentResponseResponses, CallWithResponseData, CallWithResponseResponse, CallWithResponseResponses, CallWithResponsesData, CallWithResponsesError, CallWithResponsesErrors, CallWithResponsesResponse, CallWithResponsesResponses, CallWithResultFromHeaderData, CallWithResultFromHeaderErrors, CallWithResultFromHeaderResponses, CallWithWeirdParameterNamesData, CamelCaseCommentWithBreaks, CharactersInDescription, ClientOptions, CollectionFormatData, CommentWithBackticks, CommentWithBackticksAndQuotes, CommentWithBreaks, CommentWithExpressionPlaceholders, CommentWithQuotes, CommentWithReservedCharacters, CommentWithSlashes, ComplexParamsData, ComplexParamsResponse, ComplexParamsResponses, ComplexTypesData, ComplexTypesErrors, ComplexTypesResponse, ComplexTypesResponses, CompositionBaseModel, CompositionExtendedModel, CompositionWithAllOfAndNullable, CompositionWithAnyOf, CompositionWithAnyOfAndNullable, CompositionWithAnyOfAnonymous, CompositionWithNestedAnyAndTypeNull, CompositionWithNestedAnyOfAndNull, CompositionWithOneOf, CompositionWithOneOfAndComplexArrayDictionary, CompositionWithOneOfAndNullable, CompositionWithOneOfAndProperties, CompositionWithOneOfAndSimpleArrayDictionary, CompositionWithOneOfAndSimpleDictionary, CompositionWithOneOfAnonymous, CompositionWithOneOfDiscriminator, ConstValue, Default, DeleteCallWithoutParametersAndResponseData, DeleteFooData, DeleteFooData2, DeleteFooData3, DeprecatedCallData, DeprecatedModel, DictionaryWithArray, DictionaryWithDictionary, DictionaryWithProperties, DictionaryWithPropertiesAndAdditionalProperties, DictionaryWithReference, DictionaryWithString, DummyAData, DummyAResponse, DummyAResponses, DummyBData, DummyBResponse, DummyBResponses, DuplicateName2Data, DuplicateName3Data, DuplicateName4Data, DuplicateNameData, EnumFromDescription, EnumWithExtensions, EnumWithNumbers, EnumWithReplacedCharacters, EnumWithStrings, EnumWithXEnumNames, ExportData, ExternalRefA, ExternalRefB, ExternalSharedModel, File, FileResponseData, FileResponseResponse, FileResponseResponses, FileWritable, FooWowData, FooWowResponses, FreeFormObjectWithAdditionalPropertiesEqEmptyObject, FreeFormObjectWithAdditionalPropertiesEqTrue, FreeFormObjectWithoutAdditionalProperties, GenericSchemaDuplicateIssue1SystemBoolean, GenericSchemaDuplicateIssue1SystemBooleanWritable, GenericSchemaDuplicateIssue1SystemString, GenericSchemaDuplicateIssue1SystemStringWritable, GetApiVbyApiVersionSimpleOperationData, GetApiVbyApiVersionSimpleOperationError, GetApiVbyApiVersionSimpleOperationErrors, GetApiVbyApiVersionSimpleOperationResponse, GetApiVbyApiVersionSimpleOperationResponses, GetCallWithOptionalParamData, GetCallWithoutParametersAndResponseData, HeadCallWithoutParametersAndResponseData, Import, ImportData, ImportResponse, ImportResponses, IoK8sApimachineryPkgApisMetaV1DeleteOptions, IoK8sApimachineryPkgApisMetaV1Preconditions, ModelCircle, ModelFromZendesk, ModelSquare, ModelThatExtends, ModelThatExtendsExtends, ModelWithAdditionalPropertiesEqTrue, ModelWithAdditionalPropertiesRef, ModelWithAnyOfConstantSizeArray, ModelWithAnyOfConstantSizeArrayAndIntersect, ModelWithAnyOfConstantSizeArrayNullable, ModelWithAnyOfConstantSizeArrayWithNSizeAndOptions, ModelWithAnyOfConstantSizeArrayWithNSizeAndOptionsWritable, ModelWithArray, ModelWithArrayReadOnlyAndWriteOnly, ModelWithArrayReadOnlyAndWriteOnlyWritable, ModelWithBackticksInDescription, ModelWithBoolean, ModelWithCircularReference, ModelWithConst, ModelWithConstantSizeArray, ModelWithDictionary, ModelWithDuplicateImports, ModelWithDuplicateProperties, ModelWithEnum, ModelWithEnumFromDescription, ModelWithEnumWithHyphen, ModelWithInteger, ModelWithNestedArrayEnums, ModelWithNestedArrayEnumsData, ModelWithNestedArrayEnumsDataBar, ModelWithNestedArrayEnumsDataFoo, ModelWithNestedCompositionEnums, ModelWithNestedEnums, ModelWithNestedProperties, ModelWithNullableObject, ModelWithNullableString, ModelWithNumericEnumUnion, ModelWithOneOfAndProperties, ModelWithOneOfEnum, ModelWithOrderedProperties, ModelWithPattern, ModelWithPatternWritable, ModelWithPrefixItemsConstantSizeArray, ModelWithProperties, ModelWithPropertiesWritable, ModelWithReadOnlyAndWriteOnly, ModelWithReadOnlyAndWriteOnlyWritable, ModelWithReference, ModelWithReferenceWritable, ModelWithString, ModelWithStringError, MultipartRequestData, MultipartResponseData, MultipartResponseResponse, MultipartResponseResponses, NestedAnyOfArraysNullable, NonAsciiæøåÆøÅöôêÊ字符串Data, NonAsciiæøåÆøÅöôêÊ字符串Response, NonAsciiæøåÆøÅöôêÊ字符串Responses, NonAsciiStringæøåÆøÅöôêÊ字符串, NullableObject, OneOfAllOfIssue, OneOfAllOfIssueWritable, OptionsCallWithoutParametersAndResponseData, Pageable, ParameterSimpleParameterUnused, PatchApiVbyApiVersionNoTagData, PatchApiVbyApiVersionNoTagResponses, PatchCallWithoutParametersAndResponseData, PostApiVbyApiVersionFormDataData, PostApiVbyApiVersionRequestBodyData, PostCallWithOptionalParamData, PostCallWithOptionalParamResponse, PostCallWithOptionalParamResponses, PostCallWithoutParametersAndResponseData, PostServiceWithEmptyTagResponse, PostServiceWithEmptyTagResponse2, PutCallWithoutParametersAndResponseData, PutWithFormUrlEncodedData, SchemaWithFormRestrictedKeys, SimpleBoolean, SimpleFile, SimpleFormData, SimpleInteger, SimpleParameter, SimpleReference, SimpleRequestBody, SimpleString, SimpleStringWithPattern, TestErrorCodeData, TestErrorCodeErrors, TestErrorCodeResponses, TypesData, TypesResponse, TypesResponses, UploadFileData, UploadFileResponse, UploadFileResponses, XFooBar } from './types.gen';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@pinia/colada/fetch/sdk.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport { type Client, formDataBodySerializer, type Options as Options2, type TDataShape, urlSearchParamsBodySerializer } from './client';\nimport { client } from './client.gen';\nimport type { ApiVVersionODataControllerCountData, ApiVVersionODataControllerCountResponses, CallToTestOrderOfParamsData, CallWithDefaultOptionalParametersData, CallWithDefaultParametersData, CallWithDescriptionsData, CallWithDuplicateResponsesData, CallWithDuplicateResponsesErrors, CallWithDuplicateResponsesResponses, CallWithNoContentResponseData, CallWithNoContentResponseResponses, CallWithParametersData, CallWithResponseAndNoContentResponseData, CallWithResponseAndNoContentResponseResponses, CallWithResponseData, CallWithResponseResponses, CallWithResponsesData, CallWithResponsesErrors, CallWithResponsesResponses, CallWithResultFromHeaderData, CallWithResultFromHeaderErrors, CallWithResultFromHeaderResponses, CallWithWeirdParameterNamesData, CollectionFormatData, ComplexParamsData, ComplexParamsResponses, ComplexTypesData, ComplexTypesErrors, ComplexTypesResponses, DeleteCallWithoutParametersAndResponseData, DeleteFooData3, DeprecatedCallData, DummyAData, DummyAResponses, DummyBData, DummyBResponses, DuplicateName2Data, DuplicateName3Data, DuplicateName4Data, DuplicateNameData, ExportData, FileResponseData, FileResponseResponses, FooWowData, FooWowResponses, GetApiVbyApiVersionSimpleOperationData, GetApiVbyApiVersionSimpleOperationErrors, GetApiVbyApiVersionSimpleOperationResponses, GetCallWithOptionalParamData, GetCallWithoutParametersAndResponseData, HeadCallWithoutParametersAndResponseData, ImportData, ImportResponses, MultipartRequestData, MultipartResponseData, MultipartResponseResponses, NonAsciiæøåÆøÅöôêÊ字符串Data, NonAsciiæøåÆøÅöôêÊ字符串Responses, OptionsCallWithoutParametersAndResponseData, PatchApiVbyApiVersionNoTagData, PatchApiVbyApiVersionNoTagResponses, PatchCallWithoutParametersAndResponseData, PostApiVbyApiVersionFormDataData, PostApiVbyApiVersionRequestBodyData, PostCallWithOptionalParamData, PostCallWithOptionalParamResponses, PostCallWithoutParametersAndResponseData, PutCallWithoutParametersAndResponseData, PutWithFormUrlEncodedData, TestErrorCodeData, TestErrorCodeErrors, TestErrorCodeResponses, TypesData, TypesResponses, UploadFileData, UploadFileResponses } from './types.gen';\n\nexport type Options<TData extends TDataShape = TDataShape, ThrowOnError extends boolean = boolean> = Options2<TData, ThrowOnError> & {\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\nexport const export_ = <ThrowOnError extends boolean = false>(options?: Options<ExportData, ThrowOnError>) => (options?.client ?? client).get<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/no+tag', ...options });\n\nexport const patchApiVbyApiVersionNoTag = <ThrowOnError extends boolean = false>(options?: Options<PatchApiVbyApiVersionNoTagData, ThrowOnError>) => (options?.client ?? client).patch<PatchApiVbyApiVersionNoTagResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/no+tag', ...options });\n\nexport const import_ = <ThrowOnError extends boolean = false>(options: Options<ImportData, ThrowOnError>) => (options.client ?? client).post<ImportResponses, unknown, ThrowOnError>({\n    url: '/api/v{api-version}/no+tag',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options.headers\n    }\n});\n\nexport const fooWow = <ThrowOnError extends boolean = false>(options?: Options<FooWowData, ThrowOnError>) => (options?.client ?? client).put<FooWowResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/no+tag', ...options });\n\nexport const apiVVersionODataControllerCount = <ThrowOnError extends boolean = false>(options?: Options<ApiVVersionODataControllerCountData, ThrowOnError>) => (options?.client ?? client).get<ApiVVersionODataControllerCountResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple/$count', ...options });\n\nexport const getApiVbyApiVersionSimpleOperation = <ThrowOnError extends boolean = false>(options: Options<GetApiVbyApiVersionSimpleOperationData, ThrowOnError>) => (options.client ?? client).get<GetApiVbyApiVersionSimpleOperationResponses, GetApiVbyApiVersionSimpleOperationErrors, ThrowOnError>({ url: '/api/v{api-version}/simple:operation', ...options });\n\nexport const deleteCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<DeleteCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).delete<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const getCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<GetCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).get<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const headCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<HeadCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).head<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const optionsCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<OptionsCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).options<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const patchCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<PatchCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).patch<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const postCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<PostCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).post<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const putCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<PutCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).put<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const deleteFoo = <ThrowOnError extends boolean = false>(options: Options<DeleteFooData3, ThrowOnError>) => (options.client ?? client).delete<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/foo/{foo_param}/bar/{BarParam}', ...options });\n\nexport const callWithDescriptions = <ThrowOnError extends boolean = false>(options?: Options<CallWithDescriptionsData, ThrowOnError>) => (options?.client ?? client).post<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/descriptions', ...options });\n\n/**\n * @deprecated\n */\nexport const deprecatedCall = <ThrowOnError extends boolean = false>(options: Options<DeprecatedCallData, ThrowOnError>) => (options.client ?? client).post<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/parameters/deprecated', ...options });\n\nexport const callWithParameters = <ThrowOnError extends boolean = false>(options: Options<CallWithParametersData, ThrowOnError>) => (options.client ?? client).post<unknown, unknown, ThrowOnError>({\n    url: '/api/v{api-version}/parameters/{parameterPath}',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options.headers\n    }\n});\n\nexport const callWithWeirdParameterNames = <ThrowOnError extends boolean = false>(options: Options<CallWithWeirdParameterNamesData, ThrowOnError>) => (options.client ?? client).post<unknown, unknown, ThrowOnError>({\n    url: '/api/v{api-version}/parameters/{parameter.path.1}/{parameter-path-2}/{PARAMETER-PATH-3}',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options.headers\n    }\n});\n\nexport const getCallWithOptionalParam = <ThrowOnError extends boolean = false>(options: Options<GetCallWithOptionalParamData, ThrowOnError>) => (options.client ?? client).get<unknown, unknown, ThrowOnError>({\n    url: '/api/v{api-version}/parameters',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options.headers\n    }\n});\n\nexport const postCallWithOptionalParam = <ThrowOnError extends boolean = false>(options: Options<PostCallWithOptionalParamData, ThrowOnError>) => (options.client ?? client).post<PostCallWithOptionalParamResponses, unknown, ThrowOnError>({\n    url: '/api/v{api-version}/parameters',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options.headers\n    }\n});\n\nexport const postApiVbyApiVersionRequestBody = <ThrowOnError extends boolean = false>(options?: Options<PostApiVbyApiVersionRequestBodyData, ThrowOnError>) => (options?.client ?? client).post<unknown, unknown, ThrowOnError>({\n    url: '/api/v{api-version}/requestBody',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options?.headers\n    }\n});\n\nexport const postApiVbyApiVersionFormData = <ThrowOnError extends boolean = false>(options?: Options<PostApiVbyApiVersionFormDataData, ThrowOnError>) => (options?.client ?? client).post<unknown, unknown, ThrowOnError>({\n    ...formDataBodySerializer,\n    url: '/api/v{api-version}/formData',\n    ...options,\n    headers: {\n        'Content-Type': null,\n        ...options?.headers\n    }\n});\n\nexport const callWithDefaultParameters = <ThrowOnError extends boolean = false>(options?: Options<CallWithDefaultParametersData, ThrowOnError>) => (options?.client ?? client).get<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/defaults', ...options });\n\nexport const callWithDefaultOptionalParameters = <ThrowOnError extends boolean = false>(options?: Options<CallWithDefaultOptionalParametersData, ThrowOnError>) => (options?.client ?? client).post<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/defaults', ...options });\n\nexport const callToTestOrderOfParams = <ThrowOnError extends boolean = false>(options: Options<CallToTestOrderOfParamsData, ThrowOnError>) => (options.client ?? client).put<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/defaults', ...options });\n\nexport const duplicateName = <ThrowOnError extends boolean = false>(options?: Options<DuplicateNameData, ThrowOnError>) => (options?.client ?? client).delete<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/duplicate', ...options });\n\nexport const duplicateName2 = <ThrowOnError extends boolean = false>(options?: Options<DuplicateName2Data, ThrowOnError>) => (options?.client ?? client).get<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/duplicate', ...options });\n\nexport const duplicateName3 = <ThrowOnError extends boolean = false>(options?: Options<DuplicateName3Data, ThrowOnError>) => (options?.client ?? client).post<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/duplicate', ...options });\n\nexport const duplicateName4 = <ThrowOnError extends boolean = false>(options?: Options<DuplicateName4Data, ThrowOnError>) => (options?.client ?? client).put<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/duplicate', ...options });\n\nexport const callWithNoContentResponse = <ThrowOnError extends boolean = false>(options?: Options<CallWithNoContentResponseData, ThrowOnError>) => (options?.client ?? client).get<CallWithNoContentResponseResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/no-content', ...options });\n\nexport const callWithResponseAndNoContentResponse = <ThrowOnError extends boolean = false>(options?: Options<CallWithResponseAndNoContentResponseData, ThrowOnError>) => (options?.client ?? client).get<CallWithResponseAndNoContentResponseResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/multiple-tags/response-and-no-content', ...options });\n\nexport const dummyA = <ThrowOnError extends boolean = false>(options?: Options<DummyAData, ThrowOnError>) => (options?.client ?? client).get<DummyAResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/multiple-tags/a', ...options });\n\nexport const dummyB = <ThrowOnError extends boolean = false>(options?: Options<DummyBData, ThrowOnError>) => (options?.client ?? client).get<DummyBResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/multiple-tags/b', ...options });\n\nexport const callWithResponse = <ThrowOnError extends boolean = false>(options?: Options<CallWithResponseData, ThrowOnError>) => (options?.client ?? client).get<CallWithResponseResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/response', ...options });\n\nexport const callWithDuplicateResponses = <ThrowOnError extends boolean = false>(options?: Options<CallWithDuplicateResponsesData, ThrowOnError>) => (options?.client ?? client).post<CallWithDuplicateResponsesResponses, CallWithDuplicateResponsesErrors, ThrowOnError>({ url: '/api/v{api-version}/response', ...options });\n\nexport const callWithResponses = <ThrowOnError extends boolean = false>(options?: Options<CallWithResponsesData, ThrowOnError>) => (options?.client ?? client).put<CallWithResponsesResponses, CallWithResponsesErrors, ThrowOnError>({ url: '/api/v{api-version}/response', ...options });\n\nexport const collectionFormat = <ThrowOnError extends boolean = false>(options: Options<CollectionFormatData, ThrowOnError>) => (options.client ?? client).get<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/collectionFormat', ...options });\n\nexport const types = <ThrowOnError extends boolean = false>(options: Options<TypesData, ThrowOnError>) => (options.client ?? client).get<TypesResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/types', ...options });\n\nexport const uploadFile = <ThrowOnError extends boolean = false>(options: Options<UploadFileData, ThrowOnError>) => (options.client ?? client).post<UploadFileResponses, unknown, ThrowOnError>({\n    ...urlSearchParamsBodySerializer,\n    url: '/api/v{api-version}/upload',\n    ...options,\n    headers: {\n        'Content-Type': 'application/x-www-form-urlencoded',\n        ...options.headers\n    }\n});\n\nexport const fileResponse = <ThrowOnError extends boolean = false>(options: Options<FileResponseData, ThrowOnError>) => (options.client ?? client).get<FileResponseResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/file/{id}', ...options });\n\nexport const complexTypes = <ThrowOnError extends boolean = false>(options: Options<ComplexTypesData, ThrowOnError>) => (options.client ?? client).get<ComplexTypesResponses, ComplexTypesErrors, ThrowOnError>({\n    querySerializer: { parameters: { parameterObject: { object: { style: 'form' } } } },\n    url: '/api/v{api-version}/complex',\n    ...options\n});\n\nexport const multipartResponse = <ThrowOnError extends boolean = false>(options?: Options<MultipartResponseData, ThrowOnError>) => (options?.client ?? client).get<MultipartResponseResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/multipart', ...options });\n\nexport const multipartRequest = <ThrowOnError extends boolean = false>(options?: Options<MultipartRequestData, ThrowOnError>) => (options?.client ?? client).post<unknown, unknown, ThrowOnError>({\n    ...formDataBodySerializer,\n    url: '/api/v{api-version}/multipart',\n    ...options,\n    headers: {\n        'Content-Type': null,\n        ...options?.headers\n    }\n});\n\nexport const complexParams = <ThrowOnError extends boolean = false>(options: Options<ComplexParamsData, ThrowOnError>) => (options.client ?? client).put<ComplexParamsResponses, unknown, ThrowOnError>({\n    url: '/api/v{api-version}/complex/{id}',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json-patch+json',\n        ...options.headers\n    }\n});\n\nexport const callWithResultFromHeader = <ThrowOnError extends boolean = false>(options?: Options<CallWithResultFromHeaderData, ThrowOnError>) => (options?.client ?? client).post<CallWithResultFromHeaderResponses, CallWithResultFromHeaderErrors, ThrowOnError>({ url: '/api/v{api-version}/header', ...options });\n\nexport const testErrorCode = <ThrowOnError extends boolean = false>(options: Options<TestErrorCodeData, ThrowOnError>) => (options.client ?? client).post<TestErrorCodeResponses, TestErrorCodeErrors, ThrowOnError>({ url: '/api/v{api-version}/error', ...options });\n\nexport const nonAsciiæøåÆøÅöôêÊ字符串 = <ThrowOnError extends boolean = false>(options: Options<NonAsciiæøåÆøÅöôêÊ字符串Data, ThrowOnError>) => (options.client ?? client).post<NonAsciiæøåÆøÅöôêÊ字符串Responses, unknown, ThrowOnError>({ url: '/api/v{api-version}/non-ascii-æøåÆØÅöôêÊ字符串', ...options });\n\n/**\n * Login User\n */\nexport const putWithFormUrlEncoded = <ThrowOnError extends boolean = false>(options: Options<PutWithFormUrlEncodedData, ThrowOnError>) => (options.client ?? client).put<unknown, unknown, ThrowOnError>({\n    ...urlSearchParamsBodySerializer,\n    url: '/api/v{api-version}/non-ascii-æøåÆØÅöôêÊ字符串',\n    ...options,\n    headers: {\n        'Content-Type': 'application/x-www-form-urlencoded',\n        ...options.headers\n    }\n});\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@pinia/colada/fetch/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type ClientOptions = {\n    baseUrl: 'http://localhost:3000/base' | (string & {});\n};\n\n/**\n * Model with number-only name\n */\nexport type _400 = string;\n\nexport type ExternalRefA = ExternalSharedModel;\n\nexport type ExternalRefB = ExternalSharedModel;\n\n/**\n * Testing multiline comments in string: First line\n * Second line\n *\n * Fourth line\n */\nexport type CamelCaseCommentWithBreaks = number;\n\n/**\n * Testing multiline comments in string: First line\n * Second line\n *\n * Fourth line\n */\nexport type CommentWithBreaks = number;\n\n/**\n * Testing backticks in string: `backticks` and ```multiple backticks``` should work\n */\nexport type CommentWithBackticks = number;\n\n/**\n * Testing backticks and quotes in string: `backticks`, 'quotes', \"double quotes\" and ```multiple backticks``` should work\n */\nexport type CommentWithBackticksAndQuotes = number;\n\n/**\n * Testing slashes in string: \\backwards\\\\\\ and /forwards/// should work\n */\nexport type CommentWithSlashes = number;\n\n/**\n * Testing expression placeholders in string: ${expression} should work\n */\nexport type CommentWithExpressionPlaceholders = number;\n\n/**\n * Testing quotes in string: 'single quote''' and \"double quotes\"\"\" should work\n */\nexport type CommentWithQuotes = number;\n\n/**\n * Testing reserved characters in string: * inline * and ** inline ** should work\n */\nexport type CommentWithReservedCharacters = number;\n\n/**\n * This is a simple number\n */\nexport type SimpleInteger = number;\n\n/**\n * This is a simple boolean\n */\nexport type SimpleBoolean = boolean;\n\n/**\n * This is a simple string\n */\nexport type SimpleString = string;\n\n/**\n * A string with non-ascii (unicode) characters valid in typescript identifiers (æøåÆØÅöÔèÈ字符串)\n */\nexport type NonAsciiStringæøåÆøÅöôêÊ字符串 = string;\n\n/**\n * This is a simple file\n */\nexport type SimpleFile = Blob | File;\n\n/**\n * This is a simple reference\n */\nexport type SimpleReference = ModelWithString;\n\n/**\n * This is a simple string\n */\nexport type SimpleStringWithPattern = string | null;\n\n/**\n * This is a simple enum with strings\n */\nexport type EnumWithStrings = 'Success' | 'Warning' | 'Error' | '\\'Single Quote\\'' | '\"Double Quotes\"' | 'Non-ascii: øæåôöØÆÅÔÖ字符串';\n\nexport type EnumWithReplacedCharacters = '\\'Single Quote\\'' | '\"Double Quotes\"' | 'øæåôöØÆÅÔÖ字符串' | 3.1 | '';\n\n/**\n * This is a simple enum with numbers\n */\nexport type EnumWithNumbers = 1 | 2 | 3 | 1.1 | 1.2 | 1.3 | 100 | 200 | 300 | -100 | -200 | -300 | -1.1 | -1.2 | -1.3;\n\n/**\n * Success=1,Warning=2,Error=3\n */\nexport type EnumFromDescription = number;\n\n/**\n * This is a simple enum with numbers\n */\nexport type EnumWithExtensions = 200 | 400 | 500;\n\nexport type EnumWithXEnumNames = 0 | 1 | 2;\n\n/**\n * This is a simple array with numbers\n */\nexport type ArrayWithNumbers = Array<number>;\n\n/**\n * This is a simple array with booleans\n */\nexport type ArrayWithBooleans = Array<boolean>;\n\n/**\n * This is a simple array with strings\n */\nexport type ArrayWithStrings = Array<string>;\n\n/**\n * This is a simple array with references\n */\nexport type ArrayWithReferences = Array<ModelWithString>;\n\n/**\n * This is a simple array containing an array\n */\nexport type ArrayWithArray = Array<Array<ModelWithString>>;\n\n/**\n * This is a simple array with properties\n */\nexport type ArrayWithProperties = Array<{\n    '16x16'?: CamelCaseCommentWithBreaks;\n    bar?: string;\n}>;\n\n/**\n * This is a simple array with any of properties\n */\nexport type ArrayWithAnyOfProperties = Array<{\n    foo?: string;\n} | {\n    bar?: string;\n}>;\n\nexport type AnyOfAnyAndNull = {\n    data?: unknown;\n};\n\n/**\n * This is a simple array with any of properties\n */\nexport type AnyOfArrays = {\n    results?: Array<{\n        foo?: string;\n    } | {\n        bar?: string;\n    }>;\n};\n\n/**\n * This is a string dictionary\n */\nexport type DictionaryWithString = {\n    [key: string]: string;\n};\n\nexport type DictionaryWithPropertiesAndAdditionalProperties = {\n    foo?: number;\n    bar?: boolean;\n    [key: string]: string | number | boolean | undefined;\n};\n\n/**\n * This is a string reference\n */\nexport type DictionaryWithReference = {\n    [key: string]: ModelWithString;\n};\n\n/**\n * This is a complex dictionary\n */\nexport type DictionaryWithArray = {\n    [key: string]: Array<ModelWithString>;\n};\n\n/**\n * This is a string dictionary\n */\nexport type DictionaryWithDictionary = {\n    [key: string]: {\n        [key: string]: string;\n    };\n};\n\n/**\n * This is a complex dictionary\n */\nexport type DictionaryWithProperties = {\n    [key: string]: {\n        foo?: string;\n        bar?: string;\n    };\n};\n\n/**\n * This is a model with one number property\n */\nexport type ModelWithInteger = {\n    /**\n     * This is a simple number property\n     */\n    prop?: number;\n};\n\n/**\n * This is a model with one boolean property\n */\nexport type ModelWithBoolean = {\n    /**\n     * This is a simple boolean property\n     */\n    prop?: boolean;\n};\n\n/**\n * This is a model with one string property\n */\nexport type ModelWithString = {\n    /**\n     * This is a simple string property\n     */\n    prop?: string;\n};\n\n/**\n * This is a model with one string property\n */\nexport type ModelWithStringError = {\n    /**\n     * This is a simple string property\n     */\n    prop?: string;\n};\n\n/**\n * `Comment` or `VoiceComment`. The JSON object for adding voice comments to tickets is different. See [Adding voice comments to tickets](/documentation/ticketing/managing-tickets/adding-voice-comments-to-tickets)\n */\nexport type ModelFromZendesk = string;\n\n/**\n * This is a model with one string property\n */\nexport type ModelWithNullableString = {\n    /**\n     * This is a simple string property\n     */\n    nullableProp1?: string | null;\n    /**\n     * This is a simple string property\n     */\n    nullableRequiredProp1: string | null;\n    /**\n     * This is a simple string property\n     */\n    nullableProp2?: string | null;\n    /**\n     * This is a simple string property\n     */\n    nullableRequiredProp2: string | null;\n    /**\n     * This is a simple enum with strings\n     */\n    'foo_bar-enum'?: 'Success' | 'Warning' | 'Error' | 'ØÆÅ字符串';\n};\n\n/**\n * This is a model with one enum\n */\nexport type ModelWithEnum = {\n    /**\n     * This is a simple enum with strings\n     */\n    'foo_bar-enum'?: 'Success' | 'Warning' | 'Error' | 'ØÆÅ字符串';\n    /**\n     * These are the HTTP error code enums\n     */\n    statusCode?: '100' | '200 FOO' | '300 FOO_BAR' | '400 foo-bar' | '500 foo.bar' | '600 foo&bar';\n    /**\n     * Simple boolean enum\n     */\n    bool?: true;\n};\n\n/**\n * This is a model with one enum with escaped name\n */\nexport type ModelWithEnumWithHyphen = {\n    /**\n     * Foo-Bar-Baz-Qux\n     */\n    'foo-bar-baz-qux'?: '3.0';\n};\n\n/**\n * This is a model with one enum\n */\nexport type ModelWithEnumFromDescription = {\n    /**\n     * Success=1,Warning=2,Error=3\n     */\n    test?: number;\n};\n\n/**\n * This is a model with nested enums\n */\nexport type ModelWithNestedEnums = {\n    dictionaryWithEnum?: {\n        [key: string]: 'Success' | 'Warning' | 'Error';\n    };\n    dictionaryWithEnumFromDescription?: {\n        [key: string]: number;\n    };\n    arrayWithEnum?: Array<'Success' | 'Warning' | 'Error'>;\n    arrayWithDescription?: Array<number>;\n    /**\n     * This is a simple enum with strings\n     */\n    'foo_bar-enum'?: 'Success' | 'Warning' | 'Error' | 'ØÆÅ字符串';\n};\n\n/**\n * This is a model with one property containing a reference\n */\nexport type ModelWithReference = {\n    prop?: ModelWithProperties;\n};\n\n/**\n * This is a model with one property containing an array\n */\nexport type ModelWithArrayReadOnlyAndWriteOnly = {\n    prop?: Array<ModelWithReadOnlyAndWriteOnly>;\n    propWithFile?: Array<Blob | File>;\n    propWithNumber?: Array<number>;\n};\n\n/**\n * This is a model with one property containing an array\n */\nexport type ModelWithArray = {\n    prop?: Array<ModelWithString>;\n    propWithFile?: Array<Blob | File>;\n    propWithNumber?: Array<number>;\n};\n\n/**\n * This is a model with one property containing a dictionary\n */\nexport type ModelWithDictionary = {\n    prop?: {\n        [key: string]: string;\n    };\n};\n\n/**\n * This is a deprecated model with a deprecated property\n *\n * @deprecated\n */\nexport type DeprecatedModel = {\n    /**\n     * This is a deprecated property\n     *\n     * @deprecated\n     */\n    prop?: string;\n};\n\n/**\n * This is a model with one property containing a circular reference\n */\nexport type ModelWithCircularReference = {\n    prop?: ModelWithCircularReference;\n};\n\n/**\n * This is a model with one property with a 'one of' relationship\n */\nexport type CompositionWithOneOf = {\n    propA?: ModelWithString | ModelWithEnum | ModelWithArray | ModelWithDictionary;\n};\n\n/**\n * This is a model with one property with a 'one of' relationship where the options are not $ref\n */\nexport type CompositionWithOneOfAnonymous = {\n    propA?: {\n        propA?: string;\n    } | string | number;\n};\n\n/**\n * Circle\n */\nexport type ModelCircle = {\n    kind: string;\n    radius?: number;\n};\n\n/**\n * Square\n */\nexport type ModelSquare = {\n    kind: string;\n    sideLength?: number;\n};\n\n/**\n * This is a model with one property with a 'one of' relationship where the options are not $ref\n */\nexport type CompositionWithOneOfDiscriminator = ({\n    kind: 'circle';\n} & ModelCircle) | ({\n    kind: 'square';\n} & ModelSquare);\n\n/**\n * This is a model with one property with a 'any of' relationship\n */\nexport type CompositionWithAnyOf = {\n    propA?: ModelWithString | ModelWithEnum | ModelWithArray | ModelWithDictionary;\n};\n\n/**\n * This is a model with one property with a 'any of' relationship where the options are not $ref\n */\nexport type CompositionWithAnyOfAnonymous = {\n    propA?: {\n        propA?: string;\n    } | string | number;\n};\n\n/**\n * This is a model with nested 'any of' property with a type null\n */\nexport type CompositionWithNestedAnyAndTypeNull = {\n    propA?: Array<ModelWithDictionary | null> | Array<ModelWithArray | null>;\n};\n\nexport type _3eNum1Период = 'Bird' | 'Dog';\n\nexport type ConstValue = 'ConstValue';\n\n/**\n * This is a model with one property with a 'any of' relationship where the options are not $ref\n */\nexport type CompositionWithNestedAnyOfAndNull = {\n    propA?: Array<_3eNum1Период | ConstValue> | null;\n};\n\n/**\n * This is a model with one property with a 'one of' relationship\n */\nexport type CompositionWithOneOfAndNullable = {\n    propA?: {\n        boolean?: boolean;\n    } | ModelWithEnum | ModelWithArray | ModelWithDictionary | null;\n};\n\n/**\n * This is a model that contains a simple dictionary within composition\n */\nexport type CompositionWithOneOfAndSimpleDictionary = {\n    propA?: boolean | {\n        [key: string]: number;\n    };\n};\n\n/**\n * This is a model that contains a dictionary of simple arrays within composition\n */\nexport type CompositionWithOneOfAndSimpleArrayDictionary = {\n    propA?: boolean | {\n        [key: string]: Array<boolean>;\n    };\n};\n\n/**\n * This is a model that contains a dictionary of complex arrays (composited) within composition\n */\nexport type CompositionWithOneOfAndComplexArrayDictionary = {\n    propA?: boolean | {\n        [key: string]: Array<number | string>;\n    };\n};\n\n/**\n * This is a model with one property with a 'all of' relationship\n */\nexport type CompositionWithAllOfAndNullable = {\n    propA?: ({\n        boolean?: boolean;\n    } & ModelWithEnum & ModelWithArray & ModelWithDictionary) | null;\n};\n\n/**\n * This is a model with one property with a 'any of' relationship\n */\nexport type CompositionWithAnyOfAndNullable = {\n    propA?: {\n        boolean?: boolean;\n    } | ModelWithEnum | ModelWithArray | ModelWithDictionary | null;\n};\n\n/**\n * This is a base model with two simple optional properties\n */\nexport type CompositionBaseModel = {\n    firstName?: string;\n    lastname?: string;\n};\n\n/**\n * This is a model that extends the base model\n */\nexport type CompositionExtendedModel = CompositionBaseModel & {\n    age: number;\n    firstName: string;\n    lastname: string;\n};\n\n/**\n * This is a model with one nested property\n */\nexport type ModelWithProperties = {\n    required: string;\n    readonly requiredAndReadOnly: string;\n    requiredAndNullable: string | null;\n    string?: string;\n    number?: number;\n    boolean?: boolean;\n    reference?: ModelWithString;\n    'property with space'?: string;\n    default?: string;\n    try?: string;\n    readonly '@namespace.string'?: string;\n    readonly '@namespace.integer'?: number;\n};\n\n/**\n * This is a model with one nested property\n */\nexport type ModelWithNestedProperties = {\n    readonly first: {\n        readonly second: {\n            readonly third: string | null;\n        } | null;\n    } | null;\n};\n\n/**\n * This is a model with duplicated properties\n */\nexport type ModelWithDuplicateProperties = {\n    prop?: ModelWithString;\n};\n\n/**\n * This is a model with ordered properties\n */\nexport type ModelWithOrderedProperties = {\n    zebra?: string;\n    apple?: string;\n    hawaii?: string;\n};\n\n/**\n * This is a model with duplicated imports\n */\nexport type ModelWithDuplicateImports = {\n    propA?: ModelWithString;\n    propB?: ModelWithString;\n    propC?: ModelWithString;\n};\n\n/**\n * This is a model that extends another model\n */\nexport type ModelThatExtends = ModelWithString & {\n    propExtendsA?: string;\n    propExtendsB?: ModelWithString;\n};\n\n/**\n * This is a model that extends another model\n */\nexport type ModelThatExtendsExtends = ModelWithString & ModelThatExtends & {\n    propExtendsC?: string;\n    propExtendsD?: ModelWithString;\n};\n\n/**\n * This is a model that contains a some patterns\n */\nexport type ModelWithPattern = {\n    key: string;\n    name: string;\n    readonly enabled?: boolean;\n    readonly modified?: string;\n    id?: string;\n    text?: string;\n    patternWithSingleQuotes?: string;\n    patternWithNewline?: string;\n    patternWithBacktick?: string;\n    patternWithUnicode?: string;\n};\n\nexport type File = {\n    /**\n     * Id\n     */\n    readonly id?: string;\n    /**\n     * Updated at\n     */\n    readonly updated_at?: string;\n    /**\n     * Created at\n     */\n    readonly created_at?: string;\n    /**\n     * Mime\n     */\n    mime: string;\n    /**\n     * File\n     */\n    readonly file?: string;\n};\n\nexport type Default = {\n    name?: string;\n};\n\nexport type Pageable = {\n    page?: number;\n    size?: number;\n    sort?: Array<string>;\n};\n\n/**\n * This is a free-form object without additionalProperties.\n */\nexport type FreeFormObjectWithoutAdditionalProperties = {\n    [key: string]: unknown;\n};\n\n/**\n * This is a free-form object with additionalProperties: true.\n */\nexport type FreeFormObjectWithAdditionalPropertiesEqTrue = {\n    [key: string]: unknown;\n};\n\n/**\n * This is a free-form object with additionalProperties: {}.\n */\nexport type FreeFormObjectWithAdditionalPropertiesEqEmptyObject = {\n    [key: string]: unknown;\n};\n\nexport type ModelWithConst = {\n    String?: 'String';\n    number?: 0;\n    null?: unknown;\n    withType?: 'Some string';\n};\n\n/**\n * This is a model with one property and additionalProperties: true\n */\nexport type ModelWithAdditionalPropertiesEqTrue = {\n    /**\n     * This is a simple string property\n     */\n    prop?: string;\n    [key: string]: unknown;\n};\n\nexport type NestedAnyOfArraysNullable = {\n    nullableArray?: Array<string | boolean> | null;\n};\n\nexport type CompositionWithOneOfAndProperties = ({\n    foo: SimpleParameter;\n} | {\n    bar: NonAsciiStringæøåÆøÅöôêÊ字符串;\n}) & {\n    baz: number | null;\n    qux: number;\n};\n\n/**\n * An object that can be null\n */\nexport type NullableObject = {\n    foo?: string;\n} | null;\n\n/**\n * Some % character\n */\nexport type CharactersInDescription = string;\n\nexport type ModelWithNullableObject = {\n    data?: NullableObject;\n};\n\n/**\n * An object with additional properties that can be null\n */\nexport type ModelWithAdditionalPropertiesRef = {\n    [key: string]: NullableObject | null;\n};\n\nexport type ModelWithOneOfEnum = {\n    foo: 'Bar';\n} | {\n    foo: 'Baz';\n} | {\n    foo: 'Qux';\n} | {\n    content: string;\n    foo: 'Quux';\n} | {\n    content: [\n        string,\n        string\n    ];\n    foo: 'Corge';\n};\n\nexport type ModelWithNestedArrayEnumsDataFoo = 'foo' | 'bar';\n\nexport type ModelWithNestedArrayEnumsDataBar = 'baz' | 'qux';\n\nexport type ModelWithNestedArrayEnumsData = {\n    foo?: Array<ModelWithNestedArrayEnumsDataFoo>;\n    bar?: Array<ModelWithNestedArrayEnumsDataBar>;\n};\n\nexport type ModelWithNestedArrayEnums = {\n    array_strings?: Array<string>;\n    data?: ModelWithNestedArrayEnumsData;\n};\n\nexport type ModelWithNestedCompositionEnums = {\n    foo?: ModelWithNestedArrayEnumsDataFoo;\n};\n\nexport type ModelWithReadOnlyAndWriteOnly = {\n    foo: string;\n    readonly bar: string;\n};\n\nexport type ModelWithConstantSizeArray = [\n    number,\n    number\n];\n\nexport type ModelWithAnyOfConstantSizeArray = [\n    number | string,\n    number | string,\n    number | string\n];\n\nexport type ModelWithPrefixItemsConstantSizeArray = Array<ModelWithInteger | number | string>;\n\nexport type ModelWithAnyOfConstantSizeArrayNullable = [\n    number | null | string,\n    number | null | string,\n    number | null | string\n];\n\nexport type ModelWithAnyOfConstantSizeArrayWithNSizeAndOptions = [\n    number | Import,\n    number | Import\n];\n\nexport type ModelWithAnyOfConstantSizeArrayAndIntersect = [\n    number & string,\n    number & string\n];\n\nexport type ModelWithNumericEnumUnion = {\n    /**\n     * Период\n     */\n    value?: -10 | -1 | 0 | 1 | 3 | 6 | 12;\n};\n\n/**\n * Some description with `back ticks`\n */\nexport type ModelWithBackticksInDescription = {\n    /**\n     * The template `that` should be used for parsing and importing the contents of the CSV file.\n     *\n     * <br/><p>There is one placeholder currently supported:<ul>     <li><b>${x}</b> - refers to the n-th column in the CSV file, e.g. ${1}, ${2}, ...)</li></ul><p>Example of a correct JSON template:</p>\n     * <pre>\n     * [\n     * {\n     * \"resourceType\": \"Asset\",\n     * \"identifier\": {\n     * \"name\": \"${1}\",\n     * \"domain\": {\n     * \"name\": \"${2}\",\n     * \"community\": {\n     * \"name\": \"Some Community\"\n     * }\n     * }\n     * },\n     * \"attributes\" : {\n     * \"00000000-0000-0000-0000-000000003115\" : [ {\n     * \"value\" : \"${3}\"\n     * } ],\n     * \"00000000-0000-0000-0000-000000000222\" : [ {\n     * \"value\" : \"${4}\"\n     * } ]\n     * }\n     * }\n     * ]\n     * </pre>\n     */\n    template?: string;\n};\n\nexport type ModelWithOneOfAndProperties = (SimpleParameter | NonAsciiStringæøåÆøÅöôêÊ字符串) & {\n    baz: number | null;\n    qux: number;\n};\n\n/**\n * Model used to test deduplication strategy (unused)\n */\nexport type ParameterSimpleParameterUnused = string;\n\n/**\n * Model used to test deduplication strategy\n */\nexport type PostServiceWithEmptyTagResponse = string;\n\n/**\n * Model used to test deduplication strategy\n */\nexport type PostServiceWithEmptyTagResponse2 = string;\n\n/**\n * Model used to test deduplication strategy\n */\nexport type DeleteFooData = string;\n\n/**\n * Model used to test deduplication strategy\n */\nexport type DeleteFooData2 = string;\n\n/**\n * Model with restricted keyword name\n */\nexport type Import = string;\n\nexport type SchemaWithFormRestrictedKeys = {\n    description?: string;\n    'x-enum-descriptions'?: string;\n    'x-enum-varnames'?: string;\n    'x-enumNames'?: string;\n    title?: string;\n    object?: {\n        description?: string;\n        'x-enum-descriptions'?: string;\n        'x-enum-varnames'?: string;\n        'x-enumNames'?: string;\n        title?: string;\n    };\n    array?: Array<{\n        description?: string;\n        'x-enum-descriptions'?: string;\n        'x-enum-varnames'?: string;\n        'x-enumNames'?: string;\n        title?: string;\n    }>;\n};\n\n/**\n * This schema was giving PascalCase transformations a hard time\n */\nexport type IoK8sApimachineryPkgApisMetaV1DeleteOptions = {\n    /**\n     * Must be fulfilled before a deletion is carried out. If not possible, a 409 Conflict status will be returned.\n     */\n    preconditions?: IoK8sApimachineryPkgApisMetaV1Preconditions;\n};\n\n/**\n * This schema was giving PascalCase transformations a hard time\n */\nexport type IoK8sApimachineryPkgApisMetaV1Preconditions = {\n    /**\n     * Specifies the target ResourceVersion\n     */\n    resourceVersion?: string;\n    /**\n     * Specifies the target UID.\n     */\n    uid?: string;\n};\n\nexport type AdditionalPropertiesUnknownIssue = {\n    [key: string]: string | number;\n};\n\nexport type AdditionalPropertiesUnknownIssue2 = {\n    [key: string]: string | number;\n};\n\nexport type AdditionalPropertiesUnknownIssue3 = string & {\n    entries: {\n        [key: string]: AdditionalPropertiesUnknownIssue;\n    };\n};\n\nexport type AdditionalPropertiesIntegerIssue = {\n    value: number;\n    [key: string]: number;\n};\n\nexport type OneOfAllOfIssue = ((ConstValue | GenericSchemaDuplicateIssue1SystemBoolean) & _3eNum1Период) | GenericSchemaDuplicateIssue1SystemString;\n\nexport type GenericSchemaDuplicateIssue1SystemBoolean = {\n    item?: boolean;\n    error?: string | null;\n    readonly hasError?: boolean;\n    data?: {\n        [key: string]: never;\n    };\n};\n\nexport type GenericSchemaDuplicateIssue1SystemString = {\n    item?: string | null;\n    error?: string | null;\n    readonly hasError?: boolean;\n};\n\nexport type ExternalSharedModel = {\n    id: string;\n    name?: string;\n};\n\n/**\n * This is a model with one property containing a reference\n */\nexport type ModelWithReferenceWritable = {\n    prop?: ModelWithPropertiesWritable;\n};\n\n/**\n * This is a model with one property containing an array\n */\nexport type ModelWithArrayReadOnlyAndWriteOnlyWritable = {\n    prop?: Array<ModelWithReadOnlyAndWriteOnlyWritable>;\n    propWithFile?: Array<Blob | File>;\n    propWithNumber?: Array<number>;\n};\n\n/**\n * This is a model with one nested property\n */\nexport type ModelWithPropertiesWritable = {\n    required: string;\n    requiredAndNullable: string | null;\n    string?: string;\n    number?: number;\n    boolean?: boolean;\n    reference?: ModelWithString;\n    'property with space'?: string;\n    default?: string;\n    try?: string;\n};\n\n/**\n * This is a model that contains a some patterns\n */\nexport type ModelWithPatternWritable = {\n    key: string;\n    name: string;\n    id?: string;\n    text?: string;\n    patternWithSingleQuotes?: string;\n    patternWithNewline?: string;\n    patternWithBacktick?: string;\n    patternWithUnicode?: string;\n};\n\nexport type FileWritable = {\n    /**\n     * Mime\n     */\n    mime: string;\n};\n\nexport type ModelWithReadOnlyAndWriteOnlyWritable = {\n    foo: string;\n    baz: string;\n};\n\nexport type ModelWithAnyOfConstantSizeArrayWithNSizeAndOptionsWritable = [\n    number | Import,\n    number | Import\n];\n\nexport type AdditionalPropertiesUnknownIssueWritable = {\n    [key: string]: string | number;\n};\n\nexport type OneOfAllOfIssueWritable = ((ConstValue | GenericSchemaDuplicateIssue1SystemBoolean) & _3eNum1Период) | GenericSchemaDuplicateIssue1SystemString;\n\nexport type GenericSchemaDuplicateIssue1SystemBooleanWritable = {\n    item?: boolean;\n    error?: string | null;\n    data?: {\n        [key: string]: never;\n    };\n};\n\nexport type GenericSchemaDuplicateIssue1SystemStringWritable = {\n    item?: string | null;\n    error?: string | null;\n};\n\n/**\n * This is a reusable parameter\n */\nexport type SimpleParameter = string;\n\n/**\n * Parameter with illegal characters\n */\nexport type XFooBar = ModelWithString;\n\nexport type SimpleRequestBody = ModelWithString;\n\nexport type SimpleFormData = ModelWithString;\n\nexport type ExportData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no+tag';\n};\n\nexport type PatchApiVbyApiVersionNoTagData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no+tag';\n};\n\nexport type PatchApiVbyApiVersionNoTagResponses = {\n    /**\n     * OK\n     */\n    default: unknown;\n};\n\nexport type ImportData = {\n    body: ModelWithReadOnlyAndWriteOnlyWritable | ModelWithArrayReadOnlyAndWriteOnlyWritable;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no+tag';\n};\n\nexport type ImportResponses = {\n    /**\n     * Success\n     */\n    200: ModelFromZendesk;\n    /**\n     * Default success response\n     */\n    default: ModelWithReadOnlyAndWriteOnly;\n};\n\nexport type ImportResponse = ImportResponses[keyof ImportResponses];\n\nexport type FooWowData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no+tag';\n};\n\nexport type FooWowResponses = {\n    /**\n     * OK\n     */\n    default: unknown;\n};\n\nexport type ApiVVersionODataControllerCountData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple/$count';\n};\n\nexport type ApiVVersionODataControllerCountResponses = {\n    /**\n     * Success\n     */\n    200: ModelFromZendesk;\n};\n\nexport type ApiVVersionODataControllerCountResponse = ApiVVersionODataControllerCountResponses[keyof ApiVVersionODataControllerCountResponses];\n\nexport type GetApiVbyApiVersionSimpleOperationData = {\n    body?: never;\n    path: {\n        /**\n         * foo in method\n         */\n        foo_param: string;\n    };\n    query?: never;\n    url: '/api/v{api-version}/simple:operation';\n};\n\nexport type GetApiVbyApiVersionSimpleOperationErrors = {\n    /**\n     * Default error response\n     */\n    default: ModelWithBoolean;\n};\n\nexport type GetApiVbyApiVersionSimpleOperationError = GetApiVbyApiVersionSimpleOperationErrors[keyof GetApiVbyApiVersionSimpleOperationErrors];\n\nexport type GetApiVbyApiVersionSimpleOperationResponses = {\n    /**\n     * Response is a simple number\n     */\n    200: number;\n};\n\nexport type GetApiVbyApiVersionSimpleOperationResponse = GetApiVbyApiVersionSimpleOperationResponses[keyof GetApiVbyApiVersionSimpleOperationResponses];\n\nexport type DeleteCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type GetCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type HeadCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type OptionsCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type PatchCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type PostCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type PutCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type DeleteFooData3 = {\n    body?: never;\n    headers: {\n        /**\n         * Parameter with illegal characters\n         */\n        'x-Foo-Bar': ModelWithString;\n    };\n    path: {\n        /**\n         * foo in method\n         */\n        foo_param: string;\n        /**\n         * bar in method\n         */\n        BarParam: string;\n    };\n    query?: never;\n    url: '/api/v{api-version}/foo/{foo_param}/bar/{BarParam}';\n};\n\nexport type CallWithDescriptionsData = {\n    body?: never;\n    path?: never;\n    query?: {\n        /**\n         * Testing multiline comments in string: First line\n         * Second line\n         *\n         * Fourth line\n         */\n        parameterWithBreaks?: string;\n        /**\n         * Testing backticks in string: `backticks` and ```multiple backticks``` should work\n         */\n        parameterWithBackticks?: string;\n        /**\n         * Testing slashes in string: \\backwards\\\\\\ and /forwards/// should work\n         */\n        parameterWithSlashes?: string;\n        /**\n         * Testing expression placeholders in string: ${expression} should work\n         */\n        parameterWithExpressionPlaceholders?: string;\n        /**\n         * Testing quotes in string: 'single quote''' and \"double quotes\"\"\" should work\n         */\n        parameterWithQuotes?: string;\n        /**\n         * Testing reserved characters in string: * inline * and ** inline ** should work\n         */\n        parameterWithReservedCharacters?: string;\n    };\n    url: '/api/v{api-version}/descriptions';\n};\n\nexport type DeprecatedCallData = {\n    body?: never;\n    headers: {\n        /**\n         * This parameter is deprecated\n         *\n         * @deprecated\n         */\n        parameter: DeprecatedModel | null;\n    };\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/parameters/deprecated';\n};\n\nexport type CallWithParametersData = {\n    /**\n     * This is the parameter that goes into the body\n     */\n    body: {\n        [key: string]: unknown;\n    } | null;\n    headers: {\n        /**\n         * This is the parameter that goes into the header\n         */\n        parameterHeader: string | null;\n    };\n    path: {\n        /**\n         * This is the parameter that goes into the path\n         */\n        parameterPath: string | null;\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string | null;\n    };\n    query: {\n        foo_ref_enum?: ModelWithNestedArrayEnumsDataFoo;\n        foo_all_of_enum: ModelWithNestedArrayEnumsDataFoo;\n        /**\n         * This is the parameter that goes into the query params\n         */\n        cursor: string | null;\n    };\n    url: '/api/v{api-version}/parameters/{parameterPath}';\n};\n\nexport type CallWithWeirdParameterNamesData = {\n    /**\n     * This is the parameter that goes into the body\n     */\n    body: ModelWithString | null;\n    headers: {\n        /**\n         * This is the parameter that goes into the request header\n         */\n        'parameter.header': string | null;\n    };\n    path: {\n        /**\n         * This is the parameter that goes into the path\n         */\n        'parameter.path.1'?: string;\n        /**\n         * This is the parameter that goes into the path\n         */\n        'parameter-path-2'?: string;\n        /**\n         * This is the parameter that goes into the path\n         */\n        'PARAMETER-PATH-3'?: string;\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string | null;\n    };\n    query: {\n        /**\n         * This is the parameter with a reserved keyword\n         */\n        default?: string;\n        /**\n         * This is the parameter that goes into the request query params\n         */\n        'parameter-query': string | null;\n    };\n    url: '/api/v{api-version}/parameters/{parameter.path.1}/{parameter-path-2}/{PARAMETER-PATH-3}';\n};\n\nexport type GetCallWithOptionalParamData = {\n    /**\n     * This is a required parameter\n     */\n    body: ModelWithOneOfEnum;\n    path?: never;\n    query?: {\n        /**\n         * This is an optional parameter\n         */\n        page?: number;\n    };\n    url: '/api/v{api-version}/parameters';\n};\n\nexport type PostCallWithOptionalParamData = {\n    /**\n     * This is an optional parameter\n     */\n    body?: {\n        offset?: number | null;\n    };\n    path?: never;\n    query: {\n        /**\n         * This is a required parameter\n         */\n        parameter: Pageable;\n    };\n    url: '/api/v{api-version}/parameters';\n};\n\nexport type PostCallWithOptionalParamResponses = {\n    /**\n     * Response is a simple number\n     */\n    200: number;\n    /**\n     * Success\n     */\n    204: void;\n};\n\nexport type PostCallWithOptionalParamResponse = PostCallWithOptionalParamResponses[keyof PostCallWithOptionalParamResponses];\n\nexport type PostApiVbyApiVersionRequestBodyData = {\n    /**\n     * A reusable request body\n     */\n    body?: SimpleRequestBody;\n    path?: never;\n    query?: {\n        /**\n         * This is a reusable parameter\n         */\n        parameter?: string;\n    };\n    url: '/api/v{api-version}/requestBody';\n};\n\nexport type PostApiVbyApiVersionFormDataData = {\n    /**\n     * A reusable request body\n     */\n    body?: SimpleFormData;\n    path?: never;\n    query?: {\n        /**\n         * This is a reusable parameter\n         */\n        parameter?: string;\n    };\n    url: '/api/v{api-version}/formData';\n};\n\nexport type CallWithDefaultParametersData = {\n    body?: never;\n    path?: never;\n    query?: {\n        /**\n         * This is a simple string with default value\n         */\n        parameterString?: string | null;\n        /**\n         * This is a simple number with default value\n         */\n        parameterNumber?: number | null;\n        /**\n         * This is a simple boolean with default value\n         */\n        parameterBoolean?: boolean | null;\n        /**\n         * This is a simple enum with default value\n         */\n        parameterEnum?: 'Success' | 'Warning' | 'Error';\n        /**\n         * This is a simple model with default value\n         */\n        parameterModel?: ModelWithString | null;\n    };\n    url: '/api/v{api-version}/defaults';\n};\n\nexport type CallWithDefaultOptionalParametersData = {\n    body?: never;\n    path?: never;\n    query?: {\n        /**\n         * This is a simple string that is optional with default value\n         */\n        parameterString?: string;\n        /**\n         * This is a simple number that is optional with default value\n         */\n        parameterNumber?: number;\n        /**\n         * This is a simple boolean that is optional with default value\n         */\n        parameterBoolean?: boolean;\n        /**\n         * This is a simple enum that is optional with default value\n         */\n        parameterEnum?: 'Success' | 'Warning' | 'Error';\n        /**\n         * This is a simple model that is optional with default value\n         */\n        parameterModel?: ModelWithString;\n    };\n    url: '/api/v{api-version}/defaults';\n};\n\nexport type CallToTestOrderOfParamsData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * This is a optional string with default\n         */\n        parameterOptionalStringWithDefault?: string;\n        /**\n         * This is a optional string with empty default\n         */\n        parameterOptionalStringWithEmptyDefault?: string;\n        /**\n         * This is a optional string with no default\n         */\n        parameterOptionalStringWithNoDefault?: string;\n        /**\n         * This is a string with default\n         */\n        parameterStringWithDefault: string;\n        /**\n         * This is a string with empty default\n         */\n        parameterStringWithEmptyDefault: string;\n        /**\n         * This is a string with no default\n         */\n        parameterStringWithNoDefault: string;\n        /**\n         * This is a string that can be null with no default\n         */\n        parameterStringNullableWithNoDefault?: string | null;\n        /**\n         * This is a string that can be null with default\n         */\n        parameterStringNullableWithDefault?: string | null;\n    };\n    url: '/api/v{api-version}/defaults';\n};\n\nexport type DuplicateNameData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/duplicate';\n};\n\nexport type DuplicateName2Data = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/duplicate';\n};\n\nexport type DuplicateName3Data = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/duplicate';\n};\n\nexport type DuplicateName4Data = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/duplicate';\n};\n\nexport type CallWithNoContentResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no-content';\n};\n\nexport type CallWithNoContentResponseResponses = {\n    /**\n     * Success\n     */\n    204: void;\n};\n\nexport type CallWithNoContentResponseResponse = CallWithNoContentResponseResponses[keyof CallWithNoContentResponseResponses];\n\nexport type CallWithResponseAndNoContentResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multiple-tags/response-and-no-content';\n};\n\nexport type CallWithResponseAndNoContentResponseResponses = {\n    /**\n     * Response is a simple number\n     */\n    200: number;\n    /**\n     * Success\n     */\n    204: void;\n};\n\nexport type CallWithResponseAndNoContentResponseResponse = CallWithResponseAndNoContentResponseResponses[keyof CallWithResponseAndNoContentResponseResponses];\n\nexport type DummyAData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multiple-tags/a';\n};\n\nexport type DummyAResponses = {\n    200: _400;\n};\n\nexport type DummyAResponse = DummyAResponses[keyof DummyAResponses];\n\nexport type DummyBData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multiple-tags/b';\n};\n\nexport type DummyBResponses = {\n    /**\n     * Success\n     */\n    204: void;\n};\n\nexport type DummyBResponse = DummyBResponses[keyof DummyBResponses];\n\nexport type CallWithResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/response';\n};\n\nexport type CallWithResponseResponses = {\n    default: Import;\n};\n\nexport type CallWithResponseResponse = CallWithResponseResponses[keyof CallWithResponseResponses];\n\nexport type CallWithDuplicateResponsesData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/response';\n};\n\nexport type CallWithDuplicateResponsesErrors = {\n    /**\n     * Message for 500 error\n     */\n    500: ModelWithStringError;\n    /**\n     * Message for 501 error\n     */\n    501: ModelWithStringError;\n    /**\n     * Message for 502 error\n     */\n    502: ModelWithStringError;\n    /**\n     * Message for 4XX errors\n     */\n    '4XX': DictionaryWithArray;\n    /**\n     * Default error response\n     */\n    default: ModelWithBoolean;\n};\n\nexport type CallWithDuplicateResponsesError = CallWithDuplicateResponsesErrors[keyof CallWithDuplicateResponsesErrors];\n\nexport type CallWithDuplicateResponsesResponses = {\n    /**\n     * Message for 200 response\n     */\n    200: ModelWithBoolean & ModelWithInteger;\n    /**\n     * Message for 201 response\n     */\n    201: ModelWithString;\n    /**\n     * Message for 202 response\n     */\n    202: ModelWithString;\n};\n\nexport type CallWithDuplicateResponsesResponse = CallWithDuplicateResponsesResponses[keyof CallWithDuplicateResponsesResponses];\n\nexport type CallWithResponsesData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/response';\n};\n\nexport type CallWithResponsesErrors = {\n    /**\n     * Message for 500 error\n     */\n    500: ModelWithStringError;\n    /**\n     * Message for 501 error\n     */\n    501: ModelWithStringError;\n    /**\n     * Message for 502 error\n     */\n    502: ModelWithStringError;\n    /**\n     * Message for default response\n     */\n    default: ModelWithStringError;\n};\n\nexport type CallWithResponsesError = CallWithResponsesErrors[keyof CallWithResponsesErrors];\n\nexport type CallWithResponsesResponses = {\n    /**\n     * Message for 200 response\n     */\n    200: {\n        readonly '@namespace.string'?: string;\n        readonly '@namespace.integer'?: number;\n        readonly value?: Array<ModelWithString>;\n    };\n    /**\n     * Message for 201 response\n     */\n    201: ModelThatExtends;\n    /**\n     * Message for 202 response\n     */\n    202: ModelThatExtendsExtends;\n};\n\nexport type CallWithResponsesResponse = CallWithResponsesResponses[keyof CallWithResponsesResponses];\n\nexport type CollectionFormatData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * This is an array parameter that is sent as csv format (comma-separated values)\n         */\n        parameterArrayCSV: Array<string> | null;\n        /**\n         * This is an array parameter that is sent as ssv format (space-separated values)\n         */\n        parameterArraySSV: Array<string> | null;\n        /**\n         * This is an array parameter that is sent as tsv format (tab-separated values)\n         */\n        parameterArrayTSV: Array<string> | null;\n        /**\n         * This is an array parameter that is sent as pipes format (pipe-separated values)\n         */\n        parameterArrayPipes: Array<string> | null;\n        /**\n         * This is an array parameter that is sent as multi format (multiple parameter instances)\n         */\n        parameterArrayMulti: Array<string> | null;\n    };\n    url: '/api/v{api-version}/collectionFormat';\n};\n\nexport type TypesData = {\n    body?: never;\n    path?: {\n        /**\n         * This is a number parameter\n         */\n        id?: number;\n    };\n    query: {\n        /**\n         * This is a number parameter\n         */\n        parameterNumber: number;\n        /**\n         * This is a string parameter\n         */\n        parameterString: string | null;\n        /**\n         * This is a boolean parameter\n         */\n        parameterBoolean: boolean | null;\n        /**\n         * This is an object parameter\n         */\n        parameterObject: {\n            [key: string]: unknown;\n        } | null;\n        /**\n         * This is an array parameter\n         */\n        parameterArray: Array<string> | null;\n        /**\n         * This is a dictionary parameter\n         */\n        parameterDictionary: {\n            [key: string]: unknown;\n        } | null;\n        /**\n         * This is an enum parameter\n         */\n        parameterEnum: 'Success' | 'Warning' | 'Error';\n    };\n    url: '/api/v{api-version}/types';\n};\n\nexport type TypesResponses = {\n    /**\n     * Response is a simple number\n     */\n    200: number;\n    /**\n     * Response is a simple string\n     */\n    201: string;\n    /**\n     * Response is a simple boolean\n     */\n    202: boolean;\n    /**\n     * Response is a simple object\n     */\n    203: {\n        [key: string]: unknown;\n    };\n};\n\nexport type TypesResponse = TypesResponses[keyof TypesResponses];\n\nexport type UploadFileData = {\n    body: Blob | File;\n    path: {\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string | null;\n    };\n    query?: never;\n    url: '/api/v{api-version}/upload';\n};\n\nexport type UploadFileResponses = {\n    200: boolean;\n};\n\nexport type UploadFileResponse = UploadFileResponses[keyof UploadFileResponses];\n\nexport type FileResponseData = {\n    body?: never;\n    path: {\n        id: string;\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string;\n    };\n    query?: never;\n    url: '/api/v{api-version}/file/{id}';\n};\n\nexport type FileResponseResponses = {\n    /**\n     * Success\n     */\n    200: Blob | File;\n};\n\nexport type FileResponseResponse = FileResponseResponses[keyof FileResponseResponses];\n\nexport type ComplexTypesData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * Parameter containing object\n         */\n        parameterObject: {\n            first?: {\n                second?: {\n                    third?: string;\n                };\n            };\n        };\n        /**\n         * Parameter containing reference\n         */\n        parameterReference: ModelWithString;\n    };\n    url: '/api/v{api-version}/complex';\n};\n\nexport type ComplexTypesErrors = {\n    /**\n     * 400 `server` error\n     */\n    400: unknown;\n    /**\n     * 500 server error\n     */\n    500: unknown;\n};\n\nexport type ComplexTypesResponses = {\n    /**\n     * Successful response\n     */\n    200: Array<ModelWithString>;\n};\n\nexport type ComplexTypesResponse = ComplexTypesResponses[keyof ComplexTypesResponses];\n\nexport type MultipartResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multipart';\n};\n\nexport type MultipartResponseResponses = {\n    /**\n     * OK\n     */\n    200: {\n        file?: Blob | File;\n        metadata?: {\n            foo?: string;\n            bar?: string;\n        };\n    };\n};\n\nexport type MultipartResponseResponse = MultipartResponseResponses[keyof MultipartResponseResponses];\n\nexport type MultipartRequestData = {\n    body?: {\n        content?: Blob | File;\n        data?: ModelWithString | null;\n    };\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multipart';\n};\n\nexport type ComplexParamsData = {\n    body?: {\n        readonly key: string | null;\n        name: string | null;\n        enabled?: boolean;\n        type: 'Monkey' | 'Horse' | 'Bird';\n        listOfModels?: Array<ModelWithString> | null;\n        listOfStrings?: Array<string> | null;\n        parameters: ModelWithString | ModelWithEnum | ModelWithArray | ModelWithDictionary;\n        readonly user?: {\n            readonly id?: number;\n            readonly name?: string | null;\n        };\n    };\n    path: {\n        id: number;\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string;\n    };\n    query?: never;\n    url: '/api/v{api-version}/complex/{id}';\n};\n\nexport type ComplexParamsResponses = {\n    /**\n     * Success\n     */\n    200: ModelWithString;\n};\n\nexport type ComplexParamsResponse = ComplexParamsResponses[keyof ComplexParamsResponses];\n\nexport type CallWithResultFromHeaderData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/header';\n};\n\nexport type CallWithResultFromHeaderErrors = {\n    /**\n     * 400 server error\n     */\n    400: unknown;\n    /**\n     * 500 server error\n     */\n    500: unknown;\n};\n\nexport type CallWithResultFromHeaderResponses = {\n    /**\n     * Successful response\n     */\n    200: unknown;\n};\n\nexport type TestErrorCodeData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * Status code to return\n         */\n        status: number;\n    };\n    url: '/api/v{api-version}/error';\n};\n\nexport type TestErrorCodeErrors = {\n    /**\n     * Custom message: Internal Server Error\n     */\n    500: unknown;\n    /**\n     * Custom message: Not Implemented\n     */\n    501: unknown;\n    /**\n     * Custom message: Bad Gateway\n     */\n    502: unknown;\n    /**\n     * Custom message: Service Unavailable\n     */\n    503: unknown;\n};\n\nexport type TestErrorCodeResponses = {\n    /**\n     * Custom message: Successful response\n     */\n    200: unknown;\n};\n\nexport type NonAsciiæøåÆøÅöôêÊ字符串Data = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * Dummy input param\n         */\n        nonAsciiParamæøåÆØÅöôêÊ: number;\n    };\n    url: '/api/v{api-version}/non-ascii-æøåÆØÅöôêÊ字符串';\n};\n\nexport type NonAsciiæøåÆøÅöôêÊ字符串Responses = {\n    /**\n     * Successful response\n     */\n    200: Array<NonAsciiStringæøåÆøÅöôêÊ字符串>;\n};\n\nexport type NonAsciiæøåÆøÅöôêÊ字符串Response = NonAsciiæøåÆøÅöôêÊ字符串Responses[keyof NonAsciiæøåÆøÅöôêÊ字符串Responses];\n\nexport type PutWithFormUrlEncodedData = {\n    body: ArrayWithStrings;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/non-ascii-æøåÆØÅöôêÊ字符串';\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/angular-query-experimental/asClass/@tanstack/angular-query-experimental.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport { type DefaultError, type MutationOptions, queryOptions } from '@tanstack/angular-query-experimental';\n\nimport { client } from '../client.gen';\nimport { BarBazService, BarService, FooBazService, FooService, type Options } from '../sdk.gen';\nimport type { FooBarPostData, FooBarPostResponse, FooBarPutData, FooBarPutResponse, FooPostData, FooPostResponse, FooPutData, FooPutResponse, GetFooBarData, GetFooBarResponse, GetFooData, GetFooResponse } from '../types.gen';\n\nexport type QueryKey<TOptions extends Options> = [\n    Pick<TOptions, 'baseUrl' | 'body' | 'headers' | 'path' | 'query'> & {\n        _id: string;\n        _infinite?: boolean;\n        tags?: ReadonlyArray<string>;\n    }\n];\n\nconst createQueryKey = <TOptions extends Options>(id: string, options?: TOptions, infinite?: boolean, tags?: ReadonlyArray<string>): [\n    QueryKey<TOptions>[0]\n] => {\n    const params: QueryKey<TOptions>[0] = { _id: id, baseUrl: options?.baseUrl || (options?.client ?? client).getConfig().baseUrl } as QueryKey<TOptions>[0];\n    if (infinite) {\n        params._infinite = infinite;\n    }\n    if (tags) {\n        params.tags = tags;\n    }\n    if (options?.body) {\n        params.body = options.body;\n    }\n    if (options?.headers) {\n        params.headers = options.headers;\n    }\n    if (options?.path) {\n        params.path = options.path;\n    }\n    if (options?.query) {\n        params.query = options.query;\n    }\n    return [params];\n};\n\nexport const getFooQueryKey = (options?: Options<GetFooData>) => createQueryKey('getFoo', options);\n\nexport const getFooOptions = (options?: Options<GetFooData>) => queryOptions<GetFooResponse, DefaultError, GetFooResponse, ReturnType<typeof getFooQueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await FooBazService.getFoo({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: getFooQueryKey(options)\n});\n\nexport const fooPostMutation = (options?: Partial<Options<FooPostData>>): MutationOptions<FooPostResponse, DefaultError, Options<FooPostData>> => {\n    const mutationOptions: MutationOptions<FooPostResponse, DefaultError, Options<FooPostData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await FooService.post({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const fooPutMutation = (options?: Partial<Options<FooPutData>>): MutationOptions<FooPutResponse, DefaultError, Options<FooPutData>> => {\n    const mutationOptions: MutationOptions<FooPutResponse, DefaultError, Options<FooPutData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await FooService.put({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const getFooBarQueryKey = (options?: Options<GetFooBarData>) => createQueryKey('getFooBar', options);\n\nexport const getFooBarOptions = (options?: Options<GetFooBarData>) => queryOptions<GetFooBarResponse, DefaultError, GetFooBarResponse, ReturnType<typeof getFooBarQueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await BarBazService.getFooBar({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: getFooBarQueryKey(options)\n});\n\nexport const fooBarPostMutation = (options?: Partial<Options<FooBarPostData>>): MutationOptions<FooBarPostResponse, DefaultError, Options<FooBarPostData>> => {\n    const mutationOptions: MutationOptions<FooBarPostResponse, DefaultError, Options<FooBarPostData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await BarService.post({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const fooBarPutMutation = (options?: Partial<Options<FooBarPutData>>): MutationOptions<FooBarPutResponse, DefaultError, Options<FooBarPutData>> => {\n    const mutationOptions: MutationOptions<FooBarPutResponse, DefaultError, Options<FooBarPutData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await BarService.put({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/angular-query-experimental/asClass/client/client.gen.ts",
    "content": "// 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 (options: RequestOptions) => {\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 url = buildUrl(opts);\n\n    return { opts, url };\n  };\n\n  const request: Client['request'] = async (options) => {\n    // @ts-expect-error\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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/angular-query-experimental/asClass/client/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type { Auth } from '../core/auth.gen';\nexport type { QuerySerializerOptions } from '../core/bodySerializer.gen';\nexport {\n  formDataBodySerializer,\n  jsonBodySerializer,\n  urlSearchParamsBodySerializer,\n} from '../core/bodySerializer.gen';\nexport { buildClientParams } from '../core/params.gen';\nexport { serializeQueryKeyValue } from '../core/queryKeySerializer.gen';\nexport { createClient } from './client.gen';\nexport type {\n  Client,\n  ClientOptions,\n  Config,\n  CreateClientConfig,\n  Options,\n  RequestOptions,\n  RequestResult,\n  ResolvedRequestOptions,\n  ResponseStyle,\n  TDataShape,\n} from './types.gen';\nexport { createConfig, mergeHeaders } from './utils.gen';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/angular-query-experimental/asClass/client/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { Auth } from '../core/auth.gen';\nimport type {\n  ServerSentEventsOptions,\n  ServerSentEventsResult,\n} from '../core/serverSentEvents.gen';\nimport type { Client as CoreClient, Config as CoreConfig } from '../core/types.gen';\nimport type { Middleware } from './utils.gen';\n\nexport type ResponseStyle = 'data' | 'fields';\n\nexport interface Config<T extends ClientOptions = ClientOptions>\n  extends Omit<RequestInit, 'body' | 'headers' | 'method'>, CoreConfig {\n  /**\n   * Base URL for all requests made by this client.\n   */\n  baseUrl?: T['baseUrl'];\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   * Please don't use the Fetch client for Next.js applications. The `next`\n   * options won't have any effect.\n   *\n   * Install {@link https://www.npmjs.com/package/@hey-api/client-next `@hey-api/client-next`} instead.\n   */\n  next?: never;\n  /**\n   * Return the response data parsed in a specified format. By default, `auto`\n   * will infer the appropriate method from the `Content-Type` response header.\n   * You can override this behavior with any of the {@link Body} methods.\n   * Select `stream` if you don't want to parse response data at all.\n   *\n   * @default 'auto'\n   */\n  parseAs?: 'arrayBuffer' | 'auto' | 'blob' | 'formData' | 'json' | 'stream' | 'text';\n  /**\n   * Should we return only data or multiple fields (data, error, response, etc.)?\n   *\n   * @default 'fields'\n   */\n  responseStyle?: ResponseStyle;\n  /**\n   * Throw an error instead of returning it in the response?\n   *\n   * @default false\n   */\n  throwOnError?: T['throwOnError'];\n}\n\nexport interface RequestOptions<\n  TData = unknown,\n  TResponseStyle extends ResponseStyle = 'fields',\n  ThrowOnError extends boolean = boolean,\n  Url extends string = string,\n>\n  extends\n    Config<{\n      responseStyle: TResponseStyle;\n      throwOnError: ThrowOnError;\n    }>,\n    Pick<\n      ServerSentEventsOptions<TData>,\n      | 'onRequest'\n      | 'onSseError'\n      | 'onSseEvent'\n      | 'sseDefaultRetryDelay'\n      | 'sseMaxRetryAttempts'\n      | 'sseMaxRetryDelay'\n    > {\n  /**\n   * Any body that you want to add to your request.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/fetch#body}\n   */\n  body?: unknown;\n  path?: Record<string, unknown>;\n  query?: Record<string, unknown>;\n  /**\n   * Security mechanism(s) to use for the request.\n   */\n  security?: ReadonlyArray<Auth>;\n  url: Url;\n}\n\nexport interface ResolvedRequestOptions<\n  TResponseStyle extends ResponseStyle = 'fields',\n  ThrowOnError extends boolean = boolean,\n  Url extends string = string,\n> extends RequestOptions<unknown, TResponseStyle, ThrowOnError, Url> {\n  serializedBody?: string;\n}\n\nexport type RequestResult<\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = boolean,\n  TResponseStyle extends ResponseStyle = 'fields',\n> = ThrowOnError extends true\n  ? Promise<\n      TResponseStyle extends 'data'\n        ? TData extends Record<string, unknown>\n          ? TData[keyof TData]\n          : TData\n        : {\n            data: TData extends Record<string, unknown> ? TData[keyof TData] : TData;\n            request: Request;\n            response: Response;\n          }\n    >\n  : Promise<\n      TResponseStyle extends 'data'\n        ? (TData extends Record<string, unknown> ? TData[keyof TData] : TData) | undefined\n        : (\n            | {\n                data: TData extends Record<string, unknown> ? TData[keyof TData] : TData;\n                error: undefined;\n              }\n            | {\n                data: undefined;\n                error: TError extends Record<string, unknown> ? TError[keyof TError] : TError;\n              }\n          ) & {\n            request: Request;\n            response: Response;\n          }\n    >;\n\nexport interface ClientOptions {\n  baseUrl?: string;\n  responseStyle?: ResponseStyle;\n  throwOnError?: boolean;\n}\n\ntype MethodFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'>,\n) => RequestResult<TData, TError, ThrowOnError, TResponseStyle>;\n\ntype SseFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'>,\n) => Promise<ServerSentEventsResult<TData, TError>>;\n\ntype RequestFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'> &\n    Pick<Required<RequestOptions<TData, TResponseStyle, ThrowOnError>>, 'method'>,\n) => RequestResult<TData, TError, ThrowOnError, TResponseStyle>;\n\ntype BuildUrlFn = <\n  TData extends {\n    body?: unknown;\n    path?: Record<string, unknown>;\n    query?: Record<string, unknown>;\n    url: string;\n  },\n>(\n  options: TData & Options<TData>,\n) => string;\n\nexport type Client = CoreClient<RequestFn, Config, MethodFn, BuildUrlFn, SseFn> & {\n  interceptors: Middleware<Request, Response, unknown, ResolvedRequestOptions>;\n};\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 = ClientOptions> = (\n  override?: Config<ClientOptions & T>,\n) => Config<Required<ClientOptions> & T>;\n\nexport interface TDataShape {\n  body?: unknown;\n  headers?: unknown;\n  path?: unknown;\n  query?: unknown;\n  url: string;\n}\n\ntype OmitKeys<T, K> = Pick<T, Exclude<keyof T, K>>;\n\nexport type Options<\n  TData extends TDataShape = TDataShape,\n  ThrowOnError extends boolean = boolean,\n  TResponse = unknown,\n  TResponseStyle extends ResponseStyle = 'fields',\n> = OmitKeys<\n  RequestOptions<TResponse, TResponseStyle, ThrowOnError>,\n  'body' | 'path' | 'query' | 'url'\n> &\n  ([TData] extends [never] ? unknown : Omit<TData, 'url'>);\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/angular-query-experimental/asClass/client/utils.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/angular-query-experimental/asClass/client.gen.ts",
    "content": "// 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>());\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/angular-query-experimental/asClass/core/auth.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/angular-query-experimental/asClass/core/bodySerializer.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/angular-query-experimental/asClass/core/params.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/angular-query-experimental/asClass/core/pathSerializer.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/angular-query-experimental/asClass/core/queryKeySerializer.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\n/**\n * JSON-friendly union that mirrors what Pinia Colada can hash.\n */\nexport type JsonValue =\n  | null\n  | string\n  | number\n  | boolean\n  | JsonValue[]\n  | { [key: string]: JsonValue };\n\n/**\n * Replacer that converts non-JSON values (bigint, Date, etc.) to safe substitutes.\n */\nexport const queryKeyJsonReplacer = (_key: string, value: unknown) => {\n  if (value === undefined || typeof value === 'function' || typeof value === 'symbol') {\n    return undefined;\n  }\n  if (typeof value === 'bigint') {\n    return value.toString();\n  }\n  if (value instanceof Date) {\n    return value.toISOString();\n  }\n  return value;\n};\n\n/**\n * Safely stringifies a value and parses it back into a JsonValue.\n */\nexport const stringifyToJsonValue = (input: unknown): JsonValue | undefined => {\n  try {\n    const json = JSON.stringify(input, queryKeyJsonReplacer);\n    if (json === undefined) {\n      return undefined;\n    }\n    return JSON.parse(json) as JsonValue;\n  } catch {\n    return undefined;\n  }\n};\n\n/**\n * Detects plain objects (including objects with a null prototype).\n */\nconst isPlainObject = (value: unknown): value is Record<string, unknown> => {\n  if (value === null || typeof value !== 'object') {\n    return false;\n  }\n  const prototype = Object.getPrototypeOf(value as object);\n  return prototype === Object.prototype || prototype === null;\n};\n\n/**\n * Turns URLSearchParams into a sorted JSON object for deterministic keys.\n */\nconst serializeSearchParams = (params: URLSearchParams): JsonValue => {\n  const entries = Array.from(params.entries()).sort(([a], [b]) => a.localeCompare(b));\n  const result: Record<string, JsonValue> = {};\n\n  for (const [key, value] of entries) {\n    const existing = result[key];\n    if (existing === undefined) {\n      result[key] = value;\n      continue;\n    }\n\n    if (Array.isArray(existing)) {\n      (existing as string[]).push(value);\n    } else {\n      result[key] = [existing, value];\n    }\n  }\n\n  return result;\n};\n\n/**\n * Normalizes any accepted value into a JSON-friendly shape for query keys.\n */\nexport const serializeQueryKeyValue = (value: unknown): JsonValue | undefined => {\n  if (value === null) {\n    return null;\n  }\n\n  if (typeof value === 'string' || typeof value === 'number' || typeof value === 'boolean') {\n    return value;\n  }\n\n  if (value === undefined || typeof value === 'function' || typeof value === 'symbol') {\n    return undefined;\n  }\n\n  if (typeof value === 'bigint') {\n    return value.toString();\n  }\n\n  if (value instanceof Date) {\n    return value.toISOString();\n  }\n\n  if (Array.isArray(value)) {\n    return stringifyToJsonValue(value);\n  }\n\n  if (typeof URLSearchParams !== 'undefined' && value instanceof URLSearchParams) {\n    return serializeSearchParams(value);\n  }\n\n  if (isPlainObject(value)) {\n    return stringifyToJsonValue(value);\n  }\n\n  return undefined;\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/angular-query-experimental/asClass/core/serverSentEvents.gen.ts",
    "content": "// 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 const 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            // Normalize line endings: CRLF -> LF, then CR -> LF\n            buffer = buffer.replace(/\\r\\n/g, '\\n').replace(/\\r/g, '\\n');\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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/angular-query-experimental/asClass/core/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { Auth, AuthToken } from './auth.gen';\nimport type { BodySerializer, QuerySerializer, QuerySerializerOptions } from './bodySerializer.gen';\n\nexport type HttpMethod =\n  | 'connect'\n  | 'delete'\n  | 'get'\n  | 'head'\n  | 'options'\n  | 'patch'\n  | 'post'\n  | 'put'\n  | 'trace';\n\nexport type Client<\n  RequestFn = never,\n  Config = unknown,\n  MethodFn = never,\n  BuildUrlFn = never,\n  SseFn = never,\n> = {\n  /**\n   * Returns the final request URL.\n   */\n  buildUrl: BuildUrlFn;\n  getConfig: () => Config;\n  request: RequestFn;\n  setConfig: (config: Config) => Config;\n} & {\n  [K in HttpMethod]: MethodFn;\n} & ([SseFn] extends [never] ? { sse?: never } : { sse: { [K in HttpMethod]: SseFn } });\n\nexport interface Config {\n  /**\n   * Auth token or a function returning auth token. The resolved value will be\n   * added to the request payload as defined by its `security` array.\n   */\n  auth?: ((auth: Auth) => Promise<AuthToken> | AuthToken) | AuthToken;\n  /**\n   * A function for serializing request body parameter. By default,\n   * {@link JSON.stringify()} will be used.\n   */\n  bodySerializer?: BodySerializer | null;\n  /**\n   * An object containing any HTTP headers that you want to pre-populate your\n   * `Headers` object with.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/Headers/Headers#init See more}\n   */\n  headers?:\n    | RequestInit['headers']\n    | Record<\n        string,\n        string | number | boolean | (string | number | boolean)[] | null | undefined | unknown\n      >;\n  /**\n   * The request method.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/fetch#method See more}\n   */\n  method?: Uppercase<HttpMethod>;\n  /**\n   * A function for serializing request query parameters. By default, arrays\n   * will be exploded in form style, objects will be exploded in deepObject\n   * style, and reserved characters are percent-encoded.\n   *\n   * This method will have no effect if the native `paramsSerializer()` Axios\n   * API function is used.\n   *\n   * {@link https://swagger.io/docs/specification/serialization/#query View examples}\n   */\n  querySerializer?: QuerySerializer | QuerySerializerOptions;\n  /**\n   * A function validating request data. This is useful if you want to ensure\n   * the request conforms to the desired shape, so it can be safely sent to\n   * the server.\n   */\n  requestValidator?: (data: unknown) => Promise<unknown>;\n  /**\n   * A function transforming response data before it's returned. This is useful\n   * for post-processing data, e.g. converting ISO strings into Date objects.\n   */\n  responseTransformer?: (data: unknown) => Promise<unknown>;\n  /**\n   * A function validating response data. This is useful if you want to ensure\n   * the response conforms to the desired shape, so it can be safely passed to\n   * the transformers and returned to the user.\n   */\n  responseValidator?: (data: unknown) => Promise<unknown>;\n}\n\ntype IsExactlyNeverOrNeverUndefined<T> = [T] extends [never]\n  ? true\n  : [T] extends [never | undefined]\n    ? [undefined] extends [T]\n      ? false\n      : true\n    : false;\n\nexport type OmitNever<T extends Record<string, unknown>> = {\n  [K in keyof T as IsExactlyNeverOrNeverUndefined<T[K]> extends true ? never : K]: T[K];\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/angular-query-experimental/asClass/core/utils.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/angular-query-experimental/asClass/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport { BarBazService, BarService, BarService2, FooBazService, FooService, FooService2, type Options } from './sdk.gen';\nexport type { ClientOptions, FooBarPostData, FooBarPostResponse, FooBarPostResponses, FooBarPutData, FooBarPutResponse, FooBarPutResponses, FooPostData, FooPostResponse, FooPostResponses, FooPutData, FooPutResponse, FooPutResponses, GetFooBarData, GetFooBarResponse, GetFooBarResponses, GetFooData, GetFooResponse, GetFooResponses } from './types.gen';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/angular-query-experimental/asClass/sdk.gen.ts",
    "content": "// 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 { FooBarPostData, FooBarPostResponses, FooBarPutData, FooBarPutResponses, FooPostData, FooPostResponses, FooPutData, FooPutResponses, GetFooBarData, GetFooBarResponses, GetFooData, GetFooResponses } from './types.gen';\n\nexport type Options<TData extends TDataShape = TDataShape, ThrowOnError extends boolean = boolean> = Options2<TData, ThrowOnError> & {\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\nexport class BarService {\n    public static post<ThrowOnError extends boolean = false>(options?: Options<FooBarPostData, ThrowOnError>) {\n        return (options?.client ?? client).post<FooBarPostResponses, unknown, ThrowOnError>({ url: '/foo/bar', ...options });\n    }\n    \n    public static put<ThrowOnError extends boolean = false>(options?: Options<FooBarPutData, ThrowOnError>) {\n        return (options?.client ?? client).put<FooBarPutResponses, unknown, ThrowOnError>({ url: '/foo/bar', ...options });\n    }\n}\n\nexport class FooService {\n    public static post<ThrowOnError extends boolean = false>(options?: Options<FooPostData, ThrowOnError>) {\n        return (options?.client ?? client).post<FooPostResponses, unknown, ThrowOnError>({ url: '/foo', ...options });\n    }\n    \n    public static put<ThrowOnError extends boolean = false>(options?: Options<FooPutData, ThrowOnError>) {\n        return (options?.client ?? client).put<FooPutResponses, unknown, ThrowOnError>({ url: '/foo', ...options });\n    }\n    \n    static barService = BarService;\n}\n\nexport class FooBazService {\n    public static getFoo<ThrowOnError extends boolean = false>(options?: Options<GetFooData, ThrowOnError>) {\n        return (options?.client ?? client).get<GetFooResponses, unknown, ThrowOnError>({ url: '/foo', ...options });\n    }\n    \n    static fooService = FooService;\n}\n\nexport class BarService2 {\n    public static post<ThrowOnError extends boolean = false>(options?: Options<FooBarPostData, ThrowOnError>) {\n        return (options?.client ?? client).post<FooBarPostResponses, unknown, ThrowOnError>({ url: '/foo/bar', ...options });\n    }\n    \n    public static put<ThrowOnError extends boolean = false>(options?: Options<FooBarPutData, ThrowOnError>) {\n        return (options?.client ?? client).put<FooBarPutResponses, unknown, ThrowOnError>({ url: '/foo/bar', ...options });\n    }\n}\n\nexport class FooService2 {\n    static barService = BarService2;\n}\n\nexport class BarBazService {\n    public static getFooBar<ThrowOnError extends boolean = false>(options?: Options<GetFooBarData, ThrowOnError>) {\n        return (options?.client ?? client).get<GetFooBarResponses, unknown, ThrowOnError>({ url: '/foo/bar', ...options });\n    }\n    \n    static fooService = FooService2;\n}\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/angular-query-experimental/asClass/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type ClientOptions = {\n    baseUrl: `${string}://${string}` | (string & {});\n};\n\nexport type GetFooData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/foo';\n};\n\nexport type GetFooResponses = {\n    /**\n     * OK\n     */\n    200: string;\n};\n\nexport type GetFooResponse = GetFooResponses[keyof GetFooResponses];\n\nexport type FooPostData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/foo';\n};\n\nexport type FooPostResponses = {\n    /**\n     * OK\n     */\n    200: string;\n};\n\nexport type FooPostResponse = FooPostResponses[keyof FooPostResponses];\n\nexport type FooPutData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/foo';\n};\n\nexport type FooPutResponses = {\n    /**\n     * OK\n     */\n    200: string;\n};\n\nexport type FooPutResponse = FooPutResponses[keyof FooPutResponses];\n\nexport type GetFooBarData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/foo/bar';\n};\n\nexport type GetFooBarResponses = {\n    /**\n     * OK\n     */\n    200: string;\n};\n\nexport type GetFooBarResponse = GetFooBarResponses[keyof GetFooBarResponses];\n\nexport type FooBarPostData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/foo/bar';\n};\n\nexport type FooBarPostResponses = {\n    /**\n     * OK\n     */\n    200: string;\n};\n\nexport type FooBarPostResponse = FooBarPostResponses[keyof FooBarPostResponses];\n\nexport type FooBarPutData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/foo/bar';\n};\n\nexport type FooBarPutResponses = {\n    /**\n     * OK\n     */\n    200: string;\n};\n\nexport type FooBarPutResponse = FooBarPutResponses[keyof FooBarPutResponses];\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/angular-query-experimental/axios/@tanstack/angular-query-experimental.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport { type DefaultError, type InfiniteData, infiniteQueryOptions, type MutationOptions, queryOptions } from '@tanstack/angular-query-experimental';\nimport type { AxiosError } from 'axios';\n\nimport { client } from '../client.gen';\nimport { apiVVersionODataControllerCount, callToTestOrderOfParams, callWithDefaultOptionalParameters, callWithDefaultParameters, callWithDescriptions, callWithDuplicateResponses, callWithNoContentResponse, callWithParameters, callWithResponse, callWithResponseAndNoContentResponse, callWithResponses, callWithResultFromHeader, callWithWeirdParameterNames, collectionFormat, complexParams, complexTypes, deleteCallWithoutParametersAndResponse, deleteFoo, deprecatedCall, dummyA, dummyB, duplicateName, duplicateName2, duplicateName3, duplicateName4, export_, fileResponse, fooWow, getApiVbyApiVersionSimpleOperation, getCallWithOptionalParam, getCallWithoutParametersAndResponse, import_, multipartRequest, multipartResponse, nonAsciiæøåÆøÅöôêÊ字符串, type Options, patchApiVbyApiVersionNoTag, patchCallWithoutParametersAndResponse, postApiVbyApiVersionFormData, postApiVbyApiVersionRequestBody, postCallWithOptionalParam, postCallWithoutParametersAndResponse, putCallWithoutParametersAndResponse, putWithFormUrlEncoded, testErrorCode, types, uploadFile } from '../sdk.gen';\nimport type { ApiVVersionODataControllerCountData, ApiVVersionODataControllerCountResponse, CallToTestOrderOfParamsData, CallWithDefaultOptionalParametersData, CallWithDefaultParametersData, CallWithDescriptionsData, CallWithDuplicateResponsesData, CallWithDuplicateResponsesError, CallWithDuplicateResponsesResponse, CallWithNoContentResponseData, CallWithNoContentResponseResponse, CallWithParametersData, CallWithResponseAndNoContentResponseData, CallWithResponseAndNoContentResponseResponse, CallWithResponseData, CallWithResponseResponse, CallWithResponsesData, CallWithResponsesError, CallWithResponsesResponse, CallWithResultFromHeaderData, CallWithWeirdParameterNamesData, CollectionFormatData, ComplexParamsData, ComplexParamsResponse, ComplexTypesData, ComplexTypesResponse, DeleteCallWithoutParametersAndResponseData, DeleteFooData3, DeprecatedCallData, DummyAData, DummyAResponse, DummyBData, DummyBResponse, DuplicateName2Data, DuplicateName3Data, DuplicateName4Data, DuplicateNameData, ExportData, FileResponseData, FileResponseResponse, FooWowData, GetApiVbyApiVersionSimpleOperationData, GetApiVbyApiVersionSimpleOperationError, GetApiVbyApiVersionSimpleOperationResponse, GetCallWithOptionalParamData, GetCallWithoutParametersAndResponseData, ImportData, ImportResponse, MultipartRequestData, MultipartResponseData, MultipartResponseResponse, NonAsciiæøåÆøÅöôêÊ字符串Data, NonAsciiæøåÆøÅöôêÊ字符串Response, PatchApiVbyApiVersionNoTagData, PatchCallWithoutParametersAndResponseData, PostApiVbyApiVersionFormDataData, PostApiVbyApiVersionRequestBodyData, PostCallWithOptionalParamData, PostCallWithOptionalParamResponse, PostCallWithoutParametersAndResponseData, PutCallWithoutParametersAndResponseData, PutWithFormUrlEncodedData, TestErrorCodeData, TypesData, TypesResponse, UploadFileData, UploadFileResponse } from '../types.gen';\n\nexport type QueryKey<TOptions extends Options> = [\n    Pick<TOptions, 'baseURL' | 'body' | 'headers' | 'path' | 'query'> & {\n        _id: string;\n        _infinite?: boolean;\n        tags?: ReadonlyArray<string>;\n    }\n];\n\nconst createQueryKey = <TOptions extends Options>(id: string, options?: TOptions, infinite?: boolean, tags?: ReadonlyArray<string>): [\n    QueryKey<TOptions>[0]\n] => {\n    const params: QueryKey<TOptions>[0] = { _id: id, baseURL: options?.baseURL || (options?.client ?? client).getConfig().baseURL } as QueryKey<TOptions>[0];\n    if (infinite) {\n        params._infinite = infinite;\n    }\n    if (tags) {\n        params.tags = tags;\n    }\n    if (options?.body) {\n        params.body = options.body;\n    }\n    if (options?.headers) {\n        params.headers = options.headers;\n    }\n    if (options?.path) {\n        params.path = options.path;\n    }\n    if (options?.query) {\n        params.query = options.query;\n    }\n    return [params];\n};\n\nexport const exportQueryKey = (options?: Options<ExportData>) => createQueryKey('export', options);\n\nexport const exportOptions = (options?: Options<ExportData>) => queryOptions<unknown, AxiosError<DefaultError>, unknown, ReturnType<typeof exportQueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await export_({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: exportQueryKey(options)\n});\n\nexport const patchApiVbyApiVersionNoTagMutation = (options?: Partial<Options<PatchApiVbyApiVersionNoTagData>>): MutationOptions<unknown, AxiosError<DefaultError>, Options<PatchApiVbyApiVersionNoTagData>> => {\n    const mutationOptions: MutationOptions<unknown, AxiosError<DefaultError>, Options<PatchApiVbyApiVersionNoTagData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await patchApiVbyApiVersionNoTag({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const importMutation = (options?: Partial<Options<ImportData>>): MutationOptions<ImportResponse, AxiosError<DefaultError>, Options<ImportData>> => {\n    const mutationOptions: MutationOptions<ImportResponse, AxiosError<DefaultError>, Options<ImportData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await import_({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const fooWowMutation = (options?: Partial<Options<FooWowData>>): MutationOptions<unknown, AxiosError<DefaultError>, Options<FooWowData>> => {\n    const mutationOptions: MutationOptions<unknown, AxiosError<DefaultError>, Options<FooWowData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await fooWow({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const apiVVersionODataControllerCountQueryKey = (options?: Options<ApiVVersionODataControllerCountData>) => createQueryKey('apiVVersionODataControllerCount', options);\n\nexport const apiVVersionODataControllerCountOptions = (options?: Options<ApiVVersionODataControllerCountData>) => queryOptions<ApiVVersionODataControllerCountResponse, AxiosError<DefaultError>, ApiVVersionODataControllerCountResponse, ReturnType<typeof apiVVersionODataControllerCountQueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await apiVVersionODataControllerCount({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: apiVVersionODataControllerCountQueryKey(options)\n});\n\nexport const getApiVbyApiVersionSimpleOperationQueryKey = (options: Options<GetApiVbyApiVersionSimpleOperationData>) => createQueryKey('getApiVbyApiVersionSimpleOperation', options);\n\nexport const getApiVbyApiVersionSimpleOperationOptions = (options: Options<GetApiVbyApiVersionSimpleOperationData>) => queryOptions<GetApiVbyApiVersionSimpleOperationResponse, AxiosError<GetApiVbyApiVersionSimpleOperationError>, GetApiVbyApiVersionSimpleOperationResponse, ReturnType<typeof getApiVbyApiVersionSimpleOperationQueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await getApiVbyApiVersionSimpleOperation({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: getApiVbyApiVersionSimpleOperationQueryKey(options)\n});\n\nexport const deleteCallWithoutParametersAndResponseMutation = (options?: Partial<Options<DeleteCallWithoutParametersAndResponseData>>): MutationOptions<unknown, AxiosError<DefaultError>, Options<DeleteCallWithoutParametersAndResponseData>> => {\n    const mutationOptions: MutationOptions<unknown, AxiosError<DefaultError>, Options<DeleteCallWithoutParametersAndResponseData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await deleteCallWithoutParametersAndResponse({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const getCallWithoutParametersAndResponseQueryKey = (options?: Options<GetCallWithoutParametersAndResponseData>) => createQueryKey('getCallWithoutParametersAndResponse', options);\n\nexport const getCallWithoutParametersAndResponseOptions = (options?: Options<GetCallWithoutParametersAndResponseData>) => queryOptions<unknown, AxiosError<DefaultError>, unknown, ReturnType<typeof getCallWithoutParametersAndResponseQueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await getCallWithoutParametersAndResponse({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: getCallWithoutParametersAndResponseQueryKey(options)\n});\n\nexport const patchCallWithoutParametersAndResponseMutation = (options?: Partial<Options<PatchCallWithoutParametersAndResponseData>>): MutationOptions<unknown, AxiosError<DefaultError>, Options<PatchCallWithoutParametersAndResponseData>> => {\n    const mutationOptions: MutationOptions<unknown, AxiosError<DefaultError>, Options<PatchCallWithoutParametersAndResponseData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await patchCallWithoutParametersAndResponse({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const postCallWithoutParametersAndResponseMutation = (options?: Partial<Options<PostCallWithoutParametersAndResponseData>>): MutationOptions<unknown, AxiosError<DefaultError>, Options<PostCallWithoutParametersAndResponseData>> => {\n    const mutationOptions: MutationOptions<unknown, AxiosError<DefaultError>, Options<PostCallWithoutParametersAndResponseData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await postCallWithoutParametersAndResponse({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const putCallWithoutParametersAndResponseMutation = (options?: Partial<Options<PutCallWithoutParametersAndResponseData>>): MutationOptions<unknown, AxiosError<DefaultError>, Options<PutCallWithoutParametersAndResponseData>> => {\n    const mutationOptions: MutationOptions<unknown, AxiosError<DefaultError>, Options<PutCallWithoutParametersAndResponseData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await putCallWithoutParametersAndResponse({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const deleteFooMutation = (options?: Partial<Options<DeleteFooData3>>): MutationOptions<unknown, AxiosError<DefaultError>, Options<DeleteFooData3>> => {\n    const mutationOptions: MutationOptions<unknown, AxiosError<DefaultError>, Options<DeleteFooData3>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await deleteFoo({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const callWithDescriptionsMutation = (options?: Partial<Options<CallWithDescriptionsData>>): MutationOptions<unknown, AxiosError<DefaultError>, Options<CallWithDescriptionsData>> => {\n    const mutationOptions: MutationOptions<unknown, AxiosError<DefaultError>, Options<CallWithDescriptionsData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await callWithDescriptions({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\n/**\n * @deprecated\n */\nexport const deprecatedCallMutation = (options?: Partial<Options<DeprecatedCallData>>): MutationOptions<unknown, AxiosError<DefaultError>, Options<DeprecatedCallData>> => {\n    const mutationOptions: MutationOptions<unknown, AxiosError<DefaultError>, Options<DeprecatedCallData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await deprecatedCall({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const callWithParametersMutation = (options?: Partial<Options<CallWithParametersData>>): MutationOptions<unknown, AxiosError<DefaultError>, Options<CallWithParametersData>> => {\n    const mutationOptions: MutationOptions<unknown, AxiosError<DefaultError>, Options<CallWithParametersData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await callWithParameters({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const callWithWeirdParameterNamesMutation = (options?: Partial<Options<CallWithWeirdParameterNamesData>>): MutationOptions<unknown, AxiosError<DefaultError>, Options<CallWithWeirdParameterNamesData>> => {\n    const mutationOptions: MutationOptions<unknown, AxiosError<DefaultError>, Options<CallWithWeirdParameterNamesData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await callWithWeirdParameterNames({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const getCallWithOptionalParamQueryKey = (options: Options<GetCallWithOptionalParamData>) => createQueryKey('getCallWithOptionalParam', options);\n\nexport const getCallWithOptionalParamOptions = (options: Options<GetCallWithOptionalParamData>) => queryOptions<unknown, AxiosError<DefaultError>, unknown, ReturnType<typeof getCallWithOptionalParamQueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await getCallWithOptionalParam({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: getCallWithOptionalParamQueryKey(options)\n});\n\nconst createInfiniteParams = <K extends Pick<QueryKey<Options>[0], 'body' | 'headers' | 'path' | 'query'>>(queryKey: QueryKey<Options>, page: K) => {\n    const params = { ...queryKey[0] };\n    if (page.body) {\n        params.body = {\n            ...queryKey[0].body as any,\n            ...page.body as any\n        };\n    }\n    if (page.headers) {\n        params.headers = {\n            ...queryKey[0].headers,\n            ...page.headers\n        };\n    }\n    if (page.path) {\n        params.path = {\n            ...queryKey[0].path as any,\n            ...page.path as any\n        };\n    }\n    if (page.query) {\n        params.query = {\n            ...queryKey[0].query as any,\n            ...page.query as any\n        };\n    }\n    return params as unknown as typeof page;\n};\n\nexport const getCallWithOptionalParamInfiniteQueryKey = (options: Options<GetCallWithOptionalParamData>): QueryKey<Options<GetCallWithOptionalParamData>> => createQueryKey('getCallWithOptionalParam', options, true);\n\nexport const getCallWithOptionalParamInfiniteOptions = (options: Options<GetCallWithOptionalParamData>) => infiniteQueryOptions<unknown, AxiosError<DefaultError>, InfiniteData<unknown>, QueryKey<Options<GetCallWithOptionalParamData>>, number | Pick<QueryKey<Options<GetCallWithOptionalParamData>>[0], 'body' | 'headers' | 'path' | 'query'>>(\n// @ts-ignore\n{\n    queryFn: async ({ pageParam, queryKey, signal }) => {\n        // @ts-ignore\n        const page: Pick<QueryKey<Options<GetCallWithOptionalParamData>>[0], 'body' | 'headers' | 'path' | 'query'> = typeof pageParam === 'object' ? pageParam : {\n            query: {\n                page: pageParam\n            }\n        };\n        const params = createInfiniteParams(queryKey, page);\n        const { data } = await getCallWithOptionalParam({\n            ...options,\n            ...params,\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: getCallWithOptionalParamInfiniteQueryKey(options)\n});\n\nexport const postCallWithOptionalParamMutation = (options?: Partial<Options<PostCallWithOptionalParamData>>): MutationOptions<PostCallWithOptionalParamResponse, AxiosError<DefaultError>, Options<PostCallWithOptionalParamData>> => {\n    const mutationOptions: MutationOptions<PostCallWithOptionalParamResponse, AxiosError<DefaultError>, Options<PostCallWithOptionalParamData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await postCallWithOptionalParam({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const postApiVbyApiVersionRequestBodyMutation = (options?: Partial<Options<PostApiVbyApiVersionRequestBodyData>>): MutationOptions<unknown, AxiosError<DefaultError>, Options<PostApiVbyApiVersionRequestBodyData>> => {\n    const mutationOptions: MutationOptions<unknown, AxiosError<DefaultError>, Options<PostApiVbyApiVersionRequestBodyData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await postApiVbyApiVersionRequestBody({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const postApiVbyApiVersionFormDataMutation = (options?: Partial<Options<PostApiVbyApiVersionFormDataData>>): MutationOptions<unknown, AxiosError<DefaultError>, Options<PostApiVbyApiVersionFormDataData>> => {\n    const mutationOptions: MutationOptions<unknown, AxiosError<DefaultError>, Options<PostApiVbyApiVersionFormDataData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await postApiVbyApiVersionFormData({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const callWithDefaultParametersQueryKey = (options?: Options<CallWithDefaultParametersData>) => createQueryKey('callWithDefaultParameters', options);\n\nexport const callWithDefaultParametersOptions = (options?: Options<CallWithDefaultParametersData>) => queryOptions<unknown, AxiosError<DefaultError>, unknown, ReturnType<typeof callWithDefaultParametersQueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await callWithDefaultParameters({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: callWithDefaultParametersQueryKey(options)\n});\n\nexport const callWithDefaultOptionalParametersMutation = (options?: Partial<Options<CallWithDefaultOptionalParametersData>>): MutationOptions<unknown, AxiosError<DefaultError>, Options<CallWithDefaultOptionalParametersData>> => {\n    const mutationOptions: MutationOptions<unknown, AxiosError<DefaultError>, Options<CallWithDefaultOptionalParametersData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await callWithDefaultOptionalParameters({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const callToTestOrderOfParamsMutation = (options?: Partial<Options<CallToTestOrderOfParamsData>>): MutationOptions<unknown, AxiosError<DefaultError>, Options<CallToTestOrderOfParamsData>> => {\n    const mutationOptions: MutationOptions<unknown, AxiosError<DefaultError>, Options<CallToTestOrderOfParamsData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await callToTestOrderOfParams({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const duplicateNameMutation = (options?: Partial<Options<DuplicateNameData>>): MutationOptions<unknown, AxiosError<DefaultError>, Options<DuplicateNameData>> => {\n    const mutationOptions: MutationOptions<unknown, AxiosError<DefaultError>, Options<DuplicateNameData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await duplicateName({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const duplicateName2QueryKey = (options?: Options<DuplicateName2Data>) => createQueryKey('duplicateName2', options);\n\nexport const duplicateName2Options = (options?: Options<DuplicateName2Data>) => queryOptions<unknown, AxiosError<DefaultError>, unknown, ReturnType<typeof duplicateName2QueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await duplicateName2({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: duplicateName2QueryKey(options)\n});\n\nexport const duplicateName3Mutation = (options?: Partial<Options<DuplicateName3Data>>): MutationOptions<unknown, AxiosError<DefaultError>, Options<DuplicateName3Data>> => {\n    const mutationOptions: MutationOptions<unknown, AxiosError<DefaultError>, Options<DuplicateName3Data>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await duplicateName3({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const duplicateName4Mutation = (options?: Partial<Options<DuplicateName4Data>>): MutationOptions<unknown, AxiosError<DefaultError>, Options<DuplicateName4Data>> => {\n    const mutationOptions: MutationOptions<unknown, AxiosError<DefaultError>, Options<DuplicateName4Data>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await duplicateName4({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const callWithNoContentResponseQueryKey = (options?: Options<CallWithNoContentResponseData>) => createQueryKey('callWithNoContentResponse', options);\n\nexport const callWithNoContentResponseOptions = (options?: Options<CallWithNoContentResponseData>) => queryOptions<CallWithNoContentResponseResponse, AxiosError<DefaultError>, CallWithNoContentResponseResponse, ReturnType<typeof callWithNoContentResponseQueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await callWithNoContentResponse({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: callWithNoContentResponseQueryKey(options)\n});\n\nexport const callWithResponseAndNoContentResponseQueryKey = (options?: Options<CallWithResponseAndNoContentResponseData>) => createQueryKey('callWithResponseAndNoContentResponse', options);\n\nexport const callWithResponseAndNoContentResponseOptions = (options?: Options<CallWithResponseAndNoContentResponseData>) => queryOptions<CallWithResponseAndNoContentResponseResponse, AxiosError<DefaultError>, CallWithResponseAndNoContentResponseResponse, ReturnType<typeof callWithResponseAndNoContentResponseQueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await callWithResponseAndNoContentResponse({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: callWithResponseAndNoContentResponseQueryKey(options)\n});\n\nexport const dummyAQueryKey = (options?: Options<DummyAData>) => createQueryKey('dummyA', options);\n\nexport const dummyAOptions = (options?: Options<DummyAData>) => queryOptions<DummyAResponse, AxiosError<DefaultError>, DummyAResponse, ReturnType<typeof dummyAQueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await dummyA({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: dummyAQueryKey(options)\n});\n\nexport const dummyBQueryKey = (options?: Options<DummyBData>) => createQueryKey('dummyB', options);\n\nexport const dummyBOptions = (options?: Options<DummyBData>) => queryOptions<DummyBResponse, AxiosError<DefaultError>, DummyBResponse, ReturnType<typeof dummyBQueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await dummyB({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: dummyBQueryKey(options)\n});\n\nexport const callWithResponseQueryKey = (options?: Options<CallWithResponseData>) => createQueryKey('callWithResponse', options);\n\nexport const callWithResponseOptions = (options?: Options<CallWithResponseData>) => queryOptions<CallWithResponseResponse, AxiosError<DefaultError>, CallWithResponseResponse, ReturnType<typeof callWithResponseQueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await callWithResponse({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: callWithResponseQueryKey(options)\n});\n\nexport const callWithDuplicateResponsesMutation = (options?: Partial<Options<CallWithDuplicateResponsesData>>): MutationOptions<CallWithDuplicateResponsesResponse, AxiosError<CallWithDuplicateResponsesError>, Options<CallWithDuplicateResponsesData>> => {\n    const mutationOptions: MutationOptions<CallWithDuplicateResponsesResponse, AxiosError<CallWithDuplicateResponsesError>, Options<CallWithDuplicateResponsesData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await callWithDuplicateResponses({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const callWithResponsesMutation = (options?: Partial<Options<CallWithResponsesData>>): MutationOptions<CallWithResponsesResponse, AxiosError<CallWithResponsesError>, Options<CallWithResponsesData>> => {\n    const mutationOptions: MutationOptions<CallWithResponsesResponse, AxiosError<CallWithResponsesError>, Options<CallWithResponsesData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await callWithResponses({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const collectionFormatQueryKey = (options: Options<CollectionFormatData>) => createQueryKey('collectionFormat', options);\n\nexport const collectionFormatOptions = (options: Options<CollectionFormatData>) => queryOptions<unknown, AxiosError<DefaultError>, unknown, ReturnType<typeof collectionFormatQueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await collectionFormat({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: collectionFormatQueryKey(options)\n});\n\nexport const typesQueryKey = (options: Options<TypesData>) => createQueryKey('types', options);\n\nexport const typesOptions = (options: Options<TypesData>) => queryOptions<TypesResponse, AxiosError<DefaultError>, TypesResponse, ReturnType<typeof typesQueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await types({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: typesQueryKey(options)\n});\n\nexport const uploadFileMutation = (options?: Partial<Options<UploadFileData>>): MutationOptions<UploadFileResponse, AxiosError<DefaultError>, Options<UploadFileData>> => {\n    const mutationOptions: MutationOptions<UploadFileResponse, AxiosError<DefaultError>, Options<UploadFileData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await uploadFile({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const fileResponseQueryKey = (options: Options<FileResponseData>) => createQueryKey('fileResponse', options);\n\nexport const fileResponseOptions = (options: Options<FileResponseData>) => queryOptions<FileResponseResponse, AxiosError<DefaultError>, FileResponseResponse, ReturnType<typeof fileResponseQueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await fileResponse({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: fileResponseQueryKey(options)\n});\n\nexport const complexTypesQueryKey = (options: Options<ComplexTypesData>) => createQueryKey('complexTypes', options);\n\nexport const complexTypesOptions = (options: Options<ComplexTypesData>) => queryOptions<ComplexTypesResponse, AxiosError<DefaultError>, ComplexTypesResponse, ReturnType<typeof complexTypesQueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await complexTypes({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: complexTypesQueryKey(options)\n});\n\nexport const multipartResponseQueryKey = (options?: Options<MultipartResponseData>) => createQueryKey('multipartResponse', options);\n\nexport const multipartResponseOptions = (options?: Options<MultipartResponseData>) => queryOptions<MultipartResponseResponse, AxiosError<DefaultError>, MultipartResponseResponse, ReturnType<typeof multipartResponseQueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await multipartResponse({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: multipartResponseQueryKey(options)\n});\n\nexport const multipartRequestMutation = (options?: Partial<Options<MultipartRequestData>>): MutationOptions<unknown, AxiosError<DefaultError>, Options<MultipartRequestData>> => {\n    const mutationOptions: MutationOptions<unknown, AxiosError<DefaultError>, Options<MultipartRequestData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await multipartRequest({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const complexParamsMutation = (options?: Partial<Options<ComplexParamsData>>): MutationOptions<ComplexParamsResponse, AxiosError<DefaultError>, Options<ComplexParamsData>> => {\n    const mutationOptions: MutationOptions<ComplexParamsResponse, AxiosError<DefaultError>, Options<ComplexParamsData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await complexParams({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const callWithResultFromHeaderMutation = (options?: Partial<Options<CallWithResultFromHeaderData>>): MutationOptions<unknown, AxiosError<DefaultError>, Options<CallWithResultFromHeaderData>> => {\n    const mutationOptions: MutationOptions<unknown, AxiosError<DefaultError>, Options<CallWithResultFromHeaderData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await callWithResultFromHeader({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const testErrorCodeMutation = (options?: Partial<Options<TestErrorCodeData>>): MutationOptions<unknown, AxiosError<DefaultError>, Options<TestErrorCodeData>> => {\n    const mutationOptions: MutationOptions<unknown, AxiosError<DefaultError>, Options<TestErrorCodeData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await testErrorCode({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const nonAsciiæøåÆøÅöôêÊ字符串Mutation = (options?: Partial<Options<NonAsciiæøåÆøÅöôêÊ字符串Data>>): MutationOptions<NonAsciiæøåÆøÅöôêÊ字符串Response, AxiosError<DefaultError>, Options<NonAsciiæøåÆøÅöôêÊ字符串Data>> => {\n    const mutationOptions: MutationOptions<NonAsciiæøåÆøÅöôêÊ字符串Response, AxiosError<DefaultError>, Options<NonAsciiæøåÆøÅöôêÊ字符串Data>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await nonAsciiæøåÆøÅöôêÊ字符串({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\n/**\n * Login User\n */\nexport const putWithFormUrlEncodedMutation = (options?: Partial<Options<PutWithFormUrlEncodedData>>): MutationOptions<unknown, AxiosError<DefaultError>, Options<PutWithFormUrlEncodedData>> => {\n    const mutationOptions: MutationOptions<unknown, AxiosError<DefaultError>, Options<PutWithFormUrlEncodedData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await putWithFormUrlEncoded({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/angular-query-experimental/axios/client/client.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { AxiosError, AxiosInstance, RawAxiosRequestHeaders } from 'axios';\nimport axios from 'axios';\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 } from './types.gen';\nimport { buildUrl, createConfig, mergeConfigs, mergeHeaders, setAuthParams } from './utils.gen';\n\nexport const createClient = (config: Config = {}): Client => {\n  let _config = mergeConfigs(createConfig(), config);\n\n  let instance: AxiosInstance;\n\n  if (_config.axios && !('Axios' in _config.axios)) {\n    instance = _config.axios;\n  } else {\n    // eslint-disable-next-line @typescript-eslint/no-unused-vars\n    const { auth, ...configWithoutAuth } = _config;\n    instance = axios.create(configWithoutAuth);\n  }\n\n  const getConfig = (): Config => ({ ..._config });\n\n  const setConfig = (config: Config): Config => {\n    _config = mergeConfigs(_config, config);\n    instance.defaults = {\n      ...instance.defaults,\n      ..._config,\n      // @ts-expect-error\n      headers: mergeHeaders(instance.defaults.headers, _config.headers),\n    };\n    return getConfig();\n  };\n\n  const beforeRequest = async (options: RequestOptions) => {\n    const opts = {\n      ..._config,\n      ...options,\n      axios: options.axios ?? _config.axios ?? instance,\n      headers: mergeHeaders(_config.headers, options.headers),\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.body = opts.bodySerializer(opts.body);\n    }\n\n    const url = buildUrl(opts);\n\n    return { opts, url };\n  };\n\n  // @ts-expect-error\n  const request: Client['request'] = async (options) => {\n    // @ts-expect-error\n    const { opts, url } = await beforeRequest(options);\n    try {\n      // assign Axios here for consistency with fetch\n      const _axios = opts.axios!;\n      // eslint-disable-next-line @typescript-eslint/no-unused-vars\n      const { auth, ...optsWithoutAuth } = opts;\n      const response = await _axios({\n        ...optsWithoutAuth,\n        baseURL: '', // the baseURL is already included in `url`\n        data: getValidRequestBody(opts),\n        headers: opts.headers as RawAxiosRequestHeaders,\n        // let `paramsSerializer()` handle query params if it exists\n        params: opts.paramsSerializer ? opts.query : undefined,\n        url,\n      });\n\n      let { data } = response;\n\n      if (opts.responseType === '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 {\n        ...response,\n        data: data ?? {},\n      };\n    } catch (error) {\n      const e = error as AxiosError;\n      if (opts.throwOnError) {\n        throw e;\n      }\n      // @ts-expect-error\n      e.error = e.response?.data ?? {};\n      return e;\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 Record<string, string>,\n      method,\n      serializedBody: getValidRequestBody(opts) as BodyInit | null | undefined,\n      // @ts-expect-error\n      signal: opts.signal,\n      url,\n    });\n  };\n\n  const _buildUrl: Client['buildUrl'] = (options) =>\n    buildUrl({ axios: instance, ..._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    instance,\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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/angular-query-experimental/axios/client/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type { Auth } from '../core/auth.gen';\nexport type { QuerySerializerOptions } from '../core/bodySerializer.gen';\nexport {\n  formDataBodySerializer,\n  jsonBodySerializer,\n  urlSearchParamsBodySerializer,\n} from '../core/bodySerializer.gen';\nexport { buildClientParams } from '../core/params.gen';\nexport { serializeQueryKeyValue } from '../core/queryKeySerializer.gen';\nexport { createClient } from './client.gen';\nexport type {\n  Client,\n  ClientOptions,\n  Config,\n  CreateClientConfig,\n  Options,\n  RequestOptions,\n  RequestResult,\n  TDataShape,\n} from './types.gen';\nexport { createConfig } from './utils.gen';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/angular-query-experimental/axios/client/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type {\n  AxiosError,\n  AxiosInstance,\n  AxiosRequestHeaders,\n  AxiosResponse,\n  AxiosStatic,\n  CreateAxiosDefaults,\n} from 'axios';\n\nimport type { Auth } from '../core/auth.gen';\nimport type {\n  ServerSentEventsOptions,\n  ServerSentEventsResult,\n} from '../core/serverSentEvents.gen';\nimport type { Client as CoreClient, Config as CoreConfig } from '../core/types.gen';\n\nexport interface Config<T extends ClientOptions = ClientOptions>\n  extends Omit<CreateAxiosDefaults, 'auth' | 'baseURL' | 'headers' | 'method'>, CoreConfig {\n  /**\n   * Axios implementation. You can use this option to provide either an\n   * `AxiosStatic` or an `AxiosInstance`.\n   *\n   * @default axios\n   */\n  axios?: AxiosStatic | AxiosInstance;\n  /**\n   * Base URL for all requests made by this client.\n   */\n  baseURL?: T['baseURL'];\n  /**\n   * An object containing any HTTP headers that you want to pre-populate your\n   * `Headers` object with.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/Headers/Headers#init See more}\n   */\n  headers?:\n    | AxiosRequestHeaders\n    | Record<\n        string,\n        string | number | boolean | (string | number | boolean)[] | null | undefined | unknown\n      >;\n  /**\n   * Throw an error instead of returning it in the response?\n   *\n   * @default false\n   */\n  throwOnError?: T['throwOnError'];\n}\n\nexport interface RequestOptions<\n  TData = unknown,\n  ThrowOnError extends boolean = boolean,\n  Url extends string = string,\n>\n  extends\n    Config<{\n      throwOnError: ThrowOnError;\n    }>,\n    Pick<\n      ServerSentEventsOptions<TData>,\n      | 'onRequest'\n      | 'onSseError'\n      | 'onSseEvent'\n      | 'sseDefaultRetryDelay'\n      | 'sseMaxRetryAttempts'\n      | 'sseMaxRetryDelay'\n    > {\n  /**\n   * Any body that you want to add to your request.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/fetch#body}\n   */\n  body?: unknown;\n  path?: Record<string, unknown>;\n  query?: Record<string, unknown>;\n  /**\n   * Security mechanism(s) to use for the request.\n   */\n  security?: ReadonlyArray<Auth>;\n  url: Url;\n}\n\nexport interface ClientOptions {\n  baseURL?: string;\n  throwOnError?: boolean;\n}\n\nexport type RequestResult<\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = boolean,\n> = ThrowOnError extends true\n  ? Promise<AxiosResponse<TData extends Record<string, unknown> ? TData[keyof TData] : TData>>\n  : Promise<\n      | (AxiosResponse<TData extends Record<string, unknown> ? TData[keyof TData] : TData> & {\n          error: undefined;\n        })\n      | (AxiosError<TError extends Record<string, unknown> ? TError[keyof TError] : TError> & {\n          data: undefined;\n          error: TError extends Record<string, unknown> ? TError[keyof TError] : TError;\n        })\n    >;\n\ntype MethodFn = <TData = unknown, TError = unknown, ThrowOnError extends boolean = false>(\n  options: Omit<RequestOptions<TData, ThrowOnError>, 'method'>,\n) => RequestResult<TData, TError, ThrowOnError>;\n\ntype SseFn = <TData = unknown, TError = unknown, ThrowOnError extends boolean = false>(\n  options: Omit<RequestOptions<TData, ThrowOnError>, 'method'>,\n) => Promise<ServerSentEventsResult<TData, TError>>;\n\ntype RequestFn = <TData = unknown, TError = unknown, ThrowOnError extends boolean = false>(\n  options: Omit<RequestOptions<TData, ThrowOnError>, 'method'> &\n    Pick<Required<RequestOptions<TData, ThrowOnError>>, 'method'>,\n) => RequestResult<TData, TError, ThrowOnError>;\n\ntype BuildUrlFn = <\n  TData extends {\n    body?: unknown;\n    path?: Record<string, unknown>;\n    query?: Record<string, unknown>;\n    url: string;\n  },\n>(\n  options: TData & Options<TData>,\n) => string;\n\nexport type Client = CoreClient<RequestFn, Config, MethodFn, BuildUrlFn, SseFn> & {\n  instance: AxiosInstance;\n};\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 = ClientOptions> = (\n  override?: Config<ClientOptions & T>,\n) => Config<Required<ClientOptions> & T>;\n\nexport interface TDataShape {\n  body?: unknown;\n  headers?: unknown;\n  path?: unknown;\n  query?: unknown;\n  url: string;\n}\n\ntype OmitKeys<T, K> = Pick<T, Exclude<keyof T, K>>;\n\nexport type Options<\n  TData extends TDataShape = TDataShape,\n  ThrowOnError extends boolean = boolean,\n  TResponse = unknown,\n> = OmitKeys<RequestOptions<TResponse, ThrowOnError>, 'body' | 'path' | 'query' | 'url'> &\n  ([TData] extends [never] ? unknown : Omit<TData, 'url'>);\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/angular-query-experimental/axios/client/utils.gen.ts",
    "content": "// 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 {\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\nconst checkForExistence = (\n  options: Pick<RequestOptions, 'auth' | 'query'> & {\n    headers: Record<any, unknown>;\n  },\n  name?: string,\n): boolean => {\n  if (!name) {\n    return false;\n  }\n  if (name in options.headers || options.query?.[name]) {\n    return true;\n  }\n  if (\n    'Cookie' in options.headers &&\n    options.headers['Cookie'] &&\n    typeof options.headers['Cookie'] === 'string'\n  ) {\n    return options.headers['Cookie'].includes(`${name}=`);\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: Record<any, unknown>;\n  }) => {\n  for (const auth of security) {\n    if (checkForExistence(options, auth.name)) {\n      continue;\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        const value = `${name}=${token}`;\n        if ('Cookie' in options.headers && options.headers['Cookie']) {\n          options.headers['Cookie'] = `${options.headers['Cookie']}; ${value}`;\n        } else {\n          options.headers['Cookie'] = value;\n        }\n        break;\n      }\n      case 'header':\n      default:\n        options.headers[name] = token;\n        break;\n    }\n  }\n};\n\nexport const buildUrl: Client['buildUrl'] = (options) => {\n  const instanceBaseUrl = options.axios?.defaults?.baseURL;\n\n  const baseUrl =\n    !!options.baseURL && typeof options.baseURL === 'string' ? options.baseURL : instanceBaseUrl;\n\n  return getUrl({\n    baseUrl: baseUrl as string,\n    path: options.path,\n    // let `paramsSerializer()` handle query params if it exists\n    query: !options.paramsSerializer ? options.query : undefined,\n    querySerializer:\n      typeof options.querySerializer === 'function'\n        ? options.querySerializer\n        : createQuerySerializer(options.querySerializer),\n    url: options.url,\n  });\n};\n\nexport const mergeConfigs = (a: Config, b: Config): Config => {\n  const config = { ...a, ...b };\n  config.headers = mergeHeaders(a.headers, b.headers);\n  return config;\n};\n\n/**\n * Special Axios headers keywords allowing to set headers by request method.\n */\nexport const axiosHeadersKeywords = [\n  'common',\n  'delete',\n  'get',\n  'head',\n  'patch',\n  'post',\n  'put',\n] as const;\n\nexport const mergeHeaders = (\n  ...headers: Array<Required<Config>['headers'] | undefined>\n): Record<any, unknown> => {\n  const mergedHeaders: Record<any, unknown> = {};\n  for (const header of headers) {\n    if (!header || typeof header !== 'object') {\n      continue;\n    }\n\n    const iterator = Object.entries(header);\n\n    for (const [key, value] of iterator) {\n      if (\n        axiosHeadersKeywords.includes(key as (typeof axiosHeadersKeywords)[number]) &&\n        typeof value === 'object'\n      ) {\n        mergedHeaders[key] = {\n          ...(mergedHeaders[key] as Record<any, unknown>),\n          ...value,\n        };\n      } else if (value === null) {\n        delete mergedHeaders[key];\n      } else if (Array.isArray(value)) {\n        for (const v of value) {\n          // @ts-expect-error\n          mergedHeaders[key] = [...(mergedHeaders[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[key] = typeof value === 'object' ? JSON.stringify(value) : (value as string);\n      }\n    }\n  }\n  return mergedHeaders;\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  ...override,\n});\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/angular-query-experimental/axios/client.gen.ts",
    "content": "// 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: 'http://localhost:3000/base' }));\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/angular-query-experimental/axios/core/auth.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/angular-query-experimental/axios/core/bodySerializer.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/angular-query-experimental/axios/core/params.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/angular-query-experimental/axios/core/pathSerializer.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/angular-query-experimental/axios/core/queryKeySerializer.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\n/**\n * JSON-friendly union that mirrors what Pinia Colada can hash.\n */\nexport type JsonValue =\n  | null\n  | string\n  | number\n  | boolean\n  | JsonValue[]\n  | { [key: string]: JsonValue };\n\n/**\n * Replacer that converts non-JSON values (bigint, Date, etc.) to safe substitutes.\n */\nexport const queryKeyJsonReplacer = (_key: string, value: unknown) => {\n  if (value === undefined || typeof value === 'function' || typeof value === 'symbol') {\n    return undefined;\n  }\n  if (typeof value === 'bigint') {\n    return value.toString();\n  }\n  if (value instanceof Date) {\n    return value.toISOString();\n  }\n  return value;\n};\n\n/**\n * Safely stringifies a value and parses it back into a JsonValue.\n */\nexport const stringifyToJsonValue = (input: unknown): JsonValue | undefined => {\n  try {\n    const json = JSON.stringify(input, queryKeyJsonReplacer);\n    if (json === undefined) {\n      return undefined;\n    }\n    return JSON.parse(json) as JsonValue;\n  } catch {\n    return undefined;\n  }\n};\n\n/**\n * Detects plain objects (including objects with a null prototype).\n */\nconst isPlainObject = (value: unknown): value is Record<string, unknown> => {\n  if (value === null || typeof value !== 'object') {\n    return false;\n  }\n  const prototype = Object.getPrototypeOf(value as object);\n  return prototype === Object.prototype || prototype === null;\n};\n\n/**\n * Turns URLSearchParams into a sorted JSON object for deterministic keys.\n */\nconst serializeSearchParams = (params: URLSearchParams): JsonValue => {\n  const entries = Array.from(params.entries()).sort(([a], [b]) => a.localeCompare(b));\n  const result: Record<string, JsonValue> = {};\n\n  for (const [key, value] of entries) {\n    const existing = result[key];\n    if (existing === undefined) {\n      result[key] = value;\n      continue;\n    }\n\n    if (Array.isArray(existing)) {\n      (existing as string[]).push(value);\n    } else {\n      result[key] = [existing, value];\n    }\n  }\n\n  return result;\n};\n\n/**\n * Normalizes any accepted value into a JSON-friendly shape for query keys.\n */\nexport const serializeQueryKeyValue = (value: unknown): JsonValue | undefined => {\n  if (value === null) {\n    return null;\n  }\n\n  if (typeof value === 'string' || typeof value === 'number' || typeof value === 'boolean') {\n    return value;\n  }\n\n  if (value === undefined || typeof value === 'function' || typeof value === 'symbol') {\n    return undefined;\n  }\n\n  if (typeof value === 'bigint') {\n    return value.toString();\n  }\n\n  if (value instanceof Date) {\n    return value.toISOString();\n  }\n\n  if (Array.isArray(value)) {\n    return stringifyToJsonValue(value);\n  }\n\n  if (typeof URLSearchParams !== 'undefined' && value instanceof URLSearchParams) {\n    return serializeSearchParams(value);\n  }\n\n  if (isPlainObject(value)) {\n    return stringifyToJsonValue(value);\n  }\n\n  return undefined;\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/angular-query-experimental/axios/core/serverSentEvents.gen.ts",
    "content": "// 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 const 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            // Normalize line endings: CRLF -> LF, then CR -> LF\n            buffer = buffer.replace(/\\r\\n/g, '\\n').replace(/\\r/g, '\\n');\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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/angular-query-experimental/axios/core/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { Auth, AuthToken } from './auth.gen';\nimport type { BodySerializer, QuerySerializer, QuerySerializerOptions } from './bodySerializer.gen';\n\nexport type HttpMethod =\n  | 'connect'\n  | 'delete'\n  | 'get'\n  | 'head'\n  | 'options'\n  | 'patch'\n  | 'post'\n  | 'put'\n  | 'trace';\n\nexport type Client<\n  RequestFn = never,\n  Config = unknown,\n  MethodFn = never,\n  BuildUrlFn = never,\n  SseFn = never,\n> = {\n  /**\n   * Returns the final request URL.\n   */\n  buildUrl: BuildUrlFn;\n  getConfig: () => Config;\n  request: RequestFn;\n  setConfig: (config: Config) => Config;\n} & {\n  [K in HttpMethod]: MethodFn;\n} & ([SseFn] extends [never] ? { sse?: never } : { sse: { [K in HttpMethod]: SseFn } });\n\nexport interface Config {\n  /**\n   * Auth token or a function returning auth token. The resolved value will be\n   * added to the request payload as defined by its `security` array.\n   */\n  auth?: ((auth: Auth) => Promise<AuthToken> | AuthToken) | AuthToken;\n  /**\n   * A function for serializing request body parameter. By default,\n   * {@link JSON.stringify()} will be used.\n   */\n  bodySerializer?: BodySerializer | null;\n  /**\n   * An object containing any HTTP headers that you want to pre-populate your\n   * `Headers` object with.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/Headers/Headers#init See more}\n   */\n  headers?:\n    | RequestInit['headers']\n    | Record<\n        string,\n        string | number | boolean | (string | number | boolean)[] | null | undefined | unknown\n      >;\n  /**\n   * The request method.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/fetch#method See more}\n   */\n  method?: Uppercase<HttpMethod>;\n  /**\n   * A function for serializing request query parameters. By default, arrays\n   * will be exploded in form style, objects will be exploded in deepObject\n   * style, and reserved characters are percent-encoded.\n   *\n   * This method will have no effect if the native `paramsSerializer()` Axios\n   * API function is used.\n   *\n   * {@link https://swagger.io/docs/specification/serialization/#query View examples}\n   */\n  querySerializer?: QuerySerializer | QuerySerializerOptions;\n  /**\n   * A function validating request data. This is useful if you want to ensure\n   * the request conforms to the desired shape, so it can be safely sent to\n   * the server.\n   */\n  requestValidator?: (data: unknown) => Promise<unknown>;\n  /**\n   * A function transforming response data before it's returned. This is useful\n   * for post-processing data, e.g. converting ISO strings into Date objects.\n   */\n  responseTransformer?: (data: unknown) => Promise<unknown>;\n  /**\n   * A function validating response data. This is useful if you want to ensure\n   * the response conforms to the desired shape, so it can be safely passed to\n   * the transformers and returned to the user.\n   */\n  responseValidator?: (data: unknown) => Promise<unknown>;\n}\n\ntype IsExactlyNeverOrNeverUndefined<T> = [T] extends [never]\n  ? true\n  : [T] extends [never | undefined]\n    ? [undefined] extends [T]\n      ? false\n      : true\n    : false;\n\nexport type OmitNever<T extends Record<string, unknown>> = {\n  [K in keyof T as IsExactlyNeverOrNeverUndefined<T[K]> extends true ? never : K]: T[K];\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/angular-query-experimental/axios/core/utils.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/angular-query-experimental/axios/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport { apiVVersionODataControllerCount, callToTestOrderOfParams, callWithDefaultOptionalParameters, callWithDefaultParameters, callWithDescriptions, callWithDuplicateResponses, callWithNoContentResponse, callWithParameters, callWithResponse, callWithResponseAndNoContentResponse, callWithResponses, callWithResultFromHeader, callWithWeirdParameterNames, collectionFormat, complexParams, complexTypes, deleteCallWithoutParametersAndResponse, deleteFoo, deprecatedCall, dummyA, dummyB, duplicateName, duplicateName2, duplicateName3, duplicateName4, export_, fileResponse, fooWow, getApiVbyApiVersionSimpleOperation, getCallWithOptionalParam, getCallWithoutParametersAndResponse, headCallWithoutParametersAndResponse, import_, multipartRequest, multipartResponse, nonAsciiæøåÆøÅöôêÊ字符串, type Options, optionsCallWithoutParametersAndResponse, patchApiVbyApiVersionNoTag, patchCallWithoutParametersAndResponse, postApiVbyApiVersionFormData, postApiVbyApiVersionRequestBody, postCallWithOptionalParam, postCallWithoutParametersAndResponse, putCallWithoutParametersAndResponse, putWithFormUrlEncoded, testErrorCode, types, uploadFile } from './sdk.gen';\nexport type { _3eNum1Период, _400, AdditionalPropertiesIntegerIssue, AdditionalPropertiesUnknownIssue, AdditionalPropertiesUnknownIssue2, AdditionalPropertiesUnknownIssue3, AdditionalPropertiesUnknownIssueWritable, AnyOfAnyAndNull, AnyOfArrays, ApiVVersionODataControllerCountData, ApiVVersionODataControllerCountResponse, ApiVVersionODataControllerCountResponses, ArrayWithAnyOfProperties, ArrayWithArray, ArrayWithBooleans, ArrayWithNumbers, ArrayWithProperties, ArrayWithReferences, ArrayWithStrings, CallToTestOrderOfParamsData, CallWithDefaultOptionalParametersData, CallWithDefaultParametersData, CallWithDescriptionsData, CallWithDuplicateResponsesData, CallWithDuplicateResponsesError, CallWithDuplicateResponsesErrors, CallWithDuplicateResponsesResponse, CallWithDuplicateResponsesResponses, CallWithNoContentResponseData, CallWithNoContentResponseResponse, CallWithNoContentResponseResponses, CallWithParametersData, CallWithResponseAndNoContentResponseData, CallWithResponseAndNoContentResponseResponse, CallWithResponseAndNoContentResponseResponses, CallWithResponseData, CallWithResponseResponse, CallWithResponseResponses, CallWithResponsesData, CallWithResponsesError, CallWithResponsesErrors, CallWithResponsesResponse, CallWithResponsesResponses, CallWithResultFromHeaderData, CallWithResultFromHeaderErrors, CallWithResultFromHeaderResponses, CallWithWeirdParameterNamesData, CamelCaseCommentWithBreaks, CharactersInDescription, ClientOptions, CollectionFormatData, CommentWithBackticks, CommentWithBackticksAndQuotes, CommentWithBreaks, CommentWithExpressionPlaceholders, CommentWithQuotes, CommentWithReservedCharacters, CommentWithSlashes, ComplexParamsData, ComplexParamsResponse, ComplexParamsResponses, ComplexTypesData, ComplexTypesErrors, ComplexTypesResponse, ComplexTypesResponses, CompositionBaseModel, CompositionExtendedModel, CompositionWithAllOfAndNullable, CompositionWithAnyOf, CompositionWithAnyOfAndNullable, CompositionWithAnyOfAnonymous, CompositionWithNestedAnyAndTypeNull, CompositionWithNestedAnyOfAndNull, CompositionWithOneOf, CompositionWithOneOfAndComplexArrayDictionary, CompositionWithOneOfAndNullable, CompositionWithOneOfAndProperties, CompositionWithOneOfAndSimpleArrayDictionary, CompositionWithOneOfAndSimpleDictionary, CompositionWithOneOfAnonymous, CompositionWithOneOfDiscriminator, ConstValue, Default, DeleteCallWithoutParametersAndResponseData, DeleteFooData, DeleteFooData2, DeleteFooData3, DeprecatedCallData, DeprecatedModel, DictionaryWithArray, DictionaryWithDictionary, DictionaryWithProperties, DictionaryWithPropertiesAndAdditionalProperties, DictionaryWithReference, DictionaryWithString, DummyAData, DummyAResponse, DummyAResponses, DummyBData, DummyBResponse, DummyBResponses, DuplicateName2Data, DuplicateName3Data, DuplicateName4Data, DuplicateNameData, EnumFromDescription, EnumWithExtensions, EnumWithNumbers, EnumWithReplacedCharacters, EnumWithStrings, EnumWithXEnumNames, ExportData, ExternalRefA, ExternalRefB, ExternalSharedModel, File, FileResponseData, FileResponseResponse, FileResponseResponses, FileWritable, FooWowData, FooWowResponses, FreeFormObjectWithAdditionalPropertiesEqEmptyObject, FreeFormObjectWithAdditionalPropertiesEqTrue, FreeFormObjectWithoutAdditionalProperties, GenericSchemaDuplicateIssue1SystemBoolean, GenericSchemaDuplicateIssue1SystemBooleanWritable, GenericSchemaDuplicateIssue1SystemString, GenericSchemaDuplicateIssue1SystemStringWritable, GetApiVbyApiVersionSimpleOperationData, GetApiVbyApiVersionSimpleOperationError, GetApiVbyApiVersionSimpleOperationErrors, GetApiVbyApiVersionSimpleOperationResponse, GetApiVbyApiVersionSimpleOperationResponses, GetCallWithOptionalParamData, GetCallWithoutParametersAndResponseData, HeadCallWithoutParametersAndResponseData, Import, ImportData, ImportResponse, ImportResponses, IoK8sApimachineryPkgApisMetaV1DeleteOptions, IoK8sApimachineryPkgApisMetaV1Preconditions, ModelCircle, ModelFromZendesk, ModelSquare, ModelThatExtends, ModelThatExtendsExtends, ModelWithAdditionalPropertiesEqTrue, ModelWithAdditionalPropertiesRef, ModelWithAnyOfConstantSizeArray, ModelWithAnyOfConstantSizeArrayAndIntersect, ModelWithAnyOfConstantSizeArrayNullable, ModelWithAnyOfConstantSizeArrayWithNSizeAndOptions, ModelWithAnyOfConstantSizeArrayWithNSizeAndOptionsWritable, ModelWithArray, ModelWithArrayReadOnlyAndWriteOnly, ModelWithArrayReadOnlyAndWriteOnlyWritable, ModelWithBackticksInDescription, ModelWithBoolean, ModelWithCircularReference, ModelWithConst, ModelWithConstantSizeArray, ModelWithDictionary, ModelWithDuplicateImports, ModelWithDuplicateProperties, ModelWithEnum, ModelWithEnumFromDescription, ModelWithEnumWithHyphen, ModelWithInteger, ModelWithNestedArrayEnums, ModelWithNestedArrayEnumsData, ModelWithNestedArrayEnumsDataBar, ModelWithNestedArrayEnumsDataFoo, ModelWithNestedCompositionEnums, ModelWithNestedEnums, ModelWithNestedProperties, ModelWithNullableObject, ModelWithNullableString, ModelWithNumericEnumUnion, ModelWithOneOfAndProperties, ModelWithOneOfEnum, ModelWithOrderedProperties, ModelWithPattern, ModelWithPatternWritable, ModelWithPrefixItemsConstantSizeArray, ModelWithProperties, ModelWithPropertiesWritable, ModelWithReadOnlyAndWriteOnly, ModelWithReadOnlyAndWriteOnlyWritable, ModelWithReference, ModelWithReferenceWritable, ModelWithString, ModelWithStringError, MultipartRequestData, MultipartResponseData, MultipartResponseResponse, MultipartResponseResponses, NestedAnyOfArraysNullable, NonAsciiæøåÆøÅöôêÊ字符串Data, NonAsciiæøåÆøÅöôêÊ字符串Response, NonAsciiæøåÆøÅöôêÊ字符串Responses, NonAsciiStringæøåÆøÅöôêÊ字符串, NullableObject, OneOfAllOfIssue, OneOfAllOfIssueWritable, OptionsCallWithoutParametersAndResponseData, Pageable, ParameterSimpleParameterUnused, PatchApiVbyApiVersionNoTagData, PatchApiVbyApiVersionNoTagResponses, PatchCallWithoutParametersAndResponseData, PostApiVbyApiVersionFormDataData, PostApiVbyApiVersionRequestBodyData, PostCallWithOptionalParamData, PostCallWithOptionalParamResponse, PostCallWithOptionalParamResponses, PostCallWithoutParametersAndResponseData, PostServiceWithEmptyTagResponse, PostServiceWithEmptyTagResponse2, PutCallWithoutParametersAndResponseData, PutWithFormUrlEncodedData, SchemaWithFormRestrictedKeys, SimpleBoolean, SimpleFile, SimpleFormData, SimpleInteger, SimpleParameter, SimpleReference, SimpleRequestBody, SimpleString, SimpleStringWithPattern, TestErrorCodeData, TestErrorCodeErrors, TestErrorCodeResponses, TypesData, TypesResponse, TypesResponses, UploadFileData, UploadFileResponse, UploadFileResponses, XFooBar } from './types.gen';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/angular-query-experimental/axios/sdk.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport { type Client, formDataBodySerializer, type Options as Options2, type TDataShape, urlSearchParamsBodySerializer } from './client';\nimport { client } from './client.gen';\nimport type { ApiVVersionODataControllerCountData, ApiVVersionODataControllerCountResponses, CallToTestOrderOfParamsData, CallWithDefaultOptionalParametersData, CallWithDefaultParametersData, CallWithDescriptionsData, CallWithDuplicateResponsesData, CallWithDuplicateResponsesErrors, CallWithDuplicateResponsesResponses, CallWithNoContentResponseData, CallWithNoContentResponseResponses, CallWithParametersData, CallWithResponseAndNoContentResponseData, CallWithResponseAndNoContentResponseResponses, CallWithResponseData, CallWithResponseResponses, CallWithResponsesData, CallWithResponsesErrors, CallWithResponsesResponses, CallWithResultFromHeaderData, CallWithResultFromHeaderErrors, CallWithResultFromHeaderResponses, CallWithWeirdParameterNamesData, CollectionFormatData, ComplexParamsData, ComplexParamsResponses, ComplexTypesData, ComplexTypesErrors, ComplexTypesResponses, DeleteCallWithoutParametersAndResponseData, DeleteFooData3, DeprecatedCallData, DummyAData, DummyAResponses, DummyBData, DummyBResponses, DuplicateName2Data, DuplicateName3Data, DuplicateName4Data, DuplicateNameData, ExportData, FileResponseData, FileResponseResponses, FooWowData, FooWowResponses, GetApiVbyApiVersionSimpleOperationData, GetApiVbyApiVersionSimpleOperationErrors, GetApiVbyApiVersionSimpleOperationResponses, GetCallWithOptionalParamData, GetCallWithoutParametersAndResponseData, HeadCallWithoutParametersAndResponseData, ImportData, ImportResponses, MultipartRequestData, MultipartResponseData, MultipartResponseResponses, NonAsciiæøåÆøÅöôêÊ字符串Data, NonAsciiæøåÆøÅöôêÊ字符串Responses, OptionsCallWithoutParametersAndResponseData, PatchApiVbyApiVersionNoTagData, PatchApiVbyApiVersionNoTagResponses, PatchCallWithoutParametersAndResponseData, PostApiVbyApiVersionFormDataData, PostApiVbyApiVersionRequestBodyData, PostCallWithOptionalParamData, PostCallWithOptionalParamResponses, PostCallWithoutParametersAndResponseData, PutCallWithoutParametersAndResponseData, PutWithFormUrlEncodedData, TestErrorCodeData, TestErrorCodeErrors, TestErrorCodeResponses, TypesData, TypesResponses, UploadFileData, UploadFileResponses } from './types.gen';\n\nexport type Options<TData extends TDataShape = TDataShape, ThrowOnError extends boolean = boolean> = Options2<TData, ThrowOnError> & {\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\nexport const export_ = <ThrowOnError extends boolean = false>(options?: Options<ExportData, ThrowOnError>) => (options?.client ?? client).get<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/no+tag', ...options });\n\nexport const patchApiVbyApiVersionNoTag = <ThrowOnError extends boolean = false>(options?: Options<PatchApiVbyApiVersionNoTagData, ThrowOnError>) => (options?.client ?? client).patch<PatchApiVbyApiVersionNoTagResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/no+tag', ...options });\n\nexport const import_ = <ThrowOnError extends boolean = false>(options: Options<ImportData, ThrowOnError>) => (options.client ?? client).post<ImportResponses, unknown, ThrowOnError>({\n    responseType: 'json',\n    url: '/api/v{api-version}/no+tag',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options.headers\n    }\n});\n\nexport const fooWow = <ThrowOnError extends boolean = false>(options?: Options<FooWowData, ThrowOnError>) => (options?.client ?? client).put<FooWowResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/no+tag', ...options });\n\nexport const apiVVersionODataControllerCount = <ThrowOnError extends boolean = false>(options?: Options<ApiVVersionODataControllerCountData, ThrowOnError>) => (options?.client ?? client).get<ApiVVersionODataControllerCountResponses, unknown, ThrowOnError>({\n    responseType: 'json',\n    url: '/api/v{api-version}/simple/$count',\n    ...options\n});\n\nexport const getApiVbyApiVersionSimpleOperation = <ThrowOnError extends boolean = false>(options: Options<GetApiVbyApiVersionSimpleOperationData, ThrowOnError>) => (options.client ?? client).get<GetApiVbyApiVersionSimpleOperationResponses, GetApiVbyApiVersionSimpleOperationErrors, ThrowOnError>({\n    responseType: 'json',\n    url: '/api/v{api-version}/simple:operation',\n    ...options\n});\n\nexport const deleteCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<DeleteCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).delete<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const getCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<GetCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).get<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const headCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<HeadCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).head<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const optionsCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<OptionsCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).options<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const patchCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<PatchCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).patch<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const postCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<PostCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).post<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const putCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<PutCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).put<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const deleteFoo = <ThrowOnError extends boolean = false>(options: Options<DeleteFooData3, ThrowOnError>) => (options.client ?? client).delete<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/foo/{foo_param}/bar/{BarParam}', ...options });\n\nexport const callWithDescriptions = <ThrowOnError extends boolean = false>(options?: Options<CallWithDescriptionsData, ThrowOnError>) => (options?.client ?? client).post<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/descriptions', ...options });\n\n/**\n * @deprecated\n */\nexport const deprecatedCall = <ThrowOnError extends boolean = false>(options: Options<DeprecatedCallData, ThrowOnError>) => (options.client ?? client).post<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/parameters/deprecated', ...options });\n\nexport const callWithParameters = <ThrowOnError extends boolean = false>(options: Options<CallWithParametersData, ThrowOnError>) => (options.client ?? client).post<unknown, unknown, ThrowOnError>({\n    url: '/api/v{api-version}/parameters/{parameterPath}',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options.headers\n    }\n});\n\nexport const callWithWeirdParameterNames = <ThrowOnError extends boolean = false>(options: Options<CallWithWeirdParameterNamesData, ThrowOnError>) => (options.client ?? client).post<unknown, unknown, ThrowOnError>({\n    url: '/api/v{api-version}/parameters/{parameter.path.1}/{parameter-path-2}/{PARAMETER-PATH-3}',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options.headers\n    }\n});\n\nexport const getCallWithOptionalParam = <ThrowOnError extends boolean = false>(options: Options<GetCallWithOptionalParamData, ThrowOnError>) => (options.client ?? client).get<unknown, unknown, ThrowOnError>({\n    url: '/api/v{api-version}/parameters',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options.headers\n    }\n});\n\nexport const postCallWithOptionalParam = <ThrowOnError extends boolean = false>(options: Options<PostCallWithOptionalParamData, ThrowOnError>) => (options.client ?? client).post<PostCallWithOptionalParamResponses, unknown, ThrowOnError>({\n    responseType: 'json',\n    url: '/api/v{api-version}/parameters',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options.headers\n    }\n});\n\nexport const postApiVbyApiVersionRequestBody = <ThrowOnError extends boolean = false>(options?: Options<PostApiVbyApiVersionRequestBodyData, ThrowOnError>) => (options?.client ?? client).post<unknown, unknown, ThrowOnError>({\n    url: '/api/v{api-version}/requestBody',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options?.headers\n    }\n});\n\nexport const postApiVbyApiVersionFormData = <ThrowOnError extends boolean = false>(options?: Options<PostApiVbyApiVersionFormDataData, ThrowOnError>) => (options?.client ?? client).post<unknown, unknown, ThrowOnError>({\n    ...formDataBodySerializer,\n    url: '/api/v{api-version}/formData',\n    ...options,\n    headers: {\n        'Content-Type': null,\n        ...options?.headers\n    }\n});\n\nexport const callWithDefaultParameters = <ThrowOnError extends boolean = false>(options?: Options<CallWithDefaultParametersData, ThrowOnError>) => (options?.client ?? client).get<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/defaults', ...options });\n\nexport const callWithDefaultOptionalParameters = <ThrowOnError extends boolean = false>(options?: Options<CallWithDefaultOptionalParametersData, ThrowOnError>) => (options?.client ?? client).post<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/defaults', ...options });\n\nexport const callToTestOrderOfParams = <ThrowOnError extends boolean = false>(options: Options<CallToTestOrderOfParamsData, ThrowOnError>) => (options.client ?? client).put<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/defaults', ...options });\n\nexport const duplicateName = <ThrowOnError extends boolean = false>(options?: Options<DuplicateNameData, ThrowOnError>) => (options?.client ?? client).delete<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/duplicate', ...options });\n\nexport const duplicateName2 = <ThrowOnError extends boolean = false>(options?: Options<DuplicateName2Data, ThrowOnError>) => (options?.client ?? client).get<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/duplicate', ...options });\n\nexport const duplicateName3 = <ThrowOnError extends boolean = false>(options?: Options<DuplicateName3Data, ThrowOnError>) => (options?.client ?? client).post<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/duplicate', ...options });\n\nexport const duplicateName4 = <ThrowOnError extends boolean = false>(options?: Options<DuplicateName4Data, ThrowOnError>) => (options?.client ?? client).put<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/duplicate', ...options });\n\nexport const callWithNoContentResponse = <ThrowOnError extends boolean = false>(options?: Options<CallWithNoContentResponseData, ThrowOnError>) => (options?.client ?? client).get<CallWithNoContentResponseResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/no-content', ...options });\n\nexport const callWithResponseAndNoContentResponse = <ThrowOnError extends boolean = false>(options?: Options<CallWithResponseAndNoContentResponseData, ThrowOnError>) => (options?.client ?? client).get<CallWithResponseAndNoContentResponseResponses, unknown, ThrowOnError>({\n    responseType: 'json',\n    url: '/api/v{api-version}/multiple-tags/response-and-no-content',\n    ...options\n});\n\nexport const dummyA = <ThrowOnError extends boolean = false>(options?: Options<DummyAData, ThrowOnError>) => (options?.client ?? client).get<DummyAResponses, unknown, ThrowOnError>({\n    responseType: 'json',\n    url: '/api/v{api-version}/multiple-tags/a',\n    ...options\n});\n\nexport const dummyB = <ThrowOnError extends boolean = false>(options?: Options<DummyBData, ThrowOnError>) => (options?.client ?? client).get<DummyBResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/multiple-tags/b', ...options });\n\nexport const callWithResponse = <ThrowOnError extends boolean = false>(options?: Options<CallWithResponseData, ThrowOnError>) => (options?.client ?? client).get<CallWithResponseResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/response', ...options });\n\nexport const callWithDuplicateResponses = <ThrowOnError extends boolean = false>(options?: Options<CallWithDuplicateResponsesData, ThrowOnError>) => (options?.client ?? client).post<CallWithDuplicateResponsesResponses, CallWithDuplicateResponsesErrors, ThrowOnError>({\n    responseType: 'json',\n    url: '/api/v{api-version}/response',\n    ...options\n});\n\nexport const callWithResponses = <ThrowOnError extends boolean = false>(options?: Options<CallWithResponsesData, ThrowOnError>) => (options?.client ?? client).put<CallWithResponsesResponses, CallWithResponsesErrors, ThrowOnError>({\n    responseType: 'json',\n    url: '/api/v{api-version}/response',\n    ...options\n});\n\nexport const collectionFormat = <ThrowOnError extends boolean = false>(options: Options<CollectionFormatData, ThrowOnError>) => (options.client ?? client).get<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/collectionFormat', ...options });\n\nexport const types = <ThrowOnError extends boolean = false>(options: Options<TypesData, ThrowOnError>) => (options.client ?? client).get<TypesResponses, unknown, ThrowOnError>({\n    responseType: 'json',\n    url: '/api/v{api-version}/types',\n    ...options\n});\n\nexport const uploadFile = <ThrowOnError extends boolean = false>(options: Options<UploadFileData, ThrowOnError>) => (options.client ?? client).post<UploadFileResponses, unknown, ThrowOnError>({\n    ...urlSearchParamsBodySerializer,\n    responseType: 'json',\n    url: '/api/v{api-version}/upload',\n    ...options,\n    headers: {\n        'Content-Type': 'application/x-www-form-urlencoded',\n        ...options.headers\n    }\n});\n\nexport const fileResponse = <ThrowOnError extends boolean = false>(options: Options<FileResponseData, ThrowOnError>) => (options.client ?? client).get<FileResponseResponses, unknown, ThrowOnError>({\n    responseType: 'blob',\n    url: '/api/v{api-version}/file/{id}',\n    ...options\n});\n\nexport const complexTypes = <ThrowOnError extends boolean = false>(options: Options<ComplexTypesData, ThrowOnError>) => (options.client ?? client).get<ComplexTypesResponses, ComplexTypesErrors, ThrowOnError>({\n    querySerializer: { parameters: { parameterObject: { object: { style: 'form' } } } },\n    responseType: 'json',\n    url: '/api/v{api-version}/complex',\n    ...options\n});\n\nexport const multipartResponse = <ThrowOnError extends boolean = false>(options?: Options<MultipartResponseData, ThrowOnError>) => (options?.client ?? client).get<MultipartResponseResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/multipart', ...options });\n\nexport const multipartRequest = <ThrowOnError extends boolean = false>(options?: Options<MultipartRequestData, ThrowOnError>) => (options?.client ?? client).post<unknown, unknown, ThrowOnError>({\n    ...formDataBodySerializer,\n    url: '/api/v{api-version}/multipart',\n    ...options,\n    headers: {\n        'Content-Type': null,\n        ...options?.headers\n    }\n});\n\nexport const complexParams = <ThrowOnError extends boolean = false>(options: Options<ComplexParamsData, ThrowOnError>) => (options.client ?? client).put<ComplexParamsResponses, unknown, ThrowOnError>({\n    responseType: 'json',\n    url: '/api/v{api-version}/complex/{id}',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json-patch+json',\n        ...options.headers\n    }\n});\n\nexport const callWithResultFromHeader = <ThrowOnError extends boolean = false>(options?: Options<CallWithResultFromHeaderData, ThrowOnError>) => (options?.client ?? client).post<CallWithResultFromHeaderResponses, CallWithResultFromHeaderErrors, ThrowOnError>({ url: '/api/v{api-version}/header', ...options });\n\nexport const testErrorCode = <ThrowOnError extends boolean = false>(options: Options<TestErrorCodeData, ThrowOnError>) => (options.client ?? client).post<TestErrorCodeResponses, TestErrorCodeErrors, ThrowOnError>({ url: '/api/v{api-version}/error', ...options });\n\nexport const nonAsciiæøåÆøÅöôêÊ字符串 = <ThrowOnError extends boolean = false>(options: Options<NonAsciiæøåÆøÅöôêÊ字符串Data, ThrowOnError>) => (options.client ?? client).post<NonAsciiæøåÆøÅöôêÊ字符串Responses, unknown, ThrowOnError>({\n    responseType: 'json',\n    url: '/api/v{api-version}/non-ascii-æøåÆØÅöôêÊ字符串',\n    ...options\n});\n\n/**\n * Login User\n */\nexport const putWithFormUrlEncoded = <ThrowOnError extends boolean = false>(options: Options<PutWithFormUrlEncodedData, ThrowOnError>) => (options.client ?? client).put<unknown, unknown, ThrowOnError>({\n    ...urlSearchParamsBodySerializer,\n    url: '/api/v{api-version}/non-ascii-æøåÆØÅöôêÊ字符串',\n    ...options,\n    headers: {\n        'Content-Type': 'application/x-www-form-urlencoded',\n        ...options.headers\n    }\n});\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/angular-query-experimental/axios/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type ClientOptions = {\n    baseURL: 'http://localhost:3000/base' | (string & {});\n};\n\n/**\n * Model with number-only name\n */\nexport type _400 = string;\n\nexport type ExternalRefA = ExternalSharedModel;\n\nexport type ExternalRefB = ExternalSharedModel;\n\n/**\n * Testing multiline comments in string: First line\n * Second line\n *\n * Fourth line\n */\nexport type CamelCaseCommentWithBreaks = number;\n\n/**\n * Testing multiline comments in string: First line\n * Second line\n *\n * Fourth line\n */\nexport type CommentWithBreaks = number;\n\n/**\n * Testing backticks in string: `backticks` and ```multiple backticks``` should work\n */\nexport type CommentWithBackticks = number;\n\n/**\n * Testing backticks and quotes in string: `backticks`, 'quotes', \"double quotes\" and ```multiple backticks``` should work\n */\nexport type CommentWithBackticksAndQuotes = number;\n\n/**\n * Testing slashes in string: \\backwards\\\\\\ and /forwards/// should work\n */\nexport type CommentWithSlashes = number;\n\n/**\n * Testing expression placeholders in string: ${expression} should work\n */\nexport type CommentWithExpressionPlaceholders = number;\n\n/**\n * Testing quotes in string: 'single quote''' and \"double quotes\"\"\" should work\n */\nexport type CommentWithQuotes = number;\n\n/**\n * Testing reserved characters in string: * inline * and ** inline ** should work\n */\nexport type CommentWithReservedCharacters = number;\n\n/**\n * This is a simple number\n */\nexport type SimpleInteger = number;\n\n/**\n * This is a simple boolean\n */\nexport type SimpleBoolean = boolean;\n\n/**\n * This is a simple string\n */\nexport type SimpleString = string;\n\n/**\n * A string with non-ascii (unicode) characters valid in typescript identifiers (æøåÆØÅöÔèÈ字符串)\n */\nexport type NonAsciiStringæøåÆøÅöôêÊ字符串 = string;\n\n/**\n * This is a simple file\n */\nexport type SimpleFile = Blob | File;\n\n/**\n * This is a simple reference\n */\nexport type SimpleReference = ModelWithString;\n\n/**\n * This is a simple string\n */\nexport type SimpleStringWithPattern = string | null;\n\n/**\n * This is a simple enum with strings\n */\nexport type EnumWithStrings = 'Success' | 'Warning' | 'Error' | '\\'Single Quote\\'' | '\"Double Quotes\"' | 'Non-ascii: øæåôöØÆÅÔÖ字符串';\n\nexport type EnumWithReplacedCharacters = '\\'Single Quote\\'' | '\"Double Quotes\"' | 'øæåôöØÆÅÔÖ字符串' | 3.1 | '';\n\n/**\n * This is a simple enum with numbers\n */\nexport type EnumWithNumbers = 1 | 2 | 3 | 1.1 | 1.2 | 1.3 | 100 | 200 | 300 | -100 | -200 | -300 | -1.1 | -1.2 | -1.3;\n\n/**\n * Success=1,Warning=2,Error=3\n */\nexport type EnumFromDescription = number;\n\n/**\n * This is a simple enum with numbers\n */\nexport type EnumWithExtensions = 200 | 400 | 500;\n\nexport type EnumWithXEnumNames = 0 | 1 | 2;\n\n/**\n * This is a simple array with numbers\n */\nexport type ArrayWithNumbers = Array<number>;\n\n/**\n * This is a simple array with booleans\n */\nexport type ArrayWithBooleans = Array<boolean>;\n\n/**\n * This is a simple array with strings\n */\nexport type ArrayWithStrings = Array<string>;\n\n/**\n * This is a simple array with references\n */\nexport type ArrayWithReferences = Array<ModelWithString>;\n\n/**\n * This is a simple array containing an array\n */\nexport type ArrayWithArray = Array<Array<ModelWithString>>;\n\n/**\n * This is a simple array with properties\n */\nexport type ArrayWithProperties = Array<{\n    '16x16'?: CamelCaseCommentWithBreaks;\n    bar?: string;\n}>;\n\n/**\n * This is a simple array with any of properties\n */\nexport type ArrayWithAnyOfProperties = Array<{\n    foo?: string;\n} | {\n    bar?: string;\n}>;\n\nexport type AnyOfAnyAndNull = {\n    data?: unknown;\n};\n\n/**\n * This is a simple array with any of properties\n */\nexport type AnyOfArrays = {\n    results?: Array<{\n        foo?: string;\n    } | {\n        bar?: string;\n    }>;\n};\n\n/**\n * This is a string dictionary\n */\nexport type DictionaryWithString = {\n    [key: string]: string;\n};\n\nexport type DictionaryWithPropertiesAndAdditionalProperties = {\n    foo?: number;\n    bar?: boolean;\n    [key: string]: string | number | boolean | undefined;\n};\n\n/**\n * This is a string reference\n */\nexport type DictionaryWithReference = {\n    [key: string]: ModelWithString;\n};\n\n/**\n * This is a complex dictionary\n */\nexport type DictionaryWithArray = {\n    [key: string]: Array<ModelWithString>;\n};\n\n/**\n * This is a string dictionary\n */\nexport type DictionaryWithDictionary = {\n    [key: string]: {\n        [key: string]: string;\n    };\n};\n\n/**\n * This is a complex dictionary\n */\nexport type DictionaryWithProperties = {\n    [key: string]: {\n        foo?: string;\n        bar?: string;\n    };\n};\n\n/**\n * This is a model with one number property\n */\nexport type ModelWithInteger = {\n    /**\n     * This is a simple number property\n     */\n    prop?: number;\n};\n\n/**\n * This is a model with one boolean property\n */\nexport type ModelWithBoolean = {\n    /**\n     * This is a simple boolean property\n     */\n    prop?: boolean;\n};\n\n/**\n * This is a model with one string property\n */\nexport type ModelWithString = {\n    /**\n     * This is a simple string property\n     */\n    prop?: string;\n};\n\n/**\n * This is a model with one string property\n */\nexport type ModelWithStringError = {\n    /**\n     * This is a simple string property\n     */\n    prop?: string;\n};\n\n/**\n * `Comment` or `VoiceComment`. The JSON object for adding voice comments to tickets is different. See [Adding voice comments to tickets](/documentation/ticketing/managing-tickets/adding-voice-comments-to-tickets)\n */\nexport type ModelFromZendesk = string;\n\n/**\n * This is a model with one string property\n */\nexport type ModelWithNullableString = {\n    /**\n     * This is a simple string property\n     */\n    nullableProp1?: string | null;\n    /**\n     * This is a simple string property\n     */\n    nullableRequiredProp1: string | null;\n    /**\n     * This is a simple string property\n     */\n    nullableProp2?: string | null;\n    /**\n     * This is a simple string property\n     */\n    nullableRequiredProp2: string | null;\n    /**\n     * This is a simple enum with strings\n     */\n    'foo_bar-enum'?: 'Success' | 'Warning' | 'Error' | 'ØÆÅ字符串';\n};\n\n/**\n * This is a model with one enum\n */\nexport type ModelWithEnum = {\n    /**\n     * This is a simple enum with strings\n     */\n    'foo_bar-enum'?: 'Success' | 'Warning' | 'Error' | 'ØÆÅ字符串';\n    /**\n     * These are the HTTP error code enums\n     */\n    statusCode?: '100' | '200 FOO' | '300 FOO_BAR' | '400 foo-bar' | '500 foo.bar' | '600 foo&bar';\n    /**\n     * Simple boolean enum\n     */\n    bool?: true;\n};\n\n/**\n * This is a model with one enum with escaped name\n */\nexport type ModelWithEnumWithHyphen = {\n    /**\n     * Foo-Bar-Baz-Qux\n     */\n    'foo-bar-baz-qux'?: '3.0';\n};\n\n/**\n * This is a model with one enum\n */\nexport type ModelWithEnumFromDescription = {\n    /**\n     * Success=1,Warning=2,Error=3\n     */\n    test?: number;\n};\n\n/**\n * This is a model with nested enums\n */\nexport type ModelWithNestedEnums = {\n    dictionaryWithEnum?: {\n        [key: string]: 'Success' | 'Warning' | 'Error';\n    };\n    dictionaryWithEnumFromDescription?: {\n        [key: string]: number;\n    };\n    arrayWithEnum?: Array<'Success' | 'Warning' | 'Error'>;\n    arrayWithDescription?: Array<number>;\n    /**\n     * This is a simple enum with strings\n     */\n    'foo_bar-enum'?: 'Success' | 'Warning' | 'Error' | 'ØÆÅ字符串';\n};\n\n/**\n * This is a model with one property containing a reference\n */\nexport type ModelWithReference = {\n    prop?: ModelWithProperties;\n};\n\n/**\n * This is a model with one property containing an array\n */\nexport type ModelWithArrayReadOnlyAndWriteOnly = {\n    prop?: Array<ModelWithReadOnlyAndWriteOnly>;\n    propWithFile?: Array<Blob | File>;\n    propWithNumber?: Array<number>;\n};\n\n/**\n * This is a model with one property containing an array\n */\nexport type ModelWithArray = {\n    prop?: Array<ModelWithString>;\n    propWithFile?: Array<Blob | File>;\n    propWithNumber?: Array<number>;\n};\n\n/**\n * This is a model with one property containing a dictionary\n */\nexport type ModelWithDictionary = {\n    prop?: {\n        [key: string]: string;\n    };\n};\n\n/**\n * This is a deprecated model with a deprecated property\n *\n * @deprecated\n */\nexport type DeprecatedModel = {\n    /**\n     * This is a deprecated property\n     *\n     * @deprecated\n     */\n    prop?: string;\n};\n\n/**\n * This is a model with one property containing a circular reference\n */\nexport type ModelWithCircularReference = {\n    prop?: ModelWithCircularReference;\n};\n\n/**\n * This is a model with one property with a 'one of' relationship\n */\nexport type CompositionWithOneOf = {\n    propA?: ModelWithString | ModelWithEnum | ModelWithArray | ModelWithDictionary;\n};\n\n/**\n * This is a model with one property with a 'one of' relationship where the options are not $ref\n */\nexport type CompositionWithOneOfAnonymous = {\n    propA?: {\n        propA?: string;\n    } | string | number;\n};\n\n/**\n * Circle\n */\nexport type ModelCircle = {\n    kind: string;\n    radius?: number;\n};\n\n/**\n * Square\n */\nexport type ModelSquare = {\n    kind: string;\n    sideLength?: number;\n};\n\n/**\n * This is a model with one property with a 'one of' relationship where the options are not $ref\n */\nexport type CompositionWithOneOfDiscriminator = ({\n    kind: 'circle';\n} & ModelCircle) | ({\n    kind: 'square';\n} & ModelSquare);\n\n/**\n * This is a model with one property with a 'any of' relationship\n */\nexport type CompositionWithAnyOf = {\n    propA?: ModelWithString | ModelWithEnum | ModelWithArray | ModelWithDictionary;\n};\n\n/**\n * This is a model with one property with a 'any of' relationship where the options are not $ref\n */\nexport type CompositionWithAnyOfAnonymous = {\n    propA?: {\n        propA?: string;\n    } | string | number;\n};\n\n/**\n * This is a model with nested 'any of' property with a type null\n */\nexport type CompositionWithNestedAnyAndTypeNull = {\n    propA?: Array<ModelWithDictionary | null> | Array<ModelWithArray | null>;\n};\n\nexport type _3eNum1Период = 'Bird' | 'Dog';\n\nexport type ConstValue = 'ConstValue';\n\n/**\n * This is a model with one property with a 'any of' relationship where the options are not $ref\n */\nexport type CompositionWithNestedAnyOfAndNull = {\n    propA?: Array<_3eNum1Период | ConstValue> | null;\n};\n\n/**\n * This is a model with one property with a 'one of' relationship\n */\nexport type CompositionWithOneOfAndNullable = {\n    propA?: {\n        boolean?: boolean;\n    } | ModelWithEnum | ModelWithArray | ModelWithDictionary | null;\n};\n\n/**\n * This is a model that contains a simple dictionary within composition\n */\nexport type CompositionWithOneOfAndSimpleDictionary = {\n    propA?: boolean | {\n        [key: string]: number;\n    };\n};\n\n/**\n * This is a model that contains a dictionary of simple arrays within composition\n */\nexport type CompositionWithOneOfAndSimpleArrayDictionary = {\n    propA?: boolean | {\n        [key: string]: Array<boolean>;\n    };\n};\n\n/**\n * This is a model that contains a dictionary of complex arrays (composited) within composition\n */\nexport type CompositionWithOneOfAndComplexArrayDictionary = {\n    propA?: boolean | {\n        [key: string]: Array<number | string>;\n    };\n};\n\n/**\n * This is a model with one property with a 'all of' relationship\n */\nexport type CompositionWithAllOfAndNullable = {\n    propA?: ({\n        boolean?: boolean;\n    } & ModelWithEnum & ModelWithArray & ModelWithDictionary) | null;\n};\n\n/**\n * This is a model with one property with a 'any of' relationship\n */\nexport type CompositionWithAnyOfAndNullable = {\n    propA?: {\n        boolean?: boolean;\n    } | ModelWithEnum | ModelWithArray | ModelWithDictionary | null;\n};\n\n/**\n * This is a base model with two simple optional properties\n */\nexport type CompositionBaseModel = {\n    firstName?: string;\n    lastname?: string;\n};\n\n/**\n * This is a model that extends the base model\n */\nexport type CompositionExtendedModel = CompositionBaseModel & {\n    age: number;\n    firstName: string;\n    lastname: string;\n};\n\n/**\n * This is a model with one nested property\n */\nexport type ModelWithProperties = {\n    required: string;\n    readonly requiredAndReadOnly: string;\n    requiredAndNullable: string | null;\n    string?: string;\n    number?: number;\n    boolean?: boolean;\n    reference?: ModelWithString;\n    'property with space'?: string;\n    default?: string;\n    try?: string;\n    readonly '@namespace.string'?: string;\n    readonly '@namespace.integer'?: number;\n};\n\n/**\n * This is a model with one nested property\n */\nexport type ModelWithNestedProperties = {\n    readonly first: {\n        readonly second: {\n            readonly third: string | null;\n        } | null;\n    } | null;\n};\n\n/**\n * This is a model with duplicated properties\n */\nexport type ModelWithDuplicateProperties = {\n    prop?: ModelWithString;\n};\n\n/**\n * This is a model with ordered properties\n */\nexport type ModelWithOrderedProperties = {\n    zebra?: string;\n    apple?: string;\n    hawaii?: string;\n};\n\n/**\n * This is a model with duplicated imports\n */\nexport type ModelWithDuplicateImports = {\n    propA?: ModelWithString;\n    propB?: ModelWithString;\n    propC?: ModelWithString;\n};\n\n/**\n * This is a model that extends another model\n */\nexport type ModelThatExtends = ModelWithString & {\n    propExtendsA?: string;\n    propExtendsB?: ModelWithString;\n};\n\n/**\n * This is a model that extends another model\n */\nexport type ModelThatExtendsExtends = ModelWithString & ModelThatExtends & {\n    propExtendsC?: string;\n    propExtendsD?: ModelWithString;\n};\n\n/**\n * This is a model that contains a some patterns\n */\nexport type ModelWithPattern = {\n    key: string;\n    name: string;\n    readonly enabled?: boolean;\n    readonly modified?: string;\n    id?: string;\n    text?: string;\n    patternWithSingleQuotes?: string;\n    patternWithNewline?: string;\n    patternWithBacktick?: string;\n    patternWithUnicode?: string;\n};\n\nexport type File = {\n    /**\n     * Id\n     */\n    readonly id?: string;\n    /**\n     * Updated at\n     */\n    readonly updated_at?: string;\n    /**\n     * Created at\n     */\n    readonly created_at?: string;\n    /**\n     * Mime\n     */\n    mime: string;\n    /**\n     * File\n     */\n    readonly file?: string;\n};\n\nexport type Default = {\n    name?: string;\n};\n\nexport type Pageable = {\n    page?: number;\n    size?: number;\n    sort?: Array<string>;\n};\n\n/**\n * This is a free-form object without additionalProperties.\n */\nexport type FreeFormObjectWithoutAdditionalProperties = {\n    [key: string]: unknown;\n};\n\n/**\n * This is a free-form object with additionalProperties: true.\n */\nexport type FreeFormObjectWithAdditionalPropertiesEqTrue = {\n    [key: string]: unknown;\n};\n\n/**\n * This is a free-form object with additionalProperties: {}.\n */\nexport type FreeFormObjectWithAdditionalPropertiesEqEmptyObject = {\n    [key: string]: unknown;\n};\n\nexport type ModelWithConst = {\n    String?: 'String';\n    number?: 0;\n    null?: unknown;\n    withType?: 'Some string';\n};\n\n/**\n * This is a model with one property and additionalProperties: true\n */\nexport type ModelWithAdditionalPropertiesEqTrue = {\n    /**\n     * This is a simple string property\n     */\n    prop?: string;\n    [key: string]: unknown;\n};\n\nexport type NestedAnyOfArraysNullable = {\n    nullableArray?: Array<string | boolean> | null;\n};\n\nexport type CompositionWithOneOfAndProperties = ({\n    foo: SimpleParameter;\n} | {\n    bar: NonAsciiStringæøåÆøÅöôêÊ字符串;\n}) & {\n    baz: number | null;\n    qux: number;\n};\n\n/**\n * An object that can be null\n */\nexport type NullableObject = {\n    foo?: string;\n} | null;\n\n/**\n * Some % character\n */\nexport type CharactersInDescription = string;\n\nexport type ModelWithNullableObject = {\n    data?: NullableObject;\n};\n\n/**\n * An object with additional properties that can be null\n */\nexport type ModelWithAdditionalPropertiesRef = {\n    [key: string]: NullableObject | null;\n};\n\nexport type ModelWithOneOfEnum = {\n    foo: 'Bar';\n} | {\n    foo: 'Baz';\n} | {\n    foo: 'Qux';\n} | {\n    content: string;\n    foo: 'Quux';\n} | {\n    content: [\n        string,\n        string\n    ];\n    foo: 'Corge';\n};\n\nexport type ModelWithNestedArrayEnumsDataFoo = 'foo' | 'bar';\n\nexport type ModelWithNestedArrayEnumsDataBar = 'baz' | 'qux';\n\nexport type ModelWithNestedArrayEnumsData = {\n    foo?: Array<ModelWithNestedArrayEnumsDataFoo>;\n    bar?: Array<ModelWithNestedArrayEnumsDataBar>;\n};\n\nexport type ModelWithNestedArrayEnums = {\n    array_strings?: Array<string>;\n    data?: ModelWithNestedArrayEnumsData;\n};\n\nexport type ModelWithNestedCompositionEnums = {\n    foo?: ModelWithNestedArrayEnumsDataFoo;\n};\n\nexport type ModelWithReadOnlyAndWriteOnly = {\n    foo: string;\n    readonly bar: string;\n};\n\nexport type ModelWithConstantSizeArray = [\n    number,\n    number\n];\n\nexport type ModelWithAnyOfConstantSizeArray = [\n    number | string,\n    number | string,\n    number | string\n];\n\nexport type ModelWithPrefixItemsConstantSizeArray = Array<ModelWithInteger | number | string>;\n\nexport type ModelWithAnyOfConstantSizeArrayNullable = [\n    number | null | string,\n    number | null | string,\n    number | null | string\n];\n\nexport type ModelWithAnyOfConstantSizeArrayWithNSizeAndOptions = [\n    number | Import,\n    number | Import\n];\n\nexport type ModelWithAnyOfConstantSizeArrayAndIntersect = [\n    number & string,\n    number & string\n];\n\nexport type ModelWithNumericEnumUnion = {\n    /**\n     * Период\n     */\n    value?: -10 | -1 | 0 | 1 | 3 | 6 | 12;\n};\n\n/**\n * Some description with `back ticks`\n */\nexport type ModelWithBackticksInDescription = {\n    /**\n     * The template `that` should be used for parsing and importing the contents of the CSV file.\n     *\n     * <br/><p>There is one placeholder currently supported:<ul>     <li><b>${x}</b> - refers to the n-th column in the CSV file, e.g. ${1}, ${2}, ...)</li></ul><p>Example of a correct JSON template:</p>\n     * <pre>\n     * [\n     * {\n     * \"resourceType\": \"Asset\",\n     * \"identifier\": {\n     * \"name\": \"${1}\",\n     * \"domain\": {\n     * \"name\": \"${2}\",\n     * \"community\": {\n     * \"name\": \"Some Community\"\n     * }\n     * }\n     * },\n     * \"attributes\" : {\n     * \"00000000-0000-0000-0000-000000003115\" : [ {\n     * \"value\" : \"${3}\"\n     * } ],\n     * \"00000000-0000-0000-0000-000000000222\" : [ {\n     * \"value\" : \"${4}\"\n     * } ]\n     * }\n     * }\n     * ]\n     * </pre>\n     */\n    template?: string;\n};\n\nexport type ModelWithOneOfAndProperties = (SimpleParameter | NonAsciiStringæøåÆøÅöôêÊ字符串) & {\n    baz: number | null;\n    qux: number;\n};\n\n/**\n * Model used to test deduplication strategy (unused)\n */\nexport type ParameterSimpleParameterUnused = string;\n\n/**\n * Model used to test deduplication strategy\n */\nexport type PostServiceWithEmptyTagResponse = string;\n\n/**\n * Model used to test deduplication strategy\n */\nexport type PostServiceWithEmptyTagResponse2 = string;\n\n/**\n * Model used to test deduplication strategy\n */\nexport type DeleteFooData = string;\n\n/**\n * Model used to test deduplication strategy\n */\nexport type DeleteFooData2 = string;\n\n/**\n * Model with restricted keyword name\n */\nexport type Import = string;\n\nexport type SchemaWithFormRestrictedKeys = {\n    description?: string;\n    'x-enum-descriptions'?: string;\n    'x-enum-varnames'?: string;\n    'x-enumNames'?: string;\n    title?: string;\n    object?: {\n        description?: string;\n        'x-enum-descriptions'?: string;\n        'x-enum-varnames'?: string;\n        'x-enumNames'?: string;\n        title?: string;\n    };\n    array?: Array<{\n        description?: string;\n        'x-enum-descriptions'?: string;\n        'x-enum-varnames'?: string;\n        'x-enumNames'?: string;\n        title?: string;\n    }>;\n};\n\n/**\n * This schema was giving PascalCase transformations a hard time\n */\nexport type IoK8sApimachineryPkgApisMetaV1DeleteOptions = {\n    /**\n     * Must be fulfilled before a deletion is carried out. If not possible, a 409 Conflict status will be returned.\n     */\n    preconditions?: IoK8sApimachineryPkgApisMetaV1Preconditions;\n};\n\n/**\n * This schema was giving PascalCase transformations a hard time\n */\nexport type IoK8sApimachineryPkgApisMetaV1Preconditions = {\n    /**\n     * Specifies the target ResourceVersion\n     */\n    resourceVersion?: string;\n    /**\n     * Specifies the target UID.\n     */\n    uid?: string;\n};\n\nexport type AdditionalPropertiesUnknownIssue = {\n    [key: string]: string | number;\n};\n\nexport type AdditionalPropertiesUnknownIssue2 = {\n    [key: string]: string | number;\n};\n\nexport type AdditionalPropertiesUnknownIssue3 = string & {\n    entries: {\n        [key: string]: AdditionalPropertiesUnknownIssue;\n    };\n};\n\nexport type AdditionalPropertiesIntegerIssue = {\n    value: number;\n    [key: string]: number;\n};\n\nexport type OneOfAllOfIssue = ((ConstValue | GenericSchemaDuplicateIssue1SystemBoolean) & _3eNum1Период) | GenericSchemaDuplicateIssue1SystemString;\n\nexport type GenericSchemaDuplicateIssue1SystemBoolean = {\n    item?: boolean;\n    error?: string | null;\n    readonly hasError?: boolean;\n    data?: {\n        [key: string]: never;\n    };\n};\n\nexport type GenericSchemaDuplicateIssue1SystemString = {\n    item?: string | null;\n    error?: string | null;\n    readonly hasError?: boolean;\n};\n\nexport type ExternalSharedModel = {\n    id: string;\n    name?: string;\n};\n\n/**\n * This is a model with one property containing a reference\n */\nexport type ModelWithReferenceWritable = {\n    prop?: ModelWithPropertiesWritable;\n};\n\n/**\n * This is a model with one property containing an array\n */\nexport type ModelWithArrayReadOnlyAndWriteOnlyWritable = {\n    prop?: Array<ModelWithReadOnlyAndWriteOnlyWritable>;\n    propWithFile?: Array<Blob | File>;\n    propWithNumber?: Array<number>;\n};\n\n/**\n * This is a model with one nested property\n */\nexport type ModelWithPropertiesWritable = {\n    required: string;\n    requiredAndNullable: string | null;\n    string?: string;\n    number?: number;\n    boolean?: boolean;\n    reference?: ModelWithString;\n    'property with space'?: string;\n    default?: string;\n    try?: string;\n};\n\n/**\n * This is a model that contains a some patterns\n */\nexport type ModelWithPatternWritable = {\n    key: string;\n    name: string;\n    id?: string;\n    text?: string;\n    patternWithSingleQuotes?: string;\n    patternWithNewline?: string;\n    patternWithBacktick?: string;\n    patternWithUnicode?: string;\n};\n\nexport type FileWritable = {\n    /**\n     * Mime\n     */\n    mime: string;\n};\n\nexport type ModelWithReadOnlyAndWriteOnlyWritable = {\n    foo: string;\n    baz: string;\n};\n\nexport type ModelWithAnyOfConstantSizeArrayWithNSizeAndOptionsWritable = [\n    number | Import,\n    number | Import\n];\n\nexport type AdditionalPropertiesUnknownIssueWritable = {\n    [key: string]: string | number;\n};\n\nexport type OneOfAllOfIssueWritable = ((ConstValue | GenericSchemaDuplicateIssue1SystemBoolean) & _3eNum1Период) | GenericSchemaDuplicateIssue1SystemString;\n\nexport type GenericSchemaDuplicateIssue1SystemBooleanWritable = {\n    item?: boolean;\n    error?: string | null;\n    data?: {\n        [key: string]: never;\n    };\n};\n\nexport type GenericSchemaDuplicateIssue1SystemStringWritable = {\n    item?: string | null;\n    error?: string | null;\n};\n\n/**\n * This is a reusable parameter\n */\nexport type SimpleParameter = string;\n\n/**\n * Parameter with illegal characters\n */\nexport type XFooBar = ModelWithString;\n\nexport type SimpleRequestBody = ModelWithString;\n\nexport type SimpleFormData = ModelWithString;\n\nexport type ExportData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no+tag';\n};\n\nexport type PatchApiVbyApiVersionNoTagData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no+tag';\n};\n\nexport type PatchApiVbyApiVersionNoTagResponses = {\n    /**\n     * OK\n     */\n    default: unknown;\n};\n\nexport type ImportData = {\n    body: ModelWithReadOnlyAndWriteOnlyWritable | ModelWithArrayReadOnlyAndWriteOnlyWritable;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no+tag';\n};\n\nexport type ImportResponses = {\n    /**\n     * Success\n     */\n    200: ModelFromZendesk;\n    /**\n     * Default success response\n     */\n    default: ModelWithReadOnlyAndWriteOnly;\n};\n\nexport type ImportResponse = ImportResponses[keyof ImportResponses];\n\nexport type FooWowData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no+tag';\n};\n\nexport type FooWowResponses = {\n    /**\n     * OK\n     */\n    default: unknown;\n};\n\nexport type ApiVVersionODataControllerCountData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple/$count';\n};\n\nexport type ApiVVersionODataControllerCountResponses = {\n    /**\n     * Success\n     */\n    200: ModelFromZendesk;\n};\n\nexport type ApiVVersionODataControllerCountResponse = ApiVVersionODataControllerCountResponses[keyof ApiVVersionODataControllerCountResponses];\n\nexport type GetApiVbyApiVersionSimpleOperationData = {\n    body?: never;\n    path: {\n        /**\n         * foo in method\n         */\n        foo_param: string;\n    };\n    query?: never;\n    url: '/api/v{api-version}/simple:operation';\n};\n\nexport type GetApiVbyApiVersionSimpleOperationErrors = {\n    /**\n     * Default error response\n     */\n    default: ModelWithBoolean;\n};\n\nexport type GetApiVbyApiVersionSimpleOperationError = GetApiVbyApiVersionSimpleOperationErrors[keyof GetApiVbyApiVersionSimpleOperationErrors];\n\nexport type GetApiVbyApiVersionSimpleOperationResponses = {\n    /**\n     * Response is a simple number\n     */\n    200: number;\n};\n\nexport type GetApiVbyApiVersionSimpleOperationResponse = GetApiVbyApiVersionSimpleOperationResponses[keyof GetApiVbyApiVersionSimpleOperationResponses];\n\nexport type DeleteCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type GetCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type HeadCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type OptionsCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type PatchCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type PostCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type PutCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type DeleteFooData3 = {\n    body?: never;\n    headers: {\n        /**\n         * Parameter with illegal characters\n         */\n        'x-Foo-Bar': ModelWithString;\n    };\n    path: {\n        /**\n         * foo in method\n         */\n        foo_param: string;\n        /**\n         * bar in method\n         */\n        BarParam: string;\n    };\n    query?: never;\n    url: '/api/v{api-version}/foo/{foo_param}/bar/{BarParam}';\n};\n\nexport type CallWithDescriptionsData = {\n    body?: never;\n    path?: never;\n    query?: {\n        /**\n         * Testing multiline comments in string: First line\n         * Second line\n         *\n         * Fourth line\n         */\n        parameterWithBreaks?: string;\n        /**\n         * Testing backticks in string: `backticks` and ```multiple backticks``` should work\n         */\n        parameterWithBackticks?: string;\n        /**\n         * Testing slashes in string: \\backwards\\\\\\ and /forwards/// should work\n         */\n        parameterWithSlashes?: string;\n        /**\n         * Testing expression placeholders in string: ${expression} should work\n         */\n        parameterWithExpressionPlaceholders?: string;\n        /**\n         * Testing quotes in string: 'single quote''' and \"double quotes\"\"\" should work\n         */\n        parameterWithQuotes?: string;\n        /**\n         * Testing reserved characters in string: * inline * and ** inline ** should work\n         */\n        parameterWithReservedCharacters?: string;\n    };\n    url: '/api/v{api-version}/descriptions';\n};\n\nexport type DeprecatedCallData = {\n    body?: never;\n    headers: {\n        /**\n         * This parameter is deprecated\n         *\n         * @deprecated\n         */\n        parameter: DeprecatedModel | null;\n    };\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/parameters/deprecated';\n};\n\nexport type CallWithParametersData = {\n    /**\n     * This is the parameter that goes into the body\n     */\n    body: {\n        [key: string]: unknown;\n    } | null;\n    headers: {\n        /**\n         * This is the parameter that goes into the header\n         */\n        parameterHeader: string | null;\n    };\n    path: {\n        /**\n         * This is the parameter that goes into the path\n         */\n        parameterPath: string | null;\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string | null;\n    };\n    query: {\n        foo_ref_enum?: ModelWithNestedArrayEnumsDataFoo;\n        foo_all_of_enum: ModelWithNestedArrayEnumsDataFoo;\n        /**\n         * This is the parameter that goes into the query params\n         */\n        cursor: string | null;\n    };\n    url: '/api/v{api-version}/parameters/{parameterPath}';\n};\n\nexport type CallWithWeirdParameterNamesData = {\n    /**\n     * This is the parameter that goes into the body\n     */\n    body: ModelWithString | null;\n    headers: {\n        /**\n         * This is the parameter that goes into the request header\n         */\n        'parameter.header': string | null;\n    };\n    path: {\n        /**\n         * This is the parameter that goes into the path\n         */\n        'parameter.path.1'?: string;\n        /**\n         * This is the parameter that goes into the path\n         */\n        'parameter-path-2'?: string;\n        /**\n         * This is the parameter that goes into the path\n         */\n        'PARAMETER-PATH-3'?: string;\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string | null;\n    };\n    query: {\n        /**\n         * This is the parameter with a reserved keyword\n         */\n        default?: string;\n        /**\n         * This is the parameter that goes into the request query params\n         */\n        'parameter-query': string | null;\n    };\n    url: '/api/v{api-version}/parameters/{parameter.path.1}/{parameter-path-2}/{PARAMETER-PATH-3}';\n};\n\nexport type GetCallWithOptionalParamData = {\n    /**\n     * This is a required parameter\n     */\n    body: ModelWithOneOfEnum;\n    path?: never;\n    query?: {\n        /**\n         * This is an optional parameter\n         */\n        page?: number;\n    };\n    url: '/api/v{api-version}/parameters';\n};\n\nexport type PostCallWithOptionalParamData = {\n    /**\n     * This is an optional parameter\n     */\n    body?: {\n        offset?: number | null;\n    };\n    path?: never;\n    query: {\n        /**\n         * This is a required parameter\n         */\n        parameter: Pageable;\n    };\n    url: '/api/v{api-version}/parameters';\n};\n\nexport type PostCallWithOptionalParamResponses = {\n    /**\n     * Response is a simple number\n     */\n    200: number;\n    /**\n     * Success\n     */\n    204: void;\n};\n\nexport type PostCallWithOptionalParamResponse = PostCallWithOptionalParamResponses[keyof PostCallWithOptionalParamResponses];\n\nexport type PostApiVbyApiVersionRequestBodyData = {\n    /**\n     * A reusable request body\n     */\n    body?: SimpleRequestBody;\n    path?: never;\n    query?: {\n        /**\n         * This is a reusable parameter\n         */\n        parameter?: string;\n    };\n    url: '/api/v{api-version}/requestBody';\n};\n\nexport type PostApiVbyApiVersionFormDataData = {\n    /**\n     * A reusable request body\n     */\n    body?: SimpleFormData;\n    path?: never;\n    query?: {\n        /**\n         * This is a reusable parameter\n         */\n        parameter?: string;\n    };\n    url: '/api/v{api-version}/formData';\n};\n\nexport type CallWithDefaultParametersData = {\n    body?: never;\n    path?: never;\n    query?: {\n        /**\n         * This is a simple string with default value\n         */\n        parameterString?: string | null;\n        /**\n         * This is a simple number with default value\n         */\n        parameterNumber?: number | null;\n        /**\n         * This is a simple boolean with default value\n         */\n        parameterBoolean?: boolean | null;\n        /**\n         * This is a simple enum with default value\n         */\n        parameterEnum?: 'Success' | 'Warning' | 'Error';\n        /**\n         * This is a simple model with default value\n         */\n        parameterModel?: ModelWithString | null;\n    };\n    url: '/api/v{api-version}/defaults';\n};\n\nexport type CallWithDefaultOptionalParametersData = {\n    body?: never;\n    path?: never;\n    query?: {\n        /**\n         * This is a simple string that is optional with default value\n         */\n        parameterString?: string;\n        /**\n         * This is a simple number that is optional with default value\n         */\n        parameterNumber?: number;\n        /**\n         * This is a simple boolean that is optional with default value\n         */\n        parameterBoolean?: boolean;\n        /**\n         * This is a simple enum that is optional with default value\n         */\n        parameterEnum?: 'Success' | 'Warning' | 'Error';\n        /**\n         * This is a simple model that is optional with default value\n         */\n        parameterModel?: ModelWithString;\n    };\n    url: '/api/v{api-version}/defaults';\n};\n\nexport type CallToTestOrderOfParamsData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * This is a optional string with default\n         */\n        parameterOptionalStringWithDefault?: string;\n        /**\n         * This is a optional string with empty default\n         */\n        parameterOptionalStringWithEmptyDefault?: string;\n        /**\n         * This is a optional string with no default\n         */\n        parameterOptionalStringWithNoDefault?: string;\n        /**\n         * This is a string with default\n         */\n        parameterStringWithDefault: string;\n        /**\n         * This is a string with empty default\n         */\n        parameterStringWithEmptyDefault: string;\n        /**\n         * This is a string with no default\n         */\n        parameterStringWithNoDefault: string;\n        /**\n         * This is a string that can be null with no default\n         */\n        parameterStringNullableWithNoDefault?: string | null;\n        /**\n         * This is a string that can be null with default\n         */\n        parameterStringNullableWithDefault?: string | null;\n    };\n    url: '/api/v{api-version}/defaults';\n};\n\nexport type DuplicateNameData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/duplicate';\n};\n\nexport type DuplicateName2Data = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/duplicate';\n};\n\nexport type DuplicateName3Data = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/duplicate';\n};\n\nexport type DuplicateName4Data = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/duplicate';\n};\n\nexport type CallWithNoContentResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no-content';\n};\n\nexport type CallWithNoContentResponseResponses = {\n    /**\n     * Success\n     */\n    204: void;\n};\n\nexport type CallWithNoContentResponseResponse = CallWithNoContentResponseResponses[keyof CallWithNoContentResponseResponses];\n\nexport type CallWithResponseAndNoContentResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multiple-tags/response-and-no-content';\n};\n\nexport type CallWithResponseAndNoContentResponseResponses = {\n    /**\n     * Response is a simple number\n     */\n    200: number;\n    /**\n     * Success\n     */\n    204: void;\n};\n\nexport type CallWithResponseAndNoContentResponseResponse = CallWithResponseAndNoContentResponseResponses[keyof CallWithResponseAndNoContentResponseResponses];\n\nexport type DummyAData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multiple-tags/a';\n};\n\nexport type DummyAResponses = {\n    200: _400;\n};\n\nexport type DummyAResponse = DummyAResponses[keyof DummyAResponses];\n\nexport type DummyBData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multiple-tags/b';\n};\n\nexport type DummyBResponses = {\n    /**\n     * Success\n     */\n    204: void;\n};\n\nexport type DummyBResponse = DummyBResponses[keyof DummyBResponses];\n\nexport type CallWithResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/response';\n};\n\nexport type CallWithResponseResponses = {\n    default: Import;\n};\n\nexport type CallWithResponseResponse = CallWithResponseResponses[keyof CallWithResponseResponses];\n\nexport type CallWithDuplicateResponsesData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/response';\n};\n\nexport type CallWithDuplicateResponsesErrors = {\n    /**\n     * Message for 500 error\n     */\n    500: ModelWithStringError;\n    /**\n     * Message for 501 error\n     */\n    501: ModelWithStringError;\n    /**\n     * Message for 502 error\n     */\n    502: ModelWithStringError;\n    /**\n     * Message for 4XX errors\n     */\n    '4XX': DictionaryWithArray;\n    /**\n     * Default error response\n     */\n    default: ModelWithBoolean;\n};\n\nexport type CallWithDuplicateResponsesError = CallWithDuplicateResponsesErrors[keyof CallWithDuplicateResponsesErrors];\n\nexport type CallWithDuplicateResponsesResponses = {\n    /**\n     * Message for 200 response\n     */\n    200: ModelWithBoolean & ModelWithInteger;\n    /**\n     * Message for 201 response\n     */\n    201: ModelWithString;\n    /**\n     * Message for 202 response\n     */\n    202: ModelWithString;\n};\n\nexport type CallWithDuplicateResponsesResponse = CallWithDuplicateResponsesResponses[keyof CallWithDuplicateResponsesResponses];\n\nexport type CallWithResponsesData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/response';\n};\n\nexport type CallWithResponsesErrors = {\n    /**\n     * Message for 500 error\n     */\n    500: ModelWithStringError;\n    /**\n     * Message for 501 error\n     */\n    501: ModelWithStringError;\n    /**\n     * Message for 502 error\n     */\n    502: ModelWithStringError;\n    /**\n     * Message for default response\n     */\n    default: ModelWithStringError;\n};\n\nexport type CallWithResponsesError = CallWithResponsesErrors[keyof CallWithResponsesErrors];\n\nexport type CallWithResponsesResponses = {\n    /**\n     * Message for 200 response\n     */\n    200: {\n        readonly '@namespace.string'?: string;\n        readonly '@namespace.integer'?: number;\n        readonly value?: Array<ModelWithString>;\n    };\n    /**\n     * Message for 201 response\n     */\n    201: ModelThatExtends;\n    /**\n     * Message for 202 response\n     */\n    202: ModelThatExtendsExtends;\n};\n\nexport type CallWithResponsesResponse = CallWithResponsesResponses[keyof CallWithResponsesResponses];\n\nexport type CollectionFormatData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * This is an array parameter that is sent as csv format (comma-separated values)\n         */\n        parameterArrayCSV: Array<string> | null;\n        /**\n         * This is an array parameter that is sent as ssv format (space-separated values)\n         */\n        parameterArraySSV: Array<string> | null;\n        /**\n         * This is an array parameter that is sent as tsv format (tab-separated values)\n         */\n        parameterArrayTSV: Array<string> | null;\n        /**\n         * This is an array parameter that is sent as pipes format (pipe-separated values)\n         */\n        parameterArrayPipes: Array<string> | null;\n        /**\n         * This is an array parameter that is sent as multi format (multiple parameter instances)\n         */\n        parameterArrayMulti: Array<string> | null;\n    };\n    url: '/api/v{api-version}/collectionFormat';\n};\n\nexport type TypesData = {\n    body?: never;\n    path?: {\n        /**\n         * This is a number parameter\n         */\n        id?: number;\n    };\n    query: {\n        /**\n         * This is a number parameter\n         */\n        parameterNumber: number;\n        /**\n         * This is a string parameter\n         */\n        parameterString: string | null;\n        /**\n         * This is a boolean parameter\n         */\n        parameterBoolean: boolean | null;\n        /**\n         * This is an object parameter\n         */\n        parameterObject: {\n            [key: string]: unknown;\n        } | null;\n        /**\n         * This is an array parameter\n         */\n        parameterArray: Array<string> | null;\n        /**\n         * This is a dictionary parameter\n         */\n        parameterDictionary: {\n            [key: string]: unknown;\n        } | null;\n        /**\n         * This is an enum parameter\n         */\n        parameterEnum: 'Success' | 'Warning' | 'Error';\n    };\n    url: '/api/v{api-version}/types';\n};\n\nexport type TypesResponses = {\n    /**\n     * Response is a simple number\n     */\n    200: number;\n    /**\n     * Response is a simple string\n     */\n    201: string;\n    /**\n     * Response is a simple boolean\n     */\n    202: boolean;\n    /**\n     * Response is a simple object\n     */\n    203: {\n        [key: string]: unknown;\n    };\n};\n\nexport type TypesResponse = TypesResponses[keyof TypesResponses];\n\nexport type UploadFileData = {\n    body: Blob | File;\n    path: {\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string | null;\n    };\n    query?: never;\n    url: '/api/v{api-version}/upload';\n};\n\nexport type UploadFileResponses = {\n    200: boolean;\n};\n\nexport type UploadFileResponse = UploadFileResponses[keyof UploadFileResponses];\n\nexport type FileResponseData = {\n    body?: never;\n    path: {\n        id: string;\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string;\n    };\n    query?: never;\n    url: '/api/v{api-version}/file/{id}';\n};\n\nexport type FileResponseResponses = {\n    /**\n     * Success\n     */\n    200: Blob | File;\n};\n\nexport type FileResponseResponse = FileResponseResponses[keyof FileResponseResponses];\n\nexport type ComplexTypesData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * Parameter containing object\n         */\n        parameterObject: {\n            first?: {\n                second?: {\n                    third?: string;\n                };\n            };\n        };\n        /**\n         * Parameter containing reference\n         */\n        parameterReference: ModelWithString;\n    };\n    url: '/api/v{api-version}/complex';\n};\n\nexport type ComplexTypesErrors = {\n    /**\n     * 400 `server` error\n     */\n    400: unknown;\n    /**\n     * 500 server error\n     */\n    500: unknown;\n};\n\nexport type ComplexTypesResponses = {\n    /**\n     * Successful response\n     */\n    200: Array<ModelWithString>;\n};\n\nexport type ComplexTypesResponse = ComplexTypesResponses[keyof ComplexTypesResponses];\n\nexport type MultipartResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multipart';\n};\n\nexport type MultipartResponseResponses = {\n    /**\n     * OK\n     */\n    200: {\n        file?: Blob | File;\n        metadata?: {\n            foo?: string;\n            bar?: string;\n        };\n    };\n};\n\nexport type MultipartResponseResponse = MultipartResponseResponses[keyof MultipartResponseResponses];\n\nexport type MultipartRequestData = {\n    body?: {\n        content?: Blob | File;\n        data?: ModelWithString | null;\n    };\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multipart';\n};\n\nexport type ComplexParamsData = {\n    body?: {\n        readonly key: string | null;\n        name: string | null;\n        enabled?: boolean;\n        type: 'Monkey' | 'Horse' | 'Bird';\n        listOfModels?: Array<ModelWithString> | null;\n        listOfStrings?: Array<string> | null;\n        parameters: ModelWithString | ModelWithEnum | ModelWithArray | ModelWithDictionary;\n        readonly user?: {\n            readonly id?: number;\n            readonly name?: string | null;\n        };\n    };\n    path: {\n        id: number;\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string;\n    };\n    query?: never;\n    url: '/api/v{api-version}/complex/{id}';\n};\n\nexport type ComplexParamsResponses = {\n    /**\n     * Success\n     */\n    200: ModelWithString;\n};\n\nexport type ComplexParamsResponse = ComplexParamsResponses[keyof ComplexParamsResponses];\n\nexport type CallWithResultFromHeaderData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/header';\n};\n\nexport type CallWithResultFromHeaderErrors = {\n    /**\n     * 400 server error\n     */\n    400: unknown;\n    /**\n     * 500 server error\n     */\n    500: unknown;\n};\n\nexport type CallWithResultFromHeaderResponses = {\n    /**\n     * Successful response\n     */\n    200: unknown;\n};\n\nexport type TestErrorCodeData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * Status code to return\n         */\n        status: number;\n    };\n    url: '/api/v{api-version}/error';\n};\n\nexport type TestErrorCodeErrors = {\n    /**\n     * Custom message: Internal Server Error\n     */\n    500: unknown;\n    /**\n     * Custom message: Not Implemented\n     */\n    501: unknown;\n    /**\n     * Custom message: Bad Gateway\n     */\n    502: unknown;\n    /**\n     * Custom message: Service Unavailable\n     */\n    503: unknown;\n};\n\nexport type TestErrorCodeResponses = {\n    /**\n     * Custom message: Successful response\n     */\n    200: unknown;\n};\n\nexport type NonAsciiæøåÆøÅöôêÊ字符串Data = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * Dummy input param\n         */\n        nonAsciiParamæøåÆØÅöôêÊ: number;\n    };\n    url: '/api/v{api-version}/non-ascii-æøåÆØÅöôêÊ字符串';\n};\n\nexport type NonAsciiæøåÆøÅöôêÊ字符串Responses = {\n    /**\n     * Successful response\n     */\n    200: Array<NonAsciiStringæøåÆøÅöôêÊ字符串>;\n};\n\nexport type NonAsciiæøåÆøÅöôêÊ字符串Response = NonAsciiæøåÆøÅöôêÊ字符串Responses[keyof NonAsciiæøåÆøÅöôêÊ字符串Responses];\n\nexport type PutWithFormUrlEncodedData = {\n    body: ArrayWithStrings;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/non-ascii-æøåÆØÅöôêÊ字符串';\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/angular-query-experimental/fetch/@tanstack/angular-query-experimental.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport { type DefaultError, type InfiniteData, infiniteQueryOptions, type MutationOptions, queryOptions } from '@tanstack/angular-query-experimental';\n\nimport { client } from '../client.gen';\nimport { apiVVersionODataControllerCount, callToTestOrderOfParams, callWithDefaultOptionalParameters, callWithDefaultParameters, callWithDescriptions, callWithDuplicateResponses, callWithNoContentResponse, callWithParameters, callWithResponse, callWithResponseAndNoContentResponse, callWithResponses, callWithResultFromHeader, callWithWeirdParameterNames, collectionFormat, complexParams, complexTypes, deleteCallWithoutParametersAndResponse, deleteFoo, deprecatedCall, dummyA, dummyB, duplicateName, duplicateName2, duplicateName3, duplicateName4, export_, fileResponse, fooWow, getApiVbyApiVersionSimpleOperation, getCallWithOptionalParam, getCallWithoutParametersAndResponse, import_, multipartRequest, multipartResponse, nonAsciiæøåÆøÅöôêÊ字符串, type Options, patchApiVbyApiVersionNoTag, patchCallWithoutParametersAndResponse, postApiVbyApiVersionFormData, postApiVbyApiVersionRequestBody, postCallWithOptionalParam, postCallWithoutParametersAndResponse, putCallWithoutParametersAndResponse, putWithFormUrlEncoded, testErrorCode, types, uploadFile } from '../sdk.gen';\nimport type { ApiVVersionODataControllerCountData, ApiVVersionODataControllerCountResponse, CallToTestOrderOfParamsData, CallWithDefaultOptionalParametersData, CallWithDefaultParametersData, CallWithDescriptionsData, CallWithDuplicateResponsesData, CallWithDuplicateResponsesError, CallWithDuplicateResponsesResponse, CallWithNoContentResponseData, CallWithNoContentResponseResponse, CallWithParametersData, CallWithResponseAndNoContentResponseData, CallWithResponseAndNoContentResponseResponse, CallWithResponseData, CallWithResponseResponse, CallWithResponsesData, CallWithResponsesError, CallWithResponsesResponse, CallWithResultFromHeaderData, CallWithWeirdParameterNamesData, CollectionFormatData, ComplexParamsData, ComplexParamsResponse, ComplexTypesData, ComplexTypesResponse, DeleteCallWithoutParametersAndResponseData, DeleteFooData3, DeprecatedCallData, DummyAData, DummyAResponse, DummyBData, DummyBResponse, DuplicateName2Data, DuplicateName3Data, DuplicateName4Data, DuplicateNameData, ExportData, FileResponseData, FileResponseResponse, FooWowData, GetApiVbyApiVersionSimpleOperationData, GetApiVbyApiVersionSimpleOperationError, GetApiVbyApiVersionSimpleOperationResponse, GetCallWithOptionalParamData, GetCallWithoutParametersAndResponseData, ImportData, ImportResponse, MultipartRequestData, MultipartResponseData, MultipartResponseResponse, NonAsciiæøåÆøÅöôêÊ字符串Data, NonAsciiæøåÆøÅöôêÊ字符串Response, PatchApiVbyApiVersionNoTagData, PatchCallWithoutParametersAndResponseData, PostApiVbyApiVersionFormDataData, PostApiVbyApiVersionRequestBodyData, PostCallWithOptionalParamData, PostCallWithOptionalParamResponse, PostCallWithoutParametersAndResponseData, PutCallWithoutParametersAndResponseData, PutWithFormUrlEncodedData, TestErrorCodeData, TypesData, TypesResponse, UploadFileData, UploadFileResponse } from '../types.gen';\n\nexport type QueryKey<TOptions extends Options> = [\n    Pick<TOptions, 'baseUrl' | 'body' | 'headers' | 'path' | 'query'> & {\n        _id: string;\n        _infinite?: boolean;\n        tags?: ReadonlyArray<string>;\n    }\n];\n\nconst createQueryKey = <TOptions extends Options>(id: string, options?: TOptions, infinite?: boolean, tags?: ReadonlyArray<string>): [\n    QueryKey<TOptions>[0]\n] => {\n    const params: QueryKey<TOptions>[0] = { _id: id, baseUrl: options?.baseUrl || (options?.client ?? client).getConfig().baseUrl } as QueryKey<TOptions>[0];\n    if (infinite) {\n        params._infinite = infinite;\n    }\n    if (tags) {\n        params.tags = tags;\n    }\n    if (options?.body) {\n        params.body = options.body;\n    }\n    if (options?.headers) {\n        params.headers = options.headers;\n    }\n    if (options?.path) {\n        params.path = options.path;\n    }\n    if (options?.query) {\n        params.query = options.query;\n    }\n    return [params];\n};\n\nexport const exportQueryKey = (options?: Options<ExportData>) => createQueryKey('export', options);\n\nexport const exportOptions = (options?: Options<ExportData>) => queryOptions<unknown, DefaultError, unknown, ReturnType<typeof exportQueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await export_({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: exportQueryKey(options)\n});\n\nexport const patchApiVbyApiVersionNoTagMutation = (options?: Partial<Options<PatchApiVbyApiVersionNoTagData>>): MutationOptions<unknown, DefaultError, Options<PatchApiVbyApiVersionNoTagData>> => {\n    const mutationOptions: MutationOptions<unknown, DefaultError, Options<PatchApiVbyApiVersionNoTagData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await patchApiVbyApiVersionNoTag({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const importMutation = (options?: Partial<Options<ImportData>>): MutationOptions<ImportResponse, DefaultError, Options<ImportData>> => {\n    const mutationOptions: MutationOptions<ImportResponse, DefaultError, Options<ImportData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await import_({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const fooWowMutation = (options?: Partial<Options<FooWowData>>): MutationOptions<unknown, DefaultError, Options<FooWowData>> => {\n    const mutationOptions: MutationOptions<unknown, DefaultError, Options<FooWowData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await fooWow({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const apiVVersionODataControllerCountQueryKey = (options?: Options<ApiVVersionODataControllerCountData>) => createQueryKey('apiVVersionODataControllerCount', options);\n\nexport const apiVVersionODataControllerCountOptions = (options?: Options<ApiVVersionODataControllerCountData>) => queryOptions<ApiVVersionODataControllerCountResponse, DefaultError, ApiVVersionODataControllerCountResponse, ReturnType<typeof apiVVersionODataControllerCountQueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await apiVVersionODataControllerCount({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: apiVVersionODataControllerCountQueryKey(options)\n});\n\nexport const getApiVbyApiVersionSimpleOperationQueryKey = (options: Options<GetApiVbyApiVersionSimpleOperationData>) => createQueryKey('getApiVbyApiVersionSimpleOperation', options);\n\nexport const getApiVbyApiVersionSimpleOperationOptions = (options: Options<GetApiVbyApiVersionSimpleOperationData>) => queryOptions<GetApiVbyApiVersionSimpleOperationResponse, GetApiVbyApiVersionSimpleOperationError, GetApiVbyApiVersionSimpleOperationResponse, ReturnType<typeof getApiVbyApiVersionSimpleOperationQueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await getApiVbyApiVersionSimpleOperation({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: getApiVbyApiVersionSimpleOperationQueryKey(options)\n});\n\nexport const deleteCallWithoutParametersAndResponseMutation = (options?: Partial<Options<DeleteCallWithoutParametersAndResponseData>>): MutationOptions<unknown, DefaultError, Options<DeleteCallWithoutParametersAndResponseData>> => {\n    const mutationOptions: MutationOptions<unknown, DefaultError, Options<DeleteCallWithoutParametersAndResponseData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await deleteCallWithoutParametersAndResponse({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const getCallWithoutParametersAndResponseQueryKey = (options?: Options<GetCallWithoutParametersAndResponseData>) => createQueryKey('getCallWithoutParametersAndResponse', options);\n\nexport const getCallWithoutParametersAndResponseOptions = (options?: Options<GetCallWithoutParametersAndResponseData>) => queryOptions<unknown, DefaultError, unknown, ReturnType<typeof getCallWithoutParametersAndResponseQueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await getCallWithoutParametersAndResponse({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: getCallWithoutParametersAndResponseQueryKey(options)\n});\n\nexport const patchCallWithoutParametersAndResponseMutation = (options?: Partial<Options<PatchCallWithoutParametersAndResponseData>>): MutationOptions<unknown, DefaultError, Options<PatchCallWithoutParametersAndResponseData>> => {\n    const mutationOptions: MutationOptions<unknown, DefaultError, Options<PatchCallWithoutParametersAndResponseData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await patchCallWithoutParametersAndResponse({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const postCallWithoutParametersAndResponseMutation = (options?: Partial<Options<PostCallWithoutParametersAndResponseData>>): MutationOptions<unknown, DefaultError, Options<PostCallWithoutParametersAndResponseData>> => {\n    const mutationOptions: MutationOptions<unknown, DefaultError, Options<PostCallWithoutParametersAndResponseData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await postCallWithoutParametersAndResponse({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const putCallWithoutParametersAndResponseMutation = (options?: Partial<Options<PutCallWithoutParametersAndResponseData>>): MutationOptions<unknown, DefaultError, Options<PutCallWithoutParametersAndResponseData>> => {\n    const mutationOptions: MutationOptions<unknown, DefaultError, Options<PutCallWithoutParametersAndResponseData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await putCallWithoutParametersAndResponse({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const deleteFooMutation = (options?: Partial<Options<DeleteFooData3>>): MutationOptions<unknown, DefaultError, Options<DeleteFooData3>> => {\n    const mutationOptions: MutationOptions<unknown, DefaultError, Options<DeleteFooData3>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await deleteFoo({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const callWithDescriptionsMutation = (options?: Partial<Options<CallWithDescriptionsData>>): MutationOptions<unknown, DefaultError, Options<CallWithDescriptionsData>> => {\n    const mutationOptions: MutationOptions<unknown, DefaultError, Options<CallWithDescriptionsData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await callWithDescriptions({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\n/**\n * @deprecated\n */\nexport const deprecatedCallMutation = (options?: Partial<Options<DeprecatedCallData>>): MutationOptions<unknown, DefaultError, Options<DeprecatedCallData>> => {\n    const mutationOptions: MutationOptions<unknown, DefaultError, Options<DeprecatedCallData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await deprecatedCall({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const callWithParametersMutation = (options?: Partial<Options<CallWithParametersData>>): MutationOptions<unknown, DefaultError, Options<CallWithParametersData>> => {\n    const mutationOptions: MutationOptions<unknown, DefaultError, Options<CallWithParametersData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await callWithParameters({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const callWithWeirdParameterNamesMutation = (options?: Partial<Options<CallWithWeirdParameterNamesData>>): MutationOptions<unknown, DefaultError, Options<CallWithWeirdParameterNamesData>> => {\n    const mutationOptions: MutationOptions<unknown, DefaultError, Options<CallWithWeirdParameterNamesData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await callWithWeirdParameterNames({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const getCallWithOptionalParamQueryKey = (options: Options<GetCallWithOptionalParamData>) => createQueryKey('getCallWithOptionalParam', options);\n\nexport const getCallWithOptionalParamOptions = (options: Options<GetCallWithOptionalParamData>) => queryOptions<unknown, DefaultError, unknown, ReturnType<typeof getCallWithOptionalParamQueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await getCallWithOptionalParam({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: getCallWithOptionalParamQueryKey(options)\n});\n\nconst createInfiniteParams = <K extends Pick<QueryKey<Options>[0], 'body' | 'headers' | 'path' | 'query'>>(queryKey: QueryKey<Options>, page: K) => {\n    const params = { ...queryKey[0] };\n    if (page.body) {\n        params.body = {\n            ...queryKey[0].body as any,\n            ...page.body as any\n        };\n    }\n    if (page.headers) {\n        params.headers = {\n            ...queryKey[0].headers,\n            ...page.headers\n        };\n    }\n    if (page.path) {\n        params.path = {\n            ...queryKey[0].path as any,\n            ...page.path as any\n        };\n    }\n    if (page.query) {\n        params.query = {\n            ...queryKey[0].query as any,\n            ...page.query as any\n        };\n    }\n    return params as unknown as typeof page;\n};\n\nexport const getCallWithOptionalParamInfiniteQueryKey = (options: Options<GetCallWithOptionalParamData>): QueryKey<Options<GetCallWithOptionalParamData>> => createQueryKey('getCallWithOptionalParam', options, true);\n\nexport const getCallWithOptionalParamInfiniteOptions = (options: Options<GetCallWithOptionalParamData>) => infiniteQueryOptions<unknown, DefaultError, InfiniteData<unknown>, QueryKey<Options<GetCallWithOptionalParamData>>, number | Pick<QueryKey<Options<GetCallWithOptionalParamData>>[0], 'body' | 'headers' | 'path' | 'query'>>(\n// @ts-ignore\n{\n    queryFn: async ({ pageParam, queryKey, signal }) => {\n        // @ts-ignore\n        const page: Pick<QueryKey<Options<GetCallWithOptionalParamData>>[0], 'body' | 'headers' | 'path' | 'query'> = typeof pageParam === 'object' ? pageParam : {\n            query: {\n                page: pageParam\n            }\n        };\n        const params = createInfiniteParams(queryKey, page);\n        const { data } = await getCallWithOptionalParam({\n            ...options,\n            ...params,\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: getCallWithOptionalParamInfiniteQueryKey(options)\n});\n\nexport const postCallWithOptionalParamMutation = (options?: Partial<Options<PostCallWithOptionalParamData>>): MutationOptions<PostCallWithOptionalParamResponse, DefaultError, Options<PostCallWithOptionalParamData>> => {\n    const mutationOptions: MutationOptions<PostCallWithOptionalParamResponse, DefaultError, Options<PostCallWithOptionalParamData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await postCallWithOptionalParam({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const postApiVbyApiVersionRequestBodyMutation = (options?: Partial<Options<PostApiVbyApiVersionRequestBodyData>>): MutationOptions<unknown, DefaultError, Options<PostApiVbyApiVersionRequestBodyData>> => {\n    const mutationOptions: MutationOptions<unknown, DefaultError, Options<PostApiVbyApiVersionRequestBodyData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await postApiVbyApiVersionRequestBody({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const postApiVbyApiVersionFormDataMutation = (options?: Partial<Options<PostApiVbyApiVersionFormDataData>>): MutationOptions<unknown, DefaultError, Options<PostApiVbyApiVersionFormDataData>> => {\n    const mutationOptions: MutationOptions<unknown, DefaultError, Options<PostApiVbyApiVersionFormDataData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await postApiVbyApiVersionFormData({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const callWithDefaultParametersQueryKey = (options?: Options<CallWithDefaultParametersData>) => createQueryKey('callWithDefaultParameters', options);\n\nexport const callWithDefaultParametersOptions = (options?: Options<CallWithDefaultParametersData>) => queryOptions<unknown, DefaultError, unknown, ReturnType<typeof callWithDefaultParametersQueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await callWithDefaultParameters({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: callWithDefaultParametersQueryKey(options)\n});\n\nexport const callWithDefaultOptionalParametersMutation = (options?: Partial<Options<CallWithDefaultOptionalParametersData>>): MutationOptions<unknown, DefaultError, Options<CallWithDefaultOptionalParametersData>> => {\n    const mutationOptions: MutationOptions<unknown, DefaultError, Options<CallWithDefaultOptionalParametersData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await callWithDefaultOptionalParameters({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const callToTestOrderOfParamsMutation = (options?: Partial<Options<CallToTestOrderOfParamsData>>): MutationOptions<unknown, DefaultError, Options<CallToTestOrderOfParamsData>> => {\n    const mutationOptions: MutationOptions<unknown, DefaultError, Options<CallToTestOrderOfParamsData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await callToTestOrderOfParams({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const duplicateNameMutation = (options?: Partial<Options<DuplicateNameData>>): MutationOptions<unknown, DefaultError, Options<DuplicateNameData>> => {\n    const mutationOptions: MutationOptions<unknown, DefaultError, Options<DuplicateNameData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await duplicateName({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const duplicateName2QueryKey = (options?: Options<DuplicateName2Data>) => createQueryKey('duplicateName2', options);\n\nexport const duplicateName2Options = (options?: Options<DuplicateName2Data>) => queryOptions<unknown, DefaultError, unknown, ReturnType<typeof duplicateName2QueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await duplicateName2({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: duplicateName2QueryKey(options)\n});\n\nexport const duplicateName3Mutation = (options?: Partial<Options<DuplicateName3Data>>): MutationOptions<unknown, DefaultError, Options<DuplicateName3Data>> => {\n    const mutationOptions: MutationOptions<unknown, DefaultError, Options<DuplicateName3Data>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await duplicateName3({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const duplicateName4Mutation = (options?: Partial<Options<DuplicateName4Data>>): MutationOptions<unknown, DefaultError, Options<DuplicateName4Data>> => {\n    const mutationOptions: MutationOptions<unknown, DefaultError, Options<DuplicateName4Data>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await duplicateName4({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const callWithNoContentResponseQueryKey = (options?: Options<CallWithNoContentResponseData>) => createQueryKey('callWithNoContentResponse', options);\n\nexport const callWithNoContentResponseOptions = (options?: Options<CallWithNoContentResponseData>) => queryOptions<CallWithNoContentResponseResponse, DefaultError, CallWithNoContentResponseResponse, ReturnType<typeof callWithNoContentResponseQueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await callWithNoContentResponse({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: callWithNoContentResponseQueryKey(options)\n});\n\nexport const callWithResponseAndNoContentResponseQueryKey = (options?: Options<CallWithResponseAndNoContentResponseData>) => createQueryKey('callWithResponseAndNoContentResponse', options);\n\nexport const callWithResponseAndNoContentResponseOptions = (options?: Options<CallWithResponseAndNoContentResponseData>) => queryOptions<CallWithResponseAndNoContentResponseResponse, DefaultError, CallWithResponseAndNoContentResponseResponse, ReturnType<typeof callWithResponseAndNoContentResponseQueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await callWithResponseAndNoContentResponse({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: callWithResponseAndNoContentResponseQueryKey(options)\n});\n\nexport const dummyAQueryKey = (options?: Options<DummyAData>) => createQueryKey('dummyA', options);\n\nexport const dummyAOptions = (options?: Options<DummyAData>) => queryOptions<DummyAResponse, DefaultError, DummyAResponse, ReturnType<typeof dummyAQueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await dummyA({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: dummyAQueryKey(options)\n});\n\nexport const dummyBQueryKey = (options?: Options<DummyBData>) => createQueryKey('dummyB', options);\n\nexport const dummyBOptions = (options?: Options<DummyBData>) => queryOptions<DummyBResponse, DefaultError, DummyBResponse, ReturnType<typeof dummyBQueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await dummyB({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: dummyBQueryKey(options)\n});\n\nexport const callWithResponseQueryKey = (options?: Options<CallWithResponseData>) => createQueryKey('callWithResponse', options);\n\nexport const callWithResponseOptions = (options?: Options<CallWithResponseData>) => queryOptions<CallWithResponseResponse, DefaultError, CallWithResponseResponse, ReturnType<typeof callWithResponseQueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await callWithResponse({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: callWithResponseQueryKey(options)\n});\n\nexport const callWithDuplicateResponsesMutation = (options?: Partial<Options<CallWithDuplicateResponsesData>>): MutationOptions<CallWithDuplicateResponsesResponse, CallWithDuplicateResponsesError, Options<CallWithDuplicateResponsesData>> => {\n    const mutationOptions: MutationOptions<CallWithDuplicateResponsesResponse, CallWithDuplicateResponsesError, Options<CallWithDuplicateResponsesData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await callWithDuplicateResponses({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const callWithResponsesMutation = (options?: Partial<Options<CallWithResponsesData>>): MutationOptions<CallWithResponsesResponse, CallWithResponsesError, Options<CallWithResponsesData>> => {\n    const mutationOptions: MutationOptions<CallWithResponsesResponse, CallWithResponsesError, Options<CallWithResponsesData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await callWithResponses({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const collectionFormatQueryKey = (options: Options<CollectionFormatData>) => createQueryKey('collectionFormat', options);\n\nexport const collectionFormatOptions = (options: Options<CollectionFormatData>) => queryOptions<unknown, DefaultError, unknown, ReturnType<typeof collectionFormatQueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await collectionFormat({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: collectionFormatQueryKey(options)\n});\n\nexport const typesQueryKey = (options: Options<TypesData>) => createQueryKey('types', options);\n\nexport const typesOptions = (options: Options<TypesData>) => queryOptions<TypesResponse, DefaultError, TypesResponse, ReturnType<typeof typesQueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await types({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: typesQueryKey(options)\n});\n\nexport const uploadFileMutation = (options?: Partial<Options<UploadFileData>>): MutationOptions<UploadFileResponse, DefaultError, Options<UploadFileData>> => {\n    const mutationOptions: MutationOptions<UploadFileResponse, DefaultError, Options<UploadFileData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await uploadFile({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const fileResponseQueryKey = (options: Options<FileResponseData>) => createQueryKey('fileResponse', options);\n\nexport const fileResponseOptions = (options: Options<FileResponseData>) => queryOptions<FileResponseResponse, DefaultError, FileResponseResponse, ReturnType<typeof fileResponseQueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await fileResponse({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: fileResponseQueryKey(options)\n});\n\nexport const complexTypesQueryKey = (options: Options<ComplexTypesData>) => createQueryKey('complexTypes', options);\n\nexport const complexTypesOptions = (options: Options<ComplexTypesData>) => queryOptions<ComplexTypesResponse, DefaultError, ComplexTypesResponse, ReturnType<typeof complexTypesQueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await complexTypes({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: complexTypesQueryKey(options)\n});\n\nexport const multipartResponseQueryKey = (options?: Options<MultipartResponseData>) => createQueryKey('multipartResponse', options);\n\nexport const multipartResponseOptions = (options?: Options<MultipartResponseData>) => queryOptions<MultipartResponseResponse, DefaultError, MultipartResponseResponse, ReturnType<typeof multipartResponseQueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await multipartResponse({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: multipartResponseQueryKey(options)\n});\n\nexport const multipartRequestMutation = (options?: Partial<Options<MultipartRequestData>>): MutationOptions<unknown, DefaultError, Options<MultipartRequestData>> => {\n    const mutationOptions: MutationOptions<unknown, DefaultError, Options<MultipartRequestData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await multipartRequest({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const complexParamsMutation = (options?: Partial<Options<ComplexParamsData>>): MutationOptions<ComplexParamsResponse, DefaultError, Options<ComplexParamsData>> => {\n    const mutationOptions: MutationOptions<ComplexParamsResponse, DefaultError, Options<ComplexParamsData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await complexParams({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const callWithResultFromHeaderMutation = (options?: Partial<Options<CallWithResultFromHeaderData>>): MutationOptions<unknown, DefaultError, Options<CallWithResultFromHeaderData>> => {\n    const mutationOptions: MutationOptions<unknown, DefaultError, Options<CallWithResultFromHeaderData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await callWithResultFromHeader({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const testErrorCodeMutation = (options?: Partial<Options<TestErrorCodeData>>): MutationOptions<unknown, DefaultError, Options<TestErrorCodeData>> => {\n    const mutationOptions: MutationOptions<unknown, DefaultError, Options<TestErrorCodeData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await testErrorCode({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const nonAsciiæøåÆøÅöôêÊ字符串Mutation = (options?: Partial<Options<NonAsciiæøåÆøÅöôêÊ字符串Data>>): MutationOptions<NonAsciiæøåÆøÅöôêÊ字符串Response, DefaultError, Options<NonAsciiæøåÆøÅöôêÊ字符串Data>> => {\n    const mutationOptions: MutationOptions<NonAsciiæøåÆøÅöôêÊ字符串Response, DefaultError, Options<NonAsciiæøåÆøÅöôêÊ字符串Data>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await nonAsciiæøåÆøÅöôêÊ字符串({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\n/**\n * Login User\n */\nexport const putWithFormUrlEncodedMutation = (options?: Partial<Options<PutWithFormUrlEncodedData>>): MutationOptions<unknown, DefaultError, Options<PutWithFormUrlEncodedData>> => {\n    const mutationOptions: MutationOptions<unknown, DefaultError, Options<PutWithFormUrlEncodedData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await putWithFormUrlEncoded({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/angular-query-experimental/fetch/client/client.gen.ts",
    "content": "// 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 (options: RequestOptions) => {\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 url = buildUrl(opts);\n\n    return { opts, url };\n  };\n\n  const request: Client['request'] = async (options) => {\n    // @ts-expect-error\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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/angular-query-experimental/fetch/client/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type { Auth } from '../core/auth.gen';\nexport type { QuerySerializerOptions } from '../core/bodySerializer.gen';\nexport {\n  formDataBodySerializer,\n  jsonBodySerializer,\n  urlSearchParamsBodySerializer,\n} from '../core/bodySerializer.gen';\nexport { buildClientParams } from '../core/params.gen';\nexport { serializeQueryKeyValue } from '../core/queryKeySerializer.gen';\nexport { createClient } from './client.gen';\nexport type {\n  Client,\n  ClientOptions,\n  Config,\n  CreateClientConfig,\n  Options,\n  RequestOptions,\n  RequestResult,\n  ResolvedRequestOptions,\n  ResponseStyle,\n  TDataShape,\n} from './types.gen';\nexport { createConfig, mergeHeaders } from './utils.gen';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/angular-query-experimental/fetch/client/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { Auth } from '../core/auth.gen';\nimport type {\n  ServerSentEventsOptions,\n  ServerSentEventsResult,\n} from '../core/serverSentEvents.gen';\nimport type { Client as CoreClient, Config as CoreConfig } from '../core/types.gen';\nimport type { Middleware } from './utils.gen';\n\nexport type ResponseStyle = 'data' | 'fields';\n\nexport interface Config<T extends ClientOptions = ClientOptions>\n  extends Omit<RequestInit, 'body' | 'headers' | 'method'>, CoreConfig {\n  /**\n   * Base URL for all requests made by this client.\n   */\n  baseUrl?: T['baseUrl'];\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   * Please don't use the Fetch client for Next.js applications. The `next`\n   * options won't have any effect.\n   *\n   * Install {@link https://www.npmjs.com/package/@hey-api/client-next `@hey-api/client-next`} instead.\n   */\n  next?: never;\n  /**\n   * Return the response data parsed in a specified format. By default, `auto`\n   * will infer the appropriate method from the `Content-Type` response header.\n   * You can override this behavior with any of the {@link Body} methods.\n   * Select `stream` if you don't want to parse response data at all.\n   *\n   * @default 'auto'\n   */\n  parseAs?: 'arrayBuffer' | 'auto' | 'blob' | 'formData' | 'json' | 'stream' | 'text';\n  /**\n   * Should we return only data or multiple fields (data, error, response, etc.)?\n   *\n   * @default 'fields'\n   */\n  responseStyle?: ResponseStyle;\n  /**\n   * Throw an error instead of returning it in the response?\n   *\n   * @default false\n   */\n  throwOnError?: T['throwOnError'];\n}\n\nexport interface RequestOptions<\n  TData = unknown,\n  TResponseStyle extends ResponseStyle = 'fields',\n  ThrowOnError extends boolean = boolean,\n  Url extends string = string,\n>\n  extends\n    Config<{\n      responseStyle: TResponseStyle;\n      throwOnError: ThrowOnError;\n    }>,\n    Pick<\n      ServerSentEventsOptions<TData>,\n      | 'onRequest'\n      | 'onSseError'\n      | 'onSseEvent'\n      | 'sseDefaultRetryDelay'\n      | 'sseMaxRetryAttempts'\n      | 'sseMaxRetryDelay'\n    > {\n  /**\n   * Any body that you want to add to your request.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/fetch#body}\n   */\n  body?: unknown;\n  path?: Record<string, unknown>;\n  query?: Record<string, unknown>;\n  /**\n   * Security mechanism(s) to use for the request.\n   */\n  security?: ReadonlyArray<Auth>;\n  url: Url;\n}\n\nexport interface ResolvedRequestOptions<\n  TResponseStyle extends ResponseStyle = 'fields',\n  ThrowOnError extends boolean = boolean,\n  Url extends string = string,\n> extends RequestOptions<unknown, TResponseStyle, ThrowOnError, Url> {\n  serializedBody?: string;\n}\n\nexport type RequestResult<\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = boolean,\n  TResponseStyle extends ResponseStyle = 'fields',\n> = ThrowOnError extends true\n  ? Promise<\n      TResponseStyle extends 'data'\n        ? TData extends Record<string, unknown>\n          ? TData[keyof TData]\n          : TData\n        : {\n            data: TData extends Record<string, unknown> ? TData[keyof TData] : TData;\n            request: Request;\n            response: Response;\n          }\n    >\n  : Promise<\n      TResponseStyle extends 'data'\n        ? (TData extends Record<string, unknown> ? TData[keyof TData] : TData) | undefined\n        : (\n            | {\n                data: TData extends Record<string, unknown> ? TData[keyof TData] : TData;\n                error: undefined;\n              }\n            | {\n                data: undefined;\n                error: TError extends Record<string, unknown> ? TError[keyof TError] : TError;\n              }\n          ) & {\n            request: Request;\n            response: Response;\n          }\n    >;\n\nexport interface ClientOptions {\n  baseUrl?: string;\n  responseStyle?: ResponseStyle;\n  throwOnError?: boolean;\n}\n\ntype MethodFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'>,\n) => RequestResult<TData, TError, ThrowOnError, TResponseStyle>;\n\ntype SseFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'>,\n) => Promise<ServerSentEventsResult<TData, TError>>;\n\ntype RequestFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'> &\n    Pick<Required<RequestOptions<TData, TResponseStyle, ThrowOnError>>, 'method'>,\n) => RequestResult<TData, TError, ThrowOnError, TResponseStyle>;\n\ntype BuildUrlFn = <\n  TData extends {\n    body?: unknown;\n    path?: Record<string, unknown>;\n    query?: Record<string, unknown>;\n    url: string;\n  },\n>(\n  options: TData & Options<TData>,\n) => string;\n\nexport type Client = CoreClient<RequestFn, Config, MethodFn, BuildUrlFn, SseFn> & {\n  interceptors: Middleware<Request, Response, unknown, ResolvedRequestOptions>;\n};\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 = ClientOptions> = (\n  override?: Config<ClientOptions & T>,\n) => Config<Required<ClientOptions> & T>;\n\nexport interface TDataShape {\n  body?: unknown;\n  headers?: unknown;\n  path?: unknown;\n  query?: unknown;\n  url: string;\n}\n\ntype OmitKeys<T, K> = Pick<T, Exclude<keyof T, K>>;\n\nexport type Options<\n  TData extends TDataShape = TDataShape,\n  ThrowOnError extends boolean = boolean,\n  TResponse = unknown,\n  TResponseStyle extends ResponseStyle = 'fields',\n> = OmitKeys<\n  RequestOptions<TResponse, TResponseStyle, ThrowOnError>,\n  'body' | 'path' | 'query' | 'url'\n> &\n  ([TData] extends [never] ? unknown : Omit<TData, 'url'>);\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/angular-query-experimental/fetch/client/utils.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/angular-query-experimental/fetch/client.gen.ts",
    "content": "// 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: 'http://localhost:3000/base' }));\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/angular-query-experimental/fetch/core/auth.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/angular-query-experimental/fetch/core/bodySerializer.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/angular-query-experimental/fetch/core/params.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/angular-query-experimental/fetch/core/pathSerializer.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/angular-query-experimental/fetch/core/queryKeySerializer.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\n/**\n * JSON-friendly union that mirrors what Pinia Colada can hash.\n */\nexport type JsonValue =\n  | null\n  | string\n  | number\n  | boolean\n  | JsonValue[]\n  | { [key: string]: JsonValue };\n\n/**\n * Replacer that converts non-JSON values (bigint, Date, etc.) to safe substitutes.\n */\nexport const queryKeyJsonReplacer = (_key: string, value: unknown) => {\n  if (value === undefined || typeof value === 'function' || typeof value === 'symbol') {\n    return undefined;\n  }\n  if (typeof value === 'bigint') {\n    return value.toString();\n  }\n  if (value instanceof Date) {\n    return value.toISOString();\n  }\n  return value;\n};\n\n/**\n * Safely stringifies a value and parses it back into a JsonValue.\n */\nexport const stringifyToJsonValue = (input: unknown): JsonValue | undefined => {\n  try {\n    const json = JSON.stringify(input, queryKeyJsonReplacer);\n    if (json === undefined) {\n      return undefined;\n    }\n    return JSON.parse(json) as JsonValue;\n  } catch {\n    return undefined;\n  }\n};\n\n/**\n * Detects plain objects (including objects with a null prototype).\n */\nconst isPlainObject = (value: unknown): value is Record<string, unknown> => {\n  if (value === null || typeof value !== 'object') {\n    return false;\n  }\n  const prototype = Object.getPrototypeOf(value as object);\n  return prototype === Object.prototype || prototype === null;\n};\n\n/**\n * Turns URLSearchParams into a sorted JSON object for deterministic keys.\n */\nconst serializeSearchParams = (params: URLSearchParams): JsonValue => {\n  const entries = Array.from(params.entries()).sort(([a], [b]) => a.localeCompare(b));\n  const result: Record<string, JsonValue> = {};\n\n  for (const [key, value] of entries) {\n    const existing = result[key];\n    if (existing === undefined) {\n      result[key] = value;\n      continue;\n    }\n\n    if (Array.isArray(existing)) {\n      (existing as string[]).push(value);\n    } else {\n      result[key] = [existing, value];\n    }\n  }\n\n  return result;\n};\n\n/**\n * Normalizes any accepted value into a JSON-friendly shape for query keys.\n */\nexport const serializeQueryKeyValue = (value: unknown): JsonValue | undefined => {\n  if (value === null) {\n    return null;\n  }\n\n  if (typeof value === 'string' || typeof value === 'number' || typeof value === 'boolean') {\n    return value;\n  }\n\n  if (value === undefined || typeof value === 'function' || typeof value === 'symbol') {\n    return undefined;\n  }\n\n  if (typeof value === 'bigint') {\n    return value.toString();\n  }\n\n  if (value instanceof Date) {\n    return value.toISOString();\n  }\n\n  if (Array.isArray(value)) {\n    return stringifyToJsonValue(value);\n  }\n\n  if (typeof URLSearchParams !== 'undefined' && value instanceof URLSearchParams) {\n    return serializeSearchParams(value);\n  }\n\n  if (isPlainObject(value)) {\n    return stringifyToJsonValue(value);\n  }\n\n  return undefined;\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/angular-query-experimental/fetch/core/serverSentEvents.gen.ts",
    "content": "// 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 const 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            // Normalize line endings: CRLF -> LF, then CR -> LF\n            buffer = buffer.replace(/\\r\\n/g, '\\n').replace(/\\r/g, '\\n');\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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/angular-query-experimental/fetch/core/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { Auth, AuthToken } from './auth.gen';\nimport type { BodySerializer, QuerySerializer, QuerySerializerOptions } from './bodySerializer.gen';\n\nexport type HttpMethod =\n  | 'connect'\n  | 'delete'\n  | 'get'\n  | 'head'\n  | 'options'\n  | 'patch'\n  | 'post'\n  | 'put'\n  | 'trace';\n\nexport type Client<\n  RequestFn = never,\n  Config = unknown,\n  MethodFn = never,\n  BuildUrlFn = never,\n  SseFn = never,\n> = {\n  /**\n   * Returns the final request URL.\n   */\n  buildUrl: BuildUrlFn;\n  getConfig: () => Config;\n  request: RequestFn;\n  setConfig: (config: Config) => Config;\n} & {\n  [K in HttpMethod]: MethodFn;\n} & ([SseFn] extends [never] ? { sse?: never } : { sse: { [K in HttpMethod]: SseFn } });\n\nexport interface Config {\n  /**\n   * Auth token or a function returning auth token. The resolved value will be\n   * added to the request payload as defined by its `security` array.\n   */\n  auth?: ((auth: Auth) => Promise<AuthToken> | AuthToken) | AuthToken;\n  /**\n   * A function for serializing request body parameter. By default,\n   * {@link JSON.stringify()} will be used.\n   */\n  bodySerializer?: BodySerializer | null;\n  /**\n   * An object containing any HTTP headers that you want to pre-populate your\n   * `Headers` object with.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/Headers/Headers#init See more}\n   */\n  headers?:\n    | RequestInit['headers']\n    | Record<\n        string,\n        string | number | boolean | (string | number | boolean)[] | null | undefined | unknown\n      >;\n  /**\n   * The request method.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/fetch#method See more}\n   */\n  method?: Uppercase<HttpMethod>;\n  /**\n   * A function for serializing request query parameters. By default, arrays\n   * will be exploded in form style, objects will be exploded in deepObject\n   * style, and reserved characters are percent-encoded.\n   *\n   * This method will have no effect if the native `paramsSerializer()` Axios\n   * API function is used.\n   *\n   * {@link https://swagger.io/docs/specification/serialization/#query View examples}\n   */\n  querySerializer?: QuerySerializer | QuerySerializerOptions;\n  /**\n   * A function validating request data. This is useful if you want to ensure\n   * the request conforms to the desired shape, so it can be safely sent to\n   * the server.\n   */\n  requestValidator?: (data: unknown) => Promise<unknown>;\n  /**\n   * A function transforming response data before it's returned. This is useful\n   * for post-processing data, e.g. converting ISO strings into Date objects.\n   */\n  responseTransformer?: (data: unknown) => Promise<unknown>;\n  /**\n   * A function validating response data. This is useful if you want to ensure\n   * the response conforms to the desired shape, so it can be safely passed to\n   * the transformers and returned to the user.\n   */\n  responseValidator?: (data: unknown) => Promise<unknown>;\n}\n\ntype IsExactlyNeverOrNeverUndefined<T> = [T] extends [never]\n  ? true\n  : [T] extends [never | undefined]\n    ? [undefined] extends [T]\n      ? false\n      : true\n    : false;\n\nexport type OmitNever<T extends Record<string, unknown>> = {\n  [K in keyof T as IsExactlyNeverOrNeverUndefined<T[K]> extends true ? never : K]: T[K];\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/angular-query-experimental/fetch/core/utils.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/angular-query-experimental/fetch/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport { apiVVersionODataControllerCount, callToTestOrderOfParams, callWithDefaultOptionalParameters, callWithDefaultParameters, callWithDescriptions, callWithDuplicateResponses, callWithNoContentResponse, callWithParameters, callWithResponse, callWithResponseAndNoContentResponse, callWithResponses, callWithResultFromHeader, callWithWeirdParameterNames, collectionFormat, complexParams, complexTypes, deleteCallWithoutParametersAndResponse, deleteFoo, deprecatedCall, dummyA, dummyB, duplicateName, duplicateName2, duplicateName3, duplicateName4, export_, fileResponse, fooWow, getApiVbyApiVersionSimpleOperation, getCallWithOptionalParam, getCallWithoutParametersAndResponse, headCallWithoutParametersAndResponse, import_, multipartRequest, multipartResponse, nonAsciiæøåÆøÅöôêÊ字符串, type Options, optionsCallWithoutParametersAndResponse, patchApiVbyApiVersionNoTag, patchCallWithoutParametersAndResponse, postApiVbyApiVersionFormData, postApiVbyApiVersionRequestBody, postCallWithOptionalParam, postCallWithoutParametersAndResponse, putCallWithoutParametersAndResponse, putWithFormUrlEncoded, testErrorCode, types, uploadFile } from './sdk.gen';\nexport type { _3eNum1Период, _400, AdditionalPropertiesIntegerIssue, AdditionalPropertiesUnknownIssue, AdditionalPropertiesUnknownIssue2, AdditionalPropertiesUnknownIssue3, AdditionalPropertiesUnknownIssueWritable, AnyOfAnyAndNull, AnyOfArrays, ApiVVersionODataControllerCountData, ApiVVersionODataControllerCountResponse, ApiVVersionODataControllerCountResponses, ArrayWithAnyOfProperties, ArrayWithArray, ArrayWithBooleans, ArrayWithNumbers, ArrayWithProperties, ArrayWithReferences, ArrayWithStrings, CallToTestOrderOfParamsData, CallWithDefaultOptionalParametersData, CallWithDefaultParametersData, CallWithDescriptionsData, CallWithDuplicateResponsesData, CallWithDuplicateResponsesError, CallWithDuplicateResponsesErrors, CallWithDuplicateResponsesResponse, CallWithDuplicateResponsesResponses, CallWithNoContentResponseData, CallWithNoContentResponseResponse, CallWithNoContentResponseResponses, CallWithParametersData, CallWithResponseAndNoContentResponseData, CallWithResponseAndNoContentResponseResponse, CallWithResponseAndNoContentResponseResponses, CallWithResponseData, CallWithResponseResponse, CallWithResponseResponses, CallWithResponsesData, CallWithResponsesError, CallWithResponsesErrors, CallWithResponsesResponse, CallWithResponsesResponses, CallWithResultFromHeaderData, CallWithResultFromHeaderErrors, CallWithResultFromHeaderResponses, CallWithWeirdParameterNamesData, CamelCaseCommentWithBreaks, CharactersInDescription, ClientOptions, CollectionFormatData, CommentWithBackticks, CommentWithBackticksAndQuotes, CommentWithBreaks, CommentWithExpressionPlaceholders, CommentWithQuotes, CommentWithReservedCharacters, CommentWithSlashes, ComplexParamsData, ComplexParamsResponse, ComplexParamsResponses, ComplexTypesData, ComplexTypesErrors, ComplexTypesResponse, ComplexTypesResponses, CompositionBaseModel, CompositionExtendedModel, CompositionWithAllOfAndNullable, CompositionWithAnyOf, CompositionWithAnyOfAndNullable, CompositionWithAnyOfAnonymous, CompositionWithNestedAnyAndTypeNull, CompositionWithNestedAnyOfAndNull, CompositionWithOneOf, CompositionWithOneOfAndComplexArrayDictionary, CompositionWithOneOfAndNullable, CompositionWithOneOfAndProperties, CompositionWithOneOfAndSimpleArrayDictionary, CompositionWithOneOfAndSimpleDictionary, CompositionWithOneOfAnonymous, CompositionWithOneOfDiscriminator, ConstValue, Default, DeleteCallWithoutParametersAndResponseData, DeleteFooData, DeleteFooData2, DeleteFooData3, DeprecatedCallData, DeprecatedModel, DictionaryWithArray, DictionaryWithDictionary, DictionaryWithProperties, DictionaryWithPropertiesAndAdditionalProperties, DictionaryWithReference, DictionaryWithString, DummyAData, DummyAResponse, DummyAResponses, DummyBData, DummyBResponse, DummyBResponses, DuplicateName2Data, DuplicateName3Data, DuplicateName4Data, DuplicateNameData, EnumFromDescription, EnumWithExtensions, EnumWithNumbers, EnumWithReplacedCharacters, EnumWithStrings, EnumWithXEnumNames, ExportData, ExternalRefA, ExternalRefB, ExternalSharedModel, File, FileResponseData, FileResponseResponse, FileResponseResponses, FileWritable, FooWowData, FooWowResponses, FreeFormObjectWithAdditionalPropertiesEqEmptyObject, FreeFormObjectWithAdditionalPropertiesEqTrue, FreeFormObjectWithoutAdditionalProperties, GenericSchemaDuplicateIssue1SystemBoolean, GenericSchemaDuplicateIssue1SystemBooleanWritable, GenericSchemaDuplicateIssue1SystemString, GenericSchemaDuplicateIssue1SystemStringWritable, GetApiVbyApiVersionSimpleOperationData, GetApiVbyApiVersionSimpleOperationError, GetApiVbyApiVersionSimpleOperationErrors, GetApiVbyApiVersionSimpleOperationResponse, GetApiVbyApiVersionSimpleOperationResponses, GetCallWithOptionalParamData, GetCallWithoutParametersAndResponseData, HeadCallWithoutParametersAndResponseData, Import, ImportData, ImportResponse, ImportResponses, IoK8sApimachineryPkgApisMetaV1DeleteOptions, IoK8sApimachineryPkgApisMetaV1Preconditions, ModelCircle, ModelFromZendesk, ModelSquare, ModelThatExtends, ModelThatExtendsExtends, ModelWithAdditionalPropertiesEqTrue, ModelWithAdditionalPropertiesRef, ModelWithAnyOfConstantSizeArray, ModelWithAnyOfConstantSizeArrayAndIntersect, ModelWithAnyOfConstantSizeArrayNullable, ModelWithAnyOfConstantSizeArrayWithNSizeAndOptions, ModelWithAnyOfConstantSizeArrayWithNSizeAndOptionsWritable, ModelWithArray, ModelWithArrayReadOnlyAndWriteOnly, ModelWithArrayReadOnlyAndWriteOnlyWritable, ModelWithBackticksInDescription, ModelWithBoolean, ModelWithCircularReference, ModelWithConst, ModelWithConstantSizeArray, ModelWithDictionary, ModelWithDuplicateImports, ModelWithDuplicateProperties, ModelWithEnum, ModelWithEnumFromDescription, ModelWithEnumWithHyphen, ModelWithInteger, ModelWithNestedArrayEnums, ModelWithNestedArrayEnumsData, ModelWithNestedArrayEnumsDataBar, ModelWithNestedArrayEnumsDataFoo, ModelWithNestedCompositionEnums, ModelWithNestedEnums, ModelWithNestedProperties, ModelWithNullableObject, ModelWithNullableString, ModelWithNumericEnumUnion, ModelWithOneOfAndProperties, ModelWithOneOfEnum, ModelWithOrderedProperties, ModelWithPattern, ModelWithPatternWritable, ModelWithPrefixItemsConstantSizeArray, ModelWithProperties, ModelWithPropertiesWritable, ModelWithReadOnlyAndWriteOnly, ModelWithReadOnlyAndWriteOnlyWritable, ModelWithReference, ModelWithReferenceWritable, ModelWithString, ModelWithStringError, MultipartRequestData, MultipartResponseData, MultipartResponseResponse, MultipartResponseResponses, NestedAnyOfArraysNullable, NonAsciiæøåÆøÅöôêÊ字符串Data, NonAsciiæøåÆøÅöôêÊ字符串Response, NonAsciiæøåÆøÅöôêÊ字符串Responses, NonAsciiStringæøåÆøÅöôêÊ字符串, NullableObject, OneOfAllOfIssue, OneOfAllOfIssueWritable, OptionsCallWithoutParametersAndResponseData, Pageable, ParameterSimpleParameterUnused, PatchApiVbyApiVersionNoTagData, PatchApiVbyApiVersionNoTagResponses, PatchCallWithoutParametersAndResponseData, PostApiVbyApiVersionFormDataData, PostApiVbyApiVersionRequestBodyData, PostCallWithOptionalParamData, PostCallWithOptionalParamResponse, PostCallWithOptionalParamResponses, PostCallWithoutParametersAndResponseData, PostServiceWithEmptyTagResponse, PostServiceWithEmptyTagResponse2, PutCallWithoutParametersAndResponseData, PutWithFormUrlEncodedData, SchemaWithFormRestrictedKeys, SimpleBoolean, SimpleFile, SimpleFormData, SimpleInteger, SimpleParameter, SimpleReference, SimpleRequestBody, SimpleString, SimpleStringWithPattern, TestErrorCodeData, TestErrorCodeErrors, TestErrorCodeResponses, TypesData, TypesResponse, TypesResponses, UploadFileData, UploadFileResponse, UploadFileResponses, XFooBar } from './types.gen';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/angular-query-experimental/fetch/sdk.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport { type Client, formDataBodySerializer, type Options as Options2, type TDataShape, urlSearchParamsBodySerializer } from './client';\nimport { client } from './client.gen';\nimport type { ApiVVersionODataControllerCountData, ApiVVersionODataControllerCountResponses, CallToTestOrderOfParamsData, CallWithDefaultOptionalParametersData, CallWithDefaultParametersData, CallWithDescriptionsData, CallWithDuplicateResponsesData, CallWithDuplicateResponsesErrors, CallWithDuplicateResponsesResponses, CallWithNoContentResponseData, CallWithNoContentResponseResponses, CallWithParametersData, CallWithResponseAndNoContentResponseData, CallWithResponseAndNoContentResponseResponses, CallWithResponseData, CallWithResponseResponses, CallWithResponsesData, CallWithResponsesErrors, CallWithResponsesResponses, CallWithResultFromHeaderData, CallWithResultFromHeaderErrors, CallWithResultFromHeaderResponses, CallWithWeirdParameterNamesData, CollectionFormatData, ComplexParamsData, ComplexParamsResponses, ComplexTypesData, ComplexTypesErrors, ComplexTypesResponses, DeleteCallWithoutParametersAndResponseData, DeleteFooData3, DeprecatedCallData, DummyAData, DummyAResponses, DummyBData, DummyBResponses, DuplicateName2Data, DuplicateName3Data, DuplicateName4Data, DuplicateNameData, ExportData, FileResponseData, FileResponseResponses, FooWowData, FooWowResponses, GetApiVbyApiVersionSimpleOperationData, GetApiVbyApiVersionSimpleOperationErrors, GetApiVbyApiVersionSimpleOperationResponses, GetCallWithOptionalParamData, GetCallWithoutParametersAndResponseData, HeadCallWithoutParametersAndResponseData, ImportData, ImportResponses, MultipartRequestData, MultipartResponseData, MultipartResponseResponses, NonAsciiæøåÆøÅöôêÊ字符串Data, NonAsciiæøåÆøÅöôêÊ字符串Responses, OptionsCallWithoutParametersAndResponseData, PatchApiVbyApiVersionNoTagData, PatchApiVbyApiVersionNoTagResponses, PatchCallWithoutParametersAndResponseData, PostApiVbyApiVersionFormDataData, PostApiVbyApiVersionRequestBodyData, PostCallWithOptionalParamData, PostCallWithOptionalParamResponses, PostCallWithoutParametersAndResponseData, PutCallWithoutParametersAndResponseData, PutWithFormUrlEncodedData, TestErrorCodeData, TestErrorCodeErrors, TestErrorCodeResponses, TypesData, TypesResponses, UploadFileData, UploadFileResponses } from './types.gen';\n\nexport type Options<TData extends TDataShape = TDataShape, ThrowOnError extends boolean = boolean> = Options2<TData, ThrowOnError> & {\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\nexport const export_ = <ThrowOnError extends boolean = false>(options?: Options<ExportData, ThrowOnError>) => (options?.client ?? client).get<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/no+tag', ...options });\n\nexport const patchApiVbyApiVersionNoTag = <ThrowOnError extends boolean = false>(options?: Options<PatchApiVbyApiVersionNoTagData, ThrowOnError>) => (options?.client ?? client).patch<PatchApiVbyApiVersionNoTagResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/no+tag', ...options });\n\nexport const import_ = <ThrowOnError extends boolean = false>(options: Options<ImportData, ThrowOnError>) => (options.client ?? client).post<ImportResponses, unknown, ThrowOnError>({\n    url: '/api/v{api-version}/no+tag',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options.headers\n    }\n});\n\nexport const fooWow = <ThrowOnError extends boolean = false>(options?: Options<FooWowData, ThrowOnError>) => (options?.client ?? client).put<FooWowResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/no+tag', ...options });\n\nexport const apiVVersionODataControllerCount = <ThrowOnError extends boolean = false>(options?: Options<ApiVVersionODataControllerCountData, ThrowOnError>) => (options?.client ?? client).get<ApiVVersionODataControllerCountResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple/$count', ...options });\n\nexport const getApiVbyApiVersionSimpleOperation = <ThrowOnError extends boolean = false>(options: Options<GetApiVbyApiVersionSimpleOperationData, ThrowOnError>) => (options.client ?? client).get<GetApiVbyApiVersionSimpleOperationResponses, GetApiVbyApiVersionSimpleOperationErrors, ThrowOnError>({ url: '/api/v{api-version}/simple:operation', ...options });\n\nexport const deleteCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<DeleteCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).delete<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const getCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<GetCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).get<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const headCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<HeadCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).head<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const optionsCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<OptionsCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).options<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const patchCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<PatchCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).patch<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const postCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<PostCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).post<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const putCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<PutCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).put<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const deleteFoo = <ThrowOnError extends boolean = false>(options: Options<DeleteFooData3, ThrowOnError>) => (options.client ?? client).delete<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/foo/{foo_param}/bar/{BarParam}', ...options });\n\nexport const callWithDescriptions = <ThrowOnError extends boolean = false>(options?: Options<CallWithDescriptionsData, ThrowOnError>) => (options?.client ?? client).post<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/descriptions', ...options });\n\n/**\n * @deprecated\n */\nexport const deprecatedCall = <ThrowOnError extends boolean = false>(options: Options<DeprecatedCallData, ThrowOnError>) => (options.client ?? client).post<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/parameters/deprecated', ...options });\n\nexport const callWithParameters = <ThrowOnError extends boolean = false>(options: Options<CallWithParametersData, ThrowOnError>) => (options.client ?? client).post<unknown, unknown, ThrowOnError>({\n    url: '/api/v{api-version}/parameters/{parameterPath}',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options.headers\n    }\n});\n\nexport const callWithWeirdParameterNames = <ThrowOnError extends boolean = false>(options: Options<CallWithWeirdParameterNamesData, ThrowOnError>) => (options.client ?? client).post<unknown, unknown, ThrowOnError>({\n    url: '/api/v{api-version}/parameters/{parameter.path.1}/{parameter-path-2}/{PARAMETER-PATH-3}',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options.headers\n    }\n});\n\nexport const getCallWithOptionalParam = <ThrowOnError extends boolean = false>(options: Options<GetCallWithOptionalParamData, ThrowOnError>) => (options.client ?? client).get<unknown, unknown, ThrowOnError>({\n    url: '/api/v{api-version}/parameters',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options.headers\n    }\n});\n\nexport const postCallWithOptionalParam = <ThrowOnError extends boolean = false>(options: Options<PostCallWithOptionalParamData, ThrowOnError>) => (options.client ?? client).post<PostCallWithOptionalParamResponses, unknown, ThrowOnError>({\n    url: '/api/v{api-version}/parameters',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options.headers\n    }\n});\n\nexport const postApiVbyApiVersionRequestBody = <ThrowOnError extends boolean = false>(options?: Options<PostApiVbyApiVersionRequestBodyData, ThrowOnError>) => (options?.client ?? client).post<unknown, unknown, ThrowOnError>({\n    url: '/api/v{api-version}/requestBody',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options?.headers\n    }\n});\n\nexport const postApiVbyApiVersionFormData = <ThrowOnError extends boolean = false>(options?: Options<PostApiVbyApiVersionFormDataData, ThrowOnError>) => (options?.client ?? client).post<unknown, unknown, ThrowOnError>({\n    ...formDataBodySerializer,\n    url: '/api/v{api-version}/formData',\n    ...options,\n    headers: {\n        'Content-Type': null,\n        ...options?.headers\n    }\n});\n\nexport const callWithDefaultParameters = <ThrowOnError extends boolean = false>(options?: Options<CallWithDefaultParametersData, ThrowOnError>) => (options?.client ?? client).get<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/defaults', ...options });\n\nexport const callWithDefaultOptionalParameters = <ThrowOnError extends boolean = false>(options?: Options<CallWithDefaultOptionalParametersData, ThrowOnError>) => (options?.client ?? client).post<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/defaults', ...options });\n\nexport const callToTestOrderOfParams = <ThrowOnError extends boolean = false>(options: Options<CallToTestOrderOfParamsData, ThrowOnError>) => (options.client ?? client).put<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/defaults', ...options });\n\nexport const duplicateName = <ThrowOnError extends boolean = false>(options?: Options<DuplicateNameData, ThrowOnError>) => (options?.client ?? client).delete<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/duplicate', ...options });\n\nexport const duplicateName2 = <ThrowOnError extends boolean = false>(options?: Options<DuplicateName2Data, ThrowOnError>) => (options?.client ?? client).get<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/duplicate', ...options });\n\nexport const duplicateName3 = <ThrowOnError extends boolean = false>(options?: Options<DuplicateName3Data, ThrowOnError>) => (options?.client ?? client).post<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/duplicate', ...options });\n\nexport const duplicateName4 = <ThrowOnError extends boolean = false>(options?: Options<DuplicateName4Data, ThrowOnError>) => (options?.client ?? client).put<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/duplicate', ...options });\n\nexport const callWithNoContentResponse = <ThrowOnError extends boolean = false>(options?: Options<CallWithNoContentResponseData, ThrowOnError>) => (options?.client ?? client).get<CallWithNoContentResponseResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/no-content', ...options });\n\nexport const callWithResponseAndNoContentResponse = <ThrowOnError extends boolean = false>(options?: Options<CallWithResponseAndNoContentResponseData, ThrowOnError>) => (options?.client ?? client).get<CallWithResponseAndNoContentResponseResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/multiple-tags/response-and-no-content', ...options });\n\nexport const dummyA = <ThrowOnError extends boolean = false>(options?: Options<DummyAData, ThrowOnError>) => (options?.client ?? client).get<DummyAResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/multiple-tags/a', ...options });\n\nexport const dummyB = <ThrowOnError extends boolean = false>(options?: Options<DummyBData, ThrowOnError>) => (options?.client ?? client).get<DummyBResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/multiple-tags/b', ...options });\n\nexport const callWithResponse = <ThrowOnError extends boolean = false>(options?: Options<CallWithResponseData, ThrowOnError>) => (options?.client ?? client).get<CallWithResponseResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/response', ...options });\n\nexport const callWithDuplicateResponses = <ThrowOnError extends boolean = false>(options?: Options<CallWithDuplicateResponsesData, ThrowOnError>) => (options?.client ?? client).post<CallWithDuplicateResponsesResponses, CallWithDuplicateResponsesErrors, ThrowOnError>({ url: '/api/v{api-version}/response', ...options });\n\nexport const callWithResponses = <ThrowOnError extends boolean = false>(options?: Options<CallWithResponsesData, ThrowOnError>) => (options?.client ?? client).put<CallWithResponsesResponses, CallWithResponsesErrors, ThrowOnError>({ url: '/api/v{api-version}/response', ...options });\n\nexport const collectionFormat = <ThrowOnError extends boolean = false>(options: Options<CollectionFormatData, ThrowOnError>) => (options.client ?? client).get<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/collectionFormat', ...options });\n\nexport const types = <ThrowOnError extends boolean = false>(options: Options<TypesData, ThrowOnError>) => (options.client ?? client).get<TypesResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/types', ...options });\n\nexport const uploadFile = <ThrowOnError extends boolean = false>(options: Options<UploadFileData, ThrowOnError>) => (options.client ?? client).post<UploadFileResponses, unknown, ThrowOnError>({\n    ...urlSearchParamsBodySerializer,\n    url: '/api/v{api-version}/upload',\n    ...options,\n    headers: {\n        'Content-Type': 'application/x-www-form-urlencoded',\n        ...options.headers\n    }\n});\n\nexport const fileResponse = <ThrowOnError extends boolean = false>(options: Options<FileResponseData, ThrowOnError>) => (options.client ?? client).get<FileResponseResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/file/{id}', ...options });\n\nexport const complexTypes = <ThrowOnError extends boolean = false>(options: Options<ComplexTypesData, ThrowOnError>) => (options.client ?? client).get<ComplexTypesResponses, ComplexTypesErrors, ThrowOnError>({\n    querySerializer: { parameters: { parameterObject: { object: { style: 'form' } } } },\n    url: '/api/v{api-version}/complex',\n    ...options\n});\n\nexport const multipartResponse = <ThrowOnError extends boolean = false>(options?: Options<MultipartResponseData, ThrowOnError>) => (options?.client ?? client).get<MultipartResponseResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/multipart', ...options });\n\nexport const multipartRequest = <ThrowOnError extends boolean = false>(options?: Options<MultipartRequestData, ThrowOnError>) => (options?.client ?? client).post<unknown, unknown, ThrowOnError>({\n    ...formDataBodySerializer,\n    url: '/api/v{api-version}/multipart',\n    ...options,\n    headers: {\n        'Content-Type': null,\n        ...options?.headers\n    }\n});\n\nexport const complexParams = <ThrowOnError extends boolean = false>(options: Options<ComplexParamsData, ThrowOnError>) => (options.client ?? client).put<ComplexParamsResponses, unknown, ThrowOnError>({\n    url: '/api/v{api-version}/complex/{id}',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json-patch+json',\n        ...options.headers\n    }\n});\n\nexport const callWithResultFromHeader = <ThrowOnError extends boolean = false>(options?: Options<CallWithResultFromHeaderData, ThrowOnError>) => (options?.client ?? client).post<CallWithResultFromHeaderResponses, CallWithResultFromHeaderErrors, ThrowOnError>({ url: '/api/v{api-version}/header', ...options });\n\nexport const testErrorCode = <ThrowOnError extends boolean = false>(options: Options<TestErrorCodeData, ThrowOnError>) => (options.client ?? client).post<TestErrorCodeResponses, TestErrorCodeErrors, ThrowOnError>({ url: '/api/v{api-version}/error', ...options });\n\nexport const nonAsciiæøåÆøÅöôêÊ字符串 = <ThrowOnError extends boolean = false>(options: Options<NonAsciiæøåÆøÅöôêÊ字符串Data, ThrowOnError>) => (options.client ?? client).post<NonAsciiæøåÆøÅöôêÊ字符串Responses, unknown, ThrowOnError>({ url: '/api/v{api-version}/non-ascii-æøåÆØÅöôêÊ字符串', ...options });\n\n/**\n * Login User\n */\nexport const putWithFormUrlEncoded = <ThrowOnError extends boolean = false>(options: Options<PutWithFormUrlEncodedData, ThrowOnError>) => (options.client ?? client).put<unknown, unknown, ThrowOnError>({\n    ...urlSearchParamsBodySerializer,\n    url: '/api/v{api-version}/non-ascii-æøåÆØÅöôêÊ字符串',\n    ...options,\n    headers: {\n        'Content-Type': 'application/x-www-form-urlencoded',\n        ...options.headers\n    }\n});\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/angular-query-experimental/fetch/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type ClientOptions = {\n    baseUrl: 'http://localhost:3000/base' | (string & {});\n};\n\n/**\n * Model with number-only name\n */\nexport type _400 = string;\n\nexport type ExternalRefA = ExternalSharedModel;\n\nexport type ExternalRefB = ExternalSharedModel;\n\n/**\n * Testing multiline comments in string: First line\n * Second line\n *\n * Fourth line\n */\nexport type CamelCaseCommentWithBreaks = number;\n\n/**\n * Testing multiline comments in string: First line\n * Second line\n *\n * Fourth line\n */\nexport type CommentWithBreaks = number;\n\n/**\n * Testing backticks in string: `backticks` and ```multiple backticks``` should work\n */\nexport type CommentWithBackticks = number;\n\n/**\n * Testing backticks and quotes in string: `backticks`, 'quotes', \"double quotes\" and ```multiple backticks``` should work\n */\nexport type CommentWithBackticksAndQuotes = number;\n\n/**\n * Testing slashes in string: \\backwards\\\\\\ and /forwards/// should work\n */\nexport type CommentWithSlashes = number;\n\n/**\n * Testing expression placeholders in string: ${expression} should work\n */\nexport type CommentWithExpressionPlaceholders = number;\n\n/**\n * Testing quotes in string: 'single quote''' and \"double quotes\"\"\" should work\n */\nexport type CommentWithQuotes = number;\n\n/**\n * Testing reserved characters in string: * inline * and ** inline ** should work\n */\nexport type CommentWithReservedCharacters = number;\n\n/**\n * This is a simple number\n */\nexport type SimpleInteger = number;\n\n/**\n * This is a simple boolean\n */\nexport type SimpleBoolean = boolean;\n\n/**\n * This is a simple string\n */\nexport type SimpleString = string;\n\n/**\n * A string with non-ascii (unicode) characters valid in typescript identifiers (æøåÆØÅöÔèÈ字符串)\n */\nexport type NonAsciiStringæøåÆøÅöôêÊ字符串 = string;\n\n/**\n * This is a simple file\n */\nexport type SimpleFile = Blob | File;\n\n/**\n * This is a simple reference\n */\nexport type SimpleReference = ModelWithString;\n\n/**\n * This is a simple string\n */\nexport type SimpleStringWithPattern = string | null;\n\n/**\n * This is a simple enum with strings\n */\nexport type EnumWithStrings = 'Success' | 'Warning' | 'Error' | '\\'Single Quote\\'' | '\"Double Quotes\"' | 'Non-ascii: øæåôöØÆÅÔÖ字符串';\n\nexport type EnumWithReplacedCharacters = '\\'Single Quote\\'' | '\"Double Quotes\"' | 'øæåôöØÆÅÔÖ字符串' | 3.1 | '';\n\n/**\n * This is a simple enum with numbers\n */\nexport type EnumWithNumbers = 1 | 2 | 3 | 1.1 | 1.2 | 1.3 | 100 | 200 | 300 | -100 | -200 | -300 | -1.1 | -1.2 | -1.3;\n\n/**\n * Success=1,Warning=2,Error=3\n */\nexport type EnumFromDescription = number;\n\n/**\n * This is a simple enum with numbers\n */\nexport type EnumWithExtensions = 200 | 400 | 500;\n\nexport type EnumWithXEnumNames = 0 | 1 | 2;\n\n/**\n * This is a simple array with numbers\n */\nexport type ArrayWithNumbers = Array<number>;\n\n/**\n * This is a simple array with booleans\n */\nexport type ArrayWithBooleans = Array<boolean>;\n\n/**\n * This is a simple array with strings\n */\nexport type ArrayWithStrings = Array<string>;\n\n/**\n * This is a simple array with references\n */\nexport type ArrayWithReferences = Array<ModelWithString>;\n\n/**\n * This is a simple array containing an array\n */\nexport type ArrayWithArray = Array<Array<ModelWithString>>;\n\n/**\n * This is a simple array with properties\n */\nexport type ArrayWithProperties = Array<{\n    '16x16'?: CamelCaseCommentWithBreaks;\n    bar?: string;\n}>;\n\n/**\n * This is a simple array with any of properties\n */\nexport type ArrayWithAnyOfProperties = Array<{\n    foo?: string;\n} | {\n    bar?: string;\n}>;\n\nexport type AnyOfAnyAndNull = {\n    data?: unknown;\n};\n\n/**\n * This is a simple array with any of properties\n */\nexport type AnyOfArrays = {\n    results?: Array<{\n        foo?: string;\n    } | {\n        bar?: string;\n    }>;\n};\n\n/**\n * This is a string dictionary\n */\nexport type DictionaryWithString = {\n    [key: string]: string;\n};\n\nexport type DictionaryWithPropertiesAndAdditionalProperties = {\n    foo?: number;\n    bar?: boolean;\n    [key: string]: string | number | boolean | undefined;\n};\n\n/**\n * This is a string reference\n */\nexport type DictionaryWithReference = {\n    [key: string]: ModelWithString;\n};\n\n/**\n * This is a complex dictionary\n */\nexport type DictionaryWithArray = {\n    [key: string]: Array<ModelWithString>;\n};\n\n/**\n * This is a string dictionary\n */\nexport type DictionaryWithDictionary = {\n    [key: string]: {\n        [key: string]: string;\n    };\n};\n\n/**\n * This is a complex dictionary\n */\nexport type DictionaryWithProperties = {\n    [key: string]: {\n        foo?: string;\n        bar?: string;\n    };\n};\n\n/**\n * This is a model with one number property\n */\nexport type ModelWithInteger = {\n    /**\n     * This is a simple number property\n     */\n    prop?: number;\n};\n\n/**\n * This is a model with one boolean property\n */\nexport type ModelWithBoolean = {\n    /**\n     * This is a simple boolean property\n     */\n    prop?: boolean;\n};\n\n/**\n * This is a model with one string property\n */\nexport type ModelWithString = {\n    /**\n     * This is a simple string property\n     */\n    prop?: string;\n};\n\n/**\n * This is a model with one string property\n */\nexport type ModelWithStringError = {\n    /**\n     * This is a simple string property\n     */\n    prop?: string;\n};\n\n/**\n * `Comment` or `VoiceComment`. The JSON object for adding voice comments to tickets is different. See [Adding voice comments to tickets](/documentation/ticketing/managing-tickets/adding-voice-comments-to-tickets)\n */\nexport type ModelFromZendesk = string;\n\n/**\n * This is a model with one string property\n */\nexport type ModelWithNullableString = {\n    /**\n     * This is a simple string property\n     */\n    nullableProp1?: string | null;\n    /**\n     * This is a simple string property\n     */\n    nullableRequiredProp1: string | null;\n    /**\n     * This is a simple string property\n     */\n    nullableProp2?: string | null;\n    /**\n     * This is a simple string property\n     */\n    nullableRequiredProp2: string | null;\n    /**\n     * This is a simple enum with strings\n     */\n    'foo_bar-enum'?: 'Success' | 'Warning' | 'Error' | 'ØÆÅ字符串';\n};\n\n/**\n * This is a model with one enum\n */\nexport type ModelWithEnum = {\n    /**\n     * This is a simple enum with strings\n     */\n    'foo_bar-enum'?: 'Success' | 'Warning' | 'Error' | 'ØÆÅ字符串';\n    /**\n     * These are the HTTP error code enums\n     */\n    statusCode?: '100' | '200 FOO' | '300 FOO_BAR' | '400 foo-bar' | '500 foo.bar' | '600 foo&bar';\n    /**\n     * Simple boolean enum\n     */\n    bool?: true;\n};\n\n/**\n * This is a model with one enum with escaped name\n */\nexport type ModelWithEnumWithHyphen = {\n    /**\n     * Foo-Bar-Baz-Qux\n     */\n    'foo-bar-baz-qux'?: '3.0';\n};\n\n/**\n * This is a model with one enum\n */\nexport type ModelWithEnumFromDescription = {\n    /**\n     * Success=1,Warning=2,Error=3\n     */\n    test?: number;\n};\n\n/**\n * This is a model with nested enums\n */\nexport type ModelWithNestedEnums = {\n    dictionaryWithEnum?: {\n        [key: string]: 'Success' | 'Warning' | 'Error';\n    };\n    dictionaryWithEnumFromDescription?: {\n        [key: string]: number;\n    };\n    arrayWithEnum?: Array<'Success' | 'Warning' | 'Error'>;\n    arrayWithDescription?: Array<number>;\n    /**\n     * This is a simple enum with strings\n     */\n    'foo_bar-enum'?: 'Success' | 'Warning' | 'Error' | 'ØÆÅ字符串';\n};\n\n/**\n * This is a model with one property containing a reference\n */\nexport type ModelWithReference = {\n    prop?: ModelWithProperties;\n};\n\n/**\n * This is a model with one property containing an array\n */\nexport type ModelWithArrayReadOnlyAndWriteOnly = {\n    prop?: Array<ModelWithReadOnlyAndWriteOnly>;\n    propWithFile?: Array<Blob | File>;\n    propWithNumber?: Array<number>;\n};\n\n/**\n * This is a model with one property containing an array\n */\nexport type ModelWithArray = {\n    prop?: Array<ModelWithString>;\n    propWithFile?: Array<Blob | File>;\n    propWithNumber?: Array<number>;\n};\n\n/**\n * This is a model with one property containing a dictionary\n */\nexport type ModelWithDictionary = {\n    prop?: {\n        [key: string]: string;\n    };\n};\n\n/**\n * This is a deprecated model with a deprecated property\n *\n * @deprecated\n */\nexport type DeprecatedModel = {\n    /**\n     * This is a deprecated property\n     *\n     * @deprecated\n     */\n    prop?: string;\n};\n\n/**\n * This is a model with one property containing a circular reference\n */\nexport type ModelWithCircularReference = {\n    prop?: ModelWithCircularReference;\n};\n\n/**\n * This is a model with one property with a 'one of' relationship\n */\nexport type CompositionWithOneOf = {\n    propA?: ModelWithString | ModelWithEnum | ModelWithArray | ModelWithDictionary;\n};\n\n/**\n * This is a model with one property with a 'one of' relationship where the options are not $ref\n */\nexport type CompositionWithOneOfAnonymous = {\n    propA?: {\n        propA?: string;\n    } | string | number;\n};\n\n/**\n * Circle\n */\nexport type ModelCircle = {\n    kind: string;\n    radius?: number;\n};\n\n/**\n * Square\n */\nexport type ModelSquare = {\n    kind: string;\n    sideLength?: number;\n};\n\n/**\n * This is a model with one property with a 'one of' relationship where the options are not $ref\n */\nexport type CompositionWithOneOfDiscriminator = ({\n    kind: 'circle';\n} & ModelCircle) | ({\n    kind: 'square';\n} & ModelSquare);\n\n/**\n * This is a model with one property with a 'any of' relationship\n */\nexport type CompositionWithAnyOf = {\n    propA?: ModelWithString | ModelWithEnum | ModelWithArray | ModelWithDictionary;\n};\n\n/**\n * This is a model with one property with a 'any of' relationship where the options are not $ref\n */\nexport type CompositionWithAnyOfAnonymous = {\n    propA?: {\n        propA?: string;\n    } | string | number;\n};\n\n/**\n * This is a model with nested 'any of' property with a type null\n */\nexport type CompositionWithNestedAnyAndTypeNull = {\n    propA?: Array<ModelWithDictionary | null> | Array<ModelWithArray | null>;\n};\n\nexport type _3eNum1Период = 'Bird' | 'Dog';\n\nexport type ConstValue = 'ConstValue';\n\n/**\n * This is a model with one property with a 'any of' relationship where the options are not $ref\n */\nexport type CompositionWithNestedAnyOfAndNull = {\n    propA?: Array<_3eNum1Период | ConstValue> | null;\n};\n\n/**\n * This is a model with one property with a 'one of' relationship\n */\nexport type CompositionWithOneOfAndNullable = {\n    propA?: {\n        boolean?: boolean;\n    } | ModelWithEnum | ModelWithArray | ModelWithDictionary | null;\n};\n\n/**\n * This is a model that contains a simple dictionary within composition\n */\nexport type CompositionWithOneOfAndSimpleDictionary = {\n    propA?: boolean | {\n        [key: string]: number;\n    };\n};\n\n/**\n * This is a model that contains a dictionary of simple arrays within composition\n */\nexport type CompositionWithOneOfAndSimpleArrayDictionary = {\n    propA?: boolean | {\n        [key: string]: Array<boolean>;\n    };\n};\n\n/**\n * This is a model that contains a dictionary of complex arrays (composited) within composition\n */\nexport type CompositionWithOneOfAndComplexArrayDictionary = {\n    propA?: boolean | {\n        [key: string]: Array<number | string>;\n    };\n};\n\n/**\n * This is a model with one property with a 'all of' relationship\n */\nexport type CompositionWithAllOfAndNullable = {\n    propA?: ({\n        boolean?: boolean;\n    } & ModelWithEnum & ModelWithArray & ModelWithDictionary) | null;\n};\n\n/**\n * This is a model with one property with a 'any of' relationship\n */\nexport type CompositionWithAnyOfAndNullable = {\n    propA?: {\n        boolean?: boolean;\n    } | ModelWithEnum | ModelWithArray | ModelWithDictionary | null;\n};\n\n/**\n * This is a base model with two simple optional properties\n */\nexport type CompositionBaseModel = {\n    firstName?: string;\n    lastname?: string;\n};\n\n/**\n * This is a model that extends the base model\n */\nexport type CompositionExtendedModel = CompositionBaseModel & {\n    age: number;\n    firstName: string;\n    lastname: string;\n};\n\n/**\n * This is a model with one nested property\n */\nexport type ModelWithProperties = {\n    required: string;\n    readonly requiredAndReadOnly: string;\n    requiredAndNullable: string | null;\n    string?: string;\n    number?: number;\n    boolean?: boolean;\n    reference?: ModelWithString;\n    'property with space'?: string;\n    default?: string;\n    try?: string;\n    readonly '@namespace.string'?: string;\n    readonly '@namespace.integer'?: number;\n};\n\n/**\n * This is a model with one nested property\n */\nexport type ModelWithNestedProperties = {\n    readonly first: {\n        readonly second: {\n            readonly third: string | null;\n        } | null;\n    } | null;\n};\n\n/**\n * This is a model with duplicated properties\n */\nexport type ModelWithDuplicateProperties = {\n    prop?: ModelWithString;\n};\n\n/**\n * This is a model with ordered properties\n */\nexport type ModelWithOrderedProperties = {\n    zebra?: string;\n    apple?: string;\n    hawaii?: string;\n};\n\n/**\n * This is a model with duplicated imports\n */\nexport type ModelWithDuplicateImports = {\n    propA?: ModelWithString;\n    propB?: ModelWithString;\n    propC?: ModelWithString;\n};\n\n/**\n * This is a model that extends another model\n */\nexport type ModelThatExtends = ModelWithString & {\n    propExtendsA?: string;\n    propExtendsB?: ModelWithString;\n};\n\n/**\n * This is a model that extends another model\n */\nexport type ModelThatExtendsExtends = ModelWithString & ModelThatExtends & {\n    propExtendsC?: string;\n    propExtendsD?: ModelWithString;\n};\n\n/**\n * This is a model that contains a some patterns\n */\nexport type ModelWithPattern = {\n    key: string;\n    name: string;\n    readonly enabled?: boolean;\n    readonly modified?: string;\n    id?: string;\n    text?: string;\n    patternWithSingleQuotes?: string;\n    patternWithNewline?: string;\n    patternWithBacktick?: string;\n    patternWithUnicode?: string;\n};\n\nexport type File = {\n    /**\n     * Id\n     */\n    readonly id?: string;\n    /**\n     * Updated at\n     */\n    readonly updated_at?: string;\n    /**\n     * Created at\n     */\n    readonly created_at?: string;\n    /**\n     * Mime\n     */\n    mime: string;\n    /**\n     * File\n     */\n    readonly file?: string;\n};\n\nexport type Default = {\n    name?: string;\n};\n\nexport type Pageable = {\n    page?: number;\n    size?: number;\n    sort?: Array<string>;\n};\n\n/**\n * This is a free-form object without additionalProperties.\n */\nexport type FreeFormObjectWithoutAdditionalProperties = {\n    [key: string]: unknown;\n};\n\n/**\n * This is a free-form object with additionalProperties: true.\n */\nexport type FreeFormObjectWithAdditionalPropertiesEqTrue = {\n    [key: string]: unknown;\n};\n\n/**\n * This is a free-form object with additionalProperties: {}.\n */\nexport type FreeFormObjectWithAdditionalPropertiesEqEmptyObject = {\n    [key: string]: unknown;\n};\n\nexport type ModelWithConst = {\n    String?: 'String';\n    number?: 0;\n    null?: unknown;\n    withType?: 'Some string';\n};\n\n/**\n * This is a model with one property and additionalProperties: true\n */\nexport type ModelWithAdditionalPropertiesEqTrue = {\n    /**\n     * This is a simple string property\n     */\n    prop?: string;\n    [key: string]: unknown;\n};\n\nexport type NestedAnyOfArraysNullable = {\n    nullableArray?: Array<string | boolean> | null;\n};\n\nexport type CompositionWithOneOfAndProperties = ({\n    foo: SimpleParameter;\n} | {\n    bar: NonAsciiStringæøåÆøÅöôêÊ字符串;\n}) & {\n    baz: number | null;\n    qux: number;\n};\n\n/**\n * An object that can be null\n */\nexport type NullableObject = {\n    foo?: string;\n} | null;\n\n/**\n * Some % character\n */\nexport type CharactersInDescription = string;\n\nexport type ModelWithNullableObject = {\n    data?: NullableObject;\n};\n\n/**\n * An object with additional properties that can be null\n */\nexport type ModelWithAdditionalPropertiesRef = {\n    [key: string]: NullableObject | null;\n};\n\nexport type ModelWithOneOfEnum = {\n    foo: 'Bar';\n} | {\n    foo: 'Baz';\n} | {\n    foo: 'Qux';\n} | {\n    content: string;\n    foo: 'Quux';\n} | {\n    content: [\n        string,\n        string\n    ];\n    foo: 'Corge';\n};\n\nexport type ModelWithNestedArrayEnumsDataFoo = 'foo' | 'bar';\n\nexport type ModelWithNestedArrayEnumsDataBar = 'baz' | 'qux';\n\nexport type ModelWithNestedArrayEnumsData = {\n    foo?: Array<ModelWithNestedArrayEnumsDataFoo>;\n    bar?: Array<ModelWithNestedArrayEnumsDataBar>;\n};\n\nexport type ModelWithNestedArrayEnums = {\n    array_strings?: Array<string>;\n    data?: ModelWithNestedArrayEnumsData;\n};\n\nexport type ModelWithNestedCompositionEnums = {\n    foo?: ModelWithNestedArrayEnumsDataFoo;\n};\n\nexport type ModelWithReadOnlyAndWriteOnly = {\n    foo: string;\n    readonly bar: string;\n};\n\nexport type ModelWithConstantSizeArray = [\n    number,\n    number\n];\n\nexport type ModelWithAnyOfConstantSizeArray = [\n    number | string,\n    number | string,\n    number | string\n];\n\nexport type ModelWithPrefixItemsConstantSizeArray = Array<ModelWithInteger | number | string>;\n\nexport type ModelWithAnyOfConstantSizeArrayNullable = [\n    number | null | string,\n    number | null | string,\n    number | null | string\n];\n\nexport type ModelWithAnyOfConstantSizeArrayWithNSizeAndOptions = [\n    number | Import,\n    number | Import\n];\n\nexport type ModelWithAnyOfConstantSizeArrayAndIntersect = [\n    number & string,\n    number & string\n];\n\nexport type ModelWithNumericEnumUnion = {\n    /**\n     * Период\n     */\n    value?: -10 | -1 | 0 | 1 | 3 | 6 | 12;\n};\n\n/**\n * Some description with `back ticks`\n */\nexport type ModelWithBackticksInDescription = {\n    /**\n     * The template `that` should be used for parsing and importing the contents of the CSV file.\n     *\n     * <br/><p>There is one placeholder currently supported:<ul>     <li><b>${x}</b> - refers to the n-th column in the CSV file, e.g. ${1}, ${2}, ...)</li></ul><p>Example of a correct JSON template:</p>\n     * <pre>\n     * [\n     * {\n     * \"resourceType\": \"Asset\",\n     * \"identifier\": {\n     * \"name\": \"${1}\",\n     * \"domain\": {\n     * \"name\": \"${2}\",\n     * \"community\": {\n     * \"name\": \"Some Community\"\n     * }\n     * }\n     * },\n     * \"attributes\" : {\n     * \"00000000-0000-0000-0000-000000003115\" : [ {\n     * \"value\" : \"${3}\"\n     * } ],\n     * \"00000000-0000-0000-0000-000000000222\" : [ {\n     * \"value\" : \"${4}\"\n     * } ]\n     * }\n     * }\n     * ]\n     * </pre>\n     */\n    template?: string;\n};\n\nexport type ModelWithOneOfAndProperties = (SimpleParameter | NonAsciiStringæøåÆøÅöôêÊ字符串) & {\n    baz: number | null;\n    qux: number;\n};\n\n/**\n * Model used to test deduplication strategy (unused)\n */\nexport type ParameterSimpleParameterUnused = string;\n\n/**\n * Model used to test deduplication strategy\n */\nexport type PostServiceWithEmptyTagResponse = string;\n\n/**\n * Model used to test deduplication strategy\n */\nexport type PostServiceWithEmptyTagResponse2 = string;\n\n/**\n * Model used to test deduplication strategy\n */\nexport type DeleteFooData = string;\n\n/**\n * Model used to test deduplication strategy\n */\nexport type DeleteFooData2 = string;\n\n/**\n * Model with restricted keyword name\n */\nexport type Import = string;\n\nexport type SchemaWithFormRestrictedKeys = {\n    description?: string;\n    'x-enum-descriptions'?: string;\n    'x-enum-varnames'?: string;\n    'x-enumNames'?: string;\n    title?: string;\n    object?: {\n        description?: string;\n        'x-enum-descriptions'?: string;\n        'x-enum-varnames'?: string;\n        'x-enumNames'?: string;\n        title?: string;\n    };\n    array?: Array<{\n        description?: string;\n        'x-enum-descriptions'?: string;\n        'x-enum-varnames'?: string;\n        'x-enumNames'?: string;\n        title?: string;\n    }>;\n};\n\n/**\n * This schema was giving PascalCase transformations a hard time\n */\nexport type IoK8sApimachineryPkgApisMetaV1DeleteOptions = {\n    /**\n     * Must be fulfilled before a deletion is carried out. If not possible, a 409 Conflict status will be returned.\n     */\n    preconditions?: IoK8sApimachineryPkgApisMetaV1Preconditions;\n};\n\n/**\n * This schema was giving PascalCase transformations a hard time\n */\nexport type IoK8sApimachineryPkgApisMetaV1Preconditions = {\n    /**\n     * Specifies the target ResourceVersion\n     */\n    resourceVersion?: string;\n    /**\n     * Specifies the target UID.\n     */\n    uid?: string;\n};\n\nexport type AdditionalPropertiesUnknownIssue = {\n    [key: string]: string | number;\n};\n\nexport type AdditionalPropertiesUnknownIssue2 = {\n    [key: string]: string | number;\n};\n\nexport type AdditionalPropertiesUnknownIssue3 = string & {\n    entries: {\n        [key: string]: AdditionalPropertiesUnknownIssue;\n    };\n};\n\nexport type AdditionalPropertiesIntegerIssue = {\n    value: number;\n    [key: string]: number;\n};\n\nexport type OneOfAllOfIssue = ((ConstValue | GenericSchemaDuplicateIssue1SystemBoolean) & _3eNum1Период) | GenericSchemaDuplicateIssue1SystemString;\n\nexport type GenericSchemaDuplicateIssue1SystemBoolean = {\n    item?: boolean;\n    error?: string | null;\n    readonly hasError?: boolean;\n    data?: {\n        [key: string]: never;\n    };\n};\n\nexport type GenericSchemaDuplicateIssue1SystemString = {\n    item?: string | null;\n    error?: string | null;\n    readonly hasError?: boolean;\n};\n\nexport type ExternalSharedModel = {\n    id: string;\n    name?: string;\n};\n\n/**\n * This is a model with one property containing a reference\n */\nexport type ModelWithReferenceWritable = {\n    prop?: ModelWithPropertiesWritable;\n};\n\n/**\n * This is a model with one property containing an array\n */\nexport type ModelWithArrayReadOnlyAndWriteOnlyWritable = {\n    prop?: Array<ModelWithReadOnlyAndWriteOnlyWritable>;\n    propWithFile?: Array<Blob | File>;\n    propWithNumber?: Array<number>;\n};\n\n/**\n * This is a model with one nested property\n */\nexport type ModelWithPropertiesWritable = {\n    required: string;\n    requiredAndNullable: string | null;\n    string?: string;\n    number?: number;\n    boolean?: boolean;\n    reference?: ModelWithString;\n    'property with space'?: string;\n    default?: string;\n    try?: string;\n};\n\n/**\n * This is a model that contains a some patterns\n */\nexport type ModelWithPatternWritable = {\n    key: string;\n    name: string;\n    id?: string;\n    text?: string;\n    patternWithSingleQuotes?: string;\n    patternWithNewline?: string;\n    patternWithBacktick?: string;\n    patternWithUnicode?: string;\n};\n\nexport type FileWritable = {\n    /**\n     * Mime\n     */\n    mime: string;\n};\n\nexport type ModelWithReadOnlyAndWriteOnlyWritable = {\n    foo: string;\n    baz: string;\n};\n\nexport type ModelWithAnyOfConstantSizeArrayWithNSizeAndOptionsWritable = [\n    number | Import,\n    number | Import\n];\n\nexport type AdditionalPropertiesUnknownIssueWritable = {\n    [key: string]: string | number;\n};\n\nexport type OneOfAllOfIssueWritable = ((ConstValue | GenericSchemaDuplicateIssue1SystemBoolean) & _3eNum1Период) | GenericSchemaDuplicateIssue1SystemString;\n\nexport type GenericSchemaDuplicateIssue1SystemBooleanWritable = {\n    item?: boolean;\n    error?: string | null;\n    data?: {\n        [key: string]: never;\n    };\n};\n\nexport type GenericSchemaDuplicateIssue1SystemStringWritable = {\n    item?: string | null;\n    error?: string | null;\n};\n\n/**\n * This is a reusable parameter\n */\nexport type SimpleParameter = string;\n\n/**\n * Parameter with illegal characters\n */\nexport type XFooBar = ModelWithString;\n\nexport type SimpleRequestBody = ModelWithString;\n\nexport type SimpleFormData = ModelWithString;\n\nexport type ExportData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no+tag';\n};\n\nexport type PatchApiVbyApiVersionNoTagData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no+tag';\n};\n\nexport type PatchApiVbyApiVersionNoTagResponses = {\n    /**\n     * OK\n     */\n    default: unknown;\n};\n\nexport type ImportData = {\n    body: ModelWithReadOnlyAndWriteOnlyWritable | ModelWithArrayReadOnlyAndWriteOnlyWritable;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no+tag';\n};\n\nexport type ImportResponses = {\n    /**\n     * Success\n     */\n    200: ModelFromZendesk;\n    /**\n     * Default success response\n     */\n    default: ModelWithReadOnlyAndWriteOnly;\n};\n\nexport type ImportResponse = ImportResponses[keyof ImportResponses];\n\nexport type FooWowData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no+tag';\n};\n\nexport type FooWowResponses = {\n    /**\n     * OK\n     */\n    default: unknown;\n};\n\nexport type ApiVVersionODataControllerCountData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple/$count';\n};\n\nexport type ApiVVersionODataControllerCountResponses = {\n    /**\n     * Success\n     */\n    200: ModelFromZendesk;\n};\n\nexport type ApiVVersionODataControllerCountResponse = ApiVVersionODataControllerCountResponses[keyof ApiVVersionODataControllerCountResponses];\n\nexport type GetApiVbyApiVersionSimpleOperationData = {\n    body?: never;\n    path: {\n        /**\n         * foo in method\n         */\n        foo_param: string;\n    };\n    query?: never;\n    url: '/api/v{api-version}/simple:operation';\n};\n\nexport type GetApiVbyApiVersionSimpleOperationErrors = {\n    /**\n     * Default error response\n     */\n    default: ModelWithBoolean;\n};\n\nexport type GetApiVbyApiVersionSimpleOperationError = GetApiVbyApiVersionSimpleOperationErrors[keyof GetApiVbyApiVersionSimpleOperationErrors];\n\nexport type GetApiVbyApiVersionSimpleOperationResponses = {\n    /**\n     * Response is a simple number\n     */\n    200: number;\n};\n\nexport type GetApiVbyApiVersionSimpleOperationResponse = GetApiVbyApiVersionSimpleOperationResponses[keyof GetApiVbyApiVersionSimpleOperationResponses];\n\nexport type DeleteCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type GetCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type HeadCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type OptionsCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type PatchCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type PostCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type PutCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type DeleteFooData3 = {\n    body?: never;\n    headers: {\n        /**\n         * Parameter with illegal characters\n         */\n        'x-Foo-Bar': ModelWithString;\n    };\n    path: {\n        /**\n         * foo in method\n         */\n        foo_param: string;\n        /**\n         * bar in method\n         */\n        BarParam: string;\n    };\n    query?: never;\n    url: '/api/v{api-version}/foo/{foo_param}/bar/{BarParam}';\n};\n\nexport type CallWithDescriptionsData = {\n    body?: never;\n    path?: never;\n    query?: {\n        /**\n         * Testing multiline comments in string: First line\n         * Second line\n         *\n         * Fourth line\n         */\n        parameterWithBreaks?: string;\n        /**\n         * Testing backticks in string: `backticks` and ```multiple backticks``` should work\n         */\n        parameterWithBackticks?: string;\n        /**\n         * Testing slashes in string: \\backwards\\\\\\ and /forwards/// should work\n         */\n        parameterWithSlashes?: string;\n        /**\n         * Testing expression placeholders in string: ${expression} should work\n         */\n        parameterWithExpressionPlaceholders?: string;\n        /**\n         * Testing quotes in string: 'single quote''' and \"double quotes\"\"\" should work\n         */\n        parameterWithQuotes?: string;\n        /**\n         * Testing reserved characters in string: * inline * and ** inline ** should work\n         */\n        parameterWithReservedCharacters?: string;\n    };\n    url: '/api/v{api-version}/descriptions';\n};\n\nexport type DeprecatedCallData = {\n    body?: never;\n    headers: {\n        /**\n         * This parameter is deprecated\n         *\n         * @deprecated\n         */\n        parameter: DeprecatedModel | null;\n    };\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/parameters/deprecated';\n};\n\nexport type CallWithParametersData = {\n    /**\n     * This is the parameter that goes into the body\n     */\n    body: {\n        [key: string]: unknown;\n    } | null;\n    headers: {\n        /**\n         * This is the parameter that goes into the header\n         */\n        parameterHeader: string | null;\n    };\n    path: {\n        /**\n         * This is the parameter that goes into the path\n         */\n        parameterPath: string | null;\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string | null;\n    };\n    query: {\n        foo_ref_enum?: ModelWithNestedArrayEnumsDataFoo;\n        foo_all_of_enum: ModelWithNestedArrayEnumsDataFoo;\n        /**\n         * This is the parameter that goes into the query params\n         */\n        cursor: string | null;\n    };\n    url: '/api/v{api-version}/parameters/{parameterPath}';\n};\n\nexport type CallWithWeirdParameterNamesData = {\n    /**\n     * This is the parameter that goes into the body\n     */\n    body: ModelWithString | null;\n    headers: {\n        /**\n         * This is the parameter that goes into the request header\n         */\n        'parameter.header': string | null;\n    };\n    path: {\n        /**\n         * This is the parameter that goes into the path\n         */\n        'parameter.path.1'?: string;\n        /**\n         * This is the parameter that goes into the path\n         */\n        'parameter-path-2'?: string;\n        /**\n         * This is the parameter that goes into the path\n         */\n        'PARAMETER-PATH-3'?: string;\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string | null;\n    };\n    query: {\n        /**\n         * This is the parameter with a reserved keyword\n         */\n        default?: string;\n        /**\n         * This is the parameter that goes into the request query params\n         */\n        'parameter-query': string | null;\n    };\n    url: '/api/v{api-version}/parameters/{parameter.path.1}/{parameter-path-2}/{PARAMETER-PATH-3}';\n};\n\nexport type GetCallWithOptionalParamData = {\n    /**\n     * This is a required parameter\n     */\n    body: ModelWithOneOfEnum;\n    path?: never;\n    query?: {\n        /**\n         * This is an optional parameter\n         */\n        page?: number;\n    };\n    url: '/api/v{api-version}/parameters';\n};\n\nexport type PostCallWithOptionalParamData = {\n    /**\n     * This is an optional parameter\n     */\n    body?: {\n        offset?: number | null;\n    };\n    path?: never;\n    query: {\n        /**\n         * This is a required parameter\n         */\n        parameter: Pageable;\n    };\n    url: '/api/v{api-version}/parameters';\n};\n\nexport type PostCallWithOptionalParamResponses = {\n    /**\n     * Response is a simple number\n     */\n    200: number;\n    /**\n     * Success\n     */\n    204: void;\n};\n\nexport type PostCallWithOptionalParamResponse = PostCallWithOptionalParamResponses[keyof PostCallWithOptionalParamResponses];\n\nexport type PostApiVbyApiVersionRequestBodyData = {\n    /**\n     * A reusable request body\n     */\n    body?: SimpleRequestBody;\n    path?: never;\n    query?: {\n        /**\n         * This is a reusable parameter\n         */\n        parameter?: string;\n    };\n    url: '/api/v{api-version}/requestBody';\n};\n\nexport type PostApiVbyApiVersionFormDataData = {\n    /**\n     * A reusable request body\n     */\n    body?: SimpleFormData;\n    path?: never;\n    query?: {\n        /**\n         * This is a reusable parameter\n         */\n        parameter?: string;\n    };\n    url: '/api/v{api-version}/formData';\n};\n\nexport type CallWithDefaultParametersData = {\n    body?: never;\n    path?: never;\n    query?: {\n        /**\n         * This is a simple string with default value\n         */\n        parameterString?: string | null;\n        /**\n         * This is a simple number with default value\n         */\n        parameterNumber?: number | null;\n        /**\n         * This is a simple boolean with default value\n         */\n        parameterBoolean?: boolean | null;\n        /**\n         * This is a simple enum with default value\n         */\n        parameterEnum?: 'Success' | 'Warning' | 'Error';\n        /**\n         * This is a simple model with default value\n         */\n        parameterModel?: ModelWithString | null;\n    };\n    url: '/api/v{api-version}/defaults';\n};\n\nexport type CallWithDefaultOptionalParametersData = {\n    body?: never;\n    path?: never;\n    query?: {\n        /**\n         * This is a simple string that is optional with default value\n         */\n        parameterString?: string;\n        /**\n         * This is a simple number that is optional with default value\n         */\n        parameterNumber?: number;\n        /**\n         * This is a simple boolean that is optional with default value\n         */\n        parameterBoolean?: boolean;\n        /**\n         * This is a simple enum that is optional with default value\n         */\n        parameterEnum?: 'Success' | 'Warning' | 'Error';\n        /**\n         * This is a simple model that is optional with default value\n         */\n        parameterModel?: ModelWithString;\n    };\n    url: '/api/v{api-version}/defaults';\n};\n\nexport type CallToTestOrderOfParamsData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * This is a optional string with default\n         */\n        parameterOptionalStringWithDefault?: string;\n        /**\n         * This is a optional string with empty default\n         */\n        parameterOptionalStringWithEmptyDefault?: string;\n        /**\n         * This is a optional string with no default\n         */\n        parameterOptionalStringWithNoDefault?: string;\n        /**\n         * This is a string with default\n         */\n        parameterStringWithDefault: string;\n        /**\n         * This is a string with empty default\n         */\n        parameterStringWithEmptyDefault: string;\n        /**\n         * This is a string with no default\n         */\n        parameterStringWithNoDefault: string;\n        /**\n         * This is a string that can be null with no default\n         */\n        parameterStringNullableWithNoDefault?: string | null;\n        /**\n         * This is a string that can be null with default\n         */\n        parameterStringNullableWithDefault?: string | null;\n    };\n    url: '/api/v{api-version}/defaults';\n};\n\nexport type DuplicateNameData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/duplicate';\n};\n\nexport type DuplicateName2Data = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/duplicate';\n};\n\nexport type DuplicateName3Data = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/duplicate';\n};\n\nexport type DuplicateName4Data = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/duplicate';\n};\n\nexport type CallWithNoContentResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no-content';\n};\n\nexport type CallWithNoContentResponseResponses = {\n    /**\n     * Success\n     */\n    204: void;\n};\n\nexport type CallWithNoContentResponseResponse = CallWithNoContentResponseResponses[keyof CallWithNoContentResponseResponses];\n\nexport type CallWithResponseAndNoContentResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multiple-tags/response-and-no-content';\n};\n\nexport type CallWithResponseAndNoContentResponseResponses = {\n    /**\n     * Response is a simple number\n     */\n    200: number;\n    /**\n     * Success\n     */\n    204: void;\n};\n\nexport type CallWithResponseAndNoContentResponseResponse = CallWithResponseAndNoContentResponseResponses[keyof CallWithResponseAndNoContentResponseResponses];\n\nexport type DummyAData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multiple-tags/a';\n};\n\nexport type DummyAResponses = {\n    200: _400;\n};\n\nexport type DummyAResponse = DummyAResponses[keyof DummyAResponses];\n\nexport type DummyBData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multiple-tags/b';\n};\n\nexport type DummyBResponses = {\n    /**\n     * Success\n     */\n    204: void;\n};\n\nexport type DummyBResponse = DummyBResponses[keyof DummyBResponses];\n\nexport type CallWithResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/response';\n};\n\nexport type CallWithResponseResponses = {\n    default: Import;\n};\n\nexport type CallWithResponseResponse = CallWithResponseResponses[keyof CallWithResponseResponses];\n\nexport type CallWithDuplicateResponsesData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/response';\n};\n\nexport type CallWithDuplicateResponsesErrors = {\n    /**\n     * Message for 500 error\n     */\n    500: ModelWithStringError;\n    /**\n     * Message for 501 error\n     */\n    501: ModelWithStringError;\n    /**\n     * Message for 502 error\n     */\n    502: ModelWithStringError;\n    /**\n     * Message for 4XX errors\n     */\n    '4XX': DictionaryWithArray;\n    /**\n     * Default error response\n     */\n    default: ModelWithBoolean;\n};\n\nexport type CallWithDuplicateResponsesError = CallWithDuplicateResponsesErrors[keyof CallWithDuplicateResponsesErrors];\n\nexport type CallWithDuplicateResponsesResponses = {\n    /**\n     * Message for 200 response\n     */\n    200: ModelWithBoolean & ModelWithInteger;\n    /**\n     * Message for 201 response\n     */\n    201: ModelWithString;\n    /**\n     * Message for 202 response\n     */\n    202: ModelWithString;\n};\n\nexport type CallWithDuplicateResponsesResponse = CallWithDuplicateResponsesResponses[keyof CallWithDuplicateResponsesResponses];\n\nexport type CallWithResponsesData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/response';\n};\n\nexport type CallWithResponsesErrors = {\n    /**\n     * Message for 500 error\n     */\n    500: ModelWithStringError;\n    /**\n     * Message for 501 error\n     */\n    501: ModelWithStringError;\n    /**\n     * Message for 502 error\n     */\n    502: ModelWithStringError;\n    /**\n     * Message for default response\n     */\n    default: ModelWithStringError;\n};\n\nexport type CallWithResponsesError = CallWithResponsesErrors[keyof CallWithResponsesErrors];\n\nexport type CallWithResponsesResponses = {\n    /**\n     * Message for 200 response\n     */\n    200: {\n        readonly '@namespace.string'?: string;\n        readonly '@namespace.integer'?: number;\n        readonly value?: Array<ModelWithString>;\n    };\n    /**\n     * Message for 201 response\n     */\n    201: ModelThatExtends;\n    /**\n     * Message for 202 response\n     */\n    202: ModelThatExtendsExtends;\n};\n\nexport type CallWithResponsesResponse = CallWithResponsesResponses[keyof CallWithResponsesResponses];\n\nexport type CollectionFormatData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * This is an array parameter that is sent as csv format (comma-separated values)\n         */\n        parameterArrayCSV: Array<string> | null;\n        /**\n         * This is an array parameter that is sent as ssv format (space-separated values)\n         */\n        parameterArraySSV: Array<string> | null;\n        /**\n         * This is an array parameter that is sent as tsv format (tab-separated values)\n         */\n        parameterArrayTSV: Array<string> | null;\n        /**\n         * This is an array parameter that is sent as pipes format (pipe-separated values)\n         */\n        parameterArrayPipes: Array<string> | null;\n        /**\n         * This is an array parameter that is sent as multi format (multiple parameter instances)\n         */\n        parameterArrayMulti: Array<string> | null;\n    };\n    url: '/api/v{api-version}/collectionFormat';\n};\n\nexport type TypesData = {\n    body?: never;\n    path?: {\n        /**\n         * This is a number parameter\n         */\n        id?: number;\n    };\n    query: {\n        /**\n         * This is a number parameter\n         */\n        parameterNumber: number;\n        /**\n         * This is a string parameter\n         */\n        parameterString: string | null;\n        /**\n         * This is a boolean parameter\n         */\n        parameterBoolean: boolean | null;\n        /**\n         * This is an object parameter\n         */\n        parameterObject: {\n            [key: string]: unknown;\n        } | null;\n        /**\n         * This is an array parameter\n         */\n        parameterArray: Array<string> | null;\n        /**\n         * This is a dictionary parameter\n         */\n        parameterDictionary: {\n            [key: string]: unknown;\n        } | null;\n        /**\n         * This is an enum parameter\n         */\n        parameterEnum: 'Success' | 'Warning' | 'Error';\n    };\n    url: '/api/v{api-version}/types';\n};\n\nexport type TypesResponses = {\n    /**\n     * Response is a simple number\n     */\n    200: number;\n    /**\n     * Response is a simple string\n     */\n    201: string;\n    /**\n     * Response is a simple boolean\n     */\n    202: boolean;\n    /**\n     * Response is a simple object\n     */\n    203: {\n        [key: string]: unknown;\n    };\n};\n\nexport type TypesResponse = TypesResponses[keyof TypesResponses];\n\nexport type UploadFileData = {\n    body: Blob | File;\n    path: {\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string | null;\n    };\n    query?: never;\n    url: '/api/v{api-version}/upload';\n};\n\nexport type UploadFileResponses = {\n    200: boolean;\n};\n\nexport type UploadFileResponse = UploadFileResponses[keyof UploadFileResponses];\n\nexport type FileResponseData = {\n    body?: never;\n    path: {\n        id: string;\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string;\n    };\n    query?: never;\n    url: '/api/v{api-version}/file/{id}';\n};\n\nexport type FileResponseResponses = {\n    /**\n     * Success\n     */\n    200: Blob | File;\n};\n\nexport type FileResponseResponse = FileResponseResponses[keyof FileResponseResponses];\n\nexport type ComplexTypesData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * Parameter containing object\n         */\n        parameterObject: {\n            first?: {\n                second?: {\n                    third?: string;\n                };\n            };\n        };\n        /**\n         * Parameter containing reference\n         */\n        parameterReference: ModelWithString;\n    };\n    url: '/api/v{api-version}/complex';\n};\n\nexport type ComplexTypesErrors = {\n    /**\n     * 400 `server` error\n     */\n    400: unknown;\n    /**\n     * 500 server error\n     */\n    500: unknown;\n};\n\nexport type ComplexTypesResponses = {\n    /**\n     * Successful response\n     */\n    200: Array<ModelWithString>;\n};\n\nexport type ComplexTypesResponse = ComplexTypesResponses[keyof ComplexTypesResponses];\n\nexport type MultipartResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multipart';\n};\n\nexport type MultipartResponseResponses = {\n    /**\n     * OK\n     */\n    200: {\n        file?: Blob | File;\n        metadata?: {\n            foo?: string;\n            bar?: string;\n        };\n    };\n};\n\nexport type MultipartResponseResponse = MultipartResponseResponses[keyof MultipartResponseResponses];\n\nexport type MultipartRequestData = {\n    body?: {\n        content?: Blob | File;\n        data?: ModelWithString | null;\n    };\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multipart';\n};\n\nexport type ComplexParamsData = {\n    body?: {\n        readonly key: string | null;\n        name: string | null;\n        enabled?: boolean;\n        type: 'Monkey' | 'Horse' | 'Bird';\n        listOfModels?: Array<ModelWithString> | null;\n        listOfStrings?: Array<string> | null;\n        parameters: ModelWithString | ModelWithEnum | ModelWithArray | ModelWithDictionary;\n        readonly user?: {\n            readonly id?: number;\n            readonly name?: string | null;\n        };\n    };\n    path: {\n        id: number;\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string;\n    };\n    query?: never;\n    url: '/api/v{api-version}/complex/{id}';\n};\n\nexport type ComplexParamsResponses = {\n    /**\n     * Success\n     */\n    200: ModelWithString;\n};\n\nexport type ComplexParamsResponse = ComplexParamsResponses[keyof ComplexParamsResponses];\n\nexport type CallWithResultFromHeaderData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/header';\n};\n\nexport type CallWithResultFromHeaderErrors = {\n    /**\n     * 400 server error\n     */\n    400: unknown;\n    /**\n     * 500 server error\n     */\n    500: unknown;\n};\n\nexport type CallWithResultFromHeaderResponses = {\n    /**\n     * Successful response\n     */\n    200: unknown;\n};\n\nexport type TestErrorCodeData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * Status code to return\n         */\n        status: number;\n    };\n    url: '/api/v{api-version}/error';\n};\n\nexport type TestErrorCodeErrors = {\n    /**\n     * Custom message: Internal Server Error\n     */\n    500: unknown;\n    /**\n     * Custom message: Not Implemented\n     */\n    501: unknown;\n    /**\n     * Custom message: Bad Gateway\n     */\n    502: unknown;\n    /**\n     * Custom message: Service Unavailable\n     */\n    503: unknown;\n};\n\nexport type TestErrorCodeResponses = {\n    /**\n     * Custom message: Successful response\n     */\n    200: unknown;\n};\n\nexport type NonAsciiæøåÆøÅöôêÊ字符串Data = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * Dummy input param\n         */\n        nonAsciiParamæøåÆØÅöôêÊ: number;\n    };\n    url: '/api/v{api-version}/non-ascii-æøåÆØÅöôêÊ字符串';\n};\n\nexport type NonAsciiæøåÆøÅöôêÊ字符串Responses = {\n    /**\n     * Successful response\n     */\n    200: Array<NonAsciiStringæøåÆøÅöôêÊ字符串>;\n};\n\nexport type NonAsciiæøåÆøÅöôêÊ字符串Response = NonAsciiæøåÆøÅöôêÊ字符串Responses[keyof NonAsciiæøåÆøÅöôêÊ字符串Responses];\n\nexport type PutWithFormUrlEncodedData = {\n    body: ArrayWithStrings;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/non-ascii-æøåÆØÅöôêÊ字符串';\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/angular-query-experimental/name-builder/@tanstack/angular-query-experimental.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport { type DefaultError, type MutationOptions, queryOptions } from '@tanstack/angular-query-experimental';\n\nimport { client } from '../client.gen';\nimport { fooBarPost, fooBarPut, fooPost, fooPut, getFoo, getFooBar, type Options } from '../sdk.gen';\nimport type { FooBarPostData, FooBarPostResponse, FooBarPutData, FooBarPutResponse, FooPostData, FooPostResponse, FooPutData, FooPutResponse, GetFooBarData, GetFooBarResponse, GetFooData, GetFooResponse } from '../types.gen';\n\nexport type QueryKey<TOptions extends Options> = [\n    Pick<TOptions, 'baseUrl' | 'body' | 'headers' | 'path' | 'query'> & {\n        _id: string;\n        _infinite?: boolean;\n        tags?: ReadonlyArray<string>;\n    }\n];\n\nconst createQueryKey = <TOptions extends Options>(id: string, options?: TOptions, infinite?: boolean, tags?: ReadonlyArray<string>): [\n    QueryKey<TOptions>[0]\n] => {\n    const params: QueryKey<TOptions>[0] = { _id: id, baseUrl: options?.baseUrl || (options?.client ?? client).getConfig().baseUrl } as QueryKey<TOptions>[0];\n    if (infinite) {\n        params._infinite = infinite;\n    }\n    if (tags) {\n        params.tags = tags;\n    }\n    if (options?.body) {\n        params.body = options.body;\n    }\n    if (options?.headers) {\n        params.headers = options.headers;\n    }\n    if (options?.path) {\n        params.path = options.path;\n    }\n    if (options?.query) {\n        params.query = options.query;\n    }\n    return [params];\n};\n\nexport const getFooD = (options?: Options<GetFooData>) => createQueryKey('getFoo', options);\n\nexport const getFooE = (options?: Options<GetFooData>) => queryOptions<GetFooResponse, DefaultError, GetFooResponse, ReturnType<typeof getFooD>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await getFoo({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: getFooD(options)\n});\n\nexport const fooPostC = (options?: Partial<Options<FooPostData>>): MutationOptions<FooPostResponse, DefaultError, Options<FooPostData>> => {\n    const mutationOptions: MutationOptions<FooPostResponse, DefaultError, Options<FooPostData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await fooPost({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const fooPutC = (options?: Partial<Options<FooPutData>>): MutationOptions<FooPutResponse, DefaultError, Options<FooPutData>> => {\n    const mutationOptions: MutationOptions<FooPutResponse, DefaultError, Options<FooPutData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await fooPut({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const getFooBarD = (options?: Options<GetFooBarData>) => createQueryKey('getFooBar', options);\n\nexport const getFooBarE = (options?: Options<GetFooBarData>) => queryOptions<GetFooBarResponse, DefaultError, GetFooBarResponse, ReturnType<typeof getFooBarD>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await getFooBar({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: getFooBarD(options)\n});\n\nexport const fooBarPostC = (options?: Partial<Options<FooBarPostData>>): MutationOptions<FooBarPostResponse, DefaultError, Options<FooBarPostData>> => {\n    const mutationOptions: MutationOptions<FooBarPostResponse, DefaultError, Options<FooBarPostData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await fooBarPost({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const fooBarPutC = (options?: Partial<Options<FooBarPutData>>): MutationOptions<FooBarPutResponse, DefaultError, Options<FooBarPutData>> => {\n    const mutationOptions: MutationOptions<FooBarPutResponse, DefaultError, Options<FooBarPutData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await fooBarPut({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/angular-query-experimental/name-builder/client/client.gen.ts",
    "content": "// 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 (options: RequestOptions) => {\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 url = buildUrl(opts);\n\n    return { opts, url };\n  };\n\n  const request: Client['request'] = async (options) => {\n    // @ts-expect-error\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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/angular-query-experimental/name-builder/client/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type { Auth } from '../core/auth.gen';\nexport type { QuerySerializerOptions } from '../core/bodySerializer.gen';\nexport {\n  formDataBodySerializer,\n  jsonBodySerializer,\n  urlSearchParamsBodySerializer,\n} from '../core/bodySerializer.gen';\nexport { buildClientParams } from '../core/params.gen';\nexport { serializeQueryKeyValue } from '../core/queryKeySerializer.gen';\nexport { createClient } from './client.gen';\nexport type {\n  Client,\n  ClientOptions,\n  Config,\n  CreateClientConfig,\n  Options,\n  RequestOptions,\n  RequestResult,\n  ResolvedRequestOptions,\n  ResponseStyle,\n  TDataShape,\n} from './types.gen';\nexport { createConfig, mergeHeaders } from './utils.gen';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/angular-query-experimental/name-builder/client/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { Auth } from '../core/auth.gen';\nimport type {\n  ServerSentEventsOptions,\n  ServerSentEventsResult,\n} from '../core/serverSentEvents.gen';\nimport type { Client as CoreClient, Config as CoreConfig } from '../core/types.gen';\nimport type { Middleware } from './utils.gen';\n\nexport type ResponseStyle = 'data' | 'fields';\n\nexport interface Config<T extends ClientOptions = ClientOptions>\n  extends Omit<RequestInit, 'body' | 'headers' | 'method'>, CoreConfig {\n  /**\n   * Base URL for all requests made by this client.\n   */\n  baseUrl?: T['baseUrl'];\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   * Please don't use the Fetch client for Next.js applications. The `next`\n   * options won't have any effect.\n   *\n   * Install {@link https://www.npmjs.com/package/@hey-api/client-next `@hey-api/client-next`} instead.\n   */\n  next?: never;\n  /**\n   * Return the response data parsed in a specified format. By default, `auto`\n   * will infer the appropriate method from the `Content-Type` response header.\n   * You can override this behavior with any of the {@link Body} methods.\n   * Select `stream` if you don't want to parse response data at all.\n   *\n   * @default 'auto'\n   */\n  parseAs?: 'arrayBuffer' | 'auto' | 'blob' | 'formData' | 'json' | 'stream' | 'text';\n  /**\n   * Should we return only data or multiple fields (data, error, response, etc.)?\n   *\n   * @default 'fields'\n   */\n  responseStyle?: ResponseStyle;\n  /**\n   * Throw an error instead of returning it in the response?\n   *\n   * @default false\n   */\n  throwOnError?: T['throwOnError'];\n}\n\nexport interface RequestOptions<\n  TData = unknown,\n  TResponseStyle extends ResponseStyle = 'fields',\n  ThrowOnError extends boolean = boolean,\n  Url extends string = string,\n>\n  extends\n    Config<{\n      responseStyle: TResponseStyle;\n      throwOnError: ThrowOnError;\n    }>,\n    Pick<\n      ServerSentEventsOptions<TData>,\n      | 'onRequest'\n      | 'onSseError'\n      | 'onSseEvent'\n      | 'sseDefaultRetryDelay'\n      | 'sseMaxRetryAttempts'\n      | 'sseMaxRetryDelay'\n    > {\n  /**\n   * Any body that you want to add to your request.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/fetch#body}\n   */\n  body?: unknown;\n  path?: Record<string, unknown>;\n  query?: Record<string, unknown>;\n  /**\n   * Security mechanism(s) to use for the request.\n   */\n  security?: ReadonlyArray<Auth>;\n  url: Url;\n}\n\nexport interface ResolvedRequestOptions<\n  TResponseStyle extends ResponseStyle = 'fields',\n  ThrowOnError extends boolean = boolean,\n  Url extends string = string,\n> extends RequestOptions<unknown, TResponseStyle, ThrowOnError, Url> {\n  serializedBody?: string;\n}\n\nexport type RequestResult<\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = boolean,\n  TResponseStyle extends ResponseStyle = 'fields',\n> = ThrowOnError extends true\n  ? Promise<\n      TResponseStyle extends 'data'\n        ? TData extends Record<string, unknown>\n          ? TData[keyof TData]\n          : TData\n        : {\n            data: TData extends Record<string, unknown> ? TData[keyof TData] : TData;\n            request: Request;\n            response: Response;\n          }\n    >\n  : Promise<\n      TResponseStyle extends 'data'\n        ? (TData extends Record<string, unknown> ? TData[keyof TData] : TData) | undefined\n        : (\n            | {\n                data: TData extends Record<string, unknown> ? TData[keyof TData] : TData;\n                error: undefined;\n              }\n            | {\n                data: undefined;\n                error: TError extends Record<string, unknown> ? TError[keyof TError] : TError;\n              }\n          ) & {\n            request: Request;\n            response: Response;\n          }\n    >;\n\nexport interface ClientOptions {\n  baseUrl?: string;\n  responseStyle?: ResponseStyle;\n  throwOnError?: boolean;\n}\n\ntype MethodFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'>,\n) => RequestResult<TData, TError, ThrowOnError, TResponseStyle>;\n\ntype SseFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'>,\n) => Promise<ServerSentEventsResult<TData, TError>>;\n\ntype RequestFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'> &\n    Pick<Required<RequestOptions<TData, TResponseStyle, ThrowOnError>>, 'method'>,\n) => RequestResult<TData, TError, ThrowOnError, TResponseStyle>;\n\ntype BuildUrlFn = <\n  TData extends {\n    body?: unknown;\n    path?: Record<string, unknown>;\n    query?: Record<string, unknown>;\n    url: string;\n  },\n>(\n  options: TData & Options<TData>,\n) => string;\n\nexport type Client = CoreClient<RequestFn, Config, MethodFn, BuildUrlFn, SseFn> & {\n  interceptors: Middleware<Request, Response, unknown, ResolvedRequestOptions>;\n};\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 = ClientOptions> = (\n  override?: Config<ClientOptions & T>,\n) => Config<Required<ClientOptions> & T>;\n\nexport interface TDataShape {\n  body?: unknown;\n  headers?: unknown;\n  path?: unknown;\n  query?: unknown;\n  url: string;\n}\n\ntype OmitKeys<T, K> = Pick<T, Exclude<keyof T, K>>;\n\nexport type Options<\n  TData extends TDataShape = TDataShape,\n  ThrowOnError extends boolean = boolean,\n  TResponse = unknown,\n  TResponseStyle extends ResponseStyle = 'fields',\n> = OmitKeys<\n  RequestOptions<TResponse, TResponseStyle, ThrowOnError>,\n  'body' | 'path' | 'query' | 'url'\n> &\n  ([TData] extends [never] ? unknown : Omit<TData, 'url'>);\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/angular-query-experimental/name-builder/client/utils.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/angular-query-experimental/name-builder/client.gen.ts",
    "content": "// 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>());\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/angular-query-experimental/name-builder/core/auth.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/angular-query-experimental/name-builder/core/bodySerializer.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/angular-query-experimental/name-builder/core/params.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/angular-query-experimental/name-builder/core/pathSerializer.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/angular-query-experimental/name-builder/core/queryKeySerializer.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\n/**\n * JSON-friendly union that mirrors what Pinia Colada can hash.\n */\nexport type JsonValue =\n  | null\n  | string\n  | number\n  | boolean\n  | JsonValue[]\n  | { [key: string]: JsonValue };\n\n/**\n * Replacer that converts non-JSON values (bigint, Date, etc.) to safe substitutes.\n */\nexport const queryKeyJsonReplacer = (_key: string, value: unknown) => {\n  if (value === undefined || typeof value === 'function' || typeof value === 'symbol') {\n    return undefined;\n  }\n  if (typeof value === 'bigint') {\n    return value.toString();\n  }\n  if (value instanceof Date) {\n    return value.toISOString();\n  }\n  return value;\n};\n\n/**\n * Safely stringifies a value and parses it back into a JsonValue.\n */\nexport const stringifyToJsonValue = (input: unknown): JsonValue | undefined => {\n  try {\n    const json = JSON.stringify(input, queryKeyJsonReplacer);\n    if (json === undefined) {\n      return undefined;\n    }\n    return JSON.parse(json) as JsonValue;\n  } catch {\n    return undefined;\n  }\n};\n\n/**\n * Detects plain objects (including objects with a null prototype).\n */\nconst isPlainObject = (value: unknown): value is Record<string, unknown> => {\n  if (value === null || typeof value !== 'object') {\n    return false;\n  }\n  const prototype = Object.getPrototypeOf(value as object);\n  return prototype === Object.prototype || prototype === null;\n};\n\n/**\n * Turns URLSearchParams into a sorted JSON object for deterministic keys.\n */\nconst serializeSearchParams = (params: URLSearchParams): JsonValue => {\n  const entries = Array.from(params.entries()).sort(([a], [b]) => a.localeCompare(b));\n  const result: Record<string, JsonValue> = {};\n\n  for (const [key, value] of entries) {\n    const existing = result[key];\n    if (existing === undefined) {\n      result[key] = value;\n      continue;\n    }\n\n    if (Array.isArray(existing)) {\n      (existing as string[]).push(value);\n    } else {\n      result[key] = [existing, value];\n    }\n  }\n\n  return result;\n};\n\n/**\n * Normalizes any accepted value into a JSON-friendly shape for query keys.\n */\nexport const serializeQueryKeyValue = (value: unknown): JsonValue | undefined => {\n  if (value === null) {\n    return null;\n  }\n\n  if (typeof value === 'string' || typeof value === 'number' || typeof value === 'boolean') {\n    return value;\n  }\n\n  if (value === undefined || typeof value === 'function' || typeof value === 'symbol') {\n    return undefined;\n  }\n\n  if (typeof value === 'bigint') {\n    return value.toString();\n  }\n\n  if (value instanceof Date) {\n    return value.toISOString();\n  }\n\n  if (Array.isArray(value)) {\n    return stringifyToJsonValue(value);\n  }\n\n  if (typeof URLSearchParams !== 'undefined' && value instanceof URLSearchParams) {\n    return serializeSearchParams(value);\n  }\n\n  if (isPlainObject(value)) {\n    return stringifyToJsonValue(value);\n  }\n\n  return undefined;\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/angular-query-experimental/name-builder/core/serverSentEvents.gen.ts",
    "content": "// 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 const 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            // Normalize line endings: CRLF -> LF, then CR -> LF\n            buffer = buffer.replace(/\\r\\n/g, '\\n').replace(/\\r/g, '\\n');\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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/angular-query-experimental/name-builder/core/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { Auth, AuthToken } from './auth.gen';\nimport type { BodySerializer, QuerySerializer, QuerySerializerOptions } from './bodySerializer.gen';\n\nexport type HttpMethod =\n  | 'connect'\n  | 'delete'\n  | 'get'\n  | 'head'\n  | 'options'\n  | 'patch'\n  | 'post'\n  | 'put'\n  | 'trace';\n\nexport type Client<\n  RequestFn = never,\n  Config = unknown,\n  MethodFn = never,\n  BuildUrlFn = never,\n  SseFn = never,\n> = {\n  /**\n   * Returns the final request URL.\n   */\n  buildUrl: BuildUrlFn;\n  getConfig: () => Config;\n  request: RequestFn;\n  setConfig: (config: Config) => Config;\n} & {\n  [K in HttpMethod]: MethodFn;\n} & ([SseFn] extends [never] ? { sse?: never } : { sse: { [K in HttpMethod]: SseFn } });\n\nexport interface Config {\n  /**\n   * Auth token or a function returning auth token. The resolved value will be\n   * added to the request payload as defined by its `security` array.\n   */\n  auth?: ((auth: Auth) => Promise<AuthToken> | AuthToken) | AuthToken;\n  /**\n   * A function for serializing request body parameter. By default,\n   * {@link JSON.stringify()} will be used.\n   */\n  bodySerializer?: BodySerializer | null;\n  /**\n   * An object containing any HTTP headers that you want to pre-populate your\n   * `Headers` object with.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/Headers/Headers#init See more}\n   */\n  headers?:\n    | RequestInit['headers']\n    | Record<\n        string,\n        string | number | boolean | (string | number | boolean)[] | null | undefined | unknown\n      >;\n  /**\n   * The request method.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/fetch#method See more}\n   */\n  method?: Uppercase<HttpMethod>;\n  /**\n   * A function for serializing request query parameters. By default, arrays\n   * will be exploded in form style, objects will be exploded in deepObject\n   * style, and reserved characters are percent-encoded.\n   *\n   * This method will have no effect if the native `paramsSerializer()` Axios\n   * API function is used.\n   *\n   * {@link https://swagger.io/docs/specification/serialization/#query View examples}\n   */\n  querySerializer?: QuerySerializer | QuerySerializerOptions;\n  /**\n   * A function validating request data. This is useful if you want to ensure\n   * the request conforms to the desired shape, so it can be safely sent to\n   * the server.\n   */\n  requestValidator?: (data: unknown) => Promise<unknown>;\n  /**\n   * A function transforming response data before it's returned. This is useful\n   * for post-processing data, e.g. converting ISO strings into Date objects.\n   */\n  responseTransformer?: (data: unknown) => Promise<unknown>;\n  /**\n   * A function validating response data. This is useful if you want to ensure\n   * the response conforms to the desired shape, so it can be safely passed to\n   * the transformers and returned to the user.\n   */\n  responseValidator?: (data: unknown) => Promise<unknown>;\n}\n\ntype IsExactlyNeverOrNeverUndefined<T> = [T] extends [never]\n  ? true\n  : [T] extends [never | undefined]\n    ? [undefined] extends [T]\n      ? false\n      : true\n    : false;\n\nexport type OmitNever<T extends Record<string, unknown>> = {\n  [K in keyof T as IsExactlyNeverOrNeverUndefined<T[K]> extends true ? never : K]: T[K];\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/angular-query-experimental/name-builder/core/utils.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/angular-query-experimental/name-builder/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport { fooBarPost, fooBarPut, fooPost, fooPut, getFoo, getFooBar, type Options } from './sdk.gen';\nexport type { ClientOptions, FooBarPostData, FooBarPostResponse, FooBarPostResponses, FooBarPutData, FooBarPutResponse, FooBarPutResponses, FooPostData, FooPostResponse, FooPostResponses, FooPutData, FooPutResponse, FooPutResponses, GetFooBarData, GetFooBarResponse, GetFooBarResponses, GetFooData, GetFooResponse, GetFooResponses } from './types.gen';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/angular-query-experimental/name-builder/sdk.gen.ts",
    "content": "// 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 { FooBarPostData, FooBarPostResponses, FooBarPutData, FooBarPutResponses, FooPostData, FooPostResponses, FooPutData, FooPutResponses, GetFooBarData, GetFooBarResponses, GetFooData, GetFooResponses } from './types.gen';\n\nexport type Options<TData extends TDataShape = TDataShape, ThrowOnError extends boolean = boolean> = Options2<TData, ThrowOnError> & {\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\nexport const getFoo = <ThrowOnError extends boolean = false>(options?: Options<GetFooData, ThrowOnError>) => (options?.client ?? client).get<GetFooResponses, unknown, ThrowOnError>({ url: '/foo', ...options });\n\nexport const fooPost = <ThrowOnError extends boolean = false>(options?: Options<FooPostData, ThrowOnError>) => (options?.client ?? client).post<FooPostResponses, unknown, ThrowOnError>({ url: '/foo', ...options });\n\nexport const fooPut = <ThrowOnError extends boolean = false>(options?: Options<FooPutData, ThrowOnError>) => (options?.client ?? client).put<FooPutResponses, unknown, ThrowOnError>({ url: '/foo', ...options });\n\nexport const getFooBar = <ThrowOnError extends boolean = false>(options?: Options<GetFooBarData, ThrowOnError>) => (options?.client ?? client).get<GetFooBarResponses, unknown, ThrowOnError>({ url: '/foo/bar', ...options });\n\nexport const fooBarPost = <ThrowOnError extends boolean = false>(options?: Options<FooBarPostData, ThrowOnError>) => (options?.client ?? client).post<FooBarPostResponses, unknown, ThrowOnError>({ url: '/foo/bar', ...options });\n\nexport const fooBarPut = <ThrowOnError extends boolean = false>(options?: Options<FooBarPutData, ThrowOnError>) => (options?.client ?? client).put<FooBarPutResponses, unknown, ThrowOnError>({ url: '/foo/bar', ...options });\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/angular-query-experimental/name-builder/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type ClientOptions = {\n    baseUrl: `${string}://${string}` | (string & {});\n};\n\nexport type GetFooData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/foo';\n};\n\nexport type GetFooResponses = {\n    /**\n     * OK\n     */\n    200: string;\n};\n\nexport type GetFooResponse = GetFooResponses[keyof GetFooResponses];\n\nexport type FooPostData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/foo';\n};\n\nexport type FooPostResponses = {\n    /**\n     * OK\n     */\n    200: string;\n};\n\nexport type FooPostResponse = FooPostResponses[keyof FooPostResponses];\n\nexport type FooPutData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/foo';\n};\n\nexport type FooPutResponses = {\n    /**\n     * OK\n     */\n    200: string;\n};\n\nexport type FooPutResponse = FooPutResponses[keyof FooPutResponses];\n\nexport type GetFooBarData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/foo/bar';\n};\n\nexport type GetFooBarResponses = {\n    /**\n     * OK\n     */\n    200: string;\n};\n\nexport type GetFooBarResponse = GetFooBarResponses[keyof GetFooBarResponses];\n\nexport type FooBarPostData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/foo/bar';\n};\n\nexport type FooBarPostResponses = {\n    /**\n     * OK\n     */\n    200: string;\n};\n\nexport type FooBarPostResponse = FooBarPostResponses[keyof FooBarPostResponses];\n\nexport type FooBarPutData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/foo/bar';\n};\n\nexport type FooBarPutResponses = {\n    /**\n     * OK\n     */\n    200: string;\n};\n\nexport type FooBarPutResponse = FooBarPutResponses[keyof FooBarPutResponses];\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/preact-query/asClass/@tanstack/preact-query.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport { type DefaultError, queryOptions, type UseMutationOptions } from '@tanstack/preact-query';\n\nimport { client } from '../client.gen';\nimport { BarBazService, BarService, FooBazService, FooService, type Options } from '../sdk.gen';\nimport type { FooBarPostData, FooBarPostResponse, FooBarPutData, FooBarPutResponse, FooPostData, FooPostResponse, FooPutData, FooPutResponse, GetFooBarData, GetFooBarResponse, GetFooData, GetFooResponse } from '../types.gen';\n\nexport type QueryKey<TOptions extends Options> = [\n    Pick<TOptions, 'baseUrl' | 'body' | 'headers' | 'path' | 'query'> & {\n        _id: string;\n        _infinite?: boolean;\n        tags?: ReadonlyArray<string>;\n    }\n];\n\nconst createQueryKey = <TOptions extends Options>(id: string, options?: TOptions, infinite?: boolean, tags?: ReadonlyArray<string>): [\n    QueryKey<TOptions>[0]\n] => {\n    const params: QueryKey<TOptions>[0] = { _id: id, baseUrl: options?.baseUrl || (options?.client ?? client).getConfig().baseUrl } as QueryKey<TOptions>[0];\n    if (infinite) {\n        params._infinite = infinite;\n    }\n    if (tags) {\n        params.tags = tags;\n    }\n    if (options?.body) {\n        params.body = options.body;\n    }\n    if (options?.headers) {\n        params.headers = options.headers;\n    }\n    if (options?.path) {\n        params.path = options.path;\n    }\n    if (options?.query) {\n        params.query = options.query;\n    }\n    return [params];\n};\n\nexport const getFooQueryKey = (options?: Options<GetFooData>) => createQueryKey('getFoo', options);\n\nexport const getFooOptions = (options?: Options<GetFooData>) => queryOptions<GetFooResponse, DefaultError, GetFooResponse, ReturnType<typeof getFooQueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await FooBazService.getFoo({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: getFooQueryKey(options)\n});\n\nexport const fooPostMutation = (options?: Partial<Options<FooPostData>>): UseMutationOptions<FooPostResponse, DefaultError, Options<FooPostData>> => {\n    const mutationOptions: UseMutationOptions<FooPostResponse, DefaultError, Options<FooPostData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await FooService.post({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const fooPutMutation = (options?: Partial<Options<FooPutData>>): UseMutationOptions<FooPutResponse, DefaultError, Options<FooPutData>> => {\n    const mutationOptions: UseMutationOptions<FooPutResponse, DefaultError, Options<FooPutData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await FooService.put({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const getFooBarQueryKey = (options?: Options<GetFooBarData>) => createQueryKey('getFooBar', options);\n\nexport const getFooBarOptions = (options?: Options<GetFooBarData>) => queryOptions<GetFooBarResponse, DefaultError, GetFooBarResponse, ReturnType<typeof getFooBarQueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await BarBazService.getFooBar({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: getFooBarQueryKey(options)\n});\n\nexport const fooBarPostMutation = (options?: Partial<Options<FooBarPostData>>): UseMutationOptions<FooBarPostResponse, DefaultError, Options<FooBarPostData>> => {\n    const mutationOptions: UseMutationOptions<FooBarPostResponse, DefaultError, Options<FooBarPostData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await BarService.post({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const fooBarPutMutation = (options?: Partial<Options<FooBarPutData>>): UseMutationOptions<FooBarPutResponse, DefaultError, Options<FooBarPutData>> => {\n    const mutationOptions: UseMutationOptions<FooBarPutResponse, DefaultError, Options<FooBarPutData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await BarService.put({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/preact-query/asClass/client/client.gen.ts",
    "content": "// 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 (options: RequestOptions) => {\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 url = buildUrl(opts);\n\n    return { opts, url };\n  };\n\n  const request: Client['request'] = async (options) => {\n    // @ts-expect-error\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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/preact-query/asClass/client/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type { Auth } from '../core/auth.gen';\nexport type { QuerySerializerOptions } from '../core/bodySerializer.gen';\nexport {\n  formDataBodySerializer,\n  jsonBodySerializer,\n  urlSearchParamsBodySerializer,\n} from '../core/bodySerializer.gen';\nexport { buildClientParams } from '../core/params.gen';\nexport { serializeQueryKeyValue } from '../core/queryKeySerializer.gen';\nexport { createClient } from './client.gen';\nexport type {\n  Client,\n  ClientOptions,\n  Config,\n  CreateClientConfig,\n  Options,\n  RequestOptions,\n  RequestResult,\n  ResolvedRequestOptions,\n  ResponseStyle,\n  TDataShape,\n} from './types.gen';\nexport { createConfig, mergeHeaders } from './utils.gen';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/preact-query/asClass/client/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { Auth } from '../core/auth.gen';\nimport type {\n  ServerSentEventsOptions,\n  ServerSentEventsResult,\n} from '../core/serverSentEvents.gen';\nimport type { Client as CoreClient, Config as CoreConfig } from '../core/types.gen';\nimport type { Middleware } from './utils.gen';\n\nexport type ResponseStyle = 'data' | 'fields';\n\nexport interface Config<T extends ClientOptions = ClientOptions>\n  extends Omit<RequestInit, 'body' | 'headers' | 'method'>, CoreConfig {\n  /**\n   * Base URL for all requests made by this client.\n   */\n  baseUrl?: T['baseUrl'];\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   * Please don't use the Fetch client for Next.js applications. The `next`\n   * options won't have any effect.\n   *\n   * Install {@link https://www.npmjs.com/package/@hey-api/client-next `@hey-api/client-next`} instead.\n   */\n  next?: never;\n  /**\n   * Return the response data parsed in a specified format. By default, `auto`\n   * will infer the appropriate method from the `Content-Type` response header.\n   * You can override this behavior with any of the {@link Body} methods.\n   * Select `stream` if you don't want to parse response data at all.\n   *\n   * @default 'auto'\n   */\n  parseAs?: 'arrayBuffer' | 'auto' | 'blob' | 'formData' | 'json' | 'stream' | 'text';\n  /**\n   * Should we return only data or multiple fields (data, error, response, etc.)?\n   *\n   * @default 'fields'\n   */\n  responseStyle?: ResponseStyle;\n  /**\n   * Throw an error instead of returning it in the response?\n   *\n   * @default false\n   */\n  throwOnError?: T['throwOnError'];\n}\n\nexport interface RequestOptions<\n  TData = unknown,\n  TResponseStyle extends ResponseStyle = 'fields',\n  ThrowOnError extends boolean = boolean,\n  Url extends string = string,\n>\n  extends\n    Config<{\n      responseStyle: TResponseStyle;\n      throwOnError: ThrowOnError;\n    }>,\n    Pick<\n      ServerSentEventsOptions<TData>,\n      | 'onRequest'\n      | 'onSseError'\n      | 'onSseEvent'\n      | 'sseDefaultRetryDelay'\n      | 'sseMaxRetryAttempts'\n      | 'sseMaxRetryDelay'\n    > {\n  /**\n   * Any body that you want to add to your request.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/fetch#body}\n   */\n  body?: unknown;\n  path?: Record<string, unknown>;\n  query?: Record<string, unknown>;\n  /**\n   * Security mechanism(s) to use for the request.\n   */\n  security?: ReadonlyArray<Auth>;\n  url: Url;\n}\n\nexport interface ResolvedRequestOptions<\n  TResponseStyle extends ResponseStyle = 'fields',\n  ThrowOnError extends boolean = boolean,\n  Url extends string = string,\n> extends RequestOptions<unknown, TResponseStyle, ThrowOnError, Url> {\n  serializedBody?: string;\n}\n\nexport type RequestResult<\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = boolean,\n  TResponseStyle extends ResponseStyle = 'fields',\n> = ThrowOnError extends true\n  ? Promise<\n      TResponseStyle extends 'data'\n        ? TData extends Record<string, unknown>\n          ? TData[keyof TData]\n          : TData\n        : {\n            data: TData extends Record<string, unknown> ? TData[keyof TData] : TData;\n            request: Request;\n            response: Response;\n          }\n    >\n  : Promise<\n      TResponseStyle extends 'data'\n        ? (TData extends Record<string, unknown> ? TData[keyof TData] : TData) | undefined\n        : (\n            | {\n                data: TData extends Record<string, unknown> ? TData[keyof TData] : TData;\n                error: undefined;\n              }\n            | {\n                data: undefined;\n                error: TError extends Record<string, unknown> ? TError[keyof TError] : TError;\n              }\n          ) & {\n            request: Request;\n            response: Response;\n          }\n    >;\n\nexport interface ClientOptions {\n  baseUrl?: string;\n  responseStyle?: ResponseStyle;\n  throwOnError?: boolean;\n}\n\ntype MethodFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'>,\n) => RequestResult<TData, TError, ThrowOnError, TResponseStyle>;\n\ntype SseFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'>,\n) => Promise<ServerSentEventsResult<TData, TError>>;\n\ntype RequestFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'> &\n    Pick<Required<RequestOptions<TData, TResponseStyle, ThrowOnError>>, 'method'>,\n) => RequestResult<TData, TError, ThrowOnError, TResponseStyle>;\n\ntype BuildUrlFn = <\n  TData extends {\n    body?: unknown;\n    path?: Record<string, unknown>;\n    query?: Record<string, unknown>;\n    url: string;\n  },\n>(\n  options: TData & Options<TData>,\n) => string;\n\nexport type Client = CoreClient<RequestFn, Config, MethodFn, BuildUrlFn, SseFn> & {\n  interceptors: Middleware<Request, Response, unknown, ResolvedRequestOptions>;\n};\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 = ClientOptions> = (\n  override?: Config<ClientOptions & T>,\n) => Config<Required<ClientOptions> & T>;\n\nexport interface TDataShape {\n  body?: unknown;\n  headers?: unknown;\n  path?: unknown;\n  query?: unknown;\n  url: string;\n}\n\ntype OmitKeys<T, K> = Pick<T, Exclude<keyof T, K>>;\n\nexport type Options<\n  TData extends TDataShape = TDataShape,\n  ThrowOnError extends boolean = boolean,\n  TResponse = unknown,\n  TResponseStyle extends ResponseStyle = 'fields',\n> = OmitKeys<\n  RequestOptions<TResponse, TResponseStyle, ThrowOnError>,\n  'body' | 'path' | 'query' | 'url'\n> &\n  ([TData] extends [never] ? unknown : Omit<TData, 'url'>);\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/preact-query/asClass/client/utils.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/preact-query/asClass/client.gen.ts",
    "content": "// 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>());\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/preact-query/asClass/core/auth.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/preact-query/asClass/core/bodySerializer.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/preact-query/asClass/core/params.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/preact-query/asClass/core/pathSerializer.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/preact-query/asClass/core/queryKeySerializer.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\n/**\n * JSON-friendly union that mirrors what Pinia Colada can hash.\n */\nexport type JsonValue =\n  | null\n  | string\n  | number\n  | boolean\n  | JsonValue[]\n  | { [key: string]: JsonValue };\n\n/**\n * Replacer that converts non-JSON values (bigint, Date, etc.) to safe substitutes.\n */\nexport const queryKeyJsonReplacer = (_key: string, value: unknown) => {\n  if (value === undefined || typeof value === 'function' || typeof value === 'symbol') {\n    return undefined;\n  }\n  if (typeof value === 'bigint') {\n    return value.toString();\n  }\n  if (value instanceof Date) {\n    return value.toISOString();\n  }\n  return value;\n};\n\n/**\n * Safely stringifies a value and parses it back into a JsonValue.\n */\nexport const stringifyToJsonValue = (input: unknown): JsonValue | undefined => {\n  try {\n    const json = JSON.stringify(input, queryKeyJsonReplacer);\n    if (json === undefined) {\n      return undefined;\n    }\n    return JSON.parse(json) as JsonValue;\n  } catch {\n    return undefined;\n  }\n};\n\n/**\n * Detects plain objects (including objects with a null prototype).\n */\nconst isPlainObject = (value: unknown): value is Record<string, unknown> => {\n  if (value === null || typeof value !== 'object') {\n    return false;\n  }\n  const prototype = Object.getPrototypeOf(value as object);\n  return prototype === Object.prototype || prototype === null;\n};\n\n/**\n * Turns URLSearchParams into a sorted JSON object for deterministic keys.\n */\nconst serializeSearchParams = (params: URLSearchParams): JsonValue => {\n  const entries = Array.from(params.entries()).sort(([a], [b]) => a.localeCompare(b));\n  const result: Record<string, JsonValue> = {};\n\n  for (const [key, value] of entries) {\n    const existing = result[key];\n    if (existing === undefined) {\n      result[key] = value;\n      continue;\n    }\n\n    if (Array.isArray(existing)) {\n      (existing as string[]).push(value);\n    } else {\n      result[key] = [existing, value];\n    }\n  }\n\n  return result;\n};\n\n/**\n * Normalizes any accepted value into a JSON-friendly shape for query keys.\n */\nexport const serializeQueryKeyValue = (value: unknown): JsonValue | undefined => {\n  if (value === null) {\n    return null;\n  }\n\n  if (typeof value === 'string' || typeof value === 'number' || typeof value === 'boolean') {\n    return value;\n  }\n\n  if (value === undefined || typeof value === 'function' || typeof value === 'symbol') {\n    return undefined;\n  }\n\n  if (typeof value === 'bigint') {\n    return value.toString();\n  }\n\n  if (value instanceof Date) {\n    return value.toISOString();\n  }\n\n  if (Array.isArray(value)) {\n    return stringifyToJsonValue(value);\n  }\n\n  if (typeof URLSearchParams !== 'undefined' && value instanceof URLSearchParams) {\n    return serializeSearchParams(value);\n  }\n\n  if (isPlainObject(value)) {\n    return stringifyToJsonValue(value);\n  }\n\n  return undefined;\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/preact-query/asClass/core/serverSentEvents.gen.ts",
    "content": "// 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 const 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            // Normalize line endings: CRLF -> LF, then CR -> LF\n            buffer = buffer.replace(/\\r\\n/g, '\\n').replace(/\\r/g, '\\n');\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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/preact-query/asClass/core/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { Auth, AuthToken } from './auth.gen';\nimport type { BodySerializer, QuerySerializer, QuerySerializerOptions } from './bodySerializer.gen';\n\nexport type HttpMethod =\n  | 'connect'\n  | 'delete'\n  | 'get'\n  | 'head'\n  | 'options'\n  | 'patch'\n  | 'post'\n  | 'put'\n  | 'trace';\n\nexport type Client<\n  RequestFn = never,\n  Config = unknown,\n  MethodFn = never,\n  BuildUrlFn = never,\n  SseFn = never,\n> = {\n  /**\n   * Returns the final request URL.\n   */\n  buildUrl: BuildUrlFn;\n  getConfig: () => Config;\n  request: RequestFn;\n  setConfig: (config: Config) => Config;\n} & {\n  [K in HttpMethod]: MethodFn;\n} & ([SseFn] extends [never] ? { sse?: never } : { sse: { [K in HttpMethod]: SseFn } });\n\nexport interface Config {\n  /**\n   * Auth token or a function returning auth token. The resolved value will be\n   * added to the request payload as defined by its `security` array.\n   */\n  auth?: ((auth: Auth) => Promise<AuthToken> | AuthToken) | AuthToken;\n  /**\n   * A function for serializing request body parameter. By default,\n   * {@link JSON.stringify()} will be used.\n   */\n  bodySerializer?: BodySerializer | null;\n  /**\n   * An object containing any HTTP headers that you want to pre-populate your\n   * `Headers` object with.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/Headers/Headers#init See more}\n   */\n  headers?:\n    | RequestInit['headers']\n    | Record<\n        string,\n        string | number | boolean | (string | number | boolean)[] | null | undefined | unknown\n      >;\n  /**\n   * The request method.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/fetch#method See more}\n   */\n  method?: Uppercase<HttpMethod>;\n  /**\n   * A function for serializing request query parameters. By default, arrays\n   * will be exploded in form style, objects will be exploded in deepObject\n   * style, and reserved characters are percent-encoded.\n   *\n   * This method will have no effect if the native `paramsSerializer()` Axios\n   * API function is used.\n   *\n   * {@link https://swagger.io/docs/specification/serialization/#query View examples}\n   */\n  querySerializer?: QuerySerializer | QuerySerializerOptions;\n  /**\n   * A function validating request data. This is useful if you want to ensure\n   * the request conforms to the desired shape, so it can be safely sent to\n   * the server.\n   */\n  requestValidator?: (data: unknown) => Promise<unknown>;\n  /**\n   * A function transforming response data before it's returned. This is useful\n   * for post-processing data, e.g. converting ISO strings into Date objects.\n   */\n  responseTransformer?: (data: unknown) => Promise<unknown>;\n  /**\n   * A function validating response data. This is useful if you want to ensure\n   * the response conforms to the desired shape, so it can be safely passed to\n   * the transformers and returned to the user.\n   */\n  responseValidator?: (data: unknown) => Promise<unknown>;\n}\n\ntype IsExactlyNeverOrNeverUndefined<T> = [T] extends [never]\n  ? true\n  : [T] extends [never | undefined]\n    ? [undefined] extends [T]\n      ? false\n      : true\n    : false;\n\nexport type OmitNever<T extends Record<string, unknown>> = {\n  [K in keyof T as IsExactlyNeverOrNeverUndefined<T[K]> extends true ? never : K]: T[K];\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/preact-query/asClass/core/utils.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/preact-query/asClass/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport { BarBazService, BarService, BarService2, FooBazService, FooService, FooService2, type Options } from './sdk.gen';\nexport type { ClientOptions, FooBarPostData, FooBarPostResponse, FooBarPostResponses, FooBarPutData, FooBarPutResponse, FooBarPutResponses, FooPostData, FooPostResponse, FooPostResponses, FooPutData, FooPutResponse, FooPutResponses, GetFooBarData, GetFooBarResponse, GetFooBarResponses, GetFooData, GetFooResponse, GetFooResponses } from './types.gen';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/preact-query/asClass/sdk.gen.ts",
    "content": "// 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 { FooBarPostData, FooBarPostResponses, FooBarPutData, FooBarPutResponses, FooPostData, FooPostResponses, FooPutData, FooPutResponses, GetFooBarData, GetFooBarResponses, GetFooData, GetFooResponses } from './types.gen';\n\nexport type Options<TData extends TDataShape = TDataShape, ThrowOnError extends boolean = boolean> = Options2<TData, ThrowOnError> & {\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\nexport class BarService {\n    public static post<ThrowOnError extends boolean = false>(options?: Options<FooBarPostData, ThrowOnError>) {\n        return (options?.client ?? client).post<FooBarPostResponses, unknown, ThrowOnError>({ url: '/foo/bar', ...options });\n    }\n    \n    public static put<ThrowOnError extends boolean = false>(options?: Options<FooBarPutData, ThrowOnError>) {\n        return (options?.client ?? client).put<FooBarPutResponses, unknown, ThrowOnError>({ url: '/foo/bar', ...options });\n    }\n}\n\nexport class FooService {\n    public static post<ThrowOnError extends boolean = false>(options?: Options<FooPostData, ThrowOnError>) {\n        return (options?.client ?? client).post<FooPostResponses, unknown, ThrowOnError>({ url: '/foo', ...options });\n    }\n    \n    public static put<ThrowOnError extends boolean = false>(options?: Options<FooPutData, ThrowOnError>) {\n        return (options?.client ?? client).put<FooPutResponses, unknown, ThrowOnError>({ url: '/foo', ...options });\n    }\n    \n    static barService = BarService;\n}\n\nexport class FooBazService {\n    public static getFoo<ThrowOnError extends boolean = false>(options?: Options<GetFooData, ThrowOnError>) {\n        return (options?.client ?? client).get<GetFooResponses, unknown, ThrowOnError>({ url: '/foo', ...options });\n    }\n    \n    static fooService = FooService;\n}\n\nexport class BarService2 {\n    public static post<ThrowOnError extends boolean = false>(options?: Options<FooBarPostData, ThrowOnError>) {\n        return (options?.client ?? client).post<FooBarPostResponses, unknown, ThrowOnError>({ url: '/foo/bar', ...options });\n    }\n    \n    public static put<ThrowOnError extends boolean = false>(options?: Options<FooBarPutData, ThrowOnError>) {\n        return (options?.client ?? client).put<FooBarPutResponses, unknown, ThrowOnError>({ url: '/foo/bar', ...options });\n    }\n}\n\nexport class FooService2 {\n    static barService = BarService2;\n}\n\nexport class BarBazService {\n    public static getFooBar<ThrowOnError extends boolean = false>(options?: Options<GetFooBarData, ThrowOnError>) {\n        return (options?.client ?? client).get<GetFooBarResponses, unknown, ThrowOnError>({ url: '/foo/bar', ...options });\n    }\n    \n    static fooService = FooService2;\n}\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/preact-query/asClass/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type ClientOptions = {\n    baseUrl: `${string}://${string}` | (string & {});\n};\n\nexport type GetFooData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/foo';\n};\n\nexport type GetFooResponses = {\n    /**\n     * OK\n     */\n    200: string;\n};\n\nexport type GetFooResponse = GetFooResponses[keyof GetFooResponses];\n\nexport type FooPostData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/foo';\n};\n\nexport type FooPostResponses = {\n    /**\n     * OK\n     */\n    200: string;\n};\n\nexport type FooPostResponse = FooPostResponses[keyof FooPostResponses];\n\nexport type FooPutData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/foo';\n};\n\nexport type FooPutResponses = {\n    /**\n     * OK\n     */\n    200: string;\n};\n\nexport type FooPutResponse = FooPutResponses[keyof FooPutResponses];\n\nexport type GetFooBarData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/foo/bar';\n};\n\nexport type GetFooBarResponses = {\n    /**\n     * OK\n     */\n    200: string;\n};\n\nexport type GetFooBarResponse = GetFooBarResponses[keyof GetFooBarResponses];\n\nexport type FooBarPostData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/foo/bar';\n};\n\nexport type FooBarPostResponses = {\n    /**\n     * OK\n     */\n    200: string;\n};\n\nexport type FooBarPostResponse = FooBarPostResponses[keyof FooBarPostResponses];\n\nexport type FooBarPutData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/foo/bar';\n};\n\nexport type FooBarPutResponses = {\n    /**\n     * OK\n     */\n    200: string;\n};\n\nexport type FooBarPutResponse = FooBarPutResponses[keyof FooBarPutResponses];\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/preact-query/axios/@tanstack/preact-query.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport { type DefaultError, type InfiniteData, infiniteQueryOptions, queryOptions, type UseMutationOptions } from '@tanstack/preact-query';\nimport type { AxiosError } from 'axios';\n\nimport { client } from '../client.gen';\nimport { apiVVersionODataControllerCount, callToTestOrderOfParams, callWithDefaultOptionalParameters, callWithDefaultParameters, callWithDescriptions, callWithDuplicateResponses, callWithNoContentResponse, callWithParameters, callWithResponse, callWithResponseAndNoContentResponse, callWithResponses, callWithResultFromHeader, callWithWeirdParameterNames, collectionFormat, complexParams, complexTypes, deleteCallWithoutParametersAndResponse, deleteFoo, deprecatedCall, dummyA, dummyB, duplicateName, duplicateName2, duplicateName3, duplicateName4, export_, fileResponse, fooWow, getApiVbyApiVersionSimpleOperation, getCallWithOptionalParam, getCallWithoutParametersAndResponse, import_, multipartRequest, multipartResponse, nonAsciiæøåÆøÅöôêÊ字符串, type Options, patchApiVbyApiVersionNoTag, patchCallWithoutParametersAndResponse, postApiVbyApiVersionFormData, postApiVbyApiVersionRequestBody, postCallWithOptionalParam, postCallWithoutParametersAndResponse, putCallWithoutParametersAndResponse, putWithFormUrlEncoded, testErrorCode, types, uploadFile } from '../sdk.gen';\nimport type { ApiVVersionODataControllerCountData, ApiVVersionODataControllerCountResponse, CallToTestOrderOfParamsData, CallWithDefaultOptionalParametersData, CallWithDefaultParametersData, CallWithDescriptionsData, CallWithDuplicateResponsesData, CallWithDuplicateResponsesError, CallWithDuplicateResponsesResponse, CallWithNoContentResponseData, CallWithNoContentResponseResponse, CallWithParametersData, CallWithResponseAndNoContentResponseData, CallWithResponseAndNoContentResponseResponse, CallWithResponseData, CallWithResponseResponse, CallWithResponsesData, CallWithResponsesError, CallWithResponsesResponse, CallWithResultFromHeaderData, CallWithWeirdParameterNamesData, CollectionFormatData, ComplexParamsData, ComplexParamsResponse, ComplexTypesData, ComplexTypesResponse, DeleteCallWithoutParametersAndResponseData, DeleteFooData3, DeprecatedCallData, DummyAData, DummyAResponse, DummyBData, DummyBResponse, DuplicateName2Data, DuplicateName3Data, DuplicateName4Data, DuplicateNameData, ExportData, FileResponseData, FileResponseResponse, FooWowData, GetApiVbyApiVersionSimpleOperationData, GetApiVbyApiVersionSimpleOperationError, GetApiVbyApiVersionSimpleOperationResponse, GetCallWithOptionalParamData, GetCallWithoutParametersAndResponseData, ImportData, ImportResponse, MultipartRequestData, MultipartResponseData, MultipartResponseResponse, NonAsciiæøåÆøÅöôêÊ字符串Data, NonAsciiæøåÆøÅöôêÊ字符串Response, PatchApiVbyApiVersionNoTagData, PatchCallWithoutParametersAndResponseData, PostApiVbyApiVersionFormDataData, PostApiVbyApiVersionRequestBodyData, PostCallWithOptionalParamData, PostCallWithOptionalParamResponse, PostCallWithoutParametersAndResponseData, PutCallWithoutParametersAndResponseData, PutWithFormUrlEncodedData, TestErrorCodeData, TypesData, TypesResponse, UploadFileData, UploadFileResponse } from '../types.gen';\n\nexport type QueryKey<TOptions extends Options> = [\n    Pick<TOptions, 'baseURL' | 'body' | 'headers' | 'path' | 'query'> & {\n        _id: string;\n        _infinite?: boolean;\n        tags?: ReadonlyArray<string>;\n    }\n];\n\nconst createQueryKey = <TOptions extends Options>(id: string, options?: TOptions, infinite?: boolean, tags?: ReadonlyArray<string>): [\n    QueryKey<TOptions>[0]\n] => {\n    const params: QueryKey<TOptions>[0] = { _id: id, baseURL: options?.baseURL || (options?.client ?? client).getConfig().baseURL } as QueryKey<TOptions>[0];\n    if (infinite) {\n        params._infinite = infinite;\n    }\n    if (tags) {\n        params.tags = tags;\n    }\n    if (options?.body) {\n        params.body = options.body;\n    }\n    if (options?.headers) {\n        params.headers = options.headers;\n    }\n    if (options?.path) {\n        params.path = options.path;\n    }\n    if (options?.query) {\n        params.query = options.query;\n    }\n    return [params];\n};\n\nexport const exportQueryKey = (options?: Options<ExportData>) => createQueryKey('export', options);\n\nexport const exportOptions = (options?: Options<ExportData>) => queryOptions<unknown, AxiosError<DefaultError>, unknown, ReturnType<typeof exportQueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await export_({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: exportQueryKey(options)\n});\n\nexport const patchApiVbyApiVersionNoTagMutation = (options?: Partial<Options<PatchApiVbyApiVersionNoTagData>>): UseMutationOptions<unknown, AxiosError<DefaultError>, Options<PatchApiVbyApiVersionNoTagData>> => {\n    const mutationOptions: UseMutationOptions<unknown, AxiosError<DefaultError>, Options<PatchApiVbyApiVersionNoTagData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await patchApiVbyApiVersionNoTag({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const importMutation = (options?: Partial<Options<ImportData>>): UseMutationOptions<ImportResponse, AxiosError<DefaultError>, Options<ImportData>> => {\n    const mutationOptions: UseMutationOptions<ImportResponse, AxiosError<DefaultError>, Options<ImportData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await import_({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const fooWowMutation = (options?: Partial<Options<FooWowData>>): UseMutationOptions<unknown, AxiosError<DefaultError>, Options<FooWowData>> => {\n    const mutationOptions: UseMutationOptions<unknown, AxiosError<DefaultError>, Options<FooWowData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await fooWow({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const apiVVersionODataControllerCountQueryKey = (options?: Options<ApiVVersionODataControllerCountData>) => createQueryKey('apiVVersionODataControllerCount', options);\n\nexport const apiVVersionODataControllerCountOptions = (options?: Options<ApiVVersionODataControllerCountData>) => queryOptions<ApiVVersionODataControllerCountResponse, AxiosError<DefaultError>, ApiVVersionODataControllerCountResponse, ReturnType<typeof apiVVersionODataControllerCountQueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await apiVVersionODataControllerCount({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: apiVVersionODataControllerCountQueryKey(options)\n});\n\nexport const getApiVbyApiVersionSimpleOperationQueryKey = (options: Options<GetApiVbyApiVersionSimpleOperationData>) => createQueryKey('getApiVbyApiVersionSimpleOperation', options);\n\nexport const getApiVbyApiVersionSimpleOperationOptions = (options: Options<GetApiVbyApiVersionSimpleOperationData>) => queryOptions<GetApiVbyApiVersionSimpleOperationResponse, AxiosError<GetApiVbyApiVersionSimpleOperationError>, GetApiVbyApiVersionSimpleOperationResponse, ReturnType<typeof getApiVbyApiVersionSimpleOperationQueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await getApiVbyApiVersionSimpleOperation({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: getApiVbyApiVersionSimpleOperationQueryKey(options)\n});\n\nexport const deleteCallWithoutParametersAndResponseMutation = (options?: Partial<Options<DeleteCallWithoutParametersAndResponseData>>): UseMutationOptions<unknown, AxiosError<DefaultError>, Options<DeleteCallWithoutParametersAndResponseData>> => {\n    const mutationOptions: UseMutationOptions<unknown, AxiosError<DefaultError>, Options<DeleteCallWithoutParametersAndResponseData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await deleteCallWithoutParametersAndResponse({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const getCallWithoutParametersAndResponseQueryKey = (options?: Options<GetCallWithoutParametersAndResponseData>) => createQueryKey('getCallWithoutParametersAndResponse', options);\n\nexport const getCallWithoutParametersAndResponseOptions = (options?: Options<GetCallWithoutParametersAndResponseData>) => queryOptions<unknown, AxiosError<DefaultError>, unknown, ReturnType<typeof getCallWithoutParametersAndResponseQueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await getCallWithoutParametersAndResponse({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: getCallWithoutParametersAndResponseQueryKey(options)\n});\n\nexport const patchCallWithoutParametersAndResponseMutation = (options?: Partial<Options<PatchCallWithoutParametersAndResponseData>>): UseMutationOptions<unknown, AxiosError<DefaultError>, Options<PatchCallWithoutParametersAndResponseData>> => {\n    const mutationOptions: UseMutationOptions<unknown, AxiosError<DefaultError>, Options<PatchCallWithoutParametersAndResponseData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await patchCallWithoutParametersAndResponse({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const postCallWithoutParametersAndResponseMutation = (options?: Partial<Options<PostCallWithoutParametersAndResponseData>>): UseMutationOptions<unknown, AxiosError<DefaultError>, Options<PostCallWithoutParametersAndResponseData>> => {\n    const mutationOptions: UseMutationOptions<unknown, AxiosError<DefaultError>, Options<PostCallWithoutParametersAndResponseData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await postCallWithoutParametersAndResponse({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const putCallWithoutParametersAndResponseMutation = (options?: Partial<Options<PutCallWithoutParametersAndResponseData>>): UseMutationOptions<unknown, AxiosError<DefaultError>, Options<PutCallWithoutParametersAndResponseData>> => {\n    const mutationOptions: UseMutationOptions<unknown, AxiosError<DefaultError>, Options<PutCallWithoutParametersAndResponseData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await putCallWithoutParametersAndResponse({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const deleteFooMutation = (options?: Partial<Options<DeleteFooData3>>): UseMutationOptions<unknown, AxiosError<DefaultError>, Options<DeleteFooData3>> => {\n    const mutationOptions: UseMutationOptions<unknown, AxiosError<DefaultError>, Options<DeleteFooData3>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await deleteFoo({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const callWithDescriptionsMutation = (options?: Partial<Options<CallWithDescriptionsData>>): UseMutationOptions<unknown, AxiosError<DefaultError>, Options<CallWithDescriptionsData>> => {\n    const mutationOptions: UseMutationOptions<unknown, AxiosError<DefaultError>, Options<CallWithDescriptionsData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await callWithDescriptions({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\n/**\n * @deprecated\n */\nexport const deprecatedCallMutation = (options?: Partial<Options<DeprecatedCallData>>): UseMutationOptions<unknown, AxiosError<DefaultError>, Options<DeprecatedCallData>> => {\n    const mutationOptions: UseMutationOptions<unknown, AxiosError<DefaultError>, Options<DeprecatedCallData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await deprecatedCall({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const callWithParametersMutation = (options?: Partial<Options<CallWithParametersData>>): UseMutationOptions<unknown, AxiosError<DefaultError>, Options<CallWithParametersData>> => {\n    const mutationOptions: UseMutationOptions<unknown, AxiosError<DefaultError>, Options<CallWithParametersData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await callWithParameters({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const callWithWeirdParameterNamesMutation = (options?: Partial<Options<CallWithWeirdParameterNamesData>>): UseMutationOptions<unknown, AxiosError<DefaultError>, Options<CallWithWeirdParameterNamesData>> => {\n    const mutationOptions: UseMutationOptions<unknown, AxiosError<DefaultError>, Options<CallWithWeirdParameterNamesData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await callWithWeirdParameterNames({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const getCallWithOptionalParamQueryKey = (options: Options<GetCallWithOptionalParamData>) => createQueryKey('getCallWithOptionalParam', options);\n\nexport const getCallWithOptionalParamOptions = (options: Options<GetCallWithOptionalParamData>) => queryOptions<unknown, AxiosError<DefaultError>, unknown, ReturnType<typeof getCallWithOptionalParamQueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await getCallWithOptionalParam({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: getCallWithOptionalParamQueryKey(options)\n});\n\nconst createInfiniteParams = <K extends Pick<QueryKey<Options>[0], 'body' | 'headers' | 'path' | 'query'>>(queryKey: QueryKey<Options>, page: K) => {\n    const params = { ...queryKey[0] };\n    if (page.body) {\n        params.body = {\n            ...queryKey[0].body as any,\n            ...page.body as any\n        };\n    }\n    if (page.headers) {\n        params.headers = {\n            ...queryKey[0].headers,\n            ...page.headers\n        };\n    }\n    if (page.path) {\n        params.path = {\n            ...queryKey[0].path as any,\n            ...page.path as any\n        };\n    }\n    if (page.query) {\n        params.query = {\n            ...queryKey[0].query as any,\n            ...page.query as any\n        };\n    }\n    return params as unknown as typeof page;\n};\n\nexport const getCallWithOptionalParamInfiniteQueryKey = (options: Options<GetCallWithOptionalParamData>): QueryKey<Options<GetCallWithOptionalParamData>> => createQueryKey('getCallWithOptionalParam', options, true);\n\nexport const getCallWithOptionalParamInfiniteOptions = (options: Options<GetCallWithOptionalParamData>) => infiniteQueryOptions<unknown, AxiosError<DefaultError>, InfiniteData<unknown>, QueryKey<Options<GetCallWithOptionalParamData>>, number | Pick<QueryKey<Options<GetCallWithOptionalParamData>>[0], 'body' | 'headers' | 'path' | 'query'>>(\n// @ts-ignore\n{\n    queryFn: async ({ pageParam, queryKey, signal }) => {\n        // @ts-ignore\n        const page: Pick<QueryKey<Options<GetCallWithOptionalParamData>>[0], 'body' | 'headers' | 'path' | 'query'> = typeof pageParam === 'object' ? pageParam : {\n            query: {\n                page: pageParam\n            }\n        };\n        const params = createInfiniteParams(queryKey, page);\n        const { data } = await getCallWithOptionalParam({\n            ...options,\n            ...params,\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: getCallWithOptionalParamInfiniteQueryKey(options)\n});\n\nexport const postCallWithOptionalParamMutation = (options?: Partial<Options<PostCallWithOptionalParamData>>): UseMutationOptions<PostCallWithOptionalParamResponse, AxiosError<DefaultError>, Options<PostCallWithOptionalParamData>> => {\n    const mutationOptions: UseMutationOptions<PostCallWithOptionalParamResponse, AxiosError<DefaultError>, Options<PostCallWithOptionalParamData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await postCallWithOptionalParam({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const postApiVbyApiVersionRequestBodyMutation = (options?: Partial<Options<PostApiVbyApiVersionRequestBodyData>>): UseMutationOptions<unknown, AxiosError<DefaultError>, Options<PostApiVbyApiVersionRequestBodyData>> => {\n    const mutationOptions: UseMutationOptions<unknown, AxiosError<DefaultError>, Options<PostApiVbyApiVersionRequestBodyData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await postApiVbyApiVersionRequestBody({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const postApiVbyApiVersionFormDataMutation = (options?: Partial<Options<PostApiVbyApiVersionFormDataData>>): UseMutationOptions<unknown, AxiosError<DefaultError>, Options<PostApiVbyApiVersionFormDataData>> => {\n    const mutationOptions: UseMutationOptions<unknown, AxiosError<DefaultError>, Options<PostApiVbyApiVersionFormDataData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await postApiVbyApiVersionFormData({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const callWithDefaultParametersQueryKey = (options?: Options<CallWithDefaultParametersData>) => createQueryKey('callWithDefaultParameters', options);\n\nexport const callWithDefaultParametersOptions = (options?: Options<CallWithDefaultParametersData>) => queryOptions<unknown, AxiosError<DefaultError>, unknown, ReturnType<typeof callWithDefaultParametersQueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await callWithDefaultParameters({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: callWithDefaultParametersQueryKey(options)\n});\n\nexport const callWithDefaultOptionalParametersMutation = (options?: Partial<Options<CallWithDefaultOptionalParametersData>>): UseMutationOptions<unknown, AxiosError<DefaultError>, Options<CallWithDefaultOptionalParametersData>> => {\n    const mutationOptions: UseMutationOptions<unknown, AxiosError<DefaultError>, Options<CallWithDefaultOptionalParametersData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await callWithDefaultOptionalParameters({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const callToTestOrderOfParamsMutation = (options?: Partial<Options<CallToTestOrderOfParamsData>>): UseMutationOptions<unknown, AxiosError<DefaultError>, Options<CallToTestOrderOfParamsData>> => {\n    const mutationOptions: UseMutationOptions<unknown, AxiosError<DefaultError>, Options<CallToTestOrderOfParamsData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await callToTestOrderOfParams({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const duplicateNameMutation = (options?: Partial<Options<DuplicateNameData>>): UseMutationOptions<unknown, AxiosError<DefaultError>, Options<DuplicateNameData>> => {\n    const mutationOptions: UseMutationOptions<unknown, AxiosError<DefaultError>, Options<DuplicateNameData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await duplicateName({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const duplicateName2QueryKey = (options?: Options<DuplicateName2Data>) => createQueryKey('duplicateName2', options);\n\nexport const duplicateName2Options = (options?: Options<DuplicateName2Data>) => queryOptions<unknown, AxiosError<DefaultError>, unknown, ReturnType<typeof duplicateName2QueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await duplicateName2({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: duplicateName2QueryKey(options)\n});\n\nexport const duplicateName3Mutation = (options?: Partial<Options<DuplicateName3Data>>): UseMutationOptions<unknown, AxiosError<DefaultError>, Options<DuplicateName3Data>> => {\n    const mutationOptions: UseMutationOptions<unknown, AxiosError<DefaultError>, Options<DuplicateName3Data>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await duplicateName3({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const duplicateName4Mutation = (options?: Partial<Options<DuplicateName4Data>>): UseMutationOptions<unknown, AxiosError<DefaultError>, Options<DuplicateName4Data>> => {\n    const mutationOptions: UseMutationOptions<unknown, AxiosError<DefaultError>, Options<DuplicateName4Data>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await duplicateName4({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const callWithNoContentResponseQueryKey = (options?: Options<CallWithNoContentResponseData>) => createQueryKey('callWithNoContentResponse', options);\n\nexport const callWithNoContentResponseOptions = (options?: Options<CallWithNoContentResponseData>) => queryOptions<CallWithNoContentResponseResponse, AxiosError<DefaultError>, CallWithNoContentResponseResponse, ReturnType<typeof callWithNoContentResponseQueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await callWithNoContentResponse({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: callWithNoContentResponseQueryKey(options)\n});\n\nexport const callWithResponseAndNoContentResponseQueryKey = (options?: Options<CallWithResponseAndNoContentResponseData>) => createQueryKey('callWithResponseAndNoContentResponse', options);\n\nexport const callWithResponseAndNoContentResponseOptions = (options?: Options<CallWithResponseAndNoContentResponseData>) => queryOptions<CallWithResponseAndNoContentResponseResponse, AxiosError<DefaultError>, CallWithResponseAndNoContentResponseResponse, ReturnType<typeof callWithResponseAndNoContentResponseQueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await callWithResponseAndNoContentResponse({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: callWithResponseAndNoContentResponseQueryKey(options)\n});\n\nexport const dummyAQueryKey = (options?: Options<DummyAData>) => createQueryKey('dummyA', options);\n\nexport const dummyAOptions = (options?: Options<DummyAData>) => queryOptions<DummyAResponse, AxiosError<DefaultError>, DummyAResponse, ReturnType<typeof dummyAQueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await dummyA({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: dummyAQueryKey(options)\n});\n\nexport const dummyBQueryKey = (options?: Options<DummyBData>) => createQueryKey('dummyB', options);\n\nexport const dummyBOptions = (options?: Options<DummyBData>) => queryOptions<DummyBResponse, AxiosError<DefaultError>, DummyBResponse, ReturnType<typeof dummyBQueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await dummyB({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: dummyBQueryKey(options)\n});\n\nexport const callWithResponseQueryKey = (options?: Options<CallWithResponseData>) => createQueryKey('callWithResponse', options);\n\nexport const callWithResponseOptions = (options?: Options<CallWithResponseData>) => queryOptions<CallWithResponseResponse, AxiosError<DefaultError>, CallWithResponseResponse, ReturnType<typeof callWithResponseQueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await callWithResponse({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: callWithResponseQueryKey(options)\n});\n\nexport const callWithDuplicateResponsesMutation = (options?: Partial<Options<CallWithDuplicateResponsesData>>): UseMutationOptions<CallWithDuplicateResponsesResponse, AxiosError<CallWithDuplicateResponsesError>, Options<CallWithDuplicateResponsesData>> => {\n    const mutationOptions: UseMutationOptions<CallWithDuplicateResponsesResponse, AxiosError<CallWithDuplicateResponsesError>, Options<CallWithDuplicateResponsesData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await callWithDuplicateResponses({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const callWithResponsesMutation = (options?: Partial<Options<CallWithResponsesData>>): UseMutationOptions<CallWithResponsesResponse, AxiosError<CallWithResponsesError>, Options<CallWithResponsesData>> => {\n    const mutationOptions: UseMutationOptions<CallWithResponsesResponse, AxiosError<CallWithResponsesError>, Options<CallWithResponsesData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await callWithResponses({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const collectionFormatQueryKey = (options: Options<CollectionFormatData>) => createQueryKey('collectionFormat', options);\n\nexport const collectionFormatOptions = (options: Options<CollectionFormatData>) => queryOptions<unknown, AxiosError<DefaultError>, unknown, ReturnType<typeof collectionFormatQueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await collectionFormat({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: collectionFormatQueryKey(options)\n});\n\nexport const typesQueryKey = (options: Options<TypesData>) => createQueryKey('types', options);\n\nexport const typesOptions = (options: Options<TypesData>) => queryOptions<TypesResponse, AxiosError<DefaultError>, TypesResponse, ReturnType<typeof typesQueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await types({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: typesQueryKey(options)\n});\n\nexport const uploadFileMutation = (options?: Partial<Options<UploadFileData>>): UseMutationOptions<UploadFileResponse, AxiosError<DefaultError>, Options<UploadFileData>> => {\n    const mutationOptions: UseMutationOptions<UploadFileResponse, AxiosError<DefaultError>, Options<UploadFileData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await uploadFile({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const fileResponseQueryKey = (options: Options<FileResponseData>) => createQueryKey('fileResponse', options);\n\nexport const fileResponseOptions = (options: Options<FileResponseData>) => queryOptions<FileResponseResponse, AxiosError<DefaultError>, FileResponseResponse, ReturnType<typeof fileResponseQueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await fileResponse({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: fileResponseQueryKey(options)\n});\n\nexport const complexTypesQueryKey = (options: Options<ComplexTypesData>) => createQueryKey('complexTypes', options);\n\nexport const complexTypesOptions = (options: Options<ComplexTypesData>) => queryOptions<ComplexTypesResponse, AxiosError<DefaultError>, ComplexTypesResponse, ReturnType<typeof complexTypesQueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await complexTypes({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: complexTypesQueryKey(options)\n});\n\nexport const multipartResponseQueryKey = (options?: Options<MultipartResponseData>) => createQueryKey('multipartResponse', options);\n\nexport const multipartResponseOptions = (options?: Options<MultipartResponseData>) => queryOptions<MultipartResponseResponse, AxiosError<DefaultError>, MultipartResponseResponse, ReturnType<typeof multipartResponseQueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await multipartResponse({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: multipartResponseQueryKey(options)\n});\n\nexport const multipartRequestMutation = (options?: Partial<Options<MultipartRequestData>>): UseMutationOptions<unknown, AxiosError<DefaultError>, Options<MultipartRequestData>> => {\n    const mutationOptions: UseMutationOptions<unknown, AxiosError<DefaultError>, Options<MultipartRequestData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await multipartRequest({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const complexParamsMutation = (options?: Partial<Options<ComplexParamsData>>): UseMutationOptions<ComplexParamsResponse, AxiosError<DefaultError>, Options<ComplexParamsData>> => {\n    const mutationOptions: UseMutationOptions<ComplexParamsResponse, AxiosError<DefaultError>, Options<ComplexParamsData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await complexParams({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const callWithResultFromHeaderMutation = (options?: Partial<Options<CallWithResultFromHeaderData>>): UseMutationOptions<unknown, AxiosError<DefaultError>, Options<CallWithResultFromHeaderData>> => {\n    const mutationOptions: UseMutationOptions<unknown, AxiosError<DefaultError>, Options<CallWithResultFromHeaderData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await callWithResultFromHeader({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const testErrorCodeMutation = (options?: Partial<Options<TestErrorCodeData>>): UseMutationOptions<unknown, AxiosError<DefaultError>, Options<TestErrorCodeData>> => {\n    const mutationOptions: UseMutationOptions<unknown, AxiosError<DefaultError>, Options<TestErrorCodeData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await testErrorCode({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const nonAsciiæøåÆøÅöôêÊ字符串Mutation = (options?: Partial<Options<NonAsciiæøåÆøÅöôêÊ字符串Data>>): UseMutationOptions<NonAsciiæøåÆøÅöôêÊ字符串Response, AxiosError<DefaultError>, Options<NonAsciiæøåÆøÅöôêÊ字符串Data>> => {\n    const mutationOptions: UseMutationOptions<NonAsciiæøåÆøÅöôêÊ字符串Response, AxiosError<DefaultError>, Options<NonAsciiæøåÆøÅöôêÊ字符串Data>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await nonAsciiæøåÆøÅöôêÊ字符串({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\n/**\n * Login User\n */\nexport const putWithFormUrlEncodedMutation = (options?: Partial<Options<PutWithFormUrlEncodedData>>): UseMutationOptions<unknown, AxiosError<DefaultError>, Options<PutWithFormUrlEncodedData>> => {\n    const mutationOptions: UseMutationOptions<unknown, AxiosError<DefaultError>, Options<PutWithFormUrlEncodedData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await putWithFormUrlEncoded({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/preact-query/axios/client/client.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { AxiosError, AxiosInstance, RawAxiosRequestHeaders } from 'axios';\nimport axios from 'axios';\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 } from './types.gen';\nimport { buildUrl, createConfig, mergeConfigs, mergeHeaders, setAuthParams } from './utils.gen';\n\nexport const createClient = (config: Config = {}): Client => {\n  let _config = mergeConfigs(createConfig(), config);\n\n  let instance: AxiosInstance;\n\n  if (_config.axios && !('Axios' in _config.axios)) {\n    instance = _config.axios;\n  } else {\n    // eslint-disable-next-line @typescript-eslint/no-unused-vars\n    const { auth, ...configWithoutAuth } = _config;\n    instance = axios.create(configWithoutAuth);\n  }\n\n  const getConfig = (): Config => ({ ..._config });\n\n  const setConfig = (config: Config): Config => {\n    _config = mergeConfigs(_config, config);\n    instance.defaults = {\n      ...instance.defaults,\n      ..._config,\n      // @ts-expect-error\n      headers: mergeHeaders(instance.defaults.headers, _config.headers),\n    };\n    return getConfig();\n  };\n\n  const beforeRequest = async (options: RequestOptions) => {\n    const opts = {\n      ..._config,\n      ...options,\n      axios: options.axios ?? _config.axios ?? instance,\n      headers: mergeHeaders(_config.headers, options.headers),\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.body = opts.bodySerializer(opts.body);\n    }\n\n    const url = buildUrl(opts);\n\n    return { opts, url };\n  };\n\n  // @ts-expect-error\n  const request: Client['request'] = async (options) => {\n    // @ts-expect-error\n    const { opts, url } = await beforeRequest(options);\n    try {\n      // assign Axios here for consistency with fetch\n      const _axios = opts.axios!;\n      // eslint-disable-next-line @typescript-eslint/no-unused-vars\n      const { auth, ...optsWithoutAuth } = opts;\n      const response = await _axios({\n        ...optsWithoutAuth,\n        baseURL: '', // the baseURL is already included in `url`\n        data: getValidRequestBody(opts),\n        headers: opts.headers as RawAxiosRequestHeaders,\n        // let `paramsSerializer()` handle query params if it exists\n        params: opts.paramsSerializer ? opts.query : undefined,\n        url,\n      });\n\n      let { data } = response;\n\n      if (opts.responseType === '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 {\n        ...response,\n        data: data ?? {},\n      };\n    } catch (error) {\n      const e = error as AxiosError;\n      if (opts.throwOnError) {\n        throw e;\n      }\n      // @ts-expect-error\n      e.error = e.response?.data ?? {};\n      return e;\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 Record<string, string>,\n      method,\n      serializedBody: getValidRequestBody(opts) as BodyInit | null | undefined,\n      // @ts-expect-error\n      signal: opts.signal,\n      url,\n    });\n  };\n\n  const _buildUrl: Client['buildUrl'] = (options) =>\n    buildUrl({ axios: instance, ..._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    instance,\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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/preact-query/axios/client/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type { Auth } from '../core/auth.gen';\nexport type { QuerySerializerOptions } from '../core/bodySerializer.gen';\nexport {\n  formDataBodySerializer,\n  jsonBodySerializer,\n  urlSearchParamsBodySerializer,\n} from '../core/bodySerializer.gen';\nexport { buildClientParams } from '../core/params.gen';\nexport { serializeQueryKeyValue } from '../core/queryKeySerializer.gen';\nexport { createClient } from './client.gen';\nexport type {\n  Client,\n  ClientOptions,\n  Config,\n  CreateClientConfig,\n  Options,\n  RequestOptions,\n  RequestResult,\n  TDataShape,\n} from './types.gen';\nexport { createConfig } from './utils.gen';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/preact-query/axios/client/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type {\n  AxiosError,\n  AxiosInstance,\n  AxiosRequestHeaders,\n  AxiosResponse,\n  AxiosStatic,\n  CreateAxiosDefaults,\n} from 'axios';\n\nimport type { Auth } from '../core/auth.gen';\nimport type {\n  ServerSentEventsOptions,\n  ServerSentEventsResult,\n} from '../core/serverSentEvents.gen';\nimport type { Client as CoreClient, Config as CoreConfig } from '../core/types.gen';\n\nexport interface Config<T extends ClientOptions = ClientOptions>\n  extends Omit<CreateAxiosDefaults, 'auth' | 'baseURL' | 'headers' | 'method'>, CoreConfig {\n  /**\n   * Axios implementation. You can use this option to provide either an\n   * `AxiosStatic` or an `AxiosInstance`.\n   *\n   * @default axios\n   */\n  axios?: AxiosStatic | AxiosInstance;\n  /**\n   * Base URL for all requests made by this client.\n   */\n  baseURL?: T['baseURL'];\n  /**\n   * An object containing any HTTP headers that you want to pre-populate your\n   * `Headers` object with.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/Headers/Headers#init See more}\n   */\n  headers?:\n    | AxiosRequestHeaders\n    | Record<\n        string,\n        string | number | boolean | (string | number | boolean)[] | null | undefined | unknown\n      >;\n  /**\n   * Throw an error instead of returning it in the response?\n   *\n   * @default false\n   */\n  throwOnError?: T['throwOnError'];\n}\n\nexport interface RequestOptions<\n  TData = unknown,\n  ThrowOnError extends boolean = boolean,\n  Url extends string = string,\n>\n  extends\n    Config<{\n      throwOnError: ThrowOnError;\n    }>,\n    Pick<\n      ServerSentEventsOptions<TData>,\n      | 'onRequest'\n      | 'onSseError'\n      | 'onSseEvent'\n      | 'sseDefaultRetryDelay'\n      | 'sseMaxRetryAttempts'\n      | 'sseMaxRetryDelay'\n    > {\n  /**\n   * Any body that you want to add to your request.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/fetch#body}\n   */\n  body?: unknown;\n  path?: Record<string, unknown>;\n  query?: Record<string, unknown>;\n  /**\n   * Security mechanism(s) to use for the request.\n   */\n  security?: ReadonlyArray<Auth>;\n  url: Url;\n}\n\nexport interface ClientOptions {\n  baseURL?: string;\n  throwOnError?: boolean;\n}\n\nexport type RequestResult<\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = boolean,\n> = ThrowOnError extends true\n  ? Promise<AxiosResponse<TData extends Record<string, unknown> ? TData[keyof TData] : TData>>\n  : Promise<\n      | (AxiosResponse<TData extends Record<string, unknown> ? TData[keyof TData] : TData> & {\n          error: undefined;\n        })\n      | (AxiosError<TError extends Record<string, unknown> ? TError[keyof TError] : TError> & {\n          data: undefined;\n          error: TError extends Record<string, unknown> ? TError[keyof TError] : TError;\n        })\n    >;\n\ntype MethodFn = <TData = unknown, TError = unknown, ThrowOnError extends boolean = false>(\n  options: Omit<RequestOptions<TData, ThrowOnError>, 'method'>,\n) => RequestResult<TData, TError, ThrowOnError>;\n\ntype SseFn = <TData = unknown, TError = unknown, ThrowOnError extends boolean = false>(\n  options: Omit<RequestOptions<TData, ThrowOnError>, 'method'>,\n) => Promise<ServerSentEventsResult<TData, TError>>;\n\ntype RequestFn = <TData = unknown, TError = unknown, ThrowOnError extends boolean = false>(\n  options: Omit<RequestOptions<TData, ThrowOnError>, 'method'> &\n    Pick<Required<RequestOptions<TData, ThrowOnError>>, 'method'>,\n) => RequestResult<TData, TError, ThrowOnError>;\n\ntype BuildUrlFn = <\n  TData extends {\n    body?: unknown;\n    path?: Record<string, unknown>;\n    query?: Record<string, unknown>;\n    url: string;\n  },\n>(\n  options: TData & Options<TData>,\n) => string;\n\nexport type Client = CoreClient<RequestFn, Config, MethodFn, BuildUrlFn, SseFn> & {\n  instance: AxiosInstance;\n};\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 = ClientOptions> = (\n  override?: Config<ClientOptions & T>,\n) => Config<Required<ClientOptions> & T>;\n\nexport interface TDataShape {\n  body?: unknown;\n  headers?: unknown;\n  path?: unknown;\n  query?: unknown;\n  url: string;\n}\n\ntype OmitKeys<T, K> = Pick<T, Exclude<keyof T, K>>;\n\nexport type Options<\n  TData extends TDataShape = TDataShape,\n  ThrowOnError extends boolean = boolean,\n  TResponse = unknown,\n> = OmitKeys<RequestOptions<TResponse, ThrowOnError>, 'body' | 'path' | 'query' | 'url'> &\n  ([TData] extends [never] ? unknown : Omit<TData, 'url'>);\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/preact-query/axios/client/utils.gen.ts",
    "content": "// 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 {\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\nconst checkForExistence = (\n  options: Pick<RequestOptions, 'auth' | 'query'> & {\n    headers: Record<any, unknown>;\n  },\n  name?: string,\n): boolean => {\n  if (!name) {\n    return false;\n  }\n  if (name in options.headers || options.query?.[name]) {\n    return true;\n  }\n  if (\n    'Cookie' in options.headers &&\n    options.headers['Cookie'] &&\n    typeof options.headers['Cookie'] === 'string'\n  ) {\n    return options.headers['Cookie'].includes(`${name}=`);\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: Record<any, unknown>;\n  }) => {\n  for (const auth of security) {\n    if (checkForExistence(options, auth.name)) {\n      continue;\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        const value = `${name}=${token}`;\n        if ('Cookie' in options.headers && options.headers['Cookie']) {\n          options.headers['Cookie'] = `${options.headers['Cookie']}; ${value}`;\n        } else {\n          options.headers['Cookie'] = value;\n        }\n        break;\n      }\n      case 'header':\n      default:\n        options.headers[name] = token;\n        break;\n    }\n  }\n};\n\nexport const buildUrl: Client['buildUrl'] = (options) => {\n  const instanceBaseUrl = options.axios?.defaults?.baseURL;\n\n  const baseUrl =\n    !!options.baseURL && typeof options.baseURL === 'string' ? options.baseURL : instanceBaseUrl;\n\n  return getUrl({\n    baseUrl: baseUrl as string,\n    path: options.path,\n    // let `paramsSerializer()` handle query params if it exists\n    query: !options.paramsSerializer ? options.query : undefined,\n    querySerializer:\n      typeof options.querySerializer === 'function'\n        ? options.querySerializer\n        : createQuerySerializer(options.querySerializer),\n    url: options.url,\n  });\n};\n\nexport const mergeConfigs = (a: Config, b: Config): Config => {\n  const config = { ...a, ...b };\n  config.headers = mergeHeaders(a.headers, b.headers);\n  return config;\n};\n\n/**\n * Special Axios headers keywords allowing to set headers by request method.\n */\nexport const axiosHeadersKeywords = [\n  'common',\n  'delete',\n  'get',\n  'head',\n  'patch',\n  'post',\n  'put',\n] as const;\n\nexport const mergeHeaders = (\n  ...headers: Array<Required<Config>['headers'] | undefined>\n): Record<any, unknown> => {\n  const mergedHeaders: Record<any, unknown> = {};\n  for (const header of headers) {\n    if (!header || typeof header !== 'object') {\n      continue;\n    }\n\n    const iterator = Object.entries(header);\n\n    for (const [key, value] of iterator) {\n      if (\n        axiosHeadersKeywords.includes(key as (typeof axiosHeadersKeywords)[number]) &&\n        typeof value === 'object'\n      ) {\n        mergedHeaders[key] = {\n          ...(mergedHeaders[key] as Record<any, unknown>),\n          ...value,\n        };\n      } else if (value === null) {\n        delete mergedHeaders[key];\n      } else if (Array.isArray(value)) {\n        for (const v of value) {\n          // @ts-expect-error\n          mergedHeaders[key] = [...(mergedHeaders[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[key] = typeof value === 'object' ? JSON.stringify(value) : (value as string);\n      }\n    }\n  }\n  return mergedHeaders;\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  ...override,\n});\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/preact-query/axios/client.gen.ts",
    "content": "// 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: 'http://localhost:3000/base' }));\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/preact-query/axios/core/auth.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/preact-query/axios/core/bodySerializer.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/preact-query/axios/core/params.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/preact-query/axios/core/pathSerializer.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/preact-query/axios/core/queryKeySerializer.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\n/**\n * JSON-friendly union that mirrors what Pinia Colada can hash.\n */\nexport type JsonValue =\n  | null\n  | string\n  | number\n  | boolean\n  | JsonValue[]\n  | { [key: string]: JsonValue };\n\n/**\n * Replacer that converts non-JSON values (bigint, Date, etc.) to safe substitutes.\n */\nexport const queryKeyJsonReplacer = (_key: string, value: unknown) => {\n  if (value === undefined || typeof value === 'function' || typeof value === 'symbol') {\n    return undefined;\n  }\n  if (typeof value === 'bigint') {\n    return value.toString();\n  }\n  if (value instanceof Date) {\n    return value.toISOString();\n  }\n  return value;\n};\n\n/**\n * Safely stringifies a value and parses it back into a JsonValue.\n */\nexport const stringifyToJsonValue = (input: unknown): JsonValue | undefined => {\n  try {\n    const json = JSON.stringify(input, queryKeyJsonReplacer);\n    if (json === undefined) {\n      return undefined;\n    }\n    return JSON.parse(json) as JsonValue;\n  } catch {\n    return undefined;\n  }\n};\n\n/**\n * Detects plain objects (including objects with a null prototype).\n */\nconst isPlainObject = (value: unknown): value is Record<string, unknown> => {\n  if (value === null || typeof value !== 'object') {\n    return false;\n  }\n  const prototype = Object.getPrototypeOf(value as object);\n  return prototype === Object.prototype || prototype === null;\n};\n\n/**\n * Turns URLSearchParams into a sorted JSON object for deterministic keys.\n */\nconst serializeSearchParams = (params: URLSearchParams): JsonValue => {\n  const entries = Array.from(params.entries()).sort(([a], [b]) => a.localeCompare(b));\n  const result: Record<string, JsonValue> = {};\n\n  for (const [key, value] of entries) {\n    const existing = result[key];\n    if (existing === undefined) {\n      result[key] = value;\n      continue;\n    }\n\n    if (Array.isArray(existing)) {\n      (existing as string[]).push(value);\n    } else {\n      result[key] = [existing, value];\n    }\n  }\n\n  return result;\n};\n\n/**\n * Normalizes any accepted value into a JSON-friendly shape for query keys.\n */\nexport const serializeQueryKeyValue = (value: unknown): JsonValue | undefined => {\n  if (value === null) {\n    return null;\n  }\n\n  if (typeof value === 'string' || typeof value === 'number' || typeof value === 'boolean') {\n    return value;\n  }\n\n  if (value === undefined || typeof value === 'function' || typeof value === 'symbol') {\n    return undefined;\n  }\n\n  if (typeof value === 'bigint') {\n    return value.toString();\n  }\n\n  if (value instanceof Date) {\n    return value.toISOString();\n  }\n\n  if (Array.isArray(value)) {\n    return stringifyToJsonValue(value);\n  }\n\n  if (typeof URLSearchParams !== 'undefined' && value instanceof URLSearchParams) {\n    return serializeSearchParams(value);\n  }\n\n  if (isPlainObject(value)) {\n    return stringifyToJsonValue(value);\n  }\n\n  return undefined;\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/preact-query/axios/core/serverSentEvents.gen.ts",
    "content": "// 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 const 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            // Normalize line endings: CRLF -> LF, then CR -> LF\n            buffer = buffer.replace(/\\r\\n/g, '\\n').replace(/\\r/g, '\\n');\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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/preact-query/axios/core/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { Auth, AuthToken } from './auth.gen';\nimport type { BodySerializer, QuerySerializer, QuerySerializerOptions } from './bodySerializer.gen';\n\nexport type HttpMethod =\n  | 'connect'\n  | 'delete'\n  | 'get'\n  | 'head'\n  | 'options'\n  | 'patch'\n  | 'post'\n  | 'put'\n  | 'trace';\n\nexport type Client<\n  RequestFn = never,\n  Config = unknown,\n  MethodFn = never,\n  BuildUrlFn = never,\n  SseFn = never,\n> = {\n  /**\n   * Returns the final request URL.\n   */\n  buildUrl: BuildUrlFn;\n  getConfig: () => Config;\n  request: RequestFn;\n  setConfig: (config: Config) => Config;\n} & {\n  [K in HttpMethod]: MethodFn;\n} & ([SseFn] extends [never] ? { sse?: never } : { sse: { [K in HttpMethod]: SseFn } });\n\nexport interface Config {\n  /**\n   * Auth token or a function returning auth token. The resolved value will be\n   * added to the request payload as defined by its `security` array.\n   */\n  auth?: ((auth: Auth) => Promise<AuthToken> | AuthToken) | AuthToken;\n  /**\n   * A function for serializing request body parameter. By default,\n   * {@link JSON.stringify()} will be used.\n   */\n  bodySerializer?: BodySerializer | null;\n  /**\n   * An object containing any HTTP headers that you want to pre-populate your\n   * `Headers` object with.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/Headers/Headers#init See more}\n   */\n  headers?:\n    | RequestInit['headers']\n    | Record<\n        string,\n        string | number | boolean | (string | number | boolean)[] | null | undefined | unknown\n      >;\n  /**\n   * The request method.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/fetch#method See more}\n   */\n  method?: Uppercase<HttpMethod>;\n  /**\n   * A function for serializing request query parameters. By default, arrays\n   * will be exploded in form style, objects will be exploded in deepObject\n   * style, and reserved characters are percent-encoded.\n   *\n   * This method will have no effect if the native `paramsSerializer()` Axios\n   * API function is used.\n   *\n   * {@link https://swagger.io/docs/specification/serialization/#query View examples}\n   */\n  querySerializer?: QuerySerializer | QuerySerializerOptions;\n  /**\n   * A function validating request data. This is useful if you want to ensure\n   * the request conforms to the desired shape, so it can be safely sent to\n   * the server.\n   */\n  requestValidator?: (data: unknown) => Promise<unknown>;\n  /**\n   * A function transforming response data before it's returned. This is useful\n   * for post-processing data, e.g. converting ISO strings into Date objects.\n   */\n  responseTransformer?: (data: unknown) => Promise<unknown>;\n  /**\n   * A function validating response data. This is useful if you want to ensure\n   * the response conforms to the desired shape, so it can be safely passed to\n   * the transformers and returned to the user.\n   */\n  responseValidator?: (data: unknown) => Promise<unknown>;\n}\n\ntype IsExactlyNeverOrNeverUndefined<T> = [T] extends [never]\n  ? true\n  : [T] extends [never | undefined]\n    ? [undefined] extends [T]\n      ? false\n      : true\n    : false;\n\nexport type OmitNever<T extends Record<string, unknown>> = {\n  [K in keyof T as IsExactlyNeverOrNeverUndefined<T[K]> extends true ? never : K]: T[K];\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/preact-query/axios/core/utils.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/preact-query/axios/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport { apiVVersionODataControllerCount, callToTestOrderOfParams, callWithDefaultOptionalParameters, callWithDefaultParameters, callWithDescriptions, callWithDuplicateResponses, callWithNoContentResponse, callWithParameters, callWithResponse, callWithResponseAndNoContentResponse, callWithResponses, callWithResultFromHeader, callWithWeirdParameterNames, collectionFormat, complexParams, complexTypes, deleteCallWithoutParametersAndResponse, deleteFoo, deprecatedCall, dummyA, dummyB, duplicateName, duplicateName2, duplicateName3, duplicateName4, export_, fileResponse, fooWow, getApiVbyApiVersionSimpleOperation, getCallWithOptionalParam, getCallWithoutParametersAndResponse, headCallWithoutParametersAndResponse, import_, multipartRequest, multipartResponse, nonAsciiæøåÆøÅöôêÊ字符串, type Options, optionsCallWithoutParametersAndResponse, patchApiVbyApiVersionNoTag, patchCallWithoutParametersAndResponse, postApiVbyApiVersionFormData, postApiVbyApiVersionRequestBody, postCallWithOptionalParam, postCallWithoutParametersAndResponse, putCallWithoutParametersAndResponse, putWithFormUrlEncoded, testErrorCode, types, uploadFile } from './sdk.gen';\nexport type { _3eNum1Период, _400, AdditionalPropertiesIntegerIssue, AdditionalPropertiesUnknownIssue, AdditionalPropertiesUnknownIssue2, AdditionalPropertiesUnknownIssue3, AdditionalPropertiesUnknownIssueWritable, AnyOfAnyAndNull, AnyOfArrays, ApiVVersionODataControllerCountData, ApiVVersionODataControllerCountResponse, ApiVVersionODataControllerCountResponses, ArrayWithAnyOfProperties, ArrayWithArray, ArrayWithBooleans, ArrayWithNumbers, ArrayWithProperties, ArrayWithReferences, ArrayWithStrings, CallToTestOrderOfParamsData, CallWithDefaultOptionalParametersData, CallWithDefaultParametersData, CallWithDescriptionsData, CallWithDuplicateResponsesData, CallWithDuplicateResponsesError, CallWithDuplicateResponsesErrors, CallWithDuplicateResponsesResponse, CallWithDuplicateResponsesResponses, CallWithNoContentResponseData, CallWithNoContentResponseResponse, CallWithNoContentResponseResponses, CallWithParametersData, CallWithResponseAndNoContentResponseData, CallWithResponseAndNoContentResponseResponse, CallWithResponseAndNoContentResponseResponses, CallWithResponseData, CallWithResponseResponse, CallWithResponseResponses, CallWithResponsesData, CallWithResponsesError, CallWithResponsesErrors, CallWithResponsesResponse, CallWithResponsesResponses, CallWithResultFromHeaderData, CallWithResultFromHeaderErrors, CallWithResultFromHeaderResponses, CallWithWeirdParameterNamesData, CamelCaseCommentWithBreaks, CharactersInDescription, ClientOptions, CollectionFormatData, CommentWithBackticks, CommentWithBackticksAndQuotes, CommentWithBreaks, CommentWithExpressionPlaceholders, CommentWithQuotes, CommentWithReservedCharacters, CommentWithSlashes, ComplexParamsData, ComplexParamsResponse, ComplexParamsResponses, ComplexTypesData, ComplexTypesErrors, ComplexTypesResponse, ComplexTypesResponses, CompositionBaseModel, CompositionExtendedModel, CompositionWithAllOfAndNullable, CompositionWithAnyOf, CompositionWithAnyOfAndNullable, CompositionWithAnyOfAnonymous, CompositionWithNestedAnyAndTypeNull, CompositionWithNestedAnyOfAndNull, CompositionWithOneOf, CompositionWithOneOfAndComplexArrayDictionary, CompositionWithOneOfAndNullable, CompositionWithOneOfAndProperties, CompositionWithOneOfAndSimpleArrayDictionary, CompositionWithOneOfAndSimpleDictionary, CompositionWithOneOfAnonymous, CompositionWithOneOfDiscriminator, ConstValue, Default, DeleteCallWithoutParametersAndResponseData, DeleteFooData, DeleteFooData2, DeleteFooData3, DeprecatedCallData, DeprecatedModel, DictionaryWithArray, DictionaryWithDictionary, DictionaryWithProperties, DictionaryWithPropertiesAndAdditionalProperties, DictionaryWithReference, DictionaryWithString, DummyAData, DummyAResponse, DummyAResponses, DummyBData, DummyBResponse, DummyBResponses, DuplicateName2Data, DuplicateName3Data, DuplicateName4Data, DuplicateNameData, EnumFromDescription, EnumWithExtensions, EnumWithNumbers, EnumWithReplacedCharacters, EnumWithStrings, EnumWithXEnumNames, ExportData, ExternalRefA, ExternalRefB, ExternalSharedModel, File, FileResponseData, FileResponseResponse, FileResponseResponses, FileWritable, FooWowData, FooWowResponses, FreeFormObjectWithAdditionalPropertiesEqEmptyObject, FreeFormObjectWithAdditionalPropertiesEqTrue, FreeFormObjectWithoutAdditionalProperties, GenericSchemaDuplicateIssue1SystemBoolean, GenericSchemaDuplicateIssue1SystemBooleanWritable, GenericSchemaDuplicateIssue1SystemString, GenericSchemaDuplicateIssue1SystemStringWritable, GetApiVbyApiVersionSimpleOperationData, GetApiVbyApiVersionSimpleOperationError, GetApiVbyApiVersionSimpleOperationErrors, GetApiVbyApiVersionSimpleOperationResponse, GetApiVbyApiVersionSimpleOperationResponses, GetCallWithOptionalParamData, GetCallWithoutParametersAndResponseData, HeadCallWithoutParametersAndResponseData, Import, ImportData, ImportResponse, ImportResponses, IoK8sApimachineryPkgApisMetaV1DeleteOptions, IoK8sApimachineryPkgApisMetaV1Preconditions, ModelCircle, ModelFromZendesk, ModelSquare, ModelThatExtends, ModelThatExtendsExtends, ModelWithAdditionalPropertiesEqTrue, ModelWithAdditionalPropertiesRef, ModelWithAnyOfConstantSizeArray, ModelWithAnyOfConstantSizeArrayAndIntersect, ModelWithAnyOfConstantSizeArrayNullable, ModelWithAnyOfConstantSizeArrayWithNSizeAndOptions, ModelWithAnyOfConstantSizeArrayWithNSizeAndOptionsWritable, ModelWithArray, ModelWithArrayReadOnlyAndWriteOnly, ModelWithArrayReadOnlyAndWriteOnlyWritable, ModelWithBackticksInDescription, ModelWithBoolean, ModelWithCircularReference, ModelWithConst, ModelWithConstantSizeArray, ModelWithDictionary, ModelWithDuplicateImports, ModelWithDuplicateProperties, ModelWithEnum, ModelWithEnumFromDescription, ModelWithEnumWithHyphen, ModelWithInteger, ModelWithNestedArrayEnums, ModelWithNestedArrayEnumsData, ModelWithNestedArrayEnumsDataBar, ModelWithNestedArrayEnumsDataFoo, ModelWithNestedCompositionEnums, ModelWithNestedEnums, ModelWithNestedProperties, ModelWithNullableObject, ModelWithNullableString, ModelWithNumericEnumUnion, ModelWithOneOfAndProperties, ModelWithOneOfEnum, ModelWithOrderedProperties, ModelWithPattern, ModelWithPatternWritable, ModelWithPrefixItemsConstantSizeArray, ModelWithProperties, ModelWithPropertiesWritable, ModelWithReadOnlyAndWriteOnly, ModelWithReadOnlyAndWriteOnlyWritable, ModelWithReference, ModelWithReferenceWritable, ModelWithString, ModelWithStringError, MultipartRequestData, MultipartResponseData, MultipartResponseResponse, MultipartResponseResponses, NestedAnyOfArraysNullable, NonAsciiæøåÆøÅöôêÊ字符串Data, NonAsciiæøåÆøÅöôêÊ字符串Response, NonAsciiæøåÆøÅöôêÊ字符串Responses, NonAsciiStringæøåÆøÅöôêÊ字符串, NullableObject, OneOfAllOfIssue, OneOfAllOfIssueWritable, OptionsCallWithoutParametersAndResponseData, Pageable, ParameterSimpleParameterUnused, PatchApiVbyApiVersionNoTagData, PatchApiVbyApiVersionNoTagResponses, PatchCallWithoutParametersAndResponseData, PostApiVbyApiVersionFormDataData, PostApiVbyApiVersionRequestBodyData, PostCallWithOptionalParamData, PostCallWithOptionalParamResponse, PostCallWithOptionalParamResponses, PostCallWithoutParametersAndResponseData, PostServiceWithEmptyTagResponse, PostServiceWithEmptyTagResponse2, PutCallWithoutParametersAndResponseData, PutWithFormUrlEncodedData, SchemaWithFormRestrictedKeys, SimpleBoolean, SimpleFile, SimpleFormData, SimpleInteger, SimpleParameter, SimpleReference, SimpleRequestBody, SimpleString, SimpleStringWithPattern, TestErrorCodeData, TestErrorCodeErrors, TestErrorCodeResponses, TypesData, TypesResponse, TypesResponses, UploadFileData, UploadFileResponse, UploadFileResponses, XFooBar } from './types.gen';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/preact-query/axios/sdk.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport { type Client, formDataBodySerializer, type Options as Options2, type TDataShape, urlSearchParamsBodySerializer } from './client';\nimport { client } from './client.gen';\nimport type { ApiVVersionODataControllerCountData, ApiVVersionODataControllerCountResponses, CallToTestOrderOfParamsData, CallWithDefaultOptionalParametersData, CallWithDefaultParametersData, CallWithDescriptionsData, CallWithDuplicateResponsesData, CallWithDuplicateResponsesErrors, CallWithDuplicateResponsesResponses, CallWithNoContentResponseData, CallWithNoContentResponseResponses, CallWithParametersData, CallWithResponseAndNoContentResponseData, CallWithResponseAndNoContentResponseResponses, CallWithResponseData, CallWithResponseResponses, CallWithResponsesData, CallWithResponsesErrors, CallWithResponsesResponses, CallWithResultFromHeaderData, CallWithResultFromHeaderErrors, CallWithResultFromHeaderResponses, CallWithWeirdParameterNamesData, CollectionFormatData, ComplexParamsData, ComplexParamsResponses, ComplexTypesData, ComplexTypesErrors, ComplexTypesResponses, DeleteCallWithoutParametersAndResponseData, DeleteFooData3, DeprecatedCallData, DummyAData, DummyAResponses, DummyBData, DummyBResponses, DuplicateName2Data, DuplicateName3Data, DuplicateName4Data, DuplicateNameData, ExportData, FileResponseData, FileResponseResponses, FooWowData, FooWowResponses, GetApiVbyApiVersionSimpleOperationData, GetApiVbyApiVersionSimpleOperationErrors, GetApiVbyApiVersionSimpleOperationResponses, GetCallWithOptionalParamData, GetCallWithoutParametersAndResponseData, HeadCallWithoutParametersAndResponseData, ImportData, ImportResponses, MultipartRequestData, MultipartResponseData, MultipartResponseResponses, NonAsciiæøåÆøÅöôêÊ字符串Data, NonAsciiæøåÆøÅöôêÊ字符串Responses, OptionsCallWithoutParametersAndResponseData, PatchApiVbyApiVersionNoTagData, PatchApiVbyApiVersionNoTagResponses, PatchCallWithoutParametersAndResponseData, PostApiVbyApiVersionFormDataData, PostApiVbyApiVersionRequestBodyData, PostCallWithOptionalParamData, PostCallWithOptionalParamResponses, PostCallWithoutParametersAndResponseData, PutCallWithoutParametersAndResponseData, PutWithFormUrlEncodedData, TestErrorCodeData, TestErrorCodeErrors, TestErrorCodeResponses, TypesData, TypesResponses, UploadFileData, UploadFileResponses } from './types.gen';\n\nexport type Options<TData extends TDataShape = TDataShape, ThrowOnError extends boolean = boolean> = Options2<TData, ThrowOnError> & {\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\nexport const export_ = <ThrowOnError extends boolean = false>(options?: Options<ExportData, ThrowOnError>) => (options?.client ?? client).get<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/no+tag', ...options });\n\nexport const patchApiVbyApiVersionNoTag = <ThrowOnError extends boolean = false>(options?: Options<PatchApiVbyApiVersionNoTagData, ThrowOnError>) => (options?.client ?? client).patch<PatchApiVbyApiVersionNoTagResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/no+tag', ...options });\n\nexport const import_ = <ThrowOnError extends boolean = false>(options: Options<ImportData, ThrowOnError>) => (options.client ?? client).post<ImportResponses, unknown, ThrowOnError>({\n    responseType: 'json',\n    url: '/api/v{api-version}/no+tag',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options.headers\n    }\n});\n\nexport const fooWow = <ThrowOnError extends boolean = false>(options?: Options<FooWowData, ThrowOnError>) => (options?.client ?? client).put<FooWowResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/no+tag', ...options });\n\nexport const apiVVersionODataControllerCount = <ThrowOnError extends boolean = false>(options?: Options<ApiVVersionODataControllerCountData, ThrowOnError>) => (options?.client ?? client).get<ApiVVersionODataControllerCountResponses, unknown, ThrowOnError>({\n    responseType: 'json',\n    url: '/api/v{api-version}/simple/$count',\n    ...options\n});\n\nexport const getApiVbyApiVersionSimpleOperation = <ThrowOnError extends boolean = false>(options: Options<GetApiVbyApiVersionSimpleOperationData, ThrowOnError>) => (options.client ?? client).get<GetApiVbyApiVersionSimpleOperationResponses, GetApiVbyApiVersionSimpleOperationErrors, ThrowOnError>({\n    responseType: 'json',\n    url: '/api/v{api-version}/simple:operation',\n    ...options\n});\n\nexport const deleteCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<DeleteCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).delete<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const getCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<GetCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).get<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const headCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<HeadCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).head<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const optionsCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<OptionsCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).options<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const patchCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<PatchCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).patch<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const postCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<PostCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).post<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const putCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<PutCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).put<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const deleteFoo = <ThrowOnError extends boolean = false>(options: Options<DeleteFooData3, ThrowOnError>) => (options.client ?? client).delete<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/foo/{foo_param}/bar/{BarParam}', ...options });\n\nexport const callWithDescriptions = <ThrowOnError extends boolean = false>(options?: Options<CallWithDescriptionsData, ThrowOnError>) => (options?.client ?? client).post<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/descriptions', ...options });\n\n/**\n * @deprecated\n */\nexport const deprecatedCall = <ThrowOnError extends boolean = false>(options: Options<DeprecatedCallData, ThrowOnError>) => (options.client ?? client).post<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/parameters/deprecated', ...options });\n\nexport const callWithParameters = <ThrowOnError extends boolean = false>(options: Options<CallWithParametersData, ThrowOnError>) => (options.client ?? client).post<unknown, unknown, ThrowOnError>({\n    url: '/api/v{api-version}/parameters/{parameterPath}',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options.headers\n    }\n});\n\nexport const callWithWeirdParameterNames = <ThrowOnError extends boolean = false>(options: Options<CallWithWeirdParameterNamesData, ThrowOnError>) => (options.client ?? client).post<unknown, unknown, ThrowOnError>({\n    url: '/api/v{api-version}/parameters/{parameter.path.1}/{parameter-path-2}/{PARAMETER-PATH-3}',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options.headers\n    }\n});\n\nexport const getCallWithOptionalParam = <ThrowOnError extends boolean = false>(options: Options<GetCallWithOptionalParamData, ThrowOnError>) => (options.client ?? client).get<unknown, unknown, ThrowOnError>({\n    url: '/api/v{api-version}/parameters',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options.headers\n    }\n});\n\nexport const postCallWithOptionalParam = <ThrowOnError extends boolean = false>(options: Options<PostCallWithOptionalParamData, ThrowOnError>) => (options.client ?? client).post<PostCallWithOptionalParamResponses, unknown, ThrowOnError>({\n    responseType: 'json',\n    url: '/api/v{api-version}/parameters',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options.headers\n    }\n});\n\nexport const postApiVbyApiVersionRequestBody = <ThrowOnError extends boolean = false>(options?: Options<PostApiVbyApiVersionRequestBodyData, ThrowOnError>) => (options?.client ?? client).post<unknown, unknown, ThrowOnError>({\n    url: '/api/v{api-version}/requestBody',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options?.headers\n    }\n});\n\nexport const postApiVbyApiVersionFormData = <ThrowOnError extends boolean = false>(options?: Options<PostApiVbyApiVersionFormDataData, ThrowOnError>) => (options?.client ?? client).post<unknown, unknown, ThrowOnError>({\n    ...formDataBodySerializer,\n    url: '/api/v{api-version}/formData',\n    ...options,\n    headers: {\n        'Content-Type': null,\n        ...options?.headers\n    }\n});\n\nexport const callWithDefaultParameters = <ThrowOnError extends boolean = false>(options?: Options<CallWithDefaultParametersData, ThrowOnError>) => (options?.client ?? client).get<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/defaults', ...options });\n\nexport const callWithDefaultOptionalParameters = <ThrowOnError extends boolean = false>(options?: Options<CallWithDefaultOptionalParametersData, ThrowOnError>) => (options?.client ?? client).post<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/defaults', ...options });\n\nexport const callToTestOrderOfParams = <ThrowOnError extends boolean = false>(options: Options<CallToTestOrderOfParamsData, ThrowOnError>) => (options.client ?? client).put<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/defaults', ...options });\n\nexport const duplicateName = <ThrowOnError extends boolean = false>(options?: Options<DuplicateNameData, ThrowOnError>) => (options?.client ?? client).delete<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/duplicate', ...options });\n\nexport const duplicateName2 = <ThrowOnError extends boolean = false>(options?: Options<DuplicateName2Data, ThrowOnError>) => (options?.client ?? client).get<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/duplicate', ...options });\n\nexport const duplicateName3 = <ThrowOnError extends boolean = false>(options?: Options<DuplicateName3Data, ThrowOnError>) => (options?.client ?? client).post<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/duplicate', ...options });\n\nexport const duplicateName4 = <ThrowOnError extends boolean = false>(options?: Options<DuplicateName4Data, ThrowOnError>) => (options?.client ?? client).put<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/duplicate', ...options });\n\nexport const callWithNoContentResponse = <ThrowOnError extends boolean = false>(options?: Options<CallWithNoContentResponseData, ThrowOnError>) => (options?.client ?? client).get<CallWithNoContentResponseResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/no-content', ...options });\n\nexport const callWithResponseAndNoContentResponse = <ThrowOnError extends boolean = false>(options?: Options<CallWithResponseAndNoContentResponseData, ThrowOnError>) => (options?.client ?? client).get<CallWithResponseAndNoContentResponseResponses, unknown, ThrowOnError>({\n    responseType: 'json',\n    url: '/api/v{api-version}/multiple-tags/response-and-no-content',\n    ...options\n});\n\nexport const dummyA = <ThrowOnError extends boolean = false>(options?: Options<DummyAData, ThrowOnError>) => (options?.client ?? client).get<DummyAResponses, unknown, ThrowOnError>({\n    responseType: 'json',\n    url: '/api/v{api-version}/multiple-tags/a',\n    ...options\n});\n\nexport const dummyB = <ThrowOnError extends boolean = false>(options?: Options<DummyBData, ThrowOnError>) => (options?.client ?? client).get<DummyBResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/multiple-tags/b', ...options });\n\nexport const callWithResponse = <ThrowOnError extends boolean = false>(options?: Options<CallWithResponseData, ThrowOnError>) => (options?.client ?? client).get<CallWithResponseResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/response', ...options });\n\nexport const callWithDuplicateResponses = <ThrowOnError extends boolean = false>(options?: Options<CallWithDuplicateResponsesData, ThrowOnError>) => (options?.client ?? client).post<CallWithDuplicateResponsesResponses, CallWithDuplicateResponsesErrors, ThrowOnError>({\n    responseType: 'json',\n    url: '/api/v{api-version}/response',\n    ...options\n});\n\nexport const callWithResponses = <ThrowOnError extends boolean = false>(options?: Options<CallWithResponsesData, ThrowOnError>) => (options?.client ?? client).put<CallWithResponsesResponses, CallWithResponsesErrors, ThrowOnError>({\n    responseType: 'json',\n    url: '/api/v{api-version}/response',\n    ...options\n});\n\nexport const collectionFormat = <ThrowOnError extends boolean = false>(options: Options<CollectionFormatData, ThrowOnError>) => (options.client ?? client).get<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/collectionFormat', ...options });\n\nexport const types = <ThrowOnError extends boolean = false>(options: Options<TypesData, ThrowOnError>) => (options.client ?? client).get<TypesResponses, unknown, ThrowOnError>({\n    responseType: 'json',\n    url: '/api/v{api-version}/types',\n    ...options\n});\n\nexport const uploadFile = <ThrowOnError extends boolean = false>(options: Options<UploadFileData, ThrowOnError>) => (options.client ?? client).post<UploadFileResponses, unknown, ThrowOnError>({\n    ...urlSearchParamsBodySerializer,\n    responseType: 'json',\n    url: '/api/v{api-version}/upload',\n    ...options,\n    headers: {\n        'Content-Type': 'application/x-www-form-urlencoded',\n        ...options.headers\n    }\n});\n\nexport const fileResponse = <ThrowOnError extends boolean = false>(options: Options<FileResponseData, ThrowOnError>) => (options.client ?? client).get<FileResponseResponses, unknown, ThrowOnError>({\n    responseType: 'blob',\n    url: '/api/v{api-version}/file/{id}',\n    ...options\n});\n\nexport const complexTypes = <ThrowOnError extends boolean = false>(options: Options<ComplexTypesData, ThrowOnError>) => (options.client ?? client).get<ComplexTypesResponses, ComplexTypesErrors, ThrowOnError>({\n    querySerializer: { parameters: { parameterObject: { object: { style: 'form' } } } },\n    responseType: 'json',\n    url: '/api/v{api-version}/complex',\n    ...options\n});\n\nexport const multipartResponse = <ThrowOnError extends boolean = false>(options?: Options<MultipartResponseData, ThrowOnError>) => (options?.client ?? client).get<MultipartResponseResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/multipart', ...options });\n\nexport const multipartRequest = <ThrowOnError extends boolean = false>(options?: Options<MultipartRequestData, ThrowOnError>) => (options?.client ?? client).post<unknown, unknown, ThrowOnError>({\n    ...formDataBodySerializer,\n    url: '/api/v{api-version}/multipart',\n    ...options,\n    headers: {\n        'Content-Type': null,\n        ...options?.headers\n    }\n});\n\nexport const complexParams = <ThrowOnError extends boolean = false>(options: Options<ComplexParamsData, ThrowOnError>) => (options.client ?? client).put<ComplexParamsResponses, unknown, ThrowOnError>({\n    responseType: 'json',\n    url: '/api/v{api-version}/complex/{id}',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json-patch+json',\n        ...options.headers\n    }\n});\n\nexport const callWithResultFromHeader = <ThrowOnError extends boolean = false>(options?: Options<CallWithResultFromHeaderData, ThrowOnError>) => (options?.client ?? client).post<CallWithResultFromHeaderResponses, CallWithResultFromHeaderErrors, ThrowOnError>({ url: '/api/v{api-version}/header', ...options });\n\nexport const testErrorCode = <ThrowOnError extends boolean = false>(options: Options<TestErrorCodeData, ThrowOnError>) => (options.client ?? client).post<TestErrorCodeResponses, TestErrorCodeErrors, ThrowOnError>({ url: '/api/v{api-version}/error', ...options });\n\nexport const nonAsciiæøåÆøÅöôêÊ字符串 = <ThrowOnError extends boolean = false>(options: Options<NonAsciiæøåÆøÅöôêÊ字符串Data, ThrowOnError>) => (options.client ?? client).post<NonAsciiæøåÆøÅöôêÊ字符串Responses, unknown, ThrowOnError>({\n    responseType: 'json',\n    url: '/api/v{api-version}/non-ascii-æøåÆØÅöôêÊ字符串',\n    ...options\n});\n\n/**\n * Login User\n */\nexport const putWithFormUrlEncoded = <ThrowOnError extends boolean = false>(options: Options<PutWithFormUrlEncodedData, ThrowOnError>) => (options.client ?? client).put<unknown, unknown, ThrowOnError>({\n    ...urlSearchParamsBodySerializer,\n    url: '/api/v{api-version}/non-ascii-æøåÆØÅöôêÊ字符串',\n    ...options,\n    headers: {\n        'Content-Type': 'application/x-www-form-urlencoded',\n        ...options.headers\n    }\n});\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/preact-query/axios/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type ClientOptions = {\n    baseURL: 'http://localhost:3000/base' | (string & {});\n};\n\n/**\n * Model with number-only name\n */\nexport type _400 = string;\n\nexport type ExternalRefA = ExternalSharedModel;\n\nexport type ExternalRefB = ExternalSharedModel;\n\n/**\n * Testing multiline comments in string: First line\n * Second line\n *\n * Fourth line\n */\nexport type CamelCaseCommentWithBreaks = number;\n\n/**\n * Testing multiline comments in string: First line\n * Second line\n *\n * Fourth line\n */\nexport type CommentWithBreaks = number;\n\n/**\n * Testing backticks in string: `backticks` and ```multiple backticks``` should work\n */\nexport type CommentWithBackticks = number;\n\n/**\n * Testing backticks and quotes in string: `backticks`, 'quotes', \"double quotes\" and ```multiple backticks``` should work\n */\nexport type CommentWithBackticksAndQuotes = number;\n\n/**\n * Testing slashes in string: \\backwards\\\\\\ and /forwards/// should work\n */\nexport type CommentWithSlashes = number;\n\n/**\n * Testing expression placeholders in string: ${expression} should work\n */\nexport type CommentWithExpressionPlaceholders = number;\n\n/**\n * Testing quotes in string: 'single quote''' and \"double quotes\"\"\" should work\n */\nexport type CommentWithQuotes = number;\n\n/**\n * Testing reserved characters in string: * inline * and ** inline ** should work\n */\nexport type CommentWithReservedCharacters = number;\n\n/**\n * This is a simple number\n */\nexport type SimpleInteger = number;\n\n/**\n * This is a simple boolean\n */\nexport type SimpleBoolean = boolean;\n\n/**\n * This is a simple string\n */\nexport type SimpleString = string;\n\n/**\n * A string with non-ascii (unicode) characters valid in typescript identifiers (æøåÆØÅöÔèÈ字符串)\n */\nexport type NonAsciiStringæøåÆøÅöôêÊ字符串 = string;\n\n/**\n * This is a simple file\n */\nexport type SimpleFile = Blob | File;\n\n/**\n * This is a simple reference\n */\nexport type SimpleReference = ModelWithString;\n\n/**\n * This is a simple string\n */\nexport type SimpleStringWithPattern = string | null;\n\n/**\n * This is a simple enum with strings\n */\nexport type EnumWithStrings = 'Success' | 'Warning' | 'Error' | '\\'Single Quote\\'' | '\"Double Quotes\"' | 'Non-ascii: øæåôöØÆÅÔÖ字符串';\n\nexport type EnumWithReplacedCharacters = '\\'Single Quote\\'' | '\"Double Quotes\"' | 'øæåôöØÆÅÔÖ字符串' | 3.1 | '';\n\n/**\n * This is a simple enum with numbers\n */\nexport type EnumWithNumbers = 1 | 2 | 3 | 1.1 | 1.2 | 1.3 | 100 | 200 | 300 | -100 | -200 | -300 | -1.1 | -1.2 | -1.3;\n\n/**\n * Success=1,Warning=2,Error=3\n */\nexport type EnumFromDescription = number;\n\n/**\n * This is a simple enum with numbers\n */\nexport type EnumWithExtensions = 200 | 400 | 500;\n\nexport type EnumWithXEnumNames = 0 | 1 | 2;\n\n/**\n * This is a simple array with numbers\n */\nexport type ArrayWithNumbers = Array<number>;\n\n/**\n * This is a simple array with booleans\n */\nexport type ArrayWithBooleans = Array<boolean>;\n\n/**\n * This is a simple array with strings\n */\nexport type ArrayWithStrings = Array<string>;\n\n/**\n * This is a simple array with references\n */\nexport type ArrayWithReferences = Array<ModelWithString>;\n\n/**\n * This is a simple array containing an array\n */\nexport type ArrayWithArray = Array<Array<ModelWithString>>;\n\n/**\n * This is a simple array with properties\n */\nexport type ArrayWithProperties = Array<{\n    '16x16'?: CamelCaseCommentWithBreaks;\n    bar?: string;\n}>;\n\n/**\n * This is a simple array with any of properties\n */\nexport type ArrayWithAnyOfProperties = Array<{\n    foo?: string;\n} | {\n    bar?: string;\n}>;\n\nexport type AnyOfAnyAndNull = {\n    data?: unknown;\n};\n\n/**\n * This is a simple array with any of properties\n */\nexport type AnyOfArrays = {\n    results?: Array<{\n        foo?: string;\n    } | {\n        bar?: string;\n    }>;\n};\n\n/**\n * This is a string dictionary\n */\nexport type DictionaryWithString = {\n    [key: string]: string;\n};\n\nexport type DictionaryWithPropertiesAndAdditionalProperties = {\n    foo?: number;\n    bar?: boolean;\n    [key: string]: string | number | boolean | undefined;\n};\n\n/**\n * This is a string reference\n */\nexport type DictionaryWithReference = {\n    [key: string]: ModelWithString;\n};\n\n/**\n * This is a complex dictionary\n */\nexport type DictionaryWithArray = {\n    [key: string]: Array<ModelWithString>;\n};\n\n/**\n * This is a string dictionary\n */\nexport type DictionaryWithDictionary = {\n    [key: string]: {\n        [key: string]: string;\n    };\n};\n\n/**\n * This is a complex dictionary\n */\nexport type DictionaryWithProperties = {\n    [key: string]: {\n        foo?: string;\n        bar?: string;\n    };\n};\n\n/**\n * This is a model with one number property\n */\nexport type ModelWithInteger = {\n    /**\n     * This is a simple number property\n     */\n    prop?: number;\n};\n\n/**\n * This is a model with one boolean property\n */\nexport type ModelWithBoolean = {\n    /**\n     * This is a simple boolean property\n     */\n    prop?: boolean;\n};\n\n/**\n * This is a model with one string property\n */\nexport type ModelWithString = {\n    /**\n     * This is a simple string property\n     */\n    prop?: string;\n};\n\n/**\n * This is a model with one string property\n */\nexport type ModelWithStringError = {\n    /**\n     * This is a simple string property\n     */\n    prop?: string;\n};\n\n/**\n * `Comment` or `VoiceComment`. The JSON object for adding voice comments to tickets is different. See [Adding voice comments to tickets](/documentation/ticketing/managing-tickets/adding-voice-comments-to-tickets)\n */\nexport type ModelFromZendesk = string;\n\n/**\n * This is a model with one string property\n */\nexport type ModelWithNullableString = {\n    /**\n     * This is a simple string property\n     */\n    nullableProp1?: string | null;\n    /**\n     * This is a simple string property\n     */\n    nullableRequiredProp1: string | null;\n    /**\n     * This is a simple string property\n     */\n    nullableProp2?: string | null;\n    /**\n     * This is a simple string property\n     */\n    nullableRequiredProp2: string | null;\n    /**\n     * This is a simple enum with strings\n     */\n    'foo_bar-enum'?: 'Success' | 'Warning' | 'Error' | 'ØÆÅ字符串';\n};\n\n/**\n * This is a model with one enum\n */\nexport type ModelWithEnum = {\n    /**\n     * This is a simple enum with strings\n     */\n    'foo_bar-enum'?: 'Success' | 'Warning' | 'Error' | 'ØÆÅ字符串';\n    /**\n     * These are the HTTP error code enums\n     */\n    statusCode?: '100' | '200 FOO' | '300 FOO_BAR' | '400 foo-bar' | '500 foo.bar' | '600 foo&bar';\n    /**\n     * Simple boolean enum\n     */\n    bool?: true;\n};\n\n/**\n * This is a model with one enum with escaped name\n */\nexport type ModelWithEnumWithHyphen = {\n    /**\n     * Foo-Bar-Baz-Qux\n     */\n    'foo-bar-baz-qux'?: '3.0';\n};\n\n/**\n * This is a model with one enum\n */\nexport type ModelWithEnumFromDescription = {\n    /**\n     * Success=1,Warning=2,Error=3\n     */\n    test?: number;\n};\n\n/**\n * This is a model with nested enums\n */\nexport type ModelWithNestedEnums = {\n    dictionaryWithEnum?: {\n        [key: string]: 'Success' | 'Warning' | 'Error';\n    };\n    dictionaryWithEnumFromDescription?: {\n        [key: string]: number;\n    };\n    arrayWithEnum?: Array<'Success' | 'Warning' | 'Error'>;\n    arrayWithDescription?: Array<number>;\n    /**\n     * This is a simple enum with strings\n     */\n    'foo_bar-enum'?: 'Success' | 'Warning' | 'Error' | 'ØÆÅ字符串';\n};\n\n/**\n * This is a model with one property containing a reference\n */\nexport type ModelWithReference = {\n    prop?: ModelWithProperties;\n};\n\n/**\n * This is a model with one property containing an array\n */\nexport type ModelWithArrayReadOnlyAndWriteOnly = {\n    prop?: Array<ModelWithReadOnlyAndWriteOnly>;\n    propWithFile?: Array<Blob | File>;\n    propWithNumber?: Array<number>;\n};\n\n/**\n * This is a model with one property containing an array\n */\nexport type ModelWithArray = {\n    prop?: Array<ModelWithString>;\n    propWithFile?: Array<Blob | File>;\n    propWithNumber?: Array<number>;\n};\n\n/**\n * This is a model with one property containing a dictionary\n */\nexport type ModelWithDictionary = {\n    prop?: {\n        [key: string]: string;\n    };\n};\n\n/**\n * This is a deprecated model with a deprecated property\n *\n * @deprecated\n */\nexport type DeprecatedModel = {\n    /**\n     * This is a deprecated property\n     *\n     * @deprecated\n     */\n    prop?: string;\n};\n\n/**\n * This is a model with one property containing a circular reference\n */\nexport type ModelWithCircularReference = {\n    prop?: ModelWithCircularReference;\n};\n\n/**\n * This is a model with one property with a 'one of' relationship\n */\nexport type CompositionWithOneOf = {\n    propA?: ModelWithString | ModelWithEnum | ModelWithArray | ModelWithDictionary;\n};\n\n/**\n * This is a model with one property with a 'one of' relationship where the options are not $ref\n */\nexport type CompositionWithOneOfAnonymous = {\n    propA?: {\n        propA?: string;\n    } | string | number;\n};\n\n/**\n * Circle\n */\nexport type ModelCircle = {\n    kind: string;\n    radius?: number;\n};\n\n/**\n * Square\n */\nexport type ModelSquare = {\n    kind: string;\n    sideLength?: number;\n};\n\n/**\n * This is a model with one property with a 'one of' relationship where the options are not $ref\n */\nexport type CompositionWithOneOfDiscriminator = ({\n    kind: 'circle';\n} & ModelCircle) | ({\n    kind: 'square';\n} & ModelSquare);\n\n/**\n * This is a model with one property with a 'any of' relationship\n */\nexport type CompositionWithAnyOf = {\n    propA?: ModelWithString | ModelWithEnum | ModelWithArray | ModelWithDictionary;\n};\n\n/**\n * This is a model with one property with a 'any of' relationship where the options are not $ref\n */\nexport type CompositionWithAnyOfAnonymous = {\n    propA?: {\n        propA?: string;\n    } | string | number;\n};\n\n/**\n * This is a model with nested 'any of' property with a type null\n */\nexport type CompositionWithNestedAnyAndTypeNull = {\n    propA?: Array<ModelWithDictionary | null> | Array<ModelWithArray | null>;\n};\n\nexport type _3eNum1Период = 'Bird' | 'Dog';\n\nexport type ConstValue = 'ConstValue';\n\n/**\n * This is a model with one property with a 'any of' relationship where the options are not $ref\n */\nexport type CompositionWithNestedAnyOfAndNull = {\n    propA?: Array<_3eNum1Период | ConstValue> | null;\n};\n\n/**\n * This is a model with one property with a 'one of' relationship\n */\nexport type CompositionWithOneOfAndNullable = {\n    propA?: {\n        boolean?: boolean;\n    } | ModelWithEnum | ModelWithArray | ModelWithDictionary | null;\n};\n\n/**\n * This is a model that contains a simple dictionary within composition\n */\nexport type CompositionWithOneOfAndSimpleDictionary = {\n    propA?: boolean | {\n        [key: string]: number;\n    };\n};\n\n/**\n * This is a model that contains a dictionary of simple arrays within composition\n */\nexport type CompositionWithOneOfAndSimpleArrayDictionary = {\n    propA?: boolean | {\n        [key: string]: Array<boolean>;\n    };\n};\n\n/**\n * This is a model that contains a dictionary of complex arrays (composited) within composition\n */\nexport type CompositionWithOneOfAndComplexArrayDictionary = {\n    propA?: boolean | {\n        [key: string]: Array<number | string>;\n    };\n};\n\n/**\n * This is a model with one property with a 'all of' relationship\n */\nexport type CompositionWithAllOfAndNullable = {\n    propA?: ({\n        boolean?: boolean;\n    } & ModelWithEnum & ModelWithArray & ModelWithDictionary) | null;\n};\n\n/**\n * This is a model with one property with a 'any of' relationship\n */\nexport type CompositionWithAnyOfAndNullable = {\n    propA?: {\n        boolean?: boolean;\n    } | ModelWithEnum | ModelWithArray | ModelWithDictionary | null;\n};\n\n/**\n * This is a base model with two simple optional properties\n */\nexport type CompositionBaseModel = {\n    firstName?: string;\n    lastname?: string;\n};\n\n/**\n * This is a model that extends the base model\n */\nexport type CompositionExtendedModel = CompositionBaseModel & {\n    age: number;\n    firstName: string;\n    lastname: string;\n};\n\n/**\n * This is a model with one nested property\n */\nexport type ModelWithProperties = {\n    required: string;\n    readonly requiredAndReadOnly: string;\n    requiredAndNullable: string | null;\n    string?: string;\n    number?: number;\n    boolean?: boolean;\n    reference?: ModelWithString;\n    'property with space'?: string;\n    default?: string;\n    try?: string;\n    readonly '@namespace.string'?: string;\n    readonly '@namespace.integer'?: number;\n};\n\n/**\n * This is a model with one nested property\n */\nexport type ModelWithNestedProperties = {\n    readonly first: {\n        readonly second: {\n            readonly third: string | null;\n        } | null;\n    } | null;\n};\n\n/**\n * This is a model with duplicated properties\n */\nexport type ModelWithDuplicateProperties = {\n    prop?: ModelWithString;\n};\n\n/**\n * This is a model with ordered properties\n */\nexport type ModelWithOrderedProperties = {\n    zebra?: string;\n    apple?: string;\n    hawaii?: string;\n};\n\n/**\n * This is a model with duplicated imports\n */\nexport type ModelWithDuplicateImports = {\n    propA?: ModelWithString;\n    propB?: ModelWithString;\n    propC?: ModelWithString;\n};\n\n/**\n * This is a model that extends another model\n */\nexport type ModelThatExtends = ModelWithString & {\n    propExtendsA?: string;\n    propExtendsB?: ModelWithString;\n};\n\n/**\n * This is a model that extends another model\n */\nexport type ModelThatExtendsExtends = ModelWithString & ModelThatExtends & {\n    propExtendsC?: string;\n    propExtendsD?: ModelWithString;\n};\n\n/**\n * This is a model that contains a some patterns\n */\nexport type ModelWithPattern = {\n    key: string;\n    name: string;\n    readonly enabled?: boolean;\n    readonly modified?: string;\n    id?: string;\n    text?: string;\n    patternWithSingleQuotes?: string;\n    patternWithNewline?: string;\n    patternWithBacktick?: string;\n    patternWithUnicode?: string;\n};\n\nexport type File = {\n    /**\n     * Id\n     */\n    readonly id?: string;\n    /**\n     * Updated at\n     */\n    readonly updated_at?: string;\n    /**\n     * Created at\n     */\n    readonly created_at?: string;\n    /**\n     * Mime\n     */\n    mime: string;\n    /**\n     * File\n     */\n    readonly file?: string;\n};\n\nexport type Default = {\n    name?: string;\n};\n\nexport type Pageable = {\n    page?: number;\n    size?: number;\n    sort?: Array<string>;\n};\n\n/**\n * This is a free-form object without additionalProperties.\n */\nexport type FreeFormObjectWithoutAdditionalProperties = {\n    [key: string]: unknown;\n};\n\n/**\n * This is a free-form object with additionalProperties: true.\n */\nexport type FreeFormObjectWithAdditionalPropertiesEqTrue = {\n    [key: string]: unknown;\n};\n\n/**\n * This is a free-form object with additionalProperties: {}.\n */\nexport type FreeFormObjectWithAdditionalPropertiesEqEmptyObject = {\n    [key: string]: unknown;\n};\n\nexport type ModelWithConst = {\n    String?: 'String';\n    number?: 0;\n    null?: unknown;\n    withType?: 'Some string';\n};\n\n/**\n * This is a model with one property and additionalProperties: true\n */\nexport type ModelWithAdditionalPropertiesEqTrue = {\n    /**\n     * This is a simple string property\n     */\n    prop?: string;\n    [key: string]: unknown;\n};\n\nexport type NestedAnyOfArraysNullable = {\n    nullableArray?: Array<string | boolean> | null;\n};\n\nexport type CompositionWithOneOfAndProperties = ({\n    foo: SimpleParameter;\n} | {\n    bar: NonAsciiStringæøåÆøÅöôêÊ字符串;\n}) & {\n    baz: number | null;\n    qux: number;\n};\n\n/**\n * An object that can be null\n */\nexport type NullableObject = {\n    foo?: string;\n} | null;\n\n/**\n * Some % character\n */\nexport type CharactersInDescription = string;\n\nexport type ModelWithNullableObject = {\n    data?: NullableObject;\n};\n\n/**\n * An object with additional properties that can be null\n */\nexport type ModelWithAdditionalPropertiesRef = {\n    [key: string]: NullableObject | null;\n};\n\nexport type ModelWithOneOfEnum = {\n    foo: 'Bar';\n} | {\n    foo: 'Baz';\n} | {\n    foo: 'Qux';\n} | {\n    content: string;\n    foo: 'Quux';\n} | {\n    content: [\n        string,\n        string\n    ];\n    foo: 'Corge';\n};\n\nexport type ModelWithNestedArrayEnumsDataFoo = 'foo' | 'bar';\n\nexport type ModelWithNestedArrayEnumsDataBar = 'baz' | 'qux';\n\nexport type ModelWithNestedArrayEnumsData = {\n    foo?: Array<ModelWithNestedArrayEnumsDataFoo>;\n    bar?: Array<ModelWithNestedArrayEnumsDataBar>;\n};\n\nexport type ModelWithNestedArrayEnums = {\n    array_strings?: Array<string>;\n    data?: ModelWithNestedArrayEnumsData;\n};\n\nexport type ModelWithNestedCompositionEnums = {\n    foo?: ModelWithNestedArrayEnumsDataFoo;\n};\n\nexport type ModelWithReadOnlyAndWriteOnly = {\n    foo: string;\n    readonly bar: string;\n};\n\nexport type ModelWithConstantSizeArray = [\n    number,\n    number\n];\n\nexport type ModelWithAnyOfConstantSizeArray = [\n    number | string,\n    number | string,\n    number | string\n];\n\nexport type ModelWithPrefixItemsConstantSizeArray = Array<ModelWithInteger | number | string>;\n\nexport type ModelWithAnyOfConstantSizeArrayNullable = [\n    number | null | string,\n    number | null | string,\n    number | null | string\n];\n\nexport type ModelWithAnyOfConstantSizeArrayWithNSizeAndOptions = [\n    number | Import,\n    number | Import\n];\n\nexport type ModelWithAnyOfConstantSizeArrayAndIntersect = [\n    number & string,\n    number & string\n];\n\nexport type ModelWithNumericEnumUnion = {\n    /**\n     * Период\n     */\n    value?: -10 | -1 | 0 | 1 | 3 | 6 | 12;\n};\n\n/**\n * Some description with `back ticks`\n */\nexport type ModelWithBackticksInDescription = {\n    /**\n     * The template `that` should be used for parsing and importing the contents of the CSV file.\n     *\n     * <br/><p>There is one placeholder currently supported:<ul>     <li><b>${x}</b> - refers to the n-th column in the CSV file, e.g. ${1}, ${2}, ...)</li></ul><p>Example of a correct JSON template:</p>\n     * <pre>\n     * [\n     * {\n     * \"resourceType\": \"Asset\",\n     * \"identifier\": {\n     * \"name\": \"${1}\",\n     * \"domain\": {\n     * \"name\": \"${2}\",\n     * \"community\": {\n     * \"name\": \"Some Community\"\n     * }\n     * }\n     * },\n     * \"attributes\" : {\n     * \"00000000-0000-0000-0000-000000003115\" : [ {\n     * \"value\" : \"${3}\"\n     * } ],\n     * \"00000000-0000-0000-0000-000000000222\" : [ {\n     * \"value\" : \"${4}\"\n     * } ]\n     * }\n     * }\n     * ]\n     * </pre>\n     */\n    template?: string;\n};\n\nexport type ModelWithOneOfAndProperties = (SimpleParameter | NonAsciiStringæøåÆøÅöôêÊ字符串) & {\n    baz: number | null;\n    qux: number;\n};\n\n/**\n * Model used to test deduplication strategy (unused)\n */\nexport type ParameterSimpleParameterUnused = string;\n\n/**\n * Model used to test deduplication strategy\n */\nexport type PostServiceWithEmptyTagResponse = string;\n\n/**\n * Model used to test deduplication strategy\n */\nexport type PostServiceWithEmptyTagResponse2 = string;\n\n/**\n * Model used to test deduplication strategy\n */\nexport type DeleteFooData = string;\n\n/**\n * Model used to test deduplication strategy\n */\nexport type DeleteFooData2 = string;\n\n/**\n * Model with restricted keyword name\n */\nexport type Import = string;\n\nexport type SchemaWithFormRestrictedKeys = {\n    description?: string;\n    'x-enum-descriptions'?: string;\n    'x-enum-varnames'?: string;\n    'x-enumNames'?: string;\n    title?: string;\n    object?: {\n        description?: string;\n        'x-enum-descriptions'?: string;\n        'x-enum-varnames'?: string;\n        'x-enumNames'?: string;\n        title?: string;\n    };\n    array?: Array<{\n        description?: string;\n        'x-enum-descriptions'?: string;\n        'x-enum-varnames'?: string;\n        'x-enumNames'?: string;\n        title?: string;\n    }>;\n};\n\n/**\n * This schema was giving PascalCase transformations a hard time\n */\nexport type IoK8sApimachineryPkgApisMetaV1DeleteOptions = {\n    /**\n     * Must be fulfilled before a deletion is carried out. If not possible, a 409 Conflict status will be returned.\n     */\n    preconditions?: IoK8sApimachineryPkgApisMetaV1Preconditions;\n};\n\n/**\n * This schema was giving PascalCase transformations a hard time\n */\nexport type IoK8sApimachineryPkgApisMetaV1Preconditions = {\n    /**\n     * Specifies the target ResourceVersion\n     */\n    resourceVersion?: string;\n    /**\n     * Specifies the target UID.\n     */\n    uid?: string;\n};\n\nexport type AdditionalPropertiesUnknownIssue = {\n    [key: string]: string | number;\n};\n\nexport type AdditionalPropertiesUnknownIssue2 = {\n    [key: string]: string | number;\n};\n\nexport type AdditionalPropertiesUnknownIssue3 = string & {\n    entries: {\n        [key: string]: AdditionalPropertiesUnknownIssue;\n    };\n};\n\nexport type AdditionalPropertiesIntegerIssue = {\n    value: number;\n    [key: string]: number;\n};\n\nexport type OneOfAllOfIssue = ((ConstValue | GenericSchemaDuplicateIssue1SystemBoolean) & _3eNum1Период) | GenericSchemaDuplicateIssue1SystemString;\n\nexport type GenericSchemaDuplicateIssue1SystemBoolean = {\n    item?: boolean;\n    error?: string | null;\n    readonly hasError?: boolean;\n    data?: {\n        [key: string]: never;\n    };\n};\n\nexport type GenericSchemaDuplicateIssue1SystemString = {\n    item?: string | null;\n    error?: string | null;\n    readonly hasError?: boolean;\n};\n\nexport type ExternalSharedModel = {\n    id: string;\n    name?: string;\n};\n\n/**\n * This is a model with one property containing a reference\n */\nexport type ModelWithReferenceWritable = {\n    prop?: ModelWithPropertiesWritable;\n};\n\n/**\n * This is a model with one property containing an array\n */\nexport type ModelWithArrayReadOnlyAndWriteOnlyWritable = {\n    prop?: Array<ModelWithReadOnlyAndWriteOnlyWritable>;\n    propWithFile?: Array<Blob | File>;\n    propWithNumber?: Array<number>;\n};\n\n/**\n * This is a model with one nested property\n */\nexport type ModelWithPropertiesWritable = {\n    required: string;\n    requiredAndNullable: string | null;\n    string?: string;\n    number?: number;\n    boolean?: boolean;\n    reference?: ModelWithString;\n    'property with space'?: string;\n    default?: string;\n    try?: string;\n};\n\n/**\n * This is a model that contains a some patterns\n */\nexport type ModelWithPatternWritable = {\n    key: string;\n    name: string;\n    id?: string;\n    text?: string;\n    patternWithSingleQuotes?: string;\n    patternWithNewline?: string;\n    patternWithBacktick?: string;\n    patternWithUnicode?: string;\n};\n\nexport type FileWritable = {\n    /**\n     * Mime\n     */\n    mime: string;\n};\n\nexport type ModelWithReadOnlyAndWriteOnlyWritable = {\n    foo: string;\n    baz: string;\n};\n\nexport type ModelWithAnyOfConstantSizeArrayWithNSizeAndOptionsWritable = [\n    number | Import,\n    number | Import\n];\n\nexport type AdditionalPropertiesUnknownIssueWritable = {\n    [key: string]: string | number;\n};\n\nexport type OneOfAllOfIssueWritable = ((ConstValue | GenericSchemaDuplicateIssue1SystemBoolean) & _3eNum1Период) | GenericSchemaDuplicateIssue1SystemString;\n\nexport type GenericSchemaDuplicateIssue1SystemBooleanWritable = {\n    item?: boolean;\n    error?: string | null;\n    data?: {\n        [key: string]: never;\n    };\n};\n\nexport type GenericSchemaDuplicateIssue1SystemStringWritable = {\n    item?: string | null;\n    error?: string | null;\n};\n\n/**\n * This is a reusable parameter\n */\nexport type SimpleParameter = string;\n\n/**\n * Parameter with illegal characters\n */\nexport type XFooBar = ModelWithString;\n\nexport type SimpleRequestBody = ModelWithString;\n\nexport type SimpleFormData = ModelWithString;\n\nexport type ExportData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no+tag';\n};\n\nexport type PatchApiVbyApiVersionNoTagData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no+tag';\n};\n\nexport type PatchApiVbyApiVersionNoTagResponses = {\n    /**\n     * OK\n     */\n    default: unknown;\n};\n\nexport type ImportData = {\n    body: ModelWithReadOnlyAndWriteOnlyWritable | ModelWithArrayReadOnlyAndWriteOnlyWritable;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no+tag';\n};\n\nexport type ImportResponses = {\n    /**\n     * Success\n     */\n    200: ModelFromZendesk;\n    /**\n     * Default success response\n     */\n    default: ModelWithReadOnlyAndWriteOnly;\n};\n\nexport type ImportResponse = ImportResponses[keyof ImportResponses];\n\nexport type FooWowData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no+tag';\n};\n\nexport type FooWowResponses = {\n    /**\n     * OK\n     */\n    default: unknown;\n};\n\nexport type ApiVVersionODataControllerCountData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple/$count';\n};\n\nexport type ApiVVersionODataControllerCountResponses = {\n    /**\n     * Success\n     */\n    200: ModelFromZendesk;\n};\n\nexport type ApiVVersionODataControllerCountResponse = ApiVVersionODataControllerCountResponses[keyof ApiVVersionODataControllerCountResponses];\n\nexport type GetApiVbyApiVersionSimpleOperationData = {\n    body?: never;\n    path: {\n        /**\n         * foo in method\n         */\n        foo_param: string;\n    };\n    query?: never;\n    url: '/api/v{api-version}/simple:operation';\n};\n\nexport type GetApiVbyApiVersionSimpleOperationErrors = {\n    /**\n     * Default error response\n     */\n    default: ModelWithBoolean;\n};\n\nexport type GetApiVbyApiVersionSimpleOperationError = GetApiVbyApiVersionSimpleOperationErrors[keyof GetApiVbyApiVersionSimpleOperationErrors];\n\nexport type GetApiVbyApiVersionSimpleOperationResponses = {\n    /**\n     * Response is a simple number\n     */\n    200: number;\n};\n\nexport type GetApiVbyApiVersionSimpleOperationResponse = GetApiVbyApiVersionSimpleOperationResponses[keyof GetApiVbyApiVersionSimpleOperationResponses];\n\nexport type DeleteCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type GetCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type HeadCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type OptionsCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type PatchCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type PostCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type PutCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type DeleteFooData3 = {\n    body?: never;\n    headers: {\n        /**\n         * Parameter with illegal characters\n         */\n        'x-Foo-Bar': ModelWithString;\n    };\n    path: {\n        /**\n         * foo in method\n         */\n        foo_param: string;\n        /**\n         * bar in method\n         */\n        BarParam: string;\n    };\n    query?: never;\n    url: '/api/v{api-version}/foo/{foo_param}/bar/{BarParam}';\n};\n\nexport type CallWithDescriptionsData = {\n    body?: never;\n    path?: never;\n    query?: {\n        /**\n         * Testing multiline comments in string: First line\n         * Second line\n         *\n         * Fourth line\n         */\n        parameterWithBreaks?: string;\n        /**\n         * Testing backticks in string: `backticks` and ```multiple backticks``` should work\n         */\n        parameterWithBackticks?: string;\n        /**\n         * Testing slashes in string: \\backwards\\\\\\ and /forwards/// should work\n         */\n        parameterWithSlashes?: string;\n        /**\n         * Testing expression placeholders in string: ${expression} should work\n         */\n        parameterWithExpressionPlaceholders?: string;\n        /**\n         * Testing quotes in string: 'single quote''' and \"double quotes\"\"\" should work\n         */\n        parameterWithQuotes?: string;\n        /**\n         * Testing reserved characters in string: * inline * and ** inline ** should work\n         */\n        parameterWithReservedCharacters?: string;\n    };\n    url: '/api/v{api-version}/descriptions';\n};\n\nexport type DeprecatedCallData = {\n    body?: never;\n    headers: {\n        /**\n         * This parameter is deprecated\n         *\n         * @deprecated\n         */\n        parameter: DeprecatedModel | null;\n    };\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/parameters/deprecated';\n};\n\nexport type CallWithParametersData = {\n    /**\n     * This is the parameter that goes into the body\n     */\n    body: {\n        [key: string]: unknown;\n    } | null;\n    headers: {\n        /**\n         * This is the parameter that goes into the header\n         */\n        parameterHeader: string | null;\n    };\n    path: {\n        /**\n         * This is the parameter that goes into the path\n         */\n        parameterPath: string | null;\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string | null;\n    };\n    query: {\n        foo_ref_enum?: ModelWithNestedArrayEnumsDataFoo;\n        foo_all_of_enum: ModelWithNestedArrayEnumsDataFoo;\n        /**\n         * This is the parameter that goes into the query params\n         */\n        cursor: string | null;\n    };\n    url: '/api/v{api-version}/parameters/{parameterPath}';\n};\n\nexport type CallWithWeirdParameterNamesData = {\n    /**\n     * This is the parameter that goes into the body\n     */\n    body: ModelWithString | null;\n    headers: {\n        /**\n         * This is the parameter that goes into the request header\n         */\n        'parameter.header': string | null;\n    };\n    path: {\n        /**\n         * This is the parameter that goes into the path\n         */\n        'parameter.path.1'?: string;\n        /**\n         * This is the parameter that goes into the path\n         */\n        'parameter-path-2'?: string;\n        /**\n         * This is the parameter that goes into the path\n         */\n        'PARAMETER-PATH-3'?: string;\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string | null;\n    };\n    query: {\n        /**\n         * This is the parameter with a reserved keyword\n         */\n        default?: string;\n        /**\n         * This is the parameter that goes into the request query params\n         */\n        'parameter-query': string | null;\n    };\n    url: '/api/v{api-version}/parameters/{parameter.path.1}/{parameter-path-2}/{PARAMETER-PATH-3}';\n};\n\nexport type GetCallWithOptionalParamData = {\n    /**\n     * This is a required parameter\n     */\n    body: ModelWithOneOfEnum;\n    path?: never;\n    query?: {\n        /**\n         * This is an optional parameter\n         */\n        page?: number;\n    };\n    url: '/api/v{api-version}/parameters';\n};\n\nexport type PostCallWithOptionalParamData = {\n    /**\n     * This is an optional parameter\n     */\n    body?: {\n        offset?: number | null;\n    };\n    path?: never;\n    query: {\n        /**\n         * This is a required parameter\n         */\n        parameter: Pageable;\n    };\n    url: '/api/v{api-version}/parameters';\n};\n\nexport type PostCallWithOptionalParamResponses = {\n    /**\n     * Response is a simple number\n     */\n    200: number;\n    /**\n     * Success\n     */\n    204: void;\n};\n\nexport type PostCallWithOptionalParamResponse = PostCallWithOptionalParamResponses[keyof PostCallWithOptionalParamResponses];\n\nexport type PostApiVbyApiVersionRequestBodyData = {\n    /**\n     * A reusable request body\n     */\n    body?: SimpleRequestBody;\n    path?: never;\n    query?: {\n        /**\n         * This is a reusable parameter\n         */\n        parameter?: string;\n    };\n    url: '/api/v{api-version}/requestBody';\n};\n\nexport type PostApiVbyApiVersionFormDataData = {\n    /**\n     * A reusable request body\n     */\n    body?: SimpleFormData;\n    path?: never;\n    query?: {\n        /**\n         * This is a reusable parameter\n         */\n        parameter?: string;\n    };\n    url: '/api/v{api-version}/formData';\n};\n\nexport type CallWithDefaultParametersData = {\n    body?: never;\n    path?: never;\n    query?: {\n        /**\n         * This is a simple string with default value\n         */\n        parameterString?: string | null;\n        /**\n         * This is a simple number with default value\n         */\n        parameterNumber?: number | null;\n        /**\n         * This is a simple boolean with default value\n         */\n        parameterBoolean?: boolean | null;\n        /**\n         * This is a simple enum with default value\n         */\n        parameterEnum?: 'Success' | 'Warning' | 'Error';\n        /**\n         * This is a simple model with default value\n         */\n        parameterModel?: ModelWithString | null;\n    };\n    url: '/api/v{api-version}/defaults';\n};\n\nexport type CallWithDefaultOptionalParametersData = {\n    body?: never;\n    path?: never;\n    query?: {\n        /**\n         * This is a simple string that is optional with default value\n         */\n        parameterString?: string;\n        /**\n         * This is a simple number that is optional with default value\n         */\n        parameterNumber?: number;\n        /**\n         * This is a simple boolean that is optional with default value\n         */\n        parameterBoolean?: boolean;\n        /**\n         * This is a simple enum that is optional with default value\n         */\n        parameterEnum?: 'Success' | 'Warning' | 'Error';\n        /**\n         * This is a simple model that is optional with default value\n         */\n        parameterModel?: ModelWithString;\n    };\n    url: '/api/v{api-version}/defaults';\n};\n\nexport type CallToTestOrderOfParamsData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * This is a optional string with default\n         */\n        parameterOptionalStringWithDefault?: string;\n        /**\n         * This is a optional string with empty default\n         */\n        parameterOptionalStringWithEmptyDefault?: string;\n        /**\n         * This is a optional string with no default\n         */\n        parameterOptionalStringWithNoDefault?: string;\n        /**\n         * This is a string with default\n         */\n        parameterStringWithDefault: string;\n        /**\n         * This is a string with empty default\n         */\n        parameterStringWithEmptyDefault: string;\n        /**\n         * This is a string with no default\n         */\n        parameterStringWithNoDefault: string;\n        /**\n         * This is a string that can be null with no default\n         */\n        parameterStringNullableWithNoDefault?: string | null;\n        /**\n         * This is a string that can be null with default\n         */\n        parameterStringNullableWithDefault?: string | null;\n    };\n    url: '/api/v{api-version}/defaults';\n};\n\nexport type DuplicateNameData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/duplicate';\n};\n\nexport type DuplicateName2Data = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/duplicate';\n};\n\nexport type DuplicateName3Data = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/duplicate';\n};\n\nexport type DuplicateName4Data = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/duplicate';\n};\n\nexport type CallWithNoContentResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no-content';\n};\n\nexport type CallWithNoContentResponseResponses = {\n    /**\n     * Success\n     */\n    204: void;\n};\n\nexport type CallWithNoContentResponseResponse = CallWithNoContentResponseResponses[keyof CallWithNoContentResponseResponses];\n\nexport type CallWithResponseAndNoContentResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multiple-tags/response-and-no-content';\n};\n\nexport type CallWithResponseAndNoContentResponseResponses = {\n    /**\n     * Response is a simple number\n     */\n    200: number;\n    /**\n     * Success\n     */\n    204: void;\n};\n\nexport type CallWithResponseAndNoContentResponseResponse = CallWithResponseAndNoContentResponseResponses[keyof CallWithResponseAndNoContentResponseResponses];\n\nexport type DummyAData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multiple-tags/a';\n};\n\nexport type DummyAResponses = {\n    200: _400;\n};\n\nexport type DummyAResponse = DummyAResponses[keyof DummyAResponses];\n\nexport type DummyBData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multiple-tags/b';\n};\n\nexport type DummyBResponses = {\n    /**\n     * Success\n     */\n    204: void;\n};\n\nexport type DummyBResponse = DummyBResponses[keyof DummyBResponses];\n\nexport type CallWithResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/response';\n};\n\nexport type CallWithResponseResponses = {\n    default: Import;\n};\n\nexport type CallWithResponseResponse = CallWithResponseResponses[keyof CallWithResponseResponses];\n\nexport type CallWithDuplicateResponsesData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/response';\n};\n\nexport type CallWithDuplicateResponsesErrors = {\n    /**\n     * Message for 500 error\n     */\n    500: ModelWithStringError;\n    /**\n     * Message for 501 error\n     */\n    501: ModelWithStringError;\n    /**\n     * Message for 502 error\n     */\n    502: ModelWithStringError;\n    /**\n     * Message for 4XX errors\n     */\n    '4XX': DictionaryWithArray;\n    /**\n     * Default error response\n     */\n    default: ModelWithBoolean;\n};\n\nexport type CallWithDuplicateResponsesError = CallWithDuplicateResponsesErrors[keyof CallWithDuplicateResponsesErrors];\n\nexport type CallWithDuplicateResponsesResponses = {\n    /**\n     * Message for 200 response\n     */\n    200: ModelWithBoolean & ModelWithInteger;\n    /**\n     * Message for 201 response\n     */\n    201: ModelWithString;\n    /**\n     * Message for 202 response\n     */\n    202: ModelWithString;\n};\n\nexport type CallWithDuplicateResponsesResponse = CallWithDuplicateResponsesResponses[keyof CallWithDuplicateResponsesResponses];\n\nexport type CallWithResponsesData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/response';\n};\n\nexport type CallWithResponsesErrors = {\n    /**\n     * Message for 500 error\n     */\n    500: ModelWithStringError;\n    /**\n     * Message for 501 error\n     */\n    501: ModelWithStringError;\n    /**\n     * Message for 502 error\n     */\n    502: ModelWithStringError;\n    /**\n     * Message for default response\n     */\n    default: ModelWithStringError;\n};\n\nexport type CallWithResponsesError = CallWithResponsesErrors[keyof CallWithResponsesErrors];\n\nexport type CallWithResponsesResponses = {\n    /**\n     * Message for 200 response\n     */\n    200: {\n        readonly '@namespace.string'?: string;\n        readonly '@namespace.integer'?: number;\n        readonly value?: Array<ModelWithString>;\n    };\n    /**\n     * Message for 201 response\n     */\n    201: ModelThatExtends;\n    /**\n     * Message for 202 response\n     */\n    202: ModelThatExtendsExtends;\n};\n\nexport type CallWithResponsesResponse = CallWithResponsesResponses[keyof CallWithResponsesResponses];\n\nexport type CollectionFormatData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * This is an array parameter that is sent as csv format (comma-separated values)\n         */\n        parameterArrayCSV: Array<string> | null;\n        /**\n         * This is an array parameter that is sent as ssv format (space-separated values)\n         */\n        parameterArraySSV: Array<string> | null;\n        /**\n         * This is an array parameter that is sent as tsv format (tab-separated values)\n         */\n        parameterArrayTSV: Array<string> | null;\n        /**\n         * This is an array parameter that is sent as pipes format (pipe-separated values)\n         */\n        parameterArrayPipes: Array<string> | null;\n        /**\n         * This is an array parameter that is sent as multi format (multiple parameter instances)\n         */\n        parameterArrayMulti: Array<string> | null;\n    };\n    url: '/api/v{api-version}/collectionFormat';\n};\n\nexport type TypesData = {\n    body?: never;\n    path?: {\n        /**\n         * This is a number parameter\n         */\n        id?: number;\n    };\n    query: {\n        /**\n         * This is a number parameter\n         */\n        parameterNumber: number;\n        /**\n         * This is a string parameter\n         */\n        parameterString: string | null;\n        /**\n         * This is a boolean parameter\n         */\n        parameterBoolean: boolean | null;\n        /**\n         * This is an object parameter\n         */\n        parameterObject: {\n            [key: string]: unknown;\n        } | null;\n        /**\n         * This is an array parameter\n         */\n        parameterArray: Array<string> | null;\n        /**\n         * This is a dictionary parameter\n         */\n        parameterDictionary: {\n            [key: string]: unknown;\n        } | null;\n        /**\n         * This is an enum parameter\n         */\n        parameterEnum: 'Success' | 'Warning' | 'Error';\n    };\n    url: '/api/v{api-version}/types';\n};\n\nexport type TypesResponses = {\n    /**\n     * Response is a simple number\n     */\n    200: number;\n    /**\n     * Response is a simple string\n     */\n    201: string;\n    /**\n     * Response is a simple boolean\n     */\n    202: boolean;\n    /**\n     * Response is a simple object\n     */\n    203: {\n        [key: string]: unknown;\n    };\n};\n\nexport type TypesResponse = TypesResponses[keyof TypesResponses];\n\nexport type UploadFileData = {\n    body: Blob | File;\n    path: {\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string | null;\n    };\n    query?: never;\n    url: '/api/v{api-version}/upload';\n};\n\nexport type UploadFileResponses = {\n    200: boolean;\n};\n\nexport type UploadFileResponse = UploadFileResponses[keyof UploadFileResponses];\n\nexport type FileResponseData = {\n    body?: never;\n    path: {\n        id: string;\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string;\n    };\n    query?: never;\n    url: '/api/v{api-version}/file/{id}';\n};\n\nexport type FileResponseResponses = {\n    /**\n     * Success\n     */\n    200: Blob | File;\n};\n\nexport type FileResponseResponse = FileResponseResponses[keyof FileResponseResponses];\n\nexport type ComplexTypesData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * Parameter containing object\n         */\n        parameterObject: {\n            first?: {\n                second?: {\n                    third?: string;\n                };\n            };\n        };\n        /**\n         * Parameter containing reference\n         */\n        parameterReference: ModelWithString;\n    };\n    url: '/api/v{api-version}/complex';\n};\n\nexport type ComplexTypesErrors = {\n    /**\n     * 400 `server` error\n     */\n    400: unknown;\n    /**\n     * 500 server error\n     */\n    500: unknown;\n};\n\nexport type ComplexTypesResponses = {\n    /**\n     * Successful response\n     */\n    200: Array<ModelWithString>;\n};\n\nexport type ComplexTypesResponse = ComplexTypesResponses[keyof ComplexTypesResponses];\n\nexport type MultipartResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multipart';\n};\n\nexport type MultipartResponseResponses = {\n    /**\n     * OK\n     */\n    200: {\n        file?: Blob | File;\n        metadata?: {\n            foo?: string;\n            bar?: string;\n        };\n    };\n};\n\nexport type MultipartResponseResponse = MultipartResponseResponses[keyof MultipartResponseResponses];\n\nexport type MultipartRequestData = {\n    body?: {\n        content?: Blob | File;\n        data?: ModelWithString | null;\n    };\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multipart';\n};\n\nexport type ComplexParamsData = {\n    body?: {\n        readonly key: string | null;\n        name: string | null;\n        enabled?: boolean;\n        type: 'Monkey' | 'Horse' | 'Bird';\n        listOfModels?: Array<ModelWithString> | null;\n        listOfStrings?: Array<string> | null;\n        parameters: ModelWithString | ModelWithEnum | ModelWithArray | ModelWithDictionary;\n        readonly user?: {\n            readonly id?: number;\n            readonly name?: string | null;\n        };\n    };\n    path: {\n        id: number;\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string;\n    };\n    query?: never;\n    url: '/api/v{api-version}/complex/{id}';\n};\n\nexport type ComplexParamsResponses = {\n    /**\n     * Success\n     */\n    200: ModelWithString;\n};\n\nexport type ComplexParamsResponse = ComplexParamsResponses[keyof ComplexParamsResponses];\n\nexport type CallWithResultFromHeaderData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/header';\n};\n\nexport type CallWithResultFromHeaderErrors = {\n    /**\n     * 400 server error\n     */\n    400: unknown;\n    /**\n     * 500 server error\n     */\n    500: unknown;\n};\n\nexport type CallWithResultFromHeaderResponses = {\n    /**\n     * Successful response\n     */\n    200: unknown;\n};\n\nexport type TestErrorCodeData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * Status code to return\n         */\n        status: number;\n    };\n    url: '/api/v{api-version}/error';\n};\n\nexport type TestErrorCodeErrors = {\n    /**\n     * Custom message: Internal Server Error\n     */\n    500: unknown;\n    /**\n     * Custom message: Not Implemented\n     */\n    501: unknown;\n    /**\n     * Custom message: Bad Gateway\n     */\n    502: unknown;\n    /**\n     * Custom message: Service Unavailable\n     */\n    503: unknown;\n};\n\nexport type TestErrorCodeResponses = {\n    /**\n     * Custom message: Successful response\n     */\n    200: unknown;\n};\n\nexport type NonAsciiæøåÆøÅöôêÊ字符串Data = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * Dummy input param\n         */\n        nonAsciiParamæøåÆØÅöôêÊ: number;\n    };\n    url: '/api/v{api-version}/non-ascii-æøåÆØÅöôêÊ字符串';\n};\n\nexport type NonAsciiæøåÆøÅöôêÊ字符串Responses = {\n    /**\n     * Successful response\n     */\n    200: Array<NonAsciiStringæøåÆøÅöôêÊ字符串>;\n};\n\nexport type NonAsciiæøåÆøÅöôêÊ字符串Response = NonAsciiæøåÆøÅöôêÊ字符串Responses[keyof NonAsciiæøåÆøÅöôêÊ字符串Responses];\n\nexport type PutWithFormUrlEncodedData = {\n    body: ArrayWithStrings;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/non-ascii-æøåÆØÅöôêÊ字符串';\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/preact-query/fetch/@tanstack/preact-query.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport { type DefaultError, type InfiniteData, infiniteQueryOptions, queryOptions, type UseMutationOptions } from '@tanstack/preact-query';\n\nimport { client } from '../client.gen';\nimport { apiVVersionODataControllerCount, callToTestOrderOfParams, callWithDefaultOptionalParameters, callWithDefaultParameters, callWithDescriptions, callWithDuplicateResponses, callWithNoContentResponse, callWithParameters, callWithResponse, callWithResponseAndNoContentResponse, callWithResponses, callWithResultFromHeader, callWithWeirdParameterNames, collectionFormat, complexParams, complexTypes, deleteCallWithoutParametersAndResponse, deleteFoo, deprecatedCall, dummyA, dummyB, duplicateName, duplicateName2, duplicateName3, duplicateName4, export_, fileResponse, fooWow, getApiVbyApiVersionSimpleOperation, getCallWithOptionalParam, getCallWithoutParametersAndResponse, import_, multipartRequest, multipartResponse, nonAsciiæøåÆøÅöôêÊ字符串, type Options, patchApiVbyApiVersionNoTag, patchCallWithoutParametersAndResponse, postApiVbyApiVersionFormData, postApiVbyApiVersionRequestBody, postCallWithOptionalParam, postCallWithoutParametersAndResponse, putCallWithoutParametersAndResponse, putWithFormUrlEncoded, testErrorCode, types, uploadFile } from '../sdk.gen';\nimport type { ApiVVersionODataControllerCountData, ApiVVersionODataControllerCountResponse, CallToTestOrderOfParamsData, CallWithDefaultOptionalParametersData, CallWithDefaultParametersData, CallWithDescriptionsData, CallWithDuplicateResponsesData, CallWithDuplicateResponsesError, CallWithDuplicateResponsesResponse, CallWithNoContentResponseData, CallWithNoContentResponseResponse, CallWithParametersData, CallWithResponseAndNoContentResponseData, CallWithResponseAndNoContentResponseResponse, CallWithResponseData, CallWithResponseResponse, CallWithResponsesData, CallWithResponsesError, CallWithResponsesResponse, CallWithResultFromHeaderData, CallWithWeirdParameterNamesData, CollectionFormatData, ComplexParamsData, ComplexParamsResponse, ComplexTypesData, ComplexTypesResponse, DeleteCallWithoutParametersAndResponseData, DeleteFooData3, DeprecatedCallData, DummyAData, DummyAResponse, DummyBData, DummyBResponse, DuplicateName2Data, DuplicateName3Data, DuplicateName4Data, DuplicateNameData, ExportData, FileResponseData, FileResponseResponse, FooWowData, GetApiVbyApiVersionSimpleOperationData, GetApiVbyApiVersionSimpleOperationError, GetApiVbyApiVersionSimpleOperationResponse, GetCallWithOptionalParamData, GetCallWithoutParametersAndResponseData, ImportData, ImportResponse, MultipartRequestData, MultipartResponseData, MultipartResponseResponse, NonAsciiæøåÆøÅöôêÊ字符串Data, NonAsciiæøåÆøÅöôêÊ字符串Response, PatchApiVbyApiVersionNoTagData, PatchCallWithoutParametersAndResponseData, PostApiVbyApiVersionFormDataData, PostApiVbyApiVersionRequestBodyData, PostCallWithOptionalParamData, PostCallWithOptionalParamResponse, PostCallWithoutParametersAndResponseData, PutCallWithoutParametersAndResponseData, PutWithFormUrlEncodedData, TestErrorCodeData, TypesData, TypesResponse, UploadFileData, UploadFileResponse } from '../types.gen';\n\nexport type QueryKey<TOptions extends Options> = [\n    Pick<TOptions, 'baseUrl' | 'body' | 'headers' | 'path' | 'query'> & {\n        _id: string;\n        _infinite?: boolean;\n        tags?: ReadonlyArray<string>;\n    }\n];\n\nconst createQueryKey = <TOptions extends Options>(id: string, options?: TOptions, infinite?: boolean, tags?: ReadonlyArray<string>): [\n    QueryKey<TOptions>[0]\n] => {\n    const params: QueryKey<TOptions>[0] = { _id: id, baseUrl: options?.baseUrl || (options?.client ?? client).getConfig().baseUrl } as QueryKey<TOptions>[0];\n    if (infinite) {\n        params._infinite = infinite;\n    }\n    if (tags) {\n        params.tags = tags;\n    }\n    if (options?.body) {\n        params.body = options.body;\n    }\n    if (options?.headers) {\n        params.headers = options.headers;\n    }\n    if (options?.path) {\n        params.path = options.path;\n    }\n    if (options?.query) {\n        params.query = options.query;\n    }\n    return [params];\n};\n\nexport const exportQueryKey = (options?: Options<ExportData>) => createQueryKey('export', options);\n\nexport const exportOptions = (options?: Options<ExportData>) => queryOptions<unknown, DefaultError, unknown, ReturnType<typeof exportQueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await export_({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: exportQueryKey(options)\n});\n\nexport const patchApiVbyApiVersionNoTagMutation = (options?: Partial<Options<PatchApiVbyApiVersionNoTagData>>): UseMutationOptions<unknown, DefaultError, Options<PatchApiVbyApiVersionNoTagData>> => {\n    const mutationOptions: UseMutationOptions<unknown, DefaultError, Options<PatchApiVbyApiVersionNoTagData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await patchApiVbyApiVersionNoTag({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const importMutation = (options?: Partial<Options<ImportData>>): UseMutationOptions<ImportResponse, DefaultError, Options<ImportData>> => {\n    const mutationOptions: UseMutationOptions<ImportResponse, DefaultError, Options<ImportData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await import_({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const fooWowMutation = (options?: Partial<Options<FooWowData>>): UseMutationOptions<unknown, DefaultError, Options<FooWowData>> => {\n    const mutationOptions: UseMutationOptions<unknown, DefaultError, Options<FooWowData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await fooWow({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const apiVVersionODataControllerCountQueryKey = (options?: Options<ApiVVersionODataControllerCountData>) => createQueryKey('apiVVersionODataControllerCount', options);\n\nexport const apiVVersionODataControllerCountOptions = (options?: Options<ApiVVersionODataControllerCountData>) => queryOptions<ApiVVersionODataControllerCountResponse, DefaultError, ApiVVersionODataControllerCountResponse, ReturnType<typeof apiVVersionODataControllerCountQueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await apiVVersionODataControllerCount({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: apiVVersionODataControllerCountQueryKey(options)\n});\n\nexport const getApiVbyApiVersionSimpleOperationQueryKey = (options: Options<GetApiVbyApiVersionSimpleOperationData>) => createQueryKey('getApiVbyApiVersionSimpleOperation', options);\n\nexport const getApiVbyApiVersionSimpleOperationOptions = (options: Options<GetApiVbyApiVersionSimpleOperationData>) => queryOptions<GetApiVbyApiVersionSimpleOperationResponse, GetApiVbyApiVersionSimpleOperationError, GetApiVbyApiVersionSimpleOperationResponse, ReturnType<typeof getApiVbyApiVersionSimpleOperationQueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await getApiVbyApiVersionSimpleOperation({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: getApiVbyApiVersionSimpleOperationQueryKey(options)\n});\n\nexport const deleteCallWithoutParametersAndResponseMutation = (options?: Partial<Options<DeleteCallWithoutParametersAndResponseData>>): UseMutationOptions<unknown, DefaultError, Options<DeleteCallWithoutParametersAndResponseData>> => {\n    const mutationOptions: UseMutationOptions<unknown, DefaultError, Options<DeleteCallWithoutParametersAndResponseData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await deleteCallWithoutParametersAndResponse({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const getCallWithoutParametersAndResponseQueryKey = (options?: Options<GetCallWithoutParametersAndResponseData>) => createQueryKey('getCallWithoutParametersAndResponse', options);\n\nexport const getCallWithoutParametersAndResponseOptions = (options?: Options<GetCallWithoutParametersAndResponseData>) => queryOptions<unknown, DefaultError, unknown, ReturnType<typeof getCallWithoutParametersAndResponseQueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await getCallWithoutParametersAndResponse({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: getCallWithoutParametersAndResponseQueryKey(options)\n});\n\nexport const patchCallWithoutParametersAndResponseMutation = (options?: Partial<Options<PatchCallWithoutParametersAndResponseData>>): UseMutationOptions<unknown, DefaultError, Options<PatchCallWithoutParametersAndResponseData>> => {\n    const mutationOptions: UseMutationOptions<unknown, DefaultError, Options<PatchCallWithoutParametersAndResponseData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await patchCallWithoutParametersAndResponse({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const postCallWithoutParametersAndResponseMutation = (options?: Partial<Options<PostCallWithoutParametersAndResponseData>>): UseMutationOptions<unknown, DefaultError, Options<PostCallWithoutParametersAndResponseData>> => {\n    const mutationOptions: UseMutationOptions<unknown, DefaultError, Options<PostCallWithoutParametersAndResponseData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await postCallWithoutParametersAndResponse({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const putCallWithoutParametersAndResponseMutation = (options?: Partial<Options<PutCallWithoutParametersAndResponseData>>): UseMutationOptions<unknown, DefaultError, Options<PutCallWithoutParametersAndResponseData>> => {\n    const mutationOptions: UseMutationOptions<unknown, DefaultError, Options<PutCallWithoutParametersAndResponseData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await putCallWithoutParametersAndResponse({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const deleteFooMutation = (options?: Partial<Options<DeleteFooData3>>): UseMutationOptions<unknown, DefaultError, Options<DeleteFooData3>> => {\n    const mutationOptions: UseMutationOptions<unknown, DefaultError, Options<DeleteFooData3>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await deleteFoo({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const callWithDescriptionsMutation = (options?: Partial<Options<CallWithDescriptionsData>>): UseMutationOptions<unknown, DefaultError, Options<CallWithDescriptionsData>> => {\n    const mutationOptions: UseMutationOptions<unknown, DefaultError, Options<CallWithDescriptionsData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await callWithDescriptions({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\n/**\n * @deprecated\n */\nexport const deprecatedCallMutation = (options?: Partial<Options<DeprecatedCallData>>): UseMutationOptions<unknown, DefaultError, Options<DeprecatedCallData>> => {\n    const mutationOptions: UseMutationOptions<unknown, DefaultError, Options<DeprecatedCallData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await deprecatedCall({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const callWithParametersMutation = (options?: Partial<Options<CallWithParametersData>>): UseMutationOptions<unknown, DefaultError, Options<CallWithParametersData>> => {\n    const mutationOptions: UseMutationOptions<unknown, DefaultError, Options<CallWithParametersData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await callWithParameters({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const callWithWeirdParameterNamesMutation = (options?: Partial<Options<CallWithWeirdParameterNamesData>>): UseMutationOptions<unknown, DefaultError, Options<CallWithWeirdParameterNamesData>> => {\n    const mutationOptions: UseMutationOptions<unknown, DefaultError, Options<CallWithWeirdParameterNamesData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await callWithWeirdParameterNames({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const getCallWithOptionalParamQueryKey = (options: Options<GetCallWithOptionalParamData>) => createQueryKey('getCallWithOptionalParam', options);\n\nexport const getCallWithOptionalParamOptions = (options: Options<GetCallWithOptionalParamData>) => queryOptions<unknown, DefaultError, unknown, ReturnType<typeof getCallWithOptionalParamQueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await getCallWithOptionalParam({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: getCallWithOptionalParamQueryKey(options)\n});\n\nconst createInfiniteParams = <K extends Pick<QueryKey<Options>[0], 'body' | 'headers' | 'path' | 'query'>>(queryKey: QueryKey<Options>, page: K) => {\n    const params = { ...queryKey[0] };\n    if (page.body) {\n        params.body = {\n            ...queryKey[0].body as any,\n            ...page.body as any\n        };\n    }\n    if (page.headers) {\n        params.headers = {\n            ...queryKey[0].headers,\n            ...page.headers\n        };\n    }\n    if (page.path) {\n        params.path = {\n            ...queryKey[0].path as any,\n            ...page.path as any\n        };\n    }\n    if (page.query) {\n        params.query = {\n            ...queryKey[0].query as any,\n            ...page.query as any\n        };\n    }\n    return params as unknown as typeof page;\n};\n\nexport const getCallWithOptionalParamInfiniteQueryKey = (options: Options<GetCallWithOptionalParamData>): QueryKey<Options<GetCallWithOptionalParamData>> => createQueryKey('getCallWithOptionalParam', options, true);\n\nexport const getCallWithOptionalParamInfiniteOptions = (options: Options<GetCallWithOptionalParamData>) => infiniteQueryOptions<unknown, DefaultError, InfiniteData<unknown>, QueryKey<Options<GetCallWithOptionalParamData>>, number | Pick<QueryKey<Options<GetCallWithOptionalParamData>>[0], 'body' | 'headers' | 'path' | 'query'>>(\n// @ts-ignore\n{\n    queryFn: async ({ pageParam, queryKey, signal }) => {\n        // @ts-ignore\n        const page: Pick<QueryKey<Options<GetCallWithOptionalParamData>>[0], 'body' | 'headers' | 'path' | 'query'> = typeof pageParam === 'object' ? pageParam : {\n            query: {\n                page: pageParam\n            }\n        };\n        const params = createInfiniteParams(queryKey, page);\n        const { data } = await getCallWithOptionalParam({\n            ...options,\n            ...params,\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: getCallWithOptionalParamInfiniteQueryKey(options)\n});\n\nexport const postCallWithOptionalParamMutation = (options?: Partial<Options<PostCallWithOptionalParamData>>): UseMutationOptions<PostCallWithOptionalParamResponse, DefaultError, Options<PostCallWithOptionalParamData>> => {\n    const mutationOptions: UseMutationOptions<PostCallWithOptionalParamResponse, DefaultError, Options<PostCallWithOptionalParamData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await postCallWithOptionalParam({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const postApiVbyApiVersionRequestBodyMutation = (options?: Partial<Options<PostApiVbyApiVersionRequestBodyData>>): UseMutationOptions<unknown, DefaultError, Options<PostApiVbyApiVersionRequestBodyData>> => {\n    const mutationOptions: UseMutationOptions<unknown, DefaultError, Options<PostApiVbyApiVersionRequestBodyData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await postApiVbyApiVersionRequestBody({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const postApiVbyApiVersionFormDataMutation = (options?: Partial<Options<PostApiVbyApiVersionFormDataData>>): UseMutationOptions<unknown, DefaultError, Options<PostApiVbyApiVersionFormDataData>> => {\n    const mutationOptions: UseMutationOptions<unknown, DefaultError, Options<PostApiVbyApiVersionFormDataData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await postApiVbyApiVersionFormData({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const callWithDefaultParametersQueryKey = (options?: Options<CallWithDefaultParametersData>) => createQueryKey('callWithDefaultParameters', options);\n\nexport const callWithDefaultParametersOptions = (options?: Options<CallWithDefaultParametersData>) => queryOptions<unknown, DefaultError, unknown, ReturnType<typeof callWithDefaultParametersQueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await callWithDefaultParameters({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: callWithDefaultParametersQueryKey(options)\n});\n\nexport const callWithDefaultOptionalParametersMutation = (options?: Partial<Options<CallWithDefaultOptionalParametersData>>): UseMutationOptions<unknown, DefaultError, Options<CallWithDefaultOptionalParametersData>> => {\n    const mutationOptions: UseMutationOptions<unknown, DefaultError, Options<CallWithDefaultOptionalParametersData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await callWithDefaultOptionalParameters({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const callToTestOrderOfParamsMutation = (options?: Partial<Options<CallToTestOrderOfParamsData>>): UseMutationOptions<unknown, DefaultError, Options<CallToTestOrderOfParamsData>> => {\n    const mutationOptions: UseMutationOptions<unknown, DefaultError, Options<CallToTestOrderOfParamsData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await callToTestOrderOfParams({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const duplicateNameMutation = (options?: Partial<Options<DuplicateNameData>>): UseMutationOptions<unknown, DefaultError, Options<DuplicateNameData>> => {\n    const mutationOptions: UseMutationOptions<unknown, DefaultError, Options<DuplicateNameData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await duplicateName({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const duplicateName2QueryKey = (options?: Options<DuplicateName2Data>) => createQueryKey('duplicateName2', options);\n\nexport const duplicateName2Options = (options?: Options<DuplicateName2Data>) => queryOptions<unknown, DefaultError, unknown, ReturnType<typeof duplicateName2QueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await duplicateName2({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: duplicateName2QueryKey(options)\n});\n\nexport const duplicateName3Mutation = (options?: Partial<Options<DuplicateName3Data>>): UseMutationOptions<unknown, DefaultError, Options<DuplicateName3Data>> => {\n    const mutationOptions: UseMutationOptions<unknown, DefaultError, Options<DuplicateName3Data>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await duplicateName3({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const duplicateName4Mutation = (options?: Partial<Options<DuplicateName4Data>>): UseMutationOptions<unknown, DefaultError, Options<DuplicateName4Data>> => {\n    const mutationOptions: UseMutationOptions<unknown, DefaultError, Options<DuplicateName4Data>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await duplicateName4({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const callWithNoContentResponseQueryKey = (options?: Options<CallWithNoContentResponseData>) => createQueryKey('callWithNoContentResponse', options);\n\nexport const callWithNoContentResponseOptions = (options?: Options<CallWithNoContentResponseData>) => queryOptions<CallWithNoContentResponseResponse, DefaultError, CallWithNoContentResponseResponse, ReturnType<typeof callWithNoContentResponseQueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await callWithNoContentResponse({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: callWithNoContentResponseQueryKey(options)\n});\n\nexport const callWithResponseAndNoContentResponseQueryKey = (options?: Options<CallWithResponseAndNoContentResponseData>) => createQueryKey('callWithResponseAndNoContentResponse', options);\n\nexport const callWithResponseAndNoContentResponseOptions = (options?: Options<CallWithResponseAndNoContentResponseData>) => queryOptions<CallWithResponseAndNoContentResponseResponse, DefaultError, CallWithResponseAndNoContentResponseResponse, ReturnType<typeof callWithResponseAndNoContentResponseQueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await callWithResponseAndNoContentResponse({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: callWithResponseAndNoContentResponseQueryKey(options)\n});\n\nexport const dummyAQueryKey = (options?: Options<DummyAData>) => createQueryKey('dummyA', options);\n\nexport const dummyAOptions = (options?: Options<DummyAData>) => queryOptions<DummyAResponse, DefaultError, DummyAResponse, ReturnType<typeof dummyAQueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await dummyA({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: dummyAQueryKey(options)\n});\n\nexport const dummyBQueryKey = (options?: Options<DummyBData>) => createQueryKey('dummyB', options);\n\nexport const dummyBOptions = (options?: Options<DummyBData>) => queryOptions<DummyBResponse, DefaultError, DummyBResponse, ReturnType<typeof dummyBQueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await dummyB({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: dummyBQueryKey(options)\n});\n\nexport const callWithResponseQueryKey = (options?: Options<CallWithResponseData>) => createQueryKey('callWithResponse', options);\n\nexport const callWithResponseOptions = (options?: Options<CallWithResponseData>) => queryOptions<CallWithResponseResponse, DefaultError, CallWithResponseResponse, ReturnType<typeof callWithResponseQueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await callWithResponse({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: callWithResponseQueryKey(options)\n});\n\nexport const callWithDuplicateResponsesMutation = (options?: Partial<Options<CallWithDuplicateResponsesData>>): UseMutationOptions<CallWithDuplicateResponsesResponse, CallWithDuplicateResponsesError, Options<CallWithDuplicateResponsesData>> => {\n    const mutationOptions: UseMutationOptions<CallWithDuplicateResponsesResponse, CallWithDuplicateResponsesError, Options<CallWithDuplicateResponsesData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await callWithDuplicateResponses({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const callWithResponsesMutation = (options?: Partial<Options<CallWithResponsesData>>): UseMutationOptions<CallWithResponsesResponse, CallWithResponsesError, Options<CallWithResponsesData>> => {\n    const mutationOptions: UseMutationOptions<CallWithResponsesResponse, CallWithResponsesError, Options<CallWithResponsesData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await callWithResponses({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const collectionFormatQueryKey = (options: Options<CollectionFormatData>) => createQueryKey('collectionFormat', options);\n\nexport const collectionFormatOptions = (options: Options<CollectionFormatData>) => queryOptions<unknown, DefaultError, unknown, ReturnType<typeof collectionFormatQueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await collectionFormat({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: collectionFormatQueryKey(options)\n});\n\nexport const typesQueryKey = (options: Options<TypesData>) => createQueryKey('types', options);\n\nexport const typesOptions = (options: Options<TypesData>) => queryOptions<TypesResponse, DefaultError, TypesResponse, ReturnType<typeof typesQueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await types({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: typesQueryKey(options)\n});\n\nexport const uploadFileMutation = (options?: Partial<Options<UploadFileData>>): UseMutationOptions<UploadFileResponse, DefaultError, Options<UploadFileData>> => {\n    const mutationOptions: UseMutationOptions<UploadFileResponse, DefaultError, Options<UploadFileData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await uploadFile({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const fileResponseQueryKey = (options: Options<FileResponseData>) => createQueryKey('fileResponse', options);\n\nexport const fileResponseOptions = (options: Options<FileResponseData>) => queryOptions<FileResponseResponse, DefaultError, FileResponseResponse, ReturnType<typeof fileResponseQueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await fileResponse({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: fileResponseQueryKey(options)\n});\n\nexport const complexTypesQueryKey = (options: Options<ComplexTypesData>) => createQueryKey('complexTypes', options);\n\nexport const complexTypesOptions = (options: Options<ComplexTypesData>) => queryOptions<ComplexTypesResponse, DefaultError, ComplexTypesResponse, ReturnType<typeof complexTypesQueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await complexTypes({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: complexTypesQueryKey(options)\n});\n\nexport const multipartResponseQueryKey = (options?: Options<MultipartResponseData>) => createQueryKey('multipartResponse', options);\n\nexport const multipartResponseOptions = (options?: Options<MultipartResponseData>) => queryOptions<MultipartResponseResponse, DefaultError, MultipartResponseResponse, ReturnType<typeof multipartResponseQueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await multipartResponse({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: multipartResponseQueryKey(options)\n});\n\nexport const multipartRequestMutation = (options?: Partial<Options<MultipartRequestData>>): UseMutationOptions<unknown, DefaultError, Options<MultipartRequestData>> => {\n    const mutationOptions: UseMutationOptions<unknown, DefaultError, Options<MultipartRequestData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await multipartRequest({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const complexParamsMutation = (options?: Partial<Options<ComplexParamsData>>): UseMutationOptions<ComplexParamsResponse, DefaultError, Options<ComplexParamsData>> => {\n    const mutationOptions: UseMutationOptions<ComplexParamsResponse, DefaultError, Options<ComplexParamsData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await complexParams({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const callWithResultFromHeaderMutation = (options?: Partial<Options<CallWithResultFromHeaderData>>): UseMutationOptions<unknown, DefaultError, Options<CallWithResultFromHeaderData>> => {\n    const mutationOptions: UseMutationOptions<unknown, DefaultError, Options<CallWithResultFromHeaderData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await callWithResultFromHeader({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const testErrorCodeMutation = (options?: Partial<Options<TestErrorCodeData>>): UseMutationOptions<unknown, DefaultError, Options<TestErrorCodeData>> => {\n    const mutationOptions: UseMutationOptions<unknown, DefaultError, Options<TestErrorCodeData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await testErrorCode({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const nonAsciiæøåÆøÅöôêÊ字符串Mutation = (options?: Partial<Options<NonAsciiæøåÆøÅöôêÊ字符串Data>>): UseMutationOptions<NonAsciiæøåÆøÅöôêÊ字符串Response, DefaultError, Options<NonAsciiæøåÆøÅöôêÊ字符串Data>> => {\n    const mutationOptions: UseMutationOptions<NonAsciiæøåÆøÅöôêÊ字符串Response, DefaultError, Options<NonAsciiæøåÆøÅöôêÊ字符串Data>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await nonAsciiæøåÆøÅöôêÊ字符串({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\n/**\n * Login User\n */\nexport const putWithFormUrlEncodedMutation = (options?: Partial<Options<PutWithFormUrlEncodedData>>): UseMutationOptions<unknown, DefaultError, Options<PutWithFormUrlEncodedData>> => {\n    const mutationOptions: UseMutationOptions<unknown, DefaultError, Options<PutWithFormUrlEncodedData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await putWithFormUrlEncoded({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/preact-query/fetch/client/client.gen.ts",
    "content": "// 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 (options: RequestOptions) => {\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 url = buildUrl(opts);\n\n    return { opts, url };\n  };\n\n  const request: Client['request'] = async (options) => {\n    // @ts-expect-error\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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/preact-query/fetch/client/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type { Auth } from '../core/auth.gen';\nexport type { QuerySerializerOptions } from '../core/bodySerializer.gen';\nexport {\n  formDataBodySerializer,\n  jsonBodySerializer,\n  urlSearchParamsBodySerializer,\n} from '../core/bodySerializer.gen';\nexport { buildClientParams } from '../core/params.gen';\nexport { serializeQueryKeyValue } from '../core/queryKeySerializer.gen';\nexport { createClient } from './client.gen';\nexport type {\n  Client,\n  ClientOptions,\n  Config,\n  CreateClientConfig,\n  Options,\n  RequestOptions,\n  RequestResult,\n  ResolvedRequestOptions,\n  ResponseStyle,\n  TDataShape,\n} from './types.gen';\nexport { createConfig, mergeHeaders } from './utils.gen';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/preact-query/fetch/client/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { Auth } from '../core/auth.gen';\nimport type {\n  ServerSentEventsOptions,\n  ServerSentEventsResult,\n} from '../core/serverSentEvents.gen';\nimport type { Client as CoreClient, Config as CoreConfig } from '../core/types.gen';\nimport type { Middleware } from './utils.gen';\n\nexport type ResponseStyle = 'data' | 'fields';\n\nexport interface Config<T extends ClientOptions = ClientOptions>\n  extends Omit<RequestInit, 'body' | 'headers' | 'method'>, CoreConfig {\n  /**\n   * Base URL for all requests made by this client.\n   */\n  baseUrl?: T['baseUrl'];\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   * Please don't use the Fetch client for Next.js applications. The `next`\n   * options won't have any effect.\n   *\n   * Install {@link https://www.npmjs.com/package/@hey-api/client-next `@hey-api/client-next`} instead.\n   */\n  next?: never;\n  /**\n   * Return the response data parsed in a specified format. By default, `auto`\n   * will infer the appropriate method from the `Content-Type` response header.\n   * You can override this behavior with any of the {@link Body} methods.\n   * Select `stream` if you don't want to parse response data at all.\n   *\n   * @default 'auto'\n   */\n  parseAs?: 'arrayBuffer' | 'auto' | 'blob' | 'formData' | 'json' | 'stream' | 'text';\n  /**\n   * Should we return only data or multiple fields (data, error, response, etc.)?\n   *\n   * @default 'fields'\n   */\n  responseStyle?: ResponseStyle;\n  /**\n   * Throw an error instead of returning it in the response?\n   *\n   * @default false\n   */\n  throwOnError?: T['throwOnError'];\n}\n\nexport interface RequestOptions<\n  TData = unknown,\n  TResponseStyle extends ResponseStyle = 'fields',\n  ThrowOnError extends boolean = boolean,\n  Url extends string = string,\n>\n  extends\n    Config<{\n      responseStyle: TResponseStyle;\n      throwOnError: ThrowOnError;\n    }>,\n    Pick<\n      ServerSentEventsOptions<TData>,\n      | 'onRequest'\n      | 'onSseError'\n      | 'onSseEvent'\n      | 'sseDefaultRetryDelay'\n      | 'sseMaxRetryAttempts'\n      | 'sseMaxRetryDelay'\n    > {\n  /**\n   * Any body that you want to add to your request.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/fetch#body}\n   */\n  body?: unknown;\n  path?: Record<string, unknown>;\n  query?: Record<string, unknown>;\n  /**\n   * Security mechanism(s) to use for the request.\n   */\n  security?: ReadonlyArray<Auth>;\n  url: Url;\n}\n\nexport interface ResolvedRequestOptions<\n  TResponseStyle extends ResponseStyle = 'fields',\n  ThrowOnError extends boolean = boolean,\n  Url extends string = string,\n> extends RequestOptions<unknown, TResponseStyle, ThrowOnError, Url> {\n  serializedBody?: string;\n}\n\nexport type RequestResult<\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = boolean,\n  TResponseStyle extends ResponseStyle = 'fields',\n> = ThrowOnError extends true\n  ? Promise<\n      TResponseStyle extends 'data'\n        ? TData extends Record<string, unknown>\n          ? TData[keyof TData]\n          : TData\n        : {\n            data: TData extends Record<string, unknown> ? TData[keyof TData] : TData;\n            request: Request;\n            response: Response;\n          }\n    >\n  : Promise<\n      TResponseStyle extends 'data'\n        ? (TData extends Record<string, unknown> ? TData[keyof TData] : TData) | undefined\n        : (\n            | {\n                data: TData extends Record<string, unknown> ? TData[keyof TData] : TData;\n                error: undefined;\n              }\n            | {\n                data: undefined;\n                error: TError extends Record<string, unknown> ? TError[keyof TError] : TError;\n              }\n          ) & {\n            request: Request;\n            response: Response;\n          }\n    >;\n\nexport interface ClientOptions {\n  baseUrl?: string;\n  responseStyle?: ResponseStyle;\n  throwOnError?: boolean;\n}\n\ntype MethodFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'>,\n) => RequestResult<TData, TError, ThrowOnError, TResponseStyle>;\n\ntype SseFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'>,\n) => Promise<ServerSentEventsResult<TData, TError>>;\n\ntype RequestFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'> &\n    Pick<Required<RequestOptions<TData, TResponseStyle, ThrowOnError>>, 'method'>,\n) => RequestResult<TData, TError, ThrowOnError, TResponseStyle>;\n\ntype BuildUrlFn = <\n  TData extends {\n    body?: unknown;\n    path?: Record<string, unknown>;\n    query?: Record<string, unknown>;\n    url: string;\n  },\n>(\n  options: TData & Options<TData>,\n) => string;\n\nexport type Client = CoreClient<RequestFn, Config, MethodFn, BuildUrlFn, SseFn> & {\n  interceptors: Middleware<Request, Response, unknown, ResolvedRequestOptions>;\n};\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 = ClientOptions> = (\n  override?: Config<ClientOptions & T>,\n) => Config<Required<ClientOptions> & T>;\n\nexport interface TDataShape {\n  body?: unknown;\n  headers?: unknown;\n  path?: unknown;\n  query?: unknown;\n  url: string;\n}\n\ntype OmitKeys<T, K> = Pick<T, Exclude<keyof T, K>>;\n\nexport type Options<\n  TData extends TDataShape = TDataShape,\n  ThrowOnError extends boolean = boolean,\n  TResponse = unknown,\n  TResponseStyle extends ResponseStyle = 'fields',\n> = OmitKeys<\n  RequestOptions<TResponse, TResponseStyle, ThrowOnError>,\n  'body' | 'path' | 'query' | 'url'\n> &\n  ([TData] extends [never] ? unknown : Omit<TData, 'url'>);\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/preact-query/fetch/client/utils.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/preact-query/fetch/client.gen.ts",
    "content": "// 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: 'http://localhost:3000/base' }));\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/preact-query/fetch/core/auth.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/preact-query/fetch/core/bodySerializer.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/preact-query/fetch/core/params.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/preact-query/fetch/core/pathSerializer.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/preact-query/fetch/core/queryKeySerializer.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\n/**\n * JSON-friendly union that mirrors what Pinia Colada can hash.\n */\nexport type JsonValue =\n  | null\n  | string\n  | number\n  | boolean\n  | JsonValue[]\n  | { [key: string]: JsonValue };\n\n/**\n * Replacer that converts non-JSON values (bigint, Date, etc.) to safe substitutes.\n */\nexport const queryKeyJsonReplacer = (_key: string, value: unknown) => {\n  if (value === undefined || typeof value === 'function' || typeof value === 'symbol') {\n    return undefined;\n  }\n  if (typeof value === 'bigint') {\n    return value.toString();\n  }\n  if (value instanceof Date) {\n    return value.toISOString();\n  }\n  return value;\n};\n\n/**\n * Safely stringifies a value and parses it back into a JsonValue.\n */\nexport const stringifyToJsonValue = (input: unknown): JsonValue | undefined => {\n  try {\n    const json = JSON.stringify(input, queryKeyJsonReplacer);\n    if (json === undefined) {\n      return undefined;\n    }\n    return JSON.parse(json) as JsonValue;\n  } catch {\n    return undefined;\n  }\n};\n\n/**\n * Detects plain objects (including objects with a null prototype).\n */\nconst isPlainObject = (value: unknown): value is Record<string, unknown> => {\n  if (value === null || typeof value !== 'object') {\n    return false;\n  }\n  const prototype = Object.getPrototypeOf(value as object);\n  return prototype === Object.prototype || prototype === null;\n};\n\n/**\n * Turns URLSearchParams into a sorted JSON object for deterministic keys.\n */\nconst serializeSearchParams = (params: URLSearchParams): JsonValue => {\n  const entries = Array.from(params.entries()).sort(([a], [b]) => a.localeCompare(b));\n  const result: Record<string, JsonValue> = {};\n\n  for (const [key, value] of entries) {\n    const existing = result[key];\n    if (existing === undefined) {\n      result[key] = value;\n      continue;\n    }\n\n    if (Array.isArray(existing)) {\n      (existing as string[]).push(value);\n    } else {\n      result[key] = [existing, value];\n    }\n  }\n\n  return result;\n};\n\n/**\n * Normalizes any accepted value into a JSON-friendly shape for query keys.\n */\nexport const serializeQueryKeyValue = (value: unknown): JsonValue | undefined => {\n  if (value === null) {\n    return null;\n  }\n\n  if (typeof value === 'string' || typeof value === 'number' || typeof value === 'boolean') {\n    return value;\n  }\n\n  if (value === undefined || typeof value === 'function' || typeof value === 'symbol') {\n    return undefined;\n  }\n\n  if (typeof value === 'bigint') {\n    return value.toString();\n  }\n\n  if (value instanceof Date) {\n    return value.toISOString();\n  }\n\n  if (Array.isArray(value)) {\n    return stringifyToJsonValue(value);\n  }\n\n  if (typeof URLSearchParams !== 'undefined' && value instanceof URLSearchParams) {\n    return serializeSearchParams(value);\n  }\n\n  if (isPlainObject(value)) {\n    return stringifyToJsonValue(value);\n  }\n\n  return undefined;\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/preact-query/fetch/core/serverSentEvents.gen.ts",
    "content": "// 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 const 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            // Normalize line endings: CRLF -> LF, then CR -> LF\n            buffer = buffer.replace(/\\r\\n/g, '\\n').replace(/\\r/g, '\\n');\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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/preact-query/fetch/core/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { Auth, AuthToken } from './auth.gen';\nimport type { BodySerializer, QuerySerializer, QuerySerializerOptions } from './bodySerializer.gen';\n\nexport type HttpMethod =\n  | 'connect'\n  | 'delete'\n  | 'get'\n  | 'head'\n  | 'options'\n  | 'patch'\n  | 'post'\n  | 'put'\n  | 'trace';\n\nexport type Client<\n  RequestFn = never,\n  Config = unknown,\n  MethodFn = never,\n  BuildUrlFn = never,\n  SseFn = never,\n> = {\n  /**\n   * Returns the final request URL.\n   */\n  buildUrl: BuildUrlFn;\n  getConfig: () => Config;\n  request: RequestFn;\n  setConfig: (config: Config) => Config;\n} & {\n  [K in HttpMethod]: MethodFn;\n} & ([SseFn] extends [never] ? { sse?: never } : { sse: { [K in HttpMethod]: SseFn } });\n\nexport interface Config {\n  /**\n   * Auth token or a function returning auth token. The resolved value will be\n   * added to the request payload as defined by its `security` array.\n   */\n  auth?: ((auth: Auth) => Promise<AuthToken> | AuthToken) | AuthToken;\n  /**\n   * A function for serializing request body parameter. By default,\n   * {@link JSON.stringify()} will be used.\n   */\n  bodySerializer?: BodySerializer | null;\n  /**\n   * An object containing any HTTP headers that you want to pre-populate your\n   * `Headers` object with.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/Headers/Headers#init See more}\n   */\n  headers?:\n    | RequestInit['headers']\n    | Record<\n        string,\n        string | number | boolean | (string | number | boolean)[] | null | undefined | unknown\n      >;\n  /**\n   * The request method.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/fetch#method See more}\n   */\n  method?: Uppercase<HttpMethod>;\n  /**\n   * A function for serializing request query parameters. By default, arrays\n   * will be exploded in form style, objects will be exploded in deepObject\n   * style, and reserved characters are percent-encoded.\n   *\n   * This method will have no effect if the native `paramsSerializer()` Axios\n   * API function is used.\n   *\n   * {@link https://swagger.io/docs/specification/serialization/#query View examples}\n   */\n  querySerializer?: QuerySerializer | QuerySerializerOptions;\n  /**\n   * A function validating request data. This is useful if you want to ensure\n   * the request conforms to the desired shape, so it can be safely sent to\n   * the server.\n   */\n  requestValidator?: (data: unknown) => Promise<unknown>;\n  /**\n   * A function transforming response data before it's returned. This is useful\n   * for post-processing data, e.g. converting ISO strings into Date objects.\n   */\n  responseTransformer?: (data: unknown) => Promise<unknown>;\n  /**\n   * A function validating response data. This is useful if you want to ensure\n   * the response conforms to the desired shape, so it can be safely passed to\n   * the transformers and returned to the user.\n   */\n  responseValidator?: (data: unknown) => Promise<unknown>;\n}\n\ntype IsExactlyNeverOrNeverUndefined<T> = [T] extends [never]\n  ? true\n  : [T] extends [never | undefined]\n    ? [undefined] extends [T]\n      ? false\n      : true\n    : false;\n\nexport type OmitNever<T extends Record<string, unknown>> = {\n  [K in keyof T as IsExactlyNeverOrNeverUndefined<T[K]> extends true ? never : K]: T[K];\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/preact-query/fetch/core/utils.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/preact-query/fetch/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport { apiVVersionODataControllerCount, callToTestOrderOfParams, callWithDefaultOptionalParameters, callWithDefaultParameters, callWithDescriptions, callWithDuplicateResponses, callWithNoContentResponse, callWithParameters, callWithResponse, callWithResponseAndNoContentResponse, callWithResponses, callWithResultFromHeader, callWithWeirdParameterNames, collectionFormat, complexParams, complexTypes, deleteCallWithoutParametersAndResponse, deleteFoo, deprecatedCall, dummyA, dummyB, duplicateName, duplicateName2, duplicateName3, duplicateName4, export_, fileResponse, fooWow, getApiVbyApiVersionSimpleOperation, getCallWithOptionalParam, getCallWithoutParametersAndResponse, headCallWithoutParametersAndResponse, import_, multipartRequest, multipartResponse, nonAsciiæøåÆøÅöôêÊ字符串, type Options, optionsCallWithoutParametersAndResponse, patchApiVbyApiVersionNoTag, patchCallWithoutParametersAndResponse, postApiVbyApiVersionFormData, postApiVbyApiVersionRequestBody, postCallWithOptionalParam, postCallWithoutParametersAndResponse, putCallWithoutParametersAndResponse, putWithFormUrlEncoded, testErrorCode, types, uploadFile } from './sdk.gen';\nexport type { _3eNum1Период, _400, AdditionalPropertiesIntegerIssue, AdditionalPropertiesUnknownIssue, AdditionalPropertiesUnknownIssue2, AdditionalPropertiesUnknownIssue3, AdditionalPropertiesUnknownIssueWritable, AnyOfAnyAndNull, AnyOfArrays, ApiVVersionODataControllerCountData, ApiVVersionODataControllerCountResponse, ApiVVersionODataControllerCountResponses, ArrayWithAnyOfProperties, ArrayWithArray, ArrayWithBooleans, ArrayWithNumbers, ArrayWithProperties, ArrayWithReferences, ArrayWithStrings, CallToTestOrderOfParamsData, CallWithDefaultOptionalParametersData, CallWithDefaultParametersData, CallWithDescriptionsData, CallWithDuplicateResponsesData, CallWithDuplicateResponsesError, CallWithDuplicateResponsesErrors, CallWithDuplicateResponsesResponse, CallWithDuplicateResponsesResponses, CallWithNoContentResponseData, CallWithNoContentResponseResponse, CallWithNoContentResponseResponses, CallWithParametersData, CallWithResponseAndNoContentResponseData, CallWithResponseAndNoContentResponseResponse, CallWithResponseAndNoContentResponseResponses, CallWithResponseData, CallWithResponseResponse, CallWithResponseResponses, CallWithResponsesData, CallWithResponsesError, CallWithResponsesErrors, CallWithResponsesResponse, CallWithResponsesResponses, CallWithResultFromHeaderData, CallWithResultFromHeaderErrors, CallWithResultFromHeaderResponses, CallWithWeirdParameterNamesData, CamelCaseCommentWithBreaks, CharactersInDescription, ClientOptions, CollectionFormatData, CommentWithBackticks, CommentWithBackticksAndQuotes, CommentWithBreaks, CommentWithExpressionPlaceholders, CommentWithQuotes, CommentWithReservedCharacters, CommentWithSlashes, ComplexParamsData, ComplexParamsResponse, ComplexParamsResponses, ComplexTypesData, ComplexTypesErrors, ComplexTypesResponse, ComplexTypesResponses, CompositionBaseModel, CompositionExtendedModel, CompositionWithAllOfAndNullable, CompositionWithAnyOf, CompositionWithAnyOfAndNullable, CompositionWithAnyOfAnonymous, CompositionWithNestedAnyAndTypeNull, CompositionWithNestedAnyOfAndNull, CompositionWithOneOf, CompositionWithOneOfAndComplexArrayDictionary, CompositionWithOneOfAndNullable, CompositionWithOneOfAndProperties, CompositionWithOneOfAndSimpleArrayDictionary, CompositionWithOneOfAndSimpleDictionary, CompositionWithOneOfAnonymous, CompositionWithOneOfDiscriminator, ConstValue, Default, DeleteCallWithoutParametersAndResponseData, DeleteFooData, DeleteFooData2, DeleteFooData3, DeprecatedCallData, DeprecatedModel, DictionaryWithArray, DictionaryWithDictionary, DictionaryWithProperties, DictionaryWithPropertiesAndAdditionalProperties, DictionaryWithReference, DictionaryWithString, DummyAData, DummyAResponse, DummyAResponses, DummyBData, DummyBResponse, DummyBResponses, DuplicateName2Data, DuplicateName3Data, DuplicateName4Data, DuplicateNameData, EnumFromDescription, EnumWithExtensions, EnumWithNumbers, EnumWithReplacedCharacters, EnumWithStrings, EnumWithXEnumNames, ExportData, ExternalRefA, ExternalRefB, ExternalSharedModel, File, FileResponseData, FileResponseResponse, FileResponseResponses, FileWritable, FooWowData, FooWowResponses, FreeFormObjectWithAdditionalPropertiesEqEmptyObject, FreeFormObjectWithAdditionalPropertiesEqTrue, FreeFormObjectWithoutAdditionalProperties, GenericSchemaDuplicateIssue1SystemBoolean, GenericSchemaDuplicateIssue1SystemBooleanWritable, GenericSchemaDuplicateIssue1SystemString, GenericSchemaDuplicateIssue1SystemStringWritable, GetApiVbyApiVersionSimpleOperationData, GetApiVbyApiVersionSimpleOperationError, GetApiVbyApiVersionSimpleOperationErrors, GetApiVbyApiVersionSimpleOperationResponse, GetApiVbyApiVersionSimpleOperationResponses, GetCallWithOptionalParamData, GetCallWithoutParametersAndResponseData, HeadCallWithoutParametersAndResponseData, Import, ImportData, ImportResponse, ImportResponses, IoK8sApimachineryPkgApisMetaV1DeleteOptions, IoK8sApimachineryPkgApisMetaV1Preconditions, ModelCircle, ModelFromZendesk, ModelSquare, ModelThatExtends, ModelThatExtendsExtends, ModelWithAdditionalPropertiesEqTrue, ModelWithAdditionalPropertiesRef, ModelWithAnyOfConstantSizeArray, ModelWithAnyOfConstantSizeArrayAndIntersect, ModelWithAnyOfConstantSizeArrayNullable, ModelWithAnyOfConstantSizeArrayWithNSizeAndOptions, ModelWithAnyOfConstantSizeArrayWithNSizeAndOptionsWritable, ModelWithArray, ModelWithArrayReadOnlyAndWriteOnly, ModelWithArrayReadOnlyAndWriteOnlyWritable, ModelWithBackticksInDescription, ModelWithBoolean, ModelWithCircularReference, ModelWithConst, ModelWithConstantSizeArray, ModelWithDictionary, ModelWithDuplicateImports, ModelWithDuplicateProperties, ModelWithEnum, ModelWithEnumFromDescription, ModelWithEnumWithHyphen, ModelWithInteger, ModelWithNestedArrayEnums, ModelWithNestedArrayEnumsData, ModelWithNestedArrayEnumsDataBar, ModelWithNestedArrayEnumsDataFoo, ModelWithNestedCompositionEnums, ModelWithNestedEnums, ModelWithNestedProperties, ModelWithNullableObject, ModelWithNullableString, ModelWithNumericEnumUnion, ModelWithOneOfAndProperties, ModelWithOneOfEnum, ModelWithOrderedProperties, ModelWithPattern, ModelWithPatternWritable, ModelWithPrefixItemsConstantSizeArray, ModelWithProperties, ModelWithPropertiesWritable, ModelWithReadOnlyAndWriteOnly, ModelWithReadOnlyAndWriteOnlyWritable, ModelWithReference, ModelWithReferenceWritable, ModelWithString, ModelWithStringError, MultipartRequestData, MultipartResponseData, MultipartResponseResponse, MultipartResponseResponses, NestedAnyOfArraysNullable, NonAsciiæøåÆøÅöôêÊ字符串Data, NonAsciiæøåÆøÅöôêÊ字符串Response, NonAsciiæøåÆøÅöôêÊ字符串Responses, NonAsciiStringæøåÆøÅöôêÊ字符串, NullableObject, OneOfAllOfIssue, OneOfAllOfIssueWritable, OptionsCallWithoutParametersAndResponseData, Pageable, ParameterSimpleParameterUnused, PatchApiVbyApiVersionNoTagData, PatchApiVbyApiVersionNoTagResponses, PatchCallWithoutParametersAndResponseData, PostApiVbyApiVersionFormDataData, PostApiVbyApiVersionRequestBodyData, PostCallWithOptionalParamData, PostCallWithOptionalParamResponse, PostCallWithOptionalParamResponses, PostCallWithoutParametersAndResponseData, PostServiceWithEmptyTagResponse, PostServiceWithEmptyTagResponse2, PutCallWithoutParametersAndResponseData, PutWithFormUrlEncodedData, SchemaWithFormRestrictedKeys, SimpleBoolean, SimpleFile, SimpleFormData, SimpleInteger, SimpleParameter, SimpleReference, SimpleRequestBody, SimpleString, SimpleStringWithPattern, TestErrorCodeData, TestErrorCodeErrors, TestErrorCodeResponses, TypesData, TypesResponse, TypesResponses, UploadFileData, UploadFileResponse, UploadFileResponses, XFooBar } from './types.gen';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/preact-query/fetch/sdk.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport { type Client, formDataBodySerializer, type Options as Options2, type TDataShape, urlSearchParamsBodySerializer } from './client';\nimport { client } from './client.gen';\nimport type { ApiVVersionODataControllerCountData, ApiVVersionODataControllerCountResponses, CallToTestOrderOfParamsData, CallWithDefaultOptionalParametersData, CallWithDefaultParametersData, CallWithDescriptionsData, CallWithDuplicateResponsesData, CallWithDuplicateResponsesErrors, CallWithDuplicateResponsesResponses, CallWithNoContentResponseData, CallWithNoContentResponseResponses, CallWithParametersData, CallWithResponseAndNoContentResponseData, CallWithResponseAndNoContentResponseResponses, CallWithResponseData, CallWithResponseResponses, CallWithResponsesData, CallWithResponsesErrors, CallWithResponsesResponses, CallWithResultFromHeaderData, CallWithResultFromHeaderErrors, CallWithResultFromHeaderResponses, CallWithWeirdParameterNamesData, CollectionFormatData, ComplexParamsData, ComplexParamsResponses, ComplexTypesData, ComplexTypesErrors, ComplexTypesResponses, DeleteCallWithoutParametersAndResponseData, DeleteFooData3, DeprecatedCallData, DummyAData, DummyAResponses, DummyBData, DummyBResponses, DuplicateName2Data, DuplicateName3Data, DuplicateName4Data, DuplicateNameData, ExportData, FileResponseData, FileResponseResponses, FooWowData, FooWowResponses, GetApiVbyApiVersionSimpleOperationData, GetApiVbyApiVersionSimpleOperationErrors, GetApiVbyApiVersionSimpleOperationResponses, GetCallWithOptionalParamData, GetCallWithoutParametersAndResponseData, HeadCallWithoutParametersAndResponseData, ImportData, ImportResponses, MultipartRequestData, MultipartResponseData, MultipartResponseResponses, NonAsciiæøåÆøÅöôêÊ字符串Data, NonAsciiæøåÆøÅöôêÊ字符串Responses, OptionsCallWithoutParametersAndResponseData, PatchApiVbyApiVersionNoTagData, PatchApiVbyApiVersionNoTagResponses, PatchCallWithoutParametersAndResponseData, PostApiVbyApiVersionFormDataData, PostApiVbyApiVersionRequestBodyData, PostCallWithOptionalParamData, PostCallWithOptionalParamResponses, PostCallWithoutParametersAndResponseData, PutCallWithoutParametersAndResponseData, PutWithFormUrlEncodedData, TestErrorCodeData, TestErrorCodeErrors, TestErrorCodeResponses, TypesData, TypesResponses, UploadFileData, UploadFileResponses } from './types.gen';\n\nexport type Options<TData extends TDataShape = TDataShape, ThrowOnError extends boolean = boolean> = Options2<TData, ThrowOnError> & {\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\nexport const export_ = <ThrowOnError extends boolean = false>(options?: Options<ExportData, ThrowOnError>) => (options?.client ?? client).get<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/no+tag', ...options });\n\nexport const patchApiVbyApiVersionNoTag = <ThrowOnError extends boolean = false>(options?: Options<PatchApiVbyApiVersionNoTagData, ThrowOnError>) => (options?.client ?? client).patch<PatchApiVbyApiVersionNoTagResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/no+tag', ...options });\n\nexport const import_ = <ThrowOnError extends boolean = false>(options: Options<ImportData, ThrowOnError>) => (options.client ?? client).post<ImportResponses, unknown, ThrowOnError>({\n    url: '/api/v{api-version}/no+tag',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options.headers\n    }\n});\n\nexport const fooWow = <ThrowOnError extends boolean = false>(options?: Options<FooWowData, ThrowOnError>) => (options?.client ?? client).put<FooWowResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/no+tag', ...options });\n\nexport const apiVVersionODataControllerCount = <ThrowOnError extends boolean = false>(options?: Options<ApiVVersionODataControllerCountData, ThrowOnError>) => (options?.client ?? client).get<ApiVVersionODataControllerCountResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple/$count', ...options });\n\nexport const getApiVbyApiVersionSimpleOperation = <ThrowOnError extends boolean = false>(options: Options<GetApiVbyApiVersionSimpleOperationData, ThrowOnError>) => (options.client ?? client).get<GetApiVbyApiVersionSimpleOperationResponses, GetApiVbyApiVersionSimpleOperationErrors, ThrowOnError>({ url: '/api/v{api-version}/simple:operation', ...options });\n\nexport const deleteCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<DeleteCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).delete<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const getCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<GetCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).get<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const headCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<HeadCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).head<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const optionsCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<OptionsCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).options<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const patchCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<PatchCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).patch<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const postCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<PostCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).post<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const putCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<PutCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).put<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const deleteFoo = <ThrowOnError extends boolean = false>(options: Options<DeleteFooData3, ThrowOnError>) => (options.client ?? client).delete<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/foo/{foo_param}/bar/{BarParam}', ...options });\n\nexport const callWithDescriptions = <ThrowOnError extends boolean = false>(options?: Options<CallWithDescriptionsData, ThrowOnError>) => (options?.client ?? client).post<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/descriptions', ...options });\n\n/**\n * @deprecated\n */\nexport const deprecatedCall = <ThrowOnError extends boolean = false>(options: Options<DeprecatedCallData, ThrowOnError>) => (options.client ?? client).post<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/parameters/deprecated', ...options });\n\nexport const callWithParameters = <ThrowOnError extends boolean = false>(options: Options<CallWithParametersData, ThrowOnError>) => (options.client ?? client).post<unknown, unknown, ThrowOnError>({\n    url: '/api/v{api-version}/parameters/{parameterPath}',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options.headers\n    }\n});\n\nexport const callWithWeirdParameterNames = <ThrowOnError extends boolean = false>(options: Options<CallWithWeirdParameterNamesData, ThrowOnError>) => (options.client ?? client).post<unknown, unknown, ThrowOnError>({\n    url: '/api/v{api-version}/parameters/{parameter.path.1}/{parameter-path-2}/{PARAMETER-PATH-3}',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options.headers\n    }\n});\n\nexport const getCallWithOptionalParam = <ThrowOnError extends boolean = false>(options: Options<GetCallWithOptionalParamData, ThrowOnError>) => (options.client ?? client).get<unknown, unknown, ThrowOnError>({\n    url: '/api/v{api-version}/parameters',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options.headers\n    }\n});\n\nexport const postCallWithOptionalParam = <ThrowOnError extends boolean = false>(options: Options<PostCallWithOptionalParamData, ThrowOnError>) => (options.client ?? client).post<PostCallWithOptionalParamResponses, unknown, ThrowOnError>({\n    url: '/api/v{api-version}/parameters',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options.headers\n    }\n});\n\nexport const postApiVbyApiVersionRequestBody = <ThrowOnError extends boolean = false>(options?: Options<PostApiVbyApiVersionRequestBodyData, ThrowOnError>) => (options?.client ?? client).post<unknown, unknown, ThrowOnError>({\n    url: '/api/v{api-version}/requestBody',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options?.headers\n    }\n});\n\nexport const postApiVbyApiVersionFormData = <ThrowOnError extends boolean = false>(options?: Options<PostApiVbyApiVersionFormDataData, ThrowOnError>) => (options?.client ?? client).post<unknown, unknown, ThrowOnError>({\n    ...formDataBodySerializer,\n    url: '/api/v{api-version}/formData',\n    ...options,\n    headers: {\n        'Content-Type': null,\n        ...options?.headers\n    }\n});\n\nexport const callWithDefaultParameters = <ThrowOnError extends boolean = false>(options?: Options<CallWithDefaultParametersData, ThrowOnError>) => (options?.client ?? client).get<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/defaults', ...options });\n\nexport const callWithDefaultOptionalParameters = <ThrowOnError extends boolean = false>(options?: Options<CallWithDefaultOptionalParametersData, ThrowOnError>) => (options?.client ?? client).post<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/defaults', ...options });\n\nexport const callToTestOrderOfParams = <ThrowOnError extends boolean = false>(options: Options<CallToTestOrderOfParamsData, ThrowOnError>) => (options.client ?? client).put<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/defaults', ...options });\n\nexport const duplicateName = <ThrowOnError extends boolean = false>(options?: Options<DuplicateNameData, ThrowOnError>) => (options?.client ?? client).delete<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/duplicate', ...options });\n\nexport const duplicateName2 = <ThrowOnError extends boolean = false>(options?: Options<DuplicateName2Data, ThrowOnError>) => (options?.client ?? client).get<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/duplicate', ...options });\n\nexport const duplicateName3 = <ThrowOnError extends boolean = false>(options?: Options<DuplicateName3Data, ThrowOnError>) => (options?.client ?? client).post<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/duplicate', ...options });\n\nexport const duplicateName4 = <ThrowOnError extends boolean = false>(options?: Options<DuplicateName4Data, ThrowOnError>) => (options?.client ?? client).put<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/duplicate', ...options });\n\nexport const callWithNoContentResponse = <ThrowOnError extends boolean = false>(options?: Options<CallWithNoContentResponseData, ThrowOnError>) => (options?.client ?? client).get<CallWithNoContentResponseResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/no-content', ...options });\n\nexport const callWithResponseAndNoContentResponse = <ThrowOnError extends boolean = false>(options?: Options<CallWithResponseAndNoContentResponseData, ThrowOnError>) => (options?.client ?? client).get<CallWithResponseAndNoContentResponseResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/multiple-tags/response-and-no-content', ...options });\n\nexport const dummyA = <ThrowOnError extends boolean = false>(options?: Options<DummyAData, ThrowOnError>) => (options?.client ?? client).get<DummyAResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/multiple-tags/a', ...options });\n\nexport const dummyB = <ThrowOnError extends boolean = false>(options?: Options<DummyBData, ThrowOnError>) => (options?.client ?? client).get<DummyBResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/multiple-tags/b', ...options });\n\nexport const callWithResponse = <ThrowOnError extends boolean = false>(options?: Options<CallWithResponseData, ThrowOnError>) => (options?.client ?? client).get<CallWithResponseResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/response', ...options });\n\nexport const callWithDuplicateResponses = <ThrowOnError extends boolean = false>(options?: Options<CallWithDuplicateResponsesData, ThrowOnError>) => (options?.client ?? client).post<CallWithDuplicateResponsesResponses, CallWithDuplicateResponsesErrors, ThrowOnError>({ url: '/api/v{api-version}/response', ...options });\n\nexport const callWithResponses = <ThrowOnError extends boolean = false>(options?: Options<CallWithResponsesData, ThrowOnError>) => (options?.client ?? client).put<CallWithResponsesResponses, CallWithResponsesErrors, ThrowOnError>({ url: '/api/v{api-version}/response', ...options });\n\nexport const collectionFormat = <ThrowOnError extends boolean = false>(options: Options<CollectionFormatData, ThrowOnError>) => (options.client ?? client).get<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/collectionFormat', ...options });\n\nexport const types = <ThrowOnError extends boolean = false>(options: Options<TypesData, ThrowOnError>) => (options.client ?? client).get<TypesResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/types', ...options });\n\nexport const uploadFile = <ThrowOnError extends boolean = false>(options: Options<UploadFileData, ThrowOnError>) => (options.client ?? client).post<UploadFileResponses, unknown, ThrowOnError>({\n    ...urlSearchParamsBodySerializer,\n    url: '/api/v{api-version}/upload',\n    ...options,\n    headers: {\n        'Content-Type': 'application/x-www-form-urlencoded',\n        ...options.headers\n    }\n});\n\nexport const fileResponse = <ThrowOnError extends boolean = false>(options: Options<FileResponseData, ThrowOnError>) => (options.client ?? client).get<FileResponseResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/file/{id}', ...options });\n\nexport const complexTypes = <ThrowOnError extends boolean = false>(options: Options<ComplexTypesData, ThrowOnError>) => (options.client ?? client).get<ComplexTypesResponses, ComplexTypesErrors, ThrowOnError>({\n    querySerializer: { parameters: { parameterObject: { object: { style: 'form' } } } },\n    url: '/api/v{api-version}/complex',\n    ...options\n});\n\nexport const multipartResponse = <ThrowOnError extends boolean = false>(options?: Options<MultipartResponseData, ThrowOnError>) => (options?.client ?? client).get<MultipartResponseResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/multipart', ...options });\n\nexport const multipartRequest = <ThrowOnError extends boolean = false>(options?: Options<MultipartRequestData, ThrowOnError>) => (options?.client ?? client).post<unknown, unknown, ThrowOnError>({\n    ...formDataBodySerializer,\n    url: '/api/v{api-version}/multipart',\n    ...options,\n    headers: {\n        'Content-Type': null,\n        ...options?.headers\n    }\n});\n\nexport const complexParams = <ThrowOnError extends boolean = false>(options: Options<ComplexParamsData, ThrowOnError>) => (options.client ?? client).put<ComplexParamsResponses, unknown, ThrowOnError>({\n    url: '/api/v{api-version}/complex/{id}',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json-patch+json',\n        ...options.headers\n    }\n});\n\nexport const callWithResultFromHeader = <ThrowOnError extends boolean = false>(options?: Options<CallWithResultFromHeaderData, ThrowOnError>) => (options?.client ?? client).post<CallWithResultFromHeaderResponses, CallWithResultFromHeaderErrors, ThrowOnError>({ url: '/api/v{api-version}/header', ...options });\n\nexport const testErrorCode = <ThrowOnError extends boolean = false>(options: Options<TestErrorCodeData, ThrowOnError>) => (options.client ?? client).post<TestErrorCodeResponses, TestErrorCodeErrors, ThrowOnError>({ url: '/api/v{api-version}/error', ...options });\n\nexport const nonAsciiæøåÆøÅöôêÊ字符串 = <ThrowOnError extends boolean = false>(options: Options<NonAsciiæøåÆøÅöôêÊ字符串Data, ThrowOnError>) => (options.client ?? client).post<NonAsciiæøåÆøÅöôêÊ字符串Responses, unknown, ThrowOnError>({ url: '/api/v{api-version}/non-ascii-æøåÆØÅöôêÊ字符串', ...options });\n\n/**\n * Login User\n */\nexport const putWithFormUrlEncoded = <ThrowOnError extends boolean = false>(options: Options<PutWithFormUrlEncodedData, ThrowOnError>) => (options.client ?? client).put<unknown, unknown, ThrowOnError>({\n    ...urlSearchParamsBodySerializer,\n    url: '/api/v{api-version}/non-ascii-æøåÆØÅöôêÊ字符串',\n    ...options,\n    headers: {\n        'Content-Type': 'application/x-www-form-urlencoded',\n        ...options.headers\n    }\n});\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/preact-query/fetch/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type ClientOptions = {\n    baseUrl: 'http://localhost:3000/base' | (string & {});\n};\n\n/**\n * Model with number-only name\n */\nexport type _400 = string;\n\nexport type ExternalRefA = ExternalSharedModel;\n\nexport type ExternalRefB = ExternalSharedModel;\n\n/**\n * Testing multiline comments in string: First line\n * Second line\n *\n * Fourth line\n */\nexport type CamelCaseCommentWithBreaks = number;\n\n/**\n * Testing multiline comments in string: First line\n * Second line\n *\n * Fourth line\n */\nexport type CommentWithBreaks = number;\n\n/**\n * Testing backticks in string: `backticks` and ```multiple backticks``` should work\n */\nexport type CommentWithBackticks = number;\n\n/**\n * Testing backticks and quotes in string: `backticks`, 'quotes', \"double quotes\" and ```multiple backticks``` should work\n */\nexport type CommentWithBackticksAndQuotes = number;\n\n/**\n * Testing slashes in string: \\backwards\\\\\\ and /forwards/// should work\n */\nexport type CommentWithSlashes = number;\n\n/**\n * Testing expression placeholders in string: ${expression} should work\n */\nexport type CommentWithExpressionPlaceholders = number;\n\n/**\n * Testing quotes in string: 'single quote''' and \"double quotes\"\"\" should work\n */\nexport type CommentWithQuotes = number;\n\n/**\n * Testing reserved characters in string: * inline * and ** inline ** should work\n */\nexport type CommentWithReservedCharacters = number;\n\n/**\n * This is a simple number\n */\nexport type SimpleInteger = number;\n\n/**\n * This is a simple boolean\n */\nexport type SimpleBoolean = boolean;\n\n/**\n * This is a simple string\n */\nexport type SimpleString = string;\n\n/**\n * A string with non-ascii (unicode) characters valid in typescript identifiers (æøåÆØÅöÔèÈ字符串)\n */\nexport type NonAsciiStringæøåÆøÅöôêÊ字符串 = string;\n\n/**\n * This is a simple file\n */\nexport type SimpleFile = Blob | File;\n\n/**\n * This is a simple reference\n */\nexport type SimpleReference = ModelWithString;\n\n/**\n * This is a simple string\n */\nexport type SimpleStringWithPattern = string | null;\n\n/**\n * This is a simple enum with strings\n */\nexport type EnumWithStrings = 'Success' | 'Warning' | 'Error' | '\\'Single Quote\\'' | '\"Double Quotes\"' | 'Non-ascii: øæåôöØÆÅÔÖ字符串';\n\nexport type EnumWithReplacedCharacters = '\\'Single Quote\\'' | '\"Double Quotes\"' | 'øæåôöØÆÅÔÖ字符串' | 3.1 | '';\n\n/**\n * This is a simple enum with numbers\n */\nexport type EnumWithNumbers = 1 | 2 | 3 | 1.1 | 1.2 | 1.3 | 100 | 200 | 300 | -100 | -200 | -300 | -1.1 | -1.2 | -1.3;\n\n/**\n * Success=1,Warning=2,Error=3\n */\nexport type EnumFromDescription = number;\n\n/**\n * This is a simple enum with numbers\n */\nexport type EnumWithExtensions = 200 | 400 | 500;\n\nexport type EnumWithXEnumNames = 0 | 1 | 2;\n\n/**\n * This is a simple array with numbers\n */\nexport type ArrayWithNumbers = Array<number>;\n\n/**\n * This is a simple array with booleans\n */\nexport type ArrayWithBooleans = Array<boolean>;\n\n/**\n * This is a simple array with strings\n */\nexport type ArrayWithStrings = Array<string>;\n\n/**\n * This is a simple array with references\n */\nexport type ArrayWithReferences = Array<ModelWithString>;\n\n/**\n * This is a simple array containing an array\n */\nexport type ArrayWithArray = Array<Array<ModelWithString>>;\n\n/**\n * This is a simple array with properties\n */\nexport type ArrayWithProperties = Array<{\n    '16x16'?: CamelCaseCommentWithBreaks;\n    bar?: string;\n}>;\n\n/**\n * This is a simple array with any of properties\n */\nexport type ArrayWithAnyOfProperties = Array<{\n    foo?: string;\n} | {\n    bar?: string;\n}>;\n\nexport type AnyOfAnyAndNull = {\n    data?: unknown;\n};\n\n/**\n * This is a simple array with any of properties\n */\nexport type AnyOfArrays = {\n    results?: Array<{\n        foo?: string;\n    } | {\n        bar?: string;\n    }>;\n};\n\n/**\n * This is a string dictionary\n */\nexport type DictionaryWithString = {\n    [key: string]: string;\n};\n\nexport type DictionaryWithPropertiesAndAdditionalProperties = {\n    foo?: number;\n    bar?: boolean;\n    [key: string]: string | number | boolean | undefined;\n};\n\n/**\n * This is a string reference\n */\nexport type DictionaryWithReference = {\n    [key: string]: ModelWithString;\n};\n\n/**\n * This is a complex dictionary\n */\nexport type DictionaryWithArray = {\n    [key: string]: Array<ModelWithString>;\n};\n\n/**\n * This is a string dictionary\n */\nexport type DictionaryWithDictionary = {\n    [key: string]: {\n        [key: string]: string;\n    };\n};\n\n/**\n * This is a complex dictionary\n */\nexport type DictionaryWithProperties = {\n    [key: string]: {\n        foo?: string;\n        bar?: string;\n    };\n};\n\n/**\n * This is a model with one number property\n */\nexport type ModelWithInteger = {\n    /**\n     * This is a simple number property\n     */\n    prop?: number;\n};\n\n/**\n * This is a model with one boolean property\n */\nexport type ModelWithBoolean = {\n    /**\n     * This is a simple boolean property\n     */\n    prop?: boolean;\n};\n\n/**\n * This is a model with one string property\n */\nexport type ModelWithString = {\n    /**\n     * This is a simple string property\n     */\n    prop?: string;\n};\n\n/**\n * This is a model with one string property\n */\nexport type ModelWithStringError = {\n    /**\n     * This is a simple string property\n     */\n    prop?: string;\n};\n\n/**\n * `Comment` or `VoiceComment`. The JSON object for adding voice comments to tickets is different. See [Adding voice comments to tickets](/documentation/ticketing/managing-tickets/adding-voice-comments-to-tickets)\n */\nexport type ModelFromZendesk = string;\n\n/**\n * This is a model with one string property\n */\nexport type ModelWithNullableString = {\n    /**\n     * This is a simple string property\n     */\n    nullableProp1?: string | null;\n    /**\n     * This is a simple string property\n     */\n    nullableRequiredProp1: string | null;\n    /**\n     * This is a simple string property\n     */\n    nullableProp2?: string | null;\n    /**\n     * This is a simple string property\n     */\n    nullableRequiredProp2: string | null;\n    /**\n     * This is a simple enum with strings\n     */\n    'foo_bar-enum'?: 'Success' | 'Warning' | 'Error' | 'ØÆÅ字符串';\n};\n\n/**\n * This is a model with one enum\n */\nexport type ModelWithEnum = {\n    /**\n     * This is a simple enum with strings\n     */\n    'foo_bar-enum'?: 'Success' | 'Warning' | 'Error' | 'ØÆÅ字符串';\n    /**\n     * These are the HTTP error code enums\n     */\n    statusCode?: '100' | '200 FOO' | '300 FOO_BAR' | '400 foo-bar' | '500 foo.bar' | '600 foo&bar';\n    /**\n     * Simple boolean enum\n     */\n    bool?: true;\n};\n\n/**\n * This is a model with one enum with escaped name\n */\nexport type ModelWithEnumWithHyphen = {\n    /**\n     * Foo-Bar-Baz-Qux\n     */\n    'foo-bar-baz-qux'?: '3.0';\n};\n\n/**\n * This is a model with one enum\n */\nexport type ModelWithEnumFromDescription = {\n    /**\n     * Success=1,Warning=2,Error=3\n     */\n    test?: number;\n};\n\n/**\n * This is a model with nested enums\n */\nexport type ModelWithNestedEnums = {\n    dictionaryWithEnum?: {\n        [key: string]: 'Success' | 'Warning' | 'Error';\n    };\n    dictionaryWithEnumFromDescription?: {\n        [key: string]: number;\n    };\n    arrayWithEnum?: Array<'Success' | 'Warning' | 'Error'>;\n    arrayWithDescription?: Array<number>;\n    /**\n     * This is a simple enum with strings\n     */\n    'foo_bar-enum'?: 'Success' | 'Warning' | 'Error' | 'ØÆÅ字符串';\n};\n\n/**\n * This is a model with one property containing a reference\n */\nexport type ModelWithReference = {\n    prop?: ModelWithProperties;\n};\n\n/**\n * This is a model with one property containing an array\n */\nexport type ModelWithArrayReadOnlyAndWriteOnly = {\n    prop?: Array<ModelWithReadOnlyAndWriteOnly>;\n    propWithFile?: Array<Blob | File>;\n    propWithNumber?: Array<number>;\n};\n\n/**\n * This is a model with one property containing an array\n */\nexport type ModelWithArray = {\n    prop?: Array<ModelWithString>;\n    propWithFile?: Array<Blob | File>;\n    propWithNumber?: Array<number>;\n};\n\n/**\n * This is a model with one property containing a dictionary\n */\nexport type ModelWithDictionary = {\n    prop?: {\n        [key: string]: string;\n    };\n};\n\n/**\n * This is a deprecated model with a deprecated property\n *\n * @deprecated\n */\nexport type DeprecatedModel = {\n    /**\n     * This is a deprecated property\n     *\n     * @deprecated\n     */\n    prop?: string;\n};\n\n/**\n * This is a model with one property containing a circular reference\n */\nexport type ModelWithCircularReference = {\n    prop?: ModelWithCircularReference;\n};\n\n/**\n * This is a model with one property with a 'one of' relationship\n */\nexport type CompositionWithOneOf = {\n    propA?: ModelWithString | ModelWithEnum | ModelWithArray | ModelWithDictionary;\n};\n\n/**\n * This is a model with one property with a 'one of' relationship where the options are not $ref\n */\nexport type CompositionWithOneOfAnonymous = {\n    propA?: {\n        propA?: string;\n    } | string | number;\n};\n\n/**\n * Circle\n */\nexport type ModelCircle = {\n    kind: string;\n    radius?: number;\n};\n\n/**\n * Square\n */\nexport type ModelSquare = {\n    kind: string;\n    sideLength?: number;\n};\n\n/**\n * This is a model with one property with a 'one of' relationship where the options are not $ref\n */\nexport type CompositionWithOneOfDiscriminator = ({\n    kind: 'circle';\n} & ModelCircle) | ({\n    kind: 'square';\n} & ModelSquare);\n\n/**\n * This is a model with one property with a 'any of' relationship\n */\nexport type CompositionWithAnyOf = {\n    propA?: ModelWithString | ModelWithEnum | ModelWithArray | ModelWithDictionary;\n};\n\n/**\n * This is a model with one property with a 'any of' relationship where the options are not $ref\n */\nexport type CompositionWithAnyOfAnonymous = {\n    propA?: {\n        propA?: string;\n    } | string | number;\n};\n\n/**\n * This is a model with nested 'any of' property with a type null\n */\nexport type CompositionWithNestedAnyAndTypeNull = {\n    propA?: Array<ModelWithDictionary | null> | Array<ModelWithArray | null>;\n};\n\nexport type _3eNum1Период = 'Bird' | 'Dog';\n\nexport type ConstValue = 'ConstValue';\n\n/**\n * This is a model with one property with a 'any of' relationship where the options are not $ref\n */\nexport type CompositionWithNestedAnyOfAndNull = {\n    propA?: Array<_3eNum1Период | ConstValue> | null;\n};\n\n/**\n * This is a model with one property with a 'one of' relationship\n */\nexport type CompositionWithOneOfAndNullable = {\n    propA?: {\n        boolean?: boolean;\n    } | ModelWithEnum | ModelWithArray | ModelWithDictionary | null;\n};\n\n/**\n * This is a model that contains a simple dictionary within composition\n */\nexport type CompositionWithOneOfAndSimpleDictionary = {\n    propA?: boolean | {\n        [key: string]: number;\n    };\n};\n\n/**\n * This is a model that contains a dictionary of simple arrays within composition\n */\nexport type CompositionWithOneOfAndSimpleArrayDictionary = {\n    propA?: boolean | {\n        [key: string]: Array<boolean>;\n    };\n};\n\n/**\n * This is a model that contains a dictionary of complex arrays (composited) within composition\n */\nexport type CompositionWithOneOfAndComplexArrayDictionary = {\n    propA?: boolean | {\n        [key: string]: Array<number | string>;\n    };\n};\n\n/**\n * This is a model with one property with a 'all of' relationship\n */\nexport type CompositionWithAllOfAndNullable = {\n    propA?: ({\n        boolean?: boolean;\n    } & ModelWithEnum & ModelWithArray & ModelWithDictionary) | null;\n};\n\n/**\n * This is a model with one property with a 'any of' relationship\n */\nexport type CompositionWithAnyOfAndNullable = {\n    propA?: {\n        boolean?: boolean;\n    } | ModelWithEnum | ModelWithArray | ModelWithDictionary | null;\n};\n\n/**\n * This is a base model with two simple optional properties\n */\nexport type CompositionBaseModel = {\n    firstName?: string;\n    lastname?: string;\n};\n\n/**\n * This is a model that extends the base model\n */\nexport type CompositionExtendedModel = CompositionBaseModel & {\n    age: number;\n    firstName: string;\n    lastname: string;\n};\n\n/**\n * This is a model with one nested property\n */\nexport type ModelWithProperties = {\n    required: string;\n    readonly requiredAndReadOnly: string;\n    requiredAndNullable: string | null;\n    string?: string;\n    number?: number;\n    boolean?: boolean;\n    reference?: ModelWithString;\n    'property with space'?: string;\n    default?: string;\n    try?: string;\n    readonly '@namespace.string'?: string;\n    readonly '@namespace.integer'?: number;\n};\n\n/**\n * This is a model with one nested property\n */\nexport type ModelWithNestedProperties = {\n    readonly first: {\n        readonly second: {\n            readonly third: string | null;\n        } | null;\n    } | null;\n};\n\n/**\n * This is a model with duplicated properties\n */\nexport type ModelWithDuplicateProperties = {\n    prop?: ModelWithString;\n};\n\n/**\n * This is a model with ordered properties\n */\nexport type ModelWithOrderedProperties = {\n    zebra?: string;\n    apple?: string;\n    hawaii?: string;\n};\n\n/**\n * This is a model with duplicated imports\n */\nexport type ModelWithDuplicateImports = {\n    propA?: ModelWithString;\n    propB?: ModelWithString;\n    propC?: ModelWithString;\n};\n\n/**\n * This is a model that extends another model\n */\nexport type ModelThatExtends = ModelWithString & {\n    propExtendsA?: string;\n    propExtendsB?: ModelWithString;\n};\n\n/**\n * This is a model that extends another model\n */\nexport type ModelThatExtendsExtends = ModelWithString & ModelThatExtends & {\n    propExtendsC?: string;\n    propExtendsD?: ModelWithString;\n};\n\n/**\n * This is a model that contains a some patterns\n */\nexport type ModelWithPattern = {\n    key: string;\n    name: string;\n    readonly enabled?: boolean;\n    readonly modified?: string;\n    id?: string;\n    text?: string;\n    patternWithSingleQuotes?: string;\n    patternWithNewline?: string;\n    patternWithBacktick?: string;\n    patternWithUnicode?: string;\n};\n\nexport type File = {\n    /**\n     * Id\n     */\n    readonly id?: string;\n    /**\n     * Updated at\n     */\n    readonly updated_at?: string;\n    /**\n     * Created at\n     */\n    readonly created_at?: string;\n    /**\n     * Mime\n     */\n    mime: string;\n    /**\n     * File\n     */\n    readonly file?: string;\n};\n\nexport type Default = {\n    name?: string;\n};\n\nexport type Pageable = {\n    page?: number;\n    size?: number;\n    sort?: Array<string>;\n};\n\n/**\n * This is a free-form object without additionalProperties.\n */\nexport type FreeFormObjectWithoutAdditionalProperties = {\n    [key: string]: unknown;\n};\n\n/**\n * This is a free-form object with additionalProperties: true.\n */\nexport type FreeFormObjectWithAdditionalPropertiesEqTrue = {\n    [key: string]: unknown;\n};\n\n/**\n * This is a free-form object with additionalProperties: {}.\n */\nexport type FreeFormObjectWithAdditionalPropertiesEqEmptyObject = {\n    [key: string]: unknown;\n};\n\nexport type ModelWithConst = {\n    String?: 'String';\n    number?: 0;\n    null?: unknown;\n    withType?: 'Some string';\n};\n\n/**\n * This is a model with one property and additionalProperties: true\n */\nexport type ModelWithAdditionalPropertiesEqTrue = {\n    /**\n     * This is a simple string property\n     */\n    prop?: string;\n    [key: string]: unknown;\n};\n\nexport type NestedAnyOfArraysNullable = {\n    nullableArray?: Array<string | boolean> | null;\n};\n\nexport type CompositionWithOneOfAndProperties = ({\n    foo: SimpleParameter;\n} | {\n    bar: NonAsciiStringæøåÆøÅöôêÊ字符串;\n}) & {\n    baz: number | null;\n    qux: number;\n};\n\n/**\n * An object that can be null\n */\nexport type NullableObject = {\n    foo?: string;\n} | null;\n\n/**\n * Some % character\n */\nexport type CharactersInDescription = string;\n\nexport type ModelWithNullableObject = {\n    data?: NullableObject;\n};\n\n/**\n * An object with additional properties that can be null\n */\nexport type ModelWithAdditionalPropertiesRef = {\n    [key: string]: NullableObject | null;\n};\n\nexport type ModelWithOneOfEnum = {\n    foo: 'Bar';\n} | {\n    foo: 'Baz';\n} | {\n    foo: 'Qux';\n} | {\n    content: string;\n    foo: 'Quux';\n} | {\n    content: [\n        string,\n        string\n    ];\n    foo: 'Corge';\n};\n\nexport type ModelWithNestedArrayEnumsDataFoo = 'foo' | 'bar';\n\nexport type ModelWithNestedArrayEnumsDataBar = 'baz' | 'qux';\n\nexport type ModelWithNestedArrayEnumsData = {\n    foo?: Array<ModelWithNestedArrayEnumsDataFoo>;\n    bar?: Array<ModelWithNestedArrayEnumsDataBar>;\n};\n\nexport type ModelWithNestedArrayEnums = {\n    array_strings?: Array<string>;\n    data?: ModelWithNestedArrayEnumsData;\n};\n\nexport type ModelWithNestedCompositionEnums = {\n    foo?: ModelWithNestedArrayEnumsDataFoo;\n};\n\nexport type ModelWithReadOnlyAndWriteOnly = {\n    foo: string;\n    readonly bar: string;\n};\n\nexport type ModelWithConstantSizeArray = [\n    number,\n    number\n];\n\nexport type ModelWithAnyOfConstantSizeArray = [\n    number | string,\n    number | string,\n    number | string\n];\n\nexport type ModelWithPrefixItemsConstantSizeArray = Array<ModelWithInteger | number | string>;\n\nexport type ModelWithAnyOfConstantSizeArrayNullable = [\n    number | null | string,\n    number | null | string,\n    number | null | string\n];\n\nexport type ModelWithAnyOfConstantSizeArrayWithNSizeAndOptions = [\n    number | Import,\n    number | Import\n];\n\nexport type ModelWithAnyOfConstantSizeArrayAndIntersect = [\n    number & string,\n    number & string\n];\n\nexport type ModelWithNumericEnumUnion = {\n    /**\n     * Период\n     */\n    value?: -10 | -1 | 0 | 1 | 3 | 6 | 12;\n};\n\n/**\n * Some description with `back ticks`\n */\nexport type ModelWithBackticksInDescription = {\n    /**\n     * The template `that` should be used for parsing and importing the contents of the CSV file.\n     *\n     * <br/><p>There is one placeholder currently supported:<ul>     <li><b>${x}</b> - refers to the n-th column in the CSV file, e.g. ${1}, ${2}, ...)</li></ul><p>Example of a correct JSON template:</p>\n     * <pre>\n     * [\n     * {\n     * \"resourceType\": \"Asset\",\n     * \"identifier\": {\n     * \"name\": \"${1}\",\n     * \"domain\": {\n     * \"name\": \"${2}\",\n     * \"community\": {\n     * \"name\": \"Some Community\"\n     * }\n     * }\n     * },\n     * \"attributes\" : {\n     * \"00000000-0000-0000-0000-000000003115\" : [ {\n     * \"value\" : \"${3}\"\n     * } ],\n     * \"00000000-0000-0000-0000-000000000222\" : [ {\n     * \"value\" : \"${4}\"\n     * } ]\n     * }\n     * }\n     * ]\n     * </pre>\n     */\n    template?: string;\n};\n\nexport type ModelWithOneOfAndProperties = (SimpleParameter | NonAsciiStringæøåÆøÅöôêÊ字符串) & {\n    baz: number | null;\n    qux: number;\n};\n\n/**\n * Model used to test deduplication strategy (unused)\n */\nexport type ParameterSimpleParameterUnused = string;\n\n/**\n * Model used to test deduplication strategy\n */\nexport type PostServiceWithEmptyTagResponse = string;\n\n/**\n * Model used to test deduplication strategy\n */\nexport type PostServiceWithEmptyTagResponse2 = string;\n\n/**\n * Model used to test deduplication strategy\n */\nexport type DeleteFooData = string;\n\n/**\n * Model used to test deduplication strategy\n */\nexport type DeleteFooData2 = string;\n\n/**\n * Model with restricted keyword name\n */\nexport type Import = string;\n\nexport type SchemaWithFormRestrictedKeys = {\n    description?: string;\n    'x-enum-descriptions'?: string;\n    'x-enum-varnames'?: string;\n    'x-enumNames'?: string;\n    title?: string;\n    object?: {\n        description?: string;\n        'x-enum-descriptions'?: string;\n        'x-enum-varnames'?: string;\n        'x-enumNames'?: string;\n        title?: string;\n    };\n    array?: Array<{\n        description?: string;\n        'x-enum-descriptions'?: string;\n        'x-enum-varnames'?: string;\n        'x-enumNames'?: string;\n        title?: string;\n    }>;\n};\n\n/**\n * This schema was giving PascalCase transformations a hard time\n */\nexport type IoK8sApimachineryPkgApisMetaV1DeleteOptions = {\n    /**\n     * Must be fulfilled before a deletion is carried out. If not possible, a 409 Conflict status will be returned.\n     */\n    preconditions?: IoK8sApimachineryPkgApisMetaV1Preconditions;\n};\n\n/**\n * This schema was giving PascalCase transformations a hard time\n */\nexport type IoK8sApimachineryPkgApisMetaV1Preconditions = {\n    /**\n     * Specifies the target ResourceVersion\n     */\n    resourceVersion?: string;\n    /**\n     * Specifies the target UID.\n     */\n    uid?: string;\n};\n\nexport type AdditionalPropertiesUnknownIssue = {\n    [key: string]: string | number;\n};\n\nexport type AdditionalPropertiesUnknownIssue2 = {\n    [key: string]: string | number;\n};\n\nexport type AdditionalPropertiesUnknownIssue3 = string & {\n    entries: {\n        [key: string]: AdditionalPropertiesUnknownIssue;\n    };\n};\n\nexport type AdditionalPropertiesIntegerIssue = {\n    value: number;\n    [key: string]: number;\n};\n\nexport type OneOfAllOfIssue = ((ConstValue | GenericSchemaDuplicateIssue1SystemBoolean) & _3eNum1Период) | GenericSchemaDuplicateIssue1SystemString;\n\nexport type GenericSchemaDuplicateIssue1SystemBoolean = {\n    item?: boolean;\n    error?: string | null;\n    readonly hasError?: boolean;\n    data?: {\n        [key: string]: never;\n    };\n};\n\nexport type GenericSchemaDuplicateIssue1SystemString = {\n    item?: string | null;\n    error?: string | null;\n    readonly hasError?: boolean;\n};\n\nexport type ExternalSharedModel = {\n    id: string;\n    name?: string;\n};\n\n/**\n * This is a model with one property containing a reference\n */\nexport type ModelWithReferenceWritable = {\n    prop?: ModelWithPropertiesWritable;\n};\n\n/**\n * This is a model with one property containing an array\n */\nexport type ModelWithArrayReadOnlyAndWriteOnlyWritable = {\n    prop?: Array<ModelWithReadOnlyAndWriteOnlyWritable>;\n    propWithFile?: Array<Blob | File>;\n    propWithNumber?: Array<number>;\n};\n\n/**\n * This is a model with one nested property\n */\nexport type ModelWithPropertiesWritable = {\n    required: string;\n    requiredAndNullable: string | null;\n    string?: string;\n    number?: number;\n    boolean?: boolean;\n    reference?: ModelWithString;\n    'property with space'?: string;\n    default?: string;\n    try?: string;\n};\n\n/**\n * This is a model that contains a some patterns\n */\nexport type ModelWithPatternWritable = {\n    key: string;\n    name: string;\n    id?: string;\n    text?: string;\n    patternWithSingleQuotes?: string;\n    patternWithNewline?: string;\n    patternWithBacktick?: string;\n    patternWithUnicode?: string;\n};\n\nexport type FileWritable = {\n    /**\n     * Mime\n     */\n    mime: string;\n};\n\nexport type ModelWithReadOnlyAndWriteOnlyWritable = {\n    foo: string;\n    baz: string;\n};\n\nexport type ModelWithAnyOfConstantSizeArrayWithNSizeAndOptionsWritable = [\n    number | Import,\n    number | Import\n];\n\nexport type AdditionalPropertiesUnknownIssueWritable = {\n    [key: string]: string | number;\n};\n\nexport type OneOfAllOfIssueWritable = ((ConstValue | GenericSchemaDuplicateIssue1SystemBoolean) & _3eNum1Период) | GenericSchemaDuplicateIssue1SystemString;\n\nexport type GenericSchemaDuplicateIssue1SystemBooleanWritable = {\n    item?: boolean;\n    error?: string | null;\n    data?: {\n        [key: string]: never;\n    };\n};\n\nexport type GenericSchemaDuplicateIssue1SystemStringWritable = {\n    item?: string | null;\n    error?: string | null;\n};\n\n/**\n * This is a reusable parameter\n */\nexport type SimpleParameter = string;\n\n/**\n * Parameter with illegal characters\n */\nexport type XFooBar = ModelWithString;\n\nexport type SimpleRequestBody = ModelWithString;\n\nexport type SimpleFormData = ModelWithString;\n\nexport type ExportData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no+tag';\n};\n\nexport type PatchApiVbyApiVersionNoTagData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no+tag';\n};\n\nexport type PatchApiVbyApiVersionNoTagResponses = {\n    /**\n     * OK\n     */\n    default: unknown;\n};\n\nexport type ImportData = {\n    body: ModelWithReadOnlyAndWriteOnlyWritable | ModelWithArrayReadOnlyAndWriteOnlyWritable;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no+tag';\n};\n\nexport type ImportResponses = {\n    /**\n     * Success\n     */\n    200: ModelFromZendesk;\n    /**\n     * Default success response\n     */\n    default: ModelWithReadOnlyAndWriteOnly;\n};\n\nexport type ImportResponse = ImportResponses[keyof ImportResponses];\n\nexport type FooWowData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no+tag';\n};\n\nexport type FooWowResponses = {\n    /**\n     * OK\n     */\n    default: unknown;\n};\n\nexport type ApiVVersionODataControllerCountData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple/$count';\n};\n\nexport type ApiVVersionODataControllerCountResponses = {\n    /**\n     * Success\n     */\n    200: ModelFromZendesk;\n};\n\nexport type ApiVVersionODataControllerCountResponse = ApiVVersionODataControllerCountResponses[keyof ApiVVersionODataControllerCountResponses];\n\nexport type GetApiVbyApiVersionSimpleOperationData = {\n    body?: never;\n    path: {\n        /**\n         * foo in method\n         */\n        foo_param: string;\n    };\n    query?: never;\n    url: '/api/v{api-version}/simple:operation';\n};\n\nexport type GetApiVbyApiVersionSimpleOperationErrors = {\n    /**\n     * Default error response\n     */\n    default: ModelWithBoolean;\n};\n\nexport type GetApiVbyApiVersionSimpleOperationError = GetApiVbyApiVersionSimpleOperationErrors[keyof GetApiVbyApiVersionSimpleOperationErrors];\n\nexport type GetApiVbyApiVersionSimpleOperationResponses = {\n    /**\n     * Response is a simple number\n     */\n    200: number;\n};\n\nexport type GetApiVbyApiVersionSimpleOperationResponse = GetApiVbyApiVersionSimpleOperationResponses[keyof GetApiVbyApiVersionSimpleOperationResponses];\n\nexport type DeleteCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type GetCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type HeadCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type OptionsCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type PatchCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type PostCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type PutCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type DeleteFooData3 = {\n    body?: never;\n    headers: {\n        /**\n         * Parameter with illegal characters\n         */\n        'x-Foo-Bar': ModelWithString;\n    };\n    path: {\n        /**\n         * foo in method\n         */\n        foo_param: string;\n        /**\n         * bar in method\n         */\n        BarParam: string;\n    };\n    query?: never;\n    url: '/api/v{api-version}/foo/{foo_param}/bar/{BarParam}';\n};\n\nexport type CallWithDescriptionsData = {\n    body?: never;\n    path?: never;\n    query?: {\n        /**\n         * Testing multiline comments in string: First line\n         * Second line\n         *\n         * Fourth line\n         */\n        parameterWithBreaks?: string;\n        /**\n         * Testing backticks in string: `backticks` and ```multiple backticks``` should work\n         */\n        parameterWithBackticks?: string;\n        /**\n         * Testing slashes in string: \\backwards\\\\\\ and /forwards/// should work\n         */\n        parameterWithSlashes?: string;\n        /**\n         * Testing expression placeholders in string: ${expression} should work\n         */\n        parameterWithExpressionPlaceholders?: string;\n        /**\n         * Testing quotes in string: 'single quote''' and \"double quotes\"\"\" should work\n         */\n        parameterWithQuotes?: string;\n        /**\n         * Testing reserved characters in string: * inline * and ** inline ** should work\n         */\n        parameterWithReservedCharacters?: string;\n    };\n    url: '/api/v{api-version}/descriptions';\n};\n\nexport type DeprecatedCallData = {\n    body?: never;\n    headers: {\n        /**\n         * This parameter is deprecated\n         *\n         * @deprecated\n         */\n        parameter: DeprecatedModel | null;\n    };\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/parameters/deprecated';\n};\n\nexport type CallWithParametersData = {\n    /**\n     * This is the parameter that goes into the body\n     */\n    body: {\n        [key: string]: unknown;\n    } | null;\n    headers: {\n        /**\n         * This is the parameter that goes into the header\n         */\n        parameterHeader: string | null;\n    };\n    path: {\n        /**\n         * This is the parameter that goes into the path\n         */\n        parameterPath: string | null;\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string | null;\n    };\n    query: {\n        foo_ref_enum?: ModelWithNestedArrayEnumsDataFoo;\n        foo_all_of_enum: ModelWithNestedArrayEnumsDataFoo;\n        /**\n         * This is the parameter that goes into the query params\n         */\n        cursor: string | null;\n    };\n    url: '/api/v{api-version}/parameters/{parameterPath}';\n};\n\nexport type CallWithWeirdParameterNamesData = {\n    /**\n     * This is the parameter that goes into the body\n     */\n    body: ModelWithString | null;\n    headers: {\n        /**\n         * This is the parameter that goes into the request header\n         */\n        'parameter.header': string | null;\n    };\n    path: {\n        /**\n         * This is the parameter that goes into the path\n         */\n        'parameter.path.1'?: string;\n        /**\n         * This is the parameter that goes into the path\n         */\n        'parameter-path-2'?: string;\n        /**\n         * This is the parameter that goes into the path\n         */\n        'PARAMETER-PATH-3'?: string;\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string | null;\n    };\n    query: {\n        /**\n         * This is the parameter with a reserved keyword\n         */\n        default?: string;\n        /**\n         * This is the parameter that goes into the request query params\n         */\n        'parameter-query': string | null;\n    };\n    url: '/api/v{api-version}/parameters/{parameter.path.1}/{parameter-path-2}/{PARAMETER-PATH-3}';\n};\n\nexport type GetCallWithOptionalParamData = {\n    /**\n     * This is a required parameter\n     */\n    body: ModelWithOneOfEnum;\n    path?: never;\n    query?: {\n        /**\n         * This is an optional parameter\n         */\n        page?: number;\n    };\n    url: '/api/v{api-version}/parameters';\n};\n\nexport type PostCallWithOptionalParamData = {\n    /**\n     * This is an optional parameter\n     */\n    body?: {\n        offset?: number | null;\n    };\n    path?: never;\n    query: {\n        /**\n         * This is a required parameter\n         */\n        parameter: Pageable;\n    };\n    url: '/api/v{api-version}/parameters';\n};\n\nexport type PostCallWithOptionalParamResponses = {\n    /**\n     * Response is a simple number\n     */\n    200: number;\n    /**\n     * Success\n     */\n    204: void;\n};\n\nexport type PostCallWithOptionalParamResponse = PostCallWithOptionalParamResponses[keyof PostCallWithOptionalParamResponses];\n\nexport type PostApiVbyApiVersionRequestBodyData = {\n    /**\n     * A reusable request body\n     */\n    body?: SimpleRequestBody;\n    path?: never;\n    query?: {\n        /**\n         * This is a reusable parameter\n         */\n        parameter?: string;\n    };\n    url: '/api/v{api-version}/requestBody';\n};\n\nexport type PostApiVbyApiVersionFormDataData = {\n    /**\n     * A reusable request body\n     */\n    body?: SimpleFormData;\n    path?: never;\n    query?: {\n        /**\n         * This is a reusable parameter\n         */\n        parameter?: string;\n    };\n    url: '/api/v{api-version}/formData';\n};\n\nexport type CallWithDefaultParametersData = {\n    body?: never;\n    path?: never;\n    query?: {\n        /**\n         * This is a simple string with default value\n         */\n        parameterString?: string | null;\n        /**\n         * This is a simple number with default value\n         */\n        parameterNumber?: number | null;\n        /**\n         * This is a simple boolean with default value\n         */\n        parameterBoolean?: boolean | null;\n        /**\n         * This is a simple enum with default value\n         */\n        parameterEnum?: 'Success' | 'Warning' | 'Error';\n        /**\n         * This is a simple model with default value\n         */\n        parameterModel?: ModelWithString | null;\n    };\n    url: '/api/v{api-version}/defaults';\n};\n\nexport type CallWithDefaultOptionalParametersData = {\n    body?: never;\n    path?: never;\n    query?: {\n        /**\n         * This is a simple string that is optional with default value\n         */\n        parameterString?: string;\n        /**\n         * This is a simple number that is optional with default value\n         */\n        parameterNumber?: number;\n        /**\n         * This is a simple boolean that is optional with default value\n         */\n        parameterBoolean?: boolean;\n        /**\n         * This is a simple enum that is optional with default value\n         */\n        parameterEnum?: 'Success' | 'Warning' | 'Error';\n        /**\n         * This is a simple model that is optional with default value\n         */\n        parameterModel?: ModelWithString;\n    };\n    url: '/api/v{api-version}/defaults';\n};\n\nexport type CallToTestOrderOfParamsData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * This is a optional string with default\n         */\n        parameterOptionalStringWithDefault?: string;\n        /**\n         * This is a optional string with empty default\n         */\n        parameterOptionalStringWithEmptyDefault?: string;\n        /**\n         * This is a optional string with no default\n         */\n        parameterOptionalStringWithNoDefault?: string;\n        /**\n         * This is a string with default\n         */\n        parameterStringWithDefault: string;\n        /**\n         * This is a string with empty default\n         */\n        parameterStringWithEmptyDefault: string;\n        /**\n         * This is a string with no default\n         */\n        parameterStringWithNoDefault: string;\n        /**\n         * This is a string that can be null with no default\n         */\n        parameterStringNullableWithNoDefault?: string | null;\n        /**\n         * This is a string that can be null with default\n         */\n        parameterStringNullableWithDefault?: string | null;\n    };\n    url: '/api/v{api-version}/defaults';\n};\n\nexport type DuplicateNameData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/duplicate';\n};\n\nexport type DuplicateName2Data = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/duplicate';\n};\n\nexport type DuplicateName3Data = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/duplicate';\n};\n\nexport type DuplicateName4Data = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/duplicate';\n};\n\nexport type CallWithNoContentResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no-content';\n};\n\nexport type CallWithNoContentResponseResponses = {\n    /**\n     * Success\n     */\n    204: void;\n};\n\nexport type CallWithNoContentResponseResponse = CallWithNoContentResponseResponses[keyof CallWithNoContentResponseResponses];\n\nexport type CallWithResponseAndNoContentResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multiple-tags/response-and-no-content';\n};\n\nexport type CallWithResponseAndNoContentResponseResponses = {\n    /**\n     * Response is a simple number\n     */\n    200: number;\n    /**\n     * Success\n     */\n    204: void;\n};\n\nexport type CallWithResponseAndNoContentResponseResponse = CallWithResponseAndNoContentResponseResponses[keyof CallWithResponseAndNoContentResponseResponses];\n\nexport type DummyAData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multiple-tags/a';\n};\n\nexport type DummyAResponses = {\n    200: _400;\n};\n\nexport type DummyAResponse = DummyAResponses[keyof DummyAResponses];\n\nexport type DummyBData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multiple-tags/b';\n};\n\nexport type DummyBResponses = {\n    /**\n     * Success\n     */\n    204: void;\n};\n\nexport type DummyBResponse = DummyBResponses[keyof DummyBResponses];\n\nexport type CallWithResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/response';\n};\n\nexport type CallWithResponseResponses = {\n    default: Import;\n};\n\nexport type CallWithResponseResponse = CallWithResponseResponses[keyof CallWithResponseResponses];\n\nexport type CallWithDuplicateResponsesData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/response';\n};\n\nexport type CallWithDuplicateResponsesErrors = {\n    /**\n     * Message for 500 error\n     */\n    500: ModelWithStringError;\n    /**\n     * Message for 501 error\n     */\n    501: ModelWithStringError;\n    /**\n     * Message for 502 error\n     */\n    502: ModelWithStringError;\n    /**\n     * Message for 4XX errors\n     */\n    '4XX': DictionaryWithArray;\n    /**\n     * Default error response\n     */\n    default: ModelWithBoolean;\n};\n\nexport type CallWithDuplicateResponsesError = CallWithDuplicateResponsesErrors[keyof CallWithDuplicateResponsesErrors];\n\nexport type CallWithDuplicateResponsesResponses = {\n    /**\n     * Message for 200 response\n     */\n    200: ModelWithBoolean & ModelWithInteger;\n    /**\n     * Message for 201 response\n     */\n    201: ModelWithString;\n    /**\n     * Message for 202 response\n     */\n    202: ModelWithString;\n};\n\nexport type CallWithDuplicateResponsesResponse = CallWithDuplicateResponsesResponses[keyof CallWithDuplicateResponsesResponses];\n\nexport type CallWithResponsesData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/response';\n};\n\nexport type CallWithResponsesErrors = {\n    /**\n     * Message for 500 error\n     */\n    500: ModelWithStringError;\n    /**\n     * Message for 501 error\n     */\n    501: ModelWithStringError;\n    /**\n     * Message for 502 error\n     */\n    502: ModelWithStringError;\n    /**\n     * Message for default response\n     */\n    default: ModelWithStringError;\n};\n\nexport type CallWithResponsesError = CallWithResponsesErrors[keyof CallWithResponsesErrors];\n\nexport type CallWithResponsesResponses = {\n    /**\n     * Message for 200 response\n     */\n    200: {\n        readonly '@namespace.string'?: string;\n        readonly '@namespace.integer'?: number;\n        readonly value?: Array<ModelWithString>;\n    };\n    /**\n     * Message for 201 response\n     */\n    201: ModelThatExtends;\n    /**\n     * Message for 202 response\n     */\n    202: ModelThatExtendsExtends;\n};\n\nexport type CallWithResponsesResponse = CallWithResponsesResponses[keyof CallWithResponsesResponses];\n\nexport type CollectionFormatData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * This is an array parameter that is sent as csv format (comma-separated values)\n         */\n        parameterArrayCSV: Array<string> | null;\n        /**\n         * This is an array parameter that is sent as ssv format (space-separated values)\n         */\n        parameterArraySSV: Array<string> | null;\n        /**\n         * This is an array parameter that is sent as tsv format (tab-separated values)\n         */\n        parameterArrayTSV: Array<string> | null;\n        /**\n         * This is an array parameter that is sent as pipes format (pipe-separated values)\n         */\n        parameterArrayPipes: Array<string> | null;\n        /**\n         * This is an array parameter that is sent as multi format (multiple parameter instances)\n         */\n        parameterArrayMulti: Array<string> | null;\n    };\n    url: '/api/v{api-version}/collectionFormat';\n};\n\nexport type TypesData = {\n    body?: never;\n    path?: {\n        /**\n         * This is a number parameter\n         */\n        id?: number;\n    };\n    query: {\n        /**\n         * This is a number parameter\n         */\n        parameterNumber: number;\n        /**\n         * This is a string parameter\n         */\n        parameterString: string | null;\n        /**\n         * This is a boolean parameter\n         */\n        parameterBoolean: boolean | null;\n        /**\n         * This is an object parameter\n         */\n        parameterObject: {\n            [key: string]: unknown;\n        } | null;\n        /**\n         * This is an array parameter\n         */\n        parameterArray: Array<string> | null;\n        /**\n         * This is a dictionary parameter\n         */\n        parameterDictionary: {\n            [key: string]: unknown;\n        } | null;\n        /**\n         * This is an enum parameter\n         */\n        parameterEnum: 'Success' | 'Warning' | 'Error';\n    };\n    url: '/api/v{api-version}/types';\n};\n\nexport type TypesResponses = {\n    /**\n     * Response is a simple number\n     */\n    200: number;\n    /**\n     * Response is a simple string\n     */\n    201: string;\n    /**\n     * Response is a simple boolean\n     */\n    202: boolean;\n    /**\n     * Response is a simple object\n     */\n    203: {\n        [key: string]: unknown;\n    };\n};\n\nexport type TypesResponse = TypesResponses[keyof TypesResponses];\n\nexport type UploadFileData = {\n    body: Blob | File;\n    path: {\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string | null;\n    };\n    query?: never;\n    url: '/api/v{api-version}/upload';\n};\n\nexport type UploadFileResponses = {\n    200: boolean;\n};\n\nexport type UploadFileResponse = UploadFileResponses[keyof UploadFileResponses];\n\nexport type FileResponseData = {\n    body?: never;\n    path: {\n        id: string;\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string;\n    };\n    query?: never;\n    url: '/api/v{api-version}/file/{id}';\n};\n\nexport type FileResponseResponses = {\n    /**\n     * Success\n     */\n    200: Blob | File;\n};\n\nexport type FileResponseResponse = FileResponseResponses[keyof FileResponseResponses];\n\nexport type ComplexTypesData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * Parameter containing object\n         */\n        parameterObject: {\n            first?: {\n                second?: {\n                    third?: string;\n                };\n            };\n        };\n        /**\n         * Parameter containing reference\n         */\n        parameterReference: ModelWithString;\n    };\n    url: '/api/v{api-version}/complex';\n};\n\nexport type ComplexTypesErrors = {\n    /**\n     * 400 `server` error\n     */\n    400: unknown;\n    /**\n     * 500 server error\n     */\n    500: unknown;\n};\n\nexport type ComplexTypesResponses = {\n    /**\n     * Successful response\n     */\n    200: Array<ModelWithString>;\n};\n\nexport type ComplexTypesResponse = ComplexTypesResponses[keyof ComplexTypesResponses];\n\nexport type MultipartResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multipart';\n};\n\nexport type MultipartResponseResponses = {\n    /**\n     * OK\n     */\n    200: {\n        file?: Blob | File;\n        metadata?: {\n            foo?: string;\n            bar?: string;\n        };\n    };\n};\n\nexport type MultipartResponseResponse = MultipartResponseResponses[keyof MultipartResponseResponses];\n\nexport type MultipartRequestData = {\n    body?: {\n        content?: Blob | File;\n        data?: ModelWithString | null;\n    };\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multipart';\n};\n\nexport type ComplexParamsData = {\n    body?: {\n        readonly key: string | null;\n        name: string | null;\n        enabled?: boolean;\n        type: 'Monkey' | 'Horse' | 'Bird';\n        listOfModels?: Array<ModelWithString> | null;\n        listOfStrings?: Array<string> | null;\n        parameters: ModelWithString | ModelWithEnum | ModelWithArray | ModelWithDictionary;\n        readonly user?: {\n            readonly id?: number;\n            readonly name?: string | null;\n        };\n    };\n    path: {\n        id: number;\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string;\n    };\n    query?: never;\n    url: '/api/v{api-version}/complex/{id}';\n};\n\nexport type ComplexParamsResponses = {\n    /**\n     * Success\n     */\n    200: ModelWithString;\n};\n\nexport type ComplexParamsResponse = ComplexParamsResponses[keyof ComplexParamsResponses];\n\nexport type CallWithResultFromHeaderData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/header';\n};\n\nexport type CallWithResultFromHeaderErrors = {\n    /**\n     * 400 server error\n     */\n    400: unknown;\n    /**\n     * 500 server error\n     */\n    500: unknown;\n};\n\nexport type CallWithResultFromHeaderResponses = {\n    /**\n     * Successful response\n     */\n    200: unknown;\n};\n\nexport type TestErrorCodeData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * Status code to return\n         */\n        status: number;\n    };\n    url: '/api/v{api-version}/error';\n};\n\nexport type TestErrorCodeErrors = {\n    /**\n     * Custom message: Internal Server Error\n     */\n    500: unknown;\n    /**\n     * Custom message: Not Implemented\n     */\n    501: unknown;\n    /**\n     * Custom message: Bad Gateway\n     */\n    502: unknown;\n    /**\n     * Custom message: Service Unavailable\n     */\n    503: unknown;\n};\n\nexport type TestErrorCodeResponses = {\n    /**\n     * Custom message: Successful response\n     */\n    200: unknown;\n};\n\nexport type NonAsciiæøåÆøÅöôêÊ字符串Data = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * Dummy input param\n         */\n        nonAsciiParamæøåÆØÅöôêÊ: number;\n    };\n    url: '/api/v{api-version}/non-ascii-æøåÆØÅöôêÊ字符串';\n};\n\nexport type NonAsciiæøåÆøÅöôêÊ字符串Responses = {\n    /**\n     * Successful response\n     */\n    200: Array<NonAsciiStringæøåÆøÅöôêÊ字符串>;\n};\n\nexport type NonAsciiæøåÆøÅöôêÊ字符串Response = NonAsciiæøåÆøÅöôêÊ字符串Responses[keyof NonAsciiæøåÆøÅöôêÊ字符串Responses];\n\nexport type PutWithFormUrlEncodedData = {\n    body: ArrayWithStrings;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/non-ascii-æøåÆØÅöôêÊ字符串';\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/preact-query/name-builder/@tanstack/preact-query.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport { type DefaultError, queryOptions, type UseMutationOptions } from '@tanstack/preact-query';\n\nimport { client } from '../client.gen';\nimport { fooBarPost, fooBarPut, fooPost, fooPut, getFoo, getFooBar, type Options } from '../sdk.gen';\nimport type { FooBarPostData, FooBarPostResponse, FooBarPutData, FooBarPutResponse, FooPostData, FooPostResponse, FooPutData, FooPutResponse, GetFooBarData, GetFooBarResponse, GetFooData, GetFooResponse } from '../types.gen';\n\nexport type QueryKey<TOptions extends Options> = [\n    Pick<TOptions, 'baseUrl' | 'body' | 'headers' | 'path' | 'query'> & {\n        _id: string;\n        _infinite?: boolean;\n        tags?: ReadonlyArray<string>;\n    }\n];\n\nconst createQueryKey = <TOptions extends Options>(id: string, options?: TOptions, infinite?: boolean, tags?: ReadonlyArray<string>): [\n    QueryKey<TOptions>[0]\n] => {\n    const params: QueryKey<TOptions>[0] = { _id: id, baseUrl: options?.baseUrl || (options?.client ?? client).getConfig().baseUrl } as QueryKey<TOptions>[0];\n    if (infinite) {\n        params._infinite = infinite;\n    }\n    if (tags) {\n        params.tags = tags;\n    }\n    if (options?.body) {\n        params.body = options.body;\n    }\n    if (options?.headers) {\n        params.headers = options.headers;\n    }\n    if (options?.path) {\n        params.path = options.path;\n    }\n    if (options?.query) {\n        params.query = options.query;\n    }\n    return [params];\n};\n\nexport const getFooD = (options?: Options<GetFooData>) => createQueryKey('getFoo', options);\n\nexport const getFooE = (options?: Options<GetFooData>) => queryOptions<GetFooResponse, DefaultError, GetFooResponse, ReturnType<typeof getFooD>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await getFoo({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: getFooD(options)\n});\n\nexport const fooPostC = (options?: Partial<Options<FooPostData>>): UseMutationOptions<FooPostResponse, DefaultError, Options<FooPostData>> => {\n    const mutationOptions: UseMutationOptions<FooPostResponse, DefaultError, Options<FooPostData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await fooPost({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const fooPutC = (options?: Partial<Options<FooPutData>>): UseMutationOptions<FooPutResponse, DefaultError, Options<FooPutData>> => {\n    const mutationOptions: UseMutationOptions<FooPutResponse, DefaultError, Options<FooPutData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await fooPut({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const getFooBarD = (options?: Options<GetFooBarData>) => createQueryKey('getFooBar', options);\n\nexport const getFooBarE = (options?: Options<GetFooBarData>) => queryOptions<GetFooBarResponse, DefaultError, GetFooBarResponse, ReturnType<typeof getFooBarD>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await getFooBar({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: getFooBarD(options)\n});\n\nexport const fooBarPostC = (options?: Partial<Options<FooBarPostData>>): UseMutationOptions<FooBarPostResponse, DefaultError, Options<FooBarPostData>> => {\n    const mutationOptions: UseMutationOptions<FooBarPostResponse, DefaultError, Options<FooBarPostData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await fooBarPost({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const fooBarPutC = (options?: Partial<Options<FooBarPutData>>): UseMutationOptions<FooBarPutResponse, DefaultError, Options<FooBarPutData>> => {\n    const mutationOptions: UseMutationOptions<FooBarPutResponse, DefaultError, Options<FooBarPutData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await fooBarPut({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/preact-query/name-builder/client/client.gen.ts",
    "content": "// 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 (options: RequestOptions) => {\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 url = buildUrl(opts);\n\n    return { opts, url };\n  };\n\n  const request: Client['request'] = async (options) => {\n    // @ts-expect-error\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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/preact-query/name-builder/client/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type { Auth } from '../core/auth.gen';\nexport type { QuerySerializerOptions } from '../core/bodySerializer.gen';\nexport {\n  formDataBodySerializer,\n  jsonBodySerializer,\n  urlSearchParamsBodySerializer,\n} from '../core/bodySerializer.gen';\nexport { buildClientParams } from '../core/params.gen';\nexport { serializeQueryKeyValue } from '../core/queryKeySerializer.gen';\nexport { createClient } from './client.gen';\nexport type {\n  Client,\n  ClientOptions,\n  Config,\n  CreateClientConfig,\n  Options,\n  RequestOptions,\n  RequestResult,\n  ResolvedRequestOptions,\n  ResponseStyle,\n  TDataShape,\n} from './types.gen';\nexport { createConfig, mergeHeaders } from './utils.gen';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/preact-query/name-builder/client/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { Auth } from '../core/auth.gen';\nimport type {\n  ServerSentEventsOptions,\n  ServerSentEventsResult,\n} from '../core/serverSentEvents.gen';\nimport type { Client as CoreClient, Config as CoreConfig } from '../core/types.gen';\nimport type { Middleware } from './utils.gen';\n\nexport type ResponseStyle = 'data' | 'fields';\n\nexport interface Config<T extends ClientOptions = ClientOptions>\n  extends Omit<RequestInit, 'body' | 'headers' | 'method'>, CoreConfig {\n  /**\n   * Base URL for all requests made by this client.\n   */\n  baseUrl?: T['baseUrl'];\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   * Please don't use the Fetch client for Next.js applications. The `next`\n   * options won't have any effect.\n   *\n   * Install {@link https://www.npmjs.com/package/@hey-api/client-next `@hey-api/client-next`} instead.\n   */\n  next?: never;\n  /**\n   * Return the response data parsed in a specified format. By default, `auto`\n   * will infer the appropriate method from the `Content-Type` response header.\n   * You can override this behavior with any of the {@link Body} methods.\n   * Select `stream` if you don't want to parse response data at all.\n   *\n   * @default 'auto'\n   */\n  parseAs?: 'arrayBuffer' | 'auto' | 'blob' | 'formData' | 'json' | 'stream' | 'text';\n  /**\n   * Should we return only data or multiple fields (data, error, response, etc.)?\n   *\n   * @default 'fields'\n   */\n  responseStyle?: ResponseStyle;\n  /**\n   * Throw an error instead of returning it in the response?\n   *\n   * @default false\n   */\n  throwOnError?: T['throwOnError'];\n}\n\nexport interface RequestOptions<\n  TData = unknown,\n  TResponseStyle extends ResponseStyle = 'fields',\n  ThrowOnError extends boolean = boolean,\n  Url extends string = string,\n>\n  extends\n    Config<{\n      responseStyle: TResponseStyle;\n      throwOnError: ThrowOnError;\n    }>,\n    Pick<\n      ServerSentEventsOptions<TData>,\n      | 'onRequest'\n      | 'onSseError'\n      | 'onSseEvent'\n      | 'sseDefaultRetryDelay'\n      | 'sseMaxRetryAttempts'\n      | 'sseMaxRetryDelay'\n    > {\n  /**\n   * Any body that you want to add to your request.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/fetch#body}\n   */\n  body?: unknown;\n  path?: Record<string, unknown>;\n  query?: Record<string, unknown>;\n  /**\n   * Security mechanism(s) to use for the request.\n   */\n  security?: ReadonlyArray<Auth>;\n  url: Url;\n}\n\nexport interface ResolvedRequestOptions<\n  TResponseStyle extends ResponseStyle = 'fields',\n  ThrowOnError extends boolean = boolean,\n  Url extends string = string,\n> extends RequestOptions<unknown, TResponseStyle, ThrowOnError, Url> {\n  serializedBody?: string;\n}\n\nexport type RequestResult<\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = boolean,\n  TResponseStyle extends ResponseStyle = 'fields',\n> = ThrowOnError extends true\n  ? Promise<\n      TResponseStyle extends 'data'\n        ? TData extends Record<string, unknown>\n          ? TData[keyof TData]\n          : TData\n        : {\n            data: TData extends Record<string, unknown> ? TData[keyof TData] : TData;\n            request: Request;\n            response: Response;\n          }\n    >\n  : Promise<\n      TResponseStyle extends 'data'\n        ? (TData extends Record<string, unknown> ? TData[keyof TData] : TData) | undefined\n        : (\n            | {\n                data: TData extends Record<string, unknown> ? TData[keyof TData] : TData;\n                error: undefined;\n              }\n            | {\n                data: undefined;\n                error: TError extends Record<string, unknown> ? TError[keyof TError] : TError;\n              }\n          ) & {\n            request: Request;\n            response: Response;\n          }\n    >;\n\nexport interface ClientOptions {\n  baseUrl?: string;\n  responseStyle?: ResponseStyle;\n  throwOnError?: boolean;\n}\n\ntype MethodFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'>,\n) => RequestResult<TData, TError, ThrowOnError, TResponseStyle>;\n\ntype SseFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'>,\n) => Promise<ServerSentEventsResult<TData, TError>>;\n\ntype RequestFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'> &\n    Pick<Required<RequestOptions<TData, TResponseStyle, ThrowOnError>>, 'method'>,\n) => RequestResult<TData, TError, ThrowOnError, TResponseStyle>;\n\ntype BuildUrlFn = <\n  TData extends {\n    body?: unknown;\n    path?: Record<string, unknown>;\n    query?: Record<string, unknown>;\n    url: string;\n  },\n>(\n  options: TData & Options<TData>,\n) => string;\n\nexport type Client = CoreClient<RequestFn, Config, MethodFn, BuildUrlFn, SseFn> & {\n  interceptors: Middleware<Request, Response, unknown, ResolvedRequestOptions>;\n};\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 = ClientOptions> = (\n  override?: Config<ClientOptions & T>,\n) => Config<Required<ClientOptions> & T>;\n\nexport interface TDataShape {\n  body?: unknown;\n  headers?: unknown;\n  path?: unknown;\n  query?: unknown;\n  url: string;\n}\n\ntype OmitKeys<T, K> = Pick<T, Exclude<keyof T, K>>;\n\nexport type Options<\n  TData extends TDataShape = TDataShape,\n  ThrowOnError extends boolean = boolean,\n  TResponse = unknown,\n  TResponseStyle extends ResponseStyle = 'fields',\n> = OmitKeys<\n  RequestOptions<TResponse, TResponseStyle, ThrowOnError>,\n  'body' | 'path' | 'query' | 'url'\n> &\n  ([TData] extends [never] ? unknown : Omit<TData, 'url'>);\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/preact-query/name-builder/client/utils.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/preact-query/name-builder/client.gen.ts",
    "content": "// 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>());\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/preact-query/name-builder/core/auth.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/preact-query/name-builder/core/bodySerializer.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/preact-query/name-builder/core/params.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/preact-query/name-builder/core/pathSerializer.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/preact-query/name-builder/core/queryKeySerializer.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\n/**\n * JSON-friendly union that mirrors what Pinia Colada can hash.\n */\nexport type JsonValue =\n  | null\n  | string\n  | number\n  | boolean\n  | JsonValue[]\n  | { [key: string]: JsonValue };\n\n/**\n * Replacer that converts non-JSON values (bigint, Date, etc.) to safe substitutes.\n */\nexport const queryKeyJsonReplacer = (_key: string, value: unknown) => {\n  if (value === undefined || typeof value === 'function' || typeof value === 'symbol') {\n    return undefined;\n  }\n  if (typeof value === 'bigint') {\n    return value.toString();\n  }\n  if (value instanceof Date) {\n    return value.toISOString();\n  }\n  return value;\n};\n\n/**\n * Safely stringifies a value and parses it back into a JsonValue.\n */\nexport const stringifyToJsonValue = (input: unknown): JsonValue | undefined => {\n  try {\n    const json = JSON.stringify(input, queryKeyJsonReplacer);\n    if (json === undefined) {\n      return undefined;\n    }\n    return JSON.parse(json) as JsonValue;\n  } catch {\n    return undefined;\n  }\n};\n\n/**\n * Detects plain objects (including objects with a null prototype).\n */\nconst isPlainObject = (value: unknown): value is Record<string, unknown> => {\n  if (value === null || typeof value !== 'object') {\n    return false;\n  }\n  const prototype = Object.getPrototypeOf(value as object);\n  return prototype === Object.prototype || prototype === null;\n};\n\n/**\n * Turns URLSearchParams into a sorted JSON object for deterministic keys.\n */\nconst serializeSearchParams = (params: URLSearchParams): JsonValue => {\n  const entries = Array.from(params.entries()).sort(([a], [b]) => a.localeCompare(b));\n  const result: Record<string, JsonValue> = {};\n\n  for (const [key, value] of entries) {\n    const existing = result[key];\n    if (existing === undefined) {\n      result[key] = value;\n      continue;\n    }\n\n    if (Array.isArray(existing)) {\n      (existing as string[]).push(value);\n    } else {\n      result[key] = [existing, value];\n    }\n  }\n\n  return result;\n};\n\n/**\n * Normalizes any accepted value into a JSON-friendly shape for query keys.\n */\nexport const serializeQueryKeyValue = (value: unknown): JsonValue | undefined => {\n  if (value === null) {\n    return null;\n  }\n\n  if (typeof value === 'string' || typeof value === 'number' || typeof value === 'boolean') {\n    return value;\n  }\n\n  if (value === undefined || typeof value === 'function' || typeof value === 'symbol') {\n    return undefined;\n  }\n\n  if (typeof value === 'bigint') {\n    return value.toString();\n  }\n\n  if (value instanceof Date) {\n    return value.toISOString();\n  }\n\n  if (Array.isArray(value)) {\n    return stringifyToJsonValue(value);\n  }\n\n  if (typeof URLSearchParams !== 'undefined' && value instanceof URLSearchParams) {\n    return serializeSearchParams(value);\n  }\n\n  if (isPlainObject(value)) {\n    return stringifyToJsonValue(value);\n  }\n\n  return undefined;\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/preact-query/name-builder/core/serverSentEvents.gen.ts",
    "content": "// 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 const 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            // Normalize line endings: CRLF -> LF, then CR -> LF\n            buffer = buffer.replace(/\\r\\n/g, '\\n').replace(/\\r/g, '\\n');\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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/preact-query/name-builder/core/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { Auth, AuthToken } from './auth.gen';\nimport type { BodySerializer, QuerySerializer, QuerySerializerOptions } from './bodySerializer.gen';\n\nexport type HttpMethod =\n  | 'connect'\n  | 'delete'\n  | 'get'\n  | 'head'\n  | 'options'\n  | 'patch'\n  | 'post'\n  | 'put'\n  | 'trace';\n\nexport type Client<\n  RequestFn = never,\n  Config = unknown,\n  MethodFn = never,\n  BuildUrlFn = never,\n  SseFn = never,\n> = {\n  /**\n   * Returns the final request URL.\n   */\n  buildUrl: BuildUrlFn;\n  getConfig: () => Config;\n  request: RequestFn;\n  setConfig: (config: Config) => Config;\n} & {\n  [K in HttpMethod]: MethodFn;\n} & ([SseFn] extends [never] ? { sse?: never } : { sse: { [K in HttpMethod]: SseFn } });\n\nexport interface Config {\n  /**\n   * Auth token or a function returning auth token. The resolved value will be\n   * added to the request payload as defined by its `security` array.\n   */\n  auth?: ((auth: Auth) => Promise<AuthToken> | AuthToken) | AuthToken;\n  /**\n   * A function for serializing request body parameter. By default,\n   * {@link JSON.stringify()} will be used.\n   */\n  bodySerializer?: BodySerializer | null;\n  /**\n   * An object containing any HTTP headers that you want to pre-populate your\n   * `Headers` object with.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/Headers/Headers#init See more}\n   */\n  headers?:\n    | RequestInit['headers']\n    | Record<\n        string,\n        string | number | boolean | (string | number | boolean)[] | null | undefined | unknown\n      >;\n  /**\n   * The request method.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/fetch#method See more}\n   */\n  method?: Uppercase<HttpMethod>;\n  /**\n   * A function for serializing request query parameters. By default, arrays\n   * will be exploded in form style, objects will be exploded in deepObject\n   * style, and reserved characters are percent-encoded.\n   *\n   * This method will have no effect if the native `paramsSerializer()` Axios\n   * API function is used.\n   *\n   * {@link https://swagger.io/docs/specification/serialization/#query View examples}\n   */\n  querySerializer?: QuerySerializer | QuerySerializerOptions;\n  /**\n   * A function validating request data. This is useful if you want to ensure\n   * the request conforms to the desired shape, so it can be safely sent to\n   * the server.\n   */\n  requestValidator?: (data: unknown) => Promise<unknown>;\n  /**\n   * A function transforming response data before it's returned. This is useful\n   * for post-processing data, e.g. converting ISO strings into Date objects.\n   */\n  responseTransformer?: (data: unknown) => Promise<unknown>;\n  /**\n   * A function validating response data. This is useful if you want to ensure\n   * the response conforms to the desired shape, so it can be safely passed to\n   * the transformers and returned to the user.\n   */\n  responseValidator?: (data: unknown) => Promise<unknown>;\n}\n\ntype IsExactlyNeverOrNeverUndefined<T> = [T] extends [never]\n  ? true\n  : [T] extends [never | undefined]\n    ? [undefined] extends [T]\n      ? false\n      : true\n    : false;\n\nexport type OmitNever<T extends Record<string, unknown>> = {\n  [K in keyof T as IsExactlyNeverOrNeverUndefined<T[K]> extends true ? never : K]: T[K];\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/preact-query/name-builder/core/utils.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/preact-query/name-builder/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport { fooBarPost, fooBarPut, fooPost, fooPut, getFoo, getFooBar, type Options } from './sdk.gen';\nexport type { ClientOptions, FooBarPostData, FooBarPostResponse, FooBarPostResponses, FooBarPutData, FooBarPutResponse, FooBarPutResponses, FooPostData, FooPostResponse, FooPostResponses, FooPutData, FooPutResponse, FooPutResponses, GetFooBarData, GetFooBarResponse, GetFooBarResponses, GetFooData, GetFooResponse, GetFooResponses } from './types.gen';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/preact-query/name-builder/sdk.gen.ts",
    "content": "// 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 { FooBarPostData, FooBarPostResponses, FooBarPutData, FooBarPutResponses, FooPostData, FooPostResponses, FooPutData, FooPutResponses, GetFooBarData, GetFooBarResponses, GetFooData, GetFooResponses } from './types.gen';\n\nexport type Options<TData extends TDataShape = TDataShape, ThrowOnError extends boolean = boolean> = Options2<TData, ThrowOnError> & {\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\nexport const getFoo = <ThrowOnError extends boolean = false>(options?: Options<GetFooData, ThrowOnError>) => (options?.client ?? client).get<GetFooResponses, unknown, ThrowOnError>({ url: '/foo', ...options });\n\nexport const fooPost = <ThrowOnError extends boolean = false>(options?: Options<FooPostData, ThrowOnError>) => (options?.client ?? client).post<FooPostResponses, unknown, ThrowOnError>({ url: '/foo', ...options });\n\nexport const fooPut = <ThrowOnError extends boolean = false>(options?: Options<FooPutData, ThrowOnError>) => (options?.client ?? client).put<FooPutResponses, unknown, ThrowOnError>({ url: '/foo', ...options });\n\nexport const getFooBar = <ThrowOnError extends boolean = false>(options?: Options<GetFooBarData, ThrowOnError>) => (options?.client ?? client).get<GetFooBarResponses, unknown, ThrowOnError>({ url: '/foo/bar', ...options });\n\nexport const fooBarPost = <ThrowOnError extends boolean = false>(options?: Options<FooBarPostData, ThrowOnError>) => (options?.client ?? client).post<FooBarPostResponses, unknown, ThrowOnError>({ url: '/foo/bar', ...options });\n\nexport const fooBarPut = <ThrowOnError extends boolean = false>(options?: Options<FooBarPutData, ThrowOnError>) => (options?.client ?? client).put<FooBarPutResponses, unknown, ThrowOnError>({ url: '/foo/bar', ...options });\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/preact-query/name-builder/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type ClientOptions = {\n    baseUrl: `${string}://${string}` | (string & {});\n};\n\nexport type GetFooData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/foo';\n};\n\nexport type GetFooResponses = {\n    /**\n     * OK\n     */\n    200: string;\n};\n\nexport type GetFooResponse = GetFooResponses[keyof GetFooResponses];\n\nexport type FooPostData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/foo';\n};\n\nexport type FooPostResponses = {\n    /**\n     * OK\n     */\n    200: string;\n};\n\nexport type FooPostResponse = FooPostResponses[keyof FooPostResponses];\n\nexport type FooPutData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/foo';\n};\n\nexport type FooPutResponses = {\n    /**\n     * OK\n     */\n    200: string;\n};\n\nexport type FooPutResponse = FooPutResponses[keyof FooPutResponses];\n\nexport type GetFooBarData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/foo/bar';\n};\n\nexport type GetFooBarResponses = {\n    /**\n     * OK\n     */\n    200: string;\n};\n\nexport type GetFooBarResponse = GetFooBarResponses[keyof GetFooBarResponses];\n\nexport type FooBarPostData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/foo/bar';\n};\n\nexport type FooBarPostResponses = {\n    /**\n     * OK\n     */\n    200: string;\n};\n\nexport type FooBarPostResponse = FooBarPostResponses[keyof FooBarPostResponses];\n\nexport type FooBarPutData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/foo/bar';\n};\n\nexport type FooBarPutResponses = {\n    /**\n     * OK\n     */\n    200: string;\n};\n\nexport type FooBarPutResponse = FooBarPutResponses[keyof FooBarPutResponses];\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/react-query/asClass/@tanstack/react-query.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport { type DefaultError, queryOptions, type UseMutationOptions } from '@tanstack/react-query';\n\nimport { client } from '../client.gen';\nimport { BarBazService, BarService, FooBazService, FooService, type Options } from '../sdk.gen';\nimport type { FooBarPostData, FooBarPostResponse, FooBarPutData, FooBarPutResponse, FooPostData, FooPostResponse, FooPutData, FooPutResponse, GetFooBarData, GetFooBarResponse, GetFooData, GetFooResponse } from '../types.gen';\n\nexport type QueryKey<TOptions extends Options> = [\n    Pick<TOptions, 'baseUrl' | 'body' | 'headers' | 'path' | 'query'> & {\n        _id: string;\n        _infinite?: boolean;\n        tags?: ReadonlyArray<string>;\n    }\n];\n\nconst createQueryKey = <TOptions extends Options>(id: string, options?: TOptions, infinite?: boolean, tags?: ReadonlyArray<string>): [\n    QueryKey<TOptions>[0]\n] => {\n    const params: QueryKey<TOptions>[0] = { _id: id, baseUrl: options?.baseUrl || (options?.client ?? client).getConfig().baseUrl } as QueryKey<TOptions>[0];\n    if (infinite) {\n        params._infinite = infinite;\n    }\n    if (tags) {\n        params.tags = tags;\n    }\n    if (options?.body) {\n        params.body = options.body;\n    }\n    if (options?.headers) {\n        params.headers = options.headers;\n    }\n    if (options?.path) {\n        params.path = options.path;\n    }\n    if (options?.query) {\n        params.query = options.query;\n    }\n    return [params];\n};\n\nexport const getFooQueryKey = (options?: Options<GetFooData>) => createQueryKey('getFoo', options);\n\nexport const getFooOptions = (options?: Options<GetFooData>) => queryOptions<GetFooResponse, DefaultError, GetFooResponse, ReturnType<typeof getFooQueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await FooBazService.getFoo({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: getFooQueryKey(options)\n});\n\nexport const fooPostMutation = (options?: Partial<Options<FooPostData>>): UseMutationOptions<FooPostResponse, DefaultError, Options<FooPostData>> => {\n    const mutationOptions: UseMutationOptions<FooPostResponse, DefaultError, Options<FooPostData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await FooService.post({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const fooPutMutation = (options?: Partial<Options<FooPutData>>): UseMutationOptions<FooPutResponse, DefaultError, Options<FooPutData>> => {\n    const mutationOptions: UseMutationOptions<FooPutResponse, DefaultError, Options<FooPutData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await FooService.put({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const getFooBarQueryKey = (options?: Options<GetFooBarData>) => createQueryKey('getFooBar', options);\n\nexport const getFooBarOptions = (options?: Options<GetFooBarData>) => queryOptions<GetFooBarResponse, DefaultError, GetFooBarResponse, ReturnType<typeof getFooBarQueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await BarBazService.getFooBar({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: getFooBarQueryKey(options)\n});\n\nexport const fooBarPostMutation = (options?: Partial<Options<FooBarPostData>>): UseMutationOptions<FooBarPostResponse, DefaultError, Options<FooBarPostData>> => {\n    const mutationOptions: UseMutationOptions<FooBarPostResponse, DefaultError, Options<FooBarPostData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await BarService.post({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const fooBarPutMutation = (options?: Partial<Options<FooBarPutData>>): UseMutationOptions<FooBarPutResponse, DefaultError, Options<FooBarPutData>> => {\n    const mutationOptions: UseMutationOptions<FooBarPutResponse, DefaultError, Options<FooBarPutData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await BarService.put({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/react-query/asClass/client/client.gen.ts",
    "content": "// 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 (options: RequestOptions) => {\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 url = buildUrl(opts);\n\n    return { opts, url };\n  };\n\n  const request: Client['request'] = async (options) => {\n    // @ts-expect-error\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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/react-query/asClass/client/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type { Auth } from '../core/auth.gen';\nexport type { QuerySerializerOptions } from '../core/bodySerializer.gen';\nexport {\n  formDataBodySerializer,\n  jsonBodySerializer,\n  urlSearchParamsBodySerializer,\n} from '../core/bodySerializer.gen';\nexport { buildClientParams } from '../core/params.gen';\nexport { serializeQueryKeyValue } from '../core/queryKeySerializer.gen';\nexport { createClient } from './client.gen';\nexport type {\n  Client,\n  ClientOptions,\n  Config,\n  CreateClientConfig,\n  Options,\n  RequestOptions,\n  RequestResult,\n  ResolvedRequestOptions,\n  ResponseStyle,\n  TDataShape,\n} from './types.gen';\nexport { createConfig, mergeHeaders } from './utils.gen';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/react-query/asClass/client/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { Auth } from '../core/auth.gen';\nimport type {\n  ServerSentEventsOptions,\n  ServerSentEventsResult,\n} from '../core/serverSentEvents.gen';\nimport type { Client as CoreClient, Config as CoreConfig } from '../core/types.gen';\nimport type { Middleware } from './utils.gen';\n\nexport type ResponseStyle = 'data' | 'fields';\n\nexport interface Config<T extends ClientOptions = ClientOptions>\n  extends Omit<RequestInit, 'body' | 'headers' | 'method'>, CoreConfig {\n  /**\n   * Base URL for all requests made by this client.\n   */\n  baseUrl?: T['baseUrl'];\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   * Please don't use the Fetch client for Next.js applications. The `next`\n   * options won't have any effect.\n   *\n   * Install {@link https://www.npmjs.com/package/@hey-api/client-next `@hey-api/client-next`} instead.\n   */\n  next?: never;\n  /**\n   * Return the response data parsed in a specified format. By default, `auto`\n   * will infer the appropriate method from the `Content-Type` response header.\n   * You can override this behavior with any of the {@link Body} methods.\n   * Select `stream` if you don't want to parse response data at all.\n   *\n   * @default 'auto'\n   */\n  parseAs?: 'arrayBuffer' | 'auto' | 'blob' | 'formData' | 'json' | 'stream' | 'text';\n  /**\n   * Should we return only data or multiple fields (data, error, response, etc.)?\n   *\n   * @default 'fields'\n   */\n  responseStyle?: ResponseStyle;\n  /**\n   * Throw an error instead of returning it in the response?\n   *\n   * @default false\n   */\n  throwOnError?: T['throwOnError'];\n}\n\nexport interface RequestOptions<\n  TData = unknown,\n  TResponseStyle extends ResponseStyle = 'fields',\n  ThrowOnError extends boolean = boolean,\n  Url extends string = string,\n>\n  extends\n    Config<{\n      responseStyle: TResponseStyle;\n      throwOnError: ThrowOnError;\n    }>,\n    Pick<\n      ServerSentEventsOptions<TData>,\n      | 'onRequest'\n      | 'onSseError'\n      | 'onSseEvent'\n      | 'sseDefaultRetryDelay'\n      | 'sseMaxRetryAttempts'\n      | 'sseMaxRetryDelay'\n    > {\n  /**\n   * Any body that you want to add to your request.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/fetch#body}\n   */\n  body?: unknown;\n  path?: Record<string, unknown>;\n  query?: Record<string, unknown>;\n  /**\n   * Security mechanism(s) to use for the request.\n   */\n  security?: ReadonlyArray<Auth>;\n  url: Url;\n}\n\nexport interface ResolvedRequestOptions<\n  TResponseStyle extends ResponseStyle = 'fields',\n  ThrowOnError extends boolean = boolean,\n  Url extends string = string,\n> extends RequestOptions<unknown, TResponseStyle, ThrowOnError, Url> {\n  serializedBody?: string;\n}\n\nexport type RequestResult<\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = boolean,\n  TResponseStyle extends ResponseStyle = 'fields',\n> = ThrowOnError extends true\n  ? Promise<\n      TResponseStyle extends 'data'\n        ? TData extends Record<string, unknown>\n          ? TData[keyof TData]\n          : TData\n        : {\n            data: TData extends Record<string, unknown> ? TData[keyof TData] : TData;\n            request: Request;\n            response: Response;\n          }\n    >\n  : Promise<\n      TResponseStyle extends 'data'\n        ? (TData extends Record<string, unknown> ? TData[keyof TData] : TData) | undefined\n        : (\n            | {\n                data: TData extends Record<string, unknown> ? TData[keyof TData] : TData;\n                error: undefined;\n              }\n            | {\n                data: undefined;\n                error: TError extends Record<string, unknown> ? TError[keyof TError] : TError;\n              }\n          ) & {\n            request: Request;\n            response: Response;\n          }\n    >;\n\nexport interface ClientOptions {\n  baseUrl?: string;\n  responseStyle?: ResponseStyle;\n  throwOnError?: boolean;\n}\n\ntype MethodFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'>,\n) => RequestResult<TData, TError, ThrowOnError, TResponseStyle>;\n\ntype SseFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'>,\n) => Promise<ServerSentEventsResult<TData, TError>>;\n\ntype RequestFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'> &\n    Pick<Required<RequestOptions<TData, TResponseStyle, ThrowOnError>>, 'method'>,\n) => RequestResult<TData, TError, ThrowOnError, TResponseStyle>;\n\ntype BuildUrlFn = <\n  TData extends {\n    body?: unknown;\n    path?: Record<string, unknown>;\n    query?: Record<string, unknown>;\n    url: string;\n  },\n>(\n  options: TData & Options<TData>,\n) => string;\n\nexport type Client = CoreClient<RequestFn, Config, MethodFn, BuildUrlFn, SseFn> & {\n  interceptors: Middleware<Request, Response, unknown, ResolvedRequestOptions>;\n};\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 = ClientOptions> = (\n  override?: Config<ClientOptions & T>,\n) => Config<Required<ClientOptions> & T>;\n\nexport interface TDataShape {\n  body?: unknown;\n  headers?: unknown;\n  path?: unknown;\n  query?: unknown;\n  url: string;\n}\n\ntype OmitKeys<T, K> = Pick<T, Exclude<keyof T, K>>;\n\nexport type Options<\n  TData extends TDataShape = TDataShape,\n  ThrowOnError extends boolean = boolean,\n  TResponse = unknown,\n  TResponseStyle extends ResponseStyle = 'fields',\n> = OmitKeys<\n  RequestOptions<TResponse, TResponseStyle, ThrowOnError>,\n  'body' | 'path' | 'query' | 'url'\n> &\n  ([TData] extends [never] ? unknown : Omit<TData, 'url'>);\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/react-query/asClass/client/utils.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/react-query/asClass/client.gen.ts",
    "content": "// 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>());\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/react-query/asClass/core/auth.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/react-query/asClass/core/bodySerializer.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/react-query/asClass/core/params.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/react-query/asClass/core/pathSerializer.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/react-query/asClass/core/queryKeySerializer.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\n/**\n * JSON-friendly union that mirrors what Pinia Colada can hash.\n */\nexport type JsonValue =\n  | null\n  | string\n  | number\n  | boolean\n  | JsonValue[]\n  | { [key: string]: JsonValue };\n\n/**\n * Replacer that converts non-JSON values (bigint, Date, etc.) to safe substitutes.\n */\nexport const queryKeyJsonReplacer = (_key: string, value: unknown) => {\n  if (value === undefined || typeof value === 'function' || typeof value === 'symbol') {\n    return undefined;\n  }\n  if (typeof value === 'bigint') {\n    return value.toString();\n  }\n  if (value instanceof Date) {\n    return value.toISOString();\n  }\n  return value;\n};\n\n/**\n * Safely stringifies a value and parses it back into a JsonValue.\n */\nexport const stringifyToJsonValue = (input: unknown): JsonValue | undefined => {\n  try {\n    const json = JSON.stringify(input, queryKeyJsonReplacer);\n    if (json === undefined) {\n      return undefined;\n    }\n    return JSON.parse(json) as JsonValue;\n  } catch {\n    return undefined;\n  }\n};\n\n/**\n * Detects plain objects (including objects with a null prototype).\n */\nconst isPlainObject = (value: unknown): value is Record<string, unknown> => {\n  if (value === null || typeof value !== 'object') {\n    return false;\n  }\n  const prototype = Object.getPrototypeOf(value as object);\n  return prototype === Object.prototype || prototype === null;\n};\n\n/**\n * Turns URLSearchParams into a sorted JSON object for deterministic keys.\n */\nconst serializeSearchParams = (params: URLSearchParams): JsonValue => {\n  const entries = Array.from(params.entries()).sort(([a], [b]) => a.localeCompare(b));\n  const result: Record<string, JsonValue> = {};\n\n  for (const [key, value] of entries) {\n    const existing = result[key];\n    if (existing === undefined) {\n      result[key] = value;\n      continue;\n    }\n\n    if (Array.isArray(existing)) {\n      (existing as string[]).push(value);\n    } else {\n      result[key] = [existing, value];\n    }\n  }\n\n  return result;\n};\n\n/**\n * Normalizes any accepted value into a JSON-friendly shape for query keys.\n */\nexport const serializeQueryKeyValue = (value: unknown): JsonValue | undefined => {\n  if (value === null) {\n    return null;\n  }\n\n  if (typeof value === 'string' || typeof value === 'number' || typeof value === 'boolean') {\n    return value;\n  }\n\n  if (value === undefined || typeof value === 'function' || typeof value === 'symbol') {\n    return undefined;\n  }\n\n  if (typeof value === 'bigint') {\n    return value.toString();\n  }\n\n  if (value instanceof Date) {\n    return value.toISOString();\n  }\n\n  if (Array.isArray(value)) {\n    return stringifyToJsonValue(value);\n  }\n\n  if (typeof URLSearchParams !== 'undefined' && value instanceof URLSearchParams) {\n    return serializeSearchParams(value);\n  }\n\n  if (isPlainObject(value)) {\n    return stringifyToJsonValue(value);\n  }\n\n  return undefined;\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/react-query/asClass/core/serverSentEvents.gen.ts",
    "content": "// 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 const 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            // Normalize line endings: CRLF -> LF, then CR -> LF\n            buffer = buffer.replace(/\\r\\n/g, '\\n').replace(/\\r/g, '\\n');\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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/react-query/asClass/core/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { Auth, AuthToken } from './auth.gen';\nimport type { BodySerializer, QuerySerializer, QuerySerializerOptions } from './bodySerializer.gen';\n\nexport type HttpMethod =\n  | 'connect'\n  | 'delete'\n  | 'get'\n  | 'head'\n  | 'options'\n  | 'patch'\n  | 'post'\n  | 'put'\n  | 'trace';\n\nexport type Client<\n  RequestFn = never,\n  Config = unknown,\n  MethodFn = never,\n  BuildUrlFn = never,\n  SseFn = never,\n> = {\n  /**\n   * Returns the final request URL.\n   */\n  buildUrl: BuildUrlFn;\n  getConfig: () => Config;\n  request: RequestFn;\n  setConfig: (config: Config) => Config;\n} & {\n  [K in HttpMethod]: MethodFn;\n} & ([SseFn] extends [never] ? { sse?: never } : { sse: { [K in HttpMethod]: SseFn } });\n\nexport interface Config {\n  /**\n   * Auth token or a function returning auth token. The resolved value will be\n   * added to the request payload as defined by its `security` array.\n   */\n  auth?: ((auth: Auth) => Promise<AuthToken> | AuthToken) | AuthToken;\n  /**\n   * A function for serializing request body parameter. By default,\n   * {@link JSON.stringify()} will be used.\n   */\n  bodySerializer?: BodySerializer | null;\n  /**\n   * An object containing any HTTP headers that you want to pre-populate your\n   * `Headers` object with.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/Headers/Headers#init See more}\n   */\n  headers?:\n    | RequestInit['headers']\n    | Record<\n        string,\n        string | number | boolean | (string | number | boolean)[] | null | undefined | unknown\n      >;\n  /**\n   * The request method.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/fetch#method See more}\n   */\n  method?: Uppercase<HttpMethod>;\n  /**\n   * A function for serializing request query parameters. By default, arrays\n   * will be exploded in form style, objects will be exploded in deepObject\n   * style, and reserved characters are percent-encoded.\n   *\n   * This method will have no effect if the native `paramsSerializer()` Axios\n   * API function is used.\n   *\n   * {@link https://swagger.io/docs/specification/serialization/#query View examples}\n   */\n  querySerializer?: QuerySerializer | QuerySerializerOptions;\n  /**\n   * A function validating request data. This is useful if you want to ensure\n   * the request conforms to the desired shape, so it can be safely sent to\n   * the server.\n   */\n  requestValidator?: (data: unknown) => Promise<unknown>;\n  /**\n   * A function transforming response data before it's returned. This is useful\n   * for post-processing data, e.g. converting ISO strings into Date objects.\n   */\n  responseTransformer?: (data: unknown) => Promise<unknown>;\n  /**\n   * A function validating response data. This is useful if you want to ensure\n   * the response conforms to the desired shape, so it can be safely passed to\n   * the transformers and returned to the user.\n   */\n  responseValidator?: (data: unknown) => Promise<unknown>;\n}\n\ntype IsExactlyNeverOrNeverUndefined<T> = [T] extends [never]\n  ? true\n  : [T] extends [never | undefined]\n    ? [undefined] extends [T]\n      ? false\n      : true\n    : false;\n\nexport type OmitNever<T extends Record<string, unknown>> = {\n  [K in keyof T as IsExactlyNeverOrNeverUndefined<T[K]> extends true ? never : K]: T[K];\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/react-query/asClass/core/utils.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/react-query/asClass/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport { BarBazService, BarService, BarService2, FooBazService, FooService, FooService2, type Options } from './sdk.gen';\nexport type { ClientOptions, FooBarPostData, FooBarPostResponse, FooBarPostResponses, FooBarPutData, FooBarPutResponse, FooBarPutResponses, FooPostData, FooPostResponse, FooPostResponses, FooPutData, FooPutResponse, FooPutResponses, GetFooBarData, GetFooBarResponse, GetFooBarResponses, GetFooData, GetFooResponse, GetFooResponses } from './types.gen';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/react-query/asClass/sdk.gen.ts",
    "content": "// 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 { FooBarPostData, FooBarPostResponses, FooBarPutData, FooBarPutResponses, FooPostData, FooPostResponses, FooPutData, FooPutResponses, GetFooBarData, GetFooBarResponses, GetFooData, GetFooResponses } from './types.gen';\n\nexport type Options<TData extends TDataShape = TDataShape, ThrowOnError extends boolean = boolean> = Options2<TData, ThrowOnError> & {\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\nexport class BarService {\n    public static post<ThrowOnError extends boolean = false>(options?: Options<FooBarPostData, ThrowOnError>) {\n        return (options?.client ?? client).post<FooBarPostResponses, unknown, ThrowOnError>({ url: '/foo/bar', ...options });\n    }\n    \n    public static put<ThrowOnError extends boolean = false>(options?: Options<FooBarPutData, ThrowOnError>) {\n        return (options?.client ?? client).put<FooBarPutResponses, unknown, ThrowOnError>({ url: '/foo/bar', ...options });\n    }\n}\n\nexport class FooService {\n    public static post<ThrowOnError extends boolean = false>(options?: Options<FooPostData, ThrowOnError>) {\n        return (options?.client ?? client).post<FooPostResponses, unknown, ThrowOnError>({ url: '/foo', ...options });\n    }\n    \n    public static put<ThrowOnError extends boolean = false>(options?: Options<FooPutData, ThrowOnError>) {\n        return (options?.client ?? client).put<FooPutResponses, unknown, ThrowOnError>({ url: '/foo', ...options });\n    }\n    \n    static barService = BarService;\n}\n\nexport class FooBazService {\n    public static getFoo<ThrowOnError extends boolean = false>(options?: Options<GetFooData, ThrowOnError>) {\n        return (options?.client ?? client).get<GetFooResponses, unknown, ThrowOnError>({ url: '/foo', ...options });\n    }\n    \n    static fooService = FooService;\n}\n\nexport class BarService2 {\n    public static post<ThrowOnError extends boolean = false>(options?: Options<FooBarPostData, ThrowOnError>) {\n        return (options?.client ?? client).post<FooBarPostResponses, unknown, ThrowOnError>({ url: '/foo/bar', ...options });\n    }\n    \n    public static put<ThrowOnError extends boolean = false>(options?: Options<FooBarPutData, ThrowOnError>) {\n        return (options?.client ?? client).put<FooBarPutResponses, unknown, ThrowOnError>({ url: '/foo/bar', ...options });\n    }\n}\n\nexport class FooService2 {\n    static barService = BarService2;\n}\n\nexport class BarBazService {\n    public static getFooBar<ThrowOnError extends boolean = false>(options?: Options<GetFooBarData, ThrowOnError>) {\n        return (options?.client ?? client).get<GetFooBarResponses, unknown, ThrowOnError>({ url: '/foo/bar', ...options });\n    }\n    \n    static fooService = FooService2;\n}\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/react-query/asClass/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type ClientOptions = {\n    baseUrl: `${string}://${string}` | (string & {});\n};\n\nexport type GetFooData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/foo';\n};\n\nexport type GetFooResponses = {\n    /**\n     * OK\n     */\n    200: string;\n};\n\nexport type GetFooResponse = GetFooResponses[keyof GetFooResponses];\n\nexport type FooPostData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/foo';\n};\n\nexport type FooPostResponses = {\n    /**\n     * OK\n     */\n    200: string;\n};\n\nexport type FooPostResponse = FooPostResponses[keyof FooPostResponses];\n\nexport type FooPutData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/foo';\n};\n\nexport type FooPutResponses = {\n    /**\n     * OK\n     */\n    200: string;\n};\n\nexport type FooPutResponse = FooPutResponses[keyof FooPutResponses];\n\nexport type GetFooBarData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/foo/bar';\n};\n\nexport type GetFooBarResponses = {\n    /**\n     * OK\n     */\n    200: string;\n};\n\nexport type GetFooBarResponse = GetFooBarResponses[keyof GetFooBarResponses];\n\nexport type FooBarPostData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/foo/bar';\n};\n\nexport type FooBarPostResponses = {\n    /**\n     * OK\n     */\n    200: string;\n};\n\nexport type FooBarPostResponse = FooBarPostResponses[keyof FooBarPostResponses];\n\nexport type FooBarPutData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/foo/bar';\n};\n\nexport type FooBarPutResponses = {\n    /**\n     * OK\n     */\n    200: string;\n};\n\nexport type FooBarPutResponse = FooBarPutResponses[keyof FooBarPutResponses];\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/react-query/axios/@tanstack/react-query.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport { type DefaultError, type InfiniteData, infiniteQueryOptions, queryOptions, type UseMutationOptions } from '@tanstack/react-query';\nimport type { AxiosError } from 'axios';\n\nimport { client } from '../client.gen';\nimport { apiVVersionODataControllerCount, callToTestOrderOfParams, callWithDefaultOptionalParameters, callWithDefaultParameters, callWithDescriptions, callWithDuplicateResponses, callWithNoContentResponse, callWithParameters, callWithResponse, callWithResponseAndNoContentResponse, callWithResponses, callWithResultFromHeader, callWithWeirdParameterNames, collectionFormat, complexParams, complexTypes, deleteCallWithoutParametersAndResponse, deleteFoo, deprecatedCall, dummyA, dummyB, duplicateName, duplicateName2, duplicateName3, duplicateName4, export_, fileResponse, fooWow, getApiVbyApiVersionSimpleOperation, getCallWithOptionalParam, getCallWithoutParametersAndResponse, import_, multipartRequest, multipartResponse, nonAsciiæøåÆøÅöôêÊ字符串, type Options, patchApiVbyApiVersionNoTag, patchCallWithoutParametersAndResponse, postApiVbyApiVersionFormData, postApiVbyApiVersionRequestBody, postCallWithOptionalParam, postCallWithoutParametersAndResponse, putCallWithoutParametersAndResponse, putWithFormUrlEncoded, testErrorCode, types, uploadFile } from '../sdk.gen';\nimport type { ApiVVersionODataControllerCountData, ApiVVersionODataControllerCountResponse, CallToTestOrderOfParamsData, CallWithDefaultOptionalParametersData, CallWithDefaultParametersData, CallWithDescriptionsData, CallWithDuplicateResponsesData, CallWithDuplicateResponsesError, CallWithDuplicateResponsesResponse, CallWithNoContentResponseData, CallWithNoContentResponseResponse, CallWithParametersData, CallWithResponseAndNoContentResponseData, CallWithResponseAndNoContentResponseResponse, CallWithResponseData, CallWithResponseResponse, CallWithResponsesData, CallWithResponsesError, CallWithResponsesResponse, CallWithResultFromHeaderData, CallWithWeirdParameterNamesData, CollectionFormatData, ComplexParamsData, ComplexParamsResponse, ComplexTypesData, ComplexTypesResponse, DeleteCallWithoutParametersAndResponseData, DeleteFooData3, DeprecatedCallData, DummyAData, DummyAResponse, DummyBData, DummyBResponse, DuplicateName2Data, DuplicateName3Data, DuplicateName4Data, DuplicateNameData, ExportData, FileResponseData, FileResponseResponse, FooWowData, GetApiVbyApiVersionSimpleOperationData, GetApiVbyApiVersionSimpleOperationError, GetApiVbyApiVersionSimpleOperationResponse, GetCallWithOptionalParamData, GetCallWithoutParametersAndResponseData, ImportData, ImportResponse, MultipartRequestData, MultipartResponseData, MultipartResponseResponse, NonAsciiæøåÆøÅöôêÊ字符串Data, NonAsciiæøåÆøÅöôêÊ字符串Response, PatchApiVbyApiVersionNoTagData, PatchCallWithoutParametersAndResponseData, PostApiVbyApiVersionFormDataData, PostApiVbyApiVersionRequestBodyData, PostCallWithOptionalParamData, PostCallWithOptionalParamResponse, PostCallWithoutParametersAndResponseData, PutCallWithoutParametersAndResponseData, PutWithFormUrlEncodedData, TestErrorCodeData, TypesData, TypesResponse, UploadFileData, UploadFileResponse } from '../types.gen';\n\nexport type QueryKey<TOptions extends Options> = [\n    Pick<TOptions, 'baseURL' | 'body' | 'headers' | 'path' | 'query'> & {\n        _id: string;\n        _infinite?: boolean;\n        tags?: ReadonlyArray<string>;\n    }\n];\n\nconst createQueryKey = <TOptions extends Options>(id: string, options?: TOptions, infinite?: boolean, tags?: ReadonlyArray<string>): [\n    QueryKey<TOptions>[0]\n] => {\n    const params: QueryKey<TOptions>[0] = { _id: id, baseURL: options?.baseURL || (options?.client ?? client).getConfig().baseURL } as QueryKey<TOptions>[0];\n    if (infinite) {\n        params._infinite = infinite;\n    }\n    if (tags) {\n        params.tags = tags;\n    }\n    if (options?.body) {\n        params.body = options.body;\n    }\n    if (options?.headers) {\n        params.headers = options.headers;\n    }\n    if (options?.path) {\n        params.path = options.path;\n    }\n    if (options?.query) {\n        params.query = options.query;\n    }\n    return [params];\n};\n\nexport const exportQueryKey = (options?: Options<ExportData>) => createQueryKey('export', options);\n\nexport const exportOptions = (options?: Options<ExportData>) => queryOptions<unknown, AxiosError<DefaultError>, unknown, ReturnType<typeof exportQueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await export_({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: exportQueryKey(options)\n});\n\nexport const patchApiVbyApiVersionNoTagMutation = (options?: Partial<Options<PatchApiVbyApiVersionNoTagData>>): UseMutationOptions<unknown, AxiosError<DefaultError>, Options<PatchApiVbyApiVersionNoTagData>> => {\n    const mutationOptions: UseMutationOptions<unknown, AxiosError<DefaultError>, Options<PatchApiVbyApiVersionNoTagData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await patchApiVbyApiVersionNoTag({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const importMutation = (options?: Partial<Options<ImportData>>): UseMutationOptions<ImportResponse, AxiosError<DefaultError>, Options<ImportData>> => {\n    const mutationOptions: UseMutationOptions<ImportResponse, AxiosError<DefaultError>, Options<ImportData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await import_({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const fooWowMutation = (options?: Partial<Options<FooWowData>>): UseMutationOptions<unknown, AxiosError<DefaultError>, Options<FooWowData>> => {\n    const mutationOptions: UseMutationOptions<unknown, AxiosError<DefaultError>, Options<FooWowData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await fooWow({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const apiVVersionODataControllerCountQueryKey = (options?: Options<ApiVVersionODataControllerCountData>) => createQueryKey('apiVVersionODataControllerCount', options);\n\nexport const apiVVersionODataControllerCountOptions = (options?: Options<ApiVVersionODataControllerCountData>) => queryOptions<ApiVVersionODataControllerCountResponse, AxiosError<DefaultError>, ApiVVersionODataControllerCountResponse, ReturnType<typeof apiVVersionODataControllerCountQueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await apiVVersionODataControllerCount({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: apiVVersionODataControllerCountQueryKey(options)\n});\n\nexport const getApiVbyApiVersionSimpleOperationQueryKey = (options: Options<GetApiVbyApiVersionSimpleOperationData>) => createQueryKey('getApiVbyApiVersionSimpleOperation', options);\n\nexport const getApiVbyApiVersionSimpleOperationOptions = (options: Options<GetApiVbyApiVersionSimpleOperationData>) => queryOptions<GetApiVbyApiVersionSimpleOperationResponse, AxiosError<GetApiVbyApiVersionSimpleOperationError>, GetApiVbyApiVersionSimpleOperationResponse, ReturnType<typeof getApiVbyApiVersionSimpleOperationQueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await getApiVbyApiVersionSimpleOperation({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: getApiVbyApiVersionSimpleOperationQueryKey(options)\n});\n\nexport const deleteCallWithoutParametersAndResponseMutation = (options?: Partial<Options<DeleteCallWithoutParametersAndResponseData>>): UseMutationOptions<unknown, AxiosError<DefaultError>, Options<DeleteCallWithoutParametersAndResponseData>> => {\n    const mutationOptions: UseMutationOptions<unknown, AxiosError<DefaultError>, Options<DeleteCallWithoutParametersAndResponseData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await deleteCallWithoutParametersAndResponse({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const getCallWithoutParametersAndResponseQueryKey = (options?: Options<GetCallWithoutParametersAndResponseData>) => createQueryKey('getCallWithoutParametersAndResponse', options);\n\nexport const getCallWithoutParametersAndResponseOptions = (options?: Options<GetCallWithoutParametersAndResponseData>) => queryOptions<unknown, AxiosError<DefaultError>, unknown, ReturnType<typeof getCallWithoutParametersAndResponseQueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await getCallWithoutParametersAndResponse({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: getCallWithoutParametersAndResponseQueryKey(options)\n});\n\nexport const patchCallWithoutParametersAndResponseMutation = (options?: Partial<Options<PatchCallWithoutParametersAndResponseData>>): UseMutationOptions<unknown, AxiosError<DefaultError>, Options<PatchCallWithoutParametersAndResponseData>> => {\n    const mutationOptions: UseMutationOptions<unknown, AxiosError<DefaultError>, Options<PatchCallWithoutParametersAndResponseData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await patchCallWithoutParametersAndResponse({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const postCallWithoutParametersAndResponseMutation = (options?: Partial<Options<PostCallWithoutParametersAndResponseData>>): UseMutationOptions<unknown, AxiosError<DefaultError>, Options<PostCallWithoutParametersAndResponseData>> => {\n    const mutationOptions: UseMutationOptions<unknown, AxiosError<DefaultError>, Options<PostCallWithoutParametersAndResponseData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await postCallWithoutParametersAndResponse({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const putCallWithoutParametersAndResponseMutation = (options?: Partial<Options<PutCallWithoutParametersAndResponseData>>): UseMutationOptions<unknown, AxiosError<DefaultError>, Options<PutCallWithoutParametersAndResponseData>> => {\n    const mutationOptions: UseMutationOptions<unknown, AxiosError<DefaultError>, Options<PutCallWithoutParametersAndResponseData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await putCallWithoutParametersAndResponse({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const deleteFooMutation = (options?: Partial<Options<DeleteFooData3>>): UseMutationOptions<unknown, AxiosError<DefaultError>, Options<DeleteFooData3>> => {\n    const mutationOptions: UseMutationOptions<unknown, AxiosError<DefaultError>, Options<DeleteFooData3>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await deleteFoo({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const callWithDescriptionsMutation = (options?: Partial<Options<CallWithDescriptionsData>>): UseMutationOptions<unknown, AxiosError<DefaultError>, Options<CallWithDescriptionsData>> => {\n    const mutationOptions: UseMutationOptions<unknown, AxiosError<DefaultError>, Options<CallWithDescriptionsData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await callWithDescriptions({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\n/**\n * @deprecated\n */\nexport const deprecatedCallMutation = (options?: Partial<Options<DeprecatedCallData>>): UseMutationOptions<unknown, AxiosError<DefaultError>, Options<DeprecatedCallData>> => {\n    const mutationOptions: UseMutationOptions<unknown, AxiosError<DefaultError>, Options<DeprecatedCallData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await deprecatedCall({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const callWithParametersMutation = (options?: Partial<Options<CallWithParametersData>>): UseMutationOptions<unknown, AxiosError<DefaultError>, Options<CallWithParametersData>> => {\n    const mutationOptions: UseMutationOptions<unknown, AxiosError<DefaultError>, Options<CallWithParametersData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await callWithParameters({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const callWithWeirdParameterNamesMutation = (options?: Partial<Options<CallWithWeirdParameterNamesData>>): UseMutationOptions<unknown, AxiosError<DefaultError>, Options<CallWithWeirdParameterNamesData>> => {\n    const mutationOptions: UseMutationOptions<unknown, AxiosError<DefaultError>, Options<CallWithWeirdParameterNamesData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await callWithWeirdParameterNames({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const getCallWithOptionalParamQueryKey = (options: Options<GetCallWithOptionalParamData>) => createQueryKey('getCallWithOptionalParam', options);\n\nexport const getCallWithOptionalParamOptions = (options: Options<GetCallWithOptionalParamData>) => queryOptions<unknown, AxiosError<DefaultError>, unknown, ReturnType<typeof getCallWithOptionalParamQueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await getCallWithOptionalParam({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: getCallWithOptionalParamQueryKey(options)\n});\n\nconst createInfiniteParams = <K extends Pick<QueryKey<Options>[0], 'body' | 'headers' | 'path' | 'query'>>(queryKey: QueryKey<Options>, page: K) => {\n    const params = { ...queryKey[0] };\n    if (page.body) {\n        params.body = {\n            ...queryKey[0].body as any,\n            ...page.body as any\n        };\n    }\n    if (page.headers) {\n        params.headers = {\n            ...queryKey[0].headers,\n            ...page.headers\n        };\n    }\n    if (page.path) {\n        params.path = {\n            ...queryKey[0].path as any,\n            ...page.path as any\n        };\n    }\n    if (page.query) {\n        params.query = {\n            ...queryKey[0].query as any,\n            ...page.query as any\n        };\n    }\n    return params as unknown as typeof page;\n};\n\nexport const getCallWithOptionalParamInfiniteQueryKey = (options: Options<GetCallWithOptionalParamData>): QueryKey<Options<GetCallWithOptionalParamData>> => createQueryKey('getCallWithOptionalParam', options, true);\n\nexport const getCallWithOptionalParamInfiniteOptions = (options: Options<GetCallWithOptionalParamData>) => infiniteQueryOptions<unknown, AxiosError<DefaultError>, InfiniteData<unknown>, QueryKey<Options<GetCallWithOptionalParamData>>, number | Pick<QueryKey<Options<GetCallWithOptionalParamData>>[0], 'body' | 'headers' | 'path' | 'query'>>(\n// @ts-ignore\n{\n    queryFn: async ({ pageParam, queryKey, signal }) => {\n        // @ts-ignore\n        const page: Pick<QueryKey<Options<GetCallWithOptionalParamData>>[0], 'body' | 'headers' | 'path' | 'query'> = typeof pageParam === 'object' ? pageParam : {\n            query: {\n                page: pageParam\n            }\n        };\n        const params = createInfiniteParams(queryKey, page);\n        const { data } = await getCallWithOptionalParam({\n            ...options,\n            ...params,\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: getCallWithOptionalParamInfiniteQueryKey(options)\n});\n\nexport const postCallWithOptionalParamMutation = (options?: Partial<Options<PostCallWithOptionalParamData>>): UseMutationOptions<PostCallWithOptionalParamResponse, AxiosError<DefaultError>, Options<PostCallWithOptionalParamData>> => {\n    const mutationOptions: UseMutationOptions<PostCallWithOptionalParamResponse, AxiosError<DefaultError>, Options<PostCallWithOptionalParamData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await postCallWithOptionalParam({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const postApiVbyApiVersionRequestBodyMutation = (options?: Partial<Options<PostApiVbyApiVersionRequestBodyData>>): UseMutationOptions<unknown, AxiosError<DefaultError>, Options<PostApiVbyApiVersionRequestBodyData>> => {\n    const mutationOptions: UseMutationOptions<unknown, AxiosError<DefaultError>, Options<PostApiVbyApiVersionRequestBodyData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await postApiVbyApiVersionRequestBody({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const postApiVbyApiVersionFormDataMutation = (options?: Partial<Options<PostApiVbyApiVersionFormDataData>>): UseMutationOptions<unknown, AxiosError<DefaultError>, Options<PostApiVbyApiVersionFormDataData>> => {\n    const mutationOptions: UseMutationOptions<unknown, AxiosError<DefaultError>, Options<PostApiVbyApiVersionFormDataData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await postApiVbyApiVersionFormData({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const callWithDefaultParametersQueryKey = (options?: Options<CallWithDefaultParametersData>) => createQueryKey('callWithDefaultParameters', options);\n\nexport const callWithDefaultParametersOptions = (options?: Options<CallWithDefaultParametersData>) => queryOptions<unknown, AxiosError<DefaultError>, unknown, ReturnType<typeof callWithDefaultParametersQueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await callWithDefaultParameters({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: callWithDefaultParametersQueryKey(options)\n});\n\nexport const callWithDefaultOptionalParametersMutation = (options?: Partial<Options<CallWithDefaultOptionalParametersData>>): UseMutationOptions<unknown, AxiosError<DefaultError>, Options<CallWithDefaultOptionalParametersData>> => {\n    const mutationOptions: UseMutationOptions<unknown, AxiosError<DefaultError>, Options<CallWithDefaultOptionalParametersData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await callWithDefaultOptionalParameters({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const callToTestOrderOfParamsMutation = (options?: Partial<Options<CallToTestOrderOfParamsData>>): UseMutationOptions<unknown, AxiosError<DefaultError>, Options<CallToTestOrderOfParamsData>> => {\n    const mutationOptions: UseMutationOptions<unknown, AxiosError<DefaultError>, Options<CallToTestOrderOfParamsData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await callToTestOrderOfParams({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const duplicateNameMutation = (options?: Partial<Options<DuplicateNameData>>): UseMutationOptions<unknown, AxiosError<DefaultError>, Options<DuplicateNameData>> => {\n    const mutationOptions: UseMutationOptions<unknown, AxiosError<DefaultError>, Options<DuplicateNameData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await duplicateName({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const duplicateName2QueryKey = (options?: Options<DuplicateName2Data>) => createQueryKey('duplicateName2', options);\n\nexport const duplicateName2Options = (options?: Options<DuplicateName2Data>) => queryOptions<unknown, AxiosError<DefaultError>, unknown, ReturnType<typeof duplicateName2QueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await duplicateName2({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: duplicateName2QueryKey(options)\n});\n\nexport const duplicateName3Mutation = (options?: Partial<Options<DuplicateName3Data>>): UseMutationOptions<unknown, AxiosError<DefaultError>, Options<DuplicateName3Data>> => {\n    const mutationOptions: UseMutationOptions<unknown, AxiosError<DefaultError>, Options<DuplicateName3Data>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await duplicateName3({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const duplicateName4Mutation = (options?: Partial<Options<DuplicateName4Data>>): UseMutationOptions<unknown, AxiosError<DefaultError>, Options<DuplicateName4Data>> => {\n    const mutationOptions: UseMutationOptions<unknown, AxiosError<DefaultError>, Options<DuplicateName4Data>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await duplicateName4({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const callWithNoContentResponseQueryKey = (options?: Options<CallWithNoContentResponseData>) => createQueryKey('callWithNoContentResponse', options);\n\nexport const callWithNoContentResponseOptions = (options?: Options<CallWithNoContentResponseData>) => queryOptions<CallWithNoContentResponseResponse, AxiosError<DefaultError>, CallWithNoContentResponseResponse, ReturnType<typeof callWithNoContentResponseQueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await callWithNoContentResponse({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: callWithNoContentResponseQueryKey(options)\n});\n\nexport const callWithResponseAndNoContentResponseQueryKey = (options?: Options<CallWithResponseAndNoContentResponseData>) => createQueryKey('callWithResponseAndNoContentResponse', options);\n\nexport const callWithResponseAndNoContentResponseOptions = (options?: Options<CallWithResponseAndNoContentResponseData>) => queryOptions<CallWithResponseAndNoContentResponseResponse, AxiosError<DefaultError>, CallWithResponseAndNoContentResponseResponse, ReturnType<typeof callWithResponseAndNoContentResponseQueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await callWithResponseAndNoContentResponse({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: callWithResponseAndNoContentResponseQueryKey(options)\n});\n\nexport const dummyAQueryKey = (options?: Options<DummyAData>) => createQueryKey('dummyA', options);\n\nexport const dummyAOptions = (options?: Options<DummyAData>) => queryOptions<DummyAResponse, AxiosError<DefaultError>, DummyAResponse, ReturnType<typeof dummyAQueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await dummyA({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: dummyAQueryKey(options)\n});\n\nexport const dummyBQueryKey = (options?: Options<DummyBData>) => createQueryKey('dummyB', options);\n\nexport const dummyBOptions = (options?: Options<DummyBData>) => queryOptions<DummyBResponse, AxiosError<DefaultError>, DummyBResponse, ReturnType<typeof dummyBQueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await dummyB({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: dummyBQueryKey(options)\n});\n\nexport const callWithResponseQueryKey = (options?: Options<CallWithResponseData>) => createQueryKey('callWithResponse', options);\n\nexport const callWithResponseOptions = (options?: Options<CallWithResponseData>) => queryOptions<CallWithResponseResponse, AxiosError<DefaultError>, CallWithResponseResponse, ReturnType<typeof callWithResponseQueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await callWithResponse({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: callWithResponseQueryKey(options)\n});\n\nexport const callWithDuplicateResponsesMutation = (options?: Partial<Options<CallWithDuplicateResponsesData>>): UseMutationOptions<CallWithDuplicateResponsesResponse, AxiosError<CallWithDuplicateResponsesError>, Options<CallWithDuplicateResponsesData>> => {\n    const mutationOptions: UseMutationOptions<CallWithDuplicateResponsesResponse, AxiosError<CallWithDuplicateResponsesError>, Options<CallWithDuplicateResponsesData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await callWithDuplicateResponses({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const callWithResponsesMutation = (options?: Partial<Options<CallWithResponsesData>>): UseMutationOptions<CallWithResponsesResponse, AxiosError<CallWithResponsesError>, Options<CallWithResponsesData>> => {\n    const mutationOptions: UseMutationOptions<CallWithResponsesResponse, AxiosError<CallWithResponsesError>, Options<CallWithResponsesData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await callWithResponses({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const collectionFormatQueryKey = (options: Options<CollectionFormatData>) => createQueryKey('collectionFormat', options);\n\nexport const collectionFormatOptions = (options: Options<CollectionFormatData>) => queryOptions<unknown, AxiosError<DefaultError>, unknown, ReturnType<typeof collectionFormatQueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await collectionFormat({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: collectionFormatQueryKey(options)\n});\n\nexport const typesQueryKey = (options: Options<TypesData>) => createQueryKey('types', options);\n\nexport const typesOptions = (options: Options<TypesData>) => queryOptions<TypesResponse, AxiosError<DefaultError>, TypesResponse, ReturnType<typeof typesQueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await types({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: typesQueryKey(options)\n});\n\nexport const uploadFileMutation = (options?: Partial<Options<UploadFileData>>): UseMutationOptions<UploadFileResponse, AxiosError<DefaultError>, Options<UploadFileData>> => {\n    const mutationOptions: UseMutationOptions<UploadFileResponse, AxiosError<DefaultError>, Options<UploadFileData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await uploadFile({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const fileResponseQueryKey = (options: Options<FileResponseData>) => createQueryKey('fileResponse', options);\n\nexport const fileResponseOptions = (options: Options<FileResponseData>) => queryOptions<FileResponseResponse, AxiosError<DefaultError>, FileResponseResponse, ReturnType<typeof fileResponseQueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await fileResponse({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: fileResponseQueryKey(options)\n});\n\nexport const complexTypesQueryKey = (options: Options<ComplexTypesData>) => createQueryKey('complexTypes', options);\n\nexport const complexTypesOptions = (options: Options<ComplexTypesData>) => queryOptions<ComplexTypesResponse, AxiosError<DefaultError>, ComplexTypesResponse, ReturnType<typeof complexTypesQueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await complexTypes({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: complexTypesQueryKey(options)\n});\n\nexport const multipartResponseQueryKey = (options?: Options<MultipartResponseData>) => createQueryKey('multipartResponse', options);\n\nexport const multipartResponseOptions = (options?: Options<MultipartResponseData>) => queryOptions<MultipartResponseResponse, AxiosError<DefaultError>, MultipartResponseResponse, ReturnType<typeof multipartResponseQueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await multipartResponse({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: multipartResponseQueryKey(options)\n});\n\nexport const multipartRequestMutation = (options?: Partial<Options<MultipartRequestData>>): UseMutationOptions<unknown, AxiosError<DefaultError>, Options<MultipartRequestData>> => {\n    const mutationOptions: UseMutationOptions<unknown, AxiosError<DefaultError>, Options<MultipartRequestData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await multipartRequest({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const complexParamsMutation = (options?: Partial<Options<ComplexParamsData>>): UseMutationOptions<ComplexParamsResponse, AxiosError<DefaultError>, Options<ComplexParamsData>> => {\n    const mutationOptions: UseMutationOptions<ComplexParamsResponse, AxiosError<DefaultError>, Options<ComplexParamsData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await complexParams({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const callWithResultFromHeaderMutation = (options?: Partial<Options<CallWithResultFromHeaderData>>): UseMutationOptions<unknown, AxiosError<DefaultError>, Options<CallWithResultFromHeaderData>> => {\n    const mutationOptions: UseMutationOptions<unknown, AxiosError<DefaultError>, Options<CallWithResultFromHeaderData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await callWithResultFromHeader({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const testErrorCodeMutation = (options?: Partial<Options<TestErrorCodeData>>): UseMutationOptions<unknown, AxiosError<DefaultError>, Options<TestErrorCodeData>> => {\n    const mutationOptions: UseMutationOptions<unknown, AxiosError<DefaultError>, Options<TestErrorCodeData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await testErrorCode({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const nonAsciiæøåÆøÅöôêÊ字符串Mutation = (options?: Partial<Options<NonAsciiæøåÆøÅöôêÊ字符串Data>>): UseMutationOptions<NonAsciiæøåÆøÅöôêÊ字符串Response, AxiosError<DefaultError>, Options<NonAsciiæøåÆøÅöôêÊ字符串Data>> => {\n    const mutationOptions: UseMutationOptions<NonAsciiæøåÆøÅöôêÊ字符串Response, AxiosError<DefaultError>, Options<NonAsciiæøåÆøÅöôêÊ字符串Data>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await nonAsciiæøåÆøÅöôêÊ字符串({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\n/**\n * Login User\n */\nexport const putWithFormUrlEncodedMutation = (options?: Partial<Options<PutWithFormUrlEncodedData>>): UseMutationOptions<unknown, AxiosError<DefaultError>, Options<PutWithFormUrlEncodedData>> => {\n    const mutationOptions: UseMutationOptions<unknown, AxiosError<DefaultError>, Options<PutWithFormUrlEncodedData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await putWithFormUrlEncoded({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/react-query/axios/client/client.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { AxiosError, AxiosInstance, RawAxiosRequestHeaders } from 'axios';\nimport axios from 'axios';\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 } from './types.gen';\nimport { buildUrl, createConfig, mergeConfigs, mergeHeaders, setAuthParams } from './utils.gen';\n\nexport const createClient = (config: Config = {}): Client => {\n  let _config = mergeConfigs(createConfig(), config);\n\n  let instance: AxiosInstance;\n\n  if (_config.axios && !('Axios' in _config.axios)) {\n    instance = _config.axios;\n  } else {\n    // eslint-disable-next-line @typescript-eslint/no-unused-vars\n    const { auth, ...configWithoutAuth } = _config;\n    instance = axios.create(configWithoutAuth);\n  }\n\n  const getConfig = (): Config => ({ ..._config });\n\n  const setConfig = (config: Config): Config => {\n    _config = mergeConfigs(_config, config);\n    instance.defaults = {\n      ...instance.defaults,\n      ..._config,\n      // @ts-expect-error\n      headers: mergeHeaders(instance.defaults.headers, _config.headers),\n    };\n    return getConfig();\n  };\n\n  const beforeRequest = async (options: RequestOptions) => {\n    const opts = {\n      ..._config,\n      ...options,\n      axios: options.axios ?? _config.axios ?? instance,\n      headers: mergeHeaders(_config.headers, options.headers),\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.body = opts.bodySerializer(opts.body);\n    }\n\n    const url = buildUrl(opts);\n\n    return { opts, url };\n  };\n\n  // @ts-expect-error\n  const request: Client['request'] = async (options) => {\n    // @ts-expect-error\n    const { opts, url } = await beforeRequest(options);\n    try {\n      // assign Axios here for consistency with fetch\n      const _axios = opts.axios!;\n      // eslint-disable-next-line @typescript-eslint/no-unused-vars\n      const { auth, ...optsWithoutAuth } = opts;\n      const response = await _axios({\n        ...optsWithoutAuth,\n        baseURL: '', // the baseURL is already included in `url`\n        data: getValidRequestBody(opts),\n        headers: opts.headers as RawAxiosRequestHeaders,\n        // let `paramsSerializer()` handle query params if it exists\n        params: opts.paramsSerializer ? opts.query : undefined,\n        url,\n      });\n\n      let { data } = response;\n\n      if (opts.responseType === '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 {\n        ...response,\n        data: data ?? {},\n      };\n    } catch (error) {\n      const e = error as AxiosError;\n      if (opts.throwOnError) {\n        throw e;\n      }\n      // @ts-expect-error\n      e.error = e.response?.data ?? {};\n      return e;\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 Record<string, string>,\n      method,\n      serializedBody: getValidRequestBody(opts) as BodyInit | null | undefined,\n      // @ts-expect-error\n      signal: opts.signal,\n      url,\n    });\n  };\n\n  const _buildUrl: Client['buildUrl'] = (options) =>\n    buildUrl({ axios: instance, ..._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    instance,\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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/react-query/axios/client/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type { Auth } from '../core/auth.gen';\nexport type { QuerySerializerOptions } from '../core/bodySerializer.gen';\nexport {\n  formDataBodySerializer,\n  jsonBodySerializer,\n  urlSearchParamsBodySerializer,\n} from '../core/bodySerializer.gen';\nexport { buildClientParams } from '../core/params.gen';\nexport { serializeQueryKeyValue } from '../core/queryKeySerializer.gen';\nexport { createClient } from './client.gen';\nexport type {\n  Client,\n  ClientOptions,\n  Config,\n  CreateClientConfig,\n  Options,\n  RequestOptions,\n  RequestResult,\n  TDataShape,\n} from './types.gen';\nexport { createConfig } from './utils.gen';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/react-query/axios/client/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type {\n  AxiosError,\n  AxiosInstance,\n  AxiosRequestHeaders,\n  AxiosResponse,\n  AxiosStatic,\n  CreateAxiosDefaults,\n} from 'axios';\n\nimport type { Auth } from '../core/auth.gen';\nimport type {\n  ServerSentEventsOptions,\n  ServerSentEventsResult,\n} from '../core/serverSentEvents.gen';\nimport type { Client as CoreClient, Config as CoreConfig } from '../core/types.gen';\n\nexport interface Config<T extends ClientOptions = ClientOptions>\n  extends Omit<CreateAxiosDefaults, 'auth' | 'baseURL' | 'headers' | 'method'>, CoreConfig {\n  /**\n   * Axios implementation. You can use this option to provide either an\n   * `AxiosStatic` or an `AxiosInstance`.\n   *\n   * @default axios\n   */\n  axios?: AxiosStatic | AxiosInstance;\n  /**\n   * Base URL for all requests made by this client.\n   */\n  baseURL?: T['baseURL'];\n  /**\n   * An object containing any HTTP headers that you want to pre-populate your\n   * `Headers` object with.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/Headers/Headers#init See more}\n   */\n  headers?:\n    | AxiosRequestHeaders\n    | Record<\n        string,\n        string | number | boolean | (string | number | boolean)[] | null | undefined | unknown\n      >;\n  /**\n   * Throw an error instead of returning it in the response?\n   *\n   * @default false\n   */\n  throwOnError?: T['throwOnError'];\n}\n\nexport interface RequestOptions<\n  TData = unknown,\n  ThrowOnError extends boolean = boolean,\n  Url extends string = string,\n>\n  extends\n    Config<{\n      throwOnError: ThrowOnError;\n    }>,\n    Pick<\n      ServerSentEventsOptions<TData>,\n      | 'onRequest'\n      | 'onSseError'\n      | 'onSseEvent'\n      | 'sseDefaultRetryDelay'\n      | 'sseMaxRetryAttempts'\n      | 'sseMaxRetryDelay'\n    > {\n  /**\n   * Any body that you want to add to your request.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/fetch#body}\n   */\n  body?: unknown;\n  path?: Record<string, unknown>;\n  query?: Record<string, unknown>;\n  /**\n   * Security mechanism(s) to use for the request.\n   */\n  security?: ReadonlyArray<Auth>;\n  url: Url;\n}\n\nexport interface ClientOptions {\n  baseURL?: string;\n  throwOnError?: boolean;\n}\n\nexport type RequestResult<\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = boolean,\n> = ThrowOnError extends true\n  ? Promise<AxiosResponse<TData extends Record<string, unknown> ? TData[keyof TData] : TData>>\n  : Promise<\n      | (AxiosResponse<TData extends Record<string, unknown> ? TData[keyof TData] : TData> & {\n          error: undefined;\n        })\n      | (AxiosError<TError extends Record<string, unknown> ? TError[keyof TError] : TError> & {\n          data: undefined;\n          error: TError extends Record<string, unknown> ? TError[keyof TError] : TError;\n        })\n    >;\n\ntype MethodFn = <TData = unknown, TError = unknown, ThrowOnError extends boolean = false>(\n  options: Omit<RequestOptions<TData, ThrowOnError>, 'method'>,\n) => RequestResult<TData, TError, ThrowOnError>;\n\ntype SseFn = <TData = unknown, TError = unknown, ThrowOnError extends boolean = false>(\n  options: Omit<RequestOptions<TData, ThrowOnError>, 'method'>,\n) => Promise<ServerSentEventsResult<TData, TError>>;\n\ntype RequestFn = <TData = unknown, TError = unknown, ThrowOnError extends boolean = false>(\n  options: Omit<RequestOptions<TData, ThrowOnError>, 'method'> &\n    Pick<Required<RequestOptions<TData, ThrowOnError>>, 'method'>,\n) => RequestResult<TData, TError, ThrowOnError>;\n\ntype BuildUrlFn = <\n  TData extends {\n    body?: unknown;\n    path?: Record<string, unknown>;\n    query?: Record<string, unknown>;\n    url: string;\n  },\n>(\n  options: TData & Options<TData>,\n) => string;\n\nexport type Client = CoreClient<RequestFn, Config, MethodFn, BuildUrlFn, SseFn> & {\n  instance: AxiosInstance;\n};\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 = ClientOptions> = (\n  override?: Config<ClientOptions & T>,\n) => Config<Required<ClientOptions> & T>;\n\nexport interface TDataShape {\n  body?: unknown;\n  headers?: unknown;\n  path?: unknown;\n  query?: unknown;\n  url: string;\n}\n\ntype OmitKeys<T, K> = Pick<T, Exclude<keyof T, K>>;\n\nexport type Options<\n  TData extends TDataShape = TDataShape,\n  ThrowOnError extends boolean = boolean,\n  TResponse = unknown,\n> = OmitKeys<RequestOptions<TResponse, ThrowOnError>, 'body' | 'path' | 'query' | 'url'> &\n  ([TData] extends [never] ? unknown : Omit<TData, 'url'>);\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/react-query/axios/client/utils.gen.ts",
    "content": "// 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 {\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\nconst checkForExistence = (\n  options: Pick<RequestOptions, 'auth' | 'query'> & {\n    headers: Record<any, unknown>;\n  },\n  name?: string,\n): boolean => {\n  if (!name) {\n    return false;\n  }\n  if (name in options.headers || options.query?.[name]) {\n    return true;\n  }\n  if (\n    'Cookie' in options.headers &&\n    options.headers['Cookie'] &&\n    typeof options.headers['Cookie'] === 'string'\n  ) {\n    return options.headers['Cookie'].includes(`${name}=`);\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: Record<any, unknown>;\n  }) => {\n  for (const auth of security) {\n    if (checkForExistence(options, auth.name)) {\n      continue;\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        const value = `${name}=${token}`;\n        if ('Cookie' in options.headers && options.headers['Cookie']) {\n          options.headers['Cookie'] = `${options.headers['Cookie']}; ${value}`;\n        } else {\n          options.headers['Cookie'] = value;\n        }\n        break;\n      }\n      case 'header':\n      default:\n        options.headers[name] = token;\n        break;\n    }\n  }\n};\n\nexport const buildUrl: Client['buildUrl'] = (options) => {\n  const instanceBaseUrl = options.axios?.defaults?.baseURL;\n\n  const baseUrl =\n    !!options.baseURL && typeof options.baseURL === 'string' ? options.baseURL : instanceBaseUrl;\n\n  return getUrl({\n    baseUrl: baseUrl as string,\n    path: options.path,\n    // let `paramsSerializer()` handle query params if it exists\n    query: !options.paramsSerializer ? options.query : undefined,\n    querySerializer:\n      typeof options.querySerializer === 'function'\n        ? options.querySerializer\n        : createQuerySerializer(options.querySerializer),\n    url: options.url,\n  });\n};\n\nexport const mergeConfigs = (a: Config, b: Config): Config => {\n  const config = { ...a, ...b };\n  config.headers = mergeHeaders(a.headers, b.headers);\n  return config;\n};\n\n/**\n * Special Axios headers keywords allowing to set headers by request method.\n */\nexport const axiosHeadersKeywords = [\n  'common',\n  'delete',\n  'get',\n  'head',\n  'patch',\n  'post',\n  'put',\n] as const;\n\nexport const mergeHeaders = (\n  ...headers: Array<Required<Config>['headers'] | undefined>\n): Record<any, unknown> => {\n  const mergedHeaders: Record<any, unknown> = {};\n  for (const header of headers) {\n    if (!header || typeof header !== 'object') {\n      continue;\n    }\n\n    const iterator = Object.entries(header);\n\n    for (const [key, value] of iterator) {\n      if (\n        axiosHeadersKeywords.includes(key as (typeof axiosHeadersKeywords)[number]) &&\n        typeof value === 'object'\n      ) {\n        mergedHeaders[key] = {\n          ...(mergedHeaders[key] as Record<any, unknown>),\n          ...value,\n        };\n      } else if (value === null) {\n        delete mergedHeaders[key];\n      } else if (Array.isArray(value)) {\n        for (const v of value) {\n          // @ts-expect-error\n          mergedHeaders[key] = [...(mergedHeaders[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[key] = typeof value === 'object' ? JSON.stringify(value) : (value as string);\n      }\n    }\n  }\n  return mergedHeaders;\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  ...override,\n});\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/react-query/axios/client.gen.ts",
    "content": "// 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: 'http://localhost:3000/base' }));\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/react-query/axios/core/auth.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/react-query/axios/core/bodySerializer.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/react-query/axios/core/params.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/react-query/axios/core/pathSerializer.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/react-query/axios/core/queryKeySerializer.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\n/**\n * JSON-friendly union that mirrors what Pinia Colada can hash.\n */\nexport type JsonValue =\n  | null\n  | string\n  | number\n  | boolean\n  | JsonValue[]\n  | { [key: string]: JsonValue };\n\n/**\n * Replacer that converts non-JSON values (bigint, Date, etc.) to safe substitutes.\n */\nexport const queryKeyJsonReplacer = (_key: string, value: unknown) => {\n  if (value === undefined || typeof value === 'function' || typeof value === 'symbol') {\n    return undefined;\n  }\n  if (typeof value === 'bigint') {\n    return value.toString();\n  }\n  if (value instanceof Date) {\n    return value.toISOString();\n  }\n  return value;\n};\n\n/**\n * Safely stringifies a value and parses it back into a JsonValue.\n */\nexport const stringifyToJsonValue = (input: unknown): JsonValue | undefined => {\n  try {\n    const json = JSON.stringify(input, queryKeyJsonReplacer);\n    if (json === undefined) {\n      return undefined;\n    }\n    return JSON.parse(json) as JsonValue;\n  } catch {\n    return undefined;\n  }\n};\n\n/**\n * Detects plain objects (including objects with a null prototype).\n */\nconst isPlainObject = (value: unknown): value is Record<string, unknown> => {\n  if (value === null || typeof value !== 'object') {\n    return false;\n  }\n  const prototype = Object.getPrototypeOf(value as object);\n  return prototype === Object.prototype || prototype === null;\n};\n\n/**\n * Turns URLSearchParams into a sorted JSON object for deterministic keys.\n */\nconst serializeSearchParams = (params: URLSearchParams): JsonValue => {\n  const entries = Array.from(params.entries()).sort(([a], [b]) => a.localeCompare(b));\n  const result: Record<string, JsonValue> = {};\n\n  for (const [key, value] of entries) {\n    const existing = result[key];\n    if (existing === undefined) {\n      result[key] = value;\n      continue;\n    }\n\n    if (Array.isArray(existing)) {\n      (existing as string[]).push(value);\n    } else {\n      result[key] = [existing, value];\n    }\n  }\n\n  return result;\n};\n\n/**\n * Normalizes any accepted value into a JSON-friendly shape for query keys.\n */\nexport const serializeQueryKeyValue = (value: unknown): JsonValue | undefined => {\n  if (value === null) {\n    return null;\n  }\n\n  if (typeof value === 'string' || typeof value === 'number' || typeof value === 'boolean') {\n    return value;\n  }\n\n  if (value === undefined || typeof value === 'function' || typeof value === 'symbol') {\n    return undefined;\n  }\n\n  if (typeof value === 'bigint') {\n    return value.toString();\n  }\n\n  if (value instanceof Date) {\n    return value.toISOString();\n  }\n\n  if (Array.isArray(value)) {\n    return stringifyToJsonValue(value);\n  }\n\n  if (typeof URLSearchParams !== 'undefined' && value instanceof URLSearchParams) {\n    return serializeSearchParams(value);\n  }\n\n  if (isPlainObject(value)) {\n    return stringifyToJsonValue(value);\n  }\n\n  return undefined;\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/react-query/axios/core/serverSentEvents.gen.ts",
    "content": "// 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 const 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            // Normalize line endings: CRLF -> LF, then CR -> LF\n            buffer = buffer.replace(/\\r\\n/g, '\\n').replace(/\\r/g, '\\n');\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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/react-query/axios/core/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { Auth, AuthToken } from './auth.gen';\nimport type { BodySerializer, QuerySerializer, QuerySerializerOptions } from './bodySerializer.gen';\n\nexport type HttpMethod =\n  | 'connect'\n  | 'delete'\n  | 'get'\n  | 'head'\n  | 'options'\n  | 'patch'\n  | 'post'\n  | 'put'\n  | 'trace';\n\nexport type Client<\n  RequestFn = never,\n  Config = unknown,\n  MethodFn = never,\n  BuildUrlFn = never,\n  SseFn = never,\n> = {\n  /**\n   * Returns the final request URL.\n   */\n  buildUrl: BuildUrlFn;\n  getConfig: () => Config;\n  request: RequestFn;\n  setConfig: (config: Config) => Config;\n} & {\n  [K in HttpMethod]: MethodFn;\n} & ([SseFn] extends [never] ? { sse?: never } : { sse: { [K in HttpMethod]: SseFn } });\n\nexport interface Config {\n  /**\n   * Auth token or a function returning auth token. The resolved value will be\n   * added to the request payload as defined by its `security` array.\n   */\n  auth?: ((auth: Auth) => Promise<AuthToken> | AuthToken) | AuthToken;\n  /**\n   * A function for serializing request body parameter. By default,\n   * {@link JSON.stringify()} will be used.\n   */\n  bodySerializer?: BodySerializer | null;\n  /**\n   * An object containing any HTTP headers that you want to pre-populate your\n   * `Headers` object with.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/Headers/Headers#init See more}\n   */\n  headers?:\n    | RequestInit['headers']\n    | Record<\n        string,\n        string | number | boolean | (string | number | boolean)[] | null | undefined | unknown\n      >;\n  /**\n   * The request method.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/fetch#method See more}\n   */\n  method?: Uppercase<HttpMethod>;\n  /**\n   * A function for serializing request query parameters. By default, arrays\n   * will be exploded in form style, objects will be exploded in deepObject\n   * style, and reserved characters are percent-encoded.\n   *\n   * This method will have no effect if the native `paramsSerializer()` Axios\n   * API function is used.\n   *\n   * {@link https://swagger.io/docs/specification/serialization/#query View examples}\n   */\n  querySerializer?: QuerySerializer | QuerySerializerOptions;\n  /**\n   * A function validating request data. This is useful if you want to ensure\n   * the request conforms to the desired shape, so it can be safely sent to\n   * the server.\n   */\n  requestValidator?: (data: unknown) => Promise<unknown>;\n  /**\n   * A function transforming response data before it's returned. This is useful\n   * for post-processing data, e.g. converting ISO strings into Date objects.\n   */\n  responseTransformer?: (data: unknown) => Promise<unknown>;\n  /**\n   * A function validating response data. This is useful if you want to ensure\n   * the response conforms to the desired shape, so it can be safely passed to\n   * the transformers and returned to the user.\n   */\n  responseValidator?: (data: unknown) => Promise<unknown>;\n}\n\ntype IsExactlyNeverOrNeverUndefined<T> = [T] extends [never]\n  ? true\n  : [T] extends [never | undefined]\n    ? [undefined] extends [T]\n      ? false\n      : true\n    : false;\n\nexport type OmitNever<T extends Record<string, unknown>> = {\n  [K in keyof T as IsExactlyNeverOrNeverUndefined<T[K]> extends true ? never : K]: T[K];\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/react-query/axios/core/utils.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/react-query/axios/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport { apiVVersionODataControllerCount, callToTestOrderOfParams, callWithDefaultOptionalParameters, callWithDefaultParameters, callWithDescriptions, callWithDuplicateResponses, callWithNoContentResponse, callWithParameters, callWithResponse, callWithResponseAndNoContentResponse, callWithResponses, callWithResultFromHeader, callWithWeirdParameterNames, collectionFormat, complexParams, complexTypes, deleteCallWithoutParametersAndResponse, deleteFoo, deprecatedCall, dummyA, dummyB, duplicateName, duplicateName2, duplicateName3, duplicateName4, export_, fileResponse, fooWow, getApiVbyApiVersionSimpleOperation, getCallWithOptionalParam, getCallWithoutParametersAndResponse, headCallWithoutParametersAndResponse, import_, multipartRequest, multipartResponse, nonAsciiæøåÆøÅöôêÊ字符串, type Options, optionsCallWithoutParametersAndResponse, patchApiVbyApiVersionNoTag, patchCallWithoutParametersAndResponse, postApiVbyApiVersionFormData, postApiVbyApiVersionRequestBody, postCallWithOptionalParam, postCallWithoutParametersAndResponse, putCallWithoutParametersAndResponse, putWithFormUrlEncoded, testErrorCode, types, uploadFile } from './sdk.gen';\nexport type { _3eNum1Период, _400, AdditionalPropertiesIntegerIssue, AdditionalPropertiesUnknownIssue, AdditionalPropertiesUnknownIssue2, AdditionalPropertiesUnknownIssue3, AdditionalPropertiesUnknownIssueWritable, AnyOfAnyAndNull, AnyOfArrays, ApiVVersionODataControllerCountData, ApiVVersionODataControllerCountResponse, ApiVVersionODataControllerCountResponses, ArrayWithAnyOfProperties, ArrayWithArray, ArrayWithBooleans, ArrayWithNumbers, ArrayWithProperties, ArrayWithReferences, ArrayWithStrings, CallToTestOrderOfParamsData, CallWithDefaultOptionalParametersData, CallWithDefaultParametersData, CallWithDescriptionsData, CallWithDuplicateResponsesData, CallWithDuplicateResponsesError, CallWithDuplicateResponsesErrors, CallWithDuplicateResponsesResponse, CallWithDuplicateResponsesResponses, CallWithNoContentResponseData, CallWithNoContentResponseResponse, CallWithNoContentResponseResponses, CallWithParametersData, CallWithResponseAndNoContentResponseData, CallWithResponseAndNoContentResponseResponse, CallWithResponseAndNoContentResponseResponses, CallWithResponseData, CallWithResponseResponse, CallWithResponseResponses, CallWithResponsesData, CallWithResponsesError, CallWithResponsesErrors, CallWithResponsesResponse, CallWithResponsesResponses, CallWithResultFromHeaderData, CallWithResultFromHeaderErrors, CallWithResultFromHeaderResponses, CallWithWeirdParameterNamesData, CamelCaseCommentWithBreaks, CharactersInDescription, ClientOptions, CollectionFormatData, CommentWithBackticks, CommentWithBackticksAndQuotes, CommentWithBreaks, CommentWithExpressionPlaceholders, CommentWithQuotes, CommentWithReservedCharacters, CommentWithSlashes, ComplexParamsData, ComplexParamsResponse, ComplexParamsResponses, ComplexTypesData, ComplexTypesErrors, ComplexTypesResponse, ComplexTypesResponses, CompositionBaseModel, CompositionExtendedModel, CompositionWithAllOfAndNullable, CompositionWithAnyOf, CompositionWithAnyOfAndNullable, CompositionWithAnyOfAnonymous, CompositionWithNestedAnyAndTypeNull, CompositionWithNestedAnyOfAndNull, CompositionWithOneOf, CompositionWithOneOfAndComplexArrayDictionary, CompositionWithOneOfAndNullable, CompositionWithOneOfAndProperties, CompositionWithOneOfAndSimpleArrayDictionary, CompositionWithOneOfAndSimpleDictionary, CompositionWithOneOfAnonymous, CompositionWithOneOfDiscriminator, ConstValue, Default, DeleteCallWithoutParametersAndResponseData, DeleteFooData, DeleteFooData2, DeleteFooData3, DeprecatedCallData, DeprecatedModel, DictionaryWithArray, DictionaryWithDictionary, DictionaryWithProperties, DictionaryWithPropertiesAndAdditionalProperties, DictionaryWithReference, DictionaryWithString, DummyAData, DummyAResponse, DummyAResponses, DummyBData, DummyBResponse, DummyBResponses, DuplicateName2Data, DuplicateName3Data, DuplicateName4Data, DuplicateNameData, EnumFromDescription, EnumWithExtensions, EnumWithNumbers, EnumWithReplacedCharacters, EnumWithStrings, EnumWithXEnumNames, ExportData, ExternalRefA, ExternalRefB, ExternalSharedModel, File, FileResponseData, FileResponseResponse, FileResponseResponses, FileWritable, FooWowData, FooWowResponses, FreeFormObjectWithAdditionalPropertiesEqEmptyObject, FreeFormObjectWithAdditionalPropertiesEqTrue, FreeFormObjectWithoutAdditionalProperties, GenericSchemaDuplicateIssue1SystemBoolean, GenericSchemaDuplicateIssue1SystemBooleanWritable, GenericSchemaDuplicateIssue1SystemString, GenericSchemaDuplicateIssue1SystemStringWritable, GetApiVbyApiVersionSimpleOperationData, GetApiVbyApiVersionSimpleOperationError, GetApiVbyApiVersionSimpleOperationErrors, GetApiVbyApiVersionSimpleOperationResponse, GetApiVbyApiVersionSimpleOperationResponses, GetCallWithOptionalParamData, GetCallWithoutParametersAndResponseData, HeadCallWithoutParametersAndResponseData, Import, ImportData, ImportResponse, ImportResponses, IoK8sApimachineryPkgApisMetaV1DeleteOptions, IoK8sApimachineryPkgApisMetaV1Preconditions, ModelCircle, ModelFromZendesk, ModelSquare, ModelThatExtends, ModelThatExtendsExtends, ModelWithAdditionalPropertiesEqTrue, ModelWithAdditionalPropertiesRef, ModelWithAnyOfConstantSizeArray, ModelWithAnyOfConstantSizeArrayAndIntersect, ModelWithAnyOfConstantSizeArrayNullable, ModelWithAnyOfConstantSizeArrayWithNSizeAndOptions, ModelWithAnyOfConstantSizeArrayWithNSizeAndOptionsWritable, ModelWithArray, ModelWithArrayReadOnlyAndWriteOnly, ModelWithArrayReadOnlyAndWriteOnlyWritable, ModelWithBackticksInDescription, ModelWithBoolean, ModelWithCircularReference, ModelWithConst, ModelWithConstantSizeArray, ModelWithDictionary, ModelWithDuplicateImports, ModelWithDuplicateProperties, ModelWithEnum, ModelWithEnumFromDescription, ModelWithEnumWithHyphen, ModelWithInteger, ModelWithNestedArrayEnums, ModelWithNestedArrayEnumsData, ModelWithNestedArrayEnumsDataBar, ModelWithNestedArrayEnumsDataFoo, ModelWithNestedCompositionEnums, ModelWithNestedEnums, ModelWithNestedProperties, ModelWithNullableObject, ModelWithNullableString, ModelWithNumericEnumUnion, ModelWithOneOfAndProperties, ModelWithOneOfEnum, ModelWithOrderedProperties, ModelWithPattern, ModelWithPatternWritable, ModelWithPrefixItemsConstantSizeArray, ModelWithProperties, ModelWithPropertiesWritable, ModelWithReadOnlyAndWriteOnly, ModelWithReadOnlyAndWriteOnlyWritable, ModelWithReference, ModelWithReferenceWritable, ModelWithString, ModelWithStringError, MultipartRequestData, MultipartResponseData, MultipartResponseResponse, MultipartResponseResponses, NestedAnyOfArraysNullable, NonAsciiæøåÆøÅöôêÊ字符串Data, NonAsciiæøåÆøÅöôêÊ字符串Response, NonAsciiæøåÆøÅöôêÊ字符串Responses, NonAsciiStringæøåÆøÅöôêÊ字符串, NullableObject, OneOfAllOfIssue, OneOfAllOfIssueWritable, OptionsCallWithoutParametersAndResponseData, Pageable, ParameterSimpleParameterUnused, PatchApiVbyApiVersionNoTagData, PatchApiVbyApiVersionNoTagResponses, PatchCallWithoutParametersAndResponseData, PostApiVbyApiVersionFormDataData, PostApiVbyApiVersionRequestBodyData, PostCallWithOptionalParamData, PostCallWithOptionalParamResponse, PostCallWithOptionalParamResponses, PostCallWithoutParametersAndResponseData, PostServiceWithEmptyTagResponse, PostServiceWithEmptyTagResponse2, PutCallWithoutParametersAndResponseData, PutWithFormUrlEncodedData, SchemaWithFormRestrictedKeys, SimpleBoolean, SimpleFile, SimpleFormData, SimpleInteger, SimpleParameter, SimpleReference, SimpleRequestBody, SimpleString, SimpleStringWithPattern, TestErrorCodeData, TestErrorCodeErrors, TestErrorCodeResponses, TypesData, TypesResponse, TypesResponses, UploadFileData, UploadFileResponse, UploadFileResponses, XFooBar } from './types.gen';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/react-query/axios/sdk.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport { type Client, formDataBodySerializer, type Options as Options2, type TDataShape, urlSearchParamsBodySerializer } from './client';\nimport { client } from './client.gen';\nimport type { ApiVVersionODataControllerCountData, ApiVVersionODataControllerCountResponses, CallToTestOrderOfParamsData, CallWithDefaultOptionalParametersData, CallWithDefaultParametersData, CallWithDescriptionsData, CallWithDuplicateResponsesData, CallWithDuplicateResponsesErrors, CallWithDuplicateResponsesResponses, CallWithNoContentResponseData, CallWithNoContentResponseResponses, CallWithParametersData, CallWithResponseAndNoContentResponseData, CallWithResponseAndNoContentResponseResponses, CallWithResponseData, CallWithResponseResponses, CallWithResponsesData, CallWithResponsesErrors, CallWithResponsesResponses, CallWithResultFromHeaderData, CallWithResultFromHeaderErrors, CallWithResultFromHeaderResponses, CallWithWeirdParameterNamesData, CollectionFormatData, ComplexParamsData, ComplexParamsResponses, ComplexTypesData, ComplexTypesErrors, ComplexTypesResponses, DeleteCallWithoutParametersAndResponseData, DeleteFooData3, DeprecatedCallData, DummyAData, DummyAResponses, DummyBData, DummyBResponses, DuplicateName2Data, DuplicateName3Data, DuplicateName4Data, DuplicateNameData, ExportData, FileResponseData, FileResponseResponses, FooWowData, FooWowResponses, GetApiVbyApiVersionSimpleOperationData, GetApiVbyApiVersionSimpleOperationErrors, GetApiVbyApiVersionSimpleOperationResponses, GetCallWithOptionalParamData, GetCallWithoutParametersAndResponseData, HeadCallWithoutParametersAndResponseData, ImportData, ImportResponses, MultipartRequestData, MultipartResponseData, MultipartResponseResponses, NonAsciiæøåÆøÅöôêÊ字符串Data, NonAsciiæøåÆøÅöôêÊ字符串Responses, OptionsCallWithoutParametersAndResponseData, PatchApiVbyApiVersionNoTagData, PatchApiVbyApiVersionNoTagResponses, PatchCallWithoutParametersAndResponseData, PostApiVbyApiVersionFormDataData, PostApiVbyApiVersionRequestBodyData, PostCallWithOptionalParamData, PostCallWithOptionalParamResponses, PostCallWithoutParametersAndResponseData, PutCallWithoutParametersAndResponseData, PutWithFormUrlEncodedData, TestErrorCodeData, TestErrorCodeErrors, TestErrorCodeResponses, TypesData, TypesResponses, UploadFileData, UploadFileResponses } from './types.gen';\n\nexport type Options<TData extends TDataShape = TDataShape, ThrowOnError extends boolean = boolean> = Options2<TData, ThrowOnError> & {\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\nexport const export_ = <ThrowOnError extends boolean = false>(options?: Options<ExportData, ThrowOnError>) => (options?.client ?? client).get<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/no+tag', ...options });\n\nexport const patchApiVbyApiVersionNoTag = <ThrowOnError extends boolean = false>(options?: Options<PatchApiVbyApiVersionNoTagData, ThrowOnError>) => (options?.client ?? client).patch<PatchApiVbyApiVersionNoTagResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/no+tag', ...options });\n\nexport const import_ = <ThrowOnError extends boolean = false>(options: Options<ImportData, ThrowOnError>) => (options.client ?? client).post<ImportResponses, unknown, ThrowOnError>({\n    responseType: 'json',\n    url: '/api/v{api-version}/no+tag',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options.headers\n    }\n});\n\nexport const fooWow = <ThrowOnError extends boolean = false>(options?: Options<FooWowData, ThrowOnError>) => (options?.client ?? client).put<FooWowResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/no+tag', ...options });\n\nexport const apiVVersionODataControllerCount = <ThrowOnError extends boolean = false>(options?: Options<ApiVVersionODataControllerCountData, ThrowOnError>) => (options?.client ?? client).get<ApiVVersionODataControllerCountResponses, unknown, ThrowOnError>({\n    responseType: 'json',\n    url: '/api/v{api-version}/simple/$count',\n    ...options\n});\n\nexport const getApiVbyApiVersionSimpleOperation = <ThrowOnError extends boolean = false>(options: Options<GetApiVbyApiVersionSimpleOperationData, ThrowOnError>) => (options.client ?? client).get<GetApiVbyApiVersionSimpleOperationResponses, GetApiVbyApiVersionSimpleOperationErrors, ThrowOnError>({\n    responseType: 'json',\n    url: '/api/v{api-version}/simple:operation',\n    ...options\n});\n\nexport const deleteCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<DeleteCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).delete<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const getCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<GetCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).get<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const headCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<HeadCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).head<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const optionsCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<OptionsCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).options<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const patchCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<PatchCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).patch<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const postCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<PostCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).post<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const putCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<PutCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).put<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const deleteFoo = <ThrowOnError extends boolean = false>(options: Options<DeleteFooData3, ThrowOnError>) => (options.client ?? client).delete<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/foo/{foo_param}/bar/{BarParam}', ...options });\n\nexport const callWithDescriptions = <ThrowOnError extends boolean = false>(options?: Options<CallWithDescriptionsData, ThrowOnError>) => (options?.client ?? client).post<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/descriptions', ...options });\n\n/**\n * @deprecated\n */\nexport const deprecatedCall = <ThrowOnError extends boolean = false>(options: Options<DeprecatedCallData, ThrowOnError>) => (options.client ?? client).post<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/parameters/deprecated', ...options });\n\nexport const callWithParameters = <ThrowOnError extends boolean = false>(options: Options<CallWithParametersData, ThrowOnError>) => (options.client ?? client).post<unknown, unknown, ThrowOnError>({\n    url: '/api/v{api-version}/parameters/{parameterPath}',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options.headers\n    }\n});\n\nexport const callWithWeirdParameterNames = <ThrowOnError extends boolean = false>(options: Options<CallWithWeirdParameterNamesData, ThrowOnError>) => (options.client ?? client).post<unknown, unknown, ThrowOnError>({\n    url: '/api/v{api-version}/parameters/{parameter.path.1}/{parameter-path-2}/{PARAMETER-PATH-3}',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options.headers\n    }\n});\n\nexport const getCallWithOptionalParam = <ThrowOnError extends boolean = false>(options: Options<GetCallWithOptionalParamData, ThrowOnError>) => (options.client ?? client).get<unknown, unknown, ThrowOnError>({\n    url: '/api/v{api-version}/parameters',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options.headers\n    }\n});\n\nexport const postCallWithOptionalParam = <ThrowOnError extends boolean = false>(options: Options<PostCallWithOptionalParamData, ThrowOnError>) => (options.client ?? client).post<PostCallWithOptionalParamResponses, unknown, ThrowOnError>({\n    responseType: 'json',\n    url: '/api/v{api-version}/parameters',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options.headers\n    }\n});\n\nexport const postApiVbyApiVersionRequestBody = <ThrowOnError extends boolean = false>(options?: Options<PostApiVbyApiVersionRequestBodyData, ThrowOnError>) => (options?.client ?? client).post<unknown, unknown, ThrowOnError>({\n    url: '/api/v{api-version}/requestBody',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options?.headers\n    }\n});\n\nexport const postApiVbyApiVersionFormData = <ThrowOnError extends boolean = false>(options?: Options<PostApiVbyApiVersionFormDataData, ThrowOnError>) => (options?.client ?? client).post<unknown, unknown, ThrowOnError>({\n    ...formDataBodySerializer,\n    url: '/api/v{api-version}/formData',\n    ...options,\n    headers: {\n        'Content-Type': null,\n        ...options?.headers\n    }\n});\n\nexport const callWithDefaultParameters = <ThrowOnError extends boolean = false>(options?: Options<CallWithDefaultParametersData, ThrowOnError>) => (options?.client ?? client).get<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/defaults', ...options });\n\nexport const callWithDefaultOptionalParameters = <ThrowOnError extends boolean = false>(options?: Options<CallWithDefaultOptionalParametersData, ThrowOnError>) => (options?.client ?? client).post<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/defaults', ...options });\n\nexport const callToTestOrderOfParams = <ThrowOnError extends boolean = false>(options: Options<CallToTestOrderOfParamsData, ThrowOnError>) => (options.client ?? client).put<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/defaults', ...options });\n\nexport const duplicateName = <ThrowOnError extends boolean = false>(options?: Options<DuplicateNameData, ThrowOnError>) => (options?.client ?? client).delete<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/duplicate', ...options });\n\nexport const duplicateName2 = <ThrowOnError extends boolean = false>(options?: Options<DuplicateName2Data, ThrowOnError>) => (options?.client ?? client).get<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/duplicate', ...options });\n\nexport const duplicateName3 = <ThrowOnError extends boolean = false>(options?: Options<DuplicateName3Data, ThrowOnError>) => (options?.client ?? client).post<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/duplicate', ...options });\n\nexport const duplicateName4 = <ThrowOnError extends boolean = false>(options?: Options<DuplicateName4Data, ThrowOnError>) => (options?.client ?? client).put<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/duplicate', ...options });\n\nexport const callWithNoContentResponse = <ThrowOnError extends boolean = false>(options?: Options<CallWithNoContentResponseData, ThrowOnError>) => (options?.client ?? client).get<CallWithNoContentResponseResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/no-content', ...options });\n\nexport const callWithResponseAndNoContentResponse = <ThrowOnError extends boolean = false>(options?: Options<CallWithResponseAndNoContentResponseData, ThrowOnError>) => (options?.client ?? client).get<CallWithResponseAndNoContentResponseResponses, unknown, ThrowOnError>({\n    responseType: 'json',\n    url: '/api/v{api-version}/multiple-tags/response-and-no-content',\n    ...options\n});\n\nexport const dummyA = <ThrowOnError extends boolean = false>(options?: Options<DummyAData, ThrowOnError>) => (options?.client ?? client).get<DummyAResponses, unknown, ThrowOnError>({\n    responseType: 'json',\n    url: '/api/v{api-version}/multiple-tags/a',\n    ...options\n});\n\nexport const dummyB = <ThrowOnError extends boolean = false>(options?: Options<DummyBData, ThrowOnError>) => (options?.client ?? client).get<DummyBResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/multiple-tags/b', ...options });\n\nexport const callWithResponse = <ThrowOnError extends boolean = false>(options?: Options<CallWithResponseData, ThrowOnError>) => (options?.client ?? client).get<CallWithResponseResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/response', ...options });\n\nexport const callWithDuplicateResponses = <ThrowOnError extends boolean = false>(options?: Options<CallWithDuplicateResponsesData, ThrowOnError>) => (options?.client ?? client).post<CallWithDuplicateResponsesResponses, CallWithDuplicateResponsesErrors, ThrowOnError>({\n    responseType: 'json',\n    url: '/api/v{api-version}/response',\n    ...options\n});\n\nexport const callWithResponses = <ThrowOnError extends boolean = false>(options?: Options<CallWithResponsesData, ThrowOnError>) => (options?.client ?? client).put<CallWithResponsesResponses, CallWithResponsesErrors, ThrowOnError>({\n    responseType: 'json',\n    url: '/api/v{api-version}/response',\n    ...options\n});\n\nexport const collectionFormat = <ThrowOnError extends boolean = false>(options: Options<CollectionFormatData, ThrowOnError>) => (options.client ?? client).get<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/collectionFormat', ...options });\n\nexport const types = <ThrowOnError extends boolean = false>(options: Options<TypesData, ThrowOnError>) => (options.client ?? client).get<TypesResponses, unknown, ThrowOnError>({\n    responseType: 'json',\n    url: '/api/v{api-version}/types',\n    ...options\n});\n\nexport const uploadFile = <ThrowOnError extends boolean = false>(options: Options<UploadFileData, ThrowOnError>) => (options.client ?? client).post<UploadFileResponses, unknown, ThrowOnError>({\n    ...urlSearchParamsBodySerializer,\n    responseType: 'json',\n    url: '/api/v{api-version}/upload',\n    ...options,\n    headers: {\n        'Content-Type': 'application/x-www-form-urlencoded',\n        ...options.headers\n    }\n});\n\nexport const fileResponse = <ThrowOnError extends boolean = false>(options: Options<FileResponseData, ThrowOnError>) => (options.client ?? client).get<FileResponseResponses, unknown, ThrowOnError>({\n    responseType: 'blob',\n    url: '/api/v{api-version}/file/{id}',\n    ...options\n});\n\nexport const complexTypes = <ThrowOnError extends boolean = false>(options: Options<ComplexTypesData, ThrowOnError>) => (options.client ?? client).get<ComplexTypesResponses, ComplexTypesErrors, ThrowOnError>({\n    querySerializer: { parameters: { parameterObject: { object: { style: 'form' } } } },\n    responseType: 'json',\n    url: '/api/v{api-version}/complex',\n    ...options\n});\n\nexport const multipartResponse = <ThrowOnError extends boolean = false>(options?: Options<MultipartResponseData, ThrowOnError>) => (options?.client ?? client).get<MultipartResponseResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/multipart', ...options });\n\nexport const multipartRequest = <ThrowOnError extends boolean = false>(options?: Options<MultipartRequestData, ThrowOnError>) => (options?.client ?? client).post<unknown, unknown, ThrowOnError>({\n    ...formDataBodySerializer,\n    url: '/api/v{api-version}/multipart',\n    ...options,\n    headers: {\n        'Content-Type': null,\n        ...options?.headers\n    }\n});\n\nexport const complexParams = <ThrowOnError extends boolean = false>(options: Options<ComplexParamsData, ThrowOnError>) => (options.client ?? client).put<ComplexParamsResponses, unknown, ThrowOnError>({\n    responseType: 'json',\n    url: '/api/v{api-version}/complex/{id}',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json-patch+json',\n        ...options.headers\n    }\n});\n\nexport const callWithResultFromHeader = <ThrowOnError extends boolean = false>(options?: Options<CallWithResultFromHeaderData, ThrowOnError>) => (options?.client ?? client).post<CallWithResultFromHeaderResponses, CallWithResultFromHeaderErrors, ThrowOnError>({ url: '/api/v{api-version}/header', ...options });\n\nexport const testErrorCode = <ThrowOnError extends boolean = false>(options: Options<TestErrorCodeData, ThrowOnError>) => (options.client ?? client).post<TestErrorCodeResponses, TestErrorCodeErrors, ThrowOnError>({ url: '/api/v{api-version}/error', ...options });\n\nexport const nonAsciiæøåÆøÅöôêÊ字符串 = <ThrowOnError extends boolean = false>(options: Options<NonAsciiæøåÆøÅöôêÊ字符串Data, ThrowOnError>) => (options.client ?? client).post<NonAsciiæøåÆøÅöôêÊ字符串Responses, unknown, ThrowOnError>({\n    responseType: 'json',\n    url: '/api/v{api-version}/non-ascii-æøåÆØÅöôêÊ字符串',\n    ...options\n});\n\n/**\n * Login User\n */\nexport const putWithFormUrlEncoded = <ThrowOnError extends boolean = false>(options: Options<PutWithFormUrlEncodedData, ThrowOnError>) => (options.client ?? client).put<unknown, unknown, ThrowOnError>({\n    ...urlSearchParamsBodySerializer,\n    url: '/api/v{api-version}/non-ascii-æøåÆØÅöôêÊ字符串',\n    ...options,\n    headers: {\n        'Content-Type': 'application/x-www-form-urlencoded',\n        ...options.headers\n    }\n});\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/react-query/axios/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type ClientOptions = {\n    baseURL: 'http://localhost:3000/base' | (string & {});\n};\n\n/**\n * Model with number-only name\n */\nexport type _400 = string;\n\nexport type ExternalRefA = ExternalSharedModel;\n\nexport type ExternalRefB = ExternalSharedModel;\n\n/**\n * Testing multiline comments in string: First line\n * Second line\n *\n * Fourth line\n */\nexport type CamelCaseCommentWithBreaks = number;\n\n/**\n * Testing multiline comments in string: First line\n * Second line\n *\n * Fourth line\n */\nexport type CommentWithBreaks = number;\n\n/**\n * Testing backticks in string: `backticks` and ```multiple backticks``` should work\n */\nexport type CommentWithBackticks = number;\n\n/**\n * Testing backticks and quotes in string: `backticks`, 'quotes', \"double quotes\" and ```multiple backticks``` should work\n */\nexport type CommentWithBackticksAndQuotes = number;\n\n/**\n * Testing slashes in string: \\backwards\\\\\\ and /forwards/// should work\n */\nexport type CommentWithSlashes = number;\n\n/**\n * Testing expression placeholders in string: ${expression} should work\n */\nexport type CommentWithExpressionPlaceholders = number;\n\n/**\n * Testing quotes in string: 'single quote''' and \"double quotes\"\"\" should work\n */\nexport type CommentWithQuotes = number;\n\n/**\n * Testing reserved characters in string: * inline * and ** inline ** should work\n */\nexport type CommentWithReservedCharacters = number;\n\n/**\n * This is a simple number\n */\nexport type SimpleInteger = number;\n\n/**\n * This is a simple boolean\n */\nexport type SimpleBoolean = boolean;\n\n/**\n * This is a simple string\n */\nexport type SimpleString = string;\n\n/**\n * A string with non-ascii (unicode) characters valid in typescript identifiers (æøåÆØÅöÔèÈ字符串)\n */\nexport type NonAsciiStringæøåÆøÅöôêÊ字符串 = string;\n\n/**\n * This is a simple file\n */\nexport type SimpleFile = Blob | File;\n\n/**\n * This is a simple reference\n */\nexport type SimpleReference = ModelWithString;\n\n/**\n * This is a simple string\n */\nexport type SimpleStringWithPattern = string | null;\n\n/**\n * This is a simple enum with strings\n */\nexport type EnumWithStrings = 'Success' | 'Warning' | 'Error' | '\\'Single Quote\\'' | '\"Double Quotes\"' | 'Non-ascii: øæåôöØÆÅÔÖ字符串';\n\nexport type EnumWithReplacedCharacters = '\\'Single Quote\\'' | '\"Double Quotes\"' | 'øæåôöØÆÅÔÖ字符串' | 3.1 | '';\n\n/**\n * This is a simple enum with numbers\n */\nexport type EnumWithNumbers = 1 | 2 | 3 | 1.1 | 1.2 | 1.3 | 100 | 200 | 300 | -100 | -200 | -300 | -1.1 | -1.2 | -1.3;\n\n/**\n * Success=1,Warning=2,Error=3\n */\nexport type EnumFromDescription = number;\n\n/**\n * This is a simple enum with numbers\n */\nexport type EnumWithExtensions = 200 | 400 | 500;\n\nexport type EnumWithXEnumNames = 0 | 1 | 2;\n\n/**\n * This is a simple array with numbers\n */\nexport type ArrayWithNumbers = Array<number>;\n\n/**\n * This is a simple array with booleans\n */\nexport type ArrayWithBooleans = Array<boolean>;\n\n/**\n * This is a simple array with strings\n */\nexport type ArrayWithStrings = Array<string>;\n\n/**\n * This is a simple array with references\n */\nexport type ArrayWithReferences = Array<ModelWithString>;\n\n/**\n * This is a simple array containing an array\n */\nexport type ArrayWithArray = Array<Array<ModelWithString>>;\n\n/**\n * This is a simple array with properties\n */\nexport type ArrayWithProperties = Array<{\n    '16x16'?: CamelCaseCommentWithBreaks;\n    bar?: string;\n}>;\n\n/**\n * This is a simple array with any of properties\n */\nexport type ArrayWithAnyOfProperties = Array<{\n    foo?: string;\n} | {\n    bar?: string;\n}>;\n\nexport type AnyOfAnyAndNull = {\n    data?: unknown;\n};\n\n/**\n * This is a simple array with any of properties\n */\nexport type AnyOfArrays = {\n    results?: Array<{\n        foo?: string;\n    } | {\n        bar?: string;\n    }>;\n};\n\n/**\n * This is a string dictionary\n */\nexport type DictionaryWithString = {\n    [key: string]: string;\n};\n\nexport type DictionaryWithPropertiesAndAdditionalProperties = {\n    foo?: number;\n    bar?: boolean;\n    [key: string]: string | number | boolean | undefined;\n};\n\n/**\n * This is a string reference\n */\nexport type DictionaryWithReference = {\n    [key: string]: ModelWithString;\n};\n\n/**\n * This is a complex dictionary\n */\nexport type DictionaryWithArray = {\n    [key: string]: Array<ModelWithString>;\n};\n\n/**\n * This is a string dictionary\n */\nexport type DictionaryWithDictionary = {\n    [key: string]: {\n        [key: string]: string;\n    };\n};\n\n/**\n * This is a complex dictionary\n */\nexport type DictionaryWithProperties = {\n    [key: string]: {\n        foo?: string;\n        bar?: string;\n    };\n};\n\n/**\n * This is a model with one number property\n */\nexport type ModelWithInteger = {\n    /**\n     * This is a simple number property\n     */\n    prop?: number;\n};\n\n/**\n * This is a model with one boolean property\n */\nexport type ModelWithBoolean = {\n    /**\n     * This is a simple boolean property\n     */\n    prop?: boolean;\n};\n\n/**\n * This is a model with one string property\n */\nexport type ModelWithString = {\n    /**\n     * This is a simple string property\n     */\n    prop?: string;\n};\n\n/**\n * This is a model with one string property\n */\nexport type ModelWithStringError = {\n    /**\n     * This is a simple string property\n     */\n    prop?: string;\n};\n\n/**\n * `Comment` or `VoiceComment`. The JSON object for adding voice comments to tickets is different. See [Adding voice comments to tickets](/documentation/ticketing/managing-tickets/adding-voice-comments-to-tickets)\n */\nexport type ModelFromZendesk = string;\n\n/**\n * This is a model with one string property\n */\nexport type ModelWithNullableString = {\n    /**\n     * This is a simple string property\n     */\n    nullableProp1?: string | null;\n    /**\n     * This is a simple string property\n     */\n    nullableRequiredProp1: string | null;\n    /**\n     * This is a simple string property\n     */\n    nullableProp2?: string | null;\n    /**\n     * This is a simple string property\n     */\n    nullableRequiredProp2: string | null;\n    /**\n     * This is a simple enum with strings\n     */\n    'foo_bar-enum'?: 'Success' | 'Warning' | 'Error' | 'ØÆÅ字符串';\n};\n\n/**\n * This is a model with one enum\n */\nexport type ModelWithEnum = {\n    /**\n     * This is a simple enum with strings\n     */\n    'foo_bar-enum'?: 'Success' | 'Warning' | 'Error' | 'ØÆÅ字符串';\n    /**\n     * These are the HTTP error code enums\n     */\n    statusCode?: '100' | '200 FOO' | '300 FOO_BAR' | '400 foo-bar' | '500 foo.bar' | '600 foo&bar';\n    /**\n     * Simple boolean enum\n     */\n    bool?: true;\n};\n\n/**\n * This is a model with one enum with escaped name\n */\nexport type ModelWithEnumWithHyphen = {\n    /**\n     * Foo-Bar-Baz-Qux\n     */\n    'foo-bar-baz-qux'?: '3.0';\n};\n\n/**\n * This is a model with one enum\n */\nexport type ModelWithEnumFromDescription = {\n    /**\n     * Success=1,Warning=2,Error=3\n     */\n    test?: number;\n};\n\n/**\n * This is a model with nested enums\n */\nexport type ModelWithNestedEnums = {\n    dictionaryWithEnum?: {\n        [key: string]: 'Success' | 'Warning' | 'Error';\n    };\n    dictionaryWithEnumFromDescription?: {\n        [key: string]: number;\n    };\n    arrayWithEnum?: Array<'Success' | 'Warning' | 'Error'>;\n    arrayWithDescription?: Array<number>;\n    /**\n     * This is a simple enum with strings\n     */\n    'foo_bar-enum'?: 'Success' | 'Warning' | 'Error' | 'ØÆÅ字符串';\n};\n\n/**\n * This is a model with one property containing a reference\n */\nexport type ModelWithReference = {\n    prop?: ModelWithProperties;\n};\n\n/**\n * This is a model with one property containing an array\n */\nexport type ModelWithArrayReadOnlyAndWriteOnly = {\n    prop?: Array<ModelWithReadOnlyAndWriteOnly>;\n    propWithFile?: Array<Blob | File>;\n    propWithNumber?: Array<number>;\n};\n\n/**\n * This is a model with one property containing an array\n */\nexport type ModelWithArray = {\n    prop?: Array<ModelWithString>;\n    propWithFile?: Array<Blob | File>;\n    propWithNumber?: Array<number>;\n};\n\n/**\n * This is a model with one property containing a dictionary\n */\nexport type ModelWithDictionary = {\n    prop?: {\n        [key: string]: string;\n    };\n};\n\n/**\n * This is a deprecated model with a deprecated property\n *\n * @deprecated\n */\nexport type DeprecatedModel = {\n    /**\n     * This is a deprecated property\n     *\n     * @deprecated\n     */\n    prop?: string;\n};\n\n/**\n * This is a model with one property containing a circular reference\n */\nexport type ModelWithCircularReference = {\n    prop?: ModelWithCircularReference;\n};\n\n/**\n * This is a model with one property with a 'one of' relationship\n */\nexport type CompositionWithOneOf = {\n    propA?: ModelWithString | ModelWithEnum | ModelWithArray | ModelWithDictionary;\n};\n\n/**\n * This is a model with one property with a 'one of' relationship where the options are not $ref\n */\nexport type CompositionWithOneOfAnonymous = {\n    propA?: {\n        propA?: string;\n    } | string | number;\n};\n\n/**\n * Circle\n */\nexport type ModelCircle = {\n    kind: string;\n    radius?: number;\n};\n\n/**\n * Square\n */\nexport type ModelSquare = {\n    kind: string;\n    sideLength?: number;\n};\n\n/**\n * This is a model with one property with a 'one of' relationship where the options are not $ref\n */\nexport type CompositionWithOneOfDiscriminator = ({\n    kind: 'circle';\n} & ModelCircle) | ({\n    kind: 'square';\n} & ModelSquare);\n\n/**\n * This is a model with one property with a 'any of' relationship\n */\nexport type CompositionWithAnyOf = {\n    propA?: ModelWithString | ModelWithEnum | ModelWithArray | ModelWithDictionary;\n};\n\n/**\n * This is a model with one property with a 'any of' relationship where the options are not $ref\n */\nexport type CompositionWithAnyOfAnonymous = {\n    propA?: {\n        propA?: string;\n    } | string | number;\n};\n\n/**\n * This is a model with nested 'any of' property with a type null\n */\nexport type CompositionWithNestedAnyAndTypeNull = {\n    propA?: Array<ModelWithDictionary | null> | Array<ModelWithArray | null>;\n};\n\nexport type _3eNum1Период = 'Bird' | 'Dog';\n\nexport type ConstValue = 'ConstValue';\n\n/**\n * This is a model with one property with a 'any of' relationship where the options are not $ref\n */\nexport type CompositionWithNestedAnyOfAndNull = {\n    propA?: Array<_3eNum1Период | ConstValue> | null;\n};\n\n/**\n * This is a model with one property with a 'one of' relationship\n */\nexport type CompositionWithOneOfAndNullable = {\n    propA?: {\n        boolean?: boolean;\n    } | ModelWithEnum | ModelWithArray | ModelWithDictionary | null;\n};\n\n/**\n * This is a model that contains a simple dictionary within composition\n */\nexport type CompositionWithOneOfAndSimpleDictionary = {\n    propA?: boolean | {\n        [key: string]: number;\n    };\n};\n\n/**\n * This is a model that contains a dictionary of simple arrays within composition\n */\nexport type CompositionWithOneOfAndSimpleArrayDictionary = {\n    propA?: boolean | {\n        [key: string]: Array<boolean>;\n    };\n};\n\n/**\n * This is a model that contains a dictionary of complex arrays (composited) within composition\n */\nexport type CompositionWithOneOfAndComplexArrayDictionary = {\n    propA?: boolean | {\n        [key: string]: Array<number | string>;\n    };\n};\n\n/**\n * This is a model with one property with a 'all of' relationship\n */\nexport type CompositionWithAllOfAndNullable = {\n    propA?: ({\n        boolean?: boolean;\n    } & ModelWithEnum & ModelWithArray & ModelWithDictionary) | null;\n};\n\n/**\n * This is a model with one property with a 'any of' relationship\n */\nexport type CompositionWithAnyOfAndNullable = {\n    propA?: {\n        boolean?: boolean;\n    } | ModelWithEnum | ModelWithArray | ModelWithDictionary | null;\n};\n\n/**\n * This is a base model with two simple optional properties\n */\nexport type CompositionBaseModel = {\n    firstName?: string;\n    lastname?: string;\n};\n\n/**\n * This is a model that extends the base model\n */\nexport type CompositionExtendedModel = CompositionBaseModel & {\n    age: number;\n    firstName: string;\n    lastname: string;\n};\n\n/**\n * This is a model with one nested property\n */\nexport type ModelWithProperties = {\n    required: string;\n    readonly requiredAndReadOnly: string;\n    requiredAndNullable: string | null;\n    string?: string;\n    number?: number;\n    boolean?: boolean;\n    reference?: ModelWithString;\n    'property with space'?: string;\n    default?: string;\n    try?: string;\n    readonly '@namespace.string'?: string;\n    readonly '@namespace.integer'?: number;\n};\n\n/**\n * This is a model with one nested property\n */\nexport type ModelWithNestedProperties = {\n    readonly first: {\n        readonly second: {\n            readonly third: string | null;\n        } | null;\n    } | null;\n};\n\n/**\n * This is a model with duplicated properties\n */\nexport type ModelWithDuplicateProperties = {\n    prop?: ModelWithString;\n};\n\n/**\n * This is a model with ordered properties\n */\nexport type ModelWithOrderedProperties = {\n    zebra?: string;\n    apple?: string;\n    hawaii?: string;\n};\n\n/**\n * This is a model with duplicated imports\n */\nexport type ModelWithDuplicateImports = {\n    propA?: ModelWithString;\n    propB?: ModelWithString;\n    propC?: ModelWithString;\n};\n\n/**\n * This is a model that extends another model\n */\nexport type ModelThatExtends = ModelWithString & {\n    propExtendsA?: string;\n    propExtendsB?: ModelWithString;\n};\n\n/**\n * This is a model that extends another model\n */\nexport type ModelThatExtendsExtends = ModelWithString & ModelThatExtends & {\n    propExtendsC?: string;\n    propExtendsD?: ModelWithString;\n};\n\n/**\n * This is a model that contains a some patterns\n */\nexport type ModelWithPattern = {\n    key: string;\n    name: string;\n    readonly enabled?: boolean;\n    readonly modified?: string;\n    id?: string;\n    text?: string;\n    patternWithSingleQuotes?: string;\n    patternWithNewline?: string;\n    patternWithBacktick?: string;\n    patternWithUnicode?: string;\n};\n\nexport type File = {\n    /**\n     * Id\n     */\n    readonly id?: string;\n    /**\n     * Updated at\n     */\n    readonly updated_at?: string;\n    /**\n     * Created at\n     */\n    readonly created_at?: string;\n    /**\n     * Mime\n     */\n    mime: string;\n    /**\n     * File\n     */\n    readonly file?: string;\n};\n\nexport type Default = {\n    name?: string;\n};\n\nexport type Pageable = {\n    page?: number;\n    size?: number;\n    sort?: Array<string>;\n};\n\n/**\n * This is a free-form object without additionalProperties.\n */\nexport type FreeFormObjectWithoutAdditionalProperties = {\n    [key: string]: unknown;\n};\n\n/**\n * This is a free-form object with additionalProperties: true.\n */\nexport type FreeFormObjectWithAdditionalPropertiesEqTrue = {\n    [key: string]: unknown;\n};\n\n/**\n * This is a free-form object with additionalProperties: {}.\n */\nexport type FreeFormObjectWithAdditionalPropertiesEqEmptyObject = {\n    [key: string]: unknown;\n};\n\nexport type ModelWithConst = {\n    String?: 'String';\n    number?: 0;\n    null?: unknown;\n    withType?: 'Some string';\n};\n\n/**\n * This is a model with one property and additionalProperties: true\n */\nexport type ModelWithAdditionalPropertiesEqTrue = {\n    /**\n     * This is a simple string property\n     */\n    prop?: string;\n    [key: string]: unknown;\n};\n\nexport type NestedAnyOfArraysNullable = {\n    nullableArray?: Array<string | boolean> | null;\n};\n\nexport type CompositionWithOneOfAndProperties = ({\n    foo: SimpleParameter;\n} | {\n    bar: NonAsciiStringæøåÆøÅöôêÊ字符串;\n}) & {\n    baz: number | null;\n    qux: number;\n};\n\n/**\n * An object that can be null\n */\nexport type NullableObject = {\n    foo?: string;\n} | null;\n\n/**\n * Some % character\n */\nexport type CharactersInDescription = string;\n\nexport type ModelWithNullableObject = {\n    data?: NullableObject;\n};\n\n/**\n * An object with additional properties that can be null\n */\nexport type ModelWithAdditionalPropertiesRef = {\n    [key: string]: NullableObject | null;\n};\n\nexport type ModelWithOneOfEnum = {\n    foo: 'Bar';\n} | {\n    foo: 'Baz';\n} | {\n    foo: 'Qux';\n} | {\n    content: string;\n    foo: 'Quux';\n} | {\n    content: [\n        string,\n        string\n    ];\n    foo: 'Corge';\n};\n\nexport type ModelWithNestedArrayEnumsDataFoo = 'foo' | 'bar';\n\nexport type ModelWithNestedArrayEnumsDataBar = 'baz' | 'qux';\n\nexport type ModelWithNestedArrayEnumsData = {\n    foo?: Array<ModelWithNestedArrayEnumsDataFoo>;\n    bar?: Array<ModelWithNestedArrayEnumsDataBar>;\n};\n\nexport type ModelWithNestedArrayEnums = {\n    array_strings?: Array<string>;\n    data?: ModelWithNestedArrayEnumsData;\n};\n\nexport type ModelWithNestedCompositionEnums = {\n    foo?: ModelWithNestedArrayEnumsDataFoo;\n};\n\nexport type ModelWithReadOnlyAndWriteOnly = {\n    foo: string;\n    readonly bar: string;\n};\n\nexport type ModelWithConstantSizeArray = [\n    number,\n    number\n];\n\nexport type ModelWithAnyOfConstantSizeArray = [\n    number | string,\n    number | string,\n    number | string\n];\n\nexport type ModelWithPrefixItemsConstantSizeArray = Array<ModelWithInteger | number | string>;\n\nexport type ModelWithAnyOfConstantSizeArrayNullable = [\n    number | null | string,\n    number | null | string,\n    number | null | string\n];\n\nexport type ModelWithAnyOfConstantSizeArrayWithNSizeAndOptions = [\n    number | Import,\n    number | Import\n];\n\nexport type ModelWithAnyOfConstantSizeArrayAndIntersect = [\n    number & string,\n    number & string\n];\n\nexport type ModelWithNumericEnumUnion = {\n    /**\n     * Период\n     */\n    value?: -10 | -1 | 0 | 1 | 3 | 6 | 12;\n};\n\n/**\n * Some description with `back ticks`\n */\nexport type ModelWithBackticksInDescription = {\n    /**\n     * The template `that` should be used for parsing and importing the contents of the CSV file.\n     *\n     * <br/><p>There is one placeholder currently supported:<ul>     <li><b>${x}</b> - refers to the n-th column in the CSV file, e.g. ${1}, ${2}, ...)</li></ul><p>Example of a correct JSON template:</p>\n     * <pre>\n     * [\n     * {\n     * \"resourceType\": \"Asset\",\n     * \"identifier\": {\n     * \"name\": \"${1}\",\n     * \"domain\": {\n     * \"name\": \"${2}\",\n     * \"community\": {\n     * \"name\": \"Some Community\"\n     * }\n     * }\n     * },\n     * \"attributes\" : {\n     * \"00000000-0000-0000-0000-000000003115\" : [ {\n     * \"value\" : \"${3}\"\n     * } ],\n     * \"00000000-0000-0000-0000-000000000222\" : [ {\n     * \"value\" : \"${4}\"\n     * } ]\n     * }\n     * }\n     * ]\n     * </pre>\n     */\n    template?: string;\n};\n\nexport type ModelWithOneOfAndProperties = (SimpleParameter | NonAsciiStringæøåÆøÅöôêÊ字符串) & {\n    baz: number | null;\n    qux: number;\n};\n\n/**\n * Model used to test deduplication strategy (unused)\n */\nexport type ParameterSimpleParameterUnused = string;\n\n/**\n * Model used to test deduplication strategy\n */\nexport type PostServiceWithEmptyTagResponse = string;\n\n/**\n * Model used to test deduplication strategy\n */\nexport type PostServiceWithEmptyTagResponse2 = string;\n\n/**\n * Model used to test deduplication strategy\n */\nexport type DeleteFooData = string;\n\n/**\n * Model used to test deduplication strategy\n */\nexport type DeleteFooData2 = string;\n\n/**\n * Model with restricted keyword name\n */\nexport type Import = string;\n\nexport type SchemaWithFormRestrictedKeys = {\n    description?: string;\n    'x-enum-descriptions'?: string;\n    'x-enum-varnames'?: string;\n    'x-enumNames'?: string;\n    title?: string;\n    object?: {\n        description?: string;\n        'x-enum-descriptions'?: string;\n        'x-enum-varnames'?: string;\n        'x-enumNames'?: string;\n        title?: string;\n    };\n    array?: Array<{\n        description?: string;\n        'x-enum-descriptions'?: string;\n        'x-enum-varnames'?: string;\n        'x-enumNames'?: string;\n        title?: string;\n    }>;\n};\n\n/**\n * This schema was giving PascalCase transformations a hard time\n */\nexport type IoK8sApimachineryPkgApisMetaV1DeleteOptions = {\n    /**\n     * Must be fulfilled before a deletion is carried out. If not possible, a 409 Conflict status will be returned.\n     */\n    preconditions?: IoK8sApimachineryPkgApisMetaV1Preconditions;\n};\n\n/**\n * This schema was giving PascalCase transformations a hard time\n */\nexport type IoK8sApimachineryPkgApisMetaV1Preconditions = {\n    /**\n     * Specifies the target ResourceVersion\n     */\n    resourceVersion?: string;\n    /**\n     * Specifies the target UID.\n     */\n    uid?: string;\n};\n\nexport type AdditionalPropertiesUnknownIssue = {\n    [key: string]: string | number;\n};\n\nexport type AdditionalPropertiesUnknownIssue2 = {\n    [key: string]: string | number;\n};\n\nexport type AdditionalPropertiesUnknownIssue3 = string & {\n    entries: {\n        [key: string]: AdditionalPropertiesUnknownIssue;\n    };\n};\n\nexport type AdditionalPropertiesIntegerIssue = {\n    value: number;\n    [key: string]: number;\n};\n\nexport type OneOfAllOfIssue = ((ConstValue | GenericSchemaDuplicateIssue1SystemBoolean) & _3eNum1Период) | GenericSchemaDuplicateIssue1SystemString;\n\nexport type GenericSchemaDuplicateIssue1SystemBoolean = {\n    item?: boolean;\n    error?: string | null;\n    readonly hasError?: boolean;\n    data?: {\n        [key: string]: never;\n    };\n};\n\nexport type GenericSchemaDuplicateIssue1SystemString = {\n    item?: string | null;\n    error?: string | null;\n    readonly hasError?: boolean;\n};\n\nexport type ExternalSharedModel = {\n    id: string;\n    name?: string;\n};\n\n/**\n * This is a model with one property containing a reference\n */\nexport type ModelWithReferenceWritable = {\n    prop?: ModelWithPropertiesWritable;\n};\n\n/**\n * This is a model with one property containing an array\n */\nexport type ModelWithArrayReadOnlyAndWriteOnlyWritable = {\n    prop?: Array<ModelWithReadOnlyAndWriteOnlyWritable>;\n    propWithFile?: Array<Blob | File>;\n    propWithNumber?: Array<number>;\n};\n\n/**\n * This is a model with one nested property\n */\nexport type ModelWithPropertiesWritable = {\n    required: string;\n    requiredAndNullable: string | null;\n    string?: string;\n    number?: number;\n    boolean?: boolean;\n    reference?: ModelWithString;\n    'property with space'?: string;\n    default?: string;\n    try?: string;\n};\n\n/**\n * This is a model that contains a some patterns\n */\nexport type ModelWithPatternWritable = {\n    key: string;\n    name: string;\n    id?: string;\n    text?: string;\n    patternWithSingleQuotes?: string;\n    patternWithNewline?: string;\n    patternWithBacktick?: string;\n    patternWithUnicode?: string;\n};\n\nexport type FileWritable = {\n    /**\n     * Mime\n     */\n    mime: string;\n};\n\nexport type ModelWithReadOnlyAndWriteOnlyWritable = {\n    foo: string;\n    baz: string;\n};\n\nexport type ModelWithAnyOfConstantSizeArrayWithNSizeAndOptionsWritable = [\n    number | Import,\n    number | Import\n];\n\nexport type AdditionalPropertiesUnknownIssueWritable = {\n    [key: string]: string | number;\n};\n\nexport type OneOfAllOfIssueWritable = ((ConstValue | GenericSchemaDuplicateIssue1SystemBoolean) & _3eNum1Период) | GenericSchemaDuplicateIssue1SystemString;\n\nexport type GenericSchemaDuplicateIssue1SystemBooleanWritable = {\n    item?: boolean;\n    error?: string | null;\n    data?: {\n        [key: string]: never;\n    };\n};\n\nexport type GenericSchemaDuplicateIssue1SystemStringWritable = {\n    item?: string | null;\n    error?: string | null;\n};\n\n/**\n * This is a reusable parameter\n */\nexport type SimpleParameter = string;\n\n/**\n * Parameter with illegal characters\n */\nexport type XFooBar = ModelWithString;\n\nexport type SimpleRequestBody = ModelWithString;\n\nexport type SimpleFormData = ModelWithString;\n\nexport type ExportData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no+tag';\n};\n\nexport type PatchApiVbyApiVersionNoTagData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no+tag';\n};\n\nexport type PatchApiVbyApiVersionNoTagResponses = {\n    /**\n     * OK\n     */\n    default: unknown;\n};\n\nexport type ImportData = {\n    body: ModelWithReadOnlyAndWriteOnlyWritable | ModelWithArrayReadOnlyAndWriteOnlyWritable;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no+tag';\n};\n\nexport type ImportResponses = {\n    /**\n     * Success\n     */\n    200: ModelFromZendesk;\n    /**\n     * Default success response\n     */\n    default: ModelWithReadOnlyAndWriteOnly;\n};\n\nexport type ImportResponse = ImportResponses[keyof ImportResponses];\n\nexport type FooWowData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no+tag';\n};\n\nexport type FooWowResponses = {\n    /**\n     * OK\n     */\n    default: unknown;\n};\n\nexport type ApiVVersionODataControllerCountData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple/$count';\n};\n\nexport type ApiVVersionODataControllerCountResponses = {\n    /**\n     * Success\n     */\n    200: ModelFromZendesk;\n};\n\nexport type ApiVVersionODataControllerCountResponse = ApiVVersionODataControllerCountResponses[keyof ApiVVersionODataControllerCountResponses];\n\nexport type GetApiVbyApiVersionSimpleOperationData = {\n    body?: never;\n    path: {\n        /**\n         * foo in method\n         */\n        foo_param: string;\n    };\n    query?: never;\n    url: '/api/v{api-version}/simple:operation';\n};\n\nexport type GetApiVbyApiVersionSimpleOperationErrors = {\n    /**\n     * Default error response\n     */\n    default: ModelWithBoolean;\n};\n\nexport type GetApiVbyApiVersionSimpleOperationError = GetApiVbyApiVersionSimpleOperationErrors[keyof GetApiVbyApiVersionSimpleOperationErrors];\n\nexport type GetApiVbyApiVersionSimpleOperationResponses = {\n    /**\n     * Response is a simple number\n     */\n    200: number;\n};\n\nexport type GetApiVbyApiVersionSimpleOperationResponse = GetApiVbyApiVersionSimpleOperationResponses[keyof GetApiVbyApiVersionSimpleOperationResponses];\n\nexport type DeleteCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type GetCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type HeadCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type OptionsCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type PatchCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type PostCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type PutCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type DeleteFooData3 = {\n    body?: never;\n    headers: {\n        /**\n         * Parameter with illegal characters\n         */\n        'x-Foo-Bar': ModelWithString;\n    };\n    path: {\n        /**\n         * foo in method\n         */\n        foo_param: string;\n        /**\n         * bar in method\n         */\n        BarParam: string;\n    };\n    query?: never;\n    url: '/api/v{api-version}/foo/{foo_param}/bar/{BarParam}';\n};\n\nexport type CallWithDescriptionsData = {\n    body?: never;\n    path?: never;\n    query?: {\n        /**\n         * Testing multiline comments in string: First line\n         * Second line\n         *\n         * Fourth line\n         */\n        parameterWithBreaks?: string;\n        /**\n         * Testing backticks in string: `backticks` and ```multiple backticks``` should work\n         */\n        parameterWithBackticks?: string;\n        /**\n         * Testing slashes in string: \\backwards\\\\\\ and /forwards/// should work\n         */\n        parameterWithSlashes?: string;\n        /**\n         * Testing expression placeholders in string: ${expression} should work\n         */\n        parameterWithExpressionPlaceholders?: string;\n        /**\n         * Testing quotes in string: 'single quote''' and \"double quotes\"\"\" should work\n         */\n        parameterWithQuotes?: string;\n        /**\n         * Testing reserved characters in string: * inline * and ** inline ** should work\n         */\n        parameterWithReservedCharacters?: string;\n    };\n    url: '/api/v{api-version}/descriptions';\n};\n\nexport type DeprecatedCallData = {\n    body?: never;\n    headers: {\n        /**\n         * This parameter is deprecated\n         *\n         * @deprecated\n         */\n        parameter: DeprecatedModel | null;\n    };\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/parameters/deprecated';\n};\n\nexport type CallWithParametersData = {\n    /**\n     * This is the parameter that goes into the body\n     */\n    body: {\n        [key: string]: unknown;\n    } | null;\n    headers: {\n        /**\n         * This is the parameter that goes into the header\n         */\n        parameterHeader: string | null;\n    };\n    path: {\n        /**\n         * This is the parameter that goes into the path\n         */\n        parameterPath: string | null;\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string | null;\n    };\n    query: {\n        foo_ref_enum?: ModelWithNestedArrayEnumsDataFoo;\n        foo_all_of_enum: ModelWithNestedArrayEnumsDataFoo;\n        /**\n         * This is the parameter that goes into the query params\n         */\n        cursor: string | null;\n    };\n    url: '/api/v{api-version}/parameters/{parameterPath}';\n};\n\nexport type CallWithWeirdParameterNamesData = {\n    /**\n     * This is the parameter that goes into the body\n     */\n    body: ModelWithString | null;\n    headers: {\n        /**\n         * This is the parameter that goes into the request header\n         */\n        'parameter.header': string | null;\n    };\n    path: {\n        /**\n         * This is the parameter that goes into the path\n         */\n        'parameter.path.1'?: string;\n        /**\n         * This is the parameter that goes into the path\n         */\n        'parameter-path-2'?: string;\n        /**\n         * This is the parameter that goes into the path\n         */\n        'PARAMETER-PATH-3'?: string;\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string | null;\n    };\n    query: {\n        /**\n         * This is the parameter with a reserved keyword\n         */\n        default?: string;\n        /**\n         * This is the parameter that goes into the request query params\n         */\n        'parameter-query': string | null;\n    };\n    url: '/api/v{api-version}/parameters/{parameter.path.1}/{parameter-path-2}/{PARAMETER-PATH-3}';\n};\n\nexport type GetCallWithOptionalParamData = {\n    /**\n     * This is a required parameter\n     */\n    body: ModelWithOneOfEnum;\n    path?: never;\n    query?: {\n        /**\n         * This is an optional parameter\n         */\n        page?: number;\n    };\n    url: '/api/v{api-version}/parameters';\n};\n\nexport type PostCallWithOptionalParamData = {\n    /**\n     * This is an optional parameter\n     */\n    body?: {\n        offset?: number | null;\n    };\n    path?: never;\n    query: {\n        /**\n         * This is a required parameter\n         */\n        parameter: Pageable;\n    };\n    url: '/api/v{api-version}/parameters';\n};\n\nexport type PostCallWithOptionalParamResponses = {\n    /**\n     * Response is a simple number\n     */\n    200: number;\n    /**\n     * Success\n     */\n    204: void;\n};\n\nexport type PostCallWithOptionalParamResponse = PostCallWithOptionalParamResponses[keyof PostCallWithOptionalParamResponses];\n\nexport type PostApiVbyApiVersionRequestBodyData = {\n    /**\n     * A reusable request body\n     */\n    body?: SimpleRequestBody;\n    path?: never;\n    query?: {\n        /**\n         * This is a reusable parameter\n         */\n        parameter?: string;\n    };\n    url: '/api/v{api-version}/requestBody';\n};\n\nexport type PostApiVbyApiVersionFormDataData = {\n    /**\n     * A reusable request body\n     */\n    body?: SimpleFormData;\n    path?: never;\n    query?: {\n        /**\n         * This is a reusable parameter\n         */\n        parameter?: string;\n    };\n    url: '/api/v{api-version}/formData';\n};\n\nexport type CallWithDefaultParametersData = {\n    body?: never;\n    path?: never;\n    query?: {\n        /**\n         * This is a simple string with default value\n         */\n        parameterString?: string | null;\n        /**\n         * This is a simple number with default value\n         */\n        parameterNumber?: number | null;\n        /**\n         * This is a simple boolean with default value\n         */\n        parameterBoolean?: boolean | null;\n        /**\n         * This is a simple enum with default value\n         */\n        parameterEnum?: 'Success' | 'Warning' | 'Error';\n        /**\n         * This is a simple model with default value\n         */\n        parameterModel?: ModelWithString | null;\n    };\n    url: '/api/v{api-version}/defaults';\n};\n\nexport type CallWithDefaultOptionalParametersData = {\n    body?: never;\n    path?: never;\n    query?: {\n        /**\n         * This is a simple string that is optional with default value\n         */\n        parameterString?: string;\n        /**\n         * This is a simple number that is optional with default value\n         */\n        parameterNumber?: number;\n        /**\n         * This is a simple boolean that is optional with default value\n         */\n        parameterBoolean?: boolean;\n        /**\n         * This is a simple enum that is optional with default value\n         */\n        parameterEnum?: 'Success' | 'Warning' | 'Error';\n        /**\n         * This is a simple model that is optional with default value\n         */\n        parameterModel?: ModelWithString;\n    };\n    url: '/api/v{api-version}/defaults';\n};\n\nexport type CallToTestOrderOfParamsData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * This is a optional string with default\n         */\n        parameterOptionalStringWithDefault?: string;\n        /**\n         * This is a optional string with empty default\n         */\n        parameterOptionalStringWithEmptyDefault?: string;\n        /**\n         * This is a optional string with no default\n         */\n        parameterOptionalStringWithNoDefault?: string;\n        /**\n         * This is a string with default\n         */\n        parameterStringWithDefault: string;\n        /**\n         * This is a string with empty default\n         */\n        parameterStringWithEmptyDefault: string;\n        /**\n         * This is a string with no default\n         */\n        parameterStringWithNoDefault: string;\n        /**\n         * This is a string that can be null with no default\n         */\n        parameterStringNullableWithNoDefault?: string | null;\n        /**\n         * This is a string that can be null with default\n         */\n        parameterStringNullableWithDefault?: string | null;\n    };\n    url: '/api/v{api-version}/defaults';\n};\n\nexport type DuplicateNameData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/duplicate';\n};\n\nexport type DuplicateName2Data = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/duplicate';\n};\n\nexport type DuplicateName3Data = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/duplicate';\n};\n\nexport type DuplicateName4Data = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/duplicate';\n};\n\nexport type CallWithNoContentResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no-content';\n};\n\nexport type CallWithNoContentResponseResponses = {\n    /**\n     * Success\n     */\n    204: void;\n};\n\nexport type CallWithNoContentResponseResponse = CallWithNoContentResponseResponses[keyof CallWithNoContentResponseResponses];\n\nexport type CallWithResponseAndNoContentResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multiple-tags/response-and-no-content';\n};\n\nexport type CallWithResponseAndNoContentResponseResponses = {\n    /**\n     * Response is a simple number\n     */\n    200: number;\n    /**\n     * Success\n     */\n    204: void;\n};\n\nexport type CallWithResponseAndNoContentResponseResponse = CallWithResponseAndNoContentResponseResponses[keyof CallWithResponseAndNoContentResponseResponses];\n\nexport type DummyAData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multiple-tags/a';\n};\n\nexport type DummyAResponses = {\n    200: _400;\n};\n\nexport type DummyAResponse = DummyAResponses[keyof DummyAResponses];\n\nexport type DummyBData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multiple-tags/b';\n};\n\nexport type DummyBResponses = {\n    /**\n     * Success\n     */\n    204: void;\n};\n\nexport type DummyBResponse = DummyBResponses[keyof DummyBResponses];\n\nexport type CallWithResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/response';\n};\n\nexport type CallWithResponseResponses = {\n    default: Import;\n};\n\nexport type CallWithResponseResponse = CallWithResponseResponses[keyof CallWithResponseResponses];\n\nexport type CallWithDuplicateResponsesData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/response';\n};\n\nexport type CallWithDuplicateResponsesErrors = {\n    /**\n     * Message for 500 error\n     */\n    500: ModelWithStringError;\n    /**\n     * Message for 501 error\n     */\n    501: ModelWithStringError;\n    /**\n     * Message for 502 error\n     */\n    502: ModelWithStringError;\n    /**\n     * Message for 4XX errors\n     */\n    '4XX': DictionaryWithArray;\n    /**\n     * Default error response\n     */\n    default: ModelWithBoolean;\n};\n\nexport type CallWithDuplicateResponsesError = CallWithDuplicateResponsesErrors[keyof CallWithDuplicateResponsesErrors];\n\nexport type CallWithDuplicateResponsesResponses = {\n    /**\n     * Message for 200 response\n     */\n    200: ModelWithBoolean & ModelWithInteger;\n    /**\n     * Message for 201 response\n     */\n    201: ModelWithString;\n    /**\n     * Message for 202 response\n     */\n    202: ModelWithString;\n};\n\nexport type CallWithDuplicateResponsesResponse = CallWithDuplicateResponsesResponses[keyof CallWithDuplicateResponsesResponses];\n\nexport type CallWithResponsesData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/response';\n};\n\nexport type CallWithResponsesErrors = {\n    /**\n     * Message for 500 error\n     */\n    500: ModelWithStringError;\n    /**\n     * Message for 501 error\n     */\n    501: ModelWithStringError;\n    /**\n     * Message for 502 error\n     */\n    502: ModelWithStringError;\n    /**\n     * Message for default response\n     */\n    default: ModelWithStringError;\n};\n\nexport type CallWithResponsesError = CallWithResponsesErrors[keyof CallWithResponsesErrors];\n\nexport type CallWithResponsesResponses = {\n    /**\n     * Message for 200 response\n     */\n    200: {\n        readonly '@namespace.string'?: string;\n        readonly '@namespace.integer'?: number;\n        readonly value?: Array<ModelWithString>;\n    };\n    /**\n     * Message for 201 response\n     */\n    201: ModelThatExtends;\n    /**\n     * Message for 202 response\n     */\n    202: ModelThatExtendsExtends;\n};\n\nexport type CallWithResponsesResponse = CallWithResponsesResponses[keyof CallWithResponsesResponses];\n\nexport type CollectionFormatData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * This is an array parameter that is sent as csv format (comma-separated values)\n         */\n        parameterArrayCSV: Array<string> | null;\n        /**\n         * This is an array parameter that is sent as ssv format (space-separated values)\n         */\n        parameterArraySSV: Array<string> | null;\n        /**\n         * This is an array parameter that is sent as tsv format (tab-separated values)\n         */\n        parameterArrayTSV: Array<string> | null;\n        /**\n         * This is an array parameter that is sent as pipes format (pipe-separated values)\n         */\n        parameterArrayPipes: Array<string> | null;\n        /**\n         * This is an array parameter that is sent as multi format (multiple parameter instances)\n         */\n        parameterArrayMulti: Array<string> | null;\n    };\n    url: '/api/v{api-version}/collectionFormat';\n};\n\nexport type TypesData = {\n    body?: never;\n    path?: {\n        /**\n         * This is a number parameter\n         */\n        id?: number;\n    };\n    query: {\n        /**\n         * This is a number parameter\n         */\n        parameterNumber: number;\n        /**\n         * This is a string parameter\n         */\n        parameterString: string | null;\n        /**\n         * This is a boolean parameter\n         */\n        parameterBoolean: boolean | null;\n        /**\n         * This is an object parameter\n         */\n        parameterObject: {\n            [key: string]: unknown;\n        } | null;\n        /**\n         * This is an array parameter\n         */\n        parameterArray: Array<string> | null;\n        /**\n         * This is a dictionary parameter\n         */\n        parameterDictionary: {\n            [key: string]: unknown;\n        } | null;\n        /**\n         * This is an enum parameter\n         */\n        parameterEnum: 'Success' | 'Warning' | 'Error';\n    };\n    url: '/api/v{api-version}/types';\n};\n\nexport type TypesResponses = {\n    /**\n     * Response is a simple number\n     */\n    200: number;\n    /**\n     * Response is a simple string\n     */\n    201: string;\n    /**\n     * Response is a simple boolean\n     */\n    202: boolean;\n    /**\n     * Response is a simple object\n     */\n    203: {\n        [key: string]: unknown;\n    };\n};\n\nexport type TypesResponse = TypesResponses[keyof TypesResponses];\n\nexport type UploadFileData = {\n    body: Blob | File;\n    path: {\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string | null;\n    };\n    query?: never;\n    url: '/api/v{api-version}/upload';\n};\n\nexport type UploadFileResponses = {\n    200: boolean;\n};\n\nexport type UploadFileResponse = UploadFileResponses[keyof UploadFileResponses];\n\nexport type FileResponseData = {\n    body?: never;\n    path: {\n        id: string;\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string;\n    };\n    query?: never;\n    url: '/api/v{api-version}/file/{id}';\n};\n\nexport type FileResponseResponses = {\n    /**\n     * Success\n     */\n    200: Blob | File;\n};\n\nexport type FileResponseResponse = FileResponseResponses[keyof FileResponseResponses];\n\nexport type ComplexTypesData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * Parameter containing object\n         */\n        parameterObject: {\n            first?: {\n                second?: {\n                    third?: string;\n                };\n            };\n        };\n        /**\n         * Parameter containing reference\n         */\n        parameterReference: ModelWithString;\n    };\n    url: '/api/v{api-version}/complex';\n};\n\nexport type ComplexTypesErrors = {\n    /**\n     * 400 `server` error\n     */\n    400: unknown;\n    /**\n     * 500 server error\n     */\n    500: unknown;\n};\n\nexport type ComplexTypesResponses = {\n    /**\n     * Successful response\n     */\n    200: Array<ModelWithString>;\n};\n\nexport type ComplexTypesResponse = ComplexTypesResponses[keyof ComplexTypesResponses];\n\nexport type MultipartResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multipart';\n};\n\nexport type MultipartResponseResponses = {\n    /**\n     * OK\n     */\n    200: {\n        file?: Blob | File;\n        metadata?: {\n            foo?: string;\n            bar?: string;\n        };\n    };\n};\n\nexport type MultipartResponseResponse = MultipartResponseResponses[keyof MultipartResponseResponses];\n\nexport type MultipartRequestData = {\n    body?: {\n        content?: Blob | File;\n        data?: ModelWithString | null;\n    };\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multipart';\n};\n\nexport type ComplexParamsData = {\n    body?: {\n        readonly key: string | null;\n        name: string | null;\n        enabled?: boolean;\n        type: 'Monkey' | 'Horse' | 'Bird';\n        listOfModels?: Array<ModelWithString> | null;\n        listOfStrings?: Array<string> | null;\n        parameters: ModelWithString | ModelWithEnum | ModelWithArray | ModelWithDictionary;\n        readonly user?: {\n            readonly id?: number;\n            readonly name?: string | null;\n        };\n    };\n    path: {\n        id: number;\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string;\n    };\n    query?: never;\n    url: '/api/v{api-version}/complex/{id}';\n};\n\nexport type ComplexParamsResponses = {\n    /**\n     * Success\n     */\n    200: ModelWithString;\n};\n\nexport type ComplexParamsResponse = ComplexParamsResponses[keyof ComplexParamsResponses];\n\nexport type CallWithResultFromHeaderData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/header';\n};\n\nexport type CallWithResultFromHeaderErrors = {\n    /**\n     * 400 server error\n     */\n    400: unknown;\n    /**\n     * 500 server error\n     */\n    500: unknown;\n};\n\nexport type CallWithResultFromHeaderResponses = {\n    /**\n     * Successful response\n     */\n    200: unknown;\n};\n\nexport type TestErrorCodeData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * Status code to return\n         */\n        status: number;\n    };\n    url: '/api/v{api-version}/error';\n};\n\nexport type TestErrorCodeErrors = {\n    /**\n     * Custom message: Internal Server Error\n     */\n    500: unknown;\n    /**\n     * Custom message: Not Implemented\n     */\n    501: unknown;\n    /**\n     * Custom message: Bad Gateway\n     */\n    502: unknown;\n    /**\n     * Custom message: Service Unavailable\n     */\n    503: unknown;\n};\n\nexport type TestErrorCodeResponses = {\n    /**\n     * Custom message: Successful response\n     */\n    200: unknown;\n};\n\nexport type NonAsciiæøåÆøÅöôêÊ字符串Data = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * Dummy input param\n         */\n        nonAsciiParamæøåÆØÅöôêÊ: number;\n    };\n    url: '/api/v{api-version}/non-ascii-æøåÆØÅöôêÊ字符串';\n};\n\nexport type NonAsciiæøåÆøÅöôêÊ字符串Responses = {\n    /**\n     * Successful response\n     */\n    200: Array<NonAsciiStringæøåÆøÅöôêÊ字符串>;\n};\n\nexport type NonAsciiæøåÆøÅöôêÊ字符串Response = NonAsciiæøåÆøÅöôêÊ字符串Responses[keyof NonAsciiæøåÆøÅöôêÊ字符串Responses];\n\nexport type PutWithFormUrlEncodedData = {\n    body: ArrayWithStrings;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/non-ascii-æøåÆØÅöôêÊ字符串';\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/react-query/fetch/@tanstack/react-query.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport { type DefaultError, type InfiniteData, infiniteQueryOptions, queryOptions, type UseMutationOptions } from '@tanstack/react-query';\n\nimport { client } from '../client.gen';\nimport { apiVVersionODataControllerCount, callToTestOrderOfParams, callWithDefaultOptionalParameters, callWithDefaultParameters, callWithDescriptions, callWithDuplicateResponses, callWithNoContentResponse, callWithParameters, callWithResponse, callWithResponseAndNoContentResponse, callWithResponses, callWithResultFromHeader, callWithWeirdParameterNames, collectionFormat, complexParams, complexTypes, deleteCallWithoutParametersAndResponse, deleteFoo, deprecatedCall, dummyA, dummyB, duplicateName, duplicateName2, duplicateName3, duplicateName4, export_, fileResponse, fooWow, getApiVbyApiVersionSimpleOperation, getCallWithOptionalParam, getCallWithoutParametersAndResponse, import_, multipartRequest, multipartResponse, nonAsciiæøåÆøÅöôêÊ字符串, type Options, patchApiVbyApiVersionNoTag, patchCallWithoutParametersAndResponse, postApiVbyApiVersionFormData, postApiVbyApiVersionRequestBody, postCallWithOptionalParam, postCallWithoutParametersAndResponse, putCallWithoutParametersAndResponse, putWithFormUrlEncoded, testErrorCode, types, uploadFile } from '../sdk.gen';\nimport type { ApiVVersionODataControllerCountData, ApiVVersionODataControllerCountResponse, CallToTestOrderOfParamsData, CallWithDefaultOptionalParametersData, CallWithDefaultParametersData, CallWithDescriptionsData, CallWithDuplicateResponsesData, CallWithDuplicateResponsesError, CallWithDuplicateResponsesResponse, CallWithNoContentResponseData, CallWithNoContentResponseResponse, CallWithParametersData, CallWithResponseAndNoContentResponseData, CallWithResponseAndNoContentResponseResponse, CallWithResponseData, CallWithResponseResponse, CallWithResponsesData, CallWithResponsesError, CallWithResponsesResponse, CallWithResultFromHeaderData, CallWithWeirdParameterNamesData, CollectionFormatData, ComplexParamsData, ComplexParamsResponse, ComplexTypesData, ComplexTypesResponse, DeleteCallWithoutParametersAndResponseData, DeleteFooData3, DeprecatedCallData, DummyAData, DummyAResponse, DummyBData, DummyBResponse, DuplicateName2Data, DuplicateName3Data, DuplicateName4Data, DuplicateNameData, ExportData, FileResponseData, FileResponseResponse, FooWowData, GetApiVbyApiVersionSimpleOperationData, GetApiVbyApiVersionSimpleOperationError, GetApiVbyApiVersionSimpleOperationResponse, GetCallWithOptionalParamData, GetCallWithoutParametersAndResponseData, ImportData, ImportResponse, MultipartRequestData, MultipartResponseData, MultipartResponseResponse, NonAsciiæøåÆøÅöôêÊ字符串Data, NonAsciiæøåÆøÅöôêÊ字符串Response, PatchApiVbyApiVersionNoTagData, PatchCallWithoutParametersAndResponseData, PostApiVbyApiVersionFormDataData, PostApiVbyApiVersionRequestBodyData, PostCallWithOptionalParamData, PostCallWithOptionalParamResponse, PostCallWithoutParametersAndResponseData, PutCallWithoutParametersAndResponseData, PutWithFormUrlEncodedData, TestErrorCodeData, TypesData, TypesResponse, UploadFileData, UploadFileResponse } from '../types.gen';\n\nexport type QueryKey<TOptions extends Options> = [\n    Pick<TOptions, 'baseUrl' | 'body' | 'headers' | 'path' | 'query'> & {\n        _id: string;\n        _infinite?: boolean;\n        tags?: ReadonlyArray<string>;\n    }\n];\n\nconst createQueryKey = <TOptions extends Options>(id: string, options?: TOptions, infinite?: boolean, tags?: ReadonlyArray<string>): [\n    QueryKey<TOptions>[0]\n] => {\n    const params: QueryKey<TOptions>[0] = { _id: id, baseUrl: options?.baseUrl || (options?.client ?? client).getConfig().baseUrl } as QueryKey<TOptions>[0];\n    if (infinite) {\n        params._infinite = infinite;\n    }\n    if (tags) {\n        params.tags = tags;\n    }\n    if (options?.body) {\n        params.body = options.body;\n    }\n    if (options?.headers) {\n        params.headers = options.headers;\n    }\n    if (options?.path) {\n        params.path = options.path;\n    }\n    if (options?.query) {\n        params.query = options.query;\n    }\n    return [params];\n};\n\nexport const exportQueryKey = (options?: Options<ExportData>) => createQueryKey('export', options);\n\nexport const exportOptions = (options?: Options<ExportData>) => queryOptions<unknown, DefaultError, unknown, ReturnType<typeof exportQueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await export_({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: exportQueryKey(options)\n});\n\nexport const patchApiVbyApiVersionNoTagMutation = (options?: Partial<Options<PatchApiVbyApiVersionNoTagData>>): UseMutationOptions<unknown, DefaultError, Options<PatchApiVbyApiVersionNoTagData>> => {\n    const mutationOptions: UseMutationOptions<unknown, DefaultError, Options<PatchApiVbyApiVersionNoTagData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await patchApiVbyApiVersionNoTag({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const importMutation = (options?: Partial<Options<ImportData>>): UseMutationOptions<ImportResponse, DefaultError, Options<ImportData>> => {\n    const mutationOptions: UseMutationOptions<ImportResponse, DefaultError, Options<ImportData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await import_({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const fooWowMutation = (options?: Partial<Options<FooWowData>>): UseMutationOptions<unknown, DefaultError, Options<FooWowData>> => {\n    const mutationOptions: UseMutationOptions<unknown, DefaultError, Options<FooWowData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await fooWow({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const apiVVersionODataControllerCountQueryKey = (options?: Options<ApiVVersionODataControllerCountData>) => createQueryKey('apiVVersionODataControllerCount', options);\n\nexport const apiVVersionODataControllerCountOptions = (options?: Options<ApiVVersionODataControllerCountData>) => queryOptions<ApiVVersionODataControllerCountResponse, DefaultError, ApiVVersionODataControllerCountResponse, ReturnType<typeof apiVVersionODataControllerCountQueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await apiVVersionODataControllerCount({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: apiVVersionODataControllerCountQueryKey(options)\n});\n\nexport const getApiVbyApiVersionSimpleOperationQueryKey = (options: Options<GetApiVbyApiVersionSimpleOperationData>) => createQueryKey('getApiVbyApiVersionSimpleOperation', options);\n\nexport const getApiVbyApiVersionSimpleOperationOptions = (options: Options<GetApiVbyApiVersionSimpleOperationData>) => queryOptions<GetApiVbyApiVersionSimpleOperationResponse, GetApiVbyApiVersionSimpleOperationError, GetApiVbyApiVersionSimpleOperationResponse, ReturnType<typeof getApiVbyApiVersionSimpleOperationQueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await getApiVbyApiVersionSimpleOperation({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: getApiVbyApiVersionSimpleOperationQueryKey(options)\n});\n\nexport const deleteCallWithoutParametersAndResponseMutation = (options?: Partial<Options<DeleteCallWithoutParametersAndResponseData>>): UseMutationOptions<unknown, DefaultError, Options<DeleteCallWithoutParametersAndResponseData>> => {\n    const mutationOptions: UseMutationOptions<unknown, DefaultError, Options<DeleteCallWithoutParametersAndResponseData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await deleteCallWithoutParametersAndResponse({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const getCallWithoutParametersAndResponseQueryKey = (options?: Options<GetCallWithoutParametersAndResponseData>) => createQueryKey('getCallWithoutParametersAndResponse', options);\n\nexport const getCallWithoutParametersAndResponseOptions = (options?: Options<GetCallWithoutParametersAndResponseData>) => queryOptions<unknown, DefaultError, unknown, ReturnType<typeof getCallWithoutParametersAndResponseQueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await getCallWithoutParametersAndResponse({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: getCallWithoutParametersAndResponseQueryKey(options)\n});\n\nexport const patchCallWithoutParametersAndResponseMutation = (options?: Partial<Options<PatchCallWithoutParametersAndResponseData>>): UseMutationOptions<unknown, DefaultError, Options<PatchCallWithoutParametersAndResponseData>> => {\n    const mutationOptions: UseMutationOptions<unknown, DefaultError, Options<PatchCallWithoutParametersAndResponseData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await patchCallWithoutParametersAndResponse({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const postCallWithoutParametersAndResponseMutation = (options?: Partial<Options<PostCallWithoutParametersAndResponseData>>): UseMutationOptions<unknown, DefaultError, Options<PostCallWithoutParametersAndResponseData>> => {\n    const mutationOptions: UseMutationOptions<unknown, DefaultError, Options<PostCallWithoutParametersAndResponseData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await postCallWithoutParametersAndResponse({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const putCallWithoutParametersAndResponseMutation = (options?: Partial<Options<PutCallWithoutParametersAndResponseData>>): UseMutationOptions<unknown, DefaultError, Options<PutCallWithoutParametersAndResponseData>> => {\n    const mutationOptions: UseMutationOptions<unknown, DefaultError, Options<PutCallWithoutParametersAndResponseData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await putCallWithoutParametersAndResponse({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const deleteFooMutation = (options?: Partial<Options<DeleteFooData3>>): UseMutationOptions<unknown, DefaultError, Options<DeleteFooData3>> => {\n    const mutationOptions: UseMutationOptions<unknown, DefaultError, Options<DeleteFooData3>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await deleteFoo({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const callWithDescriptionsMutation = (options?: Partial<Options<CallWithDescriptionsData>>): UseMutationOptions<unknown, DefaultError, Options<CallWithDescriptionsData>> => {\n    const mutationOptions: UseMutationOptions<unknown, DefaultError, Options<CallWithDescriptionsData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await callWithDescriptions({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\n/**\n * @deprecated\n */\nexport const deprecatedCallMutation = (options?: Partial<Options<DeprecatedCallData>>): UseMutationOptions<unknown, DefaultError, Options<DeprecatedCallData>> => {\n    const mutationOptions: UseMutationOptions<unknown, DefaultError, Options<DeprecatedCallData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await deprecatedCall({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const callWithParametersMutation = (options?: Partial<Options<CallWithParametersData>>): UseMutationOptions<unknown, DefaultError, Options<CallWithParametersData>> => {\n    const mutationOptions: UseMutationOptions<unknown, DefaultError, Options<CallWithParametersData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await callWithParameters({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const callWithWeirdParameterNamesMutation = (options?: Partial<Options<CallWithWeirdParameterNamesData>>): UseMutationOptions<unknown, DefaultError, Options<CallWithWeirdParameterNamesData>> => {\n    const mutationOptions: UseMutationOptions<unknown, DefaultError, Options<CallWithWeirdParameterNamesData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await callWithWeirdParameterNames({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const getCallWithOptionalParamQueryKey = (options: Options<GetCallWithOptionalParamData>) => createQueryKey('getCallWithOptionalParam', options);\n\nexport const getCallWithOptionalParamOptions = (options: Options<GetCallWithOptionalParamData>) => queryOptions<unknown, DefaultError, unknown, ReturnType<typeof getCallWithOptionalParamQueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await getCallWithOptionalParam({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: getCallWithOptionalParamQueryKey(options)\n});\n\nconst createInfiniteParams = <K extends Pick<QueryKey<Options>[0], 'body' | 'headers' | 'path' | 'query'>>(queryKey: QueryKey<Options>, page: K) => {\n    const params = { ...queryKey[0] };\n    if (page.body) {\n        params.body = {\n            ...queryKey[0].body as any,\n            ...page.body as any\n        };\n    }\n    if (page.headers) {\n        params.headers = {\n            ...queryKey[0].headers,\n            ...page.headers\n        };\n    }\n    if (page.path) {\n        params.path = {\n            ...queryKey[0].path as any,\n            ...page.path as any\n        };\n    }\n    if (page.query) {\n        params.query = {\n            ...queryKey[0].query as any,\n            ...page.query as any\n        };\n    }\n    return params as unknown as typeof page;\n};\n\nexport const getCallWithOptionalParamInfiniteQueryKey = (options: Options<GetCallWithOptionalParamData>): QueryKey<Options<GetCallWithOptionalParamData>> => createQueryKey('getCallWithOptionalParam', options, true);\n\nexport const getCallWithOptionalParamInfiniteOptions = (options: Options<GetCallWithOptionalParamData>) => infiniteQueryOptions<unknown, DefaultError, InfiniteData<unknown>, QueryKey<Options<GetCallWithOptionalParamData>>, number | Pick<QueryKey<Options<GetCallWithOptionalParamData>>[0], 'body' | 'headers' | 'path' | 'query'>>(\n// @ts-ignore\n{\n    queryFn: async ({ pageParam, queryKey, signal }) => {\n        // @ts-ignore\n        const page: Pick<QueryKey<Options<GetCallWithOptionalParamData>>[0], 'body' | 'headers' | 'path' | 'query'> = typeof pageParam === 'object' ? pageParam : {\n            query: {\n                page: pageParam\n            }\n        };\n        const params = createInfiniteParams(queryKey, page);\n        const { data } = await getCallWithOptionalParam({\n            ...options,\n            ...params,\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: getCallWithOptionalParamInfiniteQueryKey(options)\n});\n\nexport const postCallWithOptionalParamMutation = (options?: Partial<Options<PostCallWithOptionalParamData>>): UseMutationOptions<PostCallWithOptionalParamResponse, DefaultError, Options<PostCallWithOptionalParamData>> => {\n    const mutationOptions: UseMutationOptions<PostCallWithOptionalParamResponse, DefaultError, Options<PostCallWithOptionalParamData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await postCallWithOptionalParam({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const postApiVbyApiVersionRequestBodyMutation = (options?: Partial<Options<PostApiVbyApiVersionRequestBodyData>>): UseMutationOptions<unknown, DefaultError, Options<PostApiVbyApiVersionRequestBodyData>> => {\n    const mutationOptions: UseMutationOptions<unknown, DefaultError, Options<PostApiVbyApiVersionRequestBodyData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await postApiVbyApiVersionRequestBody({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const postApiVbyApiVersionFormDataMutation = (options?: Partial<Options<PostApiVbyApiVersionFormDataData>>): UseMutationOptions<unknown, DefaultError, Options<PostApiVbyApiVersionFormDataData>> => {\n    const mutationOptions: UseMutationOptions<unknown, DefaultError, Options<PostApiVbyApiVersionFormDataData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await postApiVbyApiVersionFormData({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const callWithDefaultParametersQueryKey = (options?: Options<CallWithDefaultParametersData>) => createQueryKey('callWithDefaultParameters', options);\n\nexport const callWithDefaultParametersOptions = (options?: Options<CallWithDefaultParametersData>) => queryOptions<unknown, DefaultError, unknown, ReturnType<typeof callWithDefaultParametersQueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await callWithDefaultParameters({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: callWithDefaultParametersQueryKey(options)\n});\n\nexport const callWithDefaultOptionalParametersMutation = (options?: Partial<Options<CallWithDefaultOptionalParametersData>>): UseMutationOptions<unknown, DefaultError, Options<CallWithDefaultOptionalParametersData>> => {\n    const mutationOptions: UseMutationOptions<unknown, DefaultError, Options<CallWithDefaultOptionalParametersData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await callWithDefaultOptionalParameters({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const callToTestOrderOfParamsMutation = (options?: Partial<Options<CallToTestOrderOfParamsData>>): UseMutationOptions<unknown, DefaultError, Options<CallToTestOrderOfParamsData>> => {\n    const mutationOptions: UseMutationOptions<unknown, DefaultError, Options<CallToTestOrderOfParamsData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await callToTestOrderOfParams({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const duplicateNameMutation = (options?: Partial<Options<DuplicateNameData>>): UseMutationOptions<unknown, DefaultError, Options<DuplicateNameData>> => {\n    const mutationOptions: UseMutationOptions<unknown, DefaultError, Options<DuplicateNameData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await duplicateName({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const duplicateName2QueryKey = (options?: Options<DuplicateName2Data>) => createQueryKey('duplicateName2', options);\n\nexport const duplicateName2Options = (options?: Options<DuplicateName2Data>) => queryOptions<unknown, DefaultError, unknown, ReturnType<typeof duplicateName2QueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await duplicateName2({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: duplicateName2QueryKey(options)\n});\n\nexport const duplicateName3Mutation = (options?: Partial<Options<DuplicateName3Data>>): UseMutationOptions<unknown, DefaultError, Options<DuplicateName3Data>> => {\n    const mutationOptions: UseMutationOptions<unknown, DefaultError, Options<DuplicateName3Data>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await duplicateName3({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const duplicateName4Mutation = (options?: Partial<Options<DuplicateName4Data>>): UseMutationOptions<unknown, DefaultError, Options<DuplicateName4Data>> => {\n    const mutationOptions: UseMutationOptions<unknown, DefaultError, Options<DuplicateName4Data>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await duplicateName4({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const callWithNoContentResponseQueryKey = (options?: Options<CallWithNoContentResponseData>) => createQueryKey('callWithNoContentResponse', options);\n\nexport const callWithNoContentResponseOptions = (options?: Options<CallWithNoContentResponseData>) => queryOptions<CallWithNoContentResponseResponse, DefaultError, CallWithNoContentResponseResponse, ReturnType<typeof callWithNoContentResponseQueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await callWithNoContentResponse({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: callWithNoContentResponseQueryKey(options)\n});\n\nexport const callWithResponseAndNoContentResponseQueryKey = (options?: Options<CallWithResponseAndNoContentResponseData>) => createQueryKey('callWithResponseAndNoContentResponse', options);\n\nexport const callWithResponseAndNoContentResponseOptions = (options?: Options<CallWithResponseAndNoContentResponseData>) => queryOptions<CallWithResponseAndNoContentResponseResponse, DefaultError, CallWithResponseAndNoContentResponseResponse, ReturnType<typeof callWithResponseAndNoContentResponseQueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await callWithResponseAndNoContentResponse({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: callWithResponseAndNoContentResponseQueryKey(options)\n});\n\nexport const dummyAQueryKey = (options?: Options<DummyAData>) => createQueryKey('dummyA', options);\n\nexport const dummyAOptions = (options?: Options<DummyAData>) => queryOptions<DummyAResponse, DefaultError, DummyAResponse, ReturnType<typeof dummyAQueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await dummyA({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: dummyAQueryKey(options)\n});\n\nexport const dummyBQueryKey = (options?: Options<DummyBData>) => createQueryKey('dummyB', options);\n\nexport const dummyBOptions = (options?: Options<DummyBData>) => queryOptions<DummyBResponse, DefaultError, DummyBResponse, ReturnType<typeof dummyBQueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await dummyB({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: dummyBQueryKey(options)\n});\n\nexport const callWithResponseQueryKey = (options?: Options<CallWithResponseData>) => createQueryKey('callWithResponse', options);\n\nexport const callWithResponseOptions = (options?: Options<CallWithResponseData>) => queryOptions<CallWithResponseResponse, DefaultError, CallWithResponseResponse, ReturnType<typeof callWithResponseQueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await callWithResponse({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: callWithResponseQueryKey(options)\n});\n\nexport const callWithDuplicateResponsesMutation = (options?: Partial<Options<CallWithDuplicateResponsesData>>): UseMutationOptions<CallWithDuplicateResponsesResponse, CallWithDuplicateResponsesError, Options<CallWithDuplicateResponsesData>> => {\n    const mutationOptions: UseMutationOptions<CallWithDuplicateResponsesResponse, CallWithDuplicateResponsesError, Options<CallWithDuplicateResponsesData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await callWithDuplicateResponses({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const callWithResponsesMutation = (options?: Partial<Options<CallWithResponsesData>>): UseMutationOptions<CallWithResponsesResponse, CallWithResponsesError, Options<CallWithResponsesData>> => {\n    const mutationOptions: UseMutationOptions<CallWithResponsesResponse, CallWithResponsesError, Options<CallWithResponsesData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await callWithResponses({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const collectionFormatQueryKey = (options: Options<CollectionFormatData>) => createQueryKey('collectionFormat', options);\n\nexport const collectionFormatOptions = (options: Options<CollectionFormatData>) => queryOptions<unknown, DefaultError, unknown, ReturnType<typeof collectionFormatQueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await collectionFormat({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: collectionFormatQueryKey(options)\n});\n\nexport const typesQueryKey = (options: Options<TypesData>) => createQueryKey('types', options);\n\nexport const typesOptions = (options: Options<TypesData>) => queryOptions<TypesResponse, DefaultError, TypesResponse, ReturnType<typeof typesQueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await types({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: typesQueryKey(options)\n});\n\nexport const uploadFileMutation = (options?: Partial<Options<UploadFileData>>): UseMutationOptions<UploadFileResponse, DefaultError, Options<UploadFileData>> => {\n    const mutationOptions: UseMutationOptions<UploadFileResponse, DefaultError, Options<UploadFileData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await uploadFile({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const fileResponseQueryKey = (options: Options<FileResponseData>) => createQueryKey('fileResponse', options);\n\nexport const fileResponseOptions = (options: Options<FileResponseData>) => queryOptions<FileResponseResponse, DefaultError, FileResponseResponse, ReturnType<typeof fileResponseQueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await fileResponse({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: fileResponseQueryKey(options)\n});\n\nexport const complexTypesQueryKey = (options: Options<ComplexTypesData>) => createQueryKey('complexTypes', options);\n\nexport const complexTypesOptions = (options: Options<ComplexTypesData>) => queryOptions<ComplexTypesResponse, DefaultError, ComplexTypesResponse, ReturnType<typeof complexTypesQueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await complexTypes({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: complexTypesQueryKey(options)\n});\n\nexport const multipartResponseQueryKey = (options?: Options<MultipartResponseData>) => createQueryKey('multipartResponse', options);\n\nexport const multipartResponseOptions = (options?: Options<MultipartResponseData>) => queryOptions<MultipartResponseResponse, DefaultError, MultipartResponseResponse, ReturnType<typeof multipartResponseQueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await multipartResponse({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: multipartResponseQueryKey(options)\n});\n\nexport const multipartRequestMutation = (options?: Partial<Options<MultipartRequestData>>): UseMutationOptions<unknown, DefaultError, Options<MultipartRequestData>> => {\n    const mutationOptions: UseMutationOptions<unknown, DefaultError, Options<MultipartRequestData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await multipartRequest({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const complexParamsMutation = (options?: Partial<Options<ComplexParamsData>>): UseMutationOptions<ComplexParamsResponse, DefaultError, Options<ComplexParamsData>> => {\n    const mutationOptions: UseMutationOptions<ComplexParamsResponse, DefaultError, Options<ComplexParamsData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await complexParams({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const callWithResultFromHeaderMutation = (options?: Partial<Options<CallWithResultFromHeaderData>>): UseMutationOptions<unknown, DefaultError, Options<CallWithResultFromHeaderData>> => {\n    const mutationOptions: UseMutationOptions<unknown, DefaultError, Options<CallWithResultFromHeaderData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await callWithResultFromHeader({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const testErrorCodeMutation = (options?: Partial<Options<TestErrorCodeData>>): UseMutationOptions<unknown, DefaultError, Options<TestErrorCodeData>> => {\n    const mutationOptions: UseMutationOptions<unknown, DefaultError, Options<TestErrorCodeData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await testErrorCode({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const nonAsciiæøåÆøÅöôêÊ字符串Mutation = (options?: Partial<Options<NonAsciiæøåÆøÅöôêÊ字符串Data>>): UseMutationOptions<NonAsciiæøåÆøÅöôêÊ字符串Response, DefaultError, Options<NonAsciiæøåÆøÅöôêÊ字符串Data>> => {\n    const mutationOptions: UseMutationOptions<NonAsciiæøåÆøÅöôêÊ字符串Response, DefaultError, Options<NonAsciiæøåÆøÅöôêÊ字符串Data>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await nonAsciiæøåÆøÅöôêÊ字符串({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\n/**\n * Login User\n */\nexport const putWithFormUrlEncodedMutation = (options?: Partial<Options<PutWithFormUrlEncodedData>>): UseMutationOptions<unknown, DefaultError, Options<PutWithFormUrlEncodedData>> => {\n    const mutationOptions: UseMutationOptions<unknown, DefaultError, Options<PutWithFormUrlEncodedData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await putWithFormUrlEncoded({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/react-query/fetch/client/client.gen.ts",
    "content": "// 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 (options: RequestOptions) => {\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 url = buildUrl(opts);\n\n    return { opts, url };\n  };\n\n  const request: Client['request'] = async (options) => {\n    // @ts-expect-error\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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/react-query/fetch/client/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type { Auth } from '../core/auth.gen';\nexport type { QuerySerializerOptions } from '../core/bodySerializer.gen';\nexport {\n  formDataBodySerializer,\n  jsonBodySerializer,\n  urlSearchParamsBodySerializer,\n} from '../core/bodySerializer.gen';\nexport { buildClientParams } from '../core/params.gen';\nexport { serializeQueryKeyValue } from '../core/queryKeySerializer.gen';\nexport { createClient } from './client.gen';\nexport type {\n  Client,\n  ClientOptions,\n  Config,\n  CreateClientConfig,\n  Options,\n  RequestOptions,\n  RequestResult,\n  ResolvedRequestOptions,\n  ResponseStyle,\n  TDataShape,\n} from './types.gen';\nexport { createConfig, mergeHeaders } from './utils.gen';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/react-query/fetch/client/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { Auth } from '../core/auth.gen';\nimport type {\n  ServerSentEventsOptions,\n  ServerSentEventsResult,\n} from '../core/serverSentEvents.gen';\nimport type { Client as CoreClient, Config as CoreConfig } from '../core/types.gen';\nimport type { Middleware } from './utils.gen';\n\nexport type ResponseStyle = 'data' | 'fields';\n\nexport interface Config<T extends ClientOptions = ClientOptions>\n  extends Omit<RequestInit, 'body' | 'headers' | 'method'>, CoreConfig {\n  /**\n   * Base URL for all requests made by this client.\n   */\n  baseUrl?: T['baseUrl'];\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   * Please don't use the Fetch client for Next.js applications. The `next`\n   * options won't have any effect.\n   *\n   * Install {@link https://www.npmjs.com/package/@hey-api/client-next `@hey-api/client-next`} instead.\n   */\n  next?: never;\n  /**\n   * Return the response data parsed in a specified format. By default, `auto`\n   * will infer the appropriate method from the `Content-Type` response header.\n   * You can override this behavior with any of the {@link Body} methods.\n   * Select `stream` if you don't want to parse response data at all.\n   *\n   * @default 'auto'\n   */\n  parseAs?: 'arrayBuffer' | 'auto' | 'blob' | 'formData' | 'json' | 'stream' | 'text';\n  /**\n   * Should we return only data or multiple fields (data, error, response, etc.)?\n   *\n   * @default 'fields'\n   */\n  responseStyle?: ResponseStyle;\n  /**\n   * Throw an error instead of returning it in the response?\n   *\n   * @default false\n   */\n  throwOnError?: T['throwOnError'];\n}\n\nexport interface RequestOptions<\n  TData = unknown,\n  TResponseStyle extends ResponseStyle = 'fields',\n  ThrowOnError extends boolean = boolean,\n  Url extends string = string,\n>\n  extends\n    Config<{\n      responseStyle: TResponseStyle;\n      throwOnError: ThrowOnError;\n    }>,\n    Pick<\n      ServerSentEventsOptions<TData>,\n      | 'onRequest'\n      | 'onSseError'\n      | 'onSseEvent'\n      | 'sseDefaultRetryDelay'\n      | 'sseMaxRetryAttempts'\n      | 'sseMaxRetryDelay'\n    > {\n  /**\n   * Any body that you want to add to your request.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/fetch#body}\n   */\n  body?: unknown;\n  path?: Record<string, unknown>;\n  query?: Record<string, unknown>;\n  /**\n   * Security mechanism(s) to use for the request.\n   */\n  security?: ReadonlyArray<Auth>;\n  url: Url;\n}\n\nexport interface ResolvedRequestOptions<\n  TResponseStyle extends ResponseStyle = 'fields',\n  ThrowOnError extends boolean = boolean,\n  Url extends string = string,\n> extends RequestOptions<unknown, TResponseStyle, ThrowOnError, Url> {\n  serializedBody?: string;\n}\n\nexport type RequestResult<\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = boolean,\n  TResponseStyle extends ResponseStyle = 'fields',\n> = ThrowOnError extends true\n  ? Promise<\n      TResponseStyle extends 'data'\n        ? TData extends Record<string, unknown>\n          ? TData[keyof TData]\n          : TData\n        : {\n            data: TData extends Record<string, unknown> ? TData[keyof TData] : TData;\n            request: Request;\n            response: Response;\n          }\n    >\n  : Promise<\n      TResponseStyle extends 'data'\n        ? (TData extends Record<string, unknown> ? TData[keyof TData] : TData) | undefined\n        : (\n            | {\n                data: TData extends Record<string, unknown> ? TData[keyof TData] : TData;\n                error: undefined;\n              }\n            | {\n                data: undefined;\n                error: TError extends Record<string, unknown> ? TError[keyof TError] : TError;\n              }\n          ) & {\n            request: Request;\n            response: Response;\n          }\n    >;\n\nexport interface ClientOptions {\n  baseUrl?: string;\n  responseStyle?: ResponseStyle;\n  throwOnError?: boolean;\n}\n\ntype MethodFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'>,\n) => RequestResult<TData, TError, ThrowOnError, TResponseStyle>;\n\ntype SseFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'>,\n) => Promise<ServerSentEventsResult<TData, TError>>;\n\ntype RequestFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'> &\n    Pick<Required<RequestOptions<TData, TResponseStyle, ThrowOnError>>, 'method'>,\n) => RequestResult<TData, TError, ThrowOnError, TResponseStyle>;\n\ntype BuildUrlFn = <\n  TData extends {\n    body?: unknown;\n    path?: Record<string, unknown>;\n    query?: Record<string, unknown>;\n    url: string;\n  },\n>(\n  options: TData & Options<TData>,\n) => string;\n\nexport type Client = CoreClient<RequestFn, Config, MethodFn, BuildUrlFn, SseFn> & {\n  interceptors: Middleware<Request, Response, unknown, ResolvedRequestOptions>;\n};\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 = ClientOptions> = (\n  override?: Config<ClientOptions & T>,\n) => Config<Required<ClientOptions> & T>;\n\nexport interface TDataShape {\n  body?: unknown;\n  headers?: unknown;\n  path?: unknown;\n  query?: unknown;\n  url: string;\n}\n\ntype OmitKeys<T, K> = Pick<T, Exclude<keyof T, K>>;\n\nexport type Options<\n  TData extends TDataShape = TDataShape,\n  ThrowOnError extends boolean = boolean,\n  TResponse = unknown,\n  TResponseStyle extends ResponseStyle = 'fields',\n> = OmitKeys<\n  RequestOptions<TResponse, TResponseStyle, ThrowOnError>,\n  'body' | 'path' | 'query' | 'url'\n> &\n  ([TData] extends [never] ? unknown : Omit<TData, 'url'>);\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/react-query/fetch/client/utils.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/react-query/fetch/client.gen.ts",
    "content": "// 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: 'http://localhost:3000/base' }));\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/react-query/fetch/core/auth.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/react-query/fetch/core/bodySerializer.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/react-query/fetch/core/params.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/react-query/fetch/core/pathSerializer.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/react-query/fetch/core/queryKeySerializer.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\n/**\n * JSON-friendly union that mirrors what Pinia Colada can hash.\n */\nexport type JsonValue =\n  | null\n  | string\n  | number\n  | boolean\n  | JsonValue[]\n  | { [key: string]: JsonValue };\n\n/**\n * Replacer that converts non-JSON values (bigint, Date, etc.) to safe substitutes.\n */\nexport const queryKeyJsonReplacer = (_key: string, value: unknown) => {\n  if (value === undefined || typeof value === 'function' || typeof value === 'symbol') {\n    return undefined;\n  }\n  if (typeof value === 'bigint') {\n    return value.toString();\n  }\n  if (value instanceof Date) {\n    return value.toISOString();\n  }\n  return value;\n};\n\n/**\n * Safely stringifies a value and parses it back into a JsonValue.\n */\nexport const stringifyToJsonValue = (input: unknown): JsonValue | undefined => {\n  try {\n    const json = JSON.stringify(input, queryKeyJsonReplacer);\n    if (json === undefined) {\n      return undefined;\n    }\n    return JSON.parse(json) as JsonValue;\n  } catch {\n    return undefined;\n  }\n};\n\n/**\n * Detects plain objects (including objects with a null prototype).\n */\nconst isPlainObject = (value: unknown): value is Record<string, unknown> => {\n  if (value === null || typeof value !== 'object') {\n    return false;\n  }\n  const prototype = Object.getPrototypeOf(value as object);\n  return prototype === Object.prototype || prototype === null;\n};\n\n/**\n * Turns URLSearchParams into a sorted JSON object for deterministic keys.\n */\nconst serializeSearchParams = (params: URLSearchParams): JsonValue => {\n  const entries = Array.from(params.entries()).sort(([a], [b]) => a.localeCompare(b));\n  const result: Record<string, JsonValue> = {};\n\n  for (const [key, value] of entries) {\n    const existing = result[key];\n    if (existing === undefined) {\n      result[key] = value;\n      continue;\n    }\n\n    if (Array.isArray(existing)) {\n      (existing as string[]).push(value);\n    } else {\n      result[key] = [existing, value];\n    }\n  }\n\n  return result;\n};\n\n/**\n * Normalizes any accepted value into a JSON-friendly shape for query keys.\n */\nexport const serializeQueryKeyValue = (value: unknown): JsonValue | undefined => {\n  if (value === null) {\n    return null;\n  }\n\n  if (typeof value === 'string' || typeof value === 'number' || typeof value === 'boolean') {\n    return value;\n  }\n\n  if (value === undefined || typeof value === 'function' || typeof value === 'symbol') {\n    return undefined;\n  }\n\n  if (typeof value === 'bigint') {\n    return value.toString();\n  }\n\n  if (value instanceof Date) {\n    return value.toISOString();\n  }\n\n  if (Array.isArray(value)) {\n    return stringifyToJsonValue(value);\n  }\n\n  if (typeof URLSearchParams !== 'undefined' && value instanceof URLSearchParams) {\n    return serializeSearchParams(value);\n  }\n\n  if (isPlainObject(value)) {\n    return stringifyToJsonValue(value);\n  }\n\n  return undefined;\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/react-query/fetch/core/serverSentEvents.gen.ts",
    "content": "// 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 const 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            // Normalize line endings: CRLF -> LF, then CR -> LF\n            buffer = buffer.replace(/\\r\\n/g, '\\n').replace(/\\r/g, '\\n');\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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/react-query/fetch/core/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { Auth, AuthToken } from './auth.gen';\nimport type { BodySerializer, QuerySerializer, QuerySerializerOptions } from './bodySerializer.gen';\n\nexport type HttpMethod =\n  | 'connect'\n  | 'delete'\n  | 'get'\n  | 'head'\n  | 'options'\n  | 'patch'\n  | 'post'\n  | 'put'\n  | 'trace';\n\nexport type Client<\n  RequestFn = never,\n  Config = unknown,\n  MethodFn = never,\n  BuildUrlFn = never,\n  SseFn = never,\n> = {\n  /**\n   * Returns the final request URL.\n   */\n  buildUrl: BuildUrlFn;\n  getConfig: () => Config;\n  request: RequestFn;\n  setConfig: (config: Config) => Config;\n} & {\n  [K in HttpMethod]: MethodFn;\n} & ([SseFn] extends [never] ? { sse?: never } : { sse: { [K in HttpMethod]: SseFn } });\n\nexport interface Config {\n  /**\n   * Auth token or a function returning auth token. The resolved value will be\n   * added to the request payload as defined by its `security` array.\n   */\n  auth?: ((auth: Auth) => Promise<AuthToken> | AuthToken) | AuthToken;\n  /**\n   * A function for serializing request body parameter. By default,\n   * {@link JSON.stringify()} will be used.\n   */\n  bodySerializer?: BodySerializer | null;\n  /**\n   * An object containing any HTTP headers that you want to pre-populate your\n   * `Headers` object with.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/Headers/Headers#init See more}\n   */\n  headers?:\n    | RequestInit['headers']\n    | Record<\n        string,\n        string | number | boolean | (string | number | boolean)[] | null | undefined | unknown\n      >;\n  /**\n   * The request method.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/fetch#method See more}\n   */\n  method?: Uppercase<HttpMethod>;\n  /**\n   * A function for serializing request query parameters. By default, arrays\n   * will be exploded in form style, objects will be exploded in deepObject\n   * style, and reserved characters are percent-encoded.\n   *\n   * This method will have no effect if the native `paramsSerializer()` Axios\n   * API function is used.\n   *\n   * {@link https://swagger.io/docs/specification/serialization/#query View examples}\n   */\n  querySerializer?: QuerySerializer | QuerySerializerOptions;\n  /**\n   * A function validating request data. This is useful if you want to ensure\n   * the request conforms to the desired shape, so it can be safely sent to\n   * the server.\n   */\n  requestValidator?: (data: unknown) => Promise<unknown>;\n  /**\n   * A function transforming response data before it's returned. This is useful\n   * for post-processing data, e.g. converting ISO strings into Date objects.\n   */\n  responseTransformer?: (data: unknown) => Promise<unknown>;\n  /**\n   * A function validating response data. This is useful if you want to ensure\n   * the response conforms to the desired shape, so it can be safely passed to\n   * the transformers and returned to the user.\n   */\n  responseValidator?: (data: unknown) => Promise<unknown>;\n}\n\ntype IsExactlyNeverOrNeverUndefined<T> = [T] extends [never]\n  ? true\n  : [T] extends [never | undefined]\n    ? [undefined] extends [T]\n      ? false\n      : true\n    : false;\n\nexport type OmitNever<T extends Record<string, unknown>> = {\n  [K in keyof T as IsExactlyNeverOrNeverUndefined<T[K]> extends true ? never : K]: T[K];\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/react-query/fetch/core/utils.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/react-query/fetch/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport { apiVVersionODataControllerCount, callToTestOrderOfParams, callWithDefaultOptionalParameters, callWithDefaultParameters, callWithDescriptions, callWithDuplicateResponses, callWithNoContentResponse, callWithParameters, callWithResponse, callWithResponseAndNoContentResponse, callWithResponses, callWithResultFromHeader, callWithWeirdParameterNames, collectionFormat, complexParams, complexTypes, deleteCallWithoutParametersAndResponse, deleteFoo, deprecatedCall, dummyA, dummyB, duplicateName, duplicateName2, duplicateName3, duplicateName4, export_, fileResponse, fooWow, getApiVbyApiVersionSimpleOperation, getCallWithOptionalParam, getCallWithoutParametersAndResponse, headCallWithoutParametersAndResponse, import_, multipartRequest, multipartResponse, nonAsciiæøåÆøÅöôêÊ字符串, type Options, optionsCallWithoutParametersAndResponse, patchApiVbyApiVersionNoTag, patchCallWithoutParametersAndResponse, postApiVbyApiVersionFormData, postApiVbyApiVersionRequestBody, postCallWithOptionalParam, postCallWithoutParametersAndResponse, putCallWithoutParametersAndResponse, putWithFormUrlEncoded, testErrorCode, types, uploadFile } from './sdk.gen';\nexport type { _3eNum1Период, _400, AdditionalPropertiesIntegerIssue, AdditionalPropertiesUnknownIssue, AdditionalPropertiesUnknownIssue2, AdditionalPropertiesUnknownIssue3, AdditionalPropertiesUnknownIssueWritable, AnyOfAnyAndNull, AnyOfArrays, ApiVVersionODataControllerCountData, ApiVVersionODataControllerCountResponse, ApiVVersionODataControllerCountResponses, ArrayWithAnyOfProperties, ArrayWithArray, ArrayWithBooleans, ArrayWithNumbers, ArrayWithProperties, ArrayWithReferences, ArrayWithStrings, CallToTestOrderOfParamsData, CallWithDefaultOptionalParametersData, CallWithDefaultParametersData, CallWithDescriptionsData, CallWithDuplicateResponsesData, CallWithDuplicateResponsesError, CallWithDuplicateResponsesErrors, CallWithDuplicateResponsesResponse, CallWithDuplicateResponsesResponses, CallWithNoContentResponseData, CallWithNoContentResponseResponse, CallWithNoContentResponseResponses, CallWithParametersData, CallWithResponseAndNoContentResponseData, CallWithResponseAndNoContentResponseResponse, CallWithResponseAndNoContentResponseResponses, CallWithResponseData, CallWithResponseResponse, CallWithResponseResponses, CallWithResponsesData, CallWithResponsesError, CallWithResponsesErrors, CallWithResponsesResponse, CallWithResponsesResponses, CallWithResultFromHeaderData, CallWithResultFromHeaderErrors, CallWithResultFromHeaderResponses, CallWithWeirdParameterNamesData, CamelCaseCommentWithBreaks, CharactersInDescription, ClientOptions, CollectionFormatData, CommentWithBackticks, CommentWithBackticksAndQuotes, CommentWithBreaks, CommentWithExpressionPlaceholders, CommentWithQuotes, CommentWithReservedCharacters, CommentWithSlashes, ComplexParamsData, ComplexParamsResponse, ComplexParamsResponses, ComplexTypesData, ComplexTypesErrors, ComplexTypesResponse, ComplexTypesResponses, CompositionBaseModel, CompositionExtendedModel, CompositionWithAllOfAndNullable, CompositionWithAnyOf, CompositionWithAnyOfAndNullable, CompositionWithAnyOfAnonymous, CompositionWithNestedAnyAndTypeNull, CompositionWithNestedAnyOfAndNull, CompositionWithOneOf, CompositionWithOneOfAndComplexArrayDictionary, CompositionWithOneOfAndNullable, CompositionWithOneOfAndProperties, CompositionWithOneOfAndSimpleArrayDictionary, CompositionWithOneOfAndSimpleDictionary, CompositionWithOneOfAnonymous, CompositionWithOneOfDiscriminator, ConstValue, Default, DeleteCallWithoutParametersAndResponseData, DeleteFooData, DeleteFooData2, DeleteFooData3, DeprecatedCallData, DeprecatedModel, DictionaryWithArray, DictionaryWithDictionary, DictionaryWithProperties, DictionaryWithPropertiesAndAdditionalProperties, DictionaryWithReference, DictionaryWithString, DummyAData, DummyAResponse, DummyAResponses, DummyBData, DummyBResponse, DummyBResponses, DuplicateName2Data, DuplicateName3Data, DuplicateName4Data, DuplicateNameData, EnumFromDescription, EnumWithExtensions, EnumWithNumbers, EnumWithReplacedCharacters, EnumWithStrings, EnumWithXEnumNames, ExportData, ExternalRefA, ExternalRefB, ExternalSharedModel, File, FileResponseData, FileResponseResponse, FileResponseResponses, FileWritable, FooWowData, FooWowResponses, FreeFormObjectWithAdditionalPropertiesEqEmptyObject, FreeFormObjectWithAdditionalPropertiesEqTrue, FreeFormObjectWithoutAdditionalProperties, GenericSchemaDuplicateIssue1SystemBoolean, GenericSchemaDuplicateIssue1SystemBooleanWritable, GenericSchemaDuplicateIssue1SystemString, GenericSchemaDuplicateIssue1SystemStringWritable, GetApiVbyApiVersionSimpleOperationData, GetApiVbyApiVersionSimpleOperationError, GetApiVbyApiVersionSimpleOperationErrors, GetApiVbyApiVersionSimpleOperationResponse, GetApiVbyApiVersionSimpleOperationResponses, GetCallWithOptionalParamData, GetCallWithoutParametersAndResponseData, HeadCallWithoutParametersAndResponseData, Import, ImportData, ImportResponse, ImportResponses, IoK8sApimachineryPkgApisMetaV1DeleteOptions, IoK8sApimachineryPkgApisMetaV1Preconditions, ModelCircle, ModelFromZendesk, ModelSquare, ModelThatExtends, ModelThatExtendsExtends, ModelWithAdditionalPropertiesEqTrue, ModelWithAdditionalPropertiesRef, ModelWithAnyOfConstantSizeArray, ModelWithAnyOfConstantSizeArrayAndIntersect, ModelWithAnyOfConstantSizeArrayNullable, ModelWithAnyOfConstantSizeArrayWithNSizeAndOptions, ModelWithAnyOfConstantSizeArrayWithNSizeAndOptionsWritable, ModelWithArray, ModelWithArrayReadOnlyAndWriteOnly, ModelWithArrayReadOnlyAndWriteOnlyWritable, ModelWithBackticksInDescription, ModelWithBoolean, ModelWithCircularReference, ModelWithConst, ModelWithConstantSizeArray, ModelWithDictionary, ModelWithDuplicateImports, ModelWithDuplicateProperties, ModelWithEnum, ModelWithEnumFromDescription, ModelWithEnumWithHyphen, ModelWithInteger, ModelWithNestedArrayEnums, ModelWithNestedArrayEnumsData, ModelWithNestedArrayEnumsDataBar, ModelWithNestedArrayEnumsDataFoo, ModelWithNestedCompositionEnums, ModelWithNestedEnums, ModelWithNestedProperties, ModelWithNullableObject, ModelWithNullableString, ModelWithNumericEnumUnion, ModelWithOneOfAndProperties, ModelWithOneOfEnum, ModelWithOrderedProperties, ModelWithPattern, ModelWithPatternWritable, ModelWithPrefixItemsConstantSizeArray, ModelWithProperties, ModelWithPropertiesWritable, ModelWithReadOnlyAndWriteOnly, ModelWithReadOnlyAndWriteOnlyWritable, ModelWithReference, ModelWithReferenceWritable, ModelWithString, ModelWithStringError, MultipartRequestData, MultipartResponseData, MultipartResponseResponse, MultipartResponseResponses, NestedAnyOfArraysNullable, NonAsciiæøåÆøÅöôêÊ字符串Data, NonAsciiæøåÆøÅöôêÊ字符串Response, NonAsciiæøåÆøÅöôêÊ字符串Responses, NonAsciiStringæøåÆøÅöôêÊ字符串, NullableObject, OneOfAllOfIssue, OneOfAllOfIssueWritable, OptionsCallWithoutParametersAndResponseData, Pageable, ParameterSimpleParameterUnused, PatchApiVbyApiVersionNoTagData, PatchApiVbyApiVersionNoTagResponses, PatchCallWithoutParametersAndResponseData, PostApiVbyApiVersionFormDataData, PostApiVbyApiVersionRequestBodyData, PostCallWithOptionalParamData, PostCallWithOptionalParamResponse, PostCallWithOptionalParamResponses, PostCallWithoutParametersAndResponseData, PostServiceWithEmptyTagResponse, PostServiceWithEmptyTagResponse2, PutCallWithoutParametersAndResponseData, PutWithFormUrlEncodedData, SchemaWithFormRestrictedKeys, SimpleBoolean, SimpleFile, SimpleFormData, SimpleInteger, SimpleParameter, SimpleReference, SimpleRequestBody, SimpleString, SimpleStringWithPattern, TestErrorCodeData, TestErrorCodeErrors, TestErrorCodeResponses, TypesData, TypesResponse, TypesResponses, UploadFileData, UploadFileResponse, UploadFileResponses, XFooBar } from './types.gen';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/react-query/fetch/sdk.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport { type Client, formDataBodySerializer, type Options as Options2, type TDataShape, urlSearchParamsBodySerializer } from './client';\nimport { client } from './client.gen';\nimport type { ApiVVersionODataControllerCountData, ApiVVersionODataControllerCountResponses, CallToTestOrderOfParamsData, CallWithDefaultOptionalParametersData, CallWithDefaultParametersData, CallWithDescriptionsData, CallWithDuplicateResponsesData, CallWithDuplicateResponsesErrors, CallWithDuplicateResponsesResponses, CallWithNoContentResponseData, CallWithNoContentResponseResponses, CallWithParametersData, CallWithResponseAndNoContentResponseData, CallWithResponseAndNoContentResponseResponses, CallWithResponseData, CallWithResponseResponses, CallWithResponsesData, CallWithResponsesErrors, CallWithResponsesResponses, CallWithResultFromHeaderData, CallWithResultFromHeaderErrors, CallWithResultFromHeaderResponses, CallWithWeirdParameterNamesData, CollectionFormatData, ComplexParamsData, ComplexParamsResponses, ComplexTypesData, ComplexTypesErrors, ComplexTypesResponses, DeleteCallWithoutParametersAndResponseData, DeleteFooData3, DeprecatedCallData, DummyAData, DummyAResponses, DummyBData, DummyBResponses, DuplicateName2Data, DuplicateName3Data, DuplicateName4Data, DuplicateNameData, ExportData, FileResponseData, FileResponseResponses, FooWowData, FooWowResponses, GetApiVbyApiVersionSimpleOperationData, GetApiVbyApiVersionSimpleOperationErrors, GetApiVbyApiVersionSimpleOperationResponses, GetCallWithOptionalParamData, GetCallWithoutParametersAndResponseData, HeadCallWithoutParametersAndResponseData, ImportData, ImportResponses, MultipartRequestData, MultipartResponseData, MultipartResponseResponses, NonAsciiæøåÆøÅöôêÊ字符串Data, NonAsciiæøåÆøÅöôêÊ字符串Responses, OptionsCallWithoutParametersAndResponseData, PatchApiVbyApiVersionNoTagData, PatchApiVbyApiVersionNoTagResponses, PatchCallWithoutParametersAndResponseData, PostApiVbyApiVersionFormDataData, PostApiVbyApiVersionRequestBodyData, PostCallWithOptionalParamData, PostCallWithOptionalParamResponses, PostCallWithoutParametersAndResponseData, PutCallWithoutParametersAndResponseData, PutWithFormUrlEncodedData, TestErrorCodeData, TestErrorCodeErrors, TestErrorCodeResponses, TypesData, TypesResponses, UploadFileData, UploadFileResponses } from './types.gen';\n\nexport type Options<TData extends TDataShape = TDataShape, ThrowOnError extends boolean = boolean> = Options2<TData, ThrowOnError> & {\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\nexport const export_ = <ThrowOnError extends boolean = false>(options?: Options<ExportData, ThrowOnError>) => (options?.client ?? client).get<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/no+tag', ...options });\n\nexport const patchApiVbyApiVersionNoTag = <ThrowOnError extends boolean = false>(options?: Options<PatchApiVbyApiVersionNoTagData, ThrowOnError>) => (options?.client ?? client).patch<PatchApiVbyApiVersionNoTagResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/no+tag', ...options });\n\nexport const import_ = <ThrowOnError extends boolean = false>(options: Options<ImportData, ThrowOnError>) => (options.client ?? client).post<ImportResponses, unknown, ThrowOnError>({\n    url: '/api/v{api-version}/no+tag',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options.headers\n    }\n});\n\nexport const fooWow = <ThrowOnError extends boolean = false>(options?: Options<FooWowData, ThrowOnError>) => (options?.client ?? client).put<FooWowResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/no+tag', ...options });\n\nexport const apiVVersionODataControllerCount = <ThrowOnError extends boolean = false>(options?: Options<ApiVVersionODataControllerCountData, ThrowOnError>) => (options?.client ?? client).get<ApiVVersionODataControllerCountResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple/$count', ...options });\n\nexport const getApiVbyApiVersionSimpleOperation = <ThrowOnError extends boolean = false>(options: Options<GetApiVbyApiVersionSimpleOperationData, ThrowOnError>) => (options.client ?? client).get<GetApiVbyApiVersionSimpleOperationResponses, GetApiVbyApiVersionSimpleOperationErrors, ThrowOnError>({ url: '/api/v{api-version}/simple:operation', ...options });\n\nexport const deleteCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<DeleteCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).delete<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const getCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<GetCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).get<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const headCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<HeadCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).head<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const optionsCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<OptionsCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).options<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const patchCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<PatchCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).patch<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const postCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<PostCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).post<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const putCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<PutCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).put<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const deleteFoo = <ThrowOnError extends boolean = false>(options: Options<DeleteFooData3, ThrowOnError>) => (options.client ?? client).delete<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/foo/{foo_param}/bar/{BarParam}', ...options });\n\nexport const callWithDescriptions = <ThrowOnError extends boolean = false>(options?: Options<CallWithDescriptionsData, ThrowOnError>) => (options?.client ?? client).post<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/descriptions', ...options });\n\n/**\n * @deprecated\n */\nexport const deprecatedCall = <ThrowOnError extends boolean = false>(options: Options<DeprecatedCallData, ThrowOnError>) => (options.client ?? client).post<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/parameters/deprecated', ...options });\n\nexport const callWithParameters = <ThrowOnError extends boolean = false>(options: Options<CallWithParametersData, ThrowOnError>) => (options.client ?? client).post<unknown, unknown, ThrowOnError>({\n    url: '/api/v{api-version}/parameters/{parameterPath}',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options.headers\n    }\n});\n\nexport const callWithWeirdParameterNames = <ThrowOnError extends boolean = false>(options: Options<CallWithWeirdParameterNamesData, ThrowOnError>) => (options.client ?? client).post<unknown, unknown, ThrowOnError>({\n    url: '/api/v{api-version}/parameters/{parameter.path.1}/{parameter-path-2}/{PARAMETER-PATH-3}',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options.headers\n    }\n});\n\nexport const getCallWithOptionalParam = <ThrowOnError extends boolean = false>(options: Options<GetCallWithOptionalParamData, ThrowOnError>) => (options.client ?? client).get<unknown, unknown, ThrowOnError>({\n    url: '/api/v{api-version}/parameters',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options.headers\n    }\n});\n\nexport const postCallWithOptionalParam = <ThrowOnError extends boolean = false>(options: Options<PostCallWithOptionalParamData, ThrowOnError>) => (options.client ?? client).post<PostCallWithOptionalParamResponses, unknown, ThrowOnError>({\n    url: '/api/v{api-version}/parameters',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options.headers\n    }\n});\n\nexport const postApiVbyApiVersionRequestBody = <ThrowOnError extends boolean = false>(options?: Options<PostApiVbyApiVersionRequestBodyData, ThrowOnError>) => (options?.client ?? client).post<unknown, unknown, ThrowOnError>({\n    url: '/api/v{api-version}/requestBody',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options?.headers\n    }\n});\n\nexport const postApiVbyApiVersionFormData = <ThrowOnError extends boolean = false>(options?: Options<PostApiVbyApiVersionFormDataData, ThrowOnError>) => (options?.client ?? client).post<unknown, unknown, ThrowOnError>({\n    ...formDataBodySerializer,\n    url: '/api/v{api-version}/formData',\n    ...options,\n    headers: {\n        'Content-Type': null,\n        ...options?.headers\n    }\n});\n\nexport const callWithDefaultParameters = <ThrowOnError extends boolean = false>(options?: Options<CallWithDefaultParametersData, ThrowOnError>) => (options?.client ?? client).get<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/defaults', ...options });\n\nexport const callWithDefaultOptionalParameters = <ThrowOnError extends boolean = false>(options?: Options<CallWithDefaultOptionalParametersData, ThrowOnError>) => (options?.client ?? client).post<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/defaults', ...options });\n\nexport const callToTestOrderOfParams = <ThrowOnError extends boolean = false>(options: Options<CallToTestOrderOfParamsData, ThrowOnError>) => (options.client ?? client).put<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/defaults', ...options });\n\nexport const duplicateName = <ThrowOnError extends boolean = false>(options?: Options<DuplicateNameData, ThrowOnError>) => (options?.client ?? client).delete<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/duplicate', ...options });\n\nexport const duplicateName2 = <ThrowOnError extends boolean = false>(options?: Options<DuplicateName2Data, ThrowOnError>) => (options?.client ?? client).get<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/duplicate', ...options });\n\nexport const duplicateName3 = <ThrowOnError extends boolean = false>(options?: Options<DuplicateName3Data, ThrowOnError>) => (options?.client ?? client).post<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/duplicate', ...options });\n\nexport const duplicateName4 = <ThrowOnError extends boolean = false>(options?: Options<DuplicateName4Data, ThrowOnError>) => (options?.client ?? client).put<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/duplicate', ...options });\n\nexport const callWithNoContentResponse = <ThrowOnError extends boolean = false>(options?: Options<CallWithNoContentResponseData, ThrowOnError>) => (options?.client ?? client).get<CallWithNoContentResponseResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/no-content', ...options });\n\nexport const callWithResponseAndNoContentResponse = <ThrowOnError extends boolean = false>(options?: Options<CallWithResponseAndNoContentResponseData, ThrowOnError>) => (options?.client ?? client).get<CallWithResponseAndNoContentResponseResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/multiple-tags/response-and-no-content', ...options });\n\nexport const dummyA = <ThrowOnError extends boolean = false>(options?: Options<DummyAData, ThrowOnError>) => (options?.client ?? client).get<DummyAResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/multiple-tags/a', ...options });\n\nexport const dummyB = <ThrowOnError extends boolean = false>(options?: Options<DummyBData, ThrowOnError>) => (options?.client ?? client).get<DummyBResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/multiple-tags/b', ...options });\n\nexport const callWithResponse = <ThrowOnError extends boolean = false>(options?: Options<CallWithResponseData, ThrowOnError>) => (options?.client ?? client).get<CallWithResponseResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/response', ...options });\n\nexport const callWithDuplicateResponses = <ThrowOnError extends boolean = false>(options?: Options<CallWithDuplicateResponsesData, ThrowOnError>) => (options?.client ?? client).post<CallWithDuplicateResponsesResponses, CallWithDuplicateResponsesErrors, ThrowOnError>({ url: '/api/v{api-version}/response', ...options });\n\nexport const callWithResponses = <ThrowOnError extends boolean = false>(options?: Options<CallWithResponsesData, ThrowOnError>) => (options?.client ?? client).put<CallWithResponsesResponses, CallWithResponsesErrors, ThrowOnError>({ url: '/api/v{api-version}/response', ...options });\n\nexport const collectionFormat = <ThrowOnError extends boolean = false>(options: Options<CollectionFormatData, ThrowOnError>) => (options.client ?? client).get<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/collectionFormat', ...options });\n\nexport const types = <ThrowOnError extends boolean = false>(options: Options<TypesData, ThrowOnError>) => (options.client ?? client).get<TypesResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/types', ...options });\n\nexport const uploadFile = <ThrowOnError extends boolean = false>(options: Options<UploadFileData, ThrowOnError>) => (options.client ?? client).post<UploadFileResponses, unknown, ThrowOnError>({\n    ...urlSearchParamsBodySerializer,\n    url: '/api/v{api-version}/upload',\n    ...options,\n    headers: {\n        'Content-Type': 'application/x-www-form-urlencoded',\n        ...options.headers\n    }\n});\n\nexport const fileResponse = <ThrowOnError extends boolean = false>(options: Options<FileResponseData, ThrowOnError>) => (options.client ?? client).get<FileResponseResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/file/{id}', ...options });\n\nexport const complexTypes = <ThrowOnError extends boolean = false>(options: Options<ComplexTypesData, ThrowOnError>) => (options.client ?? client).get<ComplexTypesResponses, ComplexTypesErrors, ThrowOnError>({\n    querySerializer: { parameters: { parameterObject: { object: { style: 'form' } } } },\n    url: '/api/v{api-version}/complex',\n    ...options\n});\n\nexport const multipartResponse = <ThrowOnError extends boolean = false>(options?: Options<MultipartResponseData, ThrowOnError>) => (options?.client ?? client).get<MultipartResponseResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/multipart', ...options });\n\nexport const multipartRequest = <ThrowOnError extends boolean = false>(options?: Options<MultipartRequestData, ThrowOnError>) => (options?.client ?? client).post<unknown, unknown, ThrowOnError>({\n    ...formDataBodySerializer,\n    url: '/api/v{api-version}/multipart',\n    ...options,\n    headers: {\n        'Content-Type': null,\n        ...options?.headers\n    }\n});\n\nexport const complexParams = <ThrowOnError extends boolean = false>(options: Options<ComplexParamsData, ThrowOnError>) => (options.client ?? client).put<ComplexParamsResponses, unknown, ThrowOnError>({\n    url: '/api/v{api-version}/complex/{id}',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json-patch+json',\n        ...options.headers\n    }\n});\n\nexport const callWithResultFromHeader = <ThrowOnError extends boolean = false>(options?: Options<CallWithResultFromHeaderData, ThrowOnError>) => (options?.client ?? client).post<CallWithResultFromHeaderResponses, CallWithResultFromHeaderErrors, ThrowOnError>({ url: '/api/v{api-version}/header', ...options });\n\nexport const testErrorCode = <ThrowOnError extends boolean = false>(options: Options<TestErrorCodeData, ThrowOnError>) => (options.client ?? client).post<TestErrorCodeResponses, TestErrorCodeErrors, ThrowOnError>({ url: '/api/v{api-version}/error', ...options });\n\nexport const nonAsciiæøåÆøÅöôêÊ字符串 = <ThrowOnError extends boolean = false>(options: Options<NonAsciiæøåÆøÅöôêÊ字符串Data, ThrowOnError>) => (options.client ?? client).post<NonAsciiæøåÆøÅöôêÊ字符串Responses, unknown, ThrowOnError>({ url: '/api/v{api-version}/non-ascii-æøåÆØÅöôêÊ字符串', ...options });\n\n/**\n * Login User\n */\nexport const putWithFormUrlEncoded = <ThrowOnError extends boolean = false>(options: Options<PutWithFormUrlEncodedData, ThrowOnError>) => (options.client ?? client).put<unknown, unknown, ThrowOnError>({\n    ...urlSearchParamsBodySerializer,\n    url: '/api/v{api-version}/non-ascii-æøåÆØÅöôêÊ字符串',\n    ...options,\n    headers: {\n        'Content-Type': 'application/x-www-form-urlencoded',\n        ...options.headers\n    }\n});\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/react-query/fetch/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type ClientOptions = {\n    baseUrl: 'http://localhost:3000/base' | (string & {});\n};\n\n/**\n * Model with number-only name\n */\nexport type _400 = string;\n\nexport type ExternalRefA = ExternalSharedModel;\n\nexport type ExternalRefB = ExternalSharedModel;\n\n/**\n * Testing multiline comments in string: First line\n * Second line\n *\n * Fourth line\n */\nexport type CamelCaseCommentWithBreaks = number;\n\n/**\n * Testing multiline comments in string: First line\n * Second line\n *\n * Fourth line\n */\nexport type CommentWithBreaks = number;\n\n/**\n * Testing backticks in string: `backticks` and ```multiple backticks``` should work\n */\nexport type CommentWithBackticks = number;\n\n/**\n * Testing backticks and quotes in string: `backticks`, 'quotes', \"double quotes\" and ```multiple backticks``` should work\n */\nexport type CommentWithBackticksAndQuotes = number;\n\n/**\n * Testing slashes in string: \\backwards\\\\\\ and /forwards/// should work\n */\nexport type CommentWithSlashes = number;\n\n/**\n * Testing expression placeholders in string: ${expression} should work\n */\nexport type CommentWithExpressionPlaceholders = number;\n\n/**\n * Testing quotes in string: 'single quote''' and \"double quotes\"\"\" should work\n */\nexport type CommentWithQuotes = number;\n\n/**\n * Testing reserved characters in string: * inline * and ** inline ** should work\n */\nexport type CommentWithReservedCharacters = number;\n\n/**\n * This is a simple number\n */\nexport type SimpleInteger = number;\n\n/**\n * This is a simple boolean\n */\nexport type SimpleBoolean = boolean;\n\n/**\n * This is a simple string\n */\nexport type SimpleString = string;\n\n/**\n * A string with non-ascii (unicode) characters valid in typescript identifiers (æøåÆØÅöÔèÈ字符串)\n */\nexport type NonAsciiStringæøåÆøÅöôêÊ字符串 = string;\n\n/**\n * This is a simple file\n */\nexport type SimpleFile = Blob | File;\n\n/**\n * This is a simple reference\n */\nexport type SimpleReference = ModelWithString;\n\n/**\n * This is a simple string\n */\nexport type SimpleStringWithPattern = string | null;\n\n/**\n * This is a simple enum with strings\n */\nexport type EnumWithStrings = 'Success' | 'Warning' | 'Error' | '\\'Single Quote\\'' | '\"Double Quotes\"' | 'Non-ascii: øæåôöØÆÅÔÖ字符串';\n\nexport type EnumWithReplacedCharacters = '\\'Single Quote\\'' | '\"Double Quotes\"' | 'øæåôöØÆÅÔÖ字符串' | 3.1 | '';\n\n/**\n * This is a simple enum with numbers\n */\nexport type EnumWithNumbers = 1 | 2 | 3 | 1.1 | 1.2 | 1.3 | 100 | 200 | 300 | -100 | -200 | -300 | -1.1 | -1.2 | -1.3;\n\n/**\n * Success=1,Warning=2,Error=3\n */\nexport type EnumFromDescription = number;\n\n/**\n * This is a simple enum with numbers\n */\nexport type EnumWithExtensions = 200 | 400 | 500;\n\nexport type EnumWithXEnumNames = 0 | 1 | 2;\n\n/**\n * This is a simple array with numbers\n */\nexport type ArrayWithNumbers = Array<number>;\n\n/**\n * This is a simple array with booleans\n */\nexport type ArrayWithBooleans = Array<boolean>;\n\n/**\n * This is a simple array with strings\n */\nexport type ArrayWithStrings = Array<string>;\n\n/**\n * This is a simple array with references\n */\nexport type ArrayWithReferences = Array<ModelWithString>;\n\n/**\n * This is a simple array containing an array\n */\nexport type ArrayWithArray = Array<Array<ModelWithString>>;\n\n/**\n * This is a simple array with properties\n */\nexport type ArrayWithProperties = Array<{\n    '16x16'?: CamelCaseCommentWithBreaks;\n    bar?: string;\n}>;\n\n/**\n * This is a simple array with any of properties\n */\nexport type ArrayWithAnyOfProperties = Array<{\n    foo?: string;\n} | {\n    bar?: string;\n}>;\n\nexport type AnyOfAnyAndNull = {\n    data?: unknown;\n};\n\n/**\n * This is a simple array with any of properties\n */\nexport type AnyOfArrays = {\n    results?: Array<{\n        foo?: string;\n    } | {\n        bar?: string;\n    }>;\n};\n\n/**\n * This is a string dictionary\n */\nexport type DictionaryWithString = {\n    [key: string]: string;\n};\n\nexport type DictionaryWithPropertiesAndAdditionalProperties = {\n    foo?: number;\n    bar?: boolean;\n    [key: string]: string | number | boolean | undefined;\n};\n\n/**\n * This is a string reference\n */\nexport type DictionaryWithReference = {\n    [key: string]: ModelWithString;\n};\n\n/**\n * This is a complex dictionary\n */\nexport type DictionaryWithArray = {\n    [key: string]: Array<ModelWithString>;\n};\n\n/**\n * This is a string dictionary\n */\nexport type DictionaryWithDictionary = {\n    [key: string]: {\n        [key: string]: string;\n    };\n};\n\n/**\n * This is a complex dictionary\n */\nexport type DictionaryWithProperties = {\n    [key: string]: {\n        foo?: string;\n        bar?: string;\n    };\n};\n\n/**\n * This is a model with one number property\n */\nexport type ModelWithInteger = {\n    /**\n     * This is a simple number property\n     */\n    prop?: number;\n};\n\n/**\n * This is a model with one boolean property\n */\nexport type ModelWithBoolean = {\n    /**\n     * This is a simple boolean property\n     */\n    prop?: boolean;\n};\n\n/**\n * This is a model with one string property\n */\nexport type ModelWithString = {\n    /**\n     * This is a simple string property\n     */\n    prop?: string;\n};\n\n/**\n * This is a model with one string property\n */\nexport type ModelWithStringError = {\n    /**\n     * This is a simple string property\n     */\n    prop?: string;\n};\n\n/**\n * `Comment` or `VoiceComment`. The JSON object for adding voice comments to tickets is different. See [Adding voice comments to tickets](/documentation/ticketing/managing-tickets/adding-voice-comments-to-tickets)\n */\nexport type ModelFromZendesk = string;\n\n/**\n * This is a model with one string property\n */\nexport type ModelWithNullableString = {\n    /**\n     * This is a simple string property\n     */\n    nullableProp1?: string | null;\n    /**\n     * This is a simple string property\n     */\n    nullableRequiredProp1: string | null;\n    /**\n     * This is a simple string property\n     */\n    nullableProp2?: string | null;\n    /**\n     * This is a simple string property\n     */\n    nullableRequiredProp2: string | null;\n    /**\n     * This is a simple enum with strings\n     */\n    'foo_bar-enum'?: 'Success' | 'Warning' | 'Error' | 'ØÆÅ字符串';\n};\n\n/**\n * This is a model with one enum\n */\nexport type ModelWithEnum = {\n    /**\n     * This is a simple enum with strings\n     */\n    'foo_bar-enum'?: 'Success' | 'Warning' | 'Error' | 'ØÆÅ字符串';\n    /**\n     * These are the HTTP error code enums\n     */\n    statusCode?: '100' | '200 FOO' | '300 FOO_BAR' | '400 foo-bar' | '500 foo.bar' | '600 foo&bar';\n    /**\n     * Simple boolean enum\n     */\n    bool?: true;\n};\n\n/**\n * This is a model with one enum with escaped name\n */\nexport type ModelWithEnumWithHyphen = {\n    /**\n     * Foo-Bar-Baz-Qux\n     */\n    'foo-bar-baz-qux'?: '3.0';\n};\n\n/**\n * This is a model with one enum\n */\nexport type ModelWithEnumFromDescription = {\n    /**\n     * Success=1,Warning=2,Error=3\n     */\n    test?: number;\n};\n\n/**\n * This is a model with nested enums\n */\nexport type ModelWithNestedEnums = {\n    dictionaryWithEnum?: {\n        [key: string]: 'Success' | 'Warning' | 'Error';\n    };\n    dictionaryWithEnumFromDescription?: {\n        [key: string]: number;\n    };\n    arrayWithEnum?: Array<'Success' | 'Warning' | 'Error'>;\n    arrayWithDescription?: Array<number>;\n    /**\n     * This is a simple enum with strings\n     */\n    'foo_bar-enum'?: 'Success' | 'Warning' | 'Error' | 'ØÆÅ字符串';\n};\n\n/**\n * This is a model with one property containing a reference\n */\nexport type ModelWithReference = {\n    prop?: ModelWithProperties;\n};\n\n/**\n * This is a model with one property containing an array\n */\nexport type ModelWithArrayReadOnlyAndWriteOnly = {\n    prop?: Array<ModelWithReadOnlyAndWriteOnly>;\n    propWithFile?: Array<Blob | File>;\n    propWithNumber?: Array<number>;\n};\n\n/**\n * This is a model with one property containing an array\n */\nexport type ModelWithArray = {\n    prop?: Array<ModelWithString>;\n    propWithFile?: Array<Blob | File>;\n    propWithNumber?: Array<number>;\n};\n\n/**\n * This is a model with one property containing a dictionary\n */\nexport type ModelWithDictionary = {\n    prop?: {\n        [key: string]: string;\n    };\n};\n\n/**\n * This is a deprecated model with a deprecated property\n *\n * @deprecated\n */\nexport type DeprecatedModel = {\n    /**\n     * This is a deprecated property\n     *\n     * @deprecated\n     */\n    prop?: string;\n};\n\n/**\n * This is a model with one property containing a circular reference\n */\nexport type ModelWithCircularReference = {\n    prop?: ModelWithCircularReference;\n};\n\n/**\n * This is a model with one property with a 'one of' relationship\n */\nexport type CompositionWithOneOf = {\n    propA?: ModelWithString | ModelWithEnum | ModelWithArray | ModelWithDictionary;\n};\n\n/**\n * This is a model with one property with a 'one of' relationship where the options are not $ref\n */\nexport type CompositionWithOneOfAnonymous = {\n    propA?: {\n        propA?: string;\n    } | string | number;\n};\n\n/**\n * Circle\n */\nexport type ModelCircle = {\n    kind: string;\n    radius?: number;\n};\n\n/**\n * Square\n */\nexport type ModelSquare = {\n    kind: string;\n    sideLength?: number;\n};\n\n/**\n * This is a model with one property with a 'one of' relationship where the options are not $ref\n */\nexport type CompositionWithOneOfDiscriminator = ({\n    kind: 'circle';\n} & ModelCircle) | ({\n    kind: 'square';\n} & ModelSquare);\n\n/**\n * This is a model with one property with a 'any of' relationship\n */\nexport type CompositionWithAnyOf = {\n    propA?: ModelWithString | ModelWithEnum | ModelWithArray | ModelWithDictionary;\n};\n\n/**\n * This is a model with one property with a 'any of' relationship where the options are not $ref\n */\nexport type CompositionWithAnyOfAnonymous = {\n    propA?: {\n        propA?: string;\n    } | string | number;\n};\n\n/**\n * This is a model with nested 'any of' property with a type null\n */\nexport type CompositionWithNestedAnyAndTypeNull = {\n    propA?: Array<ModelWithDictionary | null> | Array<ModelWithArray | null>;\n};\n\nexport type _3eNum1Период = 'Bird' | 'Dog';\n\nexport type ConstValue = 'ConstValue';\n\n/**\n * This is a model with one property with a 'any of' relationship where the options are not $ref\n */\nexport type CompositionWithNestedAnyOfAndNull = {\n    propA?: Array<_3eNum1Период | ConstValue> | null;\n};\n\n/**\n * This is a model with one property with a 'one of' relationship\n */\nexport type CompositionWithOneOfAndNullable = {\n    propA?: {\n        boolean?: boolean;\n    } | ModelWithEnum | ModelWithArray | ModelWithDictionary | null;\n};\n\n/**\n * This is a model that contains a simple dictionary within composition\n */\nexport type CompositionWithOneOfAndSimpleDictionary = {\n    propA?: boolean | {\n        [key: string]: number;\n    };\n};\n\n/**\n * This is a model that contains a dictionary of simple arrays within composition\n */\nexport type CompositionWithOneOfAndSimpleArrayDictionary = {\n    propA?: boolean | {\n        [key: string]: Array<boolean>;\n    };\n};\n\n/**\n * This is a model that contains a dictionary of complex arrays (composited) within composition\n */\nexport type CompositionWithOneOfAndComplexArrayDictionary = {\n    propA?: boolean | {\n        [key: string]: Array<number | string>;\n    };\n};\n\n/**\n * This is a model with one property with a 'all of' relationship\n */\nexport type CompositionWithAllOfAndNullable = {\n    propA?: ({\n        boolean?: boolean;\n    } & ModelWithEnum & ModelWithArray & ModelWithDictionary) | null;\n};\n\n/**\n * This is a model with one property with a 'any of' relationship\n */\nexport type CompositionWithAnyOfAndNullable = {\n    propA?: {\n        boolean?: boolean;\n    } | ModelWithEnum | ModelWithArray | ModelWithDictionary | null;\n};\n\n/**\n * This is a base model with two simple optional properties\n */\nexport type CompositionBaseModel = {\n    firstName?: string;\n    lastname?: string;\n};\n\n/**\n * This is a model that extends the base model\n */\nexport type CompositionExtendedModel = CompositionBaseModel & {\n    age: number;\n    firstName: string;\n    lastname: string;\n};\n\n/**\n * This is a model with one nested property\n */\nexport type ModelWithProperties = {\n    required: string;\n    readonly requiredAndReadOnly: string;\n    requiredAndNullable: string | null;\n    string?: string;\n    number?: number;\n    boolean?: boolean;\n    reference?: ModelWithString;\n    'property with space'?: string;\n    default?: string;\n    try?: string;\n    readonly '@namespace.string'?: string;\n    readonly '@namespace.integer'?: number;\n};\n\n/**\n * This is a model with one nested property\n */\nexport type ModelWithNestedProperties = {\n    readonly first: {\n        readonly second: {\n            readonly third: string | null;\n        } | null;\n    } | null;\n};\n\n/**\n * This is a model with duplicated properties\n */\nexport type ModelWithDuplicateProperties = {\n    prop?: ModelWithString;\n};\n\n/**\n * This is a model with ordered properties\n */\nexport type ModelWithOrderedProperties = {\n    zebra?: string;\n    apple?: string;\n    hawaii?: string;\n};\n\n/**\n * This is a model with duplicated imports\n */\nexport type ModelWithDuplicateImports = {\n    propA?: ModelWithString;\n    propB?: ModelWithString;\n    propC?: ModelWithString;\n};\n\n/**\n * This is a model that extends another model\n */\nexport type ModelThatExtends = ModelWithString & {\n    propExtendsA?: string;\n    propExtendsB?: ModelWithString;\n};\n\n/**\n * This is a model that extends another model\n */\nexport type ModelThatExtendsExtends = ModelWithString & ModelThatExtends & {\n    propExtendsC?: string;\n    propExtendsD?: ModelWithString;\n};\n\n/**\n * This is a model that contains a some patterns\n */\nexport type ModelWithPattern = {\n    key: string;\n    name: string;\n    readonly enabled?: boolean;\n    readonly modified?: string;\n    id?: string;\n    text?: string;\n    patternWithSingleQuotes?: string;\n    patternWithNewline?: string;\n    patternWithBacktick?: string;\n    patternWithUnicode?: string;\n};\n\nexport type File = {\n    /**\n     * Id\n     */\n    readonly id?: string;\n    /**\n     * Updated at\n     */\n    readonly updated_at?: string;\n    /**\n     * Created at\n     */\n    readonly created_at?: string;\n    /**\n     * Mime\n     */\n    mime: string;\n    /**\n     * File\n     */\n    readonly file?: string;\n};\n\nexport type Default = {\n    name?: string;\n};\n\nexport type Pageable = {\n    page?: number;\n    size?: number;\n    sort?: Array<string>;\n};\n\n/**\n * This is a free-form object without additionalProperties.\n */\nexport type FreeFormObjectWithoutAdditionalProperties = {\n    [key: string]: unknown;\n};\n\n/**\n * This is a free-form object with additionalProperties: true.\n */\nexport type FreeFormObjectWithAdditionalPropertiesEqTrue = {\n    [key: string]: unknown;\n};\n\n/**\n * This is a free-form object with additionalProperties: {}.\n */\nexport type FreeFormObjectWithAdditionalPropertiesEqEmptyObject = {\n    [key: string]: unknown;\n};\n\nexport type ModelWithConst = {\n    String?: 'String';\n    number?: 0;\n    null?: unknown;\n    withType?: 'Some string';\n};\n\n/**\n * This is a model with one property and additionalProperties: true\n */\nexport type ModelWithAdditionalPropertiesEqTrue = {\n    /**\n     * This is a simple string property\n     */\n    prop?: string;\n    [key: string]: unknown;\n};\n\nexport type NestedAnyOfArraysNullable = {\n    nullableArray?: Array<string | boolean> | null;\n};\n\nexport type CompositionWithOneOfAndProperties = ({\n    foo: SimpleParameter;\n} | {\n    bar: NonAsciiStringæøåÆøÅöôêÊ字符串;\n}) & {\n    baz: number | null;\n    qux: number;\n};\n\n/**\n * An object that can be null\n */\nexport type NullableObject = {\n    foo?: string;\n} | null;\n\n/**\n * Some % character\n */\nexport type CharactersInDescription = string;\n\nexport type ModelWithNullableObject = {\n    data?: NullableObject;\n};\n\n/**\n * An object with additional properties that can be null\n */\nexport type ModelWithAdditionalPropertiesRef = {\n    [key: string]: NullableObject | null;\n};\n\nexport type ModelWithOneOfEnum = {\n    foo: 'Bar';\n} | {\n    foo: 'Baz';\n} | {\n    foo: 'Qux';\n} | {\n    content: string;\n    foo: 'Quux';\n} | {\n    content: [\n        string,\n        string\n    ];\n    foo: 'Corge';\n};\n\nexport type ModelWithNestedArrayEnumsDataFoo = 'foo' | 'bar';\n\nexport type ModelWithNestedArrayEnumsDataBar = 'baz' | 'qux';\n\nexport type ModelWithNestedArrayEnumsData = {\n    foo?: Array<ModelWithNestedArrayEnumsDataFoo>;\n    bar?: Array<ModelWithNestedArrayEnumsDataBar>;\n};\n\nexport type ModelWithNestedArrayEnums = {\n    array_strings?: Array<string>;\n    data?: ModelWithNestedArrayEnumsData;\n};\n\nexport type ModelWithNestedCompositionEnums = {\n    foo?: ModelWithNestedArrayEnumsDataFoo;\n};\n\nexport type ModelWithReadOnlyAndWriteOnly = {\n    foo: string;\n    readonly bar: string;\n};\n\nexport type ModelWithConstantSizeArray = [\n    number,\n    number\n];\n\nexport type ModelWithAnyOfConstantSizeArray = [\n    number | string,\n    number | string,\n    number | string\n];\n\nexport type ModelWithPrefixItemsConstantSizeArray = Array<ModelWithInteger | number | string>;\n\nexport type ModelWithAnyOfConstantSizeArrayNullable = [\n    number | null | string,\n    number | null | string,\n    number | null | string\n];\n\nexport type ModelWithAnyOfConstantSizeArrayWithNSizeAndOptions = [\n    number | Import,\n    number | Import\n];\n\nexport type ModelWithAnyOfConstantSizeArrayAndIntersect = [\n    number & string,\n    number & string\n];\n\nexport type ModelWithNumericEnumUnion = {\n    /**\n     * Период\n     */\n    value?: -10 | -1 | 0 | 1 | 3 | 6 | 12;\n};\n\n/**\n * Some description with `back ticks`\n */\nexport type ModelWithBackticksInDescription = {\n    /**\n     * The template `that` should be used for parsing and importing the contents of the CSV file.\n     *\n     * <br/><p>There is one placeholder currently supported:<ul>     <li><b>${x}</b> - refers to the n-th column in the CSV file, e.g. ${1}, ${2}, ...)</li></ul><p>Example of a correct JSON template:</p>\n     * <pre>\n     * [\n     * {\n     * \"resourceType\": \"Asset\",\n     * \"identifier\": {\n     * \"name\": \"${1}\",\n     * \"domain\": {\n     * \"name\": \"${2}\",\n     * \"community\": {\n     * \"name\": \"Some Community\"\n     * }\n     * }\n     * },\n     * \"attributes\" : {\n     * \"00000000-0000-0000-0000-000000003115\" : [ {\n     * \"value\" : \"${3}\"\n     * } ],\n     * \"00000000-0000-0000-0000-000000000222\" : [ {\n     * \"value\" : \"${4}\"\n     * } ]\n     * }\n     * }\n     * ]\n     * </pre>\n     */\n    template?: string;\n};\n\nexport type ModelWithOneOfAndProperties = (SimpleParameter | NonAsciiStringæøåÆøÅöôêÊ字符串) & {\n    baz: number | null;\n    qux: number;\n};\n\n/**\n * Model used to test deduplication strategy (unused)\n */\nexport type ParameterSimpleParameterUnused = string;\n\n/**\n * Model used to test deduplication strategy\n */\nexport type PostServiceWithEmptyTagResponse = string;\n\n/**\n * Model used to test deduplication strategy\n */\nexport type PostServiceWithEmptyTagResponse2 = string;\n\n/**\n * Model used to test deduplication strategy\n */\nexport type DeleteFooData = string;\n\n/**\n * Model used to test deduplication strategy\n */\nexport type DeleteFooData2 = string;\n\n/**\n * Model with restricted keyword name\n */\nexport type Import = string;\n\nexport type SchemaWithFormRestrictedKeys = {\n    description?: string;\n    'x-enum-descriptions'?: string;\n    'x-enum-varnames'?: string;\n    'x-enumNames'?: string;\n    title?: string;\n    object?: {\n        description?: string;\n        'x-enum-descriptions'?: string;\n        'x-enum-varnames'?: string;\n        'x-enumNames'?: string;\n        title?: string;\n    };\n    array?: Array<{\n        description?: string;\n        'x-enum-descriptions'?: string;\n        'x-enum-varnames'?: string;\n        'x-enumNames'?: string;\n        title?: string;\n    }>;\n};\n\n/**\n * This schema was giving PascalCase transformations a hard time\n */\nexport type IoK8sApimachineryPkgApisMetaV1DeleteOptions = {\n    /**\n     * Must be fulfilled before a deletion is carried out. If not possible, a 409 Conflict status will be returned.\n     */\n    preconditions?: IoK8sApimachineryPkgApisMetaV1Preconditions;\n};\n\n/**\n * This schema was giving PascalCase transformations a hard time\n */\nexport type IoK8sApimachineryPkgApisMetaV1Preconditions = {\n    /**\n     * Specifies the target ResourceVersion\n     */\n    resourceVersion?: string;\n    /**\n     * Specifies the target UID.\n     */\n    uid?: string;\n};\n\nexport type AdditionalPropertiesUnknownIssue = {\n    [key: string]: string | number;\n};\n\nexport type AdditionalPropertiesUnknownIssue2 = {\n    [key: string]: string | number;\n};\n\nexport type AdditionalPropertiesUnknownIssue3 = string & {\n    entries: {\n        [key: string]: AdditionalPropertiesUnknownIssue;\n    };\n};\n\nexport type AdditionalPropertiesIntegerIssue = {\n    value: number;\n    [key: string]: number;\n};\n\nexport type OneOfAllOfIssue = ((ConstValue | GenericSchemaDuplicateIssue1SystemBoolean) & _3eNum1Период) | GenericSchemaDuplicateIssue1SystemString;\n\nexport type GenericSchemaDuplicateIssue1SystemBoolean = {\n    item?: boolean;\n    error?: string | null;\n    readonly hasError?: boolean;\n    data?: {\n        [key: string]: never;\n    };\n};\n\nexport type GenericSchemaDuplicateIssue1SystemString = {\n    item?: string | null;\n    error?: string | null;\n    readonly hasError?: boolean;\n};\n\nexport type ExternalSharedModel = {\n    id: string;\n    name?: string;\n};\n\n/**\n * This is a model with one property containing a reference\n */\nexport type ModelWithReferenceWritable = {\n    prop?: ModelWithPropertiesWritable;\n};\n\n/**\n * This is a model with one property containing an array\n */\nexport type ModelWithArrayReadOnlyAndWriteOnlyWritable = {\n    prop?: Array<ModelWithReadOnlyAndWriteOnlyWritable>;\n    propWithFile?: Array<Blob | File>;\n    propWithNumber?: Array<number>;\n};\n\n/**\n * This is a model with one nested property\n */\nexport type ModelWithPropertiesWritable = {\n    required: string;\n    requiredAndNullable: string | null;\n    string?: string;\n    number?: number;\n    boolean?: boolean;\n    reference?: ModelWithString;\n    'property with space'?: string;\n    default?: string;\n    try?: string;\n};\n\n/**\n * This is a model that contains a some patterns\n */\nexport type ModelWithPatternWritable = {\n    key: string;\n    name: string;\n    id?: string;\n    text?: string;\n    patternWithSingleQuotes?: string;\n    patternWithNewline?: string;\n    patternWithBacktick?: string;\n    patternWithUnicode?: string;\n};\n\nexport type FileWritable = {\n    /**\n     * Mime\n     */\n    mime: string;\n};\n\nexport type ModelWithReadOnlyAndWriteOnlyWritable = {\n    foo: string;\n    baz: string;\n};\n\nexport type ModelWithAnyOfConstantSizeArrayWithNSizeAndOptionsWritable = [\n    number | Import,\n    number | Import\n];\n\nexport type AdditionalPropertiesUnknownIssueWritable = {\n    [key: string]: string | number;\n};\n\nexport type OneOfAllOfIssueWritable = ((ConstValue | GenericSchemaDuplicateIssue1SystemBoolean) & _3eNum1Период) | GenericSchemaDuplicateIssue1SystemString;\n\nexport type GenericSchemaDuplicateIssue1SystemBooleanWritable = {\n    item?: boolean;\n    error?: string | null;\n    data?: {\n        [key: string]: never;\n    };\n};\n\nexport type GenericSchemaDuplicateIssue1SystemStringWritable = {\n    item?: string | null;\n    error?: string | null;\n};\n\n/**\n * This is a reusable parameter\n */\nexport type SimpleParameter = string;\n\n/**\n * Parameter with illegal characters\n */\nexport type XFooBar = ModelWithString;\n\nexport type SimpleRequestBody = ModelWithString;\n\nexport type SimpleFormData = ModelWithString;\n\nexport type ExportData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no+tag';\n};\n\nexport type PatchApiVbyApiVersionNoTagData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no+tag';\n};\n\nexport type PatchApiVbyApiVersionNoTagResponses = {\n    /**\n     * OK\n     */\n    default: unknown;\n};\n\nexport type ImportData = {\n    body: ModelWithReadOnlyAndWriteOnlyWritable | ModelWithArrayReadOnlyAndWriteOnlyWritable;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no+tag';\n};\n\nexport type ImportResponses = {\n    /**\n     * Success\n     */\n    200: ModelFromZendesk;\n    /**\n     * Default success response\n     */\n    default: ModelWithReadOnlyAndWriteOnly;\n};\n\nexport type ImportResponse = ImportResponses[keyof ImportResponses];\n\nexport type FooWowData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no+tag';\n};\n\nexport type FooWowResponses = {\n    /**\n     * OK\n     */\n    default: unknown;\n};\n\nexport type ApiVVersionODataControllerCountData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple/$count';\n};\n\nexport type ApiVVersionODataControllerCountResponses = {\n    /**\n     * Success\n     */\n    200: ModelFromZendesk;\n};\n\nexport type ApiVVersionODataControllerCountResponse = ApiVVersionODataControllerCountResponses[keyof ApiVVersionODataControllerCountResponses];\n\nexport type GetApiVbyApiVersionSimpleOperationData = {\n    body?: never;\n    path: {\n        /**\n         * foo in method\n         */\n        foo_param: string;\n    };\n    query?: never;\n    url: '/api/v{api-version}/simple:operation';\n};\n\nexport type GetApiVbyApiVersionSimpleOperationErrors = {\n    /**\n     * Default error response\n     */\n    default: ModelWithBoolean;\n};\n\nexport type GetApiVbyApiVersionSimpleOperationError = GetApiVbyApiVersionSimpleOperationErrors[keyof GetApiVbyApiVersionSimpleOperationErrors];\n\nexport type GetApiVbyApiVersionSimpleOperationResponses = {\n    /**\n     * Response is a simple number\n     */\n    200: number;\n};\n\nexport type GetApiVbyApiVersionSimpleOperationResponse = GetApiVbyApiVersionSimpleOperationResponses[keyof GetApiVbyApiVersionSimpleOperationResponses];\n\nexport type DeleteCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type GetCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type HeadCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type OptionsCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type PatchCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type PostCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type PutCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type DeleteFooData3 = {\n    body?: never;\n    headers: {\n        /**\n         * Parameter with illegal characters\n         */\n        'x-Foo-Bar': ModelWithString;\n    };\n    path: {\n        /**\n         * foo in method\n         */\n        foo_param: string;\n        /**\n         * bar in method\n         */\n        BarParam: string;\n    };\n    query?: never;\n    url: '/api/v{api-version}/foo/{foo_param}/bar/{BarParam}';\n};\n\nexport type CallWithDescriptionsData = {\n    body?: never;\n    path?: never;\n    query?: {\n        /**\n         * Testing multiline comments in string: First line\n         * Second line\n         *\n         * Fourth line\n         */\n        parameterWithBreaks?: string;\n        /**\n         * Testing backticks in string: `backticks` and ```multiple backticks``` should work\n         */\n        parameterWithBackticks?: string;\n        /**\n         * Testing slashes in string: \\backwards\\\\\\ and /forwards/// should work\n         */\n        parameterWithSlashes?: string;\n        /**\n         * Testing expression placeholders in string: ${expression} should work\n         */\n        parameterWithExpressionPlaceholders?: string;\n        /**\n         * Testing quotes in string: 'single quote''' and \"double quotes\"\"\" should work\n         */\n        parameterWithQuotes?: string;\n        /**\n         * Testing reserved characters in string: * inline * and ** inline ** should work\n         */\n        parameterWithReservedCharacters?: string;\n    };\n    url: '/api/v{api-version}/descriptions';\n};\n\nexport type DeprecatedCallData = {\n    body?: never;\n    headers: {\n        /**\n         * This parameter is deprecated\n         *\n         * @deprecated\n         */\n        parameter: DeprecatedModel | null;\n    };\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/parameters/deprecated';\n};\n\nexport type CallWithParametersData = {\n    /**\n     * This is the parameter that goes into the body\n     */\n    body: {\n        [key: string]: unknown;\n    } | null;\n    headers: {\n        /**\n         * This is the parameter that goes into the header\n         */\n        parameterHeader: string | null;\n    };\n    path: {\n        /**\n         * This is the parameter that goes into the path\n         */\n        parameterPath: string | null;\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string | null;\n    };\n    query: {\n        foo_ref_enum?: ModelWithNestedArrayEnumsDataFoo;\n        foo_all_of_enum: ModelWithNestedArrayEnumsDataFoo;\n        /**\n         * This is the parameter that goes into the query params\n         */\n        cursor: string | null;\n    };\n    url: '/api/v{api-version}/parameters/{parameterPath}';\n};\n\nexport type CallWithWeirdParameterNamesData = {\n    /**\n     * This is the parameter that goes into the body\n     */\n    body: ModelWithString | null;\n    headers: {\n        /**\n         * This is the parameter that goes into the request header\n         */\n        'parameter.header': string | null;\n    };\n    path: {\n        /**\n         * This is the parameter that goes into the path\n         */\n        'parameter.path.1'?: string;\n        /**\n         * This is the parameter that goes into the path\n         */\n        'parameter-path-2'?: string;\n        /**\n         * This is the parameter that goes into the path\n         */\n        'PARAMETER-PATH-3'?: string;\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string | null;\n    };\n    query: {\n        /**\n         * This is the parameter with a reserved keyword\n         */\n        default?: string;\n        /**\n         * This is the parameter that goes into the request query params\n         */\n        'parameter-query': string | null;\n    };\n    url: '/api/v{api-version}/parameters/{parameter.path.1}/{parameter-path-2}/{PARAMETER-PATH-3}';\n};\n\nexport type GetCallWithOptionalParamData = {\n    /**\n     * This is a required parameter\n     */\n    body: ModelWithOneOfEnum;\n    path?: never;\n    query?: {\n        /**\n         * This is an optional parameter\n         */\n        page?: number;\n    };\n    url: '/api/v{api-version}/parameters';\n};\n\nexport type PostCallWithOptionalParamData = {\n    /**\n     * This is an optional parameter\n     */\n    body?: {\n        offset?: number | null;\n    };\n    path?: never;\n    query: {\n        /**\n         * This is a required parameter\n         */\n        parameter: Pageable;\n    };\n    url: '/api/v{api-version}/parameters';\n};\n\nexport type PostCallWithOptionalParamResponses = {\n    /**\n     * Response is a simple number\n     */\n    200: number;\n    /**\n     * Success\n     */\n    204: void;\n};\n\nexport type PostCallWithOptionalParamResponse = PostCallWithOptionalParamResponses[keyof PostCallWithOptionalParamResponses];\n\nexport type PostApiVbyApiVersionRequestBodyData = {\n    /**\n     * A reusable request body\n     */\n    body?: SimpleRequestBody;\n    path?: never;\n    query?: {\n        /**\n         * This is a reusable parameter\n         */\n        parameter?: string;\n    };\n    url: '/api/v{api-version}/requestBody';\n};\n\nexport type PostApiVbyApiVersionFormDataData = {\n    /**\n     * A reusable request body\n     */\n    body?: SimpleFormData;\n    path?: never;\n    query?: {\n        /**\n         * This is a reusable parameter\n         */\n        parameter?: string;\n    };\n    url: '/api/v{api-version}/formData';\n};\n\nexport type CallWithDefaultParametersData = {\n    body?: never;\n    path?: never;\n    query?: {\n        /**\n         * This is a simple string with default value\n         */\n        parameterString?: string | null;\n        /**\n         * This is a simple number with default value\n         */\n        parameterNumber?: number | null;\n        /**\n         * This is a simple boolean with default value\n         */\n        parameterBoolean?: boolean | null;\n        /**\n         * This is a simple enum with default value\n         */\n        parameterEnum?: 'Success' | 'Warning' | 'Error';\n        /**\n         * This is a simple model with default value\n         */\n        parameterModel?: ModelWithString | null;\n    };\n    url: '/api/v{api-version}/defaults';\n};\n\nexport type CallWithDefaultOptionalParametersData = {\n    body?: never;\n    path?: never;\n    query?: {\n        /**\n         * This is a simple string that is optional with default value\n         */\n        parameterString?: string;\n        /**\n         * This is a simple number that is optional with default value\n         */\n        parameterNumber?: number;\n        /**\n         * This is a simple boolean that is optional with default value\n         */\n        parameterBoolean?: boolean;\n        /**\n         * This is a simple enum that is optional with default value\n         */\n        parameterEnum?: 'Success' | 'Warning' | 'Error';\n        /**\n         * This is a simple model that is optional with default value\n         */\n        parameterModel?: ModelWithString;\n    };\n    url: '/api/v{api-version}/defaults';\n};\n\nexport type CallToTestOrderOfParamsData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * This is a optional string with default\n         */\n        parameterOptionalStringWithDefault?: string;\n        /**\n         * This is a optional string with empty default\n         */\n        parameterOptionalStringWithEmptyDefault?: string;\n        /**\n         * This is a optional string with no default\n         */\n        parameterOptionalStringWithNoDefault?: string;\n        /**\n         * This is a string with default\n         */\n        parameterStringWithDefault: string;\n        /**\n         * This is a string with empty default\n         */\n        parameterStringWithEmptyDefault: string;\n        /**\n         * This is a string with no default\n         */\n        parameterStringWithNoDefault: string;\n        /**\n         * This is a string that can be null with no default\n         */\n        parameterStringNullableWithNoDefault?: string | null;\n        /**\n         * This is a string that can be null with default\n         */\n        parameterStringNullableWithDefault?: string | null;\n    };\n    url: '/api/v{api-version}/defaults';\n};\n\nexport type DuplicateNameData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/duplicate';\n};\n\nexport type DuplicateName2Data = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/duplicate';\n};\n\nexport type DuplicateName3Data = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/duplicate';\n};\n\nexport type DuplicateName4Data = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/duplicate';\n};\n\nexport type CallWithNoContentResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no-content';\n};\n\nexport type CallWithNoContentResponseResponses = {\n    /**\n     * Success\n     */\n    204: void;\n};\n\nexport type CallWithNoContentResponseResponse = CallWithNoContentResponseResponses[keyof CallWithNoContentResponseResponses];\n\nexport type CallWithResponseAndNoContentResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multiple-tags/response-and-no-content';\n};\n\nexport type CallWithResponseAndNoContentResponseResponses = {\n    /**\n     * Response is a simple number\n     */\n    200: number;\n    /**\n     * Success\n     */\n    204: void;\n};\n\nexport type CallWithResponseAndNoContentResponseResponse = CallWithResponseAndNoContentResponseResponses[keyof CallWithResponseAndNoContentResponseResponses];\n\nexport type DummyAData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multiple-tags/a';\n};\n\nexport type DummyAResponses = {\n    200: _400;\n};\n\nexport type DummyAResponse = DummyAResponses[keyof DummyAResponses];\n\nexport type DummyBData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multiple-tags/b';\n};\n\nexport type DummyBResponses = {\n    /**\n     * Success\n     */\n    204: void;\n};\n\nexport type DummyBResponse = DummyBResponses[keyof DummyBResponses];\n\nexport type CallWithResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/response';\n};\n\nexport type CallWithResponseResponses = {\n    default: Import;\n};\n\nexport type CallWithResponseResponse = CallWithResponseResponses[keyof CallWithResponseResponses];\n\nexport type CallWithDuplicateResponsesData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/response';\n};\n\nexport type CallWithDuplicateResponsesErrors = {\n    /**\n     * Message for 500 error\n     */\n    500: ModelWithStringError;\n    /**\n     * Message for 501 error\n     */\n    501: ModelWithStringError;\n    /**\n     * Message for 502 error\n     */\n    502: ModelWithStringError;\n    /**\n     * Message for 4XX errors\n     */\n    '4XX': DictionaryWithArray;\n    /**\n     * Default error response\n     */\n    default: ModelWithBoolean;\n};\n\nexport type CallWithDuplicateResponsesError = CallWithDuplicateResponsesErrors[keyof CallWithDuplicateResponsesErrors];\n\nexport type CallWithDuplicateResponsesResponses = {\n    /**\n     * Message for 200 response\n     */\n    200: ModelWithBoolean & ModelWithInteger;\n    /**\n     * Message for 201 response\n     */\n    201: ModelWithString;\n    /**\n     * Message for 202 response\n     */\n    202: ModelWithString;\n};\n\nexport type CallWithDuplicateResponsesResponse = CallWithDuplicateResponsesResponses[keyof CallWithDuplicateResponsesResponses];\n\nexport type CallWithResponsesData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/response';\n};\n\nexport type CallWithResponsesErrors = {\n    /**\n     * Message for 500 error\n     */\n    500: ModelWithStringError;\n    /**\n     * Message for 501 error\n     */\n    501: ModelWithStringError;\n    /**\n     * Message for 502 error\n     */\n    502: ModelWithStringError;\n    /**\n     * Message for default response\n     */\n    default: ModelWithStringError;\n};\n\nexport type CallWithResponsesError = CallWithResponsesErrors[keyof CallWithResponsesErrors];\n\nexport type CallWithResponsesResponses = {\n    /**\n     * Message for 200 response\n     */\n    200: {\n        readonly '@namespace.string'?: string;\n        readonly '@namespace.integer'?: number;\n        readonly value?: Array<ModelWithString>;\n    };\n    /**\n     * Message for 201 response\n     */\n    201: ModelThatExtends;\n    /**\n     * Message for 202 response\n     */\n    202: ModelThatExtendsExtends;\n};\n\nexport type CallWithResponsesResponse = CallWithResponsesResponses[keyof CallWithResponsesResponses];\n\nexport type CollectionFormatData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * This is an array parameter that is sent as csv format (comma-separated values)\n         */\n        parameterArrayCSV: Array<string> | null;\n        /**\n         * This is an array parameter that is sent as ssv format (space-separated values)\n         */\n        parameterArraySSV: Array<string> | null;\n        /**\n         * This is an array parameter that is sent as tsv format (tab-separated values)\n         */\n        parameterArrayTSV: Array<string> | null;\n        /**\n         * This is an array parameter that is sent as pipes format (pipe-separated values)\n         */\n        parameterArrayPipes: Array<string> | null;\n        /**\n         * This is an array parameter that is sent as multi format (multiple parameter instances)\n         */\n        parameterArrayMulti: Array<string> | null;\n    };\n    url: '/api/v{api-version}/collectionFormat';\n};\n\nexport type TypesData = {\n    body?: never;\n    path?: {\n        /**\n         * This is a number parameter\n         */\n        id?: number;\n    };\n    query: {\n        /**\n         * This is a number parameter\n         */\n        parameterNumber: number;\n        /**\n         * This is a string parameter\n         */\n        parameterString: string | null;\n        /**\n         * This is a boolean parameter\n         */\n        parameterBoolean: boolean | null;\n        /**\n         * This is an object parameter\n         */\n        parameterObject: {\n            [key: string]: unknown;\n        } | null;\n        /**\n         * This is an array parameter\n         */\n        parameterArray: Array<string> | null;\n        /**\n         * This is a dictionary parameter\n         */\n        parameterDictionary: {\n            [key: string]: unknown;\n        } | null;\n        /**\n         * This is an enum parameter\n         */\n        parameterEnum: 'Success' | 'Warning' | 'Error';\n    };\n    url: '/api/v{api-version}/types';\n};\n\nexport type TypesResponses = {\n    /**\n     * Response is a simple number\n     */\n    200: number;\n    /**\n     * Response is a simple string\n     */\n    201: string;\n    /**\n     * Response is a simple boolean\n     */\n    202: boolean;\n    /**\n     * Response is a simple object\n     */\n    203: {\n        [key: string]: unknown;\n    };\n};\n\nexport type TypesResponse = TypesResponses[keyof TypesResponses];\n\nexport type UploadFileData = {\n    body: Blob | File;\n    path: {\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string | null;\n    };\n    query?: never;\n    url: '/api/v{api-version}/upload';\n};\n\nexport type UploadFileResponses = {\n    200: boolean;\n};\n\nexport type UploadFileResponse = UploadFileResponses[keyof UploadFileResponses];\n\nexport type FileResponseData = {\n    body?: never;\n    path: {\n        id: string;\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string;\n    };\n    query?: never;\n    url: '/api/v{api-version}/file/{id}';\n};\n\nexport type FileResponseResponses = {\n    /**\n     * Success\n     */\n    200: Blob | File;\n};\n\nexport type FileResponseResponse = FileResponseResponses[keyof FileResponseResponses];\n\nexport type ComplexTypesData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * Parameter containing object\n         */\n        parameterObject: {\n            first?: {\n                second?: {\n                    third?: string;\n                };\n            };\n        };\n        /**\n         * Parameter containing reference\n         */\n        parameterReference: ModelWithString;\n    };\n    url: '/api/v{api-version}/complex';\n};\n\nexport type ComplexTypesErrors = {\n    /**\n     * 400 `server` error\n     */\n    400: unknown;\n    /**\n     * 500 server error\n     */\n    500: unknown;\n};\n\nexport type ComplexTypesResponses = {\n    /**\n     * Successful response\n     */\n    200: Array<ModelWithString>;\n};\n\nexport type ComplexTypesResponse = ComplexTypesResponses[keyof ComplexTypesResponses];\n\nexport type MultipartResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multipart';\n};\n\nexport type MultipartResponseResponses = {\n    /**\n     * OK\n     */\n    200: {\n        file?: Blob | File;\n        metadata?: {\n            foo?: string;\n            bar?: string;\n        };\n    };\n};\n\nexport type MultipartResponseResponse = MultipartResponseResponses[keyof MultipartResponseResponses];\n\nexport type MultipartRequestData = {\n    body?: {\n        content?: Blob | File;\n        data?: ModelWithString | null;\n    };\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multipart';\n};\n\nexport type ComplexParamsData = {\n    body?: {\n        readonly key: string | null;\n        name: string | null;\n        enabled?: boolean;\n        type: 'Monkey' | 'Horse' | 'Bird';\n        listOfModels?: Array<ModelWithString> | null;\n        listOfStrings?: Array<string> | null;\n        parameters: ModelWithString | ModelWithEnum | ModelWithArray | ModelWithDictionary;\n        readonly user?: {\n            readonly id?: number;\n            readonly name?: string | null;\n        };\n    };\n    path: {\n        id: number;\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string;\n    };\n    query?: never;\n    url: '/api/v{api-version}/complex/{id}';\n};\n\nexport type ComplexParamsResponses = {\n    /**\n     * Success\n     */\n    200: ModelWithString;\n};\n\nexport type ComplexParamsResponse = ComplexParamsResponses[keyof ComplexParamsResponses];\n\nexport type CallWithResultFromHeaderData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/header';\n};\n\nexport type CallWithResultFromHeaderErrors = {\n    /**\n     * 400 server error\n     */\n    400: unknown;\n    /**\n     * 500 server error\n     */\n    500: unknown;\n};\n\nexport type CallWithResultFromHeaderResponses = {\n    /**\n     * Successful response\n     */\n    200: unknown;\n};\n\nexport type TestErrorCodeData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * Status code to return\n         */\n        status: number;\n    };\n    url: '/api/v{api-version}/error';\n};\n\nexport type TestErrorCodeErrors = {\n    /**\n     * Custom message: Internal Server Error\n     */\n    500: unknown;\n    /**\n     * Custom message: Not Implemented\n     */\n    501: unknown;\n    /**\n     * Custom message: Bad Gateway\n     */\n    502: unknown;\n    /**\n     * Custom message: Service Unavailable\n     */\n    503: unknown;\n};\n\nexport type TestErrorCodeResponses = {\n    /**\n     * Custom message: Successful response\n     */\n    200: unknown;\n};\n\nexport type NonAsciiæøåÆøÅöôêÊ字符串Data = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * Dummy input param\n         */\n        nonAsciiParamæøåÆØÅöôêÊ: number;\n    };\n    url: '/api/v{api-version}/non-ascii-æøåÆØÅöôêÊ字符串';\n};\n\nexport type NonAsciiæøåÆøÅöôêÊ字符串Responses = {\n    /**\n     * Successful response\n     */\n    200: Array<NonAsciiStringæøåÆøÅöôêÊ字符串>;\n};\n\nexport type NonAsciiæøåÆøÅöôêÊ字符串Response = NonAsciiæøåÆøÅöôêÊ字符串Responses[keyof NonAsciiæøåÆøÅöôêÊ字符串Responses];\n\nexport type PutWithFormUrlEncodedData = {\n    body: ArrayWithStrings;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/non-ascii-æøåÆØÅöôêÊ字符串';\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/react-query/name-builder/@tanstack/react-query.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport { type DefaultError, queryOptions, type UseMutationOptions } from '@tanstack/react-query';\n\nimport { client } from '../client.gen';\nimport { fooBarPost, fooBarPut, fooPost, fooPut, getFoo, getFooBar, type Options } from '../sdk.gen';\nimport type { FooBarPostData, FooBarPostResponse, FooBarPutData, FooBarPutResponse, FooPostData, FooPostResponse, FooPutData, FooPutResponse, GetFooBarData, GetFooBarResponse, GetFooData, GetFooResponse } from '../types.gen';\n\nexport type QueryKey<TOptions extends Options> = [\n    Pick<TOptions, 'baseUrl' | 'body' | 'headers' | 'path' | 'query'> & {\n        _id: string;\n        _infinite?: boolean;\n        tags?: ReadonlyArray<string>;\n    }\n];\n\nconst createQueryKey = <TOptions extends Options>(id: string, options?: TOptions, infinite?: boolean, tags?: ReadonlyArray<string>): [\n    QueryKey<TOptions>[0]\n] => {\n    const params: QueryKey<TOptions>[0] = { _id: id, baseUrl: options?.baseUrl || (options?.client ?? client).getConfig().baseUrl } as QueryKey<TOptions>[0];\n    if (infinite) {\n        params._infinite = infinite;\n    }\n    if (tags) {\n        params.tags = tags;\n    }\n    if (options?.body) {\n        params.body = options.body;\n    }\n    if (options?.headers) {\n        params.headers = options.headers;\n    }\n    if (options?.path) {\n        params.path = options.path;\n    }\n    if (options?.query) {\n        params.query = options.query;\n    }\n    return [params];\n};\n\nexport const getFooD = (options?: Options<GetFooData>) => createQueryKey('getFoo', options);\n\nexport const getFooE = (options?: Options<GetFooData>) => queryOptions<GetFooResponse, DefaultError, GetFooResponse, ReturnType<typeof getFooD>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await getFoo({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: getFooD(options)\n});\n\nexport const fooPostC = (options?: Partial<Options<FooPostData>>): UseMutationOptions<FooPostResponse, DefaultError, Options<FooPostData>> => {\n    const mutationOptions: UseMutationOptions<FooPostResponse, DefaultError, Options<FooPostData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await fooPost({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const fooPutC = (options?: Partial<Options<FooPutData>>): UseMutationOptions<FooPutResponse, DefaultError, Options<FooPutData>> => {\n    const mutationOptions: UseMutationOptions<FooPutResponse, DefaultError, Options<FooPutData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await fooPut({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const getFooBarD = (options?: Options<GetFooBarData>) => createQueryKey('getFooBar', options);\n\nexport const getFooBarE = (options?: Options<GetFooBarData>) => queryOptions<GetFooBarResponse, DefaultError, GetFooBarResponse, ReturnType<typeof getFooBarD>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await getFooBar({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: getFooBarD(options)\n});\n\nexport const fooBarPostC = (options?: Partial<Options<FooBarPostData>>): UseMutationOptions<FooBarPostResponse, DefaultError, Options<FooBarPostData>> => {\n    const mutationOptions: UseMutationOptions<FooBarPostResponse, DefaultError, Options<FooBarPostData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await fooBarPost({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const fooBarPutC = (options?: Partial<Options<FooBarPutData>>): UseMutationOptions<FooBarPutResponse, DefaultError, Options<FooBarPutData>> => {\n    const mutationOptions: UseMutationOptions<FooBarPutResponse, DefaultError, Options<FooBarPutData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await fooBarPut({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/react-query/name-builder/client/client.gen.ts",
    "content": "// 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 (options: RequestOptions) => {\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 url = buildUrl(opts);\n\n    return { opts, url };\n  };\n\n  const request: Client['request'] = async (options) => {\n    // @ts-expect-error\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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/react-query/name-builder/client/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type { Auth } from '../core/auth.gen';\nexport type { QuerySerializerOptions } from '../core/bodySerializer.gen';\nexport {\n  formDataBodySerializer,\n  jsonBodySerializer,\n  urlSearchParamsBodySerializer,\n} from '../core/bodySerializer.gen';\nexport { buildClientParams } from '../core/params.gen';\nexport { serializeQueryKeyValue } from '../core/queryKeySerializer.gen';\nexport { createClient } from './client.gen';\nexport type {\n  Client,\n  ClientOptions,\n  Config,\n  CreateClientConfig,\n  Options,\n  RequestOptions,\n  RequestResult,\n  ResolvedRequestOptions,\n  ResponseStyle,\n  TDataShape,\n} from './types.gen';\nexport { createConfig, mergeHeaders } from './utils.gen';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/react-query/name-builder/client/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { Auth } from '../core/auth.gen';\nimport type {\n  ServerSentEventsOptions,\n  ServerSentEventsResult,\n} from '../core/serverSentEvents.gen';\nimport type { Client as CoreClient, Config as CoreConfig } from '../core/types.gen';\nimport type { Middleware } from './utils.gen';\n\nexport type ResponseStyle = 'data' | 'fields';\n\nexport interface Config<T extends ClientOptions = ClientOptions>\n  extends Omit<RequestInit, 'body' | 'headers' | 'method'>, CoreConfig {\n  /**\n   * Base URL for all requests made by this client.\n   */\n  baseUrl?: T['baseUrl'];\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   * Please don't use the Fetch client for Next.js applications. The `next`\n   * options won't have any effect.\n   *\n   * Install {@link https://www.npmjs.com/package/@hey-api/client-next `@hey-api/client-next`} instead.\n   */\n  next?: never;\n  /**\n   * Return the response data parsed in a specified format. By default, `auto`\n   * will infer the appropriate method from the `Content-Type` response header.\n   * You can override this behavior with any of the {@link Body} methods.\n   * Select `stream` if you don't want to parse response data at all.\n   *\n   * @default 'auto'\n   */\n  parseAs?: 'arrayBuffer' | 'auto' | 'blob' | 'formData' | 'json' | 'stream' | 'text';\n  /**\n   * Should we return only data or multiple fields (data, error, response, etc.)?\n   *\n   * @default 'fields'\n   */\n  responseStyle?: ResponseStyle;\n  /**\n   * Throw an error instead of returning it in the response?\n   *\n   * @default false\n   */\n  throwOnError?: T['throwOnError'];\n}\n\nexport interface RequestOptions<\n  TData = unknown,\n  TResponseStyle extends ResponseStyle = 'fields',\n  ThrowOnError extends boolean = boolean,\n  Url extends string = string,\n>\n  extends\n    Config<{\n      responseStyle: TResponseStyle;\n      throwOnError: ThrowOnError;\n    }>,\n    Pick<\n      ServerSentEventsOptions<TData>,\n      | 'onRequest'\n      | 'onSseError'\n      | 'onSseEvent'\n      | 'sseDefaultRetryDelay'\n      | 'sseMaxRetryAttempts'\n      | 'sseMaxRetryDelay'\n    > {\n  /**\n   * Any body that you want to add to your request.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/fetch#body}\n   */\n  body?: unknown;\n  path?: Record<string, unknown>;\n  query?: Record<string, unknown>;\n  /**\n   * Security mechanism(s) to use for the request.\n   */\n  security?: ReadonlyArray<Auth>;\n  url: Url;\n}\n\nexport interface ResolvedRequestOptions<\n  TResponseStyle extends ResponseStyle = 'fields',\n  ThrowOnError extends boolean = boolean,\n  Url extends string = string,\n> extends RequestOptions<unknown, TResponseStyle, ThrowOnError, Url> {\n  serializedBody?: string;\n}\n\nexport type RequestResult<\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = boolean,\n  TResponseStyle extends ResponseStyle = 'fields',\n> = ThrowOnError extends true\n  ? Promise<\n      TResponseStyle extends 'data'\n        ? TData extends Record<string, unknown>\n          ? TData[keyof TData]\n          : TData\n        : {\n            data: TData extends Record<string, unknown> ? TData[keyof TData] : TData;\n            request: Request;\n            response: Response;\n          }\n    >\n  : Promise<\n      TResponseStyle extends 'data'\n        ? (TData extends Record<string, unknown> ? TData[keyof TData] : TData) | undefined\n        : (\n            | {\n                data: TData extends Record<string, unknown> ? TData[keyof TData] : TData;\n                error: undefined;\n              }\n            | {\n                data: undefined;\n                error: TError extends Record<string, unknown> ? TError[keyof TError] : TError;\n              }\n          ) & {\n            request: Request;\n            response: Response;\n          }\n    >;\n\nexport interface ClientOptions {\n  baseUrl?: string;\n  responseStyle?: ResponseStyle;\n  throwOnError?: boolean;\n}\n\ntype MethodFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'>,\n) => RequestResult<TData, TError, ThrowOnError, TResponseStyle>;\n\ntype SseFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'>,\n) => Promise<ServerSentEventsResult<TData, TError>>;\n\ntype RequestFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'> &\n    Pick<Required<RequestOptions<TData, TResponseStyle, ThrowOnError>>, 'method'>,\n) => RequestResult<TData, TError, ThrowOnError, TResponseStyle>;\n\ntype BuildUrlFn = <\n  TData extends {\n    body?: unknown;\n    path?: Record<string, unknown>;\n    query?: Record<string, unknown>;\n    url: string;\n  },\n>(\n  options: TData & Options<TData>,\n) => string;\n\nexport type Client = CoreClient<RequestFn, Config, MethodFn, BuildUrlFn, SseFn> & {\n  interceptors: Middleware<Request, Response, unknown, ResolvedRequestOptions>;\n};\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 = ClientOptions> = (\n  override?: Config<ClientOptions & T>,\n) => Config<Required<ClientOptions> & T>;\n\nexport interface TDataShape {\n  body?: unknown;\n  headers?: unknown;\n  path?: unknown;\n  query?: unknown;\n  url: string;\n}\n\ntype OmitKeys<T, K> = Pick<T, Exclude<keyof T, K>>;\n\nexport type Options<\n  TData extends TDataShape = TDataShape,\n  ThrowOnError extends boolean = boolean,\n  TResponse = unknown,\n  TResponseStyle extends ResponseStyle = 'fields',\n> = OmitKeys<\n  RequestOptions<TResponse, TResponseStyle, ThrowOnError>,\n  'body' | 'path' | 'query' | 'url'\n> &\n  ([TData] extends [never] ? unknown : Omit<TData, 'url'>);\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/react-query/name-builder/client/utils.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/react-query/name-builder/client.gen.ts",
    "content": "// 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>());\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/react-query/name-builder/core/auth.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/react-query/name-builder/core/bodySerializer.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/react-query/name-builder/core/params.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/react-query/name-builder/core/pathSerializer.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/react-query/name-builder/core/queryKeySerializer.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\n/**\n * JSON-friendly union that mirrors what Pinia Colada can hash.\n */\nexport type JsonValue =\n  | null\n  | string\n  | number\n  | boolean\n  | JsonValue[]\n  | { [key: string]: JsonValue };\n\n/**\n * Replacer that converts non-JSON values (bigint, Date, etc.) to safe substitutes.\n */\nexport const queryKeyJsonReplacer = (_key: string, value: unknown) => {\n  if (value === undefined || typeof value === 'function' || typeof value === 'symbol') {\n    return undefined;\n  }\n  if (typeof value === 'bigint') {\n    return value.toString();\n  }\n  if (value instanceof Date) {\n    return value.toISOString();\n  }\n  return value;\n};\n\n/**\n * Safely stringifies a value and parses it back into a JsonValue.\n */\nexport const stringifyToJsonValue = (input: unknown): JsonValue | undefined => {\n  try {\n    const json = JSON.stringify(input, queryKeyJsonReplacer);\n    if (json === undefined) {\n      return undefined;\n    }\n    return JSON.parse(json) as JsonValue;\n  } catch {\n    return undefined;\n  }\n};\n\n/**\n * Detects plain objects (including objects with a null prototype).\n */\nconst isPlainObject = (value: unknown): value is Record<string, unknown> => {\n  if (value === null || typeof value !== 'object') {\n    return false;\n  }\n  const prototype = Object.getPrototypeOf(value as object);\n  return prototype === Object.prototype || prototype === null;\n};\n\n/**\n * Turns URLSearchParams into a sorted JSON object for deterministic keys.\n */\nconst serializeSearchParams = (params: URLSearchParams): JsonValue => {\n  const entries = Array.from(params.entries()).sort(([a], [b]) => a.localeCompare(b));\n  const result: Record<string, JsonValue> = {};\n\n  for (const [key, value] of entries) {\n    const existing = result[key];\n    if (existing === undefined) {\n      result[key] = value;\n      continue;\n    }\n\n    if (Array.isArray(existing)) {\n      (existing as string[]).push(value);\n    } else {\n      result[key] = [existing, value];\n    }\n  }\n\n  return result;\n};\n\n/**\n * Normalizes any accepted value into a JSON-friendly shape for query keys.\n */\nexport const serializeQueryKeyValue = (value: unknown): JsonValue | undefined => {\n  if (value === null) {\n    return null;\n  }\n\n  if (typeof value === 'string' || typeof value === 'number' || typeof value === 'boolean') {\n    return value;\n  }\n\n  if (value === undefined || typeof value === 'function' || typeof value === 'symbol') {\n    return undefined;\n  }\n\n  if (typeof value === 'bigint') {\n    return value.toString();\n  }\n\n  if (value instanceof Date) {\n    return value.toISOString();\n  }\n\n  if (Array.isArray(value)) {\n    return stringifyToJsonValue(value);\n  }\n\n  if (typeof URLSearchParams !== 'undefined' && value instanceof URLSearchParams) {\n    return serializeSearchParams(value);\n  }\n\n  if (isPlainObject(value)) {\n    return stringifyToJsonValue(value);\n  }\n\n  return undefined;\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/react-query/name-builder/core/serverSentEvents.gen.ts",
    "content": "// 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 const 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            // Normalize line endings: CRLF -> LF, then CR -> LF\n            buffer = buffer.replace(/\\r\\n/g, '\\n').replace(/\\r/g, '\\n');\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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/react-query/name-builder/core/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { Auth, AuthToken } from './auth.gen';\nimport type { BodySerializer, QuerySerializer, QuerySerializerOptions } from './bodySerializer.gen';\n\nexport type HttpMethod =\n  | 'connect'\n  | 'delete'\n  | 'get'\n  | 'head'\n  | 'options'\n  | 'patch'\n  | 'post'\n  | 'put'\n  | 'trace';\n\nexport type Client<\n  RequestFn = never,\n  Config = unknown,\n  MethodFn = never,\n  BuildUrlFn = never,\n  SseFn = never,\n> = {\n  /**\n   * Returns the final request URL.\n   */\n  buildUrl: BuildUrlFn;\n  getConfig: () => Config;\n  request: RequestFn;\n  setConfig: (config: Config) => Config;\n} & {\n  [K in HttpMethod]: MethodFn;\n} & ([SseFn] extends [never] ? { sse?: never } : { sse: { [K in HttpMethod]: SseFn } });\n\nexport interface Config {\n  /**\n   * Auth token or a function returning auth token. The resolved value will be\n   * added to the request payload as defined by its `security` array.\n   */\n  auth?: ((auth: Auth) => Promise<AuthToken> | AuthToken) | AuthToken;\n  /**\n   * A function for serializing request body parameter. By default,\n   * {@link JSON.stringify()} will be used.\n   */\n  bodySerializer?: BodySerializer | null;\n  /**\n   * An object containing any HTTP headers that you want to pre-populate your\n   * `Headers` object with.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/Headers/Headers#init See more}\n   */\n  headers?:\n    | RequestInit['headers']\n    | Record<\n        string,\n        string | number | boolean | (string | number | boolean)[] | null | undefined | unknown\n      >;\n  /**\n   * The request method.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/fetch#method See more}\n   */\n  method?: Uppercase<HttpMethod>;\n  /**\n   * A function for serializing request query parameters. By default, arrays\n   * will be exploded in form style, objects will be exploded in deepObject\n   * style, and reserved characters are percent-encoded.\n   *\n   * This method will have no effect if the native `paramsSerializer()` Axios\n   * API function is used.\n   *\n   * {@link https://swagger.io/docs/specification/serialization/#query View examples}\n   */\n  querySerializer?: QuerySerializer | QuerySerializerOptions;\n  /**\n   * A function validating request data. This is useful if you want to ensure\n   * the request conforms to the desired shape, so it can be safely sent to\n   * the server.\n   */\n  requestValidator?: (data: unknown) => Promise<unknown>;\n  /**\n   * A function transforming response data before it's returned. This is useful\n   * for post-processing data, e.g. converting ISO strings into Date objects.\n   */\n  responseTransformer?: (data: unknown) => Promise<unknown>;\n  /**\n   * A function validating response data. This is useful if you want to ensure\n   * the response conforms to the desired shape, so it can be safely passed to\n   * the transformers and returned to the user.\n   */\n  responseValidator?: (data: unknown) => Promise<unknown>;\n}\n\ntype IsExactlyNeverOrNeverUndefined<T> = [T] extends [never]\n  ? true\n  : [T] extends [never | undefined]\n    ? [undefined] extends [T]\n      ? false\n      : true\n    : false;\n\nexport type OmitNever<T extends Record<string, unknown>> = {\n  [K in keyof T as IsExactlyNeverOrNeverUndefined<T[K]> extends true ? never : K]: T[K];\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/react-query/name-builder/core/utils.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/react-query/name-builder/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport { fooBarPost, fooBarPut, fooPost, fooPut, getFoo, getFooBar, type Options } from './sdk.gen';\nexport type { ClientOptions, FooBarPostData, FooBarPostResponse, FooBarPostResponses, FooBarPutData, FooBarPutResponse, FooBarPutResponses, FooPostData, FooPostResponse, FooPostResponses, FooPutData, FooPutResponse, FooPutResponses, GetFooBarData, GetFooBarResponse, GetFooBarResponses, GetFooData, GetFooResponse, GetFooResponses } from './types.gen';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/react-query/name-builder/sdk.gen.ts",
    "content": "// 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 { FooBarPostData, FooBarPostResponses, FooBarPutData, FooBarPutResponses, FooPostData, FooPostResponses, FooPutData, FooPutResponses, GetFooBarData, GetFooBarResponses, GetFooData, GetFooResponses } from './types.gen';\n\nexport type Options<TData extends TDataShape = TDataShape, ThrowOnError extends boolean = boolean> = Options2<TData, ThrowOnError> & {\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\nexport const getFoo = <ThrowOnError extends boolean = false>(options?: Options<GetFooData, ThrowOnError>) => (options?.client ?? client).get<GetFooResponses, unknown, ThrowOnError>({ url: '/foo', ...options });\n\nexport const fooPost = <ThrowOnError extends boolean = false>(options?: Options<FooPostData, ThrowOnError>) => (options?.client ?? client).post<FooPostResponses, unknown, ThrowOnError>({ url: '/foo', ...options });\n\nexport const fooPut = <ThrowOnError extends boolean = false>(options?: Options<FooPutData, ThrowOnError>) => (options?.client ?? client).put<FooPutResponses, unknown, ThrowOnError>({ url: '/foo', ...options });\n\nexport const getFooBar = <ThrowOnError extends boolean = false>(options?: Options<GetFooBarData, ThrowOnError>) => (options?.client ?? client).get<GetFooBarResponses, unknown, ThrowOnError>({ url: '/foo/bar', ...options });\n\nexport const fooBarPost = <ThrowOnError extends boolean = false>(options?: Options<FooBarPostData, ThrowOnError>) => (options?.client ?? client).post<FooBarPostResponses, unknown, ThrowOnError>({ url: '/foo/bar', ...options });\n\nexport const fooBarPut = <ThrowOnError extends boolean = false>(options?: Options<FooBarPutData, ThrowOnError>) => (options?.client ?? client).put<FooBarPutResponses, unknown, ThrowOnError>({ url: '/foo/bar', ...options });\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/react-query/name-builder/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type ClientOptions = {\n    baseUrl: `${string}://${string}` | (string & {});\n};\n\nexport type GetFooData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/foo';\n};\n\nexport type GetFooResponses = {\n    /**\n     * OK\n     */\n    200: string;\n};\n\nexport type GetFooResponse = GetFooResponses[keyof GetFooResponses];\n\nexport type FooPostData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/foo';\n};\n\nexport type FooPostResponses = {\n    /**\n     * OK\n     */\n    200: string;\n};\n\nexport type FooPostResponse = FooPostResponses[keyof FooPostResponses];\n\nexport type FooPutData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/foo';\n};\n\nexport type FooPutResponses = {\n    /**\n     * OK\n     */\n    200: string;\n};\n\nexport type FooPutResponse = FooPutResponses[keyof FooPutResponses];\n\nexport type GetFooBarData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/foo/bar';\n};\n\nexport type GetFooBarResponses = {\n    /**\n     * OK\n     */\n    200: string;\n};\n\nexport type GetFooBarResponse = GetFooBarResponses[keyof GetFooBarResponses];\n\nexport type FooBarPostData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/foo/bar';\n};\n\nexport type FooBarPostResponses = {\n    /**\n     * OK\n     */\n    200: string;\n};\n\nexport type FooBarPostResponse = FooBarPostResponses[keyof FooBarPostResponses];\n\nexport type FooBarPutData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/foo/bar';\n};\n\nexport type FooBarPutResponses = {\n    /**\n     * OK\n     */\n    200: string;\n};\n\nexport type FooBarPutResponse = FooBarPutResponses[keyof FooBarPutResponses];\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/react-query/useMutation/@tanstack/react-query.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport { type DefaultError, type InfiniteData, infiniteQueryOptions, queryOptions, useMutation, type UseMutationOptions } from '@tanstack/react-query';\n\nimport { client } from '../client.gen';\nimport { apiVVersionODataControllerCount, callToTestOrderOfParams, callWithDefaultOptionalParameters, callWithDefaultParameters, callWithDescriptions, callWithDuplicateResponses, callWithNoContentResponse, callWithParameters, callWithResponse, callWithResponseAndNoContentResponse, callWithResponses, callWithResultFromHeader, callWithWeirdParameterNames, collectionFormat, complexParams, complexTypes, deleteCallWithoutParametersAndResponse, deleteFoo, deprecatedCall, dummyA, dummyB, duplicateName, duplicateName2, duplicateName3, duplicateName4, export_, fileResponse, fooWow, getApiVbyApiVersionSimpleOperation, getCallWithOptionalParam, getCallWithoutParametersAndResponse, import_, multipartRequest, multipartResponse, nonAsciiæøåÆøÅöôêÊ字符串, type Options, patchApiVbyApiVersionNoTag, patchCallWithoutParametersAndResponse, postApiVbyApiVersionFormData, postApiVbyApiVersionRequestBody, postCallWithOptionalParam, postCallWithoutParametersAndResponse, putCallWithoutParametersAndResponse, putWithFormUrlEncoded, testErrorCode, types, uploadFile } from '../sdk.gen';\nimport type { ApiVVersionODataControllerCountData, ApiVVersionODataControllerCountResponse, CallToTestOrderOfParamsData, CallWithDefaultOptionalParametersData, CallWithDefaultParametersData, CallWithDescriptionsData, CallWithDuplicateResponsesData, CallWithDuplicateResponsesError, CallWithDuplicateResponsesResponse, CallWithNoContentResponseData, CallWithNoContentResponseResponse, CallWithParametersData, CallWithResponseAndNoContentResponseData, CallWithResponseAndNoContentResponseResponse, CallWithResponseData, CallWithResponseResponse, CallWithResponsesData, CallWithResponsesError, CallWithResponsesResponse, CallWithResultFromHeaderData, CallWithWeirdParameterNamesData, CollectionFormatData, ComplexParamsData, ComplexParamsResponse, ComplexTypesData, ComplexTypesResponse, DeleteCallWithoutParametersAndResponseData, DeleteFooData3, DeprecatedCallData, DummyAData, DummyAResponse, DummyBData, DummyBResponse, DuplicateName2Data, DuplicateName3Data, DuplicateName4Data, DuplicateNameData, ExportData, FileResponseData, FileResponseResponse, FooWowData, GetApiVbyApiVersionSimpleOperationData, GetApiVbyApiVersionSimpleOperationError, GetApiVbyApiVersionSimpleOperationResponse, GetCallWithOptionalParamData, GetCallWithoutParametersAndResponseData, ImportData, ImportResponse, MultipartRequestData, MultipartResponseData, MultipartResponseResponse, NonAsciiæøåÆøÅöôêÊ字符串Data, NonAsciiæøåÆøÅöôêÊ字符串Response, PatchApiVbyApiVersionNoTagData, PatchCallWithoutParametersAndResponseData, PostApiVbyApiVersionFormDataData, PostApiVbyApiVersionRequestBodyData, PostCallWithOptionalParamData, PostCallWithOptionalParamResponse, PostCallWithoutParametersAndResponseData, PutCallWithoutParametersAndResponseData, PutWithFormUrlEncodedData, TestErrorCodeData, TypesData, TypesResponse, UploadFileData, UploadFileResponse } from '../types.gen';\n\nexport type QueryKey<TOptions extends Options> = [\n    Pick<TOptions, 'baseUrl' | 'body' | 'headers' | 'path' | 'query'> & {\n        _id: string;\n        _infinite?: boolean;\n        tags?: ReadonlyArray<string>;\n    }\n];\n\nconst createQueryKey = <TOptions extends Options>(id: string, options?: TOptions, infinite?: boolean, tags?: ReadonlyArray<string>): [\n    QueryKey<TOptions>[0]\n] => {\n    const params: QueryKey<TOptions>[0] = { _id: id, baseUrl: options?.baseUrl || (options?.client ?? client).getConfig().baseUrl } as QueryKey<TOptions>[0];\n    if (infinite) {\n        params._infinite = infinite;\n    }\n    if (tags) {\n        params.tags = tags;\n    }\n    if (options?.body) {\n        params.body = options.body;\n    }\n    if (options?.headers) {\n        params.headers = options.headers;\n    }\n    if (options?.path) {\n        params.path = options.path;\n    }\n    if (options?.query) {\n        params.query = options.query;\n    }\n    return [params];\n};\n\nexport const exportQueryKey = (options?: Options<ExportData>) => createQueryKey('export', options);\n\nexport const exportOptions = (options?: Options<ExportData>) => queryOptions<unknown, DefaultError, unknown, ReturnType<typeof exportQueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await export_({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: exportQueryKey(options)\n});\n\nexport const patchApiVbyApiVersionNoTagMutation = (options?: Partial<Options<PatchApiVbyApiVersionNoTagData>>): UseMutationOptions<unknown, DefaultError, Options<PatchApiVbyApiVersionNoTagData>> => {\n    const mutationOptions: UseMutationOptions<unknown, DefaultError, Options<PatchApiVbyApiVersionNoTagData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await patchApiVbyApiVersionNoTag({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const usePatchApiVbyApiVersionNoTagMutation = (mutationOptions?: Partial<Omit<UseMutationOptions<unknown, DefaultError, Options<PatchApiVbyApiVersionNoTagData>>, 'mutationFn'>>) => useMutation({ ...patchApiVbyApiVersionNoTagMutation(), ...mutationOptions });\n\nexport const importMutation = (options?: Partial<Options<ImportData>>): UseMutationOptions<ImportResponse, DefaultError, Options<ImportData>> => {\n    const mutationOptions: UseMutationOptions<ImportResponse, DefaultError, Options<ImportData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await import_({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const useImportMutation = (mutationOptions?: Partial<Omit<UseMutationOptions<ImportResponse, DefaultError, Options<ImportData>>, 'mutationFn'>>) => useMutation({ ...importMutation(), ...mutationOptions });\n\nexport const fooWowMutation = (options?: Partial<Options<FooWowData>>): UseMutationOptions<unknown, DefaultError, Options<FooWowData>> => {\n    const mutationOptions: UseMutationOptions<unknown, DefaultError, Options<FooWowData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await fooWow({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const useFooWowMutation = (mutationOptions?: Partial<Omit<UseMutationOptions<unknown, DefaultError, Options<FooWowData>>, 'mutationFn'>>) => useMutation({ ...fooWowMutation(), ...mutationOptions });\n\nexport const apiVVersionODataControllerCountQueryKey = (options?: Options<ApiVVersionODataControllerCountData>) => createQueryKey('apiVVersionODataControllerCount', options);\n\nexport const apiVVersionODataControllerCountOptions = (options?: Options<ApiVVersionODataControllerCountData>) => queryOptions<ApiVVersionODataControllerCountResponse, DefaultError, ApiVVersionODataControllerCountResponse, ReturnType<typeof apiVVersionODataControllerCountQueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await apiVVersionODataControllerCount({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: apiVVersionODataControllerCountQueryKey(options)\n});\n\nexport const getApiVbyApiVersionSimpleOperationQueryKey = (options: Options<GetApiVbyApiVersionSimpleOperationData>) => createQueryKey('getApiVbyApiVersionSimpleOperation', options);\n\nexport const getApiVbyApiVersionSimpleOperationOptions = (options: Options<GetApiVbyApiVersionSimpleOperationData>) => queryOptions<GetApiVbyApiVersionSimpleOperationResponse, GetApiVbyApiVersionSimpleOperationError, GetApiVbyApiVersionSimpleOperationResponse, ReturnType<typeof getApiVbyApiVersionSimpleOperationQueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await getApiVbyApiVersionSimpleOperation({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: getApiVbyApiVersionSimpleOperationQueryKey(options)\n});\n\nexport const deleteCallWithoutParametersAndResponseMutation = (options?: Partial<Options<DeleteCallWithoutParametersAndResponseData>>): UseMutationOptions<unknown, DefaultError, Options<DeleteCallWithoutParametersAndResponseData>> => {\n    const mutationOptions: UseMutationOptions<unknown, DefaultError, Options<DeleteCallWithoutParametersAndResponseData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await deleteCallWithoutParametersAndResponse({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const useDeleteCallWithoutParametersAndResponseMutation = (mutationOptions?: Partial<Omit<UseMutationOptions<unknown, DefaultError, Options<DeleteCallWithoutParametersAndResponseData>>, 'mutationFn'>>) => useMutation({ ...deleteCallWithoutParametersAndResponseMutation(), ...mutationOptions });\n\nexport const getCallWithoutParametersAndResponseQueryKey = (options?: Options<GetCallWithoutParametersAndResponseData>) => createQueryKey('getCallWithoutParametersAndResponse', options);\n\nexport const getCallWithoutParametersAndResponseOptions = (options?: Options<GetCallWithoutParametersAndResponseData>) => queryOptions<unknown, DefaultError, unknown, ReturnType<typeof getCallWithoutParametersAndResponseQueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await getCallWithoutParametersAndResponse({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: getCallWithoutParametersAndResponseQueryKey(options)\n});\n\nexport const patchCallWithoutParametersAndResponseMutation = (options?: Partial<Options<PatchCallWithoutParametersAndResponseData>>): UseMutationOptions<unknown, DefaultError, Options<PatchCallWithoutParametersAndResponseData>> => {\n    const mutationOptions: UseMutationOptions<unknown, DefaultError, Options<PatchCallWithoutParametersAndResponseData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await patchCallWithoutParametersAndResponse({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const usePatchCallWithoutParametersAndResponseMutation = (mutationOptions?: Partial<Omit<UseMutationOptions<unknown, DefaultError, Options<PatchCallWithoutParametersAndResponseData>>, 'mutationFn'>>) => useMutation({ ...patchCallWithoutParametersAndResponseMutation(), ...mutationOptions });\n\nexport const postCallWithoutParametersAndResponseMutation = (options?: Partial<Options<PostCallWithoutParametersAndResponseData>>): UseMutationOptions<unknown, DefaultError, Options<PostCallWithoutParametersAndResponseData>> => {\n    const mutationOptions: UseMutationOptions<unknown, DefaultError, Options<PostCallWithoutParametersAndResponseData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await postCallWithoutParametersAndResponse({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const usePostCallWithoutParametersAndResponseMutation = (mutationOptions?: Partial<Omit<UseMutationOptions<unknown, DefaultError, Options<PostCallWithoutParametersAndResponseData>>, 'mutationFn'>>) => useMutation({ ...postCallWithoutParametersAndResponseMutation(), ...mutationOptions });\n\nexport const putCallWithoutParametersAndResponseMutation = (options?: Partial<Options<PutCallWithoutParametersAndResponseData>>): UseMutationOptions<unknown, DefaultError, Options<PutCallWithoutParametersAndResponseData>> => {\n    const mutationOptions: UseMutationOptions<unknown, DefaultError, Options<PutCallWithoutParametersAndResponseData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await putCallWithoutParametersAndResponse({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const usePutCallWithoutParametersAndResponseMutation = (mutationOptions?: Partial<Omit<UseMutationOptions<unknown, DefaultError, Options<PutCallWithoutParametersAndResponseData>>, 'mutationFn'>>) => useMutation({ ...putCallWithoutParametersAndResponseMutation(), ...mutationOptions });\n\nexport const deleteFooMutation = (options?: Partial<Options<DeleteFooData3>>): UseMutationOptions<unknown, DefaultError, Options<DeleteFooData3>> => {\n    const mutationOptions: UseMutationOptions<unknown, DefaultError, Options<DeleteFooData3>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await deleteFoo({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const useDeleteFooMutation = (mutationOptions?: Partial<Omit<UseMutationOptions<unknown, DefaultError, Options<DeleteFooData3>>, 'mutationFn'>>) => useMutation({ ...deleteFooMutation(), ...mutationOptions });\n\nexport const callWithDescriptionsMutation = (options?: Partial<Options<CallWithDescriptionsData>>): UseMutationOptions<unknown, DefaultError, Options<CallWithDescriptionsData>> => {\n    const mutationOptions: UseMutationOptions<unknown, DefaultError, Options<CallWithDescriptionsData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await callWithDescriptions({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const useCallWithDescriptionsMutation = (mutationOptions?: Partial<Omit<UseMutationOptions<unknown, DefaultError, Options<CallWithDescriptionsData>>, 'mutationFn'>>) => useMutation({ ...callWithDescriptionsMutation(), ...mutationOptions });\n\n/**\n * @deprecated\n */\nexport const deprecatedCallMutation = (options?: Partial<Options<DeprecatedCallData>>): UseMutationOptions<unknown, DefaultError, Options<DeprecatedCallData>> => {\n    const mutationOptions: UseMutationOptions<unknown, DefaultError, Options<DeprecatedCallData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await deprecatedCall({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\n/**\n * @deprecated\n */\nexport const useDeprecatedCallMutation = (mutationOptions?: Partial<Omit<UseMutationOptions<unknown, DefaultError, Options<DeprecatedCallData>>, 'mutationFn'>>) => useMutation({ ...deprecatedCallMutation(), ...mutationOptions });\n\nexport const callWithParametersMutation = (options?: Partial<Options<CallWithParametersData>>): UseMutationOptions<unknown, DefaultError, Options<CallWithParametersData>> => {\n    const mutationOptions: UseMutationOptions<unknown, DefaultError, Options<CallWithParametersData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await callWithParameters({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const useCallWithParametersMutation = (mutationOptions?: Partial<Omit<UseMutationOptions<unknown, DefaultError, Options<CallWithParametersData>>, 'mutationFn'>>) => useMutation({ ...callWithParametersMutation(), ...mutationOptions });\n\nexport const callWithWeirdParameterNamesMutation = (options?: Partial<Options<CallWithWeirdParameterNamesData>>): UseMutationOptions<unknown, DefaultError, Options<CallWithWeirdParameterNamesData>> => {\n    const mutationOptions: UseMutationOptions<unknown, DefaultError, Options<CallWithWeirdParameterNamesData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await callWithWeirdParameterNames({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const useCallWithWeirdParameterNamesMutation = (mutationOptions?: Partial<Omit<UseMutationOptions<unknown, DefaultError, Options<CallWithWeirdParameterNamesData>>, 'mutationFn'>>) => useMutation({ ...callWithWeirdParameterNamesMutation(), ...mutationOptions });\n\nexport const getCallWithOptionalParamQueryKey = (options: Options<GetCallWithOptionalParamData>) => createQueryKey('getCallWithOptionalParam', options);\n\nexport const getCallWithOptionalParamOptions = (options: Options<GetCallWithOptionalParamData>) => queryOptions<unknown, DefaultError, unknown, ReturnType<typeof getCallWithOptionalParamQueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await getCallWithOptionalParam({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: getCallWithOptionalParamQueryKey(options)\n});\n\nconst createInfiniteParams = <K extends Pick<QueryKey<Options>[0], 'body' | 'headers' | 'path' | 'query'>>(queryKey: QueryKey<Options>, page: K) => {\n    const params = { ...queryKey[0] };\n    if (page.body) {\n        params.body = {\n            ...queryKey[0].body as any,\n            ...page.body as any\n        };\n    }\n    if (page.headers) {\n        params.headers = {\n            ...queryKey[0].headers,\n            ...page.headers\n        };\n    }\n    if (page.path) {\n        params.path = {\n            ...queryKey[0].path as any,\n            ...page.path as any\n        };\n    }\n    if (page.query) {\n        params.query = {\n            ...queryKey[0].query as any,\n            ...page.query as any\n        };\n    }\n    return params as unknown as typeof page;\n};\n\nexport const getCallWithOptionalParamInfiniteQueryKey = (options: Options<GetCallWithOptionalParamData>): QueryKey<Options<GetCallWithOptionalParamData>> => createQueryKey('getCallWithOptionalParam', options, true);\n\nexport const getCallWithOptionalParamInfiniteOptions = (options: Options<GetCallWithOptionalParamData>) => infiniteQueryOptions<unknown, DefaultError, InfiniteData<unknown>, QueryKey<Options<GetCallWithOptionalParamData>>, number | Pick<QueryKey<Options<GetCallWithOptionalParamData>>[0], 'body' | 'headers' | 'path' | 'query'>>(\n// @ts-ignore\n{\n    queryFn: async ({ pageParam, queryKey, signal }) => {\n        // @ts-ignore\n        const page: Pick<QueryKey<Options<GetCallWithOptionalParamData>>[0], 'body' | 'headers' | 'path' | 'query'> = typeof pageParam === 'object' ? pageParam : {\n            query: {\n                page: pageParam\n            }\n        };\n        const params = createInfiniteParams(queryKey, page);\n        const { data } = await getCallWithOptionalParam({\n            ...options,\n            ...params,\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: getCallWithOptionalParamInfiniteQueryKey(options)\n});\n\nexport const postCallWithOptionalParamMutation = (options?: Partial<Options<PostCallWithOptionalParamData>>): UseMutationOptions<PostCallWithOptionalParamResponse, DefaultError, Options<PostCallWithOptionalParamData>> => {\n    const mutationOptions: UseMutationOptions<PostCallWithOptionalParamResponse, DefaultError, Options<PostCallWithOptionalParamData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await postCallWithOptionalParam({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const usePostCallWithOptionalParamMutation = (mutationOptions?: Partial<Omit<UseMutationOptions<PostCallWithOptionalParamResponse, DefaultError, Options<PostCallWithOptionalParamData>>, 'mutationFn'>>) => useMutation({ ...postCallWithOptionalParamMutation(), ...mutationOptions });\n\nexport const postApiVbyApiVersionRequestBodyMutation = (options?: Partial<Options<PostApiVbyApiVersionRequestBodyData>>): UseMutationOptions<unknown, DefaultError, Options<PostApiVbyApiVersionRequestBodyData>> => {\n    const mutationOptions: UseMutationOptions<unknown, DefaultError, Options<PostApiVbyApiVersionRequestBodyData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await postApiVbyApiVersionRequestBody({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const usePostApiVbyApiVersionRequestBodyMutation = (mutationOptions?: Partial<Omit<UseMutationOptions<unknown, DefaultError, Options<PostApiVbyApiVersionRequestBodyData>>, 'mutationFn'>>) => useMutation({ ...postApiVbyApiVersionRequestBodyMutation(), ...mutationOptions });\n\nexport const postApiVbyApiVersionFormDataMutation = (options?: Partial<Options<PostApiVbyApiVersionFormDataData>>): UseMutationOptions<unknown, DefaultError, Options<PostApiVbyApiVersionFormDataData>> => {\n    const mutationOptions: UseMutationOptions<unknown, DefaultError, Options<PostApiVbyApiVersionFormDataData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await postApiVbyApiVersionFormData({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const usePostApiVbyApiVersionFormDataMutation = (mutationOptions?: Partial<Omit<UseMutationOptions<unknown, DefaultError, Options<PostApiVbyApiVersionFormDataData>>, 'mutationFn'>>) => useMutation({ ...postApiVbyApiVersionFormDataMutation(), ...mutationOptions });\n\nexport const callWithDefaultParametersQueryKey = (options?: Options<CallWithDefaultParametersData>) => createQueryKey('callWithDefaultParameters', options);\n\nexport const callWithDefaultParametersOptions = (options?: Options<CallWithDefaultParametersData>) => queryOptions<unknown, DefaultError, unknown, ReturnType<typeof callWithDefaultParametersQueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await callWithDefaultParameters({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: callWithDefaultParametersQueryKey(options)\n});\n\nexport const callWithDefaultOptionalParametersMutation = (options?: Partial<Options<CallWithDefaultOptionalParametersData>>): UseMutationOptions<unknown, DefaultError, Options<CallWithDefaultOptionalParametersData>> => {\n    const mutationOptions: UseMutationOptions<unknown, DefaultError, Options<CallWithDefaultOptionalParametersData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await callWithDefaultOptionalParameters({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const useCallWithDefaultOptionalParametersMutation = (mutationOptions?: Partial<Omit<UseMutationOptions<unknown, DefaultError, Options<CallWithDefaultOptionalParametersData>>, 'mutationFn'>>) => useMutation({ ...callWithDefaultOptionalParametersMutation(), ...mutationOptions });\n\nexport const callToTestOrderOfParamsMutation = (options?: Partial<Options<CallToTestOrderOfParamsData>>): UseMutationOptions<unknown, DefaultError, Options<CallToTestOrderOfParamsData>> => {\n    const mutationOptions: UseMutationOptions<unknown, DefaultError, Options<CallToTestOrderOfParamsData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await callToTestOrderOfParams({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const useCallToTestOrderOfParamsMutation = (mutationOptions?: Partial<Omit<UseMutationOptions<unknown, DefaultError, Options<CallToTestOrderOfParamsData>>, 'mutationFn'>>) => useMutation({ ...callToTestOrderOfParamsMutation(), ...mutationOptions });\n\nexport const duplicateNameMutation = (options?: Partial<Options<DuplicateNameData>>): UseMutationOptions<unknown, DefaultError, Options<DuplicateNameData>> => {\n    const mutationOptions: UseMutationOptions<unknown, DefaultError, Options<DuplicateNameData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await duplicateName({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const useDuplicateNameMutation = (mutationOptions?: Partial<Omit<UseMutationOptions<unknown, DefaultError, Options<DuplicateNameData>>, 'mutationFn'>>) => useMutation({ ...duplicateNameMutation(), ...mutationOptions });\n\nexport const duplicateName2QueryKey = (options?: Options<DuplicateName2Data>) => createQueryKey('duplicateName2', options);\n\nexport const duplicateName2Options = (options?: Options<DuplicateName2Data>) => queryOptions<unknown, DefaultError, unknown, ReturnType<typeof duplicateName2QueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await duplicateName2({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: duplicateName2QueryKey(options)\n});\n\nexport const duplicateName3Mutation = (options?: Partial<Options<DuplicateName3Data>>): UseMutationOptions<unknown, DefaultError, Options<DuplicateName3Data>> => {\n    const mutationOptions: UseMutationOptions<unknown, DefaultError, Options<DuplicateName3Data>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await duplicateName3({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const useDuplicateName3Mutation = (mutationOptions?: Partial<Omit<UseMutationOptions<unknown, DefaultError, Options<DuplicateName3Data>>, 'mutationFn'>>) => useMutation({ ...duplicateName3Mutation(), ...mutationOptions });\n\nexport const duplicateName4Mutation = (options?: Partial<Options<DuplicateName4Data>>): UseMutationOptions<unknown, DefaultError, Options<DuplicateName4Data>> => {\n    const mutationOptions: UseMutationOptions<unknown, DefaultError, Options<DuplicateName4Data>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await duplicateName4({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const useDuplicateName4Mutation = (mutationOptions?: Partial<Omit<UseMutationOptions<unknown, DefaultError, Options<DuplicateName4Data>>, 'mutationFn'>>) => useMutation({ ...duplicateName4Mutation(), ...mutationOptions });\n\nexport const callWithNoContentResponseQueryKey = (options?: Options<CallWithNoContentResponseData>) => createQueryKey('callWithNoContentResponse', options);\n\nexport const callWithNoContentResponseOptions = (options?: Options<CallWithNoContentResponseData>) => queryOptions<CallWithNoContentResponseResponse, DefaultError, CallWithNoContentResponseResponse, ReturnType<typeof callWithNoContentResponseQueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await callWithNoContentResponse({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: callWithNoContentResponseQueryKey(options)\n});\n\nexport const callWithResponseAndNoContentResponseQueryKey = (options?: Options<CallWithResponseAndNoContentResponseData>) => createQueryKey('callWithResponseAndNoContentResponse', options);\n\nexport const callWithResponseAndNoContentResponseOptions = (options?: Options<CallWithResponseAndNoContentResponseData>) => queryOptions<CallWithResponseAndNoContentResponseResponse, DefaultError, CallWithResponseAndNoContentResponseResponse, ReturnType<typeof callWithResponseAndNoContentResponseQueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await callWithResponseAndNoContentResponse({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: callWithResponseAndNoContentResponseQueryKey(options)\n});\n\nexport const dummyAQueryKey = (options?: Options<DummyAData>) => createQueryKey('dummyA', options);\n\nexport const dummyAOptions = (options?: Options<DummyAData>) => queryOptions<DummyAResponse, DefaultError, DummyAResponse, ReturnType<typeof dummyAQueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await dummyA({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: dummyAQueryKey(options)\n});\n\nexport const dummyBQueryKey = (options?: Options<DummyBData>) => createQueryKey('dummyB', options);\n\nexport const dummyBOptions = (options?: Options<DummyBData>) => queryOptions<DummyBResponse, DefaultError, DummyBResponse, ReturnType<typeof dummyBQueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await dummyB({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: dummyBQueryKey(options)\n});\n\nexport const callWithResponseQueryKey = (options?: Options<CallWithResponseData>) => createQueryKey('callWithResponse', options);\n\nexport const callWithResponseOptions = (options?: Options<CallWithResponseData>) => queryOptions<CallWithResponseResponse, DefaultError, CallWithResponseResponse, ReturnType<typeof callWithResponseQueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await callWithResponse({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: callWithResponseQueryKey(options)\n});\n\nexport const callWithDuplicateResponsesMutation = (options?: Partial<Options<CallWithDuplicateResponsesData>>): UseMutationOptions<CallWithDuplicateResponsesResponse, CallWithDuplicateResponsesError, Options<CallWithDuplicateResponsesData>> => {\n    const mutationOptions: UseMutationOptions<CallWithDuplicateResponsesResponse, CallWithDuplicateResponsesError, Options<CallWithDuplicateResponsesData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await callWithDuplicateResponses({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const useCallWithDuplicateResponsesMutation = (mutationOptions?: Partial<Omit<UseMutationOptions<CallWithDuplicateResponsesResponse, CallWithDuplicateResponsesError, Options<CallWithDuplicateResponsesData>>, 'mutationFn'>>) => useMutation({ ...callWithDuplicateResponsesMutation(), ...mutationOptions });\n\nexport const callWithResponsesMutation = (options?: Partial<Options<CallWithResponsesData>>): UseMutationOptions<CallWithResponsesResponse, CallWithResponsesError, Options<CallWithResponsesData>> => {\n    const mutationOptions: UseMutationOptions<CallWithResponsesResponse, CallWithResponsesError, Options<CallWithResponsesData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await callWithResponses({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const useCallWithResponsesMutation = (mutationOptions?: Partial<Omit<UseMutationOptions<CallWithResponsesResponse, CallWithResponsesError, Options<CallWithResponsesData>>, 'mutationFn'>>) => useMutation({ ...callWithResponsesMutation(), ...mutationOptions });\n\nexport const collectionFormatQueryKey = (options: Options<CollectionFormatData>) => createQueryKey('collectionFormat', options);\n\nexport const collectionFormatOptions = (options: Options<CollectionFormatData>) => queryOptions<unknown, DefaultError, unknown, ReturnType<typeof collectionFormatQueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await collectionFormat({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: collectionFormatQueryKey(options)\n});\n\nexport const typesQueryKey = (options: Options<TypesData>) => createQueryKey('types', options);\n\nexport const typesOptions = (options: Options<TypesData>) => queryOptions<TypesResponse, DefaultError, TypesResponse, ReturnType<typeof typesQueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await types({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: typesQueryKey(options)\n});\n\nexport const uploadFileMutation = (options?: Partial<Options<UploadFileData>>): UseMutationOptions<UploadFileResponse, DefaultError, Options<UploadFileData>> => {\n    const mutationOptions: UseMutationOptions<UploadFileResponse, DefaultError, Options<UploadFileData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await uploadFile({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const useUploadFileMutation = (mutationOptions?: Partial<Omit<UseMutationOptions<UploadFileResponse, DefaultError, Options<UploadFileData>>, 'mutationFn'>>) => useMutation({ ...uploadFileMutation(), ...mutationOptions });\n\nexport const fileResponseQueryKey = (options: Options<FileResponseData>) => createQueryKey('fileResponse', options);\n\nexport const fileResponseOptions = (options: Options<FileResponseData>) => queryOptions<FileResponseResponse, DefaultError, FileResponseResponse, ReturnType<typeof fileResponseQueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await fileResponse({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: fileResponseQueryKey(options)\n});\n\nexport const complexTypesQueryKey = (options: Options<ComplexTypesData>) => createQueryKey('complexTypes', options);\n\nexport const complexTypesOptions = (options: Options<ComplexTypesData>) => queryOptions<ComplexTypesResponse, DefaultError, ComplexTypesResponse, ReturnType<typeof complexTypesQueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await complexTypes({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: complexTypesQueryKey(options)\n});\n\nexport const multipartResponseQueryKey = (options?: Options<MultipartResponseData>) => createQueryKey('multipartResponse', options);\n\nexport const multipartResponseOptions = (options?: Options<MultipartResponseData>) => queryOptions<MultipartResponseResponse, DefaultError, MultipartResponseResponse, ReturnType<typeof multipartResponseQueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await multipartResponse({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: multipartResponseQueryKey(options)\n});\n\nexport const multipartRequestMutation = (options?: Partial<Options<MultipartRequestData>>): UseMutationOptions<unknown, DefaultError, Options<MultipartRequestData>> => {\n    const mutationOptions: UseMutationOptions<unknown, DefaultError, Options<MultipartRequestData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await multipartRequest({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const useMultipartRequestMutation = (mutationOptions?: Partial<Omit<UseMutationOptions<unknown, DefaultError, Options<MultipartRequestData>>, 'mutationFn'>>) => useMutation({ ...multipartRequestMutation(), ...mutationOptions });\n\nexport const complexParamsMutation = (options?: Partial<Options<ComplexParamsData>>): UseMutationOptions<ComplexParamsResponse, DefaultError, Options<ComplexParamsData>> => {\n    const mutationOptions: UseMutationOptions<ComplexParamsResponse, DefaultError, Options<ComplexParamsData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await complexParams({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const useComplexParamsMutation = (mutationOptions?: Partial<Omit<UseMutationOptions<ComplexParamsResponse, DefaultError, Options<ComplexParamsData>>, 'mutationFn'>>) => useMutation({ ...complexParamsMutation(), ...mutationOptions });\n\nexport const callWithResultFromHeaderMutation = (options?: Partial<Options<CallWithResultFromHeaderData>>): UseMutationOptions<unknown, DefaultError, Options<CallWithResultFromHeaderData>> => {\n    const mutationOptions: UseMutationOptions<unknown, DefaultError, Options<CallWithResultFromHeaderData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await callWithResultFromHeader({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const useCallWithResultFromHeaderMutation = (mutationOptions?: Partial<Omit<UseMutationOptions<unknown, DefaultError, Options<CallWithResultFromHeaderData>>, 'mutationFn'>>) => useMutation({ ...callWithResultFromHeaderMutation(), ...mutationOptions });\n\nexport const testErrorCodeMutation = (options?: Partial<Options<TestErrorCodeData>>): UseMutationOptions<unknown, DefaultError, Options<TestErrorCodeData>> => {\n    const mutationOptions: UseMutationOptions<unknown, DefaultError, Options<TestErrorCodeData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await testErrorCode({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const useTestErrorCodeMutation = (mutationOptions?: Partial<Omit<UseMutationOptions<unknown, DefaultError, Options<TestErrorCodeData>>, 'mutationFn'>>) => useMutation({ ...testErrorCodeMutation(), ...mutationOptions });\n\nexport const nonAsciiæøåÆøÅöôêÊ字符串Mutation = (options?: Partial<Options<NonAsciiæøåÆøÅöôêÊ字符串Data>>): UseMutationOptions<NonAsciiæøåÆøÅöôêÊ字符串Response, DefaultError, Options<NonAsciiæøåÆøÅöôêÊ字符串Data>> => {\n    const mutationOptions: UseMutationOptions<NonAsciiæøåÆøÅöôêÊ字符串Response, DefaultError, Options<NonAsciiæøåÆøÅöôêÊ字符串Data>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await nonAsciiæøåÆøÅöôêÊ字符串({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const useNonAsciiæøåÆøÅöôêÊ字符串Mutation = (mutationOptions?: Partial<Omit<UseMutationOptions<NonAsciiæøåÆøÅöôêÊ字符串Response, DefaultError, Options<NonAsciiæøåÆøÅöôêÊ字符串Data>>, 'mutationFn'>>) => useMutation({ ...nonAsciiæøåÆøÅöôêÊ字符串Mutation(), ...mutationOptions });\n\n/**\n * Login User\n */\nexport const putWithFormUrlEncodedMutation = (options?: Partial<Options<PutWithFormUrlEncodedData>>): UseMutationOptions<unknown, DefaultError, Options<PutWithFormUrlEncodedData>> => {\n    const mutationOptions: UseMutationOptions<unknown, DefaultError, Options<PutWithFormUrlEncodedData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await putWithFormUrlEncoded({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\n/**\n * Login User\n */\nexport const usePutWithFormUrlEncodedMutation = (mutationOptions?: Partial<Omit<UseMutationOptions<unknown, DefaultError, Options<PutWithFormUrlEncodedData>>, 'mutationFn'>>) => useMutation({ ...putWithFormUrlEncodedMutation(), ...mutationOptions });\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/react-query/useMutation/client/client.gen.ts",
    "content": "// 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 (options: RequestOptions) => {\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 url = buildUrl(opts);\n\n    return { opts, url };\n  };\n\n  const request: Client['request'] = async (options) => {\n    // @ts-expect-error\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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/react-query/useMutation/client/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type { Auth } from '../core/auth.gen';\nexport type { QuerySerializerOptions } from '../core/bodySerializer.gen';\nexport {\n  formDataBodySerializer,\n  jsonBodySerializer,\n  urlSearchParamsBodySerializer,\n} from '../core/bodySerializer.gen';\nexport { buildClientParams } from '../core/params.gen';\nexport { serializeQueryKeyValue } from '../core/queryKeySerializer.gen';\nexport { createClient } from './client.gen';\nexport type {\n  Client,\n  ClientOptions,\n  Config,\n  CreateClientConfig,\n  Options,\n  RequestOptions,\n  RequestResult,\n  ResolvedRequestOptions,\n  ResponseStyle,\n  TDataShape,\n} from './types.gen';\nexport { createConfig, mergeHeaders } from './utils.gen';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/react-query/useMutation/client/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { Auth } from '../core/auth.gen';\nimport type {\n  ServerSentEventsOptions,\n  ServerSentEventsResult,\n} from '../core/serverSentEvents.gen';\nimport type { Client as CoreClient, Config as CoreConfig } from '../core/types.gen';\nimport type { Middleware } from './utils.gen';\n\nexport type ResponseStyle = 'data' | 'fields';\n\nexport interface Config<T extends ClientOptions = ClientOptions>\n  extends Omit<RequestInit, 'body' | 'headers' | 'method'>, CoreConfig {\n  /**\n   * Base URL for all requests made by this client.\n   */\n  baseUrl?: T['baseUrl'];\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   * Please don't use the Fetch client for Next.js applications. The `next`\n   * options won't have any effect.\n   *\n   * Install {@link https://www.npmjs.com/package/@hey-api/client-next `@hey-api/client-next`} instead.\n   */\n  next?: never;\n  /**\n   * Return the response data parsed in a specified format. By default, `auto`\n   * will infer the appropriate method from the `Content-Type` response header.\n   * You can override this behavior with any of the {@link Body} methods.\n   * Select `stream` if you don't want to parse response data at all.\n   *\n   * @default 'auto'\n   */\n  parseAs?: 'arrayBuffer' | 'auto' | 'blob' | 'formData' | 'json' | 'stream' | 'text';\n  /**\n   * Should we return only data or multiple fields (data, error, response, etc.)?\n   *\n   * @default 'fields'\n   */\n  responseStyle?: ResponseStyle;\n  /**\n   * Throw an error instead of returning it in the response?\n   *\n   * @default false\n   */\n  throwOnError?: T['throwOnError'];\n}\n\nexport interface RequestOptions<\n  TData = unknown,\n  TResponseStyle extends ResponseStyle = 'fields',\n  ThrowOnError extends boolean = boolean,\n  Url extends string = string,\n>\n  extends\n    Config<{\n      responseStyle: TResponseStyle;\n      throwOnError: ThrowOnError;\n    }>,\n    Pick<\n      ServerSentEventsOptions<TData>,\n      | 'onRequest'\n      | 'onSseError'\n      | 'onSseEvent'\n      | 'sseDefaultRetryDelay'\n      | 'sseMaxRetryAttempts'\n      | 'sseMaxRetryDelay'\n    > {\n  /**\n   * Any body that you want to add to your request.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/fetch#body}\n   */\n  body?: unknown;\n  path?: Record<string, unknown>;\n  query?: Record<string, unknown>;\n  /**\n   * Security mechanism(s) to use for the request.\n   */\n  security?: ReadonlyArray<Auth>;\n  url: Url;\n}\n\nexport interface ResolvedRequestOptions<\n  TResponseStyle extends ResponseStyle = 'fields',\n  ThrowOnError extends boolean = boolean,\n  Url extends string = string,\n> extends RequestOptions<unknown, TResponseStyle, ThrowOnError, Url> {\n  serializedBody?: string;\n}\n\nexport type RequestResult<\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = boolean,\n  TResponseStyle extends ResponseStyle = 'fields',\n> = ThrowOnError extends true\n  ? Promise<\n      TResponseStyle extends 'data'\n        ? TData extends Record<string, unknown>\n          ? TData[keyof TData]\n          : TData\n        : {\n            data: TData extends Record<string, unknown> ? TData[keyof TData] : TData;\n            request: Request;\n            response: Response;\n          }\n    >\n  : Promise<\n      TResponseStyle extends 'data'\n        ? (TData extends Record<string, unknown> ? TData[keyof TData] : TData) | undefined\n        : (\n            | {\n                data: TData extends Record<string, unknown> ? TData[keyof TData] : TData;\n                error: undefined;\n              }\n            | {\n                data: undefined;\n                error: TError extends Record<string, unknown> ? TError[keyof TError] : TError;\n              }\n          ) & {\n            request: Request;\n            response: Response;\n          }\n    >;\n\nexport interface ClientOptions {\n  baseUrl?: string;\n  responseStyle?: ResponseStyle;\n  throwOnError?: boolean;\n}\n\ntype MethodFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'>,\n) => RequestResult<TData, TError, ThrowOnError, TResponseStyle>;\n\ntype SseFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'>,\n) => Promise<ServerSentEventsResult<TData, TError>>;\n\ntype RequestFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'> &\n    Pick<Required<RequestOptions<TData, TResponseStyle, ThrowOnError>>, 'method'>,\n) => RequestResult<TData, TError, ThrowOnError, TResponseStyle>;\n\ntype BuildUrlFn = <\n  TData extends {\n    body?: unknown;\n    path?: Record<string, unknown>;\n    query?: Record<string, unknown>;\n    url: string;\n  },\n>(\n  options: TData & Options<TData>,\n) => string;\n\nexport type Client = CoreClient<RequestFn, Config, MethodFn, BuildUrlFn, SseFn> & {\n  interceptors: Middleware<Request, Response, unknown, ResolvedRequestOptions>;\n};\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 = ClientOptions> = (\n  override?: Config<ClientOptions & T>,\n) => Config<Required<ClientOptions> & T>;\n\nexport interface TDataShape {\n  body?: unknown;\n  headers?: unknown;\n  path?: unknown;\n  query?: unknown;\n  url: string;\n}\n\ntype OmitKeys<T, K> = Pick<T, Exclude<keyof T, K>>;\n\nexport type Options<\n  TData extends TDataShape = TDataShape,\n  ThrowOnError extends boolean = boolean,\n  TResponse = unknown,\n  TResponseStyle extends ResponseStyle = 'fields',\n> = OmitKeys<\n  RequestOptions<TResponse, TResponseStyle, ThrowOnError>,\n  'body' | 'path' | 'query' | 'url'\n> &\n  ([TData] extends [never] ? unknown : Omit<TData, 'url'>);\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/react-query/useMutation/client/utils.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/react-query/useMutation/client.gen.ts",
    "content": "// 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: 'http://localhost:3000/base' }));\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/react-query/useMutation/core/auth.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/react-query/useMutation/core/bodySerializer.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/react-query/useMutation/core/params.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/react-query/useMutation/core/pathSerializer.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/react-query/useMutation/core/queryKeySerializer.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\n/**\n * JSON-friendly union that mirrors what Pinia Colada can hash.\n */\nexport type JsonValue =\n  | null\n  | string\n  | number\n  | boolean\n  | JsonValue[]\n  | { [key: string]: JsonValue };\n\n/**\n * Replacer that converts non-JSON values (bigint, Date, etc.) to safe substitutes.\n */\nexport const queryKeyJsonReplacer = (_key: string, value: unknown) => {\n  if (value === undefined || typeof value === 'function' || typeof value === 'symbol') {\n    return undefined;\n  }\n  if (typeof value === 'bigint') {\n    return value.toString();\n  }\n  if (value instanceof Date) {\n    return value.toISOString();\n  }\n  return value;\n};\n\n/**\n * Safely stringifies a value and parses it back into a JsonValue.\n */\nexport const stringifyToJsonValue = (input: unknown): JsonValue | undefined => {\n  try {\n    const json = JSON.stringify(input, queryKeyJsonReplacer);\n    if (json === undefined) {\n      return undefined;\n    }\n    return JSON.parse(json) as JsonValue;\n  } catch {\n    return undefined;\n  }\n};\n\n/**\n * Detects plain objects (including objects with a null prototype).\n */\nconst isPlainObject = (value: unknown): value is Record<string, unknown> => {\n  if (value === null || typeof value !== 'object') {\n    return false;\n  }\n  const prototype = Object.getPrototypeOf(value as object);\n  return prototype === Object.prototype || prototype === null;\n};\n\n/**\n * Turns URLSearchParams into a sorted JSON object for deterministic keys.\n */\nconst serializeSearchParams = (params: URLSearchParams): JsonValue => {\n  const entries = Array.from(params.entries()).sort(([a], [b]) => a.localeCompare(b));\n  const result: Record<string, JsonValue> = {};\n\n  for (const [key, value] of entries) {\n    const existing = result[key];\n    if (existing === undefined) {\n      result[key] = value;\n      continue;\n    }\n\n    if (Array.isArray(existing)) {\n      (existing as string[]).push(value);\n    } else {\n      result[key] = [existing, value];\n    }\n  }\n\n  return result;\n};\n\n/**\n * Normalizes any accepted value into a JSON-friendly shape for query keys.\n */\nexport const serializeQueryKeyValue = (value: unknown): JsonValue | undefined => {\n  if (value === null) {\n    return null;\n  }\n\n  if (typeof value === 'string' || typeof value === 'number' || typeof value === 'boolean') {\n    return value;\n  }\n\n  if (value === undefined || typeof value === 'function' || typeof value === 'symbol') {\n    return undefined;\n  }\n\n  if (typeof value === 'bigint') {\n    return value.toString();\n  }\n\n  if (value instanceof Date) {\n    return value.toISOString();\n  }\n\n  if (Array.isArray(value)) {\n    return stringifyToJsonValue(value);\n  }\n\n  if (typeof URLSearchParams !== 'undefined' && value instanceof URLSearchParams) {\n    return serializeSearchParams(value);\n  }\n\n  if (isPlainObject(value)) {\n    return stringifyToJsonValue(value);\n  }\n\n  return undefined;\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/react-query/useMutation/core/serverSentEvents.gen.ts",
    "content": "// 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 const 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            // Normalize line endings: CRLF -> LF, then CR -> LF\n            buffer = buffer.replace(/\\r\\n/g, '\\n').replace(/\\r/g, '\\n');\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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/react-query/useMutation/core/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { Auth, AuthToken } from './auth.gen';\nimport type { BodySerializer, QuerySerializer, QuerySerializerOptions } from './bodySerializer.gen';\n\nexport type HttpMethod =\n  | 'connect'\n  | 'delete'\n  | 'get'\n  | 'head'\n  | 'options'\n  | 'patch'\n  | 'post'\n  | 'put'\n  | 'trace';\n\nexport type Client<\n  RequestFn = never,\n  Config = unknown,\n  MethodFn = never,\n  BuildUrlFn = never,\n  SseFn = never,\n> = {\n  /**\n   * Returns the final request URL.\n   */\n  buildUrl: BuildUrlFn;\n  getConfig: () => Config;\n  request: RequestFn;\n  setConfig: (config: Config) => Config;\n} & {\n  [K in HttpMethod]: MethodFn;\n} & ([SseFn] extends [never] ? { sse?: never } : { sse: { [K in HttpMethod]: SseFn } });\n\nexport interface Config {\n  /**\n   * Auth token or a function returning auth token. The resolved value will be\n   * added to the request payload as defined by its `security` array.\n   */\n  auth?: ((auth: Auth) => Promise<AuthToken> | AuthToken) | AuthToken;\n  /**\n   * A function for serializing request body parameter. By default,\n   * {@link JSON.stringify()} will be used.\n   */\n  bodySerializer?: BodySerializer | null;\n  /**\n   * An object containing any HTTP headers that you want to pre-populate your\n   * `Headers` object with.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/Headers/Headers#init See more}\n   */\n  headers?:\n    | RequestInit['headers']\n    | Record<\n        string,\n        string | number | boolean | (string | number | boolean)[] | null | undefined | unknown\n      >;\n  /**\n   * The request method.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/fetch#method See more}\n   */\n  method?: Uppercase<HttpMethod>;\n  /**\n   * A function for serializing request query parameters. By default, arrays\n   * will be exploded in form style, objects will be exploded in deepObject\n   * style, and reserved characters are percent-encoded.\n   *\n   * This method will have no effect if the native `paramsSerializer()` Axios\n   * API function is used.\n   *\n   * {@link https://swagger.io/docs/specification/serialization/#query View examples}\n   */\n  querySerializer?: QuerySerializer | QuerySerializerOptions;\n  /**\n   * A function validating request data. This is useful if you want to ensure\n   * the request conforms to the desired shape, so it can be safely sent to\n   * the server.\n   */\n  requestValidator?: (data: unknown) => Promise<unknown>;\n  /**\n   * A function transforming response data before it's returned. This is useful\n   * for post-processing data, e.g. converting ISO strings into Date objects.\n   */\n  responseTransformer?: (data: unknown) => Promise<unknown>;\n  /**\n   * A function validating response data. This is useful if you want to ensure\n   * the response conforms to the desired shape, so it can be safely passed to\n   * the transformers and returned to the user.\n   */\n  responseValidator?: (data: unknown) => Promise<unknown>;\n}\n\ntype IsExactlyNeverOrNeverUndefined<T> = [T] extends [never]\n  ? true\n  : [T] extends [never | undefined]\n    ? [undefined] extends [T]\n      ? false\n      : true\n    : false;\n\nexport type OmitNever<T extends Record<string, unknown>> = {\n  [K in keyof T as IsExactlyNeverOrNeverUndefined<T[K]> extends true ? never : K]: T[K];\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/react-query/useMutation/core/utils.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/react-query/useMutation/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport { apiVVersionODataControllerCount, callToTestOrderOfParams, callWithDefaultOptionalParameters, callWithDefaultParameters, callWithDescriptions, callWithDuplicateResponses, callWithNoContentResponse, callWithParameters, callWithResponse, callWithResponseAndNoContentResponse, callWithResponses, callWithResultFromHeader, callWithWeirdParameterNames, collectionFormat, complexParams, complexTypes, deleteCallWithoutParametersAndResponse, deleteFoo, deprecatedCall, dummyA, dummyB, duplicateName, duplicateName2, duplicateName3, duplicateName4, export_, fileResponse, fooWow, getApiVbyApiVersionSimpleOperation, getCallWithOptionalParam, getCallWithoutParametersAndResponse, headCallWithoutParametersAndResponse, import_, multipartRequest, multipartResponse, nonAsciiæøåÆøÅöôêÊ字符串, type Options, optionsCallWithoutParametersAndResponse, patchApiVbyApiVersionNoTag, patchCallWithoutParametersAndResponse, postApiVbyApiVersionFormData, postApiVbyApiVersionRequestBody, postCallWithOptionalParam, postCallWithoutParametersAndResponse, putCallWithoutParametersAndResponse, putWithFormUrlEncoded, testErrorCode, types, uploadFile } from './sdk.gen';\nexport type { _3eNum1Период, _400, AdditionalPropertiesIntegerIssue, AdditionalPropertiesUnknownIssue, AdditionalPropertiesUnknownIssue2, AdditionalPropertiesUnknownIssue3, AdditionalPropertiesUnknownIssueWritable, AnyOfAnyAndNull, AnyOfArrays, ApiVVersionODataControllerCountData, ApiVVersionODataControllerCountResponse, ApiVVersionODataControllerCountResponses, ArrayWithAnyOfProperties, ArrayWithArray, ArrayWithBooleans, ArrayWithNumbers, ArrayWithProperties, ArrayWithReferences, ArrayWithStrings, CallToTestOrderOfParamsData, CallWithDefaultOptionalParametersData, CallWithDefaultParametersData, CallWithDescriptionsData, CallWithDuplicateResponsesData, CallWithDuplicateResponsesError, CallWithDuplicateResponsesErrors, CallWithDuplicateResponsesResponse, CallWithDuplicateResponsesResponses, CallWithNoContentResponseData, CallWithNoContentResponseResponse, CallWithNoContentResponseResponses, CallWithParametersData, CallWithResponseAndNoContentResponseData, CallWithResponseAndNoContentResponseResponse, CallWithResponseAndNoContentResponseResponses, CallWithResponseData, CallWithResponseResponse, CallWithResponseResponses, CallWithResponsesData, CallWithResponsesError, CallWithResponsesErrors, CallWithResponsesResponse, CallWithResponsesResponses, CallWithResultFromHeaderData, CallWithResultFromHeaderErrors, CallWithResultFromHeaderResponses, CallWithWeirdParameterNamesData, CamelCaseCommentWithBreaks, CharactersInDescription, ClientOptions, CollectionFormatData, CommentWithBackticks, CommentWithBackticksAndQuotes, CommentWithBreaks, CommentWithExpressionPlaceholders, CommentWithQuotes, CommentWithReservedCharacters, CommentWithSlashes, ComplexParamsData, ComplexParamsResponse, ComplexParamsResponses, ComplexTypesData, ComplexTypesErrors, ComplexTypesResponse, ComplexTypesResponses, CompositionBaseModel, CompositionExtendedModel, CompositionWithAllOfAndNullable, CompositionWithAnyOf, CompositionWithAnyOfAndNullable, CompositionWithAnyOfAnonymous, CompositionWithNestedAnyAndTypeNull, CompositionWithNestedAnyOfAndNull, CompositionWithOneOf, CompositionWithOneOfAndComplexArrayDictionary, CompositionWithOneOfAndNullable, CompositionWithOneOfAndProperties, CompositionWithOneOfAndSimpleArrayDictionary, CompositionWithOneOfAndSimpleDictionary, CompositionWithOneOfAnonymous, CompositionWithOneOfDiscriminator, ConstValue, Default, DeleteCallWithoutParametersAndResponseData, DeleteFooData, DeleteFooData2, DeleteFooData3, DeprecatedCallData, DeprecatedModel, DictionaryWithArray, DictionaryWithDictionary, DictionaryWithProperties, DictionaryWithPropertiesAndAdditionalProperties, DictionaryWithReference, DictionaryWithString, DummyAData, DummyAResponse, DummyAResponses, DummyBData, DummyBResponse, DummyBResponses, DuplicateName2Data, DuplicateName3Data, DuplicateName4Data, DuplicateNameData, EnumFromDescription, EnumWithExtensions, EnumWithNumbers, EnumWithReplacedCharacters, EnumWithStrings, EnumWithXEnumNames, ExportData, ExternalRefA, ExternalRefB, ExternalSharedModel, File, FileResponseData, FileResponseResponse, FileResponseResponses, FileWritable, FooWowData, FooWowResponses, FreeFormObjectWithAdditionalPropertiesEqEmptyObject, FreeFormObjectWithAdditionalPropertiesEqTrue, FreeFormObjectWithoutAdditionalProperties, GenericSchemaDuplicateIssue1SystemBoolean, GenericSchemaDuplicateIssue1SystemBooleanWritable, GenericSchemaDuplicateIssue1SystemString, GenericSchemaDuplicateIssue1SystemStringWritable, GetApiVbyApiVersionSimpleOperationData, GetApiVbyApiVersionSimpleOperationError, GetApiVbyApiVersionSimpleOperationErrors, GetApiVbyApiVersionSimpleOperationResponse, GetApiVbyApiVersionSimpleOperationResponses, GetCallWithOptionalParamData, GetCallWithoutParametersAndResponseData, HeadCallWithoutParametersAndResponseData, Import, ImportData, ImportResponse, ImportResponses, IoK8sApimachineryPkgApisMetaV1DeleteOptions, IoK8sApimachineryPkgApisMetaV1Preconditions, ModelCircle, ModelFromZendesk, ModelSquare, ModelThatExtends, ModelThatExtendsExtends, ModelWithAdditionalPropertiesEqTrue, ModelWithAdditionalPropertiesRef, ModelWithAnyOfConstantSizeArray, ModelWithAnyOfConstantSizeArrayAndIntersect, ModelWithAnyOfConstantSizeArrayNullable, ModelWithAnyOfConstantSizeArrayWithNSizeAndOptions, ModelWithAnyOfConstantSizeArrayWithNSizeAndOptionsWritable, ModelWithArray, ModelWithArrayReadOnlyAndWriteOnly, ModelWithArrayReadOnlyAndWriteOnlyWritable, ModelWithBackticksInDescription, ModelWithBoolean, ModelWithCircularReference, ModelWithConst, ModelWithConstantSizeArray, ModelWithDictionary, ModelWithDuplicateImports, ModelWithDuplicateProperties, ModelWithEnum, ModelWithEnumFromDescription, ModelWithEnumWithHyphen, ModelWithInteger, ModelWithNestedArrayEnums, ModelWithNestedArrayEnumsData, ModelWithNestedArrayEnumsDataBar, ModelWithNestedArrayEnumsDataFoo, ModelWithNestedCompositionEnums, ModelWithNestedEnums, ModelWithNestedProperties, ModelWithNullableObject, ModelWithNullableString, ModelWithNumericEnumUnion, ModelWithOneOfAndProperties, ModelWithOneOfEnum, ModelWithOrderedProperties, ModelWithPattern, ModelWithPatternWritable, ModelWithPrefixItemsConstantSizeArray, ModelWithProperties, ModelWithPropertiesWritable, ModelWithReadOnlyAndWriteOnly, ModelWithReadOnlyAndWriteOnlyWritable, ModelWithReference, ModelWithReferenceWritable, ModelWithString, ModelWithStringError, MultipartRequestData, MultipartResponseData, MultipartResponseResponse, MultipartResponseResponses, NestedAnyOfArraysNullable, NonAsciiæøåÆøÅöôêÊ字符串Data, NonAsciiæøåÆøÅöôêÊ字符串Response, NonAsciiæøåÆøÅöôêÊ字符串Responses, NonAsciiStringæøåÆøÅöôêÊ字符串, NullableObject, OneOfAllOfIssue, OneOfAllOfIssueWritable, OptionsCallWithoutParametersAndResponseData, Pageable, ParameterSimpleParameterUnused, PatchApiVbyApiVersionNoTagData, PatchApiVbyApiVersionNoTagResponses, PatchCallWithoutParametersAndResponseData, PostApiVbyApiVersionFormDataData, PostApiVbyApiVersionRequestBodyData, PostCallWithOptionalParamData, PostCallWithOptionalParamResponse, PostCallWithOptionalParamResponses, PostCallWithoutParametersAndResponseData, PostServiceWithEmptyTagResponse, PostServiceWithEmptyTagResponse2, PutCallWithoutParametersAndResponseData, PutWithFormUrlEncodedData, SchemaWithFormRestrictedKeys, SimpleBoolean, SimpleFile, SimpleFormData, SimpleInteger, SimpleParameter, SimpleReference, SimpleRequestBody, SimpleString, SimpleStringWithPattern, TestErrorCodeData, TestErrorCodeErrors, TestErrorCodeResponses, TypesData, TypesResponse, TypesResponses, UploadFileData, UploadFileResponse, UploadFileResponses, XFooBar } from './types.gen';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/react-query/useMutation/sdk.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport { type Client, formDataBodySerializer, type Options as Options2, type TDataShape, urlSearchParamsBodySerializer } from './client';\nimport { client } from './client.gen';\nimport type { ApiVVersionODataControllerCountData, ApiVVersionODataControllerCountResponses, CallToTestOrderOfParamsData, CallWithDefaultOptionalParametersData, CallWithDefaultParametersData, CallWithDescriptionsData, CallWithDuplicateResponsesData, CallWithDuplicateResponsesErrors, CallWithDuplicateResponsesResponses, CallWithNoContentResponseData, CallWithNoContentResponseResponses, CallWithParametersData, CallWithResponseAndNoContentResponseData, CallWithResponseAndNoContentResponseResponses, CallWithResponseData, CallWithResponseResponses, CallWithResponsesData, CallWithResponsesErrors, CallWithResponsesResponses, CallWithResultFromHeaderData, CallWithResultFromHeaderErrors, CallWithResultFromHeaderResponses, CallWithWeirdParameterNamesData, CollectionFormatData, ComplexParamsData, ComplexParamsResponses, ComplexTypesData, ComplexTypesErrors, ComplexTypesResponses, DeleteCallWithoutParametersAndResponseData, DeleteFooData3, DeprecatedCallData, DummyAData, DummyAResponses, DummyBData, DummyBResponses, DuplicateName2Data, DuplicateName3Data, DuplicateName4Data, DuplicateNameData, ExportData, FileResponseData, FileResponseResponses, FooWowData, FooWowResponses, GetApiVbyApiVersionSimpleOperationData, GetApiVbyApiVersionSimpleOperationErrors, GetApiVbyApiVersionSimpleOperationResponses, GetCallWithOptionalParamData, GetCallWithoutParametersAndResponseData, HeadCallWithoutParametersAndResponseData, ImportData, ImportResponses, MultipartRequestData, MultipartResponseData, MultipartResponseResponses, NonAsciiæøåÆøÅöôêÊ字符串Data, NonAsciiæøåÆøÅöôêÊ字符串Responses, OptionsCallWithoutParametersAndResponseData, PatchApiVbyApiVersionNoTagData, PatchApiVbyApiVersionNoTagResponses, PatchCallWithoutParametersAndResponseData, PostApiVbyApiVersionFormDataData, PostApiVbyApiVersionRequestBodyData, PostCallWithOptionalParamData, PostCallWithOptionalParamResponses, PostCallWithoutParametersAndResponseData, PutCallWithoutParametersAndResponseData, PutWithFormUrlEncodedData, TestErrorCodeData, TestErrorCodeErrors, TestErrorCodeResponses, TypesData, TypesResponses, UploadFileData, UploadFileResponses } from './types.gen';\n\nexport type Options<TData extends TDataShape = TDataShape, ThrowOnError extends boolean = boolean> = Options2<TData, ThrowOnError> & {\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\nexport const export_ = <ThrowOnError extends boolean = false>(options?: Options<ExportData, ThrowOnError>) => (options?.client ?? client).get<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/no+tag', ...options });\n\nexport const patchApiVbyApiVersionNoTag = <ThrowOnError extends boolean = false>(options?: Options<PatchApiVbyApiVersionNoTagData, ThrowOnError>) => (options?.client ?? client).patch<PatchApiVbyApiVersionNoTagResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/no+tag', ...options });\n\nexport const import_ = <ThrowOnError extends boolean = false>(options: Options<ImportData, ThrowOnError>) => (options.client ?? client).post<ImportResponses, unknown, ThrowOnError>({\n    url: '/api/v{api-version}/no+tag',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options.headers\n    }\n});\n\nexport const fooWow = <ThrowOnError extends boolean = false>(options?: Options<FooWowData, ThrowOnError>) => (options?.client ?? client).put<FooWowResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/no+tag', ...options });\n\nexport const apiVVersionODataControllerCount = <ThrowOnError extends boolean = false>(options?: Options<ApiVVersionODataControllerCountData, ThrowOnError>) => (options?.client ?? client).get<ApiVVersionODataControllerCountResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple/$count', ...options });\n\nexport const getApiVbyApiVersionSimpleOperation = <ThrowOnError extends boolean = false>(options: Options<GetApiVbyApiVersionSimpleOperationData, ThrowOnError>) => (options.client ?? client).get<GetApiVbyApiVersionSimpleOperationResponses, GetApiVbyApiVersionSimpleOperationErrors, ThrowOnError>({ url: '/api/v{api-version}/simple:operation', ...options });\n\nexport const deleteCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<DeleteCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).delete<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const getCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<GetCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).get<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const headCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<HeadCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).head<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const optionsCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<OptionsCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).options<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const patchCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<PatchCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).patch<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const postCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<PostCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).post<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const putCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<PutCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).put<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const deleteFoo = <ThrowOnError extends boolean = false>(options: Options<DeleteFooData3, ThrowOnError>) => (options.client ?? client).delete<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/foo/{foo_param}/bar/{BarParam}', ...options });\n\nexport const callWithDescriptions = <ThrowOnError extends boolean = false>(options?: Options<CallWithDescriptionsData, ThrowOnError>) => (options?.client ?? client).post<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/descriptions', ...options });\n\n/**\n * @deprecated\n */\nexport const deprecatedCall = <ThrowOnError extends boolean = false>(options: Options<DeprecatedCallData, ThrowOnError>) => (options.client ?? client).post<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/parameters/deprecated', ...options });\n\nexport const callWithParameters = <ThrowOnError extends boolean = false>(options: Options<CallWithParametersData, ThrowOnError>) => (options.client ?? client).post<unknown, unknown, ThrowOnError>({\n    url: '/api/v{api-version}/parameters/{parameterPath}',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options.headers\n    }\n});\n\nexport const callWithWeirdParameterNames = <ThrowOnError extends boolean = false>(options: Options<CallWithWeirdParameterNamesData, ThrowOnError>) => (options.client ?? client).post<unknown, unknown, ThrowOnError>({\n    url: '/api/v{api-version}/parameters/{parameter.path.1}/{parameter-path-2}/{PARAMETER-PATH-3}',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options.headers\n    }\n});\n\nexport const getCallWithOptionalParam = <ThrowOnError extends boolean = false>(options: Options<GetCallWithOptionalParamData, ThrowOnError>) => (options.client ?? client).get<unknown, unknown, ThrowOnError>({\n    url: '/api/v{api-version}/parameters',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options.headers\n    }\n});\n\nexport const postCallWithOptionalParam = <ThrowOnError extends boolean = false>(options: Options<PostCallWithOptionalParamData, ThrowOnError>) => (options.client ?? client).post<PostCallWithOptionalParamResponses, unknown, ThrowOnError>({\n    url: '/api/v{api-version}/parameters',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options.headers\n    }\n});\n\nexport const postApiVbyApiVersionRequestBody = <ThrowOnError extends boolean = false>(options?: Options<PostApiVbyApiVersionRequestBodyData, ThrowOnError>) => (options?.client ?? client).post<unknown, unknown, ThrowOnError>({\n    url: '/api/v{api-version}/requestBody',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options?.headers\n    }\n});\n\nexport const postApiVbyApiVersionFormData = <ThrowOnError extends boolean = false>(options?: Options<PostApiVbyApiVersionFormDataData, ThrowOnError>) => (options?.client ?? client).post<unknown, unknown, ThrowOnError>({\n    ...formDataBodySerializer,\n    url: '/api/v{api-version}/formData',\n    ...options,\n    headers: {\n        'Content-Type': null,\n        ...options?.headers\n    }\n});\n\nexport const callWithDefaultParameters = <ThrowOnError extends boolean = false>(options?: Options<CallWithDefaultParametersData, ThrowOnError>) => (options?.client ?? client).get<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/defaults', ...options });\n\nexport const callWithDefaultOptionalParameters = <ThrowOnError extends boolean = false>(options?: Options<CallWithDefaultOptionalParametersData, ThrowOnError>) => (options?.client ?? client).post<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/defaults', ...options });\n\nexport const callToTestOrderOfParams = <ThrowOnError extends boolean = false>(options: Options<CallToTestOrderOfParamsData, ThrowOnError>) => (options.client ?? client).put<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/defaults', ...options });\n\nexport const duplicateName = <ThrowOnError extends boolean = false>(options?: Options<DuplicateNameData, ThrowOnError>) => (options?.client ?? client).delete<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/duplicate', ...options });\n\nexport const duplicateName2 = <ThrowOnError extends boolean = false>(options?: Options<DuplicateName2Data, ThrowOnError>) => (options?.client ?? client).get<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/duplicate', ...options });\n\nexport const duplicateName3 = <ThrowOnError extends boolean = false>(options?: Options<DuplicateName3Data, ThrowOnError>) => (options?.client ?? client).post<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/duplicate', ...options });\n\nexport const duplicateName4 = <ThrowOnError extends boolean = false>(options?: Options<DuplicateName4Data, ThrowOnError>) => (options?.client ?? client).put<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/duplicate', ...options });\n\nexport const callWithNoContentResponse = <ThrowOnError extends boolean = false>(options?: Options<CallWithNoContentResponseData, ThrowOnError>) => (options?.client ?? client).get<CallWithNoContentResponseResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/no-content', ...options });\n\nexport const callWithResponseAndNoContentResponse = <ThrowOnError extends boolean = false>(options?: Options<CallWithResponseAndNoContentResponseData, ThrowOnError>) => (options?.client ?? client).get<CallWithResponseAndNoContentResponseResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/multiple-tags/response-and-no-content', ...options });\n\nexport const dummyA = <ThrowOnError extends boolean = false>(options?: Options<DummyAData, ThrowOnError>) => (options?.client ?? client).get<DummyAResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/multiple-tags/a', ...options });\n\nexport const dummyB = <ThrowOnError extends boolean = false>(options?: Options<DummyBData, ThrowOnError>) => (options?.client ?? client).get<DummyBResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/multiple-tags/b', ...options });\n\nexport const callWithResponse = <ThrowOnError extends boolean = false>(options?: Options<CallWithResponseData, ThrowOnError>) => (options?.client ?? client).get<CallWithResponseResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/response', ...options });\n\nexport const callWithDuplicateResponses = <ThrowOnError extends boolean = false>(options?: Options<CallWithDuplicateResponsesData, ThrowOnError>) => (options?.client ?? client).post<CallWithDuplicateResponsesResponses, CallWithDuplicateResponsesErrors, ThrowOnError>({ url: '/api/v{api-version}/response', ...options });\n\nexport const callWithResponses = <ThrowOnError extends boolean = false>(options?: Options<CallWithResponsesData, ThrowOnError>) => (options?.client ?? client).put<CallWithResponsesResponses, CallWithResponsesErrors, ThrowOnError>({ url: '/api/v{api-version}/response', ...options });\n\nexport const collectionFormat = <ThrowOnError extends boolean = false>(options: Options<CollectionFormatData, ThrowOnError>) => (options.client ?? client).get<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/collectionFormat', ...options });\n\nexport const types = <ThrowOnError extends boolean = false>(options: Options<TypesData, ThrowOnError>) => (options.client ?? client).get<TypesResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/types', ...options });\n\nexport const uploadFile = <ThrowOnError extends boolean = false>(options: Options<UploadFileData, ThrowOnError>) => (options.client ?? client).post<UploadFileResponses, unknown, ThrowOnError>({\n    ...urlSearchParamsBodySerializer,\n    url: '/api/v{api-version}/upload',\n    ...options,\n    headers: {\n        'Content-Type': 'application/x-www-form-urlencoded',\n        ...options.headers\n    }\n});\n\nexport const fileResponse = <ThrowOnError extends boolean = false>(options: Options<FileResponseData, ThrowOnError>) => (options.client ?? client).get<FileResponseResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/file/{id}', ...options });\n\nexport const complexTypes = <ThrowOnError extends boolean = false>(options: Options<ComplexTypesData, ThrowOnError>) => (options.client ?? client).get<ComplexTypesResponses, ComplexTypesErrors, ThrowOnError>({\n    querySerializer: { parameters: { parameterObject: { object: { style: 'form' } } } },\n    url: '/api/v{api-version}/complex',\n    ...options\n});\n\nexport const multipartResponse = <ThrowOnError extends boolean = false>(options?: Options<MultipartResponseData, ThrowOnError>) => (options?.client ?? client).get<MultipartResponseResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/multipart', ...options });\n\nexport const multipartRequest = <ThrowOnError extends boolean = false>(options?: Options<MultipartRequestData, ThrowOnError>) => (options?.client ?? client).post<unknown, unknown, ThrowOnError>({\n    ...formDataBodySerializer,\n    url: '/api/v{api-version}/multipart',\n    ...options,\n    headers: {\n        'Content-Type': null,\n        ...options?.headers\n    }\n});\n\nexport const complexParams = <ThrowOnError extends boolean = false>(options: Options<ComplexParamsData, ThrowOnError>) => (options.client ?? client).put<ComplexParamsResponses, unknown, ThrowOnError>({\n    url: '/api/v{api-version}/complex/{id}',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json-patch+json',\n        ...options.headers\n    }\n});\n\nexport const callWithResultFromHeader = <ThrowOnError extends boolean = false>(options?: Options<CallWithResultFromHeaderData, ThrowOnError>) => (options?.client ?? client).post<CallWithResultFromHeaderResponses, CallWithResultFromHeaderErrors, ThrowOnError>({ url: '/api/v{api-version}/header', ...options });\n\nexport const testErrorCode = <ThrowOnError extends boolean = false>(options: Options<TestErrorCodeData, ThrowOnError>) => (options.client ?? client).post<TestErrorCodeResponses, TestErrorCodeErrors, ThrowOnError>({ url: '/api/v{api-version}/error', ...options });\n\nexport const nonAsciiæøåÆøÅöôêÊ字符串 = <ThrowOnError extends boolean = false>(options: Options<NonAsciiæøåÆøÅöôêÊ字符串Data, ThrowOnError>) => (options.client ?? client).post<NonAsciiæøåÆøÅöôêÊ字符串Responses, unknown, ThrowOnError>({ url: '/api/v{api-version}/non-ascii-æøåÆØÅöôêÊ字符串', ...options });\n\n/**\n * Login User\n */\nexport const putWithFormUrlEncoded = <ThrowOnError extends boolean = false>(options: Options<PutWithFormUrlEncodedData, ThrowOnError>) => (options.client ?? client).put<unknown, unknown, ThrowOnError>({\n    ...urlSearchParamsBodySerializer,\n    url: '/api/v{api-version}/non-ascii-æøåÆØÅöôêÊ字符串',\n    ...options,\n    headers: {\n        'Content-Type': 'application/x-www-form-urlencoded',\n        ...options.headers\n    }\n});\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/react-query/useMutation/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type ClientOptions = {\n    baseUrl: 'http://localhost:3000/base' | (string & {});\n};\n\n/**\n * Model with number-only name\n */\nexport type _400 = string;\n\nexport type ExternalRefA = ExternalSharedModel;\n\nexport type ExternalRefB = ExternalSharedModel;\n\n/**\n * Testing multiline comments in string: First line\n * Second line\n *\n * Fourth line\n */\nexport type CamelCaseCommentWithBreaks = number;\n\n/**\n * Testing multiline comments in string: First line\n * Second line\n *\n * Fourth line\n */\nexport type CommentWithBreaks = number;\n\n/**\n * Testing backticks in string: `backticks` and ```multiple backticks``` should work\n */\nexport type CommentWithBackticks = number;\n\n/**\n * Testing backticks and quotes in string: `backticks`, 'quotes', \"double quotes\" and ```multiple backticks``` should work\n */\nexport type CommentWithBackticksAndQuotes = number;\n\n/**\n * Testing slashes in string: \\backwards\\\\\\ and /forwards/// should work\n */\nexport type CommentWithSlashes = number;\n\n/**\n * Testing expression placeholders in string: ${expression} should work\n */\nexport type CommentWithExpressionPlaceholders = number;\n\n/**\n * Testing quotes in string: 'single quote''' and \"double quotes\"\"\" should work\n */\nexport type CommentWithQuotes = number;\n\n/**\n * Testing reserved characters in string: * inline * and ** inline ** should work\n */\nexport type CommentWithReservedCharacters = number;\n\n/**\n * This is a simple number\n */\nexport type SimpleInteger = number;\n\n/**\n * This is a simple boolean\n */\nexport type SimpleBoolean = boolean;\n\n/**\n * This is a simple string\n */\nexport type SimpleString = string;\n\n/**\n * A string with non-ascii (unicode) characters valid in typescript identifiers (æøåÆØÅöÔèÈ字符串)\n */\nexport type NonAsciiStringæøåÆøÅöôêÊ字符串 = string;\n\n/**\n * This is a simple file\n */\nexport type SimpleFile = Blob | File;\n\n/**\n * This is a simple reference\n */\nexport type SimpleReference = ModelWithString;\n\n/**\n * This is a simple string\n */\nexport type SimpleStringWithPattern = string | null;\n\n/**\n * This is a simple enum with strings\n */\nexport type EnumWithStrings = 'Success' | 'Warning' | 'Error' | '\\'Single Quote\\'' | '\"Double Quotes\"' | 'Non-ascii: øæåôöØÆÅÔÖ字符串';\n\nexport type EnumWithReplacedCharacters = '\\'Single Quote\\'' | '\"Double Quotes\"' | 'øæåôöØÆÅÔÖ字符串' | 3.1 | '';\n\n/**\n * This is a simple enum with numbers\n */\nexport type EnumWithNumbers = 1 | 2 | 3 | 1.1 | 1.2 | 1.3 | 100 | 200 | 300 | -100 | -200 | -300 | -1.1 | -1.2 | -1.3;\n\n/**\n * Success=1,Warning=2,Error=3\n */\nexport type EnumFromDescription = number;\n\n/**\n * This is a simple enum with numbers\n */\nexport type EnumWithExtensions = 200 | 400 | 500;\n\nexport type EnumWithXEnumNames = 0 | 1 | 2;\n\n/**\n * This is a simple array with numbers\n */\nexport type ArrayWithNumbers = Array<number>;\n\n/**\n * This is a simple array with booleans\n */\nexport type ArrayWithBooleans = Array<boolean>;\n\n/**\n * This is a simple array with strings\n */\nexport type ArrayWithStrings = Array<string>;\n\n/**\n * This is a simple array with references\n */\nexport type ArrayWithReferences = Array<ModelWithString>;\n\n/**\n * This is a simple array containing an array\n */\nexport type ArrayWithArray = Array<Array<ModelWithString>>;\n\n/**\n * This is a simple array with properties\n */\nexport type ArrayWithProperties = Array<{\n    '16x16'?: CamelCaseCommentWithBreaks;\n    bar?: string;\n}>;\n\n/**\n * This is a simple array with any of properties\n */\nexport type ArrayWithAnyOfProperties = Array<{\n    foo?: string;\n} | {\n    bar?: string;\n}>;\n\nexport type AnyOfAnyAndNull = {\n    data?: unknown;\n};\n\n/**\n * This is a simple array with any of properties\n */\nexport type AnyOfArrays = {\n    results?: Array<{\n        foo?: string;\n    } | {\n        bar?: string;\n    }>;\n};\n\n/**\n * This is a string dictionary\n */\nexport type DictionaryWithString = {\n    [key: string]: string;\n};\n\nexport type DictionaryWithPropertiesAndAdditionalProperties = {\n    foo?: number;\n    bar?: boolean;\n    [key: string]: string | number | boolean | undefined;\n};\n\n/**\n * This is a string reference\n */\nexport type DictionaryWithReference = {\n    [key: string]: ModelWithString;\n};\n\n/**\n * This is a complex dictionary\n */\nexport type DictionaryWithArray = {\n    [key: string]: Array<ModelWithString>;\n};\n\n/**\n * This is a string dictionary\n */\nexport type DictionaryWithDictionary = {\n    [key: string]: {\n        [key: string]: string;\n    };\n};\n\n/**\n * This is a complex dictionary\n */\nexport type DictionaryWithProperties = {\n    [key: string]: {\n        foo?: string;\n        bar?: string;\n    };\n};\n\n/**\n * This is a model with one number property\n */\nexport type ModelWithInteger = {\n    /**\n     * This is a simple number property\n     */\n    prop?: number;\n};\n\n/**\n * This is a model with one boolean property\n */\nexport type ModelWithBoolean = {\n    /**\n     * This is a simple boolean property\n     */\n    prop?: boolean;\n};\n\n/**\n * This is a model with one string property\n */\nexport type ModelWithString = {\n    /**\n     * This is a simple string property\n     */\n    prop?: string;\n};\n\n/**\n * This is a model with one string property\n */\nexport type ModelWithStringError = {\n    /**\n     * This is a simple string property\n     */\n    prop?: string;\n};\n\n/**\n * `Comment` or `VoiceComment`. The JSON object for adding voice comments to tickets is different. See [Adding voice comments to tickets](/documentation/ticketing/managing-tickets/adding-voice-comments-to-tickets)\n */\nexport type ModelFromZendesk = string;\n\n/**\n * This is a model with one string property\n */\nexport type ModelWithNullableString = {\n    /**\n     * This is a simple string property\n     */\n    nullableProp1?: string | null;\n    /**\n     * This is a simple string property\n     */\n    nullableRequiredProp1: string | null;\n    /**\n     * This is a simple string property\n     */\n    nullableProp2?: string | null;\n    /**\n     * This is a simple string property\n     */\n    nullableRequiredProp2: string | null;\n    /**\n     * This is a simple enum with strings\n     */\n    'foo_bar-enum'?: 'Success' | 'Warning' | 'Error' | 'ØÆÅ字符串';\n};\n\n/**\n * This is a model with one enum\n */\nexport type ModelWithEnum = {\n    /**\n     * This is a simple enum with strings\n     */\n    'foo_bar-enum'?: 'Success' | 'Warning' | 'Error' | 'ØÆÅ字符串';\n    /**\n     * These are the HTTP error code enums\n     */\n    statusCode?: '100' | '200 FOO' | '300 FOO_BAR' | '400 foo-bar' | '500 foo.bar' | '600 foo&bar';\n    /**\n     * Simple boolean enum\n     */\n    bool?: true;\n};\n\n/**\n * This is a model with one enum with escaped name\n */\nexport type ModelWithEnumWithHyphen = {\n    /**\n     * Foo-Bar-Baz-Qux\n     */\n    'foo-bar-baz-qux'?: '3.0';\n};\n\n/**\n * This is a model with one enum\n */\nexport type ModelWithEnumFromDescription = {\n    /**\n     * Success=1,Warning=2,Error=3\n     */\n    test?: number;\n};\n\n/**\n * This is a model with nested enums\n */\nexport type ModelWithNestedEnums = {\n    dictionaryWithEnum?: {\n        [key: string]: 'Success' | 'Warning' | 'Error';\n    };\n    dictionaryWithEnumFromDescription?: {\n        [key: string]: number;\n    };\n    arrayWithEnum?: Array<'Success' | 'Warning' | 'Error'>;\n    arrayWithDescription?: Array<number>;\n    /**\n     * This is a simple enum with strings\n     */\n    'foo_bar-enum'?: 'Success' | 'Warning' | 'Error' | 'ØÆÅ字符串';\n};\n\n/**\n * This is a model with one property containing a reference\n */\nexport type ModelWithReference = {\n    prop?: ModelWithProperties;\n};\n\n/**\n * This is a model with one property containing an array\n */\nexport type ModelWithArrayReadOnlyAndWriteOnly = {\n    prop?: Array<ModelWithReadOnlyAndWriteOnly>;\n    propWithFile?: Array<Blob | File>;\n    propWithNumber?: Array<number>;\n};\n\n/**\n * This is a model with one property containing an array\n */\nexport type ModelWithArray = {\n    prop?: Array<ModelWithString>;\n    propWithFile?: Array<Blob | File>;\n    propWithNumber?: Array<number>;\n};\n\n/**\n * This is a model with one property containing a dictionary\n */\nexport type ModelWithDictionary = {\n    prop?: {\n        [key: string]: string;\n    };\n};\n\n/**\n * This is a deprecated model with a deprecated property\n *\n * @deprecated\n */\nexport type DeprecatedModel = {\n    /**\n     * This is a deprecated property\n     *\n     * @deprecated\n     */\n    prop?: string;\n};\n\n/**\n * This is a model with one property containing a circular reference\n */\nexport type ModelWithCircularReference = {\n    prop?: ModelWithCircularReference;\n};\n\n/**\n * This is a model with one property with a 'one of' relationship\n */\nexport type CompositionWithOneOf = {\n    propA?: ModelWithString | ModelWithEnum | ModelWithArray | ModelWithDictionary;\n};\n\n/**\n * This is a model with one property with a 'one of' relationship where the options are not $ref\n */\nexport type CompositionWithOneOfAnonymous = {\n    propA?: {\n        propA?: string;\n    } | string | number;\n};\n\n/**\n * Circle\n */\nexport type ModelCircle = {\n    kind: string;\n    radius?: number;\n};\n\n/**\n * Square\n */\nexport type ModelSquare = {\n    kind: string;\n    sideLength?: number;\n};\n\n/**\n * This is a model with one property with a 'one of' relationship where the options are not $ref\n */\nexport type CompositionWithOneOfDiscriminator = ({\n    kind: 'circle';\n} & ModelCircle) | ({\n    kind: 'square';\n} & ModelSquare);\n\n/**\n * This is a model with one property with a 'any of' relationship\n */\nexport type CompositionWithAnyOf = {\n    propA?: ModelWithString | ModelWithEnum | ModelWithArray | ModelWithDictionary;\n};\n\n/**\n * This is a model with one property with a 'any of' relationship where the options are not $ref\n */\nexport type CompositionWithAnyOfAnonymous = {\n    propA?: {\n        propA?: string;\n    } | string | number;\n};\n\n/**\n * This is a model with nested 'any of' property with a type null\n */\nexport type CompositionWithNestedAnyAndTypeNull = {\n    propA?: Array<ModelWithDictionary | null> | Array<ModelWithArray | null>;\n};\n\nexport type _3eNum1Период = 'Bird' | 'Dog';\n\nexport type ConstValue = 'ConstValue';\n\n/**\n * This is a model with one property with a 'any of' relationship where the options are not $ref\n */\nexport type CompositionWithNestedAnyOfAndNull = {\n    propA?: Array<_3eNum1Период | ConstValue> | null;\n};\n\n/**\n * This is a model with one property with a 'one of' relationship\n */\nexport type CompositionWithOneOfAndNullable = {\n    propA?: {\n        boolean?: boolean;\n    } | ModelWithEnum | ModelWithArray | ModelWithDictionary | null;\n};\n\n/**\n * This is a model that contains a simple dictionary within composition\n */\nexport type CompositionWithOneOfAndSimpleDictionary = {\n    propA?: boolean | {\n        [key: string]: number;\n    };\n};\n\n/**\n * This is a model that contains a dictionary of simple arrays within composition\n */\nexport type CompositionWithOneOfAndSimpleArrayDictionary = {\n    propA?: boolean | {\n        [key: string]: Array<boolean>;\n    };\n};\n\n/**\n * This is a model that contains a dictionary of complex arrays (composited) within composition\n */\nexport type CompositionWithOneOfAndComplexArrayDictionary = {\n    propA?: boolean | {\n        [key: string]: Array<number | string>;\n    };\n};\n\n/**\n * This is a model with one property with a 'all of' relationship\n */\nexport type CompositionWithAllOfAndNullable = {\n    propA?: ({\n        boolean?: boolean;\n    } & ModelWithEnum & ModelWithArray & ModelWithDictionary) | null;\n};\n\n/**\n * This is a model with one property with a 'any of' relationship\n */\nexport type CompositionWithAnyOfAndNullable = {\n    propA?: {\n        boolean?: boolean;\n    } | ModelWithEnum | ModelWithArray | ModelWithDictionary | null;\n};\n\n/**\n * This is a base model with two simple optional properties\n */\nexport type CompositionBaseModel = {\n    firstName?: string;\n    lastname?: string;\n};\n\n/**\n * This is a model that extends the base model\n */\nexport type CompositionExtendedModel = CompositionBaseModel & {\n    age: number;\n    firstName: string;\n    lastname: string;\n};\n\n/**\n * This is a model with one nested property\n */\nexport type ModelWithProperties = {\n    required: string;\n    readonly requiredAndReadOnly: string;\n    requiredAndNullable: string | null;\n    string?: string;\n    number?: number;\n    boolean?: boolean;\n    reference?: ModelWithString;\n    'property with space'?: string;\n    default?: string;\n    try?: string;\n    readonly '@namespace.string'?: string;\n    readonly '@namespace.integer'?: number;\n};\n\n/**\n * This is a model with one nested property\n */\nexport type ModelWithNestedProperties = {\n    readonly first: {\n        readonly second: {\n            readonly third: string | null;\n        } | null;\n    } | null;\n};\n\n/**\n * This is a model with duplicated properties\n */\nexport type ModelWithDuplicateProperties = {\n    prop?: ModelWithString;\n};\n\n/**\n * This is a model with ordered properties\n */\nexport type ModelWithOrderedProperties = {\n    zebra?: string;\n    apple?: string;\n    hawaii?: string;\n};\n\n/**\n * This is a model with duplicated imports\n */\nexport type ModelWithDuplicateImports = {\n    propA?: ModelWithString;\n    propB?: ModelWithString;\n    propC?: ModelWithString;\n};\n\n/**\n * This is a model that extends another model\n */\nexport type ModelThatExtends = ModelWithString & {\n    propExtendsA?: string;\n    propExtendsB?: ModelWithString;\n};\n\n/**\n * This is a model that extends another model\n */\nexport type ModelThatExtendsExtends = ModelWithString & ModelThatExtends & {\n    propExtendsC?: string;\n    propExtendsD?: ModelWithString;\n};\n\n/**\n * This is a model that contains a some patterns\n */\nexport type ModelWithPattern = {\n    key: string;\n    name: string;\n    readonly enabled?: boolean;\n    readonly modified?: string;\n    id?: string;\n    text?: string;\n    patternWithSingleQuotes?: string;\n    patternWithNewline?: string;\n    patternWithBacktick?: string;\n    patternWithUnicode?: string;\n};\n\nexport type File = {\n    /**\n     * Id\n     */\n    readonly id?: string;\n    /**\n     * Updated at\n     */\n    readonly updated_at?: string;\n    /**\n     * Created at\n     */\n    readonly created_at?: string;\n    /**\n     * Mime\n     */\n    mime: string;\n    /**\n     * File\n     */\n    readonly file?: string;\n};\n\nexport type Default = {\n    name?: string;\n};\n\nexport type Pageable = {\n    page?: number;\n    size?: number;\n    sort?: Array<string>;\n};\n\n/**\n * This is a free-form object without additionalProperties.\n */\nexport type FreeFormObjectWithoutAdditionalProperties = {\n    [key: string]: unknown;\n};\n\n/**\n * This is a free-form object with additionalProperties: true.\n */\nexport type FreeFormObjectWithAdditionalPropertiesEqTrue = {\n    [key: string]: unknown;\n};\n\n/**\n * This is a free-form object with additionalProperties: {}.\n */\nexport type FreeFormObjectWithAdditionalPropertiesEqEmptyObject = {\n    [key: string]: unknown;\n};\n\nexport type ModelWithConst = {\n    String?: 'String';\n    number?: 0;\n    null?: unknown;\n    withType?: 'Some string';\n};\n\n/**\n * This is a model with one property and additionalProperties: true\n */\nexport type ModelWithAdditionalPropertiesEqTrue = {\n    /**\n     * This is a simple string property\n     */\n    prop?: string;\n    [key: string]: unknown;\n};\n\nexport type NestedAnyOfArraysNullable = {\n    nullableArray?: Array<string | boolean> | null;\n};\n\nexport type CompositionWithOneOfAndProperties = ({\n    foo: SimpleParameter;\n} | {\n    bar: NonAsciiStringæøåÆøÅöôêÊ字符串;\n}) & {\n    baz: number | null;\n    qux: number;\n};\n\n/**\n * An object that can be null\n */\nexport type NullableObject = {\n    foo?: string;\n} | null;\n\n/**\n * Some % character\n */\nexport type CharactersInDescription = string;\n\nexport type ModelWithNullableObject = {\n    data?: NullableObject;\n};\n\n/**\n * An object with additional properties that can be null\n */\nexport type ModelWithAdditionalPropertiesRef = {\n    [key: string]: NullableObject | null;\n};\n\nexport type ModelWithOneOfEnum = {\n    foo: 'Bar';\n} | {\n    foo: 'Baz';\n} | {\n    foo: 'Qux';\n} | {\n    content: string;\n    foo: 'Quux';\n} | {\n    content: [\n        string,\n        string\n    ];\n    foo: 'Corge';\n};\n\nexport type ModelWithNestedArrayEnumsDataFoo = 'foo' | 'bar';\n\nexport type ModelWithNestedArrayEnumsDataBar = 'baz' | 'qux';\n\nexport type ModelWithNestedArrayEnumsData = {\n    foo?: Array<ModelWithNestedArrayEnumsDataFoo>;\n    bar?: Array<ModelWithNestedArrayEnumsDataBar>;\n};\n\nexport type ModelWithNestedArrayEnums = {\n    array_strings?: Array<string>;\n    data?: ModelWithNestedArrayEnumsData;\n};\n\nexport type ModelWithNestedCompositionEnums = {\n    foo?: ModelWithNestedArrayEnumsDataFoo;\n};\n\nexport type ModelWithReadOnlyAndWriteOnly = {\n    foo: string;\n    readonly bar: string;\n};\n\nexport type ModelWithConstantSizeArray = [\n    number,\n    number\n];\n\nexport type ModelWithAnyOfConstantSizeArray = [\n    number | string,\n    number | string,\n    number | string\n];\n\nexport type ModelWithPrefixItemsConstantSizeArray = Array<ModelWithInteger | number | string>;\n\nexport type ModelWithAnyOfConstantSizeArrayNullable = [\n    number | null | string,\n    number | null | string,\n    number | null | string\n];\n\nexport type ModelWithAnyOfConstantSizeArrayWithNSizeAndOptions = [\n    number | Import,\n    number | Import\n];\n\nexport type ModelWithAnyOfConstantSizeArrayAndIntersect = [\n    number & string,\n    number & string\n];\n\nexport type ModelWithNumericEnumUnion = {\n    /**\n     * Период\n     */\n    value?: -10 | -1 | 0 | 1 | 3 | 6 | 12;\n};\n\n/**\n * Some description with `back ticks`\n */\nexport type ModelWithBackticksInDescription = {\n    /**\n     * The template `that` should be used for parsing and importing the contents of the CSV file.\n     *\n     * <br/><p>There is one placeholder currently supported:<ul>     <li><b>${x}</b> - refers to the n-th column in the CSV file, e.g. ${1}, ${2}, ...)</li></ul><p>Example of a correct JSON template:</p>\n     * <pre>\n     * [\n     * {\n     * \"resourceType\": \"Asset\",\n     * \"identifier\": {\n     * \"name\": \"${1}\",\n     * \"domain\": {\n     * \"name\": \"${2}\",\n     * \"community\": {\n     * \"name\": \"Some Community\"\n     * }\n     * }\n     * },\n     * \"attributes\" : {\n     * \"00000000-0000-0000-0000-000000003115\" : [ {\n     * \"value\" : \"${3}\"\n     * } ],\n     * \"00000000-0000-0000-0000-000000000222\" : [ {\n     * \"value\" : \"${4}\"\n     * } ]\n     * }\n     * }\n     * ]\n     * </pre>\n     */\n    template?: string;\n};\n\nexport type ModelWithOneOfAndProperties = (SimpleParameter | NonAsciiStringæøåÆøÅöôêÊ字符串) & {\n    baz: number | null;\n    qux: number;\n};\n\n/**\n * Model used to test deduplication strategy (unused)\n */\nexport type ParameterSimpleParameterUnused = string;\n\n/**\n * Model used to test deduplication strategy\n */\nexport type PostServiceWithEmptyTagResponse = string;\n\n/**\n * Model used to test deduplication strategy\n */\nexport type PostServiceWithEmptyTagResponse2 = string;\n\n/**\n * Model used to test deduplication strategy\n */\nexport type DeleteFooData = string;\n\n/**\n * Model used to test deduplication strategy\n */\nexport type DeleteFooData2 = string;\n\n/**\n * Model with restricted keyword name\n */\nexport type Import = string;\n\nexport type SchemaWithFormRestrictedKeys = {\n    description?: string;\n    'x-enum-descriptions'?: string;\n    'x-enum-varnames'?: string;\n    'x-enumNames'?: string;\n    title?: string;\n    object?: {\n        description?: string;\n        'x-enum-descriptions'?: string;\n        'x-enum-varnames'?: string;\n        'x-enumNames'?: string;\n        title?: string;\n    };\n    array?: Array<{\n        description?: string;\n        'x-enum-descriptions'?: string;\n        'x-enum-varnames'?: string;\n        'x-enumNames'?: string;\n        title?: string;\n    }>;\n};\n\n/**\n * This schema was giving PascalCase transformations a hard time\n */\nexport type IoK8sApimachineryPkgApisMetaV1DeleteOptions = {\n    /**\n     * Must be fulfilled before a deletion is carried out. If not possible, a 409 Conflict status will be returned.\n     */\n    preconditions?: IoK8sApimachineryPkgApisMetaV1Preconditions;\n};\n\n/**\n * This schema was giving PascalCase transformations a hard time\n */\nexport type IoK8sApimachineryPkgApisMetaV1Preconditions = {\n    /**\n     * Specifies the target ResourceVersion\n     */\n    resourceVersion?: string;\n    /**\n     * Specifies the target UID.\n     */\n    uid?: string;\n};\n\nexport type AdditionalPropertiesUnknownIssue = {\n    [key: string]: string | number;\n};\n\nexport type AdditionalPropertiesUnknownIssue2 = {\n    [key: string]: string | number;\n};\n\nexport type AdditionalPropertiesUnknownIssue3 = string & {\n    entries: {\n        [key: string]: AdditionalPropertiesUnknownIssue;\n    };\n};\n\nexport type AdditionalPropertiesIntegerIssue = {\n    value: number;\n    [key: string]: number;\n};\n\nexport type OneOfAllOfIssue = ((ConstValue | GenericSchemaDuplicateIssue1SystemBoolean) & _3eNum1Период) | GenericSchemaDuplicateIssue1SystemString;\n\nexport type GenericSchemaDuplicateIssue1SystemBoolean = {\n    item?: boolean;\n    error?: string | null;\n    readonly hasError?: boolean;\n    data?: {\n        [key: string]: never;\n    };\n};\n\nexport type GenericSchemaDuplicateIssue1SystemString = {\n    item?: string | null;\n    error?: string | null;\n    readonly hasError?: boolean;\n};\n\nexport type ExternalSharedModel = {\n    id: string;\n    name?: string;\n};\n\n/**\n * This is a model with one property containing a reference\n */\nexport type ModelWithReferenceWritable = {\n    prop?: ModelWithPropertiesWritable;\n};\n\n/**\n * This is a model with one property containing an array\n */\nexport type ModelWithArrayReadOnlyAndWriteOnlyWritable = {\n    prop?: Array<ModelWithReadOnlyAndWriteOnlyWritable>;\n    propWithFile?: Array<Blob | File>;\n    propWithNumber?: Array<number>;\n};\n\n/**\n * This is a model with one nested property\n */\nexport type ModelWithPropertiesWritable = {\n    required: string;\n    requiredAndNullable: string | null;\n    string?: string;\n    number?: number;\n    boolean?: boolean;\n    reference?: ModelWithString;\n    'property with space'?: string;\n    default?: string;\n    try?: string;\n};\n\n/**\n * This is a model that contains a some patterns\n */\nexport type ModelWithPatternWritable = {\n    key: string;\n    name: string;\n    id?: string;\n    text?: string;\n    patternWithSingleQuotes?: string;\n    patternWithNewline?: string;\n    patternWithBacktick?: string;\n    patternWithUnicode?: string;\n};\n\nexport type FileWritable = {\n    /**\n     * Mime\n     */\n    mime: string;\n};\n\nexport type ModelWithReadOnlyAndWriteOnlyWritable = {\n    foo: string;\n    baz: string;\n};\n\nexport type ModelWithAnyOfConstantSizeArrayWithNSizeAndOptionsWritable = [\n    number | Import,\n    number | Import\n];\n\nexport type AdditionalPropertiesUnknownIssueWritable = {\n    [key: string]: string | number;\n};\n\nexport type OneOfAllOfIssueWritable = ((ConstValue | GenericSchemaDuplicateIssue1SystemBoolean) & _3eNum1Период) | GenericSchemaDuplicateIssue1SystemString;\n\nexport type GenericSchemaDuplicateIssue1SystemBooleanWritable = {\n    item?: boolean;\n    error?: string | null;\n    data?: {\n        [key: string]: never;\n    };\n};\n\nexport type GenericSchemaDuplicateIssue1SystemStringWritable = {\n    item?: string | null;\n    error?: string | null;\n};\n\n/**\n * This is a reusable parameter\n */\nexport type SimpleParameter = string;\n\n/**\n * Parameter with illegal characters\n */\nexport type XFooBar = ModelWithString;\n\nexport type SimpleRequestBody = ModelWithString;\n\nexport type SimpleFormData = ModelWithString;\n\nexport type ExportData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no+tag';\n};\n\nexport type PatchApiVbyApiVersionNoTagData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no+tag';\n};\n\nexport type PatchApiVbyApiVersionNoTagResponses = {\n    /**\n     * OK\n     */\n    default: unknown;\n};\n\nexport type ImportData = {\n    body: ModelWithReadOnlyAndWriteOnlyWritable | ModelWithArrayReadOnlyAndWriteOnlyWritable;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no+tag';\n};\n\nexport type ImportResponses = {\n    /**\n     * Success\n     */\n    200: ModelFromZendesk;\n    /**\n     * Default success response\n     */\n    default: ModelWithReadOnlyAndWriteOnly;\n};\n\nexport type ImportResponse = ImportResponses[keyof ImportResponses];\n\nexport type FooWowData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no+tag';\n};\n\nexport type FooWowResponses = {\n    /**\n     * OK\n     */\n    default: unknown;\n};\n\nexport type ApiVVersionODataControllerCountData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple/$count';\n};\n\nexport type ApiVVersionODataControllerCountResponses = {\n    /**\n     * Success\n     */\n    200: ModelFromZendesk;\n};\n\nexport type ApiVVersionODataControllerCountResponse = ApiVVersionODataControllerCountResponses[keyof ApiVVersionODataControllerCountResponses];\n\nexport type GetApiVbyApiVersionSimpleOperationData = {\n    body?: never;\n    path: {\n        /**\n         * foo in method\n         */\n        foo_param: string;\n    };\n    query?: never;\n    url: '/api/v{api-version}/simple:operation';\n};\n\nexport type GetApiVbyApiVersionSimpleOperationErrors = {\n    /**\n     * Default error response\n     */\n    default: ModelWithBoolean;\n};\n\nexport type GetApiVbyApiVersionSimpleOperationError = GetApiVbyApiVersionSimpleOperationErrors[keyof GetApiVbyApiVersionSimpleOperationErrors];\n\nexport type GetApiVbyApiVersionSimpleOperationResponses = {\n    /**\n     * Response is a simple number\n     */\n    200: number;\n};\n\nexport type GetApiVbyApiVersionSimpleOperationResponse = GetApiVbyApiVersionSimpleOperationResponses[keyof GetApiVbyApiVersionSimpleOperationResponses];\n\nexport type DeleteCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type GetCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type HeadCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type OptionsCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type PatchCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type PostCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type PutCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type DeleteFooData3 = {\n    body?: never;\n    headers: {\n        /**\n         * Parameter with illegal characters\n         */\n        'x-Foo-Bar': ModelWithString;\n    };\n    path: {\n        /**\n         * foo in method\n         */\n        foo_param: string;\n        /**\n         * bar in method\n         */\n        BarParam: string;\n    };\n    query?: never;\n    url: '/api/v{api-version}/foo/{foo_param}/bar/{BarParam}';\n};\n\nexport type CallWithDescriptionsData = {\n    body?: never;\n    path?: never;\n    query?: {\n        /**\n         * Testing multiline comments in string: First line\n         * Second line\n         *\n         * Fourth line\n         */\n        parameterWithBreaks?: string;\n        /**\n         * Testing backticks in string: `backticks` and ```multiple backticks``` should work\n         */\n        parameterWithBackticks?: string;\n        /**\n         * Testing slashes in string: \\backwards\\\\\\ and /forwards/// should work\n         */\n        parameterWithSlashes?: string;\n        /**\n         * Testing expression placeholders in string: ${expression} should work\n         */\n        parameterWithExpressionPlaceholders?: string;\n        /**\n         * Testing quotes in string: 'single quote''' and \"double quotes\"\"\" should work\n         */\n        parameterWithQuotes?: string;\n        /**\n         * Testing reserved characters in string: * inline * and ** inline ** should work\n         */\n        parameterWithReservedCharacters?: string;\n    };\n    url: '/api/v{api-version}/descriptions';\n};\n\nexport type DeprecatedCallData = {\n    body?: never;\n    headers: {\n        /**\n         * This parameter is deprecated\n         *\n         * @deprecated\n         */\n        parameter: DeprecatedModel | null;\n    };\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/parameters/deprecated';\n};\n\nexport type CallWithParametersData = {\n    /**\n     * This is the parameter that goes into the body\n     */\n    body: {\n        [key: string]: unknown;\n    } | null;\n    headers: {\n        /**\n         * This is the parameter that goes into the header\n         */\n        parameterHeader: string | null;\n    };\n    path: {\n        /**\n         * This is the parameter that goes into the path\n         */\n        parameterPath: string | null;\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string | null;\n    };\n    query: {\n        foo_ref_enum?: ModelWithNestedArrayEnumsDataFoo;\n        foo_all_of_enum: ModelWithNestedArrayEnumsDataFoo;\n        /**\n         * This is the parameter that goes into the query params\n         */\n        cursor: string | null;\n    };\n    url: '/api/v{api-version}/parameters/{parameterPath}';\n};\n\nexport type CallWithWeirdParameterNamesData = {\n    /**\n     * This is the parameter that goes into the body\n     */\n    body: ModelWithString | null;\n    headers: {\n        /**\n         * This is the parameter that goes into the request header\n         */\n        'parameter.header': string | null;\n    };\n    path: {\n        /**\n         * This is the parameter that goes into the path\n         */\n        'parameter.path.1'?: string;\n        /**\n         * This is the parameter that goes into the path\n         */\n        'parameter-path-2'?: string;\n        /**\n         * This is the parameter that goes into the path\n         */\n        'PARAMETER-PATH-3'?: string;\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string | null;\n    };\n    query: {\n        /**\n         * This is the parameter with a reserved keyword\n         */\n        default?: string;\n        /**\n         * This is the parameter that goes into the request query params\n         */\n        'parameter-query': string | null;\n    };\n    url: '/api/v{api-version}/parameters/{parameter.path.1}/{parameter-path-2}/{PARAMETER-PATH-3}';\n};\n\nexport type GetCallWithOptionalParamData = {\n    /**\n     * This is a required parameter\n     */\n    body: ModelWithOneOfEnum;\n    path?: never;\n    query?: {\n        /**\n         * This is an optional parameter\n         */\n        page?: number;\n    };\n    url: '/api/v{api-version}/parameters';\n};\n\nexport type PostCallWithOptionalParamData = {\n    /**\n     * This is an optional parameter\n     */\n    body?: {\n        offset?: number | null;\n    };\n    path?: never;\n    query: {\n        /**\n         * This is a required parameter\n         */\n        parameter: Pageable;\n    };\n    url: '/api/v{api-version}/parameters';\n};\n\nexport type PostCallWithOptionalParamResponses = {\n    /**\n     * Response is a simple number\n     */\n    200: number;\n    /**\n     * Success\n     */\n    204: void;\n};\n\nexport type PostCallWithOptionalParamResponse = PostCallWithOptionalParamResponses[keyof PostCallWithOptionalParamResponses];\n\nexport type PostApiVbyApiVersionRequestBodyData = {\n    /**\n     * A reusable request body\n     */\n    body?: SimpleRequestBody;\n    path?: never;\n    query?: {\n        /**\n         * This is a reusable parameter\n         */\n        parameter?: string;\n    };\n    url: '/api/v{api-version}/requestBody';\n};\n\nexport type PostApiVbyApiVersionFormDataData = {\n    /**\n     * A reusable request body\n     */\n    body?: SimpleFormData;\n    path?: never;\n    query?: {\n        /**\n         * This is a reusable parameter\n         */\n        parameter?: string;\n    };\n    url: '/api/v{api-version}/formData';\n};\n\nexport type CallWithDefaultParametersData = {\n    body?: never;\n    path?: never;\n    query?: {\n        /**\n         * This is a simple string with default value\n         */\n        parameterString?: string | null;\n        /**\n         * This is a simple number with default value\n         */\n        parameterNumber?: number | null;\n        /**\n         * This is a simple boolean with default value\n         */\n        parameterBoolean?: boolean | null;\n        /**\n         * This is a simple enum with default value\n         */\n        parameterEnum?: 'Success' | 'Warning' | 'Error';\n        /**\n         * This is a simple model with default value\n         */\n        parameterModel?: ModelWithString | null;\n    };\n    url: '/api/v{api-version}/defaults';\n};\n\nexport type CallWithDefaultOptionalParametersData = {\n    body?: never;\n    path?: never;\n    query?: {\n        /**\n         * This is a simple string that is optional with default value\n         */\n        parameterString?: string;\n        /**\n         * This is a simple number that is optional with default value\n         */\n        parameterNumber?: number;\n        /**\n         * This is a simple boolean that is optional with default value\n         */\n        parameterBoolean?: boolean;\n        /**\n         * This is a simple enum that is optional with default value\n         */\n        parameterEnum?: 'Success' | 'Warning' | 'Error';\n        /**\n         * This is a simple model that is optional with default value\n         */\n        parameterModel?: ModelWithString;\n    };\n    url: '/api/v{api-version}/defaults';\n};\n\nexport type CallToTestOrderOfParamsData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * This is a optional string with default\n         */\n        parameterOptionalStringWithDefault?: string;\n        /**\n         * This is a optional string with empty default\n         */\n        parameterOptionalStringWithEmptyDefault?: string;\n        /**\n         * This is a optional string with no default\n         */\n        parameterOptionalStringWithNoDefault?: string;\n        /**\n         * This is a string with default\n         */\n        parameterStringWithDefault: string;\n        /**\n         * This is a string with empty default\n         */\n        parameterStringWithEmptyDefault: string;\n        /**\n         * This is a string with no default\n         */\n        parameterStringWithNoDefault: string;\n        /**\n         * This is a string that can be null with no default\n         */\n        parameterStringNullableWithNoDefault?: string | null;\n        /**\n         * This is a string that can be null with default\n         */\n        parameterStringNullableWithDefault?: string | null;\n    };\n    url: '/api/v{api-version}/defaults';\n};\n\nexport type DuplicateNameData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/duplicate';\n};\n\nexport type DuplicateName2Data = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/duplicate';\n};\n\nexport type DuplicateName3Data = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/duplicate';\n};\n\nexport type DuplicateName4Data = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/duplicate';\n};\n\nexport type CallWithNoContentResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no-content';\n};\n\nexport type CallWithNoContentResponseResponses = {\n    /**\n     * Success\n     */\n    204: void;\n};\n\nexport type CallWithNoContentResponseResponse = CallWithNoContentResponseResponses[keyof CallWithNoContentResponseResponses];\n\nexport type CallWithResponseAndNoContentResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multiple-tags/response-and-no-content';\n};\n\nexport type CallWithResponseAndNoContentResponseResponses = {\n    /**\n     * Response is a simple number\n     */\n    200: number;\n    /**\n     * Success\n     */\n    204: void;\n};\n\nexport type CallWithResponseAndNoContentResponseResponse = CallWithResponseAndNoContentResponseResponses[keyof CallWithResponseAndNoContentResponseResponses];\n\nexport type DummyAData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multiple-tags/a';\n};\n\nexport type DummyAResponses = {\n    200: _400;\n};\n\nexport type DummyAResponse = DummyAResponses[keyof DummyAResponses];\n\nexport type DummyBData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multiple-tags/b';\n};\n\nexport type DummyBResponses = {\n    /**\n     * Success\n     */\n    204: void;\n};\n\nexport type DummyBResponse = DummyBResponses[keyof DummyBResponses];\n\nexport type CallWithResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/response';\n};\n\nexport type CallWithResponseResponses = {\n    default: Import;\n};\n\nexport type CallWithResponseResponse = CallWithResponseResponses[keyof CallWithResponseResponses];\n\nexport type CallWithDuplicateResponsesData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/response';\n};\n\nexport type CallWithDuplicateResponsesErrors = {\n    /**\n     * Message for 500 error\n     */\n    500: ModelWithStringError;\n    /**\n     * Message for 501 error\n     */\n    501: ModelWithStringError;\n    /**\n     * Message for 502 error\n     */\n    502: ModelWithStringError;\n    /**\n     * Message for 4XX errors\n     */\n    '4XX': DictionaryWithArray;\n    /**\n     * Default error response\n     */\n    default: ModelWithBoolean;\n};\n\nexport type CallWithDuplicateResponsesError = CallWithDuplicateResponsesErrors[keyof CallWithDuplicateResponsesErrors];\n\nexport type CallWithDuplicateResponsesResponses = {\n    /**\n     * Message for 200 response\n     */\n    200: ModelWithBoolean & ModelWithInteger;\n    /**\n     * Message for 201 response\n     */\n    201: ModelWithString;\n    /**\n     * Message for 202 response\n     */\n    202: ModelWithString;\n};\n\nexport type CallWithDuplicateResponsesResponse = CallWithDuplicateResponsesResponses[keyof CallWithDuplicateResponsesResponses];\n\nexport type CallWithResponsesData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/response';\n};\n\nexport type CallWithResponsesErrors = {\n    /**\n     * Message for 500 error\n     */\n    500: ModelWithStringError;\n    /**\n     * Message for 501 error\n     */\n    501: ModelWithStringError;\n    /**\n     * Message for 502 error\n     */\n    502: ModelWithStringError;\n    /**\n     * Message for default response\n     */\n    default: ModelWithStringError;\n};\n\nexport type CallWithResponsesError = CallWithResponsesErrors[keyof CallWithResponsesErrors];\n\nexport type CallWithResponsesResponses = {\n    /**\n     * Message for 200 response\n     */\n    200: {\n        readonly '@namespace.string'?: string;\n        readonly '@namespace.integer'?: number;\n        readonly value?: Array<ModelWithString>;\n    };\n    /**\n     * Message for 201 response\n     */\n    201: ModelThatExtends;\n    /**\n     * Message for 202 response\n     */\n    202: ModelThatExtendsExtends;\n};\n\nexport type CallWithResponsesResponse = CallWithResponsesResponses[keyof CallWithResponsesResponses];\n\nexport type CollectionFormatData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * This is an array parameter that is sent as csv format (comma-separated values)\n         */\n        parameterArrayCSV: Array<string> | null;\n        /**\n         * This is an array parameter that is sent as ssv format (space-separated values)\n         */\n        parameterArraySSV: Array<string> | null;\n        /**\n         * This is an array parameter that is sent as tsv format (tab-separated values)\n         */\n        parameterArrayTSV: Array<string> | null;\n        /**\n         * This is an array parameter that is sent as pipes format (pipe-separated values)\n         */\n        parameterArrayPipes: Array<string> | null;\n        /**\n         * This is an array parameter that is sent as multi format (multiple parameter instances)\n         */\n        parameterArrayMulti: Array<string> | null;\n    };\n    url: '/api/v{api-version}/collectionFormat';\n};\n\nexport type TypesData = {\n    body?: never;\n    path?: {\n        /**\n         * This is a number parameter\n         */\n        id?: number;\n    };\n    query: {\n        /**\n         * This is a number parameter\n         */\n        parameterNumber: number;\n        /**\n         * This is a string parameter\n         */\n        parameterString: string | null;\n        /**\n         * This is a boolean parameter\n         */\n        parameterBoolean: boolean | null;\n        /**\n         * This is an object parameter\n         */\n        parameterObject: {\n            [key: string]: unknown;\n        } | null;\n        /**\n         * This is an array parameter\n         */\n        parameterArray: Array<string> | null;\n        /**\n         * This is a dictionary parameter\n         */\n        parameterDictionary: {\n            [key: string]: unknown;\n        } | null;\n        /**\n         * This is an enum parameter\n         */\n        parameterEnum: 'Success' | 'Warning' | 'Error';\n    };\n    url: '/api/v{api-version}/types';\n};\n\nexport type TypesResponses = {\n    /**\n     * Response is a simple number\n     */\n    200: number;\n    /**\n     * Response is a simple string\n     */\n    201: string;\n    /**\n     * Response is a simple boolean\n     */\n    202: boolean;\n    /**\n     * Response is a simple object\n     */\n    203: {\n        [key: string]: unknown;\n    };\n};\n\nexport type TypesResponse = TypesResponses[keyof TypesResponses];\n\nexport type UploadFileData = {\n    body: Blob | File;\n    path: {\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string | null;\n    };\n    query?: never;\n    url: '/api/v{api-version}/upload';\n};\n\nexport type UploadFileResponses = {\n    200: boolean;\n};\n\nexport type UploadFileResponse = UploadFileResponses[keyof UploadFileResponses];\n\nexport type FileResponseData = {\n    body?: never;\n    path: {\n        id: string;\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string;\n    };\n    query?: never;\n    url: '/api/v{api-version}/file/{id}';\n};\n\nexport type FileResponseResponses = {\n    /**\n     * Success\n     */\n    200: Blob | File;\n};\n\nexport type FileResponseResponse = FileResponseResponses[keyof FileResponseResponses];\n\nexport type ComplexTypesData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * Parameter containing object\n         */\n        parameterObject: {\n            first?: {\n                second?: {\n                    third?: string;\n                };\n            };\n        };\n        /**\n         * Parameter containing reference\n         */\n        parameterReference: ModelWithString;\n    };\n    url: '/api/v{api-version}/complex';\n};\n\nexport type ComplexTypesErrors = {\n    /**\n     * 400 `server` error\n     */\n    400: unknown;\n    /**\n     * 500 server error\n     */\n    500: unknown;\n};\n\nexport type ComplexTypesResponses = {\n    /**\n     * Successful response\n     */\n    200: Array<ModelWithString>;\n};\n\nexport type ComplexTypesResponse = ComplexTypesResponses[keyof ComplexTypesResponses];\n\nexport type MultipartResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multipart';\n};\n\nexport type MultipartResponseResponses = {\n    /**\n     * OK\n     */\n    200: {\n        file?: Blob | File;\n        metadata?: {\n            foo?: string;\n            bar?: string;\n        };\n    };\n};\n\nexport type MultipartResponseResponse = MultipartResponseResponses[keyof MultipartResponseResponses];\n\nexport type MultipartRequestData = {\n    body?: {\n        content?: Blob | File;\n        data?: ModelWithString | null;\n    };\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multipart';\n};\n\nexport type ComplexParamsData = {\n    body?: {\n        readonly key: string | null;\n        name: string | null;\n        enabled?: boolean;\n        type: 'Monkey' | 'Horse' | 'Bird';\n        listOfModels?: Array<ModelWithString> | null;\n        listOfStrings?: Array<string> | null;\n        parameters: ModelWithString | ModelWithEnum | ModelWithArray | ModelWithDictionary;\n        readonly user?: {\n            readonly id?: number;\n            readonly name?: string | null;\n        };\n    };\n    path: {\n        id: number;\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string;\n    };\n    query?: never;\n    url: '/api/v{api-version}/complex/{id}';\n};\n\nexport type ComplexParamsResponses = {\n    /**\n     * Success\n     */\n    200: ModelWithString;\n};\n\nexport type ComplexParamsResponse = ComplexParamsResponses[keyof ComplexParamsResponses];\n\nexport type CallWithResultFromHeaderData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/header';\n};\n\nexport type CallWithResultFromHeaderErrors = {\n    /**\n     * 400 server error\n     */\n    400: unknown;\n    /**\n     * 500 server error\n     */\n    500: unknown;\n};\n\nexport type CallWithResultFromHeaderResponses = {\n    /**\n     * Successful response\n     */\n    200: unknown;\n};\n\nexport type TestErrorCodeData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * Status code to return\n         */\n        status: number;\n    };\n    url: '/api/v{api-version}/error';\n};\n\nexport type TestErrorCodeErrors = {\n    /**\n     * Custom message: Internal Server Error\n     */\n    500: unknown;\n    /**\n     * Custom message: Not Implemented\n     */\n    501: unknown;\n    /**\n     * Custom message: Bad Gateway\n     */\n    502: unknown;\n    /**\n     * Custom message: Service Unavailable\n     */\n    503: unknown;\n};\n\nexport type TestErrorCodeResponses = {\n    /**\n     * Custom message: Successful response\n     */\n    200: unknown;\n};\n\nexport type NonAsciiæøåÆøÅöôêÊ字符串Data = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * Dummy input param\n         */\n        nonAsciiParamæøåÆØÅöôêÊ: number;\n    };\n    url: '/api/v{api-version}/non-ascii-æøåÆØÅöôêÊ字符串';\n};\n\nexport type NonAsciiæøåÆøÅöôêÊ字符串Responses = {\n    /**\n     * Successful response\n     */\n    200: Array<NonAsciiStringæøåÆøÅöôêÊ字符串>;\n};\n\nexport type NonAsciiæøåÆøÅöôêÊ字符串Response = NonAsciiæøåÆøÅöôêÊ字符串Responses[keyof NonAsciiæøåÆøÅöôêÊ字符串Responses];\n\nexport type PutWithFormUrlEncodedData = {\n    body: ArrayWithStrings;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/non-ascii-æøåÆØÅöôêÊ字符串';\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/solid-query/asClass/@tanstack/solid-query.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport { type DefaultError, type MutationOptions, queryOptions } from '@tanstack/solid-query';\n\nimport { client } from '../client.gen';\nimport { BarBazService, BarService, FooBazService, FooService, type Options } from '../sdk.gen';\nimport type { FooBarPostData, FooBarPostResponse, FooBarPutData, FooBarPutResponse, FooPostData, FooPostResponse, FooPutData, FooPutResponse, GetFooBarData, GetFooBarResponse, GetFooData, GetFooResponse } from '../types.gen';\n\nexport type QueryKey<TOptions extends Options> = [\n    Pick<TOptions, 'baseUrl' | 'body' | 'headers' | 'path' | 'query'> & {\n        _id: string;\n        _infinite?: boolean;\n        tags?: ReadonlyArray<string>;\n    }\n];\n\nconst createQueryKey = <TOptions extends Options>(id: string, options?: TOptions, infinite?: boolean, tags?: ReadonlyArray<string>): [\n    QueryKey<TOptions>[0]\n] => {\n    const params: QueryKey<TOptions>[0] = { _id: id, baseUrl: options?.baseUrl || (options?.client ?? client).getConfig().baseUrl } as QueryKey<TOptions>[0];\n    if (infinite) {\n        params._infinite = infinite;\n    }\n    if (tags) {\n        params.tags = tags;\n    }\n    if (options?.body) {\n        params.body = options.body;\n    }\n    if (options?.headers) {\n        params.headers = options.headers;\n    }\n    if (options?.path) {\n        params.path = options.path;\n    }\n    if (options?.query) {\n        params.query = options.query;\n    }\n    return [params];\n};\n\nexport const getFooQueryKey = (options?: Options<GetFooData>) => createQueryKey('getFoo', options);\n\nexport const getFooOptions = (options?: Options<GetFooData>) => queryOptions<GetFooResponse, DefaultError, GetFooResponse, ReturnType<typeof getFooQueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await FooBazService.getFoo({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: getFooQueryKey(options)\n});\n\nexport const fooPostMutation = (options?: Partial<Options<FooPostData>>): MutationOptions<FooPostResponse, DefaultError, Options<FooPostData>> => {\n    const mutationOptions: MutationOptions<FooPostResponse, DefaultError, Options<FooPostData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await FooService.post({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const fooPutMutation = (options?: Partial<Options<FooPutData>>): MutationOptions<FooPutResponse, DefaultError, Options<FooPutData>> => {\n    const mutationOptions: MutationOptions<FooPutResponse, DefaultError, Options<FooPutData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await FooService.put({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const getFooBarQueryKey = (options?: Options<GetFooBarData>) => createQueryKey('getFooBar', options);\n\nexport const getFooBarOptions = (options?: Options<GetFooBarData>) => queryOptions<GetFooBarResponse, DefaultError, GetFooBarResponse, ReturnType<typeof getFooBarQueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await BarBazService.getFooBar({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: getFooBarQueryKey(options)\n});\n\nexport const fooBarPostMutation = (options?: Partial<Options<FooBarPostData>>): MutationOptions<FooBarPostResponse, DefaultError, Options<FooBarPostData>> => {\n    const mutationOptions: MutationOptions<FooBarPostResponse, DefaultError, Options<FooBarPostData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await BarService.post({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const fooBarPutMutation = (options?: Partial<Options<FooBarPutData>>): MutationOptions<FooBarPutResponse, DefaultError, Options<FooBarPutData>> => {\n    const mutationOptions: MutationOptions<FooBarPutResponse, DefaultError, Options<FooBarPutData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await BarService.put({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/solid-query/asClass/client/client.gen.ts",
    "content": "// 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 (options: RequestOptions) => {\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 url = buildUrl(opts);\n\n    return { opts, url };\n  };\n\n  const request: Client['request'] = async (options) => {\n    // @ts-expect-error\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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/solid-query/asClass/client/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type { Auth } from '../core/auth.gen';\nexport type { QuerySerializerOptions } from '../core/bodySerializer.gen';\nexport {\n  formDataBodySerializer,\n  jsonBodySerializer,\n  urlSearchParamsBodySerializer,\n} from '../core/bodySerializer.gen';\nexport { buildClientParams } from '../core/params.gen';\nexport { serializeQueryKeyValue } from '../core/queryKeySerializer.gen';\nexport { createClient } from './client.gen';\nexport type {\n  Client,\n  ClientOptions,\n  Config,\n  CreateClientConfig,\n  Options,\n  RequestOptions,\n  RequestResult,\n  ResolvedRequestOptions,\n  ResponseStyle,\n  TDataShape,\n} from './types.gen';\nexport { createConfig, mergeHeaders } from './utils.gen';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/solid-query/asClass/client/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { Auth } from '../core/auth.gen';\nimport type {\n  ServerSentEventsOptions,\n  ServerSentEventsResult,\n} from '../core/serverSentEvents.gen';\nimport type { Client as CoreClient, Config as CoreConfig } from '../core/types.gen';\nimport type { Middleware } from './utils.gen';\n\nexport type ResponseStyle = 'data' | 'fields';\n\nexport interface Config<T extends ClientOptions = ClientOptions>\n  extends Omit<RequestInit, 'body' | 'headers' | 'method'>, CoreConfig {\n  /**\n   * Base URL for all requests made by this client.\n   */\n  baseUrl?: T['baseUrl'];\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   * Please don't use the Fetch client for Next.js applications. The `next`\n   * options won't have any effect.\n   *\n   * Install {@link https://www.npmjs.com/package/@hey-api/client-next `@hey-api/client-next`} instead.\n   */\n  next?: never;\n  /**\n   * Return the response data parsed in a specified format. By default, `auto`\n   * will infer the appropriate method from the `Content-Type` response header.\n   * You can override this behavior with any of the {@link Body} methods.\n   * Select `stream` if you don't want to parse response data at all.\n   *\n   * @default 'auto'\n   */\n  parseAs?: 'arrayBuffer' | 'auto' | 'blob' | 'formData' | 'json' | 'stream' | 'text';\n  /**\n   * Should we return only data or multiple fields (data, error, response, etc.)?\n   *\n   * @default 'fields'\n   */\n  responseStyle?: ResponseStyle;\n  /**\n   * Throw an error instead of returning it in the response?\n   *\n   * @default false\n   */\n  throwOnError?: T['throwOnError'];\n}\n\nexport interface RequestOptions<\n  TData = unknown,\n  TResponseStyle extends ResponseStyle = 'fields',\n  ThrowOnError extends boolean = boolean,\n  Url extends string = string,\n>\n  extends\n    Config<{\n      responseStyle: TResponseStyle;\n      throwOnError: ThrowOnError;\n    }>,\n    Pick<\n      ServerSentEventsOptions<TData>,\n      | 'onRequest'\n      | 'onSseError'\n      | 'onSseEvent'\n      | 'sseDefaultRetryDelay'\n      | 'sseMaxRetryAttempts'\n      | 'sseMaxRetryDelay'\n    > {\n  /**\n   * Any body that you want to add to your request.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/fetch#body}\n   */\n  body?: unknown;\n  path?: Record<string, unknown>;\n  query?: Record<string, unknown>;\n  /**\n   * Security mechanism(s) to use for the request.\n   */\n  security?: ReadonlyArray<Auth>;\n  url: Url;\n}\n\nexport interface ResolvedRequestOptions<\n  TResponseStyle extends ResponseStyle = 'fields',\n  ThrowOnError extends boolean = boolean,\n  Url extends string = string,\n> extends RequestOptions<unknown, TResponseStyle, ThrowOnError, Url> {\n  serializedBody?: string;\n}\n\nexport type RequestResult<\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = boolean,\n  TResponseStyle extends ResponseStyle = 'fields',\n> = ThrowOnError extends true\n  ? Promise<\n      TResponseStyle extends 'data'\n        ? TData extends Record<string, unknown>\n          ? TData[keyof TData]\n          : TData\n        : {\n            data: TData extends Record<string, unknown> ? TData[keyof TData] : TData;\n            request: Request;\n            response: Response;\n          }\n    >\n  : Promise<\n      TResponseStyle extends 'data'\n        ? (TData extends Record<string, unknown> ? TData[keyof TData] : TData) | undefined\n        : (\n            | {\n                data: TData extends Record<string, unknown> ? TData[keyof TData] : TData;\n                error: undefined;\n              }\n            | {\n                data: undefined;\n                error: TError extends Record<string, unknown> ? TError[keyof TError] : TError;\n              }\n          ) & {\n            request: Request;\n            response: Response;\n          }\n    >;\n\nexport interface ClientOptions {\n  baseUrl?: string;\n  responseStyle?: ResponseStyle;\n  throwOnError?: boolean;\n}\n\ntype MethodFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'>,\n) => RequestResult<TData, TError, ThrowOnError, TResponseStyle>;\n\ntype SseFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'>,\n) => Promise<ServerSentEventsResult<TData, TError>>;\n\ntype RequestFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'> &\n    Pick<Required<RequestOptions<TData, TResponseStyle, ThrowOnError>>, 'method'>,\n) => RequestResult<TData, TError, ThrowOnError, TResponseStyle>;\n\ntype BuildUrlFn = <\n  TData extends {\n    body?: unknown;\n    path?: Record<string, unknown>;\n    query?: Record<string, unknown>;\n    url: string;\n  },\n>(\n  options: TData & Options<TData>,\n) => string;\n\nexport type Client = CoreClient<RequestFn, Config, MethodFn, BuildUrlFn, SseFn> & {\n  interceptors: Middleware<Request, Response, unknown, ResolvedRequestOptions>;\n};\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 = ClientOptions> = (\n  override?: Config<ClientOptions & T>,\n) => Config<Required<ClientOptions> & T>;\n\nexport interface TDataShape {\n  body?: unknown;\n  headers?: unknown;\n  path?: unknown;\n  query?: unknown;\n  url: string;\n}\n\ntype OmitKeys<T, K> = Pick<T, Exclude<keyof T, K>>;\n\nexport type Options<\n  TData extends TDataShape = TDataShape,\n  ThrowOnError extends boolean = boolean,\n  TResponse = unknown,\n  TResponseStyle extends ResponseStyle = 'fields',\n> = OmitKeys<\n  RequestOptions<TResponse, TResponseStyle, ThrowOnError>,\n  'body' | 'path' | 'query' | 'url'\n> &\n  ([TData] extends [never] ? unknown : Omit<TData, 'url'>);\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/solid-query/asClass/client/utils.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/solid-query/asClass/client.gen.ts",
    "content": "// 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>());\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/solid-query/asClass/core/auth.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/solid-query/asClass/core/bodySerializer.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/solid-query/asClass/core/params.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/solid-query/asClass/core/pathSerializer.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/solid-query/asClass/core/queryKeySerializer.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\n/**\n * JSON-friendly union that mirrors what Pinia Colada can hash.\n */\nexport type JsonValue =\n  | null\n  | string\n  | number\n  | boolean\n  | JsonValue[]\n  | { [key: string]: JsonValue };\n\n/**\n * Replacer that converts non-JSON values (bigint, Date, etc.) to safe substitutes.\n */\nexport const queryKeyJsonReplacer = (_key: string, value: unknown) => {\n  if (value === undefined || typeof value === 'function' || typeof value === 'symbol') {\n    return undefined;\n  }\n  if (typeof value === 'bigint') {\n    return value.toString();\n  }\n  if (value instanceof Date) {\n    return value.toISOString();\n  }\n  return value;\n};\n\n/**\n * Safely stringifies a value and parses it back into a JsonValue.\n */\nexport const stringifyToJsonValue = (input: unknown): JsonValue | undefined => {\n  try {\n    const json = JSON.stringify(input, queryKeyJsonReplacer);\n    if (json === undefined) {\n      return undefined;\n    }\n    return JSON.parse(json) as JsonValue;\n  } catch {\n    return undefined;\n  }\n};\n\n/**\n * Detects plain objects (including objects with a null prototype).\n */\nconst isPlainObject = (value: unknown): value is Record<string, unknown> => {\n  if (value === null || typeof value !== 'object') {\n    return false;\n  }\n  const prototype = Object.getPrototypeOf(value as object);\n  return prototype === Object.prototype || prototype === null;\n};\n\n/**\n * Turns URLSearchParams into a sorted JSON object for deterministic keys.\n */\nconst serializeSearchParams = (params: URLSearchParams): JsonValue => {\n  const entries = Array.from(params.entries()).sort(([a], [b]) => a.localeCompare(b));\n  const result: Record<string, JsonValue> = {};\n\n  for (const [key, value] of entries) {\n    const existing = result[key];\n    if (existing === undefined) {\n      result[key] = value;\n      continue;\n    }\n\n    if (Array.isArray(existing)) {\n      (existing as string[]).push(value);\n    } else {\n      result[key] = [existing, value];\n    }\n  }\n\n  return result;\n};\n\n/**\n * Normalizes any accepted value into a JSON-friendly shape for query keys.\n */\nexport const serializeQueryKeyValue = (value: unknown): JsonValue | undefined => {\n  if (value === null) {\n    return null;\n  }\n\n  if (typeof value === 'string' || typeof value === 'number' || typeof value === 'boolean') {\n    return value;\n  }\n\n  if (value === undefined || typeof value === 'function' || typeof value === 'symbol') {\n    return undefined;\n  }\n\n  if (typeof value === 'bigint') {\n    return value.toString();\n  }\n\n  if (value instanceof Date) {\n    return value.toISOString();\n  }\n\n  if (Array.isArray(value)) {\n    return stringifyToJsonValue(value);\n  }\n\n  if (typeof URLSearchParams !== 'undefined' && value instanceof URLSearchParams) {\n    return serializeSearchParams(value);\n  }\n\n  if (isPlainObject(value)) {\n    return stringifyToJsonValue(value);\n  }\n\n  return undefined;\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/solid-query/asClass/core/serverSentEvents.gen.ts",
    "content": "// 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 const 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            // Normalize line endings: CRLF -> LF, then CR -> LF\n            buffer = buffer.replace(/\\r\\n/g, '\\n').replace(/\\r/g, '\\n');\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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/solid-query/asClass/core/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { Auth, AuthToken } from './auth.gen';\nimport type { BodySerializer, QuerySerializer, QuerySerializerOptions } from './bodySerializer.gen';\n\nexport type HttpMethod =\n  | 'connect'\n  | 'delete'\n  | 'get'\n  | 'head'\n  | 'options'\n  | 'patch'\n  | 'post'\n  | 'put'\n  | 'trace';\n\nexport type Client<\n  RequestFn = never,\n  Config = unknown,\n  MethodFn = never,\n  BuildUrlFn = never,\n  SseFn = never,\n> = {\n  /**\n   * Returns the final request URL.\n   */\n  buildUrl: BuildUrlFn;\n  getConfig: () => Config;\n  request: RequestFn;\n  setConfig: (config: Config) => Config;\n} & {\n  [K in HttpMethod]: MethodFn;\n} & ([SseFn] extends [never] ? { sse?: never } : { sse: { [K in HttpMethod]: SseFn } });\n\nexport interface Config {\n  /**\n   * Auth token or a function returning auth token. The resolved value will be\n   * added to the request payload as defined by its `security` array.\n   */\n  auth?: ((auth: Auth) => Promise<AuthToken> | AuthToken) | AuthToken;\n  /**\n   * A function for serializing request body parameter. By default,\n   * {@link JSON.stringify()} will be used.\n   */\n  bodySerializer?: BodySerializer | null;\n  /**\n   * An object containing any HTTP headers that you want to pre-populate your\n   * `Headers` object with.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/Headers/Headers#init See more}\n   */\n  headers?:\n    | RequestInit['headers']\n    | Record<\n        string,\n        string | number | boolean | (string | number | boolean)[] | null | undefined | unknown\n      >;\n  /**\n   * The request method.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/fetch#method See more}\n   */\n  method?: Uppercase<HttpMethod>;\n  /**\n   * A function for serializing request query parameters. By default, arrays\n   * will be exploded in form style, objects will be exploded in deepObject\n   * style, and reserved characters are percent-encoded.\n   *\n   * This method will have no effect if the native `paramsSerializer()` Axios\n   * API function is used.\n   *\n   * {@link https://swagger.io/docs/specification/serialization/#query View examples}\n   */\n  querySerializer?: QuerySerializer | QuerySerializerOptions;\n  /**\n   * A function validating request data. This is useful if you want to ensure\n   * the request conforms to the desired shape, so it can be safely sent to\n   * the server.\n   */\n  requestValidator?: (data: unknown) => Promise<unknown>;\n  /**\n   * A function transforming response data before it's returned. This is useful\n   * for post-processing data, e.g. converting ISO strings into Date objects.\n   */\n  responseTransformer?: (data: unknown) => Promise<unknown>;\n  /**\n   * A function validating response data. This is useful if you want to ensure\n   * the response conforms to the desired shape, so it can be safely passed to\n   * the transformers and returned to the user.\n   */\n  responseValidator?: (data: unknown) => Promise<unknown>;\n}\n\ntype IsExactlyNeverOrNeverUndefined<T> = [T] extends [never]\n  ? true\n  : [T] extends [never | undefined]\n    ? [undefined] extends [T]\n      ? false\n      : true\n    : false;\n\nexport type OmitNever<T extends Record<string, unknown>> = {\n  [K in keyof T as IsExactlyNeverOrNeverUndefined<T[K]> extends true ? never : K]: T[K];\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/solid-query/asClass/core/utils.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/solid-query/asClass/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport { BarBazService, BarService, BarService2, FooBazService, FooService, FooService2, type Options } from './sdk.gen';\nexport type { ClientOptions, FooBarPostData, FooBarPostResponse, FooBarPostResponses, FooBarPutData, FooBarPutResponse, FooBarPutResponses, FooPostData, FooPostResponse, FooPostResponses, FooPutData, FooPutResponse, FooPutResponses, GetFooBarData, GetFooBarResponse, GetFooBarResponses, GetFooData, GetFooResponse, GetFooResponses } from './types.gen';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/solid-query/asClass/sdk.gen.ts",
    "content": "// 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 { FooBarPostData, FooBarPostResponses, FooBarPutData, FooBarPutResponses, FooPostData, FooPostResponses, FooPutData, FooPutResponses, GetFooBarData, GetFooBarResponses, GetFooData, GetFooResponses } from './types.gen';\n\nexport type Options<TData extends TDataShape = TDataShape, ThrowOnError extends boolean = boolean> = Options2<TData, ThrowOnError> & {\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\nexport class BarService {\n    public static post<ThrowOnError extends boolean = false>(options?: Options<FooBarPostData, ThrowOnError>) {\n        return (options?.client ?? client).post<FooBarPostResponses, unknown, ThrowOnError>({ url: '/foo/bar', ...options });\n    }\n    \n    public static put<ThrowOnError extends boolean = false>(options?: Options<FooBarPutData, ThrowOnError>) {\n        return (options?.client ?? client).put<FooBarPutResponses, unknown, ThrowOnError>({ url: '/foo/bar', ...options });\n    }\n}\n\nexport class FooService {\n    public static post<ThrowOnError extends boolean = false>(options?: Options<FooPostData, ThrowOnError>) {\n        return (options?.client ?? client).post<FooPostResponses, unknown, ThrowOnError>({ url: '/foo', ...options });\n    }\n    \n    public static put<ThrowOnError extends boolean = false>(options?: Options<FooPutData, ThrowOnError>) {\n        return (options?.client ?? client).put<FooPutResponses, unknown, ThrowOnError>({ url: '/foo', ...options });\n    }\n    \n    static barService = BarService;\n}\n\nexport class FooBazService {\n    public static getFoo<ThrowOnError extends boolean = false>(options?: Options<GetFooData, ThrowOnError>) {\n        return (options?.client ?? client).get<GetFooResponses, unknown, ThrowOnError>({ url: '/foo', ...options });\n    }\n    \n    static fooService = FooService;\n}\n\nexport class BarService2 {\n    public static post<ThrowOnError extends boolean = false>(options?: Options<FooBarPostData, ThrowOnError>) {\n        return (options?.client ?? client).post<FooBarPostResponses, unknown, ThrowOnError>({ url: '/foo/bar', ...options });\n    }\n    \n    public static put<ThrowOnError extends boolean = false>(options?: Options<FooBarPutData, ThrowOnError>) {\n        return (options?.client ?? client).put<FooBarPutResponses, unknown, ThrowOnError>({ url: '/foo/bar', ...options });\n    }\n}\n\nexport class FooService2 {\n    static barService = BarService2;\n}\n\nexport class BarBazService {\n    public static getFooBar<ThrowOnError extends boolean = false>(options?: Options<GetFooBarData, ThrowOnError>) {\n        return (options?.client ?? client).get<GetFooBarResponses, unknown, ThrowOnError>({ url: '/foo/bar', ...options });\n    }\n    \n    static fooService = FooService2;\n}\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/solid-query/asClass/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type ClientOptions = {\n    baseUrl: `${string}://${string}` | (string & {});\n};\n\nexport type GetFooData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/foo';\n};\n\nexport type GetFooResponses = {\n    /**\n     * OK\n     */\n    200: string;\n};\n\nexport type GetFooResponse = GetFooResponses[keyof GetFooResponses];\n\nexport type FooPostData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/foo';\n};\n\nexport type FooPostResponses = {\n    /**\n     * OK\n     */\n    200: string;\n};\n\nexport type FooPostResponse = FooPostResponses[keyof FooPostResponses];\n\nexport type FooPutData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/foo';\n};\n\nexport type FooPutResponses = {\n    /**\n     * OK\n     */\n    200: string;\n};\n\nexport type FooPutResponse = FooPutResponses[keyof FooPutResponses];\n\nexport type GetFooBarData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/foo/bar';\n};\n\nexport type GetFooBarResponses = {\n    /**\n     * OK\n     */\n    200: string;\n};\n\nexport type GetFooBarResponse = GetFooBarResponses[keyof GetFooBarResponses];\n\nexport type FooBarPostData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/foo/bar';\n};\n\nexport type FooBarPostResponses = {\n    /**\n     * OK\n     */\n    200: string;\n};\n\nexport type FooBarPostResponse = FooBarPostResponses[keyof FooBarPostResponses];\n\nexport type FooBarPutData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/foo/bar';\n};\n\nexport type FooBarPutResponses = {\n    /**\n     * OK\n     */\n    200: string;\n};\n\nexport type FooBarPutResponse = FooBarPutResponses[keyof FooBarPutResponses];\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/solid-query/axios/@tanstack/solid-query.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport { type DefaultError, type InfiniteData, infiniteQueryOptions, type MutationOptions, queryOptions } from '@tanstack/solid-query';\nimport type { AxiosError } from 'axios';\n\nimport { client } from '../client.gen';\nimport { apiVVersionODataControllerCount, callToTestOrderOfParams, callWithDefaultOptionalParameters, callWithDefaultParameters, callWithDescriptions, callWithDuplicateResponses, callWithNoContentResponse, callWithParameters, callWithResponse, callWithResponseAndNoContentResponse, callWithResponses, callWithResultFromHeader, callWithWeirdParameterNames, collectionFormat, complexParams, complexTypes, deleteCallWithoutParametersAndResponse, deleteFoo, deprecatedCall, dummyA, dummyB, duplicateName, duplicateName2, duplicateName3, duplicateName4, export_, fileResponse, fooWow, getApiVbyApiVersionSimpleOperation, getCallWithOptionalParam, getCallWithoutParametersAndResponse, import_, multipartRequest, multipartResponse, nonAsciiæøåÆøÅöôêÊ字符串, type Options, patchApiVbyApiVersionNoTag, patchCallWithoutParametersAndResponse, postApiVbyApiVersionFormData, postApiVbyApiVersionRequestBody, postCallWithOptionalParam, postCallWithoutParametersAndResponse, putCallWithoutParametersAndResponse, putWithFormUrlEncoded, testErrorCode, types, uploadFile } from '../sdk.gen';\nimport type { ApiVVersionODataControllerCountData, ApiVVersionODataControllerCountResponse, CallToTestOrderOfParamsData, CallWithDefaultOptionalParametersData, CallWithDefaultParametersData, CallWithDescriptionsData, CallWithDuplicateResponsesData, CallWithDuplicateResponsesError, CallWithDuplicateResponsesResponse, CallWithNoContentResponseData, CallWithNoContentResponseResponse, CallWithParametersData, CallWithResponseAndNoContentResponseData, CallWithResponseAndNoContentResponseResponse, CallWithResponseData, CallWithResponseResponse, CallWithResponsesData, CallWithResponsesError, CallWithResponsesResponse, CallWithResultFromHeaderData, CallWithWeirdParameterNamesData, CollectionFormatData, ComplexParamsData, ComplexParamsResponse, ComplexTypesData, ComplexTypesResponse, DeleteCallWithoutParametersAndResponseData, DeleteFooData3, DeprecatedCallData, DummyAData, DummyAResponse, DummyBData, DummyBResponse, DuplicateName2Data, DuplicateName3Data, DuplicateName4Data, DuplicateNameData, ExportData, FileResponseData, FileResponseResponse, FooWowData, GetApiVbyApiVersionSimpleOperationData, GetApiVbyApiVersionSimpleOperationError, GetApiVbyApiVersionSimpleOperationResponse, GetCallWithOptionalParamData, GetCallWithoutParametersAndResponseData, ImportData, ImportResponse, MultipartRequestData, MultipartResponseData, MultipartResponseResponse, NonAsciiæøåÆøÅöôêÊ字符串Data, NonAsciiæøåÆøÅöôêÊ字符串Response, PatchApiVbyApiVersionNoTagData, PatchCallWithoutParametersAndResponseData, PostApiVbyApiVersionFormDataData, PostApiVbyApiVersionRequestBodyData, PostCallWithOptionalParamData, PostCallWithOptionalParamResponse, PostCallWithoutParametersAndResponseData, PutCallWithoutParametersAndResponseData, PutWithFormUrlEncodedData, TestErrorCodeData, TypesData, TypesResponse, UploadFileData, UploadFileResponse } from '../types.gen';\n\nexport type QueryKey<TOptions extends Options> = [\n    Pick<TOptions, 'baseURL' | 'body' | 'headers' | 'path' | 'query'> & {\n        _id: string;\n        _infinite?: boolean;\n        tags?: ReadonlyArray<string>;\n    }\n];\n\nconst createQueryKey = <TOptions extends Options>(id: string, options?: TOptions, infinite?: boolean, tags?: ReadonlyArray<string>): [\n    QueryKey<TOptions>[0]\n] => {\n    const params: QueryKey<TOptions>[0] = { _id: id, baseURL: options?.baseURL || (options?.client ?? client).getConfig().baseURL } as QueryKey<TOptions>[0];\n    if (infinite) {\n        params._infinite = infinite;\n    }\n    if (tags) {\n        params.tags = tags;\n    }\n    if (options?.body) {\n        params.body = options.body;\n    }\n    if (options?.headers) {\n        params.headers = options.headers;\n    }\n    if (options?.path) {\n        params.path = options.path;\n    }\n    if (options?.query) {\n        params.query = options.query;\n    }\n    return [params];\n};\n\nexport const exportQueryKey = (options?: Options<ExportData>) => createQueryKey('export', options);\n\nexport const exportOptions = (options?: Options<ExportData>) => queryOptions<unknown, AxiosError<DefaultError>, unknown, ReturnType<typeof exportQueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await export_({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: exportQueryKey(options)\n});\n\nexport const patchApiVbyApiVersionNoTagMutation = (options?: Partial<Options<PatchApiVbyApiVersionNoTagData>>): MutationOptions<unknown, AxiosError<DefaultError>, Options<PatchApiVbyApiVersionNoTagData>> => {\n    const mutationOptions: MutationOptions<unknown, AxiosError<DefaultError>, Options<PatchApiVbyApiVersionNoTagData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await patchApiVbyApiVersionNoTag({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const importMutation = (options?: Partial<Options<ImportData>>): MutationOptions<ImportResponse, AxiosError<DefaultError>, Options<ImportData>> => {\n    const mutationOptions: MutationOptions<ImportResponse, AxiosError<DefaultError>, Options<ImportData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await import_({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const fooWowMutation = (options?: Partial<Options<FooWowData>>): MutationOptions<unknown, AxiosError<DefaultError>, Options<FooWowData>> => {\n    const mutationOptions: MutationOptions<unknown, AxiosError<DefaultError>, Options<FooWowData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await fooWow({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const apiVVersionODataControllerCountQueryKey = (options?: Options<ApiVVersionODataControllerCountData>) => createQueryKey('apiVVersionODataControllerCount', options);\n\nexport const apiVVersionODataControllerCountOptions = (options?: Options<ApiVVersionODataControllerCountData>) => queryOptions<ApiVVersionODataControllerCountResponse, AxiosError<DefaultError>, ApiVVersionODataControllerCountResponse, ReturnType<typeof apiVVersionODataControllerCountQueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await apiVVersionODataControllerCount({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: apiVVersionODataControllerCountQueryKey(options)\n});\n\nexport const getApiVbyApiVersionSimpleOperationQueryKey = (options: Options<GetApiVbyApiVersionSimpleOperationData>) => createQueryKey('getApiVbyApiVersionSimpleOperation', options);\n\nexport const getApiVbyApiVersionSimpleOperationOptions = (options: Options<GetApiVbyApiVersionSimpleOperationData>) => queryOptions<GetApiVbyApiVersionSimpleOperationResponse, AxiosError<GetApiVbyApiVersionSimpleOperationError>, GetApiVbyApiVersionSimpleOperationResponse, ReturnType<typeof getApiVbyApiVersionSimpleOperationQueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await getApiVbyApiVersionSimpleOperation({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: getApiVbyApiVersionSimpleOperationQueryKey(options)\n});\n\nexport const deleteCallWithoutParametersAndResponseMutation = (options?: Partial<Options<DeleteCallWithoutParametersAndResponseData>>): MutationOptions<unknown, AxiosError<DefaultError>, Options<DeleteCallWithoutParametersAndResponseData>> => {\n    const mutationOptions: MutationOptions<unknown, AxiosError<DefaultError>, Options<DeleteCallWithoutParametersAndResponseData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await deleteCallWithoutParametersAndResponse({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const getCallWithoutParametersAndResponseQueryKey = (options?: Options<GetCallWithoutParametersAndResponseData>) => createQueryKey('getCallWithoutParametersAndResponse', options);\n\nexport const getCallWithoutParametersAndResponseOptions = (options?: Options<GetCallWithoutParametersAndResponseData>) => queryOptions<unknown, AxiosError<DefaultError>, unknown, ReturnType<typeof getCallWithoutParametersAndResponseQueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await getCallWithoutParametersAndResponse({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: getCallWithoutParametersAndResponseQueryKey(options)\n});\n\nexport const patchCallWithoutParametersAndResponseMutation = (options?: Partial<Options<PatchCallWithoutParametersAndResponseData>>): MutationOptions<unknown, AxiosError<DefaultError>, Options<PatchCallWithoutParametersAndResponseData>> => {\n    const mutationOptions: MutationOptions<unknown, AxiosError<DefaultError>, Options<PatchCallWithoutParametersAndResponseData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await patchCallWithoutParametersAndResponse({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const postCallWithoutParametersAndResponseMutation = (options?: Partial<Options<PostCallWithoutParametersAndResponseData>>): MutationOptions<unknown, AxiosError<DefaultError>, Options<PostCallWithoutParametersAndResponseData>> => {\n    const mutationOptions: MutationOptions<unknown, AxiosError<DefaultError>, Options<PostCallWithoutParametersAndResponseData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await postCallWithoutParametersAndResponse({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const putCallWithoutParametersAndResponseMutation = (options?: Partial<Options<PutCallWithoutParametersAndResponseData>>): MutationOptions<unknown, AxiosError<DefaultError>, Options<PutCallWithoutParametersAndResponseData>> => {\n    const mutationOptions: MutationOptions<unknown, AxiosError<DefaultError>, Options<PutCallWithoutParametersAndResponseData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await putCallWithoutParametersAndResponse({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const deleteFooMutation = (options?: Partial<Options<DeleteFooData3>>): MutationOptions<unknown, AxiosError<DefaultError>, Options<DeleteFooData3>> => {\n    const mutationOptions: MutationOptions<unknown, AxiosError<DefaultError>, Options<DeleteFooData3>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await deleteFoo({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const callWithDescriptionsMutation = (options?: Partial<Options<CallWithDescriptionsData>>): MutationOptions<unknown, AxiosError<DefaultError>, Options<CallWithDescriptionsData>> => {\n    const mutationOptions: MutationOptions<unknown, AxiosError<DefaultError>, Options<CallWithDescriptionsData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await callWithDescriptions({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\n/**\n * @deprecated\n */\nexport const deprecatedCallMutation = (options?: Partial<Options<DeprecatedCallData>>): MutationOptions<unknown, AxiosError<DefaultError>, Options<DeprecatedCallData>> => {\n    const mutationOptions: MutationOptions<unknown, AxiosError<DefaultError>, Options<DeprecatedCallData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await deprecatedCall({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const callWithParametersMutation = (options?: Partial<Options<CallWithParametersData>>): MutationOptions<unknown, AxiosError<DefaultError>, Options<CallWithParametersData>> => {\n    const mutationOptions: MutationOptions<unknown, AxiosError<DefaultError>, Options<CallWithParametersData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await callWithParameters({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const callWithWeirdParameterNamesMutation = (options?: Partial<Options<CallWithWeirdParameterNamesData>>): MutationOptions<unknown, AxiosError<DefaultError>, Options<CallWithWeirdParameterNamesData>> => {\n    const mutationOptions: MutationOptions<unknown, AxiosError<DefaultError>, Options<CallWithWeirdParameterNamesData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await callWithWeirdParameterNames({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const getCallWithOptionalParamQueryKey = (options: Options<GetCallWithOptionalParamData>) => createQueryKey('getCallWithOptionalParam', options);\n\nexport const getCallWithOptionalParamOptions = (options: Options<GetCallWithOptionalParamData>) => queryOptions<unknown, AxiosError<DefaultError>, unknown, ReturnType<typeof getCallWithOptionalParamQueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await getCallWithOptionalParam({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: getCallWithOptionalParamQueryKey(options)\n});\n\nconst createInfiniteParams = <K extends Pick<QueryKey<Options>[0], 'body' | 'headers' | 'path' | 'query'>>(queryKey: QueryKey<Options>, page: K) => {\n    const params = { ...queryKey[0] };\n    if (page.body) {\n        params.body = {\n            ...queryKey[0].body as any,\n            ...page.body as any\n        };\n    }\n    if (page.headers) {\n        params.headers = {\n            ...queryKey[0].headers,\n            ...page.headers\n        };\n    }\n    if (page.path) {\n        params.path = {\n            ...queryKey[0].path as any,\n            ...page.path as any\n        };\n    }\n    if (page.query) {\n        params.query = {\n            ...queryKey[0].query as any,\n            ...page.query as any\n        };\n    }\n    return params as unknown as typeof page;\n};\n\nexport const getCallWithOptionalParamInfiniteQueryKey = (options: Options<GetCallWithOptionalParamData>): QueryKey<Options<GetCallWithOptionalParamData>> => createQueryKey('getCallWithOptionalParam', options, true);\n\nexport const getCallWithOptionalParamInfiniteOptions = (options: Options<GetCallWithOptionalParamData>) => infiniteQueryOptions<unknown, AxiosError<DefaultError>, InfiniteData<unknown>, QueryKey<Options<GetCallWithOptionalParamData>>, number | Pick<QueryKey<Options<GetCallWithOptionalParamData>>[0], 'body' | 'headers' | 'path' | 'query'>>(\n// @ts-ignore\n{\n    queryFn: async ({ pageParam, queryKey, signal }) => {\n        // @ts-ignore\n        const page: Pick<QueryKey<Options<GetCallWithOptionalParamData>>[0], 'body' | 'headers' | 'path' | 'query'> = typeof pageParam === 'object' ? pageParam : {\n            query: {\n                page: pageParam\n            }\n        };\n        const params = createInfiniteParams(queryKey, page);\n        const { data } = await getCallWithOptionalParam({\n            ...options,\n            ...params,\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: getCallWithOptionalParamInfiniteQueryKey(options)\n});\n\nexport const postCallWithOptionalParamMutation = (options?: Partial<Options<PostCallWithOptionalParamData>>): MutationOptions<PostCallWithOptionalParamResponse, AxiosError<DefaultError>, Options<PostCallWithOptionalParamData>> => {\n    const mutationOptions: MutationOptions<PostCallWithOptionalParamResponse, AxiosError<DefaultError>, Options<PostCallWithOptionalParamData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await postCallWithOptionalParam({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const postApiVbyApiVersionRequestBodyMutation = (options?: Partial<Options<PostApiVbyApiVersionRequestBodyData>>): MutationOptions<unknown, AxiosError<DefaultError>, Options<PostApiVbyApiVersionRequestBodyData>> => {\n    const mutationOptions: MutationOptions<unknown, AxiosError<DefaultError>, Options<PostApiVbyApiVersionRequestBodyData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await postApiVbyApiVersionRequestBody({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const postApiVbyApiVersionFormDataMutation = (options?: Partial<Options<PostApiVbyApiVersionFormDataData>>): MutationOptions<unknown, AxiosError<DefaultError>, Options<PostApiVbyApiVersionFormDataData>> => {\n    const mutationOptions: MutationOptions<unknown, AxiosError<DefaultError>, Options<PostApiVbyApiVersionFormDataData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await postApiVbyApiVersionFormData({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const callWithDefaultParametersQueryKey = (options?: Options<CallWithDefaultParametersData>) => createQueryKey('callWithDefaultParameters', options);\n\nexport const callWithDefaultParametersOptions = (options?: Options<CallWithDefaultParametersData>) => queryOptions<unknown, AxiosError<DefaultError>, unknown, ReturnType<typeof callWithDefaultParametersQueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await callWithDefaultParameters({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: callWithDefaultParametersQueryKey(options)\n});\n\nexport const callWithDefaultOptionalParametersMutation = (options?: Partial<Options<CallWithDefaultOptionalParametersData>>): MutationOptions<unknown, AxiosError<DefaultError>, Options<CallWithDefaultOptionalParametersData>> => {\n    const mutationOptions: MutationOptions<unknown, AxiosError<DefaultError>, Options<CallWithDefaultOptionalParametersData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await callWithDefaultOptionalParameters({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const callToTestOrderOfParamsMutation = (options?: Partial<Options<CallToTestOrderOfParamsData>>): MutationOptions<unknown, AxiosError<DefaultError>, Options<CallToTestOrderOfParamsData>> => {\n    const mutationOptions: MutationOptions<unknown, AxiosError<DefaultError>, Options<CallToTestOrderOfParamsData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await callToTestOrderOfParams({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const duplicateNameMutation = (options?: Partial<Options<DuplicateNameData>>): MutationOptions<unknown, AxiosError<DefaultError>, Options<DuplicateNameData>> => {\n    const mutationOptions: MutationOptions<unknown, AxiosError<DefaultError>, Options<DuplicateNameData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await duplicateName({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const duplicateName2QueryKey = (options?: Options<DuplicateName2Data>) => createQueryKey('duplicateName2', options);\n\nexport const duplicateName2Options = (options?: Options<DuplicateName2Data>) => queryOptions<unknown, AxiosError<DefaultError>, unknown, ReturnType<typeof duplicateName2QueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await duplicateName2({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: duplicateName2QueryKey(options)\n});\n\nexport const duplicateName3Mutation = (options?: Partial<Options<DuplicateName3Data>>): MutationOptions<unknown, AxiosError<DefaultError>, Options<DuplicateName3Data>> => {\n    const mutationOptions: MutationOptions<unknown, AxiosError<DefaultError>, Options<DuplicateName3Data>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await duplicateName3({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const duplicateName4Mutation = (options?: Partial<Options<DuplicateName4Data>>): MutationOptions<unknown, AxiosError<DefaultError>, Options<DuplicateName4Data>> => {\n    const mutationOptions: MutationOptions<unknown, AxiosError<DefaultError>, Options<DuplicateName4Data>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await duplicateName4({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const callWithNoContentResponseQueryKey = (options?: Options<CallWithNoContentResponseData>) => createQueryKey('callWithNoContentResponse', options);\n\nexport const callWithNoContentResponseOptions = (options?: Options<CallWithNoContentResponseData>) => queryOptions<CallWithNoContentResponseResponse, AxiosError<DefaultError>, CallWithNoContentResponseResponse, ReturnType<typeof callWithNoContentResponseQueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await callWithNoContentResponse({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: callWithNoContentResponseQueryKey(options)\n});\n\nexport const callWithResponseAndNoContentResponseQueryKey = (options?: Options<CallWithResponseAndNoContentResponseData>) => createQueryKey('callWithResponseAndNoContentResponse', options);\n\nexport const callWithResponseAndNoContentResponseOptions = (options?: Options<CallWithResponseAndNoContentResponseData>) => queryOptions<CallWithResponseAndNoContentResponseResponse, AxiosError<DefaultError>, CallWithResponseAndNoContentResponseResponse, ReturnType<typeof callWithResponseAndNoContentResponseQueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await callWithResponseAndNoContentResponse({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: callWithResponseAndNoContentResponseQueryKey(options)\n});\n\nexport const dummyAQueryKey = (options?: Options<DummyAData>) => createQueryKey('dummyA', options);\n\nexport const dummyAOptions = (options?: Options<DummyAData>) => queryOptions<DummyAResponse, AxiosError<DefaultError>, DummyAResponse, ReturnType<typeof dummyAQueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await dummyA({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: dummyAQueryKey(options)\n});\n\nexport const dummyBQueryKey = (options?: Options<DummyBData>) => createQueryKey('dummyB', options);\n\nexport const dummyBOptions = (options?: Options<DummyBData>) => queryOptions<DummyBResponse, AxiosError<DefaultError>, DummyBResponse, ReturnType<typeof dummyBQueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await dummyB({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: dummyBQueryKey(options)\n});\n\nexport const callWithResponseQueryKey = (options?: Options<CallWithResponseData>) => createQueryKey('callWithResponse', options);\n\nexport const callWithResponseOptions = (options?: Options<CallWithResponseData>) => queryOptions<CallWithResponseResponse, AxiosError<DefaultError>, CallWithResponseResponse, ReturnType<typeof callWithResponseQueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await callWithResponse({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: callWithResponseQueryKey(options)\n});\n\nexport const callWithDuplicateResponsesMutation = (options?: Partial<Options<CallWithDuplicateResponsesData>>): MutationOptions<CallWithDuplicateResponsesResponse, AxiosError<CallWithDuplicateResponsesError>, Options<CallWithDuplicateResponsesData>> => {\n    const mutationOptions: MutationOptions<CallWithDuplicateResponsesResponse, AxiosError<CallWithDuplicateResponsesError>, Options<CallWithDuplicateResponsesData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await callWithDuplicateResponses({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const callWithResponsesMutation = (options?: Partial<Options<CallWithResponsesData>>): MutationOptions<CallWithResponsesResponse, AxiosError<CallWithResponsesError>, Options<CallWithResponsesData>> => {\n    const mutationOptions: MutationOptions<CallWithResponsesResponse, AxiosError<CallWithResponsesError>, Options<CallWithResponsesData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await callWithResponses({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const collectionFormatQueryKey = (options: Options<CollectionFormatData>) => createQueryKey('collectionFormat', options);\n\nexport const collectionFormatOptions = (options: Options<CollectionFormatData>) => queryOptions<unknown, AxiosError<DefaultError>, unknown, ReturnType<typeof collectionFormatQueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await collectionFormat({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: collectionFormatQueryKey(options)\n});\n\nexport const typesQueryKey = (options: Options<TypesData>) => createQueryKey('types', options);\n\nexport const typesOptions = (options: Options<TypesData>) => queryOptions<TypesResponse, AxiosError<DefaultError>, TypesResponse, ReturnType<typeof typesQueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await types({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: typesQueryKey(options)\n});\n\nexport const uploadFileMutation = (options?: Partial<Options<UploadFileData>>): MutationOptions<UploadFileResponse, AxiosError<DefaultError>, Options<UploadFileData>> => {\n    const mutationOptions: MutationOptions<UploadFileResponse, AxiosError<DefaultError>, Options<UploadFileData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await uploadFile({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const fileResponseQueryKey = (options: Options<FileResponseData>) => createQueryKey('fileResponse', options);\n\nexport const fileResponseOptions = (options: Options<FileResponseData>) => queryOptions<FileResponseResponse, AxiosError<DefaultError>, FileResponseResponse, ReturnType<typeof fileResponseQueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await fileResponse({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: fileResponseQueryKey(options)\n});\n\nexport const complexTypesQueryKey = (options: Options<ComplexTypesData>) => createQueryKey('complexTypes', options);\n\nexport const complexTypesOptions = (options: Options<ComplexTypesData>) => queryOptions<ComplexTypesResponse, AxiosError<DefaultError>, ComplexTypesResponse, ReturnType<typeof complexTypesQueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await complexTypes({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: complexTypesQueryKey(options)\n});\n\nexport const multipartResponseQueryKey = (options?: Options<MultipartResponseData>) => createQueryKey('multipartResponse', options);\n\nexport const multipartResponseOptions = (options?: Options<MultipartResponseData>) => queryOptions<MultipartResponseResponse, AxiosError<DefaultError>, MultipartResponseResponse, ReturnType<typeof multipartResponseQueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await multipartResponse({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: multipartResponseQueryKey(options)\n});\n\nexport const multipartRequestMutation = (options?: Partial<Options<MultipartRequestData>>): MutationOptions<unknown, AxiosError<DefaultError>, Options<MultipartRequestData>> => {\n    const mutationOptions: MutationOptions<unknown, AxiosError<DefaultError>, Options<MultipartRequestData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await multipartRequest({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const complexParamsMutation = (options?: Partial<Options<ComplexParamsData>>): MutationOptions<ComplexParamsResponse, AxiosError<DefaultError>, Options<ComplexParamsData>> => {\n    const mutationOptions: MutationOptions<ComplexParamsResponse, AxiosError<DefaultError>, Options<ComplexParamsData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await complexParams({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const callWithResultFromHeaderMutation = (options?: Partial<Options<CallWithResultFromHeaderData>>): MutationOptions<unknown, AxiosError<DefaultError>, Options<CallWithResultFromHeaderData>> => {\n    const mutationOptions: MutationOptions<unknown, AxiosError<DefaultError>, Options<CallWithResultFromHeaderData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await callWithResultFromHeader({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const testErrorCodeMutation = (options?: Partial<Options<TestErrorCodeData>>): MutationOptions<unknown, AxiosError<DefaultError>, Options<TestErrorCodeData>> => {\n    const mutationOptions: MutationOptions<unknown, AxiosError<DefaultError>, Options<TestErrorCodeData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await testErrorCode({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const nonAsciiæøåÆøÅöôêÊ字符串Mutation = (options?: Partial<Options<NonAsciiæøåÆøÅöôêÊ字符串Data>>): MutationOptions<NonAsciiæøåÆøÅöôêÊ字符串Response, AxiosError<DefaultError>, Options<NonAsciiæøåÆøÅöôêÊ字符串Data>> => {\n    const mutationOptions: MutationOptions<NonAsciiæøåÆøÅöôêÊ字符串Response, AxiosError<DefaultError>, Options<NonAsciiæøåÆøÅöôêÊ字符串Data>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await nonAsciiæøåÆøÅöôêÊ字符串({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\n/**\n * Login User\n */\nexport const putWithFormUrlEncodedMutation = (options?: Partial<Options<PutWithFormUrlEncodedData>>): MutationOptions<unknown, AxiosError<DefaultError>, Options<PutWithFormUrlEncodedData>> => {\n    const mutationOptions: MutationOptions<unknown, AxiosError<DefaultError>, Options<PutWithFormUrlEncodedData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await putWithFormUrlEncoded({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/solid-query/axios/client/client.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { AxiosError, AxiosInstance, RawAxiosRequestHeaders } from 'axios';\nimport axios from 'axios';\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 } from './types.gen';\nimport { buildUrl, createConfig, mergeConfigs, mergeHeaders, setAuthParams } from './utils.gen';\n\nexport const createClient = (config: Config = {}): Client => {\n  let _config = mergeConfigs(createConfig(), config);\n\n  let instance: AxiosInstance;\n\n  if (_config.axios && !('Axios' in _config.axios)) {\n    instance = _config.axios;\n  } else {\n    // eslint-disable-next-line @typescript-eslint/no-unused-vars\n    const { auth, ...configWithoutAuth } = _config;\n    instance = axios.create(configWithoutAuth);\n  }\n\n  const getConfig = (): Config => ({ ..._config });\n\n  const setConfig = (config: Config): Config => {\n    _config = mergeConfigs(_config, config);\n    instance.defaults = {\n      ...instance.defaults,\n      ..._config,\n      // @ts-expect-error\n      headers: mergeHeaders(instance.defaults.headers, _config.headers),\n    };\n    return getConfig();\n  };\n\n  const beforeRequest = async (options: RequestOptions) => {\n    const opts = {\n      ..._config,\n      ...options,\n      axios: options.axios ?? _config.axios ?? instance,\n      headers: mergeHeaders(_config.headers, options.headers),\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.body = opts.bodySerializer(opts.body);\n    }\n\n    const url = buildUrl(opts);\n\n    return { opts, url };\n  };\n\n  // @ts-expect-error\n  const request: Client['request'] = async (options) => {\n    // @ts-expect-error\n    const { opts, url } = await beforeRequest(options);\n    try {\n      // assign Axios here for consistency with fetch\n      const _axios = opts.axios!;\n      // eslint-disable-next-line @typescript-eslint/no-unused-vars\n      const { auth, ...optsWithoutAuth } = opts;\n      const response = await _axios({\n        ...optsWithoutAuth,\n        baseURL: '', // the baseURL is already included in `url`\n        data: getValidRequestBody(opts),\n        headers: opts.headers as RawAxiosRequestHeaders,\n        // let `paramsSerializer()` handle query params if it exists\n        params: opts.paramsSerializer ? opts.query : undefined,\n        url,\n      });\n\n      let { data } = response;\n\n      if (opts.responseType === '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 {\n        ...response,\n        data: data ?? {},\n      };\n    } catch (error) {\n      const e = error as AxiosError;\n      if (opts.throwOnError) {\n        throw e;\n      }\n      // @ts-expect-error\n      e.error = e.response?.data ?? {};\n      return e;\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 Record<string, string>,\n      method,\n      serializedBody: getValidRequestBody(opts) as BodyInit | null | undefined,\n      // @ts-expect-error\n      signal: opts.signal,\n      url,\n    });\n  };\n\n  const _buildUrl: Client['buildUrl'] = (options) =>\n    buildUrl({ axios: instance, ..._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    instance,\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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/solid-query/axios/client/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type { Auth } from '../core/auth.gen';\nexport type { QuerySerializerOptions } from '../core/bodySerializer.gen';\nexport {\n  formDataBodySerializer,\n  jsonBodySerializer,\n  urlSearchParamsBodySerializer,\n} from '../core/bodySerializer.gen';\nexport { buildClientParams } from '../core/params.gen';\nexport { serializeQueryKeyValue } from '../core/queryKeySerializer.gen';\nexport { createClient } from './client.gen';\nexport type {\n  Client,\n  ClientOptions,\n  Config,\n  CreateClientConfig,\n  Options,\n  RequestOptions,\n  RequestResult,\n  TDataShape,\n} from './types.gen';\nexport { createConfig } from './utils.gen';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/solid-query/axios/client/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type {\n  AxiosError,\n  AxiosInstance,\n  AxiosRequestHeaders,\n  AxiosResponse,\n  AxiosStatic,\n  CreateAxiosDefaults,\n} from 'axios';\n\nimport type { Auth } from '../core/auth.gen';\nimport type {\n  ServerSentEventsOptions,\n  ServerSentEventsResult,\n} from '../core/serverSentEvents.gen';\nimport type { Client as CoreClient, Config as CoreConfig } from '../core/types.gen';\n\nexport interface Config<T extends ClientOptions = ClientOptions>\n  extends Omit<CreateAxiosDefaults, 'auth' | 'baseURL' | 'headers' | 'method'>, CoreConfig {\n  /**\n   * Axios implementation. You can use this option to provide either an\n   * `AxiosStatic` or an `AxiosInstance`.\n   *\n   * @default axios\n   */\n  axios?: AxiosStatic | AxiosInstance;\n  /**\n   * Base URL for all requests made by this client.\n   */\n  baseURL?: T['baseURL'];\n  /**\n   * An object containing any HTTP headers that you want to pre-populate your\n   * `Headers` object with.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/Headers/Headers#init See more}\n   */\n  headers?:\n    | AxiosRequestHeaders\n    | Record<\n        string,\n        string | number | boolean | (string | number | boolean)[] | null | undefined | unknown\n      >;\n  /**\n   * Throw an error instead of returning it in the response?\n   *\n   * @default false\n   */\n  throwOnError?: T['throwOnError'];\n}\n\nexport interface RequestOptions<\n  TData = unknown,\n  ThrowOnError extends boolean = boolean,\n  Url extends string = string,\n>\n  extends\n    Config<{\n      throwOnError: ThrowOnError;\n    }>,\n    Pick<\n      ServerSentEventsOptions<TData>,\n      | 'onRequest'\n      | 'onSseError'\n      | 'onSseEvent'\n      | 'sseDefaultRetryDelay'\n      | 'sseMaxRetryAttempts'\n      | 'sseMaxRetryDelay'\n    > {\n  /**\n   * Any body that you want to add to your request.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/fetch#body}\n   */\n  body?: unknown;\n  path?: Record<string, unknown>;\n  query?: Record<string, unknown>;\n  /**\n   * Security mechanism(s) to use for the request.\n   */\n  security?: ReadonlyArray<Auth>;\n  url: Url;\n}\n\nexport interface ClientOptions {\n  baseURL?: string;\n  throwOnError?: boolean;\n}\n\nexport type RequestResult<\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = boolean,\n> = ThrowOnError extends true\n  ? Promise<AxiosResponse<TData extends Record<string, unknown> ? TData[keyof TData] : TData>>\n  : Promise<\n      | (AxiosResponse<TData extends Record<string, unknown> ? TData[keyof TData] : TData> & {\n          error: undefined;\n        })\n      | (AxiosError<TError extends Record<string, unknown> ? TError[keyof TError] : TError> & {\n          data: undefined;\n          error: TError extends Record<string, unknown> ? TError[keyof TError] : TError;\n        })\n    >;\n\ntype MethodFn = <TData = unknown, TError = unknown, ThrowOnError extends boolean = false>(\n  options: Omit<RequestOptions<TData, ThrowOnError>, 'method'>,\n) => RequestResult<TData, TError, ThrowOnError>;\n\ntype SseFn = <TData = unknown, TError = unknown, ThrowOnError extends boolean = false>(\n  options: Omit<RequestOptions<TData, ThrowOnError>, 'method'>,\n) => Promise<ServerSentEventsResult<TData, TError>>;\n\ntype RequestFn = <TData = unknown, TError = unknown, ThrowOnError extends boolean = false>(\n  options: Omit<RequestOptions<TData, ThrowOnError>, 'method'> &\n    Pick<Required<RequestOptions<TData, ThrowOnError>>, 'method'>,\n) => RequestResult<TData, TError, ThrowOnError>;\n\ntype BuildUrlFn = <\n  TData extends {\n    body?: unknown;\n    path?: Record<string, unknown>;\n    query?: Record<string, unknown>;\n    url: string;\n  },\n>(\n  options: TData & Options<TData>,\n) => string;\n\nexport type Client = CoreClient<RequestFn, Config, MethodFn, BuildUrlFn, SseFn> & {\n  instance: AxiosInstance;\n};\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 = ClientOptions> = (\n  override?: Config<ClientOptions & T>,\n) => Config<Required<ClientOptions> & T>;\n\nexport interface TDataShape {\n  body?: unknown;\n  headers?: unknown;\n  path?: unknown;\n  query?: unknown;\n  url: string;\n}\n\ntype OmitKeys<T, K> = Pick<T, Exclude<keyof T, K>>;\n\nexport type Options<\n  TData extends TDataShape = TDataShape,\n  ThrowOnError extends boolean = boolean,\n  TResponse = unknown,\n> = OmitKeys<RequestOptions<TResponse, ThrowOnError>, 'body' | 'path' | 'query' | 'url'> &\n  ([TData] extends [never] ? unknown : Omit<TData, 'url'>);\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/solid-query/axios/client/utils.gen.ts",
    "content": "// 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 {\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\nconst checkForExistence = (\n  options: Pick<RequestOptions, 'auth' | 'query'> & {\n    headers: Record<any, unknown>;\n  },\n  name?: string,\n): boolean => {\n  if (!name) {\n    return false;\n  }\n  if (name in options.headers || options.query?.[name]) {\n    return true;\n  }\n  if (\n    'Cookie' in options.headers &&\n    options.headers['Cookie'] &&\n    typeof options.headers['Cookie'] === 'string'\n  ) {\n    return options.headers['Cookie'].includes(`${name}=`);\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: Record<any, unknown>;\n  }) => {\n  for (const auth of security) {\n    if (checkForExistence(options, auth.name)) {\n      continue;\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        const value = `${name}=${token}`;\n        if ('Cookie' in options.headers && options.headers['Cookie']) {\n          options.headers['Cookie'] = `${options.headers['Cookie']}; ${value}`;\n        } else {\n          options.headers['Cookie'] = value;\n        }\n        break;\n      }\n      case 'header':\n      default:\n        options.headers[name] = token;\n        break;\n    }\n  }\n};\n\nexport const buildUrl: Client['buildUrl'] = (options) => {\n  const instanceBaseUrl = options.axios?.defaults?.baseURL;\n\n  const baseUrl =\n    !!options.baseURL && typeof options.baseURL === 'string' ? options.baseURL : instanceBaseUrl;\n\n  return getUrl({\n    baseUrl: baseUrl as string,\n    path: options.path,\n    // let `paramsSerializer()` handle query params if it exists\n    query: !options.paramsSerializer ? options.query : undefined,\n    querySerializer:\n      typeof options.querySerializer === 'function'\n        ? options.querySerializer\n        : createQuerySerializer(options.querySerializer),\n    url: options.url,\n  });\n};\n\nexport const mergeConfigs = (a: Config, b: Config): Config => {\n  const config = { ...a, ...b };\n  config.headers = mergeHeaders(a.headers, b.headers);\n  return config;\n};\n\n/**\n * Special Axios headers keywords allowing to set headers by request method.\n */\nexport const axiosHeadersKeywords = [\n  'common',\n  'delete',\n  'get',\n  'head',\n  'patch',\n  'post',\n  'put',\n] as const;\n\nexport const mergeHeaders = (\n  ...headers: Array<Required<Config>['headers'] | undefined>\n): Record<any, unknown> => {\n  const mergedHeaders: Record<any, unknown> = {};\n  for (const header of headers) {\n    if (!header || typeof header !== 'object') {\n      continue;\n    }\n\n    const iterator = Object.entries(header);\n\n    for (const [key, value] of iterator) {\n      if (\n        axiosHeadersKeywords.includes(key as (typeof axiosHeadersKeywords)[number]) &&\n        typeof value === 'object'\n      ) {\n        mergedHeaders[key] = {\n          ...(mergedHeaders[key] as Record<any, unknown>),\n          ...value,\n        };\n      } else if (value === null) {\n        delete mergedHeaders[key];\n      } else if (Array.isArray(value)) {\n        for (const v of value) {\n          // @ts-expect-error\n          mergedHeaders[key] = [...(mergedHeaders[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[key] = typeof value === 'object' ? JSON.stringify(value) : (value as string);\n      }\n    }\n  }\n  return mergedHeaders;\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  ...override,\n});\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/solid-query/axios/client.gen.ts",
    "content": "// 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: 'http://localhost:3000/base' }));\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/solid-query/axios/core/auth.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/solid-query/axios/core/bodySerializer.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/solid-query/axios/core/params.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/solid-query/axios/core/pathSerializer.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/solid-query/axios/core/queryKeySerializer.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\n/**\n * JSON-friendly union that mirrors what Pinia Colada can hash.\n */\nexport type JsonValue =\n  | null\n  | string\n  | number\n  | boolean\n  | JsonValue[]\n  | { [key: string]: JsonValue };\n\n/**\n * Replacer that converts non-JSON values (bigint, Date, etc.) to safe substitutes.\n */\nexport const queryKeyJsonReplacer = (_key: string, value: unknown) => {\n  if (value === undefined || typeof value === 'function' || typeof value === 'symbol') {\n    return undefined;\n  }\n  if (typeof value === 'bigint') {\n    return value.toString();\n  }\n  if (value instanceof Date) {\n    return value.toISOString();\n  }\n  return value;\n};\n\n/**\n * Safely stringifies a value and parses it back into a JsonValue.\n */\nexport const stringifyToJsonValue = (input: unknown): JsonValue | undefined => {\n  try {\n    const json = JSON.stringify(input, queryKeyJsonReplacer);\n    if (json === undefined) {\n      return undefined;\n    }\n    return JSON.parse(json) as JsonValue;\n  } catch {\n    return undefined;\n  }\n};\n\n/**\n * Detects plain objects (including objects with a null prototype).\n */\nconst isPlainObject = (value: unknown): value is Record<string, unknown> => {\n  if (value === null || typeof value !== 'object') {\n    return false;\n  }\n  const prototype = Object.getPrototypeOf(value as object);\n  return prototype === Object.prototype || prototype === null;\n};\n\n/**\n * Turns URLSearchParams into a sorted JSON object for deterministic keys.\n */\nconst serializeSearchParams = (params: URLSearchParams): JsonValue => {\n  const entries = Array.from(params.entries()).sort(([a], [b]) => a.localeCompare(b));\n  const result: Record<string, JsonValue> = {};\n\n  for (const [key, value] of entries) {\n    const existing = result[key];\n    if (existing === undefined) {\n      result[key] = value;\n      continue;\n    }\n\n    if (Array.isArray(existing)) {\n      (existing as string[]).push(value);\n    } else {\n      result[key] = [existing, value];\n    }\n  }\n\n  return result;\n};\n\n/**\n * Normalizes any accepted value into a JSON-friendly shape for query keys.\n */\nexport const serializeQueryKeyValue = (value: unknown): JsonValue | undefined => {\n  if (value === null) {\n    return null;\n  }\n\n  if (typeof value === 'string' || typeof value === 'number' || typeof value === 'boolean') {\n    return value;\n  }\n\n  if (value === undefined || typeof value === 'function' || typeof value === 'symbol') {\n    return undefined;\n  }\n\n  if (typeof value === 'bigint') {\n    return value.toString();\n  }\n\n  if (value instanceof Date) {\n    return value.toISOString();\n  }\n\n  if (Array.isArray(value)) {\n    return stringifyToJsonValue(value);\n  }\n\n  if (typeof URLSearchParams !== 'undefined' && value instanceof URLSearchParams) {\n    return serializeSearchParams(value);\n  }\n\n  if (isPlainObject(value)) {\n    return stringifyToJsonValue(value);\n  }\n\n  return undefined;\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/solid-query/axios/core/serverSentEvents.gen.ts",
    "content": "// 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 const 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            // Normalize line endings: CRLF -> LF, then CR -> LF\n            buffer = buffer.replace(/\\r\\n/g, '\\n').replace(/\\r/g, '\\n');\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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/solid-query/axios/core/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { Auth, AuthToken } from './auth.gen';\nimport type { BodySerializer, QuerySerializer, QuerySerializerOptions } from './bodySerializer.gen';\n\nexport type HttpMethod =\n  | 'connect'\n  | 'delete'\n  | 'get'\n  | 'head'\n  | 'options'\n  | 'patch'\n  | 'post'\n  | 'put'\n  | 'trace';\n\nexport type Client<\n  RequestFn = never,\n  Config = unknown,\n  MethodFn = never,\n  BuildUrlFn = never,\n  SseFn = never,\n> = {\n  /**\n   * Returns the final request URL.\n   */\n  buildUrl: BuildUrlFn;\n  getConfig: () => Config;\n  request: RequestFn;\n  setConfig: (config: Config) => Config;\n} & {\n  [K in HttpMethod]: MethodFn;\n} & ([SseFn] extends [never] ? { sse?: never } : { sse: { [K in HttpMethod]: SseFn } });\n\nexport interface Config {\n  /**\n   * Auth token or a function returning auth token. The resolved value will be\n   * added to the request payload as defined by its `security` array.\n   */\n  auth?: ((auth: Auth) => Promise<AuthToken> | AuthToken) | AuthToken;\n  /**\n   * A function for serializing request body parameter. By default,\n   * {@link JSON.stringify()} will be used.\n   */\n  bodySerializer?: BodySerializer | null;\n  /**\n   * An object containing any HTTP headers that you want to pre-populate your\n   * `Headers` object with.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/Headers/Headers#init See more}\n   */\n  headers?:\n    | RequestInit['headers']\n    | Record<\n        string,\n        string | number | boolean | (string | number | boolean)[] | null | undefined | unknown\n      >;\n  /**\n   * The request method.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/fetch#method See more}\n   */\n  method?: Uppercase<HttpMethod>;\n  /**\n   * A function for serializing request query parameters. By default, arrays\n   * will be exploded in form style, objects will be exploded in deepObject\n   * style, and reserved characters are percent-encoded.\n   *\n   * This method will have no effect if the native `paramsSerializer()` Axios\n   * API function is used.\n   *\n   * {@link https://swagger.io/docs/specification/serialization/#query View examples}\n   */\n  querySerializer?: QuerySerializer | QuerySerializerOptions;\n  /**\n   * A function validating request data. This is useful if you want to ensure\n   * the request conforms to the desired shape, so it can be safely sent to\n   * the server.\n   */\n  requestValidator?: (data: unknown) => Promise<unknown>;\n  /**\n   * A function transforming response data before it's returned. This is useful\n   * for post-processing data, e.g. converting ISO strings into Date objects.\n   */\n  responseTransformer?: (data: unknown) => Promise<unknown>;\n  /**\n   * A function validating response data. This is useful if you want to ensure\n   * the response conforms to the desired shape, so it can be safely passed to\n   * the transformers and returned to the user.\n   */\n  responseValidator?: (data: unknown) => Promise<unknown>;\n}\n\ntype IsExactlyNeverOrNeverUndefined<T> = [T] extends [never]\n  ? true\n  : [T] extends [never | undefined]\n    ? [undefined] extends [T]\n      ? false\n      : true\n    : false;\n\nexport type OmitNever<T extends Record<string, unknown>> = {\n  [K in keyof T as IsExactlyNeverOrNeverUndefined<T[K]> extends true ? never : K]: T[K];\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/solid-query/axios/core/utils.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/solid-query/axios/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport { apiVVersionODataControllerCount, callToTestOrderOfParams, callWithDefaultOptionalParameters, callWithDefaultParameters, callWithDescriptions, callWithDuplicateResponses, callWithNoContentResponse, callWithParameters, callWithResponse, callWithResponseAndNoContentResponse, callWithResponses, callWithResultFromHeader, callWithWeirdParameterNames, collectionFormat, complexParams, complexTypes, deleteCallWithoutParametersAndResponse, deleteFoo, deprecatedCall, dummyA, dummyB, duplicateName, duplicateName2, duplicateName3, duplicateName4, export_, fileResponse, fooWow, getApiVbyApiVersionSimpleOperation, getCallWithOptionalParam, getCallWithoutParametersAndResponse, headCallWithoutParametersAndResponse, import_, multipartRequest, multipartResponse, nonAsciiæøåÆøÅöôêÊ字符串, type Options, optionsCallWithoutParametersAndResponse, patchApiVbyApiVersionNoTag, patchCallWithoutParametersAndResponse, postApiVbyApiVersionFormData, postApiVbyApiVersionRequestBody, postCallWithOptionalParam, postCallWithoutParametersAndResponse, putCallWithoutParametersAndResponse, putWithFormUrlEncoded, testErrorCode, types, uploadFile } from './sdk.gen';\nexport type { _3eNum1Период, _400, AdditionalPropertiesIntegerIssue, AdditionalPropertiesUnknownIssue, AdditionalPropertiesUnknownIssue2, AdditionalPropertiesUnknownIssue3, AdditionalPropertiesUnknownIssueWritable, AnyOfAnyAndNull, AnyOfArrays, ApiVVersionODataControllerCountData, ApiVVersionODataControllerCountResponse, ApiVVersionODataControllerCountResponses, ArrayWithAnyOfProperties, ArrayWithArray, ArrayWithBooleans, ArrayWithNumbers, ArrayWithProperties, ArrayWithReferences, ArrayWithStrings, CallToTestOrderOfParamsData, CallWithDefaultOptionalParametersData, CallWithDefaultParametersData, CallWithDescriptionsData, CallWithDuplicateResponsesData, CallWithDuplicateResponsesError, CallWithDuplicateResponsesErrors, CallWithDuplicateResponsesResponse, CallWithDuplicateResponsesResponses, CallWithNoContentResponseData, CallWithNoContentResponseResponse, CallWithNoContentResponseResponses, CallWithParametersData, CallWithResponseAndNoContentResponseData, CallWithResponseAndNoContentResponseResponse, CallWithResponseAndNoContentResponseResponses, CallWithResponseData, CallWithResponseResponse, CallWithResponseResponses, CallWithResponsesData, CallWithResponsesError, CallWithResponsesErrors, CallWithResponsesResponse, CallWithResponsesResponses, CallWithResultFromHeaderData, CallWithResultFromHeaderErrors, CallWithResultFromHeaderResponses, CallWithWeirdParameterNamesData, CamelCaseCommentWithBreaks, CharactersInDescription, ClientOptions, CollectionFormatData, CommentWithBackticks, CommentWithBackticksAndQuotes, CommentWithBreaks, CommentWithExpressionPlaceholders, CommentWithQuotes, CommentWithReservedCharacters, CommentWithSlashes, ComplexParamsData, ComplexParamsResponse, ComplexParamsResponses, ComplexTypesData, ComplexTypesErrors, ComplexTypesResponse, ComplexTypesResponses, CompositionBaseModel, CompositionExtendedModel, CompositionWithAllOfAndNullable, CompositionWithAnyOf, CompositionWithAnyOfAndNullable, CompositionWithAnyOfAnonymous, CompositionWithNestedAnyAndTypeNull, CompositionWithNestedAnyOfAndNull, CompositionWithOneOf, CompositionWithOneOfAndComplexArrayDictionary, CompositionWithOneOfAndNullable, CompositionWithOneOfAndProperties, CompositionWithOneOfAndSimpleArrayDictionary, CompositionWithOneOfAndSimpleDictionary, CompositionWithOneOfAnonymous, CompositionWithOneOfDiscriminator, ConstValue, Default, DeleteCallWithoutParametersAndResponseData, DeleteFooData, DeleteFooData2, DeleteFooData3, DeprecatedCallData, DeprecatedModel, DictionaryWithArray, DictionaryWithDictionary, DictionaryWithProperties, DictionaryWithPropertiesAndAdditionalProperties, DictionaryWithReference, DictionaryWithString, DummyAData, DummyAResponse, DummyAResponses, DummyBData, DummyBResponse, DummyBResponses, DuplicateName2Data, DuplicateName3Data, DuplicateName4Data, DuplicateNameData, EnumFromDescription, EnumWithExtensions, EnumWithNumbers, EnumWithReplacedCharacters, EnumWithStrings, EnumWithXEnumNames, ExportData, ExternalRefA, ExternalRefB, ExternalSharedModel, File, FileResponseData, FileResponseResponse, FileResponseResponses, FileWritable, FooWowData, FooWowResponses, FreeFormObjectWithAdditionalPropertiesEqEmptyObject, FreeFormObjectWithAdditionalPropertiesEqTrue, FreeFormObjectWithoutAdditionalProperties, GenericSchemaDuplicateIssue1SystemBoolean, GenericSchemaDuplicateIssue1SystemBooleanWritable, GenericSchemaDuplicateIssue1SystemString, GenericSchemaDuplicateIssue1SystemStringWritable, GetApiVbyApiVersionSimpleOperationData, GetApiVbyApiVersionSimpleOperationError, GetApiVbyApiVersionSimpleOperationErrors, GetApiVbyApiVersionSimpleOperationResponse, GetApiVbyApiVersionSimpleOperationResponses, GetCallWithOptionalParamData, GetCallWithoutParametersAndResponseData, HeadCallWithoutParametersAndResponseData, Import, ImportData, ImportResponse, ImportResponses, IoK8sApimachineryPkgApisMetaV1DeleteOptions, IoK8sApimachineryPkgApisMetaV1Preconditions, ModelCircle, ModelFromZendesk, ModelSquare, ModelThatExtends, ModelThatExtendsExtends, ModelWithAdditionalPropertiesEqTrue, ModelWithAdditionalPropertiesRef, ModelWithAnyOfConstantSizeArray, ModelWithAnyOfConstantSizeArrayAndIntersect, ModelWithAnyOfConstantSizeArrayNullable, ModelWithAnyOfConstantSizeArrayWithNSizeAndOptions, ModelWithAnyOfConstantSizeArrayWithNSizeAndOptionsWritable, ModelWithArray, ModelWithArrayReadOnlyAndWriteOnly, ModelWithArrayReadOnlyAndWriteOnlyWritable, ModelWithBackticksInDescription, ModelWithBoolean, ModelWithCircularReference, ModelWithConst, ModelWithConstantSizeArray, ModelWithDictionary, ModelWithDuplicateImports, ModelWithDuplicateProperties, ModelWithEnum, ModelWithEnumFromDescription, ModelWithEnumWithHyphen, ModelWithInteger, ModelWithNestedArrayEnums, ModelWithNestedArrayEnumsData, ModelWithNestedArrayEnumsDataBar, ModelWithNestedArrayEnumsDataFoo, ModelWithNestedCompositionEnums, ModelWithNestedEnums, ModelWithNestedProperties, ModelWithNullableObject, ModelWithNullableString, ModelWithNumericEnumUnion, ModelWithOneOfAndProperties, ModelWithOneOfEnum, ModelWithOrderedProperties, ModelWithPattern, ModelWithPatternWritable, ModelWithPrefixItemsConstantSizeArray, ModelWithProperties, ModelWithPropertiesWritable, ModelWithReadOnlyAndWriteOnly, ModelWithReadOnlyAndWriteOnlyWritable, ModelWithReference, ModelWithReferenceWritable, ModelWithString, ModelWithStringError, MultipartRequestData, MultipartResponseData, MultipartResponseResponse, MultipartResponseResponses, NestedAnyOfArraysNullable, NonAsciiæøåÆøÅöôêÊ字符串Data, NonAsciiæøåÆøÅöôêÊ字符串Response, NonAsciiæøåÆøÅöôêÊ字符串Responses, NonAsciiStringæøåÆøÅöôêÊ字符串, NullableObject, OneOfAllOfIssue, OneOfAllOfIssueWritable, OptionsCallWithoutParametersAndResponseData, Pageable, ParameterSimpleParameterUnused, PatchApiVbyApiVersionNoTagData, PatchApiVbyApiVersionNoTagResponses, PatchCallWithoutParametersAndResponseData, PostApiVbyApiVersionFormDataData, PostApiVbyApiVersionRequestBodyData, PostCallWithOptionalParamData, PostCallWithOptionalParamResponse, PostCallWithOptionalParamResponses, PostCallWithoutParametersAndResponseData, PostServiceWithEmptyTagResponse, PostServiceWithEmptyTagResponse2, PutCallWithoutParametersAndResponseData, PutWithFormUrlEncodedData, SchemaWithFormRestrictedKeys, SimpleBoolean, SimpleFile, SimpleFormData, SimpleInteger, SimpleParameter, SimpleReference, SimpleRequestBody, SimpleString, SimpleStringWithPattern, TestErrorCodeData, TestErrorCodeErrors, TestErrorCodeResponses, TypesData, TypesResponse, TypesResponses, UploadFileData, UploadFileResponse, UploadFileResponses, XFooBar } from './types.gen';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/solid-query/axios/sdk.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport { type Client, formDataBodySerializer, type Options as Options2, type TDataShape, urlSearchParamsBodySerializer } from './client';\nimport { client } from './client.gen';\nimport type { ApiVVersionODataControllerCountData, ApiVVersionODataControllerCountResponses, CallToTestOrderOfParamsData, CallWithDefaultOptionalParametersData, CallWithDefaultParametersData, CallWithDescriptionsData, CallWithDuplicateResponsesData, CallWithDuplicateResponsesErrors, CallWithDuplicateResponsesResponses, CallWithNoContentResponseData, CallWithNoContentResponseResponses, CallWithParametersData, CallWithResponseAndNoContentResponseData, CallWithResponseAndNoContentResponseResponses, CallWithResponseData, CallWithResponseResponses, CallWithResponsesData, CallWithResponsesErrors, CallWithResponsesResponses, CallWithResultFromHeaderData, CallWithResultFromHeaderErrors, CallWithResultFromHeaderResponses, CallWithWeirdParameterNamesData, CollectionFormatData, ComplexParamsData, ComplexParamsResponses, ComplexTypesData, ComplexTypesErrors, ComplexTypesResponses, DeleteCallWithoutParametersAndResponseData, DeleteFooData3, DeprecatedCallData, DummyAData, DummyAResponses, DummyBData, DummyBResponses, DuplicateName2Data, DuplicateName3Data, DuplicateName4Data, DuplicateNameData, ExportData, FileResponseData, FileResponseResponses, FooWowData, FooWowResponses, GetApiVbyApiVersionSimpleOperationData, GetApiVbyApiVersionSimpleOperationErrors, GetApiVbyApiVersionSimpleOperationResponses, GetCallWithOptionalParamData, GetCallWithoutParametersAndResponseData, HeadCallWithoutParametersAndResponseData, ImportData, ImportResponses, MultipartRequestData, MultipartResponseData, MultipartResponseResponses, NonAsciiæøåÆøÅöôêÊ字符串Data, NonAsciiæøåÆøÅöôêÊ字符串Responses, OptionsCallWithoutParametersAndResponseData, PatchApiVbyApiVersionNoTagData, PatchApiVbyApiVersionNoTagResponses, PatchCallWithoutParametersAndResponseData, PostApiVbyApiVersionFormDataData, PostApiVbyApiVersionRequestBodyData, PostCallWithOptionalParamData, PostCallWithOptionalParamResponses, PostCallWithoutParametersAndResponseData, PutCallWithoutParametersAndResponseData, PutWithFormUrlEncodedData, TestErrorCodeData, TestErrorCodeErrors, TestErrorCodeResponses, TypesData, TypesResponses, UploadFileData, UploadFileResponses } from './types.gen';\n\nexport type Options<TData extends TDataShape = TDataShape, ThrowOnError extends boolean = boolean> = Options2<TData, ThrowOnError> & {\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\nexport const export_ = <ThrowOnError extends boolean = false>(options?: Options<ExportData, ThrowOnError>) => (options?.client ?? client).get<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/no+tag', ...options });\n\nexport const patchApiVbyApiVersionNoTag = <ThrowOnError extends boolean = false>(options?: Options<PatchApiVbyApiVersionNoTagData, ThrowOnError>) => (options?.client ?? client).patch<PatchApiVbyApiVersionNoTagResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/no+tag', ...options });\n\nexport const import_ = <ThrowOnError extends boolean = false>(options: Options<ImportData, ThrowOnError>) => (options.client ?? client).post<ImportResponses, unknown, ThrowOnError>({\n    responseType: 'json',\n    url: '/api/v{api-version}/no+tag',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options.headers\n    }\n});\n\nexport const fooWow = <ThrowOnError extends boolean = false>(options?: Options<FooWowData, ThrowOnError>) => (options?.client ?? client).put<FooWowResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/no+tag', ...options });\n\nexport const apiVVersionODataControllerCount = <ThrowOnError extends boolean = false>(options?: Options<ApiVVersionODataControllerCountData, ThrowOnError>) => (options?.client ?? client).get<ApiVVersionODataControllerCountResponses, unknown, ThrowOnError>({\n    responseType: 'json',\n    url: '/api/v{api-version}/simple/$count',\n    ...options\n});\n\nexport const getApiVbyApiVersionSimpleOperation = <ThrowOnError extends boolean = false>(options: Options<GetApiVbyApiVersionSimpleOperationData, ThrowOnError>) => (options.client ?? client).get<GetApiVbyApiVersionSimpleOperationResponses, GetApiVbyApiVersionSimpleOperationErrors, ThrowOnError>({\n    responseType: 'json',\n    url: '/api/v{api-version}/simple:operation',\n    ...options\n});\n\nexport const deleteCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<DeleteCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).delete<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const getCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<GetCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).get<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const headCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<HeadCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).head<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const optionsCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<OptionsCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).options<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const patchCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<PatchCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).patch<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const postCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<PostCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).post<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const putCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<PutCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).put<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const deleteFoo = <ThrowOnError extends boolean = false>(options: Options<DeleteFooData3, ThrowOnError>) => (options.client ?? client).delete<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/foo/{foo_param}/bar/{BarParam}', ...options });\n\nexport const callWithDescriptions = <ThrowOnError extends boolean = false>(options?: Options<CallWithDescriptionsData, ThrowOnError>) => (options?.client ?? client).post<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/descriptions', ...options });\n\n/**\n * @deprecated\n */\nexport const deprecatedCall = <ThrowOnError extends boolean = false>(options: Options<DeprecatedCallData, ThrowOnError>) => (options.client ?? client).post<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/parameters/deprecated', ...options });\n\nexport const callWithParameters = <ThrowOnError extends boolean = false>(options: Options<CallWithParametersData, ThrowOnError>) => (options.client ?? client).post<unknown, unknown, ThrowOnError>({\n    url: '/api/v{api-version}/parameters/{parameterPath}',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options.headers\n    }\n});\n\nexport const callWithWeirdParameterNames = <ThrowOnError extends boolean = false>(options: Options<CallWithWeirdParameterNamesData, ThrowOnError>) => (options.client ?? client).post<unknown, unknown, ThrowOnError>({\n    url: '/api/v{api-version}/parameters/{parameter.path.1}/{parameter-path-2}/{PARAMETER-PATH-3}',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options.headers\n    }\n});\n\nexport const getCallWithOptionalParam = <ThrowOnError extends boolean = false>(options: Options<GetCallWithOptionalParamData, ThrowOnError>) => (options.client ?? client).get<unknown, unknown, ThrowOnError>({\n    url: '/api/v{api-version}/parameters',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options.headers\n    }\n});\n\nexport const postCallWithOptionalParam = <ThrowOnError extends boolean = false>(options: Options<PostCallWithOptionalParamData, ThrowOnError>) => (options.client ?? client).post<PostCallWithOptionalParamResponses, unknown, ThrowOnError>({\n    responseType: 'json',\n    url: '/api/v{api-version}/parameters',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options.headers\n    }\n});\n\nexport const postApiVbyApiVersionRequestBody = <ThrowOnError extends boolean = false>(options?: Options<PostApiVbyApiVersionRequestBodyData, ThrowOnError>) => (options?.client ?? client).post<unknown, unknown, ThrowOnError>({\n    url: '/api/v{api-version}/requestBody',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options?.headers\n    }\n});\n\nexport const postApiVbyApiVersionFormData = <ThrowOnError extends boolean = false>(options?: Options<PostApiVbyApiVersionFormDataData, ThrowOnError>) => (options?.client ?? client).post<unknown, unknown, ThrowOnError>({\n    ...formDataBodySerializer,\n    url: '/api/v{api-version}/formData',\n    ...options,\n    headers: {\n        'Content-Type': null,\n        ...options?.headers\n    }\n});\n\nexport const callWithDefaultParameters = <ThrowOnError extends boolean = false>(options?: Options<CallWithDefaultParametersData, ThrowOnError>) => (options?.client ?? client).get<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/defaults', ...options });\n\nexport const callWithDefaultOptionalParameters = <ThrowOnError extends boolean = false>(options?: Options<CallWithDefaultOptionalParametersData, ThrowOnError>) => (options?.client ?? client).post<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/defaults', ...options });\n\nexport const callToTestOrderOfParams = <ThrowOnError extends boolean = false>(options: Options<CallToTestOrderOfParamsData, ThrowOnError>) => (options.client ?? client).put<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/defaults', ...options });\n\nexport const duplicateName = <ThrowOnError extends boolean = false>(options?: Options<DuplicateNameData, ThrowOnError>) => (options?.client ?? client).delete<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/duplicate', ...options });\n\nexport const duplicateName2 = <ThrowOnError extends boolean = false>(options?: Options<DuplicateName2Data, ThrowOnError>) => (options?.client ?? client).get<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/duplicate', ...options });\n\nexport const duplicateName3 = <ThrowOnError extends boolean = false>(options?: Options<DuplicateName3Data, ThrowOnError>) => (options?.client ?? client).post<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/duplicate', ...options });\n\nexport const duplicateName4 = <ThrowOnError extends boolean = false>(options?: Options<DuplicateName4Data, ThrowOnError>) => (options?.client ?? client).put<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/duplicate', ...options });\n\nexport const callWithNoContentResponse = <ThrowOnError extends boolean = false>(options?: Options<CallWithNoContentResponseData, ThrowOnError>) => (options?.client ?? client).get<CallWithNoContentResponseResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/no-content', ...options });\n\nexport const callWithResponseAndNoContentResponse = <ThrowOnError extends boolean = false>(options?: Options<CallWithResponseAndNoContentResponseData, ThrowOnError>) => (options?.client ?? client).get<CallWithResponseAndNoContentResponseResponses, unknown, ThrowOnError>({\n    responseType: 'json',\n    url: '/api/v{api-version}/multiple-tags/response-and-no-content',\n    ...options\n});\n\nexport const dummyA = <ThrowOnError extends boolean = false>(options?: Options<DummyAData, ThrowOnError>) => (options?.client ?? client).get<DummyAResponses, unknown, ThrowOnError>({\n    responseType: 'json',\n    url: '/api/v{api-version}/multiple-tags/a',\n    ...options\n});\n\nexport const dummyB = <ThrowOnError extends boolean = false>(options?: Options<DummyBData, ThrowOnError>) => (options?.client ?? client).get<DummyBResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/multiple-tags/b', ...options });\n\nexport const callWithResponse = <ThrowOnError extends boolean = false>(options?: Options<CallWithResponseData, ThrowOnError>) => (options?.client ?? client).get<CallWithResponseResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/response', ...options });\n\nexport const callWithDuplicateResponses = <ThrowOnError extends boolean = false>(options?: Options<CallWithDuplicateResponsesData, ThrowOnError>) => (options?.client ?? client).post<CallWithDuplicateResponsesResponses, CallWithDuplicateResponsesErrors, ThrowOnError>({\n    responseType: 'json',\n    url: '/api/v{api-version}/response',\n    ...options\n});\n\nexport const callWithResponses = <ThrowOnError extends boolean = false>(options?: Options<CallWithResponsesData, ThrowOnError>) => (options?.client ?? client).put<CallWithResponsesResponses, CallWithResponsesErrors, ThrowOnError>({\n    responseType: 'json',\n    url: '/api/v{api-version}/response',\n    ...options\n});\n\nexport const collectionFormat = <ThrowOnError extends boolean = false>(options: Options<CollectionFormatData, ThrowOnError>) => (options.client ?? client).get<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/collectionFormat', ...options });\n\nexport const types = <ThrowOnError extends boolean = false>(options: Options<TypesData, ThrowOnError>) => (options.client ?? client).get<TypesResponses, unknown, ThrowOnError>({\n    responseType: 'json',\n    url: '/api/v{api-version}/types',\n    ...options\n});\n\nexport const uploadFile = <ThrowOnError extends boolean = false>(options: Options<UploadFileData, ThrowOnError>) => (options.client ?? client).post<UploadFileResponses, unknown, ThrowOnError>({\n    ...urlSearchParamsBodySerializer,\n    responseType: 'json',\n    url: '/api/v{api-version}/upload',\n    ...options,\n    headers: {\n        'Content-Type': 'application/x-www-form-urlencoded',\n        ...options.headers\n    }\n});\n\nexport const fileResponse = <ThrowOnError extends boolean = false>(options: Options<FileResponseData, ThrowOnError>) => (options.client ?? client).get<FileResponseResponses, unknown, ThrowOnError>({\n    responseType: 'blob',\n    url: '/api/v{api-version}/file/{id}',\n    ...options\n});\n\nexport const complexTypes = <ThrowOnError extends boolean = false>(options: Options<ComplexTypesData, ThrowOnError>) => (options.client ?? client).get<ComplexTypesResponses, ComplexTypesErrors, ThrowOnError>({\n    querySerializer: { parameters: { parameterObject: { object: { style: 'form' } } } },\n    responseType: 'json',\n    url: '/api/v{api-version}/complex',\n    ...options\n});\n\nexport const multipartResponse = <ThrowOnError extends boolean = false>(options?: Options<MultipartResponseData, ThrowOnError>) => (options?.client ?? client).get<MultipartResponseResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/multipart', ...options });\n\nexport const multipartRequest = <ThrowOnError extends boolean = false>(options?: Options<MultipartRequestData, ThrowOnError>) => (options?.client ?? client).post<unknown, unknown, ThrowOnError>({\n    ...formDataBodySerializer,\n    url: '/api/v{api-version}/multipart',\n    ...options,\n    headers: {\n        'Content-Type': null,\n        ...options?.headers\n    }\n});\n\nexport const complexParams = <ThrowOnError extends boolean = false>(options: Options<ComplexParamsData, ThrowOnError>) => (options.client ?? client).put<ComplexParamsResponses, unknown, ThrowOnError>({\n    responseType: 'json',\n    url: '/api/v{api-version}/complex/{id}',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json-patch+json',\n        ...options.headers\n    }\n});\n\nexport const callWithResultFromHeader = <ThrowOnError extends boolean = false>(options?: Options<CallWithResultFromHeaderData, ThrowOnError>) => (options?.client ?? client).post<CallWithResultFromHeaderResponses, CallWithResultFromHeaderErrors, ThrowOnError>({ url: '/api/v{api-version}/header', ...options });\n\nexport const testErrorCode = <ThrowOnError extends boolean = false>(options: Options<TestErrorCodeData, ThrowOnError>) => (options.client ?? client).post<TestErrorCodeResponses, TestErrorCodeErrors, ThrowOnError>({ url: '/api/v{api-version}/error', ...options });\n\nexport const nonAsciiæøåÆøÅöôêÊ字符串 = <ThrowOnError extends boolean = false>(options: Options<NonAsciiæøåÆøÅöôêÊ字符串Data, ThrowOnError>) => (options.client ?? client).post<NonAsciiæøåÆøÅöôêÊ字符串Responses, unknown, ThrowOnError>({\n    responseType: 'json',\n    url: '/api/v{api-version}/non-ascii-æøåÆØÅöôêÊ字符串',\n    ...options\n});\n\n/**\n * Login User\n */\nexport const putWithFormUrlEncoded = <ThrowOnError extends boolean = false>(options: Options<PutWithFormUrlEncodedData, ThrowOnError>) => (options.client ?? client).put<unknown, unknown, ThrowOnError>({\n    ...urlSearchParamsBodySerializer,\n    url: '/api/v{api-version}/non-ascii-æøåÆØÅöôêÊ字符串',\n    ...options,\n    headers: {\n        'Content-Type': 'application/x-www-form-urlencoded',\n        ...options.headers\n    }\n});\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/solid-query/axios/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type ClientOptions = {\n    baseURL: 'http://localhost:3000/base' | (string & {});\n};\n\n/**\n * Model with number-only name\n */\nexport type _400 = string;\n\nexport type ExternalRefA = ExternalSharedModel;\n\nexport type ExternalRefB = ExternalSharedModel;\n\n/**\n * Testing multiline comments in string: First line\n * Second line\n *\n * Fourth line\n */\nexport type CamelCaseCommentWithBreaks = number;\n\n/**\n * Testing multiline comments in string: First line\n * Second line\n *\n * Fourth line\n */\nexport type CommentWithBreaks = number;\n\n/**\n * Testing backticks in string: `backticks` and ```multiple backticks``` should work\n */\nexport type CommentWithBackticks = number;\n\n/**\n * Testing backticks and quotes in string: `backticks`, 'quotes', \"double quotes\" and ```multiple backticks``` should work\n */\nexport type CommentWithBackticksAndQuotes = number;\n\n/**\n * Testing slashes in string: \\backwards\\\\\\ and /forwards/// should work\n */\nexport type CommentWithSlashes = number;\n\n/**\n * Testing expression placeholders in string: ${expression} should work\n */\nexport type CommentWithExpressionPlaceholders = number;\n\n/**\n * Testing quotes in string: 'single quote''' and \"double quotes\"\"\" should work\n */\nexport type CommentWithQuotes = number;\n\n/**\n * Testing reserved characters in string: * inline * and ** inline ** should work\n */\nexport type CommentWithReservedCharacters = number;\n\n/**\n * This is a simple number\n */\nexport type SimpleInteger = number;\n\n/**\n * This is a simple boolean\n */\nexport type SimpleBoolean = boolean;\n\n/**\n * This is a simple string\n */\nexport type SimpleString = string;\n\n/**\n * A string with non-ascii (unicode) characters valid in typescript identifiers (æøåÆØÅöÔèÈ字符串)\n */\nexport type NonAsciiStringæøåÆøÅöôêÊ字符串 = string;\n\n/**\n * This is a simple file\n */\nexport type SimpleFile = Blob | File;\n\n/**\n * This is a simple reference\n */\nexport type SimpleReference = ModelWithString;\n\n/**\n * This is a simple string\n */\nexport type SimpleStringWithPattern = string | null;\n\n/**\n * This is a simple enum with strings\n */\nexport type EnumWithStrings = 'Success' | 'Warning' | 'Error' | '\\'Single Quote\\'' | '\"Double Quotes\"' | 'Non-ascii: øæåôöØÆÅÔÖ字符串';\n\nexport type EnumWithReplacedCharacters = '\\'Single Quote\\'' | '\"Double Quotes\"' | 'øæåôöØÆÅÔÖ字符串' | 3.1 | '';\n\n/**\n * This is a simple enum with numbers\n */\nexport type EnumWithNumbers = 1 | 2 | 3 | 1.1 | 1.2 | 1.3 | 100 | 200 | 300 | -100 | -200 | -300 | -1.1 | -1.2 | -1.3;\n\n/**\n * Success=1,Warning=2,Error=3\n */\nexport type EnumFromDescription = number;\n\n/**\n * This is a simple enum with numbers\n */\nexport type EnumWithExtensions = 200 | 400 | 500;\n\nexport type EnumWithXEnumNames = 0 | 1 | 2;\n\n/**\n * This is a simple array with numbers\n */\nexport type ArrayWithNumbers = Array<number>;\n\n/**\n * This is a simple array with booleans\n */\nexport type ArrayWithBooleans = Array<boolean>;\n\n/**\n * This is a simple array with strings\n */\nexport type ArrayWithStrings = Array<string>;\n\n/**\n * This is a simple array with references\n */\nexport type ArrayWithReferences = Array<ModelWithString>;\n\n/**\n * This is a simple array containing an array\n */\nexport type ArrayWithArray = Array<Array<ModelWithString>>;\n\n/**\n * This is a simple array with properties\n */\nexport type ArrayWithProperties = Array<{\n    '16x16'?: CamelCaseCommentWithBreaks;\n    bar?: string;\n}>;\n\n/**\n * This is a simple array with any of properties\n */\nexport type ArrayWithAnyOfProperties = Array<{\n    foo?: string;\n} | {\n    bar?: string;\n}>;\n\nexport type AnyOfAnyAndNull = {\n    data?: unknown;\n};\n\n/**\n * This is a simple array with any of properties\n */\nexport type AnyOfArrays = {\n    results?: Array<{\n        foo?: string;\n    } | {\n        bar?: string;\n    }>;\n};\n\n/**\n * This is a string dictionary\n */\nexport type DictionaryWithString = {\n    [key: string]: string;\n};\n\nexport type DictionaryWithPropertiesAndAdditionalProperties = {\n    foo?: number;\n    bar?: boolean;\n    [key: string]: string | number | boolean | undefined;\n};\n\n/**\n * This is a string reference\n */\nexport type DictionaryWithReference = {\n    [key: string]: ModelWithString;\n};\n\n/**\n * This is a complex dictionary\n */\nexport type DictionaryWithArray = {\n    [key: string]: Array<ModelWithString>;\n};\n\n/**\n * This is a string dictionary\n */\nexport type DictionaryWithDictionary = {\n    [key: string]: {\n        [key: string]: string;\n    };\n};\n\n/**\n * This is a complex dictionary\n */\nexport type DictionaryWithProperties = {\n    [key: string]: {\n        foo?: string;\n        bar?: string;\n    };\n};\n\n/**\n * This is a model with one number property\n */\nexport type ModelWithInteger = {\n    /**\n     * This is a simple number property\n     */\n    prop?: number;\n};\n\n/**\n * This is a model with one boolean property\n */\nexport type ModelWithBoolean = {\n    /**\n     * This is a simple boolean property\n     */\n    prop?: boolean;\n};\n\n/**\n * This is a model with one string property\n */\nexport type ModelWithString = {\n    /**\n     * This is a simple string property\n     */\n    prop?: string;\n};\n\n/**\n * This is a model with one string property\n */\nexport type ModelWithStringError = {\n    /**\n     * This is a simple string property\n     */\n    prop?: string;\n};\n\n/**\n * `Comment` or `VoiceComment`. The JSON object for adding voice comments to tickets is different. See [Adding voice comments to tickets](/documentation/ticketing/managing-tickets/adding-voice-comments-to-tickets)\n */\nexport type ModelFromZendesk = string;\n\n/**\n * This is a model with one string property\n */\nexport type ModelWithNullableString = {\n    /**\n     * This is a simple string property\n     */\n    nullableProp1?: string | null;\n    /**\n     * This is a simple string property\n     */\n    nullableRequiredProp1: string | null;\n    /**\n     * This is a simple string property\n     */\n    nullableProp2?: string | null;\n    /**\n     * This is a simple string property\n     */\n    nullableRequiredProp2: string | null;\n    /**\n     * This is a simple enum with strings\n     */\n    'foo_bar-enum'?: 'Success' | 'Warning' | 'Error' | 'ØÆÅ字符串';\n};\n\n/**\n * This is a model with one enum\n */\nexport type ModelWithEnum = {\n    /**\n     * This is a simple enum with strings\n     */\n    'foo_bar-enum'?: 'Success' | 'Warning' | 'Error' | 'ØÆÅ字符串';\n    /**\n     * These are the HTTP error code enums\n     */\n    statusCode?: '100' | '200 FOO' | '300 FOO_BAR' | '400 foo-bar' | '500 foo.bar' | '600 foo&bar';\n    /**\n     * Simple boolean enum\n     */\n    bool?: true;\n};\n\n/**\n * This is a model with one enum with escaped name\n */\nexport type ModelWithEnumWithHyphen = {\n    /**\n     * Foo-Bar-Baz-Qux\n     */\n    'foo-bar-baz-qux'?: '3.0';\n};\n\n/**\n * This is a model with one enum\n */\nexport type ModelWithEnumFromDescription = {\n    /**\n     * Success=1,Warning=2,Error=3\n     */\n    test?: number;\n};\n\n/**\n * This is a model with nested enums\n */\nexport type ModelWithNestedEnums = {\n    dictionaryWithEnum?: {\n        [key: string]: 'Success' | 'Warning' | 'Error';\n    };\n    dictionaryWithEnumFromDescription?: {\n        [key: string]: number;\n    };\n    arrayWithEnum?: Array<'Success' | 'Warning' | 'Error'>;\n    arrayWithDescription?: Array<number>;\n    /**\n     * This is a simple enum with strings\n     */\n    'foo_bar-enum'?: 'Success' | 'Warning' | 'Error' | 'ØÆÅ字符串';\n};\n\n/**\n * This is a model with one property containing a reference\n */\nexport type ModelWithReference = {\n    prop?: ModelWithProperties;\n};\n\n/**\n * This is a model with one property containing an array\n */\nexport type ModelWithArrayReadOnlyAndWriteOnly = {\n    prop?: Array<ModelWithReadOnlyAndWriteOnly>;\n    propWithFile?: Array<Blob | File>;\n    propWithNumber?: Array<number>;\n};\n\n/**\n * This is a model with one property containing an array\n */\nexport type ModelWithArray = {\n    prop?: Array<ModelWithString>;\n    propWithFile?: Array<Blob | File>;\n    propWithNumber?: Array<number>;\n};\n\n/**\n * This is a model with one property containing a dictionary\n */\nexport type ModelWithDictionary = {\n    prop?: {\n        [key: string]: string;\n    };\n};\n\n/**\n * This is a deprecated model with a deprecated property\n *\n * @deprecated\n */\nexport type DeprecatedModel = {\n    /**\n     * This is a deprecated property\n     *\n     * @deprecated\n     */\n    prop?: string;\n};\n\n/**\n * This is a model with one property containing a circular reference\n */\nexport type ModelWithCircularReference = {\n    prop?: ModelWithCircularReference;\n};\n\n/**\n * This is a model with one property with a 'one of' relationship\n */\nexport type CompositionWithOneOf = {\n    propA?: ModelWithString | ModelWithEnum | ModelWithArray | ModelWithDictionary;\n};\n\n/**\n * This is a model with one property with a 'one of' relationship where the options are not $ref\n */\nexport type CompositionWithOneOfAnonymous = {\n    propA?: {\n        propA?: string;\n    } | string | number;\n};\n\n/**\n * Circle\n */\nexport type ModelCircle = {\n    kind: string;\n    radius?: number;\n};\n\n/**\n * Square\n */\nexport type ModelSquare = {\n    kind: string;\n    sideLength?: number;\n};\n\n/**\n * This is a model with one property with a 'one of' relationship where the options are not $ref\n */\nexport type CompositionWithOneOfDiscriminator = ({\n    kind: 'circle';\n} & ModelCircle) | ({\n    kind: 'square';\n} & ModelSquare);\n\n/**\n * This is a model with one property with a 'any of' relationship\n */\nexport type CompositionWithAnyOf = {\n    propA?: ModelWithString | ModelWithEnum | ModelWithArray | ModelWithDictionary;\n};\n\n/**\n * This is a model with one property with a 'any of' relationship where the options are not $ref\n */\nexport type CompositionWithAnyOfAnonymous = {\n    propA?: {\n        propA?: string;\n    } | string | number;\n};\n\n/**\n * This is a model with nested 'any of' property with a type null\n */\nexport type CompositionWithNestedAnyAndTypeNull = {\n    propA?: Array<ModelWithDictionary | null> | Array<ModelWithArray | null>;\n};\n\nexport type _3eNum1Период = 'Bird' | 'Dog';\n\nexport type ConstValue = 'ConstValue';\n\n/**\n * This is a model with one property with a 'any of' relationship where the options are not $ref\n */\nexport type CompositionWithNestedAnyOfAndNull = {\n    propA?: Array<_3eNum1Период | ConstValue> | null;\n};\n\n/**\n * This is a model with one property with a 'one of' relationship\n */\nexport type CompositionWithOneOfAndNullable = {\n    propA?: {\n        boolean?: boolean;\n    } | ModelWithEnum | ModelWithArray | ModelWithDictionary | null;\n};\n\n/**\n * This is a model that contains a simple dictionary within composition\n */\nexport type CompositionWithOneOfAndSimpleDictionary = {\n    propA?: boolean | {\n        [key: string]: number;\n    };\n};\n\n/**\n * This is a model that contains a dictionary of simple arrays within composition\n */\nexport type CompositionWithOneOfAndSimpleArrayDictionary = {\n    propA?: boolean | {\n        [key: string]: Array<boolean>;\n    };\n};\n\n/**\n * This is a model that contains a dictionary of complex arrays (composited) within composition\n */\nexport type CompositionWithOneOfAndComplexArrayDictionary = {\n    propA?: boolean | {\n        [key: string]: Array<number | string>;\n    };\n};\n\n/**\n * This is a model with one property with a 'all of' relationship\n */\nexport type CompositionWithAllOfAndNullable = {\n    propA?: ({\n        boolean?: boolean;\n    } & ModelWithEnum & ModelWithArray & ModelWithDictionary) | null;\n};\n\n/**\n * This is a model with one property with a 'any of' relationship\n */\nexport type CompositionWithAnyOfAndNullable = {\n    propA?: {\n        boolean?: boolean;\n    } | ModelWithEnum | ModelWithArray | ModelWithDictionary | null;\n};\n\n/**\n * This is a base model with two simple optional properties\n */\nexport type CompositionBaseModel = {\n    firstName?: string;\n    lastname?: string;\n};\n\n/**\n * This is a model that extends the base model\n */\nexport type CompositionExtendedModel = CompositionBaseModel & {\n    age: number;\n    firstName: string;\n    lastname: string;\n};\n\n/**\n * This is a model with one nested property\n */\nexport type ModelWithProperties = {\n    required: string;\n    readonly requiredAndReadOnly: string;\n    requiredAndNullable: string | null;\n    string?: string;\n    number?: number;\n    boolean?: boolean;\n    reference?: ModelWithString;\n    'property with space'?: string;\n    default?: string;\n    try?: string;\n    readonly '@namespace.string'?: string;\n    readonly '@namespace.integer'?: number;\n};\n\n/**\n * This is a model with one nested property\n */\nexport type ModelWithNestedProperties = {\n    readonly first: {\n        readonly second: {\n            readonly third: string | null;\n        } | null;\n    } | null;\n};\n\n/**\n * This is a model with duplicated properties\n */\nexport type ModelWithDuplicateProperties = {\n    prop?: ModelWithString;\n};\n\n/**\n * This is a model with ordered properties\n */\nexport type ModelWithOrderedProperties = {\n    zebra?: string;\n    apple?: string;\n    hawaii?: string;\n};\n\n/**\n * This is a model with duplicated imports\n */\nexport type ModelWithDuplicateImports = {\n    propA?: ModelWithString;\n    propB?: ModelWithString;\n    propC?: ModelWithString;\n};\n\n/**\n * This is a model that extends another model\n */\nexport type ModelThatExtends = ModelWithString & {\n    propExtendsA?: string;\n    propExtendsB?: ModelWithString;\n};\n\n/**\n * This is a model that extends another model\n */\nexport type ModelThatExtendsExtends = ModelWithString & ModelThatExtends & {\n    propExtendsC?: string;\n    propExtendsD?: ModelWithString;\n};\n\n/**\n * This is a model that contains a some patterns\n */\nexport type ModelWithPattern = {\n    key: string;\n    name: string;\n    readonly enabled?: boolean;\n    readonly modified?: string;\n    id?: string;\n    text?: string;\n    patternWithSingleQuotes?: string;\n    patternWithNewline?: string;\n    patternWithBacktick?: string;\n    patternWithUnicode?: string;\n};\n\nexport type File = {\n    /**\n     * Id\n     */\n    readonly id?: string;\n    /**\n     * Updated at\n     */\n    readonly updated_at?: string;\n    /**\n     * Created at\n     */\n    readonly created_at?: string;\n    /**\n     * Mime\n     */\n    mime: string;\n    /**\n     * File\n     */\n    readonly file?: string;\n};\n\nexport type Default = {\n    name?: string;\n};\n\nexport type Pageable = {\n    page?: number;\n    size?: number;\n    sort?: Array<string>;\n};\n\n/**\n * This is a free-form object without additionalProperties.\n */\nexport type FreeFormObjectWithoutAdditionalProperties = {\n    [key: string]: unknown;\n};\n\n/**\n * This is a free-form object with additionalProperties: true.\n */\nexport type FreeFormObjectWithAdditionalPropertiesEqTrue = {\n    [key: string]: unknown;\n};\n\n/**\n * This is a free-form object with additionalProperties: {}.\n */\nexport type FreeFormObjectWithAdditionalPropertiesEqEmptyObject = {\n    [key: string]: unknown;\n};\n\nexport type ModelWithConst = {\n    String?: 'String';\n    number?: 0;\n    null?: unknown;\n    withType?: 'Some string';\n};\n\n/**\n * This is a model with one property and additionalProperties: true\n */\nexport type ModelWithAdditionalPropertiesEqTrue = {\n    /**\n     * This is a simple string property\n     */\n    prop?: string;\n    [key: string]: unknown;\n};\n\nexport type NestedAnyOfArraysNullable = {\n    nullableArray?: Array<string | boolean> | null;\n};\n\nexport type CompositionWithOneOfAndProperties = ({\n    foo: SimpleParameter;\n} | {\n    bar: NonAsciiStringæøåÆøÅöôêÊ字符串;\n}) & {\n    baz: number | null;\n    qux: number;\n};\n\n/**\n * An object that can be null\n */\nexport type NullableObject = {\n    foo?: string;\n} | null;\n\n/**\n * Some % character\n */\nexport type CharactersInDescription = string;\n\nexport type ModelWithNullableObject = {\n    data?: NullableObject;\n};\n\n/**\n * An object with additional properties that can be null\n */\nexport type ModelWithAdditionalPropertiesRef = {\n    [key: string]: NullableObject | null;\n};\n\nexport type ModelWithOneOfEnum = {\n    foo: 'Bar';\n} | {\n    foo: 'Baz';\n} | {\n    foo: 'Qux';\n} | {\n    content: string;\n    foo: 'Quux';\n} | {\n    content: [\n        string,\n        string\n    ];\n    foo: 'Corge';\n};\n\nexport type ModelWithNestedArrayEnumsDataFoo = 'foo' | 'bar';\n\nexport type ModelWithNestedArrayEnumsDataBar = 'baz' | 'qux';\n\nexport type ModelWithNestedArrayEnumsData = {\n    foo?: Array<ModelWithNestedArrayEnumsDataFoo>;\n    bar?: Array<ModelWithNestedArrayEnumsDataBar>;\n};\n\nexport type ModelWithNestedArrayEnums = {\n    array_strings?: Array<string>;\n    data?: ModelWithNestedArrayEnumsData;\n};\n\nexport type ModelWithNestedCompositionEnums = {\n    foo?: ModelWithNestedArrayEnumsDataFoo;\n};\n\nexport type ModelWithReadOnlyAndWriteOnly = {\n    foo: string;\n    readonly bar: string;\n};\n\nexport type ModelWithConstantSizeArray = [\n    number,\n    number\n];\n\nexport type ModelWithAnyOfConstantSizeArray = [\n    number | string,\n    number | string,\n    number | string\n];\n\nexport type ModelWithPrefixItemsConstantSizeArray = Array<ModelWithInteger | number | string>;\n\nexport type ModelWithAnyOfConstantSizeArrayNullable = [\n    number | null | string,\n    number | null | string,\n    number | null | string\n];\n\nexport type ModelWithAnyOfConstantSizeArrayWithNSizeAndOptions = [\n    number | Import,\n    number | Import\n];\n\nexport type ModelWithAnyOfConstantSizeArrayAndIntersect = [\n    number & string,\n    number & string\n];\n\nexport type ModelWithNumericEnumUnion = {\n    /**\n     * Период\n     */\n    value?: -10 | -1 | 0 | 1 | 3 | 6 | 12;\n};\n\n/**\n * Some description with `back ticks`\n */\nexport type ModelWithBackticksInDescription = {\n    /**\n     * The template `that` should be used for parsing and importing the contents of the CSV file.\n     *\n     * <br/><p>There is one placeholder currently supported:<ul>     <li><b>${x}</b> - refers to the n-th column in the CSV file, e.g. ${1}, ${2}, ...)</li></ul><p>Example of a correct JSON template:</p>\n     * <pre>\n     * [\n     * {\n     * \"resourceType\": \"Asset\",\n     * \"identifier\": {\n     * \"name\": \"${1}\",\n     * \"domain\": {\n     * \"name\": \"${2}\",\n     * \"community\": {\n     * \"name\": \"Some Community\"\n     * }\n     * }\n     * },\n     * \"attributes\" : {\n     * \"00000000-0000-0000-0000-000000003115\" : [ {\n     * \"value\" : \"${3}\"\n     * } ],\n     * \"00000000-0000-0000-0000-000000000222\" : [ {\n     * \"value\" : \"${4}\"\n     * } ]\n     * }\n     * }\n     * ]\n     * </pre>\n     */\n    template?: string;\n};\n\nexport type ModelWithOneOfAndProperties = (SimpleParameter | NonAsciiStringæøåÆøÅöôêÊ字符串) & {\n    baz: number | null;\n    qux: number;\n};\n\n/**\n * Model used to test deduplication strategy (unused)\n */\nexport type ParameterSimpleParameterUnused = string;\n\n/**\n * Model used to test deduplication strategy\n */\nexport type PostServiceWithEmptyTagResponse = string;\n\n/**\n * Model used to test deduplication strategy\n */\nexport type PostServiceWithEmptyTagResponse2 = string;\n\n/**\n * Model used to test deduplication strategy\n */\nexport type DeleteFooData = string;\n\n/**\n * Model used to test deduplication strategy\n */\nexport type DeleteFooData2 = string;\n\n/**\n * Model with restricted keyword name\n */\nexport type Import = string;\n\nexport type SchemaWithFormRestrictedKeys = {\n    description?: string;\n    'x-enum-descriptions'?: string;\n    'x-enum-varnames'?: string;\n    'x-enumNames'?: string;\n    title?: string;\n    object?: {\n        description?: string;\n        'x-enum-descriptions'?: string;\n        'x-enum-varnames'?: string;\n        'x-enumNames'?: string;\n        title?: string;\n    };\n    array?: Array<{\n        description?: string;\n        'x-enum-descriptions'?: string;\n        'x-enum-varnames'?: string;\n        'x-enumNames'?: string;\n        title?: string;\n    }>;\n};\n\n/**\n * This schema was giving PascalCase transformations a hard time\n */\nexport type IoK8sApimachineryPkgApisMetaV1DeleteOptions = {\n    /**\n     * Must be fulfilled before a deletion is carried out. If not possible, a 409 Conflict status will be returned.\n     */\n    preconditions?: IoK8sApimachineryPkgApisMetaV1Preconditions;\n};\n\n/**\n * This schema was giving PascalCase transformations a hard time\n */\nexport type IoK8sApimachineryPkgApisMetaV1Preconditions = {\n    /**\n     * Specifies the target ResourceVersion\n     */\n    resourceVersion?: string;\n    /**\n     * Specifies the target UID.\n     */\n    uid?: string;\n};\n\nexport type AdditionalPropertiesUnknownIssue = {\n    [key: string]: string | number;\n};\n\nexport type AdditionalPropertiesUnknownIssue2 = {\n    [key: string]: string | number;\n};\n\nexport type AdditionalPropertiesUnknownIssue3 = string & {\n    entries: {\n        [key: string]: AdditionalPropertiesUnknownIssue;\n    };\n};\n\nexport type AdditionalPropertiesIntegerIssue = {\n    value: number;\n    [key: string]: number;\n};\n\nexport type OneOfAllOfIssue = ((ConstValue | GenericSchemaDuplicateIssue1SystemBoolean) & _3eNum1Период) | GenericSchemaDuplicateIssue1SystemString;\n\nexport type GenericSchemaDuplicateIssue1SystemBoolean = {\n    item?: boolean;\n    error?: string | null;\n    readonly hasError?: boolean;\n    data?: {\n        [key: string]: never;\n    };\n};\n\nexport type GenericSchemaDuplicateIssue1SystemString = {\n    item?: string | null;\n    error?: string | null;\n    readonly hasError?: boolean;\n};\n\nexport type ExternalSharedModel = {\n    id: string;\n    name?: string;\n};\n\n/**\n * This is a model with one property containing a reference\n */\nexport type ModelWithReferenceWritable = {\n    prop?: ModelWithPropertiesWritable;\n};\n\n/**\n * This is a model with one property containing an array\n */\nexport type ModelWithArrayReadOnlyAndWriteOnlyWritable = {\n    prop?: Array<ModelWithReadOnlyAndWriteOnlyWritable>;\n    propWithFile?: Array<Blob | File>;\n    propWithNumber?: Array<number>;\n};\n\n/**\n * This is a model with one nested property\n */\nexport type ModelWithPropertiesWritable = {\n    required: string;\n    requiredAndNullable: string | null;\n    string?: string;\n    number?: number;\n    boolean?: boolean;\n    reference?: ModelWithString;\n    'property with space'?: string;\n    default?: string;\n    try?: string;\n};\n\n/**\n * This is a model that contains a some patterns\n */\nexport type ModelWithPatternWritable = {\n    key: string;\n    name: string;\n    id?: string;\n    text?: string;\n    patternWithSingleQuotes?: string;\n    patternWithNewline?: string;\n    patternWithBacktick?: string;\n    patternWithUnicode?: string;\n};\n\nexport type FileWritable = {\n    /**\n     * Mime\n     */\n    mime: string;\n};\n\nexport type ModelWithReadOnlyAndWriteOnlyWritable = {\n    foo: string;\n    baz: string;\n};\n\nexport type ModelWithAnyOfConstantSizeArrayWithNSizeAndOptionsWritable = [\n    number | Import,\n    number | Import\n];\n\nexport type AdditionalPropertiesUnknownIssueWritable = {\n    [key: string]: string | number;\n};\n\nexport type OneOfAllOfIssueWritable = ((ConstValue | GenericSchemaDuplicateIssue1SystemBoolean) & _3eNum1Период) | GenericSchemaDuplicateIssue1SystemString;\n\nexport type GenericSchemaDuplicateIssue1SystemBooleanWritable = {\n    item?: boolean;\n    error?: string | null;\n    data?: {\n        [key: string]: never;\n    };\n};\n\nexport type GenericSchemaDuplicateIssue1SystemStringWritable = {\n    item?: string | null;\n    error?: string | null;\n};\n\n/**\n * This is a reusable parameter\n */\nexport type SimpleParameter = string;\n\n/**\n * Parameter with illegal characters\n */\nexport type XFooBar = ModelWithString;\n\nexport type SimpleRequestBody = ModelWithString;\n\nexport type SimpleFormData = ModelWithString;\n\nexport type ExportData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no+tag';\n};\n\nexport type PatchApiVbyApiVersionNoTagData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no+tag';\n};\n\nexport type PatchApiVbyApiVersionNoTagResponses = {\n    /**\n     * OK\n     */\n    default: unknown;\n};\n\nexport type ImportData = {\n    body: ModelWithReadOnlyAndWriteOnlyWritable | ModelWithArrayReadOnlyAndWriteOnlyWritable;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no+tag';\n};\n\nexport type ImportResponses = {\n    /**\n     * Success\n     */\n    200: ModelFromZendesk;\n    /**\n     * Default success response\n     */\n    default: ModelWithReadOnlyAndWriteOnly;\n};\n\nexport type ImportResponse = ImportResponses[keyof ImportResponses];\n\nexport type FooWowData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no+tag';\n};\n\nexport type FooWowResponses = {\n    /**\n     * OK\n     */\n    default: unknown;\n};\n\nexport type ApiVVersionODataControllerCountData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple/$count';\n};\n\nexport type ApiVVersionODataControllerCountResponses = {\n    /**\n     * Success\n     */\n    200: ModelFromZendesk;\n};\n\nexport type ApiVVersionODataControllerCountResponse = ApiVVersionODataControllerCountResponses[keyof ApiVVersionODataControllerCountResponses];\n\nexport type GetApiVbyApiVersionSimpleOperationData = {\n    body?: never;\n    path: {\n        /**\n         * foo in method\n         */\n        foo_param: string;\n    };\n    query?: never;\n    url: '/api/v{api-version}/simple:operation';\n};\n\nexport type GetApiVbyApiVersionSimpleOperationErrors = {\n    /**\n     * Default error response\n     */\n    default: ModelWithBoolean;\n};\n\nexport type GetApiVbyApiVersionSimpleOperationError = GetApiVbyApiVersionSimpleOperationErrors[keyof GetApiVbyApiVersionSimpleOperationErrors];\n\nexport type GetApiVbyApiVersionSimpleOperationResponses = {\n    /**\n     * Response is a simple number\n     */\n    200: number;\n};\n\nexport type GetApiVbyApiVersionSimpleOperationResponse = GetApiVbyApiVersionSimpleOperationResponses[keyof GetApiVbyApiVersionSimpleOperationResponses];\n\nexport type DeleteCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type GetCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type HeadCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type OptionsCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type PatchCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type PostCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type PutCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type DeleteFooData3 = {\n    body?: never;\n    headers: {\n        /**\n         * Parameter with illegal characters\n         */\n        'x-Foo-Bar': ModelWithString;\n    };\n    path: {\n        /**\n         * foo in method\n         */\n        foo_param: string;\n        /**\n         * bar in method\n         */\n        BarParam: string;\n    };\n    query?: never;\n    url: '/api/v{api-version}/foo/{foo_param}/bar/{BarParam}';\n};\n\nexport type CallWithDescriptionsData = {\n    body?: never;\n    path?: never;\n    query?: {\n        /**\n         * Testing multiline comments in string: First line\n         * Second line\n         *\n         * Fourth line\n         */\n        parameterWithBreaks?: string;\n        /**\n         * Testing backticks in string: `backticks` and ```multiple backticks``` should work\n         */\n        parameterWithBackticks?: string;\n        /**\n         * Testing slashes in string: \\backwards\\\\\\ and /forwards/// should work\n         */\n        parameterWithSlashes?: string;\n        /**\n         * Testing expression placeholders in string: ${expression} should work\n         */\n        parameterWithExpressionPlaceholders?: string;\n        /**\n         * Testing quotes in string: 'single quote''' and \"double quotes\"\"\" should work\n         */\n        parameterWithQuotes?: string;\n        /**\n         * Testing reserved characters in string: * inline * and ** inline ** should work\n         */\n        parameterWithReservedCharacters?: string;\n    };\n    url: '/api/v{api-version}/descriptions';\n};\n\nexport type DeprecatedCallData = {\n    body?: never;\n    headers: {\n        /**\n         * This parameter is deprecated\n         *\n         * @deprecated\n         */\n        parameter: DeprecatedModel | null;\n    };\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/parameters/deprecated';\n};\n\nexport type CallWithParametersData = {\n    /**\n     * This is the parameter that goes into the body\n     */\n    body: {\n        [key: string]: unknown;\n    } | null;\n    headers: {\n        /**\n         * This is the parameter that goes into the header\n         */\n        parameterHeader: string | null;\n    };\n    path: {\n        /**\n         * This is the parameter that goes into the path\n         */\n        parameterPath: string | null;\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string | null;\n    };\n    query: {\n        foo_ref_enum?: ModelWithNestedArrayEnumsDataFoo;\n        foo_all_of_enum: ModelWithNestedArrayEnumsDataFoo;\n        /**\n         * This is the parameter that goes into the query params\n         */\n        cursor: string | null;\n    };\n    url: '/api/v{api-version}/parameters/{parameterPath}';\n};\n\nexport type CallWithWeirdParameterNamesData = {\n    /**\n     * This is the parameter that goes into the body\n     */\n    body: ModelWithString | null;\n    headers: {\n        /**\n         * This is the parameter that goes into the request header\n         */\n        'parameter.header': string | null;\n    };\n    path: {\n        /**\n         * This is the parameter that goes into the path\n         */\n        'parameter.path.1'?: string;\n        /**\n         * This is the parameter that goes into the path\n         */\n        'parameter-path-2'?: string;\n        /**\n         * This is the parameter that goes into the path\n         */\n        'PARAMETER-PATH-3'?: string;\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string | null;\n    };\n    query: {\n        /**\n         * This is the parameter with a reserved keyword\n         */\n        default?: string;\n        /**\n         * This is the parameter that goes into the request query params\n         */\n        'parameter-query': string | null;\n    };\n    url: '/api/v{api-version}/parameters/{parameter.path.1}/{parameter-path-2}/{PARAMETER-PATH-3}';\n};\n\nexport type GetCallWithOptionalParamData = {\n    /**\n     * This is a required parameter\n     */\n    body: ModelWithOneOfEnum;\n    path?: never;\n    query?: {\n        /**\n         * This is an optional parameter\n         */\n        page?: number;\n    };\n    url: '/api/v{api-version}/parameters';\n};\n\nexport type PostCallWithOptionalParamData = {\n    /**\n     * This is an optional parameter\n     */\n    body?: {\n        offset?: number | null;\n    };\n    path?: never;\n    query: {\n        /**\n         * This is a required parameter\n         */\n        parameter: Pageable;\n    };\n    url: '/api/v{api-version}/parameters';\n};\n\nexport type PostCallWithOptionalParamResponses = {\n    /**\n     * Response is a simple number\n     */\n    200: number;\n    /**\n     * Success\n     */\n    204: void;\n};\n\nexport type PostCallWithOptionalParamResponse = PostCallWithOptionalParamResponses[keyof PostCallWithOptionalParamResponses];\n\nexport type PostApiVbyApiVersionRequestBodyData = {\n    /**\n     * A reusable request body\n     */\n    body?: SimpleRequestBody;\n    path?: never;\n    query?: {\n        /**\n         * This is a reusable parameter\n         */\n        parameter?: string;\n    };\n    url: '/api/v{api-version}/requestBody';\n};\n\nexport type PostApiVbyApiVersionFormDataData = {\n    /**\n     * A reusable request body\n     */\n    body?: SimpleFormData;\n    path?: never;\n    query?: {\n        /**\n         * This is a reusable parameter\n         */\n        parameter?: string;\n    };\n    url: '/api/v{api-version}/formData';\n};\n\nexport type CallWithDefaultParametersData = {\n    body?: never;\n    path?: never;\n    query?: {\n        /**\n         * This is a simple string with default value\n         */\n        parameterString?: string | null;\n        /**\n         * This is a simple number with default value\n         */\n        parameterNumber?: number | null;\n        /**\n         * This is a simple boolean with default value\n         */\n        parameterBoolean?: boolean | null;\n        /**\n         * This is a simple enum with default value\n         */\n        parameterEnum?: 'Success' | 'Warning' | 'Error';\n        /**\n         * This is a simple model with default value\n         */\n        parameterModel?: ModelWithString | null;\n    };\n    url: '/api/v{api-version}/defaults';\n};\n\nexport type CallWithDefaultOptionalParametersData = {\n    body?: never;\n    path?: never;\n    query?: {\n        /**\n         * This is a simple string that is optional with default value\n         */\n        parameterString?: string;\n        /**\n         * This is a simple number that is optional with default value\n         */\n        parameterNumber?: number;\n        /**\n         * This is a simple boolean that is optional with default value\n         */\n        parameterBoolean?: boolean;\n        /**\n         * This is a simple enum that is optional with default value\n         */\n        parameterEnum?: 'Success' | 'Warning' | 'Error';\n        /**\n         * This is a simple model that is optional with default value\n         */\n        parameterModel?: ModelWithString;\n    };\n    url: '/api/v{api-version}/defaults';\n};\n\nexport type CallToTestOrderOfParamsData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * This is a optional string with default\n         */\n        parameterOptionalStringWithDefault?: string;\n        /**\n         * This is a optional string with empty default\n         */\n        parameterOptionalStringWithEmptyDefault?: string;\n        /**\n         * This is a optional string with no default\n         */\n        parameterOptionalStringWithNoDefault?: string;\n        /**\n         * This is a string with default\n         */\n        parameterStringWithDefault: string;\n        /**\n         * This is a string with empty default\n         */\n        parameterStringWithEmptyDefault: string;\n        /**\n         * This is a string with no default\n         */\n        parameterStringWithNoDefault: string;\n        /**\n         * This is a string that can be null with no default\n         */\n        parameterStringNullableWithNoDefault?: string | null;\n        /**\n         * This is a string that can be null with default\n         */\n        parameterStringNullableWithDefault?: string | null;\n    };\n    url: '/api/v{api-version}/defaults';\n};\n\nexport type DuplicateNameData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/duplicate';\n};\n\nexport type DuplicateName2Data = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/duplicate';\n};\n\nexport type DuplicateName3Data = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/duplicate';\n};\n\nexport type DuplicateName4Data = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/duplicate';\n};\n\nexport type CallWithNoContentResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no-content';\n};\n\nexport type CallWithNoContentResponseResponses = {\n    /**\n     * Success\n     */\n    204: void;\n};\n\nexport type CallWithNoContentResponseResponse = CallWithNoContentResponseResponses[keyof CallWithNoContentResponseResponses];\n\nexport type CallWithResponseAndNoContentResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multiple-tags/response-and-no-content';\n};\n\nexport type CallWithResponseAndNoContentResponseResponses = {\n    /**\n     * Response is a simple number\n     */\n    200: number;\n    /**\n     * Success\n     */\n    204: void;\n};\n\nexport type CallWithResponseAndNoContentResponseResponse = CallWithResponseAndNoContentResponseResponses[keyof CallWithResponseAndNoContentResponseResponses];\n\nexport type DummyAData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multiple-tags/a';\n};\n\nexport type DummyAResponses = {\n    200: _400;\n};\n\nexport type DummyAResponse = DummyAResponses[keyof DummyAResponses];\n\nexport type DummyBData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multiple-tags/b';\n};\n\nexport type DummyBResponses = {\n    /**\n     * Success\n     */\n    204: void;\n};\n\nexport type DummyBResponse = DummyBResponses[keyof DummyBResponses];\n\nexport type CallWithResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/response';\n};\n\nexport type CallWithResponseResponses = {\n    default: Import;\n};\n\nexport type CallWithResponseResponse = CallWithResponseResponses[keyof CallWithResponseResponses];\n\nexport type CallWithDuplicateResponsesData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/response';\n};\n\nexport type CallWithDuplicateResponsesErrors = {\n    /**\n     * Message for 500 error\n     */\n    500: ModelWithStringError;\n    /**\n     * Message for 501 error\n     */\n    501: ModelWithStringError;\n    /**\n     * Message for 502 error\n     */\n    502: ModelWithStringError;\n    /**\n     * Message for 4XX errors\n     */\n    '4XX': DictionaryWithArray;\n    /**\n     * Default error response\n     */\n    default: ModelWithBoolean;\n};\n\nexport type CallWithDuplicateResponsesError = CallWithDuplicateResponsesErrors[keyof CallWithDuplicateResponsesErrors];\n\nexport type CallWithDuplicateResponsesResponses = {\n    /**\n     * Message for 200 response\n     */\n    200: ModelWithBoolean & ModelWithInteger;\n    /**\n     * Message for 201 response\n     */\n    201: ModelWithString;\n    /**\n     * Message for 202 response\n     */\n    202: ModelWithString;\n};\n\nexport type CallWithDuplicateResponsesResponse = CallWithDuplicateResponsesResponses[keyof CallWithDuplicateResponsesResponses];\n\nexport type CallWithResponsesData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/response';\n};\n\nexport type CallWithResponsesErrors = {\n    /**\n     * Message for 500 error\n     */\n    500: ModelWithStringError;\n    /**\n     * Message for 501 error\n     */\n    501: ModelWithStringError;\n    /**\n     * Message for 502 error\n     */\n    502: ModelWithStringError;\n    /**\n     * Message for default response\n     */\n    default: ModelWithStringError;\n};\n\nexport type CallWithResponsesError = CallWithResponsesErrors[keyof CallWithResponsesErrors];\n\nexport type CallWithResponsesResponses = {\n    /**\n     * Message for 200 response\n     */\n    200: {\n        readonly '@namespace.string'?: string;\n        readonly '@namespace.integer'?: number;\n        readonly value?: Array<ModelWithString>;\n    };\n    /**\n     * Message for 201 response\n     */\n    201: ModelThatExtends;\n    /**\n     * Message for 202 response\n     */\n    202: ModelThatExtendsExtends;\n};\n\nexport type CallWithResponsesResponse = CallWithResponsesResponses[keyof CallWithResponsesResponses];\n\nexport type CollectionFormatData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * This is an array parameter that is sent as csv format (comma-separated values)\n         */\n        parameterArrayCSV: Array<string> | null;\n        /**\n         * This is an array parameter that is sent as ssv format (space-separated values)\n         */\n        parameterArraySSV: Array<string> | null;\n        /**\n         * This is an array parameter that is sent as tsv format (tab-separated values)\n         */\n        parameterArrayTSV: Array<string> | null;\n        /**\n         * This is an array parameter that is sent as pipes format (pipe-separated values)\n         */\n        parameterArrayPipes: Array<string> | null;\n        /**\n         * This is an array parameter that is sent as multi format (multiple parameter instances)\n         */\n        parameterArrayMulti: Array<string> | null;\n    };\n    url: '/api/v{api-version}/collectionFormat';\n};\n\nexport type TypesData = {\n    body?: never;\n    path?: {\n        /**\n         * This is a number parameter\n         */\n        id?: number;\n    };\n    query: {\n        /**\n         * This is a number parameter\n         */\n        parameterNumber: number;\n        /**\n         * This is a string parameter\n         */\n        parameterString: string | null;\n        /**\n         * This is a boolean parameter\n         */\n        parameterBoolean: boolean | null;\n        /**\n         * This is an object parameter\n         */\n        parameterObject: {\n            [key: string]: unknown;\n        } | null;\n        /**\n         * This is an array parameter\n         */\n        parameterArray: Array<string> | null;\n        /**\n         * This is a dictionary parameter\n         */\n        parameterDictionary: {\n            [key: string]: unknown;\n        } | null;\n        /**\n         * This is an enum parameter\n         */\n        parameterEnum: 'Success' | 'Warning' | 'Error';\n    };\n    url: '/api/v{api-version}/types';\n};\n\nexport type TypesResponses = {\n    /**\n     * Response is a simple number\n     */\n    200: number;\n    /**\n     * Response is a simple string\n     */\n    201: string;\n    /**\n     * Response is a simple boolean\n     */\n    202: boolean;\n    /**\n     * Response is a simple object\n     */\n    203: {\n        [key: string]: unknown;\n    };\n};\n\nexport type TypesResponse = TypesResponses[keyof TypesResponses];\n\nexport type UploadFileData = {\n    body: Blob | File;\n    path: {\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string | null;\n    };\n    query?: never;\n    url: '/api/v{api-version}/upload';\n};\n\nexport type UploadFileResponses = {\n    200: boolean;\n};\n\nexport type UploadFileResponse = UploadFileResponses[keyof UploadFileResponses];\n\nexport type FileResponseData = {\n    body?: never;\n    path: {\n        id: string;\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string;\n    };\n    query?: never;\n    url: '/api/v{api-version}/file/{id}';\n};\n\nexport type FileResponseResponses = {\n    /**\n     * Success\n     */\n    200: Blob | File;\n};\n\nexport type FileResponseResponse = FileResponseResponses[keyof FileResponseResponses];\n\nexport type ComplexTypesData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * Parameter containing object\n         */\n        parameterObject: {\n            first?: {\n                second?: {\n                    third?: string;\n                };\n            };\n        };\n        /**\n         * Parameter containing reference\n         */\n        parameterReference: ModelWithString;\n    };\n    url: '/api/v{api-version}/complex';\n};\n\nexport type ComplexTypesErrors = {\n    /**\n     * 400 `server` error\n     */\n    400: unknown;\n    /**\n     * 500 server error\n     */\n    500: unknown;\n};\n\nexport type ComplexTypesResponses = {\n    /**\n     * Successful response\n     */\n    200: Array<ModelWithString>;\n};\n\nexport type ComplexTypesResponse = ComplexTypesResponses[keyof ComplexTypesResponses];\n\nexport type MultipartResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multipart';\n};\n\nexport type MultipartResponseResponses = {\n    /**\n     * OK\n     */\n    200: {\n        file?: Blob | File;\n        metadata?: {\n            foo?: string;\n            bar?: string;\n        };\n    };\n};\n\nexport type MultipartResponseResponse = MultipartResponseResponses[keyof MultipartResponseResponses];\n\nexport type MultipartRequestData = {\n    body?: {\n        content?: Blob | File;\n        data?: ModelWithString | null;\n    };\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multipart';\n};\n\nexport type ComplexParamsData = {\n    body?: {\n        readonly key: string | null;\n        name: string | null;\n        enabled?: boolean;\n        type: 'Monkey' | 'Horse' | 'Bird';\n        listOfModels?: Array<ModelWithString> | null;\n        listOfStrings?: Array<string> | null;\n        parameters: ModelWithString | ModelWithEnum | ModelWithArray | ModelWithDictionary;\n        readonly user?: {\n            readonly id?: number;\n            readonly name?: string | null;\n        };\n    };\n    path: {\n        id: number;\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string;\n    };\n    query?: never;\n    url: '/api/v{api-version}/complex/{id}';\n};\n\nexport type ComplexParamsResponses = {\n    /**\n     * Success\n     */\n    200: ModelWithString;\n};\n\nexport type ComplexParamsResponse = ComplexParamsResponses[keyof ComplexParamsResponses];\n\nexport type CallWithResultFromHeaderData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/header';\n};\n\nexport type CallWithResultFromHeaderErrors = {\n    /**\n     * 400 server error\n     */\n    400: unknown;\n    /**\n     * 500 server error\n     */\n    500: unknown;\n};\n\nexport type CallWithResultFromHeaderResponses = {\n    /**\n     * Successful response\n     */\n    200: unknown;\n};\n\nexport type TestErrorCodeData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * Status code to return\n         */\n        status: number;\n    };\n    url: '/api/v{api-version}/error';\n};\n\nexport type TestErrorCodeErrors = {\n    /**\n     * Custom message: Internal Server Error\n     */\n    500: unknown;\n    /**\n     * Custom message: Not Implemented\n     */\n    501: unknown;\n    /**\n     * Custom message: Bad Gateway\n     */\n    502: unknown;\n    /**\n     * Custom message: Service Unavailable\n     */\n    503: unknown;\n};\n\nexport type TestErrorCodeResponses = {\n    /**\n     * Custom message: Successful response\n     */\n    200: unknown;\n};\n\nexport type NonAsciiæøåÆøÅöôêÊ字符串Data = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * Dummy input param\n         */\n        nonAsciiParamæøåÆØÅöôêÊ: number;\n    };\n    url: '/api/v{api-version}/non-ascii-æøåÆØÅöôêÊ字符串';\n};\n\nexport type NonAsciiæøåÆøÅöôêÊ字符串Responses = {\n    /**\n     * Successful response\n     */\n    200: Array<NonAsciiStringæøåÆøÅöôêÊ字符串>;\n};\n\nexport type NonAsciiæøåÆøÅöôêÊ字符串Response = NonAsciiæøåÆøÅöôêÊ字符串Responses[keyof NonAsciiæøåÆøÅöôêÊ字符串Responses];\n\nexport type PutWithFormUrlEncodedData = {\n    body: ArrayWithStrings;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/non-ascii-æøåÆØÅöôêÊ字符串';\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/solid-query/fetch/@tanstack/solid-query.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport { type DefaultError, type InfiniteData, infiniteQueryOptions, type MutationOptions, queryOptions } from '@tanstack/solid-query';\n\nimport { client } from '../client.gen';\nimport { apiVVersionODataControllerCount, callToTestOrderOfParams, callWithDefaultOptionalParameters, callWithDefaultParameters, callWithDescriptions, callWithDuplicateResponses, callWithNoContentResponse, callWithParameters, callWithResponse, callWithResponseAndNoContentResponse, callWithResponses, callWithResultFromHeader, callWithWeirdParameterNames, collectionFormat, complexParams, complexTypes, deleteCallWithoutParametersAndResponse, deleteFoo, deprecatedCall, dummyA, dummyB, duplicateName, duplicateName2, duplicateName3, duplicateName4, export_, fileResponse, fooWow, getApiVbyApiVersionSimpleOperation, getCallWithOptionalParam, getCallWithoutParametersAndResponse, import_, multipartRequest, multipartResponse, nonAsciiæøåÆøÅöôêÊ字符串, type Options, patchApiVbyApiVersionNoTag, patchCallWithoutParametersAndResponse, postApiVbyApiVersionFormData, postApiVbyApiVersionRequestBody, postCallWithOptionalParam, postCallWithoutParametersAndResponse, putCallWithoutParametersAndResponse, putWithFormUrlEncoded, testErrorCode, types, uploadFile } from '../sdk.gen';\nimport type { ApiVVersionODataControllerCountData, ApiVVersionODataControllerCountResponse, CallToTestOrderOfParamsData, CallWithDefaultOptionalParametersData, CallWithDefaultParametersData, CallWithDescriptionsData, CallWithDuplicateResponsesData, CallWithDuplicateResponsesError, CallWithDuplicateResponsesResponse, CallWithNoContentResponseData, CallWithNoContentResponseResponse, CallWithParametersData, CallWithResponseAndNoContentResponseData, CallWithResponseAndNoContentResponseResponse, CallWithResponseData, CallWithResponseResponse, CallWithResponsesData, CallWithResponsesError, CallWithResponsesResponse, CallWithResultFromHeaderData, CallWithWeirdParameterNamesData, CollectionFormatData, ComplexParamsData, ComplexParamsResponse, ComplexTypesData, ComplexTypesResponse, DeleteCallWithoutParametersAndResponseData, DeleteFooData3, DeprecatedCallData, DummyAData, DummyAResponse, DummyBData, DummyBResponse, DuplicateName2Data, DuplicateName3Data, DuplicateName4Data, DuplicateNameData, ExportData, FileResponseData, FileResponseResponse, FooWowData, GetApiVbyApiVersionSimpleOperationData, GetApiVbyApiVersionSimpleOperationError, GetApiVbyApiVersionSimpleOperationResponse, GetCallWithOptionalParamData, GetCallWithoutParametersAndResponseData, ImportData, ImportResponse, MultipartRequestData, MultipartResponseData, MultipartResponseResponse, NonAsciiæøåÆøÅöôêÊ字符串Data, NonAsciiæøåÆøÅöôêÊ字符串Response, PatchApiVbyApiVersionNoTagData, PatchCallWithoutParametersAndResponseData, PostApiVbyApiVersionFormDataData, PostApiVbyApiVersionRequestBodyData, PostCallWithOptionalParamData, PostCallWithOptionalParamResponse, PostCallWithoutParametersAndResponseData, PutCallWithoutParametersAndResponseData, PutWithFormUrlEncodedData, TestErrorCodeData, TypesData, TypesResponse, UploadFileData, UploadFileResponse } from '../types.gen';\n\nexport type QueryKey<TOptions extends Options> = [\n    Pick<TOptions, 'baseUrl' | 'body' | 'headers' | 'path' | 'query'> & {\n        _id: string;\n        _infinite?: boolean;\n        tags?: ReadonlyArray<string>;\n    }\n];\n\nconst createQueryKey = <TOptions extends Options>(id: string, options?: TOptions, infinite?: boolean, tags?: ReadonlyArray<string>): [\n    QueryKey<TOptions>[0]\n] => {\n    const params: QueryKey<TOptions>[0] = { _id: id, baseUrl: options?.baseUrl || (options?.client ?? client).getConfig().baseUrl } as QueryKey<TOptions>[0];\n    if (infinite) {\n        params._infinite = infinite;\n    }\n    if (tags) {\n        params.tags = tags;\n    }\n    if (options?.body) {\n        params.body = options.body;\n    }\n    if (options?.headers) {\n        params.headers = options.headers;\n    }\n    if (options?.path) {\n        params.path = options.path;\n    }\n    if (options?.query) {\n        params.query = options.query;\n    }\n    return [params];\n};\n\nexport const exportQueryKey = (options?: Options<ExportData>) => createQueryKey('export', options);\n\nexport const exportOptions = (options?: Options<ExportData>) => queryOptions<unknown, DefaultError, unknown, ReturnType<typeof exportQueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await export_({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: exportQueryKey(options)\n});\n\nexport const patchApiVbyApiVersionNoTagMutation = (options?: Partial<Options<PatchApiVbyApiVersionNoTagData>>): MutationOptions<unknown, DefaultError, Options<PatchApiVbyApiVersionNoTagData>> => {\n    const mutationOptions: MutationOptions<unknown, DefaultError, Options<PatchApiVbyApiVersionNoTagData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await patchApiVbyApiVersionNoTag({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const importMutation = (options?: Partial<Options<ImportData>>): MutationOptions<ImportResponse, DefaultError, Options<ImportData>> => {\n    const mutationOptions: MutationOptions<ImportResponse, DefaultError, Options<ImportData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await import_({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const fooWowMutation = (options?: Partial<Options<FooWowData>>): MutationOptions<unknown, DefaultError, Options<FooWowData>> => {\n    const mutationOptions: MutationOptions<unknown, DefaultError, Options<FooWowData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await fooWow({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const apiVVersionODataControllerCountQueryKey = (options?: Options<ApiVVersionODataControllerCountData>) => createQueryKey('apiVVersionODataControllerCount', options);\n\nexport const apiVVersionODataControllerCountOptions = (options?: Options<ApiVVersionODataControllerCountData>) => queryOptions<ApiVVersionODataControllerCountResponse, DefaultError, ApiVVersionODataControllerCountResponse, ReturnType<typeof apiVVersionODataControllerCountQueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await apiVVersionODataControllerCount({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: apiVVersionODataControllerCountQueryKey(options)\n});\n\nexport const getApiVbyApiVersionSimpleOperationQueryKey = (options: Options<GetApiVbyApiVersionSimpleOperationData>) => createQueryKey('getApiVbyApiVersionSimpleOperation', options);\n\nexport const getApiVbyApiVersionSimpleOperationOptions = (options: Options<GetApiVbyApiVersionSimpleOperationData>) => queryOptions<GetApiVbyApiVersionSimpleOperationResponse, GetApiVbyApiVersionSimpleOperationError, GetApiVbyApiVersionSimpleOperationResponse, ReturnType<typeof getApiVbyApiVersionSimpleOperationQueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await getApiVbyApiVersionSimpleOperation({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: getApiVbyApiVersionSimpleOperationQueryKey(options)\n});\n\nexport const deleteCallWithoutParametersAndResponseMutation = (options?: Partial<Options<DeleteCallWithoutParametersAndResponseData>>): MutationOptions<unknown, DefaultError, Options<DeleteCallWithoutParametersAndResponseData>> => {\n    const mutationOptions: MutationOptions<unknown, DefaultError, Options<DeleteCallWithoutParametersAndResponseData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await deleteCallWithoutParametersAndResponse({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const getCallWithoutParametersAndResponseQueryKey = (options?: Options<GetCallWithoutParametersAndResponseData>) => createQueryKey('getCallWithoutParametersAndResponse', options);\n\nexport const getCallWithoutParametersAndResponseOptions = (options?: Options<GetCallWithoutParametersAndResponseData>) => queryOptions<unknown, DefaultError, unknown, ReturnType<typeof getCallWithoutParametersAndResponseQueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await getCallWithoutParametersAndResponse({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: getCallWithoutParametersAndResponseQueryKey(options)\n});\n\nexport const patchCallWithoutParametersAndResponseMutation = (options?: Partial<Options<PatchCallWithoutParametersAndResponseData>>): MutationOptions<unknown, DefaultError, Options<PatchCallWithoutParametersAndResponseData>> => {\n    const mutationOptions: MutationOptions<unknown, DefaultError, Options<PatchCallWithoutParametersAndResponseData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await patchCallWithoutParametersAndResponse({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const postCallWithoutParametersAndResponseMutation = (options?: Partial<Options<PostCallWithoutParametersAndResponseData>>): MutationOptions<unknown, DefaultError, Options<PostCallWithoutParametersAndResponseData>> => {\n    const mutationOptions: MutationOptions<unknown, DefaultError, Options<PostCallWithoutParametersAndResponseData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await postCallWithoutParametersAndResponse({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const putCallWithoutParametersAndResponseMutation = (options?: Partial<Options<PutCallWithoutParametersAndResponseData>>): MutationOptions<unknown, DefaultError, Options<PutCallWithoutParametersAndResponseData>> => {\n    const mutationOptions: MutationOptions<unknown, DefaultError, Options<PutCallWithoutParametersAndResponseData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await putCallWithoutParametersAndResponse({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const deleteFooMutation = (options?: Partial<Options<DeleteFooData3>>): MutationOptions<unknown, DefaultError, Options<DeleteFooData3>> => {\n    const mutationOptions: MutationOptions<unknown, DefaultError, Options<DeleteFooData3>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await deleteFoo({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const callWithDescriptionsMutation = (options?: Partial<Options<CallWithDescriptionsData>>): MutationOptions<unknown, DefaultError, Options<CallWithDescriptionsData>> => {\n    const mutationOptions: MutationOptions<unknown, DefaultError, Options<CallWithDescriptionsData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await callWithDescriptions({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\n/**\n * @deprecated\n */\nexport const deprecatedCallMutation = (options?: Partial<Options<DeprecatedCallData>>): MutationOptions<unknown, DefaultError, Options<DeprecatedCallData>> => {\n    const mutationOptions: MutationOptions<unknown, DefaultError, Options<DeprecatedCallData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await deprecatedCall({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const callWithParametersMutation = (options?: Partial<Options<CallWithParametersData>>): MutationOptions<unknown, DefaultError, Options<CallWithParametersData>> => {\n    const mutationOptions: MutationOptions<unknown, DefaultError, Options<CallWithParametersData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await callWithParameters({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const callWithWeirdParameterNamesMutation = (options?: Partial<Options<CallWithWeirdParameterNamesData>>): MutationOptions<unknown, DefaultError, Options<CallWithWeirdParameterNamesData>> => {\n    const mutationOptions: MutationOptions<unknown, DefaultError, Options<CallWithWeirdParameterNamesData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await callWithWeirdParameterNames({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const getCallWithOptionalParamQueryKey = (options: Options<GetCallWithOptionalParamData>) => createQueryKey('getCallWithOptionalParam', options);\n\nexport const getCallWithOptionalParamOptions = (options: Options<GetCallWithOptionalParamData>) => queryOptions<unknown, DefaultError, unknown, ReturnType<typeof getCallWithOptionalParamQueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await getCallWithOptionalParam({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: getCallWithOptionalParamQueryKey(options)\n});\n\nconst createInfiniteParams = <K extends Pick<QueryKey<Options>[0], 'body' | 'headers' | 'path' | 'query'>>(queryKey: QueryKey<Options>, page: K) => {\n    const params = { ...queryKey[0] };\n    if (page.body) {\n        params.body = {\n            ...queryKey[0].body as any,\n            ...page.body as any\n        };\n    }\n    if (page.headers) {\n        params.headers = {\n            ...queryKey[0].headers,\n            ...page.headers\n        };\n    }\n    if (page.path) {\n        params.path = {\n            ...queryKey[0].path as any,\n            ...page.path as any\n        };\n    }\n    if (page.query) {\n        params.query = {\n            ...queryKey[0].query as any,\n            ...page.query as any\n        };\n    }\n    return params as unknown as typeof page;\n};\n\nexport const getCallWithOptionalParamInfiniteQueryKey = (options: Options<GetCallWithOptionalParamData>): QueryKey<Options<GetCallWithOptionalParamData>> => createQueryKey('getCallWithOptionalParam', options, true);\n\nexport const getCallWithOptionalParamInfiniteOptions = (options: Options<GetCallWithOptionalParamData>) => infiniteQueryOptions<unknown, DefaultError, InfiniteData<unknown>, QueryKey<Options<GetCallWithOptionalParamData>>, number | Pick<QueryKey<Options<GetCallWithOptionalParamData>>[0], 'body' | 'headers' | 'path' | 'query'>>(\n// @ts-ignore\n{\n    queryFn: async ({ pageParam, queryKey, signal }) => {\n        // @ts-ignore\n        const page: Pick<QueryKey<Options<GetCallWithOptionalParamData>>[0], 'body' | 'headers' | 'path' | 'query'> = typeof pageParam === 'object' ? pageParam : {\n            query: {\n                page: pageParam\n            }\n        };\n        const params = createInfiniteParams(queryKey, page);\n        const { data } = await getCallWithOptionalParam({\n            ...options,\n            ...params,\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: getCallWithOptionalParamInfiniteQueryKey(options)\n});\n\nexport const postCallWithOptionalParamMutation = (options?: Partial<Options<PostCallWithOptionalParamData>>): MutationOptions<PostCallWithOptionalParamResponse, DefaultError, Options<PostCallWithOptionalParamData>> => {\n    const mutationOptions: MutationOptions<PostCallWithOptionalParamResponse, DefaultError, Options<PostCallWithOptionalParamData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await postCallWithOptionalParam({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const postApiVbyApiVersionRequestBodyMutation = (options?: Partial<Options<PostApiVbyApiVersionRequestBodyData>>): MutationOptions<unknown, DefaultError, Options<PostApiVbyApiVersionRequestBodyData>> => {\n    const mutationOptions: MutationOptions<unknown, DefaultError, Options<PostApiVbyApiVersionRequestBodyData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await postApiVbyApiVersionRequestBody({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const postApiVbyApiVersionFormDataMutation = (options?: Partial<Options<PostApiVbyApiVersionFormDataData>>): MutationOptions<unknown, DefaultError, Options<PostApiVbyApiVersionFormDataData>> => {\n    const mutationOptions: MutationOptions<unknown, DefaultError, Options<PostApiVbyApiVersionFormDataData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await postApiVbyApiVersionFormData({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const callWithDefaultParametersQueryKey = (options?: Options<CallWithDefaultParametersData>) => createQueryKey('callWithDefaultParameters', options);\n\nexport const callWithDefaultParametersOptions = (options?: Options<CallWithDefaultParametersData>) => queryOptions<unknown, DefaultError, unknown, ReturnType<typeof callWithDefaultParametersQueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await callWithDefaultParameters({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: callWithDefaultParametersQueryKey(options)\n});\n\nexport const callWithDefaultOptionalParametersMutation = (options?: Partial<Options<CallWithDefaultOptionalParametersData>>): MutationOptions<unknown, DefaultError, Options<CallWithDefaultOptionalParametersData>> => {\n    const mutationOptions: MutationOptions<unknown, DefaultError, Options<CallWithDefaultOptionalParametersData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await callWithDefaultOptionalParameters({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const callToTestOrderOfParamsMutation = (options?: Partial<Options<CallToTestOrderOfParamsData>>): MutationOptions<unknown, DefaultError, Options<CallToTestOrderOfParamsData>> => {\n    const mutationOptions: MutationOptions<unknown, DefaultError, Options<CallToTestOrderOfParamsData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await callToTestOrderOfParams({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const duplicateNameMutation = (options?: Partial<Options<DuplicateNameData>>): MutationOptions<unknown, DefaultError, Options<DuplicateNameData>> => {\n    const mutationOptions: MutationOptions<unknown, DefaultError, Options<DuplicateNameData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await duplicateName({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const duplicateName2QueryKey = (options?: Options<DuplicateName2Data>) => createQueryKey('duplicateName2', options);\n\nexport const duplicateName2Options = (options?: Options<DuplicateName2Data>) => queryOptions<unknown, DefaultError, unknown, ReturnType<typeof duplicateName2QueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await duplicateName2({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: duplicateName2QueryKey(options)\n});\n\nexport const duplicateName3Mutation = (options?: Partial<Options<DuplicateName3Data>>): MutationOptions<unknown, DefaultError, Options<DuplicateName3Data>> => {\n    const mutationOptions: MutationOptions<unknown, DefaultError, Options<DuplicateName3Data>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await duplicateName3({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const duplicateName4Mutation = (options?: Partial<Options<DuplicateName4Data>>): MutationOptions<unknown, DefaultError, Options<DuplicateName4Data>> => {\n    const mutationOptions: MutationOptions<unknown, DefaultError, Options<DuplicateName4Data>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await duplicateName4({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const callWithNoContentResponseQueryKey = (options?: Options<CallWithNoContentResponseData>) => createQueryKey('callWithNoContentResponse', options);\n\nexport const callWithNoContentResponseOptions = (options?: Options<CallWithNoContentResponseData>) => queryOptions<CallWithNoContentResponseResponse, DefaultError, CallWithNoContentResponseResponse, ReturnType<typeof callWithNoContentResponseQueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await callWithNoContentResponse({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: callWithNoContentResponseQueryKey(options)\n});\n\nexport const callWithResponseAndNoContentResponseQueryKey = (options?: Options<CallWithResponseAndNoContentResponseData>) => createQueryKey('callWithResponseAndNoContentResponse', options);\n\nexport const callWithResponseAndNoContentResponseOptions = (options?: Options<CallWithResponseAndNoContentResponseData>) => queryOptions<CallWithResponseAndNoContentResponseResponse, DefaultError, CallWithResponseAndNoContentResponseResponse, ReturnType<typeof callWithResponseAndNoContentResponseQueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await callWithResponseAndNoContentResponse({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: callWithResponseAndNoContentResponseQueryKey(options)\n});\n\nexport const dummyAQueryKey = (options?: Options<DummyAData>) => createQueryKey('dummyA', options);\n\nexport const dummyAOptions = (options?: Options<DummyAData>) => queryOptions<DummyAResponse, DefaultError, DummyAResponse, ReturnType<typeof dummyAQueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await dummyA({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: dummyAQueryKey(options)\n});\n\nexport const dummyBQueryKey = (options?: Options<DummyBData>) => createQueryKey('dummyB', options);\n\nexport const dummyBOptions = (options?: Options<DummyBData>) => queryOptions<DummyBResponse, DefaultError, DummyBResponse, ReturnType<typeof dummyBQueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await dummyB({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: dummyBQueryKey(options)\n});\n\nexport const callWithResponseQueryKey = (options?: Options<CallWithResponseData>) => createQueryKey('callWithResponse', options);\n\nexport const callWithResponseOptions = (options?: Options<CallWithResponseData>) => queryOptions<CallWithResponseResponse, DefaultError, CallWithResponseResponse, ReturnType<typeof callWithResponseQueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await callWithResponse({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: callWithResponseQueryKey(options)\n});\n\nexport const callWithDuplicateResponsesMutation = (options?: Partial<Options<CallWithDuplicateResponsesData>>): MutationOptions<CallWithDuplicateResponsesResponse, CallWithDuplicateResponsesError, Options<CallWithDuplicateResponsesData>> => {\n    const mutationOptions: MutationOptions<CallWithDuplicateResponsesResponse, CallWithDuplicateResponsesError, Options<CallWithDuplicateResponsesData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await callWithDuplicateResponses({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const callWithResponsesMutation = (options?: Partial<Options<CallWithResponsesData>>): MutationOptions<CallWithResponsesResponse, CallWithResponsesError, Options<CallWithResponsesData>> => {\n    const mutationOptions: MutationOptions<CallWithResponsesResponse, CallWithResponsesError, Options<CallWithResponsesData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await callWithResponses({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const collectionFormatQueryKey = (options: Options<CollectionFormatData>) => createQueryKey('collectionFormat', options);\n\nexport const collectionFormatOptions = (options: Options<CollectionFormatData>) => queryOptions<unknown, DefaultError, unknown, ReturnType<typeof collectionFormatQueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await collectionFormat({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: collectionFormatQueryKey(options)\n});\n\nexport const typesQueryKey = (options: Options<TypesData>) => createQueryKey('types', options);\n\nexport const typesOptions = (options: Options<TypesData>) => queryOptions<TypesResponse, DefaultError, TypesResponse, ReturnType<typeof typesQueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await types({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: typesQueryKey(options)\n});\n\nexport const uploadFileMutation = (options?: Partial<Options<UploadFileData>>): MutationOptions<UploadFileResponse, DefaultError, Options<UploadFileData>> => {\n    const mutationOptions: MutationOptions<UploadFileResponse, DefaultError, Options<UploadFileData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await uploadFile({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const fileResponseQueryKey = (options: Options<FileResponseData>) => createQueryKey('fileResponse', options);\n\nexport const fileResponseOptions = (options: Options<FileResponseData>) => queryOptions<FileResponseResponse, DefaultError, FileResponseResponse, ReturnType<typeof fileResponseQueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await fileResponse({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: fileResponseQueryKey(options)\n});\n\nexport const complexTypesQueryKey = (options: Options<ComplexTypesData>) => createQueryKey('complexTypes', options);\n\nexport const complexTypesOptions = (options: Options<ComplexTypesData>) => queryOptions<ComplexTypesResponse, DefaultError, ComplexTypesResponse, ReturnType<typeof complexTypesQueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await complexTypes({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: complexTypesQueryKey(options)\n});\n\nexport const multipartResponseQueryKey = (options?: Options<MultipartResponseData>) => createQueryKey('multipartResponse', options);\n\nexport const multipartResponseOptions = (options?: Options<MultipartResponseData>) => queryOptions<MultipartResponseResponse, DefaultError, MultipartResponseResponse, ReturnType<typeof multipartResponseQueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await multipartResponse({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: multipartResponseQueryKey(options)\n});\n\nexport const multipartRequestMutation = (options?: Partial<Options<MultipartRequestData>>): MutationOptions<unknown, DefaultError, Options<MultipartRequestData>> => {\n    const mutationOptions: MutationOptions<unknown, DefaultError, Options<MultipartRequestData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await multipartRequest({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const complexParamsMutation = (options?: Partial<Options<ComplexParamsData>>): MutationOptions<ComplexParamsResponse, DefaultError, Options<ComplexParamsData>> => {\n    const mutationOptions: MutationOptions<ComplexParamsResponse, DefaultError, Options<ComplexParamsData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await complexParams({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const callWithResultFromHeaderMutation = (options?: Partial<Options<CallWithResultFromHeaderData>>): MutationOptions<unknown, DefaultError, Options<CallWithResultFromHeaderData>> => {\n    const mutationOptions: MutationOptions<unknown, DefaultError, Options<CallWithResultFromHeaderData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await callWithResultFromHeader({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const testErrorCodeMutation = (options?: Partial<Options<TestErrorCodeData>>): MutationOptions<unknown, DefaultError, Options<TestErrorCodeData>> => {\n    const mutationOptions: MutationOptions<unknown, DefaultError, Options<TestErrorCodeData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await testErrorCode({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const nonAsciiæøåÆøÅöôêÊ字符串Mutation = (options?: Partial<Options<NonAsciiæøåÆøÅöôêÊ字符串Data>>): MutationOptions<NonAsciiæøåÆøÅöôêÊ字符串Response, DefaultError, Options<NonAsciiæøåÆøÅöôêÊ字符串Data>> => {\n    const mutationOptions: MutationOptions<NonAsciiæøåÆøÅöôêÊ字符串Response, DefaultError, Options<NonAsciiæøåÆøÅöôêÊ字符串Data>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await nonAsciiæøåÆøÅöôêÊ字符串({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\n/**\n * Login User\n */\nexport const putWithFormUrlEncodedMutation = (options?: Partial<Options<PutWithFormUrlEncodedData>>): MutationOptions<unknown, DefaultError, Options<PutWithFormUrlEncodedData>> => {\n    const mutationOptions: MutationOptions<unknown, DefaultError, Options<PutWithFormUrlEncodedData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await putWithFormUrlEncoded({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/solid-query/fetch/client/client.gen.ts",
    "content": "// 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 (options: RequestOptions) => {\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 url = buildUrl(opts);\n\n    return { opts, url };\n  };\n\n  const request: Client['request'] = async (options) => {\n    // @ts-expect-error\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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/solid-query/fetch/client/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type { Auth } from '../core/auth.gen';\nexport type { QuerySerializerOptions } from '../core/bodySerializer.gen';\nexport {\n  formDataBodySerializer,\n  jsonBodySerializer,\n  urlSearchParamsBodySerializer,\n} from '../core/bodySerializer.gen';\nexport { buildClientParams } from '../core/params.gen';\nexport { serializeQueryKeyValue } from '../core/queryKeySerializer.gen';\nexport { createClient } from './client.gen';\nexport type {\n  Client,\n  ClientOptions,\n  Config,\n  CreateClientConfig,\n  Options,\n  RequestOptions,\n  RequestResult,\n  ResolvedRequestOptions,\n  ResponseStyle,\n  TDataShape,\n} from './types.gen';\nexport { createConfig, mergeHeaders } from './utils.gen';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/solid-query/fetch/client/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { Auth } from '../core/auth.gen';\nimport type {\n  ServerSentEventsOptions,\n  ServerSentEventsResult,\n} from '../core/serverSentEvents.gen';\nimport type { Client as CoreClient, Config as CoreConfig } from '../core/types.gen';\nimport type { Middleware } from './utils.gen';\n\nexport type ResponseStyle = 'data' | 'fields';\n\nexport interface Config<T extends ClientOptions = ClientOptions>\n  extends Omit<RequestInit, 'body' | 'headers' | 'method'>, CoreConfig {\n  /**\n   * Base URL for all requests made by this client.\n   */\n  baseUrl?: T['baseUrl'];\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   * Please don't use the Fetch client for Next.js applications. The `next`\n   * options won't have any effect.\n   *\n   * Install {@link https://www.npmjs.com/package/@hey-api/client-next `@hey-api/client-next`} instead.\n   */\n  next?: never;\n  /**\n   * Return the response data parsed in a specified format. By default, `auto`\n   * will infer the appropriate method from the `Content-Type` response header.\n   * You can override this behavior with any of the {@link Body} methods.\n   * Select `stream` if you don't want to parse response data at all.\n   *\n   * @default 'auto'\n   */\n  parseAs?: 'arrayBuffer' | 'auto' | 'blob' | 'formData' | 'json' | 'stream' | 'text';\n  /**\n   * Should we return only data or multiple fields (data, error, response, etc.)?\n   *\n   * @default 'fields'\n   */\n  responseStyle?: ResponseStyle;\n  /**\n   * Throw an error instead of returning it in the response?\n   *\n   * @default false\n   */\n  throwOnError?: T['throwOnError'];\n}\n\nexport interface RequestOptions<\n  TData = unknown,\n  TResponseStyle extends ResponseStyle = 'fields',\n  ThrowOnError extends boolean = boolean,\n  Url extends string = string,\n>\n  extends\n    Config<{\n      responseStyle: TResponseStyle;\n      throwOnError: ThrowOnError;\n    }>,\n    Pick<\n      ServerSentEventsOptions<TData>,\n      | 'onRequest'\n      | 'onSseError'\n      | 'onSseEvent'\n      | 'sseDefaultRetryDelay'\n      | 'sseMaxRetryAttempts'\n      | 'sseMaxRetryDelay'\n    > {\n  /**\n   * Any body that you want to add to your request.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/fetch#body}\n   */\n  body?: unknown;\n  path?: Record<string, unknown>;\n  query?: Record<string, unknown>;\n  /**\n   * Security mechanism(s) to use for the request.\n   */\n  security?: ReadonlyArray<Auth>;\n  url: Url;\n}\n\nexport interface ResolvedRequestOptions<\n  TResponseStyle extends ResponseStyle = 'fields',\n  ThrowOnError extends boolean = boolean,\n  Url extends string = string,\n> extends RequestOptions<unknown, TResponseStyle, ThrowOnError, Url> {\n  serializedBody?: string;\n}\n\nexport type RequestResult<\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = boolean,\n  TResponseStyle extends ResponseStyle = 'fields',\n> = ThrowOnError extends true\n  ? Promise<\n      TResponseStyle extends 'data'\n        ? TData extends Record<string, unknown>\n          ? TData[keyof TData]\n          : TData\n        : {\n            data: TData extends Record<string, unknown> ? TData[keyof TData] : TData;\n            request: Request;\n            response: Response;\n          }\n    >\n  : Promise<\n      TResponseStyle extends 'data'\n        ? (TData extends Record<string, unknown> ? TData[keyof TData] : TData) | undefined\n        : (\n            | {\n                data: TData extends Record<string, unknown> ? TData[keyof TData] : TData;\n                error: undefined;\n              }\n            | {\n                data: undefined;\n                error: TError extends Record<string, unknown> ? TError[keyof TError] : TError;\n              }\n          ) & {\n            request: Request;\n            response: Response;\n          }\n    >;\n\nexport interface ClientOptions {\n  baseUrl?: string;\n  responseStyle?: ResponseStyle;\n  throwOnError?: boolean;\n}\n\ntype MethodFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'>,\n) => RequestResult<TData, TError, ThrowOnError, TResponseStyle>;\n\ntype SseFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'>,\n) => Promise<ServerSentEventsResult<TData, TError>>;\n\ntype RequestFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'> &\n    Pick<Required<RequestOptions<TData, TResponseStyle, ThrowOnError>>, 'method'>,\n) => RequestResult<TData, TError, ThrowOnError, TResponseStyle>;\n\ntype BuildUrlFn = <\n  TData extends {\n    body?: unknown;\n    path?: Record<string, unknown>;\n    query?: Record<string, unknown>;\n    url: string;\n  },\n>(\n  options: TData & Options<TData>,\n) => string;\n\nexport type Client = CoreClient<RequestFn, Config, MethodFn, BuildUrlFn, SseFn> & {\n  interceptors: Middleware<Request, Response, unknown, ResolvedRequestOptions>;\n};\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 = ClientOptions> = (\n  override?: Config<ClientOptions & T>,\n) => Config<Required<ClientOptions> & T>;\n\nexport interface TDataShape {\n  body?: unknown;\n  headers?: unknown;\n  path?: unknown;\n  query?: unknown;\n  url: string;\n}\n\ntype OmitKeys<T, K> = Pick<T, Exclude<keyof T, K>>;\n\nexport type Options<\n  TData extends TDataShape = TDataShape,\n  ThrowOnError extends boolean = boolean,\n  TResponse = unknown,\n  TResponseStyle extends ResponseStyle = 'fields',\n> = OmitKeys<\n  RequestOptions<TResponse, TResponseStyle, ThrowOnError>,\n  'body' | 'path' | 'query' | 'url'\n> &\n  ([TData] extends [never] ? unknown : Omit<TData, 'url'>);\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/solid-query/fetch/client/utils.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/solid-query/fetch/client.gen.ts",
    "content": "// 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: 'http://localhost:3000/base' }));\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/solid-query/fetch/core/auth.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/solid-query/fetch/core/bodySerializer.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/solid-query/fetch/core/params.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/solid-query/fetch/core/pathSerializer.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/solid-query/fetch/core/queryKeySerializer.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\n/**\n * JSON-friendly union that mirrors what Pinia Colada can hash.\n */\nexport type JsonValue =\n  | null\n  | string\n  | number\n  | boolean\n  | JsonValue[]\n  | { [key: string]: JsonValue };\n\n/**\n * Replacer that converts non-JSON values (bigint, Date, etc.) to safe substitutes.\n */\nexport const queryKeyJsonReplacer = (_key: string, value: unknown) => {\n  if (value === undefined || typeof value === 'function' || typeof value === 'symbol') {\n    return undefined;\n  }\n  if (typeof value === 'bigint') {\n    return value.toString();\n  }\n  if (value instanceof Date) {\n    return value.toISOString();\n  }\n  return value;\n};\n\n/**\n * Safely stringifies a value and parses it back into a JsonValue.\n */\nexport const stringifyToJsonValue = (input: unknown): JsonValue | undefined => {\n  try {\n    const json = JSON.stringify(input, queryKeyJsonReplacer);\n    if (json === undefined) {\n      return undefined;\n    }\n    return JSON.parse(json) as JsonValue;\n  } catch {\n    return undefined;\n  }\n};\n\n/**\n * Detects plain objects (including objects with a null prototype).\n */\nconst isPlainObject = (value: unknown): value is Record<string, unknown> => {\n  if (value === null || typeof value !== 'object') {\n    return false;\n  }\n  const prototype = Object.getPrototypeOf(value as object);\n  return prototype === Object.prototype || prototype === null;\n};\n\n/**\n * Turns URLSearchParams into a sorted JSON object for deterministic keys.\n */\nconst serializeSearchParams = (params: URLSearchParams): JsonValue => {\n  const entries = Array.from(params.entries()).sort(([a], [b]) => a.localeCompare(b));\n  const result: Record<string, JsonValue> = {};\n\n  for (const [key, value] of entries) {\n    const existing = result[key];\n    if (existing === undefined) {\n      result[key] = value;\n      continue;\n    }\n\n    if (Array.isArray(existing)) {\n      (existing as string[]).push(value);\n    } else {\n      result[key] = [existing, value];\n    }\n  }\n\n  return result;\n};\n\n/**\n * Normalizes any accepted value into a JSON-friendly shape for query keys.\n */\nexport const serializeQueryKeyValue = (value: unknown): JsonValue | undefined => {\n  if (value === null) {\n    return null;\n  }\n\n  if (typeof value === 'string' || typeof value === 'number' || typeof value === 'boolean') {\n    return value;\n  }\n\n  if (value === undefined || typeof value === 'function' || typeof value === 'symbol') {\n    return undefined;\n  }\n\n  if (typeof value === 'bigint') {\n    return value.toString();\n  }\n\n  if (value instanceof Date) {\n    return value.toISOString();\n  }\n\n  if (Array.isArray(value)) {\n    return stringifyToJsonValue(value);\n  }\n\n  if (typeof URLSearchParams !== 'undefined' && value instanceof URLSearchParams) {\n    return serializeSearchParams(value);\n  }\n\n  if (isPlainObject(value)) {\n    return stringifyToJsonValue(value);\n  }\n\n  return undefined;\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/solid-query/fetch/core/serverSentEvents.gen.ts",
    "content": "// 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 const 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            // Normalize line endings: CRLF -> LF, then CR -> LF\n            buffer = buffer.replace(/\\r\\n/g, '\\n').replace(/\\r/g, '\\n');\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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/solid-query/fetch/core/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { Auth, AuthToken } from './auth.gen';\nimport type { BodySerializer, QuerySerializer, QuerySerializerOptions } from './bodySerializer.gen';\n\nexport type HttpMethod =\n  | 'connect'\n  | 'delete'\n  | 'get'\n  | 'head'\n  | 'options'\n  | 'patch'\n  | 'post'\n  | 'put'\n  | 'trace';\n\nexport type Client<\n  RequestFn = never,\n  Config = unknown,\n  MethodFn = never,\n  BuildUrlFn = never,\n  SseFn = never,\n> = {\n  /**\n   * Returns the final request URL.\n   */\n  buildUrl: BuildUrlFn;\n  getConfig: () => Config;\n  request: RequestFn;\n  setConfig: (config: Config) => Config;\n} & {\n  [K in HttpMethod]: MethodFn;\n} & ([SseFn] extends [never] ? { sse?: never } : { sse: { [K in HttpMethod]: SseFn } });\n\nexport interface Config {\n  /**\n   * Auth token or a function returning auth token. The resolved value will be\n   * added to the request payload as defined by its `security` array.\n   */\n  auth?: ((auth: Auth) => Promise<AuthToken> | AuthToken) | AuthToken;\n  /**\n   * A function for serializing request body parameter. By default,\n   * {@link JSON.stringify()} will be used.\n   */\n  bodySerializer?: BodySerializer | null;\n  /**\n   * An object containing any HTTP headers that you want to pre-populate your\n   * `Headers` object with.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/Headers/Headers#init See more}\n   */\n  headers?:\n    | RequestInit['headers']\n    | Record<\n        string,\n        string | number | boolean | (string | number | boolean)[] | null | undefined | unknown\n      >;\n  /**\n   * The request method.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/fetch#method See more}\n   */\n  method?: Uppercase<HttpMethod>;\n  /**\n   * A function for serializing request query parameters. By default, arrays\n   * will be exploded in form style, objects will be exploded in deepObject\n   * style, and reserved characters are percent-encoded.\n   *\n   * This method will have no effect if the native `paramsSerializer()` Axios\n   * API function is used.\n   *\n   * {@link https://swagger.io/docs/specification/serialization/#query View examples}\n   */\n  querySerializer?: QuerySerializer | QuerySerializerOptions;\n  /**\n   * A function validating request data. This is useful if you want to ensure\n   * the request conforms to the desired shape, so it can be safely sent to\n   * the server.\n   */\n  requestValidator?: (data: unknown) => Promise<unknown>;\n  /**\n   * A function transforming response data before it's returned. This is useful\n   * for post-processing data, e.g. converting ISO strings into Date objects.\n   */\n  responseTransformer?: (data: unknown) => Promise<unknown>;\n  /**\n   * A function validating response data. This is useful if you want to ensure\n   * the response conforms to the desired shape, so it can be safely passed to\n   * the transformers and returned to the user.\n   */\n  responseValidator?: (data: unknown) => Promise<unknown>;\n}\n\ntype IsExactlyNeverOrNeverUndefined<T> = [T] extends [never]\n  ? true\n  : [T] extends [never | undefined]\n    ? [undefined] extends [T]\n      ? false\n      : true\n    : false;\n\nexport type OmitNever<T extends Record<string, unknown>> = {\n  [K in keyof T as IsExactlyNeverOrNeverUndefined<T[K]> extends true ? never : K]: T[K];\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/solid-query/fetch/core/utils.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/solid-query/fetch/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport { apiVVersionODataControllerCount, callToTestOrderOfParams, callWithDefaultOptionalParameters, callWithDefaultParameters, callWithDescriptions, callWithDuplicateResponses, callWithNoContentResponse, callWithParameters, callWithResponse, callWithResponseAndNoContentResponse, callWithResponses, callWithResultFromHeader, callWithWeirdParameterNames, collectionFormat, complexParams, complexTypes, deleteCallWithoutParametersAndResponse, deleteFoo, deprecatedCall, dummyA, dummyB, duplicateName, duplicateName2, duplicateName3, duplicateName4, export_, fileResponse, fooWow, getApiVbyApiVersionSimpleOperation, getCallWithOptionalParam, getCallWithoutParametersAndResponse, headCallWithoutParametersAndResponse, import_, multipartRequest, multipartResponse, nonAsciiæøåÆøÅöôêÊ字符串, type Options, optionsCallWithoutParametersAndResponse, patchApiVbyApiVersionNoTag, patchCallWithoutParametersAndResponse, postApiVbyApiVersionFormData, postApiVbyApiVersionRequestBody, postCallWithOptionalParam, postCallWithoutParametersAndResponse, putCallWithoutParametersAndResponse, putWithFormUrlEncoded, testErrorCode, types, uploadFile } from './sdk.gen';\nexport type { _3eNum1Период, _400, AdditionalPropertiesIntegerIssue, AdditionalPropertiesUnknownIssue, AdditionalPropertiesUnknownIssue2, AdditionalPropertiesUnknownIssue3, AdditionalPropertiesUnknownIssueWritable, AnyOfAnyAndNull, AnyOfArrays, ApiVVersionODataControllerCountData, ApiVVersionODataControllerCountResponse, ApiVVersionODataControllerCountResponses, ArrayWithAnyOfProperties, ArrayWithArray, ArrayWithBooleans, ArrayWithNumbers, ArrayWithProperties, ArrayWithReferences, ArrayWithStrings, CallToTestOrderOfParamsData, CallWithDefaultOptionalParametersData, CallWithDefaultParametersData, CallWithDescriptionsData, CallWithDuplicateResponsesData, CallWithDuplicateResponsesError, CallWithDuplicateResponsesErrors, CallWithDuplicateResponsesResponse, CallWithDuplicateResponsesResponses, CallWithNoContentResponseData, CallWithNoContentResponseResponse, CallWithNoContentResponseResponses, CallWithParametersData, CallWithResponseAndNoContentResponseData, CallWithResponseAndNoContentResponseResponse, CallWithResponseAndNoContentResponseResponses, CallWithResponseData, CallWithResponseResponse, CallWithResponseResponses, CallWithResponsesData, CallWithResponsesError, CallWithResponsesErrors, CallWithResponsesResponse, CallWithResponsesResponses, CallWithResultFromHeaderData, CallWithResultFromHeaderErrors, CallWithResultFromHeaderResponses, CallWithWeirdParameterNamesData, CamelCaseCommentWithBreaks, CharactersInDescription, ClientOptions, CollectionFormatData, CommentWithBackticks, CommentWithBackticksAndQuotes, CommentWithBreaks, CommentWithExpressionPlaceholders, CommentWithQuotes, CommentWithReservedCharacters, CommentWithSlashes, ComplexParamsData, ComplexParamsResponse, ComplexParamsResponses, ComplexTypesData, ComplexTypesErrors, ComplexTypesResponse, ComplexTypesResponses, CompositionBaseModel, CompositionExtendedModel, CompositionWithAllOfAndNullable, CompositionWithAnyOf, CompositionWithAnyOfAndNullable, CompositionWithAnyOfAnonymous, CompositionWithNestedAnyAndTypeNull, CompositionWithNestedAnyOfAndNull, CompositionWithOneOf, CompositionWithOneOfAndComplexArrayDictionary, CompositionWithOneOfAndNullable, CompositionWithOneOfAndProperties, CompositionWithOneOfAndSimpleArrayDictionary, CompositionWithOneOfAndSimpleDictionary, CompositionWithOneOfAnonymous, CompositionWithOneOfDiscriminator, ConstValue, Default, DeleteCallWithoutParametersAndResponseData, DeleteFooData, DeleteFooData2, DeleteFooData3, DeprecatedCallData, DeprecatedModel, DictionaryWithArray, DictionaryWithDictionary, DictionaryWithProperties, DictionaryWithPropertiesAndAdditionalProperties, DictionaryWithReference, DictionaryWithString, DummyAData, DummyAResponse, DummyAResponses, DummyBData, DummyBResponse, DummyBResponses, DuplicateName2Data, DuplicateName3Data, DuplicateName4Data, DuplicateNameData, EnumFromDescription, EnumWithExtensions, EnumWithNumbers, EnumWithReplacedCharacters, EnumWithStrings, EnumWithXEnumNames, ExportData, ExternalRefA, ExternalRefB, ExternalSharedModel, File, FileResponseData, FileResponseResponse, FileResponseResponses, FileWritable, FooWowData, FooWowResponses, FreeFormObjectWithAdditionalPropertiesEqEmptyObject, FreeFormObjectWithAdditionalPropertiesEqTrue, FreeFormObjectWithoutAdditionalProperties, GenericSchemaDuplicateIssue1SystemBoolean, GenericSchemaDuplicateIssue1SystemBooleanWritable, GenericSchemaDuplicateIssue1SystemString, GenericSchemaDuplicateIssue1SystemStringWritable, GetApiVbyApiVersionSimpleOperationData, GetApiVbyApiVersionSimpleOperationError, GetApiVbyApiVersionSimpleOperationErrors, GetApiVbyApiVersionSimpleOperationResponse, GetApiVbyApiVersionSimpleOperationResponses, GetCallWithOptionalParamData, GetCallWithoutParametersAndResponseData, HeadCallWithoutParametersAndResponseData, Import, ImportData, ImportResponse, ImportResponses, IoK8sApimachineryPkgApisMetaV1DeleteOptions, IoK8sApimachineryPkgApisMetaV1Preconditions, ModelCircle, ModelFromZendesk, ModelSquare, ModelThatExtends, ModelThatExtendsExtends, ModelWithAdditionalPropertiesEqTrue, ModelWithAdditionalPropertiesRef, ModelWithAnyOfConstantSizeArray, ModelWithAnyOfConstantSizeArrayAndIntersect, ModelWithAnyOfConstantSizeArrayNullable, ModelWithAnyOfConstantSizeArrayWithNSizeAndOptions, ModelWithAnyOfConstantSizeArrayWithNSizeAndOptionsWritable, ModelWithArray, ModelWithArrayReadOnlyAndWriteOnly, ModelWithArrayReadOnlyAndWriteOnlyWritable, ModelWithBackticksInDescription, ModelWithBoolean, ModelWithCircularReference, ModelWithConst, ModelWithConstantSizeArray, ModelWithDictionary, ModelWithDuplicateImports, ModelWithDuplicateProperties, ModelWithEnum, ModelWithEnumFromDescription, ModelWithEnumWithHyphen, ModelWithInteger, ModelWithNestedArrayEnums, ModelWithNestedArrayEnumsData, ModelWithNestedArrayEnumsDataBar, ModelWithNestedArrayEnumsDataFoo, ModelWithNestedCompositionEnums, ModelWithNestedEnums, ModelWithNestedProperties, ModelWithNullableObject, ModelWithNullableString, ModelWithNumericEnumUnion, ModelWithOneOfAndProperties, ModelWithOneOfEnum, ModelWithOrderedProperties, ModelWithPattern, ModelWithPatternWritable, ModelWithPrefixItemsConstantSizeArray, ModelWithProperties, ModelWithPropertiesWritable, ModelWithReadOnlyAndWriteOnly, ModelWithReadOnlyAndWriteOnlyWritable, ModelWithReference, ModelWithReferenceWritable, ModelWithString, ModelWithStringError, MultipartRequestData, MultipartResponseData, MultipartResponseResponse, MultipartResponseResponses, NestedAnyOfArraysNullable, NonAsciiæøåÆøÅöôêÊ字符串Data, NonAsciiæøåÆøÅöôêÊ字符串Response, NonAsciiæøåÆøÅöôêÊ字符串Responses, NonAsciiStringæøåÆøÅöôêÊ字符串, NullableObject, OneOfAllOfIssue, OneOfAllOfIssueWritable, OptionsCallWithoutParametersAndResponseData, Pageable, ParameterSimpleParameterUnused, PatchApiVbyApiVersionNoTagData, PatchApiVbyApiVersionNoTagResponses, PatchCallWithoutParametersAndResponseData, PostApiVbyApiVersionFormDataData, PostApiVbyApiVersionRequestBodyData, PostCallWithOptionalParamData, PostCallWithOptionalParamResponse, PostCallWithOptionalParamResponses, PostCallWithoutParametersAndResponseData, PostServiceWithEmptyTagResponse, PostServiceWithEmptyTagResponse2, PutCallWithoutParametersAndResponseData, PutWithFormUrlEncodedData, SchemaWithFormRestrictedKeys, SimpleBoolean, SimpleFile, SimpleFormData, SimpleInteger, SimpleParameter, SimpleReference, SimpleRequestBody, SimpleString, SimpleStringWithPattern, TestErrorCodeData, TestErrorCodeErrors, TestErrorCodeResponses, TypesData, TypesResponse, TypesResponses, UploadFileData, UploadFileResponse, UploadFileResponses, XFooBar } from './types.gen';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/solid-query/fetch/sdk.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport { type Client, formDataBodySerializer, type Options as Options2, type TDataShape, urlSearchParamsBodySerializer } from './client';\nimport { client } from './client.gen';\nimport type { ApiVVersionODataControllerCountData, ApiVVersionODataControllerCountResponses, CallToTestOrderOfParamsData, CallWithDefaultOptionalParametersData, CallWithDefaultParametersData, CallWithDescriptionsData, CallWithDuplicateResponsesData, CallWithDuplicateResponsesErrors, CallWithDuplicateResponsesResponses, CallWithNoContentResponseData, CallWithNoContentResponseResponses, CallWithParametersData, CallWithResponseAndNoContentResponseData, CallWithResponseAndNoContentResponseResponses, CallWithResponseData, CallWithResponseResponses, CallWithResponsesData, CallWithResponsesErrors, CallWithResponsesResponses, CallWithResultFromHeaderData, CallWithResultFromHeaderErrors, CallWithResultFromHeaderResponses, CallWithWeirdParameterNamesData, CollectionFormatData, ComplexParamsData, ComplexParamsResponses, ComplexTypesData, ComplexTypesErrors, ComplexTypesResponses, DeleteCallWithoutParametersAndResponseData, DeleteFooData3, DeprecatedCallData, DummyAData, DummyAResponses, DummyBData, DummyBResponses, DuplicateName2Data, DuplicateName3Data, DuplicateName4Data, DuplicateNameData, ExportData, FileResponseData, FileResponseResponses, FooWowData, FooWowResponses, GetApiVbyApiVersionSimpleOperationData, GetApiVbyApiVersionSimpleOperationErrors, GetApiVbyApiVersionSimpleOperationResponses, GetCallWithOptionalParamData, GetCallWithoutParametersAndResponseData, HeadCallWithoutParametersAndResponseData, ImportData, ImportResponses, MultipartRequestData, MultipartResponseData, MultipartResponseResponses, NonAsciiæøåÆøÅöôêÊ字符串Data, NonAsciiæøåÆøÅöôêÊ字符串Responses, OptionsCallWithoutParametersAndResponseData, PatchApiVbyApiVersionNoTagData, PatchApiVbyApiVersionNoTagResponses, PatchCallWithoutParametersAndResponseData, PostApiVbyApiVersionFormDataData, PostApiVbyApiVersionRequestBodyData, PostCallWithOptionalParamData, PostCallWithOptionalParamResponses, PostCallWithoutParametersAndResponseData, PutCallWithoutParametersAndResponseData, PutWithFormUrlEncodedData, TestErrorCodeData, TestErrorCodeErrors, TestErrorCodeResponses, TypesData, TypesResponses, UploadFileData, UploadFileResponses } from './types.gen';\n\nexport type Options<TData extends TDataShape = TDataShape, ThrowOnError extends boolean = boolean> = Options2<TData, ThrowOnError> & {\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\nexport const export_ = <ThrowOnError extends boolean = false>(options?: Options<ExportData, ThrowOnError>) => (options?.client ?? client).get<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/no+tag', ...options });\n\nexport const patchApiVbyApiVersionNoTag = <ThrowOnError extends boolean = false>(options?: Options<PatchApiVbyApiVersionNoTagData, ThrowOnError>) => (options?.client ?? client).patch<PatchApiVbyApiVersionNoTagResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/no+tag', ...options });\n\nexport const import_ = <ThrowOnError extends boolean = false>(options: Options<ImportData, ThrowOnError>) => (options.client ?? client).post<ImportResponses, unknown, ThrowOnError>({\n    url: '/api/v{api-version}/no+tag',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options.headers\n    }\n});\n\nexport const fooWow = <ThrowOnError extends boolean = false>(options?: Options<FooWowData, ThrowOnError>) => (options?.client ?? client).put<FooWowResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/no+tag', ...options });\n\nexport const apiVVersionODataControllerCount = <ThrowOnError extends boolean = false>(options?: Options<ApiVVersionODataControllerCountData, ThrowOnError>) => (options?.client ?? client).get<ApiVVersionODataControllerCountResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple/$count', ...options });\n\nexport const getApiVbyApiVersionSimpleOperation = <ThrowOnError extends boolean = false>(options: Options<GetApiVbyApiVersionSimpleOperationData, ThrowOnError>) => (options.client ?? client).get<GetApiVbyApiVersionSimpleOperationResponses, GetApiVbyApiVersionSimpleOperationErrors, ThrowOnError>({ url: '/api/v{api-version}/simple:operation', ...options });\n\nexport const deleteCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<DeleteCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).delete<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const getCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<GetCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).get<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const headCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<HeadCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).head<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const optionsCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<OptionsCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).options<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const patchCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<PatchCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).patch<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const postCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<PostCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).post<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const putCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<PutCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).put<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const deleteFoo = <ThrowOnError extends boolean = false>(options: Options<DeleteFooData3, ThrowOnError>) => (options.client ?? client).delete<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/foo/{foo_param}/bar/{BarParam}', ...options });\n\nexport const callWithDescriptions = <ThrowOnError extends boolean = false>(options?: Options<CallWithDescriptionsData, ThrowOnError>) => (options?.client ?? client).post<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/descriptions', ...options });\n\n/**\n * @deprecated\n */\nexport const deprecatedCall = <ThrowOnError extends boolean = false>(options: Options<DeprecatedCallData, ThrowOnError>) => (options.client ?? client).post<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/parameters/deprecated', ...options });\n\nexport const callWithParameters = <ThrowOnError extends boolean = false>(options: Options<CallWithParametersData, ThrowOnError>) => (options.client ?? client).post<unknown, unknown, ThrowOnError>({\n    url: '/api/v{api-version}/parameters/{parameterPath}',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options.headers\n    }\n});\n\nexport const callWithWeirdParameterNames = <ThrowOnError extends boolean = false>(options: Options<CallWithWeirdParameterNamesData, ThrowOnError>) => (options.client ?? client).post<unknown, unknown, ThrowOnError>({\n    url: '/api/v{api-version}/parameters/{parameter.path.1}/{parameter-path-2}/{PARAMETER-PATH-3}',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options.headers\n    }\n});\n\nexport const getCallWithOptionalParam = <ThrowOnError extends boolean = false>(options: Options<GetCallWithOptionalParamData, ThrowOnError>) => (options.client ?? client).get<unknown, unknown, ThrowOnError>({\n    url: '/api/v{api-version}/parameters',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options.headers\n    }\n});\n\nexport const postCallWithOptionalParam = <ThrowOnError extends boolean = false>(options: Options<PostCallWithOptionalParamData, ThrowOnError>) => (options.client ?? client).post<PostCallWithOptionalParamResponses, unknown, ThrowOnError>({\n    url: '/api/v{api-version}/parameters',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options.headers\n    }\n});\n\nexport const postApiVbyApiVersionRequestBody = <ThrowOnError extends boolean = false>(options?: Options<PostApiVbyApiVersionRequestBodyData, ThrowOnError>) => (options?.client ?? client).post<unknown, unknown, ThrowOnError>({\n    url: '/api/v{api-version}/requestBody',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options?.headers\n    }\n});\n\nexport const postApiVbyApiVersionFormData = <ThrowOnError extends boolean = false>(options?: Options<PostApiVbyApiVersionFormDataData, ThrowOnError>) => (options?.client ?? client).post<unknown, unknown, ThrowOnError>({\n    ...formDataBodySerializer,\n    url: '/api/v{api-version}/formData',\n    ...options,\n    headers: {\n        'Content-Type': null,\n        ...options?.headers\n    }\n});\n\nexport const callWithDefaultParameters = <ThrowOnError extends boolean = false>(options?: Options<CallWithDefaultParametersData, ThrowOnError>) => (options?.client ?? client).get<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/defaults', ...options });\n\nexport const callWithDefaultOptionalParameters = <ThrowOnError extends boolean = false>(options?: Options<CallWithDefaultOptionalParametersData, ThrowOnError>) => (options?.client ?? client).post<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/defaults', ...options });\n\nexport const callToTestOrderOfParams = <ThrowOnError extends boolean = false>(options: Options<CallToTestOrderOfParamsData, ThrowOnError>) => (options.client ?? client).put<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/defaults', ...options });\n\nexport const duplicateName = <ThrowOnError extends boolean = false>(options?: Options<DuplicateNameData, ThrowOnError>) => (options?.client ?? client).delete<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/duplicate', ...options });\n\nexport const duplicateName2 = <ThrowOnError extends boolean = false>(options?: Options<DuplicateName2Data, ThrowOnError>) => (options?.client ?? client).get<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/duplicate', ...options });\n\nexport const duplicateName3 = <ThrowOnError extends boolean = false>(options?: Options<DuplicateName3Data, ThrowOnError>) => (options?.client ?? client).post<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/duplicate', ...options });\n\nexport const duplicateName4 = <ThrowOnError extends boolean = false>(options?: Options<DuplicateName4Data, ThrowOnError>) => (options?.client ?? client).put<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/duplicate', ...options });\n\nexport const callWithNoContentResponse = <ThrowOnError extends boolean = false>(options?: Options<CallWithNoContentResponseData, ThrowOnError>) => (options?.client ?? client).get<CallWithNoContentResponseResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/no-content', ...options });\n\nexport const callWithResponseAndNoContentResponse = <ThrowOnError extends boolean = false>(options?: Options<CallWithResponseAndNoContentResponseData, ThrowOnError>) => (options?.client ?? client).get<CallWithResponseAndNoContentResponseResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/multiple-tags/response-and-no-content', ...options });\n\nexport const dummyA = <ThrowOnError extends boolean = false>(options?: Options<DummyAData, ThrowOnError>) => (options?.client ?? client).get<DummyAResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/multiple-tags/a', ...options });\n\nexport const dummyB = <ThrowOnError extends boolean = false>(options?: Options<DummyBData, ThrowOnError>) => (options?.client ?? client).get<DummyBResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/multiple-tags/b', ...options });\n\nexport const callWithResponse = <ThrowOnError extends boolean = false>(options?: Options<CallWithResponseData, ThrowOnError>) => (options?.client ?? client).get<CallWithResponseResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/response', ...options });\n\nexport const callWithDuplicateResponses = <ThrowOnError extends boolean = false>(options?: Options<CallWithDuplicateResponsesData, ThrowOnError>) => (options?.client ?? client).post<CallWithDuplicateResponsesResponses, CallWithDuplicateResponsesErrors, ThrowOnError>({ url: '/api/v{api-version}/response', ...options });\n\nexport const callWithResponses = <ThrowOnError extends boolean = false>(options?: Options<CallWithResponsesData, ThrowOnError>) => (options?.client ?? client).put<CallWithResponsesResponses, CallWithResponsesErrors, ThrowOnError>({ url: '/api/v{api-version}/response', ...options });\n\nexport const collectionFormat = <ThrowOnError extends boolean = false>(options: Options<CollectionFormatData, ThrowOnError>) => (options.client ?? client).get<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/collectionFormat', ...options });\n\nexport const types = <ThrowOnError extends boolean = false>(options: Options<TypesData, ThrowOnError>) => (options.client ?? client).get<TypesResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/types', ...options });\n\nexport const uploadFile = <ThrowOnError extends boolean = false>(options: Options<UploadFileData, ThrowOnError>) => (options.client ?? client).post<UploadFileResponses, unknown, ThrowOnError>({\n    ...urlSearchParamsBodySerializer,\n    url: '/api/v{api-version}/upload',\n    ...options,\n    headers: {\n        'Content-Type': 'application/x-www-form-urlencoded',\n        ...options.headers\n    }\n});\n\nexport const fileResponse = <ThrowOnError extends boolean = false>(options: Options<FileResponseData, ThrowOnError>) => (options.client ?? client).get<FileResponseResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/file/{id}', ...options });\n\nexport const complexTypes = <ThrowOnError extends boolean = false>(options: Options<ComplexTypesData, ThrowOnError>) => (options.client ?? client).get<ComplexTypesResponses, ComplexTypesErrors, ThrowOnError>({\n    querySerializer: { parameters: { parameterObject: { object: { style: 'form' } } } },\n    url: '/api/v{api-version}/complex',\n    ...options\n});\n\nexport const multipartResponse = <ThrowOnError extends boolean = false>(options?: Options<MultipartResponseData, ThrowOnError>) => (options?.client ?? client).get<MultipartResponseResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/multipart', ...options });\n\nexport const multipartRequest = <ThrowOnError extends boolean = false>(options?: Options<MultipartRequestData, ThrowOnError>) => (options?.client ?? client).post<unknown, unknown, ThrowOnError>({\n    ...formDataBodySerializer,\n    url: '/api/v{api-version}/multipart',\n    ...options,\n    headers: {\n        'Content-Type': null,\n        ...options?.headers\n    }\n});\n\nexport const complexParams = <ThrowOnError extends boolean = false>(options: Options<ComplexParamsData, ThrowOnError>) => (options.client ?? client).put<ComplexParamsResponses, unknown, ThrowOnError>({\n    url: '/api/v{api-version}/complex/{id}',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json-patch+json',\n        ...options.headers\n    }\n});\n\nexport const callWithResultFromHeader = <ThrowOnError extends boolean = false>(options?: Options<CallWithResultFromHeaderData, ThrowOnError>) => (options?.client ?? client).post<CallWithResultFromHeaderResponses, CallWithResultFromHeaderErrors, ThrowOnError>({ url: '/api/v{api-version}/header', ...options });\n\nexport const testErrorCode = <ThrowOnError extends boolean = false>(options: Options<TestErrorCodeData, ThrowOnError>) => (options.client ?? client).post<TestErrorCodeResponses, TestErrorCodeErrors, ThrowOnError>({ url: '/api/v{api-version}/error', ...options });\n\nexport const nonAsciiæøåÆøÅöôêÊ字符串 = <ThrowOnError extends boolean = false>(options: Options<NonAsciiæøåÆøÅöôêÊ字符串Data, ThrowOnError>) => (options.client ?? client).post<NonAsciiæøåÆøÅöôêÊ字符串Responses, unknown, ThrowOnError>({ url: '/api/v{api-version}/non-ascii-æøåÆØÅöôêÊ字符串', ...options });\n\n/**\n * Login User\n */\nexport const putWithFormUrlEncoded = <ThrowOnError extends boolean = false>(options: Options<PutWithFormUrlEncodedData, ThrowOnError>) => (options.client ?? client).put<unknown, unknown, ThrowOnError>({\n    ...urlSearchParamsBodySerializer,\n    url: '/api/v{api-version}/non-ascii-æøåÆØÅöôêÊ字符串',\n    ...options,\n    headers: {\n        'Content-Type': 'application/x-www-form-urlencoded',\n        ...options.headers\n    }\n});\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/solid-query/fetch/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type ClientOptions = {\n    baseUrl: 'http://localhost:3000/base' | (string & {});\n};\n\n/**\n * Model with number-only name\n */\nexport type _400 = string;\n\nexport type ExternalRefA = ExternalSharedModel;\n\nexport type ExternalRefB = ExternalSharedModel;\n\n/**\n * Testing multiline comments in string: First line\n * Second line\n *\n * Fourth line\n */\nexport type CamelCaseCommentWithBreaks = number;\n\n/**\n * Testing multiline comments in string: First line\n * Second line\n *\n * Fourth line\n */\nexport type CommentWithBreaks = number;\n\n/**\n * Testing backticks in string: `backticks` and ```multiple backticks``` should work\n */\nexport type CommentWithBackticks = number;\n\n/**\n * Testing backticks and quotes in string: `backticks`, 'quotes', \"double quotes\" and ```multiple backticks``` should work\n */\nexport type CommentWithBackticksAndQuotes = number;\n\n/**\n * Testing slashes in string: \\backwards\\\\\\ and /forwards/// should work\n */\nexport type CommentWithSlashes = number;\n\n/**\n * Testing expression placeholders in string: ${expression} should work\n */\nexport type CommentWithExpressionPlaceholders = number;\n\n/**\n * Testing quotes in string: 'single quote''' and \"double quotes\"\"\" should work\n */\nexport type CommentWithQuotes = number;\n\n/**\n * Testing reserved characters in string: * inline * and ** inline ** should work\n */\nexport type CommentWithReservedCharacters = number;\n\n/**\n * This is a simple number\n */\nexport type SimpleInteger = number;\n\n/**\n * This is a simple boolean\n */\nexport type SimpleBoolean = boolean;\n\n/**\n * This is a simple string\n */\nexport type SimpleString = string;\n\n/**\n * A string with non-ascii (unicode) characters valid in typescript identifiers (æøåÆØÅöÔèÈ字符串)\n */\nexport type NonAsciiStringæøåÆøÅöôêÊ字符串 = string;\n\n/**\n * This is a simple file\n */\nexport type SimpleFile = Blob | File;\n\n/**\n * This is a simple reference\n */\nexport type SimpleReference = ModelWithString;\n\n/**\n * This is a simple string\n */\nexport type SimpleStringWithPattern = string | null;\n\n/**\n * This is a simple enum with strings\n */\nexport type EnumWithStrings = 'Success' | 'Warning' | 'Error' | '\\'Single Quote\\'' | '\"Double Quotes\"' | 'Non-ascii: øæåôöØÆÅÔÖ字符串';\n\nexport type EnumWithReplacedCharacters = '\\'Single Quote\\'' | '\"Double Quotes\"' | 'øæåôöØÆÅÔÖ字符串' | 3.1 | '';\n\n/**\n * This is a simple enum with numbers\n */\nexport type EnumWithNumbers = 1 | 2 | 3 | 1.1 | 1.2 | 1.3 | 100 | 200 | 300 | -100 | -200 | -300 | -1.1 | -1.2 | -1.3;\n\n/**\n * Success=1,Warning=2,Error=3\n */\nexport type EnumFromDescription = number;\n\n/**\n * This is a simple enum with numbers\n */\nexport type EnumWithExtensions = 200 | 400 | 500;\n\nexport type EnumWithXEnumNames = 0 | 1 | 2;\n\n/**\n * This is a simple array with numbers\n */\nexport type ArrayWithNumbers = Array<number>;\n\n/**\n * This is a simple array with booleans\n */\nexport type ArrayWithBooleans = Array<boolean>;\n\n/**\n * This is a simple array with strings\n */\nexport type ArrayWithStrings = Array<string>;\n\n/**\n * This is a simple array with references\n */\nexport type ArrayWithReferences = Array<ModelWithString>;\n\n/**\n * This is a simple array containing an array\n */\nexport type ArrayWithArray = Array<Array<ModelWithString>>;\n\n/**\n * This is a simple array with properties\n */\nexport type ArrayWithProperties = Array<{\n    '16x16'?: CamelCaseCommentWithBreaks;\n    bar?: string;\n}>;\n\n/**\n * This is a simple array with any of properties\n */\nexport type ArrayWithAnyOfProperties = Array<{\n    foo?: string;\n} | {\n    bar?: string;\n}>;\n\nexport type AnyOfAnyAndNull = {\n    data?: unknown;\n};\n\n/**\n * This is a simple array with any of properties\n */\nexport type AnyOfArrays = {\n    results?: Array<{\n        foo?: string;\n    } | {\n        bar?: string;\n    }>;\n};\n\n/**\n * This is a string dictionary\n */\nexport type DictionaryWithString = {\n    [key: string]: string;\n};\n\nexport type DictionaryWithPropertiesAndAdditionalProperties = {\n    foo?: number;\n    bar?: boolean;\n    [key: string]: string | number | boolean | undefined;\n};\n\n/**\n * This is a string reference\n */\nexport type DictionaryWithReference = {\n    [key: string]: ModelWithString;\n};\n\n/**\n * This is a complex dictionary\n */\nexport type DictionaryWithArray = {\n    [key: string]: Array<ModelWithString>;\n};\n\n/**\n * This is a string dictionary\n */\nexport type DictionaryWithDictionary = {\n    [key: string]: {\n        [key: string]: string;\n    };\n};\n\n/**\n * This is a complex dictionary\n */\nexport type DictionaryWithProperties = {\n    [key: string]: {\n        foo?: string;\n        bar?: string;\n    };\n};\n\n/**\n * This is a model with one number property\n */\nexport type ModelWithInteger = {\n    /**\n     * This is a simple number property\n     */\n    prop?: number;\n};\n\n/**\n * This is a model with one boolean property\n */\nexport type ModelWithBoolean = {\n    /**\n     * This is a simple boolean property\n     */\n    prop?: boolean;\n};\n\n/**\n * This is a model with one string property\n */\nexport type ModelWithString = {\n    /**\n     * This is a simple string property\n     */\n    prop?: string;\n};\n\n/**\n * This is a model with one string property\n */\nexport type ModelWithStringError = {\n    /**\n     * This is a simple string property\n     */\n    prop?: string;\n};\n\n/**\n * `Comment` or `VoiceComment`. The JSON object for adding voice comments to tickets is different. See [Adding voice comments to tickets](/documentation/ticketing/managing-tickets/adding-voice-comments-to-tickets)\n */\nexport type ModelFromZendesk = string;\n\n/**\n * This is a model with one string property\n */\nexport type ModelWithNullableString = {\n    /**\n     * This is a simple string property\n     */\n    nullableProp1?: string | null;\n    /**\n     * This is a simple string property\n     */\n    nullableRequiredProp1: string | null;\n    /**\n     * This is a simple string property\n     */\n    nullableProp2?: string | null;\n    /**\n     * This is a simple string property\n     */\n    nullableRequiredProp2: string | null;\n    /**\n     * This is a simple enum with strings\n     */\n    'foo_bar-enum'?: 'Success' | 'Warning' | 'Error' | 'ØÆÅ字符串';\n};\n\n/**\n * This is a model with one enum\n */\nexport type ModelWithEnum = {\n    /**\n     * This is a simple enum with strings\n     */\n    'foo_bar-enum'?: 'Success' | 'Warning' | 'Error' | 'ØÆÅ字符串';\n    /**\n     * These are the HTTP error code enums\n     */\n    statusCode?: '100' | '200 FOO' | '300 FOO_BAR' | '400 foo-bar' | '500 foo.bar' | '600 foo&bar';\n    /**\n     * Simple boolean enum\n     */\n    bool?: true;\n};\n\n/**\n * This is a model with one enum with escaped name\n */\nexport type ModelWithEnumWithHyphen = {\n    /**\n     * Foo-Bar-Baz-Qux\n     */\n    'foo-bar-baz-qux'?: '3.0';\n};\n\n/**\n * This is a model with one enum\n */\nexport type ModelWithEnumFromDescription = {\n    /**\n     * Success=1,Warning=2,Error=3\n     */\n    test?: number;\n};\n\n/**\n * This is a model with nested enums\n */\nexport type ModelWithNestedEnums = {\n    dictionaryWithEnum?: {\n        [key: string]: 'Success' | 'Warning' | 'Error';\n    };\n    dictionaryWithEnumFromDescription?: {\n        [key: string]: number;\n    };\n    arrayWithEnum?: Array<'Success' | 'Warning' | 'Error'>;\n    arrayWithDescription?: Array<number>;\n    /**\n     * This is a simple enum with strings\n     */\n    'foo_bar-enum'?: 'Success' | 'Warning' | 'Error' | 'ØÆÅ字符串';\n};\n\n/**\n * This is a model with one property containing a reference\n */\nexport type ModelWithReference = {\n    prop?: ModelWithProperties;\n};\n\n/**\n * This is a model with one property containing an array\n */\nexport type ModelWithArrayReadOnlyAndWriteOnly = {\n    prop?: Array<ModelWithReadOnlyAndWriteOnly>;\n    propWithFile?: Array<Blob | File>;\n    propWithNumber?: Array<number>;\n};\n\n/**\n * This is a model with one property containing an array\n */\nexport type ModelWithArray = {\n    prop?: Array<ModelWithString>;\n    propWithFile?: Array<Blob | File>;\n    propWithNumber?: Array<number>;\n};\n\n/**\n * This is a model with one property containing a dictionary\n */\nexport type ModelWithDictionary = {\n    prop?: {\n        [key: string]: string;\n    };\n};\n\n/**\n * This is a deprecated model with a deprecated property\n *\n * @deprecated\n */\nexport type DeprecatedModel = {\n    /**\n     * This is a deprecated property\n     *\n     * @deprecated\n     */\n    prop?: string;\n};\n\n/**\n * This is a model with one property containing a circular reference\n */\nexport type ModelWithCircularReference = {\n    prop?: ModelWithCircularReference;\n};\n\n/**\n * This is a model with one property with a 'one of' relationship\n */\nexport type CompositionWithOneOf = {\n    propA?: ModelWithString | ModelWithEnum | ModelWithArray | ModelWithDictionary;\n};\n\n/**\n * This is a model with one property with a 'one of' relationship where the options are not $ref\n */\nexport type CompositionWithOneOfAnonymous = {\n    propA?: {\n        propA?: string;\n    } | string | number;\n};\n\n/**\n * Circle\n */\nexport type ModelCircle = {\n    kind: string;\n    radius?: number;\n};\n\n/**\n * Square\n */\nexport type ModelSquare = {\n    kind: string;\n    sideLength?: number;\n};\n\n/**\n * This is a model with one property with a 'one of' relationship where the options are not $ref\n */\nexport type CompositionWithOneOfDiscriminator = ({\n    kind: 'circle';\n} & ModelCircle) | ({\n    kind: 'square';\n} & ModelSquare);\n\n/**\n * This is a model with one property with a 'any of' relationship\n */\nexport type CompositionWithAnyOf = {\n    propA?: ModelWithString | ModelWithEnum | ModelWithArray | ModelWithDictionary;\n};\n\n/**\n * This is a model with one property with a 'any of' relationship where the options are not $ref\n */\nexport type CompositionWithAnyOfAnonymous = {\n    propA?: {\n        propA?: string;\n    } | string | number;\n};\n\n/**\n * This is a model with nested 'any of' property with a type null\n */\nexport type CompositionWithNestedAnyAndTypeNull = {\n    propA?: Array<ModelWithDictionary | null> | Array<ModelWithArray | null>;\n};\n\nexport type _3eNum1Период = 'Bird' | 'Dog';\n\nexport type ConstValue = 'ConstValue';\n\n/**\n * This is a model with one property with a 'any of' relationship where the options are not $ref\n */\nexport type CompositionWithNestedAnyOfAndNull = {\n    propA?: Array<_3eNum1Период | ConstValue> | null;\n};\n\n/**\n * This is a model with one property with a 'one of' relationship\n */\nexport type CompositionWithOneOfAndNullable = {\n    propA?: {\n        boolean?: boolean;\n    } | ModelWithEnum | ModelWithArray | ModelWithDictionary | null;\n};\n\n/**\n * This is a model that contains a simple dictionary within composition\n */\nexport type CompositionWithOneOfAndSimpleDictionary = {\n    propA?: boolean | {\n        [key: string]: number;\n    };\n};\n\n/**\n * This is a model that contains a dictionary of simple arrays within composition\n */\nexport type CompositionWithOneOfAndSimpleArrayDictionary = {\n    propA?: boolean | {\n        [key: string]: Array<boolean>;\n    };\n};\n\n/**\n * This is a model that contains a dictionary of complex arrays (composited) within composition\n */\nexport type CompositionWithOneOfAndComplexArrayDictionary = {\n    propA?: boolean | {\n        [key: string]: Array<number | string>;\n    };\n};\n\n/**\n * This is a model with one property with a 'all of' relationship\n */\nexport type CompositionWithAllOfAndNullable = {\n    propA?: ({\n        boolean?: boolean;\n    } & ModelWithEnum & ModelWithArray & ModelWithDictionary) | null;\n};\n\n/**\n * This is a model with one property with a 'any of' relationship\n */\nexport type CompositionWithAnyOfAndNullable = {\n    propA?: {\n        boolean?: boolean;\n    } | ModelWithEnum | ModelWithArray | ModelWithDictionary | null;\n};\n\n/**\n * This is a base model with two simple optional properties\n */\nexport type CompositionBaseModel = {\n    firstName?: string;\n    lastname?: string;\n};\n\n/**\n * This is a model that extends the base model\n */\nexport type CompositionExtendedModel = CompositionBaseModel & {\n    age: number;\n    firstName: string;\n    lastname: string;\n};\n\n/**\n * This is a model with one nested property\n */\nexport type ModelWithProperties = {\n    required: string;\n    readonly requiredAndReadOnly: string;\n    requiredAndNullable: string | null;\n    string?: string;\n    number?: number;\n    boolean?: boolean;\n    reference?: ModelWithString;\n    'property with space'?: string;\n    default?: string;\n    try?: string;\n    readonly '@namespace.string'?: string;\n    readonly '@namespace.integer'?: number;\n};\n\n/**\n * This is a model with one nested property\n */\nexport type ModelWithNestedProperties = {\n    readonly first: {\n        readonly second: {\n            readonly third: string | null;\n        } | null;\n    } | null;\n};\n\n/**\n * This is a model with duplicated properties\n */\nexport type ModelWithDuplicateProperties = {\n    prop?: ModelWithString;\n};\n\n/**\n * This is a model with ordered properties\n */\nexport type ModelWithOrderedProperties = {\n    zebra?: string;\n    apple?: string;\n    hawaii?: string;\n};\n\n/**\n * This is a model with duplicated imports\n */\nexport type ModelWithDuplicateImports = {\n    propA?: ModelWithString;\n    propB?: ModelWithString;\n    propC?: ModelWithString;\n};\n\n/**\n * This is a model that extends another model\n */\nexport type ModelThatExtends = ModelWithString & {\n    propExtendsA?: string;\n    propExtendsB?: ModelWithString;\n};\n\n/**\n * This is a model that extends another model\n */\nexport type ModelThatExtendsExtends = ModelWithString & ModelThatExtends & {\n    propExtendsC?: string;\n    propExtendsD?: ModelWithString;\n};\n\n/**\n * This is a model that contains a some patterns\n */\nexport type ModelWithPattern = {\n    key: string;\n    name: string;\n    readonly enabled?: boolean;\n    readonly modified?: string;\n    id?: string;\n    text?: string;\n    patternWithSingleQuotes?: string;\n    patternWithNewline?: string;\n    patternWithBacktick?: string;\n    patternWithUnicode?: string;\n};\n\nexport type File = {\n    /**\n     * Id\n     */\n    readonly id?: string;\n    /**\n     * Updated at\n     */\n    readonly updated_at?: string;\n    /**\n     * Created at\n     */\n    readonly created_at?: string;\n    /**\n     * Mime\n     */\n    mime: string;\n    /**\n     * File\n     */\n    readonly file?: string;\n};\n\nexport type Default = {\n    name?: string;\n};\n\nexport type Pageable = {\n    page?: number;\n    size?: number;\n    sort?: Array<string>;\n};\n\n/**\n * This is a free-form object without additionalProperties.\n */\nexport type FreeFormObjectWithoutAdditionalProperties = {\n    [key: string]: unknown;\n};\n\n/**\n * This is a free-form object with additionalProperties: true.\n */\nexport type FreeFormObjectWithAdditionalPropertiesEqTrue = {\n    [key: string]: unknown;\n};\n\n/**\n * This is a free-form object with additionalProperties: {}.\n */\nexport type FreeFormObjectWithAdditionalPropertiesEqEmptyObject = {\n    [key: string]: unknown;\n};\n\nexport type ModelWithConst = {\n    String?: 'String';\n    number?: 0;\n    null?: unknown;\n    withType?: 'Some string';\n};\n\n/**\n * This is a model with one property and additionalProperties: true\n */\nexport type ModelWithAdditionalPropertiesEqTrue = {\n    /**\n     * This is a simple string property\n     */\n    prop?: string;\n    [key: string]: unknown;\n};\n\nexport type NestedAnyOfArraysNullable = {\n    nullableArray?: Array<string | boolean> | null;\n};\n\nexport type CompositionWithOneOfAndProperties = ({\n    foo: SimpleParameter;\n} | {\n    bar: NonAsciiStringæøåÆøÅöôêÊ字符串;\n}) & {\n    baz: number | null;\n    qux: number;\n};\n\n/**\n * An object that can be null\n */\nexport type NullableObject = {\n    foo?: string;\n} | null;\n\n/**\n * Some % character\n */\nexport type CharactersInDescription = string;\n\nexport type ModelWithNullableObject = {\n    data?: NullableObject;\n};\n\n/**\n * An object with additional properties that can be null\n */\nexport type ModelWithAdditionalPropertiesRef = {\n    [key: string]: NullableObject | null;\n};\n\nexport type ModelWithOneOfEnum = {\n    foo: 'Bar';\n} | {\n    foo: 'Baz';\n} | {\n    foo: 'Qux';\n} | {\n    content: string;\n    foo: 'Quux';\n} | {\n    content: [\n        string,\n        string\n    ];\n    foo: 'Corge';\n};\n\nexport type ModelWithNestedArrayEnumsDataFoo = 'foo' | 'bar';\n\nexport type ModelWithNestedArrayEnumsDataBar = 'baz' | 'qux';\n\nexport type ModelWithNestedArrayEnumsData = {\n    foo?: Array<ModelWithNestedArrayEnumsDataFoo>;\n    bar?: Array<ModelWithNestedArrayEnumsDataBar>;\n};\n\nexport type ModelWithNestedArrayEnums = {\n    array_strings?: Array<string>;\n    data?: ModelWithNestedArrayEnumsData;\n};\n\nexport type ModelWithNestedCompositionEnums = {\n    foo?: ModelWithNestedArrayEnumsDataFoo;\n};\n\nexport type ModelWithReadOnlyAndWriteOnly = {\n    foo: string;\n    readonly bar: string;\n};\n\nexport type ModelWithConstantSizeArray = [\n    number,\n    number\n];\n\nexport type ModelWithAnyOfConstantSizeArray = [\n    number | string,\n    number | string,\n    number | string\n];\n\nexport type ModelWithPrefixItemsConstantSizeArray = Array<ModelWithInteger | number | string>;\n\nexport type ModelWithAnyOfConstantSizeArrayNullable = [\n    number | null | string,\n    number | null | string,\n    number | null | string\n];\n\nexport type ModelWithAnyOfConstantSizeArrayWithNSizeAndOptions = [\n    number | Import,\n    number | Import\n];\n\nexport type ModelWithAnyOfConstantSizeArrayAndIntersect = [\n    number & string,\n    number & string\n];\n\nexport type ModelWithNumericEnumUnion = {\n    /**\n     * Период\n     */\n    value?: -10 | -1 | 0 | 1 | 3 | 6 | 12;\n};\n\n/**\n * Some description with `back ticks`\n */\nexport type ModelWithBackticksInDescription = {\n    /**\n     * The template `that` should be used for parsing and importing the contents of the CSV file.\n     *\n     * <br/><p>There is one placeholder currently supported:<ul>     <li><b>${x}</b> - refers to the n-th column in the CSV file, e.g. ${1}, ${2}, ...)</li></ul><p>Example of a correct JSON template:</p>\n     * <pre>\n     * [\n     * {\n     * \"resourceType\": \"Asset\",\n     * \"identifier\": {\n     * \"name\": \"${1}\",\n     * \"domain\": {\n     * \"name\": \"${2}\",\n     * \"community\": {\n     * \"name\": \"Some Community\"\n     * }\n     * }\n     * },\n     * \"attributes\" : {\n     * \"00000000-0000-0000-0000-000000003115\" : [ {\n     * \"value\" : \"${3}\"\n     * } ],\n     * \"00000000-0000-0000-0000-000000000222\" : [ {\n     * \"value\" : \"${4}\"\n     * } ]\n     * }\n     * }\n     * ]\n     * </pre>\n     */\n    template?: string;\n};\n\nexport type ModelWithOneOfAndProperties = (SimpleParameter | NonAsciiStringæøåÆøÅöôêÊ字符串) & {\n    baz: number | null;\n    qux: number;\n};\n\n/**\n * Model used to test deduplication strategy (unused)\n */\nexport type ParameterSimpleParameterUnused = string;\n\n/**\n * Model used to test deduplication strategy\n */\nexport type PostServiceWithEmptyTagResponse = string;\n\n/**\n * Model used to test deduplication strategy\n */\nexport type PostServiceWithEmptyTagResponse2 = string;\n\n/**\n * Model used to test deduplication strategy\n */\nexport type DeleteFooData = string;\n\n/**\n * Model used to test deduplication strategy\n */\nexport type DeleteFooData2 = string;\n\n/**\n * Model with restricted keyword name\n */\nexport type Import = string;\n\nexport type SchemaWithFormRestrictedKeys = {\n    description?: string;\n    'x-enum-descriptions'?: string;\n    'x-enum-varnames'?: string;\n    'x-enumNames'?: string;\n    title?: string;\n    object?: {\n        description?: string;\n        'x-enum-descriptions'?: string;\n        'x-enum-varnames'?: string;\n        'x-enumNames'?: string;\n        title?: string;\n    };\n    array?: Array<{\n        description?: string;\n        'x-enum-descriptions'?: string;\n        'x-enum-varnames'?: string;\n        'x-enumNames'?: string;\n        title?: string;\n    }>;\n};\n\n/**\n * This schema was giving PascalCase transformations a hard time\n */\nexport type IoK8sApimachineryPkgApisMetaV1DeleteOptions = {\n    /**\n     * Must be fulfilled before a deletion is carried out. If not possible, a 409 Conflict status will be returned.\n     */\n    preconditions?: IoK8sApimachineryPkgApisMetaV1Preconditions;\n};\n\n/**\n * This schema was giving PascalCase transformations a hard time\n */\nexport type IoK8sApimachineryPkgApisMetaV1Preconditions = {\n    /**\n     * Specifies the target ResourceVersion\n     */\n    resourceVersion?: string;\n    /**\n     * Specifies the target UID.\n     */\n    uid?: string;\n};\n\nexport type AdditionalPropertiesUnknownIssue = {\n    [key: string]: string | number;\n};\n\nexport type AdditionalPropertiesUnknownIssue2 = {\n    [key: string]: string | number;\n};\n\nexport type AdditionalPropertiesUnknownIssue3 = string & {\n    entries: {\n        [key: string]: AdditionalPropertiesUnknownIssue;\n    };\n};\n\nexport type AdditionalPropertiesIntegerIssue = {\n    value: number;\n    [key: string]: number;\n};\n\nexport type OneOfAllOfIssue = ((ConstValue | GenericSchemaDuplicateIssue1SystemBoolean) & _3eNum1Период) | GenericSchemaDuplicateIssue1SystemString;\n\nexport type GenericSchemaDuplicateIssue1SystemBoolean = {\n    item?: boolean;\n    error?: string | null;\n    readonly hasError?: boolean;\n    data?: {\n        [key: string]: never;\n    };\n};\n\nexport type GenericSchemaDuplicateIssue1SystemString = {\n    item?: string | null;\n    error?: string | null;\n    readonly hasError?: boolean;\n};\n\nexport type ExternalSharedModel = {\n    id: string;\n    name?: string;\n};\n\n/**\n * This is a model with one property containing a reference\n */\nexport type ModelWithReferenceWritable = {\n    prop?: ModelWithPropertiesWritable;\n};\n\n/**\n * This is a model with one property containing an array\n */\nexport type ModelWithArrayReadOnlyAndWriteOnlyWritable = {\n    prop?: Array<ModelWithReadOnlyAndWriteOnlyWritable>;\n    propWithFile?: Array<Blob | File>;\n    propWithNumber?: Array<number>;\n};\n\n/**\n * This is a model with one nested property\n */\nexport type ModelWithPropertiesWritable = {\n    required: string;\n    requiredAndNullable: string | null;\n    string?: string;\n    number?: number;\n    boolean?: boolean;\n    reference?: ModelWithString;\n    'property with space'?: string;\n    default?: string;\n    try?: string;\n};\n\n/**\n * This is a model that contains a some patterns\n */\nexport type ModelWithPatternWritable = {\n    key: string;\n    name: string;\n    id?: string;\n    text?: string;\n    patternWithSingleQuotes?: string;\n    patternWithNewline?: string;\n    patternWithBacktick?: string;\n    patternWithUnicode?: string;\n};\n\nexport type FileWritable = {\n    /**\n     * Mime\n     */\n    mime: string;\n};\n\nexport type ModelWithReadOnlyAndWriteOnlyWritable = {\n    foo: string;\n    baz: string;\n};\n\nexport type ModelWithAnyOfConstantSizeArrayWithNSizeAndOptionsWritable = [\n    number | Import,\n    number | Import\n];\n\nexport type AdditionalPropertiesUnknownIssueWritable = {\n    [key: string]: string | number;\n};\n\nexport type OneOfAllOfIssueWritable = ((ConstValue | GenericSchemaDuplicateIssue1SystemBoolean) & _3eNum1Период) | GenericSchemaDuplicateIssue1SystemString;\n\nexport type GenericSchemaDuplicateIssue1SystemBooleanWritable = {\n    item?: boolean;\n    error?: string | null;\n    data?: {\n        [key: string]: never;\n    };\n};\n\nexport type GenericSchemaDuplicateIssue1SystemStringWritable = {\n    item?: string | null;\n    error?: string | null;\n};\n\n/**\n * This is a reusable parameter\n */\nexport type SimpleParameter = string;\n\n/**\n * Parameter with illegal characters\n */\nexport type XFooBar = ModelWithString;\n\nexport type SimpleRequestBody = ModelWithString;\n\nexport type SimpleFormData = ModelWithString;\n\nexport type ExportData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no+tag';\n};\n\nexport type PatchApiVbyApiVersionNoTagData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no+tag';\n};\n\nexport type PatchApiVbyApiVersionNoTagResponses = {\n    /**\n     * OK\n     */\n    default: unknown;\n};\n\nexport type ImportData = {\n    body: ModelWithReadOnlyAndWriteOnlyWritable | ModelWithArrayReadOnlyAndWriteOnlyWritable;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no+tag';\n};\n\nexport type ImportResponses = {\n    /**\n     * Success\n     */\n    200: ModelFromZendesk;\n    /**\n     * Default success response\n     */\n    default: ModelWithReadOnlyAndWriteOnly;\n};\n\nexport type ImportResponse = ImportResponses[keyof ImportResponses];\n\nexport type FooWowData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no+tag';\n};\n\nexport type FooWowResponses = {\n    /**\n     * OK\n     */\n    default: unknown;\n};\n\nexport type ApiVVersionODataControllerCountData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple/$count';\n};\n\nexport type ApiVVersionODataControllerCountResponses = {\n    /**\n     * Success\n     */\n    200: ModelFromZendesk;\n};\n\nexport type ApiVVersionODataControllerCountResponse = ApiVVersionODataControllerCountResponses[keyof ApiVVersionODataControllerCountResponses];\n\nexport type GetApiVbyApiVersionSimpleOperationData = {\n    body?: never;\n    path: {\n        /**\n         * foo in method\n         */\n        foo_param: string;\n    };\n    query?: never;\n    url: '/api/v{api-version}/simple:operation';\n};\n\nexport type GetApiVbyApiVersionSimpleOperationErrors = {\n    /**\n     * Default error response\n     */\n    default: ModelWithBoolean;\n};\n\nexport type GetApiVbyApiVersionSimpleOperationError = GetApiVbyApiVersionSimpleOperationErrors[keyof GetApiVbyApiVersionSimpleOperationErrors];\n\nexport type GetApiVbyApiVersionSimpleOperationResponses = {\n    /**\n     * Response is a simple number\n     */\n    200: number;\n};\n\nexport type GetApiVbyApiVersionSimpleOperationResponse = GetApiVbyApiVersionSimpleOperationResponses[keyof GetApiVbyApiVersionSimpleOperationResponses];\n\nexport type DeleteCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type GetCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type HeadCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type OptionsCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type PatchCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type PostCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type PutCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type DeleteFooData3 = {\n    body?: never;\n    headers: {\n        /**\n         * Parameter with illegal characters\n         */\n        'x-Foo-Bar': ModelWithString;\n    };\n    path: {\n        /**\n         * foo in method\n         */\n        foo_param: string;\n        /**\n         * bar in method\n         */\n        BarParam: string;\n    };\n    query?: never;\n    url: '/api/v{api-version}/foo/{foo_param}/bar/{BarParam}';\n};\n\nexport type CallWithDescriptionsData = {\n    body?: never;\n    path?: never;\n    query?: {\n        /**\n         * Testing multiline comments in string: First line\n         * Second line\n         *\n         * Fourth line\n         */\n        parameterWithBreaks?: string;\n        /**\n         * Testing backticks in string: `backticks` and ```multiple backticks``` should work\n         */\n        parameterWithBackticks?: string;\n        /**\n         * Testing slashes in string: \\backwards\\\\\\ and /forwards/// should work\n         */\n        parameterWithSlashes?: string;\n        /**\n         * Testing expression placeholders in string: ${expression} should work\n         */\n        parameterWithExpressionPlaceholders?: string;\n        /**\n         * Testing quotes in string: 'single quote''' and \"double quotes\"\"\" should work\n         */\n        parameterWithQuotes?: string;\n        /**\n         * Testing reserved characters in string: * inline * and ** inline ** should work\n         */\n        parameterWithReservedCharacters?: string;\n    };\n    url: '/api/v{api-version}/descriptions';\n};\n\nexport type DeprecatedCallData = {\n    body?: never;\n    headers: {\n        /**\n         * This parameter is deprecated\n         *\n         * @deprecated\n         */\n        parameter: DeprecatedModel | null;\n    };\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/parameters/deprecated';\n};\n\nexport type CallWithParametersData = {\n    /**\n     * This is the parameter that goes into the body\n     */\n    body: {\n        [key: string]: unknown;\n    } | null;\n    headers: {\n        /**\n         * This is the parameter that goes into the header\n         */\n        parameterHeader: string | null;\n    };\n    path: {\n        /**\n         * This is the parameter that goes into the path\n         */\n        parameterPath: string | null;\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string | null;\n    };\n    query: {\n        foo_ref_enum?: ModelWithNestedArrayEnumsDataFoo;\n        foo_all_of_enum: ModelWithNestedArrayEnumsDataFoo;\n        /**\n         * This is the parameter that goes into the query params\n         */\n        cursor: string | null;\n    };\n    url: '/api/v{api-version}/parameters/{parameterPath}';\n};\n\nexport type CallWithWeirdParameterNamesData = {\n    /**\n     * This is the parameter that goes into the body\n     */\n    body: ModelWithString | null;\n    headers: {\n        /**\n         * This is the parameter that goes into the request header\n         */\n        'parameter.header': string | null;\n    };\n    path: {\n        /**\n         * This is the parameter that goes into the path\n         */\n        'parameter.path.1'?: string;\n        /**\n         * This is the parameter that goes into the path\n         */\n        'parameter-path-2'?: string;\n        /**\n         * This is the parameter that goes into the path\n         */\n        'PARAMETER-PATH-3'?: string;\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string | null;\n    };\n    query: {\n        /**\n         * This is the parameter with a reserved keyword\n         */\n        default?: string;\n        /**\n         * This is the parameter that goes into the request query params\n         */\n        'parameter-query': string | null;\n    };\n    url: '/api/v{api-version}/parameters/{parameter.path.1}/{parameter-path-2}/{PARAMETER-PATH-3}';\n};\n\nexport type GetCallWithOptionalParamData = {\n    /**\n     * This is a required parameter\n     */\n    body: ModelWithOneOfEnum;\n    path?: never;\n    query?: {\n        /**\n         * This is an optional parameter\n         */\n        page?: number;\n    };\n    url: '/api/v{api-version}/parameters';\n};\n\nexport type PostCallWithOptionalParamData = {\n    /**\n     * This is an optional parameter\n     */\n    body?: {\n        offset?: number | null;\n    };\n    path?: never;\n    query: {\n        /**\n         * This is a required parameter\n         */\n        parameter: Pageable;\n    };\n    url: '/api/v{api-version}/parameters';\n};\n\nexport type PostCallWithOptionalParamResponses = {\n    /**\n     * Response is a simple number\n     */\n    200: number;\n    /**\n     * Success\n     */\n    204: void;\n};\n\nexport type PostCallWithOptionalParamResponse = PostCallWithOptionalParamResponses[keyof PostCallWithOptionalParamResponses];\n\nexport type PostApiVbyApiVersionRequestBodyData = {\n    /**\n     * A reusable request body\n     */\n    body?: SimpleRequestBody;\n    path?: never;\n    query?: {\n        /**\n         * This is a reusable parameter\n         */\n        parameter?: string;\n    };\n    url: '/api/v{api-version}/requestBody';\n};\n\nexport type PostApiVbyApiVersionFormDataData = {\n    /**\n     * A reusable request body\n     */\n    body?: SimpleFormData;\n    path?: never;\n    query?: {\n        /**\n         * This is a reusable parameter\n         */\n        parameter?: string;\n    };\n    url: '/api/v{api-version}/formData';\n};\n\nexport type CallWithDefaultParametersData = {\n    body?: never;\n    path?: never;\n    query?: {\n        /**\n         * This is a simple string with default value\n         */\n        parameterString?: string | null;\n        /**\n         * This is a simple number with default value\n         */\n        parameterNumber?: number | null;\n        /**\n         * This is a simple boolean with default value\n         */\n        parameterBoolean?: boolean | null;\n        /**\n         * This is a simple enum with default value\n         */\n        parameterEnum?: 'Success' | 'Warning' | 'Error';\n        /**\n         * This is a simple model with default value\n         */\n        parameterModel?: ModelWithString | null;\n    };\n    url: '/api/v{api-version}/defaults';\n};\n\nexport type CallWithDefaultOptionalParametersData = {\n    body?: never;\n    path?: never;\n    query?: {\n        /**\n         * This is a simple string that is optional with default value\n         */\n        parameterString?: string;\n        /**\n         * This is a simple number that is optional with default value\n         */\n        parameterNumber?: number;\n        /**\n         * This is a simple boolean that is optional with default value\n         */\n        parameterBoolean?: boolean;\n        /**\n         * This is a simple enum that is optional with default value\n         */\n        parameterEnum?: 'Success' | 'Warning' | 'Error';\n        /**\n         * This is a simple model that is optional with default value\n         */\n        parameterModel?: ModelWithString;\n    };\n    url: '/api/v{api-version}/defaults';\n};\n\nexport type CallToTestOrderOfParamsData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * This is a optional string with default\n         */\n        parameterOptionalStringWithDefault?: string;\n        /**\n         * This is a optional string with empty default\n         */\n        parameterOptionalStringWithEmptyDefault?: string;\n        /**\n         * This is a optional string with no default\n         */\n        parameterOptionalStringWithNoDefault?: string;\n        /**\n         * This is a string with default\n         */\n        parameterStringWithDefault: string;\n        /**\n         * This is a string with empty default\n         */\n        parameterStringWithEmptyDefault: string;\n        /**\n         * This is a string with no default\n         */\n        parameterStringWithNoDefault: string;\n        /**\n         * This is a string that can be null with no default\n         */\n        parameterStringNullableWithNoDefault?: string | null;\n        /**\n         * This is a string that can be null with default\n         */\n        parameterStringNullableWithDefault?: string | null;\n    };\n    url: '/api/v{api-version}/defaults';\n};\n\nexport type DuplicateNameData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/duplicate';\n};\n\nexport type DuplicateName2Data = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/duplicate';\n};\n\nexport type DuplicateName3Data = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/duplicate';\n};\n\nexport type DuplicateName4Data = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/duplicate';\n};\n\nexport type CallWithNoContentResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no-content';\n};\n\nexport type CallWithNoContentResponseResponses = {\n    /**\n     * Success\n     */\n    204: void;\n};\n\nexport type CallWithNoContentResponseResponse = CallWithNoContentResponseResponses[keyof CallWithNoContentResponseResponses];\n\nexport type CallWithResponseAndNoContentResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multiple-tags/response-and-no-content';\n};\n\nexport type CallWithResponseAndNoContentResponseResponses = {\n    /**\n     * Response is a simple number\n     */\n    200: number;\n    /**\n     * Success\n     */\n    204: void;\n};\n\nexport type CallWithResponseAndNoContentResponseResponse = CallWithResponseAndNoContentResponseResponses[keyof CallWithResponseAndNoContentResponseResponses];\n\nexport type DummyAData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multiple-tags/a';\n};\n\nexport type DummyAResponses = {\n    200: _400;\n};\n\nexport type DummyAResponse = DummyAResponses[keyof DummyAResponses];\n\nexport type DummyBData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multiple-tags/b';\n};\n\nexport type DummyBResponses = {\n    /**\n     * Success\n     */\n    204: void;\n};\n\nexport type DummyBResponse = DummyBResponses[keyof DummyBResponses];\n\nexport type CallWithResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/response';\n};\n\nexport type CallWithResponseResponses = {\n    default: Import;\n};\n\nexport type CallWithResponseResponse = CallWithResponseResponses[keyof CallWithResponseResponses];\n\nexport type CallWithDuplicateResponsesData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/response';\n};\n\nexport type CallWithDuplicateResponsesErrors = {\n    /**\n     * Message for 500 error\n     */\n    500: ModelWithStringError;\n    /**\n     * Message for 501 error\n     */\n    501: ModelWithStringError;\n    /**\n     * Message for 502 error\n     */\n    502: ModelWithStringError;\n    /**\n     * Message for 4XX errors\n     */\n    '4XX': DictionaryWithArray;\n    /**\n     * Default error response\n     */\n    default: ModelWithBoolean;\n};\n\nexport type CallWithDuplicateResponsesError = CallWithDuplicateResponsesErrors[keyof CallWithDuplicateResponsesErrors];\n\nexport type CallWithDuplicateResponsesResponses = {\n    /**\n     * Message for 200 response\n     */\n    200: ModelWithBoolean & ModelWithInteger;\n    /**\n     * Message for 201 response\n     */\n    201: ModelWithString;\n    /**\n     * Message for 202 response\n     */\n    202: ModelWithString;\n};\n\nexport type CallWithDuplicateResponsesResponse = CallWithDuplicateResponsesResponses[keyof CallWithDuplicateResponsesResponses];\n\nexport type CallWithResponsesData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/response';\n};\n\nexport type CallWithResponsesErrors = {\n    /**\n     * Message for 500 error\n     */\n    500: ModelWithStringError;\n    /**\n     * Message for 501 error\n     */\n    501: ModelWithStringError;\n    /**\n     * Message for 502 error\n     */\n    502: ModelWithStringError;\n    /**\n     * Message for default response\n     */\n    default: ModelWithStringError;\n};\n\nexport type CallWithResponsesError = CallWithResponsesErrors[keyof CallWithResponsesErrors];\n\nexport type CallWithResponsesResponses = {\n    /**\n     * Message for 200 response\n     */\n    200: {\n        readonly '@namespace.string'?: string;\n        readonly '@namespace.integer'?: number;\n        readonly value?: Array<ModelWithString>;\n    };\n    /**\n     * Message for 201 response\n     */\n    201: ModelThatExtends;\n    /**\n     * Message for 202 response\n     */\n    202: ModelThatExtendsExtends;\n};\n\nexport type CallWithResponsesResponse = CallWithResponsesResponses[keyof CallWithResponsesResponses];\n\nexport type CollectionFormatData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * This is an array parameter that is sent as csv format (comma-separated values)\n         */\n        parameterArrayCSV: Array<string> | null;\n        /**\n         * This is an array parameter that is sent as ssv format (space-separated values)\n         */\n        parameterArraySSV: Array<string> | null;\n        /**\n         * This is an array parameter that is sent as tsv format (tab-separated values)\n         */\n        parameterArrayTSV: Array<string> | null;\n        /**\n         * This is an array parameter that is sent as pipes format (pipe-separated values)\n         */\n        parameterArrayPipes: Array<string> | null;\n        /**\n         * This is an array parameter that is sent as multi format (multiple parameter instances)\n         */\n        parameterArrayMulti: Array<string> | null;\n    };\n    url: '/api/v{api-version}/collectionFormat';\n};\n\nexport type TypesData = {\n    body?: never;\n    path?: {\n        /**\n         * This is a number parameter\n         */\n        id?: number;\n    };\n    query: {\n        /**\n         * This is a number parameter\n         */\n        parameterNumber: number;\n        /**\n         * This is a string parameter\n         */\n        parameterString: string | null;\n        /**\n         * This is a boolean parameter\n         */\n        parameterBoolean: boolean | null;\n        /**\n         * This is an object parameter\n         */\n        parameterObject: {\n            [key: string]: unknown;\n        } | null;\n        /**\n         * This is an array parameter\n         */\n        parameterArray: Array<string> | null;\n        /**\n         * This is a dictionary parameter\n         */\n        parameterDictionary: {\n            [key: string]: unknown;\n        } | null;\n        /**\n         * This is an enum parameter\n         */\n        parameterEnum: 'Success' | 'Warning' | 'Error';\n    };\n    url: '/api/v{api-version}/types';\n};\n\nexport type TypesResponses = {\n    /**\n     * Response is a simple number\n     */\n    200: number;\n    /**\n     * Response is a simple string\n     */\n    201: string;\n    /**\n     * Response is a simple boolean\n     */\n    202: boolean;\n    /**\n     * Response is a simple object\n     */\n    203: {\n        [key: string]: unknown;\n    };\n};\n\nexport type TypesResponse = TypesResponses[keyof TypesResponses];\n\nexport type UploadFileData = {\n    body: Blob | File;\n    path: {\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string | null;\n    };\n    query?: never;\n    url: '/api/v{api-version}/upload';\n};\n\nexport type UploadFileResponses = {\n    200: boolean;\n};\n\nexport type UploadFileResponse = UploadFileResponses[keyof UploadFileResponses];\n\nexport type FileResponseData = {\n    body?: never;\n    path: {\n        id: string;\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string;\n    };\n    query?: never;\n    url: '/api/v{api-version}/file/{id}';\n};\n\nexport type FileResponseResponses = {\n    /**\n     * Success\n     */\n    200: Blob | File;\n};\n\nexport type FileResponseResponse = FileResponseResponses[keyof FileResponseResponses];\n\nexport type ComplexTypesData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * Parameter containing object\n         */\n        parameterObject: {\n            first?: {\n                second?: {\n                    third?: string;\n                };\n            };\n        };\n        /**\n         * Parameter containing reference\n         */\n        parameterReference: ModelWithString;\n    };\n    url: '/api/v{api-version}/complex';\n};\n\nexport type ComplexTypesErrors = {\n    /**\n     * 400 `server` error\n     */\n    400: unknown;\n    /**\n     * 500 server error\n     */\n    500: unknown;\n};\n\nexport type ComplexTypesResponses = {\n    /**\n     * Successful response\n     */\n    200: Array<ModelWithString>;\n};\n\nexport type ComplexTypesResponse = ComplexTypesResponses[keyof ComplexTypesResponses];\n\nexport type MultipartResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multipart';\n};\n\nexport type MultipartResponseResponses = {\n    /**\n     * OK\n     */\n    200: {\n        file?: Blob | File;\n        metadata?: {\n            foo?: string;\n            bar?: string;\n        };\n    };\n};\n\nexport type MultipartResponseResponse = MultipartResponseResponses[keyof MultipartResponseResponses];\n\nexport type MultipartRequestData = {\n    body?: {\n        content?: Blob | File;\n        data?: ModelWithString | null;\n    };\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multipart';\n};\n\nexport type ComplexParamsData = {\n    body?: {\n        readonly key: string | null;\n        name: string | null;\n        enabled?: boolean;\n        type: 'Monkey' | 'Horse' | 'Bird';\n        listOfModels?: Array<ModelWithString> | null;\n        listOfStrings?: Array<string> | null;\n        parameters: ModelWithString | ModelWithEnum | ModelWithArray | ModelWithDictionary;\n        readonly user?: {\n            readonly id?: number;\n            readonly name?: string | null;\n        };\n    };\n    path: {\n        id: number;\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string;\n    };\n    query?: never;\n    url: '/api/v{api-version}/complex/{id}';\n};\n\nexport type ComplexParamsResponses = {\n    /**\n     * Success\n     */\n    200: ModelWithString;\n};\n\nexport type ComplexParamsResponse = ComplexParamsResponses[keyof ComplexParamsResponses];\n\nexport type CallWithResultFromHeaderData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/header';\n};\n\nexport type CallWithResultFromHeaderErrors = {\n    /**\n     * 400 server error\n     */\n    400: unknown;\n    /**\n     * 500 server error\n     */\n    500: unknown;\n};\n\nexport type CallWithResultFromHeaderResponses = {\n    /**\n     * Successful response\n     */\n    200: unknown;\n};\n\nexport type TestErrorCodeData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * Status code to return\n         */\n        status: number;\n    };\n    url: '/api/v{api-version}/error';\n};\n\nexport type TestErrorCodeErrors = {\n    /**\n     * Custom message: Internal Server Error\n     */\n    500: unknown;\n    /**\n     * Custom message: Not Implemented\n     */\n    501: unknown;\n    /**\n     * Custom message: Bad Gateway\n     */\n    502: unknown;\n    /**\n     * Custom message: Service Unavailable\n     */\n    503: unknown;\n};\n\nexport type TestErrorCodeResponses = {\n    /**\n     * Custom message: Successful response\n     */\n    200: unknown;\n};\n\nexport type NonAsciiæøåÆøÅöôêÊ字符串Data = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * Dummy input param\n         */\n        nonAsciiParamæøåÆØÅöôêÊ: number;\n    };\n    url: '/api/v{api-version}/non-ascii-æøåÆØÅöôêÊ字符串';\n};\n\nexport type NonAsciiæøåÆøÅöôêÊ字符串Responses = {\n    /**\n     * Successful response\n     */\n    200: Array<NonAsciiStringæøåÆøÅöôêÊ字符串>;\n};\n\nexport type NonAsciiæøåÆøÅöôêÊ字符串Response = NonAsciiæøåÆøÅöôêÊ字符串Responses[keyof NonAsciiæøåÆøÅöôêÊ字符串Responses];\n\nexport type PutWithFormUrlEncodedData = {\n    body: ArrayWithStrings;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/non-ascii-æøåÆØÅöôêÊ字符串';\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/solid-query/name-builder/@tanstack/solid-query.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport { type DefaultError, type MutationOptions, queryOptions } from '@tanstack/solid-query';\n\nimport { client } from '../client.gen';\nimport { fooBarPost, fooBarPut, fooPost, fooPut, getFoo, getFooBar, type Options } from '../sdk.gen';\nimport type { FooBarPostData, FooBarPostResponse, FooBarPutData, FooBarPutResponse, FooPostData, FooPostResponse, FooPutData, FooPutResponse, GetFooBarData, GetFooBarResponse, GetFooData, GetFooResponse } from '../types.gen';\n\nexport type QueryKey<TOptions extends Options> = [\n    Pick<TOptions, 'baseUrl' | 'body' | 'headers' | 'path' | 'query'> & {\n        _id: string;\n        _infinite?: boolean;\n        tags?: ReadonlyArray<string>;\n    }\n];\n\nconst createQueryKey = <TOptions extends Options>(id: string, options?: TOptions, infinite?: boolean, tags?: ReadonlyArray<string>): [\n    QueryKey<TOptions>[0]\n] => {\n    const params: QueryKey<TOptions>[0] = { _id: id, baseUrl: options?.baseUrl || (options?.client ?? client).getConfig().baseUrl } as QueryKey<TOptions>[0];\n    if (infinite) {\n        params._infinite = infinite;\n    }\n    if (tags) {\n        params.tags = tags;\n    }\n    if (options?.body) {\n        params.body = options.body;\n    }\n    if (options?.headers) {\n        params.headers = options.headers;\n    }\n    if (options?.path) {\n        params.path = options.path;\n    }\n    if (options?.query) {\n        params.query = options.query;\n    }\n    return [params];\n};\n\nexport const getFooD = (options?: Options<GetFooData>) => createQueryKey('getFoo', options);\n\nexport const getFooE = (options?: Options<GetFooData>) => queryOptions<GetFooResponse, DefaultError, GetFooResponse, ReturnType<typeof getFooD>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await getFoo({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: getFooD(options)\n});\n\nexport const fooPostC = (options?: Partial<Options<FooPostData>>): MutationOptions<FooPostResponse, DefaultError, Options<FooPostData>> => {\n    const mutationOptions: MutationOptions<FooPostResponse, DefaultError, Options<FooPostData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await fooPost({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const fooPutC = (options?: Partial<Options<FooPutData>>): MutationOptions<FooPutResponse, DefaultError, Options<FooPutData>> => {\n    const mutationOptions: MutationOptions<FooPutResponse, DefaultError, Options<FooPutData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await fooPut({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const getFooBarD = (options?: Options<GetFooBarData>) => createQueryKey('getFooBar', options);\n\nexport const getFooBarE = (options?: Options<GetFooBarData>) => queryOptions<GetFooBarResponse, DefaultError, GetFooBarResponse, ReturnType<typeof getFooBarD>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await getFooBar({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: getFooBarD(options)\n});\n\nexport const fooBarPostC = (options?: Partial<Options<FooBarPostData>>): MutationOptions<FooBarPostResponse, DefaultError, Options<FooBarPostData>> => {\n    const mutationOptions: MutationOptions<FooBarPostResponse, DefaultError, Options<FooBarPostData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await fooBarPost({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const fooBarPutC = (options?: Partial<Options<FooBarPutData>>): MutationOptions<FooBarPutResponse, DefaultError, Options<FooBarPutData>> => {\n    const mutationOptions: MutationOptions<FooBarPutResponse, DefaultError, Options<FooBarPutData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await fooBarPut({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/solid-query/name-builder/client/client.gen.ts",
    "content": "// 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 (options: RequestOptions) => {\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 url = buildUrl(opts);\n\n    return { opts, url };\n  };\n\n  const request: Client['request'] = async (options) => {\n    // @ts-expect-error\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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/solid-query/name-builder/client/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type { Auth } from '../core/auth.gen';\nexport type { QuerySerializerOptions } from '../core/bodySerializer.gen';\nexport {\n  formDataBodySerializer,\n  jsonBodySerializer,\n  urlSearchParamsBodySerializer,\n} from '../core/bodySerializer.gen';\nexport { buildClientParams } from '../core/params.gen';\nexport { serializeQueryKeyValue } from '../core/queryKeySerializer.gen';\nexport { createClient } from './client.gen';\nexport type {\n  Client,\n  ClientOptions,\n  Config,\n  CreateClientConfig,\n  Options,\n  RequestOptions,\n  RequestResult,\n  ResolvedRequestOptions,\n  ResponseStyle,\n  TDataShape,\n} from './types.gen';\nexport { createConfig, mergeHeaders } from './utils.gen';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/solid-query/name-builder/client/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { Auth } from '../core/auth.gen';\nimport type {\n  ServerSentEventsOptions,\n  ServerSentEventsResult,\n} from '../core/serverSentEvents.gen';\nimport type { Client as CoreClient, Config as CoreConfig } from '../core/types.gen';\nimport type { Middleware } from './utils.gen';\n\nexport type ResponseStyle = 'data' | 'fields';\n\nexport interface Config<T extends ClientOptions = ClientOptions>\n  extends Omit<RequestInit, 'body' | 'headers' | 'method'>, CoreConfig {\n  /**\n   * Base URL for all requests made by this client.\n   */\n  baseUrl?: T['baseUrl'];\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   * Please don't use the Fetch client for Next.js applications. The `next`\n   * options won't have any effect.\n   *\n   * Install {@link https://www.npmjs.com/package/@hey-api/client-next `@hey-api/client-next`} instead.\n   */\n  next?: never;\n  /**\n   * Return the response data parsed in a specified format. By default, `auto`\n   * will infer the appropriate method from the `Content-Type` response header.\n   * You can override this behavior with any of the {@link Body} methods.\n   * Select `stream` if you don't want to parse response data at all.\n   *\n   * @default 'auto'\n   */\n  parseAs?: 'arrayBuffer' | 'auto' | 'blob' | 'formData' | 'json' | 'stream' | 'text';\n  /**\n   * Should we return only data or multiple fields (data, error, response, etc.)?\n   *\n   * @default 'fields'\n   */\n  responseStyle?: ResponseStyle;\n  /**\n   * Throw an error instead of returning it in the response?\n   *\n   * @default false\n   */\n  throwOnError?: T['throwOnError'];\n}\n\nexport interface RequestOptions<\n  TData = unknown,\n  TResponseStyle extends ResponseStyle = 'fields',\n  ThrowOnError extends boolean = boolean,\n  Url extends string = string,\n>\n  extends\n    Config<{\n      responseStyle: TResponseStyle;\n      throwOnError: ThrowOnError;\n    }>,\n    Pick<\n      ServerSentEventsOptions<TData>,\n      | 'onRequest'\n      | 'onSseError'\n      | 'onSseEvent'\n      | 'sseDefaultRetryDelay'\n      | 'sseMaxRetryAttempts'\n      | 'sseMaxRetryDelay'\n    > {\n  /**\n   * Any body that you want to add to your request.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/fetch#body}\n   */\n  body?: unknown;\n  path?: Record<string, unknown>;\n  query?: Record<string, unknown>;\n  /**\n   * Security mechanism(s) to use for the request.\n   */\n  security?: ReadonlyArray<Auth>;\n  url: Url;\n}\n\nexport interface ResolvedRequestOptions<\n  TResponseStyle extends ResponseStyle = 'fields',\n  ThrowOnError extends boolean = boolean,\n  Url extends string = string,\n> extends RequestOptions<unknown, TResponseStyle, ThrowOnError, Url> {\n  serializedBody?: string;\n}\n\nexport type RequestResult<\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = boolean,\n  TResponseStyle extends ResponseStyle = 'fields',\n> = ThrowOnError extends true\n  ? Promise<\n      TResponseStyle extends 'data'\n        ? TData extends Record<string, unknown>\n          ? TData[keyof TData]\n          : TData\n        : {\n            data: TData extends Record<string, unknown> ? TData[keyof TData] : TData;\n            request: Request;\n            response: Response;\n          }\n    >\n  : Promise<\n      TResponseStyle extends 'data'\n        ? (TData extends Record<string, unknown> ? TData[keyof TData] : TData) | undefined\n        : (\n            | {\n                data: TData extends Record<string, unknown> ? TData[keyof TData] : TData;\n                error: undefined;\n              }\n            | {\n                data: undefined;\n                error: TError extends Record<string, unknown> ? TError[keyof TError] : TError;\n              }\n          ) & {\n            request: Request;\n            response: Response;\n          }\n    >;\n\nexport interface ClientOptions {\n  baseUrl?: string;\n  responseStyle?: ResponseStyle;\n  throwOnError?: boolean;\n}\n\ntype MethodFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'>,\n) => RequestResult<TData, TError, ThrowOnError, TResponseStyle>;\n\ntype SseFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'>,\n) => Promise<ServerSentEventsResult<TData, TError>>;\n\ntype RequestFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'> &\n    Pick<Required<RequestOptions<TData, TResponseStyle, ThrowOnError>>, 'method'>,\n) => RequestResult<TData, TError, ThrowOnError, TResponseStyle>;\n\ntype BuildUrlFn = <\n  TData extends {\n    body?: unknown;\n    path?: Record<string, unknown>;\n    query?: Record<string, unknown>;\n    url: string;\n  },\n>(\n  options: TData & Options<TData>,\n) => string;\n\nexport type Client = CoreClient<RequestFn, Config, MethodFn, BuildUrlFn, SseFn> & {\n  interceptors: Middleware<Request, Response, unknown, ResolvedRequestOptions>;\n};\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 = ClientOptions> = (\n  override?: Config<ClientOptions & T>,\n) => Config<Required<ClientOptions> & T>;\n\nexport interface TDataShape {\n  body?: unknown;\n  headers?: unknown;\n  path?: unknown;\n  query?: unknown;\n  url: string;\n}\n\ntype OmitKeys<T, K> = Pick<T, Exclude<keyof T, K>>;\n\nexport type Options<\n  TData extends TDataShape = TDataShape,\n  ThrowOnError extends boolean = boolean,\n  TResponse = unknown,\n  TResponseStyle extends ResponseStyle = 'fields',\n> = OmitKeys<\n  RequestOptions<TResponse, TResponseStyle, ThrowOnError>,\n  'body' | 'path' | 'query' | 'url'\n> &\n  ([TData] extends [never] ? unknown : Omit<TData, 'url'>);\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/solid-query/name-builder/client/utils.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/solid-query/name-builder/client.gen.ts",
    "content": "// 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>());\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/solid-query/name-builder/core/auth.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/solid-query/name-builder/core/bodySerializer.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/solid-query/name-builder/core/params.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/solid-query/name-builder/core/pathSerializer.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/solid-query/name-builder/core/queryKeySerializer.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\n/**\n * JSON-friendly union that mirrors what Pinia Colada can hash.\n */\nexport type JsonValue =\n  | null\n  | string\n  | number\n  | boolean\n  | JsonValue[]\n  | { [key: string]: JsonValue };\n\n/**\n * Replacer that converts non-JSON values (bigint, Date, etc.) to safe substitutes.\n */\nexport const queryKeyJsonReplacer = (_key: string, value: unknown) => {\n  if (value === undefined || typeof value === 'function' || typeof value === 'symbol') {\n    return undefined;\n  }\n  if (typeof value === 'bigint') {\n    return value.toString();\n  }\n  if (value instanceof Date) {\n    return value.toISOString();\n  }\n  return value;\n};\n\n/**\n * Safely stringifies a value and parses it back into a JsonValue.\n */\nexport const stringifyToJsonValue = (input: unknown): JsonValue | undefined => {\n  try {\n    const json = JSON.stringify(input, queryKeyJsonReplacer);\n    if (json === undefined) {\n      return undefined;\n    }\n    return JSON.parse(json) as JsonValue;\n  } catch {\n    return undefined;\n  }\n};\n\n/**\n * Detects plain objects (including objects with a null prototype).\n */\nconst isPlainObject = (value: unknown): value is Record<string, unknown> => {\n  if (value === null || typeof value !== 'object') {\n    return false;\n  }\n  const prototype = Object.getPrototypeOf(value as object);\n  return prototype === Object.prototype || prototype === null;\n};\n\n/**\n * Turns URLSearchParams into a sorted JSON object for deterministic keys.\n */\nconst serializeSearchParams = (params: URLSearchParams): JsonValue => {\n  const entries = Array.from(params.entries()).sort(([a], [b]) => a.localeCompare(b));\n  const result: Record<string, JsonValue> = {};\n\n  for (const [key, value] of entries) {\n    const existing = result[key];\n    if (existing === undefined) {\n      result[key] = value;\n      continue;\n    }\n\n    if (Array.isArray(existing)) {\n      (existing as string[]).push(value);\n    } else {\n      result[key] = [existing, value];\n    }\n  }\n\n  return result;\n};\n\n/**\n * Normalizes any accepted value into a JSON-friendly shape for query keys.\n */\nexport const serializeQueryKeyValue = (value: unknown): JsonValue | undefined => {\n  if (value === null) {\n    return null;\n  }\n\n  if (typeof value === 'string' || typeof value === 'number' || typeof value === 'boolean') {\n    return value;\n  }\n\n  if (value === undefined || typeof value === 'function' || typeof value === 'symbol') {\n    return undefined;\n  }\n\n  if (typeof value === 'bigint') {\n    return value.toString();\n  }\n\n  if (value instanceof Date) {\n    return value.toISOString();\n  }\n\n  if (Array.isArray(value)) {\n    return stringifyToJsonValue(value);\n  }\n\n  if (typeof URLSearchParams !== 'undefined' && value instanceof URLSearchParams) {\n    return serializeSearchParams(value);\n  }\n\n  if (isPlainObject(value)) {\n    return stringifyToJsonValue(value);\n  }\n\n  return undefined;\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/solid-query/name-builder/core/serverSentEvents.gen.ts",
    "content": "// 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 const 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            // Normalize line endings: CRLF -> LF, then CR -> LF\n            buffer = buffer.replace(/\\r\\n/g, '\\n').replace(/\\r/g, '\\n');\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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/solid-query/name-builder/core/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { Auth, AuthToken } from './auth.gen';\nimport type { BodySerializer, QuerySerializer, QuerySerializerOptions } from './bodySerializer.gen';\n\nexport type HttpMethod =\n  | 'connect'\n  | 'delete'\n  | 'get'\n  | 'head'\n  | 'options'\n  | 'patch'\n  | 'post'\n  | 'put'\n  | 'trace';\n\nexport type Client<\n  RequestFn = never,\n  Config = unknown,\n  MethodFn = never,\n  BuildUrlFn = never,\n  SseFn = never,\n> = {\n  /**\n   * Returns the final request URL.\n   */\n  buildUrl: BuildUrlFn;\n  getConfig: () => Config;\n  request: RequestFn;\n  setConfig: (config: Config) => Config;\n} & {\n  [K in HttpMethod]: MethodFn;\n} & ([SseFn] extends [never] ? { sse?: never } : { sse: { [K in HttpMethod]: SseFn } });\n\nexport interface Config {\n  /**\n   * Auth token or a function returning auth token. The resolved value will be\n   * added to the request payload as defined by its `security` array.\n   */\n  auth?: ((auth: Auth) => Promise<AuthToken> | AuthToken) | AuthToken;\n  /**\n   * A function for serializing request body parameter. By default,\n   * {@link JSON.stringify()} will be used.\n   */\n  bodySerializer?: BodySerializer | null;\n  /**\n   * An object containing any HTTP headers that you want to pre-populate your\n   * `Headers` object with.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/Headers/Headers#init See more}\n   */\n  headers?:\n    | RequestInit['headers']\n    | Record<\n        string,\n        string | number | boolean | (string | number | boolean)[] | null | undefined | unknown\n      >;\n  /**\n   * The request method.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/fetch#method See more}\n   */\n  method?: Uppercase<HttpMethod>;\n  /**\n   * A function for serializing request query parameters. By default, arrays\n   * will be exploded in form style, objects will be exploded in deepObject\n   * style, and reserved characters are percent-encoded.\n   *\n   * This method will have no effect if the native `paramsSerializer()` Axios\n   * API function is used.\n   *\n   * {@link https://swagger.io/docs/specification/serialization/#query View examples}\n   */\n  querySerializer?: QuerySerializer | QuerySerializerOptions;\n  /**\n   * A function validating request data. This is useful if you want to ensure\n   * the request conforms to the desired shape, so it can be safely sent to\n   * the server.\n   */\n  requestValidator?: (data: unknown) => Promise<unknown>;\n  /**\n   * A function transforming response data before it's returned. This is useful\n   * for post-processing data, e.g. converting ISO strings into Date objects.\n   */\n  responseTransformer?: (data: unknown) => Promise<unknown>;\n  /**\n   * A function validating response data. This is useful if you want to ensure\n   * the response conforms to the desired shape, so it can be safely passed to\n   * the transformers and returned to the user.\n   */\n  responseValidator?: (data: unknown) => Promise<unknown>;\n}\n\ntype IsExactlyNeverOrNeverUndefined<T> = [T] extends [never]\n  ? true\n  : [T] extends [never | undefined]\n    ? [undefined] extends [T]\n      ? false\n      : true\n    : false;\n\nexport type OmitNever<T extends Record<string, unknown>> = {\n  [K in keyof T as IsExactlyNeverOrNeverUndefined<T[K]> extends true ? never : K]: T[K];\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/solid-query/name-builder/core/utils.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/solid-query/name-builder/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport { fooBarPost, fooBarPut, fooPost, fooPut, getFoo, getFooBar, type Options } from './sdk.gen';\nexport type { ClientOptions, FooBarPostData, FooBarPostResponse, FooBarPostResponses, FooBarPutData, FooBarPutResponse, FooBarPutResponses, FooPostData, FooPostResponse, FooPostResponses, FooPutData, FooPutResponse, FooPutResponses, GetFooBarData, GetFooBarResponse, GetFooBarResponses, GetFooData, GetFooResponse, GetFooResponses } from './types.gen';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/solid-query/name-builder/sdk.gen.ts",
    "content": "// 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 { FooBarPostData, FooBarPostResponses, FooBarPutData, FooBarPutResponses, FooPostData, FooPostResponses, FooPutData, FooPutResponses, GetFooBarData, GetFooBarResponses, GetFooData, GetFooResponses } from './types.gen';\n\nexport type Options<TData extends TDataShape = TDataShape, ThrowOnError extends boolean = boolean> = Options2<TData, ThrowOnError> & {\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\nexport const getFoo = <ThrowOnError extends boolean = false>(options?: Options<GetFooData, ThrowOnError>) => (options?.client ?? client).get<GetFooResponses, unknown, ThrowOnError>({ url: '/foo', ...options });\n\nexport const fooPost = <ThrowOnError extends boolean = false>(options?: Options<FooPostData, ThrowOnError>) => (options?.client ?? client).post<FooPostResponses, unknown, ThrowOnError>({ url: '/foo', ...options });\n\nexport const fooPut = <ThrowOnError extends boolean = false>(options?: Options<FooPutData, ThrowOnError>) => (options?.client ?? client).put<FooPutResponses, unknown, ThrowOnError>({ url: '/foo', ...options });\n\nexport const getFooBar = <ThrowOnError extends boolean = false>(options?: Options<GetFooBarData, ThrowOnError>) => (options?.client ?? client).get<GetFooBarResponses, unknown, ThrowOnError>({ url: '/foo/bar', ...options });\n\nexport const fooBarPost = <ThrowOnError extends boolean = false>(options?: Options<FooBarPostData, ThrowOnError>) => (options?.client ?? client).post<FooBarPostResponses, unknown, ThrowOnError>({ url: '/foo/bar', ...options });\n\nexport const fooBarPut = <ThrowOnError extends boolean = false>(options?: Options<FooBarPutData, ThrowOnError>) => (options?.client ?? client).put<FooBarPutResponses, unknown, ThrowOnError>({ url: '/foo/bar', ...options });\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/solid-query/name-builder/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type ClientOptions = {\n    baseUrl: `${string}://${string}` | (string & {});\n};\n\nexport type GetFooData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/foo';\n};\n\nexport type GetFooResponses = {\n    /**\n     * OK\n     */\n    200: string;\n};\n\nexport type GetFooResponse = GetFooResponses[keyof GetFooResponses];\n\nexport type FooPostData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/foo';\n};\n\nexport type FooPostResponses = {\n    /**\n     * OK\n     */\n    200: string;\n};\n\nexport type FooPostResponse = FooPostResponses[keyof FooPostResponses];\n\nexport type FooPutData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/foo';\n};\n\nexport type FooPutResponses = {\n    /**\n     * OK\n     */\n    200: string;\n};\n\nexport type FooPutResponse = FooPutResponses[keyof FooPutResponses];\n\nexport type GetFooBarData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/foo/bar';\n};\n\nexport type GetFooBarResponses = {\n    /**\n     * OK\n     */\n    200: string;\n};\n\nexport type GetFooBarResponse = GetFooBarResponses[keyof GetFooBarResponses];\n\nexport type FooBarPostData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/foo/bar';\n};\n\nexport type FooBarPostResponses = {\n    /**\n     * OK\n     */\n    200: string;\n};\n\nexport type FooBarPostResponse = FooBarPostResponses[keyof FooBarPostResponses];\n\nexport type FooBarPutData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/foo/bar';\n};\n\nexport type FooBarPutResponses = {\n    /**\n     * OK\n     */\n    200: string;\n};\n\nexport type FooBarPutResponse = FooBarPutResponses[keyof FooBarPutResponses];\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/svelte-query/asClass/@tanstack/svelte-query.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport { type DefaultError, type MutationOptions, queryOptions } from '@tanstack/svelte-query';\n\nimport { client } from '../client.gen';\nimport { BarBazService, BarService, FooBazService, FooService, type Options } from '../sdk.gen';\nimport type { FooBarPostData, FooBarPostResponse, FooBarPutData, FooBarPutResponse, FooPostData, FooPostResponse, FooPutData, FooPutResponse, GetFooBarData, GetFooBarResponse, GetFooData, GetFooResponse } from '../types.gen';\n\nexport type QueryKey<TOptions extends Options> = [\n    Pick<TOptions, 'baseUrl' | 'body' | 'headers' | 'path' | 'query'> & {\n        _id: string;\n        _infinite?: boolean;\n        tags?: ReadonlyArray<string>;\n    }\n];\n\nconst createQueryKey = <TOptions extends Options>(id: string, options?: TOptions, infinite?: boolean, tags?: ReadonlyArray<string>): [\n    QueryKey<TOptions>[0]\n] => {\n    const params: QueryKey<TOptions>[0] = { _id: id, baseUrl: options?.baseUrl || (options?.client ?? client).getConfig().baseUrl } as QueryKey<TOptions>[0];\n    if (infinite) {\n        params._infinite = infinite;\n    }\n    if (tags) {\n        params.tags = tags;\n    }\n    if (options?.body) {\n        params.body = options.body;\n    }\n    if (options?.headers) {\n        params.headers = options.headers;\n    }\n    if (options?.path) {\n        params.path = options.path;\n    }\n    if (options?.query) {\n        params.query = options.query;\n    }\n    return [params];\n};\n\nexport const getFooQueryKey = (options?: Options<GetFooData>) => createQueryKey('getFoo', options);\n\nexport const getFooOptions = (options?: Options<GetFooData>) => queryOptions<GetFooResponse, DefaultError, GetFooResponse, ReturnType<typeof getFooQueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await FooBazService.getFoo({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: getFooQueryKey(options)\n});\n\nexport const fooPostMutation = (options?: Partial<Options<FooPostData>>): MutationOptions<FooPostResponse, DefaultError, Options<FooPostData>> => {\n    const mutationOptions: MutationOptions<FooPostResponse, DefaultError, Options<FooPostData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await FooService.post({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const fooPutMutation = (options?: Partial<Options<FooPutData>>): MutationOptions<FooPutResponse, DefaultError, Options<FooPutData>> => {\n    const mutationOptions: MutationOptions<FooPutResponse, DefaultError, Options<FooPutData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await FooService.put({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const getFooBarQueryKey = (options?: Options<GetFooBarData>) => createQueryKey('getFooBar', options);\n\nexport const getFooBarOptions = (options?: Options<GetFooBarData>) => queryOptions<GetFooBarResponse, DefaultError, GetFooBarResponse, ReturnType<typeof getFooBarQueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await BarBazService.getFooBar({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: getFooBarQueryKey(options)\n});\n\nexport const fooBarPostMutation = (options?: Partial<Options<FooBarPostData>>): MutationOptions<FooBarPostResponse, DefaultError, Options<FooBarPostData>> => {\n    const mutationOptions: MutationOptions<FooBarPostResponse, DefaultError, Options<FooBarPostData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await BarService.post({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const fooBarPutMutation = (options?: Partial<Options<FooBarPutData>>): MutationOptions<FooBarPutResponse, DefaultError, Options<FooBarPutData>> => {\n    const mutationOptions: MutationOptions<FooBarPutResponse, DefaultError, Options<FooBarPutData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await BarService.put({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/svelte-query/asClass/client/client.gen.ts",
    "content": "// 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 (options: RequestOptions) => {\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 url = buildUrl(opts);\n\n    return { opts, url };\n  };\n\n  const request: Client['request'] = async (options) => {\n    // @ts-expect-error\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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/svelte-query/asClass/client/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type { Auth } from '../core/auth.gen';\nexport type { QuerySerializerOptions } from '../core/bodySerializer.gen';\nexport {\n  formDataBodySerializer,\n  jsonBodySerializer,\n  urlSearchParamsBodySerializer,\n} from '../core/bodySerializer.gen';\nexport { buildClientParams } from '../core/params.gen';\nexport { serializeQueryKeyValue } from '../core/queryKeySerializer.gen';\nexport { createClient } from './client.gen';\nexport type {\n  Client,\n  ClientOptions,\n  Config,\n  CreateClientConfig,\n  Options,\n  RequestOptions,\n  RequestResult,\n  ResolvedRequestOptions,\n  ResponseStyle,\n  TDataShape,\n} from './types.gen';\nexport { createConfig, mergeHeaders } from './utils.gen';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/svelte-query/asClass/client/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { Auth } from '../core/auth.gen';\nimport type {\n  ServerSentEventsOptions,\n  ServerSentEventsResult,\n} from '../core/serverSentEvents.gen';\nimport type { Client as CoreClient, Config as CoreConfig } from '../core/types.gen';\nimport type { Middleware } from './utils.gen';\n\nexport type ResponseStyle = 'data' | 'fields';\n\nexport interface Config<T extends ClientOptions = ClientOptions>\n  extends Omit<RequestInit, 'body' | 'headers' | 'method'>, CoreConfig {\n  /**\n   * Base URL for all requests made by this client.\n   */\n  baseUrl?: T['baseUrl'];\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   * Please don't use the Fetch client for Next.js applications. The `next`\n   * options won't have any effect.\n   *\n   * Install {@link https://www.npmjs.com/package/@hey-api/client-next `@hey-api/client-next`} instead.\n   */\n  next?: never;\n  /**\n   * Return the response data parsed in a specified format. By default, `auto`\n   * will infer the appropriate method from the `Content-Type` response header.\n   * You can override this behavior with any of the {@link Body} methods.\n   * Select `stream` if you don't want to parse response data at all.\n   *\n   * @default 'auto'\n   */\n  parseAs?: 'arrayBuffer' | 'auto' | 'blob' | 'formData' | 'json' | 'stream' | 'text';\n  /**\n   * Should we return only data or multiple fields (data, error, response, etc.)?\n   *\n   * @default 'fields'\n   */\n  responseStyle?: ResponseStyle;\n  /**\n   * Throw an error instead of returning it in the response?\n   *\n   * @default false\n   */\n  throwOnError?: T['throwOnError'];\n}\n\nexport interface RequestOptions<\n  TData = unknown,\n  TResponseStyle extends ResponseStyle = 'fields',\n  ThrowOnError extends boolean = boolean,\n  Url extends string = string,\n>\n  extends\n    Config<{\n      responseStyle: TResponseStyle;\n      throwOnError: ThrowOnError;\n    }>,\n    Pick<\n      ServerSentEventsOptions<TData>,\n      | 'onRequest'\n      | 'onSseError'\n      | 'onSseEvent'\n      | 'sseDefaultRetryDelay'\n      | 'sseMaxRetryAttempts'\n      | 'sseMaxRetryDelay'\n    > {\n  /**\n   * Any body that you want to add to your request.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/fetch#body}\n   */\n  body?: unknown;\n  path?: Record<string, unknown>;\n  query?: Record<string, unknown>;\n  /**\n   * Security mechanism(s) to use for the request.\n   */\n  security?: ReadonlyArray<Auth>;\n  url: Url;\n}\n\nexport interface ResolvedRequestOptions<\n  TResponseStyle extends ResponseStyle = 'fields',\n  ThrowOnError extends boolean = boolean,\n  Url extends string = string,\n> extends RequestOptions<unknown, TResponseStyle, ThrowOnError, Url> {\n  serializedBody?: string;\n}\n\nexport type RequestResult<\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = boolean,\n  TResponseStyle extends ResponseStyle = 'fields',\n> = ThrowOnError extends true\n  ? Promise<\n      TResponseStyle extends 'data'\n        ? TData extends Record<string, unknown>\n          ? TData[keyof TData]\n          : TData\n        : {\n            data: TData extends Record<string, unknown> ? TData[keyof TData] : TData;\n            request: Request;\n            response: Response;\n          }\n    >\n  : Promise<\n      TResponseStyle extends 'data'\n        ? (TData extends Record<string, unknown> ? TData[keyof TData] : TData) | undefined\n        : (\n            | {\n                data: TData extends Record<string, unknown> ? TData[keyof TData] : TData;\n                error: undefined;\n              }\n            | {\n                data: undefined;\n                error: TError extends Record<string, unknown> ? TError[keyof TError] : TError;\n              }\n          ) & {\n            request: Request;\n            response: Response;\n          }\n    >;\n\nexport interface ClientOptions {\n  baseUrl?: string;\n  responseStyle?: ResponseStyle;\n  throwOnError?: boolean;\n}\n\ntype MethodFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'>,\n) => RequestResult<TData, TError, ThrowOnError, TResponseStyle>;\n\ntype SseFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'>,\n) => Promise<ServerSentEventsResult<TData, TError>>;\n\ntype RequestFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'> &\n    Pick<Required<RequestOptions<TData, TResponseStyle, ThrowOnError>>, 'method'>,\n) => RequestResult<TData, TError, ThrowOnError, TResponseStyle>;\n\ntype BuildUrlFn = <\n  TData extends {\n    body?: unknown;\n    path?: Record<string, unknown>;\n    query?: Record<string, unknown>;\n    url: string;\n  },\n>(\n  options: TData & Options<TData>,\n) => string;\n\nexport type Client = CoreClient<RequestFn, Config, MethodFn, BuildUrlFn, SseFn> & {\n  interceptors: Middleware<Request, Response, unknown, ResolvedRequestOptions>;\n};\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 = ClientOptions> = (\n  override?: Config<ClientOptions & T>,\n) => Config<Required<ClientOptions> & T>;\n\nexport interface TDataShape {\n  body?: unknown;\n  headers?: unknown;\n  path?: unknown;\n  query?: unknown;\n  url: string;\n}\n\ntype OmitKeys<T, K> = Pick<T, Exclude<keyof T, K>>;\n\nexport type Options<\n  TData extends TDataShape = TDataShape,\n  ThrowOnError extends boolean = boolean,\n  TResponse = unknown,\n  TResponseStyle extends ResponseStyle = 'fields',\n> = OmitKeys<\n  RequestOptions<TResponse, TResponseStyle, ThrowOnError>,\n  'body' | 'path' | 'query' | 'url'\n> &\n  ([TData] extends [never] ? unknown : Omit<TData, 'url'>);\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/svelte-query/asClass/client/utils.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/svelte-query/asClass/client.gen.ts",
    "content": "// 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>());\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/svelte-query/asClass/core/auth.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/svelte-query/asClass/core/bodySerializer.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/svelte-query/asClass/core/params.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/svelte-query/asClass/core/pathSerializer.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/svelte-query/asClass/core/queryKeySerializer.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\n/**\n * JSON-friendly union that mirrors what Pinia Colada can hash.\n */\nexport type JsonValue =\n  | null\n  | string\n  | number\n  | boolean\n  | JsonValue[]\n  | { [key: string]: JsonValue };\n\n/**\n * Replacer that converts non-JSON values (bigint, Date, etc.) to safe substitutes.\n */\nexport const queryKeyJsonReplacer = (_key: string, value: unknown) => {\n  if (value === undefined || typeof value === 'function' || typeof value === 'symbol') {\n    return undefined;\n  }\n  if (typeof value === 'bigint') {\n    return value.toString();\n  }\n  if (value instanceof Date) {\n    return value.toISOString();\n  }\n  return value;\n};\n\n/**\n * Safely stringifies a value and parses it back into a JsonValue.\n */\nexport const stringifyToJsonValue = (input: unknown): JsonValue | undefined => {\n  try {\n    const json = JSON.stringify(input, queryKeyJsonReplacer);\n    if (json === undefined) {\n      return undefined;\n    }\n    return JSON.parse(json) as JsonValue;\n  } catch {\n    return undefined;\n  }\n};\n\n/**\n * Detects plain objects (including objects with a null prototype).\n */\nconst isPlainObject = (value: unknown): value is Record<string, unknown> => {\n  if (value === null || typeof value !== 'object') {\n    return false;\n  }\n  const prototype = Object.getPrototypeOf(value as object);\n  return prototype === Object.prototype || prototype === null;\n};\n\n/**\n * Turns URLSearchParams into a sorted JSON object for deterministic keys.\n */\nconst serializeSearchParams = (params: URLSearchParams): JsonValue => {\n  const entries = Array.from(params.entries()).sort(([a], [b]) => a.localeCompare(b));\n  const result: Record<string, JsonValue> = {};\n\n  for (const [key, value] of entries) {\n    const existing = result[key];\n    if (existing === undefined) {\n      result[key] = value;\n      continue;\n    }\n\n    if (Array.isArray(existing)) {\n      (existing as string[]).push(value);\n    } else {\n      result[key] = [existing, value];\n    }\n  }\n\n  return result;\n};\n\n/**\n * Normalizes any accepted value into a JSON-friendly shape for query keys.\n */\nexport const serializeQueryKeyValue = (value: unknown): JsonValue | undefined => {\n  if (value === null) {\n    return null;\n  }\n\n  if (typeof value === 'string' || typeof value === 'number' || typeof value === 'boolean') {\n    return value;\n  }\n\n  if (value === undefined || typeof value === 'function' || typeof value === 'symbol') {\n    return undefined;\n  }\n\n  if (typeof value === 'bigint') {\n    return value.toString();\n  }\n\n  if (value instanceof Date) {\n    return value.toISOString();\n  }\n\n  if (Array.isArray(value)) {\n    return stringifyToJsonValue(value);\n  }\n\n  if (typeof URLSearchParams !== 'undefined' && value instanceof URLSearchParams) {\n    return serializeSearchParams(value);\n  }\n\n  if (isPlainObject(value)) {\n    return stringifyToJsonValue(value);\n  }\n\n  return undefined;\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/svelte-query/asClass/core/serverSentEvents.gen.ts",
    "content": "// 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 const 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            // Normalize line endings: CRLF -> LF, then CR -> LF\n            buffer = buffer.replace(/\\r\\n/g, '\\n').replace(/\\r/g, '\\n');\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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/svelte-query/asClass/core/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { Auth, AuthToken } from './auth.gen';\nimport type { BodySerializer, QuerySerializer, QuerySerializerOptions } from './bodySerializer.gen';\n\nexport type HttpMethod =\n  | 'connect'\n  | 'delete'\n  | 'get'\n  | 'head'\n  | 'options'\n  | 'patch'\n  | 'post'\n  | 'put'\n  | 'trace';\n\nexport type Client<\n  RequestFn = never,\n  Config = unknown,\n  MethodFn = never,\n  BuildUrlFn = never,\n  SseFn = never,\n> = {\n  /**\n   * Returns the final request URL.\n   */\n  buildUrl: BuildUrlFn;\n  getConfig: () => Config;\n  request: RequestFn;\n  setConfig: (config: Config) => Config;\n} & {\n  [K in HttpMethod]: MethodFn;\n} & ([SseFn] extends [never] ? { sse?: never } : { sse: { [K in HttpMethod]: SseFn } });\n\nexport interface Config {\n  /**\n   * Auth token or a function returning auth token. The resolved value will be\n   * added to the request payload as defined by its `security` array.\n   */\n  auth?: ((auth: Auth) => Promise<AuthToken> | AuthToken) | AuthToken;\n  /**\n   * A function for serializing request body parameter. By default,\n   * {@link JSON.stringify()} will be used.\n   */\n  bodySerializer?: BodySerializer | null;\n  /**\n   * An object containing any HTTP headers that you want to pre-populate your\n   * `Headers` object with.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/Headers/Headers#init See more}\n   */\n  headers?:\n    | RequestInit['headers']\n    | Record<\n        string,\n        string | number | boolean | (string | number | boolean)[] | null | undefined | unknown\n      >;\n  /**\n   * The request method.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/fetch#method See more}\n   */\n  method?: Uppercase<HttpMethod>;\n  /**\n   * A function for serializing request query parameters. By default, arrays\n   * will be exploded in form style, objects will be exploded in deepObject\n   * style, and reserved characters are percent-encoded.\n   *\n   * This method will have no effect if the native `paramsSerializer()` Axios\n   * API function is used.\n   *\n   * {@link https://swagger.io/docs/specification/serialization/#query View examples}\n   */\n  querySerializer?: QuerySerializer | QuerySerializerOptions;\n  /**\n   * A function validating request data. This is useful if you want to ensure\n   * the request conforms to the desired shape, so it can be safely sent to\n   * the server.\n   */\n  requestValidator?: (data: unknown) => Promise<unknown>;\n  /**\n   * A function transforming response data before it's returned. This is useful\n   * for post-processing data, e.g. converting ISO strings into Date objects.\n   */\n  responseTransformer?: (data: unknown) => Promise<unknown>;\n  /**\n   * A function validating response data. This is useful if you want to ensure\n   * the response conforms to the desired shape, so it can be safely passed to\n   * the transformers and returned to the user.\n   */\n  responseValidator?: (data: unknown) => Promise<unknown>;\n}\n\ntype IsExactlyNeverOrNeverUndefined<T> = [T] extends [never]\n  ? true\n  : [T] extends [never | undefined]\n    ? [undefined] extends [T]\n      ? false\n      : true\n    : false;\n\nexport type OmitNever<T extends Record<string, unknown>> = {\n  [K in keyof T as IsExactlyNeverOrNeverUndefined<T[K]> extends true ? never : K]: T[K];\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/svelte-query/asClass/core/utils.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/svelte-query/asClass/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport { BarBazService, BarService, BarService2, FooBazService, FooService, FooService2, type Options } from './sdk.gen';\nexport type { ClientOptions, FooBarPostData, FooBarPostResponse, FooBarPostResponses, FooBarPutData, FooBarPutResponse, FooBarPutResponses, FooPostData, FooPostResponse, FooPostResponses, FooPutData, FooPutResponse, FooPutResponses, GetFooBarData, GetFooBarResponse, GetFooBarResponses, GetFooData, GetFooResponse, GetFooResponses } from './types.gen';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/svelte-query/asClass/sdk.gen.ts",
    "content": "// 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 { FooBarPostData, FooBarPostResponses, FooBarPutData, FooBarPutResponses, FooPostData, FooPostResponses, FooPutData, FooPutResponses, GetFooBarData, GetFooBarResponses, GetFooData, GetFooResponses } from './types.gen';\n\nexport type Options<TData extends TDataShape = TDataShape, ThrowOnError extends boolean = boolean> = Options2<TData, ThrowOnError> & {\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\nexport class BarService {\n    public static post<ThrowOnError extends boolean = false>(options?: Options<FooBarPostData, ThrowOnError>) {\n        return (options?.client ?? client).post<FooBarPostResponses, unknown, ThrowOnError>({ url: '/foo/bar', ...options });\n    }\n    \n    public static put<ThrowOnError extends boolean = false>(options?: Options<FooBarPutData, ThrowOnError>) {\n        return (options?.client ?? client).put<FooBarPutResponses, unknown, ThrowOnError>({ url: '/foo/bar', ...options });\n    }\n}\n\nexport class FooService {\n    public static post<ThrowOnError extends boolean = false>(options?: Options<FooPostData, ThrowOnError>) {\n        return (options?.client ?? client).post<FooPostResponses, unknown, ThrowOnError>({ url: '/foo', ...options });\n    }\n    \n    public static put<ThrowOnError extends boolean = false>(options?: Options<FooPutData, ThrowOnError>) {\n        return (options?.client ?? client).put<FooPutResponses, unknown, ThrowOnError>({ url: '/foo', ...options });\n    }\n    \n    static barService = BarService;\n}\n\nexport class FooBazService {\n    public static getFoo<ThrowOnError extends boolean = false>(options?: Options<GetFooData, ThrowOnError>) {\n        return (options?.client ?? client).get<GetFooResponses, unknown, ThrowOnError>({ url: '/foo', ...options });\n    }\n    \n    static fooService = FooService;\n}\n\nexport class BarService2 {\n    public static post<ThrowOnError extends boolean = false>(options?: Options<FooBarPostData, ThrowOnError>) {\n        return (options?.client ?? client).post<FooBarPostResponses, unknown, ThrowOnError>({ url: '/foo/bar', ...options });\n    }\n    \n    public static put<ThrowOnError extends boolean = false>(options?: Options<FooBarPutData, ThrowOnError>) {\n        return (options?.client ?? client).put<FooBarPutResponses, unknown, ThrowOnError>({ url: '/foo/bar', ...options });\n    }\n}\n\nexport class FooService2 {\n    static barService = BarService2;\n}\n\nexport class BarBazService {\n    public static getFooBar<ThrowOnError extends boolean = false>(options?: Options<GetFooBarData, ThrowOnError>) {\n        return (options?.client ?? client).get<GetFooBarResponses, unknown, ThrowOnError>({ url: '/foo/bar', ...options });\n    }\n    \n    static fooService = FooService2;\n}\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/svelte-query/asClass/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type ClientOptions = {\n    baseUrl: `${string}://${string}` | (string & {});\n};\n\nexport type GetFooData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/foo';\n};\n\nexport type GetFooResponses = {\n    /**\n     * OK\n     */\n    200: string;\n};\n\nexport type GetFooResponse = GetFooResponses[keyof GetFooResponses];\n\nexport type FooPostData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/foo';\n};\n\nexport type FooPostResponses = {\n    /**\n     * OK\n     */\n    200: string;\n};\n\nexport type FooPostResponse = FooPostResponses[keyof FooPostResponses];\n\nexport type FooPutData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/foo';\n};\n\nexport type FooPutResponses = {\n    /**\n     * OK\n     */\n    200: string;\n};\n\nexport type FooPutResponse = FooPutResponses[keyof FooPutResponses];\n\nexport type GetFooBarData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/foo/bar';\n};\n\nexport type GetFooBarResponses = {\n    /**\n     * OK\n     */\n    200: string;\n};\n\nexport type GetFooBarResponse = GetFooBarResponses[keyof GetFooBarResponses];\n\nexport type FooBarPostData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/foo/bar';\n};\n\nexport type FooBarPostResponses = {\n    /**\n     * OK\n     */\n    200: string;\n};\n\nexport type FooBarPostResponse = FooBarPostResponses[keyof FooBarPostResponses];\n\nexport type FooBarPutData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/foo/bar';\n};\n\nexport type FooBarPutResponses = {\n    /**\n     * OK\n     */\n    200: string;\n};\n\nexport type FooBarPutResponse = FooBarPutResponses[keyof FooBarPutResponses];\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/svelte-query/axios/@tanstack/svelte-query.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport { type DefaultError, type InfiniteData, infiniteQueryOptions, type MutationOptions, queryOptions } from '@tanstack/svelte-query';\nimport type { AxiosError } from 'axios';\n\nimport { client } from '../client.gen';\nimport { apiVVersionODataControllerCount, callToTestOrderOfParams, callWithDefaultOptionalParameters, callWithDefaultParameters, callWithDescriptions, callWithDuplicateResponses, callWithNoContentResponse, callWithParameters, callWithResponse, callWithResponseAndNoContentResponse, callWithResponses, callWithResultFromHeader, callWithWeirdParameterNames, collectionFormat, complexParams, complexTypes, deleteCallWithoutParametersAndResponse, deleteFoo, deprecatedCall, dummyA, dummyB, duplicateName, duplicateName2, duplicateName3, duplicateName4, export_, fileResponse, fooWow, getApiVbyApiVersionSimpleOperation, getCallWithOptionalParam, getCallWithoutParametersAndResponse, import_, multipartRequest, multipartResponse, nonAsciiæøåÆøÅöôêÊ字符串, type Options, patchApiVbyApiVersionNoTag, patchCallWithoutParametersAndResponse, postApiVbyApiVersionFormData, postApiVbyApiVersionRequestBody, postCallWithOptionalParam, postCallWithoutParametersAndResponse, putCallWithoutParametersAndResponse, putWithFormUrlEncoded, testErrorCode, types, uploadFile } from '../sdk.gen';\nimport type { ApiVVersionODataControllerCountData, ApiVVersionODataControllerCountResponse, CallToTestOrderOfParamsData, CallWithDefaultOptionalParametersData, CallWithDefaultParametersData, CallWithDescriptionsData, CallWithDuplicateResponsesData, CallWithDuplicateResponsesError, CallWithDuplicateResponsesResponse, CallWithNoContentResponseData, CallWithNoContentResponseResponse, CallWithParametersData, CallWithResponseAndNoContentResponseData, CallWithResponseAndNoContentResponseResponse, CallWithResponseData, CallWithResponseResponse, CallWithResponsesData, CallWithResponsesError, CallWithResponsesResponse, CallWithResultFromHeaderData, CallWithWeirdParameterNamesData, CollectionFormatData, ComplexParamsData, ComplexParamsResponse, ComplexTypesData, ComplexTypesResponse, DeleteCallWithoutParametersAndResponseData, DeleteFooData3, DeprecatedCallData, DummyAData, DummyAResponse, DummyBData, DummyBResponse, DuplicateName2Data, DuplicateName3Data, DuplicateName4Data, DuplicateNameData, ExportData, FileResponseData, FileResponseResponse, FooWowData, GetApiVbyApiVersionSimpleOperationData, GetApiVbyApiVersionSimpleOperationError, GetApiVbyApiVersionSimpleOperationResponse, GetCallWithOptionalParamData, GetCallWithoutParametersAndResponseData, ImportData, ImportResponse, MultipartRequestData, MultipartResponseData, MultipartResponseResponse, NonAsciiæøåÆøÅöôêÊ字符串Data, NonAsciiæøåÆøÅöôêÊ字符串Response, PatchApiVbyApiVersionNoTagData, PatchCallWithoutParametersAndResponseData, PostApiVbyApiVersionFormDataData, PostApiVbyApiVersionRequestBodyData, PostCallWithOptionalParamData, PostCallWithOptionalParamResponse, PostCallWithoutParametersAndResponseData, PutCallWithoutParametersAndResponseData, PutWithFormUrlEncodedData, TestErrorCodeData, TypesData, TypesResponse, UploadFileData, UploadFileResponse } from '../types.gen';\n\nexport type QueryKey<TOptions extends Options> = [\n    Pick<TOptions, 'baseURL' | 'body' | 'headers' | 'path' | 'query'> & {\n        _id: string;\n        _infinite?: boolean;\n        tags?: ReadonlyArray<string>;\n    }\n];\n\nconst createQueryKey = <TOptions extends Options>(id: string, options?: TOptions, infinite?: boolean, tags?: ReadonlyArray<string>): [\n    QueryKey<TOptions>[0]\n] => {\n    const params: QueryKey<TOptions>[0] = { _id: id, baseURL: options?.baseURL || (options?.client ?? client).getConfig().baseURL } as QueryKey<TOptions>[0];\n    if (infinite) {\n        params._infinite = infinite;\n    }\n    if (tags) {\n        params.tags = tags;\n    }\n    if (options?.body) {\n        params.body = options.body;\n    }\n    if (options?.headers) {\n        params.headers = options.headers;\n    }\n    if (options?.path) {\n        params.path = options.path;\n    }\n    if (options?.query) {\n        params.query = options.query;\n    }\n    return [params];\n};\n\nexport const exportQueryKey = (options?: Options<ExportData>) => createQueryKey('export', options);\n\nexport const exportOptions = (options?: Options<ExportData>) => queryOptions<unknown, AxiosError<DefaultError>, unknown, ReturnType<typeof exportQueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await export_({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: exportQueryKey(options)\n});\n\nexport const patchApiVbyApiVersionNoTagMutation = (options?: Partial<Options<PatchApiVbyApiVersionNoTagData>>): MutationOptions<unknown, AxiosError<DefaultError>, Options<PatchApiVbyApiVersionNoTagData>> => {\n    const mutationOptions: MutationOptions<unknown, AxiosError<DefaultError>, Options<PatchApiVbyApiVersionNoTagData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await patchApiVbyApiVersionNoTag({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const importMutation = (options?: Partial<Options<ImportData>>): MutationOptions<ImportResponse, AxiosError<DefaultError>, Options<ImportData>> => {\n    const mutationOptions: MutationOptions<ImportResponse, AxiosError<DefaultError>, Options<ImportData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await import_({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const fooWowMutation = (options?: Partial<Options<FooWowData>>): MutationOptions<unknown, AxiosError<DefaultError>, Options<FooWowData>> => {\n    const mutationOptions: MutationOptions<unknown, AxiosError<DefaultError>, Options<FooWowData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await fooWow({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const apiVVersionODataControllerCountQueryKey = (options?: Options<ApiVVersionODataControllerCountData>) => createQueryKey('apiVVersionODataControllerCount', options);\n\nexport const apiVVersionODataControllerCountOptions = (options?: Options<ApiVVersionODataControllerCountData>) => queryOptions<ApiVVersionODataControllerCountResponse, AxiosError<DefaultError>, ApiVVersionODataControllerCountResponse, ReturnType<typeof apiVVersionODataControllerCountQueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await apiVVersionODataControllerCount({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: apiVVersionODataControllerCountQueryKey(options)\n});\n\nexport const getApiVbyApiVersionSimpleOperationQueryKey = (options: Options<GetApiVbyApiVersionSimpleOperationData>) => createQueryKey('getApiVbyApiVersionSimpleOperation', options);\n\nexport const getApiVbyApiVersionSimpleOperationOptions = (options: Options<GetApiVbyApiVersionSimpleOperationData>) => queryOptions<GetApiVbyApiVersionSimpleOperationResponse, AxiosError<GetApiVbyApiVersionSimpleOperationError>, GetApiVbyApiVersionSimpleOperationResponse, ReturnType<typeof getApiVbyApiVersionSimpleOperationQueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await getApiVbyApiVersionSimpleOperation({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: getApiVbyApiVersionSimpleOperationQueryKey(options)\n});\n\nexport const deleteCallWithoutParametersAndResponseMutation = (options?: Partial<Options<DeleteCallWithoutParametersAndResponseData>>): MutationOptions<unknown, AxiosError<DefaultError>, Options<DeleteCallWithoutParametersAndResponseData>> => {\n    const mutationOptions: MutationOptions<unknown, AxiosError<DefaultError>, Options<DeleteCallWithoutParametersAndResponseData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await deleteCallWithoutParametersAndResponse({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const getCallWithoutParametersAndResponseQueryKey = (options?: Options<GetCallWithoutParametersAndResponseData>) => createQueryKey('getCallWithoutParametersAndResponse', options);\n\nexport const getCallWithoutParametersAndResponseOptions = (options?: Options<GetCallWithoutParametersAndResponseData>) => queryOptions<unknown, AxiosError<DefaultError>, unknown, ReturnType<typeof getCallWithoutParametersAndResponseQueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await getCallWithoutParametersAndResponse({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: getCallWithoutParametersAndResponseQueryKey(options)\n});\n\nexport const patchCallWithoutParametersAndResponseMutation = (options?: Partial<Options<PatchCallWithoutParametersAndResponseData>>): MutationOptions<unknown, AxiosError<DefaultError>, Options<PatchCallWithoutParametersAndResponseData>> => {\n    const mutationOptions: MutationOptions<unknown, AxiosError<DefaultError>, Options<PatchCallWithoutParametersAndResponseData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await patchCallWithoutParametersAndResponse({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const postCallWithoutParametersAndResponseMutation = (options?: Partial<Options<PostCallWithoutParametersAndResponseData>>): MutationOptions<unknown, AxiosError<DefaultError>, Options<PostCallWithoutParametersAndResponseData>> => {\n    const mutationOptions: MutationOptions<unknown, AxiosError<DefaultError>, Options<PostCallWithoutParametersAndResponseData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await postCallWithoutParametersAndResponse({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const putCallWithoutParametersAndResponseMutation = (options?: Partial<Options<PutCallWithoutParametersAndResponseData>>): MutationOptions<unknown, AxiosError<DefaultError>, Options<PutCallWithoutParametersAndResponseData>> => {\n    const mutationOptions: MutationOptions<unknown, AxiosError<DefaultError>, Options<PutCallWithoutParametersAndResponseData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await putCallWithoutParametersAndResponse({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const deleteFooMutation = (options?: Partial<Options<DeleteFooData3>>): MutationOptions<unknown, AxiosError<DefaultError>, Options<DeleteFooData3>> => {\n    const mutationOptions: MutationOptions<unknown, AxiosError<DefaultError>, Options<DeleteFooData3>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await deleteFoo({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const callWithDescriptionsMutation = (options?: Partial<Options<CallWithDescriptionsData>>): MutationOptions<unknown, AxiosError<DefaultError>, Options<CallWithDescriptionsData>> => {\n    const mutationOptions: MutationOptions<unknown, AxiosError<DefaultError>, Options<CallWithDescriptionsData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await callWithDescriptions({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\n/**\n * @deprecated\n */\nexport const deprecatedCallMutation = (options?: Partial<Options<DeprecatedCallData>>): MutationOptions<unknown, AxiosError<DefaultError>, Options<DeprecatedCallData>> => {\n    const mutationOptions: MutationOptions<unknown, AxiosError<DefaultError>, Options<DeprecatedCallData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await deprecatedCall({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const callWithParametersMutation = (options?: Partial<Options<CallWithParametersData>>): MutationOptions<unknown, AxiosError<DefaultError>, Options<CallWithParametersData>> => {\n    const mutationOptions: MutationOptions<unknown, AxiosError<DefaultError>, Options<CallWithParametersData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await callWithParameters({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const callWithWeirdParameterNamesMutation = (options?: Partial<Options<CallWithWeirdParameterNamesData>>): MutationOptions<unknown, AxiosError<DefaultError>, Options<CallWithWeirdParameterNamesData>> => {\n    const mutationOptions: MutationOptions<unknown, AxiosError<DefaultError>, Options<CallWithWeirdParameterNamesData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await callWithWeirdParameterNames({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const getCallWithOptionalParamQueryKey = (options: Options<GetCallWithOptionalParamData>) => createQueryKey('getCallWithOptionalParam', options);\n\nexport const getCallWithOptionalParamOptions = (options: Options<GetCallWithOptionalParamData>) => queryOptions<unknown, AxiosError<DefaultError>, unknown, ReturnType<typeof getCallWithOptionalParamQueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await getCallWithOptionalParam({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: getCallWithOptionalParamQueryKey(options)\n});\n\nconst createInfiniteParams = <K extends Pick<QueryKey<Options>[0], 'body' | 'headers' | 'path' | 'query'>>(queryKey: QueryKey<Options>, page: K) => {\n    const params = { ...queryKey[0] };\n    if (page.body) {\n        params.body = {\n            ...queryKey[0].body as any,\n            ...page.body as any\n        };\n    }\n    if (page.headers) {\n        params.headers = {\n            ...queryKey[0].headers,\n            ...page.headers\n        };\n    }\n    if (page.path) {\n        params.path = {\n            ...queryKey[0].path as any,\n            ...page.path as any\n        };\n    }\n    if (page.query) {\n        params.query = {\n            ...queryKey[0].query as any,\n            ...page.query as any\n        };\n    }\n    return params as unknown as typeof page;\n};\n\nexport const getCallWithOptionalParamInfiniteQueryKey = (options: Options<GetCallWithOptionalParamData>): QueryKey<Options<GetCallWithOptionalParamData>> => createQueryKey('getCallWithOptionalParam', options, true);\n\nexport const getCallWithOptionalParamInfiniteOptions = (options: Options<GetCallWithOptionalParamData>) => infiniteQueryOptions<unknown, AxiosError<DefaultError>, InfiniteData<unknown>, QueryKey<Options<GetCallWithOptionalParamData>>, number | Pick<QueryKey<Options<GetCallWithOptionalParamData>>[0], 'body' | 'headers' | 'path' | 'query'>>(\n// @ts-ignore\n{\n    queryFn: async ({ pageParam, queryKey, signal }) => {\n        // @ts-ignore\n        const page: Pick<QueryKey<Options<GetCallWithOptionalParamData>>[0], 'body' | 'headers' | 'path' | 'query'> = typeof pageParam === 'object' ? pageParam : {\n            query: {\n                page: pageParam\n            }\n        };\n        const params = createInfiniteParams(queryKey, page);\n        const { data } = await getCallWithOptionalParam({\n            ...options,\n            ...params,\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: getCallWithOptionalParamInfiniteQueryKey(options)\n});\n\nexport const postCallWithOptionalParamMutation = (options?: Partial<Options<PostCallWithOptionalParamData>>): MutationOptions<PostCallWithOptionalParamResponse, AxiosError<DefaultError>, Options<PostCallWithOptionalParamData>> => {\n    const mutationOptions: MutationOptions<PostCallWithOptionalParamResponse, AxiosError<DefaultError>, Options<PostCallWithOptionalParamData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await postCallWithOptionalParam({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const postApiVbyApiVersionRequestBodyMutation = (options?: Partial<Options<PostApiVbyApiVersionRequestBodyData>>): MutationOptions<unknown, AxiosError<DefaultError>, Options<PostApiVbyApiVersionRequestBodyData>> => {\n    const mutationOptions: MutationOptions<unknown, AxiosError<DefaultError>, Options<PostApiVbyApiVersionRequestBodyData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await postApiVbyApiVersionRequestBody({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const postApiVbyApiVersionFormDataMutation = (options?: Partial<Options<PostApiVbyApiVersionFormDataData>>): MutationOptions<unknown, AxiosError<DefaultError>, Options<PostApiVbyApiVersionFormDataData>> => {\n    const mutationOptions: MutationOptions<unknown, AxiosError<DefaultError>, Options<PostApiVbyApiVersionFormDataData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await postApiVbyApiVersionFormData({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const callWithDefaultParametersQueryKey = (options?: Options<CallWithDefaultParametersData>) => createQueryKey('callWithDefaultParameters', options);\n\nexport const callWithDefaultParametersOptions = (options?: Options<CallWithDefaultParametersData>) => queryOptions<unknown, AxiosError<DefaultError>, unknown, ReturnType<typeof callWithDefaultParametersQueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await callWithDefaultParameters({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: callWithDefaultParametersQueryKey(options)\n});\n\nexport const callWithDefaultOptionalParametersMutation = (options?: Partial<Options<CallWithDefaultOptionalParametersData>>): MutationOptions<unknown, AxiosError<DefaultError>, Options<CallWithDefaultOptionalParametersData>> => {\n    const mutationOptions: MutationOptions<unknown, AxiosError<DefaultError>, Options<CallWithDefaultOptionalParametersData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await callWithDefaultOptionalParameters({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const callToTestOrderOfParamsMutation = (options?: Partial<Options<CallToTestOrderOfParamsData>>): MutationOptions<unknown, AxiosError<DefaultError>, Options<CallToTestOrderOfParamsData>> => {\n    const mutationOptions: MutationOptions<unknown, AxiosError<DefaultError>, Options<CallToTestOrderOfParamsData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await callToTestOrderOfParams({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const duplicateNameMutation = (options?: Partial<Options<DuplicateNameData>>): MutationOptions<unknown, AxiosError<DefaultError>, Options<DuplicateNameData>> => {\n    const mutationOptions: MutationOptions<unknown, AxiosError<DefaultError>, Options<DuplicateNameData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await duplicateName({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const duplicateName2QueryKey = (options?: Options<DuplicateName2Data>) => createQueryKey('duplicateName2', options);\n\nexport const duplicateName2Options = (options?: Options<DuplicateName2Data>) => queryOptions<unknown, AxiosError<DefaultError>, unknown, ReturnType<typeof duplicateName2QueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await duplicateName2({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: duplicateName2QueryKey(options)\n});\n\nexport const duplicateName3Mutation = (options?: Partial<Options<DuplicateName3Data>>): MutationOptions<unknown, AxiosError<DefaultError>, Options<DuplicateName3Data>> => {\n    const mutationOptions: MutationOptions<unknown, AxiosError<DefaultError>, Options<DuplicateName3Data>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await duplicateName3({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const duplicateName4Mutation = (options?: Partial<Options<DuplicateName4Data>>): MutationOptions<unknown, AxiosError<DefaultError>, Options<DuplicateName4Data>> => {\n    const mutationOptions: MutationOptions<unknown, AxiosError<DefaultError>, Options<DuplicateName4Data>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await duplicateName4({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const callWithNoContentResponseQueryKey = (options?: Options<CallWithNoContentResponseData>) => createQueryKey('callWithNoContentResponse', options);\n\nexport const callWithNoContentResponseOptions = (options?: Options<CallWithNoContentResponseData>) => queryOptions<CallWithNoContentResponseResponse, AxiosError<DefaultError>, CallWithNoContentResponseResponse, ReturnType<typeof callWithNoContentResponseQueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await callWithNoContentResponse({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: callWithNoContentResponseQueryKey(options)\n});\n\nexport const callWithResponseAndNoContentResponseQueryKey = (options?: Options<CallWithResponseAndNoContentResponseData>) => createQueryKey('callWithResponseAndNoContentResponse', options);\n\nexport const callWithResponseAndNoContentResponseOptions = (options?: Options<CallWithResponseAndNoContentResponseData>) => queryOptions<CallWithResponseAndNoContentResponseResponse, AxiosError<DefaultError>, CallWithResponseAndNoContentResponseResponse, ReturnType<typeof callWithResponseAndNoContentResponseQueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await callWithResponseAndNoContentResponse({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: callWithResponseAndNoContentResponseQueryKey(options)\n});\n\nexport const dummyAQueryKey = (options?: Options<DummyAData>) => createQueryKey('dummyA', options);\n\nexport const dummyAOptions = (options?: Options<DummyAData>) => queryOptions<DummyAResponse, AxiosError<DefaultError>, DummyAResponse, ReturnType<typeof dummyAQueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await dummyA({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: dummyAQueryKey(options)\n});\n\nexport const dummyBQueryKey = (options?: Options<DummyBData>) => createQueryKey('dummyB', options);\n\nexport const dummyBOptions = (options?: Options<DummyBData>) => queryOptions<DummyBResponse, AxiosError<DefaultError>, DummyBResponse, ReturnType<typeof dummyBQueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await dummyB({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: dummyBQueryKey(options)\n});\n\nexport const callWithResponseQueryKey = (options?: Options<CallWithResponseData>) => createQueryKey('callWithResponse', options);\n\nexport const callWithResponseOptions = (options?: Options<CallWithResponseData>) => queryOptions<CallWithResponseResponse, AxiosError<DefaultError>, CallWithResponseResponse, ReturnType<typeof callWithResponseQueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await callWithResponse({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: callWithResponseQueryKey(options)\n});\n\nexport const callWithDuplicateResponsesMutation = (options?: Partial<Options<CallWithDuplicateResponsesData>>): MutationOptions<CallWithDuplicateResponsesResponse, AxiosError<CallWithDuplicateResponsesError>, Options<CallWithDuplicateResponsesData>> => {\n    const mutationOptions: MutationOptions<CallWithDuplicateResponsesResponse, AxiosError<CallWithDuplicateResponsesError>, Options<CallWithDuplicateResponsesData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await callWithDuplicateResponses({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const callWithResponsesMutation = (options?: Partial<Options<CallWithResponsesData>>): MutationOptions<CallWithResponsesResponse, AxiosError<CallWithResponsesError>, Options<CallWithResponsesData>> => {\n    const mutationOptions: MutationOptions<CallWithResponsesResponse, AxiosError<CallWithResponsesError>, Options<CallWithResponsesData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await callWithResponses({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const collectionFormatQueryKey = (options: Options<CollectionFormatData>) => createQueryKey('collectionFormat', options);\n\nexport const collectionFormatOptions = (options: Options<CollectionFormatData>) => queryOptions<unknown, AxiosError<DefaultError>, unknown, ReturnType<typeof collectionFormatQueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await collectionFormat({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: collectionFormatQueryKey(options)\n});\n\nexport const typesQueryKey = (options: Options<TypesData>) => createQueryKey('types', options);\n\nexport const typesOptions = (options: Options<TypesData>) => queryOptions<TypesResponse, AxiosError<DefaultError>, TypesResponse, ReturnType<typeof typesQueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await types({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: typesQueryKey(options)\n});\n\nexport const uploadFileMutation = (options?: Partial<Options<UploadFileData>>): MutationOptions<UploadFileResponse, AxiosError<DefaultError>, Options<UploadFileData>> => {\n    const mutationOptions: MutationOptions<UploadFileResponse, AxiosError<DefaultError>, Options<UploadFileData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await uploadFile({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const fileResponseQueryKey = (options: Options<FileResponseData>) => createQueryKey('fileResponse', options);\n\nexport const fileResponseOptions = (options: Options<FileResponseData>) => queryOptions<FileResponseResponse, AxiosError<DefaultError>, FileResponseResponse, ReturnType<typeof fileResponseQueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await fileResponse({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: fileResponseQueryKey(options)\n});\n\nexport const complexTypesQueryKey = (options: Options<ComplexTypesData>) => createQueryKey('complexTypes', options);\n\nexport const complexTypesOptions = (options: Options<ComplexTypesData>) => queryOptions<ComplexTypesResponse, AxiosError<DefaultError>, ComplexTypesResponse, ReturnType<typeof complexTypesQueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await complexTypes({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: complexTypesQueryKey(options)\n});\n\nexport const multipartResponseQueryKey = (options?: Options<MultipartResponseData>) => createQueryKey('multipartResponse', options);\n\nexport const multipartResponseOptions = (options?: Options<MultipartResponseData>) => queryOptions<MultipartResponseResponse, AxiosError<DefaultError>, MultipartResponseResponse, ReturnType<typeof multipartResponseQueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await multipartResponse({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: multipartResponseQueryKey(options)\n});\n\nexport const multipartRequestMutation = (options?: Partial<Options<MultipartRequestData>>): MutationOptions<unknown, AxiosError<DefaultError>, Options<MultipartRequestData>> => {\n    const mutationOptions: MutationOptions<unknown, AxiosError<DefaultError>, Options<MultipartRequestData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await multipartRequest({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const complexParamsMutation = (options?: Partial<Options<ComplexParamsData>>): MutationOptions<ComplexParamsResponse, AxiosError<DefaultError>, Options<ComplexParamsData>> => {\n    const mutationOptions: MutationOptions<ComplexParamsResponse, AxiosError<DefaultError>, Options<ComplexParamsData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await complexParams({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const callWithResultFromHeaderMutation = (options?: Partial<Options<CallWithResultFromHeaderData>>): MutationOptions<unknown, AxiosError<DefaultError>, Options<CallWithResultFromHeaderData>> => {\n    const mutationOptions: MutationOptions<unknown, AxiosError<DefaultError>, Options<CallWithResultFromHeaderData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await callWithResultFromHeader({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const testErrorCodeMutation = (options?: Partial<Options<TestErrorCodeData>>): MutationOptions<unknown, AxiosError<DefaultError>, Options<TestErrorCodeData>> => {\n    const mutationOptions: MutationOptions<unknown, AxiosError<DefaultError>, Options<TestErrorCodeData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await testErrorCode({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const nonAsciiæøåÆøÅöôêÊ字符串Mutation = (options?: Partial<Options<NonAsciiæøåÆøÅöôêÊ字符串Data>>): MutationOptions<NonAsciiæøåÆøÅöôêÊ字符串Response, AxiosError<DefaultError>, Options<NonAsciiæøåÆøÅöôêÊ字符串Data>> => {\n    const mutationOptions: MutationOptions<NonAsciiæøåÆøÅöôêÊ字符串Response, AxiosError<DefaultError>, Options<NonAsciiæøåÆøÅöôêÊ字符串Data>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await nonAsciiæøåÆøÅöôêÊ字符串({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\n/**\n * Login User\n */\nexport const putWithFormUrlEncodedMutation = (options?: Partial<Options<PutWithFormUrlEncodedData>>): MutationOptions<unknown, AxiosError<DefaultError>, Options<PutWithFormUrlEncodedData>> => {\n    const mutationOptions: MutationOptions<unknown, AxiosError<DefaultError>, Options<PutWithFormUrlEncodedData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await putWithFormUrlEncoded({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/svelte-query/axios/client/client.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { AxiosError, AxiosInstance, RawAxiosRequestHeaders } from 'axios';\nimport axios from 'axios';\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 } from './types.gen';\nimport { buildUrl, createConfig, mergeConfigs, mergeHeaders, setAuthParams } from './utils.gen';\n\nexport const createClient = (config: Config = {}): Client => {\n  let _config = mergeConfigs(createConfig(), config);\n\n  let instance: AxiosInstance;\n\n  if (_config.axios && !('Axios' in _config.axios)) {\n    instance = _config.axios;\n  } else {\n    // eslint-disable-next-line @typescript-eslint/no-unused-vars\n    const { auth, ...configWithoutAuth } = _config;\n    instance = axios.create(configWithoutAuth);\n  }\n\n  const getConfig = (): Config => ({ ..._config });\n\n  const setConfig = (config: Config): Config => {\n    _config = mergeConfigs(_config, config);\n    instance.defaults = {\n      ...instance.defaults,\n      ..._config,\n      // @ts-expect-error\n      headers: mergeHeaders(instance.defaults.headers, _config.headers),\n    };\n    return getConfig();\n  };\n\n  const beforeRequest = async (options: RequestOptions) => {\n    const opts = {\n      ..._config,\n      ...options,\n      axios: options.axios ?? _config.axios ?? instance,\n      headers: mergeHeaders(_config.headers, options.headers),\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.body = opts.bodySerializer(opts.body);\n    }\n\n    const url = buildUrl(opts);\n\n    return { opts, url };\n  };\n\n  // @ts-expect-error\n  const request: Client['request'] = async (options) => {\n    // @ts-expect-error\n    const { opts, url } = await beforeRequest(options);\n    try {\n      // assign Axios here for consistency with fetch\n      const _axios = opts.axios!;\n      // eslint-disable-next-line @typescript-eslint/no-unused-vars\n      const { auth, ...optsWithoutAuth } = opts;\n      const response = await _axios({\n        ...optsWithoutAuth,\n        baseURL: '', // the baseURL is already included in `url`\n        data: getValidRequestBody(opts),\n        headers: opts.headers as RawAxiosRequestHeaders,\n        // let `paramsSerializer()` handle query params if it exists\n        params: opts.paramsSerializer ? opts.query : undefined,\n        url,\n      });\n\n      let { data } = response;\n\n      if (opts.responseType === '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 {\n        ...response,\n        data: data ?? {},\n      };\n    } catch (error) {\n      const e = error as AxiosError;\n      if (opts.throwOnError) {\n        throw e;\n      }\n      // @ts-expect-error\n      e.error = e.response?.data ?? {};\n      return e;\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 Record<string, string>,\n      method,\n      serializedBody: getValidRequestBody(opts) as BodyInit | null | undefined,\n      // @ts-expect-error\n      signal: opts.signal,\n      url,\n    });\n  };\n\n  const _buildUrl: Client['buildUrl'] = (options) =>\n    buildUrl({ axios: instance, ..._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    instance,\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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/svelte-query/axios/client/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type { Auth } from '../core/auth.gen';\nexport type { QuerySerializerOptions } from '../core/bodySerializer.gen';\nexport {\n  formDataBodySerializer,\n  jsonBodySerializer,\n  urlSearchParamsBodySerializer,\n} from '../core/bodySerializer.gen';\nexport { buildClientParams } from '../core/params.gen';\nexport { serializeQueryKeyValue } from '../core/queryKeySerializer.gen';\nexport { createClient } from './client.gen';\nexport type {\n  Client,\n  ClientOptions,\n  Config,\n  CreateClientConfig,\n  Options,\n  RequestOptions,\n  RequestResult,\n  TDataShape,\n} from './types.gen';\nexport { createConfig } from './utils.gen';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/svelte-query/axios/client/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type {\n  AxiosError,\n  AxiosInstance,\n  AxiosRequestHeaders,\n  AxiosResponse,\n  AxiosStatic,\n  CreateAxiosDefaults,\n} from 'axios';\n\nimport type { Auth } from '../core/auth.gen';\nimport type {\n  ServerSentEventsOptions,\n  ServerSentEventsResult,\n} from '../core/serverSentEvents.gen';\nimport type { Client as CoreClient, Config as CoreConfig } from '../core/types.gen';\n\nexport interface Config<T extends ClientOptions = ClientOptions>\n  extends Omit<CreateAxiosDefaults, 'auth' | 'baseURL' | 'headers' | 'method'>, CoreConfig {\n  /**\n   * Axios implementation. You can use this option to provide either an\n   * `AxiosStatic` or an `AxiosInstance`.\n   *\n   * @default axios\n   */\n  axios?: AxiosStatic | AxiosInstance;\n  /**\n   * Base URL for all requests made by this client.\n   */\n  baseURL?: T['baseURL'];\n  /**\n   * An object containing any HTTP headers that you want to pre-populate your\n   * `Headers` object with.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/Headers/Headers#init See more}\n   */\n  headers?:\n    | AxiosRequestHeaders\n    | Record<\n        string,\n        string | number | boolean | (string | number | boolean)[] | null | undefined | unknown\n      >;\n  /**\n   * Throw an error instead of returning it in the response?\n   *\n   * @default false\n   */\n  throwOnError?: T['throwOnError'];\n}\n\nexport interface RequestOptions<\n  TData = unknown,\n  ThrowOnError extends boolean = boolean,\n  Url extends string = string,\n>\n  extends\n    Config<{\n      throwOnError: ThrowOnError;\n    }>,\n    Pick<\n      ServerSentEventsOptions<TData>,\n      | 'onRequest'\n      | 'onSseError'\n      | 'onSseEvent'\n      | 'sseDefaultRetryDelay'\n      | 'sseMaxRetryAttempts'\n      | 'sseMaxRetryDelay'\n    > {\n  /**\n   * Any body that you want to add to your request.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/fetch#body}\n   */\n  body?: unknown;\n  path?: Record<string, unknown>;\n  query?: Record<string, unknown>;\n  /**\n   * Security mechanism(s) to use for the request.\n   */\n  security?: ReadonlyArray<Auth>;\n  url: Url;\n}\n\nexport interface ClientOptions {\n  baseURL?: string;\n  throwOnError?: boolean;\n}\n\nexport type RequestResult<\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = boolean,\n> = ThrowOnError extends true\n  ? Promise<AxiosResponse<TData extends Record<string, unknown> ? TData[keyof TData] : TData>>\n  : Promise<\n      | (AxiosResponse<TData extends Record<string, unknown> ? TData[keyof TData] : TData> & {\n          error: undefined;\n        })\n      | (AxiosError<TError extends Record<string, unknown> ? TError[keyof TError] : TError> & {\n          data: undefined;\n          error: TError extends Record<string, unknown> ? TError[keyof TError] : TError;\n        })\n    >;\n\ntype MethodFn = <TData = unknown, TError = unknown, ThrowOnError extends boolean = false>(\n  options: Omit<RequestOptions<TData, ThrowOnError>, 'method'>,\n) => RequestResult<TData, TError, ThrowOnError>;\n\ntype SseFn = <TData = unknown, TError = unknown, ThrowOnError extends boolean = false>(\n  options: Omit<RequestOptions<TData, ThrowOnError>, 'method'>,\n) => Promise<ServerSentEventsResult<TData, TError>>;\n\ntype RequestFn = <TData = unknown, TError = unknown, ThrowOnError extends boolean = false>(\n  options: Omit<RequestOptions<TData, ThrowOnError>, 'method'> &\n    Pick<Required<RequestOptions<TData, ThrowOnError>>, 'method'>,\n) => RequestResult<TData, TError, ThrowOnError>;\n\ntype BuildUrlFn = <\n  TData extends {\n    body?: unknown;\n    path?: Record<string, unknown>;\n    query?: Record<string, unknown>;\n    url: string;\n  },\n>(\n  options: TData & Options<TData>,\n) => string;\n\nexport type Client = CoreClient<RequestFn, Config, MethodFn, BuildUrlFn, SseFn> & {\n  instance: AxiosInstance;\n};\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 = ClientOptions> = (\n  override?: Config<ClientOptions & T>,\n) => Config<Required<ClientOptions> & T>;\n\nexport interface TDataShape {\n  body?: unknown;\n  headers?: unknown;\n  path?: unknown;\n  query?: unknown;\n  url: string;\n}\n\ntype OmitKeys<T, K> = Pick<T, Exclude<keyof T, K>>;\n\nexport type Options<\n  TData extends TDataShape = TDataShape,\n  ThrowOnError extends boolean = boolean,\n  TResponse = unknown,\n> = OmitKeys<RequestOptions<TResponse, ThrowOnError>, 'body' | 'path' | 'query' | 'url'> &\n  ([TData] extends [never] ? unknown : Omit<TData, 'url'>);\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/svelte-query/axios/client/utils.gen.ts",
    "content": "// 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 {\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\nconst checkForExistence = (\n  options: Pick<RequestOptions, 'auth' | 'query'> & {\n    headers: Record<any, unknown>;\n  },\n  name?: string,\n): boolean => {\n  if (!name) {\n    return false;\n  }\n  if (name in options.headers || options.query?.[name]) {\n    return true;\n  }\n  if (\n    'Cookie' in options.headers &&\n    options.headers['Cookie'] &&\n    typeof options.headers['Cookie'] === 'string'\n  ) {\n    return options.headers['Cookie'].includes(`${name}=`);\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: Record<any, unknown>;\n  }) => {\n  for (const auth of security) {\n    if (checkForExistence(options, auth.name)) {\n      continue;\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        const value = `${name}=${token}`;\n        if ('Cookie' in options.headers && options.headers['Cookie']) {\n          options.headers['Cookie'] = `${options.headers['Cookie']}; ${value}`;\n        } else {\n          options.headers['Cookie'] = value;\n        }\n        break;\n      }\n      case 'header':\n      default:\n        options.headers[name] = token;\n        break;\n    }\n  }\n};\n\nexport const buildUrl: Client['buildUrl'] = (options) => {\n  const instanceBaseUrl = options.axios?.defaults?.baseURL;\n\n  const baseUrl =\n    !!options.baseURL && typeof options.baseURL === 'string' ? options.baseURL : instanceBaseUrl;\n\n  return getUrl({\n    baseUrl: baseUrl as string,\n    path: options.path,\n    // let `paramsSerializer()` handle query params if it exists\n    query: !options.paramsSerializer ? options.query : undefined,\n    querySerializer:\n      typeof options.querySerializer === 'function'\n        ? options.querySerializer\n        : createQuerySerializer(options.querySerializer),\n    url: options.url,\n  });\n};\n\nexport const mergeConfigs = (a: Config, b: Config): Config => {\n  const config = { ...a, ...b };\n  config.headers = mergeHeaders(a.headers, b.headers);\n  return config;\n};\n\n/**\n * Special Axios headers keywords allowing to set headers by request method.\n */\nexport const axiosHeadersKeywords = [\n  'common',\n  'delete',\n  'get',\n  'head',\n  'patch',\n  'post',\n  'put',\n] as const;\n\nexport const mergeHeaders = (\n  ...headers: Array<Required<Config>['headers'] | undefined>\n): Record<any, unknown> => {\n  const mergedHeaders: Record<any, unknown> = {};\n  for (const header of headers) {\n    if (!header || typeof header !== 'object') {\n      continue;\n    }\n\n    const iterator = Object.entries(header);\n\n    for (const [key, value] of iterator) {\n      if (\n        axiosHeadersKeywords.includes(key as (typeof axiosHeadersKeywords)[number]) &&\n        typeof value === 'object'\n      ) {\n        mergedHeaders[key] = {\n          ...(mergedHeaders[key] as Record<any, unknown>),\n          ...value,\n        };\n      } else if (value === null) {\n        delete mergedHeaders[key];\n      } else if (Array.isArray(value)) {\n        for (const v of value) {\n          // @ts-expect-error\n          mergedHeaders[key] = [...(mergedHeaders[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[key] = typeof value === 'object' ? JSON.stringify(value) : (value as string);\n      }\n    }\n  }\n  return mergedHeaders;\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  ...override,\n});\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/svelte-query/axios/client.gen.ts",
    "content": "// 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: 'http://localhost:3000/base' }));\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/svelte-query/axios/core/auth.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/svelte-query/axios/core/bodySerializer.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/svelte-query/axios/core/params.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/svelte-query/axios/core/pathSerializer.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/svelte-query/axios/core/queryKeySerializer.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\n/**\n * JSON-friendly union that mirrors what Pinia Colada can hash.\n */\nexport type JsonValue =\n  | null\n  | string\n  | number\n  | boolean\n  | JsonValue[]\n  | { [key: string]: JsonValue };\n\n/**\n * Replacer that converts non-JSON values (bigint, Date, etc.) to safe substitutes.\n */\nexport const queryKeyJsonReplacer = (_key: string, value: unknown) => {\n  if (value === undefined || typeof value === 'function' || typeof value === 'symbol') {\n    return undefined;\n  }\n  if (typeof value === 'bigint') {\n    return value.toString();\n  }\n  if (value instanceof Date) {\n    return value.toISOString();\n  }\n  return value;\n};\n\n/**\n * Safely stringifies a value and parses it back into a JsonValue.\n */\nexport const stringifyToJsonValue = (input: unknown): JsonValue | undefined => {\n  try {\n    const json = JSON.stringify(input, queryKeyJsonReplacer);\n    if (json === undefined) {\n      return undefined;\n    }\n    return JSON.parse(json) as JsonValue;\n  } catch {\n    return undefined;\n  }\n};\n\n/**\n * Detects plain objects (including objects with a null prototype).\n */\nconst isPlainObject = (value: unknown): value is Record<string, unknown> => {\n  if (value === null || typeof value !== 'object') {\n    return false;\n  }\n  const prototype = Object.getPrototypeOf(value as object);\n  return prototype === Object.prototype || prototype === null;\n};\n\n/**\n * Turns URLSearchParams into a sorted JSON object for deterministic keys.\n */\nconst serializeSearchParams = (params: URLSearchParams): JsonValue => {\n  const entries = Array.from(params.entries()).sort(([a], [b]) => a.localeCompare(b));\n  const result: Record<string, JsonValue> = {};\n\n  for (const [key, value] of entries) {\n    const existing = result[key];\n    if (existing === undefined) {\n      result[key] = value;\n      continue;\n    }\n\n    if (Array.isArray(existing)) {\n      (existing as string[]).push(value);\n    } else {\n      result[key] = [existing, value];\n    }\n  }\n\n  return result;\n};\n\n/**\n * Normalizes any accepted value into a JSON-friendly shape for query keys.\n */\nexport const serializeQueryKeyValue = (value: unknown): JsonValue | undefined => {\n  if (value === null) {\n    return null;\n  }\n\n  if (typeof value === 'string' || typeof value === 'number' || typeof value === 'boolean') {\n    return value;\n  }\n\n  if (value === undefined || typeof value === 'function' || typeof value === 'symbol') {\n    return undefined;\n  }\n\n  if (typeof value === 'bigint') {\n    return value.toString();\n  }\n\n  if (value instanceof Date) {\n    return value.toISOString();\n  }\n\n  if (Array.isArray(value)) {\n    return stringifyToJsonValue(value);\n  }\n\n  if (typeof URLSearchParams !== 'undefined' && value instanceof URLSearchParams) {\n    return serializeSearchParams(value);\n  }\n\n  if (isPlainObject(value)) {\n    return stringifyToJsonValue(value);\n  }\n\n  return undefined;\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/svelte-query/axios/core/serverSentEvents.gen.ts",
    "content": "// 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 const 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            // Normalize line endings: CRLF -> LF, then CR -> LF\n            buffer = buffer.replace(/\\r\\n/g, '\\n').replace(/\\r/g, '\\n');\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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/svelte-query/axios/core/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { Auth, AuthToken } from './auth.gen';\nimport type { BodySerializer, QuerySerializer, QuerySerializerOptions } from './bodySerializer.gen';\n\nexport type HttpMethod =\n  | 'connect'\n  | 'delete'\n  | 'get'\n  | 'head'\n  | 'options'\n  | 'patch'\n  | 'post'\n  | 'put'\n  | 'trace';\n\nexport type Client<\n  RequestFn = never,\n  Config = unknown,\n  MethodFn = never,\n  BuildUrlFn = never,\n  SseFn = never,\n> = {\n  /**\n   * Returns the final request URL.\n   */\n  buildUrl: BuildUrlFn;\n  getConfig: () => Config;\n  request: RequestFn;\n  setConfig: (config: Config) => Config;\n} & {\n  [K in HttpMethod]: MethodFn;\n} & ([SseFn] extends [never] ? { sse?: never } : { sse: { [K in HttpMethod]: SseFn } });\n\nexport interface Config {\n  /**\n   * Auth token or a function returning auth token. The resolved value will be\n   * added to the request payload as defined by its `security` array.\n   */\n  auth?: ((auth: Auth) => Promise<AuthToken> | AuthToken) | AuthToken;\n  /**\n   * A function for serializing request body parameter. By default,\n   * {@link JSON.stringify()} will be used.\n   */\n  bodySerializer?: BodySerializer | null;\n  /**\n   * An object containing any HTTP headers that you want to pre-populate your\n   * `Headers` object with.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/Headers/Headers#init See more}\n   */\n  headers?:\n    | RequestInit['headers']\n    | Record<\n        string,\n        string | number | boolean | (string | number | boolean)[] | null | undefined | unknown\n      >;\n  /**\n   * The request method.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/fetch#method See more}\n   */\n  method?: Uppercase<HttpMethod>;\n  /**\n   * A function for serializing request query parameters. By default, arrays\n   * will be exploded in form style, objects will be exploded in deepObject\n   * style, and reserved characters are percent-encoded.\n   *\n   * This method will have no effect if the native `paramsSerializer()` Axios\n   * API function is used.\n   *\n   * {@link https://swagger.io/docs/specification/serialization/#query View examples}\n   */\n  querySerializer?: QuerySerializer | QuerySerializerOptions;\n  /**\n   * A function validating request data. This is useful if you want to ensure\n   * the request conforms to the desired shape, so it can be safely sent to\n   * the server.\n   */\n  requestValidator?: (data: unknown) => Promise<unknown>;\n  /**\n   * A function transforming response data before it's returned. This is useful\n   * for post-processing data, e.g. converting ISO strings into Date objects.\n   */\n  responseTransformer?: (data: unknown) => Promise<unknown>;\n  /**\n   * A function validating response data. This is useful if you want to ensure\n   * the response conforms to the desired shape, so it can be safely passed to\n   * the transformers and returned to the user.\n   */\n  responseValidator?: (data: unknown) => Promise<unknown>;\n}\n\ntype IsExactlyNeverOrNeverUndefined<T> = [T] extends [never]\n  ? true\n  : [T] extends [never | undefined]\n    ? [undefined] extends [T]\n      ? false\n      : true\n    : false;\n\nexport type OmitNever<T extends Record<string, unknown>> = {\n  [K in keyof T as IsExactlyNeverOrNeverUndefined<T[K]> extends true ? never : K]: T[K];\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/svelte-query/axios/core/utils.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/svelte-query/axios/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport { apiVVersionODataControllerCount, callToTestOrderOfParams, callWithDefaultOptionalParameters, callWithDefaultParameters, callWithDescriptions, callWithDuplicateResponses, callWithNoContentResponse, callWithParameters, callWithResponse, callWithResponseAndNoContentResponse, callWithResponses, callWithResultFromHeader, callWithWeirdParameterNames, collectionFormat, complexParams, complexTypes, deleteCallWithoutParametersAndResponse, deleteFoo, deprecatedCall, dummyA, dummyB, duplicateName, duplicateName2, duplicateName3, duplicateName4, export_, fileResponse, fooWow, getApiVbyApiVersionSimpleOperation, getCallWithOptionalParam, getCallWithoutParametersAndResponse, headCallWithoutParametersAndResponse, import_, multipartRequest, multipartResponse, nonAsciiæøåÆøÅöôêÊ字符串, type Options, optionsCallWithoutParametersAndResponse, patchApiVbyApiVersionNoTag, patchCallWithoutParametersAndResponse, postApiVbyApiVersionFormData, postApiVbyApiVersionRequestBody, postCallWithOptionalParam, postCallWithoutParametersAndResponse, putCallWithoutParametersAndResponse, putWithFormUrlEncoded, testErrorCode, types, uploadFile } from './sdk.gen';\nexport type { _3eNum1Период, _400, AdditionalPropertiesIntegerIssue, AdditionalPropertiesUnknownIssue, AdditionalPropertiesUnknownIssue2, AdditionalPropertiesUnknownIssue3, AdditionalPropertiesUnknownIssueWritable, AnyOfAnyAndNull, AnyOfArrays, ApiVVersionODataControllerCountData, ApiVVersionODataControllerCountResponse, ApiVVersionODataControllerCountResponses, ArrayWithAnyOfProperties, ArrayWithArray, ArrayWithBooleans, ArrayWithNumbers, ArrayWithProperties, ArrayWithReferences, ArrayWithStrings, CallToTestOrderOfParamsData, CallWithDefaultOptionalParametersData, CallWithDefaultParametersData, CallWithDescriptionsData, CallWithDuplicateResponsesData, CallWithDuplicateResponsesError, CallWithDuplicateResponsesErrors, CallWithDuplicateResponsesResponse, CallWithDuplicateResponsesResponses, CallWithNoContentResponseData, CallWithNoContentResponseResponse, CallWithNoContentResponseResponses, CallWithParametersData, CallWithResponseAndNoContentResponseData, CallWithResponseAndNoContentResponseResponse, CallWithResponseAndNoContentResponseResponses, CallWithResponseData, CallWithResponseResponse, CallWithResponseResponses, CallWithResponsesData, CallWithResponsesError, CallWithResponsesErrors, CallWithResponsesResponse, CallWithResponsesResponses, CallWithResultFromHeaderData, CallWithResultFromHeaderErrors, CallWithResultFromHeaderResponses, CallWithWeirdParameterNamesData, CamelCaseCommentWithBreaks, CharactersInDescription, ClientOptions, CollectionFormatData, CommentWithBackticks, CommentWithBackticksAndQuotes, CommentWithBreaks, CommentWithExpressionPlaceholders, CommentWithQuotes, CommentWithReservedCharacters, CommentWithSlashes, ComplexParamsData, ComplexParamsResponse, ComplexParamsResponses, ComplexTypesData, ComplexTypesErrors, ComplexTypesResponse, ComplexTypesResponses, CompositionBaseModel, CompositionExtendedModel, CompositionWithAllOfAndNullable, CompositionWithAnyOf, CompositionWithAnyOfAndNullable, CompositionWithAnyOfAnonymous, CompositionWithNestedAnyAndTypeNull, CompositionWithNestedAnyOfAndNull, CompositionWithOneOf, CompositionWithOneOfAndComplexArrayDictionary, CompositionWithOneOfAndNullable, CompositionWithOneOfAndProperties, CompositionWithOneOfAndSimpleArrayDictionary, CompositionWithOneOfAndSimpleDictionary, CompositionWithOneOfAnonymous, CompositionWithOneOfDiscriminator, ConstValue, Default, DeleteCallWithoutParametersAndResponseData, DeleteFooData, DeleteFooData2, DeleteFooData3, DeprecatedCallData, DeprecatedModel, DictionaryWithArray, DictionaryWithDictionary, DictionaryWithProperties, DictionaryWithPropertiesAndAdditionalProperties, DictionaryWithReference, DictionaryWithString, DummyAData, DummyAResponse, DummyAResponses, DummyBData, DummyBResponse, DummyBResponses, DuplicateName2Data, DuplicateName3Data, DuplicateName4Data, DuplicateNameData, EnumFromDescription, EnumWithExtensions, EnumWithNumbers, EnumWithReplacedCharacters, EnumWithStrings, EnumWithXEnumNames, ExportData, ExternalRefA, ExternalRefB, ExternalSharedModel, File, FileResponseData, FileResponseResponse, FileResponseResponses, FileWritable, FooWowData, FooWowResponses, FreeFormObjectWithAdditionalPropertiesEqEmptyObject, FreeFormObjectWithAdditionalPropertiesEqTrue, FreeFormObjectWithoutAdditionalProperties, GenericSchemaDuplicateIssue1SystemBoolean, GenericSchemaDuplicateIssue1SystemBooleanWritable, GenericSchemaDuplicateIssue1SystemString, GenericSchemaDuplicateIssue1SystemStringWritable, GetApiVbyApiVersionSimpleOperationData, GetApiVbyApiVersionSimpleOperationError, GetApiVbyApiVersionSimpleOperationErrors, GetApiVbyApiVersionSimpleOperationResponse, GetApiVbyApiVersionSimpleOperationResponses, GetCallWithOptionalParamData, GetCallWithoutParametersAndResponseData, HeadCallWithoutParametersAndResponseData, Import, ImportData, ImportResponse, ImportResponses, IoK8sApimachineryPkgApisMetaV1DeleteOptions, IoK8sApimachineryPkgApisMetaV1Preconditions, ModelCircle, ModelFromZendesk, ModelSquare, ModelThatExtends, ModelThatExtendsExtends, ModelWithAdditionalPropertiesEqTrue, ModelWithAdditionalPropertiesRef, ModelWithAnyOfConstantSizeArray, ModelWithAnyOfConstantSizeArrayAndIntersect, ModelWithAnyOfConstantSizeArrayNullable, ModelWithAnyOfConstantSizeArrayWithNSizeAndOptions, ModelWithAnyOfConstantSizeArrayWithNSizeAndOptionsWritable, ModelWithArray, ModelWithArrayReadOnlyAndWriteOnly, ModelWithArrayReadOnlyAndWriteOnlyWritable, ModelWithBackticksInDescription, ModelWithBoolean, ModelWithCircularReference, ModelWithConst, ModelWithConstantSizeArray, ModelWithDictionary, ModelWithDuplicateImports, ModelWithDuplicateProperties, ModelWithEnum, ModelWithEnumFromDescription, ModelWithEnumWithHyphen, ModelWithInteger, ModelWithNestedArrayEnums, ModelWithNestedArrayEnumsData, ModelWithNestedArrayEnumsDataBar, ModelWithNestedArrayEnumsDataFoo, ModelWithNestedCompositionEnums, ModelWithNestedEnums, ModelWithNestedProperties, ModelWithNullableObject, ModelWithNullableString, ModelWithNumericEnumUnion, ModelWithOneOfAndProperties, ModelWithOneOfEnum, ModelWithOrderedProperties, ModelWithPattern, ModelWithPatternWritable, ModelWithPrefixItemsConstantSizeArray, ModelWithProperties, ModelWithPropertiesWritable, ModelWithReadOnlyAndWriteOnly, ModelWithReadOnlyAndWriteOnlyWritable, ModelWithReference, ModelWithReferenceWritable, ModelWithString, ModelWithStringError, MultipartRequestData, MultipartResponseData, MultipartResponseResponse, MultipartResponseResponses, NestedAnyOfArraysNullable, NonAsciiæøåÆøÅöôêÊ字符串Data, NonAsciiæøåÆøÅöôêÊ字符串Response, NonAsciiæøåÆøÅöôêÊ字符串Responses, NonAsciiStringæøåÆøÅöôêÊ字符串, NullableObject, OneOfAllOfIssue, OneOfAllOfIssueWritable, OptionsCallWithoutParametersAndResponseData, Pageable, ParameterSimpleParameterUnused, PatchApiVbyApiVersionNoTagData, PatchApiVbyApiVersionNoTagResponses, PatchCallWithoutParametersAndResponseData, PostApiVbyApiVersionFormDataData, PostApiVbyApiVersionRequestBodyData, PostCallWithOptionalParamData, PostCallWithOptionalParamResponse, PostCallWithOptionalParamResponses, PostCallWithoutParametersAndResponseData, PostServiceWithEmptyTagResponse, PostServiceWithEmptyTagResponse2, PutCallWithoutParametersAndResponseData, PutWithFormUrlEncodedData, SchemaWithFormRestrictedKeys, SimpleBoolean, SimpleFile, SimpleFormData, SimpleInteger, SimpleParameter, SimpleReference, SimpleRequestBody, SimpleString, SimpleStringWithPattern, TestErrorCodeData, TestErrorCodeErrors, TestErrorCodeResponses, TypesData, TypesResponse, TypesResponses, UploadFileData, UploadFileResponse, UploadFileResponses, XFooBar } from './types.gen';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/svelte-query/axios/sdk.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport { type Client, formDataBodySerializer, type Options as Options2, type TDataShape, urlSearchParamsBodySerializer } from './client';\nimport { client } from './client.gen';\nimport type { ApiVVersionODataControllerCountData, ApiVVersionODataControllerCountResponses, CallToTestOrderOfParamsData, CallWithDefaultOptionalParametersData, CallWithDefaultParametersData, CallWithDescriptionsData, CallWithDuplicateResponsesData, CallWithDuplicateResponsesErrors, CallWithDuplicateResponsesResponses, CallWithNoContentResponseData, CallWithNoContentResponseResponses, CallWithParametersData, CallWithResponseAndNoContentResponseData, CallWithResponseAndNoContentResponseResponses, CallWithResponseData, CallWithResponseResponses, CallWithResponsesData, CallWithResponsesErrors, CallWithResponsesResponses, CallWithResultFromHeaderData, CallWithResultFromHeaderErrors, CallWithResultFromHeaderResponses, CallWithWeirdParameterNamesData, CollectionFormatData, ComplexParamsData, ComplexParamsResponses, ComplexTypesData, ComplexTypesErrors, ComplexTypesResponses, DeleteCallWithoutParametersAndResponseData, DeleteFooData3, DeprecatedCallData, DummyAData, DummyAResponses, DummyBData, DummyBResponses, DuplicateName2Data, DuplicateName3Data, DuplicateName4Data, DuplicateNameData, ExportData, FileResponseData, FileResponseResponses, FooWowData, FooWowResponses, GetApiVbyApiVersionSimpleOperationData, GetApiVbyApiVersionSimpleOperationErrors, GetApiVbyApiVersionSimpleOperationResponses, GetCallWithOptionalParamData, GetCallWithoutParametersAndResponseData, HeadCallWithoutParametersAndResponseData, ImportData, ImportResponses, MultipartRequestData, MultipartResponseData, MultipartResponseResponses, NonAsciiæøåÆøÅöôêÊ字符串Data, NonAsciiæøåÆøÅöôêÊ字符串Responses, OptionsCallWithoutParametersAndResponseData, PatchApiVbyApiVersionNoTagData, PatchApiVbyApiVersionNoTagResponses, PatchCallWithoutParametersAndResponseData, PostApiVbyApiVersionFormDataData, PostApiVbyApiVersionRequestBodyData, PostCallWithOptionalParamData, PostCallWithOptionalParamResponses, PostCallWithoutParametersAndResponseData, PutCallWithoutParametersAndResponseData, PutWithFormUrlEncodedData, TestErrorCodeData, TestErrorCodeErrors, TestErrorCodeResponses, TypesData, TypesResponses, UploadFileData, UploadFileResponses } from './types.gen';\n\nexport type Options<TData extends TDataShape = TDataShape, ThrowOnError extends boolean = boolean> = Options2<TData, ThrowOnError> & {\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\nexport const export_ = <ThrowOnError extends boolean = false>(options?: Options<ExportData, ThrowOnError>) => (options?.client ?? client).get<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/no+tag', ...options });\n\nexport const patchApiVbyApiVersionNoTag = <ThrowOnError extends boolean = false>(options?: Options<PatchApiVbyApiVersionNoTagData, ThrowOnError>) => (options?.client ?? client).patch<PatchApiVbyApiVersionNoTagResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/no+tag', ...options });\n\nexport const import_ = <ThrowOnError extends boolean = false>(options: Options<ImportData, ThrowOnError>) => (options.client ?? client).post<ImportResponses, unknown, ThrowOnError>({\n    responseType: 'json',\n    url: '/api/v{api-version}/no+tag',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options.headers\n    }\n});\n\nexport const fooWow = <ThrowOnError extends boolean = false>(options?: Options<FooWowData, ThrowOnError>) => (options?.client ?? client).put<FooWowResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/no+tag', ...options });\n\nexport const apiVVersionODataControllerCount = <ThrowOnError extends boolean = false>(options?: Options<ApiVVersionODataControllerCountData, ThrowOnError>) => (options?.client ?? client).get<ApiVVersionODataControllerCountResponses, unknown, ThrowOnError>({\n    responseType: 'json',\n    url: '/api/v{api-version}/simple/$count',\n    ...options\n});\n\nexport const getApiVbyApiVersionSimpleOperation = <ThrowOnError extends boolean = false>(options: Options<GetApiVbyApiVersionSimpleOperationData, ThrowOnError>) => (options.client ?? client).get<GetApiVbyApiVersionSimpleOperationResponses, GetApiVbyApiVersionSimpleOperationErrors, ThrowOnError>({\n    responseType: 'json',\n    url: '/api/v{api-version}/simple:operation',\n    ...options\n});\n\nexport const deleteCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<DeleteCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).delete<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const getCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<GetCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).get<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const headCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<HeadCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).head<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const optionsCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<OptionsCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).options<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const patchCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<PatchCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).patch<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const postCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<PostCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).post<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const putCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<PutCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).put<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const deleteFoo = <ThrowOnError extends boolean = false>(options: Options<DeleteFooData3, ThrowOnError>) => (options.client ?? client).delete<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/foo/{foo_param}/bar/{BarParam}', ...options });\n\nexport const callWithDescriptions = <ThrowOnError extends boolean = false>(options?: Options<CallWithDescriptionsData, ThrowOnError>) => (options?.client ?? client).post<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/descriptions', ...options });\n\n/**\n * @deprecated\n */\nexport const deprecatedCall = <ThrowOnError extends boolean = false>(options: Options<DeprecatedCallData, ThrowOnError>) => (options.client ?? client).post<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/parameters/deprecated', ...options });\n\nexport const callWithParameters = <ThrowOnError extends boolean = false>(options: Options<CallWithParametersData, ThrowOnError>) => (options.client ?? client).post<unknown, unknown, ThrowOnError>({\n    url: '/api/v{api-version}/parameters/{parameterPath}',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options.headers\n    }\n});\n\nexport const callWithWeirdParameterNames = <ThrowOnError extends boolean = false>(options: Options<CallWithWeirdParameterNamesData, ThrowOnError>) => (options.client ?? client).post<unknown, unknown, ThrowOnError>({\n    url: '/api/v{api-version}/parameters/{parameter.path.1}/{parameter-path-2}/{PARAMETER-PATH-3}',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options.headers\n    }\n});\n\nexport const getCallWithOptionalParam = <ThrowOnError extends boolean = false>(options: Options<GetCallWithOptionalParamData, ThrowOnError>) => (options.client ?? client).get<unknown, unknown, ThrowOnError>({\n    url: '/api/v{api-version}/parameters',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options.headers\n    }\n});\n\nexport const postCallWithOptionalParam = <ThrowOnError extends boolean = false>(options: Options<PostCallWithOptionalParamData, ThrowOnError>) => (options.client ?? client).post<PostCallWithOptionalParamResponses, unknown, ThrowOnError>({\n    responseType: 'json',\n    url: '/api/v{api-version}/parameters',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options.headers\n    }\n});\n\nexport const postApiVbyApiVersionRequestBody = <ThrowOnError extends boolean = false>(options?: Options<PostApiVbyApiVersionRequestBodyData, ThrowOnError>) => (options?.client ?? client).post<unknown, unknown, ThrowOnError>({\n    url: '/api/v{api-version}/requestBody',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options?.headers\n    }\n});\n\nexport const postApiVbyApiVersionFormData = <ThrowOnError extends boolean = false>(options?: Options<PostApiVbyApiVersionFormDataData, ThrowOnError>) => (options?.client ?? client).post<unknown, unknown, ThrowOnError>({\n    ...formDataBodySerializer,\n    url: '/api/v{api-version}/formData',\n    ...options,\n    headers: {\n        'Content-Type': null,\n        ...options?.headers\n    }\n});\n\nexport const callWithDefaultParameters = <ThrowOnError extends boolean = false>(options?: Options<CallWithDefaultParametersData, ThrowOnError>) => (options?.client ?? client).get<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/defaults', ...options });\n\nexport const callWithDefaultOptionalParameters = <ThrowOnError extends boolean = false>(options?: Options<CallWithDefaultOptionalParametersData, ThrowOnError>) => (options?.client ?? client).post<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/defaults', ...options });\n\nexport const callToTestOrderOfParams = <ThrowOnError extends boolean = false>(options: Options<CallToTestOrderOfParamsData, ThrowOnError>) => (options.client ?? client).put<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/defaults', ...options });\n\nexport const duplicateName = <ThrowOnError extends boolean = false>(options?: Options<DuplicateNameData, ThrowOnError>) => (options?.client ?? client).delete<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/duplicate', ...options });\n\nexport const duplicateName2 = <ThrowOnError extends boolean = false>(options?: Options<DuplicateName2Data, ThrowOnError>) => (options?.client ?? client).get<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/duplicate', ...options });\n\nexport const duplicateName3 = <ThrowOnError extends boolean = false>(options?: Options<DuplicateName3Data, ThrowOnError>) => (options?.client ?? client).post<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/duplicate', ...options });\n\nexport const duplicateName4 = <ThrowOnError extends boolean = false>(options?: Options<DuplicateName4Data, ThrowOnError>) => (options?.client ?? client).put<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/duplicate', ...options });\n\nexport const callWithNoContentResponse = <ThrowOnError extends boolean = false>(options?: Options<CallWithNoContentResponseData, ThrowOnError>) => (options?.client ?? client).get<CallWithNoContentResponseResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/no-content', ...options });\n\nexport const callWithResponseAndNoContentResponse = <ThrowOnError extends boolean = false>(options?: Options<CallWithResponseAndNoContentResponseData, ThrowOnError>) => (options?.client ?? client).get<CallWithResponseAndNoContentResponseResponses, unknown, ThrowOnError>({\n    responseType: 'json',\n    url: '/api/v{api-version}/multiple-tags/response-and-no-content',\n    ...options\n});\n\nexport const dummyA = <ThrowOnError extends boolean = false>(options?: Options<DummyAData, ThrowOnError>) => (options?.client ?? client).get<DummyAResponses, unknown, ThrowOnError>({\n    responseType: 'json',\n    url: '/api/v{api-version}/multiple-tags/a',\n    ...options\n});\n\nexport const dummyB = <ThrowOnError extends boolean = false>(options?: Options<DummyBData, ThrowOnError>) => (options?.client ?? client).get<DummyBResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/multiple-tags/b', ...options });\n\nexport const callWithResponse = <ThrowOnError extends boolean = false>(options?: Options<CallWithResponseData, ThrowOnError>) => (options?.client ?? client).get<CallWithResponseResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/response', ...options });\n\nexport const callWithDuplicateResponses = <ThrowOnError extends boolean = false>(options?: Options<CallWithDuplicateResponsesData, ThrowOnError>) => (options?.client ?? client).post<CallWithDuplicateResponsesResponses, CallWithDuplicateResponsesErrors, ThrowOnError>({\n    responseType: 'json',\n    url: '/api/v{api-version}/response',\n    ...options\n});\n\nexport const callWithResponses = <ThrowOnError extends boolean = false>(options?: Options<CallWithResponsesData, ThrowOnError>) => (options?.client ?? client).put<CallWithResponsesResponses, CallWithResponsesErrors, ThrowOnError>({\n    responseType: 'json',\n    url: '/api/v{api-version}/response',\n    ...options\n});\n\nexport const collectionFormat = <ThrowOnError extends boolean = false>(options: Options<CollectionFormatData, ThrowOnError>) => (options.client ?? client).get<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/collectionFormat', ...options });\n\nexport const types = <ThrowOnError extends boolean = false>(options: Options<TypesData, ThrowOnError>) => (options.client ?? client).get<TypesResponses, unknown, ThrowOnError>({\n    responseType: 'json',\n    url: '/api/v{api-version}/types',\n    ...options\n});\n\nexport const uploadFile = <ThrowOnError extends boolean = false>(options: Options<UploadFileData, ThrowOnError>) => (options.client ?? client).post<UploadFileResponses, unknown, ThrowOnError>({\n    ...urlSearchParamsBodySerializer,\n    responseType: 'json',\n    url: '/api/v{api-version}/upload',\n    ...options,\n    headers: {\n        'Content-Type': 'application/x-www-form-urlencoded',\n        ...options.headers\n    }\n});\n\nexport const fileResponse = <ThrowOnError extends boolean = false>(options: Options<FileResponseData, ThrowOnError>) => (options.client ?? client).get<FileResponseResponses, unknown, ThrowOnError>({\n    responseType: 'blob',\n    url: '/api/v{api-version}/file/{id}',\n    ...options\n});\n\nexport const complexTypes = <ThrowOnError extends boolean = false>(options: Options<ComplexTypesData, ThrowOnError>) => (options.client ?? client).get<ComplexTypesResponses, ComplexTypesErrors, ThrowOnError>({\n    querySerializer: { parameters: { parameterObject: { object: { style: 'form' } } } },\n    responseType: 'json',\n    url: '/api/v{api-version}/complex',\n    ...options\n});\n\nexport const multipartResponse = <ThrowOnError extends boolean = false>(options?: Options<MultipartResponseData, ThrowOnError>) => (options?.client ?? client).get<MultipartResponseResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/multipart', ...options });\n\nexport const multipartRequest = <ThrowOnError extends boolean = false>(options?: Options<MultipartRequestData, ThrowOnError>) => (options?.client ?? client).post<unknown, unknown, ThrowOnError>({\n    ...formDataBodySerializer,\n    url: '/api/v{api-version}/multipart',\n    ...options,\n    headers: {\n        'Content-Type': null,\n        ...options?.headers\n    }\n});\n\nexport const complexParams = <ThrowOnError extends boolean = false>(options: Options<ComplexParamsData, ThrowOnError>) => (options.client ?? client).put<ComplexParamsResponses, unknown, ThrowOnError>({\n    responseType: 'json',\n    url: '/api/v{api-version}/complex/{id}',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json-patch+json',\n        ...options.headers\n    }\n});\n\nexport const callWithResultFromHeader = <ThrowOnError extends boolean = false>(options?: Options<CallWithResultFromHeaderData, ThrowOnError>) => (options?.client ?? client).post<CallWithResultFromHeaderResponses, CallWithResultFromHeaderErrors, ThrowOnError>({ url: '/api/v{api-version}/header', ...options });\n\nexport const testErrorCode = <ThrowOnError extends boolean = false>(options: Options<TestErrorCodeData, ThrowOnError>) => (options.client ?? client).post<TestErrorCodeResponses, TestErrorCodeErrors, ThrowOnError>({ url: '/api/v{api-version}/error', ...options });\n\nexport const nonAsciiæøåÆøÅöôêÊ字符串 = <ThrowOnError extends boolean = false>(options: Options<NonAsciiæøåÆøÅöôêÊ字符串Data, ThrowOnError>) => (options.client ?? client).post<NonAsciiæøåÆøÅöôêÊ字符串Responses, unknown, ThrowOnError>({\n    responseType: 'json',\n    url: '/api/v{api-version}/non-ascii-æøåÆØÅöôêÊ字符串',\n    ...options\n});\n\n/**\n * Login User\n */\nexport const putWithFormUrlEncoded = <ThrowOnError extends boolean = false>(options: Options<PutWithFormUrlEncodedData, ThrowOnError>) => (options.client ?? client).put<unknown, unknown, ThrowOnError>({\n    ...urlSearchParamsBodySerializer,\n    url: '/api/v{api-version}/non-ascii-æøåÆØÅöôêÊ字符串',\n    ...options,\n    headers: {\n        'Content-Type': 'application/x-www-form-urlencoded',\n        ...options.headers\n    }\n});\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/svelte-query/axios/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type ClientOptions = {\n    baseURL: 'http://localhost:3000/base' | (string & {});\n};\n\n/**\n * Model with number-only name\n */\nexport type _400 = string;\n\nexport type ExternalRefA = ExternalSharedModel;\n\nexport type ExternalRefB = ExternalSharedModel;\n\n/**\n * Testing multiline comments in string: First line\n * Second line\n *\n * Fourth line\n */\nexport type CamelCaseCommentWithBreaks = number;\n\n/**\n * Testing multiline comments in string: First line\n * Second line\n *\n * Fourth line\n */\nexport type CommentWithBreaks = number;\n\n/**\n * Testing backticks in string: `backticks` and ```multiple backticks``` should work\n */\nexport type CommentWithBackticks = number;\n\n/**\n * Testing backticks and quotes in string: `backticks`, 'quotes', \"double quotes\" and ```multiple backticks``` should work\n */\nexport type CommentWithBackticksAndQuotes = number;\n\n/**\n * Testing slashes in string: \\backwards\\\\\\ and /forwards/// should work\n */\nexport type CommentWithSlashes = number;\n\n/**\n * Testing expression placeholders in string: ${expression} should work\n */\nexport type CommentWithExpressionPlaceholders = number;\n\n/**\n * Testing quotes in string: 'single quote''' and \"double quotes\"\"\" should work\n */\nexport type CommentWithQuotes = number;\n\n/**\n * Testing reserved characters in string: * inline * and ** inline ** should work\n */\nexport type CommentWithReservedCharacters = number;\n\n/**\n * This is a simple number\n */\nexport type SimpleInteger = number;\n\n/**\n * This is a simple boolean\n */\nexport type SimpleBoolean = boolean;\n\n/**\n * This is a simple string\n */\nexport type SimpleString = string;\n\n/**\n * A string with non-ascii (unicode) characters valid in typescript identifiers (æøåÆØÅöÔèÈ字符串)\n */\nexport type NonAsciiStringæøåÆøÅöôêÊ字符串 = string;\n\n/**\n * This is a simple file\n */\nexport type SimpleFile = Blob | File;\n\n/**\n * This is a simple reference\n */\nexport type SimpleReference = ModelWithString;\n\n/**\n * This is a simple string\n */\nexport type SimpleStringWithPattern = string | null;\n\n/**\n * This is a simple enum with strings\n */\nexport type EnumWithStrings = 'Success' | 'Warning' | 'Error' | '\\'Single Quote\\'' | '\"Double Quotes\"' | 'Non-ascii: øæåôöØÆÅÔÖ字符串';\n\nexport type EnumWithReplacedCharacters = '\\'Single Quote\\'' | '\"Double Quotes\"' | 'øæåôöØÆÅÔÖ字符串' | 3.1 | '';\n\n/**\n * This is a simple enum with numbers\n */\nexport type EnumWithNumbers = 1 | 2 | 3 | 1.1 | 1.2 | 1.3 | 100 | 200 | 300 | -100 | -200 | -300 | -1.1 | -1.2 | -1.3;\n\n/**\n * Success=1,Warning=2,Error=3\n */\nexport type EnumFromDescription = number;\n\n/**\n * This is a simple enum with numbers\n */\nexport type EnumWithExtensions = 200 | 400 | 500;\n\nexport type EnumWithXEnumNames = 0 | 1 | 2;\n\n/**\n * This is a simple array with numbers\n */\nexport type ArrayWithNumbers = Array<number>;\n\n/**\n * This is a simple array with booleans\n */\nexport type ArrayWithBooleans = Array<boolean>;\n\n/**\n * This is a simple array with strings\n */\nexport type ArrayWithStrings = Array<string>;\n\n/**\n * This is a simple array with references\n */\nexport type ArrayWithReferences = Array<ModelWithString>;\n\n/**\n * This is a simple array containing an array\n */\nexport type ArrayWithArray = Array<Array<ModelWithString>>;\n\n/**\n * This is a simple array with properties\n */\nexport type ArrayWithProperties = Array<{\n    '16x16'?: CamelCaseCommentWithBreaks;\n    bar?: string;\n}>;\n\n/**\n * This is a simple array with any of properties\n */\nexport type ArrayWithAnyOfProperties = Array<{\n    foo?: string;\n} | {\n    bar?: string;\n}>;\n\nexport type AnyOfAnyAndNull = {\n    data?: unknown;\n};\n\n/**\n * This is a simple array with any of properties\n */\nexport type AnyOfArrays = {\n    results?: Array<{\n        foo?: string;\n    } | {\n        bar?: string;\n    }>;\n};\n\n/**\n * This is a string dictionary\n */\nexport type DictionaryWithString = {\n    [key: string]: string;\n};\n\nexport type DictionaryWithPropertiesAndAdditionalProperties = {\n    foo?: number;\n    bar?: boolean;\n    [key: string]: string | number | boolean | undefined;\n};\n\n/**\n * This is a string reference\n */\nexport type DictionaryWithReference = {\n    [key: string]: ModelWithString;\n};\n\n/**\n * This is a complex dictionary\n */\nexport type DictionaryWithArray = {\n    [key: string]: Array<ModelWithString>;\n};\n\n/**\n * This is a string dictionary\n */\nexport type DictionaryWithDictionary = {\n    [key: string]: {\n        [key: string]: string;\n    };\n};\n\n/**\n * This is a complex dictionary\n */\nexport type DictionaryWithProperties = {\n    [key: string]: {\n        foo?: string;\n        bar?: string;\n    };\n};\n\n/**\n * This is a model with one number property\n */\nexport type ModelWithInteger = {\n    /**\n     * This is a simple number property\n     */\n    prop?: number;\n};\n\n/**\n * This is a model with one boolean property\n */\nexport type ModelWithBoolean = {\n    /**\n     * This is a simple boolean property\n     */\n    prop?: boolean;\n};\n\n/**\n * This is a model with one string property\n */\nexport type ModelWithString = {\n    /**\n     * This is a simple string property\n     */\n    prop?: string;\n};\n\n/**\n * This is a model with one string property\n */\nexport type ModelWithStringError = {\n    /**\n     * This is a simple string property\n     */\n    prop?: string;\n};\n\n/**\n * `Comment` or `VoiceComment`. The JSON object for adding voice comments to tickets is different. See [Adding voice comments to tickets](/documentation/ticketing/managing-tickets/adding-voice-comments-to-tickets)\n */\nexport type ModelFromZendesk = string;\n\n/**\n * This is a model with one string property\n */\nexport type ModelWithNullableString = {\n    /**\n     * This is a simple string property\n     */\n    nullableProp1?: string | null;\n    /**\n     * This is a simple string property\n     */\n    nullableRequiredProp1: string | null;\n    /**\n     * This is a simple string property\n     */\n    nullableProp2?: string | null;\n    /**\n     * This is a simple string property\n     */\n    nullableRequiredProp2: string | null;\n    /**\n     * This is a simple enum with strings\n     */\n    'foo_bar-enum'?: 'Success' | 'Warning' | 'Error' | 'ØÆÅ字符串';\n};\n\n/**\n * This is a model with one enum\n */\nexport type ModelWithEnum = {\n    /**\n     * This is a simple enum with strings\n     */\n    'foo_bar-enum'?: 'Success' | 'Warning' | 'Error' | 'ØÆÅ字符串';\n    /**\n     * These are the HTTP error code enums\n     */\n    statusCode?: '100' | '200 FOO' | '300 FOO_BAR' | '400 foo-bar' | '500 foo.bar' | '600 foo&bar';\n    /**\n     * Simple boolean enum\n     */\n    bool?: true;\n};\n\n/**\n * This is a model with one enum with escaped name\n */\nexport type ModelWithEnumWithHyphen = {\n    /**\n     * Foo-Bar-Baz-Qux\n     */\n    'foo-bar-baz-qux'?: '3.0';\n};\n\n/**\n * This is a model with one enum\n */\nexport type ModelWithEnumFromDescription = {\n    /**\n     * Success=1,Warning=2,Error=3\n     */\n    test?: number;\n};\n\n/**\n * This is a model with nested enums\n */\nexport type ModelWithNestedEnums = {\n    dictionaryWithEnum?: {\n        [key: string]: 'Success' | 'Warning' | 'Error';\n    };\n    dictionaryWithEnumFromDescription?: {\n        [key: string]: number;\n    };\n    arrayWithEnum?: Array<'Success' | 'Warning' | 'Error'>;\n    arrayWithDescription?: Array<number>;\n    /**\n     * This is a simple enum with strings\n     */\n    'foo_bar-enum'?: 'Success' | 'Warning' | 'Error' | 'ØÆÅ字符串';\n};\n\n/**\n * This is a model with one property containing a reference\n */\nexport type ModelWithReference = {\n    prop?: ModelWithProperties;\n};\n\n/**\n * This is a model with one property containing an array\n */\nexport type ModelWithArrayReadOnlyAndWriteOnly = {\n    prop?: Array<ModelWithReadOnlyAndWriteOnly>;\n    propWithFile?: Array<Blob | File>;\n    propWithNumber?: Array<number>;\n};\n\n/**\n * This is a model with one property containing an array\n */\nexport type ModelWithArray = {\n    prop?: Array<ModelWithString>;\n    propWithFile?: Array<Blob | File>;\n    propWithNumber?: Array<number>;\n};\n\n/**\n * This is a model with one property containing a dictionary\n */\nexport type ModelWithDictionary = {\n    prop?: {\n        [key: string]: string;\n    };\n};\n\n/**\n * This is a deprecated model with a deprecated property\n *\n * @deprecated\n */\nexport type DeprecatedModel = {\n    /**\n     * This is a deprecated property\n     *\n     * @deprecated\n     */\n    prop?: string;\n};\n\n/**\n * This is a model with one property containing a circular reference\n */\nexport type ModelWithCircularReference = {\n    prop?: ModelWithCircularReference;\n};\n\n/**\n * This is a model with one property with a 'one of' relationship\n */\nexport type CompositionWithOneOf = {\n    propA?: ModelWithString | ModelWithEnum | ModelWithArray | ModelWithDictionary;\n};\n\n/**\n * This is a model with one property with a 'one of' relationship where the options are not $ref\n */\nexport type CompositionWithOneOfAnonymous = {\n    propA?: {\n        propA?: string;\n    } | string | number;\n};\n\n/**\n * Circle\n */\nexport type ModelCircle = {\n    kind: string;\n    radius?: number;\n};\n\n/**\n * Square\n */\nexport type ModelSquare = {\n    kind: string;\n    sideLength?: number;\n};\n\n/**\n * This is a model with one property with a 'one of' relationship where the options are not $ref\n */\nexport type CompositionWithOneOfDiscriminator = ({\n    kind: 'circle';\n} & ModelCircle) | ({\n    kind: 'square';\n} & ModelSquare);\n\n/**\n * This is a model with one property with a 'any of' relationship\n */\nexport type CompositionWithAnyOf = {\n    propA?: ModelWithString | ModelWithEnum | ModelWithArray | ModelWithDictionary;\n};\n\n/**\n * This is a model with one property with a 'any of' relationship where the options are not $ref\n */\nexport type CompositionWithAnyOfAnonymous = {\n    propA?: {\n        propA?: string;\n    } | string | number;\n};\n\n/**\n * This is a model with nested 'any of' property with a type null\n */\nexport type CompositionWithNestedAnyAndTypeNull = {\n    propA?: Array<ModelWithDictionary | null> | Array<ModelWithArray | null>;\n};\n\nexport type _3eNum1Период = 'Bird' | 'Dog';\n\nexport type ConstValue = 'ConstValue';\n\n/**\n * This is a model with one property with a 'any of' relationship where the options are not $ref\n */\nexport type CompositionWithNestedAnyOfAndNull = {\n    propA?: Array<_3eNum1Период | ConstValue> | null;\n};\n\n/**\n * This is a model with one property with a 'one of' relationship\n */\nexport type CompositionWithOneOfAndNullable = {\n    propA?: {\n        boolean?: boolean;\n    } | ModelWithEnum | ModelWithArray | ModelWithDictionary | null;\n};\n\n/**\n * This is a model that contains a simple dictionary within composition\n */\nexport type CompositionWithOneOfAndSimpleDictionary = {\n    propA?: boolean | {\n        [key: string]: number;\n    };\n};\n\n/**\n * This is a model that contains a dictionary of simple arrays within composition\n */\nexport type CompositionWithOneOfAndSimpleArrayDictionary = {\n    propA?: boolean | {\n        [key: string]: Array<boolean>;\n    };\n};\n\n/**\n * This is a model that contains a dictionary of complex arrays (composited) within composition\n */\nexport type CompositionWithOneOfAndComplexArrayDictionary = {\n    propA?: boolean | {\n        [key: string]: Array<number | string>;\n    };\n};\n\n/**\n * This is a model with one property with a 'all of' relationship\n */\nexport type CompositionWithAllOfAndNullable = {\n    propA?: ({\n        boolean?: boolean;\n    } & ModelWithEnum & ModelWithArray & ModelWithDictionary) | null;\n};\n\n/**\n * This is a model with one property with a 'any of' relationship\n */\nexport type CompositionWithAnyOfAndNullable = {\n    propA?: {\n        boolean?: boolean;\n    } | ModelWithEnum | ModelWithArray | ModelWithDictionary | null;\n};\n\n/**\n * This is a base model with two simple optional properties\n */\nexport type CompositionBaseModel = {\n    firstName?: string;\n    lastname?: string;\n};\n\n/**\n * This is a model that extends the base model\n */\nexport type CompositionExtendedModel = CompositionBaseModel & {\n    age: number;\n    firstName: string;\n    lastname: string;\n};\n\n/**\n * This is a model with one nested property\n */\nexport type ModelWithProperties = {\n    required: string;\n    readonly requiredAndReadOnly: string;\n    requiredAndNullable: string | null;\n    string?: string;\n    number?: number;\n    boolean?: boolean;\n    reference?: ModelWithString;\n    'property with space'?: string;\n    default?: string;\n    try?: string;\n    readonly '@namespace.string'?: string;\n    readonly '@namespace.integer'?: number;\n};\n\n/**\n * This is a model with one nested property\n */\nexport type ModelWithNestedProperties = {\n    readonly first: {\n        readonly second: {\n            readonly third: string | null;\n        } | null;\n    } | null;\n};\n\n/**\n * This is a model with duplicated properties\n */\nexport type ModelWithDuplicateProperties = {\n    prop?: ModelWithString;\n};\n\n/**\n * This is a model with ordered properties\n */\nexport type ModelWithOrderedProperties = {\n    zebra?: string;\n    apple?: string;\n    hawaii?: string;\n};\n\n/**\n * This is a model with duplicated imports\n */\nexport type ModelWithDuplicateImports = {\n    propA?: ModelWithString;\n    propB?: ModelWithString;\n    propC?: ModelWithString;\n};\n\n/**\n * This is a model that extends another model\n */\nexport type ModelThatExtends = ModelWithString & {\n    propExtendsA?: string;\n    propExtendsB?: ModelWithString;\n};\n\n/**\n * This is a model that extends another model\n */\nexport type ModelThatExtendsExtends = ModelWithString & ModelThatExtends & {\n    propExtendsC?: string;\n    propExtendsD?: ModelWithString;\n};\n\n/**\n * This is a model that contains a some patterns\n */\nexport type ModelWithPattern = {\n    key: string;\n    name: string;\n    readonly enabled?: boolean;\n    readonly modified?: string;\n    id?: string;\n    text?: string;\n    patternWithSingleQuotes?: string;\n    patternWithNewline?: string;\n    patternWithBacktick?: string;\n    patternWithUnicode?: string;\n};\n\nexport type File = {\n    /**\n     * Id\n     */\n    readonly id?: string;\n    /**\n     * Updated at\n     */\n    readonly updated_at?: string;\n    /**\n     * Created at\n     */\n    readonly created_at?: string;\n    /**\n     * Mime\n     */\n    mime: string;\n    /**\n     * File\n     */\n    readonly file?: string;\n};\n\nexport type Default = {\n    name?: string;\n};\n\nexport type Pageable = {\n    page?: number;\n    size?: number;\n    sort?: Array<string>;\n};\n\n/**\n * This is a free-form object without additionalProperties.\n */\nexport type FreeFormObjectWithoutAdditionalProperties = {\n    [key: string]: unknown;\n};\n\n/**\n * This is a free-form object with additionalProperties: true.\n */\nexport type FreeFormObjectWithAdditionalPropertiesEqTrue = {\n    [key: string]: unknown;\n};\n\n/**\n * This is a free-form object with additionalProperties: {}.\n */\nexport type FreeFormObjectWithAdditionalPropertiesEqEmptyObject = {\n    [key: string]: unknown;\n};\n\nexport type ModelWithConst = {\n    String?: 'String';\n    number?: 0;\n    null?: unknown;\n    withType?: 'Some string';\n};\n\n/**\n * This is a model with one property and additionalProperties: true\n */\nexport type ModelWithAdditionalPropertiesEqTrue = {\n    /**\n     * This is a simple string property\n     */\n    prop?: string;\n    [key: string]: unknown;\n};\n\nexport type NestedAnyOfArraysNullable = {\n    nullableArray?: Array<string | boolean> | null;\n};\n\nexport type CompositionWithOneOfAndProperties = ({\n    foo: SimpleParameter;\n} | {\n    bar: NonAsciiStringæøåÆøÅöôêÊ字符串;\n}) & {\n    baz: number | null;\n    qux: number;\n};\n\n/**\n * An object that can be null\n */\nexport type NullableObject = {\n    foo?: string;\n} | null;\n\n/**\n * Some % character\n */\nexport type CharactersInDescription = string;\n\nexport type ModelWithNullableObject = {\n    data?: NullableObject;\n};\n\n/**\n * An object with additional properties that can be null\n */\nexport type ModelWithAdditionalPropertiesRef = {\n    [key: string]: NullableObject | null;\n};\n\nexport type ModelWithOneOfEnum = {\n    foo: 'Bar';\n} | {\n    foo: 'Baz';\n} | {\n    foo: 'Qux';\n} | {\n    content: string;\n    foo: 'Quux';\n} | {\n    content: [\n        string,\n        string\n    ];\n    foo: 'Corge';\n};\n\nexport type ModelWithNestedArrayEnumsDataFoo = 'foo' | 'bar';\n\nexport type ModelWithNestedArrayEnumsDataBar = 'baz' | 'qux';\n\nexport type ModelWithNestedArrayEnumsData = {\n    foo?: Array<ModelWithNestedArrayEnumsDataFoo>;\n    bar?: Array<ModelWithNestedArrayEnumsDataBar>;\n};\n\nexport type ModelWithNestedArrayEnums = {\n    array_strings?: Array<string>;\n    data?: ModelWithNestedArrayEnumsData;\n};\n\nexport type ModelWithNestedCompositionEnums = {\n    foo?: ModelWithNestedArrayEnumsDataFoo;\n};\n\nexport type ModelWithReadOnlyAndWriteOnly = {\n    foo: string;\n    readonly bar: string;\n};\n\nexport type ModelWithConstantSizeArray = [\n    number,\n    number\n];\n\nexport type ModelWithAnyOfConstantSizeArray = [\n    number | string,\n    number | string,\n    number | string\n];\n\nexport type ModelWithPrefixItemsConstantSizeArray = Array<ModelWithInteger | number | string>;\n\nexport type ModelWithAnyOfConstantSizeArrayNullable = [\n    number | null | string,\n    number | null | string,\n    number | null | string\n];\n\nexport type ModelWithAnyOfConstantSizeArrayWithNSizeAndOptions = [\n    number | Import,\n    number | Import\n];\n\nexport type ModelWithAnyOfConstantSizeArrayAndIntersect = [\n    number & string,\n    number & string\n];\n\nexport type ModelWithNumericEnumUnion = {\n    /**\n     * Период\n     */\n    value?: -10 | -1 | 0 | 1 | 3 | 6 | 12;\n};\n\n/**\n * Some description with `back ticks`\n */\nexport type ModelWithBackticksInDescription = {\n    /**\n     * The template `that` should be used for parsing and importing the contents of the CSV file.\n     *\n     * <br/><p>There is one placeholder currently supported:<ul>     <li><b>${x}</b> - refers to the n-th column in the CSV file, e.g. ${1}, ${2}, ...)</li></ul><p>Example of a correct JSON template:</p>\n     * <pre>\n     * [\n     * {\n     * \"resourceType\": \"Asset\",\n     * \"identifier\": {\n     * \"name\": \"${1}\",\n     * \"domain\": {\n     * \"name\": \"${2}\",\n     * \"community\": {\n     * \"name\": \"Some Community\"\n     * }\n     * }\n     * },\n     * \"attributes\" : {\n     * \"00000000-0000-0000-0000-000000003115\" : [ {\n     * \"value\" : \"${3}\"\n     * } ],\n     * \"00000000-0000-0000-0000-000000000222\" : [ {\n     * \"value\" : \"${4}\"\n     * } ]\n     * }\n     * }\n     * ]\n     * </pre>\n     */\n    template?: string;\n};\n\nexport type ModelWithOneOfAndProperties = (SimpleParameter | NonAsciiStringæøåÆøÅöôêÊ字符串) & {\n    baz: number | null;\n    qux: number;\n};\n\n/**\n * Model used to test deduplication strategy (unused)\n */\nexport type ParameterSimpleParameterUnused = string;\n\n/**\n * Model used to test deduplication strategy\n */\nexport type PostServiceWithEmptyTagResponse = string;\n\n/**\n * Model used to test deduplication strategy\n */\nexport type PostServiceWithEmptyTagResponse2 = string;\n\n/**\n * Model used to test deduplication strategy\n */\nexport type DeleteFooData = string;\n\n/**\n * Model used to test deduplication strategy\n */\nexport type DeleteFooData2 = string;\n\n/**\n * Model with restricted keyword name\n */\nexport type Import = string;\n\nexport type SchemaWithFormRestrictedKeys = {\n    description?: string;\n    'x-enum-descriptions'?: string;\n    'x-enum-varnames'?: string;\n    'x-enumNames'?: string;\n    title?: string;\n    object?: {\n        description?: string;\n        'x-enum-descriptions'?: string;\n        'x-enum-varnames'?: string;\n        'x-enumNames'?: string;\n        title?: string;\n    };\n    array?: Array<{\n        description?: string;\n        'x-enum-descriptions'?: string;\n        'x-enum-varnames'?: string;\n        'x-enumNames'?: string;\n        title?: string;\n    }>;\n};\n\n/**\n * This schema was giving PascalCase transformations a hard time\n */\nexport type IoK8sApimachineryPkgApisMetaV1DeleteOptions = {\n    /**\n     * Must be fulfilled before a deletion is carried out. If not possible, a 409 Conflict status will be returned.\n     */\n    preconditions?: IoK8sApimachineryPkgApisMetaV1Preconditions;\n};\n\n/**\n * This schema was giving PascalCase transformations a hard time\n */\nexport type IoK8sApimachineryPkgApisMetaV1Preconditions = {\n    /**\n     * Specifies the target ResourceVersion\n     */\n    resourceVersion?: string;\n    /**\n     * Specifies the target UID.\n     */\n    uid?: string;\n};\n\nexport type AdditionalPropertiesUnknownIssue = {\n    [key: string]: string | number;\n};\n\nexport type AdditionalPropertiesUnknownIssue2 = {\n    [key: string]: string | number;\n};\n\nexport type AdditionalPropertiesUnknownIssue3 = string & {\n    entries: {\n        [key: string]: AdditionalPropertiesUnknownIssue;\n    };\n};\n\nexport type AdditionalPropertiesIntegerIssue = {\n    value: number;\n    [key: string]: number;\n};\n\nexport type OneOfAllOfIssue = ((ConstValue | GenericSchemaDuplicateIssue1SystemBoolean) & _3eNum1Период) | GenericSchemaDuplicateIssue1SystemString;\n\nexport type GenericSchemaDuplicateIssue1SystemBoolean = {\n    item?: boolean;\n    error?: string | null;\n    readonly hasError?: boolean;\n    data?: {\n        [key: string]: never;\n    };\n};\n\nexport type GenericSchemaDuplicateIssue1SystemString = {\n    item?: string | null;\n    error?: string | null;\n    readonly hasError?: boolean;\n};\n\nexport type ExternalSharedModel = {\n    id: string;\n    name?: string;\n};\n\n/**\n * This is a model with one property containing a reference\n */\nexport type ModelWithReferenceWritable = {\n    prop?: ModelWithPropertiesWritable;\n};\n\n/**\n * This is a model with one property containing an array\n */\nexport type ModelWithArrayReadOnlyAndWriteOnlyWritable = {\n    prop?: Array<ModelWithReadOnlyAndWriteOnlyWritable>;\n    propWithFile?: Array<Blob | File>;\n    propWithNumber?: Array<number>;\n};\n\n/**\n * This is a model with one nested property\n */\nexport type ModelWithPropertiesWritable = {\n    required: string;\n    requiredAndNullable: string | null;\n    string?: string;\n    number?: number;\n    boolean?: boolean;\n    reference?: ModelWithString;\n    'property with space'?: string;\n    default?: string;\n    try?: string;\n};\n\n/**\n * This is a model that contains a some patterns\n */\nexport type ModelWithPatternWritable = {\n    key: string;\n    name: string;\n    id?: string;\n    text?: string;\n    patternWithSingleQuotes?: string;\n    patternWithNewline?: string;\n    patternWithBacktick?: string;\n    patternWithUnicode?: string;\n};\n\nexport type FileWritable = {\n    /**\n     * Mime\n     */\n    mime: string;\n};\n\nexport type ModelWithReadOnlyAndWriteOnlyWritable = {\n    foo: string;\n    baz: string;\n};\n\nexport type ModelWithAnyOfConstantSizeArrayWithNSizeAndOptionsWritable = [\n    number | Import,\n    number | Import\n];\n\nexport type AdditionalPropertiesUnknownIssueWritable = {\n    [key: string]: string | number;\n};\n\nexport type OneOfAllOfIssueWritable = ((ConstValue | GenericSchemaDuplicateIssue1SystemBoolean) & _3eNum1Период) | GenericSchemaDuplicateIssue1SystemString;\n\nexport type GenericSchemaDuplicateIssue1SystemBooleanWritable = {\n    item?: boolean;\n    error?: string | null;\n    data?: {\n        [key: string]: never;\n    };\n};\n\nexport type GenericSchemaDuplicateIssue1SystemStringWritable = {\n    item?: string | null;\n    error?: string | null;\n};\n\n/**\n * This is a reusable parameter\n */\nexport type SimpleParameter = string;\n\n/**\n * Parameter with illegal characters\n */\nexport type XFooBar = ModelWithString;\n\nexport type SimpleRequestBody = ModelWithString;\n\nexport type SimpleFormData = ModelWithString;\n\nexport type ExportData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no+tag';\n};\n\nexport type PatchApiVbyApiVersionNoTagData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no+tag';\n};\n\nexport type PatchApiVbyApiVersionNoTagResponses = {\n    /**\n     * OK\n     */\n    default: unknown;\n};\n\nexport type ImportData = {\n    body: ModelWithReadOnlyAndWriteOnlyWritable | ModelWithArrayReadOnlyAndWriteOnlyWritable;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no+tag';\n};\n\nexport type ImportResponses = {\n    /**\n     * Success\n     */\n    200: ModelFromZendesk;\n    /**\n     * Default success response\n     */\n    default: ModelWithReadOnlyAndWriteOnly;\n};\n\nexport type ImportResponse = ImportResponses[keyof ImportResponses];\n\nexport type FooWowData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no+tag';\n};\n\nexport type FooWowResponses = {\n    /**\n     * OK\n     */\n    default: unknown;\n};\n\nexport type ApiVVersionODataControllerCountData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple/$count';\n};\n\nexport type ApiVVersionODataControllerCountResponses = {\n    /**\n     * Success\n     */\n    200: ModelFromZendesk;\n};\n\nexport type ApiVVersionODataControllerCountResponse = ApiVVersionODataControllerCountResponses[keyof ApiVVersionODataControllerCountResponses];\n\nexport type GetApiVbyApiVersionSimpleOperationData = {\n    body?: never;\n    path: {\n        /**\n         * foo in method\n         */\n        foo_param: string;\n    };\n    query?: never;\n    url: '/api/v{api-version}/simple:operation';\n};\n\nexport type GetApiVbyApiVersionSimpleOperationErrors = {\n    /**\n     * Default error response\n     */\n    default: ModelWithBoolean;\n};\n\nexport type GetApiVbyApiVersionSimpleOperationError = GetApiVbyApiVersionSimpleOperationErrors[keyof GetApiVbyApiVersionSimpleOperationErrors];\n\nexport type GetApiVbyApiVersionSimpleOperationResponses = {\n    /**\n     * Response is a simple number\n     */\n    200: number;\n};\n\nexport type GetApiVbyApiVersionSimpleOperationResponse = GetApiVbyApiVersionSimpleOperationResponses[keyof GetApiVbyApiVersionSimpleOperationResponses];\n\nexport type DeleteCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type GetCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type HeadCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type OptionsCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type PatchCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type PostCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type PutCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type DeleteFooData3 = {\n    body?: never;\n    headers: {\n        /**\n         * Parameter with illegal characters\n         */\n        'x-Foo-Bar': ModelWithString;\n    };\n    path: {\n        /**\n         * foo in method\n         */\n        foo_param: string;\n        /**\n         * bar in method\n         */\n        BarParam: string;\n    };\n    query?: never;\n    url: '/api/v{api-version}/foo/{foo_param}/bar/{BarParam}';\n};\n\nexport type CallWithDescriptionsData = {\n    body?: never;\n    path?: never;\n    query?: {\n        /**\n         * Testing multiline comments in string: First line\n         * Second line\n         *\n         * Fourth line\n         */\n        parameterWithBreaks?: string;\n        /**\n         * Testing backticks in string: `backticks` and ```multiple backticks``` should work\n         */\n        parameterWithBackticks?: string;\n        /**\n         * Testing slashes in string: \\backwards\\\\\\ and /forwards/// should work\n         */\n        parameterWithSlashes?: string;\n        /**\n         * Testing expression placeholders in string: ${expression} should work\n         */\n        parameterWithExpressionPlaceholders?: string;\n        /**\n         * Testing quotes in string: 'single quote''' and \"double quotes\"\"\" should work\n         */\n        parameterWithQuotes?: string;\n        /**\n         * Testing reserved characters in string: * inline * and ** inline ** should work\n         */\n        parameterWithReservedCharacters?: string;\n    };\n    url: '/api/v{api-version}/descriptions';\n};\n\nexport type DeprecatedCallData = {\n    body?: never;\n    headers: {\n        /**\n         * This parameter is deprecated\n         *\n         * @deprecated\n         */\n        parameter: DeprecatedModel | null;\n    };\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/parameters/deprecated';\n};\n\nexport type CallWithParametersData = {\n    /**\n     * This is the parameter that goes into the body\n     */\n    body: {\n        [key: string]: unknown;\n    } | null;\n    headers: {\n        /**\n         * This is the parameter that goes into the header\n         */\n        parameterHeader: string | null;\n    };\n    path: {\n        /**\n         * This is the parameter that goes into the path\n         */\n        parameterPath: string | null;\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string | null;\n    };\n    query: {\n        foo_ref_enum?: ModelWithNestedArrayEnumsDataFoo;\n        foo_all_of_enum: ModelWithNestedArrayEnumsDataFoo;\n        /**\n         * This is the parameter that goes into the query params\n         */\n        cursor: string | null;\n    };\n    url: '/api/v{api-version}/parameters/{parameterPath}';\n};\n\nexport type CallWithWeirdParameterNamesData = {\n    /**\n     * This is the parameter that goes into the body\n     */\n    body: ModelWithString | null;\n    headers: {\n        /**\n         * This is the parameter that goes into the request header\n         */\n        'parameter.header': string | null;\n    };\n    path: {\n        /**\n         * This is the parameter that goes into the path\n         */\n        'parameter.path.1'?: string;\n        /**\n         * This is the parameter that goes into the path\n         */\n        'parameter-path-2'?: string;\n        /**\n         * This is the parameter that goes into the path\n         */\n        'PARAMETER-PATH-3'?: string;\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string | null;\n    };\n    query: {\n        /**\n         * This is the parameter with a reserved keyword\n         */\n        default?: string;\n        /**\n         * This is the parameter that goes into the request query params\n         */\n        'parameter-query': string | null;\n    };\n    url: '/api/v{api-version}/parameters/{parameter.path.1}/{parameter-path-2}/{PARAMETER-PATH-3}';\n};\n\nexport type GetCallWithOptionalParamData = {\n    /**\n     * This is a required parameter\n     */\n    body: ModelWithOneOfEnum;\n    path?: never;\n    query?: {\n        /**\n         * This is an optional parameter\n         */\n        page?: number;\n    };\n    url: '/api/v{api-version}/parameters';\n};\n\nexport type PostCallWithOptionalParamData = {\n    /**\n     * This is an optional parameter\n     */\n    body?: {\n        offset?: number | null;\n    };\n    path?: never;\n    query: {\n        /**\n         * This is a required parameter\n         */\n        parameter: Pageable;\n    };\n    url: '/api/v{api-version}/parameters';\n};\n\nexport type PostCallWithOptionalParamResponses = {\n    /**\n     * Response is a simple number\n     */\n    200: number;\n    /**\n     * Success\n     */\n    204: void;\n};\n\nexport type PostCallWithOptionalParamResponse = PostCallWithOptionalParamResponses[keyof PostCallWithOptionalParamResponses];\n\nexport type PostApiVbyApiVersionRequestBodyData = {\n    /**\n     * A reusable request body\n     */\n    body?: SimpleRequestBody;\n    path?: never;\n    query?: {\n        /**\n         * This is a reusable parameter\n         */\n        parameter?: string;\n    };\n    url: '/api/v{api-version}/requestBody';\n};\n\nexport type PostApiVbyApiVersionFormDataData = {\n    /**\n     * A reusable request body\n     */\n    body?: SimpleFormData;\n    path?: never;\n    query?: {\n        /**\n         * This is a reusable parameter\n         */\n        parameter?: string;\n    };\n    url: '/api/v{api-version}/formData';\n};\n\nexport type CallWithDefaultParametersData = {\n    body?: never;\n    path?: never;\n    query?: {\n        /**\n         * This is a simple string with default value\n         */\n        parameterString?: string | null;\n        /**\n         * This is a simple number with default value\n         */\n        parameterNumber?: number | null;\n        /**\n         * This is a simple boolean with default value\n         */\n        parameterBoolean?: boolean | null;\n        /**\n         * This is a simple enum with default value\n         */\n        parameterEnum?: 'Success' | 'Warning' | 'Error';\n        /**\n         * This is a simple model with default value\n         */\n        parameterModel?: ModelWithString | null;\n    };\n    url: '/api/v{api-version}/defaults';\n};\n\nexport type CallWithDefaultOptionalParametersData = {\n    body?: never;\n    path?: never;\n    query?: {\n        /**\n         * This is a simple string that is optional with default value\n         */\n        parameterString?: string;\n        /**\n         * This is a simple number that is optional with default value\n         */\n        parameterNumber?: number;\n        /**\n         * This is a simple boolean that is optional with default value\n         */\n        parameterBoolean?: boolean;\n        /**\n         * This is a simple enum that is optional with default value\n         */\n        parameterEnum?: 'Success' | 'Warning' | 'Error';\n        /**\n         * This is a simple model that is optional with default value\n         */\n        parameterModel?: ModelWithString;\n    };\n    url: '/api/v{api-version}/defaults';\n};\n\nexport type CallToTestOrderOfParamsData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * This is a optional string with default\n         */\n        parameterOptionalStringWithDefault?: string;\n        /**\n         * This is a optional string with empty default\n         */\n        parameterOptionalStringWithEmptyDefault?: string;\n        /**\n         * This is a optional string with no default\n         */\n        parameterOptionalStringWithNoDefault?: string;\n        /**\n         * This is a string with default\n         */\n        parameterStringWithDefault: string;\n        /**\n         * This is a string with empty default\n         */\n        parameterStringWithEmptyDefault: string;\n        /**\n         * This is a string with no default\n         */\n        parameterStringWithNoDefault: string;\n        /**\n         * This is a string that can be null with no default\n         */\n        parameterStringNullableWithNoDefault?: string | null;\n        /**\n         * This is a string that can be null with default\n         */\n        parameterStringNullableWithDefault?: string | null;\n    };\n    url: '/api/v{api-version}/defaults';\n};\n\nexport type DuplicateNameData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/duplicate';\n};\n\nexport type DuplicateName2Data = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/duplicate';\n};\n\nexport type DuplicateName3Data = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/duplicate';\n};\n\nexport type DuplicateName4Data = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/duplicate';\n};\n\nexport type CallWithNoContentResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no-content';\n};\n\nexport type CallWithNoContentResponseResponses = {\n    /**\n     * Success\n     */\n    204: void;\n};\n\nexport type CallWithNoContentResponseResponse = CallWithNoContentResponseResponses[keyof CallWithNoContentResponseResponses];\n\nexport type CallWithResponseAndNoContentResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multiple-tags/response-and-no-content';\n};\n\nexport type CallWithResponseAndNoContentResponseResponses = {\n    /**\n     * Response is a simple number\n     */\n    200: number;\n    /**\n     * Success\n     */\n    204: void;\n};\n\nexport type CallWithResponseAndNoContentResponseResponse = CallWithResponseAndNoContentResponseResponses[keyof CallWithResponseAndNoContentResponseResponses];\n\nexport type DummyAData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multiple-tags/a';\n};\n\nexport type DummyAResponses = {\n    200: _400;\n};\n\nexport type DummyAResponse = DummyAResponses[keyof DummyAResponses];\n\nexport type DummyBData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multiple-tags/b';\n};\n\nexport type DummyBResponses = {\n    /**\n     * Success\n     */\n    204: void;\n};\n\nexport type DummyBResponse = DummyBResponses[keyof DummyBResponses];\n\nexport type CallWithResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/response';\n};\n\nexport type CallWithResponseResponses = {\n    default: Import;\n};\n\nexport type CallWithResponseResponse = CallWithResponseResponses[keyof CallWithResponseResponses];\n\nexport type CallWithDuplicateResponsesData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/response';\n};\n\nexport type CallWithDuplicateResponsesErrors = {\n    /**\n     * Message for 500 error\n     */\n    500: ModelWithStringError;\n    /**\n     * Message for 501 error\n     */\n    501: ModelWithStringError;\n    /**\n     * Message for 502 error\n     */\n    502: ModelWithStringError;\n    /**\n     * Message for 4XX errors\n     */\n    '4XX': DictionaryWithArray;\n    /**\n     * Default error response\n     */\n    default: ModelWithBoolean;\n};\n\nexport type CallWithDuplicateResponsesError = CallWithDuplicateResponsesErrors[keyof CallWithDuplicateResponsesErrors];\n\nexport type CallWithDuplicateResponsesResponses = {\n    /**\n     * Message for 200 response\n     */\n    200: ModelWithBoolean & ModelWithInteger;\n    /**\n     * Message for 201 response\n     */\n    201: ModelWithString;\n    /**\n     * Message for 202 response\n     */\n    202: ModelWithString;\n};\n\nexport type CallWithDuplicateResponsesResponse = CallWithDuplicateResponsesResponses[keyof CallWithDuplicateResponsesResponses];\n\nexport type CallWithResponsesData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/response';\n};\n\nexport type CallWithResponsesErrors = {\n    /**\n     * Message for 500 error\n     */\n    500: ModelWithStringError;\n    /**\n     * Message for 501 error\n     */\n    501: ModelWithStringError;\n    /**\n     * Message for 502 error\n     */\n    502: ModelWithStringError;\n    /**\n     * Message for default response\n     */\n    default: ModelWithStringError;\n};\n\nexport type CallWithResponsesError = CallWithResponsesErrors[keyof CallWithResponsesErrors];\n\nexport type CallWithResponsesResponses = {\n    /**\n     * Message for 200 response\n     */\n    200: {\n        readonly '@namespace.string'?: string;\n        readonly '@namespace.integer'?: number;\n        readonly value?: Array<ModelWithString>;\n    };\n    /**\n     * Message for 201 response\n     */\n    201: ModelThatExtends;\n    /**\n     * Message for 202 response\n     */\n    202: ModelThatExtendsExtends;\n};\n\nexport type CallWithResponsesResponse = CallWithResponsesResponses[keyof CallWithResponsesResponses];\n\nexport type CollectionFormatData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * This is an array parameter that is sent as csv format (comma-separated values)\n         */\n        parameterArrayCSV: Array<string> | null;\n        /**\n         * This is an array parameter that is sent as ssv format (space-separated values)\n         */\n        parameterArraySSV: Array<string> | null;\n        /**\n         * This is an array parameter that is sent as tsv format (tab-separated values)\n         */\n        parameterArrayTSV: Array<string> | null;\n        /**\n         * This is an array parameter that is sent as pipes format (pipe-separated values)\n         */\n        parameterArrayPipes: Array<string> | null;\n        /**\n         * This is an array parameter that is sent as multi format (multiple parameter instances)\n         */\n        parameterArrayMulti: Array<string> | null;\n    };\n    url: '/api/v{api-version}/collectionFormat';\n};\n\nexport type TypesData = {\n    body?: never;\n    path?: {\n        /**\n         * This is a number parameter\n         */\n        id?: number;\n    };\n    query: {\n        /**\n         * This is a number parameter\n         */\n        parameterNumber: number;\n        /**\n         * This is a string parameter\n         */\n        parameterString: string | null;\n        /**\n         * This is a boolean parameter\n         */\n        parameterBoolean: boolean | null;\n        /**\n         * This is an object parameter\n         */\n        parameterObject: {\n            [key: string]: unknown;\n        } | null;\n        /**\n         * This is an array parameter\n         */\n        parameterArray: Array<string> | null;\n        /**\n         * This is a dictionary parameter\n         */\n        parameterDictionary: {\n            [key: string]: unknown;\n        } | null;\n        /**\n         * This is an enum parameter\n         */\n        parameterEnum: 'Success' | 'Warning' | 'Error';\n    };\n    url: '/api/v{api-version}/types';\n};\n\nexport type TypesResponses = {\n    /**\n     * Response is a simple number\n     */\n    200: number;\n    /**\n     * Response is a simple string\n     */\n    201: string;\n    /**\n     * Response is a simple boolean\n     */\n    202: boolean;\n    /**\n     * Response is a simple object\n     */\n    203: {\n        [key: string]: unknown;\n    };\n};\n\nexport type TypesResponse = TypesResponses[keyof TypesResponses];\n\nexport type UploadFileData = {\n    body: Blob | File;\n    path: {\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string | null;\n    };\n    query?: never;\n    url: '/api/v{api-version}/upload';\n};\n\nexport type UploadFileResponses = {\n    200: boolean;\n};\n\nexport type UploadFileResponse = UploadFileResponses[keyof UploadFileResponses];\n\nexport type FileResponseData = {\n    body?: never;\n    path: {\n        id: string;\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string;\n    };\n    query?: never;\n    url: '/api/v{api-version}/file/{id}';\n};\n\nexport type FileResponseResponses = {\n    /**\n     * Success\n     */\n    200: Blob | File;\n};\n\nexport type FileResponseResponse = FileResponseResponses[keyof FileResponseResponses];\n\nexport type ComplexTypesData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * Parameter containing object\n         */\n        parameterObject: {\n            first?: {\n                second?: {\n                    third?: string;\n                };\n            };\n        };\n        /**\n         * Parameter containing reference\n         */\n        parameterReference: ModelWithString;\n    };\n    url: '/api/v{api-version}/complex';\n};\n\nexport type ComplexTypesErrors = {\n    /**\n     * 400 `server` error\n     */\n    400: unknown;\n    /**\n     * 500 server error\n     */\n    500: unknown;\n};\n\nexport type ComplexTypesResponses = {\n    /**\n     * Successful response\n     */\n    200: Array<ModelWithString>;\n};\n\nexport type ComplexTypesResponse = ComplexTypesResponses[keyof ComplexTypesResponses];\n\nexport type MultipartResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multipart';\n};\n\nexport type MultipartResponseResponses = {\n    /**\n     * OK\n     */\n    200: {\n        file?: Blob | File;\n        metadata?: {\n            foo?: string;\n            bar?: string;\n        };\n    };\n};\n\nexport type MultipartResponseResponse = MultipartResponseResponses[keyof MultipartResponseResponses];\n\nexport type MultipartRequestData = {\n    body?: {\n        content?: Blob | File;\n        data?: ModelWithString | null;\n    };\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multipart';\n};\n\nexport type ComplexParamsData = {\n    body?: {\n        readonly key: string | null;\n        name: string | null;\n        enabled?: boolean;\n        type: 'Monkey' | 'Horse' | 'Bird';\n        listOfModels?: Array<ModelWithString> | null;\n        listOfStrings?: Array<string> | null;\n        parameters: ModelWithString | ModelWithEnum | ModelWithArray | ModelWithDictionary;\n        readonly user?: {\n            readonly id?: number;\n            readonly name?: string | null;\n        };\n    };\n    path: {\n        id: number;\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string;\n    };\n    query?: never;\n    url: '/api/v{api-version}/complex/{id}';\n};\n\nexport type ComplexParamsResponses = {\n    /**\n     * Success\n     */\n    200: ModelWithString;\n};\n\nexport type ComplexParamsResponse = ComplexParamsResponses[keyof ComplexParamsResponses];\n\nexport type CallWithResultFromHeaderData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/header';\n};\n\nexport type CallWithResultFromHeaderErrors = {\n    /**\n     * 400 server error\n     */\n    400: unknown;\n    /**\n     * 500 server error\n     */\n    500: unknown;\n};\n\nexport type CallWithResultFromHeaderResponses = {\n    /**\n     * Successful response\n     */\n    200: unknown;\n};\n\nexport type TestErrorCodeData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * Status code to return\n         */\n        status: number;\n    };\n    url: '/api/v{api-version}/error';\n};\n\nexport type TestErrorCodeErrors = {\n    /**\n     * Custom message: Internal Server Error\n     */\n    500: unknown;\n    /**\n     * Custom message: Not Implemented\n     */\n    501: unknown;\n    /**\n     * Custom message: Bad Gateway\n     */\n    502: unknown;\n    /**\n     * Custom message: Service Unavailable\n     */\n    503: unknown;\n};\n\nexport type TestErrorCodeResponses = {\n    /**\n     * Custom message: Successful response\n     */\n    200: unknown;\n};\n\nexport type NonAsciiæøåÆøÅöôêÊ字符串Data = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * Dummy input param\n         */\n        nonAsciiParamæøåÆØÅöôêÊ: number;\n    };\n    url: '/api/v{api-version}/non-ascii-æøåÆØÅöôêÊ字符串';\n};\n\nexport type NonAsciiæøåÆøÅöôêÊ字符串Responses = {\n    /**\n     * Successful response\n     */\n    200: Array<NonAsciiStringæøåÆøÅöôêÊ字符串>;\n};\n\nexport type NonAsciiæøåÆøÅöôêÊ字符串Response = NonAsciiæøåÆøÅöôêÊ字符串Responses[keyof NonAsciiæøåÆøÅöôêÊ字符串Responses];\n\nexport type PutWithFormUrlEncodedData = {\n    body: ArrayWithStrings;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/non-ascii-æøåÆØÅöôêÊ字符串';\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/svelte-query/fetch/@tanstack/svelte-query.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport { type DefaultError, type InfiniteData, infiniteQueryOptions, type MutationOptions, queryOptions } from '@tanstack/svelte-query';\n\nimport { client } from '../client.gen';\nimport { apiVVersionODataControllerCount, callToTestOrderOfParams, callWithDefaultOptionalParameters, callWithDefaultParameters, callWithDescriptions, callWithDuplicateResponses, callWithNoContentResponse, callWithParameters, callWithResponse, callWithResponseAndNoContentResponse, callWithResponses, callWithResultFromHeader, callWithWeirdParameterNames, collectionFormat, complexParams, complexTypes, deleteCallWithoutParametersAndResponse, deleteFoo, deprecatedCall, dummyA, dummyB, duplicateName, duplicateName2, duplicateName3, duplicateName4, export_, fileResponse, fooWow, getApiVbyApiVersionSimpleOperation, getCallWithOptionalParam, getCallWithoutParametersAndResponse, import_, multipartRequest, multipartResponse, nonAsciiæøåÆøÅöôêÊ字符串, type Options, patchApiVbyApiVersionNoTag, patchCallWithoutParametersAndResponse, postApiVbyApiVersionFormData, postApiVbyApiVersionRequestBody, postCallWithOptionalParam, postCallWithoutParametersAndResponse, putCallWithoutParametersAndResponse, putWithFormUrlEncoded, testErrorCode, types, uploadFile } from '../sdk.gen';\nimport type { ApiVVersionODataControllerCountData, ApiVVersionODataControllerCountResponse, CallToTestOrderOfParamsData, CallWithDefaultOptionalParametersData, CallWithDefaultParametersData, CallWithDescriptionsData, CallWithDuplicateResponsesData, CallWithDuplicateResponsesError, CallWithDuplicateResponsesResponse, CallWithNoContentResponseData, CallWithNoContentResponseResponse, CallWithParametersData, CallWithResponseAndNoContentResponseData, CallWithResponseAndNoContentResponseResponse, CallWithResponseData, CallWithResponseResponse, CallWithResponsesData, CallWithResponsesError, CallWithResponsesResponse, CallWithResultFromHeaderData, CallWithWeirdParameterNamesData, CollectionFormatData, ComplexParamsData, ComplexParamsResponse, ComplexTypesData, ComplexTypesResponse, DeleteCallWithoutParametersAndResponseData, DeleteFooData3, DeprecatedCallData, DummyAData, DummyAResponse, DummyBData, DummyBResponse, DuplicateName2Data, DuplicateName3Data, DuplicateName4Data, DuplicateNameData, ExportData, FileResponseData, FileResponseResponse, FooWowData, GetApiVbyApiVersionSimpleOperationData, GetApiVbyApiVersionSimpleOperationError, GetApiVbyApiVersionSimpleOperationResponse, GetCallWithOptionalParamData, GetCallWithoutParametersAndResponseData, ImportData, ImportResponse, MultipartRequestData, MultipartResponseData, MultipartResponseResponse, NonAsciiæøåÆøÅöôêÊ字符串Data, NonAsciiæøåÆøÅöôêÊ字符串Response, PatchApiVbyApiVersionNoTagData, PatchCallWithoutParametersAndResponseData, PostApiVbyApiVersionFormDataData, PostApiVbyApiVersionRequestBodyData, PostCallWithOptionalParamData, PostCallWithOptionalParamResponse, PostCallWithoutParametersAndResponseData, PutCallWithoutParametersAndResponseData, PutWithFormUrlEncodedData, TestErrorCodeData, TypesData, TypesResponse, UploadFileData, UploadFileResponse } from '../types.gen';\n\nexport type QueryKey<TOptions extends Options> = [\n    Pick<TOptions, 'baseUrl' | 'body' | 'headers' | 'path' | 'query'> & {\n        _id: string;\n        _infinite?: boolean;\n        tags?: ReadonlyArray<string>;\n    }\n];\n\nconst createQueryKey = <TOptions extends Options>(id: string, options?: TOptions, infinite?: boolean, tags?: ReadonlyArray<string>): [\n    QueryKey<TOptions>[0]\n] => {\n    const params: QueryKey<TOptions>[0] = { _id: id, baseUrl: options?.baseUrl || (options?.client ?? client).getConfig().baseUrl } as QueryKey<TOptions>[0];\n    if (infinite) {\n        params._infinite = infinite;\n    }\n    if (tags) {\n        params.tags = tags;\n    }\n    if (options?.body) {\n        params.body = options.body;\n    }\n    if (options?.headers) {\n        params.headers = options.headers;\n    }\n    if (options?.path) {\n        params.path = options.path;\n    }\n    if (options?.query) {\n        params.query = options.query;\n    }\n    return [params];\n};\n\nexport const exportQueryKey = (options?: Options<ExportData>) => createQueryKey('export', options);\n\nexport const exportOptions = (options?: Options<ExportData>) => queryOptions<unknown, DefaultError, unknown, ReturnType<typeof exportQueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await export_({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: exportQueryKey(options)\n});\n\nexport const patchApiVbyApiVersionNoTagMutation = (options?: Partial<Options<PatchApiVbyApiVersionNoTagData>>): MutationOptions<unknown, DefaultError, Options<PatchApiVbyApiVersionNoTagData>> => {\n    const mutationOptions: MutationOptions<unknown, DefaultError, Options<PatchApiVbyApiVersionNoTagData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await patchApiVbyApiVersionNoTag({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const importMutation = (options?: Partial<Options<ImportData>>): MutationOptions<ImportResponse, DefaultError, Options<ImportData>> => {\n    const mutationOptions: MutationOptions<ImportResponse, DefaultError, Options<ImportData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await import_({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const fooWowMutation = (options?: Partial<Options<FooWowData>>): MutationOptions<unknown, DefaultError, Options<FooWowData>> => {\n    const mutationOptions: MutationOptions<unknown, DefaultError, Options<FooWowData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await fooWow({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const apiVVersionODataControllerCountQueryKey = (options?: Options<ApiVVersionODataControllerCountData>) => createQueryKey('apiVVersionODataControllerCount', options);\n\nexport const apiVVersionODataControllerCountOptions = (options?: Options<ApiVVersionODataControllerCountData>) => queryOptions<ApiVVersionODataControllerCountResponse, DefaultError, ApiVVersionODataControllerCountResponse, ReturnType<typeof apiVVersionODataControllerCountQueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await apiVVersionODataControllerCount({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: apiVVersionODataControllerCountQueryKey(options)\n});\n\nexport const getApiVbyApiVersionSimpleOperationQueryKey = (options: Options<GetApiVbyApiVersionSimpleOperationData>) => createQueryKey('getApiVbyApiVersionSimpleOperation', options);\n\nexport const getApiVbyApiVersionSimpleOperationOptions = (options: Options<GetApiVbyApiVersionSimpleOperationData>) => queryOptions<GetApiVbyApiVersionSimpleOperationResponse, GetApiVbyApiVersionSimpleOperationError, GetApiVbyApiVersionSimpleOperationResponse, ReturnType<typeof getApiVbyApiVersionSimpleOperationQueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await getApiVbyApiVersionSimpleOperation({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: getApiVbyApiVersionSimpleOperationQueryKey(options)\n});\n\nexport const deleteCallWithoutParametersAndResponseMutation = (options?: Partial<Options<DeleteCallWithoutParametersAndResponseData>>): MutationOptions<unknown, DefaultError, Options<DeleteCallWithoutParametersAndResponseData>> => {\n    const mutationOptions: MutationOptions<unknown, DefaultError, Options<DeleteCallWithoutParametersAndResponseData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await deleteCallWithoutParametersAndResponse({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const getCallWithoutParametersAndResponseQueryKey = (options?: Options<GetCallWithoutParametersAndResponseData>) => createQueryKey('getCallWithoutParametersAndResponse', options);\n\nexport const getCallWithoutParametersAndResponseOptions = (options?: Options<GetCallWithoutParametersAndResponseData>) => queryOptions<unknown, DefaultError, unknown, ReturnType<typeof getCallWithoutParametersAndResponseQueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await getCallWithoutParametersAndResponse({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: getCallWithoutParametersAndResponseQueryKey(options)\n});\n\nexport const patchCallWithoutParametersAndResponseMutation = (options?: Partial<Options<PatchCallWithoutParametersAndResponseData>>): MutationOptions<unknown, DefaultError, Options<PatchCallWithoutParametersAndResponseData>> => {\n    const mutationOptions: MutationOptions<unknown, DefaultError, Options<PatchCallWithoutParametersAndResponseData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await patchCallWithoutParametersAndResponse({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const postCallWithoutParametersAndResponseMutation = (options?: Partial<Options<PostCallWithoutParametersAndResponseData>>): MutationOptions<unknown, DefaultError, Options<PostCallWithoutParametersAndResponseData>> => {\n    const mutationOptions: MutationOptions<unknown, DefaultError, Options<PostCallWithoutParametersAndResponseData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await postCallWithoutParametersAndResponse({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const putCallWithoutParametersAndResponseMutation = (options?: Partial<Options<PutCallWithoutParametersAndResponseData>>): MutationOptions<unknown, DefaultError, Options<PutCallWithoutParametersAndResponseData>> => {\n    const mutationOptions: MutationOptions<unknown, DefaultError, Options<PutCallWithoutParametersAndResponseData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await putCallWithoutParametersAndResponse({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const deleteFooMutation = (options?: Partial<Options<DeleteFooData3>>): MutationOptions<unknown, DefaultError, Options<DeleteFooData3>> => {\n    const mutationOptions: MutationOptions<unknown, DefaultError, Options<DeleteFooData3>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await deleteFoo({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const callWithDescriptionsMutation = (options?: Partial<Options<CallWithDescriptionsData>>): MutationOptions<unknown, DefaultError, Options<CallWithDescriptionsData>> => {\n    const mutationOptions: MutationOptions<unknown, DefaultError, Options<CallWithDescriptionsData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await callWithDescriptions({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\n/**\n * @deprecated\n */\nexport const deprecatedCallMutation = (options?: Partial<Options<DeprecatedCallData>>): MutationOptions<unknown, DefaultError, Options<DeprecatedCallData>> => {\n    const mutationOptions: MutationOptions<unknown, DefaultError, Options<DeprecatedCallData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await deprecatedCall({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const callWithParametersMutation = (options?: Partial<Options<CallWithParametersData>>): MutationOptions<unknown, DefaultError, Options<CallWithParametersData>> => {\n    const mutationOptions: MutationOptions<unknown, DefaultError, Options<CallWithParametersData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await callWithParameters({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const callWithWeirdParameterNamesMutation = (options?: Partial<Options<CallWithWeirdParameterNamesData>>): MutationOptions<unknown, DefaultError, Options<CallWithWeirdParameterNamesData>> => {\n    const mutationOptions: MutationOptions<unknown, DefaultError, Options<CallWithWeirdParameterNamesData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await callWithWeirdParameterNames({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const getCallWithOptionalParamQueryKey = (options: Options<GetCallWithOptionalParamData>) => createQueryKey('getCallWithOptionalParam', options);\n\nexport const getCallWithOptionalParamOptions = (options: Options<GetCallWithOptionalParamData>) => queryOptions<unknown, DefaultError, unknown, ReturnType<typeof getCallWithOptionalParamQueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await getCallWithOptionalParam({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: getCallWithOptionalParamQueryKey(options)\n});\n\nconst createInfiniteParams = <K extends Pick<QueryKey<Options>[0], 'body' | 'headers' | 'path' | 'query'>>(queryKey: QueryKey<Options>, page: K) => {\n    const params = { ...queryKey[0] };\n    if (page.body) {\n        params.body = {\n            ...queryKey[0].body as any,\n            ...page.body as any\n        };\n    }\n    if (page.headers) {\n        params.headers = {\n            ...queryKey[0].headers,\n            ...page.headers\n        };\n    }\n    if (page.path) {\n        params.path = {\n            ...queryKey[0].path as any,\n            ...page.path as any\n        };\n    }\n    if (page.query) {\n        params.query = {\n            ...queryKey[0].query as any,\n            ...page.query as any\n        };\n    }\n    return params as unknown as typeof page;\n};\n\nexport const getCallWithOptionalParamInfiniteQueryKey = (options: Options<GetCallWithOptionalParamData>): QueryKey<Options<GetCallWithOptionalParamData>> => createQueryKey('getCallWithOptionalParam', options, true);\n\nexport const getCallWithOptionalParamInfiniteOptions = (options: Options<GetCallWithOptionalParamData>) => infiniteQueryOptions<unknown, DefaultError, InfiniteData<unknown>, QueryKey<Options<GetCallWithOptionalParamData>>, number | Pick<QueryKey<Options<GetCallWithOptionalParamData>>[0], 'body' | 'headers' | 'path' | 'query'>>(\n// @ts-ignore\n{\n    queryFn: async ({ pageParam, queryKey, signal }) => {\n        // @ts-ignore\n        const page: Pick<QueryKey<Options<GetCallWithOptionalParamData>>[0], 'body' | 'headers' | 'path' | 'query'> = typeof pageParam === 'object' ? pageParam : {\n            query: {\n                page: pageParam\n            }\n        };\n        const params = createInfiniteParams(queryKey, page);\n        const { data } = await getCallWithOptionalParam({\n            ...options,\n            ...params,\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: getCallWithOptionalParamInfiniteQueryKey(options)\n});\n\nexport const postCallWithOptionalParamMutation = (options?: Partial<Options<PostCallWithOptionalParamData>>): MutationOptions<PostCallWithOptionalParamResponse, DefaultError, Options<PostCallWithOptionalParamData>> => {\n    const mutationOptions: MutationOptions<PostCallWithOptionalParamResponse, DefaultError, Options<PostCallWithOptionalParamData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await postCallWithOptionalParam({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const postApiVbyApiVersionRequestBodyMutation = (options?: Partial<Options<PostApiVbyApiVersionRequestBodyData>>): MutationOptions<unknown, DefaultError, Options<PostApiVbyApiVersionRequestBodyData>> => {\n    const mutationOptions: MutationOptions<unknown, DefaultError, Options<PostApiVbyApiVersionRequestBodyData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await postApiVbyApiVersionRequestBody({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const postApiVbyApiVersionFormDataMutation = (options?: Partial<Options<PostApiVbyApiVersionFormDataData>>): MutationOptions<unknown, DefaultError, Options<PostApiVbyApiVersionFormDataData>> => {\n    const mutationOptions: MutationOptions<unknown, DefaultError, Options<PostApiVbyApiVersionFormDataData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await postApiVbyApiVersionFormData({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const callWithDefaultParametersQueryKey = (options?: Options<CallWithDefaultParametersData>) => createQueryKey('callWithDefaultParameters', options);\n\nexport const callWithDefaultParametersOptions = (options?: Options<CallWithDefaultParametersData>) => queryOptions<unknown, DefaultError, unknown, ReturnType<typeof callWithDefaultParametersQueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await callWithDefaultParameters({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: callWithDefaultParametersQueryKey(options)\n});\n\nexport const callWithDefaultOptionalParametersMutation = (options?: Partial<Options<CallWithDefaultOptionalParametersData>>): MutationOptions<unknown, DefaultError, Options<CallWithDefaultOptionalParametersData>> => {\n    const mutationOptions: MutationOptions<unknown, DefaultError, Options<CallWithDefaultOptionalParametersData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await callWithDefaultOptionalParameters({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const callToTestOrderOfParamsMutation = (options?: Partial<Options<CallToTestOrderOfParamsData>>): MutationOptions<unknown, DefaultError, Options<CallToTestOrderOfParamsData>> => {\n    const mutationOptions: MutationOptions<unknown, DefaultError, Options<CallToTestOrderOfParamsData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await callToTestOrderOfParams({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const duplicateNameMutation = (options?: Partial<Options<DuplicateNameData>>): MutationOptions<unknown, DefaultError, Options<DuplicateNameData>> => {\n    const mutationOptions: MutationOptions<unknown, DefaultError, Options<DuplicateNameData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await duplicateName({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const duplicateName2QueryKey = (options?: Options<DuplicateName2Data>) => createQueryKey('duplicateName2', options);\n\nexport const duplicateName2Options = (options?: Options<DuplicateName2Data>) => queryOptions<unknown, DefaultError, unknown, ReturnType<typeof duplicateName2QueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await duplicateName2({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: duplicateName2QueryKey(options)\n});\n\nexport const duplicateName3Mutation = (options?: Partial<Options<DuplicateName3Data>>): MutationOptions<unknown, DefaultError, Options<DuplicateName3Data>> => {\n    const mutationOptions: MutationOptions<unknown, DefaultError, Options<DuplicateName3Data>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await duplicateName3({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const duplicateName4Mutation = (options?: Partial<Options<DuplicateName4Data>>): MutationOptions<unknown, DefaultError, Options<DuplicateName4Data>> => {\n    const mutationOptions: MutationOptions<unknown, DefaultError, Options<DuplicateName4Data>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await duplicateName4({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const callWithNoContentResponseQueryKey = (options?: Options<CallWithNoContentResponseData>) => createQueryKey('callWithNoContentResponse', options);\n\nexport const callWithNoContentResponseOptions = (options?: Options<CallWithNoContentResponseData>) => queryOptions<CallWithNoContentResponseResponse, DefaultError, CallWithNoContentResponseResponse, ReturnType<typeof callWithNoContentResponseQueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await callWithNoContentResponse({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: callWithNoContentResponseQueryKey(options)\n});\n\nexport const callWithResponseAndNoContentResponseQueryKey = (options?: Options<CallWithResponseAndNoContentResponseData>) => createQueryKey('callWithResponseAndNoContentResponse', options);\n\nexport const callWithResponseAndNoContentResponseOptions = (options?: Options<CallWithResponseAndNoContentResponseData>) => queryOptions<CallWithResponseAndNoContentResponseResponse, DefaultError, CallWithResponseAndNoContentResponseResponse, ReturnType<typeof callWithResponseAndNoContentResponseQueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await callWithResponseAndNoContentResponse({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: callWithResponseAndNoContentResponseQueryKey(options)\n});\n\nexport const dummyAQueryKey = (options?: Options<DummyAData>) => createQueryKey('dummyA', options);\n\nexport const dummyAOptions = (options?: Options<DummyAData>) => queryOptions<DummyAResponse, DefaultError, DummyAResponse, ReturnType<typeof dummyAQueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await dummyA({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: dummyAQueryKey(options)\n});\n\nexport const dummyBQueryKey = (options?: Options<DummyBData>) => createQueryKey('dummyB', options);\n\nexport const dummyBOptions = (options?: Options<DummyBData>) => queryOptions<DummyBResponse, DefaultError, DummyBResponse, ReturnType<typeof dummyBQueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await dummyB({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: dummyBQueryKey(options)\n});\n\nexport const callWithResponseQueryKey = (options?: Options<CallWithResponseData>) => createQueryKey('callWithResponse', options);\n\nexport const callWithResponseOptions = (options?: Options<CallWithResponseData>) => queryOptions<CallWithResponseResponse, DefaultError, CallWithResponseResponse, ReturnType<typeof callWithResponseQueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await callWithResponse({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: callWithResponseQueryKey(options)\n});\n\nexport const callWithDuplicateResponsesMutation = (options?: Partial<Options<CallWithDuplicateResponsesData>>): MutationOptions<CallWithDuplicateResponsesResponse, CallWithDuplicateResponsesError, Options<CallWithDuplicateResponsesData>> => {\n    const mutationOptions: MutationOptions<CallWithDuplicateResponsesResponse, CallWithDuplicateResponsesError, Options<CallWithDuplicateResponsesData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await callWithDuplicateResponses({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const callWithResponsesMutation = (options?: Partial<Options<CallWithResponsesData>>): MutationOptions<CallWithResponsesResponse, CallWithResponsesError, Options<CallWithResponsesData>> => {\n    const mutationOptions: MutationOptions<CallWithResponsesResponse, CallWithResponsesError, Options<CallWithResponsesData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await callWithResponses({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const collectionFormatQueryKey = (options: Options<CollectionFormatData>) => createQueryKey('collectionFormat', options);\n\nexport const collectionFormatOptions = (options: Options<CollectionFormatData>) => queryOptions<unknown, DefaultError, unknown, ReturnType<typeof collectionFormatQueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await collectionFormat({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: collectionFormatQueryKey(options)\n});\n\nexport const typesQueryKey = (options: Options<TypesData>) => createQueryKey('types', options);\n\nexport const typesOptions = (options: Options<TypesData>) => queryOptions<TypesResponse, DefaultError, TypesResponse, ReturnType<typeof typesQueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await types({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: typesQueryKey(options)\n});\n\nexport const uploadFileMutation = (options?: Partial<Options<UploadFileData>>): MutationOptions<UploadFileResponse, DefaultError, Options<UploadFileData>> => {\n    const mutationOptions: MutationOptions<UploadFileResponse, DefaultError, Options<UploadFileData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await uploadFile({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const fileResponseQueryKey = (options: Options<FileResponseData>) => createQueryKey('fileResponse', options);\n\nexport const fileResponseOptions = (options: Options<FileResponseData>) => queryOptions<FileResponseResponse, DefaultError, FileResponseResponse, ReturnType<typeof fileResponseQueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await fileResponse({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: fileResponseQueryKey(options)\n});\n\nexport const complexTypesQueryKey = (options: Options<ComplexTypesData>) => createQueryKey('complexTypes', options);\n\nexport const complexTypesOptions = (options: Options<ComplexTypesData>) => queryOptions<ComplexTypesResponse, DefaultError, ComplexTypesResponse, ReturnType<typeof complexTypesQueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await complexTypes({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: complexTypesQueryKey(options)\n});\n\nexport const multipartResponseQueryKey = (options?: Options<MultipartResponseData>) => createQueryKey('multipartResponse', options);\n\nexport const multipartResponseOptions = (options?: Options<MultipartResponseData>) => queryOptions<MultipartResponseResponse, DefaultError, MultipartResponseResponse, ReturnType<typeof multipartResponseQueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await multipartResponse({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: multipartResponseQueryKey(options)\n});\n\nexport const multipartRequestMutation = (options?: Partial<Options<MultipartRequestData>>): MutationOptions<unknown, DefaultError, Options<MultipartRequestData>> => {\n    const mutationOptions: MutationOptions<unknown, DefaultError, Options<MultipartRequestData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await multipartRequest({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const complexParamsMutation = (options?: Partial<Options<ComplexParamsData>>): MutationOptions<ComplexParamsResponse, DefaultError, Options<ComplexParamsData>> => {\n    const mutationOptions: MutationOptions<ComplexParamsResponse, DefaultError, Options<ComplexParamsData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await complexParams({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const callWithResultFromHeaderMutation = (options?: Partial<Options<CallWithResultFromHeaderData>>): MutationOptions<unknown, DefaultError, Options<CallWithResultFromHeaderData>> => {\n    const mutationOptions: MutationOptions<unknown, DefaultError, Options<CallWithResultFromHeaderData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await callWithResultFromHeader({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const testErrorCodeMutation = (options?: Partial<Options<TestErrorCodeData>>): MutationOptions<unknown, DefaultError, Options<TestErrorCodeData>> => {\n    const mutationOptions: MutationOptions<unknown, DefaultError, Options<TestErrorCodeData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await testErrorCode({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const nonAsciiæøåÆøÅöôêÊ字符串Mutation = (options?: Partial<Options<NonAsciiæøåÆøÅöôêÊ字符串Data>>): MutationOptions<NonAsciiæøåÆøÅöôêÊ字符串Response, DefaultError, Options<NonAsciiæøåÆøÅöôêÊ字符串Data>> => {\n    const mutationOptions: MutationOptions<NonAsciiæøåÆøÅöôêÊ字符串Response, DefaultError, Options<NonAsciiæøåÆøÅöôêÊ字符串Data>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await nonAsciiæøåÆøÅöôêÊ字符串({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\n/**\n * Login User\n */\nexport const putWithFormUrlEncodedMutation = (options?: Partial<Options<PutWithFormUrlEncodedData>>): MutationOptions<unknown, DefaultError, Options<PutWithFormUrlEncodedData>> => {\n    const mutationOptions: MutationOptions<unknown, DefaultError, Options<PutWithFormUrlEncodedData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await putWithFormUrlEncoded({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/svelte-query/fetch/client/client.gen.ts",
    "content": "// 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 (options: RequestOptions) => {\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 url = buildUrl(opts);\n\n    return { opts, url };\n  };\n\n  const request: Client['request'] = async (options) => {\n    // @ts-expect-error\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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/svelte-query/fetch/client/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type { Auth } from '../core/auth.gen';\nexport type { QuerySerializerOptions } from '../core/bodySerializer.gen';\nexport {\n  formDataBodySerializer,\n  jsonBodySerializer,\n  urlSearchParamsBodySerializer,\n} from '../core/bodySerializer.gen';\nexport { buildClientParams } from '../core/params.gen';\nexport { serializeQueryKeyValue } from '../core/queryKeySerializer.gen';\nexport { createClient } from './client.gen';\nexport type {\n  Client,\n  ClientOptions,\n  Config,\n  CreateClientConfig,\n  Options,\n  RequestOptions,\n  RequestResult,\n  ResolvedRequestOptions,\n  ResponseStyle,\n  TDataShape,\n} from './types.gen';\nexport { createConfig, mergeHeaders } from './utils.gen';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/svelte-query/fetch/client/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { Auth } from '../core/auth.gen';\nimport type {\n  ServerSentEventsOptions,\n  ServerSentEventsResult,\n} from '../core/serverSentEvents.gen';\nimport type { Client as CoreClient, Config as CoreConfig } from '../core/types.gen';\nimport type { Middleware } from './utils.gen';\n\nexport type ResponseStyle = 'data' | 'fields';\n\nexport interface Config<T extends ClientOptions = ClientOptions>\n  extends Omit<RequestInit, 'body' | 'headers' | 'method'>, CoreConfig {\n  /**\n   * Base URL for all requests made by this client.\n   */\n  baseUrl?: T['baseUrl'];\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   * Please don't use the Fetch client for Next.js applications. The `next`\n   * options won't have any effect.\n   *\n   * Install {@link https://www.npmjs.com/package/@hey-api/client-next `@hey-api/client-next`} instead.\n   */\n  next?: never;\n  /**\n   * Return the response data parsed in a specified format. By default, `auto`\n   * will infer the appropriate method from the `Content-Type` response header.\n   * You can override this behavior with any of the {@link Body} methods.\n   * Select `stream` if you don't want to parse response data at all.\n   *\n   * @default 'auto'\n   */\n  parseAs?: 'arrayBuffer' | 'auto' | 'blob' | 'formData' | 'json' | 'stream' | 'text';\n  /**\n   * Should we return only data or multiple fields (data, error, response, etc.)?\n   *\n   * @default 'fields'\n   */\n  responseStyle?: ResponseStyle;\n  /**\n   * Throw an error instead of returning it in the response?\n   *\n   * @default false\n   */\n  throwOnError?: T['throwOnError'];\n}\n\nexport interface RequestOptions<\n  TData = unknown,\n  TResponseStyle extends ResponseStyle = 'fields',\n  ThrowOnError extends boolean = boolean,\n  Url extends string = string,\n>\n  extends\n    Config<{\n      responseStyle: TResponseStyle;\n      throwOnError: ThrowOnError;\n    }>,\n    Pick<\n      ServerSentEventsOptions<TData>,\n      | 'onRequest'\n      | 'onSseError'\n      | 'onSseEvent'\n      | 'sseDefaultRetryDelay'\n      | 'sseMaxRetryAttempts'\n      | 'sseMaxRetryDelay'\n    > {\n  /**\n   * Any body that you want to add to your request.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/fetch#body}\n   */\n  body?: unknown;\n  path?: Record<string, unknown>;\n  query?: Record<string, unknown>;\n  /**\n   * Security mechanism(s) to use for the request.\n   */\n  security?: ReadonlyArray<Auth>;\n  url: Url;\n}\n\nexport interface ResolvedRequestOptions<\n  TResponseStyle extends ResponseStyle = 'fields',\n  ThrowOnError extends boolean = boolean,\n  Url extends string = string,\n> extends RequestOptions<unknown, TResponseStyle, ThrowOnError, Url> {\n  serializedBody?: string;\n}\n\nexport type RequestResult<\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = boolean,\n  TResponseStyle extends ResponseStyle = 'fields',\n> = ThrowOnError extends true\n  ? Promise<\n      TResponseStyle extends 'data'\n        ? TData extends Record<string, unknown>\n          ? TData[keyof TData]\n          : TData\n        : {\n            data: TData extends Record<string, unknown> ? TData[keyof TData] : TData;\n            request: Request;\n            response: Response;\n          }\n    >\n  : Promise<\n      TResponseStyle extends 'data'\n        ? (TData extends Record<string, unknown> ? TData[keyof TData] : TData) | undefined\n        : (\n            | {\n                data: TData extends Record<string, unknown> ? TData[keyof TData] : TData;\n                error: undefined;\n              }\n            | {\n                data: undefined;\n                error: TError extends Record<string, unknown> ? TError[keyof TError] : TError;\n              }\n          ) & {\n            request: Request;\n            response: Response;\n          }\n    >;\n\nexport interface ClientOptions {\n  baseUrl?: string;\n  responseStyle?: ResponseStyle;\n  throwOnError?: boolean;\n}\n\ntype MethodFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'>,\n) => RequestResult<TData, TError, ThrowOnError, TResponseStyle>;\n\ntype SseFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'>,\n) => Promise<ServerSentEventsResult<TData, TError>>;\n\ntype RequestFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'> &\n    Pick<Required<RequestOptions<TData, TResponseStyle, ThrowOnError>>, 'method'>,\n) => RequestResult<TData, TError, ThrowOnError, TResponseStyle>;\n\ntype BuildUrlFn = <\n  TData extends {\n    body?: unknown;\n    path?: Record<string, unknown>;\n    query?: Record<string, unknown>;\n    url: string;\n  },\n>(\n  options: TData & Options<TData>,\n) => string;\n\nexport type Client = CoreClient<RequestFn, Config, MethodFn, BuildUrlFn, SseFn> & {\n  interceptors: Middleware<Request, Response, unknown, ResolvedRequestOptions>;\n};\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 = ClientOptions> = (\n  override?: Config<ClientOptions & T>,\n) => Config<Required<ClientOptions> & T>;\n\nexport interface TDataShape {\n  body?: unknown;\n  headers?: unknown;\n  path?: unknown;\n  query?: unknown;\n  url: string;\n}\n\ntype OmitKeys<T, K> = Pick<T, Exclude<keyof T, K>>;\n\nexport type Options<\n  TData extends TDataShape = TDataShape,\n  ThrowOnError extends boolean = boolean,\n  TResponse = unknown,\n  TResponseStyle extends ResponseStyle = 'fields',\n> = OmitKeys<\n  RequestOptions<TResponse, TResponseStyle, ThrowOnError>,\n  'body' | 'path' | 'query' | 'url'\n> &\n  ([TData] extends [never] ? unknown : Omit<TData, 'url'>);\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/svelte-query/fetch/client/utils.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/svelte-query/fetch/client.gen.ts",
    "content": "// 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: 'http://localhost:3000/base' }));\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/svelte-query/fetch/core/auth.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/svelte-query/fetch/core/bodySerializer.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/svelte-query/fetch/core/params.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/svelte-query/fetch/core/pathSerializer.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/svelte-query/fetch/core/queryKeySerializer.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\n/**\n * JSON-friendly union that mirrors what Pinia Colada can hash.\n */\nexport type JsonValue =\n  | null\n  | string\n  | number\n  | boolean\n  | JsonValue[]\n  | { [key: string]: JsonValue };\n\n/**\n * Replacer that converts non-JSON values (bigint, Date, etc.) to safe substitutes.\n */\nexport const queryKeyJsonReplacer = (_key: string, value: unknown) => {\n  if (value === undefined || typeof value === 'function' || typeof value === 'symbol') {\n    return undefined;\n  }\n  if (typeof value === 'bigint') {\n    return value.toString();\n  }\n  if (value instanceof Date) {\n    return value.toISOString();\n  }\n  return value;\n};\n\n/**\n * Safely stringifies a value and parses it back into a JsonValue.\n */\nexport const stringifyToJsonValue = (input: unknown): JsonValue | undefined => {\n  try {\n    const json = JSON.stringify(input, queryKeyJsonReplacer);\n    if (json === undefined) {\n      return undefined;\n    }\n    return JSON.parse(json) as JsonValue;\n  } catch {\n    return undefined;\n  }\n};\n\n/**\n * Detects plain objects (including objects with a null prototype).\n */\nconst isPlainObject = (value: unknown): value is Record<string, unknown> => {\n  if (value === null || typeof value !== 'object') {\n    return false;\n  }\n  const prototype = Object.getPrototypeOf(value as object);\n  return prototype === Object.prototype || prototype === null;\n};\n\n/**\n * Turns URLSearchParams into a sorted JSON object for deterministic keys.\n */\nconst serializeSearchParams = (params: URLSearchParams): JsonValue => {\n  const entries = Array.from(params.entries()).sort(([a], [b]) => a.localeCompare(b));\n  const result: Record<string, JsonValue> = {};\n\n  for (const [key, value] of entries) {\n    const existing = result[key];\n    if (existing === undefined) {\n      result[key] = value;\n      continue;\n    }\n\n    if (Array.isArray(existing)) {\n      (existing as string[]).push(value);\n    } else {\n      result[key] = [existing, value];\n    }\n  }\n\n  return result;\n};\n\n/**\n * Normalizes any accepted value into a JSON-friendly shape for query keys.\n */\nexport const serializeQueryKeyValue = (value: unknown): JsonValue | undefined => {\n  if (value === null) {\n    return null;\n  }\n\n  if (typeof value === 'string' || typeof value === 'number' || typeof value === 'boolean') {\n    return value;\n  }\n\n  if (value === undefined || typeof value === 'function' || typeof value === 'symbol') {\n    return undefined;\n  }\n\n  if (typeof value === 'bigint') {\n    return value.toString();\n  }\n\n  if (value instanceof Date) {\n    return value.toISOString();\n  }\n\n  if (Array.isArray(value)) {\n    return stringifyToJsonValue(value);\n  }\n\n  if (typeof URLSearchParams !== 'undefined' && value instanceof URLSearchParams) {\n    return serializeSearchParams(value);\n  }\n\n  if (isPlainObject(value)) {\n    return stringifyToJsonValue(value);\n  }\n\n  return undefined;\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/svelte-query/fetch/core/serverSentEvents.gen.ts",
    "content": "// 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 const 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            // Normalize line endings: CRLF -> LF, then CR -> LF\n            buffer = buffer.replace(/\\r\\n/g, '\\n').replace(/\\r/g, '\\n');\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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/svelte-query/fetch/core/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { Auth, AuthToken } from './auth.gen';\nimport type { BodySerializer, QuerySerializer, QuerySerializerOptions } from './bodySerializer.gen';\n\nexport type HttpMethod =\n  | 'connect'\n  | 'delete'\n  | 'get'\n  | 'head'\n  | 'options'\n  | 'patch'\n  | 'post'\n  | 'put'\n  | 'trace';\n\nexport type Client<\n  RequestFn = never,\n  Config = unknown,\n  MethodFn = never,\n  BuildUrlFn = never,\n  SseFn = never,\n> = {\n  /**\n   * Returns the final request URL.\n   */\n  buildUrl: BuildUrlFn;\n  getConfig: () => Config;\n  request: RequestFn;\n  setConfig: (config: Config) => Config;\n} & {\n  [K in HttpMethod]: MethodFn;\n} & ([SseFn] extends [never] ? { sse?: never } : { sse: { [K in HttpMethod]: SseFn } });\n\nexport interface Config {\n  /**\n   * Auth token or a function returning auth token. The resolved value will be\n   * added to the request payload as defined by its `security` array.\n   */\n  auth?: ((auth: Auth) => Promise<AuthToken> | AuthToken) | AuthToken;\n  /**\n   * A function for serializing request body parameter. By default,\n   * {@link JSON.stringify()} will be used.\n   */\n  bodySerializer?: BodySerializer | null;\n  /**\n   * An object containing any HTTP headers that you want to pre-populate your\n   * `Headers` object with.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/Headers/Headers#init See more}\n   */\n  headers?:\n    | RequestInit['headers']\n    | Record<\n        string,\n        string | number | boolean | (string | number | boolean)[] | null | undefined | unknown\n      >;\n  /**\n   * The request method.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/fetch#method See more}\n   */\n  method?: Uppercase<HttpMethod>;\n  /**\n   * A function for serializing request query parameters. By default, arrays\n   * will be exploded in form style, objects will be exploded in deepObject\n   * style, and reserved characters are percent-encoded.\n   *\n   * This method will have no effect if the native `paramsSerializer()` Axios\n   * API function is used.\n   *\n   * {@link https://swagger.io/docs/specification/serialization/#query View examples}\n   */\n  querySerializer?: QuerySerializer | QuerySerializerOptions;\n  /**\n   * A function validating request data. This is useful if you want to ensure\n   * the request conforms to the desired shape, so it can be safely sent to\n   * the server.\n   */\n  requestValidator?: (data: unknown) => Promise<unknown>;\n  /**\n   * A function transforming response data before it's returned. This is useful\n   * for post-processing data, e.g. converting ISO strings into Date objects.\n   */\n  responseTransformer?: (data: unknown) => Promise<unknown>;\n  /**\n   * A function validating response data. This is useful if you want to ensure\n   * the response conforms to the desired shape, so it can be safely passed to\n   * the transformers and returned to the user.\n   */\n  responseValidator?: (data: unknown) => Promise<unknown>;\n}\n\ntype IsExactlyNeverOrNeverUndefined<T> = [T] extends [never]\n  ? true\n  : [T] extends [never | undefined]\n    ? [undefined] extends [T]\n      ? false\n      : true\n    : false;\n\nexport type OmitNever<T extends Record<string, unknown>> = {\n  [K in keyof T as IsExactlyNeverOrNeverUndefined<T[K]> extends true ? never : K]: T[K];\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/svelte-query/fetch/core/utils.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/svelte-query/fetch/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport { apiVVersionODataControllerCount, callToTestOrderOfParams, callWithDefaultOptionalParameters, callWithDefaultParameters, callWithDescriptions, callWithDuplicateResponses, callWithNoContentResponse, callWithParameters, callWithResponse, callWithResponseAndNoContentResponse, callWithResponses, callWithResultFromHeader, callWithWeirdParameterNames, collectionFormat, complexParams, complexTypes, deleteCallWithoutParametersAndResponse, deleteFoo, deprecatedCall, dummyA, dummyB, duplicateName, duplicateName2, duplicateName3, duplicateName4, export_, fileResponse, fooWow, getApiVbyApiVersionSimpleOperation, getCallWithOptionalParam, getCallWithoutParametersAndResponse, headCallWithoutParametersAndResponse, import_, multipartRequest, multipartResponse, nonAsciiæøåÆøÅöôêÊ字符串, type Options, optionsCallWithoutParametersAndResponse, patchApiVbyApiVersionNoTag, patchCallWithoutParametersAndResponse, postApiVbyApiVersionFormData, postApiVbyApiVersionRequestBody, postCallWithOptionalParam, postCallWithoutParametersAndResponse, putCallWithoutParametersAndResponse, putWithFormUrlEncoded, testErrorCode, types, uploadFile } from './sdk.gen';\nexport type { _3eNum1Период, _400, AdditionalPropertiesIntegerIssue, AdditionalPropertiesUnknownIssue, AdditionalPropertiesUnknownIssue2, AdditionalPropertiesUnknownIssue3, AdditionalPropertiesUnknownIssueWritable, AnyOfAnyAndNull, AnyOfArrays, ApiVVersionODataControllerCountData, ApiVVersionODataControllerCountResponse, ApiVVersionODataControllerCountResponses, ArrayWithAnyOfProperties, ArrayWithArray, ArrayWithBooleans, ArrayWithNumbers, ArrayWithProperties, ArrayWithReferences, ArrayWithStrings, CallToTestOrderOfParamsData, CallWithDefaultOptionalParametersData, CallWithDefaultParametersData, CallWithDescriptionsData, CallWithDuplicateResponsesData, CallWithDuplicateResponsesError, CallWithDuplicateResponsesErrors, CallWithDuplicateResponsesResponse, CallWithDuplicateResponsesResponses, CallWithNoContentResponseData, CallWithNoContentResponseResponse, CallWithNoContentResponseResponses, CallWithParametersData, CallWithResponseAndNoContentResponseData, CallWithResponseAndNoContentResponseResponse, CallWithResponseAndNoContentResponseResponses, CallWithResponseData, CallWithResponseResponse, CallWithResponseResponses, CallWithResponsesData, CallWithResponsesError, CallWithResponsesErrors, CallWithResponsesResponse, CallWithResponsesResponses, CallWithResultFromHeaderData, CallWithResultFromHeaderErrors, CallWithResultFromHeaderResponses, CallWithWeirdParameterNamesData, CamelCaseCommentWithBreaks, CharactersInDescription, ClientOptions, CollectionFormatData, CommentWithBackticks, CommentWithBackticksAndQuotes, CommentWithBreaks, CommentWithExpressionPlaceholders, CommentWithQuotes, CommentWithReservedCharacters, CommentWithSlashes, ComplexParamsData, ComplexParamsResponse, ComplexParamsResponses, ComplexTypesData, ComplexTypesErrors, ComplexTypesResponse, ComplexTypesResponses, CompositionBaseModel, CompositionExtendedModel, CompositionWithAllOfAndNullable, CompositionWithAnyOf, CompositionWithAnyOfAndNullable, CompositionWithAnyOfAnonymous, CompositionWithNestedAnyAndTypeNull, CompositionWithNestedAnyOfAndNull, CompositionWithOneOf, CompositionWithOneOfAndComplexArrayDictionary, CompositionWithOneOfAndNullable, CompositionWithOneOfAndProperties, CompositionWithOneOfAndSimpleArrayDictionary, CompositionWithOneOfAndSimpleDictionary, CompositionWithOneOfAnonymous, CompositionWithOneOfDiscriminator, ConstValue, Default, DeleteCallWithoutParametersAndResponseData, DeleteFooData, DeleteFooData2, DeleteFooData3, DeprecatedCallData, DeprecatedModel, DictionaryWithArray, DictionaryWithDictionary, DictionaryWithProperties, DictionaryWithPropertiesAndAdditionalProperties, DictionaryWithReference, DictionaryWithString, DummyAData, DummyAResponse, DummyAResponses, DummyBData, DummyBResponse, DummyBResponses, DuplicateName2Data, DuplicateName3Data, DuplicateName4Data, DuplicateNameData, EnumFromDescription, EnumWithExtensions, EnumWithNumbers, EnumWithReplacedCharacters, EnumWithStrings, EnumWithXEnumNames, ExportData, ExternalRefA, ExternalRefB, ExternalSharedModel, File, FileResponseData, FileResponseResponse, FileResponseResponses, FileWritable, FooWowData, FooWowResponses, FreeFormObjectWithAdditionalPropertiesEqEmptyObject, FreeFormObjectWithAdditionalPropertiesEqTrue, FreeFormObjectWithoutAdditionalProperties, GenericSchemaDuplicateIssue1SystemBoolean, GenericSchemaDuplicateIssue1SystemBooleanWritable, GenericSchemaDuplicateIssue1SystemString, GenericSchemaDuplicateIssue1SystemStringWritable, GetApiVbyApiVersionSimpleOperationData, GetApiVbyApiVersionSimpleOperationError, GetApiVbyApiVersionSimpleOperationErrors, GetApiVbyApiVersionSimpleOperationResponse, GetApiVbyApiVersionSimpleOperationResponses, GetCallWithOptionalParamData, GetCallWithoutParametersAndResponseData, HeadCallWithoutParametersAndResponseData, Import, ImportData, ImportResponse, ImportResponses, IoK8sApimachineryPkgApisMetaV1DeleteOptions, IoK8sApimachineryPkgApisMetaV1Preconditions, ModelCircle, ModelFromZendesk, ModelSquare, ModelThatExtends, ModelThatExtendsExtends, ModelWithAdditionalPropertiesEqTrue, ModelWithAdditionalPropertiesRef, ModelWithAnyOfConstantSizeArray, ModelWithAnyOfConstantSizeArrayAndIntersect, ModelWithAnyOfConstantSizeArrayNullable, ModelWithAnyOfConstantSizeArrayWithNSizeAndOptions, ModelWithAnyOfConstantSizeArrayWithNSizeAndOptionsWritable, ModelWithArray, ModelWithArrayReadOnlyAndWriteOnly, ModelWithArrayReadOnlyAndWriteOnlyWritable, ModelWithBackticksInDescription, ModelWithBoolean, ModelWithCircularReference, ModelWithConst, ModelWithConstantSizeArray, ModelWithDictionary, ModelWithDuplicateImports, ModelWithDuplicateProperties, ModelWithEnum, ModelWithEnumFromDescription, ModelWithEnumWithHyphen, ModelWithInteger, ModelWithNestedArrayEnums, ModelWithNestedArrayEnumsData, ModelWithNestedArrayEnumsDataBar, ModelWithNestedArrayEnumsDataFoo, ModelWithNestedCompositionEnums, ModelWithNestedEnums, ModelWithNestedProperties, ModelWithNullableObject, ModelWithNullableString, ModelWithNumericEnumUnion, ModelWithOneOfAndProperties, ModelWithOneOfEnum, ModelWithOrderedProperties, ModelWithPattern, ModelWithPatternWritable, ModelWithPrefixItemsConstantSizeArray, ModelWithProperties, ModelWithPropertiesWritable, ModelWithReadOnlyAndWriteOnly, ModelWithReadOnlyAndWriteOnlyWritable, ModelWithReference, ModelWithReferenceWritable, ModelWithString, ModelWithStringError, MultipartRequestData, MultipartResponseData, MultipartResponseResponse, MultipartResponseResponses, NestedAnyOfArraysNullable, NonAsciiæøåÆøÅöôêÊ字符串Data, NonAsciiæøåÆøÅöôêÊ字符串Response, NonAsciiæøåÆøÅöôêÊ字符串Responses, NonAsciiStringæøåÆøÅöôêÊ字符串, NullableObject, OneOfAllOfIssue, OneOfAllOfIssueWritable, OptionsCallWithoutParametersAndResponseData, Pageable, ParameterSimpleParameterUnused, PatchApiVbyApiVersionNoTagData, PatchApiVbyApiVersionNoTagResponses, PatchCallWithoutParametersAndResponseData, PostApiVbyApiVersionFormDataData, PostApiVbyApiVersionRequestBodyData, PostCallWithOptionalParamData, PostCallWithOptionalParamResponse, PostCallWithOptionalParamResponses, PostCallWithoutParametersAndResponseData, PostServiceWithEmptyTagResponse, PostServiceWithEmptyTagResponse2, PutCallWithoutParametersAndResponseData, PutWithFormUrlEncodedData, SchemaWithFormRestrictedKeys, SimpleBoolean, SimpleFile, SimpleFormData, SimpleInteger, SimpleParameter, SimpleReference, SimpleRequestBody, SimpleString, SimpleStringWithPattern, TestErrorCodeData, TestErrorCodeErrors, TestErrorCodeResponses, TypesData, TypesResponse, TypesResponses, UploadFileData, UploadFileResponse, UploadFileResponses, XFooBar } from './types.gen';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/svelte-query/fetch/sdk.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport { type Client, formDataBodySerializer, type Options as Options2, type TDataShape, urlSearchParamsBodySerializer } from './client';\nimport { client } from './client.gen';\nimport type { ApiVVersionODataControllerCountData, ApiVVersionODataControllerCountResponses, CallToTestOrderOfParamsData, CallWithDefaultOptionalParametersData, CallWithDefaultParametersData, CallWithDescriptionsData, CallWithDuplicateResponsesData, CallWithDuplicateResponsesErrors, CallWithDuplicateResponsesResponses, CallWithNoContentResponseData, CallWithNoContentResponseResponses, CallWithParametersData, CallWithResponseAndNoContentResponseData, CallWithResponseAndNoContentResponseResponses, CallWithResponseData, CallWithResponseResponses, CallWithResponsesData, CallWithResponsesErrors, CallWithResponsesResponses, CallWithResultFromHeaderData, CallWithResultFromHeaderErrors, CallWithResultFromHeaderResponses, CallWithWeirdParameterNamesData, CollectionFormatData, ComplexParamsData, ComplexParamsResponses, ComplexTypesData, ComplexTypesErrors, ComplexTypesResponses, DeleteCallWithoutParametersAndResponseData, DeleteFooData3, DeprecatedCallData, DummyAData, DummyAResponses, DummyBData, DummyBResponses, DuplicateName2Data, DuplicateName3Data, DuplicateName4Data, DuplicateNameData, ExportData, FileResponseData, FileResponseResponses, FooWowData, FooWowResponses, GetApiVbyApiVersionSimpleOperationData, GetApiVbyApiVersionSimpleOperationErrors, GetApiVbyApiVersionSimpleOperationResponses, GetCallWithOptionalParamData, GetCallWithoutParametersAndResponseData, HeadCallWithoutParametersAndResponseData, ImportData, ImportResponses, MultipartRequestData, MultipartResponseData, MultipartResponseResponses, NonAsciiæøåÆøÅöôêÊ字符串Data, NonAsciiæøåÆøÅöôêÊ字符串Responses, OptionsCallWithoutParametersAndResponseData, PatchApiVbyApiVersionNoTagData, PatchApiVbyApiVersionNoTagResponses, PatchCallWithoutParametersAndResponseData, PostApiVbyApiVersionFormDataData, PostApiVbyApiVersionRequestBodyData, PostCallWithOptionalParamData, PostCallWithOptionalParamResponses, PostCallWithoutParametersAndResponseData, PutCallWithoutParametersAndResponseData, PutWithFormUrlEncodedData, TestErrorCodeData, TestErrorCodeErrors, TestErrorCodeResponses, TypesData, TypesResponses, UploadFileData, UploadFileResponses } from './types.gen';\n\nexport type Options<TData extends TDataShape = TDataShape, ThrowOnError extends boolean = boolean> = Options2<TData, ThrowOnError> & {\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\nexport const export_ = <ThrowOnError extends boolean = false>(options?: Options<ExportData, ThrowOnError>) => (options?.client ?? client).get<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/no+tag', ...options });\n\nexport const patchApiVbyApiVersionNoTag = <ThrowOnError extends boolean = false>(options?: Options<PatchApiVbyApiVersionNoTagData, ThrowOnError>) => (options?.client ?? client).patch<PatchApiVbyApiVersionNoTagResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/no+tag', ...options });\n\nexport const import_ = <ThrowOnError extends boolean = false>(options: Options<ImportData, ThrowOnError>) => (options.client ?? client).post<ImportResponses, unknown, ThrowOnError>({\n    url: '/api/v{api-version}/no+tag',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options.headers\n    }\n});\n\nexport const fooWow = <ThrowOnError extends boolean = false>(options?: Options<FooWowData, ThrowOnError>) => (options?.client ?? client).put<FooWowResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/no+tag', ...options });\n\nexport const apiVVersionODataControllerCount = <ThrowOnError extends boolean = false>(options?: Options<ApiVVersionODataControllerCountData, ThrowOnError>) => (options?.client ?? client).get<ApiVVersionODataControllerCountResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple/$count', ...options });\n\nexport const getApiVbyApiVersionSimpleOperation = <ThrowOnError extends boolean = false>(options: Options<GetApiVbyApiVersionSimpleOperationData, ThrowOnError>) => (options.client ?? client).get<GetApiVbyApiVersionSimpleOperationResponses, GetApiVbyApiVersionSimpleOperationErrors, ThrowOnError>({ url: '/api/v{api-version}/simple:operation', ...options });\n\nexport const deleteCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<DeleteCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).delete<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const getCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<GetCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).get<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const headCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<HeadCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).head<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const optionsCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<OptionsCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).options<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const patchCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<PatchCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).patch<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const postCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<PostCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).post<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const putCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<PutCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).put<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const deleteFoo = <ThrowOnError extends boolean = false>(options: Options<DeleteFooData3, ThrowOnError>) => (options.client ?? client).delete<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/foo/{foo_param}/bar/{BarParam}', ...options });\n\nexport const callWithDescriptions = <ThrowOnError extends boolean = false>(options?: Options<CallWithDescriptionsData, ThrowOnError>) => (options?.client ?? client).post<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/descriptions', ...options });\n\n/**\n * @deprecated\n */\nexport const deprecatedCall = <ThrowOnError extends boolean = false>(options: Options<DeprecatedCallData, ThrowOnError>) => (options.client ?? client).post<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/parameters/deprecated', ...options });\n\nexport const callWithParameters = <ThrowOnError extends boolean = false>(options: Options<CallWithParametersData, ThrowOnError>) => (options.client ?? client).post<unknown, unknown, ThrowOnError>({\n    url: '/api/v{api-version}/parameters/{parameterPath}',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options.headers\n    }\n});\n\nexport const callWithWeirdParameterNames = <ThrowOnError extends boolean = false>(options: Options<CallWithWeirdParameterNamesData, ThrowOnError>) => (options.client ?? client).post<unknown, unknown, ThrowOnError>({\n    url: '/api/v{api-version}/parameters/{parameter.path.1}/{parameter-path-2}/{PARAMETER-PATH-3}',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options.headers\n    }\n});\n\nexport const getCallWithOptionalParam = <ThrowOnError extends boolean = false>(options: Options<GetCallWithOptionalParamData, ThrowOnError>) => (options.client ?? client).get<unknown, unknown, ThrowOnError>({\n    url: '/api/v{api-version}/parameters',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options.headers\n    }\n});\n\nexport const postCallWithOptionalParam = <ThrowOnError extends boolean = false>(options: Options<PostCallWithOptionalParamData, ThrowOnError>) => (options.client ?? client).post<PostCallWithOptionalParamResponses, unknown, ThrowOnError>({\n    url: '/api/v{api-version}/parameters',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options.headers\n    }\n});\n\nexport const postApiVbyApiVersionRequestBody = <ThrowOnError extends boolean = false>(options?: Options<PostApiVbyApiVersionRequestBodyData, ThrowOnError>) => (options?.client ?? client).post<unknown, unknown, ThrowOnError>({\n    url: '/api/v{api-version}/requestBody',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options?.headers\n    }\n});\n\nexport const postApiVbyApiVersionFormData = <ThrowOnError extends boolean = false>(options?: Options<PostApiVbyApiVersionFormDataData, ThrowOnError>) => (options?.client ?? client).post<unknown, unknown, ThrowOnError>({\n    ...formDataBodySerializer,\n    url: '/api/v{api-version}/formData',\n    ...options,\n    headers: {\n        'Content-Type': null,\n        ...options?.headers\n    }\n});\n\nexport const callWithDefaultParameters = <ThrowOnError extends boolean = false>(options?: Options<CallWithDefaultParametersData, ThrowOnError>) => (options?.client ?? client).get<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/defaults', ...options });\n\nexport const callWithDefaultOptionalParameters = <ThrowOnError extends boolean = false>(options?: Options<CallWithDefaultOptionalParametersData, ThrowOnError>) => (options?.client ?? client).post<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/defaults', ...options });\n\nexport const callToTestOrderOfParams = <ThrowOnError extends boolean = false>(options: Options<CallToTestOrderOfParamsData, ThrowOnError>) => (options.client ?? client).put<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/defaults', ...options });\n\nexport const duplicateName = <ThrowOnError extends boolean = false>(options?: Options<DuplicateNameData, ThrowOnError>) => (options?.client ?? client).delete<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/duplicate', ...options });\n\nexport const duplicateName2 = <ThrowOnError extends boolean = false>(options?: Options<DuplicateName2Data, ThrowOnError>) => (options?.client ?? client).get<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/duplicate', ...options });\n\nexport const duplicateName3 = <ThrowOnError extends boolean = false>(options?: Options<DuplicateName3Data, ThrowOnError>) => (options?.client ?? client).post<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/duplicate', ...options });\n\nexport const duplicateName4 = <ThrowOnError extends boolean = false>(options?: Options<DuplicateName4Data, ThrowOnError>) => (options?.client ?? client).put<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/duplicate', ...options });\n\nexport const callWithNoContentResponse = <ThrowOnError extends boolean = false>(options?: Options<CallWithNoContentResponseData, ThrowOnError>) => (options?.client ?? client).get<CallWithNoContentResponseResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/no-content', ...options });\n\nexport const callWithResponseAndNoContentResponse = <ThrowOnError extends boolean = false>(options?: Options<CallWithResponseAndNoContentResponseData, ThrowOnError>) => (options?.client ?? client).get<CallWithResponseAndNoContentResponseResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/multiple-tags/response-and-no-content', ...options });\n\nexport const dummyA = <ThrowOnError extends boolean = false>(options?: Options<DummyAData, ThrowOnError>) => (options?.client ?? client).get<DummyAResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/multiple-tags/a', ...options });\n\nexport const dummyB = <ThrowOnError extends boolean = false>(options?: Options<DummyBData, ThrowOnError>) => (options?.client ?? client).get<DummyBResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/multiple-tags/b', ...options });\n\nexport const callWithResponse = <ThrowOnError extends boolean = false>(options?: Options<CallWithResponseData, ThrowOnError>) => (options?.client ?? client).get<CallWithResponseResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/response', ...options });\n\nexport const callWithDuplicateResponses = <ThrowOnError extends boolean = false>(options?: Options<CallWithDuplicateResponsesData, ThrowOnError>) => (options?.client ?? client).post<CallWithDuplicateResponsesResponses, CallWithDuplicateResponsesErrors, ThrowOnError>({ url: '/api/v{api-version}/response', ...options });\n\nexport const callWithResponses = <ThrowOnError extends boolean = false>(options?: Options<CallWithResponsesData, ThrowOnError>) => (options?.client ?? client).put<CallWithResponsesResponses, CallWithResponsesErrors, ThrowOnError>({ url: '/api/v{api-version}/response', ...options });\n\nexport const collectionFormat = <ThrowOnError extends boolean = false>(options: Options<CollectionFormatData, ThrowOnError>) => (options.client ?? client).get<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/collectionFormat', ...options });\n\nexport const types = <ThrowOnError extends boolean = false>(options: Options<TypesData, ThrowOnError>) => (options.client ?? client).get<TypesResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/types', ...options });\n\nexport const uploadFile = <ThrowOnError extends boolean = false>(options: Options<UploadFileData, ThrowOnError>) => (options.client ?? client).post<UploadFileResponses, unknown, ThrowOnError>({\n    ...urlSearchParamsBodySerializer,\n    url: '/api/v{api-version}/upload',\n    ...options,\n    headers: {\n        'Content-Type': 'application/x-www-form-urlencoded',\n        ...options.headers\n    }\n});\n\nexport const fileResponse = <ThrowOnError extends boolean = false>(options: Options<FileResponseData, ThrowOnError>) => (options.client ?? client).get<FileResponseResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/file/{id}', ...options });\n\nexport const complexTypes = <ThrowOnError extends boolean = false>(options: Options<ComplexTypesData, ThrowOnError>) => (options.client ?? client).get<ComplexTypesResponses, ComplexTypesErrors, ThrowOnError>({\n    querySerializer: { parameters: { parameterObject: { object: { style: 'form' } } } },\n    url: '/api/v{api-version}/complex',\n    ...options\n});\n\nexport const multipartResponse = <ThrowOnError extends boolean = false>(options?: Options<MultipartResponseData, ThrowOnError>) => (options?.client ?? client).get<MultipartResponseResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/multipart', ...options });\n\nexport const multipartRequest = <ThrowOnError extends boolean = false>(options?: Options<MultipartRequestData, ThrowOnError>) => (options?.client ?? client).post<unknown, unknown, ThrowOnError>({\n    ...formDataBodySerializer,\n    url: '/api/v{api-version}/multipart',\n    ...options,\n    headers: {\n        'Content-Type': null,\n        ...options?.headers\n    }\n});\n\nexport const complexParams = <ThrowOnError extends boolean = false>(options: Options<ComplexParamsData, ThrowOnError>) => (options.client ?? client).put<ComplexParamsResponses, unknown, ThrowOnError>({\n    url: '/api/v{api-version}/complex/{id}',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json-patch+json',\n        ...options.headers\n    }\n});\n\nexport const callWithResultFromHeader = <ThrowOnError extends boolean = false>(options?: Options<CallWithResultFromHeaderData, ThrowOnError>) => (options?.client ?? client).post<CallWithResultFromHeaderResponses, CallWithResultFromHeaderErrors, ThrowOnError>({ url: '/api/v{api-version}/header', ...options });\n\nexport const testErrorCode = <ThrowOnError extends boolean = false>(options: Options<TestErrorCodeData, ThrowOnError>) => (options.client ?? client).post<TestErrorCodeResponses, TestErrorCodeErrors, ThrowOnError>({ url: '/api/v{api-version}/error', ...options });\n\nexport const nonAsciiæøåÆøÅöôêÊ字符串 = <ThrowOnError extends boolean = false>(options: Options<NonAsciiæøåÆøÅöôêÊ字符串Data, ThrowOnError>) => (options.client ?? client).post<NonAsciiæøåÆøÅöôêÊ字符串Responses, unknown, ThrowOnError>({ url: '/api/v{api-version}/non-ascii-æøåÆØÅöôêÊ字符串', ...options });\n\n/**\n * Login User\n */\nexport const putWithFormUrlEncoded = <ThrowOnError extends boolean = false>(options: Options<PutWithFormUrlEncodedData, ThrowOnError>) => (options.client ?? client).put<unknown, unknown, ThrowOnError>({\n    ...urlSearchParamsBodySerializer,\n    url: '/api/v{api-version}/non-ascii-æøåÆØÅöôêÊ字符串',\n    ...options,\n    headers: {\n        'Content-Type': 'application/x-www-form-urlencoded',\n        ...options.headers\n    }\n});\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/svelte-query/fetch/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type ClientOptions = {\n    baseUrl: 'http://localhost:3000/base' | (string & {});\n};\n\n/**\n * Model with number-only name\n */\nexport type _400 = string;\n\nexport type ExternalRefA = ExternalSharedModel;\n\nexport type ExternalRefB = ExternalSharedModel;\n\n/**\n * Testing multiline comments in string: First line\n * Second line\n *\n * Fourth line\n */\nexport type CamelCaseCommentWithBreaks = number;\n\n/**\n * Testing multiline comments in string: First line\n * Second line\n *\n * Fourth line\n */\nexport type CommentWithBreaks = number;\n\n/**\n * Testing backticks in string: `backticks` and ```multiple backticks``` should work\n */\nexport type CommentWithBackticks = number;\n\n/**\n * Testing backticks and quotes in string: `backticks`, 'quotes', \"double quotes\" and ```multiple backticks``` should work\n */\nexport type CommentWithBackticksAndQuotes = number;\n\n/**\n * Testing slashes in string: \\backwards\\\\\\ and /forwards/// should work\n */\nexport type CommentWithSlashes = number;\n\n/**\n * Testing expression placeholders in string: ${expression} should work\n */\nexport type CommentWithExpressionPlaceholders = number;\n\n/**\n * Testing quotes in string: 'single quote''' and \"double quotes\"\"\" should work\n */\nexport type CommentWithQuotes = number;\n\n/**\n * Testing reserved characters in string: * inline * and ** inline ** should work\n */\nexport type CommentWithReservedCharacters = number;\n\n/**\n * This is a simple number\n */\nexport type SimpleInteger = number;\n\n/**\n * This is a simple boolean\n */\nexport type SimpleBoolean = boolean;\n\n/**\n * This is a simple string\n */\nexport type SimpleString = string;\n\n/**\n * A string with non-ascii (unicode) characters valid in typescript identifiers (æøåÆØÅöÔèÈ字符串)\n */\nexport type NonAsciiStringæøåÆøÅöôêÊ字符串 = string;\n\n/**\n * This is a simple file\n */\nexport type SimpleFile = Blob | File;\n\n/**\n * This is a simple reference\n */\nexport type SimpleReference = ModelWithString;\n\n/**\n * This is a simple string\n */\nexport type SimpleStringWithPattern = string | null;\n\n/**\n * This is a simple enum with strings\n */\nexport type EnumWithStrings = 'Success' | 'Warning' | 'Error' | '\\'Single Quote\\'' | '\"Double Quotes\"' | 'Non-ascii: øæåôöØÆÅÔÖ字符串';\n\nexport type EnumWithReplacedCharacters = '\\'Single Quote\\'' | '\"Double Quotes\"' | 'øæåôöØÆÅÔÖ字符串' | 3.1 | '';\n\n/**\n * This is a simple enum with numbers\n */\nexport type EnumWithNumbers = 1 | 2 | 3 | 1.1 | 1.2 | 1.3 | 100 | 200 | 300 | -100 | -200 | -300 | -1.1 | -1.2 | -1.3;\n\n/**\n * Success=1,Warning=2,Error=3\n */\nexport type EnumFromDescription = number;\n\n/**\n * This is a simple enum with numbers\n */\nexport type EnumWithExtensions = 200 | 400 | 500;\n\nexport type EnumWithXEnumNames = 0 | 1 | 2;\n\n/**\n * This is a simple array with numbers\n */\nexport type ArrayWithNumbers = Array<number>;\n\n/**\n * This is a simple array with booleans\n */\nexport type ArrayWithBooleans = Array<boolean>;\n\n/**\n * This is a simple array with strings\n */\nexport type ArrayWithStrings = Array<string>;\n\n/**\n * This is a simple array with references\n */\nexport type ArrayWithReferences = Array<ModelWithString>;\n\n/**\n * This is a simple array containing an array\n */\nexport type ArrayWithArray = Array<Array<ModelWithString>>;\n\n/**\n * This is a simple array with properties\n */\nexport type ArrayWithProperties = Array<{\n    '16x16'?: CamelCaseCommentWithBreaks;\n    bar?: string;\n}>;\n\n/**\n * This is a simple array with any of properties\n */\nexport type ArrayWithAnyOfProperties = Array<{\n    foo?: string;\n} | {\n    bar?: string;\n}>;\n\nexport type AnyOfAnyAndNull = {\n    data?: unknown;\n};\n\n/**\n * This is a simple array with any of properties\n */\nexport type AnyOfArrays = {\n    results?: Array<{\n        foo?: string;\n    } | {\n        bar?: string;\n    }>;\n};\n\n/**\n * This is a string dictionary\n */\nexport type DictionaryWithString = {\n    [key: string]: string;\n};\n\nexport type DictionaryWithPropertiesAndAdditionalProperties = {\n    foo?: number;\n    bar?: boolean;\n    [key: string]: string | number | boolean | undefined;\n};\n\n/**\n * This is a string reference\n */\nexport type DictionaryWithReference = {\n    [key: string]: ModelWithString;\n};\n\n/**\n * This is a complex dictionary\n */\nexport type DictionaryWithArray = {\n    [key: string]: Array<ModelWithString>;\n};\n\n/**\n * This is a string dictionary\n */\nexport type DictionaryWithDictionary = {\n    [key: string]: {\n        [key: string]: string;\n    };\n};\n\n/**\n * This is a complex dictionary\n */\nexport type DictionaryWithProperties = {\n    [key: string]: {\n        foo?: string;\n        bar?: string;\n    };\n};\n\n/**\n * This is a model with one number property\n */\nexport type ModelWithInteger = {\n    /**\n     * This is a simple number property\n     */\n    prop?: number;\n};\n\n/**\n * This is a model with one boolean property\n */\nexport type ModelWithBoolean = {\n    /**\n     * This is a simple boolean property\n     */\n    prop?: boolean;\n};\n\n/**\n * This is a model with one string property\n */\nexport type ModelWithString = {\n    /**\n     * This is a simple string property\n     */\n    prop?: string;\n};\n\n/**\n * This is a model with one string property\n */\nexport type ModelWithStringError = {\n    /**\n     * This is a simple string property\n     */\n    prop?: string;\n};\n\n/**\n * `Comment` or `VoiceComment`. The JSON object for adding voice comments to tickets is different. See [Adding voice comments to tickets](/documentation/ticketing/managing-tickets/adding-voice-comments-to-tickets)\n */\nexport type ModelFromZendesk = string;\n\n/**\n * This is a model with one string property\n */\nexport type ModelWithNullableString = {\n    /**\n     * This is a simple string property\n     */\n    nullableProp1?: string | null;\n    /**\n     * This is a simple string property\n     */\n    nullableRequiredProp1: string | null;\n    /**\n     * This is a simple string property\n     */\n    nullableProp2?: string | null;\n    /**\n     * This is a simple string property\n     */\n    nullableRequiredProp2: string | null;\n    /**\n     * This is a simple enum with strings\n     */\n    'foo_bar-enum'?: 'Success' | 'Warning' | 'Error' | 'ØÆÅ字符串';\n};\n\n/**\n * This is a model with one enum\n */\nexport type ModelWithEnum = {\n    /**\n     * This is a simple enum with strings\n     */\n    'foo_bar-enum'?: 'Success' | 'Warning' | 'Error' | 'ØÆÅ字符串';\n    /**\n     * These are the HTTP error code enums\n     */\n    statusCode?: '100' | '200 FOO' | '300 FOO_BAR' | '400 foo-bar' | '500 foo.bar' | '600 foo&bar';\n    /**\n     * Simple boolean enum\n     */\n    bool?: true;\n};\n\n/**\n * This is a model with one enum with escaped name\n */\nexport type ModelWithEnumWithHyphen = {\n    /**\n     * Foo-Bar-Baz-Qux\n     */\n    'foo-bar-baz-qux'?: '3.0';\n};\n\n/**\n * This is a model with one enum\n */\nexport type ModelWithEnumFromDescription = {\n    /**\n     * Success=1,Warning=2,Error=3\n     */\n    test?: number;\n};\n\n/**\n * This is a model with nested enums\n */\nexport type ModelWithNestedEnums = {\n    dictionaryWithEnum?: {\n        [key: string]: 'Success' | 'Warning' | 'Error';\n    };\n    dictionaryWithEnumFromDescription?: {\n        [key: string]: number;\n    };\n    arrayWithEnum?: Array<'Success' | 'Warning' | 'Error'>;\n    arrayWithDescription?: Array<number>;\n    /**\n     * This is a simple enum with strings\n     */\n    'foo_bar-enum'?: 'Success' | 'Warning' | 'Error' | 'ØÆÅ字符串';\n};\n\n/**\n * This is a model with one property containing a reference\n */\nexport type ModelWithReference = {\n    prop?: ModelWithProperties;\n};\n\n/**\n * This is a model with one property containing an array\n */\nexport type ModelWithArrayReadOnlyAndWriteOnly = {\n    prop?: Array<ModelWithReadOnlyAndWriteOnly>;\n    propWithFile?: Array<Blob | File>;\n    propWithNumber?: Array<number>;\n};\n\n/**\n * This is a model with one property containing an array\n */\nexport type ModelWithArray = {\n    prop?: Array<ModelWithString>;\n    propWithFile?: Array<Blob | File>;\n    propWithNumber?: Array<number>;\n};\n\n/**\n * This is a model with one property containing a dictionary\n */\nexport type ModelWithDictionary = {\n    prop?: {\n        [key: string]: string;\n    };\n};\n\n/**\n * This is a deprecated model with a deprecated property\n *\n * @deprecated\n */\nexport type DeprecatedModel = {\n    /**\n     * This is a deprecated property\n     *\n     * @deprecated\n     */\n    prop?: string;\n};\n\n/**\n * This is a model with one property containing a circular reference\n */\nexport type ModelWithCircularReference = {\n    prop?: ModelWithCircularReference;\n};\n\n/**\n * This is a model with one property with a 'one of' relationship\n */\nexport type CompositionWithOneOf = {\n    propA?: ModelWithString | ModelWithEnum | ModelWithArray | ModelWithDictionary;\n};\n\n/**\n * This is a model with one property with a 'one of' relationship where the options are not $ref\n */\nexport type CompositionWithOneOfAnonymous = {\n    propA?: {\n        propA?: string;\n    } | string | number;\n};\n\n/**\n * Circle\n */\nexport type ModelCircle = {\n    kind: string;\n    radius?: number;\n};\n\n/**\n * Square\n */\nexport type ModelSquare = {\n    kind: string;\n    sideLength?: number;\n};\n\n/**\n * This is a model with one property with a 'one of' relationship where the options are not $ref\n */\nexport type CompositionWithOneOfDiscriminator = ({\n    kind: 'circle';\n} & ModelCircle) | ({\n    kind: 'square';\n} & ModelSquare);\n\n/**\n * This is a model with one property with a 'any of' relationship\n */\nexport type CompositionWithAnyOf = {\n    propA?: ModelWithString | ModelWithEnum | ModelWithArray | ModelWithDictionary;\n};\n\n/**\n * This is a model with one property with a 'any of' relationship where the options are not $ref\n */\nexport type CompositionWithAnyOfAnonymous = {\n    propA?: {\n        propA?: string;\n    } | string | number;\n};\n\n/**\n * This is a model with nested 'any of' property with a type null\n */\nexport type CompositionWithNestedAnyAndTypeNull = {\n    propA?: Array<ModelWithDictionary | null> | Array<ModelWithArray | null>;\n};\n\nexport type _3eNum1Период = 'Bird' | 'Dog';\n\nexport type ConstValue = 'ConstValue';\n\n/**\n * This is a model with one property with a 'any of' relationship where the options are not $ref\n */\nexport type CompositionWithNestedAnyOfAndNull = {\n    propA?: Array<_3eNum1Период | ConstValue> | null;\n};\n\n/**\n * This is a model with one property with a 'one of' relationship\n */\nexport type CompositionWithOneOfAndNullable = {\n    propA?: {\n        boolean?: boolean;\n    } | ModelWithEnum | ModelWithArray | ModelWithDictionary | null;\n};\n\n/**\n * This is a model that contains a simple dictionary within composition\n */\nexport type CompositionWithOneOfAndSimpleDictionary = {\n    propA?: boolean | {\n        [key: string]: number;\n    };\n};\n\n/**\n * This is a model that contains a dictionary of simple arrays within composition\n */\nexport type CompositionWithOneOfAndSimpleArrayDictionary = {\n    propA?: boolean | {\n        [key: string]: Array<boolean>;\n    };\n};\n\n/**\n * This is a model that contains a dictionary of complex arrays (composited) within composition\n */\nexport type CompositionWithOneOfAndComplexArrayDictionary = {\n    propA?: boolean | {\n        [key: string]: Array<number | string>;\n    };\n};\n\n/**\n * This is a model with one property with a 'all of' relationship\n */\nexport type CompositionWithAllOfAndNullable = {\n    propA?: ({\n        boolean?: boolean;\n    } & ModelWithEnum & ModelWithArray & ModelWithDictionary) | null;\n};\n\n/**\n * This is a model with one property with a 'any of' relationship\n */\nexport type CompositionWithAnyOfAndNullable = {\n    propA?: {\n        boolean?: boolean;\n    } | ModelWithEnum | ModelWithArray | ModelWithDictionary | null;\n};\n\n/**\n * This is a base model with two simple optional properties\n */\nexport type CompositionBaseModel = {\n    firstName?: string;\n    lastname?: string;\n};\n\n/**\n * This is a model that extends the base model\n */\nexport type CompositionExtendedModel = CompositionBaseModel & {\n    age: number;\n    firstName: string;\n    lastname: string;\n};\n\n/**\n * This is a model with one nested property\n */\nexport type ModelWithProperties = {\n    required: string;\n    readonly requiredAndReadOnly: string;\n    requiredAndNullable: string | null;\n    string?: string;\n    number?: number;\n    boolean?: boolean;\n    reference?: ModelWithString;\n    'property with space'?: string;\n    default?: string;\n    try?: string;\n    readonly '@namespace.string'?: string;\n    readonly '@namespace.integer'?: number;\n};\n\n/**\n * This is a model with one nested property\n */\nexport type ModelWithNestedProperties = {\n    readonly first: {\n        readonly second: {\n            readonly third: string | null;\n        } | null;\n    } | null;\n};\n\n/**\n * This is a model with duplicated properties\n */\nexport type ModelWithDuplicateProperties = {\n    prop?: ModelWithString;\n};\n\n/**\n * This is a model with ordered properties\n */\nexport type ModelWithOrderedProperties = {\n    zebra?: string;\n    apple?: string;\n    hawaii?: string;\n};\n\n/**\n * This is a model with duplicated imports\n */\nexport type ModelWithDuplicateImports = {\n    propA?: ModelWithString;\n    propB?: ModelWithString;\n    propC?: ModelWithString;\n};\n\n/**\n * This is a model that extends another model\n */\nexport type ModelThatExtends = ModelWithString & {\n    propExtendsA?: string;\n    propExtendsB?: ModelWithString;\n};\n\n/**\n * This is a model that extends another model\n */\nexport type ModelThatExtendsExtends = ModelWithString & ModelThatExtends & {\n    propExtendsC?: string;\n    propExtendsD?: ModelWithString;\n};\n\n/**\n * This is a model that contains a some patterns\n */\nexport type ModelWithPattern = {\n    key: string;\n    name: string;\n    readonly enabled?: boolean;\n    readonly modified?: string;\n    id?: string;\n    text?: string;\n    patternWithSingleQuotes?: string;\n    patternWithNewline?: string;\n    patternWithBacktick?: string;\n    patternWithUnicode?: string;\n};\n\nexport type File = {\n    /**\n     * Id\n     */\n    readonly id?: string;\n    /**\n     * Updated at\n     */\n    readonly updated_at?: string;\n    /**\n     * Created at\n     */\n    readonly created_at?: string;\n    /**\n     * Mime\n     */\n    mime: string;\n    /**\n     * File\n     */\n    readonly file?: string;\n};\n\nexport type Default = {\n    name?: string;\n};\n\nexport type Pageable = {\n    page?: number;\n    size?: number;\n    sort?: Array<string>;\n};\n\n/**\n * This is a free-form object without additionalProperties.\n */\nexport type FreeFormObjectWithoutAdditionalProperties = {\n    [key: string]: unknown;\n};\n\n/**\n * This is a free-form object with additionalProperties: true.\n */\nexport type FreeFormObjectWithAdditionalPropertiesEqTrue = {\n    [key: string]: unknown;\n};\n\n/**\n * This is a free-form object with additionalProperties: {}.\n */\nexport type FreeFormObjectWithAdditionalPropertiesEqEmptyObject = {\n    [key: string]: unknown;\n};\n\nexport type ModelWithConst = {\n    String?: 'String';\n    number?: 0;\n    null?: unknown;\n    withType?: 'Some string';\n};\n\n/**\n * This is a model with one property and additionalProperties: true\n */\nexport type ModelWithAdditionalPropertiesEqTrue = {\n    /**\n     * This is a simple string property\n     */\n    prop?: string;\n    [key: string]: unknown;\n};\n\nexport type NestedAnyOfArraysNullable = {\n    nullableArray?: Array<string | boolean> | null;\n};\n\nexport type CompositionWithOneOfAndProperties = ({\n    foo: SimpleParameter;\n} | {\n    bar: NonAsciiStringæøåÆøÅöôêÊ字符串;\n}) & {\n    baz: number | null;\n    qux: number;\n};\n\n/**\n * An object that can be null\n */\nexport type NullableObject = {\n    foo?: string;\n} | null;\n\n/**\n * Some % character\n */\nexport type CharactersInDescription = string;\n\nexport type ModelWithNullableObject = {\n    data?: NullableObject;\n};\n\n/**\n * An object with additional properties that can be null\n */\nexport type ModelWithAdditionalPropertiesRef = {\n    [key: string]: NullableObject | null;\n};\n\nexport type ModelWithOneOfEnum = {\n    foo: 'Bar';\n} | {\n    foo: 'Baz';\n} | {\n    foo: 'Qux';\n} | {\n    content: string;\n    foo: 'Quux';\n} | {\n    content: [\n        string,\n        string\n    ];\n    foo: 'Corge';\n};\n\nexport type ModelWithNestedArrayEnumsDataFoo = 'foo' | 'bar';\n\nexport type ModelWithNestedArrayEnumsDataBar = 'baz' | 'qux';\n\nexport type ModelWithNestedArrayEnumsData = {\n    foo?: Array<ModelWithNestedArrayEnumsDataFoo>;\n    bar?: Array<ModelWithNestedArrayEnumsDataBar>;\n};\n\nexport type ModelWithNestedArrayEnums = {\n    array_strings?: Array<string>;\n    data?: ModelWithNestedArrayEnumsData;\n};\n\nexport type ModelWithNestedCompositionEnums = {\n    foo?: ModelWithNestedArrayEnumsDataFoo;\n};\n\nexport type ModelWithReadOnlyAndWriteOnly = {\n    foo: string;\n    readonly bar: string;\n};\n\nexport type ModelWithConstantSizeArray = [\n    number,\n    number\n];\n\nexport type ModelWithAnyOfConstantSizeArray = [\n    number | string,\n    number | string,\n    number | string\n];\n\nexport type ModelWithPrefixItemsConstantSizeArray = Array<ModelWithInteger | number | string>;\n\nexport type ModelWithAnyOfConstantSizeArrayNullable = [\n    number | null | string,\n    number | null | string,\n    number | null | string\n];\n\nexport type ModelWithAnyOfConstantSizeArrayWithNSizeAndOptions = [\n    number | Import,\n    number | Import\n];\n\nexport type ModelWithAnyOfConstantSizeArrayAndIntersect = [\n    number & string,\n    number & string\n];\n\nexport type ModelWithNumericEnumUnion = {\n    /**\n     * Период\n     */\n    value?: -10 | -1 | 0 | 1 | 3 | 6 | 12;\n};\n\n/**\n * Some description with `back ticks`\n */\nexport type ModelWithBackticksInDescription = {\n    /**\n     * The template `that` should be used for parsing and importing the contents of the CSV file.\n     *\n     * <br/><p>There is one placeholder currently supported:<ul>     <li><b>${x}</b> - refers to the n-th column in the CSV file, e.g. ${1}, ${2}, ...)</li></ul><p>Example of a correct JSON template:</p>\n     * <pre>\n     * [\n     * {\n     * \"resourceType\": \"Asset\",\n     * \"identifier\": {\n     * \"name\": \"${1}\",\n     * \"domain\": {\n     * \"name\": \"${2}\",\n     * \"community\": {\n     * \"name\": \"Some Community\"\n     * }\n     * }\n     * },\n     * \"attributes\" : {\n     * \"00000000-0000-0000-0000-000000003115\" : [ {\n     * \"value\" : \"${3}\"\n     * } ],\n     * \"00000000-0000-0000-0000-000000000222\" : [ {\n     * \"value\" : \"${4}\"\n     * } ]\n     * }\n     * }\n     * ]\n     * </pre>\n     */\n    template?: string;\n};\n\nexport type ModelWithOneOfAndProperties = (SimpleParameter | NonAsciiStringæøåÆøÅöôêÊ字符串) & {\n    baz: number | null;\n    qux: number;\n};\n\n/**\n * Model used to test deduplication strategy (unused)\n */\nexport type ParameterSimpleParameterUnused = string;\n\n/**\n * Model used to test deduplication strategy\n */\nexport type PostServiceWithEmptyTagResponse = string;\n\n/**\n * Model used to test deduplication strategy\n */\nexport type PostServiceWithEmptyTagResponse2 = string;\n\n/**\n * Model used to test deduplication strategy\n */\nexport type DeleteFooData = string;\n\n/**\n * Model used to test deduplication strategy\n */\nexport type DeleteFooData2 = string;\n\n/**\n * Model with restricted keyword name\n */\nexport type Import = string;\n\nexport type SchemaWithFormRestrictedKeys = {\n    description?: string;\n    'x-enum-descriptions'?: string;\n    'x-enum-varnames'?: string;\n    'x-enumNames'?: string;\n    title?: string;\n    object?: {\n        description?: string;\n        'x-enum-descriptions'?: string;\n        'x-enum-varnames'?: string;\n        'x-enumNames'?: string;\n        title?: string;\n    };\n    array?: Array<{\n        description?: string;\n        'x-enum-descriptions'?: string;\n        'x-enum-varnames'?: string;\n        'x-enumNames'?: string;\n        title?: string;\n    }>;\n};\n\n/**\n * This schema was giving PascalCase transformations a hard time\n */\nexport type IoK8sApimachineryPkgApisMetaV1DeleteOptions = {\n    /**\n     * Must be fulfilled before a deletion is carried out. If not possible, a 409 Conflict status will be returned.\n     */\n    preconditions?: IoK8sApimachineryPkgApisMetaV1Preconditions;\n};\n\n/**\n * This schema was giving PascalCase transformations a hard time\n */\nexport type IoK8sApimachineryPkgApisMetaV1Preconditions = {\n    /**\n     * Specifies the target ResourceVersion\n     */\n    resourceVersion?: string;\n    /**\n     * Specifies the target UID.\n     */\n    uid?: string;\n};\n\nexport type AdditionalPropertiesUnknownIssue = {\n    [key: string]: string | number;\n};\n\nexport type AdditionalPropertiesUnknownIssue2 = {\n    [key: string]: string | number;\n};\n\nexport type AdditionalPropertiesUnknownIssue3 = string & {\n    entries: {\n        [key: string]: AdditionalPropertiesUnknownIssue;\n    };\n};\n\nexport type AdditionalPropertiesIntegerIssue = {\n    value: number;\n    [key: string]: number;\n};\n\nexport type OneOfAllOfIssue = ((ConstValue | GenericSchemaDuplicateIssue1SystemBoolean) & _3eNum1Период) | GenericSchemaDuplicateIssue1SystemString;\n\nexport type GenericSchemaDuplicateIssue1SystemBoolean = {\n    item?: boolean;\n    error?: string | null;\n    readonly hasError?: boolean;\n    data?: {\n        [key: string]: never;\n    };\n};\n\nexport type GenericSchemaDuplicateIssue1SystemString = {\n    item?: string | null;\n    error?: string | null;\n    readonly hasError?: boolean;\n};\n\nexport type ExternalSharedModel = {\n    id: string;\n    name?: string;\n};\n\n/**\n * This is a model with one property containing a reference\n */\nexport type ModelWithReferenceWritable = {\n    prop?: ModelWithPropertiesWritable;\n};\n\n/**\n * This is a model with one property containing an array\n */\nexport type ModelWithArrayReadOnlyAndWriteOnlyWritable = {\n    prop?: Array<ModelWithReadOnlyAndWriteOnlyWritable>;\n    propWithFile?: Array<Blob | File>;\n    propWithNumber?: Array<number>;\n};\n\n/**\n * This is a model with one nested property\n */\nexport type ModelWithPropertiesWritable = {\n    required: string;\n    requiredAndNullable: string | null;\n    string?: string;\n    number?: number;\n    boolean?: boolean;\n    reference?: ModelWithString;\n    'property with space'?: string;\n    default?: string;\n    try?: string;\n};\n\n/**\n * This is a model that contains a some patterns\n */\nexport type ModelWithPatternWritable = {\n    key: string;\n    name: string;\n    id?: string;\n    text?: string;\n    patternWithSingleQuotes?: string;\n    patternWithNewline?: string;\n    patternWithBacktick?: string;\n    patternWithUnicode?: string;\n};\n\nexport type FileWritable = {\n    /**\n     * Mime\n     */\n    mime: string;\n};\n\nexport type ModelWithReadOnlyAndWriteOnlyWritable = {\n    foo: string;\n    baz: string;\n};\n\nexport type ModelWithAnyOfConstantSizeArrayWithNSizeAndOptionsWritable = [\n    number | Import,\n    number | Import\n];\n\nexport type AdditionalPropertiesUnknownIssueWritable = {\n    [key: string]: string | number;\n};\n\nexport type OneOfAllOfIssueWritable = ((ConstValue | GenericSchemaDuplicateIssue1SystemBoolean) & _3eNum1Период) | GenericSchemaDuplicateIssue1SystemString;\n\nexport type GenericSchemaDuplicateIssue1SystemBooleanWritable = {\n    item?: boolean;\n    error?: string | null;\n    data?: {\n        [key: string]: never;\n    };\n};\n\nexport type GenericSchemaDuplicateIssue1SystemStringWritable = {\n    item?: string | null;\n    error?: string | null;\n};\n\n/**\n * This is a reusable parameter\n */\nexport type SimpleParameter = string;\n\n/**\n * Parameter with illegal characters\n */\nexport type XFooBar = ModelWithString;\n\nexport type SimpleRequestBody = ModelWithString;\n\nexport type SimpleFormData = ModelWithString;\n\nexport type ExportData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no+tag';\n};\n\nexport type PatchApiVbyApiVersionNoTagData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no+tag';\n};\n\nexport type PatchApiVbyApiVersionNoTagResponses = {\n    /**\n     * OK\n     */\n    default: unknown;\n};\n\nexport type ImportData = {\n    body: ModelWithReadOnlyAndWriteOnlyWritable | ModelWithArrayReadOnlyAndWriteOnlyWritable;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no+tag';\n};\n\nexport type ImportResponses = {\n    /**\n     * Success\n     */\n    200: ModelFromZendesk;\n    /**\n     * Default success response\n     */\n    default: ModelWithReadOnlyAndWriteOnly;\n};\n\nexport type ImportResponse = ImportResponses[keyof ImportResponses];\n\nexport type FooWowData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no+tag';\n};\n\nexport type FooWowResponses = {\n    /**\n     * OK\n     */\n    default: unknown;\n};\n\nexport type ApiVVersionODataControllerCountData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple/$count';\n};\n\nexport type ApiVVersionODataControllerCountResponses = {\n    /**\n     * Success\n     */\n    200: ModelFromZendesk;\n};\n\nexport type ApiVVersionODataControllerCountResponse = ApiVVersionODataControllerCountResponses[keyof ApiVVersionODataControllerCountResponses];\n\nexport type GetApiVbyApiVersionSimpleOperationData = {\n    body?: never;\n    path: {\n        /**\n         * foo in method\n         */\n        foo_param: string;\n    };\n    query?: never;\n    url: '/api/v{api-version}/simple:operation';\n};\n\nexport type GetApiVbyApiVersionSimpleOperationErrors = {\n    /**\n     * Default error response\n     */\n    default: ModelWithBoolean;\n};\n\nexport type GetApiVbyApiVersionSimpleOperationError = GetApiVbyApiVersionSimpleOperationErrors[keyof GetApiVbyApiVersionSimpleOperationErrors];\n\nexport type GetApiVbyApiVersionSimpleOperationResponses = {\n    /**\n     * Response is a simple number\n     */\n    200: number;\n};\n\nexport type GetApiVbyApiVersionSimpleOperationResponse = GetApiVbyApiVersionSimpleOperationResponses[keyof GetApiVbyApiVersionSimpleOperationResponses];\n\nexport type DeleteCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type GetCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type HeadCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type OptionsCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type PatchCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type PostCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type PutCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type DeleteFooData3 = {\n    body?: never;\n    headers: {\n        /**\n         * Parameter with illegal characters\n         */\n        'x-Foo-Bar': ModelWithString;\n    };\n    path: {\n        /**\n         * foo in method\n         */\n        foo_param: string;\n        /**\n         * bar in method\n         */\n        BarParam: string;\n    };\n    query?: never;\n    url: '/api/v{api-version}/foo/{foo_param}/bar/{BarParam}';\n};\n\nexport type CallWithDescriptionsData = {\n    body?: never;\n    path?: never;\n    query?: {\n        /**\n         * Testing multiline comments in string: First line\n         * Second line\n         *\n         * Fourth line\n         */\n        parameterWithBreaks?: string;\n        /**\n         * Testing backticks in string: `backticks` and ```multiple backticks``` should work\n         */\n        parameterWithBackticks?: string;\n        /**\n         * Testing slashes in string: \\backwards\\\\\\ and /forwards/// should work\n         */\n        parameterWithSlashes?: string;\n        /**\n         * Testing expression placeholders in string: ${expression} should work\n         */\n        parameterWithExpressionPlaceholders?: string;\n        /**\n         * Testing quotes in string: 'single quote''' and \"double quotes\"\"\" should work\n         */\n        parameterWithQuotes?: string;\n        /**\n         * Testing reserved characters in string: * inline * and ** inline ** should work\n         */\n        parameterWithReservedCharacters?: string;\n    };\n    url: '/api/v{api-version}/descriptions';\n};\n\nexport type DeprecatedCallData = {\n    body?: never;\n    headers: {\n        /**\n         * This parameter is deprecated\n         *\n         * @deprecated\n         */\n        parameter: DeprecatedModel | null;\n    };\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/parameters/deprecated';\n};\n\nexport type CallWithParametersData = {\n    /**\n     * This is the parameter that goes into the body\n     */\n    body: {\n        [key: string]: unknown;\n    } | null;\n    headers: {\n        /**\n         * This is the parameter that goes into the header\n         */\n        parameterHeader: string | null;\n    };\n    path: {\n        /**\n         * This is the parameter that goes into the path\n         */\n        parameterPath: string | null;\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string | null;\n    };\n    query: {\n        foo_ref_enum?: ModelWithNestedArrayEnumsDataFoo;\n        foo_all_of_enum: ModelWithNestedArrayEnumsDataFoo;\n        /**\n         * This is the parameter that goes into the query params\n         */\n        cursor: string | null;\n    };\n    url: '/api/v{api-version}/parameters/{parameterPath}';\n};\n\nexport type CallWithWeirdParameterNamesData = {\n    /**\n     * This is the parameter that goes into the body\n     */\n    body: ModelWithString | null;\n    headers: {\n        /**\n         * This is the parameter that goes into the request header\n         */\n        'parameter.header': string | null;\n    };\n    path: {\n        /**\n         * This is the parameter that goes into the path\n         */\n        'parameter.path.1'?: string;\n        /**\n         * This is the parameter that goes into the path\n         */\n        'parameter-path-2'?: string;\n        /**\n         * This is the parameter that goes into the path\n         */\n        'PARAMETER-PATH-3'?: string;\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string | null;\n    };\n    query: {\n        /**\n         * This is the parameter with a reserved keyword\n         */\n        default?: string;\n        /**\n         * This is the parameter that goes into the request query params\n         */\n        'parameter-query': string | null;\n    };\n    url: '/api/v{api-version}/parameters/{parameter.path.1}/{parameter-path-2}/{PARAMETER-PATH-3}';\n};\n\nexport type GetCallWithOptionalParamData = {\n    /**\n     * This is a required parameter\n     */\n    body: ModelWithOneOfEnum;\n    path?: never;\n    query?: {\n        /**\n         * This is an optional parameter\n         */\n        page?: number;\n    };\n    url: '/api/v{api-version}/parameters';\n};\n\nexport type PostCallWithOptionalParamData = {\n    /**\n     * This is an optional parameter\n     */\n    body?: {\n        offset?: number | null;\n    };\n    path?: never;\n    query: {\n        /**\n         * This is a required parameter\n         */\n        parameter: Pageable;\n    };\n    url: '/api/v{api-version}/parameters';\n};\n\nexport type PostCallWithOptionalParamResponses = {\n    /**\n     * Response is a simple number\n     */\n    200: number;\n    /**\n     * Success\n     */\n    204: void;\n};\n\nexport type PostCallWithOptionalParamResponse = PostCallWithOptionalParamResponses[keyof PostCallWithOptionalParamResponses];\n\nexport type PostApiVbyApiVersionRequestBodyData = {\n    /**\n     * A reusable request body\n     */\n    body?: SimpleRequestBody;\n    path?: never;\n    query?: {\n        /**\n         * This is a reusable parameter\n         */\n        parameter?: string;\n    };\n    url: '/api/v{api-version}/requestBody';\n};\n\nexport type PostApiVbyApiVersionFormDataData = {\n    /**\n     * A reusable request body\n     */\n    body?: SimpleFormData;\n    path?: never;\n    query?: {\n        /**\n         * This is a reusable parameter\n         */\n        parameter?: string;\n    };\n    url: '/api/v{api-version}/formData';\n};\n\nexport type CallWithDefaultParametersData = {\n    body?: never;\n    path?: never;\n    query?: {\n        /**\n         * This is a simple string with default value\n         */\n        parameterString?: string | null;\n        /**\n         * This is a simple number with default value\n         */\n        parameterNumber?: number | null;\n        /**\n         * This is a simple boolean with default value\n         */\n        parameterBoolean?: boolean | null;\n        /**\n         * This is a simple enum with default value\n         */\n        parameterEnum?: 'Success' | 'Warning' | 'Error';\n        /**\n         * This is a simple model with default value\n         */\n        parameterModel?: ModelWithString | null;\n    };\n    url: '/api/v{api-version}/defaults';\n};\n\nexport type CallWithDefaultOptionalParametersData = {\n    body?: never;\n    path?: never;\n    query?: {\n        /**\n         * This is a simple string that is optional with default value\n         */\n        parameterString?: string;\n        /**\n         * This is a simple number that is optional with default value\n         */\n        parameterNumber?: number;\n        /**\n         * This is a simple boolean that is optional with default value\n         */\n        parameterBoolean?: boolean;\n        /**\n         * This is a simple enum that is optional with default value\n         */\n        parameterEnum?: 'Success' | 'Warning' | 'Error';\n        /**\n         * This is a simple model that is optional with default value\n         */\n        parameterModel?: ModelWithString;\n    };\n    url: '/api/v{api-version}/defaults';\n};\n\nexport type CallToTestOrderOfParamsData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * This is a optional string with default\n         */\n        parameterOptionalStringWithDefault?: string;\n        /**\n         * This is a optional string with empty default\n         */\n        parameterOptionalStringWithEmptyDefault?: string;\n        /**\n         * This is a optional string with no default\n         */\n        parameterOptionalStringWithNoDefault?: string;\n        /**\n         * This is a string with default\n         */\n        parameterStringWithDefault: string;\n        /**\n         * This is a string with empty default\n         */\n        parameterStringWithEmptyDefault: string;\n        /**\n         * This is a string with no default\n         */\n        parameterStringWithNoDefault: string;\n        /**\n         * This is a string that can be null with no default\n         */\n        parameterStringNullableWithNoDefault?: string | null;\n        /**\n         * This is a string that can be null with default\n         */\n        parameterStringNullableWithDefault?: string | null;\n    };\n    url: '/api/v{api-version}/defaults';\n};\n\nexport type DuplicateNameData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/duplicate';\n};\n\nexport type DuplicateName2Data = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/duplicate';\n};\n\nexport type DuplicateName3Data = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/duplicate';\n};\n\nexport type DuplicateName4Data = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/duplicate';\n};\n\nexport type CallWithNoContentResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no-content';\n};\n\nexport type CallWithNoContentResponseResponses = {\n    /**\n     * Success\n     */\n    204: void;\n};\n\nexport type CallWithNoContentResponseResponse = CallWithNoContentResponseResponses[keyof CallWithNoContentResponseResponses];\n\nexport type CallWithResponseAndNoContentResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multiple-tags/response-and-no-content';\n};\n\nexport type CallWithResponseAndNoContentResponseResponses = {\n    /**\n     * Response is a simple number\n     */\n    200: number;\n    /**\n     * Success\n     */\n    204: void;\n};\n\nexport type CallWithResponseAndNoContentResponseResponse = CallWithResponseAndNoContentResponseResponses[keyof CallWithResponseAndNoContentResponseResponses];\n\nexport type DummyAData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multiple-tags/a';\n};\n\nexport type DummyAResponses = {\n    200: _400;\n};\n\nexport type DummyAResponse = DummyAResponses[keyof DummyAResponses];\n\nexport type DummyBData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multiple-tags/b';\n};\n\nexport type DummyBResponses = {\n    /**\n     * Success\n     */\n    204: void;\n};\n\nexport type DummyBResponse = DummyBResponses[keyof DummyBResponses];\n\nexport type CallWithResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/response';\n};\n\nexport type CallWithResponseResponses = {\n    default: Import;\n};\n\nexport type CallWithResponseResponse = CallWithResponseResponses[keyof CallWithResponseResponses];\n\nexport type CallWithDuplicateResponsesData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/response';\n};\n\nexport type CallWithDuplicateResponsesErrors = {\n    /**\n     * Message for 500 error\n     */\n    500: ModelWithStringError;\n    /**\n     * Message for 501 error\n     */\n    501: ModelWithStringError;\n    /**\n     * Message for 502 error\n     */\n    502: ModelWithStringError;\n    /**\n     * Message for 4XX errors\n     */\n    '4XX': DictionaryWithArray;\n    /**\n     * Default error response\n     */\n    default: ModelWithBoolean;\n};\n\nexport type CallWithDuplicateResponsesError = CallWithDuplicateResponsesErrors[keyof CallWithDuplicateResponsesErrors];\n\nexport type CallWithDuplicateResponsesResponses = {\n    /**\n     * Message for 200 response\n     */\n    200: ModelWithBoolean & ModelWithInteger;\n    /**\n     * Message for 201 response\n     */\n    201: ModelWithString;\n    /**\n     * Message for 202 response\n     */\n    202: ModelWithString;\n};\n\nexport type CallWithDuplicateResponsesResponse = CallWithDuplicateResponsesResponses[keyof CallWithDuplicateResponsesResponses];\n\nexport type CallWithResponsesData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/response';\n};\n\nexport type CallWithResponsesErrors = {\n    /**\n     * Message for 500 error\n     */\n    500: ModelWithStringError;\n    /**\n     * Message for 501 error\n     */\n    501: ModelWithStringError;\n    /**\n     * Message for 502 error\n     */\n    502: ModelWithStringError;\n    /**\n     * Message for default response\n     */\n    default: ModelWithStringError;\n};\n\nexport type CallWithResponsesError = CallWithResponsesErrors[keyof CallWithResponsesErrors];\n\nexport type CallWithResponsesResponses = {\n    /**\n     * Message for 200 response\n     */\n    200: {\n        readonly '@namespace.string'?: string;\n        readonly '@namespace.integer'?: number;\n        readonly value?: Array<ModelWithString>;\n    };\n    /**\n     * Message for 201 response\n     */\n    201: ModelThatExtends;\n    /**\n     * Message for 202 response\n     */\n    202: ModelThatExtendsExtends;\n};\n\nexport type CallWithResponsesResponse = CallWithResponsesResponses[keyof CallWithResponsesResponses];\n\nexport type CollectionFormatData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * This is an array parameter that is sent as csv format (comma-separated values)\n         */\n        parameterArrayCSV: Array<string> | null;\n        /**\n         * This is an array parameter that is sent as ssv format (space-separated values)\n         */\n        parameterArraySSV: Array<string> | null;\n        /**\n         * This is an array parameter that is sent as tsv format (tab-separated values)\n         */\n        parameterArrayTSV: Array<string> | null;\n        /**\n         * This is an array parameter that is sent as pipes format (pipe-separated values)\n         */\n        parameterArrayPipes: Array<string> | null;\n        /**\n         * This is an array parameter that is sent as multi format (multiple parameter instances)\n         */\n        parameterArrayMulti: Array<string> | null;\n    };\n    url: '/api/v{api-version}/collectionFormat';\n};\n\nexport type TypesData = {\n    body?: never;\n    path?: {\n        /**\n         * This is a number parameter\n         */\n        id?: number;\n    };\n    query: {\n        /**\n         * This is a number parameter\n         */\n        parameterNumber: number;\n        /**\n         * This is a string parameter\n         */\n        parameterString: string | null;\n        /**\n         * This is a boolean parameter\n         */\n        parameterBoolean: boolean | null;\n        /**\n         * This is an object parameter\n         */\n        parameterObject: {\n            [key: string]: unknown;\n        } | null;\n        /**\n         * This is an array parameter\n         */\n        parameterArray: Array<string> | null;\n        /**\n         * This is a dictionary parameter\n         */\n        parameterDictionary: {\n            [key: string]: unknown;\n        } | null;\n        /**\n         * This is an enum parameter\n         */\n        parameterEnum: 'Success' | 'Warning' | 'Error';\n    };\n    url: '/api/v{api-version}/types';\n};\n\nexport type TypesResponses = {\n    /**\n     * Response is a simple number\n     */\n    200: number;\n    /**\n     * Response is a simple string\n     */\n    201: string;\n    /**\n     * Response is a simple boolean\n     */\n    202: boolean;\n    /**\n     * Response is a simple object\n     */\n    203: {\n        [key: string]: unknown;\n    };\n};\n\nexport type TypesResponse = TypesResponses[keyof TypesResponses];\n\nexport type UploadFileData = {\n    body: Blob | File;\n    path: {\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string | null;\n    };\n    query?: never;\n    url: '/api/v{api-version}/upload';\n};\n\nexport type UploadFileResponses = {\n    200: boolean;\n};\n\nexport type UploadFileResponse = UploadFileResponses[keyof UploadFileResponses];\n\nexport type FileResponseData = {\n    body?: never;\n    path: {\n        id: string;\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string;\n    };\n    query?: never;\n    url: '/api/v{api-version}/file/{id}';\n};\n\nexport type FileResponseResponses = {\n    /**\n     * Success\n     */\n    200: Blob | File;\n};\n\nexport type FileResponseResponse = FileResponseResponses[keyof FileResponseResponses];\n\nexport type ComplexTypesData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * Parameter containing object\n         */\n        parameterObject: {\n            first?: {\n                second?: {\n                    third?: string;\n                };\n            };\n        };\n        /**\n         * Parameter containing reference\n         */\n        parameterReference: ModelWithString;\n    };\n    url: '/api/v{api-version}/complex';\n};\n\nexport type ComplexTypesErrors = {\n    /**\n     * 400 `server` error\n     */\n    400: unknown;\n    /**\n     * 500 server error\n     */\n    500: unknown;\n};\n\nexport type ComplexTypesResponses = {\n    /**\n     * Successful response\n     */\n    200: Array<ModelWithString>;\n};\n\nexport type ComplexTypesResponse = ComplexTypesResponses[keyof ComplexTypesResponses];\n\nexport type MultipartResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multipart';\n};\n\nexport type MultipartResponseResponses = {\n    /**\n     * OK\n     */\n    200: {\n        file?: Blob | File;\n        metadata?: {\n            foo?: string;\n            bar?: string;\n        };\n    };\n};\n\nexport type MultipartResponseResponse = MultipartResponseResponses[keyof MultipartResponseResponses];\n\nexport type MultipartRequestData = {\n    body?: {\n        content?: Blob | File;\n        data?: ModelWithString | null;\n    };\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multipart';\n};\n\nexport type ComplexParamsData = {\n    body?: {\n        readonly key: string | null;\n        name: string | null;\n        enabled?: boolean;\n        type: 'Monkey' | 'Horse' | 'Bird';\n        listOfModels?: Array<ModelWithString> | null;\n        listOfStrings?: Array<string> | null;\n        parameters: ModelWithString | ModelWithEnum | ModelWithArray | ModelWithDictionary;\n        readonly user?: {\n            readonly id?: number;\n            readonly name?: string | null;\n        };\n    };\n    path: {\n        id: number;\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string;\n    };\n    query?: never;\n    url: '/api/v{api-version}/complex/{id}';\n};\n\nexport type ComplexParamsResponses = {\n    /**\n     * Success\n     */\n    200: ModelWithString;\n};\n\nexport type ComplexParamsResponse = ComplexParamsResponses[keyof ComplexParamsResponses];\n\nexport type CallWithResultFromHeaderData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/header';\n};\n\nexport type CallWithResultFromHeaderErrors = {\n    /**\n     * 400 server error\n     */\n    400: unknown;\n    /**\n     * 500 server error\n     */\n    500: unknown;\n};\n\nexport type CallWithResultFromHeaderResponses = {\n    /**\n     * Successful response\n     */\n    200: unknown;\n};\n\nexport type TestErrorCodeData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * Status code to return\n         */\n        status: number;\n    };\n    url: '/api/v{api-version}/error';\n};\n\nexport type TestErrorCodeErrors = {\n    /**\n     * Custom message: Internal Server Error\n     */\n    500: unknown;\n    /**\n     * Custom message: Not Implemented\n     */\n    501: unknown;\n    /**\n     * Custom message: Bad Gateway\n     */\n    502: unknown;\n    /**\n     * Custom message: Service Unavailable\n     */\n    503: unknown;\n};\n\nexport type TestErrorCodeResponses = {\n    /**\n     * Custom message: Successful response\n     */\n    200: unknown;\n};\n\nexport type NonAsciiæøåÆøÅöôêÊ字符串Data = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * Dummy input param\n         */\n        nonAsciiParamæøåÆØÅöôêÊ: number;\n    };\n    url: '/api/v{api-version}/non-ascii-æøåÆØÅöôêÊ字符串';\n};\n\nexport type NonAsciiæøåÆøÅöôêÊ字符串Responses = {\n    /**\n     * Successful response\n     */\n    200: Array<NonAsciiStringæøåÆøÅöôêÊ字符串>;\n};\n\nexport type NonAsciiæøåÆøÅöôêÊ字符串Response = NonAsciiæøåÆøÅöôêÊ字符串Responses[keyof NonAsciiæøåÆøÅöôêÊ字符串Responses];\n\nexport type PutWithFormUrlEncodedData = {\n    body: ArrayWithStrings;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/non-ascii-æøåÆØÅöôêÊ字符串';\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/svelte-query/name-builder/@tanstack/svelte-query.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport { type DefaultError, type MutationOptions, queryOptions } from '@tanstack/svelte-query';\n\nimport { client } from '../client.gen';\nimport { fooBarPost, fooBarPut, fooPost, fooPut, getFoo, getFooBar, type Options } from '../sdk.gen';\nimport type { FooBarPostData, FooBarPostResponse, FooBarPutData, FooBarPutResponse, FooPostData, FooPostResponse, FooPutData, FooPutResponse, GetFooBarData, GetFooBarResponse, GetFooData, GetFooResponse } from '../types.gen';\n\nexport type QueryKey<TOptions extends Options> = [\n    Pick<TOptions, 'baseUrl' | 'body' | 'headers' | 'path' | 'query'> & {\n        _id: string;\n        _infinite?: boolean;\n        tags?: ReadonlyArray<string>;\n    }\n];\n\nconst createQueryKey = <TOptions extends Options>(id: string, options?: TOptions, infinite?: boolean, tags?: ReadonlyArray<string>): [\n    QueryKey<TOptions>[0]\n] => {\n    const params: QueryKey<TOptions>[0] = { _id: id, baseUrl: options?.baseUrl || (options?.client ?? client).getConfig().baseUrl } as QueryKey<TOptions>[0];\n    if (infinite) {\n        params._infinite = infinite;\n    }\n    if (tags) {\n        params.tags = tags;\n    }\n    if (options?.body) {\n        params.body = options.body;\n    }\n    if (options?.headers) {\n        params.headers = options.headers;\n    }\n    if (options?.path) {\n        params.path = options.path;\n    }\n    if (options?.query) {\n        params.query = options.query;\n    }\n    return [params];\n};\n\nexport const getFooD = (options?: Options<GetFooData>) => createQueryKey('getFoo', options);\n\nexport const getFooE = (options?: Options<GetFooData>) => queryOptions<GetFooResponse, DefaultError, GetFooResponse, ReturnType<typeof getFooD>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await getFoo({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: getFooD(options)\n});\n\nexport const fooPostC = (options?: Partial<Options<FooPostData>>): MutationOptions<FooPostResponse, DefaultError, Options<FooPostData>> => {\n    const mutationOptions: MutationOptions<FooPostResponse, DefaultError, Options<FooPostData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await fooPost({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const fooPutC = (options?: Partial<Options<FooPutData>>): MutationOptions<FooPutResponse, DefaultError, Options<FooPutData>> => {\n    const mutationOptions: MutationOptions<FooPutResponse, DefaultError, Options<FooPutData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await fooPut({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const getFooBarD = (options?: Options<GetFooBarData>) => createQueryKey('getFooBar', options);\n\nexport const getFooBarE = (options?: Options<GetFooBarData>) => queryOptions<GetFooBarResponse, DefaultError, GetFooBarResponse, ReturnType<typeof getFooBarD>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await getFooBar({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: getFooBarD(options)\n});\n\nexport const fooBarPostC = (options?: Partial<Options<FooBarPostData>>): MutationOptions<FooBarPostResponse, DefaultError, Options<FooBarPostData>> => {\n    const mutationOptions: MutationOptions<FooBarPostResponse, DefaultError, Options<FooBarPostData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await fooBarPost({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const fooBarPutC = (options?: Partial<Options<FooBarPutData>>): MutationOptions<FooBarPutResponse, DefaultError, Options<FooBarPutData>> => {\n    const mutationOptions: MutationOptions<FooBarPutResponse, DefaultError, Options<FooBarPutData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await fooBarPut({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/svelte-query/name-builder/client/client.gen.ts",
    "content": "// 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 (options: RequestOptions) => {\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 url = buildUrl(opts);\n\n    return { opts, url };\n  };\n\n  const request: Client['request'] = async (options) => {\n    // @ts-expect-error\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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/svelte-query/name-builder/client/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type { Auth } from '../core/auth.gen';\nexport type { QuerySerializerOptions } from '../core/bodySerializer.gen';\nexport {\n  formDataBodySerializer,\n  jsonBodySerializer,\n  urlSearchParamsBodySerializer,\n} from '../core/bodySerializer.gen';\nexport { buildClientParams } from '../core/params.gen';\nexport { serializeQueryKeyValue } from '../core/queryKeySerializer.gen';\nexport { createClient } from './client.gen';\nexport type {\n  Client,\n  ClientOptions,\n  Config,\n  CreateClientConfig,\n  Options,\n  RequestOptions,\n  RequestResult,\n  ResolvedRequestOptions,\n  ResponseStyle,\n  TDataShape,\n} from './types.gen';\nexport { createConfig, mergeHeaders } from './utils.gen';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/svelte-query/name-builder/client/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { Auth } from '../core/auth.gen';\nimport type {\n  ServerSentEventsOptions,\n  ServerSentEventsResult,\n} from '../core/serverSentEvents.gen';\nimport type { Client as CoreClient, Config as CoreConfig } from '../core/types.gen';\nimport type { Middleware } from './utils.gen';\n\nexport type ResponseStyle = 'data' | 'fields';\n\nexport interface Config<T extends ClientOptions = ClientOptions>\n  extends Omit<RequestInit, 'body' | 'headers' | 'method'>, CoreConfig {\n  /**\n   * Base URL for all requests made by this client.\n   */\n  baseUrl?: T['baseUrl'];\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   * Please don't use the Fetch client for Next.js applications. The `next`\n   * options won't have any effect.\n   *\n   * Install {@link https://www.npmjs.com/package/@hey-api/client-next `@hey-api/client-next`} instead.\n   */\n  next?: never;\n  /**\n   * Return the response data parsed in a specified format. By default, `auto`\n   * will infer the appropriate method from the `Content-Type` response header.\n   * You can override this behavior with any of the {@link Body} methods.\n   * Select `stream` if you don't want to parse response data at all.\n   *\n   * @default 'auto'\n   */\n  parseAs?: 'arrayBuffer' | 'auto' | 'blob' | 'formData' | 'json' | 'stream' | 'text';\n  /**\n   * Should we return only data or multiple fields (data, error, response, etc.)?\n   *\n   * @default 'fields'\n   */\n  responseStyle?: ResponseStyle;\n  /**\n   * Throw an error instead of returning it in the response?\n   *\n   * @default false\n   */\n  throwOnError?: T['throwOnError'];\n}\n\nexport interface RequestOptions<\n  TData = unknown,\n  TResponseStyle extends ResponseStyle = 'fields',\n  ThrowOnError extends boolean = boolean,\n  Url extends string = string,\n>\n  extends\n    Config<{\n      responseStyle: TResponseStyle;\n      throwOnError: ThrowOnError;\n    }>,\n    Pick<\n      ServerSentEventsOptions<TData>,\n      | 'onRequest'\n      | 'onSseError'\n      | 'onSseEvent'\n      | 'sseDefaultRetryDelay'\n      | 'sseMaxRetryAttempts'\n      | 'sseMaxRetryDelay'\n    > {\n  /**\n   * Any body that you want to add to your request.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/fetch#body}\n   */\n  body?: unknown;\n  path?: Record<string, unknown>;\n  query?: Record<string, unknown>;\n  /**\n   * Security mechanism(s) to use for the request.\n   */\n  security?: ReadonlyArray<Auth>;\n  url: Url;\n}\n\nexport interface ResolvedRequestOptions<\n  TResponseStyle extends ResponseStyle = 'fields',\n  ThrowOnError extends boolean = boolean,\n  Url extends string = string,\n> extends RequestOptions<unknown, TResponseStyle, ThrowOnError, Url> {\n  serializedBody?: string;\n}\n\nexport type RequestResult<\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = boolean,\n  TResponseStyle extends ResponseStyle = 'fields',\n> = ThrowOnError extends true\n  ? Promise<\n      TResponseStyle extends 'data'\n        ? TData extends Record<string, unknown>\n          ? TData[keyof TData]\n          : TData\n        : {\n            data: TData extends Record<string, unknown> ? TData[keyof TData] : TData;\n            request: Request;\n            response: Response;\n          }\n    >\n  : Promise<\n      TResponseStyle extends 'data'\n        ? (TData extends Record<string, unknown> ? TData[keyof TData] : TData) | undefined\n        : (\n            | {\n                data: TData extends Record<string, unknown> ? TData[keyof TData] : TData;\n                error: undefined;\n              }\n            | {\n                data: undefined;\n                error: TError extends Record<string, unknown> ? TError[keyof TError] : TError;\n              }\n          ) & {\n            request: Request;\n            response: Response;\n          }\n    >;\n\nexport interface ClientOptions {\n  baseUrl?: string;\n  responseStyle?: ResponseStyle;\n  throwOnError?: boolean;\n}\n\ntype MethodFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'>,\n) => RequestResult<TData, TError, ThrowOnError, TResponseStyle>;\n\ntype SseFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'>,\n) => Promise<ServerSentEventsResult<TData, TError>>;\n\ntype RequestFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'> &\n    Pick<Required<RequestOptions<TData, TResponseStyle, ThrowOnError>>, 'method'>,\n) => RequestResult<TData, TError, ThrowOnError, TResponseStyle>;\n\ntype BuildUrlFn = <\n  TData extends {\n    body?: unknown;\n    path?: Record<string, unknown>;\n    query?: Record<string, unknown>;\n    url: string;\n  },\n>(\n  options: TData & Options<TData>,\n) => string;\n\nexport type Client = CoreClient<RequestFn, Config, MethodFn, BuildUrlFn, SseFn> & {\n  interceptors: Middleware<Request, Response, unknown, ResolvedRequestOptions>;\n};\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 = ClientOptions> = (\n  override?: Config<ClientOptions & T>,\n) => Config<Required<ClientOptions> & T>;\n\nexport interface TDataShape {\n  body?: unknown;\n  headers?: unknown;\n  path?: unknown;\n  query?: unknown;\n  url: string;\n}\n\ntype OmitKeys<T, K> = Pick<T, Exclude<keyof T, K>>;\n\nexport type Options<\n  TData extends TDataShape = TDataShape,\n  ThrowOnError extends boolean = boolean,\n  TResponse = unknown,\n  TResponseStyle extends ResponseStyle = 'fields',\n> = OmitKeys<\n  RequestOptions<TResponse, TResponseStyle, ThrowOnError>,\n  'body' | 'path' | 'query' | 'url'\n> &\n  ([TData] extends [never] ? unknown : Omit<TData, 'url'>);\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/svelte-query/name-builder/client/utils.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/svelte-query/name-builder/client.gen.ts",
    "content": "// 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>());\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/svelte-query/name-builder/core/auth.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/svelte-query/name-builder/core/bodySerializer.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/svelte-query/name-builder/core/params.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/svelte-query/name-builder/core/pathSerializer.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/svelte-query/name-builder/core/queryKeySerializer.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\n/**\n * JSON-friendly union that mirrors what Pinia Colada can hash.\n */\nexport type JsonValue =\n  | null\n  | string\n  | number\n  | boolean\n  | JsonValue[]\n  | { [key: string]: JsonValue };\n\n/**\n * Replacer that converts non-JSON values (bigint, Date, etc.) to safe substitutes.\n */\nexport const queryKeyJsonReplacer = (_key: string, value: unknown) => {\n  if (value === undefined || typeof value === 'function' || typeof value === 'symbol') {\n    return undefined;\n  }\n  if (typeof value === 'bigint') {\n    return value.toString();\n  }\n  if (value instanceof Date) {\n    return value.toISOString();\n  }\n  return value;\n};\n\n/**\n * Safely stringifies a value and parses it back into a JsonValue.\n */\nexport const stringifyToJsonValue = (input: unknown): JsonValue | undefined => {\n  try {\n    const json = JSON.stringify(input, queryKeyJsonReplacer);\n    if (json === undefined) {\n      return undefined;\n    }\n    return JSON.parse(json) as JsonValue;\n  } catch {\n    return undefined;\n  }\n};\n\n/**\n * Detects plain objects (including objects with a null prototype).\n */\nconst isPlainObject = (value: unknown): value is Record<string, unknown> => {\n  if (value === null || typeof value !== 'object') {\n    return false;\n  }\n  const prototype = Object.getPrototypeOf(value as object);\n  return prototype === Object.prototype || prototype === null;\n};\n\n/**\n * Turns URLSearchParams into a sorted JSON object for deterministic keys.\n */\nconst serializeSearchParams = (params: URLSearchParams): JsonValue => {\n  const entries = Array.from(params.entries()).sort(([a], [b]) => a.localeCompare(b));\n  const result: Record<string, JsonValue> = {};\n\n  for (const [key, value] of entries) {\n    const existing = result[key];\n    if (existing === undefined) {\n      result[key] = value;\n      continue;\n    }\n\n    if (Array.isArray(existing)) {\n      (existing as string[]).push(value);\n    } else {\n      result[key] = [existing, value];\n    }\n  }\n\n  return result;\n};\n\n/**\n * Normalizes any accepted value into a JSON-friendly shape for query keys.\n */\nexport const serializeQueryKeyValue = (value: unknown): JsonValue | undefined => {\n  if (value === null) {\n    return null;\n  }\n\n  if (typeof value === 'string' || typeof value === 'number' || typeof value === 'boolean') {\n    return value;\n  }\n\n  if (value === undefined || typeof value === 'function' || typeof value === 'symbol') {\n    return undefined;\n  }\n\n  if (typeof value === 'bigint') {\n    return value.toString();\n  }\n\n  if (value instanceof Date) {\n    return value.toISOString();\n  }\n\n  if (Array.isArray(value)) {\n    return stringifyToJsonValue(value);\n  }\n\n  if (typeof URLSearchParams !== 'undefined' && value instanceof URLSearchParams) {\n    return serializeSearchParams(value);\n  }\n\n  if (isPlainObject(value)) {\n    return stringifyToJsonValue(value);\n  }\n\n  return undefined;\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/svelte-query/name-builder/core/serverSentEvents.gen.ts",
    "content": "// 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 const 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            // Normalize line endings: CRLF -> LF, then CR -> LF\n            buffer = buffer.replace(/\\r\\n/g, '\\n').replace(/\\r/g, '\\n');\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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/svelte-query/name-builder/core/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { Auth, AuthToken } from './auth.gen';\nimport type { BodySerializer, QuerySerializer, QuerySerializerOptions } from './bodySerializer.gen';\n\nexport type HttpMethod =\n  | 'connect'\n  | 'delete'\n  | 'get'\n  | 'head'\n  | 'options'\n  | 'patch'\n  | 'post'\n  | 'put'\n  | 'trace';\n\nexport type Client<\n  RequestFn = never,\n  Config = unknown,\n  MethodFn = never,\n  BuildUrlFn = never,\n  SseFn = never,\n> = {\n  /**\n   * Returns the final request URL.\n   */\n  buildUrl: BuildUrlFn;\n  getConfig: () => Config;\n  request: RequestFn;\n  setConfig: (config: Config) => Config;\n} & {\n  [K in HttpMethod]: MethodFn;\n} & ([SseFn] extends [never] ? { sse?: never } : { sse: { [K in HttpMethod]: SseFn } });\n\nexport interface Config {\n  /**\n   * Auth token or a function returning auth token. The resolved value will be\n   * added to the request payload as defined by its `security` array.\n   */\n  auth?: ((auth: Auth) => Promise<AuthToken> | AuthToken) | AuthToken;\n  /**\n   * A function for serializing request body parameter. By default,\n   * {@link JSON.stringify()} will be used.\n   */\n  bodySerializer?: BodySerializer | null;\n  /**\n   * An object containing any HTTP headers that you want to pre-populate your\n   * `Headers` object with.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/Headers/Headers#init See more}\n   */\n  headers?:\n    | RequestInit['headers']\n    | Record<\n        string,\n        string | number | boolean | (string | number | boolean)[] | null | undefined | unknown\n      >;\n  /**\n   * The request method.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/fetch#method See more}\n   */\n  method?: Uppercase<HttpMethod>;\n  /**\n   * A function for serializing request query parameters. By default, arrays\n   * will be exploded in form style, objects will be exploded in deepObject\n   * style, and reserved characters are percent-encoded.\n   *\n   * This method will have no effect if the native `paramsSerializer()` Axios\n   * API function is used.\n   *\n   * {@link https://swagger.io/docs/specification/serialization/#query View examples}\n   */\n  querySerializer?: QuerySerializer | QuerySerializerOptions;\n  /**\n   * A function validating request data. This is useful if you want to ensure\n   * the request conforms to the desired shape, so it can be safely sent to\n   * the server.\n   */\n  requestValidator?: (data: unknown) => Promise<unknown>;\n  /**\n   * A function transforming response data before it's returned. This is useful\n   * for post-processing data, e.g. converting ISO strings into Date objects.\n   */\n  responseTransformer?: (data: unknown) => Promise<unknown>;\n  /**\n   * A function validating response data. This is useful if you want to ensure\n   * the response conforms to the desired shape, so it can be safely passed to\n   * the transformers and returned to the user.\n   */\n  responseValidator?: (data: unknown) => Promise<unknown>;\n}\n\ntype IsExactlyNeverOrNeverUndefined<T> = [T] extends [never]\n  ? true\n  : [T] extends [never | undefined]\n    ? [undefined] extends [T]\n      ? false\n      : true\n    : false;\n\nexport type OmitNever<T extends Record<string, unknown>> = {\n  [K in keyof T as IsExactlyNeverOrNeverUndefined<T[K]> extends true ? never : K]: T[K];\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/svelte-query/name-builder/core/utils.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/svelte-query/name-builder/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport { fooBarPost, fooBarPut, fooPost, fooPut, getFoo, getFooBar, type Options } from './sdk.gen';\nexport type { ClientOptions, FooBarPostData, FooBarPostResponse, FooBarPostResponses, FooBarPutData, FooBarPutResponse, FooBarPutResponses, FooPostData, FooPostResponse, FooPostResponses, FooPutData, FooPutResponse, FooPutResponses, GetFooBarData, GetFooBarResponse, GetFooBarResponses, GetFooData, GetFooResponse, GetFooResponses } from './types.gen';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/svelte-query/name-builder/sdk.gen.ts",
    "content": "// 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 { FooBarPostData, FooBarPostResponses, FooBarPutData, FooBarPutResponses, FooPostData, FooPostResponses, FooPutData, FooPutResponses, GetFooBarData, GetFooBarResponses, GetFooData, GetFooResponses } from './types.gen';\n\nexport type Options<TData extends TDataShape = TDataShape, ThrowOnError extends boolean = boolean> = Options2<TData, ThrowOnError> & {\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\nexport const getFoo = <ThrowOnError extends boolean = false>(options?: Options<GetFooData, ThrowOnError>) => (options?.client ?? client).get<GetFooResponses, unknown, ThrowOnError>({ url: '/foo', ...options });\n\nexport const fooPost = <ThrowOnError extends boolean = false>(options?: Options<FooPostData, ThrowOnError>) => (options?.client ?? client).post<FooPostResponses, unknown, ThrowOnError>({ url: '/foo', ...options });\n\nexport const fooPut = <ThrowOnError extends boolean = false>(options?: Options<FooPutData, ThrowOnError>) => (options?.client ?? client).put<FooPutResponses, unknown, ThrowOnError>({ url: '/foo', ...options });\n\nexport const getFooBar = <ThrowOnError extends boolean = false>(options?: Options<GetFooBarData, ThrowOnError>) => (options?.client ?? client).get<GetFooBarResponses, unknown, ThrowOnError>({ url: '/foo/bar', ...options });\n\nexport const fooBarPost = <ThrowOnError extends boolean = false>(options?: Options<FooBarPostData, ThrowOnError>) => (options?.client ?? client).post<FooBarPostResponses, unknown, ThrowOnError>({ url: '/foo/bar', ...options });\n\nexport const fooBarPut = <ThrowOnError extends boolean = false>(options?: Options<FooBarPutData, ThrowOnError>) => (options?.client ?? client).put<FooBarPutResponses, unknown, ThrowOnError>({ url: '/foo/bar', ...options });\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/svelte-query/name-builder/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type ClientOptions = {\n    baseUrl: `${string}://${string}` | (string & {});\n};\n\nexport type GetFooData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/foo';\n};\n\nexport type GetFooResponses = {\n    /**\n     * OK\n     */\n    200: string;\n};\n\nexport type GetFooResponse = GetFooResponses[keyof GetFooResponses];\n\nexport type FooPostData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/foo';\n};\n\nexport type FooPostResponses = {\n    /**\n     * OK\n     */\n    200: string;\n};\n\nexport type FooPostResponse = FooPostResponses[keyof FooPostResponses];\n\nexport type FooPutData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/foo';\n};\n\nexport type FooPutResponses = {\n    /**\n     * OK\n     */\n    200: string;\n};\n\nexport type FooPutResponse = FooPutResponses[keyof FooPutResponses];\n\nexport type GetFooBarData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/foo/bar';\n};\n\nexport type GetFooBarResponses = {\n    /**\n     * OK\n     */\n    200: string;\n};\n\nexport type GetFooBarResponse = GetFooBarResponses[keyof GetFooBarResponses];\n\nexport type FooBarPostData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/foo/bar';\n};\n\nexport type FooBarPostResponses = {\n    /**\n     * OK\n     */\n    200: string;\n};\n\nexport type FooBarPostResponse = FooBarPostResponses[keyof FooBarPostResponses];\n\nexport type FooBarPutData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/foo/bar';\n};\n\nexport type FooBarPutResponses = {\n    /**\n     * OK\n     */\n    200: string;\n};\n\nexport type FooBarPutResponse = FooBarPutResponses[keyof FooBarPutResponses];\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/vue-query/asClass/@tanstack/vue-query.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport { type DefaultError, queryOptions, type UseMutationOptions } from '@tanstack/vue-query';\n\nimport { client } from '../client.gen';\nimport { BarBazService, BarService, FooBazService, FooService, type Options } from '../sdk.gen';\nimport type { FooBarPostData, FooBarPostResponse, FooBarPutData, FooBarPutResponse, FooPostData, FooPostResponse, FooPutData, FooPutResponse, GetFooBarData, GetFooBarResponse, GetFooData, GetFooResponse } from '../types.gen';\n\nexport type QueryKey<TOptions extends Options> = [\n    Pick<TOptions, 'baseUrl' | 'body' | 'headers' | 'path' | 'query'> & {\n        _id: string;\n        _infinite?: boolean;\n        tags?: ReadonlyArray<string>;\n    }\n];\n\nconst createQueryKey = <TOptions extends Options>(id: string, options?: TOptions, infinite?: boolean, tags?: ReadonlyArray<string>): [\n    QueryKey<TOptions>[0]\n] => {\n    const params: QueryKey<TOptions>[0] = { _id: id, baseUrl: options?.baseUrl || (options?.client ?? client).getConfig().baseUrl } as QueryKey<TOptions>[0];\n    if (infinite) {\n        params._infinite = infinite;\n    }\n    if (tags) {\n        params.tags = tags;\n    }\n    if (options?.body) {\n        params.body = options.body;\n    }\n    if (options?.headers) {\n        params.headers = options.headers;\n    }\n    if (options?.path) {\n        params.path = options.path;\n    }\n    if (options?.query) {\n        params.query = options.query;\n    }\n    return [params];\n};\n\nexport const getFooQueryKey = (options?: Options<GetFooData>) => createQueryKey('getFoo', options);\n\nexport const getFooOptions = (options?: Options<GetFooData>) => queryOptions<GetFooResponse, DefaultError, GetFooResponse, ReturnType<typeof getFooQueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await FooBazService.getFoo({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: getFooQueryKey(options)\n});\n\nexport const fooPostMutation = (options?: Partial<Options<FooPostData>>): UseMutationOptions<FooPostResponse, DefaultError, Options<FooPostData>> => {\n    const mutationOptions: UseMutationOptions<FooPostResponse, DefaultError, Options<FooPostData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await FooService.post({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const fooPutMutation = (options?: Partial<Options<FooPutData>>): UseMutationOptions<FooPutResponse, DefaultError, Options<FooPutData>> => {\n    const mutationOptions: UseMutationOptions<FooPutResponse, DefaultError, Options<FooPutData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await FooService.put({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const getFooBarQueryKey = (options?: Options<GetFooBarData>) => createQueryKey('getFooBar', options);\n\nexport const getFooBarOptions = (options?: Options<GetFooBarData>) => queryOptions<GetFooBarResponse, DefaultError, GetFooBarResponse, ReturnType<typeof getFooBarQueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await BarBazService.getFooBar({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: getFooBarQueryKey(options)\n});\n\nexport const fooBarPostMutation = (options?: Partial<Options<FooBarPostData>>): UseMutationOptions<FooBarPostResponse, DefaultError, Options<FooBarPostData>> => {\n    const mutationOptions: UseMutationOptions<FooBarPostResponse, DefaultError, Options<FooBarPostData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await BarService.post({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const fooBarPutMutation = (options?: Partial<Options<FooBarPutData>>): UseMutationOptions<FooBarPutResponse, DefaultError, Options<FooBarPutData>> => {\n    const mutationOptions: UseMutationOptions<FooBarPutResponse, DefaultError, Options<FooBarPutData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await BarService.put({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/vue-query/asClass/client/client.gen.ts",
    "content": "// 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 (options: RequestOptions) => {\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 url = buildUrl(opts);\n\n    return { opts, url };\n  };\n\n  const request: Client['request'] = async (options) => {\n    // @ts-expect-error\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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/vue-query/asClass/client/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type { Auth } from '../core/auth.gen';\nexport type { QuerySerializerOptions } from '../core/bodySerializer.gen';\nexport {\n  formDataBodySerializer,\n  jsonBodySerializer,\n  urlSearchParamsBodySerializer,\n} from '../core/bodySerializer.gen';\nexport { buildClientParams } from '../core/params.gen';\nexport { serializeQueryKeyValue } from '../core/queryKeySerializer.gen';\nexport { createClient } from './client.gen';\nexport type {\n  Client,\n  ClientOptions,\n  Config,\n  CreateClientConfig,\n  Options,\n  RequestOptions,\n  RequestResult,\n  ResolvedRequestOptions,\n  ResponseStyle,\n  TDataShape,\n} from './types.gen';\nexport { createConfig, mergeHeaders } from './utils.gen';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/vue-query/asClass/client/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { Auth } from '../core/auth.gen';\nimport type {\n  ServerSentEventsOptions,\n  ServerSentEventsResult,\n} from '../core/serverSentEvents.gen';\nimport type { Client as CoreClient, Config as CoreConfig } from '../core/types.gen';\nimport type { Middleware } from './utils.gen';\n\nexport type ResponseStyle = 'data' | 'fields';\n\nexport interface Config<T extends ClientOptions = ClientOptions>\n  extends Omit<RequestInit, 'body' | 'headers' | 'method'>, CoreConfig {\n  /**\n   * Base URL for all requests made by this client.\n   */\n  baseUrl?: T['baseUrl'];\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   * Please don't use the Fetch client for Next.js applications. The `next`\n   * options won't have any effect.\n   *\n   * Install {@link https://www.npmjs.com/package/@hey-api/client-next `@hey-api/client-next`} instead.\n   */\n  next?: never;\n  /**\n   * Return the response data parsed in a specified format. By default, `auto`\n   * will infer the appropriate method from the `Content-Type` response header.\n   * You can override this behavior with any of the {@link Body} methods.\n   * Select `stream` if you don't want to parse response data at all.\n   *\n   * @default 'auto'\n   */\n  parseAs?: 'arrayBuffer' | 'auto' | 'blob' | 'formData' | 'json' | 'stream' | 'text';\n  /**\n   * Should we return only data or multiple fields (data, error, response, etc.)?\n   *\n   * @default 'fields'\n   */\n  responseStyle?: ResponseStyle;\n  /**\n   * Throw an error instead of returning it in the response?\n   *\n   * @default false\n   */\n  throwOnError?: T['throwOnError'];\n}\n\nexport interface RequestOptions<\n  TData = unknown,\n  TResponseStyle extends ResponseStyle = 'fields',\n  ThrowOnError extends boolean = boolean,\n  Url extends string = string,\n>\n  extends\n    Config<{\n      responseStyle: TResponseStyle;\n      throwOnError: ThrowOnError;\n    }>,\n    Pick<\n      ServerSentEventsOptions<TData>,\n      | 'onRequest'\n      | 'onSseError'\n      | 'onSseEvent'\n      | 'sseDefaultRetryDelay'\n      | 'sseMaxRetryAttempts'\n      | 'sseMaxRetryDelay'\n    > {\n  /**\n   * Any body that you want to add to your request.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/fetch#body}\n   */\n  body?: unknown;\n  path?: Record<string, unknown>;\n  query?: Record<string, unknown>;\n  /**\n   * Security mechanism(s) to use for the request.\n   */\n  security?: ReadonlyArray<Auth>;\n  url: Url;\n}\n\nexport interface ResolvedRequestOptions<\n  TResponseStyle extends ResponseStyle = 'fields',\n  ThrowOnError extends boolean = boolean,\n  Url extends string = string,\n> extends RequestOptions<unknown, TResponseStyle, ThrowOnError, Url> {\n  serializedBody?: string;\n}\n\nexport type RequestResult<\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = boolean,\n  TResponseStyle extends ResponseStyle = 'fields',\n> = ThrowOnError extends true\n  ? Promise<\n      TResponseStyle extends 'data'\n        ? TData extends Record<string, unknown>\n          ? TData[keyof TData]\n          : TData\n        : {\n            data: TData extends Record<string, unknown> ? TData[keyof TData] : TData;\n            request: Request;\n            response: Response;\n          }\n    >\n  : Promise<\n      TResponseStyle extends 'data'\n        ? (TData extends Record<string, unknown> ? TData[keyof TData] : TData) | undefined\n        : (\n            | {\n                data: TData extends Record<string, unknown> ? TData[keyof TData] : TData;\n                error: undefined;\n              }\n            | {\n                data: undefined;\n                error: TError extends Record<string, unknown> ? TError[keyof TError] : TError;\n              }\n          ) & {\n            request: Request;\n            response: Response;\n          }\n    >;\n\nexport interface ClientOptions {\n  baseUrl?: string;\n  responseStyle?: ResponseStyle;\n  throwOnError?: boolean;\n}\n\ntype MethodFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'>,\n) => RequestResult<TData, TError, ThrowOnError, TResponseStyle>;\n\ntype SseFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'>,\n) => Promise<ServerSentEventsResult<TData, TError>>;\n\ntype RequestFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'> &\n    Pick<Required<RequestOptions<TData, TResponseStyle, ThrowOnError>>, 'method'>,\n) => RequestResult<TData, TError, ThrowOnError, TResponseStyle>;\n\ntype BuildUrlFn = <\n  TData extends {\n    body?: unknown;\n    path?: Record<string, unknown>;\n    query?: Record<string, unknown>;\n    url: string;\n  },\n>(\n  options: TData & Options<TData>,\n) => string;\n\nexport type Client = CoreClient<RequestFn, Config, MethodFn, BuildUrlFn, SseFn> & {\n  interceptors: Middleware<Request, Response, unknown, ResolvedRequestOptions>;\n};\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 = ClientOptions> = (\n  override?: Config<ClientOptions & T>,\n) => Config<Required<ClientOptions> & T>;\n\nexport interface TDataShape {\n  body?: unknown;\n  headers?: unknown;\n  path?: unknown;\n  query?: unknown;\n  url: string;\n}\n\ntype OmitKeys<T, K> = Pick<T, Exclude<keyof T, K>>;\n\nexport type Options<\n  TData extends TDataShape = TDataShape,\n  ThrowOnError extends boolean = boolean,\n  TResponse = unknown,\n  TResponseStyle extends ResponseStyle = 'fields',\n> = OmitKeys<\n  RequestOptions<TResponse, TResponseStyle, ThrowOnError>,\n  'body' | 'path' | 'query' | 'url'\n> &\n  ([TData] extends [never] ? unknown : Omit<TData, 'url'>);\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/vue-query/asClass/client/utils.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/vue-query/asClass/client.gen.ts",
    "content": "// 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>());\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/vue-query/asClass/core/auth.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/vue-query/asClass/core/bodySerializer.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/vue-query/asClass/core/params.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/vue-query/asClass/core/pathSerializer.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/vue-query/asClass/core/queryKeySerializer.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\n/**\n * JSON-friendly union that mirrors what Pinia Colada can hash.\n */\nexport type JsonValue =\n  | null\n  | string\n  | number\n  | boolean\n  | JsonValue[]\n  | { [key: string]: JsonValue };\n\n/**\n * Replacer that converts non-JSON values (bigint, Date, etc.) to safe substitutes.\n */\nexport const queryKeyJsonReplacer = (_key: string, value: unknown) => {\n  if (value === undefined || typeof value === 'function' || typeof value === 'symbol') {\n    return undefined;\n  }\n  if (typeof value === 'bigint') {\n    return value.toString();\n  }\n  if (value instanceof Date) {\n    return value.toISOString();\n  }\n  return value;\n};\n\n/**\n * Safely stringifies a value and parses it back into a JsonValue.\n */\nexport const stringifyToJsonValue = (input: unknown): JsonValue | undefined => {\n  try {\n    const json = JSON.stringify(input, queryKeyJsonReplacer);\n    if (json === undefined) {\n      return undefined;\n    }\n    return JSON.parse(json) as JsonValue;\n  } catch {\n    return undefined;\n  }\n};\n\n/**\n * Detects plain objects (including objects with a null prototype).\n */\nconst isPlainObject = (value: unknown): value is Record<string, unknown> => {\n  if (value === null || typeof value !== 'object') {\n    return false;\n  }\n  const prototype = Object.getPrototypeOf(value as object);\n  return prototype === Object.prototype || prototype === null;\n};\n\n/**\n * Turns URLSearchParams into a sorted JSON object for deterministic keys.\n */\nconst serializeSearchParams = (params: URLSearchParams): JsonValue => {\n  const entries = Array.from(params.entries()).sort(([a], [b]) => a.localeCompare(b));\n  const result: Record<string, JsonValue> = {};\n\n  for (const [key, value] of entries) {\n    const existing = result[key];\n    if (existing === undefined) {\n      result[key] = value;\n      continue;\n    }\n\n    if (Array.isArray(existing)) {\n      (existing as string[]).push(value);\n    } else {\n      result[key] = [existing, value];\n    }\n  }\n\n  return result;\n};\n\n/**\n * Normalizes any accepted value into a JSON-friendly shape for query keys.\n */\nexport const serializeQueryKeyValue = (value: unknown): JsonValue | undefined => {\n  if (value === null) {\n    return null;\n  }\n\n  if (typeof value === 'string' || typeof value === 'number' || typeof value === 'boolean') {\n    return value;\n  }\n\n  if (value === undefined || typeof value === 'function' || typeof value === 'symbol') {\n    return undefined;\n  }\n\n  if (typeof value === 'bigint') {\n    return value.toString();\n  }\n\n  if (value instanceof Date) {\n    return value.toISOString();\n  }\n\n  if (Array.isArray(value)) {\n    return stringifyToJsonValue(value);\n  }\n\n  if (typeof URLSearchParams !== 'undefined' && value instanceof URLSearchParams) {\n    return serializeSearchParams(value);\n  }\n\n  if (isPlainObject(value)) {\n    return stringifyToJsonValue(value);\n  }\n\n  return undefined;\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/vue-query/asClass/core/serverSentEvents.gen.ts",
    "content": "// 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 const 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            // Normalize line endings: CRLF -> LF, then CR -> LF\n            buffer = buffer.replace(/\\r\\n/g, '\\n').replace(/\\r/g, '\\n');\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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/vue-query/asClass/core/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { Auth, AuthToken } from './auth.gen';\nimport type { BodySerializer, QuerySerializer, QuerySerializerOptions } from './bodySerializer.gen';\n\nexport type HttpMethod =\n  | 'connect'\n  | 'delete'\n  | 'get'\n  | 'head'\n  | 'options'\n  | 'patch'\n  | 'post'\n  | 'put'\n  | 'trace';\n\nexport type Client<\n  RequestFn = never,\n  Config = unknown,\n  MethodFn = never,\n  BuildUrlFn = never,\n  SseFn = never,\n> = {\n  /**\n   * Returns the final request URL.\n   */\n  buildUrl: BuildUrlFn;\n  getConfig: () => Config;\n  request: RequestFn;\n  setConfig: (config: Config) => Config;\n} & {\n  [K in HttpMethod]: MethodFn;\n} & ([SseFn] extends [never] ? { sse?: never } : { sse: { [K in HttpMethod]: SseFn } });\n\nexport interface Config {\n  /**\n   * Auth token or a function returning auth token. The resolved value will be\n   * added to the request payload as defined by its `security` array.\n   */\n  auth?: ((auth: Auth) => Promise<AuthToken> | AuthToken) | AuthToken;\n  /**\n   * A function for serializing request body parameter. By default,\n   * {@link JSON.stringify()} will be used.\n   */\n  bodySerializer?: BodySerializer | null;\n  /**\n   * An object containing any HTTP headers that you want to pre-populate your\n   * `Headers` object with.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/Headers/Headers#init See more}\n   */\n  headers?:\n    | RequestInit['headers']\n    | Record<\n        string,\n        string | number | boolean | (string | number | boolean)[] | null | undefined | unknown\n      >;\n  /**\n   * The request method.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/fetch#method See more}\n   */\n  method?: Uppercase<HttpMethod>;\n  /**\n   * A function for serializing request query parameters. By default, arrays\n   * will be exploded in form style, objects will be exploded in deepObject\n   * style, and reserved characters are percent-encoded.\n   *\n   * This method will have no effect if the native `paramsSerializer()` Axios\n   * API function is used.\n   *\n   * {@link https://swagger.io/docs/specification/serialization/#query View examples}\n   */\n  querySerializer?: QuerySerializer | QuerySerializerOptions;\n  /**\n   * A function validating request data. This is useful if you want to ensure\n   * the request conforms to the desired shape, so it can be safely sent to\n   * the server.\n   */\n  requestValidator?: (data: unknown) => Promise<unknown>;\n  /**\n   * A function transforming response data before it's returned. This is useful\n   * for post-processing data, e.g. converting ISO strings into Date objects.\n   */\n  responseTransformer?: (data: unknown) => Promise<unknown>;\n  /**\n   * A function validating response data. This is useful if you want to ensure\n   * the response conforms to the desired shape, so it can be safely passed to\n   * the transformers and returned to the user.\n   */\n  responseValidator?: (data: unknown) => Promise<unknown>;\n}\n\ntype IsExactlyNeverOrNeverUndefined<T> = [T] extends [never]\n  ? true\n  : [T] extends [never | undefined]\n    ? [undefined] extends [T]\n      ? false\n      : true\n    : false;\n\nexport type OmitNever<T extends Record<string, unknown>> = {\n  [K in keyof T as IsExactlyNeverOrNeverUndefined<T[K]> extends true ? never : K]: T[K];\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/vue-query/asClass/core/utils.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/vue-query/asClass/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport { BarBazService, BarService, BarService2, FooBazService, FooService, FooService2, type Options } from './sdk.gen';\nexport type { ClientOptions, FooBarPostData, FooBarPostResponse, FooBarPostResponses, FooBarPutData, FooBarPutResponse, FooBarPutResponses, FooPostData, FooPostResponse, FooPostResponses, FooPutData, FooPutResponse, FooPutResponses, GetFooBarData, GetFooBarResponse, GetFooBarResponses, GetFooData, GetFooResponse, GetFooResponses } from './types.gen';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/vue-query/asClass/sdk.gen.ts",
    "content": "// 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 { FooBarPostData, FooBarPostResponses, FooBarPutData, FooBarPutResponses, FooPostData, FooPostResponses, FooPutData, FooPutResponses, GetFooBarData, GetFooBarResponses, GetFooData, GetFooResponses } from './types.gen';\n\nexport type Options<TData extends TDataShape = TDataShape, ThrowOnError extends boolean = boolean> = Options2<TData, ThrowOnError> & {\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\nexport class BarService {\n    public static post<ThrowOnError extends boolean = false>(options?: Options<FooBarPostData, ThrowOnError>) {\n        return (options?.client ?? client).post<FooBarPostResponses, unknown, ThrowOnError>({ url: '/foo/bar', ...options });\n    }\n    \n    public static put<ThrowOnError extends boolean = false>(options?: Options<FooBarPutData, ThrowOnError>) {\n        return (options?.client ?? client).put<FooBarPutResponses, unknown, ThrowOnError>({ url: '/foo/bar', ...options });\n    }\n}\n\nexport class FooService {\n    public static post<ThrowOnError extends boolean = false>(options?: Options<FooPostData, ThrowOnError>) {\n        return (options?.client ?? client).post<FooPostResponses, unknown, ThrowOnError>({ url: '/foo', ...options });\n    }\n    \n    public static put<ThrowOnError extends boolean = false>(options?: Options<FooPutData, ThrowOnError>) {\n        return (options?.client ?? client).put<FooPutResponses, unknown, ThrowOnError>({ url: '/foo', ...options });\n    }\n    \n    static barService = BarService;\n}\n\nexport class FooBazService {\n    public static getFoo<ThrowOnError extends boolean = false>(options?: Options<GetFooData, ThrowOnError>) {\n        return (options?.client ?? client).get<GetFooResponses, unknown, ThrowOnError>({ url: '/foo', ...options });\n    }\n    \n    static fooService = FooService;\n}\n\nexport class BarService2 {\n    public static post<ThrowOnError extends boolean = false>(options?: Options<FooBarPostData, ThrowOnError>) {\n        return (options?.client ?? client).post<FooBarPostResponses, unknown, ThrowOnError>({ url: '/foo/bar', ...options });\n    }\n    \n    public static put<ThrowOnError extends boolean = false>(options?: Options<FooBarPutData, ThrowOnError>) {\n        return (options?.client ?? client).put<FooBarPutResponses, unknown, ThrowOnError>({ url: '/foo/bar', ...options });\n    }\n}\n\nexport class FooService2 {\n    static barService = BarService2;\n}\n\nexport class BarBazService {\n    public static getFooBar<ThrowOnError extends boolean = false>(options?: Options<GetFooBarData, ThrowOnError>) {\n        return (options?.client ?? client).get<GetFooBarResponses, unknown, ThrowOnError>({ url: '/foo/bar', ...options });\n    }\n    \n    static fooService = FooService2;\n}\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/vue-query/asClass/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type ClientOptions = {\n    baseUrl: `${string}://${string}` | (string & {});\n};\n\nexport type GetFooData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/foo';\n};\n\nexport type GetFooResponses = {\n    /**\n     * OK\n     */\n    200: string;\n};\n\nexport type GetFooResponse = GetFooResponses[keyof GetFooResponses];\n\nexport type FooPostData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/foo';\n};\n\nexport type FooPostResponses = {\n    /**\n     * OK\n     */\n    200: string;\n};\n\nexport type FooPostResponse = FooPostResponses[keyof FooPostResponses];\n\nexport type FooPutData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/foo';\n};\n\nexport type FooPutResponses = {\n    /**\n     * OK\n     */\n    200: string;\n};\n\nexport type FooPutResponse = FooPutResponses[keyof FooPutResponses];\n\nexport type GetFooBarData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/foo/bar';\n};\n\nexport type GetFooBarResponses = {\n    /**\n     * OK\n     */\n    200: string;\n};\n\nexport type GetFooBarResponse = GetFooBarResponses[keyof GetFooBarResponses];\n\nexport type FooBarPostData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/foo/bar';\n};\n\nexport type FooBarPostResponses = {\n    /**\n     * OK\n     */\n    200: string;\n};\n\nexport type FooBarPostResponse = FooBarPostResponses[keyof FooBarPostResponses];\n\nexport type FooBarPutData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/foo/bar';\n};\n\nexport type FooBarPutResponses = {\n    /**\n     * OK\n     */\n    200: string;\n};\n\nexport type FooBarPutResponse = FooBarPutResponses[keyof FooBarPutResponses];\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/vue-query/axios/@tanstack/vue-query.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport { type DefaultError, type InfiniteData, infiniteQueryOptions, queryOptions, type UseMutationOptions } from '@tanstack/vue-query';\nimport type { AxiosError } from 'axios';\n\nimport { client } from '../client.gen';\nimport { apiVVersionODataControllerCount, callToTestOrderOfParams, callWithDefaultOptionalParameters, callWithDefaultParameters, callWithDescriptions, callWithDuplicateResponses, callWithNoContentResponse, callWithParameters, callWithResponse, callWithResponseAndNoContentResponse, callWithResponses, callWithResultFromHeader, callWithWeirdParameterNames, collectionFormat, complexParams, complexTypes, deleteCallWithoutParametersAndResponse, deleteFoo, deprecatedCall, dummyA, dummyB, duplicateName, duplicateName2, duplicateName3, duplicateName4, export_, fileResponse, fooWow, getApiVbyApiVersionSimpleOperation, getCallWithOptionalParam, getCallWithoutParametersAndResponse, import_, multipartRequest, multipartResponse, nonAsciiæøåÆøÅöôêÊ字符串, type Options, patchApiVbyApiVersionNoTag, patchCallWithoutParametersAndResponse, postApiVbyApiVersionFormData, postApiVbyApiVersionRequestBody, postCallWithOptionalParam, postCallWithoutParametersAndResponse, putCallWithoutParametersAndResponse, putWithFormUrlEncoded, testErrorCode, types, uploadFile } from '../sdk.gen';\nimport type { ApiVVersionODataControllerCountData, ApiVVersionODataControllerCountResponse, CallToTestOrderOfParamsData, CallWithDefaultOptionalParametersData, CallWithDefaultParametersData, CallWithDescriptionsData, CallWithDuplicateResponsesData, CallWithDuplicateResponsesError, CallWithDuplicateResponsesResponse, CallWithNoContentResponseData, CallWithNoContentResponseResponse, CallWithParametersData, CallWithResponseAndNoContentResponseData, CallWithResponseAndNoContentResponseResponse, CallWithResponseData, CallWithResponseResponse, CallWithResponsesData, CallWithResponsesError, CallWithResponsesResponse, CallWithResultFromHeaderData, CallWithWeirdParameterNamesData, CollectionFormatData, ComplexParamsData, ComplexParamsResponse, ComplexTypesData, ComplexTypesResponse, DeleteCallWithoutParametersAndResponseData, DeleteFooData3, DeprecatedCallData, DummyAData, DummyAResponse, DummyBData, DummyBResponse, DuplicateName2Data, DuplicateName3Data, DuplicateName4Data, DuplicateNameData, ExportData, FileResponseData, FileResponseResponse, FooWowData, GetApiVbyApiVersionSimpleOperationData, GetApiVbyApiVersionSimpleOperationError, GetApiVbyApiVersionSimpleOperationResponse, GetCallWithOptionalParamData, GetCallWithoutParametersAndResponseData, ImportData, ImportResponse, MultipartRequestData, MultipartResponseData, MultipartResponseResponse, NonAsciiæøåÆøÅöôêÊ字符串Data, NonAsciiæøåÆøÅöôêÊ字符串Response, PatchApiVbyApiVersionNoTagData, PatchCallWithoutParametersAndResponseData, PostApiVbyApiVersionFormDataData, PostApiVbyApiVersionRequestBodyData, PostCallWithOptionalParamData, PostCallWithOptionalParamResponse, PostCallWithoutParametersAndResponseData, PutCallWithoutParametersAndResponseData, PutWithFormUrlEncodedData, TestErrorCodeData, TypesData, TypesResponse, UploadFileData, UploadFileResponse } from '../types.gen';\n\nexport type QueryKey<TOptions extends Options> = [\n    Pick<TOptions, 'baseURL' | 'body' | 'headers' | 'path' | 'query'> & {\n        _id: string;\n        _infinite?: boolean;\n        tags?: ReadonlyArray<string>;\n    }\n];\n\nconst createQueryKey = <TOptions extends Options>(id: string, options?: TOptions, infinite?: boolean, tags?: ReadonlyArray<string>): [\n    QueryKey<TOptions>[0]\n] => {\n    const params: QueryKey<TOptions>[0] = { _id: id, baseURL: options?.baseURL || (options?.client ?? client).getConfig().baseURL } as QueryKey<TOptions>[0];\n    if (infinite) {\n        params._infinite = infinite;\n    }\n    if (tags) {\n        params.tags = tags;\n    }\n    if (options?.body) {\n        params.body = options.body;\n    }\n    if (options?.headers) {\n        params.headers = options.headers;\n    }\n    if (options?.path) {\n        params.path = options.path;\n    }\n    if (options?.query) {\n        params.query = options.query;\n    }\n    return [params];\n};\n\nexport const exportQueryKey = (options?: Options<ExportData>) => createQueryKey('export', options);\n\nexport const exportOptions = (options?: Options<ExportData>) => queryOptions<unknown, AxiosError<DefaultError>, unknown, ReturnType<typeof exportQueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await export_({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: exportQueryKey(options)\n});\n\nexport const patchApiVbyApiVersionNoTagMutation = (options?: Partial<Options<PatchApiVbyApiVersionNoTagData>>): UseMutationOptions<unknown, AxiosError<DefaultError>, Options<PatchApiVbyApiVersionNoTagData>> => {\n    const mutationOptions: UseMutationOptions<unknown, AxiosError<DefaultError>, Options<PatchApiVbyApiVersionNoTagData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await patchApiVbyApiVersionNoTag({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const importMutation = (options?: Partial<Options<ImportData>>): UseMutationOptions<ImportResponse, AxiosError<DefaultError>, Options<ImportData>> => {\n    const mutationOptions: UseMutationOptions<ImportResponse, AxiosError<DefaultError>, Options<ImportData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await import_({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const fooWowMutation = (options?: Partial<Options<FooWowData>>): UseMutationOptions<unknown, AxiosError<DefaultError>, Options<FooWowData>> => {\n    const mutationOptions: UseMutationOptions<unknown, AxiosError<DefaultError>, Options<FooWowData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await fooWow({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const apiVVersionODataControllerCountQueryKey = (options?: Options<ApiVVersionODataControllerCountData>) => createQueryKey('apiVVersionODataControllerCount', options);\n\nexport const apiVVersionODataControllerCountOptions = (options?: Options<ApiVVersionODataControllerCountData>) => queryOptions<ApiVVersionODataControllerCountResponse, AxiosError<DefaultError>, ApiVVersionODataControllerCountResponse, ReturnType<typeof apiVVersionODataControllerCountQueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await apiVVersionODataControllerCount({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: apiVVersionODataControllerCountQueryKey(options)\n});\n\nexport const getApiVbyApiVersionSimpleOperationQueryKey = (options: Options<GetApiVbyApiVersionSimpleOperationData>) => createQueryKey('getApiVbyApiVersionSimpleOperation', options);\n\nexport const getApiVbyApiVersionSimpleOperationOptions = (options: Options<GetApiVbyApiVersionSimpleOperationData>) => queryOptions<GetApiVbyApiVersionSimpleOperationResponse, AxiosError<GetApiVbyApiVersionSimpleOperationError>, GetApiVbyApiVersionSimpleOperationResponse, ReturnType<typeof getApiVbyApiVersionSimpleOperationQueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await getApiVbyApiVersionSimpleOperation({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: getApiVbyApiVersionSimpleOperationQueryKey(options)\n});\n\nexport const deleteCallWithoutParametersAndResponseMutation = (options?: Partial<Options<DeleteCallWithoutParametersAndResponseData>>): UseMutationOptions<unknown, AxiosError<DefaultError>, Options<DeleteCallWithoutParametersAndResponseData>> => {\n    const mutationOptions: UseMutationOptions<unknown, AxiosError<DefaultError>, Options<DeleteCallWithoutParametersAndResponseData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await deleteCallWithoutParametersAndResponse({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const getCallWithoutParametersAndResponseQueryKey = (options?: Options<GetCallWithoutParametersAndResponseData>) => createQueryKey('getCallWithoutParametersAndResponse', options);\n\nexport const getCallWithoutParametersAndResponseOptions = (options?: Options<GetCallWithoutParametersAndResponseData>) => queryOptions<unknown, AxiosError<DefaultError>, unknown, ReturnType<typeof getCallWithoutParametersAndResponseQueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await getCallWithoutParametersAndResponse({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: getCallWithoutParametersAndResponseQueryKey(options)\n});\n\nexport const patchCallWithoutParametersAndResponseMutation = (options?: Partial<Options<PatchCallWithoutParametersAndResponseData>>): UseMutationOptions<unknown, AxiosError<DefaultError>, Options<PatchCallWithoutParametersAndResponseData>> => {\n    const mutationOptions: UseMutationOptions<unknown, AxiosError<DefaultError>, Options<PatchCallWithoutParametersAndResponseData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await patchCallWithoutParametersAndResponse({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const postCallWithoutParametersAndResponseMutation = (options?: Partial<Options<PostCallWithoutParametersAndResponseData>>): UseMutationOptions<unknown, AxiosError<DefaultError>, Options<PostCallWithoutParametersAndResponseData>> => {\n    const mutationOptions: UseMutationOptions<unknown, AxiosError<DefaultError>, Options<PostCallWithoutParametersAndResponseData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await postCallWithoutParametersAndResponse({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const putCallWithoutParametersAndResponseMutation = (options?: Partial<Options<PutCallWithoutParametersAndResponseData>>): UseMutationOptions<unknown, AxiosError<DefaultError>, Options<PutCallWithoutParametersAndResponseData>> => {\n    const mutationOptions: UseMutationOptions<unknown, AxiosError<DefaultError>, Options<PutCallWithoutParametersAndResponseData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await putCallWithoutParametersAndResponse({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const deleteFooMutation = (options?: Partial<Options<DeleteFooData3>>): UseMutationOptions<unknown, AxiosError<DefaultError>, Options<DeleteFooData3>> => {\n    const mutationOptions: UseMutationOptions<unknown, AxiosError<DefaultError>, Options<DeleteFooData3>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await deleteFoo({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const callWithDescriptionsMutation = (options?: Partial<Options<CallWithDescriptionsData>>): UseMutationOptions<unknown, AxiosError<DefaultError>, Options<CallWithDescriptionsData>> => {\n    const mutationOptions: UseMutationOptions<unknown, AxiosError<DefaultError>, Options<CallWithDescriptionsData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await callWithDescriptions({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\n/**\n * @deprecated\n */\nexport const deprecatedCallMutation = (options?: Partial<Options<DeprecatedCallData>>): UseMutationOptions<unknown, AxiosError<DefaultError>, Options<DeprecatedCallData>> => {\n    const mutationOptions: UseMutationOptions<unknown, AxiosError<DefaultError>, Options<DeprecatedCallData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await deprecatedCall({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const callWithParametersMutation = (options?: Partial<Options<CallWithParametersData>>): UseMutationOptions<unknown, AxiosError<DefaultError>, Options<CallWithParametersData>> => {\n    const mutationOptions: UseMutationOptions<unknown, AxiosError<DefaultError>, Options<CallWithParametersData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await callWithParameters({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const callWithWeirdParameterNamesMutation = (options?: Partial<Options<CallWithWeirdParameterNamesData>>): UseMutationOptions<unknown, AxiosError<DefaultError>, Options<CallWithWeirdParameterNamesData>> => {\n    const mutationOptions: UseMutationOptions<unknown, AxiosError<DefaultError>, Options<CallWithWeirdParameterNamesData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await callWithWeirdParameterNames({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const getCallWithOptionalParamQueryKey = (options: Options<GetCallWithOptionalParamData>) => createQueryKey('getCallWithOptionalParam', options);\n\nexport const getCallWithOptionalParamOptions = (options: Options<GetCallWithOptionalParamData>) => queryOptions<unknown, AxiosError<DefaultError>, unknown, ReturnType<typeof getCallWithOptionalParamQueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await getCallWithOptionalParam({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: getCallWithOptionalParamQueryKey(options)\n});\n\nconst createInfiniteParams = <K extends Pick<QueryKey<Options>[0], 'body' | 'headers' | 'path' | 'query'>>(queryKey: QueryKey<Options>, page: K) => {\n    const params = { ...queryKey[0] };\n    if (page.body) {\n        params.body = {\n            ...queryKey[0].body as any,\n            ...page.body as any\n        };\n    }\n    if (page.headers) {\n        params.headers = {\n            ...queryKey[0].headers,\n            ...page.headers\n        };\n    }\n    if (page.path) {\n        params.path = {\n            ...queryKey[0].path as any,\n            ...page.path as any\n        };\n    }\n    if (page.query) {\n        params.query = {\n            ...queryKey[0].query as any,\n            ...page.query as any\n        };\n    }\n    return params as unknown as typeof page;\n};\n\nexport const getCallWithOptionalParamInfiniteQueryKey = (options: Options<GetCallWithOptionalParamData>): QueryKey<Options<GetCallWithOptionalParamData>> => createQueryKey('getCallWithOptionalParam', options, true);\n\nexport const getCallWithOptionalParamInfiniteOptions = (options: Options<GetCallWithOptionalParamData>) => infiniteQueryOptions<unknown, AxiosError<DefaultError>, InfiniteData<unknown>, QueryKey<Options<GetCallWithOptionalParamData>>, number | Pick<QueryKey<Options<GetCallWithOptionalParamData>>[0], 'body' | 'headers' | 'path' | 'query'>>(\n// @ts-ignore\n{\n    queryFn: async ({ pageParam, queryKey, signal }) => {\n        // @ts-ignore\n        const page: Pick<QueryKey<Options<GetCallWithOptionalParamData>>[0], 'body' | 'headers' | 'path' | 'query'> = typeof pageParam === 'object' ? pageParam : {\n            query: {\n                page: pageParam\n            }\n        };\n        const params = createInfiniteParams(queryKey, page);\n        const { data } = await getCallWithOptionalParam({\n            ...options,\n            ...params,\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: getCallWithOptionalParamInfiniteQueryKey(options)\n});\n\nexport const postCallWithOptionalParamMutation = (options?: Partial<Options<PostCallWithOptionalParamData>>): UseMutationOptions<PostCallWithOptionalParamResponse, AxiosError<DefaultError>, Options<PostCallWithOptionalParamData>> => {\n    const mutationOptions: UseMutationOptions<PostCallWithOptionalParamResponse, AxiosError<DefaultError>, Options<PostCallWithOptionalParamData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await postCallWithOptionalParam({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const postApiVbyApiVersionRequestBodyMutation = (options?: Partial<Options<PostApiVbyApiVersionRequestBodyData>>): UseMutationOptions<unknown, AxiosError<DefaultError>, Options<PostApiVbyApiVersionRequestBodyData>> => {\n    const mutationOptions: UseMutationOptions<unknown, AxiosError<DefaultError>, Options<PostApiVbyApiVersionRequestBodyData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await postApiVbyApiVersionRequestBody({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const postApiVbyApiVersionFormDataMutation = (options?: Partial<Options<PostApiVbyApiVersionFormDataData>>): UseMutationOptions<unknown, AxiosError<DefaultError>, Options<PostApiVbyApiVersionFormDataData>> => {\n    const mutationOptions: UseMutationOptions<unknown, AxiosError<DefaultError>, Options<PostApiVbyApiVersionFormDataData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await postApiVbyApiVersionFormData({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const callWithDefaultParametersQueryKey = (options?: Options<CallWithDefaultParametersData>) => createQueryKey('callWithDefaultParameters', options);\n\nexport const callWithDefaultParametersOptions = (options?: Options<CallWithDefaultParametersData>) => queryOptions<unknown, AxiosError<DefaultError>, unknown, ReturnType<typeof callWithDefaultParametersQueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await callWithDefaultParameters({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: callWithDefaultParametersQueryKey(options)\n});\n\nexport const callWithDefaultOptionalParametersMutation = (options?: Partial<Options<CallWithDefaultOptionalParametersData>>): UseMutationOptions<unknown, AxiosError<DefaultError>, Options<CallWithDefaultOptionalParametersData>> => {\n    const mutationOptions: UseMutationOptions<unknown, AxiosError<DefaultError>, Options<CallWithDefaultOptionalParametersData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await callWithDefaultOptionalParameters({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const callToTestOrderOfParamsMutation = (options?: Partial<Options<CallToTestOrderOfParamsData>>): UseMutationOptions<unknown, AxiosError<DefaultError>, Options<CallToTestOrderOfParamsData>> => {\n    const mutationOptions: UseMutationOptions<unknown, AxiosError<DefaultError>, Options<CallToTestOrderOfParamsData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await callToTestOrderOfParams({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const duplicateNameMutation = (options?: Partial<Options<DuplicateNameData>>): UseMutationOptions<unknown, AxiosError<DefaultError>, Options<DuplicateNameData>> => {\n    const mutationOptions: UseMutationOptions<unknown, AxiosError<DefaultError>, Options<DuplicateNameData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await duplicateName({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const duplicateName2QueryKey = (options?: Options<DuplicateName2Data>) => createQueryKey('duplicateName2', options);\n\nexport const duplicateName2Options = (options?: Options<DuplicateName2Data>) => queryOptions<unknown, AxiosError<DefaultError>, unknown, ReturnType<typeof duplicateName2QueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await duplicateName2({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: duplicateName2QueryKey(options)\n});\n\nexport const duplicateName3Mutation = (options?: Partial<Options<DuplicateName3Data>>): UseMutationOptions<unknown, AxiosError<DefaultError>, Options<DuplicateName3Data>> => {\n    const mutationOptions: UseMutationOptions<unknown, AxiosError<DefaultError>, Options<DuplicateName3Data>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await duplicateName3({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const duplicateName4Mutation = (options?: Partial<Options<DuplicateName4Data>>): UseMutationOptions<unknown, AxiosError<DefaultError>, Options<DuplicateName4Data>> => {\n    const mutationOptions: UseMutationOptions<unknown, AxiosError<DefaultError>, Options<DuplicateName4Data>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await duplicateName4({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const callWithNoContentResponseQueryKey = (options?: Options<CallWithNoContentResponseData>) => createQueryKey('callWithNoContentResponse', options);\n\nexport const callWithNoContentResponseOptions = (options?: Options<CallWithNoContentResponseData>) => queryOptions<CallWithNoContentResponseResponse, AxiosError<DefaultError>, CallWithNoContentResponseResponse, ReturnType<typeof callWithNoContentResponseQueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await callWithNoContentResponse({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: callWithNoContentResponseQueryKey(options)\n});\n\nexport const callWithResponseAndNoContentResponseQueryKey = (options?: Options<CallWithResponseAndNoContentResponseData>) => createQueryKey('callWithResponseAndNoContentResponse', options);\n\nexport const callWithResponseAndNoContentResponseOptions = (options?: Options<CallWithResponseAndNoContentResponseData>) => queryOptions<CallWithResponseAndNoContentResponseResponse, AxiosError<DefaultError>, CallWithResponseAndNoContentResponseResponse, ReturnType<typeof callWithResponseAndNoContentResponseQueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await callWithResponseAndNoContentResponse({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: callWithResponseAndNoContentResponseQueryKey(options)\n});\n\nexport const dummyAQueryKey = (options?: Options<DummyAData>) => createQueryKey('dummyA', options);\n\nexport const dummyAOptions = (options?: Options<DummyAData>) => queryOptions<DummyAResponse, AxiosError<DefaultError>, DummyAResponse, ReturnType<typeof dummyAQueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await dummyA({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: dummyAQueryKey(options)\n});\n\nexport const dummyBQueryKey = (options?: Options<DummyBData>) => createQueryKey('dummyB', options);\n\nexport const dummyBOptions = (options?: Options<DummyBData>) => queryOptions<DummyBResponse, AxiosError<DefaultError>, DummyBResponse, ReturnType<typeof dummyBQueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await dummyB({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: dummyBQueryKey(options)\n});\n\nexport const callWithResponseQueryKey = (options?: Options<CallWithResponseData>) => createQueryKey('callWithResponse', options);\n\nexport const callWithResponseOptions = (options?: Options<CallWithResponseData>) => queryOptions<CallWithResponseResponse, AxiosError<DefaultError>, CallWithResponseResponse, ReturnType<typeof callWithResponseQueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await callWithResponse({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: callWithResponseQueryKey(options)\n});\n\nexport const callWithDuplicateResponsesMutation = (options?: Partial<Options<CallWithDuplicateResponsesData>>): UseMutationOptions<CallWithDuplicateResponsesResponse, AxiosError<CallWithDuplicateResponsesError>, Options<CallWithDuplicateResponsesData>> => {\n    const mutationOptions: UseMutationOptions<CallWithDuplicateResponsesResponse, AxiosError<CallWithDuplicateResponsesError>, Options<CallWithDuplicateResponsesData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await callWithDuplicateResponses({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const callWithResponsesMutation = (options?: Partial<Options<CallWithResponsesData>>): UseMutationOptions<CallWithResponsesResponse, AxiosError<CallWithResponsesError>, Options<CallWithResponsesData>> => {\n    const mutationOptions: UseMutationOptions<CallWithResponsesResponse, AxiosError<CallWithResponsesError>, Options<CallWithResponsesData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await callWithResponses({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const collectionFormatQueryKey = (options: Options<CollectionFormatData>) => createQueryKey('collectionFormat', options);\n\nexport const collectionFormatOptions = (options: Options<CollectionFormatData>) => queryOptions<unknown, AxiosError<DefaultError>, unknown, ReturnType<typeof collectionFormatQueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await collectionFormat({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: collectionFormatQueryKey(options)\n});\n\nexport const typesQueryKey = (options: Options<TypesData>) => createQueryKey('types', options);\n\nexport const typesOptions = (options: Options<TypesData>) => queryOptions<TypesResponse, AxiosError<DefaultError>, TypesResponse, ReturnType<typeof typesQueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await types({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: typesQueryKey(options)\n});\n\nexport const uploadFileMutation = (options?: Partial<Options<UploadFileData>>): UseMutationOptions<UploadFileResponse, AxiosError<DefaultError>, Options<UploadFileData>> => {\n    const mutationOptions: UseMutationOptions<UploadFileResponse, AxiosError<DefaultError>, Options<UploadFileData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await uploadFile({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const fileResponseQueryKey = (options: Options<FileResponseData>) => createQueryKey('fileResponse', options);\n\nexport const fileResponseOptions = (options: Options<FileResponseData>) => queryOptions<FileResponseResponse, AxiosError<DefaultError>, FileResponseResponse, ReturnType<typeof fileResponseQueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await fileResponse({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: fileResponseQueryKey(options)\n});\n\nexport const complexTypesQueryKey = (options: Options<ComplexTypesData>) => createQueryKey('complexTypes', options);\n\nexport const complexTypesOptions = (options: Options<ComplexTypesData>) => queryOptions<ComplexTypesResponse, AxiosError<DefaultError>, ComplexTypesResponse, ReturnType<typeof complexTypesQueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await complexTypes({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: complexTypesQueryKey(options)\n});\n\nexport const multipartResponseQueryKey = (options?: Options<MultipartResponseData>) => createQueryKey('multipartResponse', options);\n\nexport const multipartResponseOptions = (options?: Options<MultipartResponseData>) => queryOptions<MultipartResponseResponse, AxiosError<DefaultError>, MultipartResponseResponse, ReturnType<typeof multipartResponseQueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await multipartResponse({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: multipartResponseQueryKey(options)\n});\n\nexport const multipartRequestMutation = (options?: Partial<Options<MultipartRequestData>>): UseMutationOptions<unknown, AxiosError<DefaultError>, Options<MultipartRequestData>> => {\n    const mutationOptions: UseMutationOptions<unknown, AxiosError<DefaultError>, Options<MultipartRequestData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await multipartRequest({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const complexParamsMutation = (options?: Partial<Options<ComplexParamsData>>): UseMutationOptions<ComplexParamsResponse, AxiosError<DefaultError>, Options<ComplexParamsData>> => {\n    const mutationOptions: UseMutationOptions<ComplexParamsResponse, AxiosError<DefaultError>, Options<ComplexParamsData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await complexParams({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const callWithResultFromHeaderMutation = (options?: Partial<Options<CallWithResultFromHeaderData>>): UseMutationOptions<unknown, AxiosError<DefaultError>, Options<CallWithResultFromHeaderData>> => {\n    const mutationOptions: UseMutationOptions<unknown, AxiosError<DefaultError>, Options<CallWithResultFromHeaderData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await callWithResultFromHeader({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const testErrorCodeMutation = (options?: Partial<Options<TestErrorCodeData>>): UseMutationOptions<unknown, AxiosError<DefaultError>, Options<TestErrorCodeData>> => {\n    const mutationOptions: UseMutationOptions<unknown, AxiosError<DefaultError>, Options<TestErrorCodeData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await testErrorCode({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const nonAsciiæøåÆøÅöôêÊ字符串Mutation = (options?: Partial<Options<NonAsciiæøåÆøÅöôêÊ字符串Data>>): UseMutationOptions<NonAsciiæøåÆøÅöôêÊ字符串Response, AxiosError<DefaultError>, Options<NonAsciiæøåÆøÅöôêÊ字符串Data>> => {\n    const mutationOptions: UseMutationOptions<NonAsciiæøåÆøÅöôêÊ字符串Response, AxiosError<DefaultError>, Options<NonAsciiæøåÆøÅöôêÊ字符串Data>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await nonAsciiæøåÆøÅöôêÊ字符串({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\n/**\n * Login User\n */\nexport const putWithFormUrlEncodedMutation = (options?: Partial<Options<PutWithFormUrlEncodedData>>): UseMutationOptions<unknown, AxiosError<DefaultError>, Options<PutWithFormUrlEncodedData>> => {\n    const mutationOptions: UseMutationOptions<unknown, AxiosError<DefaultError>, Options<PutWithFormUrlEncodedData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await putWithFormUrlEncoded({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/vue-query/axios/client/client.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { AxiosError, AxiosInstance, RawAxiosRequestHeaders } from 'axios';\nimport axios from 'axios';\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 } from './types.gen';\nimport { buildUrl, createConfig, mergeConfigs, mergeHeaders, setAuthParams } from './utils.gen';\n\nexport const createClient = (config: Config = {}): Client => {\n  let _config = mergeConfigs(createConfig(), config);\n\n  let instance: AxiosInstance;\n\n  if (_config.axios && !('Axios' in _config.axios)) {\n    instance = _config.axios;\n  } else {\n    // eslint-disable-next-line @typescript-eslint/no-unused-vars\n    const { auth, ...configWithoutAuth } = _config;\n    instance = axios.create(configWithoutAuth);\n  }\n\n  const getConfig = (): Config => ({ ..._config });\n\n  const setConfig = (config: Config): Config => {\n    _config = mergeConfigs(_config, config);\n    instance.defaults = {\n      ...instance.defaults,\n      ..._config,\n      // @ts-expect-error\n      headers: mergeHeaders(instance.defaults.headers, _config.headers),\n    };\n    return getConfig();\n  };\n\n  const beforeRequest = async (options: RequestOptions) => {\n    const opts = {\n      ..._config,\n      ...options,\n      axios: options.axios ?? _config.axios ?? instance,\n      headers: mergeHeaders(_config.headers, options.headers),\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.body = opts.bodySerializer(opts.body);\n    }\n\n    const url = buildUrl(opts);\n\n    return { opts, url };\n  };\n\n  // @ts-expect-error\n  const request: Client['request'] = async (options) => {\n    // @ts-expect-error\n    const { opts, url } = await beforeRequest(options);\n    try {\n      // assign Axios here for consistency with fetch\n      const _axios = opts.axios!;\n      // eslint-disable-next-line @typescript-eslint/no-unused-vars\n      const { auth, ...optsWithoutAuth } = opts;\n      const response = await _axios({\n        ...optsWithoutAuth,\n        baseURL: '', // the baseURL is already included in `url`\n        data: getValidRequestBody(opts),\n        headers: opts.headers as RawAxiosRequestHeaders,\n        // let `paramsSerializer()` handle query params if it exists\n        params: opts.paramsSerializer ? opts.query : undefined,\n        url,\n      });\n\n      let { data } = response;\n\n      if (opts.responseType === '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 {\n        ...response,\n        data: data ?? {},\n      };\n    } catch (error) {\n      const e = error as AxiosError;\n      if (opts.throwOnError) {\n        throw e;\n      }\n      // @ts-expect-error\n      e.error = e.response?.data ?? {};\n      return e;\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 Record<string, string>,\n      method,\n      serializedBody: getValidRequestBody(opts) as BodyInit | null | undefined,\n      // @ts-expect-error\n      signal: opts.signal,\n      url,\n    });\n  };\n\n  const _buildUrl: Client['buildUrl'] = (options) =>\n    buildUrl({ axios: instance, ..._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    instance,\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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/vue-query/axios/client/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type { Auth } from '../core/auth.gen';\nexport type { QuerySerializerOptions } from '../core/bodySerializer.gen';\nexport {\n  formDataBodySerializer,\n  jsonBodySerializer,\n  urlSearchParamsBodySerializer,\n} from '../core/bodySerializer.gen';\nexport { buildClientParams } from '../core/params.gen';\nexport { serializeQueryKeyValue } from '../core/queryKeySerializer.gen';\nexport { createClient } from './client.gen';\nexport type {\n  Client,\n  ClientOptions,\n  Config,\n  CreateClientConfig,\n  Options,\n  RequestOptions,\n  RequestResult,\n  TDataShape,\n} from './types.gen';\nexport { createConfig } from './utils.gen';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/vue-query/axios/client/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type {\n  AxiosError,\n  AxiosInstance,\n  AxiosRequestHeaders,\n  AxiosResponse,\n  AxiosStatic,\n  CreateAxiosDefaults,\n} from 'axios';\n\nimport type { Auth } from '../core/auth.gen';\nimport type {\n  ServerSentEventsOptions,\n  ServerSentEventsResult,\n} from '../core/serverSentEvents.gen';\nimport type { Client as CoreClient, Config as CoreConfig } from '../core/types.gen';\n\nexport interface Config<T extends ClientOptions = ClientOptions>\n  extends Omit<CreateAxiosDefaults, 'auth' | 'baseURL' | 'headers' | 'method'>, CoreConfig {\n  /**\n   * Axios implementation. You can use this option to provide either an\n   * `AxiosStatic` or an `AxiosInstance`.\n   *\n   * @default axios\n   */\n  axios?: AxiosStatic | AxiosInstance;\n  /**\n   * Base URL for all requests made by this client.\n   */\n  baseURL?: T['baseURL'];\n  /**\n   * An object containing any HTTP headers that you want to pre-populate your\n   * `Headers` object with.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/Headers/Headers#init See more}\n   */\n  headers?:\n    | AxiosRequestHeaders\n    | Record<\n        string,\n        string | number | boolean | (string | number | boolean)[] | null | undefined | unknown\n      >;\n  /**\n   * Throw an error instead of returning it in the response?\n   *\n   * @default false\n   */\n  throwOnError?: T['throwOnError'];\n}\n\nexport interface RequestOptions<\n  TData = unknown,\n  ThrowOnError extends boolean = boolean,\n  Url extends string = string,\n>\n  extends\n    Config<{\n      throwOnError: ThrowOnError;\n    }>,\n    Pick<\n      ServerSentEventsOptions<TData>,\n      | 'onRequest'\n      | 'onSseError'\n      | 'onSseEvent'\n      | 'sseDefaultRetryDelay'\n      | 'sseMaxRetryAttempts'\n      | 'sseMaxRetryDelay'\n    > {\n  /**\n   * Any body that you want to add to your request.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/fetch#body}\n   */\n  body?: unknown;\n  path?: Record<string, unknown>;\n  query?: Record<string, unknown>;\n  /**\n   * Security mechanism(s) to use for the request.\n   */\n  security?: ReadonlyArray<Auth>;\n  url: Url;\n}\n\nexport interface ClientOptions {\n  baseURL?: string;\n  throwOnError?: boolean;\n}\n\nexport type RequestResult<\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = boolean,\n> = ThrowOnError extends true\n  ? Promise<AxiosResponse<TData extends Record<string, unknown> ? TData[keyof TData] : TData>>\n  : Promise<\n      | (AxiosResponse<TData extends Record<string, unknown> ? TData[keyof TData] : TData> & {\n          error: undefined;\n        })\n      | (AxiosError<TError extends Record<string, unknown> ? TError[keyof TError] : TError> & {\n          data: undefined;\n          error: TError extends Record<string, unknown> ? TError[keyof TError] : TError;\n        })\n    >;\n\ntype MethodFn = <TData = unknown, TError = unknown, ThrowOnError extends boolean = false>(\n  options: Omit<RequestOptions<TData, ThrowOnError>, 'method'>,\n) => RequestResult<TData, TError, ThrowOnError>;\n\ntype SseFn = <TData = unknown, TError = unknown, ThrowOnError extends boolean = false>(\n  options: Omit<RequestOptions<TData, ThrowOnError>, 'method'>,\n) => Promise<ServerSentEventsResult<TData, TError>>;\n\ntype RequestFn = <TData = unknown, TError = unknown, ThrowOnError extends boolean = false>(\n  options: Omit<RequestOptions<TData, ThrowOnError>, 'method'> &\n    Pick<Required<RequestOptions<TData, ThrowOnError>>, 'method'>,\n) => RequestResult<TData, TError, ThrowOnError>;\n\ntype BuildUrlFn = <\n  TData extends {\n    body?: unknown;\n    path?: Record<string, unknown>;\n    query?: Record<string, unknown>;\n    url: string;\n  },\n>(\n  options: TData & Options<TData>,\n) => string;\n\nexport type Client = CoreClient<RequestFn, Config, MethodFn, BuildUrlFn, SseFn> & {\n  instance: AxiosInstance;\n};\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 = ClientOptions> = (\n  override?: Config<ClientOptions & T>,\n) => Config<Required<ClientOptions> & T>;\n\nexport interface TDataShape {\n  body?: unknown;\n  headers?: unknown;\n  path?: unknown;\n  query?: unknown;\n  url: string;\n}\n\ntype OmitKeys<T, K> = Pick<T, Exclude<keyof T, K>>;\n\nexport type Options<\n  TData extends TDataShape = TDataShape,\n  ThrowOnError extends boolean = boolean,\n  TResponse = unknown,\n> = OmitKeys<RequestOptions<TResponse, ThrowOnError>, 'body' | 'path' | 'query' | 'url'> &\n  ([TData] extends [never] ? unknown : Omit<TData, 'url'>);\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/vue-query/axios/client/utils.gen.ts",
    "content": "// 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 {\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\nconst checkForExistence = (\n  options: Pick<RequestOptions, 'auth' | 'query'> & {\n    headers: Record<any, unknown>;\n  },\n  name?: string,\n): boolean => {\n  if (!name) {\n    return false;\n  }\n  if (name in options.headers || options.query?.[name]) {\n    return true;\n  }\n  if (\n    'Cookie' in options.headers &&\n    options.headers['Cookie'] &&\n    typeof options.headers['Cookie'] === 'string'\n  ) {\n    return options.headers['Cookie'].includes(`${name}=`);\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: Record<any, unknown>;\n  }) => {\n  for (const auth of security) {\n    if (checkForExistence(options, auth.name)) {\n      continue;\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        const value = `${name}=${token}`;\n        if ('Cookie' in options.headers && options.headers['Cookie']) {\n          options.headers['Cookie'] = `${options.headers['Cookie']}; ${value}`;\n        } else {\n          options.headers['Cookie'] = value;\n        }\n        break;\n      }\n      case 'header':\n      default:\n        options.headers[name] = token;\n        break;\n    }\n  }\n};\n\nexport const buildUrl: Client['buildUrl'] = (options) => {\n  const instanceBaseUrl = options.axios?.defaults?.baseURL;\n\n  const baseUrl =\n    !!options.baseURL && typeof options.baseURL === 'string' ? options.baseURL : instanceBaseUrl;\n\n  return getUrl({\n    baseUrl: baseUrl as string,\n    path: options.path,\n    // let `paramsSerializer()` handle query params if it exists\n    query: !options.paramsSerializer ? options.query : undefined,\n    querySerializer:\n      typeof options.querySerializer === 'function'\n        ? options.querySerializer\n        : createQuerySerializer(options.querySerializer),\n    url: options.url,\n  });\n};\n\nexport const mergeConfigs = (a: Config, b: Config): Config => {\n  const config = { ...a, ...b };\n  config.headers = mergeHeaders(a.headers, b.headers);\n  return config;\n};\n\n/**\n * Special Axios headers keywords allowing to set headers by request method.\n */\nexport const axiosHeadersKeywords = [\n  'common',\n  'delete',\n  'get',\n  'head',\n  'patch',\n  'post',\n  'put',\n] as const;\n\nexport const mergeHeaders = (\n  ...headers: Array<Required<Config>['headers'] | undefined>\n): Record<any, unknown> => {\n  const mergedHeaders: Record<any, unknown> = {};\n  for (const header of headers) {\n    if (!header || typeof header !== 'object') {\n      continue;\n    }\n\n    const iterator = Object.entries(header);\n\n    for (const [key, value] of iterator) {\n      if (\n        axiosHeadersKeywords.includes(key as (typeof axiosHeadersKeywords)[number]) &&\n        typeof value === 'object'\n      ) {\n        mergedHeaders[key] = {\n          ...(mergedHeaders[key] as Record<any, unknown>),\n          ...value,\n        };\n      } else if (value === null) {\n        delete mergedHeaders[key];\n      } else if (Array.isArray(value)) {\n        for (const v of value) {\n          // @ts-expect-error\n          mergedHeaders[key] = [...(mergedHeaders[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[key] = typeof value === 'object' ? JSON.stringify(value) : (value as string);\n      }\n    }\n  }\n  return mergedHeaders;\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  ...override,\n});\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/vue-query/axios/client.gen.ts",
    "content": "// 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: 'http://localhost:3000/base' }));\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/vue-query/axios/core/auth.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/vue-query/axios/core/bodySerializer.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/vue-query/axios/core/params.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/vue-query/axios/core/pathSerializer.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/vue-query/axios/core/queryKeySerializer.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\n/**\n * JSON-friendly union that mirrors what Pinia Colada can hash.\n */\nexport type JsonValue =\n  | null\n  | string\n  | number\n  | boolean\n  | JsonValue[]\n  | { [key: string]: JsonValue };\n\n/**\n * Replacer that converts non-JSON values (bigint, Date, etc.) to safe substitutes.\n */\nexport const queryKeyJsonReplacer = (_key: string, value: unknown) => {\n  if (value === undefined || typeof value === 'function' || typeof value === 'symbol') {\n    return undefined;\n  }\n  if (typeof value === 'bigint') {\n    return value.toString();\n  }\n  if (value instanceof Date) {\n    return value.toISOString();\n  }\n  return value;\n};\n\n/**\n * Safely stringifies a value and parses it back into a JsonValue.\n */\nexport const stringifyToJsonValue = (input: unknown): JsonValue | undefined => {\n  try {\n    const json = JSON.stringify(input, queryKeyJsonReplacer);\n    if (json === undefined) {\n      return undefined;\n    }\n    return JSON.parse(json) as JsonValue;\n  } catch {\n    return undefined;\n  }\n};\n\n/**\n * Detects plain objects (including objects with a null prototype).\n */\nconst isPlainObject = (value: unknown): value is Record<string, unknown> => {\n  if (value === null || typeof value !== 'object') {\n    return false;\n  }\n  const prototype = Object.getPrototypeOf(value as object);\n  return prototype === Object.prototype || prototype === null;\n};\n\n/**\n * Turns URLSearchParams into a sorted JSON object for deterministic keys.\n */\nconst serializeSearchParams = (params: URLSearchParams): JsonValue => {\n  const entries = Array.from(params.entries()).sort(([a], [b]) => a.localeCompare(b));\n  const result: Record<string, JsonValue> = {};\n\n  for (const [key, value] of entries) {\n    const existing = result[key];\n    if (existing === undefined) {\n      result[key] = value;\n      continue;\n    }\n\n    if (Array.isArray(existing)) {\n      (existing as string[]).push(value);\n    } else {\n      result[key] = [existing, value];\n    }\n  }\n\n  return result;\n};\n\n/**\n * Normalizes any accepted value into a JSON-friendly shape for query keys.\n */\nexport const serializeQueryKeyValue = (value: unknown): JsonValue | undefined => {\n  if (value === null) {\n    return null;\n  }\n\n  if (typeof value === 'string' || typeof value === 'number' || typeof value === 'boolean') {\n    return value;\n  }\n\n  if (value === undefined || typeof value === 'function' || typeof value === 'symbol') {\n    return undefined;\n  }\n\n  if (typeof value === 'bigint') {\n    return value.toString();\n  }\n\n  if (value instanceof Date) {\n    return value.toISOString();\n  }\n\n  if (Array.isArray(value)) {\n    return stringifyToJsonValue(value);\n  }\n\n  if (typeof URLSearchParams !== 'undefined' && value instanceof URLSearchParams) {\n    return serializeSearchParams(value);\n  }\n\n  if (isPlainObject(value)) {\n    return stringifyToJsonValue(value);\n  }\n\n  return undefined;\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/vue-query/axios/core/serverSentEvents.gen.ts",
    "content": "// 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 const 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            // Normalize line endings: CRLF -> LF, then CR -> LF\n            buffer = buffer.replace(/\\r\\n/g, '\\n').replace(/\\r/g, '\\n');\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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/vue-query/axios/core/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { Auth, AuthToken } from './auth.gen';\nimport type { BodySerializer, QuerySerializer, QuerySerializerOptions } from './bodySerializer.gen';\n\nexport type HttpMethod =\n  | 'connect'\n  | 'delete'\n  | 'get'\n  | 'head'\n  | 'options'\n  | 'patch'\n  | 'post'\n  | 'put'\n  | 'trace';\n\nexport type Client<\n  RequestFn = never,\n  Config = unknown,\n  MethodFn = never,\n  BuildUrlFn = never,\n  SseFn = never,\n> = {\n  /**\n   * Returns the final request URL.\n   */\n  buildUrl: BuildUrlFn;\n  getConfig: () => Config;\n  request: RequestFn;\n  setConfig: (config: Config) => Config;\n} & {\n  [K in HttpMethod]: MethodFn;\n} & ([SseFn] extends [never] ? { sse?: never } : { sse: { [K in HttpMethod]: SseFn } });\n\nexport interface Config {\n  /**\n   * Auth token or a function returning auth token. The resolved value will be\n   * added to the request payload as defined by its `security` array.\n   */\n  auth?: ((auth: Auth) => Promise<AuthToken> | AuthToken) | AuthToken;\n  /**\n   * A function for serializing request body parameter. By default,\n   * {@link JSON.stringify()} will be used.\n   */\n  bodySerializer?: BodySerializer | null;\n  /**\n   * An object containing any HTTP headers that you want to pre-populate your\n   * `Headers` object with.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/Headers/Headers#init See more}\n   */\n  headers?:\n    | RequestInit['headers']\n    | Record<\n        string,\n        string | number | boolean | (string | number | boolean)[] | null | undefined | unknown\n      >;\n  /**\n   * The request method.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/fetch#method See more}\n   */\n  method?: Uppercase<HttpMethod>;\n  /**\n   * A function for serializing request query parameters. By default, arrays\n   * will be exploded in form style, objects will be exploded in deepObject\n   * style, and reserved characters are percent-encoded.\n   *\n   * This method will have no effect if the native `paramsSerializer()` Axios\n   * API function is used.\n   *\n   * {@link https://swagger.io/docs/specification/serialization/#query View examples}\n   */\n  querySerializer?: QuerySerializer | QuerySerializerOptions;\n  /**\n   * A function validating request data. This is useful if you want to ensure\n   * the request conforms to the desired shape, so it can be safely sent to\n   * the server.\n   */\n  requestValidator?: (data: unknown) => Promise<unknown>;\n  /**\n   * A function transforming response data before it's returned. This is useful\n   * for post-processing data, e.g. converting ISO strings into Date objects.\n   */\n  responseTransformer?: (data: unknown) => Promise<unknown>;\n  /**\n   * A function validating response data. This is useful if you want to ensure\n   * the response conforms to the desired shape, so it can be safely passed to\n   * the transformers and returned to the user.\n   */\n  responseValidator?: (data: unknown) => Promise<unknown>;\n}\n\ntype IsExactlyNeverOrNeverUndefined<T> = [T] extends [never]\n  ? true\n  : [T] extends [never | undefined]\n    ? [undefined] extends [T]\n      ? false\n      : true\n    : false;\n\nexport type OmitNever<T extends Record<string, unknown>> = {\n  [K in keyof T as IsExactlyNeverOrNeverUndefined<T[K]> extends true ? never : K]: T[K];\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/vue-query/axios/core/utils.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/vue-query/axios/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport { apiVVersionODataControllerCount, callToTestOrderOfParams, callWithDefaultOptionalParameters, callWithDefaultParameters, callWithDescriptions, callWithDuplicateResponses, callWithNoContentResponse, callWithParameters, callWithResponse, callWithResponseAndNoContentResponse, callWithResponses, callWithResultFromHeader, callWithWeirdParameterNames, collectionFormat, complexParams, complexTypes, deleteCallWithoutParametersAndResponse, deleteFoo, deprecatedCall, dummyA, dummyB, duplicateName, duplicateName2, duplicateName3, duplicateName4, export_, fileResponse, fooWow, getApiVbyApiVersionSimpleOperation, getCallWithOptionalParam, getCallWithoutParametersAndResponse, headCallWithoutParametersAndResponse, import_, multipartRequest, multipartResponse, nonAsciiæøåÆøÅöôêÊ字符串, type Options, optionsCallWithoutParametersAndResponse, patchApiVbyApiVersionNoTag, patchCallWithoutParametersAndResponse, postApiVbyApiVersionFormData, postApiVbyApiVersionRequestBody, postCallWithOptionalParam, postCallWithoutParametersAndResponse, putCallWithoutParametersAndResponse, putWithFormUrlEncoded, testErrorCode, types, uploadFile } from './sdk.gen';\nexport type { _3eNum1Период, _400, AdditionalPropertiesIntegerIssue, AdditionalPropertiesUnknownIssue, AdditionalPropertiesUnknownIssue2, AdditionalPropertiesUnknownIssue3, AdditionalPropertiesUnknownIssueWritable, AnyOfAnyAndNull, AnyOfArrays, ApiVVersionODataControllerCountData, ApiVVersionODataControllerCountResponse, ApiVVersionODataControllerCountResponses, ArrayWithAnyOfProperties, ArrayWithArray, ArrayWithBooleans, ArrayWithNumbers, ArrayWithProperties, ArrayWithReferences, ArrayWithStrings, CallToTestOrderOfParamsData, CallWithDefaultOptionalParametersData, CallWithDefaultParametersData, CallWithDescriptionsData, CallWithDuplicateResponsesData, CallWithDuplicateResponsesError, CallWithDuplicateResponsesErrors, CallWithDuplicateResponsesResponse, CallWithDuplicateResponsesResponses, CallWithNoContentResponseData, CallWithNoContentResponseResponse, CallWithNoContentResponseResponses, CallWithParametersData, CallWithResponseAndNoContentResponseData, CallWithResponseAndNoContentResponseResponse, CallWithResponseAndNoContentResponseResponses, CallWithResponseData, CallWithResponseResponse, CallWithResponseResponses, CallWithResponsesData, CallWithResponsesError, CallWithResponsesErrors, CallWithResponsesResponse, CallWithResponsesResponses, CallWithResultFromHeaderData, CallWithResultFromHeaderErrors, CallWithResultFromHeaderResponses, CallWithWeirdParameterNamesData, CamelCaseCommentWithBreaks, CharactersInDescription, ClientOptions, CollectionFormatData, CommentWithBackticks, CommentWithBackticksAndQuotes, CommentWithBreaks, CommentWithExpressionPlaceholders, CommentWithQuotes, CommentWithReservedCharacters, CommentWithSlashes, ComplexParamsData, ComplexParamsResponse, ComplexParamsResponses, ComplexTypesData, ComplexTypesErrors, ComplexTypesResponse, ComplexTypesResponses, CompositionBaseModel, CompositionExtendedModel, CompositionWithAllOfAndNullable, CompositionWithAnyOf, CompositionWithAnyOfAndNullable, CompositionWithAnyOfAnonymous, CompositionWithNestedAnyAndTypeNull, CompositionWithNestedAnyOfAndNull, CompositionWithOneOf, CompositionWithOneOfAndComplexArrayDictionary, CompositionWithOneOfAndNullable, CompositionWithOneOfAndProperties, CompositionWithOneOfAndSimpleArrayDictionary, CompositionWithOneOfAndSimpleDictionary, CompositionWithOneOfAnonymous, CompositionWithOneOfDiscriminator, ConstValue, Default, DeleteCallWithoutParametersAndResponseData, DeleteFooData, DeleteFooData2, DeleteFooData3, DeprecatedCallData, DeprecatedModel, DictionaryWithArray, DictionaryWithDictionary, DictionaryWithProperties, DictionaryWithPropertiesAndAdditionalProperties, DictionaryWithReference, DictionaryWithString, DummyAData, DummyAResponse, DummyAResponses, DummyBData, DummyBResponse, DummyBResponses, DuplicateName2Data, DuplicateName3Data, DuplicateName4Data, DuplicateNameData, EnumFromDescription, EnumWithExtensions, EnumWithNumbers, EnumWithReplacedCharacters, EnumWithStrings, EnumWithXEnumNames, ExportData, ExternalRefA, ExternalRefB, ExternalSharedModel, File, FileResponseData, FileResponseResponse, FileResponseResponses, FileWritable, FooWowData, FooWowResponses, FreeFormObjectWithAdditionalPropertiesEqEmptyObject, FreeFormObjectWithAdditionalPropertiesEqTrue, FreeFormObjectWithoutAdditionalProperties, GenericSchemaDuplicateIssue1SystemBoolean, GenericSchemaDuplicateIssue1SystemBooleanWritable, GenericSchemaDuplicateIssue1SystemString, GenericSchemaDuplicateIssue1SystemStringWritable, GetApiVbyApiVersionSimpleOperationData, GetApiVbyApiVersionSimpleOperationError, GetApiVbyApiVersionSimpleOperationErrors, GetApiVbyApiVersionSimpleOperationResponse, GetApiVbyApiVersionSimpleOperationResponses, GetCallWithOptionalParamData, GetCallWithoutParametersAndResponseData, HeadCallWithoutParametersAndResponseData, Import, ImportData, ImportResponse, ImportResponses, IoK8sApimachineryPkgApisMetaV1DeleteOptions, IoK8sApimachineryPkgApisMetaV1Preconditions, ModelCircle, ModelFromZendesk, ModelSquare, ModelThatExtends, ModelThatExtendsExtends, ModelWithAdditionalPropertiesEqTrue, ModelWithAdditionalPropertiesRef, ModelWithAnyOfConstantSizeArray, ModelWithAnyOfConstantSizeArrayAndIntersect, ModelWithAnyOfConstantSizeArrayNullable, ModelWithAnyOfConstantSizeArrayWithNSizeAndOptions, ModelWithAnyOfConstantSizeArrayWithNSizeAndOptionsWritable, ModelWithArray, ModelWithArrayReadOnlyAndWriteOnly, ModelWithArrayReadOnlyAndWriteOnlyWritable, ModelWithBackticksInDescription, ModelWithBoolean, ModelWithCircularReference, ModelWithConst, ModelWithConstantSizeArray, ModelWithDictionary, ModelWithDuplicateImports, ModelWithDuplicateProperties, ModelWithEnum, ModelWithEnumFromDescription, ModelWithEnumWithHyphen, ModelWithInteger, ModelWithNestedArrayEnums, ModelWithNestedArrayEnumsData, ModelWithNestedArrayEnumsDataBar, ModelWithNestedArrayEnumsDataFoo, ModelWithNestedCompositionEnums, ModelWithNestedEnums, ModelWithNestedProperties, ModelWithNullableObject, ModelWithNullableString, ModelWithNumericEnumUnion, ModelWithOneOfAndProperties, ModelWithOneOfEnum, ModelWithOrderedProperties, ModelWithPattern, ModelWithPatternWritable, ModelWithPrefixItemsConstantSizeArray, ModelWithProperties, ModelWithPropertiesWritable, ModelWithReadOnlyAndWriteOnly, ModelWithReadOnlyAndWriteOnlyWritable, ModelWithReference, ModelWithReferenceWritable, ModelWithString, ModelWithStringError, MultipartRequestData, MultipartResponseData, MultipartResponseResponse, MultipartResponseResponses, NestedAnyOfArraysNullable, NonAsciiæøåÆøÅöôêÊ字符串Data, NonAsciiæøåÆøÅöôêÊ字符串Response, NonAsciiæøåÆøÅöôêÊ字符串Responses, NonAsciiStringæøåÆøÅöôêÊ字符串, NullableObject, OneOfAllOfIssue, OneOfAllOfIssueWritable, OptionsCallWithoutParametersAndResponseData, Pageable, ParameterSimpleParameterUnused, PatchApiVbyApiVersionNoTagData, PatchApiVbyApiVersionNoTagResponses, PatchCallWithoutParametersAndResponseData, PostApiVbyApiVersionFormDataData, PostApiVbyApiVersionRequestBodyData, PostCallWithOptionalParamData, PostCallWithOptionalParamResponse, PostCallWithOptionalParamResponses, PostCallWithoutParametersAndResponseData, PostServiceWithEmptyTagResponse, PostServiceWithEmptyTagResponse2, PutCallWithoutParametersAndResponseData, PutWithFormUrlEncodedData, SchemaWithFormRestrictedKeys, SimpleBoolean, SimpleFile, SimpleFormData, SimpleInteger, SimpleParameter, SimpleReference, SimpleRequestBody, SimpleString, SimpleStringWithPattern, TestErrorCodeData, TestErrorCodeErrors, TestErrorCodeResponses, TypesData, TypesResponse, TypesResponses, UploadFileData, UploadFileResponse, UploadFileResponses, XFooBar } from './types.gen';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/vue-query/axios/sdk.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport { type Client, formDataBodySerializer, type Options as Options2, type TDataShape, urlSearchParamsBodySerializer } from './client';\nimport { client } from './client.gen';\nimport type { ApiVVersionODataControllerCountData, ApiVVersionODataControllerCountResponses, CallToTestOrderOfParamsData, CallWithDefaultOptionalParametersData, CallWithDefaultParametersData, CallWithDescriptionsData, CallWithDuplicateResponsesData, CallWithDuplicateResponsesErrors, CallWithDuplicateResponsesResponses, CallWithNoContentResponseData, CallWithNoContentResponseResponses, CallWithParametersData, CallWithResponseAndNoContentResponseData, CallWithResponseAndNoContentResponseResponses, CallWithResponseData, CallWithResponseResponses, CallWithResponsesData, CallWithResponsesErrors, CallWithResponsesResponses, CallWithResultFromHeaderData, CallWithResultFromHeaderErrors, CallWithResultFromHeaderResponses, CallWithWeirdParameterNamesData, CollectionFormatData, ComplexParamsData, ComplexParamsResponses, ComplexTypesData, ComplexTypesErrors, ComplexTypesResponses, DeleteCallWithoutParametersAndResponseData, DeleteFooData3, DeprecatedCallData, DummyAData, DummyAResponses, DummyBData, DummyBResponses, DuplicateName2Data, DuplicateName3Data, DuplicateName4Data, DuplicateNameData, ExportData, FileResponseData, FileResponseResponses, FooWowData, FooWowResponses, GetApiVbyApiVersionSimpleOperationData, GetApiVbyApiVersionSimpleOperationErrors, GetApiVbyApiVersionSimpleOperationResponses, GetCallWithOptionalParamData, GetCallWithoutParametersAndResponseData, HeadCallWithoutParametersAndResponseData, ImportData, ImportResponses, MultipartRequestData, MultipartResponseData, MultipartResponseResponses, NonAsciiæøåÆøÅöôêÊ字符串Data, NonAsciiæøåÆøÅöôêÊ字符串Responses, OptionsCallWithoutParametersAndResponseData, PatchApiVbyApiVersionNoTagData, PatchApiVbyApiVersionNoTagResponses, PatchCallWithoutParametersAndResponseData, PostApiVbyApiVersionFormDataData, PostApiVbyApiVersionRequestBodyData, PostCallWithOptionalParamData, PostCallWithOptionalParamResponses, PostCallWithoutParametersAndResponseData, PutCallWithoutParametersAndResponseData, PutWithFormUrlEncodedData, TestErrorCodeData, TestErrorCodeErrors, TestErrorCodeResponses, TypesData, TypesResponses, UploadFileData, UploadFileResponses } from './types.gen';\n\nexport type Options<TData extends TDataShape = TDataShape, ThrowOnError extends boolean = boolean> = Options2<TData, ThrowOnError> & {\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\nexport const export_ = <ThrowOnError extends boolean = false>(options?: Options<ExportData, ThrowOnError>) => (options?.client ?? client).get<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/no+tag', ...options });\n\nexport const patchApiVbyApiVersionNoTag = <ThrowOnError extends boolean = false>(options?: Options<PatchApiVbyApiVersionNoTagData, ThrowOnError>) => (options?.client ?? client).patch<PatchApiVbyApiVersionNoTagResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/no+tag', ...options });\n\nexport const import_ = <ThrowOnError extends boolean = false>(options: Options<ImportData, ThrowOnError>) => (options.client ?? client).post<ImportResponses, unknown, ThrowOnError>({\n    responseType: 'json',\n    url: '/api/v{api-version}/no+tag',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options.headers\n    }\n});\n\nexport const fooWow = <ThrowOnError extends boolean = false>(options?: Options<FooWowData, ThrowOnError>) => (options?.client ?? client).put<FooWowResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/no+tag', ...options });\n\nexport const apiVVersionODataControllerCount = <ThrowOnError extends boolean = false>(options?: Options<ApiVVersionODataControllerCountData, ThrowOnError>) => (options?.client ?? client).get<ApiVVersionODataControllerCountResponses, unknown, ThrowOnError>({\n    responseType: 'json',\n    url: '/api/v{api-version}/simple/$count',\n    ...options\n});\n\nexport const getApiVbyApiVersionSimpleOperation = <ThrowOnError extends boolean = false>(options: Options<GetApiVbyApiVersionSimpleOperationData, ThrowOnError>) => (options.client ?? client).get<GetApiVbyApiVersionSimpleOperationResponses, GetApiVbyApiVersionSimpleOperationErrors, ThrowOnError>({\n    responseType: 'json',\n    url: '/api/v{api-version}/simple:operation',\n    ...options\n});\n\nexport const deleteCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<DeleteCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).delete<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const getCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<GetCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).get<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const headCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<HeadCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).head<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const optionsCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<OptionsCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).options<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const patchCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<PatchCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).patch<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const postCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<PostCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).post<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const putCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<PutCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).put<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const deleteFoo = <ThrowOnError extends boolean = false>(options: Options<DeleteFooData3, ThrowOnError>) => (options.client ?? client).delete<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/foo/{foo_param}/bar/{BarParam}', ...options });\n\nexport const callWithDescriptions = <ThrowOnError extends boolean = false>(options?: Options<CallWithDescriptionsData, ThrowOnError>) => (options?.client ?? client).post<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/descriptions', ...options });\n\n/**\n * @deprecated\n */\nexport const deprecatedCall = <ThrowOnError extends boolean = false>(options: Options<DeprecatedCallData, ThrowOnError>) => (options.client ?? client).post<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/parameters/deprecated', ...options });\n\nexport const callWithParameters = <ThrowOnError extends boolean = false>(options: Options<CallWithParametersData, ThrowOnError>) => (options.client ?? client).post<unknown, unknown, ThrowOnError>({\n    url: '/api/v{api-version}/parameters/{parameterPath}',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options.headers\n    }\n});\n\nexport const callWithWeirdParameterNames = <ThrowOnError extends boolean = false>(options: Options<CallWithWeirdParameterNamesData, ThrowOnError>) => (options.client ?? client).post<unknown, unknown, ThrowOnError>({\n    url: '/api/v{api-version}/parameters/{parameter.path.1}/{parameter-path-2}/{PARAMETER-PATH-3}',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options.headers\n    }\n});\n\nexport const getCallWithOptionalParam = <ThrowOnError extends boolean = false>(options: Options<GetCallWithOptionalParamData, ThrowOnError>) => (options.client ?? client).get<unknown, unknown, ThrowOnError>({\n    url: '/api/v{api-version}/parameters',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options.headers\n    }\n});\n\nexport const postCallWithOptionalParam = <ThrowOnError extends boolean = false>(options: Options<PostCallWithOptionalParamData, ThrowOnError>) => (options.client ?? client).post<PostCallWithOptionalParamResponses, unknown, ThrowOnError>({\n    responseType: 'json',\n    url: '/api/v{api-version}/parameters',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options.headers\n    }\n});\n\nexport const postApiVbyApiVersionRequestBody = <ThrowOnError extends boolean = false>(options?: Options<PostApiVbyApiVersionRequestBodyData, ThrowOnError>) => (options?.client ?? client).post<unknown, unknown, ThrowOnError>({\n    url: '/api/v{api-version}/requestBody',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options?.headers\n    }\n});\n\nexport const postApiVbyApiVersionFormData = <ThrowOnError extends boolean = false>(options?: Options<PostApiVbyApiVersionFormDataData, ThrowOnError>) => (options?.client ?? client).post<unknown, unknown, ThrowOnError>({\n    ...formDataBodySerializer,\n    url: '/api/v{api-version}/formData',\n    ...options,\n    headers: {\n        'Content-Type': null,\n        ...options?.headers\n    }\n});\n\nexport const callWithDefaultParameters = <ThrowOnError extends boolean = false>(options?: Options<CallWithDefaultParametersData, ThrowOnError>) => (options?.client ?? client).get<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/defaults', ...options });\n\nexport const callWithDefaultOptionalParameters = <ThrowOnError extends boolean = false>(options?: Options<CallWithDefaultOptionalParametersData, ThrowOnError>) => (options?.client ?? client).post<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/defaults', ...options });\n\nexport const callToTestOrderOfParams = <ThrowOnError extends boolean = false>(options: Options<CallToTestOrderOfParamsData, ThrowOnError>) => (options.client ?? client).put<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/defaults', ...options });\n\nexport const duplicateName = <ThrowOnError extends boolean = false>(options?: Options<DuplicateNameData, ThrowOnError>) => (options?.client ?? client).delete<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/duplicate', ...options });\n\nexport const duplicateName2 = <ThrowOnError extends boolean = false>(options?: Options<DuplicateName2Data, ThrowOnError>) => (options?.client ?? client).get<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/duplicate', ...options });\n\nexport const duplicateName3 = <ThrowOnError extends boolean = false>(options?: Options<DuplicateName3Data, ThrowOnError>) => (options?.client ?? client).post<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/duplicate', ...options });\n\nexport const duplicateName4 = <ThrowOnError extends boolean = false>(options?: Options<DuplicateName4Data, ThrowOnError>) => (options?.client ?? client).put<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/duplicate', ...options });\n\nexport const callWithNoContentResponse = <ThrowOnError extends boolean = false>(options?: Options<CallWithNoContentResponseData, ThrowOnError>) => (options?.client ?? client).get<CallWithNoContentResponseResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/no-content', ...options });\n\nexport const callWithResponseAndNoContentResponse = <ThrowOnError extends boolean = false>(options?: Options<CallWithResponseAndNoContentResponseData, ThrowOnError>) => (options?.client ?? client).get<CallWithResponseAndNoContentResponseResponses, unknown, ThrowOnError>({\n    responseType: 'json',\n    url: '/api/v{api-version}/multiple-tags/response-and-no-content',\n    ...options\n});\n\nexport const dummyA = <ThrowOnError extends boolean = false>(options?: Options<DummyAData, ThrowOnError>) => (options?.client ?? client).get<DummyAResponses, unknown, ThrowOnError>({\n    responseType: 'json',\n    url: '/api/v{api-version}/multiple-tags/a',\n    ...options\n});\n\nexport const dummyB = <ThrowOnError extends boolean = false>(options?: Options<DummyBData, ThrowOnError>) => (options?.client ?? client).get<DummyBResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/multiple-tags/b', ...options });\n\nexport const callWithResponse = <ThrowOnError extends boolean = false>(options?: Options<CallWithResponseData, ThrowOnError>) => (options?.client ?? client).get<CallWithResponseResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/response', ...options });\n\nexport const callWithDuplicateResponses = <ThrowOnError extends boolean = false>(options?: Options<CallWithDuplicateResponsesData, ThrowOnError>) => (options?.client ?? client).post<CallWithDuplicateResponsesResponses, CallWithDuplicateResponsesErrors, ThrowOnError>({\n    responseType: 'json',\n    url: '/api/v{api-version}/response',\n    ...options\n});\n\nexport const callWithResponses = <ThrowOnError extends boolean = false>(options?: Options<CallWithResponsesData, ThrowOnError>) => (options?.client ?? client).put<CallWithResponsesResponses, CallWithResponsesErrors, ThrowOnError>({\n    responseType: 'json',\n    url: '/api/v{api-version}/response',\n    ...options\n});\n\nexport const collectionFormat = <ThrowOnError extends boolean = false>(options: Options<CollectionFormatData, ThrowOnError>) => (options.client ?? client).get<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/collectionFormat', ...options });\n\nexport const types = <ThrowOnError extends boolean = false>(options: Options<TypesData, ThrowOnError>) => (options.client ?? client).get<TypesResponses, unknown, ThrowOnError>({\n    responseType: 'json',\n    url: '/api/v{api-version}/types',\n    ...options\n});\n\nexport const uploadFile = <ThrowOnError extends boolean = false>(options: Options<UploadFileData, ThrowOnError>) => (options.client ?? client).post<UploadFileResponses, unknown, ThrowOnError>({\n    ...urlSearchParamsBodySerializer,\n    responseType: 'json',\n    url: '/api/v{api-version}/upload',\n    ...options,\n    headers: {\n        'Content-Type': 'application/x-www-form-urlencoded',\n        ...options.headers\n    }\n});\n\nexport const fileResponse = <ThrowOnError extends boolean = false>(options: Options<FileResponseData, ThrowOnError>) => (options.client ?? client).get<FileResponseResponses, unknown, ThrowOnError>({\n    responseType: 'blob',\n    url: '/api/v{api-version}/file/{id}',\n    ...options\n});\n\nexport const complexTypes = <ThrowOnError extends boolean = false>(options: Options<ComplexTypesData, ThrowOnError>) => (options.client ?? client).get<ComplexTypesResponses, ComplexTypesErrors, ThrowOnError>({\n    querySerializer: { parameters: { parameterObject: { object: { style: 'form' } } } },\n    responseType: 'json',\n    url: '/api/v{api-version}/complex',\n    ...options\n});\n\nexport const multipartResponse = <ThrowOnError extends boolean = false>(options?: Options<MultipartResponseData, ThrowOnError>) => (options?.client ?? client).get<MultipartResponseResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/multipart', ...options });\n\nexport const multipartRequest = <ThrowOnError extends boolean = false>(options?: Options<MultipartRequestData, ThrowOnError>) => (options?.client ?? client).post<unknown, unknown, ThrowOnError>({\n    ...formDataBodySerializer,\n    url: '/api/v{api-version}/multipart',\n    ...options,\n    headers: {\n        'Content-Type': null,\n        ...options?.headers\n    }\n});\n\nexport const complexParams = <ThrowOnError extends boolean = false>(options: Options<ComplexParamsData, ThrowOnError>) => (options.client ?? client).put<ComplexParamsResponses, unknown, ThrowOnError>({\n    responseType: 'json',\n    url: '/api/v{api-version}/complex/{id}',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json-patch+json',\n        ...options.headers\n    }\n});\n\nexport const callWithResultFromHeader = <ThrowOnError extends boolean = false>(options?: Options<CallWithResultFromHeaderData, ThrowOnError>) => (options?.client ?? client).post<CallWithResultFromHeaderResponses, CallWithResultFromHeaderErrors, ThrowOnError>({ url: '/api/v{api-version}/header', ...options });\n\nexport const testErrorCode = <ThrowOnError extends boolean = false>(options: Options<TestErrorCodeData, ThrowOnError>) => (options.client ?? client).post<TestErrorCodeResponses, TestErrorCodeErrors, ThrowOnError>({ url: '/api/v{api-version}/error', ...options });\n\nexport const nonAsciiæøåÆøÅöôêÊ字符串 = <ThrowOnError extends boolean = false>(options: Options<NonAsciiæøåÆøÅöôêÊ字符串Data, ThrowOnError>) => (options.client ?? client).post<NonAsciiæøåÆøÅöôêÊ字符串Responses, unknown, ThrowOnError>({\n    responseType: 'json',\n    url: '/api/v{api-version}/non-ascii-æøåÆØÅöôêÊ字符串',\n    ...options\n});\n\n/**\n * Login User\n */\nexport const putWithFormUrlEncoded = <ThrowOnError extends boolean = false>(options: Options<PutWithFormUrlEncodedData, ThrowOnError>) => (options.client ?? client).put<unknown, unknown, ThrowOnError>({\n    ...urlSearchParamsBodySerializer,\n    url: '/api/v{api-version}/non-ascii-æøåÆØÅöôêÊ字符串',\n    ...options,\n    headers: {\n        'Content-Type': 'application/x-www-form-urlencoded',\n        ...options.headers\n    }\n});\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/vue-query/axios/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type ClientOptions = {\n    baseURL: 'http://localhost:3000/base' | (string & {});\n};\n\n/**\n * Model with number-only name\n */\nexport type _400 = string;\n\nexport type ExternalRefA = ExternalSharedModel;\n\nexport type ExternalRefB = ExternalSharedModel;\n\n/**\n * Testing multiline comments in string: First line\n * Second line\n *\n * Fourth line\n */\nexport type CamelCaseCommentWithBreaks = number;\n\n/**\n * Testing multiline comments in string: First line\n * Second line\n *\n * Fourth line\n */\nexport type CommentWithBreaks = number;\n\n/**\n * Testing backticks in string: `backticks` and ```multiple backticks``` should work\n */\nexport type CommentWithBackticks = number;\n\n/**\n * Testing backticks and quotes in string: `backticks`, 'quotes', \"double quotes\" and ```multiple backticks``` should work\n */\nexport type CommentWithBackticksAndQuotes = number;\n\n/**\n * Testing slashes in string: \\backwards\\\\\\ and /forwards/// should work\n */\nexport type CommentWithSlashes = number;\n\n/**\n * Testing expression placeholders in string: ${expression} should work\n */\nexport type CommentWithExpressionPlaceholders = number;\n\n/**\n * Testing quotes in string: 'single quote''' and \"double quotes\"\"\" should work\n */\nexport type CommentWithQuotes = number;\n\n/**\n * Testing reserved characters in string: * inline * and ** inline ** should work\n */\nexport type CommentWithReservedCharacters = number;\n\n/**\n * This is a simple number\n */\nexport type SimpleInteger = number;\n\n/**\n * This is a simple boolean\n */\nexport type SimpleBoolean = boolean;\n\n/**\n * This is a simple string\n */\nexport type SimpleString = string;\n\n/**\n * A string with non-ascii (unicode) characters valid in typescript identifiers (æøåÆØÅöÔèÈ字符串)\n */\nexport type NonAsciiStringæøåÆøÅöôêÊ字符串 = string;\n\n/**\n * This is a simple file\n */\nexport type SimpleFile = Blob | File;\n\n/**\n * This is a simple reference\n */\nexport type SimpleReference = ModelWithString;\n\n/**\n * This is a simple string\n */\nexport type SimpleStringWithPattern = string | null;\n\n/**\n * This is a simple enum with strings\n */\nexport type EnumWithStrings = 'Success' | 'Warning' | 'Error' | '\\'Single Quote\\'' | '\"Double Quotes\"' | 'Non-ascii: øæåôöØÆÅÔÖ字符串';\n\nexport type EnumWithReplacedCharacters = '\\'Single Quote\\'' | '\"Double Quotes\"' | 'øæåôöØÆÅÔÖ字符串' | 3.1 | '';\n\n/**\n * This is a simple enum with numbers\n */\nexport type EnumWithNumbers = 1 | 2 | 3 | 1.1 | 1.2 | 1.3 | 100 | 200 | 300 | -100 | -200 | -300 | -1.1 | -1.2 | -1.3;\n\n/**\n * Success=1,Warning=2,Error=3\n */\nexport type EnumFromDescription = number;\n\n/**\n * This is a simple enum with numbers\n */\nexport type EnumWithExtensions = 200 | 400 | 500;\n\nexport type EnumWithXEnumNames = 0 | 1 | 2;\n\n/**\n * This is a simple array with numbers\n */\nexport type ArrayWithNumbers = Array<number>;\n\n/**\n * This is a simple array with booleans\n */\nexport type ArrayWithBooleans = Array<boolean>;\n\n/**\n * This is a simple array with strings\n */\nexport type ArrayWithStrings = Array<string>;\n\n/**\n * This is a simple array with references\n */\nexport type ArrayWithReferences = Array<ModelWithString>;\n\n/**\n * This is a simple array containing an array\n */\nexport type ArrayWithArray = Array<Array<ModelWithString>>;\n\n/**\n * This is a simple array with properties\n */\nexport type ArrayWithProperties = Array<{\n    '16x16'?: CamelCaseCommentWithBreaks;\n    bar?: string;\n}>;\n\n/**\n * This is a simple array with any of properties\n */\nexport type ArrayWithAnyOfProperties = Array<{\n    foo?: string;\n} | {\n    bar?: string;\n}>;\n\nexport type AnyOfAnyAndNull = {\n    data?: unknown;\n};\n\n/**\n * This is a simple array with any of properties\n */\nexport type AnyOfArrays = {\n    results?: Array<{\n        foo?: string;\n    } | {\n        bar?: string;\n    }>;\n};\n\n/**\n * This is a string dictionary\n */\nexport type DictionaryWithString = {\n    [key: string]: string;\n};\n\nexport type DictionaryWithPropertiesAndAdditionalProperties = {\n    foo?: number;\n    bar?: boolean;\n    [key: string]: string | number | boolean | undefined;\n};\n\n/**\n * This is a string reference\n */\nexport type DictionaryWithReference = {\n    [key: string]: ModelWithString;\n};\n\n/**\n * This is a complex dictionary\n */\nexport type DictionaryWithArray = {\n    [key: string]: Array<ModelWithString>;\n};\n\n/**\n * This is a string dictionary\n */\nexport type DictionaryWithDictionary = {\n    [key: string]: {\n        [key: string]: string;\n    };\n};\n\n/**\n * This is a complex dictionary\n */\nexport type DictionaryWithProperties = {\n    [key: string]: {\n        foo?: string;\n        bar?: string;\n    };\n};\n\n/**\n * This is a model with one number property\n */\nexport type ModelWithInteger = {\n    /**\n     * This is a simple number property\n     */\n    prop?: number;\n};\n\n/**\n * This is a model with one boolean property\n */\nexport type ModelWithBoolean = {\n    /**\n     * This is a simple boolean property\n     */\n    prop?: boolean;\n};\n\n/**\n * This is a model with one string property\n */\nexport type ModelWithString = {\n    /**\n     * This is a simple string property\n     */\n    prop?: string;\n};\n\n/**\n * This is a model with one string property\n */\nexport type ModelWithStringError = {\n    /**\n     * This is a simple string property\n     */\n    prop?: string;\n};\n\n/**\n * `Comment` or `VoiceComment`. The JSON object for adding voice comments to tickets is different. See [Adding voice comments to tickets](/documentation/ticketing/managing-tickets/adding-voice-comments-to-tickets)\n */\nexport type ModelFromZendesk = string;\n\n/**\n * This is a model with one string property\n */\nexport type ModelWithNullableString = {\n    /**\n     * This is a simple string property\n     */\n    nullableProp1?: string | null;\n    /**\n     * This is a simple string property\n     */\n    nullableRequiredProp1: string | null;\n    /**\n     * This is a simple string property\n     */\n    nullableProp2?: string | null;\n    /**\n     * This is a simple string property\n     */\n    nullableRequiredProp2: string | null;\n    /**\n     * This is a simple enum with strings\n     */\n    'foo_bar-enum'?: 'Success' | 'Warning' | 'Error' | 'ØÆÅ字符串';\n};\n\n/**\n * This is a model with one enum\n */\nexport type ModelWithEnum = {\n    /**\n     * This is a simple enum with strings\n     */\n    'foo_bar-enum'?: 'Success' | 'Warning' | 'Error' | 'ØÆÅ字符串';\n    /**\n     * These are the HTTP error code enums\n     */\n    statusCode?: '100' | '200 FOO' | '300 FOO_BAR' | '400 foo-bar' | '500 foo.bar' | '600 foo&bar';\n    /**\n     * Simple boolean enum\n     */\n    bool?: true;\n};\n\n/**\n * This is a model with one enum with escaped name\n */\nexport type ModelWithEnumWithHyphen = {\n    /**\n     * Foo-Bar-Baz-Qux\n     */\n    'foo-bar-baz-qux'?: '3.0';\n};\n\n/**\n * This is a model with one enum\n */\nexport type ModelWithEnumFromDescription = {\n    /**\n     * Success=1,Warning=2,Error=3\n     */\n    test?: number;\n};\n\n/**\n * This is a model with nested enums\n */\nexport type ModelWithNestedEnums = {\n    dictionaryWithEnum?: {\n        [key: string]: 'Success' | 'Warning' | 'Error';\n    };\n    dictionaryWithEnumFromDescription?: {\n        [key: string]: number;\n    };\n    arrayWithEnum?: Array<'Success' | 'Warning' | 'Error'>;\n    arrayWithDescription?: Array<number>;\n    /**\n     * This is a simple enum with strings\n     */\n    'foo_bar-enum'?: 'Success' | 'Warning' | 'Error' | 'ØÆÅ字符串';\n};\n\n/**\n * This is a model with one property containing a reference\n */\nexport type ModelWithReference = {\n    prop?: ModelWithProperties;\n};\n\n/**\n * This is a model with one property containing an array\n */\nexport type ModelWithArrayReadOnlyAndWriteOnly = {\n    prop?: Array<ModelWithReadOnlyAndWriteOnly>;\n    propWithFile?: Array<Blob | File>;\n    propWithNumber?: Array<number>;\n};\n\n/**\n * This is a model with one property containing an array\n */\nexport type ModelWithArray = {\n    prop?: Array<ModelWithString>;\n    propWithFile?: Array<Blob | File>;\n    propWithNumber?: Array<number>;\n};\n\n/**\n * This is a model with one property containing a dictionary\n */\nexport type ModelWithDictionary = {\n    prop?: {\n        [key: string]: string;\n    };\n};\n\n/**\n * This is a deprecated model with a deprecated property\n *\n * @deprecated\n */\nexport type DeprecatedModel = {\n    /**\n     * This is a deprecated property\n     *\n     * @deprecated\n     */\n    prop?: string;\n};\n\n/**\n * This is a model with one property containing a circular reference\n */\nexport type ModelWithCircularReference = {\n    prop?: ModelWithCircularReference;\n};\n\n/**\n * This is a model with one property with a 'one of' relationship\n */\nexport type CompositionWithOneOf = {\n    propA?: ModelWithString | ModelWithEnum | ModelWithArray | ModelWithDictionary;\n};\n\n/**\n * This is a model with one property with a 'one of' relationship where the options are not $ref\n */\nexport type CompositionWithOneOfAnonymous = {\n    propA?: {\n        propA?: string;\n    } | string | number;\n};\n\n/**\n * Circle\n */\nexport type ModelCircle = {\n    kind: string;\n    radius?: number;\n};\n\n/**\n * Square\n */\nexport type ModelSquare = {\n    kind: string;\n    sideLength?: number;\n};\n\n/**\n * This is a model with one property with a 'one of' relationship where the options are not $ref\n */\nexport type CompositionWithOneOfDiscriminator = ({\n    kind: 'circle';\n} & ModelCircle) | ({\n    kind: 'square';\n} & ModelSquare);\n\n/**\n * This is a model with one property with a 'any of' relationship\n */\nexport type CompositionWithAnyOf = {\n    propA?: ModelWithString | ModelWithEnum | ModelWithArray | ModelWithDictionary;\n};\n\n/**\n * This is a model with one property with a 'any of' relationship where the options are not $ref\n */\nexport type CompositionWithAnyOfAnonymous = {\n    propA?: {\n        propA?: string;\n    } | string | number;\n};\n\n/**\n * This is a model with nested 'any of' property with a type null\n */\nexport type CompositionWithNestedAnyAndTypeNull = {\n    propA?: Array<ModelWithDictionary | null> | Array<ModelWithArray | null>;\n};\n\nexport type _3eNum1Период = 'Bird' | 'Dog';\n\nexport type ConstValue = 'ConstValue';\n\n/**\n * This is a model with one property with a 'any of' relationship where the options are not $ref\n */\nexport type CompositionWithNestedAnyOfAndNull = {\n    propA?: Array<_3eNum1Период | ConstValue> | null;\n};\n\n/**\n * This is a model with one property with a 'one of' relationship\n */\nexport type CompositionWithOneOfAndNullable = {\n    propA?: {\n        boolean?: boolean;\n    } | ModelWithEnum | ModelWithArray | ModelWithDictionary | null;\n};\n\n/**\n * This is a model that contains a simple dictionary within composition\n */\nexport type CompositionWithOneOfAndSimpleDictionary = {\n    propA?: boolean | {\n        [key: string]: number;\n    };\n};\n\n/**\n * This is a model that contains a dictionary of simple arrays within composition\n */\nexport type CompositionWithOneOfAndSimpleArrayDictionary = {\n    propA?: boolean | {\n        [key: string]: Array<boolean>;\n    };\n};\n\n/**\n * This is a model that contains a dictionary of complex arrays (composited) within composition\n */\nexport type CompositionWithOneOfAndComplexArrayDictionary = {\n    propA?: boolean | {\n        [key: string]: Array<number | string>;\n    };\n};\n\n/**\n * This is a model with one property with a 'all of' relationship\n */\nexport type CompositionWithAllOfAndNullable = {\n    propA?: ({\n        boolean?: boolean;\n    } & ModelWithEnum & ModelWithArray & ModelWithDictionary) | null;\n};\n\n/**\n * This is a model with one property with a 'any of' relationship\n */\nexport type CompositionWithAnyOfAndNullable = {\n    propA?: {\n        boolean?: boolean;\n    } | ModelWithEnum | ModelWithArray | ModelWithDictionary | null;\n};\n\n/**\n * This is a base model with two simple optional properties\n */\nexport type CompositionBaseModel = {\n    firstName?: string;\n    lastname?: string;\n};\n\n/**\n * This is a model that extends the base model\n */\nexport type CompositionExtendedModel = CompositionBaseModel & {\n    age: number;\n    firstName: string;\n    lastname: string;\n};\n\n/**\n * This is a model with one nested property\n */\nexport type ModelWithProperties = {\n    required: string;\n    readonly requiredAndReadOnly: string;\n    requiredAndNullable: string | null;\n    string?: string;\n    number?: number;\n    boolean?: boolean;\n    reference?: ModelWithString;\n    'property with space'?: string;\n    default?: string;\n    try?: string;\n    readonly '@namespace.string'?: string;\n    readonly '@namespace.integer'?: number;\n};\n\n/**\n * This is a model with one nested property\n */\nexport type ModelWithNestedProperties = {\n    readonly first: {\n        readonly second: {\n            readonly third: string | null;\n        } | null;\n    } | null;\n};\n\n/**\n * This is a model with duplicated properties\n */\nexport type ModelWithDuplicateProperties = {\n    prop?: ModelWithString;\n};\n\n/**\n * This is a model with ordered properties\n */\nexport type ModelWithOrderedProperties = {\n    zebra?: string;\n    apple?: string;\n    hawaii?: string;\n};\n\n/**\n * This is a model with duplicated imports\n */\nexport type ModelWithDuplicateImports = {\n    propA?: ModelWithString;\n    propB?: ModelWithString;\n    propC?: ModelWithString;\n};\n\n/**\n * This is a model that extends another model\n */\nexport type ModelThatExtends = ModelWithString & {\n    propExtendsA?: string;\n    propExtendsB?: ModelWithString;\n};\n\n/**\n * This is a model that extends another model\n */\nexport type ModelThatExtendsExtends = ModelWithString & ModelThatExtends & {\n    propExtendsC?: string;\n    propExtendsD?: ModelWithString;\n};\n\n/**\n * This is a model that contains a some patterns\n */\nexport type ModelWithPattern = {\n    key: string;\n    name: string;\n    readonly enabled?: boolean;\n    readonly modified?: string;\n    id?: string;\n    text?: string;\n    patternWithSingleQuotes?: string;\n    patternWithNewline?: string;\n    patternWithBacktick?: string;\n    patternWithUnicode?: string;\n};\n\nexport type File = {\n    /**\n     * Id\n     */\n    readonly id?: string;\n    /**\n     * Updated at\n     */\n    readonly updated_at?: string;\n    /**\n     * Created at\n     */\n    readonly created_at?: string;\n    /**\n     * Mime\n     */\n    mime: string;\n    /**\n     * File\n     */\n    readonly file?: string;\n};\n\nexport type Default = {\n    name?: string;\n};\n\nexport type Pageable = {\n    page?: number;\n    size?: number;\n    sort?: Array<string>;\n};\n\n/**\n * This is a free-form object without additionalProperties.\n */\nexport type FreeFormObjectWithoutAdditionalProperties = {\n    [key: string]: unknown;\n};\n\n/**\n * This is a free-form object with additionalProperties: true.\n */\nexport type FreeFormObjectWithAdditionalPropertiesEqTrue = {\n    [key: string]: unknown;\n};\n\n/**\n * This is a free-form object with additionalProperties: {}.\n */\nexport type FreeFormObjectWithAdditionalPropertiesEqEmptyObject = {\n    [key: string]: unknown;\n};\n\nexport type ModelWithConst = {\n    String?: 'String';\n    number?: 0;\n    null?: unknown;\n    withType?: 'Some string';\n};\n\n/**\n * This is a model with one property and additionalProperties: true\n */\nexport type ModelWithAdditionalPropertiesEqTrue = {\n    /**\n     * This is a simple string property\n     */\n    prop?: string;\n    [key: string]: unknown;\n};\n\nexport type NestedAnyOfArraysNullable = {\n    nullableArray?: Array<string | boolean> | null;\n};\n\nexport type CompositionWithOneOfAndProperties = ({\n    foo: SimpleParameter;\n} | {\n    bar: NonAsciiStringæøåÆøÅöôêÊ字符串;\n}) & {\n    baz: number | null;\n    qux: number;\n};\n\n/**\n * An object that can be null\n */\nexport type NullableObject = {\n    foo?: string;\n} | null;\n\n/**\n * Some % character\n */\nexport type CharactersInDescription = string;\n\nexport type ModelWithNullableObject = {\n    data?: NullableObject;\n};\n\n/**\n * An object with additional properties that can be null\n */\nexport type ModelWithAdditionalPropertiesRef = {\n    [key: string]: NullableObject | null;\n};\n\nexport type ModelWithOneOfEnum = {\n    foo: 'Bar';\n} | {\n    foo: 'Baz';\n} | {\n    foo: 'Qux';\n} | {\n    content: string;\n    foo: 'Quux';\n} | {\n    content: [\n        string,\n        string\n    ];\n    foo: 'Corge';\n};\n\nexport type ModelWithNestedArrayEnumsDataFoo = 'foo' | 'bar';\n\nexport type ModelWithNestedArrayEnumsDataBar = 'baz' | 'qux';\n\nexport type ModelWithNestedArrayEnumsData = {\n    foo?: Array<ModelWithNestedArrayEnumsDataFoo>;\n    bar?: Array<ModelWithNestedArrayEnumsDataBar>;\n};\n\nexport type ModelWithNestedArrayEnums = {\n    array_strings?: Array<string>;\n    data?: ModelWithNestedArrayEnumsData;\n};\n\nexport type ModelWithNestedCompositionEnums = {\n    foo?: ModelWithNestedArrayEnumsDataFoo;\n};\n\nexport type ModelWithReadOnlyAndWriteOnly = {\n    foo: string;\n    readonly bar: string;\n};\n\nexport type ModelWithConstantSizeArray = [\n    number,\n    number\n];\n\nexport type ModelWithAnyOfConstantSizeArray = [\n    number | string,\n    number | string,\n    number | string\n];\n\nexport type ModelWithPrefixItemsConstantSizeArray = Array<ModelWithInteger | number | string>;\n\nexport type ModelWithAnyOfConstantSizeArrayNullable = [\n    number | null | string,\n    number | null | string,\n    number | null | string\n];\n\nexport type ModelWithAnyOfConstantSizeArrayWithNSizeAndOptions = [\n    number | Import,\n    number | Import\n];\n\nexport type ModelWithAnyOfConstantSizeArrayAndIntersect = [\n    number & string,\n    number & string\n];\n\nexport type ModelWithNumericEnumUnion = {\n    /**\n     * Период\n     */\n    value?: -10 | -1 | 0 | 1 | 3 | 6 | 12;\n};\n\n/**\n * Some description with `back ticks`\n */\nexport type ModelWithBackticksInDescription = {\n    /**\n     * The template `that` should be used for parsing and importing the contents of the CSV file.\n     *\n     * <br/><p>There is one placeholder currently supported:<ul>     <li><b>${x}</b> - refers to the n-th column in the CSV file, e.g. ${1}, ${2}, ...)</li></ul><p>Example of a correct JSON template:</p>\n     * <pre>\n     * [\n     * {\n     * \"resourceType\": \"Asset\",\n     * \"identifier\": {\n     * \"name\": \"${1}\",\n     * \"domain\": {\n     * \"name\": \"${2}\",\n     * \"community\": {\n     * \"name\": \"Some Community\"\n     * }\n     * }\n     * },\n     * \"attributes\" : {\n     * \"00000000-0000-0000-0000-000000003115\" : [ {\n     * \"value\" : \"${3}\"\n     * } ],\n     * \"00000000-0000-0000-0000-000000000222\" : [ {\n     * \"value\" : \"${4}\"\n     * } ]\n     * }\n     * }\n     * ]\n     * </pre>\n     */\n    template?: string;\n};\n\nexport type ModelWithOneOfAndProperties = (SimpleParameter | NonAsciiStringæøåÆøÅöôêÊ字符串) & {\n    baz: number | null;\n    qux: number;\n};\n\n/**\n * Model used to test deduplication strategy (unused)\n */\nexport type ParameterSimpleParameterUnused = string;\n\n/**\n * Model used to test deduplication strategy\n */\nexport type PostServiceWithEmptyTagResponse = string;\n\n/**\n * Model used to test deduplication strategy\n */\nexport type PostServiceWithEmptyTagResponse2 = string;\n\n/**\n * Model used to test deduplication strategy\n */\nexport type DeleteFooData = string;\n\n/**\n * Model used to test deduplication strategy\n */\nexport type DeleteFooData2 = string;\n\n/**\n * Model with restricted keyword name\n */\nexport type Import = string;\n\nexport type SchemaWithFormRestrictedKeys = {\n    description?: string;\n    'x-enum-descriptions'?: string;\n    'x-enum-varnames'?: string;\n    'x-enumNames'?: string;\n    title?: string;\n    object?: {\n        description?: string;\n        'x-enum-descriptions'?: string;\n        'x-enum-varnames'?: string;\n        'x-enumNames'?: string;\n        title?: string;\n    };\n    array?: Array<{\n        description?: string;\n        'x-enum-descriptions'?: string;\n        'x-enum-varnames'?: string;\n        'x-enumNames'?: string;\n        title?: string;\n    }>;\n};\n\n/**\n * This schema was giving PascalCase transformations a hard time\n */\nexport type IoK8sApimachineryPkgApisMetaV1DeleteOptions = {\n    /**\n     * Must be fulfilled before a deletion is carried out. If not possible, a 409 Conflict status will be returned.\n     */\n    preconditions?: IoK8sApimachineryPkgApisMetaV1Preconditions;\n};\n\n/**\n * This schema was giving PascalCase transformations a hard time\n */\nexport type IoK8sApimachineryPkgApisMetaV1Preconditions = {\n    /**\n     * Specifies the target ResourceVersion\n     */\n    resourceVersion?: string;\n    /**\n     * Specifies the target UID.\n     */\n    uid?: string;\n};\n\nexport type AdditionalPropertiesUnknownIssue = {\n    [key: string]: string | number;\n};\n\nexport type AdditionalPropertiesUnknownIssue2 = {\n    [key: string]: string | number;\n};\n\nexport type AdditionalPropertiesUnknownIssue3 = string & {\n    entries: {\n        [key: string]: AdditionalPropertiesUnknownIssue;\n    };\n};\n\nexport type AdditionalPropertiesIntegerIssue = {\n    value: number;\n    [key: string]: number;\n};\n\nexport type OneOfAllOfIssue = ((ConstValue | GenericSchemaDuplicateIssue1SystemBoolean) & _3eNum1Период) | GenericSchemaDuplicateIssue1SystemString;\n\nexport type GenericSchemaDuplicateIssue1SystemBoolean = {\n    item?: boolean;\n    error?: string | null;\n    readonly hasError?: boolean;\n    data?: {\n        [key: string]: never;\n    };\n};\n\nexport type GenericSchemaDuplicateIssue1SystemString = {\n    item?: string | null;\n    error?: string | null;\n    readonly hasError?: boolean;\n};\n\nexport type ExternalSharedModel = {\n    id: string;\n    name?: string;\n};\n\n/**\n * This is a model with one property containing a reference\n */\nexport type ModelWithReferenceWritable = {\n    prop?: ModelWithPropertiesWritable;\n};\n\n/**\n * This is a model with one property containing an array\n */\nexport type ModelWithArrayReadOnlyAndWriteOnlyWritable = {\n    prop?: Array<ModelWithReadOnlyAndWriteOnlyWritable>;\n    propWithFile?: Array<Blob | File>;\n    propWithNumber?: Array<number>;\n};\n\n/**\n * This is a model with one nested property\n */\nexport type ModelWithPropertiesWritable = {\n    required: string;\n    requiredAndNullable: string | null;\n    string?: string;\n    number?: number;\n    boolean?: boolean;\n    reference?: ModelWithString;\n    'property with space'?: string;\n    default?: string;\n    try?: string;\n};\n\n/**\n * This is a model that contains a some patterns\n */\nexport type ModelWithPatternWritable = {\n    key: string;\n    name: string;\n    id?: string;\n    text?: string;\n    patternWithSingleQuotes?: string;\n    patternWithNewline?: string;\n    patternWithBacktick?: string;\n    patternWithUnicode?: string;\n};\n\nexport type FileWritable = {\n    /**\n     * Mime\n     */\n    mime: string;\n};\n\nexport type ModelWithReadOnlyAndWriteOnlyWritable = {\n    foo: string;\n    baz: string;\n};\n\nexport type ModelWithAnyOfConstantSizeArrayWithNSizeAndOptionsWritable = [\n    number | Import,\n    number | Import\n];\n\nexport type AdditionalPropertiesUnknownIssueWritable = {\n    [key: string]: string | number;\n};\n\nexport type OneOfAllOfIssueWritable = ((ConstValue | GenericSchemaDuplicateIssue1SystemBoolean) & _3eNum1Период) | GenericSchemaDuplicateIssue1SystemString;\n\nexport type GenericSchemaDuplicateIssue1SystemBooleanWritable = {\n    item?: boolean;\n    error?: string | null;\n    data?: {\n        [key: string]: never;\n    };\n};\n\nexport type GenericSchemaDuplicateIssue1SystemStringWritable = {\n    item?: string | null;\n    error?: string | null;\n};\n\n/**\n * This is a reusable parameter\n */\nexport type SimpleParameter = string;\n\n/**\n * Parameter with illegal characters\n */\nexport type XFooBar = ModelWithString;\n\nexport type SimpleRequestBody = ModelWithString;\n\nexport type SimpleFormData = ModelWithString;\n\nexport type ExportData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no+tag';\n};\n\nexport type PatchApiVbyApiVersionNoTagData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no+tag';\n};\n\nexport type PatchApiVbyApiVersionNoTagResponses = {\n    /**\n     * OK\n     */\n    default: unknown;\n};\n\nexport type ImportData = {\n    body: ModelWithReadOnlyAndWriteOnlyWritable | ModelWithArrayReadOnlyAndWriteOnlyWritable;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no+tag';\n};\n\nexport type ImportResponses = {\n    /**\n     * Success\n     */\n    200: ModelFromZendesk;\n    /**\n     * Default success response\n     */\n    default: ModelWithReadOnlyAndWriteOnly;\n};\n\nexport type ImportResponse = ImportResponses[keyof ImportResponses];\n\nexport type FooWowData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no+tag';\n};\n\nexport type FooWowResponses = {\n    /**\n     * OK\n     */\n    default: unknown;\n};\n\nexport type ApiVVersionODataControllerCountData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple/$count';\n};\n\nexport type ApiVVersionODataControllerCountResponses = {\n    /**\n     * Success\n     */\n    200: ModelFromZendesk;\n};\n\nexport type ApiVVersionODataControllerCountResponse = ApiVVersionODataControllerCountResponses[keyof ApiVVersionODataControllerCountResponses];\n\nexport type GetApiVbyApiVersionSimpleOperationData = {\n    body?: never;\n    path: {\n        /**\n         * foo in method\n         */\n        foo_param: string;\n    };\n    query?: never;\n    url: '/api/v{api-version}/simple:operation';\n};\n\nexport type GetApiVbyApiVersionSimpleOperationErrors = {\n    /**\n     * Default error response\n     */\n    default: ModelWithBoolean;\n};\n\nexport type GetApiVbyApiVersionSimpleOperationError = GetApiVbyApiVersionSimpleOperationErrors[keyof GetApiVbyApiVersionSimpleOperationErrors];\n\nexport type GetApiVbyApiVersionSimpleOperationResponses = {\n    /**\n     * Response is a simple number\n     */\n    200: number;\n};\n\nexport type GetApiVbyApiVersionSimpleOperationResponse = GetApiVbyApiVersionSimpleOperationResponses[keyof GetApiVbyApiVersionSimpleOperationResponses];\n\nexport type DeleteCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type GetCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type HeadCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type OptionsCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type PatchCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type PostCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type PutCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type DeleteFooData3 = {\n    body?: never;\n    headers: {\n        /**\n         * Parameter with illegal characters\n         */\n        'x-Foo-Bar': ModelWithString;\n    };\n    path: {\n        /**\n         * foo in method\n         */\n        foo_param: string;\n        /**\n         * bar in method\n         */\n        BarParam: string;\n    };\n    query?: never;\n    url: '/api/v{api-version}/foo/{foo_param}/bar/{BarParam}';\n};\n\nexport type CallWithDescriptionsData = {\n    body?: never;\n    path?: never;\n    query?: {\n        /**\n         * Testing multiline comments in string: First line\n         * Second line\n         *\n         * Fourth line\n         */\n        parameterWithBreaks?: string;\n        /**\n         * Testing backticks in string: `backticks` and ```multiple backticks``` should work\n         */\n        parameterWithBackticks?: string;\n        /**\n         * Testing slashes in string: \\backwards\\\\\\ and /forwards/// should work\n         */\n        parameterWithSlashes?: string;\n        /**\n         * Testing expression placeholders in string: ${expression} should work\n         */\n        parameterWithExpressionPlaceholders?: string;\n        /**\n         * Testing quotes in string: 'single quote''' and \"double quotes\"\"\" should work\n         */\n        parameterWithQuotes?: string;\n        /**\n         * Testing reserved characters in string: * inline * and ** inline ** should work\n         */\n        parameterWithReservedCharacters?: string;\n    };\n    url: '/api/v{api-version}/descriptions';\n};\n\nexport type DeprecatedCallData = {\n    body?: never;\n    headers: {\n        /**\n         * This parameter is deprecated\n         *\n         * @deprecated\n         */\n        parameter: DeprecatedModel | null;\n    };\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/parameters/deprecated';\n};\n\nexport type CallWithParametersData = {\n    /**\n     * This is the parameter that goes into the body\n     */\n    body: {\n        [key: string]: unknown;\n    } | null;\n    headers: {\n        /**\n         * This is the parameter that goes into the header\n         */\n        parameterHeader: string | null;\n    };\n    path: {\n        /**\n         * This is the parameter that goes into the path\n         */\n        parameterPath: string | null;\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string | null;\n    };\n    query: {\n        foo_ref_enum?: ModelWithNestedArrayEnumsDataFoo;\n        foo_all_of_enum: ModelWithNestedArrayEnumsDataFoo;\n        /**\n         * This is the parameter that goes into the query params\n         */\n        cursor: string | null;\n    };\n    url: '/api/v{api-version}/parameters/{parameterPath}';\n};\n\nexport type CallWithWeirdParameterNamesData = {\n    /**\n     * This is the parameter that goes into the body\n     */\n    body: ModelWithString | null;\n    headers: {\n        /**\n         * This is the parameter that goes into the request header\n         */\n        'parameter.header': string | null;\n    };\n    path: {\n        /**\n         * This is the parameter that goes into the path\n         */\n        'parameter.path.1'?: string;\n        /**\n         * This is the parameter that goes into the path\n         */\n        'parameter-path-2'?: string;\n        /**\n         * This is the parameter that goes into the path\n         */\n        'PARAMETER-PATH-3'?: string;\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string | null;\n    };\n    query: {\n        /**\n         * This is the parameter with a reserved keyword\n         */\n        default?: string;\n        /**\n         * This is the parameter that goes into the request query params\n         */\n        'parameter-query': string | null;\n    };\n    url: '/api/v{api-version}/parameters/{parameter.path.1}/{parameter-path-2}/{PARAMETER-PATH-3}';\n};\n\nexport type GetCallWithOptionalParamData = {\n    /**\n     * This is a required parameter\n     */\n    body: ModelWithOneOfEnum;\n    path?: never;\n    query?: {\n        /**\n         * This is an optional parameter\n         */\n        page?: number;\n    };\n    url: '/api/v{api-version}/parameters';\n};\n\nexport type PostCallWithOptionalParamData = {\n    /**\n     * This is an optional parameter\n     */\n    body?: {\n        offset?: number | null;\n    };\n    path?: never;\n    query: {\n        /**\n         * This is a required parameter\n         */\n        parameter: Pageable;\n    };\n    url: '/api/v{api-version}/parameters';\n};\n\nexport type PostCallWithOptionalParamResponses = {\n    /**\n     * Response is a simple number\n     */\n    200: number;\n    /**\n     * Success\n     */\n    204: void;\n};\n\nexport type PostCallWithOptionalParamResponse = PostCallWithOptionalParamResponses[keyof PostCallWithOptionalParamResponses];\n\nexport type PostApiVbyApiVersionRequestBodyData = {\n    /**\n     * A reusable request body\n     */\n    body?: SimpleRequestBody;\n    path?: never;\n    query?: {\n        /**\n         * This is a reusable parameter\n         */\n        parameter?: string;\n    };\n    url: '/api/v{api-version}/requestBody';\n};\n\nexport type PostApiVbyApiVersionFormDataData = {\n    /**\n     * A reusable request body\n     */\n    body?: SimpleFormData;\n    path?: never;\n    query?: {\n        /**\n         * This is a reusable parameter\n         */\n        parameter?: string;\n    };\n    url: '/api/v{api-version}/formData';\n};\n\nexport type CallWithDefaultParametersData = {\n    body?: never;\n    path?: never;\n    query?: {\n        /**\n         * This is a simple string with default value\n         */\n        parameterString?: string | null;\n        /**\n         * This is a simple number with default value\n         */\n        parameterNumber?: number | null;\n        /**\n         * This is a simple boolean with default value\n         */\n        parameterBoolean?: boolean | null;\n        /**\n         * This is a simple enum with default value\n         */\n        parameterEnum?: 'Success' | 'Warning' | 'Error';\n        /**\n         * This is a simple model with default value\n         */\n        parameterModel?: ModelWithString | null;\n    };\n    url: '/api/v{api-version}/defaults';\n};\n\nexport type CallWithDefaultOptionalParametersData = {\n    body?: never;\n    path?: never;\n    query?: {\n        /**\n         * This is a simple string that is optional with default value\n         */\n        parameterString?: string;\n        /**\n         * This is a simple number that is optional with default value\n         */\n        parameterNumber?: number;\n        /**\n         * This is a simple boolean that is optional with default value\n         */\n        parameterBoolean?: boolean;\n        /**\n         * This is a simple enum that is optional with default value\n         */\n        parameterEnum?: 'Success' | 'Warning' | 'Error';\n        /**\n         * This is a simple model that is optional with default value\n         */\n        parameterModel?: ModelWithString;\n    };\n    url: '/api/v{api-version}/defaults';\n};\n\nexport type CallToTestOrderOfParamsData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * This is a optional string with default\n         */\n        parameterOptionalStringWithDefault?: string;\n        /**\n         * This is a optional string with empty default\n         */\n        parameterOptionalStringWithEmptyDefault?: string;\n        /**\n         * This is a optional string with no default\n         */\n        parameterOptionalStringWithNoDefault?: string;\n        /**\n         * This is a string with default\n         */\n        parameterStringWithDefault: string;\n        /**\n         * This is a string with empty default\n         */\n        parameterStringWithEmptyDefault: string;\n        /**\n         * This is a string with no default\n         */\n        parameterStringWithNoDefault: string;\n        /**\n         * This is a string that can be null with no default\n         */\n        parameterStringNullableWithNoDefault?: string | null;\n        /**\n         * This is a string that can be null with default\n         */\n        parameterStringNullableWithDefault?: string | null;\n    };\n    url: '/api/v{api-version}/defaults';\n};\n\nexport type DuplicateNameData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/duplicate';\n};\n\nexport type DuplicateName2Data = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/duplicate';\n};\n\nexport type DuplicateName3Data = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/duplicate';\n};\n\nexport type DuplicateName4Data = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/duplicate';\n};\n\nexport type CallWithNoContentResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no-content';\n};\n\nexport type CallWithNoContentResponseResponses = {\n    /**\n     * Success\n     */\n    204: void;\n};\n\nexport type CallWithNoContentResponseResponse = CallWithNoContentResponseResponses[keyof CallWithNoContentResponseResponses];\n\nexport type CallWithResponseAndNoContentResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multiple-tags/response-and-no-content';\n};\n\nexport type CallWithResponseAndNoContentResponseResponses = {\n    /**\n     * Response is a simple number\n     */\n    200: number;\n    /**\n     * Success\n     */\n    204: void;\n};\n\nexport type CallWithResponseAndNoContentResponseResponse = CallWithResponseAndNoContentResponseResponses[keyof CallWithResponseAndNoContentResponseResponses];\n\nexport type DummyAData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multiple-tags/a';\n};\n\nexport type DummyAResponses = {\n    200: _400;\n};\n\nexport type DummyAResponse = DummyAResponses[keyof DummyAResponses];\n\nexport type DummyBData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multiple-tags/b';\n};\n\nexport type DummyBResponses = {\n    /**\n     * Success\n     */\n    204: void;\n};\n\nexport type DummyBResponse = DummyBResponses[keyof DummyBResponses];\n\nexport type CallWithResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/response';\n};\n\nexport type CallWithResponseResponses = {\n    default: Import;\n};\n\nexport type CallWithResponseResponse = CallWithResponseResponses[keyof CallWithResponseResponses];\n\nexport type CallWithDuplicateResponsesData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/response';\n};\n\nexport type CallWithDuplicateResponsesErrors = {\n    /**\n     * Message for 500 error\n     */\n    500: ModelWithStringError;\n    /**\n     * Message for 501 error\n     */\n    501: ModelWithStringError;\n    /**\n     * Message for 502 error\n     */\n    502: ModelWithStringError;\n    /**\n     * Message for 4XX errors\n     */\n    '4XX': DictionaryWithArray;\n    /**\n     * Default error response\n     */\n    default: ModelWithBoolean;\n};\n\nexport type CallWithDuplicateResponsesError = CallWithDuplicateResponsesErrors[keyof CallWithDuplicateResponsesErrors];\n\nexport type CallWithDuplicateResponsesResponses = {\n    /**\n     * Message for 200 response\n     */\n    200: ModelWithBoolean & ModelWithInteger;\n    /**\n     * Message for 201 response\n     */\n    201: ModelWithString;\n    /**\n     * Message for 202 response\n     */\n    202: ModelWithString;\n};\n\nexport type CallWithDuplicateResponsesResponse = CallWithDuplicateResponsesResponses[keyof CallWithDuplicateResponsesResponses];\n\nexport type CallWithResponsesData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/response';\n};\n\nexport type CallWithResponsesErrors = {\n    /**\n     * Message for 500 error\n     */\n    500: ModelWithStringError;\n    /**\n     * Message for 501 error\n     */\n    501: ModelWithStringError;\n    /**\n     * Message for 502 error\n     */\n    502: ModelWithStringError;\n    /**\n     * Message for default response\n     */\n    default: ModelWithStringError;\n};\n\nexport type CallWithResponsesError = CallWithResponsesErrors[keyof CallWithResponsesErrors];\n\nexport type CallWithResponsesResponses = {\n    /**\n     * Message for 200 response\n     */\n    200: {\n        readonly '@namespace.string'?: string;\n        readonly '@namespace.integer'?: number;\n        readonly value?: Array<ModelWithString>;\n    };\n    /**\n     * Message for 201 response\n     */\n    201: ModelThatExtends;\n    /**\n     * Message for 202 response\n     */\n    202: ModelThatExtendsExtends;\n};\n\nexport type CallWithResponsesResponse = CallWithResponsesResponses[keyof CallWithResponsesResponses];\n\nexport type CollectionFormatData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * This is an array parameter that is sent as csv format (comma-separated values)\n         */\n        parameterArrayCSV: Array<string> | null;\n        /**\n         * This is an array parameter that is sent as ssv format (space-separated values)\n         */\n        parameterArraySSV: Array<string> | null;\n        /**\n         * This is an array parameter that is sent as tsv format (tab-separated values)\n         */\n        parameterArrayTSV: Array<string> | null;\n        /**\n         * This is an array parameter that is sent as pipes format (pipe-separated values)\n         */\n        parameterArrayPipes: Array<string> | null;\n        /**\n         * This is an array parameter that is sent as multi format (multiple parameter instances)\n         */\n        parameterArrayMulti: Array<string> | null;\n    };\n    url: '/api/v{api-version}/collectionFormat';\n};\n\nexport type TypesData = {\n    body?: never;\n    path?: {\n        /**\n         * This is a number parameter\n         */\n        id?: number;\n    };\n    query: {\n        /**\n         * This is a number parameter\n         */\n        parameterNumber: number;\n        /**\n         * This is a string parameter\n         */\n        parameterString: string | null;\n        /**\n         * This is a boolean parameter\n         */\n        parameterBoolean: boolean | null;\n        /**\n         * This is an object parameter\n         */\n        parameterObject: {\n            [key: string]: unknown;\n        } | null;\n        /**\n         * This is an array parameter\n         */\n        parameterArray: Array<string> | null;\n        /**\n         * This is a dictionary parameter\n         */\n        parameterDictionary: {\n            [key: string]: unknown;\n        } | null;\n        /**\n         * This is an enum parameter\n         */\n        parameterEnum: 'Success' | 'Warning' | 'Error';\n    };\n    url: '/api/v{api-version}/types';\n};\n\nexport type TypesResponses = {\n    /**\n     * Response is a simple number\n     */\n    200: number;\n    /**\n     * Response is a simple string\n     */\n    201: string;\n    /**\n     * Response is a simple boolean\n     */\n    202: boolean;\n    /**\n     * Response is a simple object\n     */\n    203: {\n        [key: string]: unknown;\n    };\n};\n\nexport type TypesResponse = TypesResponses[keyof TypesResponses];\n\nexport type UploadFileData = {\n    body: Blob | File;\n    path: {\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string | null;\n    };\n    query?: never;\n    url: '/api/v{api-version}/upload';\n};\n\nexport type UploadFileResponses = {\n    200: boolean;\n};\n\nexport type UploadFileResponse = UploadFileResponses[keyof UploadFileResponses];\n\nexport type FileResponseData = {\n    body?: never;\n    path: {\n        id: string;\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string;\n    };\n    query?: never;\n    url: '/api/v{api-version}/file/{id}';\n};\n\nexport type FileResponseResponses = {\n    /**\n     * Success\n     */\n    200: Blob | File;\n};\n\nexport type FileResponseResponse = FileResponseResponses[keyof FileResponseResponses];\n\nexport type ComplexTypesData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * Parameter containing object\n         */\n        parameterObject: {\n            first?: {\n                second?: {\n                    third?: string;\n                };\n            };\n        };\n        /**\n         * Parameter containing reference\n         */\n        parameterReference: ModelWithString;\n    };\n    url: '/api/v{api-version}/complex';\n};\n\nexport type ComplexTypesErrors = {\n    /**\n     * 400 `server` error\n     */\n    400: unknown;\n    /**\n     * 500 server error\n     */\n    500: unknown;\n};\n\nexport type ComplexTypesResponses = {\n    /**\n     * Successful response\n     */\n    200: Array<ModelWithString>;\n};\n\nexport type ComplexTypesResponse = ComplexTypesResponses[keyof ComplexTypesResponses];\n\nexport type MultipartResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multipart';\n};\n\nexport type MultipartResponseResponses = {\n    /**\n     * OK\n     */\n    200: {\n        file?: Blob | File;\n        metadata?: {\n            foo?: string;\n            bar?: string;\n        };\n    };\n};\n\nexport type MultipartResponseResponse = MultipartResponseResponses[keyof MultipartResponseResponses];\n\nexport type MultipartRequestData = {\n    body?: {\n        content?: Blob | File;\n        data?: ModelWithString | null;\n    };\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multipart';\n};\n\nexport type ComplexParamsData = {\n    body?: {\n        readonly key: string | null;\n        name: string | null;\n        enabled?: boolean;\n        type: 'Monkey' | 'Horse' | 'Bird';\n        listOfModels?: Array<ModelWithString> | null;\n        listOfStrings?: Array<string> | null;\n        parameters: ModelWithString | ModelWithEnum | ModelWithArray | ModelWithDictionary;\n        readonly user?: {\n            readonly id?: number;\n            readonly name?: string | null;\n        };\n    };\n    path: {\n        id: number;\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string;\n    };\n    query?: never;\n    url: '/api/v{api-version}/complex/{id}';\n};\n\nexport type ComplexParamsResponses = {\n    /**\n     * Success\n     */\n    200: ModelWithString;\n};\n\nexport type ComplexParamsResponse = ComplexParamsResponses[keyof ComplexParamsResponses];\n\nexport type CallWithResultFromHeaderData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/header';\n};\n\nexport type CallWithResultFromHeaderErrors = {\n    /**\n     * 400 server error\n     */\n    400: unknown;\n    /**\n     * 500 server error\n     */\n    500: unknown;\n};\n\nexport type CallWithResultFromHeaderResponses = {\n    /**\n     * Successful response\n     */\n    200: unknown;\n};\n\nexport type TestErrorCodeData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * Status code to return\n         */\n        status: number;\n    };\n    url: '/api/v{api-version}/error';\n};\n\nexport type TestErrorCodeErrors = {\n    /**\n     * Custom message: Internal Server Error\n     */\n    500: unknown;\n    /**\n     * Custom message: Not Implemented\n     */\n    501: unknown;\n    /**\n     * Custom message: Bad Gateway\n     */\n    502: unknown;\n    /**\n     * Custom message: Service Unavailable\n     */\n    503: unknown;\n};\n\nexport type TestErrorCodeResponses = {\n    /**\n     * Custom message: Successful response\n     */\n    200: unknown;\n};\n\nexport type NonAsciiæøåÆøÅöôêÊ字符串Data = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * Dummy input param\n         */\n        nonAsciiParamæøåÆØÅöôêÊ: number;\n    };\n    url: '/api/v{api-version}/non-ascii-æøåÆØÅöôêÊ字符串';\n};\n\nexport type NonAsciiæøåÆøÅöôêÊ字符串Responses = {\n    /**\n     * Successful response\n     */\n    200: Array<NonAsciiStringæøåÆøÅöôêÊ字符串>;\n};\n\nexport type NonAsciiæøåÆøÅöôêÊ字符串Response = NonAsciiæøåÆøÅöôêÊ字符串Responses[keyof NonAsciiæøåÆøÅöôêÊ字符串Responses];\n\nexport type PutWithFormUrlEncodedData = {\n    body: ArrayWithStrings;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/non-ascii-æøåÆØÅöôêÊ字符串';\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/vue-query/fetch/@tanstack/vue-query.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport { type DefaultError, type InfiniteData, infiniteQueryOptions, queryOptions, type UseMutationOptions } from '@tanstack/vue-query';\n\nimport { client } from '../client.gen';\nimport { apiVVersionODataControllerCount, callToTestOrderOfParams, callWithDefaultOptionalParameters, callWithDefaultParameters, callWithDescriptions, callWithDuplicateResponses, callWithNoContentResponse, callWithParameters, callWithResponse, callWithResponseAndNoContentResponse, callWithResponses, callWithResultFromHeader, callWithWeirdParameterNames, collectionFormat, complexParams, complexTypes, deleteCallWithoutParametersAndResponse, deleteFoo, deprecatedCall, dummyA, dummyB, duplicateName, duplicateName2, duplicateName3, duplicateName4, export_, fileResponse, fooWow, getApiVbyApiVersionSimpleOperation, getCallWithOptionalParam, getCallWithoutParametersAndResponse, import_, multipartRequest, multipartResponse, nonAsciiæøåÆøÅöôêÊ字符串, type Options, patchApiVbyApiVersionNoTag, patchCallWithoutParametersAndResponse, postApiVbyApiVersionFormData, postApiVbyApiVersionRequestBody, postCallWithOptionalParam, postCallWithoutParametersAndResponse, putCallWithoutParametersAndResponse, putWithFormUrlEncoded, testErrorCode, types, uploadFile } from '../sdk.gen';\nimport type { ApiVVersionODataControllerCountData, ApiVVersionODataControllerCountResponse, CallToTestOrderOfParamsData, CallWithDefaultOptionalParametersData, CallWithDefaultParametersData, CallWithDescriptionsData, CallWithDuplicateResponsesData, CallWithDuplicateResponsesError, CallWithDuplicateResponsesResponse, CallWithNoContentResponseData, CallWithNoContentResponseResponse, CallWithParametersData, CallWithResponseAndNoContentResponseData, CallWithResponseAndNoContentResponseResponse, CallWithResponseData, CallWithResponseResponse, CallWithResponsesData, CallWithResponsesError, CallWithResponsesResponse, CallWithResultFromHeaderData, CallWithWeirdParameterNamesData, CollectionFormatData, ComplexParamsData, ComplexParamsResponse, ComplexTypesData, ComplexTypesResponse, DeleteCallWithoutParametersAndResponseData, DeleteFooData3, DeprecatedCallData, DummyAData, DummyAResponse, DummyBData, DummyBResponse, DuplicateName2Data, DuplicateName3Data, DuplicateName4Data, DuplicateNameData, ExportData, FileResponseData, FileResponseResponse, FooWowData, GetApiVbyApiVersionSimpleOperationData, GetApiVbyApiVersionSimpleOperationError, GetApiVbyApiVersionSimpleOperationResponse, GetCallWithOptionalParamData, GetCallWithoutParametersAndResponseData, ImportData, ImportResponse, MultipartRequestData, MultipartResponseData, MultipartResponseResponse, NonAsciiæøåÆøÅöôêÊ字符串Data, NonAsciiæøåÆøÅöôêÊ字符串Response, PatchApiVbyApiVersionNoTagData, PatchCallWithoutParametersAndResponseData, PostApiVbyApiVersionFormDataData, PostApiVbyApiVersionRequestBodyData, PostCallWithOptionalParamData, PostCallWithOptionalParamResponse, PostCallWithoutParametersAndResponseData, PutCallWithoutParametersAndResponseData, PutWithFormUrlEncodedData, TestErrorCodeData, TypesData, TypesResponse, UploadFileData, UploadFileResponse } from '../types.gen';\n\nexport type QueryKey<TOptions extends Options> = [\n    Pick<TOptions, 'baseUrl' | 'body' | 'headers' | 'path' | 'query'> & {\n        _id: string;\n        _infinite?: boolean;\n        tags?: ReadonlyArray<string>;\n    }\n];\n\nconst createQueryKey = <TOptions extends Options>(id: string, options?: TOptions, infinite?: boolean, tags?: ReadonlyArray<string>): [\n    QueryKey<TOptions>[0]\n] => {\n    const params: QueryKey<TOptions>[0] = { _id: id, baseUrl: options?.baseUrl || (options?.client ?? client).getConfig().baseUrl } as QueryKey<TOptions>[0];\n    if (infinite) {\n        params._infinite = infinite;\n    }\n    if (tags) {\n        params.tags = tags;\n    }\n    if (options?.body) {\n        params.body = options.body;\n    }\n    if (options?.headers) {\n        params.headers = options.headers;\n    }\n    if (options?.path) {\n        params.path = options.path;\n    }\n    if (options?.query) {\n        params.query = options.query;\n    }\n    return [params];\n};\n\nexport const exportQueryKey = (options?: Options<ExportData>) => createQueryKey('export', options);\n\nexport const exportOptions = (options?: Options<ExportData>) => queryOptions<unknown, DefaultError, unknown, ReturnType<typeof exportQueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await export_({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: exportQueryKey(options)\n});\n\nexport const patchApiVbyApiVersionNoTagMutation = (options?: Partial<Options<PatchApiVbyApiVersionNoTagData>>): UseMutationOptions<unknown, DefaultError, Options<PatchApiVbyApiVersionNoTagData>> => {\n    const mutationOptions: UseMutationOptions<unknown, DefaultError, Options<PatchApiVbyApiVersionNoTagData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await patchApiVbyApiVersionNoTag({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const importMutation = (options?: Partial<Options<ImportData>>): UseMutationOptions<ImportResponse, DefaultError, Options<ImportData>> => {\n    const mutationOptions: UseMutationOptions<ImportResponse, DefaultError, Options<ImportData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await import_({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const fooWowMutation = (options?: Partial<Options<FooWowData>>): UseMutationOptions<unknown, DefaultError, Options<FooWowData>> => {\n    const mutationOptions: UseMutationOptions<unknown, DefaultError, Options<FooWowData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await fooWow({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const apiVVersionODataControllerCountQueryKey = (options?: Options<ApiVVersionODataControllerCountData>) => createQueryKey('apiVVersionODataControllerCount', options);\n\nexport const apiVVersionODataControllerCountOptions = (options?: Options<ApiVVersionODataControllerCountData>) => queryOptions<ApiVVersionODataControllerCountResponse, DefaultError, ApiVVersionODataControllerCountResponse, ReturnType<typeof apiVVersionODataControllerCountQueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await apiVVersionODataControllerCount({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: apiVVersionODataControllerCountQueryKey(options)\n});\n\nexport const getApiVbyApiVersionSimpleOperationQueryKey = (options: Options<GetApiVbyApiVersionSimpleOperationData>) => createQueryKey('getApiVbyApiVersionSimpleOperation', options);\n\nexport const getApiVbyApiVersionSimpleOperationOptions = (options: Options<GetApiVbyApiVersionSimpleOperationData>) => queryOptions<GetApiVbyApiVersionSimpleOperationResponse, GetApiVbyApiVersionSimpleOperationError, GetApiVbyApiVersionSimpleOperationResponse, ReturnType<typeof getApiVbyApiVersionSimpleOperationQueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await getApiVbyApiVersionSimpleOperation({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: getApiVbyApiVersionSimpleOperationQueryKey(options)\n});\n\nexport const deleteCallWithoutParametersAndResponseMutation = (options?: Partial<Options<DeleteCallWithoutParametersAndResponseData>>): UseMutationOptions<unknown, DefaultError, Options<DeleteCallWithoutParametersAndResponseData>> => {\n    const mutationOptions: UseMutationOptions<unknown, DefaultError, Options<DeleteCallWithoutParametersAndResponseData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await deleteCallWithoutParametersAndResponse({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const getCallWithoutParametersAndResponseQueryKey = (options?: Options<GetCallWithoutParametersAndResponseData>) => createQueryKey('getCallWithoutParametersAndResponse', options);\n\nexport const getCallWithoutParametersAndResponseOptions = (options?: Options<GetCallWithoutParametersAndResponseData>) => queryOptions<unknown, DefaultError, unknown, ReturnType<typeof getCallWithoutParametersAndResponseQueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await getCallWithoutParametersAndResponse({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: getCallWithoutParametersAndResponseQueryKey(options)\n});\n\nexport const patchCallWithoutParametersAndResponseMutation = (options?: Partial<Options<PatchCallWithoutParametersAndResponseData>>): UseMutationOptions<unknown, DefaultError, Options<PatchCallWithoutParametersAndResponseData>> => {\n    const mutationOptions: UseMutationOptions<unknown, DefaultError, Options<PatchCallWithoutParametersAndResponseData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await patchCallWithoutParametersAndResponse({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const postCallWithoutParametersAndResponseMutation = (options?: Partial<Options<PostCallWithoutParametersAndResponseData>>): UseMutationOptions<unknown, DefaultError, Options<PostCallWithoutParametersAndResponseData>> => {\n    const mutationOptions: UseMutationOptions<unknown, DefaultError, Options<PostCallWithoutParametersAndResponseData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await postCallWithoutParametersAndResponse({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const putCallWithoutParametersAndResponseMutation = (options?: Partial<Options<PutCallWithoutParametersAndResponseData>>): UseMutationOptions<unknown, DefaultError, Options<PutCallWithoutParametersAndResponseData>> => {\n    const mutationOptions: UseMutationOptions<unknown, DefaultError, Options<PutCallWithoutParametersAndResponseData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await putCallWithoutParametersAndResponse({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const deleteFooMutation = (options?: Partial<Options<DeleteFooData3>>): UseMutationOptions<unknown, DefaultError, Options<DeleteFooData3>> => {\n    const mutationOptions: UseMutationOptions<unknown, DefaultError, Options<DeleteFooData3>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await deleteFoo({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const callWithDescriptionsMutation = (options?: Partial<Options<CallWithDescriptionsData>>): UseMutationOptions<unknown, DefaultError, Options<CallWithDescriptionsData>> => {\n    const mutationOptions: UseMutationOptions<unknown, DefaultError, Options<CallWithDescriptionsData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await callWithDescriptions({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\n/**\n * @deprecated\n */\nexport const deprecatedCallMutation = (options?: Partial<Options<DeprecatedCallData>>): UseMutationOptions<unknown, DefaultError, Options<DeprecatedCallData>> => {\n    const mutationOptions: UseMutationOptions<unknown, DefaultError, Options<DeprecatedCallData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await deprecatedCall({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const callWithParametersMutation = (options?: Partial<Options<CallWithParametersData>>): UseMutationOptions<unknown, DefaultError, Options<CallWithParametersData>> => {\n    const mutationOptions: UseMutationOptions<unknown, DefaultError, Options<CallWithParametersData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await callWithParameters({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const callWithWeirdParameterNamesMutation = (options?: Partial<Options<CallWithWeirdParameterNamesData>>): UseMutationOptions<unknown, DefaultError, Options<CallWithWeirdParameterNamesData>> => {\n    const mutationOptions: UseMutationOptions<unknown, DefaultError, Options<CallWithWeirdParameterNamesData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await callWithWeirdParameterNames({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const getCallWithOptionalParamQueryKey = (options: Options<GetCallWithOptionalParamData>) => createQueryKey('getCallWithOptionalParam', options);\n\nexport const getCallWithOptionalParamOptions = (options: Options<GetCallWithOptionalParamData>) => queryOptions<unknown, DefaultError, unknown, ReturnType<typeof getCallWithOptionalParamQueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await getCallWithOptionalParam({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: getCallWithOptionalParamQueryKey(options)\n});\n\nconst createInfiniteParams = <K extends Pick<QueryKey<Options>[0], 'body' | 'headers' | 'path' | 'query'>>(queryKey: QueryKey<Options>, page: K) => {\n    const params = { ...queryKey[0] };\n    if (page.body) {\n        params.body = {\n            ...queryKey[0].body as any,\n            ...page.body as any\n        };\n    }\n    if (page.headers) {\n        params.headers = {\n            ...queryKey[0].headers,\n            ...page.headers\n        };\n    }\n    if (page.path) {\n        params.path = {\n            ...queryKey[0].path as any,\n            ...page.path as any\n        };\n    }\n    if (page.query) {\n        params.query = {\n            ...queryKey[0].query as any,\n            ...page.query as any\n        };\n    }\n    return params as unknown as typeof page;\n};\n\nexport const getCallWithOptionalParamInfiniteQueryKey = (options: Options<GetCallWithOptionalParamData>): QueryKey<Options<GetCallWithOptionalParamData>> => createQueryKey('getCallWithOptionalParam', options, true);\n\nexport const getCallWithOptionalParamInfiniteOptions = (options: Options<GetCallWithOptionalParamData>) => infiniteQueryOptions<unknown, DefaultError, InfiniteData<unknown>, QueryKey<Options<GetCallWithOptionalParamData>>, number | Pick<QueryKey<Options<GetCallWithOptionalParamData>>[0], 'body' | 'headers' | 'path' | 'query'>>(\n// @ts-ignore\n{\n    queryFn: async ({ pageParam, queryKey, signal }) => {\n        // @ts-ignore\n        const page: Pick<QueryKey<Options<GetCallWithOptionalParamData>>[0], 'body' | 'headers' | 'path' | 'query'> = typeof pageParam === 'object' ? pageParam : {\n            query: {\n                page: pageParam\n            }\n        };\n        const params = createInfiniteParams(queryKey, page);\n        const { data } = await getCallWithOptionalParam({\n            ...options,\n            ...params,\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: getCallWithOptionalParamInfiniteQueryKey(options)\n});\n\nexport const postCallWithOptionalParamMutation = (options?: Partial<Options<PostCallWithOptionalParamData>>): UseMutationOptions<PostCallWithOptionalParamResponse, DefaultError, Options<PostCallWithOptionalParamData>> => {\n    const mutationOptions: UseMutationOptions<PostCallWithOptionalParamResponse, DefaultError, Options<PostCallWithOptionalParamData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await postCallWithOptionalParam({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const postApiVbyApiVersionRequestBodyMutation = (options?: Partial<Options<PostApiVbyApiVersionRequestBodyData>>): UseMutationOptions<unknown, DefaultError, Options<PostApiVbyApiVersionRequestBodyData>> => {\n    const mutationOptions: UseMutationOptions<unknown, DefaultError, Options<PostApiVbyApiVersionRequestBodyData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await postApiVbyApiVersionRequestBody({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const postApiVbyApiVersionFormDataMutation = (options?: Partial<Options<PostApiVbyApiVersionFormDataData>>): UseMutationOptions<unknown, DefaultError, Options<PostApiVbyApiVersionFormDataData>> => {\n    const mutationOptions: UseMutationOptions<unknown, DefaultError, Options<PostApiVbyApiVersionFormDataData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await postApiVbyApiVersionFormData({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const callWithDefaultParametersQueryKey = (options?: Options<CallWithDefaultParametersData>) => createQueryKey('callWithDefaultParameters', options);\n\nexport const callWithDefaultParametersOptions = (options?: Options<CallWithDefaultParametersData>) => queryOptions<unknown, DefaultError, unknown, ReturnType<typeof callWithDefaultParametersQueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await callWithDefaultParameters({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: callWithDefaultParametersQueryKey(options)\n});\n\nexport const callWithDefaultOptionalParametersMutation = (options?: Partial<Options<CallWithDefaultOptionalParametersData>>): UseMutationOptions<unknown, DefaultError, Options<CallWithDefaultOptionalParametersData>> => {\n    const mutationOptions: UseMutationOptions<unknown, DefaultError, Options<CallWithDefaultOptionalParametersData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await callWithDefaultOptionalParameters({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const callToTestOrderOfParamsMutation = (options?: Partial<Options<CallToTestOrderOfParamsData>>): UseMutationOptions<unknown, DefaultError, Options<CallToTestOrderOfParamsData>> => {\n    const mutationOptions: UseMutationOptions<unknown, DefaultError, Options<CallToTestOrderOfParamsData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await callToTestOrderOfParams({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const duplicateNameMutation = (options?: Partial<Options<DuplicateNameData>>): UseMutationOptions<unknown, DefaultError, Options<DuplicateNameData>> => {\n    const mutationOptions: UseMutationOptions<unknown, DefaultError, Options<DuplicateNameData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await duplicateName({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const duplicateName2QueryKey = (options?: Options<DuplicateName2Data>) => createQueryKey('duplicateName2', options);\n\nexport const duplicateName2Options = (options?: Options<DuplicateName2Data>) => queryOptions<unknown, DefaultError, unknown, ReturnType<typeof duplicateName2QueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await duplicateName2({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: duplicateName2QueryKey(options)\n});\n\nexport const duplicateName3Mutation = (options?: Partial<Options<DuplicateName3Data>>): UseMutationOptions<unknown, DefaultError, Options<DuplicateName3Data>> => {\n    const mutationOptions: UseMutationOptions<unknown, DefaultError, Options<DuplicateName3Data>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await duplicateName3({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const duplicateName4Mutation = (options?: Partial<Options<DuplicateName4Data>>): UseMutationOptions<unknown, DefaultError, Options<DuplicateName4Data>> => {\n    const mutationOptions: UseMutationOptions<unknown, DefaultError, Options<DuplicateName4Data>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await duplicateName4({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const callWithNoContentResponseQueryKey = (options?: Options<CallWithNoContentResponseData>) => createQueryKey('callWithNoContentResponse', options);\n\nexport const callWithNoContentResponseOptions = (options?: Options<CallWithNoContentResponseData>) => queryOptions<CallWithNoContentResponseResponse, DefaultError, CallWithNoContentResponseResponse, ReturnType<typeof callWithNoContentResponseQueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await callWithNoContentResponse({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: callWithNoContentResponseQueryKey(options)\n});\n\nexport const callWithResponseAndNoContentResponseQueryKey = (options?: Options<CallWithResponseAndNoContentResponseData>) => createQueryKey('callWithResponseAndNoContentResponse', options);\n\nexport const callWithResponseAndNoContentResponseOptions = (options?: Options<CallWithResponseAndNoContentResponseData>) => queryOptions<CallWithResponseAndNoContentResponseResponse, DefaultError, CallWithResponseAndNoContentResponseResponse, ReturnType<typeof callWithResponseAndNoContentResponseQueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await callWithResponseAndNoContentResponse({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: callWithResponseAndNoContentResponseQueryKey(options)\n});\n\nexport const dummyAQueryKey = (options?: Options<DummyAData>) => createQueryKey('dummyA', options);\n\nexport const dummyAOptions = (options?: Options<DummyAData>) => queryOptions<DummyAResponse, DefaultError, DummyAResponse, ReturnType<typeof dummyAQueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await dummyA({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: dummyAQueryKey(options)\n});\n\nexport const dummyBQueryKey = (options?: Options<DummyBData>) => createQueryKey('dummyB', options);\n\nexport const dummyBOptions = (options?: Options<DummyBData>) => queryOptions<DummyBResponse, DefaultError, DummyBResponse, ReturnType<typeof dummyBQueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await dummyB({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: dummyBQueryKey(options)\n});\n\nexport const callWithResponseQueryKey = (options?: Options<CallWithResponseData>) => createQueryKey('callWithResponse', options);\n\nexport const callWithResponseOptions = (options?: Options<CallWithResponseData>) => queryOptions<CallWithResponseResponse, DefaultError, CallWithResponseResponse, ReturnType<typeof callWithResponseQueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await callWithResponse({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: callWithResponseQueryKey(options)\n});\n\nexport const callWithDuplicateResponsesMutation = (options?: Partial<Options<CallWithDuplicateResponsesData>>): UseMutationOptions<CallWithDuplicateResponsesResponse, CallWithDuplicateResponsesError, Options<CallWithDuplicateResponsesData>> => {\n    const mutationOptions: UseMutationOptions<CallWithDuplicateResponsesResponse, CallWithDuplicateResponsesError, Options<CallWithDuplicateResponsesData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await callWithDuplicateResponses({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const callWithResponsesMutation = (options?: Partial<Options<CallWithResponsesData>>): UseMutationOptions<CallWithResponsesResponse, CallWithResponsesError, Options<CallWithResponsesData>> => {\n    const mutationOptions: UseMutationOptions<CallWithResponsesResponse, CallWithResponsesError, Options<CallWithResponsesData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await callWithResponses({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const collectionFormatQueryKey = (options: Options<CollectionFormatData>) => createQueryKey('collectionFormat', options);\n\nexport const collectionFormatOptions = (options: Options<CollectionFormatData>) => queryOptions<unknown, DefaultError, unknown, ReturnType<typeof collectionFormatQueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await collectionFormat({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: collectionFormatQueryKey(options)\n});\n\nexport const typesQueryKey = (options: Options<TypesData>) => createQueryKey('types', options);\n\nexport const typesOptions = (options: Options<TypesData>) => queryOptions<TypesResponse, DefaultError, TypesResponse, ReturnType<typeof typesQueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await types({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: typesQueryKey(options)\n});\n\nexport const uploadFileMutation = (options?: Partial<Options<UploadFileData>>): UseMutationOptions<UploadFileResponse, DefaultError, Options<UploadFileData>> => {\n    const mutationOptions: UseMutationOptions<UploadFileResponse, DefaultError, Options<UploadFileData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await uploadFile({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const fileResponseQueryKey = (options: Options<FileResponseData>) => createQueryKey('fileResponse', options);\n\nexport const fileResponseOptions = (options: Options<FileResponseData>) => queryOptions<FileResponseResponse, DefaultError, FileResponseResponse, ReturnType<typeof fileResponseQueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await fileResponse({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: fileResponseQueryKey(options)\n});\n\nexport const complexTypesQueryKey = (options: Options<ComplexTypesData>) => createQueryKey('complexTypes', options);\n\nexport const complexTypesOptions = (options: Options<ComplexTypesData>) => queryOptions<ComplexTypesResponse, DefaultError, ComplexTypesResponse, ReturnType<typeof complexTypesQueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await complexTypes({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: complexTypesQueryKey(options)\n});\n\nexport const multipartResponseQueryKey = (options?: Options<MultipartResponseData>) => createQueryKey('multipartResponse', options);\n\nexport const multipartResponseOptions = (options?: Options<MultipartResponseData>) => queryOptions<MultipartResponseResponse, DefaultError, MultipartResponseResponse, ReturnType<typeof multipartResponseQueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await multipartResponse({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: multipartResponseQueryKey(options)\n});\n\nexport const multipartRequestMutation = (options?: Partial<Options<MultipartRequestData>>): UseMutationOptions<unknown, DefaultError, Options<MultipartRequestData>> => {\n    const mutationOptions: UseMutationOptions<unknown, DefaultError, Options<MultipartRequestData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await multipartRequest({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const complexParamsMutation = (options?: Partial<Options<ComplexParamsData>>): UseMutationOptions<ComplexParamsResponse, DefaultError, Options<ComplexParamsData>> => {\n    const mutationOptions: UseMutationOptions<ComplexParamsResponse, DefaultError, Options<ComplexParamsData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await complexParams({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const callWithResultFromHeaderMutation = (options?: Partial<Options<CallWithResultFromHeaderData>>): UseMutationOptions<unknown, DefaultError, Options<CallWithResultFromHeaderData>> => {\n    const mutationOptions: UseMutationOptions<unknown, DefaultError, Options<CallWithResultFromHeaderData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await callWithResultFromHeader({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const testErrorCodeMutation = (options?: Partial<Options<TestErrorCodeData>>): UseMutationOptions<unknown, DefaultError, Options<TestErrorCodeData>> => {\n    const mutationOptions: UseMutationOptions<unknown, DefaultError, Options<TestErrorCodeData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await testErrorCode({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const nonAsciiæøåÆøÅöôêÊ字符串Mutation = (options?: Partial<Options<NonAsciiæøåÆøÅöôêÊ字符串Data>>): UseMutationOptions<NonAsciiæøåÆøÅöôêÊ字符串Response, DefaultError, Options<NonAsciiæøåÆøÅöôêÊ字符串Data>> => {\n    const mutationOptions: UseMutationOptions<NonAsciiæøåÆøÅöôêÊ字符串Response, DefaultError, Options<NonAsciiæøåÆøÅöôêÊ字符串Data>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await nonAsciiæøåÆøÅöôêÊ字符串({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\n/**\n * Login User\n */\nexport const putWithFormUrlEncodedMutation = (options?: Partial<Options<PutWithFormUrlEncodedData>>): UseMutationOptions<unknown, DefaultError, Options<PutWithFormUrlEncodedData>> => {\n    const mutationOptions: UseMutationOptions<unknown, DefaultError, Options<PutWithFormUrlEncodedData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await putWithFormUrlEncoded({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/vue-query/fetch/client/client.gen.ts",
    "content": "// 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 (options: RequestOptions) => {\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 url = buildUrl(opts);\n\n    return { opts, url };\n  };\n\n  const request: Client['request'] = async (options) => {\n    // @ts-expect-error\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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/vue-query/fetch/client/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type { Auth } from '../core/auth.gen';\nexport type { QuerySerializerOptions } from '../core/bodySerializer.gen';\nexport {\n  formDataBodySerializer,\n  jsonBodySerializer,\n  urlSearchParamsBodySerializer,\n} from '../core/bodySerializer.gen';\nexport { buildClientParams } from '../core/params.gen';\nexport { serializeQueryKeyValue } from '../core/queryKeySerializer.gen';\nexport { createClient } from './client.gen';\nexport type {\n  Client,\n  ClientOptions,\n  Config,\n  CreateClientConfig,\n  Options,\n  RequestOptions,\n  RequestResult,\n  ResolvedRequestOptions,\n  ResponseStyle,\n  TDataShape,\n} from './types.gen';\nexport { createConfig, mergeHeaders } from './utils.gen';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/vue-query/fetch/client/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { Auth } from '../core/auth.gen';\nimport type {\n  ServerSentEventsOptions,\n  ServerSentEventsResult,\n} from '../core/serverSentEvents.gen';\nimport type { Client as CoreClient, Config as CoreConfig } from '../core/types.gen';\nimport type { Middleware } from './utils.gen';\n\nexport type ResponseStyle = 'data' | 'fields';\n\nexport interface Config<T extends ClientOptions = ClientOptions>\n  extends Omit<RequestInit, 'body' | 'headers' | 'method'>, CoreConfig {\n  /**\n   * Base URL for all requests made by this client.\n   */\n  baseUrl?: T['baseUrl'];\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   * Please don't use the Fetch client for Next.js applications. The `next`\n   * options won't have any effect.\n   *\n   * Install {@link https://www.npmjs.com/package/@hey-api/client-next `@hey-api/client-next`} instead.\n   */\n  next?: never;\n  /**\n   * Return the response data parsed in a specified format. By default, `auto`\n   * will infer the appropriate method from the `Content-Type` response header.\n   * You can override this behavior with any of the {@link Body} methods.\n   * Select `stream` if you don't want to parse response data at all.\n   *\n   * @default 'auto'\n   */\n  parseAs?: 'arrayBuffer' | 'auto' | 'blob' | 'formData' | 'json' | 'stream' | 'text';\n  /**\n   * Should we return only data or multiple fields (data, error, response, etc.)?\n   *\n   * @default 'fields'\n   */\n  responseStyle?: ResponseStyle;\n  /**\n   * Throw an error instead of returning it in the response?\n   *\n   * @default false\n   */\n  throwOnError?: T['throwOnError'];\n}\n\nexport interface RequestOptions<\n  TData = unknown,\n  TResponseStyle extends ResponseStyle = 'fields',\n  ThrowOnError extends boolean = boolean,\n  Url extends string = string,\n>\n  extends\n    Config<{\n      responseStyle: TResponseStyle;\n      throwOnError: ThrowOnError;\n    }>,\n    Pick<\n      ServerSentEventsOptions<TData>,\n      | 'onRequest'\n      | 'onSseError'\n      | 'onSseEvent'\n      | 'sseDefaultRetryDelay'\n      | 'sseMaxRetryAttempts'\n      | 'sseMaxRetryDelay'\n    > {\n  /**\n   * Any body that you want to add to your request.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/fetch#body}\n   */\n  body?: unknown;\n  path?: Record<string, unknown>;\n  query?: Record<string, unknown>;\n  /**\n   * Security mechanism(s) to use for the request.\n   */\n  security?: ReadonlyArray<Auth>;\n  url: Url;\n}\n\nexport interface ResolvedRequestOptions<\n  TResponseStyle extends ResponseStyle = 'fields',\n  ThrowOnError extends boolean = boolean,\n  Url extends string = string,\n> extends RequestOptions<unknown, TResponseStyle, ThrowOnError, Url> {\n  serializedBody?: string;\n}\n\nexport type RequestResult<\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = boolean,\n  TResponseStyle extends ResponseStyle = 'fields',\n> = ThrowOnError extends true\n  ? Promise<\n      TResponseStyle extends 'data'\n        ? TData extends Record<string, unknown>\n          ? TData[keyof TData]\n          : TData\n        : {\n            data: TData extends Record<string, unknown> ? TData[keyof TData] : TData;\n            request: Request;\n            response: Response;\n          }\n    >\n  : Promise<\n      TResponseStyle extends 'data'\n        ? (TData extends Record<string, unknown> ? TData[keyof TData] : TData) | undefined\n        : (\n            | {\n                data: TData extends Record<string, unknown> ? TData[keyof TData] : TData;\n                error: undefined;\n              }\n            | {\n                data: undefined;\n                error: TError extends Record<string, unknown> ? TError[keyof TError] : TError;\n              }\n          ) & {\n            request: Request;\n            response: Response;\n          }\n    >;\n\nexport interface ClientOptions {\n  baseUrl?: string;\n  responseStyle?: ResponseStyle;\n  throwOnError?: boolean;\n}\n\ntype MethodFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'>,\n) => RequestResult<TData, TError, ThrowOnError, TResponseStyle>;\n\ntype SseFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'>,\n) => Promise<ServerSentEventsResult<TData, TError>>;\n\ntype RequestFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'> &\n    Pick<Required<RequestOptions<TData, TResponseStyle, ThrowOnError>>, 'method'>,\n) => RequestResult<TData, TError, ThrowOnError, TResponseStyle>;\n\ntype BuildUrlFn = <\n  TData extends {\n    body?: unknown;\n    path?: Record<string, unknown>;\n    query?: Record<string, unknown>;\n    url: string;\n  },\n>(\n  options: TData & Options<TData>,\n) => string;\n\nexport type Client = CoreClient<RequestFn, Config, MethodFn, BuildUrlFn, SseFn> & {\n  interceptors: Middleware<Request, Response, unknown, ResolvedRequestOptions>;\n};\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 = ClientOptions> = (\n  override?: Config<ClientOptions & T>,\n) => Config<Required<ClientOptions> & T>;\n\nexport interface TDataShape {\n  body?: unknown;\n  headers?: unknown;\n  path?: unknown;\n  query?: unknown;\n  url: string;\n}\n\ntype OmitKeys<T, K> = Pick<T, Exclude<keyof T, K>>;\n\nexport type Options<\n  TData extends TDataShape = TDataShape,\n  ThrowOnError extends boolean = boolean,\n  TResponse = unknown,\n  TResponseStyle extends ResponseStyle = 'fields',\n> = OmitKeys<\n  RequestOptions<TResponse, TResponseStyle, ThrowOnError>,\n  'body' | 'path' | 'query' | 'url'\n> &\n  ([TData] extends [never] ? unknown : Omit<TData, 'url'>);\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/vue-query/fetch/client/utils.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/vue-query/fetch/client.gen.ts",
    "content": "// 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: 'http://localhost:3000/base' }));\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/vue-query/fetch/core/auth.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/vue-query/fetch/core/bodySerializer.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/vue-query/fetch/core/params.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/vue-query/fetch/core/pathSerializer.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/vue-query/fetch/core/queryKeySerializer.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\n/**\n * JSON-friendly union that mirrors what Pinia Colada can hash.\n */\nexport type JsonValue =\n  | null\n  | string\n  | number\n  | boolean\n  | JsonValue[]\n  | { [key: string]: JsonValue };\n\n/**\n * Replacer that converts non-JSON values (bigint, Date, etc.) to safe substitutes.\n */\nexport const queryKeyJsonReplacer = (_key: string, value: unknown) => {\n  if (value === undefined || typeof value === 'function' || typeof value === 'symbol') {\n    return undefined;\n  }\n  if (typeof value === 'bigint') {\n    return value.toString();\n  }\n  if (value instanceof Date) {\n    return value.toISOString();\n  }\n  return value;\n};\n\n/**\n * Safely stringifies a value and parses it back into a JsonValue.\n */\nexport const stringifyToJsonValue = (input: unknown): JsonValue | undefined => {\n  try {\n    const json = JSON.stringify(input, queryKeyJsonReplacer);\n    if (json === undefined) {\n      return undefined;\n    }\n    return JSON.parse(json) as JsonValue;\n  } catch {\n    return undefined;\n  }\n};\n\n/**\n * Detects plain objects (including objects with a null prototype).\n */\nconst isPlainObject = (value: unknown): value is Record<string, unknown> => {\n  if (value === null || typeof value !== 'object') {\n    return false;\n  }\n  const prototype = Object.getPrototypeOf(value as object);\n  return prototype === Object.prototype || prototype === null;\n};\n\n/**\n * Turns URLSearchParams into a sorted JSON object for deterministic keys.\n */\nconst serializeSearchParams = (params: URLSearchParams): JsonValue => {\n  const entries = Array.from(params.entries()).sort(([a], [b]) => a.localeCompare(b));\n  const result: Record<string, JsonValue> = {};\n\n  for (const [key, value] of entries) {\n    const existing = result[key];\n    if (existing === undefined) {\n      result[key] = value;\n      continue;\n    }\n\n    if (Array.isArray(existing)) {\n      (existing as string[]).push(value);\n    } else {\n      result[key] = [existing, value];\n    }\n  }\n\n  return result;\n};\n\n/**\n * Normalizes any accepted value into a JSON-friendly shape for query keys.\n */\nexport const serializeQueryKeyValue = (value: unknown): JsonValue | undefined => {\n  if (value === null) {\n    return null;\n  }\n\n  if (typeof value === 'string' || typeof value === 'number' || typeof value === 'boolean') {\n    return value;\n  }\n\n  if (value === undefined || typeof value === 'function' || typeof value === 'symbol') {\n    return undefined;\n  }\n\n  if (typeof value === 'bigint') {\n    return value.toString();\n  }\n\n  if (value instanceof Date) {\n    return value.toISOString();\n  }\n\n  if (Array.isArray(value)) {\n    return stringifyToJsonValue(value);\n  }\n\n  if (typeof URLSearchParams !== 'undefined' && value instanceof URLSearchParams) {\n    return serializeSearchParams(value);\n  }\n\n  if (isPlainObject(value)) {\n    return stringifyToJsonValue(value);\n  }\n\n  return undefined;\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/vue-query/fetch/core/serverSentEvents.gen.ts",
    "content": "// 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 const 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            // Normalize line endings: CRLF -> LF, then CR -> LF\n            buffer = buffer.replace(/\\r\\n/g, '\\n').replace(/\\r/g, '\\n');\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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/vue-query/fetch/core/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { Auth, AuthToken } from './auth.gen';\nimport type { BodySerializer, QuerySerializer, QuerySerializerOptions } from './bodySerializer.gen';\n\nexport type HttpMethod =\n  | 'connect'\n  | 'delete'\n  | 'get'\n  | 'head'\n  | 'options'\n  | 'patch'\n  | 'post'\n  | 'put'\n  | 'trace';\n\nexport type Client<\n  RequestFn = never,\n  Config = unknown,\n  MethodFn = never,\n  BuildUrlFn = never,\n  SseFn = never,\n> = {\n  /**\n   * Returns the final request URL.\n   */\n  buildUrl: BuildUrlFn;\n  getConfig: () => Config;\n  request: RequestFn;\n  setConfig: (config: Config) => Config;\n} & {\n  [K in HttpMethod]: MethodFn;\n} & ([SseFn] extends [never] ? { sse?: never } : { sse: { [K in HttpMethod]: SseFn } });\n\nexport interface Config {\n  /**\n   * Auth token or a function returning auth token. The resolved value will be\n   * added to the request payload as defined by its `security` array.\n   */\n  auth?: ((auth: Auth) => Promise<AuthToken> | AuthToken) | AuthToken;\n  /**\n   * A function for serializing request body parameter. By default,\n   * {@link JSON.stringify()} will be used.\n   */\n  bodySerializer?: BodySerializer | null;\n  /**\n   * An object containing any HTTP headers that you want to pre-populate your\n   * `Headers` object with.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/Headers/Headers#init See more}\n   */\n  headers?:\n    | RequestInit['headers']\n    | Record<\n        string,\n        string | number | boolean | (string | number | boolean)[] | null | undefined | unknown\n      >;\n  /**\n   * The request method.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/fetch#method See more}\n   */\n  method?: Uppercase<HttpMethod>;\n  /**\n   * A function for serializing request query parameters. By default, arrays\n   * will be exploded in form style, objects will be exploded in deepObject\n   * style, and reserved characters are percent-encoded.\n   *\n   * This method will have no effect if the native `paramsSerializer()` Axios\n   * API function is used.\n   *\n   * {@link https://swagger.io/docs/specification/serialization/#query View examples}\n   */\n  querySerializer?: QuerySerializer | QuerySerializerOptions;\n  /**\n   * A function validating request data. This is useful if you want to ensure\n   * the request conforms to the desired shape, so it can be safely sent to\n   * the server.\n   */\n  requestValidator?: (data: unknown) => Promise<unknown>;\n  /**\n   * A function transforming response data before it's returned. This is useful\n   * for post-processing data, e.g. converting ISO strings into Date objects.\n   */\n  responseTransformer?: (data: unknown) => Promise<unknown>;\n  /**\n   * A function validating response data. This is useful if you want to ensure\n   * the response conforms to the desired shape, so it can be safely passed to\n   * the transformers and returned to the user.\n   */\n  responseValidator?: (data: unknown) => Promise<unknown>;\n}\n\ntype IsExactlyNeverOrNeverUndefined<T> = [T] extends [never]\n  ? true\n  : [T] extends [never | undefined]\n    ? [undefined] extends [T]\n      ? false\n      : true\n    : false;\n\nexport type OmitNever<T extends Record<string, unknown>> = {\n  [K in keyof T as IsExactlyNeverOrNeverUndefined<T[K]> extends true ? never : K]: T[K];\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/vue-query/fetch/core/utils.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/vue-query/fetch/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport { apiVVersionODataControllerCount, callToTestOrderOfParams, callWithDefaultOptionalParameters, callWithDefaultParameters, callWithDescriptions, callWithDuplicateResponses, callWithNoContentResponse, callWithParameters, callWithResponse, callWithResponseAndNoContentResponse, callWithResponses, callWithResultFromHeader, callWithWeirdParameterNames, collectionFormat, complexParams, complexTypes, deleteCallWithoutParametersAndResponse, deleteFoo, deprecatedCall, dummyA, dummyB, duplicateName, duplicateName2, duplicateName3, duplicateName4, export_, fileResponse, fooWow, getApiVbyApiVersionSimpleOperation, getCallWithOptionalParam, getCallWithoutParametersAndResponse, headCallWithoutParametersAndResponse, import_, multipartRequest, multipartResponse, nonAsciiæøåÆøÅöôêÊ字符串, type Options, optionsCallWithoutParametersAndResponse, patchApiVbyApiVersionNoTag, patchCallWithoutParametersAndResponse, postApiVbyApiVersionFormData, postApiVbyApiVersionRequestBody, postCallWithOptionalParam, postCallWithoutParametersAndResponse, putCallWithoutParametersAndResponse, putWithFormUrlEncoded, testErrorCode, types, uploadFile } from './sdk.gen';\nexport type { _3eNum1Период, _400, AdditionalPropertiesIntegerIssue, AdditionalPropertiesUnknownIssue, AdditionalPropertiesUnknownIssue2, AdditionalPropertiesUnknownIssue3, AdditionalPropertiesUnknownIssueWritable, AnyOfAnyAndNull, AnyOfArrays, ApiVVersionODataControllerCountData, ApiVVersionODataControllerCountResponse, ApiVVersionODataControllerCountResponses, ArrayWithAnyOfProperties, ArrayWithArray, ArrayWithBooleans, ArrayWithNumbers, ArrayWithProperties, ArrayWithReferences, ArrayWithStrings, CallToTestOrderOfParamsData, CallWithDefaultOptionalParametersData, CallWithDefaultParametersData, CallWithDescriptionsData, CallWithDuplicateResponsesData, CallWithDuplicateResponsesError, CallWithDuplicateResponsesErrors, CallWithDuplicateResponsesResponse, CallWithDuplicateResponsesResponses, CallWithNoContentResponseData, CallWithNoContentResponseResponse, CallWithNoContentResponseResponses, CallWithParametersData, CallWithResponseAndNoContentResponseData, CallWithResponseAndNoContentResponseResponse, CallWithResponseAndNoContentResponseResponses, CallWithResponseData, CallWithResponseResponse, CallWithResponseResponses, CallWithResponsesData, CallWithResponsesError, CallWithResponsesErrors, CallWithResponsesResponse, CallWithResponsesResponses, CallWithResultFromHeaderData, CallWithResultFromHeaderErrors, CallWithResultFromHeaderResponses, CallWithWeirdParameterNamesData, CamelCaseCommentWithBreaks, CharactersInDescription, ClientOptions, CollectionFormatData, CommentWithBackticks, CommentWithBackticksAndQuotes, CommentWithBreaks, CommentWithExpressionPlaceholders, CommentWithQuotes, CommentWithReservedCharacters, CommentWithSlashes, ComplexParamsData, ComplexParamsResponse, ComplexParamsResponses, ComplexTypesData, ComplexTypesErrors, ComplexTypesResponse, ComplexTypesResponses, CompositionBaseModel, CompositionExtendedModel, CompositionWithAllOfAndNullable, CompositionWithAnyOf, CompositionWithAnyOfAndNullable, CompositionWithAnyOfAnonymous, CompositionWithNestedAnyAndTypeNull, CompositionWithNestedAnyOfAndNull, CompositionWithOneOf, CompositionWithOneOfAndComplexArrayDictionary, CompositionWithOneOfAndNullable, CompositionWithOneOfAndProperties, CompositionWithOneOfAndSimpleArrayDictionary, CompositionWithOneOfAndSimpleDictionary, CompositionWithOneOfAnonymous, CompositionWithOneOfDiscriminator, ConstValue, Default, DeleteCallWithoutParametersAndResponseData, DeleteFooData, DeleteFooData2, DeleteFooData3, DeprecatedCallData, DeprecatedModel, DictionaryWithArray, DictionaryWithDictionary, DictionaryWithProperties, DictionaryWithPropertiesAndAdditionalProperties, DictionaryWithReference, DictionaryWithString, DummyAData, DummyAResponse, DummyAResponses, DummyBData, DummyBResponse, DummyBResponses, DuplicateName2Data, DuplicateName3Data, DuplicateName4Data, DuplicateNameData, EnumFromDescription, EnumWithExtensions, EnumWithNumbers, EnumWithReplacedCharacters, EnumWithStrings, EnumWithXEnumNames, ExportData, ExternalRefA, ExternalRefB, ExternalSharedModel, File, FileResponseData, FileResponseResponse, FileResponseResponses, FileWritable, FooWowData, FooWowResponses, FreeFormObjectWithAdditionalPropertiesEqEmptyObject, FreeFormObjectWithAdditionalPropertiesEqTrue, FreeFormObjectWithoutAdditionalProperties, GenericSchemaDuplicateIssue1SystemBoolean, GenericSchemaDuplicateIssue1SystemBooleanWritable, GenericSchemaDuplicateIssue1SystemString, GenericSchemaDuplicateIssue1SystemStringWritable, GetApiVbyApiVersionSimpleOperationData, GetApiVbyApiVersionSimpleOperationError, GetApiVbyApiVersionSimpleOperationErrors, GetApiVbyApiVersionSimpleOperationResponse, GetApiVbyApiVersionSimpleOperationResponses, GetCallWithOptionalParamData, GetCallWithoutParametersAndResponseData, HeadCallWithoutParametersAndResponseData, Import, ImportData, ImportResponse, ImportResponses, IoK8sApimachineryPkgApisMetaV1DeleteOptions, IoK8sApimachineryPkgApisMetaV1Preconditions, ModelCircle, ModelFromZendesk, ModelSquare, ModelThatExtends, ModelThatExtendsExtends, ModelWithAdditionalPropertiesEqTrue, ModelWithAdditionalPropertiesRef, ModelWithAnyOfConstantSizeArray, ModelWithAnyOfConstantSizeArrayAndIntersect, ModelWithAnyOfConstantSizeArrayNullable, ModelWithAnyOfConstantSizeArrayWithNSizeAndOptions, ModelWithAnyOfConstantSizeArrayWithNSizeAndOptionsWritable, ModelWithArray, ModelWithArrayReadOnlyAndWriteOnly, ModelWithArrayReadOnlyAndWriteOnlyWritable, ModelWithBackticksInDescription, ModelWithBoolean, ModelWithCircularReference, ModelWithConst, ModelWithConstantSizeArray, ModelWithDictionary, ModelWithDuplicateImports, ModelWithDuplicateProperties, ModelWithEnum, ModelWithEnumFromDescription, ModelWithEnumWithHyphen, ModelWithInteger, ModelWithNestedArrayEnums, ModelWithNestedArrayEnumsData, ModelWithNestedArrayEnumsDataBar, ModelWithNestedArrayEnumsDataFoo, ModelWithNestedCompositionEnums, ModelWithNestedEnums, ModelWithNestedProperties, ModelWithNullableObject, ModelWithNullableString, ModelWithNumericEnumUnion, ModelWithOneOfAndProperties, ModelWithOneOfEnum, ModelWithOrderedProperties, ModelWithPattern, ModelWithPatternWritable, ModelWithPrefixItemsConstantSizeArray, ModelWithProperties, ModelWithPropertiesWritable, ModelWithReadOnlyAndWriteOnly, ModelWithReadOnlyAndWriteOnlyWritable, ModelWithReference, ModelWithReferenceWritable, ModelWithString, ModelWithStringError, MultipartRequestData, MultipartResponseData, MultipartResponseResponse, MultipartResponseResponses, NestedAnyOfArraysNullable, NonAsciiæøåÆøÅöôêÊ字符串Data, NonAsciiæøåÆøÅöôêÊ字符串Response, NonAsciiæøåÆøÅöôêÊ字符串Responses, NonAsciiStringæøåÆøÅöôêÊ字符串, NullableObject, OneOfAllOfIssue, OneOfAllOfIssueWritable, OptionsCallWithoutParametersAndResponseData, Pageable, ParameterSimpleParameterUnused, PatchApiVbyApiVersionNoTagData, PatchApiVbyApiVersionNoTagResponses, PatchCallWithoutParametersAndResponseData, PostApiVbyApiVersionFormDataData, PostApiVbyApiVersionRequestBodyData, PostCallWithOptionalParamData, PostCallWithOptionalParamResponse, PostCallWithOptionalParamResponses, PostCallWithoutParametersAndResponseData, PostServiceWithEmptyTagResponse, PostServiceWithEmptyTagResponse2, PutCallWithoutParametersAndResponseData, PutWithFormUrlEncodedData, SchemaWithFormRestrictedKeys, SimpleBoolean, SimpleFile, SimpleFormData, SimpleInteger, SimpleParameter, SimpleReference, SimpleRequestBody, SimpleString, SimpleStringWithPattern, TestErrorCodeData, TestErrorCodeErrors, TestErrorCodeResponses, TypesData, TypesResponse, TypesResponses, UploadFileData, UploadFileResponse, UploadFileResponses, XFooBar } from './types.gen';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/vue-query/fetch/sdk.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport { type Client, formDataBodySerializer, type Options as Options2, type TDataShape, urlSearchParamsBodySerializer } from './client';\nimport { client } from './client.gen';\nimport type { ApiVVersionODataControllerCountData, ApiVVersionODataControllerCountResponses, CallToTestOrderOfParamsData, CallWithDefaultOptionalParametersData, CallWithDefaultParametersData, CallWithDescriptionsData, CallWithDuplicateResponsesData, CallWithDuplicateResponsesErrors, CallWithDuplicateResponsesResponses, CallWithNoContentResponseData, CallWithNoContentResponseResponses, CallWithParametersData, CallWithResponseAndNoContentResponseData, CallWithResponseAndNoContentResponseResponses, CallWithResponseData, CallWithResponseResponses, CallWithResponsesData, CallWithResponsesErrors, CallWithResponsesResponses, CallWithResultFromHeaderData, CallWithResultFromHeaderErrors, CallWithResultFromHeaderResponses, CallWithWeirdParameterNamesData, CollectionFormatData, ComplexParamsData, ComplexParamsResponses, ComplexTypesData, ComplexTypesErrors, ComplexTypesResponses, DeleteCallWithoutParametersAndResponseData, DeleteFooData3, DeprecatedCallData, DummyAData, DummyAResponses, DummyBData, DummyBResponses, DuplicateName2Data, DuplicateName3Data, DuplicateName4Data, DuplicateNameData, ExportData, FileResponseData, FileResponseResponses, FooWowData, FooWowResponses, GetApiVbyApiVersionSimpleOperationData, GetApiVbyApiVersionSimpleOperationErrors, GetApiVbyApiVersionSimpleOperationResponses, GetCallWithOptionalParamData, GetCallWithoutParametersAndResponseData, HeadCallWithoutParametersAndResponseData, ImportData, ImportResponses, MultipartRequestData, MultipartResponseData, MultipartResponseResponses, NonAsciiæøåÆøÅöôêÊ字符串Data, NonAsciiæøåÆøÅöôêÊ字符串Responses, OptionsCallWithoutParametersAndResponseData, PatchApiVbyApiVersionNoTagData, PatchApiVbyApiVersionNoTagResponses, PatchCallWithoutParametersAndResponseData, PostApiVbyApiVersionFormDataData, PostApiVbyApiVersionRequestBodyData, PostCallWithOptionalParamData, PostCallWithOptionalParamResponses, PostCallWithoutParametersAndResponseData, PutCallWithoutParametersAndResponseData, PutWithFormUrlEncodedData, TestErrorCodeData, TestErrorCodeErrors, TestErrorCodeResponses, TypesData, TypesResponses, UploadFileData, UploadFileResponses } from './types.gen';\n\nexport type Options<TData extends TDataShape = TDataShape, ThrowOnError extends boolean = boolean> = Options2<TData, ThrowOnError> & {\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\nexport const export_ = <ThrowOnError extends boolean = false>(options?: Options<ExportData, ThrowOnError>) => (options?.client ?? client).get<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/no+tag', ...options });\n\nexport const patchApiVbyApiVersionNoTag = <ThrowOnError extends boolean = false>(options?: Options<PatchApiVbyApiVersionNoTagData, ThrowOnError>) => (options?.client ?? client).patch<PatchApiVbyApiVersionNoTagResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/no+tag', ...options });\n\nexport const import_ = <ThrowOnError extends boolean = false>(options: Options<ImportData, ThrowOnError>) => (options.client ?? client).post<ImportResponses, unknown, ThrowOnError>({\n    url: '/api/v{api-version}/no+tag',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options.headers\n    }\n});\n\nexport const fooWow = <ThrowOnError extends boolean = false>(options?: Options<FooWowData, ThrowOnError>) => (options?.client ?? client).put<FooWowResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/no+tag', ...options });\n\nexport const apiVVersionODataControllerCount = <ThrowOnError extends boolean = false>(options?: Options<ApiVVersionODataControllerCountData, ThrowOnError>) => (options?.client ?? client).get<ApiVVersionODataControllerCountResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple/$count', ...options });\n\nexport const getApiVbyApiVersionSimpleOperation = <ThrowOnError extends boolean = false>(options: Options<GetApiVbyApiVersionSimpleOperationData, ThrowOnError>) => (options.client ?? client).get<GetApiVbyApiVersionSimpleOperationResponses, GetApiVbyApiVersionSimpleOperationErrors, ThrowOnError>({ url: '/api/v{api-version}/simple:operation', ...options });\n\nexport const deleteCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<DeleteCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).delete<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const getCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<GetCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).get<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const headCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<HeadCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).head<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const optionsCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<OptionsCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).options<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const patchCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<PatchCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).patch<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const postCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<PostCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).post<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const putCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<PutCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).put<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const deleteFoo = <ThrowOnError extends boolean = false>(options: Options<DeleteFooData3, ThrowOnError>) => (options.client ?? client).delete<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/foo/{foo_param}/bar/{BarParam}', ...options });\n\nexport const callWithDescriptions = <ThrowOnError extends boolean = false>(options?: Options<CallWithDescriptionsData, ThrowOnError>) => (options?.client ?? client).post<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/descriptions', ...options });\n\n/**\n * @deprecated\n */\nexport const deprecatedCall = <ThrowOnError extends boolean = false>(options: Options<DeprecatedCallData, ThrowOnError>) => (options.client ?? client).post<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/parameters/deprecated', ...options });\n\nexport const callWithParameters = <ThrowOnError extends boolean = false>(options: Options<CallWithParametersData, ThrowOnError>) => (options.client ?? client).post<unknown, unknown, ThrowOnError>({\n    url: '/api/v{api-version}/parameters/{parameterPath}',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options.headers\n    }\n});\n\nexport const callWithWeirdParameterNames = <ThrowOnError extends boolean = false>(options: Options<CallWithWeirdParameterNamesData, ThrowOnError>) => (options.client ?? client).post<unknown, unknown, ThrowOnError>({\n    url: '/api/v{api-version}/parameters/{parameter.path.1}/{parameter-path-2}/{PARAMETER-PATH-3}',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options.headers\n    }\n});\n\nexport const getCallWithOptionalParam = <ThrowOnError extends boolean = false>(options: Options<GetCallWithOptionalParamData, ThrowOnError>) => (options.client ?? client).get<unknown, unknown, ThrowOnError>({\n    url: '/api/v{api-version}/parameters',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options.headers\n    }\n});\n\nexport const postCallWithOptionalParam = <ThrowOnError extends boolean = false>(options: Options<PostCallWithOptionalParamData, ThrowOnError>) => (options.client ?? client).post<PostCallWithOptionalParamResponses, unknown, ThrowOnError>({\n    url: '/api/v{api-version}/parameters',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options.headers\n    }\n});\n\nexport const postApiVbyApiVersionRequestBody = <ThrowOnError extends boolean = false>(options?: Options<PostApiVbyApiVersionRequestBodyData, ThrowOnError>) => (options?.client ?? client).post<unknown, unknown, ThrowOnError>({\n    url: '/api/v{api-version}/requestBody',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options?.headers\n    }\n});\n\nexport const postApiVbyApiVersionFormData = <ThrowOnError extends boolean = false>(options?: Options<PostApiVbyApiVersionFormDataData, ThrowOnError>) => (options?.client ?? client).post<unknown, unknown, ThrowOnError>({\n    ...formDataBodySerializer,\n    url: '/api/v{api-version}/formData',\n    ...options,\n    headers: {\n        'Content-Type': null,\n        ...options?.headers\n    }\n});\n\nexport const callWithDefaultParameters = <ThrowOnError extends boolean = false>(options?: Options<CallWithDefaultParametersData, ThrowOnError>) => (options?.client ?? client).get<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/defaults', ...options });\n\nexport const callWithDefaultOptionalParameters = <ThrowOnError extends boolean = false>(options?: Options<CallWithDefaultOptionalParametersData, ThrowOnError>) => (options?.client ?? client).post<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/defaults', ...options });\n\nexport const callToTestOrderOfParams = <ThrowOnError extends boolean = false>(options: Options<CallToTestOrderOfParamsData, ThrowOnError>) => (options.client ?? client).put<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/defaults', ...options });\n\nexport const duplicateName = <ThrowOnError extends boolean = false>(options?: Options<DuplicateNameData, ThrowOnError>) => (options?.client ?? client).delete<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/duplicate', ...options });\n\nexport const duplicateName2 = <ThrowOnError extends boolean = false>(options?: Options<DuplicateName2Data, ThrowOnError>) => (options?.client ?? client).get<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/duplicate', ...options });\n\nexport const duplicateName3 = <ThrowOnError extends boolean = false>(options?: Options<DuplicateName3Data, ThrowOnError>) => (options?.client ?? client).post<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/duplicate', ...options });\n\nexport const duplicateName4 = <ThrowOnError extends boolean = false>(options?: Options<DuplicateName4Data, ThrowOnError>) => (options?.client ?? client).put<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/duplicate', ...options });\n\nexport const callWithNoContentResponse = <ThrowOnError extends boolean = false>(options?: Options<CallWithNoContentResponseData, ThrowOnError>) => (options?.client ?? client).get<CallWithNoContentResponseResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/no-content', ...options });\n\nexport const callWithResponseAndNoContentResponse = <ThrowOnError extends boolean = false>(options?: Options<CallWithResponseAndNoContentResponseData, ThrowOnError>) => (options?.client ?? client).get<CallWithResponseAndNoContentResponseResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/multiple-tags/response-and-no-content', ...options });\n\nexport const dummyA = <ThrowOnError extends boolean = false>(options?: Options<DummyAData, ThrowOnError>) => (options?.client ?? client).get<DummyAResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/multiple-tags/a', ...options });\n\nexport const dummyB = <ThrowOnError extends boolean = false>(options?: Options<DummyBData, ThrowOnError>) => (options?.client ?? client).get<DummyBResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/multiple-tags/b', ...options });\n\nexport const callWithResponse = <ThrowOnError extends boolean = false>(options?: Options<CallWithResponseData, ThrowOnError>) => (options?.client ?? client).get<CallWithResponseResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/response', ...options });\n\nexport const callWithDuplicateResponses = <ThrowOnError extends boolean = false>(options?: Options<CallWithDuplicateResponsesData, ThrowOnError>) => (options?.client ?? client).post<CallWithDuplicateResponsesResponses, CallWithDuplicateResponsesErrors, ThrowOnError>({ url: '/api/v{api-version}/response', ...options });\n\nexport const callWithResponses = <ThrowOnError extends boolean = false>(options?: Options<CallWithResponsesData, ThrowOnError>) => (options?.client ?? client).put<CallWithResponsesResponses, CallWithResponsesErrors, ThrowOnError>({ url: '/api/v{api-version}/response', ...options });\n\nexport const collectionFormat = <ThrowOnError extends boolean = false>(options: Options<CollectionFormatData, ThrowOnError>) => (options.client ?? client).get<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/collectionFormat', ...options });\n\nexport const types = <ThrowOnError extends boolean = false>(options: Options<TypesData, ThrowOnError>) => (options.client ?? client).get<TypesResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/types', ...options });\n\nexport const uploadFile = <ThrowOnError extends boolean = false>(options: Options<UploadFileData, ThrowOnError>) => (options.client ?? client).post<UploadFileResponses, unknown, ThrowOnError>({\n    ...urlSearchParamsBodySerializer,\n    url: '/api/v{api-version}/upload',\n    ...options,\n    headers: {\n        'Content-Type': 'application/x-www-form-urlencoded',\n        ...options.headers\n    }\n});\n\nexport const fileResponse = <ThrowOnError extends boolean = false>(options: Options<FileResponseData, ThrowOnError>) => (options.client ?? client).get<FileResponseResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/file/{id}', ...options });\n\nexport const complexTypes = <ThrowOnError extends boolean = false>(options: Options<ComplexTypesData, ThrowOnError>) => (options.client ?? client).get<ComplexTypesResponses, ComplexTypesErrors, ThrowOnError>({\n    querySerializer: { parameters: { parameterObject: { object: { style: 'form' } } } },\n    url: '/api/v{api-version}/complex',\n    ...options\n});\n\nexport const multipartResponse = <ThrowOnError extends boolean = false>(options?: Options<MultipartResponseData, ThrowOnError>) => (options?.client ?? client).get<MultipartResponseResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/multipart', ...options });\n\nexport const multipartRequest = <ThrowOnError extends boolean = false>(options?: Options<MultipartRequestData, ThrowOnError>) => (options?.client ?? client).post<unknown, unknown, ThrowOnError>({\n    ...formDataBodySerializer,\n    url: '/api/v{api-version}/multipart',\n    ...options,\n    headers: {\n        'Content-Type': null,\n        ...options?.headers\n    }\n});\n\nexport const complexParams = <ThrowOnError extends boolean = false>(options: Options<ComplexParamsData, ThrowOnError>) => (options.client ?? client).put<ComplexParamsResponses, unknown, ThrowOnError>({\n    url: '/api/v{api-version}/complex/{id}',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json-patch+json',\n        ...options.headers\n    }\n});\n\nexport const callWithResultFromHeader = <ThrowOnError extends boolean = false>(options?: Options<CallWithResultFromHeaderData, ThrowOnError>) => (options?.client ?? client).post<CallWithResultFromHeaderResponses, CallWithResultFromHeaderErrors, ThrowOnError>({ url: '/api/v{api-version}/header', ...options });\n\nexport const testErrorCode = <ThrowOnError extends boolean = false>(options: Options<TestErrorCodeData, ThrowOnError>) => (options.client ?? client).post<TestErrorCodeResponses, TestErrorCodeErrors, ThrowOnError>({ url: '/api/v{api-version}/error', ...options });\n\nexport const nonAsciiæøåÆøÅöôêÊ字符串 = <ThrowOnError extends boolean = false>(options: Options<NonAsciiæøåÆøÅöôêÊ字符串Data, ThrowOnError>) => (options.client ?? client).post<NonAsciiæøåÆøÅöôêÊ字符串Responses, unknown, ThrowOnError>({ url: '/api/v{api-version}/non-ascii-æøåÆØÅöôêÊ字符串', ...options });\n\n/**\n * Login User\n */\nexport const putWithFormUrlEncoded = <ThrowOnError extends boolean = false>(options: Options<PutWithFormUrlEncodedData, ThrowOnError>) => (options.client ?? client).put<unknown, unknown, ThrowOnError>({\n    ...urlSearchParamsBodySerializer,\n    url: '/api/v{api-version}/non-ascii-æøåÆØÅöôêÊ字符串',\n    ...options,\n    headers: {\n        'Content-Type': 'application/x-www-form-urlencoded',\n        ...options.headers\n    }\n});\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/vue-query/fetch/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type ClientOptions = {\n    baseUrl: 'http://localhost:3000/base' | (string & {});\n};\n\n/**\n * Model with number-only name\n */\nexport type _400 = string;\n\nexport type ExternalRefA = ExternalSharedModel;\n\nexport type ExternalRefB = ExternalSharedModel;\n\n/**\n * Testing multiline comments in string: First line\n * Second line\n *\n * Fourth line\n */\nexport type CamelCaseCommentWithBreaks = number;\n\n/**\n * Testing multiline comments in string: First line\n * Second line\n *\n * Fourth line\n */\nexport type CommentWithBreaks = number;\n\n/**\n * Testing backticks in string: `backticks` and ```multiple backticks``` should work\n */\nexport type CommentWithBackticks = number;\n\n/**\n * Testing backticks and quotes in string: `backticks`, 'quotes', \"double quotes\" and ```multiple backticks``` should work\n */\nexport type CommentWithBackticksAndQuotes = number;\n\n/**\n * Testing slashes in string: \\backwards\\\\\\ and /forwards/// should work\n */\nexport type CommentWithSlashes = number;\n\n/**\n * Testing expression placeholders in string: ${expression} should work\n */\nexport type CommentWithExpressionPlaceholders = number;\n\n/**\n * Testing quotes in string: 'single quote''' and \"double quotes\"\"\" should work\n */\nexport type CommentWithQuotes = number;\n\n/**\n * Testing reserved characters in string: * inline * and ** inline ** should work\n */\nexport type CommentWithReservedCharacters = number;\n\n/**\n * This is a simple number\n */\nexport type SimpleInteger = number;\n\n/**\n * This is a simple boolean\n */\nexport type SimpleBoolean = boolean;\n\n/**\n * This is a simple string\n */\nexport type SimpleString = string;\n\n/**\n * A string with non-ascii (unicode) characters valid in typescript identifiers (æøåÆØÅöÔèÈ字符串)\n */\nexport type NonAsciiStringæøåÆøÅöôêÊ字符串 = string;\n\n/**\n * This is a simple file\n */\nexport type SimpleFile = Blob | File;\n\n/**\n * This is a simple reference\n */\nexport type SimpleReference = ModelWithString;\n\n/**\n * This is a simple string\n */\nexport type SimpleStringWithPattern = string | null;\n\n/**\n * This is a simple enum with strings\n */\nexport type EnumWithStrings = 'Success' | 'Warning' | 'Error' | '\\'Single Quote\\'' | '\"Double Quotes\"' | 'Non-ascii: øæåôöØÆÅÔÖ字符串';\n\nexport type EnumWithReplacedCharacters = '\\'Single Quote\\'' | '\"Double Quotes\"' | 'øæåôöØÆÅÔÖ字符串' | 3.1 | '';\n\n/**\n * This is a simple enum with numbers\n */\nexport type EnumWithNumbers = 1 | 2 | 3 | 1.1 | 1.2 | 1.3 | 100 | 200 | 300 | -100 | -200 | -300 | -1.1 | -1.2 | -1.3;\n\n/**\n * Success=1,Warning=2,Error=3\n */\nexport type EnumFromDescription = number;\n\n/**\n * This is a simple enum with numbers\n */\nexport type EnumWithExtensions = 200 | 400 | 500;\n\nexport type EnumWithXEnumNames = 0 | 1 | 2;\n\n/**\n * This is a simple array with numbers\n */\nexport type ArrayWithNumbers = Array<number>;\n\n/**\n * This is a simple array with booleans\n */\nexport type ArrayWithBooleans = Array<boolean>;\n\n/**\n * This is a simple array with strings\n */\nexport type ArrayWithStrings = Array<string>;\n\n/**\n * This is a simple array with references\n */\nexport type ArrayWithReferences = Array<ModelWithString>;\n\n/**\n * This is a simple array containing an array\n */\nexport type ArrayWithArray = Array<Array<ModelWithString>>;\n\n/**\n * This is a simple array with properties\n */\nexport type ArrayWithProperties = Array<{\n    '16x16'?: CamelCaseCommentWithBreaks;\n    bar?: string;\n}>;\n\n/**\n * This is a simple array with any of properties\n */\nexport type ArrayWithAnyOfProperties = Array<{\n    foo?: string;\n} | {\n    bar?: string;\n}>;\n\nexport type AnyOfAnyAndNull = {\n    data?: unknown;\n};\n\n/**\n * This is a simple array with any of properties\n */\nexport type AnyOfArrays = {\n    results?: Array<{\n        foo?: string;\n    } | {\n        bar?: string;\n    }>;\n};\n\n/**\n * This is a string dictionary\n */\nexport type DictionaryWithString = {\n    [key: string]: string;\n};\n\nexport type DictionaryWithPropertiesAndAdditionalProperties = {\n    foo?: number;\n    bar?: boolean;\n    [key: string]: string | number | boolean | undefined;\n};\n\n/**\n * This is a string reference\n */\nexport type DictionaryWithReference = {\n    [key: string]: ModelWithString;\n};\n\n/**\n * This is a complex dictionary\n */\nexport type DictionaryWithArray = {\n    [key: string]: Array<ModelWithString>;\n};\n\n/**\n * This is a string dictionary\n */\nexport type DictionaryWithDictionary = {\n    [key: string]: {\n        [key: string]: string;\n    };\n};\n\n/**\n * This is a complex dictionary\n */\nexport type DictionaryWithProperties = {\n    [key: string]: {\n        foo?: string;\n        bar?: string;\n    };\n};\n\n/**\n * This is a model with one number property\n */\nexport type ModelWithInteger = {\n    /**\n     * This is a simple number property\n     */\n    prop?: number;\n};\n\n/**\n * This is a model with one boolean property\n */\nexport type ModelWithBoolean = {\n    /**\n     * This is a simple boolean property\n     */\n    prop?: boolean;\n};\n\n/**\n * This is a model with one string property\n */\nexport type ModelWithString = {\n    /**\n     * This is a simple string property\n     */\n    prop?: string;\n};\n\n/**\n * This is a model with one string property\n */\nexport type ModelWithStringError = {\n    /**\n     * This is a simple string property\n     */\n    prop?: string;\n};\n\n/**\n * `Comment` or `VoiceComment`. The JSON object for adding voice comments to tickets is different. See [Adding voice comments to tickets](/documentation/ticketing/managing-tickets/adding-voice-comments-to-tickets)\n */\nexport type ModelFromZendesk = string;\n\n/**\n * This is a model with one string property\n */\nexport type ModelWithNullableString = {\n    /**\n     * This is a simple string property\n     */\n    nullableProp1?: string | null;\n    /**\n     * This is a simple string property\n     */\n    nullableRequiredProp1: string | null;\n    /**\n     * This is a simple string property\n     */\n    nullableProp2?: string | null;\n    /**\n     * This is a simple string property\n     */\n    nullableRequiredProp2: string | null;\n    /**\n     * This is a simple enum with strings\n     */\n    'foo_bar-enum'?: 'Success' | 'Warning' | 'Error' | 'ØÆÅ字符串';\n};\n\n/**\n * This is a model with one enum\n */\nexport type ModelWithEnum = {\n    /**\n     * This is a simple enum with strings\n     */\n    'foo_bar-enum'?: 'Success' | 'Warning' | 'Error' | 'ØÆÅ字符串';\n    /**\n     * These are the HTTP error code enums\n     */\n    statusCode?: '100' | '200 FOO' | '300 FOO_BAR' | '400 foo-bar' | '500 foo.bar' | '600 foo&bar';\n    /**\n     * Simple boolean enum\n     */\n    bool?: true;\n};\n\n/**\n * This is a model with one enum with escaped name\n */\nexport type ModelWithEnumWithHyphen = {\n    /**\n     * Foo-Bar-Baz-Qux\n     */\n    'foo-bar-baz-qux'?: '3.0';\n};\n\n/**\n * This is a model with one enum\n */\nexport type ModelWithEnumFromDescription = {\n    /**\n     * Success=1,Warning=2,Error=3\n     */\n    test?: number;\n};\n\n/**\n * This is a model with nested enums\n */\nexport type ModelWithNestedEnums = {\n    dictionaryWithEnum?: {\n        [key: string]: 'Success' | 'Warning' | 'Error';\n    };\n    dictionaryWithEnumFromDescription?: {\n        [key: string]: number;\n    };\n    arrayWithEnum?: Array<'Success' | 'Warning' | 'Error'>;\n    arrayWithDescription?: Array<number>;\n    /**\n     * This is a simple enum with strings\n     */\n    'foo_bar-enum'?: 'Success' | 'Warning' | 'Error' | 'ØÆÅ字符串';\n};\n\n/**\n * This is a model with one property containing a reference\n */\nexport type ModelWithReference = {\n    prop?: ModelWithProperties;\n};\n\n/**\n * This is a model with one property containing an array\n */\nexport type ModelWithArrayReadOnlyAndWriteOnly = {\n    prop?: Array<ModelWithReadOnlyAndWriteOnly>;\n    propWithFile?: Array<Blob | File>;\n    propWithNumber?: Array<number>;\n};\n\n/**\n * This is a model with one property containing an array\n */\nexport type ModelWithArray = {\n    prop?: Array<ModelWithString>;\n    propWithFile?: Array<Blob | File>;\n    propWithNumber?: Array<number>;\n};\n\n/**\n * This is a model with one property containing a dictionary\n */\nexport type ModelWithDictionary = {\n    prop?: {\n        [key: string]: string;\n    };\n};\n\n/**\n * This is a deprecated model with a deprecated property\n *\n * @deprecated\n */\nexport type DeprecatedModel = {\n    /**\n     * This is a deprecated property\n     *\n     * @deprecated\n     */\n    prop?: string;\n};\n\n/**\n * This is a model with one property containing a circular reference\n */\nexport type ModelWithCircularReference = {\n    prop?: ModelWithCircularReference;\n};\n\n/**\n * This is a model with one property with a 'one of' relationship\n */\nexport type CompositionWithOneOf = {\n    propA?: ModelWithString | ModelWithEnum | ModelWithArray | ModelWithDictionary;\n};\n\n/**\n * This is a model with one property with a 'one of' relationship where the options are not $ref\n */\nexport type CompositionWithOneOfAnonymous = {\n    propA?: {\n        propA?: string;\n    } | string | number;\n};\n\n/**\n * Circle\n */\nexport type ModelCircle = {\n    kind: string;\n    radius?: number;\n};\n\n/**\n * Square\n */\nexport type ModelSquare = {\n    kind: string;\n    sideLength?: number;\n};\n\n/**\n * This is a model with one property with a 'one of' relationship where the options are not $ref\n */\nexport type CompositionWithOneOfDiscriminator = ({\n    kind: 'circle';\n} & ModelCircle) | ({\n    kind: 'square';\n} & ModelSquare);\n\n/**\n * This is a model with one property with a 'any of' relationship\n */\nexport type CompositionWithAnyOf = {\n    propA?: ModelWithString | ModelWithEnum | ModelWithArray | ModelWithDictionary;\n};\n\n/**\n * This is a model with one property with a 'any of' relationship where the options are not $ref\n */\nexport type CompositionWithAnyOfAnonymous = {\n    propA?: {\n        propA?: string;\n    } | string | number;\n};\n\n/**\n * This is a model with nested 'any of' property with a type null\n */\nexport type CompositionWithNestedAnyAndTypeNull = {\n    propA?: Array<ModelWithDictionary | null> | Array<ModelWithArray | null>;\n};\n\nexport type _3eNum1Период = 'Bird' | 'Dog';\n\nexport type ConstValue = 'ConstValue';\n\n/**\n * This is a model with one property with a 'any of' relationship where the options are not $ref\n */\nexport type CompositionWithNestedAnyOfAndNull = {\n    propA?: Array<_3eNum1Период | ConstValue> | null;\n};\n\n/**\n * This is a model with one property with a 'one of' relationship\n */\nexport type CompositionWithOneOfAndNullable = {\n    propA?: {\n        boolean?: boolean;\n    } | ModelWithEnum | ModelWithArray | ModelWithDictionary | null;\n};\n\n/**\n * This is a model that contains a simple dictionary within composition\n */\nexport type CompositionWithOneOfAndSimpleDictionary = {\n    propA?: boolean | {\n        [key: string]: number;\n    };\n};\n\n/**\n * This is a model that contains a dictionary of simple arrays within composition\n */\nexport type CompositionWithOneOfAndSimpleArrayDictionary = {\n    propA?: boolean | {\n        [key: string]: Array<boolean>;\n    };\n};\n\n/**\n * This is a model that contains a dictionary of complex arrays (composited) within composition\n */\nexport type CompositionWithOneOfAndComplexArrayDictionary = {\n    propA?: boolean | {\n        [key: string]: Array<number | string>;\n    };\n};\n\n/**\n * This is a model with one property with a 'all of' relationship\n */\nexport type CompositionWithAllOfAndNullable = {\n    propA?: ({\n        boolean?: boolean;\n    } & ModelWithEnum & ModelWithArray & ModelWithDictionary) | null;\n};\n\n/**\n * This is a model with one property with a 'any of' relationship\n */\nexport type CompositionWithAnyOfAndNullable = {\n    propA?: {\n        boolean?: boolean;\n    } | ModelWithEnum | ModelWithArray | ModelWithDictionary | null;\n};\n\n/**\n * This is a base model with two simple optional properties\n */\nexport type CompositionBaseModel = {\n    firstName?: string;\n    lastname?: string;\n};\n\n/**\n * This is a model that extends the base model\n */\nexport type CompositionExtendedModel = CompositionBaseModel & {\n    age: number;\n    firstName: string;\n    lastname: string;\n};\n\n/**\n * This is a model with one nested property\n */\nexport type ModelWithProperties = {\n    required: string;\n    readonly requiredAndReadOnly: string;\n    requiredAndNullable: string | null;\n    string?: string;\n    number?: number;\n    boolean?: boolean;\n    reference?: ModelWithString;\n    'property with space'?: string;\n    default?: string;\n    try?: string;\n    readonly '@namespace.string'?: string;\n    readonly '@namespace.integer'?: number;\n};\n\n/**\n * This is a model with one nested property\n */\nexport type ModelWithNestedProperties = {\n    readonly first: {\n        readonly second: {\n            readonly third: string | null;\n        } | null;\n    } | null;\n};\n\n/**\n * This is a model with duplicated properties\n */\nexport type ModelWithDuplicateProperties = {\n    prop?: ModelWithString;\n};\n\n/**\n * This is a model with ordered properties\n */\nexport type ModelWithOrderedProperties = {\n    zebra?: string;\n    apple?: string;\n    hawaii?: string;\n};\n\n/**\n * This is a model with duplicated imports\n */\nexport type ModelWithDuplicateImports = {\n    propA?: ModelWithString;\n    propB?: ModelWithString;\n    propC?: ModelWithString;\n};\n\n/**\n * This is a model that extends another model\n */\nexport type ModelThatExtends = ModelWithString & {\n    propExtendsA?: string;\n    propExtendsB?: ModelWithString;\n};\n\n/**\n * This is a model that extends another model\n */\nexport type ModelThatExtendsExtends = ModelWithString & ModelThatExtends & {\n    propExtendsC?: string;\n    propExtendsD?: ModelWithString;\n};\n\n/**\n * This is a model that contains a some patterns\n */\nexport type ModelWithPattern = {\n    key: string;\n    name: string;\n    readonly enabled?: boolean;\n    readonly modified?: string;\n    id?: string;\n    text?: string;\n    patternWithSingleQuotes?: string;\n    patternWithNewline?: string;\n    patternWithBacktick?: string;\n    patternWithUnicode?: string;\n};\n\nexport type File = {\n    /**\n     * Id\n     */\n    readonly id?: string;\n    /**\n     * Updated at\n     */\n    readonly updated_at?: string;\n    /**\n     * Created at\n     */\n    readonly created_at?: string;\n    /**\n     * Mime\n     */\n    mime: string;\n    /**\n     * File\n     */\n    readonly file?: string;\n};\n\nexport type Default = {\n    name?: string;\n};\n\nexport type Pageable = {\n    page?: number;\n    size?: number;\n    sort?: Array<string>;\n};\n\n/**\n * This is a free-form object without additionalProperties.\n */\nexport type FreeFormObjectWithoutAdditionalProperties = {\n    [key: string]: unknown;\n};\n\n/**\n * This is a free-form object with additionalProperties: true.\n */\nexport type FreeFormObjectWithAdditionalPropertiesEqTrue = {\n    [key: string]: unknown;\n};\n\n/**\n * This is a free-form object with additionalProperties: {}.\n */\nexport type FreeFormObjectWithAdditionalPropertiesEqEmptyObject = {\n    [key: string]: unknown;\n};\n\nexport type ModelWithConst = {\n    String?: 'String';\n    number?: 0;\n    null?: unknown;\n    withType?: 'Some string';\n};\n\n/**\n * This is a model with one property and additionalProperties: true\n */\nexport type ModelWithAdditionalPropertiesEqTrue = {\n    /**\n     * This is a simple string property\n     */\n    prop?: string;\n    [key: string]: unknown;\n};\n\nexport type NestedAnyOfArraysNullable = {\n    nullableArray?: Array<string | boolean> | null;\n};\n\nexport type CompositionWithOneOfAndProperties = ({\n    foo: SimpleParameter;\n} | {\n    bar: NonAsciiStringæøåÆøÅöôêÊ字符串;\n}) & {\n    baz: number | null;\n    qux: number;\n};\n\n/**\n * An object that can be null\n */\nexport type NullableObject = {\n    foo?: string;\n} | null;\n\n/**\n * Some % character\n */\nexport type CharactersInDescription = string;\n\nexport type ModelWithNullableObject = {\n    data?: NullableObject;\n};\n\n/**\n * An object with additional properties that can be null\n */\nexport type ModelWithAdditionalPropertiesRef = {\n    [key: string]: NullableObject | null;\n};\n\nexport type ModelWithOneOfEnum = {\n    foo: 'Bar';\n} | {\n    foo: 'Baz';\n} | {\n    foo: 'Qux';\n} | {\n    content: string;\n    foo: 'Quux';\n} | {\n    content: [\n        string,\n        string\n    ];\n    foo: 'Corge';\n};\n\nexport type ModelWithNestedArrayEnumsDataFoo = 'foo' | 'bar';\n\nexport type ModelWithNestedArrayEnumsDataBar = 'baz' | 'qux';\n\nexport type ModelWithNestedArrayEnumsData = {\n    foo?: Array<ModelWithNestedArrayEnumsDataFoo>;\n    bar?: Array<ModelWithNestedArrayEnumsDataBar>;\n};\n\nexport type ModelWithNestedArrayEnums = {\n    array_strings?: Array<string>;\n    data?: ModelWithNestedArrayEnumsData;\n};\n\nexport type ModelWithNestedCompositionEnums = {\n    foo?: ModelWithNestedArrayEnumsDataFoo;\n};\n\nexport type ModelWithReadOnlyAndWriteOnly = {\n    foo: string;\n    readonly bar: string;\n};\n\nexport type ModelWithConstantSizeArray = [\n    number,\n    number\n];\n\nexport type ModelWithAnyOfConstantSizeArray = [\n    number | string,\n    number | string,\n    number | string\n];\n\nexport type ModelWithPrefixItemsConstantSizeArray = Array<ModelWithInteger | number | string>;\n\nexport type ModelWithAnyOfConstantSizeArrayNullable = [\n    number | null | string,\n    number | null | string,\n    number | null | string\n];\n\nexport type ModelWithAnyOfConstantSizeArrayWithNSizeAndOptions = [\n    number | Import,\n    number | Import\n];\n\nexport type ModelWithAnyOfConstantSizeArrayAndIntersect = [\n    number & string,\n    number & string\n];\n\nexport type ModelWithNumericEnumUnion = {\n    /**\n     * Период\n     */\n    value?: -10 | -1 | 0 | 1 | 3 | 6 | 12;\n};\n\n/**\n * Some description with `back ticks`\n */\nexport type ModelWithBackticksInDescription = {\n    /**\n     * The template `that` should be used for parsing and importing the contents of the CSV file.\n     *\n     * <br/><p>There is one placeholder currently supported:<ul>     <li><b>${x}</b> - refers to the n-th column in the CSV file, e.g. ${1}, ${2}, ...)</li></ul><p>Example of a correct JSON template:</p>\n     * <pre>\n     * [\n     * {\n     * \"resourceType\": \"Asset\",\n     * \"identifier\": {\n     * \"name\": \"${1}\",\n     * \"domain\": {\n     * \"name\": \"${2}\",\n     * \"community\": {\n     * \"name\": \"Some Community\"\n     * }\n     * }\n     * },\n     * \"attributes\" : {\n     * \"00000000-0000-0000-0000-000000003115\" : [ {\n     * \"value\" : \"${3}\"\n     * } ],\n     * \"00000000-0000-0000-0000-000000000222\" : [ {\n     * \"value\" : \"${4}\"\n     * } ]\n     * }\n     * }\n     * ]\n     * </pre>\n     */\n    template?: string;\n};\n\nexport type ModelWithOneOfAndProperties = (SimpleParameter | NonAsciiStringæøåÆøÅöôêÊ字符串) & {\n    baz: number | null;\n    qux: number;\n};\n\n/**\n * Model used to test deduplication strategy (unused)\n */\nexport type ParameterSimpleParameterUnused = string;\n\n/**\n * Model used to test deduplication strategy\n */\nexport type PostServiceWithEmptyTagResponse = string;\n\n/**\n * Model used to test deduplication strategy\n */\nexport type PostServiceWithEmptyTagResponse2 = string;\n\n/**\n * Model used to test deduplication strategy\n */\nexport type DeleteFooData = string;\n\n/**\n * Model used to test deduplication strategy\n */\nexport type DeleteFooData2 = string;\n\n/**\n * Model with restricted keyword name\n */\nexport type Import = string;\n\nexport type SchemaWithFormRestrictedKeys = {\n    description?: string;\n    'x-enum-descriptions'?: string;\n    'x-enum-varnames'?: string;\n    'x-enumNames'?: string;\n    title?: string;\n    object?: {\n        description?: string;\n        'x-enum-descriptions'?: string;\n        'x-enum-varnames'?: string;\n        'x-enumNames'?: string;\n        title?: string;\n    };\n    array?: Array<{\n        description?: string;\n        'x-enum-descriptions'?: string;\n        'x-enum-varnames'?: string;\n        'x-enumNames'?: string;\n        title?: string;\n    }>;\n};\n\n/**\n * This schema was giving PascalCase transformations a hard time\n */\nexport type IoK8sApimachineryPkgApisMetaV1DeleteOptions = {\n    /**\n     * Must be fulfilled before a deletion is carried out. If not possible, a 409 Conflict status will be returned.\n     */\n    preconditions?: IoK8sApimachineryPkgApisMetaV1Preconditions;\n};\n\n/**\n * This schema was giving PascalCase transformations a hard time\n */\nexport type IoK8sApimachineryPkgApisMetaV1Preconditions = {\n    /**\n     * Specifies the target ResourceVersion\n     */\n    resourceVersion?: string;\n    /**\n     * Specifies the target UID.\n     */\n    uid?: string;\n};\n\nexport type AdditionalPropertiesUnknownIssue = {\n    [key: string]: string | number;\n};\n\nexport type AdditionalPropertiesUnknownIssue2 = {\n    [key: string]: string | number;\n};\n\nexport type AdditionalPropertiesUnknownIssue3 = string & {\n    entries: {\n        [key: string]: AdditionalPropertiesUnknownIssue;\n    };\n};\n\nexport type AdditionalPropertiesIntegerIssue = {\n    value: number;\n    [key: string]: number;\n};\n\nexport type OneOfAllOfIssue = ((ConstValue | GenericSchemaDuplicateIssue1SystemBoolean) & _3eNum1Период) | GenericSchemaDuplicateIssue1SystemString;\n\nexport type GenericSchemaDuplicateIssue1SystemBoolean = {\n    item?: boolean;\n    error?: string | null;\n    readonly hasError?: boolean;\n    data?: {\n        [key: string]: never;\n    };\n};\n\nexport type GenericSchemaDuplicateIssue1SystemString = {\n    item?: string | null;\n    error?: string | null;\n    readonly hasError?: boolean;\n};\n\nexport type ExternalSharedModel = {\n    id: string;\n    name?: string;\n};\n\n/**\n * This is a model with one property containing a reference\n */\nexport type ModelWithReferenceWritable = {\n    prop?: ModelWithPropertiesWritable;\n};\n\n/**\n * This is a model with one property containing an array\n */\nexport type ModelWithArrayReadOnlyAndWriteOnlyWritable = {\n    prop?: Array<ModelWithReadOnlyAndWriteOnlyWritable>;\n    propWithFile?: Array<Blob | File>;\n    propWithNumber?: Array<number>;\n};\n\n/**\n * This is a model with one nested property\n */\nexport type ModelWithPropertiesWritable = {\n    required: string;\n    requiredAndNullable: string | null;\n    string?: string;\n    number?: number;\n    boolean?: boolean;\n    reference?: ModelWithString;\n    'property with space'?: string;\n    default?: string;\n    try?: string;\n};\n\n/**\n * This is a model that contains a some patterns\n */\nexport type ModelWithPatternWritable = {\n    key: string;\n    name: string;\n    id?: string;\n    text?: string;\n    patternWithSingleQuotes?: string;\n    patternWithNewline?: string;\n    patternWithBacktick?: string;\n    patternWithUnicode?: string;\n};\n\nexport type FileWritable = {\n    /**\n     * Mime\n     */\n    mime: string;\n};\n\nexport type ModelWithReadOnlyAndWriteOnlyWritable = {\n    foo: string;\n    baz: string;\n};\n\nexport type ModelWithAnyOfConstantSizeArrayWithNSizeAndOptionsWritable = [\n    number | Import,\n    number | Import\n];\n\nexport type AdditionalPropertiesUnknownIssueWritable = {\n    [key: string]: string | number;\n};\n\nexport type OneOfAllOfIssueWritable = ((ConstValue | GenericSchemaDuplicateIssue1SystemBoolean) & _3eNum1Период) | GenericSchemaDuplicateIssue1SystemString;\n\nexport type GenericSchemaDuplicateIssue1SystemBooleanWritable = {\n    item?: boolean;\n    error?: string | null;\n    data?: {\n        [key: string]: never;\n    };\n};\n\nexport type GenericSchemaDuplicateIssue1SystemStringWritable = {\n    item?: string | null;\n    error?: string | null;\n};\n\n/**\n * This is a reusable parameter\n */\nexport type SimpleParameter = string;\n\n/**\n * Parameter with illegal characters\n */\nexport type XFooBar = ModelWithString;\n\nexport type SimpleRequestBody = ModelWithString;\n\nexport type SimpleFormData = ModelWithString;\n\nexport type ExportData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no+tag';\n};\n\nexport type PatchApiVbyApiVersionNoTagData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no+tag';\n};\n\nexport type PatchApiVbyApiVersionNoTagResponses = {\n    /**\n     * OK\n     */\n    default: unknown;\n};\n\nexport type ImportData = {\n    body: ModelWithReadOnlyAndWriteOnlyWritable | ModelWithArrayReadOnlyAndWriteOnlyWritable;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no+tag';\n};\n\nexport type ImportResponses = {\n    /**\n     * Success\n     */\n    200: ModelFromZendesk;\n    /**\n     * Default success response\n     */\n    default: ModelWithReadOnlyAndWriteOnly;\n};\n\nexport type ImportResponse = ImportResponses[keyof ImportResponses];\n\nexport type FooWowData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no+tag';\n};\n\nexport type FooWowResponses = {\n    /**\n     * OK\n     */\n    default: unknown;\n};\n\nexport type ApiVVersionODataControllerCountData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple/$count';\n};\n\nexport type ApiVVersionODataControllerCountResponses = {\n    /**\n     * Success\n     */\n    200: ModelFromZendesk;\n};\n\nexport type ApiVVersionODataControllerCountResponse = ApiVVersionODataControllerCountResponses[keyof ApiVVersionODataControllerCountResponses];\n\nexport type GetApiVbyApiVersionSimpleOperationData = {\n    body?: never;\n    path: {\n        /**\n         * foo in method\n         */\n        foo_param: string;\n    };\n    query?: never;\n    url: '/api/v{api-version}/simple:operation';\n};\n\nexport type GetApiVbyApiVersionSimpleOperationErrors = {\n    /**\n     * Default error response\n     */\n    default: ModelWithBoolean;\n};\n\nexport type GetApiVbyApiVersionSimpleOperationError = GetApiVbyApiVersionSimpleOperationErrors[keyof GetApiVbyApiVersionSimpleOperationErrors];\n\nexport type GetApiVbyApiVersionSimpleOperationResponses = {\n    /**\n     * Response is a simple number\n     */\n    200: number;\n};\n\nexport type GetApiVbyApiVersionSimpleOperationResponse = GetApiVbyApiVersionSimpleOperationResponses[keyof GetApiVbyApiVersionSimpleOperationResponses];\n\nexport type DeleteCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type GetCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type HeadCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type OptionsCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type PatchCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type PostCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type PutCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type DeleteFooData3 = {\n    body?: never;\n    headers: {\n        /**\n         * Parameter with illegal characters\n         */\n        'x-Foo-Bar': ModelWithString;\n    };\n    path: {\n        /**\n         * foo in method\n         */\n        foo_param: string;\n        /**\n         * bar in method\n         */\n        BarParam: string;\n    };\n    query?: never;\n    url: '/api/v{api-version}/foo/{foo_param}/bar/{BarParam}';\n};\n\nexport type CallWithDescriptionsData = {\n    body?: never;\n    path?: never;\n    query?: {\n        /**\n         * Testing multiline comments in string: First line\n         * Second line\n         *\n         * Fourth line\n         */\n        parameterWithBreaks?: string;\n        /**\n         * Testing backticks in string: `backticks` and ```multiple backticks``` should work\n         */\n        parameterWithBackticks?: string;\n        /**\n         * Testing slashes in string: \\backwards\\\\\\ and /forwards/// should work\n         */\n        parameterWithSlashes?: string;\n        /**\n         * Testing expression placeholders in string: ${expression} should work\n         */\n        parameterWithExpressionPlaceholders?: string;\n        /**\n         * Testing quotes in string: 'single quote''' and \"double quotes\"\"\" should work\n         */\n        parameterWithQuotes?: string;\n        /**\n         * Testing reserved characters in string: * inline * and ** inline ** should work\n         */\n        parameterWithReservedCharacters?: string;\n    };\n    url: '/api/v{api-version}/descriptions';\n};\n\nexport type DeprecatedCallData = {\n    body?: never;\n    headers: {\n        /**\n         * This parameter is deprecated\n         *\n         * @deprecated\n         */\n        parameter: DeprecatedModel | null;\n    };\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/parameters/deprecated';\n};\n\nexport type CallWithParametersData = {\n    /**\n     * This is the parameter that goes into the body\n     */\n    body: {\n        [key: string]: unknown;\n    } | null;\n    headers: {\n        /**\n         * This is the parameter that goes into the header\n         */\n        parameterHeader: string | null;\n    };\n    path: {\n        /**\n         * This is the parameter that goes into the path\n         */\n        parameterPath: string | null;\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string | null;\n    };\n    query: {\n        foo_ref_enum?: ModelWithNestedArrayEnumsDataFoo;\n        foo_all_of_enum: ModelWithNestedArrayEnumsDataFoo;\n        /**\n         * This is the parameter that goes into the query params\n         */\n        cursor: string | null;\n    };\n    url: '/api/v{api-version}/parameters/{parameterPath}';\n};\n\nexport type CallWithWeirdParameterNamesData = {\n    /**\n     * This is the parameter that goes into the body\n     */\n    body: ModelWithString | null;\n    headers: {\n        /**\n         * This is the parameter that goes into the request header\n         */\n        'parameter.header': string | null;\n    };\n    path: {\n        /**\n         * This is the parameter that goes into the path\n         */\n        'parameter.path.1'?: string;\n        /**\n         * This is the parameter that goes into the path\n         */\n        'parameter-path-2'?: string;\n        /**\n         * This is the parameter that goes into the path\n         */\n        'PARAMETER-PATH-3'?: string;\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string | null;\n    };\n    query: {\n        /**\n         * This is the parameter with a reserved keyword\n         */\n        default?: string;\n        /**\n         * This is the parameter that goes into the request query params\n         */\n        'parameter-query': string | null;\n    };\n    url: '/api/v{api-version}/parameters/{parameter.path.1}/{parameter-path-2}/{PARAMETER-PATH-3}';\n};\n\nexport type GetCallWithOptionalParamData = {\n    /**\n     * This is a required parameter\n     */\n    body: ModelWithOneOfEnum;\n    path?: never;\n    query?: {\n        /**\n         * This is an optional parameter\n         */\n        page?: number;\n    };\n    url: '/api/v{api-version}/parameters';\n};\n\nexport type PostCallWithOptionalParamData = {\n    /**\n     * This is an optional parameter\n     */\n    body?: {\n        offset?: number | null;\n    };\n    path?: never;\n    query: {\n        /**\n         * This is a required parameter\n         */\n        parameter: Pageable;\n    };\n    url: '/api/v{api-version}/parameters';\n};\n\nexport type PostCallWithOptionalParamResponses = {\n    /**\n     * Response is a simple number\n     */\n    200: number;\n    /**\n     * Success\n     */\n    204: void;\n};\n\nexport type PostCallWithOptionalParamResponse = PostCallWithOptionalParamResponses[keyof PostCallWithOptionalParamResponses];\n\nexport type PostApiVbyApiVersionRequestBodyData = {\n    /**\n     * A reusable request body\n     */\n    body?: SimpleRequestBody;\n    path?: never;\n    query?: {\n        /**\n         * This is a reusable parameter\n         */\n        parameter?: string;\n    };\n    url: '/api/v{api-version}/requestBody';\n};\n\nexport type PostApiVbyApiVersionFormDataData = {\n    /**\n     * A reusable request body\n     */\n    body?: SimpleFormData;\n    path?: never;\n    query?: {\n        /**\n         * This is a reusable parameter\n         */\n        parameter?: string;\n    };\n    url: '/api/v{api-version}/formData';\n};\n\nexport type CallWithDefaultParametersData = {\n    body?: never;\n    path?: never;\n    query?: {\n        /**\n         * This is a simple string with default value\n         */\n        parameterString?: string | null;\n        /**\n         * This is a simple number with default value\n         */\n        parameterNumber?: number | null;\n        /**\n         * This is a simple boolean with default value\n         */\n        parameterBoolean?: boolean | null;\n        /**\n         * This is a simple enum with default value\n         */\n        parameterEnum?: 'Success' | 'Warning' | 'Error';\n        /**\n         * This is a simple model with default value\n         */\n        parameterModel?: ModelWithString | null;\n    };\n    url: '/api/v{api-version}/defaults';\n};\n\nexport type CallWithDefaultOptionalParametersData = {\n    body?: never;\n    path?: never;\n    query?: {\n        /**\n         * This is a simple string that is optional with default value\n         */\n        parameterString?: string;\n        /**\n         * This is a simple number that is optional with default value\n         */\n        parameterNumber?: number;\n        /**\n         * This is a simple boolean that is optional with default value\n         */\n        parameterBoolean?: boolean;\n        /**\n         * This is a simple enum that is optional with default value\n         */\n        parameterEnum?: 'Success' | 'Warning' | 'Error';\n        /**\n         * This is a simple model that is optional with default value\n         */\n        parameterModel?: ModelWithString;\n    };\n    url: '/api/v{api-version}/defaults';\n};\n\nexport type CallToTestOrderOfParamsData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * This is a optional string with default\n         */\n        parameterOptionalStringWithDefault?: string;\n        /**\n         * This is a optional string with empty default\n         */\n        parameterOptionalStringWithEmptyDefault?: string;\n        /**\n         * This is a optional string with no default\n         */\n        parameterOptionalStringWithNoDefault?: string;\n        /**\n         * This is a string with default\n         */\n        parameterStringWithDefault: string;\n        /**\n         * This is a string with empty default\n         */\n        parameterStringWithEmptyDefault: string;\n        /**\n         * This is a string with no default\n         */\n        parameterStringWithNoDefault: string;\n        /**\n         * This is a string that can be null with no default\n         */\n        parameterStringNullableWithNoDefault?: string | null;\n        /**\n         * This is a string that can be null with default\n         */\n        parameterStringNullableWithDefault?: string | null;\n    };\n    url: '/api/v{api-version}/defaults';\n};\n\nexport type DuplicateNameData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/duplicate';\n};\n\nexport type DuplicateName2Data = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/duplicate';\n};\n\nexport type DuplicateName3Data = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/duplicate';\n};\n\nexport type DuplicateName4Data = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/duplicate';\n};\n\nexport type CallWithNoContentResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no-content';\n};\n\nexport type CallWithNoContentResponseResponses = {\n    /**\n     * Success\n     */\n    204: void;\n};\n\nexport type CallWithNoContentResponseResponse = CallWithNoContentResponseResponses[keyof CallWithNoContentResponseResponses];\n\nexport type CallWithResponseAndNoContentResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multiple-tags/response-and-no-content';\n};\n\nexport type CallWithResponseAndNoContentResponseResponses = {\n    /**\n     * Response is a simple number\n     */\n    200: number;\n    /**\n     * Success\n     */\n    204: void;\n};\n\nexport type CallWithResponseAndNoContentResponseResponse = CallWithResponseAndNoContentResponseResponses[keyof CallWithResponseAndNoContentResponseResponses];\n\nexport type DummyAData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multiple-tags/a';\n};\n\nexport type DummyAResponses = {\n    200: _400;\n};\n\nexport type DummyAResponse = DummyAResponses[keyof DummyAResponses];\n\nexport type DummyBData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multiple-tags/b';\n};\n\nexport type DummyBResponses = {\n    /**\n     * Success\n     */\n    204: void;\n};\n\nexport type DummyBResponse = DummyBResponses[keyof DummyBResponses];\n\nexport type CallWithResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/response';\n};\n\nexport type CallWithResponseResponses = {\n    default: Import;\n};\n\nexport type CallWithResponseResponse = CallWithResponseResponses[keyof CallWithResponseResponses];\n\nexport type CallWithDuplicateResponsesData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/response';\n};\n\nexport type CallWithDuplicateResponsesErrors = {\n    /**\n     * Message for 500 error\n     */\n    500: ModelWithStringError;\n    /**\n     * Message for 501 error\n     */\n    501: ModelWithStringError;\n    /**\n     * Message for 502 error\n     */\n    502: ModelWithStringError;\n    /**\n     * Message for 4XX errors\n     */\n    '4XX': DictionaryWithArray;\n    /**\n     * Default error response\n     */\n    default: ModelWithBoolean;\n};\n\nexport type CallWithDuplicateResponsesError = CallWithDuplicateResponsesErrors[keyof CallWithDuplicateResponsesErrors];\n\nexport type CallWithDuplicateResponsesResponses = {\n    /**\n     * Message for 200 response\n     */\n    200: ModelWithBoolean & ModelWithInteger;\n    /**\n     * Message for 201 response\n     */\n    201: ModelWithString;\n    /**\n     * Message for 202 response\n     */\n    202: ModelWithString;\n};\n\nexport type CallWithDuplicateResponsesResponse = CallWithDuplicateResponsesResponses[keyof CallWithDuplicateResponsesResponses];\n\nexport type CallWithResponsesData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/response';\n};\n\nexport type CallWithResponsesErrors = {\n    /**\n     * Message for 500 error\n     */\n    500: ModelWithStringError;\n    /**\n     * Message for 501 error\n     */\n    501: ModelWithStringError;\n    /**\n     * Message for 502 error\n     */\n    502: ModelWithStringError;\n    /**\n     * Message for default response\n     */\n    default: ModelWithStringError;\n};\n\nexport type CallWithResponsesError = CallWithResponsesErrors[keyof CallWithResponsesErrors];\n\nexport type CallWithResponsesResponses = {\n    /**\n     * Message for 200 response\n     */\n    200: {\n        readonly '@namespace.string'?: string;\n        readonly '@namespace.integer'?: number;\n        readonly value?: Array<ModelWithString>;\n    };\n    /**\n     * Message for 201 response\n     */\n    201: ModelThatExtends;\n    /**\n     * Message for 202 response\n     */\n    202: ModelThatExtendsExtends;\n};\n\nexport type CallWithResponsesResponse = CallWithResponsesResponses[keyof CallWithResponsesResponses];\n\nexport type CollectionFormatData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * This is an array parameter that is sent as csv format (comma-separated values)\n         */\n        parameterArrayCSV: Array<string> | null;\n        /**\n         * This is an array parameter that is sent as ssv format (space-separated values)\n         */\n        parameterArraySSV: Array<string> | null;\n        /**\n         * This is an array parameter that is sent as tsv format (tab-separated values)\n         */\n        parameterArrayTSV: Array<string> | null;\n        /**\n         * This is an array parameter that is sent as pipes format (pipe-separated values)\n         */\n        parameterArrayPipes: Array<string> | null;\n        /**\n         * This is an array parameter that is sent as multi format (multiple parameter instances)\n         */\n        parameterArrayMulti: Array<string> | null;\n    };\n    url: '/api/v{api-version}/collectionFormat';\n};\n\nexport type TypesData = {\n    body?: never;\n    path?: {\n        /**\n         * This is a number parameter\n         */\n        id?: number;\n    };\n    query: {\n        /**\n         * This is a number parameter\n         */\n        parameterNumber: number;\n        /**\n         * This is a string parameter\n         */\n        parameterString: string | null;\n        /**\n         * This is a boolean parameter\n         */\n        parameterBoolean: boolean | null;\n        /**\n         * This is an object parameter\n         */\n        parameterObject: {\n            [key: string]: unknown;\n        } | null;\n        /**\n         * This is an array parameter\n         */\n        parameterArray: Array<string> | null;\n        /**\n         * This is a dictionary parameter\n         */\n        parameterDictionary: {\n            [key: string]: unknown;\n        } | null;\n        /**\n         * This is an enum parameter\n         */\n        parameterEnum: 'Success' | 'Warning' | 'Error';\n    };\n    url: '/api/v{api-version}/types';\n};\n\nexport type TypesResponses = {\n    /**\n     * Response is a simple number\n     */\n    200: number;\n    /**\n     * Response is a simple string\n     */\n    201: string;\n    /**\n     * Response is a simple boolean\n     */\n    202: boolean;\n    /**\n     * Response is a simple object\n     */\n    203: {\n        [key: string]: unknown;\n    };\n};\n\nexport type TypesResponse = TypesResponses[keyof TypesResponses];\n\nexport type UploadFileData = {\n    body: Blob | File;\n    path: {\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string | null;\n    };\n    query?: never;\n    url: '/api/v{api-version}/upload';\n};\n\nexport type UploadFileResponses = {\n    200: boolean;\n};\n\nexport type UploadFileResponse = UploadFileResponses[keyof UploadFileResponses];\n\nexport type FileResponseData = {\n    body?: never;\n    path: {\n        id: string;\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string;\n    };\n    query?: never;\n    url: '/api/v{api-version}/file/{id}';\n};\n\nexport type FileResponseResponses = {\n    /**\n     * Success\n     */\n    200: Blob | File;\n};\n\nexport type FileResponseResponse = FileResponseResponses[keyof FileResponseResponses];\n\nexport type ComplexTypesData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * Parameter containing object\n         */\n        parameterObject: {\n            first?: {\n                second?: {\n                    third?: string;\n                };\n            };\n        };\n        /**\n         * Parameter containing reference\n         */\n        parameterReference: ModelWithString;\n    };\n    url: '/api/v{api-version}/complex';\n};\n\nexport type ComplexTypesErrors = {\n    /**\n     * 400 `server` error\n     */\n    400: unknown;\n    /**\n     * 500 server error\n     */\n    500: unknown;\n};\n\nexport type ComplexTypesResponses = {\n    /**\n     * Successful response\n     */\n    200: Array<ModelWithString>;\n};\n\nexport type ComplexTypesResponse = ComplexTypesResponses[keyof ComplexTypesResponses];\n\nexport type MultipartResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multipart';\n};\n\nexport type MultipartResponseResponses = {\n    /**\n     * OK\n     */\n    200: {\n        file?: Blob | File;\n        metadata?: {\n            foo?: string;\n            bar?: string;\n        };\n    };\n};\n\nexport type MultipartResponseResponse = MultipartResponseResponses[keyof MultipartResponseResponses];\n\nexport type MultipartRequestData = {\n    body?: {\n        content?: Blob | File;\n        data?: ModelWithString | null;\n    };\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multipart';\n};\n\nexport type ComplexParamsData = {\n    body?: {\n        readonly key: string | null;\n        name: string | null;\n        enabled?: boolean;\n        type: 'Monkey' | 'Horse' | 'Bird';\n        listOfModels?: Array<ModelWithString> | null;\n        listOfStrings?: Array<string> | null;\n        parameters: ModelWithString | ModelWithEnum | ModelWithArray | ModelWithDictionary;\n        readonly user?: {\n            readonly id?: number;\n            readonly name?: string | null;\n        };\n    };\n    path: {\n        id: number;\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string;\n    };\n    query?: never;\n    url: '/api/v{api-version}/complex/{id}';\n};\n\nexport type ComplexParamsResponses = {\n    /**\n     * Success\n     */\n    200: ModelWithString;\n};\n\nexport type ComplexParamsResponse = ComplexParamsResponses[keyof ComplexParamsResponses];\n\nexport type CallWithResultFromHeaderData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/header';\n};\n\nexport type CallWithResultFromHeaderErrors = {\n    /**\n     * 400 server error\n     */\n    400: unknown;\n    /**\n     * 500 server error\n     */\n    500: unknown;\n};\n\nexport type CallWithResultFromHeaderResponses = {\n    /**\n     * Successful response\n     */\n    200: unknown;\n};\n\nexport type TestErrorCodeData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * Status code to return\n         */\n        status: number;\n    };\n    url: '/api/v{api-version}/error';\n};\n\nexport type TestErrorCodeErrors = {\n    /**\n     * Custom message: Internal Server Error\n     */\n    500: unknown;\n    /**\n     * Custom message: Not Implemented\n     */\n    501: unknown;\n    /**\n     * Custom message: Bad Gateway\n     */\n    502: unknown;\n    /**\n     * Custom message: Service Unavailable\n     */\n    503: unknown;\n};\n\nexport type TestErrorCodeResponses = {\n    /**\n     * Custom message: Successful response\n     */\n    200: unknown;\n};\n\nexport type NonAsciiæøåÆøÅöôêÊ字符串Data = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * Dummy input param\n         */\n        nonAsciiParamæøåÆØÅöôêÊ: number;\n    };\n    url: '/api/v{api-version}/non-ascii-æøåÆØÅöôêÊ字符串';\n};\n\nexport type NonAsciiæøåÆøÅöôêÊ字符串Responses = {\n    /**\n     * Successful response\n     */\n    200: Array<NonAsciiStringæøåÆøÅöôêÊ字符串>;\n};\n\nexport type NonAsciiæøåÆøÅöôêÊ字符串Response = NonAsciiæøåÆøÅöôêÊ字符串Responses[keyof NonAsciiæøåÆøÅöôêÊ字符串Responses];\n\nexport type PutWithFormUrlEncodedData = {\n    body: ArrayWithStrings;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/non-ascii-æøåÆØÅöôêÊ字符串';\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/vue-query/name-builder/@tanstack/vue-query.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport { type DefaultError, queryOptions, type UseMutationOptions } from '@tanstack/vue-query';\n\nimport { client } from '../client.gen';\nimport { fooBarPost, fooBarPut, fooPost, fooPut, getFoo, getFooBar, type Options } from '../sdk.gen';\nimport type { FooBarPostData, FooBarPostResponse, FooBarPutData, FooBarPutResponse, FooPostData, FooPostResponse, FooPutData, FooPutResponse, GetFooBarData, GetFooBarResponse, GetFooData, GetFooResponse } from '../types.gen';\n\nexport type QueryKey<TOptions extends Options> = [\n    Pick<TOptions, 'baseUrl' | 'body' | 'headers' | 'path' | 'query'> & {\n        _id: string;\n        _infinite?: boolean;\n        tags?: ReadonlyArray<string>;\n    }\n];\n\nconst createQueryKey = <TOptions extends Options>(id: string, options?: TOptions, infinite?: boolean, tags?: ReadonlyArray<string>): [\n    QueryKey<TOptions>[0]\n] => {\n    const params: QueryKey<TOptions>[0] = { _id: id, baseUrl: options?.baseUrl || (options?.client ?? client).getConfig().baseUrl } as QueryKey<TOptions>[0];\n    if (infinite) {\n        params._infinite = infinite;\n    }\n    if (tags) {\n        params.tags = tags;\n    }\n    if (options?.body) {\n        params.body = options.body;\n    }\n    if (options?.headers) {\n        params.headers = options.headers;\n    }\n    if (options?.path) {\n        params.path = options.path;\n    }\n    if (options?.query) {\n        params.query = options.query;\n    }\n    return [params];\n};\n\nexport const getFooD = (options?: Options<GetFooData>) => createQueryKey('getFoo', options);\n\nexport const getFooE = (options?: Options<GetFooData>) => queryOptions<GetFooResponse, DefaultError, GetFooResponse, ReturnType<typeof getFooD>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await getFoo({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: getFooD(options)\n});\n\nexport const fooPostC = (options?: Partial<Options<FooPostData>>): UseMutationOptions<FooPostResponse, DefaultError, Options<FooPostData>> => {\n    const mutationOptions: UseMutationOptions<FooPostResponse, DefaultError, Options<FooPostData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await fooPost({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const fooPutC = (options?: Partial<Options<FooPutData>>): UseMutationOptions<FooPutResponse, DefaultError, Options<FooPutData>> => {\n    const mutationOptions: UseMutationOptions<FooPutResponse, DefaultError, Options<FooPutData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await fooPut({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const getFooBarD = (options?: Options<GetFooBarData>) => createQueryKey('getFooBar', options);\n\nexport const getFooBarE = (options?: Options<GetFooBarData>) => queryOptions<GetFooBarResponse, DefaultError, GetFooBarResponse, ReturnType<typeof getFooBarD>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await getFooBar({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: getFooBarD(options)\n});\n\nexport const fooBarPostC = (options?: Partial<Options<FooBarPostData>>): UseMutationOptions<FooBarPostResponse, DefaultError, Options<FooBarPostData>> => {\n    const mutationOptions: UseMutationOptions<FooBarPostResponse, DefaultError, Options<FooBarPostData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await fooBarPost({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const fooBarPutC = (options?: Partial<Options<FooBarPutData>>): UseMutationOptions<FooBarPutResponse, DefaultError, Options<FooBarPutData>> => {\n    const mutationOptions: UseMutationOptions<FooBarPutResponse, DefaultError, Options<FooBarPutData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await fooBarPut({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/vue-query/name-builder/client/client.gen.ts",
    "content": "// 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 (options: RequestOptions) => {\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 url = buildUrl(opts);\n\n    return { opts, url };\n  };\n\n  const request: Client['request'] = async (options) => {\n    // @ts-expect-error\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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/vue-query/name-builder/client/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type { Auth } from '../core/auth.gen';\nexport type { QuerySerializerOptions } from '../core/bodySerializer.gen';\nexport {\n  formDataBodySerializer,\n  jsonBodySerializer,\n  urlSearchParamsBodySerializer,\n} from '../core/bodySerializer.gen';\nexport { buildClientParams } from '../core/params.gen';\nexport { serializeQueryKeyValue } from '../core/queryKeySerializer.gen';\nexport { createClient } from './client.gen';\nexport type {\n  Client,\n  ClientOptions,\n  Config,\n  CreateClientConfig,\n  Options,\n  RequestOptions,\n  RequestResult,\n  ResolvedRequestOptions,\n  ResponseStyle,\n  TDataShape,\n} from './types.gen';\nexport { createConfig, mergeHeaders } from './utils.gen';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/vue-query/name-builder/client/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { Auth } from '../core/auth.gen';\nimport type {\n  ServerSentEventsOptions,\n  ServerSentEventsResult,\n} from '../core/serverSentEvents.gen';\nimport type { Client as CoreClient, Config as CoreConfig } from '../core/types.gen';\nimport type { Middleware } from './utils.gen';\n\nexport type ResponseStyle = 'data' | 'fields';\n\nexport interface Config<T extends ClientOptions = ClientOptions>\n  extends Omit<RequestInit, 'body' | 'headers' | 'method'>, CoreConfig {\n  /**\n   * Base URL for all requests made by this client.\n   */\n  baseUrl?: T['baseUrl'];\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   * Please don't use the Fetch client for Next.js applications. The `next`\n   * options won't have any effect.\n   *\n   * Install {@link https://www.npmjs.com/package/@hey-api/client-next `@hey-api/client-next`} instead.\n   */\n  next?: never;\n  /**\n   * Return the response data parsed in a specified format. By default, `auto`\n   * will infer the appropriate method from the `Content-Type` response header.\n   * You can override this behavior with any of the {@link Body} methods.\n   * Select `stream` if you don't want to parse response data at all.\n   *\n   * @default 'auto'\n   */\n  parseAs?: 'arrayBuffer' | 'auto' | 'blob' | 'formData' | 'json' | 'stream' | 'text';\n  /**\n   * Should we return only data or multiple fields (data, error, response, etc.)?\n   *\n   * @default 'fields'\n   */\n  responseStyle?: ResponseStyle;\n  /**\n   * Throw an error instead of returning it in the response?\n   *\n   * @default false\n   */\n  throwOnError?: T['throwOnError'];\n}\n\nexport interface RequestOptions<\n  TData = unknown,\n  TResponseStyle extends ResponseStyle = 'fields',\n  ThrowOnError extends boolean = boolean,\n  Url extends string = string,\n>\n  extends\n    Config<{\n      responseStyle: TResponseStyle;\n      throwOnError: ThrowOnError;\n    }>,\n    Pick<\n      ServerSentEventsOptions<TData>,\n      | 'onRequest'\n      | 'onSseError'\n      | 'onSseEvent'\n      | 'sseDefaultRetryDelay'\n      | 'sseMaxRetryAttempts'\n      | 'sseMaxRetryDelay'\n    > {\n  /**\n   * Any body that you want to add to your request.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/fetch#body}\n   */\n  body?: unknown;\n  path?: Record<string, unknown>;\n  query?: Record<string, unknown>;\n  /**\n   * Security mechanism(s) to use for the request.\n   */\n  security?: ReadonlyArray<Auth>;\n  url: Url;\n}\n\nexport interface ResolvedRequestOptions<\n  TResponseStyle extends ResponseStyle = 'fields',\n  ThrowOnError extends boolean = boolean,\n  Url extends string = string,\n> extends RequestOptions<unknown, TResponseStyle, ThrowOnError, Url> {\n  serializedBody?: string;\n}\n\nexport type RequestResult<\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = boolean,\n  TResponseStyle extends ResponseStyle = 'fields',\n> = ThrowOnError extends true\n  ? Promise<\n      TResponseStyle extends 'data'\n        ? TData extends Record<string, unknown>\n          ? TData[keyof TData]\n          : TData\n        : {\n            data: TData extends Record<string, unknown> ? TData[keyof TData] : TData;\n            request: Request;\n            response: Response;\n          }\n    >\n  : Promise<\n      TResponseStyle extends 'data'\n        ? (TData extends Record<string, unknown> ? TData[keyof TData] : TData) | undefined\n        : (\n            | {\n                data: TData extends Record<string, unknown> ? TData[keyof TData] : TData;\n                error: undefined;\n              }\n            | {\n                data: undefined;\n                error: TError extends Record<string, unknown> ? TError[keyof TError] : TError;\n              }\n          ) & {\n            request: Request;\n            response: Response;\n          }\n    >;\n\nexport interface ClientOptions {\n  baseUrl?: string;\n  responseStyle?: ResponseStyle;\n  throwOnError?: boolean;\n}\n\ntype MethodFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'>,\n) => RequestResult<TData, TError, ThrowOnError, TResponseStyle>;\n\ntype SseFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'>,\n) => Promise<ServerSentEventsResult<TData, TError>>;\n\ntype RequestFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'> &\n    Pick<Required<RequestOptions<TData, TResponseStyle, ThrowOnError>>, 'method'>,\n) => RequestResult<TData, TError, ThrowOnError, TResponseStyle>;\n\ntype BuildUrlFn = <\n  TData extends {\n    body?: unknown;\n    path?: Record<string, unknown>;\n    query?: Record<string, unknown>;\n    url: string;\n  },\n>(\n  options: TData & Options<TData>,\n) => string;\n\nexport type Client = CoreClient<RequestFn, Config, MethodFn, BuildUrlFn, SseFn> & {\n  interceptors: Middleware<Request, Response, unknown, ResolvedRequestOptions>;\n};\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 = ClientOptions> = (\n  override?: Config<ClientOptions & T>,\n) => Config<Required<ClientOptions> & T>;\n\nexport interface TDataShape {\n  body?: unknown;\n  headers?: unknown;\n  path?: unknown;\n  query?: unknown;\n  url: string;\n}\n\ntype OmitKeys<T, K> = Pick<T, Exclude<keyof T, K>>;\n\nexport type Options<\n  TData extends TDataShape = TDataShape,\n  ThrowOnError extends boolean = boolean,\n  TResponse = unknown,\n  TResponseStyle extends ResponseStyle = 'fields',\n> = OmitKeys<\n  RequestOptions<TResponse, TResponseStyle, ThrowOnError>,\n  'body' | 'path' | 'query' | 'url'\n> &\n  ([TData] extends [never] ? unknown : Omit<TData, 'url'>);\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/vue-query/name-builder/client/utils.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/vue-query/name-builder/client.gen.ts",
    "content": "// 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>());\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/vue-query/name-builder/core/auth.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/vue-query/name-builder/core/bodySerializer.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/vue-query/name-builder/core/params.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/vue-query/name-builder/core/pathSerializer.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/vue-query/name-builder/core/queryKeySerializer.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\n/**\n * JSON-friendly union that mirrors what Pinia Colada can hash.\n */\nexport type JsonValue =\n  | null\n  | string\n  | number\n  | boolean\n  | JsonValue[]\n  | { [key: string]: JsonValue };\n\n/**\n * Replacer that converts non-JSON values (bigint, Date, etc.) to safe substitutes.\n */\nexport const queryKeyJsonReplacer = (_key: string, value: unknown) => {\n  if (value === undefined || typeof value === 'function' || typeof value === 'symbol') {\n    return undefined;\n  }\n  if (typeof value === 'bigint') {\n    return value.toString();\n  }\n  if (value instanceof Date) {\n    return value.toISOString();\n  }\n  return value;\n};\n\n/**\n * Safely stringifies a value and parses it back into a JsonValue.\n */\nexport const stringifyToJsonValue = (input: unknown): JsonValue | undefined => {\n  try {\n    const json = JSON.stringify(input, queryKeyJsonReplacer);\n    if (json === undefined) {\n      return undefined;\n    }\n    return JSON.parse(json) as JsonValue;\n  } catch {\n    return undefined;\n  }\n};\n\n/**\n * Detects plain objects (including objects with a null prototype).\n */\nconst isPlainObject = (value: unknown): value is Record<string, unknown> => {\n  if (value === null || typeof value !== 'object') {\n    return false;\n  }\n  const prototype = Object.getPrototypeOf(value as object);\n  return prototype === Object.prototype || prototype === null;\n};\n\n/**\n * Turns URLSearchParams into a sorted JSON object for deterministic keys.\n */\nconst serializeSearchParams = (params: URLSearchParams): JsonValue => {\n  const entries = Array.from(params.entries()).sort(([a], [b]) => a.localeCompare(b));\n  const result: Record<string, JsonValue> = {};\n\n  for (const [key, value] of entries) {\n    const existing = result[key];\n    if (existing === undefined) {\n      result[key] = value;\n      continue;\n    }\n\n    if (Array.isArray(existing)) {\n      (existing as string[]).push(value);\n    } else {\n      result[key] = [existing, value];\n    }\n  }\n\n  return result;\n};\n\n/**\n * Normalizes any accepted value into a JSON-friendly shape for query keys.\n */\nexport const serializeQueryKeyValue = (value: unknown): JsonValue | undefined => {\n  if (value === null) {\n    return null;\n  }\n\n  if (typeof value === 'string' || typeof value === 'number' || typeof value === 'boolean') {\n    return value;\n  }\n\n  if (value === undefined || typeof value === 'function' || typeof value === 'symbol') {\n    return undefined;\n  }\n\n  if (typeof value === 'bigint') {\n    return value.toString();\n  }\n\n  if (value instanceof Date) {\n    return value.toISOString();\n  }\n\n  if (Array.isArray(value)) {\n    return stringifyToJsonValue(value);\n  }\n\n  if (typeof URLSearchParams !== 'undefined' && value instanceof URLSearchParams) {\n    return serializeSearchParams(value);\n  }\n\n  if (isPlainObject(value)) {\n    return stringifyToJsonValue(value);\n  }\n\n  return undefined;\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/vue-query/name-builder/core/serverSentEvents.gen.ts",
    "content": "// 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 const 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            // Normalize line endings: CRLF -> LF, then CR -> LF\n            buffer = buffer.replace(/\\r\\n/g, '\\n').replace(/\\r/g, '\\n');\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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/vue-query/name-builder/core/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { Auth, AuthToken } from './auth.gen';\nimport type { BodySerializer, QuerySerializer, QuerySerializerOptions } from './bodySerializer.gen';\n\nexport type HttpMethod =\n  | 'connect'\n  | 'delete'\n  | 'get'\n  | 'head'\n  | 'options'\n  | 'patch'\n  | 'post'\n  | 'put'\n  | 'trace';\n\nexport type Client<\n  RequestFn = never,\n  Config = unknown,\n  MethodFn = never,\n  BuildUrlFn = never,\n  SseFn = never,\n> = {\n  /**\n   * Returns the final request URL.\n   */\n  buildUrl: BuildUrlFn;\n  getConfig: () => Config;\n  request: RequestFn;\n  setConfig: (config: Config) => Config;\n} & {\n  [K in HttpMethod]: MethodFn;\n} & ([SseFn] extends [never] ? { sse?: never } : { sse: { [K in HttpMethod]: SseFn } });\n\nexport interface Config {\n  /**\n   * Auth token or a function returning auth token. The resolved value will be\n   * added to the request payload as defined by its `security` array.\n   */\n  auth?: ((auth: Auth) => Promise<AuthToken> | AuthToken) | AuthToken;\n  /**\n   * A function for serializing request body parameter. By default,\n   * {@link JSON.stringify()} will be used.\n   */\n  bodySerializer?: BodySerializer | null;\n  /**\n   * An object containing any HTTP headers that you want to pre-populate your\n   * `Headers` object with.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/Headers/Headers#init See more}\n   */\n  headers?:\n    | RequestInit['headers']\n    | Record<\n        string,\n        string | number | boolean | (string | number | boolean)[] | null | undefined | unknown\n      >;\n  /**\n   * The request method.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/fetch#method See more}\n   */\n  method?: Uppercase<HttpMethod>;\n  /**\n   * A function for serializing request query parameters. By default, arrays\n   * will be exploded in form style, objects will be exploded in deepObject\n   * style, and reserved characters are percent-encoded.\n   *\n   * This method will have no effect if the native `paramsSerializer()` Axios\n   * API function is used.\n   *\n   * {@link https://swagger.io/docs/specification/serialization/#query View examples}\n   */\n  querySerializer?: QuerySerializer | QuerySerializerOptions;\n  /**\n   * A function validating request data. This is useful if you want to ensure\n   * the request conforms to the desired shape, so it can be safely sent to\n   * the server.\n   */\n  requestValidator?: (data: unknown) => Promise<unknown>;\n  /**\n   * A function transforming response data before it's returned. This is useful\n   * for post-processing data, e.g. converting ISO strings into Date objects.\n   */\n  responseTransformer?: (data: unknown) => Promise<unknown>;\n  /**\n   * A function validating response data. This is useful if you want to ensure\n   * the response conforms to the desired shape, so it can be safely passed to\n   * the transformers and returned to the user.\n   */\n  responseValidator?: (data: unknown) => Promise<unknown>;\n}\n\ntype IsExactlyNeverOrNeverUndefined<T> = [T] extends [never]\n  ? true\n  : [T] extends [never | undefined]\n    ? [undefined] extends [T]\n      ? false\n      : true\n    : false;\n\nexport type OmitNever<T extends Record<string, unknown>> = {\n  [K in keyof T as IsExactlyNeverOrNeverUndefined<T[K]> extends true ? never : K]: T[K];\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/vue-query/name-builder/core/utils.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/vue-query/name-builder/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport { fooBarPost, fooBarPut, fooPost, fooPut, getFoo, getFooBar, type Options } from './sdk.gen';\nexport type { ClientOptions, FooBarPostData, FooBarPostResponse, FooBarPostResponses, FooBarPutData, FooBarPutResponse, FooBarPutResponses, FooPostData, FooPostResponse, FooPostResponses, FooPutData, FooPutResponse, FooPutResponses, GetFooBarData, GetFooBarResponse, GetFooBarResponses, GetFooData, GetFooResponse, GetFooResponses } from './types.gen';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/vue-query/name-builder/sdk.gen.ts",
    "content": "// 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 { FooBarPostData, FooBarPostResponses, FooBarPutData, FooBarPutResponses, FooPostData, FooPostResponses, FooPutData, FooPutResponses, GetFooBarData, GetFooBarResponses, GetFooData, GetFooResponses } from './types.gen';\n\nexport type Options<TData extends TDataShape = TDataShape, ThrowOnError extends boolean = boolean> = Options2<TData, ThrowOnError> & {\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\nexport const getFoo = <ThrowOnError extends boolean = false>(options?: Options<GetFooData, ThrowOnError>) => (options?.client ?? client).get<GetFooResponses, unknown, ThrowOnError>({ url: '/foo', ...options });\n\nexport const fooPost = <ThrowOnError extends boolean = false>(options?: Options<FooPostData, ThrowOnError>) => (options?.client ?? client).post<FooPostResponses, unknown, ThrowOnError>({ url: '/foo', ...options });\n\nexport const fooPut = <ThrowOnError extends boolean = false>(options?: Options<FooPutData, ThrowOnError>) => (options?.client ?? client).put<FooPutResponses, unknown, ThrowOnError>({ url: '/foo', ...options });\n\nexport const getFooBar = <ThrowOnError extends boolean = false>(options?: Options<GetFooBarData, ThrowOnError>) => (options?.client ?? client).get<GetFooBarResponses, unknown, ThrowOnError>({ url: '/foo/bar', ...options });\n\nexport const fooBarPost = <ThrowOnError extends boolean = false>(options?: Options<FooBarPostData, ThrowOnError>) => (options?.client ?? client).post<FooBarPostResponses, unknown, ThrowOnError>({ url: '/foo/bar', ...options });\n\nexport const fooBarPut = <ThrowOnError extends boolean = false>(options?: Options<FooBarPutData, ThrowOnError>) => (options?.client ?? client).put<FooBarPutResponses, unknown, ThrowOnError>({ url: '/foo/bar', ...options });\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/vue-query/name-builder/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type ClientOptions = {\n    baseUrl: `${string}://${string}` | (string & {});\n};\n\nexport type GetFooData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/foo';\n};\n\nexport type GetFooResponses = {\n    /**\n     * OK\n     */\n    200: string;\n};\n\nexport type GetFooResponse = GetFooResponses[keyof GetFooResponses];\n\nexport type FooPostData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/foo';\n};\n\nexport type FooPostResponses = {\n    /**\n     * OK\n     */\n    200: string;\n};\n\nexport type FooPostResponse = FooPostResponses[keyof FooPostResponses];\n\nexport type FooPutData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/foo';\n};\n\nexport type FooPutResponses = {\n    /**\n     * OK\n     */\n    200: string;\n};\n\nexport type FooPutResponse = FooPutResponses[keyof FooPutResponses];\n\nexport type GetFooBarData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/foo/bar';\n};\n\nexport type GetFooBarResponses = {\n    /**\n     * OK\n     */\n    200: string;\n};\n\nexport type GetFooBarResponse = GetFooBarResponses[keyof GetFooBarResponses];\n\nexport type FooBarPostData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/foo/bar';\n};\n\nexport type FooBarPostResponses = {\n    /**\n     * OK\n     */\n    200: string;\n};\n\nexport type FooBarPostResponse = FooBarPostResponses[keyof FooBarPostResponses];\n\nexport type FooBarPutData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/foo/bar';\n};\n\nexport type FooBarPutResponses = {\n    /**\n     * OK\n     */\n    200: string;\n};\n\nexport type FooBarPutResponse = FooBarPutResponses[keyof FooBarPutResponses];\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/fastify/default/fastify.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { RouteHandler } from 'fastify';\n\nimport type { ApiVVersionODataControllerCountResponses, CallToTestOrderOfParamsData, CallWithDefaultOptionalParametersData, CallWithDefaultParametersData, CallWithDescriptionsData, CallWithDuplicateResponsesErrors, CallWithDuplicateResponsesResponses, CallWithNoContentResponseResponses, CallWithParametersData, CallWithResponseAndNoContentResponseResponses, CallWithResponsesErrors, CallWithResponsesResponses, CallWithResultFromHeaderErrors, CallWithResultFromHeaderResponses, CallWithWeirdParameterNamesData, CollectionFormatData, ComplexParamsData, ComplexParamsResponses, ComplexTypesData, ComplexTypesErrors, ComplexTypesResponses, DeleteFooData3, DeprecatedCallData, DummyAResponses, DummyBResponses, FileResponseData, FileResponseResponses, GetApiVbyApiVersionSimpleOperationData, GetApiVbyApiVersionSimpleOperationResponses, GetCallWithOptionalParamData, ImportData, ImportResponses, MultipartRequestData, MultipartResponseResponses, NonAsciiæøåÆøÅöôêÊ字符串Data, NonAsciiæøåÆøÅöôêÊ字符串Responses, PostApiVbyApiVersionFormDataData, PostApiVbyApiVersionRequestBodyData, PostCallWithOptionalParamData, PostCallWithOptionalParamResponses, PutWithFormUrlEncodedData, TestErrorCodeData, TestErrorCodeErrors, TestErrorCodeResponses, TypesData, TypesResponses, UploadFileData, UploadFileResponses } from './types.gen';\n\nexport type RouteHandlers = {\n    import: RouteHandler<{\n        Body: ImportData['body'];\n        Reply: Omit<ImportResponses, 'default'>;\n    }>;\n    apiVVersionODataControllerCount: RouteHandler<{\n        Reply: ApiVVersionODataControllerCountResponses;\n    }>;\n    getApiVbyApiVersionSimpleOperation: RouteHandler<{\n        Params: GetApiVbyApiVersionSimpleOperationData['path'];\n        Reply: GetApiVbyApiVersionSimpleOperationResponses;\n    }>;\n    deleteFoo: RouteHandler<{\n        Headers: DeleteFooData3['headers'];\n        Params: DeleteFooData3['path'];\n    }>;\n    callWithDescriptions: RouteHandler<{\n        Querystring?: CallWithDescriptionsData['query'];\n    }>;\n    deprecatedCall: RouteHandler<{\n        Headers: DeprecatedCallData['headers'];\n    }>;\n    callWithParameters: RouteHandler<{\n        Body: CallWithParametersData['body'];\n        Headers: CallWithParametersData['headers'];\n        Params: CallWithParametersData['path'];\n        Querystring: CallWithParametersData['query'];\n    }>;\n    callWithWeirdParameterNames: RouteHandler<{\n        Body: CallWithWeirdParameterNamesData['body'];\n        Headers: CallWithWeirdParameterNamesData['headers'];\n        Params: CallWithWeirdParameterNamesData['path'];\n        Querystring: CallWithWeirdParameterNamesData['query'];\n    }>;\n    getCallWithOptionalParam: RouteHandler<{\n        Body: GetCallWithOptionalParamData['body'];\n        Querystring?: GetCallWithOptionalParamData['query'];\n    }>;\n    postCallWithOptionalParam: RouteHandler<{\n        Body?: PostCallWithOptionalParamData['body'];\n        Querystring: PostCallWithOptionalParamData['query'];\n        Reply: PostCallWithOptionalParamResponses;\n    }>;\n    postApiVbyApiVersionRequestBody: RouteHandler<{\n        Body?: PostApiVbyApiVersionRequestBodyData['body'];\n        Querystring?: PostApiVbyApiVersionRequestBodyData['query'];\n    }>;\n    postApiVbyApiVersionFormData: RouteHandler<{\n        Body?: PostApiVbyApiVersionFormDataData['body'];\n        Querystring?: PostApiVbyApiVersionFormDataData['query'];\n    }>;\n    callWithDefaultParameters: RouteHandler<{\n        Querystring?: CallWithDefaultParametersData['query'];\n    }>;\n    callWithDefaultOptionalParameters: RouteHandler<{\n        Querystring?: CallWithDefaultOptionalParametersData['query'];\n    }>;\n    callToTestOrderOfParams: RouteHandler<{\n        Querystring: CallToTestOrderOfParamsData['query'];\n    }>;\n    callWithNoContentResponse: RouteHandler<{\n        Reply: CallWithNoContentResponseResponses;\n    }>;\n    callWithResponseAndNoContentResponse: RouteHandler<{\n        Reply: CallWithResponseAndNoContentResponseResponses;\n    }>;\n    dummyA: RouteHandler<{\n        Reply: DummyAResponses;\n    }>;\n    dummyB: RouteHandler<{\n        Reply: DummyBResponses;\n    }>;\n    callWithDuplicateResponses: RouteHandler<{\n        Reply: Omit<CallWithDuplicateResponsesErrors, 'default'> & CallWithDuplicateResponsesResponses;\n    }>;\n    callWithResponses: RouteHandler<{\n        Reply: Omit<CallWithResponsesErrors, 'default'> & CallWithResponsesResponses;\n    }>;\n    collectionFormat: RouteHandler<{\n        Querystring: CollectionFormatData['query'];\n    }>;\n    types: RouteHandler<{\n        Params?: TypesData['path'];\n        Querystring: TypesData['query'];\n        Reply: TypesResponses;\n    }>;\n    uploadFile: RouteHandler<{\n        Body: UploadFileData['body'];\n        Params: UploadFileData['path'];\n        Reply: UploadFileResponses;\n    }>;\n    fileResponse: RouteHandler<{\n        Params: FileResponseData['path'];\n        Reply: FileResponseResponses;\n    }>;\n    complexTypes: RouteHandler<{\n        Querystring: ComplexTypesData['query'];\n        Reply: ComplexTypesErrors & ComplexTypesResponses;\n    }>;\n    multipartResponse: RouteHandler<{\n        Reply: MultipartResponseResponses;\n    }>;\n    multipartRequest: RouteHandler<{\n        Body?: MultipartRequestData['body'];\n    }>;\n    complexParams: RouteHandler<{\n        Body?: ComplexParamsData['body'];\n        Params: ComplexParamsData['path'];\n        Reply: ComplexParamsResponses;\n    }>;\n    callWithResultFromHeader: RouteHandler<{\n        Reply: CallWithResultFromHeaderErrors & CallWithResultFromHeaderResponses;\n    }>;\n    testErrorCode: RouteHandler<{\n        Querystring: TestErrorCodeData['query'];\n        Reply: TestErrorCodeErrors & TestErrorCodeResponses;\n    }>;\n    nonAsciiæøåÆøÅöôêÊ字符串: RouteHandler<{\n        Querystring: NonAsciiæøåÆøÅöôêÊ字符串Data['query'];\n        Reply: NonAsciiæøåÆøÅöôêÊ字符串Responses;\n    }>;\n    putWithFormUrlEncoded: RouteHandler<{\n        Body: PutWithFormUrlEncodedData['body'];\n    }>;\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/fastify/default/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type { _3eNum1Период, _400, AdditionalPropertiesIntegerIssue, AdditionalPropertiesUnknownIssue, AdditionalPropertiesUnknownIssue2, AdditionalPropertiesUnknownIssue3, AdditionalPropertiesUnknownIssueWritable, AnyOfAnyAndNull, AnyOfArrays, ApiVVersionODataControllerCountData, ApiVVersionODataControllerCountResponse, ApiVVersionODataControllerCountResponses, ArrayWithAnyOfProperties, ArrayWithArray, ArrayWithBooleans, ArrayWithNumbers, ArrayWithProperties, ArrayWithReferences, ArrayWithStrings, CallToTestOrderOfParamsData, CallWithDefaultOptionalParametersData, CallWithDefaultParametersData, CallWithDescriptionsData, CallWithDuplicateResponsesData, CallWithDuplicateResponsesError, CallWithDuplicateResponsesErrors, CallWithDuplicateResponsesResponse, CallWithDuplicateResponsesResponses, CallWithNoContentResponseData, CallWithNoContentResponseResponse, CallWithNoContentResponseResponses, CallWithParametersData, CallWithResponseAndNoContentResponseData, CallWithResponseAndNoContentResponseResponse, CallWithResponseAndNoContentResponseResponses, CallWithResponseData, CallWithResponseResponse, CallWithResponseResponses, CallWithResponsesData, CallWithResponsesError, CallWithResponsesErrors, CallWithResponsesResponse, CallWithResponsesResponses, CallWithResultFromHeaderData, CallWithResultFromHeaderErrors, CallWithResultFromHeaderResponses, CallWithWeirdParameterNamesData, CamelCaseCommentWithBreaks, CharactersInDescription, ClientOptions, CollectionFormatData, CommentWithBackticks, CommentWithBackticksAndQuotes, CommentWithBreaks, CommentWithExpressionPlaceholders, CommentWithQuotes, CommentWithReservedCharacters, CommentWithSlashes, ComplexParamsData, ComplexParamsResponse, ComplexParamsResponses, ComplexTypesData, ComplexTypesErrors, ComplexTypesResponse, ComplexTypesResponses, CompositionBaseModel, CompositionExtendedModel, CompositionWithAllOfAndNullable, CompositionWithAnyOf, CompositionWithAnyOfAndNullable, CompositionWithAnyOfAnonymous, CompositionWithNestedAnyAndTypeNull, CompositionWithNestedAnyOfAndNull, CompositionWithOneOf, CompositionWithOneOfAndComplexArrayDictionary, CompositionWithOneOfAndNullable, CompositionWithOneOfAndProperties, CompositionWithOneOfAndSimpleArrayDictionary, CompositionWithOneOfAndSimpleDictionary, CompositionWithOneOfAnonymous, CompositionWithOneOfDiscriminator, ConstValue, Default, DeleteCallWithoutParametersAndResponseData, DeleteFooData, DeleteFooData2, DeleteFooData3, DeprecatedCallData, DeprecatedModel, DictionaryWithArray, DictionaryWithDictionary, DictionaryWithProperties, DictionaryWithPropertiesAndAdditionalProperties, DictionaryWithReference, DictionaryWithString, DummyAData, DummyAResponse, DummyAResponses, DummyBData, DummyBResponse, DummyBResponses, DuplicateName2Data, DuplicateName3Data, DuplicateName4Data, DuplicateNameData, EnumFromDescription, EnumWithExtensions, EnumWithNumbers, EnumWithReplacedCharacters, EnumWithStrings, EnumWithXEnumNames, ExportData, ExternalRefA, ExternalRefB, ExternalSharedModel, File, FileResponseData, FileResponseResponse, FileResponseResponses, FileWritable, FooWowData, FooWowResponses, FreeFormObjectWithAdditionalPropertiesEqEmptyObject, FreeFormObjectWithAdditionalPropertiesEqTrue, FreeFormObjectWithoutAdditionalProperties, GenericSchemaDuplicateIssue1SystemBoolean, GenericSchemaDuplicateIssue1SystemBooleanWritable, GenericSchemaDuplicateIssue1SystemString, GenericSchemaDuplicateIssue1SystemStringWritable, GetApiVbyApiVersionSimpleOperationData, GetApiVbyApiVersionSimpleOperationError, GetApiVbyApiVersionSimpleOperationErrors, GetApiVbyApiVersionSimpleOperationResponse, GetApiVbyApiVersionSimpleOperationResponses, GetCallWithOptionalParamData, GetCallWithoutParametersAndResponseData, HeadCallWithoutParametersAndResponseData, Import, ImportData, ImportResponse, ImportResponses, IoK8sApimachineryPkgApisMetaV1DeleteOptions, IoK8sApimachineryPkgApisMetaV1Preconditions, ModelCircle, ModelFromZendesk, ModelSquare, ModelThatExtends, ModelThatExtendsExtends, ModelWithAdditionalPropertiesEqTrue, ModelWithAdditionalPropertiesRef, ModelWithAnyOfConstantSizeArray, ModelWithAnyOfConstantSizeArrayAndIntersect, ModelWithAnyOfConstantSizeArrayNullable, ModelWithAnyOfConstantSizeArrayWithNSizeAndOptions, ModelWithAnyOfConstantSizeArrayWithNSizeAndOptionsWritable, ModelWithArray, ModelWithArrayReadOnlyAndWriteOnly, ModelWithArrayReadOnlyAndWriteOnlyWritable, ModelWithBackticksInDescription, ModelWithBoolean, ModelWithCircularReference, ModelWithConst, ModelWithConstantSizeArray, ModelWithDictionary, ModelWithDuplicateImports, ModelWithDuplicateProperties, ModelWithEnum, ModelWithEnumFromDescription, ModelWithEnumWithHyphen, ModelWithInteger, ModelWithNestedArrayEnums, ModelWithNestedArrayEnumsData, ModelWithNestedArrayEnumsDataBar, ModelWithNestedArrayEnumsDataFoo, ModelWithNestedCompositionEnums, ModelWithNestedEnums, ModelWithNestedProperties, ModelWithNullableObject, ModelWithNullableString, ModelWithNumericEnumUnion, ModelWithOneOfAndProperties, ModelWithOneOfEnum, ModelWithOrderedProperties, ModelWithPattern, ModelWithPatternWritable, ModelWithPrefixItemsConstantSizeArray, ModelWithProperties, ModelWithPropertiesWritable, ModelWithReadOnlyAndWriteOnly, ModelWithReadOnlyAndWriteOnlyWritable, ModelWithReference, ModelWithReferenceWritable, ModelWithString, ModelWithStringError, MultipartRequestData, MultipartResponseData, MultipartResponseResponse, MultipartResponseResponses, NestedAnyOfArraysNullable, NonAsciiæøåÆøÅöôêÊ字符串Data, NonAsciiæøåÆøÅöôêÊ字符串Response, NonAsciiæøåÆøÅöôêÊ字符串Responses, NonAsciiStringæøåÆøÅöôêÊ字符串, NullableObject, OneOfAllOfIssue, OneOfAllOfIssueWritable, OptionsCallWithoutParametersAndResponseData, Pageable, ParameterSimpleParameterUnused, PatchApiVbyApiVersionNoTagData, PatchApiVbyApiVersionNoTagResponses, PatchCallWithoutParametersAndResponseData, PostApiVbyApiVersionFormDataData, PostApiVbyApiVersionRequestBodyData, PostCallWithOptionalParamData, PostCallWithOptionalParamResponse, PostCallWithOptionalParamResponses, PostCallWithoutParametersAndResponseData, PostServiceWithEmptyTagResponse, PostServiceWithEmptyTagResponse2, PutCallWithoutParametersAndResponseData, PutWithFormUrlEncodedData, SchemaWithFormRestrictedKeys, SimpleBoolean, SimpleFile, SimpleFormData, SimpleInteger, SimpleParameter, SimpleReference, SimpleRequestBody, SimpleString, SimpleStringWithPattern, TestErrorCodeData, TestErrorCodeErrors, TestErrorCodeResponses, TypesData, TypesResponse, TypesResponses, UploadFileData, UploadFileResponse, UploadFileResponses, XFooBar } from './types.gen';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/fastify/default/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type ClientOptions = {\n    baseUrl: 'http://localhost:3000/base' | (string & {});\n};\n\n/**\n * Model with number-only name\n */\nexport type _400 = string;\n\nexport type ExternalRefA = ExternalSharedModel;\n\nexport type ExternalRefB = ExternalSharedModel;\n\n/**\n * Testing multiline comments in string: First line\n * Second line\n *\n * Fourth line\n */\nexport type CamelCaseCommentWithBreaks = number;\n\n/**\n * Testing multiline comments in string: First line\n * Second line\n *\n * Fourth line\n */\nexport type CommentWithBreaks = number;\n\n/**\n * Testing backticks in string: `backticks` and ```multiple backticks``` should work\n */\nexport type CommentWithBackticks = number;\n\n/**\n * Testing backticks and quotes in string: `backticks`, 'quotes', \"double quotes\" and ```multiple backticks``` should work\n */\nexport type CommentWithBackticksAndQuotes = number;\n\n/**\n * Testing slashes in string: \\backwards\\\\\\ and /forwards/// should work\n */\nexport type CommentWithSlashes = number;\n\n/**\n * Testing expression placeholders in string: ${expression} should work\n */\nexport type CommentWithExpressionPlaceholders = number;\n\n/**\n * Testing quotes in string: 'single quote''' and \"double quotes\"\"\" should work\n */\nexport type CommentWithQuotes = number;\n\n/**\n * Testing reserved characters in string: * inline * and ** inline ** should work\n */\nexport type CommentWithReservedCharacters = number;\n\n/**\n * This is a simple number\n */\nexport type SimpleInteger = number;\n\n/**\n * This is a simple boolean\n */\nexport type SimpleBoolean = boolean;\n\n/**\n * This is a simple string\n */\nexport type SimpleString = string;\n\n/**\n * A string with non-ascii (unicode) characters valid in typescript identifiers (æøåÆØÅöÔèÈ字符串)\n */\nexport type NonAsciiStringæøåÆøÅöôêÊ字符串 = string;\n\n/**\n * This is a simple file\n */\nexport type SimpleFile = Blob | File;\n\n/**\n * This is a simple reference\n */\nexport type SimpleReference = ModelWithString;\n\n/**\n * This is a simple string\n */\nexport type SimpleStringWithPattern = string | null;\n\n/**\n * This is a simple enum with strings\n */\nexport type EnumWithStrings = 'Success' | 'Warning' | 'Error' | '\\'Single Quote\\'' | '\"Double Quotes\"' | 'Non-ascii: øæåôöØÆÅÔÖ字符串';\n\nexport type EnumWithReplacedCharacters = '\\'Single Quote\\'' | '\"Double Quotes\"' | 'øæåôöØÆÅÔÖ字符串' | 3.1 | '';\n\n/**\n * This is a simple enum with numbers\n */\nexport type EnumWithNumbers = 1 | 2 | 3 | 1.1 | 1.2 | 1.3 | 100 | 200 | 300 | -100 | -200 | -300 | -1.1 | -1.2 | -1.3;\n\n/**\n * Success=1,Warning=2,Error=3\n */\nexport type EnumFromDescription = number;\n\n/**\n * This is a simple enum with numbers\n */\nexport type EnumWithExtensions = 200 | 400 | 500;\n\nexport type EnumWithXEnumNames = 0 | 1 | 2;\n\n/**\n * This is a simple array with numbers\n */\nexport type ArrayWithNumbers = Array<number>;\n\n/**\n * This is a simple array with booleans\n */\nexport type ArrayWithBooleans = Array<boolean>;\n\n/**\n * This is a simple array with strings\n */\nexport type ArrayWithStrings = Array<string>;\n\n/**\n * This is a simple array with references\n */\nexport type ArrayWithReferences = Array<ModelWithString>;\n\n/**\n * This is a simple array containing an array\n */\nexport type ArrayWithArray = Array<Array<ModelWithString>>;\n\n/**\n * This is a simple array with properties\n */\nexport type ArrayWithProperties = Array<{\n    '16x16'?: CamelCaseCommentWithBreaks;\n    bar?: string;\n}>;\n\n/**\n * This is a simple array with any of properties\n */\nexport type ArrayWithAnyOfProperties = Array<{\n    foo?: string;\n} | {\n    bar?: string;\n}>;\n\nexport type AnyOfAnyAndNull = {\n    data?: unknown;\n};\n\n/**\n * This is a simple array with any of properties\n */\nexport type AnyOfArrays = {\n    results?: Array<{\n        foo?: string;\n    } | {\n        bar?: string;\n    }>;\n};\n\n/**\n * This is a string dictionary\n */\nexport type DictionaryWithString = {\n    [key: string]: string;\n};\n\nexport type DictionaryWithPropertiesAndAdditionalProperties = {\n    foo?: number;\n    bar?: boolean;\n    [key: string]: string | number | boolean | undefined;\n};\n\n/**\n * This is a string reference\n */\nexport type DictionaryWithReference = {\n    [key: string]: ModelWithString;\n};\n\n/**\n * This is a complex dictionary\n */\nexport type DictionaryWithArray = {\n    [key: string]: Array<ModelWithString>;\n};\n\n/**\n * This is a string dictionary\n */\nexport type DictionaryWithDictionary = {\n    [key: string]: {\n        [key: string]: string;\n    };\n};\n\n/**\n * This is a complex dictionary\n */\nexport type DictionaryWithProperties = {\n    [key: string]: {\n        foo?: string;\n        bar?: string;\n    };\n};\n\n/**\n * This is a model with one number property\n */\nexport type ModelWithInteger = {\n    /**\n     * This is a simple number property\n     */\n    prop?: number;\n};\n\n/**\n * This is a model with one boolean property\n */\nexport type ModelWithBoolean = {\n    /**\n     * This is a simple boolean property\n     */\n    prop?: boolean;\n};\n\n/**\n * This is a model with one string property\n */\nexport type ModelWithString = {\n    /**\n     * This is a simple string property\n     */\n    prop?: string;\n};\n\n/**\n * This is a model with one string property\n */\nexport type ModelWithStringError = {\n    /**\n     * This is a simple string property\n     */\n    prop?: string;\n};\n\n/**\n * `Comment` or `VoiceComment`. The JSON object for adding voice comments to tickets is different. See [Adding voice comments to tickets](/documentation/ticketing/managing-tickets/adding-voice-comments-to-tickets)\n */\nexport type ModelFromZendesk = string;\n\n/**\n * This is a model with one string property\n */\nexport type ModelWithNullableString = {\n    /**\n     * This is a simple string property\n     */\n    nullableProp1?: string | null;\n    /**\n     * This is a simple string property\n     */\n    nullableRequiredProp1: string | null;\n    /**\n     * This is a simple string property\n     */\n    nullableProp2?: string | null;\n    /**\n     * This is a simple string property\n     */\n    nullableRequiredProp2: string | null;\n    /**\n     * This is a simple enum with strings\n     */\n    'foo_bar-enum'?: 'Success' | 'Warning' | 'Error' | 'ØÆÅ字符串';\n};\n\n/**\n * This is a model with one enum\n */\nexport type ModelWithEnum = {\n    /**\n     * This is a simple enum with strings\n     */\n    'foo_bar-enum'?: 'Success' | 'Warning' | 'Error' | 'ØÆÅ字符串';\n    /**\n     * These are the HTTP error code enums\n     */\n    statusCode?: '100' | '200 FOO' | '300 FOO_BAR' | '400 foo-bar' | '500 foo.bar' | '600 foo&bar';\n    /**\n     * Simple boolean enum\n     */\n    bool?: true;\n};\n\n/**\n * This is a model with one enum with escaped name\n */\nexport type ModelWithEnumWithHyphen = {\n    /**\n     * Foo-Bar-Baz-Qux\n     */\n    'foo-bar-baz-qux'?: '3.0';\n};\n\n/**\n * This is a model with one enum\n */\nexport type ModelWithEnumFromDescription = {\n    /**\n     * Success=1,Warning=2,Error=3\n     */\n    test?: number;\n};\n\n/**\n * This is a model with nested enums\n */\nexport type ModelWithNestedEnums = {\n    dictionaryWithEnum?: {\n        [key: string]: 'Success' | 'Warning' | 'Error';\n    };\n    dictionaryWithEnumFromDescription?: {\n        [key: string]: number;\n    };\n    arrayWithEnum?: Array<'Success' | 'Warning' | 'Error'>;\n    arrayWithDescription?: Array<number>;\n    /**\n     * This is a simple enum with strings\n     */\n    'foo_bar-enum'?: 'Success' | 'Warning' | 'Error' | 'ØÆÅ字符串';\n};\n\n/**\n * This is a model with one property containing a reference\n */\nexport type ModelWithReference = {\n    prop?: ModelWithProperties;\n};\n\n/**\n * This is a model with one property containing an array\n */\nexport type ModelWithArrayReadOnlyAndWriteOnly = {\n    prop?: Array<ModelWithReadOnlyAndWriteOnly>;\n    propWithFile?: Array<Blob | File>;\n    propWithNumber?: Array<number>;\n};\n\n/**\n * This is a model with one property containing an array\n */\nexport type ModelWithArray = {\n    prop?: Array<ModelWithString>;\n    propWithFile?: Array<Blob | File>;\n    propWithNumber?: Array<number>;\n};\n\n/**\n * This is a model with one property containing a dictionary\n */\nexport type ModelWithDictionary = {\n    prop?: {\n        [key: string]: string;\n    };\n};\n\n/**\n * This is a deprecated model with a deprecated property\n *\n * @deprecated\n */\nexport type DeprecatedModel = {\n    /**\n     * This is a deprecated property\n     *\n     * @deprecated\n     */\n    prop?: string;\n};\n\n/**\n * This is a model with one property containing a circular reference\n */\nexport type ModelWithCircularReference = {\n    prop?: ModelWithCircularReference;\n};\n\n/**\n * This is a model with one property with a 'one of' relationship\n */\nexport type CompositionWithOneOf = {\n    propA?: ModelWithString | ModelWithEnum | ModelWithArray | ModelWithDictionary;\n};\n\n/**\n * This is a model with one property with a 'one of' relationship where the options are not $ref\n */\nexport type CompositionWithOneOfAnonymous = {\n    propA?: {\n        propA?: string;\n    } | string | number;\n};\n\n/**\n * Circle\n */\nexport type ModelCircle = {\n    kind: string;\n    radius?: number;\n};\n\n/**\n * Square\n */\nexport type ModelSquare = {\n    kind: string;\n    sideLength?: number;\n};\n\n/**\n * This is a model with one property with a 'one of' relationship where the options are not $ref\n */\nexport type CompositionWithOneOfDiscriminator = ({\n    kind: 'circle';\n} & ModelCircle) | ({\n    kind: 'square';\n} & ModelSquare);\n\n/**\n * This is a model with one property with a 'any of' relationship\n */\nexport type CompositionWithAnyOf = {\n    propA?: ModelWithString | ModelWithEnum | ModelWithArray | ModelWithDictionary;\n};\n\n/**\n * This is a model with one property with a 'any of' relationship where the options are not $ref\n */\nexport type CompositionWithAnyOfAnonymous = {\n    propA?: {\n        propA?: string;\n    } | string | number;\n};\n\n/**\n * This is a model with nested 'any of' property with a type null\n */\nexport type CompositionWithNestedAnyAndTypeNull = {\n    propA?: Array<ModelWithDictionary | null> | Array<ModelWithArray | null>;\n};\n\nexport type _3eNum1Период = 'Bird' | 'Dog';\n\nexport type ConstValue = 'ConstValue';\n\n/**\n * This is a model with one property with a 'any of' relationship where the options are not $ref\n */\nexport type CompositionWithNestedAnyOfAndNull = {\n    propA?: Array<_3eNum1Период | ConstValue> | null;\n};\n\n/**\n * This is a model with one property with a 'one of' relationship\n */\nexport type CompositionWithOneOfAndNullable = {\n    propA?: {\n        boolean?: boolean;\n    } | ModelWithEnum | ModelWithArray | ModelWithDictionary | null;\n};\n\n/**\n * This is a model that contains a simple dictionary within composition\n */\nexport type CompositionWithOneOfAndSimpleDictionary = {\n    propA?: boolean | {\n        [key: string]: number;\n    };\n};\n\n/**\n * This is a model that contains a dictionary of simple arrays within composition\n */\nexport type CompositionWithOneOfAndSimpleArrayDictionary = {\n    propA?: boolean | {\n        [key: string]: Array<boolean>;\n    };\n};\n\n/**\n * This is a model that contains a dictionary of complex arrays (composited) within composition\n */\nexport type CompositionWithOneOfAndComplexArrayDictionary = {\n    propA?: boolean | {\n        [key: string]: Array<number | string>;\n    };\n};\n\n/**\n * This is a model with one property with a 'all of' relationship\n */\nexport type CompositionWithAllOfAndNullable = {\n    propA?: ({\n        boolean?: boolean;\n    } & ModelWithEnum & ModelWithArray & ModelWithDictionary) | null;\n};\n\n/**\n * This is a model with one property with a 'any of' relationship\n */\nexport type CompositionWithAnyOfAndNullable = {\n    propA?: {\n        boolean?: boolean;\n    } | ModelWithEnum | ModelWithArray | ModelWithDictionary | null;\n};\n\n/**\n * This is a base model with two simple optional properties\n */\nexport type CompositionBaseModel = {\n    firstName?: string;\n    lastname?: string;\n};\n\n/**\n * This is a model that extends the base model\n */\nexport type CompositionExtendedModel = CompositionBaseModel & {\n    age: number;\n    firstName: string;\n    lastname: string;\n};\n\n/**\n * This is a model with one nested property\n */\nexport type ModelWithProperties = {\n    required: string;\n    readonly requiredAndReadOnly: string;\n    requiredAndNullable: string | null;\n    string?: string;\n    number?: number;\n    boolean?: boolean;\n    reference?: ModelWithString;\n    'property with space'?: string;\n    default?: string;\n    try?: string;\n    readonly '@namespace.string'?: string;\n    readonly '@namespace.integer'?: number;\n};\n\n/**\n * This is a model with one nested property\n */\nexport type ModelWithNestedProperties = {\n    readonly first: {\n        readonly second: {\n            readonly third: string | null;\n        } | null;\n    } | null;\n};\n\n/**\n * This is a model with duplicated properties\n */\nexport type ModelWithDuplicateProperties = {\n    prop?: ModelWithString;\n};\n\n/**\n * This is a model with ordered properties\n */\nexport type ModelWithOrderedProperties = {\n    zebra?: string;\n    apple?: string;\n    hawaii?: string;\n};\n\n/**\n * This is a model with duplicated imports\n */\nexport type ModelWithDuplicateImports = {\n    propA?: ModelWithString;\n    propB?: ModelWithString;\n    propC?: ModelWithString;\n};\n\n/**\n * This is a model that extends another model\n */\nexport type ModelThatExtends = ModelWithString & {\n    propExtendsA?: string;\n    propExtendsB?: ModelWithString;\n};\n\n/**\n * This is a model that extends another model\n */\nexport type ModelThatExtendsExtends = ModelWithString & ModelThatExtends & {\n    propExtendsC?: string;\n    propExtendsD?: ModelWithString;\n};\n\n/**\n * This is a model that contains a some patterns\n */\nexport type ModelWithPattern = {\n    key: string;\n    name: string;\n    readonly enabled?: boolean;\n    readonly modified?: string;\n    id?: string;\n    text?: string;\n    patternWithSingleQuotes?: string;\n    patternWithNewline?: string;\n    patternWithBacktick?: string;\n    patternWithUnicode?: string;\n};\n\nexport type File = {\n    /**\n     * Id\n     */\n    readonly id?: string;\n    /**\n     * Updated at\n     */\n    readonly updated_at?: string;\n    /**\n     * Created at\n     */\n    readonly created_at?: string;\n    /**\n     * Mime\n     */\n    mime: string;\n    /**\n     * File\n     */\n    readonly file?: string;\n};\n\nexport type Default = {\n    name?: string;\n};\n\nexport type Pageable = {\n    page?: number;\n    size?: number;\n    sort?: Array<string>;\n};\n\n/**\n * This is a free-form object without additionalProperties.\n */\nexport type FreeFormObjectWithoutAdditionalProperties = {\n    [key: string]: unknown;\n};\n\n/**\n * This is a free-form object with additionalProperties: true.\n */\nexport type FreeFormObjectWithAdditionalPropertiesEqTrue = {\n    [key: string]: unknown;\n};\n\n/**\n * This is a free-form object with additionalProperties: {}.\n */\nexport type FreeFormObjectWithAdditionalPropertiesEqEmptyObject = {\n    [key: string]: unknown;\n};\n\nexport type ModelWithConst = {\n    String?: 'String';\n    number?: 0;\n    null?: unknown;\n    withType?: 'Some string';\n};\n\n/**\n * This is a model with one property and additionalProperties: true\n */\nexport type ModelWithAdditionalPropertiesEqTrue = {\n    /**\n     * This is a simple string property\n     */\n    prop?: string;\n    [key: string]: unknown;\n};\n\nexport type NestedAnyOfArraysNullable = {\n    nullableArray?: Array<string | boolean> | null;\n};\n\nexport type CompositionWithOneOfAndProperties = ({\n    foo: SimpleParameter;\n} | {\n    bar: NonAsciiStringæøåÆøÅöôêÊ字符串;\n}) & {\n    baz: number | null;\n    qux: number;\n};\n\n/**\n * An object that can be null\n */\nexport type NullableObject = {\n    foo?: string;\n} | null;\n\n/**\n * Some % character\n */\nexport type CharactersInDescription = string;\n\nexport type ModelWithNullableObject = {\n    data?: NullableObject;\n};\n\n/**\n * An object with additional properties that can be null\n */\nexport type ModelWithAdditionalPropertiesRef = {\n    [key: string]: NullableObject | null;\n};\n\nexport type ModelWithOneOfEnum = {\n    foo: 'Bar';\n} | {\n    foo: 'Baz';\n} | {\n    foo: 'Qux';\n} | {\n    content: string;\n    foo: 'Quux';\n} | {\n    content: [\n        string,\n        string\n    ];\n    foo: 'Corge';\n};\n\nexport type ModelWithNestedArrayEnumsDataFoo = 'foo' | 'bar';\n\nexport type ModelWithNestedArrayEnumsDataBar = 'baz' | 'qux';\n\nexport type ModelWithNestedArrayEnumsData = {\n    foo?: Array<ModelWithNestedArrayEnumsDataFoo>;\n    bar?: Array<ModelWithNestedArrayEnumsDataBar>;\n};\n\nexport type ModelWithNestedArrayEnums = {\n    array_strings?: Array<string>;\n    data?: ModelWithNestedArrayEnumsData;\n};\n\nexport type ModelWithNestedCompositionEnums = {\n    foo?: ModelWithNestedArrayEnumsDataFoo;\n};\n\nexport type ModelWithReadOnlyAndWriteOnly = {\n    foo: string;\n    readonly bar: string;\n};\n\nexport type ModelWithConstantSizeArray = [\n    number,\n    number\n];\n\nexport type ModelWithAnyOfConstantSizeArray = [\n    number | string,\n    number | string,\n    number | string\n];\n\nexport type ModelWithPrefixItemsConstantSizeArray = Array<ModelWithInteger | number | string>;\n\nexport type ModelWithAnyOfConstantSizeArrayNullable = [\n    number | null | string,\n    number | null | string,\n    number | null | string\n];\n\nexport type ModelWithAnyOfConstantSizeArrayWithNSizeAndOptions = [\n    number | Import,\n    number | Import\n];\n\nexport type ModelWithAnyOfConstantSizeArrayAndIntersect = [\n    number & string,\n    number & string\n];\n\nexport type ModelWithNumericEnumUnion = {\n    /**\n     * Период\n     */\n    value?: -10 | -1 | 0 | 1 | 3 | 6 | 12;\n};\n\n/**\n * Some description with `back ticks`\n */\nexport type ModelWithBackticksInDescription = {\n    /**\n     * The template `that` should be used for parsing and importing the contents of the CSV file.\n     *\n     * <br/><p>There is one placeholder currently supported:<ul>     <li><b>${x}</b> - refers to the n-th column in the CSV file, e.g. ${1}, ${2}, ...)</li></ul><p>Example of a correct JSON template:</p>\n     * <pre>\n     * [\n     * {\n     * \"resourceType\": \"Asset\",\n     * \"identifier\": {\n     * \"name\": \"${1}\",\n     * \"domain\": {\n     * \"name\": \"${2}\",\n     * \"community\": {\n     * \"name\": \"Some Community\"\n     * }\n     * }\n     * },\n     * \"attributes\" : {\n     * \"00000000-0000-0000-0000-000000003115\" : [ {\n     * \"value\" : \"${3}\"\n     * } ],\n     * \"00000000-0000-0000-0000-000000000222\" : [ {\n     * \"value\" : \"${4}\"\n     * } ]\n     * }\n     * }\n     * ]\n     * </pre>\n     */\n    template?: string;\n};\n\nexport type ModelWithOneOfAndProperties = (SimpleParameter | NonAsciiStringæøåÆøÅöôêÊ字符串) & {\n    baz: number | null;\n    qux: number;\n};\n\n/**\n * Model used to test deduplication strategy (unused)\n */\nexport type ParameterSimpleParameterUnused = string;\n\n/**\n * Model used to test deduplication strategy\n */\nexport type PostServiceWithEmptyTagResponse = string;\n\n/**\n * Model used to test deduplication strategy\n */\nexport type PostServiceWithEmptyTagResponse2 = string;\n\n/**\n * Model used to test deduplication strategy\n */\nexport type DeleteFooData = string;\n\n/**\n * Model used to test deduplication strategy\n */\nexport type DeleteFooData2 = string;\n\n/**\n * Model with restricted keyword name\n */\nexport type Import = string;\n\nexport type SchemaWithFormRestrictedKeys = {\n    description?: string;\n    'x-enum-descriptions'?: string;\n    'x-enum-varnames'?: string;\n    'x-enumNames'?: string;\n    title?: string;\n    object?: {\n        description?: string;\n        'x-enum-descriptions'?: string;\n        'x-enum-varnames'?: string;\n        'x-enumNames'?: string;\n        title?: string;\n    };\n    array?: Array<{\n        description?: string;\n        'x-enum-descriptions'?: string;\n        'x-enum-varnames'?: string;\n        'x-enumNames'?: string;\n        title?: string;\n    }>;\n};\n\n/**\n * This schema was giving PascalCase transformations a hard time\n */\nexport type IoK8sApimachineryPkgApisMetaV1DeleteOptions = {\n    /**\n     * Must be fulfilled before a deletion is carried out. If not possible, a 409 Conflict status will be returned.\n     */\n    preconditions?: IoK8sApimachineryPkgApisMetaV1Preconditions;\n};\n\n/**\n * This schema was giving PascalCase transformations a hard time\n */\nexport type IoK8sApimachineryPkgApisMetaV1Preconditions = {\n    /**\n     * Specifies the target ResourceVersion\n     */\n    resourceVersion?: string;\n    /**\n     * Specifies the target UID.\n     */\n    uid?: string;\n};\n\nexport type AdditionalPropertiesUnknownIssue = {\n    [key: string]: string | number;\n};\n\nexport type AdditionalPropertiesUnknownIssue2 = {\n    [key: string]: string | number;\n};\n\nexport type AdditionalPropertiesUnknownIssue3 = string & {\n    entries: {\n        [key: string]: AdditionalPropertiesUnknownIssue;\n    };\n};\n\nexport type AdditionalPropertiesIntegerIssue = {\n    value: number;\n    [key: string]: number;\n};\n\nexport type OneOfAllOfIssue = ((ConstValue | GenericSchemaDuplicateIssue1SystemBoolean) & _3eNum1Период) | GenericSchemaDuplicateIssue1SystemString;\n\nexport type GenericSchemaDuplicateIssue1SystemBoolean = {\n    item?: boolean;\n    error?: string | null;\n    readonly hasError?: boolean;\n    data?: {\n        [key: string]: never;\n    };\n};\n\nexport type GenericSchemaDuplicateIssue1SystemString = {\n    item?: string | null;\n    error?: string | null;\n    readonly hasError?: boolean;\n};\n\nexport type ExternalSharedModel = {\n    id: string;\n    name?: string;\n};\n\n/**\n * This is a model with one property containing a reference\n */\nexport type ModelWithReferenceWritable = {\n    prop?: ModelWithPropertiesWritable;\n};\n\n/**\n * This is a model with one property containing an array\n */\nexport type ModelWithArrayReadOnlyAndWriteOnlyWritable = {\n    prop?: Array<ModelWithReadOnlyAndWriteOnlyWritable>;\n    propWithFile?: Array<Blob | File>;\n    propWithNumber?: Array<number>;\n};\n\n/**\n * This is a model with one nested property\n */\nexport type ModelWithPropertiesWritable = {\n    required: string;\n    requiredAndNullable: string | null;\n    string?: string;\n    number?: number;\n    boolean?: boolean;\n    reference?: ModelWithString;\n    'property with space'?: string;\n    default?: string;\n    try?: string;\n};\n\n/**\n * This is a model that contains a some patterns\n */\nexport type ModelWithPatternWritable = {\n    key: string;\n    name: string;\n    id?: string;\n    text?: string;\n    patternWithSingleQuotes?: string;\n    patternWithNewline?: string;\n    patternWithBacktick?: string;\n    patternWithUnicode?: string;\n};\n\nexport type FileWritable = {\n    /**\n     * Mime\n     */\n    mime: string;\n};\n\nexport type ModelWithReadOnlyAndWriteOnlyWritable = {\n    foo: string;\n    baz: string;\n};\n\nexport type ModelWithAnyOfConstantSizeArrayWithNSizeAndOptionsWritable = [\n    number | Import,\n    number | Import\n];\n\nexport type AdditionalPropertiesUnknownIssueWritable = {\n    [key: string]: string | number;\n};\n\nexport type OneOfAllOfIssueWritable = ((ConstValue | GenericSchemaDuplicateIssue1SystemBoolean) & _3eNum1Период) | GenericSchemaDuplicateIssue1SystemString;\n\nexport type GenericSchemaDuplicateIssue1SystemBooleanWritable = {\n    item?: boolean;\n    error?: string | null;\n    data?: {\n        [key: string]: never;\n    };\n};\n\nexport type GenericSchemaDuplicateIssue1SystemStringWritable = {\n    item?: string | null;\n    error?: string | null;\n};\n\n/**\n * This is a reusable parameter\n */\nexport type SimpleParameter = string;\n\n/**\n * Parameter with illegal characters\n */\nexport type XFooBar = ModelWithString;\n\nexport type SimpleRequestBody = ModelWithString;\n\nexport type SimpleFormData = ModelWithString;\n\nexport type ExportData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no+tag';\n};\n\nexport type PatchApiVbyApiVersionNoTagData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no+tag';\n};\n\nexport type PatchApiVbyApiVersionNoTagResponses = {\n    /**\n     * OK\n     */\n    default: unknown;\n};\n\nexport type ImportData = {\n    body: ModelWithReadOnlyAndWriteOnlyWritable | ModelWithArrayReadOnlyAndWriteOnlyWritable;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no+tag';\n};\n\nexport type ImportResponses = {\n    /**\n     * Success\n     */\n    200: ModelFromZendesk;\n    /**\n     * Default success response\n     */\n    default: ModelWithReadOnlyAndWriteOnly;\n};\n\nexport type ImportResponse = ImportResponses[keyof ImportResponses];\n\nexport type FooWowData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no+tag';\n};\n\nexport type FooWowResponses = {\n    /**\n     * OK\n     */\n    default: unknown;\n};\n\nexport type ApiVVersionODataControllerCountData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple/$count';\n};\n\nexport type ApiVVersionODataControllerCountResponses = {\n    /**\n     * Success\n     */\n    200: ModelFromZendesk;\n};\n\nexport type ApiVVersionODataControllerCountResponse = ApiVVersionODataControllerCountResponses[keyof ApiVVersionODataControllerCountResponses];\n\nexport type GetApiVbyApiVersionSimpleOperationData = {\n    body?: never;\n    path: {\n        /**\n         * foo in method\n         */\n        foo_param: string;\n    };\n    query?: never;\n    url: '/api/v{api-version}/simple:operation';\n};\n\nexport type GetApiVbyApiVersionSimpleOperationErrors = {\n    /**\n     * Default error response\n     */\n    default: ModelWithBoolean;\n};\n\nexport type GetApiVbyApiVersionSimpleOperationError = GetApiVbyApiVersionSimpleOperationErrors[keyof GetApiVbyApiVersionSimpleOperationErrors];\n\nexport type GetApiVbyApiVersionSimpleOperationResponses = {\n    /**\n     * Response is a simple number\n     */\n    200: number;\n};\n\nexport type GetApiVbyApiVersionSimpleOperationResponse = GetApiVbyApiVersionSimpleOperationResponses[keyof GetApiVbyApiVersionSimpleOperationResponses];\n\nexport type DeleteCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type GetCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type HeadCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type OptionsCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type PatchCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type PostCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type PutCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type DeleteFooData3 = {\n    body?: never;\n    headers: {\n        /**\n         * Parameter with illegal characters\n         */\n        'x-Foo-Bar': ModelWithString;\n    };\n    path: {\n        /**\n         * foo in method\n         */\n        foo_param: string;\n        /**\n         * bar in method\n         */\n        BarParam: string;\n    };\n    query?: never;\n    url: '/api/v{api-version}/foo/{foo_param}/bar/{BarParam}';\n};\n\nexport type CallWithDescriptionsData = {\n    body?: never;\n    path?: never;\n    query?: {\n        /**\n         * Testing multiline comments in string: First line\n         * Second line\n         *\n         * Fourth line\n         */\n        parameterWithBreaks?: string;\n        /**\n         * Testing backticks in string: `backticks` and ```multiple backticks``` should work\n         */\n        parameterWithBackticks?: string;\n        /**\n         * Testing slashes in string: \\backwards\\\\\\ and /forwards/// should work\n         */\n        parameterWithSlashes?: string;\n        /**\n         * Testing expression placeholders in string: ${expression} should work\n         */\n        parameterWithExpressionPlaceholders?: string;\n        /**\n         * Testing quotes in string: 'single quote''' and \"double quotes\"\"\" should work\n         */\n        parameterWithQuotes?: string;\n        /**\n         * Testing reserved characters in string: * inline * and ** inline ** should work\n         */\n        parameterWithReservedCharacters?: string;\n    };\n    url: '/api/v{api-version}/descriptions';\n};\n\nexport type DeprecatedCallData = {\n    body?: never;\n    headers: {\n        /**\n         * This parameter is deprecated\n         *\n         * @deprecated\n         */\n        parameter: DeprecatedModel | null;\n    };\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/parameters/deprecated';\n};\n\nexport type CallWithParametersData = {\n    /**\n     * This is the parameter that goes into the body\n     */\n    body: {\n        [key: string]: unknown;\n    } | null;\n    headers: {\n        /**\n         * This is the parameter that goes into the header\n         */\n        parameterHeader: string | null;\n    };\n    path: {\n        /**\n         * This is the parameter that goes into the path\n         */\n        parameterPath: string | null;\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string | null;\n    };\n    query: {\n        foo_ref_enum?: ModelWithNestedArrayEnumsDataFoo;\n        foo_all_of_enum: ModelWithNestedArrayEnumsDataFoo;\n        /**\n         * This is the parameter that goes into the query params\n         */\n        cursor: string | null;\n    };\n    url: '/api/v{api-version}/parameters/{parameterPath}';\n};\n\nexport type CallWithWeirdParameterNamesData = {\n    /**\n     * This is the parameter that goes into the body\n     */\n    body: ModelWithString | null;\n    headers: {\n        /**\n         * This is the parameter that goes into the request header\n         */\n        'parameter.header': string | null;\n    };\n    path: {\n        /**\n         * This is the parameter that goes into the path\n         */\n        'parameter.path.1'?: string;\n        /**\n         * This is the parameter that goes into the path\n         */\n        'parameter-path-2'?: string;\n        /**\n         * This is the parameter that goes into the path\n         */\n        'PARAMETER-PATH-3'?: string;\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string | null;\n    };\n    query: {\n        /**\n         * This is the parameter with a reserved keyword\n         */\n        default?: string;\n        /**\n         * This is the parameter that goes into the request query params\n         */\n        'parameter-query': string | null;\n    };\n    url: '/api/v{api-version}/parameters/{parameter.path.1}/{parameter-path-2}/{PARAMETER-PATH-3}';\n};\n\nexport type GetCallWithOptionalParamData = {\n    /**\n     * This is a required parameter\n     */\n    body: ModelWithOneOfEnum;\n    path?: never;\n    query?: {\n        /**\n         * This is an optional parameter\n         */\n        page?: number;\n    };\n    url: '/api/v{api-version}/parameters';\n};\n\nexport type PostCallWithOptionalParamData = {\n    /**\n     * This is an optional parameter\n     */\n    body?: {\n        offset?: number | null;\n    };\n    path?: never;\n    query: {\n        /**\n         * This is a required parameter\n         */\n        parameter: Pageable;\n    };\n    url: '/api/v{api-version}/parameters';\n};\n\nexport type PostCallWithOptionalParamResponses = {\n    /**\n     * Response is a simple number\n     */\n    200: number;\n    /**\n     * Success\n     */\n    204: void;\n};\n\nexport type PostCallWithOptionalParamResponse = PostCallWithOptionalParamResponses[keyof PostCallWithOptionalParamResponses];\n\nexport type PostApiVbyApiVersionRequestBodyData = {\n    /**\n     * A reusable request body\n     */\n    body?: SimpleRequestBody;\n    path?: never;\n    query?: {\n        /**\n         * This is a reusable parameter\n         */\n        parameter?: string;\n    };\n    url: '/api/v{api-version}/requestBody';\n};\n\nexport type PostApiVbyApiVersionFormDataData = {\n    /**\n     * A reusable request body\n     */\n    body?: SimpleFormData;\n    path?: never;\n    query?: {\n        /**\n         * This is a reusable parameter\n         */\n        parameter?: string;\n    };\n    url: '/api/v{api-version}/formData';\n};\n\nexport type CallWithDefaultParametersData = {\n    body?: never;\n    path?: never;\n    query?: {\n        /**\n         * This is a simple string with default value\n         */\n        parameterString?: string | null;\n        /**\n         * This is a simple number with default value\n         */\n        parameterNumber?: number | null;\n        /**\n         * This is a simple boolean with default value\n         */\n        parameterBoolean?: boolean | null;\n        /**\n         * This is a simple enum with default value\n         */\n        parameterEnum?: 'Success' | 'Warning' | 'Error';\n        /**\n         * This is a simple model with default value\n         */\n        parameterModel?: ModelWithString | null;\n    };\n    url: '/api/v{api-version}/defaults';\n};\n\nexport type CallWithDefaultOptionalParametersData = {\n    body?: never;\n    path?: never;\n    query?: {\n        /**\n         * This is a simple string that is optional with default value\n         */\n        parameterString?: string;\n        /**\n         * This is a simple number that is optional with default value\n         */\n        parameterNumber?: number;\n        /**\n         * This is a simple boolean that is optional with default value\n         */\n        parameterBoolean?: boolean;\n        /**\n         * This is a simple enum that is optional with default value\n         */\n        parameterEnum?: 'Success' | 'Warning' | 'Error';\n        /**\n         * This is a simple model that is optional with default value\n         */\n        parameterModel?: ModelWithString;\n    };\n    url: '/api/v{api-version}/defaults';\n};\n\nexport type CallToTestOrderOfParamsData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * This is a optional string with default\n         */\n        parameterOptionalStringWithDefault?: string;\n        /**\n         * This is a optional string with empty default\n         */\n        parameterOptionalStringWithEmptyDefault?: string;\n        /**\n         * This is a optional string with no default\n         */\n        parameterOptionalStringWithNoDefault?: string;\n        /**\n         * This is a string with default\n         */\n        parameterStringWithDefault: string;\n        /**\n         * This is a string with empty default\n         */\n        parameterStringWithEmptyDefault: string;\n        /**\n         * This is a string with no default\n         */\n        parameterStringWithNoDefault: string;\n        /**\n         * This is a string that can be null with no default\n         */\n        parameterStringNullableWithNoDefault?: string | null;\n        /**\n         * This is a string that can be null with default\n         */\n        parameterStringNullableWithDefault?: string | null;\n    };\n    url: '/api/v{api-version}/defaults';\n};\n\nexport type DuplicateNameData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/duplicate';\n};\n\nexport type DuplicateName2Data = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/duplicate';\n};\n\nexport type DuplicateName3Data = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/duplicate';\n};\n\nexport type DuplicateName4Data = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/duplicate';\n};\n\nexport type CallWithNoContentResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no-content';\n};\n\nexport type CallWithNoContentResponseResponses = {\n    /**\n     * Success\n     */\n    204: void;\n};\n\nexport type CallWithNoContentResponseResponse = CallWithNoContentResponseResponses[keyof CallWithNoContentResponseResponses];\n\nexport type CallWithResponseAndNoContentResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multiple-tags/response-and-no-content';\n};\n\nexport type CallWithResponseAndNoContentResponseResponses = {\n    /**\n     * Response is a simple number\n     */\n    200: number;\n    /**\n     * Success\n     */\n    204: void;\n};\n\nexport type CallWithResponseAndNoContentResponseResponse = CallWithResponseAndNoContentResponseResponses[keyof CallWithResponseAndNoContentResponseResponses];\n\nexport type DummyAData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multiple-tags/a';\n};\n\nexport type DummyAResponses = {\n    200: _400;\n};\n\nexport type DummyAResponse = DummyAResponses[keyof DummyAResponses];\n\nexport type DummyBData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multiple-tags/b';\n};\n\nexport type DummyBResponses = {\n    /**\n     * Success\n     */\n    204: void;\n};\n\nexport type DummyBResponse = DummyBResponses[keyof DummyBResponses];\n\nexport type CallWithResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/response';\n};\n\nexport type CallWithResponseResponses = {\n    default: Import;\n};\n\nexport type CallWithResponseResponse = CallWithResponseResponses[keyof CallWithResponseResponses];\n\nexport type CallWithDuplicateResponsesData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/response';\n};\n\nexport type CallWithDuplicateResponsesErrors = {\n    /**\n     * Message for 500 error\n     */\n    500: ModelWithStringError;\n    /**\n     * Message for 501 error\n     */\n    501: ModelWithStringError;\n    /**\n     * Message for 502 error\n     */\n    502: ModelWithStringError;\n    /**\n     * Message for 4XX errors\n     */\n    '4XX': DictionaryWithArray;\n    /**\n     * Default error response\n     */\n    default: ModelWithBoolean;\n};\n\nexport type CallWithDuplicateResponsesError = CallWithDuplicateResponsesErrors[keyof CallWithDuplicateResponsesErrors];\n\nexport type CallWithDuplicateResponsesResponses = {\n    /**\n     * Message for 200 response\n     */\n    200: ModelWithBoolean & ModelWithInteger;\n    /**\n     * Message for 201 response\n     */\n    201: ModelWithString;\n    /**\n     * Message for 202 response\n     */\n    202: ModelWithString;\n};\n\nexport type CallWithDuplicateResponsesResponse = CallWithDuplicateResponsesResponses[keyof CallWithDuplicateResponsesResponses];\n\nexport type CallWithResponsesData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/response';\n};\n\nexport type CallWithResponsesErrors = {\n    /**\n     * Message for 500 error\n     */\n    500: ModelWithStringError;\n    /**\n     * Message for 501 error\n     */\n    501: ModelWithStringError;\n    /**\n     * Message for 502 error\n     */\n    502: ModelWithStringError;\n    /**\n     * Message for default response\n     */\n    default: ModelWithStringError;\n};\n\nexport type CallWithResponsesError = CallWithResponsesErrors[keyof CallWithResponsesErrors];\n\nexport type CallWithResponsesResponses = {\n    /**\n     * Message for 200 response\n     */\n    200: {\n        readonly '@namespace.string'?: string;\n        readonly '@namespace.integer'?: number;\n        readonly value?: Array<ModelWithString>;\n    };\n    /**\n     * Message for 201 response\n     */\n    201: ModelThatExtends;\n    /**\n     * Message for 202 response\n     */\n    202: ModelThatExtendsExtends;\n};\n\nexport type CallWithResponsesResponse = CallWithResponsesResponses[keyof CallWithResponsesResponses];\n\nexport type CollectionFormatData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * This is an array parameter that is sent as csv format (comma-separated values)\n         */\n        parameterArrayCSV: Array<string> | null;\n        /**\n         * This is an array parameter that is sent as ssv format (space-separated values)\n         */\n        parameterArraySSV: Array<string> | null;\n        /**\n         * This is an array parameter that is sent as tsv format (tab-separated values)\n         */\n        parameterArrayTSV: Array<string> | null;\n        /**\n         * This is an array parameter that is sent as pipes format (pipe-separated values)\n         */\n        parameterArrayPipes: Array<string> | null;\n        /**\n         * This is an array parameter that is sent as multi format (multiple parameter instances)\n         */\n        parameterArrayMulti: Array<string> | null;\n    };\n    url: '/api/v{api-version}/collectionFormat';\n};\n\nexport type TypesData = {\n    body?: never;\n    path?: {\n        /**\n         * This is a number parameter\n         */\n        id?: number;\n    };\n    query: {\n        /**\n         * This is a number parameter\n         */\n        parameterNumber: number;\n        /**\n         * This is a string parameter\n         */\n        parameterString: string | null;\n        /**\n         * This is a boolean parameter\n         */\n        parameterBoolean: boolean | null;\n        /**\n         * This is an object parameter\n         */\n        parameterObject: {\n            [key: string]: unknown;\n        } | null;\n        /**\n         * This is an array parameter\n         */\n        parameterArray: Array<string> | null;\n        /**\n         * This is a dictionary parameter\n         */\n        parameterDictionary: {\n            [key: string]: unknown;\n        } | null;\n        /**\n         * This is an enum parameter\n         */\n        parameterEnum: 'Success' | 'Warning' | 'Error';\n    };\n    url: '/api/v{api-version}/types';\n};\n\nexport type TypesResponses = {\n    /**\n     * Response is a simple number\n     */\n    200: number;\n    /**\n     * Response is a simple string\n     */\n    201: string;\n    /**\n     * Response is a simple boolean\n     */\n    202: boolean;\n    /**\n     * Response is a simple object\n     */\n    203: {\n        [key: string]: unknown;\n    };\n};\n\nexport type TypesResponse = TypesResponses[keyof TypesResponses];\n\nexport type UploadFileData = {\n    body: Blob | File;\n    path: {\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string | null;\n    };\n    query?: never;\n    url: '/api/v{api-version}/upload';\n};\n\nexport type UploadFileResponses = {\n    200: boolean;\n};\n\nexport type UploadFileResponse = UploadFileResponses[keyof UploadFileResponses];\n\nexport type FileResponseData = {\n    body?: never;\n    path: {\n        id: string;\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string;\n    };\n    query?: never;\n    url: '/api/v{api-version}/file/{id}';\n};\n\nexport type FileResponseResponses = {\n    /**\n     * Success\n     */\n    200: Blob | File;\n};\n\nexport type FileResponseResponse = FileResponseResponses[keyof FileResponseResponses];\n\nexport type ComplexTypesData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * Parameter containing object\n         */\n        parameterObject: {\n            first?: {\n                second?: {\n                    third?: string;\n                };\n            };\n        };\n        /**\n         * Parameter containing reference\n         */\n        parameterReference: ModelWithString;\n    };\n    url: '/api/v{api-version}/complex';\n};\n\nexport type ComplexTypesErrors = {\n    /**\n     * 400 `server` error\n     */\n    400: unknown;\n    /**\n     * 500 server error\n     */\n    500: unknown;\n};\n\nexport type ComplexTypesResponses = {\n    /**\n     * Successful response\n     */\n    200: Array<ModelWithString>;\n};\n\nexport type ComplexTypesResponse = ComplexTypesResponses[keyof ComplexTypesResponses];\n\nexport type MultipartResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multipart';\n};\n\nexport type MultipartResponseResponses = {\n    /**\n     * OK\n     */\n    200: {\n        file?: Blob | File;\n        metadata?: {\n            foo?: string;\n            bar?: string;\n        };\n    };\n};\n\nexport type MultipartResponseResponse = MultipartResponseResponses[keyof MultipartResponseResponses];\n\nexport type MultipartRequestData = {\n    body?: {\n        content?: Blob | File;\n        data?: ModelWithString | null;\n    };\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multipart';\n};\n\nexport type ComplexParamsData = {\n    body?: {\n        readonly key: string | null;\n        name: string | null;\n        enabled?: boolean;\n        type: 'Monkey' | 'Horse' | 'Bird';\n        listOfModels?: Array<ModelWithString> | null;\n        listOfStrings?: Array<string> | null;\n        parameters: ModelWithString | ModelWithEnum | ModelWithArray | ModelWithDictionary;\n        readonly user?: {\n            readonly id?: number;\n            readonly name?: string | null;\n        };\n    };\n    path: {\n        id: number;\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string;\n    };\n    query?: never;\n    url: '/api/v{api-version}/complex/{id}';\n};\n\nexport type ComplexParamsResponses = {\n    /**\n     * Success\n     */\n    200: ModelWithString;\n};\n\nexport type ComplexParamsResponse = ComplexParamsResponses[keyof ComplexParamsResponses];\n\nexport type CallWithResultFromHeaderData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/header';\n};\n\nexport type CallWithResultFromHeaderErrors = {\n    /**\n     * 400 server error\n     */\n    400: unknown;\n    /**\n     * 500 server error\n     */\n    500: unknown;\n};\n\nexport type CallWithResultFromHeaderResponses = {\n    /**\n     * Successful response\n     */\n    200: unknown;\n};\n\nexport type TestErrorCodeData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * Status code to return\n         */\n        status: number;\n    };\n    url: '/api/v{api-version}/error';\n};\n\nexport type TestErrorCodeErrors = {\n    /**\n     * Custom message: Internal Server Error\n     */\n    500: unknown;\n    /**\n     * Custom message: Not Implemented\n     */\n    501: unknown;\n    /**\n     * Custom message: Bad Gateway\n     */\n    502: unknown;\n    /**\n     * Custom message: Service Unavailable\n     */\n    503: unknown;\n};\n\nexport type TestErrorCodeResponses = {\n    /**\n     * Custom message: Successful response\n     */\n    200: unknown;\n};\n\nexport type NonAsciiæøåÆøÅöôêÊ字符串Data = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * Dummy input param\n         */\n        nonAsciiParamæøåÆØÅöôêÊ: number;\n    };\n    url: '/api/v{api-version}/non-ascii-æøåÆØÅöôêÊ字符串';\n};\n\nexport type NonAsciiæøåÆøÅöôêÊ字符串Responses = {\n    /**\n     * Successful response\n     */\n    200: Array<NonAsciiStringæøåÆøÅöôêÊ字符串>;\n};\n\nexport type NonAsciiæøåÆøÅöôêÊ字符串Response = NonAsciiæøåÆøÅöôêÊ字符串Responses[keyof NonAsciiæøåÆøÅöôêÊ字符串Responses];\n\nexport type PutWithFormUrlEncodedData = {\n    body: ArrayWithStrings;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/non-ascii-æøåÆØÅöôêÊ字符串';\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/ref-deep/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type { Bar, ClientOptions, Foo, GetFooData, GetFooResponse, GetFooResponses, PostFooData, PostFooResponse, PostFooResponses } from './types.gen';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/ref-deep/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type ClientOptions = {\n    baseUrl: `${string}://${string}` | (string & {});\n};\n\nexport type Foo = {\n    foo?: Array<{\n        baz?: string;\n    }>;\n    bar?: Array<{\n        baz?: string;\n    }>;\n};\n\nexport type Bar = {\n    foo?: Array<{\n        baz?: string;\n    }>;\n    bar?: Array<{\n        baz?: string;\n    }>;\n};\n\nexport type GetFooData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/foo';\n};\n\nexport type GetFooResponses = {\n    /**\n     * OK\n     */\n    200: Array<{\n        foo?: number;\n        bar?: string;\n    }>;\n};\n\nexport type GetFooResponse = GetFooResponses[keyof GetFooResponses];\n\nexport type PostFooData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/foo';\n};\n\nexport type PostFooResponses = {\n    /**\n     * OK\n     */\n    200: {\n        foo?: {\n            foo?: number;\n            bar?: string;\n        };\n        bar?: string;\n    };\n};\n\nexport type PostFooResponse = PostFooResponses[keyof PostFooResponses];\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/security-api-key/client/client.gen.ts",
    "content": "// 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 (options: RequestOptions) => {\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 url = buildUrl(opts);\n\n    return { opts, url };\n  };\n\n  const request: Client['request'] = async (options) => {\n    // @ts-expect-error\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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/security-api-key/client/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type { Auth } from '../core/auth.gen';\nexport type { QuerySerializerOptions } from '../core/bodySerializer.gen';\nexport {\n  formDataBodySerializer,\n  jsonBodySerializer,\n  urlSearchParamsBodySerializer,\n} from '../core/bodySerializer.gen';\nexport { buildClientParams } from '../core/params.gen';\nexport { serializeQueryKeyValue } from '../core/queryKeySerializer.gen';\nexport { createClient } from './client.gen';\nexport type {\n  Client,\n  ClientOptions,\n  Config,\n  CreateClientConfig,\n  Options,\n  RequestOptions,\n  RequestResult,\n  ResolvedRequestOptions,\n  ResponseStyle,\n  TDataShape,\n} from './types.gen';\nexport { createConfig, mergeHeaders } from './utils.gen';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/security-api-key/client/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { Auth } from '../core/auth.gen';\nimport type {\n  ServerSentEventsOptions,\n  ServerSentEventsResult,\n} from '../core/serverSentEvents.gen';\nimport type { Client as CoreClient, Config as CoreConfig } from '../core/types.gen';\nimport type { Middleware } from './utils.gen';\n\nexport type ResponseStyle = 'data' | 'fields';\n\nexport interface Config<T extends ClientOptions = ClientOptions>\n  extends Omit<RequestInit, 'body' | 'headers' | 'method'>, CoreConfig {\n  /**\n   * Base URL for all requests made by this client.\n   */\n  baseUrl?: T['baseUrl'];\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   * Please don't use the Fetch client for Next.js applications. The `next`\n   * options won't have any effect.\n   *\n   * Install {@link https://www.npmjs.com/package/@hey-api/client-next `@hey-api/client-next`} instead.\n   */\n  next?: never;\n  /**\n   * Return the response data parsed in a specified format. By default, `auto`\n   * will infer the appropriate method from the `Content-Type` response header.\n   * You can override this behavior with any of the {@link Body} methods.\n   * Select `stream` if you don't want to parse response data at all.\n   *\n   * @default 'auto'\n   */\n  parseAs?: 'arrayBuffer' | 'auto' | 'blob' | 'formData' | 'json' | 'stream' | 'text';\n  /**\n   * Should we return only data or multiple fields (data, error, response, etc.)?\n   *\n   * @default 'fields'\n   */\n  responseStyle?: ResponseStyle;\n  /**\n   * Throw an error instead of returning it in the response?\n   *\n   * @default false\n   */\n  throwOnError?: T['throwOnError'];\n}\n\nexport interface RequestOptions<\n  TData = unknown,\n  TResponseStyle extends ResponseStyle = 'fields',\n  ThrowOnError extends boolean = boolean,\n  Url extends string = string,\n>\n  extends\n    Config<{\n      responseStyle: TResponseStyle;\n      throwOnError: ThrowOnError;\n    }>,\n    Pick<\n      ServerSentEventsOptions<TData>,\n      | 'onRequest'\n      | 'onSseError'\n      | 'onSseEvent'\n      | 'sseDefaultRetryDelay'\n      | 'sseMaxRetryAttempts'\n      | 'sseMaxRetryDelay'\n    > {\n  /**\n   * Any body that you want to add to your request.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/fetch#body}\n   */\n  body?: unknown;\n  path?: Record<string, unknown>;\n  query?: Record<string, unknown>;\n  /**\n   * Security mechanism(s) to use for the request.\n   */\n  security?: ReadonlyArray<Auth>;\n  url: Url;\n}\n\nexport interface ResolvedRequestOptions<\n  TResponseStyle extends ResponseStyle = 'fields',\n  ThrowOnError extends boolean = boolean,\n  Url extends string = string,\n> extends RequestOptions<unknown, TResponseStyle, ThrowOnError, Url> {\n  serializedBody?: string;\n}\n\nexport type RequestResult<\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = boolean,\n  TResponseStyle extends ResponseStyle = 'fields',\n> = ThrowOnError extends true\n  ? Promise<\n      TResponseStyle extends 'data'\n        ? TData extends Record<string, unknown>\n          ? TData[keyof TData]\n          : TData\n        : {\n            data: TData extends Record<string, unknown> ? TData[keyof TData] : TData;\n            request: Request;\n            response: Response;\n          }\n    >\n  : Promise<\n      TResponseStyle extends 'data'\n        ? (TData extends Record<string, unknown> ? TData[keyof TData] : TData) | undefined\n        : (\n            | {\n                data: TData extends Record<string, unknown> ? TData[keyof TData] : TData;\n                error: undefined;\n              }\n            | {\n                data: undefined;\n                error: TError extends Record<string, unknown> ? TError[keyof TError] : TError;\n              }\n          ) & {\n            request: Request;\n            response: Response;\n          }\n    >;\n\nexport interface ClientOptions {\n  baseUrl?: string;\n  responseStyle?: ResponseStyle;\n  throwOnError?: boolean;\n}\n\ntype MethodFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'>,\n) => RequestResult<TData, TError, ThrowOnError, TResponseStyle>;\n\ntype SseFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'>,\n) => Promise<ServerSentEventsResult<TData, TError>>;\n\ntype RequestFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'> &\n    Pick<Required<RequestOptions<TData, TResponseStyle, ThrowOnError>>, 'method'>,\n) => RequestResult<TData, TError, ThrowOnError, TResponseStyle>;\n\ntype BuildUrlFn = <\n  TData extends {\n    body?: unknown;\n    path?: Record<string, unknown>;\n    query?: Record<string, unknown>;\n    url: string;\n  },\n>(\n  options: TData & Options<TData>,\n) => string;\n\nexport type Client = CoreClient<RequestFn, Config, MethodFn, BuildUrlFn, SseFn> & {\n  interceptors: Middleware<Request, Response, unknown, ResolvedRequestOptions>;\n};\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 = ClientOptions> = (\n  override?: Config<ClientOptions & T>,\n) => Config<Required<ClientOptions> & T>;\n\nexport interface TDataShape {\n  body?: unknown;\n  headers?: unknown;\n  path?: unknown;\n  query?: unknown;\n  url: string;\n}\n\ntype OmitKeys<T, K> = Pick<T, Exclude<keyof T, K>>;\n\nexport type Options<\n  TData extends TDataShape = TDataShape,\n  ThrowOnError extends boolean = boolean,\n  TResponse = unknown,\n  TResponseStyle extends ResponseStyle = 'fields',\n> = OmitKeys<\n  RequestOptions<TResponse, TResponseStyle, ThrowOnError>,\n  'body' | 'path' | 'query' | 'url'\n> &\n  ([TData] extends [never] ? unknown : Omit<TData, 'url'>);\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/security-api-key/client/utils.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/security-api-key/client.gen.ts",
    "content": "// 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>());\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/security-api-key/core/auth.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/security-api-key/core/bodySerializer.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/security-api-key/core/params.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/security-api-key/core/pathSerializer.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/security-api-key/core/queryKeySerializer.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\n/**\n * JSON-friendly union that mirrors what Pinia Colada can hash.\n */\nexport type JsonValue =\n  | null\n  | string\n  | number\n  | boolean\n  | JsonValue[]\n  | { [key: string]: JsonValue };\n\n/**\n * Replacer that converts non-JSON values (bigint, Date, etc.) to safe substitutes.\n */\nexport const queryKeyJsonReplacer = (_key: string, value: unknown) => {\n  if (value === undefined || typeof value === 'function' || typeof value === 'symbol') {\n    return undefined;\n  }\n  if (typeof value === 'bigint') {\n    return value.toString();\n  }\n  if (value instanceof Date) {\n    return value.toISOString();\n  }\n  return value;\n};\n\n/**\n * Safely stringifies a value and parses it back into a JsonValue.\n */\nexport const stringifyToJsonValue = (input: unknown): JsonValue | undefined => {\n  try {\n    const json = JSON.stringify(input, queryKeyJsonReplacer);\n    if (json === undefined) {\n      return undefined;\n    }\n    return JSON.parse(json) as JsonValue;\n  } catch {\n    return undefined;\n  }\n};\n\n/**\n * Detects plain objects (including objects with a null prototype).\n */\nconst isPlainObject = (value: unknown): value is Record<string, unknown> => {\n  if (value === null || typeof value !== 'object') {\n    return false;\n  }\n  const prototype = Object.getPrototypeOf(value as object);\n  return prototype === Object.prototype || prototype === null;\n};\n\n/**\n * Turns URLSearchParams into a sorted JSON object for deterministic keys.\n */\nconst serializeSearchParams = (params: URLSearchParams): JsonValue => {\n  const entries = Array.from(params.entries()).sort(([a], [b]) => a.localeCompare(b));\n  const result: Record<string, JsonValue> = {};\n\n  for (const [key, value] of entries) {\n    const existing = result[key];\n    if (existing === undefined) {\n      result[key] = value;\n      continue;\n    }\n\n    if (Array.isArray(existing)) {\n      (existing as string[]).push(value);\n    } else {\n      result[key] = [existing, value];\n    }\n  }\n\n  return result;\n};\n\n/**\n * Normalizes any accepted value into a JSON-friendly shape for query keys.\n */\nexport const serializeQueryKeyValue = (value: unknown): JsonValue | undefined => {\n  if (value === null) {\n    return null;\n  }\n\n  if (typeof value === 'string' || typeof value === 'number' || typeof value === 'boolean') {\n    return value;\n  }\n\n  if (value === undefined || typeof value === 'function' || typeof value === 'symbol') {\n    return undefined;\n  }\n\n  if (typeof value === 'bigint') {\n    return value.toString();\n  }\n\n  if (value instanceof Date) {\n    return value.toISOString();\n  }\n\n  if (Array.isArray(value)) {\n    return stringifyToJsonValue(value);\n  }\n\n  if (typeof URLSearchParams !== 'undefined' && value instanceof URLSearchParams) {\n    return serializeSearchParams(value);\n  }\n\n  if (isPlainObject(value)) {\n    return stringifyToJsonValue(value);\n  }\n\n  return undefined;\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/security-api-key/core/serverSentEvents.gen.ts",
    "content": "// 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 const 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            // Normalize line endings: CRLF -> LF, then CR -> LF\n            buffer = buffer.replace(/\\r\\n/g, '\\n').replace(/\\r/g, '\\n');\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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/security-api-key/core/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { Auth, AuthToken } from './auth.gen';\nimport type { BodySerializer, QuerySerializer, QuerySerializerOptions } from './bodySerializer.gen';\n\nexport type HttpMethod =\n  | 'connect'\n  | 'delete'\n  | 'get'\n  | 'head'\n  | 'options'\n  | 'patch'\n  | 'post'\n  | 'put'\n  | 'trace';\n\nexport type Client<\n  RequestFn = never,\n  Config = unknown,\n  MethodFn = never,\n  BuildUrlFn = never,\n  SseFn = never,\n> = {\n  /**\n   * Returns the final request URL.\n   */\n  buildUrl: BuildUrlFn;\n  getConfig: () => Config;\n  request: RequestFn;\n  setConfig: (config: Config) => Config;\n} & {\n  [K in HttpMethod]: MethodFn;\n} & ([SseFn] extends [never] ? { sse?: never } : { sse: { [K in HttpMethod]: SseFn } });\n\nexport interface Config {\n  /**\n   * Auth token or a function returning auth token. The resolved value will be\n   * added to the request payload as defined by its `security` array.\n   */\n  auth?: ((auth: Auth) => Promise<AuthToken> | AuthToken) | AuthToken;\n  /**\n   * A function for serializing request body parameter. By default,\n   * {@link JSON.stringify()} will be used.\n   */\n  bodySerializer?: BodySerializer | null;\n  /**\n   * An object containing any HTTP headers that you want to pre-populate your\n   * `Headers` object with.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/Headers/Headers#init See more}\n   */\n  headers?:\n    | RequestInit['headers']\n    | Record<\n        string,\n        string | number | boolean | (string | number | boolean)[] | null | undefined | unknown\n      >;\n  /**\n   * The request method.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/fetch#method See more}\n   */\n  method?: Uppercase<HttpMethod>;\n  /**\n   * A function for serializing request query parameters. By default, arrays\n   * will be exploded in form style, objects will be exploded in deepObject\n   * style, and reserved characters are percent-encoded.\n   *\n   * This method will have no effect if the native `paramsSerializer()` Axios\n   * API function is used.\n   *\n   * {@link https://swagger.io/docs/specification/serialization/#query View examples}\n   */\n  querySerializer?: QuerySerializer | QuerySerializerOptions;\n  /**\n   * A function validating request data. This is useful if you want to ensure\n   * the request conforms to the desired shape, so it can be safely sent to\n   * the server.\n   */\n  requestValidator?: (data: unknown) => Promise<unknown>;\n  /**\n   * A function transforming response data before it's returned. This is useful\n   * for post-processing data, e.g. converting ISO strings into Date objects.\n   */\n  responseTransformer?: (data: unknown) => Promise<unknown>;\n  /**\n   * A function validating response data. This is useful if you want to ensure\n   * the response conforms to the desired shape, so it can be safely passed to\n   * the transformers and returned to the user.\n   */\n  responseValidator?: (data: unknown) => Promise<unknown>;\n}\n\ntype IsExactlyNeverOrNeverUndefined<T> = [T] extends [never]\n  ? true\n  : [T] extends [never | undefined]\n    ? [undefined] extends [T]\n      ? false\n      : true\n    : false;\n\nexport type OmitNever<T extends Record<string, unknown>> = {\n  [K in keyof T as IsExactlyNeverOrNeverUndefined<T[K]> extends true ? never : K]: T[K];\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/security-api-key/core/utils.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/security-api-key/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport { getBar, getFoo, type Options } from './sdk.gen';\nexport type { ClientOptions, GetBarData, GetBarResponses, GetFooData, GetFooResponses } from './types.gen';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/security-api-key/sdk.gen.ts",
    "content": "// 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 { GetBarData, GetBarResponses, GetFooData, GetFooResponses } from './types.gen';\n\nexport type Options<TData extends TDataShape = TDataShape, ThrowOnError extends boolean = boolean> = Options2<TData, ThrowOnError> & {\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\nexport const getFoo = <ThrowOnError extends boolean = false>(options?: Options<GetFooData, ThrowOnError>) => (options?.client ?? client).get<GetFooResponses, unknown, ThrowOnError>({\n    security: [{\n            in: 'query',\n            name: 'foo',\n            type: 'apiKey'\n        }],\n    url: '/foo',\n    ...options\n});\n\nexport const getBar = <ThrowOnError extends boolean = false>(options?: Options<GetBarData, ThrowOnError>) => (options?.client ?? client).get<GetBarResponses, unknown, ThrowOnError>({\n    security: [{\n            in: 'cookie',\n            name: 'bar',\n            type: 'apiKey'\n        }],\n    url: '/bar',\n    ...options\n});\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/security-api-key/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type ClientOptions = {\n    baseUrl: `${string}://${string}` | (string & {});\n};\n\nexport type GetFooData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/foo';\n};\n\nexport type GetFooResponses = {\n    /**\n     * OK\n     */\n    200: unknown;\n};\n\nexport type GetBarData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/bar';\n};\n\nexport type GetBarResponses = {\n    /**\n     * OK\n     */\n    200: unknown;\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/security-false/client/client.gen.ts",
    "content": "// 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 (options: RequestOptions) => {\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 url = buildUrl(opts);\n\n    return { opts, url };\n  };\n\n  const request: Client['request'] = async (options) => {\n    // @ts-expect-error\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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/security-false/client/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type { Auth } from '../core/auth.gen';\nexport type { QuerySerializerOptions } from '../core/bodySerializer.gen';\nexport {\n  formDataBodySerializer,\n  jsonBodySerializer,\n  urlSearchParamsBodySerializer,\n} from '../core/bodySerializer.gen';\nexport { buildClientParams } from '../core/params.gen';\nexport { serializeQueryKeyValue } from '../core/queryKeySerializer.gen';\nexport { createClient } from './client.gen';\nexport type {\n  Client,\n  ClientOptions,\n  Config,\n  CreateClientConfig,\n  Options,\n  RequestOptions,\n  RequestResult,\n  ResolvedRequestOptions,\n  ResponseStyle,\n  TDataShape,\n} from './types.gen';\nexport { createConfig, mergeHeaders } from './utils.gen';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/security-false/client/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { Auth } from '../core/auth.gen';\nimport type {\n  ServerSentEventsOptions,\n  ServerSentEventsResult,\n} from '../core/serverSentEvents.gen';\nimport type { Client as CoreClient, Config as CoreConfig } from '../core/types.gen';\nimport type { Middleware } from './utils.gen';\n\nexport type ResponseStyle = 'data' | 'fields';\n\nexport interface Config<T extends ClientOptions = ClientOptions>\n  extends Omit<RequestInit, 'body' | 'headers' | 'method'>, CoreConfig {\n  /**\n   * Base URL for all requests made by this client.\n   */\n  baseUrl?: T['baseUrl'];\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   * Please don't use the Fetch client for Next.js applications. The `next`\n   * options won't have any effect.\n   *\n   * Install {@link https://www.npmjs.com/package/@hey-api/client-next `@hey-api/client-next`} instead.\n   */\n  next?: never;\n  /**\n   * Return the response data parsed in a specified format. By default, `auto`\n   * will infer the appropriate method from the `Content-Type` response header.\n   * You can override this behavior with any of the {@link Body} methods.\n   * Select `stream` if you don't want to parse response data at all.\n   *\n   * @default 'auto'\n   */\n  parseAs?: 'arrayBuffer' | 'auto' | 'blob' | 'formData' | 'json' | 'stream' | 'text';\n  /**\n   * Should we return only data or multiple fields (data, error, response, etc.)?\n   *\n   * @default 'fields'\n   */\n  responseStyle?: ResponseStyle;\n  /**\n   * Throw an error instead of returning it in the response?\n   *\n   * @default false\n   */\n  throwOnError?: T['throwOnError'];\n}\n\nexport interface RequestOptions<\n  TData = unknown,\n  TResponseStyle extends ResponseStyle = 'fields',\n  ThrowOnError extends boolean = boolean,\n  Url extends string = string,\n>\n  extends\n    Config<{\n      responseStyle: TResponseStyle;\n      throwOnError: ThrowOnError;\n    }>,\n    Pick<\n      ServerSentEventsOptions<TData>,\n      | 'onRequest'\n      | 'onSseError'\n      | 'onSseEvent'\n      | 'sseDefaultRetryDelay'\n      | 'sseMaxRetryAttempts'\n      | 'sseMaxRetryDelay'\n    > {\n  /**\n   * Any body that you want to add to your request.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/fetch#body}\n   */\n  body?: unknown;\n  path?: Record<string, unknown>;\n  query?: Record<string, unknown>;\n  /**\n   * Security mechanism(s) to use for the request.\n   */\n  security?: ReadonlyArray<Auth>;\n  url: Url;\n}\n\nexport interface ResolvedRequestOptions<\n  TResponseStyle extends ResponseStyle = 'fields',\n  ThrowOnError extends boolean = boolean,\n  Url extends string = string,\n> extends RequestOptions<unknown, TResponseStyle, ThrowOnError, Url> {\n  serializedBody?: string;\n}\n\nexport type RequestResult<\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = boolean,\n  TResponseStyle extends ResponseStyle = 'fields',\n> = ThrowOnError extends true\n  ? Promise<\n      TResponseStyle extends 'data'\n        ? TData extends Record<string, unknown>\n          ? TData[keyof TData]\n          : TData\n        : {\n            data: TData extends Record<string, unknown> ? TData[keyof TData] : TData;\n            request: Request;\n            response: Response;\n          }\n    >\n  : Promise<\n      TResponseStyle extends 'data'\n        ? (TData extends Record<string, unknown> ? TData[keyof TData] : TData) | undefined\n        : (\n            | {\n                data: TData extends Record<string, unknown> ? TData[keyof TData] : TData;\n                error: undefined;\n              }\n            | {\n                data: undefined;\n                error: TError extends Record<string, unknown> ? TError[keyof TError] : TError;\n              }\n          ) & {\n            request: Request;\n            response: Response;\n          }\n    >;\n\nexport interface ClientOptions {\n  baseUrl?: string;\n  responseStyle?: ResponseStyle;\n  throwOnError?: boolean;\n}\n\ntype MethodFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'>,\n) => RequestResult<TData, TError, ThrowOnError, TResponseStyle>;\n\ntype SseFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'>,\n) => Promise<ServerSentEventsResult<TData, TError>>;\n\ntype RequestFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'> &\n    Pick<Required<RequestOptions<TData, TResponseStyle, ThrowOnError>>, 'method'>,\n) => RequestResult<TData, TError, ThrowOnError, TResponseStyle>;\n\ntype BuildUrlFn = <\n  TData extends {\n    body?: unknown;\n    path?: Record<string, unknown>;\n    query?: Record<string, unknown>;\n    url: string;\n  },\n>(\n  options: TData & Options<TData>,\n) => string;\n\nexport type Client = CoreClient<RequestFn, Config, MethodFn, BuildUrlFn, SseFn> & {\n  interceptors: Middleware<Request, Response, unknown, ResolvedRequestOptions>;\n};\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 = ClientOptions> = (\n  override?: Config<ClientOptions & T>,\n) => Config<Required<ClientOptions> & T>;\n\nexport interface TDataShape {\n  body?: unknown;\n  headers?: unknown;\n  path?: unknown;\n  query?: unknown;\n  url: string;\n}\n\ntype OmitKeys<T, K> = Pick<T, Exclude<keyof T, K>>;\n\nexport type Options<\n  TData extends TDataShape = TDataShape,\n  ThrowOnError extends boolean = boolean,\n  TResponse = unknown,\n  TResponseStyle extends ResponseStyle = 'fields',\n> = OmitKeys<\n  RequestOptions<TResponse, TResponseStyle, ThrowOnError>,\n  'body' | 'path' | 'query' | 'url'\n> &\n  ([TData] extends [never] ? unknown : Omit<TData, 'url'>);\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/security-false/client/utils.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/security-false/client.gen.ts",
    "content": "// 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>());\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/security-false/core/auth.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/security-false/core/bodySerializer.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/security-false/core/params.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/security-false/core/pathSerializer.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/security-false/core/queryKeySerializer.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\n/**\n * JSON-friendly union that mirrors what Pinia Colada can hash.\n */\nexport type JsonValue =\n  | null\n  | string\n  | number\n  | boolean\n  | JsonValue[]\n  | { [key: string]: JsonValue };\n\n/**\n * Replacer that converts non-JSON values (bigint, Date, etc.) to safe substitutes.\n */\nexport const queryKeyJsonReplacer = (_key: string, value: unknown) => {\n  if (value === undefined || typeof value === 'function' || typeof value === 'symbol') {\n    return undefined;\n  }\n  if (typeof value === 'bigint') {\n    return value.toString();\n  }\n  if (value instanceof Date) {\n    return value.toISOString();\n  }\n  return value;\n};\n\n/**\n * Safely stringifies a value and parses it back into a JsonValue.\n */\nexport const stringifyToJsonValue = (input: unknown): JsonValue | undefined => {\n  try {\n    const json = JSON.stringify(input, queryKeyJsonReplacer);\n    if (json === undefined) {\n      return undefined;\n    }\n    return JSON.parse(json) as JsonValue;\n  } catch {\n    return undefined;\n  }\n};\n\n/**\n * Detects plain objects (including objects with a null prototype).\n */\nconst isPlainObject = (value: unknown): value is Record<string, unknown> => {\n  if (value === null || typeof value !== 'object') {\n    return false;\n  }\n  const prototype = Object.getPrototypeOf(value as object);\n  return prototype === Object.prototype || prototype === null;\n};\n\n/**\n * Turns URLSearchParams into a sorted JSON object for deterministic keys.\n */\nconst serializeSearchParams = (params: URLSearchParams): JsonValue => {\n  const entries = Array.from(params.entries()).sort(([a], [b]) => a.localeCompare(b));\n  const result: Record<string, JsonValue> = {};\n\n  for (const [key, value] of entries) {\n    const existing = result[key];\n    if (existing === undefined) {\n      result[key] = value;\n      continue;\n    }\n\n    if (Array.isArray(existing)) {\n      (existing as string[]).push(value);\n    } else {\n      result[key] = [existing, value];\n    }\n  }\n\n  return result;\n};\n\n/**\n * Normalizes any accepted value into a JSON-friendly shape for query keys.\n */\nexport const serializeQueryKeyValue = (value: unknown): JsonValue | undefined => {\n  if (value === null) {\n    return null;\n  }\n\n  if (typeof value === 'string' || typeof value === 'number' || typeof value === 'boolean') {\n    return value;\n  }\n\n  if (value === undefined || typeof value === 'function' || typeof value === 'symbol') {\n    return undefined;\n  }\n\n  if (typeof value === 'bigint') {\n    return value.toString();\n  }\n\n  if (value instanceof Date) {\n    return value.toISOString();\n  }\n\n  if (Array.isArray(value)) {\n    return stringifyToJsonValue(value);\n  }\n\n  if (typeof URLSearchParams !== 'undefined' && value instanceof URLSearchParams) {\n    return serializeSearchParams(value);\n  }\n\n  if (isPlainObject(value)) {\n    return stringifyToJsonValue(value);\n  }\n\n  return undefined;\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/security-false/core/serverSentEvents.gen.ts",
    "content": "// 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 const 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            // Normalize line endings: CRLF -> LF, then CR -> LF\n            buffer = buffer.replace(/\\r\\n/g, '\\n').replace(/\\r/g, '\\n');\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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/security-false/core/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { Auth, AuthToken } from './auth.gen';\nimport type { BodySerializer, QuerySerializer, QuerySerializerOptions } from './bodySerializer.gen';\n\nexport type HttpMethod =\n  | 'connect'\n  | 'delete'\n  | 'get'\n  | 'head'\n  | 'options'\n  | 'patch'\n  | 'post'\n  | 'put'\n  | 'trace';\n\nexport type Client<\n  RequestFn = never,\n  Config = unknown,\n  MethodFn = never,\n  BuildUrlFn = never,\n  SseFn = never,\n> = {\n  /**\n   * Returns the final request URL.\n   */\n  buildUrl: BuildUrlFn;\n  getConfig: () => Config;\n  request: RequestFn;\n  setConfig: (config: Config) => Config;\n} & {\n  [K in HttpMethod]: MethodFn;\n} & ([SseFn] extends [never] ? { sse?: never } : { sse: { [K in HttpMethod]: SseFn } });\n\nexport interface Config {\n  /**\n   * Auth token or a function returning auth token. The resolved value will be\n   * added to the request payload as defined by its `security` array.\n   */\n  auth?: ((auth: Auth) => Promise<AuthToken> | AuthToken) | AuthToken;\n  /**\n   * A function for serializing request body parameter. By default,\n   * {@link JSON.stringify()} will be used.\n   */\n  bodySerializer?: BodySerializer | null;\n  /**\n   * An object containing any HTTP headers that you want to pre-populate your\n   * `Headers` object with.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/Headers/Headers#init See more}\n   */\n  headers?:\n    | RequestInit['headers']\n    | Record<\n        string,\n        string | number | boolean | (string | number | boolean)[] | null | undefined | unknown\n      >;\n  /**\n   * The request method.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/fetch#method See more}\n   */\n  method?: Uppercase<HttpMethod>;\n  /**\n   * A function for serializing request query parameters. By default, arrays\n   * will be exploded in form style, objects will be exploded in deepObject\n   * style, and reserved characters are percent-encoded.\n   *\n   * This method will have no effect if the native `paramsSerializer()` Axios\n   * API function is used.\n   *\n   * {@link https://swagger.io/docs/specification/serialization/#query View examples}\n   */\n  querySerializer?: QuerySerializer | QuerySerializerOptions;\n  /**\n   * A function validating request data. This is useful if you want to ensure\n   * the request conforms to the desired shape, so it can be safely sent to\n   * the server.\n   */\n  requestValidator?: (data: unknown) => Promise<unknown>;\n  /**\n   * A function transforming response data before it's returned. This is useful\n   * for post-processing data, e.g. converting ISO strings into Date objects.\n   */\n  responseTransformer?: (data: unknown) => Promise<unknown>;\n  /**\n   * A function validating response data. This is useful if you want to ensure\n   * the response conforms to the desired shape, so it can be safely passed to\n   * the transformers and returned to the user.\n   */\n  responseValidator?: (data: unknown) => Promise<unknown>;\n}\n\ntype IsExactlyNeverOrNeverUndefined<T> = [T] extends [never]\n  ? true\n  : [T] extends [never | undefined]\n    ? [undefined] extends [T]\n      ? false\n      : true\n    : false;\n\nexport type OmitNever<T extends Record<string, unknown>> = {\n  [K in keyof T as IsExactlyNeverOrNeverUndefined<T[K]> extends true ? never : K]: T[K];\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/security-false/core/utils.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/security-false/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport { getFoo, type Options } from './sdk.gen';\nexport type { ClientOptions, GetFooData, GetFooResponses } from './types.gen';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/security-false/sdk.gen.ts",
    "content": "// 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 { GetFooData, GetFooResponses } from './types.gen';\n\nexport type Options<TData extends TDataShape = TDataShape, ThrowOnError extends boolean = boolean> = Options2<TData, ThrowOnError> & {\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\nexport const getFoo = <ThrowOnError extends boolean = false>(options?: Options<GetFooData, ThrowOnError>) => (options?.client ?? client).get<GetFooResponses, unknown, ThrowOnError>({ url: '/foo', ...options });\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/security-false/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type ClientOptions = {\n    baseUrl: `${string}://${string}` | (string & {});\n};\n\nexport type GetFooData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/foo';\n};\n\nexport type GetFooResponses = {\n    /**\n     * OK\n     */\n    200: unknown;\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/security-http-bearer/client/client.gen.ts",
    "content": "// 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 (options: RequestOptions) => {\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 url = buildUrl(opts);\n\n    return { opts, url };\n  };\n\n  const request: Client['request'] = async (options) => {\n    // @ts-expect-error\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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/security-http-bearer/client/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type { Auth } from '../core/auth.gen';\nexport type { QuerySerializerOptions } from '../core/bodySerializer.gen';\nexport {\n  formDataBodySerializer,\n  jsonBodySerializer,\n  urlSearchParamsBodySerializer,\n} from '../core/bodySerializer.gen';\nexport { buildClientParams } from '../core/params.gen';\nexport { serializeQueryKeyValue } from '../core/queryKeySerializer.gen';\nexport { createClient } from './client.gen';\nexport type {\n  Client,\n  ClientOptions,\n  Config,\n  CreateClientConfig,\n  Options,\n  RequestOptions,\n  RequestResult,\n  ResolvedRequestOptions,\n  ResponseStyle,\n  TDataShape,\n} from './types.gen';\nexport { createConfig, mergeHeaders } from './utils.gen';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/security-http-bearer/client/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { Auth } from '../core/auth.gen';\nimport type {\n  ServerSentEventsOptions,\n  ServerSentEventsResult,\n} from '../core/serverSentEvents.gen';\nimport type { Client as CoreClient, Config as CoreConfig } from '../core/types.gen';\nimport type { Middleware } from './utils.gen';\n\nexport type ResponseStyle = 'data' | 'fields';\n\nexport interface Config<T extends ClientOptions = ClientOptions>\n  extends Omit<RequestInit, 'body' | 'headers' | 'method'>, CoreConfig {\n  /**\n   * Base URL for all requests made by this client.\n   */\n  baseUrl?: T['baseUrl'];\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   * Please don't use the Fetch client for Next.js applications. The `next`\n   * options won't have any effect.\n   *\n   * Install {@link https://www.npmjs.com/package/@hey-api/client-next `@hey-api/client-next`} instead.\n   */\n  next?: never;\n  /**\n   * Return the response data parsed in a specified format. By default, `auto`\n   * will infer the appropriate method from the `Content-Type` response header.\n   * You can override this behavior with any of the {@link Body} methods.\n   * Select `stream` if you don't want to parse response data at all.\n   *\n   * @default 'auto'\n   */\n  parseAs?: 'arrayBuffer' | 'auto' | 'blob' | 'formData' | 'json' | 'stream' | 'text';\n  /**\n   * Should we return only data or multiple fields (data, error, response, etc.)?\n   *\n   * @default 'fields'\n   */\n  responseStyle?: ResponseStyle;\n  /**\n   * Throw an error instead of returning it in the response?\n   *\n   * @default false\n   */\n  throwOnError?: T['throwOnError'];\n}\n\nexport interface RequestOptions<\n  TData = unknown,\n  TResponseStyle extends ResponseStyle = 'fields',\n  ThrowOnError extends boolean = boolean,\n  Url extends string = string,\n>\n  extends\n    Config<{\n      responseStyle: TResponseStyle;\n      throwOnError: ThrowOnError;\n    }>,\n    Pick<\n      ServerSentEventsOptions<TData>,\n      | 'onRequest'\n      | 'onSseError'\n      | 'onSseEvent'\n      | 'sseDefaultRetryDelay'\n      | 'sseMaxRetryAttempts'\n      | 'sseMaxRetryDelay'\n    > {\n  /**\n   * Any body that you want to add to your request.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/fetch#body}\n   */\n  body?: unknown;\n  path?: Record<string, unknown>;\n  query?: Record<string, unknown>;\n  /**\n   * Security mechanism(s) to use for the request.\n   */\n  security?: ReadonlyArray<Auth>;\n  url: Url;\n}\n\nexport interface ResolvedRequestOptions<\n  TResponseStyle extends ResponseStyle = 'fields',\n  ThrowOnError extends boolean = boolean,\n  Url extends string = string,\n> extends RequestOptions<unknown, TResponseStyle, ThrowOnError, Url> {\n  serializedBody?: string;\n}\n\nexport type RequestResult<\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = boolean,\n  TResponseStyle extends ResponseStyle = 'fields',\n> = ThrowOnError extends true\n  ? Promise<\n      TResponseStyle extends 'data'\n        ? TData extends Record<string, unknown>\n          ? TData[keyof TData]\n          : TData\n        : {\n            data: TData extends Record<string, unknown> ? TData[keyof TData] : TData;\n            request: Request;\n            response: Response;\n          }\n    >\n  : Promise<\n      TResponseStyle extends 'data'\n        ? (TData extends Record<string, unknown> ? TData[keyof TData] : TData) | undefined\n        : (\n            | {\n                data: TData extends Record<string, unknown> ? TData[keyof TData] : TData;\n                error: undefined;\n              }\n            | {\n                data: undefined;\n                error: TError extends Record<string, unknown> ? TError[keyof TError] : TError;\n              }\n          ) & {\n            request: Request;\n            response: Response;\n          }\n    >;\n\nexport interface ClientOptions {\n  baseUrl?: string;\n  responseStyle?: ResponseStyle;\n  throwOnError?: boolean;\n}\n\ntype MethodFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'>,\n) => RequestResult<TData, TError, ThrowOnError, TResponseStyle>;\n\ntype SseFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'>,\n) => Promise<ServerSentEventsResult<TData, TError>>;\n\ntype RequestFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'> &\n    Pick<Required<RequestOptions<TData, TResponseStyle, ThrowOnError>>, 'method'>,\n) => RequestResult<TData, TError, ThrowOnError, TResponseStyle>;\n\ntype BuildUrlFn = <\n  TData extends {\n    body?: unknown;\n    path?: Record<string, unknown>;\n    query?: Record<string, unknown>;\n    url: string;\n  },\n>(\n  options: TData & Options<TData>,\n) => string;\n\nexport type Client = CoreClient<RequestFn, Config, MethodFn, BuildUrlFn, SseFn> & {\n  interceptors: Middleware<Request, Response, unknown, ResolvedRequestOptions>;\n};\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 = ClientOptions> = (\n  override?: Config<ClientOptions & T>,\n) => Config<Required<ClientOptions> & T>;\n\nexport interface TDataShape {\n  body?: unknown;\n  headers?: unknown;\n  path?: unknown;\n  query?: unknown;\n  url: string;\n}\n\ntype OmitKeys<T, K> = Pick<T, Exclude<keyof T, K>>;\n\nexport type Options<\n  TData extends TDataShape = TDataShape,\n  ThrowOnError extends boolean = boolean,\n  TResponse = unknown,\n  TResponseStyle extends ResponseStyle = 'fields',\n> = OmitKeys<\n  RequestOptions<TResponse, TResponseStyle, ThrowOnError>,\n  'body' | 'path' | 'query' | 'url'\n> &\n  ([TData] extends [never] ? unknown : Omit<TData, 'url'>);\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/security-http-bearer/client/utils.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/security-http-bearer/client.gen.ts",
    "content": "// 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>());\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/security-http-bearer/core/auth.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/security-http-bearer/core/bodySerializer.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/security-http-bearer/core/params.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/security-http-bearer/core/pathSerializer.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/security-http-bearer/core/queryKeySerializer.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\n/**\n * JSON-friendly union that mirrors what Pinia Colada can hash.\n */\nexport type JsonValue =\n  | null\n  | string\n  | number\n  | boolean\n  | JsonValue[]\n  | { [key: string]: JsonValue };\n\n/**\n * Replacer that converts non-JSON values (bigint, Date, etc.) to safe substitutes.\n */\nexport const queryKeyJsonReplacer = (_key: string, value: unknown) => {\n  if (value === undefined || typeof value === 'function' || typeof value === 'symbol') {\n    return undefined;\n  }\n  if (typeof value === 'bigint') {\n    return value.toString();\n  }\n  if (value instanceof Date) {\n    return value.toISOString();\n  }\n  return value;\n};\n\n/**\n * Safely stringifies a value and parses it back into a JsonValue.\n */\nexport const stringifyToJsonValue = (input: unknown): JsonValue | undefined => {\n  try {\n    const json = JSON.stringify(input, queryKeyJsonReplacer);\n    if (json === undefined) {\n      return undefined;\n    }\n    return JSON.parse(json) as JsonValue;\n  } catch {\n    return undefined;\n  }\n};\n\n/**\n * Detects plain objects (including objects with a null prototype).\n */\nconst isPlainObject = (value: unknown): value is Record<string, unknown> => {\n  if (value === null || typeof value !== 'object') {\n    return false;\n  }\n  const prototype = Object.getPrototypeOf(value as object);\n  return prototype === Object.prototype || prototype === null;\n};\n\n/**\n * Turns URLSearchParams into a sorted JSON object for deterministic keys.\n */\nconst serializeSearchParams = (params: URLSearchParams): JsonValue => {\n  const entries = Array.from(params.entries()).sort(([a], [b]) => a.localeCompare(b));\n  const result: Record<string, JsonValue> = {};\n\n  for (const [key, value] of entries) {\n    const existing = result[key];\n    if (existing === undefined) {\n      result[key] = value;\n      continue;\n    }\n\n    if (Array.isArray(existing)) {\n      (existing as string[]).push(value);\n    } else {\n      result[key] = [existing, value];\n    }\n  }\n\n  return result;\n};\n\n/**\n * Normalizes any accepted value into a JSON-friendly shape for query keys.\n */\nexport const serializeQueryKeyValue = (value: unknown): JsonValue | undefined => {\n  if (value === null) {\n    return null;\n  }\n\n  if (typeof value === 'string' || typeof value === 'number' || typeof value === 'boolean') {\n    return value;\n  }\n\n  if (value === undefined || typeof value === 'function' || typeof value === 'symbol') {\n    return undefined;\n  }\n\n  if (typeof value === 'bigint') {\n    return value.toString();\n  }\n\n  if (value instanceof Date) {\n    return value.toISOString();\n  }\n\n  if (Array.isArray(value)) {\n    return stringifyToJsonValue(value);\n  }\n\n  if (typeof URLSearchParams !== 'undefined' && value instanceof URLSearchParams) {\n    return serializeSearchParams(value);\n  }\n\n  if (isPlainObject(value)) {\n    return stringifyToJsonValue(value);\n  }\n\n  return undefined;\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/security-http-bearer/core/serverSentEvents.gen.ts",
    "content": "// 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 const 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            // Normalize line endings: CRLF -> LF, then CR -> LF\n            buffer = buffer.replace(/\\r\\n/g, '\\n').replace(/\\r/g, '\\n');\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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/security-http-bearer/core/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { Auth, AuthToken } from './auth.gen';\nimport type { BodySerializer, QuerySerializer, QuerySerializerOptions } from './bodySerializer.gen';\n\nexport type HttpMethod =\n  | 'connect'\n  | 'delete'\n  | 'get'\n  | 'head'\n  | 'options'\n  | 'patch'\n  | 'post'\n  | 'put'\n  | 'trace';\n\nexport type Client<\n  RequestFn = never,\n  Config = unknown,\n  MethodFn = never,\n  BuildUrlFn = never,\n  SseFn = never,\n> = {\n  /**\n   * Returns the final request URL.\n   */\n  buildUrl: BuildUrlFn;\n  getConfig: () => Config;\n  request: RequestFn;\n  setConfig: (config: Config) => Config;\n} & {\n  [K in HttpMethod]: MethodFn;\n} & ([SseFn] extends [never] ? { sse?: never } : { sse: { [K in HttpMethod]: SseFn } });\n\nexport interface Config {\n  /**\n   * Auth token or a function returning auth token. The resolved value will be\n   * added to the request payload as defined by its `security` array.\n   */\n  auth?: ((auth: Auth) => Promise<AuthToken> | AuthToken) | AuthToken;\n  /**\n   * A function for serializing request body parameter. By default,\n   * {@link JSON.stringify()} will be used.\n   */\n  bodySerializer?: BodySerializer | null;\n  /**\n   * An object containing any HTTP headers that you want to pre-populate your\n   * `Headers` object with.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/Headers/Headers#init See more}\n   */\n  headers?:\n    | RequestInit['headers']\n    | Record<\n        string,\n        string | number | boolean | (string | number | boolean)[] | null | undefined | unknown\n      >;\n  /**\n   * The request method.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/fetch#method See more}\n   */\n  method?: Uppercase<HttpMethod>;\n  /**\n   * A function for serializing request query parameters. By default, arrays\n   * will be exploded in form style, objects will be exploded in deepObject\n   * style, and reserved characters are percent-encoded.\n   *\n   * This method will have no effect if the native `paramsSerializer()` Axios\n   * API function is used.\n   *\n   * {@link https://swagger.io/docs/specification/serialization/#query View examples}\n   */\n  querySerializer?: QuerySerializer | QuerySerializerOptions;\n  /**\n   * A function validating request data. This is useful if you want to ensure\n   * the request conforms to the desired shape, so it can be safely sent to\n   * the server.\n   */\n  requestValidator?: (data: unknown) => Promise<unknown>;\n  /**\n   * A function transforming response data before it's returned. This is useful\n   * for post-processing data, e.g. converting ISO strings into Date objects.\n   */\n  responseTransformer?: (data: unknown) => Promise<unknown>;\n  /**\n   * A function validating response data. This is useful if you want to ensure\n   * the response conforms to the desired shape, so it can be safely passed to\n   * the transformers and returned to the user.\n   */\n  responseValidator?: (data: unknown) => Promise<unknown>;\n}\n\ntype IsExactlyNeverOrNeverUndefined<T> = [T] extends [never]\n  ? true\n  : [T] extends [never | undefined]\n    ? [undefined] extends [T]\n      ? false\n      : true\n    : false;\n\nexport type OmitNever<T extends Record<string, unknown>> = {\n  [K in keyof T as IsExactlyNeverOrNeverUndefined<T[K]> extends true ? never : K]: T[K];\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/security-http-bearer/core/utils.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/security-http-bearer/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport { getFoo, type Options } from './sdk.gen';\nexport type { ClientOptions, GetFooData, GetFooResponses } from './types.gen';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/security-http-bearer/sdk.gen.ts",
    "content": "// 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 { GetFooData, GetFooResponses } from './types.gen';\n\nexport type Options<TData extends TDataShape = TDataShape, ThrowOnError extends boolean = boolean> = Options2<TData, ThrowOnError> & {\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\nexport const getFoo = <ThrowOnError extends boolean = false>(options?: Options<GetFooData, ThrowOnError>) => (options?.client ?? client).get<GetFooResponses, unknown, ThrowOnError>({\n    security: [{ scheme: 'bearer', type: 'http' }],\n    url: '/foo',\n    ...options\n});\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/security-http-bearer/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type ClientOptions = {\n    baseUrl: `${string}://${string}` | (string & {});\n};\n\nexport type GetFooData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/foo';\n};\n\nexport type GetFooResponses = {\n    /**\n     * OK\n     */\n    200: unknown;\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/security-oauth2/client/client.gen.ts",
    "content": "// 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 (options: RequestOptions) => {\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 url = buildUrl(opts);\n\n    return { opts, url };\n  };\n\n  const request: Client['request'] = async (options) => {\n    // @ts-expect-error\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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/security-oauth2/client/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type { Auth } from '../core/auth.gen';\nexport type { QuerySerializerOptions } from '../core/bodySerializer.gen';\nexport {\n  formDataBodySerializer,\n  jsonBodySerializer,\n  urlSearchParamsBodySerializer,\n} from '../core/bodySerializer.gen';\nexport { buildClientParams } from '../core/params.gen';\nexport { serializeQueryKeyValue } from '../core/queryKeySerializer.gen';\nexport { createClient } from './client.gen';\nexport type {\n  Client,\n  ClientOptions,\n  Config,\n  CreateClientConfig,\n  Options,\n  RequestOptions,\n  RequestResult,\n  ResolvedRequestOptions,\n  ResponseStyle,\n  TDataShape,\n} from './types.gen';\nexport { createConfig, mergeHeaders } from './utils.gen';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/security-oauth2/client/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { Auth } from '../core/auth.gen';\nimport type {\n  ServerSentEventsOptions,\n  ServerSentEventsResult,\n} from '../core/serverSentEvents.gen';\nimport type { Client as CoreClient, Config as CoreConfig } from '../core/types.gen';\nimport type { Middleware } from './utils.gen';\n\nexport type ResponseStyle = 'data' | 'fields';\n\nexport interface Config<T extends ClientOptions = ClientOptions>\n  extends Omit<RequestInit, 'body' | 'headers' | 'method'>, CoreConfig {\n  /**\n   * Base URL for all requests made by this client.\n   */\n  baseUrl?: T['baseUrl'];\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   * Please don't use the Fetch client for Next.js applications. The `next`\n   * options won't have any effect.\n   *\n   * Install {@link https://www.npmjs.com/package/@hey-api/client-next `@hey-api/client-next`} instead.\n   */\n  next?: never;\n  /**\n   * Return the response data parsed in a specified format. By default, `auto`\n   * will infer the appropriate method from the `Content-Type` response header.\n   * You can override this behavior with any of the {@link Body} methods.\n   * Select `stream` if you don't want to parse response data at all.\n   *\n   * @default 'auto'\n   */\n  parseAs?: 'arrayBuffer' | 'auto' | 'blob' | 'formData' | 'json' | 'stream' | 'text';\n  /**\n   * Should we return only data or multiple fields (data, error, response, etc.)?\n   *\n   * @default 'fields'\n   */\n  responseStyle?: ResponseStyle;\n  /**\n   * Throw an error instead of returning it in the response?\n   *\n   * @default false\n   */\n  throwOnError?: T['throwOnError'];\n}\n\nexport interface RequestOptions<\n  TData = unknown,\n  TResponseStyle extends ResponseStyle = 'fields',\n  ThrowOnError extends boolean = boolean,\n  Url extends string = string,\n>\n  extends\n    Config<{\n      responseStyle: TResponseStyle;\n      throwOnError: ThrowOnError;\n    }>,\n    Pick<\n      ServerSentEventsOptions<TData>,\n      | 'onRequest'\n      | 'onSseError'\n      | 'onSseEvent'\n      | 'sseDefaultRetryDelay'\n      | 'sseMaxRetryAttempts'\n      | 'sseMaxRetryDelay'\n    > {\n  /**\n   * Any body that you want to add to your request.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/fetch#body}\n   */\n  body?: unknown;\n  path?: Record<string, unknown>;\n  query?: Record<string, unknown>;\n  /**\n   * Security mechanism(s) to use for the request.\n   */\n  security?: ReadonlyArray<Auth>;\n  url: Url;\n}\n\nexport interface ResolvedRequestOptions<\n  TResponseStyle extends ResponseStyle = 'fields',\n  ThrowOnError extends boolean = boolean,\n  Url extends string = string,\n> extends RequestOptions<unknown, TResponseStyle, ThrowOnError, Url> {\n  serializedBody?: string;\n}\n\nexport type RequestResult<\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = boolean,\n  TResponseStyle extends ResponseStyle = 'fields',\n> = ThrowOnError extends true\n  ? Promise<\n      TResponseStyle extends 'data'\n        ? TData extends Record<string, unknown>\n          ? TData[keyof TData]\n          : TData\n        : {\n            data: TData extends Record<string, unknown> ? TData[keyof TData] : TData;\n            request: Request;\n            response: Response;\n          }\n    >\n  : Promise<\n      TResponseStyle extends 'data'\n        ? (TData extends Record<string, unknown> ? TData[keyof TData] : TData) | undefined\n        : (\n            | {\n                data: TData extends Record<string, unknown> ? TData[keyof TData] : TData;\n                error: undefined;\n              }\n            | {\n                data: undefined;\n                error: TError extends Record<string, unknown> ? TError[keyof TError] : TError;\n              }\n          ) & {\n            request: Request;\n            response: Response;\n          }\n    >;\n\nexport interface ClientOptions {\n  baseUrl?: string;\n  responseStyle?: ResponseStyle;\n  throwOnError?: boolean;\n}\n\ntype MethodFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'>,\n) => RequestResult<TData, TError, ThrowOnError, TResponseStyle>;\n\ntype SseFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'>,\n) => Promise<ServerSentEventsResult<TData, TError>>;\n\ntype RequestFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'> &\n    Pick<Required<RequestOptions<TData, TResponseStyle, ThrowOnError>>, 'method'>,\n) => RequestResult<TData, TError, ThrowOnError, TResponseStyle>;\n\ntype BuildUrlFn = <\n  TData extends {\n    body?: unknown;\n    path?: Record<string, unknown>;\n    query?: Record<string, unknown>;\n    url: string;\n  },\n>(\n  options: TData & Options<TData>,\n) => string;\n\nexport type Client = CoreClient<RequestFn, Config, MethodFn, BuildUrlFn, SseFn> & {\n  interceptors: Middleware<Request, Response, unknown, ResolvedRequestOptions>;\n};\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 = ClientOptions> = (\n  override?: Config<ClientOptions & T>,\n) => Config<Required<ClientOptions> & T>;\n\nexport interface TDataShape {\n  body?: unknown;\n  headers?: unknown;\n  path?: unknown;\n  query?: unknown;\n  url: string;\n}\n\ntype OmitKeys<T, K> = Pick<T, Exclude<keyof T, K>>;\n\nexport type Options<\n  TData extends TDataShape = TDataShape,\n  ThrowOnError extends boolean = boolean,\n  TResponse = unknown,\n  TResponseStyle extends ResponseStyle = 'fields',\n> = OmitKeys<\n  RequestOptions<TResponse, TResponseStyle, ThrowOnError>,\n  'body' | 'path' | 'query' | 'url'\n> &\n  ([TData] extends [never] ? unknown : Omit<TData, 'url'>);\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/security-oauth2/client/utils.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/security-oauth2/client.gen.ts",
    "content": "// 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>());\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/security-oauth2/core/auth.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/security-oauth2/core/bodySerializer.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/security-oauth2/core/params.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/security-oauth2/core/pathSerializer.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/security-oauth2/core/queryKeySerializer.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\n/**\n * JSON-friendly union that mirrors what Pinia Colada can hash.\n */\nexport type JsonValue =\n  | null\n  | string\n  | number\n  | boolean\n  | JsonValue[]\n  | { [key: string]: JsonValue };\n\n/**\n * Replacer that converts non-JSON values (bigint, Date, etc.) to safe substitutes.\n */\nexport const queryKeyJsonReplacer = (_key: string, value: unknown) => {\n  if (value === undefined || typeof value === 'function' || typeof value === 'symbol') {\n    return undefined;\n  }\n  if (typeof value === 'bigint') {\n    return value.toString();\n  }\n  if (value instanceof Date) {\n    return value.toISOString();\n  }\n  return value;\n};\n\n/**\n * Safely stringifies a value and parses it back into a JsonValue.\n */\nexport const stringifyToJsonValue = (input: unknown): JsonValue | undefined => {\n  try {\n    const json = JSON.stringify(input, queryKeyJsonReplacer);\n    if (json === undefined) {\n      return undefined;\n    }\n    return JSON.parse(json) as JsonValue;\n  } catch {\n    return undefined;\n  }\n};\n\n/**\n * Detects plain objects (including objects with a null prototype).\n */\nconst isPlainObject = (value: unknown): value is Record<string, unknown> => {\n  if (value === null || typeof value !== 'object') {\n    return false;\n  }\n  const prototype = Object.getPrototypeOf(value as object);\n  return prototype === Object.prototype || prototype === null;\n};\n\n/**\n * Turns URLSearchParams into a sorted JSON object for deterministic keys.\n */\nconst serializeSearchParams = (params: URLSearchParams): JsonValue => {\n  const entries = Array.from(params.entries()).sort(([a], [b]) => a.localeCompare(b));\n  const result: Record<string, JsonValue> = {};\n\n  for (const [key, value] of entries) {\n    const existing = result[key];\n    if (existing === undefined) {\n      result[key] = value;\n      continue;\n    }\n\n    if (Array.isArray(existing)) {\n      (existing as string[]).push(value);\n    } else {\n      result[key] = [existing, value];\n    }\n  }\n\n  return result;\n};\n\n/**\n * Normalizes any accepted value into a JSON-friendly shape for query keys.\n */\nexport const serializeQueryKeyValue = (value: unknown): JsonValue | undefined => {\n  if (value === null) {\n    return null;\n  }\n\n  if (typeof value === 'string' || typeof value === 'number' || typeof value === 'boolean') {\n    return value;\n  }\n\n  if (value === undefined || typeof value === 'function' || typeof value === 'symbol') {\n    return undefined;\n  }\n\n  if (typeof value === 'bigint') {\n    return value.toString();\n  }\n\n  if (value instanceof Date) {\n    return value.toISOString();\n  }\n\n  if (Array.isArray(value)) {\n    return stringifyToJsonValue(value);\n  }\n\n  if (typeof URLSearchParams !== 'undefined' && value instanceof URLSearchParams) {\n    return serializeSearchParams(value);\n  }\n\n  if (isPlainObject(value)) {\n    return stringifyToJsonValue(value);\n  }\n\n  return undefined;\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/security-oauth2/core/serverSentEvents.gen.ts",
    "content": "// 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 const 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            // Normalize line endings: CRLF -> LF, then CR -> LF\n            buffer = buffer.replace(/\\r\\n/g, '\\n').replace(/\\r/g, '\\n');\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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/security-oauth2/core/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { Auth, AuthToken } from './auth.gen';\nimport type { BodySerializer, QuerySerializer, QuerySerializerOptions } from './bodySerializer.gen';\n\nexport type HttpMethod =\n  | 'connect'\n  | 'delete'\n  | 'get'\n  | 'head'\n  | 'options'\n  | 'patch'\n  | 'post'\n  | 'put'\n  | 'trace';\n\nexport type Client<\n  RequestFn = never,\n  Config = unknown,\n  MethodFn = never,\n  BuildUrlFn = never,\n  SseFn = never,\n> = {\n  /**\n   * Returns the final request URL.\n   */\n  buildUrl: BuildUrlFn;\n  getConfig: () => Config;\n  request: RequestFn;\n  setConfig: (config: Config) => Config;\n} & {\n  [K in HttpMethod]: MethodFn;\n} & ([SseFn] extends [never] ? { sse?: never } : { sse: { [K in HttpMethod]: SseFn } });\n\nexport interface Config {\n  /**\n   * Auth token or a function returning auth token. The resolved value will be\n   * added to the request payload as defined by its `security` array.\n   */\n  auth?: ((auth: Auth) => Promise<AuthToken> | AuthToken) | AuthToken;\n  /**\n   * A function for serializing request body parameter. By default,\n   * {@link JSON.stringify()} will be used.\n   */\n  bodySerializer?: BodySerializer | null;\n  /**\n   * An object containing any HTTP headers that you want to pre-populate your\n   * `Headers` object with.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/Headers/Headers#init See more}\n   */\n  headers?:\n    | RequestInit['headers']\n    | Record<\n        string,\n        string | number | boolean | (string | number | boolean)[] | null | undefined | unknown\n      >;\n  /**\n   * The request method.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/fetch#method See more}\n   */\n  method?: Uppercase<HttpMethod>;\n  /**\n   * A function for serializing request query parameters. By default, arrays\n   * will be exploded in form style, objects will be exploded in deepObject\n   * style, and reserved characters are percent-encoded.\n   *\n   * This method will have no effect if the native `paramsSerializer()` Axios\n   * API function is used.\n   *\n   * {@link https://swagger.io/docs/specification/serialization/#query View examples}\n   */\n  querySerializer?: QuerySerializer | QuerySerializerOptions;\n  /**\n   * A function validating request data. This is useful if you want to ensure\n   * the request conforms to the desired shape, so it can be safely sent to\n   * the server.\n   */\n  requestValidator?: (data: unknown) => Promise<unknown>;\n  /**\n   * A function transforming response data before it's returned. This is useful\n   * for post-processing data, e.g. converting ISO strings into Date objects.\n   */\n  responseTransformer?: (data: unknown) => Promise<unknown>;\n  /**\n   * A function validating response data. This is useful if you want to ensure\n   * the response conforms to the desired shape, so it can be safely passed to\n   * the transformers and returned to the user.\n   */\n  responseValidator?: (data: unknown) => Promise<unknown>;\n}\n\ntype IsExactlyNeverOrNeverUndefined<T> = [T] extends [never]\n  ? true\n  : [T] extends [never | undefined]\n    ? [undefined] extends [T]\n      ? false\n      : true\n    : false;\n\nexport type OmitNever<T extends Record<string, unknown>> = {\n  [K in keyof T as IsExactlyNeverOrNeverUndefined<T[K]> extends true ? never : K]: T[K];\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/security-oauth2/core/utils.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/security-oauth2/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport { getFoo, type Options } from './sdk.gen';\nexport type { ClientOptions, GetFooData, GetFooResponses } from './types.gen';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/security-oauth2/sdk.gen.ts",
    "content": "// 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 { GetFooData, GetFooResponses } from './types.gen';\n\nexport type Options<TData extends TDataShape = TDataShape, ThrowOnError extends boolean = boolean> = Options2<TData, ThrowOnError> & {\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\nexport const getFoo = <ThrowOnError extends boolean = false>(options?: Options<GetFooData, ThrowOnError>) => (options?.client ?? client).get<GetFooResponses, unknown, ThrowOnError>({\n    security: [{ scheme: 'bearer', type: 'http' }],\n    url: '/foo',\n    ...options\n});\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/security-oauth2/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type ClientOptions = {\n    baseUrl: `${string}://${string}` | (string & {});\n};\n\nexport type GetFooData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/foo';\n};\n\nexport type GetFooResponses = {\n    /**\n     * OK\n     */\n    200: unknown;\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/security-open-id-connect/client/client.gen.ts",
    "content": "// 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 (options: RequestOptions) => {\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 url = buildUrl(opts);\n\n    return { opts, url };\n  };\n\n  const request: Client['request'] = async (options) => {\n    // @ts-expect-error\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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/security-open-id-connect/client/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type { Auth } from '../core/auth.gen';\nexport type { QuerySerializerOptions } from '../core/bodySerializer.gen';\nexport {\n  formDataBodySerializer,\n  jsonBodySerializer,\n  urlSearchParamsBodySerializer,\n} from '../core/bodySerializer.gen';\nexport { buildClientParams } from '../core/params.gen';\nexport { serializeQueryKeyValue } from '../core/queryKeySerializer.gen';\nexport { createClient } from './client.gen';\nexport type {\n  Client,\n  ClientOptions,\n  Config,\n  CreateClientConfig,\n  Options,\n  RequestOptions,\n  RequestResult,\n  ResolvedRequestOptions,\n  ResponseStyle,\n  TDataShape,\n} from './types.gen';\nexport { createConfig, mergeHeaders } from './utils.gen';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/security-open-id-connect/client/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { Auth } from '../core/auth.gen';\nimport type {\n  ServerSentEventsOptions,\n  ServerSentEventsResult,\n} from '../core/serverSentEvents.gen';\nimport type { Client as CoreClient, Config as CoreConfig } from '../core/types.gen';\nimport type { Middleware } from './utils.gen';\n\nexport type ResponseStyle = 'data' | 'fields';\n\nexport interface Config<T extends ClientOptions = ClientOptions>\n  extends Omit<RequestInit, 'body' | 'headers' | 'method'>, CoreConfig {\n  /**\n   * Base URL for all requests made by this client.\n   */\n  baseUrl?: T['baseUrl'];\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   * Please don't use the Fetch client for Next.js applications. The `next`\n   * options won't have any effect.\n   *\n   * Install {@link https://www.npmjs.com/package/@hey-api/client-next `@hey-api/client-next`} instead.\n   */\n  next?: never;\n  /**\n   * Return the response data parsed in a specified format. By default, `auto`\n   * will infer the appropriate method from the `Content-Type` response header.\n   * You can override this behavior with any of the {@link Body} methods.\n   * Select `stream` if you don't want to parse response data at all.\n   *\n   * @default 'auto'\n   */\n  parseAs?: 'arrayBuffer' | 'auto' | 'blob' | 'formData' | 'json' | 'stream' | 'text';\n  /**\n   * Should we return only data or multiple fields (data, error, response, etc.)?\n   *\n   * @default 'fields'\n   */\n  responseStyle?: ResponseStyle;\n  /**\n   * Throw an error instead of returning it in the response?\n   *\n   * @default false\n   */\n  throwOnError?: T['throwOnError'];\n}\n\nexport interface RequestOptions<\n  TData = unknown,\n  TResponseStyle extends ResponseStyle = 'fields',\n  ThrowOnError extends boolean = boolean,\n  Url extends string = string,\n>\n  extends\n    Config<{\n      responseStyle: TResponseStyle;\n      throwOnError: ThrowOnError;\n    }>,\n    Pick<\n      ServerSentEventsOptions<TData>,\n      | 'onRequest'\n      | 'onSseError'\n      | 'onSseEvent'\n      | 'sseDefaultRetryDelay'\n      | 'sseMaxRetryAttempts'\n      | 'sseMaxRetryDelay'\n    > {\n  /**\n   * Any body that you want to add to your request.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/fetch#body}\n   */\n  body?: unknown;\n  path?: Record<string, unknown>;\n  query?: Record<string, unknown>;\n  /**\n   * Security mechanism(s) to use for the request.\n   */\n  security?: ReadonlyArray<Auth>;\n  url: Url;\n}\n\nexport interface ResolvedRequestOptions<\n  TResponseStyle extends ResponseStyle = 'fields',\n  ThrowOnError extends boolean = boolean,\n  Url extends string = string,\n> extends RequestOptions<unknown, TResponseStyle, ThrowOnError, Url> {\n  serializedBody?: string;\n}\n\nexport type RequestResult<\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = boolean,\n  TResponseStyle extends ResponseStyle = 'fields',\n> = ThrowOnError extends true\n  ? Promise<\n      TResponseStyle extends 'data'\n        ? TData extends Record<string, unknown>\n          ? TData[keyof TData]\n          : TData\n        : {\n            data: TData extends Record<string, unknown> ? TData[keyof TData] : TData;\n            request: Request;\n            response: Response;\n          }\n    >\n  : Promise<\n      TResponseStyle extends 'data'\n        ? (TData extends Record<string, unknown> ? TData[keyof TData] : TData) | undefined\n        : (\n            | {\n                data: TData extends Record<string, unknown> ? TData[keyof TData] : TData;\n                error: undefined;\n              }\n            | {\n                data: undefined;\n                error: TError extends Record<string, unknown> ? TError[keyof TError] : TError;\n              }\n          ) & {\n            request: Request;\n            response: Response;\n          }\n    >;\n\nexport interface ClientOptions {\n  baseUrl?: string;\n  responseStyle?: ResponseStyle;\n  throwOnError?: boolean;\n}\n\ntype MethodFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'>,\n) => RequestResult<TData, TError, ThrowOnError, TResponseStyle>;\n\ntype SseFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'>,\n) => Promise<ServerSentEventsResult<TData, TError>>;\n\ntype RequestFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'> &\n    Pick<Required<RequestOptions<TData, TResponseStyle, ThrowOnError>>, 'method'>,\n) => RequestResult<TData, TError, ThrowOnError, TResponseStyle>;\n\ntype BuildUrlFn = <\n  TData extends {\n    body?: unknown;\n    path?: Record<string, unknown>;\n    query?: Record<string, unknown>;\n    url: string;\n  },\n>(\n  options: TData & Options<TData>,\n) => string;\n\nexport type Client = CoreClient<RequestFn, Config, MethodFn, BuildUrlFn, SseFn> & {\n  interceptors: Middleware<Request, Response, unknown, ResolvedRequestOptions>;\n};\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 = ClientOptions> = (\n  override?: Config<ClientOptions & T>,\n) => Config<Required<ClientOptions> & T>;\n\nexport interface TDataShape {\n  body?: unknown;\n  headers?: unknown;\n  path?: unknown;\n  query?: unknown;\n  url: string;\n}\n\ntype OmitKeys<T, K> = Pick<T, Exclude<keyof T, K>>;\n\nexport type Options<\n  TData extends TDataShape = TDataShape,\n  ThrowOnError extends boolean = boolean,\n  TResponse = unknown,\n  TResponseStyle extends ResponseStyle = 'fields',\n> = OmitKeys<\n  RequestOptions<TResponse, TResponseStyle, ThrowOnError>,\n  'body' | 'path' | 'query' | 'url'\n> &\n  ([TData] extends [never] ? unknown : Omit<TData, 'url'>);\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/security-open-id-connect/client/utils.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/security-open-id-connect/client.gen.ts",
    "content": "// 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>());\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/security-open-id-connect/core/auth.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/security-open-id-connect/core/bodySerializer.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/security-open-id-connect/core/params.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/security-open-id-connect/core/pathSerializer.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/security-open-id-connect/core/queryKeySerializer.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\n/**\n * JSON-friendly union that mirrors what Pinia Colada can hash.\n */\nexport type JsonValue =\n  | null\n  | string\n  | number\n  | boolean\n  | JsonValue[]\n  | { [key: string]: JsonValue };\n\n/**\n * Replacer that converts non-JSON values (bigint, Date, etc.) to safe substitutes.\n */\nexport const queryKeyJsonReplacer = (_key: string, value: unknown) => {\n  if (value === undefined || typeof value === 'function' || typeof value === 'symbol') {\n    return undefined;\n  }\n  if (typeof value === 'bigint') {\n    return value.toString();\n  }\n  if (value instanceof Date) {\n    return value.toISOString();\n  }\n  return value;\n};\n\n/**\n * Safely stringifies a value and parses it back into a JsonValue.\n */\nexport const stringifyToJsonValue = (input: unknown): JsonValue | undefined => {\n  try {\n    const json = JSON.stringify(input, queryKeyJsonReplacer);\n    if (json === undefined) {\n      return undefined;\n    }\n    return JSON.parse(json) as JsonValue;\n  } catch {\n    return undefined;\n  }\n};\n\n/**\n * Detects plain objects (including objects with a null prototype).\n */\nconst isPlainObject = (value: unknown): value is Record<string, unknown> => {\n  if (value === null || typeof value !== 'object') {\n    return false;\n  }\n  const prototype = Object.getPrototypeOf(value as object);\n  return prototype === Object.prototype || prototype === null;\n};\n\n/**\n * Turns URLSearchParams into a sorted JSON object for deterministic keys.\n */\nconst serializeSearchParams = (params: URLSearchParams): JsonValue => {\n  const entries = Array.from(params.entries()).sort(([a], [b]) => a.localeCompare(b));\n  const result: Record<string, JsonValue> = {};\n\n  for (const [key, value] of entries) {\n    const existing = result[key];\n    if (existing === undefined) {\n      result[key] = value;\n      continue;\n    }\n\n    if (Array.isArray(existing)) {\n      (existing as string[]).push(value);\n    } else {\n      result[key] = [existing, value];\n    }\n  }\n\n  return result;\n};\n\n/**\n * Normalizes any accepted value into a JSON-friendly shape for query keys.\n */\nexport const serializeQueryKeyValue = (value: unknown): JsonValue | undefined => {\n  if (value === null) {\n    return null;\n  }\n\n  if (typeof value === 'string' || typeof value === 'number' || typeof value === 'boolean') {\n    return value;\n  }\n\n  if (value === undefined || typeof value === 'function' || typeof value === 'symbol') {\n    return undefined;\n  }\n\n  if (typeof value === 'bigint') {\n    return value.toString();\n  }\n\n  if (value instanceof Date) {\n    return value.toISOString();\n  }\n\n  if (Array.isArray(value)) {\n    return stringifyToJsonValue(value);\n  }\n\n  if (typeof URLSearchParams !== 'undefined' && value instanceof URLSearchParams) {\n    return serializeSearchParams(value);\n  }\n\n  if (isPlainObject(value)) {\n    return stringifyToJsonValue(value);\n  }\n\n  return undefined;\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/security-open-id-connect/core/serverSentEvents.gen.ts",
    "content": "// 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 const 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            // Normalize line endings: CRLF -> LF, then CR -> LF\n            buffer = buffer.replace(/\\r\\n/g, '\\n').replace(/\\r/g, '\\n');\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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/security-open-id-connect/core/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { Auth, AuthToken } from './auth.gen';\nimport type { BodySerializer, QuerySerializer, QuerySerializerOptions } from './bodySerializer.gen';\n\nexport type HttpMethod =\n  | 'connect'\n  | 'delete'\n  | 'get'\n  | 'head'\n  | 'options'\n  | 'patch'\n  | 'post'\n  | 'put'\n  | 'trace';\n\nexport type Client<\n  RequestFn = never,\n  Config = unknown,\n  MethodFn = never,\n  BuildUrlFn = never,\n  SseFn = never,\n> = {\n  /**\n   * Returns the final request URL.\n   */\n  buildUrl: BuildUrlFn;\n  getConfig: () => Config;\n  request: RequestFn;\n  setConfig: (config: Config) => Config;\n} & {\n  [K in HttpMethod]: MethodFn;\n} & ([SseFn] extends [never] ? { sse?: never } : { sse: { [K in HttpMethod]: SseFn } });\n\nexport interface Config {\n  /**\n   * Auth token or a function returning auth token. The resolved value will be\n   * added to the request payload as defined by its `security` array.\n   */\n  auth?: ((auth: Auth) => Promise<AuthToken> | AuthToken) | AuthToken;\n  /**\n   * A function for serializing request body parameter. By default,\n   * {@link JSON.stringify()} will be used.\n   */\n  bodySerializer?: BodySerializer | null;\n  /**\n   * An object containing any HTTP headers that you want to pre-populate your\n   * `Headers` object with.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/Headers/Headers#init See more}\n   */\n  headers?:\n    | RequestInit['headers']\n    | Record<\n        string,\n        string | number | boolean | (string | number | boolean)[] | null | undefined | unknown\n      >;\n  /**\n   * The request method.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/fetch#method See more}\n   */\n  method?: Uppercase<HttpMethod>;\n  /**\n   * A function for serializing request query parameters. By default, arrays\n   * will be exploded in form style, objects will be exploded in deepObject\n   * style, and reserved characters are percent-encoded.\n   *\n   * This method will have no effect if the native `paramsSerializer()` Axios\n   * API function is used.\n   *\n   * {@link https://swagger.io/docs/specification/serialization/#query View examples}\n   */\n  querySerializer?: QuerySerializer | QuerySerializerOptions;\n  /**\n   * A function validating request data. This is useful if you want to ensure\n   * the request conforms to the desired shape, so it can be safely sent to\n   * the server.\n   */\n  requestValidator?: (data: unknown) => Promise<unknown>;\n  /**\n   * A function transforming response data before it's returned. This is useful\n   * for post-processing data, e.g. converting ISO strings into Date objects.\n   */\n  responseTransformer?: (data: unknown) => Promise<unknown>;\n  /**\n   * A function validating response data. This is useful if you want to ensure\n   * the response conforms to the desired shape, so it can be safely passed to\n   * the transformers and returned to the user.\n   */\n  responseValidator?: (data: unknown) => Promise<unknown>;\n}\n\ntype IsExactlyNeverOrNeverUndefined<T> = [T] extends [never]\n  ? true\n  : [T] extends [never | undefined]\n    ? [undefined] extends [T]\n      ? false\n      : true\n    : false;\n\nexport type OmitNever<T extends Record<string, unknown>> = {\n  [K in keyof T as IsExactlyNeverOrNeverUndefined<T[K]> extends true ? never : K]: T[K];\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/security-open-id-connect/core/utils.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/security-open-id-connect/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport { getFoo, type Options } from './sdk.gen';\nexport type { ClientOptions, GetFooData, GetFooResponses } from './types.gen';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/security-open-id-connect/sdk.gen.ts",
    "content": "// 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 { GetFooData, GetFooResponses } from './types.gen';\n\nexport type Options<TData extends TDataShape = TDataShape, ThrowOnError extends boolean = boolean> = Options2<TData, ThrowOnError> & {\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\nexport const getFoo = <ThrowOnError extends boolean = false>(options?: Options<GetFooData, ThrowOnError>) => (options?.client ?? client).get<GetFooResponses, unknown, ThrowOnError>({\n    security: [{ scheme: 'bearer', type: 'http' }],\n    url: '/foo',\n    ...options\n});\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/security-open-id-connect/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type ClientOptions = {\n    baseUrl: `${string}://${string}` | (string & {});\n};\n\nexport type GetFooData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/foo';\n};\n\nexport type GetFooResponses = {\n    /**\n     * OK\n     */\n    200: unknown;\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/servers/client/client.gen.ts",
    "content": "// 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 (options: RequestOptions) => {\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 url = buildUrl(opts);\n\n    return { opts, url };\n  };\n\n  const request: Client['request'] = async (options) => {\n    // @ts-expect-error\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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/servers/client/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type { Auth } from '../core/auth.gen';\nexport type { QuerySerializerOptions } from '../core/bodySerializer.gen';\nexport {\n  formDataBodySerializer,\n  jsonBodySerializer,\n  urlSearchParamsBodySerializer,\n} from '../core/bodySerializer.gen';\nexport { buildClientParams } from '../core/params.gen';\nexport { serializeQueryKeyValue } from '../core/queryKeySerializer.gen';\nexport { createClient } from './client.gen';\nexport type {\n  Client,\n  ClientOptions,\n  Config,\n  CreateClientConfig,\n  Options,\n  RequestOptions,\n  RequestResult,\n  ResolvedRequestOptions,\n  ResponseStyle,\n  TDataShape,\n} from './types.gen';\nexport { createConfig, mergeHeaders } from './utils.gen';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/servers/client/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { Auth } from '../core/auth.gen';\nimport type {\n  ServerSentEventsOptions,\n  ServerSentEventsResult,\n} from '../core/serverSentEvents.gen';\nimport type { Client as CoreClient, Config as CoreConfig } from '../core/types.gen';\nimport type { Middleware } from './utils.gen';\n\nexport type ResponseStyle = 'data' | 'fields';\n\nexport interface Config<T extends ClientOptions = ClientOptions>\n  extends Omit<RequestInit, 'body' | 'headers' | 'method'>, CoreConfig {\n  /**\n   * Base URL for all requests made by this client.\n   */\n  baseUrl?: T['baseUrl'];\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   * Please don't use the Fetch client for Next.js applications. The `next`\n   * options won't have any effect.\n   *\n   * Install {@link https://www.npmjs.com/package/@hey-api/client-next `@hey-api/client-next`} instead.\n   */\n  next?: never;\n  /**\n   * Return the response data parsed in a specified format. By default, `auto`\n   * will infer the appropriate method from the `Content-Type` response header.\n   * You can override this behavior with any of the {@link Body} methods.\n   * Select `stream` if you don't want to parse response data at all.\n   *\n   * @default 'auto'\n   */\n  parseAs?: 'arrayBuffer' | 'auto' | 'blob' | 'formData' | 'json' | 'stream' | 'text';\n  /**\n   * Should we return only data or multiple fields (data, error, response, etc.)?\n   *\n   * @default 'fields'\n   */\n  responseStyle?: ResponseStyle;\n  /**\n   * Throw an error instead of returning it in the response?\n   *\n   * @default false\n   */\n  throwOnError?: T['throwOnError'];\n}\n\nexport interface RequestOptions<\n  TData = unknown,\n  TResponseStyle extends ResponseStyle = 'fields',\n  ThrowOnError extends boolean = boolean,\n  Url extends string = string,\n>\n  extends\n    Config<{\n      responseStyle: TResponseStyle;\n      throwOnError: ThrowOnError;\n    }>,\n    Pick<\n      ServerSentEventsOptions<TData>,\n      | 'onRequest'\n      | 'onSseError'\n      | 'onSseEvent'\n      | 'sseDefaultRetryDelay'\n      | 'sseMaxRetryAttempts'\n      | 'sseMaxRetryDelay'\n    > {\n  /**\n   * Any body that you want to add to your request.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/fetch#body}\n   */\n  body?: unknown;\n  path?: Record<string, unknown>;\n  query?: Record<string, unknown>;\n  /**\n   * Security mechanism(s) to use for the request.\n   */\n  security?: ReadonlyArray<Auth>;\n  url: Url;\n}\n\nexport interface ResolvedRequestOptions<\n  TResponseStyle extends ResponseStyle = 'fields',\n  ThrowOnError extends boolean = boolean,\n  Url extends string = string,\n> extends RequestOptions<unknown, TResponseStyle, ThrowOnError, Url> {\n  serializedBody?: string;\n}\n\nexport type RequestResult<\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = boolean,\n  TResponseStyle extends ResponseStyle = 'fields',\n> = ThrowOnError extends true\n  ? Promise<\n      TResponseStyle extends 'data'\n        ? TData extends Record<string, unknown>\n          ? TData[keyof TData]\n          : TData\n        : {\n            data: TData extends Record<string, unknown> ? TData[keyof TData] : TData;\n            request: Request;\n            response: Response;\n          }\n    >\n  : Promise<\n      TResponseStyle extends 'data'\n        ? (TData extends Record<string, unknown> ? TData[keyof TData] : TData) | undefined\n        : (\n            | {\n                data: TData extends Record<string, unknown> ? TData[keyof TData] : TData;\n                error: undefined;\n              }\n            | {\n                data: undefined;\n                error: TError extends Record<string, unknown> ? TError[keyof TError] : TError;\n              }\n          ) & {\n            request: Request;\n            response: Response;\n          }\n    >;\n\nexport interface ClientOptions {\n  baseUrl?: string;\n  responseStyle?: ResponseStyle;\n  throwOnError?: boolean;\n}\n\ntype MethodFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'>,\n) => RequestResult<TData, TError, ThrowOnError, TResponseStyle>;\n\ntype SseFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'>,\n) => Promise<ServerSentEventsResult<TData, TError>>;\n\ntype RequestFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'> &\n    Pick<Required<RequestOptions<TData, TResponseStyle, ThrowOnError>>, 'method'>,\n) => RequestResult<TData, TError, ThrowOnError, TResponseStyle>;\n\ntype BuildUrlFn = <\n  TData extends {\n    body?: unknown;\n    path?: Record<string, unknown>;\n    query?: Record<string, unknown>;\n    url: string;\n  },\n>(\n  options: TData & Options<TData>,\n) => string;\n\nexport type Client = CoreClient<RequestFn, Config, MethodFn, BuildUrlFn, SseFn> & {\n  interceptors: Middleware<Request, Response, unknown, ResolvedRequestOptions>;\n};\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 = ClientOptions> = (\n  override?: Config<ClientOptions & T>,\n) => Config<Required<ClientOptions> & T>;\n\nexport interface TDataShape {\n  body?: unknown;\n  headers?: unknown;\n  path?: unknown;\n  query?: unknown;\n  url: string;\n}\n\ntype OmitKeys<T, K> = Pick<T, Exclude<keyof T, K>>;\n\nexport type Options<\n  TData extends TDataShape = TDataShape,\n  ThrowOnError extends boolean = boolean,\n  TResponse = unknown,\n  TResponseStyle extends ResponseStyle = 'fields',\n> = OmitKeys<\n  RequestOptions<TResponse, TResponseStyle, ThrowOnError>,\n  'body' | 'path' | 'query' | 'url'\n> &\n  ([TData] extends [never] ? unknown : Omit<TData, 'url'>);\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/servers/client/utils.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/servers/client.gen.ts",
    "content": "// 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://foo.com/v1' }));\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/servers/core/auth.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/servers/core/bodySerializer.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/servers/core/params.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/servers/core/pathSerializer.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/servers/core/queryKeySerializer.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\n/**\n * JSON-friendly union that mirrors what Pinia Colada can hash.\n */\nexport type JsonValue =\n  | null\n  | string\n  | number\n  | boolean\n  | JsonValue[]\n  | { [key: string]: JsonValue };\n\n/**\n * Replacer that converts non-JSON values (bigint, Date, etc.) to safe substitutes.\n */\nexport const queryKeyJsonReplacer = (_key: string, value: unknown) => {\n  if (value === undefined || typeof value === 'function' || typeof value === 'symbol') {\n    return undefined;\n  }\n  if (typeof value === 'bigint') {\n    return value.toString();\n  }\n  if (value instanceof Date) {\n    return value.toISOString();\n  }\n  return value;\n};\n\n/**\n * Safely stringifies a value and parses it back into a JsonValue.\n */\nexport const stringifyToJsonValue = (input: unknown): JsonValue | undefined => {\n  try {\n    const json = JSON.stringify(input, queryKeyJsonReplacer);\n    if (json === undefined) {\n      return undefined;\n    }\n    return JSON.parse(json) as JsonValue;\n  } catch {\n    return undefined;\n  }\n};\n\n/**\n * Detects plain objects (including objects with a null prototype).\n */\nconst isPlainObject = (value: unknown): value is Record<string, unknown> => {\n  if (value === null || typeof value !== 'object') {\n    return false;\n  }\n  const prototype = Object.getPrototypeOf(value as object);\n  return prototype === Object.prototype || prototype === null;\n};\n\n/**\n * Turns URLSearchParams into a sorted JSON object for deterministic keys.\n */\nconst serializeSearchParams = (params: URLSearchParams): JsonValue => {\n  const entries = Array.from(params.entries()).sort(([a], [b]) => a.localeCompare(b));\n  const result: Record<string, JsonValue> = {};\n\n  for (const [key, value] of entries) {\n    const existing = result[key];\n    if (existing === undefined) {\n      result[key] = value;\n      continue;\n    }\n\n    if (Array.isArray(existing)) {\n      (existing as string[]).push(value);\n    } else {\n      result[key] = [existing, value];\n    }\n  }\n\n  return result;\n};\n\n/**\n * Normalizes any accepted value into a JSON-friendly shape for query keys.\n */\nexport const serializeQueryKeyValue = (value: unknown): JsonValue | undefined => {\n  if (value === null) {\n    return null;\n  }\n\n  if (typeof value === 'string' || typeof value === 'number' || typeof value === 'boolean') {\n    return value;\n  }\n\n  if (value === undefined || typeof value === 'function' || typeof value === 'symbol') {\n    return undefined;\n  }\n\n  if (typeof value === 'bigint') {\n    return value.toString();\n  }\n\n  if (value instanceof Date) {\n    return value.toISOString();\n  }\n\n  if (Array.isArray(value)) {\n    return stringifyToJsonValue(value);\n  }\n\n  if (typeof URLSearchParams !== 'undefined' && value instanceof URLSearchParams) {\n    return serializeSearchParams(value);\n  }\n\n  if (isPlainObject(value)) {\n    return stringifyToJsonValue(value);\n  }\n\n  return undefined;\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/servers/core/serverSentEvents.gen.ts",
    "content": "// 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 const 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            // Normalize line endings: CRLF -> LF, then CR -> LF\n            buffer = buffer.replace(/\\r\\n/g, '\\n').replace(/\\r/g, '\\n');\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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/servers/core/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { Auth, AuthToken } from './auth.gen';\nimport type { BodySerializer, QuerySerializer, QuerySerializerOptions } from './bodySerializer.gen';\n\nexport type HttpMethod =\n  | 'connect'\n  | 'delete'\n  | 'get'\n  | 'head'\n  | 'options'\n  | 'patch'\n  | 'post'\n  | 'put'\n  | 'trace';\n\nexport type Client<\n  RequestFn = never,\n  Config = unknown,\n  MethodFn = never,\n  BuildUrlFn = never,\n  SseFn = never,\n> = {\n  /**\n   * Returns the final request URL.\n   */\n  buildUrl: BuildUrlFn;\n  getConfig: () => Config;\n  request: RequestFn;\n  setConfig: (config: Config) => Config;\n} & {\n  [K in HttpMethod]: MethodFn;\n} & ([SseFn] extends [never] ? { sse?: never } : { sse: { [K in HttpMethod]: SseFn } });\n\nexport interface Config {\n  /**\n   * Auth token or a function returning auth token. The resolved value will be\n   * added to the request payload as defined by its `security` array.\n   */\n  auth?: ((auth: Auth) => Promise<AuthToken> | AuthToken) | AuthToken;\n  /**\n   * A function for serializing request body parameter. By default,\n   * {@link JSON.stringify()} will be used.\n   */\n  bodySerializer?: BodySerializer | null;\n  /**\n   * An object containing any HTTP headers that you want to pre-populate your\n   * `Headers` object with.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/Headers/Headers#init See more}\n   */\n  headers?:\n    | RequestInit['headers']\n    | Record<\n        string,\n        string | number | boolean | (string | number | boolean)[] | null | undefined | unknown\n      >;\n  /**\n   * The request method.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/fetch#method See more}\n   */\n  method?: Uppercase<HttpMethod>;\n  /**\n   * A function for serializing request query parameters. By default, arrays\n   * will be exploded in form style, objects will be exploded in deepObject\n   * style, and reserved characters are percent-encoded.\n   *\n   * This method will have no effect if the native `paramsSerializer()` Axios\n   * API function is used.\n   *\n   * {@link https://swagger.io/docs/specification/serialization/#query View examples}\n   */\n  querySerializer?: QuerySerializer | QuerySerializerOptions;\n  /**\n   * A function validating request data. This is useful if you want to ensure\n   * the request conforms to the desired shape, so it can be safely sent to\n   * the server.\n   */\n  requestValidator?: (data: unknown) => Promise<unknown>;\n  /**\n   * A function transforming response data before it's returned. This is useful\n   * for post-processing data, e.g. converting ISO strings into Date objects.\n   */\n  responseTransformer?: (data: unknown) => Promise<unknown>;\n  /**\n   * A function validating response data. This is useful if you want to ensure\n   * the response conforms to the desired shape, so it can be safely passed to\n   * the transformers and returned to the user.\n   */\n  responseValidator?: (data: unknown) => Promise<unknown>;\n}\n\ntype IsExactlyNeverOrNeverUndefined<T> = [T] extends [never]\n  ? true\n  : [T] extends [never | undefined]\n    ? [undefined] extends [T]\n      ? false\n      : true\n    : false;\n\nexport type OmitNever<T extends Record<string, unknown>> = {\n  [K in keyof T as IsExactlyNeverOrNeverUndefined<T[K]> extends true ? never : K]: T[K];\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/servers/core/utils.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/servers/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type { ClientOptions, GetFooData, GetFooResponse, GetFooResponses } from './types.gen';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/servers/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type ClientOptions = {\n    baseUrl: 'https://foo.com/v1' | `${string}://${string}/v1` | (string & {});\n};\n\nexport type GetFooData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/foo';\n};\n\nexport type GetFooResponses = {\n    /**\n     * OK\n     */\n    200: string;\n};\n\nexport type GetFooResponse = GetFooResponses[keyof GetFooResponses];\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/transformers-all-of/client/client.gen.ts",
    "content": "// 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 (options: RequestOptions) => {\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 url = buildUrl(opts);\n\n    return { opts, url };\n  };\n\n  const request: Client['request'] = async (options) => {\n    // @ts-expect-error\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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/transformers-all-of/client/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type { Auth } from '../core/auth.gen';\nexport type { QuerySerializerOptions } from '../core/bodySerializer.gen';\nexport {\n  formDataBodySerializer,\n  jsonBodySerializer,\n  urlSearchParamsBodySerializer,\n} from '../core/bodySerializer.gen';\nexport { buildClientParams } from '../core/params.gen';\nexport { serializeQueryKeyValue } from '../core/queryKeySerializer.gen';\nexport { createClient } from './client.gen';\nexport type {\n  Client,\n  ClientOptions,\n  Config,\n  CreateClientConfig,\n  Options,\n  RequestOptions,\n  RequestResult,\n  ResolvedRequestOptions,\n  ResponseStyle,\n  TDataShape,\n} from './types.gen';\nexport { createConfig, mergeHeaders } from './utils.gen';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/transformers-all-of/client/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { Auth } from '../core/auth.gen';\nimport type {\n  ServerSentEventsOptions,\n  ServerSentEventsResult,\n} from '../core/serverSentEvents.gen';\nimport type { Client as CoreClient, Config as CoreConfig } from '../core/types.gen';\nimport type { Middleware } from './utils.gen';\n\nexport type ResponseStyle = 'data' | 'fields';\n\nexport interface Config<T extends ClientOptions = ClientOptions>\n  extends Omit<RequestInit, 'body' | 'headers' | 'method'>, CoreConfig {\n  /**\n   * Base URL for all requests made by this client.\n   */\n  baseUrl?: T['baseUrl'];\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   * Please don't use the Fetch client for Next.js applications. The `next`\n   * options won't have any effect.\n   *\n   * Install {@link https://www.npmjs.com/package/@hey-api/client-next `@hey-api/client-next`} instead.\n   */\n  next?: never;\n  /**\n   * Return the response data parsed in a specified format. By default, `auto`\n   * will infer the appropriate method from the `Content-Type` response header.\n   * You can override this behavior with any of the {@link Body} methods.\n   * Select `stream` if you don't want to parse response data at all.\n   *\n   * @default 'auto'\n   */\n  parseAs?: 'arrayBuffer' | 'auto' | 'blob' | 'formData' | 'json' | 'stream' | 'text';\n  /**\n   * Should we return only data or multiple fields (data, error, response, etc.)?\n   *\n   * @default 'fields'\n   */\n  responseStyle?: ResponseStyle;\n  /**\n   * Throw an error instead of returning it in the response?\n   *\n   * @default false\n   */\n  throwOnError?: T['throwOnError'];\n}\n\nexport interface RequestOptions<\n  TData = unknown,\n  TResponseStyle extends ResponseStyle = 'fields',\n  ThrowOnError extends boolean = boolean,\n  Url extends string = string,\n>\n  extends\n    Config<{\n      responseStyle: TResponseStyle;\n      throwOnError: ThrowOnError;\n    }>,\n    Pick<\n      ServerSentEventsOptions<TData>,\n      | 'onRequest'\n      | 'onSseError'\n      | 'onSseEvent'\n      | 'sseDefaultRetryDelay'\n      | 'sseMaxRetryAttempts'\n      | 'sseMaxRetryDelay'\n    > {\n  /**\n   * Any body that you want to add to your request.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/fetch#body}\n   */\n  body?: unknown;\n  path?: Record<string, unknown>;\n  query?: Record<string, unknown>;\n  /**\n   * Security mechanism(s) to use for the request.\n   */\n  security?: ReadonlyArray<Auth>;\n  url: Url;\n}\n\nexport interface ResolvedRequestOptions<\n  TResponseStyle extends ResponseStyle = 'fields',\n  ThrowOnError extends boolean = boolean,\n  Url extends string = string,\n> extends RequestOptions<unknown, TResponseStyle, ThrowOnError, Url> {\n  serializedBody?: string;\n}\n\nexport type RequestResult<\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = boolean,\n  TResponseStyle extends ResponseStyle = 'fields',\n> = ThrowOnError extends true\n  ? Promise<\n      TResponseStyle extends 'data'\n        ? TData extends Record<string, unknown>\n          ? TData[keyof TData]\n          : TData\n        : {\n            data: TData extends Record<string, unknown> ? TData[keyof TData] : TData;\n            request: Request;\n            response: Response;\n          }\n    >\n  : Promise<\n      TResponseStyle extends 'data'\n        ? (TData extends Record<string, unknown> ? TData[keyof TData] : TData) | undefined\n        : (\n            | {\n                data: TData extends Record<string, unknown> ? TData[keyof TData] : TData;\n                error: undefined;\n              }\n            | {\n                data: undefined;\n                error: TError extends Record<string, unknown> ? TError[keyof TError] : TError;\n              }\n          ) & {\n            request: Request;\n            response: Response;\n          }\n    >;\n\nexport interface ClientOptions {\n  baseUrl?: string;\n  responseStyle?: ResponseStyle;\n  throwOnError?: boolean;\n}\n\ntype MethodFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'>,\n) => RequestResult<TData, TError, ThrowOnError, TResponseStyle>;\n\ntype SseFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'>,\n) => Promise<ServerSentEventsResult<TData, TError>>;\n\ntype RequestFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'> &\n    Pick<Required<RequestOptions<TData, TResponseStyle, ThrowOnError>>, 'method'>,\n) => RequestResult<TData, TError, ThrowOnError, TResponseStyle>;\n\ntype BuildUrlFn = <\n  TData extends {\n    body?: unknown;\n    path?: Record<string, unknown>;\n    query?: Record<string, unknown>;\n    url: string;\n  },\n>(\n  options: TData & Options<TData>,\n) => string;\n\nexport type Client = CoreClient<RequestFn, Config, MethodFn, BuildUrlFn, SseFn> & {\n  interceptors: Middleware<Request, Response, unknown, ResolvedRequestOptions>;\n};\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 = ClientOptions> = (\n  override?: Config<ClientOptions & T>,\n) => Config<Required<ClientOptions> & T>;\n\nexport interface TDataShape {\n  body?: unknown;\n  headers?: unknown;\n  path?: unknown;\n  query?: unknown;\n  url: string;\n}\n\ntype OmitKeys<T, K> = Pick<T, Exclude<keyof T, K>>;\n\nexport type Options<\n  TData extends TDataShape = TDataShape,\n  ThrowOnError extends boolean = boolean,\n  TResponse = unknown,\n  TResponseStyle extends ResponseStyle = 'fields',\n> = OmitKeys<\n  RequestOptions<TResponse, TResponseStyle, ThrowOnError>,\n  'body' | 'path' | 'query' | 'url'\n> &\n  ([TData] extends [never] ? unknown : Omit<TData, 'url'>);\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/transformers-all-of/client/utils.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/transformers-all-of/client.gen.ts",
    "content": "// 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>());\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/transformers-all-of/core/auth.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/transformers-all-of/core/bodySerializer.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/transformers-all-of/core/params.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/transformers-all-of/core/pathSerializer.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/transformers-all-of/core/queryKeySerializer.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\n/**\n * JSON-friendly union that mirrors what Pinia Colada can hash.\n */\nexport type JsonValue =\n  | null\n  | string\n  | number\n  | boolean\n  | JsonValue[]\n  | { [key: string]: JsonValue };\n\n/**\n * Replacer that converts non-JSON values (bigint, Date, etc.) to safe substitutes.\n */\nexport const queryKeyJsonReplacer = (_key: string, value: unknown) => {\n  if (value === undefined || typeof value === 'function' || typeof value === 'symbol') {\n    return undefined;\n  }\n  if (typeof value === 'bigint') {\n    return value.toString();\n  }\n  if (value instanceof Date) {\n    return value.toISOString();\n  }\n  return value;\n};\n\n/**\n * Safely stringifies a value and parses it back into a JsonValue.\n */\nexport const stringifyToJsonValue = (input: unknown): JsonValue | undefined => {\n  try {\n    const json = JSON.stringify(input, queryKeyJsonReplacer);\n    if (json === undefined) {\n      return undefined;\n    }\n    return JSON.parse(json) as JsonValue;\n  } catch {\n    return undefined;\n  }\n};\n\n/**\n * Detects plain objects (including objects with a null prototype).\n */\nconst isPlainObject = (value: unknown): value is Record<string, unknown> => {\n  if (value === null || typeof value !== 'object') {\n    return false;\n  }\n  const prototype = Object.getPrototypeOf(value as object);\n  return prototype === Object.prototype || prototype === null;\n};\n\n/**\n * Turns URLSearchParams into a sorted JSON object for deterministic keys.\n */\nconst serializeSearchParams = (params: URLSearchParams): JsonValue => {\n  const entries = Array.from(params.entries()).sort(([a], [b]) => a.localeCompare(b));\n  const result: Record<string, JsonValue> = {};\n\n  for (const [key, value] of entries) {\n    const existing = result[key];\n    if (existing === undefined) {\n      result[key] = value;\n      continue;\n    }\n\n    if (Array.isArray(existing)) {\n      (existing as string[]).push(value);\n    } else {\n      result[key] = [existing, value];\n    }\n  }\n\n  return result;\n};\n\n/**\n * Normalizes any accepted value into a JSON-friendly shape for query keys.\n */\nexport const serializeQueryKeyValue = (value: unknown): JsonValue | undefined => {\n  if (value === null) {\n    return null;\n  }\n\n  if (typeof value === 'string' || typeof value === 'number' || typeof value === 'boolean') {\n    return value;\n  }\n\n  if (value === undefined || typeof value === 'function' || typeof value === 'symbol') {\n    return undefined;\n  }\n\n  if (typeof value === 'bigint') {\n    return value.toString();\n  }\n\n  if (value instanceof Date) {\n    return value.toISOString();\n  }\n\n  if (Array.isArray(value)) {\n    return stringifyToJsonValue(value);\n  }\n\n  if (typeof URLSearchParams !== 'undefined' && value instanceof URLSearchParams) {\n    return serializeSearchParams(value);\n  }\n\n  if (isPlainObject(value)) {\n    return stringifyToJsonValue(value);\n  }\n\n  return undefined;\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/transformers-all-of/core/serverSentEvents.gen.ts",
    "content": "// 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 const 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            // Normalize line endings: CRLF -> LF, then CR -> LF\n            buffer = buffer.replace(/\\r\\n/g, '\\n').replace(/\\r/g, '\\n');\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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/transformers-all-of/core/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { Auth, AuthToken } from './auth.gen';\nimport type { BodySerializer, QuerySerializer, QuerySerializerOptions } from './bodySerializer.gen';\n\nexport type HttpMethod =\n  | 'connect'\n  | 'delete'\n  | 'get'\n  | 'head'\n  | 'options'\n  | 'patch'\n  | 'post'\n  | 'put'\n  | 'trace';\n\nexport type Client<\n  RequestFn = never,\n  Config = unknown,\n  MethodFn = never,\n  BuildUrlFn = never,\n  SseFn = never,\n> = {\n  /**\n   * Returns the final request URL.\n   */\n  buildUrl: BuildUrlFn;\n  getConfig: () => Config;\n  request: RequestFn;\n  setConfig: (config: Config) => Config;\n} & {\n  [K in HttpMethod]: MethodFn;\n} & ([SseFn] extends [never] ? { sse?: never } : { sse: { [K in HttpMethod]: SseFn } });\n\nexport interface Config {\n  /**\n   * Auth token or a function returning auth token. The resolved value will be\n   * added to the request payload as defined by its `security` array.\n   */\n  auth?: ((auth: Auth) => Promise<AuthToken> | AuthToken) | AuthToken;\n  /**\n   * A function for serializing request body parameter. By default,\n   * {@link JSON.stringify()} will be used.\n   */\n  bodySerializer?: BodySerializer | null;\n  /**\n   * An object containing any HTTP headers that you want to pre-populate your\n   * `Headers` object with.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/Headers/Headers#init See more}\n   */\n  headers?:\n    | RequestInit['headers']\n    | Record<\n        string,\n        string | number | boolean | (string | number | boolean)[] | null | undefined | unknown\n      >;\n  /**\n   * The request method.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/fetch#method See more}\n   */\n  method?: Uppercase<HttpMethod>;\n  /**\n   * A function for serializing request query parameters. By default, arrays\n   * will be exploded in form style, objects will be exploded in deepObject\n   * style, and reserved characters are percent-encoded.\n   *\n   * This method will have no effect if the native `paramsSerializer()` Axios\n   * API function is used.\n   *\n   * {@link https://swagger.io/docs/specification/serialization/#query View examples}\n   */\n  querySerializer?: QuerySerializer | QuerySerializerOptions;\n  /**\n   * A function validating request data. This is useful if you want to ensure\n   * the request conforms to the desired shape, so it can be safely sent to\n   * the server.\n   */\n  requestValidator?: (data: unknown) => Promise<unknown>;\n  /**\n   * A function transforming response data before it's returned. This is useful\n   * for post-processing data, e.g. converting ISO strings into Date objects.\n   */\n  responseTransformer?: (data: unknown) => Promise<unknown>;\n  /**\n   * A function validating response data. This is useful if you want to ensure\n   * the response conforms to the desired shape, so it can be safely passed to\n   * the transformers and returned to the user.\n   */\n  responseValidator?: (data: unknown) => Promise<unknown>;\n}\n\ntype IsExactlyNeverOrNeverUndefined<T> = [T] extends [never]\n  ? true\n  : [T] extends [never | undefined]\n    ? [undefined] extends [T]\n      ? false\n      : true\n    : false;\n\nexport type OmitNever<T extends Record<string, unknown>> = {\n  [K in keyof T as IsExactlyNeverOrNeverUndefined<T[K]> extends true ? never : K]: T[K];\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/transformers-all-of/core/utils.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/transformers-all-of/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type { Bar, Baz, ClientOptions, Foo, GetFooData, GetFooResponse, GetFooResponses, Qux } from './types.gen';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/transformers-all-of/transformers.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { GetFooResponse } from './types.gen';\n\nconst quxSchemaResponseTransformer = (data: any) => {\n    if (data.baz) {\n        data.baz = new Date(data.baz);\n    }\n    return data;\n};\n\nconst bazSchemaResponseTransformer = (data: any) => {\n    data = quxSchemaResponseTransformer(data);\n    data.bar = new Date(data.bar);\n    return data;\n};\n\nconst barSchemaResponseTransformer = (data: any) => {\n    data.foo = data.foo.map((item: any) => bazSchemaResponseTransformer(item));\n    return data;\n};\n\nconst fooSchemaResponseTransformer = (data: any) => {\n    data.foo = data.foo.map((item: any) => barSchemaResponseTransformer(item));\n    return data;\n};\n\nexport const getFooResponseTransformer = async (data: any): Promise<GetFooResponse> => {\n    data = fooSchemaResponseTransformer(data);\n    return data;\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/transformers-all-of/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type ClientOptions = {\n    baseUrl: `${string}://${string}` | (string & {});\n};\n\nexport type Foo = {\n    foo: Array<Bar>;\n};\n\nexport type Bar = {\n    foo: Array<Baz>;\n    bar: 'foo' | 'bar' | 'baz';\n};\n\nexport type Baz = Omit<Qux, 'id'> & {\n    foo: number;\n    bar: Date;\n    baz: 'foo' | 'bar' | 'baz';\n    qux: number;\n    id: 'Baz';\n};\n\nexport type Qux = {\n    foo: number;\n    bar: number;\n    baz?: Date;\n    id: string;\n};\n\nexport type GetFooData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/foo';\n};\n\nexport type GetFooResponses = {\n    /**\n     * OK\n     */\n    200: Foo;\n};\n\nexport type GetFooResponse = GetFooResponses[keyof GetFooResponses];\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/transformers-allof-response-wrapper/client/client.gen.ts",
    "content": "// 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 (options: RequestOptions) => {\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 url = buildUrl(opts);\n\n    return { opts, url };\n  };\n\n  const request: Client['request'] = async (options) => {\n    // @ts-expect-error\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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/transformers-allof-response-wrapper/client/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type { Auth } from '../core/auth.gen';\nexport type { QuerySerializerOptions } from '../core/bodySerializer.gen';\nexport {\n  formDataBodySerializer,\n  jsonBodySerializer,\n  urlSearchParamsBodySerializer,\n} from '../core/bodySerializer.gen';\nexport { buildClientParams } from '../core/params.gen';\nexport { serializeQueryKeyValue } from '../core/queryKeySerializer.gen';\nexport { createClient } from './client.gen';\nexport type {\n  Client,\n  ClientOptions,\n  Config,\n  CreateClientConfig,\n  Options,\n  RequestOptions,\n  RequestResult,\n  ResolvedRequestOptions,\n  ResponseStyle,\n  TDataShape,\n} from './types.gen';\nexport { createConfig, mergeHeaders } from './utils.gen';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/transformers-allof-response-wrapper/client/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { Auth } from '../core/auth.gen';\nimport type {\n  ServerSentEventsOptions,\n  ServerSentEventsResult,\n} from '../core/serverSentEvents.gen';\nimport type { Client as CoreClient, Config as CoreConfig } from '../core/types.gen';\nimport type { Middleware } from './utils.gen';\n\nexport type ResponseStyle = 'data' | 'fields';\n\nexport interface Config<T extends ClientOptions = ClientOptions>\n  extends Omit<RequestInit, 'body' | 'headers' | 'method'>, CoreConfig {\n  /**\n   * Base URL for all requests made by this client.\n   */\n  baseUrl?: T['baseUrl'];\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   * Please don't use the Fetch client for Next.js applications. The `next`\n   * options won't have any effect.\n   *\n   * Install {@link https://www.npmjs.com/package/@hey-api/client-next `@hey-api/client-next`} instead.\n   */\n  next?: never;\n  /**\n   * Return the response data parsed in a specified format. By default, `auto`\n   * will infer the appropriate method from the `Content-Type` response header.\n   * You can override this behavior with any of the {@link Body} methods.\n   * Select `stream` if you don't want to parse response data at all.\n   *\n   * @default 'auto'\n   */\n  parseAs?: 'arrayBuffer' | 'auto' | 'blob' | 'formData' | 'json' | 'stream' | 'text';\n  /**\n   * Should we return only data or multiple fields (data, error, response, etc.)?\n   *\n   * @default 'fields'\n   */\n  responseStyle?: ResponseStyle;\n  /**\n   * Throw an error instead of returning it in the response?\n   *\n   * @default false\n   */\n  throwOnError?: T['throwOnError'];\n}\n\nexport interface RequestOptions<\n  TData = unknown,\n  TResponseStyle extends ResponseStyle = 'fields',\n  ThrowOnError extends boolean = boolean,\n  Url extends string = string,\n>\n  extends\n    Config<{\n      responseStyle: TResponseStyle;\n      throwOnError: ThrowOnError;\n    }>,\n    Pick<\n      ServerSentEventsOptions<TData>,\n      | 'onRequest'\n      | 'onSseError'\n      | 'onSseEvent'\n      | 'sseDefaultRetryDelay'\n      | 'sseMaxRetryAttempts'\n      | 'sseMaxRetryDelay'\n    > {\n  /**\n   * Any body that you want to add to your request.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/fetch#body}\n   */\n  body?: unknown;\n  path?: Record<string, unknown>;\n  query?: Record<string, unknown>;\n  /**\n   * Security mechanism(s) to use for the request.\n   */\n  security?: ReadonlyArray<Auth>;\n  url: Url;\n}\n\nexport interface ResolvedRequestOptions<\n  TResponseStyle extends ResponseStyle = 'fields',\n  ThrowOnError extends boolean = boolean,\n  Url extends string = string,\n> extends RequestOptions<unknown, TResponseStyle, ThrowOnError, Url> {\n  serializedBody?: string;\n}\n\nexport type RequestResult<\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = boolean,\n  TResponseStyle extends ResponseStyle = 'fields',\n> = ThrowOnError extends true\n  ? Promise<\n      TResponseStyle extends 'data'\n        ? TData extends Record<string, unknown>\n          ? TData[keyof TData]\n          : TData\n        : {\n            data: TData extends Record<string, unknown> ? TData[keyof TData] : TData;\n            request: Request;\n            response: Response;\n          }\n    >\n  : Promise<\n      TResponseStyle extends 'data'\n        ? (TData extends Record<string, unknown> ? TData[keyof TData] : TData) | undefined\n        : (\n            | {\n                data: TData extends Record<string, unknown> ? TData[keyof TData] : TData;\n                error: undefined;\n              }\n            | {\n                data: undefined;\n                error: TError extends Record<string, unknown> ? TError[keyof TError] : TError;\n              }\n          ) & {\n            request: Request;\n            response: Response;\n          }\n    >;\n\nexport interface ClientOptions {\n  baseUrl?: string;\n  responseStyle?: ResponseStyle;\n  throwOnError?: boolean;\n}\n\ntype MethodFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'>,\n) => RequestResult<TData, TError, ThrowOnError, TResponseStyle>;\n\ntype SseFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'>,\n) => Promise<ServerSentEventsResult<TData, TError>>;\n\ntype RequestFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'> &\n    Pick<Required<RequestOptions<TData, TResponseStyle, ThrowOnError>>, 'method'>,\n) => RequestResult<TData, TError, ThrowOnError, TResponseStyle>;\n\ntype BuildUrlFn = <\n  TData extends {\n    body?: unknown;\n    path?: Record<string, unknown>;\n    query?: Record<string, unknown>;\n    url: string;\n  },\n>(\n  options: TData & Options<TData>,\n) => string;\n\nexport type Client = CoreClient<RequestFn, Config, MethodFn, BuildUrlFn, SseFn> & {\n  interceptors: Middleware<Request, Response, unknown, ResolvedRequestOptions>;\n};\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 = ClientOptions> = (\n  override?: Config<ClientOptions & T>,\n) => Config<Required<ClientOptions> & T>;\n\nexport interface TDataShape {\n  body?: unknown;\n  headers?: unknown;\n  path?: unknown;\n  query?: unknown;\n  url: string;\n}\n\ntype OmitKeys<T, K> = Pick<T, Exclude<keyof T, K>>;\n\nexport type Options<\n  TData extends TDataShape = TDataShape,\n  ThrowOnError extends boolean = boolean,\n  TResponse = unknown,\n  TResponseStyle extends ResponseStyle = 'fields',\n> = OmitKeys<\n  RequestOptions<TResponse, TResponseStyle, ThrowOnError>,\n  'body' | 'path' | 'query' | 'url'\n> &\n  ([TData] extends [never] ? unknown : Omit<TData, 'url'>);\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/transformers-allof-response-wrapper/client/utils.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/transformers-allof-response-wrapper/client.gen.ts",
    "content": "// 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>());\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/transformers-allof-response-wrapper/core/auth.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/transformers-allof-response-wrapper/core/bodySerializer.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/transformers-allof-response-wrapper/core/params.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/transformers-allof-response-wrapper/core/pathSerializer.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/transformers-allof-response-wrapper/core/queryKeySerializer.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\n/**\n * JSON-friendly union that mirrors what Pinia Colada can hash.\n */\nexport type JsonValue =\n  | null\n  | string\n  | number\n  | boolean\n  | JsonValue[]\n  | { [key: string]: JsonValue };\n\n/**\n * Replacer that converts non-JSON values (bigint, Date, etc.) to safe substitutes.\n */\nexport const queryKeyJsonReplacer = (_key: string, value: unknown) => {\n  if (value === undefined || typeof value === 'function' || typeof value === 'symbol') {\n    return undefined;\n  }\n  if (typeof value === 'bigint') {\n    return value.toString();\n  }\n  if (value instanceof Date) {\n    return value.toISOString();\n  }\n  return value;\n};\n\n/**\n * Safely stringifies a value and parses it back into a JsonValue.\n */\nexport const stringifyToJsonValue = (input: unknown): JsonValue | undefined => {\n  try {\n    const json = JSON.stringify(input, queryKeyJsonReplacer);\n    if (json === undefined) {\n      return undefined;\n    }\n    return JSON.parse(json) as JsonValue;\n  } catch {\n    return undefined;\n  }\n};\n\n/**\n * Detects plain objects (including objects with a null prototype).\n */\nconst isPlainObject = (value: unknown): value is Record<string, unknown> => {\n  if (value === null || typeof value !== 'object') {\n    return false;\n  }\n  const prototype = Object.getPrototypeOf(value as object);\n  return prototype === Object.prototype || prototype === null;\n};\n\n/**\n * Turns URLSearchParams into a sorted JSON object for deterministic keys.\n */\nconst serializeSearchParams = (params: URLSearchParams): JsonValue => {\n  const entries = Array.from(params.entries()).sort(([a], [b]) => a.localeCompare(b));\n  const result: Record<string, JsonValue> = {};\n\n  for (const [key, value] of entries) {\n    const existing = result[key];\n    if (existing === undefined) {\n      result[key] = value;\n      continue;\n    }\n\n    if (Array.isArray(existing)) {\n      (existing as string[]).push(value);\n    } else {\n      result[key] = [existing, value];\n    }\n  }\n\n  return result;\n};\n\n/**\n * Normalizes any accepted value into a JSON-friendly shape for query keys.\n */\nexport const serializeQueryKeyValue = (value: unknown): JsonValue | undefined => {\n  if (value === null) {\n    return null;\n  }\n\n  if (typeof value === 'string' || typeof value === 'number' || typeof value === 'boolean') {\n    return value;\n  }\n\n  if (value === undefined || typeof value === 'function' || typeof value === 'symbol') {\n    return undefined;\n  }\n\n  if (typeof value === 'bigint') {\n    return value.toString();\n  }\n\n  if (value instanceof Date) {\n    return value.toISOString();\n  }\n\n  if (Array.isArray(value)) {\n    return stringifyToJsonValue(value);\n  }\n\n  if (typeof URLSearchParams !== 'undefined' && value instanceof URLSearchParams) {\n    return serializeSearchParams(value);\n  }\n\n  if (isPlainObject(value)) {\n    return stringifyToJsonValue(value);\n  }\n\n  return undefined;\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/transformers-allof-response-wrapper/core/serverSentEvents.gen.ts",
    "content": "// 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 const 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            // Normalize line endings: CRLF -> LF, then CR -> LF\n            buffer = buffer.replace(/\\r\\n/g, '\\n').replace(/\\r/g, '\\n');\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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/transformers-allof-response-wrapper/core/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { Auth, AuthToken } from './auth.gen';\nimport type { BodySerializer, QuerySerializer, QuerySerializerOptions } from './bodySerializer.gen';\n\nexport type HttpMethod =\n  | 'connect'\n  | 'delete'\n  | 'get'\n  | 'head'\n  | 'options'\n  | 'patch'\n  | 'post'\n  | 'put'\n  | 'trace';\n\nexport type Client<\n  RequestFn = never,\n  Config = unknown,\n  MethodFn = never,\n  BuildUrlFn = never,\n  SseFn = never,\n> = {\n  /**\n   * Returns the final request URL.\n   */\n  buildUrl: BuildUrlFn;\n  getConfig: () => Config;\n  request: RequestFn;\n  setConfig: (config: Config) => Config;\n} & {\n  [K in HttpMethod]: MethodFn;\n} & ([SseFn] extends [never] ? { sse?: never } : { sse: { [K in HttpMethod]: SseFn } });\n\nexport interface Config {\n  /**\n   * Auth token or a function returning auth token. The resolved value will be\n   * added to the request payload as defined by its `security` array.\n   */\n  auth?: ((auth: Auth) => Promise<AuthToken> | AuthToken) | AuthToken;\n  /**\n   * A function for serializing request body parameter. By default,\n   * {@link JSON.stringify()} will be used.\n   */\n  bodySerializer?: BodySerializer | null;\n  /**\n   * An object containing any HTTP headers that you want to pre-populate your\n   * `Headers` object with.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/Headers/Headers#init See more}\n   */\n  headers?:\n    | RequestInit['headers']\n    | Record<\n        string,\n        string | number | boolean | (string | number | boolean)[] | null | undefined | unknown\n      >;\n  /**\n   * The request method.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/fetch#method See more}\n   */\n  method?: Uppercase<HttpMethod>;\n  /**\n   * A function for serializing request query parameters. By default, arrays\n   * will be exploded in form style, objects will be exploded in deepObject\n   * style, and reserved characters are percent-encoded.\n   *\n   * This method will have no effect if the native `paramsSerializer()` Axios\n   * API function is used.\n   *\n   * {@link https://swagger.io/docs/specification/serialization/#query View examples}\n   */\n  querySerializer?: QuerySerializer | QuerySerializerOptions;\n  /**\n   * A function validating request data. This is useful if you want to ensure\n   * the request conforms to the desired shape, so it can be safely sent to\n   * the server.\n   */\n  requestValidator?: (data: unknown) => Promise<unknown>;\n  /**\n   * A function transforming response data before it's returned. This is useful\n   * for post-processing data, e.g. converting ISO strings into Date objects.\n   */\n  responseTransformer?: (data: unknown) => Promise<unknown>;\n  /**\n   * A function validating response data. This is useful if you want to ensure\n   * the response conforms to the desired shape, so it can be safely passed to\n   * the transformers and returned to the user.\n   */\n  responseValidator?: (data: unknown) => Promise<unknown>;\n}\n\ntype IsExactlyNeverOrNeverUndefined<T> = [T] extends [never]\n  ? true\n  : [T] extends [never | undefined]\n    ? [undefined] extends [T]\n      ? false\n      : true\n    : false;\n\nexport type OmitNever<T extends Record<string, unknown>> = {\n  [K in keyof T as IsExactlyNeverOrNeverUndefined<T[K]> extends true ? never : K]: T[K];\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/transformers-allof-response-wrapper/core/utils.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/transformers-allof-response-wrapper/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type { ClientOptions, CreateSecretData, CreateSecretResponse, CreateSecretResponses, ListSecretsData, ListSecretsResponse, ListSecretsResponses, PaginatedResponse, RepositorySecret } from './types.gen';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/transformers-allof-response-wrapper/transformers.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { CreateSecretResponse, ListSecretsResponse } from './types.gen';\n\nconst repositorySecretSchemaResponseTransformer = (data: any) => {\n    data.createdAt = new Date(data.createdAt);\n    data.updatedAt = new Date(data.updatedAt);\n    return data;\n};\n\nexport const listSecretsResponseTransformer = async (data: any): Promise<ListSecretsResponse> => {\n    if (data.data) {\n        data.data = data.data.map((item: any) => repositorySecretSchemaResponseTransformer(item));\n    }\n    return data;\n};\n\nexport const createSecretResponseTransformer = async (data: any): Promise<CreateSecretResponse> => {\n    data = repositorySecretSchemaResponseTransformer(data);\n    return data;\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/transformers-allof-response-wrapper/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type ClientOptions = {\n    baseUrl: '{protocol}://specs' | (string & {});\n};\n\nexport type PaginatedResponse = {\n    meta?: {\n        page?: number;\n        limit?: number;\n        total?: number;\n        totalPages?: number;\n    };\n};\n\nexport type RepositorySecret = {\n    id: number;\n    name: string;\n    createdAt: Date;\n    updatedAt: Date;\n};\n\nexport type ListSecretsData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/secrets';\n};\n\nexport type ListSecretsResponses = {\n    /**\n     * PaginatedResponseRepositorySecret\n     *\n     * OK\n     */\n    200: PaginatedResponse & {\n        data?: Array<RepositorySecret>;\n    };\n};\n\nexport type ListSecretsResponse = ListSecretsResponses[keyof ListSecretsResponses];\n\nexport type CreateSecretData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/secrets/{id}';\n};\n\nexport type CreateSecretResponses = {\n    /**\n     * Created\n     */\n    201: RepositorySecret;\n};\n\nexport type CreateSecretResponse = CreateSecretResponses[keyof CreateSecretResponses];\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/transformers-any-of-null/client/client.gen.ts",
    "content": "// 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 (options: RequestOptions) => {\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 url = buildUrl(opts);\n\n    return { opts, url };\n  };\n\n  const request: Client['request'] = async (options) => {\n    // @ts-expect-error\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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/transformers-any-of-null/client/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type { Auth } from '../core/auth.gen';\nexport type { QuerySerializerOptions } from '../core/bodySerializer.gen';\nexport {\n  formDataBodySerializer,\n  jsonBodySerializer,\n  urlSearchParamsBodySerializer,\n} from '../core/bodySerializer.gen';\nexport { buildClientParams } from '../core/params.gen';\nexport { serializeQueryKeyValue } from '../core/queryKeySerializer.gen';\nexport { createClient } from './client.gen';\nexport type {\n  Client,\n  ClientOptions,\n  Config,\n  CreateClientConfig,\n  Options,\n  RequestOptions,\n  RequestResult,\n  ResolvedRequestOptions,\n  ResponseStyle,\n  TDataShape,\n} from './types.gen';\nexport { createConfig, mergeHeaders } from './utils.gen';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/transformers-any-of-null/client/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { Auth } from '../core/auth.gen';\nimport type {\n  ServerSentEventsOptions,\n  ServerSentEventsResult,\n} from '../core/serverSentEvents.gen';\nimport type { Client as CoreClient, Config as CoreConfig } from '../core/types.gen';\nimport type { Middleware } from './utils.gen';\n\nexport type ResponseStyle = 'data' | 'fields';\n\nexport interface Config<T extends ClientOptions = ClientOptions>\n  extends Omit<RequestInit, 'body' | 'headers' | 'method'>, CoreConfig {\n  /**\n   * Base URL for all requests made by this client.\n   */\n  baseUrl?: T['baseUrl'];\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   * Please don't use the Fetch client for Next.js applications. The `next`\n   * options won't have any effect.\n   *\n   * Install {@link https://www.npmjs.com/package/@hey-api/client-next `@hey-api/client-next`} instead.\n   */\n  next?: never;\n  /**\n   * Return the response data parsed in a specified format. By default, `auto`\n   * will infer the appropriate method from the `Content-Type` response header.\n   * You can override this behavior with any of the {@link Body} methods.\n   * Select `stream` if you don't want to parse response data at all.\n   *\n   * @default 'auto'\n   */\n  parseAs?: 'arrayBuffer' | 'auto' | 'blob' | 'formData' | 'json' | 'stream' | 'text';\n  /**\n   * Should we return only data or multiple fields (data, error, response, etc.)?\n   *\n   * @default 'fields'\n   */\n  responseStyle?: ResponseStyle;\n  /**\n   * Throw an error instead of returning it in the response?\n   *\n   * @default false\n   */\n  throwOnError?: T['throwOnError'];\n}\n\nexport interface RequestOptions<\n  TData = unknown,\n  TResponseStyle extends ResponseStyle = 'fields',\n  ThrowOnError extends boolean = boolean,\n  Url extends string = string,\n>\n  extends\n    Config<{\n      responseStyle: TResponseStyle;\n      throwOnError: ThrowOnError;\n    }>,\n    Pick<\n      ServerSentEventsOptions<TData>,\n      | 'onRequest'\n      | 'onSseError'\n      | 'onSseEvent'\n      | 'sseDefaultRetryDelay'\n      | 'sseMaxRetryAttempts'\n      | 'sseMaxRetryDelay'\n    > {\n  /**\n   * Any body that you want to add to your request.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/fetch#body}\n   */\n  body?: unknown;\n  path?: Record<string, unknown>;\n  query?: Record<string, unknown>;\n  /**\n   * Security mechanism(s) to use for the request.\n   */\n  security?: ReadonlyArray<Auth>;\n  url: Url;\n}\n\nexport interface ResolvedRequestOptions<\n  TResponseStyle extends ResponseStyle = 'fields',\n  ThrowOnError extends boolean = boolean,\n  Url extends string = string,\n> extends RequestOptions<unknown, TResponseStyle, ThrowOnError, Url> {\n  serializedBody?: string;\n}\n\nexport type RequestResult<\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = boolean,\n  TResponseStyle extends ResponseStyle = 'fields',\n> = ThrowOnError extends true\n  ? Promise<\n      TResponseStyle extends 'data'\n        ? TData extends Record<string, unknown>\n          ? TData[keyof TData]\n          : TData\n        : {\n            data: TData extends Record<string, unknown> ? TData[keyof TData] : TData;\n            request: Request;\n            response: Response;\n          }\n    >\n  : Promise<\n      TResponseStyle extends 'data'\n        ? (TData extends Record<string, unknown> ? TData[keyof TData] : TData) | undefined\n        : (\n            | {\n                data: TData extends Record<string, unknown> ? TData[keyof TData] : TData;\n                error: undefined;\n              }\n            | {\n                data: undefined;\n                error: TError extends Record<string, unknown> ? TError[keyof TError] : TError;\n              }\n          ) & {\n            request: Request;\n            response: Response;\n          }\n    >;\n\nexport interface ClientOptions {\n  baseUrl?: string;\n  responseStyle?: ResponseStyle;\n  throwOnError?: boolean;\n}\n\ntype MethodFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'>,\n) => RequestResult<TData, TError, ThrowOnError, TResponseStyle>;\n\ntype SseFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'>,\n) => Promise<ServerSentEventsResult<TData, TError>>;\n\ntype RequestFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'> &\n    Pick<Required<RequestOptions<TData, TResponseStyle, ThrowOnError>>, 'method'>,\n) => RequestResult<TData, TError, ThrowOnError, TResponseStyle>;\n\ntype BuildUrlFn = <\n  TData extends {\n    body?: unknown;\n    path?: Record<string, unknown>;\n    query?: Record<string, unknown>;\n    url: string;\n  },\n>(\n  options: TData & Options<TData>,\n) => string;\n\nexport type Client = CoreClient<RequestFn, Config, MethodFn, BuildUrlFn, SseFn> & {\n  interceptors: Middleware<Request, Response, unknown, ResolvedRequestOptions>;\n};\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 = ClientOptions> = (\n  override?: Config<ClientOptions & T>,\n) => Config<Required<ClientOptions> & T>;\n\nexport interface TDataShape {\n  body?: unknown;\n  headers?: unknown;\n  path?: unknown;\n  query?: unknown;\n  url: string;\n}\n\ntype OmitKeys<T, K> = Pick<T, Exclude<keyof T, K>>;\n\nexport type Options<\n  TData extends TDataShape = TDataShape,\n  ThrowOnError extends boolean = boolean,\n  TResponse = unknown,\n  TResponseStyle extends ResponseStyle = 'fields',\n> = OmitKeys<\n  RequestOptions<TResponse, TResponseStyle, ThrowOnError>,\n  'body' | 'path' | 'query' | 'url'\n> &\n  ([TData] extends [never] ? unknown : Omit<TData, 'url'>);\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/transformers-any-of-null/client/utils.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/transformers-any-of-null/client.gen.ts",
    "content": "// 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>());\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/transformers-any-of-null/core/auth.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/transformers-any-of-null/core/bodySerializer.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/transformers-any-of-null/core/params.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/transformers-any-of-null/core/pathSerializer.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/transformers-any-of-null/core/queryKeySerializer.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\n/**\n * JSON-friendly union that mirrors what Pinia Colada can hash.\n */\nexport type JsonValue =\n  | null\n  | string\n  | number\n  | boolean\n  | JsonValue[]\n  | { [key: string]: JsonValue };\n\n/**\n * Replacer that converts non-JSON values (bigint, Date, etc.) to safe substitutes.\n */\nexport const queryKeyJsonReplacer = (_key: string, value: unknown) => {\n  if (value === undefined || typeof value === 'function' || typeof value === 'symbol') {\n    return undefined;\n  }\n  if (typeof value === 'bigint') {\n    return value.toString();\n  }\n  if (value instanceof Date) {\n    return value.toISOString();\n  }\n  return value;\n};\n\n/**\n * Safely stringifies a value and parses it back into a JsonValue.\n */\nexport const stringifyToJsonValue = (input: unknown): JsonValue | undefined => {\n  try {\n    const json = JSON.stringify(input, queryKeyJsonReplacer);\n    if (json === undefined) {\n      return undefined;\n    }\n    return JSON.parse(json) as JsonValue;\n  } catch {\n    return undefined;\n  }\n};\n\n/**\n * Detects plain objects (including objects with a null prototype).\n */\nconst isPlainObject = (value: unknown): value is Record<string, unknown> => {\n  if (value === null || typeof value !== 'object') {\n    return false;\n  }\n  const prototype = Object.getPrototypeOf(value as object);\n  return prototype === Object.prototype || prototype === null;\n};\n\n/**\n * Turns URLSearchParams into a sorted JSON object for deterministic keys.\n */\nconst serializeSearchParams = (params: URLSearchParams): JsonValue => {\n  const entries = Array.from(params.entries()).sort(([a], [b]) => a.localeCompare(b));\n  const result: Record<string, JsonValue> = {};\n\n  for (const [key, value] of entries) {\n    const existing = result[key];\n    if (existing === undefined) {\n      result[key] = value;\n      continue;\n    }\n\n    if (Array.isArray(existing)) {\n      (existing as string[]).push(value);\n    } else {\n      result[key] = [existing, value];\n    }\n  }\n\n  return result;\n};\n\n/**\n * Normalizes any accepted value into a JSON-friendly shape for query keys.\n */\nexport const serializeQueryKeyValue = (value: unknown): JsonValue | undefined => {\n  if (value === null) {\n    return null;\n  }\n\n  if (typeof value === 'string' || typeof value === 'number' || typeof value === 'boolean') {\n    return value;\n  }\n\n  if (value === undefined || typeof value === 'function' || typeof value === 'symbol') {\n    return undefined;\n  }\n\n  if (typeof value === 'bigint') {\n    return value.toString();\n  }\n\n  if (value instanceof Date) {\n    return value.toISOString();\n  }\n\n  if (Array.isArray(value)) {\n    return stringifyToJsonValue(value);\n  }\n\n  if (typeof URLSearchParams !== 'undefined' && value instanceof URLSearchParams) {\n    return serializeSearchParams(value);\n  }\n\n  if (isPlainObject(value)) {\n    return stringifyToJsonValue(value);\n  }\n\n  return undefined;\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/transformers-any-of-null/core/serverSentEvents.gen.ts",
    "content": "// 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 const 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            // Normalize line endings: CRLF -> LF, then CR -> LF\n            buffer = buffer.replace(/\\r\\n/g, '\\n').replace(/\\r/g, '\\n');\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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/transformers-any-of-null/core/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { Auth, AuthToken } from './auth.gen';\nimport type { BodySerializer, QuerySerializer, QuerySerializerOptions } from './bodySerializer.gen';\n\nexport type HttpMethod =\n  | 'connect'\n  | 'delete'\n  | 'get'\n  | 'head'\n  | 'options'\n  | 'patch'\n  | 'post'\n  | 'put'\n  | 'trace';\n\nexport type Client<\n  RequestFn = never,\n  Config = unknown,\n  MethodFn = never,\n  BuildUrlFn = never,\n  SseFn = never,\n> = {\n  /**\n   * Returns the final request URL.\n   */\n  buildUrl: BuildUrlFn;\n  getConfig: () => Config;\n  request: RequestFn;\n  setConfig: (config: Config) => Config;\n} & {\n  [K in HttpMethod]: MethodFn;\n} & ([SseFn] extends [never] ? { sse?: never } : { sse: { [K in HttpMethod]: SseFn } });\n\nexport interface Config {\n  /**\n   * Auth token or a function returning auth token. The resolved value will be\n   * added to the request payload as defined by its `security` array.\n   */\n  auth?: ((auth: Auth) => Promise<AuthToken> | AuthToken) | AuthToken;\n  /**\n   * A function for serializing request body parameter. By default,\n   * {@link JSON.stringify()} will be used.\n   */\n  bodySerializer?: BodySerializer | null;\n  /**\n   * An object containing any HTTP headers that you want to pre-populate your\n   * `Headers` object with.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/Headers/Headers#init See more}\n   */\n  headers?:\n    | RequestInit['headers']\n    | Record<\n        string,\n        string | number | boolean | (string | number | boolean)[] | null | undefined | unknown\n      >;\n  /**\n   * The request method.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/fetch#method See more}\n   */\n  method?: Uppercase<HttpMethod>;\n  /**\n   * A function for serializing request query parameters. By default, arrays\n   * will be exploded in form style, objects will be exploded in deepObject\n   * style, and reserved characters are percent-encoded.\n   *\n   * This method will have no effect if the native `paramsSerializer()` Axios\n   * API function is used.\n   *\n   * {@link https://swagger.io/docs/specification/serialization/#query View examples}\n   */\n  querySerializer?: QuerySerializer | QuerySerializerOptions;\n  /**\n   * A function validating request data. This is useful if you want to ensure\n   * the request conforms to the desired shape, so it can be safely sent to\n   * the server.\n   */\n  requestValidator?: (data: unknown) => Promise<unknown>;\n  /**\n   * A function transforming response data before it's returned. This is useful\n   * for post-processing data, e.g. converting ISO strings into Date objects.\n   */\n  responseTransformer?: (data: unknown) => Promise<unknown>;\n  /**\n   * A function validating response data. This is useful if you want to ensure\n   * the response conforms to the desired shape, so it can be safely passed to\n   * the transformers and returned to the user.\n   */\n  responseValidator?: (data: unknown) => Promise<unknown>;\n}\n\ntype IsExactlyNeverOrNeverUndefined<T> = [T] extends [never]\n  ? true\n  : [T] extends [never | undefined]\n    ? [undefined] extends [T]\n      ? false\n      : true\n    : false;\n\nexport type OmitNever<T extends Record<string, unknown>> = {\n  [K in keyof T as IsExactlyNeverOrNeverUndefined<T[K]> extends true ? never : K]: T[K];\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/transformers-any-of-null/core/utils.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/transformers-any-of-null/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type { ClientOptions, Foo, GetFooData, GetFooResponse, GetFooResponses, GetNullablePollData, GetNullablePollResponse, GetNullablePollResponses, GetPollData, GetPollResponse, GetPollResponses, Poll } from './types.gen';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/transformers-any-of-null/transformers.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { GetFooResponse, GetNullablePollResponse, GetPollResponse } from './types.gen';\n\nconst fooSchemaResponseTransformer = (data: any) => {\n    if (data.foo) {\n        data.foo = new Date(data.foo);\n    }\n    if (data.bar) {\n        data.bar = new Date(data.bar);\n    }\n    if (data.requiredBaz) {\n        data.requiredBaz = new Date(data.requiredBaz);\n    }\n    return data;\n};\n\nexport const getFooResponseTransformer = async (data: any): Promise<GetFooResponse> => {\n    data = data.map((item: any) => fooSchemaResponseTransformer(item));\n    return data;\n};\n\nconst pollSchemaResponseTransformer = (data: any) => {\n    data.createdAt = new Date(data.createdAt);\n    return data;\n};\n\nexport const getPollResponseTransformer = async (data: any): Promise<GetPollResponse> => {\n    data = pollSchemaResponseTransformer(data);\n    return data;\n};\n\nexport const getNullablePollResponseTransformer = async (data: any): Promise<GetNullablePollResponse> => {\n    if (data) {\n        data = pollSchemaResponseTransformer(data);\n    }\n    return data;\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/transformers-any-of-null/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type ClientOptions = {\n    baseUrl: `${string}://${string}` | (string & {});\n};\n\nexport type Poll = {\n    id: number;\n    createdAt: Date;\n};\n\nexport type Foo = {\n    foo?: Date;\n    bar?: Date | null;\n    requiredBaz: Date | null;\n};\n\nexport type GetFooData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/foo';\n};\n\nexport type GetFooResponses = {\n    /**\n     * OK\n     */\n    200: Array<Foo>;\n};\n\nexport type GetFooResponse = GetFooResponses[keyof GetFooResponses];\n\nexport type GetPollData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/polls';\n};\n\nexport type GetPollResponses = {\n    /**\n     * OK\n     */\n    200: Poll;\n};\n\nexport type GetPollResponse = GetPollResponses[keyof GetPollResponses];\n\nexport type GetNullablePollData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/polls/nullable';\n};\n\nexport type GetNullablePollResponses = {\n    /**\n     * OK\n     */\n    200: Poll | null;\n};\n\nexport type GetNullablePollResponse = GetNullablePollResponses[keyof GetNullablePollResponses];\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/transformers-array/client/client.gen.ts",
    "content": "// 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 (options: RequestOptions) => {\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 url = buildUrl(opts);\n\n    return { opts, url };\n  };\n\n  const request: Client['request'] = async (options) => {\n    // @ts-expect-error\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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/transformers-array/client/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type { Auth } from '../core/auth.gen';\nexport type { QuerySerializerOptions } from '../core/bodySerializer.gen';\nexport {\n  formDataBodySerializer,\n  jsonBodySerializer,\n  urlSearchParamsBodySerializer,\n} from '../core/bodySerializer.gen';\nexport { buildClientParams } from '../core/params.gen';\nexport { serializeQueryKeyValue } from '../core/queryKeySerializer.gen';\nexport { createClient } from './client.gen';\nexport type {\n  Client,\n  ClientOptions,\n  Config,\n  CreateClientConfig,\n  Options,\n  RequestOptions,\n  RequestResult,\n  ResolvedRequestOptions,\n  ResponseStyle,\n  TDataShape,\n} from './types.gen';\nexport { createConfig, mergeHeaders } from './utils.gen';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/transformers-array/client/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { Auth } from '../core/auth.gen';\nimport type {\n  ServerSentEventsOptions,\n  ServerSentEventsResult,\n} from '../core/serverSentEvents.gen';\nimport type { Client as CoreClient, Config as CoreConfig } from '../core/types.gen';\nimport type { Middleware } from './utils.gen';\n\nexport type ResponseStyle = 'data' | 'fields';\n\nexport interface Config<T extends ClientOptions = ClientOptions>\n  extends Omit<RequestInit, 'body' | 'headers' | 'method'>, CoreConfig {\n  /**\n   * Base URL for all requests made by this client.\n   */\n  baseUrl?: T['baseUrl'];\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   * Please don't use the Fetch client for Next.js applications. The `next`\n   * options won't have any effect.\n   *\n   * Install {@link https://www.npmjs.com/package/@hey-api/client-next `@hey-api/client-next`} instead.\n   */\n  next?: never;\n  /**\n   * Return the response data parsed in a specified format. By default, `auto`\n   * will infer the appropriate method from the `Content-Type` response header.\n   * You can override this behavior with any of the {@link Body} methods.\n   * Select `stream` if you don't want to parse response data at all.\n   *\n   * @default 'auto'\n   */\n  parseAs?: 'arrayBuffer' | 'auto' | 'blob' | 'formData' | 'json' | 'stream' | 'text';\n  /**\n   * Should we return only data or multiple fields (data, error, response, etc.)?\n   *\n   * @default 'fields'\n   */\n  responseStyle?: ResponseStyle;\n  /**\n   * Throw an error instead of returning it in the response?\n   *\n   * @default false\n   */\n  throwOnError?: T['throwOnError'];\n}\n\nexport interface RequestOptions<\n  TData = unknown,\n  TResponseStyle extends ResponseStyle = 'fields',\n  ThrowOnError extends boolean = boolean,\n  Url extends string = string,\n>\n  extends\n    Config<{\n      responseStyle: TResponseStyle;\n      throwOnError: ThrowOnError;\n    }>,\n    Pick<\n      ServerSentEventsOptions<TData>,\n      | 'onRequest'\n      | 'onSseError'\n      | 'onSseEvent'\n      | 'sseDefaultRetryDelay'\n      | 'sseMaxRetryAttempts'\n      | 'sseMaxRetryDelay'\n    > {\n  /**\n   * Any body that you want to add to your request.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/fetch#body}\n   */\n  body?: unknown;\n  path?: Record<string, unknown>;\n  query?: Record<string, unknown>;\n  /**\n   * Security mechanism(s) to use for the request.\n   */\n  security?: ReadonlyArray<Auth>;\n  url: Url;\n}\n\nexport interface ResolvedRequestOptions<\n  TResponseStyle extends ResponseStyle = 'fields',\n  ThrowOnError extends boolean = boolean,\n  Url extends string = string,\n> extends RequestOptions<unknown, TResponseStyle, ThrowOnError, Url> {\n  serializedBody?: string;\n}\n\nexport type RequestResult<\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = boolean,\n  TResponseStyle extends ResponseStyle = 'fields',\n> = ThrowOnError extends true\n  ? Promise<\n      TResponseStyle extends 'data'\n        ? TData extends Record<string, unknown>\n          ? TData[keyof TData]\n          : TData\n        : {\n            data: TData extends Record<string, unknown> ? TData[keyof TData] : TData;\n            request: Request;\n            response: Response;\n          }\n    >\n  : Promise<\n      TResponseStyle extends 'data'\n        ? (TData extends Record<string, unknown> ? TData[keyof TData] : TData) | undefined\n        : (\n            | {\n                data: TData extends Record<string, unknown> ? TData[keyof TData] : TData;\n                error: undefined;\n              }\n            | {\n                data: undefined;\n                error: TError extends Record<string, unknown> ? TError[keyof TError] : TError;\n              }\n          ) & {\n            request: Request;\n            response: Response;\n          }\n    >;\n\nexport interface ClientOptions {\n  baseUrl?: string;\n  responseStyle?: ResponseStyle;\n  throwOnError?: boolean;\n}\n\ntype MethodFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'>,\n) => RequestResult<TData, TError, ThrowOnError, TResponseStyle>;\n\ntype SseFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'>,\n) => Promise<ServerSentEventsResult<TData, TError>>;\n\ntype RequestFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'> &\n    Pick<Required<RequestOptions<TData, TResponseStyle, ThrowOnError>>, 'method'>,\n) => RequestResult<TData, TError, ThrowOnError, TResponseStyle>;\n\ntype BuildUrlFn = <\n  TData extends {\n    body?: unknown;\n    path?: Record<string, unknown>;\n    query?: Record<string, unknown>;\n    url: string;\n  },\n>(\n  options: TData & Options<TData>,\n) => string;\n\nexport type Client = CoreClient<RequestFn, Config, MethodFn, BuildUrlFn, SseFn> & {\n  interceptors: Middleware<Request, Response, unknown, ResolvedRequestOptions>;\n};\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 = ClientOptions> = (\n  override?: Config<ClientOptions & T>,\n) => Config<Required<ClientOptions> & T>;\n\nexport interface TDataShape {\n  body?: unknown;\n  headers?: unknown;\n  path?: unknown;\n  query?: unknown;\n  url: string;\n}\n\ntype OmitKeys<T, K> = Pick<T, Exclude<keyof T, K>>;\n\nexport type Options<\n  TData extends TDataShape = TDataShape,\n  ThrowOnError extends boolean = boolean,\n  TResponse = unknown,\n  TResponseStyle extends ResponseStyle = 'fields',\n> = OmitKeys<\n  RequestOptions<TResponse, TResponseStyle, ThrowOnError>,\n  'body' | 'path' | 'query' | 'url'\n> &\n  ([TData] extends [never] ? unknown : Omit<TData, 'url'>);\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/transformers-array/client/utils.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/transformers-array/client.gen.ts",
    "content": "// 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>());\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/transformers-array/core/auth.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/transformers-array/core/bodySerializer.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/transformers-array/core/params.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/transformers-array/core/pathSerializer.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/transformers-array/core/queryKeySerializer.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\n/**\n * JSON-friendly union that mirrors what Pinia Colada can hash.\n */\nexport type JsonValue =\n  | null\n  | string\n  | number\n  | boolean\n  | JsonValue[]\n  | { [key: string]: JsonValue };\n\n/**\n * Replacer that converts non-JSON values (bigint, Date, etc.) to safe substitutes.\n */\nexport const queryKeyJsonReplacer = (_key: string, value: unknown) => {\n  if (value === undefined || typeof value === 'function' || typeof value === 'symbol') {\n    return undefined;\n  }\n  if (typeof value === 'bigint') {\n    return value.toString();\n  }\n  if (value instanceof Date) {\n    return value.toISOString();\n  }\n  return value;\n};\n\n/**\n * Safely stringifies a value and parses it back into a JsonValue.\n */\nexport const stringifyToJsonValue = (input: unknown): JsonValue | undefined => {\n  try {\n    const json = JSON.stringify(input, queryKeyJsonReplacer);\n    if (json === undefined) {\n      return undefined;\n    }\n    return JSON.parse(json) as JsonValue;\n  } catch {\n    return undefined;\n  }\n};\n\n/**\n * Detects plain objects (including objects with a null prototype).\n */\nconst isPlainObject = (value: unknown): value is Record<string, unknown> => {\n  if (value === null || typeof value !== 'object') {\n    return false;\n  }\n  const prototype = Object.getPrototypeOf(value as object);\n  return prototype === Object.prototype || prototype === null;\n};\n\n/**\n * Turns URLSearchParams into a sorted JSON object for deterministic keys.\n */\nconst serializeSearchParams = (params: URLSearchParams): JsonValue => {\n  const entries = Array.from(params.entries()).sort(([a], [b]) => a.localeCompare(b));\n  const result: Record<string, JsonValue> = {};\n\n  for (const [key, value] of entries) {\n    const existing = result[key];\n    if (existing === undefined) {\n      result[key] = value;\n      continue;\n    }\n\n    if (Array.isArray(existing)) {\n      (existing as string[]).push(value);\n    } else {\n      result[key] = [existing, value];\n    }\n  }\n\n  return result;\n};\n\n/**\n * Normalizes any accepted value into a JSON-friendly shape for query keys.\n */\nexport const serializeQueryKeyValue = (value: unknown): JsonValue | undefined => {\n  if (value === null) {\n    return null;\n  }\n\n  if (typeof value === 'string' || typeof value === 'number' || typeof value === 'boolean') {\n    return value;\n  }\n\n  if (value === undefined || typeof value === 'function' || typeof value === 'symbol') {\n    return undefined;\n  }\n\n  if (typeof value === 'bigint') {\n    return value.toString();\n  }\n\n  if (value instanceof Date) {\n    return value.toISOString();\n  }\n\n  if (Array.isArray(value)) {\n    return stringifyToJsonValue(value);\n  }\n\n  if (typeof URLSearchParams !== 'undefined' && value instanceof URLSearchParams) {\n    return serializeSearchParams(value);\n  }\n\n  if (isPlainObject(value)) {\n    return stringifyToJsonValue(value);\n  }\n\n  return undefined;\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/transformers-array/core/serverSentEvents.gen.ts",
    "content": "// 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 const 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            // Normalize line endings: CRLF -> LF, then CR -> LF\n            buffer = buffer.replace(/\\r\\n/g, '\\n').replace(/\\r/g, '\\n');\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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/transformers-array/core/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { Auth, AuthToken } from './auth.gen';\nimport type { BodySerializer, QuerySerializer, QuerySerializerOptions } from './bodySerializer.gen';\n\nexport type HttpMethod =\n  | 'connect'\n  | 'delete'\n  | 'get'\n  | 'head'\n  | 'options'\n  | 'patch'\n  | 'post'\n  | 'put'\n  | 'trace';\n\nexport type Client<\n  RequestFn = never,\n  Config = unknown,\n  MethodFn = never,\n  BuildUrlFn = never,\n  SseFn = never,\n> = {\n  /**\n   * Returns the final request URL.\n   */\n  buildUrl: BuildUrlFn;\n  getConfig: () => Config;\n  request: RequestFn;\n  setConfig: (config: Config) => Config;\n} & {\n  [K in HttpMethod]: MethodFn;\n} & ([SseFn] extends [never] ? { sse?: never } : { sse: { [K in HttpMethod]: SseFn } });\n\nexport interface Config {\n  /**\n   * Auth token or a function returning auth token. The resolved value will be\n   * added to the request payload as defined by its `security` array.\n   */\n  auth?: ((auth: Auth) => Promise<AuthToken> | AuthToken) | AuthToken;\n  /**\n   * A function for serializing request body parameter. By default,\n   * {@link JSON.stringify()} will be used.\n   */\n  bodySerializer?: BodySerializer | null;\n  /**\n   * An object containing any HTTP headers that you want to pre-populate your\n   * `Headers` object with.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/Headers/Headers#init See more}\n   */\n  headers?:\n    | RequestInit['headers']\n    | Record<\n        string,\n        string | number | boolean | (string | number | boolean)[] | null | undefined | unknown\n      >;\n  /**\n   * The request method.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/fetch#method See more}\n   */\n  method?: Uppercase<HttpMethod>;\n  /**\n   * A function for serializing request query parameters. By default, arrays\n   * will be exploded in form style, objects will be exploded in deepObject\n   * style, and reserved characters are percent-encoded.\n   *\n   * This method will have no effect if the native `paramsSerializer()` Axios\n   * API function is used.\n   *\n   * {@link https://swagger.io/docs/specification/serialization/#query View examples}\n   */\n  querySerializer?: QuerySerializer | QuerySerializerOptions;\n  /**\n   * A function validating request data. This is useful if you want to ensure\n   * the request conforms to the desired shape, so it can be safely sent to\n   * the server.\n   */\n  requestValidator?: (data: unknown) => Promise<unknown>;\n  /**\n   * A function transforming response data before it's returned. This is useful\n   * for post-processing data, e.g. converting ISO strings into Date objects.\n   */\n  responseTransformer?: (data: unknown) => Promise<unknown>;\n  /**\n   * A function validating response data. This is useful if you want to ensure\n   * the response conforms to the desired shape, so it can be safely passed to\n   * the transformers and returned to the user.\n   */\n  responseValidator?: (data: unknown) => Promise<unknown>;\n}\n\ntype IsExactlyNeverOrNeverUndefined<T> = [T] extends [never]\n  ? true\n  : [T] extends [never | undefined]\n    ? [undefined] extends [T]\n      ? false\n      : true\n    : false;\n\nexport type OmitNever<T extends Record<string, unknown>> = {\n  [K in keyof T as IsExactlyNeverOrNeverUndefined<T[K]> extends true ? never : K]: T[K];\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/transformers-array/core/utils.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/transformers-array/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type { ClientOptions, GetFooData, GetFooResponse, GetFooResponses } from './types.gen';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/transformers-array/transformers.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { GetFooResponse } from './types.gen';\n\nexport const getFooResponseTransformer = async (data: any): Promise<GetFooResponse> => {\n    data.foo = data.foo.map((item: any) => {\n        item.baz = new Date(item.baz);\n        return item;\n    });\n    return data;\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/transformers-array/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type ClientOptions = {\n    baseUrl: `${string}://${string}` | (string & {});\n};\n\nexport type GetFooData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/foo';\n};\n\nexport type GetFooResponses = {\n    /**\n     * OK\n     */\n    200: {\n        foo: Array<{\n            baz: Date;\n        }>;\n    };\n};\n\nexport type GetFooResponse = GetFooResponses[keyof GetFooResponses];\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/transformers-recursive/client/client.gen.ts",
    "content": "// 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 (options: RequestOptions) => {\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 url = buildUrl(opts);\n\n    return { opts, url };\n  };\n\n  const request: Client['request'] = async (options) => {\n    // @ts-expect-error\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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/transformers-recursive/client/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type { Auth } from '../core/auth.gen';\nexport type { QuerySerializerOptions } from '../core/bodySerializer.gen';\nexport {\n  formDataBodySerializer,\n  jsonBodySerializer,\n  urlSearchParamsBodySerializer,\n} from '../core/bodySerializer.gen';\nexport { buildClientParams } from '../core/params.gen';\nexport { serializeQueryKeyValue } from '../core/queryKeySerializer.gen';\nexport { createClient } from './client.gen';\nexport type {\n  Client,\n  ClientOptions,\n  Config,\n  CreateClientConfig,\n  Options,\n  RequestOptions,\n  RequestResult,\n  ResolvedRequestOptions,\n  ResponseStyle,\n  TDataShape,\n} from './types.gen';\nexport { createConfig, mergeHeaders } from './utils.gen';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/transformers-recursive/client/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { Auth } from '../core/auth.gen';\nimport type {\n  ServerSentEventsOptions,\n  ServerSentEventsResult,\n} from '../core/serverSentEvents.gen';\nimport type { Client as CoreClient, Config as CoreConfig } from '../core/types.gen';\nimport type { Middleware } from './utils.gen';\n\nexport type ResponseStyle = 'data' | 'fields';\n\nexport interface Config<T extends ClientOptions = ClientOptions>\n  extends Omit<RequestInit, 'body' | 'headers' | 'method'>, CoreConfig {\n  /**\n   * Base URL for all requests made by this client.\n   */\n  baseUrl?: T['baseUrl'];\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   * Please don't use the Fetch client for Next.js applications. The `next`\n   * options won't have any effect.\n   *\n   * Install {@link https://www.npmjs.com/package/@hey-api/client-next `@hey-api/client-next`} instead.\n   */\n  next?: never;\n  /**\n   * Return the response data parsed in a specified format. By default, `auto`\n   * will infer the appropriate method from the `Content-Type` response header.\n   * You can override this behavior with any of the {@link Body} methods.\n   * Select `stream` if you don't want to parse response data at all.\n   *\n   * @default 'auto'\n   */\n  parseAs?: 'arrayBuffer' | 'auto' | 'blob' | 'formData' | 'json' | 'stream' | 'text';\n  /**\n   * Should we return only data or multiple fields (data, error, response, etc.)?\n   *\n   * @default 'fields'\n   */\n  responseStyle?: ResponseStyle;\n  /**\n   * Throw an error instead of returning it in the response?\n   *\n   * @default false\n   */\n  throwOnError?: T['throwOnError'];\n}\n\nexport interface RequestOptions<\n  TData = unknown,\n  TResponseStyle extends ResponseStyle = 'fields',\n  ThrowOnError extends boolean = boolean,\n  Url extends string = string,\n>\n  extends\n    Config<{\n      responseStyle: TResponseStyle;\n      throwOnError: ThrowOnError;\n    }>,\n    Pick<\n      ServerSentEventsOptions<TData>,\n      | 'onRequest'\n      | 'onSseError'\n      | 'onSseEvent'\n      | 'sseDefaultRetryDelay'\n      | 'sseMaxRetryAttempts'\n      | 'sseMaxRetryDelay'\n    > {\n  /**\n   * Any body that you want to add to your request.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/fetch#body}\n   */\n  body?: unknown;\n  path?: Record<string, unknown>;\n  query?: Record<string, unknown>;\n  /**\n   * Security mechanism(s) to use for the request.\n   */\n  security?: ReadonlyArray<Auth>;\n  url: Url;\n}\n\nexport interface ResolvedRequestOptions<\n  TResponseStyle extends ResponseStyle = 'fields',\n  ThrowOnError extends boolean = boolean,\n  Url extends string = string,\n> extends RequestOptions<unknown, TResponseStyle, ThrowOnError, Url> {\n  serializedBody?: string;\n}\n\nexport type RequestResult<\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = boolean,\n  TResponseStyle extends ResponseStyle = 'fields',\n> = ThrowOnError extends true\n  ? Promise<\n      TResponseStyle extends 'data'\n        ? TData extends Record<string, unknown>\n          ? TData[keyof TData]\n          : TData\n        : {\n            data: TData extends Record<string, unknown> ? TData[keyof TData] : TData;\n            request: Request;\n            response: Response;\n          }\n    >\n  : Promise<\n      TResponseStyle extends 'data'\n        ? (TData extends Record<string, unknown> ? TData[keyof TData] : TData) | undefined\n        : (\n            | {\n                data: TData extends Record<string, unknown> ? TData[keyof TData] : TData;\n                error: undefined;\n              }\n            | {\n                data: undefined;\n                error: TError extends Record<string, unknown> ? TError[keyof TError] : TError;\n              }\n          ) & {\n            request: Request;\n            response: Response;\n          }\n    >;\n\nexport interface ClientOptions {\n  baseUrl?: string;\n  responseStyle?: ResponseStyle;\n  throwOnError?: boolean;\n}\n\ntype MethodFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'>,\n) => RequestResult<TData, TError, ThrowOnError, TResponseStyle>;\n\ntype SseFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'>,\n) => Promise<ServerSentEventsResult<TData, TError>>;\n\ntype RequestFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'> &\n    Pick<Required<RequestOptions<TData, TResponseStyle, ThrowOnError>>, 'method'>,\n) => RequestResult<TData, TError, ThrowOnError, TResponseStyle>;\n\ntype BuildUrlFn = <\n  TData extends {\n    body?: unknown;\n    path?: Record<string, unknown>;\n    query?: Record<string, unknown>;\n    url: string;\n  },\n>(\n  options: TData & Options<TData>,\n) => string;\n\nexport type Client = CoreClient<RequestFn, Config, MethodFn, BuildUrlFn, SseFn> & {\n  interceptors: Middleware<Request, Response, unknown, ResolvedRequestOptions>;\n};\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 = ClientOptions> = (\n  override?: Config<ClientOptions & T>,\n) => Config<Required<ClientOptions> & T>;\n\nexport interface TDataShape {\n  body?: unknown;\n  headers?: unknown;\n  path?: unknown;\n  query?: unknown;\n  url: string;\n}\n\ntype OmitKeys<T, K> = Pick<T, Exclude<keyof T, K>>;\n\nexport type Options<\n  TData extends TDataShape = TDataShape,\n  ThrowOnError extends boolean = boolean,\n  TResponse = unknown,\n  TResponseStyle extends ResponseStyle = 'fields',\n> = OmitKeys<\n  RequestOptions<TResponse, TResponseStyle, ThrowOnError>,\n  'body' | 'path' | 'query' | 'url'\n> &\n  ([TData] extends [never] ? unknown : Omit<TData, 'url'>);\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/transformers-recursive/client/utils.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/transformers-recursive/client.gen.ts",
    "content": "// 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>());\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/transformers-recursive/core/auth.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/transformers-recursive/core/bodySerializer.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/transformers-recursive/core/params.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/transformers-recursive/core/pathSerializer.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/transformers-recursive/core/queryKeySerializer.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\n/**\n * JSON-friendly union that mirrors what Pinia Colada can hash.\n */\nexport type JsonValue =\n  | null\n  | string\n  | number\n  | boolean\n  | JsonValue[]\n  | { [key: string]: JsonValue };\n\n/**\n * Replacer that converts non-JSON values (bigint, Date, etc.) to safe substitutes.\n */\nexport const queryKeyJsonReplacer = (_key: string, value: unknown) => {\n  if (value === undefined || typeof value === 'function' || typeof value === 'symbol') {\n    return undefined;\n  }\n  if (typeof value === 'bigint') {\n    return value.toString();\n  }\n  if (value instanceof Date) {\n    return value.toISOString();\n  }\n  return value;\n};\n\n/**\n * Safely stringifies a value and parses it back into a JsonValue.\n */\nexport const stringifyToJsonValue = (input: unknown): JsonValue | undefined => {\n  try {\n    const json = JSON.stringify(input, queryKeyJsonReplacer);\n    if (json === undefined) {\n      return undefined;\n    }\n    return JSON.parse(json) as JsonValue;\n  } catch {\n    return undefined;\n  }\n};\n\n/**\n * Detects plain objects (including objects with a null prototype).\n */\nconst isPlainObject = (value: unknown): value is Record<string, unknown> => {\n  if (value === null || typeof value !== 'object') {\n    return false;\n  }\n  const prototype = Object.getPrototypeOf(value as object);\n  return prototype === Object.prototype || prototype === null;\n};\n\n/**\n * Turns URLSearchParams into a sorted JSON object for deterministic keys.\n */\nconst serializeSearchParams = (params: URLSearchParams): JsonValue => {\n  const entries = Array.from(params.entries()).sort(([a], [b]) => a.localeCompare(b));\n  const result: Record<string, JsonValue> = {};\n\n  for (const [key, value] of entries) {\n    const existing = result[key];\n    if (existing === undefined) {\n      result[key] = value;\n      continue;\n    }\n\n    if (Array.isArray(existing)) {\n      (existing as string[]).push(value);\n    } else {\n      result[key] = [existing, value];\n    }\n  }\n\n  return result;\n};\n\n/**\n * Normalizes any accepted value into a JSON-friendly shape for query keys.\n */\nexport const serializeQueryKeyValue = (value: unknown): JsonValue | undefined => {\n  if (value === null) {\n    return null;\n  }\n\n  if (typeof value === 'string' || typeof value === 'number' || typeof value === 'boolean') {\n    return value;\n  }\n\n  if (value === undefined || typeof value === 'function' || typeof value === 'symbol') {\n    return undefined;\n  }\n\n  if (typeof value === 'bigint') {\n    return value.toString();\n  }\n\n  if (value instanceof Date) {\n    return value.toISOString();\n  }\n\n  if (Array.isArray(value)) {\n    return stringifyToJsonValue(value);\n  }\n\n  if (typeof URLSearchParams !== 'undefined' && value instanceof URLSearchParams) {\n    return serializeSearchParams(value);\n  }\n\n  if (isPlainObject(value)) {\n    return stringifyToJsonValue(value);\n  }\n\n  return undefined;\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/transformers-recursive/core/serverSentEvents.gen.ts",
    "content": "// 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 const 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            // Normalize line endings: CRLF -> LF, then CR -> LF\n            buffer = buffer.replace(/\\r\\n/g, '\\n').replace(/\\r/g, '\\n');\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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/transformers-recursive/core/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { Auth, AuthToken } from './auth.gen';\nimport type { BodySerializer, QuerySerializer, QuerySerializerOptions } from './bodySerializer.gen';\n\nexport type HttpMethod =\n  | 'connect'\n  | 'delete'\n  | 'get'\n  | 'head'\n  | 'options'\n  | 'patch'\n  | 'post'\n  | 'put'\n  | 'trace';\n\nexport type Client<\n  RequestFn = never,\n  Config = unknown,\n  MethodFn = never,\n  BuildUrlFn = never,\n  SseFn = never,\n> = {\n  /**\n   * Returns the final request URL.\n   */\n  buildUrl: BuildUrlFn;\n  getConfig: () => Config;\n  request: RequestFn;\n  setConfig: (config: Config) => Config;\n} & {\n  [K in HttpMethod]: MethodFn;\n} & ([SseFn] extends [never] ? { sse?: never } : { sse: { [K in HttpMethod]: SseFn } });\n\nexport interface Config {\n  /**\n   * Auth token or a function returning auth token. The resolved value will be\n   * added to the request payload as defined by its `security` array.\n   */\n  auth?: ((auth: Auth) => Promise<AuthToken> | AuthToken) | AuthToken;\n  /**\n   * A function for serializing request body parameter. By default,\n   * {@link JSON.stringify()} will be used.\n   */\n  bodySerializer?: BodySerializer | null;\n  /**\n   * An object containing any HTTP headers that you want to pre-populate your\n   * `Headers` object with.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/Headers/Headers#init See more}\n   */\n  headers?:\n    | RequestInit['headers']\n    | Record<\n        string,\n        string | number | boolean | (string | number | boolean)[] | null | undefined | unknown\n      >;\n  /**\n   * The request method.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/fetch#method See more}\n   */\n  method?: Uppercase<HttpMethod>;\n  /**\n   * A function for serializing request query parameters. By default, arrays\n   * will be exploded in form style, objects will be exploded in deepObject\n   * style, and reserved characters are percent-encoded.\n   *\n   * This method will have no effect if the native `paramsSerializer()` Axios\n   * API function is used.\n   *\n   * {@link https://swagger.io/docs/specification/serialization/#query View examples}\n   */\n  querySerializer?: QuerySerializer | QuerySerializerOptions;\n  /**\n   * A function validating request data. This is useful if you want to ensure\n   * the request conforms to the desired shape, so it can be safely sent to\n   * the server.\n   */\n  requestValidator?: (data: unknown) => Promise<unknown>;\n  /**\n   * A function transforming response data before it's returned. This is useful\n   * for post-processing data, e.g. converting ISO strings into Date objects.\n   */\n  responseTransformer?: (data: unknown) => Promise<unknown>;\n  /**\n   * A function validating response data. This is useful if you want to ensure\n   * the response conforms to the desired shape, so it can be safely passed to\n   * the transformers and returned to the user.\n   */\n  responseValidator?: (data: unknown) => Promise<unknown>;\n}\n\ntype IsExactlyNeverOrNeverUndefined<T> = [T] extends [never]\n  ? true\n  : [T] extends [never | undefined]\n    ? [undefined] extends [T]\n      ? false\n      : true\n    : false;\n\nexport type OmitNever<T extends Record<string, unknown>> = {\n  [K in keyof T as IsExactlyNeverOrNeverUndefined<T[K]> extends true ? never : K]: T[K];\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/transformers-recursive/core/utils.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/transformers-recursive/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type { ClientOptions, GetTreeData, GetTreeResponse, GetTreeResponses, TreeNode } from './types.gen';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/transformers-recursive/transformers.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { GetTreeResponse } from './types.gen';\n\nconst treeNodeSchemaResponseTransformer = (data: any) => {\n    if (data.createdAt) {\n        data.createdAt = new Date(data.createdAt);\n    }\n    if (data.children) {\n        data.children = data.children.map((item: any) => treeNodeSchemaResponseTransformer(item));\n    }\n    return data;\n};\n\nexport const getTreeResponseTransformer = async (data: any): Promise<GetTreeResponse> => {\n    data = data.map((item: any) => treeNodeSchemaResponseTransformer(item));\n    return data;\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/transformers-recursive/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type ClientOptions = {\n    baseUrl: `${string}://${string}` | (string & {});\n};\n\nexport type TreeNode = {\n    id?: string;\n    name?: string;\n    createdAt?: Date;\n    children?: Array<TreeNode>;\n};\n\nexport type GetTreeData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/tree';\n};\n\nexport type GetTreeResponses = {\n    /**\n     * Success\n     */\n    200: Array<TreeNode>;\n};\n\nexport type GetTreeResponse = GetTreeResponses[keyof GetTreeResponses];\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/transforms-properties-required-by-default/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type { Address, AllocatedDeliveryItem, AllocatedPreOrderItem, AnonymousTransaction, AnonymousTransactionWritable, AppliedDiscount, AppliedDiscountWritable, AssignPlantsToGroupRequest, BadRequestPropertyError, BadRequestResponse, BatchDetails, BatchLabResultsPostData, BatchLabResultsPostError, BatchLabResultsPostErrors, BatchLabResultsPostResponses, BooleanNullableOptional, BooleanOptional, Brand, BrandEditRequest, BrandGetData, BrandGetErrors, BrandGetResponse, BrandGetResponses, BrandPostData, BrandPostError, BrandPostErrors, BrandPostResponse, BrandPostResponses, BroadcastedResponses, BroadcastedResponsesWritable, BulkCreateOrUpdateHarvest, BulkCreateOrUpdateHarvestResponse, BulkHarvestDetail, CalculationMethod, CancelPreorderRequest, CannabinoidTerpeneValue, CartItemPrice, CartPrice, ChangeGrowthPhaseRequest, ClientOptions, ClosingReportCategorySummary, ClosingReportCategorySummaryWritable, ClosingReportCustomerTypeSummary, ClosingReportCustomerTypeSummaryWritable, ClosingReportOrderSourceSummary, ClosingReportOrderSourceSummaryWritable, ClosingReportOrderTypeSummary, ClosingReportOrderTypeSummaryWritable, ClosingReportPayByBankBatchFileSums, ClosingReportPaymentSummary, ClosingReportTaxRateSummary, ClosingReportV2, ClosingReportV2Writable, ConvertBatchDetails, ConvertImmatureBatchRequest, ConvertImmaturePlantResponse, ConvertImmaturePlantResponseApiResult, CreateAnonymousTransactionRequest, CreatedImmaturePlantBatch, CreatedMaturePlant, CreateImmaturePlantBatchResponse, CreateImmaturePlantBatchResponseApiResult, CreateJournalEntryRequest, CreateMatureBatchRequest, CreateMaturePlantsResponse, CreateMaturePlantsResponseApiResult, CreateOrUpdateHarvest, CreatePlantRequest, CreatePreOrderRequest, CreateUpdatePurchaseOrderItemRequest, CreateUpdatePurchaseOrderRequest, CreateUpdatePurchaseOrderResponse, CreateUpdatePurchaseOrdersRequest, Customer, CustomerByExternalIdGetData, CustomerByExternalIdGetError, CustomerByExternalIdGetErrors, CustomerByExternalIdGetResponse, CustomerByExternalIdGetResponses, CustomerCustomerLookupPostData, CustomerCustomerLookupPostError, CustomerCustomerLookupPostErrors, CustomerCustomerLookupPostResponse, CustomerCustomerLookupPostResponses, CustomerCustomerPostData, CustomerCustomerPostError, CustomerCustomerPostErrors, CustomerCustomerPostResponse, CustomerCustomerPostResponses, CustomerCustomersGetData, CustomerCustomersGetError, CustomerCustomersGetErrors, CustomerCustomersGetResponse, CustomerCustomersGetResponses, CustomerCustomersPaginatedGetData, CustomerCustomersPaginatedGetError, CustomerCustomersPaginatedGetErrors, CustomerCustomersPaginatedGetResponse, CustomerCustomersPaginatedGetResponses, CustomerCustomerTypesGetData, CustomerCustomerTypesGetErrors, CustomerCustomerTypesGetResponse, CustomerCustomerTypesGetResponses, CustomerJournalCreatePostData, CustomerJournalCreatePostError, CustomerJournalCreatePostErrors, CustomerJournalCreatePostResponse, CustomerJournalCreatePostResponses, CustomerJournalGetData, CustomerJournalGetError, CustomerJournalGetErrors, CustomerJournalGetResponse, CustomerJournalGetResponses, CustomerJournalUpdatePostData, CustomerJournalUpdatePostError, CustomerJournalUpdatePostErrors, CustomerJournalUpdatePostResponse, CustomerJournalUpdatePostResponses, CustomerReferralSourcesGetData, CustomerReferralSourcesGetErrors, CustomerReferralSourcesGetResponse, CustomerReferralSourcesGetResponses, CustomerSearchPostData, CustomerSearchPostError, CustomerSearchPostErrors, CustomerSearchPostResponse, CustomerSearchPostResponses, CustomerSearchRequest, CustomerSearchResult, CustomerSearchResultWritable, CustomerType, CustomerWritable, DateTimeNullableOptional, DecimalNullableOptional, DeleteImageRequest, DeliveriesGetData, DeliveriesGetError, DeliveriesGetErrors, DeliveriesGetResponse, DeliveriesGetResponses, DeliveriesSetRouteDetailPostData, DeliveriesSetRouteDetailPostError, DeliveriesSetRouteDetailPostErrors, DeliveriesSetRouteDetailPostResponses, DeliveryOrderStatus, DeliveryPayment, DeliveryScheduleType, Discount, DiscountApiResponse, DiscountApiResponseWritable, DiscountApplicationMethod, DiscountConstraintApiResponse, DiscountConstraintApiResponseWritable, DiscountFirstTimeCustomer, DiscountGroup, DiscountItemGroupType, DiscountMenuDisplayApiResponse, DiscountPaymentRestrictionApiResponse, DiscountRestriction, DiscountRewardApiResponse, DiscountRewardApiResponseWritable, DiscountsGetData, DiscountsGetErrors, DiscountsGetResponse, DiscountsGetResponses, DiscountsV2ListGetData, DiscountsV2ListGetErrors, DiscountsV2ListGetResponse, DiscountsV2ListGetResponses, DiscountThresholdType, DriverDetail, DriversGetData, DriversGetErrors, DriversGetResponse, DriversGetResponses, DriversPostData, DriversPostError, DriversPostErrors, DriversPostResponses, EcomCustomerEdit, Employee, EmployeesGetData, EmployeesGetErrors, EmployeesGetResponse, EmployeesGetResponses, FeeDonation, FeeDonationInfo, FinishOrUnfinishBatchDetails, GuestListEntry, GuestlistGetData, GuestlistGetErrors, GuestlistGetResponse, GuestlistGetResponses, Harvest, HarvestBulkPostData, HarvestBulkPostError, HarvestBulkPostErrors, HarvestBulkPostResponse, HarvestBulkPostResponses, HarvestedPlant, HarvestGetData, HarvestGetErrors, HarvestGetResponse, HarvestGetResponses, HarvestPlantRequest, HarvestPostData, HarvestPostErrors, HarvestPostResponse, HarvestPostResponses, HarvestWasteDetail, HarvestWasteDetailWaste, Int32iEnumerableOptional, Int32NullableOptional, IntegratedPayment, IntegrationIntegrationReconGetData, IntegrationIntegrationReconGetErrors, IntegrationIntegrationReconGetResponse, IntegrationIntegrationReconGetResponses, InventoryDiscrepancy, InventoryDiscrepancyWritable, InventoryGetData, InventoryGetErrors, InventoryGetResponse, InventoryGetResponses, InventoryIntegrationReconResponse, InventoryIntegrationReconResponseWritable, InventoryInventorytransactionGetData, InventoryInventorytransactionGetErrors, InventoryInventorytransactionGetResponse, InventoryInventorytransactionGetResponses, InventoryItem, InventoryItemWritable, InventoryLabresultsGetData, InventoryLabresultsGetErrors, InventoryLabresultsGetResponse, InventoryLabresultsGetResponses, InventoryReceivedinventoryGetData, InventoryReceivedinventoryGetErrors, InventoryReceivedinventoryGetResponse, InventoryReceivedinventoryGetResponses, InventoryReceiveinventoryPostData, InventoryReceiveinventoryPostError, InventoryReceiveinventoryPostErrors, InventoryReceiveinventoryPostResponse, InventoryReceiveinventoryPostResponses, InventoryRoomQuantity, InventorySnapshot, InventorySnapshotGetData, InventorySnapshotGetErrors, InventorySnapshotGetResponse, InventorySnapshotGetResponses, InventoryTag, InventoryTransaction, IRestrictionApiResponse, JournalEntry, LabResult, LabResultUnit, LabResultUnitData, LabResultWritable, Lineage, LineagesGetData, LineagesGetErrors, LineagesGetResponse, LineagesGetResponses, LineItemTaxInfo, LineItemTaxInfoWritable, LocationIdentity, LocationIdentityWritable, LocationMapping, LocationProductOverride, LocationProductOverrideRequest, LocationResponse, LocationResponseWritable, LoyaltySnapshot, ManualPayment, MatureBatchDetails, MovePlantRequest, ObjectWaste, OkcomputerGetData, OkcomputerGetErrors, OkcomputerGetResponse, OkcomputerGetResponses, PackageAddTagsPostData, PackageAddTagsPostErrors, PackageAddTagsPostResponses, PackageLineage, PackageRemoveTagsPostData, PackageRemoveTagsPostErrors, PackageRemoveTagsPostResponses, PackageSetTagsPostData, PackageSetTagsPostError, PackageSetTagsPostErrors, PackageSetTagsPostResponses, Plant, PlantAssignPlantsToGroupPostData, PlantAssignPlantsToGroupPostError, PlantAssignPlantsToGroupPostErrors, PlantAssignPlantsToGroupPostResponses, PlantChangePhasePostData, PlantChangePhasePostErrors, PlantChangePhasePostResponses, PlantGetData, PlantGetErrors, PlantGetReasonCodesGetData, PlantGetReasonCodesGetErrors, PlantGetReasonCodesGetResponse, PlantGetReasonCodesGetResponses, PlantGetResponse, PlantGetResponses, PlantHarvestPostData, PlantHarvestPostErrors, PlantHarvestPostResponses, PlantMovePostData, PlantMovePostErrors, PlantMovePostResponses, PlantNonstsBatchConvertImmatureplantsPostData, PlantNonstsBatchConvertImmatureplantsPostError, PlantNonstsBatchConvertImmatureplantsPostErrors, PlantNonstsBatchConvertImmatureplantsPostResponse, PlantNonstsBatchConvertImmatureplantsPostResponses, PlantNonstsBatchFinishHarvestPostData, PlantNonstsBatchFinishHarvestPostError, PlantNonstsBatchFinishHarvestPostErrors, PlantNonstsBatchFinishHarvestPostResponses, PlantNonstsBatchImmatureplantsPostData, PlantNonstsBatchImmatureplantsPostError, PlantNonstsBatchImmatureplantsPostErrors, PlantNonstsBatchImmatureplantsPostResponse, PlantNonstsBatchImmatureplantsPostResponses, PlantNonstsBatchMatureplantsPostData, PlantNonstsBatchMatureplantsPostError, PlantNonstsBatchMatureplantsPostErrors, PlantNonstsBatchMatureplantsPostResponse, PlantNonstsBatchMatureplantsPostResponses, PlantNonstsBatchPostData, PlantNonstsBatchPostError, PlantNonstsBatchPostErrors, PlantNonstsBatchPostResponses, PlantNonstsBatchRetirePostData, PlantNonstsBatchRetirePostError, PlantNonstsBatchRetirePostErrors, PlantNonstsBatchRetirePostResponses, PlantNonstsRetagPostData, PlantNonstsRetagPostError, PlantNonstsRetagPostErrors, PlantNonstsRetagPostResponses, PlantNonstsSplitPostData, PlantNonstsSplitPostError, PlantNonstsSplitPostErrors, PlantNonstsSplitPostResponse, PlantNonstsSplitPostResponses, PlantNonstsUpdatePostData, PlantNonstsUpdatePostError, PlantNonstsUpdatePostErrors, PlantNonstsUpdatePostResponse, PlantNonstsUpdatePostResponses, PlantPostData, PlantPostError, PlantPostErrors, PlantPostResponse, PlantPostResponses, PlantRetirePostData, PlantRetirePostError, PlantRetirePostErrors, PlantRetirePostResponses, PlantWasteDetail, PlantWasteDetailWaste, PlantWritable, PostImmatureBatchRequest, PrecartItem, PreorderCancelPostData, PreorderCancelPostError, PreorderCancelPostErrors, PreorderCancelPostResponse, PreorderCancelPostResponses, PreOrderItem, PreorderPriceCartPostData, PreorderPriceCartPostError, PreorderPriceCartPostErrors, PreorderPriceCartPostResponse, PreorderPriceCartPostResponses, PreOrderRedemption, PreOrderRedemptionIEnumerableOptional, PreOrderStatus, PreorderStatusGetData, PreorderStatusGetErrors, PreorderStatusGetResponse, PreorderStatusGetResponses, PreorderSubmitPostData, PreorderSubmitPostError, PreorderSubmitPostErrors, PreorderSubmitPostResponse, PreorderSubmitPostResponses, PreorderUpdatePostData, PreorderUpdatePostErrors, PreorderUpdatePostResponses, PriceCartRequest, PriceEstimates, PricingDetail, PricingTier, PricingTierData, PricingTiersGetData, PricingTiersGetErrors, PricingTiersGetResponse, PricingTiersGetResponses, Producer, ProducersGetData, ProducersGetErrors, ProducersGetResponse, ProducersGetResponses, ProductCategory, ProductCategoryGetData, ProductCategoryGetErrors, ProductCategoryGetResponse, ProductCategoryGetResponses, ProductDetail, ProductDetailUpload, ProductDetailWritable, ProductEffect, ProductsExternalCategoriesGetData, ProductsExternalCategoriesGetError, ProductsExternalCategoriesGetErrors, ProductsExternalCategoriesGetResponse, ProductsExternalCategoriesGetResponses, ProductsGetData, ProductsGetErrors, ProductsGetResponse, ProductsGetResponses, ProductsLocationOverridesGetData, ProductsLocationOverridesGetErrors, ProductsLocationOverridesGetResponse, ProductsLocationOverridesGetResponses, ProductsLocationOverridesPostData, ProductsLocationOverridesPostErrors, ProductsLocationOverridesPostResponses, ProductsProductPostData, ProductsProductPostError, ProductsProductPostErrors, ProductsProductPostResponse, ProductsProductPostResponses, ProductsProductsPostData, ProductsProductsPostError, ProductsProductsPostErrors, ProductsProductsPostResponse, ProductsProductsPostResponses, ProductsRemoveImagePostData, ProductsRemoveImagePostError, ProductsRemoveImagePostErrors, ProductsRemoveImagePostResponse, ProductsRemoveImagePostResponses, ProductsSetImagePostData, ProductsSetImagePostError, ProductsSetImagePostErrors, ProductsSetImagePostResponse, ProductsSetImagePostResponses, ProductsStrainsGetData, ProductsStrainsGetErrors, ProductsStrainsGetResponse, ProductsStrainsGetResponses, ProductTag, PublishedDiscount, PurchaseOrderData, PurchaseOrderGetData, PurchaseOrderGetError, PurchaseOrderGetErrors, PurchaseOrderGetResponse, PurchaseOrderGetResponses, PurchaseOrderItemDetail, PurchaseOrderPostData, PurchaseOrderPostError, PurchaseOrderPostErrors, PurchaseOrderPostResponse, PurchaseOrderPostResponses, ReceivedInventory, ReceivedInventoryItem, ReceiveInventoryItemSave, ReceiveInventorySave, ReferenceLabResultsNamesGetData, ReferenceLabResultsNamesGetErrors, ReferenceLabResultsNamesGetResponse, ReferenceLabResultsNamesGetResponses, ReferenceLabResultUnitsGetData, ReferenceLabResultUnitsGetErrors, ReferenceLabResultUnitsGetResponse, ReferenceLabResultUnitsGetResponses, ReferenceUnitsGetData, ReferenceUnitsGetErrors, ReferenceUnitsGetResponse, ReferenceUnitsGetResponses, ReferenceUnitTypesGetData, ReferenceUnitTypesGetErrors, ReferenceUnitTypesGetResponse, ReferenceUnitTypesGetResponses, RegisterAdjustment, RegisterCashSummary, RegisterTransaction, RegulatoryCategory, RegulatoryCategoryGetData, RegulatoryCategoryGetErrors, RegulatoryCategoryGetResponse, RegulatoryCategoryGetResponses, ReportingCashSummaryGetData, ReportingCashSummaryGetError, ReportingCashSummaryGetErrors, ReportingCashSummaryGetResponse, ReportingCashSummaryGetResponses, ReportingClosingReportGetData, ReportingClosingReportGetError, ReportingClosingReportGetErrors, ReportingClosingReportGetResponse, ReportingClosingReportGetResponses, ReportingCustomersGetData, ReportingCustomersGetErrors, ReportingCustomersGetResponse, ReportingCustomersGetResponses, ReportingCustomersPaginatedGetData, ReportingCustomersPaginatedGetError, ReportingCustomersPaginatedGetErrors, ReportingCustomersPaginatedGetResponse, ReportingCustomersPaginatedGetResponses, ReportingDiscountDetail, ReportingDiscountsGetData, ReportingDiscountsGetErrors, ReportingDiscountsGetResponse, ReportingDiscountsGetResponses, ReportingInventoryGetData, ReportingInventoryGetErrors, ReportingInventoryGetResponse, ReportingInventoryGetResponses, ReportingInventoryItem, ReportingInventoryItemWritable, ReportingLoyaltySnapshotGetData, ReportingLoyaltySnapshotGetErrors, ReportingLoyaltySnapshotGetResponse, ReportingLoyaltySnapshotGetResponses, ReportingProductsGetData, ReportingProductsGetErrors, ReportingProductsGetResponse, ReportingProductsGetResponses, ReportingRegisterAdjustmentsGetData, ReportingRegisterAdjustmentsGetErrors, ReportingRegisterAdjustmentsGetResponse, ReportingRegisterAdjustmentsGetResponses, ReportingRegisterTransactionsGetData, ReportingRegisterTransactionsGetErrors, ReportingRegisterTransactionsGetResponse, ReportingRegisterTransactionsGetResponses, ReportingTransactionsGetData, ReportingTransactionsGetError, ReportingTransactionsGetErrors, ReportingTransactionsGetResponse, ReportingTransactionsGetResponses, RetagPlantRequest, RetireImmaturePlantsDetails, RetireImmaturePlantsRequest, RetirePlantRequest, Room, RoomPostData, RoomPostErrors, RoomPostResponse, RoomPostResponses, RoomRoomsGetData, RoomRoomsGetErrors, RoomRoomsGetResponse, RoomRoomsGetResponses, RoomWaste, SavedReceive, SetImageRequest, SetImageRequestWritable, SetImageResponse, Severity, Size, SizesGetData, SizesGetErrors, SizesGetResponse, SizesGetResponses, SplitBatchDetails, SplitImmaturePlantResult, SplitImmaturePlantResultApiResult, SplitImmaturePlantResultDetail, SplitImmaturePlantsRequest, SplitPlantDetails, StandardAllergensDetails, StrainDetail, StrainsGetData, StrainsGetErrors, StrainsGetResponse, StrainsGetResponses, StrainsPostData, StrainsPostError, StrainsPostErrors, StrainsPostResponse, StrainsPostResponses, StrainsTypesGetData, StrainsTypesGetErrors, StrainsTypesGetResponse, StrainsTypesGetResponses, StringIEnumerableOptional, StringOptional, SuccessResult, Table, TablePostData, TablePostErrors, TablePostResponse, TablePostResponses, TableTablesGetData, TableTablesGetErrors, TableTablesGetResponse, TableTablesGetResponses, Tag, TagGetData, TagGetErrors, TagGetResponse, TagGetResponses, TaxSummaryInfo, Terminal, TerminalsGetData, TerminalsGetErrors, TerminalsGetResponse, TerminalsGetResponses, Transaction, TransactionCreateAnonymousPostData, TransactionCreateAnonymousPostErrors, TransactionCreateAnonymousPostResponse, TransactionCreateAnonymousPostResponses, TransactionItem, TransactionItemWritable, TransactionWritable, Unit, UnitType, UpdateBatchLabResultsRequest, UpdateBatchRequest, UpdateDeliveryRouteDetailRequest, UpdateJournalEntryRequest, UpdatePackageTagsRequest, UpdatePlantDetails, UpdatePlantsRequest, UpdatePreOrderRequest, UpdateStrain, UploadFileType, UtilAuthorizationHeaderByApiKeyGetData, UtilAuthorizationHeaderByApiKeyGetResponse, UtilAuthorizationHeaderByApiKeyGetResponses, ValidationFailure, ValidationResult, ValidationResultWritable, VehicleDetail, VehiclesGetData, VehiclesGetErrors, VehiclesGetResponse, VehiclesGetResponses, VehiclesPostData, VehiclesPostError, VehiclesPostErrors, VehiclesPostResponses, Vendor, VendorPostData, VendorPostErrors, VendorPostResponse, VendorPostResponses, VendorVendorsGetData, VendorVendorsGetErrors, VendorVendorsGetResponse, VendorVendorsGetResponses, WasteGetData, WasteGetErrors, WasteGetResponse, WasteGetResponses, WasteHarvestWastePostData, WasteHarvestWastePostError, WasteHarvestWastePostErrors, WasteHarvestWastePostResponse, WasteHarvestWastePostResponses, WastePlantWastePostData, WastePlantWastePostError, WastePlantWastePostErrors, WastePlantWastePostResponse, WastePlantWastePostResponses, WasteSummary, WeeklyRecurrenceInfo, WhoamiGetData, WhoamiGetErrors, WhoamiGetResponse, WhoamiGetResponses } from './types.gen';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/transforms-properties-required-by-default/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type ClientOptions = {\n    baseUrl: `${string}://${string}` | 'https://api.pos.dutchie.com' | (string & {});\n};\n\nexport type Address = {\n    addressId: number | null;\n    customerId: number;\n    street: string | null;\n    street2: string | null;\n    city: string | null;\n    state: string | null;\n    postal_code: string | null;\n    country_Code: string | null;\n    latitude: number | null;\n    longitude: number | null;\n    county: string | null;\n    additionalStateIdentifiers: string | null;\n};\n\nexport type AllocatedDeliveryItem = {\n    transactionId: number;\n    productName: string | null;\n    quantity: number;\n    totalPrice: number;\n    totalDiscount: number;\n    totalTax: number;\n};\n\nexport type AllocatedPreOrderItem = {\n    productName: string | null;\n    quantity: number;\n    totalPrice: number;\n    totalDiscount: number;\n    totalTax: number;\n};\n\n/**\n * Anonymous transaction response model containing transaction identifiers for guest checkout operations.\n */\nexport type AnonymousTransaction = {\n    /**\n     * Unique identifier for the customer record associated with this anonymous transaction.\n     */\n    customerId: number;\n    /**\n     * Unique identifier for the transaction record.\n     */\n    transactionId: number;\n    /**\n     * String representation of the unique identifier for API responses.\n     */\n    readonly uniqueId: string | null;\n};\n\n/**\n * Discount information applied to a specific transaction item in cannabis retail operations.\n */\nexport type AppliedDiscount = {\n    /**\n     * Unique identifier for the discount program or campaign applied.\n     */\n    discountId: number;\n    /**\n     * Display name of the discount for customer receipts and reporting.\n     */\n    discountName: string | null;\n    /**\n     * Reason or justification for the discount application (e.g., \"Loyalty Reward\", \"Medical Patient\").\n     */\n    discountReason: string | null;\n    /**\n     * Discount amount applied to the transaction item (in USD, positive value represents savings).\n     */\n    amount: number;\n    /**\n     * Reference identifier linking this discount back to the specific transaction line item.\n     * Not guaranteed to be unique outside of a single transaction.\n     */\n    readonly transactionItemId: number;\n};\n\n/**\n * Request model for assigning existing cannabis plants to a specific plant group for batch management and cultivation workflow organization.\n *\n * **Plant Group Assignment:**\n * - Assigns existing plants to target plant group using serial numbers\n * - Supports batch organization for cultivation workflow management\n * - Plants identified by serial numbers for precise assignment\n * - Validates target plant group exists before assignment\n *\n * **Serial Number Identification:**\n * - Plants identified by their unique serial numbers rather than IDs\n * - All serial numbers must correspond to existing plants in the facility\n * - Plants must be accessible to the authenticated location\n * - Serial numbers must match exact plant tracking identifiers\n *\n * **Batch Management:**\n * - Plant groups enable batch-based cultivation tracking and compliance\n * - Supports harvest planning and cultivation scheduling optimization\n * - Facilitates cultivation management and operational efficiency\n */\nexport type AssignPlantsToGroupRequest = {\n    /**\n     * Name of target plant group for batch organization and cultivation tracking\n     */\n    plantGroupName: string | null;\n    /**\n     * Collection of plant serial numbers to assign to the specified plant group\n     */\n    plantSerialNumbers: Array<string> | null;\n};\n\n/**\n * Field-specific validation error details for BadRequest responses.\n */\nexport type BadRequestPropertyError = {\n    /**\n     * Name of the property that failed validation.\n     */\n    propertyName: string | null;\n    /**\n     * Description of the validation error for the specified property.\n     */\n    propertyError: string | null;\n};\n\n/**\n * Standardized error response model for HTTP 400 Bad Request responses across the API.\n */\nexport type BadRequestResponse = {\n    /**\n     * General error message describing the nature of the bad request.\n     */\n    message: string | null;\n    /**\n     * Collection of field-specific validation errors for detailed feedback.\n     */\n    propertyErrors: Array<BadRequestPropertyError> | null;\n};\n\n/**\n * Detailed specification for creating individual immature plant batches with cultivation and compliance information.\n */\nexport type BatchDetails = {\n    /**\n     * Display name for the immature plant batch for identification and organization.\n     */\n    batchName: string | null;\n    /**\n     * Plant type designation for the batch (e.g., \"Seedling\", \"Clone\", \"Cutting\").\n     */\n    plantType: string | null;\n    /**\n     * Number of plants in the immature batch for inventory tracking and compliance.\n     */\n    plantCount: number;\n    /**\n     * Strain identifier for the cannabis strain being cultivated in this batch.\n     */\n    strainId: number;\n    /**\n     * Room identifier for the immature batch location assignment.\n     */\n    roomId: number;\n    /**\n     * Table identifier within the room for precise location tracking (optional).\n     */\n    tableId: number | null;\n    /**\n     * Mother plant identifier for tracking genetic lineage (required for clone batches).\n     */\n    motherPlantId: number | null;\n    /**\n     * Date when the immature batch was created for cultivation timeline documentation.\n     */\n    dateCreated: string | null;\n};\n\nexport type BooleanNullableOptional = boolean;\n\nexport type BooleanOptional = boolean;\n\nexport type Brand = {\n    brandId: number;\n    brandName: string | null;\n    brandCatalogBrandId: string | null;\n};\n\nexport type BrandEditRequest = {\n    brandId: number | null;\n    brandName: string | null;\n};\n\nexport type BroadcastedResponses = {\n    responses: Array<LocationResponse> | null;\n};\n\nexport type BulkCreateOrUpdateHarvest = {\n    harvests: Array<BulkHarvestDetail> | null;\n};\n\nexport type BulkCreateOrUpdateHarvestResponse = {\n    createdHarvestIds: Array<number> | null;\n    updatedHarvestIds: Array<number> | null;\n};\n\nexport type BulkHarvestDetail = {\n    harvestId: number | null;\n    harvestName: string | null;\n    harvestRoomId: number;\n    harvestDate: string | null;\n    strainId: number;\n};\n\nexport type CalculationMethod = 1 | 2 | 3 | 4 | 5 | 6 | 15;\n\n/**\n * Request model for canceling existing customer pre-orders before fulfillment.\n */\nexport type CancelPreorderRequest = {\n    /**\n     * Unique identifier of the pre-order to be canceled.\n     */\n    orderId: number;\n    /**\n     * Required reason for canceling the order (used for business analytics and customer service).\n     */\n    cancellationReason: string | null;\n};\n\n/**\n * Laboratory test result value model for cannabinoid and terpene measurements in cannabis products.\n */\nexport type CannabinoidTerpeneValue = {\n    /**\n     * Name of the laboratory test result (e.g., \"THC\", \"CBD\", \"Limonene\") - must match predefined compound list.\n     */\n    labResultName: string;\n    /**\n     * Measured value of the compound in the cannabis sample (decimal precision for accurate reporting).\n     */\n    value: number;\n    /**\n     * Unit identifier for the measurement (references LabResultUnit enum - mg/g, percentage, etc.).\n     */\n    labResultUnitId: number;\n};\n\nexport type CartItemPrice = {\n    productName: string | null;\n    productId: number;\n    quantity: number;\n    subtotal: number;\n    pricingTierAdjustment: number | null;\n    discounts: Array<Discount> | null;\n    tax: number;\n};\n\nexport type CartPrice = {\n    cartItemPrices: Array<CartItemPrice> | null;\n    subTotal: number;\n    taxes: number;\n    discount: number;\n    total: number;\n    originalTotal: number;\n    roundedDifference: number;\n};\n\n/**\n * Request model for updating the cultivation growth phase of cannabis plants to track development stages.\n *\n * **Growth Phase Management:**\n * - Updates plant cultivation phase for proper development tracking\n * - Supports bulk processing of multiple plants in single operation\n * - Validates growth phase against allowed phase values\n * - Automatically sets phase start date if not provided\n *\n * **Valid Growth Phases:**\n * - `Propagation`: Initial plant development and cloning phase\n * - `Vegetative`: Active vegetative growth before flowering initiation\n * - `Flowering`: Reproductive growth phase leading to harvest\n *\n * **Phase Transition Rules:**\n * - Phase start date defaults to current UTC time if not specified\n * - Phase changes are logged for cultivation timeline tracking\n * - Integration with external cultivation systems for environmental control\n */\nexport type ChangeGrowthPhaseRequest = {\n    /**\n     * Collection of LeafLogix plant IDs to update to the new growth phase\n     */\n    plantIds: Array<number> | null;\n    /**\n     * Target cultivation growth phase. Must be one of: `Propagation`, `Vegetative`, `Flowering`\n     */\n    growthPhase: string | null;\n    /**\n     * Date when new growth phase begins (optional, defaults to current UTC time if not specified)\n     */\n    phaseStartDate: string | null;\n};\n\n/**\n * Product category sales summary for cannabis retail closing reports and financial analysis.\n */\nexport type ClosingReportCategorySummary = {\n    /**\n     * Product category name (e.g., \"Flower\", \"Edibles\", \"Concentrates\").\n     */\n    category: string | null;\n    /**\n     * Total net sales for the category (calculated property returning CategoryNetTotal).\n     */\n    readonly categoryTotal: number;\n    /**\n     * Gross sales total for the category before discounts (in USD).\n     */\n    categoryGrossTotal: number;\n    /**\n     * Total discount amount applied to products in this category (in USD).\n     */\n    categoryDiscountTotal: number;\n    /**\n     * Net sales total for the category after discounts (in USD).\n     */\n    categoryNetTotal: number;\n    /**\n     * Total cost of goods sold for products in this category (in USD).\n     */\n    categoryCost: number;\n};\n\n/**\n * Customer type sales summary for cannabis retail closing reports and customer segment analysis.\n */\nexport type ClosingReportCustomerTypeSummary = {\n    /**\n     * Customer type classification (e.g., \"Recreational\", \"Medical\", \"Industry\").\n     */\n    customerType: string | null;\n    /**\n     * Total net sales for this customer type (calculated property returning NetTotal).\n     */\n    readonly total: number;\n    /**\n     * Gross sales total for this customer type before discounts (in USD).\n     */\n    grossTotal: number;\n    /**\n     * Net sales total for this customer type after discounts (in USD).\n     */\n    netTotal: number;\n    /**\n     * Total discount amount applied to this customer type (in USD).\n     */\n    discountTotal: number;\n    /**\n     * Total cost of goods sold for this customer type (in USD).\n     */\n    customerTypeCost: number;\n    /**\n     * Cannabis product sales total for this customer type (in USD).\n     */\n    cannabisSales: number;\n    /**\n     * Non-cannabis product sales total for this customer type (accessories, etc.) (in USD).\n     */\n    nonCannabisSales: number;\n};\n\n/**\n * Order source sales summary for cannabis retail closing reports and marketing channel analysis.\n */\nexport type ClosingReportOrderSourceSummary = {\n    /**\n     * Order origination source (e.g., \"Website\", \"Mobile App\", \"Weedmaps\", \"Walk-In\").\n     */\n    orderSource: string | null;\n    /**\n     * Total net sales for this order source (calculated property returning NetTotal).\n     */\n    readonly total: number;\n    /**\n     * Gross sales total for this order source before discounts (in USD).\n     */\n    grossTotal: number;\n    /**\n     * Net sales total for this order source after discounts (in USD).\n     */\n    netTotal: number;\n    /**\n     * Total discount amount applied to this order source (in USD).\n     */\n    discountTotal: number;\n    orderSourceCost: number;\n};\n\n/**\n * Order type sales summary for cannabis retail closing reports and fulfillment channel analysis.\n */\nexport type ClosingReportOrderTypeSummary = {\n    /**\n     * Order fulfillment type (e.g., \"In-Store\", \"Pickup\", \"Delivery\", \"Curbside\").\n     */\n    orderType: string | null;\n    /**\n     * Total net sales for this order type (calculated property returning NetTotal).\n     */\n    readonly total: number;\n    /**\n     * Gross sales total for this order type before discounts (in USD).\n     */\n    grossTotal: number;\n    /**\n     * Net sales total for this order type after discounts (in USD).\n     */\n    netTotal: number;\n    /**\n     * Total discount amount applied to this order type (in USD).\n     */\n    discountTotal: number;\n    /**\n     * Total cost of goods sold for this order type (in USD).\n     */\n    orderTypeCost: number;\n};\n\n/**\n * Pay-by-Bank batch file summary for cannabis payment processing reconciliation.\n */\nexport type ClosingReportPayByBankBatchFileSums = {\n    /**\n     * Batch file name for payment processor identification and tracking.\n     */\n    batchFileName: string | null;\n    /**\n     * Adjustment amount for the batch file for financial reconciliation.\n     */\n    payByBankBatchFileAdjustmentAmount: number;\n};\n\n/**\n * Payment method summary for cannabis retail closing reports and financial reconciliation.\n */\nexport type ClosingReportPaymentSummary = {\n    /**\n     * Payment method type (e.g., \"Cash\", \"Credit Card\", \"CanPay\", \"Hypur\").\n     */\n    paymentType: string | null;\n    /**\n     * Total amount paid using this payment method (in USD).\n     */\n    totalPaid: number;\n};\n\n/**\n * Tax rate summary for cannabis retail closing reports and tax liability tracking.\n */\nexport type ClosingReportTaxRateSummary = {\n    /**\n     * Tax rate name or type (e.g., \"State Excise Tax\", \"City Cannabis Tax\", \"Sales Tax\").\n     */\n    taxRate: string | null;\n    /**\n     * Total tax amount collected for this tax rate (in USD).\n     */\n    totalTax: number;\n};\n\n/**\n * Enhanced closing report model for cannabis dispensary daily financial operations with payment processing integration.\n */\nexport type ClosingReportV2 = {\n    /**\n     * Total tips aggregated for the closing period for staff distribution.\n     */\n    readonly totalTips: number | null;\n    /**\n     * Tips processed through Pay-by-Bank system for electronic tip distribution.\n     */\n    payByBankTips: number;\n    /**\n     * Transaction fees charged by Pay-by-Bank system for cost accounting.\n     */\n    payByBankTransactionFees: number;\n    /**\n     * Batch file summaries for Pay-by-Bank transaction reconciliation.\n     */\n    payByBankBatchFile: Array<ClosingReportPayByBankBatchFileSums> | null;\n    /**\n     * Fees and donations collected during the closing period for compliance reporting.\n     */\n    feesDonations: Array<FeeDonation> | null;\n    /**\n     * DutchiePay tips processed for cannabis payment integration.\n     */\n    readonly dutchiePayTips: number | null;\n    /**\n     * DutchiePay transaction adjustments for cannabis payment processing.\n     */\n    readonly dutchiePayTotalAdjustmentAmount: number | null;\n    /**\n     * DutchiePay batch file summaries for cannabis payment reconciliation.\n     */\n    readonly dutchiePayBatchFileSums: Array<ClosingReportPayByBankBatchFileSums> | null;\n    grossSales: number | null;\n    discount: number | null;\n    loyalty: number | null;\n    totalTax: number | null;\n    cost: number | null;\n    coupons: number | null;\n    itemTotal: number | null;\n    transactionCount: number;\n    itemCount: number;\n    customerCount: number;\n    newCustomerCount: number;\n    voidCount: number;\n    voidTotal: number | null;\n    returnTotal: number | null;\n    startingBalance: number | null;\n    endingBalance: number | null;\n    deposits: number | null;\n    adjustments: number | null;\n    totalPayments: number | null;\n    invoiceTotal: number | null;\n    cannabisSales: number | null;\n    nonCannabisSales: number | null;\n    netSales: number | null;\n    revenueFeesDonations: number | null;\n    nonRevenueFeesDonations: number | null;\n    rounding: number | null;\n    totalIncome: number | null;\n    averageCartNetSales: number | null;\n    readonly overShort: number | null;\n    categorySummary: Array<ClosingReportCategorySummary> | null;\n    paymentSummary: Array<ClosingReportPaymentSummary> | null;\n    taxSummary: Array<ClosingReportTaxRateSummary> | null;\n    customerTypeSummary: Array<ClosingReportCustomerTypeSummary> | null;\n    orderTypeSummary: Array<ClosingReportOrderTypeSummary> | null;\n    orderSourceSummary: Array<ClosingReportOrderSourceSummary> | null;\n};\n\n/**\n * Detailed specification for converting individual plant batches during cultivation growth phase transitions.\n */\nexport type ConvertBatchDetails = {\n    /**\n     * Batch identifier for the plant batch being converted to mature growth phase.\n     */\n    batchId: number;\n    /**\n     * Collection of individual plant serial numbers within the batch for state tracking compliance.\n     */\n    serialNumbers: Array<string> | null;\n    /**\n     * Target growth stage for the batch conversion (e.g., \"Vegetative\", \"Flowering\").\n     */\n    batchStage: string | null;\n    /**\n     * Destination room identifier for the converted batch location tracking.\n     */\n    roomId: number;\n    /**\n     * Destination table identifier within the room for precise location tracking (optional).\n     */\n    tableId: number | null;\n    /**\n     * Date when the batch conversion was performed for cultivation timeline documentation.\n     */\n    dateCreated: string | null;\n};\n\n/**\n * Request model for converting immature plant batches to mature growth phases in cannabis cultivation operations.\n */\nexport type ConvertImmatureBatchRequest = {\n    /**\n     * Collection of plant batches to be converted from immature to mature growth phases.\n     */\n    batches: Array<ConvertBatchDetails> | null;\n};\n\n/**\n * Response model for immature plant batch conversion operations containing converted mature plant identifiers.\n */\nexport type ConvertImmaturePlantResponse = {\n    /**\n     * Collection of mature plants created from immature batch conversion.\n     */\n    convertedPlants: Array<CreatedMaturePlant> | null;\n};\n\nexport type ConvertImmaturePlantResponseApiResult = {\n    result: boolean;\n    message: string | null;\n    data: ConvertImmaturePlantResponse;\n};\n\n/**\n * Request model for creating anonymous transactions for guest customer operations.\n */\nexport type CreateAnonymousTransactionRequest = {\n    /**\n     * Optional reference identifier for the transaction (for external system integration).\n     */\n    transactionReference: string | null;\n};\n\n/**\n * Response model for immature plant batch creation operations containing created batch and plant identifiers.\n */\nexport type CreateImmaturePlantBatchResponse = {\n    /**\n     * Collection of created immature plant batches with associated plant identifiers.\n     */\n    batches: Array<CreatedImmaturePlantBatch> | null;\n};\n\nexport type CreateImmaturePlantBatchResponseApiResult = {\n    result: boolean;\n    message: string | null;\n    data: CreateImmaturePlantBatchResponse;\n};\n\n/**\n * Request model for creating new customer journal entries with interaction details and notes.\n */\nexport type CreateJournalEntryRequest = {\n    /**\n     * The customer ID to create the journal entry for.\n     */\n    customerId: number;\n    /**\n     * Brief title or summary of the journal entry.\n     */\n    subject: string;\n    /**\n     * Detailed content and notes for the journal entry.\n     */\n    body: string;\n    /**\n     * Date and time when the journal entry should be dated.\n     */\n    date: string;\n};\n\n/**\n * Request model for creating mature plant batches in cannabis cultivation operations.\n */\nexport type CreateMatureBatchRequest = {\n    /**\n     * Collection of mature plant batch specifications for bulk batch creation operations.\n     */\n    batches: Array<MatureBatchDetails> | null;\n};\n\n/**\n * Response model for mature plant batch creation operations containing created mature plant identifiers.\n */\nexport type CreateMaturePlantsResponse = {\n    /**\n     * Collection of mature plants created ready for flowering phase cultivation.\n     */\n    createdPlants: Array<CreatedMaturePlant> | null;\n};\n\nexport type CreateMaturePlantsResponseApiResult = {\n    result: boolean;\n    message: string | null;\n    data: CreateMaturePlantsResponse;\n};\n\nexport type CreateOrUpdateHarvest = {\n    harvestId: number | null;\n    harvestName: string | null;\n    strainName: string | null;\n    harvestRoomId: number;\n    harvestDate: string;\n};\n\nexport type CreatePlantRequest = {\n    serialNumber: string | null;\n    plantGroupName: string | null;\n    growthPhase: string | null;\n    phaseStartDate: string | null;\n    dateCreated: string | null;\n    bornDate: string | null;\n    strain: string | null;\n    room: string | null;\n    table: string | null;\n    isMother: boolean;\n    bypassStateIntegration: boolean;\n};\n\nexport type CreatePreOrderRequest = {\n    customerId: number;\n    items?: Array<PreOrderItem> | null;\n    redemptions?: Array<PreOrderRedemption> | null;\n    isDelivery?: boolean;\n    /**\n     * @deprecated\n     */\n    orderSource?: string | null;\n    orderType?: string | null;\n    deliveryStreet?: string | null;\n    deliveryStreet2?: string | null;\n    deliveryCity?: string | null;\n    deliveryState?: string | null;\n    deliveryPostalCode?: string | null;\n    idempotencyKey?: string | null;\n    notes?: string | null;\n    status?: string | null;\n    transactionReference?: string | null;\n    timeWindowStartDateUtc?: string | null;\n    timeWindowEndDateUtc?: string | null;\n    deliveryScheduleId?: DeliveryScheduleType;\n};\n\nexport type CreateUpdatePurchaseOrderItemRequest = {\n    productId: number;\n    unitId: Int32NullableOptional;\n    quantity: Int32NullableOptional;\n    subtotal: DecimalNullableOptional;\n    tax: DecimalNullableOptional;\n};\n\nexport type CreateUpdatePurchaseOrderRequest = {\n    purchaseOrderId: number | null;\n    expectedArrivalDate: DateTimeNullableOptional;\n    title: StringOptional;\n    dateReceived: DateTimeNullableOptional;\n    shippingInformation: StringOptional;\n    vendorContact: StringOptional;\n    status: StringOptional;\n    vendorId: Int32NullableOptional;\n    purchaseOrderNumber: Int32NullableOptional;\n    purchaseOrderItems: Array<CreateUpdatePurchaseOrderItemRequest> | null;\n};\n\nexport type CreateUpdatePurchaseOrderResponse = {\n    createdPurchaseOrderIds: Array<number> | null;\n    updatedPurchaseOrderIds: Array<number> | null;\n};\n\nexport type CreateUpdatePurchaseOrdersRequest = {\n    purchaseOrders: Array<CreateUpdatePurchaseOrderRequest> | null;\n};\n\n/**\n * Individual created immature plant batch containing batch identifier and associated plant IDs.\n */\nexport type CreatedImmaturePlantBatch = {\n    /**\n     * Unique identifier assigned to the created immature plant batch.\n     */\n    batchId: number;\n    /**\n     * Collection of unique plant identifiers created within this batch.\n     */\n    plantIds: Array<number> | null;\n};\n\nexport type CreatedMaturePlant = {\n    batchId: number;\n    plantId: number;\n    plantSerialNumber: string | null;\n};\n\n/**\n * Represents a customer profile with personal information, contact details, and cannabis compliance data.\n */\nexport type Customer = {\n    /**\n     * Unique internal identifier for the customer record.\n     */\n    customerId: number;\n    /**\n     * String representation of UniqueId for external API consumption.\n     */\n    readonly uniqueId: string | null;\n    /**\n     * Deprecated name field (use FirstName and LastName instead).\n     *\n     * @deprecated\n     */\n    name: string | null;\n    /**\n     * Customer's first name.\n     */\n    firstName: string | null;\n    /**\n     * Customer's last name.\n     */\n    lastName: string | null;\n    /**\n     * Customer's middle name.\n     */\n    middleName: string | null;\n    /**\n     * Name suffix (Jr., Sr., III, etc.).\n     */\n    nameSuffix: string | null;\n    /**\n     * Name prefix (Mr., Mrs., Dr., etc.).\n     */\n    namePrefix: string | null;\n    /**\n     * Primary street address line.\n     */\n    address1: string | null;\n    /**\n     * Secondary address line (apartment, suite, etc.).\n     */\n    address2: string | null;\n    /**\n     * City name.\n     */\n    city: string | null;\n    /**\n     * State or province.\n     */\n    state: string | null;\n    /**\n     * Postal or ZIP code.\n     */\n    postalCode: string | null;\n    /**\n     * Primary phone number.\n     */\n    phone: string | null;\n    /**\n     * Cell phone number.\n     */\n    cellPhone: string | null;\n    /**\n     * Email address.\n     */\n    emailAddress: string | null;\n    /**\n     * Customer account status.\n     */\n    status: string | null;\n    /**\n     * Medical marijuana identification number.\n     */\n    mmjidNumber: string | null;\n    /**\n     * Medical marijuana ID expiration date.\n     */\n    mmjidExpirationDate: string | null;\n    /**\n     * Last modification timestamp in UTC format.\n     */\n    lastModifiedDateUTC: string | null;\n    /**\n     * Customer record creation date.\n     */\n    creationDate: string | null;\n    /**\n     * Customer type classification.\n     */\n    customerType: string | null;\n    /**\n     * Customer's gender.\n     */\n    gender: string | null;\n    /**\n     * SHA2_256 hash of the Driver License ID\n     */\n    driversLicenseHash: string | null;\n    /**\n     * Customer's date of birth.\n     */\n    dateOfBirth: string | null;\n    /**\n     * External system customer identifier.\n     */\n    externalCustomerId: string | null;\n    /**\n     * Name of the integration system that created this customer.\n     */\n    createdByIntegrator: string | null;\n    /**\n     * Indicates if this is an anonymous customer record.\n     */\n    isAnonymous: boolean;\n    /**\n     * How the customer heard about the dispensary.\n     */\n    referralSource: string | null;\n    /**\n     * Additional details about referral source when \"Other\" is selected.\n     */\n    otherReferralSource: string | null;\n    /**\n     * SpringBig loyalty system member identifier.\n     */\n    springBigMemberId: number;\n    /**\n     * Custom identifier for external system integration.\n     */\n    customIdentifier: string | null;\n    /**\n     * Collection of active discount groups for this customer.\n     */\n    readonly discountGroups: Array<string> | null;\n    /**\n     * Location where this customer record was created.\n     */\n    createdAtLocation: string | null;\n    /**\n     * Additional notes about the customer.\n     */\n    notes: string | null;\n    /**\n     * Indicates if customer is enrolled in loyalty program.\n     */\n    isLoyaltyMember: boolean | null;\n    /**\n     * Primary medical condition for medical marijuana patients.\n     */\n    primaryQualifyingCondition: string | null;\n    /**\n     * Additional medical conditions for medical marijuana patients.\n     */\n    secondaryQualifyingConditions: Array<string> | null;\n    /**\n     * Customer ID this record was merged into (if applicable).\n     */\n    mergedIntoCustomerId: number | null;\n    /**\n     * Customer's marketing communication preference.\n     */\n    optedIntoMarketing: boolean | null;\n    /**\n     * Customer's current loyalty program tier.\n     */\n    loyaltyTier: string | null;\n};\n\n/**\n * Search criteria model for customer lookup operations with flexible matching options.\n */\nexport type CustomerSearchRequest = {\n    /**\n     * Customer's last name for name-based search matching.\n     */\n    lastName: string | null;\n    /**\n     * Customer's date of birth for identity verification and precise matching.\n     */\n    dateOfBirth: string | null;\n    /**\n     * Customer's phone number for contact-based search matching.\n     */\n    phone: string | null;\n    /**\n     * Customer's email address for account-based search matching.\n     */\n    emailAddress: string | null;\n    /**\n     * Medical marijuana identification number for regulatory compliance search.\n     */\n    mmjidNumber: string | null;\n    /**\n     * Driver's license identifier for government ID-based search matching.\n     */\n    driversLicenseId: string | null;\n};\n\n/**\n * Extended customer model that includes search match type information for customer lookup operations.\n */\nexport type CustomerSearchResult = {\n    /**\n     * Indicates how the customer record was matched during the search operation.\n     */\n    matchType: string | null;\n    /**\n     * Unique internal identifier for the customer record.\n     */\n    customerId: number;\n    /**\n     * String representation of UniqueId for external API consumption.\n     */\n    readonly uniqueId: string | null;\n    /**\n     * Deprecated name field (use FirstName and LastName instead).\n     *\n     * @deprecated\n     */\n    name: string | null;\n    /**\n     * Customer's first name.\n     */\n    firstName: string | null;\n    /**\n     * Customer's last name.\n     */\n    lastName: string | null;\n    /**\n     * Customer's middle name.\n     */\n    middleName: string | null;\n    /**\n     * Name suffix (Jr., Sr., III, etc.).\n     */\n    nameSuffix: string | null;\n    /**\n     * Name prefix (Mr., Mrs., Dr., etc.).\n     */\n    namePrefix: string | null;\n    /**\n     * Primary street address line.\n     */\n    address1: string | null;\n    /**\n     * Secondary address line (apartment, suite, etc.).\n     */\n    address2: string | null;\n    /**\n     * City name.\n     */\n    city: string | null;\n    /**\n     * State or province.\n     */\n    state: string | null;\n    /**\n     * Postal or ZIP code.\n     */\n    postalCode: string | null;\n    /**\n     * Primary phone number.\n     */\n    phone: string | null;\n    /**\n     * Cell phone number.\n     */\n    cellPhone: string | null;\n    /**\n     * Email address.\n     */\n    emailAddress: string | null;\n    /**\n     * Customer account status.\n     */\n    status: string | null;\n    /**\n     * Medical marijuana identification number.\n     */\n    mmjidNumber: string | null;\n    /**\n     * Medical marijuana ID expiration date.\n     */\n    mmjidExpirationDate: string | null;\n    /**\n     * Last modification timestamp in UTC format.\n     */\n    lastModifiedDateUTC: string | null;\n    /**\n     * Customer record creation date.\n     */\n    creationDate: string | null;\n    /**\n     * Customer type classification.\n     */\n    customerType: string | null;\n    /**\n     * Customer's gender.\n     */\n    gender: string | null;\n    /**\n     * SHA2_256 hash of the Driver License ID\n     */\n    driversLicenseHash: string | null;\n    /**\n     * Customer's date of birth.\n     */\n    dateOfBirth: string | null;\n    /**\n     * External system customer identifier.\n     */\n    externalCustomerId: string | null;\n    /**\n     * Name of the integration system that created this customer.\n     */\n    createdByIntegrator: string | null;\n    /**\n     * Indicates if this is an anonymous customer record.\n     */\n    isAnonymous: boolean;\n    /**\n     * How the customer heard about the dispensary.\n     */\n    referralSource: string | null;\n    /**\n     * Additional details about referral source when \"Other\" is selected.\n     */\n    otherReferralSource: string | null;\n    /**\n     * SpringBig loyalty system member identifier.\n     */\n    springBigMemberId: number;\n    /**\n     * Custom identifier for external system integration.\n     */\n    customIdentifier: string | null;\n    /**\n     * Collection of active discount groups for this customer.\n     */\n    readonly discountGroups: Array<string> | null;\n    /**\n     * Location where this customer record was created.\n     */\n    createdAtLocation: string | null;\n    /**\n     * Additional notes about the customer.\n     */\n    notes: string | null;\n    /**\n     * Indicates if customer is enrolled in loyalty program.\n     */\n    isLoyaltyMember: boolean | null;\n    /**\n     * Primary medical condition for medical marijuana patients.\n     */\n    primaryQualifyingCondition: string | null;\n    /**\n     * Additional medical conditions for medical marijuana patients.\n     */\n    secondaryQualifyingConditions: Array<string> | null;\n    /**\n     * Customer ID this record was merged into (if applicable).\n     */\n    mergedIntoCustomerId: number | null;\n    /**\n     * Customer's marketing communication preference.\n     */\n    optedIntoMarketing: boolean | null;\n    /**\n     * Customer's current loyalty program tier.\n     */\n    loyaltyTier: string | null;\n};\n\n/**\n * Represents a customer type classification for cannabis dispensary operations and compliance.\n */\nexport type CustomerType = {\n    /**\n     * Unique identifier for the customer type.\n     */\n    id: number;\n    /**\n     * Display name of the customer type.\n     */\n    name: string | null;\n    /**\n     * Indicates whether this customer type is for medical marijuana patients.\n     */\n    isMedical: boolean;\n    /**\n     * Indicates whether this customer type is for retail (adult-use) customers.\n     */\n    isRetail: boolean;\n};\n\nexport type DateTimeNullableOptional = string;\n\nexport type DecimalNullableOptional = number;\n\n/**\n * Request model for deleting a product image through the product image management API.\n */\nexport type DeleteImageRequest = {\n    /**\n     * The unique identifier of the product that owns the image to be deleted.\n     */\n    productId: number;\n    /**\n     * The unique identifier of the specific image to be deleted from the product.\n     */\n    imageId: number;\n};\n\nexport type DeliveryOrderStatus = {\n    preOrderId: number | null;\n    transactionId: number;\n    status: string | null;\n    orderDate: string;\n    customerFirstName: string | null;\n    customerLastName: string | null;\n    customerId: number;\n    orderType: string | null;\n    orderSource: string | null;\n    rejectedReason: string | null;\n    total: number | null;\n    subTotal: number | null;\n    totalTax: number | null;\n    streetAddress1: string | null;\n    streetAddress2: string | null;\n    city: string | null;\n    deliveryState: string | null;\n    postalCode: string | null;\n    customerPhone: string | null;\n    customerExpectedTimeStart: string;\n    customerExpectedTimeEnd: string;\n    dispatchDepartTime: string;\n    dispatchArriveTime: string;\n    items: Array<AllocatedDeliveryItem> | null;\n    payments: Array<DeliveryPayment> | null;\n    deliveryStatus: string | null;\n};\n\nexport type DeliveryPayment = {\n    name: string | null;\n    amount: number;\n};\n\nexport type DeliveryScheduleType = 1 | 2;\n\nexport type Discount = {\n    name: string | null;\n    amount: number;\n    discountId: number | null;\n};\n\nexport type DiscountApiResponse = {\n    id: number | null;\n    externalId: string | null;\n    validDateFrom: string | null;\n    validDateTo: string | null;\n    maxRedemptions: number | null;\n    redemptionLimit: number | null;\n    firstTimeCustomerOnly: DiscountFirstTimeCustomer;\n    discountDescription: string | null;\n    discountCode: string | null;\n    applicationMethodId: DiscountApplicationMethod;\n    readonly applicationMethod: string | null;\n    canStackAutomatically: boolean;\n    onlineName: string | null;\n    locationRestrictions: Array<number> | null;\n    restrictToGroupIds: Array<number> | null;\n    monday: boolean | null;\n    tuesday: boolean | null;\n    wednesday: boolean | null;\n    thursday: boolean | null;\n    friday: boolean | null;\n    saturday: boolean | null;\n    sunday: boolean | null;\n    isActive: boolean;\n    isBundledDiscount: boolean;\n    constraints: Array<DiscountConstraintApiResponse> | null;\n    reward: DiscountRewardApiResponse;\n    menuDisplay: DiscountMenuDisplayApiResponse;\n    paymentRestrictions: DiscountPaymentRestrictionApiResponse;\n};\n\nexport type DiscountApplicationMethod = 1 | 2 | 3 | 4 | 5 | 6;\n\nexport type DiscountConstraintApiResponse = {\n    discountConstraintId: number | null;\n    discountId: number;\n    thresholdMin: number | null;\n    includeNonCannabis: boolean;\n    thresholdTypeId: DiscountThresholdType;\n    readonly thresholdType: string | null;\n    readonly hasThreshold: boolean;\n    discountItemGroupTypeId: DiscountItemGroupType;\n    readonly itemGroupType: string | null;\n    restrictions: {\n        [key: string]: IRestrictionApiResponse;\n    } | null;\n};\n\nexport type DiscountFirstTimeCustomer = 0 | 1 | 2;\n\n/**\n * Discount group model for organizing and categorizing related discounts.\n */\nexport type DiscountGroup = {\n    /**\n     * Unique identifier for the discount group.\n     */\n    discountGroupId: number;\n    /**\n     * Display name of the discount group for management and organization.\n     */\n    discountGroupName: string | null;\n};\n\nexport type DiscountItemGroupType = 5 | 6;\n\nexport type DiscountMenuDisplayApiResponse = {\n    menuDisplayDescription: string | null;\n    menuDisplayImageUrl: string | null;\n    menuDisplayName: string | null;\n    menuDisplayRank: number;\n};\n\nexport type DiscountPaymentRestrictionApiResponse = {\n    payByBankSignupIncentive: boolean;\n};\n\n/**\n * Discount restriction model defining entity inclusion or exclusion rules for discount application.\n */\nexport type DiscountRestriction = {\n    /**\n     * Collection of entity identifiers subject to the restriction rule.\n     */\n    ids: Array<number> | null;\n    /**\n     * Indicates if this is an exclusion rule (true) or inclusion rule (false).\n     */\n    isExclusion: boolean;\n};\n\nexport type DiscountRewardApiResponse = {\n    discountRewardId: number | null;\n    discountId: number;\n    calculationMethodId: CalculationMethod;\n    readonly calculationMethod: string | null;\n    discountValue: number;\n    includeNonCannabis: boolean;\n    highestOrLowest: string | null;\n    thresholdTypeId: DiscountThresholdType;\n    readonly thresholdType: string | null;\n    readonly hasThreshold: boolean;\n    itemGroupTypeId: DiscountItemGroupType;\n    readonly itemGroupType: string | null;\n    thresholdMin: number | null;\n    thresholdMax: number | null;\n    applyToOnlyOneItem: boolean;\n    restrictions: {\n        [key: string]: IRestrictionApiResponse;\n    } | null;\n};\n\nexport type DiscountThresholdType = 1 | 2 | 3;\n\nexport type DriverDetail = {\n    driverId: number;\n    name: string | null;\n    stateId: string | null;\n    driversLicense: string | null;\n};\n\n/**\n * E-commerce customer data model for creating or updating customer profiles via API integration.\n */\nexport type EcomCustomerEdit = {\n    /**\n     * When specified, it updates the record, if the ID exists\n     * null / unspecified will create a new customer\n     */\n    customerId?: number | null;\n    /**\n     * Unique identifier for external system integration.\n     */\n    uniqueId?: string | null;\n    /**\n     * Deprecated full name field (use FirstName and LastName instead).\n     *\n     * @deprecated\n     */\n    name?: string | null;\n    /**\n     * Customer's first name (required).\n     */\n    firstName: string;\n    /**\n     * Customer's last name.\n     */\n    lastName?: string | null;\n    /**\n     * Customer's middle name.\n     */\n    middleName?: string | null;\n    /**\n     * Name suffix (Jr., Sr., III, etc.).\n     */\n    nameSuffix?: string | null;\n    /**\n     * Name prefix (Mr., Mrs., Dr., etc.).\n     */\n    namePrefix?: string | null;\n    /**\n     * Primary street address line (required).\n     */\n    address1: string;\n    /**\n     * Secondary address line (apartment, suite, etc.).\n     */\n    address2?: string | null;\n    /**\n     * City name (required).\n     */\n    city: string;\n    /**\n     * State or province (required).\n     */\n    state: string;\n    /**\n     * Postal or ZIP code (required).\n     */\n    postalCode: string;\n    /**\n     * Phone number.\n     */\n    phone?: string | null;\n    /**\n     * Email address.\n     */\n    emailAddress?: string | null;\n    /**\n     * Active; Cancelled; Hold; Banned\n     */\n    status: string;\n    /**\n     * Medical marijuana identification number.\n     */\n    mmjidNumber?: string | null;\n    /**\n     * Driver's license ID.\n     */\n    driversLicenseID?: string | null;\n    /**\n     * Driver's license expiration date.\n     */\n    driversLicenseExpiration?: string | null;\n    /**\n     * Medical marijuana ID expiration date.\n     */\n    mmjidExpirationDate?: string | null;\n    /**\n     * Customer type classification (required). Use CustomerTypes endpoint to retrieve active customer types for a given location.\n     */\n    customerType: string;\n    /**\n     * Customer's date of birth.\n     */\n    dateOfBirth?: string | null;\n    /**\n     * External system customer identifier.\n     */\n    externalCustomerId?: string | null;\n    /**\n     * Customer's gender.\n     */\n    gender?: string | null;\n    /**\n     * Optional idempotency key for duplicate prevention. When provided with a ConsumerKey header, ensures the same customer creation request is not processed multiple times.\n     */\n    idempotencyKey?: string | null;\n    /**\n     * How the customer heard about the dispensary. Use ReferralSources endpoint to retrieve values.\n     */\n    referralSource?: string | null;\n    /**\n     * Custom identifier for external system integration.\n     */\n    customIdentifier?: string | null;\n    /**\n     * Additional notes about the customer.\n     */\n    notes?: string | null;\n    /**\n     * Indicates if customer is enrolled in loyalty program.\n     */\n    isLoyaltyMember?: boolean | null;\n};\n\nexport type Employee = {\n    userId: number;\n    loginId: string | null;\n    fullName: string | null;\n    defaultLocation: string | null;\n    status: string | null;\n    stateId: string | null;\n    mmjExpiration: string;\n    permissionsLocation: string | null;\n    groups: string | null;\n};\n\n/**\n * Fee and donation tracking model for cannabis dispensary compliance and accounting.\n */\nexport type FeeDonation = {\n    /**\n     * Name of the fee or donation for identification and reporting purposes.\n     */\n    name: string | null;\n    /**\n     * Cash value of the fee or donation for financial accounting.\n     */\n    cashValue: number;\n    /**\n     * Flag indicating whether the fee or donation counts as revenue for accounting purposes.\n     */\n    isRevenue: boolean;\n};\n\n/**\n * Fee and donation information associated with cannabis retail transactions.\n */\nexport type FeeDonationInfo = {\n    /**\n     * Unique identifier for the specific fee or donation program.\n     */\n    feeDonationId: number;\n    /**\n     * Description of the fee or donation for customer receipts and reporting.\n     */\n    description: string | null;\n    /**\n     * Amount of the fee or donation (in USD).\n     */\n    amount: number;\n    /**\n     * Indicates whether this fee counts as business revenue for accounting purposes.\n     */\n    isRevenue: boolean;\n};\n\nexport type FinishOrUnfinishBatchDetails = {\n    batchId: number;\n    harvestCompletedOn: string | null;\n};\n\nexport type GuestListEntry = {\n    name: string | null;\n    checkinDateUTC: string;\n    status: string | null;\n    customerId: number;\n    transactionId: number;\n    transactionReferenceNumber: string | null;\n    terminalName: string | null;\n    customerType: string | null;\n    phone: string | null;\n    cellPhone: string | null;\n    preOrderSource: string | null;\n};\n\nexport type Harvest = {\n    harvestId: number;\n    harvestName: string | null;\n    harvestDate: string;\n    harvestRoom: string | null;\n    plantCount: number;\n    plantWeight: number | null;\n    wetWeight: number | null;\n    wetWaste: number | null;\n    dryBudWeight: number | null;\n    dryShakeWeight: number | null;\n    dryWaste: number | null;\n    packageCount: number;\n    packagedWeight: number | null;\n    lastModifiedDateUTC: string;\n    strainName: string | null;\n};\n\n/**\n * Request model for moving cannabis plants from cultivation to harvest status with optional weight tracking.\n *\n * **Request Behavior:**\n * - Moves specified plants from cultivation status to harvesting status\n * - Supports bulk processing of multiple plants in single operation\n * - Optional weight tracking for harvest yield management\n * - Integrates with external cultivation systems when configured\n *\n * **Validation:**\n * - All plant IDs must exist and be accessible to the authenticated location\n * - Plants must be in valid status for harvesting (typically Active status)\n * - Harvest ID must correspond to existing harvest record\n */\nexport type HarvestPlantRequest = {\n    /**\n     * Collection of plants to be harvested with optional weight measurements\n     */\n    plants: Array<HarvestedPlant> | null;\n    /**\n     * Target harvest record ID for associating harvested plants\n     */\n    harvestId: number;\n    /**\n     * Date and time when harvest occurred (optional, defaults to current UTC time if not specified)\n     */\n    harvestedOn: string | null;\n};\n\n/**\n * Harvest waste detail model for tracking waste generated from specific harvest operations.\n */\nexport type HarvestWasteDetail = {\n    /**\n     * Identifier for the harvest batch generating this waste.\n     */\n    harvestId: number;\n    /**\n     * Type or category of waste material from the harvest.\n     */\n    wasteType: string | null;\n    /**\n     * Quantity of waste material generated from the harvest.\n     */\n    wasteAmount: number;\n    /**\n     * Unit of measurement identifier for the waste amount.\n     */\n    unitId: number;\n};\n\n/**\n * Generic waste record model containing waste disposal information and associated detail records for cannabis compliance and waste tracking.\n */\nexport type HarvestWasteDetailWaste = {\n    /**\n     * Unique identifier for the waste record (null for new waste creation).\n     */\n    wasteId: number | null;\n    /**\n     * Reference number for waste tracking and documentation.\n     */\n    referenceNo: string | null;\n    /**\n     * Additional comments or notes about the waste disposal.\n     */\n    comments: string | null;\n    /**\n     * Date when the waste disposal occurred.\n     */\n    wasteDate: string | null;\n    /**\n     * Collection of waste detail records containing specific item information.\n     */\n    wasteDetail: Array<HarvestWasteDetail> | null;\n    /**\n     * Licensed Service Provider identifier (internal use only).\n     */\n    lspId: number | null;\n    /**\n     * Location identifier (internal use only).\n     */\n    locId: number | null;\n    /**\n     * Indicates if room identification is required for this waste type (internal use only).\n     */\n    roomRequired: boolean | null;\n    /**\n     * Indicates if this waste integrates with BioTrack system (internal use only).\n     */\n    isBioTrack: boolean | null;\n};\n\n/**\n * Individual plant harvest information with optional weight tracking for yield management.\n *\n * **Weight Tracking:**\n * - Weight is optional but recommended for harvest yield analysis\n * - Typically represents wet weight at time of harvest\n * - Used for compliance reporting and operational analytics\n */\nexport type HarvestedPlant = {\n    /**\n     * Unique LeafLogix plant identifier for the plant being harvested\n     */\n    plantId: number;\n    /**\n     * Optional harvest weight measurement (typically wet weight in grams)\n     */\n    weight: number | null;\n};\n\nexport type IRestrictionApiResponse = {\n    isExclusion: boolean;\n};\n\nexport type Int32iEnumerableOptional = Array<unknown>;\n\nexport type Int32NullableOptional = number;\n\n/**\n * Integrated payment processing information for cannabis transactions processed through connected payment systems.\n */\nexport type IntegratedPayment = {\n    /**\n     * Type of integrated payment processor used for the transaction (e.g., \"CreditCard\", \"CanPay\", \"ACH\").\n     */\n    integrationType: string | null;\n    /**\n     * Amount paid through the integrated payment system (in USD).\n     */\n    integratedPaid: number;\n    /**\n     * External payment identifier from the integrated payment processor for transaction tracking.\n     */\n    externalPaymentId: string | null;\n};\n\nexport type InventoryDiscrepancy = {\n    inventoryId: number | null;\n    packageId: string | null;\n    quantity: number;\n    roomId: number;\n    unitId: number;\n    externalQuantity: number;\n    externalUnitId: number;\n    equivalentExternalQuantity: number | null;\n    readonly difference: number;\n    productName: string | null;\n    room: string | null;\n    externalRoom: string | null;\n    batchModeQuantity: number | null;\n    bioTrackCategoryName: string | null;\n    externalBioTrackCategoryName: string | null;\n    sku: string | null;\n    unitErrorMsg: string | null;\n    rooms: Array<string> | null;\n    serialNumber: string | null;\n};\n\nexport type InventoryIntegrationReconResponse = {\n    lastUpdated: string | null;\n    discrepancies: Array<InventoryDiscrepancy> | null;\n};\n\n/**\n * Inventory item model representing current stock and product details for available inventory.\n */\nexport type InventoryItem = {\n    /**\n     * Unit of measurement for unit weight, always \"g\" (grams).\n     */\n    unitWeightUnit: string | null;\n    /**\n     * Unique inventory record identifier for this specific inventory item.\n     */\n    inventoryId: number;\n    /**\n     * Product identifier linking this inventory to the product catalog.\n     */\n    productId: number;\n    /**\n     * Stock Keeping Unit (SKU) code for inventory tracking and identification.\n     */\n    sku: string | null;\n    /**\n     * Display name of the product for customer-facing applications.\n     */\n    productName: string | null;\n    /**\n     * Detailed product description including effects, characteristics, and usage information.\n     */\n    description: string | null;\n    /**\n     * Category identifier for product classification (optional).\n     */\n    categoryId: number | null;\n    /**\n     * Category name for product classification and filtering.\n     */\n    category: string | null;\n    /**\n     * URL path to product image for display purposes.\n     */\n    imageUrl: string | null;\n    /**\n     * Current available quantity for sale or transfer.\n     */\n    quantityAvailable: number;\n    /**\n     * Unit of measurement for the available quantity (e.g., \"g\", \"mg\", \"ea\").\n     */\n    quantityUnits: string | null;\n    /**\n     * Weight per unit in grams for dosing and compliance calculations.\n     */\n    unitWeight: number;\n    /**\n     * Flower equivalent amount in grams for compliance tracking.\n     */\n    flowerEquivalent: number;\n    /**\n     * Recreational flower equivalent amount in grams (optional).\n     */\n    recFlowerEquivalent: number | null;\n    /**\n     * Unit of measurement for flower equivalent, always \"g\" (grams).\n     */\n    readonly flowerEquivalentUnits: string | null;\n    /**\n     * Batch identifier for lot tracking and quality control.\n     */\n    batchId: number;\n    /**\n     * Human-readable batch name or lot number for tracking.\n     */\n    batchName: string | null;\n    /**\n     * Package identifier for compliance tracking and traceability.\n     */\n    packageId: string | null;\n    /**\n     * Current status of the package (e.g., \"Active\", \"Testing\", \"Quarantine\").\n     */\n    packageStatus: string | null;\n    /**\n     * Base unit price for retail sales.\n     */\n    unitPrice: number;\n    /**\n     * Medical program pricing (optional, different from retail).\n     */\n    medUnitPrice: number | null;\n    /**\n     * Recreational program pricing (optional, different from medical).\n     */\n    recUnitPrice: number | null;\n    /**\n     * Strain identifier for cannabis products (optional).\n     */\n    strainId: number | null;\n    /**\n     * Strain name for cannabis products.\n     */\n    strain: string | null;\n    /**\n     * Cannabis strain classification (Hybrid, Indica, Sativa, CBD).\n     */\n    strainType: string | null;\n    /**\n     * Product size designation for packaging and dosing information.\n     */\n    size: string | null;\n    /**\n     * Collection of laboratory test results for this batch (included when includeLabResults=true).\n     */\n    labResults: Array<LabResult> | null;\n    /**\n     * Date when laboratory testing was completed (optional).\n     */\n    testedDate: string | null;\n    /**\n     * Date when sample was collected for laboratory testing (optional).\n     */\n    sampleDate: string | null;\n    /**\n     * Date when product was packaged for distribution (optional).\n     */\n    packagedDate: string | null;\n    /**\n     * Date when product was manufactured or produced (optional).\n     */\n    manufacturingDate: string | null;\n    /**\n     * Last modification timestamp in UTC for data synchronization.\n     */\n    lastModifiedDateUtc: string | null;\n    /**\n     * Current status of laboratory testing (e.g., \"Passed\", \"Failed\", \"Pending\").\n     */\n    labTestStatus: string | null;\n    /**\n     * Vendor identifier for the supplier of this inventory (optional).\n     */\n    vendorId: number | null;\n    /**\n     * Vendor name for the supplier of this inventory.\n     */\n    vendor: string | null;\n    /**\n     * Product expiration date for compliance and quality control (optional).\n     */\n    expirationDate: string | null;\n    /**\n     * Quantity breakdown by storage room/location (included when includeRoomQuantities=true).\n     */\n    roomQuantities: Array<InventoryRoomQuantity> | null;\n    /**\n     * Pricing tier classification for bulk pricing strategies.\n     */\n    pricingTierName: string | null;\n    /**\n     * Alternative product name for display purposes.\n     */\n    alternateName: string | null;\n    /**\n     * Collection of compliance tags associated with this inventory package.\n     */\n    tags: Array<InventoryTag> | null;\n    /**\n     * Brand identifier for branded products (optional).\n     */\n    brandId: number | null;\n    /**\n     * Brand name for branded products.\n     */\n    brandName: string | null;\n    /**\n     * Indicates if product is restricted to medical program only.\n     */\n    medicalOnly: boolean;\n    /**\n     * External compliance system ID (METRC or BioTrack) for regulatory tracking.\n     */\n    externalPackageId: string | null;\n    /**\n     * Producer name for cultivation and manufacturing tracking.\n     */\n    producer: string | null;\n    /**\n     * Producer identifier for cultivation and manufacturing tracking (optional).\n     */\n    producerId: number | null;\n    /**\n     * Package lineage information for traceability and compliance tracking.\n     */\n    lineage: Array<PackageLineage> | null;\n    /**\n     * Potency classification indicator for dosing guidance.\n     */\n    potencyIndicator: string | null;\n    /**\n     * Master category classification for product grouping.\n     */\n    masterCategory: string | null;\n    /**\n     * Effective potency in milligrams for dosing calculations (optional).\n     */\n    effectivePotencyMg: number | null;\n    /**\n     * Indicates if product contains cannabis or is cannabis-related.\n     */\n    isCannabis: boolean;\n    /**\n     * National Drug Code for pharmaceutical tracking (optional).\n     */\n    packageNDC: string | null;\n    /**\n     * URL to certificate of analysis or lab testing document.\n     */\n    labResultUrl: string | null;\n};\n\n/**\n * Cannabis inventory quantity tracking model by room location for facility management and compliance.\n */\nexport type InventoryRoomQuantity = {\n    /**\n     * Room identifier for the storage location.\n     */\n    roomId: number;\n    /**\n     * Room name or description for the storage location.\n     */\n    room: string | null;\n    /**\n     * Quantity of cannabis product available in this specific room location.\n     */\n    quantityAvailable: number;\n};\n\n/**\n * Historical inventory snapshot model representing inventory levels at a specific point in time.\n */\nexport type InventorySnapshot = {\n    /**\n     * Stock Keeping Unit (SKU) code for product identification.\n     */\n    sku: string;\n    /**\n     * Product name as it existed at the snapshot date.\n     */\n    product: string;\n    /**\n     * Product identifier linking to the product catalog.\n     */\n    productId: number;\n    /**\n     * Storage room name where inventory was located at snapshot time.\n     */\n    room: string;\n    /**\n     * Storage room identifier for location tracking.\n     */\n    roomId: number;\n    /**\n     * Vendor name for the supplier of this inventory (optional).\n     */\n    vendor?: string | null;\n    /**\n     * Package identifier for compliance tracking and traceability.\n     */\n    packageId: string;\n    /**\n     * Batch name or lot number for quality tracking (optional).\n     */\n    batchName?: string | null;\n    /**\n     * Batch identifier for lot tracking (optional).\n     */\n    batchId?: number | null;\n    /**\n     * Inventory quantity as it existed at the snapshot date.\n     */\n    quantity: number;\n    /**\n     * Total cost value of the inventory quantity (optional).\n     */\n    totalCost?: number | null;\n    /**\n     * Unit of measurement for the quantity.\n     */\n    unit: string;\n    /**\n     * Unit identifier for the measurement type.\n     */\n    unitId: number;\n    /**\n     * Inventory status at the time of snapshot (e.g., \"Active\", \"Quarantine\").\n     */\n    status?: string | null;\n    /**\n     * Date and time when this inventory snapshot was captured.\n     */\n    snapshotDate: string;\n    /**\n     * Inventory record identifier linking to the specific inventory item.\n     */\n    inventoryId: number;\n};\n\nexport type InventoryTag = {\n    tagId: number;\n    tagName: string | null;\n    packageId: string | null;\n};\n\n/**\n * Inventory transaction record model representing historical inventory movement and modification operations.\n */\nexport type InventoryTransaction = {\n    /**\n     * Unique identifier for the inventory transaction record.\n     */\n    inventoryTransactionId: number;\n    /**\n     * Type of inventory transaction performed.\n     * **Options**: Move, Convert, Adjust, Combine, Receive, Change Product, Discontinue, Detail Update, Reconciliation, Create Package\n     */\n    transactionType?: string | null;\n    /**\n     * Product name at the time of transaction.\n     */\n    product?: string | null;\n    /**\n     * Stock Keeping Unit (SKU) code for the product.\n     */\n    sku?: string | null;\n    /**\n     * Product identifier linking to the product catalog.\n     */\n    productId?: number;\n    /**\n     * Unit of measurement for the transaction quantities.\n     */\n    unit?: string | null;\n    /**\n     * Package identifier for compliance tracking and traceability.\n     */\n    packageId?: string | null;\n    /**\n     * External package identifier from integrated compliance systems.\n     */\n    externalPackageId?: string | null;\n    /**\n     * Batch identifier for lot tracking (optional).\n     */\n    batchId?: number | null;\n    /**\n     * Batch name or lot number for quality tracking (optional).\n     */\n    batchName?: string | null;\n    /**\n     * Transaction quantity for non-adjustment operations (Move, Convert, Receive, etc.).\n     */\n    quantity?: number | null;\n    /**\n     * Original quantity before adjustment (used for Adjust transaction type).\n     */\n    fromQuantity?: number | null;\n    /**\n     * New quantity after adjustment (used for Adjust transaction type).\n     */\n    toQuantity?: number | null;\n    /**\n     * Reason for adjustment (used for Adjust transaction type).\n     */\n    reason?: string | null;\n    /**\n     * Receive inventory history identifier for received inventory linkage (optional).\n     */\n    receiveInventoryHistoryId?: number | null;\n    /**\n     * Source location name for Move transactions.\n     */\n    fromLocation?: string | null;\n    /**\n     * Source room name for Move transactions.\n     */\n    fromRoom?: string | null;\n    /**\n     * Destination location name for Move transactions.\n     */\n    toLocation?: string | null;\n    /**\n     * Destination room name for Move transactions.\n     */\n    toRoom?: string | null;\n    /**\n     * Conversion transaction identifier for Convert operations (optional).\n     */\n    conversionTransactionID?: number | null;\n    /**\n     * Username or identifier of the person who performed the transaction.\n     */\n    transactionBy?: string | null;\n    /**\n     * Date and time when the transaction was performed.\n     */\n    transactionDate?: string;\n    /**\n     * Unit cost of the package at the time of transaction (optional).\n     */\n    unitCost?: number | null;\n    /**\n     * Purchase order identifier for received inventory linkage (optional).\n     */\n    purchaseOrderId?: number | null;\n    /**\n     * Unique inventory item identifier affected by this transaction.\n     */\n    inventoryId?: number;\n};\n\n/**\n * Represents a customer journal entry containing notes and interaction history for customer service tracking.\n */\nexport type JournalEntry = {\n    /**\n     * Unique identifier for the journal entry.\n     */\n    journalEntryId: number;\n    /**\n     * Brief title or summary of the journal entry.\n     */\n    subject: string | null;\n    /**\n     * Detailed content and notes for the journal entry.\n     */\n    body: string | null;\n    /**\n     * Date and time when the journal entry was created or should be dated.\n     */\n    date: string;\n};\n\n/**\n * Laboratory testing result model for cannabis and cannabis product analysis.\n */\nexport type LabResult = {\n    /**\n     * Name of the laboratory test performed (e.g., \"THC\", \"CBD\", \"Myrcene\", \"Total Aerobic Count\").\n     */\n    labTest: string | null;\n    /**\n     * Numeric test result value (null if not detected or not applicable).\n     */\n    value: number | null;\n    labResultUnitId: LabResultUnit;\n    /**\n     * Human-readable unit name corresponding to the LabResultUnitId.\n     */\n    readonly labResultUnit: string | null;\n};\n\nexport type LabResultUnit = 1 | 2 | 3 | 4 | 5 | 6;\n\n/**\n * Laboratory result unit data model for cannabis testing measurements and reporting.\n */\nexport type LabResultUnitData = {\n    /**\n     * Unique identifier for the lab result unit type.\n     */\n    labResultUnitId: number;\n    /**\n     * Display name of the lab result unit (e.g., \"mg\", \"%\", \"mg/g\", \"ND\", \"LOQ\", \"Pass/Fail\").\n     */\n    labResultUnit: string | null;\n};\n\n/**\n * Tax information applied to individual transaction line items in cannabis retail operations.\n */\nexport type LineItemTaxInfo = {\n    /**\n     * Name of the tax rate applied (e.g., \"State Excise Tax\", \"City Cannabis Tax\", \"Sales Tax\").\n     */\n    rateName: string | null;\n    /**\n     * Tax rate as a decimal percentage (e.g., 0.0875 for 8.75% tax rate).\n     */\n    rate: number;\n    /**\n     * Calculated tax amount applied to the line item (in USD).\n     */\n    amount: number;\n    /**\n     * Reference identifier linking this tax information back to the specific transaction line item.\n     * Not guaranteed to be unique outside of a single transaction.\n     */\n    readonly transactionItemId: number;\n};\n\n/**\n * Cannabis genetic lineage model containing hereditary classification information for product categorization and genetic tracking.\n */\nexport type Lineage = {\n    /**\n     * Unique identifier for the genetic lineage.\n     */\n    lineageId: number;\n    /**\n     * Display name for the genetic lineage (e.g., \"Indica\", \"Sativa\", \"Hybrid\").\n     */\n    lineageName: string | null;\n};\n\n/**\n * Location identity model containing complete location and parent company information for API key verification and context identification.\n */\nexport type LocationIdentity = {\n    /**\n     * Unique identifier for the cannabis dispensary location.\n     */\n    locationId: number;\n    /**\n     * Unique identifier for the parent company (LSP - Licensed Service Provider).\n     */\n    lspId: number;\n    /**\n     * Business name of the cannabis dispensary location.\n     */\n    locationName: string | null;\n    /**\n     * Company name of the parent organization (Licensed Service Provider).\n     */\n    lspName: string | null;\n    /**\n     * Primary street address of the dispensary location.\n     */\n    address: string | null;\n    /**\n     * Secondary address line (suite, unit, etc.) if applicable.\n     */\n    address2: string | null;\n    /**\n     * City where the dispensary is located.\n     */\n    city: string | null;\n    /**\n     * State or province where the dispensary is licensed to operate.\n     */\n    state: string | null;\n    /**\n     * Postal code (ZIP code) for the dispensary location.\n     */\n    postalCode: string | null;\n    /**\n     * State-issued cannabis business license number for regulatory compliance.\n     */\n    licenseNumber: string | null;\n    /**\n     * \"Doing Business As\" name if different from the legal business name.\n     */\n    doingBusinessAs: string | null;\n    /**\n     * Indicates whether customer profiles are shared across locations within the organization.\n     */\n    shareCustomerProfiles: boolean;\n    /**\n     * Legacy global unique identifier for the location (deprecated).\n     *\n     * @deprecated\n     */\n    globalId: string | null;\n    /**\n     * Global unique identifier for the location across all systems and integrations.\n     */\n    locationGlobalId: string | null;\n    /**\n     * Global unique identifier for the parent company (LSP) across all systems.\n     */\n    lspGlobalId: string | null;\n    /**\n     * Regional identifier for compliance and API routing (internal use only).\n     */\n    region: string | null;\n    /**\n     * Base64-encoded SHA256 hash of the region identifier for secure regional routing.\n     */\n    readonly regionId: string | null;\n};\n\n/**\n * Location mapping model for associating discounts with specific business locations.\n */\nexport type LocationMapping = {\n    /**\n     * Name of the location where the discount applies.\n     */\n    locationName: string | null;\n};\n\nexport type LocationProductOverride = {\n    productId: number;\n    price: number | null;\n    recPrice: number | null;\n    cost: number | null;\n    onlineAvailable: boolean | null;\n    posAvailable: boolean | null;\n    maxPurchasable: number | null;\n    lowInventoryThreshold: number | null;\n    customMetadata: string | null;\n};\n\nexport type LocationProductOverrideRequest = {\n    /**\n     * Product identifier for the product being configured with location-specific overrides.\n     */\n    productId: number;\n    price: DecimalNullableOptional;\n    recPrice: DecimalNullableOptional;\n    cost: DecimalNullableOptional;\n    onlineAvailable: BooleanNullableOptional;\n    posAvailable: BooleanNullableOptional;\n    maxPurchasable: DecimalNullableOptional;\n    lowInventoryThreshold: DecimalNullableOptional;\n    customMetadata: StringOptional;\n};\n\nexport type LocationResponse = {\n    locationName: string | null;\n    locId: number;\n    licenseNumber: string | null;\n    readonly outcome: string | null;\n    readonly outcomeId: number;\n    broadcastedTo: string | null;\n    errorDetail: string | null;\n};\n\n/**\n * Represents a customer's loyalty program balance and activity snapshot for reporting purposes.\n *\n * Contains current point balances and historical activity for individual customers within the\n * loyalty program. Used for daily balance reporting, customer service inquiries, and loyalty\n * program analytics. Data reflects nightly batch processing and may not include real-time changes.\n */\nexport type LoyaltySnapshot = {\n    /**\n     * Unique identifier for the customer in the loyalty program.\n     * Links this loyalty snapshot to the specific customer account.\n     */\n    customerId: number;\n    /**\n     * Current available loyalty points balance for the customer.\n     * Represents points that can be redeemed for rewards or discounts.\n     */\n    loyaltyBalance: number;\n    /**\n     * Total loyalty points redeemed/spent by the customer over their lifetime.\n     * Historical record of all point redemptions and rewards claimed.\n     */\n    loyaltySpent: number;\n    /**\n     * Total loyalty points earned by the customer over their lifetime.\n     * Historical record of all points awarded through purchases and activities.\n     */\n    loyaltyEarned: number;\n};\n\n/**\n * Manual payment information for cannabis transactions processed outside integrated payment systems.\n */\nexport type ManualPayment = {\n    /**\n     * Name of the manual payment processor or handling method (e.g., \"Cash\", \"Check\", \"Money Order\").\n     */\n    manualPaymentProcessorName: string | null;\n    /**\n     * Amount paid through the manual payment method (in USD).\n     */\n    manualPaid: number;\n};\n\n/**\n * Detailed specification for creating individual mature plant batches with compliance tracking information.\n */\nexport type MatureBatchDetails = {\n    /**\n     * Batch identifier for the mature plant batch being created.\n     */\n    batchId: number;\n    /**\n     * Collection of individual plant serial numbers within the mature batch for state tracking compliance.\n     */\n    serialNumbers: Array<string> | null;\n    /**\n     * Growth stage designation for the mature batch (e.g., \"Vegetative\", \"Flowering\").\n     */\n    batchStage: string | null;\n    /**\n     * Room identifier for the mature batch location assignment.\n     */\n    roomId: number;\n    /**\n     * Table identifier within the room for precise location tracking (optional).\n     */\n    tableId: number | null;\n    /**\n     * Date when the mature batch was created for cultivation timeline documentation.\n     */\n    dateCreated: string | null;\n};\n\n/**\n * Request model for moving cannabis plants to a different cultivation room or table within the same facility.\n *\n * **Movement Behavior:**\n * - Moves specified plants to target room within same facility\n * - Optional table assignment for precise cultivation area management\n * - Validates target room belongs to same facility for security\n * - Automatically updates plant cultivation stage if room has associated stage\n *\n * **Facility Restrictions:**\n * - Target room must belong to same facility as requesting user\n * - Cross-facility plant movements are prohibited for security and compliance\n * - All plant IDs must be accessible to the authenticated location\n *\n * **Integration:**\n * - Movement synchronized with external cultivation systems when configured\n * - Supports cultivation workflow automation and environmental optimization\n */\nexport type MovePlantRequest = {\n    /**\n     * Collection of LeafLogix plant IDs to move to the target room\n     */\n    plantIds: Array<number> | null;\n    /**\n     * Target cultivation room ID within the same facility where plants will be moved\n     */\n    roomId: number;\n    /**\n     * Optional table ID within the target room for precise plant positioning (optional)\n     */\n    tableId: number | null;\n};\n\n/**\n * Generic waste record model containing waste disposal information and associated detail records for cannabis compliance and waste tracking.\n */\nexport type ObjectWaste = {\n    /**\n     * Unique identifier for the waste record (null for new waste creation).\n     */\n    wasteId: number | null;\n    /**\n     * Reference number for waste tracking and documentation.\n     */\n    referenceNo: string | null;\n    /**\n     * Additional comments or notes about the waste disposal.\n     */\n    comments: string | null;\n    /**\n     * Date when the waste disposal occurred.\n     */\n    wasteDate: string | null;\n    /**\n     * Collection of waste detail records containing specific item information.\n     */\n    wasteDetail: Array<{\n        [key: string]: unknown;\n    }> | null;\n    /**\n     * Licensed Service Provider identifier (internal use only).\n     */\n    lspId: number | null;\n    /**\n     * Location identifier (internal use only).\n     */\n    locId: number | null;\n    /**\n     * Indicates if room identification is required for this waste type (internal use only).\n     */\n    roomRequired: boolean | null;\n    /**\n     * Indicates if this waste integrates with BioTrack system (internal use only).\n     */\n    isBioTrack: boolean | null;\n};\n\n/**\n * Package lineage tracking model for cannabis product traceability and regulatory compliance.\n */\nexport type PackageLineage = {\n    /**\n     * Package identifier for the current package in the lineage chain.\n     */\n    packageId: string | null;\n    /**\n     * Number of generations between current package and antecedent package in the lineage chain.\n     */\n    antecedentPackageDistance: number;\n    /**\n     * Flag indicating whether the antecedent package originated from a harvest operation.\n     */\n    antecedentIsHarvest: boolean;\n    /**\n     * Batch name for the current package for lot tracking and quality control.\n     */\n    batchName: string | null;\n    /**\n     * Batch name of the antecedent package for lineage and quality tracking.\n     */\n    antecedentBatchName: string | null;\n};\n\nexport type Plant = {\n    plantId: number;\n    serialNumber: string | null;\n    growthPhase: string | null;\n    type: string | null;\n    harvestedWeight: number | null;\n    status: string | null;\n    plantCount: number | null;\n    isMother: boolean;\n    motherPlantId: number | null;\n    plantedOn: string | null;\n    addedToHarvestOn: string | null;\n    harvestDate: string | null;\n    destroyedDate: string | null;\n    plantGroupName: string | null;\n    strain: string | null;\n    room: string | null;\n    table: string | null;\n    vegetationStartedOn: string | null;\n    vegetationEndedOn: string | null;\n    floweringStartedOn: string | null;\n    floweringEndedOn: string | null;\n    currentPhaseStartDate: string | null;\n    lastModifiedDate: string | null;\n    daysInCurrentPhase: number | null;\n    floweringRoom: string | null;\n    floweringTable: string | null;\n    vegetationRoom: string | null;\n    vegetationTable: string | null;\n    daysInFlowering: number | null;\n    daysInVegetation: number | null;\n    batchId: number;\n    readonly harvestId: number;\n};\n\n/**\n * Plant waste detail model for tracking waste generated from specific plant disposal operations.\n */\nexport type PlantWasteDetail = {\n    /**\n     * Identifier for the plant generating this waste.\n     */\n    plantId: number;\n    /**\n     * Type or category of waste material from the plant.\n     */\n    wasteType: string | null;\n    /**\n     * Quantity of waste material generated from the plant.\n     */\n    wasteAmount: number;\n    /**\n     * Unit of measurement identifier for the waste amount.\n     */\n    unitId: number;\n};\n\n/**\n * Generic waste record model containing waste disposal information and associated detail records for cannabis compliance and waste tracking.\n */\nexport type PlantWasteDetailWaste = {\n    /**\n     * Unique identifier for the waste record (null for new waste creation).\n     */\n    wasteId: number | null;\n    /**\n     * Reference number for waste tracking and documentation.\n     */\n    referenceNo: string | null;\n    /**\n     * Additional comments or notes about the waste disposal.\n     */\n    comments: string | null;\n    /**\n     * Date when the waste disposal occurred.\n     */\n    wasteDate: string | null;\n    /**\n     * Collection of waste detail records containing specific item information.\n     */\n    wasteDetail: Array<PlantWasteDetail> | null;\n    /**\n     * Licensed Service Provider identifier (internal use only).\n     */\n    lspId: number | null;\n    /**\n     * Location identifier (internal use only).\n     */\n    locId: number | null;\n    /**\n     * Indicates if room identification is required for this waste type (internal use only).\n     */\n    roomRequired: boolean | null;\n    /**\n     * Indicates if this waste integrates with BioTrack system (internal use only).\n     */\n    isBioTrack: boolean | null;\n};\n\n/**\n * Request model for creating immature plant batches in cannabis cultivation operations.\n */\nexport type PostImmatureBatchRequest = {\n    /**\n     * Collection of immature plant batch specifications for bulk batch creation operations.\n     */\n    batches: Array<BatchDetails> | null;\n};\n\nexport type PreOrderItem = {\n    productId: number;\n    quantity: number;\n};\n\nexport type PreOrderRedemption = {\n    productId?: number | null;\n    redemptionType: string;\n    redemptionId: string;\n    redemptionDescription?: string | null;\n    redemptionCallbackUrl?: string | null;\n};\n\nexport type PreOrderRedemptionIEnumerableOptional = Array<unknown>;\n\nexport type PreOrderStatus = {\n    preOrderId: number;\n    status: string | null;\n    transactionId: number | null;\n    orderDate: string;\n    customerFirstName: string | null;\n    customerLastName: string | null;\n    customerId: number;\n    orderType: string | null;\n    orderSource: string | null;\n    rejectedReason: string | null;\n    isCancellable: boolean;\n    isUpdateable: boolean;\n    total: number | null;\n    subTotal: number | null;\n    totalTax: number | null;\n    sourceSystem: string | null;\n    items: Array<AllocatedPreOrderItem> | null;\n};\n\nexport type PrecartItem = {\n    productId: number;\n    quantity: number;\n};\n\n/**\n * Request model for calculating pricing, taxes, and discounts for a customer's shopping cart before creating a pre-order.\n */\nexport type PriceCartRequest = {\n    /**\n     * Collection of products in the customer's shopping cart with quantities and specifications.\n     */\n    cart: Array<PrecartItem> | null;\n    /**\n     * Customer type identifier for pricing tier and discount eligibility (e.g., medical, recreational).\n     */\n    customerTypeId: number | null;\n    /**\n     * Unique customer identifier for personalized pricing and loyalty program benefits.\n     */\n    customerId: number | null;\n    /**\n     * Primary street address for delivery orders (used for tax calculation and delivery fee estimation).\n     */\n    deliveryStreet: string | null;\n    /**\n     * Secondary address information (apartment, suite, unit number) for delivery orders.\n     */\n    deliveryStreet2: string | null;\n    /**\n     * City name for delivery address (used for tax jurisdiction determination).\n     */\n    deliveryCity: string | null;\n    /**\n     * State or province for delivery address (used for tax calculation and compliance verification).\n     */\n    deliveryState: string | null;\n    /**\n     * Postal or ZIP code for delivery address (used for precise tax calculation and delivery zones).\n     */\n    deliveryPostalCode: string | null;\n    /**\n     * Indicates whether this is a delivery order (true) or pickup order (false) for tax and fee calculation.\n     */\n    isDelivery: boolean;\n};\n\nexport type PriceEstimates = {\n    discountAmount: number;\n    taxAmount: number;\n    feeAmount: number;\n    subtotal: number;\n    grandTotal: number;\n};\n\n/**\n * Pricing detail information for cannabis products with medical and recreational pricing tiers.\n */\nexport type PricingDetail = {\n    /**\n     * Medical cannabis patient pricing (typically lower due to tax benefits and patient programs).\n     */\n    medPrice: number | null;\n    /**\n     * Recreational adult-use cannabis pricing (standard retail pricing with full taxes).\n     */\n    recPrice: number | null;\n    /**\n     * Pricing tier name for customer segmentation (e.g., \"Standard\", \"VIP\", \"Bulk\", \"Employee\").\n     */\n    pricingTierName: string | null;\n};\n\nexport type PricingTier = {\n    pricingTierId: number;\n    pricingTierName: string | null;\n};\n\nexport type PricingTierData = {\n    startWeight: number | null;\n    endWeight: number | null;\n    price: number;\n    medicalPrice: number;\n};\n\n/**\n * Producer identification model containing basic producer information for product attribution and reference data needs.\n */\nexport type Producer = {\n    /**\n     * Unique identifier for the producer.\n     */\n    producerId: number;\n    /**\n     * Display name of the producer for product attribution and branding.\n     */\n    producerName: string | null;\n};\n\n/**\n * Product category model containing cannabis product classification information for menu organization and product management.\n */\nexport type ProductCategory = {\n    /**\n     * Unique identifier for the product category.\n     */\n    productCategoryId: number;\n    /**\n     * Display name of the product category (e.g., \"Flower\", \"Edibles\", \"Concentrates\").\n     */\n    productCategoryName: string | null;\n    /**\n     * Higher-level master category classification for broader product grouping.\n     */\n    masterCategory: string | null;\n};\n\nexport type ProductDetail = {\n    productId: number;\n    sku: string | null;\n    internalName: string | null;\n    productName: string | null;\n    description: string | null;\n    masterCategory: string | null;\n    categoryId: number | null;\n    category: string | null;\n    imageUrl: string | null;\n    imageUrls: Array<string> | null;\n    strainId: number | null;\n    strain: string | null;\n    strainType: string | null;\n    size: string | null;\n    netWeight: number | null;\n    netWeightUnitId: number | null;\n    readonly netWeightUnit: string | null;\n    brandId: number | null;\n    brandName: string | null;\n    vendorId: number | null;\n    vendorName: string | null;\n    isCannabis: boolean;\n    isActive: boolean;\n    isCoupon: boolean;\n    thcContent: number | null;\n    thcContentUnit: string | null;\n    cbdContent: number | null;\n    cbdContentUnit: string | null;\n    productGrams: number | null;\n    flowerEquivalent: number | null;\n    recFlowerEquivalent: number | null;\n    price: number | null;\n    medPrice: number | null;\n    recPrice: number | null;\n    unitCost: number | null;\n    unitType: string | null;\n    onlineTitle: string | null;\n    onlineDescription: string | null;\n    readonly onlineProduct: boolean | null;\n    posProducts: boolean | null;\n    pricingTier: number | null;\n    onlineAvailable: boolean | null;\n    lowInventoryThreshold: number | null;\n    pricingTierName: string | null;\n    pricingTierDescription: string | null;\n    pricingTierData: Array<PricingTierData> | null;\n    flavor: string | null;\n    alternateName: string | null;\n    lineageName: string | null;\n    distillationName: string | null;\n    maxPurchaseablePerTransaction: number | null;\n    tags: Array<ProductTag> | null;\n    effects: Array<ProductEffect> | null;\n    dosage: string | null;\n    instructions: string | null;\n    allergens: string | null;\n    standardAllergens: StandardAllergensDetails;\n    defaultUnit: string | null;\n    producerId: number | null;\n    producerName: string | null;\n    createdDate: string | null;\n    isMedicalOnly: boolean;\n    lastModifiedDateUTC: string | null;\n    grossWeight: number | null;\n    isTaxable: boolean | null;\n    taxCategories: Array<string> | null;\n    upc: string | null;\n    regulatoryCategory: string | null;\n    ndc: string | null;\n    daysSupply: number | null;\n    readonly illinoisTaxCategory: string | null;\n    externalCategory: string | null;\n    externalId: string | null;\n    syncExternally: boolean;\n    regulatoryName: string | null;\n    broadcastedResponses: BroadcastedResponses;\n    administrationMethod: string | null;\n    unitCBDContentDose: number | null;\n    unitTHCContentDose: number | null;\n    oilVolume: number | null;\n    ingredientList: string | null;\n    expirationDays: number | null;\n    abbreviation: string | null;\n    isTestProduct: boolean;\n    isFinished: boolean;\n    allowAutomaticDiscounts: boolean;\n    servingSize: string | null;\n    servingSizePerUnit: number | null;\n    isNutrient: boolean;\n    approvalDateUTC: string | null;\n    ecomCategory: string | null;\n    ecomSubcategory: string | null;\n    customMetadata: string | null;\n};\n\n/**\n * Product upload model for creating and updating products.\n *\n * ⚠️ **DATA LOSS WARNING**: Most fields will be overwritten with null/zero if not provided.\n * **RECOMMENDED**: Use GET /products first, modify needed fields, then POST the complete object.\n */\nexport type ProductDetailUpload = {\n    /**\n     * The unique identifier for a product in the system.\n     *\n     * **IMPORTANT**: This field determines whether a product is created or updated:\n     * - To CREATE a new product: Omit this field or set to null\n     * - To UPDATE an existing product: You MUST provide the ProductId of the existing product\n     */\n    productId?: number | null;\n    /**\n     * Product SKU - REQUIRED for CREATE operations\n     */\n    sku: string;\n    /**\n     * Product Name - REQUIRED for CREATE operations\n     */\n    productName: string;\n    /**\n     * Deprecated in favor of AlternateName\n     */\n    description?: string | null;\n    alternateName?: string | null;\n    masterCategory?: string | null;\n    category?: string | null;\n    strain?: string | null;\n    /**\n     * Strain type of the specified strain.\n     * Used to disambiguate strains, if duplicates exist.\n     * If no duplicates exist in the location's strain list, this field is not useful.\n     * If duplicates DO exist and this field is not specified, the strain will be chosen by the first one created.\n     */\n    strainType?: string | null;\n    size?: string | null;\n    netWeight?: number | null;\n    /**\n     * Optional.  Abbreviation of the unit of the product's net weight.\n     */\n    netWeightUnit?: string | null;\n    grossWeight?: number | null;\n    brandName?: string | null;\n    vendorName?: string | null;\n    isCannabis?: boolean;\n    isActive?: boolean;\n    thcContent?: number | null;\n    /**\n     * mg; %; mg/g; n.d.\n     */\n    thcContentUnit?: string | null;\n    cbdContent?: number | null;\n    /**\n     * mg; %; mg/g; n.d.\n     */\n    cbdContentUnit?: string | null;\n    productGrams?: number | null;\n    flowerEquivalent?: number | null;\n    recFlowerEquivalent?: number | null;\n    price?: number | null;\n    unitCost?: number | null;\n    unitType?: string | null;\n    onlineTitle?: string | null;\n    onlineDescription?: string | null;\n    onlineProduct?: boolean | null;\n    posProducts?: boolean | null;\n    tags?: Array<number> | null;\n    defaultUnit?: string | null;\n    isMedicalOnly?: boolean | null;\n    isTaxable?: boolean | null;\n    regulatoryCategory?: string | null;\n    ndc?: string | null;\n    daysSupply?: number | null;\n    illinoisTaxCategory?: string | null;\n    externalCategory?: string | null;\n    externalId?: StringOptional;\n    syncExternally?: boolean | null;\n    bypassExternalUpdate?: boolean | null;\n    administrationMethod?: StringOptional;\n    unitCBDContentDose?: DecimalNullableOptional;\n    unitTHCContentDose?: DecimalNullableOptional;\n    oilVolume?: DecimalNullableOptional;\n    ingredientList?: StringOptional;\n    expirationDays?: Int32NullableOptional;\n    abbreviation?: StringOptional;\n    isTestProduct?: BooleanOptional;\n    isFinished?: BooleanOptional;\n    allowAutomaticDiscounts?: BooleanOptional;\n    servingSize?: StringOptional;\n    servingSizePerUnit?: Int32NullableOptional;\n    isNutrient?: BooleanOptional;\n    approvalDateUTC?: DateTimeNullableOptional;\n    customMetadata?: StringOptional;\n    /**\n     * List of strings of tax categories that the product belongs to.\n     */\n    taxCategories?: Array<string> | null;\n    pricingDetails?: PricingDetail;\n    /**\n     * UserName of the user making the product change\n     * This will be used when authorizing with traceability systems (METRC/BioTrack) - if not included or NULL is specified, the traceability integration's \"master key\" will be used, if possible.\n     * This field is only relevant if the request is setting SyncExternally to true\n     */\n    userName?: string | null;\n    instructions?: string | null;\n    upc?: string | null;\n    regulatoryName?: StringOptional;\n    broadcast?: BooleanOptional;\n};\n\nexport type ProductEffect = {\n    effectId: number;\n    effectName: string | null;\n    productId: number;\n};\n\nexport type ProductTag = {\n    tagId: number;\n    tagName: string | null;\n    productId: number;\n};\n\n/**\n * Published discount model containing complete discount configuration and constraint information for customer-facing applications.\n */\nexport type PublishedDiscount = {\n    /**\n     * Unique identifier for the discount.\n     */\n    discountId: number;\n    /**\n     * Display name of the discount for customer-facing applications.\n     */\n    discountName: string | null;\n    /**\n     * Monetary discount amount or percentage value.\n     */\n    discountAmount: number;\n    /**\n     * Promotional code required to apply the discount (optional).\n     */\n    discountCode: string | null;\n    /**\n     * Type classification of the discount (e.g., percentage, fixed amount).\n     */\n    discountType: string | null;\n    /**\n     * Method used to apply the discount (e.g., automatic, code required).\n     */\n    discountMethod: string | null;\n    /**\n     * Indicates if the discount is currently active and available.\n     */\n    isActive: boolean;\n    /**\n     * Start date and time when discount becomes valid (UTC converted from Eastern Time).\n     */\n    validFrom: string | null;\n    /**\n     * End date and time when discount expires (UTC converted from Eastern Time).\n     */\n    validUntil: string | null;\n    /**\n     * Type of threshold requirement for discount eligibility (optional).\n     */\n    thresholdType: string | null;\n    /**\n     * Minimum number of qualifying items required for discount application (optional).\n     */\n    minimumItemsRequired: number | null;\n    /**\n     * Maximum number of items that can receive the discount (optional).\n     */\n    maximumItemsAllowed: number | null;\n    /**\n     * Maximum number of times this discount can be used (optional).\n     */\n    maximumUsageCount: number | null;\n    /**\n     * Indicates if discount applies to non-cannabis products.\n     */\n    includeNonCannabis: boolean;\n    /**\n     * Indicates if discount is restricted to first-time customers only.\n     */\n    firstTimeCustomerOnly: boolean;\n    /**\n     * Indicates if discount can be combined with other discounts.\n     */\n    stackOnOtherDiscounts: boolean;\n    weeklyRecurrenceInfo: WeeklyRecurrenceInfo;\n    products: DiscountRestriction;\n    productCategories: DiscountRestriction;\n    brands: DiscountRestriction;\n    vendors: DiscountRestriction;\n    strains: DiscountRestriction;\n    tiers: DiscountRestriction;\n    tags: DiscountRestriction;\n    inventoryTags: DiscountRestriction;\n    customerTypes: DiscountRestriction;\n    /**\n     * Associated discount groups for bundling and organization (loaded conditionally).\n     */\n    discountGroups: Array<DiscountGroup> | null;\n};\n\nexport type PurchaseOrderData = {\n    purchaseOrderId: number;\n    expectedArrivalDate: string | null;\n    title: string | null;\n    dateReceived: string | null;\n    dateSubmitted: string | null;\n    shippingInformation: string | null;\n    vendorId: number;\n    vendorName: string | null;\n    vendorContact: string | null;\n    status: string | null;\n    purchaseOrderNumber: number;\n    createdByUser: string | null;\n    dateCreated: string | null;\n    purchaseOrderItems: Array<PurchaseOrderItemDetail> | null;\n};\n\nexport type PurchaseOrderItemDetail = {\n    purchaseOrderId: number;\n    purchaseOrderItemId: number;\n    productId: number;\n    productName: string | null;\n    quantity: number;\n    unitId: number;\n    unitName: string | null;\n    unitNameAbbreviation: string | null;\n    subtotal: number;\n    tax: number;\n};\n\n/**\n * Request model for receiving and recording new cannabis inventory items into the facility management system.\n */\nexport type ReceiveInventoryItemSave = {\n    /**\n     * Product identifier for the cannabis product being received into inventory (required).\n     */\n    productId: number;\n    /**\n     * Quantity of the product being received into inventory (required).\n     */\n    quantity: number;\n    /**\n     * Unit type for the received quantity (qty; ml; g; Gal; L; lb; mg; oz; fl oz; kg).\n     */\n    unitType?: string | null;\n    /**\n     * Flower equivalent weight for regulatory compliance and limit calculations.\n     */\n    flowerEquivalent?: number | null;\n    /**\n     * Recreational flower equivalent weight for regulatory compliance tracking.\n     */\n    recFlowerEquivalent?: number | null;\n    /**\n     * Vendor identifier for supply chain tracking and vendor management.\n     */\n    vendorId?: number | null;\n    /**\n     * Room identifier for facility location assignment and space management.\n     */\n    roomId?: number | null;\n    /**\n     * Package identifier from state tracking system for compliance documentation.\n     */\n    packageId?: string | null;\n    /**\n     * Lot number for batch tracking and quality control management.\n     */\n    lot?: string | null;\n    /**\n     * Unit cost for inventory valuation and cost accounting.\n     */\n    cost?: number | null;\n    /**\n     * General retail price for the received inventory item.\n     */\n    price?: number | null;\n    /**\n     * Recreational market price for dual-license operations.\n     */\n    recPrice?: number | null;\n    /**\n     * Tax amount for financial compliance and tax reporting.\n     */\n    tax?: number | null;\n    /**\n     * Product expiration date for inventory rotation and compliance management.\n     */\n    expirationDate?: string | null;\n    /**\n     * Collection of tag identifiers for product categorization and organization.\n     */\n    tags?: Array<number> | null;\n    /**\n     * Cultivation tax amount for cannabis-specific tax compliance.\n     */\n    cultivationTax?: number | null;\n    /**\n     * Table identifier within the room for precise location tracking.\n     */\n    tableId?: number | null;\n    /**\n     * Source allocated inventory identifier for traceability and audit trails.\n     */\n    sourceAllocatedInventoryId?: number | null;\n    /**\n     * Total package cost for comprehensive cost allocation and accounting.\n     */\n    totalPackageCost?: number | null;\n    /**\n     * Flag to retrieve lab results from Metrc for compliance integration.\n     */\n    getMetrcLabResults?: boolean | null;\n    /**\n     * Product name for inventory identification and display purposes.\n     */\n    productName?: string | null;\n    /**\n     * Date when the product was packaged for shelf life tracking.\n     */\n    packagingDate?: string | null;\n    /**\n     * Date when the product was manufactured for quality control tracking.\n     */\n    manufacturingDate?: string | null;\n    /**\n     * Producer identifier for supply chain tracking and compliance documentation.\n     */\n    producerId?: number | null;\n    /**\n     * External package identifier for cross-system integration and tracking.\n     */\n    externalPackageId?: string | null;\n    /**\n     * Potency indicator for product strength classification and customer information.\n     */\n    potencyIndicator?: string | null;\n};\n\n/**\n * Request model for creating inventory receive orders for incoming transfers, purchase orders, or direct inventory additions.\n */\nexport type ReceiveInventorySave = {\n    /**\n     * Vendor identifier for the supplier (optional, can be resolved from VendorLicense).\n     */\n    vendorId?: number | null;\n    /**\n     * Name of the person who delivered the inventory shipment.\n     */\n    deliveredBy?: string | null;\n    /**\n     * Date and time when the inventory was delivered (required).\n     */\n    deliveredOn: string;\n    /**\n     * Vendor license code for compliance tracking and vendor identification.\n     */\n    vendorLicense?: string | null;\n    /**\n     * External transaction reference ID for tracking and reconciliation.\n     */\n    transactionId?: string | null;\n    /**\n     * Descriptive title for the receive order for identification purposes.\n     */\n    orderTitle?: string | null;\n    /**\n     * External system ID for preventing duplicate receives (must be unique).\n     */\n    externalId?: string | null;\n    /**\n     * Additional notes or comments about the receive transaction.\n     */\n    note?: string | null;\n    /**\n     * Collection of inventory items being received in this transaction.\n     */\n    items?: Array<ReceiveInventoryItemSave> | null;\n    /**\n     * Indicates whether to immediately process items into inventory (true) or save as draft (false).\n     */\n    receiveIntoInventory?: boolean | null;\n    /**\n     * User ID for processing the receive (required when ReceiveIntoInventory=true).\n     */\n    userId?: number | null;\n    /**\n     * Username for processing the receive (alternative to UserId, required when ReceiveIntoInventory=true).\n     */\n    userName?: string | null;\n};\n\n/**\n * Received inventory record model representing completed or pending inventory receive orders and their processing status.\n */\nexport type ReceivedInventory = {\n    /**\n     * Unique identifier for the receive inventory transaction.\n     */\n    receiveInventoryHistoryId: number;\n    /**\n     * Descriptive title for the receive order for identification purposes.\n     */\n    title: string | null;\n    /**\n     * Current processing status of the receive order (e.g., \"Pending\", \"Completed\", \"Failed\").\n     */\n    status: string | null;\n    /**\n     * Error message if the receive order failed processing (optional).\n     */\n    failureMessage: string | null;\n    /**\n     * Date and time when the inventory was delivered by the vendor (optional).\n     */\n    deliveredOn: string | null;\n    /**\n     * Date and time when the receive order was created in the system (optional).\n     */\n    addedOn: string | null;\n    /**\n     * Name of the vendor who supplied the inventory.\n     */\n    vendor: string | null;\n    /**\n     * Vendor license code for compliance tracking and verification.\n     */\n    vendorLicense: string | null;\n    /**\n     * Collection of inventory items included in this receive order.\n     */\n    items: Array<ReceivedInventoryItem> | null;\n};\n\n/**\n * Response model representing received cannabis inventory items with complete tracking and financial information.\n */\nexport type ReceivedInventoryItem = {\n    /**\n     * Product name for inventory item identification and display.\n     */\n    product: string | null;\n    /**\n     * Stock Keeping Unit (SKU) for product identification and retail operations.\n     */\n    sku: string | null;\n    /**\n     * Product identifier for database references and system integration.\n     */\n    productId: number | null;\n    /**\n     * Product type classification for cannabis product categorization.\n     */\n    type: string | null;\n    /**\n     * Quantity of the received inventory item for stock tracking.\n     */\n    quantity: number;\n    /**\n     * Unit abbreviation for quantity measurement display (e.g., \"g\", \"oz\", \"ml\").\n     */\n    unitAbbreviation: string | null;\n    /**\n     * Full unit name for quantity measurement (e.g., \"grams\", \"ounces\", \"milliliters\").\n     */\n    unit: string | null;\n    /**\n     * Cost per unit for inventory valuation and financial accounting.\n     */\n    unitCost: number;\n    /**\n     * Tax amount per unit for cannabis tax compliance and reporting.\n     */\n    unitTax: number;\n    /**\n     * Total cost for the received inventory item including all taxes and fees.\n     */\n    totalCost: number;\n    /**\n     * Package identifier from state tracking system for compliance documentation.\n     */\n    packageId: string | null;\n    /**\n     * External package identifier for cross-system tracking and integration.\n     */\n    externalPackageId: string | null;\n    /**\n     * Batch name for lot tracking and quality control management.\n     */\n    batchName: string | null;\n    /**\n     * Batch identifier for database references and batch tracking.\n     */\n    batchId: number | null;\n    /**\n     * Room name for facility location identification and display.\n     */\n    room: string | null;\n    /**\n     * Room identifier for database references and location tracking.\n     */\n    roomId: number | null;\n};\n\n/**\n * Represents a register cash adjustment transaction record for financial reconciliation and audit trails.\n *\n * Register adjustments include manual cash corrections, deposits, withdrawals, close-outs, and other\n * cash management activities that affect register balances. Each adjustment maintains a complete\n * audit trail with employee accountability and reason tracking.\n */\nexport type RegisterAdjustment = {\n    /**\n     * Unique identifier for the register adjustment transaction.\n     * Primary key for tracking and referencing specific adjustment records.\n     */\n    adjustmentId: number;\n    /**\n     * Type of register adjustment being performed.\n     * Common values include \"Adjustment\", \"Close Out\", \"Deposit\", \"Withdrawal\", \"Cash Drop\".\n     */\n    adjustmentType: string | null;\n    /**\n     * Dollar amount of the register adjustment (positive or negative).\n     * Positive values indicate cash added to register, negative values indicate cash removed.\n     */\n    adjustmentAmount: number;\n    /**\n     * Name of the employee who performed the register adjustment.\n     * Used for accountability and audit trail purposes.\n     */\n    adjustedBy: string | null;\n    /**\n     * Date and time when the register adjustment was performed (optional).\n     * Timestamp for audit trail and reconciliation purposes.\n     */\n    adjustedOn: string | null;\n    /**\n     * Name of the register/terminal where the adjustment occurred.\n     * Identifies which physical register or point-of-sale terminal was adjusted.\n     */\n    terminalName: string | null;\n    /**\n     * Unique identifier for the register/terminal where the adjustment occurred.\n     * Numeric identifier for the specific point-of-sale terminal.\n     */\n    terminalId: number;\n    /**\n     * Employee ID of the staff member who performed the adjustment.\n     * Numeric identifier linking to the employee record for accountability.\n     */\n    adjustedByEmployeeId: number;\n    /**\n     * Reason code or description for why the adjustment was made.\n     * Provides business justification for the cash adjustment.\n     */\n    adjustmentReason: string | null;\n    /**\n     * Additional comments or notes about the register adjustment (optional).\n     * Free-text field for additional details or explanations.\n     */\n    comment: string | null;\n};\n\n/**\n * Represents a comprehensive cash flow summary for a specific register terminal.\n *\n * This model provides real-time cash reconciliation data including starting balances,\n * transaction activity, and variance calculations for cash management and balancing\n * purposes. Used for end-of-shift reconciliation and cash discrepancy identification.\n */\nexport type RegisterCashSummary = {\n    /**\n     * Name of the register/terminal for which this cash summary applies.\n     * Identifies the specific point-of-sale terminal or register location.\n     */\n    terminalName: string | null;\n    /**\n     * Starting cash balance for the register at the beginning of the period.\n     * Base amount of cash in the register before any transactions occurred.\n     */\n    startingBalance: number;\n    /**\n     * Ending cash balance for the register at the end of the period.\n     * Final amount of cash in the register after all transactions and adjustments.\n     */\n    endingBalance: number;\n    /**\n     * Total cash sales processed through the register during the period.\n     * Includes all cash payments received for customer transactions.\n     */\n    sales: number;\n    /**\n     * Total cash refunds and returns processed during the period.\n     * Represents cash paid out to customers for returned merchandise.\n     */\n    returns: number;\n    /**\n     * Total cash deposits added to the register during the period.\n     * Includes cash added to the register for operational purposes.\n     */\n    deposits: number;\n    /**\n     * Total register adjustments (positive or negative) made during the period.\n     * Includes manual cash corrections, withdrawals, and balancing entries.\n     */\n    adjustments: number;\n    /**\n     * Cash variance (over or short) compared to expected register balance.\n     * Positive values indicate cash overage, negative values indicate shortage.\n     */\n    overShort: number;\n};\n\n/**\n * Represents a comprehensive register transaction record including sales, adjustments, and cash management activities.\n *\n * This model encompasses all types of register activity including customer sales transactions, cash adjustments,\n * payment processing, register maintenance, and operational activities. Each transaction maintains complete\n * audit trails with employee accountability and detailed financial information.\n */\nexport type RegisterTransaction = {\n    /**\n     * Unique identifier for the register transaction record.\n     * Primary key for tracking and referencing specific transaction activities.\n     */\n    registerTransactionId: number;\n    /**\n     * Type of register transaction being recorded.\n     * Examples include \"Sale\", \"Adjustment\", \"Close Out\", \"Deposit\", \"Withdrawal\", \"Return\", \"Payment\".\n     */\n    transactionType: string | null;\n    /**\n     * Dollar amount of the register transaction (positive or negative).\n     * Represents the financial impact of the transaction on register balances.\n     */\n    transactionAmount: number;\n    /**\n     * Name of the employee who processed the register transaction.\n     * Used for accountability and performance tracking.\n     */\n    transactionBy: string | null;\n    /**\n     * Date and time when the register transaction occurred in UTC (optional).\n     * Timestamp for audit trail and financial reconciliation purposes.\n     */\n    transactionDateUTC: string | null;\n    /**\n     * Reference to the associated business transaction ID (optional).\n     * Links register activity to customer sales transactions when applicable.\n     */\n    transactionId: number | null;\n    /**\n     * Name of the register/terminal where the transaction was processed.\n     * Identifies which physical register or point-of-sale terminal handled the transaction.\n     */\n    terminalName: string | null;\n    /**\n     * Unique identifier for the register/terminal where the transaction occurred.\n     * Numeric identifier for the specific point-of-sale terminal.\n     */\n    terminalId: number;\n    /**\n     * Employee ID of the staff member who processed the transaction.\n     * Numeric identifier linking to the employee record for accountability tracking.\n     */\n    transactionByEmployeeId: number;\n    /**\n     * Reason code or description for adjustment transactions (optional).\n     * Provides business justification when the transaction is an adjustment or correction.\n     */\n    adjustmentReason: string | null;\n    /**\n     * Additional comments or notes about the register transaction (optional).\n     * Free-text field for additional context or explanations.\n     */\n    comment: string | null;\n};\n\n/**\n * Regulatory category model containing state-mandated product classification information for cannabis compliance and reporting.\n */\nexport type RegulatoryCategory = {\n    /**\n     * Unique identifier for the regulatory category.\n     */\n    regulatoryCategoryId: number;\n    /**\n     * Display name of the regulatory category as defined by state cannabis regulations.\n     */\n    regulatoryCategoryName: string | null;\n};\n\n/**\n * Extended discount model with additional reporting and administrative properties for internal operations.\n */\nexport type ReportingDiscountDetail = {\n    /**\n     * Indicates if discount is available for online/e-commerce ordering.\n     */\n    isAvailableOnline: boolean;\n    /**\n     * Method used to apply the discount in the system.\n     */\n    applicationMethod: string | null;\n    /**\n     * External system identifier for integration mapping.\n     */\n    externalId: string | null;\n    /**\n     * Indicates if discount application requires manager approval.\n     */\n    requireManagerApproval: boolean;\n    /**\n     * Indicates if discount has been marked as deleted.\n     */\n    isDeleted: boolean;\n    /**\n     * Collection of location mappings where this discount applies.\n     */\n    appliesToLocations: Array<LocationMapping> | null;\n    /**\n     * Unique identifier for the discount.\n     */\n    discountId: number;\n    /**\n     * Display name of the discount for customer-facing applications.\n     */\n    discountName: string | null;\n    /**\n     * Monetary discount amount or percentage value.\n     */\n    discountAmount: number;\n    /**\n     * Promotional code required to apply the discount (optional).\n     */\n    discountCode: string | null;\n    /**\n     * Type classification of the discount (e.g., percentage, fixed amount).\n     */\n    discountType: string | null;\n    /**\n     * Method used to apply the discount (e.g., automatic, code required).\n     */\n    discountMethod: string | null;\n    /**\n     * Indicates if the discount is currently active and available.\n     */\n    isActive: boolean;\n    /**\n     * Start date and time when discount becomes valid (UTC converted from Eastern Time).\n     */\n    validFrom: string | null;\n    /**\n     * End date and time when discount expires (UTC converted from Eastern Time).\n     */\n    validUntil: string | null;\n    /**\n     * Type of threshold requirement for discount eligibility (optional).\n     */\n    thresholdType: string | null;\n    /**\n     * Minimum number of qualifying items required for discount application (optional).\n     */\n    minimumItemsRequired: number | null;\n    /**\n     * Maximum number of items that can receive the discount (optional).\n     */\n    maximumItemsAllowed: number | null;\n    /**\n     * Maximum number of times this discount can be used (optional).\n     */\n    maximumUsageCount: number | null;\n    /**\n     * Indicates if discount applies to non-cannabis products.\n     */\n    includeNonCannabis: boolean;\n    /**\n     * Indicates if discount is restricted to first-time customers only.\n     */\n    firstTimeCustomerOnly: boolean;\n    /**\n     * Indicates if discount can be combined with other discounts.\n     */\n    stackOnOtherDiscounts: boolean;\n    weeklyRecurrenceInfo: WeeklyRecurrenceInfo;\n    products: DiscountRestriction;\n    productCategories: DiscountRestriction;\n    brands: DiscountRestriction;\n    vendors: DiscountRestriction;\n    strains: DiscountRestriction;\n    tiers: DiscountRestriction;\n    tags: DiscountRestriction;\n    inventoryTags: DiscountRestriction;\n    customerTypes: DiscountRestriction;\n    /**\n     * Associated discount groups for bundling and organization (loaded conditionally).\n     */\n    discountGroups: Array<DiscountGroup> | null;\n};\n\n/**\n * Extended inventory item model for financial reporting with cost and allocation data.\n */\nexport type ReportingInventoryItem = {\n    /**\n     * Unit of measurement for unit weight, always \"g\" (grams).\n     */\n    unitWeightUnit: string | null;\n    /**\n     * Unit cost of the inventory item for cost of goods sold calculations (in USD).\n     */\n    unitCost: number | null;\n    /**\n     * Quantity of inventory allocated to orders or transfers but not yet fulfilled.\n     */\n    allocatedQuantity: number | null;\n    /**\n     * Unique inventory record identifier for this specific inventory item.\n     */\n    inventoryId: number;\n    /**\n     * Product identifier linking this inventory to the product catalog.\n     */\n    productId: number;\n    /**\n     * Stock Keeping Unit (SKU) code for inventory tracking and identification.\n     */\n    sku: string | null;\n    /**\n     * Display name of the product for customer-facing applications.\n     */\n    productName: string | null;\n    /**\n     * Detailed product description including effects, characteristics, and usage information.\n     */\n    description: string | null;\n    /**\n     * Category identifier for product classification (optional).\n     */\n    categoryId: number | null;\n    /**\n     * Category name for product classification and filtering.\n     */\n    category: string | null;\n    /**\n     * URL path to product image for display purposes.\n     */\n    imageUrl: string | null;\n    /**\n     * Current available quantity for sale or transfer.\n     */\n    quantityAvailable: number;\n    /**\n     * Unit of measurement for the available quantity (e.g., \"g\", \"mg\", \"ea\").\n     */\n    quantityUnits: string | null;\n    /**\n     * Weight per unit in grams for dosing and compliance calculations.\n     */\n    unitWeight: number;\n    /**\n     * Flower equivalent amount in grams for compliance tracking.\n     */\n    flowerEquivalent: number;\n    /**\n     * Recreational flower equivalent amount in grams (optional).\n     */\n    recFlowerEquivalent: number | null;\n    /**\n     * Unit of measurement for flower equivalent, always \"g\" (grams).\n     */\n    readonly flowerEquivalentUnits: string | null;\n    /**\n     * Batch identifier for lot tracking and quality control.\n     */\n    batchId: number;\n    /**\n     * Human-readable batch name or lot number for tracking.\n     */\n    batchName: string | null;\n    /**\n     * Package identifier for compliance tracking and traceability.\n     */\n    packageId: string | null;\n    /**\n     * Current status of the package (e.g., \"Active\", \"Testing\", \"Quarantine\").\n     */\n    packageStatus: string | null;\n    /**\n     * Base unit price for retail sales.\n     */\n    unitPrice: number;\n    /**\n     * Medical program pricing (optional, different from retail).\n     */\n    medUnitPrice: number | null;\n    /**\n     * Recreational program pricing (optional, different from medical).\n     */\n    recUnitPrice: number | null;\n    /**\n     * Strain identifier for cannabis products (optional).\n     */\n    strainId: number | null;\n    /**\n     * Strain name for cannabis products.\n     */\n    strain: string | null;\n    /**\n     * Cannabis strain classification (Hybrid, Indica, Sativa, CBD).\n     */\n    strainType: string | null;\n    /**\n     * Product size designation for packaging and dosing information.\n     */\n    size: string | null;\n    /**\n     * Collection of laboratory test results for this batch (included when includeLabResults=true).\n     */\n    labResults: Array<LabResult> | null;\n    /**\n     * Date when laboratory testing was completed (optional).\n     */\n    testedDate: string | null;\n    /**\n     * Date when sample was collected for laboratory testing (optional).\n     */\n    sampleDate: string | null;\n    /**\n     * Date when product was packaged for distribution (optional).\n     */\n    packagedDate: string | null;\n    /**\n     * Date when product was manufactured or produced (optional).\n     */\n    manufacturingDate: string | null;\n    /**\n     * Last modification timestamp in UTC for data synchronization.\n     */\n    lastModifiedDateUtc: string | null;\n    /**\n     * Current status of laboratory testing (e.g., \"Passed\", \"Failed\", \"Pending\").\n     */\n    labTestStatus: string | null;\n    /**\n     * Vendor identifier for the supplier of this inventory (optional).\n     */\n    vendorId: number | null;\n    /**\n     * Vendor name for the supplier of this inventory.\n     */\n    vendor: string | null;\n    /**\n     * Product expiration date for compliance and quality control (optional).\n     */\n    expirationDate: string | null;\n    /**\n     * Quantity breakdown by storage room/location (included when includeRoomQuantities=true).\n     */\n    roomQuantities: Array<InventoryRoomQuantity> | null;\n    /**\n     * Pricing tier classification for bulk pricing strategies.\n     */\n    pricingTierName: string | null;\n    /**\n     * Alternative product name for display purposes.\n     */\n    alternateName: string | null;\n    /**\n     * Collection of compliance tags associated with this inventory package.\n     */\n    tags: Array<InventoryTag> | null;\n    /**\n     * Brand identifier for branded products (optional).\n     */\n    brandId: number | null;\n    /**\n     * Brand name for branded products.\n     */\n    brandName: string | null;\n    /**\n     * Indicates if product is restricted to medical program only.\n     */\n    medicalOnly: boolean;\n    /**\n     * External compliance system ID (METRC or BioTrack) for regulatory tracking.\n     */\n    externalPackageId: string | null;\n    /**\n     * Producer name for cultivation and manufacturing tracking.\n     */\n    producer: string | null;\n    /**\n     * Producer identifier for cultivation and manufacturing tracking (optional).\n     */\n    producerId: number | null;\n    /**\n     * Package lineage information for traceability and compliance tracking.\n     */\n    lineage: Array<PackageLineage> | null;\n    /**\n     * Potency classification indicator for dosing guidance.\n     */\n    potencyIndicator: string | null;\n    /**\n     * Master category classification for product grouping.\n     */\n    masterCategory: string | null;\n    /**\n     * Effective potency in milligrams for dosing calculations (optional).\n     */\n    effectivePotencyMg: number | null;\n    /**\n     * Indicates if product contains cannabis or is cannabis-related.\n     */\n    isCannabis: boolean;\n    /**\n     * National Drug Code for pharmaceutical tracking (optional).\n     */\n    packageNDC: string | null;\n    /**\n     * URL to certificate of analysis or lab testing document.\n     */\n    labResultUrl: string | null;\n};\n\n/**\n * Request model for retagging cannabis plants with new serial numbers for compliance and tracking updates.\n */\nexport type RetagPlantRequest = {\n    /**\n     * Plant identifier for the cannabis plant being retagged with a new serial number.\n     */\n    plantId: number;\n    /**\n     * New serial number for the plant identification tag replacement.\n     */\n    serialNumber: string | null;\n};\n\n/**\n * Detailed specification for retiring immature plants from cultivation batches with compliance documentation.\n */\nexport type RetireImmaturePlantsDetails = {\n    /**\n     * Batch identifier for the plant batch containing plants to be retired.\n     */\n    batchId: number;\n    /**\n     * Number of plants to retire from the specified batch.\n     */\n    countToRetire: number;\n    /**\n     * Standardized reason code for the plant retirement (e.g., \"DISEASE\", \"PEST\", \"POOR_HEALTH\", \"CONTAMINATION\").\n     */\n    reasonCode: string | null;\n    /**\n     * Date when the plants were retired for cultivation timeline documentation.\n     */\n    retireDate: string | null;\n};\n\n/**\n * Request model for retiring immature cannabis plants due to loss, contamination, or quality issues.\n */\nexport type RetireImmaturePlantsRequest = {\n    /**\n     * Collection of plant retirement specifications for batch processing of plant removals.\n     */\n    plants: Array<RetireImmaturePlantsDetails> | null;\n};\n\nexport type RetirePlantRequest = {\n    plantIds: Array<number> | null;\n    reasonId: number | null;\n    reasonCode: string | null;\n    wasteType: string | null;\n    roomId: number;\n    wasteWeight: number | null;\n    comment: string | null;\n    wastePackageId: string | null;\n    wasteDate: string | null;\n    plantWeight: number | null;\n    plantWeightUnitId: number | null;\n    wasteMaterial: string | null;\n    wasteReason: string | null;\n    wasteMethod: string | null;\n    reasonNote: string | null;\n    emptyCloneGroup: boolean;\n};\n\n/**\n * Cultivation room model containing facility area configuration information for cannabis operations and facility management.\n */\nexport type Room = {\n    /**\n     * Unique identifier for the cultivation room or facility area.\n     * **Required for updates, null/0 for new room creation.**\n     */\n    roomId: number | null;\n    /**\n     * Human-readable name for room identification and cultivation tracking.\n     * **Required for both create and update operations.**\n     */\n    roomName: string | null;\n    /**\n     * Indicates if this room is designated for quarantine operations and compliance isolation.\n     */\n    isQuarantineRoom: boolean;\n    /**\n     * Indicates if this room is designated as a secure vault for valuable inventory storage.\n     */\n    isVaultRoom: boolean;\n    /**\n     * Indicates if this room is designated as a customer waiting area.\n     */\n    isWaitingRoom: boolean;\n    /**\n     * Indicates if this room is designated as the main sales floor for customer transactions.\n     */\n    isSalesFloor: boolean;\n    /**\n     * Indicates if this room is designated for point-of-sale operations and transactions.\n     */\n    isPOSRoom: boolean;\n    /**\n     * Indicates if this room is designated for inventory storage and management.\n     */\n    isInventoryRoom: boolean;\n    /**\n     * Indicates if this room is designated for pre-order fulfillment operations.\n     */\n    isPreOrderRoom: boolean;\n    /**\n     * Indicates if this room is designated for e-commerce order processing and fulfillment.\n     */\n    isEcommerceRoom: boolean;\n};\n\n/**\n * Room-based waste record model for facility waste disposal tracking and compliance documentation.\n */\nexport type RoomWaste = {\n    /**\n     * Unique identifier for the waste record.\n     */\n    wasteId: number | null;\n    /**\n     * Reference number for waste tracking and documentation.\n     */\n    referenceNo: string | null;\n    /**\n     * Additional comments or notes about the waste disposal.\n     */\n    comments: string | null;\n    /**\n     * Date when the waste disposal occurred.\n     */\n    wasteDate: string | null;\n    /**\n     * Type or category of waste material being disposed.\n     */\n    wasteType: string | null;\n    /**\n     * Identifier for the room or facility area where waste originated.\n     */\n    roomId: number;\n    /**\n     * Quantity of waste material being disposed.\n     */\n    wasteAmount: number;\n    /**\n     * Unit of measurement identifier for the waste amount.\n     */\n    unitId: number;\n};\n\n/**\n * Response model for successful inventory receive order creation operations.\n */\nexport type SavedReceive = {\n    /**\n     * Unique identifier for the created receive inventory transaction.\n     */\n    receiveInventoryHistoryId: number;\n};\n\n/**\n * Request model for setting a product image through the product image management API.\n */\nexport type SetImageRequest = {\n    /**\n     * The unique identifier of the product to associate the image with.\n     */\n    productId: number;\n    /**\n     * Base64-encoded string representation of the image file data.\n     */\n    base64Image: string;\n    /**\n     * Original filename of the image including file extension for proper handling.\n     */\n    fileName: string;\n    /**\n     * Computed property that converts the Base64Image string to byte array for processing.\n     */\n    readonly image?: string | null;\n    fileType?: UploadFileType;\n};\n\n/**\n * Response model for successful product image upload operations.\n */\nexport type SetImageResponse = {\n    /**\n     * Unique identifier assigned to the uploaded image for tracking and reference.\n     */\n    imageId: number;\n    /**\n     * Public URL where the uploaded image can be accessed and displayed.\n     */\n    imageUrl: string | null;\n};\n\nexport type Severity = 0 | 1 | 2;\n\n/**\n * Represents a product size configuration for cannabis products within an organization.\n */\nexport type Size = {\n    /**\n     * Unique identifier for the product size configuration.\n     */\n    sizeId: number;\n    /**\n     * Display name for the product size.\n     */\n    sizeName: string | null;\n    /**\n     * Detailed description of the product size and its usage.\n     */\n    description: string | null;\n};\n\nexport type SplitBatchDetails = {\n    newBatchName: string | null;\n    batchId: number;\n    location: string | null;\n    strain: string | null;\n    quantity: number;\n    splitDate: string | null;\n};\n\nexport type SplitImmaturePlantResult = {\n    batch: Array<SplitImmaturePlantResultDetail> | null;\n    plant: Array<SplitImmaturePlantResultDetail> | null;\n};\n\nexport type SplitImmaturePlantResultApiResult = {\n    result: boolean;\n    message: string | null;\n    data: SplitImmaturePlantResult;\n};\n\nexport type SplitImmaturePlantResultDetail = {\n    batchId: number;\n    batchPlantCount: number;\n    newBatchId: number;\n    newBatchPlantCount: number;\n};\n\n/**\n * Request model for splitting immature cannabis plant batches and individual plants for cultivation optimization.\n */\nexport type SplitImmaturePlantsRequest = {\n    /**\n     * Collection of batch split specifications for dividing immature plant batches into smaller groups.\n     */\n    batch: Array<SplitBatchDetails> | null;\n    /**\n     * Collection of individual plant split specifications for precise cultivation management.\n     */\n    plant: Array<SplitPlantDetails> | null;\n};\n\nexport type SplitPlantDetails = {\n    batchId: number;\n    location: string | null;\n    strain: string | null;\n    quantity: number;\n    splitDate: string | null;\n};\n\nexport type StandardAllergensDetails = {\n    milk: boolean;\n    eggs: boolean;\n    fish: boolean;\n    peanuts: boolean;\n    treeNuts: boolean;\n    sesame: boolean;\n    shellfish: boolean;\n    soybeans: boolean;\n    wheat: boolean;\n};\n\n/**\n * Cannabis strain information with genetic and classification details for product categorization and cultivation tracking.\n */\nexport type StrainDetail = {\n    /**\n     * Unique identifier for the strain\n     */\n    strainId: number;\n    /**\n     * Name of the cannabis strain\n     */\n    strainName: string | null;\n    /**\n     * Detailed description of the strain's characteristics and effects\n     */\n    strainDescription: string | null;\n    /**\n     * Short name or code for the strain\n     */\n    strainAbbreviation: string | null;\n    /**\n     * Classification type of the strain. Valid values: `Indica`, `Sativa`, `Hybrid`, `CBD`\n     */\n    strainType: string | null;\n    /**\n     * External system identifier for third-party integration\n     */\n    externalId: string | null;\n};\n\nexport type StringIEnumerableOptional = Array<unknown>;\n\nexport type StringOptional = string;\n\nexport type SuccessResult = {\n    result: boolean;\n    message: string | null;\n    data: {\n        [key: string]: unknown;\n    } | null;\n};\n\nexport type Table = {\n    tableId: number | null;\n    tableName: string | null;\n};\n\nexport type Tag = {\n    tagName: string | null;\n    tagId: number;\n};\n\n/**\n * Summary tax information aggregated across transaction items for reporting and receipt generation.\n */\nexport type TaxSummaryInfo = {\n    /**\n     * Name of the tax type being summarized (e.g., \"State Excise Tax\", \"Sales Tax\").\n     */\n    rateName: string | null;\n    /**\n     * Total tax amount for this tax type across all transaction items (in USD).\n     */\n    amount: number;\n};\n\n/**\n * Point-of-sale terminal model containing terminal identification information for retail operations and transaction processing.\n */\nexport type Terminal = {\n    /**\n     * Unique identifier for the point-of-sale terminal.\n     */\n    terminalId: number;\n    /**\n     * Human-readable name for terminal identification and assignment.\n     */\n    terminalName: string | null;\n};\n\n/**\n * Complete cannabis retail transaction model representing all aspects of cannabis sales operations.\n */\nexport type Transaction = {\n    transactionId: number;\n    customerId: number;\n    employeeId: number;\n    transactionDate: string;\n    voidDate: string | null;\n    isVoid: boolean;\n    subtotal: number;\n    totalDiscount: number;\n    readonly totalBeforeTax: number;\n    tax: number;\n    tipAmount: number | null;\n    total: number;\n    paid: number;\n    changeDue: number;\n    totalItems: number;\n    terminalName: string | null;\n    checkInDate: string | null;\n    invoiceNumber: string | null;\n    isTaxInclusive: boolean;\n    /**\n     * Will have one of the following values: Retail, Transfer, WholesaleOrder\n     */\n    transactionType: string | null;\n    /**\n     * Loyalty points earned on this transaction (can be negative if it's a return)\n     */\n    loyaltyEarned: number | null;\n    /**\n     * Loyalty points spent on this transaction (can be negative if it's a return)\n     */\n    loyaltySpent: number | null;\n    items: Array<TransactionItem> | null;\n    readonly discounts: Array<AppliedDiscount> | null;\n    lastModifiedDateUTC: string;\n    cashPaid: number | null;\n    debitPaid: number | null;\n    electronicPaid: number | null;\n    electronicPaymentMethod: string | null;\n    checkPaid: number | null;\n    creditPaid: number | null;\n    giftPaid: number | null;\n    mmapPaid: number | null;\n    prePaymentAmount: number | null;\n    revenueFeesAndDonations: number | null;\n    nonRevenueFeesAndDonations: number | null;\n    feesAndDonations: Array<FeeDonationInfo> | null;\n    readonly taxSummary: Array<TaxSummaryInfo> | null;\n    returnOnTransactionId: number | null;\n    adjustmentForTransactionId: number | null;\n    orderType: string | null;\n    wasPreOrdered: boolean;\n    orderSource: string | null;\n    orderMethod: string | null;\n    invoiceName: string | null;\n    readonly isReturn: boolean;\n    authCode: string | null;\n    customerTypeId: number;\n    isMedical: boolean;\n    orderIds: Array<number> | null;\n    totalCredit: number;\n    completedByUser: string | null;\n    responsibleForSaleUserId: number;\n    transactionDateLocalTime: string;\n    estTimeArrivalLocal: string | null;\n    readonly estDeliveryDateLocal: string | null;\n    referenceId: string | null;\n    manualPayments: Array<ManualPayment> | null;\n    manualPaid: number | null;\n    integratedPayments: Array<IntegratedPayment> | null;\n    integratedPaid: number | null;\n};\n\n/**\n * Individual line item within a cannabis retail transaction containing product, pricing, and compliance information.\n */\nexport type TransactionItem = {\n    /**\n     * Parent transaction identifier linking this item to the overall transaction.\n     */\n    transactionId: number;\n    /**\n     * Product identifier for the purchased cannabis product.\n     */\n    productId: number;\n    /**\n     * Total price for this line item including all taxes and discounts (in USD).\n     */\n    totalPrice: number;\n    /**\n     * Quantity of the product purchased (units based on product type - grams, pieces, etc.).\n     */\n    quantity: number;\n    /**\n     * Unit price per individual item before taxes and discounts (in USD).\n     */\n    unitPrice: number;\n    /**\n     * Cost basis of the product for internal accounting and margin calculations (in USD).\n     */\n    unitCost: number | null;\n    /**\n     * State tracking system package identifier for regulatory compliance (seed-to-sale tracking).\n     */\n    packageId: string | null;\n    /**\n     * Original source package identifier for product lineage tracking in state systems.\n     */\n    sourcePackageId: string | null;\n    /**\n     * Total discount amount applied to this line item (in USD).\n     */\n    totalDiscount: number;\n    /**\n     * Inventory record identifier for the specific product inventory being sold.\n     */\n    inventoryId: number;\n    /**\n     * Unit type identifier defining how the product is measured and sold.\n     */\n    unitId: number;\n    /**\n     * Weight of the product unit in grams (calculated for flower products with UnitId = 1).\n     */\n    readonly unitWeight: number | null;\n    /**\n     * Unit of measurement for product weight (always \"g\" for grams).\n     */\n    readonly unitWeightUnit: string | null;\n    /**\n     * Flower equivalent weight for concentrate products in grams (for regulatory compliance).\n     */\n    flowerEquivalent: number | null;\n    /**\n     * Unit of measurement for flower equivalent (always \"g\" for grams).\n     */\n    readonly flowerEquivalentUnit: string | null;\n    /**\n     * Collection of discounts applied to this transaction item.\n     */\n    discounts: Array<AppliedDiscount> | null;\n    /**\n     * Collection of taxes applied to this transaction item.\n     */\n    taxes: Array<LineItemTaxInfo> | null;\n    /**\n     * Date when this item was returned (null if not returned).\n     */\n    returnDate: string | null;\n    /**\n     * Indicates whether this transaction item has been returned.\n     */\n    readonly isReturned: boolean;\n    /**\n     * Transaction identifier of the return transaction that processed this item's return.\n     */\n    returnedByTransactionId: number | null;\n    /**\n     * Reason provided for returning this item (e.g., \"Defective\", \"Customer Dissatisfaction\").\n     */\n    returnReason: string | null;\n    /**\n     * Cultivation batch name for product traceability and regulatory compliance.\n     */\n    batchName: string | null;\n    /**\n     * Reference identifier to tie child items to parent items within a transaction.\n     * Not guaranteed to be unique outside of a single transaction.\n     */\n    readonly transactionItemId: number;\n    /**\n     * Vendor or supplier name for the product.\n     */\n    vendor: string | null;\n    /**\n     * Indicates whether this item represents a coupon or promotional discount rather than a physical product.\n     */\n    isCoupon: boolean;\n};\n\n/**\n * Measurement unit model for cannabis product tracking and inventory management.\n */\nexport type Unit = {\n    /**\n     * Unique identifier for the measurement unit.\n     */\n    unitId: number;\n    /**\n     * Full name of the measurement unit (e.g., \"Grams\", \"Ounces\", \"Pounds\").\n     */\n    unitName: string | null;\n    /**\n     * Short abbreviation for the unit (e.g., \"g\", \"oz\", \"lb\").\n     */\n    abbreviation: string | null;\n    /**\n     * Unit type classification identifier linking to measurement category.\n     */\n    unitTypeId: number;\n};\n\n/**\n * Unit type classification model for organizing measurement units by category.\n */\nexport type UnitType = {\n    /**\n     * Unique identifier for the unit type category.\n     */\n    unitTypeId: number;\n    /**\n     * Display name of the unit type category (e.g., \"Weight\", \"Volume\", \"Quantity\").\n     */\n    unitTypeName: string | null;\n    /**\n     * Short abbreviation for the unit type (e.g., \"Wgt\", \"Vol\", \"Qty\").\n     */\n    unitTypeAbbreivation: string | null;\n};\n\n/**\n * Request model for updating laboratory test results for a specific batch by batch name.\n */\nexport type UpdateBatchLabResultsRequest = {\n    /**\n     * Name of the batch to update with laboratory test results (required).\n     */\n    batchName: string;\n    /**\n     * Weight of the laboratory sample used for testing (in grams).\n     */\n    sampleWeight?: number | null;\n    /**\n     * Collection of laboratory test results including cannabinoids and terpenes.\n     */\n    labResults?: Array<CannabinoidTerpeneValue> | null;\n};\n\nexport type UpdateBatchRequest = {\n    batchName: string | null;\n    roomId: number | null;\n    strainId: number | null;\n};\n\n/**\n * Request model for updating delivery route details including vehicle assignments, driver assignments, and delivery status.\n */\nexport type UpdateDeliveryRouteDetailRequest = {\n    /**\n     * Delivery transaction identifier to update (required).\n     */\n    transactionId: number;\n    /**\n     * Primary driver identifier for delivery assignment (optional).\n     */\n    driverId: number | null;\n    /**\n     * Secondary driver identifier for delivery assignment (optional).\n     */\n    driverId2: number | null;\n    /**\n     * Vehicle identifier for delivery assignment (optional).\n     */\n    vehicleId: number | null;\n    /**\n     * Route information or delivery notes (optional).\n     */\n    route: string | null;\n    /**\n     * Delivery status update (optional).\n     */\n    status: string | null;\n};\n\n/**\n * Request model for updating existing customer journal entries with modified content and details.\n */\nexport type UpdateJournalEntryRequest = {\n    /**\n     * The ID of the existing journal entry to update.\n     */\n    journalEntryId: number;\n    /**\n     * Updated title or summary for the journal entry.\n     */\n    subject: string;\n    /**\n     * Updated detailed content and notes for the journal entry.\n     */\n    body: string;\n    /**\n     * Updated date and time when the journal entry should be dated.\n     */\n    date: string;\n};\n\nexport type UpdatePackageTagsRequest = {\n    packageIds?: StringIEnumerableOptional;\n    inventoryIds?: Int32iEnumerableOptional;\n    /**\n     * Required collection of tags to apply to the specified packages (required).\n     */\n    tags: Array<string>;\n};\n\nexport type UpdatePlantDetails = {\n    plantId: number;\n    serialNumber: StringOptional;\n    dateCreated: DateTimeNullableOptional;\n    bornDate: DateTimeNullableOptional;\n    isMother: BooleanNullableOptional;\n    strainId: Int32NullableOptional;\n    roomId: Int32NullableOptional;\n    tableId: Int32NullableOptional;\n    batchId: Int32NullableOptional;\n};\n\nexport type UpdatePlantsRequest = {\n    plants: Array<UpdatePlantDetails> | null;\n};\n\nexport type UpdatePreOrderRequest = {\n    orderId: number;\n    items: Array<PreOrderItem> | null;\n    isDelivery: boolean;\n    /**\n     * @deprecated\n     */\n    orderSource: string | null;\n    deliveryStreet: string | null;\n    deliveryCity: string | null;\n    deliveryState: string | null;\n    deliveryPostalCode: string | null;\n    deliveryScheduleId: DeliveryScheduleType;\n    notes: string | null;\n    redemptions: PreOrderRedemptionIEnumerableOptional;\n    customerId: number;\n    deliveryStreet2: string | null;\n    timeWindowStartDateUtc: string | null;\n    timeWindowEndDateUtc: string | null;\n};\n\n/**\n * Request model for creating or updating cannabis strain information.\n *\n * **Create vs Update Behavior:**\n * - **CREATE**: When `StrainId` is null, 0, or omitted, a new strain record will be created\n * - **UPDATE**: When `StrainId` is provided with a valid strain ID, the existing strain will be updated\n *\n * **Sparse Update Behavior:**\n * - **Provided fields**: Will overwrite existing values with provided data\n * - **Omitted fields**: Will preserve existing values (no data loss for updates)\n * - **Special handling**: `StrainDescription` is always required and cannot be null\n */\nexport type UpdateStrain = {\n    /**\n     * Unique identifier for strain updates.\n     * - **For CREATE**: Omit this field, set to null, or set to 0\n     * - **For UPDATE**: Provide the existing strain's ID\n     */\n    strainId?: number | null;\n    /**\n     * Name of the cannabis strain (required for creation)\n     */\n    strainName: string;\n    /**\n     * Detailed description of the strain's characteristics and effects.\n     * **REQUIRED** - Cannot be null or empty for both create and update operations.\n     */\n    strainDescription: string;\n    /**\n     * Short name or code for the strain (optional)\n     */\n    abbreviation?: string | null;\n    /**\n     * Classification type of the strain (optional).\n     * **Must be one of**: `Indica`, `Sativa`, `Hybrid`, `CBD`\n     * If provided, value will be validated against allowed strain types.\n     */\n    strainType?: string | null;\n    /**\n     * External system identifier for third-party integration (optional).\n     * Useful for synchronizing with cultivation management systems.\n     */\n    externalId?: string | null;\n    broadcast?: BooleanOptional;\n};\n\nexport type UploadFileType = 0 | 1 | 2 | 3 | 4 | 5;\n\nexport type ValidationFailure = {\n    propertyName: string | null;\n    errorMessage: string | null;\n    attemptedValue: {\n        [key: string]: unknown;\n    } | null;\n    customState: {\n        [key: string]: unknown;\n    } | null;\n    severity: Severity;\n    errorCode: string | null;\n    formattedMessagePlaceholderValues: {\n        [key: string]: {\n            [key: string]: unknown;\n        } | null;\n    } | null;\n};\n\nexport type ValidationResult = {\n    readonly isValid: boolean;\n    errors: Array<ValidationFailure> | null;\n    ruleSetsExecuted: Array<string> | null;\n};\n\nexport type VehicleDetail = {\n    vehicleId: number;\n    make: string | null;\n    model: string | null;\n    modelYear: string | null;\n    color: string | null;\n    licensePlate: string | null;\n    vin: string | null;\n};\n\n/**\n * Vendor information model for cannabis supply chain and compliance management.\n */\nexport type Vendor = {\n    /**\n     * Unique identifier for the vendor in the system (null for new vendor creation).\n     */\n    vendorId: number | null;\n    /**\n     * Official business name of the vendor as registered with regulatory authorities.\n     */\n    vendorName: string | null;\n    /**\n     * Street address of the vendor's business location.\n     */\n    address: string | null;\n    /**\n     * City where the vendor's business is located.\n     */\n    city: string | null;\n    /**\n     * State or province where the vendor's business is located.\n     */\n    state: string | null;\n    /**\n     * Postal or ZIP code for the vendor's business address.\n     */\n    postalCode: string | null;\n    /**\n     * Cannabis business license number issued by state regulatory authorities.\n     */\n    licenseNumber: string | null;\n    /**\n     * Name of the primary business contact for this vendor.\n     */\n    contactName: string | null;\n    /**\n     * Email address for business communications with the vendor.\n     */\n    contactEmail: string | null;\n    /**\n     * Phone number for business communications with the vendor.\n     */\n    contactPhone: string | null;\n};\n\n/**\n * Comprehensive waste summary model containing all waste types for facility waste management and regulatory reporting.\n */\nexport type WasteSummary = {\n    /**\n     * Collection of room-based waste disposal records.\n     */\n    roomWaste: Array<RoomWaste> | null;\n    /**\n     * Collection of harvest-based waste disposal records.\n     */\n    harvestWaste: Array<ObjectWaste> | null;\n    /**\n     * Collection of plant-based waste disposal records.\n     */\n    plantWaste: Array<ObjectWaste> | null;\n};\n\n/**\n * Weekly recurring schedule model defining time-based availability patterns for discount application.\n */\nexport type WeeklyRecurrenceInfo = {\n    /**\n     * Daily start time when discount becomes available (optional).\n     */\n    startTime: string | null;\n    /**\n     * Daily end time when discount expires (optional).\n     */\n    endTime: string | null;\n    /**\n     * Indicates if discount is available on Mondays.\n     */\n    appliesOnMonday: boolean;\n    /**\n     * Indicates if discount is available on Tuesdays.\n     */\n    appliesOnTuesday: boolean;\n    /**\n     * Indicates if discount is available on Wednesdays.\n     */\n    appliesOnWednesday: boolean;\n    /**\n     * Indicates if discount is available on Thursdays.\n     */\n    appliesOnThursday: boolean;\n    /**\n     * Indicates if discount is available on Fridays.\n     */\n    appliesOnFriday: boolean;\n    /**\n     * Indicates if discount is available on Saturdays.\n     */\n    appliesOnSaturday: boolean;\n    /**\n     * Indicates if discount is available on Sundays.\n     */\n    appliesOnSunday: boolean;\n};\n\n/**\n * Anonymous transaction response model containing transaction identifiers for guest checkout operations.\n */\nexport type AnonymousTransactionWritable = {\n    /**\n     * Unique identifier for the customer record associated with this anonymous transaction.\n     */\n    customerId: number;\n    /**\n     * Unique identifier for the transaction record.\n     */\n    transactionId: number;\n};\n\n/**\n * Discount information applied to a specific transaction item in cannabis retail operations.\n */\nexport type AppliedDiscountWritable = {\n    /**\n     * Unique identifier for the discount program or campaign applied.\n     */\n    discountId: number;\n    /**\n     * Display name of the discount for customer receipts and reporting.\n     */\n    discountName: string | null;\n    /**\n     * Reason or justification for the discount application (e.g., \"Loyalty Reward\", \"Medical Patient\").\n     */\n    discountReason: string | null;\n    /**\n     * Discount amount applied to the transaction item (in USD, positive value represents savings).\n     */\n    amount: number;\n};\n\nexport type BroadcastedResponsesWritable = {\n    responses: Array<LocationResponseWritable> | null;\n};\n\n/**\n * Product category sales summary for cannabis retail closing reports and financial analysis.\n */\nexport type ClosingReportCategorySummaryWritable = {\n    /**\n     * Product category name (e.g., \"Flower\", \"Edibles\", \"Concentrates\").\n     */\n    category: string | null;\n    /**\n     * Gross sales total for the category before discounts (in USD).\n     */\n    categoryGrossTotal: number;\n    /**\n     * Total discount amount applied to products in this category (in USD).\n     */\n    categoryDiscountTotal: number;\n    /**\n     * Net sales total for the category after discounts (in USD).\n     */\n    categoryNetTotal: number;\n    /**\n     * Total cost of goods sold for products in this category (in USD).\n     */\n    categoryCost: number;\n};\n\n/**\n * Customer type sales summary for cannabis retail closing reports and customer segment analysis.\n */\nexport type ClosingReportCustomerTypeSummaryWritable = {\n    /**\n     * Customer type classification (e.g., \"Recreational\", \"Medical\", \"Industry\").\n     */\n    customerType: string | null;\n    /**\n     * Gross sales total for this customer type before discounts (in USD).\n     */\n    grossTotal: number;\n    /**\n     * Net sales total for this customer type after discounts (in USD).\n     */\n    netTotal: number;\n    /**\n     * Total discount amount applied to this customer type (in USD).\n     */\n    discountTotal: number;\n    /**\n     * Total cost of goods sold for this customer type (in USD).\n     */\n    customerTypeCost: number;\n    /**\n     * Cannabis product sales total for this customer type (in USD).\n     */\n    cannabisSales: number;\n    /**\n     * Non-cannabis product sales total for this customer type (accessories, etc.) (in USD).\n     */\n    nonCannabisSales: number;\n};\n\n/**\n * Order source sales summary for cannabis retail closing reports and marketing channel analysis.\n */\nexport type ClosingReportOrderSourceSummaryWritable = {\n    /**\n     * Order origination source (e.g., \"Website\", \"Mobile App\", \"Weedmaps\", \"Walk-In\").\n     */\n    orderSource: string | null;\n    /**\n     * Gross sales total for this order source before discounts (in USD).\n     */\n    grossTotal: number;\n    /**\n     * Net sales total for this order source after discounts (in USD).\n     */\n    netTotal: number;\n    /**\n     * Total discount amount applied to this order source (in USD).\n     */\n    discountTotal: number;\n    orderSourceCost: number;\n};\n\n/**\n * Order type sales summary for cannabis retail closing reports and fulfillment channel analysis.\n */\nexport type ClosingReportOrderTypeSummaryWritable = {\n    /**\n     * Order fulfillment type (e.g., \"In-Store\", \"Pickup\", \"Delivery\", \"Curbside\").\n     */\n    orderType: string | null;\n    /**\n     * Gross sales total for this order type before discounts (in USD).\n     */\n    grossTotal: number;\n    /**\n     * Net sales total for this order type after discounts (in USD).\n     */\n    netTotal: number;\n    /**\n     * Total discount amount applied to this order type (in USD).\n     */\n    discountTotal: number;\n    /**\n     * Total cost of goods sold for this order type (in USD).\n     */\n    orderTypeCost: number;\n};\n\n/**\n * Enhanced closing report model for cannabis dispensary daily financial operations with payment processing integration.\n */\nexport type ClosingReportV2Writable = {\n    /**\n     * Tips processed through Pay-by-Bank system for electronic tip distribution.\n     */\n    payByBankTips: number;\n    /**\n     * Transaction fees charged by Pay-by-Bank system for cost accounting.\n     */\n    payByBankTransactionFees: number;\n    /**\n     * Batch file summaries for Pay-by-Bank transaction reconciliation.\n     */\n    payByBankBatchFile: Array<ClosingReportPayByBankBatchFileSums> | null;\n    /**\n     * Fees and donations collected during the closing period for compliance reporting.\n     */\n    feesDonations: Array<FeeDonation> | null;\n    grossSales: number | null;\n    discount: number | null;\n    loyalty: number | null;\n    totalTax: number | null;\n    cost: number | null;\n    coupons: number | null;\n    itemTotal: number | null;\n    transactionCount: number;\n    itemCount: number;\n    customerCount: number;\n    newCustomerCount: number;\n    voidCount: number;\n    voidTotal: number | null;\n    returnTotal: number | null;\n    startingBalance: number | null;\n    endingBalance: number | null;\n    deposits: number | null;\n    adjustments: number | null;\n    totalPayments: number | null;\n    invoiceTotal: number | null;\n    cannabisSales: number | null;\n    nonCannabisSales: number | null;\n    netSales: number | null;\n    revenueFeesDonations: number | null;\n    nonRevenueFeesDonations: number | null;\n    rounding: number | null;\n    totalIncome: number | null;\n    averageCartNetSales: number | null;\n    categorySummary: Array<ClosingReportCategorySummaryWritable> | null;\n    paymentSummary: Array<ClosingReportPaymentSummary> | null;\n    taxSummary: Array<ClosingReportTaxRateSummary> | null;\n    customerTypeSummary: Array<ClosingReportCustomerTypeSummaryWritable> | null;\n    orderTypeSummary: Array<ClosingReportOrderTypeSummaryWritable> | null;\n    orderSourceSummary: Array<ClosingReportOrderSourceSummaryWritable> | null;\n};\n\n/**\n * Represents a customer profile with personal information, contact details, and cannabis compliance data.\n */\nexport type CustomerWritable = {\n    /**\n     * Unique internal identifier for the customer record.\n     */\n    customerId: number;\n    /**\n     * Deprecated name field (use FirstName and LastName instead).\n     *\n     * @deprecated\n     */\n    name: string | null;\n    /**\n     * Customer's first name.\n     */\n    firstName: string | null;\n    /**\n     * Customer's last name.\n     */\n    lastName: string | null;\n    /**\n     * Customer's middle name.\n     */\n    middleName: string | null;\n    /**\n     * Name suffix (Jr., Sr., III, etc.).\n     */\n    nameSuffix: string | null;\n    /**\n     * Name prefix (Mr., Mrs., Dr., etc.).\n     */\n    namePrefix: string | null;\n    /**\n     * Primary street address line.\n     */\n    address1: string | null;\n    /**\n     * Secondary address line (apartment, suite, etc.).\n     */\n    address2: string | null;\n    /**\n     * City name.\n     */\n    city: string | null;\n    /**\n     * State or province.\n     */\n    state: string | null;\n    /**\n     * Postal or ZIP code.\n     */\n    postalCode: string | null;\n    /**\n     * Primary phone number.\n     */\n    phone: string | null;\n    /**\n     * Cell phone number.\n     */\n    cellPhone: string | null;\n    /**\n     * Email address.\n     */\n    emailAddress: string | null;\n    /**\n     * Customer account status.\n     */\n    status: string | null;\n    /**\n     * Medical marijuana identification number.\n     */\n    mmjidNumber: string | null;\n    /**\n     * Medical marijuana ID expiration date.\n     */\n    mmjidExpirationDate: string | null;\n    /**\n     * Last modification timestamp in UTC format.\n     */\n    lastModifiedDateUTC: string | null;\n    /**\n     * Customer record creation date.\n     */\n    creationDate: string | null;\n    /**\n     * Customer type classification.\n     */\n    customerType: string | null;\n    /**\n     * Customer's gender.\n     */\n    gender: string | null;\n    /**\n     * SHA2_256 hash of the Driver License ID\n     */\n    driversLicenseHash: string | null;\n    /**\n     * Customer's date of birth.\n     */\n    dateOfBirth: string | null;\n    /**\n     * External system customer identifier.\n     */\n    externalCustomerId: string | null;\n    /**\n     * Name of the integration system that created this customer.\n     */\n    createdByIntegrator: string | null;\n    /**\n     * Indicates if this is an anonymous customer record.\n     */\n    isAnonymous: boolean;\n    /**\n     * How the customer heard about the dispensary.\n     */\n    referralSource: string | null;\n    /**\n     * Additional details about referral source when \"Other\" is selected.\n     */\n    otherReferralSource: string | null;\n    /**\n     * SpringBig loyalty system member identifier.\n     */\n    springBigMemberId: number;\n    /**\n     * Custom identifier for external system integration.\n     */\n    customIdentifier: string | null;\n    /**\n     * Location where this customer record was created.\n     */\n    createdAtLocation: string | null;\n    /**\n     * Additional notes about the customer.\n     */\n    notes: string | null;\n    /**\n     * Indicates if customer is enrolled in loyalty program.\n     */\n    isLoyaltyMember: boolean | null;\n    /**\n     * Primary medical condition for medical marijuana patients.\n     */\n    primaryQualifyingCondition: string | null;\n    /**\n     * Additional medical conditions for medical marijuana patients.\n     */\n    secondaryQualifyingConditions: Array<string> | null;\n    /**\n     * Customer ID this record was merged into (if applicable).\n     */\n    mergedIntoCustomerId: number | null;\n    /**\n     * Customer's marketing communication preference.\n     */\n    optedIntoMarketing: boolean | null;\n    /**\n     * Customer's current loyalty program tier.\n     */\n    loyaltyTier: string | null;\n};\n\n/**\n * Extended customer model that includes search match type information for customer lookup operations.\n */\nexport type CustomerSearchResultWritable = {\n    /**\n     * Indicates how the customer record was matched during the search operation.\n     */\n    matchType: string | null;\n    /**\n     * Unique internal identifier for the customer record.\n     */\n    customerId: number;\n    /**\n     * Deprecated name field (use FirstName and LastName instead).\n     *\n     * @deprecated\n     */\n    name: string | null;\n    /**\n     * Customer's first name.\n     */\n    firstName: string | null;\n    /**\n     * Customer's last name.\n     */\n    lastName: string | null;\n    /**\n     * Customer's middle name.\n     */\n    middleName: string | null;\n    /**\n     * Name suffix (Jr., Sr., III, etc.).\n     */\n    nameSuffix: string | null;\n    /**\n     * Name prefix (Mr., Mrs., Dr., etc.).\n     */\n    namePrefix: string | null;\n    /**\n     * Primary street address line.\n     */\n    address1: string | null;\n    /**\n     * Secondary address line (apartment, suite, etc.).\n     */\n    address2: string | null;\n    /**\n     * City name.\n     */\n    city: string | null;\n    /**\n     * State or province.\n     */\n    state: string | null;\n    /**\n     * Postal or ZIP code.\n     */\n    postalCode: string | null;\n    /**\n     * Primary phone number.\n     */\n    phone: string | null;\n    /**\n     * Cell phone number.\n     */\n    cellPhone: string | null;\n    /**\n     * Email address.\n     */\n    emailAddress: string | null;\n    /**\n     * Customer account status.\n     */\n    status: string | null;\n    /**\n     * Medical marijuana identification number.\n     */\n    mmjidNumber: string | null;\n    /**\n     * Medical marijuana ID expiration date.\n     */\n    mmjidExpirationDate: string | null;\n    /**\n     * Last modification timestamp in UTC format.\n     */\n    lastModifiedDateUTC: string | null;\n    /**\n     * Customer record creation date.\n     */\n    creationDate: string | null;\n    /**\n     * Customer type classification.\n     */\n    customerType: string | null;\n    /**\n     * Customer's gender.\n     */\n    gender: string | null;\n    /**\n     * SHA2_256 hash of the Driver License ID\n     */\n    driversLicenseHash: string | null;\n    /**\n     * Customer's date of birth.\n     */\n    dateOfBirth: string | null;\n    /**\n     * External system customer identifier.\n     */\n    externalCustomerId: string | null;\n    /**\n     * Name of the integration system that created this customer.\n     */\n    createdByIntegrator: string | null;\n    /**\n     * Indicates if this is an anonymous customer record.\n     */\n    isAnonymous: boolean;\n    /**\n     * How the customer heard about the dispensary.\n     */\n    referralSource: string | null;\n    /**\n     * Additional details about referral source when \"Other\" is selected.\n     */\n    otherReferralSource: string | null;\n    /**\n     * SpringBig loyalty system member identifier.\n     */\n    springBigMemberId: number;\n    /**\n     * Custom identifier for external system integration.\n     */\n    customIdentifier: string | null;\n    /**\n     * Location where this customer record was created.\n     */\n    createdAtLocation: string | null;\n    /**\n     * Additional notes about the customer.\n     */\n    notes: string | null;\n    /**\n     * Indicates if customer is enrolled in loyalty program.\n     */\n    isLoyaltyMember: boolean | null;\n    /**\n     * Primary medical condition for medical marijuana patients.\n     */\n    primaryQualifyingCondition: string | null;\n    /**\n     * Additional medical conditions for medical marijuana patients.\n     */\n    secondaryQualifyingConditions: Array<string> | null;\n    /**\n     * Customer ID this record was merged into (if applicable).\n     */\n    mergedIntoCustomerId: number | null;\n    /**\n     * Customer's marketing communication preference.\n     */\n    optedIntoMarketing: boolean | null;\n    /**\n     * Customer's current loyalty program tier.\n     */\n    loyaltyTier: string | null;\n};\n\nexport type DiscountApiResponseWritable = {\n    id: number | null;\n    externalId: string | null;\n    validDateFrom: string | null;\n    validDateTo: string | null;\n    maxRedemptions: number | null;\n    redemptionLimit: number | null;\n    firstTimeCustomerOnly: DiscountFirstTimeCustomer;\n    discountDescription: string | null;\n    discountCode: string | null;\n    applicationMethodId: DiscountApplicationMethod;\n    canStackAutomatically: boolean;\n    onlineName: string | null;\n    locationRestrictions: Array<number> | null;\n    restrictToGroupIds: Array<number> | null;\n    monday: boolean | null;\n    tuesday: boolean | null;\n    wednesday: boolean | null;\n    thursday: boolean | null;\n    friday: boolean | null;\n    saturday: boolean | null;\n    sunday: boolean | null;\n    isActive: boolean;\n    isBundledDiscount: boolean;\n    constraints: Array<DiscountConstraintApiResponseWritable> | null;\n    reward: DiscountRewardApiResponseWritable;\n    menuDisplay: DiscountMenuDisplayApiResponse;\n    paymentRestrictions: DiscountPaymentRestrictionApiResponse;\n};\n\nexport type DiscountConstraintApiResponseWritable = {\n    discountConstraintId: number | null;\n    discountId: number;\n    thresholdMin: number | null;\n    includeNonCannabis: boolean;\n    thresholdTypeId: DiscountThresholdType;\n    discountItemGroupTypeId: DiscountItemGroupType;\n    restrictions: {\n        [key: string]: IRestrictionApiResponse;\n    } | null;\n};\n\nexport type DiscountRewardApiResponseWritable = {\n    discountRewardId: number | null;\n    discountId: number;\n    calculationMethodId: CalculationMethod;\n    discountValue: number;\n    includeNonCannabis: boolean;\n    highestOrLowest: string | null;\n    thresholdTypeId: DiscountThresholdType;\n    itemGroupTypeId: DiscountItemGroupType;\n    thresholdMin: number | null;\n    thresholdMax: number | null;\n    applyToOnlyOneItem: boolean;\n    restrictions: {\n        [key: string]: IRestrictionApiResponse;\n    } | null;\n};\n\nexport type InventoryDiscrepancyWritable = {\n    inventoryId: number | null;\n    packageId: string | null;\n    quantity: number;\n    roomId: number;\n    unitId: number;\n    externalQuantity: number;\n    externalUnitId: number;\n    equivalentExternalQuantity: number | null;\n    productName: string | null;\n    room: string | null;\n    externalRoom: string | null;\n    batchModeQuantity: number | null;\n    bioTrackCategoryName: string | null;\n    externalBioTrackCategoryName: string | null;\n    sku: string | null;\n    unitErrorMsg: string | null;\n    rooms: Array<string> | null;\n    serialNumber: string | null;\n};\n\nexport type InventoryIntegrationReconResponseWritable = {\n    lastUpdated: string | null;\n    discrepancies: Array<InventoryDiscrepancyWritable> | null;\n};\n\n/**\n * Inventory item model representing current stock and product details for available inventory.\n */\nexport type InventoryItemWritable = {\n    /**\n     * Unit of measurement for unit weight, always \"g\" (grams).\n     */\n    unitWeightUnit: string | null;\n    /**\n     * Unique inventory record identifier for this specific inventory item.\n     */\n    inventoryId: number;\n    /**\n     * Product identifier linking this inventory to the product catalog.\n     */\n    productId: number;\n    /**\n     * Stock Keeping Unit (SKU) code for inventory tracking and identification.\n     */\n    sku: string | null;\n    /**\n     * Display name of the product for customer-facing applications.\n     */\n    productName: string | null;\n    /**\n     * Detailed product description including effects, characteristics, and usage information.\n     */\n    description: string | null;\n    /**\n     * Category identifier for product classification (optional).\n     */\n    categoryId: number | null;\n    /**\n     * Category name for product classification and filtering.\n     */\n    category: string | null;\n    /**\n     * URL path to product image for display purposes.\n     */\n    imageUrl: string | null;\n    /**\n     * Current available quantity for sale or transfer.\n     */\n    quantityAvailable: number;\n    /**\n     * Unit of measurement for the available quantity (e.g., \"g\", \"mg\", \"ea\").\n     */\n    quantityUnits: string | null;\n    /**\n     * Weight per unit in grams for dosing and compliance calculations.\n     */\n    unitWeight: number;\n    /**\n     * Flower equivalent amount in grams for compliance tracking.\n     */\n    flowerEquivalent: number;\n    /**\n     * Recreational flower equivalent amount in grams (optional).\n     */\n    recFlowerEquivalent: number | null;\n    /**\n     * Batch identifier for lot tracking and quality control.\n     */\n    batchId: number;\n    /**\n     * Human-readable batch name or lot number for tracking.\n     */\n    batchName: string | null;\n    /**\n     * Package identifier for compliance tracking and traceability.\n     */\n    packageId: string | null;\n    /**\n     * Current status of the package (e.g., \"Active\", \"Testing\", \"Quarantine\").\n     */\n    packageStatus: string | null;\n    /**\n     * Base unit price for retail sales.\n     */\n    unitPrice: number;\n    /**\n     * Medical program pricing (optional, different from retail).\n     */\n    medUnitPrice: number | null;\n    /**\n     * Recreational program pricing (optional, different from medical).\n     */\n    recUnitPrice: number | null;\n    /**\n     * Strain identifier for cannabis products (optional).\n     */\n    strainId: number | null;\n    /**\n     * Strain name for cannabis products.\n     */\n    strain: string | null;\n    /**\n     * Cannabis strain classification (Hybrid, Indica, Sativa, CBD).\n     */\n    strainType: string | null;\n    /**\n     * Product size designation for packaging and dosing information.\n     */\n    size: string | null;\n    /**\n     * Collection of laboratory test results for this batch (included when includeLabResults=true).\n     */\n    labResults: Array<LabResultWritable> | null;\n    /**\n     * Date when laboratory testing was completed (optional).\n     */\n    testedDate: string | null;\n    /**\n     * Date when sample was collected for laboratory testing (optional).\n     */\n    sampleDate: string | null;\n    /**\n     * Date when product was packaged for distribution (optional).\n     */\n    packagedDate: string | null;\n    /**\n     * Date when product was manufactured or produced (optional).\n     */\n    manufacturingDate: string | null;\n    /**\n     * Last modification timestamp in UTC for data synchronization.\n     */\n    lastModifiedDateUtc: string | null;\n    /**\n     * Current status of laboratory testing (e.g., \"Passed\", \"Failed\", \"Pending\").\n     */\n    labTestStatus: string | null;\n    /**\n     * Vendor identifier for the supplier of this inventory (optional).\n     */\n    vendorId: number | null;\n    /**\n     * Vendor name for the supplier of this inventory.\n     */\n    vendor: string | null;\n    /**\n     * Product expiration date for compliance and quality control (optional).\n     */\n    expirationDate: string | null;\n    /**\n     * Quantity breakdown by storage room/location (included when includeRoomQuantities=true).\n     */\n    roomQuantities: Array<InventoryRoomQuantity> | null;\n    /**\n     * Pricing tier classification for bulk pricing strategies.\n     */\n    pricingTierName: string | null;\n    /**\n     * Alternative product name for display purposes.\n     */\n    alternateName: string | null;\n    /**\n     * Collection of compliance tags associated with this inventory package.\n     */\n    tags: Array<InventoryTag> | null;\n    /**\n     * Brand identifier for branded products (optional).\n     */\n    brandId: number | null;\n    /**\n     * Brand name for branded products.\n     */\n    brandName: string | null;\n    /**\n     * Indicates if product is restricted to medical program only.\n     */\n    medicalOnly: boolean;\n    /**\n     * External compliance system ID (METRC or BioTrack) for regulatory tracking.\n     */\n    externalPackageId: string | null;\n    /**\n     * Producer name for cultivation and manufacturing tracking.\n     */\n    producer: string | null;\n    /**\n     * Producer identifier for cultivation and manufacturing tracking (optional).\n     */\n    producerId: number | null;\n    /**\n     * Package lineage information for traceability and compliance tracking.\n     */\n    lineage: Array<PackageLineage> | null;\n    /**\n     * Potency classification indicator for dosing guidance.\n     */\n    potencyIndicator: string | null;\n    /**\n     * Master category classification for product grouping.\n     */\n    masterCategory: string | null;\n    /**\n     * Effective potency in milligrams for dosing calculations (optional).\n     */\n    effectivePotencyMg: number | null;\n    /**\n     * Indicates if product contains cannabis or is cannabis-related.\n     */\n    isCannabis: boolean;\n    /**\n     * National Drug Code for pharmaceutical tracking (optional).\n     */\n    packageNDC: string | null;\n    /**\n     * URL to certificate of analysis or lab testing document.\n     */\n    labResultUrl: string | null;\n};\n\n/**\n * Laboratory testing result model for cannabis and cannabis product analysis.\n */\nexport type LabResultWritable = {\n    /**\n     * Name of the laboratory test performed (e.g., \"THC\", \"CBD\", \"Myrcene\", \"Total Aerobic Count\").\n     */\n    labTest: string | null;\n    /**\n     * Numeric test result value (null if not detected or not applicable).\n     */\n    value: number | null;\n    labResultUnitId: LabResultUnit;\n};\n\n/**\n * Tax information applied to individual transaction line items in cannabis retail operations.\n */\nexport type LineItemTaxInfoWritable = {\n    /**\n     * Name of the tax rate applied (e.g., \"State Excise Tax\", \"City Cannabis Tax\", \"Sales Tax\").\n     */\n    rateName: string | null;\n    /**\n     * Tax rate as a decimal percentage (e.g., 0.0875 for 8.75% tax rate).\n     */\n    rate: number;\n    /**\n     * Calculated tax amount applied to the line item (in USD).\n     */\n    amount: number;\n};\n\n/**\n * Location identity model containing complete location and parent company information for API key verification and context identification.\n */\nexport type LocationIdentityWritable = {\n    /**\n     * Unique identifier for the cannabis dispensary location.\n     */\n    locationId: number;\n    /**\n     * Unique identifier for the parent company (LSP - Licensed Service Provider).\n     */\n    lspId: number;\n    /**\n     * Business name of the cannabis dispensary location.\n     */\n    locationName: string | null;\n    /**\n     * Company name of the parent organization (Licensed Service Provider).\n     */\n    lspName: string | null;\n    /**\n     * Primary street address of the dispensary location.\n     */\n    address: string | null;\n    /**\n     * Secondary address line (suite, unit, etc.) if applicable.\n     */\n    address2: string | null;\n    /**\n     * City where the dispensary is located.\n     */\n    city: string | null;\n    /**\n     * State or province where the dispensary is licensed to operate.\n     */\n    state: string | null;\n    /**\n     * Postal code (ZIP code) for the dispensary location.\n     */\n    postalCode: string | null;\n    /**\n     * State-issued cannabis business license number for regulatory compliance.\n     */\n    licenseNumber: string | null;\n    /**\n     * \"Doing Business As\" name if different from the legal business name.\n     */\n    doingBusinessAs: string | null;\n    /**\n     * Indicates whether customer profiles are shared across locations within the organization.\n     */\n    shareCustomerProfiles: boolean;\n    /**\n     * Legacy global unique identifier for the location (deprecated).\n     *\n     * @deprecated\n     */\n    globalId: string | null;\n    /**\n     * Global unique identifier for the location across all systems and integrations.\n     */\n    locationGlobalId: string | null;\n    /**\n     * Global unique identifier for the parent company (LSP) across all systems.\n     */\n    lspGlobalId: string | null;\n    /**\n     * Regional identifier for compliance and API routing (internal use only).\n     */\n    region: string | null;\n};\n\nexport type LocationResponseWritable = {\n    locationName: string | null;\n    locId: number;\n    licenseNumber: string | null;\n    broadcastedTo: string | null;\n    errorDetail: string | null;\n};\n\nexport type PlantWritable = {\n    plantId: number;\n    serialNumber: string | null;\n    growthPhase: string | null;\n    type: string | null;\n    harvestedWeight: number | null;\n    status: string | null;\n    plantCount: number | null;\n    isMother: boolean;\n    motherPlantId: number | null;\n    plantedOn: string | null;\n    addedToHarvestOn: string | null;\n    harvestDate: string | null;\n    destroyedDate: string | null;\n    plantGroupName: string | null;\n    strain: string | null;\n    room: string | null;\n    table: string | null;\n    vegetationStartedOn: string | null;\n    vegetationEndedOn: string | null;\n    floweringStartedOn: string | null;\n    floweringEndedOn: string | null;\n    currentPhaseStartDate: string | null;\n    lastModifiedDate: string | null;\n    daysInCurrentPhase: number | null;\n    floweringRoom: string | null;\n    floweringTable: string | null;\n    vegetationRoom: string | null;\n    vegetationTable: string | null;\n    daysInFlowering: number | null;\n    daysInVegetation: number | null;\n    batchId: number;\n};\n\nexport type ProductDetailWritable = {\n    productId: number;\n    sku: string | null;\n    internalName: string | null;\n    productName: string | null;\n    description: string | null;\n    masterCategory: string | null;\n    categoryId: number | null;\n    category: string | null;\n    imageUrl: string | null;\n    imageUrls: Array<string> | null;\n    strainId: number | null;\n    strain: string | null;\n    strainType: string | null;\n    size: string | null;\n    netWeight: number | null;\n    netWeightUnitId: number | null;\n    brandId: number | null;\n    brandName: string | null;\n    vendorId: number | null;\n    vendorName: string | null;\n    isCannabis: boolean;\n    isActive: boolean;\n    isCoupon: boolean;\n    thcContent: number | null;\n    thcContentUnit: string | null;\n    cbdContent: number | null;\n    cbdContentUnit: string | null;\n    productGrams: number | null;\n    flowerEquivalent: number | null;\n    recFlowerEquivalent: number | null;\n    price: number | null;\n    medPrice: number | null;\n    recPrice: number | null;\n    unitCost: number | null;\n    unitType: string | null;\n    onlineTitle: string | null;\n    onlineDescription: string | null;\n    posProducts: boolean | null;\n    pricingTier: number | null;\n    onlineAvailable: boolean | null;\n    lowInventoryThreshold: number | null;\n    pricingTierName: string | null;\n    pricingTierDescription: string | null;\n    pricingTierData: Array<PricingTierData> | null;\n    flavor: string | null;\n    alternateName: string | null;\n    lineageName: string | null;\n    distillationName: string | null;\n    maxPurchaseablePerTransaction: number | null;\n    tags: Array<ProductTag> | null;\n    effects: Array<ProductEffect> | null;\n    dosage: string | null;\n    instructions: string | null;\n    allergens: string | null;\n    standardAllergens: StandardAllergensDetails;\n    defaultUnit: string | null;\n    producerId: number | null;\n    producerName: string | null;\n    createdDate: string | null;\n    isMedicalOnly: boolean;\n    lastModifiedDateUTC: string | null;\n    grossWeight: number | null;\n    isTaxable: boolean | null;\n    taxCategories: Array<string> | null;\n    upc: string | null;\n    regulatoryCategory: string | null;\n    ndc: string | null;\n    daysSupply: number | null;\n    externalCategory: string | null;\n    externalId: string | null;\n    syncExternally: boolean;\n    regulatoryName: string | null;\n    broadcastedResponses: BroadcastedResponsesWritable;\n    administrationMethod: string | null;\n    unitCBDContentDose: number | null;\n    unitTHCContentDose: number | null;\n    oilVolume: number | null;\n    ingredientList: string | null;\n    expirationDays: number | null;\n    abbreviation: string | null;\n    isTestProduct: boolean;\n    isFinished: boolean;\n    allowAutomaticDiscounts: boolean;\n    servingSize: string | null;\n    servingSizePerUnit: number | null;\n    isNutrient: boolean;\n    approvalDateUTC: string | null;\n    ecomCategory: string | null;\n    ecomSubcategory: string | null;\n    customMetadata: string | null;\n};\n\n/**\n * Extended inventory item model for financial reporting with cost and allocation data.\n */\nexport type ReportingInventoryItemWritable = {\n    /**\n     * Unit of measurement for unit weight, always \"g\" (grams).\n     */\n    unitWeightUnit: string | null;\n    /**\n     * Unit cost of the inventory item for cost of goods sold calculations (in USD).\n     */\n    unitCost: number | null;\n    /**\n     * Quantity of inventory allocated to orders or transfers but not yet fulfilled.\n     */\n    allocatedQuantity: number | null;\n    /**\n     * Unique inventory record identifier for this specific inventory item.\n     */\n    inventoryId: number;\n    /**\n     * Product identifier linking this inventory to the product catalog.\n     */\n    productId: number;\n    /**\n     * Stock Keeping Unit (SKU) code for inventory tracking and identification.\n     */\n    sku: string | null;\n    /**\n     * Display name of the product for customer-facing applications.\n     */\n    productName: string | null;\n    /**\n     * Detailed product description including effects, characteristics, and usage information.\n     */\n    description: string | null;\n    /**\n     * Category identifier for product classification (optional).\n     */\n    categoryId: number | null;\n    /**\n     * Category name for product classification and filtering.\n     */\n    category: string | null;\n    /**\n     * URL path to product image for display purposes.\n     */\n    imageUrl: string | null;\n    /**\n     * Current available quantity for sale or transfer.\n     */\n    quantityAvailable: number;\n    /**\n     * Unit of measurement for the available quantity (e.g., \"g\", \"mg\", \"ea\").\n     */\n    quantityUnits: string | null;\n    /**\n     * Weight per unit in grams for dosing and compliance calculations.\n     */\n    unitWeight: number;\n    /**\n     * Flower equivalent amount in grams for compliance tracking.\n     */\n    flowerEquivalent: number;\n    /**\n     * Recreational flower equivalent amount in grams (optional).\n     */\n    recFlowerEquivalent: number | null;\n    /**\n     * Batch identifier for lot tracking and quality control.\n     */\n    batchId: number;\n    /**\n     * Human-readable batch name or lot number for tracking.\n     */\n    batchName: string | null;\n    /**\n     * Package identifier for compliance tracking and traceability.\n     */\n    packageId: string | null;\n    /**\n     * Current status of the package (e.g., \"Active\", \"Testing\", \"Quarantine\").\n     */\n    packageStatus: string | null;\n    /**\n     * Base unit price for retail sales.\n     */\n    unitPrice: number;\n    /**\n     * Medical program pricing (optional, different from retail).\n     */\n    medUnitPrice: number | null;\n    /**\n     * Recreational program pricing (optional, different from medical).\n     */\n    recUnitPrice: number | null;\n    /**\n     * Strain identifier for cannabis products (optional).\n     */\n    strainId: number | null;\n    /**\n     * Strain name for cannabis products.\n     */\n    strain: string | null;\n    /**\n     * Cannabis strain classification (Hybrid, Indica, Sativa, CBD).\n     */\n    strainType: string | null;\n    /**\n     * Product size designation for packaging and dosing information.\n     */\n    size: string | null;\n    /**\n     * Collection of laboratory test results for this batch (included when includeLabResults=true).\n     */\n    labResults: Array<LabResultWritable> | null;\n    /**\n     * Date when laboratory testing was completed (optional).\n     */\n    testedDate: string | null;\n    /**\n     * Date when sample was collected for laboratory testing (optional).\n     */\n    sampleDate: string | null;\n    /**\n     * Date when product was packaged for distribution (optional).\n     */\n    packagedDate: string | null;\n    /**\n     * Date when product was manufactured or produced (optional).\n     */\n    manufacturingDate: string | null;\n    /**\n     * Last modification timestamp in UTC for data synchronization.\n     */\n    lastModifiedDateUtc: string | null;\n    /**\n     * Current status of laboratory testing (e.g., \"Passed\", \"Failed\", \"Pending\").\n     */\n    labTestStatus: string | null;\n    /**\n     * Vendor identifier for the supplier of this inventory (optional).\n     */\n    vendorId: number | null;\n    /**\n     * Vendor name for the supplier of this inventory.\n     */\n    vendor: string | null;\n    /**\n     * Product expiration date for compliance and quality control (optional).\n     */\n    expirationDate: string | null;\n    /**\n     * Quantity breakdown by storage room/location (included when includeRoomQuantities=true).\n     */\n    roomQuantities: Array<InventoryRoomQuantity> | null;\n    /**\n     * Pricing tier classification for bulk pricing strategies.\n     */\n    pricingTierName: string | null;\n    /**\n     * Alternative product name for display purposes.\n     */\n    alternateName: string | null;\n    /**\n     * Collection of compliance tags associated with this inventory package.\n     */\n    tags: Array<InventoryTag> | null;\n    /**\n     * Brand identifier for branded products (optional).\n     */\n    brandId: number | null;\n    /**\n     * Brand name for branded products.\n     */\n    brandName: string | null;\n    /**\n     * Indicates if product is restricted to medical program only.\n     */\n    medicalOnly: boolean;\n    /**\n     * External compliance system ID (METRC or BioTrack) for regulatory tracking.\n     */\n    externalPackageId: string | null;\n    /**\n     * Producer name for cultivation and manufacturing tracking.\n     */\n    producer: string | null;\n    /**\n     * Producer identifier for cultivation and manufacturing tracking (optional).\n     */\n    producerId: number | null;\n    /**\n     * Package lineage information for traceability and compliance tracking.\n     */\n    lineage: Array<PackageLineage> | null;\n    /**\n     * Potency classification indicator for dosing guidance.\n     */\n    potencyIndicator: string | null;\n    /**\n     * Master category classification for product grouping.\n     */\n    masterCategory: string | null;\n    /**\n     * Effective potency in milligrams for dosing calculations (optional).\n     */\n    effectivePotencyMg: number | null;\n    /**\n     * Indicates if product contains cannabis or is cannabis-related.\n     */\n    isCannabis: boolean;\n    /**\n     * National Drug Code for pharmaceutical tracking (optional).\n     */\n    packageNDC: string | null;\n    /**\n     * URL to certificate of analysis or lab testing document.\n     */\n    labResultUrl: string | null;\n};\n\n/**\n * Request model for setting a product image through the product image management API.\n */\nexport type SetImageRequestWritable = {\n    /**\n     * The unique identifier of the product to associate the image with.\n     */\n    productId: number;\n    /**\n     * Base64-encoded string representation of the image file data.\n     */\n    base64Image: string;\n    /**\n     * Original filename of the image including file extension for proper handling.\n     */\n    fileName: string;\n    fileType?: UploadFileType;\n};\n\n/**\n * Complete cannabis retail transaction model representing all aspects of cannabis sales operations.\n */\nexport type TransactionWritable = {\n    transactionId: number;\n    customerId: number;\n    employeeId: number;\n    transactionDate: string;\n    voidDate: string | null;\n    isVoid: boolean;\n    subtotal: number;\n    totalDiscount: number;\n    tax: number;\n    tipAmount: number | null;\n    total: number;\n    paid: number;\n    changeDue: number;\n    totalItems: number;\n    terminalName: string | null;\n    checkInDate: string | null;\n    invoiceNumber: string | null;\n    isTaxInclusive: boolean;\n    /**\n     * Will have one of the following values: Retail, Transfer, WholesaleOrder\n     */\n    transactionType: string | null;\n    /**\n     * Loyalty points earned on this transaction (can be negative if it's a return)\n     */\n    loyaltyEarned: number | null;\n    /**\n     * Loyalty points spent on this transaction (can be negative if it's a return)\n     */\n    loyaltySpent: number | null;\n    items: Array<TransactionItemWritable> | null;\n    lastModifiedDateUTC: string;\n    cashPaid: number | null;\n    debitPaid: number | null;\n    electronicPaid: number | null;\n    electronicPaymentMethod: string | null;\n    checkPaid: number | null;\n    creditPaid: number | null;\n    giftPaid: number | null;\n    mmapPaid: number | null;\n    prePaymentAmount: number | null;\n    revenueFeesAndDonations: number | null;\n    nonRevenueFeesAndDonations: number | null;\n    feesAndDonations: Array<FeeDonationInfo> | null;\n    returnOnTransactionId: number | null;\n    adjustmentForTransactionId: number | null;\n    orderType: string | null;\n    wasPreOrdered: boolean;\n    orderSource: string | null;\n    orderMethod: string | null;\n    invoiceName: string | null;\n    authCode: string | null;\n    customerTypeId: number;\n    isMedical: boolean;\n    orderIds: Array<number> | null;\n    totalCredit: number;\n    completedByUser: string | null;\n    responsibleForSaleUserId: number;\n    transactionDateLocalTime: string;\n    estTimeArrivalLocal: string | null;\n    referenceId: string | null;\n    manualPayments: Array<ManualPayment> | null;\n    manualPaid: number | null;\n    integratedPayments: Array<IntegratedPayment> | null;\n    integratedPaid: number | null;\n};\n\n/**\n * Individual line item within a cannabis retail transaction containing product, pricing, and compliance information.\n */\nexport type TransactionItemWritable = {\n    /**\n     * Parent transaction identifier linking this item to the overall transaction.\n     */\n    transactionId: number;\n    /**\n     * Product identifier for the purchased cannabis product.\n     */\n    productId: number;\n    /**\n     * Total price for this line item including all taxes and discounts (in USD).\n     */\n    totalPrice: number;\n    /**\n     * Quantity of the product purchased (units based on product type - grams, pieces, etc.).\n     */\n    quantity: number;\n    /**\n     * Unit price per individual item before taxes and discounts (in USD).\n     */\n    unitPrice: number;\n    /**\n     * Cost basis of the product for internal accounting and margin calculations (in USD).\n     */\n    unitCost: number | null;\n    /**\n     * State tracking system package identifier for regulatory compliance (seed-to-sale tracking).\n     */\n    packageId: string | null;\n    /**\n     * Original source package identifier for product lineage tracking in state systems.\n     */\n    sourcePackageId: string | null;\n    /**\n     * Total discount amount applied to this line item (in USD).\n     */\n    totalDiscount: number;\n    /**\n     * Inventory record identifier for the specific product inventory being sold.\n     */\n    inventoryId: number;\n    /**\n     * Unit type identifier defining how the product is measured and sold.\n     */\n    unitId: number;\n    /**\n     * Flower equivalent weight for concentrate products in grams (for regulatory compliance).\n     */\n    flowerEquivalent: number | null;\n    /**\n     * Collection of discounts applied to this transaction item.\n     */\n    discounts: Array<AppliedDiscountWritable> | null;\n    /**\n     * Collection of taxes applied to this transaction item.\n     */\n    taxes: Array<LineItemTaxInfoWritable> | null;\n    /**\n     * Date when this item was returned (null if not returned).\n     */\n    returnDate: string | null;\n    /**\n     * Transaction identifier of the return transaction that processed this item's return.\n     */\n    returnedByTransactionId: number | null;\n    /**\n     * Reason provided for returning this item (e.g., \"Defective\", \"Customer Dissatisfaction\").\n     */\n    returnReason: string | null;\n    /**\n     * Cultivation batch name for product traceability and regulatory compliance.\n     */\n    batchName: string | null;\n    /**\n     * Vendor or supplier name for the product.\n     */\n    vendor: string | null;\n    /**\n     * Indicates whether this item represents a coupon or promotional discount rather than a physical product.\n     */\n    isCoupon: boolean;\n};\n\nexport type ValidationResultWritable = {\n    errors: Array<ValidationFailure> | null;\n    ruleSetsExecuted: Array<string> | null;\n};\n\nexport type BatchLabResultsPostData = {\n    /**\n     * Batch lab results update request with batch name and lab data - UpdateBatchLabResultsRequest object\n     */\n    body?: UpdateBatchLabResultsRequest;\n    path?: never;\n    query?: never;\n    url: '/batch/lab-results';\n};\n\nexport type BatchLabResultsPostErrors = {\n    /**\n     * Bad Request - String error message (parse response body as plain text) OR `ValidationResult` object with `isValid` boolean, `errors` array, and `ruleSetsExecuted` array\n     */\n    400: ValidationResult;\n    /**\n     * Invalid API Key\n     */\n    401: unknown;\n    /**\n     * Account not authorized\n     */\n    403: unknown;\n    /**\n     * Not Found - Batch with specified name does not exist\n     */\n    404: string;\n    /**\n     * Something went wrong.\n     */\n    500: unknown;\n};\n\nexport type BatchLabResultsPostError = BatchLabResultsPostErrors[keyof BatchLabResultsPostErrors];\n\nexport type BatchLabResultsPostResponses = {\n    /**\n     * Success - Lab results successfully created or updated\n     */\n    200: unknown;\n};\n\nexport type BrandGetData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/brand';\n};\n\nexport type BrandGetErrors = {\n    /**\n     * Unauthorized - Invalid or missing API key\n     */\n    401: unknown;\n    /**\n     * Forbidden - Account not authorized for brand access\n     */\n    403: unknown;\n    /**\n     * Internal Server Error - Server error occurred\n     */\n    500: unknown;\n};\n\nexport type BrandGetResponses = {\n    /**\n     * Success - Returns array of brand objects: `[{ Brand }, ...]`\n     */\n    200: Array<Brand>;\n};\n\nexport type BrandGetResponse = BrandGetResponses[keyof BrandGetResponses];\n\nexport type BrandPostData = {\n    /**\n     * Brand information to create or update - BrandEditRequest object with brand details\n     */\n    body?: BrandEditRequest;\n    path?: never;\n    query?: never;\n    url: '/brand';\n};\n\nexport type BrandPostErrors = {\n    /**\n     * Bad Request - `BadRequestResponse` object with `message` string field (check `propertyErrors`: null for simple message, array for field-specific errors)\n     */\n    400: BadRequestResponse;\n    /**\n     * Invalid API Key\n     */\n    401: unknown;\n    /**\n     * Account not authorized\n     */\n    403: unknown;\n    /**\n     * Internal server error\n     */\n    500: unknown;\n};\n\nexport type BrandPostError = BrandPostErrors[keyof BrandPostErrors];\n\nexport type BrandPostResponses = {\n    /**\n     * Success - Returns brand object: `{ Brand }`\n     */\n    200: Brand;\n};\n\nexport type BrandPostResponse = BrandPostResponses[keyof BrandPostResponses];\n\nexport type CustomerCustomersGetData = {\n    body?: never;\n    path?: never;\n    query?: {\n        /**\n         * Optional date filter to return customers modified after this timestamp - Used for incremental sync\n         */\n        fromLastModifiedDateUTC?: string;\n        /**\n         * Optional date filter to return customers modified before this timestamp - Used for date range filtering\n         */\n        toLastModifiedDateUTC?: string;\n        /**\n         * Optional customer ID to return a specific customer by internal ID\n         */\n        customerID?: number;\n        /**\n         * Include/exclude anonymous customers in results - Default: true\n         */\n        includeAnonymous?: boolean;\n        /**\n         * Optional unique ID to return a specific customer by unique identifier - Must be valid long integer when provided\n         */\n        uniqueId?: string;\n    };\n    url: '/customer/customers';\n};\n\nexport type CustomerCustomersGetErrors = {\n    /**\n     * Bad Request - Invalid date range or uniqueId format\n     */\n    400: BadRequestResponse;\n    /**\n     * Unauthorized - Invalid or missing API key\n     */\n    401: unknown;\n    /**\n     * Forbidden - Account not authorized for customer data operations\n     */\n    403: unknown;\n    /**\n     * Not Found - Customer not found when searching by customerID or uniqueId\n     */\n    404: unknown;\n    /**\n     * Internal Server Error - Server error occurred\n     */\n    500: unknown;\n};\n\nexport type CustomerCustomersGetError = CustomerCustomersGetErrors[keyof CustomerCustomersGetErrors];\n\nexport type CustomerCustomersGetResponses = {\n    /**\n     * Success - Returns array of customer objects: `[{ Customer }, ...]`\n     */\n    200: Array<Customer>;\n};\n\nexport type CustomerCustomersGetResponse = CustomerCustomersGetResponses[keyof CustomerCustomersGetResponses];\n\nexport type CustomerCustomersPaginatedGetData = {\n    body?: never;\n    path?: never;\n    query?: {\n        /**\n         * Optional date filter to return customers modified after this timestamp\n         */\n        fromLastModifiedDateUTC?: string;\n        /**\n         * Optional date filter to return customers modified before this timestamp\n         */\n        toLastModifiedDateUTC?: string;\n        /**\n         * Page number for sequential pagination (integer, starts at 0) - Default: 0\n         */\n        PageNumber?: number;\n        /**\n         * Number of items per page (integer) - Default: 1000, Maximum: 10000\n         */\n        PageSize?: number;\n        /**\n         * Include/exclude anonymous customers in results - Default: true\n         */\n        includeAnonymous?: boolean;\n    };\n    url: '/customer/customers-paginated';\n};\n\nexport type CustomerCustomersPaginatedGetErrors = {\n    /**\n     * Bad Request - PageSize exceeds maximum limit of 10,000\n     */\n    400: BadRequestResponse;\n    /**\n     * Invalid API Key\n     */\n    401: unknown;\n    /**\n     * Account not authorized\n     */\n    403: unknown;\n    /**\n     * Something went wrong.\n     */\n    500: unknown;\n};\n\nexport type CustomerCustomersPaginatedGetError = CustomerCustomersPaginatedGetErrors[keyof CustomerCustomersPaginatedGetErrors];\n\nexport type CustomerCustomersPaginatedGetResponses = {\n    /**\n     * Success\n     */\n    200: Array<Customer>;\n};\n\nexport type CustomerCustomersPaginatedGetResponse = CustomerCustomersPaginatedGetResponses[keyof CustomerCustomersPaginatedGetResponses];\n\nexport type CustomerCustomerTypesGetData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/customer/customer-types';\n};\n\nexport type CustomerCustomerTypesGetErrors = {\n    /**\n     * Invalid API Key\n     */\n    401: unknown;\n    /**\n     * Account not authorized\n     */\n    403: unknown;\n    /**\n     * Something went wrong.\n     */\n    500: unknown;\n};\n\nexport type CustomerCustomerTypesGetResponses = {\n    /**\n     * Success\n     */\n    200: Array<CustomerType>;\n};\n\nexport type CustomerCustomerTypesGetResponse = CustomerCustomerTypesGetResponses[keyof CustomerCustomerTypesGetResponses];\n\nexport type CustomerReferralSourcesGetData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/customer/referral-sources';\n};\n\nexport type CustomerReferralSourcesGetErrors = {\n    /**\n     * Invalid API Key\n     */\n    401: unknown;\n    /**\n     * Account not authorized\n     */\n    403: unknown;\n    /**\n     * Something went wrong.\n     */\n    500: unknown;\n};\n\nexport type CustomerReferralSourcesGetResponses = {\n    /**\n     * Success\n     */\n    200: Array<string>;\n};\n\nexport type CustomerReferralSourcesGetResponse = CustomerReferralSourcesGetResponses[keyof CustomerReferralSourcesGetResponses];\n\nexport type CustomerCustomerPostData = {\n    /**\n     * Customer information to create or update - EcomCustomerEdit object with customer details\n     */\n    body?: EcomCustomerEdit;\n    headers?: {\n        /**\n         * Optional GUID for idempotency checks. When provided with IdempotencyKey in request body, prevents duplicate customer creation\n         */\n        ConsumerKey?: string;\n    };\n    path?: never;\n    query?: {\n        /**\n         * Skip duplicate detection and force creation of new customer record - Default: false\n         */\n        bypassDeduplication?: boolean;\n    };\n    url: '/customer/customer';\n};\n\nexport type CustomerCustomerPostErrors = {\n    /**\n     * Bad Request - `BadRequestResponse` object with `message` string field (check `propertyErrors`: null for simple message, array for field-specific errors)\n     */\n    400: BadRequestResponse;\n    /**\n     * Unauthorized - Invalid or missing API key\n     */\n    401: unknown;\n    /**\n     * Forbidden - Account not authorized for customer management\n     */\n    403: unknown;\n    /**\n     * Not Found - Customer ID provided for update but customer does not exist\n     */\n    404: string;\n    /**\n     * Internal Server Error - Server error occurred during customer processing\n     */\n    500: unknown;\n};\n\nexport type CustomerCustomerPostError = CustomerCustomerPostErrors[keyof CustomerCustomerPostErrors];\n\nexport type CustomerCustomerPostResponses = {\n    /**\n     * Success - Returns complete Customer object with assigned ID and loyalty status\n     */\n    200: Customer;\n};\n\nexport type CustomerCustomerPostResponse = CustomerCustomerPostResponses[keyof CustomerCustomerPostResponses];\n\nexport type CustomerCustomerLookupPostData = {\n    body?: EcomCustomerEdit;\n    path?: never;\n    query?: never;\n    url: '/customer/customerLookup';\n};\n\nexport type CustomerCustomerLookupPostErrors = {\n    /**\n     * Bad Request\n     */\n    400: BadRequestResponse;\n    /**\n     * Unauthorized\n     */\n    401: unknown;\n    /**\n     * Forbidden\n     */\n    403: unknown;\n    /**\n     * Not Found\n     */\n    404: string;\n    /**\n     * Internal Server Error\n     */\n    500: unknown;\n};\n\nexport type CustomerCustomerLookupPostError = CustomerCustomerLookupPostErrors[keyof CustomerCustomerLookupPostErrors];\n\nexport type CustomerCustomerLookupPostResponses = {\n    /**\n     * OK\n     */\n    200: Customer;\n};\n\nexport type CustomerCustomerLookupPostResponse = CustomerCustomerLookupPostResponses[keyof CustomerCustomerLookupPostResponses];\n\nexport type CustomerSearchPostData = {\n    /**\n     * Customer search request with search criteria - CustomerSearchRequest object\n     */\n    body?: CustomerSearchRequest;\n    path?: never;\n    query?: never;\n    url: '/customer/search';\n};\n\nexport type CustomerSearchPostErrors = {\n    /**\n     * Bad Request - Validation errors or no search criteria provided\n     */\n    400: BadRequestResponse;\n    /**\n     * Invalid API Key\n     */\n    401: unknown;\n    /**\n     * Account not authorized\n     */\n    403: unknown;\n    /**\n     * Something went wrong.\n     */\n    500: unknown;\n};\n\nexport type CustomerSearchPostError = CustomerSearchPostErrors[keyof CustomerSearchPostErrors];\n\nexport type CustomerSearchPostResponses = {\n    /**\n     * Success\n     */\n    200: Array<CustomerSearchResult>;\n};\n\nexport type CustomerSearchPostResponse = CustomerSearchPostResponses[keyof CustomerSearchPostResponses];\n\nexport type CustomerByExternalIdGetData = {\n    body?: never;\n    path?: never;\n    query?: {\n        externalId?: string;\n    };\n    url: '/customer/by-external-id';\n};\n\nexport type CustomerByExternalIdGetErrors = {\n    /**\n     * Bad Request\n     */\n    400: BadRequestResponse;\n    /**\n     * Unauthorized\n     */\n    401: unknown;\n    /**\n     * Forbidden\n     */\n    403: unknown;\n    /**\n     * Not Found\n     */\n    404: unknown;\n    /**\n     * Internal Server Error\n     */\n    500: unknown;\n};\n\nexport type CustomerByExternalIdGetError = CustomerByExternalIdGetErrors[keyof CustomerByExternalIdGetErrors];\n\nexport type CustomerByExternalIdGetResponses = {\n    /**\n     * OK\n     */\n    200: Array<CustomerSearchResult>;\n};\n\nexport type CustomerByExternalIdGetResponse = CustomerByExternalIdGetResponses[keyof CustomerByExternalIdGetResponses];\n\nexport type CustomerJournalGetData = {\n    body?: never;\n    path?: never;\n    query?: {\n        /**\n         * Internal customer ID to retrieve journal entries for - Must exist and be accessible to your location\n         */\n        customerId?: number;\n    };\n    url: '/customer-journal';\n};\n\nexport type CustomerJournalGetErrors = {\n    /**\n     * Bad Request - `BadRequestResponse` object with `message` string field (check `propertyErrors`: null for simple message, array for field-specific errors)\n     */\n    400: BadRequestResponse;\n    /**\n     * Unauthorized - Invalid or missing API key\n     */\n    401: unknown;\n    /**\n     * Forbidden - Account not authorized for customer access\n     */\n    403: unknown;\n    /**\n     * Internal Server Error - Server error occurred\n     */\n    500: unknown;\n};\n\nexport type CustomerJournalGetError = CustomerJournalGetErrors[keyof CustomerJournalGetErrors];\n\nexport type CustomerJournalGetResponses = {\n    /**\n     * Success - Returns array of journal entry objects: `[{ JournalEntry }, ...]`\n     */\n    200: Array<JournalEntry>;\n};\n\nexport type CustomerJournalGetResponse = CustomerJournalGetResponses[keyof CustomerJournalGetResponses];\n\nexport type CustomerJournalUpdatePostData = {\n    /**\n     * Journal entry update request with required fields to update - UpdateJournalEntryRequest object\n     */\n    body?: UpdateJournalEntryRequest;\n    path?: never;\n    query?: never;\n    url: '/customer-journal/update';\n};\n\nexport type CustomerJournalUpdatePostErrors = {\n    /**\n     * Bad Request - Validation errors or invalid journal entry ID\n     */\n    400: BadRequestResponse;\n    /**\n     * Unauthorized - Invalid or missing API key\n     */\n    401: unknown;\n    /**\n     * Forbidden - Account not authorized for customer access\n     */\n    403: unknown;\n    /**\n     * Internal Server Error - Server error occurred\n     */\n    500: unknown;\n};\n\nexport type CustomerJournalUpdatePostError = CustomerJournalUpdatePostErrors[keyof CustomerJournalUpdatePostErrors];\n\nexport type CustomerJournalUpdatePostResponses = {\n    /**\n     * Success - Returns journal entry object: `{ JournalEntry }`\n     */\n    200: JournalEntry;\n};\n\nexport type CustomerJournalUpdatePostResponse = CustomerJournalUpdatePostResponses[keyof CustomerJournalUpdatePostResponses];\n\nexport type CustomerJournalCreatePostData = {\n    /**\n     * Journal entry creation request with customer ID and entry details - CreateJournalEntryRequest object\n     */\n    body?: CreateJournalEntryRequest;\n    path?: never;\n    query?: never;\n    url: '/customer-journal/create';\n};\n\nexport type CustomerJournalCreatePostErrors = {\n    /**\n     * Bad Request - Validation errors or invalid customer ID\n     */\n    400: BadRequestResponse;\n    /**\n     * Unauthorized - Invalid or missing API key\n     */\n    401: unknown;\n    /**\n     * Forbidden - Account not authorized for customer access\n     */\n    403: unknown;\n    /**\n     * Internal Server Error - Server error occurred\n     */\n    500: unknown;\n};\n\nexport type CustomerJournalCreatePostError = CustomerJournalCreatePostErrors[keyof CustomerJournalCreatePostErrors];\n\nexport type CustomerJournalCreatePostResponses = {\n    /**\n     * Success - Returns journal entry object: `{ JournalEntry }`\n     */\n    200: JournalEntry;\n};\n\nexport type CustomerJournalCreatePostResponse = CustomerJournalCreatePostResponses[keyof CustomerJournalCreatePostResponses];\n\nexport type DeliveriesGetData = {\n    body?: never;\n    path?: never;\n    query?: {\n        /**\n         * Pre-order ID to get delivery status for - Optional, mutually exclusive with other filters\n         */\n        PreOrderId?: number;\n        /**\n         * Transaction ID to get delivery status for - Optional, mutually exclusive with other filters\n         */\n        TransactionId?: number;\n        /**\n         * Array of transaction IDs to get delivery status for - Optional, mutually exclusive with other filters\n         */\n        transactionIds?: Array<number>;\n        /**\n         * Include detailed line item data in response - Default: false\n         */\n        includeLineItems?: boolean;\n        /**\n         * Filter deliveries by status - Optional, mutually exclusive with other filters\n         */\n        deliveryStatus?: string;\n    };\n    url: '/Deliveries';\n};\n\nexport type DeliveriesGetErrors = {\n    /**\n     * Bad Request - `ValidationResult` object with `isValid` boolean, `errors` array, and `ruleSetsExecuted` array\n     */\n    400: ValidationResult;\n    /**\n     * Unauthorized - Invalid or missing API key\n     */\n    401: unknown;\n    /**\n     * Forbidden - Account not authorized for delivery access\n     */\n    403: unknown;\n    /**\n     * Internal Server Error - Server error occurred\n     */\n    500: unknown;\n};\n\nexport type DeliveriesGetError = DeliveriesGetErrors[keyof DeliveriesGetErrors];\n\nexport type DeliveriesGetResponses = {\n    /**\n     * Success - Returns array of delivery objects: `[{ DeliveryOrderStatus }, ...]`\n     */\n    200: Array<DeliveryOrderStatus>;\n};\n\nexport type DeliveriesGetResponse = DeliveriesGetResponses[keyof DeliveriesGetResponses];\n\nexport type DeliveriesSetRouteDetailPostData = {\n    /**\n     * Delivery route detail update request with transaction ID and delivery information - UpdateDeliveryRouteDetailRequest object\n     */\n    body?: UpdateDeliveryRouteDetailRequest;\n    path?: never;\n    query?: never;\n    url: '/Deliveries/set-route-detail';\n};\n\nexport type DeliveriesSetRouteDetailPostErrors = {\n    /**\n     * Bad Request - `ValidationResult` object with `isValid` boolean, `errors` array, and `ruleSetsExecuted` array\n     */\n    400: ValidationResult;\n    /**\n     * Unauthorized - Invalid or missing API key\n     */\n    401: unknown;\n    /**\n     * Forbidden - Account not authorized for delivery access\n     */\n    403: unknown;\n    /**\n     * Internal Server Error - Server error occurred\n     */\n    500: unknown;\n};\n\nexport type DeliveriesSetRouteDetailPostError = DeliveriesSetRouteDetailPostErrors[keyof DeliveriesSetRouteDetailPostErrors];\n\nexport type DeliveriesSetRouteDetailPostResponses = {\n    /**\n     * Success - Route details successfully updated\n     */\n    200: unknown;\n};\n\nexport type DiscountsGetData = {\n    body?: never;\n    path?: never;\n    query?: {\n        /**\n         * Include deleted or inactive discounts in results - Default: false\n         */\n        includeInactive?: boolean;\n        /**\n         * Include detailed product/category restriction data - Default: false\n         */\n        includeInclusionExclusionData?: boolean;\n    };\n    url: '/discounts';\n};\n\nexport type DiscountsGetErrors = {\n    /**\n     * Unauthorized - Invalid or missing API key\n     */\n    401: unknown;\n    /**\n     * Internal Server Error - Server error occurred\n     */\n    500: unknown;\n};\n\nexport type DiscountsGetResponses = {\n    /**\n     * Success - Returns array of basic discount information\n     */\n    200: Array<PublishedDiscount>;\n};\n\nexport type DiscountsGetResponse = DiscountsGetResponses[keyof DiscountsGetResponses];\n\nexport type DiscountsV2ListGetData = {\n    body?: never;\n    path?: never;\n    query?: {\n        /**\n         * Include deleted or inactive discounts in results - Default: false\n         */\n        includeInactive?: boolean;\n        /**\n         * Include detailed product/category restriction data - Default: false\n         */\n        includeInclusionExclusionData?: boolean;\n        /**\n         * Include credit card and payment method restrictions - Default: false\n         */\n        includePaymentRestrictions?: boolean;\n    };\n    url: '/discounts/v2/list';\n};\n\nexport type DiscountsV2ListGetErrors = {\n    /**\n     * Unauthorized - Invalid or missing API key\n     */\n    401: unknown;\n    /**\n     * Internal Server Error - Server error occurred\n     */\n    500: unknown;\n};\n\nexport type DiscountsV2ListGetResponses = {\n    /**\n     * Success - Returns array of comprehensive discount configuration objects\n     */\n    200: Array<DiscountApiResponse>;\n};\n\nexport type DiscountsV2ListGetResponse = DiscountsV2ListGetResponses[keyof DiscountsV2ListGetResponses];\n\nexport type DriversGetData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/drivers';\n};\n\nexport type DriversGetErrors = {\n    /**\n     * Unauthorized - Invalid or missing API key\n     */\n    401: unknown;\n    /**\n     * Forbidden - Account not authorized for driver access\n     */\n    403: unknown;\n    /**\n     * Internal Server Error - Server error occurred\n     */\n    500: unknown;\n};\n\nexport type DriversGetResponses = {\n    /**\n     * Success - Returns array of driver objects: `[{ DriverDetail }, ...]`\n     */\n    200: Array<DriverDetail>;\n};\n\nexport type DriversGetResponse = DriversGetResponses[keyof DriversGetResponses];\n\nexport type DriversPostData = {\n    /**\n     * Driver information to create or update - DriverDetail object with driver details\n     */\n    body?: DriverDetail;\n    path?: never;\n    query?: never;\n    url: '/drivers';\n};\n\nexport type DriversPostErrors = {\n    /**\n     * Bad Request - `ValidationResult` object with `isValid` boolean, `errors` array, and `ruleSetsExecuted` array\n     */\n    400: ValidationResult;\n    /**\n     * Unauthorized - Invalid or missing API key\n     */\n    401: unknown;\n    /**\n     * Forbidden - Account not authorized for driver access\n     */\n    403: unknown;\n    /**\n     * Internal Server Error - Server error occurred\n     */\n    500: unknown;\n};\n\nexport type DriversPostError = DriversPostErrors[keyof DriversPostErrors];\n\nexport type DriversPostResponses = {\n    /**\n     * Success - Driver successfully created or updated\n     */\n    200: unknown;\n};\n\nexport type EmployeesGetData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/employees';\n};\n\nexport type EmployeesGetErrors = {\n    /**\n     * Unauthorized - Invalid or missing API key\n     */\n    401: unknown;\n    /**\n     * Forbidden - Account not authorized for employee access\n     */\n    403: unknown;\n    /**\n     * Internal Server Error - Server error occurred\n     */\n    500: unknown;\n};\n\nexport type EmployeesGetResponses = {\n    /**\n     * Success - Returns array of Employee objects: `[{ Employee }, ...]`\n     */\n    200: Array<Employee>;\n};\n\nexport type EmployeesGetResponse = EmployeesGetResponses[keyof EmployeesGetResponses];\n\nexport type GuestlistGetData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/guestlist';\n};\n\nexport type GuestlistGetErrors = {\n    /**\n     * Unauthorized - Invalid or missing API key\n     */\n    401: unknown;\n    /**\n     * Forbidden - Account not authorized for customer access\n     */\n    403: unknown;\n    /**\n     * Internal Server Error - Server error occurred\n     */\n    500: unknown;\n};\n\nexport type GuestlistGetResponses = {\n    /**\n     * Success - Returns array of guest objects: `[{ GuestListEntry }, ...]`\n     */\n    200: Array<GuestListEntry>;\n};\n\nexport type GuestlistGetResponse = GuestlistGetResponses[keyof GuestlistGetResponses];\n\nexport type HarvestGetData = {\n    body?: never;\n    path?: never;\n    query?: {\n        /**\n         * Filter harvests modified after this date for incremental sync - Optional\n         */\n        fromLastModifiedDateUTC?: string;\n        /**\n         * Filter harvests modified before this date for date range filtering - Optional\n         */\n        toLastModifiedDateUTC?: string;\n        /**\n         * Filter by harvest status: true=active, false=completed, null=completed only - Default: null (completed only)\n         */\n        activeHarvests?: boolean;\n    };\n    url: '/harvest';\n};\n\nexport type HarvestGetErrors = {\n    /**\n     * Unauthorized - Invalid or missing API key\n     */\n    401: unknown;\n    /**\n     * Forbidden - Account not authorized for cultivation or inventory access\n     */\n    403: unknown;\n    /**\n     * Internal Server Error - Server error occurred\n     */\n    500: unknown;\n};\n\nexport type HarvestGetResponses = {\n    /**\n     * Success - Returns array of harvest objects: `[{ Harvest }, ...]`\n     */\n    200: Array<Harvest>;\n};\n\nexport type HarvestGetResponse = HarvestGetResponses[keyof HarvestGetResponses];\n\nexport type HarvestPostData = {\n    /**\n     * Harvest information to create or update - CreateOrUpdateHarvest object with harvest details\n     */\n    body?: CreateOrUpdateHarvest;\n    path?: never;\n    query?: never;\n    url: '/harvest';\n};\n\nexport type HarvestPostErrors = {\n    /**\n     * Unauthorized - Invalid or missing API key\n     */\n    401: unknown;\n    /**\n     * Forbidden - Account not authorized for cultivation write access\n     */\n    403: unknown;\n    /**\n     * Internal Server Error - Server error occurred\n     */\n    500: unknown;\n};\n\nexport type HarvestPostResponses = {\n    /**\n     * Success - Returns harvest ID for created or updated harvest: `integer`\n     */\n    200: number;\n};\n\nexport type HarvestPostResponse = HarvestPostResponses[keyof HarvestPostResponses];\n\nexport type HarvestBulkPostData = {\n    /**\n     * Bulk harvest request with array of harvest operations - BulkCreateOrUpdateHarvest object\n     */\n    body?: BulkCreateOrUpdateHarvest;\n    path?: never;\n    query?: never;\n    url: '/harvest/bulk';\n};\n\nexport type HarvestBulkPostErrors = {\n    /**\n     * Bad Request - `BadRequestResponse` object with `message` string field (check `propertyErrors`: null for simple message, array for field-specific errors)\n     */\n    400: BadRequestResponse;\n    /**\n     * Unauthorized - Invalid or missing API key\n     */\n    401: unknown;\n    /**\n     * Forbidden - Account not authorized for cultivation write access\n     */\n    403: unknown;\n    /**\n     * Internal Server Error - Server error occurred\n     */\n    500: unknown;\n};\n\nexport type HarvestBulkPostError = HarvestBulkPostErrors[keyof HarvestBulkPostErrors];\n\nexport type HarvestBulkPostResponses = {\n    /**\n     * Success - Returns bulk harvest response object: `{ BulkCreateOrUpdateHarvestResponse }`\n     */\n    200: BulkCreateOrUpdateHarvestResponse;\n};\n\nexport type HarvestBulkPostResponse = HarvestBulkPostResponses[keyof HarvestBulkPostResponses];\n\nexport type OkcomputerGetData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/okcomputer';\n};\n\nexport type OkcomputerGetErrors = {\n    /**\n     * Internal Server Error - Service is experiencing issues\n     */\n    500: unknown;\n};\n\nexport type OkcomputerGetResponses = {\n    /**\n     * Success - Service is healthy and responsive\n     */\n    200: SuccessResult;\n};\n\nexport type OkcomputerGetResponse = OkcomputerGetResponses[keyof OkcomputerGetResponses];\n\nexport type IntegrationIntegrationReconGetData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/integration/integration-recon';\n};\n\nexport type IntegrationIntegrationReconGetErrors = {\n    /**\n     * Invalid API Key\n     */\n    401: unknown;\n    /**\n     * Account not authorized\n     */\n    403: unknown;\n    /**\n     * Something went wrong.\n     */\n    500: unknown;\n};\n\nexport type IntegrationIntegrationReconGetResponses = {\n    /**\n     * Success\n     */\n    200: InventoryIntegrationReconResponse;\n};\n\nexport type IntegrationIntegrationReconGetResponse = IntegrationIntegrationReconGetResponses[keyof IntegrationIntegrationReconGetResponses];\n\nexport type InventoryGetData = {\n    body?: never;\n    path?: never;\n    query?: {\n        /**\n         * Include detailed lab testing data and cannabinoid profiles - Default: false\n         */\n        includeLabResults?: boolean;\n        /**\n         * Include quantity breakdown by storage room/location - Default: false\n         */\n        includeRoomQuantities?: boolean;\n    };\n    url: '/inventory';\n};\n\nexport type InventoryGetErrors = {\n    /**\n     * Unauthorized - Invalid or missing API key\n     */\n    401: unknown;\n    /**\n     * Forbidden - Account not authorized for inventory access\n     */\n    403: unknown;\n    /**\n     * Internal Server Error - Server error occurred\n     */\n    500: unknown;\n};\n\nexport type InventoryGetResponses = {\n    /**\n     * Success - Returns array of inventory items with product and stock details\n     */\n    200: Array<InventoryItem>;\n};\n\nexport type InventoryGetResponse = InventoryGetResponses[keyof InventoryGetResponses];\n\nexport type InventoryLabresultsGetData = {\n    body?: never;\n    path?: never;\n    query?: {\n        BatchName?: string;\n    };\n    url: '/inventory/labresults';\n};\n\nexport type InventoryLabresultsGetErrors = {\n    /**\n     * Unauthorized\n     */\n    401: unknown;\n    /**\n     * Forbidden\n     */\n    403: unknown;\n    /**\n     * Internal Server Error\n     */\n    500: unknown;\n};\n\nexport type InventoryLabresultsGetResponses = {\n    /**\n     * OK\n     */\n    200: Array<LabResult>;\n};\n\nexport type InventoryLabresultsGetResponse = InventoryLabresultsGetResponses[keyof InventoryLabresultsGetResponses];\n\nexport type InventorySnapshotGetData = {\n    body?: never;\n    path?: never;\n    query?: {\n        fromDate?: string;\n    };\n    url: '/inventory/snapshot';\n};\n\nexport type InventorySnapshotGetErrors = {\n    /**\n     * Unauthorized\n     */\n    401: unknown;\n    /**\n     * Forbidden\n     */\n    403: unknown;\n    /**\n     * Internal Server Error\n     */\n    500: unknown;\n};\n\nexport type InventorySnapshotGetResponses = {\n    /**\n     * OK\n     */\n    200: Array<InventorySnapshot>;\n};\n\nexport type InventorySnapshotGetResponse = InventorySnapshotGetResponses[keyof InventorySnapshotGetResponses];\n\nexport type InventoryReceivedinventoryGetData = {\n    body?: never;\n    path?: never;\n    query?: {\n        receiveInventoryHistoryId?: number;\n        startDate?: string;\n        endDate?: string;\n    };\n    url: '/inventory/receivedinventory';\n};\n\nexport type InventoryReceivedinventoryGetErrors = {\n    /**\n     * Unauthorized\n     */\n    401: unknown;\n    /**\n     * Forbidden\n     */\n    403: unknown;\n    /**\n     * Internal Server Error\n     */\n    500: unknown;\n};\n\nexport type InventoryReceivedinventoryGetResponses = {\n    /**\n     * OK\n     */\n    200: Array<ReceivedInventory>;\n};\n\nexport type InventoryReceivedinventoryGetResponse = InventoryReceivedinventoryGetResponses[keyof InventoryReceivedinventoryGetResponses];\n\nexport type InventoryInventorytransactionGetData = {\n    body?: never;\n    path?: never;\n    query?: {\n        startDate?: string;\n        endDate?: string;\n        transactionType?: string;\n    };\n    url: '/inventory/inventorytransaction';\n};\n\nexport type InventoryInventorytransactionGetErrors = {\n    /**\n     * Unauthorized\n     */\n    401: unknown;\n    /**\n     * Forbidden\n     */\n    403: unknown;\n    /**\n     * Internal Server Error\n     */\n    500: unknown;\n};\n\nexport type InventoryInventorytransactionGetResponses = {\n    /**\n     * OK\n     */\n    200: Array<InventoryTransaction>;\n};\n\nexport type InventoryInventorytransactionGetResponse = InventoryInventorytransactionGetResponses[keyof InventoryInventorytransactionGetResponses];\n\nexport type InventoryReceiveinventoryPostData = {\n    /**\n     * Receive inventory order details including vendor, delivery, and item information\n     */\n    body?: ReceiveInventorySave;\n    path?: never;\n    query?: never;\n    url: '/inventory/receiveinventory';\n};\n\nexport type InventoryReceiveinventoryPostErrors = {\n    /**\n     * Bad Request - `BadRequestResponse` object with `message` string field (check `propertyErrors`: null for simple message, array for field-specific errors) OR String error message (parse response body as plain text)\n     */\n    400: string;\n    /**\n     * Unauthorized - Invalid or missing API key\n     */\n    401: unknown;\n    /**\n     * Forbidden - Account not authorized for inventory access\n     */\n    403: unknown;\n    /**\n     * Internal Server Error - Server error occurred\n     */\n    500: unknown;\n};\n\nexport type InventoryReceiveinventoryPostError = InventoryReceiveinventoryPostErrors[keyof InventoryReceiveinventoryPostErrors];\n\nexport type InventoryReceiveinventoryPostResponses = {\n    /**\n     * Success - Returns SavedReceive object with transaction details\n     */\n    200: SavedReceive;\n};\n\nexport type InventoryReceiveinventoryPostResponse = InventoryReceiveinventoryPostResponses[keyof InventoryReceiveinventoryPostResponses];\n\nexport type LineagesGetData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/lineages';\n};\n\nexport type LineagesGetErrors = {\n    /**\n     * Unauthorized - Invalid or missing API key\n     */\n    401: unknown;\n    /**\n     * Forbidden - Account not authorized\n     */\n    403: unknown;\n    /**\n     * Internal Server Error - Server error occurred\n     */\n    500: unknown;\n};\n\nexport type LineagesGetResponses = {\n    /**\n     * Success - Returns array of lineage objects: `[{ Lineage }, ...]`\n     */\n    200: Array<Lineage>;\n};\n\nexport type LineagesGetResponse = LineagesGetResponses[keyof LineagesGetResponses];\n\nexport type PackageSetTagsPostData = {\n    /**\n     * Package tag update request with package identifiers and replacement tags - UpdatePackageTagsRequest object\n     */\n    body?: UpdatePackageTagsRequest;\n    path?: never;\n    query?: never;\n    url: '/package/set-tags';\n};\n\nexport type PackageSetTagsPostErrors = {\n    /**\n     * Bad Request - `ValidationResult` object with `isValid` boolean, `errors` array, and `ruleSetsExecuted` array\n     */\n    400: ValidationResult;\n    /**\n     * Invalid API Key\n     */\n    401: unknown;\n    /**\n     * Account not authorized\n     */\n    403: unknown;\n    /**\n     * Something went wrong.\n     */\n    500: unknown;\n};\n\nexport type PackageSetTagsPostError = PackageSetTagsPostErrors[keyof PackageSetTagsPostErrors];\n\nexport type PackageSetTagsPostResponses = {\n    /**\n     * Success - Tags successfully set on specified packages\n     */\n    200: unknown;\n};\n\nexport type PackageAddTagsPostData = {\n    /**\n     * Package tag update request with package identifiers and additional tags - UpdatePackageTagsRequest object\n     */\n    body?: UpdatePackageTagsRequest;\n    path?: never;\n    query?: never;\n    url: '/package/add-tags';\n};\n\nexport type PackageAddTagsPostErrors = {\n    /**\n     * Bad Request - `ValidationResult` object with `isValid` boolean, `errors` array, and `ruleSetsExecuted` array\n     */\n    400: unknown;\n    /**\n     * Invalid API Key\n     */\n    401: unknown;\n    /**\n     * Account not authorized\n     */\n    403: unknown;\n    /**\n     * Something went wrong.\n     */\n    500: unknown;\n};\n\nexport type PackageAddTagsPostResponses = {\n    /**\n     * Success - Tags successfully added to specified packages\n     */\n    200: unknown;\n};\n\nexport type PackageRemoveTagsPostData = {\n    /**\n     * Package tag update request with package identifiers and tags to remove - UpdatePackageTagsRequest object\n     */\n    body?: UpdatePackageTagsRequest;\n    path?: never;\n    query?: never;\n    url: '/package/remove-tags';\n};\n\nexport type PackageRemoveTagsPostErrors = {\n    /**\n     * Bad Request - `ValidationResult` object with `isValid` boolean, `errors` array, and `ruleSetsExecuted` array\n     */\n    400: unknown;\n    /**\n     * Invalid API Key\n     */\n    401: unknown;\n    /**\n     * Account not authorized\n     */\n    403: unknown;\n    /**\n     * Something went wrong.\n     */\n    500: unknown;\n};\n\nexport type PackageRemoveTagsPostResponses = {\n    /**\n     * Success - Tags successfully removed from specified packages\n     */\n    200: unknown;\n};\n\nexport type PlantGetData = {\n    body?: never;\n    path?: never;\n    query?: {\n        /**\n         * Dutchie internal plant ID for specific plant lookup - Optional\n         */\n        plantId?: number;\n        /**\n         * Plant serial number for tracking system integration - Optional\n         */\n        serialNumber?: string;\n        /**\n         * Plant status filter: Active, Harvesting, Harvested, Retired - Optional\n         */\n        status?: string;\n        /**\n         * Filter plants modified after this date for incremental sync - Optional\n         */\n        lastModifiedDateStart?: string;\n        /**\n         * Filter plants modified before this date for date range filtering - Optional\n         */\n        lastModifiedDateEnd?: string;\n    };\n    url: '/plant';\n};\n\nexport type PlantGetErrors = {\n    /**\n     * Invalid API Key\n     */\n    401: unknown;\n    /**\n     * Account not authorized\n     */\n    403: unknown;\n    /**\n     * Something went wrong.\n     */\n    500: unknown;\n};\n\nexport type PlantGetResponses = {\n    /**\n     * Success\n     */\n    200: Array<Plant>;\n};\n\nexport type PlantGetResponse = PlantGetResponses[keyof PlantGetResponses];\n\nexport type PlantPostData = {\n    /**\n     * Plant creation request with identification and group details - see `CreatePlantRequest` model for complete field documentation\n     */\n    body?: CreatePlantRequest;\n    path?: never;\n    query?: never;\n    url: '/plant';\n};\n\nexport type PlantPostErrors = {\n    /**\n     * Bad Request - Validation errors or duplicate serial number\n     */\n    400: {\n        [key: string]: unknown;\n    };\n    /**\n     * Invalid API Key\n     */\n    401: unknown;\n    /**\n     * Account not authorized\n     */\n    403: unknown;\n    /**\n     * Something went wrong.\n     */\n    500: unknown;\n};\n\nexport type PlantPostError = PlantPostErrors[keyof PlantPostErrors];\n\nexport type PlantPostResponses = {\n    /**\n     * Success - Returns newly created plant ID as integer\n     */\n    200: number;\n};\n\nexport type PlantPostResponse = PlantPostResponses[keyof PlantPostResponses];\n\nexport type PlantHarvestPostData = {\n    /**\n     * Plant harvest request with plant identifiers and optional weight data - HarvestPlantRequest object\n     */\n    body?: HarvestPlantRequest;\n    path?: never;\n    query?: never;\n    url: '/plant/harvest';\n};\n\nexport type PlantHarvestPostErrors = {\n    /**\n     * Invalid API Key\n     */\n    401: unknown;\n    /**\n     * Account not authorized\n     */\n    403: unknown;\n    /**\n     * Something went wrong.\n     */\n    500: unknown;\n};\n\nexport type PlantHarvestPostResponses = {\n    /**\n     * Success - Plants successfully moved to harvest status\n     */\n    200: unknown;\n};\n\nexport type PlantMovePostData = {\n    /**\n     * Plant movement request with plant IDs and target room information - see `MovePlantRequest` model for complete field documentation\n     */\n    body?: MovePlantRequest;\n    path?: never;\n    query?: never;\n    url: '/plant/move';\n};\n\nexport type PlantMovePostErrors = {\n    /**\n     * Bad Request - `BadRequestResponse` object with `message` string field (check `propertyErrors`: null for simple message, array for field-specific errors)\n     */\n    400: unknown;\n    /**\n     * Invalid API Key\n     */\n    401: unknown;\n    /**\n     * Account not authorized\n     */\n    403: unknown;\n    /**\n     * Something went wrong.\n     */\n    500: unknown;\n};\n\nexport type PlantMovePostResponses = {\n    /**\n     * Success - Plants successfully moved to target room\n     */\n    200: unknown;\n};\n\nexport type PlantChangePhasePostData = {\n    /**\n     * Growth phase change request with plant IDs and target phase information - see `ChangeGrowthPhaseRequest` model for complete field documentation\n     */\n    body?: ChangeGrowthPhaseRequest;\n    path?: never;\n    query?: never;\n    url: '/plant/change-phase';\n};\n\nexport type PlantChangePhasePostErrors = {\n    /**\n     * Bad Request - `BadRequestResponse` object with `message` string field (check `propertyErrors`: null for simple message, array for field-specific errors)\n     */\n    400: unknown;\n    /**\n     * Invalid API Key\n     */\n    401: unknown;\n    /**\n     * Account not authorized\n     */\n    403: unknown;\n    /**\n     * Something went wrong.\n     */\n    500: unknown;\n};\n\nexport type PlantChangePhasePostResponses = {\n    /**\n     * Success - Plants successfully updated to new growth phase\n     */\n    200: unknown;\n};\n\nexport type PlantRetirePostData = {\n    /**\n     * Plant retirement request with plant IDs, reason codes, and waste tracking details - see `RetirePlantRequest` model for complete field documentation\n     */\n    body?: RetirePlantRequest;\n    path?: never;\n    query?: never;\n    url: '/plant/retire';\n};\n\nexport type PlantRetirePostErrors = {\n    /**\n     * Bad Request - Invalid reason ID/code or validation errors\n     */\n    400: BadRequestResponse;\n    /**\n     * Invalid API Key\n     */\n    401: unknown;\n    /**\n     * Account not authorized\n     */\n    403: unknown;\n    /**\n     * Something went wrong.\n     */\n    500: unknown;\n};\n\nexport type PlantRetirePostError = PlantRetirePostErrors[keyof PlantRetirePostErrors];\n\nexport type PlantRetirePostResponses = {\n    /**\n     * Success - Plants successfully retired from cultivation\n     */\n    200: unknown;\n};\n\nexport type PlantGetReasonCodesGetData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/plant/get-reason-codes';\n};\n\nexport type PlantGetReasonCodesGetErrors = {\n    /**\n     * Invalid API Key\n     */\n    401: unknown;\n    /**\n     * Account not authorized\n     */\n    403: unknown;\n    /**\n     * Something went wrong.\n     */\n    500: unknown;\n};\n\nexport type PlantGetReasonCodesGetResponses = {\n    /**\n     * Success - Returns array of reason code strings: `[string, ...]`\n     */\n    200: Array<string>;\n};\n\nexport type PlantGetReasonCodesGetResponse = PlantGetReasonCodesGetResponses[keyof PlantGetReasonCodesGetResponses];\n\nexport type PlantAssignPlantsToGroupPostData = {\n    /**\n     * Plant group assignment request with group name and plant serial numbers - see `AssignPlantsToGroupRequest` model for complete field documentation\n     */\n    body?: AssignPlantsToGroupRequest;\n    path?: never;\n    query?: never;\n    url: '/plant/assign-plants-to-group';\n};\n\nexport type PlantAssignPlantsToGroupPostErrors = {\n    /**\n     * Bad Request - Validation errors or invalid plant serial numbers\n     */\n    400: BadRequestResponse;\n    /**\n     * Invalid API Key\n     */\n    401: unknown;\n    /**\n     * Account not authorized\n     */\n    403: unknown;\n    /**\n     * Something went wrong.\n     */\n    500: unknown;\n};\n\nexport type PlantAssignPlantsToGroupPostError = PlantAssignPlantsToGroupPostErrors[keyof PlantAssignPlantsToGroupPostErrors];\n\nexport type PlantAssignPlantsToGroupPostResponses = {\n    /**\n     * Success - Plants successfully assigned to target group\n     */\n    200: unknown;\n};\n\nexport type PlantNonstsUpdatePostData = {\n    /**\n     * Plant update request with PlantId and field updates - UpdatePlantsRequest object\n     */\n    body?: UpdatePlantsRequest;\n    path?: never;\n    query?: never;\n    url: '/plant/nonsts/update';\n};\n\nexport type PlantNonstsUpdatePostErrors = {\n    /**\n     * Bad Request - `BadRequestResponse` object with `message` string field (check `propertyErrors`: null for simple message, array for field-specific errors)\n     */\n    400: BadRequestResponse;\n    /**\n     * Invalid API Key\n     */\n    401: unknown;\n    /**\n     * Account not authorized\n     */\n    403: unknown;\n    /**\n     * Something went wrong.\n     */\n    500: unknown;\n};\n\nexport type PlantNonstsUpdatePostError = PlantNonstsUpdatePostErrors[keyof PlantNonstsUpdatePostErrors];\n\nexport type PlantNonstsUpdatePostResponses = {\n    /**\n     * Success\n     */\n    200: SuccessResult;\n};\n\nexport type PlantNonstsUpdatePostResponse = PlantNonstsUpdatePostResponses[keyof PlantNonstsUpdatePostResponses];\n\nexport type PlantNonstsBatchImmatureplantsPostData = {\n    /**\n     * Immature plant batch request with plant details - PostImmatureBatchRequest object\n     */\n    body?: PostImmatureBatchRequest;\n    path?: never;\n    query?: never;\n    url: '/plant/nonsts/batch/immatureplants';\n};\n\nexport type PlantNonstsBatchImmatureplantsPostErrors = {\n    /**\n     * Bad Request - `BadRequestResponse` object with `message` string field (check `propertyErrors`: null for simple message, array for field-specific errors)\n     */\n    400: BadRequestResponse;\n    /**\n     * Invalid API Key\n     */\n    401: unknown;\n    /**\n     * Account not authorized\n     */\n    403: unknown;\n    /**\n     * Something went wrong.\n     */\n    500: unknown;\n};\n\nexport type PlantNonstsBatchImmatureplantsPostError = PlantNonstsBatchImmatureplantsPostErrors[keyof PlantNonstsBatchImmatureplantsPostErrors];\n\nexport type PlantNonstsBatchImmatureplantsPostResponses = {\n    /**\n     * Success\n     */\n    200: CreateImmaturePlantBatchResponseApiResult;\n};\n\nexport type PlantNonstsBatchImmatureplantsPostResponse = PlantNonstsBatchImmatureplantsPostResponses[keyof PlantNonstsBatchImmatureplantsPostResponses];\n\nexport type PlantNonstsBatchConvertImmatureplantsPostData = {\n    /**\n     * Immature batch conversion request with conversion details - ConvertImmatureBatchRequest object\n     */\n    body?: ConvertImmatureBatchRequest;\n    path?: never;\n    query?: never;\n    url: '/plant/nonsts/batch/convert/immatureplants';\n};\n\nexport type PlantNonstsBatchConvertImmatureplantsPostErrors = {\n    /**\n     * Bad Request - `BadRequestResponse` object with `message` string field (check `propertyErrors`: null for simple message, array for field-specific errors)\n     */\n    400: BadRequestResponse;\n    /**\n     * Invalid API Key\n     */\n    401: unknown;\n    /**\n     * Account not authorized\n     */\n    403: unknown;\n    /**\n     * Something went wrong.\n     */\n    500: unknown;\n};\n\nexport type PlantNonstsBatchConvertImmatureplantsPostError = PlantNonstsBatchConvertImmatureplantsPostErrors[keyof PlantNonstsBatchConvertImmatureplantsPostErrors];\n\nexport type PlantNonstsBatchConvertImmatureplantsPostResponses = {\n    /**\n     * Success\n     */\n    200: ConvertImmaturePlantResponseApiResult;\n};\n\nexport type PlantNonstsBatchConvertImmatureplantsPostResponse = PlantNonstsBatchConvertImmatureplantsPostResponses[keyof PlantNonstsBatchConvertImmatureplantsPostResponses];\n\nexport type PlantNonstsBatchMatureplantsPostData = {\n    /**\n     * Mature plant batch request with plant details - CreateMatureBatchRequest object\n     */\n    body?: CreateMatureBatchRequest;\n    path?: never;\n    query?: never;\n    url: '/plant/nonsts/batch/matureplants';\n};\n\nexport type PlantNonstsBatchMatureplantsPostErrors = {\n    /**\n     * Bad Request - Validation failed or invalid request data\n     */\n    400: BadRequestResponse;\n    /**\n     * Unauthorized - Invalid or missing API key\n     */\n    401: unknown;\n    /**\n     * Forbidden - Account not authorized for mature plant creation or feature flag disabled\n     */\n    403: unknown;\n    /**\n     * Internal Server Error - Server error occurred\n     */\n    500: unknown;\n};\n\nexport type PlantNonstsBatchMatureplantsPostError = PlantNonstsBatchMatureplantsPostErrors[keyof PlantNonstsBatchMatureplantsPostErrors];\n\nexport type PlantNonstsBatchMatureplantsPostResponses = {\n    /**\n     * Success - Returns ApiResult<CreateMaturePlantsResponse> with created plant IDs: `{ \"data\": { \"createdPlants\": [plantId1, plantId2, ...] }, \"message\": \"Successfully created mature plants from batches.\", \"success\": true }`\n     */\n    200: CreateMaturePlantsResponseApiResult;\n};\n\nexport type PlantNonstsBatchMatureplantsPostResponse = PlantNonstsBatchMatureplantsPostResponses[keyof PlantNonstsBatchMatureplantsPostResponses];\n\nexport type PlantNonstsRetagPostData = {\n    /**\n     * Plant retagging request with plant and new tag details - RetagPlantRequest object\n     */\n    body?: RetagPlantRequest;\n    path?: never;\n    query?: never;\n    url: '/plant/nonsts/retag';\n};\n\nexport type PlantNonstsRetagPostErrors = {\n    /**\n     * Bad Request - `BadRequestResponse` object with `message` string field (check `propertyErrors`: null for simple message, array for field-specific errors)\n     */\n    400: BadRequestResponse;\n    /**\n     * Invalid API Key\n     */\n    401: unknown;\n    /**\n     * Account not authorized\n     */\n    403: unknown;\n    /**\n     * Something went wrong.\n     */\n    500: unknown;\n};\n\nexport type PlantNonstsRetagPostError = PlantNonstsRetagPostErrors[keyof PlantNonstsRetagPostErrors];\n\nexport type PlantNonstsRetagPostResponses = {\n    /**\n     * Success\n     */\n    200: unknown;\n};\n\nexport type PlantNonstsBatchRetirePostData = {\n    /**\n     * Immature plant retirement request with plant details - RetireImmaturePlantsRequest object\n     */\n    body?: RetireImmaturePlantsRequest;\n    path?: never;\n    query?: never;\n    url: '/plant/nonsts/batch/retire';\n};\n\nexport type PlantNonstsBatchRetirePostErrors = {\n    /**\n     * Bad Request - Validation failed or invalid plant data\n     */\n    400: BadRequestResponse;\n    /**\n     * Unauthorized - Invalid or missing API key\n     */\n    401: unknown;\n    /**\n     * Forbidden - Account not authorized for plant retirement\n     */\n    403: unknown;\n    /**\n     * Internal Server Error - Server error occurred\n     */\n    500: unknown;\n};\n\nexport type PlantNonstsBatchRetirePostError = PlantNonstsBatchRetirePostErrors[keyof PlantNonstsBatchRetirePostErrors];\n\nexport type PlantNonstsBatchRetirePostResponses = {\n    /**\n     * Success - No response body, operation completed successfully\n     */\n    200: unknown;\n};\n\nexport type PlantNonstsBatchFinishHarvestPostData = {\n    /**\n     * Harvest batch finish/unfinish request with batch details - FinishHarvestBatchRequest object\n     */\n    body?: Array<FinishOrUnfinishBatchDetails>;\n    path?: never;\n    query?: never;\n    url: '/plant/nonsts/batch/finish-harvest';\n};\n\nexport type PlantNonstsBatchFinishHarvestPostErrors = {\n    /**\n     * Bad Request - `BadRequestResponse` object with `message` string field (check `propertyErrors`: null for simple message, array for field-specific errors)\n     */\n    400: BadRequestResponse;\n    /**\n     * Invalid API Key\n     */\n    401: unknown;\n    /**\n     * Account not authorized\n     */\n    403: unknown;\n    /**\n     * Something went wrong.\n     */\n    500: unknown;\n};\n\nexport type PlantNonstsBatchFinishHarvestPostError = PlantNonstsBatchFinishHarvestPostErrors[keyof PlantNonstsBatchFinishHarvestPostErrors];\n\nexport type PlantNonstsBatchFinishHarvestPostResponses = {\n    /**\n     * Success\n     */\n    200: unknown;\n};\n\nexport type PlantNonstsSplitPostData = {\n    /**\n     * Immature plant batch split request with batch and split details - SplitImmaturePlantsRequest object\n     */\n    body?: SplitImmaturePlantsRequest;\n    path?: never;\n    query?: never;\n    url: '/plant/nonsts/split';\n};\n\nexport type PlantNonstsSplitPostErrors = {\n    /**\n     * Bad Request - Validation failed or invalid batch data\n     */\n    400: BadRequestResponse;\n    /**\n     * Unauthorized - Invalid or missing API key\n     */\n    401: unknown;\n    /**\n     * Forbidden - Account not authorized for batch splitting\n     */\n    403: unknown;\n    /**\n     * Internal Server Error - Server error occurred\n     */\n    500: unknown;\n};\n\nexport type PlantNonstsSplitPostError = PlantNonstsSplitPostErrors[keyof PlantNonstsSplitPostErrors];\n\nexport type PlantNonstsSplitPostResponses = {\n    /**\n     * Success - Returns ApiResult<SplitImmaturePlantResult> with split batch details: `{ \"data\": { \"originalBatch\": {...}, \"newBatch\": {...} }, \"message\": \"Successfully split immature batches of plants.\", \"success\": true }`\n     */\n    200: SplitImmaturePlantResultApiResult;\n};\n\nexport type PlantNonstsSplitPostResponse = PlantNonstsSplitPostResponses[keyof PlantNonstsSplitPostResponses];\n\nexport type PlantNonstsBatchPostData = {\n    /**\n     * Batch update request with batch identification and field updates - UpdateBatchRequest object\n     */\n    body?: UpdateBatchRequest;\n    path?: never;\n    query?: never;\n    url: '/plant/nonsts/batch';\n};\n\nexport type PlantNonstsBatchPostErrors = {\n    /**\n     * Bad Request - `BadRequestResponse` object with `message` string field (check `propertyErrors`: null for simple message, array for field-specific errors)\n     */\n    400: BadRequestResponse;\n    /**\n     * Invalid API Key\n     */\n    401: unknown;\n    /**\n     * Account not authorized\n     */\n    403: unknown;\n    /**\n     * Something went wrong.\n     */\n    500: unknown;\n};\n\nexport type PlantNonstsBatchPostError = PlantNonstsBatchPostErrors[keyof PlantNonstsBatchPostErrors];\n\nexport type PlantNonstsBatchPostResponses = {\n    /**\n     * Success\n     */\n    200: unknown;\n};\n\nexport type PreorderSubmitPostData = {\n    /**\n     * Pre-order details including customer, cart items, and fulfillment information - CreatePreOrderRequest object\n     */\n    body?: CreatePreOrderRequest;\n    path?: never;\n    query?: never;\n    url: '/preorder/submit';\n};\n\nexport type PreorderSubmitPostErrors = {\n    /**\n     * Bad Request - `BadRequestResponse` object with `message` string field (check `propertyErrors`: null for simple message, array for field-specific errors)\n     */\n    400: BadRequestResponse;\n    /**\n     * Internal Server Error - Server error occurred\n     */\n    500: unknown;\n};\n\nexport type PreorderSubmitPostError = PreorderSubmitPostErrors[keyof PreorderSubmitPostErrors];\n\nexport type PreorderSubmitPostResponses = {\n    /**\n     * Success - Returns orderId and transactionId for the created pre-order\n     */\n    200: number;\n};\n\nexport type PreorderSubmitPostResponse = PreorderSubmitPostResponses[keyof PreorderSubmitPostResponses];\n\nexport type PreorderUpdatePostData = {\n    /**\n     * Update details including OrderId and fields to be modified\n     */\n    body?: UpdatePreOrderRequest;\n    path?: never;\n    query?: never;\n    url: '/preorder/update';\n};\n\nexport type PreorderUpdatePostErrors = {\n    /**\n     * Bad Request - Empty response body (handle via HTTP status code only)\n     */\n    400: unknown;\n    /**\n     * Not Found - Order ID does not exist\n     */\n    404: unknown;\n    /**\n     * Internal Server Error - Server error occurred\n     */\n    500: unknown;\n};\n\nexport type PreorderUpdatePostResponses = {\n    /**\n     * Success - Order updated successfully\n     */\n    200: unknown;\n};\n\nexport type PreorderCancelPostData = {\n    /**\n     * Cancellation request containing the OrderId to cancel\n     */\n    body?: CancelPreorderRequest;\n    path?: never;\n    query?: never;\n    url: '/preorder/cancel';\n};\n\nexport type PreorderCancelPostErrors = {\n    /**\n     * Bad Request - Empty response body (handle via HTTP status code only)\n     */\n    400: unknown;\n    /**\n     * Not Found - Order ID does not exist\n     */\n    404: unknown;\n    /**\n     * Internal Server Error - Server error occurred\n     */\n    500: string;\n};\n\nexport type PreorderCancelPostError = PreorderCancelPostErrors[keyof PreorderCancelPostErrors];\n\nexport type PreorderCancelPostResponses = {\n    /**\n     * Success - Order cancelled successfully\n     */\n    200: number;\n};\n\nexport type PreorderCancelPostResponse = PreorderCancelPostResponses[keyof PreorderCancelPostResponses];\n\nexport type PreorderStatusGetData = {\n    body?: never;\n    path?: never;\n    query?: {\n        /**\n         * Specific order ID to retrieve status for (optional - omit for all open orders)\n         */\n        PreOrderId?: number;\n        /**\n         * Include detailed product line item information (requires PreOrderId)\n         */\n        includeLineItems?: boolean;\n    };\n    url: '/preorder/Status';\n};\n\nexport type PreorderStatusGetErrors = {\n    /**\n     * Bad Request - Empty response body (handle via HTTP status code only)\n     */\n    400: unknown;\n    /**\n     * Internal Server Error - Server error occurred\n     */\n    500: unknown;\n};\n\nexport type PreorderStatusGetResponses = {\n    /**\n     * Success - Returns PreOrderStatus object(s) with current order information\n     */\n    200: PreOrderStatus;\n};\n\nexport type PreorderStatusGetResponse = PreorderStatusGetResponses[keyof PreorderStatusGetResponses];\n\nexport type PreorderPriceCartPostData = {\n    /**\n     * Pricing request containing customer information, cart items, and delivery preferences\n     */\n    body?: PriceCartRequest;\n    path?: never;\n    query?: never;\n    url: '/preorder/price-cart';\n};\n\nexport type PreorderPriceCartPostErrors = {\n    /**\n     * Bad Request - String error message (parse response body as plain text)\n     */\n    400: string;\n    /**\n     * Internal Server Error - Server error occurred during pricing calculation\n     */\n    500: unknown;\n};\n\nexport type PreorderPriceCartPostError = PreorderPriceCartPostErrors[keyof PreorderPriceCartPostErrors];\n\nexport type PreorderPriceCartPostResponses = {\n    /**\n     * Success - Returns detailed pricing breakdown for the cart\n     */\n    200: CartPrice;\n};\n\nexport type PreorderPriceCartPostResponse = PreorderPriceCartPostResponses[keyof PreorderPriceCartPostResponses];\n\nexport type PricingTiersGetData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/pricing-tiers';\n};\n\nexport type PricingTiersGetErrors = {\n    /**\n     * Unauthorized - Invalid or missing API key\n     */\n    401: unknown;\n    /**\n     * Forbidden - Account not authorized\n     */\n    403: unknown;\n    /**\n     * Internal Server Error - Server error occurred\n     */\n    500: unknown;\n};\n\nexport type PricingTiersGetResponses = {\n    /**\n     * Success - Returns array of pricing tier objects: `[{ PricingTier }, ...]`\n     */\n    200: Array<PricingTier>;\n};\n\nexport type PricingTiersGetResponse = PricingTiersGetResponses[keyof PricingTiersGetResponses];\n\nexport type ProducersGetData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/producers';\n};\n\nexport type ProducersGetErrors = {\n    /**\n     * Unauthorized - Invalid or missing API key\n     */\n    401: unknown;\n    /**\n     * Forbidden - Account not authorized\n     */\n    403: unknown;\n    /**\n     * Internal Server Error - Server error occurred\n     */\n    500: unknown;\n};\n\nexport type ProducersGetResponses = {\n    /**\n     * Success - Returns array of producer objects: `[{ Producer }, ...]`\n     */\n    200: Array<Producer>;\n};\n\nexport type ProducersGetResponse = ProducersGetResponses[keyof ProducersGetResponses];\n\nexport type ProductsLocationOverridesGetData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/products/location-overrides';\n};\n\nexport type ProductsLocationOverridesGetErrors = {\n    /**\n     * Invalid API Key\n     */\n    401: unknown;\n    /**\n     * Account not authorized\n     */\n    403: unknown;\n    /**\n     * Something went wrong.\n     */\n    500: unknown;\n};\n\nexport type ProductsLocationOverridesGetResponses = {\n    /**\n     * Success\n     */\n    200: Array<LocationProductOverride>;\n};\n\nexport type ProductsLocationOverridesGetResponse = ProductsLocationOverridesGetResponses[keyof ProductsLocationOverridesGetResponses];\n\nexport type ProductsLocationOverridesPostData = {\n    /**\n     * Array of location product override requests with ProductId and override values - LocationProductOverrideRequest objects\n     */\n    body?: Array<LocationProductOverrideRequest>;\n    path?: never;\n    query?: never;\n    url: '/products/location-overrides';\n};\n\nexport type ProductsLocationOverridesPostErrors = {\n    /**\n     * Bad Request - `BadRequestResponse` object with `message` string field (check `propertyErrors`: null for simple message, array for field-specific errors)\n     */\n    400: unknown;\n    /**\n     * Invalid API Key\n     */\n    401: unknown;\n    /**\n     * Account not authorized\n     */\n    403: unknown;\n    /**\n     * Something went wrong. One or more overrides may have been saved\n     */\n    500: unknown;\n};\n\nexport type ProductsLocationOverridesPostResponses = {\n    /**\n     * Success\n     */\n    200: unknown;\n};\n\nexport type ProductsGetData = {\n    body?: never;\n    path?: never;\n    query?: {\n        /**\n         * Optional date filter to return only products modified after this timestamp - Used for incremental sync\n         */\n        fromLastModifiedDateUTC?: string;\n        /**\n         * Optional status filter - true for active products only, false for inactive only, null for all products\n         */\n        isActive?: boolean;\n    };\n    url: '/products';\n};\n\nexport type ProductsGetErrors = {\n    /**\n     * Unauthorized - Invalid or missing API key\n     */\n    401: unknown;\n    /**\n     * Forbidden - Account not authorized for inventory access\n     */\n    403: unknown;\n    /**\n     * Internal Server Error - Server error occurred\n     */\n    500: unknown;\n};\n\nexport type ProductsGetResponses = {\n    /**\n     * Success - Returns array of product objects: `[{ ProductDetail }, ...]`\n     */\n    200: Array<ProductDetail>;\n};\n\nexport type ProductsGetResponse = ProductsGetResponses[keyof ProductsGetResponses];\n\nexport type ProductsProductPostData = {\n    /**\n     * Product information to create or update - ProductDetailUpload object with product details\n     */\n    body?: ProductDetailUpload;\n    path?: never;\n    query?: never;\n    url: '/products/product';\n};\n\nexport type ProductsProductPostErrors = {\n    /**\n     * Bad Request - `BadRequestResponse` object with `message` string field (check `propertyErrors`: null for simple message, array for field-specific errors)\n     */\n    400: BadRequestResponse;\n    /**\n     * Invalid API Key\n     */\n    401: unknown;\n    /**\n     * Account not authorized\n     */\n    403: unknown;\n    /**\n     * Something went wrong.\n     */\n    500: unknown;\n};\n\nexport type ProductsProductPostError = ProductsProductPostErrors[keyof ProductsProductPostErrors];\n\nexport type ProductsProductPostResponses = {\n    /**\n     * Success\n     */\n    200: ProductDetail;\n};\n\nexport type ProductsProductPostResponse = ProductsProductPostResponses[keyof ProductsProductPostResponses];\n\nexport type ProductsProductsPostData = {\n    /**\n     * Array of product information to create or update - IEnumerable<ProductDetailUpload> objects\n     */\n    body?: Array<ProductDetailUpload>;\n    path?: never;\n    query?: never;\n    url: '/products/products';\n};\n\nexport type ProductsProductsPostErrors = {\n    /**\n     * Bad Request - `BadRequestResponse` object with `message` string field (check `propertyErrors`: null for simple message, array for field-specific errors) OR `ValidationResult` object with `isValid` boolean, `errors` array, and `ruleSetsExecuted` array\n     */\n    400: ValidationResult;\n    /**\n     * Invalid API Key\n     */\n    401: unknown;\n    /**\n     * Account not authorized\n     */\n    403: unknown;\n    /**\n     * Something went wrong.\n     */\n    500: unknown;\n};\n\nexport type ProductsProductsPostError = ProductsProductsPostErrors[keyof ProductsProductsPostErrors];\n\nexport type ProductsProductsPostResponses = {\n    /**\n     * Success - Products processed with individual success/error results\n     */\n    200: Array<{\n        [key: string]: unknown;\n    }>;\n};\n\nexport type ProductsProductsPostResponse = ProductsProductsPostResponses[keyof ProductsProductsPostResponses];\n\nexport type ProductsSetImagePostData = {\n    /**\n     * Image upload request with ProductId and base64 image data - SetImageRequest object\n     */\n    body?: SetImageRequestWritable;\n    path?: never;\n    query?: never;\n    url: '/products/set-image';\n};\n\nexport type ProductsSetImagePostErrors = {\n    /**\n     * Bad Request - `BadRequestResponse` object with `message` string field (check `propertyErrors`: null for simple message, array for field-specific errors)\n     */\n    400: BadRequestResponse;\n    /**\n     * Invalid API Key\n     */\n    401: unknown;\n    /**\n     * Account not authorized\n     */\n    403: unknown;\n    /**\n     * Something went wrong.\n     */\n    500: unknown;\n};\n\nexport type ProductsSetImagePostError = ProductsSetImagePostErrors[keyof ProductsSetImagePostErrors];\n\nexport type ProductsSetImagePostResponses = {\n    /**\n     * Success\n     */\n    200: SetImageResponse;\n};\n\nexport type ProductsSetImagePostResponse = ProductsSetImagePostResponses[keyof ProductsSetImagePostResponses];\n\nexport type ProductsRemoveImagePostData = {\n    /**\n     * Image deletion request with ProductId and ImageId - DeleteImageRequest object\n     */\n    body?: DeleteImageRequest;\n    path?: never;\n    query?: never;\n    url: '/products/remove-image';\n};\n\nexport type ProductsRemoveImagePostErrors = {\n    /**\n     * Bad Request - `BadRequestResponse` object with `message` string field (check `propertyErrors`: null for simple message, array for field-specific errors)\n     */\n    400: BadRequestResponse;\n    /**\n     * Invalid API Key\n     */\n    401: unknown;\n    /**\n     * Account not authorized\n     */\n    403: unknown;\n    /**\n     * Something went wrong.\n     */\n    500: unknown;\n};\n\nexport type ProductsRemoveImagePostError = ProductsRemoveImagePostErrors[keyof ProductsRemoveImagePostErrors];\n\nexport type ProductsRemoveImagePostResponses = {\n    /**\n     * Success\n     */\n    200: SuccessResult;\n};\n\nexport type ProductsRemoveImagePostResponse = ProductsRemoveImagePostResponses[keyof ProductsRemoveImagePostResponses];\n\nexport type ProductsStrainsGetData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/products/strains';\n};\n\nexport type ProductsStrainsGetErrors = {\n    /**\n     * Invalid API Key\n     */\n    401: unknown;\n    /**\n     * Account not authorized\n     */\n    403: unknown;\n    /**\n     * Something went wrong.\n     */\n    500: unknown;\n};\n\nexport type ProductsStrainsGetResponses = {\n    /**\n     * Success\n     */\n    200: Array<StrainDetail>;\n};\n\nexport type ProductsStrainsGetResponse = ProductsStrainsGetResponses[keyof ProductsStrainsGetResponses];\n\nexport type ProductsExternalCategoriesGetData = {\n    body?: never;\n    path?: never;\n    query?: {\n        /**\n         * User ID for traceability system access context (highly recommended) - Optional but prevents system failures\n         */\n        userId?: number;\n    };\n    url: '/products/external-categories';\n};\n\nexport type ProductsExternalCategoriesGetErrors = {\n    /**\n     * Bad Request - String error message (parse response body as plain text)\n     */\n    400: BadRequestResponse;\n    /**\n     * Invalid API Key\n     */\n    401: unknown;\n    /**\n     * Account not authorized\n     */\n    403: unknown;\n    /**\n     * Something went wrong.\n     */\n    500: unknown;\n};\n\nexport type ProductsExternalCategoriesGetError = ProductsExternalCategoriesGetErrors[keyof ProductsExternalCategoriesGetErrors];\n\nexport type ProductsExternalCategoriesGetResponses = {\n    /**\n     * Success\n     */\n    200: Array<string>;\n};\n\nexport type ProductsExternalCategoriesGetResponse = ProductsExternalCategoriesGetResponses[keyof ProductsExternalCategoriesGetResponses];\n\nexport type ProductCategoryGetData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/product-category';\n};\n\nexport type ProductCategoryGetErrors = {\n    /**\n     * Unauthorized - Invalid or missing API key\n     */\n    401: unknown;\n    /**\n     * Forbidden - Account not authorized\n     */\n    403: unknown;\n    /**\n     * Internal Server Error - Server error occurred\n     */\n    500: unknown;\n};\n\nexport type ProductCategoryGetResponses = {\n    /**\n     * Success - Returns array of product category objects: `[{ ProductCategory }, ...]`\n     */\n    200: Array<ProductCategory>;\n};\n\nexport type ProductCategoryGetResponse = ProductCategoryGetResponses[keyof ProductCategoryGetResponses];\n\nexport type PurchaseOrderGetData = {\n    body?: never;\n    path?: never;\n    query?: {\n        /**\n         * Start date filter for purchase orders created after this date (optional).\n         */\n        FromDateCreated?: string;\n        /**\n         * End date filter for purchase orders created before this date (optional).\n         */\n        ToDateCreated?: string;\n        /**\n         * Specific purchase order identifier for single order retrieval (optional).\n         */\n        PurchaseOrderId?: number;\n        /**\n         * Whether to include detailed line item information in the response (default: false).\n         */\n        IncludeItemDetails?: boolean;\n        /**\n         * Page number for pagination control (default: 0).\n         */\n        PageNumber?: number;\n        /**\n         * Number of results per page for pagination (default: 1000).\n         */\n        PageSize?: number;\n    };\n    url: '/purchase-order';\n};\n\nexport type PurchaseOrderGetErrors = {\n    /**\n     * Bad Request - `ValidationResult` object with `isValid` boolean, `errors` array, and `ruleSetsExecuted` array\n     */\n    400: BadRequestResponse;\n    /**\n     * Invalid API Key\n     */\n    401: unknown;\n    /**\n     * Account not authorized\n     */\n    403: unknown;\n    /**\n     * Something went wrong.\n     */\n    500: unknown;\n};\n\nexport type PurchaseOrderGetError = PurchaseOrderGetErrors[keyof PurchaseOrderGetErrors];\n\nexport type PurchaseOrderGetResponses = {\n    /**\n     * Success\n     */\n    200: Array<PurchaseOrderData>;\n};\n\nexport type PurchaseOrderGetResponse = PurchaseOrderGetResponses[keyof PurchaseOrderGetResponses];\n\nexport type PurchaseOrderPostData = {\n    /**\n     * Purchase order creation/update request with order details - CreateUpdatePurchaseOrdersRequest object\n     */\n    body?: CreateUpdatePurchaseOrdersRequest;\n    path?: never;\n    query?: never;\n    url: '/purchase-order';\n};\n\nexport type PurchaseOrderPostErrors = {\n    /**\n     * Bad Request - `ValidationResult` object with `isValid` boolean, `errors` array, and `ruleSetsExecuted` array\n     */\n    400: BadRequestResponse;\n    /**\n     * Invalid API Key\n     */\n    401: unknown;\n    /**\n     * Account not authorized\n     */\n    403: unknown;\n    /**\n     * Something went wrong.\n     */\n    500: unknown;\n};\n\nexport type PurchaseOrderPostError = PurchaseOrderPostErrors[keyof PurchaseOrderPostErrors];\n\nexport type PurchaseOrderPostResponses = {\n    /**\n     * Success\n     */\n    200: CreateUpdatePurchaseOrderResponse;\n};\n\nexport type PurchaseOrderPostResponse = PurchaseOrderPostResponses[keyof PurchaseOrderPostResponses];\n\nexport type ReferenceUnitsGetData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/reference/units';\n};\n\nexport type ReferenceUnitsGetErrors = {\n    /**\n     * Unauthorized - Invalid or missing API key\n     */\n    401: unknown;\n    /**\n     * Forbidden - Account not authorized\n     */\n    403: unknown;\n    /**\n     * Internal Server Error - Server error occurred\n     */\n    500: unknown;\n};\n\nexport type ReferenceUnitsGetResponses = {\n    /**\n     * Success - Returns array of unit objects: `[{ Unit }, ...]`\n     */\n    200: Array<Unit>;\n};\n\nexport type ReferenceUnitsGetResponse = ReferenceUnitsGetResponses[keyof ReferenceUnitsGetResponses];\n\nexport type ReferenceUnitTypesGetData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/reference/unit-types';\n};\n\nexport type ReferenceUnitTypesGetErrors = {\n    /**\n     * Unauthorized - Invalid or missing API key\n     */\n    401: unknown;\n    /**\n     * Forbidden - Account not authorized\n     */\n    403: unknown;\n    /**\n     * Internal Server Error - Server error occurred\n     */\n    500: unknown;\n};\n\nexport type ReferenceUnitTypesGetResponses = {\n    /**\n     * Success - Returns array of unit type objects: `[{ UnitType }, ...]`\n     */\n    200: Array<UnitType>;\n};\n\nexport type ReferenceUnitTypesGetResponse = ReferenceUnitTypesGetResponses[keyof ReferenceUnitTypesGetResponses];\n\nexport type ReferenceLabResultUnitsGetData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/reference/lab-result-units';\n};\n\nexport type ReferenceLabResultUnitsGetErrors = {\n    /**\n     * Unauthorized - Invalid or missing API key\n     */\n    401: unknown;\n    /**\n     * Forbidden - Account not authorized\n     */\n    403: unknown;\n    /**\n     * Internal Server Error - Server error occurred\n     */\n    500: unknown;\n};\n\nexport type ReferenceLabResultUnitsGetResponses = {\n    /**\n     * Success - Returns array of lab result unit objects: `[{ LabResultUnitData }, ...]`\n     */\n    200: Array<LabResultUnitData>;\n};\n\nexport type ReferenceLabResultUnitsGetResponse = ReferenceLabResultUnitsGetResponses[keyof ReferenceLabResultUnitsGetResponses];\n\nexport type ReferenceLabResultsNamesGetData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/reference/lab-results-names';\n};\n\nexport type ReferenceLabResultsNamesGetErrors = {\n    /**\n     * Unauthorized - Invalid or missing API key\n     */\n    401: unknown;\n    /**\n     * Forbidden - Account not authorized\n     */\n    403: unknown;\n    /**\n     * Internal Server Error - Server error occurred\n     */\n    500: unknown;\n};\n\nexport type ReferenceLabResultsNamesGetResponses = {\n    /**\n     * Success - Returns array of strings with lab result names: `[\"string\", ...]`\n     */\n    200: Array<string>;\n};\n\nexport type ReferenceLabResultsNamesGetResponse = ReferenceLabResultsNamesGetResponses[keyof ReferenceLabResultsNamesGetResponses];\n\nexport type RegulatoryCategoryGetData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/regulatory-category';\n};\n\nexport type RegulatoryCategoryGetErrors = {\n    /**\n     * Unauthorized - Invalid or missing API key\n     */\n    401: unknown;\n    /**\n     * Forbidden - Account not authorized\n     */\n    403: unknown;\n    /**\n     * Internal Server Error - Server error occurred\n     */\n    500: unknown;\n};\n\nexport type RegulatoryCategoryGetResponses = {\n    /**\n     * Success - Returns array of regulatory category objects: `[{ RegulatoryCategory }, ...]`\n     */\n    200: Array<RegulatoryCategory>;\n};\n\nexport type RegulatoryCategoryGetResponse = RegulatoryCategoryGetResponses[keyof RegulatoryCategoryGetResponses];\n\nexport type ReportingInventoryGetData = {\n    body?: never;\n    path?: never;\n    query?: {\n        includeLabResults?: boolean;\n        includeRoomQuantities?: boolean;\n        includeAllocated?: boolean;\n        includeLineage?: boolean;\n    };\n    url: '/reporting/inventory';\n};\n\nexport type ReportingInventoryGetErrors = {\n    /**\n     * Unauthorized\n     */\n    401: unknown;\n    /**\n     * Forbidden\n     */\n    403: unknown;\n    /**\n     * Internal Server Error\n     */\n    500: unknown;\n};\n\nexport type ReportingInventoryGetResponses = {\n    /**\n     * OK\n     */\n    200: Array<ReportingInventoryItem>;\n};\n\nexport type ReportingInventoryGetResponse = ReportingInventoryGetResponses[keyof ReportingInventoryGetResponses];\n\nexport type ReportingTransactionsGetData = {\n    body?: never;\n    path?: never;\n    query?: {\n        /**\n         * Specific transaction identifier for single transaction lookup.\n         */\n        TransactionId?: number;\n        /**\n         * Start date for filtering transactions by last modified date (UTC) for incremental sync.\n         */\n        FromLastModifiedDateUTC?: string;\n        /**\n         * End date for filtering transactions by last modified date (UTC) for incremental sync.\n         */\n        ToLastModifiedDateUTC?: string;\n        /**\n         * Start date for filtering transactions by transaction date (UTC) for periodic reports.\n         */\n        FromDateUTC?: string;\n        /**\n         * End date for filtering transactions by transaction date (UTC) for periodic reports.\n         */\n        ToDateUTC?: string;\n        /**\n         * Flag to include detailed transaction item information for comprehensive reporting.\n         */\n        IncludeDetail?: boolean;\n        /**\n         * Flag to include tax information for financial compliance reporting.\n         */\n        IncludeTaxes?: boolean;\n        /**\n         * Flag to include order identifiers for order fulfillment tracking.\n         */\n        IncludeOrderIds?: boolean;\n        /**\n         * Flag to include fees and donations for complete financial analysis.\n         */\n        IncludeFeesAndDonations?: boolean;\n    };\n    url: '/reporting/transactions';\n};\n\nexport type ReportingTransactionsGetErrors = {\n    /**\n     * Bad Request - `ValidationResult` object with `isValid` boolean, `errors` array, and `ruleSetsExecuted` array\n     */\n    400: ValidationResult;\n    /**\n     * Invalid API Key\n     */\n    401: unknown;\n    /**\n     * Account not authorized\n     */\n    403: unknown;\n    /**\n     * Something went wrong.\n     */\n    500: unknown;\n    /**\n     * Temporarily disabled (kill switch).\n     */\n    503: unknown;\n};\n\nexport type ReportingTransactionsGetError = ReportingTransactionsGetErrors[keyof ReportingTransactionsGetErrors];\n\nexport type ReportingTransactionsGetResponses = {\n    /**\n     * Success\n     */\n    200: Array<Transaction>;\n};\n\nexport type ReportingTransactionsGetResponse = ReportingTransactionsGetResponses[keyof ReportingTransactionsGetResponses];\n\nexport type ReportingCustomersGetData = {\n    body?: never;\n    path?: never;\n    query?: {\n        /**\n         * Filter customers modified after this UTC date - Used for incremental sync\n         */\n        fromLastModifiedDateUTC?: string;\n        /**\n         * Filter customers modified before this UTC date - Used for date range filtering\n         */\n        toLastModifiedDateUTC?: string;\n        /**\n         * Include anonymous customers in results - Default: true\n         */\n        includeAnonymous?: boolean;\n    };\n    url: '/reporting/customers';\n};\n\nexport type ReportingCustomersGetErrors = {\n    /**\n     * Unauthorized - Invalid or missing API key\n     */\n    401: unknown;\n    /**\n     * Forbidden - Account not authorized for reporting access\n     */\n    403: unknown;\n    /**\n     * Internal Server Error - Server error occurred\n     */\n    500: unknown;\n};\n\nexport type ReportingCustomersGetResponses = {\n    /**\n     * Success - Returns array of customer objects\n     */\n    200: Array<Customer>;\n};\n\nexport type ReportingCustomersGetResponse = ReportingCustomersGetResponses[keyof ReportingCustomersGetResponses];\n\nexport type ReportingCustomersPaginatedGetData = {\n    body?: never;\n    path?: never;\n    query?: {\n        /**\n         * Filter customers modified after this UTC date for incremental sync - Optional\n         */\n        fromLastModifiedDateUTC?: string;\n        /**\n         * Filter customers modified before this UTC date for date range filtering - Optional\n         */\n        toLastModifiedDateUTC?: string;\n        /**\n         * Page number for sequential pagination (integer, starts at 0) - Default: 0\n         */\n        PageNumber?: number;\n        /**\n         * Number of items per page (integer) - Default: 1000, Maximum: 10000\n         */\n        PageSize?: number;\n        /**\n         * Include anonymous customers in results - Default: true\n         */\n        includeAnonymous?: boolean;\n    };\n    url: '/reporting/customers-paginated';\n};\n\nexport type ReportingCustomersPaginatedGetErrors = {\n    /**\n     * Bad Request - `BadRequestResponse` object with `message` string field (check `propertyErrors`: null for simple message, array for field-specific errors)\n     */\n    400: BadRequestResponse;\n    /**\n     * Unauthorized - Invalid or missing API key\n     */\n    401: unknown;\n    /**\n     * Forbidden - Account not authorized for reporting access\n     */\n    403: unknown;\n    /**\n     * Internal Server Error - Server error occurred\n     */\n    500: unknown;\n};\n\nexport type ReportingCustomersPaginatedGetError = ReportingCustomersPaginatedGetErrors[keyof ReportingCustomersPaginatedGetErrors];\n\nexport type ReportingCustomersPaginatedGetResponses = {\n    /**\n     * Success - Returns array of customer objects for the requested page\n     */\n    200: Array<Customer>;\n};\n\nexport type ReportingCustomersPaginatedGetResponse = ReportingCustomersPaginatedGetResponses[keyof ReportingCustomersPaginatedGetResponses];\n\nexport type ReportingRegisterAdjustmentsGetData = {\n    body?: never;\n    path?: never;\n    query?: {\n        /**\n         * Filter adjustments modified after this date for incremental sync - Optional\n         */\n        fromLastModifiedDateUTC?: string;\n        /**\n         * Filter adjustments modified before this date for date range filtering - Optional\n         */\n        toLastModifiedDateUTC?: string;\n    };\n    url: '/reporting/register-adjustments';\n};\n\nexport type ReportingRegisterAdjustmentsGetErrors = {\n    /**\n     * Unauthorized - Invalid or missing API key\n     */\n    401: unknown;\n    /**\n     * Forbidden - Account not authorized for reporting access\n     */\n    403: unknown;\n    /**\n     * Internal Server Error - Server error occurred\n     */\n    500: unknown;\n};\n\nexport type ReportingRegisterAdjustmentsGetResponses = {\n    /**\n     * Success - Returns array of register adjustment objects\n     */\n    200: Array<RegisterAdjustment>;\n};\n\nexport type ReportingRegisterAdjustmentsGetResponse = ReportingRegisterAdjustmentsGetResponses[keyof ReportingRegisterAdjustmentsGetResponses];\n\nexport type ReportingRegisterTransactionsGetData = {\n    body?: never;\n    path?: never;\n    query?: {\n        /**\n         * Filter transactions modified after this date for incremental sync - Optional\n         */\n        fromLastModifiedDateUTC?: string;\n        /**\n         * Filter transactions modified before this date for date range filtering - Optional\n         */\n        toLastModifiedDateUTC?: string;\n    };\n    url: '/reporting/register-transactions';\n};\n\nexport type ReportingRegisterTransactionsGetErrors = {\n    /**\n     * Unauthorized - Invalid or missing API key\n     */\n    401: unknown;\n    /**\n     * Forbidden - Account not authorized for reporting access\n     */\n    403: unknown;\n    /**\n     * Internal Server Error - Server error occurred\n     */\n    500: unknown;\n};\n\nexport type ReportingRegisterTransactionsGetResponses = {\n    /**\n     * Success - Returns array of RegisterTransaction objects with comprehensive transaction data\n     */\n    200: Array<RegisterTransaction>;\n};\n\nexport type ReportingRegisterTransactionsGetResponse = ReportingRegisterTransactionsGetResponses[keyof ReportingRegisterTransactionsGetResponses];\n\nexport type ReportingCashSummaryGetData = {\n    body?: never;\n    path?: never;\n    query?: {\n        /**\n         * Filter activity after this date (must be within last 7 days) - Optional\n         */\n        fromLastModifiedDateUTC?: string;\n        /**\n         * Filter activity before this date for date range filtering - Optional\n         */\n        toLastModifiedDateUTC?: string;\n    };\n    url: '/reporting/cash-summary';\n};\n\nexport type ReportingCashSummaryGetErrors = {\n    /**\n     * Bad Request - String error message (parse response body as plain text)\n     */\n    400: string;\n    /**\n     * Unauthorized - Invalid or missing API key\n     */\n    401: unknown;\n    /**\n     * Forbidden - Account not authorized for reporting access\n     */\n    403: unknown;\n    /**\n     * Internal Server Error - Server error occurred\n     */\n    500: unknown;\n};\n\nexport type ReportingCashSummaryGetError = ReportingCashSummaryGetErrors[keyof ReportingCashSummaryGetErrors];\n\nexport type ReportingCashSummaryGetResponses = {\n    /**\n     * Success - Returns array of register cash summary objects\n     */\n    200: Array<RegisterCashSummary>;\n};\n\nexport type ReportingCashSummaryGetResponse = ReportingCashSummaryGetResponses[keyof ReportingCashSummaryGetResponses];\n\nexport type ReportingLoyaltySnapshotGetData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/reporting/loyalty-snapshot';\n};\n\nexport type ReportingLoyaltySnapshotGetErrors = {\n    /**\n     * Unauthorized - Invalid or missing API key\n     */\n    401: unknown;\n    /**\n     * Forbidden - Account not authorized for reporting access\n     */\n    403: unknown;\n    /**\n     * Internal Server Error - Server error occurred\n     */\n    500: unknown;\n};\n\nexport type ReportingLoyaltySnapshotGetResponses = {\n    /**\n     * Success - Returns array of loyalty balance snapshot objects\n     */\n    200: Array<LoyaltySnapshot>;\n};\n\nexport type ReportingLoyaltySnapshotGetResponse = ReportingLoyaltySnapshotGetResponses[keyof ReportingLoyaltySnapshotGetResponses];\n\nexport type ReportingProductsGetData = {\n    body?: never;\n    path?: never;\n    query?: {\n        /**\n         * Filter products modified after this date for incremental sync - Optional\n         */\n        fromLastModifiedDateUTC?: string;\n    };\n    url: '/reporting/products';\n};\n\nexport type ReportingProductsGetErrors = {\n    /**\n     * Invalid API Key\n     */\n    401: unknown;\n    /**\n     * Account not authorized\n     */\n    403: unknown;\n    /**\n     * Something went wrong.\n     */\n    500: unknown;\n};\n\nexport type ReportingProductsGetResponses = {\n    /**\n     * Success\n     */\n    200: Array<ProductDetail>;\n};\n\nexport type ReportingProductsGetResponse = ReportingProductsGetResponses[keyof ReportingProductsGetResponses];\n\nexport type ReportingClosingReportGetData = {\n    body?: never;\n    path?: never;\n    query?: {\n        /**\n         * Start date for the report period (required) - Must be UTC datetime\n         */\n        fromDateUTC?: string;\n        /**\n         * End date for the report period (required) - Must be UTC datetime\n         */\n        toDateUTC?: string;\n    };\n    url: '/reporting/closing-report';\n};\n\nexport type ReportingClosingReportGetErrors = {\n    /**\n     * Bad Request - String error message (parse response body as plain text)\n     */\n    400: string;\n    /**\n     * Unauthorized - Invalid or missing API key\n     */\n    401: unknown;\n    /**\n     * Forbidden - Account not authorized for reporting access\n     */\n    403: unknown;\n    /**\n     * Internal Server Error - Server error occurred\n     */\n    500: unknown;\n};\n\nexport type ReportingClosingReportGetError = ReportingClosingReportGetErrors[keyof ReportingClosingReportGetErrors];\n\nexport type ReportingClosingReportGetResponses = {\n    /**\n     * Success - Returns comprehensive closing report object\n     */\n    200: ClosingReportV2;\n};\n\nexport type ReportingClosingReportGetResponse = ReportingClosingReportGetResponses[keyof ReportingClosingReportGetResponses];\n\nexport type ReportingDiscountsGetData = {\n    body?: never;\n    path?: never;\n    query?: {\n        /**\n         * Include deleted/archived discounts in results - Default: false\n         */\n        includeDeleted?: boolean;\n    };\n    url: '/reporting/discounts';\n};\n\nexport type ReportingDiscountsGetErrors = {\n    /**\n     * Unauthorized - Invalid or missing API key\n     */\n    401: unknown;\n    /**\n     * Forbidden - Account not authorized for reporting access\n     */\n    403: unknown;\n    /**\n     * Internal Server Error - Server error occurred\n     */\n    500: unknown;\n};\n\nexport type ReportingDiscountsGetResponses = {\n    /**\n     * Success - Returns array of comprehensive discount configuration objects\n     */\n    200: Array<ReportingDiscountDetail>;\n};\n\nexport type ReportingDiscountsGetResponse = ReportingDiscountsGetResponses[keyof ReportingDiscountsGetResponses];\n\nexport type RoomRoomsGetData = {\n    body?: never;\n    path?: never;\n    query?: {\n        /**\n         * Optional room ID for specific room lookup - integer\n         */\n        roomId?: number;\n        /**\n         * Optional room name for searching rooms by name - string\n         */\n        roomName?: string;\n    };\n    url: '/room/rooms';\n};\n\nexport type RoomRoomsGetErrors = {\n    /**\n     * Unauthorized - Invalid or missing API key\n     */\n    401: unknown;\n    /**\n     * Forbidden - Account not authorized for room access\n     */\n    403: unknown;\n    /**\n     * Internal Server Error - Server error occurred\n     */\n    500: unknown;\n};\n\nexport type RoomRoomsGetResponses = {\n    /**\n     * Success - Returns array of room objects: `[{ Room }, ...]`\n     */\n    200: Array<Room>;\n};\n\nexport type RoomRoomsGetResponse = RoomRoomsGetResponses[keyof RoomRoomsGetResponses];\n\nexport type RoomPostData = {\n    /**\n     * Room information to create or update - Room object with RoomId, RoomName, and room type flags\n     */\n    body?: Room;\n    path?: never;\n    query?: never;\n    url: '/room';\n};\n\nexport type RoomPostErrors = {\n    /**\n     * Unauthorized - Invalid or missing API key\n     */\n    401: unknown;\n    /**\n     * Forbidden - Account not authorized for room modification\n     */\n    403: unknown;\n    /**\n     * Internal Server Error - Server error occurred\n     */\n    500: unknown;\n};\n\nexport type RoomPostResponses = {\n    /**\n     * Success - Returns single room object: `{ Room }`\n     */\n    200: Room;\n};\n\nexport type RoomPostResponse = RoomPostResponses[keyof RoomPostResponses];\n\nexport type SizesGetData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/sizes';\n};\n\nexport type SizesGetErrors = {\n    /**\n     * Unauthorized - Invalid or missing API key\n     */\n    401: unknown;\n    /**\n     * Forbidden - Account not authorized\n     */\n    403: unknown;\n    /**\n     * Internal Server Error - Server error occurred\n     */\n    500: unknown;\n};\n\nexport type SizesGetResponses = {\n    /**\n     * Success - Returns array of size objects: `[{ Size }, ...]`\n     */\n    200: Array<Size>;\n};\n\nexport type SizesGetResponse = SizesGetResponses[keyof SizesGetResponses];\n\nexport type StrainsGetData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/strains';\n};\n\nexport type StrainsGetErrors = {\n    /**\n     * Unauthorized - Invalid or missing API key\n     */\n    401: unknown;\n    /**\n     * Forbidden - Account not authorized for inventory access\n     */\n    403: unknown;\n    /**\n     * Internal Server Error - Server error occurred\n     */\n    500: unknown;\n};\n\nexport type StrainsGetResponses = {\n    /**\n     * Success - Returns array of strain objects: `[{ StrainDetail }, ...]`\n     */\n    200: Array<StrainDetail>;\n};\n\nexport type StrainsGetResponse = StrainsGetResponses[keyof StrainsGetResponses];\n\nexport type StrainsPostData = {\n    body?: UpdateStrain;\n    path?: never;\n    query?: never;\n    url: '/strains';\n};\n\nexport type StrainsPostErrors = {\n    /**\n     * Bad Request\n     */\n    400: string;\n    /**\n     * Unauthorized\n     */\n    401: unknown;\n    /**\n     * Forbidden\n     */\n    403: unknown;\n    /**\n     * Internal Server Error\n     */\n    500: unknown;\n};\n\nexport type StrainsPostError = StrainsPostErrors[keyof StrainsPostErrors];\n\nexport type StrainsPostResponses = {\n    /**\n     * OK\n     */\n    200: StrainDetail;\n};\n\nexport type StrainsPostResponse = StrainsPostResponses[keyof StrainsPostResponses];\n\nexport type StrainsTypesGetData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/strains/types';\n};\n\nexport type StrainsTypesGetErrors = {\n    /**\n     * Unauthorized - Invalid or missing API key\n     */\n    401: unknown;\n    /**\n     * Forbidden - Account not authorized for inventory access\n     */\n    403: unknown;\n    /**\n     * Internal Server Error - Server error occurred\n     */\n    500: unknown;\n};\n\nexport type StrainsTypesGetResponses = {\n    /**\n     * Success - Returns array of strings with strain type names: `[\"Indica\", \"Sativa\", \"Hybrid\", \"CBD\"]`\n     */\n    200: Array<string>;\n};\n\nexport type StrainsTypesGetResponse = StrainsTypesGetResponses[keyof StrainsTypesGetResponses];\n\nexport type TableTablesGetData = {\n    body?: never;\n    path?: never;\n    query?: {\n        /**\n         * Optional table ID for specific table lookup - integer\n         */\n        tableId?: number;\n        /**\n         * Optional table name for searching tables by name - string\n         */\n        tableName?: string;\n    };\n    url: '/table/tables';\n};\n\nexport type TableTablesGetErrors = {\n    /**\n     * Unauthorized - Invalid or missing API key\n     */\n    401: unknown;\n    /**\n     * Forbidden - Account not authorized for table access\n     */\n    403: unknown;\n    /**\n     * Internal Server Error - Server error occurred\n     */\n    500: unknown;\n};\n\nexport type TableTablesGetResponses = {\n    /**\n     * Success - Returns array of table objects: `[{ Table }, ...]`\n     */\n    200: Array<Table>;\n};\n\nexport type TableTablesGetResponse = TableTablesGetResponses[keyof TableTablesGetResponses];\n\nexport type TablePostData = {\n    /**\n     * Table information to create or update - Table object with TableId and TableName fields\n     */\n    body?: Table;\n    path?: never;\n    query?: never;\n    url: '/table';\n};\n\nexport type TablePostErrors = {\n    /**\n     * Unauthorized - Invalid or missing API key\n     */\n    401: unknown;\n    /**\n     * Forbidden - Account not authorized for table modification\n     */\n    403: unknown;\n    /**\n     * Internal Server Error - Server error occurred\n     */\n    500: unknown;\n};\n\nexport type TablePostResponses = {\n    /**\n     * Success - Returns single table object: `{ Table }`\n     */\n    200: Table;\n};\n\nexport type TablePostResponse = TablePostResponses[keyof TablePostResponses];\n\nexport type TagGetData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/tag';\n};\n\nexport type TagGetErrors = {\n    /**\n     * Unauthorized - Invalid or missing API key\n     */\n    401: unknown;\n    /**\n     * Forbidden - Account not authorized for inventory access\n     */\n    403: unknown;\n    /**\n     * Internal Server Error - Server error occurred\n     */\n    500: unknown;\n};\n\nexport type TagGetResponses = {\n    /**\n     * Success - Returns array of tag objects: `[{ Tag }, ...]`\n     */\n    200: Array<Tag>;\n};\n\nexport type TagGetResponse = TagGetResponses[keyof TagGetResponses];\n\nexport type TerminalsGetData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/terminals';\n};\n\nexport type TerminalsGetErrors = {\n    /**\n     * Unauthorized - Invalid or missing API key\n     */\n    401: unknown;\n    /**\n     * Forbidden - Account not authorized\n     */\n    403: unknown;\n    /**\n     * Internal Server Error - Server error occurred\n     */\n    500: unknown;\n};\n\nexport type TerminalsGetResponses = {\n    /**\n     * Success - Returns array of terminal objects: `[{ Terminal }, ...]`\n     */\n    200: Array<Terminal>;\n};\n\nexport type TerminalsGetResponse = TerminalsGetResponses[keyof TerminalsGetResponses];\n\nexport type TransactionCreateAnonymousPostData = {\n    /**\n     * Anonymous transaction request with optional transaction reference - CreateAnonymousTransactionRequest object\n     */\n    body?: CreateAnonymousTransactionRequest;\n    path?: never;\n    query?: never;\n    url: '/transaction/create-anonymous';\n};\n\nexport type TransactionCreateAnonymousPostErrors = {\n    /**\n     * Unauthorized - Invalid or missing API key\n     */\n    401: unknown;\n    /**\n     * Forbidden - Account not authorized for transaction creation\n     */\n    403: unknown;\n    /**\n     * Internal Server Error - Server error occurred during transaction creation\n     */\n    500: unknown;\n};\n\nexport type TransactionCreateAnonymousPostResponses = {\n    /**\n     * Success - Returns anonymous transaction object: `{ AnonymousTransaction }`\n     */\n    200: AnonymousTransaction;\n};\n\nexport type TransactionCreateAnonymousPostResponse = TransactionCreateAnonymousPostResponses[keyof TransactionCreateAnonymousPostResponses];\n\nexport type UtilAuthorizationHeaderByApiKeyGetData = {\n    body?: never;\n    path: {\n        /**\n         * API key to convert into authorization header format - string\n         */\n        apiKey: string;\n    };\n    query?: never;\n    url: '/util/AuthorizationHeader/{apiKey}';\n};\n\nexport type UtilAuthorizationHeaderByApiKeyGetResponses = {\n    /**\n     * Success - Returns formatted authorization header string: \"Basic {base64-encoded-key}\"\n     */\n    200: string;\n};\n\nexport type UtilAuthorizationHeaderByApiKeyGetResponse = UtilAuthorizationHeaderByApiKeyGetResponses[keyof UtilAuthorizationHeaderByApiKeyGetResponses];\n\nexport type VehiclesGetData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/vehicles';\n};\n\nexport type VehiclesGetErrors = {\n    /**\n     * Unauthorized - Invalid or missing API key\n     */\n    401: unknown;\n    /**\n     * Forbidden - Account not authorized for vehicle access\n     */\n    403: unknown;\n    /**\n     * Internal Server Error - Server error occurred\n     */\n    500: unknown;\n};\n\nexport type VehiclesGetResponses = {\n    /**\n     * Success - Returns array of vehicle objects: `[{ VehicleDetail }, ...]`\n     */\n    200: Array<VehicleDetail>;\n};\n\nexport type VehiclesGetResponse = VehiclesGetResponses[keyof VehiclesGetResponses];\n\nexport type VehiclesPostData = {\n    /**\n     * Vehicle information to create or update - VehicleDetail object with fleet details\n     */\n    body?: VehicleDetail;\n    path?: never;\n    query?: never;\n    url: '/vehicles';\n};\n\nexport type VehiclesPostErrors = {\n    /**\n     * Bad Request - `ValidationResult` object with `isValid` boolean, `errors` array, and `ruleSetsExecuted` array\n     */\n    400: ValidationResult;\n    /**\n     * Invalid API Key\n     */\n    401: unknown;\n    /**\n     * Account not authorized\n     */\n    403: unknown;\n    /**\n     * Something went wrong.\n     */\n    500: unknown;\n};\n\nexport type VehiclesPostError = VehiclesPostErrors[keyof VehiclesPostErrors];\n\nexport type VehiclesPostResponses = {\n    /**\n     * Success\n     */\n    200: unknown;\n};\n\nexport type VendorVendorsGetData = {\n    body?: never;\n    path?: never;\n    query?: {\n        /**\n         * Optional vendor ID to filter by specific vendor - Returns exact match\n         */\n        vendorId?: number;\n        /**\n         * Optional vendor name to filter by - Supports partial matching for flexible search\n         */\n        vendorName?: string;\n    };\n    url: '/vendor/vendors';\n};\n\nexport type VendorVendorsGetErrors = {\n    /**\n     * Unauthorized - Invalid or missing API key\n     */\n    401: unknown;\n    /**\n     * Forbidden - Account not authorized for vendor access\n     */\n    403: unknown;\n    /**\n     * Internal Server Error - Server error occurred\n     */\n    500: unknown;\n};\n\nexport type VendorVendorsGetResponses = {\n    /**\n     * Success - Returns array of vendor objects: `[{ Vendor }, ...]`\n     */\n    200: Array<Vendor>;\n};\n\nexport type VendorVendorsGetResponse = VendorVendorsGetResponses[keyof VendorVendorsGetResponses];\n\nexport type VendorPostData = {\n    /**\n     * Vendor information to create or update - Vendor object with supplier details\n     */\n    body?: Vendor;\n    path?: never;\n    query?: never;\n    url: '/vendor';\n};\n\nexport type VendorPostErrors = {\n    /**\n     * Unauthorized - Invalid or missing API key\n     */\n    401: unknown;\n    /**\n     * Forbidden - Account not authorized for vendor management\n     */\n    403: unknown;\n    /**\n     * Internal Server Error - Server error occurred during vendor operation\n     */\n    500: unknown;\n};\n\nexport type VendorPostResponses = {\n    /**\n     * Success - Returns vendor object: `{ Vendor }`\n     */\n    200: Vendor;\n};\n\nexport type VendorPostResponse = VendorPostResponses[keyof VendorPostResponses];\n\nexport type WasteGetData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/waste';\n};\n\nexport type WasteGetErrors = {\n    /**\n     * Invalid API Key\n     */\n    401: unknown;\n    /**\n     * Account not authorized\n     */\n    403: unknown;\n    /**\n     * Something went wrong.\n     */\n    500: unknown;\n};\n\nexport type WasteGetResponses = {\n    /**\n     * Success\n     */\n    200: WasteSummary;\n};\n\nexport type WasteGetResponse = WasteGetResponses[keyof WasteGetResponses];\n\nexport type WasteHarvestWastePostData = {\n    body?: HarvestWasteDetailWaste;\n    path?: never;\n    query?: never;\n    url: '/waste/HarvestWaste';\n};\n\nexport type WasteHarvestWastePostErrors = {\n    /**\n     * Bad Request\n     */\n    400: string;\n    /**\n     * Unauthorized\n     */\n    401: unknown;\n    /**\n     * Forbidden\n     */\n    403: unknown;\n    /**\n     * Internal Server Error\n     */\n    500: unknown;\n};\n\nexport type WasteHarvestWastePostError = WasteHarvestWastePostErrors[keyof WasteHarvestWastePostErrors];\n\nexport type WasteHarvestWastePostResponses = {\n    /**\n     * OK\n     */\n    200: {\n        [key: string]: unknown;\n    };\n};\n\nexport type WasteHarvestWastePostResponse = WasteHarvestWastePostResponses[keyof WasteHarvestWastePostResponses];\n\nexport type WastePlantWastePostData = {\n    body?: PlantWasteDetailWaste;\n    path?: never;\n    query?: never;\n    url: '/waste/PlantWaste';\n};\n\nexport type WastePlantWastePostErrors = {\n    /**\n     * Bad Request\n     */\n    400: string;\n    /**\n     * Unauthorized\n     */\n    401: unknown;\n    /**\n     * Forbidden\n     */\n    403: unknown;\n    /**\n     * Internal Server Error\n     */\n    500: unknown;\n};\n\nexport type WastePlantWastePostError = WastePlantWastePostErrors[keyof WastePlantWastePostErrors];\n\nexport type WastePlantWastePostResponses = {\n    /**\n     * OK\n     */\n    200: {\n        [key: string]: unknown;\n    };\n};\n\nexport type WastePlantWastePostResponse = WastePlantWastePostResponses[keyof WastePlantWastePostResponses];\n\nexport type WhoamiGetData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/whoami';\n};\n\nexport type WhoamiGetErrors = {\n    /**\n     * Unauthorized - Invalid or missing API key\n     */\n    401: unknown;\n    /**\n     * Forbidden - API key doesn't have access to this location\n     */\n    403: unknown;\n    /**\n     * Not Found - Location not found for the authenticated API key\n     */\n    404: unknown;\n    /**\n     * Internal Server Error - Server error occurred\n     */\n    500: unknown;\n};\n\nexport type WhoamiGetResponses = {\n    /**\n     * Success - Returns location identity object: `{ LocationIdentity }`\n     */\n    200: LocationIdentity;\n};\n\nexport type WhoamiGetResponse = WhoamiGetResponses[keyof WhoamiGetResponses];\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/transforms-read-write/client/client.gen.ts",
    "content": "// 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 (options: RequestOptions) => {\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 url = buildUrl(opts);\n\n    return { opts, url };\n  };\n\n  const request: Client['request'] = async (options) => {\n    // @ts-expect-error\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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/transforms-read-write/client/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type { Auth } from '../core/auth.gen';\nexport type { QuerySerializerOptions } from '../core/bodySerializer.gen';\nexport {\n  formDataBodySerializer,\n  jsonBodySerializer,\n  urlSearchParamsBodySerializer,\n} from '../core/bodySerializer.gen';\nexport { buildClientParams } from '../core/params.gen';\nexport { serializeQueryKeyValue } from '../core/queryKeySerializer.gen';\nexport { createClient } from './client.gen';\nexport type {\n  Client,\n  ClientOptions,\n  Config,\n  CreateClientConfig,\n  Options,\n  RequestOptions,\n  RequestResult,\n  ResolvedRequestOptions,\n  ResponseStyle,\n  TDataShape,\n} from './types.gen';\nexport { createConfig, mergeHeaders } from './utils.gen';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/transforms-read-write/client/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { Auth } from '../core/auth.gen';\nimport type {\n  ServerSentEventsOptions,\n  ServerSentEventsResult,\n} from '../core/serverSentEvents.gen';\nimport type { Client as CoreClient, Config as CoreConfig } from '../core/types.gen';\nimport type { Middleware } from './utils.gen';\n\nexport type ResponseStyle = 'data' | 'fields';\n\nexport interface Config<T extends ClientOptions = ClientOptions>\n  extends Omit<RequestInit, 'body' | 'headers' | 'method'>, CoreConfig {\n  /**\n   * Base URL for all requests made by this client.\n   */\n  baseUrl?: T['baseUrl'];\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   * Please don't use the Fetch client for Next.js applications. The `next`\n   * options won't have any effect.\n   *\n   * Install {@link https://www.npmjs.com/package/@hey-api/client-next `@hey-api/client-next`} instead.\n   */\n  next?: never;\n  /**\n   * Return the response data parsed in a specified format. By default, `auto`\n   * will infer the appropriate method from the `Content-Type` response header.\n   * You can override this behavior with any of the {@link Body} methods.\n   * Select `stream` if you don't want to parse response data at all.\n   *\n   * @default 'auto'\n   */\n  parseAs?: 'arrayBuffer' | 'auto' | 'blob' | 'formData' | 'json' | 'stream' | 'text';\n  /**\n   * Should we return only data or multiple fields (data, error, response, etc.)?\n   *\n   * @default 'fields'\n   */\n  responseStyle?: ResponseStyle;\n  /**\n   * Throw an error instead of returning it in the response?\n   *\n   * @default false\n   */\n  throwOnError?: T['throwOnError'];\n}\n\nexport interface RequestOptions<\n  TData = unknown,\n  TResponseStyle extends ResponseStyle = 'fields',\n  ThrowOnError extends boolean = boolean,\n  Url extends string = string,\n>\n  extends\n    Config<{\n      responseStyle: TResponseStyle;\n      throwOnError: ThrowOnError;\n    }>,\n    Pick<\n      ServerSentEventsOptions<TData>,\n      | 'onRequest'\n      | 'onSseError'\n      | 'onSseEvent'\n      | 'sseDefaultRetryDelay'\n      | 'sseMaxRetryAttempts'\n      | 'sseMaxRetryDelay'\n    > {\n  /**\n   * Any body that you want to add to your request.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/fetch#body}\n   */\n  body?: unknown;\n  path?: Record<string, unknown>;\n  query?: Record<string, unknown>;\n  /**\n   * Security mechanism(s) to use for the request.\n   */\n  security?: ReadonlyArray<Auth>;\n  url: Url;\n}\n\nexport interface ResolvedRequestOptions<\n  TResponseStyle extends ResponseStyle = 'fields',\n  ThrowOnError extends boolean = boolean,\n  Url extends string = string,\n> extends RequestOptions<unknown, TResponseStyle, ThrowOnError, Url> {\n  serializedBody?: string;\n}\n\nexport type RequestResult<\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = boolean,\n  TResponseStyle extends ResponseStyle = 'fields',\n> = ThrowOnError extends true\n  ? Promise<\n      TResponseStyle extends 'data'\n        ? TData extends Record<string, unknown>\n          ? TData[keyof TData]\n          : TData\n        : {\n            data: TData extends Record<string, unknown> ? TData[keyof TData] : TData;\n            request: Request;\n            response: Response;\n          }\n    >\n  : Promise<\n      TResponseStyle extends 'data'\n        ? (TData extends Record<string, unknown> ? TData[keyof TData] : TData) | undefined\n        : (\n            | {\n                data: TData extends Record<string, unknown> ? TData[keyof TData] : TData;\n                error: undefined;\n              }\n            | {\n                data: undefined;\n                error: TError extends Record<string, unknown> ? TError[keyof TError] : TError;\n              }\n          ) & {\n            request: Request;\n            response: Response;\n          }\n    >;\n\nexport interface ClientOptions {\n  baseUrl?: string;\n  responseStyle?: ResponseStyle;\n  throwOnError?: boolean;\n}\n\ntype MethodFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'>,\n) => RequestResult<TData, TError, ThrowOnError, TResponseStyle>;\n\ntype SseFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'>,\n) => Promise<ServerSentEventsResult<TData, TError>>;\n\ntype RequestFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'> &\n    Pick<Required<RequestOptions<TData, TResponseStyle, ThrowOnError>>, 'method'>,\n) => RequestResult<TData, TError, ThrowOnError, TResponseStyle>;\n\ntype BuildUrlFn = <\n  TData extends {\n    body?: unknown;\n    path?: Record<string, unknown>;\n    query?: Record<string, unknown>;\n    url: string;\n  },\n>(\n  options: TData & Options<TData>,\n) => string;\n\nexport type Client = CoreClient<RequestFn, Config, MethodFn, BuildUrlFn, SseFn> & {\n  interceptors: Middleware<Request, Response, unknown, ResolvedRequestOptions>;\n};\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 = ClientOptions> = (\n  override?: Config<ClientOptions & T>,\n) => Config<Required<ClientOptions> & T>;\n\nexport interface TDataShape {\n  body?: unknown;\n  headers?: unknown;\n  path?: unknown;\n  query?: unknown;\n  url: string;\n}\n\ntype OmitKeys<T, K> = Pick<T, Exclude<keyof T, K>>;\n\nexport type Options<\n  TData extends TDataShape = TDataShape,\n  ThrowOnError extends boolean = boolean,\n  TResponse = unknown,\n  TResponseStyle extends ResponseStyle = 'fields',\n> = OmitKeys<\n  RequestOptions<TResponse, TResponseStyle, ThrowOnError>,\n  'body' | 'path' | 'query' | 'url'\n> &\n  ([TData] extends [never] ? unknown : Omit<TData, 'url'>);\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/transforms-read-write/client/utils.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/transforms-read-write/client.gen.ts",
    "content": "// 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>());\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/transforms-read-write/core/auth.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/transforms-read-write/core/bodySerializer.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/transforms-read-write/core/params.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/transforms-read-write/core/pathSerializer.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/transforms-read-write/core/queryKeySerializer.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\n/**\n * JSON-friendly union that mirrors what Pinia Colada can hash.\n */\nexport type JsonValue =\n  | null\n  | string\n  | number\n  | boolean\n  | JsonValue[]\n  | { [key: string]: JsonValue };\n\n/**\n * Replacer that converts non-JSON values (bigint, Date, etc.) to safe substitutes.\n */\nexport const queryKeyJsonReplacer = (_key: string, value: unknown) => {\n  if (value === undefined || typeof value === 'function' || typeof value === 'symbol') {\n    return undefined;\n  }\n  if (typeof value === 'bigint') {\n    return value.toString();\n  }\n  if (value instanceof Date) {\n    return value.toISOString();\n  }\n  return value;\n};\n\n/**\n * Safely stringifies a value and parses it back into a JsonValue.\n */\nexport const stringifyToJsonValue = (input: unknown): JsonValue | undefined => {\n  try {\n    const json = JSON.stringify(input, queryKeyJsonReplacer);\n    if (json === undefined) {\n      return undefined;\n    }\n    return JSON.parse(json) as JsonValue;\n  } catch {\n    return undefined;\n  }\n};\n\n/**\n * Detects plain objects (including objects with a null prototype).\n */\nconst isPlainObject = (value: unknown): value is Record<string, unknown> => {\n  if (value === null || typeof value !== 'object') {\n    return false;\n  }\n  const prototype = Object.getPrototypeOf(value as object);\n  return prototype === Object.prototype || prototype === null;\n};\n\n/**\n * Turns URLSearchParams into a sorted JSON object for deterministic keys.\n */\nconst serializeSearchParams = (params: URLSearchParams): JsonValue => {\n  const entries = Array.from(params.entries()).sort(([a], [b]) => a.localeCompare(b));\n  const result: Record<string, JsonValue> = {};\n\n  for (const [key, value] of entries) {\n    const existing = result[key];\n    if (existing === undefined) {\n      result[key] = value;\n      continue;\n    }\n\n    if (Array.isArray(existing)) {\n      (existing as string[]).push(value);\n    } else {\n      result[key] = [existing, value];\n    }\n  }\n\n  return result;\n};\n\n/**\n * Normalizes any accepted value into a JSON-friendly shape for query keys.\n */\nexport const serializeQueryKeyValue = (value: unknown): JsonValue | undefined => {\n  if (value === null) {\n    return null;\n  }\n\n  if (typeof value === 'string' || typeof value === 'number' || typeof value === 'boolean') {\n    return value;\n  }\n\n  if (value === undefined || typeof value === 'function' || typeof value === 'symbol') {\n    return undefined;\n  }\n\n  if (typeof value === 'bigint') {\n    return value.toString();\n  }\n\n  if (value instanceof Date) {\n    return value.toISOString();\n  }\n\n  if (Array.isArray(value)) {\n    return stringifyToJsonValue(value);\n  }\n\n  if (typeof URLSearchParams !== 'undefined' && value instanceof URLSearchParams) {\n    return serializeSearchParams(value);\n  }\n\n  if (isPlainObject(value)) {\n    return stringifyToJsonValue(value);\n  }\n\n  return undefined;\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/transforms-read-write/core/serverSentEvents.gen.ts",
    "content": "// 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 const 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            // Normalize line endings: CRLF -> LF, then CR -> LF\n            buffer = buffer.replace(/\\r\\n/g, '\\n').replace(/\\r/g, '\\n');\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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/transforms-read-write/core/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { Auth, AuthToken } from './auth.gen';\nimport type { BodySerializer, QuerySerializer, QuerySerializerOptions } from './bodySerializer.gen';\n\nexport type HttpMethod =\n  | 'connect'\n  | 'delete'\n  | 'get'\n  | 'head'\n  | 'options'\n  | 'patch'\n  | 'post'\n  | 'put'\n  | 'trace';\n\nexport type Client<\n  RequestFn = never,\n  Config = unknown,\n  MethodFn = never,\n  BuildUrlFn = never,\n  SseFn = never,\n> = {\n  /**\n   * Returns the final request URL.\n   */\n  buildUrl: BuildUrlFn;\n  getConfig: () => Config;\n  request: RequestFn;\n  setConfig: (config: Config) => Config;\n} & {\n  [K in HttpMethod]: MethodFn;\n} & ([SseFn] extends [never] ? { sse?: never } : { sse: { [K in HttpMethod]: SseFn } });\n\nexport interface Config {\n  /**\n   * Auth token or a function returning auth token. The resolved value will be\n   * added to the request payload as defined by its `security` array.\n   */\n  auth?: ((auth: Auth) => Promise<AuthToken> | AuthToken) | AuthToken;\n  /**\n   * A function for serializing request body parameter. By default,\n   * {@link JSON.stringify()} will be used.\n   */\n  bodySerializer?: BodySerializer | null;\n  /**\n   * An object containing any HTTP headers that you want to pre-populate your\n   * `Headers` object with.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/Headers/Headers#init See more}\n   */\n  headers?:\n    | RequestInit['headers']\n    | Record<\n        string,\n        string | number | boolean | (string | number | boolean)[] | null | undefined | unknown\n      >;\n  /**\n   * The request method.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/fetch#method See more}\n   */\n  method?: Uppercase<HttpMethod>;\n  /**\n   * A function for serializing request query parameters. By default, arrays\n   * will be exploded in form style, objects will be exploded in deepObject\n   * style, and reserved characters are percent-encoded.\n   *\n   * This method will have no effect if the native `paramsSerializer()` Axios\n   * API function is used.\n   *\n   * {@link https://swagger.io/docs/specification/serialization/#query View examples}\n   */\n  querySerializer?: QuerySerializer | QuerySerializerOptions;\n  /**\n   * A function validating request data. This is useful if you want to ensure\n   * the request conforms to the desired shape, so it can be safely sent to\n   * the server.\n   */\n  requestValidator?: (data: unknown) => Promise<unknown>;\n  /**\n   * A function transforming response data before it's returned. This is useful\n   * for post-processing data, e.g. converting ISO strings into Date objects.\n   */\n  responseTransformer?: (data: unknown) => Promise<unknown>;\n  /**\n   * A function validating response data. This is useful if you want to ensure\n   * the response conforms to the desired shape, so it can be safely passed to\n   * the transformers and returned to the user.\n   */\n  responseValidator?: (data: unknown) => Promise<unknown>;\n}\n\ntype IsExactlyNeverOrNeverUndefined<T> = [T] extends [never]\n  ? true\n  : [T] extends [never | undefined]\n    ? [undefined] extends [T]\n      ? false\n      : true\n    : false;\n\nexport type OmitNever<T extends Record<string, unknown>> = {\n  [K in keyof T as IsExactlyNeverOrNeverUndefined<T[K]> extends true ? never : K]: T[K];\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/transforms-read-write/core/utils.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/transforms-read-write/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type { BarRead, BarReadWritable, BarWrite, BarWriteWritable, Baz, ClientOptions, Corge, CorgeWritable, FooRead, FooReadWritable, FooReadWrite, FooReadWriteWritable, FooWrite, FooWriteWritable, PostFooReadData, PostFooReadResponse, PostFooReadResponses, PostFooReadWriteData, PostFooReadWriteResponse, PostFooReadWriteResponses, PostFooWriteData, PostFooWriteResponse, PostFooWriteResponses, Quux, QuuxWritable, QuxAllRead } from './types.gen';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/transforms-read-write/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type ClientOptions = {\n    baseUrl: `${string}://${string}` | (string & {});\n};\n\nexport type FooReadWrite = BarRead;\n\nexport type FooRead = BarRead & {\n    readonly foo?: string;\n};\n\nexport type FooWrite = BarWrite;\n\nexport type BarRead = Baz | {\n    readonly bar?: string;\n};\n\nexport type BarWrite = Baz;\n\nexport type Baz = {\n    baz?: string;\n};\n\nexport type QuxAllRead = {\n    readonly baz?: string;\n};\n\nexport type Quux = {\n    baz?: Array<Baz>;\n    qux?: QuxAllRead;\n};\n\nexport type Corge = {\n    bar?: {\n        readonly baz?: boolean;\n    };\n};\n\nexport type FooReadWriteWritable = BarReadWritable & {\n    foo?: string;\n};\n\nexport type FooReadWritable = BarReadWritable;\n\nexport type FooWriteWritable = BarWriteWritable & {\n    foo?: string;\n};\n\nexport type BarReadWritable = Baz;\n\nexport type BarWriteWritable = Baz | {\n    bar?: string;\n};\n\nexport type QuuxWritable = {\n    baz?: Array<Baz>;\n};\n\nexport type CorgeWritable = {\n    foo?: {\n        baz?: boolean;\n    };\n};\n\nexport type PostFooReadWriteData = {\n    body: FooReadWriteWritable;\n    path?: never;\n    query?: never;\n    url: '/foo-read-write';\n};\n\nexport type PostFooReadWriteResponses = {\n    /**\n     * OK\n     */\n    200: FooReadWrite;\n};\n\nexport type PostFooReadWriteResponse = PostFooReadWriteResponses[keyof PostFooReadWriteResponses];\n\nexport type PostFooReadData = {\n    body: FooReadWritable;\n    path?: never;\n    query?: never;\n    url: '/foo-read';\n};\n\nexport type PostFooReadResponses = {\n    /**\n     * OK\n     */\n    200: FooRead;\n};\n\nexport type PostFooReadResponse = PostFooReadResponses[keyof PostFooReadResponses];\n\nexport type PostFooWriteData = {\n    body: FooWriteWritable;\n    path?: never;\n    query?: never;\n    url: '/foo-write';\n};\n\nexport type PostFooWriteResponses = {\n    /**\n     * OK\n     */\n    200: FooWrite;\n};\n\nexport type PostFooWriteResponse = PostFooWriteResponses[keyof PostFooWriteResponses];\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/transforms-schemas-name/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type { ClientOptions, Comment, GetUsersData, GetUsersResponse, GetUsersResponses, Post, PostPostsData, PostPostsResponse, PostPostsResponses, User, UserProfile } from './types.gen';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/transforms-schemas-name/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type ClientOptions = {\n    baseUrl: `${string}://${string}` | (string & {});\n};\n\nexport type User = {\n    id?: string;\n    name?: string;\n    profile?: UserProfile;\n};\n\nexport type UserProfile = {\n    bio?: string;\n    avatar?: string;\n};\n\nexport type Post = {\n    id?: string;\n    title?: string;\n    author?: User;\n    comments?: Array<Comment>;\n};\n\nexport type Comment = {\n    id?: string;\n    text?: string;\n    author?: User;\n};\n\nexport type GetUsersData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/users';\n};\n\nexport type GetUsersResponses = {\n    /**\n     * Success\n     */\n    200: User;\n};\n\nexport type GetUsersResponse = GetUsersResponses[keyof GetUsersResponses];\n\nexport type PostPostsData = {\n    body?: Post;\n    path?: never;\n    query?: never;\n    url: '/posts';\n};\n\nexport type PostPostsResponses = {\n    /**\n     * Created\n     */\n    201: Post;\n};\n\nexport type PostPostsResponse = PostPostsResponses[keyof PostPostsResponses];\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/transforms-schemas-name-collision/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type { ClientOptions, GetTestData, GetTestResponse, GetTestResponses, User, UserV1User, UserV2User } from './types.gen';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/transforms-schemas-name-collision/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type ClientOptions = {\n    baseUrl: `${string}://${string}` | (string & {});\n};\n\nexport type UserV1User = {\n    id?: string;\n    version?: 'v1';\n};\n\nexport type User = {\n    name?: string;\n};\n\nexport type UserV2User = {\n    email?: string;\n    version?: 'v2';\n};\n\nexport type GetTestData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/test';\n};\n\nexport type GetTestResponses = {\n    /**\n     * Success\n     */\n    200: {\n        user1?: UserV1User;\n        user2?: User;\n        user3?: UserV2User;\n    };\n};\n\nexport type GetTestResponse = GetTestResponses[keyof GetTestResponses];\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/type-invalid/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type { ClientOptions, Foo } from './types.gen';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/type-invalid/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type ClientOptions = {\n    baseUrl: `${string}://${string}` | (string & {});\n};\n\nexport type Foo = unknown;\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/additional-properties-false/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type { Bar, Baz, ClientOptions, Foo } from './types.gen';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/additional-properties-false/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type ClientOptions = {\n    baseUrl: `${string}://${string}` | (string & {});\n};\n\nexport type Foo = {\n    foo: string;\n};\n\nexport type Bar = Foo & {};\n\nexport type Baz = Foo & {\n    bar: string;\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/additional-properties-true/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type { Bar, Baz, ClientOptions, Foo, Qux } from './types.gen';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/additional-properties-true/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type ClientOptions = {\n    baseUrl: `${string}://${string}` | (string & {});\n};\n\nexport type Foo = {\n    foo: string;\n    [key: string]: unknown;\n};\n\nexport type Bar = Foo & {\n    [key: string]: unknown;\n};\n\nexport type Baz = Foo & {\n    bar: string;\n    [key: string]: unknown;\n};\n\nexport type Qux = {\n    [key: string]: unknown;\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/additional-properties-true-any/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type { Bar, Baz, ClientOptions, Foo, Qux } from './types.gen';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/additional-properties-true-any/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type ClientOptions = {\n    baseUrl: `${string}://${string}` | (string & {});\n};\n\nexport type Foo = {\n    foo: string;\n    [key: string]: any;\n};\n\nexport type Bar = Foo & {\n    [key: string]: any;\n};\n\nexport type Baz = Foo & {\n    bar: string;\n    [key: string]: any;\n};\n\nexport type Qux = {\n    [key: string]: any;\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/additional-properties-undefined/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type { ClientOptions, Foo } from './types.gen';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/additional-properties-undefined/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type ClientOptions = {\n    baseUrl: `${string}://${string}` | (string & {});\n};\n\nexport type Foo = {\n    foo: {\n        [key: string]: unknown;\n    };\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/array-items-one-of-length-1/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type { Bar, ClientOptions, Foo } from './types.gen';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/array-items-one-of-length-1/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type ClientOptions = {\n    baseUrl: `${string}://${string}` | (string & {});\n};\n\nexport type Foo = {\n    foo?: Array<Bar>;\n};\n\nexport type Bar = string;\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/array-nested-one-of/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type { ClientOptions, Foo } from './types.gen';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/array-nested-one-of/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type ClientOptions = {\n    baseUrl: `${string}://${string}` | (string & {});\n};\n\nexport type Foo = Array<{\n    foo?: string;\n    bar?: string;\n} | {\n    baz?: string;\n    qux?: string;\n}> | Array<{\n    foo?: string;\n    bar?: string;\n}>;\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/body-response-text-plain/client/client.gen.ts",
    "content": "// 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 (options: RequestOptions) => {\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 url = buildUrl(opts);\n\n    return { opts, url };\n  };\n\n  const request: Client['request'] = async (options) => {\n    // @ts-expect-error\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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/body-response-text-plain/client/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type { Auth } from '../core/auth.gen';\nexport type { QuerySerializerOptions } from '../core/bodySerializer.gen';\nexport {\n  formDataBodySerializer,\n  jsonBodySerializer,\n  urlSearchParamsBodySerializer,\n} from '../core/bodySerializer.gen';\nexport { buildClientParams } from '../core/params.gen';\nexport { serializeQueryKeyValue } from '../core/queryKeySerializer.gen';\nexport { createClient } from './client.gen';\nexport type {\n  Client,\n  ClientOptions,\n  Config,\n  CreateClientConfig,\n  Options,\n  RequestOptions,\n  RequestResult,\n  ResolvedRequestOptions,\n  ResponseStyle,\n  TDataShape,\n} from './types.gen';\nexport { createConfig, mergeHeaders } from './utils.gen';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/body-response-text-plain/client/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { Auth } from '../core/auth.gen';\nimport type {\n  ServerSentEventsOptions,\n  ServerSentEventsResult,\n} from '../core/serverSentEvents.gen';\nimport type { Client as CoreClient, Config as CoreConfig } from '../core/types.gen';\nimport type { Middleware } from './utils.gen';\n\nexport type ResponseStyle = 'data' | 'fields';\n\nexport interface Config<T extends ClientOptions = ClientOptions>\n  extends Omit<RequestInit, 'body' | 'headers' | 'method'>, CoreConfig {\n  /**\n   * Base URL for all requests made by this client.\n   */\n  baseUrl?: T['baseUrl'];\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   * Please don't use the Fetch client for Next.js applications. The `next`\n   * options won't have any effect.\n   *\n   * Install {@link https://www.npmjs.com/package/@hey-api/client-next `@hey-api/client-next`} instead.\n   */\n  next?: never;\n  /**\n   * Return the response data parsed in a specified format. By default, `auto`\n   * will infer the appropriate method from the `Content-Type` response header.\n   * You can override this behavior with any of the {@link Body} methods.\n   * Select `stream` if you don't want to parse response data at all.\n   *\n   * @default 'auto'\n   */\n  parseAs?: 'arrayBuffer' | 'auto' | 'blob' | 'formData' | 'json' | 'stream' | 'text';\n  /**\n   * Should we return only data or multiple fields (data, error, response, etc.)?\n   *\n   * @default 'fields'\n   */\n  responseStyle?: ResponseStyle;\n  /**\n   * Throw an error instead of returning it in the response?\n   *\n   * @default false\n   */\n  throwOnError?: T['throwOnError'];\n}\n\nexport interface RequestOptions<\n  TData = unknown,\n  TResponseStyle extends ResponseStyle = 'fields',\n  ThrowOnError extends boolean = boolean,\n  Url extends string = string,\n>\n  extends\n    Config<{\n      responseStyle: TResponseStyle;\n      throwOnError: ThrowOnError;\n    }>,\n    Pick<\n      ServerSentEventsOptions<TData>,\n      | 'onRequest'\n      | 'onSseError'\n      | 'onSseEvent'\n      | 'sseDefaultRetryDelay'\n      | 'sseMaxRetryAttempts'\n      | 'sseMaxRetryDelay'\n    > {\n  /**\n   * Any body that you want to add to your request.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/fetch#body}\n   */\n  body?: unknown;\n  path?: Record<string, unknown>;\n  query?: Record<string, unknown>;\n  /**\n   * Security mechanism(s) to use for the request.\n   */\n  security?: ReadonlyArray<Auth>;\n  url: Url;\n}\n\nexport interface ResolvedRequestOptions<\n  TResponseStyle extends ResponseStyle = 'fields',\n  ThrowOnError extends boolean = boolean,\n  Url extends string = string,\n> extends RequestOptions<unknown, TResponseStyle, ThrowOnError, Url> {\n  serializedBody?: string;\n}\n\nexport type RequestResult<\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = boolean,\n  TResponseStyle extends ResponseStyle = 'fields',\n> = ThrowOnError extends true\n  ? Promise<\n      TResponseStyle extends 'data'\n        ? TData extends Record<string, unknown>\n          ? TData[keyof TData]\n          : TData\n        : {\n            data: TData extends Record<string, unknown> ? TData[keyof TData] : TData;\n            request: Request;\n            response: Response;\n          }\n    >\n  : Promise<\n      TResponseStyle extends 'data'\n        ? (TData extends Record<string, unknown> ? TData[keyof TData] : TData) | undefined\n        : (\n            | {\n                data: TData extends Record<string, unknown> ? TData[keyof TData] : TData;\n                error: undefined;\n              }\n            | {\n                data: undefined;\n                error: TError extends Record<string, unknown> ? TError[keyof TError] : TError;\n              }\n          ) & {\n            request: Request;\n            response: Response;\n          }\n    >;\n\nexport interface ClientOptions {\n  baseUrl?: string;\n  responseStyle?: ResponseStyle;\n  throwOnError?: boolean;\n}\n\ntype MethodFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'>,\n) => RequestResult<TData, TError, ThrowOnError, TResponseStyle>;\n\ntype SseFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'>,\n) => Promise<ServerSentEventsResult<TData, TError>>;\n\ntype RequestFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'> &\n    Pick<Required<RequestOptions<TData, TResponseStyle, ThrowOnError>>, 'method'>,\n) => RequestResult<TData, TError, ThrowOnError, TResponseStyle>;\n\ntype BuildUrlFn = <\n  TData extends {\n    body?: unknown;\n    path?: Record<string, unknown>;\n    query?: Record<string, unknown>;\n    url: string;\n  },\n>(\n  options: TData & Options<TData>,\n) => string;\n\nexport type Client = CoreClient<RequestFn, Config, MethodFn, BuildUrlFn, SseFn> & {\n  interceptors: Middleware<Request, Response, unknown, ResolvedRequestOptions>;\n};\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 = ClientOptions> = (\n  override?: Config<ClientOptions & T>,\n) => Config<Required<ClientOptions> & T>;\n\nexport interface TDataShape {\n  body?: unknown;\n  headers?: unknown;\n  path?: unknown;\n  query?: unknown;\n  url: string;\n}\n\ntype OmitKeys<T, K> = Pick<T, Exclude<keyof T, K>>;\n\nexport type Options<\n  TData extends TDataShape = TDataShape,\n  ThrowOnError extends boolean = boolean,\n  TResponse = unknown,\n  TResponseStyle extends ResponseStyle = 'fields',\n> = OmitKeys<\n  RequestOptions<TResponse, TResponseStyle, ThrowOnError>,\n  'body' | 'path' | 'query' | 'url'\n> &\n  ([TData] extends [never] ? unknown : Omit<TData, 'url'>);\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/body-response-text-plain/client/utils.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/body-response-text-plain/client.gen.ts",
    "content": "// 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>());\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/body-response-text-plain/core/auth.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/body-response-text-plain/core/bodySerializer.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/body-response-text-plain/core/params.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/body-response-text-plain/core/pathSerializer.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/body-response-text-plain/core/queryKeySerializer.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\n/**\n * JSON-friendly union that mirrors what Pinia Colada can hash.\n */\nexport type JsonValue =\n  | null\n  | string\n  | number\n  | boolean\n  | JsonValue[]\n  | { [key: string]: JsonValue };\n\n/**\n * Replacer that converts non-JSON values (bigint, Date, etc.) to safe substitutes.\n */\nexport const queryKeyJsonReplacer = (_key: string, value: unknown) => {\n  if (value === undefined || typeof value === 'function' || typeof value === 'symbol') {\n    return undefined;\n  }\n  if (typeof value === 'bigint') {\n    return value.toString();\n  }\n  if (value instanceof Date) {\n    return value.toISOString();\n  }\n  return value;\n};\n\n/**\n * Safely stringifies a value and parses it back into a JsonValue.\n */\nexport const stringifyToJsonValue = (input: unknown): JsonValue | undefined => {\n  try {\n    const json = JSON.stringify(input, queryKeyJsonReplacer);\n    if (json === undefined) {\n      return undefined;\n    }\n    return JSON.parse(json) as JsonValue;\n  } catch {\n    return undefined;\n  }\n};\n\n/**\n * Detects plain objects (including objects with a null prototype).\n */\nconst isPlainObject = (value: unknown): value is Record<string, unknown> => {\n  if (value === null || typeof value !== 'object') {\n    return false;\n  }\n  const prototype = Object.getPrototypeOf(value as object);\n  return prototype === Object.prototype || prototype === null;\n};\n\n/**\n * Turns URLSearchParams into a sorted JSON object for deterministic keys.\n */\nconst serializeSearchParams = (params: URLSearchParams): JsonValue => {\n  const entries = Array.from(params.entries()).sort(([a], [b]) => a.localeCompare(b));\n  const result: Record<string, JsonValue> = {};\n\n  for (const [key, value] of entries) {\n    const existing = result[key];\n    if (existing === undefined) {\n      result[key] = value;\n      continue;\n    }\n\n    if (Array.isArray(existing)) {\n      (existing as string[]).push(value);\n    } else {\n      result[key] = [existing, value];\n    }\n  }\n\n  return result;\n};\n\n/**\n * Normalizes any accepted value into a JSON-friendly shape for query keys.\n */\nexport const serializeQueryKeyValue = (value: unknown): JsonValue | undefined => {\n  if (value === null) {\n    return null;\n  }\n\n  if (typeof value === 'string' || typeof value === 'number' || typeof value === 'boolean') {\n    return value;\n  }\n\n  if (value === undefined || typeof value === 'function' || typeof value === 'symbol') {\n    return undefined;\n  }\n\n  if (typeof value === 'bigint') {\n    return value.toString();\n  }\n\n  if (value instanceof Date) {\n    return value.toISOString();\n  }\n\n  if (Array.isArray(value)) {\n    return stringifyToJsonValue(value);\n  }\n\n  if (typeof URLSearchParams !== 'undefined' && value instanceof URLSearchParams) {\n    return serializeSearchParams(value);\n  }\n\n  if (isPlainObject(value)) {\n    return stringifyToJsonValue(value);\n  }\n\n  return undefined;\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/body-response-text-plain/core/serverSentEvents.gen.ts",
    "content": "// 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 const 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            // Normalize line endings: CRLF -> LF, then CR -> LF\n            buffer = buffer.replace(/\\r\\n/g, '\\n').replace(/\\r/g, '\\n');\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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/body-response-text-plain/core/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { Auth, AuthToken } from './auth.gen';\nimport type { BodySerializer, QuerySerializer, QuerySerializerOptions } from './bodySerializer.gen';\n\nexport type HttpMethod =\n  | 'connect'\n  | 'delete'\n  | 'get'\n  | 'head'\n  | 'options'\n  | 'patch'\n  | 'post'\n  | 'put'\n  | 'trace';\n\nexport type Client<\n  RequestFn = never,\n  Config = unknown,\n  MethodFn = never,\n  BuildUrlFn = never,\n  SseFn = never,\n> = {\n  /**\n   * Returns the final request URL.\n   */\n  buildUrl: BuildUrlFn;\n  getConfig: () => Config;\n  request: RequestFn;\n  setConfig: (config: Config) => Config;\n} & {\n  [K in HttpMethod]: MethodFn;\n} & ([SseFn] extends [never] ? { sse?: never } : { sse: { [K in HttpMethod]: SseFn } });\n\nexport interface Config {\n  /**\n   * Auth token or a function returning auth token. The resolved value will be\n   * added to the request payload as defined by its `security` array.\n   */\n  auth?: ((auth: Auth) => Promise<AuthToken> | AuthToken) | AuthToken;\n  /**\n   * A function for serializing request body parameter. By default,\n   * {@link JSON.stringify()} will be used.\n   */\n  bodySerializer?: BodySerializer | null;\n  /**\n   * An object containing any HTTP headers that you want to pre-populate your\n   * `Headers` object with.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/Headers/Headers#init See more}\n   */\n  headers?:\n    | RequestInit['headers']\n    | Record<\n        string,\n        string | number | boolean | (string | number | boolean)[] | null | undefined | unknown\n      >;\n  /**\n   * The request method.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/fetch#method See more}\n   */\n  method?: Uppercase<HttpMethod>;\n  /**\n   * A function for serializing request query parameters. By default, arrays\n   * will be exploded in form style, objects will be exploded in deepObject\n   * style, and reserved characters are percent-encoded.\n   *\n   * This method will have no effect if the native `paramsSerializer()` Axios\n   * API function is used.\n   *\n   * {@link https://swagger.io/docs/specification/serialization/#query View examples}\n   */\n  querySerializer?: QuerySerializer | QuerySerializerOptions;\n  /**\n   * A function validating request data. This is useful if you want to ensure\n   * the request conforms to the desired shape, so it can be safely sent to\n   * the server.\n   */\n  requestValidator?: (data: unknown) => Promise<unknown>;\n  /**\n   * A function transforming response data before it's returned. This is useful\n   * for post-processing data, e.g. converting ISO strings into Date objects.\n   */\n  responseTransformer?: (data: unknown) => Promise<unknown>;\n  /**\n   * A function validating response data. This is useful if you want to ensure\n   * the response conforms to the desired shape, so it can be safely passed to\n   * the transformers and returned to the user.\n   */\n  responseValidator?: (data: unknown) => Promise<unknown>;\n}\n\ntype IsExactlyNeverOrNeverUndefined<T> = [T] extends [never]\n  ? true\n  : [T] extends [never | undefined]\n    ? [undefined] extends [T]\n      ? false\n      : true\n    : false;\n\nexport type OmitNever<T extends Record<string, unknown>> = {\n  [K in keyof T as IsExactlyNeverOrNeverUndefined<T[K]> extends true ? never : K]: T[K];\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/body-response-text-plain/core/utils.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/body-response-text-plain/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport { type Options, postFoo } from './sdk.gen';\nexport type { ClientOptions, PostFooData, PostFooResponse, PostFooResponses } from './types.gen';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/body-response-text-plain/sdk.gen.ts",
    "content": "// 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 { PostFooData, PostFooResponses } from './types.gen';\n\nexport type Options<TData extends TDataShape = TDataShape, ThrowOnError extends boolean = boolean> = Options2<TData, ThrowOnError> & {\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\nexport const postFoo = <ThrowOnError extends boolean = false>(options: Options<PostFooData, ThrowOnError>) => (options.client ?? client).post<PostFooResponses, unknown, ThrowOnError>({\n    bodySerializer: null,\n    url: '/foo',\n    ...options,\n    headers: {\n        'Content-Type': 'text/plain',\n        ...options.headers\n    }\n});\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/body-response-text-plain/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type ClientOptions = {\n    baseUrl: `${string}://${string}` | (string & {});\n};\n\nexport type PostFooData = {\n    body: string;\n    path?: never;\n    query?: never;\n    url: '/foo';\n};\n\nexport type PostFooResponses = {\n    /**\n     * OK\n     */\n    200: string;\n};\n\nexport type PostFooResponse = PostFooResponses[keyof PostFooResponses];\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/case-PascalCase/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type { _201, ClientOptions, Foo, FooBar, FooBar2, FooBar3, GetFooData, GetFooResponse, GetFooResponses } from './types.gen';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/case-PascalCase/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type ClientOptions = {\n    baseUrl: `${string}://${string}` | (string & {});\n};\n\n/**\n * original name: 201\n */\nexport type _201 = number;\n\n/**\n * original name: Foo\n */\nexport type Foo = {\n    /**\n     * original name: fooBar\n     */\n    fooBar: FooBar;\n    /**\n     * original name: BarBaz\n     */\n    BarBaz: Foo;\n    /**\n     * original name: qux_quux\n     */\n    qux_quux: {\n        /**\n         * original name: fooBar\n         */\n        fooBar: FooBar2;\n        /**\n         * original name: BarBaz\n         */\n        BarBaz: FooBar3;\n        /**\n         * original name: qux_quux\n         */\n        qux_quux: boolean;\n    };\n};\n\n/**\n * original name: foo_bar\n */\nexport type FooBar = boolean;\n\n/**\n * original name: fooBar\n */\nexport type FooBar2 = number;\n\n/**\n * original name: FooBar\n */\nexport type FooBar3 = string;\n\nexport type GetFooData = {\n    body: Foo;\n    path?: never;\n    query: {\n        /**\n         * original name: fooBar\n         */\n        fooBar: string;\n        /**\n         * original name: BarBaz\n         */\n        BarBaz: string;\n        /**\n         * original name: qux_quux\n         */\n        qux_quux: string;\n    };\n    url: '/foo';\n};\n\nexport type GetFooResponses = {\n    /**\n     * OK\n     */\n    200: Foo;\n    /**\n     * OK\n     */\n    201: _201;\n};\n\nexport type GetFooResponse = GetFooResponses[keyof GetFooResponses];\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/case-camelCase/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type { _201, clientOptions, foo, fooBar, fooBar2, fooBar3, getFooData, getFooResponse, getFooResponses } from './types.gen';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/case-camelCase/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type clientOptions = {\n    baseUrl: `${string}://${string}` | (string & {});\n};\n\n/**\n * original name: 201\n */\nexport type _201 = number;\n\n/**\n * original name: Foo\n */\nexport type foo = {\n    /**\n     * original name: fooBar\n     */\n    fooBar: fooBar;\n    /**\n     * original name: BarBaz\n     */\n    BarBaz: foo;\n    /**\n     * original name: qux_quux\n     */\n    qux_quux: {\n        /**\n         * original name: fooBar\n         */\n        fooBar: fooBar2;\n        /**\n         * original name: BarBaz\n         */\n        BarBaz: fooBar3;\n        /**\n         * original name: qux_quux\n         */\n        qux_quux: boolean;\n    };\n};\n\n/**\n * original name: foo_bar\n */\nexport type fooBar = boolean;\n\n/**\n * original name: fooBar\n */\nexport type fooBar2 = number;\n\n/**\n * original name: FooBar\n */\nexport type fooBar3 = string;\n\nexport type getFooData = {\n    body: foo;\n    path?: never;\n    query: {\n        /**\n         * original name: fooBar\n         */\n        fooBar: string;\n        /**\n         * original name: BarBaz\n         */\n        BarBaz: string;\n        /**\n         * original name: qux_quux\n         */\n        qux_quux: string;\n    };\n    url: '/foo';\n};\n\nexport type getFooResponses = {\n    /**\n     * OK\n     */\n    200: foo;\n    /**\n     * OK\n     */\n    201: _201;\n};\n\nexport type getFooResponse = getFooResponses[keyof getFooResponses];\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/case-preserve/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type { _201, ClientOptions, Foo, foo_bar, fooBar, FooBar, getFooData, getFooResponse, getFooResponses } from './types.gen';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/case-preserve/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type ClientOptions = {\n    baseUrl: `${string}://${string}` | (string & {});\n};\n\n/**\n * original name: 201\n */\nexport type _201 = number;\n\n/**\n * original name: Foo\n */\nexport type Foo = {\n    /**\n     * original name: fooBar\n     */\n    fooBar: foo_bar;\n    /**\n     * original name: BarBaz\n     */\n    BarBaz: Foo;\n    /**\n     * original name: qux_quux\n     */\n    qux_quux: {\n        /**\n         * original name: fooBar\n         */\n        fooBar: fooBar;\n        /**\n         * original name: BarBaz\n         */\n        BarBaz: FooBar;\n        /**\n         * original name: qux_quux\n         */\n        qux_quux: boolean;\n    };\n};\n\n/**\n * original name: foo_bar\n */\nexport type foo_bar = boolean;\n\n/**\n * original name: fooBar\n */\nexport type fooBar = number;\n\n/**\n * original name: FooBar\n */\nexport type FooBar = string;\n\nexport type getFooData = {\n    body: Foo;\n    path?: never;\n    query: {\n        /**\n         * original name: fooBar\n         */\n        fooBar: string;\n        /**\n         * original name: BarBaz\n         */\n        BarBaz: string;\n        /**\n         * original name: qux_quux\n         */\n        qux_quux: string;\n    };\n    url: '/foo';\n};\n\nexport type getFooResponses = {\n    /**\n     * OK\n     */\n    200: Foo;\n    /**\n     * OK\n     */\n    201: _201;\n};\n\nexport type getFooResponse = getFooResponses[keyof getFooResponses];\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/case-snake_case/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type { _201, client_options, foo, foo_bar, foo_bar2, foo_bar3, get_foo_data, get_foo_response, get_foo_responses } from './types.gen';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/case-snake_case/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type client_options = {\n    baseUrl: `${string}://${string}` | (string & {});\n};\n\n/**\n * original name: 201\n */\nexport type _201 = number;\n\n/**\n * original name: Foo\n */\nexport type foo = {\n    /**\n     * original name: fooBar\n     */\n    fooBar: foo_bar;\n    /**\n     * original name: BarBaz\n     */\n    BarBaz: foo;\n    /**\n     * original name: qux_quux\n     */\n    qux_quux: {\n        /**\n         * original name: fooBar\n         */\n        fooBar: foo_bar2;\n        /**\n         * original name: BarBaz\n         */\n        BarBaz: foo_bar3;\n        /**\n         * original name: qux_quux\n         */\n        qux_quux: boolean;\n    };\n};\n\n/**\n * original name: foo_bar\n */\nexport type foo_bar = boolean;\n\n/**\n * original name: fooBar\n */\nexport type foo_bar2 = number;\n\n/**\n * original name: FooBar\n */\nexport type foo_bar3 = string;\n\nexport type get_foo_data = {\n    body: foo;\n    path?: never;\n    query: {\n        /**\n         * original name: fooBar\n         */\n        fooBar: string;\n        /**\n         * original name: BarBaz\n         */\n        BarBaz: string;\n        /**\n         * original name: qux_quux\n         */\n        qux_quux: string;\n    };\n    url: '/foo';\n};\n\nexport type get_foo_responses = {\n    /**\n     * OK\n     */\n    200: foo;\n    /**\n     * OK\n     */\n    201: _201;\n};\n\nexport type get_foo_response = get_foo_responses[keyof get_foo_responses];\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-angular/base-url-false/client/client.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { HttpResponse } from '@angular/common/http';\nimport { HttpClient, HttpErrorResponse, HttpEventType, HttpRequest } from '@angular/common/http';\nimport {\n  assertInInjectionContext,\n  inject,\n  provideAppInitializer,\n  runInInjectionContext,\n} from '@angular/core';\nimport { firstValueFrom } from 'rxjs';\nimport { filter } from 'rxjs/operators';\n\nimport { createSseClient } from '../core/serverSentEvents.gen';\nimport type { HttpMethod } from '../core/types.gen';\nimport { getValidRequestBody } from '../core/utils.gen';\nimport type {\n  Client,\n  Config,\n  RequestOptions,\n  ResolvedRequestOptions,\n  ResponseStyle,\n} from './types.gen';\nimport {\n  buildUrl,\n  createConfig,\n  createInterceptors,\n  mergeConfigs,\n  mergeHeaders,\n  setAuthParams,\n} from './utils.gen';\n\nexport function provideHeyApiClient(client: Client) {\n  return provideAppInitializer(() => {\n    const httpClient = inject(HttpClient);\n    client.setConfig({ httpClient });\n  });\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<\n    HttpRequest<unknown>,\n    HttpResponse<unknown>,\n    unknown,\n    ResolvedRequestOptions\n  >();\n\n  const requestOptions = <\n    TData = unknown,\n    ThrowOnError extends boolean = false,\n    TResponseStyle extends ResponseStyle = 'fields',\n  >(\n    options: RequestOptions<TData, TResponseStyle, ThrowOnError>,\n  ) => {\n    const opts = {\n      ..._config,\n      ...options,\n      headers: mergeHeaders(_config.headers, options.headers),\n      httpClient: options.httpClient ?? _config.httpClient,\n      serializedBody: undefined as string | undefined,\n    };\n\n    if (!opts.httpClient) {\n      if (opts.injector) {\n        opts.httpClient = runInInjectionContext(opts.injector, () => inject(HttpClient));\n      } else {\n        assertInInjectionContext(requestOptions);\n        opts.httpClient = inject(HttpClient);\n      }\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 url = buildUrl(opts as any);\n\n    const req = new HttpRequest<unknown>(opts.method ?? 'GET', url, getValidRequestBody(opts), {\n      redirect: 'follow',\n      ...opts,\n    });\n\n    return { opts, req, url };\n  };\n\n  const beforeRequest = async (options: RequestOptions) => {\n    const { opts, req, url } = requestOptions(options);\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    return { opts, req, url };\n  };\n\n  const request: Client['request'] = async (options) => {\n    // @ts-expect-error\n    const { opts, req: initialReq } = await beforeRequest(options);\n\n    let req = initialReq;\n\n    for (const fn of interceptors.request.fns) {\n      if (fn) {\n        req = await fn(req, opts as any);\n      }\n    }\n\n    const result: {\n      request: HttpRequest<unknown>;\n      response: any;\n    } = {\n      request: req,\n      response: null,\n    };\n\n    try {\n      result.response = (await firstValueFrom(\n        opts\n          .httpClient!.request(req)\n          .pipe(filter((event) => event.type === HttpEventType.Response)),\n      )) as HttpResponse<unknown>;\n\n      for (const fn of interceptors.response.fns) {\n        if (fn) {\n          result.response = await fn(result.response, req, opts as any);\n        }\n      }\n\n      let bodyResponse = result.response.body;\n\n      if (opts.responseValidator) {\n        await opts.responseValidator(bodyResponse);\n      }\n\n      if (opts.responseTransformer) {\n        bodyResponse = await opts.responseTransformer(bodyResponse);\n      }\n\n      return opts.responseStyle === 'data' ? bodyResponse : { data: bodyResponse, ...result };\n    } catch (error) {\n      if (error instanceof HttpErrorResponse) {\n        result.response = error;\n      }\n\n      let finalError = error instanceof HttpErrorResponse ? error.error : error;\n\n      for (const fn of interceptors.error.fns) {\n        if (fn) {\n          finalError = (await fn(finalError, result.response as any, req, opts as any)) as string;\n        }\n      }\n\n      if (opts.throwOnError) {\n        throw finalError;\n      }\n\n      return opts.responseStyle === 'data'\n        ? undefined\n        : {\n            error: finalError,\n            ...result,\n          };\n    }\n  };\n\n  const makeMethodFn = (method: Uppercase<HttpMethod>) => (options: RequestOptions) =>\n    request({ ...options, method });\n\n  const makeSseFn = (method: Uppercase<HttpMethod>) => async (options: RequestOptions) => {\n    const { opts, url } = await beforeRequest(options);\n    return createSseClient({\n      ...opts,\n      body: opts.body as BodyInit | null | undefined,\n      headers: opts.headers as unknown as Record<string, string>,\n      method,\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    requestOptions: (options) => {\n      if (options.security) {\n        throw new Error('Security is not supported in requestOptions');\n      }\n\n      if (options.requestValidator) {\n        throw new Error('Request validation is not supported in requestOptions');\n      }\n\n      return requestOptions(options).req;\n    },\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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-angular/base-url-false/client/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type { Auth } from '../core/auth.gen';\nexport type { QuerySerializerOptions } from '../core/bodySerializer.gen';\nexport {\n  formDataBodySerializer,\n  jsonBodySerializer,\n  urlSearchParamsBodySerializer,\n} from '../core/bodySerializer.gen';\nexport { buildClientParams } from '../core/params.gen';\nexport { serializeQueryKeyValue } from '../core/queryKeySerializer.gen';\nexport { createClient } from './client.gen';\nexport type {\n  Client,\n  ClientOptions,\n  Config,\n  CreateClientConfig,\n  Options,\n  RequestOptions,\n  RequestResult,\n  ResolvedRequestOptions,\n  ResponseStyle,\n  TDataShape,\n} from './types.gen';\nexport { createConfig, mergeHeaders } from './utils.gen';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-angular/base-url-false/client/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type {\n  HttpClient,\n  HttpErrorResponse,\n  HttpHeaders,\n  HttpRequest,\n  HttpResponse,\n} from '@angular/common/http';\nimport type { Injector } from '@angular/core';\n\nimport type { Auth } from '../core/auth.gen';\nimport type {\n  ServerSentEventsOptions,\n  ServerSentEventsResult,\n} from '../core/serverSentEvents.gen';\nimport type { Client as CoreClient, Config as CoreConfig } from '../core/types.gen';\nimport type { Middleware } from './utils.gen';\n\nexport type ResponseStyle = 'data' | 'fields';\n\nexport interface Config<T extends ClientOptions = ClientOptions>\n  extends Omit<RequestInit, 'body' | 'headers' | 'method'>, Omit<CoreConfig, 'headers'> {\n  /**\n   * Base URL for all requests made by this client.\n   */\n  baseUrl?: T['baseUrl'];\n  /**\n   * An object containing any HTTP headers that you want to pre-populate your\n   * `HttpHeaders` object with.\n   *\n   * {@link https://angular.dev/api/common/http/HttpHeaders#constructor See more}\n   */\n  headers?:\n    | HttpHeaders\n    | Record<\n        string,\n        string | number | boolean | (string | number | boolean)[] | null | undefined | unknown\n      >;\n  /**\n   * The HTTP client to use for making requests.\n   */\n  httpClient?: HttpClient;\n  /**\n   * Should we return only data or multiple fields (data, error, response, etc.)?\n   *\n   * @default 'fields'\n   */\n  responseStyle?: ResponseStyle;\n\n  /**\n   * Throw an error instead of returning it in the response?\n   *\n   * @default false\n   */\n  throwOnError?: T['throwOnError'];\n}\n\nexport interface RequestOptions<\n  TData = unknown,\n  TResponseStyle extends ResponseStyle = 'fields',\n  ThrowOnError extends boolean = boolean,\n  Url extends string = string,\n>\n  extends\n    Config<{\n      responseStyle: TResponseStyle;\n      throwOnError: ThrowOnError;\n    }>,\n    Pick<\n      ServerSentEventsOptions<TData>,\n      | 'onRequest'\n      | 'onSseError'\n      | 'onSseEvent'\n      | 'sseDefaultRetryDelay'\n      | 'sseMaxRetryAttempts'\n      | 'sseMaxRetryDelay'\n    > {\n  /**\n   * Any body that you want to add to your request.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/fetch#body}\n   */\n  body?: unknown;\n  /**\n   * Optional custom injector for dependency resolution if you don't implicitly or explicitly provide one.\n   */\n  injector?: Injector;\n  path?: Record<string, unknown>;\n  query?: Record<string, unknown>;\n  /**\n   * Security mechanism(s) to use for the request.\n   */\n  security?: ReadonlyArray<Auth>;\n  url: Url;\n}\n\nexport interface ResolvedRequestOptions<\n  TResponseStyle extends ResponseStyle = 'fields',\n  ThrowOnError extends boolean = boolean,\n  Url extends string = string,\n> extends RequestOptions<unknown, TResponseStyle, ThrowOnError, Url> {\n  serializedBody?: string;\n}\n\nexport type RequestResult<\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = boolean,\n  TResponseStyle extends ResponseStyle = 'fields',\n> = Promise<\n  ThrowOnError extends true\n    ? TResponseStyle extends 'data'\n      ? TData extends Record<string, unknown>\n        ? TData[keyof TData]\n        : TData\n      : {\n          data: TData extends Record<string, unknown> ? TData[keyof TData] : TData;\n          request: HttpRequest<unknown>;\n          response: HttpResponse<TData>;\n        }\n    : TResponseStyle extends 'data'\n      ? (TData extends Record<string, unknown> ? TData[keyof TData] : TData) | undefined\n      :\n          | {\n              data: TData extends Record<string, unknown> ? TData[keyof TData] : TData;\n              error: undefined;\n              request: HttpRequest<unknown>;\n              response: HttpResponse<TData>;\n            }\n          | {\n              data: undefined;\n              error: TError[keyof TError];\n              request: HttpRequest<unknown>;\n              response: HttpErrorResponse & {\n                error: TError[keyof TError] | null;\n              };\n            }\n>;\n\nexport interface ClientOptions {\n  baseUrl?: string;\n  responseStyle?: ResponseStyle;\n  throwOnError?: boolean;\n}\n\ntype MethodFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'>,\n) => RequestResult<TData, TError, ThrowOnError, TResponseStyle>;\n\ntype SseFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'>,\n) => Promise<ServerSentEventsResult<TData, TError>>;\n\ntype RequestFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'> &\n    Pick<Required<RequestOptions<TData, TResponseStyle, ThrowOnError>>, 'method'>,\n) => RequestResult<TData, TError, ThrowOnError, TResponseStyle>;\n\ntype RequestOptionsFn = <\n  T,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: RequestOptions<T, TResponseStyle, ThrowOnError>,\n) => HttpRequest<T>;\n\ntype BuildUrlFn = <\n  TData extends {\n    body?: unknown;\n    path?: Record<string, unknown>;\n    query?: Record<string, unknown>;\n    url: string;\n  },\n>(\n  options: TData & Options<TData>,\n) => string;\n\nexport type Client = CoreClient<RequestFn, Config, MethodFn, BuildUrlFn, SseFn> & {\n  interceptors: Middleware<\n    HttpRequest<unknown>,\n    HttpResponse<unknown>,\n    unknown,\n    ResolvedRequestOptions\n  >;\n  requestOptions: RequestOptionsFn;\n};\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 = ClientOptions> = (\n  override?: Config<ClientOptions & T>,\n) => Config<Required<ClientOptions> & T>;\n\nexport interface TDataShape {\n  body?: unknown;\n  headers?: unknown;\n  path?: unknown;\n  query?: unknown;\n  url: string;\n}\n\ntype OmitKeys<T, K> = Pick<T, Exclude<keyof T, K>>;\n\nexport type Options<\n  TData extends TDataShape = TDataShape,\n  ThrowOnError extends boolean = boolean,\n  TResponse = unknown,\n  TResponseStyle extends ResponseStyle = 'fields',\n> = OmitKeys<\n  RequestOptions<TResponse, TResponseStyle, ThrowOnError>,\n  'body' | 'path' | 'query' | 'url'\n> &\n  ([TData] extends [never] ? unknown : Omit<TData, 'url'>);\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-angular/base-url-false/client/utils.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport { HttpHeaders } from '@angular/common/http';\n\nimport { getAuthToken } from '../core/auth.gen';\nimport type {\n  QuerySerializer,\n  QuerySerializerOptions,\n} from '../core/bodySerializer.gen';\nimport {\n  serializeArrayParam,\n  serializeObjectParam,\n  serializePrimitiveParam,\n} from '../core/pathSerializer.gen';\nimport type { Client, ClientOptions, Config, RequestOptions } from './types.gen';\n\ninterface PathSerializer {\n  path: Record<string, unknown>;\n  url: string;\n}\n\nconst PATH_PARAM_RE = /\\{[^{}]+\\}/g;\n\ntype ArrayStyle = 'form' | 'spaceDelimited' | 'pipeDelimited';\ntype MatrixStyle = 'label' | 'matrix' | 'simple';\ntype ArraySeparatorStyle = ArrayStyle | MatrixStyle;\n\nconst 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 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 = (\n  contentType: string | null,\n): 'blob' | 'formData' | 'json' | 'stream' | 'text' | undefined => {\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\nexport const setAuthParams = async (\n  options: Pick<Required<RequestOptions>, 'security'> &\n    Pick<RequestOptions, 'auth' | 'query'> & {\n      headers: HttpHeaders;\n    },\n) => {\n  for (const auth of options.security) {\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 = options.headers.append('Cookie', `${name}=${token}`);\n        break;\n      case 'header':\n      default:\n        options.headers = options.headers.set(name, token);\n        break;\n    }\n\n    return;\n  }\n};\n\nexport const buildUrl: Client['buildUrl'] = (options) => {\n  const url = 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  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 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\nexport const mergeHeaders = (\n  ...headers: Array<Required<Config>['headers'] | undefined>\n): HttpHeaders => {\n  let mergedHeaders = new HttpHeaders();\n\n  for (const header of headers) {\n    if (!header || typeof header !== 'object') {\n      continue;\n    }\n\n    if (header instanceof HttpHeaders) {\n      // Merge HttpHeaders instance\n      header.keys().forEach((key) => {\n        const values = header.getAll(key);\n        if (values) {\n          values.forEach((value) => {\n            mergedHeaders = mergedHeaders.append(key, value);\n          });\n        }\n      });\n    } else {\n      // Merge plain object headers\n      for (const [key, value] of Object.entries(header)) {\n        if (value === null) {\n          mergedHeaders = mergedHeaders.delete(key);\n        } else if (Array.isArray(value)) {\n          for (const v of value) {\n            mergedHeaders = 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 = mergedHeaders.set(\n            key,\n            typeof value === 'object' ? JSON.stringify(value) : (value as string),\n          );\n        }\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  headers: defaultHeaders,\n  querySerializer: defaultQuerySerializer,\n  ...override,\n});\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-angular/base-url-false/client.gen.ts",
    "content": "// 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>());\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-angular/base-url-false/core/auth.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-angular/base-url-false/core/bodySerializer.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-angular/base-url-false/core/params.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-angular/base-url-false/core/pathSerializer.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-angular/base-url-false/core/queryKeySerializer.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\n/**\n * JSON-friendly union that mirrors what Pinia Colada can hash.\n */\nexport type JsonValue =\n  | null\n  | string\n  | number\n  | boolean\n  | JsonValue[]\n  | { [key: string]: JsonValue };\n\n/**\n * Replacer that converts non-JSON values (bigint, Date, etc.) to safe substitutes.\n */\nexport const queryKeyJsonReplacer = (_key: string, value: unknown) => {\n  if (value === undefined || typeof value === 'function' || typeof value === 'symbol') {\n    return undefined;\n  }\n  if (typeof value === 'bigint') {\n    return value.toString();\n  }\n  if (value instanceof Date) {\n    return value.toISOString();\n  }\n  return value;\n};\n\n/**\n * Safely stringifies a value and parses it back into a JsonValue.\n */\nexport const stringifyToJsonValue = (input: unknown): JsonValue | undefined => {\n  try {\n    const json = JSON.stringify(input, queryKeyJsonReplacer);\n    if (json === undefined) {\n      return undefined;\n    }\n    return JSON.parse(json) as JsonValue;\n  } catch {\n    return undefined;\n  }\n};\n\n/**\n * Detects plain objects (including objects with a null prototype).\n */\nconst isPlainObject = (value: unknown): value is Record<string, unknown> => {\n  if (value === null || typeof value !== 'object') {\n    return false;\n  }\n  const prototype = Object.getPrototypeOf(value as object);\n  return prototype === Object.prototype || prototype === null;\n};\n\n/**\n * Turns URLSearchParams into a sorted JSON object for deterministic keys.\n */\nconst serializeSearchParams = (params: URLSearchParams): JsonValue => {\n  const entries = Array.from(params.entries()).sort(([a], [b]) => a.localeCompare(b));\n  const result: Record<string, JsonValue> = {};\n\n  for (const [key, value] of entries) {\n    const existing = result[key];\n    if (existing === undefined) {\n      result[key] = value;\n      continue;\n    }\n\n    if (Array.isArray(existing)) {\n      (existing as string[]).push(value);\n    } else {\n      result[key] = [existing, value];\n    }\n  }\n\n  return result;\n};\n\n/**\n * Normalizes any accepted value into a JSON-friendly shape for query keys.\n */\nexport const serializeQueryKeyValue = (value: unknown): JsonValue | undefined => {\n  if (value === null) {\n    return null;\n  }\n\n  if (typeof value === 'string' || typeof value === 'number' || typeof value === 'boolean') {\n    return value;\n  }\n\n  if (value === undefined || typeof value === 'function' || typeof value === 'symbol') {\n    return undefined;\n  }\n\n  if (typeof value === 'bigint') {\n    return value.toString();\n  }\n\n  if (value instanceof Date) {\n    return value.toISOString();\n  }\n\n  if (Array.isArray(value)) {\n    return stringifyToJsonValue(value);\n  }\n\n  if (typeof URLSearchParams !== 'undefined' && value instanceof URLSearchParams) {\n    return serializeSearchParams(value);\n  }\n\n  if (isPlainObject(value)) {\n    return stringifyToJsonValue(value);\n  }\n\n  return undefined;\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-angular/base-url-false/core/serverSentEvents.gen.ts",
    "content": "// 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 const 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            // Normalize line endings: CRLF -> LF, then CR -> LF\n            buffer = buffer.replace(/\\r\\n/g, '\\n').replace(/\\r/g, '\\n');\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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-angular/base-url-false/core/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { Auth, AuthToken } from './auth.gen';\nimport type { BodySerializer, QuerySerializer, QuerySerializerOptions } from './bodySerializer.gen';\n\nexport type HttpMethod =\n  | 'connect'\n  | 'delete'\n  | 'get'\n  | 'head'\n  | 'options'\n  | 'patch'\n  | 'post'\n  | 'put'\n  | 'trace';\n\nexport type Client<\n  RequestFn = never,\n  Config = unknown,\n  MethodFn = never,\n  BuildUrlFn = never,\n  SseFn = never,\n> = {\n  /**\n   * Returns the final request URL.\n   */\n  buildUrl: BuildUrlFn;\n  getConfig: () => Config;\n  request: RequestFn;\n  setConfig: (config: Config) => Config;\n} & {\n  [K in HttpMethod]: MethodFn;\n} & ([SseFn] extends [never] ? { sse?: never } : { sse: { [K in HttpMethod]: SseFn } });\n\nexport interface Config {\n  /**\n   * Auth token or a function returning auth token. The resolved value will be\n   * added to the request payload as defined by its `security` array.\n   */\n  auth?: ((auth: Auth) => Promise<AuthToken> | AuthToken) | AuthToken;\n  /**\n   * A function for serializing request body parameter. By default,\n   * {@link JSON.stringify()} will be used.\n   */\n  bodySerializer?: BodySerializer | null;\n  /**\n   * An object containing any HTTP headers that you want to pre-populate your\n   * `Headers` object with.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/Headers/Headers#init See more}\n   */\n  headers?:\n    | RequestInit['headers']\n    | Record<\n        string,\n        string | number | boolean | (string | number | boolean)[] | null | undefined | unknown\n      >;\n  /**\n   * The request method.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/fetch#method See more}\n   */\n  method?: Uppercase<HttpMethod>;\n  /**\n   * A function for serializing request query parameters. By default, arrays\n   * will be exploded in form style, objects will be exploded in deepObject\n   * style, and reserved characters are percent-encoded.\n   *\n   * This method will have no effect if the native `paramsSerializer()` Axios\n   * API function is used.\n   *\n   * {@link https://swagger.io/docs/specification/serialization/#query View examples}\n   */\n  querySerializer?: QuerySerializer | QuerySerializerOptions;\n  /**\n   * A function validating request data. This is useful if you want to ensure\n   * the request conforms to the desired shape, so it can be safely sent to\n   * the server.\n   */\n  requestValidator?: (data: unknown) => Promise<unknown>;\n  /**\n   * A function transforming response data before it's returned. This is useful\n   * for post-processing data, e.g. converting ISO strings into Date objects.\n   */\n  responseTransformer?: (data: unknown) => Promise<unknown>;\n  /**\n   * A function validating response data. This is useful if you want to ensure\n   * the response conforms to the desired shape, so it can be safely passed to\n   * the transformers and returned to the user.\n   */\n  responseValidator?: (data: unknown) => Promise<unknown>;\n}\n\ntype IsExactlyNeverOrNeverUndefined<T> = [T] extends [never]\n  ? true\n  : [T] extends [never | undefined]\n    ? [undefined] extends [T]\n      ? false\n      : true\n    : false;\n\nexport type OmitNever<T extends Record<string, unknown>> = {\n  [K in keyof T as IsExactlyNeverOrNeverUndefined<T[K]> extends true ? never : K]: T[K];\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-angular/base-url-false/core/utils.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-angular/base-url-false/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type { _3eNum1Период, _400, AdditionalPropertiesIntegerIssue, AdditionalPropertiesUnknownIssue, AdditionalPropertiesUnknownIssue2, AdditionalPropertiesUnknownIssue3, AdditionalPropertiesUnknownIssueWritable, AnyOfAnyAndNull, AnyOfArrays, ApiVVersionODataControllerCountData, ApiVVersionODataControllerCountResponse, ApiVVersionODataControllerCountResponses, ArrayWithAnyOfProperties, ArrayWithArray, ArrayWithBooleans, ArrayWithNumbers, ArrayWithProperties, ArrayWithReferences, ArrayWithStrings, CallToTestOrderOfParamsData, CallWithDefaultOptionalParametersData, CallWithDefaultParametersData, CallWithDescriptionsData, CallWithDuplicateResponsesData, CallWithDuplicateResponsesError, CallWithDuplicateResponsesErrors, CallWithDuplicateResponsesResponse, CallWithDuplicateResponsesResponses, CallWithNoContentResponseData, CallWithNoContentResponseResponse, CallWithNoContentResponseResponses, CallWithParametersData, CallWithResponseAndNoContentResponseData, CallWithResponseAndNoContentResponseResponse, CallWithResponseAndNoContentResponseResponses, CallWithResponseData, CallWithResponseResponse, CallWithResponseResponses, CallWithResponsesData, CallWithResponsesError, CallWithResponsesErrors, CallWithResponsesResponse, CallWithResponsesResponses, CallWithResultFromHeaderData, CallWithResultFromHeaderErrors, CallWithResultFromHeaderResponses, CallWithWeirdParameterNamesData, CamelCaseCommentWithBreaks, CharactersInDescription, ClientOptions, CollectionFormatData, CommentWithBackticks, CommentWithBackticksAndQuotes, CommentWithBreaks, CommentWithExpressionPlaceholders, CommentWithQuotes, CommentWithReservedCharacters, CommentWithSlashes, ComplexParamsData, ComplexParamsResponse, ComplexParamsResponses, ComplexTypesData, ComplexTypesErrors, ComplexTypesResponse, ComplexTypesResponses, CompositionBaseModel, CompositionExtendedModel, CompositionWithAllOfAndNullable, CompositionWithAnyOf, CompositionWithAnyOfAndNullable, CompositionWithAnyOfAnonymous, CompositionWithNestedAnyAndTypeNull, CompositionWithNestedAnyOfAndNull, CompositionWithOneOf, CompositionWithOneOfAndComplexArrayDictionary, CompositionWithOneOfAndNullable, CompositionWithOneOfAndProperties, CompositionWithOneOfAndSimpleArrayDictionary, CompositionWithOneOfAndSimpleDictionary, CompositionWithOneOfAnonymous, CompositionWithOneOfDiscriminator, ConstValue, Default, DeleteCallWithoutParametersAndResponseData, DeleteFooData, DeleteFooData2, DeleteFooData3, DeprecatedCallData, DeprecatedModel, DictionaryWithArray, DictionaryWithDictionary, DictionaryWithProperties, DictionaryWithPropertiesAndAdditionalProperties, DictionaryWithReference, DictionaryWithString, DummyAData, DummyAResponse, DummyAResponses, DummyBData, DummyBResponse, DummyBResponses, DuplicateName2Data, DuplicateName3Data, DuplicateName4Data, DuplicateNameData, EnumFromDescription, EnumWithExtensions, EnumWithNumbers, EnumWithReplacedCharacters, EnumWithStrings, EnumWithXEnumNames, ExportData, ExternalRefA, ExternalRefB, ExternalSharedModel, File, FileResponseData, FileResponseResponse, FileResponseResponses, FileWritable, FooWowData, FooWowResponses, FreeFormObjectWithAdditionalPropertiesEqEmptyObject, FreeFormObjectWithAdditionalPropertiesEqTrue, FreeFormObjectWithoutAdditionalProperties, GenericSchemaDuplicateIssue1SystemBoolean, GenericSchemaDuplicateIssue1SystemBooleanWritable, GenericSchemaDuplicateIssue1SystemString, GenericSchemaDuplicateIssue1SystemStringWritable, GetApiVbyApiVersionSimpleOperationData, GetApiVbyApiVersionSimpleOperationError, GetApiVbyApiVersionSimpleOperationErrors, GetApiVbyApiVersionSimpleOperationResponse, GetApiVbyApiVersionSimpleOperationResponses, GetCallWithOptionalParamData, GetCallWithoutParametersAndResponseData, HeadCallWithoutParametersAndResponseData, Import, ImportData, ImportResponse, ImportResponses, IoK8sApimachineryPkgApisMetaV1DeleteOptions, IoK8sApimachineryPkgApisMetaV1Preconditions, ModelCircle, ModelFromZendesk, ModelSquare, ModelThatExtends, ModelThatExtendsExtends, ModelWithAdditionalPropertiesEqTrue, ModelWithAdditionalPropertiesRef, ModelWithAnyOfConstantSizeArray, ModelWithAnyOfConstantSizeArrayAndIntersect, ModelWithAnyOfConstantSizeArrayNullable, ModelWithAnyOfConstantSizeArrayWithNSizeAndOptions, ModelWithAnyOfConstantSizeArrayWithNSizeAndOptionsWritable, ModelWithArray, ModelWithArrayReadOnlyAndWriteOnly, ModelWithArrayReadOnlyAndWriteOnlyWritable, ModelWithBackticksInDescription, ModelWithBoolean, ModelWithCircularReference, ModelWithConst, ModelWithConstantSizeArray, ModelWithDictionary, ModelWithDuplicateImports, ModelWithDuplicateProperties, ModelWithEnum, ModelWithEnumFromDescription, ModelWithEnumWithHyphen, ModelWithInteger, ModelWithNestedArrayEnums, ModelWithNestedArrayEnumsData, ModelWithNestedArrayEnumsDataBar, ModelWithNestedArrayEnumsDataFoo, ModelWithNestedCompositionEnums, ModelWithNestedEnums, ModelWithNestedProperties, ModelWithNullableObject, ModelWithNullableString, ModelWithNumericEnumUnion, ModelWithOneOfAndProperties, ModelWithOneOfEnum, ModelWithOrderedProperties, ModelWithPattern, ModelWithPatternWritable, ModelWithPrefixItemsConstantSizeArray, ModelWithProperties, ModelWithPropertiesWritable, ModelWithReadOnlyAndWriteOnly, ModelWithReadOnlyAndWriteOnlyWritable, ModelWithReference, ModelWithReferenceWritable, ModelWithString, ModelWithStringError, MultipartRequestData, MultipartResponseData, MultipartResponseResponse, MultipartResponseResponses, NestedAnyOfArraysNullable, NonAsciiæøåÆøÅöôêÊ字符串Data, NonAsciiæøåÆøÅöôêÊ字符串Response, NonAsciiæøåÆøÅöôêÊ字符串Responses, NonAsciiStringæøåÆøÅöôêÊ字符串, NullableObject, OneOfAllOfIssue, OneOfAllOfIssueWritable, OptionsCallWithoutParametersAndResponseData, Pageable, ParameterSimpleParameterUnused, PatchApiVbyApiVersionNoTagData, PatchApiVbyApiVersionNoTagResponses, PatchCallWithoutParametersAndResponseData, PostApiVbyApiVersionFormDataData, PostApiVbyApiVersionRequestBodyData, PostCallWithOptionalParamData, PostCallWithOptionalParamResponse, PostCallWithOptionalParamResponses, PostCallWithoutParametersAndResponseData, PostServiceWithEmptyTagResponse, PostServiceWithEmptyTagResponse2, PutCallWithoutParametersAndResponseData, PutWithFormUrlEncodedData, SchemaWithFormRestrictedKeys, SimpleBoolean, SimpleFile, SimpleFormData, SimpleInteger, SimpleParameter, SimpleReference, SimpleRequestBody, SimpleString, SimpleStringWithPattern, TestErrorCodeData, TestErrorCodeErrors, TestErrorCodeResponses, TypesData, TypesResponse, TypesResponses, UploadFileData, UploadFileResponse, UploadFileResponses, XFooBar } from './types.gen';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-angular/base-url-false/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type ClientOptions = {\n    baseUrl: 'http://localhost:3000/base' | (string & {});\n};\n\n/**\n * Model with number-only name\n */\nexport type _400 = string;\n\n/**\n * External ref to shared model (A)\n */\nexport type ExternalRefA = ExternalSharedModel;\n\n/**\n * External ref to shared model (B)\n */\nexport type ExternalRefB = ExternalSharedModel;\n\n/**\n * Testing multiline comments in string: First line\n * Second line\n *\n * Fourth line\n */\nexport type CamelCaseCommentWithBreaks = number;\n\n/**\n * Testing multiline comments in string: First line\n * Second line\n *\n * Fourth line\n */\nexport type CommentWithBreaks = number;\n\n/**\n * Testing backticks in string: `backticks` and ```multiple backticks``` should work\n */\nexport type CommentWithBackticks = number;\n\n/**\n * Testing backticks and quotes in string: `backticks`, 'quotes', \"double quotes\" and ```multiple backticks``` should work\n */\nexport type CommentWithBackticksAndQuotes = number;\n\n/**\n * Testing slashes in string: \\backwards\\\\\\ and /forwards/// should work\n */\nexport type CommentWithSlashes = number;\n\n/**\n * Testing expression placeholders in string: ${expression} should work\n */\nexport type CommentWithExpressionPlaceholders = number;\n\n/**\n * Testing quotes in string: 'single quote''' and \"double quotes\"\"\" should work\n */\nexport type CommentWithQuotes = number;\n\n/**\n * Testing reserved characters in string: * inline * and ** inline ** should work\n */\nexport type CommentWithReservedCharacters = number;\n\n/**\n * This is a simple number\n */\nexport type SimpleInteger = number;\n\n/**\n * This is a simple boolean\n */\nexport type SimpleBoolean = boolean;\n\n/**\n * This is a simple string\n */\nexport type SimpleString = string;\n\n/**\n * A string with non-ascii (unicode) characters valid in typescript identifiers (æøåÆØÅöÔèÈ字符串)\n */\nexport type NonAsciiStringæøåÆøÅöôêÊ字符串 = string;\n\n/**\n * This is a simple file\n */\nexport type SimpleFile = Blob | File;\n\n/**\n * This is a simple reference\n */\nexport type SimpleReference = ModelWithString;\n\n/**\n * This is a simple string\n */\nexport type SimpleStringWithPattern = string | null;\n\n/**\n * This is a simple enum with strings\n */\nexport type EnumWithStrings = 'Success' | 'Warning' | 'Error' | '\\'Single Quote\\'' | '\"Double Quotes\"' | 'Non-ascii: øæåôöØÆÅÔÖ字符串';\n\nexport type EnumWithReplacedCharacters = '\\'Single Quote\\'' | '\"Double Quotes\"' | 'øæåôöØÆÅÔÖ字符串' | 3.1 | '';\n\n/**\n * This is a simple enum with numbers\n */\nexport type EnumWithNumbers = 1 | 2 | 3 | 1.1 | 1.2 | 1.3 | 100 | 200 | 300 | -100 | -200 | -300 | -1.1 | -1.2 | -1.3;\n\n/**\n * Success=1,Warning=2,Error=3\n */\nexport type EnumFromDescription = number;\n\n/**\n * This is a simple enum with numbers\n */\nexport type EnumWithExtensions = 200 | 400 | 500;\n\nexport type EnumWithXEnumNames = 0 | 1 | 2;\n\n/**\n * This is a simple array with numbers\n */\nexport type ArrayWithNumbers = Array<number>;\n\n/**\n * This is a simple array with booleans\n */\nexport type ArrayWithBooleans = Array<boolean>;\n\n/**\n * This is a simple array with strings\n */\nexport type ArrayWithStrings = Array<string>;\n\n/**\n * This is a simple array with references\n */\nexport type ArrayWithReferences = Array<ModelWithString>;\n\n/**\n * This is a simple array containing an array\n */\nexport type ArrayWithArray = Array<Array<ModelWithString>>;\n\n/**\n * This is a simple array with properties\n */\nexport type ArrayWithProperties = Array<{\n    '16x16'?: CamelCaseCommentWithBreaks;\n    bar?: string;\n}>;\n\n/**\n * This is a simple array with any of properties\n */\nexport type ArrayWithAnyOfProperties = Array<{\n    foo?: string;\n} | {\n    bar?: string;\n}>;\n\nexport type AnyOfAnyAndNull = {\n    data?: unknown | null;\n};\n\n/**\n * This is a simple array with any of properties\n */\nexport type AnyOfArrays = {\n    results?: Array<{\n        foo?: string;\n    } | {\n        bar?: string;\n    }>;\n};\n\n/**\n * This is a string dictionary\n */\nexport type DictionaryWithString = {\n    [key: string]: string;\n};\n\nexport type DictionaryWithPropertiesAndAdditionalProperties = {\n    foo?: number;\n    bar?: boolean;\n    [key: string]: string | number | boolean | undefined;\n};\n\n/**\n * This is a string reference\n */\nexport type DictionaryWithReference = {\n    [key: string]: ModelWithString;\n};\n\n/**\n * This is a complex dictionary\n */\nexport type DictionaryWithArray = {\n    [key: string]: Array<ModelWithString>;\n};\n\n/**\n * This is a string dictionary\n */\nexport type DictionaryWithDictionary = {\n    [key: string]: {\n        [key: string]: string;\n    };\n};\n\n/**\n * This is a complex dictionary\n */\nexport type DictionaryWithProperties = {\n    [key: string]: {\n        foo?: string;\n        bar?: string;\n    };\n};\n\n/**\n * This is a model with one number property\n */\nexport type ModelWithInteger = {\n    /**\n     * This is a simple number property\n     */\n    prop?: number;\n};\n\n/**\n * This is a model with one boolean property\n */\nexport type ModelWithBoolean = {\n    /**\n     * This is a simple boolean property\n     */\n    prop?: boolean;\n};\n\n/**\n * This is a model with one string property\n */\nexport type ModelWithString = {\n    /**\n     * This is a simple string property\n     */\n    prop?: string;\n};\n\n/**\n * This is a model with one string property\n */\nexport type ModelWithStringError = {\n    /**\n     * This is a simple string property\n     */\n    prop?: string;\n};\n\n/**\n * `Comment` or `VoiceComment`. The JSON object for adding voice comments to tickets is different. See [Adding voice comments to tickets](/documentation/ticketing/managing-tickets/adding-voice-comments-to-tickets)\n */\nexport type ModelFromZendesk = string;\n\n/**\n * This is a model with one string property\n */\nexport type ModelWithNullableString = {\n    /**\n     * This is a simple string property\n     */\n    nullableProp1?: string | null;\n    /**\n     * This is a simple string property\n     */\n    nullableRequiredProp1: string | null;\n    /**\n     * This is a simple string property\n     */\n    nullableProp2?: string | null;\n    /**\n     * This is a simple string property\n     */\n    nullableRequiredProp2: string | null;\n    /**\n     * This is a simple enum with strings\n     */\n    'foo_bar-enum'?: 'Success' | 'Warning' | 'Error' | 'ØÆÅ字符串';\n};\n\n/**\n * This is a model with one enum\n */\nexport type ModelWithEnum = {\n    /**\n     * This is a simple enum with strings\n     */\n    'foo_bar-enum'?: 'Success' | 'Warning' | 'Error' | 'ØÆÅ字符串';\n    /**\n     * These are the HTTP error code enums\n     */\n    statusCode?: '100' | '200 FOO' | '300 FOO_BAR' | '400 foo-bar' | '500 foo.bar' | '600 foo&bar';\n    /**\n     * Simple boolean enum\n     */\n    bool?: true;\n};\n\n/**\n * This is a model with one enum with escaped name\n */\nexport type ModelWithEnumWithHyphen = {\n    /**\n     * Foo-Bar-Baz-Qux\n     */\n    'foo-bar-baz-qux'?: '3.0';\n};\n\n/**\n * This is a model with one enum\n */\nexport type ModelWithEnumFromDescription = {\n    /**\n     * Success=1,Warning=2,Error=3\n     */\n    test?: number;\n};\n\n/**\n * This is a model with nested enums\n */\nexport type ModelWithNestedEnums = {\n    dictionaryWithEnum?: {\n        [key: string]: 'Success' | 'Warning' | 'Error';\n    };\n    dictionaryWithEnumFromDescription?: {\n        [key: string]: number;\n    };\n    arrayWithEnum?: Array<'Success' | 'Warning' | 'Error'>;\n    arrayWithDescription?: Array<number>;\n    /**\n     * This is a simple enum with strings\n     */\n    'foo_bar-enum'?: 'Success' | 'Warning' | 'Error' | 'ØÆÅ字符串';\n};\n\n/**\n * This is a model with one property containing a reference\n */\nexport type ModelWithReference = {\n    prop?: ModelWithProperties;\n};\n\n/**\n * This is a model with one property containing an array\n */\nexport type ModelWithArrayReadOnlyAndWriteOnly = {\n    prop?: Array<ModelWithReadOnlyAndWriteOnly>;\n    propWithFile?: Array<Blob | File>;\n    propWithNumber?: Array<number>;\n};\n\n/**\n * This is a model with one property containing an array\n */\nexport type ModelWithArray = {\n    prop?: Array<ModelWithString>;\n    propWithFile?: Array<Blob | File>;\n    propWithNumber?: Array<number>;\n};\n\n/**\n * This is a model with one property containing a dictionary\n */\nexport type ModelWithDictionary = {\n    prop?: {\n        [key: string]: string;\n    };\n};\n\n/**\n * This is a deprecated model with a deprecated property\n *\n * @deprecated\n */\nexport type DeprecatedModel = {\n    /**\n     * This is a deprecated property\n     *\n     * @deprecated\n     */\n    prop?: string;\n};\n\n/**\n * This is a model with one property containing a circular reference\n */\nexport type ModelWithCircularReference = {\n    prop?: ModelWithCircularReference;\n};\n\n/**\n * This is a model with one property with a 'one of' relationship\n */\nexport type CompositionWithOneOf = {\n    propA?: ModelWithString | ModelWithEnum | ModelWithArray | ModelWithDictionary;\n};\n\n/**\n * This is a model with one property with a 'one of' relationship where the options are not $ref\n */\nexport type CompositionWithOneOfAnonymous = {\n    propA?: {\n        propA?: string;\n    } | string | number;\n};\n\n/**\n * Circle\n */\nexport type ModelCircle = {\n    kind: string;\n    radius?: number;\n};\n\n/**\n * Square\n */\nexport type ModelSquare = {\n    kind: string;\n    sideLength?: number;\n};\n\n/**\n * This is a model with one property with a 'one of' relationship where the options are not $ref\n */\nexport type CompositionWithOneOfDiscriminator = ({\n    kind: 'circle';\n} & ModelCircle) | ({\n    kind: 'square';\n} & ModelSquare);\n\n/**\n * This is a model with one property with a 'any of' relationship\n */\nexport type CompositionWithAnyOf = {\n    propA?: ModelWithString | ModelWithEnum | ModelWithArray | ModelWithDictionary;\n};\n\n/**\n * This is a model with one property with a 'any of' relationship where the options are not $ref\n */\nexport type CompositionWithAnyOfAnonymous = {\n    propA?: {\n        propA?: string;\n    } | string | number;\n};\n\n/**\n * This is a model with nested 'any of' property with a type null\n */\nexport type CompositionWithNestedAnyAndTypeNull = {\n    propA?: Array<ModelWithDictionary | null> | Array<ModelWithArray | null>;\n};\n\nexport type _3eNum1Период = 'Bird' | 'Dog';\n\nexport type ConstValue = 'ConstValue';\n\n/**\n * This is a model with one property with a 'any of' relationship where the options are not $ref\n */\nexport type CompositionWithNestedAnyOfAndNull = {\n    /**\n     * Scopes\n     */\n    propA?: Array<_3eNum1Период | ConstValue> | null;\n};\n\n/**\n * This is a model with one property with a 'one of' relationship\n */\nexport type CompositionWithOneOfAndNullable = {\n    propA?: {\n        boolean?: boolean;\n    } | ModelWithEnum | ModelWithArray | ModelWithDictionary | null;\n};\n\n/**\n * This is a model that contains a simple dictionary within composition\n */\nexport type CompositionWithOneOfAndSimpleDictionary = {\n    propA?: boolean | {\n        [key: string]: number;\n    };\n};\n\n/**\n * This is a model that contains a dictionary of simple arrays within composition\n */\nexport type CompositionWithOneOfAndSimpleArrayDictionary = {\n    propA?: boolean | {\n        [key: string]: Array<boolean>;\n    };\n};\n\n/**\n * This is a model that contains a dictionary of complex arrays (composited) within composition\n */\nexport type CompositionWithOneOfAndComplexArrayDictionary = {\n    propA?: boolean | {\n        [key: string]: Array<number | string>;\n    };\n};\n\n/**\n * This is a model with one property with a 'all of' relationship\n */\nexport type CompositionWithAllOfAndNullable = {\n    propA?: ({\n        boolean?: boolean;\n    } & ModelWithEnum & ModelWithArray & ModelWithDictionary) | null;\n};\n\n/**\n * This is a model with one property with a 'any of' relationship\n */\nexport type CompositionWithAnyOfAndNullable = {\n    propA?: {\n        boolean?: boolean;\n    } | ModelWithEnum | ModelWithArray | ModelWithDictionary | null;\n};\n\n/**\n * This is a base model with two simple optional properties\n */\nexport type CompositionBaseModel = {\n    firstName?: string;\n    lastname?: string;\n};\n\n/**\n * This is a model that extends the base model\n */\nexport type CompositionExtendedModel = CompositionBaseModel & {\n    age: number;\n    firstName: string;\n    lastname: string;\n};\n\n/**\n * This is a model with one nested property\n */\nexport type ModelWithProperties = {\n    required: string;\n    readonly requiredAndReadOnly: string;\n    requiredAndNullable: string | null;\n    string?: string;\n    number?: number;\n    boolean?: boolean;\n    reference?: ModelWithString;\n    'property with space'?: string;\n    default?: string;\n    try?: string;\n    readonly '@namespace.string'?: string;\n    readonly '@namespace.integer'?: number;\n};\n\n/**\n * This is a model with one nested property\n */\nexport type ModelWithNestedProperties = {\n    readonly first: {\n        readonly second: {\n            readonly third: string | null;\n        } | null;\n    } | null;\n};\n\n/**\n * This is a model with duplicated properties\n */\nexport type ModelWithDuplicateProperties = {\n    prop?: ModelWithString;\n};\n\n/**\n * This is a model with ordered properties\n */\nexport type ModelWithOrderedProperties = {\n    zebra?: string;\n    apple?: string;\n    hawaii?: string;\n};\n\n/**\n * This is a model with duplicated imports\n */\nexport type ModelWithDuplicateImports = {\n    propA?: ModelWithString;\n    propB?: ModelWithString;\n    propC?: ModelWithString;\n};\n\n/**\n * This is a model that extends another model\n */\nexport type ModelThatExtends = ModelWithString & {\n    propExtendsA?: string;\n    propExtendsB?: ModelWithString;\n};\n\n/**\n * This is a model that extends another model\n */\nexport type ModelThatExtendsExtends = ModelWithString & ModelThatExtends & {\n    propExtendsC?: string;\n    propExtendsD?: ModelWithString;\n};\n\n/**\n * This is a model that contains a some patterns\n */\nexport type ModelWithPattern = {\n    key: string;\n    name: string;\n    readonly enabled?: boolean;\n    readonly modified?: string;\n    id?: string;\n    text?: string;\n    patternWithSingleQuotes?: string;\n    patternWithNewline?: string;\n    patternWithBacktick?: string;\n    patternWithUnicode?: string;\n};\n\nexport type File = {\n    /**\n     * Id\n     */\n    readonly id?: string;\n    /**\n     * Updated at\n     */\n    readonly updated_at?: string;\n    /**\n     * Created at\n     */\n    readonly created_at?: string;\n    /**\n     * Mime\n     */\n    mime: string;\n    /**\n     * File\n     */\n    readonly file?: string;\n};\n\nexport type Default = {\n    name?: string;\n};\n\nexport type Pageable = {\n    page?: number;\n    size?: number;\n    sort?: Array<string>;\n};\n\n/**\n * This is a free-form object without additionalProperties.\n */\nexport type FreeFormObjectWithoutAdditionalProperties = {\n    [key: string]: unknown;\n};\n\n/**\n * This is a free-form object with additionalProperties: true.\n */\nexport type FreeFormObjectWithAdditionalPropertiesEqTrue = {\n    [key: string]: unknown;\n};\n\n/**\n * This is a free-form object with additionalProperties: {}.\n */\nexport type FreeFormObjectWithAdditionalPropertiesEqEmptyObject = {\n    [key: string]: unknown;\n};\n\nexport type ModelWithConst = {\n    String?: 'String';\n    number?: 0;\n    null?: null;\n    withType?: 'Some string';\n};\n\n/**\n * This is a model with one property and additionalProperties: true\n */\nexport type ModelWithAdditionalPropertiesEqTrue = {\n    /**\n     * This is a simple string property\n     */\n    prop?: string;\n    [key: string]: unknown;\n};\n\nexport type NestedAnyOfArraysNullable = {\n    nullableArray?: Array<string | boolean> | null;\n};\n\nexport type CompositionWithOneOfAndProperties = ({\n    foo: SimpleParameter;\n} | {\n    bar: NonAsciiStringæøåÆøÅöôêÊ字符串;\n}) & {\n    baz: number | null;\n    qux: number;\n};\n\n/**\n * An object that can be null\n */\nexport type NullableObject = {\n    foo?: string;\n} | null;\n\n/**\n * Some % character\n */\nexport type CharactersInDescription = string;\n\nexport type ModelWithNullableObject = {\n    data?: NullableObject;\n};\n\n/**\n * An object with additional properties that can be null (anyOf ref + null)\n */\nexport type ModelWithAdditionalPropertiesRef = {\n    [key: string]: NullableObject | null;\n};\n\nexport type ModelWithOneOfEnum = {\n    foo: 'Bar';\n} | {\n    foo: 'Baz';\n} | {\n    foo: 'Qux';\n} | {\n    content: string;\n    foo: 'Quux';\n} | {\n    content: [\n        string,\n        string\n    ];\n    foo: 'Corge';\n};\n\nexport type ModelWithNestedArrayEnumsDataFoo = 'foo' | 'bar';\n\nexport type ModelWithNestedArrayEnumsDataBar = 'baz' | 'qux';\n\nexport type ModelWithNestedArrayEnumsData = {\n    foo?: Array<ModelWithNestedArrayEnumsDataFoo>;\n    bar?: Array<ModelWithNestedArrayEnumsDataBar>;\n};\n\nexport type ModelWithNestedArrayEnums = {\n    array_strings?: Array<string>;\n    data?: ModelWithNestedArrayEnumsData;\n};\n\nexport type ModelWithNestedCompositionEnums = {\n    foo?: ModelWithNestedArrayEnumsDataFoo;\n};\n\nexport type ModelWithReadOnlyAndWriteOnly = {\n    foo: string;\n    readonly bar: string;\n};\n\nexport type ModelWithConstantSizeArray = [\n    number,\n    number\n];\n\nexport type ModelWithAnyOfConstantSizeArray = [\n    number | string,\n    number | string,\n    number | string\n];\n\nexport type ModelWithPrefixItemsConstantSizeArray = [\n    ModelWithInteger,\n    number | string,\n    string\n];\n\nexport type ModelWithAnyOfConstantSizeArrayNullable = [\n    number | null | string,\n    number | null | string,\n    number | null | string\n];\n\nexport type ModelWithAnyOfConstantSizeArrayWithNSizeAndOptions = [\n    number | Import,\n    number | Import\n];\n\nexport type ModelWithAnyOfConstantSizeArrayAndIntersect = [\n    number & string,\n    number & string\n];\n\nexport type ModelWithNumericEnumUnion = {\n    /**\n     * Период\n     */\n    value?: -10 | -1 | 0 | 1 | 3 | 6 | 12;\n};\n\n/**\n * Some description with `back ticks`\n */\nexport type ModelWithBackticksInDescription = {\n    /**\n     * The template `that` should be used for parsing and importing the contents of the CSV file.\n     *\n     * <br/><p>There is one placeholder currently supported:<ul>     <li><b>${x}</b> - refers to the n-th column in the CSV file, e.g. ${1}, ${2}, ...)</li></ul><p>Example of a correct JSON template:</p>\n     * <pre>\n     * [\n     * {\n     * \"resourceType\": \"Asset\",\n     * \"identifier\": {\n     * \"name\": \"${1}\",\n     * \"domain\": {\n     * \"name\": \"${2}\",\n     * \"community\": {\n     * \"name\": \"Some Community\"\n     * }\n     * }\n     * },\n     * \"attributes\" : {\n     * \"00000000-0000-0000-0000-000000003115\" : [ {\n     * \"value\" : \"${3}\"\n     * } ],\n     * \"00000000-0000-0000-0000-000000000222\" : [ {\n     * \"value\" : \"${4}\"\n     * } ]\n     * }\n     * }\n     * ]\n     * </pre>\n     */\n    template?: string;\n};\n\nexport type ModelWithOneOfAndProperties = (SimpleParameter | NonAsciiStringæøåÆøÅöôêÊ字符串) & {\n    baz: number | null;\n    qux: number;\n};\n\n/**\n * Model used to test deduplication strategy (unused)\n */\nexport type ParameterSimpleParameterUnused = string;\n\n/**\n * Model used to test deduplication strategy\n */\nexport type PostServiceWithEmptyTagResponse = string;\n\n/**\n * Model used to test deduplication strategy\n */\nexport type PostServiceWithEmptyTagResponse2 = string;\n\n/**\n * Model used to test deduplication strategy\n */\nexport type DeleteFooData = string;\n\n/**\n * Model used to test deduplication strategy\n */\nexport type DeleteFooData2 = string;\n\n/**\n * Model with restricted keyword name\n */\nexport type Import = string;\n\nexport type SchemaWithFormRestrictedKeys = {\n    description?: string;\n    'x-enum-descriptions'?: string;\n    'x-enum-varnames'?: string;\n    'x-enumNames'?: string;\n    title?: string;\n    object?: {\n        description?: string;\n        'x-enum-descriptions'?: string;\n        'x-enum-varnames'?: string;\n        'x-enumNames'?: string;\n        title?: string;\n    };\n    array?: Array<{\n        description?: string;\n        'x-enum-descriptions'?: string;\n        'x-enum-varnames'?: string;\n        'x-enumNames'?: string;\n        title?: string;\n    }>;\n};\n\n/**\n * This schema was giving PascalCase transformations a hard time\n */\nexport type IoK8sApimachineryPkgApisMetaV1DeleteOptions = {\n    /**\n     * Must be fulfilled before a deletion is carried out. If not possible, a 409 Conflict status will be returned.\n     */\n    preconditions?: IoK8sApimachineryPkgApisMetaV1Preconditions;\n};\n\n/**\n * This schema was giving PascalCase transformations a hard time\n */\nexport type IoK8sApimachineryPkgApisMetaV1Preconditions = {\n    /**\n     * Specifies the target ResourceVersion\n     */\n    resourceVersion?: string;\n    /**\n     * Specifies the target UID.\n     */\n    uid?: string;\n};\n\nexport type AdditionalPropertiesUnknownIssue = {\n    [key: string]: string | number;\n};\n\nexport type AdditionalPropertiesUnknownIssue2 = {\n    [key: string]: string | number;\n};\n\nexport type AdditionalPropertiesUnknownIssue3 = string & {\n    entries: {\n        [key: string]: AdditionalPropertiesUnknownIssue;\n    };\n};\n\nexport type AdditionalPropertiesIntegerIssue = {\n    value: number;\n    [key: string]: number;\n};\n\nexport type OneOfAllOfIssue = ((ConstValue | GenericSchemaDuplicateIssue1SystemBoolean) & _3eNum1Период) | GenericSchemaDuplicateIssue1SystemString;\n\nexport type GenericSchemaDuplicateIssue1SystemBoolean = {\n    item?: boolean;\n    error?: string | null;\n    readonly hasError?: boolean;\n    data?: {\n        [key: string]: never;\n    };\n};\n\nexport type GenericSchemaDuplicateIssue1SystemString = {\n    item?: string | null;\n    error?: string | null;\n    readonly hasError?: boolean;\n};\n\nexport type ExternalSharedModel = {\n    id: string;\n    name?: string;\n};\n\n/**\n * This is a model with one property containing a reference\n */\nexport type ModelWithReferenceWritable = {\n    prop?: ModelWithPropertiesWritable;\n};\n\n/**\n * This is a model with one property containing an array\n */\nexport type ModelWithArrayReadOnlyAndWriteOnlyWritable = {\n    prop?: Array<ModelWithReadOnlyAndWriteOnlyWritable>;\n    propWithFile?: Array<Blob | File>;\n    propWithNumber?: Array<number>;\n};\n\n/**\n * This is a model with one nested property\n */\nexport type ModelWithPropertiesWritable = {\n    required: string;\n    requiredAndNullable: string | null;\n    string?: string;\n    number?: number;\n    boolean?: boolean;\n    reference?: ModelWithString;\n    'property with space'?: string;\n    default?: string;\n    try?: string;\n};\n\n/**\n * This is a model that contains a some patterns\n */\nexport type ModelWithPatternWritable = {\n    key: string;\n    name: string;\n    id?: string;\n    text?: string;\n    patternWithSingleQuotes?: string;\n    patternWithNewline?: string;\n    patternWithBacktick?: string;\n    patternWithUnicode?: string;\n};\n\nexport type FileWritable = {\n    /**\n     * Mime\n     */\n    mime: string;\n};\n\nexport type ModelWithReadOnlyAndWriteOnlyWritable = {\n    foo: string;\n    baz: string;\n};\n\nexport type ModelWithAnyOfConstantSizeArrayWithNSizeAndOptionsWritable = [\n    number | Import,\n    number | Import\n];\n\nexport type AdditionalPropertiesUnknownIssueWritable = {\n    [key: string]: string | number;\n};\n\nexport type OneOfAllOfIssueWritable = ((ConstValue | GenericSchemaDuplicateIssue1SystemBoolean) & _3eNum1Период) | GenericSchemaDuplicateIssue1SystemString;\n\nexport type GenericSchemaDuplicateIssue1SystemBooleanWritable = {\n    item?: boolean;\n    error?: string | null;\n    data?: {\n        [key: string]: never;\n    };\n};\n\nexport type GenericSchemaDuplicateIssue1SystemStringWritable = {\n    item?: string | null;\n    error?: string | null;\n};\n\n/**\n * This is a reusable parameter\n */\nexport type SimpleParameter = string;\n\n/**\n * Parameter with illegal characters\n */\nexport type XFooBar = ModelWithString;\n\n/**\n * A reusable request body\n */\nexport type SimpleRequestBody = ModelWithString;\n\n/**\n * A reusable request body\n */\nexport type SimpleFormData = ModelWithString;\n\nexport type ExportData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no+tag';\n};\n\nexport type PatchApiVbyApiVersionNoTagData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no+tag';\n};\n\nexport type PatchApiVbyApiVersionNoTagResponses = {\n    /**\n     * OK\n     */\n    default: unknown;\n};\n\nexport type ImportData = {\n    body: ModelWithReadOnlyAndWriteOnlyWritable | ModelWithArrayReadOnlyAndWriteOnlyWritable;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no+tag';\n};\n\nexport type ImportResponses = {\n    /**\n     * Success\n     */\n    200: ModelFromZendesk;\n    /**\n     * Default success response\n     */\n    default: ModelWithReadOnlyAndWriteOnly;\n};\n\nexport type ImportResponse = ImportResponses[keyof ImportResponses];\n\nexport type FooWowData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no+tag';\n};\n\nexport type FooWowResponses = {\n    /**\n     * OK\n     */\n    default: unknown;\n};\n\nexport type ApiVVersionODataControllerCountData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple/$count';\n};\n\nexport type ApiVVersionODataControllerCountResponses = {\n    /**\n     * Success\n     */\n    200: ModelFromZendesk;\n};\n\nexport type ApiVVersionODataControllerCountResponse = ApiVVersionODataControllerCountResponses[keyof ApiVVersionODataControllerCountResponses];\n\nexport type GetApiVbyApiVersionSimpleOperationData = {\n    body?: never;\n    path: {\n        /**\n         * foo in method\n         */\n        foo_param: string;\n    };\n    query?: never;\n    url: '/api/v{api-version}/simple:operation';\n};\n\nexport type GetApiVbyApiVersionSimpleOperationErrors = {\n    /**\n     * Default error response\n     */\n    default: ModelWithBoolean;\n};\n\nexport type GetApiVbyApiVersionSimpleOperationError = GetApiVbyApiVersionSimpleOperationErrors[keyof GetApiVbyApiVersionSimpleOperationErrors];\n\nexport type GetApiVbyApiVersionSimpleOperationResponses = {\n    /**\n     * Response is a simple number\n     */\n    200: number;\n};\n\nexport type GetApiVbyApiVersionSimpleOperationResponse = GetApiVbyApiVersionSimpleOperationResponses[keyof GetApiVbyApiVersionSimpleOperationResponses];\n\nexport type DeleteCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type GetCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type HeadCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type OptionsCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type PatchCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type PostCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type PutCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type DeleteFooData3 = {\n    body?: never;\n    headers: {\n        /**\n         * Parameter with illegal characters\n         */\n        'x-Foo-Bar': ModelWithString;\n    };\n    path: {\n        /**\n         * foo in method\n         */\n        foo_param: string;\n        /**\n         * bar in method\n         */\n        BarParam: string;\n    };\n    query?: never;\n    url: '/api/v{api-version}/foo/{foo_param}/bar/{BarParam}';\n};\n\nexport type CallWithDescriptionsData = {\n    body?: never;\n    path?: never;\n    query?: {\n        /**\n         * Testing multiline comments in string: First line\n         * Second line\n         *\n         * Fourth line\n         */\n        parameterWithBreaks?: string;\n        /**\n         * Testing backticks in string: `backticks` and ```multiple backticks``` should work\n         */\n        parameterWithBackticks?: string;\n        /**\n         * Testing slashes in string: \\backwards\\\\\\ and /forwards/// should work\n         */\n        parameterWithSlashes?: string;\n        /**\n         * Testing expression placeholders in string: ${expression} should work\n         */\n        parameterWithExpressionPlaceholders?: string;\n        /**\n         * Testing quotes in string: 'single quote''' and \"double quotes\"\"\" should work\n         */\n        parameterWithQuotes?: string;\n        /**\n         * Testing reserved characters in string: * inline * and ** inline ** should work\n         */\n        parameterWithReservedCharacters?: string;\n    };\n    url: '/api/v{api-version}/descriptions';\n};\n\nexport type DeprecatedCallData = {\n    body?: never;\n    headers: {\n        /**\n         * This parameter is deprecated\n         *\n         * @deprecated\n         */\n        parameter: DeprecatedModel | null;\n    };\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/parameters/deprecated';\n};\n\nexport type CallWithParametersData = {\n    /**\n     * This is the parameter that goes into the body\n     */\n    body: {\n        [key: string]: unknown;\n    } | null;\n    headers: {\n        /**\n         * This is the parameter that goes into the header\n         */\n        parameterHeader: string | null;\n    };\n    path: {\n        /**\n         * This is the parameter that goes into the path\n         */\n        parameterPath: string | null;\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string | null;\n    };\n    query: {\n        foo_ref_enum?: ModelWithNestedArrayEnumsDataFoo;\n        foo_all_of_enum: ModelWithNestedArrayEnumsDataFoo;\n        /**\n         * This is the parameter that goes into the query params\n         */\n        cursor: string | null;\n    };\n    url: '/api/v{api-version}/parameters/{parameterPath}';\n};\n\nexport type CallWithWeirdParameterNamesData = {\n    /**\n     * This is the parameter that goes into the body\n     */\n    body: ModelWithString | null;\n    headers: {\n        /**\n         * This is the parameter that goes into the request header\n         */\n        'parameter.header': string | null;\n    };\n    path: {\n        /**\n         * This is the parameter that goes into the path\n         */\n        'parameter.path.1'?: string;\n        /**\n         * This is the parameter that goes into the path\n         */\n        'parameter-path-2'?: string;\n        /**\n         * This is the parameter that goes into the path\n         */\n        'PARAMETER-PATH-3'?: string;\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string | null;\n    };\n    query: {\n        /**\n         * This is the parameter with a reserved keyword\n         */\n        default?: string;\n        /**\n         * This is the parameter that goes into the request query params\n         */\n        'parameter-query': string | null;\n    };\n    url: '/api/v{api-version}/parameters/{parameter.path.1}/{parameter-path-2}/{PARAMETER-PATH-3}';\n};\n\nexport type GetCallWithOptionalParamData = {\n    /**\n     * This is a required parameter\n     */\n    body: ModelWithOneOfEnum;\n    path?: never;\n    query?: {\n        /**\n         * This is an optional parameter\n         */\n        page?: number;\n    };\n    url: '/api/v{api-version}/parameters';\n};\n\nexport type PostCallWithOptionalParamData = {\n    /**\n     * This is an optional parameter\n     */\n    body?: {\n        offset?: number | null;\n    };\n    path?: never;\n    query: {\n        /**\n         * This is a required parameter\n         */\n        parameter: Pageable;\n    };\n    url: '/api/v{api-version}/parameters';\n};\n\nexport type PostCallWithOptionalParamResponses = {\n    /**\n     * Response is a simple number\n     */\n    200: number;\n    /**\n     * Success\n     */\n    204: void;\n};\n\nexport type PostCallWithOptionalParamResponse = PostCallWithOptionalParamResponses[keyof PostCallWithOptionalParamResponses];\n\nexport type PostApiVbyApiVersionRequestBodyData = {\n    /**\n     * A reusable request body\n     */\n    body?: SimpleRequestBody;\n    path?: never;\n    query?: {\n        /**\n         * This is a reusable parameter\n         */\n        parameter?: string;\n    };\n    url: '/api/v{api-version}/requestBody';\n};\n\nexport type PostApiVbyApiVersionFormDataData = {\n    /**\n     * A reusable request body\n     */\n    body?: SimpleFormData;\n    path?: never;\n    query?: {\n        /**\n         * This is a reusable parameter\n         */\n        parameter?: string;\n    };\n    url: '/api/v{api-version}/formData';\n};\n\nexport type CallWithDefaultParametersData = {\n    body?: never;\n    path?: never;\n    query?: {\n        /**\n         * This is a simple string with default value\n         */\n        parameterString?: string | null;\n        /**\n         * This is a simple number with default value\n         */\n        parameterNumber?: number | null;\n        /**\n         * This is a simple boolean with default value\n         */\n        parameterBoolean?: boolean | null;\n        /**\n         * This is a simple enum with default value\n         */\n        parameterEnum?: 'Success' | 'Warning' | 'Error';\n        /**\n         * This is a simple model with default value\n         */\n        parameterModel?: ModelWithString | null;\n    };\n    url: '/api/v{api-version}/defaults';\n};\n\nexport type CallWithDefaultOptionalParametersData = {\n    body?: never;\n    path?: never;\n    query?: {\n        /**\n         * This is a simple string that is optional with default value\n         */\n        parameterString?: string;\n        /**\n         * This is a simple number that is optional with default value\n         */\n        parameterNumber?: number;\n        /**\n         * This is a simple boolean that is optional with default value\n         */\n        parameterBoolean?: boolean;\n        /**\n         * This is a simple enum that is optional with default value\n         */\n        parameterEnum?: 'Success' | 'Warning' | 'Error';\n        /**\n         * This is a simple model that is optional with default value\n         */\n        parameterModel?: ModelWithString;\n    };\n    url: '/api/v{api-version}/defaults';\n};\n\nexport type CallToTestOrderOfParamsData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * This is a optional string with default\n         */\n        parameterOptionalStringWithDefault?: string;\n        /**\n         * This is a optional string with empty default\n         */\n        parameterOptionalStringWithEmptyDefault?: string;\n        /**\n         * This is a optional string with no default\n         */\n        parameterOptionalStringWithNoDefault?: string;\n        /**\n         * This is a string with default\n         */\n        parameterStringWithDefault: string;\n        /**\n         * This is a string with empty default\n         */\n        parameterStringWithEmptyDefault: string;\n        /**\n         * This is a string with no default\n         */\n        parameterStringWithNoDefault: string;\n        /**\n         * This is a string that can be null with no default\n         */\n        parameterStringNullableWithNoDefault?: string | null;\n        /**\n         * This is a string that can be null with default\n         */\n        parameterStringNullableWithDefault?: string | null;\n    };\n    url: '/api/v{api-version}/defaults';\n};\n\nexport type DuplicateNameData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/duplicate';\n};\n\nexport type DuplicateName2Data = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/duplicate';\n};\n\nexport type DuplicateName3Data = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/duplicate';\n};\n\nexport type DuplicateName4Data = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/duplicate';\n};\n\nexport type CallWithNoContentResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no-content';\n};\n\nexport type CallWithNoContentResponseResponses = {\n    /**\n     * Success\n     */\n    204: void;\n};\n\nexport type CallWithNoContentResponseResponse = CallWithNoContentResponseResponses[keyof CallWithNoContentResponseResponses];\n\nexport type CallWithResponseAndNoContentResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multiple-tags/response-and-no-content';\n};\n\nexport type CallWithResponseAndNoContentResponseResponses = {\n    /**\n     * Response is a simple number\n     */\n    200: number;\n    /**\n     * Success\n     */\n    204: void;\n};\n\nexport type CallWithResponseAndNoContentResponseResponse = CallWithResponseAndNoContentResponseResponses[keyof CallWithResponseAndNoContentResponseResponses];\n\nexport type DummyAData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multiple-tags/a';\n};\n\nexport type DummyAResponses = {\n    200: _400;\n};\n\nexport type DummyAResponse = DummyAResponses[keyof DummyAResponses];\n\nexport type DummyBData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multiple-tags/b';\n};\n\nexport type DummyBResponses = {\n    /**\n     * Success\n     */\n    204: void;\n};\n\nexport type DummyBResponse = DummyBResponses[keyof DummyBResponses];\n\nexport type CallWithResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/response';\n};\n\nexport type CallWithResponseResponses = {\n    default: Import;\n};\n\nexport type CallWithResponseResponse = CallWithResponseResponses[keyof CallWithResponseResponses];\n\nexport type CallWithDuplicateResponsesData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/response';\n};\n\nexport type CallWithDuplicateResponsesErrors = {\n    /**\n     * Message for 500 error\n     */\n    500: ModelWithStringError;\n    /**\n     * Message for 501 error\n     */\n    501: ModelWithStringError;\n    /**\n     * Message for 502 error\n     */\n    502: ModelWithStringError;\n    /**\n     * Message for 4XX errors\n     */\n    '4XX': DictionaryWithArray;\n    /**\n     * Default error response\n     */\n    default: ModelWithBoolean;\n};\n\nexport type CallWithDuplicateResponsesError = CallWithDuplicateResponsesErrors[keyof CallWithDuplicateResponsesErrors];\n\nexport type CallWithDuplicateResponsesResponses = {\n    /**\n     * Message for 200 response\n     */\n    200: ModelWithBoolean & ModelWithInteger;\n    /**\n     * Message for 201 response\n     */\n    201: ModelWithString;\n    /**\n     * Message for 202 response\n     */\n    202: ModelWithString;\n};\n\nexport type CallWithDuplicateResponsesResponse = CallWithDuplicateResponsesResponses[keyof CallWithDuplicateResponsesResponses];\n\nexport type CallWithResponsesData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/response';\n};\n\nexport type CallWithResponsesErrors = {\n    /**\n     * Message for 500 error\n     */\n    500: ModelWithStringError;\n    /**\n     * Message for 501 error\n     */\n    501: ModelWithStringError;\n    /**\n     * Message for 502 error\n     */\n    502: ModelWithStringError;\n    /**\n     * Message for default response\n     */\n    default: ModelWithStringError;\n};\n\nexport type CallWithResponsesError = CallWithResponsesErrors[keyof CallWithResponsesErrors];\n\nexport type CallWithResponsesResponses = {\n    /**\n     * Message for 200 response\n     */\n    200: {\n        readonly '@namespace.string'?: string;\n        readonly '@namespace.integer'?: number;\n        readonly value?: Array<ModelWithString>;\n    };\n    /**\n     * Message for 201 response\n     */\n    201: ModelThatExtends;\n    /**\n     * Message for 202 response\n     */\n    202: ModelThatExtendsExtends;\n};\n\nexport type CallWithResponsesResponse = CallWithResponsesResponses[keyof CallWithResponsesResponses];\n\nexport type CollectionFormatData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * This is an array parameter that is sent as csv format (comma-separated values)\n         */\n        parameterArrayCSV: Array<string> | null;\n        /**\n         * This is an array parameter that is sent as ssv format (space-separated values)\n         */\n        parameterArraySSV: Array<string> | null;\n        /**\n         * This is an array parameter that is sent as tsv format (tab-separated values)\n         */\n        parameterArrayTSV: Array<string> | null;\n        /**\n         * This is an array parameter that is sent as pipes format (pipe-separated values)\n         */\n        parameterArrayPipes: Array<string> | null;\n        /**\n         * This is an array parameter that is sent as multi format (multiple parameter instances)\n         */\n        parameterArrayMulti: Array<string> | null;\n    };\n    url: '/api/v{api-version}/collectionFormat';\n};\n\nexport type TypesData = {\n    body?: never;\n    path?: {\n        /**\n         * This is a number parameter\n         */\n        id?: number;\n    };\n    query: {\n        /**\n         * This is a number parameter\n         */\n        parameterNumber: number;\n        /**\n         * This is a string parameter\n         */\n        parameterString: string | null;\n        /**\n         * This is a boolean parameter\n         */\n        parameterBoolean: boolean | null;\n        /**\n         * This is an object parameter\n         */\n        parameterObject: {\n            [key: string]: unknown;\n        } | null;\n        /**\n         * This is an array parameter\n         */\n        parameterArray: Array<string> | null;\n        /**\n         * This is a dictionary parameter\n         */\n        parameterDictionary: {\n            [key: string]: unknown;\n        } | null;\n        /**\n         * This is an enum parameter\n         */\n        parameterEnum: 'Success' | 'Warning' | 'Error' | null;\n    };\n    url: '/api/v{api-version}/types';\n};\n\nexport type TypesResponses = {\n    /**\n     * Response is a simple number\n     */\n    200: number;\n    /**\n     * Response is a simple string\n     */\n    201: string;\n    /**\n     * Response is a simple boolean\n     */\n    202: boolean;\n    /**\n     * Response is a simple object\n     */\n    203: {\n        [key: string]: unknown;\n    };\n};\n\nexport type TypesResponse = TypesResponses[keyof TypesResponses];\n\nexport type UploadFileData = {\n    body: Blob | File;\n    path: {\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string | null;\n    };\n    query?: never;\n    url: '/api/v{api-version}/upload';\n};\n\nexport type UploadFileResponses = {\n    200: boolean;\n};\n\nexport type UploadFileResponse = UploadFileResponses[keyof UploadFileResponses];\n\nexport type FileResponseData = {\n    body?: never;\n    path: {\n        id: string;\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string;\n    };\n    query?: never;\n    url: '/api/v{api-version}/file/{id}';\n};\n\nexport type FileResponseResponses = {\n    /**\n     * Success\n     */\n    200: Blob | File;\n};\n\nexport type FileResponseResponse = FileResponseResponses[keyof FileResponseResponses];\n\nexport type ComplexTypesData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * Parameter containing object\n         */\n        parameterObject: {\n            first?: {\n                second?: {\n                    third?: string;\n                };\n            };\n        };\n        /**\n         * Parameter containing reference\n         */\n        parameterReference: ModelWithString;\n    };\n    url: '/api/v{api-version}/complex';\n};\n\nexport type ComplexTypesErrors = {\n    /**\n     * 400 `server` error\n     */\n    400: unknown;\n    /**\n     * 500 server error\n     */\n    500: unknown;\n};\n\nexport type ComplexTypesResponses = {\n    /**\n     * Successful response\n     */\n    200: Array<ModelWithString>;\n};\n\nexport type ComplexTypesResponse = ComplexTypesResponses[keyof ComplexTypesResponses];\n\nexport type MultipartResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multipart';\n};\n\nexport type MultipartResponseResponses = {\n    /**\n     * OK\n     */\n    200: {\n        file?: Blob | File;\n        metadata?: {\n            foo?: string;\n            bar?: string;\n        };\n    };\n};\n\nexport type MultipartResponseResponse = MultipartResponseResponses[keyof MultipartResponseResponses];\n\nexport type MultipartRequestData = {\n    body?: {\n        content?: Blob | File;\n        data?: ModelWithString | null;\n    };\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multipart';\n};\n\nexport type ComplexParamsData = {\n    body?: {\n        readonly key: string | null;\n        name: string | null;\n        enabled?: boolean;\n        type: 'Monkey' | 'Horse' | 'Bird';\n        listOfModels?: Array<ModelWithString> | null;\n        listOfStrings?: Array<string> | null;\n        parameters: ModelWithString | ModelWithEnum | ModelWithArray | ModelWithDictionary;\n        readonly user?: {\n            readonly id?: number;\n            readonly name?: string | null;\n        };\n    };\n    path: {\n        id: number;\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string;\n    };\n    query?: never;\n    url: '/api/v{api-version}/complex/{id}';\n};\n\nexport type ComplexParamsResponses = {\n    /**\n     * Success\n     */\n    200: ModelWithString;\n};\n\nexport type ComplexParamsResponse = ComplexParamsResponses[keyof ComplexParamsResponses];\n\nexport type CallWithResultFromHeaderData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/header';\n};\n\nexport type CallWithResultFromHeaderErrors = {\n    /**\n     * 400 server error\n     */\n    400: unknown;\n    /**\n     * 500 server error\n     */\n    500: unknown;\n};\n\nexport type CallWithResultFromHeaderResponses = {\n    /**\n     * Successful response\n     */\n    200: unknown;\n};\n\nexport type TestErrorCodeData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * Status code to return\n         */\n        status: number;\n    };\n    url: '/api/v{api-version}/error';\n};\n\nexport type TestErrorCodeErrors = {\n    /**\n     * Custom message: Internal Server Error\n     */\n    500: unknown;\n    /**\n     * Custom message: Not Implemented\n     */\n    501: unknown;\n    /**\n     * Custom message: Bad Gateway\n     */\n    502: unknown;\n    /**\n     * Custom message: Service Unavailable\n     */\n    503: unknown;\n};\n\nexport type TestErrorCodeResponses = {\n    /**\n     * Custom message: Successful response\n     */\n    200: unknown;\n};\n\nexport type NonAsciiæøåÆøÅöôêÊ字符串Data = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * Dummy input param\n         */\n        nonAsciiParamæøåÆØÅöôêÊ: number;\n    };\n    url: '/api/v{api-version}/non-ascii-æøåÆØÅöôêÊ字符串';\n};\n\nexport type NonAsciiæøåÆøÅöôêÊ字符串Responses = {\n    /**\n     * Successful response\n     */\n    200: Array<NonAsciiStringæøåÆøÅöôêÊ字符串>;\n};\n\nexport type NonAsciiæøåÆøÅöôêÊ字符串Response = NonAsciiæøåÆøÅöôêÊ字符串Responses[keyof NonAsciiæøåÆøÅöôêÊ字符串Responses];\n\nexport type PutWithFormUrlEncodedData = {\n    body: ArrayWithStrings;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/non-ascii-æøåÆØÅöôêÊ字符串';\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-angular/base-url-number/client/client.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { HttpResponse } from '@angular/common/http';\nimport { HttpClient, HttpErrorResponse, HttpEventType, HttpRequest } from '@angular/common/http';\nimport {\n  assertInInjectionContext,\n  inject,\n  provideAppInitializer,\n  runInInjectionContext,\n} from '@angular/core';\nimport { firstValueFrom } from 'rxjs';\nimport { filter } from 'rxjs/operators';\n\nimport { createSseClient } from '../core/serverSentEvents.gen';\nimport type { HttpMethod } from '../core/types.gen';\nimport { getValidRequestBody } from '../core/utils.gen';\nimport type {\n  Client,\n  Config,\n  RequestOptions,\n  ResolvedRequestOptions,\n  ResponseStyle,\n} from './types.gen';\nimport {\n  buildUrl,\n  createConfig,\n  createInterceptors,\n  mergeConfigs,\n  mergeHeaders,\n  setAuthParams,\n} from './utils.gen';\n\nexport function provideHeyApiClient(client: Client) {\n  return provideAppInitializer(() => {\n    const httpClient = inject(HttpClient);\n    client.setConfig({ httpClient });\n  });\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<\n    HttpRequest<unknown>,\n    HttpResponse<unknown>,\n    unknown,\n    ResolvedRequestOptions\n  >();\n\n  const requestOptions = <\n    TData = unknown,\n    ThrowOnError extends boolean = false,\n    TResponseStyle extends ResponseStyle = 'fields',\n  >(\n    options: RequestOptions<TData, TResponseStyle, ThrowOnError>,\n  ) => {\n    const opts = {\n      ..._config,\n      ...options,\n      headers: mergeHeaders(_config.headers, options.headers),\n      httpClient: options.httpClient ?? _config.httpClient,\n      serializedBody: undefined as string | undefined,\n    };\n\n    if (!opts.httpClient) {\n      if (opts.injector) {\n        opts.httpClient = runInInjectionContext(opts.injector, () => inject(HttpClient));\n      } else {\n        assertInInjectionContext(requestOptions);\n        opts.httpClient = inject(HttpClient);\n      }\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 url = buildUrl(opts as any);\n\n    const req = new HttpRequest<unknown>(opts.method ?? 'GET', url, getValidRequestBody(opts), {\n      redirect: 'follow',\n      ...opts,\n    });\n\n    return { opts, req, url };\n  };\n\n  const beforeRequest = async (options: RequestOptions) => {\n    const { opts, req, url } = requestOptions(options);\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    return { opts, req, url };\n  };\n\n  const request: Client['request'] = async (options) => {\n    // @ts-expect-error\n    const { opts, req: initialReq } = await beforeRequest(options);\n\n    let req = initialReq;\n\n    for (const fn of interceptors.request.fns) {\n      if (fn) {\n        req = await fn(req, opts as any);\n      }\n    }\n\n    const result: {\n      request: HttpRequest<unknown>;\n      response: any;\n    } = {\n      request: req,\n      response: null,\n    };\n\n    try {\n      result.response = (await firstValueFrom(\n        opts\n          .httpClient!.request(req)\n          .pipe(filter((event) => event.type === HttpEventType.Response)),\n      )) as HttpResponse<unknown>;\n\n      for (const fn of interceptors.response.fns) {\n        if (fn) {\n          result.response = await fn(result.response, req, opts as any);\n        }\n      }\n\n      let bodyResponse = result.response.body;\n\n      if (opts.responseValidator) {\n        await opts.responseValidator(bodyResponse);\n      }\n\n      if (opts.responseTransformer) {\n        bodyResponse = await opts.responseTransformer(bodyResponse);\n      }\n\n      return opts.responseStyle === 'data' ? bodyResponse : { data: bodyResponse, ...result };\n    } catch (error) {\n      if (error instanceof HttpErrorResponse) {\n        result.response = error;\n      }\n\n      let finalError = error instanceof HttpErrorResponse ? error.error : error;\n\n      for (const fn of interceptors.error.fns) {\n        if (fn) {\n          finalError = (await fn(finalError, result.response as any, req, opts as any)) as string;\n        }\n      }\n\n      if (opts.throwOnError) {\n        throw finalError;\n      }\n\n      return opts.responseStyle === 'data'\n        ? undefined\n        : {\n            error: finalError,\n            ...result,\n          };\n    }\n  };\n\n  const makeMethodFn = (method: Uppercase<HttpMethod>) => (options: RequestOptions) =>\n    request({ ...options, method });\n\n  const makeSseFn = (method: Uppercase<HttpMethod>) => async (options: RequestOptions) => {\n    const { opts, url } = await beforeRequest(options);\n    return createSseClient({\n      ...opts,\n      body: opts.body as BodyInit | null | undefined,\n      headers: opts.headers as unknown as Record<string, string>,\n      method,\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    requestOptions: (options) => {\n      if (options.security) {\n        throw new Error('Security is not supported in requestOptions');\n      }\n\n      if (options.requestValidator) {\n        throw new Error('Request validation is not supported in requestOptions');\n      }\n\n      return requestOptions(options).req;\n    },\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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-angular/base-url-number/client/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type { Auth } from '../core/auth.gen';\nexport type { QuerySerializerOptions } from '../core/bodySerializer.gen';\nexport {\n  formDataBodySerializer,\n  jsonBodySerializer,\n  urlSearchParamsBodySerializer,\n} from '../core/bodySerializer.gen';\nexport { buildClientParams } from '../core/params.gen';\nexport { serializeQueryKeyValue } from '../core/queryKeySerializer.gen';\nexport { createClient } from './client.gen';\nexport type {\n  Client,\n  ClientOptions,\n  Config,\n  CreateClientConfig,\n  Options,\n  RequestOptions,\n  RequestResult,\n  ResolvedRequestOptions,\n  ResponseStyle,\n  TDataShape,\n} from './types.gen';\nexport { createConfig, mergeHeaders } from './utils.gen';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-angular/base-url-number/client/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type {\n  HttpClient,\n  HttpErrorResponse,\n  HttpHeaders,\n  HttpRequest,\n  HttpResponse,\n} from '@angular/common/http';\nimport type { Injector } from '@angular/core';\n\nimport type { Auth } from '../core/auth.gen';\nimport type {\n  ServerSentEventsOptions,\n  ServerSentEventsResult,\n} from '../core/serverSentEvents.gen';\nimport type { Client as CoreClient, Config as CoreConfig } from '../core/types.gen';\nimport type { Middleware } from './utils.gen';\n\nexport type ResponseStyle = 'data' | 'fields';\n\nexport interface Config<T extends ClientOptions = ClientOptions>\n  extends Omit<RequestInit, 'body' | 'headers' | 'method'>, Omit<CoreConfig, 'headers'> {\n  /**\n   * Base URL for all requests made by this client.\n   */\n  baseUrl?: T['baseUrl'];\n  /**\n   * An object containing any HTTP headers that you want to pre-populate your\n   * `HttpHeaders` object with.\n   *\n   * {@link https://angular.dev/api/common/http/HttpHeaders#constructor See more}\n   */\n  headers?:\n    | HttpHeaders\n    | Record<\n        string,\n        string | number | boolean | (string | number | boolean)[] | null | undefined | unknown\n      >;\n  /**\n   * The HTTP client to use for making requests.\n   */\n  httpClient?: HttpClient;\n  /**\n   * Should we return only data or multiple fields (data, error, response, etc.)?\n   *\n   * @default 'fields'\n   */\n  responseStyle?: ResponseStyle;\n\n  /**\n   * Throw an error instead of returning it in the response?\n   *\n   * @default false\n   */\n  throwOnError?: T['throwOnError'];\n}\n\nexport interface RequestOptions<\n  TData = unknown,\n  TResponseStyle extends ResponseStyle = 'fields',\n  ThrowOnError extends boolean = boolean,\n  Url extends string = string,\n>\n  extends\n    Config<{\n      responseStyle: TResponseStyle;\n      throwOnError: ThrowOnError;\n    }>,\n    Pick<\n      ServerSentEventsOptions<TData>,\n      | 'onRequest'\n      | 'onSseError'\n      | 'onSseEvent'\n      | 'sseDefaultRetryDelay'\n      | 'sseMaxRetryAttempts'\n      | 'sseMaxRetryDelay'\n    > {\n  /**\n   * Any body that you want to add to your request.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/fetch#body}\n   */\n  body?: unknown;\n  /**\n   * Optional custom injector for dependency resolution if you don't implicitly or explicitly provide one.\n   */\n  injector?: Injector;\n  path?: Record<string, unknown>;\n  query?: Record<string, unknown>;\n  /**\n   * Security mechanism(s) to use for the request.\n   */\n  security?: ReadonlyArray<Auth>;\n  url: Url;\n}\n\nexport interface ResolvedRequestOptions<\n  TResponseStyle extends ResponseStyle = 'fields',\n  ThrowOnError extends boolean = boolean,\n  Url extends string = string,\n> extends RequestOptions<unknown, TResponseStyle, ThrowOnError, Url> {\n  serializedBody?: string;\n}\n\nexport type RequestResult<\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = boolean,\n  TResponseStyle extends ResponseStyle = 'fields',\n> = Promise<\n  ThrowOnError extends true\n    ? TResponseStyle extends 'data'\n      ? TData extends Record<string, unknown>\n        ? TData[keyof TData]\n        : TData\n      : {\n          data: TData extends Record<string, unknown> ? TData[keyof TData] : TData;\n          request: HttpRequest<unknown>;\n          response: HttpResponse<TData>;\n        }\n    : TResponseStyle extends 'data'\n      ? (TData extends Record<string, unknown> ? TData[keyof TData] : TData) | undefined\n      :\n          | {\n              data: TData extends Record<string, unknown> ? TData[keyof TData] : TData;\n              error: undefined;\n              request: HttpRequest<unknown>;\n              response: HttpResponse<TData>;\n            }\n          | {\n              data: undefined;\n              error: TError[keyof TError];\n              request: HttpRequest<unknown>;\n              response: HttpErrorResponse & {\n                error: TError[keyof TError] | null;\n              };\n            }\n>;\n\nexport interface ClientOptions {\n  baseUrl?: string;\n  responseStyle?: ResponseStyle;\n  throwOnError?: boolean;\n}\n\ntype MethodFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'>,\n) => RequestResult<TData, TError, ThrowOnError, TResponseStyle>;\n\ntype SseFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'>,\n) => Promise<ServerSentEventsResult<TData, TError>>;\n\ntype RequestFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'> &\n    Pick<Required<RequestOptions<TData, TResponseStyle, ThrowOnError>>, 'method'>,\n) => RequestResult<TData, TError, ThrowOnError, TResponseStyle>;\n\ntype RequestOptionsFn = <\n  T,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: RequestOptions<T, TResponseStyle, ThrowOnError>,\n) => HttpRequest<T>;\n\ntype BuildUrlFn = <\n  TData extends {\n    body?: unknown;\n    path?: Record<string, unknown>;\n    query?: Record<string, unknown>;\n    url: string;\n  },\n>(\n  options: TData & Options<TData>,\n) => string;\n\nexport type Client = CoreClient<RequestFn, Config, MethodFn, BuildUrlFn, SseFn> & {\n  interceptors: Middleware<\n    HttpRequest<unknown>,\n    HttpResponse<unknown>,\n    unknown,\n    ResolvedRequestOptions\n  >;\n  requestOptions: RequestOptionsFn;\n};\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 = ClientOptions> = (\n  override?: Config<ClientOptions & T>,\n) => Config<Required<ClientOptions> & T>;\n\nexport interface TDataShape {\n  body?: unknown;\n  headers?: unknown;\n  path?: unknown;\n  query?: unknown;\n  url: string;\n}\n\ntype OmitKeys<T, K> = Pick<T, Exclude<keyof T, K>>;\n\nexport type Options<\n  TData extends TDataShape = TDataShape,\n  ThrowOnError extends boolean = boolean,\n  TResponse = unknown,\n  TResponseStyle extends ResponseStyle = 'fields',\n> = OmitKeys<\n  RequestOptions<TResponse, TResponseStyle, ThrowOnError>,\n  'body' | 'path' | 'query' | 'url'\n> &\n  ([TData] extends [never] ? unknown : Omit<TData, 'url'>);\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-angular/base-url-number/client/utils.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport { HttpHeaders } from '@angular/common/http';\n\nimport { getAuthToken } from '../core/auth.gen';\nimport type {\n  QuerySerializer,\n  QuerySerializerOptions,\n} from '../core/bodySerializer.gen';\nimport {\n  serializeArrayParam,\n  serializeObjectParam,\n  serializePrimitiveParam,\n} from '../core/pathSerializer.gen';\nimport type { Client, ClientOptions, Config, RequestOptions } from './types.gen';\n\ninterface PathSerializer {\n  path: Record<string, unknown>;\n  url: string;\n}\n\nconst PATH_PARAM_RE = /\\{[^{}]+\\}/g;\n\ntype ArrayStyle = 'form' | 'spaceDelimited' | 'pipeDelimited';\ntype MatrixStyle = 'label' | 'matrix' | 'simple';\ntype ArraySeparatorStyle = ArrayStyle | MatrixStyle;\n\nconst 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 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 = (\n  contentType: string | null,\n): 'blob' | 'formData' | 'json' | 'stream' | 'text' | undefined => {\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\nexport const setAuthParams = async (\n  options: Pick<Required<RequestOptions>, 'security'> &\n    Pick<RequestOptions, 'auth' | 'query'> & {\n      headers: HttpHeaders;\n    },\n) => {\n  for (const auth of options.security) {\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 = options.headers.append('Cookie', `${name}=${token}`);\n        break;\n      case 'header':\n      default:\n        options.headers = options.headers.set(name, token);\n        break;\n    }\n\n    return;\n  }\n};\n\nexport const buildUrl: Client['buildUrl'] = (options) => {\n  const url = 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  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 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\nexport const mergeHeaders = (\n  ...headers: Array<Required<Config>['headers'] | undefined>\n): HttpHeaders => {\n  let mergedHeaders = new HttpHeaders();\n\n  for (const header of headers) {\n    if (!header || typeof header !== 'object') {\n      continue;\n    }\n\n    if (header instanceof HttpHeaders) {\n      // Merge HttpHeaders instance\n      header.keys().forEach((key) => {\n        const values = header.getAll(key);\n        if (values) {\n          values.forEach((value) => {\n            mergedHeaders = mergedHeaders.append(key, value);\n          });\n        }\n      });\n    } else {\n      // Merge plain object headers\n      for (const [key, value] of Object.entries(header)) {\n        if (value === null) {\n          mergedHeaders = mergedHeaders.delete(key);\n        } else if (Array.isArray(value)) {\n          for (const v of value) {\n            mergedHeaders = 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 = mergedHeaders.set(\n            key,\n            typeof value === 'object' ? JSON.stringify(value) : (value as string),\n          );\n        }\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  headers: defaultHeaders,\n  querySerializer: defaultQuerySerializer,\n  ...override,\n});\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-angular/base-url-number/client.gen.ts",
    "content": "// 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: 'http://localhost:3000/base' }));\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-angular/base-url-number/core/auth.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-angular/base-url-number/core/bodySerializer.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-angular/base-url-number/core/params.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-angular/base-url-number/core/pathSerializer.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-angular/base-url-number/core/queryKeySerializer.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\n/**\n * JSON-friendly union that mirrors what Pinia Colada can hash.\n */\nexport type JsonValue =\n  | null\n  | string\n  | number\n  | boolean\n  | JsonValue[]\n  | { [key: string]: JsonValue };\n\n/**\n * Replacer that converts non-JSON values (bigint, Date, etc.) to safe substitutes.\n */\nexport const queryKeyJsonReplacer = (_key: string, value: unknown) => {\n  if (value === undefined || typeof value === 'function' || typeof value === 'symbol') {\n    return undefined;\n  }\n  if (typeof value === 'bigint') {\n    return value.toString();\n  }\n  if (value instanceof Date) {\n    return value.toISOString();\n  }\n  return value;\n};\n\n/**\n * Safely stringifies a value and parses it back into a JsonValue.\n */\nexport const stringifyToJsonValue = (input: unknown): JsonValue | undefined => {\n  try {\n    const json = JSON.stringify(input, queryKeyJsonReplacer);\n    if (json === undefined) {\n      return undefined;\n    }\n    return JSON.parse(json) as JsonValue;\n  } catch {\n    return undefined;\n  }\n};\n\n/**\n * Detects plain objects (including objects with a null prototype).\n */\nconst isPlainObject = (value: unknown): value is Record<string, unknown> => {\n  if (value === null || typeof value !== 'object') {\n    return false;\n  }\n  const prototype = Object.getPrototypeOf(value as object);\n  return prototype === Object.prototype || prototype === null;\n};\n\n/**\n * Turns URLSearchParams into a sorted JSON object for deterministic keys.\n */\nconst serializeSearchParams = (params: URLSearchParams): JsonValue => {\n  const entries = Array.from(params.entries()).sort(([a], [b]) => a.localeCompare(b));\n  const result: Record<string, JsonValue> = {};\n\n  for (const [key, value] of entries) {\n    const existing = result[key];\n    if (existing === undefined) {\n      result[key] = value;\n      continue;\n    }\n\n    if (Array.isArray(existing)) {\n      (existing as string[]).push(value);\n    } else {\n      result[key] = [existing, value];\n    }\n  }\n\n  return result;\n};\n\n/**\n * Normalizes any accepted value into a JSON-friendly shape for query keys.\n */\nexport const serializeQueryKeyValue = (value: unknown): JsonValue | undefined => {\n  if (value === null) {\n    return null;\n  }\n\n  if (typeof value === 'string' || typeof value === 'number' || typeof value === 'boolean') {\n    return value;\n  }\n\n  if (value === undefined || typeof value === 'function' || typeof value === 'symbol') {\n    return undefined;\n  }\n\n  if (typeof value === 'bigint') {\n    return value.toString();\n  }\n\n  if (value instanceof Date) {\n    return value.toISOString();\n  }\n\n  if (Array.isArray(value)) {\n    return stringifyToJsonValue(value);\n  }\n\n  if (typeof URLSearchParams !== 'undefined' && value instanceof URLSearchParams) {\n    return serializeSearchParams(value);\n  }\n\n  if (isPlainObject(value)) {\n    return stringifyToJsonValue(value);\n  }\n\n  return undefined;\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-angular/base-url-number/core/serverSentEvents.gen.ts",
    "content": "// 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 const 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            // Normalize line endings: CRLF -> LF, then CR -> LF\n            buffer = buffer.replace(/\\r\\n/g, '\\n').replace(/\\r/g, '\\n');\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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-angular/base-url-number/core/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { Auth, AuthToken } from './auth.gen';\nimport type { BodySerializer, QuerySerializer, QuerySerializerOptions } from './bodySerializer.gen';\n\nexport type HttpMethod =\n  | 'connect'\n  | 'delete'\n  | 'get'\n  | 'head'\n  | 'options'\n  | 'patch'\n  | 'post'\n  | 'put'\n  | 'trace';\n\nexport type Client<\n  RequestFn = never,\n  Config = unknown,\n  MethodFn = never,\n  BuildUrlFn = never,\n  SseFn = never,\n> = {\n  /**\n   * Returns the final request URL.\n   */\n  buildUrl: BuildUrlFn;\n  getConfig: () => Config;\n  request: RequestFn;\n  setConfig: (config: Config) => Config;\n} & {\n  [K in HttpMethod]: MethodFn;\n} & ([SseFn] extends [never] ? { sse?: never } : { sse: { [K in HttpMethod]: SseFn } });\n\nexport interface Config {\n  /**\n   * Auth token or a function returning auth token. The resolved value will be\n   * added to the request payload as defined by its `security` array.\n   */\n  auth?: ((auth: Auth) => Promise<AuthToken> | AuthToken) | AuthToken;\n  /**\n   * A function for serializing request body parameter. By default,\n   * {@link JSON.stringify()} will be used.\n   */\n  bodySerializer?: BodySerializer | null;\n  /**\n   * An object containing any HTTP headers that you want to pre-populate your\n   * `Headers` object with.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/Headers/Headers#init See more}\n   */\n  headers?:\n    | RequestInit['headers']\n    | Record<\n        string,\n        string | number | boolean | (string | number | boolean)[] | null | undefined | unknown\n      >;\n  /**\n   * The request method.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/fetch#method See more}\n   */\n  method?: Uppercase<HttpMethod>;\n  /**\n   * A function for serializing request query parameters. By default, arrays\n   * will be exploded in form style, objects will be exploded in deepObject\n   * style, and reserved characters are percent-encoded.\n   *\n   * This method will have no effect if the native `paramsSerializer()` Axios\n   * API function is used.\n   *\n   * {@link https://swagger.io/docs/specification/serialization/#query View examples}\n   */\n  querySerializer?: QuerySerializer | QuerySerializerOptions;\n  /**\n   * A function validating request data. This is useful if you want to ensure\n   * the request conforms to the desired shape, so it can be safely sent to\n   * the server.\n   */\n  requestValidator?: (data: unknown) => Promise<unknown>;\n  /**\n   * A function transforming response data before it's returned. This is useful\n   * for post-processing data, e.g. converting ISO strings into Date objects.\n   */\n  responseTransformer?: (data: unknown) => Promise<unknown>;\n  /**\n   * A function validating response data. This is useful if you want to ensure\n   * the response conforms to the desired shape, so it can be safely passed to\n   * the transformers and returned to the user.\n   */\n  responseValidator?: (data: unknown) => Promise<unknown>;\n}\n\ntype IsExactlyNeverOrNeverUndefined<T> = [T] extends [never]\n  ? true\n  : [T] extends [never | undefined]\n    ? [undefined] extends [T]\n      ? false\n      : true\n    : false;\n\nexport type OmitNever<T extends Record<string, unknown>> = {\n  [K in keyof T as IsExactlyNeverOrNeverUndefined<T[K]> extends true ? never : K]: T[K];\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-angular/base-url-number/core/utils.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-angular/base-url-number/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type { _3eNum1Период, _400, AdditionalPropertiesIntegerIssue, AdditionalPropertiesUnknownIssue, AdditionalPropertiesUnknownIssue2, AdditionalPropertiesUnknownIssue3, AdditionalPropertiesUnknownIssueWritable, AnyOfAnyAndNull, AnyOfArrays, ApiVVersionODataControllerCountData, ApiVVersionODataControllerCountResponse, ApiVVersionODataControllerCountResponses, ArrayWithAnyOfProperties, ArrayWithArray, ArrayWithBooleans, ArrayWithNumbers, ArrayWithProperties, ArrayWithReferences, ArrayWithStrings, CallToTestOrderOfParamsData, CallWithDefaultOptionalParametersData, CallWithDefaultParametersData, CallWithDescriptionsData, CallWithDuplicateResponsesData, CallWithDuplicateResponsesError, CallWithDuplicateResponsesErrors, CallWithDuplicateResponsesResponse, CallWithDuplicateResponsesResponses, CallWithNoContentResponseData, CallWithNoContentResponseResponse, CallWithNoContentResponseResponses, CallWithParametersData, CallWithResponseAndNoContentResponseData, CallWithResponseAndNoContentResponseResponse, CallWithResponseAndNoContentResponseResponses, CallWithResponseData, CallWithResponseResponse, CallWithResponseResponses, CallWithResponsesData, CallWithResponsesError, CallWithResponsesErrors, CallWithResponsesResponse, CallWithResponsesResponses, CallWithResultFromHeaderData, CallWithResultFromHeaderErrors, CallWithResultFromHeaderResponses, CallWithWeirdParameterNamesData, CamelCaseCommentWithBreaks, CharactersInDescription, ClientOptions, CollectionFormatData, CommentWithBackticks, CommentWithBackticksAndQuotes, CommentWithBreaks, CommentWithExpressionPlaceholders, CommentWithQuotes, CommentWithReservedCharacters, CommentWithSlashes, ComplexParamsData, ComplexParamsResponse, ComplexParamsResponses, ComplexTypesData, ComplexTypesErrors, ComplexTypesResponse, ComplexTypesResponses, CompositionBaseModel, CompositionExtendedModel, CompositionWithAllOfAndNullable, CompositionWithAnyOf, CompositionWithAnyOfAndNullable, CompositionWithAnyOfAnonymous, CompositionWithNestedAnyAndTypeNull, CompositionWithNestedAnyOfAndNull, CompositionWithOneOf, CompositionWithOneOfAndComplexArrayDictionary, CompositionWithOneOfAndNullable, CompositionWithOneOfAndProperties, CompositionWithOneOfAndSimpleArrayDictionary, CompositionWithOneOfAndSimpleDictionary, CompositionWithOneOfAnonymous, CompositionWithOneOfDiscriminator, ConstValue, Default, DeleteCallWithoutParametersAndResponseData, DeleteFooData, DeleteFooData2, DeleteFooData3, DeprecatedCallData, DeprecatedModel, DictionaryWithArray, DictionaryWithDictionary, DictionaryWithProperties, DictionaryWithPropertiesAndAdditionalProperties, DictionaryWithReference, DictionaryWithString, DummyAData, DummyAResponse, DummyAResponses, DummyBData, DummyBResponse, DummyBResponses, DuplicateName2Data, DuplicateName3Data, DuplicateName4Data, DuplicateNameData, EnumFromDescription, EnumWithExtensions, EnumWithNumbers, EnumWithReplacedCharacters, EnumWithStrings, EnumWithXEnumNames, ExportData, ExternalRefA, ExternalRefB, ExternalSharedModel, File, FileResponseData, FileResponseResponse, FileResponseResponses, FileWritable, FooWowData, FooWowResponses, FreeFormObjectWithAdditionalPropertiesEqEmptyObject, FreeFormObjectWithAdditionalPropertiesEqTrue, FreeFormObjectWithoutAdditionalProperties, GenericSchemaDuplicateIssue1SystemBoolean, GenericSchemaDuplicateIssue1SystemBooleanWritable, GenericSchemaDuplicateIssue1SystemString, GenericSchemaDuplicateIssue1SystemStringWritable, GetApiVbyApiVersionSimpleOperationData, GetApiVbyApiVersionSimpleOperationError, GetApiVbyApiVersionSimpleOperationErrors, GetApiVbyApiVersionSimpleOperationResponse, GetApiVbyApiVersionSimpleOperationResponses, GetCallWithOptionalParamData, GetCallWithoutParametersAndResponseData, HeadCallWithoutParametersAndResponseData, Import, ImportData, ImportResponse, ImportResponses, IoK8sApimachineryPkgApisMetaV1DeleteOptions, IoK8sApimachineryPkgApisMetaV1Preconditions, ModelCircle, ModelFromZendesk, ModelSquare, ModelThatExtends, ModelThatExtendsExtends, ModelWithAdditionalPropertiesEqTrue, ModelWithAdditionalPropertiesRef, ModelWithAnyOfConstantSizeArray, ModelWithAnyOfConstantSizeArrayAndIntersect, ModelWithAnyOfConstantSizeArrayNullable, ModelWithAnyOfConstantSizeArrayWithNSizeAndOptions, ModelWithAnyOfConstantSizeArrayWithNSizeAndOptionsWritable, ModelWithArray, ModelWithArrayReadOnlyAndWriteOnly, ModelWithArrayReadOnlyAndWriteOnlyWritable, ModelWithBackticksInDescription, ModelWithBoolean, ModelWithCircularReference, ModelWithConst, ModelWithConstantSizeArray, ModelWithDictionary, ModelWithDuplicateImports, ModelWithDuplicateProperties, ModelWithEnum, ModelWithEnumFromDescription, ModelWithEnumWithHyphen, ModelWithInteger, ModelWithNestedArrayEnums, ModelWithNestedArrayEnumsData, ModelWithNestedArrayEnumsDataBar, ModelWithNestedArrayEnumsDataFoo, ModelWithNestedCompositionEnums, ModelWithNestedEnums, ModelWithNestedProperties, ModelWithNullableObject, ModelWithNullableString, ModelWithNumericEnumUnion, ModelWithOneOfAndProperties, ModelWithOneOfEnum, ModelWithOrderedProperties, ModelWithPattern, ModelWithPatternWritable, ModelWithPrefixItemsConstantSizeArray, ModelWithProperties, ModelWithPropertiesWritable, ModelWithReadOnlyAndWriteOnly, ModelWithReadOnlyAndWriteOnlyWritable, ModelWithReference, ModelWithReferenceWritable, ModelWithString, ModelWithStringError, MultipartRequestData, MultipartResponseData, MultipartResponseResponse, MultipartResponseResponses, NestedAnyOfArraysNullable, NonAsciiæøåÆøÅöôêÊ字符串Data, NonAsciiæøåÆøÅöôêÊ字符串Response, NonAsciiæøåÆøÅöôêÊ字符串Responses, NonAsciiStringæøåÆøÅöôêÊ字符串, NullableObject, OneOfAllOfIssue, OneOfAllOfIssueWritable, OptionsCallWithoutParametersAndResponseData, Pageable, ParameterSimpleParameterUnused, PatchApiVbyApiVersionNoTagData, PatchApiVbyApiVersionNoTagResponses, PatchCallWithoutParametersAndResponseData, PostApiVbyApiVersionFormDataData, PostApiVbyApiVersionRequestBodyData, PostCallWithOptionalParamData, PostCallWithOptionalParamResponse, PostCallWithOptionalParamResponses, PostCallWithoutParametersAndResponseData, PostServiceWithEmptyTagResponse, PostServiceWithEmptyTagResponse2, PutCallWithoutParametersAndResponseData, PutWithFormUrlEncodedData, SchemaWithFormRestrictedKeys, SimpleBoolean, SimpleFile, SimpleFormData, SimpleInteger, SimpleParameter, SimpleReference, SimpleRequestBody, SimpleString, SimpleStringWithPattern, TestErrorCodeData, TestErrorCodeErrors, TestErrorCodeResponses, TypesData, TypesResponse, TypesResponses, UploadFileData, UploadFileResponse, UploadFileResponses, XFooBar } from './types.gen';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-angular/base-url-number/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type ClientOptions = {\n    baseUrl: 'http://localhost:3000/base' | (string & {});\n};\n\n/**\n * Model with number-only name\n */\nexport type _400 = string;\n\n/**\n * External ref to shared model (A)\n */\nexport type ExternalRefA = ExternalSharedModel;\n\n/**\n * External ref to shared model (B)\n */\nexport type ExternalRefB = ExternalSharedModel;\n\n/**\n * Testing multiline comments in string: First line\n * Second line\n *\n * Fourth line\n */\nexport type CamelCaseCommentWithBreaks = number;\n\n/**\n * Testing multiline comments in string: First line\n * Second line\n *\n * Fourth line\n */\nexport type CommentWithBreaks = number;\n\n/**\n * Testing backticks in string: `backticks` and ```multiple backticks``` should work\n */\nexport type CommentWithBackticks = number;\n\n/**\n * Testing backticks and quotes in string: `backticks`, 'quotes', \"double quotes\" and ```multiple backticks``` should work\n */\nexport type CommentWithBackticksAndQuotes = number;\n\n/**\n * Testing slashes in string: \\backwards\\\\\\ and /forwards/// should work\n */\nexport type CommentWithSlashes = number;\n\n/**\n * Testing expression placeholders in string: ${expression} should work\n */\nexport type CommentWithExpressionPlaceholders = number;\n\n/**\n * Testing quotes in string: 'single quote''' and \"double quotes\"\"\" should work\n */\nexport type CommentWithQuotes = number;\n\n/**\n * Testing reserved characters in string: * inline * and ** inline ** should work\n */\nexport type CommentWithReservedCharacters = number;\n\n/**\n * This is a simple number\n */\nexport type SimpleInteger = number;\n\n/**\n * This is a simple boolean\n */\nexport type SimpleBoolean = boolean;\n\n/**\n * This is a simple string\n */\nexport type SimpleString = string;\n\n/**\n * A string with non-ascii (unicode) characters valid in typescript identifiers (æøåÆØÅöÔèÈ字符串)\n */\nexport type NonAsciiStringæøåÆøÅöôêÊ字符串 = string;\n\n/**\n * This is a simple file\n */\nexport type SimpleFile = Blob | File;\n\n/**\n * This is a simple reference\n */\nexport type SimpleReference = ModelWithString;\n\n/**\n * This is a simple string\n */\nexport type SimpleStringWithPattern = string | null;\n\n/**\n * This is a simple enum with strings\n */\nexport type EnumWithStrings = 'Success' | 'Warning' | 'Error' | '\\'Single Quote\\'' | '\"Double Quotes\"' | 'Non-ascii: øæåôöØÆÅÔÖ字符串';\n\nexport type EnumWithReplacedCharacters = '\\'Single Quote\\'' | '\"Double Quotes\"' | 'øæåôöØÆÅÔÖ字符串' | 3.1 | '';\n\n/**\n * This is a simple enum with numbers\n */\nexport type EnumWithNumbers = 1 | 2 | 3 | 1.1 | 1.2 | 1.3 | 100 | 200 | 300 | -100 | -200 | -300 | -1.1 | -1.2 | -1.3;\n\n/**\n * Success=1,Warning=2,Error=3\n */\nexport type EnumFromDescription = number;\n\n/**\n * This is a simple enum with numbers\n */\nexport type EnumWithExtensions = 200 | 400 | 500;\n\nexport type EnumWithXEnumNames = 0 | 1 | 2;\n\n/**\n * This is a simple array with numbers\n */\nexport type ArrayWithNumbers = Array<number>;\n\n/**\n * This is a simple array with booleans\n */\nexport type ArrayWithBooleans = Array<boolean>;\n\n/**\n * This is a simple array with strings\n */\nexport type ArrayWithStrings = Array<string>;\n\n/**\n * This is a simple array with references\n */\nexport type ArrayWithReferences = Array<ModelWithString>;\n\n/**\n * This is a simple array containing an array\n */\nexport type ArrayWithArray = Array<Array<ModelWithString>>;\n\n/**\n * This is a simple array with properties\n */\nexport type ArrayWithProperties = Array<{\n    '16x16'?: CamelCaseCommentWithBreaks;\n    bar?: string;\n}>;\n\n/**\n * This is a simple array with any of properties\n */\nexport type ArrayWithAnyOfProperties = Array<{\n    foo?: string;\n} | {\n    bar?: string;\n}>;\n\nexport type AnyOfAnyAndNull = {\n    data?: unknown | null;\n};\n\n/**\n * This is a simple array with any of properties\n */\nexport type AnyOfArrays = {\n    results?: Array<{\n        foo?: string;\n    } | {\n        bar?: string;\n    }>;\n};\n\n/**\n * This is a string dictionary\n */\nexport type DictionaryWithString = {\n    [key: string]: string;\n};\n\nexport type DictionaryWithPropertiesAndAdditionalProperties = {\n    foo?: number;\n    bar?: boolean;\n    [key: string]: string | number | boolean | undefined;\n};\n\n/**\n * This is a string reference\n */\nexport type DictionaryWithReference = {\n    [key: string]: ModelWithString;\n};\n\n/**\n * This is a complex dictionary\n */\nexport type DictionaryWithArray = {\n    [key: string]: Array<ModelWithString>;\n};\n\n/**\n * This is a string dictionary\n */\nexport type DictionaryWithDictionary = {\n    [key: string]: {\n        [key: string]: string;\n    };\n};\n\n/**\n * This is a complex dictionary\n */\nexport type DictionaryWithProperties = {\n    [key: string]: {\n        foo?: string;\n        bar?: string;\n    };\n};\n\n/**\n * This is a model with one number property\n */\nexport type ModelWithInteger = {\n    /**\n     * This is a simple number property\n     */\n    prop?: number;\n};\n\n/**\n * This is a model with one boolean property\n */\nexport type ModelWithBoolean = {\n    /**\n     * This is a simple boolean property\n     */\n    prop?: boolean;\n};\n\n/**\n * This is a model with one string property\n */\nexport type ModelWithString = {\n    /**\n     * This is a simple string property\n     */\n    prop?: string;\n};\n\n/**\n * This is a model with one string property\n */\nexport type ModelWithStringError = {\n    /**\n     * This is a simple string property\n     */\n    prop?: string;\n};\n\n/**\n * `Comment` or `VoiceComment`. The JSON object for adding voice comments to tickets is different. See [Adding voice comments to tickets](/documentation/ticketing/managing-tickets/adding-voice-comments-to-tickets)\n */\nexport type ModelFromZendesk = string;\n\n/**\n * This is a model with one string property\n */\nexport type ModelWithNullableString = {\n    /**\n     * This is a simple string property\n     */\n    nullableProp1?: string | null;\n    /**\n     * This is a simple string property\n     */\n    nullableRequiredProp1: string | null;\n    /**\n     * This is a simple string property\n     */\n    nullableProp2?: string | null;\n    /**\n     * This is a simple string property\n     */\n    nullableRequiredProp2: string | null;\n    /**\n     * This is a simple enum with strings\n     */\n    'foo_bar-enum'?: 'Success' | 'Warning' | 'Error' | 'ØÆÅ字符串';\n};\n\n/**\n * This is a model with one enum\n */\nexport type ModelWithEnum = {\n    /**\n     * This is a simple enum with strings\n     */\n    'foo_bar-enum'?: 'Success' | 'Warning' | 'Error' | 'ØÆÅ字符串';\n    /**\n     * These are the HTTP error code enums\n     */\n    statusCode?: '100' | '200 FOO' | '300 FOO_BAR' | '400 foo-bar' | '500 foo.bar' | '600 foo&bar';\n    /**\n     * Simple boolean enum\n     */\n    bool?: true;\n};\n\n/**\n * This is a model with one enum with escaped name\n */\nexport type ModelWithEnumWithHyphen = {\n    /**\n     * Foo-Bar-Baz-Qux\n     */\n    'foo-bar-baz-qux'?: '3.0';\n};\n\n/**\n * This is a model with one enum\n */\nexport type ModelWithEnumFromDescription = {\n    /**\n     * Success=1,Warning=2,Error=3\n     */\n    test?: number;\n};\n\n/**\n * This is a model with nested enums\n */\nexport type ModelWithNestedEnums = {\n    dictionaryWithEnum?: {\n        [key: string]: 'Success' | 'Warning' | 'Error';\n    };\n    dictionaryWithEnumFromDescription?: {\n        [key: string]: number;\n    };\n    arrayWithEnum?: Array<'Success' | 'Warning' | 'Error'>;\n    arrayWithDescription?: Array<number>;\n    /**\n     * This is a simple enum with strings\n     */\n    'foo_bar-enum'?: 'Success' | 'Warning' | 'Error' | 'ØÆÅ字符串';\n};\n\n/**\n * This is a model with one property containing a reference\n */\nexport type ModelWithReference = {\n    prop?: ModelWithProperties;\n};\n\n/**\n * This is a model with one property containing an array\n */\nexport type ModelWithArrayReadOnlyAndWriteOnly = {\n    prop?: Array<ModelWithReadOnlyAndWriteOnly>;\n    propWithFile?: Array<Blob | File>;\n    propWithNumber?: Array<number>;\n};\n\n/**\n * This is a model with one property containing an array\n */\nexport type ModelWithArray = {\n    prop?: Array<ModelWithString>;\n    propWithFile?: Array<Blob | File>;\n    propWithNumber?: Array<number>;\n};\n\n/**\n * This is a model with one property containing a dictionary\n */\nexport type ModelWithDictionary = {\n    prop?: {\n        [key: string]: string;\n    };\n};\n\n/**\n * This is a deprecated model with a deprecated property\n *\n * @deprecated\n */\nexport type DeprecatedModel = {\n    /**\n     * This is a deprecated property\n     *\n     * @deprecated\n     */\n    prop?: string;\n};\n\n/**\n * This is a model with one property containing a circular reference\n */\nexport type ModelWithCircularReference = {\n    prop?: ModelWithCircularReference;\n};\n\n/**\n * This is a model with one property with a 'one of' relationship\n */\nexport type CompositionWithOneOf = {\n    propA?: ModelWithString | ModelWithEnum | ModelWithArray | ModelWithDictionary;\n};\n\n/**\n * This is a model with one property with a 'one of' relationship where the options are not $ref\n */\nexport type CompositionWithOneOfAnonymous = {\n    propA?: {\n        propA?: string;\n    } | string | number;\n};\n\n/**\n * Circle\n */\nexport type ModelCircle = {\n    kind: string;\n    radius?: number;\n};\n\n/**\n * Square\n */\nexport type ModelSquare = {\n    kind: string;\n    sideLength?: number;\n};\n\n/**\n * This is a model with one property with a 'one of' relationship where the options are not $ref\n */\nexport type CompositionWithOneOfDiscriminator = ({\n    kind: 'circle';\n} & ModelCircle) | ({\n    kind: 'square';\n} & ModelSquare);\n\n/**\n * This is a model with one property with a 'any of' relationship\n */\nexport type CompositionWithAnyOf = {\n    propA?: ModelWithString | ModelWithEnum | ModelWithArray | ModelWithDictionary;\n};\n\n/**\n * This is a model with one property with a 'any of' relationship where the options are not $ref\n */\nexport type CompositionWithAnyOfAnonymous = {\n    propA?: {\n        propA?: string;\n    } | string | number;\n};\n\n/**\n * This is a model with nested 'any of' property with a type null\n */\nexport type CompositionWithNestedAnyAndTypeNull = {\n    propA?: Array<ModelWithDictionary | null> | Array<ModelWithArray | null>;\n};\n\nexport type _3eNum1Период = 'Bird' | 'Dog';\n\nexport type ConstValue = 'ConstValue';\n\n/**\n * This is a model with one property with a 'any of' relationship where the options are not $ref\n */\nexport type CompositionWithNestedAnyOfAndNull = {\n    /**\n     * Scopes\n     */\n    propA?: Array<_3eNum1Период | ConstValue> | null;\n};\n\n/**\n * This is a model with one property with a 'one of' relationship\n */\nexport type CompositionWithOneOfAndNullable = {\n    propA?: {\n        boolean?: boolean;\n    } | ModelWithEnum | ModelWithArray | ModelWithDictionary | null;\n};\n\n/**\n * This is a model that contains a simple dictionary within composition\n */\nexport type CompositionWithOneOfAndSimpleDictionary = {\n    propA?: boolean | {\n        [key: string]: number;\n    };\n};\n\n/**\n * This is a model that contains a dictionary of simple arrays within composition\n */\nexport type CompositionWithOneOfAndSimpleArrayDictionary = {\n    propA?: boolean | {\n        [key: string]: Array<boolean>;\n    };\n};\n\n/**\n * This is a model that contains a dictionary of complex arrays (composited) within composition\n */\nexport type CompositionWithOneOfAndComplexArrayDictionary = {\n    propA?: boolean | {\n        [key: string]: Array<number | string>;\n    };\n};\n\n/**\n * This is a model with one property with a 'all of' relationship\n */\nexport type CompositionWithAllOfAndNullable = {\n    propA?: ({\n        boolean?: boolean;\n    } & ModelWithEnum & ModelWithArray & ModelWithDictionary) | null;\n};\n\n/**\n * This is a model with one property with a 'any of' relationship\n */\nexport type CompositionWithAnyOfAndNullable = {\n    propA?: {\n        boolean?: boolean;\n    } | ModelWithEnum | ModelWithArray | ModelWithDictionary | null;\n};\n\n/**\n * This is a base model with two simple optional properties\n */\nexport type CompositionBaseModel = {\n    firstName?: string;\n    lastname?: string;\n};\n\n/**\n * This is a model that extends the base model\n */\nexport type CompositionExtendedModel = CompositionBaseModel & {\n    age: number;\n    firstName: string;\n    lastname: string;\n};\n\n/**\n * This is a model with one nested property\n */\nexport type ModelWithProperties = {\n    required: string;\n    readonly requiredAndReadOnly: string;\n    requiredAndNullable: string | null;\n    string?: string;\n    number?: number;\n    boolean?: boolean;\n    reference?: ModelWithString;\n    'property with space'?: string;\n    default?: string;\n    try?: string;\n    readonly '@namespace.string'?: string;\n    readonly '@namespace.integer'?: number;\n};\n\n/**\n * This is a model with one nested property\n */\nexport type ModelWithNestedProperties = {\n    readonly first: {\n        readonly second: {\n            readonly third: string | null;\n        } | null;\n    } | null;\n};\n\n/**\n * This is a model with duplicated properties\n */\nexport type ModelWithDuplicateProperties = {\n    prop?: ModelWithString;\n};\n\n/**\n * This is a model with ordered properties\n */\nexport type ModelWithOrderedProperties = {\n    zebra?: string;\n    apple?: string;\n    hawaii?: string;\n};\n\n/**\n * This is a model with duplicated imports\n */\nexport type ModelWithDuplicateImports = {\n    propA?: ModelWithString;\n    propB?: ModelWithString;\n    propC?: ModelWithString;\n};\n\n/**\n * This is a model that extends another model\n */\nexport type ModelThatExtends = ModelWithString & {\n    propExtendsA?: string;\n    propExtendsB?: ModelWithString;\n};\n\n/**\n * This is a model that extends another model\n */\nexport type ModelThatExtendsExtends = ModelWithString & ModelThatExtends & {\n    propExtendsC?: string;\n    propExtendsD?: ModelWithString;\n};\n\n/**\n * This is a model that contains a some patterns\n */\nexport type ModelWithPattern = {\n    key: string;\n    name: string;\n    readonly enabled?: boolean;\n    readonly modified?: string;\n    id?: string;\n    text?: string;\n    patternWithSingleQuotes?: string;\n    patternWithNewline?: string;\n    patternWithBacktick?: string;\n    patternWithUnicode?: string;\n};\n\nexport type File = {\n    /**\n     * Id\n     */\n    readonly id?: string;\n    /**\n     * Updated at\n     */\n    readonly updated_at?: string;\n    /**\n     * Created at\n     */\n    readonly created_at?: string;\n    /**\n     * Mime\n     */\n    mime: string;\n    /**\n     * File\n     */\n    readonly file?: string;\n};\n\nexport type Default = {\n    name?: string;\n};\n\nexport type Pageable = {\n    page?: number;\n    size?: number;\n    sort?: Array<string>;\n};\n\n/**\n * This is a free-form object without additionalProperties.\n */\nexport type FreeFormObjectWithoutAdditionalProperties = {\n    [key: string]: unknown;\n};\n\n/**\n * This is a free-form object with additionalProperties: true.\n */\nexport type FreeFormObjectWithAdditionalPropertiesEqTrue = {\n    [key: string]: unknown;\n};\n\n/**\n * This is a free-form object with additionalProperties: {}.\n */\nexport type FreeFormObjectWithAdditionalPropertiesEqEmptyObject = {\n    [key: string]: unknown;\n};\n\nexport type ModelWithConst = {\n    String?: 'String';\n    number?: 0;\n    null?: null;\n    withType?: 'Some string';\n};\n\n/**\n * This is a model with one property and additionalProperties: true\n */\nexport type ModelWithAdditionalPropertiesEqTrue = {\n    /**\n     * This is a simple string property\n     */\n    prop?: string;\n    [key: string]: unknown;\n};\n\nexport type NestedAnyOfArraysNullable = {\n    nullableArray?: Array<string | boolean> | null;\n};\n\nexport type CompositionWithOneOfAndProperties = ({\n    foo: SimpleParameter;\n} | {\n    bar: NonAsciiStringæøåÆøÅöôêÊ字符串;\n}) & {\n    baz: number | null;\n    qux: number;\n};\n\n/**\n * An object that can be null\n */\nexport type NullableObject = {\n    foo?: string;\n} | null;\n\n/**\n * Some % character\n */\nexport type CharactersInDescription = string;\n\nexport type ModelWithNullableObject = {\n    data?: NullableObject;\n};\n\n/**\n * An object with additional properties that can be null (anyOf ref + null)\n */\nexport type ModelWithAdditionalPropertiesRef = {\n    [key: string]: NullableObject | null;\n};\n\nexport type ModelWithOneOfEnum = {\n    foo: 'Bar';\n} | {\n    foo: 'Baz';\n} | {\n    foo: 'Qux';\n} | {\n    content: string;\n    foo: 'Quux';\n} | {\n    content: [\n        string,\n        string\n    ];\n    foo: 'Corge';\n};\n\nexport type ModelWithNestedArrayEnumsDataFoo = 'foo' | 'bar';\n\nexport type ModelWithNestedArrayEnumsDataBar = 'baz' | 'qux';\n\nexport type ModelWithNestedArrayEnumsData = {\n    foo?: Array<ModelWithNestedArrayEnumsDataFoo>;\n    bar?: Array<ModelWithNestedArrayEnumsDataBar>;\n};\n\nexport type ModelWithNestedArrayEnums = {\n    array_strings?: Array<string>;\n    data?: ModelWithNestedArrayEnumsData;\n};\n\nexport type ModelWithNestedCompositionEnums = {\n    foo?: ModelWithNestedArrayEnumsDataFoo;\n};\n\nexport type ModelWithReadOnlyAndWriteOnly = {\n    foo: string;\n    readonly bar: string;\n};\n\nexport type ModelWithConstantSizeArray = [\n    number,\n    number\n];\n\nexport type ModelWithAnyOfConstantSizeArray = [\n    number | string,\n    number | string,\n    number | string\n];\n\nexport type ModelWithPrefixItemsConstantSizeArray = [\n    ModelWithInteger,\n    number | string,\n    string\n];\n\nexport type ModelWithAnyOfConstantSizeArrayNullable = [\n    number | null | string,\n    number | null | string,\n    number | null | string\n];\n\nexport type ModelWithAnyOfConstantSizeArrayWithNSizeAndOptions = [\n    number | Import,\n    number | Import\n];\n\nexport type ModelWithAnyOfConstantSizeArrayAndIntersect = [\n    number & string,\n    number & string\n];\n\nexport type ModelWithNumericEnumUnion = {\n    /**\n     * Период\n     */\n    value?: -10 | -1 | 0 | 1 | 3 | 6 | 12;\n};\n\n/**\n * Some description with `back ticks`\n */\nexport type ModelWithBackticksInDescription = {\n    /**\n     * The template `that` should be used for parsing and importing the contents of the CSV file.\n     *\n     * <br/><p>There is one placeholder currently supported:<ul>     <li><b>${x}</b> - refers to the n-th column in the CSV file, e.g. ${1}, ${2}, ...)</li></ul><p>Example of a correct JSON template:</p>\n     * <pre>\n     * [\n     * {\n     * \"resourceType\": \"Asset\",\n     * \"identifier\": {\n     * \"name\": \"${1}\",\n     * \"domain\": {\n     * \"name\": \"${2}\",\n     * \"community\": {\n     * \"name\": \"Some Community\"\n     * }\n     * }\n     * },\n     * \"attributes\" : {\n     * \"00000000-0000-0000-0000-000000003115\" : [ {\n     * \"value\" : \"${3}\"\n     * } ],\n     * \"00000000-0000-0000-0000-000000000222\" : [ {\n     * \"value\" : \"${4}\"\n     * } ]\n     * }\n     * }\n     * ]\n     * </pre>\n     */\n    template?: string;\n};\n\nexport type ModelWithOneOfAndProperties = (SimpleParameter | NonAsciiStringæøåÆøÅöôêÊ字符串) & {\n    baz: number | null;\n    qux: number;\n};\n\n/**\n * Model used to test deduplication strategy (unused)\n */\nexport type ParameterSimpleParameterUnused = string;\n\n/**\n * Model used to test deduplication strategy\n */\nexport type PostServiceWithEmptyTagResponse = string;\n\n/**\n * Model used to test deduplication strategy\n */\nexport type PostServiceWithEmptyTagResponse2 = string;\n\n/**\n * Model used to test deduplication strategy\n */\nexport type DeleteFooData = string;\n\n/**\n * Model used to test deduplication strategy\n */\nexport type DeleteFooData2 = string;\n\n/**\n * Model with restricted keyword name\n */\nexport type Import = string;\n\nexport type SchemaWithFormRestrictedKeys = {\n    description?: string;\n    'x-enum-descriptions'?: string;\n    'x-enum-varnames'?: string;\n    'x-enumNames'?: string;\n    title?: string;\n    object?: {\n        description?: string;\n        'x-enum-descriptions'?: string;\n        'x-enum-varnames'?: string;\n        'x-enumNames'?: string;\n        title?: string;\n    };\n    array?: Array<{\n        description?: string;\n        'x-enum-descriptions'?: string;\n        'x-enum-varnames'?: string;\n        'x-enumNames'?: string;\n        title?: string;\n    }>;\n};\n\n/**\n * This schema was giving PascalCase transformations a hard time\n */\nexport type IoK8sApimachineryPkgApisMetaV1DeleteOptions = {\n    /**\n     * Must be fulfilled before a deletion is carried out. If not possible, a 409 Conflict status will be returned.\n     */\n    preconditions?: IoK8sApimachineryPkgApisMetaV1Preconditions;\n};\n\n/**\n * This schema was giving PascalCase transformations a hard time\n */\nexport type IoK8sApimachineryPkgApisMetaV1Preconditions = {\n    /**\n     * Specifies the target ResourceVersion\n     */\n    resourceVersion?: string;\n    /**\n     * Specifies the target UID.\n     */\n    uid?: string;\n};\n\nexport type AdditionalPropertiesUnknownIssue = {\n    [key: string]: string | number;\n};\n\nexport type AdditionalPropertiesUnknownIssue2 = {\n    [key: string]: string | number;\n};\n\nexport type AdditionalPropertiesUnknownIssue3 = string & {\n    entries: {\n        [key: string]: AdditionalPropertiesUnknownIssue;\n    };\n};\n\nexport type AdditionalPropertiesIntegerIssue = {\n    value: number;\n    [key: string]: number;\n};\n\nexport type OneOfAllOfIssue = ((ConstValue | GenericSchemaDuplicateIssue1SystemBoolean) & _3eNum1Период) | GenericSchemaDuplicateIssue1SystemString;\n\nexport type GenericSchemaDuplicateIssue1SystemBoolean = {\n    item?: boolean;\n    error?: string | null;\n    readonly hasError?: boolean;\n    data?: {\n        [key: string]: never;\n    };\n};\n\nexport type GenericSchemaDuplicateIssue1SystemString = {\n    item?: string | null;\n    error?: string | null;\n    readonly hasError?: boolean;\n};\n\nexport type ExternalSharedModel = {\n    id: string;\n    name?: string;\n};\n\n/**\n * This is a model with one property containing a reference\n */\nexport type ModelWithReferenceWritable = {\n    prop?: ModelWithPropertiesWritable;\n};\n\n/**\n * This is a model with one property containing an array\n */\nexport type ModelWithArrayReadOnlyAndWriteOnlyWritable = {\n    prop?: Array<ModelWithReadOnlyAndWriteOnlyWritable>;\n    propWithFile?: Array<Blob | File>;\n    propWithNumber?: Array<number>;\n};\n\n/**\n * This is a model with one nested property\n */\nexport type ModelWithPropertiesWritable = {\n    required: string;\n    requiredAndNullable: string | null;\n    string?: string;\n    number?: number;\n    boolean?: boolean;\n    reference?: ModelWithString;\n    'property with space'?: string;\n    default?: string;\n    try?: string;\n};\n\n/**\n * This is a model that contains a some patterns\n */\nexport type ModelWithPatternWritable = {\n    key: string;\n    name: string;\n    id?: string;\n    text?: string;\n    patternWithSingleQuotes?: string;\n    patternWithNewline?: string;\n    patternWithBacktick?: string;\n    patternWithUnicode?: string;\n};\n\nexport type FileWritable = {\n    /**\n     * Mime\n     */\n    mime: string;\n};\n\nexport type ModelWithReadOnlyAndWriteOnlyWritable = {\n    foo: string;\n    baz: string;\n};\n\nexport type ModelWithAnyOfConstantSizeArrayWithNSizeAndOptionsWritable = [\n    number | Import,\n    number | Import\n];\n\nexport type AdditionalPropertiesUnknownIssueWritable = {\n    [key: string]: string | number;\n};\n\nexport type OneOfAllOfIssueWritable = ((ConstValue | GenericSchemaDuplicateIssue1SystemBoolean) & _3eNum1Период) | GenericSchemaDuplicateIssue1SystemString;\n\nexport type GenericSchemaDuplicateIssue1SystemBooleanWritable = {\n    item?: boolean;\n    error?: string | null;\n    data?: {\n        [key: string]: never;\n    };\n};\n\nexport type GenericSchemaDuplicateIssue1SystemStringWritable = {\n    item?: string | null;\n    error?: string | null;\n};\n\n/**\n * This is a reusable parameter\n */\nexport type SimpleParameter = string;\n\n/**\n * Parameter with illegal characters\n */\nexport type XFooBar = ModelWithString;\n\n/**\n * A reusable request body\n */\nexport type SimpleRequestBody = ModelWithString;\n\n/**\n * A reusable request body\n */\nexport type SimpleFormData = ModelWithString;\n\nexport type ExportData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no+tag';\n};\n\nexport type PatchApiVbyApiVersionNoTagData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no+tag';\n};\n\nexport type PatchApiVbyApiVersionNoTagResponses = {\n    /**\n     * OK\n     */\n    default: unknown;\n};\n\nexport type ImportData = {\n    body: ModelWithReadOnlyAndWriteOnlyWritable | ModelWithArrayReadOnlyAndWriteOnlyWritable;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no+tag';\n};\n\nexport type ImportResponses = {\n    /**\n     * Success\n     */\n    200: ModelFromZendesk;\n    /**\n     * Default success response\n     */\n    default: ModelWithReadOnlyAndWriteOnly;\n};\n\nexport type ImportResponse = ImportResponses[keyof ImportResponses];\n\nexport type FooWowData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no+tag';\n};\n\nexport type FooWowResponses = {\n    /**\n     * OK\n     */\n    default: unknown;\n};\n\nexport type ApiVVersionODataControllerCountData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple/$count';\n};\n\nexport type ApiVVersionODataControllerCountResponses = {\n    /**\n     * Success\n     */\n    200: ModelFromZendesk;\n};\n\nexport type ApiVVersionODataControllerCountResponse = ApiVVersionODataControllerCountResponses[keyof ApiVVersionODataControllerCountResponses];\n\nexport type GetApiVbyApiVersionSimpleOperationData = {\n    body?: never;\n    path: {\n        /**\n         * foo in method\n         */\n        foo_param: string;\n    };\n    query?: never;\n    url: '/api/v{api-version}/simple:operation';\n};\n\nexport type GetApiVbyApiVersionSimpleOperationErrors = {\n    /**\n     * Default error response\n     */\n    default: ModelWithBoolean;\n};\n\nexport type GetApiVbyApiVersionSimpleOperationError = GetApiVbyApiVersionSimpleOperationErrors[keyof GetApiVbyApiVersionSimpleOperationErrors];\n\nexport type GetApiVbyApiVersionSimpleOperationResponses = {\n    /**\n     * Response is a simple number\n     */\n    200: number;\n};\n\nexport type GetApiVbyApiVersionSimpleOperationResponse = GetApiVbyApiVersionSimpleOperationResponses[keyof GetApiVbyApiVersionSimpleOperationResponses];\n\nexport type DeleteCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type GetCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type HeadCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type OptionsCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type PatchCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type PostCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type PutCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type DeleteFooData3 = {\n    body?: never;\n    headers: {\n        /**\n         * Parameter with illegal characters\n         */\n        'x-Foo-Bar': ModelWithString;\n    };\n    path: {\n        /**\n         * foo in method\n         */\n        foo_param: string;\n        /**\n         * bar in method\n         */\n        BarParam: string;\n    };\n    query?: never;\n    url: '/api/v{api-version}/foo/{foo_param}/bar/{BarParam}';\n};\n\nexport type CallWithDescriptionsData = {\n    body?: never;\n    path?: never;\n    query?: {\n        /**\n         * Testing multiline comments in string: First line\n         * Second line\n         *\n         * Fourth line\n         */\n        parameterWithBreaks?: string;\n        /**\n         * Testing backticks in string: `backticks` and ```multiple backticks``` should work\n         */\n        parameterWithBackticks?: string;\n        /**\n         * Testing slashes in string: \\backwards\\\\\\ and /forwards/// should work\n         */\n        parameterWithSlashes?: string;\n        /**\n         * Testing expression placeholders in string: ${expression} should work\n         */\n        parameterWithExpressionPlaceholders?: string;\n        /**\n         * Testing quotes in string: 'single quote''' and \"double quotes\"\"\" should work\n         */\n        parameterWithQuotes?: string;\n        /**\n         * Testing reserved characters in string: * inline * and ** inline ** should work\n         */\n        parameterWithReservedCharacters?: string;\n    };\n    url: '/api/v{api-version}/descriptions';\n};\n\nexport type DeprecatedCallData = {\n    body?: never;\n    headers: {\n        /**\n         * This parameter is deprecated\n         *\n         * @deprecated\n         */\n        parameter: DeprecatedModel | null;\n    };\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/parameters/deprecated';\n};\n\nexport type CallWithParametersData = {\n    /**\n     * This is the parameter that goes into the body\n     */\n    body: {\n        [key: string]: unknown;\n    } | null;\n    headers: {\n        /**\n         * This is the parameter that goes into the header\n         */\n        parameterHeader: string | null;\n    };\n    path: {\n        /**\n         * This is the parameter that goes into the path\n         */\n        parameterPath: string | null;\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string | null;\n    };\n    query: {\n        foo_ref_enum?: ModelWithNestedArrayEnumsDataFoo;\n        foo_all_of_enum: ModelWithNestedArrayEnumsDataFoo;\n        /**\n         * This is the parameter that goes into the query params\n         */\n        cursor: string | null;\n    };\n    url: '/api/v{api-version}/parameters/{parameterPath}';\n};\n\nexport type CallWithWeirdParameterNamesData = {\n    /**\n     * This is the parameter that goes into the body\n     */\n    body: ModelWithString | null;\n    headers: {\n        /**\n         * This is the parameter that goes into the request header\n         */\n        'parameter.header': string | null;\n    };\n    path: {\n        /**\n         * This is the parameter that goes into the path\n         */\n        'parameter.path.1'?: string;\n        /**\n         * This is the parameter that goes into the path\n         */\n        'parameter-path-2'?: string;\n        /**\n         * This is the parameter that goes into the path\n         */\n        'PARAMETER-PATH-3'?: string;\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string | null;\n    };\n    query: {\n        /**\n         * This is the parameter with a reserved keyword\n         */\n        default?: string;\n        /**\n         * This is the parameter that goes into the request query params\n         */\n        'parameter-query': string | null;\n    };\n    url: '/api/v{api-version}/parameters/{parameter.path.1}/{parameter-path-2}/{PARAMETER-PATH-3}';\n};\n\nexport type GetCallWithOptionalParamData = {\n    /**\n     * This is a required parameter\n     */\n    body: ModelWithOneOfEnum;\n    path?: never;\n    query?: {\n        /**\n         * This is an optional parameter\n         */\n        page?: number;\n    };\n    url: '/api/v{api-version}/parameters';\n};\n\nexport type PostCallWithOptionalParamData = {\n    /**\n     * This is an optional parameter\n     */\n    body?: {\n        offset?: number | null;\n    };\n    path?: never;\n    query: {\n        /**\n         * This is a required parameter\n         */\n        parameter: Pageable;\n    };\n    url: '/api/v{api-version}/parameters';\n};\n\nexport type PostCallWithOptionalParamResponses = {\n    /**\n     * Response is a simple number\n     */\n    200: number;\n    /**\n     * Success\n     */\n    204: void;\n};\n\nexport type PostCallWithOptionalParamResponse = PostCallWithOptionalParamResponses[keyof PostCallWithOptionalParamResponses];\n\nexport type PostApiVbyApiVersionRequestBodyData = {\n    /**\n     * A reusable request body\n     */\n    body?: SimpleRequestBody;\n    path?: never;\n    query?: {\n        /**\n         * This is a reusable parameter\n         */\n        parameter?: string;\n    };\n    url: '/api/v{api-version}/requestBody';\n};\n\nexport type PostApiVbyApiVersionFormDataData = {\n    /**\n     * A reusable request body\n     */\n    body?: SimpleFormData;\n    path?: never;\n    query?: {\n        /**\n         * This is a reusable parameter\n         */\n        parameter?: string;\n    };\n    url: '/api/v{api-version}/formData';\n};\n\nexport type CallWithDefaultParametersData = {\n    body?: never;\n    path?: never;\n    query?: {\n        /**\n         * This is a simple string with default value\n         */\n        parameterString?: string | null;\n        /**\n         * This is a simple number with default value\n         */\n        parameterNumber?: number | null;\n        /**\n         * This is a simple boolean with default value\n         */\n        parameterBoolean?: boolean | null;\n        /**\n         * This is a simple enum with default value\n         */\n        parameterEnum?: 'Success' | 'Warning' | 'Error';\n        /**\n         * This is a simple model with default value\n         */\n        parameterModel?: ModelWithString | null;\n    };\n    url: '/api/v{api-version}/defaults';\n};\n\nexport type CallWithDefaultOptionalParametersData = {\n    body?: never;\n    path?: never;\n    query?: {\n        /**\n         * This is a simple string that is optional with default value\n         */\n        parameterString?: string;\n        /**\n         * This is a simple number that is optional with default value\n         */\n        parameterNumber?: number;\n        /**\n         * This is a simple boolean that is optional with default value\n         */\n        parameterBoolean?: boolean;\n        /**\n         * This is a simple enum that is optional with default value\n         */\n        parameterEnum?: 'Success' | 'Warning' | 'Error';\n        /**\n         * This is a simple model that is optional with default value\n         */\n        parameterModel?: ModelWithString;\n    };\n    url: '/api/v{api-version}/defaults';\n};\n\nexport type CallToTestOrderOfParamsData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * This is a optional string with default\n         */\n        parameterOptionalStringWithDefault?: string;\n        /**\n         * This is a optional string with empty default\n         */\n        parameterOptionalStringWithEmptyDefault?: string;\n        /**\n         * This is a optional string with no default\n         */\n        parameterOptionalStringWithNoDefault?: string;\n        /**\n         * This is a string with default\n         */\n        parameterStringWithDefault: string;\n        /**\n         * This is a string with empty default\n         */\n        parameterStringWithEmptyDefault: string;\n        /**\n         * This is a string with no default\n         */\n        parameterStringWithNoDefault: string;\n        /**\n         * This is a string that can be null with no default\n         */\n        parameterStringNullableWithNoDefault?: string | null;\n        /**\n         * This is a string that can be null with default\n         */\n        parameterStringNullableWithDefault?: string | null;\n    };\n    url: '/api/v{api-version}/defaults';\n};\n\nexport type DuplicateNameData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/duplicate';\n};\n\nexport type DuplicateName2Data = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/duplicate';\n};\n\nexport type DuplicateName3Data = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/duplicate';\n};\n\nexport type DuplicateName4Data = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/duplicate';\n};\n\nexport type CallWithNoContentResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no-content';\n};\n\nexport type CallWithNoContentResponseResponses = {\n    /**\n     * Success\n     */\n    204: void;\n};\n\nexport type CallWithNoContentResponseResponse = CallWithNoContentResponseResponses[keyof CallWithNoContentResponseResponses];\n\nexport type CallWithResponseAndNoContentResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multiple-tags/response-and-no-content';\n};\n\nexport type CallWithResponseAndNoContentResponseResponses = {\n    /**\n     * Response is a simple number\n     */\n    200: number;\n    /**\n     * Success\n     */\n    204: void;\n};\n\nexport type CallWithResponseAndNoContentResponseResponse = CallWithResponseAndNoContentResponseResponses[keyof CallWithResponseAndNoContentResponseResponses];\n\nexport type DummyAData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multiple-tags/a';\n};\n\nexport type DummyAResponses = {\n    200: _400;\n};\n\nexport type DummyAResponse = DummyAResponses[keyof DummyAResponses];\n\nexport type DummyBData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multiple-tags/b';\n};\n\nexport type DummyBResponses = {\n    /**\n     * Success\n     */\n    204: void;\n};\n\nexport type DummyBResponse = DummyBResponses[keyof DummyBResponses];\n\nexport type CallWithResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/response';\n};\n\nexport type CallWithResponseResponses = {\n    default: Import;\n};\n\nexport type CallWithResponseResponse = CallWithResponseResponses[keyof CallWithResponseResponses];\n\nexport type CallWithDuplicateResponsesData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/response';\n};\n\nexport type CallWithDuplicateResponsesErrors = {\n    /**\n     * Message for 500 error\n     */\n    500: ModelWithStringError;\n    /**\n     * Message for 501 error\n     */\n    501: ModelWithStringError;\n    /**\n     * Message for 502 error\n     */\n    502: ModelWithStringError;\n    /**\n     * Message for 4XX errors\n     */\n    '4XX': DictionaryWithArray;\n    /**\n     * Default error response\n     */\n    default: ModelWithBoolean;\n};\n\nexport type CallWithDuplicateResponsesError = CallWithDuplicateResponsesErrors[keyof CallWithDuplicateResponsesErrors];\n\nexport type CallWithDuplicateResponsesResponses = {\n    /**\n     * Message for 200 response\n     */\n    200: ModelWithBoolean & ModelWithInteger;\n    /**\n     * Message for 201 response\n     */\n    201: ModelWithString;\n    /**\n     * Message for 202 response\n     */\n    202: ModelWithString;\n};\n\nexport type CallWithDuplicateResponsesResponse = CallWithDuplicateResponsesResponses[keyof CallWithDuplicateResponsesResponses];\n\nexport type CallWithResponsesData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/response';\n};\n\nexport type CallWithResponsesErrors = {\n    /**\n     * Message for 500 error\n     */\n    500: ModelWithStringError;\n    /**\n     * Message for 501 error\n     */\n    501: ModelWithStringError;\n    /**\n     * Message for 502 error\n     */\n    502: ModelWithStringError;\n    /**\n     * Message for default response\n     */\n    default: ModelWithStringError;\n};\n\nexport type CallWithResponsesError = CallWithResponsesErrors[keyof CallWithResponsesErrors];\n\nexport type CallWithResponsesResponses = {\n    /**\n     * Message for 200 response\n     */\n    200: {\n        readonly '@namespace.string'?: string;\n        readonly '@namespace.integer'?: number;\n        readonly value?: Array<ModelWithString>;\n    };\n    /**\n     * Message for 201 response\n     */\n    201: ModelThatExtends;\n    /**\n     * Message for 202 response\n     */\n    202: ModelThatExtendsExtends;\n};\n\nexport type CallWithResponsesResponse = CallWithResponsesResponses[keyof CallWithResponsesResponses];\n\nexport type CollectionFormatData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * This is an array parameter that is sent as csv format (comma-separated values)\n         */\n        parameterArrayCSV: Array<string> | null;\n        /**\n         * This is an array parameter that is sent as ssv format (space-separated values)\n         */\n        parameterArraySSV: Array<string> | null;\n        /**\n         * This is an array parameter that is sent as tsv format (tab-separated values)\n         */\n        parameterArrayTSV: Array<string> | null;\n        /**\n         * This is an array parameter that is sent as pipes format (pipe-separated values)\n         */\n        parameterArrayPipes: Array<string> | null;\n        /**\n         * This is an array parameter that is sent as multi format (multiple parameter instances)\n         */\n        parameterArrayMulti: Array<string> | null;\n    };\n    url: '/api/v{api-version}/collectionFormat';\n};\n\nexport type TypesData = {\n    body?: never;\n    path?: {\n        /**\n         * This is a number parameter\n         */\n        id?: number;\n    };\n    query: {\n        /**\n         * This is a number parameter\n         */\n        parameterNumber: number;\n        /**\n         * This is a string parameter\n         */\n        parameterString: string | null;\n        /**\n         * This is a boolean parameter\n         */\n        parameterBoolean: boolean | null;\n        /**\n         * This is an object parameter\n         */\n        parameterObject: {\n            [key: string]: unknown;\n        } | null;\n        /**\n         * This is an array parameter\n         */\n        parameterArray: Array<string> | null;\n        /**\n         * This is a dictionary parameter\n         */\n        parameterDictionary: {\n            [key: string]: unknown;\n        } | null;\n        /**\n         * This is an enum parameter\n         */\n        parameterEnum: 'Success' | 'Warning' | 'Error' | null;\n    };\n    url: '/api/v{api-version}/types';\n};\n\nexport type TypesResponses = {\n    /**\n     * Response is a simple number\n     */\n    200: number;\n    /**\n     * Response is a simple string\n     */\n    201: string;\n    /**\n     * Response is a simple boolean\n     */\n    202: boolean;\n    /**\n     * Response is a simple object\n     */\n    203: {\n        [key: string]: unknown;\n    };\n};\n\nexport type TypesResponse = TypesResponses[keyof TypesResponses];\n\nexport type UploadFileData = {\n    body: Blob | File;\n    path: {\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string | null;\n    };\n    query?: never;\n    url: '/api/v{api-version}/upload';\n};\n\nexport type UploadFileResponses = {\n    200: boolean;\n};\n\nexport type UploadFileResponse = UploadFileResponses[keyof UploadFileResponses];\n\nexport type FileResponseData = {\n    body?: never;\n    path: {\n        id: string;\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string;\n    };\n    query?: never;\n    url: '/api/v{api-version}/file/{id}';\n};\n\nexport type FileResponseResponses = {\n    /**\n     * Success\n     */\n    200: Blob | File;\n};\n\nexport type FileResponseResponse = FileResponseResponses[keyof FileResponseResponses];\n\nexport type ComplexTypesData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * Parameter containing object\n         */\n        parameterObject: {\n            first?: {\n                second?: {\n                    third?: string;\n                };\n            };\n        };\n        /**\n         * Parameter containing reference\n         */\n        parameterReference: ModelWithString;\n    };\n    url: '/api/v{api-version}/complex';\n};\n\nexport type ComplexTypesErrors = {\n    /**\n     * 400 `server` error\n     */\n    400: unknown;\n    /**\n     * 500 server error\n     */\n    500: unknown;\n};\n\nexport type ComplexTypesResponses = {\n    /**\n     * Successful response\n     */\n    200: Array<ModelWithString>;\n};\n\nexport type ComplexTypesResponse = ComplexTypesResponses[keyof ComplexTypesResponses];\n\nexport type MultipartResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multipart';\n};\n\nexport type MultipartResponseResponses = {\n    /**\n     * OK\n     */\n    200: {\n        file?: Blob | File;\n        metadata?: {\n            foo?: string;\n            bar?: string;\n        };\n    };\n};\n\nexport type MultipartResponseResponse = MultipartResponseResponses[keyof MultipartResponseResponses];\n\nexport type MultipartRequestData = {\n    body?: {\n        content?: Blob | File;\n        data?: ModelWithString | null;\n    };\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multipart';\n};\n\nexport type ComplexParamsData = {\n    body?: {\n        readonly key: string | null;\n        name: string | null;\n        enabled?: boolean;\n        type: 'Monkey' | 'Horse' | 'Bird';\n        listOfModels?: Array<ModelWithString> | null;\n        listOfStrings?: Array<string> | null;\n        parameters: ModelWithString | ModelWithEnum | ModelWithArray | ModelWithDictionary;\n        readonly user?: {\n            readonly id?: number;\n            readonly name?: string | null;\n        };\n    };\n    path: {\n        id: number;\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string;\n    };\n    query?: never;\n    url: '/api/v{api-version}/complex/{id}';\n};\n\nexport type ComplexParamsResponses = {\n    /**\n     * Success\n     */\n    200: ModelWithString;\n};\n\nexport type ComplexParamsResponse = ComplexParamsResponses[keyof ComplexParamsResponses];\n\nexport type CallWithResultFromHeaderData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/header';\n};\n\nexport type CallWithResultFromHeaderErrors = {\n    /**\n     * 400 server error\n     */\n    400: unknown;\n    /**\n     * 500 server error\n     */\n    500: unknown;\n};\n\nexport type CallWithResultFromHeaderResponses = {\n    /**\n     * Successful response\n     */\n    200: unknown;\n};\n\nexport type TestErrorCodeData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * Status code to return\n         */\n        status: number;\n    };\n    url: '/api/v{api-version}/error';\n};\n\nexport type TestErrorCodeErrors = {\n    /**\n     * Custom message: Internal Server Error\n     */\n    500: unknown;\n    /**\n     * Custom message: Not Implemented\n     */\n    501: unknown;\n    /**\n     * Custom message: Bad Gateway\n     */\n    502: unknown;\n    /**\n     * Custom message: Service Unavailable\n     */\n    503: unknown;\n};\n\nexport type TestErrorCodeResponses = {\n    /**\n     * Custom message: Successful response\n     */\n    200: unknown;\n};\n\nexport type NonAsciiæøåÆøÅöôêÊ字符串Data = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * Dummy input param\n         */\n        nonAsciiParamæøåÆØÅöôêÊ: number;\n    };\n    url: '/api/v{api-version}/non-ascii-æøåÆØÅöôêÊ字符串';\n};\n\nexport type NonAsciiæøåÆøÅöôêÊ字符串Responses = {\n    /**\n     * Successful response\n     */\n    200: Array<NonAsciiStringæøåÆøÅöôêÊ字符串>;\n};\n\nexport type NonAsciiæøåÆøÅöôêÊ字符串Response = NonAsciiæøåÆøÅöôêÊ字符串Responses[keyof NonAsciiæøåÆøÅöôêÊ字符串Responses];\n\nexport type PutWithFormUrlEncodedData = {\n    body: ArrayWithStrings;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/non-ascii-æøåÆØÅöôêÊ字符串';\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-angular/base-url-strict/client/client.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { HttpResponse } from '@angular/common/http';\nimport { HttpClient, HttpErrorResponse, HttpEventType, HttpRequest } from '@angular/common/http';\nimport {\n  assertInInjectionContext,\n  inject,\n  provideAppInitializer,\n  runInInjectionContext,\n} from '@angular/core';\nimport { firstValueFrom } from 'rxjs';\nimport { filter } from 'rxjs/operators';\n\nimport { createSseClient } from '../core/serverSentEvents.gen';\nimport type { HttpMethod } from '../core/types.gen';\nimport { getValidRequestBody } from '../core/utils.gen';\nimport type {\n  Client,\n  Config,\n  RequestOptions,\n  ResolvedRequestOptions,\n  ResponseStyle,\n} from './types.gen';\nimport {\n  buildUrl,\n  createConfig,\n  createInterceptors,\n  mergeConfigs,\n  mergeHeaders,\n  setAuthParams,\n} from './utils.gen';\n\nexport function provideHeyApiClient(client: Client) {\n  return provideAppInitializer(() => {\n    const httpClient = inject(HttpClient);\n    client.setConfig({ httpClient });\n  });\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<\n    HttpRequest<unknown>,\n    HttpResponse<unknown>,\n    unknown,\n    ResolvedRequestOptions\n  >();\n\n  const requestOptions = <\n    TData = unknown,\n    ThrowOnError extends boolean = false,\n    TResponseStyle extends ResponseStyle = 'fields',\n  >(\n    options: RequestOptions<TData, TResponseStyle, ThrowOnError>,\n  ) => {\n    const opts = {\n      ..._config,\n      ...options,\n      headers: mergeHeaders(_config.headers, options.headers),\n      httpClient: options.httpClient ?? _config.httpClient,\n      serializedBody: undefined as string | undefined,\n    };\n\n    if (!opts.httpClient) {\n      if (opts.injector) {\n        opts.httpClient = runInInjectionContext(opts.injector, () => inject(HttpClient));\n      } else {\n        assertInInjectionContext(requestOptions);\n        opts.httpClient = inject(HttpClient);\n      }\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 url = buildUrl(opts as any);\n\n    const req = new HttpRequest<unknown>(opts.method ?? 'GET', url, getValidRequestBody(opts), {\n      redirect: 'follow',\n      ...opts,\n    });\n\n    return { opts, req, url };\n  };\n\n  const beforeRequest = async (options: RequestOptions) => {\n    const { opts, req, url } = requestOptions(options);\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    return { opts, req, url };\n  };\n\n  const request: Client['request'] = async (options) => {\n    // @ts-expect-error\n    const { opts, req: initialReq } = await beforeRequest(options);\n\n    let req = initialReq;\n\n    for (const fn of interceptors.request.fns) {\n      if (fn) {\n        req = await fn(req, opts as any);\n      }\n    }\n\n    const result: {\n      request: HttpRequest<unknown>;\n      response: any;\n    } = {\n      request: req,\n      response: null,\n    };\n\n    try {\n      result.response = (await firstValueFrom(\n        opts\n          .httpClient!.request(req)\n          .pipe(filter((event) => event.type === HttpEventType.Response)),\n      )) as HttpResponse<unknown>;\n\n      for (const fn of interceptors.response.fns) {\n        if (fn) {\n          result.response = await fn(result.response, req, opts as any);\n        }\n      }\n\n      let bodyResponse = result.response.body;\n\n      if (opts.responseValidator) {\n        await opts.responseValidator(bodyResponse);\n      }\n\n      if (opts.responseTransformer) {\n        bodyResponse = await opts.responseTransformer(bodyResponse);\n      }\n\n      return opts.responseStyle === 'data' ? bodyResponse : { data: bodyResponse, ...result };\n    } catch (error) {\n      if (error instanceof HttpErrorResponse) {\n        result.response = error;\n      }\n\n      let finalError = error instanceof HttpErrorResponse ? error.error : error;\n\n      for (const fn of interceptors.error.fns) {\n        if (fn) {\n          finalError = (await fn(finalError, result.response as any, req, opts as any)) as string;\n        }\n      }\n\n      if (opts.throwOnError) {\n        throw finalError;\n      }\n\n      return opts.responseStyle === 'data'\n        ? undefined\n        : {\n            error: finalError,\n            ...result,\n          };\n    }\n  };\n\n  const makeMethodFn = (method: Uppercase<HttpMethod>) => (options: RequestOptions) =>\n    request({ ...options, method });\n\n  const makeSseFn = (method: Uppercase<HttpMethod>) => async (options: RequestOptions) => {\n    const { opts, url } = await beforeRequest(options);\n    return createSseClient({\n      ...opts,\n      body: opts.body as BodyInit | null | undefined,\n      headers: opts.headers as unknown as Record<string, string>,\n      method,\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    requestOptions: (options) => {\n      if (options.security) {\n        throw new Error('Security is not supported in requestOptions');\n      }\n\n      if (options.requestValidator) {\n        throw new Error('Request validation is not supported in requestOptions');\n      }\n\n      return requestOptions(options).req;\n    },\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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-angular/base-url-strict/client/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type { Auth } from '../core/auth.gen';\nexport type { QuerySerializerOptions } from '../core/bodySerializer.gen';\nexport {\n  formDataBodySerializer,\n  jsonBodySerializer,\n  urlSearchParamsBodySerializer,\n} from '../core/bodySerializer.gen';\nexport { buildClientParams } from '../core/params.gen';\nexport { serializeQueryKeyValue } from '../core/queryKeySerializer.gen';\nexport { createClient } from './client.gen';\nexport type {\n  Client,\n  ClientOptions,\n  Config,\n  CreateClientConfig,\n  Options,\n  RequestOptions,\n  RequestResult,\n  ResolvedRequestOptions,\n  ResponseStyle,\n  TDataShape,\n} from './types.gen';\nexport { createConfig, mergeHeaders } from './utils.gen';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-angular/base-url-strict/client/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type {\n  HttpClient,\n  HttpErrorResponse,\n  HttpHeaders,\n  HttpRequest,\n  HttpResponse,\n} from '@angular/common/http';\nimport type { Injector } from '@angular/core';\n\nimport type { Auth } from '../core/auth.gen';\nimport type {\n  ServerSentEventsOptions,\n  ServerSentEventsResult,\n} from '../core/serverSentEvents.gen';\nimport type { Client as CoreClient, Config as CoreConfig } from '../core/types.gen';\nimport type { Middleware } from './utils.gen';\n\nexport type ResponseStyle = 'data' | 'fields';\n\nexport interface Config<T extends ClientOptions = ClientOptions>\n  extends Omit<RequestInit, 'body' | 'headers' | 'method'>, Omit<CoreConfig, 'headers'> {\n  /**\n   * Base URL for all requests made by this client.\n   */\n  baseUrl?: T['baseUrl'];\n  /**\n   * An object containing any HTTP headers that you want to pre-populate your\n   * `HttpHeaders` object with.\n   *\n   * {@link https://angular.dev/api/common/http/HttpHeaders#constructor See more}\n   */\n  headers?:\n    | HttpHeaders\n    | Record<\n        string,\n        string | number | boolean | (string | number | boolean)[] | null | undefined | unknown\n      >;\n  /**\n   * The HTTP client to use for making requests.\n   */\n  httpClient?: HttpClient;\n  /**\n   * Should we return only data or multiple fields (data, error, response, etc.)?\n   *\n   * @default 'fields'\n   */\n  responseStyle?: ResponseStyle;\n\n  /**\n   * Throw an error instead of returning it in the response?\n   *\n   * @default false\n   */\n  throwOnError?: T['throwOnError'];\n}\n\nexport interface RequestOptions<\n  TData = unknown,\n  TResponseStyle extends ResponseStyle = 'fields',\n  ThrowOnError extends boolean = boolean,\n  Url extends string = string,\n>\n  extends\n    Config<{\n      responseStyle: TResponseStyle;\n      throwOnError: ThrowOnError;\n    }>,\n    Pick<\n      ServerSentEventsOptions<TData>,\n      | 'onRequest'\n      | 'onSseError'\n      | 'onSseEvent'\n      | 'sseDefaultRetryDelay'\n      | 'sseMaxRetryAttempts'\n      | 'sseMaxRetryDelay'\n    > {\n  /**\n   * Any body that you want to add to your request.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/fetch#body}\n   */\n  body?: unknown;\n  /**\n   * Optional custom injector for dependency resolution if you don't implicitly or explicitly provide one.\n   */\n  injector?: Injector;\n  path?: Record<string, unknown>;\n  query?: Record<string, unknown>;\n  /**\n   * Security mechanism(s) to use for the request.\n   */\n  security?: ReadonlyArray<Auth>;\n  url: Url;\n}\n\nexport interface ResolvedRequestOptions<\n  TResponseStyle extends ResponseStyle = 'fields',\n  ThrowOnError extends boolean = boolean,\n  Url extends string = string,\n> extends RequestOptions<unknown, TResponseStyle, ThrowOnError, Url> {\n  serializedBody?: string;\n}\n\nexport type RequestResult<\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = boolean,\n  TResponseStyle extends ResponseStyle = 'fields',\n> = Promise<\n  ThrowOnError extends true\n    ? TResponseStyle extends 'data'\n      ? TData extends Record<string, unknown>\n        ? TData[keyof TData]\n        : TData\n      : {\n          data: TData extends Record<string, unknown> ? TData[keyof TData] : TData;\n          request: HttpRequest<unknown>;\n          response: HttpResponse<TData>;\n        }\n    : TResponseStyle extends 'data'\n      ? (TData extends Record<string, unknown> ? TData[keyof TData] : TData) | undefined\n      :\n          | {\n              data: TData extends Record<string, unknown> ? TData[keyof TData] : TData;\n              error: undefined;\n              request: HttpRequest<unknown>;\n              response: HttpResponse<TData>;\n            }\n          | {\n              data: undefined;\n              error: TError[keyof TError];\n              request: HttpRequest<unknown>;\n              response: HttpErrorResponse & {\n                error: TError[keyof TError] | null;\n              };\n            }\n>;\n\nexport interface ClientOptions {\n  baseUrl?: string;\n  responseStyle?: ResponseStyle;\n  throwOnError?: boolean;\n}\n\ntype MethodFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'>,\n) => RequestResult<TData, TError, ThrowOnError, TResponseStyle>;\n\ntype SseFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'>,\n) => Promise<ServerSentEventsResult<TData, TError>>;\n\ntype RequestFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'> &\n    Pick<Required<RequestOptions<TData, TResponseStyle, ThrowOnError>>, 'method'>,\n) => RequestResult<TData, TError, ThrowOnError, TResponseStyle>;\n\ntype RequestOptionsFn = <\n  T,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: RequestOptions<T, TResponseStyle, ThrowOnError>,\n) => HttpRequest<T>;\n\ntype BuildUrlFn = <\n  TData extends {\n    body?: unknown;\n    path?: Record<string, unknown>;\n    query?: Record<string, unknown>;\n    url: string;\n  },\n>(\n  options: TData & Options<TData>,\n) => string;\n\nexport type Client = CoreClient<RequestFn, Config, MethodFn, BuildUrlFn, SseFn> & {\n  interceptors: Middleware<\n    HttpRequest<unknown>,\n    HttpResponse<unknown>,\n    unknown,\n    ResolvedRequestOptions\n  >;\n  requestOptions: RequestOptionsFn;\n};\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 = ClientOptions> = (\n  override?: Config<ClientOptions & T>,\n) => Config<Required<ClientOptions> & T>;\n\nexport interface TDataShape {\n  body?: unknown;\n  headers?: unknown;\n  path?: unknown;\n  query?: unknown;\n  url: string;\n}\n\ntype OmitKeys<T, K> = Pick<T, Exclude<keyof T, K>>;\n\nexport type Options<\n  TData extends TDataShape = TDataShape,\n  ThrowOnError extends boolean = boolean,\n  TResponse = unknown,\n  TResponseStyle extends ResponseStyle = 'fields',\n> = OmitKeys<\n  RequestOptions<TResponse, TResponseStyle, ThrowOnError>,\n  'body' | 'path' | 'query' | 'url'\n> &\n  ([TData] extends [never] ? unknown : Omit<TData, 'url'>);\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-angular/base-url-strict/client/utils.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport { HttpHeaders } from '@angular/common/http';\n\nimport { getAuthToken } from '../core/auth.gen';\nimport type {\n  QuerySerializer,\n  QuerySerializerOptions,\n} from '../core/bodySerializer.gen';\nimport {\n  serializeArrayParam,\n  serializeObjectParam,\n  serializePrimitiveParam,\n} from '../core/pathSerializer.gen';\nimport type { Client, ClientOptions, Config, RequestOptions } from './types.gen';\n\ninterface PathSerializer {\n  path: Record<string, unknown>;\n  url: string;\n}\n\nconst PATH_PARAM_RE = /\\{[^{}]+\\}/g;\n\ntype ArrayStyle = 'form' | 'spaceDelimited' | 'pipeDelimited';\ntype MatrixStyle = 'label' | 'matrix' | 'simple';\ntype ArraySeparatorStyle = ArrayStyle | MatrixStyle;\n\nconst 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 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 = (\n  contentType: string | null,\n): 'blob' | 'formData' | 'json' | 'stream' | 'text' | undefined => {\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\nexport const setAuthParams = async (\n  options: Pick<Required<RequestOptions>, 'security'> &\n    Pick<RequestOptions, 'auth' | 'query'> & {\n      headers: HttpHeaders;\n    },\n) => {\n  for (const auth of options.security) {\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 = options.headers.append('Cookie', `${name}=${token}`);\n        break;\n      case 'header':\n      default:\n        options.headers = options.headers.set(name, token);\n        break;\n    }\n\n    return;\n  }\n};\n\nexport const buildUrl: Client['buildUrl'] = (options) => {\n  const url = 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  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 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\nexport const mergeHeaders = (\n  ...headers: Array<Required<Config>['headers'] | undefined>\n): HttpHeaders => {\n  let mergedHeaders = new HttpHeaders();\n\n  for (const header of headers) {\n    if (!header || typeof header !== 'object') {\n      continue;\n    }\n\n    if (header instanceof HttpHeaders) {\n      // Merge HttpHeaders instance\n      header.keys().forEach((key) => {\n        const values = header.getAll(key);\n        if (values) {\n          values.forEach((value) => {\n            mergedHeaders = mergedHeaders.append(key, value);\n          });\n        }\n      });\n    } else {\n      // Merge plain object headers\n      for (const [key, value] of Object.entries(header)) {\n        if (value === null) {\n          mergedHeaders = mergedHeaders.delete(key);\n        } else if (Array.isArray(value)) {\n          for (const v of value) {\n            mergedHeaders = 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 = mergedHeaders.set(\n            key,\n            typeof value === 'object' ? JSON.stringify(value) : (value as string),\n          );\n        }\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  headers: defaultHeaders,\n  querySerializer: defaultQuerySerializer,\n  ...override,\n});\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-angular/base-url-strict/client.gen.ts",
    "content": "// 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: 'http://localhost:3000/base' }));\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-angular/base-url-strict/core/auth.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-angular/base-url-strict/core/bodySerializer.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-angular/base-url-strict/core/params.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-angular/base-url-strict/core/pathSerializer.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-angular/base-url-strict/core/queryKeySerializer.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\n/**\n * JSON-friendly union that mirrors what Pinia Colada can hash.\n */\nexport type JsonValue =\n  | null\n  | string\n  | number\n  | boolean\n  | JsonValue[]\n  | { [key: string]: JsonValue };\n\n/**\n * Replacer that converts non-JSON values (bigint, Date, etc.) to safe substitutes.\n */\nexport const queryKeyJsonReplacer = (_key: string, value: unknown) => {\n  if (value === undefined || typeof value === 'function' || typeof value === 'symbol') {\n    return undefined;\n  }\n  if (typeof value === 'bigint') {\n    return value.toString();\n  }\n  if (value instanceof Date) {\n    return value.toISOString();\n  }\n  return value;\n};\n\n/**\n * Safely stringifies a value and parses it back into a JsonValue.\n */\nexport const stringifyToJsonValue = (input: unknown): JsonValue | undefined => {\n  try {\n    const json = JSON.stringify(input, queryKeyJsonReplacer);\n    if (json === undefined) {\n      return undefined;\n    }\n    return JSON.parse(json) as JsonValue;\n  } catch {\n    return undefined;\n  }\n};\n\n/**\n * Detects plain objects (including objects with a null prototype).\n */\nconst isPlainObject = (value: unknown): value is Record<string, unknown> => {\n  if (value === null || typeof value !== 'object') {\n    return false;\n  }\n  const prototype = Object.getPrototypeOf(value as object);\n  return prototype === Object.prototype || prototype === null;\n};\n\n/**\n * Turns URLSearchParams into a sorted JSON object for deterministic keys.\n */\nconst serializeSearchParams = (params: URLSearchParams): JsonValue => {\n  const entries = Array.from(params.entries()).sort(([a], [b]) => a.localeCompare(b));\n  const result: Record<string, JsonValue> = {};\n\n  for (const [key, value] of entries) {\n    const existing = result[key];\n    if (existing === undefined) {\n      result[key] = value;\n      continue;\n    }\n\n    if (Array.isArray(existing)) {\n      (existing as string[]).push(value);\n    } else {\n      result[key] = [existing, value];\n    }\n  }\n\n  return result;\n};\n\n/**\n * Normalizes any accepted value into a JSON-friendly shape for query keys.\n */\nexport const serializeQueryKeyValue = (value: unknown): JsonValue | undefined => {\n  if (value === null) {\n    return null;\n  }\n\n  if (typeof value === 'string' || typeof value === 'number' || typeof value === 'boolean') {\n    return value;\n  }\n\n  if (value === undefined || typeof value === 'function' || typeof value === 'symbol') {\n    return undefined;\n  }\n\n  if (typeof value === 'bigint') {\n    return value.toString();\n  }\n\n  if (value instanceof Date) {\n    return value.toISOString();\n  }\n\n  if (Array.isArray(value)) {\n    return stringifyToJsonValue(value);\n  }\n\n  if (typeof URLSearchParams !== 'undefined' && value instanceof URLSearchParams) {\n    return serializeSearchParams(value);\n  }\n\n  if (isPlainObject(value)) {\n    return stringifyToJsonValue(value);\n  }\n\n  return undefined;\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-angular/base-url-strict/core/serverSentEvents.gen.ts",
    "content": "// 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 const 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            // Normalize line endings: CRLF -> LF, then CR -> LF\n            buffer = buffer.replace(/\\r\\n/g, '\\n').replace(/\\r/g, '\\n');\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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-angular/base-url-strict/core/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { Auth, AuthToken } from './auth.gen';\nimport type { BodySerializer, QuerySerializer, QuerySerializerOptions } from './bodySerializer.gen';\n\nexport type HttpMethod =\n  | 'connect'\n  | 'delete'\n  | 'get'\n  | 'head'\n  | 'options'\n  | 'patch'\n  | 'post'\n  | 'put'\n  | 'trace';\n\nexport type Client<\n  RequestFn = never,\n  Config = unknown,\n  MethodFn = never,\n  BuildUrlFn = never,\n  SseFn = never,\n> = {\n  /**\n   * Returns the final request URL.\n   */\n  buildUrl: BuildUrlFn;\n  getConfig: () => Config;\n  request: RequestFn;\n  setConfig: (config: Config) => Config;\n} & {\n  [K in HttpMethod]: MethodFn;\n} & ([SseFn] extends [never] ? { sse?: never } : { sse: { [K in HttpMethod]: SseFn } });\n\nexport interface Config {\n  /**\n   * Auth token or a function returning auth token. The resolved value will be\n   * added to the request payload as defined by its `security` array.\n   */\n  auth?: ((auth: Auth) => Promise<AuthToken> | AuthToken) | AuthToken;\n  /**\n   * A function for serializing request body parameter. By default,\n   * {@link JSON.stringify()} will be used.\n   */\n  bodySerializer?: BodySerializer | null;\n  /**\n   * An object containing any HTTP headers that you want to pre-populate your\n   * `Headers` object with.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/Headers/Headers#init See more}\n   */\n  headers?:\n    | RequestInit['headers']\n    | Record<\n        string,\n        string | number | boolean | (string | number | boolean)[] | null | undefined | unknown\n      >;\n  /**\n   * The request method.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/fetch#method See more}\n   */\n  method?: Uppercase<HttpMethod>;\n  /**\n   * A function for serializing request query parameters. By default, arrays\n   * will be exploded in form style, objects will be exploded in deepObject\n   * style, and reserved characters are percent-encoded.\n   *\n   * This method will have no effect if the native `paramsSerializer()` Axios\n   * API function is used.\n   *\n   * {@link https://swagger.io/docs/specification/serialization/#query View examples}\n   */\n  querySerializer?: QuerySerializer | QuerySerializerOptions;\n  /**\n   * A function validating request data. This is useful if you want to ensure\n   * the request conforms to the desired shape, so it can be safely sent to\n   * the server.\n   */\n  requestValidator?: (data: unknown) => Promise<unknown>;\n  /**\n   * A function transforming response data before it's returned. This is useful\n   * for post-processing data, e.g. converting ISO strings into Date objects.\n   */\n  responseTransformer?: (data: unknown) => Promise<unknown>;\n  /**\n   * A function validating response data. This is useful if you want to ensure\n   * the response conforms to the desired shape, so it can be safely passed to\n   * the transformers and returned to the user.\n   */\n  responseValidator?: (data: unknown) => Promise<unknown>;\n}\n\ntype IsExactlyNeverOrNeverUndefined<T> = [T] extends [never]\n  ? true\n  : [T] extends [never | undefined]\n    ? [undefined] extends [T]\n      ? false\n      : true\n    : false;\n\nexport type OmitNever<T extends Record<string, unknown>> = {\n  [K in keyof T as IsExactlyNeverOrNeverUndefined<T[K]> extends true ? never : K]: T[K];\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-angular/base-url-strict/core/utils.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-angular/base-url-strict/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type { _3eNum1Период, _400, AdditionalPropertiesIntegerIssue, AdditionalPropertiesUnknownIssue, AdditionalPropertiesUnknownIssue2, AdditionalPropertiesUnknownIssue3, AdditionalPropertiesUnknownIssueWritable, AnyOfAnyAndNull, AnyOfArrays, ApiVVersionODataControllerCountData, ApiVVersionODataControllerCountResponse, ApiVVersionODataControllerCountResponses, ArrayWithAnyOfProperties, ArrayWithArray, ArrayWithBooleans, ArrayWithNumbers, ArrayWithProperties, ArrayWithReferences, ArrayWithStrings, CallToTestOrderOfParamsData, CallWithDefaultOptionalParametersData, CallWithDefaultParametersData, CallWithDescriptionsData, CallWithDuplicateResponsesData, CallWithDuplicateResponsesError, CallWithDuplicateResponsesErrors, CallWithDuplicateResponsesResponse, CallWithDuplicateResponsesResponses, CallWithNoContentResponseData, CallWithNoContentResponseResponse, CallWithNoContentResponseResponses, CallWithParametersData, CallWithResponseAndNoContentResponseData, CallWithResponseAndNoContentResponseResponse, CallWithResponseAndNoContentResponseResponses, CallWithResponseData, CallWithResponseResponse, CallWithResponseResponses, CallWithResponsesData, CallWithResponsesError, CallWithResponsesErrors, CallWithResponsesResponse, CallWithResponsesResponses, CallWithResultFromHeaderData, CallWithResultFromHeaderErrors, CallWithResultFromHeaderResponses, CallWithWeirdParameterNamesData, CamelCaseCommentWithBreaks, CharactersInDescription, ClientOptions, CollectionFormatData, CommentWithBackticks, CommentWithBackticksAndQuotes, CommentWithBreaks, CommentWithExpressionPlaceholders, CommentWithQuotes, CommentWithReservedCharacters, CommentWithSlashes, ComplexParamsData, ComplexParamsResponse, ComplexParamsResponses, ComplexTypesData, ComplexTypesErrors, ComplexTypesResponse, ComplexTypesResponses, CompositionBaseModel, CompositionExtendedModel, CompositionWithAllOfAndNullable, CompositionWithAnyOf, CompositionWithAnyOfAndNullable, CompositionWithAnyOfAnonymous, CompositionWithNestedAnyAndTypeNull, CompositionWithNestedAnyOfAndNull, CompositionWithOneOf, CompositionWithOneOfAndComplexArrayDictionary, CompositionWithOneOfAndNullable, CompositionWithOneOfAndProperties, CompositionWithOneOfAndSimpleArrayDictionary, CompositionWithOneOfAndSimpleDictionary, CompositionWithOneOfAnonymous, CompositionWithOneOfDiscriminator, ConstValue, Default, DeleteCallWithoutParametersAndResponseData, DeleteFooData, DeleteFooData2, DeleteFooData3, DeprecatedCallData, DeprecatedModel, DictionaryWithArray, DictionaryWithDictionary, DictionaryWithProperties, DictionaryWithPropertiesAndAdditionalProperties, DictionaryWithReference, DictionaryWithString, DummyAData, DummyAResponse, DummyAResponses, DummyBData, DummyBResponse, DummyBResponses, DuplicateName2Data, DuplicateName3Data, DuplicateName4Data, DuplicateNameData, EnumFromDescription, EnumWithExtensions, EnumWithNumbers, EnumWithReplacedCharacters, EnumWithStrings, EnumWithXEnumNames, ExportData, ExternalRefA, ExternalRefB, ExternalSharedModel, File, FileResponseData, FileResponseResponse, FileResponseResponses, FileWritable, FooWowData, FooWowResponses, FreeFormObjectWithAdditionalPropertiesEqEmptyObject, FreeFormObjectWithAdditionalPropertiesEqTrue, FreeFormObjectWithoutAdditionalProperties, GenericSchemaDuplicateIssue1SystemBoolean, GenericSchemaDuplicateIssue1SystemBooleanWritable, GenericSchemaDuplicateIssue1SystemString, GenericSchemaDuplicateIssue1SystemStringWritable, GetApiVbyApiVersionSimpleOperationData, GetApiVbyApiVersionSimpleOperationError, GetApiVbyApiVersionSimpleOperationErrors, GetApiVbyApiVersionSimpleOperationResponse, GetApiVbyApiVersionSimpleOperationResponses, GetCallWithOptionalParamData, GetCallWithoutParametersAndResponseData, HeadCallWithoutParametersAndResponseData, Import, ImportData, ImportResponse, ImportResponses, IoK8sApimachineryPkgApisMetaV1DeleteOptions, IoK8sApimachineryPkgApisMetaV1Preconditions, ModelCircle, ModelFromZendesk, ModelSquare, ModelThatExtends, ModelThatExtendsExtends, ModelWithAdditionalPropertiesEqTrue, ModelWithAdditionalPropertiesRef, ModelWithAnyOfConstantSizeArray, ModelWithAnyOfConstantSizeArrayAndIntersect, ModelWithAnyOfConstantSizeArrayNullable, ModelWithAnyOfConstantSizeArrayWithNSizeAndOptions, ModelWithAnyOfConstantSizeArrayWithNSizeAndOptionsWritable, ModelWithArray, ModelWithArrayReadOnlyAndWriteOnly, ModelWithArrayReadOnlyAndWriteOnlyWritable, ModelWithBackticksInDescription, ModelWithBoolean, ModelWithCircularReference, ModelWithConst, ModelWithConstantSizeArray, ModelWithDictionary, ModelWithDuplicateImports, ModelWithDuplicateProperties, ModelWithEnum, ModelWithEnumFromDescription, ModelWithEnumWithHyphen, ModelWithInteger, ModelWithNestedArrayEnums, ModelWithNestedArrayEnumsData, ModelWithNestedArrayEnumsDataBar, ModelWithNestedArrayEnumsDataFoo, ModelWithNestedCompositionEnums, ModelWithNestedEnums, ModelWithNestedProperties, ModelWithNullableObject, ModelWithNullableString, ModelWithNumericEnumUnion, ModelWithOneOfAndProperties, ModelWithOneOfEnum, ModelWithOrderedProperties, ModelWithPattern, ModelWithPatternWritable, ModelWithPrefixItemsConstantSizeArray, ModelWithProperties, ModelWithPropertiesWritable, ModelWithReadOnlyAndWriteOnly, ModelWithReadOnlyAndWriteOnlyWritable, ModelWithReference, ModelWithReferenceWritable, ModelWithString, ModelWithStringError, MultipartRequestData, MultipartResponseData, MultipartResponseResponse, MultipartResponseResponses, NestedAnyOfArraysNullable, NonAsciiæøåÆøÅöôêÊ字符串Data, NonAsciiæøåÆøÅöôêÊ字符串Response, NonAsciiæøåÆøÅöôêÊ字符串Responses, NonAsciiStringæøåÆøÅöôêÊ字符串, NullableObject, OneOfAllOfIssue, OneOfAllOfIssueWritable, OptionsCallWithoutParametersAndResponseData, Pageable, ParameterSimpleParameterUnused, PatchApiVbyApiVersionNoTagData, PatchApiVbyApiVersionNoTagResponses, PatchCallWithoutParametersAndResponseData, PostApiVbyApiVersionFormDataData, PostApiVbyApiVersionRequestBodyData, PostCallWithOptionalParamData, PostCallWithOptionalParamResponse, PostCallWithOptionalParamResponses, PostCallWithoutParametersAndResponseData, PostServiceWithEmptyTagResponse, PostServiceWithEmptyTagResponse2, PutCallWithoutParametersAndResponseData, PutWithFormUrlEncodedData, SchemaWithFormRestrictedKeys, SimpleBoolean, SimpleFile, SimpleFormData, SimpleInteger, SimpleParameter, SimpleReference, SimpleRequestBody, SimpleString, SimpleStringWithPattern, TestErrorCodeData, TestErrorCodeErrors, TestErrorCodeResponses, TypesData, TypesResponse, TypesResponses, UploadFileData, UploadFileResponse, UploadFileResponses, XFooBar } from './types.gen';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-angular/base-url-strict/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type ClientOptions = {\n    baseUrl: 'http://localhost:3000/base';\n};\n\n/**\n * Model with number-only name\n */\nexport type _400 = string;\n\n/**\n * External ref to shared model (A)\n */\nexport type ExternalRefA = ExternalSharedModel;\n\n/**\n * External ref to shared model (B)\n */\nexport type ExternalRefB = ExternalSharedModel;\n\n/**\n * Testing multiline comments in string: First line\n * Second line\n *\n * Fourth line\n */\nexport type CamelCaseCommentWithBreaks = number;\n\n/**\n * Testing multiline comments in string: First line\n * Second line\n *\n * Fourth line\n */\nexport type CommentWithBreaks = number;\n\n/**\n * Testing backticks in string: `backticks` and ```multiple backticks``` should work\n */\nexport type CommentWithBackticks = number;\n\n/**\n * Testing backticks and quotes in string: `backticks`, 'quotes', \"double quotes\" and ```multiple backticks``` should work\n */\nexport type CommentWithBackticksAndQuotes = number;\n\n/**\n * Testing slashes in string: \\backwards\\\\\\ and /forwards/// should work\n */\nexport type CommentWithSlashes = number;\n\n/**\n * Testing expression placeholders in string: ${expression} should work\n */\nexport type CommentWithExpressionPlaceholders = number;\n\n/**\n * Testing quotes in string: 'single quote''' and \"double quotes\"\"\" should work\n */\nexport type CommentWithQuotes = number;\n\n/**\n * Testing reserved characters in string: * inline * and ** inline ** should work\n */\nexport type CommentWithReservedCharacters = number;\n\n/**\n * This is a simple number\n */\nexport type SimpleInteger = number;\n\n/**\n * This is a simple boolean\n */\nexport type SimpleBoolean = boolean;\n\n/**\n * This is a simple string\n */\nexport type SimpleString = string;\n\n/**\n * A string with non-ascii (unicode) characters valid in typescript identifiers (æøåÆØÅöÔèÈ字符串)\n */\nexport type NonAsciiStringæøåÆøÅöôêÊ字符串 = string;\n\n/**\n * This is a simple file\n */\nexport type SimpleFile = Blob | File;\n\n/**\n * This is a simple reference\n */\nexport type SimpleReference = ModelWithString;\n\n/**\n * This is a simple string\n */\nexport type SimpleStringWithPattern = string | null;\n\n/**\n * This is a simple enum with strings\n */\nexport type EnumWithStrings = 'Success' | 'Warning' | 'Error' | '\\'Single Quote\\'' | '\"Double Quotes\"' | 'Non-ascii: øæåôöØÆÅÔÖ字符串';\n\nexport type EnumWithReplacedCharacters = '\\'Single Quote\\'' | '\"Double Quotes\"' | 'øæåôöØÆÅÔÖ字符串' | 3.1 | '';\n\n/**\n * This is a simple enum with numbers\n */\nexport type EnumWithNumbers = 1 | 2 | 3 | 1.1 | 1.2 | 1.3 | 100 | 200 | 300 | -100 | -200 | -300 | -1.1 | -1.2 | -1.3;\n\n/**\n * Success=1,Warning=2,Error=3\n */\nexport type EnumFromDescription = number;\n\n/**\n * This is a simple enum with numbers\n */\nexport type EnumWithExtensions = 200 | 400 | 500;\n\nexport type EnumWithXEnumNames = 0 | 1 | 2;\n\n/**\n * This is a simple array with numbers\n */\nexport type ArrayWithNumbers = Array<number>;\n\n/**\n * This is a simple array with booleans\n */\nexport type ArrayWithBooleans = Array<boolean>;\n\n/**\n * This is a simple array with strings\n */\nexport type ArrayWithStrings = Array<string>;\n\n/**\n * This is a simple array with references\n */\nexport type ArrayWithReferences = Array<ModelWithString>;\n\n/**\n * This is a simple array containing an array\n */\nexport type ArrayWithArray = Array<Array<ModelWithString>>;\n\n/**\n * This is a simple array with properties\n */\nexport type ArrayWithProperties = Array<{\n    '16x16'?: CamelCaseCommentWithBreaks;\n    bar?: string;\n}>;\n\n/**\n * This is a simple array with any of properties\n */\nexport type ArrayWithAnyOfProperties = Array<{\n    foo?: string;\n} | {\n    bar?: string;\n}>;\n\nexport type AnyOfAnyAndNull = {\n    data?: unknown | null;\n};\n\n/**\n * This is a simple array with any of properties\n */\nexport type AnyOfArrays = {\n    results?: Array<{\n        foo?: string;\n    } | {\n        bar?: string;\n    }>;\n};\n\n/**\n * This is a string dictionary\n */\nexport type DictionaryWithString = {\n    [key: string]: string;\n};\n\nexport type DictionaryWithPropertiesAndAdditionalProperties = {\n    foo?: number;\n    bar?: boolean;\n    [key: string]: string | number | boolean | undefined;\n};\n\n/**\n * This is a string reference\n */\nexport type DictionaryWithReference = {\n    [key: string]: ModelWithString;\n};\n\n/**\n * This is a complex dictionary\n */\nexport type DictionaryWithArray = {\n    [key: string]: Array<ModelWithString>;\n};\n\n/**\n * This is a string dictionary\n */\nexport type DictionaryWithDictionary = {\n    [key: string]: {\n        [key: string]: string;\n    };\n};\n\n/**\n * This is a complex dictionary\n */\nexport type DictionaryWithProperties = {\n    [key: string]: {\n        foo?: string;\n        bar?: string;\n    };\n};\n\n/**\n * This is a model with one number property\n */\nexport type ModelWithInteger = {\n    /**\n     * This is a simple number property\n     */\n    prop?: number;\n};\n\n/**\n * This is a model with one boolean property\n */\nexport type ModelWithBoolean = {\n    /**\n     * This is a simple boolean property\n     */\n    prop?: boolean;\n};\n\n/**\n * This is a model with one string property\n */\nexport type ModelWithString = {\n    /**\n     * This is a simple string property\n     */\n    prop?: string;\n};\n\n/**\n * This is a model with one string property\n */\nexport type ModelWithStringError = {\n    /**\n     * This is a simple string property\n     */\n    prop?: string;\n};\n\n/**\n * `Comment` or `VoiceComment`. The JSON object for adding voice comments to tickets is different. See [Adding voice comments to tickets](/documentation/ticketing/managing-tickets/adding-voice-comments-to-tickets)\n */\nexport type ModelFromZendesk = string;\n\n/**\n * This is a model with one string property\n */\nexport type ModelWithNullableString = {\n    /**\n     * This is a simple string property\n     */\n    nullableProp1?: string | null;\n    /**\n     * This is a simple string property\n     */\n    nullableRequiredProp1: string | null;\n    /**\n     * This is a simple string property\n     */\n    nullableProp2?: string | null;\n    /**\n     * This is a simple string property\n     */\n    nullableRequiredProp2: string | null;\n    /**\n     * This is a simple enum with strings\n     */\n    'foo_bar-enum'?: 'Success' | 'Warning' | 'Error' | 'ØÆÅ字符串';\n};\n\n/**\n * This is a model with one enum\n */\nexport type ModelWithEnum = {\n    /**\n     * This is a simple enum with strings\n     */\n    'foo_bar-enum'?: 'Success' | 'Warning' | 'Error' | 'ØÆÅ字符串';\n    /**\n     * These are the HTTP error code enums\n     */\n    statusCode?: '100' | '200 FOO' | '300 FOO_BAR' | '400 foo-bar' | '500 foo.bar' | '600 foo&bar';\n    /**\n     * Simple boolean enum\n     */\n    bool?: true;\n};\n\n/**\n * This is a model with one enum with escaped name\n */\nexport type ModelWithEnumWithHyphen = {\n    /**\n     * Foo-Bar-Baz-Qux\n     */\n    'foo-bar-baz-qux'?: '3.0';\n};\n\n/**\n * This is a model with one enum\n */\nexport type ModelWithEnumFromDescription = {\n    /**\n     * Success=1,Warning=2,Error=3\n     */\n    test?: number;\n};\n\n/**\n * This is a model with nested enums\n */\nexport type ModelWithNestedEnums = {\n    dictionaryWithEnum?: {\n        [key: string]: 'Success' | 'Warning' | 'Error';\n    };\n    dictionaryWithEnumFromDescription?: {\n        [key: string]: number;\n    };\n    arrayWithEnum?: Array<'Success' | 'Warning' | 'Error'>;\n    arrayWithDescription?: Array<number>;\n    /**\n     * This is a simple enum with strings\n     */\n    'foo_bar-enum'?: 'Success' | 'Warning' | 'Error' | 'ØÆÅ字符串';\n};\n\n/**\n * This is a model with one property containing a reference\n */\nexport type ModelWithReference = {\n    prop?: ModelWithProperties;\n};\n\n/**\n * This is a model with one property containing an array\n */\nexport type ModelWithArrayReadOnlyAndWriteOnly = {\n    prop?: Array<ModelWithReadOnlyAndWriteOnly>;\n    propWithFile?: Array<Blob | File>;\n    propWithNumber?: Array<number>;\n};\n\n/**\n * This is a model with one property containing an array\n */\nexport type ModelWithArray = {\n    prop?: Array<ModelWithString>;\n    propWithFile?: Array<Blob | File>;\n    propWithNumber?: Array<number>;\n};\n\n/**\n * This is a model with one property containing a dictionary\n */\nexport type ModelWithDictionary = {\n    prop?: {\n        [key: string]: string;\n    };\n};\n\n/**\n * This is a deprecated model with a deprecated property\n *\n * @deprecated\n */\nexport type DeprecatedModel = {\n    /**\n     * This is a deprecated property\n     *\n     * @deprecated\n     */\n    prop?: string;\n};\n\n/**\n * This is a model with one property containing a circular reference\n */\nexport type ModelWithCircularReference = {\n    prop?: ModelWithCircularReference;\n};\n\n/**\n * This is a model with one property with a 'one of' relationship\n */\nexport type CompositionWithOneOf = {\n    propA?: ModelWithString | ModelWithEnum | ModelWithArray | ModelWithDictionary;\n};\n\n/**\n * This is a model with one property with a 'one of' relationship where the options are not $ref\n */\nexport type CompositionWithOneOfAnonymous = {\n    propA?: {\n        propA?: string;\n    } | string | number;\n};\n\n/**\n * Circle\n */\nexport type ModelCircle = {\n    kind: string;\n    radius?: number;\n};\n\n/**\n * Square\n */\nexport type ModelSquare = {\n    kind: string;\n    sideLength?: number;\n};\n\n/**\n * This is a model with one property with a 'one of' relationship where the options are not $ref\n */\nexport type CompositionWithOneOfDiscriminator = ({\n    kind: 'circle';\n} & ModelCircle) | ({\n    kind: 'square';\n} & ModelSquare);\n\n/**\n * This is a model with one property with a 'any of' relationship\n */\nexport type CompositionWithAnyOf = {\n    propA?: ModelWithString | ModelWithEnum | ModelWithArray | ModelWithDictionary;\n};\n\n/**\n * This is a model with one property with a 'any of' relationship where the options are not $ref\n */\nexport type CompositionWithAnyOfAnonymous = {\n    propA?: {\n        propA?: string;\n    } | string | number;\n};\n\n/**\n * This is a model with nested 'any of' property with a type null\n */\nexport type CompositionWithNestedAnyAndTypeNull = {\n    propA?: Array<ModelWithDictionary | null> | Array<ModelWithArray | null>;\n};\n\nexport type _3eNum1Период = 'Bird' | 'Dog';\n\nexport type ConstValue = 'ConstValue';\n\n/**\n * This is a model with one property with a 'any of' relationship where the options are not $ref\n */\nexport type CompositionWithNestedAnyOfAndNull = {\n    /**\n     * Scopes\n     */\n    propA?: Array<_3eNum1Период | ConstValue> | null;\n};\n\n/**\n * This is a model with one property with a 'one of' relationship\n */\nexport type CompositionWithOneOfAndNullable = {\n    propA?: {\n        boolean?: boolean;\n    } | ModelWithEnum | ModelWithArray | ModelWithDictionary | null;\n};\n\n/**\n * This is a model that contains a simple dictionary within composition\n */\nexport type CompositionWithOneOfAndSimpleDictionary = {\n    propA?: boolean | {\n        [key: string]: number;\n    };\n};\n\n/**\n * This is a model that contains a dictionary of simple arrays within composition\n */\nexport type CompositionWithOneOfAndSimpleArrayDictionary = {\n    propA?: boolean | {\n        [key: string]: Array<boolean>;\n    };\n};\n\n/**\n * This is a model that contains a dictionary of complex arrays (composited) within composition\n */\nexport type CompositionWithOneOfAndComplexArrayDictionary = {\n    propA?: boolean | {\n        [key: string]: Array<number | string>;\n    };\n};\n\n/**\n * This is a model with one property with a 'all of' relationship\n */\nexport type CompositionWithAllOfAndNullable = {\n    propA?: ({\n        boolean?: boolean;\n    } & ModelWithEnum & ModelWithArray & ModelWithDictionary) | null;\n};\n\n/**\n * This is a model with one property with a 'any of' relationship\n */\nexport type CompositionWithAnyOfAndNullable = {\n    propA?: {\n        boolean?: boolean;\n    } | ModelWithEnum | ModelWithArray | ModelWithDictionary | null;\n};\n\n/**\n * This is a base model with two simple optional properties\n */\nexport type CompositionBaseModel = {\n    firstName?: string;\n    lastname?: string;\n};\n\n/**\n * This is a model that extends the base model\n */\nexport type CompositionExtendedModel = CompositionBaseModel & {\n    age: number;\n    firstName: string;\n    lastname: string;\n};\n\n/**\n * This is a model with one nested property\n */\nexport type ModelWithProperties = {\n    required: string;\n    readonly requiredAndReadOnly: string;\n    requiredAndNullable: string | null;\n    string?: string;\n    number?: number;\n    boolean?: boolean;\n    reference?: ModelWithString;\n    'property with space'?: string;\n    default?: string;\n    try?: string;\n    readonly '@namespace.string'?: string;\n    readonly '@namespace.integer'?: number;\n};\n\n/**\n * This is a model with one nested property\n */\nexport type ModelWithNestedProperties = {\n    readonly first: {\n        readonly second: {\n            readonly third: string | null;\n        } | null;\n    } | null;\n};\n\n/**\n * This is a model with duplicated properties\n */\nexport type ModelWithDuplicateProperties = {\n    prop?: ModelWithString;\n};\n\n/**\n * This is a model with ordered properties\n */\nexport type ModelWithOrderedProperties = {\n    zebra?: string;\n    apple?: string;\n    hawaii?: string;\n};\n\n/**\n * This is a model with duplicated imports\n */\nexport type ModelWithDuplicateImports = {\n    propA?: ModelWithString;\n    propB?: ModelWithString;\n    propC?: ModelWithString;\n};\n\n/**\n * This is a model that extends another model\n */\nexport type ModelThatExtends = ModelWithString & {\n    propExtendsA?: string;\n    propExtendsB?: ModelWithString;\n};\n\n/**\n * This is a model that extends another model\n */\nexport type ModelThatExtendsExtends = ModelWithString & ModelThatExtends & {\n    propExtendsC?: string;\n    propExtendsD?: ModelWithString;\n};\n\n/**\n * This is a model that contains a some patterns\n */\nexport type ModelWithPattern = {\n    key: string;\n    name: string;\n    readonly enabled?: boolean;\n    readonly modified?: string;\n    id?: string;\n    text?: string;\n    patternWithSingleQuotes?: string;\n    patternWithNewline?: string;\n    patternWithBacktick?: string;\n    patternWithUnicode?: string;\n};\n\nexport type File = {\n    /**\n     * Id\n     */\n    readonly id?: string;\n    /**\n     * Updated at\n     */\n    readonly updated_at?: string;\n    /**\n     * Created at\n     */\n    readonly created_at?: string;\n    /**\n     * Mime\n     */\n    mime: string;\n    /**\n     * File\n     */\n    readonly file?: string;\n};\n\nexport type Default = {\n    name?: string;\n};\n\nexport type Pageable = {\n    page?: number;\n    size?: number;\n    sort?: Array<string>;\n};\n\n/**\n * This is a free-form object without additionalProperties.\n */\nexport type FreeFormObjectWithoutAdditionalProperties = {\n    [key: string]: unknown;\n};\n\n/**\n * This is a free-form object with additionalProperties: true.\n */\nexport type FreeFormObjectWithAdditionalPropertiesEqTrue = {\n    [key: string]: unknown;\n};\n\n/**\n * This is a free-form object with additionalProperties: {}.\n */\nexport type FreeFormObjectWithAdditionalPropertiesEqEmptyObject = {\n    [key: string]: unknown;\n};\n\nexport type ModelWithConst = {\n    String?: 'String';\n    number?: 0;\n    null?: null;\n    withType?: 'Some string';\n};\n\n/**\n * This is a model with one property and additionalProperties: true\n */\nexport type ModelWithAdditionalPropertiesEqTrue = {\n    /**\n     * This is a simple string property\n     */\n    prop?: string;\n    [key: string]: unknown;\n};\n\nexport type NestedAnyOfArraysNullable = {\n    nullableArray?: Array<string | boolean> | null;\n};\n\nexport type CompositionWithOneOfAndProperties = ({\n    foo: SimpleParameter;\n} | {\n    bar: NonAsciiStringæøåÆøÅöôêÊ字符串;\n}) & {\n    baz: number | null;\n    qux: number;\n};\n\n/**\n * An object that can be null\n */\nexport type NullableObject = {\n    foo?: string;\n} | null;\n\n/**\n * Some % character\n */\nexport type CharactersInDescription = string;\n\nexport type ModelWithNullableObject = {\n    data?: NullableObject;\n};\n\n/**\n * An object with additional properties that can be null (anyOf ref + null)\n */\nexport type ModelWithAdditionalPropertiesRef = {\n    [key: string]: NullableObject | null;\n};\n\nexport type ModelWithOneOfEnum = {\n    foo: 'Bar';\n} | {\n    foo: 'Baz';\n} | {\n    foo: 'Qux';\n} | {\n    content: string;\n    foo: 'Quux';\n} | {\n    content: [\n        string,\n        string\n    ];\n    foo: 'Corge';\n};\n\nexport type ModelWithNestedArrayEnumsDataFoo = 'foo' | 'bar';\n\nexport type ModelWithNestedArrayEnumsDataBar = 'baz' | 'qux';\n\nexport type ModelWithNestedArrayEnumsData = {\n    foo?: Array<ModelWithNestedArrayEnumsDataFoo>;\n    bar?: Array<ModelWithNestedArrayEnumsDataBar>;\n};\n\nexport type ModelWithNestedArrayEnums = {\n    array_strings?: Array<string>;\n    data?: ModelWithNestedArrayEnumsData;\n};\n\nexport type ModelWithNestedCompositionEnums = {\n    foo?: ModelWithNestedArrayEnumsDataFoo;\n};\n\nexport type ModelWithReadOnlyAndWriteOnly = {\n    foo: string;\n    readonly bar: string;\n};\n\nexport type ModelWithConstantSizeArray = [\n    number,\n    number\n];\n\nexport type ModelWithAnyOfConstantSizeArray = [\n    number | string,\n    number | string,\n    number | string\n];\n\nexport type ModelWithPrefixItemsConstantSizeArray = [\n    ModelWithInteger,\n    number | string,\n    string\n];\n\nexport type ModelWithAnyOfConstantSizeArrayNullable = [\n    number | null | string,\n    number | null | string,\n    number | null | string\n];\n\nexport type ModelWithAnyOfConstantSizeArrayWithNSizeAndOptions = [\n    number | Import,\n    number | Import\n];\n\nexport type ModelWithAnyOfConstantSizeArrayAndIntersect = [\n    number & string,\n    number & string\n];\n\nexport type ModelWithNumericEnumUnion = {\n    /**\n     * Период\n     */\n    value?: -10 | -1 | 0 | 1 | 3 | 6 | 12;\n};\n\n/**\n * Some description with `back ticks`\n */\nexport type ModelWithBackticksInDescription = {\n    /**\n     * The template `that` should be used for parsing and importing the contents of the CSV file.\n     *\n     * <br/><p>There is one placeholder currently supported:<ul>     <li><b>${x}</b> - refers to the n-th column in the CSV file, e.g. ${1}, ${2}, ...)</li></ul><p>Example of a correct JSON template:</p>\n     * <pre>\n     * [\n     * {\n     * \"resourceType\": \"Asset\",\n     * \"identifier\": {\n     * \"name\": \"${1}\",\n     * \"domain\": {\n     * \"name\": \"${2}\",\n     * \"community\": {\n     * \"name\": \"Some Community\"\n     * }\n     * }\n     * },\n     * \"attributes\" : {\n     * \"00000000-0000-0000-0000-000000003115\" : [ {\n     * \"value\" : \"${3}\"\n     * } ],\n     * \"00000000-0000-0000-0000-000000000222\" : [ {\n     * \"value\" : \"${4}\"\n     * } ]\n     * }\n     * }\n     * ]\n     * </pre>\n     */\n    template?: string;\n};\n\nexport type ModelWithOneOfAndProperties = (SimpleParameter | NonAsciiStringæøåÆøÅöôêÊ字符串) & {\n    baz: number | null;\n    qux: number;\n};\n\n/**\n * Model used to test deduplication strategy (unused)\n */\nexport type ParameterSimpleParameterUnused = string;\n\n/**\n * Model used to test deduplication strategy\n */\nexport type PostServiceWithEmptyTagResponse = string;\n\n/**\n * Model used to test deduplication strategy\n */\nexport type PostServiceWithEmptyTagResponse2 = string;\n\n/**\n * Model used to test deduplication strategy\n */\nexport type DeleteFooData = string;\n\n/**\n * Model used to test deduplication strategy\n */\nexport type DeleteFooData2 = string;\n\n/**\n * Model with restricted keyword name\n */\nexport type Import = string;\n\nexport type SchemaWithFormRestrictedKeys = {\n    description?: string;\n    'x-enum-descriptions'?: string;\n    'x-enum-varnames'?: string;\n    'x-enumNames'?: string;\n    title?: string;\n    object?: {\n        description?: string;\n        'x-enum-descriptions'?: string;\n        'x-enum-varnames'?: string;\n        'x-enumNames'?: string;\n        title?: string;\n    };\n    array?: Array<{\n        description?: string;\n        'x-enum-descriptions'?: string;\n        'x-enum-varnames'?: string;\n        'x-enumNames'?: string;\n        title?: string;\n    }>;\n};\n\n/**\n * This schema was giving PascalCase transformations a hard time\n */\nexport type IoK8sApimachineryPkgApisMetaV1DeleteOptions = {\n    /**\n     * Must be fulfilled before a deletion is carried out. If not possible, a 409 Conflict status will be returned.\n     */\n    preconditions?: IoK8sApimachineryPkgApisMetaV1Preconditions;\n};\n\n/**\n * This schema was giving PascalCase transformations a hard time\n */\nexport type IoK8sApimachineryPkgApisMetaV1Preconditions = {\n    /**\n     * Specifies the target ResourceVersion\n     */\n    resourceVersion?: string;\n    /**\n     * Specifies the target UID.\n     */\n    uid?: string;\n};\n\nexport type AdditionalPropertiesUnknownIssue = {\n    [key: string]: string | number;\n};\n\nexport type AdditionalPropertiesUnknownIssue2 = {\n    [key: string]: string | number;\n};\n\nexport type AdditionalPropertiesUnknownIssue3 = string & {\n    entries: {\n        [key: string]: AdditionalPropertiesUnknownIssue;\n    };\n};\n\nexport type AdditionalPropertiesIntegerIssue = {\n    value: number;\n    [key: string]: number;\n};\n\nexport type OneOfAllOfIssue = ((ConstValue | GenericSchemaDuplicateIssue1SystemBoolean) & _3eNum1Период) | GenericSchemaDuplicateIssue1SystemString;\n\nexport type GenericSchemaDuplicateIssue1SystemBoolean = {\n    item?: boolean;\n    error?: string | null;\n    readonly hasError?: boolean;\n    data?: {\n        [key: string]: never;\n    };\n};\n\nexport type GenericSchemaDuplicateIssue1SystemString = {\n    item?: string | null;\n    error?: string | null;\n    readonly hasError?: boolean;\n};\n\nexport type ExternalSharedModel = {\n    id: string;\n    name?: string;\n};\n\n/**\n * This is a model with one property containing a reference\n */\nexport type ModelWithReferenceWritable = {\n    prop?: ModelWithPropertiesWritable;\n};\n\n/**\n * This is a model with one property containing an array\n */\nexport type ModelWithArrayReadOnlyAndWriteOnlyWritable = {\n    prop?: Array<ModelWithReadOnlyAndWriteOnlyWritable>;\n    propWithFile?: Array<Blob | File>;\n    propWithNumber?: Array<number>;\n};\n\n/**\n * This is a model with one nested property\n */\nexport type ModelWithPropertiesWritable = {\n    required: string;\n    requiredAndNullable: string | null;\n    string?: string;\n    number?: number;\n    boolean?: boolean;\n    reference?: ModelWithString;\n    'property with space'?: string;\n    default?: string;\n    try?: string;\n};\n\n/**\n * This is a model that contains a some patterns\n */\nexport type ModelWithPatternWritable = {\n    key: string;\n    name: string;\n    id?: string;\n    text?: string;\n    patternWithSingleQuotes?: string;\n    patternWithNewline?: string;\n    patternWithBacktick?: string;\n    patternWithUnicode?: string;\n};\n\nexport type FileWritable = {\n    /**\n     * Mime\n     */\n    mime: string;\n};\n\nexport type ModelWithReadOnlyAndWriteOnlyWritable = {\n    foo: string;\n    baz: string;\n};\n\nexport type ModelWithAnyOfConstantSizeArrayWithNSizeAndOptionsWritable = [\n    number | Import,\n    number | Import\n];\n\nexport type AdditionalPropertiesUnknownIssueWritable = {\n    [key: string]: string | number;\n};\n\nexport type OneOfAllOfIssueWritable = ((ConstValue | GenericSchemaDuplicateIssue1SystemBoolean) & _3eNum1Период) | GenericSchemaDuplicateIssue1SystemString;\n\nexport type GenericSchemaDuplicateIssue1SystemBooleanWritable = {\n    item?: boolean;\n    error?: string | null;\n    data?: {\n        [key: string]: never;\n    };\n};\n\nexport type GenericSchemaDuplicateIssue1SystemStringWritable = {\n    item?: string | null;\n    error?: string | null;\n};\n\n/**\n * This is a reusable parameter\n */\nexport type SimpleParameter = string;\n\n/**\n * Parameter with illegal characters\n */\nexport type XFooBar = ModelWithString;\n\n/**\n * A reusable request body\n */\nexport type SimpleRequestBody = ModelWithString;\n\n/**\n * A reusable request body\n */\nexport type SimpleFormData = ModelWithString;\n\nexport type ExportData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no+tag';\n};\n\nexport type PatchApiVbyApiVersionNoTagData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no+tag';\n};\n\nexport type PatchApiVbyApiVersionNoTagResponses = {\n    /**\n     * OK\n     */\n    default: unknown;\n};\n\nexport type ImportData = {\n    body: ModelWithReadOnlyAndWriteOnlyWritable | ModelWithArrayReadOnlyAndWriteOnlyWritable;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no+tag';\n};\n\nexport type ImportResponses = {\n    /**\n     * Success\n     */\n    200: ModelFromZendesk;\n    /**\n     * Default success response\n     */\n    default: ModelWithReadOnlyAndWriteOnly;\n};\n\nexport type ImportResponse = ImportResponses[keyof ImportResponses];\n\nexport type FooWowData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no+tag';\n};\n\nexport type FooWowResponses = {\n    /**\n     * OK\n     */\n    default: unknown;\n};\n\nexport type ApiVVersionODataControllerCountData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple/$count';\n};\n\nexport type ApiVVersionODataControllerCountResponses = {\n    /**\n     * Success\n     */\n    200: ModelFromZendesk;\n};\n\nexport type ApiVVersionODataControllerCountResponse = ApiVVersionODataControllerCountResponses[keyof ApiVVersionODataControllerCountResponses];\n\nexport type GetApiVbyApiVersionSimpleOperationData = {\n    body?: never;\n    path: {\n        /**\n         * foo in method\n         */\n        foo_param: string;\n    };\n    query?: never;\n    url: '/api/v{api-version}/simple:operation';\n};\n\nexport type GetApiVbyApiVersionSimpleOperationErrors = {\n    /**\n     * Default error response\n     */\n    default: ModelWithBoolean;\n};\n\nexport type GetApiVbyApiVersionSimpleOperationError = GetApiVbyApiVersionSimpleOperationErrors[keyof GetApiVbyApiVersionSimpleOperationErrors];\n\nexport type GetApiVbyApiVersionSimpleOperationResponses = {\n    /**\n     * Response is a simple number\n     */\n    200: number;\n};\n\nexport type GetApiVbyApiVersionSimpleOperationResponse = GetApiVbyApiVersionSimpleOperationResponses[keyof GetApiVbyApiVersionSimpleOperationResponses];\n\nexport type DeleteCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type GetCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type HeadCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type OptionsCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type PatchCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type PostCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type PutCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type DeleteFooData3 = {\n    body?: never;\n    headers: {\n        /**\n         * Parameter with illegal characters\n         */\n        'x-Foo-Bar': ModelWithString;\n    };\n    path: {\n        /**\n         * foo in method\n         */\n        foo_param: string;\n        /**\n         * bar in method\n         */\n        BarParam: string;\n    };\n    query?: never;\n    url: '/api/v{api-version}/foo/{foo_param}/bar/{BarParam}';\n};\n\nexport type CallWithDescriptionsData = {\n    body?: never;\n    path?: never;\n    query?: {\n        /**\n         * Testing multiline comments in string: First line\n         * Second line\n         *\n         * Fourth line\n         */\n        parameterWithBreaks?: string;\n        /**\n         * Testing backticks in string: `backticks` and ```multiple backticks``` should work\n         */\n        parameterWithBackticks?: string;\n        /**\n         * Testing slashes in string: \\backwards\\\\\\ and /forwards/// should work\n         */\n        parameterWithSlashes?: string;\n        /**\n         * Testing expression placeholders in string: ${expression} should work\n         */\n        parameterWithExpressionPlaceholders?: string;\n        /**\n         * Testing quotes in string: 'single quote''' and \"double quotes\"\"\" should work\n         */\n        parameterWithQuotes?: string;\n        /**\n         * Testing reserved characters in string: * inline * and ** inline ** should work\n         */\n        parameterWithReservedCharacters?: string;\n    };\n    url: '/api/v{api-version}/descriptions';\n};\n\nexport type DeprecatedCallData = {\n    body?: never;\n    headers: {\n        /**\n         * This parameter is deprecated\n         *\n         * @deprecated\n         */\n        parameter: DeprecatedModel | null;\n    };\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/parameters/deprecated';\n};\n\nexport type CallWithParametersData = {\n    /**\n     * This is the parameter that goes into the body\n     */\n    body: {\n        [key: string]: unknown;\n    } | null;\n    headers: {\n        /**\n         * This is the parameter that goes into the header\n         */\n        parameterHeader: string | null;\n    };\n    path: {\n        /**\n         * This is the parameter that goes into the path\n         */\n        parameterPath: string | null;\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string | null;\n    };\n    query: {\n        foo_ref_enum?: ModelWithNestedArrayEnumsDataFoo;\n        foo_all_of_enum: ModelWithNestedArrayEnumsDataFoo;\n        /**\n         * This is the parameter that goes into the query params\n         */\n        cursor: string | null;\n    };\n    url: '/api/v{api-version}/parameters/{parameterPath}';\n};\n\nexport type CallWithWeirdParameterNamesData = {\n    /**\n     * This is the parameter that goes into the body\n     */\n    body: ModelWithString | null;\n    headers: {\n        /**\n         * This is the parameter that goes into the request header\n         */\n        'parameter.header': string | null;\n    };\n    path: {\n        /**\n         * This is the parameter that goes into the path\n         */\n        'parameter.path.1'?: string;\n        /**\n         * This is the parameter that goes into the path\n         */\n        'parameter-path-2'?: string;\n        /**\n         * This is the parameter that goes into the path\n         */\n        'PARAMETER-PATH-3'?: string;\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string | null;\n    };\n    query: {\n        /**\n         * This is the parameter with a reserved keyword\n         */\n        default?: string;\n        /**\n         * This is the parameter that goes into the request query params\n         */\n        'parameter-query': string | null;\n    };\n    url: '/api/v{api-version}/parameters/{parameter.path.1}/{parameter-path-2}/{PARAMETER-PATH-3}';\n};\n\nexport type GetCallWithOptionalParamData = {\n    /**\n     * This is a required parameter\n     */\n    body: ModelWithOneOfEnum;\n    path?: never;\n    query?: {\n        /**\n         * This is an optional parameter\n         */\n        page?: number;\n    };\n    url: '/api/v{api-version}/parameters';\n};\n\nexport type PostCallWithOptionalParamData = {\n    /**\n     * This is an optional parameter\n     */\n    body?: {\n        offset?: number | null;\n    };\n    path?: never;\n    query: {\n        /**\n         * This is a required parameter\n         */\n        parameter: Pageable;\n    };\n    url: '/api/v{api-version}/parameters';\n};\n\nexport type PostCallWithOptionalParamResponses = {\n    /**\n     * Response is a simple number\n     */\n    200: number;\n    /**\n     * Success\n     */\n    204: void;\n};\n\nexport type PostCallWithOptionalParamResponse = PostCallWithOptionalParamResponses[keyof PostCallWithOptionalParamResponses];\n\nexport type PostApiVbyApiVersionRequestBodyData = {\n    /**\n     * A reusable request body\n     */\n    body?: SimpleRequestBody;\n    path?: never;\n    query?: {\n        /**\n         * This is a reusable parameter\n         */\n        parameter?: string;\n    };\n    url: '/api/v{api-version}/requestBody';\n};\n\nexport type PostApiVbyApiVersionFormDataData = {\n    /**\n     * A reusable request body\n     */\n    body?: SimpleFormData;\n    path?: never;\n    query?: {\n        /**\n         * This is a reusable parameter\n         */\n        parameter?: string;\n    };\n    url: '/api/v{api-version}/formData';\n};\n\nexport type CallWithDefaultParametersData = {\n    body?: never;\n    path?: never;\n    query?: {\n        /**\n         * This is a simple string with default value\n         */\n        parameterString?: string | null;\n        /**\n         * This is a simple number with default value\n         */\n        parameterNumber?: number | null;\n        /**\n         * This is a simple boolean with default value\n         */\n        parameterBoolean?: boolean | null;\n        /**\n         * This is a simple enum with default value\n         */\n        parameterEnum?: 'Success' | 'Warning' | 'Error';\n        /**\n         * This is a simple model with default value\n         */\n        parameterModel?: ModelWithString | null;\n    };\n    url: '/api/v{api-version}/defaults';\n};\n\nexport type CallWithDefaultOptionalParametersData = {\n    body?: never;\n    path?: never;\n    query?: {\n        /**\n         * This is a simple string that is optional with default value\n         */\n        parameterString?: string;\n        /**\n         * This is a simple number that is optional with default value\n         */\n        parameterNumber?: number;\n        /**\n         * This is a simple boolean that is optional with default value\n         */\n        parameterBoolean?: boolean;\n        /**\n         * This is a simple enum that is optional with default value\n         */\n        parameterEnum?: 'Success' | 'Warning' | 'Error';\n        /**\n         * This is a simple model that is optional with default value\n         */\n        parameterModel?: ModelWithString;\n    };\n    url: '/api/v{api-version}/defaults';\n};\n\nexport type CallToTestOrderOfParamsData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * This is a optional string with default\n         */\n        parameterOptionalStringWithDefault?: string;\n        /**\n         * This is a optional string with empty default\n         */\n        parameterOptionalStringWithEmptyDefault?: string;\n        /**\n         * This is a optional string with no default\n         */\n        parameterOptionalStringWithNoDefault?: string;\n        /**\n         * This is a string with default\n         */\n        parameterStringWithDefault: string;\n        /**\n         * This is a string with empty default\n         */\n        parameterStringWithEmptyDefault: string;\n        /**\n         * This is a string with no default\n         */\n        parameterStringWithNoDefault: string;\n        /**\n         * This is a string that can be null with no default\n         */\n        parameterStringNullableWithNoDefault?: string | null;\n        /**\n         * This is a string that can be null with default\n         */\n        parameterStringNullableWithDefault?: string | null;\n    };\n    url: '/api/v{api-version}/defaults';\n};\n\nexport type DuplicateNameData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/duplicate';\n};\n\nexport type DuplicateName2Data = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/duplicate';\n};\n\nexport type DuplicateName3Data = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/duplicate';\n};\n\nexport type DuplicateName4Data = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/duplicate';\n};\n\nexport type CallWithNoContentResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no-content';\n};\n\nexport type CallWithNoContentResponseResponses = {\n    /**\n     * Success\n     */\n    204: void;\n};\n\nexport type CallWithNoContentResponseResponse = CallWithNoContentResponseResponses[keyof CallWithNoContentResponseResponses];\n\nexport type CallWithResponseAndNoContentResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multiple-tags/response-and-no-content';\n};\n\nexport type CallWithResponseAndNoContentResponseResponses = {\n    /**\n     * Response is a simple number\n     */\n    200: number;\n    /**\n     * Success\n     */\n    204: void;\n};\n\nexport type CallWithResponseAndNoContentResponseResponse = CallWithResponseAndNoContentResponseResponses[keyof CallWithResponseAndNoContentResponseResponses];\n\nexport type DummyAData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multiple-tags/a';\n};\n\nexport type DummyAResponses = {\n    200: _400;\n};\n\nexport type DummyAResponse = DummyAResponses[keyof DummyAResponses];\n\nexport type DummyBData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multiple-tags/b';\n};\n\nexport type DummyBResponses = {\n    /**\n     * Success\n     */\n    204: void;\n};\n\nexport type DummyBResponse = DummyBResponses[keyof DummyBResponses];\n\nexport type CallWithResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/response';\n};\n\nexport type CallWithResponseResponses = {\n    default: Import;\n};\n\nexport type CallWithResponseResponse = CallWithResponseResponses[keyof CallWithResponseResponses];\n\nexport type CallWithDuplicateResponsesData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/response';\n};\n\nexport type CallWithDuplicateResponsesErrors = {\n    /**\n     * Message for 500 error\n     */\n    500: ModelWithStringError;\n    /**\n     * Message for 501 error\n     */\n    501: ModelWithStringError;\n    /**\n     * Message for 502 error\n     */\n    502: ModelWithStringError;\n    /**\n     * Message for 4XX errors\n     */\n    '4XX': DictionaryWithArray;\n    /**\n     * Default error response\n     */\n    default: ModelWithBoolean;\n};\n\nexport type CallWithDuplicateResponsesError = CallWithDuplicateResponsesErrors[keyof CallWithDuplicateResponsesErrors];\n\nexport type CallWithDuplicateResponsesResponses = {\n    /**\n     * Message for 200 response\n     */\n    200: ModelWithBoolean & ModelWithInteger;\n    /**\n     * Message for 201 response\n     */\n    201: ModelWithString;\n    /**\n     * Message for 202 response\n     */\n    202: ModelWithString;\n};\n\nexport type CallWithDuplicateResponsesResponse = CallWithDuplicateResponsesResponses[keyof CallWithDuplicateResponsesResponses];\n\nexport type CallWithResponsesData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/response';\n};\n\nexport type CallWithResponsesErrors = {\n    /**\n     * Message for 500 error\n     */\n    500: ModelWithStringError;\n    /**\n     * Message for 501 error\n     */\n    501: ModelWithStringError;\n    /**\n     * Message for 502 error\n     */\n    502: ModelWithStringError;\n    /**\n     * Message for default response\n     */\n    default: ModelWithStringError;\n};\n\nexport type CallWithResponsesError = CallWithResponsesErrors[keyof CallWithResponsesErrors];\n\nexport type CallWithResponsesResponses = {\n    /**\n     * Message for 200 response\n     */\n    200: {\n        readonly '@namespace.string'?: string;\n        readonly '@namespace.integer'?: number;\n        readonly value?: Array<ModelWithString>;\n    };\n    /**\n     * Message for 201 response\n     */\n    201: ModelThatExtends;\n    /**\n     * Message for 202 response\n     */\n    202: ModelThatExtendsExtends;\n};\n\nexport type CallWithResponsesResponse = CallWithResponsesResponses[keyof CallWithResponsesResponses];\n\nexport type CollectionFormatData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * This is an array parameter that is sent as csv format (comma-separated values)\n         */\n        parameterArrayCSV: Array<string> | null;\n        /**\n         * This is an array parameter that is sent as ssv format (space-separated values)\n         */\n        parameterArraySSV: Array<string> | null;\n        /**\n         * This is an array parameter that is sent as tsv format (tab-separated values)\n         */\n        parameterArrayTSV: Array<string> | null;\n        /**\n         * This is an array parameter that is sent as pipes format (pipe-separated values)\n         */\n        parameterArrayPipes: Array<string> | null;\n        /**\n         * This is an array parameter that is sent as multi format (multiple parameter instances)\n         */\n        parameterArrayMulti: Array<string> | null;\n    };\n    url: '/api/v{api-version}/collectionFormat';\n};\n\nexport type TypesData = {\n    body?: never;\n    path?: {\n        /**\n         * This is a number parameter\n         */\n        id?: number;\n    };\n    query: {\n        /**\n         * This is a number parameter\n         */\n        parameterNumber: number;\n        /**\n         * This is a string parameter\n         */\n        parameterString: string | null;\n        /**\n         * This is a boolean parameter\n         */\n        parameterBoolean: boolean | null;\n        /**\n         * This is an object parameter\n         */\n        parameterObject: {\n            [key: string]: unknown;\n        } | null;\n        /**\n         * This is an array parameter\n         */\n        parameterArray: Array<string> | null;\n        /**\n         * This is a dictionary parameter\n         */\n        parameterDictionary: {\n            [key: string]: unknown;\n        } | null;\n        /**\n         * This is an enum parameter\n         */\n        parameterEnum: 'Success' | 'Warning' | 'Error' | null;\n    };\n    url: '/api/v{api-version}/types';\n};\n\nexport type TypesResponses = {\n    /**\n     * Response is a simple number\n     */\n    200: number;\n    /**\n     * Response is a simple string\n     */\n    201: string;\n    /**\n     * Response is a simple boolean\n     */\n    202: boolean;\n    /**\n     * Response is a simple object\n     */\n    203: {\n        [key: string]: unknown;\n    };\n};\n\nexport type TypesResponse = TypesResponses[keyof TypesResponses];\n\nexport type UploadFileData = {\n    body: Blob | File;\n    path: {\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string | null;\n    };\n    query?: never;\n    url: '/api/v{api-version}/upload';\n};\n\nexport type UploadFileResponses = {\n    200: boolean;\n};\n\nexport type UploadFileResponse = UploadFileResponses[keyof UploadFileResponses];\n\nexport type FileResponseData = {\n    body?: never;\n    path: {\n        id: string;\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string;\n    };\n    query?: never;\n    url: '/api/v{api-version}/file/{id}';\n};\n\nexport type FileResponseResponses = {\n    /**\n     * Success\n     */\n    200: Blob | File;\n};\n\nexport type FileResponseResponse = FileResponseResponses[keyof FileResponseResponses];\n\nexport type ComplexTypesData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * Parameter containing object\n         */\n        parameterObject: {\n            first?: {\n                second?: {\n                    third?: string;\n                };\n            };\n        };\n        /**\n         * Parameter containing reference\n         */\n        parameterReference: ModelWithString;\n    };\n    url: '/api/v{api-version}/complex';\n};\n\nexport type ComplexTypesErrors = {\n    /**\n     * 400 `server` error\n     */\n    400: unknown;\n    /**\n     * 500 server error\n     */\n    500: unknown;\n};\n\nexport type ComplexTypesResponses = {\n    /**\n     * Successful response\n     */\n    200: Array<ModelWithString>;\n};\n\nexport type ComplexTypesResponse = ComplexTypesResponses[keyof ComplexTypesResponses];\n\nexport type MultipartResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multipart';\n};\n\nexport type MultipartResponseResponses = {\n    /**\n     * OK\n     */\n    200: {\n        file?: Blob | File;\n        metadata?: {\n            foo?: string;\n            bar?: string;\n        };\n    };\n};\n\nexport type MultipartResponseResponse = MultipartResponseResponses[keyof MultipartResponseResponses];\n\nexport type MultipartRequestData = {\n    body?: {\n        content?: Blob | File;\n        data?: ModelWithString | null;\n    };\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multipart';\n};\n\nexport type ComplexParamsData = {\n    body?: {\n        readonly key: string | null;\n        name: string | null;\n        enabled?: boolean;\n        type: 'Monkey' | 'Horse' | 'Bird';\n        listOfModels?: Array<ModelWithString> | null;\n        listOfStrings?: Array<string> | null;\n        parameters: ModelWithString | ModelWithEnum | ModelWithArray | ModelWithDictionary;\n        readonly user?: {\n            readonly id?: number;\n            readonly name?: string | null;\n        };\n    };\n    path: {\n        id: number;\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string;\n    };\n    query?: never;\n    url: '/api/v{api-version}/complex/{id}';\n};\n\nexport type ComplexParamsResponses = {\n    /**\n     * Success\n     */\n    200: ModelWithString;\n};\n\nexport type ComplexParamsResponse = ComplexParamsResponses[keyof ComplexParamsResponses];\n\nexport type CallWithResultFromHeaderData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/header';\n};\n\nexport type CallWithResultFromHeaderErrors = {\n    /**\n     * 400 server error\n     */\n    400: unknown;\n    /**\n     * 500 server error\n     */\n    500: unknown;\n};\n\nexport type CallWithResultFromHeaderResponses = {\n    /**\n     * Successful response\n     */\n    200: unknown;\n};\n\nexport type TestErrorCodeData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * Status code to return\n         */\n        status: number;\n    };\n    url: '/api/v{api-version}/error';\n};\n\nexport type TestErrorCodeErrors = {\n    /**\n     * Custom message: Internal Server Error\n     */\n    500: unknown;\n    /**\n     * Custom message: Not Implemented\n     */\n    501: unknown;\n    /**\n     * Custom message: Bad Gateway\n     */\n    502: unknown;\n    /**\n     * Custom message: Service Unavailable\n     */\n    503: unknown;\n};\n\nexport type TestErrorCodeResponses = {\n    /**\n     * Custom message: Successful response\n     */\n    200: unknown;\n};\n\nexport type NonAsciiæøåÆøÅöôêÊ字符串Data = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * Dummy input param\n         */\n        nonAsciiParamæøåÆØÅöôêÊ: number;\n    };\n    url: '/api/v{api-version}/non-ascii-æøåÆØÅöôêÊ字符串';\n};\n\nexport type NonAsciiæøåÆøÅöôêÊ字符串Responses = {\n    /**\n     * Successful response\n     */\n    200: Array<NonAsciiStringæøåÆøÅöôêÊ字符串>;\n};\n\nexport type NonAsciiæøåÆøÅöôêÊ字符串Response = NonAsciiæøåÆøÅöôêÊ字符串Responses[keyof NonAsciiæøåÆøÅöôêÊ字符串Responses];\n\nexport type PutWithFormUrlEncodedData = {\n    body: ArrayWithStrings;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/non-ascii-æøåÆØÅöôêÊ字符串';\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-angular/base-url-string/client/client.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { HttpResponse } from '@angular/common/http';\nimport { HttpClient, HttpErrorResponse, HttpEventType, HttpRequest } from '@angular/common/http';\nimport {\n  assertInInjectionContext,\n  inject,\n  provideAppInitializer,\n  runInInjectionContext,\n} from '@angular/core';\nimport { firstValueFrom } from 'rxjs';\nimport { filter } from 'rxjs/operators';\n\nimport { createSseClient } from '../core/serverSentEvents.gen';\nimport type { HttpMethod } from '../core/types.gen';\nimport { getValidRequestBody } from '../core/utils.gen';\nimport type {\n  Client,\n  Config,\n  RequestOptions,\n  ResolvedRequestOptions,\n  ResponseStyle,\n} from './types.gen';\nimport {\n  buildUrl,\n  createConfig,\n  createInterceptors,\n  mergeConfigs,\n  mergeHeaders,\n  setAuthParams,\n} from './utils.gen';\n\nexport function provideHeyApiClient(client: Client) {\n  return provideAppInitializer(() => {\n    const httpClient = inject(HttpClient);\n    client.setConfig({ httpClient });\n  });\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<\n    HttpRequest<unknown>,\n    HttpResponse<unknown>,\n    unknown,\n    ResolvedRequestOptions\n  >();\n\n  const requestOptions = <\n    TData = unknown,\n    ThrowOnError extends boolean = false,\n    TResponseStyle extends ResponseStyle = 'fields',\n  >(\n    options: RequestOptions<TData, TResponseStyle, ThrowOnError>,\n  ) => {\n    const opts = {\n      ..._config,\n      ...options,\n      headers: mergeHeaders(_config.headers, options.headers),\n      httpClient: options.httpClient ?? _config.httpClient,\n      serializedBody: undefined as string | undefined,\n    };\n\n    if (!opts.httpClient) {\n      if (opts.injector) {\n        opts.httpClient = runInInjectionContext(opts.injector, () => inject(HttpClient));\n      } else {\n        assertInInjectionContext(requestOptions);\n        opts.httpClient = inject(HttpClient);\n      }\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 url = buildUrl(opts as any);\n\n    const req = new HttpRequest<unknown>(opts.method ?? 'GET', url, getValidRequestBody(opts), {\n      redirect: 'follow',\n      ...opts,\n    });\n\n    return { opts, req, url };\n  };\n\n  const beforeRequest = async (options: RequestOptions) => {\n    const { opts, req, url } = requestOptions(options);\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    return { opts, req, url };\n  };\n\n  const request: Client['request'] = async (options) => {\n    // @ts-expect-error\n    const { opts, req: initialReq } = await beforeRequest(options);\n\n    let req = initialReq;\n\n    for (const fn of interceptors.request.fns) {\n      if (fn) {\n        req = await fn(req, opts as any);\n      }\n    }\n\n    const result: {\n      request: HttpRequest<unknown>;\n      response: any;\n    } = {\n      request: req,\n      response: null,\n    };\n\n    try {\n      result.response = (await firstValueFrom(\n        opts\n          .httpClient!.request(req)\n          .pipe(filter((event) => event.type === HttpEventType.Response)),\n      )) as HttpResponse<unknown>;\n\n      for (const fn of interceptors.response.fns) {\n        if (fn) {\n          result.response = await fn(result.response, req, opts as any);\n        }\n      }\n\n      let bodyResponse = result.response.body;\n\n      if (opts.responseValidator) {\n        await opts.responseValidator(bodyResponse);\n      }\n\n      if (opts.responseTransformer) {\n        bodyResponse = await opts.responseTransformer(bodyResponse);\n      }\n\n      return opts.responseStyle === 'data' ? bodyResponse : { data: bodyResponse, ...result };\n    } catch (error) {\n      if (error instanceof HttpErrorResponse) {\n        result.response = error;\n      }\n\n      let finalError = error instanceof HttpErrorResponse ? error.error : error;\n\n      for (const fn of interceptors.error.fns) {\n        if (fn) {\n          finalError = (await fn(finalError, result.response as any, req, opts as any)) as string;\n        }\n      }\n\n      if (opts.throwOnError) {\n        throw finalError;\n      }\n\n      return opts.responseStyle === 'data'\n        ? undefined\n        : {\n            error: finalError,\n            ...result,\n          };\n    }\n  };\n\n  const makeMethodFn = (method: Uppercase<HttpMethod>) => (options: RequestOptions) =>\n    request({ ...options, method });\n\n  const makeSseFn = (method: Uppercase<HttpMethod>) => async (options: RequestOptions) => {\n    const { opts, url } = await beforeRequest(options);\n    return createSseClient({\n      ...opts,\n      body: opts.body as BodyInit | null | undefined,\n      headers: opts.headers as unknown as Record<string, string>,\n      method,\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    requestOptions: (options) => {\n      if (options.security) {\n        throw new Error('Security is not supported in requestOptions');\n      }\n\n      if (options.requestValidator) {\n        throw new Error('Request validation is not supported in requestOptions');\n      }\n\n      return requestOptions(options).req;\n    },\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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-angular/base-url-string/client/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type { Auth } from '../core/auth.gen';\nexport type { QuerySerializerOptions } from '../core/bodySerializer.gen';\nexport {\n  formDataBodySerializer,\n  jsonBodySerializer,\n  urlSearchParamsBodySerializer,\n} from '../core/bodySerializer.gen';\nexport { buildClientParams } from '../core/params.gen';\nexport { serializeQueryKeyValue } from '../core/queryKeySerializer.gen';\nexport { createClient } from './client.gen';\nexport type {\n  Client,\n  ClientOptions,\n  Config,\n  CreateClientConfig,\n  Options,\n  RequestOptions,\n  RequestResult,\n  ResolvedRequestOptions,\n  ResponseStyle,\n  TDataShape,\n} from './types.gen';\nexport { createConfig, mergeHeaders } from './utils.gen';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-angular/base-url-string/client/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type {\n  HttpClient,\n  HttpErrorResponse,\n  HttpHeaders,\n  HttpRequest,\n  HttpResponse,\n} from '@angular/common/http';\nimport type { Injector } from '@angular/core';\n\nimport type { Auth } from '../core/auth.gen';\nimport type {\n  ServerSentEventsOptions,\n  ServerSentEventsResult,\n} from '../core/serverSentEvents.gen';\nimport type { Client as CoreClient, Config as CoreConfig } from '../core/types.gen';\nimport type { Middleware } from './utils.gen';\n\nexport type ResponseStyle = 'data' | 'fields';\n\nexport interface Config<T extends ClientOptions = ClientOptions>\n  extends Omit<RequestInit, 'body' | 'headers' | 'method'>, Omit<CoreConfig, 'headers'> {\n  /**\n   * Base URL for all requests made by this client.\n   */\n  baseUrl?: T['baseUrl'];\n  /**\n   * An object containing any HTTP headers that you want to pre-populate your\n   * `HttpHeaders` object with.\n   *\n   * {@link https://angular.dev/api/common/http/HttpHeaders#constructor See more}\n   */\n  headers?:\n    | HttpHeaders\n    | Record<\n        string,\n        string | number | boolean | (string | number | boolean)[] | null | undefined | unknown\n      >;\n  /**\n   * The HTTP client to use for making requests.\n   */\n  httpClient?: HttpClient;\n  /**\n   * Should we return only data or multiple fields (data, error, response, etc.)?\n   *\n   * @default 'fields'\n   */\n  responseStyle?: ResponseStyle;\n\n  /**\n   * Throw an error instead of returning it in the response?\n   *\n   * @default false\n   */\n  throwOnError?: T['throwOnError'];\n}\n\nexport interface RequestOptions<\n  TData = unknown,\n  TResponseStyle extends ResponseStyle = 'fields',\n  ThrowOnError extends boolean = boolean,\n  Url extends string = string,\n>\n  extends\n    Config<{\n      responseStyle: TResponseStyle;\n      throwOnError: ThrowOnError;\n    }>,\n    Pick<\n      ServerSentEventsOptions<TData>,\n      | 'onRequest'\n      | 'onSseError'\n      | 'onSseEvent'\n      | 'sseDefaultRetryDelay'\n      | 'sseMaxRetryAttempts'\n      | 'sseMaxRetryDelay'\n    > {\n  /**\n   * Any body that you want to add to your request.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/fetch#body}\n   */\n  body?: unknown;\n  /**\n   * Optional custom injector for dependency resolution if you don't implicitly or explicitly provide one.\n   */\n  injector?: Injector;\n  path?: Record<string, unknown>;\n  query?: Record<string, unknown>;\n  /**\n   * Security mechanism(s) to use for the request.\n   */\n  security?: ReadonlyArray<Auth>;\n  url: Url;\n}\n\nexport interface ResolvedRequestOptions<\n  TResponseStyle extends ResponseStyle = 'fields',\n  ThrowOnError extends boolean = boolean,\n  Url extends string = string,\n> extends RequestOptions<unknown, TResponseStyle, ThrowOnError, Url> {\n  serializedBody?: string;\n}\n\nexport type RequestResult<\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = boolean,\n  TResponseStyle extends ResponseStyle = 'fields',\n> = Promise<\n  ThrowOnError extends true\n    ? TResponseStyle extends 'data'\n      ? TData extends Record<string, unknown>\n        ? TData[keyof TData]\n        : TData\n      : {\n          data: TData extends Record<string, unknown> ? TData[keyof TData] : TData;\n          request: HttpRequest<unknown>;\n          response: HttpResponse<TData>;\n        }\n    : TResponseStyle extends 'data'\n      ? (TData extends Record<string, unknown> ? TData[keyof TData] : TData) | undefined\n      :\n          | {\n              data: TData extends Record<string, unknown> ? TData[keyof TData] : TData;\n              error: undefined;\n              request: HttpRequest<unknown>;\n              response: HttpResponse<TData>;\n            }\n          | {\n              data: undefined;\n              error: TError[keyof TError];\n              request: HttpRequest<unknown>;\n              response: HttpErrorResponse & {\n                error: TError[keyof TError] | null;\n              };\n            }\n>;\n\nexport interface ClientOptions {\n  baseUrl?: string;\n  responseStyle?: ResponseStyle;\n  throwOnError?: boolean;\n}\n\ntype MethodFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'>,\n) => RequestResult<TData, TError, ThrowOnError, TResponseStyle>;\n\ntype SseFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'>,\n) => Promise<ServerSentEventsResult<TData, TError>>;\n\ntype RequestFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'> &\n    Pick<Required<RequestOptions<TData, TResponseStyle, ThrowOnError>>, 'method'>,\n) => RequestResult<TData, TError, ThrowOnError, TResponseStyle>;\n\ntype RequestOptionsFn = <\n  T,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: RequestOptions<T, TResponseStyle, ThrowOnError>,\n) => HttpRequest<T>;\n\ntype BuildUrlFn = <\n  TData extends {\n    body?: unknown;\n    path?: Record<string, unknown>;\n    query?: Record<string, unknown>;\n    url: string;\n  },\n>(\n  options: TData & Options<TData>,\n) => string;\n\nexport type Client = CoreClient<RequestFn, Config, MethodFn, BuildUrlFn, SseFn> & {\n  interceptors: Middleware<\n    HttpRequest<unknown>,\n    HttpResponse<unknown>,\n    unknown,\n    ResolvedRequestOptions\n  >;\n  requestOptions: RequestOptionsFn;\n};\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 = ClientOptions> = (\n  override?: Config<ClientOptions & T>,\n) => Config<Required<ClientOptions> & T>;\n\nexport interface TDataShape {\n  body?: unknown;\n  headers?: unknown;\n  path?: unknown;\n  query?: unknown;\n  url: string;\n}\n\ntype OmitKeys<T, K> = Pick<T, Exclude<keyof T, K>>;\n\nexport type Options<\n  TData extends TDataShape = TDataShape,\n  ThrowOnError extends boolean = boolean,\n  TResponse = unknown,\n  TResponseStyle extends ResponseStyle = 'fields',\n> = OmitKeys<\n  RequestOptions<TResponse, TResponseStyle, ThrowOnError>,\n  'body' | 'path' | 'query' | 'url'\n> &\n  ([TData] extends [never] ? unknown : Omit<TData, 'url'>);\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-angular/base-url-string/client/utils.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport { HttpHeaders } from '@angular/common/http';\n\nimport { getAuthToken } from '../core/auth.gen';\nimport type {\n  QuerySerializer,\n  QuerySerializerOptions,\n} from '../core/bodySerializer.gen';\nimport {\n  serializeArrayParam,\n  serializeObjectParam,\n  serializePrimitiveParam,\n} from '../core/pathSerializer.gen';\nimport type { Client, ClientOptions, Config, RequestOptions } from './types.gen';\n\ninterface PathSerializer {\n  path: Record<string, unknown>;\n  url: string;\n}\n\nconst PATH_PARAM_RE = /\\{[^{}]+\\}/g;\n\ntype ArrayStyle = 'form' | 'spaceDelimited' | 'pipeDelimited';\ntype MatrixStyle = 'label' | 'matrix' | 'simple';\ntype ArraySeparatorStyle = ArrayStyle | MatrixStyle;\n\nconst 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 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 = (\n  contentType: string | null,\n): 'blob' | 'formData' | 'json' | 'stream' | 'text' | undefined => {\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\nexport const setAuthParams = async (\n  options: Pick<Required<RequestOptions>, 'security'> &\n    Pick<RequestOptions, 'auth' | 'query'> & {\n      headers: HttpHeaders;\n    },\n) => {\n  for (const auth of options.security) {\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 = options.headers.append('Cookie', `${name}=${token}`);\n        break;\n      case 'header':\n      default:\n        options.headers = options.headers.set(name, token);\n        break;\n    }\n\n    return;\n  }\n};\n\nexport const buildUrl: Client['buildUrl'] = (options) => {\n  const url = 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  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 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\nexport const mergeHeaders = (\n  ...headers: Array<Required<Config>['headers'] | undefined>\n): HttpHeaders => {\n  let mergedHeaders = new HttpHeaders();\n\n  for (const header of headers) {\n    if (!header || typeof header !== 'object') {\n      continue;\n    }\n\n    if (header instanceof HttpHeaders) {\n      // Merge HttpHeaders instance\n      header.keys().forEach((key) => {\n        const values = header.getAll(key);\n        if (values) {\n          values.forEach((value) => {\n            mergedHeaders = mergedHeaders.append(key, value);\n          });\n        }\n      });\n    } else {\n      // Merge plain object headers\n      for (const [key, value] of Object.entries(header)) {\n        if (value === null) {\n          mergedHeaders = mergedHeaders.delete(key);\n        } else if (Array.isArray(value)) {\n          for (const v of value) {\n            mergedHeaders = 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 = mergedHeaders.set(\n            key,\n            typeof value === 'object' ? JSON.stringify(value) : (value as string),\n          );\n        }\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  headers: defaultHeaders,\n  querySerializer: defaultQuerySerializer,\n  ...override,\n});\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-angular/base-url-string/client.gen.ts",
    "content": "// 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://foo.com' }));\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-angular/base-url-string/core/auth.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-angular/base-url-string/core/bodySerializer.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-angular/base-url-string/core/params.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-angular/base-url-string/core/pathSerializer.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-angular/base-url-string/core/queryKeySerializer.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\n/**\n * JSON-friendly union that mirrors what Pinia Colada can hash.\n */\nexport type JsonValue =\n  | null\n  | string\n  | number\n  | boolean\n  | JsonValue[]\n  | { [key: string]: JsonValue };\n\n/**\n * Replacer that converts non-JSON values (bigint, Date, etc.) to safe substitutes.\n */\nexport const queryKeyJsonReplacer = (_key: string, value: unknown) => {\n  if (value === undefined || typeof value === 'function' || typeof value === 'symbol') {\n    return undefined;\n  }\n  if (typeof value === 'bigint') {\n    return value.toString();\n  }\n  if (value instanceof Date) {\n    return value.toISOString();\n  }\n  return value;\n};\n\n/**\n * Safely stringifies a value and parses it back into a JsonValue.\n */\nexport const stringifyToJsonValue = (input: unknown): JsonValue | undefined => {\n  try {\n    const json = JSON.stringify(input, queryKeyJsonReplacer);\n    if (json === undefined) {\n      return undefined;\n    }\n    return JSON.parse(json) as JsonValue;\n  } catch {\n    return undefined;\n  }\n};\n\n/**\n * Detects plain objects (including objects with a null prototype).\n */\nconst isPlainObject = (value: unknown): value is Record<string, unknown> => {\n  if (value === null || typeof value !== 'object') {\n    return false;\n  }\n  const prototype = Object.getPrototypeOf(value as object);\n  return prototype === Object.prototype || prototype === null;\n};\n\n/**\n * Turns URLSearchParams into a sorted JSON object for deterministic keys.\n */\nconst serializeSearchParams = (params: URLSearchParams): JsonValue => {\n  const entries = Array.from(params.entries()).sort(([a], [b]) => a.localeCompare(b));\n  const result: Record<string, JsonValue> = {};\n\n  for (const [key, value] of entries) {\n    const existing = result[key];\n    if (existing === undefined) {\n      result[key] = value;\n      continue;\n    }\n\n    if (Array.isArray(existing)) {\n      (existing as string[]).push(value);\n    } else {\n      result[key] = [existing, value];\n    }\n  }\n\n  return result;\n};\n\n/**\n * Normalizes any accepted value into a JSON-friendly shape for query keys.\n */\nexport const serializeQueryKeyValue = (value: unknown): JsonValue | undefined => {\n  if (value === null) {\n    return null;\n  }\n\n  if (typeof value === 'string' || typeof value === 'number' || typeof value === 'boolean') {\n    return value;\n  }\n\n  if (value === undefined || typeof value === 'function' || typeof value === 'symbol') {\n    return undefined;\n  }\n\n  if (typeof value === 'bigint') {\n    return value.toString();\n  }\n\n  if (value instanceof Date) {\n    return value.toISOString();\n  }\n\n  if (Array.isArray(value)) {\n    return stringifyToJsonValue(value);\n  }\n\n  if (typeof URLSearchParams !== 'undefined' && value instanceof URLSearchParams) {\n    return serializeSearchParams(value);\n  }\n\n  if (isPlainObject(value)) {\n    return stringifyToJsonValue(value);\n  }\n\n  return undefined;\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-angular/base-url-string/core/serverSentEvents.gen.ts",
    "content": "// 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 const 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            // Normalize line endings: CRLF -> LF, then CR -> LF\n            buffer = buffer.replace(/\\r\\n/g, '\\n').replace(/\\r/g, '\\n');\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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-angular/base-url-string/core/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { Auth, AuthToken } from './auth.gen';\nimport type { BodySerializer, QuerySerializer, QuerySerializerOptions } from './bodySerializer.gen';\n\nexport type HttpMethod =\n  | 'connect'\n  | 'delete'\n  | 'get'\n  | 'head'\n  | 'options'\n  | 'patch'\n  | 'post'\n  | 'put'\n  | 'trace';\n\nexport type Client<\n  RequestFn = never,\n  Config = unknown,\n  MethodFn = never,\n  BuildUrlFn = never,\n  SseFn = never,\n> = {\n  /**\n   * Returns the final request URL.\n   */\n  buildUrl: BuildUrlFn;\n  getConfig: () => Config;\n  request: RequestFn;\n  setConfig: (config: Config) => Config;\n} & {\n  [K in HttpMethod]: MethodFn;\n} & ([SseFn] extends [never] ? { sse?: never } : { sse: { [K in HttpMethod]: SseFn } });\n\nexport interface Config {\n  /**\n   * Auth token or a function returning auth token. The resolved value will be\n   * added to the request payload as defined by its `security` array.\n   */\n  auth?: ((auth: Auth) => Promise<AuthToken> | AuthToken) | AuthToken;\n  /**\n   * A function for serializing request body parameter. By default,\n   * {@link JSON.stringify()} will be used.\n   */\n  bodySerializer?: BodySerializer | null;\n  /**\n   * An object containing any HTTP headers that you want to pre-populate your\n   * `Headers` object with.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/Headers/Headers#init See more}\n   */\n  headers?:\n    | RequestInit['headers']\n    | Record<\n        string,\n        string | number | boolean | (string | number | boolean)[] | null | undefined | unknown\n      >;\n  /**\n   * The request method.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/fetch#method See more}\n   */\n  method?: Uppercase<HttpMethod>;\n  /**\n   * A function for serializing request query parameters. By default, arrays\n   * will be exploded in form style, objects will be exploded in deepObject\n   * style, and reserved characters are percent-encoded.\n   *\n   * This method will have no effect if the native `paramsSerializer()` Axios\n   * API function is used.\n   *\n   * {@link https://swagger.io/docs/specification/serialization/#query View examples}\n   */\n  querySerializer?: QuerySerializer | QuerySerializerOptions;\n  /**\n   * A function validating request data. This is useful if you want to ensure\n   * the request conforms to the desired shape, so it can be safely sent to\n   * the server.\n   */\n  requestValidator?: (data: unknown) => Promise<unknown>;\n  /**\n   * A function transforming response data before it's returned. This is useful\n   * for post-processing data, e.g. converting ISO strings into Date objects.\n   */\n  responseTransformer?: (data: unknown) => Promise<unknown>;\n  /**\n   * A function validating response data. This is useful if you want to ensure\n   * the response conforms to the desired shape, so it can be safely passed to\n   * the transformers and returned to the user.\n   */\n  responseValidator?: (data: unknown) => Promise<unknown>;\n}\n\ntype IsExactlyNeverOrNeverUndefined<T> = [T] extends [never]\n  ? true\n  : [T] extends [never | undefined]\n    ? [undefined] extends [T]\n      ? false\n      : true\n    : false;\n\nexport type OmitNever<T extends Record<string, unknown>> = {\n  [K in keyof T as IsExactlyNeverOrNeverUndefined<T[K]> extends true ? never : K]: T[K];\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-angular/base-url-string/core/utils.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-angular/base-url-string/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type { _3eNum1Период, _400, AdditionalPropertiesIntegerIssue, AdditionalPropertiesUnknownIssue, AdditionalPropertiesUnknownIssue2, AdditionalPropertiesUnknownIssue3, AdditionalPropertiesUnknownIssueWritable, AnyOfAnyAndNull, AnyOfArrays, ApiVVersionODataControllerCountData, ApiVVersionODataControllerCountResponse, ApiVVersionODataControllerCountResponses, ArrayWithAnyOfProperties, ArrayWithArray, ArrayWithBooleans, ArrayWithNumbers, ArrayWithProperties, ArrayWithReferences, ArrayWithStrings, CallToTestOrderOfParamsData, CallWithDefaultOptionalParametersData, CallWithDefaultParametersData, CallWithDescriptionsData, CallWithDuplicateResponsesData, CallWithDuplicateResponsesError, CallWithDuplicateResponsesErrors, CallWithDuplicateResponsesResponse, CallWithDuplicateResponsesResponses, CallWithNoContentResponseData, CallWithNoContentResponseResponse, CallWithNoContentResponseResponses, CallWithParametersData, CallWithResponseAndNoContentResponseData, CallWithResponseAndNoContentResponseResponse, CallWithResponseAndNoContentResponseResponses, CallWithResponseData, CallWithResponseResponse, CallWithResponseResponses, CallWithResponsesData, CallWithResponsesError, CallWithResponsesErrors, CallWithResponsesResponse, CallWithResponsesResponses, CallWithResultFromHeaderData, CallWithResultFromHeaderErrors, CallWithResultFromHeaderResponses, CallWithWeirdParameterNamesData, CamelCaseCommentWithBreaks, CharactersInDescription, ClientOptions, CollectionFormatData, CommentWithBackticks, CommentWithBackticksAndQuotes, CommentWithBreaks, CommentWithExpressionPlaceholders, CommentWithQuotes, CommentWithReservedCharacters, CommentWithSlashes, ComplexParamsData, ComplexParamsResponse, ComplexParamsResponses, ComplexTypesData, ComplexTypesErrors, ComplexTypesResponse, ComplexTypesResponses, CompositionBaseModel, CompositionExtendedModel, CompositionWithAllOfAndNullable, CompositionWithAnyOf, CompositionWithAnyOfAndNullable, CompositionWithAnyOfAnonymous, CompositionWithNestedAnyAndTypeNull, CompositionWithNestedAnyOfAndNull, CompositionWithOneOf, CompositionWithOneOfAndComplexArrayDictionary, CompositionWithOneOfAndNullable, CompositionWithOneOfAndProperties, CompositionWithOneOfAndSimpleArrayDictionary, CompositionWithOneOfAndSimpleDictionary, CompositionWithOneOfAnonymous, CompositionWithOneOfDiscriminator, ConstValue, Default, DeleteCallWithoutParametersAndResponseData, DeleteFooData, DeleteFooData2, DeleteFooData3, DeprecatedCallData, DeprecatedModel, DictionaryWithArray, DictionaryWithDictionary, DictionaryWithProperties, DictionaryWithPropertiesAndAdditionalProperties, DictionaryWithReference, DictionaryWithString, DummyAData, DummyAResponse, DummyAResponses, DummyBData, DummyBResponse, DummyBResponses, DuplicateName2Data, DuplicateName3Data, DuplicateName4Data, DuplicateNameData, EnumFromDescription, EnumWithExtensions, EnumWithNumbers, EnumWithReplacedCharacters, EnumWithStrings, EnumWithXEnumNames, ExportData, ExternalRefA, ExternalRefB, ExternalSharedModel, File, FileResponseData, FileResponseResponse, FileResponseResponses, FileWritable, FooWowData, FooWowResponses, FreeFormObjectWithAdditionalPropertiesEqEmptyObject, FreeFormObjectWithAdditionalPropertiesEqTrue, FreeFormObjectWithoutAdditionalProperties, GenericSchemaDuplicateIssue1SystemBoolean, GenericSchemaDuplicateIssue1SystemBooleanWritable, GenericSchemaDuplicateIssue1SystemString, GenericSchemaDuplicateIssue1SystemStringWritable, GetApiVbyApiVersionSimpleOperationData, GetApiVbyApiVersionSimpleOperationError, GetApiVbyApiVersionSimpleOperationErrors, GetApiVbyApiVersionSimpleOperationResponse, GetApiVbyApiVersionSimpleOperationResponses, GetCallWithOptionalParamData, GetCallWithoutParametersAndResponseData, HeadCallWithoutParametersAndResponseData, Import, ImportData, ImportResponse, ImportResponses, IoK8sApimachineryPkgApisMetaV1DeleteOptions, IoK8sApimachineryPkgApisMetaV1Preconditions, ModelCircle, ModelFromZendesk, ModelSquare, ModelThatExtends, ModelThatExtendsExtends, ModelWithAdditionalPropertiesEqTrue, ModelWithAdditionalPropertiesRef, ModelWithAnyOfConstantSizeArray, ModelWithAnyOfConstantSizeArrayAndIntersect, ModelWithAnyOfConstantSizeArrayNullable, ModelWithAnyOfConstantSizeArrayWithNSizeAndOptions, ModelWithAnyOfConstantSizeArrayWithNSizeAndOptionsWritable, ModelWithArray, ModelWithArrayReadOnlyAndWriteOnly, ModelWithArrayReadOnlyAndWriteOnlyWritable, ModelWithBackticksInDescription, ModelWithBoolean, ModelWithCircularReference, ModelWithConst, ModelWithConstantSizeArray, ModelWithDictionary, ModelWithDuplicateImports, ModelWithDuplicateProperties, ModelWithEnum, ModelWithEnumFromDescription, ModelWithEnumWithHyphen, ModelWithInteger, ModelWithNestedArrayEnums, ModelWithNestedArrayEnumsData, ModelWithNestedArrayEnumsDataBar, ModelWithNestedArrayEnumsDataFoo, ModelWithNestedCompositionEnums, ModelWithNestedEnums, ModelWithNestedProperties, ModelWithNullableObject, ModelWithNullableString, ModelWithNumericEnumUnion, ModelWithOneOfAndProperties, ModelWithOneOfEnum, ModelWithOrderedProperties, ModelWithPattern, ModelWithPatternWritable, ModelWithPrefixItemsConstantSizeArray, ModelWithProperties, ModelWithPropertiesWritable, ModelWithReadOnlyAndWriteOnly, ModelWithReadOnlyAndWriteOnlyWritable, ModelWithReference, ModelWithReferenceWritable, ModelWithString, ModelWithStringError, MultipartRequestData, MultipartResponseData, MultipartResponseResponse, MultipartResponseResponses, NestedAnyOfArraysNullable, NonAsciiæøåÆøÅöôêÊ字符串Data, NonAsciiæøåÆøÅöôêÊ字符串Response, NonAsciiæøåÆøÅöôêÊ字符串Responses, NonAsciiStringæøåÆøÅöôêÊ字符串, NullableObject, OneOfAllOfIssue, OneOfAllOfIssueWritable, OptionsCallWithoutParametersAndResponseData, Pageable, ParameterSimpleParameterUnused, PatchApiVbyApiVersionNoTagData, PatchApiVbyApiVersionNoTagResponses, PatchCallWithoutParametersAndResponseData, PostApiVbyApiVersionFormDataData, PostApiVbyApiVersionRequestBodyData, PostCallWithOptionalParamData, PostCallWithOptionalParamResponse, PostCallWithOptionalParamResponses, PostCallWithoutParametersAndResponseData, PostServiceWithEmptyTagResponse, PostServiceWithEmptyTagResponse2, PutCallWithoutParametersAndResponseData, PutWithFormUrlEncodedData, SchemaWithFormRestrictedKeys, SimpleBoolean, SimpleFile, SimpleFormData, SimpleInteger, SimpleParameter, SimpleReference, SimpleRequestBody, SimpleString, SimpleStringWithPattern, TestErrorCodeData, TestErrorCodeErrors, TestErrorCodeResponses, TypesData, TypesResponse, TypesResponses, UploadFileData, UploadFileResponse, UploadFileResponses, XFooBar } from './types.gen';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-angular/base-url-string/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type ClientOptions = {\n    baseUrl: 'http://localhost:3000/base' | (string & {});\n};\n\n/**\n * Model with number-only name\n */\nexport type _400 = string;\n\n/**\n * External ref to shared model (A)\n */\nexport type ExternalRefA = ExternalSharedModel;\n\n/**\n * External ref to shared model (B)\n */\nexport type ExternalRefB = ExternalSharedModel;\n\n/**\n * Testing multiline comments in string: First line\n * Second line\n *\n * Fourth line\n */\nexport type CamelCaseCommentWithBreaks = number;\n\n/**\n * Testing multiline comments in string: First line\n * Second line\n *\n * Fourth line\n */\nexport type CommentWithBreaks = number;\n\n/**\n * Testing backticks in string: `backticks` and ```multiple backticks``` should work\n */\nexport type CommentWithBackticks = number;\n\n/**\n * Testing backticks and quotes in string: `backticks`, 'quotes', \"double quotes\" and ```multiple backticks``` should work\n */\nexport type CommentWithBackticksAndQuotes = number;\n\n/**\n * Testing slashes in string: \\backwards\\\\\\ and /forwards/// should work\n */\nexport type CommentWithSlashes = number;\n\n/**\n * Testing expression placeholders in string: ${expression} should work\n */\nexport type CommentWithExpressionPlaceholders = number;\n\n/**\n * Testing quotes in string: 'single quote''' and \"double quotes\"\"\" should work\n */\nexport type CommentWithQuotes = number;\n\n/**\n * Testing reserved characters in string: * inline * and ** inline ** should work\n */\nexport type CommentWithReservedCharacters = number;\n\n/**\n * This is a simple number\n */\nexport type SimpleInteger = number;\n\n/**\n * This is a simple boolean\n */\nexport type SimpleBoolean = boolean;\n\n/**\n * This is a simple string\n */\nexport type SimpleString = string;\n\n/**\n * A string with non-ascii (unicode) characters valid in typescript identifiers (æøåÆØÅöÔèÈ字符串)\n */\nexport type NonAsciiStringæøåÆøÅöôêÊ字符串 = string;\n\n/**\n * This is a simple file\n */\nexport type SimpleFile = Blob | File;\n\n/**\n * This is a simple reference\n */\nexport type SimpleReference = ModelWithString;\n\n/**\n * This is a simple string\n */\nexport type SimpleStringWithPattern = string | null;\n\n/**\n * This is a simple enum with strings\n */\nexport type EnumWithStrings = 'Success' | 'Warning' | 'Error' | '\\'Single Quote\\'' | '\"Double Quotes\"' | 'Non-ascii: øæåôöØÆÅÔÖ字符串';\n\nexport type EnumWithReplacedCharacters = '\\'Single Quote\\'' | '\"Double Quotes\"' | 'øæåôöØÆÅÔÖ字符串' | 3.1 | '';\n\n/**\n * This is a simple enum with numbers\n */\nexport type EnumWithNumbers = 1 | 2 | 3 | 1.1 | 1.2 | 1.3 | 100 | 200 | 300 | -100 | -200 | -300 | -1.1 | -1.2 | -1.3;\n\n/**\n * Success=1,Warning=2,Error=3\n */\nexport type EnumFromDescription = number;\n\n/**\n * This is a simple enum with numbers\n */\nexport type EnumWithExtensions = 200 | 400 | 500;\n\nexport type EnumWithXEnumNames = 0 | 1 | 2;\n\n/**\n * This is a simple array with numbers\n */\nexport type ArrayWithNumbers = Array<number>;\n\n/**\n * This is a simple array with booleans\n */\nexport type ArrayWithBooleans = Array<boolean>;\n\n/**\n * This is a simple array with strings\n */\nexport type ArrayWithStrings = Array<string>;\n\n/**\n * This is a simple array with references\n */\nexport type ArrayWithReferences = Array<ModelWithString>;\n\n/**\n * This is a simple array containing an array\n */\nexport type ArrayWithArray = Array<Array<ModelWithString>>;\n\n/**\n * This is a simple array with properties\n */\nexport type ArrayWithProperties = Array<{\n    '16x16'?: CamelCaseCommentWithBreaks;\n    bar?: string;\n}>;\n\n/**\n * This is a simple array with any of properties\n */\nexport type ArrayWithAnyOfProperties = Array<{\n    foo?: string;\n} | {\n    bar?: string;\n}>;\n\nexport type AnyOfAnyAndNull = {\n    data?: unknown | null;\n};\n\n/**\n * This is a simple array with any of properties\n */\nexport type AnyOfArrays = {\n    results?: Array<{\n        foo?: string;\n    } | {\n        bar?: string;\n    }>;\n};\n\n/**\n * This is a string dictionary\n */\nexport type DictionaryWithString = {\n    [key: string]: string;\n};\n\nexport type DictionaryWithPropertiesAndAdditionalProperties = {\n    foo?: number;\n    bar?: boolean;\n    [key: string]: string | number | boolean | undefined;\n};\n\n/**\n * This is a string reference\n */\nexport type DictionaryWithReference = {\n    [key: string]: ModelWithString;\n};\n\n/**\n * This is a complex dictionary\n */\nexport type DictionaryWithArray = {\n    [key: string]: Array<ModelWithString>;\n};\n\n/**\n * This is a string dictionary\n */\nexport type DictionaryWithDictionary = {\n    [key: string]: {\n        [key: string]: string;\n    };\n};\n\n/**\n * This is a complex dictionary\n */\nexport type DictionaryWithProperties = {\n    [key: string]: {\n        foo?: string;\n        bar?: string;\n    };\n};\n\n/**\n * This is a model with one number property\n */\nexport type ModelWithInteger = {\n    /**\n     * This is a simple number property\n     */\n    prop?: number;\n};\n\n/**\n * This is a model with one boolean property\n */\nexport type ModelWithBoolean = {\n    /**\n     * This is a simple boolean property\n     */\n    prop?: boolean;\n};\n\n/**\n * This is a model with one string property\n */\nexport type ModelWithString = {\n    /**\n     * This is a simple string property\n     */\n    prop?: string;\n};\n\n/**\n * This is a model with one string property\n */\nexport type ModelWithStringError = {\n    /**\n     * This is a simple string property\n     */\n    prop?: string;\n};\n\n/**\n * `Comment` or `VoiceComment`. The JSON object for adding voice comments to tickets is different. See [Adding voice comments to tickets](/documentation/ticketing/managing-tickets/adding-voice-comments-to-tickets)\n */\nexport type ModelFromZendesk = string;\n\n/**\n * This is a model with one string property\n */\nexport type ModelWithNullableString = {\n    /**\n     * This is a simple string property\n     */\n    nullableProp1?: string | null;\n    /**\n     * This is a simple string property\n     */\n    nullableRequiredProp1: string | null;\n    /**\n     * This is a simple string property\n     */\n    nullableProp2?: string | null;\n    /**\n     * This is a simple string property\n     */\n    nullableRequiredProp2: string | null;\n    /**\n     * This is a simple enum with strings\n     */\n    'foo_bar-enum'?: 'Success' | 'Warning' | 'Error' | 'ØÆÅ字符串';\n};\n\n/**\n * This is a model with one enum\n */\nexport type ModelWithEnum = {\n    /**\n     * This is a simple enum with strings\n     */\n    'foo_bar-enum'?: 'Success' | 'Warning' | 'Error' | 'ØÆÅ字符串';\n    /**\n     * These are the HTTP error code enums\n     */\n    statusCode?: '100' | '200 FOO' | '300 FOO_BAR' | '400 foo-bar' | '500 foo.bar' | '600 foo&bar';\n    /**\n     * Simple boolean enum\n     */\n    bool?: true;\n};\n\n/**\n * This is a model with one enum with escaped name\n */\nexport type ModelWithEnumWithHyphen = {\n    /**\n     * Foo-Bar-Baz-Qux\n     */\n    'foo-bar-baz-qux'?: '3.0';\n};\n\n/**\n * This is a model with one enum\n */\nexport type ModelWithEnumFromDescription = {\n    /**\n     * Success=1,Warning=2,Error=3\n     */\n    test?: number;\n};\n\n/**\n * This is a model with nested enums\n */\nexport type ModelWithNestedEnums = {\n    dictionaryWithEnum?: {\n        [key: string]: 'Success' | 'Warning' | 'Error';\n    };\n    dictionaryWithEnumFromDescription?: {\n        [key: string]: number;\n    };\n    arrayWithEnum?: Array<'Success' | 'Warning' | 'Error'>;\n    arrayWithDescription?: Array<number>;\n    /**\n     * This is a simple enum with strings\n     */\n    'foo_bar-enum'?: 'Success' | 'Warning' | 'Error' | 'ØÆÅ字符串';\n};\n\n/**\n * This is a model with one property containing a reference\n */\nexport type ModelWithReference = {\n    prop?: ModelWithProperties;\n};\n\n/**\n * This is a model with one property containing an array\n */\nexport type ModelWithArrayReadOnlyAndWriteOnly = {\n    prop?: Array<ModelWithReadOnlyAndWriteOnly>;\n    propWithFile?: Array<Blob | File>;\n    propWithNumber?: Array<number>;\n};\n\n/**\n * This is a model with one property containing an array\n */\nexport type ModelWithArray = {\n    prop?: Array<ModelWithString>;\n    propWithFile?: Array<Blob | File>;\n    propWithNumber?: Array<number>;\n};\n\n/**\n * This is a model with one property containing a dictionary\n */\nexport type ModelWithDictionary = {\n    prop?: {\n        [key: string]: string;\n    };\n};\n\n/**\n * This is a deprecated model with a deprecated property\n *\n * @deprecated\n */\nexport type DeprecatedModel = {\n    /**\n     * This is a deprecated property\n     *\n     * @deprecated\n     */\n    prop?: string;\n};\n\n/**\n * This is a model with one property containing a circular reference\n */\nexport type ModelWithCircularReference = {\n    prop?: ModelWithCircularReference;\n};\n\n/**\n * This is a model with one property with a 'one of' relationship\n */\nexport type CompositionWithOneOf = {\n    propA?: ModelWithString | ModelWithEnum | ModelWithArray | ModelWithDictionary;\n};\n\n/**\n * This is a model with one property with a 'one of' relationship where the options are not $ref\n */\nexport type CompositionWithOneOfAnonymous = {\n    propA?: {\n        propA?: string;\n    } | string | number;\n};\n\n/**\n * Circle\n */\nexport type ModelCircle = {\n    kind: string;\n    radius?: number;\n};\n\n/**\n * Square\n */\nexport type ModelSquare = {\n    kind: string;\n    sideLength?: number;\n};\n\n/**\n * This is a model with one property with a 'one of' relationship where the options are not $ref\n */\nexport type CompositionWithOneOfDiscriminator = ({\n    kind: 'circle';\n} & ModelCircle) | ({\n    kind: 'square';\n} & ModelSquare);\n\n/**\n * This is a model with one property with a 'any of' relationship\n */\nexport type CompositionWithAnyOf = {\n    propA?: ModelWithString | ModelWithEnum | ModelWithArray | ModelWithDictionary;\n};\n\n/**\n * This is a model with one property with a 'any of' relationship where the options are not $ref\n */\nexport type CompositionWithAnyOfAnonymous = {\n    propA?: {\n        propA?: string;\n    } | string | number;\n};\n\n/**\n * This is a model with nested 'any of' property with a type null\n */\nexport type CompositionWithNestedAnyAndTypeNull = {\n    propA?: Array<ModelWithDictionary | null> | Array<ModelWithArray | null>;\n};\n\nexport type _3eNum1Период = 'Bird' | 'Dog';\n\nexport type ConstValue = 'ConstValue';\n\n/**\n * This is a model with one property with a 'any of' relationship where the options are not $ref\n */\nexport type CompositionWithNestedAnyOfAndNull = {\n    /**\n     * Scopes\n     */\n    propA?: Array<_3eNum1Период | ConstValue> | null;\n};\n\n/**\n * This is a model with one property with a 'one of' relationship\n */\nexport type CompositionWithOneOfAndNullable = {\n    propA?: {\n        boolean?: boolean;\n    } | ModelWithEnum | ModelWithArray | ModelWithDictionary | null;\n};\n\n/**\n * This is a model that contains a simple dictionary within composition\n */\nexport type CompositionWithOneOfAndSimpleDictionary = {\n    propA?: boolean | {\n        [key: string]: number;\n    };\n};\n\n/**\n * This is a model that contains a dictionary of simple arrays within composition\n */\nexport type CompositionWithOneOfAndSimpleArrayDictionary = {\n    propA?: boolean | {\n        [key: string]: Array<boolean>;\n    };\n};\n\n/**\n * This is a model that contains a dictionary of complex arrays (composited) within composition\n */\nexport type CompositionWithOneOfAndComplexArrayDictionary = {\n    propA?: boolean | {\n        [key: string]: Array<number | string>;\n    };\n};\n\n/**\n * This is a model with one property with a 'all of' relationship\n */\nexport type CompositionWithAllOfAndNullable = {\n    propA?: ({\n        boolean?: boolean;\n    } & ModelWithEnum & ModelWithArray & ModelWithDictionary) | null;\n};\n\n/**\n * This is a model with one property with a 'any of' relationship\n */\nexport type CompositionWithAnyOfAndNullable = {\n    propA?: {\n        boolean?: boolean;\n    } | ModelWithEnum | ModelWithArray | ModelWithDictionary | null;\n};\n\n/**\n * This is a base model with two simple optional properties\n */\nexport type CompositionBaseModel = {\n    firstName?: string;\n    lastname?: string;\n};\n\n/**\n * This is a model that extends the base model\n */\nexport type CompositionExtendedModel = CompositionBaseModel & {\n    age: number;\n    firstName: string;\n    lastname: string;\n};\n\n/**\n * This is a model with one nested property\n */\nexport type ModelWithProperties = {\n    required: string;\n    readonly requiredAndReadOnly: string;\n    requiredAndNullable: string | null;\n    string?: string;\n    number?: number;\n    boolean?: boolean;\n    reference?: ModelWithString;\n    'property with space'?: string;\n    default?: string;\n    try?: string;\n    readonly '@namespace.string'?: string;\n    readonly '@namespace.integer'?: number;\n};\n\n/**\n * This is a model with one nested property\n */\nexport type ModelWithNestedProperties = {\n    readonly first: {\n        readonly second: {\n            readonly third: string | null;\n        } | null;\n    } | null;\n};\n\n/**\n * This is a model with duplicated properties\n */\nexport type ModelWithDuplicateProperties = {\n    prop?: ModelWithString;\n};\n\n/**\n * This is a model with ordered properties\n */\nexport type ModelWithOrderedProperties = {\n    zebra?: string;\n    apple?: string;\n    hawaii?: string;\n};\n\n/**\n * This is a model with duplicated imports\n */\nexport type ModelWithDuplicateImports = {\n    propA?: ModelWithString;\n    propB?: ModelWithString;\n    propC?: ModelWithString;\n};\n\n/**\n * This is a model that extends another model\n */\nexport type ModelThatExtends = ModelWithString & {\n    propExtendsA?: string;\n    propExtendsB?: ModelWithString;\n};\n\n/**\n * This is a model that extends another model\n */\nexport type ModelThatExtendsExtends = ModelWithString & ModelThatExtends & {\n    propExtendsC?: string;\n    propExtendsD?: ModelWithString;\n};\n\n/**\n * This is a model that contains a some patterns\n */\nexport type ModelWithPattern = {\n    key: string;\n    name: string;\n    readonly enabled?: boolean;\n    readonly modified?: string;\n    id?: string;\n    text?: string;\n    patternWithSingleQuotes?: string;\n    patternWithNewline?: string;\n    patternWithBacktick?: string;\n    patternWithUnicode?: string;\n};\n\nexport type File = {\n    /**\n     * Id\n     */\n    readonly id?: string;\n    /**\n     * Updated at\n     */\n    readonly updated_at?: string;\n    /**\n     * Created at\n     */\n    readonly created_at?: string;\n    /**\n     * Mime\n     */\n    mime: string;\n    /**\n     * File\n     */\n    readonly file?: string;\n};\n\nexport type Default = {\n    name?: string;\n};\n\nexport type Pageable = {\n    page?: number;\n    size?: number;\n    sort?: Array<string>;\n};\n\n/**\n * This is a free-form object without additionalProperties.\n */\nexport type FreeFormObjectWithoutAdditionalProperties = {\n    [key: string]: unknown;\n};\n\n/**\n * This is a free-form object with additionalProperties: true.\n */\nexport type FreeFormObjectWithAdditionalPropertiesEqTrue = {\n    [key: string]: unknown;\n};\n\n/**\n * This is a free-form object with additionalProperties: {}.\n */\nexport type FreeFormObjectWithAdditionalPropertiesEqEmptyObject = {\n    [key: string]: unknown;\n};\n\nexport type ModelWithConst = {\n    String?: 'String';\n    number?: 0;\n    null?: null;\n    withType?: 'Some string';\n};\n\n/**\n * This is a model with one property and additionalProperties: true\n */\nexport type ModelWithAdditionalPropertiesEqTrue = {\n    /**\n     * This is a simple string property\n     */\n    prop?: string;\n    [key: string]: unknown;\n};\n\nexport type NestedAnyOfArraysNullable = {\n    nullableArray?: Array<string | boolean> | null;\n};\n\nexport type CompositionWithOneOfAndProperties = ({\n    foo: SimpleParameter;\n} | {\n    bar: NonAsciiStringæøåÆøÅöôêÊ字符串;\n}) & {\n    baz: number | null;\n    qux: number;\n};\n\n/**\n * An object that can be null\n */\nexport type NullableObject = {\n    foo?: string;\n} | null;\n\n/**\n * Some % character\n */\nexport type CharactersInDescription = string;\n\nexport type ModelWithNullableObject = {\n    data?: NullableObject;\n};\n\n/**\n * An object with additional properties that can be null (anyOf ref + null)\n */\nexport type ModelWithAdditionalPropertiesRef = {\n    [key: string]: NullableObject | null;\n};\n\nexport type ModelWithOneOfEnum = {\n    foo: 'Bar';\n} | {\n    foo: 'Baz';\n} | {\n    foo: 'Qux';\n} | {\n    content: string;\n    foo: 'Quux';\n} | {\n    content: [\n        string,\n        string\n    ];\n    foo: 'Corge';\n};\n\nexport type ModelWithNestedArrayEnumsDataFoo = 'foo' | 'bar';\n\nexport type ModelWithNestedArrayEnumsDataBar = 'baz' | 'qux';\n\nexport type ModelWithNestedArrayEnumsData = {\n    foo?: Array<ModelWithNestedArrayEnumsDataFoo>;\n    bar?: Array<ModelWithNestedArrayEnumsDataBar>;\n};\n\nexport type ModelWithNestedArrayEnums = {\n    array_strings?: Array<string>;\n    data?: ModelWithNestedArrayEnumsData;\n};\n\nexport type ModelWithNestedCompositionEnums = {\n    foo?: ModelWithNestedArrayEnumsDataFoo;\n};\n\nexport type ModelWithReadOnlyAndWriteOnly = {\n    foo: string;\n    readonly bar: string;\n};\n\nexport type ModelWithConstantSizeArray = [\n    number,\n    number\n];\n\nexport type ModelWithAnyOfConstantSizeArray = [\n    number | string,\n    number | string,\n    number | string\n];\n\nexport type ModelWithPrefixItemsConstantSizeArray = [\n    ModelWithInteger,\n    number | string,\n    string\n];\n\nexport type ModelWithAnyOfConstantSizeArrayNullable = [\n    number | null | string,\n    number | null | string,\n    number | null | string\n];\n\nexport type ModelWithAnyOfConstantSizeArrayWithNSizeAndOptions = [\n    number | Import,\n    number | Import\n];\n\nexport type ModelWithAnyOfConstantSizeArrayAndIntersect = [\n    number & string,\n    number & string\n];\n\nexport type ModelWithNumericEnumUnion = {\n    /**\n     * Период\n     */\n    value?: -10 | -1 | 0 | 1 | 3 | 6 | 12;\n};\n\n/**\n * Some description with `back ticks`\n */\nexport type ModelWithBackticksInDescription = {\n    /**\n     * The template `that` should be used for parsing and importing the contents of the CSV file.\n     *\n     * <br/><p>There is one placeholder currently supported:<ul>     <li><b>${x}</b> - refers to the n-th column in the CSV file, e.g. ${1}, ${2}, ...)</li></ul><p>Example of a correct JSON template:</p>\n     * <pre>\n     * [\n     * {\n     * \"resourceType\": \"Asset\",\n     * \"identifier\": {\n     * \"name\": \"${1}\",\n     * \"domain\": {\n     * \"name\": \"${2}\",\n     * \"community\": {\n     * \"name\": \"Some Community\"\n     * }\n     * }\n     * },\n     * \"attributes\" : {\n     * \"00000000-0000-0000-0000-000000003115\" : [ {\n     * \"value\" : \"${3}\"\n     * } ],\n     * \"00000000-0000-0000-0000-000000000222\" : [ {\n     * \"value\" : \"${4}\"\n     * } ]\n     * }\n     * }\n     * ]\n     * </pre>\n     */\n    template?: string;\n};\n\nexport type ModelWithOneOfAndProperties = (SimpleParameter | NonAsciiStringæøåÆøÅöôêÊ字符串) & {\n    baz: number | null;\n    qux: number;\n};\n\n/**\n * Model used to test deduplication strategy (unused)\n */\nexport type ParameterSimpleParameterUnused = string;\n\n/**\n * Model used to test deduplication strategy\n */\nexport type PostServiceWithEmptyTagResponse = string;\n\n/**\n * Model used to test deduplication strategy\n */\nexport type PostServiceWithEmptyTagResponse2 = string;\n\n/**\n * Model used to test deduplication strategy\n */\nexport type DeleteFooData = string;\n\n/**\n * Model used to test deduplication strategy\n */\nexport type DeleteFooData2 = string;\n\n/**\n * Model with restricted keyword name\n */\nexport type Import = string;\n\nexport type SchemaWithFormRestrictedKeys = {\n    description?: string;\n    'x-enum-descriptions'?: string;\n    'x-enum-varnames'?: string;\n    'x-enumNames'?: string;\n    title?: string;\n    object?: {\n        description?: string;\n        'x-enum-descriptions'?: string;\n        'x-enum-varnames'?: string;\n        'x-enumNames'?: string;\n        title?: string;\n    };\n    array?: Array<{\n        description?: string;\n        'x-enum-descriptions'?: string;\n        'x-enum-varnames'?: string;\n        'x-enumNames'?: string;\n        title?: string;\n    }>;\n};\n\n/**\n * This schema was giving PascalCase transformations a hard time\n */\nexport type IoK8sApimachineryPkgApisMetaV1DeleteOptions = {\n    /**\n     * Must be fulfilled before a deletion is carried out. If not possible, a 409 Conflict status will be returned.\n     */\n    preconditions?: IoK8sApimachineryPkgApisMetaV1Preconditions;\n};\n\n/**\n * This schema was giving PascalCase transformations a hard time\n */\nexport type IoK8sApimachineryPkgApisMetaV1Preconditions = {\n    /**\n     * Specifies the target ResourceVersion\n     */\n    resourceVersion?: string;\n    /**\n     * Specifies the target UID.\n     */\n    uid?: string;\n};\n\nexport type AdditionalPropertiesUnknownIssue = {\n    [key: string]: string | number;\n};\n\nexport type AdditionalPropertiesUnknownIssue2 = {\n    [key: string]: string | number;\n};\n\nexport type AdditionalPropertiesUnknownIssue3 = string & {\n    entries: {\n        [key: string]: AdditionalPropertiesUnknownIssue;\n    };\n};\n\nexport type AdditionalPropertiesIntegerIssue = {\n    value: number;\n    [key: string]: number;\n};\n\nexport type OneOfAllOfIssue = ((ConstValue | GenericSchemaDuplicateIssue1SystemBoolean) & _3eNum1Период) | GenericSchemaDuplicateIssue1SystemString;\n\nexport type GenericSchemaDuplicateIssue1SystemBoolean = {\n    item?: boolean;\n    error?: string | null;\n    readonly hasError?: boolean;\n    data?: {\n        [key: string]: never;\n    };\n};\n\nexport type GenericSchemaDuplicateIssue1SystemString = {\n    item?: string | null;\n    error?: string | null;\n    readonly hasError?: boolean;\n};\n\nexport type ExternalSharedModel = {\n    id: string;\n    name?: string;\n};\n\n/**\n * This is a model with one property containing a reference\n */\nexport type ModelWithReferenceWritable = {\n    prop?: ModelWithPropertiesWritable;\n};\n\n/**\n * This is a model with one property containing an array\n */\nexport type ModelWithArrayReadOnlyAndWriteOnlyWritable = {\n    prop?: Array<ModelWithReadOnlyAndWriteOnlyWritable>;\n    propWithFile?: Array<Blob | File>;\n    propWithNumber?: Array<number>;\n};\n\n/**\n * This is a model with one nested property\n */\nexport type ModelWithPropertiesWritable = {\n    required: string;\n    requiredAndNullable: string | null;\n    string?: string;\n    number?: number;\n    boolean?: boolean;\n    reference?: ModelWithString;\n    'property with space'?: string;\n    default?: string;\n    try?: string;\n};\n\n/**\n * This is a model that contains a some patterns\n */\nexport type ModelWithPatternWritable = {\n    key: string;\n    name: string;\n    id?: string;\n    text?: string;\n    patternWithSingleQuotes?: string;\n    patternWithNewline?: string;\n    patternWithBacktick?: string;\n    patternWithUnicode?: string;\n};\n\nexport type FileWritable = {\n    /**\n     * Mime\n     */\n    mime: string;\n};\n\nexport type ModelWithReadOnlyAndWriteOnlyWritable = {\n    foo: string;\n    baz: string;\n};\n\nexport type ModelWithAnyOfConstantSizeArrayWithNSizeAndOptionsWritable = [\n    number | Import,\n    number | Import\n];\n\nexport type AdditionalPropertiesUnknownIssueWritable = {\n    [key: string]: string | number;\n};\n\nexport type OneOfAllOfIssueWritable = ((ConstValue | GenericSchemaDuplicateIssue1SystemBoolean) & _3eNum1Период) | GenericSchemaDuplicateIssue1SystemString;\n\nexport type GenericSchemaDuplicateIssue1SystemBooleanWritable = {\n    item?: boolean;\n    error?: string | null;\n    data?: {\n        [key: string]: never;\n    };\n};\n\nexport type GenericSchemaDuplicateIssue1SystemStringWritable = {\n    item?: string | null;\n    error?: string | null;\n};\n\n/**\n * This is a reusable parameter\n */\nexport type SimpleParameter = string;\n\n/**\n * Parameter with illegal characters\n */\nexport type XFooBar = ModelWithString;\n\n/**\n * A reusable request body\n */\nexport type SimpleRequestBody = ModelWithString;\n\n/**\n * A reusable request body\n */\nexport type SimpleFormData = ModelWithString;\n\nexport type ExportData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no+tag';\n};\n\nexport type PatchApiVbyApiVersionNoTagData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no+tag';\n};\n\nexport type PatchApiVbyApiVersionNoTagResponses = {\n    /**\n     * OK\n     */\n    default: unknown;\n};\n\nexport type ImportData = {\n    body: ModelWithReadOnlyAndWriteOnlyWritable | ModelWithArrayReadOnlyAndWriteOnlyWritable;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no+tag';\n};\n\nexport type ImportResponses = {\n    /**\n     * Success\n     */\n    200: ModelFromZendesk;\n    /**\n     * Default success response\n     */\n    default: ModelWithReadOnlyAndWriteOnly;\n};\n\nexport type ImportResponse = ImportResponses[keyof ImportResponses];\n\nexport type FooWowData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no+tag';\n};\n\nexport type FooWowResponses = {\n    /**\n     * OK\n     */\n    default: unknown;\n};\n\nexport type ApiVVersionODataControllerCountData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple/$count';\n};\n\nexport type ApiVVersionODataControllerCountResponses = {\n    /**\n     * Success\n     */\n    200: ModelFromZendesk;\n};\n\nexport type ApiVVersionODataControllerCountResponse = ApiVVersionODataControllerCountResponses[keyof ApiVVersionODataControllerCountResponses];\n\nexport type GetApiVbyApiVersionSimpleOperationData = {\n    body?: never;\n    path: {\n        /**\n         * foo in method\n         */\n        foo_param: string;\n    };\n    query?: never;\n    url: '/api/v{api-version}/simple:operation';\n};\n\nexport type GetApiVbyApiVersionSimpleOperationErrors = {\n    /**\n     * Default error response\n     */\n    default: ModelWithBoolean;\n};\n\nexport type GetApiVbyApiVersionSimpleOperationError = GetApiVbyApiVersionSimpleOperationErrors[keyof GetApiVbyApiVersionSimpleOperationErrors];\n\nexport type GetApiVbyApiVersionSimpleOperationResponses = {\n    /**\n     * Response is a simple number\n     */\n    200: number;\n};\n\nexport type GetApiVbyApiVersionSimpleOperationResponse = GetApiVbyApiVersionSimpleOperationResponses[keyof GetApiVbyApiVersionSimpleOperationResponses];\n\nexport type DeleteCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type GetCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type HeadCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type OptionsCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type PatchCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type PostCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type PutCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type DeleteFooData3 = {\n    body?: never;\n    headers: {\n        /**\n         * Parameter with illegal characters\n         */\n        'x-Foo-Bar': ModelWithString;\n    };\n    path: {\n        /**\n         * foo in method\n         */\n        foo_param: string;\n        /**\n         * bar in method\n         */\n        BarParam: string;\n    };\n    query?: never;\n    url: '/api/v{api-version}/foo/{foo_param}/bar/{BarParam}';\n};\n\nexport type CallWithDescriptionsData = {\n    body?: never;\n    path?: never;\n    query?: {\n        /**\n         * Testing multiline comments in string: First line\n         * Second line\n         *\n         * Fourth line\n         */\n        parameterWithBreaks?: string;\n        /**\n         * Testing backticks in string: `backticks` and ```multiple backticks``` should work\n         */\n        parameterWithBackticks?: string;\n        /**\n         * Testing slashes in string: \\backwards\\\\\\ and /forwards/// should work\n         */\n        parameterWithSlashes?: string;\n        /**\n         * Testing expression placeholders in string: ${expression} should work\n         */\n        parameterWithExpressionPlaceholders?: string;\n        /**\n         * Testing quotes in string: 'single quote''' and \"double quotes\"\"\" should work\n         */\n        parameterWithQuotes?: string;\n        /**\n         * Testing reserved characters in string: * inline * and ** inline ** should work\n         */\n        parameterWithReservedCharacters?: string;\n    };\n    url: '/api/v{api-version}/descriptions';\n};\n\nexport type DeprecatedCallData = {\n    body?: never;\n    headers: {\n        /**\n         * This parameter is deprecated\n         *\n         * @deprecated\n         */\n        parameter: DeprecatedModel | null;\n    };\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/parameters/deprecated';\n};\n\nexport type CallWithParametersData = {\n    /**\n     * This is the parameter that goes into the body\n     */\n    body: {\n        [key: string]: unknown;\n    } | null;\n    headers: {\n        /**\n         * This is the parameter that goes into the header\n         */\n        parameterHeader: string | null;\n    };\n    path: {\n        /**\n         * This is the parameter that goes into the path\n         */\n        parameterPath: string | null;\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string | null;\n    };\n    query: {\n        foo_ref_enum?: ModelWithNestedArrayEnumsDataFoo;\n        foo_all_of_enum: ModelWithNestedArrayEnumsDataFoo;\n        /**\n         * This is the parameter that goes into the query params\n         */\n        cursor: string | null;\n    };\n    url: '/api/v{api-version}/parameters/{parameterPath}';\n};\n\nexport type CallWithWeirdParameterNamesData = {\n    /**\n     * This is the parameter that goes into the body\n     */\n    body: ModelWithString | null;\n    headers: {\n        /**\n         * This is the parameter that goes into the request header\n         */\n        'parameter.header': string | null;\n    };\n    path: {\n        /**\n         * This is the parameter that goes into the path\n         */\n        'parameter.path.1'?: string;\n        /**\n         * This is the parameter that goes into the path\n         */\n        'parameter-path-2'?: string;\n        /**\n         * This is the parameter that goes into the path\n         */\n        'PARAMETER-PATH-3'?: string;\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string | null;\n    };\n    query: {\n        /**\n         * This is the parameter with a reserved keyword\n         */\n        default?: string;\n        /**\n         * This is the parameter that goes into the request query params\n         */\n        'parameter-query': string | null;\n    };\n    url: '/api/v{api-version}/parameters/{parameter.path.1}/{parameter-path-2}/{PARAMETER-PATH-3}';\n};\n\nexport type GetCallWithOptionalParamData = {\n    /**\n     * This is a required parameter\n     */\n    body: ModelWithOneOfEnum;\n    path?: never;\n    query?: {\n        /**\n         * This is an optional parameter\n         */\n        page?: number;\n    };\n    url: '/api/v{api-version}/parameters';\n};\n\nexport type PostCallWithOptionalParamData = {\n    /**\n     * This is an optional parameter\n     */\n    body?: {\n        offset?: number | null;\n    };\n    path?: never;\n    query: {\n        /**\n         * This is a required parameter\n         */\n        parameter: Pageable;\n    };\n    url: '/api/v{api-version}/parameters';\n};\n\nexport type PostCallWithOptionalParamResponses = {\n    /**\n     * Response is a simple number\n     */\n    200: number;\n    /**\n     * Success\n     */\n    204: void;\n};\n\nexport type PostCallWithOptionalParamResponse = PostCallWithOptionalParamResponses[keyof PostCallWithOptionalParamResponses];\n\nexport type PostApiVbyApiVersionRequestBodyData = {\n    /**\n     * A reusable request body\n     */\n    body?: SimpleRequestBody;\n    path?: never;\n    query?: {\n        /**\n         * This is a reusable parameter\n         */\n        parameter?: string;\n    };\n    url: '/api/v{api-version}/requestBody';\n};\n\nexport type PostApiVbyApiVersionFormDataData = {\n    /**\n     * A reusable request body\n     */\n    body?: SimpleFormData;\n    path?: never;\n    query?: {\n        /**\n         * This is a reusable parameter\n         */\n        parameter?: string;\n    };\n    url: '/api/v{api-version}/formData';\n};\n\nexport type CallWithDefaultParametersData = {\n    body?: never;\n    path?: never;\n    query?: {\n        /**\n         * This is a simple string with default value\n         */\n        parameterString?: string | null;\n        /**\n         * This is a simple number with default value\n         */\n        parameterNumber?: number | null;\n        /**\n         * This is a simple boolean with default value\n         */\n        parameterBoolean?: boolean | null;\n        /**\n         * This is a simple enum with default value\n         */\n        parameterEnum?: 'Success' | 'Warning' | 'Error';\n        /**\n         * This is a simple model with default value\n         */\n        parameterModel?: ModelWithString | null;\n    };\n    url: '/api/v{api-version}/defaults';\n};\n\nexport type CallWithDefaultOptionalParametersData = {\n    body?: never;\n    path?: never;\n    query?: {\n        /**\n         * This is a simple string that is optional with default value\n         */\n        parameterString?: string;\n        /**\n         * This is a simple number that is optional with default value\n         */\n        parameterNumber?: number;\n        /**\n         * This is a simple boolean that is optional with default value\n         */\n        parameterBoolean?: boolean;\n        /**\n         * This is a simple enum that is optional with default value\n         */\n        parameterEnum?: 'Success' | 'Warning' | 'Error';\n        /**\n         * This is a simple model that is optional with default value\n         */\n        parameterModel?: ModelWithString;\n    };\n    url: '/api/v{api-version}/defaults';\n};\n\nexport type CallToTestOrderOfParamsData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * This is a optional string with default\n         */\n        parameterOptionalStringWithDefault?: string;\n        /**\n         * This is a optional string with empty default\n         */\n        parameterOptionalStringWithEmptyDefault?: string;\n        /**\n         * This is a optional string with no default\n         */\n        parameterOptionalStringWithNoDefault?: string;\n        /**\n         * This is a string with default\n         */\n        parameterStringWithDefault: string;\n        /**\n         * This is a string with empty default\n         */\n        parameterStringWithEmptyDefault: string;\n        /**\n         * This is a string with no default\n         */\n        parameterStringWithNoDefault: string;\n        /**\n         * This is a string that can be null with no default\n         */\n        parameterStringNullableWithNoDefault?: string | null;\n        /**\n         * This is a string that can be null with default\n         */\n        parameterStringNullableWithDefault?: string | null;\n    };\n    url: '/api/v{api-version}/defaults';\n};\n\nexport type DuplicateNameData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/duplicate';\n};\n\nexport type DuplicateName2Data = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/duplicate';\n};\n\nexport type DuplicateName3Data = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/duplicate';\n};\n\nexport type DuplicateName4Data = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/duplicate';\n};\n\nexport type CallWithNoContentResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no-content';\n};\n\nexport type CallWithNoContentResponseResponses = {\n    /**\n     * Success\n     */\n    204: void;\n};\n\nexport type CallWithNoContentResponseResponse = CallWithNoContentResponseResponses[keyof CallWithNoContentResponseResponses];\n\nexport type CallWithResponseAndNoContentResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multiple-tags/response-and-no-content';\n};\n\nexport type CallWithResponseAndNoContentResponseResponses = {\n    /**\n     * Response is a simple number\n     */\n    200: number;\n    /**\n     * Success\n     */\n    204: void;\n};\n\nexport type CallWithResponseAndNoContentResponseResponse = CallWithResponseAndNoContentResponseResponses[keyof CallWithResponseAndNoContentResponseResponses];\n\nexport type DummyAData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multiple-tags/a';\n};\n\nexport type DummyAResponses = {\n    200: _400;\n};\n\nexport type DummyAResponse = DummyAResponses[keyof DummyAResponses];\n\nexport type DummyBData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multiple-tags/b';\n};\n\nexport type DummyBResponses = {\n    /**\n     * Success\n     */\n    204: void;\n};\n\nexport type DummyBResponse = DummyBResponses[keyof DummyBResponses];\n\nexport type CallWithResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/response';\n};\n\nexport type CallWithResponseResponses = {\n    default: Import;\n};\n\nexport type CallWithResponseResponse = CallWithResponseResponses[keyof CallWithResponseResponses];\n\nexport type CallWithDuplicateResponsesData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/response';\n};\n\nexport type CallWithDuplicateResponsesErrors = {\n    /**\n     * Message for 500 error\n     */\n    500: ModelWithStringError;\n    /**\n     * Message for 501 error\n     */\n    501: ModelWithStringError;\n    /**\n     * Message for 502 error\n     */\n    502: ModelWithStringError;\n    /**\n     * Message for 4XX errors\n     */\n    '4XX': DictionaryWithArray;\n    /**\n     * Default error response\n     */\n    default: ModelWithBoolean;\n};\n\nexport type CallWithDuplicateResponsesError = CallWithDuplicateResponsesErrors[keyof CallWithDuplicateResponsesErrors];\n\nexport type CallWithDuplicateResponsesResponses = {\n    /**\n     * Message for 200 response\n     */\n    200: ModelWithBoolean & ModelWithInteger;\n    /**\n     * Message for 201 response\n     */\n    201: ModelWithString;\n    /**\n     * Message for 202 response\n     */\n    202: ModelWithString;\n};\n\nexport type CallWithDuplicateResponsesResponse = CallWithDuplicateResponsesResponses[keyof CallWithDuplicateResponsesResponses];\n\nexport type CallWithResponsesData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/response';\n};\n\nexport type CallWithResponsesErrors = {\n    /**\n     * Message for 500 error\n     */\n    500: ModelWithStringError;\n    /**\n     * Message for 501 error\n     */\n    501: ModelWithStringError;\n    /**\n     * Message for 502 error\n     */\n    502: ModelWithStringError;\n    /**\n     * Message for default response\n     */\n    default: ModelWithStringError;\n};\n\nexport type CallWithResponsesError = CallWithResponsesErrors[keyof CallWithResponsesErrors];\n\nexport type CallWithResponsesResponses = {\n    /**\n     * Message for 200 response\n     */\n    200: {\n        readonly '@namespace.string'?: string;\n        readonly '@namespace.integer'?: number;\n        readonly value?: Array<ModelWithString>;\n    };\n    /**\n     * Message for 201 response\n     */\n    201: ModelThatExtends;\n    /**\n     * Message for 202 response\n     */\n    202: ModelThatExtendsExtends;\n};\n\nexport type CallWithResponsesResponse = CallWithResponsesResponses[keyof CallWithResponsesResponses];\n\nexport type CollectionFormatData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * This is an array parameter that is sent as csv format (comma-separated values)\n         */\n        parameterArrayCSV: Array<string> | null;\n        /**\n         * This is an array parameter that is sent as ssv format (space-separated values)\n         */\n        parameterArraySSV: Array<string> | null;\n        /**\n         * This is an array parameter that is sent as tsv format (tab-separated values)\n         */\n        parameterArrayTSV: Array<string> | null;\n        /**\n         * This is an array parameter that is sent as pipes format (pipe-separated values)\n         */\n        parameterArrayPipes: Array<string> | null;\n        /**\n         * This is an array parameter that is sent as multi format (multiple parameter instances)\n         */\n        parameterArrayMulti: Array<string> | null;\n    };\n    url: '/api/v{api-version}/collectionFormat';\n};\n\nexport type TypesData = {\n    body?: never;\n    path?: {\n        /**\n         * This is a number parameter\n         */\n        id?: number;\n    };\n    query: {\n        /**\n         * This is a number parameter\n         */\n        parameterNumber: number;\n        /**\n         * This is a string parameter\n         */\n        parameterString: string | null;\n        /**\n         * This is a boolean parameter\n         */\n        parameterBoolean: boolean | null;\n        /**\n         * This is an object parameter\n         */\n        parameterObject: {\n            [key: string]: unknown;\n        } | null;\n        /**\n         * This is an array parameter\n         */\n        parameterArray: Array<string> | null;\n        /**\n         * This is a dictionary parameter\n         */\n        parameterDictionary: {\n            [key: string]: unknown;\n        } | null;\n        /**\n         * This is an enum parameter\n         */\n        parameterEnum: 'Success' | 'Warning' | 'Error' | null;\n    };\n    url: '/api/v{api-version}/types';\n};\n\nexport type TypesResponses = {\n    /**\n     * Response is a simple number\n     */\n    200: number;\n    /**\n     * Response is a simple string\n     */\n    201: string;\n    /**\n     * Response is a simple boolean\n     */\n    202: boolean;\n    /**\n     * Response is a simple object\n     */\n    203: {\n        [key: string]: unknown;\n    };\n};\n\nexport type TypesResponse = TypesResponses[keyof TypesResponses];\n\nexport type UploadFileData = {\n    body: Blob | File;\n    path: {\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string | null;\n    };\n    query?: never;\n    url: '/api/v{api-version}/upload';\n};\n\nexport type UploadFileResponses = {\n    200: boolean;\n};\n\nexport type UploadFileResponse = UploadFileResponses[keyof UploadFileResponses];\n\nexport type FileResponseData = {\n    body?: never;\n    path: {\n        id: string;\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string;\n    };\n    query?: never;\n    url: '/api/v{api-version}/file/{id}';\n};\n\nexport type FileResponseResponses = {\n    /**\n     * Success\n     */\n    200: Blob | File;\n};\n\nexport type FileResponseResponse = FileResponseResponses[keyof FileResponseResponses];\n\nexport type ComplexTypesData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * Parameter containing object\n         */\n        parameterObject: {\n            first?: {\n                second?: {\n                    third?: string;\n                };\n            };\n        };\n        /**\n         * Parameter containing reference\n         */\n        parameterReference: ModelWithString;\n    };\n    url: '/api/v{api-version}/complex';\n};\n\nexport type ComplexTypesErrors = {\n    /**\n     * 400 `server` error\n     */\n    400: unknown;\n    /**\n     * 500 server error\n     */\n    500: unknown;\n};\n\nexport type ComplexTypesResponses = {\n    /**\n     * Successful response\n     */\n    200: Array<ModelWithString>;\n};\n\nexport type ComplexTypesResponse = ComplexTypesResponses[keyof ComplexTypesResponses];\n\nexport type MultipartResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multipart';\n};\n\nexport type MultipartResponseResponses = {\n    /**\n     * OK\n     */\n    200: {\n        file?: Blob | File;\n        metadata?: {\n            foo?: string;\n            bar?: string;\n        };\n    };\n};\n\nexport type MultipartResponseResponse = MultipartResponseResponses[keyof MultipartResponseResponses];\n\nexport type MultipartRequestData = {\n    body?: {\n        content?: Blob | File;\n        data?: ModelWithString | null;\n    };\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multipart';\n};\n\nexport type ComplexParamsData = {\n    body?: {\n        readonly key: string | null;\n        name: string | null;\n        enabled?: boolean;\n        type: 'Monkey' | 'Horse' | 'Bird';\n        listOfModels?: Array<ModelWithString> | null;\n        listOfStrings?: Array<string> | null;\n        parameters: ModelWithString | ModelWithEnum | ModelWithArray | ModelWithDictionary;\n        readonly user?: {\n            readonly id?: number;\n            readonly name?: string | null;\n        };\n    };\n    path: {\n        id: number;\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string;\n    };\n    query?: never;\n    url: '/api/v{api-version}/complex/{id}';\n};\n\nexport type ComplexParamsResponses = {\n    /**\n     * Success\n     */\n    200: ModelWithString;\n};\n\nexport type ComplexParamsResponse = ComplexParamsResponses[keyof ComplexParamsResponses];\n\nexport type CallWithResultFromHeaderData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/header';\n};\n\nexport type CallWithResultFromHeaderErrors = {\n    /**\n     * 400 server error\n     */\n    400: unknown;\n    /**\n     * 500 server error\n     */\n    500: unknown;\n};\n\nexport type CallWithResultFromHeaderResponses = {\n    /**\n     * Successful response\n     */\n    200: unknown;\n};\n\nexport type TestErrorCodeData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * Status code to return\n         */\n        status: number;\n    };\n    url: '/api/v{api-version}/error';\n};\n\nexport type TestErrorCodeErrors = {\n    /**\n     * Custom message: Internal Server Error\n     */\n    500: unknown;\n    /**\n     * Custom message: Not Implemented\n     */\n    501: unknown;\n    /**\n     * Custom message: Bad Gateway\n     */\n    502: unknown;\n    /**\n     * Custom message: Service Unavailable\n     */\n    503: unknown;\n};\n\nexport type TestErrorCodeResponses = {\n    /**\n     * Custom message: Successful response\n     */\n    200: unknown;\n};\n\nexport type NonAsciiæøåÆøÅöôêÊ字符串Data = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * Dummy input param\n         */\n        nonAsciiParamæøåÆØÅöôêÊ: number;\n    };\n    url: '/api/v{api-version}/non-ascii-æøåÆØÅöôêÊ字符串';\n};\n\nexport type NonAsciiæøåÆøÅöôêÊ字符串Responses = {\n    /**\n     * Successful response\n     */\n    200: Array<NonAsciiStringæøåÆøÅöôêÊ字符串>;\n};\n\nexport type NonAsciiæøåÆøÅöôêÊ字符串Response = NonAsciiæøåÆøÅöôêÊ字符串Responses[keyof NonAsciiæøåÆøÅöôêÊ字符串Responses];\n\nexport type PutWithFormUrlEncodedData = {\n    body: ArrayWithStrings;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/non-ascii-æøåÆØÅöôêÊ字符串';\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-angular/clean-false/client/client.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { HttpResponse } from '@angular/common/http';\nimport { HttpClient, HttpErrorResponse, HttpEventType, HttpRequest } from '@angular/common/http';\nimport {\n  assertInInjectionContext,\n  inject,\n  provideAppInitializer,\n  runInInjectionContext,\n} from '@angular/core';\nimport { firstValueFrom } from 'rxjs';\nimport { filter } from 'rxjs/operators';\n\nimport { createSseClient } from '../core/serverSentEvents.gen';\nimport type { HttpMethod } from '../core/types.gen';\nimport { getValidRequestBody } from '../core/utils.gen';\nimport type {\n  Client,\n  Config,\n  RequestOptions,\n  ResolvedRequestOptions,\n  ResponseStyle,\n} from './types.gen';\nimport {\n  buildUrl,\n  createConfig,\n  createInterceptors,\n  mergeConfigs,\n  mergeHeaders,\n  setAuthParams,\n} from './utils.gen';\n\nexport function provideHeyApiClient(client: Client) {\n  return provideAppInitializer(() => {\n    const httpClient = inject(HttpClient);\n    client.setConfig({ httpClient });\n  });\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<\n    HttpRequest<unknown>,\n    HttpResponse<unknown>,\n    unknown,\n    ResolvedRequestOptions\n  >();\n\n  const requestOptions = <\n    TData = unknown,\n    ThrowOnError extends boolean = false,\n    TResponseStyle extends ResponseStyle = 'fields',\n  >(\n    options: RequestOptions<TData, TResponseStyle, ThrowOnError>,\n  ) => {\n    const opts = {\n      ..._config,\n      ...options,\n      headers: mergeHeaders(_config.headers, options.headers),\n      httpClient: options.httpClient ?? _config.httpClient,\n      serializedBody: undefined as string | undefined,\n    };\n\n    if (!opts.httpClient) {\n      if (opts.injector) {\n        opts.httpClient = runInInjectionContext(opts.injector, () => inject(HttpClient));\n      } else {\n        assertInInjectionContext(requestOptions);\n        opts.httpClient = inject(HttpClient);\n      }\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 url = buildUrl(opts as any);\n\n    const req = new HttpRequest<unknown>(opts.method ?? 'GET', url, getValidRequestBody(opts), {\n      redirect: 'follow',\n      ...opts,\n    });\n\n    return { opts, req, url };\n  };\n\n  const beforeRequest = async (options: RequestOptions) => {\n    const { opts, req, url } = requestOptions(options);\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    return { opts, req, url };\n  };\n\n  const request: Client['request'] = async (options) => {\n    // @ts-expect-error\n    const { opts, req: initialReq } = await beforeRequest(options);\n\n    let req = initialReq;\n\n    for (const fn of interceptors.request.fns) {\n      if (fn) {\n        req = await fn(req, opts as any);\n      }\n    }\n\n    const result: {\n      request: HttpRequest<unknown>;\n      response: any;\n    } = {\n      request: req,\n      response: null,\n    };\n\n    try {\n      result.response = (await firstValueFrom(\n        opts\n          .httpClient!.request(req)\n          .pipe(filter((event) => event.type === HttpEventType.Response)),\n      )) as HttpResponse<unknown>;\n\n      for (const fn of interceptors.response.fns) {\n        if (fn) {\n          result.response = await fn(result.response, req, opts as any);\n        }\n      }\n\n      let bodyResponse = result.response.body;\n\n      if (opts.responseValidator) {\n        await opts.responseValidator(bodyResponse);\n      }\n\n      if (opts.responseTransformer) {\n        bodyResponse = await opts.responseTransformer(bodyResponse);\n      }\n\n      return opts.responseStyle === 'data' ? bodyResponse : { data: bodyResponse, ...result };\n    } catch (error) {\n      if (error instanceof HttpErrorResponse) {\n        result.response = error;\n      }\n\n      let finalError = error instanceof HttpErrorResponse ? error.error : error;\n\n      for (const fn of interceptors.error.fns) {\n        if (fn) {\n          finalError = (await fn(finalError, result.response as any, req, opts as any)) as string;\n        }\n      }\n\n      if (opts.throwOnError) {\n        throw finalError;\n      }\n\n      return opts.responseStyle === 'data'\n        ? undefined\n        : {\n            error: finalError,\n            ...result,\n          };\n    }\n  };\n\n  const makeMethodFn = (method: Uppercase<HttpMethod>) => (options: RequestOptions) =>\n    request({ ...options, method });\n\n  const makeSseFn = (method: Uppercase<HttpMethod>) => async (options: RequestOptions) => {\n    const { opts, url } = await beforeRequest(options);\n    return createSseClient({\n      ...opts,\n      body: opts.body as BodyInit | null | undefined,\n      headers: opts.headers as unknown as Record<string, string>,\n      method,\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    requestOptions: (options) => {\n      if (options.security) {\n        throw new Error('Security is not supported in requestOptions');\n      }\n\n      if (options.requestValidator) {\n        throw new Error('Request validation is not supported in requestOptions');\n      }\n\n      return requestOptions(options).req;\n    },\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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-angular/clean-false/client/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type { Auth } from '../core/auth.gen';\nexport type { QuerySerializerOptions } from '../core/bodySerializer.gen';\nexport {\n  formDataBodySerializer,\n  jsonBodySerializer,\n  urlSearchParamsBodySerializer,\n} from '../core/bodySerializer.gen';\nexport { buildClientParams } from '../core/params.gen';\nexport { serializeQueryKeyValue } from '../core/queryKeySerializer.gen';\nexport { createClient } from './client.gen';\nexport type {\n  Client,\n  ClientOptions,\n  Config,\n  CreateClientConfig,\n  Options,\n  RequestOptions,\n  RequestResult,\n  ResolvedRequestOptions,\n  ResponseStyle,\n  TDataShape,\n} from './types.gen';\nexport { createConfig, mergeHeaders } from './utils.gen';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-angular/clean-false/client/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type {\n  HttpClient,\n  HttpErrorResponse,\n  HttpHeaders,\n  HttpRequest,\n  HttpResponse,\n} from '@angular/common/http';\nimport type { Injector } from '@angular/core';\n\nimport type { Auth } from '../core/auth.gen';\nimport type {\n  ServerSentEventsOptions,\n  ServerSentEventsResult,\n} from '../core/serverSentEvents.gen';\nimport type { Client as CoreClient, Config as CoreConfig } from '../core/types.gen';\nimport type { Middleware } from './utils.gen';\n\nexport type ResponseStyle = 'data' | 'fields';\n\nexport interface Config<T extends ClientOptions = ClientOptions>\n  extends Omit<RequestInit, 'body' | 'headers' | 'method'>, Omit<CoreConfig, 'headers'> {\n  /**\n   * Base URL for all requests made by this client.\n   */\n  baseUrl?: T['baseUrl'];\n  /**\n   * An object containing any HTTP headers that you want to pre-populate your\n   * `HttpHeaders` object with.\n   *\n   * {@link https://angular.dev/api/common/http/HttpHeaders#constructor See more}\n   */\n  headers?:\n    | HttpHeaders\n    | Record<\n        string,\n        string | number | boolean | (string | number | boolean)[] | null | undefined | unknown\n      >;\n  /**\n   * The HTTP client to use for making requests.\n   */\n  httpClient?: HttpClient;\n  /**\n   * Should we return only data or multiple fields (data, error, response, etc.)?\n   *\n   * @default 'fields'\n   */\n  responseStyle?: ResponseStyle;\n\n  /**\n   * Throw an error instead of returning it in the response?\n   *\n   * @default false\n   */\n  throwOnError?: T['throwOnError'];\n}\n\nexport interface RequestOptions<\n  TData = unknown,\n  TResponseStyle extends ResponseStyle = 'fields',\n  ThrowOnError extends boolean = boolean,\n  Url extends string = string,\n>\n  extends\n    Config<{\n      responseStyle: TResponseStyle;\n      throwOnError: ThrowOnError;\n    }>,\n    Pick<\n      ServerSentEventsOptions<TData>,\n      | 'onRequest'\n      | 'onSseError'\n      | 'onSseEvent'\n      | 'sseDefaultRetryDelay'\n      | 'sseMaxRetryAttempts'\n      | 'sseMaxRetryDelay'\n    > {\n  /**\n   * Any body that you want to add to your request.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/fetch#body}\n   */\n  body?: unknown;\n  /**\n   * Optional custom injector for dependency resolution if you don't implicitly or explicitly provide one.\n   */\n  injector?: Injector;\n  path?: Record<string, unknown>;\n  query?: Record<string, unknown>;\n  /**\n   * Security mechanism(s) to use for the request.\n   */\n  security?: ReadonlyArray<Auth>;\n  url: Url;\n}\n\nexport interface ResolvedRequestOptions<\n  TResponseStyle extends ResponseStyle = 'fields',\n  ThrowOnError extends boolean = boolean,\n  Url extends string = string,\n> extends RequestOptions<unknown, TResponseStyle, ThrowOnError, Url> {\n  serializedBody?: string;\n}\n\nexport type RequestResult<\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = boolean,\n  TResponseStyle extends ResponseStyle = 'fields',\n> = Promise<\n  ThrowOnError extends true\n    ? TResponseStyle extends 'data'\n      ? TData extends Record<string, unknown>\n        ? TData[keyof TData]\n        : TData\n      : {\n          data: TData extends Record<string, unknown> ? TData[keyof TData] : TData;\n          request: HttpRequest<unknown>;\n          response: HttpResponse<TData>;\n        }\n    : TResponseStyle extends 'data'\n      ? (TData extends Record<string, unknown> ? TData[keyof TData] : TData) | undefined\n      :\n          | {\n              data: TData extends Record<string, unknown> ? TData[keyof TData] : TData;\n              error: undefined;\n              request: HttpRequest<unknown>;\n              response: HttpResponse<TData>;\n            }\n          | {\n              data: undefined;\n              error: TError[keyof TError];\n              request: HttpRequest<unknown>;\n              response: HttpErrorResponse & {\n                error: TError[keyof TError] | null;\n              };\n            }\n>;\n\nexport interface ClientOptions {\n  baseUrl?: string;\n  responseStyle?: ResponseStyle;\n  throwOnError?: boolean;\n}\n\ntype MethodFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'>,\n) => RequestResult<TData, TError, ThrowOnError, TResponseStyle>;\n\ntype SseFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'>,\n) => Promise<ServerSentEventsResult<TData, TError>>;\n\ntype RequestFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'> &\n    Pick<Required<RequestOptions<TData, TResponseStyle, ThrowOnError>>, 'method'>,\n) => RequestResult<TData, TError, ThrowOnError, TResponseStyle>;\n\ntype RequestOptionsFn = <\n  T,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: RequestOptions<T, TResponseStyle, ThrowOnError>,\n) => HttpRequest<T>;\n\ntype BuildUrlFn = <\n  TData extends {\n    body?: unknown;\n    path?: Record<string, unknown>;\n    query?: Record<string, unknown>;\n    url: string;\n  },\n>(\n  options: TData & Options<TData>,\n) => string;\n\nexport type Client = CoreClient<RequestFn, Config, MethodFn, BuildUrlFn, SseFn> & {\n  interceptors: Middleware<\n    HttpRequest<unknown>,\n    HttpResponse<unknown>,\n    unknown,\n    ResolvedRequestOptions\n  >;\n  requestOptions: RequestOptionsFn;\n};\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 = ClientOptions> = (\n  override?: Config<ClientOptions & T>,\n) => Config<Required<ClientOptions> & T>;\n\nexport interface TDataShape {\n  body?: unknown;\n  headers?: unknown;\n  path?: unknown;\n  query?: unknown;\n  url: string;\n}\n\ntype OmitKeys<T, K> = Pick<T, Exclude<keyof T, K>>;\n\nexport type Options<\n  TData extends TDataShape = TDataShape,\n  ThrowOnError extends boolean = boolean,\n  TResponse = unknown,\n  TResponseStyle extends ResponseStyle = 'fields',\n> = OmitKeys<\n  RequestOptions<TResponse, TResponseStyle, ThrowOnError>,\n  'body' | 'path' | 'query' | 'url'\n> &\n  ([TData] extends [never] ? unknown : Omit<TData, 'url'>);\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-angular/clean-false/client/utils.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport { HttpHeaders } from '@angular/common/http';\n\nimport { getAuthToken } from '../core/auth.gen';\nimport type {\n  QuerySerializer,\n  QuerySerializerOptions,\n} from '../core/bodySerializer.gen';\nimport {\n  serializeArrayParam,\n  serializeObjectParam,\n  serializePrimitiveParam,\n} from '../core/pathSerializer.gen';\nimport type { Client, ClientOptions, Config, RequestOptions } from './types.gen';\n\ninterface PathSerializer {\n  path: Record<string, unknown>;\n  url: string;\n}\n\nconst PATH_PARAM_RE = /\\{[^{}]+\\}/g;\n\ntype ArrayStyle = 'form' | 'spaceDelimited' | 'pipeDelimited';\ntype MatrixStyle = 'label' | 'matrix' | 'simple';\ntype ArraySeparatorStyle = ArrayStyle | MatrixStyle;\n\nconst 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 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 = (\n  contentType: string | null,\n): 'blob' | 'formData' | 'json' | 'stream' | 'text' | undefined => {\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\nexport const setAuthParams = async (\n  options: Pick<Required<RequestOptions>, 'security'> &\n    Pick<RequestOptions, 'auth' | 'query'> & {\n      headers: HttpHeaders;\n    },\n) => {\n  for (const auth of options.security) {\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 = options.headers.append('Cookie', `${name}=${token}`);\n        break;\n      case 'header':\n      default:\n        options.headers = options.headers.set(name, token);\n        break;\n    }\n\n    return;\n  }\n};\n\nexport const buildUrl: Client['buildUrl'] = (options) => {\n  const url = 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  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 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\nexport const mergeHeaders = (\n  ...headers: Array<Required<Config>['headers'] | undefined>\n): HttpHeaders => {\n  let mergedHeaders = new HttpHeaders();\n\n  for (const header of headers) {\n    if (!header || typeof header !== 'object') {\n      continue;\n    }\n\n    if (header instanceof HttpHeaders) {\n      // Merge HttpHeaders instance\n      header.keys().forEach((key) => {\n        const values = header.getAll(key);\n        if (values) {\n          values.forEach((value) => {\n            mergedHeaders = mergedHeaders.append(key, value);\n          });\n        }\n      });\n    } else {\n      // Merge plain object headers\n      for (const [key, value] of Object.entries(header)) {\n        if (value === null) {\n          mergedHeaders = mergedHeaders.delete(key);\n        } else if (Array.isArray(value)) {\n          for (const v of value) {\n            mergedHeaders = 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 = mergedHeaders.set(\n            key,\n            typeof value === 'object' ? JSON.stringify(value) : (value as string),\n          );\n        }\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  headers: defaultHeaders,\n  querySerializer: defaultQuerySerializer,\n  ...override,\n});\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-angular/clean-false/client.gen.ts",
    "content": "// 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: 'http://localhost:3000/base' }));\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-angular/clean-false/core/auth.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-angular/clean-false/core/bodySerializer.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-angular/clean-false/core/params.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-angular/clean-false/core/pathSerializer.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-angular/clean-false/core/queryKeySerializer.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\n/**\n * JSON-friendly union that mirrors what Pinia Colada can hash.\n */\nexport type JsonValue =\n  | null\n  | string\n  | number\n  | boolean\n  | JsonValue[]\n  | { [key: string]: JsonValue };\n\n/**\n * Replacer that converts non-JSON values (bigint, Date, etc.) to safe substitutes.\n */\nexport const queryKeyJsonReplacer = (_key: string, value: unknown) => {\n  if (value === undefined || typeof value === 'function' || typeof value === 'symbol') {\n    return undefined;\n  }\n  if (typeof value === 'bigint') {\n    return value.toString();\n  }\n  if (value instanceof Date) {\n    return value.toISOString();\n  }\n  return value;\n};\n\n/**\n * Safely stringifies a value and parses it back into a JsonValue.\n */\nexport const stringifyToJsonValue = (input: unknown): JsonValue | undefined => {\n  try {\n    const json = JSON.stringify(input, queryKeyJsonReplacer);\n    if (json === undefined) {\n      return undefined;\n    }\n    return JSON.parse(json) as JsonValue;\n  } catch {\n    return undefined;\n  }\n};\n\n/**\n * Detects plain objects (including objects with a null prototype).\n */\nconst isPlainObject = (value: unknown): value is Record<string, unknown> => {\n  if (value === null || typeof value !== 'object') {\n    return false;\n  }\n  const prototype = Object.getPrototypeOf(value as object);\n  return prototype === Object.prototype || prototype === null;\n};\n\n/**\n * Turns URLSearchParams into a sorted JSON object for deterministic keys.\n */\nconst serializeSearchParams = (params: URLSearchParams): JsonValue => {\n  const entries = Array.from(params.entries()).sort(([a], [b]) => a.localeCompare(b));\n  const result: Record<string, JsonValue> = {};\n\n  for (const [key, value] of entries) {\n    const existing = result[key];\n    if (existing === undefined) {\n      result[key] = value;\n      continue;\n    }\n\n    if (Array.isArray(existing)) {\n      (existing as string[]).push(value);\n    } else {\n      result[key] = [existing, value];\n    }\n  }\n\n  return result;\n};\n\n/**\n * Normalizes any accepted value into a JSON-friendly shape for query keys.\n */\nexport const serializeQueryKeyValue = (value: unknown): JsonValue | undefined => {\n  if (value === null) {\n    return null;\n  }\n\n  if (typeof value === 'string' || typeof value === 'number' || typeof value === 'boolean') {\n    return value;\n  }\n\n  if (value === undefined || typeof value === 'function' || typeof value === 'symbol') {\n    return undefined;\n  }\n\n  if (typeof value === 'bigint') {\n    return value.toString();\n  }\n\n  if (value instanceof Date) {\n    return value.toISOString();\n  }\n\n  if (Array.isArray(value)) {\n    return stringifyToJsonValue(value);\n  }\n\n  if (typeof URLSearchParams !== 'undefined' && value instanceof URLSearchParams) {\n    return serializeSearchParams(value);\n  }\n\n  if (isPlainObject(value)) {\n    return stringifyToJsonValue(value);\n  }\n\n  return undefined;\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-angular/clean-false/core/serverSentEvents.gen.ts",
    "content": "// 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 const 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            // Normalize line endings: CRLF -> LF, then CR -> LF\n            buffer = buffer.replace(/\\r\\n/g, '\\n').replace(/\\r/g, '\\n');\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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-angular/clean-false/core/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { Auth, AuthToken } from './auth.gen';\nimport type { BodySerializer, QuerySerializer, QuerySerializerOptions } from './bodySerializer.gen';\n\nexport type HttpMethod =\n  | 'connect'\n  | 'delete'\n  | 'get'\n  | 'head'\n  | 'options'\n  | 'patch'\n  | 'post'\n  | 'put'\n  | 'trace';\n\nexport type Client<\n  RequestFn = never,\n  Config = unknown,\n  MethodFn = never,\n  BuildUrlFn = never,\n  SseFn = never,\n> = {\n  /**\n   * Returns the final request URL.\n   */\n  buildUrl: BuildUrlFn;\n  getConfig: () => Config;\n  request: RequestFn;\n  setConfig: (config: Config) => Config;\n} & {\n  [K in HttpMethod]: MethodFn;\n} & ([SseFn] extends [never] ? { sse?: never } : { sse: { [K in HttpMethod]: SseFn } });\n\nexport interface Config {\n  /**\n   * Auth token or a function returning auth token. The resolved value will be\n   * added to the request payload as defined by its `security` array.\n   */\n  auth?: ((auth: Auth) => Promise<AuthToken> | AuthToken) | AuthToken;\n  /**\n   * A function for serializing request body parameter. By default,\n   * {@link JSON.stringify()} will be used.\n   */\n  bodySerializer?: BodySerializer | null;\n  /**\n   * An object containing any HTTP headers that you want to pre-populate your\n   * `Headers` object with.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/Headers/Headers#init See more}\n   */\n  headers?:\n    | RequestInit['headers']\n    | Record<\n        string,\n        string | number | boolean | (string | number | boolean)[] | null | undefined | unknown\n      >;\n  /**\n   * The request method.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/fetch#method See more}\n   */\n  method?: Uppercase<HttpMethod>;\n  /**\n   * A function for serializing request query parameters. By default, arrays\n   * will be exploded in form style, objects will be exploded in deepObject\n   * style, and reserved characters are percent-encoded.\n   *\n   * This method will have no effect if the native `paramsSerializer()` Axios\n   * API function is used.\n   *\n   * {@link https://swagger.io/docs/specification/serialization/#query View examples}\n   */\n  querySerializer?: QuerySerializer | QuerySerializerOptions;\n  /**\n   * A function validating request data. This is useful if you want to ensure\n   * the request conforms to the desired shape, so it can be safely sent to\n   * the server.\n   */\n  requestValidator?: (data: unknown) => Promise<unknown>;\n  /**\n   * A function transforming response data before it's returned. This is useful\n   * for post-processing data, e.g. converting ISO strings into Date objects.\n   */\n  responseTransformer?: (data: unknown) => Promise<unknown>;\n  /**\n   * A function validating response data. This is useful if you want to ensure\n   * the response conforms to the desired shape, so it can be safely passed to\n   * the transformers and returned to the user.\n   */\n  responseValidator?: (data: unknown) => Promise<unknown>;\n}\n\ntype IsExactlyNeverOrNeverUndefined<T> = [T] extends [never]\n  ? true\n  : [T] extends [never | undefined]\n    ? [undefined] extends [T]\n      ? false\n      : true\n    : false;\n\nexport type OmitNever<T extends Record<string, unknown>> = {\n  [K in keyof T as IsExactlyNeverOrNeverUndefined<T[K]> extends true ? never : K]: T[K];\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-angular/clean-false/core/utils.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-angular/clean-false/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport { apiVVersionODataControllerCount, callToTestOrderOfParams, callWithDefaultOptionalParameters, callWithDefaultParameters, callWithDescriptions, callWithDuplicateResponses, callWithNoContentResponse, callWithParameters, callWithResponse, callWithResponseAndNoContentResponse, callWithResponses, callWithResultFromHeader, callWithWeirdParameterNames, collectionFormat, complexParams, complexTypes, deleteCallWithoutParametersAndResponse, deleteFoo, deprecatedCall, dummyA, dummyB, duplicateName, duplicateName2, duplicateName3, duplicateName4, export_, fileResponse, fooWow, getApiVbyApiVersionSimpleOperation, getCallWithOptionalParam, getCallWithoutParametersAndResponse, headCallWithoutParametersAndResponse, import_, multipartRequest, multipartResponse, nonAsciiæøåÆøÅöôêÊ字符串, type Options, optionsCallWithoutParametersAndResponse, patchApiVbyApiVersionNoTag, patchCallWithoutParametersAndResponse, postApiVbyApiVersionFormData, postApiVbyApiVersionRequestBody, postCallWithOptionalParam, postCallWithoutParametersAndResponse, putCallWithoutParametersAndResponse, putWithFormUrlEncoded, testErrorCode, types, uploadFile } from './sdk.gen';\nexport type { _3eNum1Период, _400, AdditionalPropertiesIntegerIssue, AdditionalPropertiesUnknownIssue, AdditionalPropertiesUnknownIssue2, AdditionalPropertiesUnknownIssue3, AdditionalPropertiesUnknownIssueWritable, AnyOfAnyAndNull, AnyOfArrays, ApiVVersionODataControllerCountData, ApiVVersionODataControllerCountResponse, ApiVVersionODataControllerCountResponses, ArrayWithAnyOfProperties, ArrayWithArray, ArrayWithBooleans, ArrayWithNumbers, ArrayWithProperties, ArrayWithReferences, ArrayWithStrings, CallToTestOrderOfParamsData, CallWithDefaultOptionalParametersData, CallWithDefaultParametersData, CallWithDescriptionsData, CallWithDuplicateResponsesData, CallWithDuplicateResponsesError, CallWithDuplicateResponsesErrors, CallWithDuplicateResponsesResponse, CallWithDuplicateResponsesResponses, CallWithNoContentResponseData, CallWithNoContentResponseResponse, CallWithNoContentResponseResponses, CallWithParametersData, CallWithResponseAndNoContentResponseData, CallWithResponseAndNoContentResponseResponse, CallWithResponseAndNoContentResponseResponses, CallWithResponseData, CallWithResponseResponse, CallWithResponseResponses, CallWithResponsesData, CallWithResponsesError, CallWithResponsesErrors, CallWithResponsesResponse, CallWithResponsesResponses, CallWithResultFromHeaderData, CallWithResultFromHeaderErrors, CallWithResultFromHeaderResponses, CallWithWeirdParameterNamesData, CamelCaseCommentWithBreaks, CharactersInDescription, ClientOptions, CollectionFormatData, CommentWithBackticks, CommentWithBackticksAndQuotes, CommentWithBreaks, CommentWithExpressionPlaceholders, CommentWithQuotes, CommentWithReservedCharacters, CommentWithSlashes, ComplexParamsData, ComplexParamsResponse, ComplexParamsResponses, ComplexTypesData, ComplexTypesErrors, ComplexTypesResponse, ComplexTypesResponses, CompositionBaseModel, CompositionExtendedModel, CompositionWithAllOfAndNullable, CompositionWithAnyOf, CompositionWithAnyOfAndNullable, CompositionWithAnyOfAnonymous, CompositionWithNestedAnyAndTypeNull, CompositionWithNestedAnyOfAndNull, CompositionWithOneOf, CompositionWithOneOfAndComplexArrayDictionary, CompositionWithOneOfAndNullable, CompositionWithOneOfAndProperties, CompositionWithOneOfAndSimpleArrayDictionary, CompositionWithOneOfAndSimpleDictionary, CompositionWithOneOfAnonymous, CompositionWithOneOfDiscriminator, ConstValue, Default, DeleteCallWithoutParametersAndResponseData, DeleteFooData, DeleteFooData2, DeleteFooData3, DeprecatedCallData, DeprecatedModel, DictionaryWithArray, DictionaryWithDictionary, DictionaryWithProperties, DictionaryWithPropertiesAndAdditionalProperties, DictionaryWithReference, DictionaryWithString, DummyAData, DummyAResponse, DummyAResponses, DummyBData, DummyBResponse, DummyBResponses, DuplicateName2Data, DuplicateName3Data, DuplicateName4Data, DuplicateNameData, EnumFromDescription, EnumWithExtensions, EnumWithNumbers, EnumWithReplacedCharacters, EnumWithStrings, EnumWithXEnumNames, ExportData, ExternalRefA, ExternalRefB, ExternalSharedModel, File, FileResponseData, FileResponseResponse, FileResponseResponses, FileWritable, FooWowData, FooWowResponses, FreeFormObjectWithAdditionalPropertiesEqEmptyObject, FreeFormObjectWithAdditionalPropertiesEqTrue, FreeFormObjectWithoutAdditionalProperties, GenericSchemaDuplicateIssue1SystemBoolean, GenericSchemaDuplicateIssue1SystemBooleanWritable, GenericSchemaDuplicateIssue1SystemString, GenericSchemaDuplicateIssue1SystemStringWritable, GetApiVbyApiVersionSimpleOperationData, GetApiVbyApiVersionSimpleOperationError, GetApiVbyApiVersionSimpleOperationErrors, GetApiVbyApiVersionSimpleOperationResponse, GetApiVbyApiVersionSimpleOperationResponses, GetCallWithOptionalParamData, GetCallWithoutParametersAndResponseData, HeadCallWithoutParametersAndResponseData, Import, ImportData, ImportResponse, ImportResponses, IoK8sApimachineryPkgApisMetaV1DeleteOptions, IoK8sApimachineryPkgApisMetaV1Preconditions, ModelCircle, ModelFromZendesk, ModelSquare, ModelThatExtends, ModelThatExtendsExtends, ModelWithAdditionalPropertiesEqTrue, ModelWithAdditionalPropertiesRef, ModelWithAnyOfConstantSizeArray, ModelWithAnyOfConstantSizeArrayAndIntersect, ModelWithAnyOfConstantSizeArrayNullable, ModelWithAnyOfConstantSizeArrayWithNSizeAndOptions, ModelWithAnyOfConstantSizeArrayWithNSizeAndOptionsWritable, ModelWithArray, ModelWithArrayReadOnlyAndWriteOnly, ModelWithArrayReadOnlyAndWriteOnlyWritable, ModelWithBackticksInDescription, ModelWithBoolean, ModelWithCircularReference, ModelWithConst, ModelWithConstantSizeArray, ModelWithDictionary, ModelWithDuplicateImports, ModelWithDuplicateProperties, ModelWithEnum, ModelWithEnumFromDescription, ModelWithEnumWithHyphen, ModelWithInteger, ModelWithNestedArrayEnums, ModelWithNestedArrayEnumsData, ModelWithNestedArrayEnumsDataBar, ModelWithNestedArrayEnumsDataFoo, ModelWithNestedCompositionEnums, ModelWithNestedEnums, ModelWithNestedProperties, ModelWithNullableObject, ModelWithNullableString, ModelWithNumericEnumUnion, ModelWithOneOfAndProperties, ModelWithOneOfEnum, ModelWithOrderedProperties, ModelWithPattern, ModelWithPatternWritable, ModelWithPrefixItemsConstantSizeArray, ModelWithProperties, ModelWithPropertiesWritable, ModelWithReadOnlyAndWriteOnly, ModelWithReadOnlyAndWriteOnlyWritable, ModelWithReference, ModelWithReferenceWritable, ModelWithString, ModelWithStringError, MultipartRequestData, MultipartResponseData, MultipartResponseResponse, MultipartResponseResponses, NestedAnyOfArraysNullable, NonAsciiæøåÆøÅöôêÊ字符串Data, NonAsciiæøåÆøÅöôêÊ字符串Response, NonAsciiæøåÆøÅöôêÊ字符串Responses, NonAsciiStringæøåÆøÅöôêÊ字符串, NullableObject, OneOfAllOfIssue, OneOfAllOfIssueWritable, OptionsCallWithoutParametersAndResponseData, Pageable, ParameterSimpleParameterUnused, PatchApiVbyApiVersionNoTagData, PatchApiVbyApiVersionNoTagResponses, PatchCallWithoutParametersAndResponseData, PostApiVbyApiVersionFormDataData, PostApiVbyApiVersionRequestBodyData, PostCallWithOptionalParamData, PostCallWithOptionalParamResponse, PostCallWithOptionalParamResponses, PostCallWithoutParametersAndResponseData, PostServiceWithEmptyTagResponse, PostServiceWithEmptyTagResponse2, PutCallWithoutParametersAndResponseData, PutWithFormUrlEncodedData, SchemaWithFormRestrictedKeys, SimpleBoolean, SimpleFile, SimpleFormData, SimpleInteger, SimpleParameter, SimpleReference, SimpleRequestBody, SimpleString, SimpleStringWithPattern, TestErrorCodeData, TestErrorCodeErrors, TestErrorCodeResponses, TypesData, TypesResponse, TypesResponses, UploadFileData, UploadFileResponse, UploadFileResponses, XFooBar } from './types.gen';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-angular/clean-false/sdk.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport { type Client, formDataBodySerializer, type Options as Options2, type TDataShape, urlSearchParamsBodySerializer } from './client';\nimport { client } from './client.gen';\nimport type { ApiVVersionODataControllerCountData, ApiVVersionODataControllerCountResponses, CallToTestOrderOfParamsData, CallWithDefaultOptionalParametersData, CallWithDefaultParametersData, CallWithDescriptionsData, CallWithDuplicateResponsesData, CallWithDuplicateResponsesErrors, CallWithDuplicateResponsesResponses, CallWithNoContentResponseData, CallWithNoContentResponseResponses, CallWithParametersData, CallWithResponseAndNoContentResponseData, CallWithResponseAndNoContentResponseResponses, CallWithResponseData, CallWithResponseResponses, CallWithResponsesData, CallWithResponsesErrors, CallWithResponsesResponses, CallWithResultFromHeaderData, CallWithResultFromHeaderErrors, CallWithResultFromHeaderResponses, CallWithWeirdParameterNamesData, CollectionFormatData, ComplexParamsData, ComplexParamsResponses, ComplexTypesData, ComplexTypesErrors, ComplexTypesResponses, DeleteCallWithoutParametersAndResponseData, DeleteFooData3, DeprecatedCallData, DummyAData, DummyAResponses, DummyBData, DummyBResponses, DuplicateName2Data, DuplicateName3Data, DuplicateName4Data, DuplicateNameData, ExportData, FileResponseData, FileResponseResponses, FooWowData, FooWowResponses, GetApiVbyApiVersionSimpleOperationData, GetApiVbyApiVersionSimpleOperationErrors, GetApiVbyApiVersionSimpleOperationResponses, GetCallWithOptionalParamData, GetCallWithoutParametersAndResponseData, HeadCallWithoutParametersAndResponseData, ImportData, ImportResponses, MultipartRequestData, MultipartResponseData, MultipartResponseResponses, NonAsciiæøåÆøÅöôêÊ字符串Data, NonAsciiæøåÆøÅöôêÊ字符串Responses, OptionsCallWithoutParametersAndResponseData, PatchApiVbyApiVersionNoTagData, PatchApiVbyApiVersionNoTagResponses, PatchCallWithoutParametersAndResponseData, PostApiVbyApiVersionFormDataData, PostApiVbyApiVersionRequestBodyData, PostCallWithOptionalParamData, PostCallWithOptionalParamResponses, PostCallWithoutParametersAndResponseData, PutCallWithoutParametersAndResponseData, PutWithFormUrlEncodedData, TestErrorCodeData, TestErrorCodeErrors, TestErrorCodeResponses, TypesData, TypesResponses, UploadFileData, UploadFileResponses } from './types.gen';\n\nexport type Options<TData extends TDataShape = TDataShape, ThrowOnError extends boolean = boolean> = Options2<TData, ThrowOnError> & {\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\nexport const export_ = <ThrowOnError extends boolean = false>(options?: Options<ExportData, ThrowOnError>) => (options?.client ?? client).get<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/no+tag', ...options });\n\nexport const patchApiVbyApiVersionNoTag = <ThrowOnError extends boolean = false>(options?: Options<PatchApiVbyApiVersionNoTagData, ThrowOnError>) => (options?.client ?? client).patch<PatchApiVbyApiVersionNoTagResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/no+tag', ...options });\n\nexport const import_ = <ThrowOnError extends boolean = false>(options: Options<ImportData, ThrowOnError>) => (options.client ?? client).post<ImportResponses, unknown, ThrowOnError>({\n    url: '/api/v{api-version}/no+tag',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options.headers\n    }\n});\n\nexport const fooWow = <ThrowOnError extends boolean = false>(options?: Options<FooWowData, ThrowOnError>) => (options?.client ?? client).put<FooWowResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/no+tag', ...options });\n\nexport const apiVVersionODataControllerCount = <ThrowOnError extends boolean = false>(options?: Options<ApiVVersionODataControllerCountData, ThrowOnError>) => (options?.client ?? client).get<ApiVVersionODataControllerCountResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple/$count', ...options });\n\nexport const getApiVbyApiVersionSimpleOperation = <ThrowOnError extends boolean = false>(options: Options<GetApiVbyApiVersionSimpleOperationData, ThrowOnError>) => (options.client ?? client).get<GetApiVbyApiVersionSimpleOperationResponses, GetApiVbyApiVersionSimpleOperationErrors, ThrowOnError>({ url: '/api/v{api-version}/simple:operation', ...options });\n\nexport const deleteCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<DeleteCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).delete<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const getCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<GetCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).get<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const headCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<HeadCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).head<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const optionsCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<OptionsCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).options<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const patchCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<PatchCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).patch<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const postCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<PostCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).post<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const putCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<PutCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).put<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const deleteFoo = <ThrowOnError extends boolean = false>(options: Options<DeleteFooData3, ThrowOnError>) => (options.client ?? client).delete<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/foo/{foo_param}/bar/{BarParam}', ...options });\n\nexport const callWithDescriptions = <ThrowOnError extends boolean = false>(options?: Options<CallWithDescriptionsData, ThrowOnError>) => (options?.client ?? client).post<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/descriptions', ...options });\n\n/**\n * @deprecated\n */\nexport const deprecatedCall = <ThrowOnError extends boolean = false>(options: Options<DeprecatedCallData, ThrowOnError>) => (options.client ?? client).post<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/parameters/deprecated', ...options });\n\nexport const callWithParameters = <ThrowOnError extends boolean = false>(options: Options<CallWithParametersData, ThrowOnError>) => (options.client ?? client).post<unknown, unknown, ThrowOnError>({\n    url: '/api/v{api-version}/parameters/{parameterPath}',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options.headers\n    }\n});\n\nexport const callWithWeirdParameterNames = <ThrowOnError extends boolean = false>(options: Options<CallWithWeirdParameterNamesData, ThrowOnError>) => (options.client ?? client).post<unknown, unknown, ThrowOnError>({\n    url: '/api/v{api-version}/parameters/{parameter.path.1}/{parameter-path-2}/{PARAMETER-PATH-3}',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options.headers\n    }\n});\n\nexport const getCallWithOptionalParam = <ThrowOnError extends boolean = false>(options: Options<GetCallWithOptionalParamData, ThrowOnError>) => (options.client ?? client).get<unknown, unknown, ThrowOnError>({\n    url: '/api/v{api-version}/parameters',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options.headers\n    }\n});\n\nexport const postCallWithOptionalParam = <ThrowOnError extends boolean = false>(options: Options<PostCallWithOptionalParamData, ThrowOnError>) => (options.client ?? client).post<PostCallWithOptionalParamResponses, unknown, ThrowOnError>({\n    url: '/api/v{api-version}/parameters',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options.headers\n    }\n});\n\nexport const postApiVbyApiVersionRequestBody = <ThrowOnError extends boolean = false>(options?: Options<PostApiVbyApiVersionRequestBodyData, ThrowOnError>) => (options?.client ?? client).post<unknown, unknown, ThrowOnError>({\n    url: '/api/v{api-version}/requestBody',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options?.headers\n    }\n});\n\nexport const postApiVbyApiVersionFormData = <ThrowOnError extends boolean = false>(options?: Options<PostApiVbyApiVersionFormDataData, ThrowOnError>) => (options?.client ?? client).post<unknown, unknown, ThrowOnError>({\n    ...formDataBodySerializer,\n    url: '/api/v{api-version}/formData',\n    ...options,\n    headers: {\n        'Content-Type': null,\n        ...options?.headers\n    }\n});\n\nexport const callWithDefaultParameters = <ThrowOnError extends boolean = false>(options?: Options<CallWithDefaultParametersData, ThrowOnError>) => (options?.client ?? client).get<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/defaults', ...options });\n\nexport const callWithDefaultOptionalParameters = <ThrowOnError extends boolean = false>(options?: Options<CallWithDefaultOptionalParametersData, ThrowOnError>) => (options?.client ?? client).post<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/defaults', ...options });\n\nexport const callToTestOrderOfParams = <ThrowOnError extends boolean = false>(options: Options<CallToTestOrderOfParamsData, ThrowOnError>) => (options.client ?? client).put<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/defaults', ...options });\n\nexport const duplicateName = <ThrowOnError extends boolean = false>(options?: Options<DuplicateNameData, ThrowOnError>) => (options?.client ?? client).delete<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/duplicate', ...options });\n\nexport const duplicateName2 = <ThrowOnError extends boolean = false>(options?: Options<DuplicateName2Data, ThrowOnError>) => (options?.client ?? client).get<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/duplicate', ...options });\n\nexport const duplicateName3 = <ThrowOnError extends boolean = false>(options?: Options<DuplicateName3Data, ThrowOnError>) => (options?.client ?? client).post<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/duplicate', ...options });\n\nexport const duplicateName4 = <ThrowOnError extends boolean = false>(options?: Options<DuplicateName4Data, ThrowOnError>) => (options?.client ?? client).put<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/duplicate', ...options });\n\nexport const callWithNoContentResponse = <ThrowOnError extends boolean = false>(options?: Options<CallWithNoContentResponseData, ThrowOnError>) => (options?.client ?? client).get<CallWithNoContentResponseResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/no-content', ...options });\n\nexport const callWithResponseAndNoContentResponse = <ThrowOnError extends boolean = false>(options?: Options<CallWithResponseAndNoContentResponseData, ThrowOnError>) => (options?.client ?? client).get<CallWithResponseAndNoContentResponseResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/multiple-tags/response-and-no-content', ...options });\n\nexport const dummyA = <ThrowOnError extends boolean = false>(options?: Options<DummyAData, ThrowOnError>) => (options?.client ?? client).get<DummyAResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/multiple-tags/a', ...options });\n\nexport const dummyB = <ThrowOnError extends boolean = false>(options?: Options<DummyBData, ThrowOnError>) => (options?.client ?? client).get<DummyBResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/multiple-tags/b', ...options });\n\nexport const callWithResponse = <ThrowOnError extends boolean = false>(options?: Options<CallWithResponseData, ThrowOnError>) => (options?.client ?? client).get<CallWithResponseResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/response', ...options });\n\nexport const callWithDuplicateResponses = <ThrowOnError extends boolean = false>(options?: Options<CallWithDuplicateResponsesData, ThrowOnError>) => (options?.client ?? client).post<CallWithDuplicateResponsesResponses, CallWithDuplicateResponsesErrors, ThrowOnError>({ url: '/api/v{api-version}/response', ...options });\n\nexport const callWithResponses = <ThrowOnError extends boolean = false>(options?: Options<CallWithResponsesData, ThrowOnError>) => (options?.client ?? client).put<CallWithResponsesResponses, CallWithResponsesErrors, ThrowOnError>({ url: '/api/v{api-version}/response', ...options });\n\nexport const collectionFormat = <ThrowOnError extends boolean = false>(options: Options<CollectionFormatData, ThrowOnError>) => (options.client ?? client).get<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/collectionFormat', ...options });\n\nexport const types = <ThrowOnError extends boolean = false>(options: Options<TypesData, ThrowOnError>) => (options.client ?? client).get<TypesResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/types', ...options });\n\nexport const uploadFile = <ThrowOnError extends boolean = false>(options: Options<UploadFileData, ThrowOnError>) => (options.client ?? client).post<UploadFileResponses, unknown, ThrowOnError>({\n    ...urlSearchParamsBodySerializer,\n    url: '/api/v{api-version}/upload',\n    ...options,\n    headers: {\n        'Content-Type': 'application/x-www-form-urlencoded',\n        ...options.headers\n    }\n});\n\nexport const fileResponse = <ThrowOnError extends boolean = false>(options: Options<FileResponseData, ThrowOnError>) => (options.client ?? client).get<FileResponseResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/file/{id}', ...options });\n\nexport const complexTypes = <ThrowOnError extends boolean = false>(options: Options<ComplexTypesData, ThrowOnError>) => (options.client ?? client).get<ComplexTypesResponses, ComplexTypesErrors, ThrowOnError>({\n    querySerializer: { parameters: { parameterObject: { object: { style: 'form' } } } },\n    url: '/api/v{api-version}/complex',\n    ...options\n});\n\nexport const multipartResponse = <ThrowOnError extends boolean = false>(options?: Options<MultipartResponseData, ThrowOnError>) => (options?.client ?? client).get<MultipartResponseResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/multipart', ...options });\n\nexport const multipartRequest = <ThrowOnError extends boolean = false>(options?: Options<MultipartRequestData, ThrowOnError>) => (options?.client ?? client).post<unknown, unknown, ThrowOnError>({\n    ...formDataBodySerializer,\n    url: '/api/v{api-version}/multipart',\n    ...options,\n    headers: {\n        'Content-Type': null,\n        ...options?.headers\n    }\n});\n\nexport const complexParams = <ThrowOnError extends boolean = false>(options: Options<ComplexParamsData, ThrowOnError>) => (options.client ?? client).put<ComplexParamsResponses, unknown, ThrowOnError>({\n    url: '/api/v{api-version}/complex/{id}',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json-patch+json',\n        ...options.headers\n    }\n});\n\nexport const callWithResultFromHeader = <ThrowOnError extends boolean = false>(options?: Options<CallWithResultFromHeaderData, ThrowOnError>) => (options?.client ?? client).post<CallWithResultFromHeaderResponses, CallWithResultFromHeaderErrors, ThrowOnError>({ url: '/api/v{api-version}/header', ...options });\n\nexport const testErrorCode = <ThrowOnError extends boolean = false>(options: Options<TestErrorCodeData, ThrowOnError>) => (options.client ?? client).post<TestErrorCodeResponses, TestErrorCodeErrors, ThrowOnError>({ url: '/api/v{api-version}/error', ...options });\n\nexport const nonAsciiæøåÆøÅöôêÊ字符串 = <ThrowOnError extends boolean = false>(options: Options<NonAsciiæøåÆøÅöôêÊ字符串Data, ThrowOnError>) => (options.client ?? client).post<NonAsciiæøåÆøÅöôêÊ字符串Responses, unknown, ThrowOnError>({ url: '/api/v{api-version}/non-ascii-æøåÆØÅöôêÊ字符串', ...options });\n\n/**\n * Login User\n */\nexport const putWithFormUrlEncoded = <ThrowOnError extends boolean = false>(options: Options<PutWithFormUrlEncodedData, ThrowOnError>) => (options.client ?? client).put<unknown, unknown, ThrowOnError>({\n    ...urlSearchParamsBodySerializer,\n    url: '/api/v{api-version}/non-ascii-æøåÆØÅöôêÊ字符串',\n    ...options,\n    headers: {\n        'Content-Type': 'application/x-www-form-urlencoded',\n        ...options.headers\n    }\n});\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-angular/clean-false/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type ClientOptions = {\n    baseUrl: 'http://localhost:3000/base' | (string & {});\n};\n\n/**\n * Model with number-only name\n */\nexport type _400 = string;\n\n/**\n * External ref to shared model (A)\n */\nexport type ExternalRefA = ExternalSharedModel;\n\n/**\n * External ref to shared model (B)\n */\nexport type ExternalRefB = ExternalSharedModel;\n\n/**\n * Testing multiline comments in string: First line\n * Second line\n *\n * Fourth line\n */\nexport type CamelCaseCommentWithBreaks = number;\n\n/**\n * Testing multiline comments in string: First line\n * Second line\n *\n * Fourth line\n */\nexport type CommentWithBreaks = number;\n\n/**\n * Testing backticks in string: `backticks` and ```multiple backticks``` should work\n */\nexport type CommentWithBackticks = number;\n\n/**\n * Testing backticks and quotes in string: `backticks`, 'quotes', \"double quotes\" and ```multiple backticks``` should work\n */\nexport type CommentWithBackticksAndQuotes = number;\n\n/**\n * Testing slashes in string: \\backwards\\\\\\ and /forwards/// should work\n */\nexport type CommentWithSlashes = number;\n\n/**\n * Testing expression placeholders in string: ${expression} should work\n */\nexport type CommentWithExpressionPlaceholders = number;\n\n/**\n * Testing quotes in string: 'single quote''' and \"double quotes\"\"\" should work\n */\nexport type CommentWithQuotes = number;\n\n/**\n * Testing reserved characters in string: * inline * and ** inline ** should work\n */\nexport type CommentWithReservedCharacters = number;\n\n/**\n * This is a simple number\n */\nexport type SimpleInteger = number;\n\n/**\n * This is a simple boolean\n */\nexport type SimpleBoolean = boolean;\n\n/**\n * This is a simple string\n */\nexport type SimpleString = string;\n\n/**\n * A string with non-ascii (unicode) characters valid in typescript identifiers (æøåÆØÅöÔèÈ字符串)\n */\nexport type NonAsciiStringæøåÆøÅöôêÊ字符串 = string;\n\n/**\n * This is a simple file\n */\nexport type SimpleFile = Blob | File;\n\n/**\n * This is a simple reference\n */\nexport type SimpleReference = ModelWithString;\n\n/**\n * This is a simple string\n */\nexport type SimpleStringWithPattern = string | null;\n\n/**\n * This is a simple enum with strings\n */\nexport type EnumWithStrings = 'Success' | 'Warning' | 'Error' | '\\'Single Quote\\'' | '\"Double Quotes\"' | 'Non-ascii: øæåôöØÆÅÔÖ字符串';\n\nexport type EnumWithReplacedCharacters = '\\'Single Quote\\'' | '\"Double Quotes\"' | 'øæåôöØÆÅÔÖ字符串' | 3.1 | '';\n\n/**\n * This is a simple enum with numbers\n */\nexport type EnumWithNumbers = 1 | 2 | 3 | 1.1 | 1.2 | 1.3 | 100 | 200 | 300 | -100 | -200 | -300 | -1.1 | -1.2 | -1.3;\n\n/**\n * Success=1,Warning=2,Error=3\n */\nexport type EnumFromDescription = number;\n\n/**\n * This is a simple enum with numbers\n */\nexport type EnumWithExtensions = 200 | 400 | 500;\n\nexport type EnumWithXEnumNames = 0 | 1 | 2;\n\n/**\n * This is a simple array with numbers\n */\nexport type ArrayWithNumbers = Array<number>;\n\n/**\n * This is a simple array with booleans\n */\nexport type ArrayWithBooleans = Array<boolean>;\n\n/**\n * This is a simple array with strings\n */\nexport type ArrayWithStrings = Array<string>;\n\n/**\n * This is a simple array with references\n */\nexport type ArrayWithReferences = Array<ModelWithString>;\n\n/**\n * This is a simple array containing an array\n */\nexport type ArrayWithArray = Array<Array<ModelWithString>>;\n\n/**\n * This is a simple array with properties\n */\nexport type ArrayWithProperties = Array<{\n    '16x16'?: CamelCaseCommentWithBreaks;\n    bar?: string;\n}>;\n\n/**\n * This is a simple array with any of properties\n */\nexport type ArrayWithAnyOfProperties = Array<{\n    foo?: string;\n} | {\n    bar?: string;\n}>;\n\nexport type AnyOfAnyAndNull = {\n    data?: unknown | null;\n};\n\n/**\n * This is a simple array with any of properties\n */\nexport type AnyOfArrays = {\n    results?: Array<{\n        foo?: string;\n    } | {\n        bar?: string;\n    }>;\n};\n\n/**\n * This is a string dictionary\n */\nexport type DictionaryWithString = {\n    [key: string]: string;\n};\n\nexport type DictionaryWithPropertiesAndAdditionalProperties = {\n    foo?: number;\n    bar?: boolean;\n    [key: string]: string | number | boolean | undefined;\n};\n\n/**\n * This is a string reference\n */\nexport type DictionaryWithReference = {\n    [key: string]: ModelWithString;\n};\n\n/**\n * This is a complex dictionary\n */\nexport type DictionaryWithArray = {\n    [key: string]: Array<ModelWithString>;\n};\n\n/**\n * This is a string dictionary\n */\nexport type DictionaryWithDictionary = {\n    [key: string]: {\n        [key: string]: string;\n    };\n};\n\n/**\n * This is a complex dictionary\n */\nexport type DictionaryWithProperties = {\n    [key: string]: {\n        foo?: string;\n        bar?: string;\n    };\n};\n\n/**\n * This is a model with one number property\n */\nexport type ModelWithInteger = {\n    /**\n     * This is a simple number property\n     */\n    prop?: number;\n};\n\n/**\n * This is a model with one boolean property\n */\nexport type ModelWithBoolean = {\n    /**\n     * This is a simple boolean property\n     */\n    prop?: boolean;\n};\n\n/**\n * This is a model with one string property\n */\nexport type ModelWithString = {\n    /**\n     * This is a simple string property\n     */\n    prop?: string;\n};\n\n/**\n * This is a model with one string property\n */\nexport type ModelWithStringError = {\n    /**\n     * This is a simple string property\n     */\n    prop?: string;\n};\n\n/**\n * `Comment` or `VoiceComment`. The JSON object for adding voice comments to tickets is different. See [Adding voice comments to tickets](/documentation/ticketing/managing-tickets/adding-voice-comments-to-tickets)\n */\nexport type ModelFromZendesk = string;\n\n/**\n * This is a model with one string property\n */\nexport type ModelWithNullableString = {\n    /**\n     * This is a simple string property\n     */\n    nullableProp1?: string | null;\n    /**\n     * This is a simple string property\n     */\n    nullableRequiredProp1: string | null;\n    /**\n     * This is a simple string property\n     */\n    nullableProp2?: string | null;\n    /**\n     * This is a simple string property\n     */\n    nullableRequiredProp2: string | null;\n    /**\n     * This is a simple enum with strings\n     */\n    'foo_bar-enum'?: 'Success' | 'Warning' | 'Error' | 'ØÆÅ字符串';\n};\n\n/**\n * This is a model with one enum\n */\nexport type ModelWithEnum = {\n    /**\n     * This is a simple enum with strings\n     */\n    'foo_bar-enum'?: 'Success' | 'Warning' | 'Error' | 'ØÆÅ字符串';\n    /**\n     * These are the HTTP error code enums\n     */\n    statusCode?: '100' | '200 FOO' | '300 FOO_BAR' | '400 foo-bar' | '500 foo.bar' | '600 foo&bar';\n    /**\n     * Simple boolean enum\n     */\n    bool?: true;\n};\n\n/**\n * This is a model with one enum with escaped name\n */\nexport type ModelWithEnumWithHyphen = {\n    /**\n     * Foo-Bar-Baz-Qux\n     */\n    'foo-bar-baz-qux'?: '3.0';\n};\n\n/**\n * This is a model with one enum\n */\nexport type ModelWithEnumFromDescription = {\n    /**\n     * Success=1,Warning=2,Error=3\n     */\n    test?: number;\n};\n\n/**\n * This is a model with nested enums\n */\nexport type ModelWithNestedEnums = {\n    dictionaryWithEnum?: {\n        [key: string]: 'Success' | 'Warning' | 'Error';\n    };\n    dictionaryWithEnumFromDescription?: {\n        [key: string]: number;\n    };\n    arrayWithEnum?: Array<'Success' | 'Warning' | 'Error'>;\n    arrayWithDescription?: Array<number>;\n    /**\n     * This is a simple enum with strings\n     */\n    'foo_bar-enum'?: 'Success' | 'Warning' | 'Error' | 'ØÆÅ字符串';\n};\n\n/**\n * This is a model with one property containing a reference\n */\nexport type ModelWithReference = {\n    prop?: ModelWithProperties;\n};\n\n/**\n * This is a model with one property containing an array\n */\nexport type ModelWithArrayReadOnlyAndWriteOnly = {\n    prop?: Array<ModelWithReadOnlyAndWriteOnly>;\n    propWithFile?: Array<Blob | File>;\n    propWithNumber?: Array<number>;\n};\n\n/**\n * This is a model with one property containing an array\n */\nexport type ModelWithArray = {\n    prop?: Array<ModelWithString>;\n    propWithFile?: Array<Blob | File>;\n    propWithNumber?: Array<number>;\n};\n\n/**\n * This is a model with one property containing a dictionary\n */\nexport type ModelWithDictionary = {\n    prop?: {\n        [key: string]: string;\n    };\n};\n\n/**\n * This is a deprecated model with a deprecated property\n *\n * @deprecated\n */\nexport type DeprecatedModel = {\n    /**\n     * This is a deprecated property\n     *\n     * @deprecated\n     */\n    prop?: string;\n};\n\n/**\n * This is a model with one property containing a circular reference\n */\nexport type ModelWithCircularReference = {\n    prop?: ModelWithCircularReference;\n};\n\n/**\n * This is a model with one property with a 'one of' relationship\n */\nexport type CompositionWithOneOf = {\n    propA?: ModelWithString | ModelWithEnum | ModelWithArray | ModelWithDictionary;\n};\n\n/**\n * This is a model with one property with a 'one of' relationship where the options are not $ref\n */\nexport type CompositionWithOneOfAnonymous = {\n    propA?: {\n        propA?: string;\n    } | string | number;\n};\n\n/**\n * Circle\n */\nexport type ModelCircle = {\n    kind: string;\n    radius?: number;\n};\n\n/**\n * Square\n */\nexport type ModelSquare = {\n    kind: string;\n    sideLength?: number;\n};\n\n/**\n * This is a model with one property with a 'one of' relationship where the options are not $ref\n */\nexport type CompositionWithOneOfDiscriminator = ({\n    kind: 'circle';\n} & ModelCircle) | ({\n    kind: 'square';\n} & ModelSquare);\n\n/**\n * This is a model with one property with a 'any of' relationship\n */\nexport type CompositionWithAnyOf = {\n    propA?: ModelWithString | ModelWithEnum | ModelWithArray | ModelWithDictionary;\n};\n\n/**\n * This is a model with one property with a 'any of' relationship where the options are not $ref\n */\nexport type CompositionWithAnyOfAnonymous = {\n    propA?: {\n        propA?: string;\n    } | string | number;\n};\n\n/**\n * This is a model with nested 'any of' property with a type null\n */\nexport type CompositionWithNestedAnyAndTypeNull = {\n    propA?: Array<ModelWithDictionary | null> | Array<ModelWithArray | null>;\n};\n\nexport type _3eNum1Период = 'Bird' | 'Dog';\n\nexport type ConstValue = 'ConstValue';\n\n/**\n * This is a model with one property with a 'any of' relationship where the options are not $ref\n */\nexport type CompositionWithNestedAnyOfAndNull = {\n    /**\n     * Scopes\n     */\n    propA?: Array<_3eNum1Период | ConstValue> | null;\n};\n\n/**\n * This is a model with one property with a 'one of' relationship\n */\nexport type CompositionWithOneOfAndNullable = {\n    propA?: {\n        boolean?: boolean;\n    } | ModelWithEnum | ModelWithArray | ModelWithDictionary | null;\n};\n\n/**\n * This is a model that contains a simple dictionary within composition\n */\nexport type CompositionWithOneOfAndSimpleDictionary = {\n    propA?: boolean | {\n        [key: string]: number;\n    };\n};\n\n/**\n * This is a model that contains a dictionary of simple arrays within composition\n */\nexport type CompositionWithOneOfAndSimpleArrayDictionary = {\n    propA?: boolean | {\n        [key: string]: Array<boolean>;\n    };\n};\n\n/**\n * This is a model that contains a dictionary of complex arrays (composited) within composition\n */\nexport type CompositionWithOneOfAndComplexArrayDictionary = {\n    propA?: boolean | {\n        [key: string]: Array<number | string>;\n    };\n};\n\n/**\n * This is a model with one property with a 'all of' relationship\n */\nexport type CompositionWithAllOfAndNullable = {\n    propA?: ({\n        boolean?: boolean;\n    } & ModelWithEnum & ModelWithArray & ModelWithDictionary) | null;\n};\n\n/**\n * This is a model with one property with a 'any of' relationship\n */\nexport type CompositionWithAnyOfAndNullable = {\n    propA?: {\n        boolean?: boolean;\n    } | ModelWithEnum | ModelWithArray | ModelWithDictionary | null;\n};\n\n/**\n * This is a base model with two simple optional properties\n */\nexport type CompositionBaseModel = {\n    firstName?: string;\n    lastname?: string;\n};\n\n/**\n * This is a model that extends the base model\n */\nexport type CompositionExtendedModel = CompositionBaseModel & {\n    age: number;\n    firstName: string;\n    lastname: string;\n};\n\n/**\n * This is a model with one nested property\n */\nexport type ModelWithProperties = {\n    required: string;\n    readonly requiredAndReadOnly: string;\n    requiredAndNullable: string | null;\n    string?: string;\n    number?: number;\n    boolean?: boolean;\n    reference?: ModelWithString;\n    'property with space'?: string;\n    default?: string;\n    try?: string;\n    readonly '@namespace.string'?: string;\n    readonly '@namespace.integer'?: number;\n};\n\n/**\n * This is a model with one nested property\n */\nexport type ModelWithNestedProperties = {\n    readonly first: {\n        readonly second: {\n            readonly third: string | null;\n        } | null;\n    } | null;\n};\n\n/**\n * This is a model with duplicated properties\n */\nexport type ModelWithDuplicateProperties = {\n    prop?: ModelWithString;\n};\n\n/**\n * This is a model with ordered properties\n */\nexport type ModelWithOrderedProperties = {\n    zebra?: string;\n    apple?: string;\n    hawaii?: string;\n};\n\n/**\n * This is a model with duplicated imports\n */\nexport type ModelWithDuplicateImports = {\n    propA?: ModelWithString;\n    propB?: ModelWithString;\n    propC?: ModelWithString;\n};\n\n/**\n * This is a model that extends another model\n */\nexport type ModelThatExtends = ModelWithString & {\n    propExtendsA?: string;\n    propExtendsB?: ModelWithString;\n};\n\n/**\n * This is a model that extends another model\n */\nexport type ModelThatExtendsExtends = ModelWithString & ModelThatExtends & {\n    propExtendsC?: string;\n    propExtendsD?: ModelWithString;\n};\n\n/**\n * This is a model that contains a some patterns\n */\nexport type ModelWithPattern = {\n    key: string;\n    name: string;\n    readonly enabled?: boolean;\n    readonly modified?: string;\n    id?: string;\n    text?: string;\n    patternWithSingleQuotes?: string;\n    patternWithNewline?: string;\n    patternWithBacktick?: string;\n    patternWithUnicode?: string;\n};\n\nexport type File = {\n    /**\n     * Id\n     */\n    readonly id?: string;\n    /**\n     * Updated at\n     */\n    readonly updated_at?: string;\n    /**\n     * Created at\n     */\n    readonly created_at?: string;\n    /**\n     * Mime\n     */\n    mime: string;\n    /**\n     * File\n     */\n    readonly file?: string;\n};\n\nexport type Default = {\n    name?: string;\n};\n\nexport type Pageable = {\n    page?: number;\n    size?: number;\n    sort?: Array<string>;\n};\n\n/**\n * This is a free-form object without additionalProperties.\n */\nexport type FreeFormObjectWithoutAdditionalProperties = {\n    [key: string]: unknown;\n};\n\n/**\n * This is a free-form object with additionalProperties: true.\n */\nexport type FreeFormObjectWithAdditionalPropertiesEqTrue = {\n    [key: string]: unknown;\n};\n\n/**\n * This is a free-form object with additionalProperties: {}.\n */\nexport type FreeFormObjectWithAdditionalPropertiesEqEmptyObject = {\n    [key: string]: unknown;\n};\n\nexport type ModelWithConst = {\n    String?: 'String';\n    number?: 0;\n    null?: null;\n    withType?: 'Some string';\n};\n\n/**\n * This is a model with one property and additionalProperties: true\n */\nexport type ModelWithAdditionalPropertiesEqTrue = {\n    /**\n     * This is a simple string property\n     */\n    prop?: string;\n    [key: string]: unknown;\n};\n\nexport type NestedAnyOfArraysNullable = {\n    nullableArray?: Array<string | boolean> | null;\n};\n\nexport type CompositionWithOneOfAndProperties = ({\n    foo: SimpleParameter;\n} | {\n    bar: NonAsciiStringæøåÆøÅöôêÊ字符串;\n}) & {\n    baz: number | null;\n    qux: number;\n};\n\n/**\n * An object that can be null\n */\nexport type NullableObject = {\n    foo?: string;\n} | null;\n\n/**\n * Some % character\n */\nexport type CharactersInDescription = string;\n\nexport type ModelWithNullableObject = {\n    data?: NullableObject;\n};\n\n/**\n * An object with additional properties that can be null (anyOf ref + null)\n */\nexport type ModelWithAdditionalPropertiesRef = {\n    [key: string]: NullableObject | null;\n};\n\nexport type ModelWithOneOfEnum = {\n    foo: 'Bar';\n} | {\n    foo: 'Baz';\n} | {\n    foo: 'Qux';\n} | {\n    content: string;\n    foo: 'Quux';\n} | {\n    content: [\n        string,\n        string\n    ];\n    foo: 'Corge';\n};\n\nexport type ModelWithNestedArrayEnumsDataFoo = 'foo' | 'bar';\n\nexport type ModelWithNestedArrayEnumsDataBar = 'baz' | 'qux';\n\nexport type ModelWithNestedArrayEnumsData = {\n    foo?: Array<ModelWithNestedArrayEnumsDataFoo>;\n    bar?: Array<ModelWithNestedArrayEnumsDataBar>;\n};\n\nexport type ModelWithNestedArrayEnums = {\n    array_strings?: Array<string>;\n    data?: ModelWithNestedArrayEnumsData;\n};\n\nexport type ModelWithNestedCompositionEnums = {\n    foo?: ModelWithNestedArrayEnumsDataFoo;\n};\n\nexport type ModelWithReadOnlyAndWriteOnly = {\n    foo: string;\n    readonly bar: string;\n};\n\nexport type ModelWithConstantSizeArray = [\n    number,\n    number\n];\n\nexport type ModelWithAnyOfConstantSizeArray = [\n    number | string,\n    number | string,\n    number | string\n];\n\nexport type ModelWithPrefixItemsConstantSizeArray = [\n    ModelWithInteger,\n    number | string,\n    string\n];\n\nexport type ModelWithAnyOfConstantSizeArrayNullable = [\n    number | null | string,\n    number | null | string,\n    number | null | string\n];\n\nexport type ModelWithAnyOfConstantSizeArrayWithNSizeAndOptions = [\n    number | Import,\n    number | Import\n];\n\nexport type ModelWithAnyOfConstantSizeArrayAndIntersect = [\n    number & string,\n    number & string\n];\n\nexport type ModelWithNumericEnumUnion = {\n    /**\n     * Период\n     */\n    value?: -10 | -1 | 0 | 1 | 3 | 6 | 12;\n};\n\n/**\n * Some description with `back ticks`\n */\nexport type ModelWithBackticksInDescription = {\n    /**\n     * The template `that` should be used for parsing and importing the contents of the CSV file.\n     *\n     * <br/><p>There is one placeholder currently supported:<ul>     <li><b>${x}</b> - refers to the n-th column in the CSV file, e.g. ${1}, ${2}, ...)</li></ul><p>Example of a correct JSON template:</p>\n     * <pre>\n     * [\n     * {\n     * \"resourceType\": \"Asset\",\n     * \"identifier\": {\n     * \"name\": \"${1}\",\n     * \"domain\": {\n     * \"name\": \"${2}\",\n     * \"community\": {\n     * \"name\": \"Some Community\"\n     * }\n     * }\n     * },\n     * \"attributes\" : {\n     * \"00000000-0000-0000-0000-000000003115\" : [ {\n     * \"value\" : \"${3}\"\n     * } ],\n     * \"00000000-0000-0000-0000-000000000222\" : [ {\n     * \"value\" : \"${4}\"\n     * } ]\n     * }\n     * }\n     * ]\n     * </pre>\n     */\n    template?: string;\n};\n\nexport type ModelWithOneOfAndProperties = (SimpleParameter | NonAsciiStringæøåÆøÅöôêÊ字符串) & {\n    baz: number | null;\n    qux: number;\n};\n\n/**\n * Model used to test deduplication strategy (unused)\n */\nexport type ParameterSimpleParameterUnused = string;\n\n/**\n * Model used to test deduplication strategy\n */\nexport type PostServiceWithEmptyTagResponse = string;\n\n/**\n * Model used to test deduplication strategy\n */\nexport type PostServiceWithEmptyTagResponse2 = string;\n\n/**\n * Model used to test deduplication strategy\n */\nexport type DeleteFooData = string;\n\n/**\n * Model used to test deduplication strategy\n */\nexport type DeleteFooData2 = string;\n\n/**\n * Model with restricted keyword name\n */\nexport type Import = string;\n\nexport type SchemaWithFormRestrictedKeys = {\n    description?: string;\n    'x-enum-descriptions'?: string;\n    'x-enum-varnames'?: string;\n    'x-enumNames'?: string;\n    title?: string;\n    object?: {\n        description?: string;\n        'x-enum-descriptions'?: string;\n        'x-enum-varnames'?: string;\n        'x-enumNames'?: string;\n        title?: string;\n    };\n    array?: Array<{\n        description?: string;\n        'x-enum-descriptions'?: string;\n        'x-enum-varnames'?: string;\n        'x-enumNames'?: string;\n        title?: string;\n    }>;\n};\n\n/**\n * This schema was giving PascalCase transformations a hard time\n */\nexport type IoK8sApimachineryPkgApisMetaV1DeleteOptions = {\n    /**\n     * Must be fulfilled before a deletion is carried out. If not possible, a 409 Conflict status will be returned.\n     */\n    preconditions?: IoK8sApimachineryPkgApisMetaV1Preconditions;\n};\n\n/**\n * This schema was giving PascalCase transformations a hard time\n */\nexport type IoK8sApimachineryPkgApisMetaV1Preconditions = {\n    /**\n     * Specifies the target ResourceVersion\n     */\n    resourceVersion?: string;\n    /**\n     * Specifies the target UID.\n     */\n    uid?: string;\n};\n\nexport type AdditionalPropertiesUnknownIssue = {\n    [key: string]: string | number;\n};\n\nexport type AdditionalPropertiesUnknownIssue2 = {\n    [key: string]: string | number;\n};\n\nexport type AdditionalPropertiesUnknownIssue3 = string & {\n    entries: {\n        [key: string]: AdditionalPropertiesUnknownIssue;\n    };\n};\n\nexport type AdditionalPropertiesIntegerIssue = {\n    value: number;\n    [key: string]: number;\n};\n\nexport type OneOfAllOfIssue = ((ConstValue | GenericSchemaDuplicateIssue1SystemBoolean) & _3eNum1Период) | GenericSchemaDuplicateIssue1SystemString;\n\nexport type GenericSchemaDuplicateIssue1SystemBoolean = {\n    item?: boolean;\n    error?: string | null;\n    readonly hasError?: boolean;\n    data?: {\n        [key: string]: never;\n    };\n};\n\nexport type GenericSchemaDuplicateIssue1SystemString = {\n    item?: string | null;\n    error?: string | null;\n    readonly hasError?: boolean;\n};\n\nexport type ExternalSharedModel = {\n    id: string;\n    name?: string;\n};\n\n/**\n * This is a model with one property containing a reference\n */\nexport type ModelWithReferenceWritable = {\n    prop?: ModelWithPropertiesWritable;\n};\n\n/**\n * This is a model with one property containing an array\n */\nexport type ModelWithArrayReadOnlyAndWriteOnlyWritable = {\n    prop?: Array<ModelWithReadOnlyAndWriteOnlyWritable>;\n    propWithFile?: Array<Blob | File>;\n    propWithNumber?: Array<number>;\n};\n\n/**\n * This is a model with one nested property\n */\nexport type ModelWithPropertiesWritable = {\n    required: string;\n    requiredAndNullable: string | null;\n    string?: string;\n    number?: number;\n    boolean?: boolean;\n    reference?: ModelWithString;\n    'property with space'?: string;\n    default?: string;\n    try?: string;\n};\n\n/**\n * This is a model that contains a some patterns\n */\nexport type ModelWithPatternWritable = {\n    key: string;\n    name: string;\n    id?: string;\n    text?: string;\n    patternWithSingleQuotes?: string;\n    patternWithNewline?: string;\n    patternWithBacktick?: string;\n    patternWithUnicode?: string;\n};\n\nexport type FileWritable = {\n    /**\n     * Mime\n     */\n    mime: string;\n};\n\nexport type ModelWithReadOnlyAndWriteOnlyWritable = {\n    foo: string;\n    baz: string;\n};\n\nexport type ModelWithAnyOfConstantSizeArrayWithNSizeAndOptionsWritable = [\n    number | Import,\n    number | Import\n];\n\nexport type AdditionalPropertiesUnknownIssueWritable = {\n    [key: string]: string | number;\n};\n\nexport type OneOfAllOfIssueWritable = ((ConstValue | GenericSchemaDuplicateIssue1SystemBoolean) & _3eNum1Период) | GenericSchemaDuplicateIssue1SystemString;\n\nexport type GenericSchemaDuplicateIssue1SystemBooleanWritable = {\n    item?: boolean;\n    error?: string | null;\n    data?: {\n        [key: string]: never;\n    };\n};\n\nexport type GenericSchemaDuplicateIssue1SystemStringWritable = {\n    item?: string | null;\n    error?: string | null;\n};\n\n/**\n * This is a reusable parameter\n */\nexport type SimpleParameter = string;\n\n/**\n * Parameter with illegal characters\n */\nexport type XFooBar = ModelWithString;\n\n/**\n * A reusable request body\n */\nexport type SimpleRequestBody = ModelWithString;\n\n/**\n * A reusable request body\n */\nexport type SimpleFormData = ModelWithString;\n\nexport type ExportData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no+tag';\n};\n\nexport type PatchApiVbyApiVersionNoTagData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no+tag';\n};\n\nexport type PatchApiVbyApiVersionNoTagResponses = {\n    /**\n     * OK\n     */\n    default: unknown;\n};\n\nexport type ImportData = {\n    body: ModelWithReadOnlyAndWriteOnlyWritable | ModelWithArrayReadOnlyAndWriteOnlyWritable;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no+tag';\n};\n\nexport type ImportResponses = {\n    /**\n     * Success\n     */\n    200: ModelFromZendesk;\n    /**\n     * Default success response\n     */\n    default: ModelWithReadOnlyAndWriteOnly;\n};\n\nexport type ImportResponse = ImportResponses[keyof ImportResponses];\n\nexport type FooWowData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no+tag';\n};\n\nexport type FooWowResponses = {\n    /**\n     * OK\n     */\n    default: unknown;\n};\n\nexport type ApiVVersionODataControllerCountData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple/$count';\n};\n\nexport type ApiVVersionODataControllerCountResponses = {\n    /**\n     * Success\n     */\n    200: ModelFromZendesk;\n};\n\nexport type ApiVVersionODataControllerCountResponse = ApiVVersionODataControllerCountResponses[keyof ApiVVersionODataControllerCountResponses];\n\nexport type GetApiVbyApiVersionSimpleOperationData = {\n    body?: never;\n    path: {\n        /**\n         * foo in method\n         */\n        foo_param: string;\n    };\n    query?: never;\n    url: '/api/v{api-version}/simple:operation';\n};\n\nexport type GetApiVbyApiVersionSimpleOperationErrors = {\n    /**\n     * Default error response\n     */\n    default: ModelWithBoolean;\n};\n\nexport type GetApiVbyApiVersionSimpleOperationError = GetApiVbyApiVersionSimpleOperationErrors[keyof GetApiVbyApiVersionSimpleOperationErrors];\n\nexport type GetApiVbyApiVersionSimpleOperationResponses = {\n    /**\n     * Response is a simple number\n     */\n    200: number;\n};\n\nexport type GetApiVbyApiVersionSimpleOperationResponse = GetApiVbyApiVersionSimpleOperationResponses[keyof GetApiVbyApiVersionSimpleOperationResponses];\n\nexport type DeleteCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type GetCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type HeadCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type OptionsCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type PatchCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type PostCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type PutCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type DeleteFooData3 = {\n    body?: never;\n    headers: {\n        /**\n         * Parameter with illegal characters\n         */\n        'x-Foo-Bar': ModelWithString;\n    };\n    path: {\n        /**\n         * foo in method\n         */\n        foo_param: string;\n        /**\n         * bar in method\n         */\n        BarParam: string;\n    };\n    query?: never;\n    url: '/api/v{api-version}/foo/{foo_param}/bar/{BarParam}';\n};\n\nexport type CallWithDescriptionsData = {\n    body?: never;\n    path?: never;\n    query?: {\n        /**\n         * Testing multiline comments in string: First line\n         * Second line\n         *\n         * Fourth line\n         */\n        parameterWithBreaks?: string;\n        /**\n         * Testing backticks in string: `backticks` and ```multiple backticks``` should work\n         */\n        parameterWithBackticks?: string;\n        /**\n         * Testing slashes in string: \\backwards\\\\\\ and /forwards/// should work\n         */\n        parameterWithSlashes?: string;\n        /**\n         * Testing expression placeholders in string: ${expression} should work\n         */\n        parameterWithExpressionPlaceholders?: string;\n        /**\n         * Testing quotes in string: 'single quote''' and \"double quotes\"\"\" should work\n         */\n        parameterWithQuotes?: string;\n        /**\n         * Testing reserved characters in string: * inline * and ** inline ** should work\n         */\n        parameterWithReservedCharacters?: string;\n    };\n    url: '/api/v{api-version}/descriptions';\n};\n\nexport type DeprecatedCallData = {\n    body?: never;\n    headers: {\n        /**\n         * This parameter is deprecated\n         *\n         * @deprecated\n         */\n        parameter: DeprecatedModel | null;\n    };\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/parameters/deprecated';\n};\n\nexport type CallWithParametersData = {\n    /**\n     * This is the parameter that goes into the body\n     */\n    body: {\n        [key: string]: unknown;\n    } | null;\n    headers: {\n        /**\n         * This is the parameter that goes into the header\n         */\n        parameterHeader: string | null;\n    };\n    path: {\n        /**\n         * This is the parameter that goes into the path\n         */\n        parameterPath: string | null;\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string | null;\n    };\n    query: {\n        foo_ref_enum?: ModelWithNestedArrayEnumsDataFoo;\n        foo_all_of_enum: ModelWithNestedArrayEnumsDataFoo;\n        /**\n         * This is the parameter that goes into the query params\n         */\n        cursor: string | null;\n    };\n    url: '/api/v{api-version}/parameters/{parameterPath}';\n};\n\nexport type CallWithWeirdParameterNamesData = {\n    /**\n     * This is the parameter that goes into the body\n     */\n    body: ModelWithString | null;\n    headers: {\n        /**\n         * This is the parameter that goes into the request header\n         */\n        'parameter.header': string | null;\n    };\n    path: {\n        /**\n         * This is the parameter that goes into the path\n         */\n        'parameter.path.1'?: string;\n        /**\n         * This is the parameter that goes into the path\n         */\n        'parameter-path-2'?: string;\n        /**\n         * This is the parameter that goes into the path\n         */\n        'PARAMETER-PATH-3'?: string;\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string | null;\n    };\n    query: {\n        /**\n         * This is the parameter with a reserved keyword\n         */\n        default?: string;\n        /**\n         * This is the parameter that goes into the request query params\n         */\n        'parameter-query': string | null;\n    };\n    url: '/api/v{api-version}/parameters/{parameter.path.1}/{parameter-path-2}/{PARAMETER-PATH-3}';\n};\n\nexport type GetCallWithOptionalParamData = {\n    /**\n     * This is a required parameter\n     */\n    body: ModelWithOneOfEnum;\n    path?: never;\n    query?: {\n        /**\n         * This is an optional parameter\n         */\n        page?: number;\n    };\n    url: '/api/v{api-version}/parameters';\n};\n\nexport type PostCallWithOptionalParamData = {\n    /**\n     * This is an optional parameter\n     */\n    body?: {\n        offset?: number | null;\n    };\n    path?: never;\n    query: {\n        /**\n         * This is a required parameter\n         */\n        parameter: Pageable;\n    };\n    url: '/api/v{api-version}/parameters';\n};\n\nexport type PostCallWithOptionalParamResponses = {\n    /**\n     * Response is a simple number\n     */\n    200: number;\n    /**\n     * Success\n     */\n    204: void;\n};\n\nexport type PostCallWithOptionalParamResponse = PostCallWithOptionalParamResponses[keyof PostCallWithOptionalParamResponses];\n\nexport type PostApiVbyApiVersionRequestBodyData = {\n    /**\n     * A reusable request body\n     */\n    body?: SimpleRequestBody;\n    path?: never;\n    query?: {\n        /**\n         * This is a reusable parameter\n         */\n        parameter?: string;\n    };\n    url: '/api/v{api-version}/requestBody';\n};\n\nexport type PostApiVbyApiVersionFormDataData = {\n    /**\n     * A reusable request body\n     */\n    body?: SimpleFormData;\n    path?: never;\n    query?: {\n        /**\n         * This is a reusable parameter\n         */\n        parameter?: string;\n    };\n    url: '/api/v{api-version}/formData';\n};\n\nexport type CallWithDefaultParametersData = {\n    body?: never;\n    path?: never;\n    query?: {\n        /**\n         * This is a simple string with default value\n         */\n        parameterString?: string | null;\n        /**\n         * This is a simple number with default value\n         */\n        parameterNumber?: number | null;\n        /**\n         * This is a simple boolean with default value\n         */\n        parameterBoolean?: boolean | null;\n        /**\n         * This is a simple enum with default value\n         */\n        parameterEnum?: 'Success' | 'Warning' | 'Error';\n        /**\n         * This is a simple model with default value\n         */\n        parameterModel?: ModelWithString | null;\n    };\n    url: '/api/v{api-version}/defaults';\n};\n\nexport type CallWithDefaultOptionalParametersData = {\n    body?: never;\n    path?: never;\n    query?: {\n        /**\n         * This is a simple string that is optional with default value\n         */\n        parameterString?: string;\n        /**\n         * This is a simple number that is optional with default value\n         */\n        parameterNumber?: number;\n        /**\n         * This is a simple boolean that is optional with default value\n         */\n        parameterBoolean?: boolean;\n        /**\n         * This is a simple enum that is optional with default value\n         */\n        parameterEnum?: 'Success' | 'Warning' | 'Error';\n        /**\n         * This is a simple model that is optional with default value\n         */\n        parameterModel?: ModelWithString;\n    };\n    url: '/api/v{api-version}/defaults';\n};\n\nexport type CallToTestOrderOfParamsData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * This is a optional string with default\n         */\n        parameterOptionalStringWithDefault?: string;\n        /**\n         * This is a optional string with empty default\n         */\n        parameterOptionalStringWithEmptyDefault?: string;\n        /**\n         * This is a optional string with no default\n         */\n        parameterOptionalStringWithNoDefault?: string;\n        /**\n         * This is a string with default\n         */\n        parameterStringWithDefault: string;\n        /**\n         * This is a string with empty default\n         */\n        parameterStringWithEmptyDefault: string;\n        /**\n         * This is a string with no default\n         */\n        parameterStringWithNoDefault: string;\n        /**\n         * This is a string that can be null with no default\n         */\n        parameterStringNullableWithNoDefault?: string | null;\n        /**\n         * This is a string that can be null with default\n         */\n        parameterStringNullableWithDefault?: string | null;\n    };\n    url: '/api/v{api-version}/defaults';\n};\n\nexport type DuplicateNameData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/duplicate';\n};\n\nexport type DuplicateName2Data = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/duplicate';\n};\n\nexport type DuplicateName3Data = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/duplicate';\n};\n\nexport type DuplicateName4Data = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/duplicate';\n};\n\nexport type CallWithNoContentResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no-content';\n};\n\nexport type CallWithNoContentResponseResponses = {\n    /**\n     * Success\n     */\n    204: void;\n};\n\nexport type CallWithNoContentResponseResponse = CallWithNoContentResponseResponses[keyof CallWithNoContentResponseResponses];\n\nexport type CallWithResponseAndNoContentResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multiple-tags/response-and-no-content';\n};\n\nexport type CallWithResponseAndNoContentResponseResponses = {\n    /**\n     * Response is a simple number\n     */\n    200: number;\n    /**\n     * Success\n     */\n    204: void;\n};\n\nexport type CallWithResponseAndNoContentResponseResponse = CallWithResponseAndNoContentResponseResponses[keyof CallWithResponseAndNoContentResponseResponses];\n\nexport type DummyAData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multiple-tags/a';\n};\n\nexport type DummyAResponses = {\n    200: _400;\n};\n\nexport type DummyAResponse = DummyAResponses[keyof DummyAResponses];\n\nexport type DummyBData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multiple-tags/b';\n};\n\nexport type DummyBResponses = {\n    /**\n     * Success\n     */\n    204: void;\n};\n\nexport type DummyBResponse = DummyBResponses[keyof DummyBResponses];\n\nexport type CallWithResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/response';\n};\n\nexport type CallWithResponseResponses = {\n    default: Import;\n};\n\nexport type CallWithResponseResponse = CallWithResponseResponses[keyof CallWithResponseResponses];\n\nexport type CallWithDuplicateResponsesData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/response';\n};\n\nexport type CallWithDuplicateResponsesErrors = {\n    /**\n     * Message for 500 error\n     */\n    500: ModelWithStringError;\n    /**\n     * Message for 501 error\n     */\n    501: ModelWithStringError;\n    /**\n     * Message for 502 error\n     */\n    502: ModelWithStringError;\n    /**\n     * Message for 4XX errors\n     */\n    '4XX': DictionaryWithArray;\n    /**\n     * Default error response\n     */\n    default: ModelWithBoolean;\n};\n\nexport type CallWithDuplicateResponsesError = CallWithDuplicateResponsesErrors[keyof CallWithDuplicateResponsesErrors];\n\nexport type CallWithDuplicateResponsesResponses = {\n    /**\n     * Message for 200 response\n     */\n    200: ModelWithBoolean & ModelWithInteger;\n    /**\n     * Message for 201 response\n     */\n    201: ModelWithString;\n    /**\n     * Message for 202 response\n     */\n    202: ModelWithString;\n};\n\nexport type CallWithDuplicateResponsesResponse = CallWithDuplicateResponsesResponses[keyof CallWithDuplicateResponsesResponses];\n\nexport type CallWithResponsesData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/response';\n};\n\nexport type CallWithResponsesErrors = {\n    /**\n     * Message for 500 error\n     */\n    500: ModelWithStringError;\n    /**\n     * Message for 501 error\n     */\n    501: ModelWithStringError;\n    /**\n     * Message for 502 error\n     */\n    502: ModelWithStringError;\n    /**\n     * Message for default response\n     */\n    default: ModelWithStringError;\n};\n\nexport type CallWithResponsesError = CallWithResponsesErrors[keyof CallWithResponsesErrors];\n\nexport type CallWithResponsesResponses = {\n    /**\n     * Message for 200 response\n     */\n    200: {\n        readonly '@namespace.string'?: string;\n        readonly '@namespace.integer'?: number;\n        readonly value?: Array<ModelWithString>;\n    };\n    /**\n     * Message for 201 response\n     */\n    201: ModelThatExtends;\n    /**\n     * Message for 202 response\n     */\n    202: ModelThatExtendsExtends;\n};\n\nexport type CallWithResponsesResponse = CallWithResponsesResponses[keyof CallWithResponsesResponses];\n\nexport type CollectionFormatData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * This is an array parameter that is sent as csv format (comma-separated values)\n         */\n        parameterArrayCSV: Array<string> | null;\n        /**\n         * This is an array parameter that is sent as ssv format (space-separated values)\n         */\n        parameterArraySSV: Array<string> | null;\n        /**\n         * This is an array parameter that is sent as tsv format (tab-separated values)\n         */\n        parameterArrayTSV: Array<string> | null;\n        /**\n         * This is an array parameter that is sent as pipes format (pipe-separated values)\n         */\n        parameterArrayPipes: Array<string> | null;\n        /**\n         * This is an array parameter that is sent as multi format (multiple parameter instances)\n         */\n        parameterArrayMulti: Array<string> | null;\n    };\n    url: '/api/v{api-version}/collectionFormat';\n};\n\nexport type TypesData = {\n    body?: never;\n    path?: {\n        /**\n         * This is a number parameter\n         */\n        id?: number;\n    };\n    query: {\n        /**\n         * This is a number parameter\n         */\n        parameterNumber: number;\n        /**\n         * This is a string parameter\n         */\n        parameterString: string | null;\n        /**\n         * This is a boolean parameter\n         */\n        parameterBoolean: boolean | null;\n        /**\n         * This is an object parameter\n         */\n        parameterObject: {\n            [key: string]: unknown;\n        } | null;\n        /**\n         * This is an array parameter\n         */\n        parameterArray: Array<string> | null;\n        /**\n         * This is a dictionary parameter\n         */\n        parameterDictionary: {\n            [key: string]: unknown;\n        } | null;\n        /**\n         * This is an enum parameter\n         */\n        parameterEnum: 'Success' | 'Warning' | 'Error' | null;\n    };\n    url: '/api/v{api-version}/types';\n};\n\nexport type TypesResponses = {\n    /**\n     * Response is a simple number\n     */\n    200: number;\n    /**\n     * Response is a simple string\n     */\n    201: string;\n    /**\n     * Response is a simple boolean\n     */\n    202: boolean;\n    /**\n     * Response is a simple object\n     */\n    203: {\n        [key: string]: unknown;\n    };\n};\n\nexport type TypesResponse = TypesResponses[keyof TypesResponses];\n\nexport type UploadFileData = {\n    body: Blob | File;\n    path: {\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string | null;\n    };\n    query?: never;\n    url: '/api/v{api-version}/upload';\n};\n\nexport type UploadFileResponses = {\n    200: boolean;\n};\n\nexport type UploadFileResponse = UploadFileResponses[keyof UploadFileResponses];\n\nexport type FileResponseData = {\n    body?: never;\n    path: {\n        id: string;\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string;\n    };\n    query?: never;\n    url: '/api/v{api-version}/file/{id}';\n};\n\nexport type FileResponseResponses = {\n    /**\n     * Success\n     */\n    200: Blob | File;\n};\n\nexport type FileResponseResponse = FileResponseResponses[keyof FileResponseResponses];\n\nexport type ComplexTypesData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * Parameter containing object\n         */\n        parameterObject: {\n            first?: {\n                second?: {\n                    third?: string;\n                };\n            };\n        };\n        /**\n         * Parameter containing reference\n         */\n        parameterReference: ModelWithString;\n    };\n    url: '/api/v{api-version}/complex';\n};\n\nexport type ComplexTypesErrors = {\n    /**\n     * 400 `server` error\n     */\n    400: unknown;\n    /**\n     * 500 server error\n     */\n    500: unknown;\n};\n\nexport type ComplexTypesResponses = {\n    /**\n     * Successful response\n     */\n    200: Array<ModelWithString>;\n};\n\nexport type ComplexTypesResponse = ComplexTypesResponses[keyof ComplexTypesResponses];\n\nexport type MultipartResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multipart';\n};\n\nexport type MultipartResponseResponses = {\n    /**\n     * OK\n     */\n    200: {\n        file?: Blob | File;\n        metadata?: {\n            foo?: string;\n            bar?: string;\n        };\n    };\n};\n\nexport type MultipartResponseResponse = MultipartResponseResponses[keyof MultipartResponseResponses];\n\nexport type MultipartRequestData = {\n    body?: {\n        content?: Blob | File;\n        data?: ModelWithString | null;\n    };\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multipart';\n};\n\nexport type ComplexParamsData = {\n    body?: {\n        readonly key: string | null;\n        name: string | null;\n        enabled?: boolean;\n        type: 'Monkey' | 'Horse' | 'Bird';\n        listOfModels?: Array<ModelWithString> | null;\n        listOfStrings?: Array<string> | null;\n        parameters: ModelWithString | ModelWithEnum | ModelWithArray | ModelWithDictionary;\n        readonly user?: {\n            readonly id?: number;\n            readonly name?: string | null;\n        };\n    };\n    path: {\n        id: number;\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string;\n    };\n    query?: never;\n    url: '/api/v{api-version}/complex/{id}';\n};\n\nexport type ComplexParamsResponses = {\n    /**\n     * Success\n     */\n    200: ModelWithString;\n};\n\nexport type ComplexParamsResponse = ComplexParamsResponses[keyof ComplexParamsResponses];\n\nexport type CallWithResultFromHeaderData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/header';\n};\n\nexport type CallWithResultFromHeaderErrors = {\n    /**\n     * 400 server error\n     */\n    400: unknown;\n    /**\n     * 500 server error\n     */\n    500: unknown;\n};\n\nexport type CallWithResultFromHeaderResponses = {\n    /**\n     * Successful response\n     */\n    200: unknown;\n};\n\nexport type TestErrorCodeData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * Status code to return\n         */\n        status: number;\n    };\n    url: '/api/v{api-version}/error';\n};\n\nexport type TestErrorCodeErrors = {\n    /**\n     * Custom message: Internal Server Error\n     */\n    500: unknown;\n    /**\n     * Custom message: Not Implemented\n     */\n    501: unknown;\n    /**\n     * Custom message: Bad Gateway\n     */\n    502: unknown;\n    /**\n     * Custom message: Service Unavailable\n     */\n    503: unknown;\n};\n\nexport type TestErrorCodeResponses = {\n    /**\n     * Custom message: Successful response\n     */\n    200: unknown;\n};\n\nexport type NonAsciiæøåÆøÅöôêÊ字符串Data = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * Dummy input param\n         */\n        nonAsciiParamæøåÆØÅöôêÊ: number;\n    };\n    url: '/api/v{api-version}/non-ascii-æøåÆØÅöôêÊ字符串';\n};\n\nexport type NonAsciiæøåÆøÅöôêÊ字符串Responses = {\n    /**\n     * Successful response\n     */\n    200: Array<NonAsciiStringæøåÆøÅöôêÊ字符串>;\n};\n\nexport type NonAsciiæøåÆøÅöôêÊ字符串Response = NonAsciiæøåÆøÅöôêÊ字符串Responses[keyof NonAsciiæøåÆøÅöôêÊ字符串Responses];\n\nexport type PutWithFormUrlEncodedData = {\n    body: ArrayWithStrings;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/non-ascii-æøåÆØÅöôêÊ字符串';\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-angular/default/client/client.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { HttpResponse } from '@angular/common/http';\nimport { HttpClient, HttpErrorResponse, HttpEventType, HttpRequest } from '@angular/common/http';\nimport {\n  assertInInjectionContext,\n  inject,\n  provideAppInitializer,\n  runInInjectionContext,\n} from '@angular/core';\nimport { firstValueFrom } from 'rxjs';\nimport { filter } from 'rxjs/operators';\n\nimport { createSseClient } from '../core/serverSentEvents.gen';\nimport type { HttpMethod } from '../core/types.gen';\nimport { getValidRequestBody } from '../core/utils.gen';\nimport type {\n  Client,\n  Config,\n  RequestOptions,\n  ResolvedRequestOptions,\n  ResponseStyle,\n} from './types.gen';\nimport {\n  buildUrl,\n  createConfig,\n  createInterceptors,\n  mergeConfigs,\n  mergeHeaders,\n  setAuthParams,\n} from './utils.gen';\n\nexport function provideHeyApiClient(client: Client) {\n  return provideAppInitializer(() => {\n    const httpClient = inject(HttpClient);\n    client.setConfig({ httpClient });\n  });\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<\n    HttpRequest<unknown>,\n    HttpResponse<unknown>,\n    unknown,\n    ResolvedRequestOptions\n  >();\n\n  const requestOptions = <\n    TData = unknown,\n    ThrowOnError extends boolean = false,\n    TResponseStyle extends ResponseStyle = 'fields',\n  >(\n    options: RequestOptions<TData, TResponseStyle, ThrowOnError>,\n  ) => {\n    const opts = {\n      ..._config,\n      ...options,\n      headers: mergeHeaders(_config.headers, options.headers),\n      httpClient: options.httpClient ?? _config.httpClient,\n      serializedBody: undefined as string | undefined,\n    };\n\n    if (!opts.httpClient) {\n      if (opts.injector) {\n        opts.httpClient = runInInjectionContext(opts.injector, () => inject(HttpClient));\n      } else {\n        assertInInjectionContext(requestOptions);\n        opts.httpClient = inject(HttpClient);\n      }\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 url = buildUrl(opts as any);\n\n    const req = new HttpRequest<unknown>(opts.method ?? 'GET', url, getValidRequestBody(opts), {\n      redirect: 'follow',\n      ...opts,\n    });\n\n    return { opts, req, url };\n  };\n\n  const beforeRequest = async (options: RequestOptions) => {\n    const { opts, req, url } = requestOptions(options);\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    return { opts, req, url };\n  };\n\n  const request: Client['request'] = async (options) => {\n    // @ts-expect-error\n    const { opts, req: initialReq } = await beforeRequest(options);\n\n    let req = initialReq;\n\n    for (const fn of interceptors.request.fns) {\n      if (fn) {\n        req = await fn(req, opts as any);\n      }\n    }\n\n    const result: {\n      request: HttpRequest<unknown>;\n      response: any;\n    } = {\n      request: req,\n      response: null,\n    };\n\n    try {\n      result.response = (await firstValueFrom(\n        opts\n          .httpClient!.request(req)\n          .pipe(filter((event) => event.type === HttpEventType.Response)),\n      )) as HttpResponse<unknown>;\n\n      for (const fn of interceptors.response.fns) {\n        if (fn) {\n          result.response = await fn(result.response, req, opts as any);\n        }\n      }\n\n      let bodyResponse = result.response.body;\n\n      if (opts.responseValidator) {\n        await opts.responseValidator(bodyResponse);\n      }\n\n      if (opts.responseTransformer) {\n        bodyResponse = await opts.responseTransformer(bodyResponse);\n      }\n\n      return opts.responseStyle === 'data' ? bodyResponse : { data: bodyResponse, ...result };\n    } catch (error) {\n      if (error instanceof HttpErrorResponse) {\n        result.response = error;\n      }\n\n      let finalError = error instanceof HttpErrorResponse ? error.error : error;\n\n      for (const fn of interceptors.error.fns) {\n        if (fn) {\n          finalError = (await fn(finalError, result.response as any, req, opts as any)) as string;\n        }\n      }\n\n      if (opts.throwOnError) {\n        throw finalError;\n      }\n\n      return opts.responseStyle === 'data'\n        ? undefined\n        : {\n            error: finalError,\n            ...result,\n          };\n    }\n  };\n\n  const makeMethodFn = (method: Uppercase<HttpMethod>) => (options: RequestOptions) =>\n    request({ ...options, method });\n\n  const makeSseFn = (method: Uppercase<HttpMethod>) => async (options: RequestOptions) => {\n    const { opts, url } = await beforeRequest(options);\n    return createSseClient({\n      ...opts,\n      body: opts.body as BodyInit | null | undefined,\n      headers: opts.headers as unknown as Record<string, string>,\n      method,\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    requestOptions: (options) => {\n      if (options.security) {\n        throw new Error('Security is not supported in requestOptions');\n      }\n\n      if (options.requestValidator) {\n        throw new Error('Request validation is not supported in requestOptions');\n      }\n\n      return requestOptions(options).req;\n    },\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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-angular/default/client/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type { Auth } from '../core/auth.gen';\nexport type { QuerySerializerOptions } from '../core/bodySerializer.gen';\nexport {\n  formDataBodySerializer,\n  jsonBodySerializer,\n  urlSearchParamsBodySerializer,\n} from '../core/bodySerializer.gen';\nexport { buildClientParams } from '../core/params.gen';\nexport { serializeQueryKeyValue } from '../core/queryKeySerializer.gen';\nexport { createClient } from './client.gen';\nexport type {\n  Client,\n  ClientOptions,\n  Config,\n  CreateClientConfig,\n  Options,\n  RequestOptions,\n  RequestResult,\n  ResolvedRequestOptions,\n  ResponseStyle,\n  TDataShape,\n} from './types.gen';\nexport { createConfig, mergeHeaders } from './utils.gen';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-angular/default/client/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type {\n  HttpClient,\n  HttpErrorResponse,\n  HttpHeaders,\n  HttpRequest,\n  HttpResponse,\n} from '@angular/common/http';\nimport type { Injector } from '@angular/core';\n\nimport type { Auth } from '../core/auth.gen';\nimport type {\n  ServerSentEventsOptions,\n  ServerSentEventsResult,\n} from '../core/serverSentEvents.gen';\nimport type { Client as CoreClient, Config as CoreConfig } from '../core/types.gen';\nimport type { Middleware } from './utils.gen';\n\nexport type ResponseStyle = 'data' | 'fields';\n\nexport interface Config<T extends ClientOptions = ClientOptions>\n  extends Omit<RequestInit, 'body' | 'headers' | 'method'>, Omit<CoreConfig, 'headers'> {\n  /**\n   * Base URL for all requests made by this client.\n   */\n  baseUrl?: T['baseUrl'];\n  /**\n   * An object containing any HTTP headers that you want to pre-populate your\n   * `HttpHeaders` object with.\n   *\n   * {@link https://angular.dev/api/common/http/HttpHeaders#constructor See more}\n   */\n  headers?:\n    | HttpHeaders\n    | Record<\n        string,\n        string | number | boolean | (string | number | boolean)[] | null | undefined | unknown\n      >;\n  /**\n   * The HTTP client to use for making requests.\n   */\n  httpClient?: HttpClient;\n  /**\n   * Should we return only data or multiple fields (data, error, response, etc.)?\n   *\n   * @default 'fields'\n   */\n  responseStyle?: ResponseStyle;\n\n  /**\n   * Throw an error instead of returning it in the response?\n   *\n   * @default false\n   */\n  throwOnError?: T['throwOnError'];\n}\n\nexport interface RequestOptions<\n  TData = unknown,\n  TResponseStyle extends ResponseStyle = 'fields',\n  ThrowOnError extends boolean = boolean,\n  Url extends string = string,\n>\n  extends\n    Config<{\n      responseStyle: TResponseStyle;\n      throwOnError: ThrowOnError;\n    }>,\n    Pick<\n      ServerSentEventsOptions<TData>,\n      | 'onRequest'\n      | 'onSseError'\n      | 'onSseEvent'\n      | 'sseDefaultRetryDelay'\n      | 'sseMaxRetryAttempts'\n      | 'sseMaxRetryDelay'\n    > {\n  /**\n   * Any body that you want to add to your request.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/fetch#body}\n   */\n  body?: unknown;\n  /**\n   * Optional custom injector for dependency resolution if you don't implicitly or explicitly provide one.\n   */\n  injector?: Injector;\n  path?: Record<string, unknown>;\n  query?: Record<string, unknown>;\n  /**\n   * Security mechanism(s) to use for the request.\n   */\n  security?: ReadonlyArray<Auth>;\n  url: Url;\n}\n\nexport interface ResolvedRequestOptions<\n  TResponseStyle extends ResponseStyle = 'fields',\n  ThrowOnError extends boolean = boolean,\n  Url extends string = string,\n> extends RequestOptions<unknown, TResponseStyle, ThrowOnError, Url> {\n  serializedBody?: string;\n}\n\nexport type RequestResult<\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = boolean,\n  TResponseStyle extends ResponseStyle = 'fields',\n> = Promise<\n  ThrowOnError extends true\n    ? TResponseStyle extends 'data'\n      ? TData extends Record<string, unknown>\n        ? TData[keyof TData]\n        : TData\n      : {\n          data: TData extends Record<string, unknown> ? TData[keyof TData] : TData;\n          request: HttpRequest<unknown>;\n          response: HttpResponse<TData>;\n        }\n    : TResponseStyle extends 'data'\n      ? (TData extends Record<string, unknown> ? TData[keyof TData] : TData) | undefined\n      :\n          | {\n              data: TData extends Record<string, unknown> ? TData[keyof TData] : TData;\n              error: undefined;\n              request: HttpRequest<unknown>;\n              response: HttpResponse<TData>;\n            }\n          | {\n              data: undefined;\n              error: TError[keyof TError];\n              request: HttpRequest<unknown>;\n              response: HttpErrorResponse & {\n                error: TError[keyof TError] | null;\n              };\n            }\n>;\n\nexport interface ClientOptions {\n  baseUrl?: string;\n  responseStyle?: ResponseStyle;\n  throwOnError?: boolean;\n}\n\ntype MethodFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'>,\n) => RequestResult<TData, TError, ThrowOnError, TResponseStyle>;\n\ntype SseFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'>,\n) => Promise<ServerSentEventsResult<TData, TError>>;\n\ntype RequestFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'> &\n    Pick<Required<RequestOptions<TData, TResponseStyle, ThrowOnError>>, 'method'>,\n) => RequestResult<TData, TError, ThrowOnError, TResponseStyle>;\n\ntype RequestOptionsFn = <\n  T,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: RequestOptions<T, TResponseStyle, ThrowOnError>,\n) => HttpRequest<T>;\n\ntype BuildUrlFn = <\n  TData extends {\n    body?: unknown;\n    path?: Record<string, unknown>;\n    query?: Record<string, unknown>;\n    url: string;\n  },\n>(\n  options: TData & Options<TData>,\n) => string;\n\nexport type Client = CoreClient<RequestFn, Config, MethodFn, BuildUrlFn, SseFn> & {\n  interceptors: Middleware<\n    HttpRequest<unknown>,\n    HttpResponse<unknown>,\n    unknown,\n    ResolvedRequestOptions\n  >;\n  requestOptions: RequestOptionsFn;\n};\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 = ClientOptions> = (\n  override?: Config<ClientOptions & T>,\n) => Config<Required<ClientOptions> & T>;\n\nexport interface TDataShape {\n  body?: unknown;\n  headers?: unknown;\n  path?: unknown;\n  query?: unknown;\n  url: string;\n}\n\ntype OmitKeys<T, K> = Pick<T, Exclude<keyof T, K>>;\n\nexport type Options<\n  TData extends TDataShape = TDataShape,\n  ThrowOnError extends boolean = boolean,\n  TResponse = unknown,\n  TResponseStyle extends ResponseStyle = 'fields',\n> = OmitKeys<\n  RequestOptions<TResponse, TResponseStyle, ThrowOnError>,\n  'body' | 'path' | 'query' | 'url'\n> &\n  ([TData] extends [never] ? unknown : Omit<TData, 'url'>);\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-angular/default/client/utils.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport { HttpHeaders } from '@angular/common/http';\n\nimport { getAuthToken } from '../core/auth.gen';\nimport type {\n  QuerySerializer,\n  QuerySerializerOptions,\n} from '../core/bodySerializer.gen';\nimport {\n  serializeArrayParam,\n  serializeObjectParam,\n  serializePrimitiveParam,\n} from '../core/pathSerializer.gen';\nimport type { Client, ClientOptions, Config, RequestOptions } from './types.gen';\n\ninterface PathSerializer {\n  path: Record<string, unknown>;\n  url: string;\n}\n\nconst PATH_PARAM_RE = /\\{[^{}]+\\}/g;\n\ntype ArrayStyle = 'form' | 'spaceDelimited' | 'pipeDelimited';\ntype MatrixStyle = 'label' | 'matrix' | 'simple';\ntype ArraySeparatorStyle = ArrayStyle | MatrixStyle;\n\nconst 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 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 = (\n  contentType: string | null,\n): 'blob' | 'formData' | 'json' | 'stream' | 'text' | undefined => {\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\nexport const setAuthParams = async (\n  options: Pick<Required<RequestOptions>, 'security'> &\n    Pick<RequestOptions, 'auth' | 'query'> & {\n      headers: HttpHeaders;\n    },\n) => {\n  for (const auth of options.security) {\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 = options.headers.append('Cookie', `${name}=${token}`);\n        break;\n      case 'header':\n      default:\n        options.headers = options.headers.set(name, token);\n        break;\n    }\n\n    return;\n  }\n};\n\nexport const buildUrl: Client['buildUrl'] = (options) => {\n  const url = 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  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 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\nexport const mergeHeaders = (\n  ...headers: Array<Required<Config>['headers'] | undefined>\n): HttpHeaders => {\n  let mergedHeaders = new HttpHeaders();\n\n  for (const header of headers) {\n    if (!header || typeof header !== 'object') {\n      continue;\n    }\n\n    if (header instanceof HttpHeaders) {\n      // Merge HttpHeaders instance\n      header.keys().forEach((key) => {\n        const values = header.getAll(key);\n        if (values) {\n          values.forEach((value) => {\n            mergedHeaders = mergedHeaders.append(key, value);\n          });\n        }\n      });\n    } else {\n      // Merge plain object headers\n      for (const [key, value] of Object.entries(header)) {\n        if (value === null) {\n          mergedHeaders = mergedHeaders.delete(key);\n        } else if (Array.isArray(value)) {\n          for (const v of value) {\n            mergedHeaders = 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 = mergedHeaders.set(\n            key,\n            typeof value === 'object' ? JSON.stringify(value) : (value as string),\n          );\n        }\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  headers: defaultHeaders,\n  querySerializer: defaultQuerySerializer,\n  ...override,\n});\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-angular/default/client.gen.ts",
    "content": "// 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: 'http://localhost:3000/base' }));\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-angular/default/core/auth.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-angular/default/core/bodySerializer.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-angular/default/core/params.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-angular/default/core/pathSerializer.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-angular/default/core/queryKeySerializer.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\n/**\n * JSON-friendly union that mirrors what Pinia Colada can hash.\n */\nexport type JsonValue =\n  | null\n  | string\n  | number\n  | boolean\n  | JsonValue[]\n  | { [key: string]: JsonValue };\n\n/**\n * Replacer that converts non-JSON values (bigint, Date, etc.) to safe substitutes.\n */\nexport const queryKeyJsonReplacer = (_key: string, value: unknown) => {\n  if (value === undefined || typeof value === 'function' || typeof value === 'symbol') {\n    return undefined;\n  }\n  if (typeof value === 'bigint') {\n    return value.toString();\n  }\n  if (value instanceof Date) {\n    return value.toISOString();\n  }\n  return value;\n};\n\n/**\n * Safely stringifies a value and parses it back into a JsonValue.\n */\nexport const stringifyToJsonValue = (input: unknown): JsonValue | undefined => {\n  try {\n    const json = JSON.stringify(input, queryKeyJsonReplacer);\n    if (json === undefined) {\n      return undefined;\n    }\n    return JSON.parse(json) as JsonValue;\n  } catch {\n    return undefined;\n  }\n};\n\n/**\n * Detects plain objects (including objects with a null prototype).\n */\nconst isPlainObject = (value: unknown): value is Record<string, unknown> => {\n  if (value === null || typeof value !== 'object') {\n    return false;\n  }\n  const prototype = Object.getPrototypeOf(value as object);\n  return prototype === Object.prototype || prototype === null;\n};\n\n/**\n * Turns URLSearchParams into a sorted JSON object for deterministic keys.\n */\nconst serializeSearchParams = (params: URLSearchParams): JsonValue => {\n  const entries = Array.from(params.entries()).sort(([a], [b]) => a.localeCompare(b));\n  const result: Record<string, JsonValue> = {};\n\n  for (const [key, value] of entries) {\n    const existing = result[key];\n    if (existing === undefined) {\n      result[key] = value;\n      continue;\n    }\n\n    if (Array.isArray(existing)) {\n      (existing as string[]).push(value);\n    } else {\n      result[key] = [existing, value];\n    }\n  }\n\n  return result;\n};\n\n/**\n * Normalizes any accepted value into a JSON-friendly shape for query keys.\n */\nexport const serializeQueryKeyValue = (value: unknown): JsonValue | undefined => {\n  if (value === null) {\n    return null;\n  }\n\n  if (typeof value === 'string' || typeof value === 'number' || typeof value === 'boolean') {\n    return value;\n  }\n\n  if (value === undefined || typeof value === 'function' || typeof value === 'symbol') {\n    return undefined;\n  }\n\n  if (typeof value === 'bigint') {\n    return value.toString();\n  }\n\n  if (value instanceof Date) {\n    return value.toISOString();\n  }\n\n  if (Array.isArray(value)) {\n    return stringifyToJsonValue(value);\n  }\n\n  if (typeof URLSearchParams !== 'undefined' && value instanceof URLSearchParams) {\n    return serializeSearchParams(value);\n  }\n\n  if (isPlainObject(value)) {\n    return stringifyToJsonValue(value);\n  }\n\n  return undefined;\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-angular/default/core/serverSentEvents.gen.ts",
    "content": "// 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 const 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            // Normalize line endings: CRLF -> LF, then CR -> LF\n            buffer = buffer.replace(/\\r\\n/g, '\\n').replace(/\\r/g, '\\n');\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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-angular/default/core/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { Auth, AuthToken } from './auth.gen';\nimport type { BodySerializer, QuerySerializer, QuerySerializerOptions } from './bodySerializer.gen';\n\nexport type HttpMethod =\n  | 'connect'\n  | 'delete'\n  | 'get'\n  | 'head'\n  | 'options'\n  | 'patch'\n  | 'post'\n  | 'put'\n  | 'trace';\n\nexport type Client<\n  RequestFn = never,\n  Config = unknown,\n  MethodFn = never,\n  BuildUrlFn = never,\n  SseFn = never,\n> = {\n  /**\n   * Returns the final request URL.\n   */\n  buildUrl: BuildUrlFn;\n  getConfig: () => Config;\n  request: RequestFn;\n  setConfig: (config: Config) => Config;\n} & {\n  [K in HttpMethod]: MethodFn;\n} & ([SseFn] extends [never] ? { sse?: never } : { sse: { [K in HttpMethod]: SseFn } });\n\nexport interface Config {\n  /**\n   * Auth token or a function returning auth token. The resolved value will be\n   * added to the request payload as defined by its `security` array.\n   */\n  auth?: ((auth: Auth) => Promise<AuthToken> | AuthToken) | AuthToken;\n  /**\n   * A function for serializing request body parameter. By default,\n   * {@link JSON.stringify()} will be used.\n   */\n  bodySerializer?: BodySerializer | null;\n  /**\n   * An object containing any HTTP headers that you want to pre-populate your\n   * `Headers` object with.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/Headers/Headers#init See more}\n   */\n  headers?:\n    | RequestInit['headers']\n    | Record<\n        string,\n        string | number | boolean | (string | number | boolean)[] | null | undefined | unknown\n      >;\n  /**\n   * The request method.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/fetch#method See more}\n   */\n  method?: Uppercase<HttpMethod>;\n  /**\n   * A function for serializing request query parameters. By default, arrays\n   * will be exploded in form style, objects will be exploded in deepObject\n   * style, and reserved characters are percent-encoded.\n   *\n   * This method will have no effect if the native `paramsSerializer()` Axios\n   * API function is used.\n   *\n   * {@link https://swagger.io/docs/specification/serialization/#query View examples}\n   */\n  querySerializer?: QuerySerializer | QuerySerializerOptions;\n  /**\n   * A function validating request data. This is useful if you want to ensure\n   * the request conforms to the desired shape, so it can be safely sent to\n   * the server.\n   */\n  requestValidator?: (data: unknown) => Promise<unknown>;\n  /**\n   * A function transforming response data before it's returned. This is useful\n   * for post-processing data, e.g. converting ISO strings into Date objects.\n   */\n  responseTransformer?: (data: unknown) => Promise<unknown>;\n  /**\n   * A function validating response data. This is useful if you want to ensure\n   * the response conforms to the desired shape, so it can be safely passed to\n   * the transformers and returned to the user.\n   */\n  responseValidator?: (data: unknown) => Promise<unknown>;\n}\n\ntype IsExactlyNeverOrNeverUndefined<T> = [T] extends [never]\n  ? true\n  : [T] extends [never | undefined]\n    ? [undefined] extends [T]\n      ? false\n      : true\n    : false;\n\nexport type OmitNever<T extends Record<string, unknown>> = {\n  [K in keyof T as IsExactlyNeverOrNeverUndefined<T[K]> extends true ? never : K]: T[K];\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-angular/default/core/utils.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-angular/default/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport { apiVVersionODataControllerCount, callToTestOrderOfParams, callWithDefaultOptionalParameters, callWithDefaultParameters, callWithDescriptions, callWithDuplicateResponses, callWithNoContentResponse, callWithParameters, callWithResponse, callWithResponseAndNoContentResponse, callWithResponses, callWithResultFromHeader, callWithWeirdParameterNames, collectionFormat, complexParams, complexTypes, deleteCallWithoutParametersAndResponse, deleteFoo, deprecatedCall, dummyA, dummyB, duplicateName, duplicateName2, duplicateName3, duplicateName4, export_, fileResponse, fooWow, getApiVbyApiVersionSimpleOperation, getCallWithOptionalParam, getCallWithoutParametersAndResponse, headCallWithoutParametersAndResponse, import_, multipartRequest, multipartResponse, nonAsciiæøåÆøÅöôêÊ字符串, type Options, optionsCallWithoutParametersAndResponse, patchApiVbyApiVersionNoTag, patchCallWithoutParametersAndResponse, postApiVbyApiVersionFormData, postApiVbyApiVersionRequestBody, postCallWithOptionalParam, postCallWithoutParametersAndResponse, putCallWithoutParametersAndResponse, putWithFormUrlEncoded, testErrorCode, types, uploadFile } from './sdk.gen';\nexport type { _3eNum1Период, _400, AdditionalPropertiesIntegerIssue, AdditionalPropertiesUnknownIssue, AdditionalPropertiesUnknownIssue2, AdditionalPropertiesUnknownIssue3, AdditionalPropertiesUnknownIssueWritable, AnyOfAnyAndNull, AnyOfArrays, ApiVVersionODataControllerCountData, ApiVVersionODataControllerCountResponse, ApiVVersionODataControllerCountResponses, ArrayWithAnyOfProperties, ArrayWithArray, ArrayWithBooleans, ArrayWithNumbers, ArrayWithProperties, ArrayWithReferences, ArrayWithStrings, CallToTestOrderOfParamsData, CallWithDefaultOptionalParametersData, CallWithDefaultParametersData, CallWithDescriptionsData, CallWithDuplicateResponsesData, CallWithDuplicateResponsesError, CallWithDuplicateResponsesErrors, CallWithDuplicateResponsesResponse, CallWithDuplicateResponsesResponses, CallWithNoContentResponseData, CallWithNoContentResponseResponse, CallWithNoContentResponseResponses, CallWithParametersData, CallWithResponseAndNoContentResponseData, CallWithResponseAndNoContentResponseResponse, CallWithResponseAndNoContentResponseResponses, CallWithResponseData, CallWithResponseResponse, CallWithResponseResponses, CallWithResponsesData, CallWithResponsesError, CallWithResponsesErrors, CallWithResponsesResponse, CallWithResponsesResponses, CallWithResultFromHeaderData, CallWithResultFromHeaderErrors, CallWithResultFromHeaderResponses, CallWithWeirdParameterNamesData, CamelCaseCommentWithBreaks, CharactersInDescription, ClientOptions, CollectionFormatData, CommentWithBackticks, CommentWithBackticksAndQuotes, CommentWithBreaks, CommentWithExpressionPlaceholders, CommentWithQuotes, CommentWithReservedCharacters, CommentWithSlashes, ComplexParamsData, ComplexParamsResponse, ComplexParamsResponses, ComplexTypesData, ComplexTypesErrors, ComplexTypesResponse, ComplexTypesResponses, CompositionBaseModel, CompositionExtendedModel, CompositionWithAllOfAndNullable, CompositionWithAnyOf, CompositionWithAnyOfAndNullable, CompositionWithAnyOfAnonymous, CompositionWithNestedAnyAndTypeNull, CompositionWithNestedAnyOfAndNull, CompositionWithOneOf, CompositionWithOneOfAndComplexArrayDictionary, CompositionWithOneOfAndNullable, CompositionWithOneOfAndProperties, CompositionWithOneOfAndSimpleArrayDictionary, CompositionWithOneOfAndSimpleDictionary, CompositionWithOneOfAnonymous, CompositionWithOneOfDiscriminator, ConstValue, Default, DeleteCallWithoutParametersAndResponseData, DeleteFooData, DeleteFooData2, DeleteFooData3, DeprecatedCallData, DeprecatedModel, DictionaryWithArray, DictionaryWithDictionary, DictionaryWithProperties, DictionaryWithPropertiesAndAdditionalProperties, DictionaryWithReference, DictionaryWithString, DummyAData, DummyAResponse, DummyAResponses, DummyBData, DummyBResponse, DummyBResponses, DuplicateName2Data, DuplicateName3Data, DuplicateName4Data, DuplicateNameData, EnumFromDescription, EnumWithExtensions, EnumWithNumbers, EnumWithReplacedCharacters, EnumWithStrings, EnumWithXEnumNames, ExportData, ExternalRefA, ExternalRefB, ExternalSharedModel, File, FileResponseData, FileResponseResponse, FileResponseResponses, FileWritable, FooWowData, FooWowResponses, FreeFormObjectWithAdditionalPropertiesEqEmptyObject, FreeFormObjectWithAdditionalPropertiesEqTrue, FreeFormObjectWithoutAdditionalProperties, GenericSchemaDuplicateIssue1SystemBoolean, GenericSchemaDuplicateIssue1SystemBooleanWritable, GenericSchemaDuplicateIssue1SystemString, GenericSchemaDuplicateIssue1SystemStringWritable, GetApiVbyApiVersionSimpleOperationData, GetApiVbyApiVersionSimpleOperationError, GetApiVbyApiVersionSimpleOperationErrors, GetApiVbyApiVersionSimpleOperationResponse, GetApiVbyApiVersionSimpleOperationResponses, GetCallWithOptionalParamData, GetCallWithoutParametersAndResponseData, HeadCallWithoutParametersAndResponseData, Import, ImportData, ImportResponse, ImportResponses, IoK8sApimachineryPkgApisMetaV1DeleteOptions, IoK8sApimachineryPkgApisMetaV1Preconditions, ModelCircle, ModelFromZendesk, ModelSquare, ModelThatExtends, ModelThatExtendsExtends, ModelWithAdditionalPropertiesEqTrue, ModelWithAdditionalPropertiesRef, ModelWithAnyOfConstantSizeArray, ModelWithAnyOfConstantSizeArrayAndIntersect, ModelWithAnyOfConstantSizeArrayNullable, ModelWithAnyOfConstantSizeArrayWithNSizeAndOptions, ModelWithAnyOfConstantSizeArrayWithNSizeAndOptionsWritable, ModelWithArray, ModelWithArrayReadOnlyAndWriteOnly, ModelWithArrayReadOnlyAndWriteOnlyWritable, ModelWithBackticksInDescription, ModelWithBoolean, ModelWithCircularReference, ModelWithConst, ModelWithConstantSizeArray, ModelWithDictionary, ModelWithDuplicateImports, ModelWithDuplicateProperties, ModelWithEnum, ModelWithEnumFromDescription, ModelWithEnumWithHyphen, ModelWithInteger, ModelWithNestedArrayEnums, ModelWithNestedArrayEnumsData, ModelWithNestedArrayEnumsDataBar, ModelWithNestedArrayEnumsDataFoo, ModelWithNestedCompositionEnums, ModelWithNestedEnums, ModelWithNestedProperties, ModelWithNullableObject, ModelWithNullableString, ModelWithNumericEnumUnion, ModelWithOneOfAndProperties, ModelWithOneOfEnum, ModelWithOrderedProperties, ModelWithPattern, ModelWithPatternWritable, ModelWithPrefixItemsConstantSizeArray, ModelWithProperties, ModelWithPropertiesWritable, ModelWithReadOnlyAndWriteOnly, ModelWithReadOnlyAndWriteOnlyWritable, ModelWithReference, ModelWithReferenceWritable, ModelWithString, ModelWithStringError, MultipartRequestData, MultipartResponseData, MultipartResponseResponse, MultipartResponseResponses, NestedAnyOfArraysNullable, NonAsciiæøåÆøÅöôêÊ字符串Data, NonAsciiæøåÆøÅöôêÊ字符串Response, NonAsciiæøåÆøÅöôêÊ字符串Responses, NonAsciiStringæøåÆøÅöôêÊ字符串, NullableObject, OneOfAllOfIssue, OneOfAllOfIssueWritable, OptionsCallWithoutParametersAndResponseData, Pageable, ParameterSimpleParameterUnused, PatchApiVbyApiVersionNoTagData, PatchApiVbyApiVersionNoTagResponses, PatchCallWithoutParametersAndResponseData, PostApiVbyApiVersionFormDataData, PostApiVbyApiVersionRequestBodyData, PostCallWithOptionalParamData, PostCallWithOptionalParamResponse, PostCallWithOptionalParamResponses, PostCallWithoutParametersAndResponseData, PostServiceWithEmptyTagResponse, PostServiceWithEmptyTagResponse2, PutCallWithoutParametersAndResponseData, PutWithFormUrlEncodedData, SchemaWithFormRestrictedKeys, SimpleBoolean, SimpleFile, SimpleFormData, SimpleInteger, SimpleParameter, SimpleReference, SimpleRequestBody, SimpleString, SimpleStringWithPattern, TestErrorCodeData, TestErrorCodeErrors, TestErrorCodeResponses, TypesData, TypesResponse, TypesResponses, UploadFileData, UploadFileResponse, UploadFileResponses, XFooBar } from './types.gen';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-angular/default/sdk.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport { type Client, formDataBodySerializer, type Options as Options2, type TDataShape, urlSearchParamsBodySerializer } from './client';\nimport { client } from './client.gen';\nimport type { ApiVVersionODataControllerCountData, ApiVVersionODataControllerCountResponses, CallToTestOrderOfParamsData, CallWithDefaultOptionalParametersData, CallWithDefaultParametersData, CallWithDescriptionsData, CallWithDuplicateResponsesData, CallWithDuplicateResponsesErrors, CallWithDuplicateResponsesResponses, CallWithNoContentResponseData, CallWithNoContentResponseResponses, CallWithParametersData, CallWithResponseAndNoContentResponseData, CallWithResponseAndNoContentResponseResponses, CallWithResponseData, CallWithResponseResponses, CallWithResponsesData, CallWithResponsesErrors, CallWithResponsesResponses, CallWithResultFromHeaderData, CallWithResultFromHeaderErrors, CallWithResultFromHeaderResponses, CallWithWeirdParameterNamesData, CollectionFormatData, ComplexParamsData, ComplexParamsResponses, ComplexTypesData, ComplexTypesErrors, ComplexTypesResponses, DeleteCallWithoutParametersAndResponseData, DeleteFooData3, DeprecatedCallData, DummyAData, DummyAResponses, DummyBData, DummyBResponses, DuplicateName2Data, DuplicateName3Data, DuplicateName4Data, DuplicateNameData, ExportData, FileResponseData, FileResponseResponses, FooWowData, FooWowResponses, GetApiVbyApiVersionSimpleOperationData, GetApiVbyApiVersionSimpleOperationErrors, GetApiVbyApiVersionSimpleOperationResponses, GetCallWithOptionalParamData, GetCallWithoutParametersAndResponseData, HeadCallWithoutParametersAndResponseData, ImportData, ImportResponses, MultipartRequestData, MultipartResponseData, MultipartResponseResponses, NonAsciiæøåÆøÅöôêÊ字符串Data, NonAsciiæøåÆøÅöôêÊ字符串Responses, OptionsCallWithoutParametersAndResponseData, PatchApiVbyApiVersionNoTagData, PatchApiVbyApiVersionNoTagResponses, PatchCallWithoutParametersAndResponseData, PostApiVbyApiVersionFormDataData, PostApiVbyApiVersionRequestBodyData, PostCallWithOptionalParamData, PostCallWithOptionalParamResponses, PostCallWithoutParametersAndResponseData, PutCallWithoutParametersAndResponseData, PutWithFormUrlEncodedData, TestErrorCodeData, TestErrorCodeErrors, TestErrorCodeResponses, TypesData, TypesResponses, UploadFileData, UploadFileResponses } from './types.gen';\n\nexport type Options<TData extends TDataShape = TDataShape, ThrowOnError extends boolean = boolean> = Options2<TData, ThrowOnError> & {\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\nexport const export_ = <ThrowOnError extends boolean = false>(options?: Options<ExportData, ThrowOnError>) => (options?.client ?? client).get<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/no+tag', ...options });\n\nexport const patchApiVbyApiVersionNoTag = <ThrowOnError extends boolean = false>(options?: Options<PatchApiVbyApiVersionNoTagData, ThrowOnError>) => (options?.client ?? client).patch<PatchApiVbyApiVersionNoTagResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/no+tag', ...options });\n\nexport const import_ = <ThrowOnError extends boolean = false>(options: Options<ImportData, ThrowOnError>) => (options.client ?? client).post<ImportResponses, unknown, ThrowOnError>({\n    url: '/api/v{api-version}/no+tag',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options.headers\n    }\n});\n\nexport const fooWow = <ThrowOnError extends boolean = false>(options?: Options<FooWowData, ThrowOnError>) => (options?.client ?? client).put<FooWowResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/no+tag', ...options });\n\nexport const apiVVersionODataControllerCount = <ThrowOnError extends boolean = false>(options?: Options<ApiVVersionODataControllerCountData, ThrowOnError>) => (options?.client ?? client).get<ApiVVersionODataControllerCountResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple/$count', ...options });\n\nexport const getApiVbyApiVersionSimpleOperation = <ThrowOnError extends boolean = false>(options: Options<GetApiVbyApiVersionSimpleOperationData, ThrowOnError>) => (options.client ?? client).get<GetApiVbyApiVersionSimpleOperationResponses, GetApiVbyApiVersionSimpleOperationErrors, ThrowOnError>({ url: '/api/v{api-version}/simple:operation', ...options });\n\nexport const deleteCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<DeleteCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).delete<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const getCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<GetCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).get<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const headCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<HeadCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).head<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const optionsCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<OptionsCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).options<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const patchCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<PatchCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).patch<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const postCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<PostCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).post<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const putCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<PutCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).put<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const deleteFoo = <ThrowOnError extends boolean = false>(options: Options<DeleteFooData3, ThrowOnError>) => (options.client ?? client).delete<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/foo/{foo_param}/bar/{BarParam}', ...options });\n\nexport const callWithDescriptions = <ThrowOnError extends boolean = false>(options?: Options<CallWithDescriptionsData, ThrowOnError>) => (options?.client ?? client).post<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/descriptions', ...options });\n\n/**\n * @deprecated\n */\nexport const deprecatedCall = <ThrowOnError extends boolean = false>(options: Options<DeprecatedCallData, ThrowOnError>) => (options.client ?? client).post<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/parameters/deprecated', ...options });\n\nexport const callWithParameters = <ThrowOnError extends boolean = false>(options: Options<CallWithParametersData, ThrowOnError>) => (options.client ?? client).post<unknown, unknown, ThrowOnError>({\n    url: '/api/v{api-version}/parameters/{parameterPath}',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options.headers\n    }\n});\n\nexport const callWithWeirdParameterNames = <ThrowOnError extends boolean = false>(options: Options<CallWithWeirdParameterNamesData, ThrowOnError>) => (options.client ?? client).post<unknown, unknown, ThrowOnError>({\n    url: '/api/v{api-version}/parameters/{parameter.path.1}/{parameter-path-2}/{PARAMETER-PATH-3}',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options.headers\n    }\n});\n\nexport const getCallWithOptionalParam = <ThrowOnError extends boolean = false>(options: Options<GetCallWithOptionalParamData, ThrowOnError>) => (options.client ?? client).get<unknown, unknown, ThrowOnError>({\n    url: '/api/v{api-version}/parameters',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options.headers\n    }\n});\n\nexport const postCallWithOptionalParam = <ThrowOnError extends boolean = false>(options: Options<PostCallWithOptionalParamData, ThrowOnError>) => (options.client ?? client).post<PostCallWithOptionalParamResponses, unknown, ThrowOnError>({\n    url: '/api/v{api-version}/parameters',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options.headers\n    }\n});\n\nexport const postApiVbyApiVersionRequestBody = <ThrowOnError extends boolean = false>(options?: Options<PostApiVbyApiVersionRequestBodyData, ThrowOnError>) => (options?.client ?? client).post<unknown, unknown, ThrowOnError>({\n    url: '/api/v{api-version}/requestBody',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options?.headers\n    }\n});\n\nexport const postApiVbyApiVersionFormData = <ThrowOnError extends boolean = false>(options?: Options<PostApiVbyApiVersionFormDataData, ThrowOnError>) => (options?.client ?? client).post<unknown, unknown, ThrowOnError>({\n    ...formDataBodySerializer,\n    url: '/api/v{api-version}/formData',\n    ...options,\n    headers: {\n        'Content-Type': null,\n        ...options?.headers\n    }\n});\n\nexport const callWithDefaultParameters = <ThrowOnError extends boolean = false>(options?: Options<CallWithDefaultParametersData, ThrowOnError>) => (options?.client ?? client).get<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/defaults', ...options });\n\nexport const callWithDefaultOptionalParameters = <ThrowOnError extends boolean = false>(options?: Options<CallWithDefaultOptionalParametersData, ThrowOnError>) => (options?.client ?? client).post<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/defaults', ...options });\n\nexport const callToTestOrderOfParams = <ThrowOnError extends boolean = false>(options: Options<CallToTestOrderOfParamsData, ThrowOnError>) => (options.client ?? client).put<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/defaults', ...options });\n\nexport const duplicateName = <ThrowOnError extends boolean = false>(options?: Options<DuplicateNameData, ThrowOnError>) => (options?.client ?? client).delete<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/duplicate', ...options });\n\nexport const duplicateName2 = <ThrowOnError extends boolean = false>(options?: Options<DuplicateName2Data, ThrowOnError>) => (options?.client ?? client).get<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/duplicate', ...options });\n\nexport const duplicateName3 = <ThrowOnError extends boolean = false>(options?: Options<DuplicateName3Data, ThrowOnError>) => (options?.client ?? client).post<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/duplicate', ...options });\n\nexport const duplicateName4 = <ThrowOnError extends boolean = false>(options?: Options<DuplicateName4Data, ThrowOnError>) => (options?.client ?? client).put<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/duplicate', ...options });\n\nexport const callWithNoContentResponse = <ThrowOnError extends boolean = false>(options?: Options<CallWithNoContentResponseData, ThrowOnError>) => (options?.client ?? client).get<CallWithNoContentResponseResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/no-content', ...options });\n\nexport const callWithResponseAndNoContentResponse = <ThrowOnError extends boolean = false>(options?: Options<CallWithResponseAndNoContentResponseData, ThrowOnError>) => (options?.client ?? client).get<CallWithResponseAndNoContentResponseResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/multiple-tags/response-and-no-content', ...options });\n\nexport const dummyA = <ThrowOnError extends boolean = false>(options?: Options<DummyAData, ThrowOnError>) => (options?.client ?? client).get<DummyAResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/multiple-tags/a', ...options });\n\nexport const dummyB = <ThrowOnError extends boolean = false>(options?: Options<DummyBData, ThrowOnError>) => (options?.client ?? client).get<DummyBResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/multiple-tags/b', ...options });\n\nexport const callWithResponse = <ThrowOnError extends boolean = false>(options?: Options<CallWithResponseData, ThrowOnError>) => (options?.client ?? client).get<CallWithResponseResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/response', ...options });\n\nexport const callWithDuplicateResponses = <ThrowOnError extends boolean = false>(options?: Options<CallWithDuplicateResponsesData, ThrowOnError>) => (options?.client ?? client).post<CallWithDuplicateResponsesResponses, CallWithDuplicateResponsesErrors, ThrowOnError>({ url: '/api/v{api-version}/response', ...options });\n\nexport const callWithResponses = <ThrowOnError extends boolean = false>(options?: Options<CallWithResponsesData, ThrowOnError>) => (options?.client ?? client).put<CallWithResponsesResponses, CallWithResponsesErrors, ThrowOnError>({ url: '/api/v{api-version}/response', ...options });\n\nexport const collectionFormat = <ThrowOnError extends boolean = false>(options: Options<CollectionFormatData, ThrowOnError>) => (options.client ?? client).get<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/collectionFormat', ...options });\n\nexport const types = <ThrowOnError extends boolean = false>(options: Options<TypesData, ThrowOnError>) => (options.client ?? client).get<TypesResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/types', ...options });\n\nexport const uploadFile = <ThrowOnError extends boolean = false>(options: Options<UploadFileData, ThrowOnError>) => (options.client ?? client).post<UploadFileResponses, unknown, ThrowOnError>({\n    ...urlSearchParamsBodySerializer,\n    url: '/api/v{api-version}/upload',\n    ...options,\n    headers: {\n        'Content-Type': 'application/x-www-form-urlencoded',\n        ...options.headers\n    }\n});\n\nexport const fileResponse = <ThrowOnError extends boolean = false>(options: Options<FileResponseData, ThrowOnError>) => (options.client ?? client).get<FileResponseResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/file/{id}', ...options });\n\nexport const complexTypes = <ThrowOnError extends boolean = false>(options: Options<ComplexTypesData, ThrowOnError>) => (options.client ?? client).get<ComplexTypesResponses, ComplexTypesErrors, ThrowOnError>({\n    querySerializer: { parameters: { parameterObject: { object: { style: 'form' } } } },\n    url: '/api/v{api-version}/complex',\n    ...options\n});\n\nexport const multipartResponse = <ThrowOnError extends boolean = false>(options?: Options<MultipartResponseData, ThrowOnError>) => (options?.client ?? client).get<MultipartResponseResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/multipart', ...options });\n\nexport const multipartRequest = <ThrowOnError extends boolean = false>(options?: Options<MultipartRequestData, ThrowOnError>) => (options?.client ?? client).post<unknown, unknown, ThrowOnError>({\n    ...formDataBodySerializer,\n    url: '/api/v{api-version}/multipart',\n    ...options,\n    headers: {\n        'Content-Type': null,\n        ...options?.headers\n    }\n});\n\nexport const complexParams = <ThrowOnError extends boolean = false>(options: Options<ComplexParamsData, ThrowOnError>) => (options.client ?? client).put<ComplexParamsResponses, unknown, ThrowOnError>({\n    url: '/api/v{api-version}/complex/{id}',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json-patch+json',\n        ...options.headers\n    }\n});\n\nexport const callWithResultFromHeader = <ThrowOnError extends boolean = false>(options?: Options<CallWithResultFromHeaderData, ThrowOnError>) => (options?.client ?? client).post<CallWithResultFromHeaderResponses, CallWithResultFromHeaderErrors, ThrowOnError>({ url: '/api/v{api-version}/header', ...options });\n\nexport const testErrorCode = <ThrowOnError extends boolean = false>(options: Options<TestErrorCodeData, ThrowOnError>) => (options.client ?? client).post<TestErrorCodeResponses, TestErrorCodeErrors, ThrowOnError>({ url: '/api/v{api-version}/error', ...options });\n\nexport const nonAsciiæøåÆøÅöôêÊ字符串 = <ThrowOnError extends boolean = false>(options: Options<NonAsciiæøåÆøÅöôêÊ字符串Data, ThrowOnError>) => (options.client ?? client).post<NonAsciiæøåÆøÅöôêÊ字符串Responses, unknown, ThrowOnError>({ url: '/api/v{api-version}/non-ascii-æøåÆØÅöôêÊ字符串', ...options });\n\n/**\n * Login User\n */\nexport const putWithFormUrlEncoded = <ThrowOnError extends boolean = false>(options: Options<PutWithFormUrlEncodedData, ThrowOnError>) => (options.client ?? client).put<unknown, unknown, ThrowOnError>({\n    ...urlSearchParamsBodySerializer,\n    url: '/api/v{api-version}/non-ascii-æøåÆØÅöôêÊ字符串',\n    ...options,\n    headers: {\n        'Content-Type': 'application/x-www-form-urlencoded',\n        ...options.headers\n    }\n});\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-angular/default/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type ClientOptions = {\n    baseUrl: 'http://localhost:3000/base' | (string & {});\n};\n\n/**\n * Model with number-only name\n */\nexport type _400 = string;\n\n/**\n * External ref to shared model (A)\n */\nexport type ExternalRefA = ExternalSharedModel;\n\n/**\n * External ref to shared model (B)\n */\nexport type ExternalRefB = ExternalSharedModel;\n\n/**\n * Testing multiline comments in string: First line\n * Second line\n *\n * Fourth line\n */\nexport type CamelCaseCommentWithBreaks = number;\n\n/**\n * Testing multiline comments in string: First line\n * Second line\n *\n * Fourth line\n */\nexport type CommentWithBreaks = number;\n\n/**\n * Testing backticks in string: `backticks` and ```multiple backticks``` should work\n */\nexport type CommentWithBackticks = number;\n\n/**\n * Testing backticks and quotes in string: `backticks`, 'quotes', \"double quotes\" and ```multiple backticks``` should work\n */\nexport type CommentWithBackticksAndQuotes = number;\n\n/**\n * Testing slashes in string: \\backwards\\\\\\ and /forwards/// should work\n */\nexport type CommentWithSlashes = number;\n\n/**\n * Testing expression placeholders in string: ${expression} should work\n */\nexport type CommentWithExpressionPlaceholders = number;\n\n/**\n * Testing quotes in string: 'single quote''' and \"double quotes\"\"\" should work\n */\nexport type CommentWithQuotes = number;\n\n/**\n * Testing reserved characters in string: * inline * and ** inline ** should work\n */\nexport type CommentWithReservedCharacters = number;\n\n/**\n * This is a simple number\n */\nexport type SimpleInteger = number;\n\n/**\n * This is a simple boolean\n */\nexport type SimpleBoolean = boolean;\n\n/**\n * This is a simple string\n */\nexport type SimpleString = string;\n\n/**\n * A string with non-ascii (unicode) characters valid in typescript identifiers (æøåÆØÅöÔèÈ字符串)\n */\nexport type NonAsciiStringæøåÆøÅöôêÊ字符串 = string;\n\n/**\n * This is a simple file\n */\nexport type SimpleFile = Blob | File;\n\n/**\n * This is a simple reference\n */\nexport type SimpleReference = ModelWithString;\n\n/**\n * This is a simple string\n */\nexport type SimpleStringWithPattern = string | null;\n\n/**\n * This is a simple enum with strings\n */\nexport type EnumWithStrings = 'Success' | 'Warning' | 'Error' | '\\'Single Quote\\'' | '\"Double Quotes\"' | 'Non-ascii: øæåôöØÆÅÔÖ字符串';\n\nexport type EnumWithReplacedCharacters = '\\'Single Quote\\'' | '\"Double Quotes\"' | 'øæåôöØÆÅÔÖ字符串' | 3.1 | '';\n\n/**\n * This is a simple enum with numbers\n */\nexport type EnumWithNumbers = 1 | 2 | 3 | 1.1 | 1.2 | 1.3 | 100 | 200 | 300 | -100 | -200 | -300 | -1.1 | -1.2 | -1.3;\n\n/**\n * Success=1,Warning=2,Error=3\n */\nexport type EnumFromDescription = number;\n\n/**\n * This is a simple enum with numbers\n */\nexport type EnumWithExtensions = 200 | 400 | 500;\n\nexport type EnumWithXEnumNames = 0 | 1 | 2;\n\n/**\n * This is a simple array with numbers\n */\nexport type ArrayWithNumbers = Array<number>;\n\n/**\n * This is a simple array with booleans\n */\nexport type ArrayWithBooleans = Array<boolean>;\n\n/**\n * This is a simple array with strings\n */\nexport type ArrayWithStrings = Array<string>;\n\n/**\n * This is a simple array with references\n */\nexport type ArrayWithReferences = Array<ModelWithString>;\n\n/**\n * This is a simple array containing an array\n */\nexport type ArrayWithArray = Array<Array<ModelWithString>>;\n\n/**\n * This is a simple array with properties\n */\nexport type ArrayWithProperties = Array<{\n    '16x16'?: CamelCaseCommentWithBreaks;\n    bar?: string;\n}>;\n\n/**\n * This is a simple array with any of properties\n */\nexport type ArrayWithAnyOfProperties = Array<{\n    foo?: string;\n} | {\n    bar?: string;\n}>;\n\nexport type AnyOfAnyAndNull = {\n    data?: unknown | null;\n};\n\n/**\n * This is a simple array with any of properties\n */\nexport type AnyOfArrays = {\n    results?: Array<{\n        foo?: string;\n    } | {\n        bar?: string;\n    }>;\n};\n\n/**\n * This is a string dictionary\n */\nexport type DictionaryWithString = {\n    [key: string]: string;\n};\n\nexport type DictionaryWithPropertiesAndAdditionalProperties = {\n    foo?: number;\n    bar?: boolean;\n    [key: string]: string | number | boolean | undefined;\n};\n\n/**\n * This is a string reference\n */\nexport type DictionaryWithReference = {\n    [key: string]: ModelWithString;\n};\n\n/**\n * This is a complex dictionary\n */\nexport type DictionaryWithArray = {\n    [key: string]: Array<ModelWithString>;\n};\n\n/**\n * This is a string dictionary\n */\nexport type DictionaryWithDictionary = {\n    [key: string]: {\n        [key: string]: string;\n    };\n};\n\n/**\n * This is a complex dictionary\n */\nexport type DictionaryWithProperties = {\n    [key: string]: {\n        foo?: string;\n        bar?: string;\n    };\n};\n\n/**\n * This is a model with one number property\n */\nexport type ModelWithInteger = {\n    /**\n     * This is a simple number property\n     */\n    prop?: number;\n};\n\n/**\n * This is a model with one boolean property\n */\nexport type ModelWithBoolean = {\n    /**\n     * This is a simple boolean property\n     */\n    prop?: boolean;\n};\n\n/**\n * This is a model with one string property\n */\nexport type ModelWithString = {\n    /**\n     * This is a simple string property\n     */\n    prop?: string;\n};\n\n/**\n * This is a model with one string property\n */\nexport type ModelWithStringError = {\n    /**\n     * This is a simple string property\n     */\n    prop?: string;\n};\n\n/**\n * `Comment` or `VoiceComment`. The JSON object for adding voice comments to tickets is different. See [Adding voice comments to tickets](/documentation/ticketing/managing-tickets/adding-voice-comments-to-tickets)\n */\nexport type ModelFromZendesk = string;\n\n/**\n * This is a model with one string property\n */\nexport type ModelWithNullableString = {\n    /**\n     * This is a simple string property\n     */\n    nullableProp1?: string | null;\n    /**\n     * This is a simple string property\n     */\n    nullableRequiredProp1: string | null;\n    /**\n     * This is a simple string property\n     */\n    nullableProp2?: string | null;\n    /**\n     * This is a simple string property\n     */\n    nullableRequiredProp2: string | null;\n    /**\n     * This is a simple enum with strings\n     */\n    'foo_bar-enum'?: 'Success' | 'Warning' | 'Error' | 'ØÆÅ字符串';\n};\n\n/**\n * This is a model with one enum\n */\nexport type ModelWithEnum = {\n    /**\n     * This is a simple enum with strings\n     */\n    'foo_bar-enum'?: 'Success' | 'Warning' | 'Error' | 'ØÆÅ字符串';\n    /**\n     * These are the HTTP error code enums\n     */\n    statusCode?: '100' | '200 FOO' | '300 FOO_BAR' | '400 foo-bar' | '500 foo.bar' | '600 foo&bar';\n    /**\n     * Simple boolean enum\n     */\n    bool?: true;\n};\n\n/**\n * This is a model with one enum with escaped name\n */\nexport type ModelWithEnumWithHyphen = {\n    /**\n     * Foo-Bar-Baz-Qux\n     */\n    'foo-bar-baz-qux'?: '3.0';\n};\n\n/**\n * This is a model with one enum\n */\nexport type ModelWithEnumFromDescription = {\n    /**\n     * Success=1,Warning=2,Error=3\n     */\n    test?: number;\n};\n\n/**\n * This is a model with nested enums\n */\nexport type ModelWithNestedEnums = {\n    dictionaryWithEnum?: {\n        [key: string]: 'Success' | 'Warning' | 'Error';\n    };\n    dictionaryWithEnumFromDescription?: {\n        [key: string]: number;\n    };\n    arrayWithEnum?: Array<'Success' | 'Warning' | 'Error'>;\n    arrayWithDescription?: Array<number>;\n    /**\n     * This is a simple enum with strings\n     */\n    'foo_bar-enum'?: 'Success' | 'Warning' | 'Error' | 'ØÆÅ字符串';\n};\n\n/**\n * This is a model with one property containing a reference\n */\nexport type ModelWithReference = {\n    prop?: ModelWithProperties;\n};\n\n/**\n * This is a model with one property containing an array\n */\nexport type ModelWithArrayReadOnlyAndWriteOnly = {\n    prop?: Array<ModelWithReadOnlyAndWriteOnly>;\n    propWithFile?: Array<Blob | File>;\n    propWithNumber?: Array<number>;\n};\n\n/**\n * This is a model with one property containing an array\n */\nexport type ModelWithArray = {\n    prop?: Array<ModelWithString>;\n    propWithFile?: Array<Blob | File>;\n    propWithNumber?: Array<number>;\n};\n\n/**\n * This is a model with one property containing a dictionary\n */\nexport type ModelWithDictionary = {\n    prop?: {\n        [key: string]: string;\n    };\n};\n\n/**\n * This is a deprecated model with a deprecated property\n *\n * @deprecated\n */\nexport type DeprecatedModel = {\n    /**\n     * This is a deprecated property\n     *\n     * @deprecated\n     */\n    prop?: string;\n};\n\n/**\n * This is a model with one property containing a circular reference\n */\nexport type ModelWithCircularReference = {\n    prop?: ModelWithCircularReference;\n};\n\n/**\n * This is a model with one property with a 'one of' relationship\n */\nexport type CompositionWithOneOf = {\n    propA?: ModelWithString | ModelWithEnum | ModelWithArray | ModelWithDictionary;\n};\n\n/**\n * This is a model with one property with a 'one of' relationship where the options are not $ref\n */\nexport type CompositionWithOneOfAnonymous = {\n    propA?: {\n        propA?: string;\n    } | string | number;\n};\n\n/**\n * Circle\n */\nexport type ModelCircle = {\n    kind: string;\n    radius?: number;\n};\n\n/**\n * Square\n */\nexport type ModelSquare = {\n    kind: string;\n    sideLength?: number;\n};\n\n/**\n * This is a model with one property with a 'one of' relationship where the options are not $ref\n */\nexport type CompositionWithOneOfDiscriminator = ({\n    kind: 'circle';\n} & ModelCircle) | ({\n    kind: 'square';\n} & ModelSquare);\n\n/**\n * This is a model with one property with a 'any of' relationship\n */\nexport type CompositionWithAnyOf = {\n    propA?: ModelWithString | ModelWithEnum | ModelWithArray | ModelWithDictionary;\n};\n\n/**\n * This is a model with one property with a 'any of' relationship where the options are not $ref\n */\nexport type CompositionWithAnyOfAnonymous = {\n    propA?: {\n        propA?: string;\n    } | string | number;\n};\n\n/**\n * This is a model with nested 'any of' property with a type null\n */\nexport type CompositionWithNestedAnyAndTypeNull = {\n    propA?: Array<ModelWithDictionary | null> | Array<ModelWithArray | null>;\n};\n\nexport type _3eNum1Период = 'Bird' | 'Dog';\n\nexport type ConstValue = 'ConstValue';\n\n/**\n * This is a model with one property with a 'any of' relationship where the options are not $ref\n */\nexport type CompositionWithNestedAnyOfAndNull = {\n    /**\n     * Scopes\n     */\n    propA?: Array<_3eNum1Период | ConstValue> | null;\n};\n\n/**\n * This is a model with one property with a 'one of' relationship\n */\nexport type CompositionWithOneOfAndNullable = {\n    propA?: {\n        boolean?: boolean;\n    } | ModelWithEnum | ModelWithArray | ModelWithDictionary | null;\n};\n\n/**\n * This is a model that contains a simple dictionary within composition\n */\nexport type CompositionWithOneOfAndSimpleDictionary = {\n    propA?: boolean | {\n        [key: string]: number;\n    };\n};\n\n/**\n * This is a model that contains a dictionary of simple arrays within composition\n */\nexport type CompositionWithOneOfAndSimpleArrayDictionary = {\n    propA?: boolean | {\n        [key: string]: Array<boolean>;\n    };\n};\n\n/**\n * This is a model that contains a dictionary of complex arrays (composited) within composition\n */\nexport type CompositionWithOneOfAndComplexArrayDictionary = {\n    propA?: boolean | {\n        [key: string]: Array<number | string>;\n    };\n};\n\n/**\n * This is a model with one property with a 'all of' relationship\n */\nexport type CompositionWithAllOfAndNullable = {\n    propA?: ({\n        boolean?: boolean;\n    } & ModelWithEnum & ModelWithArray & ModelWithDictionary) | null;\n};\n\n/**\n * This is a model with one property with a 'any of' relationship\n */\nexport type CompositionWithAnyOfAndNullable = {\n    propA?: {\n        boolean?: boolean;\n    } | ModelWithEnum | ModelWithArray | ModelWithDictionary | null;\n};\n\n/**\n * This is a base model with two simple optional properties\n */\nexport type CompositionBaseModel = {\n    firstName?: string;\n    lastname?: string;\n};\n\n/**\n * This is a model that extends the base model\n */\nexport type CompositionExtendedModel = CompositionBaseModel & {\n    age: number;\n    firstName: string;\n    lastname: string;\n};\n\n/**\n * This is a model with one nested property\n */\nexport type ModelWithProperties = {\n    required: string;\n    readonly requiredAndReadOnly: string;\n    requiredAndNullable: string | null;\n    string?: string;\n    number?: number;\n    boolean?: boolean;\n    reference?: ModelWithString;\n    'property with space'?: string;\n    default?: string;\n    try?: string;\n    readonly '@namespace.string'?: string;\n    readonly '@namespace.integer'?: number;\n};\n\n/**\n * This is a model with one nested property\n */\nexport type ModelWithNestedProperties = {\n    readonly first: {\n        readonly second: {\n            readonly third: string | null;\n        } | null;\n    } | null;\n};\n\n/**\n * This is a model with duplicated properties\n */\nexport type ModelWithDuplicateProperties = {\n    prop?: ModelWithString;\n};\n\n/**\n * This is a model with ordered properties\n */\nexport type ModelWithOrderedProperties = {\n    zebra?: string;\n    apple?: string;\n    hawaii?: string;\n};\n\n/**\n * This is a model with duplicated imports\n */\nexport type ModelWithDuplicateImports = {\n    propA?: ModelWithString;\n    propB?: ModelWithString;\n    propC?: ModelWithString;\n};\n\n/**\n * This is a model that extends another model\n */\nexport type ModelThatExtends = ModelWithString & {\n    propExtendsA?: string;\n    propExtendsB?: ModelWithString;\n};\n\n/**\n * This is a model that extends another model\n */\nexport type ModelThatExtendsExtends = ModelWithString & ModelThatExtends & {\n    propExtendsC?: string;\n    propExtendsD?: ModelWithString;\n};\n\n/**\n * This is a model that contains a some patterns\n */\nexport type ModelWithPattern = {\n    key: string;\n    name: string;\n    readonly enabled?: boolean;\n    readonly modified?: string;\n    id?: string;\n    text?: string;\n    patternWithSingleQuotes?: string;\n    patternWithNewline?: string;\n    patternWithBacktick?: string;\n    patternWithUnicode?: string;\n};\n\nexport type File = {\n    /**\n     * Id\n     */\n    readonly id?: string;\n    /**\n     * Updated at\n     */\n    readonly updated_at?: string;\n    /**\n     * Created at\n     */\n    readonly created_at?: string;\n    /**\n     * Mime\n     */\n    mime: string;\n    /**\n     * File\n     */\n    readonly file?: string;\n};\n\nexport type Default = {\n    name?: string;\n};\n\nexport type Pageable = {\n    page?: number;\n    size?: number;\n    sort?: Array<string>;\n};\n\n/**\n * This is a free-form object without additionalProperties.\n */\nexport type FreeFormObjectWithoutAdditionalProperties = {\n    [key: string]: unknown;\n};\n\n/**\n * This is a free-form object with additionalProperties: true.\n */\nexport type FreeFormObjectWithAdditionalPropertiesEqTrue = {\n    [key: string]: unknown;\n};\n\n/**\n * This is a free-form object with additionalProperties: {}.\n */\nexport type FreeFormObjectWithAdditionalPropertiesEqEmptyObject = {\n    [key: string]: unknown;\n};\n\nexport type ModelWithConst = {\n    String?: 'String';\n    number?: 0;\n    null?: null;\n    withType?: 'Some string';\n};\n\n/**\n * This is a model with one property and additionalProperties: true\n */\nexport type ModelWithAdditionalPropertiesEqTrue = {\n    /**\n     * This is a simple string property\n     */\n    prop?: string;\n    [key: string]: unknown;\n};\n\nexport type NestedAnyOfArraysNullable = {\n    nullableArray?: Array<string | boolean> | null;\n};\n\nexport type CompositionWithOneOfAndProperties = ({\n    foo: SimpleParameter;\n} | {\n    bar: NonAsciiStringæøåÆøÅöôêÊ字符串;\n}) & {\n    baz: number | null;\n    qux: number;\n};\n\n/**\n * An object that can be null\n */\nexport type NullableObject = {\n    foo?: string;\n} | null;\n\n/**\n * Some % character\n */\nexport type CharactersInDescription = string;\n\nexport type ModelWithNullableObject = {\n    data?: NullableObject;\n};\n\n/**\n * An object with additional properties that can be null (anyOf ref + null)\n */\nexport type ModelWithAdditionalPropertiesRef = {\n    [key: string]: NullableObject | null;\n};\n\nexport type ModelWithOneOfEnum = {\n    foo: 'Bar';\n} | {\n    foo: 'Baz';\n} | {\n    foo: 'Qux';\n} | {\n    content: string;\n    foo: 'Quux';\n} | {\n    content: [\n        string,\n        string\n    ];\n    foo: 'Corge';\n};\n\nexport type ModelWithNestedArrayEnumsDataFoo = 'foo' | 'bar';\n\nexport type ModelWithNestedArrayEnumsDataBar = 'baz' | 'qux';\n\nexport type ModelWithNestedArrayEnumsData = {\n    foo?: Array<ModelWithNestedArrayEnumsDataFoo>;\n    bar?: Array<ModelWithNestedArrayEnumsDataBar>;\n};\n\nexport type ModelWithNestedArrayEnums = {\n    array_strings?: Array<string>;\n    data?: ModelWithNestedArrayEnumsData;\n};\n\nexport type ModelWithNestedCompositionEnums = {\n    foo?: ModelWithNestedArrayEnumsDataFoo;\n};\n\nexport type ModelWithReadOnlyAndWriteOnly = {\n    foo: string;\n    readonly bar: string;\n};\n\nexport type ModelWithConstantSizeArray = [\n    number,\n    number\n];\n\nexport type ModelWithAnyOfConstantSizeArray = [\n    number | string,\n    number | string,\n    number | string\n];\n\nexport type ModelWithPrefixItemsConstantSizeArray = [\n    ModelWithInteger,\n    number | string,\n    string\n];\n\nexport type ModelWithAnyOfConstantSizeArrayNullable = [\n    number | null | string,\n    number | null | string,\n    number | null | string\n];\n\nexport type ModelWithAnyOfConstantSizeArrayWithNSizeAndOptions = [\n    number | Import,\n    number | Import\n];\n\nexport type ModelWithAnyOfConstantSizeArrayAndIntersect = [\n    number & string,\n    number & string\n];\n\nexport type ModelWithNumericEnumUnion = {\n    /**\n     * Период\n     */\n    value?: -10 | -1 | 0 | 1 | 3 | 6 | 12;\n};\n\n/**\n * Some description with `back ticks`\n */\nexport type ModelWithBackticksInDescription = {\n    /**\n     * The template `that` should be used for parsing and importing the contents of the CSV file.\n     *\n     * <br/><p>There is one placeholder currently supported:<ul>     <li><b>${x}</b> - refers to the n-th column in the CSV file, e.g. ${1}, ${2}, ...)</li></ul><p>Example of a correct JSON template:</p>\n     * <pre>\n     * [\n     * {\n     * \"resourceType\": \"Asset\",\n     * \"identifier\": {\n     * \"name\": \"${1}\",\n     * \"domain\": {\n     * \"name\": \"${2}\",\n     * \"community\": {\n     * \"name\": \"Some Community\"\n     * }\n     * }\n     * },\n     * \"attributes\" : {\n     * \"00000000-0000-0000-0000-000000003115\" : [ {\n     * \"value\" : \"${3}\"\n     * } ],\n     * \"00000000-0000-0000-0000-000000000222\" : [ {\n     * \"value\" : \"${4}\"\n     * } ]\n     * }\n     * }\n     * ]\n     * </pre>\n     */\n    template?: string;\n};\n\nexport type ModelWithOneOfAndProperties = (SimpleParameter | NonAsciiStringæøåÆøÅöôêÊ字符串) & {\n    baz: number | null;\n    qux: number;\n};\n\n/**\n * Model used to test deduplication strategy (unused)\n */\nexport type ParameterSimpleParameterUnused = string;\n\n/**\n * Model used to test deduplication strategy\n */\nexport type PostServiceWithEmptyTagResponse = string;\n\n/**\n * Model used to test deduplication strategy\n */\nexport type PostServiceWithEmptyTagResponse2 = string;\n\n/**\n * Model used to test deduplication strategy\n */\nexport type DeleteFooData = string;\n\n/**\n * Model used to test deduplication strategy\n */\nexport type DeleteFooData2 = string;\n\n/**\n * Model with restricted keyword name\n */\nexport type Import = string;\n\nexport type SchemaWithFormRestrictedKeys = {\n    description?: string;\n    'x-enum-descriptions'?: string;\n    'x-enum-varnames'?: string;\n    'x-enumNames'?: string;\n    title?: string;\n    object?: {\n        description?: string;\n        'x-enum-descriptions'?: string;\n        'x-enum-varnames'?: string;\n        'x-enumNames'?: string;\n        title?: string;\n    };\n    array?: Array<{\n        description?: string;\n        'x-enum-descriptions'?: string;\n        'x-enum-varnames'?: string;\n        'x-enumNames'?: string;\n        title?: string;\n    }>;\n};\n\n/**\n * This schema was giving PascalCase transformations a hard time\n */\nexport type IoK8sApimachineryPkgApisMetaV1DeleteOptions = {\n    /**\n     * Must be fulfilled before a deletion is carried out. If not possible, a 409 Conflict status will be returned.\n     */\n    preconditions?: IoK8sApimachineryPkgApisMetaV1Preconditions;\n};\n\n/**\n * This schema was giving PascalCase transformations a hard time\n */\nexport type IoK8sApimachineryPkgApisMetaV1Preconditions = {\n    /**\n     * Specifies the target ResourceVersion\n     */\n    resourceVersion?: string;\n    /**\n     * Specifies the target UID.\n     */\n    uid?: string;\n};\n\nexport type AdditionalPropertiesUnknownIssue = {\n    [key: string]: string | number;\n};\n\nexport type AdditionalPropertiesUnknownIssue2 = {\n    [key: string]: string | number;\n};\n\nexport type AdditionalPropertiesUnknownIssue3 = string & {\n    entries: {\n        [key: string]: AdditionalPropertiesUnknownIssue;\n    };\n};\n\nexport type AdditionalPropertiesIntegerIssue = {\n    value: number;\n    [key: string]: number;\n};\n\nexport type OneOfAllOfIssue = ((ConstValue | GenericSchemaDuplicateIssue1SystemBoolean) & _3eNum1Период) | GenericSchemaDuplicateIssue1SystemString;\n\nexport type GenericSchemaDuplicateIssue1SystemBoolean = {\n    item?: boolean;\n    error?: string | null;\n    readonly hasError?: boolean;\n    data?: {\n        [key: string]: never;\n    };\n};\n\nexport type GenericSchemaDuplicateIssue1SystemString = {\n    item?: string | null;\n    error?: string | null;\n    readonly hasError?: boolean;\n};\n\nexport type ExternalSharedModel = {\n    id: string;\n    name?: string;\n};\n\n/**\n * This is a model with one property containing a reference\n */\nexport type ModelWithReferenceWritable = {\n    prop?: ModelWithPropertiesWritable;\n};\n\n/**\n * This is a model with one property containing an array\n */\nexport type ModelWithArrayReadOnlyAndWriteOnlyWritable = {\n    prop?: Array<ModelWithReadOnlyAndWriteOnlyWritable>;\n    propWithFile?: Array<Blob | File>;\n    propWithNumber?: Array<number>;\n};\n\n/**\n * This is a model with one nested property\n */\nexport type ModelWithPropertiesWritable = {\n    required: string;\n    requiredAndNullable: string | null;\n    string?: string;\n    number?: number;\n    boolean?: boolean;\n    reference?: ModelWithString;\n    'property with space'?: string;\n    default?: string;\n    try?: string;\n};\n\n/**\n * This is a model that contains a some patterns\n */\nexport type ModelWithPatternWritable = {\n    key: string;\n    name: string;\n    id?: string;\n    text?: string;\n    patternWithSingleQuotes?: string;\n    patternWithNewline?: string;\n    patternWithBacktick?: string;\n    patternWithUnicode?: string;\n};\n\nexport type FileWritable = {\n    /**\n     * Mime\n     */\n    mime: string;\n};\n\nexport type ModelWithReadOnlyAndWriteOnlyWritable = {\n    foo: string;\n    baz: string;\n};\n\nexport type ModelWithAnyOfConstantSizeArrayWithNSizeAndOptionsWritable = [\n    number | Import,\n    number | Import\n];\n\nexport type AdditionalPropertiesUnknownIssueWritable = {\n    [key: string]: string | number;\n};\n\nexport type OneOfAllOfIssueWritable = ((ConstValue | GenericSchemaDuplicateIssue1SystemBoolean) & _3eNum1Период) | GenericSchemaDuplicateIssue1SystemString;\n\nexport type GenericSchemaDuplicateIssue1SystemBooleanWritable = {\n    item?: boolean;\n    error?: string | null;\n    data?: {\n        [key: string]: never;\n    };\n};\n\nexport type GenericSchemaDuplicateIssue1SystemStringWritable = {\n    item?: string | null;\n    error?: string | null;\n};\n\n/**\n * This is a reusable parameter\n */\nexport type SimpleParameter = string;\n\n/**\n * Parameter with illegal characters\n */\nexport type XFooBar = ModelWithString;\n\n/**\n * A reusable request body\n */\nexport type SimpleRequestBody = ModelWithString;\n\n/**\n * A reusable request body\n */\nexport type SimpleFormData = ModelWithString;\n\nexport type ExportData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no+tag';\n};\n\nexport type PatchApiVbyApiVersionNoTagData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no+tag';\n};\n\nexport type PatchApiVbyApiVersionNoTagResponses = {\n    /**\n     * OK\n     */\n    default: unknown;\n};\n\nexport type ImportData = {\n    body: ModelWithReadOnlyAndWriteOnlyWritable | ModelWithArrayReadOnlyAndWriteOnlyWritable;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no+tag';\n};\n\nexport type ImportResponses = {\n    /**\n     * Success\n     */\n    200: ModelFromZendesk;\n    /**\n     * Default success response\n     */\n    default: ModelWithReadOnlyAndWriteOnly;\n};\n\nexport type ImportResponse = ImportResponses[keyof ImportResponses];\n\nexport type FooWowData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no+tag';\n};\n\nexport type FooWowResponses = {\n    /**\n     * OK\n     */\n    default: unknown;\n};\n\nexport type ApiVVersionODataControllerCountData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple/$count';\n};\n\nexport type ApiVVersionODataControllerCountResponses = {\n    /**\n     * Success\n     */\n    200: ModelFromZendesk;\n};\n\nexport type ApiVVersionODataControllerCountResponse = ApiVVersionODataControllerCountResponses[keyof ApiVVersionODataControllerCountResponses];\n\nexport type GetApiVbyApiVersionSimpleOperationData = {\n    body?: never;\n    path: {\n        /**\n         * foo in method\n         */\n        foo_param: string;\n    };\n    query?: never;\n    url: '/api/v{api-version}/simple:operation';\n};\n\nexport type GetApiVbyApiVersionSimpleOperationErrors = {\n    /**\n     * Default error response\n     */\n    default: ModelWithBoolean;\n};\n\nexport type GetApiVbyApiVersionSimpleOperationError = GetApiVbyApiVersionSimpleOperationErrors[keyof GetApiVbyApiVersionSimpleOperationErrors];\n\nexport type GetApiVbyApiVersionSimpleOperationResponses = {\n    /**\n     * Response is a simple number\n     */\n    200: number;\n};\n\nexport type GetApiVbyApiVersionSimpleOperationResponse = GetApiVbyApiVersionSimpleOperationResponses[keyof GetApiVbyApiVersionSimpleOperationResponses];\n\nexport type DeleteCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type GetCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type HeadCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type OptionsCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type PatchCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type PostCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type PutCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type DeleteFooData3 = {\n    body?: never;\n    headers: {\n        /**\n         * Parameter with illegal characters\n         */\n        'x-Foo-Bar': ModelWithString;\n    };\n    path: {\n        /**\n         * foo in method\n         */\n        foo_param: string;\n        /**\n         * bar in method\n         */\n        BarParam: string;\n    };\n    query?: never;\n    url: '/api/v{api-version}/foo/{foo_param}/bar/{BarParam}';\n};\n\nexport type CallWithDescriptionsData = {\n    body?: never;\n    path?: never;\n    query?: {\n        /**\n         * Testing multiline comments in string: First line\n         * Second line\n         *\n         * Fourth line\n         */\n        parameterWithBreaks?: string;\n        /**\n         * Testing backticks in string: `backticks` and ```multiple backticks``` should work\n         */\n        parameterWithBackticks?: string;\n        /**\n         * Testing slashes in string: \\backwards\\\\\\ and /forwards/// should work\n         */\n        parameterWithSlashes?: string;\n        /**\n         * Testing expression placeholders in string: ${expression} should work\n         */\n        parameterWithExpressionPlaceholders?: string;\n        /**\n         * Testing quotes in string: 'single quote''' and \"double quotes\"\"\" should work\n         */\n        parameterWithQuotes?: string;\n        /**\n         * Testing reserved characters in string: * inline * and ** inline ** should work\n         */\n        parameterWithReservedCharacters?: string;\n    };\n    url: '/api/v{api-version}/descriptions';\n};\n\nexport type DeprecatedCallData = {\n    body?: never;\n    headers: {\n        /**\n         * This parameter is deprecated\n         *\n         * @deprecated\n         */\n        parameter: DeprecatedModel | null;\n    };\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/parameters/deprecated';\n};\n\nexport type CallWithParametersData = {\n    /**\n     * This is the parameter that goes into the body\n     */\n    body: {\n        [key: string]: unknown;\n    } | null;\n    headers: {\n        /**\n         * This is the parameter that goes into the header\n         */\n        parameterHeader: string | null;\n    };\n    path: {\n        /**\n         * This is the parameter that goes into the path\n         */\n        parameterPath: string | null;\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string | null;\n    };\n    query: {\n        foo_ref_enum?: ModelWithNestedArrayEnumsDataFoo;\n        foo_all_of_enum: ModelWithNestedArrayEnumsDataFoo;\n        /**\n         * This is the parameter that goes into the query params\n         */\n        cursor: string | null;\n    };\n    url: '/api/v{api-version}/parameters/{parameterPath}';\n};\n\nexport type CallWithWeirdParameterNamesData = {\n    /**\n     * This is the parameter that goes into the body\n     */\n    body: ModelWithString | null;\n    headers: {\n        /**\n         * This is the parameter that goes into the request header\n         */\n        'parameter.header': string | null;\n    };\n    path: {\n        /**\n         * This is the parameter that goes into the path\n         */\n        'parameter.path.1'?: string;\n        /**\n         * This is the parameter that goes into the path\n         */\n        'parameter-path-2'?: string;\n        /**\n         * This is the parameter that goes into the path\n         */\n        'PARAMETER-PATH-3'?: string;\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string | null;\n    };\n    query: {\n        /**\n         * This is the parameter with a reserved keyword\n         */\n        default?: string;\n        /**\n         * This is the parameter that goes into the request query params\n         */\n        'parameter-query': string | null;\n    };\n    url: '/api/v{api-version}/parameters/{parameter.path.1}/{parameter-path-2}/{PARAMETER-PATH-3}';\n};\n\nexport type GetCallWithOptionalParamData = {\n    /**\n     * This is a required parameter\n     */\n    body: ModelWithOneOfEnum;\n    path?: never;\n    query?: {\n        /**\n         * This is an optional parameter\n         */\n        page?: number;\n    };\n    url: '/api/v{api-version}/parameters';\n};\n\nexport type PostCallWithOptionalParamData = {\n    /**\n     * This is an optional parameter\n     */\n    body?: {\n        offset?: number | null;\n    };\n    path?: never;\n    query: {\n        /**\n         * This is a required parameter\n         */\n        parameter: Pageable;\n    };\n    url: '/api/v{api-version}/parameters';\n};\n\nexport type PostCallWithOptionalParamResponses = {\n    /**\n     * Response is a simple number\n     */\n    200: number;\n    /**\n     * Success\n     */\n    204: void;\n};\n\nexport type PostCallWithOptionalParamResponse = PostCallWithOptionalParamResponses[keyof PostCallWithOptionalParamResponses];\n\nexport type PostApiVbyApiVersionRequestBodyData = {\n    /**\n     * A reusable request body\n     */\n    body?: SimpleRequestBody;\n    path?: never;\n    query?: {\n        /**\n         * This is a reusable parameter\n         */\n        parameter?: string;\n    };\n    url: '/api/v{api-version}/requestBody';\n};\n\nexport type PostApiVbyApiVersionFormDataData = {\n    /**\n     * A reusable request body\n     */\n    body?: SimpleFormData;\n    path?: never;\n    query?: {\n        /**\n         * This is a reusable parameter\n         */\n        parameter?: string;\n    };\n    url: '/api/v{api-version}/formData';\n};\n\nexport type CallWithDefaultParametersData = {\n    body?: never;\n    path?: never;\n    query?: {\n        /**\n         * This is a simple string with default value\n         */\n        parameterString?: string | null;\n        /**\n         * This is a simple number with default value\n         */\n        parameterNumber?: number | null;\n        /**\n         * This is a simple boolean with default value\n         */\n        parameterBoolean?: boolean | null;\n        /**\n         * This is a simple enum with default value\n         */\n        parameterEnum?: 'Success' | 'Warning' | 'Error';\n        /**\n         * This is a simple model with default value\n         */\n        parameterModel?: ModelWithString | null;\n    };\n    url: '/api/v{api-version}/defaults';\n};\n\nexport type CallWithDefaultOptionalParametersData = {\n    body?: never;\n    path?: never;\n    query?: {\n        /**\n         * This is a simple string that is optional with default value\n         */\n        parameterString?: string;\n        /**\n         * This is a simple number that is optional with default value\n         */\n        parameterNumber?: number;\n        /**\n         * This is a simple boolean that is optional with default value\n         */\n        parameterBoolean?: boolean;\n        /**\n         * This is a simple enum that is optional with default value\n         */\n        parameterEnum?: 'Success' | 'Warning' | 'Error';\n        /**\n         * This is a simple model that is optional with default value\n         */\n        parameterModel?: ModelWithString;\n    };\n    url: '/api/v{api-version}/defaults';\n};\n\nexport type CallToTestOrderOfParamsData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * This is a optional string with default\n         */\n        parameterOptionalStringWithDefault?: string;\n        /**\n         * This is a optional string with empty default\n         */\n        parameterOptionalStringWithEmptyDefault?: string;\n        /**\n         * This is a optional string with no default\n         */\n        parameterOptionalStringWithNoDefault?: string;\n        /**\n         * This is a string with default\n         */\n        parameterStringWithDefault: string;\n        /**\n         * This is a string with empty default\n         */\n        parameterStringWithEmptyDefault: string;\n        /**\n         * This is a string with no default\n         */\n        parameterStringWithNoDefault: string;\n        /**\n         * This is a string that can be null with no default\n         */\n        parameterStringNullableWithNoDefault?: string | null;\n        /**\n         * This is a string that can be null with default\n         */\n        parameterStringNullableWithDefault?: string | null;\n    };\n    url: '/api/v{api-version}/defaults';\n};\n\nexport type DuplicateNameData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/duplicate';\n};\n\nexport type DuplicateName2Data = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/duplicate';\n};\n\nexport type DuplicateName3Data = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/duplicate';\n};\n\nexport type DuplicateName4Data = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/duplicate';\n};\n\nexport type CallWithNoContentResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no-content';\n};\n\nexport type CallWithNoContentResponseResponses = {\n    /**\n     * Success\n     */\n    204: void;\n};\n\nexport type CallWithNoContentResponseResponse = CallWithNoContentResponseResponses[keyof CallWithNoContentResponseResponses];\n\nexport type CallWithResponseAndNoContentResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multiple-tags/response-and-no-content';\n};\n\nexport type CallWithResponseAndNoContentResponseResponses = {\n    /**\n     * Response is a simple number\n     */\n    200: number;\n    /**\n     * Success\n     */\n    204: void;\n};\n\nexport type CallWithResponseAndNoContentResponseResponse = CallWithResponseAndNoContentResponseResponses[keyof CallWithResponseAndNoContentResponseResponses];\n\nexport type DummyAData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multiple-tags/a';\n};\n\nexport type DummyAResponses = {\n    200: _400;\n};\n\nexport type DummyAResponse = DummyAResponses[keyof DummyAResponses];\n\nexport type DummyBData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multiple-tags/b';\n};\n\nexport type DummyBResponses = {\n    /**\n     * Success\n     */\n    204: void;\n};\n\nexport type DummyBResponse = DummyBResponses[keyof DummyBResponses];\n\nexport type CallWithResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/response';\n};\n\nexport type CallWithResponseResponses = {\n    default: Import;\n};\n\nexport type CallWithResponseResponse = CallWithResponseResponses[keyof CallWithResponseResponses];\n\nexport type CallWithDuplicateResponsesData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/response';\n};\n\nexport type CallWithDuplicateResponsesErrors = {\n    /**\n     * Message for 500 error\n     */\n    500: ModelWithStringError;\n    /**\n     * Message for 501 error\n     */\n    501: ModelWithStringError;\n    /**\n     * Message for 502 error\n     */\n    502: ModelWithStringError;\n    /**\n     * Message for 4XX errors\n     */\n    '4XX': DictionaryWithArray;\n    /**\n     * Default error response\n     */\n    default: ModelWithBoolean;\n};\n\nexport type CallWithDuplicateResponsesError = CallWithDuplicateResponsesErrors[keyof CallWithDuplicateResponsesErrors];\n\nexport type CallWithDuplicateResponsesResponses = {\n    /**\n     * Message for 200 response\n     */\n    200: ModelWithBoolean & ModelWithInteger;\n    /**\n     * Message for 201 response\n     */\n    201: ModelWithString;\n    /**\n     * Message for 202 response\n     */\n    202: ModelWithString;\n};\n\nexport type CallWithDuplicateResponsesResponse = CallWithDuplicateResponsesResponses[keyof CallWithDuplicateResponsesResponses];\n\nexport type CallWithResponsesData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/response';\n};\n\nexport type CallWithResponsesErrors = {\n    /**\n     * Message for 500 error\n     */\n    500: ModelWithStringError;\n    /**\n     * Message for 501 error\n     */\n    501: ModelWithStringError;\n    /**\n     * Message for 502 error\n     */\n    502: ModelWithStringError;\n    /**\n     * Message for default response\n     */\n    default: ModelWithStringError;\n};\n\nexport type CallWithResponsesError = CallWithResponsesErrors[keyof CallWithResponsesErrors];\n\nexport type CallWithResponsesResponses = {\n    /**\n     * Message for 200 response\n     */\n    200: {\n        readonly '@namespace.string'?: string;\n        readonly '@namespace.integer'?: number;\n        readonly value?: Array<ModelWithString>;\n    };\n    /**\n     * Message for 201 response\n     */\n    201: ModelThatExtends;\n    /**\n     * Message for 202 response\n     */\n    202: ModelThatExtendsExtends;\n};\n\nexport type CallWithResponsesResponse = CallWithResponsesResponses[keyof CallWithResponsesResponses];\n\nexport type CollectionFormatData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * This is an array parameter that is sent as csv format (comma-separated values)\n         */\n        parameterArrayCSV: Array<string> | null;\n        /**\n         * This is an array parameter that is sent as ssv format (space-separated values)\n         */\n        parameterArraySSV: Array<string> | null;\n        /**\n         * This is an array parameter that is sent as tsv format (tab-separated values)\n         */\n        parameterArrayTSV: Array<string> | null;\n        /**\n         * This is an array parameter that is sent as pipes format (pipe-separated values)\n         */\n        parameterArrayPipes: Array<string> | null;\n        /**\n         * This is an array parameter that is sent as multi format (multiple parameter instances)\n         */\n        parameterArrayMulti: Array<string> | null;\n    };\n    url: '/api/v{api-version}/collectionFormat';\n};\n\nexport type TypesData = {\n    body?: never;\n    path?: {\n        /**\n         * This is a number parameter\n         */\n        id?: number;\n    };\n    query: {\n        /**\n         * This is a number parameter\n         */\n        parameterNumber: number;\n        /**\n         * This is a string parameter\n         */\n        parameterString: string | null;\n        /**\n         * This is a boolean parameter\n         */\n        parameterBoolean: boolean | null;\n        /**\n         * This is an object parameter\n         */\n        parameterObject: {\n            [key: string]: unknown;\n        } | null;\n        /**\n         * This is an array parameter\n         */\n        parameterArray: Array<string> | null;\n        /**\n         * This is a dictionary parameter\n         */\n        parameterDictionary: {\n            [key: string]: unknown;\n        } | null;\n        /**\n         * This is an enum parameter\n         */\n        parameterEnum: 'Success' | 'Warning' | 'Error' | null;\n    };\n    url: '/api/v{api-version}/types';\n};\n\nexport type TypesResponses = {\n    /**\n     * Response is a simple number\n     */\n    200: number;\n    /**\n     * Response is a simple string\n     */\n    201: string;\n    /**\n     * Response is a simple boolean\n     */\n    202: boolean;\n    /**\n     * Response is a simple object\n     */\n    203: {\n        [key: string]: unknown;\n    };\n};\n\nexport type TypesResponse = TypesResponses[keyof TypesResponses];\n\nexport type UploadFileData = {\n    body: Blob | File;\n    path: {\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string | null;\n    };\n    query?: never;\n    url: '/api/v{api-version}/upload';\n};\n\nexport type UploadFileResponses = {\n    200: boolean;\n};\n\nexport type UploadFileResponse = UploadFileResponses[keyof UploadFileResponses];\n\nexport type FileResponseData = {\n    body?: never;\n    path: {\n        id: string;\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string;\n    };\n    query?: never;\n    url: '/api/v{api-version}/file/{id}';\n};\n\nexport type FileResponseResponses = {\n    /**\n     * Success\n     */\n    200: Blob | File;\n};\n\nexport type FileResponseResponse = FileResponseResponses[keyof FileResponseResponses];\n\nexport type ComplexTypesData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * Parameter containing object\n         */\n        parameterObject: {\n            first?: {\n                second?: {\n                    third?: string;\n                };\n            };\n        };\n        /**\n         * Parameter containing reference\n         */\n        parameterReference: ModelWithString;\n    };\n    url: '/api/v{api-version}/complex';\n};\n\nexport type ComplexTypesErrors = {\n    /**\n     * 400 `server` error\n     */\n    400: unknown;\n    /**\n     * 500 server error\n     */\n    500: unknown;\n};\n\nexport type ComplexTypesResponses = {\n    /**\n     * Successful response\n     */\n    200: Array<ModelWithString>;\n};\n\nexport type ComplexTypesResponse = ComplexTypesResponses[keyof ComplexTypesResponses];\n\nexport type MultipartResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multipart';\n};\n\nexport type MultipartResponseResponses = {\n    /**\n     * OK\n     */\n    200: {\n        file?: Blob | File;\n        metadata?: {\n            foo?: string;\n            bar?: string;\n        };\n    };\n};\n\nexport type MultipartResponseResponse = MultipartResponseResponses[keyof MultipartResponseResponses];\n\nexport type MultipartRequestData = {\n    body?: {\n        content?: Blob | File;\n        data?: ModelWithString | null;\n    };\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multipart';\n};\n\nexport type ComplexParamsData = {\n    body?: {\n        readonly key: string | null;\n        name: string | null;\n        enabled?: boolean;\n        type: 'Monkey' | 'Horse' | 'Bird';\n        listOfModels?: Array<ModelWithString> | null;\n        listOfStrings?: Array<string> | null;\n        parameters: ModelWithString | ModelWithEnum | ModelWithArray | ModelWithDictionary;\n        readonly user?: {\n            readonly id?: number;\n            readonly name?: string | null;\n        };\n    };\n    path: {\n        id: number;\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string;\n    };\n    query?: never;\n    url: '/api/v{api-version}/complex/{id}';\n};\n\nexport type ComplexParamsResponses = {\n    /**\n     * Success\n     */\n    200: ModelWithString;\n};\n\nexport type ComplexParamsResponse = ComplexParamsResponses[keyof ComplexParamsResponses];\n\nexport type CallWithResultFromHeaderData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/header';\n};\n\nexport type CallWithResultFromHeaderErrors = {\n    /**\n     * 400 server error\n     */\n    400: unknown;\n    /**\n     * 500 server error\n     */\n    500: unknown;\n};\n\nexport type CallWithResultFromHeaderResponses = {\n    /**\n     * Successful response\n     */\n    200: unknown;\n};\n\nexport type TestErrorCodeData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * Status code to return\n         */\n        status: number;\n    };\n    url: '/api/v{api-version}/error';\n};\n\nexport type TestErrorCodeErrors = {\n    /**\n     * Custom message: Internal Server Error\n     */\n    500: unknown;\n    /**\n     * Custom message: Not Implemented\n     */\n    501: unknown;\n    /**\n     * Custom message: Bad Gateway\n     */\n    502: unknown;\n    /**\n     * Custom message: Service Unavailable\n     */\n    503: unknown;\n};\n\nexport type TestErrorCodeResponses = {\n    /**\n     * Custom message: Successful response\n     */\n    200: unknown;\n};\n\nexport type NonAsciiæøåÆøÅöôêÊ字符串Data = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * Dummy input param\n         */\n        nonAsciiParamæøåÆØÅöôêÊ: number;\n    };\n    url: '/api/v{api-version}/non-ascii-æøåÆØÅöôêÊ字符串';\n};\n\nexport type NonAsciiæøåÆøÅöôêÊ字符串Responses = {\n    /**\n     * Successful response\n     */\n    200: Array<NonAsciiStringæøåÆøÅöôêÊ字符串>;\n};\n\nexport type NonAsciiæøåÆøÅöôêÊ字符串Response = NonAsciiæøåÆøÅöôêÊ字符串Responses[keyof NonAsciiæøåÆøÅöôêÊ字符串Responses];\n\nexport type PutWithFormUrlEncodedData = {\n    body: ArrayWithStrings;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/non-ascii-æøåÆØÅöôêÊ字符串';\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-angular/import-file-extension-ts/client/client.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { HttpResponse } from '@angular/common/http';\nimport { HttpClient, HttpErrorResponse, HttpEventType, HttpRequest } from '@angular/common/http';\nimport {\n  assertInInjectionContext,\n  inject,\n  provideAppInitializer,\n  runInInjectionContext,\n} from '@angular/core';\nimport { firstValueFrom } from 'rxjs';\nimport { filter } from 'rxjs/operators';\n\nimport { createSseClient } from '../core/serverSentEvents.gen.ts';\nimport type { HttpMethod } from '../core/types.gen.ts';\nimport { getValidRequestBody } from '../core/utils.gen.ts';\nimport type {\n  Client,\n  Config,\n  RequestOptions,\n  ResolvedRequestOptions,\n  ResponseStyle,\n} from './types.gen.ts';\nimport {\n  buildUrl,\n  createConfig,\n  createInterceptors,\n  mergeConfigs,\n  mergeHeaders,\n  setAuthParams,\n} from './utils.gen.ts';\n\nexport function provideHeyApiClient(client: Client) {\n  return provideAppInitializer(() => {\n    const httpClient = inject(HttpClient);\n    client.setConfig({ httpClient });\n  });\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<\n    HttpRequest<unknown>,\n    HttpResponse<unknown>,\n    unknown,\n    ResolvedRequestOptions\n  >();\n\n  const requestOptions = <\n    TData = unknown,\n    ThrowOnError extends boolean = false,\n    TResponseStyle extends ResponseStyle = 'fields',\n  >(\n    options: RequestOptions<TData, TResponseStyle, ThrowOnError>,\n  ) => {\n    const opts = {\n      ..._config,\n      ...options,\n      headers: mergeHeaders(_config.headers, options.headers),\n      httpClient: options.httpClient ?? _config.httpClient,\n      serializedBody: undefined as string | undefined,\n    };\n\n    if (!opts.httpClient) {\n      if (opts.injector) {\n        opts.httpClient = runInInjectionContext(opts.injector, () => inject(HttpClient));\n      } else {\n        assertInInjectionContext(requestOptions);\n        opts.httpClient = inject(HttpClient);\n      }\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 url = buildUrl(opts as any);\n\n    const req = new HttpRequest<unknown>(opts.method ?? 'GET', url, getValidRequestBody(opts), {\n      redirect: 'follow',\n      ...opts,\n    });\n\n    return { opts, req, url };\n  };\n\n  const beforeRequest = async (options: RequestOptions) => {\n    const { opts, req, url } = requestOptions(options);\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    return { opts, req, url };\n  };\n\n  const request: Client['request'] = async (options) => {\n    // @ts-expect-error\n    const { opts, req: initialReq } = await beforeRequest(options);\n\n    let req = initialReq;\n\n    for (const fn of interceptors.request.fns) {\n      if (fn) {\n        req = await fn(req, opts as any);\n      }\n    }\n\n    const result: {\n      request: HttpRequest<unknown>;\n      response: any;\n    } = {\n      request: req,\n      response: null,\n    };\n\n    try {\n      result.response = (await firstValueFrom(\n        opts\n          .httpClient!.request(req)\n          .pipe(filter((event) => event.type === HttpEventType.Response)),\n      )) as HttpResponse<unknown>;\n\n      for (const fn of interceptors.response.fns) {\n        if (fn) {\n          result.response = await fn(result.response, req, opts as any);\n        }\n      }\n\n      let bodyResponse = result.response.body;\n\n      if (opts.responseValidator) {\n        await opts.responseValidator(bodyResponse);\n      }\n\n      if (opts.responseTransformer) {\n        bodyResponse = await opts.responseTransformer(bodyResponse);\n      }\n\n      return opts.responseStyle === 'data' ? bodyResponse : { data: bodyResponse, ...result };\n    } catch (error) {\n      if (error instanceof HttpErrorResponse) {\n        result.response = error;\n      }\n\n      let finalError = error instanceof HttpErrorResponse ? error.error : error;\n\n      for (const fn of interceptors.error.fns) {\n        if (fn) {\n          finalError = (await fn(finalError, result.response as any, req, opts as any)) as string;\n        }\n      }\n\n      if (opts.throwOnError) {\n        throw finalError;\n      }\n\n      return opts.responseStyle === 'data'\n        ? undefined\n        : {\n            error: finalError,\n            ...result,\n          };\n    }\n  };\n\n  const makeMethodFn = (method: Uppercase<HttpMethod>) => (options: RequestOptions) =>\n    request({ ...options, method });\n\n  const makeSseFn = (method: Uppercase<HttpMethod>) => async (options: RequestOptions) => {\n    const { opts, url } = await beforeRequest(options);\n    return createSseClient({\n      ...opts,\n      body: opts.body as BodyInit | null | undefined,\n      headers: opts.headers as unknown as Record<string, string>,\n      method,\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    requestOptions: (options) => {\n      if (options.security) {\n        throw new Error('Security is not supported in requestOptions');\n      }\n\n      if (options.requestValidator) {\n        throw new Error('Request validation is not supported in requestOptions');\n      }\n\n      return requestOptions(options).req;\n    },\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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-angular/import-file-extension-ts/client/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type { Auth } from '../core/auth.gen.ts';\nexport type { QuerySerializerOptions } from '../core/bodySerializer.gen.ts';\nexport {\n  formDataBodySerializer,\n  jsonBodySerializer,\n  urlSearchParamsBodySerializer,\n} from '../core/bodySerializer.gen.ts';\nexport { buildClientParams } from '../core/params.gen.ts';\nexport { serializeQueryKeyValue } from '../core/queryKeySerializer.gen.ts';\nexport { createClient } from './client.gen.ts';\nexport type {\n  Client,\n  ClientOptions,\n  Config,\n  CreateClientConfig,\n  Options,\n  RequestOptions,\n  RequestResult,\n  ResolvedRequestOptions,\n  ResponseStyle,\n  TDataShape,\n} from './types.gen.ts';\nexport { createConfig, mergeHeaders } from './utils.gen.ts';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-angular/import-file-extension-ts/client/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type {\n  HttpClient,\n  HttpErrorResponse,\n  HttpHeaders,\n  HttpRequest,\n  HttpResponse,\n} from '@angular/common/http';\nimport type { Injector } from '@angular/core';\n\nimport type { Auth } from '../core/auth.gen.ts';\nimport type {\n  ServerSentEventsOptions,\n  ServerSentEventsResult,\n} from '../core/serverSentEvents.gen.ts';\nimport type { Client as CoreClient, Config as CoreConfig } from '../core/types.gen.ts';\nimport type { Middleware } from './utils.gen.ts';\n\nexport type ResponseStyle = 'data' | 'fields';\n\nexport interface Config<T extends ClientOptions = ClientOptions>\n  extends Omit<RequestInit, 'body' | 'headers' | 'method'>, Omit<CoreConfig, 'headers'> {\n  /**\n   * Base URL for all requests made by this client.\n   */\n  baseUrl?: T['baseUrl'];\n  /**\n   * An object containing any HTTP headers that you want to pre-populate your\n   * `HttpHeaders` object with.\n   *\n   * {@link https://angular.dev/api/common/http/HttpHeaders#constructor See more}\n   */\n  headers?:\n    | HttpHeaders\n    | Record<\n        string,\n        string | number | boolean | (string | number | boolean)[] | null | undefined | unknown\n      >;\n  /**\n   * The HTTP client to use for making requests.\n   */\n  httpClient?: HttpClient;\n  /**\n   * Should we return only data or multiple fields (data, error, response, etc.)?\n   *\n   * @default 'fields'\n   */\n  responseStyle?: ResponseStyle;\n\n  /**\n   * Throw an error instead of returning it in the response?\n   *\n   * @default false\n   */\n  throwOnError?: T['throwOnError'];\n}\n\nexport interface RequestOptions<\n  TData = unknown,\n  TResponseStyle extends ResponseStyle = 'fields',\n  ThrowOnError extends boolean = boolean,\n  Url extends string = string,\n>\n  extends\n    Config<{\n      responseStyle: TResponseStyle;\n      throwOnError: ThrowOnError;\n    }>,\n    Pick<\n      ServerSentEventsOptions<TData>,\n      | 'onRequest'\n      | 'onSseError'\n      | 'onSseEvent'\n      | 'sseDefaultRetryDelay'\n      | 'sseMaxRetryAttempts'\n      | 'sseMaxRetryDelay'\n    > {\n  /**\n   * Any body that you want to add to your request.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/fetch#body}\n   */\n  body?: unknown;\n  /**\n   * Optional custom injector for dependency resolution if you don't implicitly or explicitly provide one.\n   */\n  injector?: Injector;\n  path?: Record<string, unknown>;\n  query?: Record<string, unknown>;\n  /**\n   * Security mechanism(s) to use for the request.\n   */\n  security?: ReadonlyArray<Auth>;\n  url: Url;\n}\n\nexport interface ResolvedRequestOptions<\n  TResponseStyle extends ResponseStyle = 'fields',\n  ThrowOnError extends boolean = boolean,\n  Url extends string = string,\n> extends RequestOptions<unknown, TResponseStyle, ThrowOnError, Url> {\n  serializedBody?: string;\n}\n\nexport type RequestResult<\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = boolean,\n  TResponseStyle extends ResponseStyle = 'fields',\n> = Promise<\n  ThrowOnError extends true\n    ? TResponseStyle extends 'data'\n      ? TData extends Record<string, unknown>\n        ? TData[keyof TData]\n        : TData\n      : {\n          data: TData extends Record<string, unknown> ? TData[keyof TData] : TData;\n          request: HttpRequest<unknown>;\n          response: HttpResponse<TData>;\n        }\n    : TResponseStyle extends 'data'\n      ? (TData extends Record<string, unknown> ? TData[keyof TData] : TData) | undefined\n      :\n          | {\n              data: TData extends Record<string, unknown> ? TData[keyof TData] : TData;\n              error: undefined;\n              request: HttpRequest<unknown>;\n              response: HttpResponse<TData>;\n            }\n          | {\n              data: undefined;\n              error: TError[keyof TError];\n              request: HttpRequest<unknown>;\n              response: HttpErrorResponse & {\n                error: TError[keyof TError] | null;\n              };\n            }\n>;\n\nexport interface ClientOptions {\n  baseUrl?: string;\n  responseStyle?: ResponseStyle;\n  throwOnError?: boolean;\n}\n\ntype MethodFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'>,\n) => RequestResult<TData, TError, ThrowOnError, TResponseStyle>;\n\ntype SseFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'>,\n) => Promise<ServerSentEventsResult<TData, TError>>;\n\ntype RequestFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'> &\n    Pick<Required<RequestOptions<TData, TResponseStyle, ThrowOnError>>, 'method'>,\n) => RequestResult<TData, TError, ThrowOnError, TResponseStyle>;\n\ntype RequestOptionsFn = <\n  T,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: RequestOptions<T, TResponseStyle, ThrowOnError>,\n) => HttpRequest<T>;\n\ntype BuildUrlFn = <\n  TData extends {\n    body?: unknown;\n    path?: Record<string, unknown>;\n    query?: Record<string, unknown>;\n    url: string;\n  },\n>(\n  options: TData & Options<TData>,\n) => string;\n\nexport type Client = CoreClient<RequestFn, Config, MethodFn, BuildUrlFn, SseFn> & {\n  interceptors: Middleware<\n    HttpRequest<unknown>,\n    HttpResponse<unknown>,\n    unknown,\n    ResolvedRequestOptions\n  >;\n  requestOptions: RequestOptionsFn;\n};\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 = ClientOptions> = (\n  override?: Config<ClientOptions & T>,\n) => Config<Required<ClientOptions> & T>;\n\nexport interface TDataShape {\n  body?: unknown;\n  headers?: unknown;\n  path?: unknown;\n  query?: unknown;\n  url: string;\n}\n\ntype OmitKeys<T, K> = Pick<T, Exclude<keyof T, K>>;\n\nexport type Options<\n  TData extends TDataShape = TDataShape,\n  ThrowOnError extends boolean = boolean,\n  TResponse = unknown,\n  TResponseStyle extends ResponseStyle = 'fields',\n> = OmitKeys<\n  RequestOptions<TResponse, TResponseStyle, ThrowOnError>,\n  'body' | 'path' | 'query' | 'url'\n> &\n  ([TData] extends [never] ? unknown : Omit<TData, 'url'>);\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-angular/import-file-extension-ts/client/utils.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport { HttpHeaders } from '@angular/common/http';\n\nimport { getAuthToken } from '../core/auth.gen.ts';\nimport type {\n  QuerySerializer,\n  QuerySerializerOptions,\n} from '../core/bodySerializer.gen.ts';\nimport {\n  serializeArrayParam,\n  serializeObjectParam,\n  serializePrimitiveParam,\n} from '../core/pathSerializer.gen.ts';\nimport type { Client, ClientOptions, Config, RequestOptions } from './types.gen.ts';\n\ninterface PathSerializer {\n  path: Record<string, unknown>;\n  url: string;\n}\n\nconst PATH_PARAM_RE = /\\{[^{}]+\\}/g;\n\ntype ArrayStyle = 'form' | 'spaceDelimited' | 'pipeDelimited';\ntype MatrixStyle = 'label' | 'matrix' | 'simple';\ntype ArraySeparatorStyle = ArrayStyle | MatrixStyle;\n\nconst 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 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 = (\n  contentType: string | null,\n): 'blob' | 'formData' | 'json' | 'stream' | 'text' | undefined => {\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\nexport const setAuthParams = async (\n  options: Pick<Required<RequestOptions>, 'security'> &\n    Pick<RequestOptions, 'auth' | 'query'> & {\n      headers: HttpHeaders;\n    },\n) => {\n  for (const auth of options.security) {\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 = options.headers.append('Cookie', `${name}=${token}`);\n        break;\n      case 'header':\n      default:\n        options.headers = options.headers.set(name, token);\n        break;\n    }\n\n    return;\n  }\n};\n\nexport const buildUrl: Client['buildUrl'] = (options) => {\n  const url = 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  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 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\nexport const mergeHeaders = (\n  ...headers: Array<Required<Config>['headers'] | undefined>\n): HttpHeaders => {\n  let mergedHeaders = new HttpHeaders();\n\n  for (const header of headers) {\n    if (!header || typeof header !== 'object') {\n      continue;\n    }\n\n    if (header instanceof HttpHeaders) {\n      // Merge HttpHeaders instance\n      header.keys().forEach((key) => {\n        const values = header.getAll(key);\n        if (values) {\n          values.forEach((value) => {\n            mergedHeaders = mergedHeaders.append(key, value);\n          });\n        }\n      });\n    } else {\n      // Merge plain object headers\n      for (const [key, value] of Object.entries(header)) {\n        if (value === null) {\n          mergedHeaders = mergedHeaders.delete(key);\n        } else if (Array.isArray(value)) {\n          for (const v of value) {\n            mergedHeaders = 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 = mergedHeaders.set(\n            key,\n            typeof value === 'object' ? JSON.stringify(value) : (value as string),\n          );\n        }\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  headers: defaultHeaders,\n  querySerializer: defaultQuerySerializer,\n  ...override,\n});\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-angular/import-file-extension-ts/client.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport { type ClientOptions, type Config, createClient, createConfig } from './client/index.ts';\nimport type { ClientOptions as ClientOptions2 } from './types.gen.ts';\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: 'http://localhost:3000/base' }));\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-angular/import-file-extension-ts/core/auth.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-angular/import-file-extension-ts/core/bodySerializer.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { ArrayStyle, ObjectStyle, SerializerOptions } from './pathSerializer.gen.ts';\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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-angular/import-file-extension-ts/core/params.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-angular/import-file-extension-ts/core/pathSerializer.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-angular/import-file-extension-ts/core/queryKeySerializer.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\n/**\n * JSON-friendly union that mirrors what Pinia Colada can hash.\n */\nexport type JsonValue =\n  | null\n  | string\n  | number\n  | boolean\n  | JsonValue[]\n  | { [key: string]: JsonValue };\n\n/**\n * Replacer that converts non-JSON values (bigint, Date, etc.) to safe substitutes.\n */\nexport const queryKeyJsonReplacer = (_key: string, value: unknown) => {\n  if (value === undefined || typeof value === 'function' || typeof value === 'symbol') {\n    return undefined;\n  }\n  if (typeof value === 'bigint') {\n    return value.toString();\n  }\n  if (value instanceof Date) {\n    return value.toISOString();\n  }\n  return value;\n};\n\n/**\n * Safely stringifies a value and parses it back into a JsonValue.\n */\nexport const stringifyToJsonValue = (input: unknown): JsonValue | undefined => {\n  try {\n    const json = JSON.stringify(input, queryKeyJsonReplacer);\n    if (json === undefined) {\n      return undefined;\n    }\n    return JSON.parse(json) as JsonValue;\n  } catch {\n    return undefined;\n  }\n};\n\n/**\n * Detects plain objects (including objects with a null prototype).\n */\nconst isPlainObject = (value: unknown): value is Record<string, unknown> => {\n  if (value === null || typeof value !== 'object') {\n    return false;\n  }\n  const prototype = Object.getPrototypeOf(value as object);\n  return prototype === Object.prototype || prototype === null;\n};\n\n/**\n * Turns URLSearchParams into a sorted JSON object for deterministic keys.\n */\nconst serializeSearchParams = (params: URLSearchParams): JsonValue => {\n  const entries = Array.from(params.entries()).sort(([a], [b]) => a.localeCompare(b));\n  const result: Record<string, JsonValue> = {};\n\n  for (const [key, value] of entries) {\n    const existing = result[key];\n    if (existing === undefined) {\n      result[key] = value;\n      continue;\n    }\n\n    if (Array.isArray(existing)) {\n      (existing as string[]).push(value);\n    } else {\n      result[key] = [existing, value];\n    }\n  }\n\n  return result;\n};\n\n/**\n * Normalizes any accepted value into a JSON-friendly shape for query keys.\n */\nexport const serializeQueryKeyValue = (value: unknown): JsonValue | undefined => {\n  if (value === null) {\n    return null;\n  }\n\n  if (typeof value === 'string' || typeof value === 'number' || typeof value === 'boolean') {\n    return value;\n  }\n\n  if (value === undefined || typeof value === 'function' || typeof value === 'symbol') {\n    return undefined;\n  }\n\n  if (typeof value === 'bigint') {\n    return value.toString();\n  }\n\n  if (value instanceof Date) {\n    return value.toISOString();\n  }\n\n  if (Array.isArray(value)) {\n    return stringifyToJsonValue(value);\n  }\n\n  if (typeof URLSearchParams !== 'undefined' && value instanceof URLSearchParams) {\n    return serializeSearchParams(value);\n  }\n\n  if (isPlainObject(value)) {\n    return stringifyToJsonValue(value);\n  }\n\n  return undefined;\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-angular/import-file-extension-ts/core/serverSentEvents.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { Config } from './types.gen.ts';\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 const 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            // Normalize line endings: CRLF -> LF, then CR -> LF\n            buffer = buffer.replace(/\\r\\n/g, '\\n').replace(/\\r/g, '\\n');\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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-angular/import-file-extension-ts/core/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { Auth, AuthToken } from './auth.gen.ts';\nimport type { BodySerializer, QuerySerializer, QuerySerializerOptions } from './bodySerializer.gen.ts';\n\nexport type HttpMethod =\n  | 'connect'\n  | 'delete'\n  | 'get'\n  | 'head'\n  | 'options'\n  | 'patch'\n  | 'post'\n  | 'put'\n  | 'trace';\n\nexport type Client<\n  RequestFn = never,\n  Config = unknown,\n  MethodFn = never,\n  BuildUrlFn = never,\n  SseFn = never,\n> = {\n  /**\n   * Returns the final request URL.\n   */\n  buildUrl: BuildUrlFn;\n  getConfig: () => Config;\n  request: RequestFn;\n  setConfig: (config: Config) => Config;\n} & {\n  [K in HttpMethod]: MethodFn;\n} & ([SseFn] extends [never] ? { sse?: never } : { sse: { [K in HttpMethod]: SseFn } });\n\nexport interface Config {\n  /**\n   * Auth token or a function returning auth token. The resolved value will be\n   * added to the request payload as defined by its `security` array.\n   */\n  auth?: ((auth: Auth) => Promise<AuthToken> | AuthToken) | AuthToken;\n  /**\n   * A function for serializing request body parameter. By default,\n   * {@link JSON.stringify()} will be used.\n   */\n  bodySerializer?: BodySerializer | null;\n  /**\n   * An object containing any HTTP headers that you want to pre-populate your\n   * `Headers` object with.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/Headers/Headers#init See more}\n   */\n  headers?:\n    | RequestInit['headers']\n    | Record<\n        string,\n        string | number | boolean | (string | number | boolean)[] | null | undefined | unknown\n      >;\n  /**\n   * The request method.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/fetch#method See more}\n   */\n  method?: Uppercase<HttpMethod>;\n  /**\n   * A function for serializing request query parameters. By default, arrays\n   * will be exploded in form style, objects will be exploded in deepObject\n   * style, and reserved characters are percent-encoded.\n   *\n   * This method will have no effect if the native `paramsSerializer()` Axios\n   * API function is used.\n   *\n   * {@link https://swagger.io/docs/specification/serialization/#query View examples}\n   */\n  querySerializer?: QuerySerializer | QuerySerializerOptions;\n  /**\n   * A function validating request data. This is useful if you want to ensure\n   * the request conforms to the desired shape, so it can be safely sent to\n   * the server.\n   */\n  requestValidator?: (data: unknown) => Promise<unknown>;\n  /**\n   * A function transforming response data before it's returned. This is useful\n   * for post-processing data, e.g. converting ISO strings into Date objects.\n   */\n  responseTransformer?: (data: unknown) => Promise<unknown>;\n  /**\n   * A function validating response data. This is useful if you want to ensure\n   * the response conforms to the desired shape, so it can be safely passed to\n   * the transformers and returned to the user.\n   */\n  responseValidator?: (data: unknown) => Promise<unknown>;\n}\n\ntype IsExactlyNeverOrNeverUndefined<T> = [T] extends [never]\n  ? true\n  : [T] extends [never | undefined]\n    ? [undefined] extends [T]\n      ? false\n      : true\n    : false;\n\nexport type OmitNever<T extends Record<string, unknown>> = {\n  [K in keyof T as IsExactlyNeverOrNeverUndefined<T[K]> extends true ? never : K]: T[K];\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-angular/import-file-extension-ts/core/utils.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { BodySerializer, QuerySerializer } from './bodySerializer.gen.ts';\nimport {\n  type ArraySeparatorStyle,\n  serializeArrayParam,\n  serializeObjectParam,\n  serializePrimitiveParam,\n} from './pathSerializer.gen.ts';\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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-angular/import-file-extension-ts/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport { apiVVersionODataControllerCount, callToTestOrderOfParams, callWithDefaultOptionalParameters, callWithDefaultParameters, callWithDescriptions, callWithDuplicateResponses, callWithNoContentResponse, callWithParameters, callWithResponse, callWithResponseAndNoContentResponse, callWithResponses, callWithResultFromHeader, callWithWeirdParameterNames, collectionFormat, complexParams, complexTypes, deleteCallWithoutParametersAndResponse, deleteFoo, deprecatedCall, dummyA, dummyB, duplicateName, duplicateName2, duplicateName3, duplicateName4, export_, fileResponse, fooWow, getApiVbyApiVersionSimpleOperation, getCallWithOptionalParam, getCallWithoutParametersAndResponse, headCallWithoutParametersAndResponse, import_, multipartRequest, multipartResponse, nonAsciiæøåÆøÅöôêÊ字符串, type Options, optionsCallWithoutParametersAndResponse, patchApiVbyApiVersionNoTag, patchCallWithoutParametersAndResponse, postApiVbyApiVersionFormData, postApiVbyApiVersionRequestBody, postCallWithOptionalParam, postCallWithoutParametersAndResponse, putCallWithoutParametersAndResponse, putWithFormUrlEncoded, testErrorCode, types, uploadFile } from './sdk.gen.ts';\nexport type { _3eNum1Период, _400, AdditionalPropertiesIntegerIssue, AdditionalPropertiesUnknownIssue, AdditionalPropertiesUnknownIssue2, AdditionalPropertiesUnknownIssue3, AdditionalPropertiesUnknownIssueWritable, AnyOfAnyAndNull, AnyOfArrays, ApiVVersionODataControllerCountData, ApiVVersionODataControllerCountResponse, ApiVVersionODataControllerCountResponses, ArrayWithAnyOfProperties, ArrayWithArray, ArrayWithBooleans, ArrayWithNumbers, ArrayWithProperties, ArrayWithReferences, ArrayWithStrings, CallToTestOrderOfParamsData, CallWithDefaultOptionalParametersData, CallWithDefaultParametersData, CallWithDescriptionsData, CallWithDuplicateResponsesData, CallWithDuplicateResponsesError, CallWithDuplicateResponsesErrors, CallWithDuplicateResponsesResponse, CallWithDuplicateResponsesResponses, CallWithNoContentResponseData, CallWithNoContentResponseResponse, CallWithNoContentResponseResponses, CallWithParametersData, CallWithResponseAndNoContentResponseData, CallWithResponseAndNoContentResponseResponse, CallWithResponseAndNoContentResponseResponses, CallWithResponseData, CallWithResponseResponse, CallWithResponseResponses, CallWithResponsesData, CallWithResponsesError, CallWithResponsesErrors, CallWithResponsesResponse, CallWithResponsesResponses, CallWithResultFromHeaderData, CallWithResultFromHeaderErrors, CallWithResultFromHeaderResponses, CallWithWeirdParameterNamesData, CamelCaseCommentWithBreaks, CharactersInDescription, ClientOptions, CollectionFormatData, CommentWithBackticks, CommentWithBackticksAndQuotes, CommentWithBreaks, CommentWithExpressionPlaceholders, CommentWithQuotes, CommentWithReservedCharacters, CommentWithSlashes, ComplexParamsData, ComplexParamsResponse, ComplexParamsResponses, ComplexTypesData, ComplexTypesErrors, ComplexTypesResponse, ComplexTypesResponses, CompositionBaseModel, CompositionExtendedModel, CompositionWithAllOfAndNullable, CompositionWithAnyOf, CompositionWithAnyOfAndNullable, CompositionWithAnyOfAnonymous, CompositionWithNestedAnyAndTypeNull, CompositionWithNestedAnyOfAndNull, CompositionWithOneOf, CompositionWithOneOfAndComplexArrayDictionary, CompositionWithOneOfAndNullable, CompositionWithOneOfAndProperties, CompositionWithOneOfAndSimpleArrayDictionary, CompositionWithOneOfAndSimpleDictionary, CompositionWithOneOfAnonymous, CompositionWithOneOfDiscriminator, ConstValue, Default, DeleteCallWithoutParametersAndResponseData, DeleteFooData, DeleteFooData2, DeleteFooData3, DeprecatedCallData, DeprecatedModel, DictionaryWithArray, DictionaryWithDictionary, DictionaryWithProperties, DictionaryWithPropertiesAndAdditionalProperties, DictionaryWithReference, DictionaryWithString, DummyAData, DummyAResponse, DummyAResponses, DummyBData, DummyBResponse, DummyBResponses, DuplicateName2Data, DuplicateName3Data, DuplicateName4Data, DuplicateNameData, EnumFromDescription, EnumWithExtensions, EnumWithNumbers, EnumWithReplacedCharacters, EnumWithStrings, EnumWithXEnumNames, ExportData, ExternalRefA, ExternalRefB, ExternalSharedModel, File, FileResponseData, FileResponseResponse, FileResponseResponses, FileWritable, FooWowData, FooWowResponses, FreeFormObjectWithAdditionalPropertiesEqEmptyObject, FreeFormObjectWithAdditionalPropertiesEqTrue, FreeFormObjectWithoutAdditionalProperties, GenericSchemaDuplicateIssue1SystemBoolean, GenericSchemaDuplicateIssue1SystemBooleanWritable, GenericSchemaDuplicateIssue1SystemString, GenericSchemaDuplicateIssue1SystemStringWritable, GetApiVbyApiVersionSimpleOperationData, GetApiVbyApiVersionSimpleOperationError, GetApiVbyApiVersionSimpleOperationErrors, GetApiVbyApiVersionSimpleOperationResponse, GetApiVbyApiVersionSimpleOperationResponses, GetCallWithOptionalParamData, GetCallWithoutParametersAndResponseData, HeadCallWithoutParametersAndResponseData, Import, ImportData, ImportResponse, ImportResponses, IoK8sApimachineryPkgApisMetaV1DeleteOptions, IoK8sApimachineryPkgApisMetaV1Preconditions, ModelCircle, ModelFromZendesk, ModelSquare, ModelThatExtends, ModelThatExtendsExtends, ModelWithAdditionalPropertiesEqTrue, ModelWithAdditionalPropertiesRef, ModelWithAnyOfConstantSizeArray, ModelWithAnyOfConstantSizeArrayAndIntersect, ModelWithAnyOfConstantSizeArrayNullable, ModelWithAnyOfConstantSizeArrayWithNSizeAndOptions, ModelWithAnyOfConstantSizeArrayWithNSizeAndOptionsWritable, ModelWithArray, ModelWithArrayReadOnlyAndWriteOnly, ModelWithArrayReadOnlyAndWriteOnlyWritable, ModelWithBackticksInDescription, ModelWithBoolean, ModelWithCircularReference, ModelWithConst, ModelWithConstantSizeArray, ModelWithDictionary, ModelWithDuplicateImports, ModelWithDuplicateProperties, ModelWithEnum, ModelWithEnumFromDescription, ModelWithEnumWithHyphen, ModelWithInteger, ModelWithNestedArrayEnums, ModelWithNestedArrayEnumsData, ModelWithNestedArrayEnumsDataBar, ModelWithNestedArrayEnumsDataFoo, ModelWithNestedCompositionEnums, ModelWithNestedEnums, ModelWithNestedProperties, ModelWithNullableObject, ModelWithNullableString, ModelWithNumericEnumUnion, ModelWithOneOfAndProperties, ModelWithOneOfEnum, ModelWithOrderedProperties, ModelWithPattern, ModelWithPatternWritable, ModelWithPrefixItemsConstantSizeArray, ModelWithProperties, ModelWithPropertiesWritable, ModelWithReadOnlyAndWriteOnly, ModelWithReadOnlyAndWriteOnlyWritable, ModelWithReference, ModelWithReferenceWritable, ModelWithString, ModelWithStringError, MultipartRequestData, MultipartResponseData, MultipartResponseResponse, MultipartResponseResponses, NestedAnyOfArraysNullable, NonAsciiæøåÆøÅöôêÊ字符串Data, NonAsciiæøåÆøÅöôêÊ字符串Response, NonAsciiæøåÆøÅöôêÊ字符串Responses, NonAsciiStringæøåÆøÅöôêÊ字符串, NullableObject, OneOfAllOfIssue, OneOfAllOfIssueWritable, OptionsCallWithoutParametersAndResponseData, Pageable, ParameterSimpleParameterUnused, PatchApiVbyApiVersionNoTagData, PatchApiVbyApiVersionNoTagResponses, PatchCallWithoutParametersAndResponseData, PostApiVbyApiVersionFormDataData, PostApiVbyApiVersionRequestBodyData, PostCallWithOptionalParamData, PostCallWithOptionalParamResponse, PostCallWithOptionalParamResponses, PostCallWithoutParametersAndResponseData, PostServiceWithEmptyTagResponse, PostServiceWithEmptyTagResponse2, PutCallWithoutParametersAndResponseData, PutWithFormUrlEncodedData, SchemaWithFormRestrictedKeys, SimpleBoolean, SimpleFile, SimpleFormData, SimpleInteger, SimpleParameter, SimpleReference, SimpleRequestBody, SimpleString, SimpleStringWithPattern, TestErrorCodeData, TestErrorCodeErrors, TestErrorCodeResponses, TypesData, TypesResponse, TypesResponses, UploadFileData, UploadFileResponse, UploadFileResponses, XFooBar } from './types.gen.ts';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-angular/import-file-extension-ts/sdk.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport { client } from './client.gen.ts';\nimport { type Client, formDataBodySerializer, type Options as Options2, type TDataShape, urlSearchParamsBodySerializer } from './client/index.ts';\nimport type { ApiVVersionODataControllerCountData, ApiVVersionODataControllerCountResponses, CallToTestOrderOfParamsData, CallWithDefaultOptionalParametersData, CallWithDefaultParametersData, CallWithDescriptionsData, CallWithDuplicateResponsesData, CallWithDuplicateResponsesErrors, CallWithDuplicateResponsesResponses, CallWithNoContentResponseData, CallWithNoContentResponseResponses, CallWithParametersData, CallWithResponseAndNoContentResponseData, CallWithResponseAndNoContentResponseResponses, CallWithResponseData, CallWithResponseResponses, CallWithResponsesData, CallWithResponsesErrors, CallWithResponsesResponses, CallWithResultFromHeaderData, CallWithResultFromHeaderErrors, CallWithResultFromHeaderResponses, CallWithWeirdParameterNamesData, CollectionFormatData, ComplexParamsData, ComplexParamsResponses, ComplexTypesData, ComplexTypesErrors, ComplexTypesResponses, DeleteCallWithoutParametersAndResponseData, DeleteFooData3, DeprecatedCallData, DummyAData, DummyAResponses, DummyBData, DummyBResponses, DuplicateName2Data, DuplicateName3Data, DuplicateName4Data, DuplicateNameData, ExportData, FileResponseData, FileResponseResponses, FooWowData, FooWowResponses, GetApiVbyApiVersionSimpleOperationData, GetApiVbyApiVersionSimpleOperationErrors, GetApiVbyApiVersionSimpleOperationResponses, GetCallWithOptionalParamData, GetCallWithoutParametersAndResponseData, HeadCallWithoutParametersAndResponseData, ImportData, ImportResponses, MultipartRequestData, MultipartResponseData, MultipartResponseResponses, NonAsciiæøåÆøÅöôêÊ字符串Data, NonAsciiæøåÆøÅöôêÊ字符串Responses, OptionsCallWithoutParametersAndResponseData, PatchApiVbyApiVersionNoTagData, PatchApiVbyApiVersionNoTagResponses, PatchCallWithoutParametersAndResponseData, PostApiVbyApiVersionFormDataData, PostApiVbyApiVersionRequestBodyData, PostCallWithOptionalParamData, PostCallWithOptionalParamResponses, PostCallWithoutParametersAndResponseData, PutCallWithoutParametersAndResponseData, PutWithFormUrlEncodedData, TestErrorCodeData, TestErrorCodeErrors, TestErrorCodeResponses, TypesData, TypesResponses, UploadFileData, UploadFileResponses } from './types.gen.ts';\n\nexport type Options<TData extends TDataShape = TDataShape, ThrowOnError extends boolean = boolean> = Options2<TData, ThrowOnError> & {\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\nexport const export_ = <ThrowOnError extends boolean = false>(options?: Options<ExportData, ThrowOnError>) => (options?.client ?? client).get<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/no+tag', ...options });\n\nexport const patchApiVbyApiVersionNoTag = <ThrowOnError extends boolean = false>(options?: Options<PatchApiVbyApiVersionNoTagData, ThrowOnError>) => (options?.client ?? client).patch<PatchApiVbyApiVersionNoTagResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/no+tag', ...options });\n\nexport const import_ = <ThrowOnError extends boolean = false>(options: Options<ImportData, ThrowOnError>) => (options.client ?? client).post<ImportResponses, unknown, ThrowOnError>({\n    url: '/api/v{api-version}/no+tag',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options.headers\n    }\n});\n\nexport const fooWow = <ThrowOnError extends boolean = false>(options?: Options<FooWowData, ThrowOnError>) => (options?.client ?? client).put<FooWowResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/no+tag', ...options });\n\nexport const apiVVersionODataControllerCount = <ThrowOnError extends boolean = false>(options?: Options<ApiVVersionODataControllerCountData, ThrowOnError>) => (options?.client ?? client).get<ApiVVersionODataControllerCountResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple/$count', ...options });\n\nexport const getApiVbyApiVersionSimpleOperation = <ThrowOnError extends boolean = false>(options: Options<GetApiVbyApiVersionSimpleOperationData, ThrowOnError>) => (options.client ?? client).get<GetApiVbyApiVersionSimpleOperationResponses, GetApiVbyApiVersionSimpleOperationErrors, ThrowOnError>({ url: '/api/v{api-version}/simple:operation', ...options });\n\nexport const deleteCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<DeleteCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).delete<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const getCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<GetCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).get<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const headCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<HeadCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).head<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const optionsCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<OptionsCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).options<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const patchCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<PatchCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).patch<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const postCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<PostCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).post<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const putCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<PutCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).put<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const deleteFoo = <ThrowOnError extends boolean = false>(options: Options<DeleteFooData3, ThrowOnError>) => (options.client ?? client).delete<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/foo/{foo_param}/bar/{BarParam}', ...options });\n\nexport const callWithDescriptions = <ThrowOnError extends boolean = false>(options?: Options<CallWithDescriptionsData, ThrowOnError>) => (options?.client ?? client).post<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/descriptions', ...options });\n\n/**\n * @deprecated\n */\nexport const deprecatedCall = <ThrowOnError extends boolean = false>(options: Options<DeprecatedCallData, ThrowOnError>) => (options.client ?? client).post<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/parameters/deprecated', ...options });\n\nexport const callWithParameters = <ThrowOnError extends boolean = false>(options: Options<CallWithParametersData, ThrowOnError>) => (options.client ?? client).post<unknown, unknown, ThrowOnError>({\n    url: '/api/v{api-version}/parameters/{parameterPath}',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options.headers\n    }\n});\n\nexport const callWithWeirdParameterNames = <ThrowOnError extends boolean = false>(options: Options<CallWithWeirdParameterNamesData, ThrowOnError>) => (options.client ?? client).post<unknown, unknown, ThrowOnError>({\n    url: '/api/v{api-version}/parameters/{parameter.path.1}/{parameter-path-2}/{PARAMETER-PATH-3}',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options.headers\n    }\n});\n\nexport const getCallWithOptionalParam = <ThrowOnError extends boolean = false>(options: Options<GetCallWithOptionalParamData, ThrowOnError>) => (options.client ?? client).get<unknown, unknown, ThrowOnError>({\n    url: '/api/v{api-version}/parameters',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options.headers\n    }\n});\n\nexport const postCallWithOptionalParam = <ThrowOnError extends boolean = false>(options: Options<PostCallWithOptionalParamData, ThrowOnError>) => (options.client ?? client).post<PostCallWithOptionalParamResponses, unknown, ThrowOnError>({\n    url: '/api/v{api-version}/parameters',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options.headers\n    }\n});\n\nexport const postApiVbyApiVersionRequestBody = <ThrowOnError extends boolean = false>(options?: Options<PostApiVbyApiVersionRequestBodyData, ThrowOnError>) => (options?.client ?? client).post<unknown, unknown, ThrowOnError>({\n    url: '/api/v{api-version}/requestBody',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options?.headers\n    }\n});\n\nexport const postApiVbyApiVersionFormData = <ThrowOnError extends boolean = false>(options?: Options<PostApiVbyApiVersionFormDataData, ThrowOnError>) => (options?.client ?? client).post<unknown, unknown, ThrowOnError>({\n    ...formDataBodySerializer,\n    url: '/api/v{api-version}/formData',\n    ...options,\n    headers: {\n        'Content-Type': null,\n        ...options?.headers\n    }\n});\n\nexport const callWithDefaultParameters = <ThrowOnError extends boolean = false>(options?: Options<CallWithDefaultParametersData, ThrowOnError>) => (options?.client ?? client).get<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/defaults', ...options });\n\nexport const callWithDefaultOptionalParameters = <ThrowOnError extends boolean = false>(options?: Options<CallWithDefaultOptionalParametersData, ThrowOnError>) => (options?.client ?? client).post<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/defaults', ...options });\n\nexport const callToTestOrderOfParams = <ThrowOnError extends boolean = false>(options: Options<CallToTestOrderOfParamsData, ThrowOnError>) => (options.client ?? client).put<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/defaults', ...options });\n\nexport const duplicateName = <ThrowOnError extends boolean = false>(options?: Options<DuplicateNameData, ThrowOnError>) => (options?.client ?? client).delete<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/duplicate', ...options });\n\nexport const duplicateName2 = <ThrowOnError extends boolean = false>(options?: Options<DuplicateName2Data, ThrowOnError>) => (options?.client ?? client).get<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/duplicate', ...options });\n\nexport const duplicateName3 = <ThrowOnError extends boolean = false>(options?: Options<DuplicateName3Data, ThrowOnError>) => (options?.client ?? client).post<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/duplicate', ...options });\n\nexport const duplicateName4 = <ThrowOnError extends boolean = false>(options?: Options<DuplicateName4Data, ThrowOnError>) => (options?.client ?? client).put<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/duplicate', ...options });\n\nexport const callWithNoContentResponse = <ThrowOnError extends boolean = false>(options?: Options<CallWithNoContentResponseData, ThrowOnError>) => (options?.client ?? client).get<CallWithNoContentResponseResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/no-content', ...options });\n\nexport const callWithResponseAndNoContentResponse = <ThrowOnError extends boolean = false>(options?: Options<CallWithResponseAndNoContentResponseData, ThrowOnError>) => (options?.client ?? client).get<CallWithResponseAndNoContentResponseResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/multiple-tags/response-and-no-content', ...options });\n\nexport const dummyA = <ThrowOnError extends boolean = false>(options?: Options<DummyAData, ThrowOnError>) => (options?.client ?? client).get<DummyAResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/multiple-tags/a', ...options });\n\nexport const dummyB = <ThrowOnError extends boolean = false>(options?: Options<DummyBData, ThrowOnError>) => (options?.client ?? client).get<DummyBResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/multiple-tags/b', ...options });\n\nexport const callWithResponse = <ThrowOnError extends boolean = false>(options?: Options<CallWithResponseData, ThrowOnError>) => (options?.client ?? client).get<CallWithResponseResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/response', ...options });\n\nexport const callWithDuplicateResponses = <ThrowOnError extends boolean = false>(options?: Options<CallWithDuplicateResponsesData, ThrowOnError>) => (options?.client ?? client).post<CallWithDuplicateResponsesResponses, CallWithDuplicateResponsesErrors, ThrowOnError>({ url: '/api/v{api-version}/response', ...options });\n\nexport const callWithResponses = <ThrowOnError extends boolean = false>(options?: Options<CallWithResponsesData, ThrowOnError>) => (options?.client ?? client).put<CallWithResponsesResponses, CallWithResponsesErrors, ThrowOnError>({ url: '/api/v{api-version}/response', ...options });\n\nexport const collectionFormat = <ThrowOnError extends boolean = false>(options: Options<CollectionFormatData, ThrowOnError>) => (options.client ?? client).get<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/collectionFormat', ...options });\n\nexport const types = <ThrowOnError extends boolean = false>(options: Options<TypesData, ThrowOnError>) => (options.client ?? client).get<TypesResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/types', ...options });\n\nexport const uploadFile = <ThrowOnError extends boolean = false>(options: Options<UploadFileData, ThrowOnError>) => (options.client ?? client).post<UploadFileResponses, unknown, ThrowOnError>({\n    ...urlSearchParamsBodySerializer,\n    url: '/api/v{api-version}/upload',\n    ...options,\n    headers: {\n        'Content-Type': 'application/x-www-form-urlencoded',\n        ...options.headers\n    }\n});\n\nexport const fileResponse = <ThrowOnError extends boolean = false>(options: Options<FileResponseData, ThrowOnError>) => (options.client ?? client).get<FileResponseResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/file/{id}', ...options });\n\nexport const complexTypes = <ThrowOnError extends boolean = false>(options: Options<ComplexTypesData, ThrowOnError>) => (options.client ?? client).get<ComplexTypesResponses, ComplexTypesErrors, ThrowOnError>({\n    querySerializer: { parameters: { parameterObject: { object: { style: 'form' } } } },\n    url: '/api/v{api-version}/complex',\n    ...options\n});\n\nexport const multipartResponse = <ThrowOnError extends boolean = false>(options?: Options<MultipartResponseData, ThrowOnError>) => (options?.client ?? client).get<MultipartResponseResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/multipart', ...options });\n\nexport const multipartRequest = <ThrowOnError extends boolean = false>(options?: Options<MultipartRequestData, ThrowOnError>) => (options?.client ?? client).post<unknown, unknown, ThrowOnError>({\n    ...formDataBodySerializer,\n    url: '/api/v{api-version}/multipart',\n    ...options,\n    headers: {\n        'Content-Type': null,\n        ...options?.headers\n    }\n});\n\nexport const complexParams = <ThrowOnError extends boolean = false>(options: Options<ComplexParamsData, ThrowOnError>) => (options.client ?? client).put<ComplexParamsResponses, unknown, ThrowOnError>({\n    url: '/api/v{api-version}/complex/{id}',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json-patch+json',\n        ...options.headers\n    }\n});\n\nexport const callWithResultFromHeader = <ThrowOnError extends boolean = false>(options?: Options<CallWithResultFromHeaderData, ThrowOnError>) => (options?.client ?? client).post<CallWithResultFromHeaderResponses, CallWithResultFromHeaderErrors, ThrowOnError>({ url: '/api/v{api-version}/header', ...options });\n\nexport const testErrorCode = <ThrowOnError extends boolean = false>(options: Options<TestErrorCodeData, ThrowOnError>) => (options.client ?? client).post<TestErrorCodeResponses, TestErrorCodeErrors, ThrowOnError>({ url: '/api/v{api-version}/error', ...options });\n\nexport const nonAsciiæøåÆøÅöôêÊ字符串 = <ThrowOnError extends boolean = false>(options: Options<NonAsciiæøåÆøÅöôêÊ字符串Data, ThrowOnError>) => (options.client ?? client).post<NonAsciiæøåÆøÅöôêÊ字符串Responses, unknown, ThrowOnError>({ url: '/api/v{api-version}/non-ascii-æøåÆØÅöôêÊ字符串', ...options });\n\n/**\n * Login User\n */\nexport const putWithFormUrlEncoded = <ThrowOnError extends boolean = false>(options: Options<PutWithFormUrlEncodedData, ThrowOnError>) => (options.client ?? client).put<unknown, unknown, ThrowOnError>({\n    ...urlSearchParamsBodySerializer,\n    url: '/api/v{api-version}/non-ascii-æøåÆØÅöôêÊ字符串',\n    ...options,\n    headers: {\n        'Content-Type': 'application/x-www-form-urlencoded',\n        ...options.headers\n    }\n});\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-angular/import-file-extension-ts/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type ClientOptions = {\n    baseUrl: 'http://localhost:3000/base' | (string & {});\n};\n\n/**\n * Model with number-only name\n */\nexport type _400 = string;\n\n/**\n * External ref to shared model (A)\n */\nexport type ExternalRefA = ExternalSharedModel;\n\n/**\n * External ref to shared model (B)\n */\nexport type ExternalRefB = ExternalSharedModel;\n\n/**\n * Testing multiline comments in string: First line\n * Second line\n *\n * Fourth line\n */\nexport type CamelCaseCommentWithBreaks = number;\n\n/**\n * Testing multiline comments in string: First line\n * Second line\n *\n * Fourth line\n */\nexport type CommentWithBreaks = number;\n\n/**\n * Testing backticks in string: `backticks` and ```multiple backticks``` should work\n */\nexport type CommentWithBackticks = number;\n\n/**\n * Testing backticks and quotes in string: `backticks`, 'quotes', \"double quotes\" and ```multiple backticks``` should work\n */\nexport type CommentWithBackticksAndQuotes = number;\n\n/**\n * Testing slashes in string: \\backwards\\\\\\ and /forwards/// should work\n */\nexport type CommentWithSlashes = number;\n\n/**\n * Testing expression placeholders in string: ${expression} should work\n */\nexport type CommentWithExpressionPlaceholders = number;\n\n/**\n * Testing quotes in string: 'single quote''' and \"double quotes\"\"\" should work\n */\nexport type CommentWithQuotes = number;\n\n/**\n * Testing reserved characters in string: * inline * and ** inline ** should work\n */\nexport type CommentWithReservedCharacters = number;\n\n/**\n * This is a simple number\n */\nexport type SimpleInteger = number;\n\n/**\n * This is a simple boolean\n */\nexport type SimpleBoolean = boolean;\n\n/**\n * This is a simple string\n */\nexport type SimpleString = string;\n\n/**\n * A string with non-ascii (unicode) characters valid in typescript identifiers (æøåÆØÅöÔèÈ字符串)\n */\nexport type NonAsciiStringæøåÆøÅöôêÊ字符串 = string;\n\n/**\n * This is a simple file\n */\nexport type SimpleFile = Blob | File;\n\n/**\n * This is a simple reference\n */\nexport type SimpleReference = ModelWithString;\n\n/**\n * This is a simple string\n */\nexport type SimpleStringWithPattern = string | null;\n\n/**\n * This is a simple enum with strings\n */\nexport type EnumWithStrings = 'Success' | 'Warning' | 'Error' | '\\'Single Quote\\'' | '\"Double Quotes\"' | 'Non-ascii: øæåôöØÆÅÔÖ字符串';\n\nexport type EnumWithReplacedCharacters = '\\'Single Quote\\'' | '\"Double Quotes\"' | 'øæåôöØÆÅÔÖ字符串' | 3.1 | '';\n\n/**\n * This is a simple enum with numbers\n */\nexport type EnumWithNumbers = 1 | 2 | 3 | 1.1 | 1.2 | 1.3 | 100 | 200 | 300 | -100 | -200 | -300 | -1.1 | -1.2 | -1.3;\n\n/**\n * Success=1,Warning=2,Error=3\n */\nexport type EnumFromDescription = number;\n\n/**\n * This is a simple enum with numbers\n */\nexport type EnumWithExtensions = 200 | 400 | 500;\n\nexport type EnumWithXEnumNames = 0 | 1 | 2;\n\n/**\n * This is a simple array with numbers\n */\nexport type ArrayWithNumbers = Array<number>;\n\n/**\n * This is a simple array with booleans\n */\nexport type ArrayWithBooleans = Array<boolean>;\n\n/**\n * This is a simple array with strings\n */\nexport type ArrayWithStrings = Array<string>;\n\n/**\n * This is a simple array with references\n */\nexport type ArrayWithReferences = Array<ModelWithString>;\n\n/**\n * This is a simple array containing an array\n */\nexport type ArrayWithArray = Array<Array<ModelWithString>>;\n\n/**\n * This is a simple array with properties\n */\nexport type ArrayWithProperties = Array<{\n    '16x16'?: CamelCaseCommentWithBreaks;\n    bar?: string;\n}>;\n\n/**\n * This is a simple array with any of properties\n */\nexport type ArrayWithAnyOfProperties = Array<{\n    foo?: string;\n} | {\n    bar?: string;\n}>;\n\nexport type AnyOfAnyAndNull = {\n    data?: unknown | null;\n};\n\n/**\n * This is a simple array with any of properties\n */\nexport type AnyOfArrays = {\n    results?: Array<{\n        foo?: string;\n    } | {\n        bar?: string;\n    }>;\n};\n\n/**\n * This is a string dictionary\n */\nexport type DictionaryWithString = {\n    [key: string]: string;\n};\n\nexport type DictionaryWithPropertiesAndAdditionalProperties = {\n    foo?: number;\n    bar?: boolean;\n    [key: string]: string | number | boolean | undefined;\n};\n\n/**\n * This is a string reference\n */\nexport type DictionaryWithReference = {\n    [key: string]: ModelWithString;\n};\n\n/**\n * This is a complex dictionary\n */\nexport type DictionaryWithArray = {\n    [key: string]: Array<ModelWithString>;\n};\n\n/**\n * This is a string dictionary\n */\nexport type DictionaryWithDictionary = {\n    [key: string]: {\n        [key: string]: string;\n    };\n};\n\n/**\n * This is a complex dictionary\n */\nexport type DictionaryWithProperties = {\n    [key: string]: {\n        foo?: string;\n        bar?: string;\n    };\n};\n\n/**\n * This is a model with one number property\n */\nexport type ModelWithInteger = {\n    /**\n     * This is a simple number property\n     */\n    prop?: number;\n};\n\n/**\n * This is a model with one boolean property\n */\nexport type ModelWithBoolean = {\n    /**\n     * This is a simple boolean property\n     */\n    prop?: boolean;\n};\n\n/**\n * This is a model with one string property\n */\nexport type ModelWithString = {\n    /**\n     * This is a simple string property\n     */\n    prop?: string;\n};\n\n/**\n * This is a model with one string property\n */\nexport type ModelWithStringError = {\n    /**\n     * This is a simple string property\n     */\n    prop?: string;\n};\n\n/**\n * `Comment` or `VoiceComment`. The JSON object for adding voice comments to tickets is different. See [Adding voice comments to tickets](/documentation/ticketing/managing-tickets/adding-voice-comments-to-tickets)\n */\nexport type ModelFromZendesk = string;\n\n/**\n * This is a model with one string property\n */\nexport type ModelWithNullableString = {\n    /**\n     * This is a simple string property\n     */\n    nullableProp1?: string | null;\n    /**\n     * This is a simple string property\n     */\n    nullableRequiredProp1: string | null;\n    /**\n     * This is a simple string property\n     */\n    nullableProp2?: string | null;\n    /**\n     * This is a simple string property\n     */\n    nullableRequiredProp2: string | null;\n    /**\n     * This is a simple enum with strings\n     */\n    'foo_bar-enum'?: 'Success' | 'Warning' | 'Error' | 'ØÆÅ字符串';\n};\n\n/**\n * This is a model with one enum\n */\nexport type ModelWithEnum = {\n    /**\n     * This is a simple enum with strings\n     */\n    'foo_bar-enum'?: 'Success' | 'Warning' | 'Error' | 'ØÆÅ字符串';\n    /**\n     * These are the HTTP error code enums\n     */\n    statusCode?: '100' | '200 FOO' | '300 FOO_BAR' | '400 foo-bar' | '500 foo.bar' | '600 foo&bar';\n    /**\n     * Simple boolean enum\n     */\n    bool?: true;\n};\n\n/**\n * This is a model with one enum with escaped name\n */\nexport type ModelWithEnumWithHyphen = {\n    /**\n     * Foo-Bar-Baz-Qux\n     */\n    'foo-bar-baz-qux'?: '3.0';\n};\n\n/**\n * This is a model with one enum\n */\nexport type ModelWithEnumFromDescription = {\n    /**\n     * Success=1,Warning=2,Error=3\n     */\n    test?: number;\n};\n\n/**\n * This is a model with nested enums\n */\nexport type ModelWithNestedEnums = {\n    dictionaryWithEnum?: {\n        [key: string]: 'Success' | 'Warning' | 'Error';\n    };\n    dictionaryWithEnumFromDescription?: {\n        [key: string]: number;\n    };\n    arrayWithEnum?: Array<'Success' | 'Warning' | 'Error'>;\n    arrayWithDescription?: Array<number>;\n    /**\n     * This is a simple enum with strings\n     */\n    'foo_bar-enum'?: 'Success' | 'Warning' | 'Error' | 'ØÆÅ字符串';\n};\n\n/**\n * This is a model with one property containing a reference\n */\nexport type ModelWithReference = {\n    prop?: ModelWithProperties;\n};\n\n/**\n * This is a model with one property containing an array\n */\nexport type ModelWithArrayReadOnlyAndWriteOnly = {\n    prop?: Array<ModelWithReadOnlyAndWriteOnly>;\n    propWithFile?: Array<Blob | File>;\n    propWithNumber?: Array<number>;\n};\n\n/**\n * This is a model with one property containing an array\n */\nexport type ModelWithArray = {\n    prop?: Array<ModelWithString>;\n    propWithFile?: Array<Blob | File>;\n    propWithNumber?: Array<number>;\n};\n\n/**\n * This is a model with one property containing a dictionary\n */\nexport type ModelWithDictionary = {\n    prop?: {\n        [key: string]: string;\n    };\n};\n\n/**\n * This is a deprecated model with a deprecated property\n *\n * @deprecated\n */\nexport type DeprecatedModel = {\n    /**\n     * This is a deprecated property\n     *\n     * @deprecated\n     */\n    prop?: string;\n};\n\n/**\n * This is a model with one property containing a circular reference\n */\nexport type ModelWithCircularReference = {\n    prop?: ModelWithCircularReference;\n};\n\n/**\n * This is a model with one property with a 'one of' relationship\n */\nexport type CompositionWithOneOf = {\n    propA?: ModelWithString | ModelWithEnum | ModelWithArray | ModelWithDictionary;\n};\n\n/**\n * This is a model with one property with a 'one of' relationship where the options are not $ref\n */\nexport type CompositionWithOneOfAnonymous = {\n    propA?: {\n        propA?: string;\n    } | string | number;\n};\n\n/**\n * Circle\n */\nexport type ModelCircle = {\n    kind: string;\n    radius?: number;\n};\n\n/**\n * Square\n */\nexport type ModelSquare = {\n    kind: string;\n    sideLength?: number;\n};\n\n/**\n * This is a model with one property with a 'one of' relationship where the options are not $ref\n */\nexport type CompositionWithOneOfDiscriminator = ({\n    kind: 'circle';\n} & ModelCircle) | ({\n    kind: 'square';\n} & ModelSquare);\n\n/**\n * This is a model with one property with a 'any of' relationship\n */\nexport type CompositionWithAnyOf = {\n    propA?: ModelWithString | ModelWithEnum | ModelWithArray | ModelWithDictionary;\n};\n\n/**\n * This is a model with one property with a 'any of' relationship where the options are not $ref\n */\nexport type CompositionWithAnyOfAnonymous = {\n    propA?: {\n        propA?: string;\n    } | string | number;\n};\n\n/**\n * This is a model with nested 'any of' property with a type null\n */\nexport type CompositionWithNestedAnyAndTypeNull = {\n    propA?: Array<ModelWithDictionary | null> | Array<ModelWithArray | null>;\n};\n\nexport type _3eNum1Период = 'Bird' | 'Dog';\n\nexport type ConstValue = 'ConstValue';\n\n/**\n * This is a model with one property with a 'any of' relationship where the options are not $ref\n */\nexport type CompositionWithNestedAnyOfAndNull = {\n    /**\n     * Scopes\n     */\n    propA?: Array<_3eNum1Период | ConstValue> | null;\n};\n\n/**\n * This is a model with one property with a 'one of' relationship\n */\nexport type CompositionWithOneOfAndNullable = {\n    propA?: {\n        boolean?: boolean;\n    } | ModelWithEnum | ModelWithArray | ModelWithDictionary | null;\n};\n\n/**\n * This is a model that contains a simple dictionary within composition\n */\nexport type CompositionWithOneOfAndSimpleDictionary = {\n    propA?: boolean | {\n        [key: string]: number;\n    };\n};\n\n/**\n * This is a model that contains a dictionary of simple arrays within composition\n */\nexport type CompositionWithOneOfAndSimpleArrayDictionary = {\n    propA?: boolean | {\n        [key: string]: Array<boolean>;\n    };\n};\n\n/**\n * This is a model that contains a dictionary of complex arrays (composited) within composition\n */\nexport type CompositionWithOneOfAndComplexArrayDictionary = {\n    propA?: boolean | {\n        [key: string]: Array<number | string>;\n    };\n};\n\n/**\n * This is a model with one property with a 'all of' relationship\n */\nexport type CompositionWithAllOfAndNullable = {\n    propA?: ({\n        boolean?: boolean;\n    } & ModelWithEnum & ModelWithArray & ModelWithDictionary) | null;\n};\n\n/**\n * This is a model with one property with a 'any of' relationship\n */\nexport type CompositionWithAnyOfAndNullable = {\n    propA?: {\n        boolean?: boolean;\n    } | ModelWithEnum | ModelWithArray | ModelWithDictionary | null;\n};\n\n/**\n * This is a base model with two simple optional properties\n */\nexport type CompositionBaseModel = {\n    firstName?: string;\n    lastname?: string;\n};\n\n/**\n * This is a model that extends the base model\n */\nexport type CompositionExtendedModel = CompositionBaseModel & {\n    age: number;\n    firstName: string;\n    lastname: string;\n};\n\n/**\n * This is a model with one nested property\n */\nexport type ModelWithProperties = {\n    required: string;\n    readonly requiredAndReadOnly: string;\n    requiredAndNullable: string | null;\n    string?: string;\n    number?: number;\n    boolean?: boolean;\n    reference?: ModelWithString;\n    'property with space'?: string;\n    default?: string;\n    try?: string;\n    readonly '@namespace.string'?: string;\n    readonly '@namespace.integer'?: number;\n};\n\n/**\n * This is a model with one nested property\n */\nexport type ModelWithNestedProperties = {\n    readonly first: {\n        readonly second: {\n            readonly third: string | null;\n        } | null;\n    } | null;\n};\n\n/**\n * This is a model with duplicated properties\n */\nexport type ModelWithDuplicateProperties = {\n    prop?: ModelWithString;\n};\n\n/**\n * This is a model with ordered properties\n */\nexport type ModelWithOrderedProperties = {\n    zebra?: string;\n    apple?: string;\n    hawaii?: string;\n};\n\n/**\n * This is a model with duplicated imports\n */\nexport type ModelWithDuplicateImports = {\n    propA?: ModelWithString;\n    propB?: ModelWithString;\n    propC?: ModelWithString;\n};\n\n/**\n * This is a model that extends another model\n */\nexport type ModelThatExtends = ModelWithString & {\n    propExtendsA?: string;\n    propExtendsB?: ModelWithString;\n};\n\n/**\n * This is a model that extends another model\n */\nexport type ModelThatExtendsExtends = ModelWithString & ModelThatExtends & {\n    propExtendsC?: string;\n    propExtendsD?: ModelWithString;\n};\n\n/**\n * This is a model that contains a some patterns\n */\nexport type ModelWithPattern = {\n    key: string;\n    name: string;\n    readonly enabled?: boolean;\n    readonly modified?: string;\n    id?: string;\n    text?: string;\n    patternWithSingleQuotes?: string;\n    patternWithNewline?: string;\n    patternWithBacktick?: string;\n    patternWithUnicode?: string;\n};\n\nexport type File = {\n    /**\n     * Id\n     */\n    readonly id?: string;\n    /**\n     * Updated at\n     */\n    readonly updated_at?: string;\n    /**\n     * Created at\n     */\n    readonly created_at?: string;\n    /**\n     * Mime\n     */\n    mime: string;\n    /**\n     * File\n     */\n    readonly file?: string;\n};\n\nexport type Default = {\n    name?: string;\n};\n\nexport type Pageable = {\n    page?: number;\n    size?: number;\n    sort?: Array<string>;\n};\n\n/**\n * This is a free-form object without additionalProperties.\n */\nexport type FreeFormObjectWithoutAdditionalProperties = {\n    [key: string]: unknown;\n};\n\n/**\n * This is a free-form object with additionalProperties: true.\n */\nexport type FreeFormObjectWithAdditionalPropertiesEqTrue = {\n    [key: string]: unknown;\n};\n\n/**\n * This is a free-form object with additionalProperties: {}.\n */\nexport type FreeFormObjectWithAdditionalPropertiesEqEmptyObject = {\n    [key: string]: unknown;\n};\n\nexport type ModelWithConst = {\n    String?: 'String';\n    number?: 0;\n    null?: null;\n    withType?: 'Some string';\n};\n\n/**\n * This is a model with one property and additionalProperties: true\n */\nexport type ModelWithAdditionalPropertiesEqTrue = {\n    /**\n     * This is a simple string property\n     */\n    prop?: string;\n    [key: string]: unknown;\n};\n\nexport type NestedAnyOfArraysNullable = {\n    nullableArray?: Array<string | boolean> | null;\n};\n\nexport type CompositionWithOneOfAndProperties = ({\n    foo: SimpleParameter;\n} | {\n    bar: NonAsciiStringæøåÆøÅöôêÊ字符串;\n}) & {\n    baz: number | null;\n    qux: number;\n};\n\n/**\n * An object that can be null\n */\nexport type NullableObject = {\n    foo?: string;\n} | null;\n\n/**\n * Some % character\n */\nexport type CharactersInDescription = string;\n\nexport type ModelWithNullableObject = {\n    data?: NullableObject;\n};\n\n/**\n * An object with additional properties that can be null (anyOf ref + null)\n */\nexport type ModelWithAdditionalPropertiesRef = {\n    [key: string]: NullableObject | null;\n};\n\nexport type ModelWithOneOfEnum = {\n    foo: 'Bar';\n} | {\n    foo: 'Baz';\n} | {\n    foo: 'Qux';\n} | {\n    content: string;\n    foo: 'Quux';\n} | {\n    content: [\n        string,\n        string\n    ];\n    foo: 'Corge';\n};\n\nexport type ModelWithNestedArrayEnumsDataFoo = 'foo' | 'bar';\n\nexport type ModelWithNestedArrayEnumsDataBar = 'baz' | 'qux';\n\nexport type ModelWithNestedArrayEnumsData = {\n    foo?: Array<ModelWithNestedArrayEnumsDataFoo>;\n    bar?: Array<ModelWithNestedArrayEnumsDataBar>;\n};\n\nexport type ModelWithNestedArrayEnums = {\n    array_strings?: Array<string>;\n    data?: ModelWithNestedArrayEnumsData;\n};\n\nexport type ModelWithNestedCompositionEnums = {\n    foo?: ModelWithNestedArrayEnumsDataFoo;\n};\n\nexport type ModelWithReadOnlyAndWriteOnly = {\n    foo: string;\n    readonly bar: string;\n};\n\nexport type ModelWithConstantSizeArray = [\n    number,\n    number\n];\n\nexport type ModelWithAnyOfConstantSizeArray = [\n    number | string,\n    number | string,\n    number | string\n];\n\nexport type ModelWithPrefixItemsConstantSizeArray = [\n    ModelWithInteger,\n    number | string,\n    string\n];\n\nexport type ModelWithAnyOfConstantSizeArrayNullable = [\n    number | null | string,\n    number | null | string,\n    number | null | string\n];\n\nexport type ModelWithAnyOfConstantSizeArrayWithNSizeAndOptions = [\n    number | Import,\n    number | Import\n];\n\nexport type ModelWithAnyOfConstantSizeArrayAndIntersect = [\n    number & string,\n    number & string\n];\n\nexport type ModelWithNumericEnumUnion = {\n    /**\n     * Период\n     */\n    value?: -10 | -1 | 0 | 1 | 3 | 6 | 12;\n};\n\n/**\n * Some description with `back ticks`\n */\nexport type ModelWithBackticksInDescription = {\n    /**\n     * The template `that` should be used for parsing and importing the contents of the CSV file.\n     *\n     * <br/><p>There is one placeholder currently supported:<ul>     <li><b>${x}</b> - refers to the n-th column in the CSV file, e.g. ${1}, ${2}, ...)</li></ul><p>Example of a correct JSON template:</p>\n     * <pre>\n     * [\n     * {\n     * \"resourceType\": \"Asset\",\n     * \"identifier\": {\n     * \"name\": \"${1}\",\n     * \"domain\": {\n     * \"name\": \"${2}\",\n     * \"community\": {\n     * \"name\": \"Some Community\"\n     * }\n     * }\n     * },\n     * \"attributes\" : {\n     * \"00000000-0000-0000-0000-000000003115\" : [ {\n     * \"value\" : \"${3}\"\n     * } ],\n     * \"00000000-0000-0000-0000-000000000222\" : [ {\n     * \"value\" : \"${4}\"\n     * } ]\n     * }\n     * }\n     * ]\n     * </pre>\n     */\n    template?: string;\n};\n\nexport type ModelWithOneOfAndProperties = (SimpleParameter | NonAsciiStringæøåÆøÅöôêÊ字符串) & {\n    baz: number | null;\n    qux: number;\n};\n\n/**\n * Model used to test deduplication strategy (unused)\n */\nexport type ParameterSimpleParameterUnused = string;\n\n/**\n * Model used to test deduplication strategy\n */\nexport type PostServiceWithEmptyTagResponse = string;\n\n/**\n * Model used to test deduplication strategy\n */\nexport type PostServiceWithEmptyTagResponse2 = string;\n\n/**\n * Model used to test deduplication strategy\n */\nexport type DeleteFooData = string;\n\n/**\n * Model used to test deduplication strategy\n */\nexport type DeleteFooData2 = string;\n\n/**\n * Model with restricted keyword name\n */\nexport type Import = string;\n\nexport type SchemaWithFormRestrictedKeys = {\n    description?: string;\n    'x-enum-descriptions'?: string;\n    'x-enum-varnames'?: string;\n    'x-enumNames'?: string;\n    title?: string;\n    object?: {\n        description?: string;\n        'x-enum-descriptions'?: string;\n        'x-enum-varnames'?: string;\n        'x-enumNames'?: string;\n        title?: string;\n    };\n    array?: Array<{\n        description?: string;\n        'x-enum-descriptions'?: string;\n        'x-enum-varnames'?: string;\n        'x-enumNames'?: string;\n        title?: string;\n    }>;\n};\n\n/**\n * This schema was giving PascalCase transformations a hard time\n */\nexport type IoK8sApimachineryPkgApisMetaV1DeleteOptions = {\n    /**\n     * Must be fulfilled before a deletion is carried out. If not possible, a 409 Conflict status will be returned.\n     */\n    preconditions?: IoK8sApimachineryPkgApisMetaV1Preconditions;\n};\n\n/**\n * This schema was giving PascalCase transformations a hard time\n */\nexport type IoK8sApimachineryPkgApisMetaV1Preconditions = {\n    /**\n     * Specifies the target ResourceVersion\n     */\n    resourceVersion?: string;\n    /**\n     * Specifies the target UID.\n     */\n    uid?: string;\n};\n\nexport type AdditionalPropertiesUnknownIssue = {\n    [key: string]: string | number;\n};\n\nexport type AdditionalPropertiesUnknownIssue2 = {\n    [key: string]: string | number;\n};\n\nexport type AdditionalPropertiesUnknownIssue3 = string & {\n    entries: {\n        [key: string]: AdditionalPropertiesUnknownIssue;\n    };\n};\n\nexport type AdditionalPropertiesIntegerIssue = {\n    value: number;\n    [key: string]: number;\n};\n\nexport type OneOfAllOfIssue = ((ConstValue | GenericSchemaDuplicateIssue1SystemBoolean) & _3eNum1Период) | GenericSchemaDuplicateIssue1SystemString;\n\nexport type GenericSchemaDuplicateIssue1SystemBoolean = {\n    item?: boolean;\n    error?: string | null;\n    readonly hasError?: boolean;\n    data?: {\n        [key: string]: never;\n    };\n};\n\nexport type GenericSchemaDuplicateIssue1SystemString = {\n    item?: string | null;\n    error?: string | null;\n    readonly hasError?: boolean;\n};\n\nexport type ExternalSharedModel = {\n    id: string;\n    name?: string;\n};\n\n/**\n * This is a model with one property containing a reference\n */\nexport type ModelWithReferenceWritable = {\n    prop?: ModelWithPropertiesWritable;\n};\n\n/**\n * This is a model with one property containing an array\n */\nexport type ModelWithArrayReadOnlyAndWriteOnlyWritable = {\n    prop?: Array<ModelWithReadOnlyAndWriteOnlyWritable>;\n    propWithFile?: Array<Blob | File>;\n    propWithNumber?: Array<number>;\n};\n\n/**\n * This is a model with one nested property\n */\nexport type ModelWithPropertiesWritable = {\n    required: string;\n    requiredAndNullable: string | null;\n    string?: string;\n    number?: number;\n    boolean?: boolean;\n    reference?: ModelWithString;\n    'property with space'?: string;\n    default?: string;\n    try?: string;\n};\n\n/**\n * This is a model that contains a some patterns\n */\nexport type ModelWithPatternWritable = {\n    key: string;\n    name: string;\n    id?: string;\n    text?: string;\n    patternWithSingleQuotes?: string;\n    patternWithNewline?: string;\n    patternWithBacktick?: string;\n    patternWithUnicode?: string;\n};\n\nexport type FileWritable = {\n    /**\n     * Mime\n     */\n    mime: string;\n};\n\nexport type ModelWithReadOnlyAndWriteOnlyWritable = {\n    foo: string;\n    baz: string;\n};\n\nexport type ModelWithAnyOfConstantSizeArrayWithNSizeAndOptionsWritable = [\n    number | Import,\n    number | Import\n];\n\nexport type AdditionalPropertiesUnknownIssueWritable = {\n    [key: string]: string | number;\n};\n\nexport type OneOfAllOfIssueWritable = ((ConstValue | GenericSchemaDuplicateIssue1SystemBoolean) & _3eNum1Период) | GenericSchemaDuplicateIssue1SystemString;\n\nexport type GenericSchemaDuplicateIssue1SystemBooleanWritable = {\n    item?: boolean;\n    error?: string | null;\n    data?: {\n        [key: string]: never;\n    };\n};\n\nexport type GenericSchemaDuplicateIssue1SystemStringWritable = {\n    item?: string | null;\n    error?: string | null;\n};\n\n/**\n * This is a reusable parameter\n */\nexport type SimpleParameter = string;\n\n/**\n * Parameter with illegal characters\n */\nexport type XFooBar = ModelWithString;\n\n/**\n * A reusable request body\n */\nexport type SimpleRequestBody = ModelWithString;\n\n/**\n * A reusable request body\n */\nexport type SimpleFormData = ModelWithString;\n\nexport type ExportData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no+tag';\n};\n\nexport type PatchApiVbyApiVersionNoTagData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no+tag';\n};\n\nexport type PatchApiVbyApiVersionNoTagResponses = {\n    /**\n     * OK\n     */\n    default: unknown;\n};\n\nexport type ImportData = {\n    body: ModelWithReadOnlyAndWriteOnlyWritable | ModelWithArrayReadOnlyAndWriteOnlyWritable;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no+tag';\n};\n\nexport type ImportResponses = {\n    /**\n     * Success\n     */\n    200: ModelFromZendesk;\n    /**\n     * Default success response\n     */\n    default: ModelWithReadOnlyAndWriteOnly;\n};\n\nexport type ImportResponse = ImportResponses[keyof ImportResponses];\n\nexport type FooWowData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no+tag';\n};\n\nexport type FooWowResponses = {\n    /**\n     * OK\n     */\n    default: unknown;\n};\n\nexport type ApiVVersionODataControllerCountData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple/$count';\n};\n\nexport type ApiVVersionODataControllerCountResponses = {\n    /**\n     * Success\n     */\n    200: ModelFromZendesk;\n};\n\nexport type ApiVVersionODataControllerCountResponse = ApiVVersionODataControllerCountResponses[keyof ApiVVersionODataControllerCountResponses];\n\nexport type GetApiVbyApiVersionSimpleOperationData = {\n    body?: never;\n    path: {\n        /**\n         * foo in method\n         */\n        foo_param: string;\n    };\n    query?: never;\n    url: '/api/v{api-version}/simple:operation';\n};\n\nexport type GetApiVbyApiVersionSimpleOperationErrors = {\n    /**\n     * Default error response\n     */\n    default: ModelWithBoolean;\n};\n\nexport type GetApiVbyApiVersionSimpleOperationError = GetApiVbyApiVersionSimpleOperationErrors[keyof GetApiVbyApiVersionSimpleOperationErrors];\n\nexport type GetApiVbyApiVersionSimpleOperationResponses = {\n    /**\n     * Response is a simple number\n     */\n    200: number;\n};\n\nexport type GetApiVbyApiVersionSimpleOperationResponse = GetApiVbyApiVersionSimpleOperationResponses[keyof GetApiVbyApiVersionSimpleOperationResponses];\n\nexport type DeleteCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type GetCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type HeadCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type OptionsCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type PatchCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type PostCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type PutCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type DeleteFooData3 = {\n    body?: never;\n    headers: {\n        /**\n         * Parameter with illegal characters\n         */\n        'x-Foo-Bar': ModelWithString;\n    };\n    path: {\n        /**\n         * foo in method\n         */\n        foo_param: string;\n        /**\n         * bar in method\n         */\n        BarParam: string;\n    };\n    query?: never;\n    url: '/api/v{api-version}/foo/{foo_param}/bar/{BarParam}';\n};\n\nexport type CallWithDescriptionsData = {\n    body?: never;\n    path?: never;\n    query?: {\n        /**\n         * Testing multiline comments in string: First line\n         * Second line\n         *\n         * Fourth line\n         */\n        parameterWithBreaks?: string;\n        /**\n         * Testing backticks in string: `backticks` and ```multiple backticks``` should work\n         */\n        parameterWithBackticks?: string;\n        /**\n         * Testing slashes in string: \\backwards\\\\\\ and /forwards/// should work\n         */\n        parameterWithSlashes?: string;\n        /**\n         * Testing expression placeholders in string: ${expression} should work\n         */\n        parameterWithExpressionPlaceholders?: string;\n        /**\n         * Testing quotes in string: 'single quote''' and \"double quotes\"\"\" should work\n         */\n        parameterWithQuotes?: string;\n        /**\n         * Testing reserved characters in string: * inline * and ** inline ** should work\n         */\n        parameterWithReservedCharacters?: string;\n    };\n    url: '/api/v{api-version}/descriptions';\n};\n\nexport type DeprecatedCallData = {\n    body?: never;\n    headers: {\n        /**\n         * This parameter is deprecated\n         *\n         * @deprecated\n         */\n        parameter: DeprecatedModel | null;\n    };\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/parameters/deprecated';\n};\n\nexport type CallWithParametersData = {\n    /**\n     * This is the parameter that goes into the body\n     */\n    body: {\n        [key: string]: unknown;\n    } | null;\n    headers: {\n        /**\n         * This is the parameter that goes into the header\n         */\n        parameterHeader: string | null;\n    };\n    path: {\n        /**\n         * This is the parameter that goes into the path\n         */\n        parameterPath: string | null;\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string | null;\n    };\n    query: {\n        foo_ref_enum?: ModelWithNestedArrayEnumsDataFoo;\n        foo_all_of_enum: ModelWithNestedArrayEnumsDataFoo;\n        /**\n         * This is the parameter that goes into the query params\n         */\n        cursor: string | null;\n    };\n    url: '/api/v{api-version}/parameters/{parameterPath}';\n};\n\nexport type CallWithWeirdParameterNamesData = {\n    /**\n     * This is the parameter that goes into the body\n     */\n    body: ModelWithString | null;\n    headers: {\n        /**\n         * This is the parameter that goes into the request header\n         */\n        'parameter.header': string | null;\n    };\n    path: {\n        /**\n         * This is the parameter that goes into the path\n         */\n        'parameter.path.1'?: string;\n        /**\n         * This is the parameter that goes into the path\n         */\n        'parameter-path-2'?: string;\n        /**\n         * This is the parameter that goes into the path\n         */\n        'PARAMETER-PATH-3'?: string;\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string | null;\n    };\n    query: {\n        /**\n         * This is the parameter with a reserved keyword\n         */\n        default?: string;\n        /**\n         * This is the parameter that goes into the request query params\n         */\n        'parameter-query': string | null;\n    };\n    url: '/api/v{api-version}/parameters/{parameter.path.1}/{parameter-path-2}/{PARAMETER-PATH-3}';\n};\n\nexport type GetCallWithOptionalParamData = {\n    /**\n     * This is a required parameter\n     */\n    body: ModelWithOneOfEnum;\n    path?: never;\n    query?: {\n        /**\n         * This is an optional parameter\n         */\n        page?: number;\n    };\n    url: '/api/v{api-version}/parameters';\n};\n\nexport type PostCallWithOptionalParamData = {\n    /**\n     * This is an optional parameter\n     */\n    body?: {\n        offset?: number | null;\n    };\n    path?: never;\n    query: {\n        /**\n         * This is a required parameter\n         */\n        parameter: Pageable;\n    };\n    url: '/api/v{api-version}/parameters';\n};\n\nexport type PostCallWithOptionalParamResponses = {\n    /**\n     * Response is a simple number\n     */\n    200: number;\n    /**\n     * Success\n     */\n    204: void;\n};\n\nexport type PostCallWithOptionalParamResponse = PostCallWithOptionalParamResponses[keyof PostCallWithOptionalParamResponses];\n\nexport type PostApiVbyApiVersionRequestBodyData = {\n    /**\n     * A reusable request body\n     */\n    body?: SimpleRequestBody;\n    path?: never;\n    query?: {\n        /**\n         * This is a reusable parameter\n         */\n        parameter?: string;\n    };\n    url: '/api/v{api-version}/requestBody';\n};\n\nexport type PostApiVbyApiVersionFormDataData = {\n    /**\n     * A reusable request body\n     */\n    body?: SimpleFormData;\n    path?: never;\n    query?: {\n        /**\n         * This is a reusable parameter\n         */\n        parameter?: string;\n    };\n    url: '/api/v{api-version}/formData';\n};\n\nexport type CallWithDefaultParametersData = {\n    body?: never;\n    path?: never;\n    query?: {\n        /**\n         * This is a simple string with default value\n         */\n        parameterString?: string | null;\n        /**\n         * This is a simple number with default value\n         */\n        parameterNumber?: number | null;\n        /**\n         * This is a simple boolean with default value\n         */\n        parameterBoolean?: boolean | null;\n        /**\n         * This is a simple enum with default value\n         */\n        parameterEnum?: 'Success' | 'Warning' | 'Error';\n        /**\n         * This is a simple model with default value\n         */\n        parameterModel?: ModelWithString | null;\n    };\n    url: '/api/v{api-version}/defaults';\n};\n\nexport type CallWithDefaultOptionalParametersData = {\n    body?: never;\n    path?: never;\n    query?: {\n        /**\n         * This is a simple string that is optional with default value\n         */\n        parameterString?: string;\n        /**\n         * This is a simple number that is optional with default value\n         */\n        parameterNumber?: number;\n        /**\n         * This is a simple boolean that is optional with default value\n         */\n        parameterBoolean?: boolean;\n        /**\n         * This is a simple enum that is optional with default value\n         */\n        parameterEnum?: 'Success' | 'Warning' | 'Error';\n        /**\n         * This is a simple model that is optional with default value\n         */\n        parameterModel?: ModelWithString;\n    };\n    url: '/api/v{api-version}/defaults';\n};\n\nexport type CallToTestOrderOfParamsData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * This is a optional string with default\n         */\n        parameterOptionalStringWithDefault?: string;\n        /**\n         * This is a optional string with empty default\n         */\n        parameterOptionalStringWithEmptyDefault?: string;\n        /**\n         * This is a optional string with no default\n         */\n        parameterOptionalStringWithNoDefault?: string;\n        /**\n         * This is a string with default\n         */\n        parameterStringWithDefault: string;\n        /**\n         * This is a string with empty default\n         */\n        parameterStringWithEmptyDefault: string;\n        /**\n         * This is a string with no default\n         */\n        parameterStringWithNoDefault: string;\n        /**\n         * This is a string that can be null with no default\n         */\n        parameterStringNullableWithNoDefault?: string | null;\n        /**\n         * This is a string that can be null with default\n         */\n        parameterStringNullableWithDefault?: string | null;\n    };\n    url: '/api/v{api-version}/defaults';\n};\n\nexport type DuplicateNameData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/duplicate';\n};\n\nexport type DuplicateName2Data = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/duplicate';\n};\n\nexport type DuplicateName3Data = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/duplicate';\n};\n\nexport type DuplicateName4Data = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/duplicate';\n};\n\nexport type CallWithNoContentResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no-content';\n};\n\nexport type CallWithNoContentResponseResponses = {\n    /**\n     * Success\n     */\n    204: void;\n};\n\nexport type CallWithNoContentResponseResponse = CallWithNoContentResponseResponses[keyof CallWithNoContentResponseResponses];\n\nexport type CallWithResponseAndNoContentResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multiple-tags/response-and-no-content';\n};\n\nexport type CallWithResponseAndNoContentResponseResponses = {\n    /**\n     * Response is a simple number\n     */\n    200: number;\n    /**\n     * Success\n     */\n    204: void;\n};\n\nexport type CallWithResponseAndNoContentResponseResponse = CallWithResponseAndNoContentResponseResponses[keyof CallWithResponseAndNoContentResponseResponses];\n\nexport type DummyAData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multiple-tags/a';\n};\n\nexport type DummyAResponses = {\n    200: _400;\n};\n\nexport type DummyAResponse = DummyAResponses[keyof DummyAResponses];\n\nexport type DummyBData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multiple-tags/b';\n};\n\nexport type DummyBResponses = {\n    /**\n     * Success\n     */\n    204: void;\n};\n\nexport type DummyBResponse = DummyBResponses[keyof DummyBResponses];\n\nexport type CallWithResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/response';\n};\n\nexport type CallWithResponseResponses = {\n    default: Import;\n};\n\nexport type CallWithResponseResponse = CallWithResponseResponses[keyof CallWithResponseResponses];\n\nexport type CallWithDuplicateResponsesData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/response';\n};\n\nexport type CallWithDuplicateResponsesErrors = {\n    /**\n     * Message for 500 error\n     */\n    500: ModelWithStringError;\n    /**\n     * Message for 501 error\n     */\n    501: ModelWithStringError;\n    /**\n     * Message for 502 error\n     */\n    502: ModelWithStringError;\n    /**\n     * Message for 4XX errors\n     */\n    '4XX': DictionaryWithArray;\n    /**\n     * Default error response\n     */\n    default: ModelWithBoolean;\n};\n\nexport type CallWithDuplicateResponsesError = CallWithDuplicateResponsesErrors[keyof CallWithDuplicateResponsesErrors];\n\nexport type CallWithDuplicateResponsesResponses = {\n    /**\n     * Message for 200 response\n     */\n    200: ModelWithBoolean & ModelWithInteger;\n    /**\n     * Message for 201 response\n     */\n    201: ModelWithString;\n    /**\n     * Message for 202 response\n     */\n    202: ModelWithString;\n};\n\nexport type CallWithDuplicateResponsesResponse = CallWithDuplicateResponsesResponses[keyof CallWithDuplicateResponsesResponses];\n\nexport type CallWithResponsesData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/response';\n};\n\nexport type CallWithResponsesErrors = {\n    /**\n     * Message for 500 error\n     */\n    500: ModelWithStringError;\n    /**\n     * Message for 501 error\n     */\n    501: ModelWithStringError;\n    /**\n     * Message for 502 error\n     */\n    502: ModelWithStringError;\n    /**\n     * Message for default response\n     */\n    default: ModelWithStringError;\n};\n\nexport type CallWithResponsesError = CallWithResponsesErrors[keyof CallWithResponsesErrors];\n\nexport type CallWithResponsesResponses = {\n    /**\n     * Message for 200 response\n     */\n    200: {\n        readonly '@namespace.string'?: string;\n        readonly '@namespace.integer'?: number;\n        readonly value?: Array<ModelWithString>;\n    };\n    /**\n     * Message for 201 response\n     */\n    201: ModelThatExtends;\n    /**\n     * Message for 202 response\n     */\n    202: ModelThatExtendsExtends;\n};\n\nexport type CallWithResponsesResponse = CallWithResponsesResponses[keyof CallWithResponsesResponses];\n\nexport type CollectionFormatData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * This is an array parameter that is sent as csv format (comma-separated values)\n         */\n        parameterArrayCSV: Array<string> | null;\n        /**\n         * This is an array parameter that is sent as ssv format (space-separated values)\n         */\n        parameterArraySSV: Array<string> | null;\n        /**\n         * This is an array parameter that is sent as tsv format (tab-separated values)\n         */\n        parameterArrayTSV: Array<string> | null;\n        /**\n         * This is an array parameter that is sent as pipes format (pipe-separated values)\n         */\n        parameterArrayPipes: Array<string> | null;\n        /**\n         * This is an array parameter that is sent as multi format (multiple parameter instances)\n         */\n        parameterArrayMulti: Array<string> | null;\n    };\n    url: '/api/v{api-version}/collectionFormat';\n};\n\nexport type TypesData = {\n    body?: never;\n    path?: {\n        /**\n         * This is a number parameter\n         */\n        id?: number;\n    };\n    query: {\n        /**\n         * This is a number parameter\n         */\n        parameterNumber: number;\n        /**\n         * This is a string parameter\n         */\n        parameterString: string | null;\n        /**\n         * This is a boolean parameter\n         */\n        parameterBoolean: boolean | null;\n        /**\n         * This is an object parameter\n         */\n        parameterObject: {\n            [key: string]: unknown;\n        } | null;\n        /**\n         * This is an array parameter\n         */\n        parameterArray: Array<string> | null;\n        /**\n         * This is a dictionary parameter\n         */\n        parameterDictionary: {\n            [key: string]: unknown;\n        } | null;\n        /**\n         * This is an enum parameter\n         */\n        parameterEnum: 'Success' | 'Warning' | 'Error' | null;\n    };\n    url: '/api/v{api-version}/types';\n};\n\nexport type TypesResponses = {\n    /**\n     * Response is a simple number\n     */\n    200: number;\n    /**\n     * Response is a simple string\n     */\n    201: string;\n    /**\n     * Response is a simple boolean\n     */\n    202: boolean;\n    /**\n     * Response is a simple object\n     */\n    203: {\n        [key: string]: unknown;\n    };\n};\n\nexport type TypesResponse = TypesResponses[keyof TypesResponses];\n\nexport type UploadFileData = {\n    body: Blob | File;\n    path: {\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string | null;\n    };\n    query?: never;\n    url: '/api/v{api-version}/upload';\n};\n\nexport type UploadFileResponses = {\n    200: boolean;\n};\n\nexport type UploadFileResponse = UploadFileResponses[keyof UploadFileResponses];\n\nexport type FileResponseData = {\n    body?: never;\n    path: {\n        id: string;\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string;\n    };\n    query?: never;\n    url: '/api/v{api-version}/file/{id}';\n};\n\nexport type FileResponseResponses = {\n    /**\n     * Success\n     */\n    200: Blob | File;\n};\n\nexport type FileResponseResponse = FileResponseResponses[keyof FileResponseResponses];\n\nexport type ComplexTypesData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * Parameter containing object\n         */\n        parameterObject: {\n            first?: {\n                second?: {\n                    third?: string;\n                };\n            };\n        };\n        /**\n         * Parameter containing reference\n         */\n        parameterReference: ModelWithString;\n    };\n    url: '/api/v{api-version}/complex';\n};\n\nexport type ComplexTypesErrors = {\n    /**\n     * 400 `server` error\n     */\n    400: unknown;\n    /**\n     * 500 server error\n     */\n    500: unknown;\n};\n\nexport type ComplexTypesResponses = {\n    /**\n     * Successful response\n     */\n    200: Array<ModelWithString>;\n};\n\nexport type ComplexTypesResponse = ComplexTypesResponses[keyof ComplexTypesResponses];\n\nexport type MultipartResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multipart';\n};\n\nexport type MultipartResponseResponses = {\n    /**\n     * OK\n     */\n    200: {\n        file?: Blob | File;\n        metadata?: {\n            foo?: string;\n            bar?: string;\n        };\n    };\n};\n\nexport type MultipartResponseResponse = MultipartResponseResponses[keyof MultipartResponseResponses];\n\nexport type MultipartRequestData = {\n    body?: {\n        content?: Blob | File;\n        data?: ModelWithString | null;\n    };\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multipart';\n};\n\nexport type ComplexParamsData = {\n    body?: {\n        readonly key: string | null;\n        name: string | null;\n        enabled?: boolean;\n        type: 'Monkey' | 'Horse' | 'Bird';\n        listOfModels?: Array<ModelWithString> | null;\n        listOfStrings?: Array<string> | null;\n        parameters: ModelWithString | ModelWithEnum | ModelWithArray | ModelWithDictionary;\n        readonly user?: {\n            readonly id?: number;\n            readonly name?: string | null;\n        };\n    };\n    path: {\n        id: number;\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string;\n    };\n    query?: never;\n    url: '/api/v{api-version}/complex/{id}';\n};\n\nexport type ComplexParamsResponses = {\n    /**\n     * Success\n     */\n    200: ModelWithString;\n};\n\nexport type ComplexParamsResponse = ComplexParamsResponses[keyof ComplexParamsResponses];\n\nexport type CallWithResultFromHeaderData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/header';\n};\n\nexport type CallWithResultFromHeaderErrors = {\n    /**\n     * 400 server error\n     */\n    400: unknown;\n    /**\n     * 500 server error\n     */\n    500: unknown;\n};\n\nexport type CallWithResultFromHeaderResponses = {\n    /**\n     * Successful response\n     */\n    200: unknown;\n};\n\nexport type TestErrorCodeData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * Status code to return\n         */\n        status: number;\n    };\n    url: '/api/v{api-version}/error';\n};\n\nexport type TestErrorCodeErrors = {\n    /**\n     * Custom message: Internal Server Error\n     */\n    500: unknown;\n    /**\n     * Custom message: Not Implemented\n     */\n    501: unknown;\n    /**\n     * Custom message: Bad Gateway\n     */\n    502: unknown;\n    /**\n     * Custom message: Service Unavailable\n     */\n    503: unknown;\n};\n\nexport type TestErrorCodeResponses = {\n    /**\n     * Custom message: Successful response\n     */\n    200: unknown;\n};\n\nexport type NonAsciiæøåÆøÅöôêÊ字符串Data = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * Dummy input param\n         */\n        nonAsciiParamæøåÆØÅöôêÊ: number;\n    };\n    url: '/api/v{api-version}/non-ascii-æøåÆØÅöôêÊ字符串';\n};\n\nexport type NonAsciiæøåÆøÅöôêÊ字符串Responses = {\n    /**\n     * Successful response\n     */\n    200: Array<NonAsciiStringæøåÆøÅöôêÊ字符串>;\n};\n\nexport type NonAsciiæøåÆøÅöôêÊ字符串Response = NonAsciiæøåÆøÅöôêÊ字符串Responses[keyof NonAsciiæøåÆøÅöôêÊ字符串Responses];\n\nexport type PutWithFormUrlEncodedData = {\n    body: ArrayWithStrings;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/non-ascii-æøåÆØÅöôêÊ字符串';\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-angular/sdk-client-optional/client/client.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { HttpResponse } from '@angular/common/http';\nimport { HttpClient, HttpErrorResponse, HttpEventType, HttpRequest } from '@angular/common/http';\nimport {\n  assertInInjectionContext,\n  inject,\n  provideAppInitializer,\n  runInInjectionContext,\n} from '@angular/core';\nimport { firstValueFrom } from 'rxjs';\nimport { filter } from 'rxjs/operators';\n\nimport { createSseClient } from '../core/serverSentEvents.gen';\nimport type { HttpMethod } from '../core/types.gen';\nimport { getValidRequestBody } from '../core/utils.gen';\nimport type {\n  Client,\n  Config,\n  RequestOptions,\n  ResolvedRequestOptions,\n  ResponseStyle,\n} from './types.gen';\nimport {\n  buildUrl,\n  createConfig,\n  createInterceptors,\n  mergeConfigs,\n  mergeHeaders,\n  setAuthParams,\n} from './utils.gen';\n\nexport function provideHeyApiClient(client: Client) {\n  return provideAppInitializer(() => {\n    const httpClient = inject(HttpClient);\n    client.setConfig({ httpClient });\n  });\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<\n    HttpRequest<unknown>,\n    HttpResponse<unknown>,\n    unknown,\n    ResolvedRequestOptions\n  >();\n\n  const requestOptions = <\n    TData = unknown,\n    ThrowOnError extends boolean = false,\n    TResponseStyle extends ResponseStyle = 'fields',\n  >(\n    options: RequestOptions<TData, TResponseStyle, ThrowOnError>,\n  ) => {\n    const opts = {\n      ..._config,\n      ...options,\n      headers: mergeHeaders(_config.headers, options.headers),\n      httpClient: options.httpClient ?? _config.httpClient,\n      serializedBody: undefined as string | undefined,\n    };\n\n    if (!opts.httpClient) {\n      if (opts.injector) {\n        opts.httpClient = runInInjectionContext(opts.injector, () => inject(HttpClient));\n      } else {\n        assertInInjectionContext(requestOptions);\n        opts.httpClient = inject(HttpClient);\n      }\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 url = buildUrl(opts as any);\n\n    const req = new HttpRequest<unknown>(opts.method ?? 'GET', url, getValidRequestBody(opts), {\n      redirect: 'follow',\n      ...opts,\n    });\n\n    return { opts, req, url };\n  };\n\n  const beforeRequest = async (options: RequestOptions) => {\n    const { opts, req, url } = requestOptions(options);\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    return { opts, req, url };\n  };\n\n  const request: Client['request'] = async (options) => {\n    // @ts-expect-error\n    const { opts, req: initialReq } = await beforeRequest(options);\n\n    let req = initialReq;\n\n    for (const fn of interceptors.request.fns) {\n      if (fn) {\n        req = await fn(req, opts as any);\n      }\n    }\n\n    const result: {\n      request: HttpRequest<unknown>;\n      response: any;\n    } = {\n      request: req,\n      response: null,\n    };\n\n    try {\n      result.response = (await firstValueFrom(\n        opts\n          .httpClient!.request(req)\n          .pipe(filter((event) => event.type === HttpEventType.Response)),\n      )) as HttpResponse<unknown>;\n\n      for (const fn of interceptors.response.fns) {\n        if (fn) {\n          result.response = await fn(result.response, req, opts as any);\n        }\n      }\n\n      let bodyResponse = result.response.body;\n\n      if (opts.responseValidator) {\n        await opts.responseValidator(bodyResponse);\n      }\n\n      if (opts.responseTransformer) {\n        bodyResponse = await opts.responseTransformer(bodyResponse);\n      }\n\n      return opts.responseStyle === 'data' ? bodyResponse : { data: bodyResponse, ...result };\n    } catch (error) {\n      if (error instanceof HttpErrorResponse) {\n        result.response = error;\n      }\n\n      let finalError = error instanceof HttpErrorResponse ? error.error : error;\n\n      for (const fn of interceptors.error.fns) {\n        if (fn) {\n          finalError = (await fn(finalError, result.response as any, req, opts as any)) as string;\n        }\n      }\n\n      if (opts.throwOnError) {\n        throw finalError;\n      }\n\n      return opts.responseStyle === 'data'\n        ? undefined\n        : {\n            error: finalError,\n            ...result,\n          };\n    }\n  };\n\n  const makeMethodFn = (method: Uppercase<HttpMethod>) => (options: RequestOptions) =>\n    request({ ...options, method });\n\n  const makeSseFn = (method: Uppercase<HttpMethod>) => async (options: RequestOptions) => {\n    const { opts, url } = await beforeRequest(options);\n    return createSseClient({\n      ...opts,\n      body: opts.body as BodyInit | null | undefined,\n      headers: opts.headers as unknown as Record<string, string>,\n      method,\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    requestOptions: (options) => {\n      if (options.security) {\n        throw new Error('Security is not supported in requestOptions');\n      }\n\n      if (options.requestValidator) {\n        throw new Error('Request validation is not supported in requestOptions');\n      }\n\n      return requestOptions(options).req;\n    },\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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-angular/sdk-client-optional/client/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type { Auth } from '../core/auth.gen';\nexport type { QuerySerializerOptions } from '../core/bodySerializer.gen';\nexport {\n  formDataBodySerializer,\n  jsonBodySerializer,\n  urlSearchParamsBodySerializer,\n} from '../core/bodySerializer.gen';\nexport { buildClientParams } from '../core/params.gen';\nexport { serializeQueryKeyValue } from '../core/queryKeySerializer.gen';\nexport { createClient } from './client.gen';\nexport type {\n  Client,\n  ClientOptions,\n  Config,\n  CreateClientConfig,\n  Options,\n  RequestOptions,\n  RequestResult,\n  ResolvedRequestOptions,\n  ResponseStyle,\n  TDataShape,\n} from './types.gen';\nexport { createConfig, mergeHeaders } from './utils.gen';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-angular/sdk-client-optional/client/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type {\n  HttpClient,\n  HttpErrorResponse,\n  HttpHeaders,\n  HttpRequest,\n  HttpResponse,\n} from '@angular/common/http';\nimport type { Injector } from '@angular/core';\n\nimport type { Auth } from '../core/auth.gen';\nimport type {\n  ServerSentEventsOptions,\n  ServerSentEventsResult,\n} from '../core/serverSentEvents.gen';\nimport type { Client as CoreClient, Config as CoreConfig } from '../core/types.gen';\nimport type { Middleware } from './utils.gen';\n\nexport type ResponseStyle = 'data' | 'fields';\n\nexport interface Config<T extends ClientOptions = ClientOptions>\n  extends Omit<RequestInit, 'body' | 'headers' | 'method'>, Omit<CoreConfig, 'headers'> {\n  /**\n   * Base URL for all requests made by this client.\n   */\n  baseUrl?: T['baseUrl'];\n  /**\n   * An object containing any HTTP headers that you want to pre-populate your\n   * `HttpHeaders` object with.\n   *\n   * {@link https://angular.dev/api/common/http/HttpHeaders#constructor See more}\n   */\n  headers?:\n    | HttpHeaders\n    | Record<\n        string,\n        string | number | boolean | (string | number | boolean)[] | null | undefined | unknown\n      >;\n  /**\n   * The HTTP client to use for making requests.\n   */\n  httpClient?: HttpClient;\n  /**\n   * Should we return only data or multiple fields (data, error, response, etc.)?\n   *\n   * @default 'fields'\n   */\n  responseStyle?: ResponseStyle;\n\n  /**\n   * Throw an error instead of returning it in the response?\n   *\n   * @default false\n   */\n  throwOnError?: T['throwOnError'];\n}\n\nexport interface RequestOptions<\n  TData = unknown,\n  TResponseStyle extends ResponseStyle = 'fields',\n  ThrowOnError extends boolean = boolean,\n  Url extends string = string,\n>\n  extends\n    Config<{\n      responseStyle: TResponseStyle;\n      throwOnError: ThrowOnError;\n    }>,\n    Pick<\n      ServerSentEventsOptions<TData>,\n      | 'onRequest'\n      | 'onSseError'\n      | 'onSseEvent'\n      | 'sseDefaultRetryDelay'\n      | 'sseMaxRetryAttempts'\n      | 'sseMaxRetryDelay'\n    > {\n  /**\n   * Any body that you want to add to your request.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/fetch#body}\n   */\n  body?: unknown;\n  /**\n   * Optional custom injector for dependency resolution if you don't implicitly or explicitly provide one.\n   */\n  injector?: Injector;\n  path?: Record<string, unknown>;\n  query?: Record<string, unknown>;\n  /**\n   * Security mechanism(s) to use for the request.\n   */\n  security?: ReadonlyArray<Auth>;\n  url: Url;\n}\n\nexport interface ResolvedRequestOptions<\n  TResponseStyle extends ResponseStyle = 'fields',\n  ThrowOnError extends boolean = boolean,\n  Url extends string = string,\n> extends RequestOptions<unknown, TResponseStyle, ThrowOnError, Url> {\n  serializedBody?: string;\n}\n\nexport type RequestResult<\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = boolean,\n  TResponseStyle extends ResponseStyle = 'fields',\n> = Promise<\n  ThrowOnError extends true\n    ? TResponseStyle extends 'data'\n      ? TData extends Record<string, unknown>\n        ? TData[keyof TData]\n        : TData\n      : {\n          data: TData extends Record<string, unknown> ? TData[keyof TData] : TData;\n          request: HttpRequest<unknown>;\n          response: HttpResponse<TData>;\n        }\n    : TResponseStyle extends 'data'\n      ? (TData extends Record<string, unknown> ? TData[keyof TData] : TData) | undefined\n      :\n          | {\n              data: TData extends Record<string, unknown> ? TData[keyof TData] : TData;\n              error: undefined;\n              request: HttpRequest<unknown>;\n              response: HttpResponse<TData>;\n            }\n          | {\n              data: undefined;\n              error: TError[keyof TError];\n              request: HttpRequest<unknown>;\n              response: HttpErrorResponse & {\n                error: TError[keyof TError] | null;\n              };\n            }\n>;\n\nexport interface ClientOptions {\n  baseUrl?: string;\n  responseStyle?: ResponseStyle;\n  throwOnError?: boolean;\n}\n\ntype MethodFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'>,\n) => RequestResult<TData, TError, ThrowOnError, TResponseStyle>;\n\ntype SseFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'>,\n) => Promise<ServerSentEventsResult<TData, TError>>;\n\ntype RequestFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'> &\n    Pick<Required<RequestOptions<TData, TResponseStyle, ThrowOnError>>, 'method'>,\n) => RequestResult<TData, TError, ThrowOnError, TResponseStyle>;\n\ntype RequestOptionsFn = <\n  T,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: RequestOptions<T, TResponseStyle, ThrowOnError>,\n) => HttpRequest<T>;\n\ntype BuildUrlFn = <\n  TData extends {\n    body?: unknown;\n    path?: Record<string, unknown>;\n    query?: Record<string, unknown>;\n    url: string;\n  },\n>(\n  options: TData & Options<TData>,\n) => string;\n\nexport type Client = CoreClient<RequestFn, Config, MethodFn, BuildUrlFn, SseFn> & {\n  interceptors: Middleware<\n    HttpRequest<unknown>,\n    HttpResponse<unknown>,\n    unknown,\n    ResolvedRequestOptions\n  >;\n  requestOptions: RequestOptionsFn;\n};\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 = ClientOptions> = (\n  override?: Config<ClientOptions & T>,\n) => Config<Required<ClientOptions> & T>;\n\nexport interface TDataShape {\n  body?: unknown;\n  headers?: unknown;\n  path?: unknown;\n  query?: unknown;\n  url: string;\n}\n\ntype OmitKeys<T, K> = Pick<T, Exclude<keyof T, K>>;\n\nexport type Options<\n  TData extends TDataShape = TDataShape,\n  ThrowOnError extends boolean = boolean,\n  TResponse = unknown,\n  TResponseStyle extends ResponseStyle = 'fields',\n> = OmitKeys<\n  RequestOptions<TResponse, TResponseStyle, ThrowOnError>,\n  'body' | 'path' | 'query' | 'url'\n> &\n  ([TData] extends [never] ? unknown : Omit<TData, 'url'>);\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-angular/sdk-client-optional/client/utils.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport { HttpHeaders } from '@angular/common/http';\n\nimport { getAuthToken } from '../core/auth.gen';\nimport type {\n  QuerySerializer,\n  QuerySerializerOptions,\n} from '../core/bodySerializer.gen';\nimport {\n  serializeArrayParam,\n  serializeObjectParam,\n  serializePrimitiveParam,\n} from '../core/pathSerializer.gen';\nimport type { Client, ClientOptions, Config, RequestOptions } from './types.gen';\n\ninterface PathSerializer {\n  path: Record<string, unknown>;\n  url: string;\n}\n\nconst PATH_PARAM_RE = /\\{[^{}]+\\}/g;\n\ntype ArrayStyle = 'form' | 'spaceDelimited' | 'pipeDelimited';\ntype MatrixStyle = 'label' | 'matrix' | 'simple';\ntype ArraySeparatorStyle = ArrayStyle | MatrixStyle;\n\nconst 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 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 = (\n  contentType: string | null,\n): 'blob' | 'formData' | 'json' | 'stream' | 'text' | undefined => {\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\nexport const setAuthParams = async (\n  options: Pick<Required<RequestOptions>, 'security'> &\n    Pick<RequestOptions, 'auth' | 'query'> & {\n      headers: HttpHeaders;\n    },\n) => {\n  for (const auth of options.security) {\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 = options.headers.append('Cookie', `${name}=${token}`);\n        break;\n      case 'header':\n      default:\n        options.headers = options.headers.set(name, token);\n        break;\n    }\n\n    return;\n  }\n};\n\nexport const buildUrl: Client['buildUrl'] = (options) => {\n  const url = 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  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 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\nexport const mergeHeaders = (\n  ...headers: Array<Required<Config>['headers'] | undefined>\n): HttpHeaders => {\n  let mergedHeaders = new HttpHeaders();\n\n  for (const header of headers) {\n    if (!header || typeof header !== 'object') {\n      continue;\n    }\n\n    if (header instanceof HttpHeaders) {\n      // Merge HttpHeaders instance\n      header.keys().forEach((key) => {\n        const values = header.getAll(key);\n        if (values) {\n          values.forEach((value) => {\n            mergedHeaders = mergedHeaders.append(key, value);\n          });\n        }\n      });\n    } else {\n      // Merge plain object headers\n      for (const [key, value] of Object.entries(header)) {\n        if (value === null) {\n          mergedHeaders = mergedHeaders.delete(key);\n        } else if (Array.isArray(value)) {\n          for (const v of value) {\n            mergedHeaders = 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 = mergedHeaders.set(\n            key,\n            typeof value === 'object' ? JSON.stringify(value) : (value as string),\n          );\n        }\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  headers: defaultHeaders,\n  querySerializer: defaultQuerySerializer,\n  ...override,\n});\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-angular/sdk-client-optional/client.gen.ts",
    "content": "// 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: 'http://localhost:3000/base' }));\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-angular/sdk-client-optional/core/auth.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-angular/sdk-client-optional/core/bodySerializer.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-angular/sdk-client-optional/core/params.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-angular/sdk-client-optional/core/pathSerializer.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-angular/sdk-client-optional/core/queryKeySerializer.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\n/**\n * JSON-friendly union that mirrors what Pinia Colada can hash.\n */\nexport type JsonValue =\n  | null\n  | string\n  | number\n  | boolean\n  | JsonValue[]\n  | { [key: string]: JsonValue };\n\n/**\n * Replacer that converts non-JSON values (bigint, Date, etc.) to safe substitutes.\n */\nexport const queryKeyJsonReplacer = (_key: string, value: unknown) => {\n  if (value === undefined || typeof value === 'function' || typeof value === 'symbol') {\n    return undefined;\n  }\n  if (typeof value === 'bigint') {\n    return value.toString();\n  }\n  if (value instanceof Date) {\n    return value.toISOString();\n  }\n  return value;\n};\n\n/**\n * Safely stringifies a value and parses it back into a JsonValue.\n */\nexport const stringifyToJsonValue = (input: unknown): JsonValue | undefined => {\n  try {\n    const json = JSON.stringify(input, queryKeyJsonReplacer);\n    if (json === undefined) {\n      return undefined;\n    }\n    return JSON.parse(json) as JsonValue;\n  } catch {\n    return undefined;\n  }\n};\n\n/**\n * Detects plain objects (including objects with a null prototype).\n */\nconst isPlainObject = (value: unknown): value is Record<string, unknown> => {\n  if (value === null || typeof value !== 'object') {\n    return false;\n  }\n  const prototype = Object.getPrototypeOf(value as object);\n  return prototype === Object.prototype || prototype === null;\n};\n\n/**\n * Turns URLSearchParams into a sorted JSON object for deterministic keys.\n */\nconst serializeSearchParams = (params: URLSearchParams): JsonValue => {\n  const entries = Array.from(params.entries()).sort(([a], [b]) => a.localeCompare(b));\n  const result: Record<string, JsonValue> = {};\n\n  for (const [key, value] of entries) {\n    const existing = result[key];\n    if (existing === undefined) {\n      result[key] = value;\n      continue;\n    }\n\n    if (Array.isArray(existing)) {\n      (existing as string[]).push(value);\n    } else {\n      result[key] = [existing, value];\n    }\n  }\n\n  return result;\n};\n\n/**\n * Normalizes any accepted value into a JSON-friendly shape for query keys.\n */\nexport const serializeQueryKeyValue = (value: unknown): JsonValue | undefined => {\n  if (value === null) {\n    return null;\n  }\n\n  if (typeof value === 'string' || typeof value === 'number' || typeof value === 'boolean') {\n    return value;\n  }\n\n  if (value === undefined || typeof value === 'function' || typeof value === 'symbol') {\n    return undefined;\n  }\n\n  if (typeof value === 'bigint') {\n    return value.toString();\n  }\n\n  if (value instanceof Date) {\n    return value.toISOString();\n  }\n\n  if (Array.isArray(value)) {\n    return stringifyToJsonValue(value);\n  }\n\n  if (typeof URLSearchParams !== 'undefined' && value instanceof URLSearchParams) {\n    return serializeSearchParams(value);\n  }\n\n  if (isPlainObject(value)) {\n    return stringifyToJsonValue(value);\n  }\n\n  return undefined;\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-angular/sdk-client-optional/core/serverSentEvents.gen.ts",
    "content": "// 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 const 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            // Normalize line endings: CRLF -> LF, then CR -> LF\n            buffer = buffer.replace(/\\r\\n/g, '\\n').replace(/\\r/g, '\\n');\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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-angular/sdk-client-optional/core/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { Auth, AuthToken } from './auth.gen';\nimport type { BodySerializer, QuerySerializer, QuerySerializerOptions } from './bodySerializer.gen';\n\nexport type HttpMethod =\n  | 'connect'\n  | 'delete'\n  | 'get'\n  | 'head'\n  | 'options'\n  | 'patch'\n  | 'post'\n  | 'put'\n  | 'trace';\n\nexport type Client<\n  RequestFn = never,\n  Config = unknown,\n  MethodFn = never,\n  BuildUrlFn = never,\n  SseFn = never,\n> = {\n  /**\n   * Returns the final request URL.\n   */\n  buildUrl: BuildUrlFn;\n  getConfig: () => Config;\n  request: RequestFn;\n  setConfig: (config: Config) => Config;\n} & {\n  [K in HttpMethod]: MethodFn;\n} & ([SseFn] extends [never] ? { sse?: never } : { sse: { [K in HttpMethod]: SseFn } });\n\nexport interface Config {\n  /**\n   * Auth token or a function returning auth token. The resolved value will be\n   * added to the request payload as defined by its `security` array.\n   */\n  auth?: ((auth: Auth) => Promise<AuthToken> | AuthToken) | AuthToken;\n  /**\n   * A function for serializing request body parameter. By default,\n   * {@link JSON.stringify()} will be used.\n   */\n  bodySerializer?: BodySerializer | null;\n  /**\n   * An object containing any HTTP headers that you want to pre-populate your\n   * `Headers` object with.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/Headers/Headers#init See more}\n   */\n  headers?:\n    | RequestInit['headers']\n    | Record<\n        string,\n        string | number | boolean | (string | number | boolean)[] | null | undefined | unknown\n      >;\n  /**\n   * The request method.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/fetch#method See more}\n   */\n  method?: Uppercase<HttpMethod>;\n  /**\n   * A function for serializing request query parameters. By default, arrays\n   * will be exploded in form style, objects will be exploded in deepObject\n   * style, and reserved characters are percent-encoded.\n   *\n   * This method will have no effect if the native `paramsSerializer()` Axios\n   * API function is used.\n   *\n   * {@link https://swagger.io/docs/specification/serialization/#query View examples}\n   */\n  querySerializer?: QuerySerializer | QuerySerializerOptions;\n  /**\n   * A function validating request data. This is useful if you want to ensure\n   * the request conforms to the desired shape, so it can be safely sent to\n   * the server.\n   */\n  requestValidator?: (data: unknown) => Promise<unknown>;\n  /**\n   * A function transforming response data before it's returned. This is useful\n   * for post-processing data, e.g. converting ISO strings into Date objects.\n   */\n  responseTransformer?: (data: unknown) => Promise<unknown>;\n  /**\n   * A function validating response data. This is useful if you want to ensure\n   * the response conforms to the desired shape, so it can be safely passed to\n   * the transformers and returned to the user.\n   */\n  responseValidator?: (data: unknown) => Promise<unknown>;\n}\n\ntype IsExactlyNeverOrNeverUndefined<T> = [T] extends [never]\n  ? true\n  : [T] extends [never | undefined]\n    ? [undefined] extends [T]\n      ? false\n      : true\n    : false;\n\nexport type OmitNever<T extends Record<string, unknown>> = {\n  [K in keyof T as IsExactlyNeverOrNeverUndefined<T[K]> extends true ? never : K]: T[K];\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-angular/sdk-client-optional/core/utils.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-angular/sdk-client-optional/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport { apiVVersionODataControllerCount, callToTestOrderOfParams, callWithDefaultOptionalParameters, callWithDefaultParameters, callWithDescriptions, callWithDuplicateResponses, callWithNoContentResponse, callWithParameters, callWithResponse, callWithResponseAndNoContentResponse, callWithResponses, callWithResultFromHeader, callWithWeirdParameterNames, collectionFormat, complexParams, complexTypes, deleteCallWithoutParametersAndResponse, deleteFoo, deprecatedCall, dummyA, dummyB, duplicateName, duplicateName2, duplicateName3, duplicateName4, export_, fileResponse, fooWow, getApiVbyApiVersionSimpleOperation, getCallWithOptionalParam, getCallWithoutParametersAndResponse, headCallWithoutParametersAndResponse, import_, multipartRequest, multipartResponse, nonAsciiæøåÆøÅöôêÊ字符串, type Options, optionsCallWithoutParametersAndResponse, patchApiVbyApiVersionNoTag, patchCallWithoutParametersAndResponse, postApiVbyApiVersionFormData, postApiVbyApiVersionRequestBody, postCallWithOptionalParam, postCallWithoutParametersAndResponse, putCallWithoutParametersAndResponse, putWithFormUrlEncoded, testErrorCode, types, uploadFile } from './sdk.gen';\nexport type { _3eNum1Период, _400, AdditionalPropertiesIntegerIssue, AdditionalPropertiesUnknownIssue, AdditionalPropertiesUnknownIssue2, AdditionalPropertiesUnknownIssue3, AdditionalPropertiesUnknownIssueWritable, AnyOfAnyAndNull, AnyOfArrays, ApiVVersionODataControllerCountData, ApiVVersionODataControllerCountResponse, ApiVVersionODataControllerCountResponses, ArrayWithAnyOfProperties, ArrayWithArray, ArrayWithBooleans, ArrayWithNumbers, ArrayWithProperties, ArrayWithReferences, ArrayWithStrings, CallToTestOrderOfParamsData, CallWithDefaultOptionalParametersData, CallWithDefaultParametersData, CallWithDescriptionsData, CallWithDuplicateResponsesData, CallWithDuplicateResponsesError, CallWithDuplicateResponsesErrors, CallWithDuplicateResponsesResponse, CallWithDuplicateResponsesResponses, CallWithNoContentResponseData, CallWithNoContentResponseResponse, CallWithNoContentResponseResponses, CallWithParametersData, CallWithResponseAndNoContentResponseData, CallWithResponseAndNoContentResponseResponse, CallWithResponseAndNoContentResponseResponses, CallWithResponseData, CallWithResponseResponse, CallWithResponseResponses, CallWithResponsesData, CallWithResponsesError, CallWithResponsesErrors, CallWithResponsesResponse, CallWithResponsesResponses, CallWithResultFromHeaderData, CallWithResultFromHeaderErrors, CallWithResultFromHeaderResponses, CallWithWeirdParameterNamesData, CamelCaseCommentWithBreaks, CharactersInDescription, ClientOptions, CollectionFormatData, CommentWithBackticks, CommentWithBackticksAndQuotes, CommentWithBreaks, CommentWithExpressionPlaceholders, CommentWithQuotes, CommentWithReservedCharacters, CommentWithSlashes, ComplexParamsData, ComplexParamsResponse, ComplexParamsResponses, ComplexTypesData, ComplexTypesErrors, ComplexTypesResponse, ComplexTypesResponses, CompositionBaseModel, CompositionExtendedModel, CompositionWithAllOfAndNullable, CompositionWithAnyOf, CompositionWithAnyOfAndNullable, CompositionWithAnyOfAnonymous, CompositionWithNestedAnyAndTypeNull, CompositionWithNestedAnyOfAndNull, CompositionWithOneOf, CompositionWithOneOfAndComplexArrayDictionary, CompositionWithOneOfAndNullable, CompositionWithOneOfAndProperties, CompositionWithOneOfAndSimpleArrayDictionary, CompositionWithOneOfAndSimpleDictionary, CompositionWithOneOfAnonymous, CompositionWithOneOfDiscriminator, ConstValue, Default, DeleteCallWithoutParametersAndResponseData, DeleteFooData, DeleteFooData2, DeleteFooData3, DeprecatedCallData, DeprecatedModel, DictionaryWithArray, DictionaryWithDictionary, DictionaryWithProperties, DictionaryWithPropertiesAndAdditionalProperties, DictionaryWithReference, DictionaryWithString, DummyAData, DummyAResponse, DummyAResponses, DummyBData, DummyBResponse, DummyBResponses, DuplicateName2Data, DuplicateName3Data, DuplicateName4Data, DuplicateNameData, EnumFromDescription, EnumWithExtensions, EnumWithNumbers, EnumWithReplacedCharacters, EnumWithStrings, EnumWithXEnumNames, ExportData, ExternalRefA, ExternalRefB, ExternalSharedModel, File, FileResponseData, FileResponseResponse, FileResponseResponses, FileWritable, FooWowData, FooWowResponses, FreeFormObjectWithAdditionalPropertiesEqEmptyObject, FreeFormObjectWithAdditionalPropertiesEqTrue, FreeFormObjectWithoutAdditionalProperties, GenericSchemaDuplicateIssue1SystemBoolean, GenericSchemaDuplicateIssue1SystemBooleanWritable, GenericSchemaDuplicateIssue1SystemString, GenericSchemaDuplicateIssue1SystemStringWritable, GetApiVbyApiVersionSimpleOperationData, GetApiVbyApiVersionSimpleOperationError, GetApiVbyApiVersionSimpleOperationErrors, GetApiVbyApiVersionSimpleOperationResponse, GetApiVbyApiVersionSimpleOperationResponses, GetCallWithOptionalParamData, GetCallWithoutParametersAndResponseData, HeadCallWithoutParametersAndResponseData, Import, ImportData, ImportResponse, ImportResponses, IoK8sApimachineryPkgApisMetaV1DeleteOptions, IoK8sApimachineryPkgApisMetaV1Preconditions, ModelCircle, ModelFromZendesk, ModelSquare, ModelThatExtends, ModelThatExtendsExtends, ModelWithAdditionalPropertiesEqTrue, ModelWithAdditionalPropertiesRef, ModelWithAnyOfConstantSizeArray, ModelWithAnyOfConstantSizeArrayAndIntersect, ModelWithAnyOfConstantSizeArrayNullable, ModelWithAnyOfConstantSizeArrayWithNSizeAndOptions, ModelWithAnyOfConstantSizeArrayWithNSizeAndOptionsWritable, ModelWithArray, ModelWithArrayReadOnlyAndWriteOnly, ModelWithArrayReadOnlyAndWriteOnlyWritable, ModelWithBackticksInDescription, ModelWithBoolean, ModelWithCircularReference, ModelWithConst, ModelWithConstantSizeArray, ModelWithDictionary, ModelWithDuplicateImports, ModelWithDuplicateProperties, ModelWithEnum, ModelWithEnumFromDescription, ModelWithEnumWithHyphen, ModelWithInteger, ModelWithNestedArrayEnums, ModelWithNestedArrayEnumsData, ModelWithNestedArrayEnumsDataBar, ModelWithNestedArrayEnumsDataFoo, ModelWithNestedCompositionEnums, ModelWithNestedEnums, ModelWithNestedProperties, ModelWithNullableObject, ModelWithNullableString, ModelWithNumericEnumUnion, ModelWithOneOfAndProperties, ModelWithOneOfEnum, ModelWithOrderedProperties, ModelWithPattern, ModelWithPatternWritable, ModelWithPrefixItemsConstantSizeArray, ModelWithProperties, ModelWithPropertiesWritable, ModelWithReadOnlyAndWriteOnly, ModelWithReadOnlyAndWriteOnlyWritable, ModelWithReference, ModelWithReferenceWritable, ModelWithString, ModelWithStringError, MultipartRequestData, MultipartResponseData, MultipartResponseResponse, MultipartResponseResponses, NestedAnyOfArraysNullable, NonAsciiæøåÆøÅöôêÊ字符串Data, NonAsciiæøåÆøÅöôêÊ字符串Response, NonAsciiæøåÆøÅöôêÊ字符串Responses, NonAsciiStringæøåÆøÅöôêÊ字符串, NullableObject, OneOfAllOfIssue, OneOfAllOfIssueWritable, OptionsCallWithoutParametersAndResponseData, Pageable, ParameterSimpleParameterUnused, PatchApiVbyApiVersionNoTagData, PatchApiVbyApiVersionNoTagResponses, PatchCallWithoutParametersAndResponseData, PostApiVbyApiVersionFormDataData, PostApiVbyApiVersionRequestBodyData, PostCallWithOptionalParamData, PostCallWithOptionalParamResponse, PostCallWithOptionalParamResponses, PostCallWithoutParametersAndResponseData, PostServiceWithEmptyTagResponse, PostServiceWithEmptyTagResponse2, PutCallWithoutParametersAndResponseData, PutWithFormUrlEncodedData, SchemaWithFormRestrictedKeys, SimpleBoolean, SimpleFile, SimpleFormData, SimpleInteger, SimpleParameter, SimpleReference, SimpleRequestBody, SimpleString, SimpleStringWithPattern, TestErrorCodeData, TestErrorCodeErrors, TestErrorCodeResponses, TypesData, TypesResponse, TypesResponses, UploadFileData, UploadFileResponse, UploadFileResponses, XFooBar } from './types.gen';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-angular/sdk-client-optional/sdk.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport { type Client, formDataBodySerializer, type Options as Options2, type TDataShape, urlSearchParamsBodySerializer } from './client';\nimport { client } from './client.gen';\nimport type { ApiVVersionODataControllerCountData, ApiVVersionODataControllerCountResponses, CallToTestOrderOfParamsData, CallWithDefaultOptionalParametersData, CallWithDefaultParametersData, CallWithDescriptionsData, CallWithDuplicateResponsesData, CallWithDuplicateResponsesErrors, CallWithDuplicateResponsesResponses, CallWithNoContentResponseData, CallWithNoContentResponseResponses, CallWithParametersData, CallWithResponseAndNoContentResponseData, CallWithResponseAndNoContentResponseResponses, CallWithResponseData, CallWithResponseResponses, CallWithResponsesData, CallWithResponsesErrors, CallWithResponsesResponses, CallWithResultFromHeaderData, CallWithResultFromHeaderErrors, CallWithResultFromHeaderResponses, CallWithWeirdParameterNamesData, CollectionFormatData, ComplexParamsData, ComplexParamsResponses, ComplexTypesData, ComplexTypesErrors, ComplexTypesResponses, DeleteCallWithoutParametersAndResponseData, DeleteFooData3, DeprecatedCallData, DummyAData, DummyAResponses, DummyBData, DummyBResponses, DuplicateName2Data, DuplicateName3Data, DuplicateName4Data, DuplicateNameData, ExportData, FileResponseData, FileResponseResponses, FooWowData, FooWowResponses, GetApiVbyApiVersionSimpleOperationData, GetApiVbyApiVersionSimpleOperationErrors, GetApiVbyApiVersionSimpleOperationResponses, GetCallWithOptionalParamData, GetCallWithoutParametersAndResponseData, HeadCallWithoutParametersAndResponseData, ImportData, ImportResponses, MultipartRequestData, MultipartResponseData, MultipartResponseResponses, NonAsciiæøåÆøÅöôêÊ字符串Data, NonAsciiæøåÆøÅöôêÊ字符串Responses, OptionsCallWithoutParametersAndResponseData, PatchApiVbyApiVersionNoTagData, PatchApiVbyApiVersionNoTagResponses, PatchCallWithoutParametersAndResponseData, PostApiVbyApiVersionFormDataData, PostApiVbyApiVersionRequestBodyData, PostCallWithOptionalParamData, PostCallWithOptionalParamResponses, PostCallWithoutParametersAndResponseData, PutCallWithoutParametersAndResponseData, PutWithFormUrlEncodedData, TestErrorCodeData, TestErrorCodeErrors, TestErrorCodeResponses, TypesData, TypesResponses, UploadFileData, UploadFileResponses } from './types.gen';\n\nexport type Options<TData extends TDataShape = TDataShape, ThrowOnError extends boolean = boolean> = Options2<TData, ThrowOnError> & {\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\nexport const export_ = <ThrowOnError extends boolean = false>(options?: Options<ExportData, ThrowOnError>) => (options?.client ?? client).get<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/no+tag', ...options });\n\nexport const patchApiVbyApiVersionNoTag = <ThrowOnError extends boolean = false>(options?: Options<PatchApiVbyApiVersionNoTagData, ThrowOnError>) => (options?.client ?? client).patch<PatchApiVbyApiVersionNoTagResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/no+tag', ...options });\n\nexport const import_ = <ThrowOnError extends boolean = false>(options: Options<ImportData, ThrowOnError>) => (options.client ?? client).post<ImportResponses, unknown, ThrowOnError>({\n    url: '/api/v{api-version}/no+tag',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options.headers\n    }\n});\n\nexport const fooWow = <ThrowOnError extends boolean = false>(options?: Options<FooWowData, ThrowOnError>) => (options?.client ?? client).put<FooWowResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/no+tag', ...options });\n\nexport const apiVVersionODataControllerCount = <ThrowOnError extends boolean = false>(options?: Options<ApiVVersionODataControllerCountData, ThrowOnError>) => (options?.client ?? client).get<ApiVVersionODataControllerCountResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple/$count', ...options });\n\nexport const getApiVbyApiVersionSimpleOperation = <ThrowOnError extends boolean = false>(options: Options<GetApiVbyApiVersionSimpleOperationData, ThrowOnError>) => (options.client ?? client).get<GetApiVbyApiVersionSimpleOperationResponses, GetApiVbyApiVersionSimpleOperationErrors, ThrowOnError>({ url: '/api/v{api-version}/simple:operation', ...options });\n\nexport const deleteCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<DeleteCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).delete<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const getCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<GetCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).get<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const headCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<HeadCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).head<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const optionsCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<OptionsCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).options<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const patchCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<PatchCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).patch<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const postCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<PostCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).post<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const putCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<PutCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).put<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const deleteFoo = <ThrowOnError extends boolean = false>(options: Options<DeleteFooData3, ThrowOnError>) => (options.client ?? client).delete<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/foo/{foo_param}/bar/{BarParam}', ...options });\n\nexport const callWithDescriptions = <ThrowOnError extends boolean = false>(options?: Options<CallWithDescriptionsData, ThrowOnError>) => (options?.client ?? client).post<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/descriptions', ...options });\n\n/**\n * @deprecated\n */\nexport const deprecatedCall = <ThrowOnError extends boolean = false>(options: Options<DeprecatedCallData, ThrowOnError>) => (options.client ?? client).post<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/parameters/deprecated', ...options });\n\nexport const callWithParameters = <ThrowOnError extends boolean = false>(options: Options<CallWithParametersData, ThrowOnError>) => (options.client ?? client).post<unknown, unknown, ThrowOnError>({\n    url: '/api/v{api-version}/parameters/{parameterPath}',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options.headers\n    }\n});\n\nexport const callWithWeirdParameterNames = <ThrowOnError extends boolean = false>(options: Options<CallWithWeirdParameterNamesData, ThrowOnError>) => (options.client ?? client).post<unknown, unknown, ThrowOnError>({\n    url: '/api/v{api-version}/parameters/{parameter.path.1}/{parameter-path-2}/{PARAMETER-PATH-3}',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options.headers\n    }\n});\n\nexport const getCallWithOptionalParam = <ThrowOnError extends boolean = false>(options: Options<GetCallWithOptionalParamData, ThrowOnError>) => (options.client ?? client).get<unknown, unknown, ThrowOnError>({\n    url: '/api/v{api-version}/parameters',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options.headers\n    }\n});\n\nexport const postCallWithOptionalParam = <ThrowOnError extends boolean = false>(options: Options<PostCallWithOptionalParamData, ThrowOnError>) => (options.client ?? client).post<PostCallWithOptionalParamResponses, unknown, ThrowOnError>({\n    url: '/api/v{api-version}/parameters',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options.headers\n    }\n});\n\nexport const postApiVbyApiVersionRequestBody = <ThrowOnError extends boolean = false>(options?: Options<PostApiVbyApiVersionRequestBodyData, ThrowOnError>) => (options?.client ?? client).post<unknown, unknown, ThrowOnError>({\n    url: '/api/v{api-version}/requestBody',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options?.headers\n    }\n});\n\nexport const postApiVbyApiVersionFormData = <ThrowOnError extends boolean = false>(options?: Options<PostApiVbyApiVersionFormDataData, ThrowOnError>) => (options?.client ?? client).post<unknown, unknown, ThrowOnError>({\n    ...formDataBodySerializer,\n    url: '/api/v{api-version}/formData',\n    ...options,\n    headers: {\n        'Content-Type': null,\n        ...options?.headers\n    }\n});\n\nexport const callWithDefaultParameters = <ThrowOnError extends boolean = false>(options?: Options<CallWithDefaultParametersData, ThrowOnError>) => (options?.client ?? client).get<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/defaults', ...options });\n\nexport const callWithDefaultOptionalParameters = <ThrowOnError extends boolean = false>(options?: Options<CallWithDefaultOptionalParametersData, ThrowOnError>) => (options?.client ?? client).post<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/defaults', ...options });\n\nexport const callToTestOrderOfParams = <ThrowOnError extends boolean = false>(options: Options<CallToTestOrderOfParamsData, ThrowOnError>) => (options.client ?? client).put<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/defaults', ...options });\n\nexport const duplicateName = <ThrowOnError extends boolean = false>(options?: Options<DuplicateNameData, ThrowOnError>) => (options?.client ?? client).delete<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/duplicate', ...options });\n\nexport const duplicateName2 = <ThrowOnError extends boolean = false>(options?: Options<DuplicateName2Data, ThrowOnError>) => (options?.client ?? client).get<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/duplicate', ...options });\n\nexport const duplicateName3 = <ThrowOnError extends boolean = false>(options?: Options<DuplicateName3Data, ThrowOnError>) => (options?.client ?? client).post<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/duplicate', ...options });\n\nexport const duplicateName4 = <ThrowOnError extends boolean = false>(options?: Options<DuplicateName4Data, ThrowOnError>) => (options?.client ?? client).put<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/duplicate', ...options });\n\nexport const callWithNoContentResponse = <ThrowOnError extends boolean = false>(options?: Options<CallWithNoContentResponseData, ThrowOnError>) => (options?.client ?? client).get<CallWithNoContentResponseResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/no-content', ...options });\n\nexport const callWithResponseAndNoContentResponse = <ThrowOnError extends boolean = false>(options?: Options<CallWithResponseAndNoContentResponseData, ThrowOnError>) => (options?.client ?? client).get<CallWithResponseAndNoContentResponseResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/multiple-tags/response-and-no-content', ...options });\n\nexport const dummyA = <ThrowOnError extends boolean = false>(options?: Options<DummyAData, ThrowOnError>) => (options?.client ?? client).get<DummyAResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/multiple-tags/a', ...options });\n\nexport const dummyB = <ThrowOnError extends boolean = false>(options?: Options<DummyBData, ThrowOnError>) => (options?.client ?? client).get<DummyBResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/multiple-tags/b', ...options });\n\nexport const callWithResponse = <ThrowOnError extends boolean = false>(options?: Options<CallWithResponseData, ThrowOnError>) => (options?.client ?? client).get<CallWithResponseResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/response', ...options });\n\nexport const callWithDuplicateResponses = <ThrowOnError extends boolean = false>(options?: Options<CallWithDuplicateResponsesData, ThrowOnError>) => (options?.client ?? client).post<CallWithDuplicateResponsesResponses, CallWithDuplicateResponsesErrors, ThrowOnError>({ url: '/api/v{api-version}/response', ...options });\n\nexport const callWithResponses = <ThrowOnError extends boolean = false>(options?: Options<CallWithResponsesData, ThrowOnError>) => (options?.client ?? client).put<CallWithResponsesResponses, CallWithResponsesErrors, ThrowOnError>({ url: '/api/v{api-version}/response', ...options });\n\nexport const collectionFormat = <ThrowOnError extends boolean = false>(options: Options<CollectionFormatData, ThrowOnError>) => (options.client ?? client).get<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/collectionFormat', ...options });\n\nexport const types = <ThrowOnError extends boolean = false>(options: Options<TypesData, ThrowOnError>) => (options.client ?? client).get<TypesResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/types', ...options });\n\nexport const uploadFile = <ThrowOnError extends boolean = false>(options: Options<UploadFileData, ThrowOnError>) => (options.client ?? client).post<UploadFileResponses, unknown, ThrowOnError>({\n    ...urlSearchParamsBodySerializer,\n    url: '/api/v{api-version}/upload',\n    ...options,\n    headers: {\n        'Content-Type': 'application/x-www-form-urlencoded',\n        ...options.headers\n    }\n});\n\nexport const fileResponse = <ThrowOnError extends boolean = false>(options: Options<FileResponseData, ThrowOnError>) => (options.client ?? client).get<FileResponseResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/file/{id}', ...options });\n\nexport const complexTypes = <ThrowOnError extends boolean = false>(options: Options<ComplexTypesData, ThrowOnError>) => (options.client ?? client).get<ComplexTypesResponses, ComplexTypesErrors, ThrowOnError>({\n    querySerializer: { parameters: { parameterObject: { object: { style: 'form' } } } },\n    url: '/api/v{api-version}/complex',\n    ...options\n});\n\nexport const multipartResponse = <ThrowOnError extends boolean = false>(options?: Options<MultipartResponseData, ThrowOnError>) => (options?.client ?? client).get<MultipartResponseResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/multipart', ...options });\n\nexport const multipartRequest = <ThrowOnError extends boolean = false>(options?: Options<MultipartRequestData, ThrowOnError>) => (options?.client ?? client).post<unknown, unknown, ThrowOnError>({\n    ...formDataBodySerializer,\n    url: '/api/v{api-version}/multipart',\n    ...options,\n    headers: {\n        'Content-Type': null,\n        ...options?.headers\n    }\n});\n\nexport const complexParams = <ThrowOnError extends boolean = false>(options: Options<ComplexParamsData, ThrowOnError>) => (options.client ?? client).put<ComplexParamsResponses, unknown, ThrowOnError>({\n    url: '/api/v{api-version}/complex/{id}',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json-patch+json',\n        ...options.headers\n    }\n});\n\nexport const callWithResultFromHeader = <ThrowOnError extends boolean = false>(options?: Options<CallWithResultFromHeaderData, ThrowOnError>) => (options?.client ?? client).post<CallWithResultFromHeaderResponses, CallWithResultFromHeaderErrors, ThrowOnError>({ url: '/api/v{api-version}/header', ...options });\n\nexport const testErrorCode = <ThrowOnError extends boolean = false>(options: Options<TestErrorCodeData, ThrowOnError>) => (options.client ?? client).post<TestErrorCodeResponses, TestErrorCodeErrors, ThrowOnError>({ url: '/api/v{api-version}/error', ...options });\n\nexport const nonAsciiæøåÆøÅöôêÊ字符串 = <ThrowOnError extends boolean = false>(options: Options<NonAsciiæøåÆøÅöôêÊ字符串Data, ThrowOnError>) => (options.client ?? client).post<NonAsciiæøåÆøÅöôêÊ字符串Responses, unknown, ThrowOnError>({ url: '/api/v{api-version}/non-ascii-æøåÆØÅöôêÊ字符串', ...options });\n\n/**\n * Login User\n */\nexport const putWithFormUrlEncoded = <ThrowOnError extends boolean = false>(options: Options<PutWithFormUrlEncodedData, ThrowOnError>) => (options.client ?? client).put<unknown, unknown, ThrowOnError>({\n    ...urlSearchParamsBodySerializer,\n    url: '/api/v{api-version}/non-ascii-æøåÆØÅöôêÊ字符串',\n    ...options,\n    headers: {\n        'Content-Type': 'application/x-www-form-urlencoded',\n        ...options.headers\n    }\n});\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-angular/sdk-client-optional/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type ClientOptions = {\n    baseUrl: 'http://localhost:3000/base' | (string & {});\n};\n\n/**\n * Model with number-only name\n */\nexport type _400 = string;\n\n/**\n * External ref to shared model (A)\n */\nexport type ExternalRefA = ExternalSharedModel;\n\n/**\n * External ref to shared model (B)\n */\nexport type ExternalRefB = ExternalSharedModel;\n\n/**\n * Testing multiline comments in string: First line\n * Second line\n *\n * Fourth line\n */\nexport type CamelCaseCommentWithBreaks = number;\n\n/**\n * Testing multiline comments in string: First line\n * Second line\n *\n * Fourth line\n */\nexport type CommentWithBreaks = number;\n\n/**\n * Testing backticks in string: `backticks` and ```multiple backticks``` should work\n */\nexport type CommentWithBackticks = number;\n\n/**\n * Testing backticks and quotes in string: `backticks`, 'quotes', \"double quotes\" and ```multiple backticks``` should work\n */\nexport type CommentWithBackticksAndQuotes = number;\n\n/**\n * Testing slashes in string: \\backwards\\\\\\ and /forwards/// should work\n */\nexport type CommentWithSlashes = number;\n\n/**\n * Testing expression placeholders in string: ${expression} should work\n */\nexport type CommentWithExpressionPlaceholders = number;\n\n/**\n * Testing quotes in string: 'single quote''' and \"double quotes\"\"\" should work\n */\nexport type CommentWithQuotes = number;\n\n/**\n * Testing reserved characters in string: * inline * and ** inline ** should work\n */\nexport type CommentWithReservedCharacters = number;\n\n/**\n * This is a simple number\n */\nexport type SimpleInteger = number;\n\n/**\n * This is a simple boolean\n */\nexport type SimpleBoolean = boolean;\n\n/**\n * This is a simple string\n */\nexport type SimpleString = string;\n\n/**\n * A string with non-ascii (unicode) characters valid in typescript identifiers (æøåÆØÅöÔèÈ字符串)\n */\nexport type NonAsciiStringæøåÆøÅöôêÊ字符串 = string;\n\n/**\n * This is a simple file\n */\nexport type SimpleFile = Blob | File;\n\n/**\n * This is a simple reference\n */\nexport type SimpleReference = ModelWithString;\n\n/**\n * This is a simple string\n */\nexport type SimpleStringWithPattern = string | null;\n\n/**\n * This is a simple enum with strings\n */\nexport type EnumWithStrings = 'Success' | 'Warning' | 'Error' | '\\'Single Quote\\'' | '\"Double Quotes\"' | 'Non-ascii: øæåôöØÆÅÔÖ字符串';\n\nexport type EnumWithReplacedCharacters = '\\'Single Quote\\'' | '\"Double Quotes\"' | 'øæåôöØÆÅÔÖ字符串' | 3.1 | '';\n\n/**\n * This is a simple enum with numbers\n */\nexport type EnumWithNumbers = 1 | 2 | 3 | 1.1 | 1.2 | 1.3 | 100 | 200 | 300 | -100 | -200 | -300 | -1.1 | -1.2 | -1.3;\n\n/**\n * Success=1,Warning=2,Error=3\n */\nexport type EnumFromDescription = number;\n\n/**\n * This is a simple enum with numbers\n */\nexport type EnumWithExtensions = 200 | 400 | 500;\n\nexport type EnumWithXEnumNames = 0 | 1 | 2;\n\n/**\n * This is a simple array with numbers\n */\nexport type ArrayWithNumbers = Array<number>;\n\n/**\n * This is a simple array with booleans\n */\nexport type ArrayWithBooleans = Array<boolean>;\n\n/**\n * This is a simple array with strings\n */\nexport type ArrayWithStrings = Array<string>;\n\n/**\n * This is a simple array with references\n */\nexport type ArrayWithReferences = Array<ModelWithString>;\n\n/**\n * This is a simple array containing an array\n */\nexport type ArrayWithArray = Array<Array<ModelWithString>>;\n\n/**\n * This is a simple array with properties\n */\nexport type ArrayWithProperties = Array<{\n    '16x16'?: CamelCaseCommentWithBreaks;\n    bar?: string;\n}>;\n\n/**\n * This is a simple array with any of properties\n */\nexport type ArrayWithAnyOfProperties = Array<{\n    foo?: string;\n} | {\n    bar?: string;\n}>;\n\nexport type AnyOfAnyAndNull = {\n    data?: unknown | null;\n};\n\n/**\n * This is a simple array with any of properties\n */\nexport type AnyOfArrays = {\n    results?: Array<{\n        foo?: string;\n    } | {\n        bar?: string;\n    }>;\n};\n\n/**\n * This is a string dictionary\n */\nexport type DictionaryWithString = {\n    [key: string]: string;\n};\n\nexport type DictionaryWithPropertiesAndAdditionalProperties = {\n    foo?: number;\n    bar?: boolean;\n    [key: string]: string | number | boolean | undefined;\n};\n\n/**\n * This is a string reference\n */\nexport type DictionaryWithReference = {\n    [key: string]: ModelWithString;\n};\n\n/**\n * This is a complex dictionary\n */\nexport type DictionaryWithArray = {\n    [key: string]: Array<ModelWithString>;\n};\n\n/**\n * This is a string dictionary\n */\nexport type DictionaryWithDictionary = {\n    [key: string]: {\n        [key: string]: string;\n    };\n};\n\n/**\n * This is a complex dictionary\n */\nexport type DictionaryWithProperties = {\n    [key: string]: {\n        foo?: string;\n        bar?: string;\n    };\n};\n\n/**\n * This is a model with one number property\n */\nexport type ModelWithInteger = {\n    /**\n     * This is a simple number property\n     */\n    prop?: number;\n};\n\n/**\n * This is a model with one boolean property\n */\nexport type ModelWithBoolean = {\n    /**\n     * This is a simple boolean property\n     */\n    prop?: boolean;\n};\n\n/**\n * This is a model with one string property\n */\nexport type ModelWithString = {\n    /**\n     * This is a simple string property\n     */\n    prop?: string;\n};\n\n/**\n * This is a model with one string property\n */\nexport type ModelWithStringError = {\n    /**\n     * This is a simple string property\n     */\n    prop?: string;\n};\n\n/**\n * `Comment` or `VoiceComment`. The JSON object for adding voice comments to tickets is different. See [Adding voice comments to tickets](/documentation/ticketing/managing-tickets/adding-voice-comments-to-tickets)\n */\nexport type ModelFromZendesk = string;\n\n/**\n * This is a model with one string property\n */\nexport type ModelWithNullableString = {\n    /**\n     * This is a simple string property\n     */\n    nullableProp1?: string | null;\n    /**\n     * This is a simple string property\n     */\n    nullableRequiredProp1: string | null;\n    /**\n     * This is a simple string property\n     */\n    nullableProp2?: string | null;\n    /**\n     * This is a simple string property\n     */\n    nullableRequiredProp2: string | null;\n    /**\n     * This is a simple enum with strings\n     */\n    'foo_bar-enum'?: 'Success' | 'Warning' | 'Error' | 'ØÆÅ字符串';\n};\n\n/**\n * This is a model with one enum\n */\nexport type ModelWithEnum = {\n    /**\n     * This is a simple enum with strings\n     */\n    'foo_bar-enum'?: 'Success' | 'Warning' | 'Error' | 'ØÆÅ字符串';\n    /**\n     * These are the HTTP error code enums\n     */\n    statusCode?: '100' | '200 FOO' | '300 FOO_BAR' | '400 foo-bar' | '500 foo.bar' | '600 foo&bar';\n    /**\n     * Simple boolean enum\n     */\n    bool?: true;\n};\n\n/**\n * This is a model with one enum with escaped name\n */\nexport type ModelWithEnumWithHyphen = {\n    /**\n     * Foo-Bar-Baz-Qux\n     */\n    'foo-bar-baz-qux'?: '3.0';\n};\n\n/**\n * This is a model with one enum\n */\nexport type ModelWithEnumFromDescription = {\n    /**\n     * Success=1,Warning=2,Error=3\n     */\n    test?: number;\n};\n\n/**\n * This is a model with nested enums\n */\nexport type ModelWithNestedEnums = {\n    dictionaryWithEnum?: {\n        [key: string]: 'Success' | 'Warning' | 'Error';\n    };\n    dictionaryWithEnumFromDescription?: {\n        [key: string]: number;\n    };\n    arrayWithEnum?: Array<'Success' | 'Warning' | 'Error'>;\n    arrayWithDescription?: Array<number>;\n    /**\n     * This is a simple enum with strings\n     */\n    'foo_bar-enum'?: 'Success' | 'Warning' | 'Error' | 'ØÆÅ字符串';\n};\n\n/**\n * This is a model with one property containing a reference\n */\nexport type ModelWithReference = {\n    prop?: ModelWithProperties;\n};\n\n/**\n * This is a model with one property containing an array\n */\nexport type ModelWithArrayReadOnlyAndWriteOnly = {\n    prop?: Array<ModelWithReadOnlyAndWriteOnly>;\n    propWithFile?: Array<Blob | File>;\n    propWithNumber?: Array<number>;\n};\n\n/**\n * This is a model with one property containing an array\n */\nexport type ModelWithArray = {\n    prop?: Array<ModelWithString>;\n    propWithFile?: Array<Blob | File>;\n    propWithNumber?: Array<number>;\n};\n\n/**\n * This is a model with one property containing a dictionary\n */\nexport type ModelWithDictionary = {\n    prop?: {\n        [key: string]: string;\n    };\n};\n\n/**\n * This is a deprecated model with a deprecated property\n *\n * @deprecated\n */\nexport type DeprecatedModel = {\n    /**\n     * This is a deprecated property\n     *\n     * @deprecated\n     */\n    prop?: string;\n};\n\n/**\n * This is a model with one property containing a circular reference\n */\nexport type ModelWithCircularReference = {\n    prop?: ModelWithCircularReference;\n};\n\n/**\n * This is a model with one property with a 'one of' relationship\n */\nexport type CompositionWithOneOf = {\n    propA?: ModelWithString | ModelWithEnum | ModelWithArray | ModelWithDictionary;\n};\n\n/**\n * This is a model with one property with a 'one of' relationship where the options are not $ref\n */\nexport type CompositionWithOneOfAnonymous = {\n    propA?: {\n        propA?: string;\n    } | string | number;\n};\n\n/**\n * Circle\n */\nexport type ModelCircle = {\n    kind: string;\n    radius?: number;\n};\n\n/**\n * Square\n */\nexport type ModelSquare = {\n    kind: string;\n    sideLength?: number;\n};\n\n/**\n * This is a model with one property with a 'one of' relationship where the options are not $ref\n */\nexport type CompositionWithOneOfDiscriminator = ({\n    kind: 'circle';\n} & ModelCircle) | ({\n    kind: 'square';\n} & ModelSquare);\n\n/**\n * This is a model with one property with a 'any of' relationship\n */\nexport type CompositionWithAnyOf = {\n    propA?: ModelWithString | ModelWithEnum | ModelWithArray | ModelWithDictionary;\n};\n\n/**\n * This is a model with one property with a 'any of' relationship where the options are not $ref\n */\nexport type CompositionWithAnyOfAnonymous = {\n    propA?: {\n        propA?: string;\n    } | string | number;\n};\n\n/**\n * This is a model with nested 'any of' property with a type null\n */\nexport type CompositionWithNestedAnyAndTypeNull = {\n    propA?: Array<ModelWithDictionary | null> | Array<ModelWithArray | null>;\n};\n\nexport type _3eNum1Период = 'Bird' | 'Dog';\n\nexport type ConstValue = 'ConstValue';\n\n/**\n * This is a model with one property with a 'any of' relationship where the options are not $ref\n */\nexport type CompositionWithNestedAnyOfAndNull = {\n    /**\n     * Scopes\n     */\n    propA?: Array<_3eNum1Период | ConstValue> | null;\n};\n\n/**\n * This is a model with one property with a 'one of' relationship\n */\nexport type CompositionWithOneOfAndNullable = {\n    propA?: {\n        boolean?: boolean;\n    } | ModelWithEnum | ModelWithArray | ModelWithDictionary | null;\n};\n\n/**\n * This is a model that contains a simple dictionary within composition\n */\nexport type CompositionWithOneOfAndSimpleDictionary = {\n    propA?: boolean | {\n        [key: string]: number;\n    };\n};\n\n/**\n * This is a model that contains a dictionary of simple arrays within composition\n */\nexport type CompositionWithOneOfAndSimpleArrayDictionary = {\n    propA?: boolean | {\n        [key: string]: Array<boolean>;\n    };\n};\n\n/**\n * This is a model that contains a dictionary of complex arrays (composited) within composition\n */\nexport type CompositionWithOneOfAndComplexArrayDictionary = {\n    propA?: boolean | {\n        [key: string]: Array<number | string>;\n    };\n};\n\n/**\n * This is a model with one property with a 'all of' relationship\n */\nexport type CompositionWithAllOfAndNullable = {\n    propA?: ({\n        boolean?: boolean;\n    } & ModelWithEnum & ModelWithArray & ModelWithDictionary) | null;\n};\n\n/**\n * This is a model with one property with a 'any of' relationship\n */\nexport type CompositionWithAnyOfAndNullable = {\n    propA?: {\n        boolean?: boolean;\n    } | ModelWithEnum | ModelWithArray | ModelWithDictionary | null;\n};\n\n/**\n * This is a base model with two simple optional properties\n */\nexport type CompositionBaseModel = {\n    firstName?: string;\n    lastname?: string;\n};\n\n/**\n * This is a model that extends the base model\n */\nexport type CompositionExtendedModel = CompositionBaseModel & {\n    age: number;\n    firstName: string;\n    lastname: string;\n};\n\n/**\n * This is a model with one nested property\n */\nexport type ModelWithProperties = {\n    required: string;\n    readonly requiredAndReadOnly: string;\n    requiredAndNullable: string | null;\n    string?: string;\n    number?: number;\n    boolean?: boolean;\n    reference?: ModelWithString;\n    'property with space'?: string;\n    default?: string;\n    try?: string;\n    readonly '@namespace.string'?: string;\n    readonly '@namespace.integer'?: number;\n};\n\n/**\n * This is a model with one nested property\n */\nexport type ModelWithNestedProperties = {\n    readonly first: {\n        readonly second: {\n            readonly third: string | null;\n        } | null;\n    } | null;\n};\n\n/**\n * This is a model with duplicated properties\n */\nexport type ModelWithDuplicateProperties = {\n    prop?: ModelWithString;\n};\n\n/**\n * This is a model with ordered properties\n */\nexport type ModelWithOrderedProperties = {\n    zebra?: string;\n    apple?: string;\n    hawaii?: string;\n};\n\n/**\n * This is a model with duplicated imports\n */\nexport type ModelWithDuplicateImports = {\n    propA?: ModelWithString;\n    propB?: ModelWithString;\n    propC?: ModelWithString;\n};\n\n/**\n * This is a model that extends another model\n */\nexport type ModelThatExtends = ModelWithString & {\n    propExtendsA?: string;\n    propExtendsB?: ModelWithString;\n};\n\n/**\n * This is a model that extends another model\n */\nexport type ModelThatExtendsExtends = ModelWithString & ModelThatExtends & {\n    propExtendsC?: string;\n    propExtendsD?: ModelWithString;\n};\n\n/**\n * This is a model that contains a some patterns\n */\nexport type ModelWithPattern = {\n    key: string;\n    name: string;\n    readonly enabled?: boolean;\n    readonly modified?: string;\n    id?: string;\n    text?: string;\n    patternWithSingleQuotes?: string;\n    patternWithNewline?: string;\n    patternWithBacktick?: string;\n    patternWithUnicode?: string;\n};\n\nexport type File = {\n    /**\n     * Id\n     */\n    readonly id?: string;\n    /**\n     * Updated at\n     */\n    readonly updated_at?: string;\n    /**\n     * Created at\n     */\n    readonly created_at?: string;\n    /**\n     * Mime\n     */\n    mime: string;\n    /**\n     * File\n     */\n    readonly file?: string;\n};\n\nexport type Default = {\n    name?: string;\n};\n\nexport type Pageable = {\n    page?: number;\n    size?: number;\n    sort?: Array<string>;\n};\n\n/**\n * This is a free-form object without additionalProperties.\n */\nexport type FreeFormObjectWithoutAdditionalProperties = {\n    [key: string]: unknown;\n};\n\n/**\n * This is a free-form object with additionalProperties: true.\n */\nexport type FreeFormObjectWithAdditionalPropertiesEqTrue = {\n    [key: string]: unknown;\n};\n\n/**\n * This is a free-form object with additionalProperties: {}.\n */\nexport type FreeFormObjectWithAdditionalPropertiesEqEmptyObject = {\n    [key: string]: unknown;\n};\n\nexport type ModelWithConst = {\n    String?: 'String';\n    number?: 0;\n    null?: null;\n    withType?: 'Some string';\n};\n\n/**\n * This is a model with one property and additionalProperties: true\n */\nexport type ModelWithAdditionalPropertiesEqTrue = {\n    /**\n     * This is a simple string property\n     */\n    prop?: string;\n    [key: string]: unknown;\n};\n\nexport type NestedAnyOfArraysNullable = {\n    nullableArray?: Array<string | boolean> | null;\n};\n\nexport type CompositionWithOneOfAndProperties = ({\n    foo: SimpleParameter;\n} | {\n    bar: NonAsciiStringæøåÆøÅöôêÊ字符串;\n}) & {\n    baz: number | null;\n    qux: number;\n};\n\n/**\n * An object that can be null\n */\nexport type NullableObject = {\n    foo?: string;\n} | null;\n\n/**\n * Some % character\n */\nexport type CharactersInDescription = string;\n\nexport type ModelWithNullableObject = {\n    data?: NullableObject;\n};\n\n/**\n * An object with additional properties that can be null (anyOf ref + null)\n */\nexport type ModelWithAdditionalPropertiesRef = {\n    [key: string]: NullableObject | null;\n};\n\nexport type ModelWithOneOfEnum = {\n    foo: 'Bar';\n} | {\n    foo: 'Baz';\n} | {\n    foo: 'Qux';\n} | {\n    content: string;\n    foo: 'Quux';\n} | {\n    content: [\n        string,\n        string\n    ];\n    foo: 'Corge';\n};\n\nexport type ModelWithNestedArrayEnumsDataFoo = 'foo' | 'bar';\n\nexport type ModelWithNestedArrayEnumsDataBar = 'baz' | 'qux';\n\nexport type ModelWithNestedArrayEnumsData = {\n    foo?: Array<ModelWithNestedArrayEnumsDataFoo>;\n    bar?: Array<ModelWithNestedArrayEnumsDataBar>;\n};\n\nexport type ModelWithNestedArrayEnums = {\n    array_strings?: Array<string>;\n    data?: ModelWithNestedArrayEnumsData;\n};\n\nexport type ModelWithNestedCompositionEnums = {\n    foo?: ModelWithNestedArrayEnumsDataFoo;\n};\n\nexport type ModelWithReadOnlyAndWriteOnly = {\n    foo: string;\n    readonly bar: string;\n};\n\nexport type ModelWithConstantSizeArray = [\n    number,\n    number\n];\n\nexport type ModelWithAnyOfConstantSizeArray = [\n    number | string,\n    number | string,\n    number | string\n];\n\nexport type ModelWithPrefixItemsConstantSizeArray = [\n    ModelWithInteger,\n    number | string,\n    string\n];\n\nexport type ModelWithAnyOfConstantSizeArrayNullable = [\n    number | null | string,\n    number | null | string,\n    number | null | string\n];\n\nexport type ModelWithAnyOfConstantSizeArrayWithNSizeAndOptions = [\n    number | Import,\n    number | Import\n];\n\nexport type ModelWithAnyOfConstantSizeArrayAndIntersect = [\n    number & string,\n    number & string\n];\n\nexport type ModelWithNumericEnumUnion = {\n    /**\n     * Период\n     */\n    value?: -10 | -1 | 0 | 1 | 3 | 6 | 12;\n};\n\n/**\n * Some description with `back ticks`\n */\nexport type ModelWithBackticksInDescription = {\n    /**\n     * The template `that` should be used for parsing and importing the contents of the CSV file.\n     *\n     * <br/><p>There is one placeholder currently supported:<ul>     <li><b>${x}</b> - refers to the n-th column in the CSV file, e.g. ${1}, ${2}, ...)</li></ul><p>Example of a correct JSON template:</p>\n     * <pre>\n     * [\n     * {\n     * \"resourceType\": \"Asset\",\n     * \"identifier\": {\n     * \"name\": \"${1}\",\n     * \"domain\": {\n     * \"name\": \"${2}\",\n     * \"community\": {\n     * \"name\": \"Some Community\"\n     * }\n     * }\n     * },\n     * \"attributes\" : {\n     * \"00000000-0000-0000-0000-000000003115\" : [ {\n     * \"value\" : \"${3}\"\n     * } ],\n     * \"00000000-0000-0000-0000-000000000222\" : [ {\n     * \"value\" : \"${4}\"\n     * } ]\n     * }\n     * }\n     * ]\n     * </pre>\n     */\n    template?: string;\n};\n\nexport type ModelWithOneOfAndProperties = (SimpleParameter | NonAsciiStringæøåÆøÅöôêÊ字符串) & {\n    baz: number | null;\n    qux: number;\n};\n\n/**\n * Model used to test deduplication strategy (unused)\n */\nexport type ParameterSimpleParameterUnused = string;\n\n/**\n * Model used to test deduplication strategy\n */\nexport type PostServiceWithEmptyTagResponse = string;\n\n/**\n * Model used to test deduplication strategy\n */\nexport type PostServiceWithEmptyTagResponse2 = string;\n\n/**\n * Model used to test deduplication strategy\n */\nexport type DeleteFooData = string;\n\n/**\n * Model used to test deduplication strategy\n */\nexport type DeleteFooData2 = string;\n\n/**\n * Model with restricted keyword name\n */\nexport type Import = string;\n\nexport type SchemaWithFormRestrictedKeys = {\n    description?: string;\n    'x-enum-descriptions'?: string;\n    'x-enum-varnames'?: string;\n    'x-enumNames'?: string;\n    title?: string;\n    object?: {\n        description?: string;\n        'x-enum-descriptions'?: string;\n        'x-enum-varnames'?: string;\n        'x-enumNames'?: string;\n        title?: string;\n    };\n    array?: Array<{\n        description?: string;\n        'x-enum-descriptions'?: string;\n        'x-enum-varnames'?: string;\n        'x-enumNames'?: string;\n        title?: string;\n    }>;\n};\n\n/**\n * This schema was giving PascalCase transformations a hard time\n */\nexport type IoK8sApimachineryPkgApisMetaV1DeleteOptions = {\n    /**\n     * Must be fulfilled before a deletion is carried out. If not possible, a 409 Conflict status will be returned.\n     */\n    preconditions?: IoK8sApimachineryPkgApisMetaV1Preconditions;\n};\n\n/**\n * This schema was giving PascalCase transformations a hard time\n */\nexport type IoK8sApimachineryPkgApisMetaV1Preconditions = {\n    /**\n     * Specifies the target ResourceVersion\n     */\n    resourceVersion?: string;\n    /**\n     * Specifies the target UID.\n     */\n    uid?: string;\n};\n\nexport type AdditionalPropertiesUnknownIssue = {\n    [key: string]: string | number;\n};\n\nexport type AdditionalPropertiesUnknownIssue2 = {\n    [key: string]: string | number;\n};\n\nexport type AdditionalPropertiesUnknownIssue3 = string & {\n    entries: {\n        [key: string]: AdditionalPropertiesUnknownIssue;\n    };\n};\n\nexport type AdditionalPropertiesIntegerIssue = {\n    value: number;\n    [key: string]: number;\n};\n\nexport type OneOfAllOfIssue = ((ConstValue | GenericSchemaDuplicateIssue1SystemBoolean) & _3eNum1Период) | GenericSchemaDuplicateIssue1SystemString;\n\nexport type GenericSchemaDuplicateIssue1SystemBoolean = {\n    item?: boolean;\n    error?: string | null;\n    readonly hasError?: boolean;\n    data?: {\n        [key: string]: never;\n    };\n};\n\nexport type GenericSchemaDuplicateIssue1SystemString = {\n    item?: string | null;\n    error?: string | null;\n    readonly hasError?: boolean;\n};\n\nexport type ExternalSharedModel = {\n    id: string;\n    name?: string;\n};\n\n/**\n * This is a model with one property containing a reference\n */\nexport type ModelWithReferenceWritable = {\n    prop?: ModelWithPropertiesWritable;\n};\n\n/**\n * This is a model with one property containing an array\n */\nexport type ModelWithArrayReadOnlyAndWriteOnlyWritable = {\n    prop?: Array<ModelWithReadOnlyAndWriteOnlyWritable>;\n    propWithFile?: Array<Blob | File>;\n    propWithNumber?: Array<number>;\n};\n\n/**\n * This is a model with one nested property\n */\nexport type ModelWithPropertiesWritable = {\n    required: string;\n    requiredAndNullable: string | null;\n    string?: string;\n    number?: number;\n    boolean?: boolean;\n    reference?: ModelWithString;\n    'property with space'?: string;\n    default?: string;\n    try?: string;\n};\n\n/**\n * This is a model that contains a some patterns\n */\nexport type ModelWithPatternWritable = {\n    key: string;\n    name: string;\n    id?: string;\n    text?: string;\n    patternWithSingleQuotes?: string;\n    patternWithNewline?: string;\n    patternWithBacktick?: string;\n    patternWithUnicode?: string;\n};\n\nexport type FileWritable = {\n    /**\n     * Mime\n     */\n    mime: string;\n};\n\nexport type ModelWithReadOnlyAndWriteOnlyWritable = {\n    foo: string;\n    baz: string;\n};\n\nexport type ModelWithAnyOfConstantSizeArrayWithNSizeAndOptionsWritable = [\n    number | Import,\n    number | Import\n];\n\nexport type AdditionalPropertiesUnknownIssueWritable = {\n    [key: string]: string | number;\n};\n\nexport type OneOfAllOfIssueWritable = ((ConstValue | GenericSchemaDuplicateIssue1SystemBoolean) & _3eNum1Период) | GenericSchemaDuplicateIssue1SystemString;\n\nexport type GenericSchemaDuplicateIssue1SystemBooleanWritable = {\n    item?: boolean;\n    error?: string | null;\n    data?: {\n        [key: string]: never;\n    };\n};\n\nexport type GenericSchemaDuplicateIssue1SystemStringWritable = {\n    item?: string | null;\n    error?: string | null;\n};\n\n/**\n * This is a reusable parameter\n */\nexport type SimpleParameter = string;\n\n/**\n * Parameter with illegal characters\n */\nexport type XFooBar = ModelWithString;\n\n/**\n * A reusable request body\n */\nexport type SimpleRequestBody = ModelWithString;\n\n/**\n * A reusable request body\n */\nexport type SimpleFormData = ModelWithString;\n\nexport type ExportData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no+tag';\n};\n\nexport type PatchApiVbyApiVersionNoTagData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no+tag';\n};\n\nexport type PatchApiVbyApiVersionNoTagResponses = {\n    /**\n     * OK\n     */\n    default: unknown;\n};\n\nexport type ImportData = {\n    body: ModelWithReadOnlyAndWriteOnlyWritable | ModelWithArrayReadOnlyAndWriteOnlyWritable;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no+tag';\n};\n\nexport type ImportResponses = {\n    /**\n     * Success\n     */\n    200: ModelFromZendesk;\n    /**\n     * Default success response\n     */\n    default: ModelWithReadOnlyAndWriteOnly;\n};\n\nexport type ImportResponse = ImportResponses[keyof ImportResponses];\n\nexport type FooWowData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no+tag';\n};\n\nexport type FooWowResponses = {\n    /**\n     * OK\n     */\n    default: unknown;\n};\n\nexport type ApiVVersionODataControllerCountData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple/$count';\n};\n\nexport type ApiVVersionODataControllerCountResponses = {\n    /**\n     * Success\n     */\n    200: ModelFromZendesk;\n};\n\nexport type ApiVVersionODataControllerCountResponse = ApiVVersionODataControllerCountResponses[keyof ApiVVersionODataControllerCountResponses];\n\nexport type GetApiVbyApiVersionSimpleOperationData = {\n    body?: never;\n    path: {\n        /**\n         * foo in method\n         */\n        foo_param: string;\n    };\n    query?: never;\n    url: '/api/v{api-version}/simple:operation';\n};\n\nexport type GetApiVbyApiVersionSimpleOperationErrors = {\n    /**\n     * Default error response\n     */\n    default: ModelWithBoolean;\n};\n\nexport type GetApiVbyApiVersionSimpleOperationError = GetApiVbyApiVersionSimpleOperationErrors[keyof GetApiVbyApiVersionSimpleOperationErrors];\n\nexport type GetApiVbyApiVersionSimpleOperationResponses = {\n    /**\n     * Response is a simple number\n     */\n    200: number;\n};\n\nexport type GetApiVbyApiVersionSimpleOperationResponse = GetApiVbyApiVersionSimpleOperationResponses[keyof GetApiVbyApiVersionSimpleOperationResponses];\n\nexport type DeleteCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type GetCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type HeadCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type OptionsCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type PatchCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type PostCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type PutCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type DeleteFooData3 = {\n    body?: never;\n    headers: {\n        /**\n         * Parameter with illegal characters\n         */\n        'x-Foo-Bar': ModelWithString;\n    };\n    path: {\n        /**\n         * foo in method\n         */\n        foo_param: string;\n        /**\n         * bar in method\n         */\n        BarParam: string;\n    };\n    query?: never;\n    url: '/api/v{api-version}/foo/{foo_param}/bar/{BarParam}';\n};\n\nexport type CallWithDescriptionsData = {\n    body?: never;\n    path?: never;\n    query?: {\n        /**\n         * Testing multiline comments in string: First line\n         * Second line\n         *\n         * Fourth line\n         */\n        parameterWithBreaks?: string;\n        /**\n         * Testing backticks in string: `backticks` and ```multiple backticks``` should work\n         */\n        parameterWithBackticks?: string;\n        /**\n         * Testing slashes in string: \\backwards\\\\\\ and /forwards/// should work\n         */\n        parameterWithSlashes?: string;\n        /**\n         * Testing expression placeholders in string: ${expression} should work\n         */\n        parameterWithExpressionPlaceholders?: string;\n        /**\n         * Testing quotes in string: 'single quote''' and \"double quotes\"\"\" should work\n         */\n        parameterWithQuotes?: string;\n        /**\n         * Testing reserved characters in string: * inline * and ** inline ** should work\n         */\n        parameterWithReservedCharacters?: string;\n    };\n    url: '/api/v{api-version}/descriptions';\n};\n\nexport type DeprecatedCallData = {\n    body?: never;\n    headers: {\n        /**\n         * This parameter is deprecated\n         *\n         * @deprecated\n         */\n        parameter: DeprecatedModel | null;\n    };\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/parameters/deprecated';\n};\n\nexport type CallWithParametersData = {\n    /**\n     * This is the parameter that goes into the body\n     */\n    body: {\n        [key: string]: unknown;\n    } | null;\n    headers: {\n        /**\n         * This is the parameter that goes into the header\n         */\n        parameterHeader: string | null;\n    };\n    path: {\n        /**\n         * This is the parameter that goes into the path\n         */\n        parameterPath: string | null;\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string | null;\n    };\n    query: {\n        foo_ref_enum?: ModelWithNestedArrayEnumsDataFoo;\n        foo_all_of_enum: ModelWithNestedArrayEnumsDataFoo;\n        /**\n         * This is the parameter that goes into the query params\n         */\n        cursor: string | null;\n    };\n    url: '/api/v{api-version}/parameters/{parameterPath}';\n};\n\nexport type CallWithWeirdParameterNamesData = {\n    /**\n     * This is the parameter that goes into the body\n     */\n    body: ModelWithString | null;\n    headers: {\n        /**\n         * This is the parameter that goes into the request header\n         */\n        'parameter.header': string | null;\n    };\n    path: {\n        /**\n         * This is the parameter that goes into the path\n         */\n        'parameter.path.1'?: string;\n        /**\n         * This is the parameter that goes into the path\n         */\n        'parameter-path-2'?: string;\n        /**\n         * This is the parameter that goes into the path\n         */\n        'PARAMETER-PATH-3'?: string;\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string | null;\n    };\n    query: {\n        /**\n         * This is the parameter with a reserved keyword\n         */\n        default?: string;\n        /**\n         * This is the parameter that goes into the request query params\n         */\n        'parameter-query': string | null;\n    };\n    url: '/api/v{api-version}/parameters/{parameter.path.1}/{parameter-path-2}/{PARAMETER-PATH-3}';\n};\n\nexport type GetCallWithOptionalParamData = {\n    /**\n     * This is a required parameter\n     */\n    body: ModelWithOneOfEnum;\n    path?: never;\n    query?: {\n        /**\n         * This is an optional parameter\n         */\n        page?: number;\n    };\n    url: '/api/v{api-version}/parameters';\n};\n\nexport type PostCallWithOptionalParamData = {\n    /**\n     * This is an optional parameter\n     */\n    body?: {\n        offset?: number | null;\n    };\n    path?: never;\n    query: {\n        /**\n         * This is a required parameter\n         */\n        parameter: Pageable;\n    };\n    url: '/api/v{api-version}/parameters';\n};\n\nexport type PostCallWithOptionalParamResponses = {\n    /**\n     * Response is a simple number\n     */\n    200: number;\n    /**\n     * Success\n     */\n    204: void;\n};\n\nexport type PostCallWithOptionalParamResponse = PostCallWithOptionalParamResponses[keyof PostCallWithOptionalParamResponses];\n\nexport type PostApiVbyApiVersionRequestBodyData = {\n    /**\n     * A reusable request body\n     */\n    body?: SimpleRequestBody;\n    path?: never;\n    query?: {\n        /**\n         * This is a reusable parameter\n         */\n        parameter?: string;\n    };\n    url: '/api/v{api-version}/requestBody';\n};\n\nexport type PostApiVbyApiVersionFormDataData = {\n    /**\n     * A reusable request body\n     */\n    body?: SimpleFormData;\n    path?: never;\n    query?: {\n        /**\n         * This is a reusable parameter\n         */\n        parameter?: string;\n    };\n    url: '/api/v{api-version}/formData';\n};\n\nexport type CallWithDefaultParametersData = {\n    body?: never;\n    path?: never;\n    query?: {\n        /**\n         * This is a simple string with default value\n         */\n        parameterString?: string | null;\n        /**\n         * This is a simple number with default value\n         */\n        parameterNumber?: number | null;\n        /**\n         * This is a simple boolean with default value\n         */\n        parameterBoolean?: boolean | null;\n        /**\n         * This is a simple enum with default value\n         */\n        parameterEnum?: 'Success' | 'Warning' | 'Error';\n        /**\n         * This is a simple model with default value\n         */\n        parameterModel?: ModelWithString | null;\n    };\n    url: '/api/v{api-version}/defaults';\n};\n\nexport type CallWithDefaultOptionalParametersData = {\n    body?: never;\n    path?: never;\n    query?: {\n        /**\n         * This is a simple string that is optional with default value\n         */\n        parameterString?: string;\n        /**\n         * This is a simple number that is optional with default value\n         */\n        parameterNumber?: number;\n        /**\n         * This is a simple boolean that is optional with default value\n         */\n        parameterBoolean?: boolean;\n        /**\n         * This is a simple enum that is optional with default value\n         */\n        parameterEnum?: 'Success' | 'Warning' | 'Error';\n        /**\n         * This is a simple model that is optional with default value\n         */\n        parameterModel?: ModelWithString;\n    };\n    url: '/api/v{api-version}/defaults';\n};\n\nexport type CallToTestOrderOfParamsData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * This is a optional string with default\n         */\n        parameterOptionalStringWithDefault?: string;\n        /**\n         * This is a optional string with empty default\n         */\n        parameterOptionalStringWithEmptyDefault?: string;\n        /**\n         * This is a optional string with no default\n         */\n        parameterOptionalStringWithNoDefault?: string;\n        /**\n         * This is a string with default\n         */\n        parameterStringWithDefault: string;\n        /**\n         * This is a string with empty default\n         */\n        parameterStringWithEmptyDefault: string;\n        /**\n         * This is a string with no default\n         */\n        parameterStringWithNoDefault: string;\n        /**\n         * This is a string that can be null with no default\n         */\n        parameterStringNullableWithNoDefault?: string | null;\n        /**\n         * This is a string that can be null with default\n         */\n        parameterStringNullableWithDefault?: string | null;\n    };\n    url: '/api/v{api-version}/defaults';\n};\n\nexport type DuplicateNameData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/duplicate';\n};\n\nexport type DuplicateName2Data = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/duplicate';\n};\n\nexport type DuplicateName3Data = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/duplicate';\n};\n\nexport type DuplicateName4Data = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/duplicate';\n};\n\nexport type CallWithNoContentResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no-content';\n};\n\nexport type CallWithNoContentResponseResponses = {\n    /**\n     * Success\n     */\n    204: void;\n};\n\nexport type CallWithNoContentResponseResponse = CallWithNoContentResponseResponses[keyof CallWithNoContentResponseResponses];\n\nexport type CallWithResponseAndNoContentResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multiple-tags/response-and-no-content';\n};\n\nexport type CallWithResponseAndNoContentResponseResponses = {\n    /**\n     * Response is a simple number\n     */\n    200: number;\n    /**\n     * Success\n     */\n    204: void;\n};\n\nexport type CallWithResponseAndNoContentResponseResponse = CallWithResponseAndNoContentResponseResponses[keyof CallWithResponseAndNoContentResponseResponses];\n\nexport type DummyAData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multiple-tags/a';\n};\n\nexport type DummyAResponses = {\n    200: _400;\n};\n\nexport type DummyAResponse = DummyAResponses[keyof DummyAResponses];\n\nexport type DummyBData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multiple-tags/b';\n};\n\nexport type DummyBResponses = {\n    /**\n     * Success\n     */\n    204: void;\n};\n\nexport type DummyBResponse = DummyBResponses[keyof DummyBResponses];\n\nexport type CallWithResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/response';\n};\n\nexport type CallWithResponseResponses = {\n    default: Import;\n};\n\nexport type CallWithResponseResponse = CallWithResponseResponses[keyof CallWithResponseResponses];\n\nexport type CallWithDuplicateResponsesData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/response';\n};\n\nexport type CallWithDuplicateResponsesErrors = {\n    /**\n     * Message for 500 error\n     */\n    500: ModelWithStringError;\n    /**\n     * Message for 501 error\n     */\n    501: ModelWithStringError;\n    /**\n     * Message for 502 error\n     */\n    502: ModelWithStringError;\n    /**\n     * Message for 4XX errors\n     */\n    '4XX': DictionaryWithArray;\n    /**\n     * Default error response\n     */\n    default: ModelWithBoolean;\n};\n\nexport type CallWithDuplicateResponsesError = CallWithDuplicateResponsesErrors[keyof CallWithDuplicateResponsesErrors];\n\nexport type CallWithDuplicateResponsesResponses = {\n    /**\n     * Message for 200 response\n     */\n    200: ModelWithBoolean & ModelWithInteger;\n    /**\n     * Message for 201 response\n     */\n    201: ModelWithString;\n    /**\n     * Message for 202 response\n     */\n    202: ModelWithString;\n};\n\nexport type CallWithDuplicateResponsesResponse = CallWithDuplicateResponsesResponses[keyof CallWithDuplicateResponsesResponses];\n\nexport type CallWithResponsesData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/response';\n};\n\nexport type CallWithResponsesErrors = {\n    /**\n     * Message for 500 error\n     */\n    500: ModelWithStringError;\n    /**\n     * Message for 501 error\n     */\n    501: ModelWithStringError;\n    /**\n     * Message for 502 error\n     */\n    502: ModelWithStringError;\n    /**\n     * Message for default response\n     */\n    default: ModelWithStringError;\n};\n\nexport type CallWithResponsesError = CallWithResponsesErrors[keyof CallWithResponsesErrors];\n\nexport type CallWithResponsesResponses = {\n    /**\n     * Message for 200 response\n     */\n    200: {\n        readonly '@namespace.string'?: string;\n        readonly '@namespace.integer'?: number;\n        readonly value?: Array<ModelWithString>;\n    };\n    /**\n     * Message for 201 response\n     */\n    201: ModelThatExtends;\n    /**\n     * Message for 202 response\n     */\n    202: ModelThatExtendsExtends;\n};\n\nexport type CallWithResponsesResponse = CallWithResponsesResponses[keyof CallWithResponsesResponses];\n\nexport type CollectionFormatData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * This is an array parameter that is sent as csv format (comma-separated values)\n         */\n        parameterArrayCSV: Array<string> | null;\n        /**\n         * This is an array parameter that is sent as ssv format (space-separated values)\n         */\n        parameterArraySSV: Array<string> | null;\n        /**\n         * This is an array parameter that is sent as tsv format (tab-separated values)\n         */\n        parameterArrayTSV: Array<string> | null;\n        /**\n         * This is an array parameter that is sent as pipes format (pipe-separated values)\n         */\n        parameterArrayPipes: Array<string> | null;\n        /**\n         * This is an array parameter that is sent as multi format (multiple parameter instances)\n         */\n        parameterArrayMulti: Array<string> | null;\n    };\n    url: '/api/v{api-version}/collectionFormat';\n};\n\nexport type TypesData = {\n    body?: never;\n    path?: {\n        /**\n         * This is a number parameter\n         */\n        id?: number;\n    };\n    query: {\n        /**\n         * This is a number parameter\n         */\n        parameterNumber: number;\n        /**\n         * This is a string parameter\n         */\n        parameterString: string | null;\n        /**\n         * This is a boolean parameter\n         */\n        parameterBoolean: boolean | null;\n        /**\n         * This is an object parameter\n         */\n        parameterObject: {\n            [key: string]: unknown;\n        } | null;\n        /**\n         * This is an array parameter\n         */\n        parameterArray: Array<string> | null;\n        /**\n         * This is a dictionary parameter\n         */\n        parameterDictionary: {\n            [key: string]: unknown;\n        } | null;\n        /**\n         * This is an enum parameter\n         */\n        parameterEnum: 'Success' | 'Warning' | 'Error' | null;\n    };\n    url: '/api/v{api-version}/types';\n};\n\nexport type TypesResponses = {\n    /**\n     * Response is a simple number\n     */\n    200: number;\n    /**\n     * Response is a simple string\n     */\n    201: string;\n    /**\n     * Response is a simple boolean\n     */\n    202: boolean;\n    /**\n     * Response is a simple object\n     */\n    203: {\n        [key: string]: unknown;\n    };\n};\n\nexport type TypesResponse = TypesResponses[keyof TypesResponses];\n\nexport type UploadFileData = {\n    body: Blob | File;\n    path: {\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string | null;\n    };\n    query?: never;\n    url: '/api/v{api-version}/upload';\n};\n\nexport type UploadFileResponses = {\n    200: boolean;\n};\n\nexport type UploadFileResponse = UploadFileResponses[keyof UploadFileResponses];\n\nexport type FileResponseData = {\n    body?: never;\n    path: {\n        id: string;\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string;\n    };\n    query?: never;\n    url: '/api/v{api-version}/file/{id}';\n};\n\nexport type FileResponseResponses = {\n    /**\n     * Success\n     */\n    200: Blob | File;\n};\n\nexport type FileResponseResponse = FileResponseResponses[keyof FileResponseResponses];\n\nexport type ComplexTypesData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * Parameter containing object\n         */\n        parameterObject: {\n            first?: {\n                second?: {\n                    third?: string;\n                };\n            };\n        };\n        /**\n         * Parameter containing reference\n         */\n        parameterReference: ModelWithString;\n    };\n    url: '/api/v{api-version}/complex';\n};\n\nexport type ComplexTypesErrors = {\n    /**\n     * 400 `server` error\n     */\n    400: unknown;\n    /**\n     * 500 server error\n     */\n    500: unknown;\n};\n\nexport type ComplexTypesResponses = {\n    /**\n     * Successful response\n     */\n    200: Array<ModelWithString>;\n};\n\nexport type ComplexTypesResponse = ComplexTypesResponses[keyof ComplexTypesResponses];\n\nexport type MultipartResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multipart';\n};\n\nexport type MultipartResponseResponses = {\n    /**\n     * OK\n     */\n    200: {\n        file?: Blob | File;\n        metadata?: {\n            foo?: string;\n            bar?: string;\n        };\n    };\n};\n\nexport type MultipartResponseResponse = MultipartResponseResponses[keyof MultipartResponseResponses];\n\nexport type MultipartRequestData = {\n    body?: {\n        content?: Blob | File;\n        data?: ModelWithString | null;\n    };\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multipart';\n};\n\nexport type ComplexParamsData = {\n    body?: {\n        readonly key: string | null;\n        name: string | null;\n        enabled?: boolean;\n        type: 'Monkey' | 'Horse' | 'Bird';\n        listOfModels?: Array<ModelWithString> | null;\n        listOfStrings?: Array<string> | null;\n        parameters: ModelWithString | ModelWithEnum | ModelWithArray | ModelWithDictionary;\n        readonly user?: {\n            readonly id?: number;\n            readonly name?: string | null;\n        };\n    };\n    path: {\n        id: number;\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string;\n    };\n    query?: never;\n    url: '/api/v{api-version}/complex/{id}';\n};\n\nexport type ComplexParamsResponses = {\n    /**\n     * Success\n     */\n    200: ModelWithString;\n};\n\nexport type ComplexParamsResponse = ComplexParamsResponses[keyof ComplexParamsResponses];\n\nexport type CallWithResultFromHeaderData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/header';\n};\n\nexport type CallWithResultFromHeaderErrors = {\n    /**\n     * 400 server error\n     */\n    400: unknown;\n    /**\n     * 500 server error\n     */\n    500: unknown;\n};\n\nexport type CallWithResultFromHeaderResponses = {\n    /**\n     * Successful response\n     */\n    200: unknown;\n};\n\nexport type TestErrorCodeData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * Status code to return\n         */\n        status: number;\n    };\n    url: '/api/v{api-version}/error';\n};\n\nexport type TestErrorCodeErrors = {\n    /**\n     * Custom message: Internal Server Error\n     */\n    500: unknown;\n    /**\n     * Custom message: Not Implemented\n     */\n    501: unknown;\n    /**\n     * Custom message: Bad Gateway\n     */\n    502: unknown;\n    /**\n     * Custom message: Service Unavailable\n     */\n    503: unknown;\n};\n\nexport type TestErrorCodeResponses = {\n    /**\n     * Custom message: Successful response\n     */\n    200: unknown;\n};\n\nexport type NonAsciiæøåÆøÅöôêÊ字符串Data = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * Dummy input param\n         */\n        nonAsciiParamæøåÆØÅöôêÊ: number;\n    };\n    url: '/api/v{api-version}/non-ascii-æøåÆØÅöôêÊ字符串';\n};\n\nexport type NonAsciiæøåÆøÅöôêÊ字符串Responses = {\n    /**\n     * Successful response\n     */\n    200: Array<NonAsciiStringæøåÆøÅöôêÊ字符串>;\n};\n\nexport type NonAsciiæøåÆøÅöôêÊ字符串Response = NonAsciiæøåÆøÅöôêÊ字符串Responses[keyof NonAsciiæøåÆøÅöôêÊ字符串Responses];\n\nexport type PutWithFormUrlEncodedData = {\n    body: ArrayWithStrings;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/non-ascii-æøåÆØÅöôêÊ字符串';\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-angular/sdk-client-required/client/client.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { HttpResponse } from '@angular/common/http';\nimport { HttpClient, HttpErrorResponse, HttpEventType, HttpRequest } from '@angular/common/http';\nimport {\n  assertInInjectionContext,\n  inject,\n  provideAppInitializer,\n  runInInjectionContext,\n} from '@angular/core';\nimport { firstValueFrom } from 'rxjs';\nimport { filter } from 'rxjs/operators';\n\nimport { createSseClient } from '../core/serverSentEvents.gen';\nimport type { HttpMethod } from '../core/types.gen';\nimport { getValidRequestBody } from '../core/utils.gen';\nimport type {\n  Client,\n  Config,\n  RequestOptions,\n  ResolvedRequestOptions,\n  ResponseStyle,\n} from './types.gen';\nimport {\n  buildUrl,\n  createConfig,\n  createInterceptors,\n  mergeConfigs,\n  mergeHeaders,\n  setAuthParams,\n} from './utils.gen';\n\nexport function provideHeyApiClient(client: Client) {\n  return provideAppInitializer(() => {\n    const httpClient = inject(HttpClient);\n    client.setConfig({ httpClient });\n  });\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<\n    HttpRequest<unknown>,\n    HttpResponse<unknown>,\n    unknown,\n    ResolvedRequestOptions\n  >();\n\n  const requestOptions = <\n    TData = unknown,\n    ThrowOnError extends boolean = false,\n    TResponseStyle extends ResponseStyle = 'fields',\n  >(\n    options: RequestOptions<TData, TResponseStyle, ThrowOnError>,\n  ) => {\n    const opts = {\n      ..._config,\n      ...options,\n      headers: mergeHeaders(_config.headers, options.headers),\n      httpClient: options.httpClient ?? _config.httpClient,\n      serializedBody: undefined as string | undefined,\n    };\n\n    if (!opts.httpClient) {\n      if (opts.injector) {\n        opts.httpClient = runInInjectionContext(opts.injector, () => inject(HttpClient));\n      } else {\n        assertInInjectionContext(requestOptions);\n        opts.httpClient = inject(HttpClient);\n      }\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 url = buildUrl(opts as any);\n\n    const req = new HttpRequest<unknown>(opts.method ?? 'GET', url, getValidRequestBody(opts), {\n      redirect: 'follow',\n      ...opts,\n    });\n\n    return { opts, req, url };\n  };\n\n  const beforeRequest = async (options: RequestOptions) => {\n    const { opts, req, url } = requestOptions(options);\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    return { opts, req, url };\n  };\n\n  const request: Client['request'] = async (options) => {\n    // @ts-expect-error\n    const { opts, req: initialReq } = await beforeRequest(options);\n\n    let req = initialReq;\n\n    for (const fn of interceptors.request.fns) {\n      if (fn) {\n        req = await fn(req, opts as any);\n      }\n    }\n\n    const result: {\n      request: HttpRequest<unknown>;\n      response: any;\n    } = {\n      request: req,\n      response: null,\n    };\n\n    try {\n      result.response = (await firstValueFrom(\n        opts\n          .httpClient!.request(req)\n          .pipe(filter((event) => event.type === HttpEventType.Response)),\n      )) as HttpResponse<unknown>;\n\n      for (const fn of interceptors.response.fns) {\n        if (fn) {\n          result.response = await fn(result.response, req, opts as any);\n        }\n      }\n\n      let bodyResponse = result.response.body;\n\n      if (opts.responseValidator) {\n        await opts.responseValidator(bodyResponse);\n      }\n\n      if (opts.responseTransformer) {\n        bodyResponse = await opts.responseTransformer(bodyResponse);\n      }\n\n      return opts.responseStyle === 'data' ? bodyResponse : { data: bodyResponse, ...result };\n    } catch (error) {\n      if (error instanceof HttpErrorResponse) {\n        result.response = error;\n      }\n\n      let finalError = error instanceof HttpErrorResponse ? error.error : error;\n\n      for (const fn of interceptors.error.fns) {\n        if (fn) {\n          finalError = (await fn(finalError, result.response as any, req, opts as any)) as string;\n        }\n      }\n\n      if (opts.throwOnError) {\n        throw finalError;\n      }\n\n      return opts.responseStyle === 'data'\n        ? undefined\n        : {\n            error: finalError,\n            ...result,\n          };\n    }\n  };\n\n  const makeMethodFn = (method: Uppercase<HttpMethod>) => (options: RequestOptions) =>\n    request({ ...options, method });\n\n  const makeSseFn = (method: Uppercase<HttpMethod>) => async (options: RequestOptions) => {\n    const { opts, url } = await beforeRequest(options);\n    return createSseClient({\n      ...opts,\n      body: opts.body as BodyInit | null | undefined,\n      headers: opts.headers as unknown as Record<string, string>,\n      method,\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    requestOptions: (options) => {\n      if (options.security) {\n        throw new Error('Security is not supported in requestOptions');\n      }\n\n      if (options.requestValidator) {\n        throw new Error('Request validation is not supported in requestOptions');\n      }\n\n      return requestOptions(options).req;\n    },\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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-angular/sdk-client-required/client/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type { Auth } from '../core/auth.gen';\nexport type { QuerySerializerOptions } from '../core/bodySerializer.gen';\nexport {\n  formDataBodySerializer,\n  jsonBodySerializer,\n  urlSearchParamsBodySerializer,\n} from '../core/bodySerializer.gen';\nexport { buildClientParams } from '../core/params.gen';\nexport { serializeQueryKeyValue } from '../core/queryKeySerializer.gen';\nexport { createClient } from './client.gen';\nexport type {\n  Client,\n  ClientOptions,\n  Config,\n  CreateClientConfig,\n  Options,\n  RequestOptions,\n  RequestResult,\n  ResolvedRequestOptions,\n  ResponseStyle,\n  TDataShape,\n} from './types.gen';\nexport { createConfig, mergeHeaders } from './utils.gen';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-angular/sdk-client-required/client/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type {\n  HttpClient,\n  HttpErrorResponse,\n  HttpHeaders,\n  HttpRequest,\n  HttpResponse,\n} from '@angular/common/http';\nimport type { Injector } from '@angular/core';\n\nimport type { Auth } from '../core/auth.gen';\nimport type {\n  ServerSentEventsOptions,\n  ServerSentEventsResult,\n} from '../core/serverSentEvents.gen';\nimport type { Client as CoreClient, Config as CoreConfig } from '../core/types.gen';\nimport type { Middleware } from './utils.gen';\n\nexport type ResponseStyle = 'data' | 'fields';\n\nexport interface Config<T extends ClientOptions = ClientOptions>\n  extends Omit<RequestInit, 'body' | 'headers' | 'method'>, Omit<CoreConfig, 'headers'> {\n  /**\n   * Base URL for all requests made by this client.\n   */\n  baseUrl?: T['baseUrl'];\n  /**\n   * An object containing any HTTP headers that you want to pre-populate your\n   * `HttpHeaders` object with.\n   *\n   * {@link https://angular.dev/api/common/http/HttpHeaders#constructor See more}\n   */\n  headers?:\n    | HttpHeaders\n    | Record<\n        string,\n        string | number | boolean | (string | number | boolean)[] | null | undefined | unknown\n      >;\n  /**\n   * The HTTP client to use for making requests.\n   */\n  httpClient?: HttpClient;\n  /**\n   * Should we return only data or multiple fields (data, error, response, etc.)?\n   *\n   * @default 'fields'\n   */\n  responseStyle?: ResponseStyle;\n\n  /**\n   * Throw an error instead of returning it in the response?\n   *\n   * @default false\n   */\n  throwOnError?: T['throwOnError'];\n}\n\nexport interface RequestOptions<\n  TData = unknown,\n  TResponseStyle extends ResponseStyle = 'fields',\n  ThrowOnError extends boolean = boolean,\n  Url extends string = string,\n>\n  extends\n    Config<{\n      responseStyle: TResponseStyle;\n      throwOnError: ThrowOnError;\n    }>,\n    Pick<\n      ServerSentEventsOptions<TData>,\n      | 'onRequest'\n      | 'onSseError'\n      | 'onSseEvent'\n      | 'sseDefaultRetryDelay'\n      | 'sseMaxRetryAttempts'\n      | 'sseMaxRetryDelay'\n    > {\n  /**\n   * Any body that you want to add to your request.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/fetch#body}\n   */\n  body?: unknown;\n  /**\n   * Optional custom injector for dependency resolution if you don't implicitly or explicitly provide one.\n   */\n  injector?: Injector;\n  path?: Record<string, unknown>;\n  query?: Record<string, unknown>;\n  /**\n   * Security mechanism(s) to use for the request.\n   */\n  security?: ReadonlyArray<Auth>;\n  url: Url;\n}\n\nexport interface ResolvedRequestOptions<\n  TResponseStyle extends ResponseStyle = 'fields',\n  ThrowOnError extends boolean = boolean,\n  Url extends string = string,\n> extends RequestOptions<unknown, TResponseStyle, ThrowOnError, Url> {\n  serializedBody?: string;\n}\n\nexport type RequestResult<\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = boolean,\n  TResponseStyle extends ResponseStyle = 'fields',\n> = Promise<\n  ThrowOnError extends true\n    ? TResponseStyle extends 'data'\n      ? TData extends Record<string, unknown>\n        ? TData[keyof TData]\n        : TData\n      : {\n          data: TData extends Record<string, unknown> ? TData[keyof TData] : TData;\n          request: HttpRequest<unknown>;\n          response: HttpResponse<TData>;\n        }\n    : TResponseStyle extends 'data'\n      ? (TData extends Record<string, unknown> ? TData[keyof TData] : TData) | undefined\n      :\n          | {\n              data: TData extends Record<string, unknown> ? TData[keyof TData] : TData;\n              error: undefined;\n              request: HttpRequest<unknown>;\n              response: HttpResponse<TData>;\n            }\n          | {\n              data: undefined;\n              error: TError[keyof TError];\n              request: HttpRequest<unknown>;\n              response: HttpErrorResponse & {\n                error: TError[keyof TError] | null;\n              };\n            }\n>;\n\nexport interface ClientOptions {\n  baseUrl?: string;\n  responseStyle?: ResponseStyle;\n  throwOnError?: boolean;\n}\n\ntype MethodFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'>,\n) => RequestResult<TData, TError, ThrowOnError, TResponseStyle>;\n\ntype SseFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'>,\n) => Promise<ServerSentEventsResult<TData, TError>>;\n\ntype RequestFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'> &\n    Pick<Required<RequestOptions<TData, TResponseStyle, ThrowOnError>>, 'method'>,\n) => RequestResult<TData, TError, ThrowOnError, TResponseStyle>;\n\ntype RequestOptionsFn = <\n  T,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: RequestOptions<T, TResponseStyle, ThrowOnError>,\n) => HttpRequest<T>;\n\ntype BuildUrlFn = <\n  TData extends {\n    body?: unknown;\n    path?: Record<string, unknown>;\n    query?: Record<string, unknown>;\n    url: string;\n  },\n>(\n  options: TData & Options<TData>,\n) => string;\n\nexport type Client = CoreClient<RequestFn, Config, MethodFn, BuildUrlFn, SseFn> & {\n  interceptors: Middleware<\n    HttpRequest<unknown>,\n    HttpResponse<unknown>,\n    unknown,\n    ResolvedRequestOptions\n  >;\n  requestOptions: RequestOptionsFn;\n};\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 = ClientOptions> = (\n  override?: Config<ClientOptions & T>,\n) => Config<Required<ClientOptions> & T>;\n\nexport interface TDataShape {\n  body?: unknown;\n  headers?: unknown;\n  path?: unknown;\n  query?: unknown;\n  url: string;\n}\n\ntype OmitKeys<T, K> = Pick<T, Exclude<keyof T, K>>;\n\nexport type Options<\n  TData extends TDataShape = TDataShape,\n  ThrowOnError extends boolean = boolean,\n  TResponse = unknown,\n  TResponseStyle extends ResponseStyle = 'fields',\n> = OmitKeys<\n  RequestOptions<TResponse, TResponseStyle, ThrowOnError>,\n  'body' | 'path' | 'query' | 'url'\n> &\n  ([TData] extends [never] ? unknown : Omit<TData, 'url'>);\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-angular/sdk-client-required/client/utils.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport { HttpHeaders } from '@angular/common/http';\n\nimport { getAuthToken } from '../core/auth.gen';\nimport type {\n  QuerySerializer,\n  QuerySerializerOptions,\n} from '../core/bodySerializer.gen';\nimport {\n  serializeArrayParam,\n  serializeObjectParam,\n  serializePrimitiveParam,\n} from '../core/pathSerializer.gen';\nimport type { Client, ClientOptions, Config, RequestOptions } from './types.gen';\n\ninterface PathSerializer {\n  path: Record<string, unknown>;\n  url: string;\n}\n\nconst PATH_PARAM_RE = /\\{[^{}]+\\}/g;\n\ntype ArrayStyle = 'form' | 'spaceDelimited' | 'pipeDelimited';\ntype MatrixStyle = 'label' | 'matrix' | 'simple';\ntype ArraySeparatorStyle = ArrayStyle | MatrixStyle;\n\nconst 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 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 = (\n  contentType: string | null,\n): 'blob' | 'formData' | 'json' | 'stream' | 'text' | undefined => {\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\nexport const setAuthParams = async (\n  options: Pick<Required<RequestOptions>, 'security'> &\n    Pick<RequestOptions, 'auth' | 'query'> & {\n      headers: HttpHeaders;\n    },\n) => {\n  for (const auth of options.security) {\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 = options.headers.append('Cookie', `${name}=${token}`);\n        break;\n      case 'header':\n      default:\n        options.headers = options.headers.set(name, token);\n        break;\n    }\n\n    return;\n  }\n};\n\nexport const buildUrl: Client['buildUrl'] = (options) => {\n  const url = 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  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 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\nexport const mergeHeaders = (\n  ...headers: Array<Required<Config>['headers'] | undefined>\n): HttpHeaders => {\n  let mergedHeaders = new HttpHeaders();\n\n  for (const header of headers) {\n    if (!header || typeof header !== 'object') {\n      continue;\n    }\n\n    if (header instanceof HttpHeaders) {\n      // Merge HttpHeaders instance\n      header.keys().forEach((key) => {\n        const values = header.getAll(key);\n        if (values) {\n          values.forEach((value) => {\n            mergedHeaders = mergedHeaders.append(key, value);\n          });\n        }\n      });\n    } else {\n      // Merge plain object headers\n      for (const [key, value] of Object.entries(header)) {\n        if (value === null) {\n          mergedHeaders = mergedHeaders.delete(key);\n        } else if (Array.isArray(value)) {\n          for (const v of value) {\n            mergedHeaders = 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 = mergedHeaders.set(\n            key,\n            typeof value === 'object' ? JSON.stringify(value) : (value as string),\n          );\n        }\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  headers: defaultHeaders,\n  querySerializer: defaultQuerySerializer,\n  ...override,\n});\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-angular/sdk-client-required/client.gen.ts",
    "content": "// 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: 'http://localhost:3000/base' }));\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-angular/sdk-client-required/core/auth.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-angular/sdk-client-required/core/bodySerializer.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-angular/sdk-client-required/core/params.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-angular/sdk-client-required/core/pathSerializer.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-angular/sdk-client-required/core/queryKeySerializer.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\n/**\n * JSON-friendly union that mirrors what Pinia Colada can hash.\n */\nexport type JsonValue =\n  | null\n  | string\n  | number\n  | boolean\n  | JsonValue[]\n  | { [key: string]: JsonValue };\n\n/**\n * Replacer that converts non-JSON values (bigint, Date, etc.) to safe substitutes.\n */\nexport const queryKeyJsonReplacer = (_key: string, value: unknown) => {\n  if (value === undefined || typeof value === 'function' || typeof value === 'symbol') {\n    return undefined;\n  }\n  if (typeof value === 'bigint') {\n    return value.toString();\n  }\n  if (value instanceof Date) {\n    return value.toISOString();\n  }\n  return value;\n};\n\n/**\n * Safely stringifies a value and parses it back into a JsonValue.\n */\nexport const stringifyToJsonValue = (input: unknown): JsonValue | undefined => {\n  try {\n    const json = JSON.stringify(input, queryKeyJsonReplacer);\n    if (json === undefined) {\n      return undefined;\n    }\n    return JSON.parse(json) as JsonValue;\n  } catch {\n    return undefined;\n  }\n};\n\n/**\n * Detects plain objects (including objects with a null prototype).\n */\nconst isPlainObject = (value: unknown): value is Record<string, unknown> => {\n  if (value === null || typeof value !== 'object') {\n    return false;\n  }\n  const prototype = Object.getPrototypeOf(value as object);\n  return prototype === Object.prototype || prototype === null;\n};\n\n/**\n * Turns URLSearchParams into a sorted JSON object for deterministic keys.\n */\nconst serializeSearchParams = (params: URLSearchParams): JsonValue => {\n  const entries = Array.from(params.entries()).sort(([a], [b]) => a.localeCompare(b));\n  const result: Record<string, JsonValue> = {};\n\n  for (const [key, value] of entries) {\n    const existing = result[key];\n    if (existing === undefined) {\n      result[key] = value;\n      continue;\n    }\n\n    if (Array.isArray(existing)) {\n      (existing as string[]).push(value);\n    } else {\n      result[key] = [existing, value];\n    }\n  }\n\n  return result;\n};\n\n/**\n * Normalizes any accepted value into a JSON-friendly shape for query keys.\n */\nexport const serializeQueryKeyValue = (value: unknown): JsonValue | undefined => {\n  if (value === null) {\n    return null;\n  }\n\n  if (typeof value === 'string' || typeof value === 'number' || typeof value === 'boolean') {\n    return value;\n  }\n\n  if (value === undefined || typeof value === 'function' || typeof value === 'symbol') {\n    return undefined;\n  }\n\n  if (typeof value === 'bigint') {\n    return value.toString();\n  }\n\n  if (value instanceof Date) {\n    return value.toISOString();\n  }\n\n  if (Array.isArray(value)) {\n    return stringifyToJsonValue(value);\n  }\n\n  if (typeof URLSearchParams !== 'undefined' && value instanceof URLSearchParams) {\n    return serializeSearchParams(value);\n  }\n\n  if (isPlainObject(value)) {\n    return stringifyToJsonValue(value);\n  }\n\n  return undefined;\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-angular/sdk-client-required/core/serverSentEvents.gen.ts",
    "content": "// 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 const 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            // Normalize line endings: CRLF -> LF, then CR -> LF\n            buffer = buffer.replace(/\\r\\n/g, '\\n').replace(/\\r/g, '\\n');\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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-angular/sdk-client-required/core/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { Auth, AuthToken } from './auth.gen';\nimport type { BodySerializer, QuerySerializer, QuerySerializerOptions } from './bodySerializer.gen';\n\nexport type HttpMethod =\n  | 'connect'\n  | 'delete'\n  | 'get'\n  | 'head'\n  | 'options'\n  | 'patch'\n  | 'post'\n  | 'put'\n  | 'trace';\n\nexport type Client<\n  RequestFn = never,\n  Config = unknown,\n  MethodFn = never,\n  BuildUrlFn = never,\n  SseFn = never,\n> = {\n  /**\n   * Returns the final request URL.\n   */\n  buildUrl: BuildUrlFn;\n  getConfig: () => Config;\n  request: RequestFn;\n  setConfig: (config: Config) => Config;\n} & {\n  [K in HttpMethod]: MethodFn;\n} & ([SseFn] extends [never] ? { sse?: never } : { sse: { [K in HttpMethod]: SseFn } });\n\nexport interface Config {\n  /**\n   * Auth token or a function returning auth token. The resolved value will be\n   * added to the request payload as defined by its `security` array.\n   */\n  auth?: ((auth: Auth) => Promise<AuthToken> | AuthToken) | AuthToken;\n  /**\n   * A function for serializing request body parameter. By default,\n   * {@link JSON.stringify()} will be used.\n   */\n  bodySerializer?: BodySerializer | null;\n  /**\n   * An object containing any HTTP headers that you want to pre-populate your\n   * `Headers` object with.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/Headers/Headers#init See more}\n   */\n  headers?:\n    | RequestInit['headers']\n    | Record<\n        string,\n        string | number | boolean | (string | number | boolean)[] | null | undefined | unknown\n      >;\n  /**\n   * The request method.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/fetch#method See more}\n   */\n  method?: Uppercase<HttpMethod>;\n  /**\n   * A function for serializing request query parameters. By default, arrays\n   * will be exploded in form style, objects will be exploded in deepObject\n   * style, and reserved characters are percent-encoded.\n   *\n   * This method will have no effect if the native `paramsSerializer()` Axios\n   * API function is used.\n   *\n   * {@link https://swagger.io/docs/specification/serialization/#query View examples}\n   */\n  querySerializer?: QuerySerializer | QuerySerializerOptions;\n  /**\n   * A function validating request data. This is useful if you want to ensure\n   * the request conforms to the desired shape, so it can be safely sent to\n   * the server.\n   */\n  requestValidator?: (data: unknown) => Promise<unknown>;\n  /**\n   * A function transforming response data before it's returned. This is useful\n   * for post-processing data, e.g. converting ISO strings into Date objects.\n   */\n  responseTransformer?: (data: unknown) => Promise<unknown>;\n  /**\n   * A function validating response data. This is useful if you want to ensure\n   * the response conforms to the desired shape, so it can be safely passed to\n   * the transformers and returned to the user.\n   */\n  responseValidator?: (data: unknown) => Promise<unknown>;\n}\n\ntype IsExactlyNeverOrNeverUndefined<T> = [T] extends [never]\n  ? true\n  : [T] extends [never | undefined]\n    ? [undefined] extends [T]\n      ? false\n      : true\n    : false;\n\nexport type OmitNever<T extends Record<string, unknown>> = {\n  [K in keyof T as IsExactlyNeverOrNeverUndefined<T[K]> extends true ? never : K]: T[K];\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-angular/sdk-client-required/core/utils.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-angular/sdk-client-required/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport { apiVVersionODataControllerCount, callToTestOrderOfParams, callWithDefaultOptionalParameters, callWithDefaultParameters, callWithDescriptions, callWithDuplicateResponses, callWithNoContentResponse, callWithParameters, callWithResponse, callWithResponseAndNoContentResponse, callWithResponses, callWithResultFromHeader, callWithWeirdParameterNames, collectionFormat, complexParams, complexTypes, deleteCallWithoutParametersAndResponse, deleteFoo, deprecatedCall, dummyA, dummyB, duplicateName, duplicateName2, duplicateName3, duplicateName4, export_, fileResponse, fooWow, getApiVbyApiVersionSimpleOperation, getCallWithOptionalParam, getCallWithoutParametersAndResponse, headCallWithoutParametersAndResponse, import_, multipartRequest, multipartResponse, nonAsciiæøåÆøÅöôêÊ字符串, type Options, optionsCallWithoutParametersAndResponse, patchApiVbyApiVersionNoTag, patchCallWithoutParametersAndResponse, postApiVbyApiVersionFormData, postApiVbyApiVersionRequestBody, postCallWithOptionalParam, postCallWithoutParametersAndResponse, putCallWithoutParametersAndResponse, putWithFormUrlEncoded, testErrorCode, types, uploadFile } from './sdk.gen';\nexport type { _3eNum1Период, _400, AdditionalPropertiesIntegerIssue, AdditionalPropertiesUnknownIssue, AdditionalPropertiesUnknownIssue2, AdditionalPropertiesUnknownIssue3, AdditionalPropertiesUnknownIssueWritable, AnyOfAnyAndNull, AnyOfArrays, ApiVVersionODataControllerCountData, ApiVVersionODataControllerCountResponse, ApiVVersionODataControllerCountResponses, ArrayWithAnyOfProperties, ArrayWithArray, ArrayWithBooleans, ArrayWithNumbers, ArrayWithProperties, ArrayWithReferences, ArrayWithStrings, CallToTestOrderOfParamsData, CallWithDefaultOptionalParametersData, CallWithDefaultParametersData, CallWithDescriptionsData, CallWithDuplicateResponsesData, CallWithDuplicateResponsesError, CallWithDuplicateResponsesErrors, CallWithDuplicateResponsesResponse, CallWithDuplicateResponsesResponses, CallWithNoContentResponseData, CallWithNoContentResponseResponse, CallWithNoContentResponseResponses, CallWithParametersData, CallWithResponseAndNoContentResponseData, CallWithResponseAndNoContentResponseResponse, CallWithResponseAndNoContentResponseResponses, CallWithResponseData, CallWithResponseResponse, CallWithResponseResponses, CallWithResponsesData, CallWithResponsesError, CallWithResponsesErrors, CallWithResponsesResponse, CallWithResponsesResponses, CallWithResultFromHeaderData, CallWithResultFromHeaderErrors, CallWithResultFromHeaderResponses, CallWithWeirdParameterNamesData, CamelCaseCommentWithBreaks, CharactersInDescription, ClientOptions, CollectionFormatData, CommentWithBackticks, CommentWithBackticksAndQuotes, CommentWithBreaks, CommentWithExpressionPlaceholders, CommentWithQuotes, CommentWithReservedCharacters, CommentWithSlashes, ComplexParamsData, ComplexParamsResponse, ComplexParamsResponses, ComplexTypesData, ComplexTypesErrors, ComplexTypesResponse, ComplexTypesResponses, CompositionBaseModel, CompositionExtendedModel, CompositionWithAllOfAndNullable, CompositionWithAnyOf, CompositionWithAnyOfAndNullable, CompositionWithAnyOfAnonymous, CompositionWithNestedAnyAndTypeNull, CompositionWithNestedAnyOfAndNull, CompositionWithOneOf, CompositionWithOneOfAndComplexArrayDictionary, CompositionWithOneOfAndNullable, CompositionWithOneOfAndProperties, CompositionWithOneOfAndSimpleArrayDictionary, CompositionWithOneOfAndSimpleDictionary, CompositionWithOneOfAnonymous, CompositionWithOneOfDiscriminator, ConstValue, Default, DeleteCallWithoutParametersAndResponseData, DeleteFooData, DeleteFooData2, DeleteFooData3, DeprecatedCallData, DeprecatedModel, DictionaryWithArray, DictionaryWithDictionary, DictionaryWithProperties, DictionaryWithPropertiesAndAdditionalProperties, DictionaryWithReference, DictionaryWithString, DummyAData, DummyAResponse, DummyAResponses, DummyBData, DummyBResponse, DummyBResponses, DuplicateName2Data, DuplicateName3Data, DuplicateName4Data, DuplicateNameData, EnumFromDescription, EnumWithExtensions, EnumWithNumbers, EnumWithReplacedCharacters, EnumWithStrings, EnumWithXEnumNames, ExportData, ExternalRefA, ExternalRefB, ExternalSharedModel, File, FileResponseData, FileResponseResponse, FileResponseResponses, FileWritable, FooWowData, FooWowResponses, FreeFormObjectWithAdditionalPropertiesEqEmptyObject, FreeFormObjectWithAdditionalPropertiesEqTrue, FreeFormObjectWithoutAdditionalProperties, GenericSchemaDuplicateIssue1SystemBoolean, GenericSchemaDuplicateIssue1SystemBooleanWritable, GenericSchemaDuplicateIssue1SystemString, GenericSchemaDuplicateIssue1SystemStringWritable, GetApiVbyApiVersionSimpleOperationData, GetApiVbyApiVersionSimpleOperationError, GetApiVbyApiVersionSimpleOperationErrors, GetApiVbyApiVersionSimpleOperationResponse, GetApiVbyApiVersionSimpleOperationResponses, GetCallWithOptionalParamData, GetCallWithoutParametersAndResponseData, HeadCallWithoutParametersAndResponseData, Import, ImportData, ImportResponse, ImportResponses, IoK8sApimachineryPkgApisMetaV1DeleteOptions, IoK8sApimachineryPkgApisMetaV1Preconditions, ModelCircle, ModelFromZendesk, ModelSquare, ModelThatExtends, ModelThatExtendsExtends, ModelWithAdditionalPropertiesEqTrue, ModelWithAdditionalPropertiesRef, ModelWithAnyOfConstantSizeArray, ModelWithAnyOfConstantSizeArrayAndIntersect, ModelWithAnyOfConstantSizeArrayNullable, ModelWithAnyOfConstantSizeArrayWithNSizeAndOptions, ModelWithAnyOfConstantSizeArrayWithNSizeAndOptionsWritable, ModelWithArray, ModelWithArrayReadOnlyAndWriteOnly, ModelWithArrayReadOnlyAndWriteOnlyWritable, ModelWithBackticksInDescription, ModelWithBoolean, ModelWithCircularReference, ModelWithConst, ModelWithConstantSizeArray, ModelWithDictionary, ModelWithDuplicateImports, ModelWithDuplicateProperties, ModelWithEnum, ModelWithEnumFromDescription, ModelWithEnumWithHyphen, ModelWithInteger, ModelWithNestedArrayEnums, ModelWithNestedArrayEnumsData, ModelWithNestedArrayEnumsDataBar, ModelWithNestedArrayEnumsDataFoo, ModelWithNestedCompositionEnums, ModelWithNestedEnums, ModelWithNestedProperties, ModelWithNullableObject, ModelWithNullableString, ModelWithNumericEnumUnion, ModelWithOneOfAndProperties, ModelWithOneOfEnum, ModelWithOrderedProperties, ModelWithPattern, ModelWithPatternWritable, ModelWithPrefixItemsConstantSizeArray, ModelWithProperties, ModelWithPropertiesWritable, ModelWithReadOnlyAndWriteOnly, ModelWithReadOnlyAndWriteOnlyWritable, ModelWithReference, ModelWithReferenceWritable, ModelWithString, ModelWithStringError, MultipartRequestData, MultipartResponseData, MultipartResponseResponse, MultipartResponseResponses, NestedAnyOfArraysNullable, NonAsciiæøåÆøÅöôêÊ字符串Data, NonAsciiæøåÆøÅöôêÊ字符串Response, NonAsciiæøåÆøÅöôêÊ字符串Responses, NonAsciiStringæøåÆøÅöôêÊ字符串, NullableObject, OneOfAllOfIssue, OneOfAllOfIssueWritable, OptionsCallWithoutParametersAndResponseData, Pageable, ParameterSimpleParameterUnused, PatchApiVbyApiVersionNoTagData, PatchApiVbyApiVersionNoTagResponses, PatchCallWithoutParametersAndResponseData, PostApiVbyApiVersionFormDataData, PostApiVbyApiVersionRequestBodyData, PostCallWithOptionalParamData, PostCallWithOptionalParamResponse, PostCallWithOptionalParamResponses, PostCallWithoutParametersAndResponseData, PostServiceWithEmptyTagResponse, PostServiceWithEmptyTagResponse2, PutCallWithoutParametersAndResponseData, PutWithFormUrlEncodedData, SchemaWithFormRestrictedKeys, SimpleBoolean, SimpleFile, SimpleFormData, SimpleInteger, SimpleParameter, SimpleReference, SimpleRequestBody, SimpleString, SimpleStringWithPattern, TestErrorCodeData, TestErrorCodeErrors, TestErrorCodeResponses, TypesData, TypesResponse, TypesResponses, UploadFileData, UploadFileResponse, UploadFileResponses, XFooBar } from './types.gen';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-angular/sdk-client-required/sdk.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport { type Client, formDataBodySerializer, type Options as Options2, type TDataShape, urlSearchParamsBodySerializer } from './client';\nimport type { ApiVVersionODataControllerCountData, ApiVVersionODataControllerCountResponses, CallToTestOrderOfParamsData, CallWithDefaultOptionalParametersData, CallWithDefaultParametersData, CallWithDescriptionsData, CallWithDuplicateResponsesData, CallWithDuplicateResponsesErrors, CallWithDuplicateResponsesResponses, CallWithNoContentResponseData, CallWithNoContentResponseResponses, CallWithParametersData, CallWithResponseAndNoContentResponseData, CallWithResponseAndNoContentResponseResponses, CallWithResponseData, CallWithResponseResponses, CallWithResponsesData, CallWithResponsesErrors, CallWithResponsesResponses, CallWithResultFromHeaderData, CallWithResultFromHeaderErrors, CallWithResultFromHeaderResponses, CallWithWeirdParameterNamesData, CollectionFormatData, ComplexParamsData, ComplexParamsResponses, ComplexTypesData, ComplexTypesErrors, ComplexTypesResponses, DeleteCallWithoutParametersAndResponseData, DeleteFooData3, DeprecatedCallData, DummyAData, DummyAResponses, DummyBData, DummyBResponses, DuplicateName2Data, DuplicateName3Data, DuplicateName4Data, DuplicateNameData, ExportData, FileResponseData, FileResponseResponses, FooWowData, FooWowResponses, GetApiVbyApiVersionSimpleOperationData, GetApiVbyApiVersionSimpleOperationErrors, GetApiVbyApiVersionSimpleOperationResponses, GetCallWithOptionalParamData, GetCallWithoutParametersAndResponseData, HeadCallWithoutParametersAndResponseData, ImportData, ImportResponses, MultipartRequestData, MultipartResponseData, MultipartResponseResponses, NonAsciiæøåÆøÅöôêÊ字符串Data, NonAsciiæøåÆøÅöôêÊ字符串Responses, OptionsCallWithoutParametersAndResponseData, PatchApiVbyApiVersionNoTagData, PatchApiVbyApiVersionNoTagResponses, PatchCallWithoutParametersAndResponseData, PostApiVbyApiVersionFormDataData, PostApiVbyApiVersionRequestBodyData, PostCallWithOptionalParamData, PostCallWithOptionalParamResponses, PostCallWithoutParametersAndResponseData, PutCallWithoutParametersAndResponseData, PutWithFormUrlEncodedData, TestErrorCodeData, TestErrorCodeErrors, TestErrorCodeResponses, TypesData, TypesResponses, UploadFileData, UploadFileResponses } from './types.gen';\n\nexport type Options<TData extends TDataShape = TDataShape, ThrowOnError extends boolean = boolean> = Options2<TData, ThrowOnError> & {\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\nexport const export_ = <ThrowOnError extends boolean = false>(options: Options<ExportData, ThrowOnError>) => options.client.get<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/no+tag', ...options });\n\nexport const patchApiVbyApiVersionNoTag = <ThrowOnError extends boolean = false>(options: Options<PatchApiVbyApiVersionNoTagData, ThrowOnError>) => options.client.patch<PatchApiVbyApiVersionNoTagResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/no+tag', ...options });\n\nexport const import_ = <ThrowOnError extends boolean = false>(options: Options<ImportData, ThrowOnError>) => options.client.post<ImportResponses, unknown, ThrowOnError>({\n    url: '/api/v{api-version}/no+tag',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options.headers\n    }\n});\n\nexport const fooWow = <ThrowOnError extends boolean = false>(options: Options<FooWowData, ThrowOnError>) => options.client.put<FooWowResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/no+tag', ...options });\n\nexport const apiVVersionODataControllerCount = <ThrowOnError extends boolean = false>(options: Options<ApiVVersionODataControllerCountData, ThrowOnError>) => options.client.get<ApiVVersionODataControllerCountResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple/$count', ...options });\n\nexport const getApiVbyApiVersionSimpleOperation = <ThrowOnError extends boolean = false>(options: Options<GetApiVbyApiVersionSimpleOperationData, ThrowOnError>) => options.client.get<GetApiVbyApiVersionSimpleOperationResponses, GetApiVbyApiVersionSimpleOperationErrors, ThrowOnError>({ url: '/api/v{api-version}/simple:operation', ...options });\n\nexport const deleteCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options: Options<DeleteCallWithoutParametersAndResponseData, ThrowOnError>) => options.client.delete<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const getCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options: Options<GetCallWithoutParametersAndResponseData, ThrowOnError>) => options.client.get<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const headCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options: Options<HeadCallWithoutParametersAndResponseData, ThrowOnError>) => options.client.head<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const optionsCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options: Options<OptionsCallWithoutParametersAndResponseData, ThrowOnError>) => options.client.options<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const patchCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options: Options<PatchCallWithoutParametersAndResponseData, ThrowOnError>) => options.client.patch<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const postCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options: Options<PostCallWithoutParametersAndResponseData, ThrowOnError>) => options.client.post<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const putCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options: Options<PutCallWithoutParametersAndResponseData, ThrowOnError>) => options.client.put<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const deleteFoo = <ThrowOnError extends boolean = false>(options: Options<DeleteFooData3, ThrowOnError>) => options.client.delete<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/foo/{foo_param}/bar/{BarParam}', ...options });\n\nexport const callWithDescriptions = <ThrowOnError extends boolean = false>(options: Options<CallWithDescriptionsData, ThrowOnError>) => options.client.post<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/descriptions', ...options });\n\n/**\n * @deprecated\n */\nexport const deprecatedCall = <ThrowOnError extends boolean = false>(options: Options<DeprecatedCallData, ThrowOnError>) => options.client.post<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/parameters/deprecated', ...options });\n\nexport const callWithParameters = <ThrowOnError extends boolean = false>(options: Options<CallWithParametersData, ThrowOnError>) => options.client.post<unknown, unknown, ThrowOnError>({\n    url: '/api/v{api-version}/parameters/{parameterPath}',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options.headers\n    }\n});\n\nexport const callWithWeirdParameterNames = <ThrowOnError extends boolean = false>(options: Options<CallWithWeirdParameterNamesData, ThrowOnError>) => options.client.post<unknown, unknown, ThrowOnError>({\n    url: '/api/v{api-version}/parameters/{parameter.path.1}/{parameter-path-2}/{PARAMETER-PATH-3}',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options.headers\n    }\n});\n\nexport const getCallWithOptionalParam = <ThrowOnError extends boolean = false>(options: Options<GetCallWithOptionalParamData, ThrowOnError>) => options.client.get<unknown, unknown, ThrowOnError>({\n    url: '/api/v{api-version}/parameters',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options.headers\n    }\n});\n\nexport const postCallWithOptionalParam = <ThrowOnError extends boolean = false>(options: Options<PostCallWithOptionalParamData, ThrowOnError>) => options.client.post<PostCallWithOptionalParamResponses, unknown, ThrowOnError>({\n    url: '/api/v{api-version}/parameters',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options.headers\n    }\n});\n\nexport const postApiVbyApiVersionRequestBody = <ThrowOnError extends boolean = false>(options: Options<PostApiVbyApiVersionRequestBodyData, ThrowOnError>) => options.client.post<unknown, unknown, ThrowOnError>({\n    url: '/api/v{api-version}/requestBody',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options.headers\n    }\n});\n\nexport const postApiVbyApiVersionFormData = <ThrowOnError extends boolean = false>(options: Options<PostApiVbyApiVersionFormDataData, ThrowOnError>) => options.client.post<unknown, unknown, ThrowOnError>({\n    ...formDataBodySerializer,\n    url: '/api/v{api-version}/formData',\n    ...options,\n    headers: {\n        'Content-Type': null,\n        ...options.headers\n    }\n});\n\nexport const callWithDefaultParameters = <ThrowOnError extends boolean = false>(options: Options<CallWithDefaultParametersData, ThrowOnError>) => options.client.get<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/defaults', ...options });\n\nexport const callWithDefaultOptionalParameters = <ThrowOnError extends boolean = false>(options: Options<CallWithDefaultOptionalParametersData, ThrowOnError>) => options.client.post<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/defaults', ...options });\n\nexport const callToTestOrderOfParams = <ThrowOnError extends boolean = false>(options: Options<CallToTestOrderOfParamsData, ThrowOnError>) => options.client.put<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/defaults', ...options });\n\nexport const duplicateName = <ThrowOnError extends boolean = false>(options: Options<DuplicateNameData, ThrowOnError>) => options.client.delete<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/duplicate', ...options });\n\nexport const duplicateName2 = <ThrowOnError extends boolean = false>(options: Options<DuplicateName2Data, ThrowOnError>) => options.client.get<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/duplicate', ...options });\n\nexport const duplicateName3 = <ThrowOnError extends boolean = false>(options: Options<DuplicateName3Data, ThrowOnError>) => options.client.post<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/duplicate', ...options });\n\nexport const duplicateName4 = <ThrowOnError extends boolean = false>(options: Options<DuplicateName4Data, ThrowOnError>) => options.client.put<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/duplicate', ...options });\n\nexport const callWithNoContentResponse = <ThrowOnError extends boolean = false>(options: Options<CallWithNoContentResponseData, ThrowOnError>) => options.client.get<CallWithNoContentResponseResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/no-content', ...options });\n\nexport const callWithResponseAndNoContentResponse = <ThrowOnError extends boolean = false>(options: Options<CallWithResponseAndNoContentResponseData, ThrowOnError>) => options.client.get<CallWithResponseAndNoContentResponseResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/multiple-tags/response-and-no-content', ...options });\n\nexport const dummyA = <ThrowOnError extends boolean = false>(options: Options<DummyAData, ThrowOnError>) => options.client.get<DummyAResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/multiple-tags/a', ...options });\n\nexport const dummyB = <ThrowOnError extends boolean = false>(options: Options<DummyBData, ThrowOnError>) => options.client.get<DummyBResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/multiple-tags/b', ...options });\n\nexport const callWithResponse = <ThrowOnError extends boolean = false>(options: Options<CallWithResponseData, ThrowOnError>) => options.client.get<CallWithResponseResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/response', ...options });\n\nexport const callWithDuplicateResponses = <ThrowOnError extends boolean = false>(options: Options<CallWithDuplicateResponsesData, ThrowOnError>) => options.client.post<CallWithDuplicateResponsesResponses, CallWithDuplicateResponsesErrors, ThrowOnError>({ url: '/api/v{api-version}/response', ...options });\n\nexport const callWithResponses = <ThrowOnError extends boolean = false>(options: Options<CallWithResponsesData, ThrowOnError>) => options.client.put<CallWithResponsesResponses, CallWithResponsesErrors, ThrowOnError>({ url: '/api/v{api-version}/response', ...options });\n\nexport const collectionFormat = <ThrowOnError extends boolean = false>(options: Options<CollectionFormatData, ThrowOnError>) => options.client.get<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/collectionFormat', ...options });\n\nexport const types = <ThrowOnError extends boolean = false>(options: Options<TypesData, ThrowOnError>) => options.client.get<TypesResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/types', ...options });\n\nexport const uploadFile = <ThrowOnError extends boolean = false>(options: Options<UploadFileData, ThrowOnError>) => options.client.post<UploadFileResponses, unknown, ThrowOnError>({\n    ...urlSearchParamsBodySerializer,\n    url: '/api/v{api-version}/upload',\n    ...options,\n    headers: {\n        'Content-Type': 'application/x-www-form-urlencoded',\n        ...options.headers\n    }\n});\n\nexport const fileResponse = <ThrowOnError extends boolean = false>(options: Options<FileResponseData, ThrowOnError>) => options.client.get<FileResponseResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/file/{id}', ...options });\n\nexport const complexTypes = <ThrowOnError extends boolean = false>(options: Options<ComplexTypesData, ThrowOnError>) => options.client.get<ComplexTypesResponses, ComplexTypesErrors, ThrowOnError>({\n    querySerializer: { parameters: { parameterObject: { object: { style: 'form' } } } },\n    url: '/api/v{api-version}/complex',\n    ...options\n});\n\nexport const multipartResponse = <ThrowOnError extends boolean = false>(options: Options<MultipartResponseData, ThrowOnError>) => options.client.get<MultipartResponseResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/multipart', ...options });\n\nexport const multipartRequest = <ThrowOnError extends boolean = false>(options: Options<MultipartRequestData, ThrowOnError>) => options.client.post<unknown, unknown, ThrowOnError>({\n    ...formDataBodySerializer,\n    url: '/api/v{api-version}/multipart',\n    ...options,\n    headers: {\n        'Content-Type': null,\n        ...options.headers\n    }\n});\n\nexport const complexParams = <ThrowOnError extends boolean = false>(options: Options<ComplexParamsData, ThrowOnError>) => options.client.put<ComplexParamsResponses, unknown, ThrowOnError>({\n    url: '/api/v{api-version}/complex/{id}',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json-patch+json',\n        ...options.headers\n    }\n});\n\nexport const callWithResultFromHeader = <ThrowOnError extends boolean = false>(options: Options<CallWithResultFromHeaderData, ThrowOnError>) => options.client.post<CallWithResultFromHeaderResponses, CallWithResultFromHeaderErrors, ThrowOnError>({ url: '/api/v{api-version}/header', ...options });\n\nexport const testErrorCode = <ThrowOnError extends boolean = false>(options: Options<TestErrorCodeData, ThrowOnError>) => options.client.post<TestErrorCodeResponses, TestErrorCodeErrors, ThrowOnError>({ url: '/api/v{api-version}/error', ...options });\n\nexport const nonAsciiæøåÆøÅöôêÊ字符串 = <ThrowOnError extends boolean = false>(options: Options<NonAsciiæøåÆøÅöôêÊ字符串Data, ThrowOnError>) => options.client.post<NonAsciiæøåÆøÅöôêÊ字符串Responses, unknown, ThrowOnError>({ url: '/api/v{api-version}/non-ascii-æøåÆØÅöôêÊ字符串', ...options });\n\n/**\n * Login User\n */\nexport const putWithFormUrlEncoded = <ThrowOnError extends boolean = false>(options: Options<PutWithFormUrlEncodedData, ThrowOnError>) => options.client.put<unknown, unknown, ThrowOnError>({\n    ...urlSearchParamsBodySerializer,\n    url: '/api/v{api-version}/non-ascii-æøåÆØÅöôêÊ字符串',\n    ...options,\n    headers: {\n        'Content-Type': 'application/x-www-form-urlencoded',\n        ...options.headers\n    }\n});\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-angular/sdk-client-required/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type ClientOptions = {\n    baseUrl: 'http://localhost:3000/base' | (string & {});\n};\n\n/**\n * Model with number-only name\n */\nexport type _400 = string;\n\n/**\n * External ref to shared model (A)\n */\nexport type ExternalRefA = ExternalSharedModel;\n\n/**\n * External ref to shared model (B)\n */\nexport type ExternalRefB = ExternalSharedModel;\n\n/**\n * Testing multiline comments in string: First line\n * Second line\n *\n * Fourth line\n */\nexport type CamelCaseCommentWithBreaks = number;\n\n/**\n * Testing multiline comments in string: First line\n * Second line\n *\n * Fourth line\n */\nexport type CommentWithBreaks = number;\n\n/**\n * Testing backticks in string: `backticks` and ```multiple backticks``` should work\n */\nexport type CommentWithBackticks = number;\n\n/**\n * Testing backticks and quotes in string: `backticks`, 'quotes', \"double quotes\" and ```multiple backticks``` should work\n */\nexport type CommentWithBackticksAndQuotes = number;\n\n/**\n * Testing slashes in string: \\backwards\\\\\\ and /forwards/// should work\n */\nexport type CommentWithSlashes = number;\n\n/**\n * Testing expression placeholders in string: ${expression} should work\n */\nexport type CommentWithExpressionPlaceholders = number;\n\n/**\n * Testing quotes in string: 'single quote''' and \"double quotes\"\"\" should work\n */\nexport type CommentWithQuotes = number;\n\n/**\n * Testing reserved characters in string: * inline * and ** inline ** should work\n */\nexport type CommentWithReservedCharacters = number;\n\n/**\n * This is a simple number\n */\nexport type SimpleInteger = number;\n\n/**\n * This is a simple boolean\n */\nexport type SimpleBoolean = boolean;\n\n/**\n * This is a simple string\n */\nexport type SimpleString = string;\n\n/**\n * A string with non-ascii (unicode) characters valid in typescript identifiers (æøåÆØÅöÔèÈ字符串)\n */\nexport type NonAsciiStringæøåÆøÅöôêÊ字符串 = string;\n\n/**\n * This is a simple file\n */\nexport type SimpleFile = Blob | File;\n\n/**\n * This is a simple reference\n */\nexport type SimpleReference = ModelWithString;\n\n/**\n * This is a simple string\n */\nexport type SimpleStringWithPattern = string | null;\n\n/**\n * This is a simple enum with strings\n */\nexport type EnumWithStrings = 'Success' | 'Warning' | 'Error' | '\\'Single Quote\\'' | '\"Double Quotes\"' | 'Non-ascii: øæåôöØÆÅÔÖ字符串';\n\nexport type EnumWithReplacedCharacters = '\\'Single Quote\\'' | '\"Double Quotes\"' | 'øæåôöØÆÅÔÖ字符串' | 3.1 | '';\n\n/**\n * This is a simple enum with numbers\n */\nexport type EnumWithNumbers = 1 | 2 | 3 | 1.1 | 1.2 | 1.3 | 100 | 200 | 300 | -100 | -200 | -300 | -1.1 | -1.2 | -1.3;\n\n/**\n * Success=1,Warning=2,Error=3\n */\nexport type EnumFromDescription = number;\n\n/**\n * This is a simple enum with numbers\n */\nexport type EnumWithExtensions = 200 | 400 | 500;\n\nexport type EnumWithXEnumNames = 0 | 1 | 2;\n\n/**\n * This is a simple array with numbers\n */\nexport type ArrayWithNumbers = Array<number>;\n\n/**\n * This is a simple array with booleans\n */\nexport type ArrayWithBooleans = Array<boolean>;\n\n/**\n * This is a simple array with strings\n */\nexport type ArrayWithStrings = Array<string>;\n\n/**\n * This is a simple array with references\n */\nexport type ArrayWithReferences = Array<ModelWithString>;\n\n/**\n * This is a simple array containing an array\n */\nexport type ArrayWithArray = Array<Array<ModelWithString>>;\n\n/**\n * This is a simple array with properties\n */\nexport type ArrayWithProperties = Array<{\n    '16x16'?: CamelCaseCommentWithBreaks;\n    bar?: string;\n}>;\n\n/**\n * This is a simple array with any of properties\n */\nexport type ArrayWithAnyOfProperties = Array<{\n    foo?: string;\n} | {\n    bar?: string;\n}>;\n\nexport type AnyOfAnyAndNull = {\n    data?: unknown | null;\n};\n\n/**\n * This is a simple array with any of properties\n */\nexport type AnyOfArrays = {\n    results?: Array<{\n        foo?: string;\n    } | {\n        bar?: string;\n    }>;\n};\n\n/**\n * This is a string dictionary\n */\nexport type DictionaryWithString = {\n    [key: string]: string;\n};\n\nexport type DictionaryWithPropertiesAndAdditionalProperties = {\n    foo?: number;\n    bar?: boolean;\n    [key: string]: string | number | boolean | undefined;\n};\n\n/**\n * This is a string reference\n */\nexport type DictionaryWithReference = {\n    [key: string]: ModelWithString;\n};\n\n/**\n * This is a complex dictionary\n */\nexport type DictionaryWithArray = {\n    [key: string]: Array<ModelWithString>;\n};\n\n/**\n * This is a string dictionary\n */\nexport type DictionaryWithDictionary = {\n    [key: string]: {\n        [key: string]: string;\n    };\n};\n\n/**\n * This is a complex dictionary\n */\nexport type DictionaryWithProperties = {\n    [key: string]: {\n        foo?: string;\n        bar?: string;\n    };\n};\n\n/**\n * This is a model with one number property\n */\nexport type ModelWithInteger = {\n    /**\n     * This is a simple number property\n     */\n    prop?: number;\n};\n\n/**\n * This is a model with one boolean property\n */\nexport type ModelWithBoolean = {\n    /**\n     * This is a simple boolean property\n     */\n    prop?: boolean;\n};\n\n/**\n * This is a model with one string property\n */\nexport type ModelWithString = {\n    /**\n     * This is a simple string property\n     */\n    prop?: string;\n};\n\n/**\n * This is a model with one string property\n */\nexport type ModelWithStringError = {\n    /**\n     * This is a simple string property\n     */\n    prop?: string;\n};\n\n/**\n * `Comment` or `VoiceComment`. The JSON object for adding voice comments to tickets is different. See [Adding voice comments to tickets](/documentation/ticketing/managing-tickets/adding-voice-comments-to-tickets)\n */\nexport type ModelFromZendesk = string;\n\n/**\n * This is a model with one string property\n */\nexport type ModelWithNullableString = {\n    /**\n     * This is a simple string property\n     */\n    nullableProp1?: string | null;\n    /**\n     * This is a simple string property\n     */\n    nullableRequiredProp1: string | null;\n    /**\n     * This is a simple string property\n     */\n    nullableProp2?: string | null;\n    /**\n     * This is a simple string property\n     */\n    nullableRequiredProp2: string | null;\n    /**\n     * This is a simple enum with strings\n     */\n    'foo_bar-enum'?: 'Success' | 'Warning' | 'Error' | 'ØÆÅ字符串';\n};\n\n/**\n * This is a model with one enum\n */\nexport type ModelWithEnum = {\n    /**\n     * This is a simple enum with strings\n     */\n    'foo_bar-enum'?: 'Success' | 'Warning' | 'Error' | 'ØÆÅ字符串';\n    /**\n     * These are the HTTP error code enums\n     */\n    statusCode?: '100' | '200 FOO' | '300 FOO_BAR' | '400 foo-bar' | '500 foo.bar' | '600 foo&bar';\n    /**\n     * Simple boolean enum\n     */\n    bool?: true;\n};\n\n/**\n * This is a model with one enum with escaped name\n */\nexport type ModelWithEnumWithHyphen = {\n    /**\n     * Foo-Bar-Baz-Qux\n     */\n    'foo-bar-baz-qux'?: '3.0';\n};\n\n/**\n * This is a model with one enum\n */\nexport type ModelWithEnumFromDescription = {\n    /**\n     * Success=1,Warning=2,Error=3\n     */\n    test?: number;\n};\n\n/**\n * This is a model with nested enums\n */\nexport type ModelWithNestedEnums = {\n    dictionaryWithEnum?: {\n        [key: string]: 'Success' | 'Warning' | 'Error';\n    };\n    dictionaryWithEnumFromDescription?: {\n        [key: string]: number;\n    };\n    arrayWithEnum?: Array<'Success' | 'Warning' | 'Error'>;\n    arrayWithDescription?: Array<number>;\n    /**\n     * This is a simple enum with strings\n     */\n    'foo_bar-enum'?: 'Success' | 'Warning' | 'Error' | 'ØÆÅ字符串';\n};\n\n/**\n * This is a model with one property containing a reference\n */\nexport type ModelWithReference = {\n    prop?: ModelWithProperties;\n};\n\n/**\n * This is a model with one property containing an array\n */\nexport type ModelWithArrayReadOnlyAndWriteOnly = {\n    prop?: Array<ModelWithReadOnlyAndWriteOnly>;\n    propWithFile?: Array<Blob | File>;\n    propWithNumber?: Array<number>;\n};\n\n/**\n * This is a model with one property containing an array\n */\nexport type ModelWithArray = {\n    prop?: Array<ModelWithString>;\n    propWithFile?: Array<Blob | File>;\n    propWithNumber?: Array<number>;\n};\n\n/**\n * This is a model with one property containing a dictionary\n */\nexport type ModelWithDictionary = {\n    prop?: {\n        [key: string]: string;\n    };\n};\n\n/**\n * This is a deprecated model with a deprecated property\n *\n * @deprecated\n */\nexport type DeprecatedModel = {\n    /**\n     * This is a deprecated property\n     *\n     * @deprecated\n     */\n    prop?: string;\n};\n\n/**\n * This is a model with one property containing a circular reference\n */\nexport type ModelWithCircularReference = {\n    prop?: ModelWithCircularReference;\n};\n\n/**\n * This is a model with one property with a 'one of' relationship\n */\nexport type CompositionWithOneOf = {\n    propA?: ModelWithString | ModelWithEnum | ModelWithArray | ModelWithDictionary;\n};\n\n/**\n * This is a model with one property with a 'one of' relationship where the options are not $ref\n */\nexport type CompositionWithOneOfAnonymous = {\n    propA?: {\n        propA?: string;\n    } | string | number;\n};\n\n/**\n * Circle\n */\nexport type ModelCircle = {\n    kind: string;\n    radius?: number;\n};\n\n/**\n * Square\n */\nexport type ModelSquare = {\n    kind: string;\n    sideLength?: number;\n};\n\n/**\n * This is a model with one property with a 'one of' relationship where the options are not $ref\n */\nexport type CompositionWithOneOfDiscriminator = ({\n    kind: 'circle';\n} & ModelCircle) | ({\n    kind: 'square';\n} & ModelSquare);\n\n/**\n * This is a model with one property with a 'any of' relationship\n */\nexport type CompositionWithAnyOf = {\n    propA?: ModelWithString | ModelWithEnum | ModelWithArray | ModelWithDictionary;\n};\n\n/**\n * This is a model with one property with a 'any of' relationship where the options are not $ref\n */\nexport type CompositionWithAnyOfAnonymous = {\n    propA?: {\n        propA?: string;\n    } | string | number;\n};\n\n/**\n * This is a model with nested 'any of' property with a type null\n */\nexport type CompositionWithNestedAnyAndTypeNull = {\n    propA?: Array<ModelWithDictionary | null> | Array<ModelWithArray | null>;\n};\n\nexport type _3eNum1Период = 'Bird' | 'Dog';\n\nexport type ConstValue = 'ConstValue';\n\n/**\n * This is a model with one property with a 'any of' relationship where the options are not $ref\n */\nexport type CompositionWithNestedAnyOfAndNull = {\n    /**\n     * Scopes\n     */\n    propA?: Array<_3eNum1Период | ConstValue> | null;\n};\n\n/**\n * This is a model with one property with a 'one of' relationship\n */\nexport type CompositionWithOneOfAndNullable = {\n    propA?: {\n        boolean?: boolean;\n    } | ModelWithEnum | ModelWithArray | ModelWithDictionary | null;\n};\n\n/**\n * This is a model that contains a simple dictionary within composition\n */\nexport type CompositionWithOneOfAndSimpleDictionary = {\n    propA?: boolean | {\n        [key: string]: number;\n    };\n};\n\n/**\n * This is a model that contains a dictionary of simple arrays within composition\n */\nexport type CompositionWithOneOfAndSimpleArrayDictionary = {\n    propA?: boolean | {\n        [key: string]: Array<boolean>;\n    };\n};\n\n/**\n * This is a model that contains a dictionary of complex arrays (composited) within composition\n */\nexport type CompositionWithOneOfAndComplexArrayDictionary = {\n    propA?: boolean | {\n        [key: string]: Array<number | string>;\n    };\n};\n\n/**\n * This is a model with one property with a 'all of' relationship\n */\nexport type CompositionWithAllOfAndNullable = {\n    propA?: ({\n        boolean?: boolean;\n    } & ModelWithEnum & ModelWithArray & ModelWithDictionary) | null;\n};\n\n/**\n * This is a model with one property with a 'any of' relationship\n */\nexport type CompositionWithAnyOfAndNullable = {\n    propA?: {\n        boolean?: boolean;\n    } | ModelWithEnum | ModelWithArray | ModelWithDictionary | null;\n};\n\n/**\n * This is a base model with two simple optional properties\n */\nexport type CompositionBaseModel = {\n    firstName?: string;\n    lastname?: string;\n};\n\n/**\n * This is a model that extends the base model\n */\nexport type CompositionExtendedModel = CompositionBaseModel & {\n    age: number;\n    firstName: string;\n    lastname: string;\n};\n\n/**\n * This is a model with one nested property\n */\nexport type ModelWithProperties = {\n    required: string;\n    readonly requiredAndReadOnly: string;\n    requiredAndNullable: string | null;\n    string?: string;\n    number?: number;\n    boolean?: boolean;\n    reference?: ModelWithString;\n    'property with space'?: string;\n    default?: string;\n    try?: string;\n    readonly '@namespace.string'?: string;\n    readonly '@namespace.integer'?: number;\n};\n\n/**\n * This is a model with one nested property\n */\nexport type ModelWithNestedProperties = {\n    readonly first: {\n        readonly second: {\n            readonly third: string | null;\n        } | null;\n    } | null;\n};\n\n/**\n * This is a model with duplicated properties\n */\nexport type ModelWithDuplicateProperties = {\n    prop?: ModelWithString;\n};\n\n/**\n * This is a model with ordered properties\n */\nexport type ModelWithOrderedProperties = {\n    zebra?: string;\n    apple?: string;\n    hawaii?: string;\n};\n\n/**\n * This is a model with duplicated imports\n */\nexport type ModelWithDuplicateImports = {\n    propA?: ModelWithString;\n    propB?: ModelWithString;\n    propC?: ModelWithString;\n};\n\n/**\n * This is a model that extends another model\n */\nexport type ModelThatExtends = ModelWithString & {\n    propExtendsA?: string;\n    propExtendsB?: ModelWithString;\n};\n\n/**\n * This is a model that extends another model\n */\nexport type ModelThatExtendsExtends = ModelWithString & ModelThatExtends & {\n    propExtendsC?: string;\n    propExtendsD?: ModelWithString;\n};\n\n/**\n * This is a model that contains a some patterns\n */\nexport type ModelWithPattern = {\n    key: string;\n    name: string;\n    readonly enabled?: boolean;\n    readonly modified?: string;\n    id?: string;\n    text?: string;\n    patternWithSingleQuotes?: string;\n    patternWithNewline?: string;\n    patternWithBacktick?: string;\n    patternWithUnicode?: string;\n};\n\nexport type File = {\n    /**\n     * Id\n     */\n    readonly id?: string;\n    /**\n     * Updated at\n     */\n    readonly updated_at?: string;\n    /**\n     * Created at\n     */\n    readonly created_at?: string;\n    /**\n     * Mime\n     */\n    mime: string;\n    /**\n     * File\n     */\n    readonly file?: string;\n};\n\nexport type Default = {\n    name?: string;\n};\n\nexport type Pageable = {\n    page?: number;\n    size?: number;\n    sort?: Array<string>;\n};\n\n/**\n * This is a free-form object without additionalProperties.\n */\nexport type FreeFormObjectWithoutAdditionalProperties = {\n    [key: string]: unknown;\n};\n\n/**\n * This is a free-form object with additionalProperties: true.\n */\nexport type FreeFormObjectWithAdditionalPropertiesEqTrue = {\n    [key: string]: unknown;\n};\n\n/**\n * This is a free-form object with additionalProperties: {}.\n */\nexport type FreeFormObjectWithAdditionalPropertiesEqEmptyObject = {\n    [key: string]: unknown;\n};\n\nexport type ModelWithConst = {\n    String?: 'String';\n    number?: 0;\n    null?: null;\n    withType?: 'Some string';\n};\n\n/**\n * This is a model with one property and additionalProperties: true\n */\nexport type ModelWithAdditionalPropertiesEqTrue = {\n    /**\n     * This is a simple string property\n     */\n    prop?: string;\n    [key: string]: unknown;\n};\n\nexport type NestedAnyOfArraysNullable = {\n    nullableArray?: Array<string | boolean> | null;\n};\n\nexport type CompositionWithOneOfAndProperties = ({\n    foo: SimpleParameter;\n} | {\n    bar: NonAsciiStringæøåÆøÅöôêÊ字符串;\n}) & {\n    baz: number | null;\n    qux: number;\n};\n\n/**\n * An object that can be null\n */\nexport type NullableObject = {\n    foo?: string;\n} | null;\n\n/**\n * Some % character\n */\nexport type CharactersInDescription = string;\n\nexport type ModelWithNullableObject = {\n    data?: NullableObject;\n};\n\n/**\n * An object with additional properties that can be null (anyOf ref + null)\n */\nexport type ModelWithAdditionalPropertiesRef = {\n    [key: string]: NullableObject | null;\n};\n\nexport type ModelWithOneOfEnum = {\n    foo: 'Bar';\n} | {\n    foo: 'Baz';\n} | {\n    foo: 'Qux';\n} | {\n    content: string;\n    foo: 'Quux';\n} | {\n    content: [\n        string,\n        string\n    ];\n    foo: 'Corge';\n};\n\nexport type ModelWithNestedArrayEnumsDataFoo = 'foo' | 'bar';\n\nexport type ModelWithNestedArrayEnumsDataBar = 'baz' | 'qux';\n\nexport type ModelWithNestedArrayEnumsData = {\n    foo?: Array<ModelWithNestedArrayEnumsDataFoo>;\n    bar?: Array<ModelWithNestedArrayEnumsDataBar>;\n};\n\nexport type ModelWithNestedArrayEnums = {\n    array_strings?: Array<string>;\n    data?: ModelWithNestedArrayEnumsData;\n};\n\nexport type ModelWithNestedCompositionEnums = {\n    foo?: ModelWithNestedArrayEnumsDataFoo;\n};\n\nexport type ModelWithReadOnlyAndWriteOnly = {\n    foo: string;\n    readonly bar: string;\n};\n\nexport type ModelWithConstantSizeArray = [\n    number,\n    number\n];\n\nexport type ModelWithAnyOfConstantSizeArray = [\n    number | string,\n    number | string,\n    number | string\n];\n\nexport type ModelWithPrefixItemsConstantSizeArray = [\n    ModelWithInteger,\n    number | string,\n    string\n];\n\nexport type ModelWithAnyOfConstantSizeArrayNullable = [\n    number | null | string,\n    number | null | string,\n    number | null | string\n];\n\nexport type ModelWithAnyOfConstantSizeArrayWithNSizeAndOptions = [\n    number | Import,\n    number | Import\n];\n\nexport type ModelWithAnyOfConstantSizeArrayAndIntersect = [\n    number & string,\n    number & string\n];\n\nexport type ModelWithNumericEnumUnion = {\n    /**\n     * Период\n     */\n    value?: -10 | -1 | 0 | 1 | 3 | 6 | 12;\n};\n\n/**\n * Some description with `back ticks`\n */\nexport type ModelWithBackticksInDescription = {\n    /**\n     * The template `that` should be used for parsing and importing the contents of the CSV file.\n     *\n     * <br/><p>There is one placeholder currently supported:<ul>     <li><b>${x}</b> - refers to the n-th column in the CSV file, e.g. ${1}, ${2}, ...)</li></ul><p>Example of a correct JSON template:</p>\n     * <pre>\n     * [\n     * {\n     * \"resourceType\": \"Asset\",\n     * \"identifier\": {\n     * \"name\": \"${1}\",\n     * \"domain\": {\n     * \"name\": \"${2}\",\n     * \"community\": {\n     * \"name\": \"Some Community\"\n     * }\n     * }\n     * },\n     * \"attributes\" : {\n     * \"00000000-0000-0000-0000-000000003115\" : [ {\n     * \"value\" : \"${3}\"\n     * } ],\n     * \"00000000-0000-0000-0000-000000000222\" : [ {\n     * \"value\" : \"${4}\"\n     * } ]\n     * }\n     * }\n     * ]\n     * </pre>\n     */\n    template?: string;\n};\n\nexport type ModelWithOneOfAndProperties = (SimpleParameter | NonAsciiStringæøåÆøÅöôêÊ字符串) & {\n    baz: number | null;\n    qux: number;\n};\n\n/**\n * Model used to test deduplication strategy (unused)\n */\nexport type ParameterSimpleParameterUnused = string;\n\n/**\n * Model used to test deduplication strategy\n */\nexport type PostServiceWithEmptyTagResponse = string;\n\n/**\n * Model used to test deduplication strategy\n */\nexport type PostServiceWithEmptyTagResponse2 = string;\n\n/**\n * Model used to test deduplication strategy\n */\nexport type DeleteFooData = string;\n\n/**\n * Model used to test deduplication strategy\n */\nexport type DeleteFooData2 = string;\n\n/**\n * Model with restricted keyword name\n */\nexport type Import = string;\n\nexport type SchemaWithFormRestrictedKeys = {\n    description?: string;\n    'x-enum-descriptions'?: string;\n    'x-enum-varnames'?: string;\n    'x-enumNames'?: string;\n    title?: string;\n    object?: {\n        description?: string;\n        'x-enum-descriptions'?: string;\n        'x-enum-varnames'?: string;\n        'x-enumNames'?: string;\n        title?: string;\n    };\n    array?: Array<{\n        description?: string;\n        'x-enum-descriptions'?: string;\n        'x-enum-varnames'?: string;\n        'x-enumNames'?: string;\n        title?: string;\n    }>;\n};\n\n/**\n * This schema was giving PascalCase transformations a hard time\n */\nexport type IoK8sApimachineryPkgApisMetaV1DeleteOptions = {\n    /**\n     * Must be fulfilled before a deletion is carried out. If not possible, a 409 Conflict status will be returned.\n     */\n    preconditions?: IoK8sApimachineryPkgApisMetaV1Preconditions;\n};\n\n/**\n * This schema was giving PascalCase transformations a hard time\n */\nexport type IoK8sApimachineryPkgApisMetaV1Preconditions = {\n    /**\n     * Specifies the target ResourceVersion\n     */\n    resourceVersion?: string;\n    /**\n     * Specifies the target UID.\n     */\n    uid?: string;\n};\n\nexport type AdditionalPropertiesUnknownIssue = {\n    [key: string]: string | number;\n};\n\nexport type AdditionalPropertiesUnknownIssue2 = {\n    [key: string]: string | number;\n};\n\nexport type AdditionalPropertiesUnknownIssue3 = string & {\n    entries: {\n        [key: string]: AdditionalPropertiesUnknownIssue;\n    };\n};\n\nexport type AdditionalPropertiesIntegerIssue = {\n    value: number;\n    [key: string]: number;\n};\n\nexport type OneOfAllOfIssue = ((ConstValue | GenericSchemaDuplicateIssue1SystemBoolean) & _3eNum1Период) | GenericSchemaDuplicateIssue1SystemString;\n\nexport type GenericSchemaDuplicateIssue1SystemBoolean = {\n    item?: boolean;\n    error?: string | null;\n    readonly hasError?: boolean;\n    data?: {\n        [key: string]: never;\n    };\n};\n\nexport type GenericSchemaDuplicateIssue1SystemString = {\n    item?: string | null;\n    error?: string | null;\n    readonly hasError?: boolean;\n};\n\nexport type ExternalSharedModel = {\n    id: string;\n    name?: string;\n};\n\n/**\n * This is a model with one property containing a reference\n */\nexport type ModelWithReferenceWritable = {\n    prop?: ModelWithPropertiesWritable;\n};\n\n/**\n * This is a model with one property containing an array\n */\nexport type ModelWithArrayReadOnlyAndWriteOnlyWritable = {\n    prop?: Array<ModelWithReadOnlyAndWriteOnlyWritable>;\n    propWithFile?: Array<Blob | File>;\n    propWithNumber?: Array<number>;\n};\n\n/**\n * This is a model with one nested property\n */\nexport type ModelWithPropertiesWritable = {\n    required: string;\n    requiredAndNullable: string | null;\n    string?: string;\n    number?: number;\n    boolean?: boolean;\n    reference?: ModelWithString;\n    'property with space'?: string;\n    default?: string;\n    try?: string;\n};\n\n/**\n * This is a model that contains a some patterns\n */\nexport type ModelWithPatternWritable = {\n    key: string;\n    name: string;\n    id?: string;\n    text?: string;\n    patternWithSingleQuotes?: string;\n    patternWithNewline?: string;\n    patternWithBacktick?: string;\n    patternWithUnicode?: string;\n};\n\nexport type FileWritable = {\n    /**\n     * Mime\n     */\n    mime: string;\n};\n\nexport type ModelWithReadOnlyAndWriteOnlyWritable = {\n    foo: string;\n    baz: string;\n};\n\nexport type ModelWithAnyOfConstantSizeArrayWithNSizeAndOptionsWritable = [\n    number | Import,\n    number | Import\n];\n\nexport type AdditionalPropertiesUnknownIssueWritable = {\n    [key: string]: string | number;\n};\n\nexport type OneOfAllOfIssueWritable = ((ConstValue | GenericSchemaDuplicateIssue1SystemBoolean) & _3eNum1Период) | GenericSchemaDuplicateIssue1SystemString;\n\nexport type GenericSchemaDuplicateIssue1SystemBooleanWritable = {\n    item?: boolean;\n    error?: string | null;\n    data?: {\n        [key: string]: never;\n    };\n};\n\nexport type GenericSchemaDuplicateIssue1SystemStringWritable = {\n    item?: string | null;\n    error?: string | null;\n};\n\n/**\n * This is a reusable parameter\n */\nexport type SimpleParameter = string;\n\n/**\n * Parameter with illegal characters\n */\nexport type XFooBar = ModelWithString;\n\n/**\n * A reusable request body\n */\nexport type SimpleRequestBody = ModelWithString;\n\n/**\n * A reusable request body\n */\nexport type SimpleFormData = ModelWithString;\n\nexport type ExportData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no+tag';\n};\n\nexport type PatchApiVbyApiVersionNoTagData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no+tag';\n};\n\nexport type PatchApiVbyApiVersionNoTagResponses = {\n    /**\n     * OK\n     */\n    default: unknown;\n};\n\nexport type ImportData = {\n    body: ModelWithReadOnlyAndWriteOnlyWritable | ModelWithArrayReadOnlyAndWriteOnlyWritable;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no+tag';\n};\n\nexport type ImportResponses = {\n    /**\n     * Success\n     */\n    200: ModelFromZendesk;\n    /**\n     * Default success response\n     */\n    default: ModelWithReadOnlyAndWriteOnly;\n};\n\nexport type ImportResponse = ImportResponses[keyof ImportResponses];\n\nexport type FooWowData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no+tag';\n};\n\nexport type FooWowResponses = {\n    /**\n     * OK\n     */\n    default: unknown;\n};\n\nexport type ApiVVersionODataControllerCountData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple/$count';\n};\n\nexport type ApiVVersionODataControllerCountResponses = {\n    /**\n     * Success\n     */\n    200: ModelFromZendesk;\n};\n\nexport type ApiVVersionODataControllerCountResponse = ApiVVersionODataControllerCountResponses[keyof ApiVVersionODataControllerCountResponses];\n\nexport type GetApiVbyApiVersionSimpleOperationData = {\n    body?: never;\n    path: {\n        /**\n         * foo in method\n         */\n        foo_param: string;\n    };\n    query?: never;\n    url: '/api/v{api-version}/simple:operation';\n};\n\nexport type GetApiVbyApiVersionSimpleOperationErrors = {\n    /**\n     * Default error response\n     */\n    default: ModelWithBoolean;\n};\n\nexport type GetApiVbyApiVersionSimpleOperationError = GetApiVbyApiVersionSimpleOperationErrors[keyof GetApiVbyApiVersionSimpleOperationErrors];\n\nexport type GetApiVbyApiVersionSimpleOperationResponses = {\n    /**\n     * Response is a simple number\n     */\n    200: number;\n};\n\nexport type GetApiVbyApiVersionSimpleOperationResponse = GetApiVbyApiVersionSimpleOperationResponses[keyof GetApiVbyApiVersionSimpleOperationResponses];\n\nexport type DeleteCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type GetCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type HeadCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type OptionsCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type PatchCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type PostCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type PutCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type DeleteFooData3 = {\n    body?: never;\n    headers: {\n        /**\n         * Parameter with illegal characters\n         */\n        'x-Foo-Bar': ModelWithString;\n    };\n    path: {\n        /**\n         * foo in method\n         */\n        foo_param: string;\n        /**\n         * bar in method\n         */\n        BarParam: string;\n    };\n    query?: never;\n    url: '/api/v{api-version}/foo/{foo_param}/bar/{BarParam}';\n};\n\nexport type CallWithDescriptionsData = {\n    body?: never;\n    path?: never;\n    query?: {\n        /**\n         * Testing multiline comments in string: First line\n         * Second line\n         *\n         * Fourth line\n         */\n        parameterWithBreaks?: string;\n        /**\n         * Testing backticks in string: `backticks` and ```multiple backticks``` should work\n         */\n        parameterWithBackticks?: string;\n        /**\n         * Testing slashes in string: \\backwards\\\\\\ and /forwards/// should work\n         */\n        parameterWithSlashes?: string;\n        /**\n         * Testing expression placeholders in string: ${expression} should work\n         */\n        parameterWithExpressionPlaceholders?: string;\n        /**\n         * Testing quotes in string: 'single quote''' and \"double quotes\"\"\" should work\n         */\n        parameterWithQuotes?: string;\n        /**\n         * Testing reserved characters in string: * inline * and ** inline ** should work\n         */\n        parameterWithReservedCharacters?: string;\n    };\n    url: '/api/v{api-version}/descriptions';\n};\n\nexport type DeprecatedCallData = {\n    body?: never;\n    headers: {\n        /**\n         * This parameter is deprecated\n         *\n         * @deprecated\n         */\n        parameter: DeprecatedModel | null;\n    };\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/parameters/deprecated';\n};\n\nexport type CallWithParametersData = {\n    /**\n     * This is the parameter that goes into the body\n     */\n    body: {\n        [key: string]: unknown;\n    } | null;\n    headers: {\n        /**\n         * This is the parameter that goes into the header\n         */\n        parameterHeader: string | null;\n    };\n    path: {\n        /**\n         * This is the parameter that goes into the path\n         */\n        parameterPath: string | null;\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string | null;\n    };\n    query: {\n        foo_ref_enum?: ModelWithNestedArrayEnumsDataFoo;\n        foo_all_of_enum: ModelWithNestedArrayEnumsDataFoo;\n        /**\n         * This is the parameter that goes into the query params\n         */\n        cursor: string | null;\n    };\n    url: '/api/v{api-version}/parameters/{parameterPath}';\n};\n\nexport type CallWithWeirdParameterNamesData = {\n    /**\n     * This is the parameter that goes into the body\n     */\n    body: ModelWithString | null;\n    headers: {\n        /**\n         * This is the parameter that goes into the request header\n         */\n        'parameter.header': string | null;\n    };\n    path: {\n        /**\n         * This is the parameter that goes into the path\n         */\n        'parameter.path.1'?: string;\n        /**\n         * This is the parameter that goes into the path\n         */\n        'parameter-path-2'?: string;\n        /**\n         * This is the parameter that goes into the path\n         */\n        'PARAMETER-PATH-3'?: string;\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string | null;\n    };\n    query: {\n        /**\n         * This is the parameter with a reserved keyword\n         */\n        default?: string;\n        /**\n         * This is the parameter that goes into the request query params\n         */\n        'parameter-query': string | null;\n    };\n    url: '/api/v{api-version}/parameters/{parameter.path.1}/{parameter-path-2}/{PARAMETER-PATH-3}';\n};\n\nexport type GetCallWithOptionalParamData = {\n    /**\n     * This is a required parameter\n     */\n    body: ModelWithOneOfEnum;\n    path?: never;\n    query?: {\n        /**\n         * This is an optional parameter\n         */\n        page?: number;\n    };\n    url: '/api/v{api-version}/parameters';\n};\n\nexport type PostCallWithOptionalParamData = {\n    /**\n     * This is an optional parameter\n     */\n    body?: {\n        offset?: number | null;\n    };\n    path?: never;\n    query: {\n        /**\n         * This is a required parameter\n         */\n        parameter: Pageable;\n    };\n    url: '/api/v{api-version}/parameters';\n};\n\nexport type PostCallWithOptionalParamResponses = {\n    /**\n     * Response is a simple number\n     */\n    200: number;\n    /**\n     * Success\n     */\n    204: void;\n};\n\nexport type PostCallWithOptionalParamResponse = PostCallWithOptionalParamResponses[keyof PostCallWithOptionalParamResponses];\n\nexport type PostApiVbyApiVersionRequestBodyData = {\n    /**\n     * A reusable request body\n     */\n    body?: SimpleRequestBody;\n    path?: never;\n    query?: {\n        /**\n         * This is a reusable parameter\n         */\n        parameter?: string;\n    };\n    url: '/api/v{api-version}/requestBody';\n};\n\nexport type PostApiVbyApiVersionFormDataData = {\n    /**\n     * A reusable request body\n     */\n    body?: SimpleFormData;\n    path?: never;\n    query?: {\n        /**\n         * This is a reusable parameter\n         */\n        parameter?: string;\n    };\n    url: '/api/v{api-version}/formData';\n};\n\nexport type CallWithDefaultParametersData = {\n    body?: never;\n    path?: never;\n    query?: {\n        /**\n         * This is a simple string with default value\n         */\n        parameterString?: string | null;\n        /**\n         * This is a simple number with default value\n         */\n        parameterNumber?: number | null;\n        /**\n         * This is a simple boolean with default value\n         */\n        parameterBoolean?: boolean | null;\n        /**\n         * This is a simple enum with default value\n         */\n        parameterEnum?: 'Success' | 'Warning' | 'Error';\n        /**\n         * This is a simple model with default value\n         */\n        parameterModel?: ModelWithString | null;\n    };\n    url: '/api/v{api-version}/defaults';\n};\n\nexport type CallWithDefaultOptionalParametersData = {\n    body?: never;\n    path?: never;\n    query?: {\n        /**\n         * This is a simple string that is optional with default value\n         */\n        parameterString?: string;\n        /**\n         * This is a simple number that is optional with default value\n         */\n        parameterNumber?: number;\n        /**\n         * This is a simple boolean that is optional with default value\n         */\n        parameterBoolean?: boolean;\n        /**\n         * This is a simple enum that is optional with default value\n         */\n        parameterEnum?: 'Success' | 'Warning' | 'Error';\n        /**\n         * This is a simple model that is optional with default value\n         */\n        parameterModel?: ModelWithString;\n    };\n    url: '/api/v{api-version}/defaults';\n};\n\nexport type CallToTestOrderOfParamsData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * This is a optional string with default\n         */\n        parameterOptionalStringWithDefault?: string;\n        /**\n         * This is a optional string with empty default\n         */\n        parameterOptionalStringWithEmptyDefault?: string;\n        /**\n         * This is a optional string with no default\n         */\n        parameterOptionalStringWithNoDefault?: string;\n        /**\n         * This is a string with default\n         */\n        parameterStringWithDefault: string;\n        /**\n         * This is a string with empty default\n         */\n        parameterStringWithEmptyDefault: string;\n        /**\n         * This is a string with no default\n         */\n        parameterStringWithNoDefault: string;\n        /**\n         * This is a string that can be null with no default\n         */\n        parameterStringNullableWithNoDefault?: string | null;\n        /**\n         * This is a string that can be null with default\n         */\n        parameterStringNullableWithDefault?: string | null;\n    };\n    url: '/api/v{api-version}/defaults';\n};\n\nexport type DuplicateNameData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/duplicate';\n};\n\nexport type DuplicateName2Data = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/duplicate';\n};\n\nexport type DuplicateName3Data = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/duplicate';\n};\n\nexport type DuplicateName4Data = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/duplicate';\n};\n\nexport type CallWithNoContentResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no-content';\n};\n\nexport type CallWithNoContentResponseResponses = {\n    /**\n     * Success\n     */\n    204: void;\n};\n\nexport type CallWithNoContentResponseResponse = CallWithNoContentResponseResponses[keyof CallWithNoContentResponseResponses];\n\nexport type CallWithResponseAndNoContentResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multiple-tags/response-and-no-content';\n};\n\nexport type CallWithResponseAndNoContentResponseResponses = {\n    /**\n     * Response is a simple number\n     */\n    200: number;\n    /**\n     * Success\n     */\n    204: void;\n};\n\nexport type CallWithResponseAndNoContentResponseResponse = CallWithResponseAndNoContentResponseResponses[keyof CallWithResponseAndNoContentResponseResponses];\n\nexport type DummyAData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multiple-tags/a';\n};\n\nexport type DummyAResponses = {\n    200: _400;\n};\n\nexport type DummyAResponse = DummyAResponses[keyof DummyAResponses];\n\nexport type DummyBData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multiple-tags/b';\n};\n\nexport type DummyBResponses = {\n    /**\n     * Success\n     */\n    204: void;\n};\n\nexport type DummyBResponse = DummyBResponses[keyof DummyBResponses];\n\nexport type CallWithResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/response';\n};\n\nexport type CallWithResponseResponses = {\n    default: Import;\n};\n\nexport type CallWithResponseResponse = CallWithResponseResponses[keyof CallWithResponseResponses];\n\nexport type CallWithDuplicateResponsesData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/response';\n};\n\nexport type CallWithDuplicateResponsesErrors = {\n    /**\n     * Message for 500 error\n     */\n    500: ModelWithStringError;\n    /**\n     * Message for 501 error\n     */\n    501: ModelWithStringError;\n    /**\n     * Message for 502 error\n     */\n    502: ModelWithStringError;\n    /**\n     * Message for 4XX errors\n     */\n    '4XX': DictionaryWithArray;\n    /**\n     * Default error response\n     */\n    default: ModelWithBoolean;\n};\n\nexport type CallWithDuplicateResponsesError = CallWithDuplicateResponsesErrors[keyof CallWithDuplicateResponsesErrors];\n\nexport type CallWithDuplicateResponsesResponses = {\n    /**\n     * Message for 200 response\n     */\n    200: ModelWithBoolean & ModelWithInteger;\n    /**\n     * Message for 201 response\n     */\n    201: ModelWithString;\n    /**\n     * Message for 202 response\n     */\n    202: ModelWithString;\n};\n\nexport type CallWithDuplicateResponsesResponse = CallWithDuplicateResponsesResponses[keyof CallWithDuplicateResponsesResponses];\n\nexport type CallWithResponsesData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/response';\n};\n\nexport type CallWithResponsesErrors = {\n    /**\n     * Message for 500 error\n     */\n    500: ModelWithStringError;\n    /**\n     * Message for 501 error\n     */\n    501: ModelWithStringError;\n    /**\n     * Message for 502 error\n     */\n    502: ModelWithStringError;\n    /**\n     * Message for default response\n     */\n    default: ModelWithStringError;\n};\n\nexport type CallWithResponsesError = CallWithResponsesErrors[keyof CallWithResponsesErrors];\n\nexport type CallWithResponsesResponses = {\n    /**\n     * Message for 200 response\n     */\n    200: {\n        readonly '@namespace.string'?: string;\n        readonly '@namespace.integer'?: number;\n        readonly value?: Array<ModelWithString>;\n    };\n    /**\n     * Message for 201 response\n     */\n    201: ModelThatExtends;\n    /**\n     * Message for 202 response\n     */\n    202: ModelThatExtendsExtends;\n};\n\nexport type CallWithResponsesResponse = CallWithResponsesResponses[keyof CallWithResponsesResponses];\n\nexport type CollectionFormatData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * This is an array parameter that is sent as csv format (comma-separated values)\n         */\n        parameterArrayCSV: Array<string> | null;\n        /**\n         * This is an array parameter that is sent as ssv format (space-separated values)\n         */\n        parameterArraySSV: Array<string> | null;\n        /**\n         * This is an array parameter that is sent as tsv format (tab-separated values)\n         */\n        parameterArrayTSV: Array<string> | null;\n        /**\n         * This is an array parameter that is sent as pipes format (pipe-separated values)\n         */\n        parameterArrayPipes: Array<string> | null;\n        /**\n         * This is an array parameter that is sent as multi format (multiple parameter instances)\n         */\n        parameterArrayMulti: Array<string> | null;\n    };\n    url: '/api/v{api-version}/collectionFormat';\n};\n\nexport type TypesData = {\n    body?: never;\n    path?: {\n        /**\n         * This is a number parameter\n         */\n        id?: number;\n    };\n    query: {\n        /**\n         * This is a number parameter\n         */\n        parameterNumber: number;\n        /**\n         * This is a string parameter\n         */\n        parameterString: string | null;\n        /**\n         * This is a boolean parameter\n         */\n        parameterBoolean: boolean | null;\n        /**\n         * This is an object parameter\n         */\n        parameterObject: {\n            [key: string]: unknown;\n        } | null;\n        /**\n         * This is an array parameter\n         */\n        parameterArray: Array<string> | null;\n        /**\n         * This is a dictionary parameter\n         */\n        parameterDictionary: {\n            [key: string]: unknown;\n        } | null;\n        /**\n         * This is an enum parameter\n         */\n        parameterEnum: 'Success' | 'Warning' | 'Error' | null;\n    };\n    url: '/api/v{api-version}/types';\n};\n\nexport type TypesResponses = {\n    /**\n     * Response is a simple number\n     */\n    200: number;\n    /**\n     * Response is a simple string\n     */\n    201: string;\n    /**\n     * Response is a simple boolean\n     */\n    202: boolean;\n    /**\n     * Response is a simple object\n     */\n    203: {\n        [key: string]: unknown;\n    };\n};\n\nexport type TypesResponse = TypesResponses[keyof TypesResponses];\n\nexport type UploadFileData = {\n    body: Blob | File;\n    path: {\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string | null;\n    };\n    query?: never;\n    url: '/api/v{api-version}/upload';\n};\n\nexport type UploadFileResponses = {\n    200: boolean;\n};\n\nexport type UploadFileResponse = UploadFileResponses[keyof UploadFileResponses];\n\nexport type FileResponseData = {\n    body?: never;\n    path: {\n        id: string;\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string;\n    };\n    query?: never;\n    url: '/api/v{api-version}/file/{id}';\n};\n\nexport type FileResponseResponses = {\n    /**\n     * Success\n     */\n    200: Blob | File;\n};\n\nexport type FileResponseResponse = FileResponseResponses[keyof FileResponseResponses];\n\nexport type ComplexTypesData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * Parameter containing object\n         */\n        parameterObject: {\n            first?: {\n                second?: {\n                    third?: string;\n                };\n            };\n        };\n        /**\n         * Parameter containing reference\n         */\n        parameterReference: ModelWithString;\n    };\n    url: '/api/v{api-version}/complex';\n};\n\nexport type ComplexTypesErrors = {\n    /**\n     * 400 `server` error\n     */\n    400: unknown;\n    /**\n     * 500 server error\n     */\n    500: unknown;\n};\n\nexport type ComplexTypesResponses = {\n    /**\n     * Successful response\n     */\n    200: Array<ModelWithString>;\n};\n\nexport type ComplexTypesResponse = ComplexTypesResponses[keyof ComplexTypesResponses];\n\nexport type MultipartResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multipart';\n};\n\nexport type MultipartResponseResponses = {\n    /**\n     * OK\n     */\n    200: {\n        file?: Blob | File;\n        metadata?: {\n            foo?: string;\n            bar?: string;\n        };\n    };\n};\n\nexport type MultipartResponseResponse = MultipartResponseResponses[keyof MultipartResponseResponses];\n\nexport type MultipartRequestData = {\n    body?: {\n        content?: Blob | File;\n        data?: ModelWithString | null;\n    };\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multipart';\n};\n\nexport type ComplexParamsData = {\n    body?: {\n        readonly key: string | null;\n        name: string | null;\n        enabled?: boolean;\n        type: 'Monkey' | 'Horse' | 'Bird';\n        listOfModels?: Array<ModelWithString> | null;\n        listOfStrings?: Array<string> | null;\n        parameters: ModelWithString | ModelWithEnum | ModelWithArray | ModelWithDictionary;\n        readonly user?: {\n            readonly id?: number;\n            readonly name?: string | null;\n        };\n    };\n    path: {\n        id: number;\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string;\n    };\n    query?: never;\n    url: '/api/v{api-version}/complex/{id}';\n};\n\nexport type ComplexParamsResponses = {\n    /**\n     * Success\n     */\n    200: ModelWithString;\n};\n\nexport type ComplexParamsResponse = ComplexParamsResponses[keyof ComplexParamsResponses];\n\nexport type CallWithResultFromHeaderData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/header';\n};\n\nexport type CallWithResultFromHeaderErrors = {\n    /**\n     * 400 server error\n     */\n    400: unknown;\n    /**\n     * 500 server error\n     */\n    500: unknown;\n};\n\nexport type CallWithResultFromHeaderResponses = {\n    /**\n     * Successful response\n     */\n    200: unknown;\n};\n\nexport type TestErrorCodeData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * Status code to return\n         */\n        status: number;\n    };\n    url: '/api/v{api-version}/error';\n};\n\nexport type TestErrorCodeErrors = {\n    /**\n     * Custom message: Internal Server Error\n     */\n    500: unknown;\n    /**\n     * Custom message: Not Implemented\n     */\n    501: unknown;\n    /**\n     * Custom message: Bad Gateway\n     */\n    502: unknown;\n    /**\n     * Custom message: Service Unavailable\n     */\n    503: unknown;\n};\n\nexport type TestErrorCodeResponses = {\n    /**\n     * Custom message: Successful response\n     */\n    200: unknown;\n};\n\nexport type NonAsciiæøåÆøÅöôêÊ字符串Data = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * Dummy input param\n         */\n        nonAsciiParamæøåÆØÅöôêÊ: number;\n    };\n    url: '/api/v{api-version}/non-ascii-æøåÆØÅöôêÊ字符串';\n};\n\nexport type NonAsciiæøåÆøÅöôêÊ字符串Responses = {\n    /**\n     * Successful response\n     */\n    200: Array<NonAsciiStringæøåÆøÅöôêÊ字符串>;\n};\n\nexport type NonAsciiæøåÆøÅöôêÊ字符串Response = NonAsciiæøåÆøÅöôêÊ字符串Responses[keyof NonAsciiæøåÆøÅöôêÊ字符串Responses];\n\nexport type PutWithFormUrlEncodedData = {\n    body: ArrayWithStrings;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/non-ascii-æøåÆØÅöôêÊ字符串';\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-angular/tsconfig-node16-sdk/client/client.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { HttpResponse } from '@angular/common/http';\nimport { HttpClient, HttpErrorResponse, HttpEventType, HttpRequest } from '@angular/common/http';\nimport {\n  assertInInjectionContext,\n  inject,\n  provideAppInitializer,\n  runInInjectionContext,\n} from '@angular/core';\nimport { firstValueFrom } from 'rxjs';\nimport { filter } from 'rxjs/operators';\n\nimport { createSseClient } from '../core/serverSentEvents.gen.js';\nimport type { HttpMethod } from '../core/types.gen.js';\nimport { getValidRequestBody } from '../core/utils.gen.js';\nimport type {\n  Client,\n  Config,\n  RequestOptions,\n  ResolvedRequestOptions,\n  ResponseStyle,\n} from './types.gen.js';\nimport {\n  buildUrl,\n  createConfig,\n  createInterceptors,\n  mergeConfigs,\n  mergeHeaders,\n  setAuthParams,\n} from './utils.gen.js';\n\nexport function provideHeyApiClient(client: Client) {\n  return provideAppInitializer(() => {\n    const httpClient = inject(HttpClient);\n    client.setConfig({ httpClient });\n  });\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<\n    HttpRequest<unknown>,\n    HttpResponse<unknown>,\n    unknown,\n    ResolvedRequestOptions\n  >();\n\n  const requestOptions = <\n    TData = unknown,\n    ThrowOnError extends boolean = false,\n    TResponseStyle extends ResponseStyle = 'fields',\n  >(\n    options: RequestOptions<TData, TResponseStyle, ThrowOnError>,\n  ) => {\n    const opts = {\n      ..._config,\n      ...options,\n      headers: mergeHeaders(_config.headers, options.headers),\n      httpClient: options.httpClient ?? _config.httpClient,\n      serializedBody: undefined as string | undefined,\n    };\n\n    if (!opts.httpClient) {\n      if (opts.injector) {\n        opts.httpClient = runInInjectionContext(opts.injector, () => inject(HttpClient));\n      } else {\n        assertInInjectionContext(requestOptions);\n        opts.httpClient = inject(HttpClient);\n      }\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 url = buildUrl(opts as any);\n\n    const req = new HttpRequest<unknown>(opts.method ?? 'GET', url, getValidRequestBody(opts), {\n      redirect: 'follow',\n      ...opts,\n    });\n\n    return { opts, req, url };\n  };\n\n  const beforeRequest = async (options: RequestOptions) => {\n    const { opts, req, url } = requestOptions(options);\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    return { opts, req, url };\n  };\n\n  const request: Client['request'] = async (options) => {\n    // @ts-expect-error\n    const { opts, req: initialReq } = await beforeRequest(options);\n\n    let req = initialReq;\n\n    for (const fn of interceptors.request.fns) {\n      if (fn) {\n        req = await fn(req, opts as any);\n      }\n    }\n\n    const result: {\n      request: HttpRequest<unknown>;\n      response: any;\n    } = {\n      request: req,\n      response: null,\n    };\n\n    try {\n      result.response = (await firstValueFrom(\n        opts\n          .httpClient!.request(req)\n          .pipe(filter((event) => event.type === HttpEventType.Response)),\n      )) as HttpResponse<unknown>;\n\n      for (const fn of interceptors.response.fns) {\n        if (fn) {\n          result.response = await fn(result.response, req, opts as any);\n        }\n      }\n\n      let bodyResponse = result.response.body;\n\n      if (opts.responseValidator) {\n        await opts.responseValidator(bodyResponse);\n      }\n\n      if (opts.responseTransformer) {\n        bodyResponse = await opts.responseTransformer(bodyResponse);\n      }\n\n      return opts.responseStyle === 'data' ? bodyResponse : { data: bodyResponse, ...result };\n    } catch (error) {\n      if (error instanceof HttpErrorResponse) {\n        result.response = error;\n      }\n\n      let finalError = error instanceof HttpErrorResponse ? error.error : error;\n\n      for (const fn of interceptors.error.fns) {\n        if (fn) {\n          finalError = (await fn(finalError, result.response as any, req, opts as any)) as string;\n        }\n      }\n\n      if (opts.throwOnError) {\n        throw finalError;\n      }\n\n      return opts.responseStyle === 'data'\n        ? undefined\n        : {\n            error: finalError,\n            ...result,\n          };\n    }\n  };\n\n  const makeMethodFn = (method: Uppercase<HttpMethod>) => (options: RequestOptions) =>\n    request({ ...options, method });\n\n  const makeSseFn = (method: Uppercase<HttpMethod>) => async (options: RequestOptions) => {\n    const { opts, url } = await beforeRequest(options);\n    return createSseClient({\n      ...opts,\n      body: opts.body as BodyInit | null | undefined,\n      headers: opts.headers as unknown as Record<string, string>,\n      method,\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    requestOptions: (options) => {\n      if (options.security) {\n        throw new Error('Security is not supported in requestOptions');\n      }\n\n      if (options.requestValidator) {\n        throw new Error('Request validation is not supported in requestOptions');\n      }\n\n      return requestOptions(options).req;\n    },\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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-angular/tsconfig-node16-sdk/client/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type { Auth } from '../core/auth.gen.js';\nexport type { QuerySerializerOptions } from '../core/bodySerializer.gen.js';\nexport {\n  formDataBodySerializer,\n  jsonBodySerializer,\n  urlSearchParamsBodySerializer,\n} from '../core/bodySerializer.gen.js';\nexport { buildClientParams } from '../core/params.gen.js';\nexport { serializeQueryKeyValue } from '../core/queryKeySerializer.gen.js';\nexport { createClient } from './client.gen.js';\nexport type {\n  Client,\n  ClientOptions,\n  Config,\n  CreateClientConfig,\n  Options,\n  RequestOptions,\n  RequestResult,\n  ResolvedRequestOptions,\n  ResponseStyle,\n  TDataShape,\n} from './types.gen.js';\nexport { createConfig, mergeHeaders } from './utils.gen.js';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-angular/tsconfig-node16-sdk/client/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type {\n  HttpClient,\n  HttpErrorResponse,\n  HttpHeaders,\n  HttpRequest,\n  HttpResponse,\n} from '@angular/common/http';\nimport type { Injector } from '@angular/core';\n\nimport type { Auth } from '../core/auth.gen.js';\nimport type {\n  ServerSentEventsOptions,\n  ServerSentEventsResult,\n} from '../core/serverSentEvents.gen.js';\nimport type { Client as CoreClient, Config as CoreConfig } from '../core/types.gen.js';\nimport type { Middleware } from './utils.gen.js';\n\nexport type ResponseStyle = 'data' | 'fields';\n\nexport interface Config<T extends ClientOptions = ClientOptions>\n  extends Omit<RequestInit, 'body' | 'headers' | 'method'>, Omit<CoreConfig, 'headers'> {\n  /**\n   * Base URL for all requests made by this client.\n   */\n  baseUrl?: T['baseUrl'];\n  /**\n   * An object containing any HTTP headers that you want to pre-populate your\n   * `HttpHeaders` object with.\n   *\n   * {@link https://angular.dev/api/common/http/HttpHeaders#constructor See more}\n   */\n  headers?:\n    | HttpHeaders\n    | Record<\n        string,\n        string | number | boolean | (string | number | boolean)[] | null | undefined | unknown\n      >;\n  /**\n   * The HTTP client to use for making requests.\n   */\n  httpClient?: HttpClient;\n  /**\n   * Should we return only data or multiple fields (data, error, response, etc.)?\n   *\n   * @default 'fields'\n   */\n  responseStyle?: ResponseStyle;\n\n  /**\n   * Throw an error instead of returning it in the response?\n   *\n   * @default false\n   */\n  throwOnError?: T['throwOnError'];\n}\n\nexport interface RequestOptions<\n  TData = unknown,\n  TResponseStyle extends ResponseStyle = 'fields',\n  ThrowOnError extends boolean = boolean,\n  Url extends string = string,\n>\n  extends\n    Config<{\n      responseStyle: TResponseStyle;\n      throwOnError: ThrowOnError;\n    }>,\n    Pick<\n      ServerSentEventsOptions<TData>,\n      | 'onRequest'\n      | 'onSseError'\n      | 'onSseEvent'\n      | 'sseDefaultRetryDelay'\n      | 'sseMaxRetryAttempts'\n      | 'sseMaxRetryDelay'\n    > {\n  /**\n   * Any body that you want to add to your request.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/fetch#body}\n   */\n  body?: unknown;\n  /**\n   * Optional custom injector for dependency resolution if you don't implicitly or explicitly provide one.\n   */\n  injector?: Injector;\n  path?: Record<string, unknown>;\n  query?: Record<string, unknown>;\n  /**\n   * Security mechanism(s) to use for the request.\n   */\n  security?: ReadonlyArray<Auth>;\n  url: Url;\n}\n\nexport interface ResolvedRequestOptions<\n  TResponseStyle extends ResponseStyle = 'fields',\n  ThrowOnError extends boolean = boolean,\n  Url extends string = string,\n> extends RequestOptions<unknown, TResponseStyle, ThrowOnError, Url> {\n  serializedBody?: string;\n}\n\nexport type RequestResult<\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = boolean,\n  TResponseStyle extends ResponseStyle = 'fields',\n> = Promise<\n  ThrowOnError extends true\n    ? TResponseStyle extends 'data'\n      ? TData extends Record<string, unknown>\n        ? TData[keyof TData]\n        : TData\n      : {\n          data: TData extends Record<string, unknown> ? TData[keyof TData] : TData;\n          request: HttpRequest<unknown>;\n          response: HttpResponse<TData>;\n        }\n    : TResponseStyle extends 'data'\n      ? (TData extends Record<string, unknown> ? TData[keyof TData] : TData) | undefined\n      :\n          | {\n              data: TData extends Record<string, unknown> ? TData[keyof TData] : TData;\n              error: undefined;\n              request: HttpRequest<unknown>;\n              response: HttpResponse<TData>;\n            }\n          | {\n              data: undefined;\n              error: TError[keyof TError];\n              request: HttpRequest<unknown>;\n              response: HttpErrorResponse & {\n                error: TError[keyof TError] | null;\n              };\n            }\n>;\n\nexport interface ClientOptions {\n  baseUrl?: string;\n  responseStyle?: ResponseStyle;\n  throwOnError?: boolean;\n}\n\ntype MethodFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'>,\n) => RequestResult<TData, TError, ThrowOnError, TResponseStyle>;\n\ntype SseFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'>,\n) => Promise<ServerSentEventsResult<TData, TError>>;\n\ntype RequestFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'> &\n    Pick<Required<RequestOptions<TData, TResponseStyle, ThrowOnError>>, 'method'>,\n) => RequestResult<TData, TError, ThrowOnError, TResponseStyle>;\n\ntype RequestOptionsFn = <\n  T,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: RequestOptions<T, TResponseStyle, ThrowOnError>,\n) => HttpRequest<T>;\n\ntype BuildUrlFn = <\n  TData extends {\n    body?: unknown;\n    path?: Record<string, unknown>;\n    query?: Record<string, unknown>;\n    url: string;\n  },\n>(\n  options: TData & Options<TData>,\n) => string;\n\nexport type Client = CoreClient<RequestFn, Config, MethodFn, BuildUrlFn, SseFn> & {\n  interceptors: Middleware<\n    HttpRequest<unknown>,\n    HttpResponse<unknown>,\n    unknown,\n    ResolvedRequestOptions\n  >;\n  requestOptions: RequestOptionsFn;\n};\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 = ClientOptions> = (\n  override?: Config<ClientOptions & T>,\n) => Config<Required<ClientOptions> & T>;\n\nexport interface TDataShape {\n  body?: unknown;\n  headers?: unknown;\n  path?: unknown;\n  query?: unknown;\n  url: string;\n}\n\ntype OmitKeys<T, K> = Pick<T, Exclude<keyof T, K>>;\n\nexport type Options<\n  TData extends TDataShape = TDataShape,\n  ThrowOnError extends boolean = boolean,\n  TResponse = unknown,\n  TResponseStyle extends ResponseStyle = 'fields',\n> = OmitKeys<\n  RequestOptions<TResponse, TResponseStyle, ThrowOnError>,\n  'body' | 'path' | 'query' | 'url'\n> &\n  ([TData] extends [never] ? unknown : Omit<TData, 'url'>);\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-angular/tsconfig-node16-sdk/client/utils.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport { HttpHeaders } from '@angular/common/http';\n\nimport { getAuthToken } from '../core/auth.gen.js';\nimport type {\n  QuerySerializer,\n  QuerySerializerOptions,\n} from '../core/bodySerializer.gen.js';\nimport {\n  serializeArrayParam,\n  serializeObjectParam,\n  serializePrimitiveParam,\n} from '../core/pathSerializer.gen.js';\nimport type { Client, ClientOptions, Config, RequestOptions } from './types.gen.js';\n\ninterface PathSerializer {\n  path: Record<string, unknown>;\n  url: string;\n}\n\nconst PATH_PARAM_RE = /\\{[^{}]+\\}/g;\n\ntype ArrayStyle = 'form' | 'spaceDelimited' | 'pipeDelimited';\ntype MatrixStyle = 'label' | 'matrix' | 'simple';\ntype ArraySeparatorStyle = ArrayStyle | MatrixStyle;\n\nconst 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 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 = (\n  contentType: string | null,\n): 'blob' | 'formData' | 'json' | 'stream' | 'text' | undefined => {\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\nexport const setAuthParams = async (\n  options: Pick<Required<RequestOptions>, 'security'> &\n    Pick<RequestOptions, 'auth' | 'query'> & {\n      headers: HttpHeaders;\n    },\n) => {\n  for (const auth of options.security) {\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 = options.headers.append('Cookie', `${name}=${token}`);\n        break;\n      case 'header':\n      default:\n        options.headers = options.headers.set(name, token);\n        break;\n    }\n\n    return;\n  }\n};\n\nexport const buildUrl: Client['buildUrl'] = (options) => {\n  const url = 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  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 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\nexport const mergeHeaders = (\n  ...headers: Array<Required<Config>['headers'] | undefined>\n): HttpHeaders => {\n  let mergedHeaders = new HttpHeaders();\n\n  for (const header of headers) {\n    if (!header || typeof header !== 'object') {\n      continue;\n    }\n\n    if (header instanceof HttpHeaders) {\n      // Merge HttpHeaders instance\n      header.keys().forEach((key) => {\n        const values = header.getAll(key);\n        if (values) {\n          values.forEach((value) => {\n            mergedHeaders = mergedHeaders.append(key, value);\n          });\n        }\n      });\n    } else {\n      // Merge plain object headers\n      for (const [key, value] of Object.entries(header)) {\n        if (value === null) {\n          mergedHeaders = mergedHeaders.delete(key);\n        } else if (Array.isArray(value)) {\n          for (const v of value) {\n            mergedHeaders = 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 = mergedHeaders.set(\n            key,\n            typeof value === 'object' ? JSON.stringify(value) : (value as string),\n          );\n        }\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  headers: defaultHeaders,\n  querySerializer: defaultQuerySerializer,\n  ...override,\n});\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-angular/tsconfig-node16-sdk/client.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport { type ClientOptions, type Config, createClient, createConfig } from './client/index.js';\nimport type { ClientOptions as ClientOptions2 } from './types.gen.js';\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: 'http://localhost:3000/base' }));\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-angular/tsconfig-node16-sdk/core/auth.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-angular/tsconfig-node16-sdk/core/bodySerializer.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { ArrayStyle, ObjectStyle, SerializerOptions } from './pathSerializer.gen.js';\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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-angular/tsconfig-node16-sdk/core/params.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-angular/tsconfig-node16-sdk/core/pathSerializer.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-angular/tsconfig-node16-sdk/core/queryKeySerializer.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\n/**\n * JSON-friendly union that mirrors what Pinia Colada can hash.\n */\nexport type JsonValue =\n  | null\n  | string\n  | number\n  | boolean\n  | JsonValue[]\n  | { [key: string]: JsonValue };\n\n/**\n * Replacer that converts non-JSON values (bigint, Date, etc.) to safe substitutes.\n */\nexport const queryKeyJsonReplacer = (_key: string, value: unknown) => {\n  if (value === undefined || typeof value === 'function' || typeof value === 'symbol') {\n    return undefined;\n  }\n  if (typeof value === 'bigint') {\n    return value.toString();\n  }\n  if (value instanceof Date) {\n    return value.toISOString();\n  }\n  return value;\n};\n\n/**\n * Safely stringifies a value and parses it back into a JsonValue.\n */\nexport const stringifyToJsonValue = (input: unknown): JsonValue | undefined => {\n  try {\n    const json = JSON.stringify(input, queryKeyJsonReplacer);\n    if (json === undefined) {\n      return undefined;\n    }\n    return JSON.parse(json) as JsonValue;\n  } catch {\n    return undefined;\n  }\n};\n\n/**\n * Detects plain objects (including objects with a null prototype).\n */\nconst isPlainObject = (value: unknown): value is Record<string, unknown> => {\n  if (value === null || typeof value !== 'object') {\n    return false;\n  }\n  const prototype = Object.getPrototypeOf(value as object);\n  return prototype === Object.prototype || prototype === null;\n};\n\n/**\n * Turns URLSearchParams into a sorted JSON object for deterministic keys.\n */\nconst serializeSearchParams = (params: URLSearchParams): JsonValue => {\n  const entries = Array.from(params.entries()).sort(([a], [b]) => a.localeCompare(b));\n  const result: Record<string, JsonValue> = {};\n\n  for (const [key, value] of entries) {\n    const existing = result[key];\n    if (existing === undefined) {\n      result[key] = value;\n      continue;\n    }\n\n    if (Array.isArray(existing)) {\n      (existing as string[]).push(value);\n    } else {\n      result[key] = [existing, value];\n    }\n  }\n\n  return result;\n};\n\n/**\n * Normalizes any accepted value into a JSON-friendly shape for query keys.\n */\nexport const serializeQueryKeyValue = (value: unknown): JsonValue | undefined => {\n  if (value === null) {\n    return null;\n  }\n\n  if (typeof value === 'string' || typeof value === 'number' || typeof value === 'boolean') {\n    return value;\n  }\n\n  if (value === undefined || typeof value === 'function' || typeof value === 'symbol') {\n    return undefined;\n  }\n\n  if (typeof value === 'bigint') {\n    return value.toString();\n  }\n\n  if (value instanceof Date) {\n    return value.toISOString();\n  }\n\n  if (Array.isArray(value)) {\n    return stringifyToJsonValue(value);\n  }\n\n  if (typeof URLSearchParams !== 'undefined' && value instanceof URLSearchParams) {\n    return serializeSearchParams(value);\n  }\n\n  if (isPlainObject(value)) {\n    return stringifyToJsonValue(value);\n  }\n\n  return undefined;\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-angular/tsconfig-node16-sdk/core/serverSentEvents.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { Config } from './types.gen.js';\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 const 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            // Normalize line endings: CRLF -> LF, then CR -> LF\n            buffer = buffer.replace(/\\r\\n/g, '\\n').replace(/\\r/g, '\\n');\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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-angular/tsconfig-node16-sdk/core/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { Auth, AuthToken } from './auth.gen.js';\nimport type { BodySerializer, QuerySerializer, QuerySerializerOptions } from './bodySerializer.gen.js';\n\nexport type HttpMethod =\n  | 'connect'\n  | 'delete'\n  | 'get'\n  | 'head'\n  | 'options'\n  | 'patch'\n  | 'post'\n  | 'put'\n  | 'trace';\n\nexport type Client<\n  RequestFn = never,\n  Config = unknown,\n  MethodFn = never,\n  BuildUrlFn = never,\n  SseFn = never,\n> = {\n  /**\n   * Returns the final request URL.\n   */\n  buildUrl: BuildUrlFn;\n  getConfig: () => Config;\n  request: RequestFn;\n  setConfig: (config: Config) => Config;\n} & {\n  [K in HttpMethod]: MethodFn;\n} & ([SseFn] extends [never] ? { sse?: never } : { sse: { [K in HttpMethod]: SseFn } });\n\nexport interface Config {\n  /**\n   * Auth token or a function returning auth token. The resolved value will be\n   * added to the request payload as defined by its `security` array.\n   */\n  auth?: ((auth: Auth) => Promise<AuthToken> | AuthToken) | AuthToken;\n  /**\n   * A function for serializing request body parameter. By default,\n   * {@link JSON.stringify()} will be used.\n   */\n  bodySerializer?: BodySerializer | null;\n  /**\n   * An object containing any HTTP headers that you want to pre-populate your\n   * `Headers` object with.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/Headers/Headers#init See more}\n   */\n  headers?:\n    | RequestInit['headers']\n    | Record<\n        string,\n        string | number | boolean | (string | number | boolean)[] | null | undefined | unknown\n      >;\n  /**\n   * The request method.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/fetch#method See more}\n   */\n  method?: Uppercase<HttpMethod>;\n  /**\n   * A function for serializing request query parameters. By default, arrays\n   * will be exploded in form style, objects will be exploded in deepObject\n   * style, and reserved characters are percent-encoded.\n   *\n   * This method will have no effect if the native `paramsSerializer()` Axios\n   * API function is used.\n   *\n   * {@link https://swagger.io/docs/specification/serialization/#query View examples}\n   */\n  querySerializer?: QuerySerializer | QuerySerializerOptions;\n  /**\n   * A function validating request data. This is useful if you want to ensure\n   * the request conforms to the desired shape, so it can be safely sent to\n   * the server.\n   */\n  requestValidator?: (data: unknown) => Promise<unknown>;\n  /**\n   * A function transforming response data before it's returned. This is useful\n   * for post-processing data, e.g. converting ISO strings into Date objects.\n   */\n  responseTransformer?: (data: unknown) => Promise<unknown>;\n  /**\n   * A function validating response data. This is useful if you want to ensure\n   * the response conforms to the desired shape, so it can be safely passed to\n   * the transformers and returned to the user.\n   */\n  responseValidator?: (data: unknown) => Promise<unknown>;\n}\n\ntype IsExactlyNeverOrNeverUndefined<T> = [T] extends [never]\n  ? true\n  : [T] extends [never | undefined]\n    ? [undefined] extends [T]\n      ? false\n      : true\n    : false;\n\nexport type OmitNever<T extends Record<string, unknown>> = {\n  [K in keyof T as IsExactlyNeverOrNeverUndefined<T[K]> extends true ? never : K]: T[K];\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-angular/tsconfig-node16-sdk/core/utils.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { BodySerializer, QuerySerializer } from './bodySerializer.gen.js';\nimport {\n  type ArraySeparatorStyle,\n  serializeArrayParam,\n  serializeObjectParam,\n  serializePrimitiveParam,\n} from './pathSerializer.gen.js';\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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-angular/tsconfig-node16-sdk/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport { apiVVersionODataControllerCount, callToTestOrderOfParams, callWithDefaultOptionalParameters, callWithDefaultParameters, callWithDescriptions, callWithDuplicateResponses, callWithNoContentResponse, callWithParameters, callWithResponse, callWithResponseAndNoContentResponse, callWithResponses, callWithResultFromHeader, callWithWeirdParameterNames, collectionFormat, complexParams, complexTypes, deleteCallWithoutParametersAndResponse, deleteFoo, deprecatedCall, dummyA, dummyB, duplicateName, duplicateName2, duplicateName3, duplicateName4, export_, fileResponse, fooWow, getApiVbyApiVersionSimpleOperation, getCallWithOptionalParam, getCallWithoutParametersAndResponse, headCallWithoutParametersAndResponse, import_, multipartRequest, multipartResponse, nonAsciiæøåÆøÅöôêÊ字符串, type Options, optionsCallWithoutParametersAndResponse, patchApiVbyApiVersionNoTag, patchCallWithoutParametersAndResponse, postApiVbyApiVersionFormData, postApiVbyApiVersionRequestBody, postCallWithOptionalParam, postCallWithoutParametersAndResponse, putCallWithoutParametersAndResponse, putWithFormUrlEncoded, testErrorCode, types, uploadFile } from './sdk.gen.js';\nexport type { _3eNum1Период, _400, AdditionalPropertiesIntegerIssue, AdditionalPropertiesUnknownIssue, AdditionalPropertiesUnknownIssue2, AdditionalPropertiesUnknownIssue3, AdditionalPropertiesUnknownIssueWritable, AnyOfAnyAndNull, AnyOfArrays, ApiVVersionODataControllerCountData, ApiVVersionODataControllerCountResponse, ApiVVersionODataControllerCountResponses, ArrayWithAnyOfProperties, ArrayWithArray, ArrayWithBooleans, ArrayWithNumbers, ArrayWithProperties, ArrayWithReferences, ArrayWithStrings, CallToTestOrderOfParamsData, CallWithDefaultOptionalParametersData, CallWithDefaultParametersData, CallWithDescriptionsData, CallWithDuplicateResponsesData, CallWithDuplicateResponsesError, CallWithDuplicateResponsesErrors, CallWithDuplicateResponsesResponse, CallWithDuplicateResponsesResponses, CallWithNoContentResponseData, CallWithNoContentResponseResponse, CallWithNoContentResponseResponses, CallWithParametersData, CallWithResponseAndNoContentResponseData, CallWithResponseAndNoContentResponseResponse, CallWithResponseAndNoContentResponseResponses, CallWithResponseData, CallWithResponseResponse, CallWithResponseResponses, CallWithResponsesData, CallWithResponsesError, CallWithResponsesErrors, CallWithResponsesResponse, CallWithResponsesResponses, CallWithResultFromHeaderData, CallWithResultFromHeaderErrors, CallWithResultFromHeaderResponses, CallWithWeirdParameterNamesData, CamelCaseCommentWithBreaks, CharactersInDescription, ClientOptions, CollectionFormatData, CommentWithBackticks, CommentWithBackticksAndQuotes, CommentWithBreaks, CommentWithExpressionPlaceholders, CommentWithQuotes, CommentWithReservedCharacters, CommentWithSlashes, ComplexParamsData, ComplexParamsResponse, ComplexParamsResponses, ComplexTypesData, ComplexTypesErrors, ComplexTypesResponse, ComplexTypesResponses, CompositionBaseModel, CompositionExtendedModel, CompositionWithAllOfAndNullable, CompositionWithAnyOf, CompositionWithAnyOfAndNullable, CompositionWithAnyOfAnonymous, CompositionWithNestedAnyAndTypeNull, CompositionWithNestedAnyOfAndNull, CompositionWithOneOf, CompositionWithOneOfAndComplexArrayDictionary, CompositionWithOneOfAndNullable, CompositionWithOneOfAndProperties, CompositionWithOneOfAndSimpleArrayDictionary, CompositionWithOneOfAndSimpleDictionary, CompositionWithOneOfAnonymous, CompositionWithOneOfDiscriminator, ConstValue, Default, DeleteCallWithoutParametersAndResponseData, DeleteFooData, DeleteFooData2, DeleteFooData3, DeprecatedCallData, DeprecatedModel, DictionaryWithArray, DictionaryWithDictionary, DictionaryWithProperties, DictionaryWithPropertiesAndAdditionalProperties, DictionaryWithReference, DictionaryWithString, DummyAData, DummyAResponse, DummyAResponses, DummyBData, DummyBResponse, DummyBResponses, DuplicateName2Data, DuplicateName3Data, DuplicateName4Data, DuplicateNameData, EnumFromDescription, EnumWithExtensions, EnumWithNumbers, EnumWithReplacedCharacters, EnumWithStrings, EnumWithXEnumNames, ExportData, ExternalRefA, ExternalRefB, ExternalSharedModel, File, FileResponseData, FileResponseResponse, FileResponseResponses, FileWritable, FooWowData, FooWowResponses, FreeFormObjectWithAdditionalPropertiesEqEmptyObject, FreeFormObjectWithAdditionalPropertiesEqTrue, FreeFormObjectWithoutAdditionalProperties, GenericSchemaDuplicateIssue1SystemBoolean, GenericSchemaDuplicateIssue1SystemBooleanWritable, GenericSchemaDuplicateIssue1SystemString, GenericSchemaDuplicateIssue1SystemStringWritable, GetApiVbyApiVersionSimpleOperationData, GetApiVbyApiVersionSimpleOperationError, GetApiVbyApiVersionSimpleOperationErrors, GetApiVbyApiVersionSimpleOperationResponse, GetApiVbyApiVersionSimpleOperationResponses, GetCallWithOptionalParamData, GetCallWithoutParametersAndResponseData, HeadCallWithoutParametersAndResponseData, Import, ImportData, ImportResponse, ImportResponses, IoK8sApimachineryPkgApisMetaV1DeleteOptions, IoK8sApimachineryPkgApisMetaV1Preconditions, ModelCircle, ModelFromZendesk, ModelSquare, ModelThatExtends, ModelThatExtendsExtends, ModelWithAdditionalPropertiesEqTrue, ModelWithAdditionalPropertiesRef, ModelWithAnyOfConstantSizeArray, ModelWithAnyOfConstantSizeArrayAndIntersect, ModelWithAnyOfConstantSizeArrayNullable, ModelWithAnyOfConstantSizeArrayWithNSizeAndOptions, ModelWithAnyOfConstantSizeArrayWithNSizeAndOptionsWritable, ModelWithArray, ModelWithArrayReadOnlyAndWriteOnly, ModelWithArrayReadOnlyAndWriteOnlyWritable, ModelWithBackticksInDescription, ModelWithBoolean, ModelWithCircularReference, ModelWithConst, ModelWithConstantSizeArray, ModelWithDictionary, ModelWithDuplicateImports, ModelWithDuplicateProperties, ModelWithEnum, ModelWithEnumFromDescription, ModelWithEnumWithHyphen, ModelWithInteger, ModelWithNestedArrayEnums, ModelWithNestedArrayEnumsData, ModelWithNestedArrayEnumsDataBar, ModelWithNestedArrayEnumsDataFoo, ModelWithNestedCompositionEnums, ModelWithNestedEnums, ModelWithNestedProperties, ModelWithNullableObject, ModelWithNullableString, ModelWithNumericEnumUnion, ModelWithOneOfAndProperties, ModelWithOneOfEnum, ModelWithOrderedProperties, ModelWithPattern, ModelWithPatternWritable, ModelWithPrefixItemsConstantSizeArray, ModelWithProperties, ModelWithPropertiesWritable, ModelWithReadOnlyAndWriteOnly, ModelWithReadOnlyAndWriteOnlyWritable, ModelWithReference, ModelWithReferenceWritable, ModelWithString, ModelWithStringError, MultipartRequestData, MultipartResponseData, MultipartResponseResponse, MultipartResponseResponses, NestedAnyOfArraysNullable, NonAsciiæøåÆøÅöôêÊ字符串Data, NonAsciiæøåÆøÅöôêÊ字符串Response, NonAsciiæøåÆøÅöôêÊ字符串Responses, NonAsciiStringæøåÆøÅöôêÊ字符串, NullableObject, OneOfAllOfIssue, OneOfAllOfIssueWritable, OptionsCallWithoutParametersAndResponseData, Pageable, ParameterSimpleParameterUnused, PatchApiVbyApiVersionNoTagData, PatchApiVbyApiVersionNoTagResponses, PatchCallWithoutParametersAndResponseData, PostApiVbyApiVersionFormDataData, PostApiVbyApiVersionRequestBodyData, PostCallWithOptionalParamData, PostCallWithOptionalParamResponse, PostCallWithOptionalParamResponses, PostCallWithoutParametersAndResponseData, PostServiceWithEmptyTagResponse, PostServiceWithEmptyTagResponse2, PutCallWithoutParametersAndResponseData, PutWithFormUrlEncodedData, SchemaWithFormRestrictedKeys, SimpleBoolean, SimpleFile, SimpleFormData, SimpleInteger, SimpleParameter, SimpleReference, SimpleRequestBody, SimpleString, SimpleStringWithPattern, TestErrorCodeData, TestErrorCodeErrors, TestErrorCodeResponses, TypesData, TypesResponse, TypesResponses, UploadFileData, UploadFileResponse, UploadFileResponses, XFooBar } from './types.gen.js';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-angular/tsconfig-node16-sdk/sdk.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport { client } from './client.gen.js';\nimport { type Client, formDataBodySerializer, type Options as Options2, type TDataShape, urlSearchParamsBodySerializer } from './client/index.js';\nimport type { ApiVVersionODataControllerCountData, ApiVVersionODataControllerCountResponses, CallToTestOrderOfParamsData, CallWithDefaultOptionalParametersData, CallWithDefaultParametersData, CallWithDescriptionsData, CallWithDuplicateResponsesData, CallWithDuplicateResponsesErrors, CallWithDuplicateResponsesResponses, CallWithNoContentResponseData, CallWithNoContentResponseResponses, CallWithParametersData, CallWithResponseAndNoContentResponseData, CallWithResponseAndNoContentResponseResponses, CallWithResponseData, CallWithResponseResponses, CallWithResponsesData, CallWithResponsesErrors, CallWithResponsesResponses, CallWithResultFromHeaderData, CallWithResultFromHeaderErrors, CallWithResultFromHeaderResponses, CallWithWeirdParameterNamesData, CollectionFormatData, ComplexParamsData, ComplexParamsResponses, ComplexTypesData, ComplexTypesErrors, ComplexTypesResponses, DeleteCallWithoutParametersAndResponseData, DeleteFooData3, DeprecatedCallData, DummyAData, DummyAResponses, DummyBData, DummyBResponses, DuplicateName2Data, DuplicateName3Data, DuplicateName4Data, DuplicateNameData, ExportData, FileResponseData, FileResponseResponses, FooWowData, FooWowResponses, GetApiVbyApiVersionSimpleOperationData, GetApiVbyApiVersionSimpleOperationErrors, GetApiVbyApiVersionSimpleOperationResponses, GetCallWithOptionalParamData, GetCallWithoutParametersAndResponseData, HeadCallWithoutParametersAndResponseData, ImportData, ImportResponses, MultipartRequestData, MultipartResponseData, MultipartResponseResponses, NonAsciiæøåÆøÅöôêÊ字符串Data, NonAsciiæøåÆøÅöôêÊ字符串Responses, OptionsCallWithoutParametersAndResponseData, PatchApiVbyApiVersionNoTagData, PatchApiVbyApiVersionNoTagResponses, PatchCallWithoutParametersAndResponseData, PostApiVbyApiVersionFormDataData, PostApiVbyApiVersionRequestBodyData, PostCallWithOptionalParamData, PostCallWithOptionalParamResponses, PostCallWithoutParametersAndResponseData, PutCallWithoutParametersAndResponseData, PutWithFormUrlEncodedData, TestErrorCodeData, TestErrorCodeErrors, TestErrorCodeResponses, TypesData, TypesResponses, UploadFileData, UploadFileResponses } from './types.gen.js';\n\nexport type Options<TData extends TDataShape = TDataShape, ThrowOnError extends boolean = boolean> = Options2<TData, ThrowOnError> & {\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\nexport const export_ = <ThrowOnError extends boolean = false>(options?: Options<ExportData, ThrowOnError>) => (options?.client ?? client).get<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/no+tag', ...options });\n\nexport const patchApiVbyApiVersionNoTag = <ThrowOnError extends boolean = false>(options?: Options<PatchApiVbyApiVersionNoTagData, ThrowOnError>) => (options?.client ?? client).patch<PatchApiVbyApiVersionNoTagResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/no+tag', ...options });\n\nexport const import_ = <ThrowOnError extends boolean = false>(options: Options<ImportData, ThrowOnError>) => (options.client ?? client).post<ImportResponses, unknown, ThrowOnError>({\n    url: '/api/v{api-version}/no+tag',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options.headers\n    }\n});\n\nexport const fooWow = <ThrowOnError extends boolean = false>(options?: Options<FooWowData, ThrowOnError>) => (options?.client ?? client).put<FooWowResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/no+tag', ...options });\n\nexport const apiVVersionODataControllerCount = <ThrowOnError extends boolean = false>(options?: Options<ApiVVersionODataControllerCountData, ThrowOnError>) => (options?.client ?? client).get<ApiVVersionODataControllerCountResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple/$count', ...options });\n\nexport const getApiVbyApiVersionSimpleOperation = <ThrowOnError extends boolean = false>(options: Options<GetApiVbyApiVersionSimpleOperationData, ThrowOnError>) => (options.client ?? client).get<GetApiVbyApiVersionSimpleOperationResponses, GetApiVbyApiVersionSimpleOperationErrors, ThrowOnError>({ url: '/api/v{api-version}/simple:operation', ...options });\n\nexport const deleteCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<DeleteCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).delete<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const getCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<GetCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).get<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const headCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<HeadCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).head<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const optionsCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<OptionsCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).options<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const patchCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<PatchCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).patch<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const postCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<PostCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).post<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const putCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<PutCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).put<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const deleteFoo = <ThrowOnError extends boolean = false>(options: Options<DeleteFooData3, ThrowOnError>) => (options.client ?? client).delete<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/foo/{foo_param}/bar/{BarParam}', ...options });\n\nexport const callWithDescriptions = <ThrowOnError extends boolean = false>(options?: Options<CallWithDescriptionsData, ThrowOnError>) => (options?.client ?? client).post<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/descriptions', ...options });\n\n/**\n * @deprecated\n */\nexport const deprecatedCall = <ThrowOnError extends boolean = false>(options: Options<DeprecatedCallData, ThrowOnError>) => (options.client ?? client).post<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/parameters/deprecated', ...options });\n\nexport const callWithParameters = <ThrowOnError extends boolean = false>(options: Options<CallWithParametersData, ThrowOnError>) => (options.client ?? client).post<unknown, unknown, ThrowOnError>({\n    url: '/api/v{api-version}/parameters/{parameterPath}',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options.headers\n    }\n});\n\nexport const callWithWeirdParameterNames = <ThrowOnError extends boolean = false>(options: Options<CallWithWeirdParameterNamesData, ThrowOnError>) => (options.client ?? client).post<unknown, unknown, ThrowOnError>({\n    url: '/api/v{api-version}/parameters/{parameter.path.1}/{parameter-path-2}/{PARAMETER-PATH-3}',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options.headers\n    }\n});\n\nexport const getCallWithOptionalParam = <ThrowOnError extends boolean = false>(options: Options<GetCallWithOptionalParamData, ThrowOnError>) => (options.client ?? client).get<unknown, unknown, ThrowOnError>({\n    url: '/api/v{api-version}/parameters',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options.headers\n    }\n});\n\nexport const postCallWithOptionalParam = <ThrowOnError extends boolean = false>(options: Options<PostCallWithOptionalParamData, ThrowOnError>) => (options.client ?? client).post<PostCallWithOptionalParamResponses, unknown, ThrowOnError>({\n    url: '/api/v{api-version}/parameters',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options.headers\n    }\n});\n\nexport const postApiVbyApiVersionRequestBody = <ThrowOnError extends boolean = false>(options?: Options<PostApiVbyApiVersionRequestBodyData, ThrowOnError>) => (options?.client ?? client).post<unknown, unknown, ThrowOnError>({\n    url: '/api/v{api-version}/requestBody',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options?.headers\n    }\n});\n\nexport const postApiVbyApiVersionFormData = <ThrowOnError extends boolean = false>(options?: Options<PostApiVbyApiVersionFormDataData, ThrowOnError>) => (options?.client ?? client).post<unknown, unknown, ThrowOnError>({\n    ...formDataBodySerializer,\n    url: '/api/v{api-version}/formData',\n    ...options,\n    headers: {\n        'Content-Type': null,\n        ...options?.headers\n    }\n});\n\nexport const callWithDefaultParameters = <ThrowOnError extends boolean = false>(options?: Options<CallWithDefaultParametersData, ThrowOnError>) => (options?.client ?? client).get<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/defaults', ...options });\n\nexport const callWithDefaultOptionalParameters = <ThrowOnError extends boolean = false>(options?: Options<CallWithDefaultOptionalParametersData, ThrowOnError>) => (options?.client ?? client).post<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/defaults', ...options });\n\nexport const callToTestOrderOfParams = <ThrowOnError extends boolean = false>(options: Options<CallToTestOrderOfParamsData, ThrowOnError>) => (options.client ?? client).put<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/defaults', ...options });\n\nexport const duplicateName = <ThrowOnError extends boolean = false>(options?: Options<DuplicateNameData, ThrowOnError>) => (options?.client ?? client).delete<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/duplicate', ...options });\n\nexport const duplicateName2 = <ThrowOnError extends boolean = false>(options?: Options<DuplicateName2Data, ThrowOnError>) => (options?.client ?? client).get<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/duplicate', ...options });\n\nexport const duplicateName3 = <ThrowOnError extends boolean = false>(options?: Options<DuplicateName3Data, ThrowOnError>) => (options?.client ?? client).post<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/duplicate', ...options });\n\nexport const duplicateName4 = <ThrowOnError extends boolean = false>(options?: Options<DuplicateName4Data, ThrowOnError>) => (options?.client ?? client).put<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/duplicate', ...options });\n\nexport const callWithNoContentResponse = <ThrowOnError extends boolean = false>(options?: Options<CallWithNoContentResponseData, ThrowOnError>) => (options?.client ?? client).get<CallWithNoContentResponseResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/no-content', ...options });\n\nexport const callWithResponseAndNoContentResponse = <ThrowOnError extends boolean = false>(options?: Options<CallWithResponseAndNoContentResponseData, ThrowOnError>) => (options?.client ?? client).get<CallWithResponseAndNoContentResponseResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/multiple-tags/response-and-no-content', ...options });\n\nexport const dummyA = <ThrowOnError extends boolean = false>(options?: Options<DummyAData, ThrowOnError>) => (options?.client ?? client).get<DummyAResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/multiple-tags/a', ...options });\n\nexport const dummyB = <ThrowOnError extends boolean = false>(options?: Options<DummyBData, ThrowOnError>) => (options?.client ?? client).get<DummyBResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/multiple-tags/b', ...options });\n\nexport const callWithResponse = <ThrowOnError extends boolean = false>(options?: Options<CallWithResponseData, ThrowOnError>) => (options?.client ?? client).get<CallWithResponseResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/response', ...options });\n\nexport const callWithDuplicateResponses = <ThrowOnError extends boolean = false>(options?: Options<CallWithDuplicateResponsesData, ThrowOnError>) => (options?.client ?? client).post<CallWithDuplicateResponsesResponses, CallWithDuplicateResponsesErrors, ThrowOnError>({ url: '/api/v{api-version}/response', ...options });\n\nexport const callWithResponses = <ThrowOnError extends boolean = false>(options?: Options<CallWithResponsesData, ThrowOnError>) => (options?.client ?? client).put<CallWithResponsesResponses, CallWithResponsesErrors, ThrowOnError>({ url: '/api/v{api-version}/response', ...options });\n\nexport const collectionFormat = <ThrowOnError extends boolean = false>(options: Options<CollectionFormatData, ThrowOnError>) => (options.client ?? client).get<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/collectionFormat', ...options });\n\nexport const types = <ThrowOnError extends boolean = false>(options: Options<TypesData, ThrowOnError>) => (options.client ?? client).get<TypesResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/types', ...options });\n\nexport const uploadFile = <ThrowOnError extends boolean = false>(options: Options<UploadFileData, ThrowOnError>) => (options.client ?? client).post<UploadFileResponses, unknown, ThrowOnError>({\n    ...urlSearchParamsBodySerializer,\n    url: '/api/v{api-version}/upload',\n    ...options,\n    headers: {\n        'Content-Type': 'application/x-www-form-urlencoded',\n        ...options.headers\n    }\n});\n\nexport const fileResponse = <ThrowOnError extends boolean = false>(options: Options<FileResponseData, ThrowOnError>) => (options.client ?? client).get<FileResponseResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/file/{id}', ...options });\n\nexport const complexTypes = <ThrowOnError extends boolean = false>(options: Options<ComplexTypesData, ThrowOnError>) => (options.client ?? client).get<ComplexTypesResponses, ComplexTypesErrors, ThrowOnError>({\n    querySerializer: { parameters: { parameterObject: { object: { style: 'form' } } } },\n    url: '/api/v{api-version}/complex',\n    ...options\n});\n\nexport const multipartResponse = <ThrowOnError extends boolean = false>(options?: Options<MultipartResponseData, ThrowOnError>) => (options?.client ?? client).get<MultipartResponseResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/multipart', ...options });\n\nexport const multipartRequest = <ThrowOnError extends boolean = false>(options?: Options<MultipartRequestData, ThrowOnError>) => (options?.client ?? client).post<unknown, unknown, ThrowOnError>({\n    ...formDataBodySerializer,\n    url: '/api/v{api-version}/multipart',\n    ...options,\n    headers: {\n        'Content-Type': null,\n        ...options?.headers\n    }\n});\n\nexport const complexParams = <ThrowOnError extends boolean = false>(options: Options<ComplexParamsData, ThrowOnError>) => (options.client ?? client).put<ComplexParamsResponses, unknown, ThrowOnError>({\n    url: '/api/v{api-version}/complex/{id}',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json-patch+json',\n        ...options.headers\n    }\n});\n\nexport const callWithResultFromHeader = <ThrowOnError extends boolean = false>(options?: Options<CallWithResultFromHeaderData, ThrowOnError>) => (options?.client ?? client).post<CallWithResultFromHeaderResponses, CallWithResultFromHeaderErrors, ThrowOnError>({ url: '/api/v{api-version}/header', ...options });\n\nexport const testErrorCode = <ThrowOnError extends boolean = false>(options: Options<TestErrorCodeData, ThrowOnError>) => (options.client ?? client).post<TestErrorCodeResponses, TestErrorCodeErrors, ThrowOnError>({ url: '/api/v{api-version}/error', ...options });\n\nexport const nonAsciiæøåÆøÅöôêÊ字符串 = <ThrowOnError extends boolean = false>(options: Options<NonAsciiæøåÆøÅöôêÊ字符串Data, ThrowOnError>) => (options.client ?? client).post<NonAsciiæøåÆøÅöôêÊ字符串Responses, unknown, ThrowOnError>({ url: '/api/v{api-version}/non-ascii-æøåÆØÅöôêÊ字符串', ...options });\n\n/**\n * Login User\n */\nexport const putWithFormUrlEncoded = <ThrowOnError extends boolean = false>(options: Options<PutWithFormUrlEncodedData, ThrowOnError>) => (options.client ?? client).put<unknown, unknown, ThrowOnError>({\n    ...urlSearchParamsBodySerializer,\n    url: '/api/v{api-version}/non-ascii-æøåÆØÅöôêÊ字符串',\n    ...options,\n    headers: {\n        'Content-Type': 'application/x-www-form-urlencoded',\n        ...options.headers\n    }\n});\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-angular/tsconfig-node16-sdk/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type ClientOptions = {\n    baseUrl: 'http://localhost:3000/base' | (string & {});\n};\n\n/**\n * Model with number-only name\n */\nexport type _400 = string;\n\n/**\n * External ref to shared model (A)\n */\nexport type ExternalRefA = ExternalSharedModel;\n\n/**\n * External ref to shared model (B)\n */\nexport type ExternalRefB = ExternalSharedModel;\n\n/**\n * Testing multiline comments in string: First line\n * Second line\n *\n * Fourth line\n */\nexport type CamelCaseCommentWithBreaks = number;\n\n/**\n * Testing multiline comments in string: First line\n * Second line\n *\n * Fourth line\n */\nexport type CommentWithBreaks = number;\n\n/**\n * Testing backticks in string: `backticks` and ```multiple backticks``` should work\n */\nexport type CommentWithBackticks = number;\n\n/**\n * Testing backticks and quotes in string: `backticks`, 'quotes', \"double quotes\" and ```multiple backticks``` should work\n */\nexport type CommentWithBackticksAndQuotes = number;\n\n/**\n * Testing slashes in string: \\backwards\\\\\\ and /forwards/// should work\n */\nexport type CommentWithSlashes = number;\n\n/**\n * Testing expression placeholders in string: ${expression} should work\n */\nexport type CommentWithExpressionPlaceholders = number;\n\n/**\n * Testing quotes in string: 'single quote''' and \"double quotes\"\"\" should work\n */\nexport type CommentWithQuotes = number;\n\n/**\n * Testing reserved characters in string: * inline * and ** inline ** should work\n */\nexport type CommentWithReservedCharacters = number;\n\n/**\n * This is a simple number\n */\nexport type SimpleInteger = number;\n\n/**\n * This is a simple boolean\n */\nexport type SimpleBoolean = boolean;\n\n/**\n * This is a simple string\n */\nexport type SimpleString = string;\n\n/**\n * A string with non-ascii (unicode) characters valid in typescript identifiers (æøåÆØÅöÔèÈ字符串)\n */\nexport type NonAsciiStringæøåÆøÅöôêÊ字符串 = string;\n\n/**\n * This is a simple file\n */\nexport type SimpleFile = Blob | File;\n\n/**\n * This is a simple reference\n */\nexport type SimpleReference = ModelWithString;\n\n/**\n * This is a simple string\n */\nexport type SimpleStringWithPattern = string | null;\n\n/**\n * This is a simple enum with strings\n */\nexport type EnumWithStrings = 'Success' | 'Warning' | 'Error' | '\\'Single Quote\\'' | '\"Double Quotes\"' | 'Non-ascii: øæåôöØÆÅÔÖ字符串';\n\nexport type EnumWithReplacedCharacters = '\\'Single Quote\\'' | '\"Double Quotes\"' | 'øæåôöØÆÅÔÖ字符串' | 3.1 | '';\n\n/**\n * This is a simple enum with numbers\n */\nexport type EnumWithNumbers = 1 | 2 | 3 | 1.1 | 1.2 | 1.3 | 100 | 200 | 300 | -100 | -200 | -300 | -1.1 | -1.2 | -1.3;\n\n/**\n * Success=1,Warning=2,Error=3\n */\nexport type EnumFromDescription = number;\n\n/**\n * This is a simple enum with numbers\n */\nexport type EnumWithExtensions = 200 | 400 | 500;\n\nexport type EnumWithXEnumNames = 0 | 1 | 2;\n\n/**\n * This is a simple array with numbers\n */\nexport type ArrayWithNumbers = Array<number>;\n\n/**\n * This is a simple array with booleans\n */\nexport type ArrayWithBooleans = Array<boolean>;\n\n/**\n * This is a simple array with strings\n */\nexport type ArrayWithStrings = Array<string>;\n\n/**\n * This is a simple array with references\n */\nexport type ArrayWithReferences = Array<ModelWithString>;\n\n/**\n * This is a simple array containing an array\n */\nexport type ArrayWithArray = Array<Array<ModelWithString>>;\n\n/**\n * This is a simple array with properties\n */\nexport type ArrayWithProperties = Array<{\n    '16x16'?: CamelCaseCommentWithBreaks;\n    bar?: string;\n}>;\n\n/**\n * This is a simple array with any of properties\n */\nexport type ArrayWithAnyOfProperties = Array<{\n    foo?: string;\n} | {\n    bar?: string;\n}>;\n\nexport type AnyOfAnyAndNull = {\n    data?: unknown | null;\n};\n\n/**\n * This is a simple array with any of properties\n */\nexport type AnyOfArrays = {\n    results?: Array<{\n        foo?: string;\n    } | {\n        bar?: string;\n    }>;\n};\n\n/**\n * This is a string dictionary\n */\nexport type DictionaryWithString = {\n    [key: string]: string;\n};\n\nexport type DictionaryWithPropertiesAndAdditionalProperties = {\n    foo?: number;\n    bar?: boolean;\n    [key: string]: string | number | boolean | undefined;\n};\n\n/**\n * This is a string reference\n */\nexport type DictionaryWithReference = {\n    [key: string]: ModelWithString;\n};\n\n/**\n * This is a complex dictionary\n */\nexport type DictionaryWithArray = {\n    [key: string]: Array<ModelWithString>;\n};\n\n/**\n * This is a string dictionary\n */\nexport type DictionaryWithDictionary = {\n    [key: string]: {\n        [key: string]: string;\n    };\n};\n\n/**\n * This is a complex dictionary\n */\nexport type DictionaryWithProperties = {\n    [key: string]: {\n        foo?: string;\n        bar?: string;\n    };\n};\n\n/**\n * This is a model with one number property\n */\nexport type ModelWithInteger = {\n    /**\n     * This is a simple number property\n     */\n    prop?: number;\n};\n\n/**\n * This is a model with one boolean property\n */\nexport type ModelWithBoolean = {\n    /**\n     * This is a simple boolean property\n     */\n    prop?: boolean;\n};\n\n/**\n * This is a model with one string property\n */\nexport type ModelWithString = {\n    /**\n     * This is a simple string property\n     */\n    prop?: string;\n};\n\n/**\n * This is a model with one string property\n */\nexport type ModelWithStringError = {\n    /**\n     * This is a simple string property\n     */\n    prop?: string;\n};\n\n/**\n * `Comment` or `VoiceComment`. The JSON object for adding voice comments to tickets is different. See [Adding voice comments to tickets](/documentation/ticketing/managing-tickets/adding-voice-comments-to-tickets)\n */\nexport type ModelFromZendesk = string;\n\n/**\n * This is a model with one string property\n */\nexport type ModelWithNullableString = {\n    /**\n     * This is a simple string property\n     */\n    nullableProp1?: string | null;\n    /**\n     * This is a simple string property\n     */\n    nullableRequiredProp1: string | null;\n    /**\n     * This is a simple string property\n     */\n    nullableProp2?: string | null;\n    /**\n     * This is a simple string property\n     */\n    nullableRequiredProp2: string | null;\n    /**\n     * This is a simple enum with strings\n     */\n    'foo_bar-enum'?: 'Success' | 'Warning' | 'Error' | 'ØÆÅ字符串';\n};\n\n/**\n * This is a model with one enum\n */\nexport type ModelWithEnum = {\n    /**\n     * This is a simple enum with strings\n     */\n    'foo_bar-enum'?: 'Success' | 'Warning' | 'Error' | 'ØÆÅ字符串';\n    /**\n     * These are the HTTP error code enums\n     */\n    statusCode?: '100' | '200 FOO' | '300 FOO_BAR' | '400 foo-bar' | '500 foo.bar' | '600 foo&bar';\n    /**\n     * Simple boolean enum\n     */\n    bool?: true;\n};\n\n/**\n * This is a model with one enum with escaped name\n */\nexport type ModelWithEnumWithHyphen = {\n    /**\n     * Foo-Bar-Baz-Qux\n     */\n    'foo-bar-baz-qux'?: '3.0';\n};\n\n/**\n * This is a model with one enum\n */\nexport type ModelWithEnumFromDescription = {\n    /**\n     * Success=1,Warning=2,Error=3\n     */\n    test?: number;\n};\n\n/**\n * This is a model with nested enums\n */\nexport type ModelWithNestedEnums = {\n    dictionaryWithEnum?: {\n        [key: string]: 'Success' | 'Warning' | 'Error';\n    };\n    dictionaryWithEnumFromDescription?: {\n        [key: string]: number;\n    };\n    arrayWithEnum?: Array<'Success' | 'Warning' | 'Error'>;\n    arrayWithDescription?: Array<number>;\n    /**\n     * This is a simple enum with strings\n     */\n    'foo_bar-enum'?: 'Success' | 'Warning' | 'Error' | 'ØÆÅ字符串';\n};\n\n/**\n * This is a model with one property containing a reference\n */\nexport type ModelWithReference = {\n    prop?: ModelWithProperties;\n};\n\n/**\n * This is a model with one property containing an array\n */\nexport type ModelWithArrayReadOnlyAndWriteOnly = {\n    prop?: Array<ModelWithReadOnlyAndWriteOnly>;\n    propWithFile?: Array<Blob | File>;\n    propWithNumber?: Array<number>;\n};\n\n/**\n * This is a model with one property containing an array\n */\nexport type ModelWithArray = {\n    prop?: Array<ModelWithString>;\n    propWithFile?: Array<Blob | File>;\n    propWithNumber?: Array<number>;\n};\n\n/**\n * This is a model with one property containing a dictionary\n */\nexport type ModelWithDictionary = {\n    prop?: {\n        [key: string]: string;\n    };\n};\n\n/**\n * This is a deprecated model with a deprecated property\n *\n * @deprecated\n */\nexport type DeprecatedModel = {\n    /**\n     * This is a deprecated property\n     *\n     * @deprecated\n     */\n    prop?: string;\n};\n\n/**\n * This is a model with one property containing a circular reference\n */\nexport type ModelWithCircularReference = {\n    prop?: ModelWithCircularReference;\n};\n\n/**\n * This is a model with one property with a 'one of' relationship\n */\nexport type CompositionWithOneOf = {\n    propA?: ModelWithString | ModelWithEnum | ModelWithArray | ModelWithDictionary;\n};\n\n/**\n * This is a model with one property with a 'one of' relationship where the options are not $ref\n */\nexport type CompositionWithOneOfAnonymous = {\n    propA?: {\n        propA?: string;\n    } | string | number;\n};\n\n/**\n * Circle\n */\nexport type ModelCircle = {\n    kind: string;\n    radius?: number;\n};\n\n/**\n * Square\n */\nexport type ModelSquare = {\n    kind: string;\n    sideLength?: number;\n};\n\n/**\n * This is a model with one property with a 'one of' relationship where the options are not $ref\n */\nexport type CompositionWithOneOfDiscriminator = ({\n    kind: 'circle';\n} & ModelCircle) | ({\n    kind: 'square';\n} & ModelSquare);\n\n/**\n * This is a model with one property with a 'any of' relationship\n */\nexport type CompositionWithAnyOf = {\n    propA?: ModelWithString | ModelWithEnum | ModelWithArray | ModelWithDictionary;\n};\n\n/**\n * This is a model with one property with a 'any of' relationship where the options are not $ref\n */\nexport type CompositionWithAnyOfAnonymous = {\n    propA?: {\n        propA?: string;\n    } | string | number;\n};\n\n/**\n * This is a model with nested 'any of' property with a type null\n */\nexport type CompositionWithNestedAnyAndTypeNull = {\n    propA?: Array<ModelWithDictionary | null> | Array<ModelWithArray | null>;\n};\n\nexport type _3eNum1Период = 'Bird' | 'Dog';\n\nexport type ConstValue = 'ConstValue';\n\n/**\n * This is a model with one property with a 'any of' relationship where the options are not $ref\n */\nexport type CompositionWithNestedAnyOfAndNull = {\n    /**\n     * Scopes\n     */\n    propA?: Array<_3eNum1Период | ConstValue> | null;\n};\n\n/**\n * This is a model with one property with a 'one of' relationship\n */\nexport type CompositionWithOneOfAndNullable = {\n    propA?: {\n        boolean?: boolean;\n    } | ModelWithEnum | ModelWithArray | ModelWithDictionary | null;\n};\n\n/**\n * This is a model that contains a simple dictionary within composition\n */\nexport type CompositionWithOneOfAndSimpleDictionary = {\n    propA?: boolean | {\n        [key: string]: number;\n    };\n};\n\n/**\n * This is a model that contains a dictionary of simple arrays within composition\n */\nexport type CompositionWithOneOfAndSimpleArrayDictionary = {\n    propA?: boolean | {\n        [key: string]: Array<boolean>;\n    };\n};\n\n/**\n * This is a model that contains a dictionary of complex arrays (composited) within composition\n */\nexport type CompositionWithOneOfAndComplexArrayDictionary = {\n    propA?: boolean | {\n        [key: string]: Array<number | string>;\n    };\n};\n\n/**\n * This is a model with one property with a 'all of' relationship\n */\nexport type CompositionWithAllOfAndNullable = {\n    propA?: ({\n        boolean?: boolean;\n    } & ModelWithEnum & ModelWithArray & ModelWithDictionary) | null;\n};\n\n/**\n * This is a model with one property with a 'any of' relationship\n */\nexport type CompositionWithAnyOfAndNullable = {\n    propA?: {\n        boolean?: boolean;\n    } | ModelWithEnum | ModelWithArray | ModelWithDictionary | null;\n};\n\n/**\n * This is a base model with two simple optional properties\n */\nexport type CompositionBaseModel = {\n    firstName?: string;\n    lastname?: string;\n};\n\n/**\n * This is a model that extends the base model\n */\nexport type CompositionExtendedModel = CompositionBaseModel & {\n    age: number;\n    firstName: string;\n    lastname: string;\n};\n\n/**\n * This is a model with one nested property\n */\nexport type ModelWithProperties = {\n    required: string;\n    readonly requiredAndReadOnly: string;\n    requiredAndNullable: string | null;\n    string?: string;\n    number?: number;\n    boolean?: boolean;\n    reference?: ModelWithString;\n    'property with space'?: string;\n    default?: string;\n    try?: string;\n    readonly '@namespace.string'?: string;\n    readonly '@namespace.integer'?: number;\n};\n\n/**\n * This is a model with one nested property\n */\nexport type ModelWithNestedProperties = {\n    readonly first: {\n        readonly second: {\n            readonly third: string | null;\n        } | null;\n    } | null;\n};\n\n/**\n * This is a model with duplicated properties\n */\nexport type ModelWithDuplicateProperties = {\n    prop?: ModelWithString;\n};\n\n/**\n * This is a model with ordered properties\n */\nexport type ModelWithOrderedProperties = {\n    zebra?: string;\n    apple?: string;\n    hawaii?: string;\n};\n\n/**\n * This is a model with duplicated imports\n */\nexport type ModelWithDuplicateImports = {\n    propA?: ModelWithString;\n    propB?: ModelWithString;\n    propC?: ModelWithString;\n};\n\n/**\n * This is a model that extends another model\n */\nexport type ModelThatExtends = ModelWithString & {\n    propExtendsA?: string;\n    propExtendsB?: ModelWithString;\n};\n\n/**\n * This is a model that extends another model\n */\nexport type ModelThatExtendsExtends = ModelWithString & ModelThatExtends & {\n    propExtendsC?: string;\n    propExtendsD?: ModelWithString;\n};\n\n/**\n * This is a model that contains a some patterns\n */\nexport type ModelWithPattern = {\n    key: string;\n    name: string;\n    readonly enabled?: boolean;\n    readonly modified?: string;\n    id?: string;\n    text?: string;\n    patternWithSingleQuotes?: string;\n    patternWithNewline?: string;\n    patternWithBacktick?: string;\n    patternWithUnicode?: string;\n};\n\nexport type File = {\n    /**\n     * Id\n     */\n    readonly id?: string;\n    /**\n     * Updated at\n     */\n    readonly updated_at?: string;\n    /**\n     * Created at\n     */\n    readonly created_at?: string;\n    /**\n     * Mime\n     */\n    mime: string;\n    /**\n     * File\n     */\n    readonly file?: string;\n};\n\nexport type Default = {\n    name?: string;\n};\n\nexport type Pageable = {\n    page?: number;\n    size?: number;\n    sort?: Array<string>;\n};\n\n/**\n * This is a free-form object without additionalProperties.\n */\nexport type FreeFormObjectWithoutAdditionalProperties = {\n    [key: string]: unknown;\n};\n\n/**\n * This is a free-form object with additionalProperties: true.\n */\nexport type FreeFormObjectWithAdditionalPropertiesEqTrue = {\n    [key: string]: unknown;\n};\n\n/**\n * This is a free-form object with additionalProperties: {}.\n */\nexport type FreeFormObjectWithAdditionalPropertiesEqEmptyObject = {\n    [key: string]: unknown;\n};\n\nexport type ModelWithConst = {\n    String?: 'String';\n    number?: 0;\n    null?: null;\n    withType?: 'Some string';\n};\n\n/**\n * This is a model with one property and additionalProperties: true\n */\nexport type ModelWithAdditionalPropertiesEqTrue = {\n    /**\n     * This is a simple string property\n     */\n    prop?: string;\n    [key: string]: unknown;\n};\n\nexport type NestedAnyOfArraysNullable = {\n    nullableArray?: Array<string | boolean> | null;\n};\n\nexport type CompositionWithOneOfAndProperties = ({\n    foo: SimpleParameter;\n} | {\n    bar: NonAsciiStringæøåÆøÅöôêÊ字符串;\n}) & {\n    baz: number | null;\n    qux: number;\n};\n\n/**\n * An object that can be null\n */\nexport type NullableObject = {\n    foo?: string;\n} | null;\n\n/**\n * Some % character\n */\nexport type CharactersInDescription = string;\n\nexport type ModelWithNullableObject = {\n    data?: NullableObject;\n};\n\n/**\n * An object with additional properties that can be null (anyOf ref + null)\n */\nexport type ModelWithAdditionalPropertiesRef = {\n    [key: string]: NullableObject | null;\n};\n\nexport type ModelWithOneOfEnum = {\n    foo: 'Bar';\n} | {\n    foo: 'Baz';\n} | {\n    foo: 'Qux';\n} | {\n    content: string;\n    foo: 'Quux';\n} | {\n    content: [\n        string,\n        string\n    ];\n    foo: 'Corge';\n};\n\nexport type ModelWithNestedArrayEnumsDataFoo = 'foo' | 'bar';\n\nexport type ModelWithNestedArrayEnumsDataBar = 'baz' | 'qux';\n\nexport type ModelWithNestedArrayEnumsData = {\n    foo?: Array<ModelWithNestedArrayEnumsDataFoo>;\n    bar?: Array<ModelWithNestedArrayEnumsDataBar>;\n};\n\nexport type ModelWithNestedArrayEnums = {\n    array_strings?: Array<string>;\n    data?: ModelWithNestedArrayEnumsData;\n};\n\nexport type ModelWithNestedCompositionEnums = {\n    foo?: ModelWithNestedArrayEnumsDataFoo;\n};\n\nexport type ModelWithReadOnlyAndWriteOnly = {\n    foo: string;\n    readonly bar: string;\n};\n\nexport type ModelWithConstantSizeArray = [\n    number,\n    number\n];\n\nexport type ModelWithAnyOfConstantSizeArray = [\n    number | string,\n    number | string,\n    number | string\n];\n\nexport type ModelWithPrefixItemsConstantSizeArray = [\n    ModelWithInteger,\n    number | string,\n    string\n];\n\nexport type ModelWithAnyOfConstantSizeArrayNullable = [\n    number | null | string,\n    number | null | string,\n    number | null | string\n];\n\nexport type ModelWithAnyOfConstantSizeArrayWithNSizeAndOptions = [\n    number | Import,\n    number | Import\n];\n\nexport type ModelWithAnyOfConstantSizeArrayAndIntersect = [\n    number & string,\n    number & string\n];\n\nexport type ModelWithNumericEnumUnion = {\n    /**\n     * Период\n     */\n    value?: -10 | -1 | 0 | 1 | 3 | 6 | 12;\n};\n\n/**\n * Some description with `back ticks`\n */\nexport type ModelWithBackticksInDescription = {\n    /**\n     * The template `that` should be used for parsing and importing the contents of the CSV file.\n     *\n     * <br/><p>There is one placeholder currently supported:<ul>     <li><b>${x}</b> - refers to the n-th column in the CSV file, e.g. ${1}, ${2}, ...)</li></ul><p>Example of a correct JSON template:</p>\n     * <pre>\n     * [\n     * {\n     * \"resourceType\": \"Asset\",\n     * \"identifier\": {\n     * \"name\": \"${1}\",\n     * \"domain\": {\n     * \"name\": \"${2}\",\n     * \"community\": {\n     * \"name\": \"Some Community\"\n     * }\n     * }\n     * },\n     * \"attributes\" : {\n     * \"00000000-0000-0000-0000-000000003115\" : [ {\n     * \"value\" : \"${3}\"\n     * } ],\n     * \"00000000-0000-0000-0000-000000000222\" : [ {\n     * \"value\" : \"${4}\"\n     * } ]\n     * }\n     * }\n     * ]\n     * </pre>\n     */\n    template?: string;\n};\n\nexport type ModelWithOneOfAndProperties = (SimpleParameter | NonAsciiStringæøåÆøÅöôêÊ字符串) & {\n    baz: number | null;\n    qux: number;\n};\n\n/**\n * Model used to test deduplication strategy (unused)\n */\nexport type ParameterSimpleParameterUnused = string;\n\n/**\n * Model used to test deduplication strategy\n */\nexport type PostServiceWithEmptyTagResponse = string;\n\n/**\n * Model used to test deduplication strategy\n */\nexport type PostServiceWithEmptyTagResponse2 = string;\n\n/**\n * Model used to test deduplication strategy\n */\nexport type DeleteFooData = string;\n\n/**\n * Model used to test deduplication strategy\n */\nexport type DeleteFooData2 = string;\n\n/**\n * Model with restricted keyword name\n */\nexport type Import = string;\n\nexport type SchemaWithFormRestrictedKeys = {\n    description?: string;\n    'x-enum-descriptions'?: string;\n    'x-enum-varnames'?: string;\n    'x-enumNames'?: string;\n    title?: string;\n    object?: {\n        description?: string;\n        'x-enum-descriptions'?: string;\n        'x-enum-varnames'?: string;\n        'x-enumNames'?: string;\n        title?: string;\n    };\n    array?: Array<{\n        description?: string;\n        'x-enum-descriptions'?: string;\n        'x-enum-varnames'?: string;\n        'x-enumNames'?: string;\n        title?: string;\n    }>;\n};\n\n/**\n * This schema was giving PascalCase transformations a hard time\n */\nexport type IoK8sApimachineryPkgApisMetaV1DeleteOptions = {\n    /**\n     * Must be fulfilled before a deletion is carried out. If not possible, a 409 Conflict status will be returned.\n     */\n    preconditions?: IoK8sApimachineryPkgApisMetaV1Preconditions;\n};\n\n/**\n * This schema was giving PascalCase transformations a hard time\n */\nexport type IoK8sApimachineryPkgApisMetaV1Preconditions = {\n    /**\n     * Specifies the target ResourceVersion\n     */\n    resourceVersion?: string;\n    /**\n     * Specifies the target UID.\n     */\n    uid?: string;\n};\n\nexport type AdditionalPropertiesUnknownIssue = {\n    [key: string]: string | number;\n};\n\nexport type AdditionalPropertiesUnknownIssue2 = {\n    [key: string]: string | number;\n};\n\nexport type AdditionalPropertiesUnknownIssue3 = string & {\n    entries: {\n        [key: string]: AdditionalPropertiesUnknownIssue;\n    };\n};\n\nexport type AdditionalPropertiesIntegerIssue = {\n    value: number;\n    [key: string]: number;\n};\n\nexport type OneOfAllOfIssue = ((ConstValue | GenericSchemaDuplicateIssue1SystemBoolean) & _3eNum1Период) | GenericSchemaDuplicateIssue1SystemString;\n\nexport type GenericSchemaDuplicateIssue1SystemBoolean = {\n    item?: boolean;\n    error?: string | null;\n    readonly hasError?: boolean;\n    data?: {\n        [key: string]: never;\n    };\n};\n\nexport type GenericSchemaDuplicateIssue1SystemString = {\n    item?: string | null;\n    error?: string | null;\n    readonly hasError?: boolean;\n};\n\nexport type ExternalSharedModel = {\n    id: string;\n    name?: string;\n};\n\n/**\n * This is a model with one property containing a reference\n */\nexport type ModelWithReferenceWritable = {\n    prop?: ModelWithPropertiesWritable;\n};\n\n/**\n * This is a model with one property containing an array\n */\nexport type ModelWithArrayReadOnlyAndWriteOnlyWritable = {\n    prop?: Array<ModelWithReadOnlyAndWriteOnlyWritable>;\n    propWithFile?: Array<Blob | File>;\n    propWithNumber?: Array<number>;\n};\n\n/**\n * This is a model with one nested property\n */\nexport type ModelWithPropertiesWritable = {\n    required: string;\n    requiredAndNullable: string | null;\n    string?: string;\n    number?: number;\n    boolean?: boolean;\n    reference?: ModelWithString;\n    'property with space'?: string;\n    default?: string;\n    try?: string;\n};\n\n/**\n * This is a model that contains a some patterns\n */\nexport type ModelWithPatternWritable = {\n    key: string;\n    name: string;\n    id?: string;\n    text?: string;\n    patternWithSingleQuotes?: string;\n    patternWithNewline?: string;\n    patternWithBacktick?: string;\n    patternWithUnicode?: string;\n};\n\nexport type FileWritable = {\n    /**\n     * Mime\n     */\n    mime: string;\n};\n\nexport type ModelWithReadOnlyAndWriteOnlyWritable = {\n    foo: string;\n    baz: string;\n};\n\nexport type ModelWithAnyOfConstantSizeArrayWithNSizeAndOptionsWritable = [\n    number | Import,\n    number | Import\n];\n\nexport type AdditionalPropertiesUnknownIssueWritable = {\n    [key: string]: string | number;\n};\n\nexport type OneOfAllOfIssueWritable = ((ConstValue | GenericSchemaDuplicateIssue1SystemBoolean) & _3eNum1Период) | GenericSchemaDuplicateIssue1SystemString;\n\nexport type GenericSchemaDuplicateIssue1SystemBooleanWritable = {\n    item?: boolean;\n    error?: string | null;\n    data?: {\n        [key: string]: never;\n    };\n};\n\nexport type GenericSchemaDuplicateIssue1SystemStringWritable = {\n    item?: string | null;\n    error?: string | null;\n};\n\n/**\n * This is a reusable parameter\n */\nexport type SimpleParameter = string;\n\n/**\n * Parameter with illegal characters\n */\nexport type XFooBar = ModelWithString;\n\n/**\n * A reusable request body\n */\nexport type SimpleRequestBody = ModelWithString;\n\n/**\n * A reusable request body\n */\nexport type SimpleFormData = ModelWithString;\n\nexport type ExportData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no+tag';\n};\n\nexport type PatchApiVbyApiVersionNoTagData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no+tag';\n};\n\nexport type PatchApiVbyApiVersionNoTagResponses = {\n    /**\n     * OK\n     */\n    default: unknown;\n};\n\nexport type ImportData = {\n    body: ModelWithReadOnlyAndWriteOnlyWritable | ModelWithArrayReadOnlyAndWriteOnlyWritable;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no+tag';\n};\n\nexport type ImportResponses = {\n    /**\n     * Success\n     */\n    200: ModelFromZendesk;\n    /**\n     * Default success response\n     */\n    default: ModelWithReadOnlyAndWriteOnly;\n};\n\nexport type ImportResponse = ImportResponses[keyof ImportResponses];\n\nexport type FooWowData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no+tag';\n};\n\nexport type FooWowResponses = {\n    /**\n     * OK\n     */\n    default: unknown;\n};\n\nexport type ApiVVersionODataControllerCountData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple/$count';\n};\n\nexport type ApiVVersionODataControllerCountResponses = {\n    /**\n     * Success\n     */\n    200: ModelFromZendesk;\n};\n\nexport type ApiVVersionODataControllerCountResponse = ApiVVersionODataControllerCountResponses[keyof ApiVVersionODataControllerCountResponses];\n\nexport type GetApiVbyApiVersionSimpleOperationData = {\n    body?: never;\n    path: {\n        /**\n         * foo in method\n         */\n        foo_param: string;\n    };\n    query?: never;\n    url: '/api/v{api-version}/simple:operation';\n};\n\nexport type GetApiVbyApiVersionSimpleOperationErrors = {\n    /**\n     * Default error response\n     */\n    default: ModelWithBoolean;\n};\n\nexport type GetApiVbyApiVersionSimpleOperationError = GetApiVbyApiVersionSimpleOperationErrors[keyof GetApiVbyApiVersionSimpleOperationErrors];\n\nexport type GetApiVbyApiVersionSimpleOperationResponses = {\n    /**\n     * Response is a simple number\n     */\n    200: number;\n};\n\nexport type GetApiVbyApiVersionSimpleOperationResponse = GetApiVbyApiVersionSimpleOperationResponses[keyof GetApiVbyApiVersionSimpleOperationResponses];\n\nexport type DeleteCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type GetCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type HeadCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type OptionsCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type PatchCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type PostCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type PutCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type DeleteFooData3 = {\n    body?: never;\n    headers: {\n        /**\n         * Parameter with illegal characters\n         */\n        'x-Foo-Bar': ModelWithString;\n    };\n    path: {\n        /**\n         * foo in method\n         */\n        foo_param: string;\n        /**\n         * bar in method\n         */\n        BarParam: string;\n    };\n    query?: never;\n    url: '/api/v{api-version}/foo/{foo_param}/bar/{BarParam}';\n};\n\nexport type CallWithDescriptionsData = {\n    body?: never;\n    path?: never;\n    query?: {\n        /**\n         * Testing multiline comments in string: First line\n         * Second line\n         *\n         * Fourth line\n         */\n        parameterWithBreaks?: string;\n        /**\n         * Testing backticks in string: `backticks` and ```multiple backticks``` should work\n         */\n        parameterWithBackticks?: string;\n        /**\n         * Testing slashes in string: \\backwards\\\\\\ and /forwards/// should work\n         */\n        parameterWithSlashes?: string;\n        /**\n         * Testing expression placeholders in string: ${expression} should work\n         */\n        parameterWithExpressionPlaceholders?: string;\n        /**\n         * Testing quotes in string: 'single quote''' and \"double quotes\"\"\" should work\n         */\n        parameterWithQuotes?: string;\n        /**\n         * Testing reserved characters in string: * inline * and ** inline ** should work\n         */\n        parameterWithReservedCharacters?: string;\n    };\n    url: '/api/v{api-version}/descriptions';\n};\n\nexport type DeprecatedCallData = {\n    body?: never;\n    headers: {\n        /**\n         * This parameter is deprecated\n         *\n         * @deprecated\n         */\n        parameter: DeprecatedModel | null;\n    };\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/parameters/deprecated';\n};\n\nexport type CallWithParametersData = {\n    /**\n     * This is the parameter that goes into the body\n     */\n    body: {\n        [key: string]: unknown;\n    } | null;\n    headers: {\n        /**\n         * This is the parameter that goes into the header\n         */\n        parameterHeader: string | null;\n    };\n    path: {\n        /**\n         * This is the parameter that goes into the path\n         */\n        parameterPath: string | null;\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string | null;\n    };\n    query: {\n        foo_ref_enum?: ModelWithNestedArrayEnumsDataFoo;\n        foo_all_of_enum: ModelWithNestedArrayEnumsDataFoo;\n        /**\n         * This is the parameter that goes into the query params\n         */\n        cursor: string | null;\n    };\n    url: '/api/v{api-version}/parameters/{parameterPath}';\n};\n\nexport type CallWithWeirdParameterNamesData = {\n    /**\n     * This is the parameter that goes into the body\n     */\n    body: ModelWithString | null;\n    headers: {\n        /**\n         * This is the parameter that goes into the request header\n         */\n        'parameter.header': string | null;\n    };\n    path: {\n        /**\n         * This is the parameter that goes into the path\n         */\n        'parameter.path.1'?: string;\n        /**\n         * This is the parameter that goes into the path\n         */\n        'parameter-path-2'?: string;\n        /**\n         * This is the parameter that goes into the path\n         */\n        'PARAMETER-PATH-3'?: string;\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string | null;\n    };\n    query: {\n        /**\n         * This is the parameter with a reserved keyword\n         */\n        default?: string;\n        /**\n         * This is the parameter that goes into the request query params\n         */\n        'parameter-query': string | null;\n    };\n    url: '/api/v{api-version}/parameters/{parameter.path.1}/{parameter-path-2}/{PARAMETER-PATH-3}';\n};\n\nexport type GetCallWithOptionalParamData = {\n    /**\n     * This is a required parameter\n     */\n    body: ModelWithOneOfEnum;\n    path?: never;\n    query?: {\n        /**\n         * This is an optional parameter\n         */\n        page?: number;\n    };\n    url: '/api/v{api-version}/parameters';\n};\n\nexport type PostCallWithOptionalParamData = {\n    /**\n     * This is an optional parameter\n     */\n    body?: {\n        offset?: number | null;\n    };\n    path?: never;\n    query: {\n        /**\n         * This is a required parameter\n         */\n        parameter: Pageable;\n    };\n    url: '/api/v{api-version}/parameters';\n};\n\nexport type PostCallWithOptionalParamResponses = {\n    /**\n     * Response is a simple number\n     */\n    200: number;\n    /**\n     * Success\n     */\n    204: void;\n};\n\nexport type PostCallWithOptionalParamResponse = PostCallWithOptionalParamResponses[keyof PostCallWithOptionalParamResponses];\n\nexport type PostApiVbyApiVersionRequestBodyData = {\n    /**\n     * A reusable request body\n     */\n    body?: SimpleRequestBody;\n    path?: never;\n    query?: {\n        /**\n         * This is a reusable parameter\n         */\n        parameter?: string;\n    };\n    url: '/api/v{api-version}/requestBody';\n};\n\nexport type PostApiVbyApiVersionFormDataData = {\n    /**\n     * A reusable request body\n     */\n    body?: SimpleFormData;\n    path?: never;\n    query?: {\n        /**\n         * This is a reusable parameter\n         */\n        parameter?: string;\n    };\n    url: '/api/v{api-version}/formData';\n};\n\nexport type CallWithDefaultParametersData = {\n    body?: never;\n    path?: never;\n    query?: {\n        /**\n         * This is a simple string with default value\n         */\n        parameterString?: string | null;\n        /**\n         * This is a simple number with default value\n         */\n        parameterNumber?: number | null;\n        /**\n         * This is a simple boolean with default value\n         */\n        parameterBoolean?: boolean | null;\n        /**\n         * This is a simple enum with default value\n         */\n        parameterEnum?: 'Success' | 'Warning' | 'Error';\n        /**\n         * This is a simple model with default value\n         */\n        parameterModel?: ModelWithString | null;\n    };\n    url: '/api/v{api-version}/defaults';\n};\n\nexport type CallWithDefaultOptionalParametersData = {\n    body?: never;\n    path?: never;\n    query?: {\n        /**\n         * This is a simple string that is optional with default value\n         */\n        parameterString?: string;\n        /**\n         * This is a simple number that is optional with default value\n         */\n        parameterNumber?: number;\n        /**\n         * This is a simple boolean that is optional with default value\n         */\n        parameterBoolean?: boolean;\n        /**\n         * This is a simple enum that is optional with default value\n         */\n        parameterEnum?: 'Success' | 'Warning' | 'Error';\n        /**\n         * This is a simple model that is optional with default value\n         */\n        parameterModel?: ModelWithString;\n    };\n    url: '/api/v{api-version}/defaults';\n};\n\nexport type CallToTestOrderOfParamsData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * This is a optional string with default\n         */\n        parameterOptionalStringWithDefault?: string;\n        /**\n         * This is a optional string with empty default\n         */\n        parameterOptionalStringWithEmptyDefault?: string;\n        /**\n         * This is a optional string with no default\n         */\n        parameterOptionalStringWithNoDefault?: string;\n        /**\n         * This is a string with default\n         */\n        parameterStringWithDefault: string;\n        /**\n         * This is a string with empty default\n         */\n        parameterStringWithEmptyDefault: string;\n        /**\n         * This is a string with no default\n         */\n        parameterStringWithNoDefault: string;\n        /**\n         * This is a string that can be null with no default\n         */\n        parameterStringNullableWithNoDefault?: string | null;\n        /**\n         * This is a string that can be null with default\n         */\n        parameterStringNullableWithDefault?: string | null;\n    };\n    url: '/api/v{api-version}/defaults';\n};\n\nexport type DuplicateNameData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/duplicate';\n};\n\nexport type DuplicateName2Data = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/duplicate';\n};\n\nexport type DuplicateName3Data = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/duplicate';\n};\n\nexport type DuplicateName4Data = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/duplicate';\n};\n\nexport type CallWithNoContentResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no-content';\n};\n\nexport type CallWithNoContentResponseResponses = {\n    /**\n     * Success\n     */\n    204: void;\n};\n\nexport type CallWithNoContentResponseResponse = CallWithNoContentResponseResponses[keyof CallWithNoContentResponseResponses];\n\nexport type CallWithResponseAndNoContentResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multiple-tags/response-and-no-content';\n};\n\nexport type CallWithResponseAndNoContentResponseResponses = {\n    /**\n     * Response is a simple number\n     */\n    200: number;\n    /**\n     * Success\n     */\n    204: void;\n};\n\nexport type CallWithResponseAndNoContentResponseResponse = CallWithResponseAndNoContentResponseResponses[keyof CallWithResponseAndNoContentResponseResponses];\n\nexport type DummyAData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multiple-tags/a';\n};\n\nexport type DummyAResponses = {\n    200: _400;\n};\n\nexport type DummyAResponse = DummyAResponses[keyof DummyAResponses];\n\nexport type DummyBData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multiple-tags/b';\n};\n\nexport type DummyBResponses = {\n    /**\n     * Success\n     */\n    204: void;\n};\n\nexport type DummyBResponse = DummyBResponses[keyof DummyBResponses];\n\nexport type CallWithResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/response';\n};\n\nexport type CallWithResponseResponses = {\n    default: Import;\n};\n\nexport type CallWithResponseResponse = CallWithResponseResponses[keyof CallWithResponseResponses];\n\nexport type CallWithDuplicateResponsesData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/response';\n};\n\nexport type CallWithDuplicateResponsesErrors = {\n    /**\n     * Message for 500 error\n     */\n    500: ModelWithStringError;\n    /**\n     * Message for 501 error\n     */\n    501: ModelWithStringError;\n    /**\n     * Message for 502 error\n     */\n    502: ModelWithStringError;\n    /**\n     * Message for 4XX errors\n     */\n    '4XX': DictionaryWithArray;\n    /**\n     * Default error response\n     */\n    default: ModelWithBoolean;\n};\n\nexport type CallWithDuplicateResponsesError = CallWithDuplicateResponsesErrors[keyof CallWithDuplicateResponsesErrors];\n\nexport type CallWithDuplicateResponsesResponses = {\n    /**\n     * Message for 200 response\n     */\n    200: ModelWithBoolean & ModelWithInteger;\n    /**\n     * Message for 201 response\n     */\n    201: ModelWithString;\n    /**\n     * Message for 202 response\n     */\n    202: ModelWithString;\n};\n\nexport type CallWithDuplicateResponsesResponse = CallWithDuplicateResponsesResponses[keyof CallWithDuplicateResponsesResponses];\n\nexport type CallWithResponsesData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/response';\n};\n\nexport type CallWithResponsesErrors = {\n    /**\n     * Message for 500 error\n     */\n    500: ModelWithStringError;\n    /**\n     * Message for 501 error\n     */\n    501: ModelWithStringError;\n    /**\n     * Message for 502 error\n     */\n    502: ModelWithStringError;\n    /**\n     * Message for default response\n     */\n    default: ModelWithStringError;\n};\n\nexport type CallWithResponsesError = CallWithResponsesErrors[keyof CallWithResponsesErrors];\n\nexport type CallWithResponsesResponses = {\n    /**\n     * Message for 200 response\n     */\n    200: {\n        readonly '@namespace.string'?: string;\n        readonly '@namespace.integer'?: number;\n        readonly value?: Array<ModelWithString>;\n    };\n    /**\n     * Message for 201 response\n     */\n    201: ModelThatExtends;\n    /**\n     * Message for 202 response\n     */\n    202: ModelThatExtendsExtends;\n};\n\nexport type CallWithResponsesResponse = CallWithResponsesResponses[keyof CallWithResponsesResponses];\n\nexport type CollectionFormatData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * This is an array parameter that is sent as csv format (comma-separated values)\n         */\n        parameterArrayCSV: Array<string> | null;\n        /**\n         * This is an array parameter that is sent as ssv format (space-separated values)\n         */\n        parameterArraySSV: Array<string> | null;\n        /**\n         * This is an array parameter that is sent as tsv format (tab-separated values)\n         */\n        parameterArrayTSV: Array<string> | null;\n        /**\n         * This is an array parameter that is sent as pipes format (pipe-separated values)\n         */\n        parameterArrayPipes: Array<string> | null;\n        /**\n         * This is an array parameter that is sent as multi format (multiple parameter instances)\n         */\n        parameterArrayMulti: Array<string> | null;\n    };\n    url: '/api/v{api-version}/collectionFormat';\n};\n\nexport type TypesData = {\n    body?: never;\n    path?: {\n        /**\n         * This is a number parameter\n         */\n        id?: number;\n    };\n    query: {\n        /**\n         * This is a number parameter\n         */\n        parameterNumber: number;\n        /**\n         * This is a string parameter\n         */\n        parameterString: string | null;\n        /**\n         * This is a boolean parameter\n         */\n        parameterBoolean: boolean | null;\n        /**\n         * This is an object parameter\n         */\n        parameterObject: {\n            [key: string]: unknown;\n        } | null;\n        /**\n         * This is an array parameter\n         */\n        parameterArray: Array<string> | null;\n        /**\n         * This is a dictionary parameter\n         */\n        parameterDictionary: {\n            [key: string]: unknown;\n        } | null;\n        /**\n         * This is an enum parameter\n         */\n        parameterEnum: 'Success' | 'Warning' | 'Error' | null;\n    };\n    url: '/api/v{api-version}/types';\n};\n\nexport type TypesResponses = {\n    /**\n     * Response is a simple number\n     */\n    200: number;\n    /**\n     * Response is a simple string\n     */\n    201: string;\n    /**\n     * Response is a simple boolean\n     */\n    202: boolean;\n    /**\n     * Response is a simple object\n     */\n    203: {\n        [key: string]: unknown;\n    };\n};\n\nexport type TypesResponse = TypesResponses[keyof TypesResponses];\n\nexport type UploadFileData = {\n    body: Blob | File;\n    path: {\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string | null;\n    };\n    query?: never;\n    url: '/api/v{api-version}/upload';\n};\n\nexport type UploadFileResponses = {\n    200: boolean;\n};\n\nexport type UploadFileResponse = UploadFileResponses[keyof UploadFileResponses];\n\nexport type FileResponseData = {\n    body?: never;\n    path: {\n        id: string;\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string;\n    };\n    query?: never;\n    url: '/api/v{api-version}/file/{id}';\n};\n\nexport type FileResponseResponses = {\n    /**\n     * Success\n     */\n    200: Blob | File;\n};\n\nexport type FileResponseResponse = FileResponseResponses[keyof FileResponseResponses];\n\nexport type ComplexTypesData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * Parameter containing object\n         */\n        parameterObject: {\n            first?: {\n                second?: {\n                    third?: string;\n                };\n            };\n        };\n        /**\n         * Parameter containing reference\n         */\n        parameterReference: ModelWithString;\n    };\n    url: '/api/v{api-version}/complex';\n};\n\nexport type ComplexTypesErrors = {\n    /**\n     * 400 `server` error\n     */\n    400: unknown;\n    /**\n     * 500 server error\n     */\n    500: unknown;\n};\n\nexport type ComplexTypesResponses = {\n    /**\n     * Successful response\n     */\n    200: Array<ModelWithString>;\n};\n\nexport type ComplexTypesResponse = ComplexTypesResponses[keyof ComplexTypesResponses];\n\nexport type MultipartResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multipart';\n};\n\nexport type MultipartResponseResponses = {\n    /**\n     * OK\n     */\n    200: {\n        file?: Blob | File;\n        metadata?: {\n            foo?: string;\n            bar?: string;\n        };\n    };\n};\n\nexport type MultipartResponseResponse = MultipartResponseResponses[keyof MultipartResponseResponses];\n\nexport type MultipartRequestData = {\n    body?: {\n        content?: Blob | File;\n        data?: ModelWithString | null;\n    };\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multipart';\n};\n\nexport type ComplexParamsData = {\n    body?: {\n        readonly key: string | null;\n        name: string | null;\n        enabled?: boolean;\n        type: 'Monkey' | 'Horse' | 'Bird';\n        listOfModels?: Array<ModelWithString> | null;\n        listOfStrings?: Array<string> | null;\n        parameters: ModelWithString | ModelWithEnum | ModelWithArray | ModelWithDictionary;\n        readonly user?: {\n            readonly id?: number;\n            readonly name?: string | null;\n        };\n    };\n    path: {\n        id: number;\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string;\n    };\n    query?: never;\n    url: '/api/v{api-version}/complex/{id}';\n};\n\nexport type ComplexParamsResponses = {\n    /**\n     * Success\n     */\n    200: ModelWithString;\n};\n\nexport type ComplexParamsResponse = ComplexParamsResponses[keyof ComplexParamsResponses];\n\nexport type CallWithResultFromHeaderData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/header';\n};\n\nexport type CallWithResultFromHeaderErrors = {\n    /**\n     * 400 server error\n     */\n    400: unknown;\n    /**\n     * 500 server error\n     */\n    500: unknown;\n};\n\nexport type CallWithResultFromHeaderResponses = {\n    /**\n     * Successful response\n     */\n    200: unknown;\n};\n\nexport type TestErrorCodeData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * Status code to return\n         */\n        status: number;\n    };\n    url: '/api/v{api-version}/error';\n};\n\nexport type TestErrorCodeErrors = {\n    /**\n     * Custom message: Internal Server Error\n     */\n    500: unknown;\n    /**\n     * Custom message: Not Implemented\n     */\n    501: unknown;\n    /**\n     * Custom message: Bad Gateway\n     */\n    502: unknown;\n    /**\n     * Custom message: Service Unavailable\n     */\n    503: unknown;\n};\n\nexport type TestErrorCodeResponses = {\n    /**\n     * Custom message: Successful response\n     */\n    200: unknown;\n};\n\nexport type NonAsciiæøåÆøÅöôêÊ字符串Data = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * Dummy input param\n         */\n        nonAsciiParamæøåÆØÅöôêÊ: number;\n    };\n    url: '/api/v{api-version}/non-ascii-æøåÆØÅöôêÊ字符串';\n};\n\nexport type NonAsciiæøåÆøÅöôêÊ字符串Responses = {\n    /**\n     * Successful response\n     */\n    200: Array<NonAsciiStringæøåÆøÅöôêÊ字符串>;\n};\n\nexport type NonAsciiæøåÆøÅöôêÊ字符串Response = NonAsciiæøåÆøÅöôêÊ字符串Responses[keyof NonAsciiæøåÆøÅöôêÊ字符串Responses];\n\nexport type PutWithFormUrlEncodedData = {\n    body: ArrayWithStrings;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/non-ascii-æøåÆØÅöôêÊ字符串';\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-angular/tsconfig-nodenext-sdk/client/client.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { HttpResponse } from '@angular/common/http';\nimport { HttpClient, HttpErrorResponse, HttpEventType, HttpRequest } from '@angular/common/http';\nimport {\n  assertInInjectionContext,\n  inject,\n  provideAppInitializer,\n  runInInjectionContext,\n} from '@angular/core';\nimport { firstValueFrom } from 'rxjs';\nimport { filter } from 'rxjs/operators';\n\nimport { createSseClient } from '../core/serverSentEvents.gen.js';\nimport type { HttpMethod } from '../core/types.gen.js';\nimport { getValidRequestBody } from '../core/utils.gen.js';\nimport type {\n  Client,\n  Config,\n  RequestOptions,\n  ResolvedRequestOptions,\n  ResponseStyle,\n} from './types.gen.js';\nimport {\n  buildUrl,\n  createConfig,\n  createInterceptors,\n  mergeConfigs,\n  mergeHeaders,\n  setAuthParams,\n} from './utils.gen.js';\n\nexport function provideHeyApiClient(client: Client) {\n  return provideAppInitializer(() => {\n    const httpClient = inject(HttpClient);\n    client.setConfig({ httpClient });\n  });\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<\n    HttpRequest<unknown>,\n    HttpResponse<unknown>,\n    unknown,\n    ResolvedRequestOptions\n  >();\n\n  const requestOptions = <\n    TData = unknown,\n    ThrowOnError extends boolean = false,\n    TResponseStyle extends ResponseStyle = 'fields',\n  >(\n    options: RequestOptions<TData, TResponseStyle, ThrowOnError>,\n  ) => {\n    const opts = {\n      ..._config,\n      ...options,\n      headers: mergeHeaders(_config.headers, options.headers),\n      httpClient: options.httpClient ?? _config.httpClient,\n      serializedBody: undefined as string | undefined,\n    };\n\n    if (!opts.httpClient) {\n      if (opts.injector) {\n        opts.httpClient = runInInjectionContext(opts.injector, () => inject(HttpClient));\n      } else {\n        assertInInjectionContext(requestOptions);\n        opts.httpClient = inject(HttpClient);\n      }\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 url = buildUrl(opts as any);\n\n    const req = new HttpRequest<unknown>(opts.method ?? 'GET', url, getValidRequestBody(opts), {\n      redirect: 'follow',\n      ...opts,\n    });\n\n    return { opts, req, url };\n  };\n\n  const beforeRequest = async (options: RequestOptions) => {\n    const { opts, req, url } = requestOptions(options);\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    return { opts, req, url };\n  };\n\n  const request: Client['request'] = async (options) => {\n    // @ts-expect-error\n    const { opts, req: initialReq } = await beforeRequest(options);\n\n    let req = initialReq;\n\n    for (const fn of interceptors.request.fns) {\n      if (fn) {\n        req = await fn(req, opts as any);\n      }\n    }\n\n    const result: {\n      request: HttpRequest<unknown>;\n      response: any;\n    } = {\n      request: req,\n      response: null,\n    };\n\n    try {\n      result.response = (await firstValueFrom(\n        opts\n          .httpClient!.request(req)\n          .pipe(filter((event) => event.type === HttpEventType.Response)),\n      )) as HttpResponse<unknown>;\n\n      for (const fn of interceptors.response.fns) {\n        if (fn) {\n          result.response = await fn(result.response, req, opts as any);\n        }\n      }\n\n      let bodyResponse = result.response.body;\n\n      if (opts.responseValidator) {\n        await opts.responseValidator(bodyResponse);\n      }\n\n      if (opts.responseTransformer) {\n        bodyResponse = await opts.responseTransformer(bodyResponse);\n      }\n\n      return opts.responseStyle === 'data' ? bodyResponse : { data: bodyResponse, ...result };\n    } catch (error) {\n      if (error instanceof HttpErrorResponse) {\n        result.response = error;\n      }\n\n      let finalError = error instanceof HttpErrorResponse ? error.error : error;\n\n      for (const fn of interceptors.error.fns) {\n        if (fn) {\n          finalError = (await fn(finalError, result.response as any, req, opts as any)) as string;\n        }\n      }\n\n      if (opts.throwOnError) {\n        throw finalError;\n      }\n\n      return opts.responseStyle === 'data'\n        ? undefined\n        : {\n            error: finalError,\n            ...result,\n          };\n    }\n  };\n\n  const makeMethodFn = (method: Uppercase<HttpMethod>) => (options: RequestOptions) =>\n    request({ ...options, method });\n\n  const makeSseFn = (method: Uppercase<HttpMethod>) => async (options: RequestOptions) => {\n    const { opts, url } = await beforeRequest(options);\n    return createSseClient({\n      ...opts,\n      body: opts.body as BodyInit | null | undefined,\n      headers: opts.headers as unknown as Record<string, string>,\n      method,\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    requestOptions: (options) => {\n      if (options.security) {\n        throw new Error('Security is not supported in requestOptions');\n      }\n\n      if (options.requestValidator) {\n        throw new Error('Request validation is not supported in requestOptions');\n      }\n\n      return requestOptions(options).req;\n    },\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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-angular/tsconfig-nodenext-sdk/client/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type { Auth } from '../core/auth.gen.js';\nexport type { QuerySerializerOptions } from '../core/bodySerializer.gen.js';\nexport {\n  formDataBodySerializer,\n  jsonBodySerializer,\n  urlSearchParamsBodySerializer,\n} from '../core/bodySerializer.gen.js';\nexport { buildClientParams } from '../core/params.gen.js';\nexport { serializeQueryKeyValue } from '../core/queryKeySerializer.gen.js';\nexport { createClient } from './client.gen.js';\nexport type {\n  Client,\n  ClientOptions,\n  Config,\n  CreateClientConfig,\n  Options,\n  RequestOptions,\n  RequestResult,\n  ResolvedRequestOptions,\n  ResponseStyle,\n  TDataShape,\n} from './types.gen.js';\nexport { createConfig, mergeHeaders } from './utils.gen.js';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-angular/tsconfig-nodenext-sdk/client/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type {\n  HttpClient,\n  HttpErrorResponse,\n  HttpHeaders,\n  HttpRequest,\n  HttpResponse,\n} from '@angular/common/http';\nimport type { Injector } from '@angular/core';\n\nimport type { Auth } from '../core/auth.gen.js';\nimport type {\n  ServerSentEventsOptions,\n  ServerSentEventsResult,\n} from '../core/serverSentEvents.gen.js';\nimport type { Client as CoreClient, Config as CoreConfig } from '../core/types.gen.js';\nimport type { Middleware } from './utils.gen.js';\n\nexport type ResponseStyle = 'data' | 'fields';\n\nexport interface Config<T extends ClientOptions = ClientOptions>\n  extends Omit<RequestInit, 'body' | 'headers' | 'method'>, Omit<CoreConfig, 'headers'> {\n  /**\n   * Base URL for all requests made by this client.\n   */\n  baseUrl?: T['baseUrl'];\n  /**\n   * An object containing any HTTP headers that you want to pre-populate your\n   * `HttpHeaders` object with.\n   *\n   * {@link https://angular.dev/api/common/http/HttpHeaders#constructor See more}\n   */\n  headers?:\n    | HttpHeaders\n    | Record<\n        string,\n        string | number | boolean | (string | number | boolean)[] | null | undefined | unknown\n      >;\n  /**\n   * The HTTP client to use for making requests.\n   */\n  httpClient?: HttpClient;\n  /**\n   * Should we return only data or multiple fields (data, error, response, etc.)?\n   *\n   * @default 'fields'\n   */\n  responseStyle?: ResponseStyle;\n\n  /**\n   * Throw an error instead of returning it in the response?\n   *\n   * @default false\n   */\n  throwOnError?: T['throwOnError'];\n}\n\nexport interface RequestOptions<\n  TData = unknown,\n  TResponseStyle extends ResponseStyle = 'fields',\n  ThrowOnError extends boolean = boolean,\n  Url extends string = string,\n>\n  extends\n    Config<{\n      responseStyle: TResponseStyle;\n      throwOnError: ThrowOnError;\n    }>,\n    Pick<\n      ServerSentEventsOptions<TData>,\n      | 'onRequest'\n      | 'onSseError'\n      | 'onSseEvent'\n      | 'sseDefaultRetryDelay'\n      | 'sseMaxRetryAttempts'\n      | 'sseMaxRetryDelay'\n    > {\n  /**\n   * Any body that you want to add to your request.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/fetch#body}\n   */\n  body?: unknown;\n  /**\n   * Optional custom injector for dependency resolution if you don't implicitly or explicitly provide one.\n   */\n  injector?: Injector;\n  path?: Record<string, unknown>;\n  query?: Record<string, unknown>;\n  /**\n   * Security mechanism(s) to use for the request.\n   */\n  security?: ReadonlyArray<Auth>;\n  url: Url;\n}\n\nexport interface ResolvedRequestOptions<\n  TResponseStyle extends ResponseStyle = 'fields',\n  ThrowOnError extends boolean = boolean,\n  Url extends string = string,\n> extends RequestOptions<unknown, TResponseStyle, ThrowOnError, Url> {\n  serializedBody?: string;\n}\n\nexport type RequestResult<\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = boolean,\n  TResponseStyle extends ResponseStyle = 'fields',\n> = Promise<\n  ThrowOnError extends true\n    ? TResponseStyle extends 'data'\n      ? TData extends Record<string, unknown>\n        ? TData[keyof TData]\n        : TData\n      : {\n          data: TData extends Record<string, unknown> ? TData[keyof TData] : TData;\n          request: HttpRequest<unknown>;\n          response: HttpResponse<TData>;\n        }\n    : TResponseStyle extends 'data'\n      ? (TData extends Record<string, unknown> ? TData[keyof TData] : TData) | undefined\n      :\n          | {\n              data: TData extends Record<string, unknown> ? TData[keyof TData] : TData;\n              error: undefined;\n              request: HttpRequest<unknown>;\n              response: HttpResponse<TData>;\n            }\n          | {\n              data: undefined;\n              error: TError[keyof TError];\n              request: HttpRequest<unknown>;\n              response: HttpErrorResponse & {\n                error: TError[keyof TError] | null;\n              };\n            }\n>;\n\nexport interface ClientOptions {\n  baseUrl?: string;\n  responseStyle?: ResponseStyle;\n  throwOnError?: boolean;\n}\n\ntype MethodFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'>,\n) => RequestResult<TData, TError, ThrowOnError, TResponseStyle>;\n\ntype SseFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'>,\n) => Promise<ServerSentEventsResult<TData, TError>>;\n\ntype RequestFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'> &\n    Pick<Required<RequestOptions<TData, TResponseStyle, ThrowOnError>>, 'method'>,\n) => RequestResult<TData, TError, ThrowOnError, TResponseStyle>;\n\ntype RequestOptionsFn = <\n  T,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: RequestOptions<T, TResponseStyle, ThrowOnError>,\n) => HttpRequest<T>;\n\ntype BuildUrlFn = <\n  TData extends {\n    body?: unknown;\n    path?: Record<string, unknown>;\n    query?: Record<string, unknown>;\n    url: string;\n  },\n>(\n  options: TData & Options<TData>,\n) => string;\n\nexport type Client = CoreClient<RequestFn, Config, MethodFn, BuildUrlFn, SseFn> & {\n  interceptors: Middleware<\n    HttpRequest<unknown>,\n    HttpResponse<unknown>,\n    unknown,\n    ResolvedRequestOptions\n  >;\n  requestOptions: RequestOptionsFn;\n};\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 = ClientOptions> = (\n  override?: Config<ClientOptions & T>,\n) => Config<Required<ClientOptions> & T>;\n\nexport interface TDataShape {\n  body?: unknown;\n  headers?: unknown;\n  path?: unknown;\n  query?: unknown;\n  url: string;\n}\n\ntype OmitKeys<T, K> = Pick<T, Exclude<keyof T, K>>;\n\nexport type Options<\n  TData extends TDataShape = TDataShape,\n  ThrowOnError extends boolean = boolean,\n  TResponse = unknown,\n  TResponseStyle extends ResponseStyle = 'fields',\n> = OmitKeys<\n  RequestOptions<TResponse, TResponseStyle, ThrowOnError>,\n  'body' | 'path' | 'query' | 'url'\n> &\n  ([TData] extends [never] ? unknown : Omit<TData, 'url'>);\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-angular/tsconfig-nodenext-sdk/client/utils.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport { HttpHeaders } from '@angular/common/http';\n\nimport { getAuthToken } from '../core/auth.gen.js';\nimport type {\n  QuerySerializer,\n  QuerySerializerOptions,\n} from '../core/bodySerializer.gen.js';\nimport {\n  serializeArrayParam,\n  serializeObjectParam,\n  serializePrimitiveParam,\n} from '../core/pathSerializer.gen.js';\nimport type { Client, ClientOptions, Config, RequestOptions } from './types.gen.js';\n\ninterface PathSerializer {\n  path: Record<string, unknown>;\n  url: string;\n}\n\nconst PATH_PARAM_RE = /\\{[^{}]+\\}/g;\n\ntype ArrayStyle = 'form' | 'spaceDelimited' | 'pipeDelimited';\ntype MatrixStyle = 'label' | 'matrix' | 'simple';\ntype ArraySeparatorStyle = ArrayStyle | MatrixStyle;\n\nconst 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 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 = (\n  contentType: string | null,\n): 'blob' | 'formData' | 'json' | 'stream' | 'text' | undefined => {\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\nexport const setAuthParams = async (\n  options: Pick<Required<RequestOptions>, 'security'> &\n    Pick<RequestOptions, 'auth' | 'query'> & {\n      headers: HttpHeaders;\n    },\n) => {\n  for (const auth of options.security) {\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 = options.headers.append('Cookie', `${name}=${token}`);\n        break;\n      case 'header':\n      default:\n        options.headers = options.headers.set(name, token);\n        break;\n    }\n\n    return;\n  }\n};\n\nexport const buildUrl: Client['buildUrl'] = (options) => {\n  const url = 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  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 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\nexport const mergeHeaders = (\n  ...headers: Array<Required<Config>['headers'] | undefined>\n): HttpHeaders => {\n  let mergedHeaders = new HttpHeaders();\n\n  for (const header of headers) {\n    if (!header || typeof header !== 'object') {\n      continue;\n    }\n\n    if (header instanceof HttpHeaders) {\n      // Merge HttpHeaders instance\n      header.keys().forEach((key) => {\n        const values = header.getAll(key);\n        if (values) {\n          values.forEach((value) => {\n            mergedHeaders = mergedHeaders.append(key, value);\n          });\n        }\n      });\n    } else {\n      // Merge plain object headers\n      for (const [key, value] of Object.entries(header)) {\n        if (value === null) {\n          mergedHeaders = mergedHeaders.delete(key);\n        } else if (Array.isArray(value)) {\n          for (const v of value) {\n            mergedHeaders = 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 = mergedHeaders.set(\n            key,\n            typeof value === 'object' ? JSON.stringify(value) : (value as string),\n          );\n        }\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  headers: defaultHeaders,\n  querySerializer: defaultQuerySerializer,\n  ...override,\n});\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-angular/tsconfig-nodenext-sdk/client.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport { type ClientOptions, type Config, createClient, createConfig } from './client/index.js';\nimport type { ClientOptions as ClientOptions2 } from './types.gen.js';\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: 'http://localhost:3000/base' }));\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-angular/tsconfig-nodenext-sdk/core/auth.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-angular/tsconfig-nodenext-sdk/core/bodySerializer.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { ArrayStyle, ObjectStyle, SerializerOptions } from './pathSerializer.gen.js';\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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-angular/tsconfig-nodenext-sdk/core/params.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-angular/tsconfig-nodenext-sdk/core/pathSerializer.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-angular/tsconfig-nodenext-sdk/core/queryKeySerializer.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\n/**\n * JSON-friendly union that mirrors what Pinia Colada can hash.\n */\nexport type JsonValue =\n  | null\n  | string\n  | number\n  | boolean\n  | JsonValue[]\n  | { [key: string]: JsonValue };\n\n/**\n * Replacer that converts non-JSON values (bigint, Date, etc.) to safe substitutes.\n */\nexport const queryKeyJsonReplacer = (_key: string, value: unknown) => {\n  if (value === undefined || typeof value === 'function' || typeof value === 'symbol') {\n    return undefined;\n  }\n  if (typeof value === 'bigint') {\n    return value.toString();\n  }\n  if (value instanceof Date) {\n    return value.toISOString();\n  }\n  return value;\n};\n\n/**\n * Safely stringifies a value and parses it back into a JsonValue.\n */\nexport const stringifyToJsonValue = (input: unknown): JsonValue | undefined => {\n  try {\n    const json = JSON.stringify(input, queryKeyJsonReplacer);\n    if (json === undefined) {\n      return undefined;\n    }\n    return JSON.parse(json) as JsonValue;\n  } catch {\n    return undefined;\n  }\n};\n\n/**\n * Detects plain objects (including objects with a null prototype).\n */\nconst isPlainObject = (value: unknown): value is Record<string, unknown> => {\n  if (value === null || typeof value !== 'object') {\n    return false;\n  }\n  const prototype = Object.getPrototypeOf(value as object);\n  return prototype === Object.prototype || prototype === null;\n};\n\n/**\n * Turns URLSearchParams into a sorted JSON object for deterministic keys.\n */\nconst serializeSearchParams = (params: URLSearchParams): JsonValue => {\n  const entries = Array.from(params.entries()).sort(([a], [b]) => a.localeCompare(b));\n  const result: Record<string, JsonValue> = {};\n\n  for (const [key, value] of entries) {\n    const existing = result[key];\n    if (existing === undefined) {\n      result[key] = value;\n      continue;\n    }\n\n    if (Array.isArray(existing)) {\n      (existing as string[]).push(value);\n    } else {\n      result[key] = [existing, value];\n    }\n  }\n\n  return result;\n};\n\n/**\n * Normalizes any accepted value into a JSON-friendly shape for query keys.\n */\nexport const serializeQueryKeyValue = (value: unknown): JsonValue | undefined => {\n  if (value === null) {\n    return null;\n  }\n\n  if (typeof value === 'string' || typeof value === 'number' || typeof value === 'boolean') {\n    return value;\n  }\n\n  if (value === undefined || typeof value === 'function' || typeof value === 'symbol') {\n    return undefined;\n  }\n\n  if (typeof value === 'bigint') {\n    return value.toString();\n  }\n\n  if (value instanceof Date) {\n    return value.toISOString();\n  }\n\n  if (Array.isArray(value)) {\n    return stringifyToJsonValue(value);\n  }\n\n  if (typeof URLSearchParams !== 'undefined' && value instanceof URLSearchParams) {\n    return serializeSearchParams(value);\n  }\n\n  if (isPlainObject(value)) {\n    return stringifyToJsonValue(value);\n  }\n\n  return undefined;\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-angular/tsconfig-nodenext-sdk/core/serverSentEvents.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { Config } from './types.gen.js';\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 const 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            // Normalize line endings: CRLF -> LF, then CR -> LF\n            buffer = buffer.replace(/\\r\\n/g, '\\n').replace(/\\r/g, '\\n');\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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-angular/tsconfig-nodenext-sdk/core/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { Auth, AuthToken } from './auth.gen.js';\nimport type { BodySerializer, QuerySerializer, QuerySerializerOptions } from './bodySerializer.gen.js';\n\nexport type HttpMethod =\n  | 'connect'\n  | 'delete'\n  | 'get'\n  | 'head'\n  | 'options'\n  | 'patch'\n  | 'post'\n  | 'put'\n  | 'trace';\n\nexport type Client<\n  RequestFn = never,\n  Config = unknown,\n  MethodFn = never,\n  BuildUrlFn = never,\n  SseFn = never,\n> = {\n  /**\n   * Returns the final request URL.\n   */\n  buildUrl: BuildUrlFn;\n  getConfig: () => Config;\n  request: RequestFn;\n  setConfig: (config: Config) => Config;\n} & {\n  [K in HttpMethod]: MethodFn;\n} & ([SseFn] extends [never] ? { sse?: never } : { sse: { [K in HttpMethod]: SseFn } });\n\nexport interface Config {\n  /**\n   * Auth token or a function returning auth token. The resolved value will be\n   * added to the request payload as defined by its `security` array.\n   */\n  auth?: ((auth: Auth) => Promise<AuthToken> | AuthToken) | AuthToken;\n  /**\n   * A function for serializing request body parameter. By default,\n   * {@link JSON.stringify()} will be used.\n   */\n  bodySerializer?: BodySerializer | null;\n  /**\n   * An object containing any HTTP headers that you want to pre-populate your\n   * `Headers` object with.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/Headers/Headers#init See more}\n   */\n  headers?:\n    | RequestInit['headers']\n    | Record<\n        string,\n        string | number | boolean | (string | number | boolean)[] | null | undefined | unknown\n      >;\n  /**\n   * The request method.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/fetch#method See more}\n   */\n  method?: Uppercase<HttpMethod>;\n  /**\n   * A function for serializing request query parameters. By default, arrays\n   * will be exploded in form style, objects will be exploded in deepObject\n   * style, and reserved characters are percent-encoded.\n   *\n   * This method will have no effect if the native `paramsSerializer()` Axios\n   * API function is used.\n   *\n   * {@link https://swagger.io/docs/specification/serialization/#query View examples}\n   */\n  querySerializer?: QuerySerializer | QuerySerializerOptions;\n  /**\n   * A function validating request data. This is useful if you want to ensure\n   * the request conforms to the desired shape, so it can be safely sent to\n   * the server.\n   */\n  requestValidator?: (data: unknown) => Promise<unknown>;\n  /**\n   * A function transforming response data before it's returned. This is useful\n   * for post-processing data, e.g. converting ISO strings into Date objects.\n   */\n  responseTransformer?: (data: unknown) => Promise<unknown>;\n  /**\n   * A function validating response data. This is useful if you want to ensure\n   * the response conforms to the desired shape, so it can be safely passed to\n   * the transformers and returned to the user.\n   */\n  responseValidator?: (data: unknown) => Promise<unknown>;\n}\n\ntype IsExactlyNeverOrNeverUndefined<T> = [T] extends [never]\n  ? true\n  : [T] extends [never | undefined]\n    ? [undefined] extends [T]\n      ? false\n      : true\n    : false;\n\nexport type OmitNever<T extends Record<string, unknown>> = {\n  [K in keyof T as IsExactlyNeverOrNeverUndefined<T[K]> extends true ? never : K]: T[K];\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-angular/tsconfig-nodenext-sdk/core/utils.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { BodySerializer, QuerySerializer } from './bodySerializer.gen.js';\nimport {\n  type ArraySeparatorStyle,\n  serializeArrayParam,\n  serializeObjectParam,\n  serializePrimitiveParam,\n} from './pathSerializer.gen.js';\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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-angular/tsconfig-nodenext-sdk/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport { apiVVersionODataControllerCount, callToTestOrderOfParams, callWithDefaultOptionalParameters, callWithDefaultParameters, callWithDescriptions, callWithDuplicateResponses, callWithNoContentResponse, callWithParameters, callWithResponse, callWithResponseAndNoContentResponse, callWithResponses, callWithResultFromHeader, callWithWeirdParameterNames, collectionFormat, complexParams, complexTypes, deleteCallWithoutParametersAndResponse, deleteFoo, deprecatedCall, dummyA, dummyB, duplicateName, duplicateName2, duplicateName3, duplicateName4, export_, fileResponse, fooWow, getApiVbyApiVersionSimpleOperation, getCallWithOptionalParam, getCallWithoutParametersAndResponse, headCallWithoutParametersAndResponse, import_, multipartRequest, multipartResponse, nonAsciiæøåÆøÅöôêÊ字符串, type Options, optionsCallWithoutParametersAndResponse, patchApiVbyApiVersionNoTag, patchCallWithoutParametersAndResponse, postApiVbyApiVersionFormData, postApiVbyApiVersionRequestBody, postCallWithOptionalParam, postCallWithoutParametersAndResponse, putCallWithoutParametersAndResponse, putWithFormUrlEncoded, testErrorCode, types, uploadFile } from './sdk.gen.js';\nexport type { _3eNum1Период, _400, AdditionalPropertiesIntegerIssue, AdditionalPropertiesUnknownIssue, AdditionalPropertiesUnknownIssue2, AdditionalPropertiesUnknownIssue3, AdditionalPropertiesUnknownIssueWritable, AnyOfAnyAndNull, AnyOfArrays, ApiVVersionODataControllerCountData, ApiVVersionODataControllerCountResponse, ApiVVersionODataControllerCountResponses, ArrayWithAnyOfProperties, ArrayWithArray, ArrayWithBooleans, ArrayWithNumbers, ArrayWithProperties, ArrayWithReferences, ArrayWithStrings, CallToTestOrderOfParamsData, CallWithDefaultOptionalParametersData, CallWithDefaultParametersData, CallWithDescriptionsData, CallWithDuplicateResponsesData, CallWithDuplicateResponsesError, CallWithDuplicateResponsesErrors, CallWithDuplicateResponsesResponse, CallWithDuplicateResponsesResponses, CallWithNoContentResponseData, CallWithNoContentResponseResponse, CallWithNoContentResponseResponses, CallWithParametersData, CallWithResponseAndNoContentResponseData, CallWithResponseAndNoContentResponseResponse, CallWithResponseAndNoContentResponseResponses, CallWithResponseData, CallWithResponseResponse, CallWithResponseResponses, CallWithResponsesData, CallWithResponsesError, CallWithResponsesErrors, CallWithResponsesResponse, CallWithResponsesResponses, CallWithResultFromHeaderData, CallWithResultFromHeaderErrors, CallWithResultFromHeaderResponses, CallWithWeirdParameterNamesData, CamelCaseCommentWithBreaks, CharactersInDescription, ClientOptions, CollectionFormatData, CommentWithBackticks, CommentWithBackticksAndQuotes, CommentWithBreaks, CommentWithExpressionPlaceholders, CommentWithQuotes, CommentWithReservedCharacters, CommentWithSlashes, ComplexParamsData, ComplexParamsResponse, ComplexParamsResponses, ComplexTypesData, ComplexTypesErrors, ComplexTypesResponse, ComplexTypesResponses, CompositionBaseModel, CompositionExtendedModel, CompositionWithAllOfAndNullable, CompositionWithAnyOf, CompositionWithAnyOfAndNullable, CompositionWithAnyOfAnonymous, CompositionWithNestedAnyAndTypeNull, CompositionWithNestedAnyOfAndNull, CompositionWithOneOf, CompositionWithOneOfAndComplexArrayDictionary, CompositionWithOneOfAndNullable, CompositionWithOneOfAndProperties, CompositionWithOneOfAndSimpleArrayDictionary, CompositionWithOneOfAndSimpleDictionary, CompositionWithOneOfAnonymous, CompositionWithOneOfDiscriminator, ConstValue, Default, DeleteCallWithoutParametersAndResponseData, DeleteFooData, DeleteFooData2, DeleteFooData3, DeprecatedCallData, DeprecatedModel, DictionaryWithArray, DictionaryWithDictionary, DictionaryWithProperties, DictionaryWithPropertiesAndAdditionalProperties, DictionaryWithReference, DictionaryWithString, DummyAData, DummyAResponse, DummyAResponses, DummyBData, DummyBResponse, DummyBResponses, DuplicateName2Data, DuplicateName3Data, DuplicateName4Data, DuplicateNameData, EnumFromDescription, EnumWithExtensions, EnumWithNumbers, EnumWithReplacedCharacters, EnumWithStrings, EnumWithXEnumNames, ExportData, ExternalRefA, ExternalRefB, ExternalSharedModel, File, FileResponseData, FileResponseResponse, FileResponseResponses, FileWritable, FooWowData, FooWowResponses, FreeFormObjectWithAdditionalPropertiesEqEmptyObject, FreeFormObjectWithAdditionalPropertiesEqTrue, FreeFormObjectWithoutAdditionalProperties, GenericSchemaDuplicateIssue1SystemBoolean, GenericSchemaDuplicateIssue1SystemBooleanWritable, GenericSchemaDuplicateIssue1SystemString, GenericSchemaDuplicateIssue1SystemStringWritable, GetApiVbyApiVersionSimpleOperationData, GetApiVbyApiVersionSimpleOperationError, GetApiVbyApiVersionSimpleOperationErrors, GetApiVbyApiVersionSimpleOperationResponse, GetApiVbyApiVersionSimpleOperationResponses, GetCallWithOptionalParamData, GetCallWithoutParametersAndResponseData, HeadCallWithoutParametersAndResponseData, Import, ImportData, ImportResponse, ImportResponses, IoK8sApimachineryPkgApisMetaV1DeleteOptions, IoK8sApimachineryPkgApisMetaV1Preconditions, ModelCircle, ModelFromZendesk, ModelSquare, ModelThatExtends, ModelThatExtendsExtends, ModelWithAdditionalPropertiesEqTrue, ModelWithAdditionalPropertiesRef, ModelWithAnyOfConstantSizeArray, ModelWithAnyOfConstantSizeArrayAndIntersect, ModelWithAnyOfConstantSizeArrayNullable, ModelWithAnyOfConstantSizeArrayWithNSizeAndOptions, ModelWithAnyOfConstantSizeArrayWithNSizeAndOptionsWritable, ModelWithArray, ModelWithArrayReadOnlyAndWriteOnly, ModelWithArrayReadOnlyAndWriteOnlyWritable, ModelWithBackticksInDescription, ModelWithBoolean, ModelWithCircularReference, ModelWithConst, ModelWithConstantSizeArray, ModelWithDictionary, ModelWithDuplicateImports, ModelWithDuplicateProperties, ModelWithEnum, ModelWithEnumFromDescription, ModelWithEnumWithHyphen, ModelWithInteger, ModelWithNestedArrayEnums, ModelWithNestedArrayEnumsData, ModelWithNestedArrayEnumsDataBar, ModelWithNestedArrayEnumsDataFoo, ModelWithNestedCompositionEnums, ModelWithNestedEnums, ModelWithNestedProperties, ModelWithNullableObject, ModelWithNullableString, ModelWithNumericEnumUnion, ModelWithOneOfAndProperties, ModelWithOneOfEnum, ModelWithOrderedProperties, ModelWithPattern, ModelWithPatternWritable, ModelWithPrefixItemsConstantSizeArray, ModelWithProperties, ModelWithPropertiesWritable, ModelWithReadOnlyAndWriteOnly, ModelWithReadOnlyAndWriteOnlyWritable, ModelWithReference, ModelWithReferenceWritable, ModelWithString, ModelWithStringError, MultipartRequestData, MultipartResponseData, MultipartResponseResponse, MultipartResponseResponses, NestedAnyOfArraysNullable, NonAsciiæøåÆøÅöôêÊ字符串Data, NonAsciiæøåÆøÅöôêÊ字符串Response, NonAsciiæøåÆøÅöôêÊ字符串Responses, NonAsciiStringæøåÆøÅöôêÊ字符串, NullableObject, OneOfAllOfIssue, OneOfAllOfIssueWritable, OptionsCallWithoutParametersAndResponseData, Pageable, ParameterSimpleParameterUnused, PatchApiVbyApiVersionNoTagData, PatchApiVbyApiVersionNoTagResponses, PatchCallWithoutParametersAndResponseData, PostApiVbyApiVersionFormDataData, PostApiVbyApiVersionRequestBodyData, PostCallWithOptionalParamData, PostCallWithOptionalParamResponse, PostCallWithOptionalParamResponses, PostCallWithoutParametersAndResponseData, PostServiceWithEmptyTagResponse, PostServiceWithEmptyTagResponse2, PutCallWithoutParametersAndResponseData, PutWithFormUrlEncodedData, SchemaWithFormRestrictedKeys, SimpleBoolean, SimpleFile, SimpleFormData, SimpleInteger, SimpleParameter, SimpleReference, SimpleRequestBody, SimpleString, SimpleStringWithPattern, TestErrorCodeData, TestErrorCodeErrors, TestErrorCodeResponses, TypesData, TypesResponse, TypesResponses, UploadFileData, UploadFileResponse, UploadFileResponses, XFooBar } from './types.gen.js';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-angular/tsconfig-nodenext-sdk/sdk.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport { client } from './client.gen.js';\nimport { type Client, formDataBodySerializer, type Options as Options2, type TDataShape, urlSearchParamsBodySerializer } from './client/index.js';\nimport type { ApiVVersionODataControllerCountData, ApiVVersionODataControllerCountResponses, CallToTestOrderOfParamsData, CallWithDefaultOptionalParametersData, CallWithDefaultParametersData, CallWithDescriptionsData, CallWithDuplicateResponsesData, CallWithDuplicateResponsesErrors, CallWithDuplicateResponsesResponses, CallWithNoContentResponseData, CallWithNoContentResponseResponses, CallWithParametersData, CallWithResponseAndNoContentResponseData, CallWithResponseAndNoContentResponseResponses, CallWithResponseData, CallWithResponseResponses, CallWithResponsesData, CallWithResponsesErrors, CallWithResponsesResponses, CallWithResultFromHeaderData, CallWithResultFromHeaderErrors, CallWithResultFromHeaderResponses, CallWithWeirdParameterNamesData, CollectionFormatData, ComplexParamsData, ComplexParamsResponses, ComplexTypesData, ComplexTypesErrors, ComplexTypesResponses, DeleteCallWithoutParametersAndResponseData, DeleteFooData3, DeprecatedCallData, DummyAData, DummyAResponses, DummyBData, DummyBResponses, DuplicateName2Data, DuplicateName3Data, DuplicateName4Data, DuplicateNameData, ExportData, FileResponseData, FileResponseResponses, FooWowData, FooWowResponses, GetApiVbyApiVersionSimpleOperationData, GetApiVbyApiVersionSimpleOperationErrors, GetApiVbyApiVersionSimpleOperationResponses, GetCallWithOptionalParamData, GetCallWithoutParametersAndResponseData, HeadCallWithoutParametersAndResponseData, ImportData, ImportResponses, MultipartRequestData, MultipartResponseData, MultipartResponseResponses, NonAsciiæøåÆøÅöôêÊ字符串Data, NonAsciiæøåÆøÅöôêÊ字符串Responses, OptionsCallWithoutParametersAndResponseData, PatchApiVbyApiVersionNoTagData, PatchApiVbyApiVersionNoTagResponses, PatchCallWithoutParametersAndResponseData, PostApiVbyApiVersionFormDataData, PostApiVbyApiVersionRequestBodyData, PostCallWithOptionalParamData, PostCallWithOptionalParamResponses, PostCallWithoutParametersAndResponseData, PutCallWithoutParametersAndResponseData, PutWithFormUrlEncodedData, TestErrorCodeData, TestErrorCodeErrors, TestErrorCodeResponses, TypesData, TypesResponses, UploadFileData, UploadFileResponses } from './types.gen.js';\n\nexport type Options<TData extends TDataShape = TDataShape, ThrowOnError extends boolean = boolean> = Options2<TData, ThrowOnError> & {\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\nexport const export_ = <ThrowOnError extends boolean = false>(options?: Options<ExportData, ThrowOnError>) => (options?.client ?? client).get<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/no+tag', ...options });\n\nexport const patchApiVbyApiVersionNoTag = <ThrowOnError extends boolean = false>(options?: Options<PatchApiVbyApiVersionNoTagData, ThrowOnError>) => (options?.client ?? client).patch<PatchApiVbyApiVersionNoTagResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/no+tag', ...options });\n\nexport const import_ = <ThrowOnError extends boolean = false>(options: Options<ImportData, ThrowOnError>) => (options.client ?? client).post<ImportResponses, unknown, ThrowOnError>({\n    url: '/api/v{api-version}/no+tag',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options.headers\n    }\n});\n\nexport const fooWow = <ThrowOnError extends boolean = false>(options?: Options<FooWowData, ThrowOnError>) => (options?.client ?? client).put<FooWowResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/no+tag', ...options });\n\nexport const apiVVersionODataControllerCount = <ThrowOnError extends boolean = false>(options?: Options<ApiVVersionODataControllerCountData, ThrowOnError>) => (options?.client ?? client).get<ApiVVersionODataControllerCountResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple/$count', ...options });\n\nexport const getApiVbyApiVersionSimpleOperation = <ThrowOnError extends boolean = false>(options: Options<GetApiVbyApiVersionSimpleOperationData, ThrowOnError>) => (options.client ?? client).get<GetApiVbyApiVersionSimpleOperationResponses, GetApiVbyApiVersionSimpleOperationErrors, ThrowOnError>({ url: '/api/v{api-version}/simple:operation', ...options });\n\nexport const deleteCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<DeleteCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).delete<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const getCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<GetCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).get<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const headCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<HeadCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).head<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const optionsCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<OptionsCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).options<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const patchCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<PatchCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).patch<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const postCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<PostCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).post<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const putCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<PutCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).put<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const deleteFoo = <ThrowOnError extends boolean = false>(options: Options<DeleteFooData3, ThrowOnError>) => (options.client ?? client).delete<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/foo/{foo_param}/bar/{BarParam}', ...options });\n\nexport const callWithDescriptions = <ThrowOnError extends boolean = false>(options?: Options<CallWithDescriptionsData, ThrowOnError>) => (options?.client ?? client).post<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/descriptions', ...options });\n\n/**\n * @deprecated\n */\nexport const deprecatedCall = <ThrowOnError extends boolean = false>(options: Options<DeprecatedCallData, ThrowOnError>) => (options.client ?? client).post<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/parameters/deprecated', ...options });\n\nexport const callWithParameters = <ThrowOnError extends boolean = false>(options: Options<CallWithParametersData, ThrowOnError>) => (options.client ?? client).post<unknown, unknown, ThrowOnError>({\n    url: '/api/v{api-version}/parameters/{parameterPath}',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options.headers\n    }\n});\n\nexport const callWithWeirdParameterNames = <ThrowOnError extends boolean = false>(options: Options<CallWithWeirdParameterNamesData, ThrowOnError>) => (options.client ?? client).post<unknown, unknown, ThrowOnError>({\n    url: '/api/v{api-version}/parameters/{parameter.path.1}/{parameter-path-2}/{PARAMETER-PATH-3}',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options.headers\n    }\n});\n\nexport const getCallWithOptionalParam = <ThrowOnError extends boolean = false>(options: Options<GetCallWithOptionalParamData, ThrowOnError>) => (options.client ?? client).get<unknown, unknown, ThrowOnError>({\n    url: '/api/v{api-version}/parameters',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options.headers\n    }\n});\n\nexport const postCallWithOptionalParam = <ThrowOnError extends boolean = false>(options: Options<PostCallWithOptionalParamData, ThrowOnError>) => (options.client ?? client).post<PostCallWithOptionalParamResponses, unknown, ThrowOnError>({\n    url: '/api/v{api-version}/parameters',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options.headers\n    }\n});\n\nexport const postApiVbyApiVersionRequestBody = <ThrowOnError extends boolean = false>(options?: Options<PostApiVbyApiVersionRequestBodyData, ThrowOnError>) => (options?.client ?? client).post<unknown, unknown, ThrowOnError>({\n    url: '/api/v{api-version}/requestBody',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options?.headers\n    }\n});\n\nexport const postApiVbyApiVersionFormData = <ThrowOnError extends boolean = false>(options?: Options<PostApiVbyApiVersionFormDataData, ThrowOnError>) => (options?.client ?? client).post<unknown, unknown, ThrowOnError>({\n    ...formDataBodySerializer,\n    url: '/api/v{api-version}/formData',\n    ...options,\n    headers: {\n        'Content-Type': null,\n        ...options?.headers\n    }\n});\n\nexport const callWithDefaultParameters = <ThrowOnError extends boolean = false>(options?: Options<CallWithDefaultParametersData, ThrowOnError>) => (options?.client ?? client).get<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/defaults', ...options });\n\nexport const callWithDefaultOptionalParameters = <ThrowOnError extends boolean = false>(options?: Options<CallWithDefaultOptionalParametersData, ThrowOnError>) => (options?.client ?? client).post<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/defaults', ...options });\n\nexport const callToTestOrderOfParams = <ThrowOnError extends boolean = false>(options: Options<CallToTestOrderOfParamsData, ThrowOnError>) => (options.client ?? client).put<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/defaults', ...options });\n\nexport const duplicateName = <ThrowOnError extends boolean = false>(options?: Options<DuplicateNameData, ThrowOnError>) => (options?.client ?? client).delete<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/duplicate', ...options });\n\nexport const duplicateName2 = <ThrowOnError extends boolean = false>(options?: Options<DuplicateName2Data, ThrowOnError>) => (options?.client ?? client).get<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/duplicate', ...options });\n\nexport const duplicateName3 = <ThrowOnError extends boolean = false>(options?: Options<DuplicateName3Data, ThrowOnError>) => (options?.client ?? client).post<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/duplicate', ...options });\n\nexport const duplicateName4 = <ThrowOnError extends boolean = false>(options?: Options<DuplicateName4Data, ThrowOnError>) => (options?.client ?? client).put<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/duplicate', ...options });\n\nexport const callWithNoContentResponse = <ThrowOnError extends boolean = false>(options?: Options<CallWithNoContentResponseData, ThrowOnError>) => (options?.client ?? client).get<CallWithNoContentResponseResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/no-content', ...options });\n\nexport const callWithResponseAndNoContentResponse = <ThrowOnError extends boolean = false>(options?: Options<CallWithResponseAndNoContentResponseData, ThrowOnError>) => (options?.client ?? client).get<CallWithResponseAndNoContentResponseResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/multiple-tags/response-and-no-content', ...options });\n\nexport const dummyA = <ThrowOnError extends boolean = false>(options?: Options<DummyAData, ThrowOnError>) => (options?.client ?? client).get<DummyAResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/multiple-tags/a', ...options });\n\nexport const dummyB = <ThrowOnError extends boolean = false>(options?: Options<DummyBData, ThrowOnError>) => (options?.client ?? client).get<DummyBResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/multiple-tags/b', ...options });\n\nexport const callWithResponse = <ThrowOnError extends boolean = false>(options?: Options<CallWithResponseData, ThrowOnError>) => (options?.client ?? client).get<CallWithResponseResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/response', ...options });\n\nexport const callWithDuplicateResponses = <ThrowOnError extends boolean = false>(options?: Options<CallWithDuplicateResponsesData, ThrowOnError>) => (options?.client ?? client).post<CallWithDuplicateResponsesResponses, CallWithDuplicateResponsesErrors, ThrowOnError>({ url: '/api/v{api-version}/response', ...options });\n\nexport const callWithResponses = <ThrowOnError extends boolean = false>(options?: Options<CallWithResponsesData, ThrowOnError>) => (options?.client ?? client).put<CallWithResponsesResponses, CallWithResponsesErrors, ThrowOnError>({ url: '/api/v{api-version}/response', ...options });\n\nexport const collectionFormat = <ThrowOnError extends boolean = false>(options: Options<CollectionFormatData, ThrowOnError>) => (options.client ?? client).get<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/collectionFormat', ...options });\n\nexport const types = <ThrowOnError extends boolean = false>(options: Options<TypesData, ThrowOnError>) => (options.client ?? client).get<TypesResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/types', ...options });\n\nexport const uploadFile = <ThrowOnError extends boolean = false>(options: Options<UploadFileData, ThrowOnError>) => (options.client ?? client).post<UploadFileResponses, unknown, ThrowOnError>({\n    ...urlSearchParamsBodySerializer,\n    url: '/api/v{api-version}/upload',\n    ...options,\n    headers: {\n        'Content-Type': 'application/x-www-form-urlencoded',\n        ...options.headers\n    }\n});\n\nexport const fileResponse = <ThrowOnError extends boolean = false>(options: Options<FileResponseData, ThrowOnError>) => (options.client ?? client).get<FileResponseResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/file/{id}', ...options });\n\nexport const complexTypes = <ThrowOnError extends boolean = false>(options: Options<ComplexTypesData, ThrowOnError>) => (options.client ?? client).get<ComplexTypesResponses, ComplexTypesErrors, ThrowOnError>({\n    querySerializer: { parameters: { parameterObject: { object: { style: 'form' } } } },\n    url: '/api/v{api-version}/complex',\n    ...options\n});\n\nexport const multipartResponse = <ThrowOnError extends boolean = false>(options?: Options<MultipartResponseData, ThrowOnError>) => (options?.client ?? client).get<MultipartResponseResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/multipart', ...options });\n\nexport const multipartRequest = <ThrowOnError extends boolean = false>(options?: Options<MultipartRequestData, ThrowOnError>) => (options?.client ?? client).post<unknown, unknown, ThrowOnError>({\n    ...formDataBodySerializer,\n    url: '/api/v{api-version}/multipart',\n    ...options,\n    headers: {\n        'Content-Type': null,\n        ...options?.headers\n    }\n});\n\nexport const complexParams = <ThrowOnError extends boolean = false>(options: Options<ComplexParamsData, ThrowOnError>) => (options.client ?? client).put<ComplexParamsResponses, unknown, ThrowOnError>({\n    url: '/api/v{api-version}/complex/{id}',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json-patch+json',\n        ...options.headers\n    }\n});\n\nexport const callWithResultFromHeader = <ThrowOnError extends boolean = false>(options?: Options<CallWithResultFromHeaderData, ThrowOnError>) => (options?.client ?? client).post<CallWithResultFromHeaderResponses, CallWithResultFromHeaderErrors, ThrowOnError>({ url: '/api/v{api-version}/header', ...options });\n\nexport const testErrorCode = <ThrowOnError extends boolean = false>(options: Options<TestErrorCodeData, ThrowOnError>) => (options.client ?? client).post<TestErrorCodeResponses, TestErrorCodeErrors, ThrowOnError>({ url: '/api/v{api-version}/error', ...options });\n\nexport const nonAsciiæøåÆøÅöôêÊ字符串 = <ThrowOnError extends boolean = false>(options: Options<NonAsciiæøåÆøÅöôêÊ字符串Data, ThrowOnError>) => (options.client ?? client).post<NonAsciiæøåÆøÅöôêÊ字符串Responses, unknown, ThrowOnError>({ url: '/api/v{api-version}/non-ascii-æøåÆØÅöôêÊ字符串', ...options });\n\n/**\n * Login User\n */\nexport const putWithFormUrlEncoded = <ThrowOnError extends boolean = false>(options: Options<PutWithFormUrlEncodedData, ThrowOnError>) => (options.client ?? client).put<unknown, unknown, ThrowOnError>({\n    ...urlSearchParamsBodySerializer,\n    url: '/api/v{api-version}/non-ascii-æøåÆØÅöôêÊ字符串',\n    ...options,\n    headers: {\n        'Content-Type': 'application/x-www-form-urlencoded',\n        ...options.headers\n    }\n});\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-angular/tsconfig-nodenext-sdk/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type ClientOptions = {\n    baseUrl: 'http://localhost:3000/base' | (string & {});\n};\n\n/**\n * Model with number-only name\n */\nexport type _400 = string;\n\n/**\n * External ref to shared model (A)\n */\nexport type ExternalRefA = ExternalSharedModel;\n\n/**\n * External ref to shared model (B)\n */\nexport type ExternalRefB = ExternalSharedModel;\n\n/**\n * Testing multiline comments in string: First line\n * Second line\n *\n * Fourth line\n */\nexport type CamelCaseCommentWithBreaks = number;\n\n/**\n * Testing multiline comments in string: First line\n * Second line\n *\n * Fourth line\n */\nexport type CommentWithBreaks = number;\n\n/**\n * Testing backticks in string: `backticks` and ```multiple backticks``` should work\n */\nexport type CommentWithBackticks = number;\n\n/**\n * Testing backticks and quotes in string: `backticks`, 'quotes', \"double quotes\" and ```multiple backticks``` should work\n */\nexport type CommentWithBackticksAndQuotes = number;\n\n/**\n * Testing slashes in string: \\backwards\\\\\\ and /forwards/// should work\n */\nexport type CommentWithSlashes = number;\n\n/**\n * Testing expression placeholders in string: ${expression} should work\n */\nexport type CommentWithExpressionPlaceholders = number;\n\n/**\n * Testing quotes in string: 'single quote''' and \"double quotes\"\"\" should work\n */\nexport type CommentWithQuotes = number;\n\n/**\n * Testing reserved characters in string: * inline * and ** inline ** should work\n */\nexport type CommentWithReservedCharacters = number;\n\n/**\n * This is a simple number\n */\nexport type SimpleInteger = number;\n\n/**\n * This is a simple boolean\n */\nexport type SimpleBoolean = boolean;\n\n/**\n * This is a simple string\n */\nexport type SimpleString = string;\n\n/**\n * A string with non-ascii (unicode) characters valid in typescript identifiers (æøåÆØÅöÔèÈ字符串)\n */\nexport type NonAsciiStringæøåÆøÅöôêÊ字符串 = string;\n\n/**\n * This is a simple file\n */\nexport type SimpleFile = Blob | File;\n\n/**\n * This is a simple reference\n */\nexport type SimpleReference = ModelWithString;\n\n/**\n * This is a simple string\n */\nexport type SimpleStringWithPattern = string | null;\n\n/**\n * This is a simple enum with strings\n */\nexport type EnumWithStrings = 'Success' | 'Warning' | 'Error' | '\\'Single Quote\\'' | '\"Double Quotes\"' | 'Non-ascii: øæåôöØÆÅÔÖ字符串';\n\nexport type EnumWithReplacedCharacters = '\\'Single Quote\\'' | '\"Double Quotes\"' | 'øæåôöØÆÅÔÖ字符串' | 3.1 | '';\n\n/**\n * This is a simple enum with numbers\n */\nexport type EnumWithNumbers = 1 | 2 | 3 | 1.1 | 1.2 | 1.3 | 100 | 200 | 300 | -100 | -200 | -300 | -1.1 | -1.2 | -1.3;\n\n/**\n * Success=1,Warning=2,Error=3\n */\nexport type EnumFromDescription = number;\n\n/**\n * This is a simple enum with numbers\n */\nexport type EnumWithExtensions = 200 | 400 | 500;\n\nexport type EnumWithXEnumNames = 0 | 1 | 2;\n\n/**\n * This is a simple array with numbers\n */\nexport type ArrayWithNumbers = Array<number>;\n\n/**\n * This is a simple array with booleans\n */\nexport type ArrayWithBooleans = Array<boolean>;\n\n/**\n * This is a simple array with strings\n */\nexport type ArrayWithStrings = Array<string>;\n\n/**\n * This is a simple array with references\n */\nexport type ArrayWithReferences = Array<ModelWithString>;\n\n/**\n * This is a simple array containing an array\n */\nexport type ArrayWithArray = Array<Array<ModelWithString>>;\n\n/**\n * This is a simple array with properties\n */\nexport type ArrayWithProperties = Array<{\n    '16x16'?: CamelCaseCommentWithBreaks;\n    bar?: string;\n}>;\n\n/**\n * This is a simple array with any of properties\n */\nexport type ArrayWithAnyOfProperties = Array<{\n    foo?: string;\n} | {\n    bar?: string;\n}>;\n\nexport type AnyOfAnyAndNull = {\n    data?: unknown | null;\n};\n\n/**\n * This is a simple array with any of properties\n */\nexport type AnyOfArrays = {\n    results?: Array<{\n        foo?: string;\n    } | {\n        bar?: string;\n    }>;\n};\n\n/**\n * This is a string dictionary\n */\nexport type DictionaryWithString = {\n    [key: string]: string;\n};\n\nexport type DictionaryWithPropertiesAndAdditionalProperties = {\n    foo?: number;\n    bar?: boolean;\n    [key: string]: string | number | boolean | undefined;\n};\n\n/**\n * This is a string reference\n */\nexport type DictionaryWithReference = {\n    [key: string]: ModelWithString;\n};\n\n/**\n * This is a complex dictionary\n */\nexport type DictionaryWithArray = {\n    [key: string]: Array<ModelWithString>;\n};\n\n/**\n * This is a string dictionary\n */\nexport type DictionaryWithDictionary = {\n    [key: string]: {\n        [key: string]: string;\n    };\n};\n\n/**\n * This is a complex dictionary\n */\nexport type DictionaryWithProperties = {\n    [key: string]: {\n        foo?: string;\n        bar?: string;\n    };\n};\n\n/**\n * This is a model with one number property\n */\nexport type ModelWithInteger = {\n    /**\n     * This is a simple number property\n     */\n    prop?: number;\n};\n\n/**\n * This is a model with one boolean property\n */\nexport type ModelWithBoolean = {\n    /**\n     * This is a simple boolean property\n     */\n    prop?: boolean;\n};\n\n/**\n * This is a model with one string property\n */\nexport type ModelWithString = {\n    /**\n     * This is a simple string property\n     */\n    prop?: string;\n};\n\n/**\n * This is a model with one string property\n */\nexport type ModelWithStringError = {\n    /**\n     * This is a simple string property\n     */\n    prop?: string;\n};\n\n/**\n * `Comment` or `VoiceComment`. The JSON object for adding voice comments to tickets is different. See [Adding voice comments to tickets](/documentation/ticketing/managing-tickets/adding-voice-comments-to-tickets)\n */\nexport type ModelFromZendesk = string;\n\n/**\n * This is a model with one string property\n */\nexport type ModelWithNullableString = {\n    /**\n     * This is a simple string property\n     */\n    nullableProp1?: string | null;\n    /**\n     * This is a simple string property\n     */\n    nullableRequiredProp1: string | null;\n    /**\n     * This is a simple string property\n     */\n    nullableProp2?: string | null;\n    /**\n     * This is a simple string property\n     */\n    nullableRequiredProp2: string | null;\n    /**\n     * This is a simple enum with strings\n     */\n    'foo_bar-enum'?: 'Success' | 'Warning' | 'Error' | 'ØÆÅ字符串';\n};\n\n/**\n * This is a model with one enum\n */\nexport type ModelWithEnum = {\n    /**\n     * This is a simple enum with strings\n     */\n    'foo_bar-enum'?: 'Success' | 'Warning' | 'Error' | 'ØÆÅ字符串';\n    /**\n     * These are the HTTP error code enums\n     */\n    statusCode?: '100' | '200 FOO' | '300 FOO_BAR' | '400 foo-bar' | '500 foo.bar' | '600 foo&bar';\n    /**\n     * Simple boolean enum\n     */\n    bool?: true;\n};\n\n/**\n * This is a model with one enum with escaped name\n */\nexport type ModelWithEnumWithHyphen = {\n    /**\n     * Foo-Bar-Baz-Qux\n     */\n    'foo-bar-baz-qux'?: '3.0';\n};\n\n/**\n * This is a model with one enum\n */\nexport type ModelWithEnumFromDescription = {\n    /**\n     * Success=1,Warning=2,Error=3\n     */\n    test?: number;\n};\n\n/**\n * This is a model with nested enums\n */\nexport type ModelWithNestedEnums = {\n    dictionaryWithEnum?: {\n        [key: string]: 'Success' | 'Warning' | 'Error';\n    };\n    dictionaryWithEnumFromDescription?: {\n        [key: string]: number;\n    };\n    arrayWithEnum?: Array<'Success' | 'Warning' | 'Error'>;\n    arrayWithDescription?: Array<number>;\n    /**\n     * This is a simple enum with strings\n     */\n    'foo_bar-enum'?: 'Success' | 'Warning' | 'Error' | 'ØÆÅ字符串';\n};\n\n/**\n * This is a model with one property containing a reference\n */\nexport type ModelWithReference = {\n    prop?: ModelWithProperties;\n};\n\n/**\n * This is a model with one property containing an array\n */\nexport type ModelWithArrayReadOnlyAndWriteOnly = {\n    prop?: Array<ModelWithReadOnlyAndWriteOnly>;\n    propWithFile?: Array<Blob | File>;\n    propWithNumber?: Array<number>;\n};\n\n/**\n * This is a model with one property containing an array\n */\nexport type ModelWithArray = {\n    prop?: Array<ModelWithString>;\n    propWithFile?: Array<Blob | File>;\n    propWithNumber?: Array<number>;\n};\n\n/**\n * This is a model with one property containing a dictionary\n */\nexport type ModelWithDictionary = {\n    prop?: {\n        [key: string]: string;\n    };\n};\n\n/**\n * This is a deprecated model with a deprecated property\n *\n * @deprecated\n */\nexport type DeprecatedModel = {\n    /**\n     * This is a deprecated property\n     *\n     * @deprecated\n     */\n    prop?: string;\n};\n\n/**\n * This is a model with one property containing a circular reference\n */\nexport type ModelWithCircularReference = {\n    prop?: ModelWithCircularReference;\n};\n\n/**\n * This is a model with one property with a 'one of' relationship\n */\nexport type CompositionWithOneOf = {\n    propA?: ModelWithString | ModelWithEnum | ModelWithArray | ModelWithDictionary;\n};\n\n/**\n * This is a model with one property with a 'one of' relationship where the options are not $ref\n */\nexport type CompositionWithOneOfAnonymous = {\n    propA?: {\n        propA?: string;\n    } | string | number;\n};\n\n/**\n * Circle\n */\nexport type ModelCircle = {\n    kind: string;\n    radius?: number;\n};\n\n/**\n * Square\n */\nexport type ModelSquare = {\n    kind: string;\n    sideLength?: number;\n};\n\n/**\n * This is a model with one property with a 'one of' relationship where the options are not $ref\n */\nexport type CompositionWithOneOfDiscriminator = ({\n    kind: 'circle';\n} & ModelCircle) | ({\n    kind: 'square';\n} & ModelSquare);\n\n/**\n * This is a model with one property with a 'any of' relationship\n */\nexport type CompositionWithAnyOf = {\n    propA?: ModelWithString | ModelWithEnum | ModelWithArray | ModelWithDictionary;\n};\n\n/**\n * This is a model with one property with a 'any of' relationship where the options are not $ref\n */\nexport type CompositionWithAnyOfAnonymous = {\n    propA?: {\n        propA?: string;\n    } | string | number;\n};\n\n/**\n * This is a model with nested 'any of' property with a type null\n */\nexport type CompositionWithNestedAnyAndTypeNull = {\n    propA?: Array<ModelWithDictionary | null> | Array<ModelWithArray | null>;\n};\n\nexport type _3eNum1Период = 'Bird' | 'Dog';\n\nexport type ConstValue = 'ConstValue';\n\n/**\n * This is a model with one property with a 'any of' relationship where the options are not $ref\n */\nexport type CompositionWithNestedAnyOfAndNull = {\n    /**\n     * Scopes\n     */\n    propA?: Array<_3eNum1Период | ConstValue> | null;\n};\n\n/**\n * This is a model with one property with a 'one of' relationship\n */\nexport type CompositionWithOneOfAndNullable = {\n    propA?: {\n        boolean?: boolean;\n    } | ModelWithEnum | ModelWithArray | ModelWithDictionary | null;\n};\n\n/**\n * This is a model that contains a simple dictionary within composition\n */\nexport type CompositionWithOneOfAndSimpleDictionary = {\n    propA?: boolean | {\n        [key: string]: number;\n    };\n};\n\n/**\n * This is a model that contains a dictionary of simple arrays within composition\n */\nexport type CompositionWithOneOfAndSimpleArrayDictionary = {\n    propA?: boolean | {\n        [key: string]: Array<boolean>;\n    };\n};\n\n/**\n * This is a model that contains a dictionary of complex arrays (composited) within composition\n */\nexport type CompositionWithOneOfAndComplexArrayDictionary = {\n    propA?: boolean | {\n        [key: string]: Array<number | string>;\n    };\n};\n\n/**\n * This is a model with one property with a 'all of' relationship\n */\nexport type CompositionWithAllOfAndNullable = {\n    propA?: ({\n        boolean?: boolean;\n    } & ModelWithEnum & ModelWithArray & ModelWithDictionary) | null;\n};\n\n/**\n * This is a model with one property with a 'any of' relationship\n */\nexport type CompositionWithAnyOfAndNullable = {\n    propA?: {\n        boolean?: boolean;\n    } | ModelWithEnum | ModelWithArray | ModelWithDictionary | null;\n};\n\n/**\n * This is a base model with two simple optional properties\n */\nexport type CompositionBaseModel = {\n    firstName?: string;\n    lastname?: string;\n};\n\n/**\n * This is a model that extends the base model\n */\nexport type CompositionExtendedModel = CompositionBaseModel & {\n    age: number;\n    firstName: string;\n    lastname: string;\n};\n\n/**\n * This is a model with one nested property\n */\nexport type ModelWithProperties = {\n    required: string;\n    readonly requiredAndReadOnly: string;\n    requiredAndNullable: string | null;\n    string?: string;\n    number?: number;\n    boolean?: boolean;\n    reference?: ModelWithString;\n    'property with space'?: string;\n    default?: string;\n    try?: string;\n    readonly '@namespace.string'?: string;\n    readonly '@namespace.integer'?: number;\n};\n\n/**\n * This is a model with one nested property\n */\nexport type ModelWithNestedProperties = {\n    readonly first: {\n        readonly second: {\n            readonly third: string | null;\n        } | null;\n    } | null;\n};\n\n/**\n * This is a model with duplicated properties\n */\nexport type ModelWithDuplicateProperties = {\n    prop?: ModelWithString;\n};\n\n/**\n * This is a model with ordered properties\n */\nexport type ModelWithOrderedProperties = {\n    zebra?: string;\n    apple?: string;\n    hawaii?: string;\n};\n\n/**\n * This is a model with duplicated imports\n */\nexport type ModelWithDuplicateImports = {\n    propA?: ModelWithString;\n    propB?: ModelWithString;\n    propC?: ModelWithString;\n};\n\n/**\n * This is a model that extends another model\n */\nexport type ModelThatExtends = ModelWithString & {\n    propExtendsA?: string;\n    propExtendsB?: ModelWithString;\n};\n\n/**\n * This is a model that extends another model\n */\nexport type ModelThatExtendsExtends = ModelWithString & ModelThatExtends & {\n    propExtendsC?: string;\n    propExtendsD?: ModelWithString;\n};\n\n/**\n * This is a model that contains a some patterns\n */\nexport type ModelWithPattern = {\n    key: string;\n    name: string;\n    readonly enabled?: boolean;\n    readonly modified?: string;\n    id?: string;\n    text?: string;\n    patternWithSingleQuotes?: string;\n    patternWithNewline?: string;\n    patternWithBacktick?: string;\n    patternWithUnicode?: string;\n};\n\nexport type File = {\n    /**\n     * Id\n     */\n    readonly id?: string;\n    /**\n     * Updated at\n     */\n    readonly updated_at?: string;\n    /**\n     * Created at\n     */\n    readonly created_at?: string;\n    /**\n     * Mime\n     */\n    mime: string;\n    /**\n     * File\n     */\n    readonly file?: string;\n};\n\nexport type Default = {\n    name?: string;\n};\n\nexport type Pageable = {\n    page?: number;\n    size?: number;\n    sort?: Array<string>;\n};\n\n/**\n * This is a free-form object without additionalProperties.\n */\nexport type FreeFormObjectWithoutAdditionalProperties = {\n    [key: string]: unknown;\n};\n\n/**\n * This is a free-form object with additionalProperties: true.\n */\nexport type FreeFormObjectWithAdditionalPropertiesEqTrue = {\n    [key: string]: unknown;\n};\n\n/**\n * This is a free-form object with additionalProperties: {}.\n */\nexport type FreeFormObjectWithAdditionalPropertiesEqEmptyObject = {\n    [key: string]: unknown;\n};\n\nexport type ModelWithConst = {\n    String?: 'String';\n    number?: 0;\n    null?: null;\n    withType?: 'Some string';\n};\n\n/**\n * This is a model with one property and additionalProperties: true\n */\nexport type ModelWithAdditionalPropertiesEqTrue = {\n    /**\n     * This is a simple string property\n     */\n    prop?: string;\n    [key: string]: unknown;\n};\n\nexport type NestedAnyOfArraysNullable = {\n    nullableArray?: Array<string | boolean> | null;\n};\n\nexport type CompositionWithOneOfAndProperties = ({\n    foo: SimpleParameter;\n} | {\n    bar: NonAsciiStringæøåÆøÅöôêÊ字符串;\n}) & {\n    baz: number | null;\n    qux: number;\n};\n\n/**\n * An object that can be null\n */\nexport type NullableObject = {\n    foo?: string;\n} | null;\n\n/**\n * Some % character\n */\nexport type CharactersInDescription = string;\n\nexport type ModelWithNullableObject = {\n    data?: NullableObject;\n};\n\n/**\n * An object with additional properties that can be null (anyOf ref + null)\n */\nexport type ModelWithAdditionalPropertiesRef = {\n    [key: string]: NullableObject | null;\n};\n\nexport type ModelWithOneOfEnum = {\n    foo: 'Bar';\n} | {\n    foo: 'Baz';\n} | {\n    foo: 'Qux';\n} | {\n    content: string;\n    foo: 'Quux';\n} | {\n    content: [\n        string,\n        string\n    ];\n    foo: 'Corge';\n};\n\nexport type ModelWithNestedArrayEnumsDataFoo = 'foo' | 'bar';\n\nexport type ModelWithNestedArrayEnumsDataBar = 'baz' | 'qux';\n\nexport type ModelWithNestedArrayEnumsData = {\n    foo?: Array<ModelWithNestedArrayEnumsDataFoo>;\n    bar?: Array<ModelWithNestedArrayEnumsDataBar>;\n};\n\nexport type ModelWithNestedArrayEnums = {\n    array_strings?: Array<string>;\n    data?: ModelWithNestedArrayEnumsData;\n};\n\nexport type ModelWithNestedCompositionEnums = {\n    foo?: ModelWithNestedArrayEnumsDataFoo;\n};\n\nexport type ModelWithReadOnlyAndWriteOnly = {\n    foo: string;\n    readonly bar: string;\n};\n\nexport type ModelWithConstantSizeArray = [\n    number,\n    number\n];\n\nexport type ModelWithAnyOfConstantSizeArray = [\n    number | string,\n    number | string,\n    number | string\n];\n\nexport type ModelWithPrefixItemsConstantSizeArray = [\n    ModelWithInteger,\n    number | string,\n    string\n];\n\nexport type ModelWithAnyOfConstantSizeArrayNullable = [\n    number | null | string,\n    number | null | string,\n    number | null | string\n];\n\nexport type ModelWithAnyOfConstantSizeArrayWithNSizeAndOptions = [\n    number | Import,\n    number | Import\n];\n\nexport type ModelWithAnyOfConstantSizeArrayAndIntersect = [\n    number & string,\n    number & string\n];\n\nexport type ModelWithNumericEnumUnion = {\n    /**\n     * Период\n     */\n    value?: -10 | -1 | 0 | 1 | 3 | 6 | 12;\n};\n\n/**\n * Some description with `back ticks`\n */\nexport type ModelWithBackticksInDescription = {\n    /**\n     * The template `that` should be used for parsing and importing the contents of the CSV file.\n     *\n     * <br/><p>There is one placeholder currently supported:<ul>     <li><b>${x}</b> - refers to the n-th column in the CSV file, e.g. ${1}, ${2}, ...)</li></ul><p>Example of a correct JSON template:</p>\n     * <pre>\n     * [\n     * {\n     * \"resourceType\": \"Asset\",\n     * \"identifier\": {\n     * \"name\": \"${1}\",\n     * \"domain\": {\n     * \"name\": \"${2}\",\n     * \"community\": {\n     * \"name\": \"Some Community\"\n     * }\n     * }\n     * },\n     * \"attributes\" : {\n     * \"00000000-0000-0000-0000-000000003115\" : [ {\n     * \"value\" : \"${3}\"\n     * } ],\n     * \"00000000-0000-0000-0000-000000000222\" : [ {\n     * \"value\" : \"${4}\"\n     * } ]\n     * }\n     * }\n     * ]\n     * </pre>\n     */\n    template?: string;\n};\n\nexport type ModelWithOneOfAndProperties = (SimpleParameter | NonAsciiStringæøåÆøÅöôêÊ字符串) & {\n    baz: number | null;\n    qux: number;\n};\n\n/**\n * Model used to test deduplication strategy (unused)\n */\nexport type ParameterSimpleParameterUnused = string;\n\n/**\n * Model used to test deduplication strategy\n */\nexport type PostServiceWithEmptyTagResponse = string;\n\n/**\n * Model used to test deduplication strategy\n */\nexport type PostServiceWithEmptyTagResponse2 = string;\n\n/**\n * Model used to test deduplication strategy\n */\nexport type DeleteFooData = string;\n\n/**\n * Model used to test deduplication strategy\n */\nexport type DeleteFooData2 = string;\n\n/**\n * Model with restricted keyword name\n */\nexport type Import = string;\n\nexport type SchemaWithFormRestrictedKeys = {\n    description?: string;\n    'x-enum-descriptions'?: string;\n    'x-enum-varnames'?: string;\n    'x-enumNames'?: string;\n    title?: string;\n    object?: {\n        description?: string;\n        'x-enum-descriptions'?: string;\n        'x-enum-varnames'?: string;\n        'x-enumNames'?: string;\n        title?: string;\n    };\n    array?: Array<{\n        description?: string;\n        'x-enum-descriptions'?: string;\n        'x-enum-varnames'?: string;\n        'x-enumNames'?: string;\n        title?: string;\n    }>;\n};\n\n/**\n * This schema was giving PascalCase transformations a hard time\n */\nexport type IoK8sApimachineryPkgApisMetaV1DeleteOptions = {\n    /**\n     * Must be fulfilled before a deletion is carried out. If not possible, a 409 Conflict status will be returned.\n     */\n    preconditions?: IoK8sApimachineryPkgApisMetaV1Preconditions;\n};\n\n/**\n * This schema was giving PascalCase transformations a hard time\n */\nexport type IoK8sApimachineryPkgApisMetaV1Preconditions = {\n    /**\n     * Specifies the target ResourceVersion\n     */\n    resourceVersion?: string;\n    /**\n     * Specifies the target UID.\n     */\n    uid?: string;\n};\n\nexport type AdditionalPropertiesUnknownIssue = {\n    [key: string]: string | number;\n};\n\nexport type AdditionalPropertiesUnknownIssue2 = {\n    [key: string]: string | number;\n};\n\nexport type AdditionalPropertiesUnknownIssue3 = string & {\n    entries: {\n        [key: string]: AdditionalPropertiesUnknownIssue;\n    };\n};\n\nexport type AdditionalPropertiesIntegerIssue = {\n    value: number;\n    [key: string]: number;\n};\n\nexport type OneOfAllOfIssue = ((ConstValue | GenericSchemaDuplicateIssue1SystemBoolean) & _3eNum1Период) | GenericSchemaDuplicateIssue1SystemString;\n\nexport type GenericSchemaDuplicateIssue1SystemBoolean = {\n    item?: boolean;\n    error?: string | null;\n    readonly hasError?: boolean;\n    data?: {\n        [key: string]: never;\n    };\n};\n\nexport type GenericSchemaDuplicateIssue1SystemString = {\n    item?: string | null;\n    error?: string | null;\n    readonly hasError?: boolean;\n};\n\nexport type ExternalSharedModel = {\n    id: string;\n    name?: string;\n};\n\n/**\n * This is a model with one property containing a reference\n */\nexport type ModelWithReferenceWritable = {\n    prop?: ModelWithPropertiesWritable;\n};\n\n/**\n * This is a model with one property containing an array\n */\nexport type ModelWithArrayReadOnlyAndWriteOnlyWritable = {\n    prop?: Array<ModelWithReadOnlyAndWriteOnlyWritable>;\n    propWithFile?: Array<Blob | File>;\n    propWithNumber?: Array<number>;\n};\n\n/**\n * This is a model with one nested property\n */\nexport type ModelWithPropertiesWritable = {\n    required: string;\n    requiredAndNullable: string | null;\n    string?: string;\n    number?: number;\n    boolean?: boolean;\n    reference?: ModelWithString;\n    'property with space'?: string;\n    default?: string;\n    try?: string;\n};\n\n/**\n * This is a model that contains a some patterns\n */\nexport type ModelWithPatternWritable = {\n    key: string;\n    name: string;\n    id?: string;\n    text?: string;\n    patternWithSingleQuotes?: string;\n    patternWithNewline?: string;\n    patternWithBacktick?: string;\n    patternWithUnicode?: string;\n};\n\nexport type FileWritable = {\n    /**\n     * Mime\n     */\n    mime: string;\n};\n\nexport type ModelWithReadOnlyAndWriteOnlyWritable = {\n    foo: string;\n    baz: string;\n};\n\nexport type ModelWithAnyOfConstantSizeArrayWithNSizeAndOptionsWritable = [\n    number | Import,\n    number | Import\n];\n\nexport type AdditionalPropertiesUnknownIssueWritable = {\n    [key: string]: string | number;\n};\n\nexport type OneOfAllOfIssueWritable = ((ConstValue | GenericSchemaDuplicateIssue1SystemBoolean) & _3eNum1Период) | GenericSchemaDuplicateIssue1SystemString;\n\nexport type GenericSchemaDuplicateIssue1SystemBooleanWritable = {\n    item?: boolean;\n    error?: string | null;\n    data?: {\n        [key: string]: never;\n    };\n};\n\nexport type GenericSchemaDuplicateIssue1SystemStringWritable = {\n    item?: string | null;\n    error?: string | null;\n};\n\n/**\n * This is a reusable parameter\n */\nexport type SimpleParameter = string;\n\n/**\n * Parameter with illegal characters\n */\nexport type XFooBar = ModelWithString;\n\n/**\n * A reusable request body\n */\nexport type SimpleRequestBody = ModelWithString;\n\n/**\n * A reusable request body\n */\nexport type SimpleFormData = ModelWithString;\n\nexport type ExportData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no+tag';\n};\n\nexport type PatchApiVbyApiVersionNoTagData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no+tag';\n};\n\nexport type PatchApiVbyApiVersionNoTagResponses = {\n    /**\n     * OK\n     */\n    default: unknown;\n};\n\nexport type ImportData = {\n    body: ModelWithReadOnlyAndWriteOnlyWritable | ModelWithArrayReadOnlyAndWriteOnlyWritable;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no+tag';\n};\n\nexport type ImportResponses = {\n    /**\n     * Success\n     */\n    200: ModelFromZendesk;\n    /**\n     * Default success response\n     */\n    default: ModelWithReadOnlyAndWriteOnly;\n};\n\nexport type ImportResponse = ImportResponses[keyof ImportResponses];\n\nexport type FooWowData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no+tag';\n};\n\nexport type FooWowResponses = {\n    /**\n     * OK\n     */\n    default: unknown;\n};\n\nexport type ApiVVersionODataControllerCountData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple/$count';\n};\n\nexport type ApiVVersionODataControllerCountResponses = {\n    /**\n     * Success\n     */\n    200: ModelFromZendesk;\n};\n\nexport type ApiVVersionODataControllerCountResponse = ApiVVersionODataControllerCountResponses[keyof ApiVVersionODataControllerCountResponses];\n\nexport type GetApiVbyApiVersionSimpleOperationData = {\n    body?: never;\n    path: {\n        /**\n         * foo in method\n         */\n        foo_param: string;\n    };\n    query?: never;\n    url: '/api/v{api-version}/simple:operation';\n};\n\nexport type GetApiVbyApiVersionSimpleOperationErrors = {\n    /**\n     * Default error response\n     */\n    default: ModelWithBoolean;\n};\n\nexport type GetApiVbyApiVersionSimpleOperationError = GetApiVbyApiVersionSimpleOperationErrors[keyof GetApiVbyApiVersionSimpleOperationErrors];\n\nexport type GetApiVbyApiVersionSimpleOperationResponses = {\n    /**\n     * Response is a simple number\n     */\n    200: number;\n};\n\nexport type GetApiVbyApiVersionSimpleOperationResponse = GetApiVbyApiVersionSimpleOperationResponses[keyof GetApiVbyApiVersionSimpleOperationResponses];\n\nexport type DeleteCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type GetCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type HeadCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type OptionsCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type PatchCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type PostCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type PutCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type DeleteFooData3 = {\n    body?: never;\n    headers: {\n        /**\n         * Parameter with illegal characters\n         */\n        'x-Foo-Bar': ModelWithString;\n    };\n    path: {\n        /**\n         * foo in method\n         */\n        foo_param: string;\n        /**\n         * bar in method\n         */\n        BarParam: string;\n    };\n    query?: never;\n    url: '/api/v{api-version}/foo/{foo_param}/bar/{BarParam}';\n};\n\nexport type CallWithDescriptionsData = {\n    body?: never;\n    path?: never;\n    query?: {\n        /**\n         * Testing multiline comments in string: First line\n         * Second line\n         *\n         * Fourth line\n         */\n        parameterWithBreaks?: string;\n        /**\n         * Testing backticks in string: `backticks` and ```multiple backticks``` should work\n         */\n        parameterWithBackticks?: string;\n        /**\n         * Testing slashes in string: \\backwards\\\\\\ and /forwards/// should work\n         */\n        parameterWithSlashes?: string;\n        /**\n         * Testing expression placeholders in string: ${expression} should work\n         */\n        parameterWithExpressionPlaceholders?: string;\n        /**\n         * Testing quotes in string: 'single quote''' and \"double quotes\"\"\" should work\n         */\n        parameterWithQuotes?: string;\n        /**\n         * Testing reserved characters in string: * inline * and ** inline ** should work\n         */\n        parameterWithReservedCharacters?: string;\n    };\n    url: '/api/v{api-version}/descriptions';\n};\n\nexport type DeprecatedCallData = {\n    body?: never;\n    headers: {\n        /**\n         * This parameter is deprecated\n         *\n         * @deprecated\n         */\n        parameter: DeprecatedModel | null;\n    };\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/parameters/deprecated';\n};\n\nexport type CallWithParametersData = {\n    /**\n     * This is the parameter that goes into the body\n     */\n    body: {\n        [key: string]: unknown;\n    } | null;\n    headers: {\n        /**\n         * This is the parameter that goes into the header\n         */\n        parameterHeader: string | null;\n    };\n    path: {\n        /**\n         * This is the parameter that goes into the path\n         */\n        parameterPath: string | null;\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string | null;\n    };\n    query: {\n        foo_ref_enum?: ModelWithNestedArrayEnumsDataFoo;\n        foo_all_of_enum: ModelWithNestedArrayEnumsDataFoo;\n        /**\n         * This is the parameter that goes into the query params\n         */\n        cursor: string | null;\n    };\n    url: '/api/v{api-version}/parameters/{parameterPath}';\n};\n\nexport type CallWithWeirdParameterNamesData = {\n    /**\n     * This is the parameter that goes into the body\n     */\n    body: ModelWithString | null;\n    headers: {\n        /**\n         * This is the parameter that goes into the request header\n         */\n        'parameter.header': string | null;\n    };\n    path: {\n        /**\n         * This is the parameter that goes into the path\n         */\n        'parameter.path.1'?: string;\n        /**\n         * This is the parameter that goes into the path\n         */\n        'parameter-path-2'?: string;\n        /**\n         * This is the parameter that goes into the path\n         */\n        'PARAMETER-PATH-3'?: string;\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string | null;\n    };\n    query: {\n        /**\n         * This is the parameter with a reserved keyword\n         */\n        default?: string;\n        /**\n         * This is the parameter that goes into the request query params\n         */\n        'parameter-query': string | null;\n    };\n    url: '/api/v{api-version}/parameters/{parameter.path.1}/{parameter-path-2}/{PARAMETER-PATH-3}';\n};\n\nexport type GetCallWithOptionalParamData = {\n    /**\n     * This is a required parameter\n     */\n    body: ModelWithOneOfEnum;\n    path?: never;\n    query?: {\n        /**\n         * This is an optional parameter\n         */\n        page?: number;\n    };\n    url: '/api/v{api-version}/parameters';\n};\n\nexport type PostCallWithOptionalParamData = {\n    /**\n     * This is an optional parameter\n     */\n    body?: {\n        offset?: number | null;\n    };\n    path?: never;\n    query: {\n        /**\n         * This is a required parameter\n         */\n        parameter: Pageable;\n    };\n    url: '/api/v{api-version}/parameters';\n};\n\nexport type PostCallWithOptionalParamResponses = {\n    /**\n     * Response is a simple number\n     */\n    200: number;\n    /**\n     * Success\n     */\n    204: void;\n};\n\nexport type PostCallWithOptionalParamResponse = PostCallWithOptionalParamResponses[keyof PostCallWithOptionalParamResponses];\n\nexport type PostApiVbyApiVersionRequestBodyData = {\n    /**\n     * A reusable request body\n     */\n    body?: SimpleRequestBody;\n    path?: never;\n    query?: {\n        /**\n         * This is a reusable parameter\n         */\n        parameter?: string;\n    };\n    url: '/api/v{api-version}/requestBody';\n};\n\nexport type PostApiVbyApiVersionFormDataData = {\n    /**\n     * A reusable request body\n     */\n    body?: SimpleFormData;\n    path?: never;\n    query?: {\n        /**\n         * This is a reusable parameter\n         */\n        parameter?: string;\n    };\n    url: '/api/v{api-version}/formData';\n};\n\nexport type CallWithDefaultParametersData = {\n    body?: never;\n    path?: never;\n    query?: {\n        /**\n         * This is a simple string with default value\n         */\n        parameterString?: string | null;\n        /**\n         * This is a simple number with default value\n         */\n        parameterNumber?: number | null;\n        /**\n         * This is a simple boolean with default value\n         */\n        parameterBoolean?: boolean | null;\n        /**\n         * This is a simple enum with default value\n         */\n        parameterEnum?: 'Success' | 'Warning' | 'Error';\n        /**\n         * This is a simple model with default value\n         */\n        parameterModel?: ModelWithString | null;\n    };\n    url: '/api/v{api-version}/defaults';\n};\n\nexport type CallWithDefaultOptionalParametersData = {\n    body?: never;\n    path?: never;\n    query?: {\n        /**\n         * This is a simple string that is optional with default value\n         */\n        parameterString?: string;\n        /**\n         * This is a simple number that is optional with default value\n         */\n        parameterNumber?: number;\n        /**\n         * This is a simple boolean that is optional with default value\n         */\n        parameterBoolean?: boolean;\n        /**\n         * This is a simple enum that is optional with default value\n         */\n        parameterEnum?: 'Success' | 'Warning' | 'Error';\n        /**\n         * This is a simple model that is optional with default value\n         */\n        parameterModel?: ModelWithString;\n    };\n    url: '/api/v{api-version}/defaults';\n};\n\nexport type CallToTestOrderOfParamsData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * This is a optional string with default\n         */\n        parameterOptionalStringWithDefault?: string;\n        /**\n         * This is a optional string with empty default\n         */\n        parameterOptionalStringWithEmptyDefault?: string;\n        /**\n         * This is a optional string with no default\n         */\n        parameterOptionalStringWithNoDefault?: string;\n        /**\n         * This is a string with default\n         */\n        parameterStringWithDefault: string;\n        /**\n         * This is a string with empty default\n         */\n        parameterStringWithEmptyDefault: string;\n        /**\n         * This is a string with no default\n         */\n        parameterStringWithNoDefault: string;\n        /**\n         * This is a string that can be null with no default\n         */\n        parameterStringNullableWithNoDefault?: string | null;\n        /**\n         * This is a string that can be null with default\n         */\n        parameterStringNullableWithDefault?: string | null;\n    };\n    url: '/api/v{api-version}/defaults';\n};\n\nexport type DuplicateNameData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/duplicate';\n};\n\nexport type DuplicateName2Data = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/duplicate';\n};\n\nexport type DuplicateName3Data = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/duplicate';\n};\n\nexport type DuplicateName4Data = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/duplicate';\n};\n\nexport type CallWithNoContentResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no-content';\n};\n\nexport type CallWithNoContentResponseResponses = {\n    /**\n     * Success\n     */\n    204: void;\n};\n\nexport type CallWithNoContentResponseResponse = CallWithNoContentResponseResponses[keyof CallWithNoContentResponseResponses];\n\nexport type CallWithResponseAndNoContentResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multiple-tags/response-and-no-content';\n};\n\nexport type CallWithResponseAndNoContentResponseResponses = {\n    /**\n     * Response is a simple number\n     */\n    200: number;\n    /**\n     * Success\n     */\n    204: void;\n};\n\nexport type CallWithResponseAndNoContentResponseResponse = CallWithResponseAndNoContentResponseResponses[keyof CallWithResponseAndNoContentResponseResponses];\n\nexport type DummyAData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multiple-tags/a';\n};\n\nexport type DummyAResponses = {\n    200: _400;\n};\n\nexport type DummyAResponse = DummyAResponses[keyof DummyAResponses];\n\nexport type DummyBData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multiple-tags/b';\n};\n\nexport type DummyBResponses = {\n    /**\n     * Success\n     */\n    204: void;\n};\n\nexport type DummyBResponse = DummyBResponses[keyof DummyBResponses];\n\nexport type CallWithResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/response';\n};\n\nexport type CallWithResponseResponses = {\n    default: Import;\n};\n\nexport type CallWithResponseResponse = CallWithResponseResponses[keyof CallWithResponseResponses];\n\nexport type CallWithDuplicateResponsesData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/response';\n};\n\nexport type CallWithDuplicateResponsesErrors = {\n    /**\n     * Message for 500 error\n     */\n    500: ModelWithStringError;\n    /**\n     * Message for 501 error\n     */\n    501: ModelWithStringError;\n    /**\n     * Message for 502 error\n     */\n    502: ModelWithStringError;\n    /**\n     * Message for 4XX errors\n     */\n    '4XX': DictionaryWithArray;\n    /**\n     * Default error response\n     */\n    default: ModelWithBoolean;\n};\n\nexport type CallWithDuplicateResponsesError = CallWithDuplicateResponsesErrors[keyof CallWithDuplicateResponsesErrors];\n\nexport type CallWithDuplicateResponsesResponses = {\n    /**\n     * Message for 200 response\n     */\n    200: ModelWithBoolean & ModelWithInteger;\n    /**\n     * Message for 201 response\n     */\n    201: ModelWithString;\n    /**\n     * Message for 202 response\n     */\n    202: ModelWithString;\n};\n\nexport type CallWithDuplicateResponsesResponse = CallWithDuplicateResponsesResponses[keyof CallWithDuplicateResponsesResponses];\n\nexport type CallWithResponsesData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/response';\n};\n\nexport type CallWithResponsesErrors = {\n    /**\n     * Message for 500 error\n     */\n    500: ModelWithStringError;\n    /**\n     * Message for 501 error\n     */\n    501: ModelWithStringError;\n    /**\n     * Message for 502 error\n     */\n    502: ModelWithStringError;\n    /**\n     * Message for default response\n     */\n    default: ModelWithStringError;\n};\n\nexport type CallWithResponsesError = CallWithResponsesErrors[keyof CallWithResponsesErrors];\n\nexport type CallWithResponsesResponses = {\n    /**\n     * Message for 200 response\n     */\n    200: {\n        readonly '@namespace.string'?: string;\n        readonly '@namespace.integer'?: number;\n        readonly value?: Array<ModelWithString>;\n    };\n    /**\n     * Message for 201 response\n     */\n    201: ModelThatExtends;\n    /**\n     * Message for 202 response\n     */\n    202: ModelThatExtendsExtends;\n};\n\nexport type CallWithResponsesResponse = CallWithResponsesResponses[keyof CallWithResponsesResponses];\n\nexport type CollectionFormatData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * This is an array parameter that is sent as csv format (comma-separated values)\n         */\n        parameterArrayCSV: Array<string> | null;\n        /**\n         * This is an array parameter that is sent as ssv format (space-separated values)\n         */\n        parameterArraySSV: Array<string> | null;\n        /**\n         * This is an array parameter that is sent as tsv format (tab-separated values)\n         */\n        parameterArrayTSV: Array<string> | null;\n        /**\n         * This is an array parameter that is sent as pipes format (pipe-separated values)\n         */\n        parameterArrayPipes: Array<string> | null;\n        /**\n         * This is an array parameter that is sent as multi format (multiple parameter instances)\n         */\n        parameterArrayMulti: Array<string> | null;\n    };\n    url: '/api/v{api-version}/collectionFormat';\n};\n\nexport type TypesData = {\n    body?: never;\n    path?: {\n        /**\n         * This is a number parameter\n         */\n        id?: number;\n    };\n    query: {\n        /**\n         * This is a number parameter\n         */\n        parameterNumber: number;\n        /**\n         * This is a string parameter\n         */\n        parameterString: string | null;\n        /**\n         * This is a boolean parameter\n         */\n        parameterBoolean: boolean | null;\n        /**\n         * This is an object parameter\n         */\n        parameterObject: {\n            [key: string]: unknown;\n        } | null;\n        /**\n         * This is an array parameter\n         */\n        parameterArray: Array<string> | null;\n        /**\n         * This is a dictionary parameter\n         */\n        parameterDictionary: {\n            [key: string]: unknown;\n        } | null;\n        /**\n         * This is an enum parameter\n         */\n        parameterEnum: 'Success' | 'Warning' | 'Error' | null;\n    };\n    url: '/api/v{api-version}/types';\n};\n\nexport type TypesResponses = {\n    /**\n     * Response is a simple number\n     */\n    200: number;\n    /**\n     * Response is a simple string\n     */\n    201: string;\n    /**\n     * Response is a simple boolean\n     */\n    202: boolean;\n    /**\n     * Response is a simple object\n     */\n    203: {\n        [key: string]: unknown;\n    };\n};\n\nexport type TypesResponse = TypesResponses[keyof TypesResponses];\n\nexport type UploadFileData = {\n    body: Blob | File;\n    path: {\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string | null;\n    };\n    query?: never;\n    url: '/api/v{api-version}/upload';\n};\n\nexport type UploadFileResponses = {\n    200: boolean;\n};\n\nexport type UploadFileResponse = UploadFileResponses[keyof UploadFileResponses];\n\nexport type FileResponseData = {\n    body?: never;\n    path: {\n        id: string;\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string;\n    };\n    query?: never;\n    url: '/api/v{api-version}/file/{id}';\n};\n\nexport type FileResponseResponses = {\n    /**\n     * Success\n     */\n    200: Blob | File;\n};\n\nexport type FileResponseResponse = FileResponseResponses[keyof FileResponseResponses];\n\nexport type ComplexTypesData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * Parameter containing object\n         */\n        parameterObject: {\n            first?: {\n                second?: {\n                    third?: string;\n                };\n            };\n        };\n        /**\n         * Parameter containing reference\n         */\n        parameterReference: ModelWithString;\n    };\n    url: '/api/v{api-version}/complex';\n};\n\nexport type ComplexTypesErrors = {\n    /**\n     * 400 `server` error\n     */\n    400: unknown;\n    /**\n     * 500 server error\n     */\n    500: unknown;\n};\n\nexport type ComplexTypesResponses = {\n    /**\n     * Successful response\n     */\n    200: Array<ModelWithString>;\n};\n\nexport type ComplexTypesResponse = ComplexTypesResponses[keyof ComplexTypesResponses];\n\nexport type MultipartResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multipart';\n};\n\nexport type MultipartResponseResponses = {\n    /**\n     * OK\n     */\n    200: {\n        file?: Blob | File;\n        metadata?: {\n            foo?: string;\n            bar?: string;\n        };\n    };\n};\n\nexport type MultipartResponseResponse = MultipartResponseResponses[keyof MultipartResponseResponses];\n\nexport type MultipartRequestData = {\n    body?: {\n        content?: Blob | File;\n        data?: ModelWithString | null;\n    };\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multipart';\n};\n\nexport type ComplexParamsData = {\n    body?: {\n        readonly key: string | null;\n        name: string | null;\n        enabled?: boolean;\n        type: 'Monkey' | 'Horse' | 'Bird';\n        listOfModels?: Array<ModelWithString> | null;\n        listOfStrings?: Array<string> | null;\n        parameters: ModelWithString | ModelWithEnum | ModelWithArray | ModelWithDictionary;\n        readonly user?: {\n            readonly id?: number;\n            readonly name?: string | null;\n        };\n    };\n    path: {\n        id: number;\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string;\n    };\n    query?: never;\n    url: '/api/v{api-version}/complex/{id}';\n};\n\nexport type ComplexParamsResponses = {\n    /**\n     * Success\n     */\n    200: ModelWithString;\n};\n\nexport type ComplexParamsResponse = ComplexParamsResponses[keyof ComplexParamsResponses];\n\nexport type CallWithResultFromHeaderData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/header';\n};\n\nexport type CallWithResultFromHeaderErrors = {\n    /**\n     * 400 server error\n     */\n    400: unknown;\n    /**\n     * 500 server error\n     */\n    500: unknown;\n};\n\nexport type CallWithResultFromHeaderResponses = {\n    /**\n     * Successful response\n     */\n    200: unknown;\n};\n\nexport type TestErrorCodeData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * Status code to return\n         */\n        status: number;\n    };\n    url: '/api/v{api-version}/error';\n};\n\nexport type TestErrorCodeErrors = {\n    /**\n     * Custom message: Internal Server Error\n     */\n    500: unknown;\n    /**\n     * Custom message: Not Implemented\n     */\n    501: unknown;\n    /**\n     * Custom message: Bad Gateway\n     */\n    502: unknown;\n    /**\n     * Custom message: Service Unavailable\n     */\n    503: unknown;\n};\n\nexport type TestErrorCodeResponses = {\n    /**\n     * Custom message: Successful response\n     */\n    200: unknown;\n};\n\nexport type NonAsciiæøåÆøÅöôêÊ字符串Data = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * Dummy input param\n         */\n        nonAsciiParamæøåÆØÅöôêÊ: number;\n    };\n    url: '/api/v{api-version}/non-ascii-æøåÆØÅöôêÊ字符串';\n};\n\nexport type NonAsciiæøåÆøÅöôêÊ字符串Responses = {\n    /**\n     * Successful response\n     */\n    200: Array<NonAsciiStringæøåÆøÅöôêÊ字符串>;\n};\n\nexport type NonAsciiæøåÆøÅöôêÊ字符串Response = NonAsciiæøåÆøÅöôêÊ字符串Responses[keyof NonAsciiæøåÆøÅöôêÊ字符串Responses];\n\nexport type PutWithFormUrlEncodedData = {\n    body: ArrayWithStrings;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/non-ascii-æøåÆØÅöôêÊ字符串';\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-axios/base-url-false/client/client.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { AxiosError, AxiosInstance, RawAxiosRequestHeaders } from 'axios';\nimport axios from 'axios';\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 } from './types.gen';\nimport { buildUrl, createConfig, mergeConfigs, mergeHeaders, setAuthParams } from './utils.gen';\n\nexport const createClient = (config: Config = {}): Client => {\n  let _config = mergeConfigs(createConfig(), config);\n\n  let instance: AxiosInstance;\n\n  if (_config.axios && !('Axios' in _config.axios)) {\n    instance = _config.axios;\n  } else {\n    // eslint-disable-next-line @typescript-eslint/no-unused-vars\n    const { auth, ...configWithoutAuth } = _config;\n    instance = axios.create(configWithoutAuth);\n  }\n\n  const getConfig = (): Config => ({ ..._config });\n\n  const setConfig = (config: Config): Config => {\n    _config = mergeConfigs(_config, config);\n    instance.defaults = {\n      ...instance.defaults,\n      ..._config,\n      // @ts-expect-error\n      headers: mergeHeaders(instance.defaults.headers, _config.headers),\n    };\n    return getConfig();\n  };\n\n  const beforeRequest = async (options: RequestOptions) => {\n    const opts = {\n      ..._config,\n      ...options,\n      axios: options.axios ?? _config.axios ?? instance,\n      headers: mergeHeaders(_config.headers, options.headers),\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.body = opts.bodySerializer(opts.body);\n    }\n\n    const url = buildUrl(opts);\n\n    return { opts, url };\n  };\n\n  // @ts-expect-error\n  const request: Client['request'] = async (options) => {\n    // @ts-expect-error\n    const { opts, url } = await beforeRequest(options);\n    try {\n      // assign Axios here for consistency with fetch\n      const _axios = opts.axios!;\n      // eslint-disable-next-line @typescript-eslint/no-unused-vars\n      const { auth, ...optsWithoutAuth } = opts;\n      const response = await _axios({\n        ...optsWithoutAuth,\n        baseURL: '', // the baseURL is already included in `url`\n        data: getValidRequestBody(opts),\n        headers: opts.headers as RawAxiosRequestHeaders,\n        // let `paramsSerializer()` handle query params if it exists\n        params: opts.paramsSerializer ? opts.query : undefined,\n        url,\n      });\n\n      let { data } = response;\n\n      if (opts.responseType === '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 {\n        ...response,\n        data: data ?? {},\n      };\n    } catch (error) {\n      const e = error as AxiosError;\n      if (opts.throwOnError) {\n        throw e;\n      }\n      // @ts-expect-error\n      e.error = e.response?.data ?? {};\n      return e;\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 Record<string, string>,\n      method,\n      serializedBody: getValidRequestBody(opts) as BodyInit | null | undefined,\n      // @ts-expect-error\n      signal: opts.signal,\n      url,\n    });\n  };\n\n  const _buildUrl: Client['buildUrl'] = (options) =>\n    buildUrl({ axios: instance, ..._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    instance,\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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-axios/base-url-false/client/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type { Auth } from '../core/auth.gen';\nexport type { QuerySerializerOptions } from '../core/bodySerializer.gen';\nexport {\n  formDataBodySerializer,\n  jsonBodySerializer,\n  urlSearchParamsBodySerializer,\n} from '../core/bodySerializer.gen';\nexport { buildClientParams } from '../core/params.gen';\nexport { serializeQueryKeyValue } from '../core/queryKeySerializer.gen';\nexport { createClient } from './client.gen';\nexport type {\n  Client,\n  ClientOptions,\n  Config,\n  CreateClientConfig,\n  Options,\n  RequestOptions,\n  RequestResult,\n  TDataShape,\n} from './types.gen';\nexport { createConfig } from './utils.gen';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-axios/base-url-false/client/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type {\n  AxiosError,\n  AxiosInstance,\n  AxiosRequestHeaders,\n  AxiosResponse,\n  AxiosStatic,\n  CreateAxiosDefaults,\n} from 'axios';\n\nimport type { Auth } from '../core/auth.gen';\nimport type {\n  ServerSentEventsOptions,\n  ServerSentEventsResult,\n} from '../core/serverSentEvents.gen';\nimport type { Client as CoreClient, Config as CoreConfig } from '../core/types.gen';\n\nexport interface Config<T extends ClientOptions = ClientOptions>\n  extends Omit<CreateAxiosDefaults, 'auth' | 'baseURL' | 'headers' | 'method'>, CoreConfig {\n  /**\n   * Axios implementation. You can use this option to provide either an\n   * `AxiosStatic` or an `AxiosInstance`.\n   *\n   * @default axios\n   */\n  axios?: AxiosStatic | AxiosInstance;\n  /**\n   * Base URL for all requests made by this client.\n   */\n  baseURL?: T['baseURL'];\n  /**\n   * An object containing any HTTP headers that you want to pre-populate your\n   * `Headers` object with.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/Headers/Headers#init See more}\n   */\n  headers?:\n    | AxiosRequestHeaders\n    | Record<\n        string,\n        string | number | boolean | (string | number | boolean)[] | null | undefined | unknown\n      >;\n  /**\n   * Throw an error instead of returning it in the response?\n   *\n   * @default false\n   */\n  throwOnError?: T['throwOnError'];\n}\n\nexport interface RequestOptions<\n  TData = unknown,\n  ThrowOnError extends boolean = boolean,\n  Url extends string = string,\n>\n  extends\n    Config<{\n      throwOnError: ThrowOnError;\n    }>,\n    Pick<\n      ServerSentEventsOptions<TData>,\n      | 'onRequest'\n      | 'onSseError'\n      | 'onSseEvent'\n      | 'sseDefaultRetryDelay'\n      | 'sseMaxRetryAttempts'\n      | 'sseMaxRetryDelay'\n    > {\n  /**\n   * Any body that you want to add to your request.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/fetch#body}\n   */\n  body?: unknown;\n  path?: Record<string, unknown>;\n  query?: Record<string, unknown>;\n  /**\n   * Security mechanism(s) to use for the request.\n   */\n  security?: ReadonlyArray<Auth>;\n  url: Url;\n}\n\nexport interface ClientOptions {\n  baseURL?: string;\n  throwOnError?: boolean;\n}\n\nexport type RequestResult<\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = boolean,\n> = ThrowOnError extends true\n  ? Promise<AxiosResponse<TData extends Record<string, unknown> ? TData[keyof TData] : TData>>\n  : Promise<\n      | (AxiosResponse<TData extends Record<string, unknown> ? TData[keyof TData] : TData> & {\n          error: undefined;\n        })\n      | (AxiosError<TError extends Record<string, unknown> ? TError[keyof TError] : TError> & {\n          data: undefined;\n          error: TError extends Record<string, unknown> ? TError[keyof TError] : TError;\n        })\n    >;\n\ntype MethodFn = <TData = unknown, TError = unknown, ThrowOnError extends boolean = false>(\n  options: Omit<RequestOptions<TData, ThrowOnError>, 'method'>,\n) => RequestResult<TData, TError, ThrowOnError>;\n\ntype SseFn = <TData = unknown, TError = unknown, ThrowOnError extends boolean = false>(\n  options: Omit<RequestOptions<TData, ThrowOnError>, 'method'>,\n) => Promise<ServerSentEventsResult<TData, TError>>;\n\ntype RequestFn = <TData = unknown, TError = unknown, ThrowOnError extends boolean = false>(\n  options: Omit<RequestOptions<TData, ThrowOnError>, 'method'> &\n    Pick<Required<RequestOptions<TData, ThrowOnError>>, 'method'>,\n) => RequestResult<TData, TError, ThrowOnError>;\n\ntype BuildUrlFn = <\n  TData extends {\n    body?: unknown;\n    path?: Record<string, unknown>;\n    query?: Record<string, unknown>;\n    url: string;\n  },\n>(\n  options: TData & Options<TData>,\n) => string;\n\nexport type Client = CoreClient<RequestFn, Config, MethodFn, BuildUrlFn, SseFn> & {\n  instance: AxiosInstance;\n};\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 = ClientOptions> = (\n  override?: Config<ClientOptions & T>,\n) => Config<Required<ClientOptions> & T>;\n\nexport interface TDataShape {\n  body?: unknown;\n  headers?: unknown;\n  path?: unknown;\n  query?: unknown;\n  url: string;\n}\n\ntype OmitKeys<T, K> = Pick<T, Exclude<keyof T, K>>;\n\nexport type Options<\n  TData extends TDataShape = TDataShape,\n  ThrowOnError extends boolean = boolean,\n  TResponse = unknown,\n> = OmitKeys<RequestOptions<TResponse, ThrowOnError>, 'body' | 'path' | 'query' | 'url'> &\n  ([TData] extends [never] ? unknown : Omit<TData, 'url'>);\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-axios/base-url-false/client/utils.gen.ts",
    "content": "// 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 {\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\nconst checkForExistence = (\n  options: Pick<RequestOptions, 'auth' | 'query'> & {\n    headers: Record<any, unknown>;\n  },\n  name?: string,\n): boolean => {\n  if (!name) {\n    return false;\n  }\n  if (name in options.headers || options.query?.[name]) {\n    return true;\n  }\n  if (\n    'Cookie' in options.headers &&\n    options.headers['Cookie'] &&\n    typeof options.headers['Cookie'] === 'string'\n  ) {\n    return options.headers['Cookie'].includes(`${name}=`);\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: Record<any, unknown>;\n  }) => {\n  for (const auth of security) {\n    if (checkForExistence(options, auth.name)) {\n      continue;\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        const value = `${name}=${token}`;\n        if ('Cookie' in options.headers && options.headers['Cookie']) {\n          options.headers['Cookie'] = `${options.headers['Cookie']}; ${value}`;\n        } else {\n          options.headers['Cookie'] = value;\n        }\n        break;\n      }\n      case 'header':\n      default:\n        options.headers[name] = token;\n        break;\n    }\n  }\n};\n\nexport const buildUrl: Client['buildUrl'] = (options) => {\n  const instanceBaseUrl = options.axios?.defaults?.baseURL;\n\n  const baseUrl =\n    !!options.baseURL && typeof options.baseURL === 'string' ? options.baseURL : instanceBaseUrl;\n\n  return getUrl({\n    baseUrl: baseUrl as string,\n    path: options.path,\n    // let `paramsSerializer()` handle query params if it exists\n    query: !options.paramsSerializer ? options.query : undefined,\n    querySerializer:\n      typeof options.querySerializer === 'function'\n        ? options.querySerializer\n        : createQuerySerializer(options.querySerializer),\n    url: options.url,\n  });\n};\n\nexport const mergeConfigs = (a: Config, b: Config): Config => {\n  const config = { ...a, ...b };\n  config.headers = mergeHeaders(a.headers, b.headers);\n  return config;\n};\n\n/**\n * Special Axios headers keywords allowing to set headers by request method.\n */\nexport const axiosHeadersKeywords = [\n  'common',\n  'delete',\n  'get',\n  'head',\n  'patch',\n  'post',\n  'put',\n] as const;\n\nexport const mergeHeaders = (\n  ...headers: Array<Required<Config>['headers'] | undefined>\n): Record<any, unknown> => {\n  const mergedHeaders: Record<any, unknown> = {};\n  for (const header of headers) {\n    if (!header || typeof header !== 'object') {\n      continue;\n    }\n\n    const iterator = Object.entries(header);\n\n    for (const [key, value] of iterator) {\n      if (\n        axiosHeadersKeywords.includes(key as (typeof axiosHeadersKeywords)[number]) &&\n        typeof value === 'object'\n      ) {\n        mergedHeaders[key] = {\n          ...(mergedHeaders[key] as Record<any, unknown>),\n          ...value,\n        };\n      } else if (value === null) {\n        delete mergedHeaders[key];\n      } else if (Array.isArray(value)) {\n        for (const v of value) {\n          // @ts-expect-error\n          mergedHeaders[key] = [...(mergedHeaders[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[key] = typeof value === 'object' ? JSON.stringify(value) : (value as string);\n      }\n    }\n  }\n  return mergedHeaders;\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  ...override,\n});\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-axios/base-url-false/client.gen.ts",
    "content": "// 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>());\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-axios/base-url-false/core/auth.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-axios/base-url-false/core/bodySerializer.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-axios/base-url-false/core/params.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-axios/base-url-false/core/pathSerializer.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-axios/base-url-false/core/queryKeySerializer.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\n/**\n * JSON-friendly union that mirrors what Pinia Colada can hash.\n */\nexport type JsonValue =\n  | null\n  | string\n  | number\n  | boolean\n  | JsonValue[]\n  | { [key: string]: JsonValue };\n\n/**\n * Replacer that converts non-JSON values (bigint, Date, etc.) to safe substitutes.\n */\nexport const queryKeyJsonReplacer = (_key: string, value: unknown) => {\n  if (value === undefined || typeof value === 'function' || typeof value === 'symbol') {\n    return undefined;\n  }\n  if (typeof value === 'bigint') {\n    return value.toString();\n  }\n  if (value instanceof Date) {\n    return value.toISOString();\n  }\n  return value;\n};\n\n/**\n * Safely stringifies a value and parses it back into a JsonValue.\n */\nexport const stringifyToJsonValue = (input: unknown): JsonValue | undefined => {\n  try {\n    const json = JSON.stringify(input, queryKeyJsonReplacer);\n    if (json === undefined) {\n      return undefined;\n    }\n    return JSON.parse(json) as JsonValue;\n  } catch {\n    return undefined;\n  }\n};\n\n/**\n * Detects plain objects (including objects with a null prototype).\n */\nconst isPlainObject = (value: unknown): value is Record<string, unknown> => {\n  if (value === null || typeof value !== 'object') {\n    return false;\n  }\n  const prototype = Object.getPrototypeOf(value as object);\n  return prototype === Object.prototype || prototype === null;\n};\n\n/**\n * Turns URLSearchParams into a sorted JSON object for deterministic keys.\n */\nconst serializeSearchParams = (params: URLSearchParams): JsonValue => {\n  const entries = Array.from(params.entries()).sort(([a], [b]) => a.localeCompare(b));\n  const result: Record<string, JsonValue> = {};\n\n  for (const [key, value] of entries) {\n    const existing = result[key];\n    if (existing === undefined) {\n      result[key] = value;\n      continue;\n    }\n\n    if (Array.isArray(existing)) {\n      (existing as string[]).push(value);\n    } else {\n      result[key] = [existing, value];\n    }\n  }\n\n  return result;\n};\n\n/**\n * Normalizes any accepted value into a JSON-friendly shape for query keys.\n */\nexport const serializeQueryKeyValue = (value: unknown): JsonValue | undefined => {\n  if (value === null) {\n    return null;\n  }\n\n  if (typeof value === 'string' || typeof value === 'number' || typeof value === 'boolean') {\n    return value;\n  }\n\n  if (value === undefined || typeof value === 'function' || typeof value === 'symbol') {\n    return undefined;\n  }\n\n  if (typeof value === 'bigint') {\n    return value.toString();\n  }\n\n  if (value instanceof Date) {\n    return value.toISOString();\n  }\n\n  if (Array.isArray(value)) {\n    return stringifyToJsonValue(value);\n  }\n\n  if (typeof URLSearchParams !== 'undefined' && value instanceof URLSearchParams) {\n    return serializeSearchParams(value);\n  }\n\n  if (isPlainObject(value)) {\n    return stringifyToJsonValue(value);\n  }\n\n  return undefined;\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-axios/base-url-false/core/serverSentEvents.gen.ts",
    "content": "// 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 const 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            // Normalize line endings: CRLF -> LF, then CR -> LF\n            buffer = buffer.replace(/\\r\\n/g, '\\n').replace(/\\r/g, '\\n');\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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-axios/base-url-false/core/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { Auth, AuthToken } from './auth.gen';\nimport type { BodySerializer, QuerySerializer, QuerySerializerOptions } from './bodySerializer.gen';\n\nexport type HttpMethod =\n  | 'connect'\n  | 'delete'\n  | 'get'\n  | 'head'\n  | 'options'\n  | 'patch'\n  | 'post'\n  | 'put'\n  | 'trace';\n\nexport type Client<\n  RequestFn = never,\n  Config = unknown,\n  MethodFn = never,\n  BuildUrlFn = never,\n  SseFn = never,\n> = {\n  /**\n   * Returns the final request URL.\n   */\n  buildUrl: BuildUrlFn;\n  getConfig: () => Config;\n  request: RequestFn;\n  setConfig: (config: Config) => Config;\n} & {\n  [K in HttpMethod]: MethodFn;\n} & ([SseFn] extends [never] ? { sse?: never } : { sse: { [K in HttpMethod]: SseFn } });\n\nexport interface Config {\n  /**\n   * Auth token or a function returning auth token. The resolved value will be\n   * added to the request payload as defined by its `security` array.\n   */\n  auth?: ((auth: Auth) => Promise<AuthToken> | AuthToken) | AuthToken;\n  /**\n   * A function for serializing request body parameter. By default,\n   * {@link JSON.stringify()} will be used.\n   */\n  bodySerializer?: BodySerializer | null;\n  /**\n   * An object containing any HTTP headers that you want to pre-populate your\n   * `Headers` object with.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/Headers/Headers#init See more}\n   */\n  headers?:\n    | RequestInit['headers']\n    | Record<\n        string,\n        string | number | boolean | (string | number | boolean)[] | null | undefined | unknown\n      >;\n  /**\n   * The request method.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/fetch#method See more}\n   */\n  method?: Uppercase<HttpMethod>;\n  /**\n   * A function for serializing request query parameters. By default, arrays\n   * will be exploded in form style, objects will be exploded in deepObject\n   * style, and reserved characters are percent-encoded.\n   *\n   * This method will have no effect if the native `paramsSerializer()` Axios\n   * API function is used.\n   *\n   * {@link https://swagger.io/docs/specification/serialization/#query View examples}\n   */\n  querySerializer?: QuerySerializer | QuerySerializerOptions;\n  /**\n   * A function validating request data. This is useful if you want to ensure\n   * the request conforms to the desired shape, so it can be safely sent to\n   * the server.\n   */\n  requestValidator?: (data: unknown) => Promise<unknown>;\n  /**\n   * A function transforming response data before it's returned. This is useful\n   * for post-processing data, e.g. converting ISO strings into Date objects.\n   */\n  responseTransformer?: (data: unknown) => Promise<unknown>;\n  /**\n   * A function validating response data. This is useful if you want to ensure\n   * the response conforms to the desired shape, so it can be safely passed to\n   * the transformers and returned to the user.\n   */\n  responseValidator?: (data: unknown) => Promise<unknown>;\n}\n\ntype IsExactlyNeverOrNeverUndefined<T> = [T] extends [never]\n  ? true\n  : [T] extends [never | undefined]\n    ? [undefined] extends [T]\n      ? false\n      : true\n    : false;\n\nexport type OmitNever<T extends Record<string, unknown>> = {\n  [K in keyof T as IsExactlyNeverOrNeverUndefined<T[K]> extends true ? never : K]: T[K];\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-axios/base-url-false/core/utils.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-axios/base-url-false/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type { _3eNum1Период, _400, AdditionalPropertiesIntegerIssue, AdditionalPropertiesUnknownIssue, AdditionalPropertiesUnknownIssue2, AdditionalPropertiesUnknownIssue3, AdditionalPropertiesUnknownIssueWritable, AnyOfAnyAndNull, AnyOfArrays, ApiVVersionODataControllerCountData, ApiVVersionODataControllerCountResponse, ApiVVersionODataControllerCountResponses, ArrayWithAnyOfProperties, ArrayWithArray, ArrayWithBooleans, ArrayWithNumbers, ArrayWithProperties, ArrayWithReferences, ArrayWithStrings, CallToTestOrderOfParamsData, CallWithDefaultOptionalParametersData, CallWithDefaultParametersData, CallWithDescriptionsData, CallWithDuplicateResponsesData, CallWithDuplicateResponsesError, CallWithDuplicateResponsesErrors, CallWithDuplicateResponsesResponse, CallWithDuplicateResponsesResponses, CallWithNoContentResponseData, CallWithNoContentResponseResponse, CallWithNoContentResponseResponses, CallWithParametersData, CallWithResponseAndNoContentResponseData, CallWithResponseAndNoContentResponseResponse, CallWithResponseAndNoContentResponseResponses, CallWithResponseData, CallWithResponseResponse, CallWithResponseResponses, CallWithResponsesData, CallWithResponsesError, CallWithResponsesErrors, CallWithResponsesResponse, CallWithResponsesResponses, CallWithResultFromHeaderData, CallWithResultFromHeaderErrors, CallWithResultFromHeaderResponses, CallWithWeirdParameterNamesData, CamelCaseCommentWithBreaks, CharactersInDescription, ClientOptions, CollectionFormatData, CommentWithBackticks, CommentWithBackticksAndQuotes, CommentWithBreaks, CommentWithExpressionPlaceholders, CommentWithQuotes, CommentWithReservedCharacters, CommentWithSlashes, ComplexParamsData, ComplexParamsResponse, ComplexParamsResponses, ComplexTypesData, ComplexTypesErrors, ComplexTypesResponse, ComplexTypesResponses, CompositionBaseModel, CompositionExtendedModel, CompositionWithAllOfAndNullable, CompositionWithAnyOf, CompositionWithAnyOfAndNullable, CompositionWithAnyOfAnonymous, CompositionWithNestedAnyAndTypeNull, CompositionWithNestedAnyOfAndNull, CompositionWithOneOf, CompositionWithOneOfAndComplexArrayDictionary, CompositionWithOneOfAndNullable, CompositionWithOneOfAndProperties, CompositionWithOneOfAndSimpleArrayDictionary, CompositionWithOneOfAndSimpleDictionary, CompositionWithOneOfAnonymous, CompositionWithOneOfDiscriminator, ConstValue, Default, DeleteCallWithoutParametersAndResponseData, DeleteFooData, DeleteFooData2, DeleteFooData3, DeprecatedCallData, DeprecatedModel, DictionaryWithArray, DictionaryWithDictionary, DictionaryWithProperties, DictionaryWithPropertiesAndAdditionalProperties, DictionaryWithReference, DictionaryWithString, DummyAData, DummyAResponse, DummyAResponses, DummyBData, DummyBResponse, DummyBResponses, DuplicateName2Data, DuplicateName3Data, DuplicateName4Data, DuplicateNameData, EnumFromDescription, EnumWithExtensions, EnumWithNumbers, EnumWithReplacedCharacters, EnumWithStrings, EnumWithXEnumNames, ExportData, ExternalRefA, ExternalRefB, ExternalSharedModel, File, FileResponseData, FileResponseResponse, FileResponseResponses, FileWritable, FooWowData, FooWowResponses, FreeFormObjectWithAdditionalPropertiesEqEmptyObject, FreeFormObjectWithAdditionalPropertiesEqTrue, FreeFormObjectWithoutAdditionalProperties, GenericSchemaDuplicateIssue1SystemBoolean, GenericSchemaDuplicateIssue1SystemBooleanWritable, GenericSchemaDuplicateIssue1SystemString, GenericSchemaDuplicateIssue1SystemStringWritable, GetApiVbyApiVersionSimpleOperationData, GetApiVbyApiVersionSimpleOperationError, GetApiVbyApiVersionSimpleOperationErrors, GetApiVbyApiVersionSimpleOperationResponse, GetApiVbyApiVersionSimpleOperationResponses, GetCallWithOptionalParamData, GetCallWithoutParametersAndResponseData, HeadCallWithoutParametersAndResponseData, Import, ImportData, ImportResponse, ImportResponses, IoK8sApimachineryPkgApisMetaV1DeleteOptions, IoK8sApimachineryPkgApisMetaV1Preconditions, ModelCircle, ModelFromZendesk, ModelSquare, ModelThatExtends, ModelThatExtendsExtends, ModelWithAdditionalPropertiesEqTrue, ModelWithAdditionalPropertiesRef, ModelWithAnyOfConstantSizeArray, ModelWithAnyOfConstantSizeArrayAndIntersect, ModelWithAnyOfConstantSizeArrayNullable, ModelWithAnyOfConstantSizeArrayWithNSizeAndOptions, ModelWithAnyOfConstantSizeArrayWithNSizeAndOptionsWritable, ModelWithArray, ModelWithArrayReadOnlyAndWriteOnly, ModelWithArrayReadOnlyAndWriteOnlyWritable, ModelWithBackticksInDescription, ModelWithBoolean, ModelWithCircularReference, ModelWithConst, ModelWithConstantSizeArray, ModelWithDictionary, ModelWithDuplicateImports, ModelWithDuplicateProperties, ModelWithEnum, ModelWithEnumFromDescription, ModelWithEnumWithHyphen, ModelWithInteger, ModelWithNestedArrayEnums, ModelWithNestedArrayEnumsData, ModelWithNestedArrayEnumsDataBar, ModelWithNestedArrayEnumsDataFoo, ModelWithNestedCompositionEnums, ModelWithNestedEnums, ModelWithNestedProperties, ModelWithNullableObject, ModelWithNullableString, ModelWithNumericEnumUnion, ModelWithOneOfAndProperties, ModelWithOneOfEnum, ModelWithOrderedProperties, ModelWithPattern, ModelWithPatternWritable, ModelWithPrefixItemsConstantSizeArray, ModelWithProperties, ModelWithPropertiesWritable, ModelWithReadOnlyAndWriteOnly, ModelWithReadOnlyAndWriteOnlyWritable, ModelWithReference, ModelWithReferenceWritable, ModelWithString, ModelWithStringError, MultipartRequestData, MultipartResponseData, MultipartResponseResponse, MultipartResponseResponses, NestedAnyOfArraysNullable, NonAsciiæøåÆøÅöôêÊ字符串Data, NonAsciiæøåÆøÅöôêÊ字符串Response, NonAsciiæøåÆøÅöôêÊ字符串Responses, NonAsciiStringæøåÆøÅöôêÊ字符串, NullableObject, OneOfAllOfIssue, OneOfAllOfIssueWritable, OptionsCallWithoutParametersAndResponseData, Pageable, ParameterSimpleParameterUnused, PatchApiVbyApiVersionNoTagData, PatchApiVbyApiVersionNoTagResponses, PatchCallWithoutParametersAndResponseData, PostApiVbyApiVersionFormDataData, PostApiVbyApiVersionRequestBodyData, PostCallWithOptionalParamData, PostCallWithOptionalParamResponse, PostCallWithOptionalParamResponses, PostCallWithoutParametersAndResponseData, PostServiceWithEmptyTagResponse, PostServiceWithEmptyTagResponse2, PutCallWithoutParametersAndResponseData, PutWithFormUrlEncodedData, SchemaWithFormRestrictedKeys, SimpleBoolean, SimpleFile, SimpleFormData, SimpleInteger, SimpleParameter, SimpleReference, SimpleRequestBody, SimpleString, SimpleStringWithPattern, TestErrorCodeData, TestErrorCodeErrors, TestErrorCodeResponses, TypesData, TypesResponse, TypesResponses, UploadFileData, UploadFileResponse, UploadFileResponses, XFooBar } from './types.gen';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-axios/base-url-false/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type ClientOptions = {\n    baseURL: 'http://localhost:3000/base' | (string & {});\n};\n\n/**\n * Model with number-only name\n */\nexport type _400 = string;\n\n/**\n * External ref to shared model (A)\n */\nexport type ExternalRefA = ExternalSharedModel;\n\n/**\n * External ref to shared model (B)\n */\nexport type ExternalRefB = ExternalSharedModel;\n\n/**\n * Testing multiline comments in string: First line\n * Second line\n *\n * Fourth line\n */\nexport type CamelCaseCommentWithBreaks = number;\n\n/**\n * Testing multiline comments in string: First line\n * Second line\n *\n * Fourth line\n */\nexport type CommentWithBreaks = number;\n\n/**\n * Testing backticks in string: `backticks` and ```multiple backticks``` should work\n */\nexport type CommentWithBackticks = number;\n\n/**\n * Testing backticks and quotes in string: `backticks`, 'quotes', \"double quotes\" and ```multiple backticks``` should work\n */\nexport type CommentWithBackticksAndQuotes = number;\n\n/**\n * Testing slashes in string: \\backwards\\\\\\ and /forwards/// should work\n */\nexport type CommentWithSlashes = number;\n\n/**\n * Testing expression placeholders in string: ${expression} should work\n */\nexport type CommentWithExpressionPlaceholders = number;\n\n/**\n * Testing quotes in string: 'single quote''' and \"double quotes\"\"\" should work\n */\nexport type CommentWithQuotes = number;\n\n/**\n * Testing reserved characters in string: * inline * and ** inline ** should work\n */\nexport type CommentWithReservedCharacters = number;\n\n/**\n * This is a simple number\n */\nexport type SimpleInteger = number;\n\n/**\n * This is a simple boolean\n */\nexport type SimpleBoolean = boolean;\n\n/**\n * This is a simple string\n */\nexport type SimpleString = string;\n\n/**\n * A string with non-ascii (unicode) characters valid in typescript identifiers (æøåÆØÅöÔèÈ字符串)\n */\nexport type NonAsciiStringæøåÆøÅöôêÊ字符串 = string;\n\n/**\n * This is a simple file\n */\nexport type SimpleFile = Blob | File;\n\n/**\n * This is a simple reference\n */\nexport type SimpleReference = ModelWithString;\n\n/**\n * This is a simple string\n */\nexport type SimpleStringWithPattern = string | null;\n\n/**\n * This is a simple enum with strings\n */\nexport type EnumWithStrings = 'Success' | 'Warning' | 'Error' | '\\'Single Quote\\'' | '\"Double Quotes\"' | 'Non-ascii: øæåôöØÆÅÔÖ字符串';\n\nexport type EnumWithReplacedCharacters = '\\'Single Quote\\'' | '\"Double Quotes\"' | 'øæåôöØÆÅÔÖ字符串' | 3.1 | '';\n\n/**\n * This is a simple enum with numbers\n */\nexport type EnumWithNumbers = 1 | 2 | 3 | 1.1 | 1.2 | 1.3 | 100 | 200 | 300 | -100 | -200 | -300 | -1.1 | -1.2 | -1.3;\n\n/**\n * Success=1,Warning=2,Error=3\n */\nexport type EnumFromDescription = number;\n\n/**\n * This is a simple enum with numbers\n */\nexport type EnumWithExtensions = 200 | 400 | 500;\n\nexport type EnumWithXEnumNames = 0 | 1 | 2;\n\n/**\n * This is a simple array with numbers\n */\nexport type ArrayWithNumbers = Array<number>;\n\n/**\n * This is a simple array with booleans\n */\nexport type ArrayWithBooleans = Array<boolean>;\n\n/**\n * This is a simple array with strings\n */\nexport type ArrayWithStrings = Array<string>;\n\n/**\n * This is a simple array with references\n */\nexport type ArrayWithReferences = Array<ModelWithString>;\n\n/**\n * This is a simple array containing an array\n */\nexport type ArrayWithArray = Array<Array<ModelWithString>>;\n\n/**\n * This is a simple array with properties\n */\nexport type ArrayWithProperties = Array<{\n    '16x16'?: CamelCaseCommentWithBreaks;\n    bar?: string;\n}>;\n\n/**\n * This is a simple array with any of properties\n */\nexport type ArrayWithAnyOfProperties = Array<{\n    foo?: string;\n} | {\n    bar?: string;\n}>;\n\nexport type AnyOfAnyAndNull = {\n    data?: unknown | null;\n};\n\n/**\n * This is a simple array with any of properties\n */\nexport type AnyOfArrays = {\n    results?: Array<{\n        foo?: string;\n    } | {\n        bar?: string;\n    }>;\n};\n\n/**\n * This is a string dictionary\n */\nexport type DictionaryWithString = {\n    [key: string]: string;\n};\n\nexport type DictionaryWithPropertiesAndAdditionalProperties = {\n    foo?: number;\n    bar?: boolean;\n    [key: string]: string | number | boolean | undefined;\n};\n\n/**\n * This is a string reference\n */\nexport type DictionaryWithReference = {\n    [key: string]: ModelWithString;\n};\n\n/**\n * This is a complex dictionary\n */\nexport type DictionaryWithArray = {\n    [key: string]: Array<ModelWithString>;\n};\n\n/**\n * This is a string dictionary\n */\nexport type DictionaryWithDictionary = {\n    [key: string]: {\n        [key: string]: string;\n    };\n};\n\n/**\n * This is a complex dictionary\n */\nexport type DictionaryWithProperties = {\n    [key: string]: {\n        foo?: string;\n        bar?: string;\n    };\n};\n\n/**\n * This is a model with one number property\n */\nexport type ModelWithInteger = {\n    /**\n     * This is a simple number property\n     */\n    prop?: number;\n};\n\n/**\n * This is a model with one boolean property\n */\nexport type ModelWithBoolean = {\n    /**\n     * This is a simple boolean property\n     */\n    prop?: boolean;\n};\n\n/**\n * This is a model with one string property\n */\nexport type ModelWithString = {\n    /**\n     * This is a simple string property\n     */\n    prop?: string;\n};\n\n/**\n * This is a model with one string property\n */\nexport type ModelWithStringError = {\n    /**\n     * This is a simple string property\n     */\n    prop?: string;\n};\n\n/**\n * `Comment` or `VoiceComment`. The JSON object for adding voice comments to tickets is different. See [Adding voice comments to tickets](/documentation/ticketing/managing-tickets/adding-voice-comments-to-tickets)\n */\nexport type ModelFromZendesk = string;\n\n/**\n * This is a model with one string property\n */\nexport type ModelWithNullableString = {\n    /**\n     * This is a simple string property\n     */\n    nullableProp1?: string | null;\n    /**\n     * This is a simple string property\n     */\n    nullableRequiredProp1: string | null;\n    /**\n     * This is a simple string property\n     */\n    nullableProp2?: string | null;\n    /**\n     * This is a simple string property\n     */\n    nullableRequiredProp2: string | null;\n    /**\n     * This is a simple enum with strings\n     */\n    'foo_bar-enum'?: 'Success' | 'Warning' | 'Error' | 'ØÆÅ字符串';\n};\n\n/**\n * This is a model with one enum\n */\nexport type ModelWithEnum = {\n    /**\n     * This is a simple enum with strings\n     */\n    'foo_bar-enum'?: 'Success' | 'Warning' | 'Error' | 'ØÆÅ字符串';\n    /**\n     * These are the HTTP error code enums\n     */\n    statusCode?: '100' | '200 FOO' | '300 FOO_BAR' | '400 foo-bar' | '500 foo.bar' | '600 foo&bar';\n    /**\n     * Simple boolean enum\n     */\n    bool?: true;\n};\n\n/**\n * This is a model with one enum with escaped name\n */\nexport type ModelWithEnumWithHyphen = {\n    /**\n     * Foo-Bar-Baz-Qux\n     */\n    'foo-bar-baz-qux'?: '3.0';\n};\n\n/**\n * This is a model with one enum\n */\nexport type ModelWithEnumFromDescription = {\n    /**\n     * Success=1,Warning=2,Error=3\n     */\n    test?: number;\n};\n\n/**\n * This is a model with nested enums\n */\nexport type ModelWithNestedEnums = {\n    dictionaryWithEnum?: {\n        [key: string]: 'Success' | 'Warning' | 'Error';\n    };\n    dictionaryWithEnumFromDescription?: {\n        [key: string]: number;\n    };\n    arrayWithEnum?: Array<'Success' | 'Warning' | 'Error'>;\n    arrayWithDescription?: Array<number>;\n    /**\n     * This is a simple enum with strings\n     */\n    'foo_bar-enum'?: 'Success' | 'Warning' | 'Error' | 'ØÆÅ字符串';\n};\n\n/**\n * This is a model with one property containing a reference\n */\nexport type ModelWithReference = {\n    prop?: ModelWithProperties;\n};\n\n/**\n * This is a model with one property containing an array\n */\nexport type ModelWithArrayReadOnlyAndWriteOnly = {\n    prop?: Array<ModelWithReadOnlyAndWriteOnly>;\n    propWithFile?: Array<Blob | File>;\n    propWithNumber?: Array<number>;\n};\n\n/**\n * This is a model with one property containing an array\n */\nexport type ModelWithArray = {\n    prop?: Array<ModelWithString>;\n    propWithFile?: Array<Blob | File>;\n    propWithNumber?: Array<number>;\n};\n\n/**\n * This is a model with one property containing a dictionary\n */\nexport type ModelWithDictionary = {\n    prop?: {\n        [key: string]: string;\n    };\n};\n\n/**\n * This is a deprecated model with a deprecated property\n *\n * @deprecated\n */\nexport type DeprecatedModel = {\n    /**\n     * This is a deprecated property\n     *\n     * @deprecated\n     */\n    prop?: string;\n};\n\n/**\n * This is a model with one property containing a circular reference\n */\nexport type ModelWithCircularReference = {\n    prop?: ModelWithCircularReference;\n};\n\n/**\n * This is a model with one property with a 'one of' relationship\n */\nexport type CompositionWithOneOf = {\n    propA?: ModelWithString | ModelWithEnum | ModelWithArray | ModelWithDictionary;\n};\n\n/**\n * This is a model with one property with a 'one of' relationship where the options are not $ref\n */\nexport type CompositionWithOneOfAnonymous = {\n    propA?: {\n        propA?: string;\n    } | string | number;\n};\n\n/**\n * Circle\n */\nexport type ModelCircle = {\n    kind: string;\n    radius?: number;\n};\n\n/**\n * Square\n */\nexport type ModelSquare = {\n    kind: string;\n    sideLength?: number;\n};\n\n/**\n * This is a model with one property with a 'one of' relationship where the options are not $ref\n */\nexport type CompositionWithOneOfDiscriminator = ({\n    kind: 'circle';\n} & ModelCircle) | ({\n    kind: 'square';\n} & ModelSquare);\n\n/**\n * This is a model with one property with a 'any of' relationship\n */\nexport type CompositionWithAnyOf = {\n    propA?: ModelWithString | ModelWithEnum | ModelWithArray | ModelWithDictionary;\n};\n\n/**\n * This is a model with one property with a 'any of' relationship where the options are not $ref\n */\nexport type CompositionWithAnyOfAnonymous = {\n    propA?: {\n        propA?: string;\n    } | string | number;\n};\n\n/**\n * This is a model with nested 'any of' property with a type null\n */\nexport type CompositionWithNestedAnyAndTypeNull = {\n    propA?: Array<ModelWithDictionary | null> | Array<ModelWithArray | null>;\n};\n\nexport type _3eNum1Период = 'Bird' | 'Dog';\n\nexport type ConstValue = 'ConstValue';\n\n/**\n * This is a model with one property with a 'any of' relationship where the options are not $ref\n */\nexport type CompositionWithNestedAnyOfAndNull = {\n    /**\n     * Scopes\n     */\n    propA?: Array<_3eNum1Период | ConstValue> | null;\n};\n\n/**\n * This is a model with one property with a 'one of' relationship\n */\nexport type CompositionWithOneOfAndNullable = {\n    propA?: {\n        boolean?: boolean;\n    } | ModelWithEnum | ModelWithArray | ModelWithDictionary | null;\n};\n\n/**\n * This is a model that contains a simple dictionary within composition\n */\nexport type CompositionWithOneOfAndSimpleDictionary = {\n    propA?: boolean | {\n        [key: string]: number;\n    };\n};\n\n/**\n * This is a model that contains a dictionary of simple arrays within composition\n */\nexport type CompositionWithOneOfAndSimpleArrayDictionary = {\n    propA?: boolean | {\n        [key: string]: Array<boolean>;\n    };\n};\n\n/**\n * This is a model that contains a dictionary of complex arrays (composited) within composition\n */\nexport type CompositionWithOneOfAndComplexArrayDictionary = {\n    propA?: boolean | {\n        [key: string]: Array<number | string>;\n    };\n};\n\n/**\n * This is a model with one property with a 'all of' relationship\n */\nexport type CompositionWithAllOfAndNullable = {\n    propA?: ({\n        boolean?: boolean;\n    } & ModelWithEnum & ModelWithArray & ModelWithDictionary) | null;\n};\n\n/**\n * This is a model with one property with a 'any of' relationship\n */\nexport type CompositionWithAnyOfAndNullable = {\n    propA?: {\n        boolean?: boolean;\n    } | ModelWithEnum | ModelWithArray | ModelWithDictionary | null;\n};\n\n/**\n * This is a base model with two simple optional properties\n */\nexport type CompositionBaseModel = {\n    firstName?: string;\n    lastname?: string;\n};\n\n/**\n * This is a model that extends the base model\n */\nexport type CompositionExtendedModel = CompositionBaseModel & {\n    age: number;\n    firstName: string;\n    lastname: string;\n};\n\n/**\n * This is a model with one nested property\n */\nexport type ModelWithProperties = {\n    required: string;\n    readonly requiredAndReadOnly: string;\n    requiredAndNullable: string | null;\n    string?: string;\n    number?: number;\n    boolean?: boolean;\n    reference?: ModelWithString;\n    'property with space'?: string;\n    default?: string;\n    try?: string;\n    readonly '@namespace.string'?: string;\n    readonly '@namespace.integer'?: number;\n};\n\n/**\n * This is a model with one nested property\n */\nexport type ModelWithNestedProperties = {\n    readonly first: {\n        readonly second: {\n            readonly third: string | null;\n        } | null;\n    } | null;\n};\n\n/**\n * This is a model with duplicated properties\n */\nexport type ModelWithDuplicateProperties = {\n    prop?: ModelWithString;\n};\n\n/**\n * This is a model with ordered properties\n */\nexport type ModelWithOrderedProperties = {\n    zebra?: string;\n    apple?: string;\n    hawaii?: string;\n};\n\n/**\n * This is a model with duplicated imports\n */\nexport type ModelWithDuplicateImports = {\n    propA?: ModelWithString;\n    propB?: ModelWithString;\n    propC?: ModelWithString;\n};\n\n/**\n * This is a model that extends another model\n */\nexport type ModelThatExtends = ModelWithString & {\n    propExtendsA?: string;\n    propExtendsB?: ModelWithString;\n};\n\n/**\n * This is a model that extends another model\n */\nexport type ModelThatExtendsExtends = ModelWithString & ModelThatExtends & {\n    propExtendsC?: string;\n    propExtendsD?: ModelWithString;\n};\n\n/**\n * This is a model that contains a some patterns\n */\nexport type ModelWithPattern = {\n    key: string;\n    name: string;\n    readonly enabled?: boolean;\n    readonly modified?: string;\n    id?: string;\n    text?: string;\n    patternWithSingleQuotes?: string;\n    patternWithNewline?: string;\n    patternWithBacktick?: string;\n    patternWithUnicode?: string;\n};\n\nexport type File = {\n    /**\n     * Id\n     */\n    readonly id?: string;\n    /**\n     * Updated at\n     */\n    readonly updated_at?: string;\n    /**\n     * Created at\n     */\n    readonly created_at?: string;\n    /**\n     * Mime\n     */\n    mime: string;\n    /**\n     * File\n     */\n    readonly file?: string;\n};\n\nexport type Default = {\n    name?: string;\n};\n\nexport type Pageable = {\n    page?: number;\n    size?: number;\n    sort?: Array<string>;\n};\n\n/**\n * This is a free-form object without additionalProperties.\n */\nexport type FreeFormObjectWithoutAdditionalProperties = {\n    [key: string]: unknown;\n};\n\n/**\n * This is a free-form object with additionalProperties: true.\n */\nexport type FreeFormObjectWithAdditionalPropertiesEqTrue = {\n    [key: string]: unknown;\n};\n\n/**\n * This is a free-form object with additionalProperties: {}.\n */\nexport type FreeFormObjectWithAdditionalPropertiesEqEmptyObject = {\n    [key: string]: unknown;\n};\n\nexport type ModelWithConst = {\n    String?: 'String';\n    number?: 0;\n    null?: null;\n    withType?: 'Some string';\n};\n\n/**\n * This is a model with one property and additionalProperties: true\n */\nexport type ModelWithAdditionalPropertiesEqTrue = {\n    /**\n     * This is a simple string property\n     */\n    prop?: string;\n    [key: string]: unknown;\n};\n\nexport type NestedAnyOfArraysNullable = {\n    nullableArray?: Array<string | boolean> | null;\n};\n\nexport type CompositionWithOneOfAndProperties = ({\n    foo: SimpleParameter;\n} | {\n    bar: NonAsciiStringæøåÆøÅöôêÊ字符串;\n}) & {\n    baz: number | null;\n    qux: number;\n};\n\n/**\n * An object that can be null\n */\nexport type NullableObject = {\n    foo?: string;\n} | null;\n\n/**\n * Some % character\n */\nexport type CharactersInDescription = string;\n\nexport type ModelWithNullableObject = {\n    data?: NullableObject;\n};\n\n/**\n * An object with additional properties that can be null (anyOf ref + null)\n */\nexport type ModelWithAdditionalPropertiesRef = {\n    [key: string]: NullableObject | null;\n};\n\nexport type ModelWithOneOfEnum = {\n    foo: 'Bar';\n} | {\n    foo: 'Baz';\n} | {\n    foo: 'Qux';\n} | {\n    content: string;\n    foo: 'Quux';\n} | {\n    content: [\n        string,\n        string\n    ];\n    foo: 'Corge';\n};\n\nexport type ModelWithNestedArrayEnumsDataFoo = 'foo' | 'bar';\n\nexport type ModelWithNestedArrayEnumsDataBar = 'baz' | 'qux';\n\nexport type ModelWithNestedArrayEnumsData = {\n    foo?: Array<ModelWithNestedArrayEnumsDataFoo>;\n    bar?: Array<ModelWithNestedArrayEnumsDataBar>;\n};\n\nexport type ModelWithNestedArrayEnums = {\n    array_strings?: Array<string>;\n    data?: ModelWithNestedArrayEnumsData;\n};\n\nexport type ModelWithNestedCompositionEnums = {\n    foo?: ModelWithNestedArrayEnumsDataFoo;\n};\n\nexport type ModelWithReadOnlyAndWriteOnly = {\n    foo: string;\n    readonly bar: string;\n};\n\nexport type ModelWithConstantSizeArray = [\n    number,\n    number\n];\n\nexport type ModelWithAnyOfConstantSizeArray = [\n    number | string,\n    number | string,\n    number | string\n];\n\nexport type ModelWithPrefixItemsConstantSizeArray = [\n    ModelWithInteger,\n    number | string,\n    string\n];\n\nexport type ModelWithAnyOfConstantSizeArrayNullable = [\n    number | null | string,\n    number | null | string,\n    number | null | string\n];\n\nexport type ModelWithAnyOfConstantSizeArrayWithNSizeAndOptions = [\n    number | Import,\n    number | Import\n];\n\nexport type ModelWithAnyOfConstantSizeArrayAndIntersect = [\n    number & string,\n    number & string\n];\n\nexport type ModelWithNumericEnumUnion = {\n    /**\n     * Период\n     */\n    value?: -10 | -1 | 0 | 1 | 3 | 6 | 12;\n};\n\n/**\n * Some description with `back ticks`\n */\nexport type ModelWithBackticksInDescription = {\n    /**\n     * The template `that` should be used for parsing and importing the contents of the CSV file.\n     *\n     * <br/><p>There is one placeholder currently supported:<ul>     <li><b>${x}</b> - refers to the n-th column in the CSV file, e.g. ${1}, ${2}, ...)</li></ul><p>Example of a correct JSON template:</p>\n     * <pre>\n     * [\n     * {\n     * \"resourceType\": \"Asset\",\n     * \"identifier\": {\n     * \"name\": \"${1}\",\n     * \"domain\": {\n     * \"name\": \"${2}\",\n     * \"community\": {\n     * \"name\": \"Some Community\"\n     * }\n     * }\n     * },\n     * \"attributes\" : {\n     * \"00000000-0000-0000-0000-000000003115\" : [ {\n     * \"value\" : \"${3}\"\n     * } ],\n     * \"00000000-0000-0000-0000-000000000222\" : [ {\n     * \"value\" : \"${4}\"\n     * } ]\n     * }\n     * }\n     * ]\n     * </pre>\n     */\n    template?: string;\n};\n\nexport type ModelWithOneOfAndProperties = (SimpleParameter | NonAsciiStringæøåÆøÅöôêÊ字符串) & {\n    baz: number | null;\n    qux: number;\n};\n\n/**\n * Model used to test deduplication strategy (unused)\n */\nexport type ParameterSimpleParameterUnused = string;\n\n/**\n * Model used to test deduplication strategy\n */\nexport type PostServiceWithEmptyTagResponse = string;\n\n/**\n * Model used to test deduplication strategy\n */\nexport type PostServiceWithEmptyTagResponse2 = string;\n\n/**\n * Model used to test deduplication strategy\n */\nexport type DeleteFooData = string;\n\n/**\n * Model used to test deduplication strategy\n */\nexport type DeleteFooData2 = string;\n\n/**\n * Model with restricted keyword name\n */\nexport type Import = string;\n\nexport type SchemaWithFormRestrictedKeys = {\n    description?: string;\n    'x-enum-descriptions'?: string;\n    'x-enum-varnames'?: string;\n    'x-enumNames'?: string;\n    title?: string;\n    object?: {\n        description?: string;\n        'x-enum-descriptions'?: string;\n        'x-enum-varnames'?: string;\n        'x-enumNames'?: string;\n        title?: string;\n    };\n    array?: Array<{\n        description?: string;\n        'x-enum-descriptions'?: string;\n        'x-enum-varnames'?: string;\n        'x-enumNames'?: string;\n        title?: string;\n    }>;\n};\n\n/**\n * This schema was giving PascalCase transformations a hard time\n */\nexport type IoK8sApimachineryPkgApisMetaV1DeleteOptions = {\n    /**\n     * Must be fulfilled before a deletion is carried out. If not possible, a 409 Conflict status will be returned.\n     */\n    preconditions?: IoK8sApimachineryPkgApisMetaV1Preconditions;\n};\n\n/**\n * This schema was giving PascalCase transformations a hard time\n */\nexport type IoK8sApimachineryPkgApisMetaV1Preconditions = {\n    /**\n     * Specifies the target ResourceVersion\n     */\n    resourceVersion?: string;\n    /**\n     * Specifies the target UID.\n     */\n    uid?: string;\n};\n\nexport type AdditionalPropertiesUnknownIssue = {\n    [key: string]: string | number;\n};\n\nexport type AdditionalPropertiesUnknownIssue2 = {\n    [key: string]: string | number;\n};\n\nexport type AdditionalPropertiesUnknownIssue3 = string & {\n    entries: {\n        [key: string]: AdditionalPropertiesUnknownIssue;\n    };\n};\n\nexport type AdditionalPropertiesIntegerIssue = {\n    value: number;\n    [key: string]: number;\n};\n\nexport type OneOfAllOfIssue = ((ConstValue | GenericSchemaDuplicateIssue1SystemBoolean) & _3eNum1Период) | GenericSchemaDuplicateIssue1SystemString;\n\nexport type GenericSchemaDuplicateIssue1SystemBoolean = {\n    item?: boolean;\n    error?: string | null;\n    readonly hasError?: boolean;\n    data?: {\n        [key: string]: never;\n    };\n};\n\nexport type GenericSchemaDuplicateIssue1SystemString = {\n    item?: string | null;\n    error?: string | null;\n    readonly hasError?: boolean;\n};\n\nexport type ExternalSharedModel = {\n    id: string;\n    name?: string;\n};\n\n/**\n * This is a model with one property containing a reference\n */\nexport type ModelWithReferenceWritable = {\n    prop?: ModelWithPropertiesWritable;\n};\n\n/**\n * This is a model with one property containing an array\n */\nexport type ModelWithArrayReadOnlyAndWriteOnlyWritable = {\n    prop?: Array<ModelWithReadOnlyAndWriteOnlyWritable>;\n    propWithFile?: Array<Blob | File>;\n    propWithNumber?: Array<number>;\n};\n\n/**\n * This is a model with one nested property\n */\nexport type ModelWithPropertiesWritable = {\n    required: string;\n    requiredAndNullable: string | null;\n    string?: string;\n    number?: number;\n    boolean?: boolean;\n    reference?: ModelWithString;\n    'property with space'?: string;\n    default?: string;\n    try?: string;\n};\n\n/**\n * This is a model that contains a some patterns\n */\nexport type ModelWithPatternWritable = {\n    key: string;\n    name: string;\n    id?: string;\n    text?: string;\n    patternWithSingleQuotes?: string;\n    patternWithNewline?: string;\n    patternWithBacktick?: string;\n    patternWithUnicode?: string;\n};\n\nexport type FileWritable = {\n    /**\n     * Mime\n     */\n    mime: string;\n};\n\nexport type ModelWithReadOnlyAndWriteOnlyWritable = {\n    foo: string;\n    baz: string;\n};\n\nexport type ModelWithAnyOfConstantSizeArrayWithNSizeAndOptionsWritable = [\n    number | Import,\n    number | Import\n];\n\nexport type AdditionalPropertiesUnknownIssueWritable = {\n    [key: string]: string | number;\n};\n\nexport type OneOfAllOfIssueWritable = ((ConstValue | GenericSchemaDuplicateIssue1SystemBoolean) & _3eNum1Период) | GenericSchemaDuplicateIssue1SystemString;\n\nexport type GenericSchemaDuplicateIssue1SystemBooleanWritable = {\n    item?: boolean;\n    error?: string | null;\n    data?: {\n        [key: string]: never;\n    };\n};\n\nexport type GenericSchemaDuplicateIssue1SystemStringWritable = {\n    item?: string | null;\n    error?: string | null;\n};\n\n/**\n * This is a reusable parameter\n */\nexport type SimpleParameter = string;\n\n/**\n * Parameter with illegal characters\n */\nexport type XFooBar = ModelWithString;\n\n/**\n * A reusable request body\n */\nexport type SimpleRequestBody = ModelWithString;\n\n/**\n * A reusable request body\n */\nexport type SimpleFormData = ModelWithString;\n\nexport type ExportData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no+tag';\n};\n\nexport type PatchApiVbyApiVersionNoTagData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no+tag';\n};\n\nexport type PatchApiVbyApiVersionNoTagResponses = {\n    /**\n     * OK\n     */\n    default: unknown;\n};\n\nexport type ImportData = {\n    body: ModelWithReadOnlyAndWriteOnlyWritable | ModelWithArrayReadOnlyAndWriteOnlyWritable;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no+tag';\n};\n\nexport type ImportResponses = {\n    /**\n     * Success\n     */\n    200: ModelFromZendesk;\n    /**\n     * Default success response\n     */\n    default: ModelWithReadOnlyAndWriteOnly;\n};\n\nexport type ImportResponse = ImportResponses[keyof ImportResponses];\n\nexport type FooWowData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no+tag';\n};\n\nexport type FooWowResponses = {\n    /**\n     * OK\n     */\n    default: unknown;\n};\n\nexport type ApiVVersionODataControllerCountData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple/$count';\n};\n\nexport type ApiVVersionODataControllerCountResponses = {\n    /**\n     * Success\n     */\n    200: ModelFromZendesk;\n};\n\nexport type ApiVVersionODataControllerCountResponse = ApiVVersionODataControllerCountResponses[keyof ApiVVersionODataControllerCountResponses];\n\nexport type GetApiVbyApiVersionSimpleOperationData = {\n    body?: never;\n    path: {\n        /**\n         * foo in method\n         */\n        foo_param: string;\n    };\n    query?: never;\n    url: '/api/v{api-version}/simple:operation';\n};\n\nexport type GetApiVbyApiVersionSimpleOperationErrors = {\n    /**\n     * Default error response\n     */\n    default: ModelWithBoolean;\n};\n\nexport type GetApiVbyApiVersionSimpleOperationError = GetApiVbyApiVersionSimpleOperationErrors[keyof GetApiVbyApiVersionSimpleOperationErrors];\n\nexport type GetApiVbyApiVersionSimpleOperationResponses = {\n    /**\n     * Response is a simple number\n     */\n    200: number;\n};\n\nexport type GetApiVbyApiVersionSimpleOperationResponse = GetApiVbyApiVersionSimpleOperationResponses[keyof GetApiVbyApiVersionSimpleOperationResponses];\n\nexport type DeleteCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type GetCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type HeadCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type OptionsCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type PatchCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type PostCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type PutCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type DeleteFooData3 = {\n    body?: never;\n    headers: {\n        /**\n         * Parameter with illegal characters\n         */\n        'x-Foo-Bar': ModelWithString;\n    };\n    path: {\n        /**\n         * foo in method\n         */\n        foo_param: string;\n        /**\n         * bar in method\n         */\n        BarParam: string;\n    };\n    query?: never;\n    url: '/api/v{api-version}/foo/{foo_param}/bar/{BarParam}';\n};\n\nexport type CallWithDescriptionsData = {\n    body?: never;\n    path?: never;\n    query?: {\n        /**\n         * Testing multiline comments in string: First line\n         * Second line\n         *\n         * Fourth line\n         */\n        parameterWithBreaks?: string;\n        /**\n         * Testing backticks in string: `backticks` and ```multiple backticks``` should work\n         */\n        parameterWithBackticks?: string;\n        /**\n         * Testing slashes in string: \\backwards\\\\\\ and /forwards/// should work\n         */\n        parameterWithSlashes?: string;\n        /**\n         * Testing expression placeholders in string: ${expression} should work\n         */\n        parameterWithExpressionPlaceholders?: string;\n        /**\n         * Testing quotes in string: 'single quote''' and \"double quotes\"\"\" should work\n         */\n        parameterWithQuotes?: string;\n        /**\n         * Testing reserved characters in string: * inline * and ** inline ** should work\n         */\n        parameterWithReservedCharacters?: string;\n    };\n    url: '/api/v{api-version}/descriptions';\n};\n\nexport type DeprecatedCallData = {\n    body?: never;\n    headers: {\n        /**\n         * This parameter is deprecated\n         *\n         * @deprecated\n         */\n        parameter: DeprecatedModel | null;\n    };\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/parameters/deprecated';\n};\n\nexport type CallWithParametersData = {\n    /**\n     * This is the parameter that goes into the body\n     */\n    body: {\n        [key: string]: unknown;\n    } | null;\n    headers: {\n        /**\n         * This is the parameter that goes into the header\n         */\n        parameterHeader: string | null;\n    };\n    path: {\n        /**\n         * This is the parameter that goes into the path\n         */\n        parameterPath: string | null;\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string | null;\n    };\n    query: {\n        foo_ref_enum?: ModelWithNestedArrayEnumsDataFoo;\n        foo_all_of_enum: ModelWithNestedArrayEnumsDataFoo;\n        /**\n         * This is the parameter that goes into the query params\n         */\n        cursor: string | null;\n    };\n    url: '/api/v{api-version}/parameters/{parameterPath}';\n};\n\nexport type CallWithWeirdParameterNamesData = {\n    /**\n     * This is the parameter that goes into the body\n     */\n    body: ModelWithString | null;\n    headers: {\n        /**\n         * This is the parameter that goes into the request header\n         */\n        'parameter.header': string | null;\n    };\n    path: {\n        /**\n         * This is the parameter that goes into the path\n         */\n        'parameter.path.1'?: string;\n        /**\n         * This is the parameter that goes into the path\n         */\n        'parameter-path-2'?: string;\n        /**\n         * This is the parameter that goes into the path\n         */\n        'PARAMETER-PATH-3'?: string;\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string | null;\n    };\n    query: {\n        /**\n         * This is the parameter with a reserved keyword\n         */\n        default?: string;\n        /**\n         * This is the parameter that goes into the request query params\n         */\n        'parameter-query': string | null;\n    };\n    url: '/api/v{api-version}/parameters/{parameter.path.1}/{parameter-path-2}/{PARAMETER-PATH-3}';\n};\n\nexport type GetCallWithOptionalParamData = {\n    /**\n     * This is a required parameter\n     */\n    body: ModelWithOneOfEnum;\n    path?: never;\n    query?: {\n        /**\n         * This is an optional parameter\n         */\n        page?: number;\n    };\n    url: '/api/v{api-version}/parameters';\n};\n\nexport type PostCallWithOptionalParamData = {\n    /**\n     * This is an optional parameter\n     */\n    body?: {\n        offset?: number | null;\n    };\n    path?: never;\n    query: {\n        /**\n         * This is a required parameter\n         */\n        parameter: Pageable;\n    };\n    url: '/api/v{api-version}/parameters';\n};\n\nexport type PostCallWithOptionalParamResponses = {\n    /**\n     * Response is a simple number\n     */\n    200: number;\n    /**\n     * Success\n     */\n    204: void;\n};\n\nexport type PostCallWithOptionalParamResponse = PostCallWithOptionalParamResponses[keyof PostCallWithOptionalParamResponses];\n\nexport type PostApiVbyApiVersionRequestBodyData = {\n    /**\n     * A reusable request body\n     */\n    body?: SimpleRequestBody;\n    path?: never;\n    query?: {\n        /**\n         * This is a reusable parameter\n         */\n        parameter?: string;\n    };\n    url: '/api/v{api-version}/requestBody';\n};\n\nexport type PostApiVbyApiVersionFormDataData = {\n    /**\n     * A reusable request body\n     */\n    body?: SimpleFormData;\n    path?: never;\n    query?: {\n        /**\n         * This is a reusable parameter\n         */\n        parameter?: string;\n    };\n    url: '/api/v{api-version}/formData';\n};\n\nexport type CallWithDefaultParametersData = {\n    body?: never;\n    path?: never;\n    query?: {\n        /**\n         * This is a simple string with default value\n         */\n        parameterString?: string | null;\n        /**\n         * This is a simple number with default value\n         */\n        parameterNumber?: number | null;\n        /**\n         * This is a simple boolean with default value\n         */\n        parameterBoolean?: boolean | null;\n        /**\n         * This is a simple enum with default value\n         */\n        parameterEnum?: 'Success' | 'Warning' | 'Error';\n        /**\n         * This is a simple model with default value\n         */\n        parameterModel?: ModelWithString | null;\n    };\n    url: '/api/v{api-version}/defaults';\n};\n\nexport type CallWithDefaultOptionalParametersData = {\n    body?: never;\n    path?: never;\n    query?: {\n        /**\n         * This is a simple string that is optional with default value\n         */\n        parameterString?: string;\n        /**\n         * This is a simple number that is optional with default value\n         */\n        parameterNumber?: number;\n        /**\n         * This is a simple boolean that is optional with default value\n         */\n        parameterBoolean?: boolean;\n        /**\n         * This is a simple enum that is optional with default value\n         */\n        parameterEnum?: 'Success' | 'Warning' | 'Error';\n        /**\n         * This is a simple model that is optional with default value\n         */\n        parameterModel?: ModelWithString;\n    };\n    url: '/api/v{api-version}/defaults';\n};\n\nexport type CallToTestOrderOfParamsData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * This is a optional string with default\n         */\n        parameterOptionalStringWithDefault?: string;\n        /**\n         * This is a optional string with empty default\n         */\n        parameterOptionalStringWithEmptyDefault?: string;\n        /**\n         * This is a optional string with no default\n         */\n        parameterOptionalStringWithNoDefault?: string;\n        /**\n         * This is a string with default\n         */\n        parameterStringWithDefault: string;\n        /**\n         * This is a string with empty default\n         */\n        parameterStringWithEmptyDefault: string;\n        /**\n         * This is a string with no default\n         */\n        parameterStringWithNoDefault: string;\n        /**\n         * This is a string that can be null with no default\n         */\n        parameterStringNullableWithNoDefault?: string | null;\n        /**\n         * This is a string that can be null with default\n         */\n        parameterStringNullableWithDefault?: string | null;\n    };\n    url: '/api/v{api-version}/defaults';\n};\n\nexport type DuplicateNameData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/duplicate';\n};\n\nexport type DuplicateName2Data = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/duplicate';\n};\n\nexport type DuplicateName3Data = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/duplicate';\n};\n\nexport type DuplicateName4Data = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/duplicate';\n};\n\nexport type CallWithNoContentResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no-content';\n};\n\nexport type CallWithNoContentResponseResponses = {\n    /**\n     * Success\n     */\n    204: void;\n};\n\nexport type CallWithNoContentResponseResponse = CallWithNoContentResponseResponses[keyof CallWithNoContentResponseResponses];\n\nexport type CallWithResponseAndNoContentResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multiple-tags/response-and-no-content';\n};\n\nexport type CallWithResponseAndNoContentResponseResponses = {\n    /**\n     * Response is a simple number\n     */\n    200: number;\n    /**\n     * Success\n     */\n    204: void;\n};\n\nexport type CallWithResponseAndNoContentResponseResponse = CallWithResponseAndNoContentResponseResponses[keyof CallWithResponseAndNoContentResponseResponses];\n\nexport type DummyAData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multiple-tags/a';\n};\n\nexport type DummyAResponses = {\n    200: _400;\n};\n\nexport type DummyAResponse = DummyAResponses[keyof DummyAResponses];\n\nexport type DummyBData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multiple-tags/b';\n};\n\nexport type DummyBResponses = {\n    /**\n     * Success\n     */\n    204: void;\n};\n\nexport type DummyBResponse = DummyBResponses[keyof DummyBResponses];\n\nexport type CallWithResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/response';\n};\n\nexport type CallWithResponseResponses = {\n    default: Import;\n};\n\nexport type CallWithResponseResponse = CallWithResponseResponses[keyof CallWithResponseResponses];\n\nexport type CallWithDuplicateResponsesData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/response';\n};\n\nexport type CallWithDuplicateResponsesErrors = {\n    /**\n     * Message for 500 error\n     */\n    500: ModelWithStringError;\n    /**\n     * Message for 501 error\n     */\n    501: ModelWithStringError;\n    /**\n     * Message for 502 error\n     */\n    502: ModelWithStringError;\n    /**\n     * Message for 4XX errors\n     */\n    '4XX': DictionaryWithArray;\n    /**\n     * Default error response\n     */\n    default: ModelWithBoolean;\n};\n\nexport type CallWithDuplicateResponsesError = CallWithDuplicateResponsesErrors[keyof CallWithDuplicateResponsesErrors];\n\nexport type CallWithDuplicateResponsesResponses = {\n    /**\n     * Message for 200 response\n     */\n    200: ModelWithBoolean & ModelWithInteger;\n    /**\n     * Message for 201 response\n     */\n    201: ModelWithString;\n    /**\n     * Message for 202 response\n     */\n    202: ModelWithString;\n};\n\nexport type CallWithDuplicateResponsesResponse = CallWithDuplicateResponsesResponses[keyof CallWithDuplicateResponsesResponses];\n\nexport type CallWithResponsesData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/response';\n};\n\nexport type CallWithResponsesErrors = {\n    /**\n     * Message for 500 error\n     */\n    500: ModelWithStringError;\n    /**\n     * Message for 501 error\n     */\n    501: ModelWithStringError;\n    /**\n     * Message for 502 error\n     */\n    502: ModelWithStringError;\n    /**\n     * Message for default response\n     */\n    default: ModelWithStringError;\n};\n\nexport type CallWithResponsesError = CallWithResponsesErrors[keyof CallWithResponsesErrors];\n\nexport type CallWithResponsesResponses = {\n    /**\n     * Message for 200 response\n     */\n    200: {\n        readonly '@namespace.string'?: string;\n        readonly '@namespace.integer'?: number;\n        readonly value?: Array<ModelWithString>;\n    };\n    /**\n     * Message for 201 response\n     */\n    201: ModelThatExtends;\n    /**\n     * Message for 202 response\n     */\n    202: ModelThatExtendsExtends;\n};\n\nexport type CallWithResponsesResponse = CallWithResponsesResponses[keyof CallWithResponsesResponses];\n\nexport type CollectionFormatData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * This is an array parameter that is sent as csv format (comma-separated values)\n         */\n        parameterArrayCSV: Array<string> | null;\n        /**\n         * This is an array parameter that is sent as ssv format (space-separated values)\n         */\n        parameterArraySSV: Array<string> | null;\n        /**\n         * This is an array parameter that is sent as tsv format (tab-separated values)\n         */\n        parameterArrayTSV: Array<string> | null;\n        /**\n         * This is an array parameter that is sent as pipes format (pipe-separated values)\n         */\n        parameterArrayPipes: Array<string> | null;\n        /**\n         * This is an array parameter that is sent as multi format (multiple parameter instances)\n         */\n        parameterArrayMulti: Array<string> | null;\n    };\n    url: '/api/v{api-version}/collectionFormat';\n};\n\nexport type TypesData = {\n    body?: never;\n    path?: {\n        /**\n         * This is a number parameter\n         */\n        id?: number;\n    };\n    query: {\n        /**\n         * This is a number parameter\n         */\n        parameterNumber: number;\n        /**\n         * This is a string parameter\n         */\n        parameterString: string | null;\n        /**\n         * This is a boolean parameter\n         */\n        parameterBoolean: boolean | null;\n        /**\n         * This is an object parameter\n         */\n        parameterObject: {\n            [key: string]: unknown;\n        } | null;\n        /**\n         * This is an array parameter\n         */\n        parameterArray: Array<string> | null;\n        /**\n         * This is a dictionary parameter\n         */\n        parameterDictionary: {\n            [key: string]: unknown;\n        } | null;\n        /**\n         * This is an enum parameter\n         */\n        parameterEnum: 'Success' | 'Warning' | 'Error' | null;\n    };\n    url: '/api/v{api-version}/types';\n};\n\nexport type TypesResponses = {\n    /**\n     * Response is a simple number\n     */\n    200: number;\n    /**\n     * Response is a simple string\n     */\n    201: string;\n    /**\n     * Response is a simple boolean\n     */\n    202: boolean;\n    /**\n     * Response is a simple object\n     */\n    203: {\n        [key: string]: unknown;\n    };\n};\n\nexport type TypesResponse = TypesResponses[keyof TypesResponses];\n\nexport type UploadFileData = {\n    body: Blob | File;\n    path: {\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string | null;\n    };\n    query?: never;\n    url: '/api/v{api-version}/upload';\n};\n\nexport type UploadFileResponses = {\n    200: boolean;\n};\n\nexport type UploadFileResponse = UploadFileResponses[keyof UploadFileResponses];\n\nexport type FileResponseData = {\n    body?: never;\n    path: {\n        id: string;\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string;\n    };\n    query?: never;\n    url: '/api/v{api-version}/file/{id}';\n};\n\nexport type FileResponseResponses = {\n    /**\n     * Success\n     */\n    200: Blob | File;\n};\n\nexport type FileResponseResponse = FileResponseResponses[keyof FileResponseResponses];\n\nexport type ComplexTypesData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * Parameter containing object\n         */\n        parameterObject: {\n            first?: {\n                second?: {\n                    third?: string;\n                };\n            };\n        };\n        /**\n         * Parameter containing reference\n         */\n        parameterReference: ModelWithString;\n    };\n    url: '/api/v{api-version}/complex';\n};\n\nexport type ComplexTypesErrors = {\n    /**\n     * 400 `server` error\n     */\n    400: unknown;\n    /**\n     * 500 server error\n     */\n    500: unknown;\n};\n\nexport type ComplexTypesResponses = {\n    /**\n     * Successful response\n     */\n    200: Array<ModelWithString>;\n};\n\nexport type ComplexTypesResponse = ComplexTypesResponses[keyof ComplexTypesResponses];\n\nexport type MultipartResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multipart';\n};\n\nexport type MultipartResponseResponses = {\n    /**\n     * OK\n     */\n    200: {\n        file?: Blob | File;\n        metadata?: {\n            foo?: string;\n            bar?: string;\n        };\n    };\n};\n\nexport type MultipartResponseResponse = MultipartResponseResponses[keyof MultipartResponseResponses];\n\nexport type MultipartRequestData = {\n    body?: {\n        content?: Blob | File;\n        data?: ModelWithString | null;\n    };\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multipart';\n};\n\nexport type ComplexParamsData = {\n    body?: {\n        readonly key: string | null;\n        name: string | null;\n        enabled?: boolean;\n        type: 'Monkey' | 'Horse' | 'Bird';\n        listOfModels?: Array<ModelWithString> | null;\n        listOfStrings?: Array<string> | null;\n        parameters: ModelWithString | ModelWithEnum | ModelWithArray | ModelWithDictionary;\n        readonly user?: {\n            readonly id?: number;\n            readonly name?: string | null;\n        };\n    };\n    path: {\n        id: number;\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string;\n    };\n    query?: never;\n    url: '/api/v{api-version}/complex/{id}';\n};\n\nexport type ComplexParamsResponses = {\n    /**\n     * Success\n     */\n    200: ModelWithString;\n};\n\nexport type ComplexParamsResponse = ComplexParamsResponses[keyof ComplexParamsResponses];\n\nexport type CallWithResultFromHeaderData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/header';\n};\n\nexport type CallWithResultFromHeaderErrors = {\n    /**\n     * 400 server error\n     */\n    400: unknown;\n    /**\n     * 500 server error\n     */\n    500: unknown;\n};\n\nexport type CallWithResultFromHeaderResponses = {\n    /**\n     * Successful response\n     */\n    200: unknown;\n};\n\nexport type TestErrorCodeData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * Status code to return\n         */\n        status: number;\n    };\n    url: '/api/v{api-version}/error';\n};\n\nexport type TestErrorCodeErrors = {\n    /**\n     * Custom message: Internal Server Error\n     */\n    500: unknown;\n    /**\n     * Custom message: Not Implemented\n     */\n    501: unknown;\n    /**\n     * Custom message: Bad Gateway\n     */\n    502: unknown;\n    /**\n     * Custom message: Service Unavailable\n     */\n    503: unknown;\n};\n\nexport type TestErrorCodeResponses = {\n    /**\n     * Custom message: Successful response\n     */\n    200: unknown;\n};\n\nexport type NonAsciiæøåÆøÅöôêÊ字符串Data = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * Dummy input param\n         */\n        nonAsciiParamæøåÆØÅöôêÊ: number;\n    };\n    url: '/api/v{api-version}/non-ascii-æøåÆØÅöôêÊ字符串';\n};\n\nexport type NonAsciiæøåÆøÅöôêÊ字符串Responses = {\n    /**\n     * Successful response\n     */\n    200: Array<NonAsciiStringæøåÆøÅöôêÊ字符串>;\n};\n\nexport type NonAsciiæøåÆøÅöôêÊ字符串Response = NonAsciiæøåÆøÅöôêÊ字符串Responses[keyof NonAsciiæøåÆøÅöôêÊ字符串Responses];\n\nexport type PutWithFormUrlEncodedData = {\n    body: ArrayWithStrings;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/non-ascii-æøåÆØÅöôêÊ字符串';\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-axios/base-url-number/client/client.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { AxiosError, AxiosInstance, RawAxiosRequestHeaders } from 'axios';\nimport axios from 'axios';\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 } from './types.gen';\nimport { buildUrl, createConfig, mergeConfigs, mergeHeaders, setAuthParams } from './utils.gen';\n\nexport const createClient = (config: Config = {}): Client => {\n  let _config = mergeConfigs(createConfig(), config);\n\n  let instance: AxiosInstance;\n\n  if (_config.axios && !('Axios' in _config.axios)) {\n    instance = _config.axios;\n  } else {\n    // eslint-disable-next-line @typescript-eslint/no-unused-vars\n    const { auth, ...configWithoutAuth } = _config;\n    instance = axios.create(configWithoutAuth);\n  }\n\n  const getConfig = (): Config => ({ ..._config });\n\n  const setConfig = (config: Config): Config => {\n    _config = mergeConfigs(_config, config);\n    instance.defaults = {\n      ...instance.defaults,\n      ..._config,\n      // @ts-expect-error\n      headers: mergeHeaders(instance.defaults.headers, _config.headers),\n    };\n    return getConfig();\n  };\n\n  const beforeRequest = async (options: RequestOptions) => {\n    const opts = {\n      ..._config,\n      ...options,\n      axios: options.axios ?? _config.axios ?? instance,\n      headers: mergeHeaders(_config.headers, options.headers),\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.body = opts.bodySerializer(opts.body);\n    }\n\n    const url = buildUrl(opts);\n\n    return { opts, url };\n  };\n\n  // @ts-expect-error\n  const request: Client['request'] = async (options) => {\n    // @ts-expect-error\n    const { opts, url } = await beforeRequest(options);\n    try {\n      // assign Axios here for consistency with fetch\n      const _axios = opts.axios!;\n      // eslint-disable-next-line @typescript-eslint/no-unused-vars\n      const { auth, ...optsWithoutAuth } = opts;\n      const response = await _axios({\n        ...optsWithoutAuth,\n        baseURL: '', // the baseURL is already included in `url`\n        data: getValidRequestBody(opts),\n        headers: opts.headers as RawAxiosRequestHeaders,\n        // let `paramsSerializer()` handle query params if it exists\n        params: opts.paramsSerializer ? opts.query : undefined,\n        url,\n      });\n\n      let { data } = response;\n\n      if (opts.responseType === '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 {\n        ...response,\n        data: data ?? {},\n      };\n    } catch (error) {\n      const e = error as AxiosError;\n      if (opts.throwOnError) {\n        throw e;\n      }\n      // @ts-expect-error\n      e.error = e.response?.data ?? {};\n      return e;\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 Record<string, string>,\n      method,\n      serializedBody: getValidRequestBody(opts) as BodyInit | null | undefined,\n      // @ts-expect-error\n      signal: opts.signal,\n      url,\n    });\n  };\n\n  const _buildUrl: Client['buildUrl'] = (options) =>\n    buildUrl({ axios: instance, ..._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    instance,\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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-axios/base-url-number/client/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type { Auth } from '../core/auth.gen';\nexport type { QuerySerializerOptions } from '../core/bodySerializer.gen';\nexport {\n  formDataBodySerializer,\n  jsonBodySerializer,\n  urlSearchParamsBodySerializer,\n} from '../core/bodySerializer.gen';\nexport { buildClientParams } from '../core/params.gen';\nexport { serializeQueryKeyValue } from '../core/queryKeySerializer.gen';\nexport { createClient } from './client.gen';\nexport type {\n  Client,\n  ClientOptions,\n  Config,\n  CreateClientConfig,\n  Options,\n  RequestOptions,\n  RequestResult,\n  TDataShape,\n} from './types.gen';\nexport { createConfig } from './utils.gen';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-axios/base-url-number/client/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type {\n  AxiosError,\n  AxiosInstance,\n  AxiosRequestHeaders,\n  AxiosResponse,\n  AxiosStatic,\n  CreateAxiosDefaults,\n} from 'axios';\n\nimport type { Auth } from '../core/auth.gen';\nimport type {\n  ServerSentEventsOptions,\n  ServerSentEventsResult,\n} from '../core/serverSentEvents.gen';\nimport type { Client as CoreClient, Config as CoreConfig } from '../core/types.gen';\n\nexport interface Config<T extends ClientOptions = ClientOptions>\n  extends Omit<CreateAxiosDefaults, 'auth' | 'baseURL' | 'headers' | 'method'>, CoreConfig {\n  /**\n   * Axios implementation. You can use this option to provide either an\n   * `AxiosStatic` or an `AxiosInstance`.\n   *\n   * @default axios\n   */\n  axios?: AxiosStatic | AxiosInstance;\n  /**\n   * Base URL for all requests made by this client.\n   */\n  baseURL?: T['baseURL'];\n  /**\n   * An object containing any HTTP headers that you want to pre-populate your\n   * `Headers` object with.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/Headers/Headers#init See more}\n   */\n  headers?:\n    | AxiosRequestHeaders\n    | Record<\n        string,\n        string | number | boolean | (string | number | boolean)[] | null | undefined | unknown\n      >;\n  /**\n   * Throw an error instead of returning it in the response?\n   *\n   * @default false\n   */\n  throwOnError?: T['throwOnError'];\n}\n\nexport interface RequestOptions<\n  TData = unknown,\n  ThrowOnError extends boolean = boolean,\n  Url extends string = string,\n>\n  extends\n    Config<{\n      throwOnError: ThrowOnError;\n    }>,\n    Pick<\n      ServerSentEventsOptions<TData>,\n      | 'onRequest'\n      | 'onSseError'\n      | 'onSseEvent'\n      | 'sseDefaultRetryDelay'\n      | 'sseMaxRetryAttempts'\n      | 'sseMaxRetryDelay'\n    > {\n  /**\n   * Any body that you want to add to your request.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/fetch#body}\n   */\n  body?: unknown;\n  path?: Record<string, unknown>;\n  query?: Record<string, unknown>;\n  /**\n   * Security mechanism(s) to use for the request.\n   */\n  security?: ReadonlyArray<Auth>;\n  url: Url;\n}\n\nexport interface ClientOptions {\n  baseURL?: string;\n  throwOnError?: boolean;\n}\n\nexport type RequestResult<\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = boolean,\n> = ThrowOnError extends true\n  ? Promise<AxiosResponse<TData extends Record<string, unknown> ? TData[keyof TData] : TData>>\n  : Promise<\n      | (AxiosResponse<TData extends Record<string, unknown> ? TData[keyof TData] : TData> & {\n          error: undefined;\n        })\n      | (AxiosError<TError extends Record<string, unknown> ? TError[keyof TError] : TError> & {\n          data: undefined;\n          error: TError extends Record<string, unknown> ? TError[keyof TError] : TError;\n        })\n    >;\n\ntype MethodFn = <TData = unknown, TError = unknown, ThrowOnError extends boolean = false>(\n  options: Omit<RequestOptions<TData, ThrowOnError>, 'method'>,\n) => RequestResult<TData, TError, ThrowOnError>;\n\ntype SseFn = <TData = unknown, TError = unknown, ThrowOnError extends boolean = false>(\n  options: Omit<RequestOptions<TData, ThrowOnError>, 'method'>,\n) => Promise<ServerSentEventsResult<TData, TError>>;\n\ntype RequestFn = <TData = unknown, TError = unknown, ThrowOnError extends boolean = false>(\n  options: Omit<RequestOptions<TData, ThrowOnError>, 'method'> &\n    Pick<Required<RequestOptions<TData, ThrowOnError>>, 'method'>,\n) => RequestResult<TData, TError, ThrowOnError>;\n\ntype BuildUrlFn = <\n  TData extends {\n    body?: unknown;\n    path?: Record<string, unknown>;\n    query?: Record<string, unknown>;\n    url: string;\n  },\n>(\n  options: TData & Options<TData>,\n) => string;\n\nexport type Client = CoreClient<RequestFn, Config, MethodFn, BuildUrlFn, SseFn> & {\n  instance: AxiosInstance;\n};\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 = ClientOptions> = (\n  override?: Config<ClientOptions & T>,\n) => Config<Required<ClientOptions> & T>;\n\nexport interface TDataShape {\n  body?: unknown;\n  headers?: unknown;\n  path?: unknown;\n  query?: unknown;\n  url: string;\n}\n\ntype OmitKeys<T, K> = Pick<T, Exclude<keyof T, K>>;\n\nexport type Options<\n  TData extends TDataShape = TDataShape,\n  ThrowOnError extends boolean = boolean,\n  TResponse = unknown,\n> = OmitKeys<RequestOptions<TResponse, ThrowOnError>, 'body' | 'path' | 'query' | 'url'> &\n  ([TData] extends [never] ? unknown : Omit<TData, 'url'>);\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-axios/base-url-number/client/utils.gen.ts",
    "content": "// 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 {\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\nconst checkForExistence = (\n  options: Pick<RequestOptions, 'auth' | 'query'> & {\n    headers: Record<any, unknown>;\n  },\n  name?: string,\n): boolean => {\n  if (!name) {\n    return false;\n  }\n  if (name in options.headers || options.query?.[name]) {\n    return true;\n  }\n  if (\n    'Cookie' in options.headers &&\n    options.headers['Cookie'] &&\n    typeof options.headers['Cookie'] === 'string'\n  ) {\n    return options.headers['Cookie'].includes(`${name}=`);\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: Record<any, unknown>;\n  }) => {\n  for (const auth of security) {\n    if (checkForExistence(options, auth.name)) {\n      continue;\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        const value = `${name}=${token}`;\n        if ('Cookie' in options.headers && options.headers['Cookie']) {\n          options.headers['Cookie'] = `${options.headers['Cookie']}; ${value}`;\n        } else {\n          options.headers['Cookie'] = value;\n        }\n        break;\n      }\n      case 'header':\n      default:\n        options.headers[name] = token;\n        break;\n    }\n  }\n};\n\nexport const buildUrl: Client['buildUrl'] = (options) => {\n  const instanceBaseUrl = options.axios?.defaults?.baseURL;\n\n  const baseUrl =\n    !!options.baseURL && typeof options.baseURL === 'string' ? options.baseURL : instanceBaseUrl;\n\n  return getUrl({\n    baseUrl: baseUrl as string,\n    path: options.path,\n    // let `paramsSerializer()` handle query params if it exists\n    query: !options.paramsSerializer ? options.query : undefined,\n    querySerializer:\n      typeof options.querySerializer === 'function'\n        ? options.querySerializer\n        : createQuerySerializer(options.querySerializer),\n    url: options.url,\n  });\n};\n\nexport const mergeConfigs = (a: Config, b: Config): Config => {\n  const config = { ...a, ...b };\n  config.headers = mergeHeaders(a.headers, b.headers);\n  return config;\n};\n\n/**\n * Special Axios headers keywords allowing to set headers by request method.\n */\nexport const axiosHeadersKeywords = [\n  'common',\n  'delete',\n  'get',\n  'head',\n  'patch',\n  'post',\n  'put',\n] as const;\n\nexport const mergeHeaders = (\n  ...headers: Array<Required<Config>['headers'] | undefined>\n): Record<any, unknown> => {\n  const mergedHeaders: Record<any, unknown> = {};\n  for (const header of headers) {\n    if (!header || typeof header !== 'object') {\n      continue;\n    }\n\n    const iterator = Object.entries(header);\n\n    for (const [key, value] of iterator) {\n      if (\n        axiosHeadersKeywords.includes(key as (typeof axiosHeadersKeywords)[number]) &&\n        typeof value === 'object'\n      ) {\n        mergedHeaders[key] = {\n          ...(mergedHeaders[key] as Record<any, unknown>),\n          ...value,\n        };\n      } else if (value === null) {\n        delete mergedHeaders[key];\n      } else if (Array.isArray(value)) {\n        for (const v of value) {\n          // @ts-expect-error\n          mergedHeaders[key] = [...(mergedHeaders[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[key] = typeof value === 'object' ? JSON.stringify(value) : (value as string);\n      }\n    }\n  }\n  return mergedHeaders;\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  ...override,\n});\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-axios/base-url-number/client.gen.ts",
    "content": "// 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: 'http://localhost:3000/base' }));\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-axios/base-url-number/core/auth.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-axios/base-url-number/core/bodySerializer.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-axios/base-url-number/core/params.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-axios/base-url-number/core/pathSerializer.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-axios/base-url-number/core/queryKeySerializer.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\n/**\n * JSON-friendly union that mirrors what Pinia Colada can hash.\n */\nexport type JsonValue =\n  | null\n  | string\n  | number\n  | boolean\n  | JsonValue[]\n  | { [key: string]: JsonValue };\n\n/**\n * Replacer that converts non-JSON values (bigint, Date, etc.) to safe substitutes.\n */\nexport const queryKeyJsonReplacer = (_key: string, value: unknown) => {\n  if (value === undefined || typeof value === 'function' || typeof value === 'symbol') {\n    return undefined;\n  }\n  if (typeof value === 'bigint') {\n    return value.toString();\n  }\n  if (value instanceof Date) {\n    return value.toISOString();\n  }\n  return value;\n};\n\n/**\n * Safely stringifies a value and parses it back into a JsonValue.\n */\nexport const stringifyToJsonValue = (input: unknown): JsonValue | undefined => {\n  try {\n    const json = JSON.stringify(input, queryKeyJsonReplacer);\n    if (json === undefined) {\n      return undefined;\n    }\n    return JSON.parse(json) as JsonValue;\n  } catch {\n    return undefined;\n  }\n};\n\n/**\n * Detects plain objects (including objects with a null prototype).\n */\nconst isPlainObject = (value: unknown): value is Record<string, unknown> => {\n  if (value === null || typeof value !== 'object') {\n    return false;\n  }\n  const prototype = Object.getPrototypeOf(value as object);\n  return prototype === Object.prototype || prototype === null;\n};\n\n/**\n * Turns URLSearchParams into a sorted JSON object for deterministic keys.\n */\nconst serializeSearchParams = (params: URLSearchParams): JsonValue => {\n  const entries = Array.from(params.entries()).sort(([a], [b]) => a.localeCompare(b));\n  const result: Record<string, JsonValue> = {};\n\n  for (const [key, value] of entries) {\n    const existing = result[key];\n    if (existing === undefined) {\n      result[key] = value;\n      continue;\n    }\n\n    if (Array.isArray(existing)) {\n      (existing as string[]).push(value);\n    } else {\n      result[key] = [existing, value];\n    }\n  }\n\n  return result;\n};\n\n/**\n * Normalizes any accepted value into a JSON-friendly shape for query keys.\n */\nexport const serializeQueryKeyValue = (value: unknown): JsonValue | undefined => {\n  if (value === null) {\n    return null;\n  }\n\n  if (typeof value === 'string' || typeof value === 'number' || typeof value === 'boolean') {\n    return value;\n  }\n\n  if (value === undefined || typeof value === 'function' || typeof value === 'symbol') {\n    return undefined;\n  }\n\n  if (typeof value === 'bigint') {\n    return value.toString();\n  }\n\n  if (value instanceof Date) {\n    return value.toISOString();\n  }\n\n  if (Array.isArray(value)) {\n    return stringifyToJsonValue(value);\n  }\n\n  if (typeof URLSearchParams !== 'undefined' && value instanceof URLSearchParams) {\n    return serializeSearchParams(value);\n  }\n\n  if (isPlainObject(value)) {\n    return stringifyToJsonValue(value);\n  }\n\n  return undefined;\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-axios/base-url-number/core/serverSentEvents.gen.ts",
    "content": "// 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 const 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            // Normalize line endings: CRLF -> LF, then CR -> LF\n            buffer = buffer.replace(/\\r\\n/g, '\\n').replace(/\\r/g, '\\n');\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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-axios/base-url-number/core/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { Auth, AuthToken } from './auth.gen';\nimport type { BodySerializer, QuerySerializer, QuerySerializerOptions } from './bodySerializer.gen';\n\nexport type HttpMethod =\n  | 'connect'\n  | 'delete'\n  | 'get'\n  | 'head'\n  | 'options'\n  | 'patch'\n  | 'post'\n  | 'put'\n  | 'trace';\n\nexport type Client<\n  RequestFn = never,\n  Config = unknown,\n  MethodFn = never,\n  BuildUrlFn = never,\n  SseFn = never,\n> = {\n  /**\n   * Returns the final request URL.\n   */\n  buildUrl: BuildUrlFn;\n  getConfig: () => Config;\n  request: RequestFn;\n  setConfig: (config: Config) => Config;\n} & {\n  [K in HttpMethod]: MethodFn;\n} & ([SseFn] extends [never] ? { sse?: never } : { sse: { [K in HttpMethod]: SseFn } });\n\nexport interface Config {\n  /**\n   * Auth token or a function returning auth token. The resolved value will be\n   * added to the request payload as defined by its `security` array.\n   */\n  auth?: ((auth: Auth) => Promise<AuthToken> | AuthToken) | AuthToken;\n  /**\n   * A function for serializing request body parameter. By default,\n   * {@link JSON.stringify()} will be used.\n   */\n  bodySerializer?: BodySerializer | null;\n  /**\n   * An object containing any HTTP headers that you want to pre-populate your\n   * `Headers` object with.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/Headers/Headers#init See more}\n   */\n  headers?:\n    | RequestInit['headers']\n    | Record<\n        string,\n        string | number | boolean | (string | number | boolean)[] | null | undefined | unknown\n      >;\n  /**\n   * The request method.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/fetch#method See more}\n   */\n  method?: Uppercase<HttpMethod>;\n  /**\n   * A function for serializing request query parameters. By default, arrays\n   * will be exploded in form style, objects will be exploded in deepObject\n   * style, and reserved characters are percent-encoded.\n   *\n   * This method will have no effect if the native `paramsSerializer()` Axios\n   * API function is used.\n   *\n   * {@link https://swagger.io/docs/specification/serialization/#query View examples}\n   */\n  querySerializer?: QuerySerializer | QuerySerializerOptions;\n  /**\n   * A function validating request data. This is useful if you want to ensure\n   * the request conforms to the desired shape, so it can be safely sent to\n   * the server.\n   */\n  requestValidator?: (data: unknown) => Promise<unknown>;\n  /**\n   * A function transforming response data before it's returned. This is useful\n   * for post-processing data, e.g. converting ISO strings into Date objects.\n   */\n  responseTransformer?: (data: unknown) => Promise<unknown>;\n  /**\n   * A function validating response data. This is useful if you want to ensure\n   * the response conforms to the desired shape, so it can be safely passed to\n   * the transformers and returned to the user.\n   */\n  responseValidator?: (data: unknown) => Promise<unknown>;\n}\n\ntype IsExactlyNeverOrNeverUndefined<T> = [T] extends [never]\n  ? true\n  : [T] extends [never | undefined]\n    ? [undefined] extends [T]\n      ? false\n      : true\n    : false;\n\nexport type OmitNever<T extends Record<string, unknown>> = {\n  [K in keyof T as IsExactlyNeverOrNeverUndefined<T[K]> extends true ? never : K]: T[K];\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-axios/base-url-number/core/utils.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-axios/base-url-number/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type { _3eNum1Период, _400, AdditionalPropertiesIntegerIssue, AdditionalPropertiesUnknownIssue, AdditionalPropertiesUnknownIssue2, AdditionalPropertiesUnknownIssue3, AdditionalPropertiesUnknownIssueWritable, AnyOfAnyAndNull, AnyOfArrays, ApiVVersionODataControllerCountData, ApiVVersionODataControllerCountResponse, ApiVVersionODataControllerCountResponses, ArrayWithAnyOfProperties, ArrayWithArray, ArrayWithBooleans, ArrayWithNumbers, ArrayWithProperties, ArrayWithReferences, ArrayWithStrings, CallToTestOrderOfParamsData, CallWithDefaultOptionalParametersData, CallWithDefaultParametersData, CallWithDescriptionsData, CallWithDuplicateResponsesData, CallWithDuplicateResponsesError, CallWithDuplicateResponsesErrors, CallWithDuplicateResponsesResponse, CallWithDuplicateResponsesResponses, CallWithNoContentResponseData, CallWithNoContentResponseResponse, CallWithNoContentResponseResponses, CallWithParametersData, CallWithResponseAndNoContentResponseData, CallWithResponseAndNoContentResponseResponse, CallWithResponseAndNoContentResponseResponses, CallWithResponseData, CallWithResponseResponse, CallWithResponseResponses, CallWithResponsesData, CallWithResponsesError, CallWithResponsesErrors, CallWithResponsesResponse, CallWithResponsesResponses, CallWithResultFromHeaderData, CallWithResultFromHeaderErrors, CallWithResultFromHeaderResponses, CallWithWeirdParameterNamesData, CamelCaseCommentWithBreaks, CharactersInDescription, ClientOptions, CollectionFormatData, CommentWithBackticks, CommentWithBackticksAndQuotes, CommentWithBreaks, CommentWithExpressionPlaceholders, CommentWithQuotes, CommentWithReservedCharacters, CommentWithSlashes, ComplexParamsData, ComplexParamsResponse, ComplexParamsResponses, ComplexTypesData, ComplexTypesErrors, ComplexTypesResponse, ComplexTypesResponses, CompositionBaseModel, CompositionExtendedModel, CompositionWithAllOfAndNullable, CompositionWithAnyOf, CompositionWithAnyOfAndNullable, CompositionWithAnyOfAnonymous, CompositionWithNestedAnyAndTypeNull, CompositionWithNestedAnyOfAndNull, CompositionWithOneOf, CompositionWithOneOfAndComplexArrayDictionary, CompositionWithOneOfAndNullable, CompositionWithOneOfAndProperties, CompositionWithOneOfAndSimpleArrayDictionary, CompositionWithOneOfAndSimpleDictionary, CompositionWithOneOfAnonymous, CompositionWithOneOfDiscriminator, ConstValue, Default, DeleteCallWithoutParametersAndResponseData, DeleteFooData, DeleteFooData2, DeleteFooData3, DeprecatedCallData, DeprecatedModel, DictionaryWithArray, DictionaryWithDictionary, DictionaryWithProperties, DictionaryWithPropertiesAndAdditionalProperties, DictionaryWithReference, DictionaryWithString, DummyAData, DummyAResponse, DummyAResponses, DummyBData, DummyBResponse, DummyBResponses, DuplicateName2Data, DuplicateName3Data, DuplicateName4Data, DuplicateNameData, EnumFromDescription, EnumWithExtensions, EnumWithNumbers, EnumWithReplacedCharacters, EnumWithStrings, EnumWithXEnumNames, ExportData, ExternalRefA, ExternalRefB, ExternalSharedModel, File, FileResponseData, FileResponseResponse, FileResponseResponses, FileWritable, FooWowData, FooWowResponses, FreeFormObjectWithAdditionalPropertiesEqEmptyObject, FreeFormObjectWithAdditionalPropertiesEqTrue, FreeFormObjectWithoutAdditionalProperties, GenericSchemaDuplicateIssue1SystemBoolean, GenericSchemaDuplicateIssue1SystemBooleanWritable, GenericSchemaDuplicateIssue1SystemString, GenericSchemaDuplicateIssue1SystemStringWritable, GetApiVbyApiVersionSimpleOperationData, GetApiVbyApiVersionSimpleOperationError, GetApiVbyApiVersionSimpleOperationErrors, GetApiVbyApiVersionSimpleOperationResponse, GetApiVbyApiVersionSimpleOperationResponses, GetCallWithOptionalParamData, GetCallWithoutParametersAndResponseData, HeadCallWithoutParametersAndResponseData, Import, ImportData, ImportResponse, ImportResponses, IoK8sApimachineryPkgApisMetaV1DeleteOptions, IoK8sApimachineryPkgApisMetaV1Preconditions, ModelCircle, ModelFromZendesk, ModelSquare, ModelThatExtends, ModelThatExtendsExtends, ModelWithAdditionalPropertiesEqTrue, ModelWithAdditionalPropertiesRef, ModelWithAnyOfConstantSizeArray, ModelWithAnyOfConstantSizeArrayAndIntersect, ModelWithAnyOfConstantSizeArrayNullable, ModelWithAnyOfConstantSizeArrayWithNSizeAndOptions, ModelWithAnyOfConstantSizeArrayWithNSizeAndOptionsWritable, ModelWithArray, ModelWithArrayReadOnlyAndWriteOnly, ModelWithArrayReadOnlyAndWriteOnlyWritable, ModelWithBackticksInDescription, ModelWithBoolean, ModelWithCircularReference, ModelWithConst, ModelWithConstantSizeArray, ModelWithDictionary, ModelWithDuplicateImports, ModelWithDuplicateProperties, ModelWithEnum, ModelWithEnumFromDescription, ModelWithEnumWithHyphen, ModelWithInteger, ModelWithNestedArrayEnums, ModelWithNestedArrayEnumsData, ModelWithNestedArrayEnumsDataBar, ModelWithNestedArrayEnumsDataFoo, ModelWithNestedCompositionEnums, ModelWithNestedEnums, ModelWithNestedProperties, ModelWithNullableObject, ModelWithNullableString, ModelWithNumericEnumUnion, ModelWithOneOfAndProperties, ModelWithOneOfEnum, ModelWithOrderedProperties, ModelWithPattern, ModelWithPatternWritable, ModelWithPrefixItemsConstantSizeArray, ModelWithProperties, ModelWithPropertiesWritable, ModelWithReadOnlyAndWriteOnly, ModelWithReadOnlyAndWriteOnlyWritable, ModelWithReference, ModelWithReferenceWritable, ModelWithString, ModelWithStringError, MultipartRequestData, MultipartResponseData, MultipartResponseResponse, MultipartResponseResponses, NestedAnyOfArraysNullable, NonAsciiæøåÆøÅöôêÊ字符串Data, NonAsciiæøåÆøÅöôêÊ字符串Response, NonAsciiæøåÆøÅöôêÊ字符串Responses, NonAsciiStringæøåÆøÅöôêÊ字符串, NullableObject, OneOfAllOfIssue, OneOfAllOfIssueWritable, OptionsCallWithoutParametersAndResponseData, Pageable, ParameterSimpleParameterUnused, PatchApiVbyApiVersionNoTagData, PatchApiVbyApiVersionNoTagResponses, PatchCallWithoutParametersAndResponseData, PostApiVbyApiVersionFormDataData, PostApiVbyApiVersionRequestBodyData, PostCallWithOptionalParamData, PostCallWithOptionalParamResponse, PostCallWithOptionalParamResponses, PostCallWithoutParametersAndResponseData, PostServiceWithEmptyTagResponse, PostServiceWithEmptyTagResponse2, PutCallWithoutParametersAndResponseData, PutWithFormUrlEncodedData, SchemaWithFormRestrictedKeys, SimpleBoolean, SimpleFile, SimpleFormData, SimpleInteger, SimpleParameter, SimpleReference, SimpleRequestBody, SimpleString, SimpleStringWithPattern, TestErrorCodeData, TestErrorCodeErrors, TestErrorCodeResponses, TypesData, TypesResponse, TypesResponses, UploadFileData, UploadFileResponse, UploadFileResponses, XFooBar } from './types.gen';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-axios/base-url-number/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type ClientOptions = {\n    baseURL: 'http://localhost:3000/base' | (string & {});\n};\n\n/**\n * Model with number-only name\n */\nexport type _400 = string;\n\n/**\n * External ref to shared model (A)\n */\nexport type ExternalRefA = ExternalSharedModel;\n\n/**\n * External ref to shared model (B)\n */\nexport type ExternalRefB = ExternalSharedModel;\n\n/**\n * Testing multiline comments in string: First line\n * Second line\n *\n * Fourth line\n */\nexport type CamelCaseCommentWithBreaks = number;\n\n/**\n * Testing multiline comments in string: First line\n * Second line\n *\n * Fourth line\n */\nexport type CommentWithBreaks = number;\n\n/**\n * Testing backticks in string: `backticks` and ```multiple backticks``` should work\n */\nexport type CommentWithBackticks = number;\n\n/**\n * Testing backticks and quotes in string: `backticks`, 'quotes', \"double quotes\" and ```multiple backticks``` should work\n */\nexport type CommentWithBackticksAndQuotes = number;\n\n/**\n * Testing slashes in string: \\backwards\\\\\\ and /forwards/// should work\n */\nexport type CommentWithSlashes = number;\n\n/**\n * Testing expression placeholders in string: ${expression} should work\n */\nexport type CommentWithExpressionPlaceholders = number;\n\n/**\n * Testing quotes in string: 'single quote''' and \"double quotes\"\"\" should work\n */\nexport type CommentWithQuotes = number;\n\n/**\n * Testing reserved characters in string: * inline * and ** inline ** should work\n */\nexport type CommentWithReservedCharacters = number;\n\n/**\n * This is a simple number\n */\nexport type SimpleInteger = number;\n\n/**\n * This is a simple boolean\n */\nexport type SimpleBoolean = boolean;\n\n/**\n * This is a simple string\n */\nexport type SimpleString = string;\n\n/**\n * A string with non-ascii (unicode) characters valid in typescript identifiers (æøåÆØÅöÔèÈ字符串)\n */\nexport type NonAsciiStringæøåÆøÅöôêÊ字符串 = string;\n\n/**\n * This is a simple file\n */\nexport type SimpleFile = Blob | File;\n\n/**\n * This is a simple reference\n */\nexport type SimpleReference = ModelWithString;\n\n/**\n * This is a simple string\n */\nexport type SimpleStringWithPattern = string | null;\n\n/**\n * This is a simple enum with strings\n */\nexport type EnumWithStrings = 'Success' | 'Warning' | 'Error' | '\\'Single Quote\\'' | '\"Double Quotes\"' | 'Non-ascii: øæåôöØÆÅÔÖ字符串';\n\nexport type EnumWithReplacedCharacters = '\\'Single Quote\\'' | '\"Double Quotes\"' | 'øæåôöØÆÅÔÖ字符串' | 3.1 | '';\n\n/**\n * This is a simple enum with numbers\n */\nexport type EnumWithNumbers = 1 | 2 | 3 | 1.1 | 1.2 | 1.3 | 100 | 200 | 300 | -100 | -200 | -300 | -1.1 | -1.2 | -1.3;\n\n/**\n * Success=1,Warning=2,Error=3\n */\nexport type EnumFromDescription = number;\n\n/**\n * This is a simple enum with numbers\n */\nexport type EnumWithExtensions = 200 | 400 | 500;\n\nexport type EnumWithXEnumNames = 0 | 1 | 2;\n\n/**\n * This is a simple array with numbers\n */\nexport type ArrayWithNumbers = Array<number>;\n\n/**\n * This is a simple array with booleans\n */\nexport type ArrayWithBooleans = Array<boolean>;\n\n/**\n * This is a simple array with strings\n */\nexport type ArrayWithStrings = Array<string>;\n\n/**\n * This is a simple array with references\n */\nexport type ArrayWithReferences = Array<ModelWithString>;\n\n/**\n * This is a simple array containing an array\n */\nexport type ArrayWithArray = Array<Array<ModelWithString>>;\n\n/**\n * This is a simple array with properties\n */\nexport type ArrayWithProperties = Array<{\n    '16x16'?: CamelCaseCommentWithBreaks;\n    bar?: string;\n}>;\n\n/**\n * This is a simple array with any of properties\n */\nexport type ArrayWithAnyOfProperties = Array<{\n    foo?: string;\n} | {\n    bar?: string;\n}>;\n\nexport type AnyOfAnyAndNull = {\n    data?: unknown | null;\n};\n\n/**\n * This is a simple array with any of properties\n */\nexport type AnyOfArrays = {\n    results?: Array<{\n        foo?: string;\n    } | {\n        bar?: string;\n    }>;\n};\n\n/**\n * This is a string dictionary\n */\nexport type DictionaryWithString = {\n    [key: string]: string;\n};\n\nexport type DictionaryWithPropertiesAndAdditionalProperties = {\n    foo?: number;\n    bar?: boolean;\n    [key: string]: string | number | boolean | undefined;\n};\n\n/**\n * This is a string reference\n */\nexport type DictionaryWithReference = {\n    [key: string]: ModelWithString;\n};\n\n/**\n * This is a complex dictionary\n */\nexport type DictionaryWithArray = {\n    [key: string]: Array<ModelWithString>;\n};\n\n/**\n * This is a string dictionary\n */\nexport type DictionaryWithDictionary = {\n    [key: string]: {\n        [key: string]: string;\n    };\n};\n\n/**\n * This is a complex dictionary\n */\nexport type DictionaryWithProperties = {\n    [key: string]: {\n        foo?: string;\n        bar?: string;\n    };\n};\n\n/**\n * This is a model with one number property\n */\nexport type ModelWithInteger = {\n    /**\n     * This is a simple number property\n     */\n    prop?: number;\n};\n\n/**\n * This is a model with one boolean property\n */\nexport type ModelWithBoolean = {\n    /**\n     * This is a simple boolean property\n     */\n    prop?: boolean;\n};\n\n/**\n * This is a model with one string property\n */\nexport type ModelWithString = {\n    /**\n     * This is a simple string property\n     */\n    prop?: string;\n};\n\n/**\n * This is a model with one string property\n */\nexport type ModelWithStringError = {\n    /**\n     * This is a simple string property\n     */\n    prop?: string;\n};\n\n/**\n * `Comment` or `VoiceComment`. The JSON object for adding voice comments to tickets is different. See [Adding voice comments to tickets](/documentation/ticketing/managing-tickets/adding-voice-comments-to-tickets)\n */\nexport type ModelFromZendesk = string;\n\n/**\n * This is a model with one string property\n */\nexport type ModelWithNullableString = {\n    /**\n     * This is a simple string property\n     */\n    nullableProp1?: string | null;\n    /**\n     * This is a simple string property\n     */\n    nullableRequiredProp1: string | null;\n    /**\n     * This is a simple string property\n     */\n    nullableProp2?: string | null;\n    /**\n     * This is a simple string property\n     */\n    nullableRequiredProp2: string | null;\n    /**\n     * This is a simple enum with strings\n     */\n    'foo_bar-enum'?: 'Success' | 'Warning' | 'Error' | 'ØÆÅ字符串';\n};\n\n/**\n * This is a model with one enum\n */\nexport type ModelWithEnum = {\n    /**\n     * This is a simple enum with strings\n     */\n    'foo_bar-enum'?: 'Success' | 'Warning' | 'Error' | 'ØÆÅ字符串';\n    /**\n     * These are the HTTP error code enums\n     */\n    statusCode?: '100' | '200 FOO' | '300 FOO_BAR' | '400 foo-bar' | '500 foo.bar' | '600 foo&bar';\n    /**\n     * Simple boolean enum\n     */\n    bool?: true;\n};\n\n/**\n * This is a model with one enum with escaped name\n */\nexport type ModelWithEnumWithHyphen = {\n    /**\n     * Foo-Bar-Baz-Qux\n     */\n    'foo-bar-baz-qux'?: '3.0';\n};\n\n/**\n * This is a model with one enum\n */\nexport type ModelWithEnumFromDescription = {\n    /**\n     * Success=1,Warning=2,Error=3\n     */\n    test?: number;\n};\n\n/**\n * This is a model with nested enums\n */\nexport type ModelWithNestedEnums = {\n    dictionaryWithEnum?: {\n        [key: string]: 'Success' | 'Warning' | 'Error';\n    };\n    dictionaryWithEnumFromDescription?: {\n        [key: string]: number;\n    };\n    arrayWithEnum?: Array<'Success' | 'Warning' | 'Error'>;\n    arrayWithDescription?: Array<number>;\n    /**\n     * This is a simple enum with strings\n     */\n    'foo_bar-enum'?: 'Success' | 'Warning' | 'Error' | 'ØÆÅ字符串';\n};\n\n/**\n * This is a model with one property containing a reference\n */\nexport type ModelWithReference = {\n    prop?: ModelWithProperties;\n};\n\n/**\n * This is a model with one property containing an array\n */\nexport type ModelWithArrayReadOnlyAndWriteOnly = {\n    prop?: Array<ModelWithReadOnlyAndWriteOnly>;\n    propWithFile?: Array<Blob | File>;\n    propWithNumber?: Array<number>;\n};\n\n/**\n * This is a model with one property containing an array\n */\nexport type ModelWithArray = {\n    prop?: Array<ModelWithString>;\n    propWithFile?: Array<Blob | File>;\n    propWithNumber?: Array<number>;\n};\n\n/**\n * This is a model with one property containing a dictionary\n */\nexport type ModelWithDictionary = {\n    prop?: {\n        [key: string]: string;\n    };\n};\n\n/**\n * This is a deprecated model with a deprecated property\n *\n * @deprecated\n */\nexport type DeprecatedModel = {\n    /**\n     * This is a deprecated property\n     *\n     * @deprecated\n     */\n    prop?: string;\n};\n\n/**\n * This is a model with one property containing a circular reference\n */\nexport type ModelWithCircularReference = {\n    prop?: ModelWithCircularReference;\n};\n\n/**\n * This is a model with one property with a 'one of' relationship\n */\nexport type CompositionWithOneOf = {\n    propA?: ModelWithString | ModelWithEnum | ModelWithArray | ModelWithDictionary;\n};\n\n/**\n * This is a model with one property with a 'one of' relationship where the options are not $ref\n */\nexport type CompositionWithOneOfAnonymous = {\n    propA?: {\n        propA?: string;\n    } | string | number;\n};\n\n/**\n * Circle\n */\nexport type ModelCircle = {\n    kind: string;\n    radius?: number;\n};\n\n/**\n * Square\n */\nexport type ModelSquare = {\n    kind: string;\n    sideLength?: number;\n};\n\n/**\n * This is a model with one property with a 'one of' relationship where the options are not $ref\n */\nexport type CompositionWithOneOfDiscriminator = ({\n    kind: 'circle';\n} & ModelCircle) | ({\n    kind: 'square';\n} & ModelSquare);\n\n/**\n * This is a model with one property with a 'any of' relationship\n */\nexport type CompositionWithAnyOf = {\n    propA?: ModelWithString | ModelWithEnum | ModelWithArray | ModelWithDictionary;\n};\n\n/**\n * This is a model with one property with a 'any of' relationship where the options are not $ref\n */\nexport type CompositionWithAnyOfAnonymous = {\n    propA?: {\n        propA?: string;\n    } | string | number;\n};\n\n/**\n * This is a model with nested 'any of' property with a type null\n */\nexport type CompositionWithNestedAnyAndTypeNull = {\n    propA?: Array<ModelWithDictionary | null> | Array<ModelWithArray | null>;\n};\n\nexport type _3eNum1Период = 'Bird' | 'Dog';\n\nexport type ConstValue = 'ConstValue';\n\n/**\n * This is a model with one property with a 'any of' relationship where the options are not $ref\n */\nexport type CompositionWithNestedAnyOfAndNull = {\n    /**\n     * Scopes\n     */\n    propA?: Array<_3eNum1Период | ConstValue> | null;\n};\n\n/**\n * This is a model with one property with a 'one of' relationship\n */\nexport type CompositionWithOneOfAndNullable = {\n    propA?: {\n        boolean?: boolean;\n    } | ModelWithEnum | ModelWithArray | ModelWithDictionary | null;\n};\n\n/**\n * This is a model that contains a simple dictionary within composition\n */\nexport type CompositionWithOneOfAndSimpleDictionary = {\n    propA?: boolean | {\n        [key: string]: number;\n    };\n};\n\n/**\n * This is a model that contains a dictionary of simple arrays within composition\n */\nexport type CompositionWithOneOfAndSimpleArrayDictionary = {\n    propA?: boolean | {\n        [key: string]: Array<boolean>;\n    };\n};\n\n/**\n * This is a model that contains a dictionary of complex arrays (composited) within composition\n */\nexport type CompositionWithOneOfAndComplexArrayDictionary = {\n    propA?: boolean | {\n        [key: string]: Array<number | string>;\n    };\n};\n\n/**\n * This is a model with one property with a 'all of' relationship\n */\nexport type CompositionWithAllOfAndNullable = {\n    propA?: ({\n        boolean?: boolean;\n    } & ModelWithEnum & ModelWithArray & ModelWithDictionary) | null;\n};\n\n/**\n * This is a model with one property with a 'any of' relationship\n */\nexport type CompositionWithAnyOfAndNullable = {\n    propA?: {\n        boolean?: boolean;\n    } | ModelWithEnum | ModelWithArray | ModelWithDictionary | null;\n};\n\n/**\n * This is a base model with two simple optional properties\n */\nexport type CompositionBaseModel = {\n    firstName?: string;\n    lastname?: string;\n};\n\n/**\n * This is a model that extends the base model\n */\nexport type CompositionExtendedModel = CompositionBaseModel & {\n    age: number;\n    firstName: string;\n    lastname: string;\n};\n\n/**\n * This is a model with one nested property\n */\nexport type ModelWithProperties = {\n    required: string;\n    readonly requiredAndReadOnly: string;\n    requiredAndNullable: string | null;\n    string?: string;\n    number?: number;\n    boolean?: boolean;\n    reference?: ModelWithString;\n    'property with space'?: string;\n    default?: string;\n    try?: string;\n    readonly '@namespace.string'?: string;\n    readonly '@namespace.integer'?: number;\n};\n\n/**\n * This is a model with one nested property\n */\nexport type ModelWithNestedProperties = {\n    readonly first: {\n        readonly second: {\n            readonly third: string | null;\n        } | null;\n    } | null;\n};\n\n/**\n * This is a model with duplicated properties\n */\nexport type ModelWithDuplicateProperties = {\n    prop?: ModelWithString;\n};\n\n/**\n * This is a model with ordered properties\n */\nexport type ModelWithOrderedProperties = {\n    zebra?: string;\n    apple?: string;\n    hawaii?: string;\n};\n\n/**\n * This is a model with duplicated imports\n */\nexport type ModelWithDuplicateImports = {\n    propA?: ModelWithString;\n    propB?: ModelWithString;\n    propC?: ModelWithString;\n};\n\n/**\n * This is a model that extends another model\n */\nexport type ModelThatExtends = ModelWithString & {\n    propExtendsA?: string;\n    propExtendsB?: ModelWithString;\n};\n\n/**\n * This is a model that extends another model\n */\nexport type ModelThatExtendsExtends = ModelWithString & ModelThatExtends & {\n    propExtendsC?: string;\n    propExtendsD?: ModelWithString;\n};\n\n/**\n * This is a model that contains a some patterns\n */\nexport type ModelWithPattern = {\n    key: string;\n    name: string;\n    readonly enabled?: boolean;\n    readonly modified?: string;\n    id?: string;\n    text?: string;\n    patternWithSingleQuotes?: string;\n    patternWithNewline?: string;\n    patternWithBacktick?: string;\n    patternWithUnicode?: string;\n};\n\nexport type File = {\n    /**\n     * Id\n     */\n    readonly id?: string;\n    /**\n     * Updated at\n     */\n    readonly updated_at?: string;\n    /**\n     * Created at\n     */\n    readonly created_at?: string;\n    /**\n     * Mime\n     */\n    mime: string;\n    /**\n     * File\n     */\n    readonly file?: string;\n};\n\nexport type Default = {\n    name?: string;\n};\n\nexport type Pageable = {\n    page?: number;\n    size?: number;\n    sort?: Array<string>;\n};\n\n/**\n * This is a free-form object without additionalProperties.\n */\nexport type FreeFormObjectWithoutAdditionalProperties = {\n    [key: string]: unknown;\n};\n\n/**\n * This is a free-form object with additionalProperties: true.\n */\nexport type FreeFormObjectWithAdditionalPropertiesEqTrue = {\n    [key: string]: unknown;\n};\n\n/**\n * This is a free-form object with additionalProperties: {}.\n */\nexport type FreeFormObjectWithAdditionalPropertiesEqEmptyObject = {\n    [key: string]: unknown;\n};\n\nexport type ModelWithConst = {\n    String?: 'String';\n    number?: 0;\n    null?: null;\n    withType?: 'Some string';\n};\n\n/**\n * This is a model with one property and additionalProperties: true\n */\nexport type ModelWithAdditionalPropertiesEqTrue = {\n    /**\n     * This is a simple string property\n     */\n    prop?: string;\n    [key: string]: unknown;\n};\n\nexport type NestedAnyOfArraysNullable = {\n    nullableArray?: Array<string | boolean> | null;\n};\n\nexport type CompositionWithOneOfAndProperties = ({\n    foo: SimpleParameter;\n} | {\n    bar: NonAsciiStringæøåÆøÅöôêÊ字符串;\n}) & {\n    baz: number | null;\n    qux: number;\n};\n\n/**\n * An object that can be null\n */\nexport type NullableObject = {\n    foo?: string;\n} | null;\n\n/**\n * Some % character\n */\nexport type CharactersInDescription = string;\n\nexport type ModelWithNullableObject = {\n    data?: NullableObject;\n};\n\n/**\n * An object with additional properties that can be null (anyOf ref + null)\n */\nexport type ModelWithAdditionalPropertiesRef = {\n    [key: string]: NullableObject | null;\n};\n\nexport type ModelWithOneOfEnum = {\n    foo: 'Bar';\n} | {\n    foo: 'Baz';\n} | {\n    foo: 'Qux';\n} | {\n    content: string;\n    foo: 'Quux';\n} | {\n    content: [\n        string,\n        string\n    ];\n    foo: 'Corge';\n};\n\nexport type ModelWithNestedArrayEnumsDataFoo = 'foo' | 'bar';\n\nexport type ModelWithNestedArrayEnumsDataBar = 'baz' | 'qux';\n\nexport type ModelWithNestedArrayEnumsData = {\n    foo?: Array<ModelWithNestedArrayEnumsDataFoo>;\n    bar?: Array<ModelWithNestedArrayEnumsDataBar>;\n};\n\nexport type ModelWithNestedArrayEnums = {\n    array_strings?: Array<string>;\n    data?: ModelWithNestedArrayEnumsData;\n};\n\nexport type ModelWithNestedCompositionEnums = {\n    foo?: ModelWithNestedArrayEnumsDataFoo;\n};\n\nexport type ModelWithReadOnlyAndWriteOnly = {\n    foo: string;\n    readonly bar: string;\n};\n\nexport type ModelWithConstantSizeArray = [\n    number,\n    number\n];\n\nexport type ModelWithAnyOfConstantSizeArray = [\n    number | string,\n    number | string,\n    number | string\n];\n\nexport type ModelWithPrefixItemsConstantSizeArray = [\n    ModelWithInteger,\n    number | string,\n    string\n];\n\nexport type ModelWithAnyOfConstantSizeArrayNullable = [\n    number | null | string,\n    number | null | string,\n    number | null | string\n];\n\nexport type ModelWithAnyOfConstantSizeArrayWithNSizeAndOptions = [\n    number | Import,\n    number | Import\n];\n\nexport type ModelWithAnyOfConstantSizeArrayAndIntersect = [\n    number & string,\n    number & string\n];\n\nexport type ModelWithNumericEnumUnion = {\n    /**\n     * Период\n     */\n    value?: -10 | -1 | 0 | 1 | 3 | 6 | 12;\n};\n\n/**\n * Some description with `back ticks`\n */\nexport type ModelWithBackticksInDescription = {\n    /**\n     * The template `that` should be used for parsing and importing the contents of the CSV file.\n     *\n     * <br/><p>There is one placeholder currently supported:<ul>     <li><b>${x}</b> - refers to the n-th column in the CSV file, e.g. ${1}, ${2}, ...)</li></ul><p>Example of a correct JSON template:</p>\n     * <pre>\n     * [\n     * {\n     * \"resourceType\": \"Asset\",\n     * \"identifier\": {\n     * \"name\": \"${1}\",\n     * \"domain\": {\n     * \"name\": \"${2}\",\n     * \"community\": {\n     * \"name\": \"Some Community\"\n     * }\n     * }\n     * },\n     * \"attributes\" : {\n     * \"00000000-0000-0000-0000-000000003115\" : [ {\n     * \"value\" : \"${3}\"\n     * } ],\n     * \"00000000-0000-0000-0000-000000000222\" : [ {\n     * \"value\" : \"${4}\"\n     * } ]\n     * }\n     * }\n     * ]\n     * </pre>\n     */\n    template?: string;\n};\n\nexport type ModelWithOneOfAndProperties = (SimpleParameter | NonAsciiStringæøåÆøÅöôêÊ字符串) & {\n    baz: number | null;\n    qux: number;\n};\n\n/**\n * Model used to test deduplication strategy (unused)\n */\nexport type ParameterSimpleParameterUnused = string;\n\n/**\n * Model used to test deduplication strategy\n */\nexport type PostServiceWithEmptyTagResponse = string;\n\n/**\n * Model used to test deduplication strategy\n */\nexport type PostServiceWithEmptyTagResponse2 = string;\n\n/**\n * Model used to test deduplication strategy\n */\nexport type DeleteFooData = string;\n\n/**\n * Model used to test deduplication strategy\n */\nexport type DeleteFooData2 = string;\n\n/**\n * Model with restricted keyword name\n */\nexport type Import = string;\n\nexport type SchemaWithFormRestrictedKeys = {\n    description?: string;\n    'x-enum-descriptions'?: string;\n    'x-enum-varnames'?: string;\n    'x-enumNames'?: string;\n    title?: string;\n    object?: {\n        description?: string;\n        'x-enum-descriptions'?: string;\n        'x-enum-varnames'?: string;\n        'x-enumNames'?: string;\n        title?: string;\n    };\n    array?: Array<{\n        description?: string;\n        'x-enum-descriptions'?: string;\n        'x-enum-varnames'?: string;\n        'x-enumNames'?: string;\n        title?: string;\n    }>;\n};\n\n/**\n * This schema was giving PascalCase transformations a hard time\n */\nexport type IoK8sApimachineryPkgApisMetaV1DeleteOptions = {\n    /**\n     * Must be fulfilled before a deletion is carried out. If not possible, a 409 Conflict status will be returned.\n     */\n    preconditions?: IoK8sApimachineryPkgApisMetaV1Preconditions;\n};\n\n/**\n * This schema was giving PascalCase transformations a hard time\n */\nexport type IoK8sApimachineryPkgApisMetaV1Preconditions = {\n    /**\n     * Specifies the target ResourceVersion\n     */\n    resourceVersion?: string;\n    /**\n     * Specifies the target UID.\n     */\n    uid?: string;\n};\n\nexport type AdditionalPropertiesUnknownIssue = {\n    [key: string]: string | number;\n};\n\nexport type AdditionalPropertiesUnknownIssue2 = {\n    [key: string]: string | number;\n};\n\nexport type AdditionalPropertiesUnknownIssue3 = string & {\n    entries: {\n        [key: string]: AdditionalPropertiesUnknownIssue;\n    };\n};\n\nexport type AdditionalPropertiesIntegerIssue = {\n    value: number;\n    [key: string]: number;\n};\n\nexport type OneOfAllOfIssue = ((ConstValue | GenericSchemaDuplicateIssue1SystemBoolean) & _3eNum1Период) | GenericSchemaDuplicateIssue1SystemString;\n\nexport type GenericSchemaDuplicateIssue1SystemBoolean = {\n    item?: boolean;\n    error?: string | null;\n    readonly hasError?: boolean;\n    data?: {\n        [key: string]: never;\n    };\n};\n\nexport type GenericSchemaDuplicateIssue1SystemString = {\n    item?: string | null;\n    error?: string | null;\n    readonly hasError?: boolean;\n};\n\nexport type ExternalSharedModel = {\n    id: string;\n    name?: string;\n};\n\n/**\n * This is a model with one property containing a reference\n */\nexport type ModelWithReferenceWritable = {\n    prop?: ModelWithPropertiesWritable;\n};\n\n/**\n * This is a model with one property containing an array\n */\nexport type ModelWithArrayReadOnlyAndWriteOnlyWritable = {\n    prop?: Array<ModelWithReadOnlyAndWriteOnlyWritable>;\n    propWithFile?: Array<Blob | File>;\n    propWithNumber?: Array<number>;\n};\n\n/**\n * This is a model with one nested property\n */\nexport type ModelWithPropertiesWritable = {\n    required: string;\n    requiredAndNullable: string | null;\n    string?: string;\n    number?: number;\n    boolean?: boolean;\n    reference?: ModelWithString;\n    'property with space'?: string;\n    default?: string;\n    try?: string;\n};\n\n/**\n * This is a model that contains a some patterns\n */\nexport type ModelWithPatternWritable = {\n    key: string;\n    name: string;\n    id?: string;\n    text?: string;\n    patternWithSingleQuotes?: string;\n    patternWithNewline?: string;\n    patternWithBacktick?: string;\n    patternWithUnicode?: string;\n};\n\nexport type FileWritable = {\n    /**\n     * Mime\n     */\n    mime: string;\n};\n\nexport type ModelWithReadOnlyAndWriteOnlyWritable = {\n    foo: string;\n    baz: string;\n};\n\nexport type ModelWithAnyOfConstantSizeArrayWithNSizeAndOptionsWritable = [\n    number | Import,\n    number | Import\n];\n\nexport type AdditionalPropertiesUnknownIssueWritable = {\n    [key: string]: string | number;\n};\n\nexport type OneOfAllOfIssueWritable = ((ConstValue | GenericSchemaDuplicateIssue1SystemBoolean) & _3eNum1Период) | GenericSchemaDuplicateIssue1SystemString;\n\nexport type GenericSchemaDuplicateIssue1SystemBooleanWritable = {\n    item?: boolean;\n    error?: string | null;\n    data?: {\n        [key: string]: never;\n    };\n};\n\nexport type GenericSchemaDuplicateIssue1SystemStringWritable = {\n    item?: string | null;\n    error?: string | null;\n};\n\n/**\n * This is a reusable parameter\n */\nexport type SimpleParameter = string;\n\n/**\n * Parameter with illegal characters\n */\nexport type XFooBar = ModelWithString;\n\n/**\n * A reusable request body\n */\nexport type SimpleRequestBody = ModelWithString;\n\n/**\n * A reusable request body\n */\nexport type SimpleFormData = ModelWithString;\n\nexport type ExportData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no+tag';\n};\n\nexport type PatchApiVbyApiVersionNoTagData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no+tag';\n};\n\nexport type PatchApiVbyApiVersionNoTagResponses = {\n    /**\n     * OK\n     */\n    default: unknown;\n};\n\nexport type ImportData = {\n    body: ModelWithReadOnlyAndWriteOnlyWritable | ModelWithArrayReadOnlyAndWriteOnlyWritable;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no+tag';\n};\n\nexport type ImportResponses = {\n    /**\n     * Success\n     */\n    200: ModelFromZendesk;\n    /**\n     * Default success response\n     */\n    default: ModelWithReadOnlyAndWriteOnly;\n};\n\nexport type ImportResponse = ImportResponses[keyof ImportResponses];\n\nexport type FooWowData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no+tag';\n};\n\nexport type FooWowResponses = {\n    /**\n     * OK\n     */\n    default: unknown;\n};\n\nexport type ApiVVersionODataControllerCountData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple/$count';\n};\n\nexport type ApiVVersionODataControllerCountResponses = {\n    /**\n     * Success\n     */\n    200: ModelFromZendesk;\n};\n\nexport type ApiVVersionODataControllerCountResponse = ApiVVersionODataControllerCountResponses[keyof ApiVVersionODataControllerCountResponses];\n\nexport type GetApiVbyApiVersionSimpleOperationData = {\n    body?: never;\n    path: {\n        /**\n         * foo in method\n         */\n        foo_param: string;\n    };\n    query?: never;\n    url: '/api/v{api-version}/simple:operation';\n};\n\nexport type GetApiVbyApiVersionSimpleOperationErrors = {\n    /**\n     * Default error response\n     */\n    default: ModelWithBoolean;\n};\n\nexport type GetApiVbyApiVersionSimpleOperationError = GetApiVbyApiVersionSimpleOperationErrors[keyof GetApiVbyApiVersionSimpleOperationErrors];\n\nexport type GetApiVbyApiVersionSimpleOperationResponses = {\n    /**\n     * Response is a simple number\n     */\n    200: number;\n};\n\nexport type GetApiVbyApiVersionSimpleOperationResponse = GetApiVbyApiVersionSimpleOperationResponses[keyof GetApiVbyApiVersionSimpleOperationResponses];\n\nexport type DeleteCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type GetCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type HeadCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type OptionsCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type PatchCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type PostCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type PutCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type DeleteFooData3 = {\n    body?: never;\n    headers: {\n        /**\n         * Parameter with illegal characters\n         */\n        'x-Foo-Bar': ModelWithString;\n    };\n    path: {\n        /**\n         * foo in method\n         */\n        foo_param: string;\n        /**\n         * bar in method\n         */\n        BarParam: string;\n    };\n    query?: never;\n    url: '/api/v{api-version}/foo/{foo_param}/bar/{BarParam}';\n};\n\nexport type CallWithDescriptionsData = {\n    body?: never;\n    path?: never;\n    query?: {\n        /**\n         * Testing multiline comments in string: First line\n         * Second line\n         *\n         * Fourth line\n         */\n        parameterWithBreaks?: string;\n        /**\n         * Testing backticks in string: `backticks` and ```multiple backticks``` should work\n         */\n        parameterWithBackticks?: string;\n        /**\n         * Testing slashes in string: \\backwards\\\\\\ and /forwards/// should work\n         */\n        parameterWithSlashes?: string;\n        /**\n         * Testing expression placeholders in string: ${expression} should work\n         */\n        parameterWithExpressionPlaceholders?: string;\n        /**\n         * Testing quotes in string: 'single quote''' and \"double quotes\"\"\" should work\n         */\n        parameterWithQuotes?: string;\n        /**\n         * Testing reserved characters in string: * inline * and ** inline ** should work\n         */\n        parameterWithReservedCharacters?: string;\n    };\n    url: '/api/v{api-version}/descriptions';\n};\n\nexport type DeprecatedCallData = {\n    body?: never;\n    headers: {\n        /**\n         * This parameter is deprecated\n         *\n         * @deprecated\n         */\n        parameter: DeprecatedModel | null;\n    };\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/parameters/deprecated';\n};\n\nexport type CallWithParametersData = {\n    /**\n     * This is the parameter that goes into the body\n     */\n    body: {\n        [key: string]: unknown;\n    } | null;\n    headers: {\n        /**\n         * This is the parameter that goes into the header\n         */\n        parameterHeader: string | null;\n    };\n    path: {\n        /**\n         * This is the parameter that goes into the path\n         */\n        parameterPath: string | null;\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string | null;\n    };\n    query: {\n        foo_ref_enum?: ModelWithNestedArrayEnumsDataFoo;\n        foo_all_of_enum: ModelWithNestedArrayEnumsDataFoo;\n        /**\n         * This is the parameter that goes into the query params\n         */\n        cursor: string | null;\n    };\n    url: '/api/v{api-version}/parameters/{parameterPath}';\n};\n\nexport type CallWithWeirdParameterNamesData = {\n    /**\n     * This is the parameter that goes into the body\n     */\n    body: ModelWithString | null;\n    headers: {\n        /**\n         * This is the parameter that goes into the request header\n         */\n        'parameter.header': string | null;\n    };\n    path: {\n        /**\n         * This is the parameter that goes into the path\n         */\n        'parameter.path.1'?: string;\n        /**\n         * This is the parameter that goes into the path\n         */\n        'parameter-path-2'?: string;\n        /**\n         * This is the parameter that goes into the path\n         */\n        'PARAMETER-PATH-3'?: string;\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string | null;\n    };\n    query: {\n        /**\n         * This is the parameter with a reserved keyword\n         */\n        default?: string;\n        /**\n         * This is the parameter that goes into the request query params\n         */\n        'parameter-query': string | null;\n    };\n    url: '/api/v{api-version}/parameters/{parameter.path.1}/{parameter-path-2}/{PARAMETER-PATH-3}';\n};\n\nexport type GetCallWithOptionalParamData = {\n    /**\n     * This is a required parameter\n     */\n    body: ModelWithOneOfEnum;\n    path?: never;\n    query?: {\n        /**\n         * This is an optional parameter\n         */\n        page?: number;\n    };\n    url: '/api/v{api-version}/parameters';\n};\n\nexport type PostCallWithOptionalParamData = {\n    /**\n     * This is an optional parameter\n     */\n    body?: {\n        offset?: number | null;\n    };\n    path?: never;\n    query: {\n        /**\n         * This is a required parameter\n         */\n        parameter: Pageable;\n    };\n    url: '/api/v{api-version}/parameters';\n};\n\nexport type PostCallWithOptionalParamResponses = {\n    /**\n     * Response is a simple number\n     */\n    200: number;\n    /**\n     * Success\n     */\n    204: void;\n};\n\nexport type PostCallWithOptionalParamResponse = PostCallWithOptionalParamResponses[keyof PostCallWithOptionalParamResponses];\n\nexport type PostApiVbyApiVersionRequestBodyData = {\n    /**\n     * A reusable request body\n     */\n    body?: SimpleRequestBody;\n    path?: never;\n    query?: {\n        /**\n         * This is a reusable parameter\n         */\n        parameter?: string;\n    };\n    url: '/api/v{api-version}/requestBody';\n};\n\nexport type PostApiVbyApiVersionFormDataData = {\n    /**\n     * A reusable request body\n     */\n    body?: SimpleFormData;\n    path?: never;\n    query?: {\n        /**\n         * This is a reusable parameter\n         */\n        parameter?: string;\n    };\n    url: '/api/v{api-version}/formData';\n};\n\nexport type CallWithDefaultParametersData = {\n    body?: never;\n    path?: never;\n    query?: {\n        /**\n         * This is a simple string with default value\n         */\n        parameterString?: string | null;\n        /**\n         * This is a simple number with default value\n         */\n        parameterNumber?: number | null;\n        /**\n         * This is a simple boolean with default value\n         */\n        parameterBoolean?: boolean | null;\n        /**\n         * This is a simple enum with default value\n         */\n        parameterEnum?: 'Success' | 'Warning' | 'Error';\n        /**\n         * This is a simple model with default value\n         */\n        parameterModel?: ModelWithString | null;\n    };\n    url: '/api/v{api-version}/defaults';\n};\n\nexport type CallWithDefaultOptionalParametersData = {\n    body?: never;\n    path?: never;\n    query?: {\n        /**\n         * This is a simple string that is optional with default value\n         */\n        parameterString?: string;\n        /**\n         * This is a simple number that is optional with default value\n         */\n        parameterNumber?: number;\n        /**\n         * This is a simple boolean that is optional with default value\n         */\n        parameterBoolean?: boolean;\n        /**\n         * This is a simple enum that is optional with default value\n         */\n        parameterEnum?: 'Success' | 'Warning' | 'Error';\n        /**\n         * This is a simple model that is optional with default value\n         */\n        parameterModel?: ModelWithString;\n    };\n    url: '/api/v{api-version}/defaults';\n};\n\nexport type CallToTestOrderOfParamsData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * This is a optional string with default\n         */\n        parameterOptionalStringWithDefault?: string;\n        /**\n         * This is a optional string with empty default\n         */\n        parameterOptionalStringWithEmptyDefault?: string;\n        /**\n         * This is a optional string with no default\n         */\n        parameterOptionalStringWithNoDefault?: string;\n        /**\n         * This is a string with default\n         */\n        parameterStringWithDefault: string;\n        /**\n         * This is a string with empty default\n         */\n        parameterStringWithEmptyDefault: string;\n        /**\n         * This is a string with no default\n         */\n        parameterStringWithNoDefault: string;\n        /**\n         * This is a string that can be null with no default\n         */\n        parameterStringNullableWithNoDefault?: string | null;\n        /**\n         * This is a string that can be null with default\n         */\n        parameterStringNullableWithDefault?: string | null;\n    };\n    url: '/api/v{api-version}/defaults';\n};\n\nexport type DuplicateNameData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/duplicate';\n};\n\nexport type DuplicateName2Data = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/duplicate';\n};\n\nexport type DuplicateName3Data = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/duplicate';\n};\n\nexport type DuplicateName4Data = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/duplicate';\n};\n\nexport type CallWithNoContentResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no-content';\n};\n\nexport type CallWithNoContentResponseResponses = {\n    /**\n     * Success\n     */\n    204: void;\n};\n\nexport type CallWithNoContentResponseResponse = CallWithNoContentResponseResponses[keyof CallWithNoContentResponseResponses];\n\nexport type CallWithResponseAndNoContentResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multiple-tags/response-and-no-content';\n};\n\nexport type CallWithResponseAndNoContentResponseResponses = {\n    /**\n     * Response is a simple number\n     */\n    200: number;\n    /**\n     * Success\n     */\n    204: void;\n};\n\nexport type CallWithResponseAndNoContentResponseResponse = CallWithResponseAndNoContentResponseResponses[keyof CallWithResponseAndNoContentResponseResponses];\n\nexport type DummyAData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multiple-tags/a';\n};\n\nexport type DummyAResponses = {\n    200: _400;\n};\n\nexport type DummyAResponse = DummyAResponses[keyof DummyAResponses];\n\nexport type DummyBData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multiple-tags/b';\n};\n\nexport type DummyBResponses = {\n    /**\n     * Success\n     */\n    204: void;\n};\n\nexport type DummyBResponse = DummyBResponses[keyof DummyBResponses];\n\nexport type CallWithResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/response';\n};\n\nexport type CallWithResponseResponses = {\n    default: Import;\n};\n\nexport type CallWithResponseResponse = CallWithResponseResponses[keyof CallWithResponseResponses];\n\nexport type CallWithDuplicateResponsesData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/response';\n};\n\nexport type CallWithDuplicateResponsesErrors = {\n    /**\n     * Message for 500 error\n     */\n    500: ModelWithStringError;\n    /**\n     * Message for 501 error\n     */\n    501: ModelWithStringError;\n    /**\n     * Message for 502 error\n     */\n    502: ModelWithStringError;\n    /**\n     * Message for 4XX errors\n     */\n    '4XX': DictionaryWithArray;\n    /**\n     * Default error response\n     */\n    default: ModelWithBoolean;\n};\n\nexport type CallWithDuplicateResponsesError = CallWithDuplicateResponsesErrors[keyof CallWithDuplicateResponsesErrors];\n\nexport type CallWithDuplicateResponsesResponses = {\n    /**\n     * Message for 200 response\n     */\n    200: ModelWithBoolean & ModelWithInteger;\n    /**\n     * Message for 201 response\n     */\n    201: ModelWithString;\n    /**\n     * Message for 202 response\n     */\n    202: ModelWithString;\n};\n\nexport type CallWithDuplicateResponsesResponse = CallWithDuplicateResponsesResponses[keyof CallWithDuplicateResponsesResponses];\n\nexport type CallWithResponsesData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/response';\n};\n\nexport type CallWithResponsesErrors = {\n    /**\n     * Message for 500 error\n     */\n    500: ModelWithStringError;\n    /**\n     * Message for 501 error\n     */\n    501: ModelWithStringError;\n    /**\n     * Message for 502 error\n     */\n    502: ModelWithStringError;\n    /**\n     * Message for default response\n     */\n    default: ModelWithStringError;\n};\n\nexport type CallWithResponsesError = CallWithResponsesErrors[keyof CallWithResponsesErrors];\n\nexport type CallWithResponsesResponses = {\n    /**\n     * Message for 200 response\n     */\n    200: {\n        readonly '@namespace.string'?: string;\n        readonly '@namespace.integer'?: number;\n        readonly value?: Array<ModelWithString>;\n    };\n    /**\n     * Message for 201 response\n     */\n    201: ModelThatExtends;\n    /**\n     * Message for 202 response\n     */\n    202: ModelThatExtendsExtends;\n};\n\nexport type CallWithResponsesResponse = CallWithResponsesResponses[keyof CallWithResponsesResponses];\n\nexport type CollectionFormatData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * This is an array parameter that is sent as csv format (comma-separated values)\n         */\n        parameterArrayCSV: Array<string> | null;\n        /**\n         * This is an array parameter that is sent as ssv format (space-separated values)\n         */\n        parameterArraySSV: Array<string> | null;\n        /**\n         * This is an array parameter that is sent as tsv format (tab-separated values)\n         */\n        parameterArrayTSV: Array<string> | null;\n        /**\n         * This is an array parameter that is sent as pipes format (pipe-separated values)\n         */\n        parameterArrayPipes: Array<string> | null;\n        /**\n         * This is an array parameter that is sent as multi format (multiple parameter instances)\n         */\n        parameterArrayMulti: Array<string> | null;\n    };\n    url: '/api/v{api-version}/collectionFormat';\n};\n\nexport type TypesData = {\n    body?: never;\n    path?: {\n        /**\n         * This is a number parameter\n         */\n        id?: number;\n    };\n    query: {\n        /**\n         * This is a number parameter\n         */\n        parameterNumber: number;\n        /**\n         * This is a string parameter\n         */\n        parameterString: string | null;\n        /**\n         * This is a boolean parameter\n         */\n        parameterBoolean: boolean | null;\n        /**\n         * This is an object parameter\n         */\n        parameterObject: {\n            [key: string]: unknown;\n        } | null;\n        /**\n         * This is an array parameter\n         */\n        parameterArray: Array<string> | null;\n        /**\n         * This is a dictionary parameter\n         */\n        parameterDictionary: {\n            [key: string]: unknown;\n        } | null;\n        /**\n         * This is an enum parameter\n         */\n        parameterEnum: 'Success' | 'Warning' | 'Error' | null;\n    };\n    url: '/api/v{api-version}/types';\n};\n\nexport type TypesResponses = {\n    /**\n     * Response is a simple number\n     */\n    200: number;\n    /**\n     * Response is a simple string\n     */\n    201: string;\n    /**\n     * Response is a simple boolean\n     */\n    202: boolean;\n    /**\n     * Response is a simple object\n     */\n    203: {\n        [key: string]: unknown;\n    };\n};\n\nexport type TypesResponse = TypesResponses[keyof TypesResponses];\n\nexport type UploadFileData = {\n    body: Blob | File;\n    path: {\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string | null;\n    };\n    query?: never;\n    url: '/api/v{api-version}/upload';\n};\n\nexport type UploadFileResponses = {\n    200: boolean;\n};\n\nexport type UploadFileResponse = UploadFileResponses[keyof UploadFileResponses];\n\nexport type FileResponseData = {\n    body?: never;\n    path: {\n        id: string;\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string;\n    };\n    query?: never;\n    url: '/api/v{api-version}/file/{id}';\n};\n\nexport type FileResponseResponses = {\n    /**\n     * Success\n     */\n    200: Blob | File;\n};\n\nexport type FileResponseResponse = FileResponseResponses[keyof FileResponseResponses];\n\nexport type ComplexTypesData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * Parameter containing object\n         */\n        parameterObject: {\n            first?: {\n                second?: {\n                    third?: string;\n                };\n            };\n        };\n        /**\n         * Parameter containing reference\n         */\n        parameterReference: ModelWithString;\n    };\n    url: '/api/v{api-version}/complex';\n};\n\nexport type ComplexTypesErrors = {\n    /**\n     * 400 `server` error\n     */\n    400: unknown;\n    /**\n     * 500 server error\n     */\n    500: unknown;\n};\n\nexport type ComplexTypesResponses = {\n    /**\n     * Successful response\n     */\n    200: Array<ModelWithString>;\n};\n\nexport type ComplexTypesResponse = ComplexTypesResponses[keyof ComplexTypesResponses];\n\nexport type MultipartResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multipart';\n};\n\nexport type MultipartResponseResponses = {\n    /**\n     * OK\n     */\n    200: {\n        file?: Blob | File;\n        metadata?: {\n            foo?: string;\n            bar?: string;\n        };\n    };\n};\n\nexport type MultipartResponseResponse = MultipartResponseResponses[keyof MultipartResponseResponses];\n\nexport type MultipartRequestData = {\n    body?: {\n        content?: Blob | File;\n        data?: ModelWithString | null;\n    };\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multipart';\n};\n\nexport type ComplexParamsData = {\n    body?: {\n        readonly key: string | null;\n        name: string | null;\n        enabled?: boolean;\n        type: 'Monkey' | 'Horse' | 'Bird';\n        listOfModels?: Array<ModelWithString> | null;\n        listOfStrings?: Array<string> | null;\n        parameters: ModelWithString | ModelWithEnum | ModelWithArray | ModelWithDictionary;\n        readonly user?: {\n            readonly id?: number;\n            readonly name?: string | null;\n        };\n    };\n    path: {\n        id: number;\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string;\n    };\n    query?: never;\n    url: '/api/v{api-version}/complex/{id}';\n};\n\nexport type ComplexParamsResponses = {\n    /**\n     * Success\n     */\n    200: ModelWithString;\n};\n\nexport type ComplexParamsResponse = ComplexParamsResponses[keyof ComplexParamsResponses];\n\nexport type CallWithResultFromHeaderData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/header';\n};\n\nexport type CallWithResultFromHeaderErrors = {\n    /**\n     * 400 server error\n     */\n    400: unknown;\n    /**\n     * 500 server error\n     */\n    500: unknown;\n};\n\nexport type CallWithResultFromHeaderResponses = {\n    /**\n     * Successful response\n     */\n    200: unknown;\n};\n\nexport type TestErrorCodeData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * Status code to return\n         */\n        status: number;\n    };\n    url: '/api/v{api-version}/error';\n};\n\nexport type TestErrorCodeErrors = {\n    /**\n     * Custom message: Internal Server Error\n     */\n    500: unknown;\n    /**\n     * Custom message: Not Implemented\n     */\n    501: unknown;\n    /**\n     * Custom message: Bad Gateway\n     */\n    502: unknown;\n    /**\n     * Custom message: Service Unavailable\n     */\n    503: unknown;\n};\n\nexport type TestErrorCodeResponses = {\n    /**\n     * Custom message: Successful response\n     */\n    200: unknown;\n};\n\nexport type NonAsciiæøåÆøÅöôêÊ字符串Data = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * Dummy input param\n         */\n        nonAsciiParamæøåÆØÅöôêÊ: number;\n    };\n    url: '/api/v{api-version}/non-ascii-æøåÆØÅöôêÊ字符串';\n};\n\nexport type NonAsciiæøåÆøÅöôêÊ字符串Responses = {\n    /**\n     * Successful response\n     */\n    200: Array<NonAsciiStringæøåÆøÅöôêÊ字符串>;\n};\n\nexport type NonAsciiæøåÆøÅöôêÊ字符串Response = NonAsciiæøåÆøÅöôêÊ字符串Responses[keyof NonAsciiæøåÆøÅöôêÊ字符串Responses];\n\nexport type PutWithFormUrlEncodedData = {\n    body: ArrayWithStrings;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/non-ascii-æøåÆØÅöôêÊ字符串';\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-axios/base-url-strict/client/client.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { AxiosError, AxiosInstance, RawAxiosRequestHeaders } from 'axios';\nimport axios from 'axios';\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 } from './types.gen';\nimport { buildUrl, createConfig, mergeConfigs, mergeHeaders, setAuthParams } from './utils.gen';\n\nexport const createClient = (config: Config = {}): Client => {\n  let _config = mergeConfigs(createConfig(), config);\n\n  let instance: AxiosInstance;\n\n  if (_config.axios && !('Axios' in _config.axios)) {\n    instance = _config.axios;\n  } else {\n    // eslint-disable-next-line @typescript-eslint/no-unused-vars\n    const { auth, ...configWithoutAuth } = _config;\n    instance = axios.create(configWithoutAuth);\n  }\n\n  const getConfig = (): Config => ({ ..._config });\n\n  const setConfig = (config: Config): Config => {\n    _config = mergeConfigs(_config, config);\n    instance.defaults = {\n      ...instance.defaults,\n      ..._config,\n      // @ts-expect-error\n      headers: mergeHeaders(instance.defaults.headers, _config.headers),\n    };\n    return getConfig();\n  };\n\n  const beforeRequest = async (options: RequestOptions) => {\n    const opts = {\n      ..._config,\n      ...options,\n      axios: options.axios ?? _config.axios ?? instance,\n      headers: mergeHeaders(_config.headers, options.headers),\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.body = opts.bodySerializer(opts.body);\n    }\n\n    const url = buildUrl(opts);\n\n    return { opts, url };\n  };\n\n  // @ts-expect-error\n  const request: Client['request'] = async (options) => {\n    // @ts-expect-error\n    const { opts, url } = await beforeRequest(options);\n    try {\n      // assign Axios here for consistency with fetch\n      const _axios = opts.axios!;\n      // eslint-disable-next-line @typescript-eslint/no-unused-vars\n      const { auth, ...optsWithoutAuth } = opts;\n      const response = await _axios({\n        ...optsWithoutAuth,\n        baseURL: '', // the baseURL is already included in `url`\n        data: getValidRequestBody(opts),\n        headers: opts.headers as RawAxiosRequestHeaders,\n        // let `paramsSerializer()` handle query params if it exists\n        params: opts.paramsSerializer ? opts.query : undefined,\n        url,\n      });\n\n      let { data } = response;\n\n      if (opts.responseType === '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 {\n        ...response,\n        data: data ?? {},\n      };\n    } catch (error) {\n      const e = error as AxiosError;\n      if (opts.throwOnError) {\n        throw e;\n      }\n      // @ts-expect-error\n      e.error = e.response?.data ?? {};\n      return e;\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 Record<string, string>,\n      method,\n      serializedBody: getValidRequestBody(opts) as BodyInit | null | undefined,\n      // @ts-expect-error\n      signal: opts.signal,\n      url,\n    });\n  };\n\n  const _buildUrl: Client['buildUrl'] = (options) =>\n    buildUrl({ axios: instance, ..._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    instance,\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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-axios/base-url-strict/client/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type { Auth } from '../core/auth.gen';\nexport type { QuerySerializerOptions } from '../core/bodySerializer.gen';\nexport {\n  formDataBodySerializer,\n  jsonBodySerializer,\n  urlSearchParamsBodySerializer,\n} from '../core/bodySerializer.gen';\nexport { buildClientParams } from '../core/params.gen';\nexport { serializeQueryKeyValue } from '../core/queryKeySerializer.gen';\nexport { createClient } from './client.gen';\nexport type {\n  Client,\n  ClientOptions,\n  Config,\n  CreateClientConfig,\n  Options,\n  RequestOptions,\n  RequestResult,\n  TDataShape,\n} from './types.gen';\nexport { createConfig } from './utils.gen';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-axios/base-url-strict/client/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type {\n  AxiosError,\n  AxiosInstance,\n  AxiosRequestHeaders,\n  AxiosResponse,\n  AxiosStatic,\n  CreateAxiosDefaults,\n} from 'axios';\n\nimport type { Auth } from '../core/auth.gen';\nimport type {\n  ServerSentEventsOptions,\n  ServerSentEventsResult,\n} from '../core/serverSentEvents.gen';\nimport type { Client as CoreClient, Config as CoreConfig } from '../core/types.gen';\n\nexport interface Config<T extends ClientOptions = ClientOptions>\n  extends Omit<CreateAxiosDefaults, 'auth' | 'baseURL' | 'headers' | 'method'>, CoreConfig {\n  /**\n   * Axios implementation. You can use this option to provide either an\n   * `AxiosStatic` or an `AxiosInstance`.\n   *\n   * @default axios\n   */\n  axios?: AxiosStatic | AxiosInstance;\n  /**\n   * Base URL for all requests made by this client.\n   */\n  baseURL?: T['baseURL'];\n  /**\n   * An object containing any HTTP headers that you want to pre-populate your\n   * `Headers` object with.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/Headers/Headers#init See more}\n   */\n  headers?:\n    | AxiosRequestHeaders\n    | Record<\n        string,\n        string | number | boolean | (string | number | boolean)[] | null | undefined | unknown\n      >;\n  /**\n   * Throw an error instead of returning it in the response?\n   *\n   * @default false\n   */\n  throwOnError?: T['throwOnError'];\n}\n\nexport interface RequestOptions<\n  TData = unknown,\n  ThrowOnError extends boolean = boolean,\n  Url extends string = string,\n>\n  extends\n    Config<{\n      throwOnError: ThrowOnError;\n    }>,\n    Pick<\n      ServerSentEventsOptions<TData>,\n      | 'onRequest'\n      | 'onSseError'\n      | 'onSseEvent'\n      | 'sseDefaultRetryDelay'\n      | 'sseMaxRetryAttempts'\n      | 'sseMaxRetryDelay'\n    > {\n  /**\n   * Any body that you want to add to your request.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/fetch#body}\n   */\n  body?: unknown;\n  path?: Record<string, unknown>;\n  query?: Record<string, unknown>;\n  /**\n   * Security mechanism(s) to use for the request.\n   */\n  security?: ReadonlyArray<Auth>;\n  url: Url;\n}\n\nexport interface ClientOptions {\n  baseURL?: string;\n  throwOnError?: boolean;\n}\n\nexport type RequestResult<\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = boolean,\n> = ThrowOnError extends true\n  ? Promise<AxiosResponse<TData extends Record<string, unknown> ? TData[keyof TData] : TData>>\n  : Promise<\n      | (AxiosResponse<TData extends Record<string, unknown> ? TData[keyof TData] : TData> & {\n          error: undefined;\n        })\n      | (AxiosError<TError extends Record<string, unknown> ? TError[keyof TError] : TError> & {\n          data: undefined;\n          error: TError extends Record<string, unknown> ? TError[keyof TError] : TError;\n        })\n    >;\n\ntype MethodFn = <TData = unknown, TError = unknown, ThrowOnError extends boolean = false>(\n  options: Omit<RequestOptions<TData, ThrowOnError>, 'method'>,\n) => RequestResult<TData, TError, ThrowOnError>;\n\ntype SseFn = <TData = unknown, TError = unknown, ThrowOnError extends boolean = false>(\n  options: Omit<RequestOptions<TData, ThrowOnError>, 'method'>,\n) => Promise<ServerSentEventsResult<TData, TError>>;\n\ntype RequestFn = <TData = unknown, TError = unknown, ThrowOnError extends boolean = false>(\n  options: Omit<RequestOptions<TData, ThrowOnError>, 'method'> &\n    Pick<Required<RequestOptions<TData, ThrowOnError>>, 'method'>,\n) => RequestResult<TData, TError, ThrowOnError>;\n\ntype BuildUrlFn = <\n  TData extends {\n    body?: unknown;\n    path?: Record<string, unknown>;\n    query?: Record<string, unknown>;\n    url: string;\n  },\n>(\n  options: TData & Options<TData>,\n) => string;\n\nexport type Client = CoreClient<RequestFn, Config, MethodFn, BuildUrlFn, SseFn> & {\n  instance: AxiosInstance;\n};\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 = ClientOptions> = (\n  override?: Config<ClientOptions & T>,\n) => Config<Required<ClientOptions> & T>;\n\nexport interface TDataShape {\n  body?: unknown;\n  headers?: unknown;\n  path?: unknown;\n  query?: unknown;\n  url: string;\n}\n\ntype OmitKeys<T, K> = Pick<T, Exclude<keyof T, K>>;\n\nexport type Options<\n  TData extends TDataShape = TDataShape,\n  ThrowOnError extends boolean = boolean,\n  TResponse = unknown,\n> = OmitKeys<RequestOptions<TResponse, ThrowOnError>, 'body' | 'path' | 'query' | 'url'> &\n  ([TData] extends [never] ? unknown : Omit<TData, 'url'>);\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-axios/base-url-strict/client/utils.gen.ts",
    "content": "// 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 {\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\nconst checkForExistence = (\n  options: Pick<RequestOptions, 'auth' | 'query'> & {\n    headers: Record<any, unknown>;\n  },\n  name?: string,\n): boolean => {\n  if (!name) {\n    return false;\n  }\n  if (name in options.headers || options.query?.[name]) {\n    return true;\n  }\n  if (\n    'Cookie' in options.headers &&\n    options.headers['Cookie'] &&\n    typeof options.headers['Cookie'] === 'string'\n  ) {\n    return options.headers['Cookie'].includes(`${name}=`);\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: Record<any, unknown>;\n  }) => {\n  for (const auth of security) {\n    if (checkForExistence(options, auth.name)) {\n      continue;\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        const value = `${name}=${token}`;\n        if ('Cookie' in options.headers && options.headers['Cookie']) {\n          options.headers['Cookie'] = `${options.headers['Cookie']}; ${value}`;\n        } else {\n          options.headers['Cookie'] = value;\n        }\n        break;\n      }\n      case 'header':\n      default:\n        options.headers[name] = token;\n        break;\n    }\n  }\n};\n\nexport const buildUrl: Client['buildUrl'] = (options) => {\n  const instanceBaseUrl = options.axios?.defaults?.baseURL;\n\n  const baseUrl =\n    !!options.baseURL && typeof options.baseURL === 'string' ? options.baseURL : instanceBaseUrl;\n\n  return getUrl({\n    baseUrl: baseUrl as string,\n    path: options.path,\n    // let `paramsSerializer()` handle query params if it exists\n    query: !options.paramsSerializer ? options.query : undefined,\n    querySerializer:\n      typeof options.querySerializer === 'function'\n        ? options.querySerializer\n        : createQuerySerializer(options.querySerializer),\n    url: options.url,\n  });\n};\n\nexport const mergeConfigs = (a: Config, b: Config): Config => {\n  const config = { ...a, ...b };\n  config.headers = mergeHeaders(a.headers, b.headers);\n  return config;\n};\n\n/**\n * Special Axios headers keywords allowing to set headers by request method.\n */\nexport const axiosHeadersKeywords = [\n  'common',\n  'delete',\n  'get',\n  'head',\n  'patch',\n  'post',\n  'put',\n] as const;\n\nexport const mergeHeaders = (\n  ...headers: Array<Required<Config>['headers'] | undefined>\n): Record<any, unknown> => {\n  const mergedHeaders: Record<any, unknown> = {};\n  for (const header of headers) {\n    if (!header || typeof header !== 'object') {\n      continue;\n    }\n\n    const iterator = Object.entries(header);\n\n    for (const [key, value] of iterator) {\n      if (\n        axiosHeadersKeywords.includes(key as (typeof axiosHeadersKeywords)[number]) &&\n        typeof value === 'object'\n      ) {\n        mergedHeaders[key] = {\n          ...(mergedHeaders[key] as Record<any, unknown>),\n          ...value,\n        };\n      } else if (value === null) {\n        delete mergedHeaders[key];\n      } else if (Array.isArray(value)) {\n        for (const v of value) {\n          // @ts-expect-error\n          mergedHeaders[key] = [...(mergedHeaders[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[key] = typeof value === 'object' ? JSON.stringify(value) : (value as string);\n      }\n    }\n  }\n  return mergedHeaders;\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  ...override,\n});\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-axios/base-url-strict/client.gen.ts",
    "content": "// 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: 'http://localhost:3000/base' }));\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-axios/base-url-strict/core/auth.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-axios/base-url-strict/core/bodySerializer.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-axios/base-url-strict/core/params.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-axios/base-url-strict/core/pathSerializer.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-axios/base-url-strict/core/queryKeySerializer.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\n/**\n * JSON-friendly union that mirrors what Pinia Colada can hash.\n */\nexport type JsonValue =\n  | null\n  | string\n  | number\n  | boolean\n  | JsonValue[]\n  | { [key: string]: JsonValue };\n\n/**\n * Replacer that converts non-JSON values (bigint, Date, etc.) to safe substitutes.\n */\nexport const queryKeyJsonReplacer = (_key: string, value: unknown) => {\n  if (value === undefined || typeof value === 'function' || typeof value === 'symbol') {\n    return undefined;\n  }\n  if (typeof value === 'bigint') {\n    return value.toString();\n  }\n  if (value instanceof Date) {\n    return value.toISOString();\n  }\n  return value;\n};\n\n/**\n * Safely stringifies a value and parses it back into a JsonValue.\n */\nexport const stringifyToJsonValue = (input: unknown): JsonValue | undefined => {\n  try {\n    const json = JSON.stringify(input, queryKeyJsonReplacer);\n    if (json === undefined) {\n      return undefined;\n    }\n    return JSON.parse(json) as JsonValue;\n  } catch {\n    return undefined;\n  }\n};\n\n/**\n * Detects plain objects (including objects with a null prototype).\n */\nconst isPlainObject = (value: unknown): value is Record<string, unknown> => {\n  if (value === null || typeof value !== 'object') {\n    return false;\n  }\n  const prototype = Object.getPrototypeOf(value as object);\n  return prototype === Object.prototype || prototype === null;\n};\n\n/**\n * Turns URLSearchParams into a sorted JSON object for deterministic keys.\n */\nconst serializeSearchParams = (params: URLSearchParams): JsonValue => {\n  const entries = Array.from(params.entries()).sort(([a], [b]) => a.localeCompare(b));\n  const result: Record<string, JsonValue> = {};\n\n  for (const [key, value] of entries) {\n    const existing = result[key];\n    if (existing === undefined) {\n      result[key] = value;\n      continue;\n    }\n\n    if (Array.isArray(existing)) {\n      (existing as string[]).push(value);\n    } else {\n      result[key] = [existing, value];\n    }\n  }\n\n  return result;\n};\n\n/**\n * Normalizes any accepted value into a JSON-friendly shape for query keys.\n */\nexport const serializeQueryKeyValue = (value: unknown): JsonValue | undefined => {\n  if (value === null) {\n    return null;\n  }\n\n  if (typeof value === 'string' || typeof value === 'number' || typeof value === 'boolean') {\n    return value;\n  }\n\n  if (value === undefined || typeof value === 'function' || typeof value === 'symbol') {\n    return undefined;\n  }\n\n  if (typeof value === 'bigint') {\n    return value.toString();\n  }\n\n  if (value instanceof Date) {\n    return value.toISOString();\n  }\n\n  if (Array.isArray(value)) {\n    return stringifyToJsonValue(value);\n  }\n\n  if (typeof URLSearchParams !== 'undefined' && value instanceof URLSearchParams) {\n    return serializeSearchParams(value);\n  }\n\n  if (isPlainObject(value)) {\n    return stringifyToJsonValue(value);\n  }\n\n  return undefined;\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-axios/base-url-strict/core/serverSentEvents.gen.ts",
    "content": "// 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 const 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            // Normalize line endings: CRLF -> LF, then CR -> LF\n            buffer = buffer.replace(/\\r\\n/g, '\\n').replace(/\\r/g, '\\n');\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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-axios/base-url-strict/core/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { Auth, AuthToken } from './auth.gen';\nimport type { BodySerializer, QuerySerializer, QuerySerializerOptions } from './bodySerializer.gen';\n\nexport type HttpMethod =\n  | 'connect'\n  | 'delete'\n  | 'get'\n  | 'head'\n  | 'options'\n  | 'patch'\n  | 'post'\n  | 'put'\n  | 'trace';\n\nexport type Client<\n  RequestFn = never,\n  Config = unknown,\n  MethodFn = never,\n  BuildUrlFn = never,\n  SseFn = never,\n> = {\n  /**\n   * Returns the final request URL.\n   */\n  buildUrl: BuildUrlFn;\n  getConfig: () => Config;\n  request: RequestFn;\n  setConfig: (config: Config) => Config;\n} & {\n  [K in HttpMethod]: MethodFn;\n} & ([SseFn] extends [never] ? { sse?: never } : { sse: { [K in HttpMethod]: SseFn } });\n\nexport interface Config {\n  /**\n   * Auth token or a function returning auth token. The resolved value will be\n   * added to the request payload as defined by its `security` array.\n   */\n  auth?: ((auth: Auth) => Promise<AuthToken> | AuthToken) | AuthToken;\n  /**\n   * A function for serializing request body parameter. By default,\n   * {@link JSON.stringify()} will be used.\n   */\n  bodySerializer?: BodySerializer | null;\n  /**\n   * An object containing any HTTP headers that you want to pre-populate your\n   * `Headers` object with.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/Headers/Headers#init See more}\n   */\n  headers?:\n    | RequestInit['headers']\n    | Record<\n        string,\n        string | number | boolean | (string | number | boolean)[] | null | undefined | unknown\n      >;\n  /**\n   * The request method.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/fetch#method See more}\n   */\n  method?: Uppercase<HttpMethod>;\n  /**\n   * A function for serializing request query parameters. By default, arrays\n   * will be exploded in form style, objects will be exploded in deepObject\n   * style, and reserved characters are percent-encoded.\n   *\n   * This method will have no effect if the native `paramsSerializer()` Axios\n   * API function is used.\n   *\n   * {@link https://swagger.io/docs/specification/serialization/#query View examples}\n   */\n  querySerializer?: QuerySerializer | QuerySerializerOptions;\n  /**\n   * A function validating request data. This is useful if you want to ensure\n   * the request conforms to the desired shape, so it can be safely sent to\n   * the server.\n   */\n  requestValidator?: (data: unknown) => Promise<unknown>;\n  /**\n   * A function transforming response data before it's returned. This is useful\n   * for post-processing data, e.g. converting ISO strings into Date objects.\n   */\n  responseTransformer?: (data: unknown) => Promise<unknown>;\n  /**\n   * A function validating response data. This is useful if you want to ensure\n   * the response conforms to the desired shape, so it can be safely passed to\n   * the transformers and returned to the user.\n   */\n  responseValidator?: (data: unknown) => Promise<unknown>;\n}\n\ntype IsExactlyNeverOrNeverUndefined<T> = [T] extends [never]\n  ? true\n  : [T] extends [never | undefined]\n    ? [undefined] extends [T]\n      ? false\n      : true\n    : false;\n\nexport type OmitNever<T extends Record<string, unknown>> = {\n  [K in keyof T as IsExactlyNeverOrNeverUndefined<T[K]> extends true ? never : K]: T[K];\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-axios/base-url-strict/core/utils.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-axios/base-url-strict/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type { _3eNum1Период, _400, AdditionalPropertiesIntegerIssue, AdditionalPropertiesUnknownIssue, AdditionalPropertiesUnknownIssue2, AdditionalPropertiesUnknownIssue3, AdditionalPropertiesUnknownIssueWritable, AnyOfAnyAndNull, AnyOfArrays, ApiVVersionODataControllerCountData, ApiVVersionODataControllerCountResponse, ApiVVersionODataControllerCountResponses, ArrayWithAnyOfProperties, ArrayWithArray, ArrayWithBooleans, ArrayWithNumbers, ArrayWithProperties, ArrayWithReferences, ArrayWithStrings, CallToTestOrderOfParamsData, CallWithDefaultOptionalParametersData, CallWithDefaultParametersData, CallWithDescriptionsData, CallWithDuplicateResponsesData, CallWithDuplicateResponsesError, CallWithDuplicateResponsesErrors, CallWithDuplicateResponsesResponse, CallWithDuplicateResponsesResponses, CallWithNoContentResponseData, CallWithNoContentResponseResponse, CallWithNoContentResponseResponses, CallWithParametersData, CallWithResponseAndNoContentResponseData, CallWithResponseAndNoContentResponseResponse, CallWithResponseAndNoContentResponseResponses, CallWithResponseData, CallWithResponseResponse, CallWithResponseResponses, CallWithResponsesData, CallWithResponsesError, CallWithResponsesErrors, CallWithResponsesResponse, CallWithResponsesResponses, CallWithResultFromHeaderData, CallWithResultFromHeaderErrors, CallWithResultFromHeaderResponses, CallWithWeirdParameterNamesData, CamelCaseCommentWithBreaks, CharactersInDescription, ClientOptions, CollectionFormatData, CommentWithBackticks, CommentWithBackticksAndQuotes, CommentWithBreaks, CommentWithExpressionPlaceholders, CommentWithQuotes, CommentWithReservedCharacters, CommentWithSlashes, ComplexParamsData, ComplexParamsResponse, ComplexParamsResponses, ComplexTypesData, ComplexTypesErrors, ComplexTypesResponse, ComplexTypesResponses, CompositionBaseModel, CompositionExtendedModel, CompositionWithAllOfAndNullable, CompositionWithAnyOf, CompositionWithAnyOfAndNullable, CompositionWithAnyOfAnonymous, CompositionWithNestedAnyAndTypeNull, CompositionWithNestedAnyOfAndNull, CompositionWithOneOf, CompositionWithOneOfAndComplexArrayDictionary, CompositionWithOneOfAndNullable, CompositionWithOneOfAndProperties, CompositionWithOneOfAndSimpleArrayDictionary, CompositionWithOneOfAndSimpleDictionary, CompositionWithOneOfAnonymous, CompositionWithOneOfDiscriminator, ConstValue, Default, DeleteCallWithoutParametersAndResponseData, DeleteFooData, DeleteFooData2, DeleteFooData3, DeprecatedCallData, DeprecatedModel, DictionaryWithArray, DictionaryWithDictionary, DictionaryWithProperties, DictionaryWithPropertiesAndAdditionalProperties, DictionaryWithReference, DictionaryWithString, DummyAData, DummyAResponse, DummyAResponses, DummyBData, DummyBResponse, DummyBResponses, DuplicateName2Data, DuplicateName3Data, DuplicateName4Data, DuplicateNameData, EnumFromDescription, EnumWithExtensions, EnumWithNumbers, EnumWithReplacedCharacters, EnumWithStrings, EnumWithXEnumNames, ExportData, ExternalRefA, ExternalRefB, ExternalSharedModel, File, FileResponseData, FileResponseResponse, FileResponseResponses, FileWritable, FooWowData, FooWowResponses, FreeFormObjectWithAdditionalPropertiesEqEmptyObject, FreeFormObjectWithAdditionalPropertiesEqTrue, FreeFormObjectWithoutAdditionalProperties, GenericSchemaDuplicateIssue1SystemBoolean, GenericSchemaDuplicateIssue1SystemBooleanWritable, GenericSchemaDuplicateIssue1SystemString, GenericSchemaDuplicateIssue1SystemStringWritable, GetApiVbyApiVersionSimpleOperationData, GetApiVbyApiVersionSimpleOperationError, GetApiVbyApiVersionSimpleOperationErrors, GetApiVbyApiVersionSimpleOperationResponse, GetApiVbyApiVersionSimpleOperationResponses, GetCallWithOptionalParamData, GetCallWithoutParametersAndResponseData, HeadCallWithoutParametersAndResponseData, Import, ImportData, ImportResponse, ImportResponses, IoK8sApimachineryPkgApisMetaV1DeleteOptions, IoK8sApimachineryPkgApisMetaV1Preconditions, ModelCircle, ModelFromZendesk, ModelSquare, ModelThatExtends, ModelThatExtendsExtends, ModelWithAdditionalPropertiesEqTrue, ModelWithAdditionalPropertiesRef, ModelWithAnyOfConstantSizeArray, ModelWithAnyOfConstantSizeArrayAndIntersect, ModelWithAnyOfConstantSizeArrayNullable, ModelWithAnyOfConstantSizeArrayWithNSizeAndOptions, ModelWithAnyOfConstantSizeArrayWithNSizeAndOptionsWritable, ModelWithArray, ModelWithArrayReadOnlyAndWriteOnly, ModelWithArrayReadOnlyAndWriteOnlyWritable, ModelWithBackticksInDescription, ModelWithBoolean, ModelWithCircularReference, ModelWithConst, ModelWithConstantSizeArray, ModelWithDictionary, ModelWithDuplicateImports, ModelWithDuplicateProperties, ModelWithEnum, ModelWithEnumFromDescription, ModelWithEnumWithHyphen, ModelWithInteger, ModelWithNestedArrayEnums, ModelWithNestedArrayEnumsData, ModelWithNestedArrayEnumsDataBar, ModelWithNestedArrayEnumsDataFoo, ModelWithNestedCompositionEnums, ModelWithNestedEnums, ModelWithNestedProperties, ModelWithNullableObject, ModelWithNullableString, ModelWithNumericEnumUnion, ModelWithOneOfAndProperties, ModelWithOneOfEnum, ModelWithOrderedProperties, ModelWithPattern, ModelWithPatternWritable, ModelWithPrefixItemsConstantSizeArray, ModelWithProperties, ModelWithPropertiesWritable, ModelWithReadOnlyAndWriteOnly, ModelWithReadOnlyAndWriteOnlyWritable, ModelWithReference, ModelWithReferenceWritable, ModelWithString, ModelWithStringError, MultipartRequestData, MultipartResponseData, MultipartResponseResponse, MultipartResponseResponses, NestedAnyOfArraysNullable, NonAsciiæøåÆøÅöôêÊ字符串Data, NonAsciiæøåÆøÅöôêÊ字符串Response, NonAsciiæøåÆøÅöôêÊ字符串Responses, NonAsciiStringæøåÆøÅöôêÊ字符串, NullableObject, OneOfAllOfIssue, OneOfAllOfIssueWritable, OptionsCallWithoutParametersAndResponseData, Pageable, ParameterSimpleParameterUnused, PatchApiVbyApiVersionNoTagData, PatchApiVbyApiVersionNoTagResponses, PatchCallWithoutParametersAndResponseData, PostApiVbyApiVersionFormDataData, PostApiVbyApiVersionRequestBodyData, PostCallWithOptionalParamData, PostCallWithOptionalParamResponse, PostCallWithOptionalParamResponses, PostCallWithoutParametersAndResponseData, PostServiceWithEmptyTagResponse, PostServiceWithEmptyTagResponse2, PutCallWithoutParametersAndResponseData, PutWithFormUrlEncodedData, SchemaWithFormRestrictedKeys, SimpleBoolean, SimpleFile, SimpleFormData, SimpleInteger, SimpleParameter, SimpleReference, SimpleRequestBody, SimpleString, SimpleStringWithPattern, TestErrorCodeData, TestErrorCodeErrors, TestErrorCodeResponses, TypesData, TypesResponse, TypesResponses, UploadFileData, UploadFileResponse, UploadFileResponses, XFooBar } from './types.gen';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-axios/base-url-strict/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type ClientOptions = {\n    baseURL: 'http://localhost:3000/base';\n};\n\n/**\n * Model with number-only name\n */\nexport type _400 = string;\n\n/**\n * External ref to shared model (A)\n */\nexport type ExternalRefA = ExternalSharedModel;\n\n/**\n * External ref to shared model (B)\n */\nexport type ExternalRefB = ExternalSharedModel;\n\n/**\n * Testing multiline comments in string: First line\n * Second line\n *\n * Fourth line\n */\nexport type CamelCaseCommentWithBreaks = number;\n\n/**\n * Testing multiline comments in string: First line\n * Second line\n *\n * Fourth line\n */\nexport type CommentWithBreaks = number;\n\n/**\n * Testing backticks in string: `backticks` and ```multiple backticks``` should work\n */\nexport type CommentWithBackticks = number;\n\n/**\n * Testing backticks and quotes in string: `backticks`, 'quotes', \"double quotes\" and ```multiple backticks``` should work\n */\nexport type CommentWithBackticksAndQuotes = number;\n\n/**\n * Testing slashes in string: \\backwards\\\\\\ and /forwards/// should work\n */\nexport type CommentWithSlashes = number;\n\n/**\n * Testing expression placeholders in string: ${expression} should work\n */\nexport type CommentWithExpressionPlaceholders = number;\n\n/**\n * Testing quotes in string: 'single quote''' and \"double quotes\"\"\" should work\n */\nexport type CommentWithQuotes = number;\n\n/**\n * Testing reserved characters in string: * inline * and ** inline ** should work\n */\nexport type CommentWithReservedCharacters = number;\n\n/**\n * This is a simple number\n */\nexport type SimpleInteger = number;\n\n/**\n * This is a simple boolean\n */\nexport type SimpleBoolean = boolean;\n\n/**\n * This is a simple string\n */\nexport type SimpleString = string;\n\n/**\n * A string with non-ascii (unicode) characters valid in typescript identifiers (æøåÆØÅöÔèÈ字符串)\n */\nexport type NonAsciiStringæøåÆøÅöôêÊ字符串 = string;\n\n/**\n * This is a simple file\n */\nexport type SimpleFile = Blob | File;\n\n/**\n * This is a simple reference\n */\nexport type SimpleReference = ModelWithString;\n\n/**\n * This is a simple string\n */\nexport type SimpleStringWithPattern = string | null;\n\n/**\n * This is a simple enum with strings\n */\nexport type EnumWithStrings = 'Success' | 'Warning' | 'Error' | '\\'Single Quote\\'' | '\"Double Quotes\"' | 'Non-ascii: øæåôöØÆÅÔÖ字符串';\n\nexport type EnumWithReplacedCharacters = '\\'Single Quote\\'' | '\"Double Quotes\"' | 'øæåôöØÆÅÔÖ字符串' | 3.1 | '';\n\n/**\n * This is a simple enum with numbers\n */\nexport type EnumWithNumbers = 1 | 2 | 3 | 1.1 | 1.2 | 1.3 | 100 | 200 | 300 | -100 | -200 | -300 | -1.1 | -1.2 | -1.3;\n\n/**\n * Success=1,Warning=2,Error=3\n */\nexport type EnumFromDescription = number;\n\n/**\n * This is a simple enum with numbers\n */\nexport type EnumWithExtensions = 200 | 400 | 500;\n\nexport type EnumWithXEnumNames = 0 | 1 | 2;\n\n/**\n * This is a simple array with numbers\n */\nexport type ArrayWithNumbers = Array<number>;\n\n/**\n * This is a simple array with booleans\n */\nexport type ArrayWithBooleans = Array<boolean>;\n\n/**\n * This is a simple array with strings\n */\nexport type ArrayWithStrings = Array<string>;\n\n/**\n * This is a simple array with references\n */\nexport type ArrayWithReferences = Array<ModelWithString>;\n\n/**\n * This is a simple array containing an array\n */\nexport type ArrayWithArray = Array<Array<ModelWithString>>;\n\n/**\n * This is a simple array with properties\n */\nexport type ArrayWithProperties = Array<{\n    '16x16'?: CamelCaseCommentWithBreaks;\n    bar?: string;\n}>;\n\n/**\n * This is a simple array with any of properties\n */\nexport type ArrayWithAnyOfProperties = Array<{\n    foo?: string;\n} | {\n    bar?: string;\n}>;\n\nexport type AnyOfAnyAndNull = {\n    data?: unknown | null;\n};\n\n/**\n * This is a simple array with any of properties\n */\nexport type AnyOfArrays = {\n    results?: Array<{\n        foo?: string;\n    } | {\n        bar?: string;\n    }>;\n};\n\n/**\n * This is a string dictionary\n */\nexport type DictionaryWithString = {\n    [key: string]: string;\n};\n\nexport type DictionaryWithPropertiesAndAdditionalProperties = {\n    foo?: number;\n    bar?: boolean;\n    [key: string]: string | number | boolean | undefined;\n};\n\n/**\n * This is a string reference\n */\nexport type DictionaryWithReference = {\n    [key: string]: ModelWithString;\n};\n\n/**\n * This is a complex dictionary\n */\nexport type DictionaryWithArray = {\n    [key: string]: Array<ModelWithString>;\n};\n\n/**\n * This is a string dictionary\n */\nexport type DictionaryWithDictionary = {\n    [key: string]: {\n        [key: string]: string;\n    };\n};\n\n/**\n * This is a complex dictionary\n */\nexport type DictionaryWithProperties = {\n    [key: string]: {\n        foo?: string;\n        bar?: string;\n    };\n};\n\n/**\n * This is a model with one number property\n */\nexport type ModelWithInteger = {\n    /**\n     * This is a simple number property\n     */\n    prop?: number;\n};\n\n/**\n * This is a model with one boolean property\n */\nexport type ModelWithBoolean = {\n    /**\n     * This is a simple boolean property\n     */\n    prop?: boolean;\n};\n\n/**\n * This is a model with one string property\n */\nexport type ModelWithString = {\n    /**\n     * This is a simple string property\n     */\n    prop?: string;\n};\n\n/**\n * This is a model with one string property\n */\nexport type ModelWithStringError = {\n    /**\n     * This is a simple string property\n     */\n    prop?: string;\n};\n\n/**\n * `Comment` or `VoiceComment`. The JSON object for adding voice comments to tickets is different. See [Adding voice comments to tickets](/documentation/ticketing/managing-tickets/adding-voice-comments-to-tickets)\n */\nexport type ModelFromZendesk = string;\n\n/**\n * This is a model with one string property\n */\nexport type ModelWithNullableString = {\n    /**\n     * This is a simple string property\n     */\n    nullableProp1?: string | null;\n    /**\n     * This is a simple string property\n     */\n    nullableRequiredProp1: string | null;\n    /**\n     * This is a simple string property\n     */\n    nullableProp2?: string | null;\n    /**\n     * This is a simple string property\n     */\n    nullableRequiredProp2: string | null;\n    /**\n     * This is a simple enum with strings\n     */\n    'foo_bar-enum'?: 'Success' | 'Warning' | 'Error' | 'ØÆÅ字符串';\n};\n\n/**\n * This is a model with one enum\n */\nexport type ModelWithEnum = {\n    /**\n     * This is a simple enum with strings\n     */\n    'foo_bar-enum'?: 'Success' | 'Warning' | 'Error' | 'ØÆÅ字符串';\n    /**\n     * These are the HTTP error code enums\n     */\n    statusCode?: '100' | '200 FOO' | '300 FOO_BAR' | '400 foo-bar' | '500 foo.bar' | '600 foo&bar';\n    /**\n     * Simple boolean enum\n     */\n    bool?: true;\n};\n\n/**\n * This is a model with one enum with escaped name\n */\nexport type ModelWithEnumWithHyphen = {\n    /**\n     * Foo-Bar-Baz-Qux\n     */\n    'foo-bar-baz-qux'?: '3.0';\n};\n\n/**\n * This is a model with one enum\n */\nexport type ModelWithEnumFromDescription = {\n    /**\n     * Success=1,Warning=2,Error=3\n     */\n    test?: number;\n};\n\n/**\n * This is a model with nested enums\n */\nexport type ModelWithNestedEnums = {\n    dictionaryWithEnum?: {\n        [key: string]: 'Success' | 'Warning' | 'Error';\n    };\n    dictionaryWithEnumFromDescription?: {\n        [key: string]: number;\n    };\n    arrayWithEnum?: Array<'Success' | 'Warning' | 'Error'>;\n    arrayWithDescription?: Array<number>;\n    /**\n     * This is a simple enum with strings\n     */\n    'foo_bar-enum'?: 'Success' | 'Warning' | 'Error' | 'ØÆÅ字符串';\n};\n\n/**\n * This is a model with one property containing a reference\n */\nexport type ModelWithReference = {\n    prop?: ModelWithProperties;\n};\n\n/**\n * This is a model with one property containing an array\n */\nexport type ModelWithArrayReadOnlyAndWriteOnly = {\n    prop?: Array<ModelWithReadOnlyAndWriteOnly>;\n    propWithFile?: Array<Blob | File>;\n    propWithNumber?: Array<number>;\n};\n\n/**\n * This is a model with one property containing an array\n */\nexport type ModelWithArray = {\n    prop?: Array<ModelWithString>;\n    propWithFile?: Array<Blob | File>;\n    propWithNumber?: Array<number>;\n};\n\n/**\n * This is a model with one property containing a dictionary\n */\nexport type ModelWithDictionary = {\n    prop?: {\n        [key: string]: string;\n    };\n};\n\n/**\n * This is a deprecated model with a deprecated property\n *\n * @deprecated\n */\nexport type DeprecatedModel = {\n    /**\n     * This is a deprecated property\n     *\n     * @deprecated\n     */\n    prop?: string;\n};\n\n/**\n * This is a model with one property containing a circular reference\n */\nexport type ModelWithCircularReference = {\n    prop?: ModelWithCircularReference;\n};\n\n/**\n * This is a model with one property with a 'one of' relationship\n */\nexport type CompositionWithOneOf = {\n    propA?: ModelWithString | ModelWithEnum | ModelWithArray | ModelWithDictionary;\n};\n\n/**\n * This is a model with one property with a 'one of' relationship where the options are not $ref\n */\nexport type CompositionWithOneOfAnonymous = {\n    propA?: {\n        propA?: string;\n    } | string | number;\n};\n\n/**\n * Circle\n */\nexport type ModelCircle = {\n    kind: string;\n    radius?: number;\n};\n\n/**\n * Square\n */\nexport type ModelSquare = {\n    kind: string;\n    sideLength?: number;\n};\n\n/**\n * This is a model with one property with a 'one of' relationship where the options are not $ref\n */\nexport type CompositionWithOneOfDiscriminator = ({\n    kind: 'circle';\n} & ModelCircle) | ({\n    kind: 'square';\n} & ModelSquare);\n\n/**\n * This is a model with one property with a 'any of' relationship\n */\nexport type CompositionWithAnyOf = {\n    propA?: ModelWithString | ModelWithEnum | ModelWithArray | ModelWithDictionary;\n};\n\n/**\n * This is a model with one property with a 'any of' relationship where the options are not $ref\n */\nexport type CompositionWithAnyOfAnonymous = {\n    propA?: {\n        propA?: string;\n    } | string | number;\n};\n\n/**\n * This is a model with nested 'any of' property with a type null\n */\nexport type CompositionWithNestedAnyAndTypeNull = {\n    propA?: Array<ModelWithDictionary | null> | Array<ModelWithArray | null>;\n};\n\nexport type _3eNum1Период = 'Bird' | 'Dog';\n\nexport type ConstValue = 'ConstValue';\n\n/**\n * This is a model with one property with a 'any of' relationship where the options are not $ref\n */\nexport type CompositionWithNestedAnyOfAndNull = {\n    /**\n     * Scopes\n     */\n    propA?: Array<_3eNum1Период | ConstValue> | null;\n};\n\n/**\n * This is a model with one property with a 'one of' relationship\n */\nexport type CompositionWithOneOfAndNullable = {\n    propA?: {\n        boolean?: boolean;\n    } | ModelWithEnum | ModelWithArray | ModelWithDictionary | null;\n};\n\n/**\n * This is a model that contains a simple dictionary within composition\n */\nexport type CompositionWithOneOfAndSimpleDictionary = {\n    propA?: boolean | {\n        [key: string]: number;\n    };\n};\n\n/**\n * This is a model that contains a dictionary of simple arrays within composition\n */\nexport type CompositionWithOneOfAndSimpleArrayDictionary = {\n    propA?: boolean | {\n        [key: string]: Array<boolean>;\n    };\n};\n\n/**\n * This is a model that contains a dictionary of complex arrays (composited) within composition\n */\nexport type CompositionWithOneOfAndComplexArrayDictionary = {\n    propA?: boolean | {\n        [key: string]: Array<number | string>;\n    };\n};\n\n/**\n * This is a model with one property with a 'all of' relationship\n */\nexport type CompositionWithAllOfAndNullable = {\n    propA?: ({\n        boolean?: boolean;\n    } & ModelWithEnum & ModelWithArray & ModelWithDictionary) | null;\n};\n\n/**\n * This is a model with one property with a 'any of' relationship\n */\nexport type CompositionWithAnyOfAndNullable = {\n    propA?: {\n        boolean?: boolean;\n    } | ModelWithEnum | ModelWithArray | ModelWithDictionary | null;\n};\n\n/**\n * This is a base model with two simple optional properties\n */\nexport type CompositionBaseModel = {\n    firstName?: string;\n    lastname?: string;\n};\n\n/**\n * This is a model that extends the base model\n */\nexport type CompositionExtendedModel = CompositionBaseModel & {\n    age: number;\n    firstName: string;\n    lastname: string;\n};\n\n/**\n * This is a model with one nested property\n */\nexport type ModelWithProperties = {\n    required: string;\n    readonly requiredAndReadOnly: string;\n    requiredAndNullable: string | null;\n    string?: string;\n    number?: number;\n    boolean?: boolean;\n    reference?: ModelWithString;\n    'property with space'?: string;\n    default?: string;\n    try?: string;\n    readonly '@namespace.string'?: string;\n    readonly '@namespace.integer'?: number;\n};\n\n/**\n * This is a model with one nested property\n */\nexport type ModelWithNestedProperties = {\n    readonly first: {\n        readonly second: {\n            readonly third: string | null;\n        } | null;\n    } | null;\n};\n\n/**\n * This is a model with duplicated properties\n */\nexport type ModelWithDuplicateProperties = {\n    prop?: ModelWithString;\n};\n\n/**\n * This is a model with ordered properties\n */\nexport type ModelWithOrderedProperties = {\n    zebra?: string;\n    apple?: string;\n    hawaii?: string;\n};\n\n/**\n * This is a model with duplicated imports\n */\nexport type ModelWithDuplicateImports = {\n    propA?: ModelWithString;\n    propB?: ModelWithString;\n    propC?: ModelWithString;\n};\n\n/**\n * This is a model that extends another model\n */\nexport type ModelThatExtends = ModelWithString & {\n    propExtendsA?: string;\n    propExtendsB?: ModelWithString;\n};\n\n/**\n * This is a model that extends another model\n */\nexport type ModelThatExtendsExtends = ModelWithString & ModelThatExtends & {\n    propExtendsC?: string;\n    propExtendsD?: ModelWithString;\n};\n\n/**\n * This is a model that contains a some patterns\n */\nexport type ModelWithPattern = {\n    key: string;\n    name: string;\n    readonly enabled?: boolean;\n    readonly modified?: string;\n    id?: string;\n    text?: string;\n    patternWithSingleQuotes?: string;\n    patternWithNewline?: string;\n    patternWithBacktick?: string;\n    patternWithUnicode?: string;\n};\n\nexport type File = {\n    /**\n     * Id\n     */\n    readonly id?: string;\n    /**\n     * Updated at\n     */\n    readonly updated_at?: string;\n    /**\n     * Created at\n     */\n    readonly created_at?: string;\n    /**\n     * Mime\n     */\n    mime: string;\n    /**\n     * File\n     */\n    readonly file?: string;\n};\n\nexport type Default = {\n    name?: string;\n};\n\nexport type Pageable = {\n    page?: number;\n    size?: number;\n    sort?: Array<string>;\n};\n\n/**\n * This is a free-form object without additionalProperties.\n */\nexport type FreeFormObjectWithoutAdditionalProperties = {\n    [key: string]: unknown;\n};\n\n/**\n * This is a free-form object with additionalProperties: true.\n */\nexport type FreeFormObjectWithAdditionalPropertiesEqTrue = {\n    [key: string]: unknown;\n};\n\n/**\n * This is a free-form object with additionalProperties: {}.\n */\nexport type FreeFormObjectWithAdditionalPropertiesEqEmptyObject = {\n    [key: string]: unknown;\n};\n\nexport type ModelWithConst = {\n    String?: 'String';\n    number?: 0;\n    null?: null;\n    withType?: 'Some string';\n};\n\n/**\n * This is a model with one property and additionalProperties: true\n */\nexport type ModelWithAdditionalPropertiesEqTrue = {\n    /**\n     * This is a simple string property\n     */\n    prop?: string;\n    [key: string]: unknown;\n};\n\nexport type NestedAnyOfArraysNullable = {\n    nullableArray?: Array<string | boolean> | null;\n};\n\nexport type CompositionWithOneOfAndProperties = ({\n    foo: SimpleParameter;\n} | {\n    bar: NonAsciiStringæøåÆøÅöôêÊ字符串;\n}) & {\n    baz: number | null;\n    qux: number;\n};\n\n/**\n * An object that can be null\n */\nexport type NullableObject = {\n    foo?: string;\n} | null;\n\n/**\n * Some % character\n */\nexport type CharactersInDescription = string;\n\nexport type ModelWithNullableObject = {\n    data?: NullableObject;\n};\n\n/**\n * An object with additional properties that can be null (anyOf ref + null)\n */\nexport type ModelWithAdditionalPropertiesRef = {\n    [key: string]: NullableObject | null;\n};\n\nexport type ModelWithOneOfEnum = {\n    foo: 'Bar';\n} | {\n    foo: 'Baz';\n} | {\n    foo: 'Qux';\n} | {\n    content: string;\n    foo: 'Quux';\n} | {\n    content: [\n        string,\n        string\n    ];\n    foo: 'Corge';\n};\n\nexport type ModelWithNestedArrayEnumsDataFoo = 'foo' | 'bar';\n\nexport type ModelWithNestedArrayEnumsDataBar = 'baz' | 'qux';\n\nexport type ModelWithNestedArrayEnumsData = {\n    foo?: Array<ModelWithNestedArrayEnumsDataFoo>;\n    bar?: Array<ModelWithNestedArrayEnumsDataBar>;\n};\n\nexport type ModelWithNestedArrayEnums = {\n    array_strings?: Array<string>;\n    data?: ModelWithNestedArrayEnumsData;\n};\n\nexport type ModelWithNestedCompositionEnums = {\n    foo?: ModelWithNestedArrayEnumsDataFoo;\n};\n\nexport type ModelWithReadOnlyAndWriteOnly = {\n    foo: string;\n    readonly bar: string;\n};\n\nexport type ModelWithConstantSizeArray = [\n    number,\n    number\n];\n\nexport type ModelWithAnyOfConstantSizeArray = [\n    number | string,\n    number | string,\n    number | string\n];\n\nexport type ModelWithPrefixItemsConstantSizeArray = [\n    ModelWithInteger,\n    number | string,\n    string\n];\n\nexport type ModelWithAnyOfConstantSizeArrayNullable = [\n    number | null | string,\n    number | null | string,\n    number | null | string\n];\n\nexport type ModelWithAnyOfConstantSizeArrayWithNSizeAndOptions = [\n    number | Import,\n    number | Import\n];\n\nexport type ModelWithAnyOfConstantSizeArrayAndIntersect = [\n    number & string,\n    number & string\n];\n\nexport type ModelWithNumericEnumUnion = {\n    /**\n     * Период\n     */\n    value?: -10 | -1 | 0 | 1 | 3 | 6 | 12;\n};\n\n/**\n * Some description with `back ticks`\n */\nexport type ModelWithBackticksInDescription = {\n    /**\n     * The template `that` should be used for parsing and importing the contents of the CSV file.\n     *\n     * <br/><p>There is one placeholder currently supported:<ul>     <li><b>${x}</b> - refers to the n-th column in the CSV file, e.g. ${1}, ${2}, ...)</li></ul><p>Example of a correct JSON template:</p>\n     * <pre>\n     * [\n     * {\n     * \"resourceType\": \"Asset\",\n     * \"identifier\": {\n     * \"name\": \"${1}\",\n     * \"domain\": {\n     * \"name\": \"${2}\",\n     * \"community\": {\n     * \"name\": \"Some Community\"\n     * }\n     * }\n     * },\n     * \"attributes\" : {\n     * \"00000000-0000-0000-0000-000000003115\" : [ {\n     * \"value\" : \"${3}\"\n     * } ],\n     * \"00000000-0000-0000-0000-000000000222\" : [ {\n     * \"value\" : \"${4}\"\n     * } ]\n     * }\n     * }\n     * ]\n     * </pre>\n     */\n    template?: string;\n};\n\nexport type ModelWithOneOfAndProperties = (SimpleParameter | NonAsciiStringæøåÆøÅöôêÊ字符串) & {\n    baz: number | null;\n    qux: number;\n};\n\n/**\n * Model used to test deduplication strategy (unused)\n */\nexport type ParameterSimpleParameterUnused = string;\n\n/**\n * Model used to test deduplication strategy\n */\nexport type PostServiceWithEmptyTagResponse = string;\n\n/**\n * Model used to test deduplication strategy\n */\nexport type PostServiceWithEmptyTagResponse2 = string;\n\n/**\n * Model used to test deduplication strategy\n */\nexport type DeleteFooData = string;\n\n/**\n * Model used to test deduplication strategy\n */\nexport type DeleteFooData2 = string;\n\n/**\n * Model with restricted keyword name\n */\nexport type Import = string;\n\nexport type SchemaWithFormRestrictedKeys = {\n    description?: string;\n    'x-enum-descriptions'?: string;\n    'x-enum-varnames'?: string;\n    'x-enumNames'?: string;\n    title?: string;\n    object?: {\n        description?: string;\n        'x-enum-descriptions'?: string;\n        'x-enum-varnames'?: string;\n        'x-enumNames'?: string;\n        title?: string;\n    };\n    array?: Array<{\n        description?: string;\n        'x-enum-descriptions'?: string;\n        'x-enum-varnames'?: string;\n        'x-enumNames'?: string;\n        title?: string;\n    }>;\n};\n\n/**\n * This schema was giving PascalCase transformations a hard time\n */\nexport type IoK8sApimachineryPkgApisMetaV1DeleteOptions = {\n    /**\n     * Must be fulfilled before a deletion is carried out. If not possible, a 409 Conflict status will be returned.\n     */\n    preconditions?: IoK8sApimachineryPkgApisMetaV1Preconditions;\n};\n\n/**\n * This schema was giving PascalCase transformations a hard time\n */\nexport type IoK8sApimachineryPkgApisMetaV1Preconditions = {\n    /**\n     * Specifies the target ResourceVersion\n     */\n    resourceVersion?: string;\n    /**\n     * Specifies the target UID.\n     */\n    uid?: string;\n};\n\nexport type AdditionalPropertiesUnknownIssue = {\n    [key: string]: string | number;\n};\n\nexport type AdditionalPropertiesUnknownIssue2 = {\n    [key: string]: string | number;\n};\n\nexport type AdditionalPropertiesUnknownIssue3 = string & {\n    entries: {\n        [key: string]: AdditionalPropertiesUnknownIssue;\n    };\n};\n\nexport type AdditionalPropertiesIntegerIssue = {\n    value: number;\n    [key: string]: number;\n};\n\nexport type OneOfAllOfIssue = ((ConstValue | GenericSchemaDuplicateIssue1SystemBoolean) & _3eNum1Период) | GenericSchemaDuplicateIssue1SystemString;\n\nexport type GenericSchemaDuplicateIssue1SystemBoolean = {\n    item?: boolean;\n    error?: string | null;\n    readonly hasError?: boolean;\n    data?: {\n        [key: string]: never;\n    };\n};\n\nexport type GenericSchemaDuplicateIssue1SystemString = {\n    item?: string | null;\n    error?: string | null;\n    readonly hasError?: boolean;\n};\n\nexport type ExternalSharedModel = {\n    id: string;\n    name?: string;\n};\n\n/**\n * This is a model with one property containing a reference\n */\nexport type ModelWithReferenceWritable = {\n    prop?: ModelWithPropertiesWritable;\n};\n\n/**\n * This is a model with one property containing an array\n */\nexport type ModelWithArrayReadOnlyAndWriteOnlyWritable = {\n    prop?: Array<ModelWithReadOnlyAndWriteOnlyWritable>;\n    propWithFile?: Array<Blob | File>;\n    propWithNumber?: Array<number>;\n};\n\n/**\n * This is a model with one nested property\n */\nexport type ModelWithPropertiesWritable = {\n    required: string;\n    requiredAndNullable: string | null;\n    string?: string;\n    number?: number;\n    boolean?: boolean;\n    reference?: ModelWithString;\n    'property with space'?: string;\n    default?: string;\n    try?: string;\n};\n\n/**\n * This is a model that contains a some patterns\n */\nexport type ModelWithPatternWritable = {\n    key: string;\n    name: string;\n    id?: string;\n    text?: string;\n    patternWithSingleQuotes?: string;\n    patternWithNewline?: string;\n    patternWithBacktick?: string;\n    patternWithUnicode?: string;\n};\n\nexport type FileWritable = {\n    /**\n     * Mime\n     */\n    mime: string;\n};\n\nexport type ModelWithReadOnlyAndWriteOnlyWritable = {\n    foo: string;\n    baz: string;\n};\n\nexport type ModelWithAnyOfConstantSizeArrayWithNSizeAndOptionsWritable = [\n    number | Import,\n    number | Import\n];\n\nexport type AdditionalPropertiesUnknownIssueWritable = {\n    [key: string]: string | number;\n};\n\nexport type OneOfAllOfIssueWritable = ((ConstValue | GenericSchemaDuplicateIssue1SystemBoolean) & _3eNum1Период) | GenericSchemaDuplicateIssue1SystemString;\n\nexport type GenericSchemaDuplicateIssue1SystemBooleanWritable = {\n    item?: boolean;\n    error?: string | null;\n    data?: {\n        [key: string]: never;\n    };\n};\n\nexport type GenericSchemaDuplicateIssue1SystemStringWritable = {\n    item?: string | null;\n    error?: string | null;\n};\n\n/**\n * This is a reusable parameter\n */\nexport type SimpleParameter = string;\n\n/**\n * Parameter with illegal characters\n */\nexport type XFooBar = ModelWithString;\n\n/**\n * A reusable request body\n */\nexport type SimpleRequestBody = ModelWithString;\n\n/**\n * A reusable request body\n */\nexport type SimpleFormData = ModelWithString;\n\nexport type ExportData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no+tag';\n};\n\nexport type PatchApiVbyApiVersionNoTagData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no+tag';\n};\n\nexport type PatchApiVbyApiVersionNoTagResponses = {\n    /**\n     * OK\n     */\n    default: unknown;\n};\n\nexport type ImportData = {\n    body: ModelWithReadOnlyAndWriteOnlyWritable | ModelWithArrayReadOnlyAndWriteOnlyWritable;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no+tag';\n};\n\nexport type ImportResponses = {\n    /**\n     * Success\n     */\n    200: ModelFromZendesk;\n    /**\n     * Default success response\n     */\n    default: ModelWithReadOnlyAndWriteOnly;\n};\n\nexport type ImportResponse = ImportResponses[keyof ImportResponses];\n\nexport type FooWowData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no+tag';\n};\n\nexport type FooWowResponses = {\n    /**\n     * OK\n     */\n    default: unknown;\n};\n\nexport type ApiVVersionODataControllerCountData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple/$count';\n};\n\nexport type ApiVVersionODataControllerCountResponses = {\n    /**\n     * Success\n     */\n    200: ModelFromZendesk;\n};\n\nexport type ApiVVersionODataControllerCountResponse = ApiVVersionODataControllerCountResponses[keyof ApiVVersionODataControllerCountResponses];\n\nexport type GetApiVbyApiVersionSimpleOperationData = {\n    body?: never;\n    path: {\n        /**\n         * foo in method\n         */\n        foo_param: string;\n    };\n    query?: never;\n    url: '/api/v{api-version}/simple:operation';\n};\n\nexport type GetApiVbyApiVersionSimpleOperationErrors = {\n    /**\n     * Default error response\n     */\n    default: ModelWithBoolean;\n};\n\nexport type GetApiVbyApiVersionSimpleOperationError = GetApiVbyApiVersionSimpleOperationErrors[keyof GetApiVbyApiVersionSimpleOperationErrors];\n\nexport type GetApiVbyApiVersionSimpleOperationResponses = {\n    /**\n     * Response is a simple number\n     */\n    200: number;\n};\n\nexport type GetApiVbyApiVersionSimpleOperationResponse = GetApiVbyApiVersionSimpleOperationResponses[keyof GetApiVbyApiVersionSimpleOperationResponses];\n\nexport type DeleteCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type GetCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type HeadCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type OptionsCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type PatchCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type PostCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type PutCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type DeleteFooData3 = {\n    body?: never;\n    headers: {\n        /**\n         * Parameter with illegal characters\n         */\n        'x-Foo-Bar': ModelWithString;\n    };\n    path: {\n        /**\n         * foo in method\n         */\n        foo_param: string;\n        /**\n         * bar in method\n         */\n        BarParam: string;\n    };\n    query?: never;\n    url: '/api/v{api-version}/foo/{foo_param}/bar/{BarParam}';\n};\n\nexport type CallWithDescriptionsData = {\n    body?: never;\n    path?: never;\n    query?: {\n        /**\n         * Testing multiline comments in string: First line\n         * Second line\n         *\n         * Fourth line\n         */\n        parameterWithBreaks?: string;\n        /**\n         * Testing backticks in string: `backticks` and ```multiple backticks``` should work\n         */\n        parameterWithBackticks?: string;\n        /**\n         * Testing slashes in string: \\backwards\\\\\\ and /forwards/// should work\n         */\n        parameterWithSlashes?: string;\n        /**\n         * Testing expression placeholders in string: ${expression} should work\n         */\n        parameterWithExpressionPlaceholders?: string;\n        /**\n         * Testing quotes in string: 'single quote''' and \"double quotes\"\"\" should work\n         */\n        parameterWithQuotes?: string;\n        /**\n         * Testing reserved characters in string: * inline * and ** inline ** should work\n         */\n        parameterWithReservedCharacters?: string;\n    };\n    url: '/api/v{api-version}/descriptions';\n};\n\nexport type DeprecatedCallData = {\n    body?: never;\n    headers: {\n        /**\n         * This parameter is deprecated\n         *\n         * @deprecated\n         */\n        parameter: DeprecatedModel | null;\n    };\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/parameters/deprecated';\n};\n\nexport type CallWithParametersData = {\n    /**\n     * This is the parameter that goes into the body\n     */\n    body: {\n        [key: string]: unknown;\n    } | null;\n    headers: {\n        /**\n         * This is the parameter that goes into the header\n         */\n        parameterHeader: string | null;\n    };\n    path: {\n        /**\n         * This is the parameter that goes into the path\n         */\n        parameterPath: string | null;\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string | null;\n    };\n    query: {\n        foo_ref_enum?: ModelWithNestedArrayEnumsDataFoo;\n        foo_all_of_enum: ModelWithNestedArrayEnumsDataFoo;\n        /**\n         * This is the parameter that goes into the query params\n         */\n        cursor: string | null;\n    };\n    url: '/api/v{api-version}/parameters/{parameterPath}';\n};\n\nexport type CallWithWeirdParameterNamesData = {\n    /**\n     * This is the parameter that goes into the body\n     */\n    body: ModelWithString | null;\n    headers: {\n        /**\n         * This is the parameter that goes into the request header\n         */\n        'parameter.header': string | null;\n    };\n    path: {\n        /**\n         * This is the parameter that goes into the path\n         */\n        'parameter.path.1'?: string;\n        /**\n         * This is the parameter that goes into the path\n         */\n        'parameter-path-2'?: string;\n        /**\n         * This is the parameter that goes into the path\n         */\n        'PARAMETER-PATH-3'?: string;\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string | null;\n    };\n    query: {\n        /**\n         * This is the parameter with a reserved keyword\n         */\n        default?: string;\n        /**\n         * This is the parameter that goes into the request query params\n         */\n        'parameter-query': string | null;\n    };\n    url: '/api/v{api-version}/parameters/{parameter.path.1}/{parameter-path-2}/{PARAMETER-PATH-3}';\n};\n\nexport type GetCallWithOptionalParamData = {\n    /**\n     * This is a required parameter\n     */\n    body: ModelWithOneOfEnum;\n    path?: never;\n    query?: {\n        /**\n         * This is an optional parameter\n         */\n        page?: number;\n    };\n    url: '/api/v{api-version}/parameters';\n};\n\nexport type PostCallWithOptionalParamData = {\n    /**\n     * This is an optional parameter\n     */\n    body?: {\n        offset?: number | null;\n    };\n    path?: never;\n    query: {\n        /**\n         * This is a required parameter\n         */\n        parameter: Pageable;\n    };\n    url: '/api/v{api-version}/parameters';\n};\n\nexport type PostCallWithOptionalParamResponses = {\n    /**\n     * Response is a simple number\n     */\n    200: number;\n    /**\n     * Success\n     */\n    204: void;\n};\n\nexport type PostCallWithOptionalParamResponse = PostCallWithOptionalParamResponses[keyof PostCallWithOptionalParamResponses];\n\nexport type PostApiVbyApiVersionRequestBodyData = {\n    /**\n     * A reusable request body\n     */\n    body?: SimpleRequestBody;\n    path?: never;\n    query?: {\n        /**\n         * This is a reusable parameter\n         */\n        parameter?: string;\n    };\n    url: '/api/v{api-version}/requestBody';\n};\n\nexport type PostApiVbyApiVersionFormDataData = {\n    /**\n     * A reusable request body\n     */\n    body?: SimpleFormData;\n    path?: never;\n    query?: {\n        /**\n         * This is a reusable parameter\n         */\n        parameter?: string;\n    };\n    url: '/api/v{api-version}/formData';\n};\n\nexport type CallWithDefaultParametersData = {\n    body?: never;\n    path?: never;\n    query?: {\n        /**\n         * This is a simple string with default value\n         */\n        parameterString?: string | null;\n        /**\n         * This is a simple number with default value\n         */\n        parameterNumber?: number | null;\n        /**\n         * This is a simple boolean with default value\n         */\n        parameterBoolean?: boolean | null;\n        /**\n         * This is a simple enum with default value\n         */\n        parameterEnum?: 'Success' | 'Warning' | 'Error';\n        /**\n         * This is a simple model with default value\n         */\n        parameterModel?: ModelWithString | null;\n    };\n    url: '/api/v{api-version}/defaults';\n};\n\nexport type CallWithDefaultOptionalParametersData = {\n    body?: never;\n    path?: never;\n    query?: {\n        /**\n         * This is a simple string that is optional with default value\n         */\n        parameterString?: string;\n        /**\n         * This is a simple number that is optional with default value\n         */\n        parameterNumber?: number;\n        /**\n         * This is a simple boolean that is optional with default value\n         */\n        parameterBoolean?: boolean;\n        /**\n         * This is a simple enum that is optional with default value\n         */\n        parameterEnum?: 'Success' | 'Warning' | 'Error';\n        /**\n         * This is a simple model that is optional with default value\n         */\n        parameterModel?: ModelWithString;\n    };\n    url: '/api/v{api-version}/defaults';\n};\n\nexport type CallToTestOrderOfParamsData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * This is a optional string with default\n         */\n        parameterOptionalStringWithDefault?: string;\n        /**\n         * This is a optional string with empty default\n         */\n        parameterOptionalStringWithEmptyDefault?: string;\n        /**\n         * This is a optional string with no default\n         */\n        parameterOptionalStringWithNoDefault?: string;\n        /**\n         * This is a string with default\n         */\n        parameterStringWithDefault: string;\n        /**\n         * This is a string with empty default\n         */\n        parameterStringWithEmptyDefault: string;\n        /**\n         * This is a string with no default\n         */\n        parameterStringWithNoDefault: string;\n        /**\n         * This is a string that can be null with no default\n         */\n        parameterStringNullableWithNoDefault?: string | null;\n        /**\n         * This is a string that can be null with default\n         */\n        parameterStringNullableWithDefault?: string | null;\n    };\n    url: '/api/v{api-version}/defaults';\n};\n\nexport type DuplicateNameData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/duplicate';\n};\n\nexport type DuplicateName2Data = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/duplicate';\n};\n\nexport type DuplicateName3Data = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/duplicate';\n};\n\nexport type DuplicateName4Data = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/duplicate';\n};\n\nexport type CallWithNoContentResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no-content';\n};\n\nexport type CallWithNoContentResponseResponses = {\n    /**\n     * Success\n     */\n    204: void;\n};\n\nexport type CallWithNoContentResponseResponse = CallWithNoContentResponseResponses[keyof CallWithNoContentResponseResponses];\n\nexport type CallWithResponseAndNoContentResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multiple-tags/response-and-no-content';\n};\n\nexport type CallWithResponseAndNoContentResponseResponses = {\n    /**\n     * Response is a simple number\n     */\n    200: number;\n    /**\n     * Success\n     */\n    204: void;\n};\n\nexport type CallWithResponseAndNoContentResponseResponse = CallWithResponseAndNoContentResponseResponses[keyof CallWithResponseAndNoContentResponseResponses];\n\nexport type DummyAData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multiple-tags/a';\n};\n\nexport type DummyAResponses = {\n    200: _400;\n};\n\nexport type DummyAResponse = DummyAResponses[keyof DummyAResponses];\n\nexport type DummyBData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multiple-tags/b';\n};\n\nexport type DummyBResponses = {\n    /**\n     * Success\n     */\n    204: void;\n};\n\nexport type DummyBResponse = DummyBResponses[keyof DummyBResponses];\n\nexport type CallWithResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/response';\n};\n\nexport type CallWithResponseResponses = {\n    default: Import;\n};\n\nexport type CallWithResponseResponse = CallWithResponseResponses[keyof CallWithResponseResponses];\n\nexport type CallWithDuplicateResponsesData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/response';\n};\n\nexport type CallWithDuplicateResponsesErrors = {\n    /**\n     * Message for 500 error\n     */\n    500: ModelWithStringError;\n    /**\n     * Message for 501 error\n     */\n    501: ModelWithStringError;\n    /**\n     * Message for 502 error\n     */\n    502: ModelWithStringError;\n    /**\n     * Message for 4XX errors\n     */\n    '4XX': DictionaryWithArray;\n    /**\n     * Default error response\n     */\n    default: ModelWithBoolean;\n};\n\nexport type CallWithDuplicateResponsesError = CallWithDuplicateResponsesErrors[keyof CallWithDuplicateResponsesErrors];\n\nexport type CallWithDuplicateResponsesResponses = {\n    /**\n     * Message for 200 response\n     */\n    200: ModelWithBoolean & ModelWithInteger;\n    /**\n     * Message for 201 response\n     */\n    201: ModelWithString;\n    /**\n     * Message for 202 response\n     */\n    202: ModelWithString;\n};\n\nexport type CallWithDuplicateResponsesResponse = CallWithDuplicateResponsesResponses[keyof CallWithDuplicateResponsesResponses];\n\nexport type CallWithResponsesData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/response';\n};\n\nexport type CallWithResponsesErrors = {\n    /**\n     * Message for 500 error\n     */\n    500: ModelWithStringError;\n    /**\n     * Message for 501 error\n     */\n    501: ModelWithStringError;\n    /**\n     * Message for 502 error\n     */\n    502: ModelWithStringError;\n    /**\n     * Message for default response\n     */\n    default: ModelWithStringError;\n};\n\nexport type CallWithResponsesError = CallWithResponsesErrors[keyof CallWithResponsesErrors];\n\nexport type CallWithResponsesResponses = {\n    /**\n     * Message for 200 response\n     */\n    200: {\n        readonly '@namespace.string'?: string;\n        readonly '@namespace.integer'?: number;\n        readonly value?: Array<ModelWithString>;\n    };\n    /**\n     * Message for 201 response\n     */\n    201: ModelThatExtends;\n    /**\n     * Message for 202 response\n     */\n    202: ModelThatExtendsExtends;\n};\n\nexport type CallWithResponsesResponse = CallWithResponsesResponses[keyof CallWithResponsesResponses];\n\nexport type CollectionFormatData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * This is an array parameter that is sent as csv format (comma-separated values)\n         */\n        parameterArrayCSV: Array<string> | null;\n        /**\n         * This is an array parameter that is sent as ssv format (space-separated values)\n         */\n        parameterArraySSV: Array<string> | null;\n        /**\n         * This is an array parameter that is sent as tsv format (tab-separated values)\n         */\n        parameterArrayTSV: Array<string> | null;\n        /**\n         * This is an array parameter that is sent as pipes format (pipe-separated values)\n         */\n        parameterArrayPipes: Array<string> | null;\n        /**\n         * This is an array parameter that is sent as multi format (multiple parameter instances)\n         */\n        parameterArrayMulti: Array<string> | null;\n    };\n    url: '/api/v{api-version}/collectionFormat';\n};\n\nexport type TypesData = {\n    body?: never;\n    path?: {\n        /**\n         * This is a number parameter\n         */\n        id?: number;\n    };\n    query: {\n        /**\n         * This is a number parameter\n         */\n        parameterNumber: number;\n        /**\n         * This is a string parameter\n         */\n        parameterString: string | null;\n        /**\n         * This is a boolean parameter\n         */\n        parameterBoolean: boolean | null;\n        /**\n         * This is an object parameter\n         */\n        parameterObject: {\n            [key: string]: unknown;\n        } | null;\n        /**\n         * This is an array parameter\n         */\n        parameterArray: Array<string> | null;\n        /**\n         * This is a dictionary parameter\n         */\n        parameterDictionary: {\n            [key: string]: unknown;\n        } | null;\n        /**\n         * This is an enum parameter\n         */\n        parameterEnum: 'Success' | 'Warning' | 'Error' | null;\n    };\n    url: '/api/v{api-version}/types';\n};\n\nexport type TypesResponses = {\n    /**\n     * Response is a simple number\n     */\n    200: number;\n    /**\n     * Response is a simple string\n     */\n    201: string;\n    /**\n     * Response is a simple boolean\n     */\n    202: boolean;\n    /**\n     * Response is a simple object\n     */\n    203: {\n        [key: string]: unknown;\n    };\n};\n\nexport type TypesResponse = TypesResponses[keyof TypesResponses];\n\nexport type UploadFileData = {\n    body: Blob | File;\n    path: {\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string | null;\n    };\n    query?: never;\n    url: '/api/v{api-version}/upload';\n};\n\nexport type UploadFileResponses = {\n    200: boolean;\n};\n\nexport type UploadFileResponse = UploadFileResponses[keyof UploadFileResponses];\n\nexport type FileResponseData = {\n    body?: never;\n    path: {\n        id: string;\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string;\n    };\n    query?: never;\n    url: '/api/v{api-version}/file/{id}';\n};\n\nexport type FileResponseResponses = {\n    /**\n     * Success\n     */\n    200: Blob | File;\n};\n\nexport type FileResponseResponse = FileResponseResponses[keyof FileResponseResponses];\n\nexport type ComplexTypesData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * Parameter containing object\n         */\n        parameterObject: {\n            first?: {\n                second?: {\n                    third?: string;\n                };\n            };\n        };\n        /**\n         * Parameter containing reference\n         */\n        parameterReference: ModelWithString;\n    };\n    url: '/api/v{api-version}/complex';\n};\n\nexport type ComplexTypesErrors = {\n    /**\n     * 400 `server` error\n     */\n    400: unknown;\n    /**\n     * 500 server error\n     */\n    500: unknown;\n};\n\nexport type ComplexTypesResponses = {\n    /**\n     * Successful response\n     */\n    200: Array<ModelWithString>;\n};\n\nexport type ComplexTypesResponse = ComplexTypesResponses[keyof ComplexTypesResponses];\n\nexport type MultipartResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multipart';\n};\n\nexport type MultipartResponseResponses = {\n    /**\n     * OK\n     */\n    200: {\n        file?: Blob | File;\n        metadata?: {\n            foo?: string;\n            bar?: string;\n        };\n    };\n};\n\nexport type MultipartResponseResponse = MultipartResponseResponses[keyof MultipartResponseResponses];\n\nexport type MultipartRequestData = {\n    body?: {\n        content?: Blob | File;\n        data?: ModelWithString | null;\n    };\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multipart';\n};\n\nexport type ComplexParamsData = {\n    body?: {\n        readonly key: string | null;\n        name: string | null;\n        enabled?: boolean;\n        type: 'Monkey' | 'Horse' | 'Bird';\n        listOfModels?: Array<ModelWithString> | null;\n        listOfStrings?: Array<string> | null;\n        parameters: ModelWithString | ModelWithEnum | ModelWithArray | ModelWithDictionary;\n        readonly user?: {\n            readonly id?: number;\n            readonly name?: string | null;\n        };\n    };\n    path: {\n        id: number;\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string;\n    };\n    query?: never;\n    url: '/api/v{api-version}/complex/{id}';\n};\n\nexport type ComplexParamsResponses = {\n    /**\n     * Success\n     */\n    200: ModelWithString;\n};\n\nexport type ComplexParamsResponse = ComplexParamsResponses[keyof ComplexParamsResponses];\n\nexport type CallWithResultFromHeaderData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/header';\n};\n\nexport type CallWithResultFromHeaderErrors = {\n    /**\n     * 400 server error\n     */\n    400: unknown;\n    /**\n     * 500 server error\n     */\n    500: unknown;\n};\n\nexport type CallWithResultFromHeaderResponses = {\n    /**\n     * Successful response\n     */\n    200: unknown;\n};\n\nexport type TestErrorCodeData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * Status code to return\n         */\n        status: number;\n    };\n    url: '/api/v{api-version}/error';\n};\n\nexport type TestErrorCodeErrors = {\n    /**\n     * Custom message: Internal Server Error\n     */\n    500: unknown;\n    /**\n     * Custom message: Not Implemented\n     */\n    501: unknown;\n    /**\n     * Custom message: Bad Gateway\n     */\n    502: unknown;\n    /**\n     * Custom message: Service Unavailable\n     */\n    503: unknown;\n};\n\nexport type TestErrorCodeResponses = {\n    /**\n     * Custom message: Successful response\n     */\n    200: unknown;\n};\n\nexport type NonAsciiæøåÆøÅöôêÊ字符串Data = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * Dummy input param\n         */\n        nonAsciiParamæøåÆØÅöôêÊ: number;\n    };\n    url: '/api/v{api-version}/non-ascii-æøåÆØÅöôêÊ字符串';\n};\n\nexport type NonAsciiæøåÆøÅöôêÊ字符串Responses = {\n    /**\n     * Successful response\n     */\n    200: Array<NonAsciiStringæøåÆøÅöôêÊ字符串>;\n};\n\nexport type NonAsciiæøåÆøÅöôêÊ字符串Response = NonAsciiæøåÆøÅöôêÊ字符串Responses[keyof NonAsciiæøåÆøÅöôêÊ字符串Responses];\n\nexport type PutWithFormUrlEncodedData = {\n    body: ArrayWithStrings;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/non-ascii-æøåÆØÅöôêÊ字符串';\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-axios/base-url-string/client/client.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { AxiosError, AxiosInstance, RawAxiosRequestHeaders } from 'axios';\nimport axios from 'axios';\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 } from './types.gen';\nimport { buildUrl, createConfig, mergeConfigs, mergeHeaders, setAuthParams } from './utils.gen';\n\nexport const createClient = (config: Config = {}): Client => {\n  let _config = mergeConfigs(createConfig(), config);\n\n  let instance: AxiosInstance;\n\n  if (_config.axios && !('Axios' in _config.axios)) {\n    instance = _config.axios;\n  } else {\n    // eslint-disable-next-line @typescript-eslint/no-unused-vars\n    const { auth, ...configWithoutAuth } = _config;\n    instance = axios.create(configWithoutAuth);\n  }\n\n  const getConfig = (): Config => ({ ..._config });\n\n  const setConfig = (config: Config): Config => {\n    _config = mergeConfigs(_config, config);\n    instance.defaults = {\n      ...instance.defaults,\n      ..._config,\n      // @ts-expect-error\n      headers: mergeHeaders(instance.defaults.headers, _config.headers),\n    };\n    return getConfig();\n  };\n\n  const beforeRequest = async (options: RequestOptions) => {\n    const opts = {\n      ..._config,\n      ...options,\n      axios: options.axios ?? _config.axios ?? instance,\n      headers: mergeHeaders(_config.headers, options.headers),\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.body = opts.bodySerializer(opts.body);\n    }\n\n    const url = buildUrl(opts);\n\n    return { opts, url };\n  };\n\n  // @ts-expect-error\n  const request: Client['request'] = async (options) => {\n    // @ts-expect-error\n    const { opts, url } = await beforeRequest(options);\n    try {\n      // assign Axios here for consistency with fetch\n      const _axios = opts.axios!;\n      // eslint-disable-next-line @typescript-eslint/no-unused-vars\n      const { auth, ...optsWithoutAuth } = opts;\n      const response = await _axios({\n        ...optsWithoutAuth,\n        baseURL: '', // the baseURL is already included in `url`\n        data: getValidRequestBody(opts),\n        headers: opts.headers as RawAxiosRequestHeaders,\n        // let `paramsSerializer()` handle query params if it exists\n        params: opts.paramsSerializer ? opts.query : undefined,\n        url,\n      });\n\n      let { data } = response;\n\n      if (opts.responseType === '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 {\n        ...response,\n        data: data ?? {},\n      };\n    } catch (error) {\n      const e = error as AxiosError;\n      if (opts.throwOnError) {\n        throw e;\n      }\n      // @ts-expect-error\n      e.error = e.response?.data ?? {};\n      return e;\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 Record<string, string>,\n      method,\n      serializedBody: getValidRequestBody(opts) as BodyInit | null | undefined,\n      // @ts-expect-error\n      signal: opts.signal,\n      url,\n    });\n  };\n\n  const _buildUrl: Client['buildUrl'] = (options) =>\n    buildUrl({ axios: instance, ..._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    instance,\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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-axios/base-url-string/client/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type { Auth } from '../core/auth.gen';\nexport type { QuerySerializerOptions } from '../core/bodySerializer.gen';\nexport {\n  formDataBodySerializer,\n  jsonBodySerializer,\n  urlSearchParamsBodySerializer,\n} from '../core/bodySerializer.gen';\nexport { buildClientParams } from '../core/params.gen';\nexport { serializeQueryKeyValue } from '../core/queryKeySerializer.gen';\nexport { createClient } from './client.gen';\nexport type {\n  Client,\n  ClientOptions,\n  Config,\n  CreateClientConfig,\n  Options,\n  RequestOptions,\n  RequestResult,\n  TDataShape,\n} from './types.gen';\nexport { createConfig } from './utils.gen';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-axios/base-url-string/client/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type {\n  AxiosError,\n  AxiosInstance,\n  AxiosRequestHeaders,\n  AxiosResponse,\n  AxiosStatic,\n  CreateAxiosDefaults,\n} from 'axios';\n\nimport type { Auth } from '../core/auth.gen';\nimport type {\n  ServerSentEventsOptions,\n  ServerSentEventsResult,\n} from '../core/serverSentEvents.gen';\nimport type { Client as CoreClient, Config as CoreConfig } from '../core/types.gen';\n\nexport interface Config<T extends ClientOptions = ClientOptions>\n  extends Omit<CreateAxiosDefaults, 'auth' | 'baseURL' | 'headers' | 'method'>, CoreConfig {\n  /**\n   * Axios implementation. You can use this option to provide either an\n   * `AxiosStatic` or an `AxiosInstance`.\n   *\n   * @default axios\n   */\n  axios?: AxiosStatic | AxiosInstance;\n  /**\n   * Base URL for all requests made by this client.\n   */\n  baseURL?: T['baseURL'];\n  /**\n   * An object containing any HTTP headers that you want to pre-populate your\n   * `Headers` object with.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/Headers/Headers#init See more}\n   */\n  headers?:\n    | AxiosRequestHeaders\n    | Record<\n        string,\n        string | number | boolean | (string | number | boolean)[] | null | undefined | unknown\n      >;\n  /**\n   * Throw an error instead of returning it in the response?\n   *\n   * @default false\n   */\n  throwOnError?: T['throwOnError'];\n}\n\nexport interface RequestOptions<\n  TData = unknown,\n  ThrowOnError extends boolean = boolean,\n  Url extends string = string,\n>\n  extends\n    Config<{\n      throwOnError: ThrowOnError;\n    }>,\n    Pick<\n      ServerSentEventsOptions<TData>,\n      | 'onRequest'\n      | 'onSseError'\n      | 'onSseEvent'\n      | 'sseDefaultRetryDelay'\n      | 'sseMaxRetryAttempts'\n      | 'sseMaxRetryDelay'\n    > {\n  /**\n   * Any body that you want to add to your request.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/fetch#body}\n   */\n  body?: unknown;\n  path?: Record<string, unknown>;\n  query?: Record<string, unknown>;\n  /**\n   * Security mechanism(s) to use for the request.\n   */\n  security?: ReadonlyArray<Auth>;\n  url: Url;\n}\n\nexport interface ClientOptions {\n  baseURL?: string;\n  throwOnError?: boolean;\n}\n\nexport type RequestResult<\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = boolean,\n> = ThrowOnError extends true\n  ? Promise<AxiosResponse<TData extends Record<string, unknown> ? TData[keyof TData] : TData>>\n  : Promise<\n      | (AxiosResponse<TData extends Record<string, unknown> ? TData[keyof TData] : TData> & {\n          error: undefined;\n        })\n      | (AxiosError<TError extends Record<string, unknown> ? TError[keyof TError] : TError> & {\n          data: undefined;\n          error: TError extends Record<string, unknown> ? TError[keyof TError] : TError;\n        })\n    >;\n\ntype MethodFn = <TData = unknown, TError = unknown, ThrowOnError extends boolean = false>(\n  options: Omit<RequestOptions<TData, ThrowOnError>, 'method'>,\n) => RequestResult<TData, TError, ThrowOnError>;\n\ntype SseFn = <TData = unknown, TError = unknown, ThrowOnError extends boolean = false>(\n  options: Omit<RequestOptions<TData, ThrowOnError>, 'method'>,\n) => Promise<ServerSentEventsResult<TData, TError>>;\n\ntype RequestFn = <TData = unknown, TError = unknown, ThrowOnError extends boolean = false>(\n  options: Omit<RequestOptions<TData, ThrowOnError>, 'method'> &\n    Pick<Required<RequestOptions<TData, ThrowOnError>>, 'method'>,\n) => RequestResult<TData, TError, ThrowOnError>;\n\ntype BuildUrlFn = <\n  TData extends {\n    body?: unknown;\n    path?: Record<string, unknown>;\n    query?: Record<string, unknown>;\n    url: string;\n  },\n>(\n  options: TData & Options<TData>,\n) => string;\n\nexport type Client = CoreClient<RequestFn, Config, MethodFn, BuildUrlFn, SseFn> & {\n  instance: AxiosInstance;\n};\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 = ClientOptions> = (\n  override?: Config<ClientOptions & T>,\n) => Config<Required<ClientOptions> & T>;\n\nexport interface TDataShape {\n  body?: unknown;\n  headers?: unknown;\n  path?: unknown;\n  query?: unknown;\n  url: string;\n}\n\ntype OmitKeys<T, K> = Pick<T, Exclude<keyof T, K>>;\n\nexport type Options<\n  TData extends TDataShape = TDataShape,\n  ThrowOnError extends boolean = boolean,\n  TResponse = unknown,\n> = OmitKeys<RequestOptions<TResponse, ThrowOnError>, 'body' | 'path' | 'query' | 'url'> &\n  ([TData] extends [never] ? unknown : Omit<TData, 'url'>);\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-axios/base-url-string/client/utils.gen.ts",
    "content": "// 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 {\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\nconst checkForExistence = (\n  options: Pick<RequestOptions, 'auth' | 'query'> & {\n    headers: Record<any, unknown>;\n  },\n  name?: string,\n): boolean => {\n  if (!name) {\n    return false;\n  }\n  if (name in options.headers || options.query?.[name]) {\n    return true;\n  }\n  if (\n    'Cookie' in options.headers &&\n    options.headers['Cookie'] &&\n    typeof options.headers['Cookie'] === 'string'\n  ) {\n    return options.headers['Cookie'].includes(`${name}=`);\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: Record<any, unknown>;\n  }) => {\n  for (const auth of security) {\n    if (checkForExistence(options, auth.name)) {\n      continue;\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        const value = `${name}=${token}`;\n        if ('Cookie' in options.headers && options.headers['Cookie']) {\n          options.headers['Cookie'] = `${options.headers['Cookie']}; ${value}`;\n        } else {\n          options.headers['Cookie'] = value;\n        }\n        break;\n      }\n      case 'header':\n      default:\n        options.headers[name] = token;\n        break;\n    }\n  }\n};\n\nexport const buildUrl: Client['buildUrl'] = (options) => {\n  const instanceBaseUrl = options.axios?.defaults?.baseURL;\n\n  const baseUrl =\n    !!options.baseURL && typeof options.baseURL === 'string' ? options.baseURL : instanceBaseUrl;\n\n  return getUrl({\n    baseUrl: baseUrl as string,\n    path: options.path,\n    // let `paramsSerializer()` handle query params if it exists\n    query: !options.paramsSerializer ? options.query : undefined,\n    querySerializer:\n      typeof options.querySerializer === 'function'\n        ? options.querySerializer\n        : createQuerySerializer(options.querySerializer),\n    url: options.url,\n  });\n};\n\nexport const mergeConfigs = (a: Config, b: Config): Config => {\n  const config = { ...a, ...b };\n  config.headers = mergeHeaders(a.headers, b.headers);\n  return config;\n};\n\n/**\n * Special Axios headers keywords allowing to set headers by request method.\n */\nexport const axiosHeadersKeywords = [\n  'common',\n  'delete',\n  'get',\n  'head',\n  'patch',\n  'post',\n  'put',\n] as const;\n\nexport const mergeHeaders = (\n  ...headers: Array<Required<Config>['headers'] | undefined>\n): Record<any, unknown> => {\n  const mergedHeaders: Record<any, unknown> = {};\n  for (const header of headers) {\n    if (!header || typeof header !== 'object') {\n      continue;\n    }\n\n    const iterator = Object.entries(header);\n\n    for (const [key, value] of iterator) {\n      if (\n        axiosHeadersKeywords.includes(key as (typeof axiosHeadersKeywords)[number]) &&\n        typeof value === 'object'\n      ) {\n        mergedHeaders[key] = {\n          ...(mergedHeaders[key] as Record<any, unknown>),\n          ...value,\n        };\n      } else if (value === null) {\n        delete mergedHeaders[key];\n      } else if (Array.isArray(value)) {\n        for (const v of value) {\n          // @ts-expect-error\n          mergedHeaders[key] = [...(mergedHeaders[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[key] = typeof value === 'object' ? JSON.stringify(value) : (value as string);\n      }\n    }\n  }\n  return mergedHeaders;\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  ...override,\n});\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-axios/base-url-string/client.gen.ts",
    "content": "// 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://foo.com' }));\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-axios/base-url-string/core/auth.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-axios/base-url-string/core/bodySerializer.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-axios/base-url-string/core/params.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-axios/base-url-string/core/pathSerializer.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-axios/base-url-string/core/queryKeySerializer.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\n/**\n * JSON-friendly union that mirrors what Pinia Colada can hash.\n */\nexport type JsonValue =\n  | null\n  | string\n  | number\n  | boolean\n  | JsonValue[]\n  | { [key: string]: JsonValue };\n\n/**\n * Replacer that converts non-JSON values (bigint, Date, etc.) to safe substitutes.\n */\nexport const queryKeyJsonReplacer = (_key: string, value: unknown) => {\n  if (value === undefined || typeof value === 'function' || typeof value === 'symbol') {\n    return undefined;\n  }\n  if (typeof value === 'bigint') {\n    return value.toString();\n  }\n  if (value instanceof Date) {\n    return value.toISOString();\n  }\n  return value;\n};\n\n/**\n * Safely stringifies a value and parses it back into a JsonValue.\n */\nexport const stringifyToJsonValue = (input: unknown): JsonValue | undefined => {\n  try {\n    const json = JSON.stringify(input, queryKeyJsonReplacer);\n    if (json === undefined) {\n      return undefined;\n    }\n    return JSON.parse(json) as JsonValue;\n  } catch {\n    return undefined;\n  }\n};\n\n/**\n * Detects plain objects (including objects with a null prototype).\n */\nconst isPlainObject = (value: unknown): value is Record<string, unknown> => {\n  if (value === null || typeof value !== 'object') {\n    return false;\n  }\n  const prototype = Object.getPrototypeOf(value as object);\n  return prototype === Object.prototype || prototype === null;\n};\n\n/**\n * Turns URLSearchParams into a sorted JSON object for deterministic keys.\n */\nconst serializeSearchParams = (params: URLSearchParams): JsonValue => {\n  const entries = Array.from(params.entries()).sort(([a], [b]) => a.localeCompare(b));\n  const result: Record<string, JsonValue> = {};\n\n  for (const [key, value] of entries) {\n    const existing = result[key];\n    if (existing === undefined) {\n      result[key] = value;\n      continue;\n    }\n\n    if (Array.isArray(existing)) {\n      (existing as string[]).push(value);\n    } else {\n      result[key] = [existing, value];\n    }\n  }\n\n  return result;\n};\n\n/**\n * Normalizes any accepted value into a JSON-friendly shape for query keys.\n */\nexport const serializeQueryKeyValue = (value: unknown): JsonValue | undefined => {\n  if (value === null) {\n    return null;\n  }\n\n  if (typeof value === 'string' || typeof value === 'number' || typeof value === 'boolean') {\n    return value;\n  }\n\n  if (value === undefined || typeof value === 'function' || typeof value === 'symbol') {\n    return undefined;\n  }\n\n  if (typeof value === 'bigint') {\n    return value.toString();\n  }\n\n  if (value instanceof Date) {\n    return value.toISOString();\n  }\n\n  if (Array.isArray(value)) {\n    return stringifyToJsonValue(value);\n  }\n\n  if (typeof URLSearchParams !== 'undefined' && value instanceof URLSearchParams) {\n    return serializeSearchParams(value);\n  }\n\n  if (isPlainObject(value)) {\n    return stringifyToJsonValue(value);\n  }\n\n  return undefined;\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-axios/base-url-string/core/serverSentEvents.gen.ts",
    "content": "// 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 const 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            // Normalize line endings: CRLF -> LF, then CR -> LF\n            buffer = buffer.replace(/\\r\\n/g, '\\n').replace(/\\r/g, '\\n');\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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-axios/base-url-string/core/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { Auth, AuthToken } from './auth.gen';\nimport type { BodySerializer, QuerySerializer, QuerySerializerOptions } from './bodySerializer.gen';\n\nexport type HttpMethod =\n  | 'connect'\n  | 'delete'\n  | 'get'\n  | 'head'\n  | 'options'\n  | 'patch'\n  | 'post'\n  | 'put'\n  | 'trace';\n\nexport type Client<\n  RequestFn = never,\n  Config = unknown,\n  MethodFn = never,\n  BuildUrlFn = never,\n  SseFn = never,\n> = {\n  /**\n   * Returns the final request URL.\n   */\n  buildUrl: BuildUrlFn;\n  getConfig: () => Config;\n  request: RequestFn;\n  setConfig: (config: Config) => Config;\n} & {\n  [K in HttpMethod]: MethodFn;\n} & ([SseFn] extends [never] ? { sse?: never } : { sse: { [K in HttpMethod]: SseFn } });\n\nexport interface Config {\n  /**\n   * Auth token or a function returning auth token. The resolved value will be\n   * added to the request payload as defined by its `security` array.\n   */\n  auth?: ((auth: Auth) => Promise<AuthToken> | AuthToken) | AuthToken;\n  /**\n   * A function for serializing request body parameter. By default,\n   * {@link JSON.stringify()} will be used.\n   */\n  bodySerializer?: BodySerializer | null;\n  /**\n   * An object containing any HTTP headers that you want to pre-populate your\n   * `Headers` object with.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/Headers/Headers#init See more}\n   */\n  headers?:\n    | RequestInit['headers']\n    | Record<\n        string,\n        string | number | boolean | (string | number | boolean)[] | null | undefined | unknown\n      >;\n  /**\n   * The request method.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/fetch#method See more}\n   */\n  method?: Uppercase<HttpMethod>;\n  /**\n   * A function for serializing request query parameters. By default, arrays\n   * will be exploded in form style, objects will be exploded in deepObject\n   * style, and reserved characters are percent-encoded.\n   *\n   * This method will have no effect if the native `paramsSerializer()` Axios\n   * API function is used.\n   *\n   * {@link https://swagger.io/docs/specification/serialization/#query View examples}\n   */\n  querySerializer?: QuerySerializer | QuerySerializerOptions;\n  /**\n   * A function validating request data. This is useful if you want to ensure\n   * the request conforms to the desired shape, so it can be safely sent to\n   * the server.\n   */\n  requestValidator?: (data: unknown) => Promise<unknown>;\n  /**\n   * A function transforming response data before it's returned. This is useful\n   * for post-processing data, e.g. converting ISO strings into Date objects.\n   */\n  responseTransformer?: (data: unknown) => Promise<unknown>;\n  /**\n   * A function validating response data. This is useful if you want to ensure\n   * the response conforms to the desired shape, so it can be safely passed to\n   * the transformers and returned to the user.\n   */\n  responseValidator?: (data: unknown) => Promise<unknown>;\n}\n\ntype IsExactlyNeverOrNeverUndefined<T> = [T] extends [never]\n  ? true\n  : [T] extends [never | undefined]\n    ? [undefined] extends [T]\n      ? false\n      : true\n    : false;\n\nexport type OmitNever<T extends Record<string, unknown>> = {\n  [K in keyof T as IsExactlyNeverOrNeverUndefined<T[K]> extends true ? never : K]: T[K];\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-axios/base-url-string/core/utils.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-axios/base-url-string/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type { _3eNum1Период, _400, AdditionalPropertiesIntegerIssue, AdditionalPropertiesUnknownIssue, AdditionalPropertiesUnknownIssue2, AdditionalPropertiesUnknownIssue3, AdditionalPropertiesUnknownIssueWritable, AnyOfAnyAndNull, AnyOfArrays, ApiVVersionODataControllerCountData, ApiVVersionODataControllerCountResponse, ApiVVersionODataControllerCountResponses, ArrayWithAnyOfProperties, ArrayWithArray, ArrayWithBooleans, ArrayWithNumbers, ArrayWithProperties, ArrayWithReferences, ArrayWithStrings, CallToTestOrderOfParamsData, CallWithDefaultOptionalParametersData, CallWithDefaultParametersData, CallWithDescriptionsData, CallWithDuplicateResponsesData, CallWithDuplicateResponsesError, CallWithDuplicateResponsesErrors, CallWithDuplicateResponsesResponse, CallWithDuplicateResponsesResponses, CallWithNoContentResponseData, CallWithNoContentResponseResponse, CallWithNoContentResponseResponses, CallWithParametersData, CallWithResponseAndNoContentResponseData, CallWithResponseAndNoContentResponseResponse, CallWithResponseAndNoContentResponseResponses, CallWithResponseData, CallWithResponseResponse, CallWithResponseResponses, CallWithResponsesData, CallWithResponsesError, CallWithResponsesErrors, CallWithResponsesResponse, CallWithResponsesResponses, CallWithResultFromHeaderData, CallWithResultFromHeaderErrors, CallWithResultFromHeaderResponses, CallWithWeirdParameterNamesData, CamelCaseCommentWithBreaks, CharactersInDescription, ClientOptions, CollectionFormatData, CommentWithBackticks, CommentWithBackticksAndQuotes, CommentWithBreaks, CommentWithExpressionPlaceholders, CommentWithQuotes, CommentWithReservedCharacters, CommentWithSlashes, ComplexParamsData, ComplexParamsResponse, ComplexParamsResponses, ComplexTypesData, ComplexTypesErrors, ComplexTypesResponse, ComplexTypesResponses, CompositionBaseModel, CompositionExtendedModel, CompositionWithAllOfAndNullable, CompositionWithAnyOf, CompositionWithAnyOfAndNullable, CompositionWithAnyOfAnonymous, CompositionWithNestedAnyAndTypeNull, CompositionWithNestedAnyOfAndNull, CompositionWithOneOf, CompositionWithOneOfAndComplexArrayDictionary, CompositionWithOneOfAndNullable, CompositionWithOneOfAndProperties, CompositionWithOneOfAndSimpleArrayDictionary, CompositionWithOneOfAndSimpleDictionary, CompositionWithOneOfAnonymous, CompositionWithOneOfDiscriminator, ConstValue, Default, DeleteCallWithoutParametersAndResponseData, DeleteFooData, DeleteFooData2, DeleteFooData3, DeprecatedCallData, DeprecatedModel, DictionaryWithArray, DictionaryWithDictionary, DictionaryWithProperties, DictionaryWithPropertiesAndAdditionalProperties, DictionaryWithReference, DictionaryWithString, DummyAData, DummyAResponse, DummyAResponses, DummyBData, DummyBResponse, DummyBResponses, DuplicateName2Data, DuplicateName3Data, DuplicateName4Data, DuplicateNameData, EnumFromDescription, EnumWithExtensions, EnumWithNumbers, EnumWithReplacedCharacters, EnumWithStrings, EnumWithXEnumNames, ExportData, ExternalRefA, ExternalRefB, ExternalSharedModel, File, FileResponseData, FileResponseResponse, FileResponseResponses, FileWritable, FooWowData, FooWowResponses, FreeFormObjectWithAdditionalPropertiesEqEmptyObject, FreeFormObjectWithAdditionalPropertiesEqTrue, FreeFormObjectWithoutAdditionalProperties, GenericSchemaDuplicateIssue1SystemBoolean, GenericSchemaDuplicateIssue1SystemBooleanWritable, GenericSchemaDuplicateIssue1SystemString, GenericSchemaDuplicateIssue1SystemStringWritable, GetApiVbyApiVersionSimpleOperationData, GetApiVbyApiVersionSimpleOperationError, GetApiVbyApiVersionSimpleOperationErrors, GetApiVbyApiVersionSimpleOperationResponse, GetApiVbyApiVersionSimpleOperationResponses, GetCallWithOptionalParamData, GetCallWithoutParametersAndResponseData, HeadCallWithoutParametersAndResponseData, Import, ImportData, ImportResponse, ImportResponses, IoK8sApimachineryPkgApisMetaV1DeleteOptions, IoK8sApimachineryPkgApisMetaV1Preconditions, ModelCircle, ModelFromZendesk, ModelSquare, ModelThatExtends, ModelThatExtendsExtends, ModelWithAdditionalPropertiesEqTrue, ModelWithAdditionalPropertiesRef, ModelWithAnyOfConstantSizeArray, ModelWithAnyOfConstantSizeArrayAndIntersect, ModelWithAnyOfConstantSizeArrayNullable, ModelWithAnyOfConstantSizeArrayWithNSizeAndOptions, ModelWithAnyOfConstantSizeArrayWithNSizeAndOptionsWritable, ModelWithArray, ModelWithArrayReadOnlyAndWriteOnly, ModelWithArrayReadOnlyAndWriteOnlyWritable, ModelWithBackticksInDescription, ModelWithBoolean, ModelWithCircularReference, ModelWithConst, ModelWithConstantSizeArray, ModelWithDictionary, ModelWithDuplicateImports, ModelWithDuplicateProperties, ModelWithEnum, ModelWithEnumFromDescription, ModelWithEnumWithHyphen, ModelWithInteger, ModelWithNestedArrayEnums, ModelWithNestedArrayEnumsData, ModelWithNestedArrayEnumsDataBar, ModelWithNestedArrayEnumsDataFoo, ModelWithNestedCompositionEnums, ModelWithNestedEnums, ModelWithNestedProperties, ModelWithNullableObject, ModelWithNullableString, ModelWithNumericEnumUnion, ModelWithOneOfAndProperties, ModelWithOneOfEnum, ModelWithOrderedProperties, ModelWithPattern, ModelWithPatternWritable, ModelWithPrefixItemsConstantSizeArray, ModelWithProperties, ModelWithPropertiesWritable, ModelWithReadOnlyAndWriteOnly, ModelWithReadOnlyAndWriteOnlyWritable, ModelWithReference, ModelWithReferenceWritable, ModelWithString, ModelWithStringError, MultipartRequestData, MultipartResponseData, MultipartResponseResponse, MultipartResponseResponses, NestedAnyOfArraysNullable, NonAsciiæøåÆøÅöôêÊ字符串Data, NonAsciiæøåÆøÅöôêÊ字符串Response, NonAsciiæøåÆøÅöôêÊ字符串Responses, NonAsciiStringæøåÆøÅöôêÊ字符串, NullableObject, OneOfAllOfIssue, OneOfAllOfIssueWritable, OptionsCallWithoutParametersAndResponseData, Pageable, ParameterSimpleParameterUnused, PatchApiVbyApiVersionNoTagData, PatchApiVbyApiVersionNoTagResponses, PatchCallWithoutParametersAndResponseData, PostApiVbyApiVersionFormDataData, PostApiVbyApiVersionRequestBodyData, PostCallWithOptionalParamData, PostCallWithOptionalParamResponse, PostCallWithOptionalParamResponses, PostCallWithoutParametersAndResponseData, PostServiceWithEmptyTagResponse, PostServiceWithEmptyTagResponse2, PutCallWithoutParametersAndResponseData, PutWithFormUrlEncodedData, SchemaWithFormRestrictedKeys, SimpleBoolean, SimpleFile, SimpleFormData, SimpleInteger, SimpleParameter, SimpleReference, SimpleRequestBody, SimpleString, SimpleStringWithPattern, TestErrorCodeData, TestErrorCodeErrors, TestErrorCodeResponses, TypesData, TypesResponse, TypesResponses, UploadFileData, UploadFileResponse, UploadFileResponses, XFooBar } from './types.gen';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-axios/base-url-string/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type ClientOptions = {\n    baseURL: 'http://localhost:3000/base' | (string & {});\n};\n\n/**\n * Model with number-only name\n */\nexport type _400 = string;\n\n/**\n * External ref to shared model (A)\n */\nexport type ExternalRefA = ExternalSharedModel;\n\n/**\n * External ref to shared model (B)\n */\nexport type ExternalRefB = ExternalSharedModel;\n\n/**\n * Testing multiline comments in string: First line\n * Second line\n *\n * Fourth line\n */\nexport type CamelCaseCommentWithBreaks = number;\n\n/**\n * Testing multiline comments in string: First line\n * Second line\n *\n * Fourth line\n */\nexport type CommentWithBreaks = number;\n\n/**\n * Testing backticks in string: `backticks` and ```multiple backticks``` should work\n */\nexport type CommentWithBackticks = number;\n\n/**\n * Testing backticks and quotes in string: `backticks`, 'quotes', \"double quotes\" and ```multiple backticks``` should work\n */\nexport type CommentWithBackticksAndQuotes = number;\n\n/**\n * Testing slashes in string: \\backwards\\\\\\ and /forwards/// should work\n */\nexport type CommentWithSlashes = number;\n\n/**\n * Testing expression placeholders in string: ${expression} should work\n */\nexport type CommentWithExpressionPlaceholders = number;\n\n/**\n * Testing quotes in string: 'single quote''' and \"double quotes\"\"\" should work\n */\nexport type CommentWithQuotes = number;\n\n/**\n * Testing reserved characters in string: * inline * and ** inline ** should work\n */\nexport type CommentWithReservedCharacters = number;\n\n/**\n * This is a simple number\n */\nexport type SimpleInteger = number;\n\n/**\n * This is a simple boolean\n */\nexport type SimpleBoolean = boolean;\n\n/**\n * This is a simple string\n */\nexport type SimpleString = string;\n\n/**\n * A string with non-ascii (unicode) characters valid in typescript identifiers (æøåÆØÅöÔèÈ字符串)\n */\nexport type NonAsciiStringæøåÆøÅöôêÊ字符串 = string;\n\n/**\n * This is a simple file\n */\nexport type SimpleFile = Blob | File;\n\n/**\n * This is a simple reference\n */\nexport type SimpleReference = ModelWithString;\n\n/**\n * This is a simple string\n */\nexport type SimpleStringWithPattern = string | null;\n\n/**\n * This is a simple enum with strings\n */\nexport type EnumWithStrings = 'Success' | 'Warning' | 'Error' | '\\'Single Quote\\'' | '\"Double Quotes\"' | 'Non-ascii: øæåôöØÆÅÔÖ字符串';\n\nexport type EnumWithReplacedCharacters = '\\'Single Quote\\'' | '\"Double Quotes\"' | 'øæåôöØÆÅÔÖ字符串' | 3.1 | '';\n\n/**\n * This is a simple enum with numbers\n */\nexport type EnumWithNumbers = 1 | 2 | 3 | 1.1 | 1.2 | 1.3 | 100 | 200 | 300 | -100 | -200 | -300 | -1.1 | -1.2 | -1.3;\n\n/**\n * Success=1,Warning=2,Error=3\n */\nexport type EnumFromDescription = number;\n\n/**\n * This is a simple enum with numbers\n */\nexport type EnumWithExtensions = 200 | 400 | 500;\n\nexport type EnumWithXEnumNames = 0 | 1 | 2;\n\n/**\n * This is a simple array with numbers\n */\nexport type ArrayWithNumbers = Array<number>;\n\n/**\n * This is a simple array with booleans\n */\nexport type ArrayWithBooleans = Array<boolean>;\n\n/**\n * This is a simple array with strings\n */\nexport type ArrayWithStrings = Array<string>;\n\n/**\n * This is a simple array with references\n */\nexport type ArrayWithReferences = Array<ModelWithString>;\n\n/**\n * This is a simple array containing an array\n */\nexport type ArrayWithArray = Array<Array<ModelWithString>>;\n\n/**\n * This is a simple array with properties\n */\nexport type ArrayWithProperties = Array<{\n    '16x16'?: CamelCaseCommentWithBreaks;\n    bar?: string;\n}>;\n\n/**\n * This is a simple array with any of properties\n */\nexport type ArrayWithAnyOfProperties = Array<{\n    foo?: string;\n} | {\n    bar?: string;\n}>;\n\nexport type AnyOfAnyAndNull = {\n    data?: unknown | null;\n};\n\n/**\n * This is a simple array with any of properties\n */\nexport type AnyOfArrays = {\n    results?: Array<{\n        foo?: string;\n    } | {\n        bar?: string;\n    }>;\n};\n\n/**\n * This is a string dictionary\n */\nexport type DictionaryWithString = {\n    [key: string]: string;\n};\n\nexport type DictionaryWithPropertiesAndAdditionalProperties = {\n    foo?: number;\n    bar?: boolean;\n    [key: string]: string | number | boolean | undefined;\n};\n\n/**\n * This is a string reference\n */\nexport type DictionaryWithReference = {\n    [key: string]: ModelWithString;\n};\n\n/**\n * This is a complex dictionary\n */\nexport type DictionaryWithArray = {\n    [key: string]: Array<ModelWithString>;\n};\n\n/**\n * This is a string dictionary\n */\nexport type DictionaryWithDictionary = {\n    [key: string]: {\n        [key: string]: string;\n    };\n};\n\n/**\n * This is a complex dictionary\n */\nexport type DictionaryWithProperties = {\n    [key: string]: {\n        foo?: string;\n        bar?: string;\n    };\n};\n\n/**\n * This is a model with one number property\n */\nexport type ModelWithInteger = {\n    /**\n     * This is a simple number property\n     */\n    prop?: number;\n};\n\n/**\n * This is a model with one boolean property\n */\nexport type ModelWithBoolean = {\n    /**\n     * This is a simple boolean property\n     */\n    prop?: boolean;\n};\n\n/**\n * This is a model with one string property\n */\nexport type ModelWithString = {\n    /**\n     * This is a simple string property\n     */\n    prop?: string;\n};\n\n/**\n * This is a model with one string property\n */\nexport type ModelWithStringError = {\n    /**\n     * This is a simple string property\n     */\n    prop?: string;\n};\n\n/**\n * `Comment` or `VoiceComment`. The JSON object for adding voice comments to tickets is different. See [Adding voice comments to tickets](/documentation/ticketing/managing-tickets/adding-voice-comments-to-tickets)\n */\nexport type ModelFromZendesk = string;\n\n/**\n * This is a model with one string property\n */\nexport type ModelWithNullableString = {\n    /**\n     * This is a simple string property\n     */\n    nullableProp1?: string | null;\n    /**\n     * This is a simple string property\n     */\n    nullableRequiredProp1: string | null;\n    /**\n     * This is a simple string property\n     */\n    nullableProp2?: string | null;\n    /**\n     * This is a simple string property\n     */\n    nullableRequiredProp2: string | null;\n    /**\n     * This is a simple enum with strings\n     */\n    'foo_bar-enum'?: 'Success' | 'Warning' | 'Error' | 'ØÆÅ字符串';\n};\n\n/**\n * This is a model with one enum\n */\nexport type ModelWithEnum = {\n    /**\n     * This is a simple enum with strings\n     */\n    'foo_bar-enum'?: 'Success' | 'Warning' | 'Error' | 'ØÆÅ字符串';\n    /**\n     * These are the HTTP error code enums\n     */\n    statusCode?: '100' | '200 FOO' | '300 FOO_BAR' | '400 foo-bar' | '500 foo.bar' | '600 foo&bar';\n    /**\n     * Simple boolean enum\n     */\n    bool?: true;\n};\n\n/**\n * This is a model with one enum with escaped name\n */\nexport type ModelWithEnumWithHyphen = {\n    /**\n     * Foo-Bar-Baz-Qux\n     */\n    'foo-bar-baz-qux'?: '3.0';\n};\n\n/**\n * This is a model with one enum\n */\nexport type ModelWithEnumFromDescription = {\n    /**\n     * Success=1,Warning=2,Error=3\n     */\n    test?: number;\n};\n\n/**\n * This is a model with nested enums\n */\nexport type ModelWithNestedEnums = {\n    dictionaryWithEnum?: {\n        [key: string]: 'Success' | 'Warning' | 'Error';\n    };\n    dictionaryWithEnumFromDescription?: {\n        [key: string]: number;\n    };\n    arrayWithEnum?: Array<'Success' | 'Warning' | 'Error'>;\n    arrayWithDescription?: Array<number>;\n    /**\n     * This is a simple enum with strings\n     */\n    'foo_bar-enum'?: 'Success' | 'Warning' | 'Error' | 'ØÆÅ字符串';\n};\n\n/**\n * This is a model with one property containing a reference\n */\nexport type ModelWithReference = {\n    prop?: ModelWithProperties;\n};\n\n/**\n * This is a model with one property containing an array\n */\nexport type ModelWithArrayReadOnlyAndWriteOnly = {\n    prop?: Array<ModelWithReadOnlyAndWriteOnly>;\n    propWithFile?: Array<Blob | File>;\n    propWithNumber?: Array<number>;\n};\n\n/**\n * This is a model with one property containing an array\n */\nexport type ModelWithArray = {\n    prop?: Array<ModelWithString>;\n    propWithFile?: Array<Blob | File>;\n    propWithNumber?: Array<number>;\n};\n\n/**\n * This is a model with one property containing a dictionary\n */\nexport type ModelWithDictionary = {\n    prop?: {\n        [key: string]: string;\n    };\n};\n\n/**\n * This is a deprecated model with a deprecated property\n *\n * @deprecated\n */\nexport type DeprecatedModel = {\n    /**\n     * This is a deprecated property\n     *\n     * @deprecated\n     */\n    prop?: string;\n};\n\n/**\n * This is a model with one property containing a circular reference\n */\nexport type ModelWithCircularReference = {\n    prop?: ModelWithCircularReference;\n};\n\n/**\n * This is a model with one property with a 'one of' relationship\n */\nexport type CompositionWithOneOf = {\n    propA?: ModelWithString | ModelWithEnum | ModelWithArray | ModelWithDictionary;\n};\n\n/**\n * This is a model with one property with a 'one of' relationship where the options are not $ref\n */\nexport type CompositionWithOneOfAnonymous = {\n    propA?: {\n        propA?: string;\n    } | string | number;\n};\n\n/**\n * Circle\n */\nexport type ModelCircle = {\n    kind: string;\n    radius?: number;\n};\n\n/**\n * Square\n */\nexport type ModelSquare = {\n    kind: string;\n    sideLength?: number;\n};\n\n/**\n * This is a model with one property with a 'one of' relationship where the options are not $ref\n */\nexport type CompositionWithOneOfDiscriminator = ({\n    kind: 'circle';\n} & ModelCircle) | ({\n    kind: 'square';\n} & ModelSquare);\n\n/**\n * This is a model with one property with a 'any of' relationship\n */\nexport type CompositionWithAnyOf = {\n    propA?: ModelWithString | ModelWithEnum | ModelWithArray | ModelWithDictionary;\n};\n\n/**\n * This is a model with one property with a 'any of' relationship where the options are not $ref\n */\nexport type CompositionWithAnyOfAnonymous = {\n    propA?: {\n        propA?: string;\n    } | string | number;\n};\n\n/**\n * This is a model with nested 'any of' property with a type null\n */\nexport type CompositionWithNestedAnyAndTypeNull = {\n    propA?: Array<ModelWithDictionary | null> | Array<ModelWithArray | null>;\n};\n\nexport type _3eNum1Период = 'Bird' | 'Dog';\n\nexport type ConstValue = 'ConstValue';\n\n/**\n * This is a model with one property with a 'any of' relationship where the options are not $ref\n */\nexport type CompositionWithNestedAnyOfAndNull = {\n    /**\n     * Scopes\n     */\n    propA?: Array<_3eNum1Период | ConstValue> | null;\n};\n\n/**\n * This is a model with one property with a 'one of' relationship\n */\nexport type CompositionWithOneOfAndNullable = {\n    propA?: {\n        boolean?: boolean;\n    } | ModelWithEnum | ModelWithArray | ModelWithDictionary | null;\n};\n\n/**\n * This is a model that contains a simple dictionary within composition\n */\nexport type CompositionWithOneOfAndSimpleDictionary = {\n    propA?: boolean | {\n        [key: string]: number;\n    };\n};\n\n/**\n * This is a model that contains a dictionary of simple arrays within composition\n */\nexport type CompositionWithOneOfAndSimpleArrayDictionary = {\n    propA?: boolean | {\n        [key: string]: Array<boolean>;\n    };\n};\n\n/**\n * This is a model that contains a dictionary of complex arrays (composited) within composition\n */\nexport type CompositionWithOneOfAndComplexArrayDictionary = {\n    propA?: boolean | {\n        [key: string]: Array<number | string>;\n    };\n};\n\n/**\n * This is a model with one property with a 'all of' relationship\n */\nexport type CompositionWithAllOfAndNullable = {\n    propA?: ({\n        boolean?: boolean;\n    } & ModelWithEnum & ModelWithArray & ModelWithDictionary) | null;\n};\n\n/**\n * This is a model with one property with a 'any of' relationship\n */\nexport type CompositionWithAnyOfAndNullable = {\n    propA?: {\n        boolean?: boolean;\n    } | ModelWithEnum | ModelWithArray | ModelWithDictionary | null;\n};\n\n/**\n * This is a base model with two simple optional properties\n */\nexport type CompositionBaseModel = {\n    firstName?: string;\n    lastname?: string;\n};\n\n/**\n * This is a model that extends the base model\n */\nexport type CompositionExtendedModel = CompositionBaseModel & {\n    age: number;\n    firstName: string;\n    lastname: string;\n};\n\n/**\n * This is a model with one nested property\n */\nexport type ModelWithProperties = {\n    required: string;\n    readonly requiredAndReadOnly: string;\n    requiredAndNullable: string | null;\n    string?: string;\n    number?: number;\n    boolean?: boolean;\n    reference?: ModelWithString;\n    'property with space'?: string;\n    default?: string;\n    try?: string;\n    readonly '@namespace.string'?: string;\n    readonly '@namespace.integer'?: number;\n};\n\n/**\n * This is a model with one nested property\n */\nexport type ModelWithNestedProperties = {\n    readonly first: {\n        readonly second: {\n            readonly third: string | null;\n        } | null;\n    } | null;\n};\n\n/**\n * This is a model with duplicated properties\n */\nexport type ModelWithDuplicateProperties = {\n    prop?: ModelWithString;\n};\n\n/**\n * This is a model with ordered properties\n */\nexport type ModelWithOrderedProperties = {\n    zebra?: string;\n    apple?: string;\n    hawaii?: string;\n};\n\n/**\n * This is a model with duplicated imports\n */\nexport type ModelWithDuplicateImports = {\n    propA?: ModelWithString;\n    propB?: ModelWithString;\n    propC?: ModelWithString;\n};\n\n/**\n * This is a model that extends another model\n */\nexport type ModelThatExtends = ModelWithString & {\n    propExtendsA?: string;\n    propExtendsB?: ModelWithString;\n};\n\n/**\n * This is a model that extends another model\n */\nexport type ModelThatExtendsExtends = ModelWithString & ModelThatExtends & {\n    propExtendsC?: string;\n    propExtendsD?: ModelWithString;\n};\n\n/**\n * This is a model that contains a some patterns\n */\nexport type ModelWithPattern = {\n    key: string;\n    name: string;\n    readonly enabled?: boolean;\n    readonly modified?: string;\n    id?: string;\n    text?: string;\n    patternWithSingleQuotes?: string;\n    patternWithNewline?: string;\n    patternWithBacktick?: string;\n    patternWithUnicode?: string;\n};\n\nexport type File = {\n    /**\n     * Id\n     */\n    readonly id?: string;\n    /**\n     * Updated at\n     */\n    readonly updated_at?: string;\n    /**\n     * Created at\n     */\n    readonly created_at?: string;\n    /**\n     * Mime\n     */\n    mime: string;\n    /**\n     * File\n     */\n    readonly file?: string;\n};\n\nexport type Default = {\n    name?: string;\n};\n\nexport type Pageable = {\n    page?: number;\n    size?: number;\n    sort?: Array<string>;\n};\n\n/**\n * This is a free-form object without additionalProperties.\n */\nexport type FreeFormObjectWithoutAdditionalProperties = {\n    [key: string]: unknown;\n};\n\n/**\n * This is a free-form object with additionalProperties: true.\n */\nexport type FreeFormObjectWithAdditionalPropertiesEqTrue = {\n    [key: string]: unknown;\n};\n\n/**\n * This is a free-form object with additionalProperties: {}.\n */\nexport type FreeFormObjectWithAdditionalPropertiesEqEmptyObject = {\n    [key: string]: unknown;\n};\n\nexport type ModelWithConst = {\n    String?: 'String';\n    number?: 0;\n    null?: null;\n    withType?: 'Some string';\n};\n\n/**\n * This is a model with one property and additionalProperties: true\n */\nexport type ModelWithAdditionalPropertiesEqTrue = {\n    /**\n     * This is a simple string property\n     */\n    prop?: string;\n    [key: string]: unknown;\n};\n\nexport type NestedAnyOfArraysNullable = {\n    nullableArray?: Array<string | boolean> | null;\n};\n\nexport type CompositionWithOneOfAndProperties = ({\n    foo: SimpleParameter;\n} | {\n    bar: NonAsciiStringæøåÆøÅöôêÊ字符串;\n}) & {\n    baz: number | null;\n    qux: number;\n};\n\n/**\n * An object that can be null\n */\nexport type NullableObject = {\n    foo?: string;\n} | null;\n\n/**\n * Some % character\n */\nexport type CharactersInDescription = string;\n\nexport type ModelWithNullableObject = {\n    data?: NullableObject;\n};\n\n/**\n * An object with additional properties that can be null (anyOf ref + null)\n */\nexport type ModelWithAdditionalPropertiesRef = {\n    [key: string]: NullableObject | null;\n};\n\nexport type ModelWithOneOfEnum = {\n    foo: 'Bar';\n} | {\n    foo: 'Baz';\n} | {\n    foo: 'Qux';\n} | {\n    content: string;\n    foo: 'Quux';\n} | {\n    content: [\n        string,\n        string\n    ];\n    foo: 'Corge';\n};\n\nexport type ModelWithNestedArrayEnumsDataFoo = 'foo' | 'bar';\n\nexport type ModelWithNestedArrayEnumsDataBar = 'baz' | 'qux';\n\nexport type ModelWithNestedArrayEnumsData = {\n    foo?: Array<ModelWithNestedArrayEnumsDataFoo>;\n    bar?: Array<ModelWithNestedArrayEnumsDataBar>;\n};\n\nexport type ModelWithNestedArrayEnums = {\n    array_strings?: Array<string>;\n    data?: ModelWithNestedArrayEnumsData;\n};\n\nexport type ModelWithNestedCompositionEnums = {\n    foo?: ModelWithNestedArrayEnumsDataFoo;\n};\n\nexport type ModelWithReadOnlyAndWriteOnly = {\n    foo: string;\n    readonly bar: string;\n};\n\nexport type ModelWithConstantSizeArray = [\n    number,\n    number\n];\n\nexport type ModelWithAnyOfConstantSizeArray = [\n    number | string,\n    number | string,\n    number | string\n];\n\nexport type ModelWithPrefixItemsConstantSizeArray = [\n    ModelWithInteger,\n    number | string,\n    string\n];\n\nexport type ModelWithAnyOfConstantSizeArrayNullable = [\n    number | null | string,\n    number | null | string,\n    number | null | string\n];\n\nexport type ModelWithAnyOfConstantSizeArrayWithNSizeAndOptions = [\n    number | Import,\n    number | Import\n];\n\nexport type ModelWithAnyOfConstantSizeArrayAndIntersect = [\n    number & string,\n    number & string\n];\n\nexport type ModelWithNumericEnumUnion = {\n    /**\n     * Период\n     */\n    value?: -10 | -1 | 0 | 1 | 3 | 6 | 12;\n};\n\n/**\n * Some description with `back ticks`\n */\nexport type ModelWithBackticksInDescription = {\n    /**\n     * The template `that` should be used for parsing and importing the contents of the CSV file.\n     *\n     * <br/><p>There is one placeholder currently supported:<ul>     <li><b>${x}</b> - refers to the n-th column in the CSV file, e.g. ${1}, ${2}, ...)</li></ul><p>Example of a correct JSON template:</p>\n     * <pre>\n     * [\n     * {\n     * \"resourceType\": \"Asset\",\n     * \"identifier\": {\n     * \"name\": \"${1}\",\n     * \"domain\": {\n     * \"name\": \"${2}\",\n     * \"community\": {\n     * \"name\": \"Some Community\"\n     * }\n     * }\n     * },\n     * \"attributes\" : {\n     * \"00000000-0000-0000-0000-000000003115\" : [ {\n     * \"value\" : \"${3}\"\n     * } ],\n     * \"00000000-0000-0000-0000-000000000222\" : [ {\n     * \"value\" : \"${4}\"\n     * } ]\n     * }\n     * }\n     * ]\n     * </pre>\n     */\n    template?: string;\n};\n\nexport type ModelWithOneOfAndProperties = (SimpleParameter | NonAsciiStringæøåÆøÅöôêÊ字符串) & {\n    baz: number | null;\n    qux: number;\n};\n\n/**\n * Model used to test deduplication strategy (unused)\n */\nexport type ParameterSimpleParameterUnused = string;\n\n/**\n * Model used to test deduplication strategy\n */\nexport type PostServiceWithEmptyTagResponse = string;\n\n/**\n * Model used to test deduplication strategy\n */\nexport type PostServiceWithEmptyTagResponse2 = string;\n\n/**\n * Model used to test deduplication strategy\n */\nexport type DeleteFooData = string;\n\n/**\n * Model used to test deduplication strategy\n */\nexport type DeleteFooData2 = string;\n\n/**\n * Model with restricted keyword name\n */\nexport type Import = string;\n\nexport type SchemaWithFormRestrictedKeys = {\n    description?: string;\n    'x-enum-descriptions'?: string;\n    'x-enum-varnames'?: string;\n    'x-enumNames'?: string;\n    title?: string;\n    object?: {\n        description?: string;\n        'x-enum-descriptions'?: string;\n        'x-enum-varnames'?: string;\n        'x-enumNames'?: string;\n        title?: string;\n    };\n    array?: Array<{\n        description?: string;\n        'x-enum-descriptions'?: string;\n        'x-enum-varnames'?: string;\n        'x-enumNames'?: string;\n        title?: string;\n    }>;\n};\n\n/**\n * This schema was giving PascalCase transformations a hard time\n */\nexport type IoK8sApimachineryPkgApisMetaV1DeleteOptions = {\n    /**\n     * Must be fulfilled before a deletion is carried out. If not possible, a 409 Conflict status will be returned.\n     */\n    preconditions?: IoK8sApimachineryPkgApisMetaV1Preconditions;\n};\n\n/**\n * This schema was giving PascalCase transformations a hard time\n */\nexport type IoK8sApimachineryPkgApisMetaV1Preconditions = {\n    /**\n     * Specifies the target ResourceVersion\n     */\n    resourceVersion?: string;\n    /**\n     * Specifies the target UID.\n     */\n    uid?: string;\n};\n\nexport type AdditionalPropertiesUnknownIssue = {\n    [key: string]: string | number;\n};\n\nexport type AdditionalPropertiesUnknownIssue2 = {\n    [key: string]: string | number;\n};\n\nexport type AdditionalPropertiesUnknownIssue3 = string & {\n    entries: {\n        [key: string]: AdditionalPropertiesUnknownIssue;\n    };\n};\n\nexport type AdditionalPropertiesIntegerIssue = {\n    value: number;\n    [key: string]: number;\n};\n\nexport type OneOfAllOfIssue = ((ConstValue | GenericSchemaDuplicateIssue1SystemBoolean) & _3eNum1Период) | GenericSchemaDuplicateIssue1SystemString;\n\nexport type GenericSchemaDuplicateIssue1SystemBoolean = {\n    item?: boolean;\n    error?: string | null;\n    readonly hasError?: boolean;\n    data?: {\n        [key: string]: never;\n    };\n};\n\nexport type GenericSchemaDuplicateIssue1SystemString = {\n    item?: string | null;\n    error?: string | null;\n    readonly hasError?: boolean;\n};\n\nexport type ExternalSharedModel = {\n    id: string;\n    name?: string;\n};\n\n/**\n * This is a model with one property containing a reference\n */\nexport type ModelWithReferenceWritable = {\n    prop?: ModelWithPropertiesWritable;\n};\n\n/**\n * This is a model with one property containing an array\n */\nexport type ModelWithArrayReadOnlyAndWriteOnlyWritable = {\n    prop?: Array<ModelWithReadOnlyAndWriteOnlyWritable>;\n    propWithFile?: Array<Blob | File>;\n    propWithNumber?: Array<number>;\n};\n\n/**\n * This is a model with one nested property\n */\nexport type ModelWithPropertiesWritable = {\n    required: string;\n    requiredAndNullable: string | null;\n    string?: string;\n    number?: number;\n    boolean?: boolean;\n    reference?: ModelWithString;\n    'property with space'?: string;\n    default?: string;\n    try?: string;\n};\n\n/**\n * This is a model that contains a some patterns\n */\nexport type ModelWithPatternWritable = {\n    key: string;\n    name: string;\n    id?: string;\n    text?: string;\n    patternWithSingleQuotes?: string;\n    patternWithNewline?: string;\n    patternWithBacktick?: string;\n    patternWithUnicode?: string;\n};\n\nexport type FileWritable = {\n    /**\n     * Mime\n     */\n    mime: string;\n};\n\nexport type ModelWithReadOnlyAndWriteOnlyWritable = {\n    foo: string;\n    baz: string;\n};\n\nexport type ModelWithAnyOfConstantSizeArrayWithNSizeAndOptionsWritable = [\n    number | Import,\n    number | Import\n];\n\nexport type AdditionalPropertiesUnknownIssueWritable = {\n    [key: string]: string | number;\n};\n\nexport type OneOfAllOfIssueWritable = ((ConstValue | GenericSchemaDuplicateIssue1SystemBoolean) & _3eNum1Период) | GenericSchemaDuplicateIssue1SystemString;\n\nexport type GenericSchemaDuplicateIssue1SystemBooleanWritable = {\n    item?: boolean;\n    error?: string | null;\n    data?: {\n        [key: string]: never;\n    };\n};\n\nexport type GenericSchemaDuplicateIssue1SystemStringWritable = {\n    item?: string | null;\n    error?: string | null;\n};\n\n/**\n * This is a reusable parameter\n */\nexport type SimpleParameter = string;\n\n/**\n * Parameter with illegal characters\n */\nexport type XFooBar = ModelWithString;\n\n/**\n * A reusable request body\n */\nexport type SimpleRequestBody = ModelWithString;\n\n/**\n * A reusable request body\n */\nexport type SimpleFormData = ModelWithString;\n\nexport type ExportData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no+tag';\n};\n\nexport type PatchApiVbyApiVersionNoTagData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no+tag';\n};\n\nexport type PatchApiVbyApiVersionNoTagResponses = {\n    /**\n     * OK\n     */\n    default: unknown;\n};\n\nexport type ImportData = {\n    body: ModelWithReadOnlyAndWriteOnlyWritable | ModelWithArrayReadOnlyAndWriteOnlyWritable;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no+tag';\n};\n\nexport type ImportResponses = {\n    /**\n     * Success\n     */\n    200: ModelFromZendesk;\n    /**\n     * Default success response\n     */\n    default: ModelWithReadOnlyAndWriteOnly;\n};\n\nexport type ImportResponse = ImportResponses[keyof ImportResponses];\n\nexport type FooWowData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no+tag';\n};\n\nexport type FooWowResponses = {\n    /**\n     * OK\n     */\n    default: unknown;\n};\n\nexport type ApiVVersionODataControllerCountData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple/$count';\n};\n\nexport type ApiVVersionODataControllerCountResponses = {\n    /**\n     * Success\n     */\n    200: ModelFromZendesk;\n};\n\nexport type ApiVVersionODataControllerCountResponse = ApiVVersionODataControllerCountResponses[keyof ApiVVersionODataControllerCountResponses];\n\nexport type GetApiVbyApiVersionSimpleOperationData = {\n    body?: never;\n    path: {\n        /**\n         * foo in method\n         */\n        foo_param: string;\n    };\n    query?: never;\n    url: '/api/v{api-version}/simple:operation';\n};\n\nexport type GetApiVbyApiVersionSimpleOperationErrors = {\n    /**\n     * Default error response\n     */\n    default: ModelWithBoolean;\n};\n\nexport type GetApiVbyApiVersionSimpleOperationError = GetApiVbyApiVersionSimpleOperationErrors[keyof GetApiVbyApiVersionSimpleOperationErrors];\n\nexport type GetApiVbyApiVersionSimpleOperationResponses = {\n    /**\n     * Response is a simple number\n     */\n    200: number;\n};\n\nexport type GetApiVbyApiVersionSimpleOperationResponse = GetApiVbyApiVersionSimpleOperationResponses[keyof GetApiVbyApiVersionSimpleOperationResponses];\n\nexport type DeleteCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type GetCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type HeadCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type OptionsCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type PatchCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type PostCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type PutCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type DeleteFooData3 = {\n    body?: never;\n    headers: {\n        /**\n         * Parameter with illegal characters\n         */\n        'x-Foo-Bar': ModelWithString;\n    };\n    path: {\n        /**\n         * foo in method\n         */\n        foo_param: string;\n        /**\n         * bar in method\n         */\n        BarParam: string;\n    };\n    query?: never;\n    url: '/api/v{api-version}/foo/{foo_param}/bar/{BarParam}';\n};\n\nexport type CallWithDescriptionsData = {\n    body?: never;\n    path?: never;\n    query?: {\n        /**\n         * Testing multiline comments in string: First line\n         * Second line\n         *\n         * Fourth line\n         */\n        parameterWithBreaks?: string;\n        /**\n         * Testing backticks in string: `backticks` and ```multiple backticks``` should work\n         */\n        parameterWithBackticks?: string;\n        /**\n         * Testing slashes in string: \\backwards\\\\\\ and /forwards/// should work\n         */\n        parameterWithSlashes?: string;\n        /**\n         * Testing expression placeholders in string: ${expression} should work\n         */\n        parameterWithExpressionPlaceholders?: string;\n        /**\n         * Testing quotes in string: 'single quote''' and \"double quotes\"\"\" should work\n         */\n        parameterWithQuotes?: string;\n        /**\n         * Testing reserved characters in string: * inline * and ** inline ** should work\n         */\n        parameterWithReservedCharacters?: string;\n    };\n    url: '/api/v{api-version}/descriptions';\n};\n\nexport type DeprecatedCallData = {\n    body?: never;\n    headers: {\n        /**\n         * This parameter is deprecated\n         *\n         * @deprecated\n         */\n        parameter: DeprecatedModel | null;\n    };\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/parameters/deprecated';\n};\n\nexport type CallWithParametersData = {\n    /**\n     * This is the parameter that goes into the body\n     */\n    body: {\n        [key: string]: unknown;\n    } | null;\n    headers: {\n        /**\n         * This is the parameter that goes into the header\n         */\n        parameterHeader: string | null;\n    };\n    path: {\n        /**\n         * This is the parameter that goes into the path\n         */\n        parameterPath: string | null;\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string | null;\n    };\n    query: {\n        foo_ref_enum?: ModelWithNestedArrayEnumsDataFoo;\n        foo_all_of_enum: ModelWithNestedArrayEnumsDataFoo;\n        /**\n         * This is the parameter that goes into the query params\n         */\n        cursor: string | null;\n    };\n    url: '/api/v{api-version}/parameters/{parameterPath}';\n};\n\nexport type CallWithWeirdParameterNamesData = {\n    /**\n     * This is the parameter that goes into the body\n     */\n    body: ModelWithString | null;\n    headers: {\n        /**\n         * This is the parameter that goes into the request header\n         */\n        'parameter.header': string | null;\n    };\n    path: {\n        /**\n         * This is the parameter that goes into the path\n         */\n        'parameter.path.1'?: string;\n        /**\n         * This is the parameter that goes into the path\n         */\n        'parameter-path-2'?: string;\n        /**\n         * This is the parameter that goes into the path\n         */\n        'PARAMETER-PATH-3'?: string;\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string | null;\n    };\n    query: {\n        /**\n         * This is the parameter with a reserved keyword\n         */\n        default?: string;\n        /**\n         * This is the parameter that goes into the request query params\n         */\n        'parameter-query': string | null;\n    };\n    url: '/api/v{api-version}/parameters/{parameter.path.1}/{parameter-path-2}/{PARAMETER-PATH-3}';\n};\n\nexport type GetCallWithOptionalParamData = {\n    /**\n     * This is a required parameter\n     */\n    body: ModelWithOneOfEnum;\n    path?: never;\n    query?: {\n        /**\n         * This is an optional parameter\n         */\n        page?: number;\n    };\n    url: '/api/v{api-version}/parameters';\n};\n\nexport type PostCallWithOptionalParamData = {\n    /**\n     * This is an optional parameter\n     */\n    body?: {\n        offset?: number | null;\n    };\n    path?: never;\n    query: {\n        /**\n         * This is a required parameter\n         */\n        parameter: Pageable;\n    };\n    url: '/api/v{api-version}/parameters';\n};\n\nexport type PostCallWithOptionalParamResponses = {\n    /**\n     * Response is a simple number\n     */\n    200: number;\n    /**\n     * Success\n     */\n    204: void;\n};\n\nexport type PostCallWithOptionalParamResponse = PostCallWithOptionalParamResponses[keyof PostCallWithOptionalParamResponses];\n\nexport type PostApiVbyApiVersionRequestBodyData = {\n    /**\n     * A reusable request body\n     */\n    body?: SimpleRequestBody;\n    path?: never;\n    query?: {\n        /**\n         * This is a reusable parameter\n         */\n        parameter?: string;\n    };\n    url: '/api/v{api-version}/requestBody';\n};\n\nexport type PostApiVbyApiVersionFormDataData = {\n    /**\n     * A reusable request body\n     */\n    body?: SimpleFormData;\n    path?: never;\n    query?: {\n        /**\n         * This is a reusable parameter\n         */\n        parameter?: string;\n    };\n    url: '/api/v{api-version}/formData';\n};\n\nexport type CallWithDefaultParametersData = {\n    body?: never;\n    path?: never;\n    query?: {\n        /**\n         * This is a simple string with default value\n         */\n        parameterString?: string | null;\n        /**\n         * This is a simple number with default value\n         */\n        parameterNumber?: number | null;\n        /**\n         * This is a simple boolean with default value\n         */\n        parameterBoolean?: boolean | null;\n        /**\n         * This is a simple enum with default value\n         */\n        parameterEnum?: 'Success' | 'Warning' | 'Error';\n        /**\n         * This is a simple model with default value\n         */\n        parameterModel?: ModelWithString | null;\n    };\n    url: '/api/v{api-version}/defaults';\n};\n\nexport type CallWithDefaultOptionalParametersData = {\n    body?: never;\n    path?: never;\n    query?: {\n        /**\n         * This is a simple string that is optional with default value\n         */\n        parameterString?: string;\n        /**\n         * This is a simple number that is optional with default value\n         */\n        parameterNumber?: number;\n        /**\n         * This is a simple boolean that is optional with default value\n         */\n        parameterBoolean?: boolean;\n        /**\n         * This is a simple enum that is optional with default value\n         */\n        parameterEnum?: 'Success' | 'Warning' | 'Error';\n        /**\n         * This is a simple model that is optional with default value\n         */\n        parameterModel?: ModelWithString;\n    };\n    url: '/api/v{api-version}/defaults';\n};\n\nexport type CallToTestOrderOfParamsData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * This is a optional string with default\n         */\n        parameterOptionalStringWithDefault?: string;\n        /**\n         * This is a optional string with empty default\n         */\n        parameterOptionalStringWithEmptyDefault?: string;\n        /**\n         * This is a optional string with no default\n         */\n        parameterOptionalStringWithNoDefault?: string;\n        /**\n         * This is a string with default\n         */\n        parameterStringWithDefault: string;\n        /**\n         * This is a string with empty default\n         */\n        parameterStringWithEmptyDefault: string;\n        /**\n         * This is a string with no default\n         */\n        parameterStringWithNoDefault: string;\n        /**\n         * This is a string that can be null with no default\n         */\n        parameterStringNullableWithNoDefault?: string | null;\n        /**\n         * This is a string that can be null with default\n         */\n        parameterStringNullableWithDefault?: string | null;\n    };\n    url: '/api/v{api-version}/defaults';\n};\n\nexport type DuplicateNameData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/duplicate';\n};\n\nexport type DuplicateName2Data = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/duplicate';\n};\n\nexport type DuplicateName3Data = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/duplicate';\n};\n\nexport type DuplicateName4Data = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/duplicate';\n};\n\nexport type CallWithNoContentResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no-content';\n};\n\nexport type CallWithNoContentResponseResponses = {\n    /**\n     * Success\n     */\n    204: void;\n};\n\nexport type CallWithNoContentResponseResponse = CallWithNoContentResponseResponses[keyof CallWithNoContentResponseResponses];\n\nexport type CallWithResponseAndNoContentResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multiple-tags/response-and-no-content';\n};\n\nexport type CallWithResponseAndNoContentResponseResponses = {\n    /**\n     * Response is a simple number\n     */\n    200: number;\n    /**\n     * Success\n     */\n    204: void;\n};\n\nexport type CallWithResponseAndNoContentResponseResponse = CallWithResponseAndNoContentResponseResponses[keyof CallWithResponseAndNoContentResponseResponses];\n\nexport type DummyAData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multiple-tags/a';\n};\n\nexport type DummyAResponses = {\n    200: _400;\n};\n\nexport type DummyAResponse = DummyAResponses[keyof DummyAResponses];\n\nexport type DummyBData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multiple-tags/b';\n};\n\nexport type DummyBResponses = {\n    /**\n     * Success\n     */\n    204: void;\n};\n\nexport type DummyBResponse = DummyBResponses[keyof DummyBResponses];\n\nexport type CallWithResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/response';\n};\n\nexport type CallWithResponseResponses = {\n    default: Import;\n};\n\nexport type CallWithResponseResponse = CallWithResponseResponses[keyof CallWithResponseResponses];\n\nexport type CallWithDuplicateResponsesData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/response';\n};\n\nexport type CallWithDuplicateResponsesErrors = {\n    /**\n     * Message for 500 error\n     */\n    500: ModelWithStringError;\n    /**\n     * Message for 501 error\n     */\n    501: ModelWithStringError;\n    /**\n     * Message for 502 error\n     */\n    502: ModelWithStringError;\n    /**\n     * Message for 4XX errors\n     */\n    '4XX': DictionaryWithArray;\n    /**\n     * Default error response\n     */\n    default: ModelWithBoolean;\n};\n\nexport type CallWithDuplicateResponsesError = CallWithDuplicateResponsesErrors[keyof CallWithDuplicateResponsesErrors];\n\nexport type CallWithDuplicateResponsesResponses = {\n    /**\n     * Message for 200 response\n     */\n    200: ModelWithBoolean & ModelWithInteger;\n    /**\n     * Message for 201 response\n     */\n    201: ModelWithString;\n    /**\n     * Message for 202 response\n     */\n    202: ModelWithString;\n};\n\nexport type CallWithDuplicateResponsesResponse = CallWithDuplicateResponsesResponses[keyof CallWithDuplicateResponsesResponses];\n\nexport type CallWithResponsesData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/response';\n};\n\nexport type CallWithResponsesErrors = {\n    /**\n     * Message for 500 error\n     */\n    500: ModelWithStringError;\n    /**\n     * Message for 501 error\n     */\n    501: ModelWithStringError;\n    /**\n     * Message for 502 error\n     */\n    502: ModelWithStringError;\n    /**\n     * Message for default response\n     */\n    default: ModelWithStringError;\n};\n\nexport type CallWithResponsesError = CallWithResponsesErrors[keyof CallWithResponsesErrors];\n\nexport type CallWithResponsesResponses = {\n    /**\n     * Message for 200 response\n     */\n    200: {\n        readonly '@namespace.string'?: string;\n        readonly '@namespace.integer'?: number;\n        readonly value?: Array<ModelWithString>;\n    };\n    /**\n     * Message for 201 response\n     */\n    201: ModelThatExtends;\n    /**\n     * Message for 202 response\n     */\n    202: ModelThatExtendsExtends;\n};\n\nexport type CallWithResponsesResponse = CallWithResponsesResponses[keyof CallWithResponsesResponses];\n\nexport type CollectionFormatData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * This is an array parameter that is sent as csv format (comma-separated values)\n         */\n        parameterArrayCSV: Array<string> | null;\n        /**\n         * This is an array parameter that is sent as ssv format (space-separated values)\n         */\n        parameterArraySSV: Array<string> | null;\n        /**\n         * This is an array parameter that is sent as tsv format (tab-separated values)\n         */\n        parameterArrayTSV: Array<string> | null;\n        /**\n         * This is an array parameter that is sent as pipes format (pipe-separated values)\n         */\n        parameterArrayPipes: Array<string> | null;\n        /**\n         * This is an array parameter that is sent as multi format (multiple parameter instances)\n         */\n        parameterArrayMulti: Array<string> | null;\n    };\n    url: '/api/v{api-version}/collectionFormat';\n};\n\nexport type TypesData = {\n    body?: never;\n    path?: {\n        /**\n         * This is a number parameter\n         */\n        id?: number;\n    };\n    query: {\n        /**\n         * This is a number parameter\n         */\n        parameterNumber: number;\n        /**\n         * This is a string parameter\n         */\n        parameterString: string | null;\n        /**\n         * This is a boolean parameter\n         */\n        parameterBoolean: boolean | null;\n        /**\n         * This is an object parameter\n         */\n        parameterObject: {\n            [key: string]: unknown;\n        } | null;\n        /**\n         * This is an array parameter\n         */\n        parameterArray: Array<string> | null;\n        /**\n         * This is a dictionary parameter\n         */\n        parameterDictionary: {\n            [key: string]: unknown;\n        } | null;\n        /**\n         * This is an enum parameter\n         */\n        parameterEnum: 'Success' | 'Warning' | 'Error' | null;\n    };\n    url: '/api/v{api-version}/types';\n};\n\nexport type TypesResponses = {\n    /**\n     * Response is a simple number\n     */\n    200: number;\n    /**\n     * Response is a simple string\n     */\n    201: string;\n    /**\n     * Response is a simple boolean\n     */\n    202: boolean;\n    /**\n     * Response is a simple object\n     */\n    203: {\n        [key: string]: unknown;\n    };\n};\n\nexport type TypesResponse = TypesResponses[keyof TypesResponses];\n\nexport type UploadFileData = {\n    body: Blob | File;\n    path: {\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string | null;\n    };\n    query?: never;\n    url: '/api/v{api-version}/upload';\n};\n\nexport type UploadFileResponses = {\n    200: boolean;\n};\n\nexport type UploadFileResponse = UploadFileResponses[keyof UploadFileResponses];\n\nexport type FileResponseData = {\n    body?: never;\n    path: {\n        id: string;\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string;\n    };\n    query?: never;\n    url: '/api/v{api-version}/file/{id}';\n};\n\nexport type FileResponseResponses = {\n    /**\n     * Success\n     */\n    200: Blob | File;\n};\n\nexport type FileResponseResponse = FileResponseResponses[keyof FileResponseResponses];\n\nexport type ComplexTypesData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * Parameter containing object\n         */\n        parameterObject: {\n            first?: {\n                second?: {\n                    third?: string;\n                };\n            };\n        };\n        /**\n         * Parameter containing reference\n         */\n        parameterReference: ModelWithString;\n    };\n    url: '/api/v{api-version}/complex';\n};\n\nexport type ComplexTypesErrors = {\n    /**\n     * 400 `server` error\n     */\n    400: unknown;\n    /**\n     * 500 server error\n     */\n    500: unknown;\n};\n\nexport type ComplexTypesResponses = {\n    /**\n     * Successful response\n     */\n    200: Array<ModelWithString>;\n};\n\nexport type ComplexTypesResponse = ComplexTypesResponses[keyof ComplexTypesResponses];\n\nexport type MultipartResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multipart';\n};\n\nexport type MultipartResponseResponses = {\n    /**\n     * OK\n     */\n    200: {\n        file?: Blob | File;\n        metadata?: {\n            foo?: string;\n            bar?: string;\n        };\n    };\n};\n\nexport type MultipartResponseResponse = MultipartResponseResponses[keyof MultipartResponseResponses];\n\nexport type MultipartRequestData = {\n    body?: {\n        content?: Blob | File;\n        data?: ModelWithString | null;\n    };\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multipart';\n};\n\nexport type ComplexParamsData = {\n    body?: {\n        readonly key: string | null;\n        name: string | null;\n        enabled?: boolean;\n        type: 'Monkey' | 'Horse' | 'Bird';\n        listOfModels?: Array<ModelWithString> | null;\n        listOfStrings?: Array<string> | null;\n        parameters: ModelWithString | ModelWithEnum | ModelWithArray | ModelWithDictionary;\n        readonly user?: {\n            readonly id?: number;\n            readonly name?: string | null;\n        };\n    };\n    path: {\n        id: number;\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string;\n    };\n    query?: never;\n    url: '/api/v{api-version}/complex/{id}';\n};\n\nexport type ComplexParamsResponses = {\n    /**\n     * Success\n     */\n    200: ModelWithString;\n};\n\nexport type ComplexParamsResponse = ComplexParamsResponses[keyof ComplexParamsResponses];\n\nexport type CallWithResultFromHeaderData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/header';\n};\n\nexport type CallWithResultFromHeaderErrors = {\n    /**\n     * 400 server error\n     */\n    400: unknown;\n    /**\n     * 500 server error\n     */\n    500: unknown;\n};\n\nexport type CallWithResultFromHeaderResponses = {\n    /**\n     * Successful response\n     */\n    200: unknown;\n};\n\nexport type TestErrorCodeData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * Status code to return\n         */\n        status: number;\n    };\n    url: '/api/v{api-version}/error';\n};\n\nexport type TestErrorCodeErrors = {\n    /**\n     * Custom message: Internal Server Error\n     */\n    500: unknown;\n    /**\n     * Custom message: Not Implemented\n     */\n    501: unknown;\n    /**\n     * Custom message: Bad Gateway\n     */\n    502: unknown;\n    /**\n     * Custom message: Service Unavailable\n     */\n    503: unknown;\n};\n\nexport type TestErrorCodeResponses = {\n    /**\n     * Custom message: Successful response\n     */\n    200: unknown;\n};\n\nexport type NonAsciiæøåÆøÅöôêÊ字符串Data = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * Dummy input param\n         */\n        nonAsciiParamæøåÆØÅöôêÊ: number;\n    };\n    url: '/api/v{api-version}/non-ascii-æøåÆØÅöôêÊ字符串';\n};\n\nexport type NonAsciiæøåÆøÅöôêÊ字符串Responses = {\n    /**\n     * Successful response\n     */\n    200: Array<NonAsciiStringæøåÆøÅöôêÊ字符串>;\n};\n\nexport type NonAsciiæøåÆøÅöôêÊ字符串Response = NonAsciiæøåÆøÅöôêÊ字符串Responses[keyof NonAsciiæøåÆøÅöôêÊ字符串Responses];\n\nexport type PutWithFormUrlEncodedData = {\n    body: ArrayWithStrings;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/non-ascii-æøåÆØÅöôêÊ字符串';\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-axios/clean-false/client/client.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { AxiosError, AxiosInstance, RawAxiosRequestHeaders } from 'axios';\nimport axios from 'axios';\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 } from './types.gen';\nimport { buildUrl, createConfig, mergeConfigs, mergeHeaders, setAuthParams } from './utils.gen';\n\nexport const createClient = (config: Config = {}): Client => {\n  let _config = mergeConfigs(createConfig(), config);\n\n  let instance: AxiosInstance;\n\n  if (_config.axios && !('Axios' in _config.axios)) {\n    instance = _config.axios;\n  } else {\n    // eslint-disable-next-line @typescript-eslint/no-unused-vars\n    const { auth, ...configWithoutAuth } = _config;\n    instance = axios.create(configWithoutAuth);\n  }\n\n  const getConfig = (): Config => ({ ..._config });\n\n  const setConfig = (config: Config): Config => {\n    _config = mergeConfigs(_config, config);\n    instance.defaults = {\n      ...instance.defaults,\n      ..._config,\n      // @ts-expect-error\n      headers: mergeHeaders(instance.defaults.headers, _config.headers),\n    };\n    return getConfig();\n  };\n\n  const beforeRequest = async (options: RequestOptions) => {\n    const opts = {\n      ..._config,\n      ...options,\n      axios: options.axios ?? _config.axios ?? instance,\n      headers: mergeHeaders(_config.headers, options.headers),\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.body = opts.bodySerializer(opts.body);\n    }\n\n    const url = buildUrl(opts);\n\n    return { opts, url };\n  };\n\n  // @ts-expect-error\n  const request: Client['request'] = async (options) => {\n    // @ts-expect-error\n    const { opts, url } = await beforeRequest(options);\n    try {\n      // assign Axios here for consistency with fetch\n      const _axios = opts.axios!;\n      // eslint-disable-next-line @typescript-eslint/no-unused-vars\n      const { auth, ...optsWithoutAuth } = opts;\n      const response = await _axios({\n        ...optsWithoutAuth,\n        baseURL: '', // the baseURL is already included in `url`\n        data: getValidRequestBody(opts),\n        headers: opts.headers as RawAxiosRequestHeaders,\n        // let `paramsSerializer()` handle query params if it exists\n        params: opts.paramsSerializer ? opts.query : undefined,\n        url,\n      });\n\n      let { data } = response;\n\n      if (opts.responseType === '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 {\n        ...response,\n        data: data ?? {},\n      };\n    } catch (error) {\n      const e = error as AxiosError;\n      if (opts.throwOnError) {\n        throw e;\n      }\n      // @ts-expect-error\n      e.error = e.response?.data ?? {};\n      return e;\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 Record<string, string>,\n      method,\n      serializedBody: getValidRequestBody(opts) as BodyInit | null | undefined,\n      // @ts-expect-error\n      signal: opts.signal,\n      url,\n    });\n  };\n\n  const _buildUrl: Client['buildUrl'] = (options) =>\n    buildUrl({ axios: instance, ..._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    instance,\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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-axios/clean-false/client/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type { Auth } from '../core/auth.gen';\nexport type { QuerySerializerOptions } from '../core/bodySerializer.gen';\nexport {\n  formDataBodySerializer,\n  jsonBodySerializer,\n  urlSearchParamsBodySerializer,\n} from '../core/bodySerializer.gen';\nexport { buildClientParams } from '../core/params.gen';\nexport { serializeQueryKeyValue } from '../core/queryKeySerializer.gen';\nexport { createClient } from './client.gen';\nexport type {\n  Client,\n  ClientOptions,\n  Config,\n  CreateClientConfig,\n  Options,\n  RequestOptions,\n  RequestResult,\n  TDataShape,\n} from './types.gen';\nexport { createConfig } from './utils.gen';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-axios/clean-false/client/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type {\n  AxiosError,\n  AxiosInstance,\n  AxiosRequestHeaders,\n  AxiosResponse,\n  AxiosStatic,\n  CreateAxiosDefaults,\n} from 'axios';\n\nimport type { Auth } from '../core/auth.gen';\nimport type {\n  ServerSentEventsOptions,\n  ServerSentEventsResult,\n} from '../core/serverSentEvents.gen';\nimport type { Client as CoreClient, Config as CoreConfig } from '../core/types.gen';\n\nexport interface Config<T extends ClientOptions = ClientOptions>\n  extends Omit<CreateAxiosDefaults, 'auth' | 'baseURL' | 'headers' | 'method'>, CoreConfig {\n  /**\n   * Axios implementation. You can use this option to provide either an\n   * `AxiosStatic` or an `AxiosInstance`.\n   *\n   * @default axios\n   */\n  axios?: AxiosStatic | AxiosInstance;\n  /**\n   * Base URL for all requests made by this client.\n   */\n  baseURL?: T['baseURL'];\n  /**\n   * An object containing any HTTP headers that you want to pre-populate your\n   * `Headers` object with.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/Headers/Headers#init See more}\n   */\n  headers?:\n    | AxiosRequestHeaders\n    | Record<\n        string,\n        string | number | boolean | (string | number | boolean)[] | null | undefined | unknown\n      >;\n  /**\n   * Throw an error instead of returning it in the response?\n   *\n   * @default false\n   */\n  throwOnError?: T['throwOnError'];\n}\n\nexport interface RequestOptions<\n  TData = unknown,\n  ThrowOnError extends boolean = boolean,\n  Url extends string = string,\n>\n  extends\n    Config<{\n      throwOnError: ThrowOnError;\n    }>,\n    Pick<\n      ServerSentEventsOptions<TData>,\n      | 'onRequest'\n      | 'onSseError'\n      | 'onSseEvent'\n      | 'sseDefaultRetryDelay'\n      | 'sseMaxRetryAttempts'\n      | 'sseMaxRetryDelay'\n    > {\n  /**\n   * Any body that you want to add to your request.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/fetch#body}\n   */\n  body?: unknown;\n  path?: Record<string, unknown>;\n  query?: Record<string, unknown>;\n  /**\n   * Security mechanism(s) to use for the request.\n   */\n  security?: ReadonlyArray<Auth>;\n  url: Url;\n}\n\nexport interface ClientOptions {\n  baseURL?: string;\n  throwOnError?: boolean;\n}\n\nexport type RequestResult<\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = boolean,\n> = ThrowOnError extends true\n  ? Promise<AxiosResponse<TData extends Record<string, unknown> ? TData[keyof TData] : TData>>\n  : Promise<\n      | (AxiosResponse<TData extends Record<string, unknown> ? TData[keyof TData] : TData> & {\n          error: undefined;\n        })\n      | (AxiosError<TError extends Record<string, unknown> ? TError[keyof TError] : TError> & {\n          data: undefined;\n          error: TError extends Record<string, unknown> ? TError[keyof TError] : TError;\n        })\n    >;\n\ntype MethodFn = <TData = unknown, TError = unknown, ThrowOnError extends boolean = false>(\n  options: Omit<RequestOptions<TData, ThrowOnError>, 'method'>,\n) => RequestResult<TData, TError, ThrowOnError>;\n\ntype SseFn = <TData = unknown, TError = unknown, ThrowOnError extends boolean = false>(\n  options: Omit<RequestOptions<TData, ThrowOnError>, 'method'>,\n) => Promise<ServerSentEventsResult<TData, TError>>;\n\ntype RequestFn = <TData = unknown, TError = unknown, ThrowOnError extends boolean = false>(\n  options: Omit<RequestOptions<TData, ThrowOnError>, 'method'> &\n    Pick<Required<RequestOptions<TData, ThrowOnError>>, 'method'>,\n) => RequestResult<TData, TError, ThrowOnError>;\n\ntype BuildUrlFn = <\n  TData extends {\n    body?: unknown;\n    path?: Record<string, unknown>;\n    query?: Record<string, unknown>;\n    url: string;\n  },\n>(\n  options: TData & Options<TData>,\n) => string;\n\nexport type Client = CoreClient<RequestFn, Config, MethodFn, BuildUrlFn, SseFn> & {\n  instance: AxiosInstance;\n};\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 = ClientOptions> = (\n  override?: Config<ClientOptions & T>,\n) => Config<Required<ClientOptions> & T>;\n\nexport interface TDataShape {\n  body?: unknown;\n  headers?: unknown;\n  path?: unknown;\n  query?: unknown;\n  url: string;\n}\n\ntype OmitKeys<T, K> = Pick<T, Exclude<keyof T, K>>;\n\nexport type Options<\n  TData extends TDataShape = TDataShape,\n  ThrowOnError extends boolean = boolean,\n  TResponse = unknown,\n> = OmitKeys<RequestOptions<TResponse, ThrowOnError>, 'body' | 'path' | 'query' | 'url'> &\n  ([TData] extends [never] ? unknown : Omit<TData, 'url'>);\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-axios/clean-false/client/utils.gen.ts",
    "content": "// 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 {\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\nconst checkForExistence = (\n  options: Pick<RequestOptions, 'auth' | 'query'> & {\n    headers: Record<any, unknown>;\n  },\n  name?: string,\n): boolean => {\n  if (!name) {\n    return false;\n  }\n  if (name in options.headers || options.query?.[name]) {\n    return true;\n  }\n  if (\n    'Cookie' in options.headers &&\n    options.headers['Cookie'] &&\n    typeof options.headers['Cookie'] === 'string'\n  ) {\n    return options.headers['Cookie'].includes(`${name}=`);\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: Record<any, unknown>;\n  }) => {\n  for (const auth of security) {\n    if (checkForExistence(options, auth.name)) {\n      continue;\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        const value = `${name}=${token}`;\n        if ('Cookie' in options.headers && options.headers['Cookie']) {\n          options.headers['Cookie'] = `${options.headers['Cookie']}; ${value}`;\n        } else {\n          options.headers['Cookie'] = value;\n        }\n        break;\n      }\n      case 'header':\n      default:\n        options.headers[name] = token;\n        break;\n    }\n  }\n};\n\nexport const buildUrl: Client['buildUrl'] = (options) => {\n  const instanceBaseUrl = options.axios?.defaults?.baseURL;\n\n  const baseUrl =\n    !!options.baseURL && typeof options.baseURL === 'string' ? options.baseURL : instanceBaseUrl;\n\n  return getUrl({\n    baseUrl: baseUrl as string,\n    path: options.path,\n    // let `paramsSerializer()` handle query params if it exists\n    query: !options.paramsSerializer ? options.query : undefined,\n    querySerializer:\n      typeof options.querySerializer === 'function'\n        ? options.querySerializer\n        : createQuerySerializer(options.querySerializer),\n    url: options.url,\n  });\n};\n\nexport const mergeConfigs = (a: Config, b: Config): Config => {\n  const config = { ...a, ...b };\n  config.headers = mergeHeaders(a.headers, b.headers);\n  return config;\n};\n\n/**\n * Special Axios headers keywords allowing to set headers by request method.\n */\nexport const axiosHeadersKeywords = [\n  'common',\n  'delete',\n  'get',\n  'head',\n  'patch',\n  'post',\n  'put',\n] as const;\n\nexport const mergeHeaders = (\n  ...headers: Array<Required<Config>['headers'] | undefined>\n): Record<any, unknown> => {\n  const mergedHeaders: Record<any, unknown> = {};\n  for (const header of headers) {\n    if (!header || typeof header !== 'object') {\n      continue;\n    }\n\n    const iterator = Object.entries(header);\n\n    for (const [key, value] of iterator) {\n      if (\n        axiosHeadersKeywords.includes(key as (typeof axiosHeadersKeywords)[number]) &&\n        typeof value === 'object'\n      ) {\n        mergedHeaders[key] = {\n          ...(mergedHeaders[key] as Record<any, unknown>),\n          ...value,\n        };\n      } else if (value === null) {\n        delete mergedHeaders[key];\n      } else if (Array.isArray(value)) {\n        for (const v of value) {\n          // @ts-expect-error\n          mergedHeaders[key] = [...(mergedHeaders[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[key] = typeof value === 'object' ? JSON.stringify(value) : (value as string);\n      }\n    }\n  }\n  return mergedHeaders;\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  ...override,\n});\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-axios/clean-false/client.gen.ts",
    "content": "// 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: 'http://localhost:3000/base' }));\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-axios/clean-false/core/auth.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-axios/clean-false/core/bodySerializer.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-axios/clean-false/core/params.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-axios/clean-false/core/pathSerializer.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-axios/clean-false/core/queryKeySerializer.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\n/**\n * JSON-friendly union that mirrors what Pinia Colada can hash.\n */\nexport type JsonValue =\n  | null\n  | string\n  | number\n  | boolean\n  | JsonValue[]\n  | { [key: string]: JsonValue };\n\n/**\n * Replacer that converts non-JSON values (bigint, Date, etc.) to safe substitutes.\n */\nexport const queryKeyJsonReplacer = (_key: string, value: unknown) => {\n  if (value === undefined || typeof value === 'function' || typeof value === 'symbol') {\n    return undefined;\n  }\n  if (typeof value === 'bigint') {\n    return value.toString();\n  }\n  if (value instanceof Date) {\n    return value.toISOString();\n  }\n  return value;\n};\n\n/**\n * Safely stringifies a value and parses it back into a JsonValue.\n */\nexport const stringifyToJsonValue = (input: unknown): JsonValue | undefined => {\n  try {\n    const json = JSON.stringify(input, queryKeyJsonReplacer);\n    if (json === undefined) {\n      return undefined;\n    }\n    return JSON.parse(json) as JsonValue;\n  } catch {\n    return undefined;\n  }\n};\n\n/**\n * Detects plain objects (including objects with a null prototype).\n */\nconst isPlainObject = (value: unknown): value is Record<string, unknown> => {\n  if (value === null || typeof value !== 'object') {\n    return false;\n  }\n  const prototype = Object.getPrototypeOf(value as object);\n  return prototype === Object.prototype || prototype === null;\n};\n\n/**\n * Turns URLSearchParams into a sorted JSON object for deterministic keys.\n */\nconst serializeSearchParams = (params: URLSearchParams): JsonValue => {\n  const entries = Array.from(params.entries()).sort(([a], [b]) => a.localeCompare(b));\n  const result: Record<string, JsonValue> = {};\n\n  for (const [key, value] of entries) {\n    const existing = result[key];\n    if (existing === undefined) {\n      result[key] = value;\n      continue;\n    }\n\n    if (Array.isArray(existing)) {\n      (existing as string[]).push(value);\n    } else {\n      result[key] = [existing, value];\n    }\n  }\n\n  return result;\n};\n\n/**\n * Normalizes any accepted value into a JSON-friendly shape for query keys.\n */\nexport const serializeQueryKeyValue = (value: unknown): JsonValue | undefined => {\n  if (value === null) {\n    return null;\n  }\n\n  if (typeof value === 'string' || typeof value === 'number' || typeof value === 'boolean') {\n    return value;\n  }\n\n  if (value === undefined || typeof value === 'function' || typeof value === 'symbol') {\n    return undefined;\n  }\n\n  if (typeof value === 'bigint') {\n    return value.toString();\n  }\n\n  if (value instanceof Date) {\n    return value.toISOString();\n  }\n\n  if (Array.isArray(value)) {\n    return stringifyToJsonValue(value);\n  }\n\n  if (typeof URLSearchParams !== 'undefined' && value instanceof URLSearchParams) {\n    return serializeSearchParams(value);\n  }\n\n  if (isPlainObject(value)) {\n    return stringifyToJsonValue(value);\n  }\n\n  return undefined;\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-axios/clean-false/core/serverSentEvents.gen.ts",
    "content": "// 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 const 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            // Normalize line endings: CRLF -> LF, then CR -> LF\n            buffer = buffer.replace(/\\r\\n/g, '\\n').replace(/\\r/g, '\\n');\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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-axios/clean-false/core/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { Auth, AuthToken } from './auth.gen';\nimport type { BodySerializer, QuerySerializer, QuerySerializerOptions } from './bodySerializer.gen';\n\nexport type HttpMethod =\n  | 'connect'\n  | 'delete'\n  | 'get'\n  | 'head'\n  | 'options'\n  | 'patch'\n  | 'post'\n  | 'put'\n  | 'trace';\n\nexport type Client<\n  RequestFn = never,\n  Config = unknown,\n  MethodFn = never,\n  BuildUrlFn = never,\n  SseFn = never,\n> = {\n  /**\n   * Returns the final request URL.\n   */\n  buildUrl: BuildUrlFn;\n  getConfig: () => Config;\n  request: RequestFn;\n  setConfig: (config: Config) => Config;\n} & {\n  [K in HttpMethod]: MethodFn;\n} & ([SseFn] extends [never] ? { sse?: never } : { sse: { [K in HttpMethod]: SseFn } });\n\nexport interface Config {\n  /**\n   * Auth token or a function returning auth token. The resolved value will be\n   * added to the request payload as defined by its `security` array.\n   */\n  auth?: ((auth: Auth) => Promise<AuthToken> | AuthToken) | AuthToken;\n  /**\n   * A function for serializing request body parameter. By default,\n   * {@link JSON.stringify()} will be used.\n   */\n  bodySerializer?: BodySerializer | null;\n  /**\n   * An object containing any HTTP headers that you want to pre-populate your\n   * `Headers` object with.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/Headers/Headers#init See more}\n   */\n  headers?:\n    | RequestInit['headers']\n    | Record<\n        string,\n        string | number | boolean | (string | number | boolean)[] | null | undefined | unknown\n      >;\n  /**\n   * The request method.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/fetch#method See more}\n   */\n  method?: Uppercase<HttpMethod>;\n  /**\n   * A function for serializing request query parameters. By default, arrays\n   * will be exploded in form style, objects will be exploded in deepObject\n   * style, and reserved characters are percent-encoded.\n   *\n   * This method will have no effect if the native `paramsSerializer()` Axios\n   * API function is used.\n   *\n   * {@link https://swagger.io/docs/specification/serialization/#query View examples}\n   */\n  querySerializer?: QuerySerializer | QuerySerializerOptions;\n  /**\n   * A function validating request data. This is useful if you want to ensure\n   * the request conforms to the desired shape, so it can be safely sent to\n   * the server.\n   */\n  requestValidator?: (data: unknown) => Promise<unknown>;\n  /**\n   * A function transforming response data before it's returned. This is useful\n   * for post-processing data, e.g. converting ISO strings into Date objects.\n   */\n  responseTransformer?: (data: unknown) => Promise<unknown>;\n  /**\n   * A function validating response data. This is useful if you want to ensure\n   * the response conforms to the desired shape, so it can be safely passed to\n   * the transformers and returned to the user.\n   */\n  responseValidator?: (data: unknown) => Promise<unknown>;\n}\n\ntype IsExactlyNeverOrNeverUndefined<T> = [T] extends [never]\n  ? true\n  : [T] extends [never | undefined]\n    ? [undefined] extends [T]\n      ? false\n      : true\n    : false;\n\nexport type OmitNever<T extends Record<string, unknown>> = {\n  [K in keyof T as IsExactlyNeverOrNeverUndefined<T[K]> extends true ? never : K]: T[K];\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-axios/clean-false/core/utils.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-axios/clean-false/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport { apiVVersionODataControllerCount, callToTestOrderOfParams, callWithDefaultOptionalParameters, callWithDefaultParameters, callWithDescriptions, callWithDuplicateResponses, callWithNoContentResponse, callWithParameters, callWithResponse, callWithResponseAndNoContentResponse, callWithResponses, callWithResultFromHeader, callWithWeirdParameterNames, collectionFormat, complexParams, complexTypes, deleteCallWithoutParametersAndResponse, deleteFoo, deprecatedCall, dummyA, dummyB, duplicateName, duplicateName2, duplicateName3, duplicateName4, export_, fileResponse, fooWow, getApiVbyApiVersionSimpleOperation, getCallWithOptionalParam, getCallWithoutParametersAndResponse, headCallWithoutParametersAndResponse, import_, multipartRequest, multipartResponse, nonAsciiæøåÆøÅöôêÊ字符串, type Options, optionsCallWithoutParametersAndResponse, patchApiVbyApiVersionNoTag, patchCallWithoutParametersAndResponse, postApiVbyApiVersionFormData, postApiVbyApiVersionRequestBody, postCallWithOptionalParam, postCallWithoutParametersAndResponse, putCallWithoutParametersAndResponse, putWithFormUrlEncoded, testErrorCode, types, uploadFile } from './sdk.gen';\nexport type { _3eNum1Период, _400, AdditionalPropertiesIntegerIssue, AdditionalPropertiesUnknownIssue, AdditionalPropertiesUnknownIssue2, AdditionalPropertiesUnknownIssue3, AdditionalPropertiesUnknownIssueWritable, AnyOfAnyAndNull, AnyOfArrays, ApiVVersionODataControllerCountData, ApiVVersionODataControllerCountResponse, ApiVVersionODataControllerCountResponses, ArrayWithAnyOfProperties, ArrayWithArray, ArrayWithBooleans, ArrayWithNumbers, ArrayWithProperties, ArrayWithReferences, ArrayWithStrings, CallToTestOrderOfParamsData, CallWithDefaultOptionalParametersData, CallWithDefaultParametersData, CallWithDescriptionsData, CallWithDuplicateResponsesData, CallWithDuplicateResponsesError, CallWithDuplicateResponsesErrors, CallWithDuplicateResponsesResponse, CallWithDuplicateResponsesResponses, CallWithNoContentResponseData, CallWithNoContentResponseResponse, CallWithNoContentResponseResponses, CallWithParametersData, CallWithResponseAndNoContentResponseData, CallWithResponseAndNoContentResponseResponse, CallWithResponseAndNoContentResponseResponses, CallWithResponseData, CallWithResponseResponse, CallWithResponseResponses, CallWithResponsesData, CallWithResponsesError, CallWithResponsesErrors, CallWithResponsesResponse, CallWithResponsesResponses, CallWithResultFromHeaderData, CallWithResultFromHeaderErrors, CallWithResultFromHeaderResponses, CallWithWeirdParameterNamesData, CamelCaseCommentWithBreaks, CharactersInDescription, ClientOptions, CollectionFormatData, CommentWithBackticks, CommentWithBackticksAndQuotes, CommentWithBreaks, CommentWithExpressionPlaceholders, CommentWithQuotes, CommentWithReservedCharacters, CommentWithSlashes, ComplexParamsData, ComplexParamsResponse, ComplexParamsResponses, ComplexTypesData, ComplexTypesErrors, ComplexTypesResponse, ComplexTypesResponses, CompositionBaseModel, CompositionExtendedModel, CompositionWithAllOfAndNullable, CompositionWithAnyOf, CompositionWithAnyOfAndNullable, CompositionWithAnyOfAnonymous, CompositionWithNestedAnyAndTypeNull, CompositionWithNestedAnyOfAndNull, CompositionWithOneOf, CompositionWithOneOfAndComplexArrayDictionary, CompositionWithOneOfAndNullable, CompositionWithOneOfAndProperties, CompositionWithOneOfAndSimpleArrayDictionary, CompositionWithOneOfAndSimpleDictionary, CompositionWithOneOfAnonymous, CompositionWithOneOfDiscriminator, ConstValue, Default, DeleteCallWithoutParametersAndResponseData, DeleteFooData, DeleteFooData2, DeleteFooData3, DeprecatedCallData, DeprecatedModel, DictionaryWithArray, DictionaryWithDictionary, DictionaryWithProperties, DictionaryWithPropertiesAndAdditionalProperties, DictionaryWithReference, DictionaryWithString, DummyAData, DummyAResponse, DummyAResponses, DummyBData, DummyBResponse, DummyBResponses, DuplicateName2Data, DuplicateName3Data, DuplicateName4Data, DuplicateNameData, EnumFromDescription, EnumWithExtensions, EnumWithNumbers, EnumWithReplacedCharacters, EnumWithStrings, EnumWithXEnumNames, ExportData, ExternalRefA, ExternalRefB, ExternalSharedModel, File, FileResponseData, FileResponseResponse, FileResponseResponses, FileWritable, FooWowData, FooWowResponses, FreeFormObjectWithAdditionalPropertiesEqEmptyObject, FreeFormObjectWithAdditionalPropertiesEqTrue, FreeFormObjectWithoutAdditionalProperties, GenericSchemaDuplicateIssue1SystemBoolean, GenericSchemaDuplicateIssue1SystemBooleanWritable, GenericSchemaDuplicateIssue1SystemString, GenericSchemaDuplicateIssue1SystemStringWritable, GetApiVbyApiVersionSimpleOperationData, GetApiVbyApiVersionSimpleOperationError, GetApiVbyApiVersionSimpleOperationErrors, GetApiVbyApiVersionSimpleOperationResponse, GetApiVbyApiVersionSimpleOperationResponses, GetCallWithOptionalParamData, GetCallWithoutParametersAndResponseData, HeadCallWithoutParametersAndResponseData, Import, ImportData, ImportResponse, ImportResponses, IoK8sApimachineryPkgApisMetaV1DeleteOptions, IoK8sApimachineryPkgApisMetaV1Preconditions, ModelCircle, ModelFromZendesk, ModelSquare, ModelThatExtends, ModelThatExtendsExtends, ModelWithAdditionalPropertiesEqTrue, ModelWithAdditionalPropertiesRef, ModelWithAnyOfConstantSizeArray, ModelWithAnyOfConstantSizeArrayAndIntersect, ModelWithAnyOfConstantSizeArrayNullable, ModelWithAnyOfConstantSizeArrayWithNSizeAndOptions, ModelWithAnyOfConstantSizeArrayWithNSizeAndOptionsWritable, ModelWithArray, ModelWithArrayReadOnlyAndWriteOnly, ModelWithArrayReadOnlyAndWriteOnlyWritable, ModelWithBackticksInDescription, ModelWithBoolean, ModelWithCircularReference, ModelWithConst, ModelWithConstantSizeArray, ModelWithDictionary, ModelWithDuplicateImports, ModelWithDuplicateProperties, ModelWithEnum, ModelWithEnumFromDescription, ModelWithEnumWithHyphen, ModelWithInteger, ModelWithNestedArrayEnums, ModelWithNestedArrayEnumsData, ModelWithNestedArrayEnumsDataBar, ModelWithNestedArrayEnumsDataFoo, ModelWithNestedCompositionEnums, ModelWithNestedEnums, ModelWithNestedProperties, ModelWithNullableObject, ModelWithNullableString, ModelWithNumericEnumUnion, ModelWithOneOfAndProperties, ModelWithOneOfEnum, ModelWithOrderedProperties, ModelWithPattern, ModelWithPatternWritable, ModelWithPrefixItemsConstantSizeArray, ModelWithProperties, ModelWithPropertiesWritable, ModelWithReadOnlyAndWriteOnly, ModelWithReadOnlyAndWriteOnlyWritable, ModelWithReference, ModelWithReferenceWritable, ModelWithString, ModelWithStringError, MultipartRequestData, MultipartResponseData, MultipartResponseResponse, MultipartResponseResponses, NestedAnyOfArraysNullable, NonAsciiæøåÆøÅöôêÊ字符串Data, NonAsciiæøåÆøÅöôêÊ字符串Response, NonAsciiæøåÆøÅöôêÊ字符串Responses, NonAsciiStringæøåÆøÅöôêÊ字符串, NullableObject, OneOfAllOfIssue, OneOfAllOfIssueWritable, OptionsCallWithoutParametersAndResponseData, Pageable, ParameterSimpleParameterUnused, PatchApiVbyApiVersionNoTagData, PatchApiVbyApiVersionNoTagResponses, PatchCallWithoutParametersAndResponseData, PostApiVbyApiVersionFormDataData, PostApiVbyApiVersionRequestBodyData, PostCallWithOptionalParamData, PostCallWithOptionalParamResponse, PostCallWithOptionalParamResponses, PostCallWithoutParametersAndResponseData, PostServiceWithEmptyTagResponse, PostServiceWithEmptyTagResponse2, PutCallWithoutParametersAndResponseData, PutWithFormUrlEncodedData, SchemaWithFormRestrictedKeys, SimpleBoolean, SimpleFile, SimpleFormData, SimpleInteger, SimpleParameter, SimpleReference, SimpleRequestBody, SimpleString, SimpleStringWithPattern, TestErrorCodeData, TestErrorCodeErrors, TestErrorCodeResponses, TypesData, TypesResponse, TypesResponses, UploadFileData, UploadFileResponse, UploadFileResponses, XFooBar } from './types.gen';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-axios/clean-false/sdk.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport { type Client, formDataBodySerializer, type Options as Options2, type TDataShape, urlSearchParamsBodySerializer } from './client';\nimport { client } from './client.gen';\nimport type { ApiVVersionODataControllerCountData, ApiVVersionODataControllerCountResponses, CallToTestOrderOfParamsData, CallWithDefaultOptionalParametersData, CallWithDefaultParametersData, CallWithDescriptionsData, CallWithDuplicateResponsesData, CallWithDuplicateResponsesErrors, CallWithDuplicateResponsesResponses, CallWithNoContentResponseData, CallWithNoContentResponseResponses, CallWithParametersData, CallWithResponseAndNoContentResponseData, CallWithResponseAndNoContentResponseResponses, CallWithResponseData, CallWithResponseResponses, CallWithResponsesData, CallWithResponsesErrors, CallWithResponsesResponses, CallWithResultFromHeaderData, CallWithResultFromHeaderErrors, CallWithResultFromHeaderResponses, CallWithWeirdParameterNamesData, CollectionFormatData, ComplexParamsData, ComplexParamsResponses, ComplexTypesData, ComplexTypesErrors, ComplexTypesResponses, DeleteCallWithoutParametersAndResponseData, DeleteFooData3, DeprecatedCallData, DummyAData, DummyAResponses, DummyBData, DummyBResponses, DuplicateName2Data, DuplicateName3Data, DuplicateName4Data, DuplicateNameData, ExportData, FileResponseData, FileResponseResponses, FooWowData, FooWowResponses, GetApiVbyApiVersionSimpleOperationData, GetApiVbyApiVersionSimpleOperationErrors, GetApiVbyApiVersionSimpleOperationResponses, GetCallWithOptionalParamData, GetCallWithoutParametersAndResponseData, HeadCallWithoutParametersAndResponseData, ImportData, ImportResponses, MultipartRequestData, MultipartResponseData, MultipartResponseResponses, NonAsciiæøåÆøÅöôêÊ字符串Data, NonAsciiæøåÆøÅöôêÊ字符串Responses, OptionsCallWithoutParametersAndResponseData, PatchApiVbyApiVersionNoTagData, PatchApiVbyApiVersionNoTagResponses, PatchCallWithoutParametersAndResponseData, PostApiVbyApiVersionFormDataData, PostApiVbyApiVersionRequestBodyData, PostCallWithOptionalParamData, PostCallWithOptionalParamResponses, PostCallWithoutParametersAndResponseData, PutCallWithoutParametersAndResponseData, PutWithFormUrlEncodedData, TestErrorCodeData, TestErrorCodeErrors, TestErrorCodeResponses, TypesData, TypesResponses, UploadFileData, UploadFileResponses } from './types.gen';\n\nexport type Options<TData extends TDataShape = TDataShape, ThrowOnError extends boolean = boolean> = Options2<TData, ThrowOnError> & {\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\nexport const export_ = <ThrowOnError extends boolean = false>(options?: Options<ExportData, ThrowOnError>) => (options?.client ?? client).get<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/no+tag', ...options });\n\nexport const patchApiVbyApiVersionNoTag = <ThrowOnError extends boolean = false>(options?: Options<PatchApiVbyApiVersionNoTagData, ThrowOnError>) => (options?.client ?? client).patch<PatchApiVbyApiVersionNoTagResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/no+tag', ...options });\n\nexport const import_ = <ThrowOnError extends boolean = false>(options: Options<ImportData, ThrowOnError>) => (options.client ?? client).post<ImportResponses, unknown, ThrowOnError>({\n    responseType: 'json',\n    url: '/api/v{api-version}/no+tag',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options.headers\n    }\n});\n\nexport const fooWow = <ThrowOnError extends boolean = false>(options?: Options<FooWowData, ThrowOnError>) => (options?.client ?? client).put<FooWowResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/no+tag', ...options });\n\nexport const apiVVersionODataControllerCount = <ThrowOnError extends boolean = false>(options?: Options<ApiVVersionODataControllerCountData, ThrowOnError>) => (options?.client ?? client).get<ApiVVersionODataControllerCountResponses, unknown, ThrowOnError>({\n    responseType: 'json',\n    url: '/api/v{api-version}/simple/$count',\n    ...options\n});\n\nexport const getApiVbyApiVersionSimpleOperation = <ThrowOnError extends boolean = false>(options: Options<GetApiVbyApiVersionSimpleOperationData, ThrowOnError>) => (options.client ?? client).get<GetApiVbyApiVersionSimpleOperationResponses, GetApiVbyApiVersionSimpleOperationErrors, ThrowOnError>({\n    responseType: 'json',\n    url: '/api/v{api-version}/simple:operation',\n    ...options\n});\n\nexport const deleteCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<DeleteCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).delete<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const getCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<GetCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).get<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const headCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<HeadCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).head<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const optionsCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<OptionsCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).options<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const patchCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<PatchCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).patch<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const postCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<PostCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).post<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const putCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<PutCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).put<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const deleteFoo = <ThrowOnError extends boolean = false>(options: Options<DeleteFooData3, ThrowOnError>) => (options.client ?? client).delete<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/foo/{foo_param}/bar/{BarParam}', ...options });\n\nexport const callWithDescriptions = <ThrowOnError extends boolean = false>(options?: Options<CallWithDescriptionsData, ThrowOnError>) => (options?.client ?? client).post<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/descriptions', ...options });\n\n/**\n * @deprecated\n */\nexport const deprecatedCall = <ThrowOnError extends boolean = false>(options: Options<DeprecatedCallData, ThrowOnError>) => (options.client ?? client).post<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/parameters/deprecated', ...options });\n\nexport const callWithParameters = <ThrowOnError extends boolean = false>(options: Options<CallWithParametersData, ThrowOnError>) => (options.client ?? client).post<unknown, unknown, ThrowOnError>({\n    url: '/api/v{api-version}/parameters/{parameterPath}',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options.headers\n    }\n});\n\nexport const callWithWeirdParameterNames = <ThrowOnError extends boolean = false>(options: Options<CallWithWeirdParameterNamesData, ThrowOnError>) => (options.client ?? client).post<unknown, unknown, ThrowOnError>({\n    url: '/api/v{api-version}/parameters/{parameter.path.1}/{parameter-path-2}/{PARAMETER-PATH-3}',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options.headers\n    }\n});\n\nexport const getCallWithOptionalParam = <ThrowOnError extends boolean = false>(options: Options<GetCallWithOptionalParamData, ThrowOnError>) => (options.client ?? client).get<unknown, unknown, ThrowOnError>({\n    url: '/api/v{api-version}/parameters',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options.headers\n    }\n});\n\nexport const postCallWithOptionalParam = <ThrowOnError extends boolean = false>(options: Options<PostCallWithOptionalParamData, ThrowOnError>) => (options.client ?? client).post<PostCallWithOptionalParamResponses, unknown, ThrowOnError>({\n    responseType: 'json',\n    url: '/api/v{api-version}/parameters',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options.headers\n    }\n});\n\nexport const postApiVbyApiVersionRequestBody = <ThrowOnError extends boolean = false>(options?: Options<PostApiVbyApiVersionRequestBodyData, ThrowOnError>) => (options?.client ?? client).post<unknown, unknown, ThrowOnError>({\n    url: '/api/v{api-version}/requestBody',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options?.headers\n    }\n});\n\nexport const postApiVbyApiVersionFormData = <ThrowOnError extends boolean = false>(options?: Options<PostApiVbyApiVersionFormDataData, ThrowOnError>) => (options?.client ?? client).post<unknown, unknown, ThrowOnError>({\n    ...formDataBodySerializer,\n    url: '/api/v{api-version}/formData',\n    ...options,\n    headers: {\n        'Content-Type': null,\n        ...options?.headers\n    }\n});\n\nexport const callWithDefaultParameters = <ThrowOnError extends boolean = false>(options?: Options<CallWithDefaultParametersData, ThrowOnError>) => (options?.client ?? client).get<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/defaults', ...options });\n\nexport const callWithDefaultOptionalParameters = <ThrowOnError extends boolean = false>(options?: Options<CallWithDefaultOptionalParametersData, ThrowOnError>) => (options?.client ?? client).post<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/defaults', ...options });\n\nexport const callToTestOrderOfParams = <ThrowOnError extends boolean = false>(options: Options<CallToTestOrderOfParamsData, ThrowOnError>) => (options.client ?? client).put<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/defaults', ...options });\n\nexport const duplicateName = <ThrowOnError extends boolean = false>(options?: Options<DuplicateNameData, ThrowOnError>) => (options?.client ?? client).delete<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/duplicate', ...options });\n\nexport const duplicateName2 = <ThrowOnError extends boolean = false>(options?: Options<DuplicateName2Data, ThrowOnError>) => (options?.client ?? client).get<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/duplicate', ...options });\n\nexport const duplicateName3 = <ThrowOnError extends boolean = false>(options?: Options<DuplicateName3Data, ThrowOnError>) => (options?.client ?? client).post<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/duplicate', ...options });\n\nexport const duplicateName4 = <ThrowOnError extends boolean = false>(options?: Options<DuplicateName4Data, ThrowOnError>) => (options?.client ?? client).put<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/duplicate', ...options });\n\nexport const callWithNoContentResponse = <ThrowOnError extends boolean = false>(options?: Options<CallWithNoContentResponseData, ThrowOnError>) => (options?.client ?? client).get<CallWithNoContentResponseResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/no-content', ...options });\n\nexport const callWithResponseAndNoContentResponse = <ThrowOnError extends boolean = false>(options?: Options<CallWithResponseAndNoContentResponseData, ThrowOnError>) => (options?.client ?? client).get<CallWithResponseAndNoContentResponseResponses, unknown, ThrowOnError>({\n    responseType: 'json',\n    url: '/api/v{api-version}/multiple-tags/response-and-no-content',\n    ...options\n});\n\nexport const dummyA = <ThrowOnError extends boolean = false>(options?: Options<DummyAData, ThrowOnError>) => (options?.client ?? client).get<DummyAResponses, unknown, ThrowOnError>({\n    responseType: 'json',\n    url: '/api/v{api-version}/multiple-tags/a',\n    ...options\n});\n\nexport const dummyB = <ThrowOnError extends boolean = false>(options?: Options<DummyBData, ThrowOnError>) => (options?.client ?? client).get<DummyBResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/multiple-tags/b', ...options });\n\nexport const callWithResponse = <ThrowOnError extends boolean = false>(options?: Options<CallWithResponseData, ThrowOnError>) => (options?.client ?? client).get<CallWithResponseResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/response', ...options });\n\nexport const callWithDuplicateResponses = <ThrowOnError extends boolean = false>(options?: Options<CallWithDuplicateResponsesData, ThrowOnError>) => (options?.client ?? client).post<CallWithDuplicateResponsesResponses, CallWithDuplicateResponsesErrors, ThrowOnError>({\n    responseType: 'json',\n    url: '/api/v{api-version}/response',\n    ...options\n});\n\nexport const callWithResponses = <ThrowOnError extends boolean = false>(options?: Options<CallWithResponsesData, ThrowOnError>) => (options?.client ?? client).put<CallWithResponsesResponses, CallWithResponsesErrors, ThrowOnError>({\n    responseType: 'json',\n    url: '/api/v{api-version}/response',\n    ...options\n});\n\nexport const collectionFormat = <ThrowOnError extends boolean = false>(options: Options<CollectionFormatData, ThrowOnError>) => (options.client ?? client).get<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/collectionFormat', ...options });\n\nexport const types = <ThrowOnError extends boolean = false>(options: Options<TypesData, ThrowOnError>) => (options.client ?? client).get<TypesResponses, unknown, ThrowOnError>({\n    responseType: 'json',\n    url: '/api/v{api-version}/types',\n    ...options\n});\n\nexport const uploadFile = <ThrowOnError extends boolean = false>(options: Options<UploadFileData, ThrowOnError>) => (options.client ?? client).post<UploadFileResponses, unknown, ThrowOnError>({\n    ...urlSearchParamsBodySerializer,\n    responseType: 'json',\n    url: '/api/v{api-version}/upload',\n    ...options,\n    headers: {\n        'Content-Type': 'application/x-www-form-urlencoded',\n        ...options.headers\n    }\n});\n\nexport const fileResponse = <ThrowOnError extends boolean = false>(options: Options<FileResponseData, ThrowOnError>) => (options.client ?? client).get<FileResponseResponses, unknown, ThrowOnError>({\n    responseType: 'blob',\n    url: '/api/v{api-version}/file/{id}',\n    ...options\n});\n\nexport const complexTypes = <ThrowOnError extends boolean = false>(options: Options<ComplexTypesData, ThrowOnError>) => (options.client ?? client).get<ComplexTypesResponses, ComplexTypesErrors, ThrowOnError>({\n    querySerializer: { parameters: { parameterObject: { object: { style: 'form' } } } },\n    responseType: 'json',\n    url: '/api/v{api-version}/complex',\n    ...options\n});\n\nexport const multipartResponse = <ThrowOnError extends boolean = false>(options?: Options<MultipartResponseData, ThrowOnError>) => (options?.client ?? client).get<MultipartResponseResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/multipart', ...options });\n\nexport const multipartRequest = <ThrowOnError extends boolean = false>(options?: Options<MultipartRequestData, ThrowOnError>) => (options?.client ?? client).post<unknown, unknown, ThrowOnError>({\n    ...formDataBodySerializer,\n    url: '/api/v{api-version}/multipart',\n    ...options,\n    headers: {\n        'Content-Type': null,\n        ...options?.headers\n    }\n});\n\nexport const complexParams = <ThrowOnError extends boolean = false>(options: Options<ComplexParamsData, ThrowOnError>) => (options.client ?? client).put<ComplexParamsResponses, unknown, ThrowOnError>({\n    responseType: 'json',\n    url: '/api/v{api-version}/complex/{id}',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json-patch+json',\n        ...options.headers\n    }\n});\n\nexport const callWithResultFromHeader = <ThrowOnError extends boolean = false>(options?: Options<CallWithResultFromHeaderData, ThrowOnError>) => (options?.client ?? client).post<CallWithResultFromHeaderResponses, CallWithResultFromHeaderErrors, ThrowOnError>({ url: '/api/v{api-version}/header', ...options });\n\nexport const testErrorCode = <ThrowOnError extends boolean = false>(options: Options<TestErrorCodeData, ThrowOnError>) => (options.client ?? client).post<TestErrorCodeResponses, TestErrorCodeErrors, ThrowOnError>({ url: '/api/v{api-version}/error', ...options });\n\nexport const nonAsciiæøåÆøÅöôêÊ字符串 = <ThrowOnError extends boolean = false>(options: Options<NonAsciiæøåÆøÅöôêÊ字符串Data, ThrowOnError>) => (options.client ?? client).post<NonAsciiæøåÆøÅöôêÊ字符串Responses, unknown, ThrowOnError>({\n    responseType: 'json',\n    url: '/api/v{api-version}/non-ascii-æøåÆØÅöôêÊ字符串',\n    ...options\n});\n\n/**\n * Login User\n */\nexport const putWithFormUrlEncoded = <ThrowOnError extends boolean = false>(options: Options<PutWithFormUrlEncodedData, ThrowOnError>) => (options.client ?? client).put<unknown, unknown, ThrowOnError>({\n    ...urlSearchParamsBodySerializer,\n    url: '/api/v{api-version}/non-ascii-æøåÆØÅöôêÊ字符串',\n    ...options,\n    headers: {\n        'Content-Type': 'application/x-www-form-urlencoded',\n        ...options.headers\n    }\n});\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-axios/clean-false/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type ClientOptions = {\n    baseURL: 'http://localhost:3000/base' | (string & {});\n};\n\n/**\n * Model with number-only name\n */\nexport type _400 = string;\n\n/**\n * External ref to shared model (A)\n */\nexport type ExternalRefA = ExternalSharedModel;\n\n/**\n * External ref to shared model (B)\n */\nexport type ExternalRefB = ExternalSharedModel;\n\n/**\n * Testing multiline comments in string: First line\n * Second line\n *\n * Fourth line\n */\nexport type CamelCaseCommentWithBreaks = number;\n\n/**\n * Testing multiline comments in string: First line\n * Second line\n *\n * Fourth line\n */\nexport type CommentWithBreaks = number;\n\n/**\n * Testing backticks in string: `backticks` and ```multiple backticks``` should work\n */\nexport type CommentWithBackticks = number;\n\n/**\n * Testing backticks and quotes in string: `backticks`, 'quotes', \"double quotes\" and ```multiple backticks``` should work\n */\nexport type CommentWithBackticksAndQuotes = number;\n\n/**\n * Testing slashes in string: \\backwards\\\\\\ and /forwards/// should work\n */\nexport type CommentWithSlashes = number;\n\n/**\n * Testing expression placeholders in string: ${expression} should work\n */\nexport type CommentWithExpressionPlaceholders = number;\n\n/**\n * Testing quotes in string: 'single quote''' and \"double quotes\"\"\" should work\n */\nexport type CommentWithQuotes = number;\n\n/**\n * Testing reserved characters in string: * inline * and ** inline ** should work\n */\nexport type CommentWithReservedCharacters = number;\n\n/**\n * This is a simple number\n */\nexport type SimpleInteger = number;\n\n/**\n * This is a simple boolean\n */\nexport type SimpleBoolean = boolean;\n\n/**\n * This is a simple string\n */\nexport type SimpleString = string;\n\n/**\n * A string with non-ascii (unicode) characters valid in typescript identifiers (æøåÆØÅöÔèÈ字符串)\n */\nexport type NonAsciiStringæøåÆøÅöôêÊ字符串 = string;\n\n/**\n * This is a simple file\n */\nexport type SimpleFile = Blob | File;\n\n/**\n * This is a simple reference\n */\nexport type SimpleReference = ModelWithString;\n\n/**\n * This is a simple string\n */\nexport type SimpleStringWithPattern = string | null;\n\n/**\n * This is a simple enum with strings\n */\nexport type EnumWithStrings = 'Success' | 'Warning' | 'Error' | '\\'Single Quote\\'' | '\"Double Quotes\"' | 'Non-ascii: øæåôöØÆÅÔÖ字符串';\n\nexport type EnumWithReplacedCharacters = '\\'Single Quote\\'' | '\"Double Quotes\"' | 'øæåôöØÆÅÔÖ字符串' | 3.1 | '';\n\n/**\n * This is a simple enum with numbers\n */\nexport type EnumWithNumbers = 1 | 2 | 3 | 1.1 | 1.2 | 1.3 | 100 | 200 | 300 | -100 | -200 | -300 | -1.1 | -1.2 | -1.3;\n\n/**\n * Success=1,Warning=2,Error=3\n */\nexport type EnumFromDescription = number;\n\n/**\n * This is a simple enum with numbers\n */\nexport type EnumWithExtensions = 200 | 400 | 500;\n\nexport type EnumWithXEnumNames = 0 | 1 | 2;\n\n/**\n * This is a simple array with numbers\n */\nexport type ArrayWithNumbers = Array<number>;\n\n/**\n * This is a simple array with booleans\n */\nexport type ArrayWithBooleans = Array<boolean>;\n\n/**\n * This is a simple array with strings\n */\nexport type ArrayWithStrings = Array<string>;\n\n/**\n * This is a simple array with references\n */\nexport type ArrayWithReferences = Array<ModelWithString>;\n\n/**\n * This is a simple array containing an array\n */\nexport type ArrayWithArray = Array<Array<ModelWithString>>;\n\n/**\n * This is a simple array with properties\n */\nexport type ArrayWithProperties = Array<{\n    '16x16'?: CamelCaseCommentWithBreaks;\n    bar?: string;\n}>;\n\n/**\n * This is a simple array with any of properties\n */\nexport type ArrayWithAnyOfProperties = Array<{\n    foo?: string;\n} | {\n    bar?: string;\n}>;\n\nexport type AnyOfAnyAndNull = {\n    data?: unknown | null;\n};\n\n/**\n * This is a simple array with any of properties\n */\nexport type AnyOfArrays = {\n    results?: Array<{\n        foo?: string;\n    } | {\n        bar?: string;\n    }>;\n};\n\n/**\n * This is a string dictionary\n */\nexport type DictionaryWithString = {\n    [key: string]: string;\n};\n\nexport type DictionaryWithPropertiesAndAdditionalProperties = {\n    foo?: number;\n    bar?: boolean;\n    [key: string]: string | number | boolean | undefined;\n};\n\n/**\n * This is a string reference\n */\nexport type DictionaryWithReference = {\n    [key: string]: ModelWithString;\n};\n\n/**\n * This is a complex dictionary\n */\nexport type DictionaryWithArray = {\n    [key: string]: Array<ModelWithString>;\n};\n\n/**\n * This is a string dictionary\n */\nexport type DictionaryWithDictionary = {\n    [key: string]: {\n        [key: string]: string;\n    };\n};\n\n/**\n * This is a complex dictionary\n */\nexport type DictionaryWithProperties = {\n    [key: string]: {\n        foo?: string;\n        bar?: string;\n    };\n};\n\n/**\n * This is a model with one number property\n */\nexport type ModelWithInteger = {\n    /**\n     * This is a simple number property\n     */\n    prop?: number;\n};\n\n/**\n * This is a model with one boolean property\n */\nexport type ModelWithBoolean = {\n    /**\n     * This is a simple boolean property\n     */\n    prop?: boolean;\n};\n\n/**\n * This is a model with one string property\n */\nexport type ModelWithString = {\n    /**\n     * This is a simple string property\n     */\n    prop?: string;\n};\n\n/**\n * This is a model with one string property\n */\nexport type ModelWithStringError = {\n    /**\n     * This is a simple string property\n     */\n    prop?: string;\n};\n\n/**\n * `Comment` or `VoiceComment`. The JSON object for adding voice comments to tickets is different. See [Adding voice comments to tickets](/documentation/ticketing/managing-tickets/adding-voice-comments-to-tickets)\n */\nexport type ModelFromZendesk = string;\n\n/**\n * This is a model with one string property\n */\nexport type ModelWithNullableString = {\n    /**\n     * This is a simple string property\n     */\n    nullableProp1?: string | null;\n    /**\n     * This is a simple string property\n     */\n    nullableRequiredProp1: string | null;\n    /**\n     * This is a simple string property\n     */\n    nullableProp2?: string | null;\n    /**\n     * This is a simple string property\n     */\n    nullableRequiredProp2: string | null;\n    /**\n     * This is a simple enum with strings\n     */\n    'foo_bar-enum'?: 'Success' | 'Warning' | 'Error' | 'ØÆÅ字符串';\n};\n\n/**\n * This is a model with one enum\n */\nexport type ModelWithEnum = {\n    /**\n     * This is a simple enum with strings\n     */\n    'foo_bar-enum'?: 'Success' | 'Warning' | 'Error' | 'ØÆÅ字符串';\n    /**\n     * These are the HTTP error code enums\n     */\n    statusCode?: '100' | '200 FOO' | '300 FOO_BAR' | '400 foo-bar' | '500 foo.bar' | '600 foo&bar';\n    /**\n     * Simple boolean enum\n     */\n    bool?: true;\n};\n\n/**\n * This is a model with one enum with escaped name\n */\nexport type ModelWithEnumWithHyphen = {\n    /**\n     * Foo-Bar-Baz-Qux\n     */\n    'foo-bar-baz-qux'?: '3.0';\n};\n\n/**\n * This is a model with one enum\n */\nexport type ModelWithEnumFromDescription = {\n    /**\n     * Success=1,Warning=2,Error=3\n     */\n    test?: number;\n};\n\n/**\n * This is a model with nested enums\n */\nexport type ModelWithNestedEnums = {\n    dictionaryWithEnum?: {\n        [key: string]: 'Success' | 'Warning' | 'Error';\n    };\n    dictionaryWithEnumFromDescription?: {\n        [key: string]: number;\n    };\n    arrayWithEnum?: Array<'Success' | 'Warning' | 'Error'>;\n    arrayWithDescription?: Array<number>;\n    /**\n     * This is a simple enum with strings\n     */\n    'foo_bar-enum'?: 'Success' | 'Warning' | 'Error' | 'ØÆÅ字符串';\n};\n\n/**\n * This is a model with one property containing a reference\n */\nexport type ModelWithReference = {\n    prop?: ModelWithProperties;\n};\n\n/**\n * This is a model with one property containing an array\n */\nexport type ModelWithArrayReadOnlyAndWriteOnly = {\n    prop?: Array<ModelWithReadOnlyAndWriteOnly>;\n    propWithFile?: Array<Blob | File>;\n    propWithNumber?: Array<number>;\n};\n\n/**\n * This is a model with one property containing an array\n */\nexport type ModelWithArray = {\n    prop?: Array<ModelWithString>;\n    propWithFile?: Array<Blob | File>;\n    propWithNumber?: Array<number>;\n};\n\n/**\n * This is a model with one property containing a dictionary\n */\nexport type ModelWithDictionary = {\n    prop?: {\n        [key: string]: string;\n    };\n};\n\n/**\n * This is a deprecated model with a deprecated property\n *\n * @deprecated\n */\nexport type DeprecatedModel = {\n    /**\n     * This is a deprecated property\n     *\n     * @deprecated\n     */\n    prop?: string;\n};\n\n/**\n * This is a model with one property containing a circular reference\n */\nexport type ModelWithCircularReference = {\n    prop?: ModelWithCircularReference;\n};\n\n/**\n * This is a model with one property with a 'one of' relationship\n */\nexport type CompositionWithOneOf = {\n    propA?: ModelWithString | ModelWithEnum | ModelWithArray | ModelWithDictionary;\n};\n\n/**\n * This is a model with one property with a 'one of' relationship where the options are not $ref\n */\nexport type CompositionWithOneOfAnonymous = {\n    propA?: {\n        propA?: string;\n    } | string | number;\n};\n\n/**\n * Circle\n */\nexport type ModelCircle = {\n    kind: string;\n    radius?: number;\n};\n\n/**\n * Square\n */\nexport type ModelSquare = {\n    kind: string;\n    sideLength?: number;\n};\n\n/**\n * This is a model with one property with a 'one of' relationship where the options are not $ref\n */\nexport type CompositionWithOneOfDiscriminator = ({\n    kind: 'circle';\n} & ModelCircle) | ({\n    kind: 'square';\n} & ModelSquare);\n\n/**\n * This is a model with one property with a 'any of' relationship\n */\nexport type CompositionWithAnyOf = {\n    propA?: ModelWithString | ModelWithEnum | ModelWithArray | ModelWithDictionary;\n};\n\n/**\n * This is a model with one property with a 'any of' relationship where the options are not $ref\n */\nexport type CompositionWithAnyOfAnonymous = {\n    propA?: {\n        propA?: string;\n    } | string | number;\n};\n\n/**\n * This is a model with nested 'any of' property with a type null\n */\nexport type CompositionWithNestedAnyAndTypeNull = {\n    propA?: Array<ModelWithDictionary | null> | Array<ModelWithArray | null>;\n};\n\nexport type _3eNum1Период = 'Bird' | 'Dog';\n\nexport type ConstValue = 'ConstValue';\n\n/**\n * This is a model with one property with a 'any of' relationship where the options are not $ref\n */\nexport type CompositionWithNestedAnyOfAndNull = {\n    /**\n     * Scopes\n     */\n    propA?: Array<_3eNum1Период | ConstValue> | null;\n};\n\n/**\n * This is a model with one property with a 'one of' relationship\n */\nexport type CompositionWithOneOfAndNullable = {\n    propA?: {\n        boolean?: boolean;\n    } | ModelWithEnum | ModelWithArray | ModelWithDictionary | null;\n};\n\n/**\n * This is a model that contains a simple dictionary within composition\n */\nexport type CompositionWithOneOfAndSimpleDictionary = {\n    propA?: boolean | {\n        [key: string]: number;\n    };\n};\n\n/**\n * This is a model that contains a dictionary of simple arrays within composition\n */\nexport type CompositionWithOneOfAndSimpleArrayDictionary = {\n    propA?: boolean | {\n        [key: string]: Array<boolean>;\n    };\n};\n\n/**\n * This is a model that contains a dictionary of complex arrays (composited) within composition\n */\nexport type CompositionWithOneOfAndComplexArrayDictionary = {\n    propA?: boolean | {\n        [key: string]: Array<number | string>;\n    };\n};\n\n/**\n * This is a model with one property with a 'all of' relationship\n */\nexport type CompositionWithAllOfAndNullable = {\n    propA?: ({\n        boolean?: boolean;\n    } & ModelWithEnum & ModelWithArray & ModelWithDictionary) | null;\n};\n\n/**\n * This is a model with one property with a 'any of' relationship\n */\nexport type CompositionWithAnyOfAndNullable = {\n    propA?: {\n        boolean?: boolean;\n    } | ModelWithEnum | ModelWithArray | ModelWithDictionary | null;\n};\n\n/**\n * This is a base model with two simple optional properties\n */\nexport type CompositionBaseModel = {\n    firstName?: string;\n    lastname?: string;\n};\n\n/**\n * This is a model that extends the base model\n */\nexport type CompositionExtendedModel = CompositionBaseModel & {\n    age: number;\n    firstName: string;\n    lastname: string;\n};\n\n/**\n * This is a model with one nested property\n */\nexport type ModelWithProperties = {\n    required: string;\n    readonly requiredAndReadOnly: string;\n    requiredAndNullable: string | null;\n    string?: string;\n    number?: number;\n    boolean?: boolean;\n    reference?: ModelWithString;\n    'property with space'?: string;\n    default?: string;\n    try?: string;\n    readonly '@namespace.string'?: string;\n    readonly '@namespace.integer'?: number;\n};\n\n/**\n * This is a model with one nested property\n */\nexport type ModelWithNestedProperties = {\n    readonly first: {\n        readonly second: {\n            readonly third: string | null;\n        } | null;\n    } | null;\n};\n\n/**\n * This is a model with duplicated properties\n */\nexport type ModelWithDuplicateProperties = {\n    prop?: ModelWithString;\n};\n\n/**\n * This is a model with ordered properties\n */\nexport type ModelWithOrderedProperties = {\n    zebra?: string;\n    apple?: string;\n    hawaii?: string;\n};\n\n/**\n * This is a model with duplicated imports\n */\nexport type ModelWithDuplicateImports = {\n    propA?: ModelWithString;\n    propB?: ModelWithString;\n    propC?: ModelWithString;\n};\n\n/**\n * This is a model that extends another model\n */\nexport type ModelThatExtends = ModelWithString & {\n    propExtendsA?: string;\n    propExtendsB?: ModelWithString;\n};\n\n/**\n * This is a model that extends another model\n */\nexport type ModelThatExtendsExtends = ModelWithString & ModelThatExtends & {\n    propExtendsC?: string;\n    propExtendsD?: ModelWithString;\n};\n\n/**\n * This is a model that contains a some patterns\n */\nexport type ModelWithPattern = {\n    key: string;\n    name: string;\n    readonly enabled?: boolean;\n    readonly modified?: string;\n    id?: string;\n    text?: string;\n    patternWithSingleQuotes?: string;\n    patternWithNewline?: string;\n    patternWithBacktick?: string;\n    patternWithUnicode?: string;\n};\n\nexport type File = {\n    /**\n     * Id\n     */\n    readonly id?: string;\n    /**\n     * Updated at\n     */\n    readonly updated_at?: string;\n    /**\n     * Created at\n     */\n    readonly created_at?: string;\n    /**\n     * Mime\n     */\n    mime: string;\n    /**\n     * File\n     */\n    readonly file?: string;\n};\n\nexport type Default = {\n    name?: string;\n};\n\nexport type Pageable = {\n    page?: number;\n    size?: number;\n    sort?: Array<string>;\n};\n\n/**\n * This is a free-form object without additionalProperties.\n */\nexport type FreeFormObjectWithoutAdditionalProperties = {\n    [key: string]: unknown;\n};\n\n/**\n * This is a free-form object with additionalProperties: true.\n */\nexport type FreeFormObjectWithAdditionalPropertiesEqTrue = {\n    [key: string]: unknown;\n};\n\n/**\n * This is a free-form object with additionalProperties: {}.\n */\nexport type FreeFormObjectWithAdditionalPropertiesEqEmptyObject = {\n    [key: string]: unknown;\n};\n\nexport type ModelWithConst = {\n    String?: 'String';\n    number?: 0;\n    null?: null;\n    withType?: 'Some string';\n};\n\n/**\n * This is a model with one property and additionalProperties: true\n */\nexport type ModelWithAdditionalPropertiesEqTrue = {\n    /**\n     * This is a simple string property\n     */\n    prop?: string;\n    [key: string]: unknown;\n};\n\nexport type NestedAnyOfArraysNullable = {\n    nullableArray?: Array<string | boolean> | null;\n};\n\nexport type CompositionWithOneOfAndProperties = ({\n    foo: SimpleParameter;\n} | {\n    bar: NonAsciiStringæøåÆøÅöôêÊ字符串;\n}) & {\n    baz: number | null;\n    qux: number;\n};\n\n/**\n * An object that can be null\n */\nexport type NullableObject = {\n    foo?: string;\n} | null;\n\n/**\n * Some % character\n */\nexport type CharactersInDescription = string;\n\nexport type ModelWithNullableObject = {\n    data?: NullableObject;\n};\n\n/**\n * An object with additional properties that can be null (anyOf ref + null)\n */\nexport type ModelWithAdditionalPropertiesRef = {\n    [key: string]: NullableObject | null;\n};\n\nexport type ModelWithOneOfEnum = {\n    foo: 'Bar';\n} | {\n    foo: 'Baz';\n} | {\n    foo: 'Qux';\n} | {\n    content: string;\n    foo: 'Quux';\n} | {\n    content: [\n        string,\n        string\n    ];\n    foo: 'Corge';\n};\n\nexport type ModelWithNestedArrayEnumsDataFoo = 'foo' | 'bar';\n\nexport type ModelWithNestedArrayEnumsDataBar = 'baz' | 'qux';\n\nexport type ModelWithNestedArrayEnumsData = {\n    foo?: Array<ModelWithNestedArrayEnumsDataFoo>;\n    bar?: Array<ModelWithNestedArrayEnumsDataBar>;\n};\n\nexport type ModelWithNestedArrayEnums = {\n    array_strings?: Array<string>;\n    data?: ModelWithNestedArrayEnumsData;\n};\n\nexport type ModelWithNestedCompositionEnums = {\n    foo?: ModelWithNestedArrayEnumsDataFoo;\n};\n\nexport type ModelWithReadOnlyAndWriteOnly = {\n    foo: string;\n    readonly bar: string;\n};\n\nexport type ModelWithConstantSizeArray = [\n    number,\n    number\n];\n\nexport type ModelWithAnyOfConstantSizeArray = [\n    number | string,\n    number | string,\n    number | string\n];\n\nexport type ModelWithPrefixItemsConstantSizeArray = [\n    ModelWithInteger,\n    number | string,\n    string\n];\n\nexport type ModelWithAnyOfConstantSizeArrayNullable = [\n    number | null | string,\n    number | null | string,\n    number | null | string\n];\n\nexport type ModelWithAnyOfConstantSizeArrayWithNSizeAndOptions = [\n    number | Import,\n    number | Import\n];\n\nexport type ModelWithAnyOfConstantSizeArrayAndIntersect = [\n    number & string,\n    number & string\n];\n\nexport type ModelWithNumericEnumUnion = {\n    /**\n     * Период\n     */\n    value?: -10 | -1 | 0 | 1 | 3 | 6 | 12;\n};\n\n/**\n * Some description with `back ticks`\n */\nexport type ModelWithBackticksInDescription = {\n    /**\n     * The template `that` should be used for parsing and importing the contents of the CSV file.\n     *\n     * <br/><p>There is one placeholder currently supported:<ul>     <li><b>${x}</b> - refers to the n-th column in the CSV file, e.g. ${1}, ${2}, ...)</li></ul><p>Example of a correct JSON template:</p>\n     * <pre>\n     * [\n     * {\n     * \"resourceType\": \"Asset\",\n     * \"identifier\": {\n     * \"name\": \"${1}\",\n     * \"domain\": {\n     * \"name\": \"${2}\",\n     * \"community\": {\n     * \"name\": \"Some Community\"\n     * }\n     * }\n     * },\n     * \"attributes\" : {\n     * \"00000000-0000-0000-0000-000000003115\" : [ {\n     * \"value\" : \"${3}\"\n     * } ],\n     * \"00000000-0000-0000-0000-000000000222\" : [ {\n     * \"value\" : \"${4}\"\n     * } ]\n     * }\n     * }\n     * ]\n     * </pre>\n     */\n    template?: string;\n};\n\nexport type ModelWithOneOfAndProperties = (SimpleParameter | NonAsciiStringæøåÆøÅöôêÊ字符串) & {\n    baz: number | null;\n    qux: number;\n};\n\n/**\n * Model used to test deduplication strategy (unused)\n */\nexport type ParameterSimpleParameterUnused = string;\n\n/**\n * Model used to test deduplication strategy\n */\nexport type PostServiceWithEmptyTagResponse = string;\n\n/**\n * Model used to test deduplication strategy\n */\nexport type PostServiceWithEmptyTagResponse2 = string;\n\n/**\n * Model used to test deduplication strategy\n */\nexport type DeleteFooData = string;\n\n/**\n * Model used to test deduplication strategy\n */\nexport type DeleteFooData2 = string;\n\n/**\n * Model with restricted keyword name\n */\nexport type Import = string;\n\nexport type SchemaWithFormRestrictedKeys = {\n    description?: string;\n    'x-enum-descriptions'?: string;\n    'x-enum-varnames'?: string;\n    'x-enumNames'?: string;\n    title?: string;\n    object?: {\n        description?: string;\n        'x-enum-descriptions'?: string;\n        'x-enum-varnames'?: string;\n        'x-enumNames'?: string;\n        title?: string;\n    };\n    array?: Array<{\n        description?: string;\n        'x-enum-descriptions'?: string;\n        'x-enum-varnames'?: string;\n        'x-enumNames'?: string;\n        title?: string;\n    }>;\n};\n\n/**\n * This schema was giving PascalCase transformations a hard time\n */\nexport type IoK8sApimachineryPkgApisMetaV1DeleteOptions = {\n    /**\n     * Must be fulfilled before a deletion is carried out. If not possible, a 409 Conflict status will be returned.\n     */\n    preconditions?: IoK8sApimachineryPkgApisMetaV1Preconditions;\n};\n\n/**\n * This schema was giving PascalCase transformations a hard time\n */\nexport type IoK8sApimachineryPkgApisMetaV1Preconditions = {\n    /**\n     * Specifies the target ResourceVersion\n     */\n    resourceVersion?: string;\n    /**\n     * Specifies the target UID.\n     */\n    uid?: string;\n};\n\nexport type AdditionalPropertiesUnknownIssue = {\n    [key: string]: string | number;\n};\n\nexport type AdditionalPropertiesUnknownIssue2 = {\n    [key: string]: string | number;\n};\n\nexport type AdditionalPropertiesUnknownIssue3 = string & {\n    entries: {\n        [key: string]: AdditionalPropertiesUnknownIssue;\n    };\n};\n\nexport type AdditionalPropertiesIntegerIssue = {\n    value: number;\n    [key: string]: number;\n};\n\nexport type OneOfAllOfIssue = ((ConstValue | GenericSchemaDuplicateIssue1SystemBoolean) & _3eNum1Период) | GenericSchemaDuplicateIssue1SystemString;\n\nexport type GenericSchemaDuplicateIssue1SystemBoolean = {\n    item?: boolean;\n    error?: string | null;\n    readonly hasError?: boolean;\n    data?: {\n        [key: string]: never;\n    };\n};\n\nexport type GenericSchemaDuplicateIssue1SystemString = {\n    item?: string | null;\n    error?: string | null;\n    readonly hasError?: boolean;\n};\n\nexport type ExternalSharedModel = {\n    id: string;\n    name?: string;\n};\n\n/**\n * This is a model with one property containing a reference\n */\nexport type ModelWithReferenceWritable = {\n    prop?: ModelWithPropertiesWritable;\n};\n\n/**\n * This is a model with one property containing an array\n */\nexport type ModelWithArrayReadOnlyAndWriteOnlyWritable = {\n    prop?: Array<ModelWithReadOnlyAndWriteOnlyWritable>;\n    propWithFile?: Array<Blob | File>;\n    propWithNumber?: Array<number>;\n};\n\n/**\n * This is a model with one nested property\n */\nexport type ModelWithPropertiesWritable = {\n    required: string;\n    requiredAndNullable: string | null;\n    string?: string;\n    number?: number;\n    boolean?: boolean;\n    reference?: ModelWithString;\n    'property with space'?: string;\n    default?: string;\n    try?: string;\n};\n\n/**\n * This is a model that contains a some patterns\n */\nexport type ModelWithPatternWritable = {\n    key: string;\n    name: string;\n    id?: string;\n    text?: string;\n    patternWithSingleQuotes?: string;\n    patternWithNewline?: string;\n    patternWithBacktick?: string;\n    patternWithUnicode?: string;\n};\n\nexport type FileWritable = {\n    /**\n     * Mime\n     */\n    mime: string;\n};\n\nexport type ModelWithReadOnlyAndWriteOnlyWritable = {\n    foo: string;\n    baz: string;\n};\n\nexport type ModelWithAnyOfConstantSizeArrayWithNSizeAndOptionsWritable = [\n    number | Import,\n    number | Import\n];\n\nexport type AdditionalPropertiesUnknownIssueWritable = {\n    [key: string]: string | number;\n};\n\nexport type OneOfAllOfIssueWritable = ((ConstValue | GenericSchemaDuplicateIssue1SystemBoolean) & _3eNum1Период) | GenericSchemaDuplicateIssue1SystemString;\n\nexport type GenericSchemaDuplicateIssue1SystemBooleanWritable = {\n    item?: boolean;\n    error?: string | null;\n    data?: {\n        [key: string]: never;\n    };\n};\n\nexport type GenericSchemaDuplicateIssue1SystemStringWritable = {\n    item?: string | null;\n    error?: string | null;\n};\n\n/**\n * This is a reusable parameter\n */\nexport type SimpleParameter = string;\n\n/**\n * Parameter with illegal characters\n */\nexport type XFooBar = ModelWithString;\n\n/**\n * A reusable request body\n */\nexport type SimpleRequestBody = ModelWithString;\n\n/**\n * A reusable request body\n */\nexport type SimpleFormData = ModelWithString;\n\nexport type ExportData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no+tag';\n};\n\nexport type PatchApiVbyApiVersionNoTagData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no+tag';\n};\n\nexport type PatchApiVbyApiVersionNoTagResponses = {\n    /**\n     * OK\n     */\n    default: unknown;\n};\n\nexport type ImportData = {\n    body: ModelWithReadOnlyAndWriteOnlyWritable | ModelWithArrayReadOnlyAndWriteOnlyWritable;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no+tag';\n};\n\nexport type ImportResponses = {\n    /**\n     * Success\n     */\n    200: ModelFromZendesk;\n    /**\n     * Default success response\n     */\n    default: ModelWithReadOnlyAndWriteOnly;\n};\n\nexport type ImportResponse = ImportResponses[keyof ImportResponses];\n\nexport type FooWowData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no+tag';\n};\n\nexport type FooWowResponses = {\n    /**\n     * OK\n     */\n    default: unknown;\n};\n\nexport type ApiVVersionODataControllerCountData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple/$count';\n};\n\nexport type ApiVVersionODataControllerCountResponses = {\n    /**\n     * Success\n     */\n    200: ModelFromZendesk;\n};\n\nexport type ApiVVersionODataControllerCountResponse = ApiVVersionODataControllerCountResponses[keyof ApiVVersionODataControllerCountResponses];\n\nexport type GetApiVbyApiVersionSimpleOperationData = {\n    body?: never;\n    path: {\n        /**\n         * foo in method\n         */\n        foo_param: string;\n    };\n    query?: never;\n    url: '/api/v{api-version}/simple:operation';\n};\n\nexport type GetApiVbyApiVersionSimpleOperationErrors = {\n    /**\n     * Default error response\n     */\n    default: ModelWithBoolean;\n};\n\nexport type GetApiVbyApiVersionSimpleOperationError = GetApiVbyApiVersionSimpleOperationErrors[keyof GetApiVbyApiVersionSimpleOperationErrors];\n\nexport type GetApiVbyApiVersionSimpleOperationResponses = {\n    /**\n     * Response is a simple number\n     */\n    200: number;\n};\n\nexport type GetApiVbyApiVersionSimpleOperationResponse = GetApiVbyApiVersionSimpleOperationResponses[keyof GetApiVbyApiVersionSimpleOperationResponses];\n\nexport type DeleteCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type GetCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type HeadCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type OptionsCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type PatchCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type PostCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type PutCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type DeleteFooData3 = {\n    body?: never;\n    headers: {\n        /**\n         * Parameter with illegal characters\n         */\n        'x-Foo-Bar': ModelWithString;\n    };\n    path: {\n        /**\n         * foo in method\n         */\n        foo_param: string;\n        /**\n         * bar in method\n         */\n        BarParam: string;\n    };\n    query?: never;\n    url: '/api/v{api-version}/foo/{foo_param}/bar/{BarParam}';\n};\n\nexport type CallWithDescriptionsData = {\n    body?: never;\n    path?: never;\n    query?: {\n        /**\n         * Testing multiline comments in string: First line\n         * Second line\n         *\n         * Fourth line\n         */\n        parameterWithBreaks?: string;\n        /**\n         * Testing backticks in string: `backticks` and ```multiple backticks``` should work\n         */\n        parameterWithBackticks?: string;\n        /**\n         * Testing slashes in string: \\backwards\\\\\\ and /forwards/// should work\n         */\n        parameterWithSlashes?: string;\n        /**\n         * Testing expression placeholders in string: ${expression} should work\n         */\n        parameterWithExpressionPlaceholders?: string;\n        /**\n         * Testing quotes in string: 'single quote''' and \"double quotes\"\"\" should work\n         */\n        parameterWithQuotes?: string;\n        /**\n         * Testing reserved characters in string: * inline * and ** inline ** should work\n         */\n        parameterWithReservedCharacters?: string;\n    };\n    url: '/api/v{api-version}/descriptions';\n};\n\nexport type DeprecatedCallData = {\n    body?: never;\n    headers: {\n        /**\n         * This parameter is deprecated\n         *\n         * @deprecated\n         */\n        parameter: DeprecatedModel | null;\n    };\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/parameters/deprecated';\n};\n\nexport type CallWithParametersData = {\n    /**\n     * This is the parameter that goes into the body\n     */\n    body: {\n        [key: string]: unknown;\n    } | null;\n    headers: {\n        /**\n         * This is the parameter that goes into the header\n         */\n        parameterHeader: string | null;\n    };\n    path: {\n        /**\n         * This is the parameter that goes into the path\n         */\n        parameterPath: string | null;\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string | null;\n    };\n    query: {\n        foo_ref_enum?: ModelWithNestedArrayEnumsDataFoo;\n        foo_all_of_enum: ModelWithNestedArrayEnumsDataFoo;\n        /**\n         * This is the parameter that goes into the query params\n         */\n        cursor: string | null;\n    };\n    url: '/api/v{api-version}/parameters/{parameterPath}';\n};\n\nexport type CallWithWeirdParameterNamesData = {\n    /**\n     * This is the parameter that goes into the body\n     */\n    body: ModelWithString | null;\n    headers: {\n        /**\n         * This is the parameter that goes into the request header\n         */\n        'parameter.header': string | null;\n    };\n    path: {\n        /**\n         * This is the parameter that goes into the path\n         */\n        'parameter.path.1'?: string;\n        /**\n         * This is the parameter that goes into the path\n         */\n        'parameter-path-2'?: string;\n        /**\n         * This is the parameter that goes into the path\n         */\n        'PARAMETER-PATH-3'?: string;\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string | null;\n    };\n    query: {\n        /**\n         * This is the parameter with a reserved keyword\n         */\n        default?: string;\n        /**\n         * This is the parameter that goes into the request query params\n         */\n        'parameter-query': string | null;\n    };\n    url: '/api/v{api-version}/parameters/{parameter.path.1}/{parameter-path-2}/{PARAMETER-PATH-3}';\n};\n\nexport type GetCallWithOptionalParamData = {\n    /**\n     * This is a required parameter\n     */\n    body: ModelWithOneOfEnum;\n    path?: never;\n    query?: {\n        /**\n         * This is an optional parameter\n         */\n        page?: number;\n    };\n    url: '/api/v{api-version}/parameters';\n};\n\nexport type PostCallWithOptionalParamData = {\n    /**\n     * This is an optional parameter\n     */\n    body?: {\n        offset?: number | null;\n    };\n    path?: never;\n    query: {\n        /**\n         * This is a required parameter\n         */\n        parameter: Pageable;\n    };\n    url: '/api/v{api-version}/parameters';\n};\n\nexport type PostCallWithOptionalParamResponses = {\n    /**\n     * Response is a simple number\n     */\n    200: number;\n    /**\n     * Success\n     */\n    204: void;\n};\n\nexport type PostCallWithOptionalParamResponse = PostCallWithOptionalParamResponses[keyof PostCallWithOptionalParamResponses];\n\nexport type PostApiVbyApiVersionRequestBodyData = {\n    /**\n     * A reusable request body\n     */\n    body?: SimpleRequestBody;\n    path?: never;\n    query?: {\n        /**\n         * This is a reusable parameter\n         */\n        parameter?: string;\n    };\n    url: '/api/v{api-version}/requestBody';\n};\n\nexport type PostApiVbyApiVersionFormDataData = {\n    /**\n     * A reusable request body\n     */\n    body?: SimpleFormData;\n    path?: never;\n    query?: {\n        /**\n         * This is a reusable parameter\n         */\n        parameter?: string;\n    };\n    url: '/api/v{api-version}/formData';\n};\n\nexport type CallWithDefaultParametersData = {\n    body?: never;\n    path?: never;\n    query?: {\n        /**\n         * This is a simple string with default value\n         */\n        parameterString?: string | null;\n        /**\n         * This is a simple number with default value\n         */\n        parameterNumber?: number | null;\n        /**\n         * This is a simple boolean with default value\n         */\n        parameterBoolean?: boolean | null;\n        /**\n         * This is a simple enum with default value\n         */\n        parameterEnum?: 'Success' | 'Warning' | 'Error';\n        /**\n         * This is a simple model with default value\n         */\n        parameterModel?: ModelWithString | null;\n    };\n    url: '/api/v{api-version}/defaults';\n};\n\nexport type CallWithDefaultOptionalParametersData = {\n    body?: never;\n    path?: never;\n    query?: {\n        /**\n         * This is a simple string that is optional with default value\n         */\n        parameterString?: string;\n        /**\n         * This is a simple number that is optional with default value\n         */\n        parameterNumber?: number;\n        /**\n         * This is a simple boolean that is optional with default value\n         */\n        parameterBoolean?: boolean;\n        /**\n         * This is a simple enum that is optional with default value\n         */\n        parameterEnum?: 'Success' | 'Warning' | 'Error';\n        /**\n         * This is a simple model that is optional with default value\n         */\n        parameterModel?: ModelWithString;\n    };\n    url: '/api/v{api-version}/defaults';\n};\n\nexport type CallToTestOrderOfParamsData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * This is a optional string with default\n         */\n        parameterOptionalStringWithDefault?: string;\n        /**\n         * This is a optional string with empty default\n         */\n        parameterOptionalStringWithEmptyDefault?: string;\n        /**\n         * This is a optional string with no default\n         */\n        parameterOptionalStringWithNoDefault?: string;\n        /**\n         * This is a string with default\n         */\n        parameterStringWithDefault: string;\n        /**\n         * This is a string with empty default\n         */\n        parameterStringWithEmptyDefault: string;\n        /**\n         * This is a string with no default\n         */\n        parameterStringWithNoDefault: string;\n        /**\n         * This is a string that can be null with no default\n         */\n        parameterStringNullableWithNoDefault?: string | null;\n        /**\n         * This is a string that can be null with default\n         */\n        parameterStringNullableWithDefault?: string | null;\n    };\n    url: '/api/v{api-version}/defaults';\n};\n\nexport type DuplicateNameData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/duplicate';\n};\n\nexport type DuplicateName2Data = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/duplicate';\n};\n\nexport type DuplicateName3Data = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/duplicate';\n};\n\nexport type DuplicateName4Data = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/duplicate';\n};\n\nexport type CallWithNoContentResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no-content';\n};\n\nexport type CallWithNoContentResponseResponses = {\n    /**\n     * Success\n     */\n    204: void;\n};\n\nexport type CallWithNoContentResponseResponse = CallWithNoContentResponseResponses[keyof CallWithNoContentResponseResponses];\n\nexport type CallWithResponseAndNoContentResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multiple-tags/response-and-no-content';\n};\n\nexport type CallWithResponseAndNoContentResponseResponses = {\n    /**\n     * Response is a simple number\n     */\n    200: number;\n    /**\n     * Success\n     */\n    204: void;\n};\n\nexport type CallWithResponseAndNoContentResponseResponse = CallWithResponseAndNoContentResponseResponses[keyof CallWithResponseAndNoContentResponseResponses];\n\nexport type DummyAData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multiple-tags/a';\n};\n\nexport type DummyAResponses = {\n    200: _400;\n};\n\nexport type DummyAResponse = DummyAResponses[keyof DummyAResponses];\n\nexport type DummyBData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multiple-tags/b';\n};\n\nexport type DummyBResponses = {\n    /**\n     * Success\n     */\n    204: void;\n};\n\nexport type DummyBResponse = DummyBResponses[keyof DummyBResponses];\n\nexport type CallWithResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/response';\n};\n\nexport type CallWithResponseResponses = {\n    default: Import;\n};\n\nexport type CallWithResponseResponse = CallWithResponseResponses[keyof CallWithResponseResponses];\n\nexport type CallWithDuplicateResponsesData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/response';\n};\n\nexport type CallWithDuplicateResponsesErrors = {\n    /**\n     * Message for 500 error\n     */\n    500: ModelWithStringError;\n    /**\n     * Message for 501 error\n     */\n    501: ModelWithStringError;\n    /**\n     * Message for 502 error\n     */\n    502: ModelWithStringError;\n    /**\n     * Message for 4XX errors\n     */\n    '4XX': DictionaryWithArray;\n    /**\n     * Default error response\n     */\n    default: ModelWithBoolean;\n};\n\nexport type CallWithDuplicateResponsesError = CallWithDuplicateResponsesErrors[keyof CallWithDuplicateResponsesErrors];\n\nexport type CallWithDuplicateResponsesResponses = {\n    /**\n     * Message for 200 response\n     */\n    200: ModelWithBoolean & ModelWithInteger;\n    /**\n     * Message for 201 response\n     */\n    201: ModelWithString;\n    /**\n     * Message for 202 response\n     */\n    202: ModelWithString;\n};\n\nexport type CallWithDuplicateResponsesResponse = CallWithDuplicateResponsesResponses[keyof CallWithDuplicateResponsesResponses];\n\nexport type CallWithResponsesData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/response';\n};\n\nexport type CallWithResponsesErrors = {\n    /**\n     * Message for 500 error\n     */\n    500: ModelWithStringError;\n    /**\n     * Message for 501 error\n     */\n    501: ModelWithStringError;\n    /**\n     * Message for 502 error\n     */\n    502: ModelWithStringError;\n    /**\n     * Message for default response\n     */\n    default: ModelWithStringError;\n};\n\nexport type CallWithResponsesError = CallWithResponsesErrors[keyof CallWithResponsesErrors];\n\nexport type CallWithResponsesResponses = {\n    /**\n     * Message for 200 response\n     */\n    200: {\n        readonly '@namespace.string'?: string;\n        readonly '@namespace.integer'?: number;\n        readonly value?: Array<ModelWithString>;\n    };\n    /**\n     * Message for 201 response\n     */\n    201: ModelThatExtends;\n    /**\n     * Message for 202 response\n     */\n    202: ModelThatExtendsExtends;\n};\n\nexport type CallWithResponsesResponse = CallWithResponsesResponses[keyof CallWithResponsesResponses];\n\nexport type CollectionFormatData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * This is an array parameter that is sent as csv format (comma-separated values)\n         */\n        parameterArrayCSV: Array<string> | null;\n        /**\n         * This is an array parameter that is sent as ssv format (space-separated values)\n         */\n        parameterArraySSV: Array<string> | null;\n        /**\n         * This is an array parameter that is sent as tsv format (tab-separated values)\n         */\n        parameterArrayTSV: Array<string> | null;\n        /**\n         * This is an array parameter that is sent as pipes format (pipe-separated values)\n         */\n        parameterArrayPipes: Array<string> | null;\n        /**\n         * This is an array parameter that is sent as multi format (multiple parameter instances)\n         */\n        parameterArrayMulti: Array<string> | null;\n    };\n    url: '/api/v{api-version}/collectionFormat';\n};\n\nexport type TypesData = {\n    body?: never;\n    path?: {\n        /**\n         * This is a number parameter\n         */\n        id?: number;\n    };\n    query: {\n        /**\n         * This is a number parameter\n         */\n        parameterNumber: number;\n        /**\n         * This is a string parameter\n         */\n        parameterString: string | null;\n        /**\n         * This is a boolean parameter\n         */\n        parameterBoolean: boolean | null;\n        /**\n         * This is an object parameter\n         */\n        parameterObject: {\n            [key: string]: unknown;\n        } | null;\n        /**\n         * This is an array parameter\n         */\n        parameterArray: Array<string> | null;\n        /**\n         * This is a dictionary parameter\n         */\n        parameterDictionary: {\n            [key: string]: unknown;\n        } | null;\n        /**\n         * This is an enum parameter\n         */\n        parameterEnum: 'Success' | 'Warning' | 'Error' | null;\n    };\n    url: '/api/v{api-version}/types';\n};\n\nexport type TypesResponses = {\n    /**\n     * Response is a simple number\n     */\n    200: number;\n    /**\n     * Response is a simple string\n     */\n    201: string;\n    /**\n     * Response is a simple boolean\n     */\n    202: boolean;\n    /**\n     * Response is a simple object\n     */\n    203: {\n        [key: string]: unknown;\n    };\n};\n\nexport type TypesResponse = TypesResponses[keyof TypesResponses];\n\nexport type UploadFileData = {\n    body: Blob | File;\n    path: {\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string | null;\n    };\n    query?: never;\n    url: '/api/v{api-version}/upload';\n};\n\nexport type UploadFileResponses = {\n    200: boolean;\n};\n\nexport type UploadFileResponse = UploadFileResponses[keyof UploadFileResponses];\n\nexport type FileResponseData = {\n    body?: never;\n    path: {\n        id: string;\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string;\n    };\n    query?: never;\n    url: '/api/v{api-version}/file/{id}';\n};\n\nexport type FileResponseResponses = {\n    /**\n     * Success\n     */\n    200: Blob | File;\n};\n\nexport type FileResponseResponse = FileResponseResponses[keyof FileResponseResponses];\n\nexport type ComplexTypesData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * Parameter containing object\n         */\n        parameterObject: {\n            first?: {\n                second?: {\n                    third?: string;\n                };\n            };\n        };\n        /**\n         * Parameter containing reference\n         */\n        parameterReference: ModelWithString;\n    };\n    url: '/api/v{api-version}/complex';\n};\n\nexport type ComplexTypesErrors = {\n    /**\n     * 400 `server` error\n     */\n    400: unknown;\n    /**\n     * 500 server error\n     */\n    500: unknown;\n};\n\nexport type ComplexTypesResponses = {\n    /**\n     * Successful response\n     */\n    200: Array<ModelWithString>;\n};\n\nexport type ComplexTypesResponse = ComplexTypesResponses[keyof ComplexTypesResponses];\n\nexport type MultipartResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multipart';\n};\n\nexport type MultipartResponseResponses = {\n    /**\n     * OK\n     */\n    200: {\n        file?: Blob | File;\n        metadata?: {\n            foo?: string;\n            bar?: string;\n        };\n    };\n};\n\nexport type MultipartResponseResponse = MultipartResponseResponses[keyof MultipartResponseResponses];\n\nexport type MultipartRequestData = {\n    body?: {\n        content?: Blob | File;\n        data?: ModelWithString | null;\n    };\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multipart';\n};\n\nexport type ComplexParamsData = {\n    body?: {\n        readonly key: string | null;\n        name: string | null;\n        enabled?: boolean;\n        type: 'Monkey' | 'Horse' | 'Bird';\n        listOfModels?: Array<ModelWithString> | null;\n        listOfStrings?: Array<string> | null;\n        parameters: ModelWithString | ModelWithEnum | ModelWithArray | ModelWithDictionary;\n        readonly user?: {\n            readonly id?: number;\n            readonly name?: string | null;\n        };\n    };\n    path: {\n        id: number;\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string;\n    };\n    query?: never;\n    url: '/api/v{api-version}/complex/{id}';\n};\n\nexport type ComplexParamsResponses = {\n    /**\n     * Success\n     */\n    200: ModelWithString;\n};\n\nexport type ComplexParamsResponse = ComplexParamsResponses[keyof ComplexParamsResponses];\n\nexport type CallWithResultFromHeaderData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/header';\n};\n\nexport type CallWithResultFromHeaderErrors = {\n    /**\n     * 400 server error\n     */\n    400: unknown;\n    /**\n     * 500 server error\n     */\n    500: unknown;\n};\n\nexport type CallWithResultFromHeaderResponses = {\n    /**\n     * Successful response\n     */\n    200: unknown;\n};\n\nexport type TestErrorCodeData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * Status code to return\n         */\n        status: number;\n    };\n    url: '/api/v{api-version}/error';\n};\n\nexport type TestErrorCodeErrors = {\n    /**\n     * Custom message: Internal Server Error\n     */\n    500: unknown;\n    /**\n     * Custom message: Not Implemented\n     */\n    501: unknown;\n    /**\n     * Custom message: Bad Gateway\n     */\n    502: unknown;\n    /**\n     * Custom message: Service Unavailable\n     */\n    503: unknown;\n};\n\nexport type TestErrorCodeResponses = {\n    /**\n     * Custom message: Successful response\n     */\n    200: unknown;\n};\n\nexport type NonAsciiæøåÆøÅöôêÊ字符串Data = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * Dummy input param\n         */\n        nonAsciiParamæøåÆØÅöôêÊ: number;\n    };\n    url: '/api/v{api-version}/non-ascii-æøåÆØÅöôêÊ字符串';\n};\n\nexport type NonAsciiæøåÆøÅöôêÊ字符串Responses = {\n    /**\n     * Successful response\n     */\n    200: Array<NonAsciiStringæøåÆøÅöôêÊ字符串>;\n};\n\nexport type NonAsciiæøåÆøÅöôêÊ字符串Response = NonAsciiæøåÆøÅöôêÊ字符串Responses[keyof NonAsciiæøåÆøÅöôêÊ字符串Responses];\n\nexport type PutWithFormUrlEncodedData = {\n    body: ArrayWithStrings;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/non-ascii-æøåÆØÅöôêÊ字符串';\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-axios/default/client/client.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { AxiosError, AxiosInstance, RawAxiosRequestHeaders } from 'axios';\nimport axios from 'axios';\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 } from './types.gen';\nimport { buildUrl, createConfig, mergeConfigs, mergeHeaders, setAuthParams } from './utils.gen';\n\nexport const createClient = (config: Config = {}): Client => {\n  let _config = mergeConfigs(createConfig(), config);\n\n  let instance: AxiosInstance;\n\n  if (_config.axios && !('Axios' in _config.axios)) {\n    instance = _config.axios;\n  } else {\n    // eslint-disable-next-line @typescript-eslint/no-unused-vars\n    const { auth, ...configWithoutAuth } = _config;\n    instance = axios.create(configWithoutAuth);\n  }\n\n  const getConfig = (): Config => ({ ..._config });\n\n  const setConfig = (config: Config): Config => {\n    _config = mergeConfigs(_config, config);\n    instance.defaults = {\n      ...instance.defaults,\n      ..._config,\n      // @ts-expect-error\n      headers: mergeHeaders(instance.defaults.headers, _config.headers),\n    };\n    return getConfig();\n  };\n\n  const beforeRequest = async (options: RequestOptions) => {\n    const opts = {\n      ..._config,\n      ...options,\n      axios: options.axios ?? _config.axios ?? instance,\n      headers: mergeHeaders(_config.headers, options.headers),\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.body = opts.bodySerializer(opts.body);\n    }\n\n    const url = buildUrl(opts);\n\n    return { opts, url };\n  };\n\n  // @ts-expect-error\n  const request: Client['request'] = async (options) => {\n    // @ts-expect-error\n    const { opts, url } = await beforeRequest(options);\n    try {\n      // assign Axios here for consistency with fetch\n      const _axios = opts.axios!;\n      // eslint-disable-next-line @typescript-eslint/no-unused-vars\n      const { auth, ...optsWithoutAuth } = opts;\n      const response = await _axios({\n        ...optsWithoutAuth,\n        baseURL: '', // the baseURL is already included in `url`\n        data: getValidRequestBody(opts),\n        headers: opts.headers as RawAxiosRequestHeaders,\n        // let `paramsSerializer()` handle query params if it exists\n        params: opts.paramsSerializer ? opts.query : undefined,\n        url,\n      });\n\n      let { data } = response;\n\n      if (opts.responseType === '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 {\n        ...response,\n        data: data ?? {},\n      };\n    } catch (error) {\n      const e = error as AxiosError;\n      if (opts.throwOnError) {\n        throw e;\n      }\n      // @ts-expect-error\n      e.error = e.response?.data ?? {};\n      return e;\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 Record<string, string>,\n      method,\n      serializedBody: getValidRequestBody(opts) as BodyInit | null | undefined,\n      // @ts-expect-error\n      signal: opts.signal,\n      url,\n    });\n  };\n\n  const _buildUrl: Client['buildUrl'] = (options) =>\n    buildUrl({ axios: instance, ..._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    instance,\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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-axios/default/client/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type { Auth } from '../core/auth.gen';\nexport type { QuerySerializerOptions } from '../core/bodySerializer.gen';\nexport {\n  formDataBodySerializer,\n  jsonBodySerializer,\n  urlSearchParamsBodySerializer,\n} from '../core/bodySerializer.gen';\nexport { buildClientParams } from '../core/params.gen';\nexport { serializeQueryKeyValue } from '../core/queryKeySerializer.gen';\nexport { createClient } from './client.gen';\nexport type {\n  Client,\n  ClientOptions,\n  Config,\n  CreateClientConfig,\n  Options,\n  RequestOptions,\n  RequestResult,\n  TDataShape,\n} from './types.gen';\nexport { createConfig } from './utils.gen';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-axios/default/client/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type {\n  AxiosError,\n  AxiosInstance,\n  AxiosRequestHeaders,\n  AxiosResponse,\n  AxiosStatic,\n  CreateAxiosDefaults,\n} from 'axios';\n\nimport type { Auth } from '../core/auth.gen';\nimport type {\n  ServerSentEventsOptions,\n  ServerSentEventsResult,\n} from '../core/serverSentEvents.gen';\nimport type { Client as CoreClient, Config as CoreConfig } from '../core/types.gen';\n\nexport interface Config<T extends ClientOptions = ClientOptions>\n  extends Omit<CreateAxiosDefaults, 'auth' | 'baseURL' | 'headers' | 'method'>, CoreConfig {\n  /**\n   * Axios implementation. You can use this option to provide either an\n   * `AxiosStatic` or an `AxiosInstance`.\n   *\n   * @default axios\n   */\n  axios?: AxiosStatic | AxiosInstance;\n  /**\n   * Base URL for all requests made by this client.\n   */\n  baseURL?: T['baseURL'];\n  /**\n   * An object containing any HTTP headers that you want to pre-populate your\n   * `Headers` object with.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/Headers/Headers#init See more}\n   */\n  headers?:\n    | AxiosRequestHeaders\n    | Record<\n        string,\n        string | number | boolean | (string | number | boolean)[] | null | undefined | unknown\n      >;\n  /**\n   * Throw an error instead of returning it in the response?\n   *\n   * @default false\n   */\n  throwOnError?: T['throwOnError'];\n}\n\nexport interface RequestOptions<\n  TData = unknown,\n  ThrowOnError extends boolean = boolean,\n  Url extends string = string,\n>\n  extends\n    Config<{\n      throwOnError: ThrowOnError;\n    }>,\n    Pick<\n      ServerSentEventsOptions<TData>,\n      | 'onRequest'\n      | 'onSseError'\n      | 'onSseEvent'\n      | 'sseDefaultRetryDelay'\n      | 'sseMaxRetryAttempts'\n      | 'sseMaxRetryDelay'\n    > {\n  /**\n   * Any body that you want to add to your request.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/fetch#body}\n   */\n  body?: unknown;\n  path?: Record<string, unknown>;\n  query?: Record<string, unknown>;\n  /**\n   * Security mechanism(s) to use for the request.\n   */\n  security?: ReadonlyArray<Auth>;\n  url: Url;\n}\n\nexport interface ClientOptions {\n  baseURL?: string;\n  throwOnError?: boolean;\n}\n\nexport type RequestResult<\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = boolean,\n> = ThrowOnError extends true\n  ? Promise<AxiosResponse<TData extends Record<string, unknown> ? TData[keyof TData] : TData>>\n  : Promise<\n      | (AxiosResponse<TData extends Record<string, unknown> ? TData[keyof TData] : TData> & {\n          error: undefined;\n        })\n      | (AxiosError<TError extends Record<string, unknown> ? TError[keyof TError] : TError> & {\n          data: undefined;\n          error: TError extends Record<string, unknown> ? TError[keyof TError] : TError;\n        })\n    >;\n\ntype MethodFn = <TData = unknown, TError = unknown, ThrowOnError extends boolean = false>(\n  options: Omit<RequestOptions<TData, ThrowOnError>, 'method'>,\n) => RequestResult<TData, TError, ThrowOnError>;\n\ntype SseFn = <TData = unknown, TError = unknown, ThrowOnError extends boolean = false>(\n  options: Omit<RequestOptions<TData, ThrowOnError>, 'method'>,\n) => Promise<ServerSentEventsResult<TData, TError>>;\n\ntype RequestFn = <TData = unknown, TError = unknown, ThrowOnError extends boolean = false>(\n  options: Omit<RequestOptions<TData, ThrowOnError>, 'method'> &\n    Pick<Required<RequestOptions<TData, ThrowOnError>>, 'method'>,\n) => RequestResult<TData, TError, ThrowOnError>;\n\ntype BuildUrlFn = <\n  TData extends {\n    body?: unknown;\n    path?: Record<string, unknown>;\n    query?: Record<string, unknown>;\n    url: string;\n  },\n>(\n  options: TData & Options<TData>,\n) => string;\n\nexport type Client = CoreClient<RequestFn, Config, MethodFn, BuildUrlFn, SseFn> & {\n  instance: AxiosInstance;\n};\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 = ClientOptions> = (\n  override?: Config<ClientOptions & T>,\n) => Config<Required<ClientOptions> & T>;\n\nexport interface TDataShape {\n  body?: unknown;\n  headers?: unknown;\n  path?: unknown;\n  query?: unknown;\n  url: string;\n}\n\ntype OmitKeys<T, K> = Pick<T, Exclude<keyof T, K>>;\n\nexport type Options<\n  TData extends TDataShape = TDataShape,\n  ThrowOnError extends boolean = boolean,\n  TResponse = unknown,\n> = OmitKeys<RequestOptions<TResponse, ThrowOnError>, 'body' | 'path' | 'query' | 'url'> &\n  ([TData] extends [never] ? unknown : Omit<TData, 'url'>);\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-axios/default/client/utils.gen.ts",
    "content": "// 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 {\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\nconst checkForExistence = (\n  options: Pick<RequestOptions, 'auth' | 'query'> & {\n    headers: Record<any, unknown>;\n  },\n  name?: string,\n): boolean => {\n  if (!name) {\n    return false;\n  }\n  if (name in options.headers || options.query?.[name]) {\n    return true;\n  }\n  if (\n    'Cookie' in options.headers &&\n    options.headers['Cookie'] &&\n    typeof options.headers['Cookie'] === 'string'\n  ) {\n    return options.headers['Cookie'].includes(`${name}=`);\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: Record<any, unknown>;\n  }) => {\n  for (const auth of security) {\n    if (checkForExistence(options, auth.name)) {\n      continue;\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        const value = `${name}=${token}`;\n        if ('Cookie' in options.headers && options.headers['Cookie']) {\n          options.headers['Cookie'] = `${options.headers['Cookie']}; ${value}`;\n        } else {\n          options.headers['Cookie'] = value;\n        }\n        break;\n      }\n      case 'header':\n      default:\n        options.headers[name] = token;\n        break;\n    }\n  }\n};\n\nexport const buildUrl: Client['buildUrl'] = (options) => {\n  const instanceBaseUrl = options.axios?.defaults?.baseURL;\n\n  const baseUrl =\n    !!options.baseURL && typeof options.baseURL === 'string' ? options.baseURL : instanceBaseUrl;\n\n  return getUrl({\n    baseUrl: baseUrl as string,\n    path: options.path,\n    // let `paramsSerializer()` handle query params if it exists\n    query: !options.paramsSerializer ? options.query : undefined,\n    querySerializer:\n      typeof options.querySerializer === 'function'\n        ? options.querySerializer\n        : createQuerySerializer(options.querySerializer),\n    url: options.url,\n  });\n};\n\nexport const mergeConfigs = (a: Config, b: Config): Config => {\n  const config = { ...a, ...b };\n  config.headers = mergeHeaders(a.headers, b.headers);\n  return config;\n};\n\n/**\n * Special Axios headers keywords allowing to set headers by request method.\n */\nexport const axiosHeadersKeywords = [\n  'common',\n  'delete',\n  'get',\n  'head',\n  'patch',\n  'post',\n  'put',\n] as const;\n\nexport const mergeHeaders = (\n  ...headers: Array<Required<Config>['headers'] | undefined>\n): Record<any, unknown> => {\n  const mergedHeaders: Record<any, unknown> = {};\n  for (const header of headers) {\n    if (!header || typeof header !== 'object') {\n      continue;\n    }\n\n    const iterator = Object.entries(header);\n\n    for (const [key, value] of iterator) {\n      if (\n        axiosHeadersKeywords.includes(key as (typeof axiosHeadersKeywords)[number]) &&\n        typeof value === 'object'\n      ) {\n        mergedHeaders[key] = {\n          ...(mergedHeaders[key] as Record<any, unknown>),\n          ...value,\n        };\n      } else if (value === null) {\n        delete mergedHeaders[key];\n      } else if (Array.isArray(value)) {\n        for (const v of value) {\n          // @ts-expect-error\n          mergedHeaders[key] = [...(mergedHeaders[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[key] = typeof value === 'object' ? JSON.stringify(value) : (value as string);\n      }\n    }\n  }\n  return mergedHeaders;\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  ...override,\n});\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-axios/default/client.gen.ts",
    "content": "// 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: 'http://localhost:3000/base' }));\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-axios/default/core/auth.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-axios/default/core/bodySerializer.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-axios/default/core/params.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-axios/default/core/pathSerializer.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-axios/default/core/queryKeySerializer.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\n/**\n * JSON-friendly union that mirrors what Pinia Colada can hash.\n */\nexport type JsonValue =\n  | null\n  | string\n  | number\n  | boolean\n  | JsonValue[]\n  | { [key: string]: JsonValue };\n\n/**\n * Replacer that converts non-JSON values (bigint, Date, etc.) to safe substitutes.\n */\nexport const queryKeyJsonReplacer = (_key: string, value: unknown) => {\n  if (value === undefined || typeof value === 'function' || typeof value === 'symbol') {\n    return undefined;\n  }\n  if (typeof value === 'bigint') {\n    return value.toString();\n  }\n  if (value instanceof Date) {\n    return value.toISOString();\n  }\n  return value;\n};\n\n/**\n * Safely stringifies a value and parses it back into a JsonValue.\n */\nexport const stringifyToJsonValue = (input: unknown): JsonValue | undefined => {\n  try {\n    const json = JSON.stringify(input, queryKeyJsonReplacer);\n    if (json === undefined) {\n      return undefined;\n    }\n    return JSON.parse(json) as JsonValue;\n  } catch {\n    return undefined;\n  }\n};\n\n/**\n * Detects plain objects (including objects with a null prototype).\n */\nconst isPlainObject = (value: unknown): value is Record<string, unknown> => {\n  if (value === null || typeof value !== 'object') {\n    return false;\n  }\n  const prototype = Object.getPrototypeOf(value as object);\n  return prototype === Object.prototype || prototype === null;\n};\n\n/**\n * Turns URLSearchParams into a sorted JSON object for deterministic keys.\n */\nconst serializeSearchParams = (params: URLSearchParams): JsonValue => {\n  const entries = Array.from(params.entries()).sort(([a], [b]) => a.localeCompare(b));\n  const result: Record<string, JsonValue> = {};\n\n  for (const [key, value] of entries) {\n    const existing = result[key];\n    if (existing === undefined) {\n      result[key] = value;\n      continue;\n    }\n\n    if (Array.isArray(existing)) {\n      (existing as string[]).push(value);\n    } else {\n      result[key] = [existing, value];\n    }\n  }\n\n  return result;\n};\n\n/**\n * Normalizes any accepted value into a JSON-friendly shape for query keys.\n */\nexport const serializeQueryKeyValue = (value: unknown): JsonValue | undefined => {\n  if (value === null) {\n    return null;\n  }\n\n  if (typeof value === 'string' || typeof value === 'number' || typeof value === 'boolean') {\n    return value;\n  }\n\n  if (value === undefined || typeof value === 'function' || typeof value === 'symbol') {\n    return undefined;\n  }\n\n  if (typeof value === 'bigint') {\n    return value.toString();\n  }\n\n  if (value instanceof Date) {\n    return value.toISOString();\n  }\n\n  if (Array.isArray(value)) {\n    return stringifyToJsonValue(value);\n  }\n\n  if (typeof URLSearchParams !== 'undefined' && value instanceof URLSearchParams) {\n    return serializeSearchParams(value);\n  }\n\n  if (isPlainObject(value)) {\n    return stringifyToJsonValue(value);\n  }\n\n  return undefined;\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-axios/default/core/serverSentEvents.gen.ts",
    "content": "// 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 const 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            // Normalize line endings: CRLF -> LF, then CR -> LF\n            buffer = buffer.replace(/\\r\\n/g, '\\n').replace(/\\r/g, '\\n');\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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-axios/default/core/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { Auth, AuthToken } from './auth.gen';\nimport type { BodySerializer, QuerySerializer, QuerySerializerOptions } from './bodySerializer.gen';\n\nexport type HttpMethod =\n  | 'connect'\n  | 'delete'\n  | 'get'\n  | 'head'\n  | 'options'\n  | 'patch'\n  | 'post'\n  | 'put'\n  | 'trace';\n\nexport type Client<\n  RequestFn = never,\n  Config = unknown,\n  MethodFn = never,\n  BuildUrlFn = never,\n  SseFn = never,\n> = {\n  /**\n   * Returns the final request URL.\n   */\n  buildUrl: BuildUrlFn;\n  getConfig: () => Config;\n  request: RequestFn;\n  setConfig: (config: Config) => Config;\n} & {\n  [K in HttpMethod]: MethodFn;\n} & ([SseFn] extends [never] ? { sse?: never } : { sse: { [K in HttpMethod]: SseFn } });\n\nexport interface Config {\n  /**\n   * Auth token or a function returning auth token. The resolved value will be\n   * added to the request payload as defined by its `security` array.\n   */\n  auth?: ((auth: Auth) => Promise<AuthToken> | AuthToken) | AuthToken;\n  /**\n   * A function for serializing request body parameter. By default,\n   * {@link JSON.stringify()} will be used.\n   */\n  bodySerializer?: BodySerializer | null;\n  /**\n   * An object containing any HTTP headers that you want to pre-populate your\n   * `Headers` object with.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/Headers/Headers#init See more}\n   */\n  headers?:\n    | RequestInit['headers']\n    | Record<\n        string,\n        string | number | boolean | (string | number | boolean)[] | null | undefined | unknown\n      >;\n  /**\n   * The request method.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/fetch#method See more}\n   */\n  method?: Uppercase<HttpMethod>;\n  /**\n   * A function for serializing request query parameters. By default, arrays\n   * will be exploded in form style, objects will be exploded in deepObject\n   * style, and reserved characters are percent-encoded.\n   *\n   * This method will have no effect if the native `paramsSerializer()` Axios\n   * API function is used.\n   *\n   * {@link https://swagger.io/docs/specification/serialization/#query View examples}\n   */\n  querySerializer?: QuerySerializer | QuerySerializerOptions;\n  /**\n   * A function validating request data. This is useful if you want to ensure\n   * the request conforms to the desired shape, so it can be safely sent to\n   * the server.\n   */\n  requestValidator?: (data: unknown) => Promise<unknown>;\n  /**\n   * A function transforming response data before it's returned. This is useful\n   * for post-processing data, e.g. converting ISO strings into Date objects.\n   */\n  responseTransformer?: (data: unknown) => Promise<unknown>;\n  /**\n   * A function validating response data. This is useful if you want to ensure\n   * the response conforms to the desired shape, so it can be safely passed to\n   * the transformers and returned to the user.\n   */\n  responseValidator?: (data: unknown) => Promise<unknown>;\n}\n\ntype IsExactlyNeverOrNeverUndefined<T> = [T] extends [never]\n  ? true\n  : [T] extends [never | undefined]\n    ? [undefined] extends [T]\n      ? false\n      : true\n    : false;\n\nexport type OmitNever<T extends Record<string, unknown>> = {\n  [K in keyof T as IsExactlyNeverOrNeverUndefined<T[K]> extends true ? never : K]: T[K];\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-axios/default/core/utils.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-axios/default/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport { apiVVersionODataControllerCount, callToTestOrderOfParams, callWithDefaultOptionalParameters, callWithDefaultParameters, callWithDescriptions, callWithDuplicateResponses, callWithNoContentResponse, callWithParameters, callWithResponse, callWithResponseAndNoContentResponse, callWithResponses, callWithResultFromHeader, callWithWeirdParameterNames, collectionFormat, complexParams, complexTypes, deleteCallWithoutParametersAndResponse, deleteFoo, deprecatedCall, dummyA, dummyB, duplicateName, duplicateName2, duplicateName3, duplicateName4, export_, fileResponse, fooWow, getApiVbyApiVersionSimpleOperation, getCallWithOptionalParam, getCallWithoutParametersAndResponse, headCallWithoutParametersAndResponse, import_, multipartRequest, multipartResponse, nonAsciiæøåÆøÅöôêÊ字符串, type Options, optionsCallWithoutParametersAndResponse, patchApiVbyApiVersionNoTag, patchCallWithoutParametersAndResponse, postApiVbyApiVersionFormData, postApiVbyApiVersionRequestBody, postCallWithOptionalParam, postCallWithoutParametersAndResponse, putCallWithoutParametersAndResponse, putWithFormUrlEncoded, testErrorCode, types, uploadFile } from './sdk.gen';\nexport type { _3eNum1Период, _400, AdditionalPropertiesIntegerIssue, AdditionalPropertiesUnknownIssue, AdditionalPropertiesUnknownIssue2, AdditionalPropertiesUnknownIssue3, AdditionalPropertiesUnknownIssueWritable, AnyOfAnyAndNull, AnyOfArrays, ApiVVersionODataControllerCountData, ApiVVersionODataControllerCountResponse, ApiVVersionODataControllerCountResponses, ArrayWithAnyOfProperties, ArrayWithArray, ArrayWithBooleans, ArrayWithNumbers, ArrayWithProperties, ArrayWithReferences, ArrayWithStrings, CallToTestOrderOfParamsData, CallWithDefaultOptionalParametersData, CallWithDefaultParametersData, CallWithDescriptionsData, CallWithDuplicateResponsesData, CallWithDuplicateResponsesError, CallWithDuplicateResponsesErrors, CallWithDuplicateResponsesResponse, CallWithDuplicateResponsesResponses, CallWithNoContentResponseData, CallWithNoContentResponseResponse, CallWithNoContentResponseResponses, CallWithParametersData, CallWithResponseAndNoContentResponseData, CallWithResponseAndNoContentResponseResponse, CallWithResponseAndNoContentResponseResponses, CallWithResponseData, CallWithResponseResponse, CallWithResponseResponses, CallWithResponsesData, CallWithResponsesError, CallWithResponsesErrors, CallWithResponsesResponse, CallWithResponsesResponses, CallWithResultFromHeaderData, CallWithResultFromHeaderErrors, CallWithResultFromHeaderResponses, CallWithWeirdParameterNamesData, CamelCaseCommentWithBreaks, CharactersInDescription, ClientOptions, CollectionFormatData, CommentWithBackticks, CommentWithBackticksAndQuotes, CommentWithBreaks, CommentWithExpressionPlaceholders, CommentWithQuotes, CommentWithReservedCharacters, CommentWithSlashes, ComplexParamsData, ComplexParamsResponse, ComplexParamsResponses, ComplexTypesData, ComplexTypesErrors, ComplexTypesResponse, ComplexTypesResponses, CompositionBaseModel, CompositionExtendedModel, CompositionWithAllOfAndNullable, CompositionWithAnyOf, CompositionWithAnyOfAndNullable, CompositionWithAnyOfAnonymous, CompositionWithNestedAnyAndTypeNull, CompositionWithNestedAnyOfAndNull, CompositionWithOneOf, CompositionWithOneOfAndComplexArrayDictionary, CompositionWithOneOfAndNullable, CompositionWithOneOfAndProperties, CompositionWithOneOfAndSimpleArrayDictionary, CompositionWithOneOfAndSimpleDictionary, CompositionWithOneOfAnonymous, CompositionWithOneOfDiscriminator, ConstValue, Default, DeleteCallWithoutParametersAndResponseData, DeleteFooData, DeleteFooData2, DeleteFooData3, DeprecatedCallData, DeprecatedModel, DictionaryWithArray, DictionaryWithDictionary, DictionaryWithProperties, DictionaryWithPropertiesAndAdditionalProperties, DictionaryWithReference, DictionaryWithString, DummyAData, DummyAResponse, DummyAResponses, DummyBData, DummyBResponse, DummyBResponses, DuplicateName2Data, DuplicateName3Data, DuplicateName4Data, DuplicateNameData, EnumFromDescription, EnumWithExtensions, EnumWithNumbers, EnumWithReplacedCharacters, EnumWithStrings, EnumWithXEnumNames, ExportData, ExternalRefA, ExternalRefB, ExternalSharedModel, File, FileResponseData, FileResponseResponse, FileResponseResponses, FileWritable, FooWowData, FooWowResponses, FreeFormObjectWithAdditionalPropertiesEqEmptyObject, FreeFormObjectWithAdditionalPropertiesEqTrue, FreeFormObjectWithoutAdditionalProperties, GenericSchemaDuplicateIssue1SystemBoolean, GenericSchemaDuplicateIssue1SystemBooleanWritable, GenericSchemaDuplicateIssue1SystemString, GenericSchemaDuplicateIssue1SystemStringWritable, GetApiVbyApiVersionSimpleOperationData, GetApiVbyApiVersionSimpleOperationError, GetApiVbyApiVersionSimpleOperationErrors, GetApiVbyApiVersionSimpleOperationResponse, GetApiVbyApiVersionSimpleOperationResponses, GetCallWithOptionalParamData, GetCallWithoutParametersAndResponseData, HeadCallWithoutParametersAndResponseData, Import, ImportData, ImportResponse, ImportResponses, IoK8sApimachineryPkgApisMetaV1DeleteOptions, IoK8sApimachineryPkgApisMetaV1Preconditions, ModelCircle, ModelFromZendesk, ModelSquare, ModelThatExtends, ModelThatExtendsExtends, ModelWithAdditionalPropertiesEqTrue, ModelWithAdditionalPropertiesRef, ModelWithAnyOfConstantSizeArray, ModelWithAnyOfConstantSizeArrayAndIntersect, ModelWithAnyOfConstantSizeArrayNullable, ModelWithAnyOfConstantSizeArrayWithNSizeAndOptions, ModelWithAnyOfConstantSizeArrayWithNSizeAndOptionsWritable, ModelWithArray, ModelWithArrayReadOnlyAndWriteOnly, ModelWithArrayReadOnlyAndWriteOnlyWritable, ModelWithBackticksInDescription, ModelWithBoolean, ModelWithCircularReference, ModelWithConst, ModelWithConstantSizeArray, ModelWithDictionary, ModelWithDuplicateImports, ModelWithDuplicateProperties, ModelWithEnum, ModelWithEnumFromDescription, ModelWithEnumWithHyphen, ModelWithInteger, ModelWithNestedArrayEnums, ModelWithNestedArrayEnumsData, ModelWithNestedArrayEnumsDataBar, ModelWithNestedArrayEnumsDataFoo, ModelWithNestedCompositionEnums, ModelWithNestedEnums, ModelWithNestedProperties, ModelWithNullableObject, ModelWithNullableString, ModelWithNumericEnumUnion, ModelWithOneOfAndProperties, ModelWithOneOfEnum, ModelWithOrderedProperties, ModelWithPattern, ModelWithPatternWritable, ModelWithPrefixItemsConstantSizeArray, ModelWithProperties, ModelWithPropertiesWritable, ModelWithReadOnlyAndWriteOnly, ModelWithReadOnlyAndWriteOnlyWritable, ModelWithReference, ModelWithReferenceWritable, ModelWithString, ModelWithStringError, MultipartRequestData, MultipartResponseData, MultipartResponseResponse, MultipartResponseResponses, NestedAnyOfArraysNullable, NonAsciiæøåÆøÅöôêÊ字符串Data, NonAsciiæøåÆøÅöôêÊ字符串Response, NonAsciiæøåÆøÅöôêÊ字符串Responses, NonAsciiStringæøåÆøÅöôêÊ字符串, NullableObject, OneOfAllOfIssue, OneOfAllOfIssueWritable, OptionsCallWithoutParametersAndResponseData, Pageable, ParameterSimpleParameterUnused, PatchApiVbyApiVersionNoTagData, PatchApiVbyApiVersionNoTagResponses, PatchCallWithoutParametersAndResponseData, PostApiVbyApiVersionFormDataData, PostApiVbyApiVersionRequestBodyData, PostCallWithOptionalParamData, PostCallWithOptionalParamResponse, PostCallWithOptionalParamResponses, PostCallWithoutParametersAndResponseData, PostServiceWithEmptyTagResponse, PostServiceWithEmptyTagResponse2, PutCallWithoutParametersAndResponseData, PutWithFormUrlEncodedData, SchemaWithFormRestrictedKeys, SimpleBoolean, SimpleFile, SimpleFormData, SimpleInteger, SimpleParameter, SimpleReference, SimpleRequestBody, SimpleString, SimpleStringWithPattern, TestErrorCodeData, TestErrorCodeErrors, TestErrorCodeResponses, TypesData, TypesResponse, TypesResponses, UploadFileData, UploadFileResponse, UploadFileResponses, XFooBar } from './types.gen';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-axios/default/sdk.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport { type Client, formDataBodySerializer, type Options as Options2, type TDataShape, urlSearchParamsBodySerializer } from './client';\nimport { client } from './client.gen';\nimport type { ApiVVersionODataControllerCountData, ApiVVersionODataControllerCountResponses, CallToTestOrderOfParamsData, CallWithDefaultOptionalParametersData, CallWithDefaultParametersData, CallWithDescriptionsData, CallWithDuplicateResponsesData, CallWithDuplicateResponsesErrors, CallWithDuplicateResponsesResponses, CallWithNoContentResponseData, CallWithNoContentResponseResponses, CallWithParametersData, CallWithResponseAndNoContentResponseData, CallWithResponseAndNoContentResponseResponses, CallWithResponseData, CallWithResponseResponses, CallWithResponsesData, CallWithResponsesErrors, CallWithResponsesResponses, CallWithResultFromHeaderData, CallWithResultFromHeaderErrors, CallWithResultFromHeaderResponses, CallWithWeirdParameterNamesData, CollectionFormatData, ComplexParamsData, ComplexParamsResponses, ComplexTypesData, ComplexTypesErrors, ComplexTypesResponses, DeleteCallWithoutParametersAndResponseData, DeleteFooData3, DeprecatedCallData, DummyAData, DummyAResponses, DummyBData, DummyBResponses, DuplicateName2Data, DuplicateName3Data, DuplicateName4Data, DuplicateNameData, ExportData, FileResponseData, FileResponseResponses, FooWowData, FooWowResponses, GetApiVbyApiVersionSimpleOperationData, GetApiVbyApiVersionSimpleOperationErrors, GetApiVbyApiVersionSimpleOperationResponses, GetCallWithOptionalParamData, GetCallWithoutParametersAndResponseData, HeadCallWithoutParametersAndResponseData, ImportData, ImportResponses, MultipartRequestData, MultipartResponseData, MultipartResponseResponses, NonAsciiæøåÆøÅöôêÊ字符串Data, NonAsciiæøåÆøÅöôêÊ字符串Responses, OptionsCallWithoutParametersAndResponseData, PatchApiVbyApiVersionNoTagData, PatchApiVbyApiVersionNoTagResponses, PatchCallWithoutParametersAndResponseData, PostApiVbyApiVersionFormDataData, PostApiVbyApiVersionRequestBodyData, PostCallWithOptionalParamData, PostCallWithOptionalParamResponses, PostCallWithoutParametersAndResponseData, PutCallWithoutParametersAndResponseData, PutWithFormUrlEncodedData, TestErrorCodeData, TestErrorCodeErrors, TestErrorCodeResponses, TypesData, TypesResponses, UploadFileData, UploadFileResponses } from './types.gen';\n\nexport type Options<TData extends TDataShape = TDataShape, ThrowOnError extends boolean = boolean> = Options2<TData, ThrowOnError> & {\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\nexport const export_ = <ThrowOnError extends boolean = false>(options?: Options<ExportData, ThrowOnError>) => (options?.client ?? client).get<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/no+tag', ...options });\n\nexport const patchApiVbyApiVersionNoTag = <ThrowOnError extends boolean = false>(options?: Options<PatchApiVbyApiVersionNoTagData, ThrowOnError>) => (options?.client ?? client).patch<PatchApiVbyApiVersionNoTagResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/no+tag', ...options });\n\nexport const import_ = <ThrowOnError extends boolean = false>(options: Options<ImportData, ThrowOnError>) => (options.client ?? client).post<ImportResponses, unknown, ThrowOnError>({\n    responseType: 'json',\n    url: '/api/v{api-version}/no+tag',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options.headers\n    }\n});\n\nexport const fooWow = <ThrowOnError extends boolean = false>(options?: Options<FooWowData, ThrowOnError>) => (options?.client ?? client).put<FooWowResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/no+tag', ...options });\n\nexport const apiVVersionODataControllerCount = <ThrowOnError extends boolean = false>(options?: Options<ApiVVersionODataControllerCountData, ThrowOnError>) => (options?.client ?? client).get<ApiVVersionODataControllerCountResponses, unknown, ThrowOnError>({\n    responseType: 'json',\n    url: '/api/v{api-version}/simple/$count',\n    ...options\n});\n\nexport const getApiVbyApiVersionSimpleOperation = <ThrowOnError extends boolean = false>(options: Options<GetApiVbyApiVersionSimpleOperationData, ThrowOnError>) => (options.client ?? client).get<GetApiVbyApiVersionSimpleOperationResponses, GetApiVbyApiVersionSimpleOperationErrors, ThrowOnError>({\n    responseType: 'json',\n    url: '/api/v{api-version}/simple:operation',\n    ...options\n});\n\nexport const deleteCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<DeleteCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).delete<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const getCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<GetCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).get<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const headCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<HeadCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).head<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const optionsCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<OptionsCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).options<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const patchCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<PatchCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).patch<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const postCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<PostCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).post<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const putCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<PutCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).put<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const deleteFoo = <ThrowOnError extends boolean = false>(options: Options<DeleteFooData3, ThrowOnError>) => (options.client ?? client).delete<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/foo/{foo_param}/bar/{BarParam}', ...options });\n\nexport const callWithDescriptions = <ThrowOnError extends boolean = false>(options?: Options<CallWithDescriptionsData, ThrowOnError>) => (options?.client ?? client).post<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/descriptions', ...options });\n\n/**\n * @deprecated\n */\nexport const deprecatedCall = <ThrowOnError extends boolean = false>(options: Options<DeprecatedCallData, ThrowOnError>) => (options.client ?? client).post<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/parameters/deprecated', ...options });\n\nexport const callWithParameters = <ThrowOnError extends boolean = false>(options: Options<CallWithParametersData, ThrowOnError>) => (options.client ?? client).post<unknown, unknown, ThrowOnError>({\n    url: '/api/v{api-version}/parameters/{parameterPath}',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options.headers\n    }\n});\n\nexport const callWithWeirdParameterNames = <ThrowOnError extends boolean = false>(options: Options<CallWithWeirdParameterNamesData, ThrowOnError>) => (options.client ?? client).post<unknown, unknown, ThrowOnError>({\n    url: '/api/v{api-version}/parameters/{parameter.path.1}/{parameter-path-2}/{PARAMETER-PATH-3}',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options.headers\n    }\n});\n\nexport const getCallWithOptionalParam = <ThrowOnError extends boolean = false>(options: Options<GetCallWithOptionalParamData, ThrowOnError>) => (options.client ?? client).get<unknown, unknown, ThrowOnError>({\n    url: '/api/v{api-version}/parameters',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options.headers\n    }\n});\n\nexport const postCallWithOptionalParam = <ThrowOnError extends boolean = false>(options: Options<PostCallWithOptionalParamData, ThrowOnError>) => (options.client ?? client).post<PostCallWithOptionalParamResponses, unknown, ThrowOnError>({\n    responseType: 'json',\n    url: '/api/v{api-version}/parameters',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options.headers\n    }\n});\n\nexport const postApiVbyApiVersionRequestBody = <ThrowOnError extends boolean = false>(options?: Options<PostApiVbyApiVersionRequestBodyData, ThrowOnError>) => (options?.client ?? client).post<unknown, unknown, ThrowOnError>({\n    url: '/api/v{api-version}/requestBody',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options?.headers\n    }\n});\n\nexport const postApiVbyApiVersionFormData = <ThrowOnError extends boolean = false>(options?: Options<PostApiVbyApiVersionFormDataData, ThrowOnError>) => (options?.client ?? client).post<unknown, unknown, ThrowOnError>({\n    ...formDataBodySerializer,\n    url: '/api/v{api-version}/formData',\n    ...options,\n    headers: {\n        'Content-Type': null,\n        ...options?.headers\n    }\n});\n\nexport const callWithDefaultParameters = <ThrowOnError extends boolean = false>(options?: Options<CallWithDefaultParametersData, ThrowOnError>) => (options?.client ?? client).get<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/defaults', ...options });\n\nexport const callWithDefaultOptionalParameters = <ThrowOnError extends boolean = false>(options?: Options<CallWithDefaultOptionalParametersData, ThrowOnError>) => (options?.client ?? client).post<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/defaults', ...options });\n\nexport const callToTestOrderOfParams = <ThrowOnError extends boolean = false>(options: Options<CallToTestOrderOfParamsData, ThrowOnError>) => (options.client ?? client).put<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/defaults', ...options });\n\nexport const duplicateName = <ThrowOnError extends boolean = false>(options?: Options<DuplicateNameData, ThrowOnError>) => (options?.client ?? client).delete<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/duplicate', ...options });\n\nexport const duplicateName2 = <ThrowOnError extends boolean = false>(options?: Options<DuplicateName2Data, ThrowOnError>) => (options?.client ?? client).get<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/duplicate', ...options });\n\nexport const duplicateName3 = <ThrowOnError extends boolean = false>(options?: Options<DuplicateName3Data, ThrowOnError>) => (options?.client ?? client).post<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/duplicate', ...options });\n\nexport const duplicateName4 = <ThrowOnError extends boolean = false>(options?: Options<DuplicateName4Data, ThrowOnError>) => (options?.client ?? client).put<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/duplicate', ...options });\n\nexport const callWithNoContentResponse = <ThrowOnError extends boolean = false>(options?: Options<CallWithNoContentResponseData, ThrowOnError>) => (options?.client ?? client).get<CallWithNoContentResponseResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/no-content', ...options });\n\nexport const callWithResponseAndNoContentResponse = <ThrowOnError extends boolean = false>(options?: Options<CallWithResponseAndNoContentResponseData, ThrowOnError>) => (options?.client ?? client).get<CallWithResponseAndNoContentResponseResponses, unknown, ThrowOnError>({\n    responseType: 'json',\n    url: '/api/v{api-version}/multiple-tags/response-and-no-content',\n    ...options\n});\n\nexport const dummyA = <ThrowOnError extends boolean = false>(options?: Options<DummyAData, ThrowOnError>) => (options?.client ?? client).get<DummyAResponses, unknown, ThrowOnError>({\n    responseType: 'json',\n    url: '/api/v{api-version}/multiple-tags/a',\n    ...options\n});\n\nexport const dummyB = <ThrowOnError extends boolean = false>(options?: Options<DummyBData, ThrowOnError>) => (options?.client ?? client).get<DummyBResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/multiple-tags/b', ...options });\n\nexport const callWithResponse = <ThrowOnError extends boolean = false>(options?: Options<CallWithResponseData, ThrowOnError>) => (options?.client ?? client).get<CallWithResponseResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/response', ...options });\n\nexport const callWithDuplicateResponses = <ThrowOnError extends boolean = false>(options?: Options<CallWithDuplicateResponsesData, ThrowOnError>) => (options?.client ?? client).post<CallWithDuplicateResponsesResponses, CallWithDuplicateResponsesErrors, ThrowOnError>({\n    responseType: 'json',\n    url: '/api/v{api-version}/response',\n    ...options\n});\n\nexport const callWithResponses = <ThrowOnError extends boolean = false>(options?: Options<CallWithResponsesData, ThrowOnError>) => (options?.client ?? client).put<CallWithResponsesResponses, CallWithResponsesErrors, ThrowOnError>({\n    responseType: 'json',\n    url: '/api/v{api-version}/response',\n    ...options\n});\n\nexport const collectionFormat = <ThrowOnError extends boolean = false>(options: Options<CollectionFormatData, ThrowOnError>) => (options.client ?? client).get<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/collectionFormat', ...options });\n\nexport const types = <ThrowOnError extends boolean = false>(options: Options<TypesData, ThrowOnError>) => (options.client ?? client).get<TypesResponses, unknown, ThrowOnError>({\n    responseType: 'json',\n    url: '/api/v{api-version}/types',\n    ...options\n});\n\nexport const uploadFile = <ThrowOnError extends boolean = false>(options: Options<UploadFileData, ThrowOnError>) => (options.client ?? client).post<UploadFileResponses, unknown, ThrowOnError>({\n    ...urlSearchParamsBodySerializer,\n    responseType: 'json',\n    url: '/api/v{api-version}/upload',\n    ...options,\n    headers: {\n        'Content-Type': 'application/x-www-form-urlencoded',\n        ...options.headers\n    }\n});\n\nexport const fileResponse = <ThrowOnError extends boolean = false>(options: Options<FileResponseData, ThrowOnError>) => (options.client ?? client).get<FileResponseResponses, unknown, ThrowOnError>({\n    responseType: 'blob',\n    url: '/api/v{api-version}/file/{id}',\n    ...options\n});\n\nexport const complexTypes = <ThrowOnError extends boolean = false>(options: Options<ComplexTypesData, ThrowOnError>) => (options.client ?? client).get<ComplexTypesResponses, ComplexTypesErrors, ThrowOnError>({\n    querySerializer: { parameters: { parameterObject: { object: { style: 'form' } } } },\n    responseType: 'json',\n    url: '/api/v{api-version}/complex',\n    ...options\n});\n\nexport const multipartResponse = <ThrowOnError extends boolean = false>(options?: Options<MultipartResponseData, ThrowOnError>) => (options?.client ?? client).get<MultipartResponseResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/multipart', ...options });\n\nexport const multipartRequest = <ThrowOnError extends boolean = false>(options?: Options<MultipartRequestData, ThrowOnError>) => (options?.client ?? client).post<unknown, unknown, ThrowOnError>({\n    ...formDataBodySerializer,\n    url: '/api/v{api-version}/multipart',\n    ...options,\n    headers: {\n        'Content-Type': null,\n        ...options?.headers\n    }\n});\n\nexport const complexParams = <ThrowOnError extends boolean = false>(options: Options<ComplexParamsData, ThrowOnError>) => (options.client ?? client).put<ComplexParamsResponses, unknown, ThrowOnError>({\n    responseType: 'json',\n    url: '/api/v{api-version}/complex/{id}',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json-patch+json',\n        ...options.headers\n    }\n});\n\nexport const callWithResultFromHeader = <ThrowOnError extends boolean = false>(options?: Options<CallWithResultFromHeaderData, ThrowOnError>) => (options?.client ?? client).post<CallWithResultFromHeaderResponses, CallWithResultFromHeaderErrors, ThrowOnError>({ url: '/api/v{api-version}/header', ...options });\n\nexport const testErrorCode = <ThrowOnError extends boolean = false>(options: Options<TestErrorCodeData, ThrowOnError>) => (options.client ?? client).post<TestErrorCodeResponses, TestErrorCodeErrors, ThrowOnError>({ url: '/api/v{api-version}/error', ...options });\n\nexport const nonAsciiæøåÆøÅöôêÊ字符串 = <ThrowOnError extends boolean = false>(options: Options<NonAsciiæøåÆøÅöôêÊ字符串Data, ThrowOnError>) => (options.client ?? client).post<NonAsciiæøåÆøÅöôêÊ字符串Responses, unknown, ThrowOnError>({\n    responseType: 'json',\n    url: '/api/v{api-version}/non-ascii-æøåÆØÅöôêÊ字符串',\n    ...options\n});\n\n/**\n * Login User\n */\nexport const putWithFormUrlEncoded = <ThrowOnError extends boolean = false>(options: Options<PutWithFormUrlEncodedData, ThrowOnError>) => (options.client ?? client).put<unknown, unknown, ThrowOnError>({\n    ...urlSearchParamsBodySerializer,\n    url: '/api/v{api-version}/non-ascii-æøåÆØÅöôêÊ字符串',\n    ...options,\n    headers: {\n        'Content-Type': 'application/x-www-form-urlencoded',\n        ...options.headers\n    }\n});\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-axios/default/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type ClientOptions = {\n    baseURL: 'http://localhost:3000/base' | (string & {});\n};\n\n/**\n * Model with number-only name\n */\nexport type _400 = string;\n\n/**\n * External ref to shared model (A)\n */\nexport type ExternalRefA = ExternalSharedModel;\n\n/**\n * External ref to shared model (B)\n */\nexport type ExternalRefB = ExternalSharedModel;\n\n/**\n * Testing multiline comments in string: First line\n * Second line\n *\n * Fourth line\n */\nexport type CamelCaseCommentWithBreaks = number;\n\n/**\n * Testing multiline comments in string: First line\n * Second line\n *\n * Fourth line\n */\nexport type CommentWithBreaks = number;\n\n/**\n * Testing backticks in string: `backticks` and ```multiple backticks``` should work\n */\nexport type CommentWithBackticks = number;\n\n/**\n * Testing backticks and quotes in string: `backticks`, 'quotes', \"double quotes\" and ```multiple backticks``` should work\n */\nexport type CommentWithBackticksAndQuotes = number;\n\n/**\n * Testing slashes in string: \\backwards\\\\\\ and /forwards/// should work\n */\nexport type CommentWithSlashes = number;\n\n/**\n * Testing expression placeholders in string: ${expression} should work\n */\nexport type CommentWithExpressionPlaceholders = number;\n\n/**\n * Testing quotes in string: 'single quote''' and \"double quotes\"\"\" should work\n */\nexport type CommentWithQuotes = number;\n\n/**\n * Testing reserved characters in string: * inline * and ** inline ** should work\n */\nexport type CommentWithReservedCharacters = number;\n\n/**\n * This is a simple number\n */\nexport type SimpleInteger = number;\n\n/**\n * This is a simple boolean\n */\nexport type SimpleBoolean = boolean;\n\n/**\n * This is a simple string\n */\nexport type SimpleString = string;\n\n/**\n * A string with non-ascii (unicode) characters valid in typescript identifiers (æøåÆØÅöÔèÈ字符串)\n */\nexport type NonAsciiStringæøåÆøÅöôêÊ字符串 = string;\n\n/**\n * This is a simple file\n */\nexport type SimpleFile = Blob | File;\n\n/**\n * This is a simple reference\n */\nexport type SimpleReference = ModelWithString;\n\n/**\n * This is a simple string\n */\nexport type SimpleStringWithPattern = string | null;\n\n/**\n * This is a simple enum with strings\n */\nexport type EnumWithStrings = 'Success' | 'Warning' | 'Error' | '\\'Single Quote\\'' | '\"Double Quotes\"' | 'Non-ascii: øæåôöØÆÅÔÖ字符串';\n\nexport type EnumWithReplacedCharacters = '\\'Single Quote\\'' | '\"Double Quotes\"' | 'øæåôöØÆÅÔÖ字符串' | 3.1 | '';\n\n/**\n * This is a simple enum with numbers\n */\nexport type EnumWithNumbers = 1 | 2 | 3 | 1.1 | 1.2 | 1.3 | 100 | 200 | 300 | -100 | -200 | -300 | -1.1 | -1.2 | -1.3;\n\n/**\n * Success=1,Warning=2,Error=3\n */\nexport type EnumFromDescription = number;\n\n/**\n * This is a simple enum with numbers\n */\nexport type EnumWithExtensions = 200 | 400 | 500;\n\nexport type EnumWithXEnumNames = 0 | 1 | 2;\n\n/**\n * This is a simple array with numbers\n */\nexport type ArrayWithNumbers = Array<number>;\n\n/**\n * This is a simple array with booleans\n */\nexport type ArrayWithBooleans = Array<boolean>;\n\n/**\n * This is a simple array with strings\n */\nexport type ArrayWithStrings = Array<string>;\n\n/**\n * This is a simple array with references\n */\nexport type ArrayWithReferences = Array<ModelWithString>;\n\n/**\n * This is a simple array containing an array\n */\nexport type ArrayWithArray = Array<Array<ModelWithString>>;\n\n/**\n * This is a simple array with properties\n */\nexport type ArrayWithProperties = Array<{\n    '16x16'?: CamelCaseCommentWithBreaks;\n    bar?: string;\n}>;\n\n/**\n * This is a simple array with any of properties\n */\nexport type ArrayWithAnyOfProperties = Array<{\n    foo?: string;\n} | {\n    bar?: string;\n}>;\n\nexport type AnyOfAnyAndNull = {\n    data?: unknown | null;\n};\n\n/**\n * This is a simple array with any of properties\n */\nexport type AnyOfArrays = {\n    results?: Array<{\n        foo?: string;\n    } | {\n        bar?: string;\n    }>;\n};\n\n/**\n * This is a string dictionary\n */\nexport type DictionaryWithString = {\n    [key: string]: string;\n};\n\nexport type DictionaryWithPropertiesAndAdditionalProperties = {\n    foo?: number;\n    bar?: boolean;\n    [key: string]: string | number | boolean | undefined;\n};\n\n/**\n * This is a string reference\n */\nexport type DictionaryWithReference = {\n    [key: string]: ModelWithString;\n};\n\n/**\n * This is a complex dictionary\n */\nexport type DictionaryWithArray = {\n    [key: string]: Array<ModelWithString>;\n};\n\n/**\n * This is a string dictionary\n */\nexport type DictionaryWithDictionary = {\n    [key: string]: {\n        [key: string]: string;\n    };\n};\n\n/**\n * This is a complex dictionary\n */\nexport type DictionaryWithProperties = {\n    [key: string]: {\n        foo?: string;\n        bar?: string;\n    };\n};\n\n/**\n * This is a model with one number property\n */\nexport type ModelWithInteger = {\n    /**\n     * This is a simple number property\n     */\n    prop?: number;\n};\n\n/**\n * This is a model with one boolean property\n */\nexport type ModelWithBoolean = {\n    /**\n     * This is a simple boolean property\n     */\n    prop?: boolean;\n};\n\n/**\n * This is a model with one string property\n */\nexport type ModelWithString = {\n    /**\n     * This is a simple string property\n     */\n    prop?: string;\n};\n\n/**\n * This is a model with one string property\n */\nexport type ModelWithStringError = {\n    /**\n     * This is a simple string property\n     */\n    prop?: string;\n};\n\n/**\n * `Comment` or `VoiceComment`. The JSON object for adding voice comments to tickets is different. See [Adding voice comments to tickets](/documentation/ticketing/managing-tickets/adding-voice-comments-to-tickets)\n */\nexport type ModelFromZendesk = string;\n\n/**\n * This is a model with one string property\n */\nexport type ModelWithNullableString = {\n    /**\n     * This is a simple string property\n     */\n    nullableProp1?: string | null;\n    /**\n     * This is a simple string property\n     */\n    nullableRequiredProp1: string | null;\n    /**\n     * This is a simple string property\n     */\n    nullableProp2?: string | null;\n    /**\n     * This is a simple string property\n     */\n    nullableRequiredProp2: string | null;\n    /**\n     * This is a simple enum with strings\n     */\n    'foo_bar-enum'?: 'Success' | 'Warning' | 'Error' | 'ØÆÅ字符串';\n};\n\n/**\n * This is a model with one enum\n */\nexport type ModelWithEnum = {\n    /**\n     * This is a simple enum with strings\n     */\n    'foo_bar-enum'?: 'Success' | 'Warning' | 'Error' | 'ØÆÅ字符串';\n    /**\n     * These are the HTTP error code enums\n     */\n    statusCode?: '100' | '200 FOO' | '300 FOO_BAR' | '400 foo-bar' | '500 foo.bar' | '600 foo&bar';\n    /**\n     * Simple boolean enum\n     */\n    bool?: true;\n};\n\n/**\n * This is a model with one enum with escaped name\n */\nexport type ModelWithEnumWithHyphen = {\n    /**\n     * Foo-Bar-Baz-Qux\n     */\n    'foo-bar-baz-qux'?: '3.0';\n};\n\n/**\n * This is a model with one enum\n */\nexport type ModelWithEnumFromDescription = {\n    /**\n     * Success=1,Warning=2,Error=3\n     */\n    test?: number;\n};\n\n/**\n * This is a model with nested enums\n */\nexport type ModelWithNestedEnums = {\n    dictionaryWithEnum?: {\n        [key: string]: 'Success' | 'Warning' | 'Error';\n    };\n    dictionaryWithEnumFromDescription?: {\n        [key: string]: number;\n    };\n    arrayWithEnum?: Array<'Success' | 'Warning' | 'Error'>;\n    arrayWithDescription?: Array<number>;\n    /**\n     * This is a simple enum with strings\n     */\n    'foo_bar-enum'?: 'Success' | 'Warning' | 'Error' | 'ØÆÅ字符串';\n};\n\n/**\n * This is a model with one property containing a reference\n */\nexport type ModelWithReference = {\n    prop?: ModelWithProperties;\n};\n\n/**\n * This is a model with one property containing an array\n */\nexport type ModelWithArrayReadOnlyAndWriteOnly = {\n    prop?: Array<ModelWithReadOnlyAndWriteOnly>;\n    propWithFile?: Array<Blob | File>;\n    propWithNumber?: Array<number>;\n};\n\n/**\n * This is a model with one property containing an array\n */\nexport type ModelWithArray = {\n    prop?: Array<ModelWithString>;\n    propWithFile?: Array<Blob | File>;\n    propWithNumber?: Array<number>;\n};\n\n/**\n * This is a model with one property containing a dictionary\n */\nexport type ModelWithDictionary = {\n    prop?: {\n        [key: string]: string;\n    };\n};\n\n/**\n * This is a deprecated model with a deprecated property\n *\n * @deprecated\n */\nexport type DeprecatedModel = {\n    /**\n     * This is a deprecated property\n     *\n     * @deprecated\n     */\n    prop?: string;\n};\n\n/**\n * This is a model with one property containing a circular reference\n */\nexport type ModelWithCircularReference = {\n    prop?: ModelWithCircularReference;\n};\n\n/**\n * This is a model with one property with a 'one of' relationship\n */\nexport type CompositionWithOneOf = {\n    propA?: ModelWithString | ModelWithEnum | ModelWithArray | ModelWithDictionary;\n};\n\n/**\n * This is a model with one property with a 'one of' relationship where the options are not $ref\n */\nexport type CompositionWithOneOfAnonymous = {\n    propA?: {\n        propA?: string;\n    } | string | number;\n};\n\n/**\n * Circle\n */\nexport type ModelCircle = {\n    kind: string;\n    radius?: number;\n};\n\n/**\n * Square\n */\nexport type ModelSquare = {\n    kind: string;\n    sideLength?: number;\n};\n\n/**\n * This is a model with one property with a 'one of' relationship where the options are not $ref\n */\nexport type CompositionWithOneOfDiscriminator = ({\n    kind: 'circle';\n} & ModelCircle) | ({\n    kind: 'square';\n} & ModelSquare);\n\n/**\n * This is a model with one property with a 'any of' relationship\n */\nexport type CompositionWithAnyOf = {\n    propA?: ModelWithString | ModelWithEnum | ModelWithArray | ModelWithDictionary;\n};\n\n/**\n * This is a model with one property with a 'any of' relationship where the options are not $ref\n */\nexport type CompositionWithAnyOfAnonymous = {\n    propA?: {\n        propA?: string;\n    } | string | number;\n};\n\n/**\n * This is a model with nested 'any of' property with a type null\n */\nexport type CompositionWithNestedAnyAndTypeNull = {\n    propA?: Array<ModelWithDictionary | null> | Array<ModelWithArray | null>;\n};\n\nexport type _3eNum1Период = 'Bird' | 'Dog';\n\nexport type ConstValue = 'ConstValue';\n\n/**\n * This is a model with one property with a 'any of' relationship where the options are not $ref\n */\nexport type CompositionWithNestedAnyOfAndNull = {\n    /**\n     * Scopes\n     */\n    propA?: Array<_3eNum1Период | ConstValue> | null;\n};\n\n/**\n * This is a model with one property with a 'one of' relationship\n */\nexport type CompositionWithOneOfAndNullable = {\n    propA?: {\n        boolean?: boolean;\n    } | ModelWithEnum | ModelWithArray | ModelWithDictionary | null;\n};\n\n/**\n * This is a model that contains a simple dictionary within composition\n */\nexport type CompositionWithOneOfAndSimpleDictionary = {\n    propA?: boolean | {\n        [key: string]: number;\n    };\n};\n\n/**\n * This is a model that contains a dictionary of simple arrays within composition\n */\nexport type CompositionWithOneOfAndSimpleArrayDictionary = {\n    propA?: boolean | {\n        [key: string]: Array<boolean>;\n    };\n};\n\n/**\n * This is a model that contains a dictionary of complex arrays (composited) within composition\n */\nexport type CompositionWithOneOfAndComplexArrayDictionary = {\n    propA?: boolean | {\n        [key: string]: Array<number | string>;\n    };\n};\n\n/**\n * This is a model with one property with a 'all of' relationship\n */\nexport type CompositionWithAllOfAndNullable = {\n    propA?: ({\n        boolean?: boolean;\n    } & ModelWithEnum & ModelWithArray & ModelWithDictionary) | null;\n};\n\n/**\n * This is a model with one property with a 'any of' relationship\n */\nexport type CompositionWithAnyOfAndNullable = {\n    propA?: {\n        boolean?: boolean;\n    } | ModelWithEnum | ModelWithArray | ModelWithDictionary | null;\n};\n\n/**\n * This is a base model with two simple optional properties\n */\nexport type CompositionBaseModel = {\n    firstName?: string;\n    lastname?: string;\n};\n\n/**\n * This is a model that extends the base model\n */\nexport type CompositionExtendedModel = CompositionBaseModel & {\n    age: number;\n    firstName: string;\n    lastname: string;\n};\n\n/**\n * This is a model with one nested property\n */\nexport type ModelWithProperties = {\n    required: string;\n    readonly requiredAndReadOnly: string;\n    requiredAndNullable: string | null;\n    string?: string;\n    number?: number;\n    boolean?: boolean;\n    reference?: ModelWithString;\n    'property with space'?: string;\n    default?: string;\n    try?: string;\n    readonly '@namespace.string'?: string;\n    readonly '@namespace.integer'?: number;\n};\n\n/**\n * This is a model with one nested property\n */\nexport type ModelWithNestedProperties = {\n    readonly first: {\n        readonly second: {\n            readonly third: string | null;\n        } | null;\n    } | null;\n};\n\n/**\n * This is a model with duplicated properties\n */\nexport type ModelWithDuplicateProperties = {\n    prop?: ModelWithString;\n};\n\n/**\n * This is a model with ordered properties\n */\nexport type ModelWithOrderedProperties = {\n    zebra?: string;\n    apple?: string;\n    hawaii?: string;\n};\n\n/**\n * This is a model with duplicated imports\n */\nexport type ModelWithDuplicateImports = {\n    propA?: ModelWithString;\n    propB?: ModelWithString;\n    propC?: ModelWithString;\n};\n\n/**\n * This is a model that extends another model\n */\nexport type ModelThatExtends = ModelWithString & {\n    propExtendsA?: string;\n    propExtendsB?: ModelWithString;\n};\n\n/**\n * This is a model that extends another model\n */\nexport type ModelThatExtendsExtends = ModelWithString & ModelThatExtends & {\n    propExtendsC?: string;\n    propExtendsD?: ModelWithString;\n};\n\n/**\n * This is a model that contains a some patterns\n */\nexport type ModelWithPattern = {\n    key: string;\n    name: string;\n    readonly enabled?: boolean;\n    readonly modified?: string;\n    id?: string;\n    text?: string;\n    patternWithSingleQuotes?: string;\n    patternWithNewline?: string;\n    patternWithBacktick?: string;\n    patternWithUnicode?: string;\n};\n\nexport type File = {\n    /**\n     * Id\n     */\n    readonly id?: string;\n    /**\n     * Updated at\n     */\n    readonly updated_at?: string;\n    /**\n     * Created at\n     */\n    readonly created_at?: string;\n    /**\n     * Mime\n     */\n    mime: string;\n    /**\n     * File\n     */\n    readonly file?: string;\n};\n\nexport type Default = {\n    name?: string;\n};\n\nexport type Pageable = {\n    page?: number;\n    size?: number;\n    sort?: Array<string>;\n};\n\n/**\n * This is a free-form object without additionalProperties.\n */\nexport type FreeFormObjectWithoutAdditionalProperties = {\n    [key: string]: unknown;\n};\n\n/**\n * This is a free-form object with additionalProperties: true.\n */\nexport type FreeFormObjectWithAdditionalPropertiesEqTrue = {\n    [key: string]: unknown;\n};\n\n/**\n * This is a free-form object with additionalProperties: {}.\n */\nexport type FreeFormObjectWithAdditionalPropertiesEqEmptyObject = {\n    [key: string]: unknown;\n};\n\nexport type ModelWithConst = {\n    String?: 'String';\n    number?: 0;\n    null?: null;\n    withType?: 'Some string';\n};\n\n/**\n * This is a model with one property and additionalProperties: true\n */\nexport type ModelWithAdditionalPropertiesEqTrue = {\n    /**\n     * This is a simple string property\n     */\n    prop?: string;\n    [key: string]: unknown;\n};\n\nexport type NestedAnyOfArraysNullable = {\n    nullableArray?: Array<string | boolean> | null;\n};\n\nexport type CompositionWithOneOfAndProperties = ({\n    foo: SimpleParameter;\n} | {\n    bar: NonAsciiStringæøåÆøÅöôêÊ字符串;\n}) & {\n    baz: number | null;\n    qux: number;\n};\n\n/**\n * An object that can be null\n */\nexport type NullableObject = {\n    foo?: string;\n} | null;\n\n/**\n * Some % character\n */\nexport type CharactersInDescription = string;\n\nexport type ModelWithNullableObject = {\n    data?: NullableObject;\n};\n\n/**\n * An object with additional properties that can be null (anyOf ref + null)\n */\nexport type ModelWithAdditionalPropertiesRef = {\n    [key: string]: NullableObject | null;\n};\n\nexport type ModelWithOneOfEnum = {\n    foo: 'Bar';\n} | {\n    foo: 'Baz';\n} | {\n    foo: 'Qux';\n} | {\n    content: string;\n    foo: 'Quux';\n} | {\n    content: [\n        string,\n        string\n    ];\n    foo: 'Corge';\n};\n\nexport type ModelWithNestedArrayEnumsDataFoo = 'foo' | 'bar';\n\nexport type ModelWithNestedArrayEnumsDataBar = 'baz' | 'qux';\n\nexport type ModelWithNestedArrayEnumsData = {\n    foo?: Array<ModelWithNestedArrayEnumsDataFoo>;\n    bar?: Array<ModelWithNestedArrayEnumsDataBar>;\n};\n\nexport type ModelWithNestedArrayEnums = {\n    array_strings?: Array<string>;\n    data?: ModelWithNestedArrayEnumsData;\n};\n\nexport type ModelWithNestedCompositionEnums = {\n    foo?: ModelWithNestedArrayEnumsDataFoo;\n};\n\nexport type ModelWithReadOnlyAndWriteOnly = {\n    foo: string;\n    readonly bar: string;\n};\n\nexport type ModelWithConstantSizeArray = [\n    number,\n    number\n];\n\nexport type ModelWithAnyOfConstantSizeArray = [\n    number | string,\n    number | string,\n    number | string\n];\n\nexport type ModelWithPrefixItemsConstantSizeArray = [\n    ModelWithInteger,\n    number | string,\n    string\n];\n\nexport type ModelWithAnyOfConstantSizeArrayNullable = [\n    number | null | string,\n    number | null | string,\n    number | null | string\n];\n\nexport type ModelWithAnyOfConstantSizeArrayWithNSizeAndOptions = [\n    number | Import,\n    number | Import\n];\n\nexport type ModelWithAnyOfConstantSizeArrayAndIntersect = [\n    number & string,\n    number & string\n];\n\nexport type ModelWithNumericEnumUnion = {\n    /**\n     * Период\n     */\n    value?: -10 | -1 | 0 | 1 | 3 | 6 | 12;\n};\n\n/**\n * Some description with `back ticks`\n */\nexport type ModelWithBackticksInDescription = {\n    /**\n     * The template `that` should be used for parsing and importing the contents of the CSV file.\n     *\n     * <br/><p>There is one placeholder currently supported:<ul>     <li><b>${x}</b> - refers to the n-th column in the CSV file, e.g. ${1}, ${2}, ...)</li></ul><p>Example of a correct JSON template:</p>\n     * <pre>\n     * [\n     * {\n     * \"resourceType\": \"Asset\",\n     * \"identifier\": {\n     * \"name\": \"${1}\",\n     * \"domain\": {\n     * \"name\": \"${2}\",\n     * \"community\": {\n     * \"name\": \"Some Community\"\n     * }\n     * }\n     * },\n     * \"attributes\" : {\n     * \"00000000-0000-0000-0000-000000003115\" : [ {\n     * \"value\" : \"${3}\"\n     * } ],\n     * \"00000000-0000-0000-0000-000000000222\" : [ {\n     * \"value\" : \"${4}\"\n     * } ]\n     * }\n     * }\n     * ]\n     * </pre>\n     */\n    template?: string;\n};\n\nexport type ModelWithOneOfAndProperties = (SimpleParameter | NonAsciiStringæøåÆøÅöôêÊ字符串) & {\n    baz: number | null;\n    qux: number;\n};\n\n/**\n * Model used to test deduplication strategy (unused)\n */\nexport type ParameterSimpleParameterUnused = string;\n\n/**\n * Model used to test deduplication strategy\n */\nexport type PostServiceWithEmptyTagResponse = string;\n\n/**\n * Model used to test deduplication strategy\n */\nexport type PostServiceWithEmptyTagResponse2 = string;\n\n/**\n * Model used to test deduplication strategy\n */\nexport type DeleteFooData = string;\n\n/**\n * Model used to test deduplication strategy\n */\nexport type DeleteFooData2 = string;\n\n/**\n * Model with restricted keyword name\n */\nexport type Import = string;\n\nexport type SchemaWithFormRestrictedKeys = {\n    description?: string;\n    'x-enum-descriptions'?: string;\n    'x-enum-varnames'?: string;\n    'x-enumNames'?: string;\n    title?: string;\n    object?: {\n        description?: string;\n        'x-enum-descriptions'?: string;\n        'x-enum-varnames'?: string;\n        'x-enumNames'?: string;\n        title?: string;\n    };\n    array?: Array<{\n        description?: string;\n        'x-enum-descriptions'?: string;\n        'x-enum-varnames'?: string;\n        'x-enumNames'?: string;\n        title?: string;\n    }>;\n};\n\n/**\n * This schema was giving PascalCase transformations a hard time\n */\nexport type IoK8sApimachineryPkgApisMetaV1DeleteOptions = {\n    /**\n     * Must be fulfilled before a deletion is carried out. If not possible, a 409 Conflict status will be returned.\n     */\n    preconditions?: IoK8sApimachineryPkgApisMetaV1Preconditions;\n};\n\n/**\n * This schema was giving PascalCase transformations a hard time\n */\nexport type IoK8sApimachineryPkgApisMetaV1Preconditions = {\n    /**\n     * Specifies the target ResourceVersion\n     */\n    resourceVersion?: string;\n    /**\n     * Specifies the target UID.\n     */\n    uid?: string;\n};\n\nexport type AdditionalPropertiesUnknownIssue = {\n    [key: string]: string | number;\n};\n\nexport type AdditionalPropertiesUnknownIssue2 = {\n    [key: string]: string | number;\n};\n\nexport type AdditionalPropertiesUnknownIssue3 = string & {\n    entries: {\n        [key: string]: AdditionalPropertiesUnknownIssue;\n    };\n};\n\nexport type AdditionalPropertiesIntegerIssue = {\n    value: number;\n    [key: string]: number;\n};\n\nexport type OneOfAllOfIssue = ((ConstValue | GenericSchemaDuplicateIssue1SystemBoolean) & _3eNum1Период) | GenericSchemaDuplicateIssue1SystemString;\n\nexport type GenericSchemaDuplicateIssue1SystemBoolean = {\n    item?: boolean;\n    error?: string | null;\n    readonly hasError?: boolean;\n    data?: {\n        [key: string]: never;\n    };\n};\n\nexport type GenericSchemaDuplicateIssue1SystemString = {\n    item?: string | null;\n    error?: string | null;\n    readonly hasError?: boolean;\n};\n\nexport type ExternalSharedModel = {\n    id: string;\n    name?: string;\n};\n\n/**\n * This is a model with one property containing a reference\n */\nexport type ModelWithReferenceWritable = {\n    prop?: ModelWithPropertiesWritable;\n};\n\n/**\n * This is a model with one property containing an array\n */\nexport type ModelWithArrayReadOnlyAndWriteOnlyWritable = {\n    prop?: Array<ModelWithReadOnlyAndWriteOnlyWritable>;\n    propWithFile?: Array<Blob | File>;\n    propWithNumber?: Array<number>;\n};\n\n/**\n * This is a model with one nested property\n */\nexport type ModelWithPropertiesWritable = {\n    required: string;\n    requiredAndNullable: string | null;\n    string?: string;\n    number?: number;\n    boolean?: boolean;\n    reference?: ModelWithString;\n    'property with space'?: string;\n    default?: string;\n    try?: string;\n};\n\n/**\n * This is a model that contains a some patterns\n */\nexport type ModelWithPatternWritable = {\n    key: string;\n    name: string;\n    id?: string;\n    text?: string;\n    patternWithSingleQuotes?: string;\n    patternWithNewline?: string;\n    patternWithBacktick?: string;\n    patternWithUnicode?: string;\n};\n\nexport type FileWritable = {\n    /**\n     * Mime\n     */\n    mime: string;\n};\n\nexport type ModelWithReadOnlyAndWriteOnlyWritable = {\n    foo: string;\n    baz: string;\n};\n\nexport type ModelWithAnyOfConstantSizeArrayWithNSizeAndOptionsWritable = [\n    number | Import,\n    number | Import\n];\n\nexport type AdditionalPropertiesUnknownIssueWritable = {\n    [key: string]: string | number;\n};\n\nexport type OneOfAllOfIssueWritable = ((ConstValue | GenericSchemaDuplicateIssue1SystemBoolean) & _3eNum1Период) | GenericSchemaDuplicateIssue1SystemString;\n\nexport type GenericSchemaDuplicateIssue1SystemBooleanWritable = {\n    item?: boolean;\n    error?: string | null;\n    data?: {\n        [key: string]: never;\n    };\n};\n\nexport type GenericSchemaDuplicateIssue1SystemStringWritable = {\n    item?: string | null;\n    error?: string | null;\n};\n\n/**\n * This is a reusable parameter\n */\nexport type SimpleParameter = string;\n\n/**\n * Parameter with illegal characters\n */\nexport type XFooBar = ModelWithString;\n\n/**\n * A reusable request body\n */\nexport type SimpleRequestBody = ModelWithString;\n\n/**\n * A reusable request body\n */\nexport type SimpleFormData = ModelWithString;\n\nexport type ExportData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no+tag';\n};\n\nexport type PatchApiVbyApiVersionNoTagData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no+tag';\n};\n\nexport type PatchApiVbyApiVersionNoTagResponses = {\n    /**\n     * OK\n     */\n    default: unknown;\n};\n\nexport type ImportData = {\n    body: ModelWithReadOnlyAndWriteOnlyWritable | ModelWithArrayReadOnlyAndWriteOnlyWritable;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no+tag';\n};\n\nexport type ImportResponses = {\n    /**\n     * Success\n     */\n    200: ModelFromZendesk;\n    /**\n     * Default success response\n     */\n    default: ModelWithReadOnlyAndWriteOnly;\n};\n\nexport type ImportResponse = ImportResponses[keyof ImportResponses];\n\nexport type FooWowData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no+tag';\n};\n\nexport type FooWowResponses = {\n    /**\n     * OK\n     */\n    default: unknown;\n};\n\nexport type ApiVVersionODataControllerCountData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple/$count';\n};\n\nexport type ApiVVersionODataControllerCountResponses = {\n    /**\n     * Success\n     */\n    200: ModelFromZendesk;\n};\n\nexport type ApiVVersionODataControllerCountResponse = ApiVVersionODataControllerCountResponses[keyof ApiVVersionODataControllerCountResponses];\n\nexport type GetApiVbyApiVersionSimpleOperationData = {\n    body?: never;\n    path: {\n        /**\n         * foo in method\n         */\n        foo_param: string;\n    };\n    query?: never;\n    url: '/api/v{api-version}/simple:operation';\n};\n\nexport type GetApiVbyApiVersionSimpleOperationErrors = {\n    /**\n     * Default error response\n     */\n    default: ModelWithBoolean;\n};\n\nexport type GetApiVbyApiVersionSimpleOperationError = GetApiVbyApiVersionSimpleOperationErrors[keyof GetApiVbyApiVersionSimpleOperationErrors];\n\nexport type GetApiVbyApiVersionSimpleOperationResponses = {\n    /**\n     * Response is a simple number\n     */\n    200: number;\n};\n\nexport type GetApiVbyApiVersionSimpleOperationResponse = GetApiVbyApiVersionSimpleOperationResponses[keyof GetApiVbyApiVersionSimpleOperationResponses];\n\nexport type DeleteCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type GetCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type HeadCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type OptionsCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type PatchCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type PostCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type PutCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type DeleteFooData3 = {\n    body?: never;\n    headers: {\n        /**\n         * Parameter with illegal characters\n         */\n        'x-Foo-Bar': ModelWithString;\n    };\n    path: {\n        /**\n         * foo in method\n         */\n        foo_param: string;\n        /**\n         * bar in method\n         */\n        BarParam: string;\n    };\n    query?: never;\n    url: '/api/v{api-version}/foo/{foo_param}/bar/{BarParam}';\n};\n\nexport type CallWithDescriptionsData = {\n    body?: never;\n    path?: never;\n    query?: {\n        /**\n         * Testing multiline comments in string: First line\n         * Second line\n         *\n         * Fourth line\n         */\n        parameterWithBreaks?: string;\n        /**\n         * Testing backticks in string: `backticks` and ```multiple backticks``` should work\n         */\n        parameterWithBackticks?: string;\n        /**\n         * Testing slashes in string: \\backwards\\\\\\ and /forwards/// should work\n         */\n        parameterWithSlashes?: string;\n        /**\n         * Testing expression placeholders in string: ${expression} should work\n         */\n        parameterWithExpressionPlaceholders?: string;\n        /**\n         * Testing quotes in string: 'single quote''' and \"double quotes\"\"\" should work\n         */\n        parameterWithQuotes?: string;\n        /**\n         * Testing reserved characters in string: * inline * and ** inline ** should work\n         */\n        parameterWithReservedCharacters?: string;\n    };\n    url: '/api/v{api-version}/descriptions';\n};\n\nexport type DeprecatedCallData = {\n    body?: never;\n    headers: {\n        /**\n         * This parameter is deprecated\n         *\n         * @deprecated\n         */\n        parameter: DeprecatedModel | null;\n    };\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/parameters/deprecated';\n};\n\nexport type CallWithParametersData = {\n    /**\n     * This is the parameter that goes into the body\n     */\n    body: {\n        [key: string]: unknown;\n    } | null;\n    headers: {\n        /**\n         * This is the parameter that goes into the header\n         */\n        parameterHeader: string | null;\n    };\n    path: {\n        /**\n         * This is the parameter that goes into the path\n         */\n        parameterPath: string | null;\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string | null;\n    };\n    query: {\n        foo_ref_enum?: ModelWithNestedArrayEnumsDataFoo;\n        foo_all_of_enum: ModelWithNestedArrayEnumsDataFoo;\n        /**\n         * This is the parameter that goes into the query params\n         */\n        cursor: string | null;\n    };\n    url: '/api/v{api-version}/parameters/{parameterPath}';\n};\n\nexport type CallWithWeirdParameterNamesData = {\n    /**\n     * This is the parameter that goes into the body\n     */\n    body: ModelWithString | null;\n    headers: {\n        /**\n         * This is the parameter that goes into the request header\n         */\n        'parameter.header': string | null;\n    };\n    path: {\n        /**\n         * This is the parameter that goes into the path\n         */\n        'parameter.path.1'?: string;\n        /**\n         * This is the parameter that goes into the path\n         */\n        'parameter-path-2'?: string;\n        /**\n         * This is the parameter that goes into the path\n         */\n        'PARAMETER-PATH-3'?: string;\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string | null;\n    };\n    query: {\n        /**\n         * This is the parameter with a reserved keyword\n         */\n        default?: string;\n        /**\n         * This is the parameter that goes into the request query params\n         */\n        'parameter-query': string | null;\n    };\n    url: '/api/v{api-version}/parameters/{parameter.path.1}/{parameter-path-2}/{PARAMETER-PATH-3}';\n};\n\nexport type GetCallWithOptionalParamData = {\n    /**\n     * This is a required parameter\n     */\n    body: ModelWithOneOfEnum;\n    path?: never;\n    query?: {\n        /**\n         * This is an optional parameter\n         */\n        page?: number;\n    };\n    url: '/api/v{api-version}/parameters';\n};\n\nexport type PostCallWithOptionalParamData = {\n    /**\n     * This is an optional parameter\n     */\n    body?: {\n        offset?: number | null;\n    };\n    path?: never;\n    query: {\n        /**\n         * This is a required parameter\n         */\n        parameter: Pageable;\n    };\n    url: '/api/v{api-version}/parameters';\n};\n\nexport type PostCallWithOptionalParamResponses = {\n    /**\n     * Response is a simple number\n     */\n    200: number;\n    /**\n     * Success\n     */\n    204: void;\n};\n\nexport type PostCallWithOptionalParamResponse = PostCallWithOptionalParamResponses[keyof PostCallWithOptionalParamResponses];\n\nexport type PostApiVbyApiVersionRequestBodyData = {\n    /**\n     * A reusable request body\n     */\n    body?: SimpleRequestBody;\n    path?: never;\n    query?: {\n        /**\n         * This is a reusable parameter\n         */\n        parameter?: string;\n    };\n    url: '/api/v{api-version}/requestBody';\n};\n\nexport type PostApiVbyApiVersionFormDataData = {\n    /**\n     * A reusable request body\n     */\n    body?: SimpleFormData;\n    path?: never;\n    query?: {\n        /**\n         * This is a reusable parameter\n         */\n        parameter?: string;\n    };\n    url: '/api/v{api-version}/formData';\n};\n\nexport type CallWithDefaultParametersData = {\n    body?: never;\n    path?: never;\n    query?: {\n        /**\n         * This is a simple string with default value\n         */\n        parameterString?: string | null;\n        /**\n         * This is a simple number with default value\n         */\n        parameterNumber?: number | null;\n        /**\n         * This is a simple boolean with default value\n         */\n        parameterBoolean?: boolean | null;\n        /**\n         * This is a simple enum with default value\n         */\n        parameterEnum?: 'Success' | 'Warning' | 'Error';\n        /**\n         * This is a simple model with default value\n         */\n        parameterModel?: ModelWithString | null;\n    };\n    url: '/api/v{api-version}/defaults';\n};\n\nexport type CallWithDefaultOptionalParametersData = {\n    body?: never;\n    path?: never;\n    query?: {\n        /**\n         * This is a simple string that is optional with default value\n         */\n        parameterString?: string;\n        /**\n         * This is a simple number that is optional with default value\n         */\n        parameterNumber?: number;\n        /**\n         * This is a simple boolean that is optional with default value\n         */\n        parameterBoolean?: boolean;\n        /**\n         * This is a simple enum that is optional with default value\n         */\n        parameterEnum?: 'Success' | 'Warning' | 'Error';\n        /**\n         * This is a simple model that is optional with default value\n         */\n        parameterModel?: ModelWithString;\n    };\n    url: '/api/v{api-version}/defaults';\n};\n\nexport type CallToTestOrderOfParamsData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * This is a optional string with default\n         */\n        parameterOptionalStringWithDefault?: string;\n        /**\n         * This is a optional string with empty default\n         */\n        parameterOptionalStringWithEmptyDefault?: string;\n        /**\n         * This is a optional string with no default\n         */\n        parameterOptionalStringWithNoDefault?: string;\n        /**\n         * This is a string with default\n         */\n        parameterStringWithDefault: string;\n        /**\n         * This is a string with empty default\n         */\n        parameterStringWithEmptyDefault: string;\n        /**\n         * This is a string with no default\n         */\n        parameterStringWithNoDefault: string;\n        /**\n         * This is a string that can be null with no default\n         */\n        parameterStringNullableWithNoDefault?: string | null;\n        /**\n         * This is a string that can be null with default\n         */\n        parameterStringNullableWithDefault?: string | null;\n    };\n    url: '/api/v{api-version}/defaults';\n};\n\nexport type DuplicateNameData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/duplicate';\n};\n\nexport type DuplicateName2Data = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/duplicate';\n};\n\nexport type DuplicateName3Data = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/duplicate';\n};\n\nexport type DuplicateName4Data = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/duplicate';\n};\n\nexport type CallWithNoContentResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no-content';\n};\n\nexport type CallWithNoContentResponseResponses = {\n    /**\n     * Success\n     */\n    204: void;\n};\n\nexport type CallWithNoContentResponseResponse = CallWithNoContentResponseResponses[keyof CallWithNoContentResponseResponses];\n\nexport type CallWithResponseAndNoContentResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multiple-tags/response-and-no-content';\n};\n\nexport type CallWithResponseAndNoContentResponseResponses = {\n    /**\n     * Response is a simple number\n     */\n    200: number;\n    /**\n     * Success\n     */\n    204: void;\n};\n\nexport type CallWithResponseAndNoContentResponseResponse = CallWithResponseAndNoContentResponseResponses[keyof CallWithResponseAndNoContentResponseResponses];\n\nexport type DummyAData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multiple-tags/a';\n};\n\nexport type DummyAResponses = {\n    200: _400;\n};\n\nexport type DummyAResponse = DummyAResponses[keyof DummyAResponses];\n\nexport type DummyBData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multiple-tags/b';\n};\n\nexport type DummyBResponses = {\n    /**\n     * Success\n     */\n    204: void;\n};\n\nexport type DummyBResponse = DummyBResponses[keyof DummyBResponses];\n\nexport type CallWithResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/response';\n};\n\nexport type CallWithResponseResponses = {\n    default: Import;\n};\n\nexport type CallWithResponseResponse = CallWithResponseResponses[keyof CallWithResponseResponses];\n\nexport type CallWithDuplicateResponsesData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/response';\n};\n\nexport type CallWithDuplicateResponsesErrors = {\n    /**\n     * Message for 500 error\n     */\n    500: ModelWithStringError;\n    /**\n     * Message for 501 error\n     */\n    501: ModelWithStringError;\n    /**\n     * Message for 502 error\n     */\n    502: ModelWithStringError;\n    /**\n     * Message for 4XX errors\n     */\n    '4XX': DictionaryWithArray;\n    /**\n     * Default error response\n     */\n    default: ModelWithBoolean;\n};\n\nexport type CallWithDuplicateResponsesError = CallWithDuplicateResponsesErrors[keyof CallWithDuplicateResponsesErrors];\n\nexport type CallWithDuplicateResponsesResponses = {\n    /**\n     * Message for 200 response\n     */\n    200: ModelWithBoolean & ModelWithInteger;\n    /**\n     * Message for 201 response\n     */\n    201: ModelWithString;\n    /**\n     * Message for 202 response\n     */\n    202: ModelWithString;\n};\n\nexport type CallWithDuplicateResponsesResponse = CallWithDuplicateResponsesResponses[keyof CallWithDuplicateResponsesResponses];\n\nexport type CallWithResponsesData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/response';\n};\n\nexport type CallWithResponsesErrors = {\n    /**\n     * Message for 500 error\n     */\n    500: ModelWithStringError;\n    /**\n     * Message for 501 error\n     */\n    501: ModelWithStringError;\n    /**\n     * Message for 502 error\n     */\n    502: ModelWithStringError;\n    /**\n     * Message for default response\n     */\n    default: ModelWithStringError;\n};\n\nexport type CallWithResponsesError = CallWithResponsesErrors[keyof CallWithResponsesErrors];\n\nexport type CallWithResponsesResponses = {\n    /**\n     * Message for 200 response\n     */\n    200: {\n        readonly '@namespace.string'?: string;\n        readonly '@namespace.integer'?: number;\n        readonly value?: Array<ModelWithString>;\n    };\n    /**\n     * Message for 201 response\n     */\n    201: ModelThatExtends;\n    /**\n     * Message for 202 response\n     */\n    202: ModelThatExtendsExtends;\n};\n\nexport type CallWithResponsesResponse = CallWithResponsesResponses[keyof CallWithResponsesResponses];\n\nexport type CollectionFormatData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * This is an array parameter that is sent as csv format (comma-separated values)\n         */\n        parameterArrayCSV: Array<string> | null;\n        /**\n         * This is an array parameter that is sent as ssv format (space-separated values)\n         */\n        parameterArraySSV: Array<string> | null;\n        /**\n         * This is an array parameter that is sent as tsv format (tab-separated values)\n         */\n        parameterArrayTSV: Array<string> | null;\n        /**\n         * This is an array parameter that is sent as pipes format (pipe-separated values)\n         */\n        parameterArrayPipes: Array<string> | null;\n        /**\n         * This is an array parameter that is sent as multi format (multiple parameter instances)\n         */\n        parameterArrayMulti: Array<string> | null;\n    };\n    url: '/api/v{api-version}/collectionFormat';\n};\n\nexport type TypesData = {\n    body?: never;\n    path?: {\n        /**\n         * This is a number parameter\n         */\n        id?: number;\n    };\n    query: {\n        /**\n         * This is a number parameter\n         */\n        parameterNumber: number;\n        /**\n         * This is a string parameter\n         */\n        parameterString: string | null;\n        /**\n         * This is a boolean parameter\n         */\n        parameterBoolean: boolean | null;\n        /**\n         * This is an object parameter\n         */\n        parameterObject: {\n            [key: string]: unknown;\n        } | null;\n        /**\n         * This is an array parameter\n         */\n        parameterArray: Array<string> | null;\n        /**\n         * This is a dictionary parameter\n         */\n        parameterDictionary: {\n            [key: string]: unknown;\n        } | null;\n        /**\n         * This is an enum parameter\n         */\n        parameterEnum: 'Success' | 'Warning' | 'Error' | null;\n    };\n    url: '/api/v{api-version}/types';\n};\n\nexport type TypesResponses = {\n    /**\n     * Response is a simple number\n     */\n    200: number;\n    /**\n     * Response is a simple string\n     */\n    201: string;\n    /**\n     * Response is a simple boolean\n     */\n    202: boolean;\n    /**\n     * Response is a simple object\n     */\n    203: {\n        [key: string]: unknown;\n    };\n};\n\nexport type TypesResponse = TypesResponses[keyof TypesResponses];\n\nexport type UploadFileData = {\n    body: Blob | File;\n    path: {\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string | null;\n    };\n    query?: never;\n    url: '/api/v{api-version}/upload';\n};\n\nexport type UploadFileResponses = {\n    200: boolean;\n};\n\nexport type UploadFileResponse = UploadFileResponses[keyof UploadFileResponses];\n\nexport type FileResponseData = {\n    body?: never;\n    path: {\n        id: string;\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string;\n    };\n    query?: never;\n    url: '/api/v{api-version}/file/{id}';\n};\n\nexport type FileResponseResponses = {\n    /**\n     * Success\n     */\n    200: Blob | File;\n};\n\nexport type FileResponseResponse = FileResponseResponses[keyof FileResponseResponses];\n\nexport type ComplexTypesData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * Parameter containing object\n         */\n        parameterObject: {\n            first?: {\n                second?: {\n                    third?: string;\n                };\n            };\n        };\n        /**\n         * Parameter containing reference\n         */\n        parameterReference: ModelWithString;\n    };\n    url: '/api/v{api-version}/complex';\n};\n\nexport type ComplexTypesErrors = {\n    /**\n     * 400 `server` error\n     */\n    400: unknown;\n    /**\n     * 500 server error\n     */\n    500: unknown;\n};\n\nexport type ComplexTypesResponses = {\n    /**\n     * Successful response\n     */\n    200: Array<ModelWithString>;\n};\n\nexport type ComplexTypesResponse = ComplexTypesResponses[keyof ComplexTypesResponses];\n\nexport type MultipartResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multipart';\n};\n\nexport type MultipartResponseResponses = {\n    /**\n     * OK\n     */\n    200: {\n        file?: Blob | File;\n        metadata?: {\n            foo?: string;\n            bar?: string;\n        };\n    };\n};\n\nexport type MultipartResponseResponse = MultipartResponseResponses[keyof MultipartResponseResponses];\n\nexport type MultipartRequestData = {\n    body?: {\n        content?: Blob | File;\n        data?: ModelWithString | null;\n    };\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multipart';\n};\n\nexport type ComplexParamsData = {\n    body?: {\n        readonly key: string | null;\n        name: string | null;\n        enabled?: boolean;\n        type: 'Monkey' | 'Horse' | 'Bird';\n        listOfModels?: Array<ModelWithString> | null;\n        listOfStrings?: Array<string> | null;\n        parameters: ModelWithString | ModelWithEnum | ModelWithArray | ModelWithDictionary;\n        readonly user?: {\n            readonly id?: number;\n            readonly name?: string | null;\n        };\n    };\n    path: {\n        id: number;\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string;\n    };\n    query?: never;\n    url: '/api/v{api-version}/complex/{id}';\n};\n\nexport type ComplexParamsResponses = {\n    /**\n     * Success\n     */\n    200: ModelWithString;\n};\n\nexport type ComplexParamsResponse = ComplexParamsResponses[keyof ComplexParamsResponses];\n\nexport type CallWithResultFromHeaderData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/header';\n};\n\nexport type CallWithResultFromHeaderErrors = {\n    /**\n     * 400 server error\n     */\n    400: unknown;\n    /**\n     * 500 server error\n     */\n    500: unknown;\n};\n\nexport type CallWithResultFromHeaderResponses = {\n    /**\n     * Successful response\n     */\n    200: unknown;\n};\n\nexport type TestErrorCodeData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * Status code to return\n         */\n        status: number;\n    };\n    url: '/api/v{api-version}/error';\n};\n\nexport type TestErrorCodeErrors = {\n    /**\n     * Custom message: Internal Server Error\n     */\n    500: unknown;\n    /**\n     * Custom message: Not Implemented\n     */\n    501: unknown;\n    /**\n     * Custom message: Bad Gateway\n     */\n    502: unknown;\n    /**\n     * Custom message: Service Unavailable\n     */\n    503: unknown;\n};\n\nexport type TestErrorCodeResponses = {\n    /**\n     * Custom message: Successful response\n     */\n    200: unknown;\n};\n\nexport type NonAsciiæøåÆøÅöôêÊ字符串Data = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * Dummy input param\n         */\n        nonAsciiParamæøåÆØÅöôêÊ: number;\n    };\n    url: '/api/v{api-version}/non-ascii-æøåÆØÅöôêÊ字符串';\n};\n\nexport type NonAsciiæøåÆøÅöôêÊ字符串Responses = {\n    /**\n     * Successful response\n     */\n    200: Array<NonAsciiStringæøåÆøÅöôêÊ字符串>;\n};\n\nexport type NonAsciiæøåÆøÅöôêÊ字符串Response = NonAsciiæøåÆøÅöôêÊ字符串Responses[keyof NonAsciiæøåÆøÅöôêÊ字符串Responses];\n\nexport type PutWithFormUrlEncodedData = {\n    body: ArrayWithStrings;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/non-ascii-æøåÆØÅöôêÊ字符串';\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-axios/import-file-extension-ts/client/client.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { AxiosError, AxiosInstance, RawAxiosRequestHeaders } from 'axios';\nimport axios from 'axios';\n\nimport { createSseClient } from '../core/serverSentEvents.gen.ts';\nimport type { HttpMethod } from '../core/types.gen.ts';\nimport { getValidRequestBody } from '../core/utils.gen.ts';\nimport type { Client, Config, RequestOptions } from './types.gen.ts';\nimport { buildUrl, createConfig, mergeConfigs, mergeHeaders, setAuthParams } from './utils.gen.ts';\n\nexport const createClient = (config: Config = {}): Client => {\n  let _config = mergeConfigs(createConfig(), config);\n\n  let instance: AxiosInstance;\n\n  if (_config.axios && !('Axios' in _config.axios)) {\n    instance = _config.axios;\n  } else {\n    // eslint-disable-next-line @typescript-eslint/no-unused-vars\n    const { auth, ...configWithoutAuth } = _config;\n    instance = axios.create(configWithoutAuth);\n  }\n\n  const getConfig = (): Config => ({ ..._config });\n\n  const setConfig = (config: Config): Config => {\n    _config = mergeConfigs(_config, config);\n    instance.defaults = {\n      ...instance.defaults,\n      ..._config,\n      // @ts-expect-error\n      headers: mergeHeaders(instance.defaults.headers, _config.headers),\n    };\n    return getConfig();\n  };\n\n  const beforeRequest = async (options: RequestOptions) => {\n    const opts = {\n      ..._config,\n      ...options,\n      axios: options.axios ?? _config.axios ?? instance,\n      headers: mergeHeaders(_config.headers, options.headers),\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.body = opts.bodySerializer(opts.body);\n    }\n\n    const url = buildUrl(opts);\n\n    return { opts, url };\n  };\n\n  // @ts-expect-error\n  const request: Client['request'] = async (options) => {\n    // @ts-expect-error\n    const { opts, url } = await beforeRequest(options);\n    try {\n      // assign Axios here for consistency with fetch\n      const _axios = opts.axios!;\n      // eslint-disable-next-line @typescript-eslint/no-unused-vars\n      const { auth, ...optsWithoutAuth } = opts;\n      const response = await _axios({\n        ...optsWithoutAuth,\n        baseURL: '', // the baseURL is already included in `url`\n        data: getValidRequestBody(opts),\n        headers: opts.headers as RawAxiosRequestHeaders,\n        // let `paramsSerializer()` handle query params if it exists\n        params: opts.paramsSerializer ? opts.query : undefined,\n        url,\n      });\n\n      let { data } = response;\n\n      if (opts.responseType === '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 {\n        ...response,\n        data: data ?? {},\n      };\n    } catch (error) {\n      const e = error as AxiosError;\n      if (opts.throwOnError) {\n        throw e;\n      }\n      // @ts-expect-error\n      e.error = e.response?.data ?? {};\n      return e;\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 Record<string, string>,\n      method,\n      serializedBody: getValidRequestBody(opts) as BodyInit | null | undefined,\n      // @ts-expect-error\n      signal: opts.signal,\n      url,\n    });\n  };\n\n  const _buildUrl: Client['buildUrl'] = (options) =>\n    buildUrl({ axios: instance, ..._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    instance,\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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-axios/import-file-extension-ts/client/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type { Auth } from '../core/auth.gen.ts';\nexport type { QuerySerializerOptions } from '../core/bodySerializer.gen.ts';\nexport {\n  formDataBodySerializer,\n  jsonBodySerializer,\n  urlSearchParamsBodySerializer,\n} from '../core/bodySerializer.gen.ts';\nexport { buildClientParams } from '../core/params.gen.ts';\nexport { serializeQueryKeyValue } from '../core/queryKeySerializer.gen.ts';\nexport { createClient } from './client.gen.ts';\nexport type {\n  Client,\n  ClientOptions,\n  Config,\n  CreateClientConfig,\n  Options,\n  RequestOptions,\n  RequestResult,\n  TDataShape,\n} from './types.gen.ts';\nexport { createConfig } from './utils.gen.ts';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-axios/import-file-extension-ts/client/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type {\n  AxiosError,\n  AxiosInstance,\n  AxiosRequestHeaders,\n  AxiosResponse,\n  AxiosStatic,\n  CreateAxiosDefaults,\n} from 'axios';\n\nimport type { Auth } from '../core/auth.gen.ts';\nimport type {\n  ServerSentEventsOptions,\n  ServerSentEventsResult,\n} from '../core/serverSentEvents.gen.ts';\nimport type { Client as CoreClient, Config as CoreConfig } from '../core/types.gen.ts';\n\nexport interface Config<T extends ClientOptions = ClientOptions>\n  extends Omit<CreateAxiosDefaults, 'auth' | 'baseURL' | 'headers' | 'method'>, CoreConfig {\n  /**\n   * Axios implementation. You can use this option to provide either an\n   * `AxiosStatic` or an `AxiosInstance`.\n   *\n   * @default axios\n   */\n  axios?: AxiosStatic | AxiosInstance;\n  /**\n   * Base URL for all requests made by this client.\n   */\n  baseURL?: T['baseURL'];\n  /**\n   * An object containing any HTTP headers that you want to pre-populate your\n   * `Headers` object with.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/Headers/Headers#init See more}\n   */\n  headers?:\n    | AxiosRequestHeaders\n    | Record<\n        string,\n        string | number | boolean | (string | number | boolean)[] | null | undefined | unknown\n      >;\n  /**\n   * Throw an error instead of returning it in the response?\n   *\n   * @default false\n   */\n  throwOnError?: T['throwOnError'];\n}\n\nexport interface RequestOptions<\n  TData = unknown,\n  ThrowOnError extends boolean = boolean,\n  Url extends string = string,\n>\n  extends\n    Config<{\n      throwOnError: ThrowOnError;\n    }>,\n    Pick<\n      ServerSentEventsOptions<TData>,\n      | 'onRequest'\n      | 'onSseError'\n      | 'onSseEvent'\n      | 'sseDefaultRetryDelay'\n      | 'sseMaxRetryAttempts'\n      | 'sseMaxRetryDelay'\n    > {\n  /**\n   * Any body that you want to add to your request.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/fetch#body}\n   */\n  body?: unknown;\n  path?: Record<string, unknown>;\n  query?: Record<string, unknown>;\n  /**\n   * Security mechanism(s) to use for the request.\n   */\n  security?: ReadonlyArray<Auth>;\n  url: Url;\n}\n\nexport interface ClientOptions {\n  baseURL?: string;\n  throwOnError?: boolean;\n}\n\nexport type RequestResult<\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = boolean,\n> = ThrowOnError extends true\n  ? Promise<AxiosResponse<TData extends Record<string, unknown> ? TData[keyof TData] : TData>>\n  : Promise<\n      | (AxiosResponse<TData extends Record<string, unknown> ? TData[keyof TData] : TData> & {\n          error: undefined;\n        })\n      | (AxiosError<TError extends Record<string, unknown> ? TError[keyof TError] : TError> & {\n          data: undefined;\n          error: TError extends Record<string, unknown> ? TError[keyof TError] : TError;\n        })\n    >;\n\ntype MethodFn = <TData = unknown, TError = unknown, ThrowOnError extends boolean = false>(\n  options: Omit<RequestOptions<TData, ThrowOnError>, 'method'>,\n) => RequestResult<TData, TError, ThrowOnError>;\n\ntype SseFn = <TData = unknown, TError = unknown, ThrowOnError extends boolean = false>(\n  options: Omit<RequestOptions<TData, ThrowOnError>, 'method'>,\n) => Promise<ServerSentEventsResult<TData, TError>>;\n\ntype RequestFn = <TData = unknown, TError = unknown, ThrowOnError extends boolean = false>(\n  options: Omit<RequestOptions<TData, ThrowOnError>, 'method'> &\n    Pick<Required<RequestOptions<TData, ThrowOnError>>, 'method'>,\n) => RequestResult<TData, TError, ThrowOnError>;\n\ntype BuildUrlFn = <\n  TData extends {\n    body?: unknown;\n    path?: Record<string, unknown>;\n    query?: Record<string, unknown>;\n    url: string;\n  },\n>(\n  options: TData & Options<TData>,\n) => string;\n\nexport type Client = CoreClient<RequestFn, Config, MethodFn, BuildUrlFn, SseFn> & {\n  instance: AxiosInstance;\n};\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 = ClientOptions> = (\n  override?: Config<ClientOptions & T>,\n) => Config<Required<ClientOptions> & T>;\n\nexport interface TDataShape {\n  body?: unknown;\n  headers?: unknown;\n  path?: unknown;\n  query?: unknown;\n  url: string;\n}\n\ntype OmitKeys<T, K> = Pick<T, Exclude<keyof T, K>>;\n\nexport type Options<\n  TData extends TDataShape = TDataShape,\n  ThrowOnError extends boolean = boolean,\n  TResponse = unknown,\n> = OmitKeys<RequestOptions<TResponse, ThrowOnError>, 'body' | 'path' | 'query' | 'url'> &\n  ([TData] extends [never] ? unknown : Omit<TData, 'url'>);\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-axios/import-file-extension-ts/client/utils.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport { getAuthToken } from '../core/auth.gen.ts';\nimport type { QuerySerializerOptions } from '../core/bodySerializer.gen.ts';\nimport {\n  serializeArrayParam,\n  serializeObjectParam,\n  serializePrimitiveParam,\n} from '../core/pathSerializer.gen.ts';\nimport { getUrl } from '../core/utils.gen.ts';\nimport type { Client, ClientOptions, Config, RequestOptions } from './types.gen.ts';\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\nconst checkForExistence = (\n  options: Pick<RequestOptions, 'auth' | 'query'> & {\n    headers: Record<any, unknown>;\n  },\n  name?: string,\n): boolean => {\n  if (!name) {\n    return false;\n  }\n  if (name in options.headers || options.query?.[name]) {\n    return true;\n  }\n  if (\n    'Cookie' in options.headers &&\n    options.headers['Cookie'] &&\n    typeof options.headers['Cookie'] === 'string'\n  ) {\n    return options.headers['Cookie'].includes(`${name}=`);\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: Record<any, unknown>;\n  }) => {\n  for (const auth of security) {\n    if (checkForExistence(options, auth.name)) {\n      continue;\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        const value = `${name}=${token}`;\n        if ('Cookie' in options.headers && options.headers['Cookie']) {\n          options.headers['Cookie'] = `${options.headers['Cookie']}; ${value}`;\n        } else {\n          options.headers['Cookie'] = value;\n        }\n        break;\n      }\n      case 'header':\n      default:\n        options.headers[name] = token;\n        break;\n    }\n  }\n};\n\nexport const buildUrl: Client['buildUrl'] = (options) => {\n  const instanceBaseUrl = options.axios?.defaults?.baseURL;\n\n  const baseUrl =\n    !!options.baseURL && typeof options.baseURL === 'string' ? options.baseURL : instanceBaseUrl;\n\n  return getUrl({\n    baseUrl: baseUrl as string,\n    path: options.path,\n    // let `paramsSerializer()` handle query params if it exists\n    query: !options.paramsSerializer ? options.query : undefined,\n    querySerializer:\n      typeof options.querySerializer === 'function'\n        ? options.querySerializer\n        : createQuerySerializer(options.querySerializer),\n    url: options.url,\n  });\n};\n\nexport const mergeConfigs = (a: Config, b: Config): Config => {\n  const config = { ...a, ...b };\n  config.headers = mergeHeaders(a.headers, b.headers);\n  return config;\n};\n\n/**\n * Special Axios headers keywords allowing to set headers by request method.\n */\nexport const axiosHeadersKeywords = [\n  'common',\n  'delete',\n  'get',\n  'head',\n  'patch',\n  'post',\n  'put',\n] as const;\n\nexport const mergeHeaders = (\n  ...headers: Array<Required<Config>['headers'] | undefined>\n): Record<any, unknown> => {\n  const mergedHeaders: Record<any, unknown> = {};\n  for (const header of headers) {\n    if (!header || typeof header !== 'object') {\n      continue;\n    }\n\n    const iterator = Object.entries(header);\n\n    for (const [key, value] of iterator) {\n      if (\n        axiosHeadersKeywords.includes(key as (typeof axiosHeadersKeywords)[number]) &&\n        typeof value === 'object'\n      ) {\n        mergedHeaders[key] = {\n          ...(mergedHeaders[key] as Record<any, unknown>),\n          ...value,\n        };\n      } else if (value === null) {\n        delete mergedHeaders[key];\n      } else if (Array.isArray(value)) {\n        for (const v of value) {\n          // @ts-expect-error\n          mergedHeaders[key] = [...(mergedHeaders[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[key] = typeof value === 'object' ? JSON.stringify(value) : (value as string);\n      }\n    }\n  }\n  return mergedHeaders;\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  ...override,\n});\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-axios/import-file-extension-ts/client.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport { type ClientOptions, type Config, createClient, createConfig } from './client/index.ts';\nimport type { ClientOptions as ClientOptions2 } from './types.gen.ts';\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: 'http://localhost:3000/base' }));\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-axios/import-file-extension-ts/core/auth.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-axios/import-file-extension-ts/core/bodySerializer.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { ArrayStyle, ObjectStyle, SerializerOptions } from './pathSerializer.gen.ts';\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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-axios/import-file-extension-ts/core/params.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-axios/import-file-extension-ts/core/pathSerializer.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-axios/import-file-extension-ts/core/queryKeySerializer.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\n/**\n * JSON-friendly union that mirrors what Pinia Colada can hash.\n */\nexport type JsonValue =\n  | null\n  | string\n  | number\n  | boolean\n  | JsonValue[]\n  | { [key: string]: JsonValue };\n\n/**\n * Replacer that converts non-JSON values (bigint, Date, etc.) to safe substitutes.\n */\nexport const queryKeyJsonReplacer = (_key: string, value: unknown) => {\n  if (value === undefined || typeof value === 'function' || typeof value === 'symbol') {\n    return undefined;\n  }\n  if (typeof value === 'bigint') {\n    return value.toString();\n  }\n  if (value instanceof Date) {\n    return value.toISOString();\n  }\n  return value;\n};\n\n/**\n * Safely stringifies a value and parses it back into a JsonValue.\n */\nexport const stringifyToJsonValue = (input: unknown): JsonValue | undefined => {\n  try {\n    const json = JSON.stringify(input, queryKeyJsonReplacer);\n    if (json === undefined) {\n      return undefined;\n    }\n    return JSON.parse(json) as JsonValue;\n  } catch {\n    return undefined;\n  }\n};\n\n/**\n * Detects plain objects (including objects with a null prototype).\n */\nconst isPlainObject = (value: unknown): value is Record<string, unknown> => {\n  if (value === null || typeof value !== 'object') {\n    return false;\n  }\n  const prototype = Object.getPrototypeOf(value as object);\n  return prototype === Object.prototype || prototype === null;\n};\n\n/**\n * Turns URLSearchParams into a sorted JSON object for deterministic keys.\n */\nconst serializeSearchParams = (params: URLSearchParams): JsonValue => {\n  const entries = Array.from(params.entries()).sort(([a], [b]) => a.localeCompare(b));\n  const result: Record<string, JsonValue> = {};\n\n  for (const [key, value] of entries) {\n    const existing = result[key];\n    if (existing === undefined) {\n      result[key] = value;\n      continue;\n    }\n\n    if (Array.isArray(existing)) {\n      (existing as string[]).push(value);\n    } else {\n      result[key] = [existing, value];\n    }\n  }\n\n  return result;\n};\n\n/**\n * Normalizes any accepted value into a JSON-friendly shape for query keys.\n */\nexport const serializeQueryKeyValue = (value: unknown): JsonValue | undefined => {\n  if (value === null) {\n    return null;\n  }\n\n  if (typeof value === 'string' || typeof value === 'number' || typeof value === 'boolean') {\n    return value;\n  }\n\n  if (value === undefined || typeof value === 'function' || typeof value === 'symbol') {\n    return undefined;\n  }\n\n  if (typeof value === 'bigint') {\n    return value.toString();\n  }\n\n  if (value instanceof Date) {\n    return value.toISOString();\n  }\n\n  if (Array.isArray(value)) {\n    return stringifyToJsonValue(value);\n  }\n\n  if (typeof URLSearchParams !== 'undefined' && value instanceof URLSearchParams) {\n    return serializeSearchParams(value);\n  }\n\n  if (isPlainObject(value)) {\n    return stringifyToJsonValue(value);\n  }\n\n  return undefined;\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-axios/import-file-extension-ts/core/serverSentEvents.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { Config } from './types.gen.ts';\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 const 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            // Normalize line endings: CRLF -> LF, then CR -> LF\n            buffer = buffer.replace(/\\r\\n/g, '\\n').replace(/\\r/g, '\\n');\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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-axios/import-file-extension-ts/core/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { Auth, AuthToken } from './auth.gen.ts';\nimport type { BodySerializer, QuerySerializer, QuerySerializerOptions } from './bodySerializer.gen.ts';\n\nexport type HttpMethod =\n  | 'connect'\n  | 'delete'\n  | 'get'\n  | 'head'\n  | 'options'\n  | 'patch'\n  | 'post'\n  | 'put'\n  | 'trace';\n\nexport type Client<\n  RequestFn = never,\n  Config = unknown,\n  MethodFn = never,\n  BuildUrlFn = never,\n  SseFn = never,\n> = {\n  /**\n   * Returns the final request URL.\n   */\n  buildUrl: BuildUrlFn;\n  getConfig: () => Config;\n  request: RequestFn;\n  setConfig: (config: Config) => Config;\n} & {\n  [K in HttpMethod]: MethodFn;\n} & ([SseFn] extends [never] ? { sse?: never } : { sse: { [K in HttpMethod]: SseFn } });\n\nexport interface Config {\n  /**\n   * Auth token or a function returning auth token. The resolved value will be\n   * added to the request payload as defined by its `security` array.\n   */\n  auth?: ((auth: Auth) => Promise<AuthToken> | AuthToken) | AuthToken;\n  /**\n   * A function for serializing request body parameter. By default,\n   * {@link JSON.stringify()} will be used.\n   */\n  bodySerializer?: BodySerializer | null;\n  /**\n   * An object containing any HTTP headers that you want to pre-populate your\n   * `Headers` object with.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/Headers/Headers#init See more}\n   */\n  headers?:\n    | RequestInit['headers']\n    | Record<\n        string,\n        string | number | boolean | (string | number | boolean)[] | null | undefined | unknown\n      >;\n  /**\n   * The request method.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/fetch#method See more}\n   */\n  method?: Uppercase<HttpMethod>;\n  /**\n   * A function for serializing request query parameters. By default, arrays\n   * will be exploded in form style, objects will be exploded in deepObject\n   * style, and reserved characters are percent-encoded.\n   *\n   * This method will have no effect if the native `paramsSerializer()` Axios\n   * API function is used.\n   *\n   * {@link https://swagger.io/docs/specification/serialization/#query View examples}\n   */\n  querySerializer?: QuerySerializer | QuerySerializerOptions;\n  /**\n   * A function validating request data. This is useful if you want to ensure\n   * the request conforms to the desired shape, so it can be safely sent to\n   * the server.\n   */\n  requestValidator?: (data: unknown) => Promise<unknown>;\n  /**\n   * A function transforming response data before it's returned. This is useful\n   * for post-processing data, e.g. converting ISO strings into Date objects.\n   */\n  responseTransformer?: (data: unknown) => Promise<unknown>;\n  /**\n   * A function validating response data. This is useful if you want to ensure\n   * the response conforms to the desired shape, so it can be safely passed to\n   * the transformers and returned to the user.\n   */\n  responseValidator?: (data: unknown) => Promise<unknown>;\n}\n\ntype IsExactlyNeverOrNeverUndefined<T> = [T] extends [never]\n  ? true\n  : [T] extends [never | undefined]\n    ? [undefined] extends [T]\n      ? false\n      : true\n    : false;\n\nexport type OmitNever<T extends Record<string, unknown>> = {\n  [K in keyof T as IsExactlyNeverOrNeverUndefined<T[K]> extends true ? never : K]: T[K];\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-axios/import-file-extension-ts/core/utils.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { BodySerializer, QuerySerializer } from './bodySerializer.gen.ts';\nimport {\n  type ArraySeparatorStyle,\n  serializeArrayParam,\n  serializeObjectParam,\n  serializePrimitiveParam,\n} from './pathSerializer.gen.ts';\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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-axios/import-file-extension-ts/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport { apiVVersionODataControllerCount, callToTestOrderOfParams, callWithDefaultOptionalParameters, callWithDefaultParameters, callWithDescriptions, callWithDuplicateResponses, callWithNoContentResponse, callWithParameters, callWithResponse, callWithResponseAndNoContentResponse, callWithResponses, callWithResultFromHeader, callWithWeirdParameterNames, collectionFormat, complexParams, complexTypes, deleteCallWithoutParametersAndResponse, deleteFoo, deprecatedCall, dummyA, dummyB, duplicateName, duplicateName2, duplicateName3, duplicateName4, export_, fileResponse, fooWow, getApiVbyApiVersionSimpleOperation, getCallWithOptionalParam, getCallWithoutParametersAndResponse, headCallWithoutParametersAndResponse, import_, multipartRequest, multipartResponse, nonAsciiæøåÆøÅöôêÊ字符串, type Options, optionsCallWithoutParametersAndResponse, patchApiVbyApiVersionNoTag, patchCallWithoutParametersAndResponse, postApiVbyApiVersionFormData, postApiVbyApiVersionRequestBody, postCallWithOptionalParam, postCallWithoutParametersAndResponse, putCallWithoutParametersAndResponse, putWithFormUrlEncoded, testErrorCode, types, uploadFile } from './sdk.gen.ts';\nexport type { _3eNum1Период, _400, AdditionalPropertiesIntegerIssue, AdditionalPropertiesUnknownIssue, AdditionalPropertiesUnknownIssue2, AdditionalPropertiesUnknownIssue3, AdditionalPropertiesUnknownIssueWritable, AnyOfAnyAndNull, AnyOfArrays, ApiVVersionODataControllerCountData, ApiVVersionODataControllerCountResponse, ApiVVersionODataControllerCountResponses, ArrayWithAnyOfProperties, ArrayWithArray, ArrayWithBooleans, ArrayWithNumbers, ArrayWithProperties, ArrayWithReferences, ArrayWithStrings, CallToTestOrderOfParamsData, CallWithDefaultOptionalParametersData, CallWithDefaultParametersData, CallWithDescriptionsData, CallWithDuplicateResponsesData, CallWithDuplicateResponsesError, CallWithDuplicateResponsesErrors, CallWithDuplicateResponsesResponse, CallWithDuplicateResponsesResponses, CallWithNoContentResponseData, CallWithNoContentResponseResponse, CallWithNoContentResponseResponses, CallWithParametersData, CallWithResponseAndNoContentResponseData, CallWithResponseAndNoContentResponseResponse, CallWithResponseAndNoContentResponseResponses, CallWithResponseData, CallWithResponseResponse, CallWithResponseResponses, CallWithResponsesData, CallWithResponsesError, CallWithResponsesErrors, CallWithResponsesResponse, CallWithResponsesResponses, CallWithResultFromHeaderData, CallWithResultFromHeaderErrors, CallWithResultFromHeaderResponses, CallWithWeirdParameterNamesData, CamelCaseCommentWithBreaks, CharactersInDescription, ClientOptions, CollectionFormatData, CommentWithBackticks, CommentWithBackticksAndQuotes, CommentWithBreaks, CommentWithExpressionPlaceholders, CommentWithQuotes, CommentWithReservedCharacters, CommentWithSlashes, ComplexParamsData, ComplexParamsResponse, ComplexParamsResponses, ComplexTypesData, ComplexTypesErrors, ComplexTypesResponse, ComplexTypesResponses, CompositionBaseModel, CompositionExtendedModel, CompositionWithAllOfAndNullable, CompositionWithAnyOf, CompositionWithAnyOfAndNullable, CompositionWithAnyOfAnonymous, CompositionWithNestedAnyAndTypeNull, CompositionWithNestedAnyOfAndNull, CompositionWithOneOf, CompositionWithOneOfAndComplexArrayDictionary, CompositionWithOneOfAndNullable, CompositionWithOneOfAndProperties, CompositionWithOneOfAndSimpleArrayDictionary, CompositionWithOneOfAndSimpleDictionary, CompositionWithOneOfAnonymous, CompositionWithOneOfDiscriminator, ConstValue, Default, DeleteCallWithoutParametersAndResponseData, DeleteFooData, DeleteFooData2, DeleteFooData3, DeprecatedCallData, DeprecatedModel, DictionaryWithArray, DictionaryWithDictionary, DictionaryWithProperties, DictionaryWithPropertiesAndAdditionalProperties, DictionaryWithReference, DictionaryWithString, DummyAData, DummyAResponse, DummyAResponses, DummyBData, DummyBResponse, DummyBResponses, DuplicateName2Data, DuplicateName3Data, DuplicateName4Data, DuplicateNameData, EnumFromDescription, EnumWithExtensions, EnumWithNumbers, EnumWithReplacedCharacters, EnumWithStrings, EnumWithXEnumNames, ExportData, ExternalRefA, ExternalRefB, ExternalSharedModel, File, FileResponseData, FileResponseResponse, FileResponseResponses, FileWritable, FooWowData, FooWowResponses, FreeFormObjectWithAdditionalPropertiesEqEmptyObject, FreeFormObjectWithAdditionalPropertiesEqTrue, FreeFormObjectWithoutAdditionalProperties, GenericSchemaDuplicateIssue1SystemBoolean, GenericSchemaDuplicateIssue1SystemBooleanWritable, GenericSchemaDuplicateIssue1SystemString, GenericSchemaDuplicateIssue1SystemStringWritable, GetApiVbyApiVersionSimpleOperationData, GetApiVbyApiVersionSimpleOperationError, GetApiVbyApiVersionSimpleOperationErrors, GetApiVbyApiVersionSimpleOperationResponse, GetApiVbyApiVersionSimpleOperationResponses, GetCallWithOptionalParamData, GetCallWithoutParametersAndResponseData, HeadCallWithoutParametersAndResponseData, Import, ImportData, ImportResponse, ImportResponses, IoK8sApimachineryPkgApisMetaV1DeleteOptions, IoK8sApimachineryPkgApisMetaV1Preconditions, ModelCircle, ModelFromZendesk, ModelSquare, ModelThatExtends, ModelThatExtendsExtends, ModelWithAdditionalPropertiesEqTrue, ModelWithAdditionalPropertiesRef, ModelWithAnyOfConstantSizeArray, ModelWithAnyOfConstantSizeArrayAndIntersect, ModelWithAnyOfConstantSizeArrayNullable, ModelWithAnyOfConstantSizeArrayWithNSizeAndOptions, ModelWithAnyOfConstantSizeArrayWithNSizeAndOptionsWritable, ModelWithArray, ModelWithArrayReadOnlyAndWriteOnly, ModelWithArrayReadOnlyAndWriteOnlyWritable, ModelWithBackticksInDescription, ModelWithBoolean, ModelWithCircularReference, ModelWithConst, ModelWithConstantSizeArray, ModelWithDictionary, ModelWithDuplicateImports, ModelWithDuplicateProperties, ModelWithEnum, ModelWithEnumFromDescription, ModelWithEnumWithHyphen, ModelWithInteger, ModelWithNestedArrayEnums, ModelWithNestedArrayEnumsData, ModelWithNestedArrayEnumsDataBar, ModelWithNestedArrayEnumsDataFoo, ModelWithNestedCompositionEnums, ModelWithNestedEnums, ModelWithNestedProperties, ModelWithNullableObject, ModelWithNullableString, ModelWithNumericEnumUnion, ModelWithOneOfAndProperties, ModelWithOneOfEnum, ModelWithOrderedProperties, ModelWithPattern, ModelWithPatternWritable, ModelWithPrefixItemsConstantSizeArray, ModelWithProperties, ModelWithPropertiesWritable, ModelWithReadOnlyAndWriteOnly, ModelWithReadOnlyAndWriteOnlyWritable, ModelWithReference, ModelWithReferenceWritable, ModelWithString, ModelWithStringError, MultipartRequestData, MultipartResponseData, MultipartResponseResponse, MultipartResponseResponses, NestedAnyOfArraysNullable, NonAsciiæøåÆøÅöôêÊ字符串Data, NonAsciiæøåÆøÅöôêÊ字符串Response, NonAsciiæøåÆøÅöôêÊ字符串Responses, NonAsciiStringæøåÆøÅöôêÊ字符串, NullableObject, OneOfAllOfIssue, OneOfAllOfIssueWritable, OptionsCallWithoutParametersAndResponseData, Pageable, ParameterSimpleParameterUnused, PatchApiVbyApiVersionNoTagData, PatchApiVbyApiVersionNoTagResponses, PatchCallWithoutParametersAndResponseData, PostApiVbyApiVersionFormDataData, PostApiVbyApiVersionRequestBodyData, PostCallWithOptionalParamData, PostCallWithOptionalParamResponse, PostCallWithOptionalParamResponses, PostCallWithoutParametersAndResponseData, PostServiceWithEmptyTagResponse, PostServiceWithEmptyTagResponse2, PutCallWithoutParametersAndResponseData, PutWithFormUrlEncodedData, SchemaWithFormRestrictedKeys, SimpleBoolean, SimpleFile, SimpleFormData, SimpleInteger, SimpleParameter, SimpleReference, SimpleRequestBody, SimpleString, SimpleStringWithPattern, TestErrorCodeData, TestErrorCodeErrors, TestErrorCodeResponses, TypesData, TypesResponse, TypesResponses, UploadFileData, UploadFileResponse, UploadFileResponses, XFooBar } from './types.gen.ts';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-axios/import-file-extension-ts/sdk.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport { client } from './client.gen.ts';\nimport { type Client, formDataBodySerializer, type Options as Options2, type TDataShape, urlSearchParamsBodySerializer } from './client/index.ts';\nimport type { ApiVVersionODataControllerCountData, ApiVVersionODataControllerCountResponses, CallToTestOrderOfParamsData, CallWithDefaultOptionalParametersData, CallWithDefaultParametersData, CallWithDescriptionsData, CallWithDuplicateResponsesData, CallWithDuplicateResponsesErrors, CallWithDuplicateResponsesResponses, CallWithNoContentResponseData, CallWithNoContentResponseResponses, CallWithParametersData, CallWithResponseAndNoContentResponseData, CallWithResponseAndNoContentResponseResponses, CallWithResponseData, CallWithResponseResponses, CallWithResponsesData, CallWithResponsesErrors, CallWithResponsesResponses, CallWithResultFromHeaderData, CallWithResultFromHeaderErrors, CallWithResultFromHeaderResponses, CallWithWeirdParameterNamesData, CollectionFormatData, ComplexParamsData, ComplexParamsResponses, ComplexTypesData, ComplexTypesErrors, ComplexTypesResponses, DeleteCallWithoutParametersAndResponseData, DeleteFooData3, DeprecatedCallData, DummyAData, DummyAResponses, DummyBData, DummyBResponses, DuplicateName2Data, DuplicateName3Data, DuplicateName4Data, DuplicateNameData, ExportData, FileResponseData, FileResponseResponses, FooWowData, FooWowResponses, GetApiVbyApiVersionSimpleOperationData, GetApiVbyApiVersionSimpleOperationErrors, GetApiVbyApiVersionSimpleOperationResponses, GetCallWithOptionalParamData, GetCallWithoutParametersAndResponseData, HeadCallWithoutParametersAndResponseData, ImportData, ImportResponses, MultipartRequestData, MultipartResponseData, MultipartResponseResponses, NonAsciiæøåÆøÅöôêÊ字符串Data, NonAsciiæøåÆøÅöôêÊ字符串Responses, OptionsCallWithoutParametersAndResponseData, PatchApiVbyApiVersionNoTagData, PatchApiVbyApiVersionNoTagResponses, PatchCallWithoutParametersAndResponseData, PostApiVbyApiVersionFormDataData, PostApiVbyApiVersionRequestBodyData, PostCallWithOptionalParamData, PostCallWithOptionalParamResponses, PostCallWithoutParametersAndResponseData, PutCallWithoutParametersAndResponseData, PutWithFormUrlEncodedData, TestErrorCodeData, TestErrorCodeErrors, TestErrorCodeResponses, TypesData, TypesResponses, UploadFileData, UploadFileResponses } from './types.gen.ts';\n\nexport type Options<TData extends TDataShape = TDataShape, ThrowOnError extends boolean = boolean> = Options2<TData, ThrowOnError> & {\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\nexport const export_ = <ThrowOnError extends boolean = false>(options?: Options<ExportData, ThrowOnError>) => (options?.client ?? client).get<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/no+tag', ...options });\n\nexport const patchApiVbyApiVersionNoTag = <ThrowOnError extends boolean = false>(options?: Options<PatchApiVbyApiVersionNoTagData, ThrowOnError>) => (options?.client ?? client).patch<PatchApiVbyApiVersionNoTagResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/no+tag', ...options });\n\nexport const import_ = <ThrowOnError extends boolean = false>(options: Options<ImportData, ThrowOnError>) => (options.client ?? client).post<ImportResponses, unknown, ThrowOnError>({\n    responseType: 'json',\n    url: '/api/v{api-version}/no+tag',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options.headers\n    }\n});\n\nexport const fooWow = <ThrowOnError extends boolean = false>(options?: Options<FooWowData, ThrowOnError>) => (options?.client ?? client).put<FooWowResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/no+tag', ...options });\n\nexport const apiVVersionODataControllerCount = <ThrowOnError extends boolean = false>(options?: Options<ApiVVersionODataControllerCountData, ThrowOnError>) => (options?.client ?? client).get<ApiVVersionODataControllerCountResponses, unknown, ThrowOnError>({\n    responseType: 'json',\n    url: '/api/v{api-version}/simple/$count',\n    ...options\n});\n\nexport const getApiVbyApiVersionSimpleOperation = <ThrowOnError extends boolean = false>(options: Options<GetApiVbyApiVersionSimpleOperationData, ThrowOnError>) => (options.client ?? client).get<GetApiVbyApiVersionSimpleOperationResponses, GetApiVbyApiVersionSimpleOperationErrors, ThrowOnError>({\n    responseType: 'json',\n    url: '/api/v{api-version}/simple:operation',\n    ...options\n});\n\nexport const deleteCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<DeleteCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).delete<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const getCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<GetCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).get<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const headCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<HeadCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).head<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const optionsCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<OptionsCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).options<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const patchCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<PatchCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).patch<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const postCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<PostCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).post<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const putCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<PutCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).put<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const deleteFoo = <ThrowOnError extends boolean = false>(options: Options<DeleteFooData3, ThrowOnError>) => (options.client ?? client).delete<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/foo/{foo_param}/bar/{BarParam}', ...options });\n\nexport const callWithDescriptions = <ThrowOnError extends boolean = false>(options?: Options<CallWithDescriptionsData, ThrowOnError>) => (options?.client ?? client).post<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/descriptions', ...options });\n\n/**\n * @deprecated\n */\nexport const deprecatedCall = <ThrowOnError extends boolean = false>(options: Options<DeprecatedCallData, ThrowOnError>) => (options.client ?? client).post<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/parameters/deprecated', ...options });\n\nexport const callWithParameters = <ThrowOnError extends boolean = false>(options: Options<CallWithParametersData, ThrowOnError>) => (options.client ?? client).post<unknown, unknown, ThrowOnError>({\n    url: '/api/v{api-version}/parameters/{parameterPath}',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options.headers\n    }\n});\n\nexport const callWithWeirdParameterNames = <ThrowOnError extends boolean = false>(options: Options<CallWithWeirdParameterNamesData, ThrowOnError>) => (options.client ?? client).post<unknown, unknown, ThrowOnError>({\n    url: '/api/v{api-version}/parameters/{parameter.path.1}/{parameter-path-2}/{PARAMETER-PATH-3}',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options.headers\n    }\n});\n\nexport const getCallWithOptionalParam = <ThrowOnError extends boolean = false>(options: Options<GetCallWithOptionalParamData, ThrowOnError>) => (options.client ?? client).get<unknown, unknown, ThrowOnError>({\n    url: '/api/v{api-version}/parameters',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options.headers\n    }\n});\n\nexport const postCallWithOptionalParam = <ThrowOnError extends boolean = false>(options: Options<PostCallWithOptionalParamData, ThrowOnError>) => (options.client ?? client).post<PostCallWithOptionalParamResponses, unknown, ThrowOnError>({\n    responseType: 'json',\n    url: '/api/v{api-version}/parameters',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options.headers\n    }\n});\n\nexport const postApiVbyApiVersionRequestBody = <ThrowOnError extends boolean = false>(options?: Options<PostApiVbyApiVersionRequestBodyData, ThrowOnError>) => (options?.client ?? client).post<unknown, unknown, ThrowOnError>({\n    url: '/api/v{api-version}/requestBody',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options?.headers\n    }\n});\n\nexport const postApiVbyApiVersionFormData = <ThrowOnError extends boolean = false>(options?: Options<PostApiVbyApiVersionFormDataData, ThrowOnError>) => (options?.client ?? client).post<unknown, unknown, ThrowOnError>({\n    ...formDataBodySerializer,\n    url: '/api/v{api-version}/formData',\n    ...options,\n    headers: {\n        'Content-Type': null,\n        ...options?.headers\n    }\n});\n\nexport const callWithDefaultParameters = <ThrowOnError extends boolean = false>(options?: Options<CallWithDefaultParametersData, ThrowOnError>) => (options?.client ?? client).get<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/defaults', ...options });\n\nexport const callWithDefaultOptionalParameters = <ThrowOnError extends boolean = false>(options?: Options<CallWithDefaultOptionalParametersData, ThrowOnError>) => (options?.client ?? client).post<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/defaults', ...options });\n\nexport const callToTestOrderOfParams = <ThrowOnError extends boolean = false>(options: Options<CallToTestOrderOfParamsData, ThrowOnError>) => (options.client ?? client).put<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/defaults', ...options });\n\nexport const duplicateName = <ThrowOnError extends boolean = false>(options?: Options<DuplicateNameData, ThrowOnError>) => (options?.client ?? client).delete<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/duplicate', ...options });\n\nexport const duplicateName2 = <ThrowOnError extends boolean = false>(options?: Options<DuplicateName2Data, ThrowOnError>) => (options?.client ?? client).get<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/duplicate', ...options });\n\nexport const duplicateName3 = <ThrowOnError extends boolean = false>(options?: Options<DuplicateName3Data, ThrowOnError>) => (options?.client ?? client).post<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/duplicate', ...options });\n\nexport const duplicateName4 = <ThrowOnError extends boolean = false>(options?: Options<DuplicateName4Data, ThrowOnError>) => (options?.client ?? client).put<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/duplicate', ...options });\n\nexport const callWithNoContentResponse = <ThrowOnError extends boolean = false>(options?: Options<CallWithNoContentResponseData, ThrowOnError>) => (options?.client ?? client).get<CallWithNoContentResponseResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/no-content', ...options });\n\nexport const callWithResponseAndNoContentResponse = <ThrowOnError extends boolean = false>(options?: Options<CallWithResponseAndNoContentResponseData, ThrowOnError>) => (options?.client ?? client).get<CallWithResponseAndNoContentResponseResponses, unknown, ThrowOnError>({\n    responseType: 'json',\n    url: '/api/v{api-version}/multiple-tags/response-and-no-content',\n    ...options\n});\n\nexport const dummyA = <ThrowOnError extends boolean = false>(options?: Options<DummyAData, ThrowOnError>) => (options?.client ?? client).get<DummyAResponses, unknown, ThrowOnError>({\n    responseType: 'json',\n    url: '/api/v{api-version}/multiple-tags/a',\n    ...options\n});\n\nexport const dummyB = <ThrowOnError extends boolean = false>(options?: Options<DummyBData, ThrowOnError>) => (options?.client ?? client).get<DummyBResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/multiple-tags/b', ...options });\n\nexport const callWithResponse = <ThrowOnError extends boolean = false>(options?: Options<CallWithResponseData, ThrowOnError>) => (options?.client ?? client).get<CallWithResponseResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/response', ...options });\n\nexport const callWithDuplicateResponses = <ThrowOnError extends boolean = false>(options?: Options<CallWithDuplicateResponsesData, ThrowOnError>) => (options?.client ?? client).post<CallWithDuplicateResponsesResponses, CallWithDuplicateResponsesErrors, ThrowOnError>({\n    responseType: 'json',\n    url: '/api/v{api-version}/response',\n    ...options\n});\n\nexport const callWithResponses = <ThrowOnError extends boolean = false>(options?: Options<CallWithResponsesData, ThrowOnError>) => (options?.client ?? client).put<CallWithResponsesResponses, CallWithResponsesErrors, ThrowOnError>({\n    responseType: 'json',\n    url: '/api/v{api-version}/response',\n    ...options\n});\n\nexport const collectionFormat = <ThrowOnError extends boolean = false>(options: Options<CollectionFormatData, ThrowOnError>) => (options.client ?? client).get<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/collectionFormat', ...options });\n\nexport const types = <ThrowOnError extends boolean = false>(options: Options<TypesData, ThrowOnError>) => (options.client ?? client).get<TypesResponses, unknown, ThrowOnError>({\n    responseType: 'json',\n    url: '/api/v{api-version}/types',\n    ...options\n});\n\nexport const uploadFile = <ThrowOnError extends boolean = false>(options: Options<UploadFileData, ThrowOnError>) => (options.client ?? client).post<UploadFileResponses, unknown, ThrowOnError>({\n    ...urlSearchParamsBodySerializer,\n    responseType: 'json',\n    url: '/api/v{api-version}/upload',\n    ...options,\n    headers: {\n        'Content-Type': 'application/x-www-form-urlencoded',\n        ...options.headers\n    }\n});\n\nexport const fileResponse = <ThrowOnError extends boolean = false>(options: Options<FileResponseData, ThrowOnError>) => (options.client ?? client).get<FileResponseResponses, unknown, ThrowOnError>({\n    responseType: 'blob',\n    url: '/api/v{api-version}/file/{id}',\n    ...options\n});\n\nexport const complexTypes = <ThrowOnError extends boolean = false>(options: Options<ComplexTypesData, ThrowOnError>) => (options.client ?? client).get<ComplexTypesResponses, ComplexTypesErrors, ThrowOnError>({\n    querySerializer: { parameters: { parameterObject: { object: { style: 'form' } } } },\n    responseType: 'json',\n    url: '/api/v{api-version}/complex',\n    ...options\n});\n\nexport const multipartResponse = <ThrowOnError extends boolean = false>(options?: Options<MultipartResponseData, ThrowOnError>) => (options?.client ?? client).get<MultipartResponseResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/multipart', ...options });\n\nexport const multipartRequest = <ThrowOnError extends boolean = false>(options?: Options<MultipartRequestData, ThrowOnError>) => (options?.client ?? client).post<unknown, unknown, ThrowOnError>({\n    ...formDataBodySerializer,\n    url: '/api/v{api-version}/multipart',\n    ...options,\n    headers: {\n        'Content-Type': null,\n        ...options?.headers\n    }\n});\n\nexport const complexParams = <ThrowOnError extends boolean = false>(options: Options<ComplexParamsData, ThrowOnError>) => (options.client ?? client).put<ComplexParamsResponses, unknown, ThrowOnError>({\n    responseType: 'json',\n    url: '/api/v{api-version}/complex/{id}',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json-patch+json',\n        ...options.headers\n    }\n});\n\nexport const callWithResultFromHeader = <ThrowOnError extends boolean = false>(options?: Options<CallWithResultFromHeaderData, ThrowOnError>) => (options?.client ?? client).post<CallWithResultFromHeaderResponses, CallWithResultFromHeaderErrors, ThrowOnError>({ url: '/api/v{api-version}/header', ...options });\n\nexport const testErrorCode = <ThrowOnError extends boolean = false>(options: Options<TestErrorCodeData, ThrowOnError>) => (options.client ?? client).post<TestErrorCodeResponses, TestErrorCodeErrors, ThrowOnError>({ url: '/api/v{api-version}/error', ...options });\n\nexport const nonAsciiæøåÆøÅöôêÊ字符串 = <ThrowOnError extends boolean = false>(options: Options<NonAsciiæøåÆøÅöôêÊ字符串Data, ThrowOnError>) => (options.client ?? client).post<NonAsciiæøåÆøÅöôêÊ字符串Responses, unknown, ThrowOnError>({\n    responseType: 'json',\n    url: '/api/v{api-version}/non-ascii-æøåÆØÅöôêÊ字符串',\n    ...options\n});\n\n/**\n * Login User\n */\nexport const putWithFormUrlEncoded = <ThrowOnError extends boolean = false>(options: Options<PutWithFormUrlEncodedData, ThrowOnError>) => (options.client ?? client).put<unknown, unknown, ThrowOnError>({\n    ...urlSearchParamsBodySerializer,\n    url: '/api/v{api-version}/non-ascii-æøåÆØÅöôêÊ字符串',\n    ...options,\n    headers: {\n        'Content-Type': 'application/x-www-form-urlencoded',\n        ...options.headers\n    }\n});\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-axios/import-file-extension-ts/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type ClientOptions = {\n    baseURL: 'http://localhost:3000/base' | (string & {});\n};\n\n/**\n * Model with number-only name\n */\nexport type _400 = string;\n\n/**\n * External ref to shared model (A)\n */\nexport type ExternalRefA = ExternalSharedModel;\n\n/**\n * External ref to shared model (B)\n */\nexport type ExternalRefB = ExternalSharedModel;\n\n/**\n * Testing multiline comments in string: First line\n * Second line\n *\n * Fourth line\n */\nexport type CamelCaseCommentWithBreaks = number;\n\n/**\n * Testing multiline comments in string: First line\n * Second line\n *\n * Fourth line\n */\nexport type CommentWithBreaks = number;\n\n/**\n * Testing backticks in string: `backticks` and ```multiple backticks``` should work\n */\nexport type CommentWithBackticks = number;\n\n/**\n * Testing backticks and quotes in string: `backticks`, 'quotes', \"double quotes\" and ```multiple backticks``` should work\n */\nexport type CommentWithBackticksAndQuotes = number;\n\n/**\n * Testing slashes in string: \\backwards\\\\\\ and /forwards/// should work\n */\nexport type CommentWithSlashes = number;\n\n/**\n * Testing expression placeholders in string: ${expression} should work\n */\nexport type CommentWithExpressionPlaceholders = number;\n\n/**\n * Testing quotes in string: 'single quote''' and \"double quotes\"\"\" should work\n */\nexport type CommentWithQuotes = number;\n\n/**\n * Testing reserved characters in string: * inline * and ** inline ** should work\n */\nexport type CommentWithReservedCharacters = number;\n\n/**\n * This is a simple number\n */\nexport type SimpleInteger = number;\n\n/**\n * This is a simple boolean\n */\nexport type SimpleBoolean = boolean;\n\n/**\n * This is a simple string\n */\nexport type SimpleString = string;\n\n/**\n * A string with non-ascii (unicode) characters valid in typescript identifiers (æøåÆØÅöÔèÈ字符串)\n */\nexport type NonAsciiStringæøåÆøÅöôêÊ字符串 = string;\n\n/**\n * This is a simple file\n */\nexport type SimpleFile = Blob | File;\n\n/**\n * This is a simple reference\n */\nexport type SimpleReference = ModelWithString;\n\n/**\n * This is a simple string\n */\nexport type SimpleStringWithPattern = string | null;\n\n/**\n * This is a simple enum with strings\n */\nexport type EnumWithStrings = 'Success' | 'Warning' | 'Error' | '\\'Single Quote\\'' | '\"Double Quotes\"' | 'Non-ascii: øæåôöØÆÅÔÖ字符串';\n\nexport type EnumWithReplacedCharacters = '\\'Single Quote\\'' | '\"Double Quotes\"' | 'øæåôöØÆÅÔÖ字符串' | 3.1 | '';\n\n/**\n * This is a simple enum with numbers\n */\nexport type EnumWithNumbers = 1 | 2 | 3 | 1.1 | 1.2 | 1.3 | 100 | 200 | 300 | -100 | -200 | -300 | -1.1 | -1.2 | -1.3;\n\n/**\n * Success=1,Warning=2,Error=3\n */\nexport type EnumFromDescription = number;\n\n/**\n * This is a simple enum with numbers\n */\nexport type EnumWithExtensions = 200 | 400 | 500;\n\nexport type EnumWithXEnumNames = 0 | 1 | 2;\n\n/**\n * This is a simple array with numbers\n */\nexport type ArrayWithNumbers = Array<number>;\n\n/**\n * This is a simple array with booleans\n */\nexport type ArrayWithBooleans = Array<boolean>;\n\n/**\n * This is a simple array with strings\n */\nexport type ArrayWithStrings = Array<string>;\n\n/**\n * This is a simple array with references\n */\nexport type ArrayWithReferences = Array<ModelWithString>;\n\n/**\n * This is a simple array containing an array\n */\nexport type ArrayWithArray = Array<Array<ModelWithString>>;\n\n/**\n * This is a simple array with properties\n */\nexport type ArrayWithProperties = Array<{\n    '16x16'?: CamelCaseCommentWithBreaks;\n    bar?: string;\n}>;\n\n/**\n * This is a simple array with any of properties\n */\nexport type ArrayWithAnyOfProperties = Array<{\n    foo?: string;\n} | {\n    bar?: string;\n}>;\n\nexport type AnyOfAnyAndNull = {\n    data?: unknown | null;\n};\n\n/**\n * This is a simple array with any of properties\n */\nexport type AnyOfArrays = {\n    results?: Array<{\n        foo?: string;\n    } | {\n        bar?: string;\n    }>;\n};\n\n/**\n * This is a string dictionary\n */\nexport type DictionaryWithString = {\n    [key: string]: string;\n};\n\nexport type DictionaryWithPropertiesAndAdditionalProperties = {\n    foo?: number;\n    bar?: boolean;\n    [key: string]: string | number | boolean | undefined;\n};\n\n/**\n * This is a string reference\n */\nexport type DictionaryWithReference = {\n    [key: string]: ModelWithString;\n};\n\n/**\n * This is a complex dictionary\n */\nexport type DictionaryWithArray = {\n    [key: string]: Array<ModelWithString>;\n};\n\n/**\n * This is a string dictionary\n */\nexport type DictionaryWithDictionary = {\n    [key: string]: {\n        [key: string]: string;\n    };\n};\n\n/**\n * This is a complex dictionary\n */\nexport type DictionaryWithProperties = {\n    [key: string]: {\n        foo?: string;\n        bar?: string;\n    };\n};\n\n/**\n * This is a model with one number property\n */\nexport type ModelWithInteger = {\n    /**\n     * This is a simple number property\n     */\n    prop?: number;\n};\n\n/**\n * This is a model with one boolean property\n */\nexport type ModelWithBoolean = {\n    /**\n     * This is a simple boolean property\n     */\n    prop?: boolean;\n};\n\n/**\n * This is a model with one string property\n */\nexport type ModelWithString = {\n    /**\n     * This is a simple string property\n     */\n    prop?: string;\n};\n\n/**\n * This is a model with one string property\n */\nexport type ModelWithStringError = {\n    /**\n     * This is a simple string property\n     */\n    prop?: string;\n};\n\n/**\n * `Comment` or `VoiceComment`. The JSON object for adding voice comments to tickets is different. See [Adding voice comments to tickets](/documentation/ticketing/managing-tickets/adding-voice-comments-to-tickets)\n */\nexport type ModelFromZendesk = string;\n\n/**\n * This is a model with one string property\n */\nexport type ModelWithNullableString = {\n    /**\n     * This is a simple string property\n     */\n    nullableProp1?: string | null;\n    /**\n     * This is a simple string property\n     */\n    nullableRequiredProp1: string | null;\n    /**\n     * This is a simple string property\n     */\n    nullableProp2?: string | null;\n    /**\n     * This is a simple string property\n     */\n    nullableRequiredProp2: string | null;\n    /**\n     * This is a simple enum with strings\n     */\n    'foo_bar-enum'?: 'Success' | 'Warning' | 'Error' | 'ØÆÅ字符串';\n};\n\n/**\n * This is a model with one enum\n */\nexport type ModelWithEnum = {\n    /**\n     * This is a simple enum with strings\n     */\n    'foo_bar-enum'?: 'Success' | 'Warning' | 'Error' | 'ØÆÅ字符串';\n    /**\n     * These are the HTTP error code enums\n     */\n    statusCode?: '100' | '200 FOO' | '300 FOO_BAR' | '400 foo-bar' | '500 foo.bar' | '600 foo&bar';\n    /**\n     * Simple boolean enum\n     */\n    bool?: true;\n};\n\n/**\n * This is a model with one enum with escaped name\n */\nexport type ModelWithEnumWithHyphen = {\n    /**\n     * Foo-Bar-Baz-Qux\n     */\n    'foo-bar-baz-qux'?: '3.0';\n};\n\n/**\n * This is a model with one enum\n */\nexport type ModelWithEnumFromDescription = {\n    /**\n     * Success=1,Warning=2,Error=3\n     */\n    test?: number;\n};\n\n/**\n * This is a model with nested enums\n */\nexport type ModelWithNestedEnums = {\n    dictionaryWithEnum?: {\n        [key: string]: 'Success' | 'Warning' | 'Error';\n    };\n    dictionaryWithEnumFromDescription?: {\n        [key: string]: number;\n    };\n    arrayWithEnum?: Array<'Success' | 'Warning' | 'Error'>;\n    arrayWithDescription?: Array<number>;\n    /**\n     * This is a simple enum with strings\n     */\n    'foo_bar-enum'?: 'Success' | 'Warning' | 'Error' | 'ØÆÅ字符串';\n};\n\n/**\n * This is a model with one property containing a reference\n */\nexport type ModelWithReference = {\n    prop?: ModelWithProperties;\n};\n\n/**\n * This is a model with one property containing an array\n */\nexport type ModelWithArrayReadOnlyAndWriteOnly = {\n    prop?: Array<ModelWithReadOnlyAndWriteOnly>;\n    propWithFile?: Array<Blob | File>;\n    propWithNumber?: Array<number>;\n};\n\n/**\n * This is a model with one property containing an array\n */\nexport type ModelWithArray = {\n    prop?: Array<ModelWithString>;\n    propWithFile?: Array<Blob | File>;\n    propWithNumber?: Array<number>;\n};\n\n/**\n * This is a model with one property containing a dictionary\n */\nexport type ModelWithDictionary = {\n    prop?: {\n        [key: string]: string;\n    };\n};\n\n/**\n * This is a deprecated model with a deprecated property\n *\n * @deprecated\n */\nexport type DeprecatedModel = {\n    /**\n     * This is a deprecated property\n     *\n     * @deprecated\n     */\n    prop?: string;\n};\n\n/**\n * This is a model with one property containing a circular reference\n */\nexport type ModelWithCircularReference = {\n    prop?: ModelWithCircularReference;\n};\n\n/**\n * This is a model with one property with a 'one of' relationship\n */\nexport type CompositionWithOneOf = {\n    propA?: ModelWithString | ModelWithEnum | ModelWithArray | ModelWithDictionary;\n};\n\n/**\n * This is a model with one property with a 'one of' relationship where the options are not $ref\n */\nexport type CompositionWithOneOfAnonymous = {\n    propA?: {\n        propA?: string;\n    } | string | number;\n};\n\n/**\n * Circle\n */\nexport type ModelCircle = {\n    kind: string;\n    radius?: number;\n};\n\n/**\n * Square\n */\nexport type ModelSquare = {\n    kind: string;\n    sideLength?: number;\n};\n\n/**\n * This is a model with one property with a 'one of' relationship where the options are not $ref\n */\nexport type CompositionWithOneOfDiscriminator = ({\n    kind: 'circle';\n} & ModelCircle) | ({\n    kind: 'square';\n} & ModelSquare);\n\n/**\n * This is a model with one property with a 'any of' relationship\n */\nexport type CompositionWithAnyOf = {\n    propA?: ModelWithString | ModelWithEnum | ModelWithArray | ModelWithDictionary;\n};\n\n/**\n * This is a model with one property with a 'any of' relationship where the options are not $ref\n */\nexport type CompositionWithAnyOfAnonymous = {\n    propA?: {\n        propA?: string;\n    } | string | number;\n};\n\n/**\n * This is a model with nested 'any of' property with a type null\n */\nexport type CompositionWithNestedAnyAndTypeNull = {\n    propA?: Array<ModelWithDictionary | null> | Array<ModelWithArray | null>;\n};\n\nexport type _3eNum1Период = 'Bird' | 'Dog';\n\nexport type ConstValue = 'ConstValue';\n\n/**\n * This is a model with one property with a 'any of' relationship where the options are not $ref\n */\nexport type CompositionWithNestedAnyOfAndNull = {\n    /**\n     * Scopes\n     */\n    propA?: Array<_3eNum1Период | ConstValue> | null;\n};\n\n/**\n * This is a model with one property with a 'one of' relationship\n */\nexport type CompositionWithOneOfAndNullable = {\n    propA?: {\n        boolean?: boolean;\n    } | ModelWithEnum | ModelWithArray | ModelWithDictionary | null;\n};\n\n/**\n * This is a model that contains a simple dictionary within composition\n */\nexport type CompositionWithOneOfAndSimpleDictionary = {\n    propA?: boolean | {\n        [key: string]: number;\n    };\n};\n\n/**\n * This is a model that contains a dictionary of simple arrays within composition\n */\nexport type CompositionWithOneOfAndSimpleArrayDictionary = {\n    propA?: boolean | {\n        [key: string]: Array<boolean>;\n    };\n};\n\n/**\n * This is a model that contains a dictionary of complex arrays (composited) within composition\n */\nexport type CompositionWithOneOfAndComplexArrayDictionary = {\n    propA?: boolean | {\n        [key: string]: Array<number | string>;\n    };\n};\n\n/**\n * This is a model with one property with a 'all of' relationship\n */\nexport type CompositionWithAllOfAndNullable = {\n    propA?: ({\n        boolean?: boolean;\n    } & ModelWithEnum & ModelWithArray & ModelWithDictionary) | null;\n};\n\n/**\n * This is a model with one property with a 'any of' relationship\n */\nexport type CompositionWithAnyOfAndNullable = {\n    propA?: {\n        boolean?: boolean;\n    } | ModelWithEnum | ModelWithArray | ModelWithDictionary | null;\n};\n\n/**\n * This is a base model with two simple optional properties\n */\nexport type CompositionBaseModel = {\n    firstName?: string;\n    lastname?: string;\n};\n\n/**\n * This is a model that extends the base model\n */\nexport type CompositionExtendedModel = CompositionBaseModel & {\n    age: number;\n    firstName: string;\n    lastname: string;\n};\n\n/**\n * This is a model with one nested property\n */\nexport type ModelWithProperties = {\n    required: string;\n    readonly requiredAndReadOnly: string;\n    requiredAndNullable: string | null;\n    string?: string;\n    number?: number;\n    boolean?: boolean;\n    reference?: ModelWithString;\n    'property with space'?: string;\n    default?: string;\n    try?: string;\n    readonly '@namespace.string'?: string;\n    readonly '@namespace.integer'?: number;\n};\n\n/**\n * This is a model with one nested property\n */\nexport type ModelWithNestedProperties = {\n    readonly first: {\n        readonly second: {\n            readonly third: string | null;\n        } | null;\n    } | null;\n};\n\n/**\n * This is a model with duplicated properties\n */\nexport type ModelWithDuplicateProperties = {\n    prop?: ModelWithString;\n};\n\n/**\n * This is a model with ordered properties\n */\nexport type ModelWithOrderedProperties = {\n    zebra?: string;\n    apple?: string;\n    hawaii?: string;\n};\n\n/**\n * This is a model with duplicated imports\n */\nexport type ModelWithDuplicateImports = {\n    propA?: ModelWithString;\n    propB?: ModelWithString;\n    propC?: ModelWithString;\n};\n\n/**\n * This is a model that extends another model\n */\nexport type ModelThatExtends = ModelWithString & {\n    propExtendsA?: string;\n    propExtendsB?: ModelWithString;\n};\n\n/**\n * This is a model that extends another model\n */\nexport type ModelThatExtendsExtends = ModelWithString & ModelThatExtends & {\n    propExtendsC?: string;\n    propExtendsD?: ModelWithString;\n};\n\n/**\n * This is a model that contains a some patterns\n */\nexport type ModelWithPattern = {\n    key: string;\n    name: string;\n    readonly enabled?: boolean;\n    readonly modified?: string;\n    id?: string;\n    text?: string;\n    patternWithSingleQuotes?: string;\n    patternWithNewline?: string;\n    patternWithBacktick?: string;\n    patternWithUnicode?: string;\n};\n\nexport type File = {\n    /**\n     * Id\n     */\n    readonly id?: string;\n    /**\n     * Updated at\n     */\n    readonly updated_at?: string;\n    /**\n     * Created at\n     */\n    readonly created_at?: string;\n    /**\n     * Mime\n     */\n    mime: string;\n    /**\n     * File\n     */\n    readonly file?: string;\n};\n\nexport type Default = {\n    name?: string;\n};\n\nexport type Pageable = {\n    page?: number;\n    size?: number;\n    sort?: Array<string>;\n};\n\n/**\n * This is a free-form object without additionalProperties.\n */\nexport type FreeFormObjectWithoutAdditionalProperties = {\n    [key: string]: unknown;\n};\n\n/**\n * This is a free-form object with additionalProperties: true.\n */\nexport type FreeFormObjectWithAdditionalPropertiesEqTrue = {\n    [key: string]: unknown;\n};\n\n/**\n * This is a free-form object with additionalProperties: {}.\n */\nexport type FreeFormObjectWithAdditionalPropertiesEqEmptyObject = {\n    [key: string]: unknown;\n};\n\nexport type ModelWithConst = {\n    String?: 'String';\n    number?: 0;\n    null?: null;\n    withType?: 'Some string';\n};\n\n/**\n * This is a model with one property and additionalProperties: true\n */\nexport type ModelWithAdditionalPropertiesEqTrue = {\n    /**\n     * This is a simple string property\n     */\n    prop?: string;\n    [key: string]: unknown;\n};\n\nexport type NestedAnyOfArraysNullable = {\n    nullableArray?: Array<string | boolean> | null;\n};\n\nexport type CompositionWithOneOfAndProperties = ({\n    foo: SimpleParameter;\n} | {\n    bar: NonAsciiStringæøåÆøÅöôêÊ字符串;\n}) & {\n    baz: number | null;\n    qux: number;\n};\n\n/**\n * An object that can be null\n */\nexport type NullableObject = {\n    foo?: string;\n} | null;\n\n/**\n * Some % character\n */\nexport type CharactersInDescription = string;\n\nexport type ModelWithNullableObject = {\n    data?: NullableObject;\n};\n\n/**\n * An object with additional properties that can be null (anyOf ref + null)\n */\nexport type ModelWithAdditionalPropertiesRef = {\n    [key: string]: NullableObject | null;\n};\n\nexport type ModelWithOneOfEnum = {\n    foo: 'Bar';\n} | {\n    foo: 'Baz';\n} | {\n    foo: 'Qux';\n} | {\n    content: string;\n    foo: 'Quux';\n} | {\n    content: [\n        string,\n        string\n    ];\n    foo: 'Corge';\n};\n\nexport type ModelWithNestedArrayEnumsDataFoo = 'foo' | 'bar';\n\nexport type ModelWithNestedArrayEnumsDataBar = 'baz' | 'qux';\n\nexport type ModelWithNestedArrayEnumsData = {\n    foo?: Array<ModelWithNestedArrayEnumsDataFoo>;\n    bar?: Array<ModelWithNestedArrayEnumsDataBar>;\n};\n\nexport type ModelWithNestedArrayEnums = {\n    array_strings?: Array<string>;\n    data?: ModelWithNestedArrayEnumsData;\n};\n\nexport type ModelWithNestedCompositionEnums = {\n    foo?: ModelWithNestedArrayEnumsDataFoo;\n};\n\nexport type ModelWithReadOnlyAndWriteOnly = {\n    foo: string;\n    readonly bar: string;\n};\n\nexport type ModelWithConstantSizeArray = [\n    number,\n    number\n];\n\nexport type ModelWithAnyOfConstantSizeArray = [\n    number | string,\n    number | string,\n    number | string\n];\n\nexport type ModelWithPrefixItemsConstantSizeArray = [\n    ModelWithInteger,\n    number | string,\n    string\n];\n\nexport type ModelWithAnyOfConstantSizeArrayNullable = [\n    number | null | string,\n    number | null | string,\n    number | null | string\n];\n\nexport type ModelWithAnyOfConstantSizeArrayWithNSizeAndOptions = [\n    number | Import,\n    number | Import\n];\n\nexport type ModelWithAnyOfConstantSizeArrayAndIntersect = [\n    number & string,\n    number & string\n];\n\nexport type ModelWithNumericEnumUnion = {\n    /**\n     * Период\n     */\n    value?: -10 | -1 | 0 | 1 | 3 | 6 | 12;\n};\n\n/**\n * Some description with `back ticks`\n */\nexport type ModelWithBackticksInDescription = {\n    /**\n     * The template `that` should be used for parsing and importing the contents of the CSV file.\n     *\n     * <br/><p>There is one placeholder currently supported:<ul>     <li><b>${x}</b> - refers to the n-th column in the CSV file, e.g. ${1}, ${2}, ...)</li></ul><p>Example of a correct JSON template:</p>\n     * <pre>\n     * [\n     * {\n     * \"resourceType\": \"Asset\",\n     * \"identifier\": {\n     * \"name\": \"${1}\",\n     * \"domain\": {\n     * \"name\": \"${2}\",\n     * \"community\": {\n     * \"name\": \"Some Community\"\n     * }\n     * }\n     * },\n     * \"attributes\" : {\n     * \"00000000-0000-0000-0000-000000003115\" : [ {\n     * \"value\" : \"${3}\"\n     * } ],\n     * \"00000000-0000-0000-0000-000000000222\" : [ {\n     * \"value\" : \"${4}\"\n     * } ]\n     * }\n     * }\n     * ]\n     * </pre>\n     */\n    template?: string;\n};\n\nexport type ModelWithOneOfAndProperties = (SimpleParameter | NonAsciiStringæøåÆøÅöôêÊ字符串) & {\n    baz: number | null;\n    qux: number;\n};\n\n/**\n * Model used to test deduplication strategy (unused)\n */\nexport type ParameterSimpleParameterUnused = string;\n\n/**\n * Model used to test deduplication strategy\n */\nexport type PostServiceWithEmptyTagResponse = string;\n\n/**\n * Model used to test deduplication strategy\n */\nexport type PostServiceWithEmptyTagResponse2 = string;\n\n/**\n * Model used to test deduplication strategy\n */\nexport type DeleteFooData = string;\n\n/**\n * Model used to test deduplication strategy\n */\nexport type DeleteFooData2 = string;\n\n/**\n * Model with restricted keyword name\n */\nexport type Import = string;\n\nexport type SchemaWithFormRestrictedKeys = {\n    description?: string;\n    'x-enum-descriptions'?: string;\n    'x-enum-varnames'?: string;\n    'x-enumNames'?: string;\n    title?: string;\n    object?: {\n        description?: string;\n        'x-enum-descriptions'?: string;\n        'x-enum-varnames'?: string;\n        'x-enumNames'?: string;\n        title?: string;\n    };\n    array?: Array<{\n        description?: string;\n        'x-enum-descriptions'?: string;\n        'x-enum-varnames'?: string;\n        'x-enumNames'?: string;\n        title?: string;\n    }>;\n};\n\n/**\n * This schema was giving PascalCase transformations a hard time\n */\nexport type IoK8sApimachineryPkgApisMetaV1DeleteOptions = {\n    /**\n     * Must be fulfilled before a deletion is carried out. If not possible, a 409 Conflict status will be returned.\n     */\n    preconditions?: IoK8sApimachineryPkgApisMetaV1Preconditions;\n};\n\n/**\n * This schema was giving PascalCase transformations a hard time\n */\nexport type IoK8sApimachineryPkgApisMetaV1Preconditions = {\n    /**\n     * Specifies the target ResourceVersion\n     */\n    resourceVersion?: string;\n    /**\n     * Specifies the target UID.\n     */\n    uid?: string;\n};\n\nexport type AdditionalPropertiesUnknownIssue = {\n    [key: string]: string | number;\n};\n\nexport type AdditionalPropertiesUnknownIssue2 = {\n    [key: string]: string | number;\n};\n\nexport type AdditionalPropertiesUnknownIssue3 = string & {\n    entries: {\n        [key: string]: AdditionalPropertiesUnknownIssue;\n    };\n};\n\nexport type AdditionalPropertiesIntegerIssue = {\n    value: number;\n    [key: string]: number;\n};\n\nexport type OneOfAllOfIssue = ((ConstValue | GenericSchemaDuplicateIssue1SystemBoolean) & _3eNum1Период) | GenericSchemaDuplicateIssue1SystemString;\n\nexport type GenericSchemaDuplicateIssue1SystemBoolean = {\n    item?: boolean;\n    error?: string | null;\n    readonly hasError?: boolean;\n    data?: {\n        [key: string]: never;\n    };\n};\n\nexport type GenericSchemaDuplicateIssue1SystemString = {\n    item?: string | null;\n    error?: string | null;\n    readonly hasError?: boolean;\n};\n\nexport type ExternalSharedModel = {\n    id: string;\n    name?: string;\n};\n\n/**\n * This is a model with one property containing a reference\n */\nexport type ModelWithReferenceWritable = {\n    prop?: ModelWithPropertiesWritable;\n};\n\n/**\n * This is a model with one property containing an array\n */\nexport type ModelWithArrayReadOnlyAndWriteOnlyWritable = {\n    prop?: Array<ModelWithReadOnlyAndWriteOnlyWritable>;\n    propWithFile?: Array<Blob | File>;\n    propWithNumber?: Array<number>;\n};\n\n/**\n * This is a model with one nested property\n */\nexport type ModelWithPropertiesWritable = {\n    required: string;\n    requiredAndNullable: string | null;\n    string?: string;\n    number?: number;\n    boolean?: boolean;\n    reference?: ModelWithString;\n    'property with space'?: string;\n    default?: string;\n    try?: string;\n};\n\n/**\n * This is a model that contains a some patterns\n */\nexport type ModelWithPatternWritable = {\n    key: string;\n    name: string;\n    id?: string;\n    text?: string;\n    patternWithSingleQuotes?: string;\n    patternWithNewline?: string;\n    patternWithBacktick?: string;\n    patternWithUnicode?: string;\n};\n\nexport type FileWritable = {\n    /**\n     * Mime\n     */\n    mime: string;\n};\n\nexport type ModelWithReadOnlyAndWriteOnlyWritable = {\n    foo: string;\n    baz: string;\n};\n\nexport type ModelWithAnyOfConstantSizeArrayWithNSizeAndOptionsWritable = [\n    number | Import,\n    number | Import\n];\n\nexport type AdditionalPropertiesUnknownIssueWritable = {\n    [key: string]: string | number;\n};\n\nexport type OneOfAllOfIssueWritable = ((ConstValue | GenericSchemaDuplicateIssue1SystemBoolean) & _3eNum1Период) | GenericSchemaDuplicateIssue1SystemString;\n\nexport type GenericSchemaDuplicateIssue1SystemBooleanWritable = {\n    item?: boolean;\n    error?: string | null;\n    data?: {\n        [key: string]: never;\n    };\n};\n\nexport type GenericSchemaDuplicateIssue1SystemStringWritable = {\n    item?: string | null;\n    error?: string | null;\n};\n\n/**\n * This is a reusable parameter\n */\nexport type SimpleParameter = string;\n\n/**\n * Parameter with illegal characters\n */\nexport type XFooBar = ModelWithString;\n\n/**\n * A reusable request body\n */\nexport type SimpleRequestBody = ModelWithString;\n\n/**\n * A reusable request body\n */\nexport type SimpleFormData = ModelWithString;\n\nexport type ExportData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no+tag';\n};\n\nexport type PatchApiVbyApiVersionNoTagData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no+tag';\n};\n\nexport type PatchApiVbyApiVersionNoTagResponses = {\n    /**\n     * OK\n     */\n    default: unknown;\n};\n\nexport type ImportData = {\n    body: ModelWithReadOnlyAndWriteOnlyWritable | ModelWithArrayReadOnlyAndWriteOnlyWritable;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no+tag';\n};\n\nexport type ImportResponses = {\n    /**\n     * Success\n     */\n    200: ModelFromZendesk;\n    /**\n     * Default success response\n     */\n    default: ModelWithReadOnlyAndWriteOnly;\n};\n\nexport type ImportResponse = ImportResponses[keyof ImportResponses];\n\nexport type FooWowData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no+tag';\n};\n\nexport type FooWowResponses = {\n    /**\n     * OK\n     */\n    default: unknown;\n};\n\nexport type ApiVVersionODataControllerCountData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple/$count';\n};\n\nexport type ApiVVersionODataControllerCountResponses = {\n    /**\n     * Success\n     */\n    200: ModelFromZendesk;\n};\n\nexport type ApiVVersionODataControllerCountResponse = ApiVVersionODataControllerCountResponses[keyof ApiVVersionODataControllerCountResponses];\n\nexport type GetApiVbyApiVersionSimpleOperationData = {\n    body?: never;\n    path: {\n        /**\n         * foo in method\n         */\n        foo_param: string;\n    };\n    query?: never;\n    url: '/api/v{api-version}/simple:operation';\n};\n\nexport type GetApiVbyApiVersionSimpleOperationErrors = {\n    /**\n     * Default error response\n     */\n    default: ModelWithBoolean;\n};\n\nexport type GetApiVbyApiVersionSimpleOperationError = GetApiVbyApiVersionSimpleOperationErrors[keyof GetApiVbyApiVersionSimpleOperationErrors];\n\nexport type GetApiVbyApiVersionSimpleOperationResponses = {\n    /**\n     * Response is a simple number\n     */\n    200: number;\n};\n\nexport type GetApiVbyApiVersionSimpleOperationResponse = GetApiVbyApiVersionSimpleOperationResponses[keyof GetApiVbyApiVersionSimpleOperationResponses];\n\nexport type DeleteCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type GetCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type HeadCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type OptionsCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type PatchCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type PostCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type PutCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type DeleteFooData3 = {\n    body?: never;\n    headers: {\n        /**\n         * Parameter with illegal characters\n         */\n        'x-Foo-Bar': ModelWithString;\n    };\n    path: {\n        /**\n         * foo in method\n         */\n        foo_param: string;\n        /**\n         * bar in method\n         */\n        BarParam: string;\n    };\n    query?: never;\n    url: '/api/v{api-version}/foo/{foo_param}/bar/{BarParam}';\n};\n\nexport type CallWithDescriptionsData = {\n    body?: never;\n    path?: never;\n    query?: {\n        /**\n         * Testing multiline comments in string: First line\n         * Second line\n         *\n         * Fourth line\n         */\n        parameterWithBreaks?: string;\n        /**\n         * Testing backticks in string: `backticks` and ```multiple backticks``` should work\n         */\n        parameterWithBackticks?: string;\n        /**\n         * Testing slashes in string: \\backwards\\\\\\ and /forwards/// should work\n         */\n        parameterWithSlashes?: string;\n        /**\n         * Testing expression placeholders in string: ${expression} should work\n         */\n        parameterWithExpressionPlaceholders?: string;\n        /**\n         * Testing quotes in string: 'single quote''' and \"double quotes\"\"\" should work\n         */\n        parameterWithQuotes?: string;\n        /**\n         * Testing reserved characters in string: * inline * and ** inline ** should work\n         */\n        parameterWithReservedCharacters?: string;\n    };\n    url: '/api/v{api-version}/descriptions';\n};\n\nexport type DeprecatedCallData = {\n    body?: never;\n    headers: {\n        /**\n         * This parameter is deprecated\n         *\n         * @deprecated\n         */\n        parameter: DeprecatedModel | null;\n    };\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/parameters/deprecated';\n};\n\nexport type CallWithParametersData = {\n    /**\n     * This is the parameter that goes into the body\n     */\n    body: {\n        [key: string]: unknown;\n    } | null;\n    headers: {\n        /**\n         * This is the parameter that goes into the header\n         */\n        parameterHeader: string | null;\n    };\n    path: {\n        /**\n         * This is the parameter that goes into the path\n         */\n        parameterPath: string | null;\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string | null;\n    };\n    query: {\n        foo_ref_enum?: ModelWithNestedArrayEnumsDataFoo;\n        foo_all_of_enum: ModelWithNestedArrayEnumsDataFoo;\n        /**\n         * This is the parameter that goes into the query params\n         */\n        cursor: string | null;\n    };\n    url: '/api/v{api-version}/parameters/{parameterPath}';\n};\n\nexport type CallWithWeirdParameterNamesData = {\n    /**\n     * This is the parameter that goes into the body\n     */\n    body: ModelWithString | null;\n    headers: {\n        /**\n         * This is the parameter that goes into the request header\n         */\n        'parameter.header': string | null;\n    };\n    path: {\n        /**\n         * This is the parameter that goes into the path\n         */\n        'parameter.path.1'?: string;\n        /**\n         * This is the parameter that goes into the path\n         */\n        'parameter-path-2'?: string;\n        /**\n         * This is the parameter that goes into the path\n         */\n        'PARAMETER-PATH-3'?: string;\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string | null;\n    };\n    query: {\n        /**\n         * This is the parameter with a reserved keyword\n         */\n        default?: string;\n        /**\n         * This is the parameter that goes into the request query params\n         */\n        'parameter-query': string | null;\n    };\n    url: '/api/v{api-version}/parameters/{parameter.path.1}/{parameter-path-2}/{PARAMETER-PATH-3}';\n};\n\nexport type GetCallWithOptionalParamData = {\n    /**\n     * This is a required parameter\n     */\n    body: ModelWithOneOfEnum;\n    path?: never;\n    query?: {\n        /**\n         * This is an optional parameter\n         */\n        page?: number;\n    };\n    url: '/api/v{api-version}/parameters';\n};\n\nexport type PostCallWithOptionalParamData = {\n    /**\n     * This is an optional parameter\n     */\n    body?: {\n        offset?: number | null;\n    };\n    path?: never;\n    query: {\n        /**\n         * This is a required parameter\n         */\n        parameter: Pageable;\n    };\n    url: '/api/v{api-version}/parameters';\n};\n\nexport type PostCallWithOptionalParamResponses = {\n    /**\n     * Response is a simple number\n     */\n    200: number;\n    /**\n     * Success\n     */\n    204: void;\n};\n\nexport type PostCallWithOptionalParamResponse = PostCallWithOptionalParamResponses[keyof PostCallWithOptionalParamResponses];\n\nexport type PostApiVbyApiVersionRequestBodyData = {\n    /**\n     * A reusable request body\n     */\n    body?: SimpleRequestBody;\n    path?: never;\n    query?: {\n        /**\n         * This is a reusable parameter\n         */\n        parameter?: string;\n    };\n    url: '/api/v{api-version}/requestBody';\n};\n\nexport type PostApiVbyApiVersionFormDataData = {\n    /**\n     * A reusable request body\n     */\n    body?: SimpleFormData;\n    path?: never;\n    query?: {\n        /**\n         * This is a reusable parameter\n         */\n        parameter?: string;\n    };\n    url: '/api/v{api-version}/formData';\n};\n\nexport type CallWithDefaultParametersData = {\n    body?: never;\n    path?: never;\n    query?: {\n        /**\n         * This is a simple string with default value\n         */\n        parameterString?: string | null;\n        /**\n         * This is a simple number with default value\n         */\n        parameterNumber?: number | null;\n        /**\n         * This is a simple boolean with default value\n         */\n        parameterBoolean?: boolean | null;\n        /**\n         * This is a simple enum with default value\n         */\n        parameterEnum?: 'Success' | 'Warning' | 'Error';\n        /**\n         * This is a simple model with default value\n         */\n        parameterModel?: ModelWithString | null;\n    };\n    url: '/api/v{api-version}/defaults';\n};\n\nexport type CallWithDefaultOptionalParametersData = {\n    body?: never;\n    path?: never;\n    query?: {\n        /**\n         * This is a simple string that is optional with default value\n         */\n        parameterString?: string;\n        /**\n         * This is a simple number that is optional with default value\n         */\n        parameterNumber?: number;\n        /**\n         * This is a simple boolean that is optional with default value\n         */\n        parameterBoolean?: boolean;\n        /**\n         * This is a simple enum that is optional with default value\n         */\n        parameterEnum?: 'Success' | 'Warning' | 'Error';\n        /**\n         * This is a simple model that is optional with default value\n         */\n        parameterModel?: ModelWithString;\n    };\n    url: '/api/v{api-version}/defaults';\n};\n\nexport type CallToTestOrderOfParamsData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * This is a optional string with default\n         */\n        parameterOptionalStringWithDefault?: string;\n        /**\n         * This is a optional string with empty default\n         */\n        parameterOptionalStringWithEmptyDefault?: string;\n        /**\n         * This is a optional string with no default\n         */\n        parameterOptionalStringWithNoDefault?: string;\n        /**\n         * This is a string with default\n         */\n        parameterStringWithDefault: string;\n        /**\n         * This is a string with empty default\n         */\n        parameterStringWithEmptyDefault: string;\n        /**\n         * This is a string with no default\n         */\n        parameterStringWithNoDefault: string;\n        /**\n         * This is a string that can be null with no default\n         */\n        parameterStringNullableWithNoDefault?: string | null;\n        /**\n         * This is a string that can be null with default\n         */\n        parameterStringNullableWithDefault?: string | null;\n    };\n    url: '/api/v{api-version}/defaults';\n};\n\nexport type DuplicateNameData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/duplicate';\n};\n\nexport type DuplicateName2Data = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/duplicate';\n};\n\nexport type DuplicateName3Data = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/duplicate';\n};\n\nexport type DuplicateName4Data = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/duplicate';\n};\n\nexport type CallWithNoContentResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no-content';\n};\n\nexport type CallWithNoContentResponseResponses = {\n    /**\n     * Success\n     */\n    204: void;\n};\n\nexport type CallWithNoContentResponseResponse = CallWithNoContentResponseResponses[keyof CallWithNoContentResponseResponses];\n\nexport type CallWithResponseAndNoContentResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multiple-tags/response-and-no-content';\n};\n\nexport type CallWithResponseAndNoContentResponseResponses = {\n    /**\n     * Response is a simple number\n     */\n    200: number;\n    /**\n     * Success\n     */\n    204: void;\n};\n\nexport type CallWithResponseAndNoContentResponseResponse = CallWithResponseAndNoContentResponseResponses[keyof CallWithResponseAndNoContentResponseResponses];\n\nexport type DummyAData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multiple-tags/a';\n};\n\nexport type DummyAResponses = {\n    200: _400;\n};\n\nexport type DummyAResponse = DummyAResponses[keyof DummyAResponses];\n\nexport type DummyBData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multiple-tags/b';\n};\n\nexport type DummyBResponses = {\n    /**\n     * Success\n     */\n    204: void;\n};\n\nexport type DummyBResponse = DummyBResponses[keyof DummyBResponses];\n\nexport type CallWithResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/response';\n};\n\nexport type CallWithResponseResponses = {\n    default: Import;\n};\n\nexport type CallWithResponseResponse = CallWithResponseResponses[keyof CallWithResponseResponses];\n\nexport type CallWithDuplicateResponsesData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/response';\n};\n\nexport type CallWithDuplicateResponsesErrors = {\n    /**\n     * Message for 500 error\n     */\n    500: ModelWithStringError;\n    /**\n     * Message for 501 error\n     */\n    501: ModelWithStringError;\n    /**\n     * Message for 502 error\n     */\n    502: ModelWithStringError;\n    /**\n     * Message for 4XX errors\n     */\n    '4XX': DictionaryWithArray;\n    /**\n     * Default error response\n     */\n    default: ModelWithBoolean;\n};\n\nexport type CallWithDuplicateResponsesError = CallWithDuplicateResponsesErrors[keyof CallWithDuplicateResponsesErrors];\n\nexport type CallWithDuplicateResponsesResponses = {\n    /**\n     * Message for 200 response\n     */\n    200: ModelWithBoolean & ModelWithInteger;\n    /**\n     * Message for 201 response\n     */\n    201: ModelWithString;\n    /**\n     * Message for 202 response\n     */\n    202: ModelWithString;\n};\n\nexport type CallWithDuplicateResponsesResponse = CallWithDuplicateResponsesResponses[keyof CallWithDuplicateResponsesResponses];\n\nexport type CallWithResponsesData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/response';\n};\n\nexport type CallWithResponsesErrors = {\n    /**\n     * Message for 500 error\n     */\n    500: ModelWithStringError;\n    /**\n     * Message for 501 error\n     */\n    501: ModelWithStringError;\n    /**\n     * Message for 502 error\n     */\n    502: ModelWithStringError;\n    /**\n     * Message for default response\n     */\n    default: ModelWithStringError;\n};\n\nexport type CallWithResponsesError = CallWithResponsesErrors[keyof CallWithResponsesErrors];\n\nexport type CallWithResponsesResponses = {\n    /**\n     * Message for 200 response\n     */\n    200: {\n        readonly '@namespace.string'?: string;\n        readonly '@namespace.integer'?: number;\n        readonly value?: Array<ModelWithString>;\n    };\n    /**\n     * Message for 201 response\n     */\n    201: ModelThatExtends;\n    /**\n     * Message for 202 response\n     */\n    202: ModelThatExtendsExtends;\n};\n\nexport type CallWithResponsesResponse = CallWithResponsesResponses[keyof CallWithResponsesResponses];\n\nexport type CollectionFormatData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * This is an array parameter that is sent as csv format (comma-separated values)\n         */\n        parameterArrayCSV: Array<string> | null;\n        /**\n         * This is an array parameter that is sent as ssv format (space-separated values)\n         */\n        parameterArraySSV: Array<string> | null;\n        /**\n         * This is an array parameter that is sent as tsv format (tab-separated values)\n         */\n        parameterArrayTSV: Array<string> | null;\n        /**\n         * This is an array parameter that is sent as pipes format (pipe-separated values)\n         */\n        parameterArrayPipes: Array<string> | null;\n        /**\n         * This is an array parameter that is sent as multi format (multiple parameter instances)\n         */\n        parameterArrayMulti: Array<string> | null;\n    };\n    url: '/api/v{api-version}/collectionFormat';\n};\n\nexport type TypesData = {\n    body?: never;\n    path?: {\n        /**\n         * This is a number parameter\n         */\n        id?: number;\n    };\n    query: {\n        /**\n         * This is a number parameter\n         */\n        parameterNumber: number;\n        /**\n         * This is a string parameter\n         */\n        parameterString: string | null;\n        /**\n         * This is a boolean parameter\n         */\n        parameterBoolean: boolean | null;\n        /**\n         * This is an object parameter\n         */\n        parameterObject: {\n            [key: string]: unknown;\n        } | null;\n        /**\n         * This is an array parameter\n         */\n        parameterArray: Array<string> | null;\n        /**\n         * This is a dictionary parameter\n         */\n        parameterDictionary: {\n            [key: string]: unknown;\n        } | null;\n        /**\n         * This is an enum parameter\n         */\n        parameterEnum: 'Success' | 'Warning' | 'Error' | null;\n    };\n    url: '/api/v{api-version}/types';\n};\n\nexport type TypesResponses = {\n    /**\n     * Response is a simple number\n     */\n    200: number;\n    /**\n     * Response is a simple string\n     */\n    201: string;\n    /**\n     * Response is a simple boolean\n     */\n    202: boolean;\n    /**\n     * Response is a simple object\n     */\n    203: {\n        [key: string]: unknown;\n    };\n};\n\nexport type TypesResponse = TypesResponses[keyof TypesResponses];\n\nexport type UploadFileData = {\n    body: Blob | File;\n    path: {\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string | null;\n    };\n    query?: never;\n    url: '/api/v{api-version}/upload';\n};\n\nexport type UploadFileResponses = {\n    200: boolean;\n};\n\nexport type UploadFileResponse = UploadFileResponses[keyof UploadFileResponses];\n\nexport type FileResponseData = {\n    body?: never;\n    path: {\n        id: string;\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string;\n    };\n    query?: never;\n    url: '/api/v{api-version}/file/{id}';\n};\n\nexport type FileResponseResponses = {\n    /**\n     * Success\n     */\n    200: Blob | File;\n};\n\nexport type FileResponseResponse = FileResponseResponses[keyof FileResponseResponses];\n\nexport type ComplexTypesData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * Parameter containing object\n         */\n        parameterObject: {\n            first?: {\n                second?: {\n                    third?: string;\n                };\n            };\n        };\n        /**\n         * Parameter containing reference\n         */\n        parameterReference: ModelWithString;\n    };\n    url: '/api/v{api-version}/complex';\n};\n\nexport type ComplexTypesErrors = {\n    /**\n     * 400 `server` error\n     */\n    400: unknown;\n    /**\n     * 500 server error\n     */\n    500: unknown;\n};\n\nexport type ComplexTypesResponses = {\n    /**\n     * Successful response\n     */\n    200: Array<ModelWithString>;\n};\n\nexport type ComplexTypesResponse = ComplexTypesResponses[keyof ComplexTypesResponses];\n\nexport type MultipartResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multipart';\n};\n\nexport type MultipartResponseResponses = {\n    /**\n     * OK\n     */\n    200: {\n        file?: Blob | File;\n        metadata?: {\n            foo?: string;\n            bar?: string;\n        };\n    };\n};\n\nexport type MultipartResponseResponse = MultipartResponseResponses[keyof MultipartResponseResponses];\n\nexport type MultipartRequestData = {\n    body?: {\n        content?: Blob | File;\n        data?: ModelWithString | null;\n    };\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multipart';\n};\n\nexport type ComplexParamsData = {\n    body?: {\n        readonly key: string | null;\n        name: string | null;\n        enabled?: boolean;\n        type: 'Monkey' | 'Horse' | 'Bird';\n        listOfModels?: Array<ModelWithString> | null;\n        listOfStrings?: Array<string> | null;\n        parameters: ModelWithString | ModelWithEnum | ModelWithArray | ModelWithDictionary;\n        readonly user?: {\n            readonly id?: number;\n            readonly name?: string | null;\n        };\n    };\n    path: {\n        id: number;\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string;\n    };\n    query?: never;\n    url: '/api/v{api-version}/complex/{id}';\n};\n\nexport type ComplexParamsResponses = {\n    /**\n     * Success\n     */\n    200: ModelWithString;\n};\n\nexport type ComplexParamsResponse = ComplexParamsResponses[keyof ComplexParamsResponses];\n\nexport type CallWithResultFromHeaderData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/header';\n};\n\nexport type CallWithResultFromHeaderErrors = {\n    /**\n     * 400 server error\n     */\n    400: unknown;\n    /**\n     * 500 server error\n     */\n    500: unknown;\n};\n\nexport type CallWithResultFromHeaderResponses = {\n    /**\n     * Successful response\n     */\n    200: unknown;\n};\n\nexport type TestErrorCodeData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * Status code to return\n         */\n        status: number;\n    };\n    url: '/api/v{api-version}/error';\n};\n\nexport type TestErrorCodeErrors = {\n    /**\n     * Custom message: Internal Server Error\n     */\n    500: unknown;\n    /**\n     * Custom message: Not Implemented\n     */\n    501: unknown;\n    /**\n     * Custom message: Bad Gateway\n     */\n    502: unknown;\n    /**\n     * Custom message: Service Unavailable\n     */\n    503: unknown;\n};\n\nexport type TestErrorCodeResponses = {\n    /**\n     * Custom message: Successful response\n     */\n    200: unknown;\n};\n\nexport type NonAsciiæøåÆøÅöôêÊ字符串Data = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * Dummy input param\n         */\n        nonAsciiParamæøåÆØÅöôêÊ: number;\n    };\n    url: '/api/v{api-version}/non-ascii-æøåÆØÅöôêÊ字符串';\n};\n\nexport type NonAsciiæøåÆøÅöôêÊ字符串Responses = {\n    /**\n     * Successful response\n     */\n    200: Array<NonAsciiStringæøåÆøÅöôêÊ字符串>;\n};\n\nexport type NonAsciiæøåÆøÅöôêÊ字符串Response = NonAsciiæøåÆøÅöôêÊ字符串Responses[keyof NonAsciiæøåÆøÅöôêÊ字符串Responses];\n\nexport type PutWithFormUrlEncodedData = {\n    body: ArrayWithStrings;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/non-ascii-æøåÆØÅöôêÊ字符串';\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-axios/sdk-client-optional/client/client.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { AxiosError, AxiosInstance, RawAxiosRequestHeaders } from 'axios';\nimport axios from 'axios';\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 } from './types.gen';\nimport { buildUrl, createConfig, mergeConfigs, mergeHeaders, setAuthParams } from './utils.gen';\n\nexport const createClient = (config: Config = {}): Client => {\n  let _config = mergeConfigs(createConfig(), config);\n\n  let instance: AxiosInstance;\n\n  if (_config.axios && !('Axios' in _config.axios)) {\n    instance = _config.axios;\n  } else {\n    // eslint-disable-next-line @typescript-eslint/no-unused-vars\n    const { auth, ...configWithoutAuth } = _config;\n    instance = axios.create(configWithoutAuth);\n  }\n\n  const getConfig = (): Config => ({ ..._config });\n\n  const setConfig = (config: Config): Config => {\n    _config = mergeConfigs(_config, config);\n    instance.defaults = {\n      ...instance.defaults,\n      ..._config,\n      // @ts-expect-error\n      headers: mergeHeaders(instance.defaults.headers, _config.headers),\n    };\n    return getConfig();\n  };\n\n  const beforeRequest = async (options: RequestOptions) => {\n    const opts = {\n      ..._config,\n      ...options,\n      axios: options.axios ?? _config.axios ?? instance,\n      headers: mergeHeaders(_config.headers, options.headers),\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.body = opts.bodySerializer(opts.body);\n    }\n\n    const url = buildUrl(opts);\n\n    return { opts, url };\n  };\n\n  // @ts-expect-error\n  const request: Client['request'] = async (options) => {\n    // @ts-expect-error\n    const { opts, url } = await beforeRequest(options);\n    try {\n      // assign Axios here for consistency with fetch\n      const _axios = opts.axios!;\n      // eslint-disable-next-line @typescript-eslint/no-unused-vars\n      const { auth, ...optsWithoutAuth } = opts;\n      const response = await _axios({\n        ...optsWithoutAuth,\n        baseURL: '', // the baseURL is already included in `url`\n        data: getValidRequestBody(opts),\n        headers: opts.headers as RawAxiosRequestHeaders,\n        // let `paramsSerializer()` handle query params if it exists\n        params: opts.paramsSerializer ? opts.query : undefined,\n        url,\n      });\n\n      let { data } = response;\n\n      if (opts.responseType === '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 {\n        ...response,\n        data: data ?? {},\n      };\n    } catch (error) {\n      const e = error as AxiosError;\n      if (opts.throwOnError) {\n        throw e;\n      }\n      // @ts-expect-error\n      e.error = e.response?.data ?? {};\n      return e;\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 Record<string, string>,\n      method,\n      serializedBody: getValidRequestBody(opts) as BodyInit | null | undefined,\n      // @ts-expect-error\n      signal: opts.signal,\n      url,\n    });\n  };\n\n  const _buildUrl: Client['buildUrl'] = (options) =>\n    buildUrl({ axios: instance, ..._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    instance,\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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-axios/sdk-client-optional/client/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type { Auth } from '../core/auth.gen';\nexport type { QuerySerializerOptions } from '../core/bodySerializer.gen';\nexport {\n  formDataBodySerializer,\n  jsonBodySerializer,\n  urlSearchParamsBodySerializer,\n} from '../core/bodySerializer.gen';\nexport { buildClientParams } from '../core/params.gen';\nexport { serializeQueryKeyValue } from '../core/queryKeySerializer.gen';\nexport { createClient } from './client.gen';\nexport type {\n  Client,\n  ClientOptions,\n  Config,\n  CreateClientConfig,\n  Options,\n  RequestOptions,\n  RequestResult,\n  TDataShape,\n} from './types.gen';\nexport { createConfig } from './utils.gen';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-axios/sdk-client-optional/client/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type {\n  AxiosError,\n  AxiosInstance,\n  AxiosRequestHeaders,\n  AxiosResponse,\n  AxiosStatic,\n  CreateAxiosDefaults,\n} from 'axios';\n\nimport type { Auth } from '../core/auth.gen';\nimport type {\n  ServerSentEventsOptions,\n  ServerSentEventsResult,\n} from '../core/serverSentEvents.gen';\nimport type { Client as CoreClient, Config as CoreConfig } from '../core/types.gen';\n\nexport interface Config<T extends ClientOptions = ClientOptions>\n  extends Omit<CreateAxiosDefaults, 'auth' | 'baseURL' | 'headers' | 'method'>, CoreConfig {\n  /**\n   * Axios implementation. You can use this option to provide either an\n   * `AxiosStatic` or an `AxiosInstance`.\n   *\n   * @default axios\n   */\n  axios?: AxiosStatic | AxiosInstance;\n  /**\n   * Base URL for all requests made by this client.\n   */\n  baseURL?: T['baseURL'];\n  /**\n   * An object containing any HTTP headers that you want to pre-populate your\n   * `Headers` object with.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/Headers/Headers#init See more}\n   */\n  headers?:\n    | AxiosRequestHeaders\n    | Record<\n        string,\n        string | number | boolean | (string | number | boolean)[] | null | undefined | unknown\n      >;\n  /**\n   * Throw an error instead of returning it in the response?\n   *\n   * @default false\n   */\n  throwOnError?: T['throwOnError'];\n}\n\nexport interface RequestOptions<\n  TData = unknown,\n  ThrowOnError extends boolean = boolean,\n  Url extends string = string,\n>\n  extends\n    Config<{\n      throwOnError: ThrowOnError;\n    }>,\n    Pick<\n      ServerSentEventsOptions<TData>,\n      | 'onRequest'\n      | 'onSseError'\n      | 'onSseEvent'\n      | 'sseDefaultRetryDelay'\n      | 'sseMaxRetryAttempts'\n      | 'sseMaxRetryDelay'\n    > {\n  /**\n   * Any body that you want to add to your request.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/fetch#body}\n   */\n  body?: unknown;\n  path?: Record<string, unknown>;\n  query?: Record<string, unknown>;\n  /**\n   * Security mechanism(s) to use for the request.\n   */\n  security?: ReadonlyArray<Auth>;\n  url: Url;\n}\n\nexport interface ClientOptions {\n  baseURL?: string;\n  throwOnError?: boolean;\n}\n\nexport type RequestResult<\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = boolean,\n> = ThrowOnError extends true\n  ? Promise<AxiosResponse<TData extends Record<string, unknown> ? TData[keyof TData] : TData>>\n  : Promise<\n      | (AxiosResponse<TData extends Record<string, unknown> ? TData[keyof TData] : TData> & {\n          error: undefined;\n        })\n      | (AxiosError<TError extends Record<string, unknown> ? TError[keyof TError] : TError> & {\n          data: undefined;\n          error: TError extends Record<string, unknown> ? TError[keyof TError] : TError;\n        })\n    >;\n\ntype MethodFn = <TData = unknown, TError = unknown, ThrowOnError extends boolean = false>(\n  options: Omit<RequestOptions<TData, ThrowOnError>, 'method'>,\n) => RequestResult<TData, TError, ThrowOnError>;\n\ntype SseFn = <TData = unknown, TError = unknown, ThrowOnError extends boolean = false>(\n  options: Omit<RequestOptions<TData, ThrowOnError>, 'method'>,\n) => Promise<ServerSentEventsResult<TData, TError>>;\n\ntype RequestFn = <TData = unknown, TError = unknown, ThrowOnError extends boolean = false>(\n  options: Omit<RequestOptions<TData, ThrowOnError>, 'method'> &\n    Pick<Required<RequestOptions<TData, ThrowOnError>>, 'method'>,\n) => RequestResult<TData, TError, ThrowOnError>;\n\ntype BuildUrlFn = <\n  TData extends {\n    body?: unknown;\n    path?: Record<string, unknown>;\n    query?: Record<string, unknown>;\n    url: string;\n  },\n>(\n  options: TData & Options<TData>,\n) => string;\n\nexport type Client = CoreClient<RequestFn, Config, MethodFn, BuildUrlFn, SseFn> & {\n  instance: AxiosInstance;\n};\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 = ClientOptions> = (\n  override?: Config<ClientOptions & T>,\n) => Config<Required<ClientOptions> & T>;\n\nexport interface TDataShape {\n  body?: unknown;\n  headers?: unknown;\n  path?: unknown;\n  query?: unknown;\n  url: string;\n}\n\ntype OmitKeys<T, K> = Pick<T, Exclude<keyof T, K>>;\n\nexport type Options<\n  TData extends TDataShape = TDataShape,\n  ThrowOnError extends boolean = boolean,\n  TResponse = unknown,\n> = OmitKeys<RequestOptions<TResponse, ThrowOnError>, 'body' | 'path' | 'query' | 'url'> &\n  ([TData] extends [never] ? unknown : Omit<TData, 'url'>);\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-axios/sdk-client-optional/client/utils.gen.ts",
    "content": "// 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 {\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\nconst checkForExistence = (\n  options: Pick<RequestOptions, 'auth' | 'query'> & {\n    headers: Record<any, unknown>;\n  },\n  name?: string,\n): boolean => {\n  if (!name) {\n    return false;\n  }\n  if (name in options.headers || options.query?.[name]) {\n    return true;\n  }\n  if (\n    'Cookie' in options.headers &&\n    options.headers['Cookie'] &&\n    typeof options.headers['Cookie'] === 'string'\n  ) {\n    return options.headers['Cookie'].includes(`${name}=`);\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: Record<any, unknown>;\n  }) => {\n  for (const auth of security) {\n    if (checkForExistence(options, auth.name)) {\n      continue;\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        const value = `${name}=${token}`;\n        if ('Cookie' in options.headers && options.headers['Cookie']) {\n          options.headers['Cookie'] = `${options.headers['Cookie']}; ${value}`;\n        } else {\n          options.headers['Cookie'] = value;\n        }\n        break;\n      }\n      case 'header':\n      default:\n        options.headers[name] = token;\n        break;\n    }\n  }\n};\n\nexport const buildUrl: Client['buildUrl'] = (options) => {\n  const instanceBaseUrl = options.axios?.defaults?.baseURL;\n\n  const baseUrl =\n    !!options.baseURL && typeof options.baseURL === 'string' ? options.baseURL : instanceBaseUrl;\n\n  return getUrl({\n    baseUrl: baseUrl as string,\n    path: options.path,\n    // let `paramsSerializer()` handle query params if it exists\n    query: !options.paramsSerializer ? options.query : undefined,\n    querySerializer:\n      typeof options.querySerializer === 'function'\n        ? options.querySerializer\n        : createQuerySerializer(options.querySerializer),\n    url: options.url,\n  });\n};\n\nexport const mergeConfigs = (a: Config, b: Config): Config => {\n  const config = { ...a, ...b };\n  config.headers = mergeHeaders(a.headers, b.headers);\n  return config;\n};\n\n/**\n * Special Axios headers keywords allowing to set headers by request method.\n */\nexport const axiosHeadersKeywords = [\n  'common',\n  'delete',\n  'get',\n  'head',\n  'patch',\n  'post',\n  'put',\n] as const;\n\nexport const mergeHeaders = (\n  ...headers: Array<Required<Config>['headers'] | undefined>\n): Record<any, unknown> => {\n  const mergedHeaders: Record<any, unknown> = {};\n  for (const header of headers) {\n    if (!header || typeof header !== 'object') {\n      continue;\n    }\n\n    const iterator = Object.entries(header);\n\n    for (const [key, value] of iterator) {\n      if (\n        axiosHeadersKeywords.includes(key as (typeof axiosHeadersKeywords)[number]) &&\n        typeof value === 'object'\n      ) {\n        mergedHeaders[key] = {\n          ...(mergedHeaders[key] as Record<any, unknown>),\n          ...value,\n        };\n      } else if (value === null) {\n        delete mergedHeaders[key];\n      } else if (Array.isArray(value)) {\n        for (const v of value) {\n          // @ts-expect-error\n          mergedHeaders[key] = [...(mergedHeaders[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[key] = typeof value === 'object' ? JSON.stringify(value) : (value as string);\n      }\n    }\n  }\n  return mergedHeaders;\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  ...override,\n});\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-axios/sdk-client-optional/client.gen.ts",
    "content": "// 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: 'http://localhost:3000/base' }));\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-axios/sdk-client-optional/core/auth.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-axios/sdk-client-optional/core/bodySerializer.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-axios/sdk-client-optional/core/params.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-axios/sdk-client-optional/core/pathSerializer.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-axios/sdk-client-optional/core/queryKeySerializer.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\n/**\n * JSON-friendly union that mirrors what Pinia Colada can hash.\n */\nexport type JsonValue =\n  | null\n  | string\n  | number\n  | boolean\n  | JsonValue[]\n  | { [key: string]: JsonValue };\n\n/**\n * Replacer that converts non-JSON values (bigint, Date, etc.) to safe substitutes.\n */\nexport const queryKeyJsonReplacer = (_key: string, value: unknown) => {\n  if (value === undefined || typeof value === 'function' || typeof value === 'symbol') {\n    return undefined;\n  }\n  if (typeof value === 'bigint') {\n    return value.toString();\n  }\n  if (value instanceof Date) {\n    return value.toISOString();\n  }\n  return value;\n};\n\n/**\n * Safely stringifies a value and parses it back into a JsonValue.\n */\nexport const stringifyToJsonValue = (input: unknown): JsonValue | undefined => {\n  try {\n    const json = JSON.stringify(input, queryKeyJsonReplacer);\n    if (json === undefined) {\n      return undefined;\n    }\n    return JSON.parse(json) as JsonValue;\n  } catch {\n    return undefined;\n  }\n};\n\n/**\n * Detects plain objects (including objects with a null prototype).\n */\nconst isPlainObject = (value: unknown): value is Record<string, unknown> => {\n  if (value === null || typeof value !== 'object') {\n    return false;\n  }\n  const prototype = Object.getPrototypeOf(value as object);\n  return prototype === Object.prototype || prototype === null;\n};\n\n/**\n * Turns URLSearchParams into a sorted JSON object for deterministic keys.\n */\nconst serializeSearchParams = (params: URLSearchParams): JsonValue => {\n  const entries = Array.from(params.entries()).sort(([a], [b]) => a.localeCompare(b));\n  const result: Record<string, JsonValue> = {};\n\n  for (const [key, value] of entries) {\n    const existing = result[key];\n    if (existing === undefined) {\n      result[key] = value;\n      continue;\n    }\n\n    if (Array.isArray(existing)) {\n      (existing as string[]).push(value);\n    } else {\n      result[key] = [existing, value];\n    }\n  }\n\n  return result;\n};\n\n/**\n * Normalizes any accepted value into a JSON-friendly shape for query keys.\n */\nexport const serializeQueryKeyValue = (value: unknown): JsonValue | undefined => {\n  if (value === null) {\n    return null;\n  }\n\n  if (typeof value === 'string' || typeof value === 'number' || typeof value === 'boolean') {\n    return value;\n  }\n\n  if (value === undefined || typeof value === 'function' || typeof value === 'symbol') {\n    return undefined;\n  }\n\n  if (typeof value === 'bigint') {\n    return value.toString();\n  }\n\n  if (value instanceof Date) {\n    return value.toISOString();\n  }\n\n  if (Array.isArray(value)) {\n    return stringifyToJsonValue(value);\n  }\n\n  if (typeof URLSearchParams !== 'undefined' && value instanceof URLSearchParams) {\n    return serializeSearchParams(value);\n  }\n\n  if (isPlainObject(value)) {\n    return stringifyToJsonValue(value);\n  }\n\n  return undefined;\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-axios/sdk-client-optional/core/serverSentEvents.gen.ts",
    "content": "// 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 const 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            // Normalize line endings: CRLF -> LF, then CR -> LF\n            buffer = buffer.replace(/\\r\\n/g, '\\n').replace(/\\r/g, '\\n');\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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-axios/sdk-client-optional/core/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { Auth, AuthToken } from './auth.gen';\nimport type { BodySerializer, QuerySerializer, QuerySerializerOptions } from './bodySerializer.gen';\n\nexport type HttpMethod =\n  | 'connect'\n  | 'delete'\n  | 'get'\n  | 'head'\n  | 'options'\n  | 'patch'\n  | 'post'\n  | 'put'\n  | 'trace';\n\nexport type Client<\n  RequestFn = never,\n  Config = unknown,\n  MethodFn = never,\n  BuildUrlFn = never,\n  SseFn = never,\n> = {\n  /**\n   * Returns the final request URL.\n   */\n  buildUrl: BuildUrlFn;\n  getConfig: () => Config;\n  request: RequestFn;\n  setConfig: (config: Config) => Config;\n} & {\n  [K in HttpMethod]: MethodFn;\n} & ([SseFn] extends [never] ? { sse?: never } : { sse: { [K in HttpMethod]: SseFn } });\n\nexport interface Config {\n  /**\n   * Auth token or a function returning auth token. The resolved value will be\n   * added to the request payload as defined by its `security` array.\n   */\n  auth?: ((auth: Auth) => Promise<AuthToken> | AuthToken) | AuthToken;\n  /**\n   * A function for serializing request body parameter. By default,\n   * {@link JSON.stringify()} will be used.\n   */\n  bodySerializer?: BodySerializer | null;\n  /**\n   * An object containing any HTTP headers that you want to pre-populate your\n   * `Headers` object with.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/Headers/Headers#init See more}\n   */\n  headers?:\n    | RequestInit['headers']\n    | Record<\n        string,\n        string | number | boolean | (string | number | boolean)[] | null | undefined | unknown\n      >;\n  /**\n   * The request method.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/fetch#method See more}\n   */\n  method?: Uppercase<HttpMethod>;\n  /**\n   * A function for serializing request query parameters. By default, arrays\n   * will be exploded in form style, objects will be exploded in deepObject\n   * style, and reserved characters are percent-encoded.\n   *\n   * This method will have no effect if the native `paramsSerializer()` Axios\n   * API function is used.\n   *\n   * {@link https://swagger.io/docs/specification/serialization/#query View examples}\n   */\n  querySerializer?: QuerySerializer | QuerySerializerOptions;\n  /**\n   * A function validating request data. This is useful if you want to ensure\n   * the request conforms to the desired shape, so it can be safely sent to\n   * the server.\n   */\n  requestValidator?: (data: unknown) => Promise<unknown>;\n  /**\n   * A function transforming response data before it's returned. This is useful\n   * for post-processing data, e.g. converting ISO strings into Date objects.\n   */\n  responseTransformer?: (data: unknown) => Promise<unknown>;\n  /**\n   * A function validating response data. This is useful if you want to ensure\n   * the response conforms to the desired shape, so it can be safely passed to\n   * the transformers and returned to the user.\n   */\n  responseValidator?: (data: unknown) => Promise<unknown>;\n}\n\ntype IsExactlyNeverOrNeverUndefined<T> = [T] extends [never]\n  ? true\n  : [T] extends [never | undefined]\n    ? [undefined] extends [T]\n      ? false\n      : true\n    : false;\n\nexport type OmitNever<T extends Record<string, unknown>> = {\n  [K in keyof T as IsExactlyNeverOrNeverUndefined<T[K]> extends true ? never : K]: T[K];\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-axios/sdk-client-optional/core/utils.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-axios/sdk-client-optional/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport { apiVVersionODataControllerCount, callToTestOrderOfParams, callWithDefaultOptionalParameters, callWithDefaultParameters, callWithDescriptions, callWithDuplicateResponses, callWithNoContentResponse, callWithParameters, callWithResponse, callWithResponseAndNoContentResponse, callWithResponses, callWithResultFromHeader, callWithWeirdParameterNames, collectionFormat, complexParams, complexTypes, deleteCallWithoutParametersAndResponse, deleteFoo, deprecatedCall, dummyA, dummyB, duplicateName, duplicateName2, duplicateName3, duplicateName4, export_, fileResponse, fooWow, getApiVbyApiVersionSimpleOperation, getCallWithOptionalParam, getCallWithoutParametersAndResponse, headCallWithoutParametersAndResponse, import_, multipartRequest, multipartResponse, nonAsciiæøåÆøÅöôêÊ字符串, type Options, optionsCallWithoutParametersAndResponse, patchApiVbyApiVersionNoTag, patchCallWithoutParametersAndResponse, postApiVbyApiVersionFormData, postApiVbyApiVersionRequestBody, postCallWithOptionalParam, postCallWithoutParametersAndResponse, putCallWithoutParametersAndResponse, putWithFormUrlEncoded, testErrorCode, types, uploadFile } from './sdk.gen';\nexport type { _3eNum1Период, _400, AdditionalPropertiesIntegerIssue, AdditionalPropertiesUnknownIssue, AdditionalPropertiesUnknownIssue2, AdditionalPropertiesUnknownIssue3, AdditionalPropertiesUnknownIssueWritable, AnyOfAnyAndNull, AnyOfArrays, ApiVVersionODataControllerCountData, ApiVVersionODataControllerCountResponse, ApiVVersionODataControllerCountResponses, ArrayWithAnyOfProperties, ArrayWithArray, ArrayWithBooleans, ArrayWithNumbers, ArrayWithProperties, ArrayWithReferences, ArrayWithStrings, CallToTestOrderOfParamsData, CallWithDefaultOptionalParametersData, CallWithDefaultParametersData, CallWithDescriptionsData, CallWithDuplicateResponsesData, CallWithDuplicateResponsesError, CallWithDuplicateResponsesErrors, CallWithDuplicateResponsesResponse, CallWithDuplicateResponsesResponses, CallWithNoContentResponseData, CallWithNoContentResponseResponse, CallWithNoContentResponseResponses, CallWithParametersData, CallWithResponseAndNoContentResponseData, CallWithResponseAndNoContentResponseResponse, CallWithResponseAndNoContentResponseResponses, CallWithResponseData, CallWithResponseResponse, CallWithResponseResponses, CallWithResponsesData, CallWithResponsesError, CallWithResponsesErrors, CallWithResponsesResponse, CallWithResponsesResponses, CallWithResultFromHeaderData, CallWithResultFromHeaderErrors, CallWithResultFromHeaderResponses, CallWithWeirdParameterNamesData, CamelCaseCommentWithBreaks, CharactersInDescription, ClientOptions, CollectionFormatData, CommentWithBackticks, CommentWithBackticksAndQuotes, CommentWithBreaks, CommentWithExpressionPlaceholders, CommentWithQuotes, CommentWithReservedCharacters, CommentWithSlashes, ComplexParamsData, ComplexParamsResponse, ComplexParamsResponses, ComplexTypesData, ComplexTypesErrors, ComplexTypesResponse, ComplexTypesResponses, CompositionBaseModel, CompositionExtendedModel, CompositionWithAllOfAndNullable, CompositionWithAnyOf, CompositionWithAnyOfAndNullable, CompositionWithAnyOfAnonymous, CompositionWithNestedAnyAndTypeNull, CompositionWithNestedAnyOfAndNull, CompositionWithOneOf, CompositionWithOneOfAndComplexArrayDictionary, CompositionWithOneOfAndNullable, CompositionWithOneOfAndProperties, CompositionWithOneOfAndSimpleArrayDictionary, CompositionWithOneOfAndSimpleDictionary, CompositionWithOneOfAnonymous, CompositionWithOneOfDiscriminator, ConstValue, Default, DeleteCallWithoutParametersAndResponseData, DeleteFooData, DeleteFooData2, DeleteFooData3, DeprecatedCallData, DeprecatedModel, DictionaryWithArray, DictionaryWithDictionary, DictionaryWithProperties, DictionaryWithPropertiesAndAdditionalProperties, DictionaryWithReference, DictionaryWithString, DummyAData, DummyAResponse, DummyAResponses, DummyBData, DummyBResponse, DummyBResponses, DuplicateName2Data, DuplicateName3Data, DuplicateName4Data, DuplicateNameData, EnumFromDescription, EnumWithExtensions, EnumWithNumbers, EnumWithReplacedCharacters, EnumWithStrings, EnumWithXEnumNames, ExportData, ExternalRefA, ExternalRefB, ExternalSharedModel, File, FileResponseData, FileResponseResponse, FileResponseResponses, FileWritable, FooWowData, FooWowResponses, FreeFormObjectWithAdditionalPropertiesEqEmptyObject, FreeFormObjectWithAdditionalPropertiesEqTrue, FreeFormObjectWithoutAdditionalProperties, GenericSchemaDuplicateIssue1SystemBoolean, GenericSchemaDuplicateIssue1SystemBooleanWritable, GenericSchemaDuplicateIssue1SystemString, GenericSchemaDuplicateIssue1SystemStringWritable, GetApiVbyApiVersionSimpleOperationData, GetApiVbyApiVersionSimpleOperationError, GetApiVbyApiVersionSimpleOperationErrors, GetApiVbyApiVersionSimpleOperationResponse, GetApiVbyApiVersionSimpleOperationResponses, GetCallWithOptionalParamData, GetCallWithoutParametersAndResponseData, HeadCallWithoutParametersAndResponseData, Import, ImportData, ImportResponse, ImportResponses, IoK8sApimachineryPkgApisMetaV1DeleteOptions, IoK8sApimachineryPkgApisMetaV1Preconditions, ModelCircle, ModelFromZendesk, ModelSquare, ModelThatExtends, ModelThatExtendsExtends, ModelWithAdditionalPropertiesEqTrue, ModelWithAdditionalPropertiesRef, ModelWithAnyOfConstantSizeArray, ModelWithAnyOfConstantSizeArrayAndIntersect, ModelWithAnyOfConstantSizeArrayNullable, ModelWithAnyOfConstantSizeArrayWithNSizeAndOptions, ModelWithAnyOfConstantSizeArrayWithNSizeAndOptionsWritable, ModelWithArray, ModelWithArrayReadOnlyAndWriteOnly, ModelWithArrayReadOnlyAndWriteOnlyWritable, ModelWithBackticksInDescription, ModelWithBoolean, ModelWithCircularReference, ModelWithConst, ModelWithConstantSizeArray, ModelWithDictionary, ModelWithDuplicateImports, ModelWithDuplicateProperties, ModelWithEnum, ModelWithEnumFromDescription, ModelWithEnumWithHyphen, ModelWithInteger, ModelWithNestedArrayEnums, ModelWithNestedArrayEnumsData, ModelWithNestedArrayEnumsDataBar, ModelWithNestedArrayEnumsDataFoo, ModelWithNestedCompositionEnums, ModelWithNestedEnums, ModelWithNestedProperties, ModelWithNullableObject, ModelWithNullableString, ModelWithNumericEnumUnion, ModelWithOneOfAndProperties, ModelWithOneOfEnum, ModelWithOrderedProperties, ModelWithPattern, ModelWithPatternWritable, ModelWithPrefixItemsConstantSizeArray, ModelWithProperties, ModelWithPropertiesWritable, ModelWithReadOnlyAndWriteOnly, ModelWithReadOnlyAndWriteOnlyWritable, ModelWithReference, ModelWithReferenceWritable, ModelWithString, ModelWithStringError, MultipartRequestData, MultipartResponseData, MultipartResponseResponse, MultipartResponseResponses, NestedAnyOfArraysNullable, NonAsciiæøåÆøÅöôêÊ字符串Data, NonAsciiæøåÆøÅöôêÊ字符串Response, NonAsciiæøåÆøÅöôêÊ字符串Responses, NonAsciiStringæøåÆøÅöôêÊ字符串, NullableObject, OneOfAllOfIssue, OneOfAllOfIssueWritable, OptionsCallWithoutParametersAndResponseData, Pageable, ParameterSimpleParameterUnused, PatchApiVbyApiVersionNoTagData, PatchApiVbyApiVersionNoTagResponses, PatchCallWithoutParametersAndResponseData, PostApiVbyApiVersionFormDataData, PostApiVbyApiVersionRequestBodyData, PostCallWithOptionalParamData, PostCallWithOptionalParamResponse, PostCallWithOptionalParamResponses, PostCallWithoutParametersAndResponseData, PostServiceWithEmptyTagResponse, PostServiceWithEmptyTagResponse2, PutCallWithoutParametersAndResponseData, PutWithFormUrlEncodedData, SchemaWithFormRestrictedKeys, SimpleBoolean, SimpleFile, SimpleFormData, SimpleInteger, SimpleParameter, SimpleReference, SimpleRequestBody, SimpleString, SimpleStringWithPattern, TestErrorCodeData, TestErrorCodeErrors, TestErrorCodeResponses, TypesData, TypesResponse, TypesResponses, UploadFileData, UploadFileResponse, UploadFileResponses, XFooBar } from './types.gen';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-axios/sdk-client-optional/sdk.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport { type Client, formDataBodySerializer, type Options as Options2, type TDataShape, urlSearchParamsBodySerializer } from './client';\nimport { client } from './client.gen';\nimport type { ApiVVersionODataControllerCountData, ApiVVersionODataControllerCountResponses, CallToTestOrderOfParamsData, CallWithDefaultOptionalParametersData, CallWithDefaultParametersData, CallWithDescriptionsData, CallWithDuplicateResponsesData, CallWithDuplicateResponsesErrors, CallWithDuplicateResponsesResponses, CallWithNoContentResponseData, CallWithNoContentResponseResponses, CallWithParametersData, CallWithResponseAndNoContentResponseData, CallWithResponseAndNoContentResponseResponses, CallWithResponseData, CallWithResponseResponses, CallWithResponsesData, CallWithResponsesErrors, CallWithResponsesResponses, CallWithResultFromHeaderData, CallWithResultFromHeaderErrors, CallWithResultFromHeaderResponses, CallWithWeirdParameterNamesData, CollectionFormatData, ComplexParamsData, ComplexParamsResponses, ComplexTypesData, ComplexTypesErrors, ComplexTypesResponses, DeleteCallWithoutParametersAndResponseData, DeleteFooData3, DeprecatedCallData, DummyAData, DummyAResponses, DummyBData, DummyBResponses, DuplicateName2Data, DuplicateName3Data, DuplicateName4Data, DuplicateNameData, ExportData, FileResponseData, FileResponseResponses, FooWowData, FooWowResponses, GetApiVbyApiVersionSimpleOperationData, GetApiVbyApiVersionSimpleOperationErrors, GetApiVbyApiVersionSimpleOperationResponses, GetCallWithOptionalParamData, GetCallWithoutParametersAndResponseData, HeadCallWithoutParametersAndResponseData, ImportData, ImportResponses, MultipartRequestData, MultipartResponseData, MultipartResponseResponses, NonAsciiæøåÆøÅöôêÊ字符串Data, NonAsciiæøåÆøÅöôêÊ字符串Responses, OptionsCallWithoutParametersAndResponseData, PatchApiVbyApiVersionNoTagData, PatchApiVbyApiVersionNoTagResponses, PatchCallWithoutParametersAndResponseData, PostApiVbyApiVersionFormDataData, PostApiVbyApiVersionRequestBodyData, PostCallWithOptionalParamData, PostCallWithOptionalParamResponses, PostCallWithoutParametersAndResponseData, PutCallWithoutParametersAndResponseData, PutWithFormUrlEncodedData, TestErrorCodeData, TestErrorCodeErrors, TestErrorCodeResponses, TypesData, TypesResponses, UploadFileData, UploadFileResponses } from './types.gen';\n\nexport type Options<TData extends TDataShape = TDataShape, ThrowOnError extends boolean = boolean> = Options2<TData, ThrowOnError> & {\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\nexport const export_ = <ThrowOnError extends boolean = false>(options?: Options<ExportData, ThrowOnError>) => (options?.client ?? client).get<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/no+tag', ...options });\n\nexport const patchApiVbyApiVersionNoTag = <ThrowOnError extends boolean = false>(options?: Options<PatchApiVbyApiVersionNoTagData, ThrowOnError>) => (options?.client ?? client).patch<PatchApiVbyApiVersionNoTagResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/no+tag', ...options });\n\nexport const import_ = <ThrowOnError extends boolean = false>(options: Options<ImportData, ThrowOnError>) => (options.client ?? client).post<ImportResponses, unknown, ThrowOnError>({\n    responseType: 'json',\n    url: '/api/v{api-version}/no+tag',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options.headers\n    }\n});\n\nexport const fooWow = <ThrowOnError extends boolean = false>(options?: Options<FooWowData, ThrowOnError>) => (options?.client ?? client).put<FooWowResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/no+tag', ...options });\n\nexport const apiVVersionODataControllerCount = <ThrowOnError extends boolean = false>(options?: Options<ApiVVersionODataControllerCountData, ThrowOnError>) => (options?.client ?? client).get<ApiVVersionODataControllerCountResponses, unknown, ThrowOnError>({\n    responseType: 'json',\n    url: '/api/v{api-version}/simple/$count',\n    ...options\n});\n\nexport const getApiVbyApiVersionSimpleOperation = <ThrowOnError extends boolean = false>(options: Options<GetApiVbyApiVersionSimpleOperationData, ThrowOnError>) => (options.client ?? client).get<GetApiVbyApiVersionSimpleOperationResponses, GetApiVbyApiVersionSimpleOperationErrors, ThrowOnError>({\n    responseType: 'json',\n    url: '/api/v{api-version}/simple:operation',\n    ...options\n});\n\nexport const deleteCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<DeleteCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).delete<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const getCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<GetCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).get<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const headCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<HeadCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).head<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const optionsCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<OptionsCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).options<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const patchCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<PatchCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).patch<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const postCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<PostCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).post<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const putCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<PutCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).put<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const deleteFoo = <ThrowOnError extends boolean = false>(options: Options<DeleteFooData3, ThrowOnError>) => (options.client ?? client).delete<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/foo/{foo_param}/bar/{BarParam}', ...options });\n\nexport const callWithDescriptions = <ThrowOnError extends boolean = false>(options?: Options<CallWithDescriptionsData, ThrowOnError>) => (options?.client ?? client).post<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/descriptions', ...options });\n\n/**\n * @deprecated\n */\nexport const deprecatedCall = <ThrowOnError extends boolean = false>(options: Options<DeprecatedCallData, ThrowOnError>) => (options.client ?? client).post<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/parameters/deprecated', ...options });\n\nexport const callWithParameters = <ThrowOnError extends boolean = false>(options: Options<CallWithParametersData, ThrowOnError>) => (options.client ?? client).post<unknown, unknown, ThrowOnError>({\n    url: '/api/v{api-version}/parameters/{parameterPath}',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options.headers\n    }\n});\n\nexport const callWithWeirdParameterNames = <ThrowOnError extends boolean = false>(options: Options<CallWithWeirdParameterNamesData, ThrowOnError>) => (options.client ?? client).post<unknown, unknown, ThrowOnError>({\n    url: '/api/v{api-version}/parameters/{parameter.path.1}/{parameter-path-2}/{PARAMETER-PATH-3}',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options.headers\n    }\n});\n\nexport const getCallWithOptionalParam = <ThrowOnError extends boolean = false>(options: Options<GetCallWithOptionalParamData, ThrowOnError>) => (options.client ?? client).get<unknown, unknown, ThrowOnError>({\n    url: '/api/v{api-version}/parameters',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options.headers\n    }\n});\n\nexport const postCallWithOptionalParam = <ThrowOnError extends boolean = false>(options: Options<PostCallWithOptionalParamData, ThrowOnError>) => (options.client ?? client).post<PostCallWithOptionalParamResponses, unknown, ThrowOnError>({\n    responseType: 'json',\n    url: '/api/v{api-version}/parameters',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options.headers\n    }\n});\n\nexport const postApiVbyApiVersionRequestBody = <ThrowOnError extends boolean = false>(options?: Options<PostApiVbyApiVersionRequestBodyData, ThrowOnError>) => (options?.client ?? client).post<unknown, unknown, ThrowOnError>({\n    url: '/api/v{api-version}/requestBody',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options?.headers\n    }\n});\n\nexport const postApiVbyApiVersionFormData = <ThrowOnError extends boolean = false>(options?: Options<PostApiVbyApiVersionFormDataData, ThrowOnError>) => (options?.client ?? client).post<unknown, unknown, ThrowOnError>({\n    ...formDataBodySerializer,\n    url: '/api/v{api-version}/formData',\n    ...options,\n    headers: {\n        'Content-Type': null,\n        ...options?.headers\n    }\n});\n\nexport const callWithDefaultParameters = <ThrowOnError extends boolean = false>(options?: Options<CallWithDefaultParametersData, ThrowOnError>) => (options?.client ?? client).get<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/defaults', ...options });\n\nexport const callWithDefaultOptionalParameters = <ThrowOnError extends boolean = false>(options?: Options<CallWithDefaultOptionalParametersData, ThrowOnError>) => (options?.client ?? client).post<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/defaults', ...options });\n\nexport const callToTestOrderOfParams = <ThrowOnError extends boolean = false>(options: Options<CallToTestOrderOfParamsData, ThrowOnError>) => (options.client ?? client).put<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/defaults', ...options });\n\nexport const duplicateName = <ThrowOnError extends boolean = false>(options?: Options<DuplicateNameData, ThrowOnError>) => (options?.client ?? client).delete<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/duplicate', ...options });\n\nexport const duplicateName2 = <ThrowOnError extends boolean = false>(options?: Options<DuplicateName2Data, ThrowOnError>) => (options?.client ?? client).get<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/duplicate', ...options });\n\nexport const duplicateName3 = <ThrowOnError extends boolean = false>(options?: Options<DuplicateName3Data, ThrowOnError>) => (options?.client ?? client).post<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/duplicate', ...options });\n\nexport const duplicateName4 = <ThrowOnError extends boolean = false>(options?: Options<DuplicateName4Data, ThrowOnError>) => (options?.client ?? client).put<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/duplicate', ...options });\n\nexport const callWithNoContentResponse = <ThrowOnError extends boolean = false>(options?: Options<CallWithNoContentResponseData, ThrowOnError>) => (options?.client ?? client).get<CallWithNoContentResponseResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/no-content', ...options });\n\nexport const callWithResponseAndNoContentResponse = <ThrowOnError extends boolean = false>(options?: Options<CallWithResponseAndNoContentResponseData, ThrowOnError>) => (options?.client ?? client).get<CallWithResponseAndNoContentResponseResponses, unknown, ThrowOnError>({\n    responseType: 'json',\n    url: '/api/v{api-version}/multiple-tags/response-and-no-content',\n    ...options\n});\n\nexport const dummyA = <ThrowOnError extends boolean = false>(options?: Options<DummyAData, ThrowOnError>) => (options?.client ?? client).get<DummyAResponses, unknown, ThrowOnError>({\n    responseType: 'json',\n    url: '/api/v{api-version}/multiple-tags/a',\n    ...options\n});\n\nexport const dummyB = <ThrowOnError extends boolean = false>(options?: Options<DummyBData, ThrowOnError>) => (options?.client ?? client).get<DummyBResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/multiple-tags/b', ...options });\n\nexport const callWithResponse = <ThrowOnError extends boolean = false>(options?: Options<CallWithResponseData, ThrowOnError>) => (options?.client ?? client).get<CallWithResponseResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/response', ...options });\n\nexport const callWithDuplicateResponses = <ThrowOnError extends boolean = false>(options?: Options<CallWithDuplicateResponsesData, ThrowOnError>) => (options?.client ?? client).post<CallWithDuplicateResponsesResponses, CallWithDuplicateResponsesErrors, ThrowOnError>({\n    responseType: 'json',\n    url: '/api/v{api-version}/response',\n    ...options\n});\n\nexport const callWithResponses = <ThrowOnError extends boolean = false>(options?: Options<CallWithResponsesData, ThrowOnError>) => (options?.client ?? client).put<CallWithResponsesResponses, CallWithResponsesErrors, ThrowOnError>({\n    responseType: 'json',\n    url: '/api/v{api-version}/response',\n    ...options\n});\n\nexport const collectionFormat = <ThrowOnError extends boolean = false>(options: Options<CollectionFormatData, ThrowOnError>) => (options.client ?? client).get<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/collectionFormat', ...options });\n\nexport const types = <ThrowOnError extends boolean = false>(options: Options<TypesData, ThrowOnError>) => (options.client ?? client).get<TypesResponses, unknown, ThrowOnError>({\n    responseType: 'json',\n    url: '/api/v{api-version}/types',\n    ...options\n});\n\nexport const uploadFile = <ThrowOnError extends boolean = false>(options: Options<UploadFileData, ThrowOnError>) => (options.client ?? client).post<UploadFileResponses, unknown, ThrowOnError>({\n    ...urlSearchParamsBodySerializer,\n    responseType: 'json',\n    url: '/api/v{api-version}/upload',\n    ...options,\n    headers: {\n        'Content-Type': 'application/x-www-form-urlencoded',\n        ...options.headers\n    }\n});\n\nexport const fileResponse = <ThrowOnError extends boolean = false>(options: Options<FileResponseData, ThrowOnError>) => (options.client ?? client).get<FileResponseResponses, unknown, ThrowOnError>({\n    responseType: 'blob',\n    url: '/api/v{api-version}/file/{id}',\n    ...options\n});\n\nexport const complexTypes = <ThrowOnError extends boolean = false>(options: Options<ComplexTypesData, ThrowOnError>) => (options.client ?? client).get<ComplexTypesResponses, ComplexTypesErrors, ThrowOnError>({\n    querySerializer: { parameters: { parameterObject: { object: { style: 'form' } } } },\n    responseType: 'json',\n    url: '/api/v{api-version}/complex',\n    ...options\n});\n\nexport const multipartResponse = <ThrowOnError extends boolean = false>(options?: Options<MultipartResponseData, ThrowOnError>) => (options?.client ?? client).get<MultipartResponseResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/multipart', ...options });\n\nexport const multipartRequest = <ThrowOnError extends boolean = false>(options?: Options<MultipartRequestData, ThrowOnError>) => (options?.client ?? client).post<unknown, unknown, ThrowOnError>({\n    ...formDataBodySerializer,\n    url: '/api/v{api-version}/multipart',\n    ...options,\n    headers: {\n        'Content-Type': null,\n        ...options?.headers\n    }\n});\n\nexport const complexParams = <ThrowOnError extends boolean = false>(options: Options<ComplexParamsData, ThrowOnError>) => (options.client ?? client).put<ComplexParamsResponses, unknown, ThrowOnError>({\n    responseType: 'json',\n    url: '/api/v{api-version}/complex/{id}',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json-patch+json',\n        ...options.headers\n    }\n});\n\nexport const callWithResultFromHeader = <ThrowOnError extends boolean = false>(options?: Options<CallWithResultFromHeaderData, ThrowOnError>) => (options?.client ?? client).post<CallWithResultFromHeaderResponses, CallWithResultFromHeaderErrors, ThrowOnError>({ url: '/api/v{api-version}/header', ...options });\n\nexport const testErrorCode = <ThrowOnError extends boolean = false>(options: Options<TestErrorCodeData, ThrowOnError>) => (options.client ?? client).post<TestErrorCodeResponses, TestErrorCodeErrors, ThrowOnError>({ url: '/api/v{api-version}/error', ...options });\n\nexport const nonAsciiæøåÆøÅöôêÊ字符串 = <ThrowOnError extends boolean = false>(options: Options<NonAsciiæøåÆøÅöôêÊ字符串Data, ThrowOnError>) => (options.client ?? client).post<NonAsciiæøåÆøÅöôêÊ字符串Responses, unknown, ThrowOnError>({\n    responseType: 'json',\n    url: '/api/v{api-version}/non-ascii-æøåÆØÅöôêÊ字符串',\n    ...options\n});\n\n/**\n * Login User\n */\nexport const putWithFormUrlEncoded = <ThrowOnError extends boolean = false>(options: Options<PutWithFormUrlEncodedData, ThrowOnError>) => (options.client ?? client).put<unknown, unknown, ThrowOnError>({\n    ...urlSearchParamsBodySerializer,\n    url: '/api/v{api-version}/non-ascii-æøåÆØÅöôêÊ字符串',\n    ...options,\n    headers: {\n        'Content-Type': 'application/x-www-form-urlencoded',\n        ...options.headers\n    }\n});\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-axios/sdk-client-optional/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type ClientOptions = {\n    baseURL: 'http://localhost:3000/base' | (string & {});\n};\n\n/**\n * Model with number-only name\n */\nexport type _400 = string;\n\n/**\n * External ref to shared model (A)\n */\nexport type ExternalRefA = ExternalSharedModel;\n\n/**\n * External ref to shared model (B)\n */\nexport type ExternalRefB = ExternalSharedModel;\n\n/**\n * Testing multiline comments in string: First line\n * Second line\n *\n * Fourth line\n */\nexport type CamelCaseCommentWithBreaks = number;\n\n/**\n * Testing multiline comments in string: First line\n * Second line\n *\n * Fourth line\n */\nexport type CommentWithBreaks = number;\n\n/**\n * Testing backticks in string: `backticks` and ```multiple backticks``` should work\n */\nexport type CommentWithBackticks = number;\n\n/**\n * Testing backticks and quotes in string: `backticks`, 'quotes', \"double quotes\" and ```multiple backticks``` should work\n */\nexport type CommentWithBackticksAndQuotes = number;\n\n/**\n * Testing slashes in string: \\backwards\\\\\\ and /forwards/// should work\n */\nexport type CommentWithSlashes = number;\n\n/**\n * Testing expression placeholders in string: ${expression} should work\n */\nexport type CommentWithExpressionPlaceholders = number;\n\n/**\n * Testing quotes in string: 'single quote''' and \"double quotes\"\"\" should work\n */\nexport type CommentWithQuotes = number;\n\n/**\n * Testing reserved characters in string: * inline * and ** inline ** should work\n */\nexport type CommentWithReservedCharacters = number;\n\n/**\n * This is a simple number\n */\nexport type SimpleInteger = number;\n\n/**\n * This is a simple boolean\n */\nexport type SimpleBoolean = boolean;\n\n/**\n * This is a simple string\n */\nexport type SimpleString = string;\n\n/**\n * A string with non-ascii (unicode) characters valid in typescript identifiers (æøåÆØÅöÔèÈ字符串)\n */\nexport type NonAsciiStringæøåÆøÅöôêÊ字符串 = string;\n\n/**\n * This is a simple file\n */\nexport type SimpleFile = Blob | File;\n\n/**\n * This is a simple reference\n */\nexport type SimpleReference = ModelWithString;\n\n/**\n * This is a simple string\n */\nexport type SimpleStringWithPattern = string | null;\n\n/**\n * This is a simple enum with strings\n */\nexport type EnumWithStrings = 'Success' | 'Warning' | 'Error' | '\\'Single Quote\\'' | '\"Double Quotes\"' | 'Non-ascii: øæåôöØÆÅÔÖ字符串';\n\nexport type EnumWithReplacedCharacters = '\\'Single Quote\\'' | '\"Double Quotes\"' | 'øæåôöØÆÅÔÖ字符串' | 3.1 | '';\n\n/**\n * This is a simple enum with numbers\n */\nexport type EnumWithNumbers = 1 | 2 | 3 | 1.1 | 1.2 | 1.3 | 100 | 200 | 300 | -100 | -200 | -300 | -1.1 | -1.2 | -1.3;\n\n/**\n * Success=1,Warning=2,Error=3\n */\nexport type EnumFromDescription = number;\n\n/**\n * This is a simple enum with numbers\n */\nexport type EnumWithExtensions = 200 | 400 | 500;\n\nexport type EnumWithXEnumNames = 0 | 1 | 2;\n\n/**\n * This is a simple array with numbers\n */\nexport type ArrayWithNumbers = Array<number>;\n\n/**\n * This is a simple array with booleans\n */\nexport type ArrayWithBooleans = Array<boolean>;\n\n/**\n * This is a simple array with strings\n */\nexport type ArrayWithStrings = Array<string>;\n\n/**\n * This is a simple array with references\n */\nexport type ArrayWithReferences = Array<ModelWithString>;\n\n/**\n * This is a simple array containing an array\n */\nexport type ArrayWithArray = Array<Array<ModelWithString>>;\n\n/**\n * This is a simple array with properties\n */\nexport type ArrayWithProperties = Array<{\n    '16x16'?: CamelCaseCommentWithBreaks;\n    bar?: string;\n}>;\n\n/**\n * This is a simple array with any of properties\n */\nexport type ArrayWithAnyOfProperties = Array<{\n    foo?: string;\n} | {\n    bar?: string;\n}>;\n\nexport type AnyOfAnyAndNull = {\n    data?: unknown | null;\n};\n\n/**\n * This is a simple array with any of properties\n */\nexport type AnyOfArrays = {\n    results?: Array<{\n        foo?: string;\n    } | {\n        bar?: string;\n    }>;\n};\n\n/**\n * This is a string dictionary\n */\nexport type DictionaryWithString = {\n    [key: string]: string;\n};\n\nexport type DictionaryWithPropertiesAndAdditionalProperties = {\n    foo?: number;\n    bar?: boolean;\n    [key: string]: string | number | boolean | undefined;\n};\n\n/**\n * This is a string reference\n */\nexport type DictionaryWithReference = {\n    [key: string]: ModelWithString;\n};\n\n/**\n * This is a complex dictionary\n */\nexport type DictionaryWithArray = {\n    [key: string]: Array<ModelWithString>;\n};\n\n/**\n * This is a string dictionary\n */\nexport type DictionaryWithDictionary = {\n    [key: string]: {\n        [key: string]: string;\n    };\n};\n\n/**\n * This is a complex dictionary\n */\nexport type DictionaryWithProperties = {\n    [key: string]: {\n        foo?: string;\n        bar?: string;\n    };\n};\n\n/**\n * This is a model with one number property\n */\nexport type ModelWithInteger = {\n    /**\n     * This is a simple number property\n     */\n    prop?: number;\n};\n\n/**\n * This is a model with one boolean property\n */\nexport type ModelWithBoolean = {\n    /**\n     * This is a simple boolean property\n     */\n    prop?: boolean;\n};\n\n/**\n * This is a model with one string property\n */\nexport type ModelWithString = {\n    /**\n     * This is a simple string property\n     */\n    prop?: string;\n};\n\n/**\n * This is a model with one string property\n */\nexport type ModelWithStringError = {\n    /**\n     * This is a simple string property\n     */\n    prop?: string;\n};\n\n/**\n * `Comment` or `VoiceComment`. The JSON object for adding voice comments to tickets is different. See [Adding voice comments to tickets](/documentation/ticketing/managing-tickets/adding-voice-comments-to-tickets)\n */\nexport type ModelFromZendesk = string;\n\n/**\n * This is a model with one string property\n */\nexport type ModelWithNullableString = {\n    /**\n     * This is a simple string property\n     */\n    nullableProp1?: string | null;\n    /**\n     * This is a simple string property\n     */\n    nullableRequiredProp1: string | null;\n    /**\n     * This is a simple string property\n     */\n    nullableProp2?: string | null;\n    /**\n     * This is a simple string property\n     */\n    nullableRequiredProp2: string | null;\n    /**\n     * This is a simple enum with strings\n     */\n    'foo_bar-enum'?: 'Success' | 'Warning' | 'Error' | 'ØÆÅ字符串';\n};\n\n/**\n * This is a model with one enum\n */\nexport type ModelWithEnum = {\n    /**\n     * This is a simple enum with strings\n     */\n    'foo_bar-enum'?: 'Success' | 'Warning' | 'Error' | 'ØÆÅ字符串';\n    /**\n     * These are the HTTP error code enums\n     */\n    statusCode?: '100' | '200 FOO' | '300 FOO_BAR' | '400 foo-bar' | '500 foo.bar' | '600 foo&bar';\n    /**\n     * Simple boolean enum\n     */\n    bool?: true;\n};\n\n/**\n * This is a model with one enum with escaped name\n */\nexport type ModelWithEnumWithHyphen = {\n    /**\n     * Foo-Bar-Baz-Qux\n     */\n    'foo-bar-baz-qux'?: '3.0';\n};\n\n/**\n * This is a model with one enum\n */\nexport type ModelWithEnumFromDescription = {\n    /**\n     * Success=1,Warning=2,Error=3\n     */\n    test?: number;\n};\n\n/**\n * This is a model with nested enums\n */\nexport type ModelWithNestedEnums = {\n    dictionaryWithEnum?: {\n        [key: string]: 'Success' | 'Warning' | 'Error';\n    };\n    dictionaryWithEnumFromDescription?: {\n        [key: string]: number;\n    };\n    arrayWithEnum?: Array<'Success' | 'Warning' | 'Error'>;\n    arrayWithDescription?: Array<number>;\n    /**\n     * This is a simple enum with strings\n     */\n    'foo_bar-enum'?: 'Success' | 'Warning' | 'Error' | 'ØÆÅ字符串';\n};\n\n/**\n * This is a model with one property containing a reference\n */\nexport type ModelWithReference = {\n    prop?: ModelWithProperties;\n};\n\n/**\n * This is a model with one property containing an array\n */\nexport type ModelWithArrayReadOnlyAndWriteOnly = {\n    prop?: Array<ModelWithReadOnlyAndWriteOnly>;\n    propWithFile?: Array<Blob | File>;\n    propWithNumber?: Array<number>;\n};\n\n/**\n * This is a model with one property containing an array\n */\nexport type ModelWithArray = {\n    prop?: Array<ModelWithString>;\n    propWithFile?: Array<Blob | File>;\n    propWithNumber?: Array<number>;\n};\n\n/**\n * This is a model with one property containing a dictionary\n */\nexport type ModelWithDictionary = {\n    prop?: {\n        [key: string]: string;\n    };\n};\n\n/**\n * This is a deprecated model with a deprecated property\n *\n * @deprecated\n */\nexport type DeprecatedModel = {\n    /**\n     * This is a deprecated property\n     *\n     * @deprecated\n     */\n    prop?: string;\n};\n\n/**\n * This is a model with one property containing a circular reference\n */\nexport type ModelWithCircularReference = {\n    prop?: ModelWithCircularReference;\n};\n\n/**\n * This is a model with one property with a 'one of' relationship\n */\nexport type CompositionWithOneOf = {\n    propA?: ModelWithString | ModelWithEnum | ModelWithArray | ModelWithDictionary;\n};\n\n/**\n * This is a model with one property with a 'one of' relationship where the options are not $ref\n */\nexport type CompositionWithOneOfAnonymous = {\n    propA?: {\n        propA?: string;\n    } | string | number;\n};\n\n/**\n * Circle\n */\nexport type ModelCircle = {\n    kind: string;\n    radius?: number;\n};\n\n/**\n * Square\n */\nexport type ModelSquare = {\n    kind: string;\n    sideLength?: number;\n};\n\n/**\n * This is a model with one property with a 'one of' relationship where the options are not $ref\n */\nexport type CompositionWithOneOfDiscriminator = ({\n    kind: 'circle';\n} & ModelCircle) | ({\n    kind: 'square';\n} & ModelSquare);\n\n/**\n * This is a model with one property with a 'any of' relationship\n */\nexport type CompositionWithAnyOf = {\n    propA?: ModelWithString | ModelWithEnum | ModelWithArray | ModelWithDictionary;\n};\n\n/**\n * This is a model with one property with a 'any of' relationship where the options are not $ref\n */\nexport type CompositionWithAnyOfAnonymous = {\n    propA?: {\n        propA?: string;\n    } | string | number;\n};\n\n/**\n * This is a model with nested 'any of' property with a type null\n */\nexport type CompositionWithNestedAnyAndTypeNull = {\n    propA?: Array<ModelWithDictionary | null> | Array<ModelWithArray | null>;\n};\n\nexport type _3eNum1Период = 'Bird' | 'Dog';\n\nexport type ConstValue = 'ConstValue';\n\n/**\n * This is a model with one property with a 'any of' relationship where the options are not $ref\n */\nexport type CompositionWithNestedAnyOfAndNull = {\n    /**\n     * Scopes\n     */\n    propA?: Array<_3eNum1Период | ConstValue> | null;\n};\n\n/**\n * This is a model with one property with a 'one of' relationship\n */\nexport type CompositionWithOneOfAndNullable = {\n    propA?: {\n        boolean?: boolean;\n    } | ModelWithEnum | ModelWithArray | ModelWithDictionary | null;\n};\n\n/**\n * This is a model that contains a simple dictionary within composition\n */\nexport type CompositionWithOneOfAndSimpleDictionary = {\n    propA?: boolean | {\n        [key: string]: number;\n    };\n};\n\n/**\n * This is a model that contains a dictionary of simple arrays within composition\n */\nexport type CompositionWithOneOfAndSimpleArrayDictionary = {\n    propA?: boolean | {\n        [key: string]: Array<boolean>;\n    };\n};\n\n/**\n * This is a model that contains a dictionary of complex arrays (composited) within composition\n */\nexport type CompositionWithOneOfAndComplexArrayDictionary = {\n    propA?: boolean | {\n        [key: string]: Array<number | string>;\n    };\n};\n\n/**\n * This is a model with one property with a 'all of' relationship\n */\nexport type CompositionWithAllOfAndNullable = {\n    propA?: ({\n        boolean?: boolean;\n    } & ModelWithEnum & ModelWithArray & ModelWithDictionary) | null;\n};\n\n/**\n * This is a model with one property with a 'any of' relationship\n */\nexport type CompositionWithAnyOfAndNullable = {\n    propA?: {\n        boolean?: boolean;\n    } | ModelWithEnum | ModelWithArray | ModelWithDictionary | null;\n};\n\n/**\n * This is a base model with two simple optional properties\n */\nexport type CompositionBaseModel = {\n    firstName?: string;\n    lastname?: string;\n};\n\n/**\n * This is a model that extends the base model\n */\nexport type CompositionExtendedModel = CompositionBaseModel & {\n    age: number;\n    firstName: string;\n    lastname: string;\n};\n\n/**\n * This is a model with one nested property\n */\nexport type ModelWithProperties = {\n    required: string;\n    readonly requiredAndReadOnly: string;\n    requiredAndNullable: string | null;\n    string?: string;\n    number?: number;\n    boolean?: boolean;\n    reference?: ModelWithString;\n    'property with space'?: string;\n    default?: string;\n    try?: string;\n    readonly '@namespace.string'?: string;\n    readonly '@namespace.integer'?: number;\n};\n\n/**\n * This is a model with one nested property\n */\nexport type ModelWithNestedProperties = {\n    readonly first: {\n        readonly second: {\n            readonly third: string | null;\n        } | null;\n    } | null;\n};\n\n/**\n * This is a model with duplicated properties\n */\nexport type ModelWithDuplicateProperties = {\n    prop?: ModelWithString;\n};\n\n/**\n * This is a model with ordered properties\n */\nexport type ModelWithOrderedProperties = {\n    zebra?: string;\n    apple?: string;\n    hawaii?: string;\n};\n\n/**\n * This is a model with duplicated imports\n */\nexport type ModelWithDuplicateImports = {\n    propA?: ModelWithString;\n    propB?: ModelWithString;\n    propC?: ModelWithString;\n};\n\n/**\n * This is a model that extends another model\n */\nexport type ModelThatExtends = ModelWithString & {\n    propExtendsA?: string;\n    propExtendsB?: ModelWithString;\n};\n\n/**\n * This is a model that extends another model\n */\nexport type ModelThatExtendsExtends = ModelWithString & ModelThatExtends & {\n    propExtendsC?: string;\n    propExtendsD?: ModelWithString;\n};\n\n/**\n * This is a model that contains a some patterns\n */\nexport type ModelWithPattern = {\n    key: string;\n    name: string;\n    readonly enabled?: boolean;\n    readonly modified?: string;\n    id?: string;\n    text?: string;\n    patternWithSingleQuotes?: string;\n    patternWithNewline?: string;\n    patternWithBacktick?: string;\n    patternWithUnicode?: string;\n};\n\nexport type File = {\n    /**\n     * Id\n     */\n    readonly id?: string;\n    /**\n     * Updated at\n     */\n    readonly updated_at?: string;\n    /**\n     * Created at\n     */\n    readonly created_at?: string;\n    /**\n     * Mime\n     */\n    mime: string;\n    /**\n     * File\n     */\n    readonly file?: string;\n};\n\nexport type Default = {\n    name?: string;\n};\n\nexport type Pageable = {\n    page?: number;\n    size?: number;\n    sort?: Array<string>;\n};\n\n/**\n * This is a free-form object without additionalProperties.\n */\nexport type FreeFormObjectWithoutAdditionalProperties = {\n    [key: string]: unknown;\n};\n\n/**\n * This is a free-form object with additionalProperties: true.\n */\nexport type FreeFormObjectWithAdditionalPropertiesEqTrue = {\n    [key: string]: unknown;\n};\n\n/**\n * This is a free-form object with additionalProperties: {}.\n */\nexport type FreeFormObjectWithAdditionalPropertiesEqEmptyObject = {\n    [key: string]: unknown;\n};\n\nexport type ModelWithConst = {\n    String?: 'String';\n    number?: 0;\n    null?: null;\n    withType?: 'Some string';\n};\n\n/**\n * This is a model with one property and additionalProperties: true\n */\nexport type ModelWithAdditionalPropertiesEqTrue = {\n    /**\n     * This is a simple string property\n     */\n    prop?: string;\n    [key: string]: unknown;\n};\n\nexport type NestedAnyOfArraysNullable = {\n    nullableArray?: Array<string | boolean> | null;\n};\n\nexport type CompositionWithOneOfAndProperties = ({\n    foo: SimpleParameter;\n} | {\n    bar: NonAsciiStringæøåÆøÅöôêÊ字符串;\n}) & {\n    baz: number | null;\n    qux: number;\n};\n\n/**\n * An object that can be null\n */\nexport type NullableObject = {\n    foo?: string;\n} | null;\n\n/**\n * Some % character\n */\nexport type CharactersInDescription = string;\n\nexport type ModelWithNullableObject = {\n    data?: NullableObject;\n};\n\n/**\n * An object with additional properties that can be null (anyOf ref + null)\n */\nexport type ModelWithAdditionalPropertiesRef = {\n    [key: string]: NullableObject | null;\n};\n\nexport type ModelWithOneOfEnum = {\n    foo: 'Bar';\n} | {\n    foo: 'Baz';\n} | {\n    foo: 'Qux';\n} | {\n    content: string;\n    foo: 'Quux';\n} | {\n    content: [\n        string,\n        string\n    ];\n    foo: 'Corge';\n};\n\nexport type ModelWithNestedArrayEnumsDataFoo = 'foo' | 'bar';\n\nexport type ModelWithNestedArrayEnumsDataBar = 'baz' | 'qux';\n\nexport type ModelWithNestedArrayEnumsData = {\n    foo?: Array<ModelWithNestedArrayEnumsDataFoo>;\n    bar?: Array<ModelWithNestedArrayEnumsDataBar>;\n};\n\nexport type ModelWithNestedArrayEnums = {\n    array_strings?: Array<string>;\n    data?: ModelWithNestedArrayEnumsData;\n};\n\nexport type ModelWithNestedCompositionEnums = {\n    foo?: ModelWithNestedArrayEnumsDataFoo;\n};\n\nexport type ModelWithReadOnlyAndWriteOnly = {\n    foo: string;\n    readonly bar: string;\n};\n\nexport type ModelWithConstantSizeArray = [\n    number,\n    number\n];\n\nexport type ModelWithAnyOfConstantSizeArray = [\n    number | string,\n    number | string,\n    number | string\n];\n\nexport type ModelWithPrefixItemsConstantSizeArray = [\n    ModelWithInteger,\n    number | string,\n    string\n];\n\nexport type ModelWithAnyOfConstantSizeArrayNullable = [\n    number | null | string,\n    number | null | string,\n    number | null | string\n];\n\nexport type ModelWithAnyOfConstantSizeArrayWithNSizeAndOptions = [\n    number | Import,\n    number | Import\n];\n\nexport type ModelWithAnyOfConstantSizeArrayAndIntersect = [\n    number & string,\n    number & string\n];\n\nexport type ModelWithNumericEnumUnion = {\n    /**\n     * Период\n     */\n    value?: -10 | -1 | 0 | 1 | 3 | 6 | 12;\n};\n\n/**\n * Some description with `back ticks`\n */\nexport type ModelWithBackticksInDescription = {\n    /**\n     * The template `that` should be used for parsing and importing the contents of the CSV file.\n     *\n     * <br/><p>There is one placeholder currently supported:<ul>     <li><b>${x}</b> - refers to the n-th column in the CSV file, e.g. ${1}, ${2}, ...)</li></ul><p>Example of a correct JSON template:</p>\n     * <pre>\n     * [\n     * {\n     * \"resourceType\": \"Asset\",\n     * \"identifier\": {\n     * \"name\": \"${1}\",\n     * \"domain\": {\n     * \"name\": \"${2}\",\n     * \"community\": {\n     * \"name\": \"Some Community\"\n     * }\n     * }\n     * },\n     * \"attributes\" : {\n     * \"00000000-0000-0000-0000-000000003115\" : [ {\n     * \"value\" : \"${3}\"\n     * } ],\n     * \"00000000-0000-0000-0000-000000000222\" : [ {\n     * \"value\" : \"${4}\"\n     * } ]\n     * }\n     * }\n     * ]\n     * </pre>\n     */\n    template?: string;\n};\n\nexport type ModelWithOneOfAndProperties = (SimpleParameter | NonAsciiStringæøåÆøÅöôêÊ字符串) & {\n    baz: number | null;\n    qux: number;\n};\n\n/**\n * Model used to test deduplication strategy (unused)\n */\nexport type ParameterSimpleParameterUnused = string;\n\n/**\n * Model used to test deduplication strategy\n */\nexport type PostServiceWithEmptyTagResponse = string;\n\n/**\n * Model used to test deduplication strategy\n */\nexport type PostServiceWithEmptyTagResponse2 = string;\n\n/**\n * Model used to test deduplication strategy\n */\nexport type DeleteFooData = string;\n\n/**\n * Model used to test deduplication strategy\n */\nexport type DeleteFooData2 = string;\n\n/**\n * Model with restricted keyword name\n */\nexport type Import = string;\n\nexport type SchemaWithFormRestrictedKeys = {\n    description?: string;\n    'x-enum-descriptions'?: string;\n    'x-enum-varnames'?: string;\n    'x-enumNames'?: string;\n    title?: string;\n    object?: {\n        description?: string;\n        'x-enum-descriptions'?: string;\n        'x-enum-varnames'?: string;\n        'x-enumNames'?: string;\n        title?: string;\n    };\n    array?: Array<{\n        description?: string;\n        'x-enum-descriptions'?: string;\n        'x-enum-varnames'?: string;\n        'x-enumNames'?: string;\n        title?: string;\n    }>;\n};\n\n/**\n * This schema was giving PascalCase transformations a hard time\n */\nexport type IoK8sApimachineryPkgApisMetaV1DeleteOptions = {\n    /**\n     * Must be fulfilled before a deletion is carried out. If not possible, a 409 Conflict status will be returned.\n     */\n    preconditions?: IoK8sApimachineryPkgApisMetaV1Preconditions;\n};\n\n/**\n * This schema was giving PascalCase transformations a hard time\n */\nexport type IoK8sApimachineryPkgApisMetaV1Preconditions = {\n    /**\n     * Specifies the target ResourceVersion\n     */\n    resourceVersion?: string;\n    /**\n     * Specifies the target UID.\n     */\n    uid?: string;\n};\n\nexport type AdditionalPropertiesUnknownIssue = {\n    [key: string]: string | number;\n};\n\nexport type AdditionalPropertiesUnknownIssue2 = {\n    [key: string]: string | number;\n};\n\nexport type AdditionalPropertiesUnknownIssue3 = string & {\n    entries: {\n        [key: string]: AdditionalPropertiesUnknownIssue;\n    };\n};\n\nexport type AdditionalPropertiesIntegerIssue = {\n    value: number;\n    [key: string]: number;\n};\n\nexport type OneOfAllOfIssue = ((ConstValue | GenericSchemaDuplicateIssue1SystemBoolean) & _3eNum1Период) | GenericSchemaDuplicateIssue1SystemString;\n\nexport type GenericSchemaDuplicateIssue1SystemBoolean = {\n    item?: boolean;\n    error?: string | null;\n    readonly hasError?: boolean;\n    data?: {\n        [key: string]: never;\n    };\n};\n\nexport type GenericSchemaDuplicateIssue1SystemString = {\n    item?: string | null;\n    error?: string | null;\n    readonly hasError?: boolean;\n};\n\nexport type ExternalSharedModel = {\n    id: string;\n    name?: string;\n};\n\n/**\n * This is a model with one property containing a reference\n */\nexport type ModelWithReferenceWritable = {\n    prop?: ModelWithPropertiesWritable;\n};\n\n/**\n * This is a model with one property containing an array\n */\nexport type ModelWithArrayReadOnlyAndWriteOnlyWritable = {\n    prop?: Array<ModelWithReadOnlyAndWriteOnlyWritable>;\n    propWithFile?: Array<Blob | File>;\n    propWithNumber?: Array<number>;\n};\n\n/**\n * This is a model with one nested property\n */\nexport type ModelWithPropertiesWritable = {\n    required: string;\n    requiredAndNullable: string | null;\n    string?: string;\n    number?: number;\n    boolean?: boolean;\n    reference?: ModelWithString;\n    'property with space'?: string;\n    default?: string;\n    try?: string;\n};\n\n/**\n * This is a model that contains a some patterns\n */\nexport type ModelWithPatternWritable = {\n    key: string;\n    name: string;\n    id?: string;\n    text?: string;\n    patternWithSingleQuotes?: string;\n    patternWithNewline?: string;\n    patternWithBacktick?: string;\n    patternWithUnicode?: string;\n};\n\nexport type FileWritable = {\n    /**\n     * Mime\n     */\n    mime: string;\n};\n\nexport type ModelWithReadOnlyAndWriteOnlyWritable = {\n    foo: string;\n    baz: string;\n};\n\nexport type ModelWithAnyOfConstantSizeArrayWithNSizeAndOptionsWritable = [\n    number | Import,\n    number | Import\n];\n\nexport type AdditionalPropertiesUnknownIssueWritable = {\n    [key: string]: string | number;\n};\n\nexport type OneOfAllOfIssueWritable = ((ConstValue | GenericSchemaDuplicateIssue1SystemBoolean) & _3eNum1Период) | GenericSchemaDuplicateIssue1SystemString;\n\nexport type GenericSchemaDuplicateIssue1SystemBooleanWritable = {\n    item?: boolean;\n    error?: string | null;\n    data?: {\n        [key: string]: never;\n    };\n};\n\nexport type GenericSchemaDuplicateIssue1SystemStringWritable = {\n    item?: string | null;\n    error?: string | null;\n};\n\n/**\n * This is a reusable parameter\n */\nexport type SimpleParameter = string;\n\n/**\n * Parameter with illegal characters\n */\nexport type XFooBar = ModelWithString;\n\n/**\n * A reusable request body\n */\nexport type SimpleRequestBody = ModelWithString;\n\n/**\n * A reusable request body\n */\nexport type SimpleFormData = ModelWithString;\n\nexport type ExportData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no+tag';\n};\n\nexport type PatchApiVbyApiVersionNoTagData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no+tag';\n};\n\nexport type PatchApiVbyApiVersionNoTagResponses = {\n    /**\n     * OK\n     */\n    default: unknown;\n};\n\nexport type ImportData = {\n    body: ModelWithReadOnlyAndWriteOnlyWritable | ModelWithArrayReadOnlyAndWriteOnlyWritable;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no+tag';\n};\n\nexport type ImportResponses = {\n    /**\n     * Success\n     */\n    200: ModelFromZendesk;\n    /**\n     * Default success response\n     */\n    default: ModelWithReadOnlyAndWriteOnly;\n};\n\nexport type ImportResponse = ImportResponses[keyof ImportResponses];\n\nexport type FooWowData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no+tag';\n};\n\nexport type FooWowResponses = {\n    /**\n     * OK\n     */\n    default: unknown;\n};\n\nexport type ApiVVersionODataControllerCountData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple/$count';\n};\n\nexport type ApiVVersionODataControllerCountResponses = {\n    /**\n     * Success\n     */\n    200: ModelFromZendesk;\n};\n\nexport type ApiVVersionODataControllerCountResponse = ApiVVersionODataControllerCountResponses[keyof ApiVVersionODataControllerCountResponses];\n\nexport type GetApiVbyApiVersionSimpleOperationData = {\n    body?: never;\n    path: {\n        /**\n         * foo in method\n         */\n        foo_param: string;\n    };\n    query?: never;\n    url: '/api/v{api-version}/simple:operation';\n};\n\nexport type GetApiVbyApiVersionSimpleOperationErrors = {\n    /**\n     * Default error response\n     */\n    default: ModelWithBoolean;\n};\n\nexport type GetApiVbyApiVersionSimpleOperationError = GetApiVbyApiVersionSimpleOperationErrors[keyof GetApiVbyApiVersionSimpleOperationErrors];\n\nexport type GetApiVbyApiVersionSimpleOperationResponses = {\n    /**\n     * Response is a simple number\n     */\n    200: number;\n};\n\nexport type GetApiVbyApiVersionSimpleOperationResponse = GetApiVbyApiVersionSimpleOperationResponses[keyof GetApiVbyApiVersionSimpleOperationResponses];\n\nexport type DeleteCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type GetCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type HeadCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type OptionsCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type PatchCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type PostCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type PutCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type DeleteFooData3 = {\n    body?: never;\n    headers: {\n        /**\n         * Parameter with illegal characters\n         */\n        'x-Foo-Bar': ModelWithString;\n    };\n    path: {\n        /**\n         * foo in method\n         */\n        foo_param: string;\n        /**\n         * bar in method\n         */\n        BarParam: string;\n    };\n    query?: never;\n    url: '/api/v{api-version}/foo/{foo_param}/bar/{BarParam}';\n};\n\nexport type CallWithDescriptionsData = {\n    body?: never;\n    path?: never;\n    query?: {\n        /**\n         * Testing multiline comments in string: First line\n         * Second line\n         *\n         * Fourth line\n         */\n        parameterWithBreaks?: string;\n        /**\n         * Testing backticks in string: `backticks` and ```multiple backticks``` should work\n         */\n        parameterWithBackticks?: string;\n        /**\n         * Testing slashes in string: \\backwards\\\\\\ and /forwards/// should work\n         */\n        parameterWithSlashes?: string;\n        /**\n         * Testing expression placeholders in string: ${expression} should work\n         */\n        parameterWithExpressionPlaceholders?: string;\n        /**\n         * Testing quotes in string: 'single quote''' and \"double quotes\"\"\" should work\n         */\n        parameterWithQuotes?: string;\n        /**\n         * Testing reserved characters in string: * inline * and ** inline ** should work\n         */\n        parameterWithReservedCharacters?: string;\n    };\n    url: '/api/v{api-version}/descriptions';\n};\n\nexport type DeprecatedCallData = {\n    body?: never;\n    headers: {\n        /**\n         * This parameter is deprecated\n         *\n         * @deprecated\n         */\n        parameter: DeprecatedModel | null;\n    };\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/parameters/deprecated';\n};\n\nexport type CallWithParametersData = {\n    /**\n     * This is the parameter that goes into the body\n     */\n    body: {\n        [key: string]: unknown;\n    } | null;\n    headers: {\n        /**\n         * This is the parameter that goes into the header\n         */\n        parameterHeader: string | null;\n    };\n    path: {\n        /**\n         * This is the parameter that goes into the path\n         */\n        parameterPath: string | null;\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string | null;\n    };\n    query: {\n        foo_ref_enum?: ModelWithNestedArrayEnumsDataFoo;\n        foo_all_of_enum: ModelWithNestedArrayEnumsDataFoo;\n        /**\n         * This is the parameter that goes into the query params\n         */\n        cursor: string | null;\n    };\n    url: '/api/v{api-version}/parameters/{parameterPath}';\n};\n\nexport type CallWithWeirdParameterNamesData = {\n    /**\n     * This is the parameter that goes into the body\n     */\n    body: ModelWithString | null;\n    headers: {\n        /**\n         * This is the parameter that goes into the request header\n         */\n        'parameter.header': string | null;\n    };\n    path: {\n        /**\n         * This is the parameter that goes into the path\n         */\n        'parameter.path.1'?: string;\n        /**\n         * This is the parameter that goes into the path\n         */\n        'parameter-path-2'?: string;\n        /**\n         * This is the parameter that goes into the path\n         */\n        'PARAMETER-PATH-3'?: string;\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string | null;\n    };\n    query: {\n        /**\n         * This is the parameter with a reserved keyword\n         */\n        default?: string;\n        /**\n         * This is the parameter that goes into the request query params\n         */\n        'parameter-query': string | null;\n    };\n    url: '/api/v{api-version}/parameters/{parameter.path.1}/{parameter-path-2}/{PARAMETER-PATH-3}';\n};\n\nexport type GetCallWithOptionalParamData = {\n    /**\n     * This is a required parameter\n     */\n    body: ModelWithOneOfEnum;\n    path?: never;\n    query?: {\n        /**\n         * This is an optional parameter\n         */\n        page?: number;\n    };\n    url: '/api/v{api-version}/parameters';\n};\n\nexport type PostCallWithOptionalParamData = {\n    /**\n     * This is an optional parameter\n     */\n    body?: {\n        offset?: number | null;\n    };\n    path?: never;\n    query: {\n        /**\n         * This is a required parameter\n         */\n        parameter: Pageable;\n    };\n    url: '/api/v{api-version}/parameters';\n};\n\nexport type PostCallWithOptionalParamResponses = {\n    /**\n     * Response is a simple number\n     */\n    200: number;\n    /**\n     * Success\n     */\n    204: void;\n};\n\nexport type PostCallWithOptionalParamResponse = PostCallWithOptionalParamResponses[keyof PostCallWithOptionalParamResponses];\n\nexport type PostApiVbyApiVersionRequestBodyData = {\n    /**\n     * A reusable request body\n     */\n    body?: SimpleRequestBody;\n    path?: never;\n    query?: {\n        /**\n         * This is a reusable parameter\n         */\n        parameter?: string;\n    };\n    url: '/api/v{api-version}/requestBody';\n};\n\nexport type PostApiVbyApiVersionFormDataData = {\n    /**\n     * A reusable request body\n     */\n    body?: SimpleFormData;\n    path?: never;\n    query?: {\n        /**\n         * This is a reusable parameter\n         */\n        parameter?: string;\n    };\n    url: '/api/v{api-version}/formData';\n};\n\nexport type CallWithDefaultParametersData = {\n    body?: never;\n    path?: never;\n    query?: {\n        /**\n         * This is a simple string with default value\n         */\n        parameterString?: string | null;\n        /**\n         * This is a simple number with default value\n         */\n        parameterNumber?: number | null;\n        /**\n         * This is a simple boolean with default value\n         */\n        parameterBoolean?: boolean | null;\n        /**\n         * This is a simple enum with default value\n         */\n        parameterEnum?: 'Success' | 'Warning' | 'Error';\n        /**\n         * This is a simple model with default value\n         */\n        parameterModel?: ModelWithString | null;\n    };\n    url: '/api/v{api-version}/defaults';\n};\n\nexport type CallWithDefaultOptionalParametersData = {\n    body?: never;\n    path?: never;\n    query?: {\n        /**\n         * This is a simple string that is optional with default value\n         */\n        parameterString?: string;\n        /**\n         * This is a simple number that is optional with default value\n         */\n        parameterNumber?: number;\n        /**\n         * This is a simple boolean that is optional with default value\n         */\n        parameterBoolean?: boolean;\n        /**\n         * This is a simple enum that is optional with default value\n         */\n        parameterEnum?: 'Success' | 'Warning' | 'Error';\n        /**\n         * This is a simple model that is optional with default value\n         */\n        parameterModel?: ModelWithString;\n    };\n    url: '/api/v{api-version}/defaults';\n};\n\nexport type CallToTestOrderOfParamsData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * This is a optional string with default\n         */\n        parameterOptionalStringWithDefault?: string;\n        /**\n         * This is a optional string with empty default\n         */\n        parameterOptionalStringWithEmptyDefault?: string;\n        /**\n         * This is a optional string with no default\n         */\n        parameterOptionalStringWithNoDefault?: string;\n        /**\n         * This is a string with default\n         */\n        parameterStringWithDefault: string;\n        /**\n         * This is a string with empty default\n         */\n        parameterStringWithEmptyDefault: string;\n        /**\n         * This is a string with no default\n         */\n        parameterStringWithNoDefault: string;\n        /**\n         * This is a string that can be null with no default\n         */\n        parameterStringNullableWithNoDefault?: string | null;\n        /**\n         * This is a string that can be null with default\n         */\n        parameterStringNullableWithDefault?: string | null;\n    };\n    url: '/api/v{api-version}/defaults';\n};\n\nexport type DuplicateNameData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/duplicate';\n};\n\nexport type DuplicateName2Data = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/duplicate';\n};\n\nexport type DuplicateName3Data = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/duplicate';\n};\n\nexport type DuplicateName4Data = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/duplicate';\n};\n\nexport type CallWithNoContentResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no-content';\n};\n\nexport type CallWithNoContentResponseResponses = {\n    /**\n     * Success\n     */\n    204: void;\n};\n\nexport type CallWithNoContentResponseResponse = CallWithNoContentResponseResponses[keyof CallWithNoContentResponseResponses];\n\nexport type CallWithResponseAndNoContentResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multiple-tags/response-and-no-content';\n};\n\nexport type CallWithResponseAndNoContentResponseResponses = {\n    /**\n     * Response is a simple number\n     */\n    200: number;\n    /**\n     * Success\n     */\n    204: void;\n};\n\nexport type CallWithResponseAndNoContentResponseResponse = CallWithResponseAndNoContentResponseResponses[keyof CallWithResponseAndNoContentResponseResponses];\n\nexport type DummyAData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multiple-tags/a';\n};\n\nexport type DummyAResponses = {\n    200: _400;\n};\n\nexport type DummyAResponse = DummyAResponses[keyof DummyAResponses];\n\nexport type DummyBData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multiple-tags/b';\n};\n\nexport type DummyBResponses = {\n    /**\n     * Success\n     */\n    204: void;\n};\n\nexport type DummyBResponse = DummyBResponses[keyof DummyBResponses];\n\nexport type CallWithResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/response';\n};\n\nexport type CallWithResponseResponses = {\n    default: Import;\n};\n\nexport type CallWithResponseResponse = CallWithResponseResponses[keyof CallWithResponseResponses];\n\nexport type CallWithDuplicateResponsesData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/response';\n};\n\nexport type CallWithDuplicateResponsesErrors = {\n    /**\n     * Message for 500 error\n     */\n    500: ModelWithStringError;\n    /**\n     * Message for 501 error\n     */\n    501: ModelWithStringError;\n    /**\n     * Message for 502 error\n     */\n    502: ModelWithStringError;\n    /**\n     * Message for 4XX errors\n     */\n    '4XX': DictionaryWithArray;\n    /**\n     * Default error response\n     */\n    default: ModelWithBoolean;\n};\n\nexport type CallWithDuplicateResponsesError = CallWithDuplicateResponsesErrors[keyof CallWithDuplicateResponsesErrors];\n\nexport type CallWithDuplicateResponsesResponses = {\n    /**\n     * Message for 200 response\n     */\n    200: ModelWithBoolean & ModelWithInteger;\n    /**\n     * Message for 201 response\n     */\n    201: ModelWithString;\n    /**\n     * Message for 202 response\n     */\n    202: ModelWithString;\n};\n\nexport type CallWithDuplicateResponsesResponse = CallWithDuplicateResponsesResponses[keyof CallWithDuplicateResponsesResponses];\n\nexport type CallWithResponsesData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/response';\n};\n\nexport type CallWithResponsesErrors = {\n    /**\n     * Message for 500 error\n     */\n    500: ModelWithStringError;\n    /**\n     * Message for 501 error\n     */\n    501: ModelWithStringError;\n    /**\n     * Message for 502 error\n     */\n    502: ModelWithStringError;\n    /**\n     * Message for default response\n     */\n    default: ModelWithStringError;\n};\n\nexport type CallWithResponsesError = CallWithResponsesErrors[keyof CallWithResponsesErrors];\n\nexport type CallWithResponsesResponses = {\n    /**\n     * Message for 200 response\n     */\n    200: {\n        readonly '@namespace.string'?: string;\n        readonly '@namespace.integer'?: number;\n        readonly value?: Array<ModelWithString>;\n    };\n    /**\n     * Message for 201 response\n     */\n    201: ModelThatExtends;\n    /**\n     * Message for 202 response\n     */\n    202: ModelThatExtendsExtends;\n};\n\nexport type CallWithResponsesResponse = CallWithResponsesResponses[keyof CallWithResponsesResponses];\n\nexport type CollectionFormatData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * This is an array parameter that is sent as csv format (comma-separated values)\n         */\n        parameterArrayCSV: Array<string> | null;\n        /**\n         * This is an array parameter that is sent as ssv format (space-separated values)\n         */\n        parameterArraySSV: Array<string> | null;\n        /**\n         * This is an array parameter that is sent as tsv format (tab-separated values)\n         */\n        parameterArrayTSV: Array<string> | null;\n        /**\n         * This is an array parameter that is sent as pipes format (pipe-separated values)\n         */\n        parameterArrayPipes: Array<string> | null;\n        /**\n         * This is an array parameter that is sent as multi format (multiple parameter instances)\n         */\n        parameterArrayMulti: Array<string> | null;\n    };\n    url: '/api/v{api-version}/collectionFormat';\n};\n\nexport type TypesData = {\n    body?: never;\n    path?: {\n        /**\n         * This is a number parameter\n         */\n        id?: number;\n    };\n    query: {\n        /**\n         * This is a number parameter\n         */\n        parameterNumber: number;\n        /**\n         * This is a string parameter\n         */\n        parameterString: string | null;\n        /**\n         * This is a boolean parameter\n         */\n        parameterBoolean: boolean | null;\n        /**\n         * This is an object parameter\n         */\n        parameterObject: {\n            [key: string]: unknown;\n        } | null;\n        /**\n         * This is an array parameter\n         */\n        parameterArray: Array<string> | null;\n        /**\n         * This is a dictionary parameter\n         */\n        parameterDictionary: {\n            [key: string]: unknown;\n        } | null;\n        /**\n         * This is an enum parameter\n         */\n        parameterEnum: 'Success' | 'Warning' | 'Error' | null;\n    };\n    url: '/api/v{api-version}/types';\n};\n\nexport type TypesResponses = {\n    /**\n     * Response is a simple number\n     */\n    200: number;\n    /**\n     * Response is a simple string\n     */\n    201: string;\n    /**\n     * Response is a simple boolean\n     */\n    202: boolean;\n    /**\n     * Response is a simple object\n     */\n    203: {\n        [key: string]: unknown;\n    };\n};\n\nexport type TypesResponse = TypesResponses[keyof TypesResponses];\n\nexport type UploadFileData = {\n    body: Blob | File;\n    path: {\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string | null;\n    };\n    query?: never;\n    url: '/api/v{api-version}/upload';\n};\n\nexport type UploadFileResponses = {\n    200: boolean;\n};\n\nexport type UploadFileResponse = UploadFileResponses[keyof UploadFileResponses];\n\nexport type FileResponseData = {\n    body?: never;\n    path: {\n        id: string;\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string;\n    };\n    query?: never;\n    url: '/api/v{api-version}/file/{id}';\n};\n\nexport type FileResponseResponses = {\n    /**\n     * Success\n     */\n    200: Blob | File;\n};\n\nexport type FileResponseResponse = FileResponseResponses[keyof FileResponseResponses];\n\nexport type ComplexTypesData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * Parameter containing object\n         */\n        parameterObject: {\n            first?: {\n                second?: {\n                    third?: string;\n                };\n            };\n        };\n        /**\n         * Parameter containing reference\n         */\n        parameterReference: ModelWithString;\n    };\n    url: '/api/v{api-version}/complex';\n};\n\nexport type ComplexTypesErrors = {\n    /**\n     * 400 `server` error\n     */\n    400: unknown;\n    /**\n     * 500 server error\n     */\n    500: unknown;\n};\n\nexport type ComplexTypesResponses = {\n    /**\n     * Successful response\n     */\n    200: Array<ModelWithString>;\n};\n\nexport type ComplexTypesResponse = ComplexTypesResponses[keyof ComplexTypesResponses];\n\nexport type MultipartResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multipart';\n};\n\nexport type MultipartResponseResponses = {\n    /**\n     * OK\n     */\n    200: {\n        file?: Blob | File;\n        metadata?: {\n            foo?: string;\n            bar?: string;\n        };\n    };\n};\n\nexport type MultipartResponseResponse = MultipartResponseResponses[keyof MultipartResponseResponses];\n\nexport type MultipartRequestData = {\n    body?: {\n        content?: Blob | File;\n        data?: ModelWithString | null;\n    };\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multipart';\n};\n\nexport type ComplexParamsData = {\n    body?: {\n        readonly key: string | null;\n        name: string | null;\n        enabled?: boolean;\n        type: 'Monkey' | 'Horse' | 'Bird';\n        listOfModels?: Array<ModelWithString> | null;\n        listOfStrings?: Array<string> | null;\n        parameters: ModelWithString | ModelWithEnum | ModelWithArray | ModelWithDictionary;\n        readonly user?: {\n            readonly id?: number;\n            readonly name?: string | null;\n        };\n    };\n    path: {\n        id: number;\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string;\n    };\n    query?: never;\n    url: '/api/v{api-version}/complex/{id}';\n};\n\nexport type ComplexParamsResponses = {\n    /**\n     * Success\n     */\n    200: ModelWithString;\n};\n\nexport type ComplexParamsResponse = ComplexParamsResponses[keyof ComplexParamsResponses];\n\nexport type CallWithResultFromHeaderData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/header';\n};\n\nexport type CallWithResultFromHeaderErrors = {\n    /**\n     * 400 server error\n     */\n    400: unknown;\n    /**\n     * 500 server error\n     */\n    500: unknown;\n};\n\nexport type CallWithResultFromHeaderResponses = {\n    /**\n     * Successful response\n     */\n    200: unknown;\n};\n\nexport type TestErrorCodeData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * Status code to return\n         */\n        status: number;\n    };\n    url: '/api/v{api-version}/error';\n};\n\nexport type TestErrorCodeErrors = {\n    /**\n     * Custom message: Internal Server Error\n     */\n    500: unknown;\n    /**\n     * Custom message: Not Implemented\n     */\n    501: unknown;\n    /**\n     * Custom message: Bad Gateway\n     */\n    502: unknown;\n    /**\n     * Custom message: Service Unavailable\n     */\n    503: unknown;\n};\n\nexport type TestErrorCodeResponses = {\n    /**\n     * Custom message: Successful response\n     */\n    200: unknown;\n};\n\nexport type NonAsciiæøåÆøÅöôêÊ字符串Data = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * Dummy input param\n         */\n        nonAsciiParamæøåÆØÅöôêÊ: number;\n    };\n    url: '/api/v{api-version}/non-ascii-æøåÆØÅöôêÊ字符串';\n};\n\nexport type NonAsciiæøåÆøÅöôêÊ字符串Responses = {\n    /**\n     * Successful response\n     */\n    200: Array<NonAsciiStringæøåÆøÅöôêÊ字符串>;\n};\n\nexport type NonAsciiæøåÆøÅöôêÊ字符串Response = NonAsciiæøåÆøÅöôêÊ字符串Responses[keyof NonAsciiæøåÆøÅöôêÊ字符串Responses];\n\nexport type PutWithFormUrlEncodedData = {\n    body: ArrayWithStrings;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/non-ascii-æøåÆØÅöôêÊ字符串';\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-axios/sdk-client-required/client/client.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { AxiosError, AxiosInstance, RawAxiosRequestHeaders } from 'axios';\nimport axios from 'axios';\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 } from './types.gen';\nimport { buildUrl, createConfig, mergeConfigs, mergeHeaders, setAuthParams } from './utils.gen';\n\nexport const createClient = (config: Config = {}): Client => {\n  let _config = mergeConfigs(createConfig(), config);\n\n  let instance: AxiosInstance;\n\n  if (_config.axios && !('Axios' in _config.axios)) {\n    instance = _config.axios;\n  } else {\n    // eslint-disable-next-line @typescript-eslint/no-unused-vars\n    const { auth, ...configWithoutAuth } = _config;\n    instance = axios.create(configWithoutAuth);\n  }\n\n  const getConfig = (): Config => ({ ..._config });\n\n  const setConfig = (config: Config): Config => {\n    _config = mergeConfigs(_config, config);\n    instance.defaults = {\n      ...instance.defaults,\n      ..._config,\n      // @ts-expect-error\n      headers: mergeHeaders(instance.defaults.headers, _config.headers),\n    };\n    return getConfig();\n  };\n\n  const beforeRequest = async (options: RequestOptions) => {\n    const opts = {\n      ..._config,\n      ...options,\n      axios: options.axios ?? _config.axios ?? instance,\n      headers: mergeHeaders(_config.headers, options.headers),\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.body = opts.bodySerializer(opts.body);\n    }\n\n    const url = buildUrl(opts);\n\n    return { opts, url };\n  };\n\n  // @ts-expect-error\n  const request: Client['request'] = async (options) => {\n    // @ts-expect-error\n    const { opts, url } = await beforeRequest(options);\n    try {\n      // assign Axios here for consistency with fetch\n      const _axios = opts.axios!;\n      // eslint-disable-next-line @typescript-eslint/no-unused-vars\n      const { auth, ...optsWithoutAuth } = opts;\n      const response = await _axios({\n        ...optsWithoutAuth,\n        baseURL: '', // the baseURL is already included in `url`\n        data: getValidRequestBody(opts),\n        headers: opts.headers as RawAxiosRequestHeaders,\n        // let `paramsSerializer()` handle query params if it exists\n        params: opts.paramsSerializer ? opts.query : undefined,\n        url,\n      });\n\n      let { data } = response;\n\n      if (opts.responseType === '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 {\n        ...response,\n        data: data ?? {},\n      };\n    } catch (error) {\n      const e = error as AxiosError;\n      if (opts.throwOnError) {\n        throw e;\n      }\n      // @ts-expect-error\n      e.error = e.response?.data ?? {};\n      return e;\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 Record<string, string>,\n      method,\n      serializedBody: getValidRequestBody(opts) as BodyInit | null | undefined,\n      // @ts-expect-error\n      signal: opts.signal,\n      url,\n    });\n  };\n\n  const _buildUrl: Client['buildUrl'] = (options) =>\n    buildUrl({ axios: instance, ..._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    instance,\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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-axios/sdk-client-required/client/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type { Auth } from '../core/auth.gen';\nexport type { QuerySerializerOptions } from '../core/bodySerializer.gen';\nexport {\n  formDataBodySerializer,\n  jsonBodySerializer,\n  urlSearchParamsBodySerializer,\n} from '../core/bodySerializer.gen';\nexport { buildClientParams } from '../core/params.gen';\nexport { serializeQueryKeyValue } from '../core/queryKeySerializer.gen';\nexport { createClient } from './client.gen';\nexport type {\n  Client,\n  ClientOptions,\n  Config,\n  CreateClientConfig,\n  Options,\n  RequestOptions,\n  RequestResult,\n  TDataShape,\n} from './types.gen';\nexport { createConfig } from './utils.gen';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-axios/sdk-client-required/client/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type {\n  AxiosError,\n  AxiosInstance,\n  AxiosRequestHeaders,\n  AxiosResponse,\n  AxiosStatic,\n  CreateAxiosDefaults,\n} from 'axios';\n\nimport type { Auth } from '../core/auth.gen';\nimport type {\n  ServerSentEventsOptions,\n  ServerSentEventsResult,\n} from '../core/serverSentEvents.gen';\nimport type { Client as CoreClient, Config as CoreConfig } from '../core/types.gen';\n\nexport interface Config<T extends ClientOptions = ClientOptions>\n  extends Omit<CreateAxiosDefaults, 'auth' | 'baseURL' | 'headers' | 'method'>, CoreConfig {\n  /**\n   * Axios implementation. You can use this option to provide either an\n   * `AxiosStatic` or an `AxiosInstance`.\n   *\n   * @default axios\n   */\n  axios?: AxiosStatic | AxiosInstance;\n  /**\n   * Base URL for all requests made by this client.\n   */\n  baseURL?: T['baseURL'];\n  /**\n   * An object containing any HTTP headers that you want to pre-populate your\n   * `Headers` object with.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/Headers/Headers#init See more}\n   */\n  headers?:\n    | AxiosRequestHeaders\n    | Record<\n        string,\n        string | number | boolean | (string | number | boolean)[] | null | undefined | unknown\n      >;\n  /**\n   * Throw an error instead of returning it in the response?\n   *\n   * @default false\n   */\n  throwOnError?: T['throwOnError'];\n}\n\nexport interface RequestOptions<\n  TData = unknown,\n  ThrowOnError extends boolean = boolean,\n  Url extends string = string,\n>\n  extends\n    Config<{\n      throwOnError: ThrowOnError;\n    }>,\n    Pick<\n      ServerSentEventsOptions<TData>,\n      | 'onRequest'\n      | 'onSseError'\n      | 'onSseEvent'\n      | 'sseDefaultRetryDelay'\n      | 'sseMaxRetryAttempts'\n      | 'sseMaxRetryDelay'\n    > {\n  /**\n   * Any body that you want to add to your request.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/fetch#body}\n   */\n  body?: unknown;\n  path?: Record<string, unknown>;\n  query?: Record<string, unknown>;\n  /**\n   * Security mechanism(s) to use for the request.\n   */\n  security?: ReadonlyArray<Auth>;\n  url: Url;\n}\n\nexport interface ClientOptions {\n  baseURL?: string;\n  throwOnError?: boolean;\n}\n\nexport type RequestResult<\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = boolean,\n> = ThrowOnError extends true\n  ? Promise<AxiosResponse<TData extends Record<string, unknown> ? TData[keyof TData] : TData>>\n  : Promise<\n      | (AxiosResponse<TData extends Record<string, unknown> ? TData[keyof TData] : TData> & {\n          error: undefined;\n        })\n      | (AxiosError<TError extends Record<string, unknown> ? TError[keyof TError] : TError> & {\n          data: undefined;\n          error: TError extends Record<string, unknown> ? TError[keyof TError] : TError;\n        })\n    >;\n\ntype MethodFn = <TData = unknown, TError = unknown, ThrowOnError extends boolean = false>(\n  options: Omit<RequestOptions<TData, ThrowOnError>, 'method'>,\n) => RequestResult<TData, TError, ThrowOnError>;\n\ntype SseFn = <TData = unknown, TError = unknown, ThrowOnError extends boolean = false>(\n  options: Omit<RequestOptions<TData, ThrowOnError>, 'method'>,\n) => Promise<ServerSentEventsResult<TData, TError>>;\n\ntype RequestFn = <TData = unknown, TError = unknown, ThrowOnError extends boolean = false>(\n  options: Omit<RequestOptions<TData, ThrowOnError>, 'method'> &\n    Pick<Required<RequestOptions<TData, ThrowOnError>>, 'method'>,\n) => RequestResult<TData, TError, ThrowOnError>;\n\ntype BuildUrlFn = <\n  TData extends {\n    body?: unknown;\n    path?: Record<string, unknown>;\n    query?: Record<string, unknown>;\n    url: string;\n  },\n>(\n  options: TData & Options<TData>,\n) => string;\n\nexport type Client = CoreClient<RequestFn, Config, MethodFn, BuildUrlFn, SseFn> & {\n  instance: AxiosInstance;\n};\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 = ClientOptions> = (\n  override?: Config<ClientOptions & T>,\n) => Config<Required<ClientOptions> & T>;\n\nexport interface TDataShape {\n  body?: unknown;\n  headers?: unknown;\n  path?: unknown;\n  query?: unknown;\n  url: string;\n}\n\ntype OmitKeys<T, K> = Pick<T, Exclude<keyof T, K>>;\n\nexport type Options<\n  TData extends TDataShape = TDataShape,\n  ThrowOnError extends boolean = boolean,\n  TResponse = unknown,\n> = OmitKeys<RequestOptions<TResponse, ThrowOnError>, 'body' | 'path' | 'query' | 'url'> &\n  ([TData] extends [never] ? unknown : Omit<TData, 'url'>);\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-axios/sdk-client-required/client/utils.gen.ts",
    "content": "// 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 {\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\nconst checkForExistence = (\n  options: Pick<RequestOptions, 'auth' | 'query'> & {\n    headers: Record<any, unknown>;\n  },\n  name?: string,\n): boolean => {\n  if (!name) {\n    return false;\n  }\n  if (name in options.headers || options.query?.[name]) {\n    return true;\n  }\n  if (\n    'Cookie' in options.headers &&\n    options.headers['Cookie'] &&\n    typeof options.headers['Cookie'] === 'string'\n  ) {\n    return options.headers['Cookie'].includes(`${name}=`);\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: Record<any, unknown>;\n  }) => {\n  for (const auth of security) {\n    if (checkForExistence(options, auth.name)) {\n      continue;\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        const value = `${name}=${token}`;\n        if ('Cookie' in options.headers && options.headers['Cookie']) {\n          options.headers['Cookie'] = `${options.headers['Cookie']}; ${value}`;\n        } else {\n          options.headers['Cookie'] = value;\n        }\n        break;\n      }\n      case 'header':\n      default:\n        options.headers[name] = token;\n        break;\n    }\n  }\n};\n\nexport const buildUrl: Client['buildUrl'] = (options) => {\n  const instanceBaseUrl = options.axios?.defaults?.baseURL;\n\n  const baseUrl =\n    !!options.baseURL && typeof options.baseURL === 'string' ? options.baseURL : instanceBaseUrl;\n\n  return getUrl({\n    baseUrl: baseUrl as string,\n    path: options.path,\n    // let `paramsSerializer()` handle query params if it exists\n    query: !options.paramsSerializer ? options.query : undefined,\n    querySerializer:\n      typeof options.querySerializer === 'function'\n        ? options.querySerializer\n        : createQuerySerializer(options.querySerializer),\n    url: options.url,\n  });\n};\n\nexport const mergeConfigs = (a: Config, b: Config): Config => {\n  const config = { ...a, ...b };\n  config.headers = mergeHeaders(a.headers, b.headers);\n  return config;\n};\n\n/**\n * Special Axios headers keywords allowing to set headers by request method.\n */\nexport const axiosHeadersKeywords = [\n  'common',\n  'delete',\n  'get',\n  'head',\n  'patch',\n  'post',\n  'put',\n] as const;\n\nexport const mergeHeaders = (\n  ...headers: Array<Required<Config>['headers'] | undefined>\n): Record<any, unknown> => {\n  const mergedHeaders: Record<any, unknown> = {};\n  for (const header of headers) {\n    if (!header || typeof header !== 'object') {\n      continue;\n    }\n\n    const iterator = Object.entries(header);\n\n    for (const [key, value] of iterator) {\n      if (\n        axiosHeadersKeywords.includes(key as (typeof axiosHeadersKeywords)[number]) &&\n        typeof value === 'object'\n      ) {\n        mergedHeaders[key] = {\n          ...(mergedHeaders[key] as Record<any, unknown>),\n          ...value,\n        };\n      } else if (value === null) {\n        delete mergedHeaders[key];\n      } else if (Array.isArray(value)) {\n        for (const v of value) {\n          // @ts-expect-error\n          mergedHeaders[key] = [...(mergedHeaders[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[key] = typeof value === 'object' ? JSON.stringify(value) : (value as string);\n      }\n    }\n  }\n  return mergedHeaders;\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  ...override,\n});\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-axios/sdk-client-required/client.gen.ts",
    "content": "// 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: 'http://localhost:3000/base' }));\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-axios/sdk-client-required/core/auth.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-axios/sdk-client-required/core/bodySerializer.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-axios/sdk-client-required/core/params.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-axios/sdk-client-required/core/pathSerializer.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-axios/sdk-client-required/core/queryKeySerializer.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\n/**\n * JSON-friendly union that mirrors what Pinia Colada can hash.\n */\nexport type JsonValue =\n  | null\n  | string\n  | number\n  | boolean\n  | JsonValue[]\n  | { [key: string]: JsonValue };\n\n/**\n * Replacer that converts non-JSON values (bigint, Date, etc.) to safe substitutes.\n */\nexport const queryKeyJsonReplacer = (_key: string, value: unknown) => {\n  if (value === undefined || typeof value === 'function' || typeof value === 'symbol') {\n    return undefined;\n  }\n  if (typeof value === 'bigint') {\n    return value.toString();\n  }\n  if (value instanceof Date) {\n    return value.toISOString();\n  }\n  return value;\n};\n\n/**\n * Safely stringifies a value and parses it back into a JsonValue.\n */\nexport const stringifyToJsonValue = (input: unknown): JsonValue | undefined => {\n  try {\n    const json = JSON.stringify(input, queryKeyJsonReplacer);\n    if (json === undefined) {\n      return undefined;\n    }\n    return JSON.parse(json) as JsonValue;\n  } catch {\n    return undefined;\n  }\n};\n\n/**\n * Detects plain objects (including objects with a null prototype).\n */\nconst isPlainObject = (value: unknown): value is Record<string, unknown> => {\n  if (value === null || typeof value !== 'object') {\n    return false;\n  }\n  const prototype = Object.getPrototypeOf(value as object);\n  return prototype === Object.prototype || prototype === null;\n};\n\n/**\n * Turns URLSearchParams into a sorted JSON object for deterministic keys.\n */\nconst serializeSearchParams = (params: URLSearchParams): JsonValue => {\n  const entries = Array.from(params.entries()).sort(([a], [b]) => a.localeCompare(b));\n  const result: Record<string, JsonValue> = {};\n\n  for (const [key, value] of entries) {\n    const existing = result[key];\n    if (existing === undefined) {\n      result[key] = value;\n      continue;\n    }\n\n    if (Array.isArray(existing)) {\n      (existing as string[]).push(value);\n    } else {\n      result[key] = [existing, value];\n    }\n  }\n\n  return result;\n};\n\n/**\n * Normalizes any accepted value into a JSON-friendly shape for query keys.\n */\nexport const serializeQueryKeyValue = (value: unknown): JsonValue | undefined => {\n  if (value === null) {\n    return null;\n  }\n\n  if (typeof value === 'string' || typeof value === 'number' || typeof value === 'boolean') {\n    return value;\n  }\n\n  if (value === undefined || typeof value === 'function' || typeof value === 'symbol') {\n    return undefined;\n  }\n\n  if (typeof value === 'bigint') {\n    return value.toString();\n  }\n\n  if (value instanceof Date) {\n    return value.toISOString();\n  }\n\n  if (Array.isArray(value)) {\n    return stringifyToJsonValue(value);\n  }\n\n  if (typeof URLSearchParams !== 'undefined' && value instanceof URLSearchParams) {\n    return serializeSearchParams(value);\n  }\n\n  if (isPlainObject(value)) {\n    return stringifyToJsonValue(value);\n  }\n\n  return undefined;\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-axios/sdk-client-required/core/serverSentEvents.gen.ts",
    "content": "// 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 const 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            // Normalize line endings: CRLF -> LF, then CR -> LF\n            buffer = buffer.replace(/\\r\\n/g, '\\n').replace(/\\r/g, '\\n');\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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-axios/sdk-client-required/core/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { Auth, AuthToken } from './auth.gen';\nimport type { BodySerializer, QuerySerializer, QuerySerializerOptions } from './bodySerializer.gen';\n\nexport type HttpMethod =\n  | 'connect'\n  | 'delete'\n  | 'get'\n  | 'head'\n  | 'options'\n  | 'patch'\n  | 'post'\n  | 'put'\n  | 'trace';\n\nexport type Client<\n  RequestFn = never,\n  Config = unknown,\n  MethodFn = never,\n  BuildUrlFn = never,\n  SseFn = never,\n> = {\n  /**\n   * Returns the final request URL.\n   */\n  buildUrl: BuildUrlFn;\n  getConfig: () => Config;\n  request: RequestFn;\n  setConfig: (config: Config) => Config;\n} & {\n  [K in HttpMethod]: MethodFn;\n} & ([SseFn] extends [never] ? { sse?: never } : { sse: { [K in HttpMethod]: SseFn } });\n\nexport interface Config {\n  /**\n   * Auth token or a function returning auth token. The resolved value will be\n   * added to the request payload as defined by its `security` array.\n   */\n  auth?: ((auth: Auth) => Promise<AuthToken> | AuthToken) | AuthToken;\n  /**\n   * A function for serializing request body parameter. By default,\n   * {@link JSON.stringify()} will be used.\n   */\n  bodySerializer?: BodySerializer | null;\n  /**\n   * An object containing any HTTP headers that you want to pre-populate your\n   * `Headers` object with.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/Headers/Headers#init See more}\n   */\n  headers?:\n    | RequestInit['headers']\n    | Record<\n        string,\n        string | number | boolean | (string | number | boolean)[] | null | undefined | unknown\n      >;\n  /**\n   * The request method.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/fetch#method See more}\n   */\n  method?: Uppercase<HttpMethod>;\n  /**\n   * A function for serializing request query parameters. By default, arrays\n   * will be exploded in form style, objects will be exploded in deepObject\n   * style, and reserved characters are percent-encoded.\n   *\n   * This method will have no effect if the native `paramsSerializer()` Axios\n   * API function is used.\n   *\n   * {@link https://swagger.io/docs/specification/serialization/#query View examples}\n   */\n  querySerializer?: QuerySerializer | QuerySerializerOptions;\n  /**\n   * A function validating request data. This is useful if you want to ensure\n   * the request conforms to the desired shape, so it can be safely sent to\n   * the server.\n   */\n  requestValidator?: (data: unknown) => Promise<unknown>;\n  /**\n   * A function transforming response data before it's returned. This is useful\n   * for post-processing data, e.g. converting ISO strings into Date objects.\n   */\n  responseTransformer?: (data: unknown) => Promise<unknown>;\n  /**\n   * A function validating response data. This is useful if you want to ensure\n   * the response conforms to the desired shape, so it can be safely passed to\n   * the transformers and returned to the user.\n   */\n  responseValidator?: (data: unknown) => Promise<unknown>;\n}\n\ntype IsExactlyNeverOrNeverUndefined<T> = [T] extends [never]\n  ? true\n  : [T] extends [never | undefined]\n    ? [undefined] extends [T]\n      ? false\n      : true\n    : false;\n\nexport type OmitNever<T extends Record<string, unknown>> = {\n  [K in keyof T as IsExactlyNeverOrNeverUndefined<T[K]> extends true ? never : K]: T[K];\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-axios/sdk-client-required/core/utils.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-axios/sdk-client-required/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport { apiVVersionODataControllerCount, callToTestOrderOfParams, callWithDefaultOptionalParameters, callWithDefaultParameters, callWithDescriptions, callWithDuplicateResponses, callWithNoContentResponse, callWithParameters, callWithResponse, callWithResponseAndNoContentResponse, callWithResponses, callWithResultFromHeader, callWithWeirdParameterNames, collectionFormat, complexParams, complexTypes, deleteCallWithoutParametersAndResponse, deleteFoo, deprecatedCall, dummyA, dummyB, duplicateName, duplicateName2, duplicateName3, duplicateName4, export_, fileResponse, fooWow, getApiVbyApiVersionSimpleOperation, getCallWithOptionalParam, getCallWithoutParametersAndResponse, headCallWithoutParametersAndResponse, import_, multipartRequest, multipartResponse, nonAsciiæøåÆøÅöôêÊ字符串, type Options, optionsCallWithoutParametersAndResponse, patchApiVbyApiVersionNoTag, patchCallWithoutParametersAndResponse, postApiVbyApiVersionFormData, postApiVbyApiVersionRequestBody, postCallWithOptionalParam, postCallWithoutParametersAndResponse, putCallWithoutParametersAndResponse, putWithFormUrlEncoded, testErrorCode, types, uploadFile } from './sdk.gen';\nexport type { _3eNum1Период, _400, AdditionalPropertiesIntegerIssue, AdditionalPropertiesUnknownIssue, AdditionalPropertiesUnknownIssue2, AdditionalPropertiesUnknownIssue3, AdditionalPropertiesUnknownIssueWritable, AnyOfAnyAndNull, AnyOfArrays, ApiVVersionODataControllerCountData, ApiVVersionODataControllerCountResponse, ApiVVersionODataControllerCountResponses, ArrayWithAnyOfProperties, ArrayWithArray, ArrayWithBooleans, ArrayWithNumbers, ArrayWithProperties, ArrayWithReferences, ArrayWithStrings, CallToTestOrderOfParamsData, CallWithDefaultOptionalParametersData, CallWithDefaultParametersData, CallWithDescriptionsData, CallWithDuplicateResponsesData, CallWithDuplicateResponsesError, CallWithDuplicateResponsesErrors, CallWithDuplicateResponsesResponse, CallWithDuplicateResponsesResponses, CallWithNoContentResponseData, CallWithNoContentResponseResponse, CallWithNoContentResponseResponses, CallWithParametersData, CallWithResponseAndNoContentResponseData, CallWithResponseAndNoContentResponseResponse, CallWithResponseAndNoContentResponseResponses, CallWithResponseData, CallWithResponseResponse, CallWithResponseResponses, CallWithResponsesData, CallWithResponsesError, CallWithResponsesErrors, CallWithResponsesResponse, CallWithResponsesResponses, CallWithResultFromHeaderData, CallWithResultFromHeaderErrors, CallWithResultFromHeaderResponses, CallWithWeirdParameterNamesData, CamelCaseCommentWithBreaks, CharactersInDescription, ClientOptions, CollectionFormatData, CommentWithBackticks, CommentWithBackticksAndQuotes, CommentWithBreaks, CommentWithExpressionPlaceholders, CommentWithQuotes, CommentWithReservedCharacters, CommentWithSlashes, ComplexParamsData, ComplexParamsResponse, ComplexParamsResponses, ComplexTypesData, ComplexTypesErrors, ComplexTypesResponse, ComplexTypesResponses, CompositionBaseModel, CompositionExtendedModel, CompositionWithAllOfAndNullable, CompositionWithAnyOf, CompositionWithAnyOfAndNullable, CompositionWithAnyOfAnonymous, CompositionWithNestedAnyAndTypeNull, CompositionWithNestedAnyOfAndNull, CompositionWithOneOf, CompositionWithOneOfAndComplexArrayDictionary, CompositionWithOneOfAndNullable, CompositionWithOneOfAndProperties, CompositionWithOneOfAndSimpleArrayDictionary, CompositionWithOneOfAndSimpleDictionary, CompositionWithOneOfAnonymous, CompositionWithOneOfDiscriminator, ConstValue, Default, DeleteCallWithoutParametersAndResponseData, DeleteFooData, DeleteFooData2, DeleteFooData3, DeprecatedCallData, DeprecatedModel, DictionaryWithArray, DictionaryWithDictionary, DictionaryWithProperties, DictionaryWithPropertiesAndAdditionalProperties, DictionaryWithReference, DictionaryWithString, DummyAData, DummyAResponse, DummyAResponses, DummyBData, DummyBResponse, DummyBResponses, DuplicateName2Data, DuplicateName3Data, DuplicateName4Data, DuplicateNameData, EnumFromDescription, EnumWithExtensions, EnumWithNumbers, EnumWithReplacedCharacters, EnumWithStrings, EnumWithXEnumNames, ExportData, ExternalRefA, ExternalRefB, ExternalSharedModel, File, FileResponseData, FileResponseResponse, FileResponseResponses, FileWritable, FooWowData, FooWowResponses, FreeFormObjectWithAdditionalPropertiesEqEmptyObject, FreeFormObjectWithAdditionalPropertiesEqTrue, FreeFormObjectWithoutAdditionalProperties, GenericSchemaDuplicateIssue1SystemBoolean, GenericSchemaDuplicateIssue1SystemBooleanWritable, GenericSchemaDuplicateIssue1SystemString, GenericSchemaDuplicateIssue1SystemStringWritable, GetApiVbyApiVersionSimpleOperationData, GetApiVbyApiVersionSimpleOperationError, GetApiVbyApiVersionSimpleOperationErrors, GetApiVbyApiVersionSimpleOperationResponse, GetApiVbyApiVersionSimpleOperationResponses, GetCallWithOptionalParamData, GetCallWithoutParametersAndResponseData, HeadCallWithoutParametersAndResponseData, Import, ImportData, ImportResponse, ImportResponses, IoK8sApimachineryPkgApisMetaV1DeleteOptions, IoK8sApimachineryPkgApisMetaV1Preconditions, ModelCircle, ModelFromZendesk, ModelSquare, ModelThatExtends, ModelThatExtendsExtends, ModelWithAdditionalPropertiesEqTrue, ModelWithAdditionalPropertiesRef, ModelWithAnyOfConstantSizeArray, ModelWithAnyOfConstantSizeArrayAndIntersect, ModelWithAnyOfConstantSizeArrayNullable, ModelWithAnyOfConstantSizeArrayWithNSizeAndOptions, ModelWithAnyOfConstantSizeArrayWithNSizeAndOptionsWritable, ModelWithArray, ModelWithArrayReadOnlyAndWriteOnly, ModelWithArrayReadOnlyAndWriteOnlyWritable, ModelWithBackticksInDescription, ModelWithBoolean, ModelWithCircularReference, ModelWithConst, ModelWithConstantSizeArray, ModelWithDictionary, ModelWithDuplicateImports, ModelWithDuplicateProperties, ModelWithEnum, ModelWithEnumFromDescription, ModelWithEnumWithHyphen, ModelWithInteger, ModelWithNestedArrayEnums, ModelWithNestedArrayEnumsData, ModelWithNestedArrayEnumsDataBar, ModelWithNestedArrayEnumsDataFoo, ModelWithNestedCompositionEnums, ModelWithNestedEnums, ModelWithNestedProperties, ModelWithNullableObject, ModelWithNullableString, ModelWithNumericEnumUnion, ModelWithOneOfAndProperties, ModelWithOneOfEnum, ModelWithOrderedProperties, ModelWithPattern, ModelWithPatternWritable, ModelWithPrefixItemsConstantSizeArray, ModelWithProperties, ModelWithPropertiesWritable, ModelWithReadOnlyAndWriteOnly, ModelWithReadOnlyAndWriteOnlyWritable, ModelWithReference, ModelWithReferenceWritable, ModelWithString, ModelWithStringError, MultipartRequestData, MultipartResponseData, MultipartResponseResponse, MultipartResponseResponses, NestedAnyOfArraysNullable, NonAsciiæøåÆøÅöôêÊ字符串Data, NonAsciiæøåÆøÅöôêÊ字符串Response, NonAsciiæøåÆøÅöôêÊ字符串Responses, NonAsciiStringæøåÆøÅöôêÊ字符串, NullableObject, OneOfAllOfIssue, OneOfAllOfIssueWritable, OptionsCallWithoutParametersAndResponseData, Pageable, ParameterSimpleParameterUnused, PatchApiVbyApiVersionNoTagData, PatchApiVbyApiVersionNoTagResponses, PatchCallWithoutParametersAndResponseData, PostApiVbyApiVersionFormDataData, PostApiVbyApiVersionRequestBodyData, PostCallWithOptionalParamData, PostCallWithOptionalParamResponse, PostCallWithOptionalParamResponses, PostCallWithoutParametersAndResponseData, PostServiceWithEmptyTagResponse, PostServiceWithEmptyTagResponse2, PutCallWithoutParametersAndResponseData, PutWithFormUrlEncodedData, SchemaWithFormRestrictedKeys, SimpleBoolean, SimpleFile, SimpleFormData, SimpleInteger, SimpleParameter, SimpleReference, SimpleRequestBody, SimpleString, SimpleStringWithPattern, TestErrorCodeData, TestErrorCodeErrors, TestErrorCodeResponses, TypesData, TypesResponse, TypesResponses, UploadFileData, UploadFileResponse, UploadFileResponses, XFooBar } from './types.gen';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-axios/sdk-client-required/sdk.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport { type Client, formDataBodySerializer, type Options as Options2, type TDataShape, urlSearchParamsBodySerializer } from './client';\nimport type { ApiVVersionODataControllerCountData, ApiVVersionODataControllerCountResponses, CallToTestOrderOfParamsData, CallWithDefaultOptionalParametersData, CallWithDefaultParametersData, CallWithDescriptionsData, CallWithDuplicateResponsesData, CallWithDuplicateResponsesErrors, CallWithDuplicateResponsesResponses, CallWithNoContentResponseData, CallWithNoContentResponseResponses, CallWithParametersData, CallWithResponseAndNoContentResponseData, CallWithResponseAndNoContentResponseResponses, CallWithResponseData, CallWithResponseResponses, CallWithResponsesData, CallWithResponsesErrors, CallWithResponsesResponses, CallWithResultFromHeaderData, CallWithResultFromHeaderErrors, CallWithResultFromHeaderResponses, CallWithWeirdParameterNamesData, CollectionFormatData, ComplexParamsData, ComplexParamsResponses, ComplexTypesData, ComplexTypesErrors, ComplexTypesResponses, DeleteCallWithoutParametersAndResponseData, DeleteFooData3, DeprecatedCallData, DummyAData, DummyAResponses, DummyBData, DummyBResponses, DuplicateName2Data, DuplicateName3Data, DuplicateName4Data, DuplicateNameData, ExportData, FileResponseData, FileResponseResponses, FooWowData, FooWowResponses, GetApiVbyApiVersionSimpleOperationData, GetApiVbyApiVersionSimpleOperationErrors, GetApiVbyApiVersionSimpleOperationResponses, GetCallWithOptionalParamData, GetCallWithoutParametersAndResponseData, HeadCallWithoutParametersAndResponseData, ImportData, ImportResponses, MultipartRequestData, MultipartResponseData, MultipartResponseResponses, NonAsciiæøåÆøÅöôêÊ字符串Data, NonAsciiæøåÆøÅöôêÊ字符串Responses, OptionsCallWithoutParametersAndResponseData, PatchApiVbyApiVersionNoTagData, PatchApiVbyApiVersionNoTagResponses, PatchCallWithoutParametersAndResponseData, PostApiVbyApiVersionFormDataData, PostApiVbyApiVersionRequestBodyData, PostCallWithOptionalParamData, PostCallWithOptionalParamResponses, PostCallWithoutParametersAndResponseData, PutCallWithoutParametersAndResponseData, PutWithFormUrlEncodedData, TestErrorCodeData, TestErrorCodeErrors, TestErrorCodeResponses, TypesData, TypesResponses, UploadFileData, UploadFileResponses } from './types.gen';\n\nexport type Options<TData extends TDataShape = TDataShape, ThrowOnError extends boolean = boolean> = Options2<TData, ThrowOnError> & {\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\nexport const export_ = <ThrowOnError extends boolean = false>(options: Options<ExportData, ThrowOnError>) => options.client.get<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/no+tag', ...options });\n\nexport const patchApiVbyApiVersionNoTag = <ThrowOnError extends boolean = false>(options: Options<PatchApiVbyApiVersionNoTagData, ThrowOnError>) => options.client.patch<PatchApiVbyApiVersionNoTagResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/no+tag', ...options });\n\nexport const import_ = <ThrowOnError extends boolean = false>(options: Options<ImportData, ThrowOnError>) => options.client.post<ImportResponses, unknown, ThrowOnError>({\n    responseType: 'json',\n    url: '/api/v{api-version}/no+tag',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options.headers\n    }\n});\n\nexport const fooWow = <ThrowOnError extends boolean = false>(options: Options<FooWowData, ThrowOnError>) => options.client.put<FooWowResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/no+tag', ...options });\n\nexport const apiVVersionODataControllerCount = <ThrowOnError extends boolean = false>(options: Options<ApiVVersionODataControllerCountData, ThrowOnError>) => options.client.get<ApiVVersionODataControllerCountResponses, unknown, ThrowOnError>({\n    responseType: 'json',\n    url: '/api/v{api-version}/simple/$count',\n    ...options\n});\n\nexport const getApiVbyApiVersionSimpleOperation = <ThrowOnError extends boolean = false>(options: Options<GetApiVbyApiVersionSimpleOperationData, ThrowOnError>) => options.client.get<GetApiVbyApiVersionSimpleOperationResponses, GetApiVbyApiVersionSimpleOperationErrors, ThrowOnError>({\n    responseType: 'json',\n    url: '/api/v{api-version}/simple:operation',\n    ...options\n});\n\nexport const deleteCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options: Options<DeleteCallWithoutParametersAndResponseData, ThrowOnError>) => options.client.delete<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const getCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options: Options<GetCallWithoutParametersAndResponseData, ThrowOnError>) => options.client.get<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const headCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options: Options<HeadCallWithoutParametersAndResponseData, ThrowOnError>) => options.client.head<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const optionsCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options: Options<OptionsCallWithoutParametersAndResponseData, ThrowOnError>) => options.client.options<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const patchCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options: Options<PatchCallWithoutParametersAndResponseData, ThrowOnError>) => options.client.patch<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const postCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options: Options<PostCallWithoutParametersAndResponseData, ThrowOnError>) => options.client.post<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const putCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options: Options<PutCallWithoutParametersAndResponseData, ThrowOnError>) => options.client.put<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const deleteFoo = <ThrowOnError extends boolean = false>(options: Options<DeleteFooData3, ThrowOnError>) => options.client.delete<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/foo/{foo_param}/bar/{BarParam}', ...options });\n\nexport const callWithDescriptions = <ThrowOnError extends boolean = false>(options: Options<CallWithDescriptionsData, ThrowOnError>) => options.client.post<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/descriptions', ...options });\n\n/**\n * @deprecated\n */\nexport const deprecatedCall = <ThrowOnError extends boolean = false>(options: Options<DeprecatedCallData, ThrowOnError>) => options.client.post<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/parameters/deprecated', ...options });\n\nexport const callWithParameters = <ThrowOnError extends boolean = false>(options: Options<CallWithParametersData, ThrowOnError>) => options.client.post<unknown, unknown, ThrowOnError>({\n    url: '/api/v{api-version}/parameters/{parameterPath}',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options.headers\n    }\n});\n\nexport const callWithWeirdParameterNames = <ThrowOnError extends boolean = false>(options: Options<CallWithWeirdParameterNamesData, ThrowOnError>) => options.client.post<unknown, unknown, ThrowOnError>({\n    url: '/api/v{api-version}/parameters/{parameter.path.1}/{parameter-path-2}/{PARAMETER-PATH-3}',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options.headers\n    }\n});\n\nexport const getCallWithOptionalParam = <ThrowOnError extends boolean = false>(options: Options<GetCallWithOptionalParamData, ThrowOnError>) => options.client.get<unknown, unknown, ThrowOnError>({\n    url: '/api/v{api-version}/parameters',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options.headers\n    }\n});\n\nexport const postCallWithOptionalParam = <ThrowOnError extends boolean = false>(options: Options<PostCallWithOptionalParamData, ThrowOnError>) => options.client.post<PostCallWithOptionalParamResponses, unknown, ThrowOnError>({\n    responseType: 'json',\n    url: '/api/v{api-version}/parameters',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options.headers\n    }\n});\n\nexport const postApiVbyApiVersionRequestBody = <ThrowOnError extends boolean = false>(options: Options<PostApiVbyApiVersionRequestBodyData, ThrowOnError>) => options.client.post<unknown, unknown, ThrowOnError>({\n    url: '/api/v{api-version}/requestBody',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options.headers\n    }\n});\n\nexport const postApiVbyApiVersionFormData = <ThrowOnError extends boolean = false>(options: Options<PostApiVbyApiVersionFormDataData, ThrowOnError>) => options.client.post<unknown, unknown, ThrowOnError>({\n    ...formDataBodySerializer,\n    url: '/api/v{api-version}/formData',\n    ...options,\n    headers: {\n        'Content-Type': null,\n        ...options.headers\n    }\n});\n\nexport const callWithDefaultParameters = <ThrowOnError extends boolean = false>(options: Options<CallWithDefaultParametersData, ThrowOnError>) => options.client.get<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/defaults', ...options });\n\nexport const callWithDefaultOptionalParameters = <ThrowOnError extends boolean = false>(options: Options<CallWithDefaultOptionalParametersData, ThrowOnError>) => options.client.post<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/defaults', ...options });\n\nexport const callToTestOrderOfParams = <ThrowOnError extends boolean = false>(options: Options<CallToTestOrderOfParamsData, ThrowOnError>) => options.client.put<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/defaults', ...options });\n\nexport const duplicateName = <ThrowOnError extends boolean = false>(options: Options<DuplicateNameData, ThrowOnError>) => options.client.delete<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/duplicate', ...options });\n\nexport const duplicateName2 = <ThrowOnError extends boolean = false>(options: Options<DuplicateName2Data, ThrowOnError>) => options.client.get<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/duplicate', ...options });\n\nexport const duplicateName3 = <ThrowOnError extends boolean = false>(options: Options<DuplicateName3Data, ThrowOnError>) => options.client.post<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/duplicate', ...options });\n\nexport const duplicateName4 = <ThrowOnError extends boolean = false>(options: Options<DuplicateName4Data, ThrowOnError>) => options.client.put<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/duplicate', ...options });\n\nexport const callWithNoContentResponse = <ThrowOnError extends boolean = false>(options: Options<CallWithNoContentResponseData, ThrowOnError>) => options.client.get<CallWithNoContentResponseResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/no-content', ...options });\n\nexport const callWithResponseAndNoContentResponse = <ThrowOnError extends boolean = false>(options: Options<CallWithResponseAndNoContentResponseData, ThrowOnError>) => options.client.get<CallWithResponseAndNoContentResponseResponses, unknown, ThrowOnError>({\n    responseType: 'json',\n    url: '/api/v{api-version}/multiple-tags/response-and-no-content',\n    ...options\n});\n\nexport const dummyA = <ThrowOnError extends boolean = false>(options: Options<DummyAData, ThrowOnError>) => options.client.get<DummyAResponses, unknown, ThrowOnError>({\n    responseType: 'json',\n    url: '/api/v{api-version}/multiple-tags/a',\n    ...options\n});\n\nexport const dummyB = <ThrowOnError extends boolean = false>(options: Options<DummyBData, ThrowOnError>) => options.client.get<DummyBResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/multiple-tags/b', ...options });\n\nexport const callWithResponse = <ThrowOnError extends boolean = false>(options: Options<CallWithResponseData, ThrowOnError>) => options.client.get<CallWithResponseResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/response', ...options });\n\nexport const callWithDuplicateResponses = <ThrowOnError extends boolean = false>(options: Options<CallWithDuplicateResponsesData, ThrowOnError>) => options.client.post<CallWithDuplicateResponsesResponses, CallWithDuplicateResponsesErrors, ThrowOnError>({\n    responseType: 'json',\n    url: '/api/v{api-version}/response',\n    ...options\n});\n\nexport const callWithResponses = <ThrowOnError extends boolean = false>(options: Options<CallWithResponsesData, ThrowOnError>) => options.client.put<CallWithResponsesResponses, CallWithResponsesErrors, ThrowOnError>({\n    responseType: 'json',\n    url: '/api/v{api-version}/response',\n    ...options\n});\n\nexport const collectionFormat = <ThrowOnError extends boolean = false>(options: Options<CollectionFormatData, ThrowOnError>) => options.client.get<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/collectionFormat', ...options });\n\nexport const types = <ThrowOnError extends boolean = false>(options: Options<TypesData, ThrowOnError>) => options.client.get<TypesResponses, unknown, ThrowOnError>({\n    responseType: 'json',\n    url: '/api/v{api-version}/types',\n    ...options\n});\n\nexport const uploadFile = <ThrowOnError extends boolean = false>(options: Options<UploadFileData, ThrowOnError>) => options.client.post<UploadFileResponses, unknown, ThrowOnError>({\n    ...urlSearchParamsBodySerializer,\n    responseType: 'json',\n    url: '/api/v{api-version}/upload',\n    ...options,\n    headers: {\n        'Content-Type': 'application/x-www-form-urlencoded',\n        ...options.headers\n    }\n});\n\nexport const fileResponse = <ThrowOnError extends boolean = false>(options: Options<FileResponseData, ThrowOnError>) => options.client.get<FileResponseResponses, unknown, ThrowOnError>({\n    responseType: 'blob',\n    url: '/api/v{api-version}/file/{id}',\n    ...options\n});\n\nexport const complexTypes = <ThrowOnError extends boolean = false>(options: Options<ComplexTypesData, ThrowOnError>) => options.client.get<ComplexTypesResponses, ComplexTypesErrors, ThrowOnError>({\n    querySerializer: { parameters: { parameterObject: { object: { style: 'form' } } } },\n    responseType: 'json',\n    url: '/api/v{api-version}/complex',\n    ...options\n});\n\nexport const multipartResponse = <ThrowOnError extends boolean = false>(options: Options<MultipartResponseData, ThrowOnError>) => options.client.get<MultipartResponseResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/multipart', ...options });\n\nexport const multipartRequest = <ThrowOnError extends boolean = false>(options: Options<MultipartRequestData, ThrowOnError>) => options.client.post<unknown, unknown, ThrowOnError>({\n    ...formDataBodySerializer,\n    url: '/api/v{api-version}/multipart',\n    ...options,\n    headers: {\n        'Content-Type': null,\n        ...options.headers\n    }\n});\n\nexport const complexParams = <ThrowOnError extends boolean = false>(options: Options<ComplexParamsData, ThrowOnError>) => options.client.put<ComplexParamsResponses, unknown, ThrowOnError>({\n    responseType: 'json',\n    url: '/api/v{api-version}/complex/{id}',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json-patch+json',\n        ...options.headers\n    }\n});\n\nexport const callWithResultFromHeader = <ThrowOnError extends boolean = false>(options: Options<CallWithResultFromHeaderData, ThrowOnError>) => options.client.post<CallWithResultFromHeaderResponses, CallWithResultFromHeaderErrors, ThrowOnError>({ url: '/api/v{api-version}/header', ...options });\n\nexport const testErrorCode = <ThrowOnError extends boolean = false>(options: Options<TestErrorCodeData, ThrowOnError>) => options.client.post<TestErrorCodeResponses, TestErrorCodeErrors, ThrowOnError>({ url: '/api/v{api-version}/error', ...options });\n\nexport const nonAsciiæøåÆøÅöôêÊ字符串 = <ThrowOnError extends boolean = false>(options: Options<NonAsciiæøåÆøÅöôêÊ字符串Data, ThrowOnError>) => options.client.post<NonAsciiæøåÆøÅöôêÊ字符串Responses, unknown, ThrowOnError>({\n    responseType: 'json',\n    url: '/api/v{api-version}/non-ascii-æøåÆØÅöôêÊ字符串',\n    ...options\n});\n\n/**\n * Login User\n */\nexport const putWithFormUrlEncoded = <ThrowOnError extends boolean = false>(options: Options<PutWithFormUrlEncodedData, ThrowOnError>) => options.client.put<unknown, unknown, ThrowOnError>({\n    ...urlSearchParamsBodySerializer,\n    url: '/api/v{api-version}/non-ascii-æøåÆØÅöôêÊ字符串',\n    ...options,\n    headers: {\n        'Content-Type': 'application/x-www-form-urlencoded',\n        ...options.headers\n    }\n});\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-axios/sdk-client-required/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type ClientOptions = {\n    baseURL: 'http://localhost:3000/base' | (string & {});\n};\n\n/**\n * Model with number-only name\n */\nexport type _400 = string;\n\n/**\n * External ref to shared model (A)\n */\nexport type ExternalRefA = ExternalSharedModel;\n\n/**\n * External ref to shared model (B)\n */\nexport type ExternalRefB = ExternalSharedModel;\n\n/**\n * Testing multiline comments in string: First line\n * Second line\n *\n * Fourth line\n */\nexport type CamelCaseCommentWithBreaks = number;\n\n/**\n * Testing multiline comments in string: First line\n * Second line\n *\n * Fourth line\n */\nexport type CommentWithBreaks = number;\n\n/**\n * Testing backticks in string: `backticks` and ```multiple backticks``` should work\n */\nexport type CommentWithBackticks = number;\n\n/**\n * Testing backticks and quotes in string: `backticks`, 'quotes', \"double quotes\" and ```multiple backticks``` should work\n */\nexport type CommentWithBackticksAndQuotes = number;\n\n/**\n * Testing slashes in string: \\backwards\\\\\\ and /forwards/// should work\n */\nexport type CommentWithSlashes = number;\n\n/**\n * Testing expression placeholders in string: ${expression} should work\n */\nexport type CommentWithExpressionPlaceholders = number;\n\n/**\n * Testing quotes in string: 'single quote''' and \"double quotes\"\"\" should work\n */\nexport type CommentWithQuotes = number;\n\n/**\n * Testing reserved characters in string: * inline * and ** inline ** should work\n */\nexport type CommentWithReservedCharacters = number;\n\n/**\n * This is a simple number\n */\nexport type SimpleInteger = number;\n\n/**\n * This is a simple boolean\n */\nexport type SimpleBoolean = boolean;\n\n/**\n * This is a simple string\n */\nexport type SimpleString = string;\n\n/**\n * A string with non-ascii (unicode) characters valid in typescript identifiers (æøåÆØÅöÔèÈ字符串)\n */\nexport type NonAsciiStringæøåÆøÅöôêÊ字符串 = string;\n\n/**\n * This is a simple file\n */\nexport type SimpleFile = Blob | File;\n\n/**\n * This is a simple reference\n */\nexport type SimpleReference = ModelWithString;\n\n/**\n * This is a simple string\n */\nexport type SimpleStringWithPattern = string | null;\n\n/**\n * This is a simple enum with strings\n */\nexport type EnumWithStrings = 'Success' | 'Warning' | 'Error' | '\\'Single Quote\\'' | '\"Double Quotes\"' | 'Non-ascii: øæåôöØÆÅÔÖ字符串';\n\nexport type EnumWithReplacedCharacters = '\\'Single Quote\\'' | '\"Double Quotes\"' | 'øæåôöØÆÅÔÖ字符串' | 3.1 | '';\n\n/**\n * This is a simple enum with numbers\n */\nexport type EnumWithNumbers = 1 | 2 | 3 | 1.1 | 1.2 | 1.3 | 100 | 200 | 300 | -100 | -200 | -300 | -1.1 | -1.2 | -1.3;\n\n/**\n * Success=1,Warning=2,Error=3\n */\nexport type EnumFromDescription = number;\n\n/**\n * This is a simple enum with numbers\n */\nexport type EnumWithExtensions = 200 | 400 | 500;\n\nexport type EnumWithXEnumNames = 0 | 1 | 2;\n\n/**\n * This is a simple array with numbers\n */\nexport type ArrayWithNumbers = Array<number>;\n\n/**\n * This is a simple array with booleans\n */\nexport type ArrayWithBooleans = Array<boolean>;\n\n/**\n * This is a simple array with strings\n */\nexport type ArrayWithStrings = Array<string>;\n\n/**\n * This is a simple array with references\n */\nexport type ArrayWithReferences = Array<ModelWithString>;\n\n/**\n * This is a simple array containing an array\n */\nexport type ArrayWithArray = Array<Array<ModelWithString>>;\n\n/**\n * This is a simple array with properties\n */\nexport type ArrayWithProperties = Array<{\n    '16x16'?: CamelCaseCommentWithBreaks;\n    bar?: string;\n}>;\n\n/**\n * This is a simple array with any of properties\n */\nexport type ArrayWithAnyOfProperties = Array<{\n    foo?: string;\n} | {\n    bar?: string;\n}>;\n\nexport type AnyOfAnyAndNull = {\n    data?: unknown | null;\n};\n\n/**\n * This is a simple array with any of properties\n */\nexport type AnyOfArrays = {\n    results?: Array<{\n        foo?: string;\n    } | {\n        bar?: string;\n    }>;\n};\n\n/**\n * This is a string dictionary\n */\nexport type DictionaryWithString = {\n    [key: string]: string;\n};\n\nexport type DictionaryWithPropertiesAndAdditionalProperties = {\n    foo?: number;\n    bar?: boolean;\n    [key: string]: string | number | boolean | undefined;\n};\n\n/**\n * This is a string reference\n */\nexport type DictionaryWithReference = {\n    [key: string]: ModelWithString;\n};\n\n/**\n * This is a complex dictionary\n */\nexport type DictionaryWithArray = {\n    [key: string]: Array<ModelWithString>;\n};\n\n/**\n * This is a string dictionary\n */\nexport type DictionaryWithDictionary = {\n    [key: string]: {\n        [key: string]: string;\n    };\n};\n\n/**\n * This is a complex dictionary\n */\nexport type DictionaryWithProperties = {\n    [key: string]: {\n        foo?: string;\n        bar?: string;\n    };\n};\n\n/**\n * This is a model with one number property\n */\nexport type ModelWithInteger = {\n    /**\n     * This is a simple number property\n     */\n    prop?: number;\n};\n\n/**\n * This is a model with one boolean property\n */\nexport type ModelWithBoolean = {\n    /**\n     * This is a simple boolean property\n     */\n    prop?: boolean;\n};\n\n/**\n * This is a model with one string property\n */\nexport type ModelWithString = {\n    /**\n     * This is a simple string property\n     */\n    prop?: string;\n};\n\n/**\n * This is a model with one string property\n */\nexport type ModelWithStringError = {\n    /**\n     * This is a simple string property\n     */\n    prop?: string;\n};\n\n/**\n * `Comment` or `VoiceComment`. The JSON object for adding voice comments to tickets is different. See [Adding voice comments to tickets](/documentation/ticketing/managing-tickets/adding-voice-comments-to-tickets)\n */\nexport type ModelFromZendesk = string;\n\n/**\n * This is a model with one string property\n */\nexport type ModelWithNullableString = {\n    /**\n     * This is a simple string property\n     */\n    nullableProp1?: string | null;\n    /**\n     * This is a simple string property\n     */\n    nullableRequiredProp1: string | null;\n    /**\n     * This is a simple string property\n     */\n    nullableProp2?: string | null;\n    /**\n     * This is a simple string property\n     */\n    nullableRequiredProp2: string | null;\n    /**\n     * This is a simple enum with strings\n     */\n    'foo_bar-enum'?: 'Success' | 'Warning' | 'Error' | 'ØÆÅ字符串';\n};\n\n/**\n * This is a model with one enum\n */\nexport type ModelWithEnum = {\n    /**\n     * This is a simple enum with strings\n     */\n    'foo_bar-enum'?: 'Success' | 'Warning' | 'Error' | 'ØÆÅ字符串';\n    /**\n     * These are the HTTP error code enums\n     */\n    statusCode?: '100' | '200 FOO' | '300 FOO_BAR' | '400 foo-bar' | '500 foo.bar' | '600 foo&bar';\n    /**\n     * Simple boolean enum\n     */\n    bool?: true;\n};\n\n/**\n * This is a model with one enum with escaped name\n */\nexport type ModelWithEnumWithHyphen = {\n    /**\n     * Foo-Bar-Baz-Qux\n     */\n    'foo-bar-baz-qux'?: '3.0';\n};\n\n/**\n * This is a model with one enum\n */\nexport type ModelWithEnumFromDescription = {\n    /**\n     * Success=1,Warning=2,Error=3\n     */\n    test?: number;\n};\n\n/**\n * This is a model with nested enums\n */\nexport type ModelWithNestedEnums = {\n    dictionaryWithEnum?: {\n        [key: string]: 'Success' | 'Warning' | 'Error';\n    };\n    dictionaryWithEnumFromDescription?: {\n        [key: string]: number;\n    };\n    arrayWithEnum?: Array<'Success' | 'Warning' | 'Error'>;\n    arrayWithDescription?: Array<number>;\n    /**\n     * This is a simple enum with strings\n     */\n    'foo_bar-enum'?: 'Success' | 'Warning' | 'Error' | 'ØÆÅ字符串';\n};\n\n/**\n * This is a model with one property containing a reference\n */\nexport type ModelWithReference = {\n    prop?: ModelWithProperties;\n};\n\n/**\n * This is a model with one property containing an array\n */\nexport type ModelWithArrayReadOnlyAndWriteOnly = {\n    prop?: Array<ModelWithReadOnlyAndWriteOnly>;\n    propWithFile?: Array<Blob | File>;\n    propWithNumber?: Array<number>;\n};\n\n/**\n * This is a model with one property containing an array\n */\nexport type ModelWithArray = {\n    prop?: Array<ModelWithString>;\n    propWithFile?: Array<Blob | File>;\n    propWithNumber?: Array<number>;\n};\n\n/**\n * This is a model with one property containing a dictionary\n */\nexport type ModelWithDictionary = {\n    prop?: {\n        [key: string]: string;\n    };\n};\n\n/**\n * This is a deprecated model with a deprecated property\n *\n * @deprecated\n */\nexport type DeprecatedModel = {\n    /**\n     * This is a deprecated property\n     *\n     * @deprecated\n     */\n    prop?: string;\n};\n\n/**\n * This is a model with one property containing a circular reference\n */\nexport type ModelWithCircularReference = {\n    prop?: ModelWithCircularReference;\n};\n\n/**\n * This is a model with one property with a 'one of' relationship\n */\nexport type CompositionWithOneOf = {\n    propA?: ModelWithString | ModelWithEnum | ModelWithArray | ModelWithDictionary;\n};\n\n/**\n * This is a model with one property with a 'one of' relationship where the options are not $ref\n */\nexport type CompositionWithOneOfAnonymous = {\n    propA?: {\n        propA?: string;\n    } | string | number;\n};\n\n/**\n * Circle\n */\nexport type ModelCircle = {\n    kind: string;\n    radius?: number;\n};\n\n/**\n * Square\n */\nexport type ModelSquare = {\n    kind: string;\n    sideLength?: number;\n};\n\n/**\n * This is a model with one property with a 'one of' relationship where the options are not $ref\n */\nexport type CompositionWithOneOfDiscriminator = ({\n    kind: 'circle';\n} & ModelCircle) | ({\n    kind: 'square';\n} & ModelSquare);\n\n/**\n * This is a model with one property with a 'any of' relationship\n */\nexport type CompositionWithAnyOf = {\n    propA?: ModelWithString | ModelWithEnum | ModelWithArray | ModelWithDictionary;\n};\n\n/**\n * This is a model with one property with a 'any of' relationship where the options are not $ref\n */\nexport type CompositionWithAnyOfAnonymous = {\n    propA?: {\n        propA?: string;\n    } | string | number;\n};\n\n/**\n * This is a model with nested 'any of' property with a type null\n */\nexport type CompositionWithNestedAnyAndTypeNull = {\n    propA?: Array<ModelWithDictionary | null> | Array<ModelWithArray | null>;\n};\n\nexport type _3eNum1Период = 'Bird' | 'Dog';\n\nexport type ConstValue = 'ConstValue';\n\n/**\n * This is a model with one property with a 'any of' relationship where the options are not $ref\n */\nexport type CompositionWithNestedAnyOfAndNull = {\n    /**\n     * Scopes\n     */\n    propA?: Array<_3eNum1Период | ConstValue> | null;\n};\n\n/**\n * This is a model with one property with a 'one of' relationship\n */\nexport type CompositionWithOneOfAndNullable = {\n    propA?: {\n        boolean?: boolean;\n    } | ModelWithEnum | ModelWithArray | ModelWithDictionary | null;\n};\n\n/**\n * This is a model that contains a simple dictionary within composition\n */\nexport type CompositionWithOneOfAndSimpleDictionary = {\n    propA?: boolean | {\n        [key: string]: number;\n    };\n};\n\n/**\n * This is a model that contains a dictionary of simple arrays within composition\n */\nexport type CompositionWithOneOfAndSimpleArrayDictionary = {\n    propA?: boolean | {\n        [key: string]: Array<boolean>;\n    };\n};\n\n/**\n * This is a model that contains a dictionary of complex arrays (composited) within composition\n */\nexport type CompositionWithOneOfAndComplexArrayDictionary = {\n    propA?: boolean | {\n        [key: string]: Array<number | string>;\n    };\n};\n\n/**\n * This is a model with one property with a 'all of' relationship\n */\nexport type CompositionWithAllOfAndNullable = {\n    propA?: ({\n        boolean?: boolean;\n    } & ModelWithEnum & ModelWithArray & ModelWithDictionary) | null;\n};\n\n/**\n * This is a model with one property with a 'any of' relationship\n */\nexport type CompositionWithAnyOfAndNullable = {\n    propA?: {\n        boolean?: boolean;\n    } | ModelWithEnum | ModelWithArray | ModelWithDictionary | null;\n};\n\n/**\n * This is a base model with two simple optional properties\n */\nexport type CompositionBaseModel = {\n    firstName?: string;\n    lastname?: string;\n};\n\n/**\n * This is a model that extends the base model\n */\nexport type CompositionExtendedModel = CompositionBaseModel & {\n    age: number;\n    firstName: string;\n    lastname: string;\n};\n\n/**\n * This is a model with one nested property\n */\nexport type ModelWithProperties = {\n    required: string;\n    readonly requiredAndReadOnly: string;\n    requiredAndNullable: string | null;\n    string?: string;\n    number?: number;\n    boolean?: boolean;\n    reference?: ModelWithString;\n    'property with space'?: string;\n    default?: string;\n    try?: string;\n    readonly '@namespace.string'?: string;\n    readonly '@namespace.integer'?: number;\n};\n\n/**\n * This is a model with one nested property\n */\nexport type ModelWithNestedProperties = {\n    readonly first: {\n        readonly second: {\n            readonly third: string | null;\n        } | null;\n    } | null;\n};\n\n/**\n * This is a model with duplicated properties\n */\nexport type ModelWithDuplicateProperties = {\n    prop?: ModelWithString;\n};\n\n/**\n * This is a model with ordered properties\n */\nexport type ModelWithOrderedProperties = {\n    zebra?: string;\n    apple?: string;\n    hawaii?: string;\n};\n\n/**\n * This is a model with duplicated imports\n */\nexport type ModelWithDuplicateImports = {\n    propA?: ModelWithString;\n    propB?: ModelWithString;\n    propC?: ModelWithString;\n};\n\n/**\n * This is a model that extends another model\n */\nexport type ModelThatExtends = ModelWithString & {\n    propExtendsA?: string;\n    propExtendsB?: ModelWithString;\n};\n\n/**\n * This is a model that extends another model\n */\nexport type ModelThatExtendsExtends = ModelWithString & ModelThatExtends & {\n    propExtendsC?: string;\n    propExtendsD?: ModelWithString;\n};\n\n/**\n * This is a model that contains a some patterns\n */\nexport type ModelWithPattern = {\n    key: string;\n    name: string;\n    readonly enabled?: boolean;\n    readonly modified?: string;\n    id?: string;\n    text?: string;\n    patternWithSingleQuotes?: string;\n    patternWithNewline?: string;\n    patternWithBacktick?: string;\n    patternWithUnicode?: string;\n};\n\nexport type File = {\n    /**\n     * Id\n     */\n    readonly id?: string;\n    /**\n     * Updated at\n     */\n    readonly updated_at?: string;\n    /**\n     * Created at\n     */\n    readonly created_at?: string;\n    /**\n     * Mime\n     */\n    mime: string;\n    /**\n     * File\n     */\n    readonly file?: string;\n};\n\nexport type Default = {\n    name?: string;\n};\n\nexport type Pageable = {\n    page?: number;\n    size?: number;\n    sort?: Array<string>;\n};\n\n/**\n * This is a free-form object without additionalProperties.\n */\nexport type FreeFormObjectWithoutAdditionalProperties = {\n    [key: string]: unknown;\n};\n\n/**\n * This is a free-form object with additionalProperties: true.\n */\nexport type FreeFormObjectWithAdditionalPropertiesEqTrue = {\n    [key: string]: unknown;\n};\n\n/**\n * This is a free-form object with additionalProperties: {}.\n */\nexport type FreeFormObjectWithAdditionalPropertiesEqEmptyObject = {\n    [key: string]: unknown;\n};\n\nexport type ModelWithConst = {\n    String?: 'String';\n    number?: 0;\n    null?: null;\n    withType?: 'Some string';\n};\n\n/**\n * This is a model with one property and additionalProperties: true\n */\nexport type ModelWithAdditionalPropertiesEqTrue = {\n    /**\n     * This is a simple string property\n     */\n    prop?: string;\n    [key: string]: unknown;\n};\n\nexport type NestedAnyOfArraysNullable = {\n    nullableArray?: Array<string | boolean> | null;\n};\n\nexport type CompositionWithOneOfAndProperties = ({\n    foo: SimpleParameter;\n} | {\n    bar: NonAsciiStringæøåÆøÅöôêÊ字符串;\n}) & {\n    baz: number | null;\n    qux: number;\n};\n\n/**\n * An object that can be null\n */\nexport type NullableObject = {\n    foo?: string;\n} | null;\n\n/**\n * Some % character\n */\nexport type CharactersInDescription = string;\n\nexport type ModelWithNullableObject = {\n    data?: NullableObject;\n};\n\n/**\n * An object with additional properties that can be null (anyOf ref + null)\n */\nexport type ModelWithAdditionalPropertiesRef = {\n    [key: string]: NullableObject | null;\n};\n\nexport type ModelWithOneOfEnum = {\n    foo: 'Bar';\n} | {\n    foo: 'Baz';\n} | {\n    foo: 'Qux';\n} | {\n    content: string;\n    foo: 'Quux';\n} | {\n    content: [\n        string,\n        string\n    ];\n    foo: 'Corge';\n};\n\nexport type ModelWithNestedArrayEnumsDataFoo = 'foo' | 'bar';\n\nexport type ModelWithNestedArrayEnumsDataBar = 'baz' | 'qux';\n\nexport type ModelWithNestedArrayEnumsData = {\n    foo?: Array<ModelWithNestedArrayEnumsDataFoo>;\n    bar?: Array<ModelWithNestedArrayEnumsDataBar>;\n};\n\nexport type ModelWithNestedArrayEnums = {\n    array_strings?: Array<string>;\n    data?: ModelWithNestedArrayEnumsData;\n};\n\nexport type ModelWithNestedCompositionEnums = {\n    foo?: ModelWithNestedArrayEnumsDataFoo;\n};\n\nexport type ModelWithReadOnlyAndWriteOnly = {\n    foo: string;\n    readonly bar: string;\n};\n\nexport type ModelWithConstantSizeArray = [\n    number,\n    number\n];\n\nexport type ModelWithAnyOfConstantSizeArray = [\n    number | string,\n    number | string,\n    number | string\n];\n\nexport type ModelWithPrefixItemsConstantSizeArray = [\n    ModelWithInteger,\n    number | string,\n    string\n];\n\nexport type ModelWithAnyOfConstantSizeArrayNullable = [\n    number | null | string,\n    number | null | string,\n    number | null | string\n];\n\nexport type ModelWithAnyOfConstantSizeArrayWithNSizeAndOptions = [\n    number | Import,\n    number | Import\n];\n\nexport type ModelWithAnyOfConstantSizeArrayAndIntersect = [\n    number & string,\n    number & string\n];\n\nexport type ModelWithNumericEnumUnion = {\n    /**\n     * Период\n     */\n    value?: -10 | -1 | 0 | 1 | 3 | 6 | 12;\n};\n\n/**\n * Some description with `back ticks`\n */\nexport type ModelWithBackticksInDescription = {\n    /**\n     * The template `that` should be used for parsing and importing the contents of the CSV file.\n     *\n     * <br/><p>There is one placeholder currently supported:<ul>     <li><b>${x}</b> - refers to the n-th column in the CSV file, e.g. ${1}, ${2}, ...)</li></ul><p>Example of a correct JSON template:</p>\n     * <pre>\n     * [\n     * {\n     * \"resourceType\": \"Asset\",\n     * \"identifier\": {\n     * \"name\": \"${1}\",\n     * \"domain\": {\n     * \"name\": \"${2}\",\n     * \"community\": {\n     * \"name\": \"Some Community\"\n     * }\n     * }\n     * },\n     * \"attributes\" : {\n     * \"00000000-0000-0000-0000-000000003115\" : [ {\n     * \"value\" : \"${3}\"\n     * } ],\n     * \"00000000-0000-0000-0000-000000000222\" : [ {\n     * \"value\" : \"${4}\"\n     * } ]\n     * }\n     * }\n     * ]\n     * </pre>\n     */\n    template?: string;\n};\n\nexport type ModelWithOneOfAndProperties = (SimpleParameter | NonAsciiStringæøåÆøÅöôêÊ字符串) & {\n    baz: number | null;\n    qux: number;\n};\n\n/**\n * Model used to test deduplication strategy (unused)\n */\nexport type ParameterSimpleParameterUnused = string;\n\n/**\n * Model used to test deduplication strategy\n */\nexport type PostServiceWithEmptyTagResponse = string;\n\n/**\n * Model used to test deduplication strategy\n */\nexport type PostServiceWithEmptyTagResponse2 = string;\n\n/**\n * Model used to test deduplication strategy\n */\nexport type DeleteFooData = string;\n\n/**\n * Model used to test deduplication strategy\n */\nexport type DeleteFooData2 = string;\n\n/**\n * Model with restricted keyword name\n */\nexport type Import = string;\n\nexport type SchemaWithFormRestrictedKeys = {\n    description?: string;\n    'x-enum-descriptions'?: string;\n    'x-enum-varnames'?: string;\n    'x-enumNames'?: string;\n    title?: string;\n    object?: {\n        description?: string;\n        'x-enum-descriptions'?: string;\n        'x-enum-varnames'?: string;\n        'x-enumNames'?: string;\n        title?: string;\n    };\n    array?: Array<{\n        description?: string;\n        'x-enum-descriptions'?: string;\n        'x-enum-varnames'?: string;\n        'x-enumNames'?: string;\n        title?: string;\n    }>;\n};\n\n/**\n * This schema was giving PascalCase transformations a hard time\n */\nexport type IoK8sApimachineryPkgApisMetaV1DeleteOptions = {\n    /**\n     * Must be fulfilled before a deletion is carried out. If not possible, a 409 Conflict status will be returned.\n     */\n    preconditions?: IoK8sApimachineryPkgApisMetaV1Preconditions;\n};\n\n/**\n * This schema was giving PascalCase transformations a hard time\n */\nexport type IoK8sApimachineryPkgApisMetaV1Preconditions = {\n    /**\n     * Specifies the target ResourceVersion\n     */\n    resourceVersion?: string;\n    /**\n     * Specifies the target UID.\n     */\n    uid?: string;\n};\n\nexport type AdditionalPropertiesUnknownIssue = {\n    [key: string]: string | number;\n};\n\nexport type AdditionalPropertiesUnknownIssue2 = {\n    [key: string]: string | number;\n};\n\nexport type AdditionalPropertiesUnknownIssue3 = string & {\n    entries: {\n        [key: string]: AdditionalPropertiesUnknownIssue;\n    };\n};\n\nexport type AdditionalPropertiesIntegerIssue = {\n    value: number;\n    [key: string]: number;\n};\n\nexport type OneOfAllOfIssue = ((ConstValue | GenericSchemaDuplicateIssue1SystemBoolean) & _3eNum1Период) | GenericSchemaDuplicateIssue1SystemString;\n\nexport type GenericSchemaDuplicateIssue1SystemBoolean = {\n    item?: boolean;\n    error?: string | null;\n    readonly hasError?: boolean;\n    data?: {\n        [key: string]: never;\n    };\n};\n\nexport type GenericSchemaDuplicateIssue1SystemString = {\n    item?: string | null;\n    error?: string | null;\n    readonly hasError?: boolean;\n};\n\nexport type ExternalSharedModel = {\n    id: string;\n    name?: string;\n};\n\n/**\n * This is a model with one property containing a reference\n */\nexport type ModelWithReferenceWritable = {\n    prop?: ModelWithPropertiesWritable;\n};\n\n/**\n * This is a model with one property containing an array\n */\nexport type ModelWithArrayReadOnlyAndWriteOnlyWritable = {\n    prop?: Array<ModelWithReadOnlyAndWriteOnlyWritable>;\n    propWithFile?: Array<Blob | File>;\n    propWithNumber?: Array<number>;\n};\n\n/**\n * This is a model with one nested property\n */\nexport type ModelWithPropertiesWritable = {\n    required: string;\n    requiredAndNullable: string | null;\n    string?: string;\n    number?: number;\n    boolean?: boolean;\n    reference?: ModelWithString;\n    'property with space'?: string;\n    default?: string;\n    try?: string;\n};\n\n/**\n * This is a model that contains a some patterns\n */\nexport type ModelWithPatternWritable = {\n    key: string;\n    name: string;\n    id?: string;\n    text?: string;\n    patternWithSingleQuotes?: string;\n    patternWithNewline?: string;\n    patternWithBacktick?: string;\n    patternWithUnicode?: string;\n};\n\nexport type FileWritable = {\n    /**\n     * Mime\n     */\n    mime: string;\n};\n\nexport type ModelWithReadOnlyAndWriteOnlyWritable = {\n    foo: string;\n    baz: string;\n};\n\nexport type ModelWithAnyOfConstantSizeArrayWithNSizeAndOptionsWritable = [\n    number | Import,\n    number | Import\n];\n\nexport type AdditionalPropertiesUnknownIssueWritable = {\n    [key: string]: string | number;\n};\n\nexport type OneOfAllOfIssueWritable = ((ConstValue | GenericSchemaDuplicateIssue1SystemBoolean) & _3eNum1Период) | GenericSchemaDuplicateIssue1SystemString;\n\nexport type GenericSchemaDuplicateIssue1SystemBooleanWritable = {\n    item?: boolean;\n    error?: string | null;\n    data?: {\n        [key: string]: never;\n    };\n};\n\nexport type GenericSchemaDuplicateIssue1SystemStringWritable = {\n    item?: string | null;\n    error?: string | null;\n};\n\n/**\n * This is a reusable parameter\n */\nexport type SimpleParameter = string;\n\n/**\n * Parameter with illegal characters\n */\nexport type XFooBar = ModelWithString;\n\n/**\n * A reusable request body\n */\nexport type SimpleRequestBody = ModelWithString;\n\n/**\n * A reusable request body\n */\nexport type SimpleFormData = ModelWithString;\n\nexport type ExportData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no+tag';\n};\n\nexport type PatchApiVbyApiVersionNoTagData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no+tag';\n};\n\nexport type PatchApiVbyApiVersionNoTagResponses = {\n    /**\n     * OK\n     */\n    default: unknown;\n};\n\nexport type ImportData = {\n    body: ModelWithReadOnlyAndWriteOnlyWritable | ModelWithArrayReadOnlyAndWriteOnlyWritable;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no+tag';\n};\n\nexport type ImportResponses = {\n    /**\n     * Success\n     */\n    200: ModelFromZendesk;\n    /**\n     * Default success response\n     */\n    default: ModelWithReadOnlyAndWriteOnly;\n};\n\nexport type ImportResponse = ImportResponses[keyof ImportResponses];\n\nexport type FooWowData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no+tag';\n};\n\nexport type FooWowResponses = {\n    /**\n     * OK\n     */\n    default: unknown;\n};\n\nexport type ApiVVersionODataControllerCountData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple/$count';\n};\n\nexport type ApiVVersionODataControllerCountResponses = {\n    /**\n     * Success\n     */\n    200: ModelFromZendesk;\n};\n\nexport type ApiVVersionODataControllerCountResponse = ApiVVersionODataControllerCountResponses[keyof ApiVVersionODataControllerCountResponses];\n\nexport type GetApiVbyApiVersionSimpleOperationData = {\n    body?: never;\n    path: {\n        /**\n         * foo in method\n         */\n        foo_param: string;\n    };\n    query?: never;\n    url: '/api/v{api-version}/simple:operation';\n};\n\nexport type GetApiVbyApiVersionSimpleOperationErrors = {\n    /**\n     * Default error response\n     */\n    default: ModelWithBoolean;\n};\n\nexport type GetApiVbyApiVersionSimpleOperationError = GetApiVbyApiVersionSimpleOperationErrors[keyof GetApiVbyApiVersionSimpleOperationErrors];\n\nexport type GetApiVbyApiVersionSimpleOperationResponses = {\n    /**\n     * Response is a simple number\n     */\n    200: number;\n};\n\nexport type GetApiVbyApiVersionSimpleOperationResponse = GetApiVbyApiVersionSimpleOperationResponses[keyof GetApiVbyApiVersionSimpleOperationResponses];\n\nexport type DeleteCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type GetCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type HeadCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type OptionsCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type PatchCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type PostCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type PutCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type DeleteFooData3 = {\n    body?: never;\n    headers: {\n        /**\n         * Parameter with illegal characters\n         */\n        'x-Foo-Bar': ModelWithString;\n    };\n    path: {\n        /**\n         * foo in method\n         */\n        foo_param: string;\n        /**\n         * bar in method\n         */\n        BarParam: string;\n    };\n    query?: never;\n    url: '/api/v{api-version}/foo/{foo_param}/bar/{BarParam}';\n};\n\nexport type CallWithDescriptionsData = {\n    body?: never;\n    path?: never;\n    query?: {\n        /**\n         * Testing multiline comments in string: First line\n         * Second line\n         *\n         * Fourth line\n         */\n        parameterWithBreaks?: string;\n        /**\n         * Testing backticks in string: `backticks` and ```multiple backticks``` should work\n         */\n        parameterWithBackticks?: string;\n        /**\n         * Testing slashes in string: \\backwards\\\\\\ and /forwards/// should work\n         */\n        parameterWithSlashes?: string;\n        /**\n         * Testing expression placeholders in string: ${expression} should work\n         */\n        parameterWithExpressionPlaceholders?: string;\n        /**\n         * Testing quotes in string: 'single quote''' and \"double quotes\"\"\" should work\n         */\n        parameterWithQuotes?: string;\n        /**\n         * Testing reserved characters in string: * inline * and ** inline ** should work\n         */\n        parameterWithReservedCharacters?: string;\n    };\n    url: '/api/v{api-version}/descriptions';\n};\n\nexport type DeprecatedCallData = {\n    body?: never;\n    headers: {\n        /**\n         * This parameter is deprecated\n         *\n         * @deprecated\n         */\n        parameter: DeprecatedModel | null;\n    };\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/parameters/deprecated';\n};\n\nexport type CallWithParametersData = {\n    /**\n     * This is the parameter that goes into the body\n     */\n    body: {\n        [key: string]: unknown;\n    } | null;\n    headers: {\n        /**\n         * This is the parameter that goes into the header\n         */\n        parameterHeader: string | null;\n    };\n    path: {\n        /**\n         * This is the parameter that goes into the path\n         */\n        parameterPath: string | null;\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string | null;\n    };\n    query: {\n        foo_ref_enum?: ModelWithNestedArrayEnumsDataFoo;\n        foo_all_of_enum: ModelWithNestedArrayEnumsDataFoo;\n        /**\n         * This is the parameter that goes into the query params\n         */\n        cursor: string | null;\n    };\n    url: '/api/v{api-version}/parameters/{parameterPath}';\n};\n\nexport type CallWithWeirdParameterNamesData = {\n    /**\n     * This is the parameter that goes into the body\n     */\n    body: ModelWithString | null;\n    headers: {\n        /**\n         * This is the parameter that goes into the request header\n         */\n        'parameter.header': string | null;\n    };\n    path: {\n        /**\n         * This is the parameter that goes into the path\n         */\n        'parameter.path.1'?: string;\n        /**\n         * This is the parameter that goes into the path\n         */\n        'parameter-path-2'?: string;\n        /**\n         * This is the parameter that goes into the path\n         */\n        'PARAMETER-PATH-3'?: string;\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string | null;\n    };\n    query: {\n        /**\n         * This is the parameter with a reserved keyword\n         */\n        default?: string;\n        /**\n         * This is the parameter that goes into the request query params\n         */\n        'parameter-query': string | null;\n    };\n    url: '/api/v{api-version}/parameters/{parameter.path.1}/{parameter-path-2}/{PARAMETER-PATH-3}';\n};\n\nexport type GetCallWithOptionalParamData = {\n    /**\n     * This is a required parameter\n     */\n    body: ModelWithOneOfEnum;\n    path?: never;\n    query?: {\n        /**\n         * This is an optional parameter\n         */\n        page?: number;\n    };\n    url: '/api/v{api-version}/parameters';\n};\n\nexport type PostCallWithOptionalParamData = {\n    /**\n     * This is an optional parameter\n     */\n    body?: {\n        offset?: number | null;\n    };\n    path?: never;\n    query: {\n        /**\n         * This is a required parameter\n         */\n        parameter: Pageable;\n    };\n    url: '/api/v{api-version}/parameters';\n};\n\nexport type PostCallWithOptionalParamResponses = {\n    /**\n     * Response is a simple number\n     */\n    200: number;\n    /**\n     * Success\n     */\n    204: void;\n};\n\nexport type PostCallWithOptionalParamResponse = PostCallWithOptionalParamResponses[keyof PostCallWithOptionalParamResponses];\n\nexport type PostApiVbyApiVersionRequestBodyData = {\n    /**\n     * A reusable request body\n     */\n    body?: SimpleRequestBody;\n    path?: never;\n    query?: {\n        /**\n         * This is a reusable parameter\n         */\n        parameter?: string;\n    };\n    url: '/api/v{api-version}/requestBody';\n};\n\nexport type PostApiVbyApiVersionFormDataData = {\n    /**\n     * A reusable request body\n     */\n    body?: SimpleFormData;\n    path?: never;\n    query?: {\n        /**\n         * This is a reusable parameter\n         */\n        parameter?: string;\n    };\n    url: '/api/v{api-version}/formData';\n};\n\nexport type CallWithDefaultParametersData = {\n    body?: never;\n    path?: never;\n    query?: {\n        /**\n         * This is a simple string with default value\n         */\n        parameterString?: string | null;\n        /**\n         * This is a simple number with default value\n         */\n        parameterNumber?: number | null;\n        /**\n         * This is a simple boolean with default value\n         */\n        parameterBoolean?: boolean | null;\n        /**\n         * This is a simple enum with default value\n         */\n        parameterEnum?: 'Success' | 'Warning' | 'Error';\n        /**\n         * This is a simple model with default value\n         */\n        parameterModel?: ModelWithString | null;\n    };\n    url: '/api/v{api-version}/defaults';\n};\n\nexport type CallWithDefaultOptionalParametersData = {\n    body?: never;\n    path?: never;\n    query?: {\n        /**\n         * This is a simple string that is optional with default value\n         */\n        parameterString?: string;\n        /**\n         * This is a simple number that is optional with default value\n         */\n        parameterNumber?: number;\n        /**\n         * This is a simple boolean that is optional with default value\n         */\n        parameterBoolean?: boolean;\n        /**\n         * This is a simple enum that is optional with default value\n         */\n        parameterEnum?: 'Success' | 'Warning' | 'Error';\n        /**\n         * This is a simple model that is optional with default value\n         */\n        parameterModel?: ModelWithString;\n    };\n    url: '/api/v{api-version}/defaults';\n};\n\nexport type CallToTestOrderOfParamsData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * This is a optional string with default\n         */\n        parameterOptionalStringWithDefault?: string;\n        /**\n         * This is a optional string with empty default\n         */\n        parameterOptionalStringWithEmptyDefault?: string;\n        /**\n         * This is a optional string with no default\n         */\n        parameterOptionalStringWithNoDefault?: string;\n        /**\n         * This is a string with default\n         */\n        parameterStringWithDefault: string;\n        /**\n         * This is a string with empty default\n         */\n        parameterStringWithEmptyDefault: string;\n        /**\n         * This is a string with no default\n         */\n        parameterStringWithNoDefault: string;\n        /**\n         * This is a string that can be null with no default\n         */\n        parameterStringNullableWithNoDefault?: string | null;\n        /**\n         * This is a string that can be null with default\n         */\n        parameterStringNullableWithDefault?: string | null;\n    };\n    url: '/api/v{api-version}/defaults';\n};\n\nexport type DuplicateNameData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/duplicate';\n};\n\nexport type DuplicateName2Data = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/duplicate';\n};\n\nexport type DuplicateName3Data = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/duplicate';\n};\n\nexport type DuplicateName4Data = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/duplicate';\n};\n\nexport type CallWithNoContentResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no-content';\n};\n\nexport type CallWithNoContentResponseResponses = {\n    /**\n     * Success\n     */\n    204: void;\n};\n\nexport type CallWithNoContentResponseResponse = CallWithNoContentResponseResponses[keyof CallWithNoContentResponseResponses];\n\nexport type CallWithResponseAndNoContentResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multiple-tags/response-and-no-content';\n};\n\nexport type CallWithResponseAndNoContentResponseResponses = {\n    /**\n     * Response is a simple number\n     */\n    200: number;\n    /**\n     * Success\n     */\n    204: void;\n};\n\nexport type CallWithResponseAndNoContentResponseResponse = CallWithResponseAndNoContentResponseResponses[keyof CallWithResponseAndNoContentResponseResponses];\n\nexport type DummyAData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multiple-tags/a';\n};\n\nexport type DummyAResponses = {\n    200: _400;\n};\n\nexport type DummyAResponse = DummyAResponses[keyof DummyAResponses];\n\nexport type DummyBData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multiple-tags/b';\n};\n\nexport type DummyBResponses = {\n    /**\n     * Success\n     */\n    204: void;\n};\n\nexport type DummyBResponse = DummyBResponses[keyof DummyBResponses];\n\nexport type CallWithResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/response';\n};\n\nexport type CallWithResponseResponses = {\n    default: Import;\n};\n\nexport type CallWithResponseResponse = CallWithResponseResponses[keyof CallWithResponseResponses];\n\nexport type CallWithDuplicateResponsesData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/response';\n};\n\nexport type CallWithDuplicateResponsesErrors = {\n    /**\n     * Message for 500 error\n     */\n    500: ModelWithStringError;\n    /**\n     * Message for 501 error\n     */\n    501: ModelWithStringError;\n    /**\n     * Message for 502 error\n     */\n    502: ModelWithStringError;\n    /**\n     * Message for 4XX errors\n     */\n    '4XX': DictionaryWithArray;\n    /**\n     * Default error response\n     */\n    default: ModelWithBoolean;\n};\n\nexport type CallWithDuplicateResponsesError = CallWithDuplicateResponsesErrors[keyof CallWithDuplicateResponsesErrors];\n\nexport type CallWithDuplicateResponsesResponses = {\n    /**\n     * Message for 200 response\n     */\n    200: ModelWithBoolean & ModelWithInteger;\n    /**\n     * Message for 201 response\n     */\n    201: ModelWithString;\n    /**\n     * Message for 202 response\n     */\n    202: ModelWithString;\n};\n\nexport type CallWithDuplicateResponsesResponse = CallWithDuplicateResponsesResponses[keyof CallWithDuplicateResponsesResponses];\n\nexport type CallWithResponsesData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/response';\n};\n\nexport type CallWithResponsesErrors = {\n    /**\n     * Message for 500 error\n     */\n    500: ModelWithStringError;\n    /**\n     * Message for 501 error\n     */\n    501: ModelWithStringError;\n    /**\n     * Message for 502 error\n     */\n    502: ModelWithStringError;\n    /**\n     * Message for default response\n     */\n    default: ModelWithStringError;\n};\n\nexport type CallWithResponsesError = CallWithResponsesErrors[keyof CallWithResponsesErrors];\n\nexport type CallWithResponsesResponses = {\n    /**\n     * Message for 200 response\n     */\n    200: {\n        readonly '@namespace.string'?: string;\n        readonly '@namespace.integer'?: number;\n        readonly value?: Array<ModelWithString>;\n    };\n    /**\n     * Message for 201 response\n     */\n    201: ModelThatExtends;\n    /**\n     * Message for 202 response\n     */\n    202: ModelThatExtendsExtends;\n};\n\nexport type CallWithResponsesResponse = CallWithResponsesResponses[keyof CallWithResponsesResponses];\n\nexport type CollectionFormatData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * This is an array parameter that is sent as csv format (comma-separated values)\n         */\n        parameterArrayCSV: Array<string> | null;\n        /**\n         * This is an array parameter that is sent as ssv format (space-separated values)\n         */\n        parameterArraySSV: Array<string> | null;\n        /**\n         * This is an array parameter that is sent as tsv format (tab-separated values)\n         */\n        parameterArrayTSV: Array<string> | null;\n        /**\n         * This is an array parameter that is sent as pipes format (pipe-separated values)\n         */\n        parameterArrayPipes: Array<string> | null;\n        /**\n         * This is an array parameter that is sent as multi format (multiple parameter instances)\n         */\n        parameterArrayMulti: Array<string> | null;\n    };\n    url: '/api/v{api-version}/collectionFormat';\n};\n\nexport type TypesData = {\n    body?: never;\n    path?: {\n        /**\n         * This is a number parameter\n         */\n        id?: number;\n    };\n    query: {\n        /**\n         * This is a number parameter\n         */\n        parameterNumber: number;\n        /**\n         * This is a string parameter\n         */\n        parameterString: string | null;\n        /**\n         * This is a boolean parameter\n         */\n        parameterBoolean: boolean | null;\n        /**\n         * This is an object parameter\n         */\n        parameterObject: {\n            [key: string]: unknown;\n        } | null;\n        /**\n         * This is an array parameter\n         */\n        parameterArray: Array<string> | null;\n        /**\n         * This is a dictionary parameter\n         */\n        parameterDictionary: {\n            [key: string]: unknown;\n        } | null;\n        /**\n         * This is an enum parameter\n         */\n        parameterEnum: 'Success' | 'Warning' | 'Error' | null;\n    };\n    url: '/api/v{api-version}/types';\n};\n\nexport type TypesResponses = {\n    /**\n     * Response is a simple number\n     */\n    200: number;\n    /**\n     * Response is a simple string\n     */\n    201: string;\n    /**\n     * Response is a simple boolean\n     */\n    202: boolean;\n    /**\n     * Response is a simple object\n     */\n    203: {\n        [key: string]: unknown;\n    };\n};\n\nexport type TypesResponse = TypesResponses[keyof TypesResponses];\n\nexport type UploadFileData = {\n    body: Blob | File;\n    path: {\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string | null;\n    };\n    query?: never;\n    url: '/api/v{api-version}/upload';\n};\n\nexport type UploadFileResponses = {\n    200: boolean;\n};\n\nexport type UploadFileResponse = UploadFileResponses[keyof UploadFileResponses];\n\nexport type FileResponseData = {\n    body?: never;\n    path: {\n        id: string;\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string;\n    };\n    query?: never;\n    url: '/api/v{api-version}/file/{id}';\n};\n\nexport type FileResponseResponses = {\n    /**\n     * Success\n     */\n    200: Blob | File;\n};\n\nexport type FileResponseResponse = FileResponseResponses[keyof FileResponseResponses];\n\nexport type ComplexTypesData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * Parameter containing object\n         */\n        parameterObject: {\n            first?: {\n                second?: {\n                    third?: string;\n                };\n            };\n        };\n        /**\n         * Parameter containing reference\n         */\n        parameterReference: ModelWithString;\n    };\n    url: '/api/v{api-version}/complex';\n};\n\nexport type ComplexTypesErrors = {\n    /**\n     * 400 `server` error\n     */\n    400: unknown;\n    /**\n     * 500 server error\n     */\n    500: unknown;\n};\n\nexport type ComplexTypesResponses = {\n    /**\n     * Successful response\n     */\n    200: Array<ModelWithString>;\n};\n\nexport type ComplexTypesResponse = ComplexTypesResponses[keyof ComplexTypesResponses];\n\nexport type MultipartResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multipart';\n};\n\nexport type MultipartResponseResponses = {\n    /**\n     * OK\n     */\n    200: {\n        file?: Blob | File;\n        metadata?: {\n            foo?: string;\n            bar?: string;\n        };\n    };\n};\n\nexport type MultipartResponseResponse = MultipartResponseResponses[keyof MultipartResponseResponses];\n\nexport type MultipartRequestData = {\n    body?: {\n        content?: Blob | File;\n        data?: ModelWithString | null;\n    };\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multipart';\n};\n\nexport type ComplexParamsData = {\n    body?: {\n        readonly key: string | null;\n        name: string | null;\n        enabled?: boolean;\n        type: 'Monkey' | 'Horse' | 'Bird';\n        listOfModels?: Array<ModelWithString> | null;\n        listOfStrings?: Array<string> | null;\n        parameters: ModelWithString | ModelWithEnum | ModelWithArray | ModelWithDictionary;\n        readonly user?: {\n            readonly id?: number;\n            readonly name?: string | null;\n        };\n    };\n    path: {\n        id: number;\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string;\n    };\n    query?: never;\n    url: '/api/v{api-version}/complex/{id}';\n};\n\nexport type ComplexParamsResponses = {\n    /**\n     * Success\n     */\n    200: ModelWithString;\n};\n\nexport type ComplexParamsResponse = ComplexParamsResponses[keyof ComplexParamsResponses];\n\nexport type CallWithResultFromHeaderData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/header';\n};\n\nexport type CallWithResultFromHeaderErrors = {\n    /**\n     * 400 server error\n     */\n    400: unknown;\n    /**\n     * 500 server error\n     */\n    500: unknown;\n};\n\nexport type CallWithResultFromHeaderResponses = {\n    /**\n     * Successful response\n     */\n    200: unknown;\n};\n\nexport type TestErrorCodeData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * Status code to return\n         */\n        status: number;\n    };\n    url: '/api/v{api-version}/error';\n};\n\nexport type TestErrorCodeErrors = {\n    /**\n     * Custom message: Internal Server Error\n     */\n    500: unknown;\n    /**\n     * Custom message: Not Implemented\n     */\n    501: unknown;\n    /**\n     * Custom message: Bad Gateway\n     */\n    502: unknown;\n    /**\n     * Custom message: Service Unavailable\n     */\n    503: unknown;\n};\n\nexport type TestErrorCodeResponses = {\n    /**\n     * Custom message: Successful response\n     */\n    200: unknown;\n};\n\nexport type NonAsciiæøåÆøÅöôêÊ字符串Data = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * Dummy input param\n         */\n        nonAsciiParamæøåÆØÅöôêÊ: number;\n    };\n    url: '/api/v{api-version}/non-ascii-æøåÆØÅöôêÊ字符串';\n};\n\nexport type NonAsciiæøåÆøÅöôêÊ字符串Responses = {\n    /**\n     * Successful response\n     */\n    200: Array<NonAsciiStringæøåÆøÅöôêÊ字符串>;\n};\n\nexport type NonAsciiæøåÆøÅöôêÊ字符串Response = NonAsciiæøåÆøÅöôêÊ字符串Responses[keyof NonAsciiæøåÆøÅöôêÊ字符串Responses];\n\nexport type PutWithFormUrlEncodedData = {\n    body: ArrayWithStrings;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/non-ascii-æøåÆØÅöôêÊ字符串';\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-axios/tsconfig-node16-sdk/client/client.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { AxiosError, AxiosInstance, RawAxiosRequestHeaders } from 'axios';\nimport axios from 'axios';\n\nimport { createSseClient } from '../core/serverSentEvents.gen.js';\nimport type { HttpMethod } from '../core/types.gen.js';\nimport { getValidRequestBody } from '../core/utils.gen.js';\nimport type { Client, Config, RequestOptions } from './types.gen.js';\nimport { buildUrl, createConfig, mergeConfigs, mergeHeaders, setAuthParams } from './utils.gen.js';\n\nexport const createClient = (config: Config = {}): Client => {\n  let _config = mergeConfigs(createConfig(), config);\n\n  let instance: AxiosInstance;\n\n  if (_config.axios && !('Axios' in _config.axios)) {\n    instance = _config.axios;\n  } else {\n    // eslint-disable-next-line @typescript-eslint/no-unused-vars\n    const { auth, ...configWithoutAuth } = _config;\n    instance = axios.create(configWithoutAuth);\n  }\n\n  const getConfig = (): Config => ({ ..._config });\n\n  const setConfig = (config: Config): Config => {\n    _config = mergeConfigs(_config, config);\n    instance.defaults = {\n      ...instance.defaults,\n      ..._config,\n      // @ts-expect-error\n      headers: mergeHeaders(instance.defaults.headers, _config.headers),\n    };\n    return getConfig();\n  };\n\n  const beforeRequest = async (options: RequestOptions) => {\n    const opts = {\n      ..._config,\n      ...options,\n      axios: options.axios ?? _config.axios ?? instance,\n      headers: mergeHeaders(_config.headers, options.headers),\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.body = opts.bodySerializer(opts.body);\n    }\n\n    const url = buildUrl(opts);\n\n    return { opts, url };\n  };\n\n  // @ts-expect-error\n  const request: Client['request'] = async (options) => {\n    // @ts-expect-error\n    const { opts, url } = await beforeRequest(options);\n    try {\n      // assign Axios here for consistency with fetch\n      const _axios = opts.axios!;\n      // eslint-disable-next-line @typescript-eslint/no-unused-vars\n      const { auth, ...optsWithoutAuth } = opts;\n      const response = await _axios({\n        ...optsWithoutAuth,\n        baseURL: '', // the baseURL is already included in `url`\n        data: getValidRequestBody(opts),\n        headers: opts.headers as RawAxiosRequestHeaders,\n        // let `paramsSerializer()` handle query params if it exists\n        params: opts.paramsSerializer ? opts.query : undefined,\n        url,\n      });\n\n      let { data } = response;\n\n      if (opts.responseType === '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 {\n        ...response,\n        data: data ?? {},\n      };\n    } catch (error) {\n      const e = error as AxiosError;\n      if (opts.throwOnError) {\n        throw e;\n      }\n      // @ts-expect-error\n      e.error = e.response?.data ?? {};\n      return e;\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 Record<string, string>,\n      method,\n      serializedBody: getValidRequestBody(opts) as BodyInit | null | undefined,\n      // @ts-expect-error\n      signal: opts.signal,\n      url,\n    });\n  };\n\n  const _buildUrl: Client['buildUrl'] = (options) =>\n    buildUrl({ axios: instance, ..._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    instance,\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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-axios/tsconfig-node16-sdk/client/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type { Auth } from '../core/auth.gen.js';\nexport type { QuerySerializerOptions } from '../core/bodySerializer.gen.js';\nexport {\n  formDataBodySerializer,\n  jsonBodySerializer,\n  urlSearchParamsBodySerializer,\n} from '../core/bodySerializer.gen.js';\nexport { buildClientParams } from '../core/params.gen.js';\nexport { serializeQueryKeyValue } from '../core/queryKeySerializer.gen.js';\nexport { createClient } from './client.gen.js';\nexport type {\n  Client,\n  ClientOptions,\n  Config,\n  CreateClientConfig,\n  Options,\n  RequestOptions,\n  RequestResult,\n  TDataShape,\n} from './types.gen.js';\nexport { createConfig } from './utils.gen.js';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-axios/tsconfig-node16-sdk/client/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type {\n  AxiosError,\n  AxiosInstance,\n  AxiosRequestHeaders,\n  AxiosResponse,\n  AxiosStatic,\n  CreateAxiosDefaults,\n} from 'axios';\n\nimport type { Auth } from '../core/auth.gen.js';\nimport type {\n  ServerSentEventsOptions,\n  ServerSentEventsResult,\n} from '../core/serverSentEvents.gen.js';\nimport type { Client as CoreClient, Config as CoreConfig } from '../core/types.gen.js';\n\nexport interface Config<T extends ClientOptions = ClientOptions>\n  extends Omit<CreateAxiosDefaults, 'auth' | 'baseURL' | 'headers' | 'method'>, CoreConfig {\n  /**\n   * Axios implementation. You can use this option to provide either an\n   * `AxiosStatic` or an `AxiosInstance`.\n   *\n   * @default axios\n   */\n  axios?: AxiosStatic | AxiosInstance;\n  /**\n   * Base URL for all requests made by this client.\n   */\n  baseURL?: T['baseURL'];\n  /**\n   * An object containing any HTTP headers that you want to pre-populate your\n   * `Headers` object with.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/Headers/Headers#init See more}\n   */\n  headers?:\n    | AxiosRequestHeaders\n    | Record<\n        string,\n        string | number | boolean | (string | number | boolean)[] | null | undefined | unknown\n      >;\n  /**\n   * Throw an error instead of returning it in the response?\n   *\n   * @default false\n   */\n  throwOnError?: T['throwOnError'];\n}\n\nexport interface RequestOptions<\n  TData = unknown,\n  ThrowOnError extends boolean = boolean,\n  Url extends string = string,\n>\n  extends\n    Config<{\n      throwOnError: ThrowOnError;\n    }>,\n    Pick<\n      ServerSentEventsOptions<TData>,\n      | 'onRequest'\n      | 'onSseError'\n      | 'onSseEvent'\n      | 'sseDefaultRetryDelay'\n      | 'sseMaxRetryAttempts'\n      | 'sseMaxRetryDelay'\n    > {\n  /**\n   * Any body that you want to add to your request.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/fetch#body}\n   */\n  body?: unknown;\n  path?: Record<string, unknown>;\n  query?: Record<string, unknown>;\n  /**\n   * Security mechanism(s) to use for the request.\n   */\n  security?: ReadonlyArray<Auth>;\n  url: Url;\n}\n\nexport interface ClientOptions {\n  baseURL?: string;\n  throwOnError?: boolean;\n}\n\nexport type RequestResult<\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = boolean,\n> = ThrowOnError extends true\n  ? Promise<AxiosResponse<TData extends Record<string, unknown> ? TData[keyof TData] : TData>>\n  : Promise<\n      | (AxiosResponse<TData extends Record<string, unknown> ? TData[keyof TData] : TData> & {\n          error: undefined;\n        })\n      | (AxiosError<TError extends Record<string, unknown> ? TError[keyof TError] : TError> & {\n          data: undefined;\n          error: TError extends Record<string, unknown> ? TError[keyof TError] : TError;\n        })\n    >;\n\ntype MethodFn = <TData = unknown, TError = unknown, ThrowOnError extends boolean = false>(\n  options: Omit<RequestOptions<TData, ThrowOnError>, 'method'>,\n) => RequestResult<TData, TError, ThrowOnError>;\n\ntype SseFn = <TData = unknown, TError = unknown, ThrowOnError extends boolean = false>(\n  options: Omit<RequestOptions<TData, ThrowOnError>, 'method'>,\n) => Promise<ServerSentEventsResult<TData, TError>>;\n\ntype RequestFn = <TData = unknown, TError = unknown, ThrowOnError extends boolean = false>(\n  options: Omit<RequestOptions<TData, ThrowOnError>, 'method'> &\n    Pick<Required<RequestOptions<TData, ThrowOnError>>, 'method'>,\n) => RequestResult<TData, TError, ThrowOnError>;\n\ntype BuildUrlFn = <\n  TData extends {\n    body?: unknown;\n    path?: Record<string, unknown>;\n    query?: Record<string, unknown>;\n    url: string;\n  },\n>(\n  options: TData & Options<TData>,\n) => string;\n\nexport type Client = CoreClient<RequestFn, Config, MethodFn, BuildUrlFn, SseFn> & {\n  instance: AxiosInstance;\n};\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 = ClientOptions> = (\n  override?: Config<ClientOptions & T>,\n) => Config<Required<ClientOptions> & T>;\n\nexport interface TDataShape {\n  body?: unknown;\n  headers?: unknown;\n  path?: unknown;\n  query?: unknown;\n  url: string;\n}\n\ntype OmitKeys<T, K> = Pick<T, Exclude<keyof T, K>>;\n\nexport type Options<\n  TData extends TDataShape = TDataShape,\n  ThrowOnError extends boolean = boolean,\n  TResponse = unknown,\n> = OmitKeys<RequestOptions<TResponse, ThrowOnError>, 'body' | 'path' | 'query' | 'url'> &\n  ([TData] extends [never] ? unknown : Omit<TData, 'url'>);\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-axios/tsconfig-node16-sdk/client/utils.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport { getAuthToken } from '../core/auth.gen.js';\nimport type { QuerySerializerOptions } from '../core/bodySerializer.gen.js';\nimport {\n  serializeArrayParam,\n  serializeObjectParam,\n  serializePrimitiveParam,\n} from '../core/pathSerializer.gen.js';\nimport { getUrl } from '../core/utils.gen.js';\nimport type { Client, ClientOptions, Config, RequestOptions } from './types.gen.js';\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\nconst checkForExistence = (\n  options: Pick<RequestOptions, 'auth' | 'query'> & {\n    headers: Record<any, unknown>;\n  },\n  name?: string,\n): boolean => {\n  if (!name) {\n    return false;\n  }\n  if (name in options.headers || options.query?.[name]) {\n    return true;\n  }\n  if (\n    'Cookie' in options.headers &&\n    options.headers['Cookie'] &&\n    typeof options.headers['Cookie'] === 'string'\n  ) {\n    return options.headers['Cookie'].includes(`${name}=`);\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: Record<any, unknown>;\n  }) => {\n  for (const auth of security) {\n    if (checkForExistence(options, auth.name)) {\n      continue;\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        const value = `${name}=${token}`;\n        if ('Cookie' in options.headers && options.headers['Cookie']) {\n          options.headers['Cookie'] = `${options.headers['Cookie']}; ${value}`;\n        } else {\n          options.headers['Cookie'] = value;\n        }\n        break;\n      }\n      case 'header':\n      default:\n        options.headers[name] = token;\n        break;\n    }\n  }\n};\n\nexport const buildUrl: Client['buildUrl'] = (options) => {\n  const instanceBaseUrl = options.axios?.defaults?.baseURL;\n\n  const baseUrl =\n    !!options.baseURL && typeof options.baseURL === 'string' ? options.baseURL : instanceBaseUrl;\n\n  return getUrl({\n    baseUrl: baseUrl as string,\n    path: options.path,\n    // let `paramsSerializer()` handle query params if it exists\n    query: !options.paramsSerializer ? options.query : undefined,\n    querySerializer:\n      typeof options.querySerializer === 'function'\n        ? options.querySerializer\n        : createQuerySerializer(options.querySerializer),\n    url: options.url,\n  });\n};\n\nexport const mergeConfigs = (a: Config, b: Config): Config => {\n  const config = { ...a, ...b };\n  config.headers = mergeHeaders(a.headers, b.headers);\n  return config;\n};\n\n/**\n * Special Axios headers keywords allowing to set headers by request method.\n */\nexport const axiosHeadersKeywords = [\n  'common',\n  'delete',\n  'get',\n  'head',\n  'patch',\n  'post',\n  'put',\n] as const;\n\nexport const mergeHeaders = (\n  ...headers: Array<Required<Config>['headers'] | undefined>\n): Record<any, unknown> => {\n  const mergedHeaders: Record<any, unknown> = {};\n  for (const header of headers) {\n    if (!header || typeof header !== 'object') {\n      continue;\n    }\n\n    const iterator = Object.entries(header);\n\n    for (const [key, value] of iterator) {\n      if (\n        axiosHeadersKeywords.includes(key as (typeof axiosHeadersKeywords)[number]) &&\n        typeof value === 'object'\n      ) {\n        mergedHeaders[key] = {\n          ...(mergedHeaders[key] as Record<any, unknown>),\n          ...value,\n        };\n      } else if (value === null) {\n        delete mergedHeaders[key];\n      } else if (Array.isArray(value)) {\n        for (const v of value) {\n          // @ts-expect-error\n          mergedHeaders[key] = [...(mergedHeaders[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[key] = typeof value === 'object' ? JSON.stringify(value) : (value as string);\n      }\n    }\n  }\n  return mergedHeaders;\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  ...override,\n});\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-axios/tsconfig-node16-sdk/client.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport { type ClientOptions, type Config, createClient, createConfig } from './client/index.js';\nimport type { ClientOptions as ClientOptions2 } from './types.gen.js';\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: 'http://localhost:3000/base' }));\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-axios/tsconfig-node16-sdk/core/auth.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-axios/tsconfig-node16-sdk/core/bodySerializer.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { ArrayStyle, ObjectStyle, SerializerOptions } from './pathSerializer.gen.js';\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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-axios/tsconfig-node16-sdk/core/params.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-axios/tsconfig-node16-sdk/core/pathSerializer.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-axios/tsconfig-node16-sdk/core/queryKeySerializer.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\n/**\n * JSON-friendly union that mirrors what Pinia Colada can hash.\n */\nexport type JsonValue =\n  | null\n  | string\n  | number\n  | boolean\n  | JsonValue[]\n  | { [key: string]: JsonValue };\n\n/**\n * Replacer that converts non-JSON values (bigint, Date, etc.) to safe substitutes.\n */\nexport const queryKeyJsonReplacer = (_key: string, value: unknown) => {\n  if (value === undefined || typeof value === 'function' || typeof value === 'symbol') {\n    return undefined;\n  }\n  if (typeof value === 'bigint') {\n    return value.toString();\n  }\n  if (value instanceof Date) {\n    return value.toISOString();\n  }\n  return value;\n};\n\n/**\n * Safely stringifies a value and parses it back into a JsonValue.\n */\nexport const stringifyToJsonValue = (input: unknown): JsonValue | undefined => {\n  try {\n    const json = JSON.stringify(input, queryKeyJsonReplacer);\n    if (json === undefined) {\n      return undefined;\n    }\n    return JSON.parse(json) as JsonValue;\n  } catch {\n    return undefined;\n  }\n};\n\n/**\n * Detects plain objects (including objects with a null prototype).\n */\nconst isPlainObject = (value: unknown): value is Record<string, unknown> => {\n  if (value === null || typeof value !== 'object') {\n    return false;\n  }\n  const prototype = Object.getPrototypeOf(value as object);\n  return prototype === Object.prototype || prototype === null;\n};\n\n/**\n * Turns URLSearchParams into a sorted JSON object for deterministic keys.\n */\nconst serializeSearchParams = (params: URLSearchParams): JsonValue => {\n  const entries = Array.from(params.entries()).sort(([a], [b]) => a.localeCompare(b));\n  const result: Record<string, JsonValue> = {};\n\n  for (const [key, value] of entries) {\n    const existing = result[key];\n    if (existing === undefined) {\n      result[key] = value;\n      continue;\n    }\n\n    if (Array.isArray(existing)) {\n      (existing as string[]).push(value);\n    } else {\n      result[key] = [existing, value];\n    }\n  }\n\n  return result;\n};\n\n/**\n * Normalizes any accepted value into a JSON-friendly shape for query keys.\n */\nexport const serializeQueryKeyValue = (value: unknown): JsonValue | undefined => {\n  if (value === null) {\n    return null;\n  }\n\n  if (typeof value === 'string' || typeof value === 'number' || typeof value === 'boolean') {\n    return value;\n  }\n\n  if (value === undefined || typeof value === 'function' || typeof value === 'symbol') {\n    return undefined;\n  }\n\n  if (typeof value === 'bigint') {\n    return value.toString();\n  }\n\n  if (value instanceof Date) {\n    return value.toISOString();\n  }\n\n  if (Array.isArray(value)) {\n    return stringifyToJsonValue(value);\n  }\n\n  if (typeof URLSearchParams !== 'undefined' && value instanceof URLSearchParams) {\n    return serializeSearchParams(value);\n  }\n\n  if (isPlainObject(value)) {\n    return stringifyToJsonValue(value);\n  }\n\n  return undefined;\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-axios/tsconfig-node16-sdk/core/serverSentEvents.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { Config } from './types.gen.js';\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 const 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            // Normalize line endings: CRLF -> LF, then CR -> LF\n            buffer = buffer.replace(/\\r\\n/g, '\\n').replace(/\\r/g, '\\n');\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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-axios/tsconfig-node16-sdk/core/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { Auth, AuthToken } from './auth.gen.js';\nimport type { BodySerializer, QuerySerializer, QuerySerializerOptions } from './bodySerializer.gen.js';\n\nexport type HttpMethod =\n  | 'connect'\n  | 'delete'\n  | 'get'\n  | 'head'\n  | 'options'\n  | 'patch'\n  | 'post'\n  | 'put'\n  | 'trace';\n\nexport type Client<\n  RequestFn = never,\n  Config = unknown,\n  MethodFn = never,\n  BuildUrlFn = never,\n  SseFn = never,\n> = {\n  /**\n   * Returns the final request URL.\n   */\n  buildUrl: BuildUrlFn;\n  getConfig: () => Config;\n  request: RequestFn;\n  setConfig: (config: Config) => Config;\n} & {\n  [K in HttpMethod]: MethodFn;\n} & ([SseFn] extends [never] ? { sse?: never } : { sse: { [K in HttpMethod]: SseFn } });\n\nexport interface Config {\n  /**\n   * Auth token or a function returning auth token. The resolved value will be\n   * added to the request payload as defined by its `security` array.\n   */\n  auth?: ((auth: Auth) => Promise<AuthToken> | AuthToken) | AuthToken;\n  /**\n   * A function for serializing request body parameter. By default,\n   * {@link JSON.stringify()} will be used.\n   */\n  bodySerializer?: BodySerializer | null;\n  /**\n   * An object containing any HTTP headers that you want to pre-populate your\n   * `Headers` object with.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/Headers/Headers#init See more}\n   */\n  headers?:\n    | RequestInit['headers']\n    | Record<\n        string,\n        string | number | boolean | (string | number | boolean)[] | null | undefined | unknown\n      >;\n  /**\n   * The request method.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/fetch#method See more}\n   */\n  method?: Uppercase<HttpMethod>;\n  /**\n   * A function for serializing request query parameters. By default, arrays\n   * will be exploded in form style, objects will be exploded in deepObject\n   * style, and reserved characters are percent-encoded.\n   *\n   * This method will have no effect if the native `paramsSerializer()` Axios\n   * API function is used.\n   *\n   * {@link https://swagger.io/docs/specification/serialization/#query View examples}\n   */\n  querySerializer?: QuerySerializer | QuerySerializerOptions;\n  /**\n   * A function validating request data. This is useful if you want to ensure\n   * the request conforms to the desired shape, so it can be safely sent to\n   * the server.\n   */\n  requestValidator?: (data: unknown) => Promise<unknown>;\n  /**\n   * A function transforming response data before it's returned. This is useful\n   * for post-processing data, e.g. converting ISO strings into Date objects.\n   */\n  responseTransformer?: (data: unknown) => Promise<unknown>;\n  /**\n   * A function validating response data. This is useful if you want to ensure\n   * the response conforms to the desired shape, so it can be safely passed to\n   * the transformers and returned to the user.\n   */\n  responseValidator?: (data: unknown) => Promise<unknown>;\n}\n\ntype IsExactlyNeverOrNeverUndefined<T> = [T] extends [never]\n  ? true\n  : [T] extends [never | undefined]\n    ? [undefined] extends [T]\n      ? false\n      : true\n    : false;\n\nexport type OmitNever<T extends Record<string, unknown>> = {\n  [K in keyof T as IsExactlyNeverOrNeverUndefined<T[K]> extends true ? never : K]: T[K];\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-axios/tsconfig-node16-sdk/core/utils.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { BodySerializer, QuerySerializer } from './bodySerializer.gen.js';\nimport {\n  type ArraySeparatorStyle,\n  serializeArrayParam,\n  serializeObjectParam,\n  serializePrimitiveParam,\n} from './pathSerializer.gen.js';\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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-axios/tsconfig-node16-sdk/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport { apiVVersionODataControllerCount, callToTestOrderOfParams, callWithDefaultOptionalParameters, callWithDefaultParameters, callWithDescriptions, callWithDuplicateResponses, callWithNoContentResponse, callWithParameters, callWithResponse, callWithResponseAndNoContentResponse, callWithResponses, callWithResultFromHeader, callWithWeirdParameterNames, collectionFormat, complexParams, complexTypes, deleteCallWithoutParametersAndResponse, deleteFoo, deprecatedCall, dummyA, dummyB, duplicateName, duplicateName2, duplicateName3, duplicateName4, export_, fileResponse, fooWow, getApiVbyApiVersionSimpleOperation, getCallWithOptionalParam, getCallWithoutParametersAndResponse, headCallWithoutParametersAndResponse, import_, multipartRequest, multipartResponse, nonAsciiæøåÆøÅöôêÊ字符串, type Options, optionsCallWithoutParametersAndResponse, patchApiVbyApiVersionNoTag, patchCallWithoutParametersAndResponse, postApiVbyApiVersionFormData, postApiVbyApiVersionRequestBody, postCallWithOptionalParam, postCallWithoutParametersAndResponse, putCallWithoutParametersAndResponse, putWithFormUrlEncoded, testErrorCode, types, uploadFile } from './sdk.gen.js';\nexport type { _3eNum1Период, _400, AdditionalPropertiesIntegerIssue, AdditionalPropertiesUnknownIssue, AdditionalPropertiesUnknownIssue2, AdditionalPropertiesUnknownIssue3, AdditionalPropertiesUnknownIssueWritable, AnyOfAnyAndNull, AnyOfArrays, ApiVVersionODataControllerCountData, ApiVVersionODataControllerCountResponse, ApiVVersionODataControllerCountResponses, ArrayWithAnyOfProperties, ArrayWithArray, ArrayWithBooleans, ArrayWithNumbers, ArrayWithProperties, ArrayWithReferences, ArrayWithStrings, CallToTestOrderOfParamsData, CallWithDefaultOptionalParametersData, CallWithDefaultParametersData, CallWithDescriptionsData, CallWithDuplicateResponsesData, CallWithDuplicateResponsesError, CallWithDuplicateResponsesErrors, CallWithDuplicateResponsesResponse, CallWithDuplicateResponsesResponses, CallWithNoContentResponseData, CallWithNoContentResponseResponse, CallWithNoContentResponseResponses, CallWithParametersData, CallWithResponseAndNoContentResponseData, CallWithResponseAndNoContentResponseResponse, CallWithResponseAndNoContentResponseResponses, CallWithResponseData, CallWithResponseResponse, CallWithResponseResponses, CallWithResponsesData, CallWithResponsesError, CallWithResponsesErrors, CallWithResponsesResponse, CallWithResponsesResponses, CallWithResultFromHeaderData, CallWithResultFromHeaderErrors, CallWithResultFromHeaderResponses, CallWithWeirdParameterNamesData, CamelCaseCommentWithBreaks, CharactersInDescription, ClientOptions, CollectionFormatData, CommentWithBackticks, CommentWithBackticksAndQuotes, CommentWithBreaks, CommentWithExpressionPlaceholders, CommentWithQuotes, CommentWithReservedCharacters, CommentWithSlashes, ComplexParamsData, ComplexParamsResponse, ComplexParamsResponses, ComplexTypesData, ComplexTypesErrors, ComplexTypesResponse, ComplexTypesResponses, CompositionBaseModel, CompositionExtendedModel, CompositionWithAllOfAndNullable, CompositionWithAnyOf, CompositionWithAnyOfAndNullable, CompositionWithAnyOfAnonymous, CompositionWithNestedAnyAndTypeNull, CompositionWithNestedAnyOfAndNull, CompositionWithOneOf, CompositionWithOneOfAndComplexArrayDictionary, CompositionWithOneOfAndNullable, CompositionWithOneOfAndProperties, CompositionWithOneOfAndSimpleArrayDictionary, CompositionWithOneOfAndSimpleDictionary, CompositionWithOneOfAnonymous, CompositionWithOneOfDiscriminator, ConstValue, Default, DeleteCallWithoutParametersAndResponseData, DeleteFooData, DeleteFooData2, DeleteFooData3, DeprecatedCallData, DeprecatedModel, DictionaryWithArray, DictionaryWithDictionary, DictionaryWithProperties, DictionaryWithPropertiesAndAdditionalProperties, DictionaryWithReference, DictionaryWithString, DummyAData, DummyAResponse, DummyAResponses, DummyBData, DummyBResponse, DummyBResponses, DuplicateName2Data, DuplicateName3Data, DuplicateName4Data, DuplicateNameData, EnumFromDescription, EnumWithExtensions, EnumWithNumbers, EnumWithReplacedCharacters, EnumWithStrings, EnumWithXEnumNames, ExportData, ExternalRefA, ExternalRefB, ExternalSharedModel, File, FileResponseData, FileResponseResponse, FileResponseResponses, FileWritable, FooWowData, FooWowResponses, FreeFormObjectWithAdditionalPropertiesEqEmptyObject, FreeFormObjectWithAdditionalPropertiesEqTrue, FreeFormObjectWithoutAdditionalProperties, GenericSchemaDuplicateIssue1SystemBoolean, GenericSchemaDuplicateIssue1SystemBooleanWritable, GenericSchemaDuplicateIssue1SystemString, GenericSchemaDuplicateIssue1SystemStringWritable, GetApiVbyApiVersionSimpleOperationData, GetApiVbyApiVersionSimpleOperationError, GetApiVbyApiVersionSimpleOperationErrors, GetApiVbyApiVersionSimpleOperationResponse, GetApiVbyApiVersionSimpleOperationResponses, GetCallWithOptionalParamData, GetCallWithoutParametersAndResponseData, HeadCallWithoutParametersAndResponseData, Import, ImportData, ImportResponse, ImportResponses, IoK8sApimachineryPkgApisMetaV1DeleteOptions, IoK8sApimachineryPkgApisMetaV1Preconditions, ModelCircle, ModelFromZendesk, ModelSquare, ModelThatExtends, ModelThatExtendsExtends, ModelWithAdditionalPropertiesEqTrue, ModelWithAdditionalPropertiesRef, ModelWithAnyOfConstantSizeArray, ModelWithAnyOfConstantSizeArrayAndIntersect, ModelWithAnyOfConstantSizeArrayNullable, ModelWithAnyOfConstantSizeArrayWithNSizeAndOptions, ModelWithAnyOfConstantSizeArrayWithNSizeAndOptionsWritable, ModelWithArray, ModelWithArrayReadOnlyAndWriteOnly, ModelWithArrayReadOnlyAndWriteOnlyWritable, ModelWithBackticksInDescription, ModelWithBoolean, ModelWithCircularReference, ModelWithConst, ModelWithConstantSizeArray, ModelWithDictionary, ModelWithDuplicateImports, ModelWithDuplicateProperties, ModelWithEnum, ModelWithEnumFromDescription, ModelWithEnumWithHyphen, ModelWithInteger, ModelWithNestedArrayEnums, ModelWithNestedArrayEnumsData, ModelWithNestedArrayEnumsDataBar, ModelWithNestedArrayEnumsDataFoo, ModelWithNestedCompositionEnums, ModelWithNestedEnums, ModelWithNestedProperties, ModelWithNullableObject, ModelWithNullableString, ModelWithNumericEnumUnion, ModelWithOneOfAndProperties, ModelWithOneOfEnum, ModelWithOrderedProperties, ModelWithPattern, ModelWithPatternWritable, ModelWithPrefixItemsConstantSizeArray, ModelWithProperties, ModelWithPropertiesWritable, ModelWithReadOnlyAndWriteOnly, ModelWithReadOnlyAndWriteOnlyWritable, ModelWithReference, ModelWithReferenceWritable, ModelWithString, ModelWithStringError, MultipartRequestData, MultipartResponseData, MultipartResponseResponse, MultipartResponseResponses, NestedAnyOfArraysNullable, NonAsciiæøåÆøÅöôêÊ字符串Data, NonAsciiæøåÆøÅöôêÊ字符串Response, NonAsciiæøåÆøÅöôêÊ字符串Responses, NonAsciiStringæøåÆøÅöôêÊ字符串, NullableObject, OneOfAllOfIssue, OneOfAllOfIssueWritable, OptionsCallWithoutParametersAndResponseData, Pageable, ParameterSimpleParameterUnused, PatchApiVbyApiVersionNoTagData, PatchApiVbyApiVersionNoTagResponses, PatchCallWithoutParametersAndResponseData, PostApiVbyApiVersionFormDataData, PostApiVbyApiVersionRequestBodyData, PostCallWithOptionalParamData, PostCallWithOptionalParamResponse, PostCallWithOptionalParamResponses, PostCallWithoutParametersAndResponseData, PostServiceWithEmptyTagResponse, PostServiceWithEmptyTagResponse2, PutCallWithoutParametersAndResponseData, PutWithFormUrlEncodedData, SchemaWithFormRestrictedKeys, SimpleBoolean, SimpleFile, SimpleFormData, SimpleInteger, SimpleParameter, SimpleReference, SimpleRequestBody, SimpleString, SimpleStringWithPattern, TestErrorCodeData, TestErrorCodeErrors, TestErrorCodeResponses, TypesData, TypesResponse, TypesResponses, UploadFileData, UploadFileResponse, UploadFileResponses, XFooBar } from './types.gen.js';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-axios/tsconfig-node16-sdk/sdk.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport { client } from './client.gen.js';\nimport { type Client, formDataBodySerializer, type Options as Options2, type TDataShape, urlSearchParamsBodySerializer } from './client/index.js';\nimport type { ApiVVersionODataControllerCountData, ApiVVersionODataControllerCountResponses, CallToTestOrderOfParamsData, CallWithDefaultOptionalParametersData, CallWithDefaultParametersData, CallWithDescriptionsData, CallWithDuplicateResponsesData, CallWithDuplicateResponsesErrors, CallWithDuplicateResponsesResponses, CallWithNoContentResponseData, CallWithNoContentResponseResponses, CallWithParametersData, CallWithResponseAndNoContentResponseData, CallWithResponseAndNoContentResponseResponses, CallWithResponseData, CallWithResponseResponses, CallWithResponsesData, CallWithResponsesErrors, CallWithResponsesResponses, CallWithResultFromHeaderData, CallWithResultFromHeaderErrors, CallWithResultFromHeaderResponses, CallWithWeirdParameterNamesData, CollectionFormatData, ComplexParamsData, ComplexParamsResponses, ComplexTypesData, ComplexTypesErrors, ComplexTypesResponses, DeleteCallWithoutParametersAndResponseData, DeleteFooData3, DeprecatedCallData, DummyAData, DummyAResponses, DummyBData, DummyBResponses, DuplicateName2Data, DuplicateName3Data, DuplicateName4Data, DuplicateNameData, ExportData, FileResponseData, FileResponseResponses, FooWowData, FooWowResponses, GetApiVbyApiVersionSimpleOperationData, GetApiVbyApiVersionSimpleOperationErrors, GetApiVbyApiVersionSimpleOperationResponses, GetCallWithOptionalParamData, GetCallWithoutParametersAndResponseData, HeadCallWithoutParametersAndResponseData, ImportData, ImportResponses, MultipartRequestData, MultipartResponseData, MultipartResponseResponses, NonAsciiæøåÆøÅöôêÊ字符串Data, NonAsciiæøåÆøÅöôêÊ字符串Responses, OptionsCallWithoutParametersAndResponseData, PatchApiVbyApiVersionNoTagData, PatchApiVbyApiVersionNoTagResponses, PatchCallWithoutParametersAndResponseData, PostApiVbyApiVersionFormDataData, PostApiVbyApiVersionRequestBodyData, PostCallWithOptionalParamData, PostCallWithOptionalParamResponses, PostCallWithoutParametersAndResponseData, PutCallWithoutParametersAndResponseData, PutWithFormUrlEncodedData, TestErrorCodeData, TestErrorCodeErrors, TestErrorCodeResponses, TypesData, TypesResponses, UploadFileData, UploadFileResponses } from './types.gen.js';\n\nexport type Options<TData extends TDataShape = TDataShape, ThrowOnError extends boolean = boolean> = Options2<TData, ThrowOnError> & {\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\nexport const export_ = <ThrowOnError extends boolean = false>(options?: Options<ExportData, ThrowOnError>) => (options?.client ?? client).get<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/no+tag', ...options });\n\nexport const patchApiVbyApiVersionNoTag = <ThrowOnError extends boolean = false>(options?: Options<PatchApiVbyApiVersionNoTagData, ThrowOnError>) => (options?.client ?? client).patch<PatchApiVbyApiVersionNoTagResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/no+tag', ...options });\n\nexport const import_ = <ThrowOnError extends boolean = false>(options: Options<ImportData, ThrowOnError>) => (options.client ?? client).post<ImportResponses, unknown, ThrowOnError>({\n    responseType: 'json',\n    url: '/api/v{api-version}/no+tag',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options.headers\n    }\n});\n\nexport const fooWow = <ThrowOnError extends boolean = false>(options?: Options<FooWowData, ThrowOnError>) => (options?.client ?? client).put<FooWowResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/no+tag', ...options });\n\nexport const apiVVersionODataControllerCount = <ThrowOnError extends boolean = false>(options?: Options<ApiVVersionODataControllerCountData, ThrowOnError>) => (options?.client ?? client).get<ApiVVersionODataControllerCountResponses, unknown, ThrowOnError>({\n    responseType: 'json',\n    url: '/api/v{api-version}/simple/$count',\n    ...options\n});\n\nexport const getApiVbyApiVersionSimpleOperation = <ThrowOnError extends boolean = false>(options: Options<GetApiVbyApiVersionSimpleOperationData, ThrowOnError>) => (options.client ?? client).get<GetApiVbyApiVersionSimpleOperationResponses, GetApiVbyApiVersionSimpleOperationErrors, ThrowOnError>({\n    responseType: 'json',\n    url: '/api/v{api-version}/simple:operation',\n    ...options\n});\n\nexport const deleteCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<DeleteCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).delete<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const getCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<GetCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).get<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const headCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<HeadCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).head<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const optionsCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<OptionsCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).options<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const patchCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<PatchCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).patch<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const postCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<PostCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).post<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const putCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<PutCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).put<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const deleteFoo = <ThrowOnError extends boolean = false>(options: Options<DeleteFooData3, ThrowOnError>) => (options.client ?? client).delete<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/foo/{foo_param}/bar/{BarParam}', ...options });\n\nexport const callWithDescriptions = <ThrowOnError extends boolean = false>(options?: Options<CallWithDescriptionsData, ThrowOnError>) => (options?.client ?? client).post<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/descriptions', ...options });\n\n/**\n * @deprecated\n */\nexport const deprecatedCall = <ThrowOnError extends boolean = false>(options: Options<DeprecatedCallData, ThrowOnError>) => (options.client ?? client).post<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/parameters/deprecated', ...options });\n\nexport const callWithParameters = <ThrowOnError extends boolean = false>(options: Options<CallWithParametersData, ThrowOnError>) => (options.client ?? client).post<unknown, unknown, ThrowOnError>({\n    url: '/api/v{api-version}/parameters/{parameterPath}',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options.headers\n    }\n});\n\nexport const callWithWeirdParameterNames = <ThrowOnError extends boolean = false>(options: Options<CallWithWeirdParameterNamesData, ThrowOnError>) => (options.client ?? client).post<unknown, unknown, ThrowOnError>({\n    url: '/api/v{api-version}/parameters/{parameter.path.1}/{parameter-path-2}/{PARAMETER-PATH-3}',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options.headers\n    }\n});\n\nexport const getCallWithOptionalParam = <ThrowOnError extends boolean = false>(options: Options<GetCallWithOptionalParamData, ThrowOnError>) => (options.client ?? client).get<unknown, unknown, ThrowOnError>({\n    url: '/api/v{api-version}/parameters',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options.headers\n    }\n});\n\nexport const postCallWithOptionalParam = <ThrowOnError extends boolean = false>(options: Options<PostCallWithOptionalParamData, ThrowOnError>) => (options.client ?? client).post<PostCallWithOptionalParamResponses, unknown, ThrowOnError>({\n    responseType: 'json',\n    url: '/api/v{api-version}/parameters',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options.headers\n    }\n});\n\nexport const postApiVbyApiVersionRequestBody = <ThrowOnError extends boolean = false>(options?: Options<PostApiVbyApiVersionRequestBodyData, ThrowOnError>) => (options?.client ?? client).post<unknown, unknown, ThrowOnError>({\n    url: '/api/v{api-version}/requestBody',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options?.headers\n    }\n});\n\nexport const postApiVbyApiVersionFormData = <ThrowOnError extends boolean = false>(options?: Options<PostApiVbyApiVersionFormDataData, ThrowOnError>) => (options?.client ?? client).post<unknown, unknown, ThrowOnError>({\n    ...formDataBodySerializer,\n    url: '/api/v{api-version}/formData',\n    ...options,\n    headers: {\n        'Content-Type': null,\n        ...options?.headers\n    }\n});\n\nexport const callWithDefaultParameters = <ThrowOnError extends boolean = false>(options?: Options<CallWithDefaultParametersData, ThrowOnError>) => (options?.client ?? client).get<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/defaults', ...options });\n\nexport const callWithDefaultOptionalParameters = <ThrowOnError extends boolean = false>(options?: Options<CallWithDefaultOptionalParametersData, ThrowOnError>) => (options?.client ?? client).post<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/defaults', ...options });\n\nexport const callToTestOrderOfParams = <ThrowOnError extends boolean = false>(options: Options<CallToTestOrderOfParamsData, ThrowOnError>) => (options.client ?? client).put<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/defaults', ...options });\n\nexport const duplicateName = <ThrowOnError extends boolean = false>(options?: Options<DuplicateNameData, ThrowOnError>) => (options?.client ?? client).delete<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/duplicate', ...options });\n\nexport const duplicateName2 = <ThrowOnError extends boolean = false>(options?: Options<DuplicateName2Data, ThrowOnError>) => (options?.client ?? client).get<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/duplicate', ...options });\n\nexport const duplicateName3 = <ThrowOnError extends boolean = false>(options?: Options<DuplicateName3Data, ThrowOnError>) => (options?.client ?? client).post<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/duplicate', ...options });\n\nexport const duplicateName4 = <ThrowOnError extends boolean = false>(options?: Options<DuplicateName4Data, ThrowOnError>) => (options?.client ?? client).put<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/duplicate', ...options });\n\nexport const callWithNoContentResponse = <ThrowOnError extends boolean = false>(options?: Options<CallWithNoContentResponseData, ThrowOnError>) => (options?.client ?? client).get<CallWithNoContentResponseResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/no-content', ...options });\n\nexport const callWithResponseAndNoContentResponse = <ThrowOnError extends boolean = false>(options?: Options<CallWithResponseAndNoContentResponseData, ThrowOnError>) => (options?.client ?? client).get<CallWithResponseAndNoContentResponseResponses, unknown, ThrowOnError>({\n    responseType: 'json',\n    url: '/api/v{api-version}/multiple-tags/response-and-no-content',\n    ...options\n});\n\nexport const dummyA = <ThrowOnError extends boolean = false>(options?: Options<DummyAData, ThrowOnError>) => (options?.client ?? client).get<DummyAResponses, unknown, ThrowOnError>({\n    responseType: 'json',\n    url: '/api/v{api-version}/multiple-tags/a',\n    ...options\n});\n\nexport const dummyB = <ThrowOnError extends boolean = false>(options?: Options<DummyBData, ThrowOnError>) => (options?.client ?? client).get<DummyBResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/multiple-tags/b', ...options });\n\nexport const callWithResponse = <ThrowOnError extends boolean = false>(options?: Options<CallWithResponseData, ThrowOnError>) => (options?.client ?? client).get<CallWithResponseResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/response', ...options });\n\nexport const callWithDuplicateResponses = <ThrowOnError extends boolean = false>(options?: Options<CallWithDuplicateResponsesData, ThrowOnError>) => (options?.client ?? client).post<CallWithDuplicateResponsesResponses, CallWithDuplicateResponsesErrors, ThrowOnError>({\n    responseType: 'json',\n    url: '/api/v{api-version}/response',\n    ...options\n});\n\nexport const callWithResponses = <ThrowOnError extends boolean = false>(options?: Options<CallWithResponsesData, ThrowOnError>) => (options?.client ?? client).put<CallWithResponsesResponses, CallWithResponsesErrors, ThrowOnError>({\n    responseType: 'json',\n    url: '/api/v{api-version}/response',\n    ...options\n});\n\nexport const collectionFormat = <ThrowOnError extends boolean = false>(options: Options<CollectionFormatData, ThrowOnError>) => (options.client ?? client).get<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/collectionFormat', ...options });\n\nexport const types = <ThrowOnError extends boolean = false>(options: Options<TypesData, ThrowOnError>) => (options.client ?? client).get<TypesResponses, unknown, ThrowOnError>({\n    responseType: 'json',\n    url: '/api/v{api-version}/types',\n    ...options\n});\n\nexport const uploadFile = <ThrowOnError extends boolean = false>(options: Options<UploadFileData, ThrowOnError>) => (options.client ?? client).post<UploadFileResponses, unknown, ThrowOnError>({\n    ...urlSearchParamsBodySerializer,\n    responseType: 'json',\n    url: '/api/v{api-version}/upload',\n    ...options,\n    headers: {\n        'Content-Type': 'application/x-www-form-urlencoded',\n        ...options.headers\n    }\n});\n\nexport const fileResponse = <ThrowOnError extends boolean = false>(options: Options<FileResponseData, ThrowOnError>) => (options.client ?? client).get<FileResponseResponses, unknown, ThrowOnError>({\n    responseType: 'blob',\n    url: '/api/v{api-version}/file/{id}',\n    ...options\n});\n\nexport const complexTypes = <ThrowOnError extends boolean = false>(options: Options<ComplexTypesData, ThrowOnError>) => (options.client ?? client).get<ComplexTypesResponses, ComplexTypesErrors, ThrowOnError>({\n    querySerializer: { parameters: { parameterObject: { object: { style: 'form' } } } },\n    responseType: 'json',\n    url: '/api/v{api-version}/complex',\n    ...options\n});\n\nexport const multipartResponse = <ThrowOnError extends boolean = false>(options?: Options<MultipartResponseData, ThrowOnError>) => (options?.client ?? client).get<MultipartResponseResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/multipart', ...options });\n\nexport const multipartRequest = <ThrowOnError extends boolean = false>(options?: Options<MultipartRequestData, ThrowOnError>) => (options?.client ?? client).post<unknown, unknown, ThrowOnError>({\n    ...formDataBodySerializer,\n    url: '/api/v{api-version}/multipart',\n    ...options,\n    headers: {\n        'Content-Type': null,\n        ...options?.headers\n    }\n});\n\nexport const complexParams = <ThrowOnError extends boolean = false>(options: Options<ComplexParamsData, ThrowOnError>) => (options.client ?? client).put<ComplexParamsResponses, unknown, ThrowOnError>({\n    responseType: 'json',\n    url: '/api/v{api-version}/complex/{id}',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json-patch+json',\n        ...options.headers\n    }\n});\n\nexport const callWithResultFromHeader = <ThrowOnError extends boolean = false>(options?: Options<CallWithResultFromHeaderData, ThrowOnError>) => (options?.client ?? client).post<CallWithResultFromHeaderResponses, CallWithResultFromHeaderErrors, ThrowOnError>({ url: '/api/v{api-version}/header', ...options });\n\nexport const testErrorCode = <ThrowOnError extends boolean = false>(options: Options<TestErrorCodeData, ThrowOnError>) => (options.client ?? client).post<TestErrorCodeResponses, TestErrorCodeErrors, ThrowOnError>({ url: '/api/v{api-version}/error', ...options });\n\nexport const nonAsciiæøåÆøÅöôêÊ字符串 = <ThrowOnError extends boolean = false>(options: Options<NonAsciiæøåÆøÅöôêÊ字符串Data, ThrowOnError>) => (options.client ?? client).post<NonAsciiæøåÆøÅöôêÊ字符串Responses, unknown, ThrowOnError>({\n    responseType: 'json',\n    url: '/api/v{api-version}/non-ascii-æøåÆØÅöôêÊ字符串',\n    ...options\n});\n\n/**\n * Login User\n */\nexport const putWithFormUrlEncoded = <ThrowOnError extends boolean = false>(options: Options<PutWithFormUrlEncodedData, ThrowOnError>) => (options.client ?? client).put<unknown, unknown, ThrowOnError>({\n    ...urlSearchParamsBodySerializer,\n    url: '/api/v{api-version}/non-ascii-æøåÆØÅöôêÊ字符串',\n    ...options,\n    headers: {\n        'Content-Type': 'application/x-www-form-urlencoded',\n        ...options.headers\n    }\n});\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-axios/tsconfig-node16-sdk/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type ClientOptions = {\n    baseURL: 'http://localhost:3000/base' | (string & {});\n};\n\n/**\n * Model with number-only name\n */\nexport type _400 = string;\n\n/**\n * External ref to shared model (A)\n */\nexport type ExternalRefA = ExternalSharedModel;\n\n/**\n * External ref to shared model (B)\n */\nexport type ExternalRefB = ExternalSharedModel;\n\n/**\n * Testing multiline comments in string: First line\n * Second line\n *\n * Fourth line\n */\nexport type CamelCaseCommentWithBreaks = number;\n\n/**\n * Testing multiline comments in string: First line\n * Second line\n *\n * Fourth line\n */\nexport type CommentWithBreaks = number;\n\n/**\n * Testing backticks in string: `backticks` and ```multiple backticks``` should work\n */\nexport type CommentWithBackticks = number;\n\n/**\n * Testing backticks and quotes in string: `backticks`, 'quotes', \"double quotes\" and ```multiple backticks``` should work\n */\nexport type CommentWithBackticksAndQuotes = number;\n\n/**\n * Testing slashes in string: \\backwards\\\\\\ and /forwards/// should work\n */\nexport type CommentWithSlashes = number;\n\n/**\n * Testing expression placeholders in string: ${expression} should work\n */\nexport type CommentWithExpressionPlaceholders = number;\n\n/**\n * Testing quotes in string: 'single quote''' and \"double quotes\"\"\" should work\n */\nexport type CommentWithQuotes = number;\n\n/**\n * Testing reserved characters in string: * inline * and ** inline ** should work\n */\nexport type CommentWithReservedCharacters = number;\n\n/**\n * This is a simple number\n */\nexport type SimpleInteger = number;\n\n/**\n * This is a simple boolean\n */\nexport type SimpleBoolean = boolean;\n\n/**\n * This is a simple string\n */\nexport type SimpleString = string;\n\n/**\n * A string with non-ascii (unicode) characters valid in typescript identifiers (æøåÆØÅöÔèÈ字符串)\n */\nexport type NonAsciiStringæøåÆøÅöôêÊ字符串 = string;\n\n/**\n * This is a simple file\n */\nexport type SimpleFile = Blob | File;\n\n/**\n * This is a simple reference\n */\nexport type SimpleReference = ModelWithString;\n\n/**\n * This is a simple string\n */\nexport type SimpleStringWithPattern = string | null;\n\n/**\n * This is a simple enum with strings\n */\nexport type EnumWithStrings = 'Success' | 'Warning' | 'Error' | '\\'Single Quote\\'' | '\"Double Quotes\"' | 'Non-ascii: øæåôöØÆÅÔÖ字符串';\n\nexport type EnumWithReplacedCharacters = '\\'Single Quote\\'' | '\"Double Quotes\"' | 'øæåôöØÆÅÔÖ字符串' | 3.1 | '';\n\n/**\n * This is a simple enum with numbers\n */\nexport type EnumWithNumbers = 1 | 2 | 3 | 1.1 | 1.2 | 1.3 | 100 | 200 | 300 | -100 | -200 | -300 | -1.1 | -1.2 | -1.3;\n\n/**\n * Success=1,Warning=2,Error=3\n */\nexport type EnumFromDescription = number;\n\n/**\n * This is a simple enum with numbers\n */\nexport type EnumWithExtensions = 200 | 400 | 500;\n\nexport type EnumWithXEnumNames = 0 | 1 | 2;\n\n/**\n * This is a simple array with numbers\n */\nexport type ArrayWithNumbers = Array<number>;\n\n/**\n * This is a simple array with booleans\n */\nexport type ArrayWithBooleans = Array<boolean>;\n\n/**\n * This is a simple array with strings\n */\nexport type ArrayWithStrings = Array<string>;\n\n/**\n * This is a simple array with references\n */\nexport type ArrayWithReferences = Array<ModelWithString>;\n\n/**\n * This is a simple array containing an array\n */\nexport type ArrayWithArray = Array<Array<ModelWithString>>;\n\n/**\n * This is a simple array with properties\n */\nexport type ArrayWithProperties = Array<{\n    '16x16'?: CamelCaseCommentWithBreaks;\n    bar?: string;\n}>;\n\n/**\n * This is a simple array with any of properties\n */\nexport type ArrayWithAnyOfProperties = Array<{\n    foo?: string;\n} | {\n    bar?: string;\n}>;\n\nexport type AnyOfAnyAndNull = {\n    data?: unknown | null;\n};\n\n/**\n * This is a simple array with any of properties\n */\nexport type AnyOfArrays = {\n    results?: Array<{\n        foo?: string;\n    } | {\n        bar?: string;\n    }>;\n};\n\n/**\n * This is a string dictionary\n */\nexport type DictionaryWithString = {\n    [key: string]: string;\n};\n\nexport type DictionaryWithPropertiesAndAdditionalProperties = {\n    foo?: number;\n    bar?: boolean;\n    [key: string]: string | number | boolean | undefined;\n};\n\n/**\n * This is a string reference\n */\nexport type DictionaryWithReference = {\n    [key: string]: ModelWithString;\n};\n\n/**\n * This is a complex dictionary\n */\nexport type DictionaryWithArray = {\n    [key: string]: Array<ModelWithString>;\n};\n\n/**\n * This is a string dictionary\n */\nexport type DictionaryWithDictionary = {\n    [key: string]: {\n        [key: string]: string;\n    };\n};\n\n/**\n * This is a complex dictionary\n */\nexport type DictionaryWithProperties = {\n    [key: string]: {\n        foo?: string;\n        bar?: string;\n    };\n};\n\n/**\n * This is a model with one number property\n */\nexport type ModelWithInteger = {\n    /**\n     * This is a simple number property\n     */\n    prop?: number;\n};\n\n/**\n * This is a model with one boolean property\n */\nexport type ModelWithBoolean = {\n    /**\n     * This is a simple boolean property\n     */\n    prop?: boolean;\n};\n\n/**\n * This is a model with one string property\n */\nexport type ModelWithString = {\n    /**\n     * This is a simple string property\n     */\n    prop?: string;\n};\n\n/**\n * This is a model with one string property\n */\nexport type ModelWithStringError = {\n    /**\n     * This is a simple string property\n     */\n    prop?: string;\n};\n\n/**\n * `Comment` or `VoiceComment`. The JSON object for adding voice comments to tickets is different. See [Adding voice comments to tickets](/documentation/ticketing/managing-tickets/adding-voice-comments-to-tickets)\n */\nexport type ModelFromZendesk = string;\n\n/**\n * This is a model with one string property\n */\nexport type ModelWithNullableString = {\n    /**\n     * This is a simple string property\n     */\n    nullableProp1?: string | null;\n    /**\n     * This is a simple string property\n     */\n    nullableRequiredProp1: string | null;\n    /**\n     * This is a simple string property\n     */\n    nullableProp2?: string | null;\n    /**\n     * This is a simple string property\n     */\n    nullableRequiredProp2: string | null;\n    /**\n     * This is a simple enum with strings\n     */\n    'foo_bar-enum'?: 'Success' | 'Warning' | 'Error' | 'ØÆÅ字符串';\n};\n\n/**\n * This is a model with one enum\n */\nexport type ModelWithEnum = {\n    /**\n     * This is a simple enum with strings\n     */\n    'foo_bar-enum'?: 'Success' | 'Warning' | 'Error' | 'ØÆÅ字符串';\n    /**\n     * These are the HTTP error code enums\n     */\n    statusCode?: '100' | '200 FOO' | '300 FOO_BAR' | '400 foo-bar' | '500 foo.bar' | '600 foo&bar';\n    /**\n     * Simple boolean enum\n     */\n    bool?: true;\n};\n\n/**\n * This is a model with one enum with escaped name\n */\nexport type ModelWithEnumWithHyphen = {\n    /**\n     * Foo-Bar-Baz-Qux\n     */\n    'foo-bar-baz-qux'?: '3.0';\n};\n\n/**\n * This is a model with one enum\n */\nexport type ModelWithEnumFromDescription = {\n    /**\n     * Success=1,Warning=2,Error=3\n     */\n    test?: number;\n};\n\n/**\n * This is a model with nested enums\n */\nexport type ModelWithNestedEnums = {\n    dictionaryWithEnum?: {\n        [key: string]: 'Success' | 'Warning' | 'Error';\n    };\n    dictionaryWithEnumFromDescription?: {\n        [key: string]: number;\n    };\n    arrayWithEnum?: Array<'Success' | 'Warning' | 'Error'>;\n    arrayWithDescription?: Array<number>;\n    /**\n     * This is a simple enum with strings\n     */\n    'foo_bar-enum'?: 'Success' | 'Warning' | 'Error' | 'ØÆÅ字符串';\n};\n\n/**\n * This is a model with one property containing a reference\n */\nexport type ModelWithReference = {\n    prop?: ModelWithProperties;\n};\n\n/**\n * This is a model with one property containing an array\n */\nexport type ModelWithArrayReadOnlyAndWriteOnly = {\n    prop?: Array<ModelWithReadOnlyAndWriteOnly>;\n    propWithFile?: Array<Blob | File>;\n    propWithNumber?: Array<number>;\n};\n\n/**\n * This is a model with one property containing an array\n */\nexport type ModelWithArray = {\n    prop?: Array<ModelWithString>;\n    propWithFile?: Array<Blob | File>;\n    propWithNumber?: Array<number>;\n};\n\n/**\n * This is a model with one property containing a dictionary\n */\nexport type ModelWithDictionary = {\n    prop?: {\n        [key: string]: string;\n    };\n};\n\n/**\n * This is a deprecated model with a deprecated property\n *\n * @deprecated\n */\nexport type DeprecatedModel = {\n    /**\n     * This is a deprecated property\n     *\n     * @deprecated\n     */\n    prop?: string;\n};\n\n/**\n * This is a model with one property containing a circular reference\n */\nexport type ModelWithCircularReference = {\n    prop?: ModelWithCircularReference;\n};\n\n/**\n * This is a model with one property with a 'one of' relationship\n */\nexport type CompositionWithOneOf = {\n    propA?: ModelWithString | ModelWithEnum | ModelWithArray | ModelWithDictionary;\n};\n\n/**\n * This is a model with one property with a 'one of' relationship where the options are not $ref\n */\nexport type CompositionWithOneOfAnonymous = {\n    propA?: {\n        propA?: string;\n    } | string | number;\n};\n\n/**\n * Circle\n */\nexport type ModelCircle = {\n    kind: string;\n    radius?: number;\n};\n\n/**\n * Square\n */\nexport type ModelSquare = {\n    kind: string;\n    sideLength?: number;\n};\n\n/**\n * This is a model with one property with a 'one of' relationship where the options are not $ref\n */\nexport type CompositionWithOneOfDiscriminator = ({\n    kind: 'circle';\n} & ModelCircle) | ({\n    kind: 'square';\n} & ModelSquare);\n\n/**\n * This is a model with one property with a 'any of' relationship\n */\nexport type CompositionWithAnyOf = {\n    propA?: ModelWithString | ModelWithEnum | ModelWithArray | ModelWithDictionary;\n};\n\n/**\n * This is a model with one property with a 'any of' relationship where the options are not $ref\n */\nexport type CompositionWithAnyOfAnonymous = {\n    propA?: {\n        propA?: string;\n    } | string | number;\n};\n\n/**\n * This is a model with nested 'any of' property with a type null\n */\nexport type CompositionWithNestedAnyAndTypeNull = {\n    propA?: Array<ModelWithDictionary | null> | Array<ModelWithArray | null>;\n};\n\nexport type _3eNum1Период = 'Bird' | 'Dog';\n\nexport type ConstValue = 'ConstValue';\n\n/**\n * This is a model with one property with a 'any of' relationship where the options are not $ref\n */\nexport type CompositionWithNestedAnyOfAndNull = {\n    /**\n     * Scopes\n     */\n    propA?: Array<_3eNum1Период | ConstValue> | null;\n};\n\n/**\n * This is a model with one property with a 'one of' relationship\n */\nexport type CompositionWithOneOfAndNullable = {\n    propA?: {\n        boolean?: boolean;\n    } | ModelWithEnum | ModelWithArray | ModelWithDictionary | null;\n};\n\n/**\n * This is a model that contains a simple dictionary within composition\n */\nexport type CompositionWithOneOfAndSimpleDictionary = {\n    propA?: boolean | {\n        [key: string]: number;\n    };\n};\n\n/**\n * This is a model that contains a dictionary of simple arrays within composition\n */\nexport type CompositionWithOneOfAndSimpleArrayDictionary = {\n    propA?: boolean | {\n        [key: string]: Array<boolean>;\n    };\n};\n\n/**\n * This is a model that contains a dictionary of complex arrays (composited) within composition\n */\nexport type CompositionWithOneOfAndComplexArrayDictionary = {\n    propA?: boolean | {\n        [key: string]: Array<number | string>;\n    };\n};\n\n/**\n * This is a model with one property with a 'all of' relationship\n */\nexport type CompositionWithAllOfAndNullable = {\n    propA?: ({\n        boolean?: boolean;\n    } & ModelWithEnum & ModelWithArray & ModelWithDictionary) | null;\n};\n\n/**\n * This is a model with one property with a 'any of' relationship\n */\nexport type CompositionWithAnyOfAndNullable = {\n    propA?: {\n        boolean?: boolean;\n    } | ModelWithEnum | ModelWithArray | ModelWithDictionary | null;\n};\n\n/**\n * This is a base model with two simple optional properties\n */\nexport type CompositionBaseModel = {\n    firstName?: string;\n    lastname?: string;\n};\n\n/**\n * This is a model that extends the base model\n */\nexport type CompositionExtendedModel = CompositionBaseModel & {\n    age: number;\n    firstName: string;\n    lastname: string;\n};\n\n/**\n * This is a model with one nested property\n */\nexport type ModelWithProperties = {\n    required: string;\n    readonly requiredAndReadOnly: string;\n    requiredAndNullable: string | null;\n    string?: string;\n    number?: number;\n    boolean?: boolean;\n    reference?: ModelWithString;\n    'property with space'?: string;\n    default?: string;\n    try?: string;\n    readonly '@namespace.string'?: string;\n    readonly '@namespace.integer'?: number;\n};\n\n/**\n * This is a model with one nested property\n */\nexport type ModelWithNestedProperties = {\n    readonly first: {\n        readonly second: {\n            readonly third: string | null;\n        } | null;\n    } | null;\n};\n\n/**\n * This is a model with duplicated properties\n */\nexport type ModelWithDuplicateProperties = {\n    prop?: ModelWithString;\n};\n\n/**\n * This is a model with ordered properties\n */\nexport type ModelWithOrderedProperties = {\n    zebra?: string;\n    apple?: string;\n    hawaii?: string;\n};\n\n/**\n * This is a model with duplicated imports\n */\nexport type ModelWithDuplicateImports = {\n    propA?: ModelWithString;\n    propB?: ModelWithString;\n    propC?: ModelWithString;\n};\n\n/**\n * This is a model that extends another model\n */\nexport type ModelThatExtends = ModelWithString & {\n    propExtendsA?: string;\n    propExtendsB?: ModelWithString;\n};\n\n/**\n * This is a model that extends another model\n */\nexport type ModelThatExtendsExtends = ModelWithString & ModelThatExtends & {\n    propExtendsC?: string;\n    propExtendsD?: ModelWithString;\n};\n\n/**\n * This is a model that contains a some patterns\n */\nexport type ModelWithPattern = {\n    key: string;\n    name: string;\n    readonly enabled?: boolean;\n    readonly modified?: string;\n    id?: string;\n    text?: string;\n    patternWithSingleQuotes?: string;\n    patternWithNewline?: string;\n    patternWithBacktick?: string;\n    patternWithUnicode?: string;\n};\n\nexport type File = {\n    /**\n     * Id\n     */\n    readonly id?: string;\n    /**\n     * Updated at\n     */\n    readonly updated_at?: string;\n    /**\n     * Created at\n     */\n    readonly created_at?: string;\n    /**\n     * Mime\n     */\n    mime: string;\n    /**\n     * File\n     */\n    readonly file?: string;\n};\n\nexport type Default = {\n    name?: string;\n};\n\nexport type Pageable = {\n    page?: number;\n    size?: number;\n    sort?: Array<string>;\n};\n\n/**\n * This is a free-form object without additionalProperties.\n */\nexport type FreeFormObjectWithoutAdditionalProperties = {\n    [key: string]: unknown;\n};\n\n/**\n * This is a free-form object with additionalProperties: true.\n */\nexport type FreeFormObjectWithAdditionalPropertiesEqTrue = {\n    [key: string]: unknown;\n};\n\n/**\n * This is a free-form object with additionalProperties: {}.\n */\nexport type FreeFormObjectWithAdditionalPropertiesEqEmptyObject = {\n    [key: string]: unknown;\n};\n\nexport type ModelWithConst = {\n    String?: 'String';\n    number?: 0;\n    null?: null;\n    withType?: 'Some string';\n};\n\n/**\n * This is a model with one property and additionalProperties: true\n */\nexport type ModelWithAdditionalPropertiesEqTrue = {\n    /**\n     * This is a simple string property\n     */\n    prop?: string;\n    [key: string]: unknown;\n};\n\nexport type NestedAnyOfArraysNullable = {\n    nullableArray?: Array<string | boolean> | null;\n};\n\nexport type CompositionWithOneOfAndProperties = ({\n    foo: SimpleParameter;\n} | {\n    bar: NonAsciiStringæøåÆøÅöôêÊ字符串;\n}) & {\n    baz: number | null;\n    qux: number;\n};\n\n/**\n * An object that can be null\n */\nexport type NullableObject = {\n    foo?: string;\n} | null;\n\n/**\n * Some % character\n */\nexport type CharactersInDescription = string;\n\nexport type ModelWithNullableObject = {\n    data?: NullableObject;\n};\n\n/**\n * An object with additional properties that can be null (anyOf ref + null)\n */\nexport type ModelWithAdditionalPropertiesRef = {\n    [key: string]: NullableObject | null;\n};\n\nexport type ModelWithOneOfEnum = {\n    foo: 'Bar';\n} | {\n    foo: 'Baz';\n} | {\n    foo: 'Qux';\n} | {\n    content: string;\n    foo: 'Quux';\n} | {\n    content: [\n        string,\n        string\n    ];\n    foo: 'Corge';\n};\n\nexport type ModelWithNestedArrayEnumsDataFoo = 'foo' | 'bar';\n\nexport type ModelWithNestedArrayEnumsDataBar = 'baz' | 'qux';\n\nexport type ModelWithNestedArrayEnumsData = {\n    foo?: Array<ModelWithNestedArrayEnumsDataFoo>;\n    bar?: Array<ModelWithNestedArrayEnumsDataBar>;\n};\n\nexport type ModelWithNestedArrayEnums = {\n    array_strings?: Array<string>;\n    data?: ModelWithNestedArrayEnumsData;\n};\n\nexport type ModelWithNestedCompositionEnums = {\n    foo?: ModelWithNestedArrayEnumsDataFoo;\n};\n\nexport type ModelWithReadOnlyAndWriteOnly = {\n    foo: string;\n    readonly bar: string;\n};\n\nexport type ModelWithConstantSizeArray = [\n    number,\n    number\n];\n\nexport type ModelWithAnyOfConstantSizeArray = [\n    number | string,\n    number | string,\n    number | string\n];\n\nexport type ModelWithPrefixItemsConstantSizeArray = [\n    ModelWithInteger,\n    number | string,\n    string\n];\n\nexport type ModelWithAnyOfConstantSizeArrayNullable = [\n    number | null | string,\n    number | null | string,\n    number | null | string\n];\n\nexport type ModelWithAnyOfConstantSizeArrayWithNSizeAndOptions = [\n    number | Import,\n    number | Import\n];\n\nexport type ModelWithAnyOfConstantSizeArrayAndIntersect = [\n    number & string,\n    number & string\n];\n\nexport type ModelWithNumericEnumUnion = {\n    /**\n     * Период\n     */\n    value?: -10 | -1 | 0 | 1 | 3 | 6 | 12;\n};\n\n/**\n * Some description with `back ticks`\n */\nexport type ModelWithBackticksInDescription = {\n    /**\n     * The template `that` should be used for parsing and importing the contents of the CSV file.\n     *\n     * <br/><p>There is one placeholder currently supported:<ul>     <li><b>${x}</b> - refers to the n-th column in the CSV file, e.g. ${1}, ${2}, ...)</li></ul><p>Example of a correct JSON template:</p>\n     * <pre>\n     * [\n     * {\n     * \"resourceType\": \"Asset\",\n     * \"identifier\": {\n     * \"name\": \"${1}\",\n     * \"domain\": {\n     * \"name\": \"${2}\",\n     * \"community\": {\n     * \"name\": \"Some Community\"\n     * }\n     * }\n     * },\n     * \"attributes\" : {\n     * \"00000000-0000-0000-0000-000000003115\" : [ {\n     * \"value\" : \"${3}\"\n     * } ],\n     * \"00000000-0000-0000-0000-000000000222\" : [ {\n     * \"value\" : \"${4}\"\n     * } ]\n     * }\n     * }\n     * ]\n     * </pre>\n     */\n    template?: string;\n};\n\nexport type ModelWithOneOfAndProperties = (SimpleParameter | NonAsciiStringæøåÆøÅöôêÊ字符串) & {\n    baz: number | null;\n    qux: number;\n};\n\n/**\n * Model used to test deduplication strategy (unused)\n */\nexport type ParameterSimpleParameterUnused = string;\n\n/**\n * Model used to test deduplication strategy\n */\nexport type PostServiceWithEmptyTagResponse = string;\n\n/**\n * Model used to test deduplication strategy\n */\nexport type PostServiceWithEmptyTagResponse2 = string;\n\n/**\n * Model used to test deduplication strategy\n */\nexport type DeleteFooData = string;\n\n/**\n * Model used to test deduplication strategy\n */\nexport type DeleteFooData2 = string;\n\n/**\n * Model with restricted keyword name\n */\nexport type Import = string;\n\nexport type SchemaWithFormRestrictedKeys = {\n    description?: string;\n    'x-enum-descriptions'?: string;\n    'x-enum-varnames'?: string;\n    'x-enumNames'?: string;\n    title?: string;\n    object?: {\n        description?: string;\n        'x-enum-descriptions'?: string;\n        'x-enum-varnames'?: string;\n        'x-enumNames'?: string;\n        title?: string;\n    };\n    array?: Array<{\n        description?: string;\n        'x-enum-descriptions'?: string;\n        'x-enum-varnames'?: string;\n        'x-enumNames'?: string;\n        title?: string;\n    }>;\n};\n\n/**\n * This schema was giving PascalCase transformations a hard time\n */\nexport type IoK8sApimachineryPkgApisMetaV1DeleteOptions = {\n    /**\n     * Must be fulfilled before a deletion is carried out. If not possible, a 409 Conflict status will be returned.\n     */\n    preconditions?: IoK8sApimachineryPkgApisMetaV1Preconditions;\n};\n\n/**\n * This schema was giving PascalCase transformations a hard time\n */\nexport type IoK8sApimachineryPkgApisMetaV1Preconditions = {\n    /**\n     * Specifies the target ResourceVersion\n     */\n    resourceVersion?: string;\n    /**\n     * Specifies the target UID.\n     */\n    uid?: string;\n};\n\nexport type AdditionalPropertiesUnknownIssue = {\n    [key: string]: string | number;\n};\n\nexport type AdditionalPropertiesUnknownIssue2 = {\n    [key: string]: string | number;\n};\n\nexport type AdditionalPropertiesUnknownIssue3 = string & {\n    entries: {\n        [key: string]: AdditionalPropertiesUnknownIssue;\n    };\n};\n\nexport type AdditionalPropertiesIntegerIssue = {\n    value: number;\n    [key: string]: number;\n};\n\nexport type OneOfAllOfIssue = ((ConstValue | GenericSchemaDuplicateIssue1SystemBoolean) & _3eNum1Период) | GenericSchemaDuplicateIssue1SystemString;\n\nexport type GenericSchemaDuplicateIssue1SystemBoolean = {\n    item?: boolean;\n    error?: string | null;\n    readonly hasError?: boolean;\n    data?: {\n        [key: string]: never;\n    };\n};\n\nexport type GenericSchemaDuplicateIssue1SystemString = {\n    item?: string | null;\n    error?: string | null;\n    readonly hasError?: boolean;\n};\n\nexport type ExternalSharedModel = {\n    id: string;\n    name?: string;\n};\n\n/**\n * This is a model with one property containing a reference\n */\nexport type ModelWithReferenceWritable = {\n    prop?: ModelWithPropertiesWritable;\n};\n\n/**\n * This is a model with one property containing an array\n */\nexport type ModelWithArrayReadOnlyAndWriteOnlyWritable = {\n    prop?: Array<ModelWithReadOnlyAndWriteOnlyWritable>;\n    propWithFile?: Array<Blob | File>;\n    propWithNumber?: Array<number>;\n};\n\n/**\n * This is a model with one nested property\n */\nexport type ModelWithPropertiesWritable = {\n    required: string;\n    requiredAndNullable: string | null;\n    string?: string;\n    number?: number;\n    boolean?: boolean;\n    reference?: ModelWithString;\n    'property with space'?: string;\n    default?: string;\n    try?: string;\n};\n\n/**\n * This is a model that contains a some patterns\n */\nexport type ModelWithPatternWritable = {\n    key: string;\n    name: string;\n    id?: string;\n    text?: string;\n    patternWithSingleQuotes?: string;\n    patternWithNewline?: string;\n    patternWithBacktick?: string;\n    patternWithUnicode?: string;\n};\n\nexport type FileWritable = {\n    /**\n     * Mime\n     */\n    mime: string;\n};\n\nexport type ModelWithReadOnlyAndWriteOnlyWritable = {\n    foo: string;\n    baz: string;\n};\n\nexport type ModelWithAnyOfConstantSizeArrayWithNSizeAndOptionsWritable = [\n    number | Import,\n    number | Import\n];\n\nexport type AdditionalPropertiesUnknownIssueWritable = {\n    [key: string]: string | number;\n};\n\nexport type OneOfAllOfIssueWritable = ((ConstValue | GenericSchemaDuplicateIssue1SystemBoolean) & _3eNum1Период) | GenericSchemaDuplicateIssue1SystemString;\n\nexport type GenericSchemaDuplicateIssue1SystemBooleanWritable = {\n    item?: boolean;\n    error?: string | null;\n    data?: {\n        [key: string]: never;\n    };\n};\n\nexport type GenericSchemaDuplicateIssue1SystemStringWritable = {\n    item?: string | null;\n    error?: string | null;\n};\n\n/**\n * This is a reusable parameter\n */\nexport type SimpleParameter = string;\n\n/**\n * Parameter with illegal characters\n */\nexport type XFooBar = ModelWithString;\n\n/**\n * A reusable request body\n */\nexport type SimpleRequestBody = ModelWithString;\n\n/**\n * A reusable request body\n */\nexport type SimpleFormData = ModelWithString;\n\nexport type ExportData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no+tag';\n};\n\nexport type PatchApiVbyApiVersionNoTagData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no+tag';\n};\n\nexport type PatchApiVbyApiVersionNoTagResponses = {\n    /**\n     * OK\n     */\n    default: unknown;\n};\n\nexport type ImportData = {\n    body: ModelWithReadOnlyAndWriteOnlyWritable | ModelWithArrayReadOnlyAndWriteOnlyWritable;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no+tag';\n};\n\nexport type ImportResponses = {\n    /**\n     * Success\n     */\n    200: ModelFromZendesk;\n    /**\n     * Default success response\n     */\n    default: ModelWithReadOnlyAndWriteOnly;\n};\n\nexport type ImportResponse = ImportResponses[keyof ImportResponses];\n\nexport type FooWowData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no+tag';\n};\n\nexport type FooWowResponses = {\n    /**\n     * OK\n     */\n    default: unknown;\n};\n\nexport type ApiVVersionODataControllerCountData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple/$count';\n};\n\nexport type ApiVVersionODataControllerCountResponses = {\n    /**\n     * Success\n     */\n    200: ModelFromZendesk;\n};\n\nexport type ApiVVersionODataControllerCountResponse = ApiVVersionODataControllerCountResponses[keyof ApiVVersionODataControllerCountResponses];\n\nexport type GetApiVbyApiVersionSimpleOperationData = {\n    body?: never;\n    path: {\n        /**\n         * foo in method\n         */\n        foo_param: string;\n    };\n    query?: never;\n    url: '/api/v{api-version}/simple:operation';\n};\n\nexport type GetApiVbyApiVersionSimpleOperationErrors = {\n    /**\n     * Default error response\n     */\n    default: ModelWithBoolean;\n};\n\nexport type GetApiVbyApiVersionSimpleOperationError = GetApiVbyApiVersionSimpleOperationErrors[keyof GetApiVbyApiVersionSimpleOperationErrors];\n\nexport type GetApiVbyApiVersionSimpleOperationResponses = {\n    /**\n     * Response is a simple number\n     */\n    200: number;\n};\n\nexport type GetApiVbyApiVersionSimpleOperationResponse = GetApiVbyApiVersionSimpleOperationResponses[keyof GetApiVbyApiVersionSimpleOperationResponses];\n\nexport type DeleteCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type GetCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type HeadCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type OptionsCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type PatchCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type PostCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type PutCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type DeleteFooData3 = {\n    body?: never;\n    headers: {\n        /**\n         * Parameter with illegal characters\n         */\n        'x-Foo-Bar': ModelWithString;\n    };\n    path: {\n        /**\n         * foo in method\n         */\n        foo_param: string;\n        /**\n         * bar in method\n         */\n        BarParam: string;\n    };\n    query?: never;\n    url: '/api/v{api-version}/foo/{foo_param}/bar/{BarParam}';\n};\n\nexport type CallWithDescriptionsData = {\n    body?: never;\n    path?: never;\n    query?: {\n        /**\n         * Testing multiline comments in string: First line\n         * Second line\n         *\n         * Fourth line\n         */\n        parameterWithBreaks?: string;\n        /**\n         * Testing backticks in string: `backticks` and ```multiple backticks``` should work\n         */\n        parameterWithBackticks?: string;\n        /**\n         * Testing slashes in string: \\backwards\\\\\\ and /forwards/// should work\n         */\n        parameterWithSlashes?: string;\n        /**\n         * Testing expression placeholders in string: ${expression} should work\n         */\n        parameterWithExpressionPlaceholders?: string;\n        /**\n         * Testing quotes in string: 'single quote''' and \"double quotes\"\"\" should work\n         */\n        parameterWithQuotes?: string;\n        /**\n         * Testing reserved characters in string: * inline * and ** inline ** should work\n         */\n        parameterWithReservedCharacters?: string;\n    };\n    url: '/api/v{api-version}/descriptions';\n};\n\nexport type DeprecatedCallData = {\n    body?: never;\n    headers: {\n        /**\n         * This parameter is deprecated\n         *\n         * @deprecated\n         */\n        parameter: DeprecatedModel | null;\n    };\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/parameters/deprecated';\n};\n\nexport type CallWithParametersData = {\n    /**\n     * This is the parameter that goes into the body\n     */\n    body: {\n        [key: string]: unknown;\n    } | null;\n    headers: {\n        /**\n         * This is the parameter that goes into the header\n         */\n        parameterHeader: string | null;\n    };\n    path: {\n        /**\n         * This is the parameter that goes into the path\n         */\n        parameterPath: string | null;\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string | null;\n    };\n    query: {\n        foo_ref_enum?: ModelWithNestedArrayEnumsDataFoo;\n        foo_all_of_enum: ModelWithNestedArrayEnumsDataFoo;\n        /**\n         * This is the parameter that goes into the query params\n         */\n        cursor: string | null;\n    };\n    url: '/api/v{api-version}/parameters/{parameterPath}';\n};\n\nexport type CallWithWeirdParameterNamesData = {\n    /**\n     * This is the parameter that goes into the body\n     */\n    body: ModelWithString | null;\n    headers: {\n        /**\n         * This is the parameter that goes into the request header\n         */\n        'parameter.header': string | null;\n    };\n    path: {\n        /**\n         * This is the parameter that goes into the path\n         */\n        'parameter.path.1'?: string;\n        /**\n         * This is the parameter that goes into the path\n         */\n        'parameter-path-2'?: string;\n        /**\n         * This is the parameter that goes into the path\n         */\n        'PARAMETER-PATH-3'?: string;\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string | null;\n    };\n    query: {\n        /**\n         * This is the parameter with a reserved keyword\n         */\n        default?: string;\n        /**\n         * This is the parameter that goes into the request query params\n         */\n        'parameter-query': string | null;\n    };\n    url: '/api/v{api-version}/parameters/{parameter.path.1}/{parameter-path-2}/{PARAMETER-PATH-3}';\n};\n\nexport type GetCallWithOptionalParamData = {\n    /**\n     * This is a required parameter\n     */\n    body: ModelWithOneOfEnum;\n    path?: never;\n    query?: {\n        /**\n         * This is an optional parameter\n         */\n        page?: number;\n    };\n    url: '/api/v{api-version}/parameters';\n};\n\nexport type PostCallWithOptionalParamData = {\n    /**\n     * This is an optional parameter\n     */\n    body?: {\n        offset?: number | null;\n    };\n    path?: never;\n    query: {\n        /**\n         * This is a required parameter\n         */\n        parameter: Pageable;\n    };\n    url: '/api/v{api-version}/parameters';\n};\n\nexport type PostCallWithOptionalParamResponses = {\n    /**\n     * Response is a simple number\n     */\n    200: number;\n    /**\n     * Success\n     */\n    204: void;\n};\n\nexport type PostCallWithOptionalParamResponse = PostCallWithOptionalParamResponses[keyof PostCallWithOptionalParamResponses];\n\nexport type PostApiVbyApiVersionRequestBodyData = {\n    /**\n     * A reusable request body\n     */\n    body?: SimpleRequestBody;\n    path?: never;\n    query?: {\n        /**\n         * This is a reusable parameter\n         */\n        parameter?: string;\n    };\n    url: '/api/v{api-version}/requestBody';\n};\n\nexport type PostApiVbyApiVersionFormDataData = {\n    /**\n     * A reusable request body\n     */\n    body?: SimpleFormData;\n    path?: never;\n    query?: {\n        /**\n         * This is a reusable parameter\n         */\n        parameter?: string;\n    };\n    url: '/api/v{api-version}/formData';\n};\n\nexport type CallWithDefaultParametersData = {\n    body?: never;\n    path?: never;\n    query?: {\n        /**\n         * This is a simple string with default value\n         */\n        parameterString?: string | null;\n        /**\n         * This is a simple number with default value\n         */\n        parameterNumber?: number | null;\n        /**\n         * This is a simple boolean with default value\n         */\n        parameterBoolean?: boolean | null;\n        /**\n         * This is a simple enum with default value\n         */\n        parameterEnum?: 'Success' | 'Warning' | 'Error';\n        /**\n         * This is a simple model with default value\n         */\n        parameterModel?: ModelWithString | null;\n    };\n    url: '/api/v{api-version}/defaults';\n};\n\nexport type CallWithDefaultOptionalParametersData = {\n    body?: never;\n    path?: never;\n    query?: {\n        /**\n         * This is a simple string that is optional with default value\n         */\n        parameterString?: string;\n        /**\n         * This is a simple number that is optional with default value\n         */\n        parameterNumber?: number;\n        /**\n         * This is a simple boolean that is optional with default value\n         */\n        parameterBoolean?: boolean;\n        /**\n         * This is a simple enum that is optional with default value\n         */\n        parameterEnum?: 'Success' | 'Warning' | 'Error';\n        /**\n         * This is a simple model that is optional with default value\n         */\n        parameterModel?: ModelWithString;\n    };\n    url: '/api/v{api-version}/defaults';\n};\n\nexport type CallToTestOrderOfParamsData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * This is a optional string with default\n         */\n        parameterOptionalStringWithDefault?: string;\n        /**\n         * This is a optional string with empty default\n         */\n        parameterOptionalStringWithEmptyDefault?: string;\n        /**\n         * This is a optional string with no default\n         */\n        parameterOptionalStringWithNoDefault?: string;\n        /**\n         * This is a string with default\n         */\n        parameterStringWithDefault: string;\n        /**\n         * This is a string with empty default\n         */\n        parameterStringWithEmptyDefault: string;\n        /**\n         * This is a string with no default\n         */\n        parameterStringWithNoDefault: string;\n        /**\n         * This is a string that can be null with no default\n         */\n        parameterStringNullableWithNoDefault?: string | null;\n        /**\n         * This is a string that can be null with default\n         */\n        parameterStringNullableWithDefault?: string | null;\n    };\n    url: '/api/v{api-version}/defaults';\n};\n\nexport type DuplicateNameData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/duplicate';\n};\n\nexport type DuplicateName2Data = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/duplicate';\n};\n\nexport type DuplicateName3Data = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/duplicate';\n};\n\nexport type DuplicateName4Data = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/duplicate';\n};\n\nexport type CallWithNoContentResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no-content';\n};\n\nexport type CallWithNoContentResponseResponses = {\n    /**\n     * Success\n     */\n    204: void;\n};\n\nexport type CallWithNoContentResponseResponse = CallWithNoContentResponseResponses[keyof CallWithNoContentResponseResponses];\n\nexport type CallWithResponseAndNoContentResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multiple-tags/response-and-no-content';\n};\n\nexport type CallWithResponseAndNoContentResponseResponses = {\n    /**\n     * Response is a simple number\n     */\n    200: number;\n    /**\n     * Success\n     */\n    204: void;\n};\n\nexport type CallWithResponseAndNoContentResponseResponse = CallWithResponseAndNoContentResponseResponses[keyof CallWithResponseAndNoContentResponseResponses];\n\nexport type DummyAData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multiple-tags/a';\n};\n\nexport type DummyAResponses = {\n    200: _400;\n};\n\nexport type DummyAResponse = DummyAResponses[keyof DummyAResponses];\n\nexport type DummyBData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multiple-tags/b';\n};\n\nexport type DummyBResponses = {\n    /**\n     * Success\n     */\n    204: void;\n};\n\nexport type DummyBResponse = DummyBResponses[keyof DummyBResponses];\n\nexport type CallWithResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/response';\n};\n\nexport type CallWithResponseResponses = {\n    default: Import;\n};\n\nexport type CallWithResponseResponse = CallWithResponseResponses[keyof CallWithResponseResponses];\n\nexport type CallWithDuplicateResponsesData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/response';\n};\n\nexport type CallWithDuplicateResponsesErrors = {\n    /**\n     * Message for 500 error\n     */\n    500: ModelWithStringError;\n    /**\n     * Message for 501 error\n     */\n    501: ModelWithStringError;\n    /**\n     * Message for 502 error\n     */\n    502: ModelWithStringError;\n    /**\n     * Message for 4XX errors\n     */\n    '4XX': DictionaryWithArray;\n    /**\n     * Default error response\n     */\n    default: ModelWithBoolean;\n};\n\nexport type CallWithDuplicateResponsesError = CallWithDuplicateResponsesErrors[keyof CallWithDuplicateResponsesErrors];\n\nexport type CallWithDuplicateResponsesResponses = {\n    /**\n     * Message for 200 response\n     */\n    200: ModelWithBoolean & ModelWithInteger;\n    /**\n     * Message for 201 response\n     */\n    201: ModelWithString;\n    /**\n     * Message for 202 response\n     */\n    202: ModelWithString;\n};\n\nexport type CallWithDuplicateResponsesResponse = CallWithDuplicateResponsesResponses[keyof CallWithDuplicateResponsesResponses];\n\nexport type CallWithResponsesData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/response';\n};\n\nexport type CallWithResponsesErrors = {\n    /**\n     * Message for 500 error\n     */\n    500: ModelWithStringError;\n    /**\n     * Message for 501 error\n     */\n    501: ModelWithStringError;\n    /**\n     * Message for 502 error\n     */\n    502: ModelWithStringError;\n    /**\n     * Message for default response\n     */\n    default: ModelWithStringError;\n};\n\nexport type CallWithResponsesError = CallWithResponsesErrors[keyof CallWithResponsesErrors];\n\nexport type CallWithResponsesResponses = {\n    /**\n     * Message for 200 response\n     */\n    200: {\n        readonly '@namespace.string'?: string;\n        readonly '@namespace.integer'?: number;\n        readonly value?: Array<ModelWithString>;\n    };\n    /**\n     * Message for 201 response\n     */\n    201: ModelThatExtends;\n    /**\n     * Message for 202 response\n     */\n    202: ModelThatExtendsExtends;\n};\n\nexport type CallWithResponsesResponse = CallWithResponsesResponses[keyof CallWithResponsesResponses];\n\nexport type CollectionFormatData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * This is an array parameter that is sent as csv format (comma-separated values)\n         */\n        parameterArrayCSV: Array<string> | null;\n        /**\n         * This is an array parameter that is sent as ssv format (space-separated values)\n         */\n        parameterArraySSV: Array<string> | null;\n        /**\n         * This is an array parameter that is sent as tsv format (tab-separated values)\n         */\n        parameterArrayTSV: Array<string> | null;\n        /**\n         * This is an array parameter that is sent as pipes format (pipe-separated values)\n         */\n        parameterArrayPipes: Array<string> | null;\n        /**\n         * This is an array parameter that is sent as multi format (multiple parameter instances)\n         */\n        parameterArrayMulti: Array<string> | null;\n    };\n    url: '/api/v{api-version}/collectionFormat';\n};\n\nexport type TypesData = {\n    body?: never;\n    path?: {\n        /**\n         * This is a number parameter\n         */\n        id?: number;\n    };\n    query: {\n        /**\n         * This is a number parameter\n         */\n        parameterNumber: number;\n        /**\n         * This is a string parameter\n         */\n        parameterString: string | null;\n        /**\n         * This is a boolean parameter\n         */\n        parameterBoolean: boolean | null;\n        /**\n         * This is an object parameter\n         */\n        parameterObject: {\n            [key: string]: unknown;\n        } | null;\n        /**\n         * This is an array parameter\n         */\n        parameterArray: Array<string> | null;\n        /**\n         * This is a dictionary parameter\n         */\n        parameterDictionary: {\n            [key: string]: unknown;\n        } | null;\n        /**\n         * This is an enum parameter\n         */\n        parameterEnum: 'Success' | 'Warning' | 'Error' | null;\n    };\n    url: '/api/v{api-version}/types';\n};\n\nexport type TypesResponses = {\n    /**\n     * Response is a simple number\n     */\n    200: number;\n    /**\n     * Response is a simple string\n     */\n    201: string;\n    /**\n     * Response is a simple boolean\n     */\n    202: boolean;\n    /**\n     * Response is a simple object\n     */\n    203: {\n        [key: string]: unknown;\n    };\n};\n\nexport type TypesResponse = TypesResponses[keyof TypesResponses];\n\nexport type UploadFileData = {\n    body: Blob | File;\n    path: {\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string | null;\n    };\n    query?: never;\n    url: '/api/v{api-version}/upload';\n};\n\nexport type UploadFileResponses = {\n    200: boolean;\n};\n\nexport type UploadFileResponse = UploadFileResponses[keyof UploadFileResponses];\n\nexport type FileResponseData = {\n    body?: never;\n    path: {\n        id: string;\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string;\n    };\n    query?: never;\n    url: '/api/v{api-version}/file/{id}';\n};\n\nexport type FileResponseResponses = {\n    /**\n     * Success\n     */\n    200: Blob | File;\n};\n\nexport type FileResponseResponse = FileResponseResponses[keyof FileResponseResponses];\n\nexport type ComplexTypesData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * Parameter containing object\n         */\n        parameterObject: {\n            first?: {\n                second?: {\n                    third?: string;\n                };\n            };\n        };\n        /**\n         * Parameter containing reference\n         */\n        parameterReference: ModelWithString;\n    };\n    url: '/api/v{api-version}/complex';\n};\n\nexport type ComplexTypesErrors = {\n    /**\n     * 400 `server` error\n     */\n    400: unknown;\n    /**\n     * 500 server error\n     */\n    500: unknown;\n};\n\nexport type ComplexTypesResponses = {\n    /**\n     * Successful response\n     */\n    200: Array<ModelWithString>;\n};\n\nexport type ComplexTypesResponse = ComplexTypesResponses[keyof ComplexTypesResponses];\n\nexport type MultipartResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multipart';\n};\n\nexport type MultipartResponseResponses = {\n    /**\n     * OK\n     */\n    200: {\n        file?: Blob | File;\n        metadata?: {\n            foo?: string;\n            bar?: string;\n        };\n    };\n};\n\nexport type MultipartResponseResponse = MultipartResponseResponses[keyof MultipartResponseResponses];\n\nexport type MultipartRequestData = {\n    body?: {\n        content?: Blob | File;\n        data?: ModelWithString | null;\n    };\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multipart';\n};\n\nexport type ComplexParamsData = {\n    body?: {\n        readonly key: string | null;\n        name: string | null;\n        enabled?: boolean;\n        type: 'Monkey' | 'Horse' | 'Bird';\n        listOfModels?: Array<ModelWithString> | null;\n        listOfStrings?: Array<string> | null;\n        parameters: ModelWithString | ModelWithEnum | ModelWithArray | ModelWithDictionary;\n        readonly user?: {\n            readonly id?: number;\n            readonly name?: string | null;\n        };\n    };\n    path: {\n        id: number;\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string;\n    };\n    query?: never;\n    url: '/api/v{api-version}/complex/{id}';\n};\n\nexport type ComplexParamsResponses = {\n    /**\n     * Success\n     */\n    200: ModelWithString;\n};\n\nexport type ComplexParamsResponse = ComplexParamsResponses[keyof ComplexParamsResponses];\n\nexport type CallWithResultFromHeaderData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/header';\n};\n\nexport type CallWithResultFromHeaderErrors = {\n    /**\n     * 400 server error\n     */\n    400: unknown;\n    /**\n     * 500 server error\n     */\n    500: unknown;\n};\n\nexport type CallWithResultFromHeaderResponses = {\n    /**\n     * Successful response\n     */\n    200: unknown;\n};\n\nexport type TestErrorCodeData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * Status code to return\n         */\n        status: number;\n    };\n    url: '/api/v{api-version}/error';\n};\n\nexport type TestErrorCodeErrors = {\n    /**\n     * Custom message: Internal Server Error\n     */\n    500: unknown;\n    /**\n     * Custom message: Not Implemented\n     */\n    501: unknown;\n    /**\n     * Custom message: Bad Gateway\n     */\n    502: unknown;\n    /**\n     * Custom message: Service Unavailable\n     */\n    503: unknown;\n};\n\nexport type TestErrorCodeResponses = {\n    /**\n     * Custom message: Successful response\n     */\n    200: unknown;\n};\n\nexport type NonAsciiæøåÆøÅöôêÊ字符串Data = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * Dummy input param\n         */\n        nonAsciiParamæøåÆØÅöôêÊ: number;\n    };\n    url: '/api/v{api-version}/non-ascii-æøåÆØÅöôêÊ字符串';\n};\n\nexport type NonAsciiæøåÆøÅöôêÊ字符串Responses = {\n    /**\n     * Successful response\n     */\n    200: Array<NonAsciiStringæøåÆøÅöôêÊ字符串>;\n};\n\nexport type NonAsciiæøåÆøÅöôêÊ字符串Response = NonAsciiæøåÆøÅöôêÊ字符串Responses[keyof NonAsciiæøåÆøÅöôêÊ字符串Responses];\n\nexport type PutWithFormUrlEncodedData = {\n    body: ArrayWithStrings;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/non-ascii-æøåÆØÅöôêÊ字符串';\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-axios/tsconfig-nodenext-sdk/client/client.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { AxiosError, AxiosInstance, RawAxiosRequestHeaders } from 'axios';\nimport axios from 'axios';\n\nimport { createSseClient } from '../core/serverSentEvents.gen.js';\nimport type { HttpMethod } from '../core/types.gen.js';\nimport { getValidRequestBody } from '../core/utils.gen.js';\nimport type { Client, Config, RequestOptions } from './types.gen.js';\nimport { buildUrl, createConfig, mergeConfigs, mergeHeaders, setAuthParams } from './utils.gen.js';\n\nexport const createClient = (config: Config = {}): Client => {\n  let _config = mergeConfigs(createConfig(), config);\n\n  let instance: AxiosInstance;\n\n  if (_config.axios && !('Axios' in _config.axios)) {\n    instance = _config.axios;\n  } else {\n    // eslint-disable-next-line @typescript-eslint/no-unused-vars\n    const { auth, ...configWithoutAuth } = _config;\n    instance = axios.create(configWithoutAuth);\n  }\n\n  const getConfig = (): Config => ({ ..._config });\n\n  const setConfig = (config: Config): Config => {\n    _config = mergeConfigs(_config, config);\n    instance.defaults = {\n      ...instance.defaults,\n      ..._config,\n      // @ts-expect-error\n      headers: mergeHeaders(instance.defaults.headers, _config.headers),\n    };\n    return getConfig();\n  };\n\n  const beforeRequest = async (options: RequestOptions) => {\n    const opts = {\n      ..._config,\n      ...options,\n      axios: options.axios ?? _config.axios ?? instance,\n      headers: mergeHeaders(_config.headers, options.headers),\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.body = opts.bodySerializer(opts.body);\n    }\n\n    const url = buildUrl(opts);\n\n    return { opts, url };\n  };\n\n  // @ts-expect-error\n  const request: Client['request'] = async (options) => {\n    // @ts-expect-error\n    const { opts, url } = await beforeRequest(options);\n    try {\n      // assign Axios here for consistency with fetch\n      const _axios = opts.axios!;\n      // eslint-disable-next-line @typescript-eslint/no-unused-vars\n      const { auth, ...optsWithoutAuth } = opts;\n      const response = await _axios({\n        ...optsWithoutAuth,\n        baseURL: '', // the baseURL is already included in `url`\n        data: getValidRequestBody(opts),\n        headers: opts.headers as RawAxiosRequestHeaders,\n        // let `paramsSerializer()` handle query params if it exists\n        params: opts.paramsSerializer ? opts.query : undefined,\n        url,\n      });\n\n      let { data } = response;\n\n      if (opts.responseType === '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 {\n        ...response,\n        data: data ?? {},\n      };\n    } catch (error) {\n      const e = error as AxiosError;\n      if (opts.throwOnError) {\n        throw e;\n      }\n      // @ts-expect-error\n      e.error = e.response?.data ?? {};\n      return e;\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 Record<string, string>,\n      method,\n      serializedBody: getValidRequestBody(opts) as BodyInit | null | undefined,\n      // @ts-expect-error\n      signal: opts.signal,\n      url,\n    });\n  };\n\n  const _buildUrl: Client['buildUrl'] = (options) =>\n    buildUrl({ axios: instance, ..._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    instance,\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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-axios/tsconfig-nodenext-sdk/client/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type { Auth } from '../core/auth.gen.js';\nexport type { QuerySerializerOptions } from '../core/bodySerializer.gen.js';\nexport {\n  formDataBodySerializer,\n  jsonBodySerializer,\n  urlSearchParamsBodySerializer,\n} from '../core/bodySerializer.gen.js';\nexport { buildClientParams } from '../core/params.gen.js';\nexport { serializeQueryKeyValue } from '../core/queryKeySerializer.gen.js';\nexport { createClient } from './client.gen.js';\nexport type {\n  Client,\n  ClientOptions,\n  Config,\n  CreateClientConfig,\n  Options,\n  RequestOptions,\n  RequestResult,\n  TDataShape,\n} from './types.gen.js';\nexport { createConfig } from './utils.gen.js';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-axios/tsconfig-nodenext-sdk/client/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type {\n  AxiosError,\n  AxiosInstance,\n  AxiosRequestHeaders,\n  AxiosResponse,\n  AxiosStatic,\n  CreateAxiosDefaults,\n} from 'axios';\n\nimport type { Auth } from '../core/auth.gen.js';\nimport type {\n  ServerSentEventsOptions,\n  ServerSentEventsResult,\n} from '../core/serverSentEvents.gen.js';\nimport type { Client as CoreClient, Config as CoreConfig } from '../core/types.gen.js';\n\nexport interface Config<T extends ClientOptions = ClientOptions>\n  extends Omit<CreateAxiosDefaults, 'auth' | 'baseURL' | 'headers' | 'method'>, CoreConfig {\n  /**\n   * Axios implementation. You can use this option to provide either an\n   * `AxiosStatic` or an `AxiosInstance`.\n   *\n   * @default axios\n   */\n  axios?: AxiosStatic | AxiosInstance;\n  /**\n   * Base URL for all requests made by this client.\n   */\n  baseURL?: T['baseURL'];\n  /**\n   * An object containing any HTTP headers that you want to pre-populate your\n   * `Headers` object with.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/Headers/Headers#init See more}\n   */\n  headers?:\n    | AxiosRequestHeaders\n    | Record<\n        string,\n        string | number | boolean | (string | number | boolean)[] | null | undefined | unknown\n      >;\n  /**\n   * Throw an error instead of returning it in the response?\n   *\n   * @default false\n   */\n  throwOnError?: T['throwOnError'];\n}\n\nexport interface RequestOptions<\n  TData = unknown,\n  ThrowOnError extends boolean = boolean,\n  Url extends string = string,\n>\n  extends\n    Config<{\n      throwOnError: ThrowOnError;\n    }>,\n    Pick<\n      ServerSentEventsOptions<TData>,\n      | 'onRequest'\n      | 'onSseError'\n      | 'onSseEvent'\n      | 'sseDefaultRetryDelay'\n      | 'sseMaxRetryAttempts'\n      | 'sseMaxRetryDelay'\n    > {\n  /**\n   * Any body that you want to add to your request.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/fetch#body}\n   */\n  body?: unknown;\n  path?: Record<string, unknown>;\n  query?: Record<string, unknown>;\n  /**\n   * Security mechanism(s) to use for the request.\n   */\n  security?: ReadonlyArray<Auth>;\n  url: Url;\n}\n\nexport interface ClientOptions {\n  baseURL?: string;\n  throwOnError?: boolean;\n}\n\nexport type RequestResult<\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = boolean,\n> = ThrowOnError extends true\n  ? Promise<AxiosResponse<TData extends Record<string, unknown> ? TData[keyof TData] : TData>>\n  : Promise<\n      | (AxiosResponse<TData extends Record<string, unknown> ? TData[keyof TData] : TData> & {\n          error: undefined;\n        })\n      | (AxiosError<TError extends Record<string, unknown> ? TError[keyof TError] : TError> & {\n          data: undefined;\n          error: TError extends Record<string, unknown> ? TError[keyof TError] : TError;\n        })\n    >;\n\ntype MethodFn = <TData = unknown, TError = unknown, ThrowOnError extends boolean = false>(\n  options: Omit<RequestOptions<TData, ThrowOnError>, 'method'>,\n) => RequestResult<TData, TError, ThrowOnError>;\n\ntype SseFn = <TData = unknown, TError = unknown, ThrowOnError extends boolean = false>(\n  options: Omit<RequestOptions<TData, ThrowOnError>, 'method'>,\n) => Promise<ServerSentEventsResult<TData, TError>>;\n\ntype RequestFn = <TData = unknown, TError = unknown, ThrowOnError extends boolean = false>(\n  options: Omit<RequestOptions<TData, ThrowOnError>, 'method'> &\n    Pick<Required<RequestOptions<TData, ThrowOnError>>, 'method'>,\n) => RequestResult<TData, TError, ThrowOnError>;\n\ntype BuildUrlFn = <\n  TData extends {\n    body?: unknown;\n    path?: Record<string, unknown>;\n    query?: Record<string, unknown>;\n    url: string;\n  },\n>(\n  options: TData & Options<TData>,\n) => string;\n\nexport type Client = CoreClient<RequestFn, Config, MethodFn, BuildUrlFn, SseFn> & {\n  instance: AxiosInstance;\n};\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 = ClientOptions> = (\n  override?: Config<ClientOptions & T>,\n) => Config<Required<ClientOptions> & T>;\n\nexport interface TDataShape {\n  body?: unknown;\n  headers?: unknown;\n  path?: unknown;\n  query?: unknown;\n  url: string;\n}\n\ntype OmitKeys<T, K> = Pick<T, Exclude<keyof T, K>>;\n\nexport type Options<\n  TData extends TDataShape = TDataShape,\n  ThrowOnError extends boolean = boolean,\n  TResponse = unknown,\n> = OmitKeys<RequestOptions<TResponse, ThrowOnError>, 'body' | 'path' | 'query' | 'url'> &\n  ([TData] extends [never] ? unknown : Omit<TData, 'url'>);\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-axios/tsconfig-nodenext-sdk/client/utils.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport { getAuthToken } from '../core/auth.gen.js';\nimport type { QuerySerializerOptions } from '../core/bodySerializer.gen.js';\nimport {\n  serializeArrayParam,\n  serializeObjectParam,\n  serializePrimitiveParam,\n} from '../core/pathSerializer.gen.js';\nimport { getUrl } from '../core/utils.gen.js';\nimport type { Client, ClientOptions, Config, RequestOptions } from './types.gen.js';\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\nconst checkForExistence = (\n  options: Pick<RequestOptions, 'auth' | 'query'> & {\n    headers: Record<any, unknown>;\n  },\n  name?: string,\n): boolean => {\n  if (!name) {\n    return false;\n  }\n  if (name in options.headers || options.query?.[name]) {\n    return true;\n  }\n  if (\n    'Cookie' in options.headers &&\n    options.headers['Cookie'] &&\n    typeof options.headers['Cookie'] === 'string'\n  ) {\n    return options.headers['Cookie'].includes(`${name}=`);\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: Record<any, unknown>;\n  }) => {\n  for (const auth of security) {\n    if (checkForExistence(options, auth.name)) {\n      continue;\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        const value = `${name}=${token}`;\n        if ('Cookie' in options.headers && options.headers['Cookie']) {\n          options.headers['Cookie'] = `${options.headers['Cookie']}; ${value}`;\n        } else {\n          options.headers['Cookie'] = value;\n        }\n        break;\n      }\n      case 'header':\n      default:\n        options.headers[name] = token;\n        break;\n    }\n  }\n};\n\nexport const buildUrl: Client['buildUrl'] = (options) => {\n  const instanceBaseUrl = options.axios?.defaults?.baseURL;\n\n  const baseUrl =\n    !!options.baseURL && typeof options.baseURL === 'string' ? options.baseURL : instanceBaseUrl;\n\n  return getUrl({\n    baseUrl: baseUrl as string,\n    path: options.path,\n    // let `paramsSerializer()` handle query params if it exists\n    query: !options.paramsSerializer ? options.query : undefined,\n    querySerializer:\n      typeof options.querySerializer === 'function'\n        ? options.querySerializer\n        : createQuerySerializer(options.querySerializer),\n    url: options.url,\n  });\n};\n\nexport const mergeConfigs = (a: Config, b: Config): Config => {\n  const config = { ...a, ...b };\n  config.headers = mergeHeaders(a.headers, b.headers);\n  return config;\n};\n\n/**\n * Special Axios headers keywords allowing to set headers by request method.\n */\nexport const axiosHeadersKeywords = [\n  'common',\n  'delete',\n  'get',\n  'head',\n  'patch',\n  'post',\n  'put',\n] as const;\n\nexport const mergeHeaders = (\n  ...headers: Array<Required<Config>['headers'] | undefined>\n): Record<any, unknown> => {\n  const mergedHeaders: Record<any, unknown> = {};\n  for (const header of headers) {\n    if (!header || typeof header !== 'object') {\n      continue;\n    }\n\n    const iterator = Object.entries(header);\n\n    for (const [key, value] of iterator) {\n      if (\n        axiosHeadersKeywords.includes(key as (typeof axiosHeadersKeywords)[number]) &&\n        typeof value === 'object'\n      ) {\n        mergedHeaders[key] = {\n          ...(mergedHeaders[key] as Record<any, unknown>),\n          ...value,\n        };\n      } else if (value === null) {\n        delete mergedHeaders[key];\n      } else if (Array.isArray(value)) {\n        for (const v of value) {\n          // @ts-expect-error\n          mergedHeaders[key] = [...(mergedHeaders[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[key] = typeof value === 'object' ? JSON.stringify(value) : (value as string);\n      }\n    }\n  }\n  return mergedHeaders;\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  ...override,\n});\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-axios/tsconfig-nodenext-sdk/client.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport { type ClientOptions, type Config, createClient, createConfig } from './client/index.js';\nimport type { ClientOptions as ClientOptions2 } from './types.gen.js';\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: 'http://localhost:3000/base' }));\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-axios/tsconfig-nodenext-sdk/core/auth.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-axios/tsconfig-nodenext-sdk/core/bodySerializer.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { ArrayStyle, ObjectStyle, SerializerOptions } from './pathSerializer.gen.js';\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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-axios/tsconfig-nodenext-sdk/core/params.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-axios/tsconfig-nodenext-sdk/core/pathSerializer.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-axios/tsconfig-nodenext-sdk/core/queryKeySerializer.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\n/**\n * JSON-friendly union that mirrors what Pinia Colada can hash.\n */\nexport type JsonValue =\n  | null\n  | string\n  | number\n  | boolean\n  | JsonValue[]\n  | { [key: string]: JsonValue };\n\n/**\n * Replacer that converts non-JSON values (bigint, Date, etc.) to safe substitutes.\n */\nexport const queryKeyJsonReplacer = (_key: string, value: unknown) => {\n  if (value === undefined || typeof value === 'function' || typeof value === 'symbol') {\n    return undefined;\n  }\n  if (typeof value === 'bigint') {\n    return value.toString();\n  }\n  if (value instanceof Date) {\n    return value.toISOString();\n  }\n  return value;\n};\n\n/**\n * Safely stringifies a value and parses it back into a JsonValue.\n */\nexport const stringifyToJsonValue = (input: unknown): JsonValue | undefined => {\n  try {\n    const json = JSON.stringify(input, queryKeyJsonReplacer);\n    if (json === undefined) {\n      return undefined;\n    }\n    return JSON.parse(json) as JsonValue;\n  } catch {\n    return undefined;\n  }\n};\n\n/**\n * Detects plain objects (including objects with a null prototype).\n */\nconst isPlainObject = (value: unknown): value is Record<string, unknown> => {\n  if (value === null || typeof value !== 'object') {\n    return false;\n  }\n  const prototype = Object.getPrototypeOf(value as object);\n  return prototype === Object.prototype || prototype === null;\n};\n\n/**\n * Turns URLSearchParams into a sorted JSON object for deterministic keys.\n */\nconst serializeSearchParams = (params: URLSearchParams): JsonValue => {\n  const entries = Array.from(params.entries()).sort(([a], [b]) => a.localeCompare(b));\n  const result: Record<string, JsonValue> = {};\n\n  for (const [key, value] of entries) {\n    const existing = result[key];\n    if (existing === undefined) {\n      result[key] = value;\n      continue;\n    }\n\n    if (Array.isArray(existing)) {\n      (existing as string[]).push(value);\n    } else {\n      result[key] = [existing, value];\n    }\n  }\n\n  return result;\n};\n\n/**\n * Normalizes any accepted value into a JSON-friendly shape for query keys.\n */\nexport const serializeQueryKeyValue = (value: unknown): JsonValue | undefined => {\n  if (value === null) {\n    return null;\n  }\n\n  if (typeof value === 'string' || typeof value === 'number' || typeof value === 'boolean') {\n    return value;\n  }\n\n  if (value === undefined || typeof value === 'function' || typeof value === 'symbol') {\n    return undefined;\n  }\n\n  if (typeof value === 'bigint') {\n    return value.toString();\n  }\n\n  if (value instanceof Date) {\n    return value.toISOString();\n  }\n\n  if (Array.isArray(value)) {\n    return stringifyToJsonValue(value);\n  }\n\n  if (typeof URLSearchParams !== 'undefined' && value instanceof URLSearchParams) {\n    return serializeSearchParams(value);\n  }\n\n  if (isPlainObject(value)) {\n    return stringifyToJsonValue(value);\n  }\n\n  return undefined;\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-axios/tsconfig-nodenext-sdk/core/serverSentEvents.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { Config } from './types.gen.js';\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 const 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            // Normalize line endings: CRLF -> LF, then CR -> LF\n            buffer = buffer.replace(/\\r\\n/g, '\\n').replace(/\\r/g, '\\n');\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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-axios/tsconfig-nodenext-sdk/core/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { Auth, AuthToken } from './auth.gen.js';\nimport type { BodySerializer, QuerySerializer, QuerySerializerOptions } from './bodySerializer.gen.js';\n\nexport type HttpMethod =\n  | 'connect'\n  | 'delete'\n  | 'get'\n  | 'head'\n  | 'options'\n  | 'patch'\n  | 'post'\n  | 'put'\n  | 'trace';\n\nexport type Client<\n  RequestFn = never,\n  Config = unknown,\n  MethodFn = never,\n  BuildUrlFn = never,\n  SseFn = never,\n> = {\n  /**\n   * Returns the final request URL.\n   */\n  buildUrl: BuildUrlFn;\n  getConfig: () => Config;\n  request: RequestFn;\n  setConfig: (config: Config) => Config;\n} & {\n  [K in HttpMethod]: MethodFn;\n} & ([SseFn] extends [never] ? { sse?: never } : { sse: { [K in HttpMethod]: SseFn } });\n\nexport interface Config {\n  /**\n   * Auth token or a function returning auth token. The resolved value will be\n   * added to the request payload as defined by its `security` array.\n   */\n  auth?: ((auth: Auth) => Promise<AuthToken> | AuthToken) | AuthToken;\n  /**\n   * A function for serializing request body parameter. By default,\n   * {@link JSON.stringify()} will be used.\n   */\n  bodySerializer?: BodySerializer | null;\n  /**\n   * An object containing any HTTP headers that you want to pre-populate your\n   * `Headers` object with.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/Headers/Headers#init See more}\n   */\n  headers?:\n    | RequestInit['headers']\n    | Record<\n        string,\n        string | number | boolean | (string | number | boolean)[] | null | undefined | unknown\n      >;\n  /**\n   * The request method.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/fetch#method See more}\n   */\n  method?: Uppercase<HttpMethod>;\n  /**\n   * A function for serializing request query parameters. By default, arrays\n   * will be exploded in form style, objects will be exploded in deepObject\n   * style, and reserved characters are percent-encoded.\n   *\n   * This method will have no effect if the native `paramsSerializer()` Axios\n   * API function is used.\n   *\n   * {@link https://swagger.io/docs/specification/serialization/#query View examples}\n   */\n  querySerializer?: QuerySerializer | QuerySerializerOptions;\n  /**\n   * A function validating request data. This is useful if you want to ensure\n   * the request conforms to the desired shape, so it can be safely sent to\n   * the server.\n   */\n  requestValidator?: (data: unknown) => Promise<unknown>;\n  /**\n   * A function transforming response data before it's returned. This is useful\n   * for post-processing data, e.g. converting ISO strings into Date objects.\n   */\n  responseTransformer?: (data: unknown) => Promise<unknown>;\n  /**\n   * A function validating response data. This is useful if you want to ensure\n   * the response conforms to the desired shape, so it can be safely passed to\n   * the transformers and returned to the user.\n   */\n  responseValidator?: (data: unknown) => Promise<unknown>;\n}\n\ntype IsExactlyNeverOrNeverUndefined<T> = [T] extends [never]\n  ? true\n  : [T] extends [never | undefined]\n    ? [undefined] extends [T]\n      ? false\n      : true\n    : false;\n\nexport type OmitNever<T extends Record<string, unknown>> = {\n  [K in keyof T as IsExactlyNeverOrNeverUndefined<T[K]> extends true ? never : K]: T[K];\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-axios/tsconfig-nodenext-sdk/core/utils.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { BodySerializer, QuerySerializer } from './bodySerializer.gen.js';\nimport {\n  type ArraySeparatorStyle,\n  serializeArrayParam,\n  serializeObjectParam,\n  serializePrimitiveParam,\n} from './pathSerializer.gen.js';\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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-axios/tsconfig-nodenext-sdk/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport { apiVVersionODataControllerCount, callToTestOrderOfParams, callWithDefaultOptionalParameters, callWithDefaultParameters, callWithDescriptions, callWithDuplicateResponses, callWithNoContentResponse, callWithParameters, callWithResponse, callWithResponseAndNoContentResponse, callWithResponses, callWithResultFromHeader, callWithWeirdParameterNames, collectionFormat, complexParams, complexTypes, deleteCallWithoutParametersAndResponse, deleteFoo, deprecatedCall, dummyA, dummyB, duplicateName, duplicateName2, duplicateName3, duplicateName4, export_, fileResponse, fooWow, getApiVbyApiVersionSimpleOperation, getCallWithOptionalParam, getCallWithoutParametersAndResponse, headCallWithoutParametersAndResponse, import_, multipartRequest, multipartResponse, nonAsciiæøåÆøÅöôêÊ字符串, type Options, optionsCallWithoutParametersAndResponse, patchApiVbyApiVersionNoTag, patchCallWithoutParametersAndResponse, postApiVbyApiVersionFormData, postApiVbyApiVersionRequestBody, postCallWithOptionalParam, postCallWithoutParametersAndResponse, putCallWithoutParametersAndResponse, putWithFormUrlEncoded, testErrorCode, types, uploadFile } from './sdk.gen.js';\nexport type { _3eNum1Период, _400, AdditionalPropertiesIntegerIssue, AdditionalPropertiesUnknownIssue, AdditionalPropertiesUnknownIssue2, AdditionalPropertiesUnknownIssue3, AdditionalPropertiesUnknownIssueWritable, AnyOfAnyAndNull, AnyOfArrays, ApiVVersionODataControllerCountData, ApiVVersionODataControllerCountResponse, ApiVVersionODataControllerCountResponses, ArrayWithAnyOfProperties, ArrayWithArray, ArrayWithBooleans, ArrayWithNumbers, ArrayWithProperties, ArrayWithReferences, ArrayWithStrings, CallToTestOrderOfParamsData, CallWithDefaultOptionalParametersData, CallWithDefaultParametersData, CallWithDescriptionsData, CallWithDuplicateResponsesData, CallWithDuplicateResponsesError, CallWithDuplicateResponsesErrors, CallWithDuplicateResponsesResponse, CallWithDuplicateResponsesResponses, CallWithNoContentResponseData, CallWithNoContentResponseResponse, CallWithNoContentResponseResponses, CallWithParametersData, CallWithResponseAndNoContentResponseData, CallWithResponseAndNoContentResponseResponse, CallWithResponseAndNoContentResponseResponses, CallWithResponseData, CallWithResponseResponse, CallWithResponseResponses, CallWithResponsesData, CallWithResponsesError, CallWithResponsesErrors, CallWithResponsesResponse, CallWithResponsesResponses, CallWithResultFromHeaderData, CallWithResultFromHeaderErrors, CallWithResultFromHeaderResponses, CallWithWeirdParameterNamesData, CamelCaseCommentWithBreaks, CharactersInDescription, ClientOptions, CollectionFormatData, CommentWithBackticks, CommentWithBackticksAndQuotes, CommentWithBreaks, CommentWithExpressionPlaceholders, CommentWithQuotes, CommentWithReservedCharacters, CommentWithSlashes, ComplexParamsData, ComplexParamsResponse, ComplexParamsResponses, ComplexTypesData, ComplexTypesErrors, ComplexTypesResponse, ComplexTypesResponses, CompositionBaseModel, CompositionExtendedModel, CompositionWithAllOfAndNullable, CompositionWithAnyOf, CompositionWithAnyOfAndNullable, CompositionWithAnyOfAnonymous, CompositionWithNestedAnyAndTypeNull, CompositionWithNestedAnyOfAndNull, CompositionWithOneOf, CompositionWithOneOfAndComplexArrayDictionary, CompositionWithOneOfAndNullable, CompositionWithOneOfAndProperties, CompositionWithOneOfAndSimpleArrayDictionary, CompositionWithOneOfAndSimpleDictionary, CompositionWithOneOfAnonymous, CompositionWithOneOfDiscriminator, ConstValue, Default, DeleteCallWithoutParametersAndResponseData, DeleteFooData, DeleteFooData2, DeleteFooData3, DeprecatedCallData, DeprecatedModel, DictionaryWithArray, DictionaryWithDictionary, DictionaryWithProperties, DictionaryWithPropertiesAndAdditionalProperties, DictionaryWithReference, DictionaryWithString, DummyAData, DummyAResponse, DummyAResponses, DummyBData, DummyBResponse, DummyBResponses, DuplicateName2Data, DuplicateName3Data, DuplicateName4Data, DuplicateNameData, EnumFromDescription, EnumWithExtensions, EnumWithNumbers, EnumWithReplacedCharacters, EnumWithStrings, EnumWithXEnumNames, ExportData, ExternalRefA, ExternalRefB, ExternalSharedModel, File, FileResponseData, FileResponseResponse, FileResponseResponses, FileWritable, FooWowData, FooWowResponses, FreeFormObjectWithAdditionalPropertiesEqEmptyObject, FreeFormObjectWithAdditionalPropertiesEqTrue, FreeFormObjectWithoutAdditionalProperties, GenericSchemaDuplicateIssue1SystemBoolean, GenericSchemaDuplicateIssue1SystemBooleanWritable, GenericSchemaDuplicateIssue1SystemString, GenericSchemaDuplicateIssue1SystemStringWritable, GetApiVbyApiVersionSimpleOperationData, GetApiVbyApiVersionSimpleOperationError, GetApiVbyApiVersionSimpleOperationErrors, GetApiVbyApiVersionSimpleOperationResponse, GetApiVbyApiVersionSimpleOperationResponses, GetCallWithOptionalParamData, GetCallWithoutParametersAndResponseData, HeadCallWithoutParametersAndResponseData, Import, ImportData, ImportResponse, ImportResponses, IoK8sApimachineryPkgApisMetaV1DeleteOptions, IoK8sApimachineryPkgApisMetaV1Preconditions, ModelCircle, ModelFromZendesk, ModelSquare, ModelThatExtends, ModelThatExtendsExtends, ModelWithAdditionalPropertiesEqTrue, ModelWithAdditionalPropertiesRef, ModelWithAnyOfConstantSizeArray, ModelWithAnyOfConstantSizeArrayAndIntersect, ModelWithAnyOfConstantSizeArrayNullable, ModelWithAnyOfConstantSizeArrayWithNSizeAndOptions, ModelWithAnyOfConstantSizeArrayWithNSizeAndOptionsWritable, ModelWithArray, ModelWithArrayReadOnlyAndWriteOnly, ModelWithArrayReadOnlyAndWriteOnlyWritable, ModelWithBackticksInDescription, ModelWithBoolean, ModelWithCircularReference, ModelWithConst, ModelWithConstantSizeArray, ModelWithDictionary, ModelWithDuplicateImports, ModelWithDuplicateProperties, ModelWithEnum, ModelWithEnumFromDescription, ModelWithEnumWithHyphen, ModelWithInteger, ModelWithNestedArrayEnums, ModelWithNestedArrayEnumsData, ModelWithNestedArrayEnumsDataBar, ModelWithNestedArrayEnumsDataFoo, ModelWithNestedCompositionEnums, ModelWithNestedEnums, ModelWithNestedProperties, ModelWithNullableObject, ModelWithNullableString, ModelWithNumericEnumUnion, ModelWithOneOfAndProperties, ModelWithOneOfEnum, ModelWithOrderedProperties, ModelWithPattern, ModelWithPatternWritable, ModelWithPrefixItemsConstantSizeArray, ModelWithProperties, ModelWithPropertiesWritable, ModelWithReadOnlyAndWriteOnly, ModelWithReadOnlyAndWriteOnlyWritable, ModelWithReference, ModelWithReferenceWritable, ModelWithString, ModelWithStringError, MultipartRequestData, MultipartResponseData, MultipartResponseResponse, MultipartResponseResponses, NestedAnyOfArraysNullable, NonAsciiæøåÆøÅöôêÊ字符串Data, NonAsciiæøåÆøÅöôêÊ字符串Response, NonAsciiæøåÆøÅöôêÊ字符串Responses, NonAsciiStringæøåÆøÅöôêÊ字符串, NullableObject, OneOfAllOfIssue, OneOfAllOfIssueWritable, OptionsCallWithoutParametersAndResponseData, Pageable, ParameterSimpleParameterUnused, PatchApiVbyApiVersionNoTagData, PatchApiVbyApiVersionNoTagResponses, PatchCallWithoutParametersAndResponseData, PostApiVbyApiVersionFormDataData, PostApiVbyApiVersionRequestBodyData, PostCallWithOptionalParamData, PostCallWithOptionalParamResponse, PostCallWithOptionalParamResponses, PostCallWithoutParametersAndResponseData, PostServiceWithEmptyTagResponse, PostServiceWithEmptyTagResponse2, PutCallWithoutParametersAndResponseData, PutWithFormUrlEncodedData, SchemaWithFormRestrictedKeys, SimpleBoolean, SimpleFile, SimpleFormData, SimpleInteger, SimpleParameter, SimpleReference, SimpleRequestBody, SimpleString, SimpleStringWithPattern, TestErrorCodeData, TestErrorCodeErrors, TestErrorCodeResponses, TypesData, TypesResponse, TypesResponses, UploadFileData, UploadFileResponse, UploadFileResponses, XFooBar } from './types.gen.js';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-axios/tsconfig-nodenext-sdk/sdk.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport { client } from './client.gen.js';\nimport { type Client, formDataBodySerializer, type Options as Options2, type TDataShape, urlSearchParamsBodySerializer } from './client/index.js';\nimport type { ApiVVersionODataControllerCountData, ApiVVersionODataControllerCountResponses, CallToTestOrderOfParamsData, CallWithDefaultOptionalParametersData, CallWithDefaultParametersData, CallWithDescriptionsData, CallWithDuplicateResponsesData, CallWithDuplicateResponsesErrors, CallWithDuplicateResponsesResponses, CallWithNoContentResponseData, CallWithNoContentResponseResponses, CallWithParametersData, CallWithResponseAndNoContentResponseData, CallWithResponseAndNoContentResponseResponses, CallWithResponseData, CallWithResponseResponses, CallWithResponsesData, CallWithResponsesErrors, CallWithResponsesResponses, CallWithResultFromHeaderData, CallWithResultFromHeaderErrors, CallWithResultFromHeaderResponses, CallWithWeirdParameterNamesData, CollectionFormatData, ComplexParamsData, ComplexParamsResponses, ComplexTypesData, ComplexTypesErrors, ComplexTypesResponses, DeleteCallWithoutParametersAndResponseData, DeleteFooData3, DeprecatedCallData, DummyAData, DummyAResponses, DummyBData, DummyBResponses, DuplicateName2Data, DuplicateName3Data, DuplicateName4Data, DuplicateNameData, ExportData, FileResponseData, FileResponseResponses, FooWowData, FooWowResponses, GetApiVbyApiVersionSimpleOperationData, GetApiVbyApiVersionSimpleOperationErrors, GetApiVbyApiVersionSimpleOperationResponses, GetCallWithOptionalParamData, GetCallWithoutParametersAndResponseData, HeadCallWithoutParametersAndResponseData, ImportData, ImportResponses, MultipartRequestData, MultipartResponseData, MultipartResponseResponses, NonAsciiæøåÆøÅöôêÊ字符串Data, NonAsciiæøåÆøÅöôêÊ字符串Responses, OptionsCallWithoutParametersAndResponseData, PatchApiVbyApiVersionNoTagData, PatchApiVbyApiVersionNoTagResponses, PatchCallWithoutParametersAndResponseData, PostApiVbyApiVersionFormDataData, PostApiVbyApiVersionRequestBodyData, PostCallWithOptionalParamData, PostCallWithOptionalParamResponses, PostCallWithoutParametersAndResponseData, PutCallWithoutParametersAndResponseData, PutWithFormUrlEncodedData, TestErrorCodeData, TestErrorCodeErrors, TestErrorCodeResponses, TypesData, TypesResponses, UploadFileData, UploadFileResponses } from './types.gen.js';\n\nexport type Options<TData extends TDataShape = TDataShape, ThrowOnError extends boolean = boolean> = Options2<TData, ThrowOnError> & {\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\nexport const export_ = <ThrowOnError extends boolean = false>(options?: Options<ExportData, ThrowOnError>) => (options?.client ?? client).get<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/no+tag', ...options });\n\nexport const patchApiVbyApiVersionNoTag = <ThrowOnError extends boolean = false>(options?: Options<PatchApiVbyApiVersionNoTagData, ThrowOnError>) => (options?.client ?? client).patch<PatchApiVbyApiVersionNoTagResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/no+tag', ...options });\n\nexport const import_ = <ThrowOnError extends boolean = false>(options: Options<ImportData, ThrowOnError>) => (options.client ?? client).post<ImportResponses, unknown, ThrowOnError>({\n    responseType: 'json',\n    url: '/api/v{api-version}/no+tag',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options.headers\n    }\n});\n\nexport const fooWow = <ThrowOnError extends boolean = false>(options?: Options<FooWowData, ThrowOnError>) => (options?.client ?? client).put<FooWowResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/no+tag', ...options });\n\nexport const apiVVersionODataControllerCount = <ThrowOnError extends boolean = false>(options?: Options<ApiVVersionODataControllerCountData, ThrowOnError>) => (options?.client ?? client).get<ApiVVersionODataControllerCountResponses, unknown, ThrowOnError>({\n    responseType: 'json',\n    url: '/api/v{api-version}/simple/$count',\n    ...options\n});\n\nexport const getApiVbyApiVersionSimpleOperation = <ThrowOnError extends boolean = false>(options: Options<GetApiVbyApiVersionSimpleOperationData, ThrowOnError>) => (options.client ?? client).get<GetApiVbyApiVersionSimpleOperationResponses, GetApiVbyApiVersionSimpleOperationErrors, ThrowOnError>({\n    responseType: 'json',\n    url: '/api/v{api-version}/simple:operation',\n    ...options\n});\n\nexport const deleteCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<DeleteCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).delete<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const getCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<GetCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).get<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const headCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<HeadCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).head<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const optionsCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<OptionsCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).options<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const patchCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<PatchCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).patch<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const postCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<PostCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).post<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const putCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<PutCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).put<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const deleteFoo = <ThrowOnError extends boolean = false>(options: Options<DeleteFooData3, ThrowOnError>) => (options.client ?? client).delete<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/foo/{foo_param}/bar/{BarParam}', ...options });\n\nexport const callWithDescriptions = <ThrowOnError extends boolean = false>(options?: Options<CallWithDescriptionsData, ThrowOnError>) => (options?.client ?? client).post<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/descriptions', ...options });\n\n/**\n * @deprecated\n */\nexport const deprecatedCall = <ThrowOnError extends boolean = false>(options: Options<DeprecatedCallData, ThrowOnError>) => (options.client ?? client).post<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/parameters/deprecated', ...options });\n\nexport const callWithParameters = <ThrowOnError extends boolean = false>(options: Options<CallWithParametersData, ThrowOnError>) => (options.client ?? client).post<unknown, unknown, ThrowOnError>({\n    url: '/api/v{api-version}/parameters/{parameterPath}',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options.headers\n    }\n});\n\nexport const callWithWeirdParameterNames = <ThrowOnError extends boolean = false>(options: Options<CallWithWeirdParameterNamesData, ThrowOnError>) => (options.client ?? client).post<unknown, unknown, ThrowOnError>({\n    url: '/api/v{api-version}/parameters/{parameter.path.1}/{parameter-path-2}/{PARAMETER-PATH-3}',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options.headers\n    }\n});\n\nexport const getCallWithOptionalParam = <ThrowOnError extends boolean = false>(options: Options<GetCallWithOptionalParamData, ThrowOnError>) => (options.client ?? client).get<unknown, unknown, ThrowOnError>({\n    url: '/api/v{api-version}/parameters',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options.headers\n    }\n});\n\nexport const postCallWithOptionalParam = <ThrowOnError extends boolean = false>(options: Options<PostCallWithOptionalParamData, ThrowOnError>) => (options.client ?? client).post<PostCallWithOptionalParamResponses, unknown, ThrowOnError>({\n    responseType: 'json',\n    url: '/api/v{api-version}/parameters',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options.headers\n    }\n});\n\nexport const postApiVbyApiVersionRequestBody = <ThrowOnError extends boolean = false>(options?: Options<PostApiVbyApiVersionRequestBodyData, ThrowOnError>) => (options?.client ?? client).post<unknown, unknown, ThrowOnError>({\n    url: '/api/v{api-version}/requestBody',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options?.headers\n    }\n});\n\nexport const postApiVbyApiVersionFormData = <ThrowOnError extends boolean = false>(options?: Options<PostApiVbyApiVersionFormDataData, ThrowOnError>) => (options?.client ?? client).post<unknown, unknown, ThrowOnError>({\n    ...formDataBodySerializer,\n    url: '/api/v{api-version}/formData',\n    ...options,\n    headers: {\n        'Content-Type': null,\n        ...options?.headers\n    }\n});\n\nexport const callWithDefaultParameters = <ThrowOnError extends boolean = false>(options?: Options<CallWithDefaultParametersData, ThrowOnError>) => (options?.client ?? client).get<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/defaults', ...options });\n\nexport const callWithDefaultOptionalParameters = <ThrowOnError extends boolean = false>(options?: Options<CallWithDefaultOptionalParametersData, ThrowOnError>) => (options?.client ?? client).post<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/defaults', ...options });\n\nexport const callToTestOrderOfParams = <ThrowOnError extends boolean = false>(options: Options<CallToTestOrderOfParamsData, ThrowOnError>) => (options.client ?? client).put<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/defaults', ...options });\n\nexport const duplicateName = <ThrowOnError extends boolean = false>(options?: Options<DuplicateNameData, ThrowOnError>) => (options?.client ?? client).delete<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/duplicate', ...options });\n\nexport const duplicateName2 = <ThrowOnError extends boolean = false>(options?: Options<DuplicateName2Data, ThrowOnError>) => (options?.client ?? client).get<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/duplicate', ...options });\n\nexport const duplicateName3 = <ThrowOnError extends boolean = false>(options?: Options<DuplicateName3Data, ThrowOnError>) => (options?.client ?? client).post<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/duplicate', ...options });\n\nexport const duplicateName4 = <ThrowOnError extends boolean = false>(options?: Options<DuplicateName4Data, ThrowOnError>) => (options?.client ?? client).put<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/duplicate', ...options });\n\nexport const callWithNoContentResponse = <ThrowOnError extends boolean = false>(options?: Options<CallWithNoContentResponseData, ThrowOnError>) => (options?.client ?? client).get<CallWithNoContentResponseResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/no-content', ...options });\n\nexport const callWithResponseAndNoContentResponse = <ThrowOnError extends boolean = false>(options?: Options<CallWithResponseAndNoContentResponseData, ThrowOnError>) => (options?.client ?? client).get<CallWithResponseAndNoContentResponseResponses, unknown, ThrowOnError>({\n    responseType: 'json',\n    url: '/api/v{api-version}/multiple-tags/response-and-no-content',\n    ...options\n});\n\nexport const dummyA = <ThrowOnError extends boolean = false>(options?: Options<DummyAData, ThrowOnError>) => (options?.client ?? client).get<DummyAResponses, unknown, ThrowOnError>({\n    responseType: 'json',\n    url: '/api/v{api-version}/multiple-tags/a',\n    ...options\n});\n\nexport const dummyB = <ThrowOnError extends boolean = false>(options?: Options<DummyBData, ThrowOnError>) => (options?.client ?? client).get<DummyBResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/multiple-tags/b', ...options });\n\nexport const callWithResponse = <ThrowOnError extends boolean = false>(options?: Options<CallWithResponseData, ThrowOnError>) => (options?.client ?? client).get<CallWithResponseResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/response', ...options });\n\nexport const callWithDuplicateResponses = <ThrowOnError extends boolean = false>(options?: Options<CallWithDuplicateResponsesData, ThrowOnError>) => (options?.client ?? client).post<CallWithDuplicateResponsesResponses, CallWithDuplicateResponsesErrors, ThrowOnError>({\n    responseType: 'json',\n    url: '/api/v{api-version}/response',\n    ...options\n});\n\nexport const callWithResponses = <ThrowOnError extends boolean = false>(options?: Options<CallWithResponsesData, ThrowOnError>) => (options?.client ?? client).put<CallWithResponsesResponses, CallWithResponsesErrors, ThrowOnError>({\n    responseType: 'json',\n    url: '/api/v{api-version}/response',\n    ...options\n});\n\nexport const collectionFormat = <ThrowOnError extends boolean = false>(options: Options<CollectionFormatData, ThrowOnError>) => (options.client ?? client).get<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/collectionFormat', ...options });\n\nexport const types = <ThrowOnError extends boolean = false>(options: Options<TypesData, ThrowOnError>) => (options.client ?? client).get<TypesResponses, unknown, ThrowOnError>({\n    responseType: 'json',\n    url: '/api/v{api-version}/types',\n    ...options\n});\n\nexport const uploadFile = <ThrowOnError extends boolean = false>(options: Options<UploadFileData, ThrowOnError>) => (options.client ?? client).post<UploadFileResponses, unknown, ThrowOnError>({\n    ...urlSearchParamsBodySerializer,\n    responseType: 'json',\n    url: '/api/v{api-version}/upload',\n    ...options,\n    headers: {\n        'Content-Type': 'application/x-www-form-urlencoded',\n        ...options.headers\n    }\n});\n\nexport const fileResponse = <ThrowOnError extends boolean = false>(options: Options<FileResponseData, ThrowOnError>) => (options.client ?? client).get<FileResponseResponses, unknown, ThrowOnError>({\n    responseType: 'blob',\n    url: '/api/v{api-version}/file/{id}',\n    ...options\n});\n\nexport const complexTypes = <ThrowOnError extends boolean = false>(options: Options<ComplexTypesData, ThrowOnError>) => (options.client ?? client).get<ComplexTypesResponses, ComplexTypesErrors, ThrowOnError>({\n    querySerializer: { parameters: { parameterObject: { object: { style: 'form' } } } },\n    responseType: 'json',\n    url: '/api/v{api-version}/complex',\n    ...options\n});\n\nexport const multipartResponse = <ThrowOnError extends boolean = false>(options?: Options<MultipartResponseData, ThrowOnError>) => (options?.client ?? client).get<MultipartResponseResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/multipart', ...options });\n\nexport const multipartRequest = <ThrowOnError extends boolean = false>(options?: Options<MultipartRequestData, ThrowOnError>) => (options?.client ?? client).post<unknown, unknown, ThrowOnError>({\n    ...formDataBodySerializer,\n    url: '/api/v{api-version}/multipart',\n    ...options,\n    headers: {\n        'Content-Type': null,\n        ...options?.headers\n    }\n});\n\nexport const complexParams = <ThrowOnError extends boolean = false>(options: Options<ComplexParamsData, ThrowOnError>) => (options.client ?? client).put<ComplexParamsResponses, unknown, ThrowOnError>({\n    responseType: 'json',\n    url: '/api/v{api-version}/complex/{id}',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json-patch+json',\n        ...options.headers\n    }\n});\n\nexport const callWithResultFromHeader = <ThrowOnError extends boolean = false>(options?: Options<CallWithResultFromHeaderData, ThrowOnError>) => (options?.client ?? client).post<CallWithResultFromHeaderResponses, CallWithResultFromHeaderErrors, ThrowOnError>({ url: '/api/v{api-version}/header', ...options });\n\nexport const testErrorCode = <ThrowOnError extends boolean = false>(options: Options<TestErrorCodeData, ThrowOnError>) => (options.client ?? client).post<TestErrorCodeResponses, TestErrorCodeErrors, ThrowOnError>({ url: '/api/v{api-version}/error', ...options });\n\nexport const nonAsciiæøåÆøÅöôêÊ字符串 = <ThrowOnError extends boolean = false>(options: Options<NonAsciiæøåÆøÅöôêÊ字符串Data, ThrowOnError>) => (options.client ?? client).post<NonAsciiæøåÆøÅöôêÊ字符串Responses, unknown, ThrowOnError>({\n    responseType: 'json',\n    url: '/api/v{api-version}/non-ascii-æøåÆØÅöôêÊ字符串',\n    ...options\n});\n\n/**\n * Login User\n */\nexport const putWithFormUrlEncoded = <ThrowOnError extends boolean = false>(options: Options<PutWithFormUrlEncodedData, ThrowOnError>) => (options.client ?? client).put<unknown, unknown, ThrowOnError>({\n    ...urlSearchParamsBodySerializer,\n    url: '/api/v{api-version}/non-ascii-æøåÆØÅöôêÊ字符串',\n    ...options,\n    headers: {\n        'Content-Type': 'application/x-www-form-urlencoded',\n        ...options.headers\n    }\n});\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-axios/tsconfig-nodenext-sdk/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type ClientOptions = {\n    baseURL: 'http://localhost:3000/base' | (string & {});\n};\n\n/**\n * Model with number-only name\n */\nexport type _400 = string;\n\n/**\n * External ref to shared model (A)\n */\nexport type ExternalRefA = ExternalSharedModel;\n\n/**\n * External ref to shared model (B)\n */\nexport type ExternalRefB = ExternalSharedModel;\n\n/**\n * Testing multiline comments in string: First line\n * Second line\n *\n * Fourth line\n */\nexport type CamelCaseCommentWithBreaks = number;\n\n/**\n * Testing multiline comments in string: First line\n * Second line\n *\n * Fourth line\n */\nexport type CommentWithBreaks = number;\n\n/**\n * Testing backticks in string: `backticks` and ```multiple backticks``` should work\n */\nexport type CommentWithBackticks = number;\n\n/**\n * Testing backticks and quotes in string: `backticks`, 'quotes', \"double quotes\" and ```multiple backticks``` should work\n */\nexport type CommentWithBackticksAndQuotes = number;\n\n/**\n * Testing slashes in string: \\backwards\\\\\\ and /forwards/// should work\n */\nexport type CommentWithSlashes = number;\n\n/**\n * Testing expression placeholders in string: ${expression} should work\n */\nexport type CommentWithExpressionPlaceholders = number;\n\n/**\n * Testing quotes in string: 'single quote''' and \"double quotes\"\"\" should work\n */\nexport type CommentWithQuotes = number;\n\n/**\n * Testing reserved characters in string: * inline * and ** inline ** should work\n */\nexport type CommentWithReservedCharacters = number;\n\n/**\n * This is a simple number\n */\nexport type SimpleInteger = number;\n\n/**\n * This is a simple boolean\n */\nexport type SimpleBoolean = boolean;\n\n/**\n * This is a simple string\n */\nexport type SimpleString = string;\n\n/**\n * A string with non-ascii (unicode) characters valid in typescript identifiers (æøåÆØÅöÔèÈ字符串)\n */\nexport type NonAsciiStringæøåÆøÅöôêÊ字符串 = string;\n\n/**\n * This is a simple file\n */\nexport type SimpleFile = Blob | File;\n\n/**\n * This is a simple reference\n */\nexport type SimpleReference = ModelWithString;\n\n/**\n * This is a simple string\n */\nexport type SimpleStringWithPattern = string | null;\n\n/**\n * This is a simple enum with strings\n */\nexport type EnumWithStrings = 'Success' | 'Warning' | 'Error' | '\\'Single Quote\\'' | '\"Double Quotes\"' | 'Non-ascii: øæåôöØÆÅÔÖ字符串';\n\nexport type EnumWithReplacedCharacters = '\\'Single Quote\\'' | '\"Double Quotes\"' | 'øæåôöØÆÅÔÖ字符串' | 3.1 | '';\n\n/**\n * This is a simple enum with numbers\n */\nexport type EnumWithNumbers = 1 | 2 | 3 | 1.1 | 1.2 | 1.3 | 100 | 200 | 300 | -100 | -200 | -300 | -1.1 | -1.2 | -1.3;\n\n/**\n * Success=1,Warning=2,Error=3\n */\nexport type EnumFromDescription = number;\n\n/**\n * This is a simple enum with numbers\n */\nexport type EnumWithExtensions = 200 | 400 | 500;\n\nexport type EnumWithXEnumNames = 0 | 1 | 2;\n\n/**\n * This is a simple array with numbers\n */\nexport type ArrayWithNumbers = Array<number>;\n\n/**\n * This is a simple array with booleans\n */\nexport type ArrayWithBooleans = Array<boolean>;\n\n/**\n * This is a simple array with strings\n */\nexport type ArrayWithStrings = Array<string>;\n\n/**\n * This is a simple array with references\n */\nexport type ArrayWithReferences = Array<ModelWithString>;\n\n/**\n * This is a simple array containing an array\n */\nexport type ArrayWithArray = Array<Array<ModelWithString>>;\n\n/**\n * This is a simple array with properties\n */\nexport type ArrayWithProperties = Array<{\n    '16x16'?: CamelCaseCommentWithBreaks;\n    bar?: string;\n}>;\n\n/**\n * This is a simple array with any of properties\n */\nexport type ArrayWithAnyOfProperties = Array<{\n    foo?: string;\n} | {\n    bar?: string;\n}>;\n\nexport type AnyOfAnyAndNull = {\n    data?: unknown | null;\n};\n\n/**\n * This is a simple array with any of properties\n */\nexport type AnyOfArrays = {\n    results?: Array<{\n        foo?: string;\n    } | {\n        bar?: string;\n    }>;\n};\n\n/**\n * This is a string dictionary\n */\nexport type DictionaryWithString = {\n    [key: string]: string;\n};\n\nexport type DictionaryWithPropertiesAndAdditionalProperties = {\n    foo?: number;\n    bar?: boolean;\n    [key: string]: string | number | boolean | undefined;\n};\n\n/**\n * This is a string reference\n */\nexport type DictionaryWithReference = {\n    [key: string]: ModelWithString;\n};\n\n/**\n * This is a complex dictionary\n */\nexport type DictionaryWithArray = {\n    [key: string]: Array<ModelWithString>;\n};\n\n/**\n * This is a string dictionary\n */\nexport type DictionaryWithDictionary = {\n    [key: string]: {\n        [key: string]: string;\n    };\n};\n\n/**\n * This is a complex dictionary\n */\nexport type DictionaryWithProperties = {\n    [key: string]: {\n        foo?: string;\n        bar?: string;\n    };\n};\n\n/**\n * This is a model with one number property\n */\nexport type ModelWithInteger = {\n    /**\n     * This is a simple number property\n     */\n    prop?: number;\n};\n\n/**\n * This is a model with one boolean property\n */\nexport type ModelWithBoolean = {\n    /**\n     * This is a simple boolean property\n     */\n    prop?: boolean;\n};\n\n/**\n * This is a model with one string property\n */\nexport type ModelWithString = {\n    /**\n     * This is a simple string property\n     */\n    prop?: string;\n};\n\n/**\n * This is a model with one string property\n */\nexport type ModelWithStringError = {\n    /**\n     * This is a simple string property\n     */\n    prop?: string;\n};\n\n/**\n * `Comment` or `VoiceComment`. The JSON object for adding voice comments to tickets is different. See [Adding voice comments to tickets](/documentation/ticketing/managing-tickets/adding-voice-comments-to-tickets)\n */\nexport type ModelFromZendesk = string;\n\n/**\n * This is a model with one string property\n */\nexport type ModelWithNullableString = {\n    /**\n     * This is a simple string property\n     */\n    nullableProp1?: string | null;\n    /**\n     * This is a simple string property\n     */\n    nullableRequiredProp1: string | null;\n    /**\n     * This is a simple string property\n     */\n    nullableProp2?: string | null;\n    /**\n     * This is a simple string property\n     */\n    nullableRequiredProp2: string | null;\n    /**\n     * This is a simple enum with strings\n     */\n    'foo_bar-enum'?: 'Success' | 'Warning' | 'Error' | 'ØÆÅ字符串';\n};\n\n/**\n * This is a model with one enum\n */\nexport type ModelWithEnum = {\n    /**\n     * This is a simple enum with strings\n     */\n    'foo_bar-enum'?: 'Success' | 'Warning' | 'Error' | 'ØÆÅ字符串';\n    /**\n     * These are the HTTP error code enums\n     */\n    statusCode?: '100' | '200 FOO' | '300 FOO_BAR' | '400 foo-bar' | '500 foo.bar' | '600 foo&bar';\n    /**\n     * Simple boolean enum\n     */\n    bool?: true;\n};\n\n/**\n * This is a model with one enum with escaped name\n */\nexport type ModelWithEnumWithHyphen = {\n    /**\n     * Foo-Bar-Baz-Qux\n     */\n    'foo-bar-baz-qux'?: '3.0';\n};\n\n/**\n * This is a model with one enum\n */\nexport type ModelWithEnumFromDescription = {\n    /**\n     * Success=1,Warning=2,Error=3\n     */\n    test?: number;\n};\n\n/**\n * This is a model with nested enums\n */\nexport type ModelWithNestedEnums = {\n    dictionaryWithEnum?: {\n        [key: string]: 'Success' | 'Warning' | 'Error';\n    };\n    dictionaryWithEnumFromDescription?: {\n        [key: string]: number;\n    };\n    arrayWithEnum?: Array<'Success' | 'Warning' | 'Error'>;\n    arrayWithDescription?: Array<number>;\n    /**\n     * This is a simple enum with strings\n     */\n    'foo_bar-enum'?: 'Success' | 'Warning' | 'Error' | 'ØÆÅ字符串';\n};\n\n/**\n * This is a model with one property containing a reference\n */\nexport type ModelWithReference = {\n    prop?: ModelWithProperties;\n};\n\n/**\n * This is a model with one property containing an array\n */\nexport type ModelWithArrayReadOnlyAndWriteOnly = {\n    prop?: Array<ModelWithReadOnlyAndWriteOnly>;\n    propWithFile?: Array<Blob | File>;\n    propWithNumber?: Array<number>;\n};\n\n/**\n * This is a model with one property containing an array\n */\nexport type ModelWithArray = {\n    prop?: Array<ModelWithString>;\n    propWithFile?: Array<Blob | File>;\n    propWithNumber?: Array<number>;\n};\n\n/**\n * This is a model with one property containing a dictionary\n */\nexport type ModelWithDictionary = {\n    prop?: {\n        [key: string]: string;\n    };\n};\n\n/**\n * This is a deprecated model with a deprecated property\n *\n * @deprecated\n */\nexport type DeprecatedModel = {\n    /**\n     * This is a deprecated property\n     *\n     * @deprecated\n     */\n    prop?: string;\n};\n\n/**\n * This is a model with one property containing a circular reference\n */\nexport type ModelWithCircularReference = {\n    prop?: ModelWithCircularReference;\n};\n\n/**\n * This is a model with one property with a 'one of' relationship\n */\nexport type CompositionWithOneOf = {\n    propA?: ModelWithString | ModelWithEnum | ModelWithArray | ModelWithDictionary;\n};\n\n/**\n * This is a model with one property with a 'one of' relationship where the options are not $ref\n */\nexport type CompositionWithOneOfAnonymous = {\n    propA?: {\n        propA?: string;\n    } | string | number;\n};\n\n/**\n * Circle\n */\nexport type ModelCircle = {\n    kind: string;\n    radius?: number;\n};\n\n/**\n * Square\n */\nexport type ModelSquare = {\n    kind: string;\n    sideLength?: number;\n};\n\n/**\n * This is a model with one property with a 'one of' relationship where the options are not $ref\n */\nexport type CompositionWithOneOfDiscriminator = ({\n    kind: 'circle';\n} & ModelCircle) | ({\n    kind: 'square';\n} & ModelSquare);\n\n/**\n * This is a model with one property with a 'any of' relationship\n */\nexport type CompositionWithAnyOf = {\n    propA?: ModelWithString | ModelWithEnum | ModelWithArray | ModelWithDictionary;\n};\n\n/**\n * This is a model with one property with a 'any of' relationship where the options are not $ref\n */\nexport type CompositionWithAnyOfAnonymous = {\n    propA?: {\n        propA?: string;\n    } | string | number;\n};\n\n/**\n * This is a model with nested 'any of' property with a type null\n */\nexport type CompositionWithNestedAnyAndTypeNull = {\n    propA?: Array<ModelWithDictionary | null> | Array<ModelWithArray | null>;\n};\n\nexport type _3eNum1Период = 'Bird' | 'Dog';\n\nexport type ConstValue = 'ConstValue';\n\n/**\n * This is a model with one property with a 'any of' relationship where the options are not $ref\n */\nexport type CompositionWithNestedAnyOfAndNull = {\n    /**\n     * Scopes\n     */\n    propA?: Array<_3eNum1Период | ConstValue> | null;\n};\n\n/**\n * This is a model with one property with a 'one of' relationship\n */\nexport type CompositionWithOneOfAndNullable = {\n    propA?: {\n        boolean?: boolean;\n    } | ModelWithEnum | ModelWithArray | ModelWithDictionary | null;\n};\n\n/**\n * This is a model that contains a simple dictionary within composition\n */\nexport type CompositionWithOneOfAndSimpleDictionary = {\n    propA?: boolean | {\n        [key: string]: number;\n    };\n};\n\n/**\n * This is a model that contains a dictionary of simple arrays within composition\n */\nexport type CompositionWithOneOfAndSimpleArrayDictionary = {\n    propA?: boolean | {\n        [key: string]: Array<boolean>;\n    };\n};\n\n/**\n * This is a model that contains a dictionary of complex arrays (composited) within composition\n */\nexport type CompositionWithOneOfAndComplexArrayDictionary = {\n    propA?: boolean | {\n        [key: string]: Array<number | string>;\n    };\n};\n\n/**\n * This is a model with one property with a 'all of' relationship\n */\nexport type CompositionWithAllOfAndNullable = {\n    propA?: ({\n        boolean?: boolean;\n    } & ModelWithEnum & ModelWithArray & ModelWithDictionary) | null;\n};\n\n/**\n * This is a model with one property with a 'any of' relationship\n */\nexport type CompositionWithAnyOfAndNullable = {\n    propA?: {\n        boolean?: boolean;\n    } | ModelWithEnum | ModelWithArray | ModelWithDictionary | null;\n};\n\n/**\n * This is a base model with two simple optional properties\n */\nexport type CompositionBaseModel = {\n    firstName?: string;\n    lastname?: string;\n};\n\n/**\n * This is a model that extends the base model\n */\nexport type CompositionExtendedModel = CompositionBaseModel & {\n    age: number;\n    firstName: string;\n    lastname: string;\n};\n\n/**\n * This is a model with one nested property\n */\nexport type ModelWithProperties = {\n    required: string;\n    readonly requiredAndReadOnly: string;\n    requiredAndNullable: string | null;\n    string?: string;\n    number?: number;\n    boolean?: boolean;\n    reference?: ModelWithString;\n    'property with space'?: string;\n    default?: string;\n    try?: string;\n    readonly '@namespace.string'?: string;\n    readonly '@namespace.integer'?: number;\n};\n\n/**\n * This is a model with one nested property\n */\nexport type ModelWithNestedProperties = {\n    readonly first: {\n        readonly second: {\n            readonly third: string | null;\n        } | null;\n    } | null;\n};\n\n/**\n * This is a model with duplicated properties\n */\nexport type ModelWithDuplicateProperties = {\n    prop?: ModelWithString;\n};\n\n/**\n * This is a model with ordered properties\n */\nexport type ModelWithOrderedProperties = {\n    zebra?: string;\n    apple?: string;\n    hawaii?: string;\n};\n\n/**\n * This is a model with duplicated imports\n */\nexport type ModelWithDuplicateImports = {\n    propA?: ModelWithString;\n    propB?: ModelWithString;\n    propC?: ModelWithString;\n};\n\n/**\n * This is a model that extends another model\n */\nexport type ModelThatExtends = ModelWithString & {\n    propExtendsA?: string;\n    propExtendsB?: ModelWithString;\n};\n\n/**\n * This is a model that extends another model\n */\nexport type ModelThatExtendsExtends = ModelWithString & ModelThatExtends & {\n    propExtendsC?: string;\n    propExtendsD?: ModelWithString;\n};\n\n/**\n * This is a model that contains a some patterns\n */\nexport type ModelWithPattern = {\n    key: string;\n    name: string;\n    readonly enabled?: boolean;\n    readonly modified?: string;\n    id?: string;\n    text?: string;\n    patternWithSingleQuotes?: string;\n    patternWithNewline?: string;\n    patternWithBacktick?: string;\n    patternWithUnicode?: string;\n};\n\nexport type File = {\n    /**\n     * Id\n     */\n    readonly id?: string;\n    /**\n     * Updated at\n     */\n    readonly updated_at?: string;\n    /**\n     * Created at\n     */\n    readonly created_at?: string;\n    /**\n     * Mime\n     */\n    mime: string;\n    /**\n     * File\n     */\n    readonly file?: string;\n};\n\nexport type Default = {\n    name?: string;\n};\n\nexport type Pageable = {\n    page?: number;\n    size?: number;\n    sort?: Array<string>;\n};\n\n/**\n * This is a free-form object without additionalProperties.\n */\nexport type FreeFormObjectWithoutAdditionalProperties = {\n    [key: string]: unknown;\n};\n\n/**\n * This is a free-form object with additionalProperties: true.\n */\nexport type FreeFormObjectWithAdditionalPropertiesEqTrue = {\n    [key: string]: unknown;\n};\n\n/**\n * This is a free-form object with additionalProperties: {}.\n */\nexport type FreeFormObjectWithAdditionalPropertiesEqEmptyObject = {\n    [key: string]: unknown;\n};\n\nexport type ModelWithConst = {\n    String?: 'String';\n    number?: 0;\n    null?: null;\n    withType?: 'Some string';\n};\n\n/**\n * This is a model with one property and additionalProperties: true\n */\nexport type ModelWithAdditionalPropertiesEqTrue = {\n    /**\n     * This is a simple string property\n     */\n    prop?: string;\n    [key: string]: unknown;\n};\n\nexport type NestedAnyOfArraysNullable = {\n    nullableArray?: Array<string | boolean> | null;\n};\n\nexport type CompositionWithOneOfAndProperties = ({\n    foo: SimpleParameter;\n} | {\n    bar: NonAsciiStringæøåÆøÅöôêÊ字符串;\n}) & {\n    baz: number | null;\n    qux: number;\n};\n\n/**\n * An object that can be null\n */\nexport type NullableObject = {\n    foo?: string;\n} | null;\n\n/**\n * Some % character\n */\nexport type CharactersInDescription = string;\n\nexport type ModelWithNullableObject = {\n    data?: NullableObject;\n};\n\n/**\n * An object with additional properties that can be null (anyOf ref + null)\n */\nexport type ModelWithAdditionalPropertiesRef = {\n    [key: string]: NullableObject | null;\n};\n\nexport type ModelWithOneOfEnum = {\n    foo: 'Bar';\n} | {\n    foo: 'Baz';\n} | {\n    foo: 'Qux';\n} | {\n    content: string;\n    foo: 'Quux';\n} | {\n    content: [\n        string,\n        string\n    ];\n    foo: 'Corge';\n};\n\nexport type ModelWithNestedArrayEnumsDataFoo = 'foo' | 'bar';\n\nexport type ModelWithNestedArrayEnumsDataBar = 'baz' | 'qux';\n\nexport type ModelWithNestedArrayEnumsData = {\n    foo?: Array<ModelWithNestedArrayEnumsDataFoo>;\n    bar?: Array<ModelWithNestedArrayEnumsDataBar>;\n};\n\nexport type ModelWithNestedArrayEnums = {\n    array_strings?: Array<string>;\n    data?: ModelWithNestedArrayEnumsData;\n};\n\nexport type ModelWithNestedCompositionEnums = {\n    foo?: ModelWithNestedArrayEnumsDataFoo;\n};\n\nexport type ModelWithReadOnlyAndWriteOnly = {\n    foo: string;\n    readonly bar: string;\n};\n\nexport type ModelWithConstantSizeArray = [\n    number,\n    number\n];\n\nexport type ModelWithAnyOfConstantSizeArray = [\n    number | string,\n    number | string,\n    number | string\n];\n\nexport type ModelWithPrefixItemsConstantSizeArray = [\n    ModelWithInteger,\n    number | string,\n    string\n];\n\nexport type ModelWithAnyOfConstantSizeArrayNullable = [\n    number | null | string,\n    number | null | string,\n    number | null | string\n];\n\nexport type ModelWithAnyOfConstantSizeArrayWithNSizeAndOptions = [\n    number | Import,\n    number | Import\n];\n\nexport type ModelWithAnyOfConstantSizeArrayAndIntersect = [\n    number & string,\n    number & string\n];\n\nexport type ModelWithNumericEnumUnion = {\n    /**\n     * Период\n     */\n    value?: -10 | -1 | 0 | 1 | 3 | 6 | 12;\n};\n\n/**\n * Some description with `back ticks`\n */\nexport type ModelWithBackticksInDescription = {\n    /**\n     * The template `that` should be used for parsing and importing the contents of the CSV file.\n     *\n     * <br/><p>There is one placeholder currently supported:<ul>     <li><b>${x}</b> - refers to the n-th column in the CSV file, e.g. ${1}, ${2}, ...)</li></ul><p>Example of a correct JSON template:</p>\n     * <pre>\n     * [\n     * {\n     * \"resourceType\": \"Asset\",\n     * \"identifier\": {\n     * \"name\": \"${1}\",\n     * \"domain\": {\n     * \"name\": \"${2}\",\n     * \"community\": {\n     * \"name\": \"Some Community\"\n     * }\n     * }\n     * },\n     * \"attributes\" : {\n     * \"00000000-0000-0000-0000-000000003115\" : [ {\n     * \"value\" : \"${3}\"\n     * } ],\n     * \"00000000-0000-0000-0000-000000000222\" : [ {\n     * \"value\" : \"${4}\"\n     * } ]\n     * }\n     * }\n     * ]\n     * </pre>\n     */\n    template?: string;\n};\n\nexport type ModelWithOneOfAndProperties = (SimpleParameter | NonAsciiStringæøåÆøÅöôêÊ字符串) & {\n    baz: number | null;\n    qux: number;\n};\n\n/**\n * Model used to test deduplication strategy (unused)\n */\nexport type ParameterSimpleParameterUnused = string;\n\n/**\n * Model used to test deduplication strategy\n */\nexport type PostServiceWithEmptyTagResponse = string;\n\n/**\n * Model used to test deduplication strategy\n */\nexport type PostServiceWithEmptyTagResponse2 = string;\n\n/**\n * Model used to test deduplication strategy\n */\nexport type DeleteFooData = string;\n\n/**\n * Model used to test deduplication strategy\n */\nexport type DeleteFooData2 = string;\n\n/**\n * Model with restricted keyword name\n */\nexport type Import = string;\n\nexport type SchemaWithFormRestrictedKeys = {\n    description?: string;\n    'x-enum-descriptions'?: string;\n    'x-enum-varnames'?: string;\n    'x-enumNames'?: string;\n    title?: string;\n    object?: {\n        description?: string;\n        'x-enum-descriptions'?: string;\n        'x-enum-varnames'?: string;\n        'x-enumNames'?: string;\n        title?: string;\n    };\n    array?: Array<{\n        description?: string;\n        'x-enum-descriptions'?: string;\n        'x-enum-varnames'?: string;\n        'x-enumNames'?: string;\n        title?: string;\n    }>;\n};\n\n/**\n * This schema was giving PascalCase transformations a hard time\n */\nexport type IoK8sApimachineryPkgApisMetaV1DeleteOptions = {\n    /**\n     * Must be fulfilled before a deletion is carried out. If not possible, a 409 Conflict status will be returned.\n     */\n    preconditions?: IoK8sApimachineryPkgApisMetaV1Preconditions;\n};\n\n/**\n * This schema was giving PascalCase transformations a hard time\n */\nexport type IoK8sApimachineryPkgApisMetaV1Preconditions = {\n    /**\n     * Specifies the target ResourceVersion\n     */\n    resourceVersion?: string;\n    /**\n     * Specifies the target UID.\n     */\n    uid?: string;\n};\n\nexport type AdditionalPropertiesUnknownIssue = {\n    [key: string]: string | number;\n};\n\nexport type AdditionalPropertiesUnknownIssue2 = {\n    [key: string]: string | number;\n};\n\nexport type AdditionalPropertiesUnknownIssue3 = string & {\n    entries: {\n        [key: string]: AdditionalPropertiesUnknownIssue;\n    };\n};\n\nexport type AdditionalPropertiesIntegerIssue = {\n    value: number;\n    [key: string]: number;\n};\n\nexport type OneOfAllOfIssue = ((ConstValue | GenericSchemaDuplicateIssue1SystemBoolean) & _3eNum1Период) | GenericSchemaDuplicateIssue1SystemString;\n\nexport type GenericSchemaDuplicateIssue1SystemBoolean = {\n    item?: boolean;\n    error?: string | null;\n    readonly hasError?: boolean;\n    data?: {\n        [key: string]: never;\n    };\n};\n\nexport type GenericSchemaDuplicateIssue1SystemString = {\n    item?: string | null;\n    error?: string | null;\n    readonly hasError?: boolean;\n};\n\nexport type ExternalSharedModel = {\n    id: string;\n    name?: string;\n};\n\n/**\n * This is a model with one property containing a reference\n */\nexport type ModelWithReferenceWritable = {\n    prop?: ModelWithPropertiesWritable;\n};\n\n/**\n * This is a model with one property containing an array\n */\nexport type ModelWithArrayReadOnlyAndWriteOnlyWritable = {\n    prop?: Array<ModelWithReadOnlyAndWriteOnlyWritable>;\n    propWithFile?: Array<Blob | File>;\n    propWithNumber?: Array<number>;\n};\n\n/**\n * This is a model with one nested property\n */\nexport type ModelWithPropertiesWritable = {\n    required: string;\n    requiredAndNullable: string | null;\n    string?: string;\n    number?: number;\n    boolean?: boolean;\n    reference?: ModelWithString;\n    'property with space'?: string;\n    default?: string;\n    try?: string;\n};\n\n/**\n * This is a model that contains a some patterns\n */\nexport type ModelWithPatternWritable = {\n    key: string;\n    name: string;\n    id?: string;\n    text?: string;\n    patternWithSingleQuotes?: string;\n    patternWithNewline?: string;\n    patternWithBacktick?: string;\n    patternWithUnicode?: string;\n};\n\nexport type FileWritable = {\n    /**\n     * Mime\n     */\n    mime: string;\n};\n\nexport type ModelWithReadOnlyAndWriteOnlyWritable = {\n    foo: string;\n    baz: string;\n};\n\nexport type ModelWithAnyOfConstantSizeArrayWithNSizeAndOptionsWritable = [\n    number | Import,\n    number | Import\n];\n\nexport type AdditionalPropertiesUnknownIssueWritable = {\n    [key: string]: string | number;\n};\n\nexport type OneOfAllOfIssueWritable = ((ConstValue | GenericSchemaDuplicateIssue1SystemBoolean) & _3eNum1Период) | GenericSchemaDuplicateIssue1SystemString;\n\nexport type GenericSchemaDuplicateIssue1SystemBooleanWritable = {\n    item?: boolean;\n    error?: string | null;\n    data?: {\n        [key: string]: never;\n    };\n};\n\nexport type GenericSchemaDuplicateIssue1SystemStringWritable = {\n    item?: string | null;\n    error?: string | null;\n};\n\n/**\n * This is a reusable parameter\n */\nexport type SimpleParameter = string;\n\n/**\n * Parameter with illegal characters\n */\nexport type XFooBar = ModelWithString;\n\n/**\n * A reusable request body\n */\nexport type SimpleRequestBody = ModelWithString;\n\n/**\n * A reusable request body\n */\nexport type SimpleFormData = ModelWithString;\n\nexport type ExportData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no+tag';\n};\n\nexport type PatchApiVbyApiVersionNoTagData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no+tag';\n};\n\nexport type PatchApiVbyApiVersionNoTagResponses = {\n    /**\n     * OK\n     */\n    default: unknown;\n};\n\nexport type ImportData = {\n    body: ModelWithReadOnlyAndWriteOnlyWritable | ModelWithArrayReadOnlyAndWriteOnlyWritable;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no+tag';\n};\n\nexport type ImportResponses = {\n    /**\n     * Success\n     */\n    200: ModelFromZendesk;\n    /**\n     * Default success response\n     */\n    default: ModelWithReadOnlyAndWriteOnly;\n};\n\nexport type ImportResponse = ImportResponses[keyof ImportResponses];\n\nexport type FooWowData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no+tag';\n};\n\nexport type FooWowResponses = {\n    /**\n     * OK\n     */\n    default: unknown;\n};\n\nexport type ApiVVersionODataControllerCountData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple/$count';\n};\n\nexport type ApiVVersionODataControllerCountResponses = {\n    /**\n     * Success\n     */\n    200: ModelFromZendesk;\n};\n\nexport type ApiVVersionODataControllerCountResponse = ApiVVersionODataControllerCountResponses[keyof ApiVVersionODataControllerCountResponses];\n\nexport type GetApiVbyApiVersionSimpleOperationData = {\n    body?: never;\n    path: {\n        /**\n         * foo in method\n         */\n        foo_param: string;\n    };\n    query?: never;\n    url: '/api/v{api-version}/simple:operation';\n};\n\nexport type GetApiVbyApiVersionSimpleOperationErrors = {\n    /**\n     * Default error response\n     */\n    default: ModelWithBoolean;\n};\n\nexport type GetApiVbyApiVersionSimpleOperationError = GetApiVbyApiVersionSimpleOperationErrors[keyof GetApiVbyApiVersionSimpleOperationErrors];\n\nexport type GetApiVbyApiVersionSimpleOperationResponses = {\n    /**\n     * Response is a simple number\n     */\n    200: number;\n};\n\nexport type GetApiVbyApiVersionSimpleOperationResponse = GetApiVbyApiVersionSimpleOperationResponses[keyof GetApiVbyApiVersionSimpleOperationResponses];\n\nexport type DeleteCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type GetCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type HeadCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type OptionsCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type PatchCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type PostCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type PutCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type DeleteFooData3 = {\n    body?: never;\n    headers: {\n        /**\n         * Parameter with illegal characters\n         */\n        'x-Foo-Bar': ModelWithString;\n    };\n    path: {\n        /**\n         * foo in method\n         */\n        foo_param: string;\n        /**\n         * bar in method\n         */\n        BarParam: string;\n    };\n    query?: never;\n    url: '/api/v{api-version}/foo/{foo_param}/bar/{BarParam}';\n};\n\nexport type CallWithDescriptionsData = {\n    body?: never;\n    path?: never;\n    query?: {\n        /**\n         * Testing multiline comments in string: First line\n         * Second line\n         *\n         * Fourth line\n         */\n        parameterWithBreaks?: string;\n        /**\n         * Testing backticks in string: `backticks` and ```multiple backticks``` should work\n         */\n        parameterWithBackticks?: string;\n        /**\n         * Testing slashes in string: \\backwards\\\\\\ and /forwards/// should work\n         */\n        parameterWithSlashes?: string;\n        /**\n         * Testing expression placeholders in string: ${expression} should work\n         */\n        parameterWithExpressionPlaceholders?: string;\n        /**\n         * Testing quotes in string: 'single quote''' and \"double quotes\"\"\" should work\n         */\n        parameterWithQuotes?: string;\n        /**\n         * Testing reserved characters in string: * inline * and ** inline ** should work\n         */\n        parameterWithReservedCharacters?: string;\n    };\n    url: '/api/v{api-version}/descriptions';\n};\n\nexport type DeprecatedCallData = {\n    body?: never;\n    headers: {\n        /**\n         * This parameter is deprecated\n         *\n         * @deprecated\n         */\n        parameter: DeprecatedModel | null;\n    };\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/parameters/deprecated';\n};\n\nexport type CallWithParametersData = {\n    /**\n     * This is the parameter that goes into the body\n     */\n    body: {\n        [key: string]: unknown;\n    } | null;\n    headers: {\n        /**\n         * This is the parameter that goes into the header\n         */\n        parameterHeader: string | null;\n    };\n    path: {\n        /**\n         * This is the parameter that goes into the path\n         */\n        parameterPath: string | null;\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string | null;\n    };\n    query: {\n        foo_ref_enum?: ModelWithNestedArrayEnumsDataFoo;\n        foo_all_of_enum: ModelWithNestedArrayEnumsDataFoo;\n        /**\n         * This is the parameter that goes into the query params\n         */\n        cursor: string | null;\n    };\n    url: '/api/v{api-version}/parameters/{parameterPath}';\n};\n\nexport type CallWithWeirdParameterNamesData = {\n    /**\n     * This is the parameter that goes into the body\n     */\n    body: ModelWithString | null;\n    headers: {\n        /**\n         * This is the parameter that goes into the request header\n         */\n        'parameter.header': string | null;\n    };\n    path: {\n        /**\n         * This is the parameter that goes into the path\n         */\n        'parameter.path.1'?: string;\n        /**\n         * This is the parameter that goes into the path\n         */\n        'parameter-path-2'?: string;\n        /**\n         * This is the parameter that goes into the path\n         */\n        'PARAMETER-PATH-3'?: string;\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string | null;\n    };\n    query: {\n        /**\n         * This is the parameter with a reserved keyword\n         */\n        default?: string;\n        /**\n         * This is the parameter that goes into the request query params\n         */\n        'parameter-query': string | null;\n    };\n    url: '/api/v{api-version}/parameters/{parameter.path.1}/{parameter-path-2}/{PARAMETER-PATH-3}';\n};\n\nexport type GetCallWithOptionalParamData = {\n    /**\n     * This is a required parameter\n     */\n    body: ModelWithOneOfEnum;\n    path?: never;\n    query?: {\n        /**\n         * This is an optional parameter\n         */\n        page?: number;\n    };\n    url: '/api/v{api-version}/parameters';\n};\n\nexport type PostCallWithOptionalParamData = {\n    /**\n     * This is an optional parameter\n     */\n    body?: {\n        offset?: number | null;\n    };\n    path?: never;\n    query: {\n        /**\n         * This is a required parameter\n         */\n        parameter: Pageable;\n    };\n    url: '/api/v{api-version}/parameters';\n};\n\nexport type PostCallWithOptionalParamResponses = {\n    /**\n     * Response is a simple number\n     */\n    200: number;\n    /**\n     * Success\n     */\n    204: void;\n};\n\nexport type PostCallWithOptionalParamResponse = PostCallWithOptionalParamResponses[keyof PostCallWithOptionalParamResponses];\n\nexport type PostApiVbyApiVersionRequestBodyData = {\n    /**\n     * A reusable request body\n     */\n    body?: SimpleRequestBody;\n    path?: never;\n    query?: {\n        /**\n         * This is a reusable parameter\n         */\n        parameter?: string;\n    };\n    url: '/api/v{api-version}/requestBody';\n};\n\nexport type PostApiVbyApiVersionFormDataData = {\n    /**\n     * A reusable request body\n     */\n    body?: SimpleFormData;\n    path?: never;\n    query?: {\n        /**\n         * This is a reusable parameter\n         */\n        parameter?: string;\n    };\n    url: '/api/v{api-version}/formData';\n};\n\nexport type CallWithDefaultParametersData = {\n    body?: never;\n    path?: never;\n    query?: {\n        /**\n         * This is a simple string with default value\n         */\n        parameterString?: string | null;\n        /**\n         * This is a simple number with default value\n         */\n        parameterNumber?: number | null;\n        /**\n         * This is a simple boolean with default value\n         */\n        parameterBoolean?: boolean | null;\n        /**\n         * This is a simple enum with default value\n         */\n        parameterEnum?: 'Success' | 'Warning' | 'Error';\n        /**\n         * This is a simple model with default value\n         */\n        parameterModel?: ModelWithString | null;\n    };\n    url: '/api/v{api-version}/defaults';\n};\n\nexport type CallWithDefaultOptionalParametersData = {\n    body?: never;\n    path?: never;\n    query?: {\n        /**\n         * This is a simple string that is optional with default value\n         */\n        parameterString?: string;\n        /**\n         * This is a simple number that is optional with default value\n         */\n        parameterNumber?: number;\n        /**\n         * This is a simple boolean that is optional with default value\n         */\n        parameterBoolean?: boolean;\n        /**\n         * This is a simple enum that is optional with default value\n         */\n        parameterEnum?: 'Success' | 'Warning' | 'Error';\n        /**\n         * This is a simple model that is optional with default value\n         */\n        parameterModel?: ModelWithString;\n    };\n    url: '/api/v{api-version}/defaults';\n};\n\nexport type CallToTestOrderOfParamsData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * This is a optional string with default\n         */\n        parameterOptionalStringWithDefault?: string;\n        /**\n         * This is a optional string with empty default\n         */\n        parameterOptionalStringWithEmptyDefault?: string;\n        /**\n         * This is a optional string with no default\n         */\n        parameterOptionalStringWithNoDefault?: string;\n        /**\n         * This is a string with default\n         */\n        parameterStringWithDefault: string;\n        /**\n         * This is a string with empty default\n         */\n        parameterStringWithEmptyDefault: string;\n        /**\n         * This is a string with no default\n         */\n        parameterStringWithNoDefault: string;\n        /**\n         * This is a string that can be null with no default\n         */\n        parameterStringNullableWithNoDefault?: string | null;\n        /**\n         * This is a string that can be null with default\n         */\n        parameterStringNullableWithDefault?: string | null;\n    };\n    url: '/api/v{api-version}/defaults';\n};\n\nexport type DuplicateNameData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/duplicate';\n};\n\nexport type DuplicateName2Data = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/duplicate';\n};\n\nexport type DuplicateName3Data = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/duplicate';\n};\n\nexport type DuplicateName4Data = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/duplicate';\n};\n\nexport type CallWithNoContentResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no-content';\n};\n\nexport type CallWithNoContentResponseResponses = {\n    /**\n     * Success\n     */\n    204: void;\n};\n\nexport type CallWithNoContentResponseResponse = CallWithNoContentResponseResponses[keyof CallWithNoContentResponseResponses];\n\nexport type CallWithResponseAndNoContentResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multiple-tags/response-and-no-content';\n};\n\nexport type CallWithResponseAndNoContentResponseResponses = {\n    /**\n     * Response is a simple number\n     */\n    200: number;\n    /**\n     * Success\n     */\n    204: void;\n};\n\nexport type CallWithResponseAndNoContentResponseResponse = CallWithResponseAndNoContentResponseResponses[keyof CallWithResponseAndNoContentResponseResponses];\n\nexport type DummyAData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multiple-tags/a';\n};\n\nexport type DummyAResponses = {\n    200: _400;\n};\n\nexport type DummyAResponse = DummyAResponses[keyof DummyAResponses];\n\nexport type DummyBData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multiple-tags/b';\n};\n\nexport type DummyBResponses = {\n    /**\n     * Success\n     */\n    204: void;\n};\n\nexport type DummyBResponse = DummyBResponses[keyof DummyBResponses];\n\nexport type CallWithResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/response';\n};\n\nexport type CallWithResponseResponses = {\n    default: Import;\n};\n\nexport type CallWithResponseResponse = CallWithResponseResponses[keyof CallWithResponseResponses];\n\nexport type CallWithDuplicateResponsesData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/response';\n};\n\nexport type CallWithDuplicateResponsesErrors = {\n    /**\n     * Message for 500 error\n     */\n    500: ModelWithStringError;\n    /**\n     * Message for 501 error\n     */\n    501: ModelWithStringError;\n    /**\n     * Message for 502 error\n     */\n    502: ModelWithStringError;\n    /**\n     * Message for 4XX errors\n     */\n    '4XX': DictionaryWithArray;\n    /**\n     * Default error response\n     */\n    default: ModelWithBoolean;\n};\n\nexport type CallWithDuplicateResponsesError = CallWithDuplicateResponsesErrors[keyof CallWithDuplicateResponsesErrors];\n\nexport type CallWithDuplicateResponsesResponses = {\n    /**\n     * Message for 200 response\n     */\n    200: ModelWithBoolean & ModelWithInteger;\n    /**\n     * Message for 201 response\n     */\n    201: ModelWithString;\n    /**\n     * Message for 202 response\n     */\n    202: ModelWithString;\n};\n\nexport type CallWithDuplicateResponsesResponse = CallWithDuplicateResponsesResponses[keyof CallWithDuplicateResponsesResponses];\n\nexport type CallWithResponsesData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/response';\n};\n\nexport type CallWithResponsesErrors = {\n    /**\n     * Message for 500 error\n     */\n    500: ModelWithStringError;\n    /**\n     * Message for 501 error\n     */\n    501: ModelWithStringError;\n    /**\n     * Message for 502 error\n     */\n    502: ModelWithStringError;\n    /**\n     * Message for default response\n     */\n    default: ModelWithStringError;\n};\n\nexport type CallWithResponsesError = CallWithResponsesErrors[keyof CallWithResponsesErrors];\n\nexport type CallWithResponsesResponses = {\n    /**\n     * Message for 200 response\n     */\n    200: {\n        readonly '@namespace.string'?: string;\n        readonly '@namespace.integer'?: number;\n        readonly value?: Array<ModelWithString>;\n    };\n    /**\n     * Message for 201 response\n     */\n    201: ModelThatExtends;\n    /**\n     * Message for 202 response\n     */\n    202: ModelThatExtendsExtends;\n};\n\nexport type CallWithResponsesResponse = CallWithResponsesResponses[keyof CallWithResponsesResponses];\n\nexport type CollectionFormatData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * This is an array parameter that is sent as csv format (comma-separated values)\n         */\n        parameterArrayCSV: Array<string> | null;\n        /**\n         * This is an array parameter that is sent as ssv format (space-separated values)\n         */\n        parameterArraySSV: Array<string> | null;\n        /**\n         * This is an array parameter that is sent as tsv format (tab-separated values)\n         */\n        parameterArrayTSV: Array<string> | null;\n        /**\n         * This is an array parameter that is sent as pipes format (pipe-separated values)\n         */\n        parameterArrayPipes: Array<string> | null;\n        /**\n         * This is an array parameter that is sent as multi format (multiple parameter instances)\n         */\n        parameterArrayMulti: Array<string> | null;\n    };\n    url: '/api/v{api-version}/collectionFormat';\n};\n\nexport type TypesData = {\n    body?: never;\n    path?: {\n        /**\n         * This is a number parameter\n         */\n        id?: number;\n    };\n    query: {\n        /**\n         * This is a number parameter\n         */\n        parameterNumber: number;\n        /**\n         * This is a string parameter\n         */\n        parameterString: string | null;\n        /**\n         * This is a boolean parameter\n         */\n        parameterBoolean: boolean | null;\n        /**\n         * This is an object parameter\n         */\n        parameterObject: {\n            [key: string]: unknown;\n        } | null;\n        /**\n         * This is an array parameter\n         */\n        parameterArray: Array<string> | null;\n        /**\n         * This is a dictionary parameter\n         */\n        parameterDictionary: {\n            [key: string]: unknown;\n        } | null;\n        /**\n         * This is an enum parameter\n         */\n        parameterEnum: 'Success' | 'Warning' | 'Error' | null;\n    };\n    url: '/api/v{api-version}/types';\n};\n\nexport type TypesResponses = {\n    /**\n     * Response is a simple number\n     */\n    200: number;\n    /**\n     * Response is a simple string\n     */\n    201: string;\n    /**\n     * Response is a simple boolean\n     */\n    202: boolean;\n    /**\n     * Response is a simple object\n     */\n    203: {\n        [key: string]: unknown;\n    };\n};\n\nexport type TypesResponse = TypesResponses[keyof TypesResponses];\n\nexport type UploadFileData = {\n    body: Blob | File;\n    path: {\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string | null;\n    };\n    query?: never;\n    url: '/api/v{api-version}/upload';\n};\n\nexport type UploadFileResponses = {\n    200: boolean;\n};\n\nexport type UploadFileResponse = UploadFileResponses[keyof UploadFileResponses];\n\nexport type FileResponseData = {\n    body?: never;\n    path: {\n        id: string;\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string;\n    };\n    query?: never;\n    url: '/api/v{api-version}/file/{id}';\n};\n\nexport type FileResponseResponses = {\n    /**\n     * Success\n     */\n    200: Blob | File;\n};\n\nexport type FileResponseResponse = FileResponseResponses[keyof FileResponseResponses];\n\nexport type ComplexTypesData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * Parameter containing object\n         */\n        parameterObject: {\n            first?: {\n                second?: {\n                    third?: string;\n                };\n            };\n        };\n        /**\n         * Parameter containing reference\n         */\n        parameterReference: ModelWithString;\n    };\n    url: '/api/v{api-version}/complex';\n};\n\nexport type ComplexTypesErrors = {\n    /**\n     * 400 `server` error\n     */\n    400: unknown;\n    /**\n     * 500 server error\n     */\n    500: unknown;\n};\n\nexport type ComplexTypesResponses = {\n    /**\n     * Successful response\n     */\n    200: Array<ModelWithString>;\n};\n\nexport type ComplexTypesResponse = ComplexTypesResponses[keyof ComplexTypesResponses];\n\nexport type MultipartResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multipart';\n};\n\nexport type MultipartResponseResponses = {\n    /**\n     * OK\n     */\n    200: {\n        file?: Blob | File;\n        metadata?: {\n            foo?: string;\n            bar?: string;\n        };\n    };\n};\n\nexport type MultipartResponseResponse = MultipartResponseResponses[keyof MultipartResponseResponses];\n\nexport type MultipartRequestData = {\n    body?: {\n        content?: Blob | File;\n        data?: ModelWithString | null;\n    };\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multipart';\n};\n\nexport type ComplexParamsData = {\n    body?: {\n        readonly key: string | null;\n        name: string | null;\n        enabled?: boolean;\n        type: 'Monkey' | 'Horse' | 'Bird';\n        listOfModels?: Array<ModelWithString> | null;\n        listOfStrings?: Array<string> | null;\n        parameters: ModelWithString | ModelWithEnum | ModelWithArray | ModelWithDictionary;\n        readonly user?: {\n            readonly id?: number;\n            readonly name?: string | null;\n        };\n    };\n    path: {\n        id: number;\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string;\n    };\n    query?: never;\n    url: '/api/v{api-version}/complex/{id}';\n};\n\nexport type ComplexParamsResponses = {\n    /**\n     * Success\n     */\n    200: ModelWithString;\n};\n\nexport type ComplexParamsResponse = ComplexParamsResponses[keyof ComplexParamsResponses];\n\nexport type CallWithResultFromHeaderData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/header';\n};\n\nexport type CallWithResultFromHeaderErrors = {\n    /**\n     * 400 server error\n     */\n    400: unknown;\n    /**\n     * 500 server error\n     */\n    500: unknown;\n};\n\nexport type CallWithResultFromHeaderResponses = {\n    /**\n     * Successful response\n     */\n    200: unknown;\n};\n\nexport type TestErrorCodeData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * Status code to return\n         */\n        status: number;\n    };\n    url: '/api/v{api-version}/error';\n};\n\nexport type TestErrorCodeErrors = {\n    /**\n     * Custom message: Internal Server Error\n     */\n    500: unknown;\n    /**\n     * Custom message: Not Implemented\n     */\n    501: unknown;\n    /**\n     * Custom message: Bad Gateway\n     */\n    502: unknown;\n    /**\n     * Custom message: Service Unavailable\n     */\n    503: unknown;\n};\n\nexport type TestErrorCodeResponses = {\n    /**\n     * Custom message: Successful response\n     */\n    200: unknown;\n};\n\nexport type NonAsciiæøåÆøÅöôêÊ字符串Data = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * Dummy input param\n         */\n        nonAsciiParamæøåÆØÅöôêÊ: number;\n    };\n    url: '/api/v{api-version}/non-ascii-æøåÆØÅöôêÊ字符串';\n};\n\nexport type NonAsciiæøåÆøÅöôêÊ字符串Responses = {\n    /**\n     * Successful response\n     */\n    200: Array<NonAsciiStringæøåÆøÅöôêÊ字符串>;\n};\n\nexport type NonAsciiæøåÆøÅöôêÊ字符串Response = NonAsciiæøåÆøÅöôêÊ字符串Responses[keyof NonAsciiæøåÆøÅöôêÊ字符串Responses];\n\nexport type PutWithFormUrlEncodedData = {\n    body: ArrayWithStrings;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/non-ascii-æøåÆØÅöôêÊ字符串';\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-fetch/base-url-false/client/client.gen.ts",
    "content": "// 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 (options: RequestOptions) => {\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 url = buildUrl(opts);\n\n    return { opts, url };\n  };\n\n  const request: Client['request'] = async (options) => {\n    // @ts-expect-error\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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-fetch/base-url-false/client/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type { Auth } from '../core/auth.gen';\nexport type { QuerySerializerOptions } from '../core/bodySerializer.gen';\nexport {\n  formDataBodySerializer,\n  jsonBodySerializer,\n  urlSearchParamsBodySerializer,\n} from '../core/bodySerializer.gen';\nexport { buildClientParams } from '../core/params.gen';\nexport { serializeQueryKeyValue } from '../core/queryKeySerializer.gen';\nexport { createClient } from './client.gen';\nexport type {\n  Client,\n  ClientOptions,\n  Config,\n  CreateClientConfig,\n  Options,\n  RequestOptions,\n  RequestResult,\n  ResolvedRequestOptions,\n  ResponseStyle,\n  TDataShape,\n} from './types.gen';\nexport { createConfig, mergeHeaders } from './utils.gen';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-fetch/base-url-false/client/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { Auth } from '../core/auth.gen';\nimport type {\n  ServerSentEventsOptions,\n  ServerSentEventsResult,\n} from '../core/serverSentEvents.gen';\nimport type { Client as CoreClient, Config as CoreConfig } from '../core/types.gen';\nimport type { Middleware } from './utils.gen';\n\nexport type ResponseStyle = 'data' | 'fields';\n\nexport interface Config<T extends ClientOptions = ClientOptions>\n  extends Omit<RequestInit, 'body' | 'headers' | 'method'>, CoreConfig {\n  /**\n   * Base URL for all requests made by this client.\n   */\n  baseUrl?: T['baseUrl'];\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   * Please don't use the Fetch client for Next.js applications. The `next`\n   * options won't have any effect.\n   *\n   * Install {@link https://www.npmjs.com/package/@hey-api/client-next `@hey-api/client-next`} instead.\n   */\n  next?: never;\n  /**\n   * Return the response data parsed in a specified format. By default, `auto`\n   * will infer the appropriate method from the `Content-Type` response header.\n   * You can override this behavior with any of the {@link Body} methods.\n   * Select `stream` if you don't want to parse response data at all.\n   *\n   * @default 'auto'\n   */\n  parseAs?: 'arrayBuffer' | 'auto' | 'blob' | 'formData' | 'json' | 'stream' | 'text';\n  /**\n   * Should we return only data or multiple fields (data, error, response, etc.)?\n   *\n   * @default 'fields'\n   */\n  responseStyle?: ResponseStyle;\n  /**\n   * Throw an error instead of returning it in the response?\n   *\n   * @default false\n   */\n  throwOnError?: T['throwOnError'];\n}\n\nexport interface RequestOptions<\n  TData = unknown,\n  TResponseStyle extends ResponseStyle = 'fields',\n  ThrowOnError extends boolean = boolean,\n  Url extends string = string,\n>\n  extends\n    Config<{\n      responseStyle: TResponseStyle;\n      throwOnError: ThrowOnError;\n    }>,\n    Pick<\n      ServerSentEventsOptions<TData>,\n      | 'onRequest'\n      | 'onSseError'\n      | 'onSseEvent'\n      | 'sseDefaultRetryDelay'\n      | 'sseMaxRetryAttempts'\n      | 'sseMaxRetryDelay'\n    > {\n  /**\n   * Any body that you want to add to your request.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/fetch#body}\n   */\n  body?: unknown;\n  path?: Record<string, unknown>;\n  query?: Record<string, unknown>;\n  /**\n   * Security mechanism(s) to use for the request.\n   */\n  security?: ReadonlyArray<Auth>;\n  url: Url;\n}\n\nexport interface ResolvedRequestOptions<\n  TResponseStyle extends ResponseStyle = 'fields',\n  ThrowOnError extends boolean = boolean,\n  Url extends string = string,\n> extends RequestOptions<unknown, TResponseStyle, ThrowOnError, Url> {\n  serializedBody?: string;\n}\n\nexport type RequestResult<\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = boolean,\n  TResponseStyle extends ResponseStyle = 'fields',\n> = ThrowOnError extends true\n  ? Promise<\n      TResponseStyle extends 'data'\n        ? TData extends Record<string, unknown>\n          ? TData[keyof TData]\n          : TData\n        : {\n            data: TData extends Record<string, unknown> ? TData[keyof TData] : TData;\n            request: Request;\n            response: Response;\n          }\n    >\n  : Promise<\n      TResponseStyle extends 'data'\n        ? (TData extends Record<string, unknown> ? TData[keyof TData] : TData) | undefined\n        : (\n            | {\n                data: TData extends Record<string, unknown> ? TData[keyof TData] : TData;\n                error: undefined;\n              }\n            | {\n                data: undefined;\n                error: TError extends Record<string, unknown> ? TError[keyof TError] : TError;\n              }\n          ) & {\n            request: Request;\n            response: Response;\n          }\n    >;\n\nexport interface ClientOptions {\n  baseUrl?: string;\n  responseStyle?: ResponseStyle;\n  throwOnError?: boolean;\n}\n\ntype MethodFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'>,\n) => RequestResult<TData, TError, ThrowOnError, TResponseStyle>;\n\ntype SseFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'>,\n) => Promise<ServerSentEventsResult<TData, TError>>;\n\ntype RequestFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'> &\n    Pick<Required<RequestOptions<TData, TResponseStyle, ThrowOnError>>, 'method'>,\n) => RequestResult<TData, TError, ThrowOnError, TResponseStyle>;\n\ntype BuildUrlFn = <\n  TData extends {\n    body?: unknown;\n    path?: Record<string, unknown>;\n    query?: Record<string, unknown>;\n    url: string;\n  },\n>(\n  options: TData & Options<TData>,\n) => string;\n\nexport type Client = CoreClient<RequestFn, Config, MethodFn, BuildUrlFn, SseFn> & {\n  interceptors: Middleware<Request, Response, unknown, ResolvedRequestOptions>;\n};\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 = ClientOptions> = (\n  override?: Config<ClientOptions & T>,\n) => Config<Required<ClientOptions> & T>;\n\nexport interface TDataShape {\n  body?: unknown;\n  headers?: unknown;\n  path?: unknown;\n  query?: unknown;\n  url: string;\n}\n\ntype OmitKeys<T, K> = Pick<T, Exclude<keyof T, K>>;\n\nexport type Options<\n  TData extends TDataShape = TDataShape,\n  ThrowOnError extends boolean = boolean,\n  TResponse = unknown,\n  TResponseStyle extends ResponseStyle = 'fields',\n> = OmitKeys<\n  RequestOptions<TResponse, TResponseStyle, ThrowOnError>,\n  'body' | 'path' | 'query' | 'url'\n> &\n  ([TData] extends [never] ? unknown : Omit<TData, 'url'>);\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-fetch/base-url-false/client/utils.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-fetch/base-url-false/client.gen.ts",
    "content": "// 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>());\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-fetch/base-url-false/core/auth.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-fetch/base-url-false/core/bodySerializer.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-fetch/base-url-false/core/params.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-fetch/base-url-false/core/pathSerializer.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-fetch/base-url-false/core/queryKeySerializer.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\n/**\n * JSON-friendly union that mirrors what Pinia Colada can hash.\n */\nexport type JsonValue =\n  | null\n  | string\n  | number\n  | boolean\n  | JsonValue[]\n  | { [key: string]: JsonValue };\n\n/**\n * Replacer that converts non-JSON values (bigint, Date, etc.) to safe substitutes.\n */\nexport const queryKeyJsonReplacer = (_key: string, value: unknown) => {\n  if (value === undefined || typeof value === 'function' || typeof value === 'symbol') {\n    return undefined;\n  }\n  if (typeof value === 'bigint') {\n    return value.toString();\n  }\n  if (value instanceof Date) {\n    return value.toISOString();\n  }\n  return value;\n};\n\n/**\n * Safely stringifies a value and parses it back into a JsonValue.\n */\nexport const stringifyToJsonValue = (input: unknown): JsonValue | undefined => {\n  try {\n    const json = JSON.stringify(input, queryKeyJsonReplacer);\n    if (json === undefined) {\n      return undefined;\n    }\n    return JSON.parse(json) as JsonValue;\n  } catch {\n    return undefined;\n  }\n};\n\n/**\n * Detects plain objects (including objects with a null prototype).\n */\nconst isPlainObject = (value: unknown): value is Record<string, unknown> => {\n  if (value === null || typeof value !== 'object') {\n    return false;\n  }\n  const prototype = Object.getPrototypeOf(value as object);\n  return prototype === Object.prototype || prototype === null;\n};\n\n/**\n * Turns URLSearchParams into a sorted JSON object for deterministic keys.\n */\nconst serializeSearchParams = (params: URLSearchParams): JsonValue => {\n  const entries = Array.from(params.entries()).sort(([a], [b]) => a.localeCompare(b));\n  const result: Record<string, JsonValue> = {};\n\n  for (const [key, value] of entries) {\n    const existing = result[key];\n    if (existing === undefined) {\n      result[key] = value;\n      continue;\n    }\n\n    if (Array.isArray(existing)) {\n      (existing as string[]).push(value);\n    } else {\n      result[key] = [existing, value];\n    }\n  }\n\n  return result;\n};\n\n/**\n * Normalizes any accepted value into a JSON-friendly shape for query keys.\n */\nexport const serializeQueryKeyValue = (value: unknown): JsonValue | undefined => {\n  if (value === null) {\n    return null;\n  }\n\n  if (typeof value === 'string' || typeof value === 'number' || typeof value === 'boolean') {\n    return value;\n  }\n\n  if (value === undefined || typeof value === 'function' || typeof value === 'symbol') {\n    return undefined;\n  }\n\n  if (typeof value === 'bigint') {\n    return value.toString();\n  }\n\n  if (value instanceof Date) {\n    return value.toISOString();\n  }\n\n  if (Array.isArray(value)) {\n    return stringifyToJsonValue(value);\n  }\n\n  if (typeof URLSearchParams !== 'undefined' && value instanceof URLSearchParams) {\n    return serializeSearchParams(value);\n  }\n\n  if (isPlainObject(value)) {\n    return stringifyToJsonValue(value);\n  }\n\n  return undefined;\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-fetch/base-url-false/core/serverSentEvents.gen.ts",
    "content": "// 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 const 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            // Normalize line endings: CRLF -> LF, then CR -> LF\n            buffer = buffer.replace(/\\r\\n/g, '\\n').replace(/\\r/g, '\\n');\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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-fetch/base-url-false/core/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { Auth, AuthToken } from './auth.gen';\nimport type { BodySerializer, QuerySerializer, QuerySerializerOptions } from './bodySerializer.gen';\n\nexport type HttpMethod =\n  | 'connect'\n  | 'delete'\n  | 'get'\n  | 'head'\n  | 'options'\n  | 'patch'\n  | 'post'\n  | 'put'\n  | 'trace';\n\nexport type Client<\n  RequestFn = never,\n  Config = unknown,\n  MethodFn = never,\n  BuildUrlFn = never,\n  SseFn = never,\n> = {\n  /**\n   * Returns the final request URL.\n   */\n  buildUrl: BuildUrlFn;\n  getConfig: () => Config;\n  request: RequestFn;\n  setConfig: (config: Config) => Config;\n} & {\n  [K in HttpMethod]: MethodFn;\n} & ([SseFn] extends [never] ? { sse?: never } : { sse: { [K in HttpMethod]: SseFn } });\n\nexport interface Config {\n  /**\n   * Auth token or a function returning auth token. The resolved value will be\n   * added to the request payload as defined by its `security` array.\n   */\n  auth?: ((auth: Auth) => Promise<AuthToken> | AuthToken) | AuthToken;\n  /**\n   * A function for serializing request body parameter. By default,\n   * {@link JSON.stringify()} will be used.\n   */\n  bodySerializer?: BodySerializer | null;\n  /**\n   * An object containing any HTTP headers that you want to pre-populate your\n   * `Headers` object with.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/Headers/Headers#init See more}\n   */\n  headers?:\n    | RequestInit['headers']\n    | Record<\n        string,\n        string | number | boolean | (string | number | boolean)[] | null | undefined | unknown\n      >;\n  /**\n   * The request method.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/fetch#method See more}\n   */\n  method?: Uppercase<HttpMethod>;\n  /**\n   * A function for serializing request query parameters. By default, arrays\n   * will be exploded in form style, objects will be exploded in deepObject\n   * style, and reserved characters are percent-encoded.\n   *\n   * This method will have no effect if the native `paramsSerializer()` Axios\n   * API function is used.\n   *\n   * {@link https://swagger.io/docs/specification/serialization/#query View examples}\n   */\n  querySerializer?: QuerySerializer | QuerySerializerOptions;\n  /**\n   * A function validating request data. This is useful if you want to ensure\n   * the request conforms to the desired shape, so it can be safely sent to\n   * the server.\n   */\n  requestValidator?: (data: unknown) => Promise<unknown>;\n  /**\n   * A function transforming response data before it's returned. This is useful\n   * for post-processing data, e.g. converting ISO strings into Date objects.\n   */\n  responseTransformer?: (data: unknown) => Promise<unknown>;\n  /**\n   * A function validating response data. This is useful if you want to ensure\n   * the response conforms to the desired shape, so it can be safely passed to\n   * the transformers and returned to the user.\n   */\n  responseValidator?: (data: unknown) => Promise<unknown>;\n}\n\ntype IsExactlyNeverOrNeverUndefined<T> = [T] extends [never]\n  ? true\n  : [T] extends [never | undefined]\n    ? [undefined] extends [T]\n      ? false\n      : true\n    : false;\n\nexport type OmitNever<T extends Record<string, unknown>> = {\n  [K in keyof T as IsExactlyNeverOrNeverUndefined<T[K]> extends true ? never : K]: T[K];\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-fetch/base-url-false/core/utils.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-fetch/base-url-false/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type { _3eNum1Период, _400, AdditionalPropertiesIntegerIssue, AdditionalPropertiesUnknownIssue, AdditionalPropertiesUnknownIssue2, AdditionalPropertiesUnknownIssue3, AdditionalPropertiesUnknownIssueWritable, AnyOfAnyAndNull, AnyOfArrays, ApiVVersionODataControllerCountData, ApiVVersionODataControllerCountResponse, ApiVVersionODataControllerCountResponses, ArrayWithAnyOfProperties, ArrayWithArray, ArrayWithBooleans, ArrayWithNumbers, ArrayWithProperties, ArrayWithReferences, ArrayWithStrings, CallToTestOrderOfParamsData, CallWithDefaultOptionalParametersData, CallWithDefaultParametersData, CallWithDescriptionsData, CallWithDuplicateResponsesData, CallWithDuplicateResponsesError, CallWithDuplicateResponsesErrors, CallWithDuplicateResponsesResponse, CallWithDuplicateResponsesResponses, CallWithNoContentResponseData, CallWithNoContentResponseResponse, CallWithNoContentResponseResponses, CallWithParametersData, CallWithResponseAndNoContentResponseData, CallWithResponseAndNoContentResponseResponse, CallWithResponseAndNoContentResponseResponses, CallWithResponseData, CallWithResponseResponse, CallWithResponseResponses, CallWithResponsesData, CallWithResponsesError, CallWithResponsesErrors, CallWithResponsesResponse, CallWithResponsesResponses, CallWithResultFromHeaderData, CallWithResultFromHeaderErrors, CallWithResultFromHeaderResponses, CallWithWeirdParameterNamesData, CamelCaseCommentWithBreaks, CharactersInDescription, ClientOptions, CollectionFormatData, CommentWithBackticks, CommentWithBackticksAndQuotes, CommentWithBreaks, CommentWithExpressionPlaceholders, CommentWithQuotes, CommentWithReservedCharacters, CommentWithSlashes, ComplexParamsData, ComplexParamsResponse, ComplexParamsResponses, ComplexTypesData, ComplexTypesErrors, ComplexTypesResponse, ComplexTypesResponses, CompositionBaseModel, CompositionExtendedModel, CompositionWithAllOfAndNullable, CompositionWithAnyOf, CompositionWithAnyOfAndNullable, CompositionWithAnyOfAnonymous, CompositionWithNestedAnyAndTypeNull, CompositionWithNestedAnyOfAndNull, CompositionWithOneOf, CompositionWithOneOfAndComplexArrayDictionary, CompositionWithOneOfAndNullable, CompositionWithOneOfAndProperties, CompositionWithOneOfAndSimpleArrayDictionary, CompositionWithOneOfAndSimpleDictionary, CompositionWithOneOfAnonymous, CompositionWithOneOfDiscriminator, ConstValue, Default, DeleteCallWithoutParametersAndResponseData, DeleteFooData, DeleteFooData2, DeleteFooData3, DeprecatedCallData, DeprecatedModel, DictionaryWithArray, DictionaryWithDictionary, DictionaryWithProperties, DictionaryWithPropertiesAndAdditionalProperties, DictionaryWithReference, DictionaryWithString, DummyAData, DummyAResponse, DummyAResponses, DummyBData, DummyBResponse, DummyBResponses, DuplicateName2Data, DuplicateName3Data, DuplicateName4Data, DuplicateNameData, EnumFromDescription, EnumWithExtensions, EnumWithNumbers, EnumWithReplacedCharacters, EnumWithStrings, EnumWithXEnumNames, ExportData, ExternalRefA, ExternalRefB, ExternalSharedModel, File, FileResponseData, FileResponseResponse, FileResponseResponses, FileWritable, FooWowData, FooWowResponses, FreeFormObjectWithAdditionalPropertiesEqEmptyObject, FreeFormObjectWithAdditionalPropertiesEqTrue, FreeFormObjectWithoutAdditionalProperties, GenericSchemaDuplicateIssue1SystemBoolean, GenericSchemaDuplicateIssue1SystemBooleanWritable, GenericSchemaDuplicateIssue1SystemString, GenericSchemaDuplicateIssue1SystemStringWritable, GetApiVbyApiVersionSimpleOperationData, GetApiVbyApiVersionSimpleOperationError, GetApiVbyApiVersionSimpleOperationErrors, GetApiVbyApiVersionSimpleOperationResponse, GetApiVbyApiVersionSimpleOperationResponses, GetCallWithOptionalParamData, GetCallWithoutParametersAndResponseData, HeadCallWithoutParametersAndResponseData, Import, ImportData, ImportResponse, ImportResponses, IoK8sApimachineryPkgApisMetaV1DeleteOptions, IoK8sApimachineryPkgApisMetaV1Preconditions, ModelCircle, ModelFromZendesk, ModelSquare, ModelThatExtends, ModelThatExtendsExtends, ModelWithAdditionalPropertiesEqTrue, ModelWithAdditionalPropertiesRef, ModelWithAnyOfConstantSizeArray, ModelWithAnyOfConstantSizeArrayAndIntersect, ModelWithAnyOfConstantSizeArrayNullable, ModelWithAnyOfConstantSizeArrayWithNSizeAndOptions, ModelWithAnyOfConstantSizeArrayWithNSizeAndOptionsWritable, ModelWithArray, ModelWithArrayReadOnlyAndWriteOnly, ModelWithArrayReadOnlyAndWriteOnlyWritable, ModelWithBackticksInDescription, ModelWithBoolean, ModelWithCircularReference, ModelWithConst, ModelWithConstantSizeArray, ModelWithDictionary, ModelWithDuplicateImports, ModelWithDuplicateProperties, ModelWithEnum, ModelWithEnumFromDescription, ModelWithEnumWithHyphen, ModelWithInteger, ModelWithNestedArrayEnums, ModelWithNestedArrayEnumsData, ModelWithNestedArrayEnumsDataBar, ModelWithNestedArrayEnumsDataFoo, ModelWithNestedCompositionEnums, ModelWithNestedEnums, ModelWithNestedProperties, ModelWithNullableObject, ModelWithNullableString, ModelWithNumericEnumUnion, ModelWithOneOfAndProperties, ModelWithOneOfEnum, ModelWithOrderedProperties, ModelWithPattern, ModelWithPatternWritable, ModelWithPrefixItemsConstantSizeArray, ModelWithProperties, ModelWithPropertiesWritable, ModelWithReadOnlyAndWriteOnly, ModelWithReadOnlyAndWriteOnlyWritable, ModelWithReference, ModelWithReferenceWritable, ModelWithString, ModelWithStringError, MultipartRequestData, MultipartResponseData, MultipartResponseResponse, MultipartResponseResponses, NestedAnyOfArraysNullable, NonAsciiæøåÆøÅöôêÊ字符串Data, NonAsciiæøåÆøÅöôêÊ字符串Response, NonAsciiæøåÆøÅöôêÊ字符串Responses, NonAsciiStringæøåÆøÅöôêÊ字符串, NullableObject, OneOfAllOfIssue, OneOfAllOfIssueWritable, OptionsCallWithoutParametersAndResponseData, Pageable, ParameterSimpleParameterUnused, PatchApiVbyApiVersionNoTagData, PatchApiVbyApiVersionNoTagResponses, PatchCallWithoutParametersAndResponseData, PostApiVbyApiVersionFormDataData, PostApiVbyApiVersionRequestBodyData, PostCallWithOptionalParamData, PostCallWithOptionalParamResponse, PostCallWithOptionalParamResponses, PostCallWithoutParametersAndResponseData, PostServiceWithEmptyTagResponse, PostServiceWithEmptyTagResponse2, PutCallWithoutParametersAndResponseData, PutWithFormUrlEncodedData, SchemaWithFormRestrictedKeys, SimpleBoolean, SimpleFile, SimpleFormData, SimpleInteger, SimpleParameter, SimpleReference, SimpleRequestBody, SimpleString, SimpleStringWithPattern, TestErrorCodeData, TestErrorCodeErrors, TestErrorCodeResponses, TypesData, TypesResponse, TypesResponses, UploadFileData, UploadFileResponse, UploadFileResponses, XFooBar } from './types.gen';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-fetch/base-url-false/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type ClientOptions = {\n    baseUrl: 'http://localhost:3000/base' | (string & {});\n};\n\n/**\n * Model with number-only name\n */\nexport type _400 = string;\n\n/**\n * External ref to shared model (A)\n */\nexport type ExternalRefA = ExternalSharedModel;\n\n/**\n * External ref to shared model (B)\n */\nexport type ExternalRefB = ExternalSharedModel;\n\n/**\n * Testing multiline comments in string: First line\n * Second line\n *\n * Fourth line\n */\nexport type CamelCaseCommentWithBreaks = number;\n\n/**\n * Testing multiline comments in string: First line\n * Second line\n *\n * Fourth line\n */\nexport type CommentWithBreaks = number;\n\n/**\n * Testing backticks in string: `backticks` and ```multiple backticks``` should work\n */\nexport type CommentWithBackticks = number;\n\n/**\n * Testing backticks and quotes in string: `backticks`, 'quotes', \"double quotes\" and ```multiple backticks``` should work\n */\nexport type CommentWithBackticksAndQuotes = number;\n\n/**\n * Testing slashes in string: \\backwards\\\\\\ and /forwards/// should work\n */\nexport type CommentWithSlashes = number;\n\n/**\n * Testing expression placeholders in string: ${expression} should work\n */\nexport type CommentWithExpressionPlaceholders = number;\n\n/**\n * Testing quotes in string: 'single quote''' and \"double quotes\"\"\" should work\n */\nexport type CommentWithQuotes = number;\n\n/**\n * Testing reserved characters in string: * inline * and ** inline ** should work\n */\nexport type CommentWithReservedCharacters = number;\n\n/**\n * This is a simple number\n */\nexport type SimpleInteger = number;\n\n/**\n * This is a simple boolean\n */\nexport type SimpleBoolean = boolean;\n\n/**\n * This is a simple string\n */\nexport type SimpleString = string;\n\n/**\n * A string with non-ascii (unicode) characters valid in typescript identifiers (æøåÆØÅöÔèÈ字符串)\n */\nexport type NonAsciiStringæøåÆøÅöôêÊ字符串 = string;\n\n/**\n * This is a simple file\n */\nexport type SimpleFile = Blob | File;\n\n/**\n * This is a simple reference\n */\nexport type SimpleReference = ModelWithString;\n\n/**\n * This is a simple string\n */\nexport type SimpleStringWithPattern = string | null;\n\n/**\n * This is a simple enum with strings\n */\nexport type EnumWithStrings = 'Success' | 'Warning' | 'Error' | '\\'Single Quote\\'' | '\"Double Quotes\"' | 'Non-ascii: øæåôöØÆÅÔÖ字符串';\n\nexport type EnumWithReplacedCharacters = '\\'Single Quote\\'' | '\"Double Quotes\"' | 'øæåôöØÆÅÔÖ字符串' | 3.1 | '';\n\n/**\n * This is a simple enum with numbers\n */\nexport type EnumWithNumbers = 1 | 2 | 3 | 1.1 | 1.2 | 1.3 | 100 | 200 | 300 | -100 | -200 | -300 | -1.1 | -1.2 | -1.3;\n\n/**\n * Success=1,Warning=2,Error=3\n */\nexport type EnumFromDescription = number;\n\n/**\n * This is a simple enum with numbers\n */\nexport type EnumWithExtensions = 200 | 400 | 500;\n\nexport type EnumWithXEnumNames = 0 | 1 | 2;\n\n/**\n * This is a simple array with numbers\n */\nexport type ArrayWithNumbers = Array<number>;\n\n/**\n * This is a simple array with booleans\n */\nexport type ArrayWithBooleans = Array<boolean>;\n\n/**\n * This is a simple array with strings\n */\nexport type ArrayWithStrings = Array<string>;\n\n/**\n * This is a simple array with references\n */\nexport type ArrayWithReferences = Array<ModelWithString>;\n\n/**\n * This is a simple array containing an array\n */\nexport type ArrayWithArray = Array<Array<ModelWithString>>;\n\n/**\n * This is a simple array with properties\n */\nexport type ArrayWithProperties = Array<{\n    '16x16'?: CamelCaseCommentWithBreaks;\n    bar?: string;\n}>;\n\n/**\n * This is a simple array with any of properties\n */\nexport type ArrayWithAnyOfProperties = Array<{\n    foo?: string;\n} | {\n    bar?: string;\n}>;\n\nexport type AnyOfAnyAndNull = {\n    data?: unknown | null;\n};\n\n/**\n * This is a simple array with any of properties\n */\nexport type AnyOfArrays = {\n    results?: Array<{\n        foo?: string;\n    } | {\n        bar?: string;\n    }>;\n};\n\n/**\n * This is a string dictionary\n */\nexport type DictionaryWithString = {\n    [key: string]: string;\n};\n\nexport type DictionaryWithPropertiesAndAdditionalProperties = {\n    foo?: number;\n    bar?: boolean;\n    [key: string]: string | number | boolean | undefined;\n};\n\n/**\n * This is a string reference\n */\nexport type DictionaryWithReference = {\n    [key: string]: ModelWithString;\n};\n\n/**\n * This is a complex dictionary\n */\nexport type DictionaryWithArray = {\n    [key: string]: Array<ModelWithString>;\n};\n\n/**\n * This is a string dictionary\n */\nexport type DictionaryWithDictionary = {\n    [key: string]: {\n        [key: string]: string;\n    };\n};\n\n/**\n * This is a complex dictionary\n */\nexport type DictionaryWithProperties = {\n    [key: string]: {\n        foo?: string;\n        bar?: string;\n    };\n};\n\n/**\n * This is a model with one number property\n */\nexport type ModelWithInteger = {\n    /**\n     * This is a simple number property\n     */\n    prop?: number;\n};\n\n/**\n * This is a model with one boolean property\n */\nexport type ModelWithBoolean = {\n    /**\n     * This is a simple boolean property\n     */\n    prop?: boolean;\n};\n\n/**\n * This is a model with one string property\n */\nexport type ModelWithString = {\n    /**\n     * This is a simple string property\n     */\n    prop?: string;\n};\n\n/**\n * This is a model with one string property\n */\nexport type ModelWithStringError = {\n    /**\n     * This is a simple string property\n     */\n    prop?: string;\n};\n\n/**\n * `Comment` or `VoiceComment`. The JSON object for adding voice comments to tickets is different. See [Adding voice comments to tickets](/documentation/ticketing/managing-tickets/adding-voice-comments-to-tickets)\n */\nexport type ModelFromZendesk = string;\n\n/**\n * This is a model with one string property\n */\nexport type ModelWithNullableString = {\n    /**\n     * This is a simple string property\n     */\n    nullableProp1?: string | null;\n    /**\n     * This is a simple string property\n     */\n    nullableRequiredProp1: string | null;\n    /**\n     * This is a simple string property\n     */\n    nullableProp2?: string | null;\n    /**\n     * This is a simple string property\n     */\n    nullableRequiredProp2: string | null;\n    /**\n     * This is a simple enum with strings\n     */\n    'foo_bar-enum'?: 'Success' | 'Warning' | 'Error' | 'ØÆÅ字符串';\n};\n\n/**\n * This is a model with one enum\n */\nexport type ModelWithEnum = {\n    /**\n     * This is a simple enum with strings\n     */\n    'foo_bar-enum'?: 'Success' | 'Warning' | 'Error' | 'ØÆÅ字符串';\n    /**\n     * These are the HTTP error code enums\n     */\n    statusCode?: '100' | '200 FOO' | '300 FOO_BAR' | '400 foo-bar' | '500 foo.bar' | '600 foo&bar';\n    /**\n     * Simple boolean enum\n     */\n    bool?: true;\n};\n\n/**\n * This is a model with one enum with escaped name\n */\nexport type ModelWithEnumWithHyphen = {\n    /**\n     * Foo-Bar-Baz-Qux\n     */\n    'foo-bar-baz-qux'?: '3.0';\n};\n\n/**\n * This is a model with one enum\n */\nexport type ModelWithEnumFromDescription = {\n    /**\n     * Success=1,Warning=2,Error=3\n     */\n    test?: number;\n};\n\n/**\n * This is a model with nested enums\n */\nexport type ModelWithNestedEnums = {\n    dictionaryWithEnum?: {\n        [key: string]: 'Success' | 'Warning' | 'Error';\n    };\n    dictionaryWithEnumFromDescription?: {\n        [key: string]: number;\n    };\n    arrayWithEnum?: Array<'Success' | 'Warning' | 'Error'>;\n    arrayWithDescription?: Array<number>;\n    /**\n     * This is a simple enum with strings\n     */\n    'foo_bar-enum'?: 'Success' | 'Warning' | 'Error' | 'ØÆÅ字符串';\n};\n\n/**\n * This is a model with one property containing a reference\n */\nexport type ModelWithReference = {\n    prop?: ModelWithProperties;\n};\n\n/**\n * This is a model with one property containing an array\n */\nexport type ModelWithArrayReadOnlyAndWriteOnly = {\n    prop?: Array<ModelWithReadOnlyAndWriteOnly>;\n    propWithFile?: Array<Blob | File>;\n    propWithNumber?: Array<number>;\n};\n\n/**\n * This is a model with one property containing an array\n */\nexport type ModelWithArray = {\n    prop?: Array<ModelWithString>;\n    propWithFile?: Array<Blob | File>;\n    propWithNumber?: Array<number>;\n};\n\n/**\n * This is a model with one property containing a dictionary\n */\nexport type ModelWithDictionary = {\n    prop?: {\n        [key: string]: string;\n    };\n};\n\n/**\n * This is a deprecated model with a deprecated property\n *\n * @deprecated\n */\nexport type DeprecatedModel = {\n    /**\n     * This is a deprecated property\n     *\n     * @deprecated\n     */\n    prop?: string;\n};\n\n/**\n * This is a model with one property containing a circular reference\n */\nexport type ModelWithCircularReference = {\n    prop?: ModelWithCircularReference;\n};\n\n/**\n * This is a model with one property with a 'one of' relationship\n */\nexport type CompositionWithOneOf = {\n    propA?: ModelWithString | ModelWithEnum | ModelWithArray | ModelWithDictionary;\n};\n\n/**\n * This is a model with one property with a 'one of' relationship where the options are not $ref\n */\nexport type CompositionWithOneOfAnonymous = {\n    propA?: {\n        propA?: string;\n    } | string | number;\n};\n\n/**\n * Circle\n */\nexport type ModelCircle = {\n    kind: string;\n    radius?: number;\n};\n\n/**\n * Square\n */\nexport type ModelSquare = {\n    kind: string;\n    sideLength?: number;\n};\n\n/**\n * This is a model with one property with a 'one of' relationship where the options are not $ref\n */\nexport type CompositionWithOneOfDiscriminator = ({\n    kind: 'circle';\n} & ModelCircle) | ({\n    kind: 'square';\n} & ModelSquare);\n\n/**\n * This is a model with one property with a 'any of' relationship\n */\nexport type CompositionWithAnyOf = {\n    propA?: ModelWithString | ModelWithEnum | ModelWithArray | ModelWithDictionary;\n};\n\n/**\n * This is a model with one property with a 'any of' relationship where the options are not $ref\n */\nexport type CompositionWithAnyOfAnonymous = {\n    propA?: {\n        propA?: string;\n    } | string | number;\n};\n\n/**\n * This is a model with nested 'any of' property with a type null\n */\nexport type CompositionWithNestedAnyAndTypeNull = {\n    propA?: Array<ModelWithDictionary | null> | Array<ModelWithArray | null>;\n};\n\nexport type _3eNum1Период = 'Bird' | 'Dog';\n\nexport type ConstValue = 'ConstValue';\n\n/**\n * This is a model with one property with a 'any of' relationship where the options are not $ref\n */\nexport type CompositionWithNestedAnyOfAndNull = {\n    /**\n     * Scopes\n     */\n    propA?: Array<_3eNum1Период | ConstValue> | null;\n};\n\n/**\n * This is a model with one property with a 'one of' relationship\n */\nexport type CompositionWithOneOfAndNullable = {\n    propA?: {\n        boolean?: boolean;\n    } | ModelWithEnum | ModelWithArray | ModelWithDictionary | null;\n};\n\n/**\n * This is a model that contains a simple dictionary within composition\n */\nexport type CompositionWithOneOfAndSimpleDictionary = {\n    propA?: boolean | {\n        [key: string]: number;\n    };\n};\n\n/**\n * This is a model that contains a dictionary of simple arrays within composition\n */\nexport type CompositionWithOneOfAndSimpleArrayDictionary = {\n    propA?: boolean | {\n        [key: string]: Array<boolean>;\n    };\n};\n\n/**\n * This is a model that contains a dictionary of complex arrays (composited) within composition\n */\nexport type CompositionWithOneOfAndComplexArrayDictionary = {\n    propA?: boolean | {\n        [key: string]: Array<number | string>;\n    };\n};\n\n/**\n * This is a model with one property with a 'all of' relationship\n */\nexport type CompositionWithAllOfAndNullable = {\n    propA?: ({\n        boolean?: boolean;\n    } & ModelWithEnum & ModelWithArray & ModelWithDictionary) | null;\n};\n\n/**\n * This is a model with one property with a 'any of' relationship\n */\nexport type CompositionWithAnyOfAndNullable = {\n    propA?: {\n        boolean?: boolean;\n    } | ModelWithEnum | ModelWithArray | ModelWithDictionary | null;\n};\n\n/**\n * This is a base model with two simple optional properties\n */\nexport type CompositionBaseModel = {\n    firstName?: string;\n    lastname?: string;\n};\n\n/**\n * This is a model that extends the base model\n */\nexport type CompositionExtendedModel = CompositionBaseModel & {\n    age: number;\n    firstName: string;\n    lastname: string;\n};\n\n/**\n * This is a model with one nested property\n */\nexport type ModelWithProperties = {\n    required: string;\n    readonly requiredAndReadOnly: string;\n    requiredAndNullable: string | null;\n    string?: string;\n    number?: number;\n    boolean?: boolean;\n    reference?: ModelWithString;\n    'property with space'?: string;\n    default?: string;\n    try?: string;\n    readonly '@namespace.string'?: string;\n    readonly '@namespace.integer'?: number;\n};\n\n/**\n * This is a model with one nested property\n */\nexport type ModelWithNestedProperties = {\n    readonly first: {\n        readonly second: {\n            readonly third: string | null;\n        } | null;\n    } | null;\n};\n\n/**\n * This is a model with duplicated properties\n */\nexport type ModelWithDuplicateProperties = {\n    prop?: ModelWithString;\n};\n\n/**\n * This is a model with ordered properties\n */\nexport type ModelWithOrderedProperties = {\n    zebra?: string;\n    apple?: string;\n    hawaii?: string;\n};\n\n/**\n * This is a model with duplicated imports\n */\nexport type ModelWithDuplicateImports = {\n    propA?: ModelWithString;\n    propB?: ModelWithString;\n    propC?: ModelWithString;\n};\n\n/**\n * This is a model that extends another model\n */\nexport type ModelThatExtends = ModelWithString & {\n    propExtendsA?: string;\n    propExtendsB?: ModelWithString;\n};\n\n/**\n * This is a model that extends another model\n */\nexport type ModelThatExtendsExtends = ModelWithString & ModelThatExtends & {\n    propExtendsC?: string;\n    propExtendsD?: ModelWithString;\n};\n\n/**\n * This is a model that contains a some patterns\n */\nexport type ModelWithPattern = {\n    key: string;\n    name: string;\n    readonly enabled?: boolean;\n    readonly modified?: string;\n    id?: string;\n    text?: string;\n    patternWithSingleQuotes?: string;\n    patternWithNewline?: string;\n    patternWithBacktick?: string;\n    patternWithUnicode?: string;\n};\n\nexport type File = {\n    /**\n     * Id\n     */\n    readonly id?: string;\n    /**\n     * Updated at\n     */\n    readonly updated_at?: string;\n    /**\n     * Created at\n     */\n    readonly created_at?: string;\n    /**\n     * Mime\n     */\n    mime: string;\n    /**\n     * File\n     */\n    readonly file?: string;\n};\n\nexport type Default = {\n    name?: string;\n};\n\nexport type Pageable = {\n    page?: number;\n    size?: number;\n    sort?: Array<string>;\n};\n\n/**\n * This is a free-form object without additionalProperties.\n */\nexport type FreeFormObjectWithoutAdditionalProperties = {\n    [key: string]: unknown;\n};\n\n/**\n * This is a free-form object with additionalProperties: true.\n */\nexport type FreeFormObjectWithAdditionalPropertiesEqTrue = {\n    [key: string]: unknown;\n};\n\n/**\n * This is a free-form object with additionalProperties: {}.\n */\nexport type FreeFormObjectWithAdditionalPropertiesEqEmptyObject = {\n    [key: string]: unknown;\n};\n\nexport type ModelWithConst = {\n    String?: 'String';\n    number?: 0;\n    null?: null;\n    withType?: 'Some string';\n};\n\n/**\n * This is a model with one property and additionalProperties: true\n */\nexport type ModelWithAdditionalPropertiesEqTrue = {\n    /**\n     * This is a simple string property\n     */\n    prop?: string;\n    [key: string]: unknown;\n};\n\nexport type NestedAnyOfArraysNullable = {\n    nullableArray?: Array<string | boolean> | null;\n};\n\nexport type CompositionWithOneOfAndProperties = ({\n    foo: SimpleParameter;\n} | {\n    bar: NonAsciiStringæøåÆøÅöôêÊ字符串;\n}) & {\n    baz: number | null;\n    qux: number;\n};\n\n/**\n * An object that can be null\n */\nexport type NullableObject = {\n    foo?: string;\n} | null;\n\n/**\n * Some % character\n */\nexport type CharactersInDescription = string;\n\nexport type ModelWithNullableObject = {\n    data?: NullableObject;\n};\n\n/**\n * An object with additional properties that can be null (anyOf ref + null)\n */\nexport type ModelWithAdditionalPropertiesRef = {\n    [key: string]: NullableObject | null;\n};\n\nexport type ModelWithOneOfEnum = {\n    foo: 'Bar';\n} | {\n    foo: 'Baz';\n} | {\n    foo: 'Qux';\n} | {\n    content: string;\n    foo: 'Quux';\n} | {\n    content: [\n        string,\n        string\n    ];\n    foo: 'Corge';\n};\n\nexport type ModelWithNestedArrayEnumsDataFoo = 'foo' | 'bar';\n\nexport type ModelWithNestedArrayEnumsDataBar = 'baz' | 'qux';\n\nexport type ModelWithNestedArrayEnumsData = {\n    foo?: Array<ModelWithNestedArrayEnumsDataFoo>;\n    bar?: Array<ModelWithNestedArrayEnumsDataBar>;\n};\n\nexport type ModelWithNestedArrayEnums = {\n    array_strings?: Array<string>;\n    data?: ModelWithNestedArrayEnumsData;\n};\n\nexport type ModelWithNestedCompositionEnums = {\n    foo?: ModelWithNestedArrayEnumsDataFoo;\n};\n\nexport type ModelWithReadOnlyAndWriteOnly = {\n    foo: string;\n    readonly bar: string;\n};\n\nexport type ModelWithConstantSizeArray = [\n    number,\n    number\n];\n\nexport type ModelWithAnyOfConstantSizeArray = [\n    number | string,\n    number | string,\n    number | string\n];\n\nexport type ModelWithPrefixItemsConstantSizeArray = [\n    ModelWithInteger,\n    number | string,\n    string\n];\n\nexport type ModelWithAnyOfConstantSizeArrayNullable = [\n    number | null | string,\n    number | null | string,\n    number | null | string\n];\n\nexport type ModelWithAnyOfConstantSizeArrayWithNSizeAndOptions = [\n    number | Import,\n    number | Import\n];\n\nexport type ModelWithAnyOfConstantSizeArrayAndIntersect = [\n    number & string,\n    number & string\n];\n\nexport type ModelWithNumericEnumUnion = {\n    /**\n     * Период\n     */\n    value?: -10 | -1 | 0 | 1 | 3 | 6 | 12;\n};\n\n/**\n * Some description with `back ticks`\n */\nexport type ModelWithBackticksInDescription = {\n    /**\n     * The template `that` should be used for parsing and importing the contents of the CSV file.\n     *\n     * <br/><p>There is one placeholder currently supported:<ul>     <li><b>${x}</b> - refers to the n-th column in the CSV file, e.g. ${1}, ${2}, ...)</li></ul><p>Example of a correct JSON template:</p>\n     * <pre>\n     * [\n     * {\n     * \"resourceType\": \"Asset\",\n     * \"identifier\": {\n     * \"name\": \"${1}\",\n     * \"domain\": {\n     * \"name\": \"${2}\",\n     * \"community\": {\n     * \"name\": \"Some Community\"\n     * }\n     * }\n     * },\n     * \"attributes\" : {\n     * \"00000000-0000-0000-0000-000000003115\" : [ {\n     * \"value\" : \"${3}\"\n     * } ],\n     * \"00000000-0000-0000-0000-000000000222\" : [ {\n     * \"value\" : \"${4}\"\n     * } ]\n     * }\n     * }\n     * ]\n     * </pre>\n     */\n    template?: string;\n};\n\nexport type ModelWithOneOfAndProperties = (SimpleParameter | NonAsciiStringæøåÆøÅöôêÊ字符串) & {\n    baz: number | null;\n    qux: number;\n};\n\n/**\n * Model used to test deduplication strategy (unused)\n */\nexport type ParameterSimpleParameterUnused = string;\n\n/**\n * Model used to test deduplication strategy\n */\nexport type PostServiceWithEmptyTagResponse = string;\n\n/**\n * Model used to test deduplication strategy\n */\nexport type PostServiceWithEmptyTagResponse2 = string;\n\n/**\n * Model used to test deduplication strategy\n */\nexport type DeleteFooData = string;\n\n/**\n * Model used to test deduplication strategy\n */\nexport type DeleteFooData2 = string;\n\n/**\n * Model with restricted keyword name\n */\nexport type Import = string;\n\nexport type SchemaWithFormRestrictedKeys = {\n    description?: string;\n    'x-enum-descriptions'?: string;\n    'x-enum-varnames'?: string;\n    'x-enumNames'?: string;\n    title?: string;\n    object?: {\n        description?: string;\n        'x-enum-descriptions'?: string;\n        'x-enum-varnames'?: string;\n        'x-enumNames'?: string;\n        title?: string;\n    };\n    array?: Array<{\n        description?: string;\n        'x-enum-descriptions'?: string;\n        'x-enum-varnames'?: string;\n        'x-enumNames'?: string;\n        title?: string;\n    }>;\n};\n\n/**\n * This schema was giving PascalCase transformations a hard time\n */\nexport type IoK8sApimachineryPkgApisMetaV1DeleteOptions = {\n    /**\n     * Must be fulfilled before a deletion is carried out. If not possible, a 409 Conflict status will be returned.\n     */\n    preconditions?: IoK8sApimachineryPkgApisMetaV1Preconditions;\n};\n\n/**\n * This schema was giving PascalCase transformations a hard time\n */\nexport type IoK8sApimachineryPkgApisMetaV1Preconditions = {\n    /**\n     * Specifies the target ResourceVersion\n     */\n    resourceVersion?: string;\n    /**\n     * Specifies the target UID.\n     */\n    uid?: string;\n};\n\nexport type AdditionalPropertiesUnknownIssue = {\n    [key: string]: string | number;\n};\n\nexport type AdditionalPropertiesUnknownIssue2 = {\n    [key: string]: string | number;\n};\n\nexport type AdditionalPropertiesUnknownIssue3 = string & {\n    entries: {\n        [key: string]: AdditionalPropertiesUnknownIssue;\n    };\n};\n\nexport type AdditionalPropertiesIntegerIssue = {\n    value: number;\n    [key: string]: number;\n};\n\nexport type OneOfAllOfIssue = ((ConstValue | GenericSchemaDuplicateIssue1SystemBoolean) & _3eNum1Период) | GenericSchemaDuplicateIssue1SystemString;\n\nexport type GenericSchemaDuplicateIssue1SystemBoolean = {\n    item?: boolean;\n    error?: string | null;\n    readonly hasError?: boolean;\n    data?: {\n        [key: string]: never;\n    };\n};\n\nexport type GenericSchemaDuplicateIssue1SystemString = {\n    item?: string | null;\n    error?: string | null;\n    readonly hasError?: boolean;\n};\n\nexport type ExternalSharedModel = {\n    id: string;\n    name?: string;\n};\n\n/**\n * This is a model with one property containing a reference\n */\nexport type ModelWithReferenceWritable = {\n    prop?: ModelWithPropertiesWritable;\n};\n\n/**\n * This is a model with one property containing an array\n */\nexport type ModelWithArrayReadOnlyAndWriteOnlyWritable = {\n    prop?: Array<ModelWithReadOnlyAndWriteOnlyWritable>;\n    propWithFile?: Array<Blob | File>;\n    propWithNumber?: Array<number>;\n};\n\n/**\n * This is a model with one nested property\n */\nexport type ModelWithPropertiesWritable = {\n    required: string;\n    requiredAndNullable: string | null;\n    string?: string;\n    number?: number;\n    boolean?: boolean;\n    reference?: ModelWithString;\n    'property with space'?: string;\n    default?: string;\n    try?: string;\n};\n\n/**\n * This is a model that contains a some patterns\n */\nexport type ModelWithPatternWritable = {\n    key: string;\n    name: string;\n    id?: string;\n    text?: string;\n    patternWithSingleQuotes?: string;\n    patternWithNewline?: string;\n    patternWithBacktick?: string;\n    patternWithUnicode?: string;\n};\n\nexport type FileWritable = {\n    /**\n     * Mime\n     */\n    mime: string;\n};\n\nexport type ModelWithReadOnlyAndWriteOnlyWritable = {\n    foo: string;\n    baz: string;\n};\n\nexport type ModelWithAnyOfConstantSizeArrayWithNSizeAndOptionsWritable = [\n    number | Import,\n    number | Import\n];\n\nexport type AdditionalPropertiesUnknownIssueWritable = {\n    [key: string]: string | number;\n};\n\nexport type OneOfAllOfIssueWritable = ((ConstValue | GenericSchemaDuplicateIssue1SystemBoolean) & _3eNum1Период) | GenericSchemaDuplicateIssue1SystemString;\n\nexport type GenericSchemaDuplicateIssue1SystemBooleanWritable = {\n    item?: boolean;\n    error?: string | null;\n    data?: {\n        [key: string]: never;\n    };\n};\n\nexport type GenericSchemaDuplicateIssue1SystemStringWritable = {\n    item?: string | null;\n    error?: string | null;\n};\n\n/**\n * This is a reusable parameter\n */\nexport type SimpleParameter = string;\n\n/**\n * Parameter with illegal characters\n */\nexport type XFooBar = ModelWithString;\n\n/**\n * A reusable request body\n */\nexport type SimpleRequestBody = ModelWithString;\n\n/**\n * A reusable request body\n */\nexport type SimpleFormData = ModelWithString;\n\nexport type ExportData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no+tag';\n};\n\nexport type PatchApiVbyApiVersionNoTagData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no+tag';\n};\n\nexport type PatchApiVbyApiVersionNoTagResponses = {\n    /**\n     * OK\n     */\n    default: unknown;\n};\n\nexport type ImportData = {\n    body: ModelWithReadOnlyAndWriteOnlyWritable | ModelWithArrayReadOnlyAndWriteOnlyWritable;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no+tag';\n};\n\nexport type ImportResponses = {\n    /**\n     * Success\n     */\n    200: ModelFromZendesk;\n    /**\n     * Default success response\n     */\n    default: ModelWithReadOnlyAndWriteOnly;\n};\n\nexport type ImportResponse = ImportResponses[keyof ImportResponses];\n\nexport type FooWowData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no+tag';\n};\n\nexport type FooWowResponses = {\n    /**\n     * OK\n     */\n    default: unknown;\n};\n\nexport type ApiVVersionODataControllerCountData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple/$count';\n};\n\nexport type ApiVVersionODataControllerCountResponses = {\n    /**\n     * Success\n     */\n    200: ModelFromZendesk;\n};\n\nexport type ApiVVersionODataControllerCountResponse = ApiVVersionODataControllerCountResponses[keyof ApiVVersionODataControllerCountResponses];\n\nexport type GetApiVbyApiVersionSimpleOperationData = {\n    body?: never;\n    path: {\n        /**\n         * foo in method\n         */\n        foo_param: string;\n    };\n    query?: never;\n    url: '/api/v{api-version}/simple:operation';\n};\n\nexport type GetApiVbyApiVersionSimpleOperationErrors = {\n    /**\n     * Default error response\n     */\n    default: ModelWithBoolean;\n};\n\nexport type GetApiVbyApiVersionSimpleOperationError = GetApiVbyApiVersionSimpleOperationErrors[keyof GetApiVbyApiVersionSimpleOperationErrors];\n\nexport type GetApiVbyApiVersionSimpleOperationResponses = {\n    /**\n     * Response is a simple number\n     */\n    200: number;\n};\n\nexport type GetApiVbyApiVersionSimpleOperationResponse = GetApiVbyApiVersionSimpleOperationResponses[keyof GetApiVbyApiVersionSimpleOperationResponses];\n\nexport type DeleteCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type GetCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type HeadCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type OptionsCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type PatchCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type PostCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type PutCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type DeleteFooData3 = {\n    body?: never;\n    headers: {\n        /**\n         * Parameter with illegal characters\n         */\n        'x-Foo-Bar': ModelWithString;\n    };\n    path: {\n        /**\n         * foo in method\n         */\n        foo_param: string;\n        /**\n         * bar in method\n         */\n        BarParam: string;\n    };\n    query?: never;\n    url: '/api/v{api-version}/foo/{foo_param}/bar/{BarParam}';\n};\n\nexport type CallWithDescriptionsData = {\n    body?: never;\n    path?: never;\n    query?: {\n        /**\n         * Testing multiline comments in string: First line\n         * Second line\n         *\n         * Fourth line\n         */\n        parameterWithBreaks?: string;\n        /**\n         * Testing backticks in string: `backticks` and ```multiple backticks``` should work\n         */\n        parameterWithBackticks?: string;\n        /**\n         * Testing slashes in string: \\backwards\\\\\\ and /forwards/// should work\n         */\n        parameterWithSlashes?: string;\n        /**\n         * Testing expression placeholders in string: ${expression} should work\n         */\n        parameterWithExpressionPlaceholders?: string;\n        /**\n         * Testing quotes in string: 'single quote''' and \"double quotes\"\"\" should work\n         */\n        parameterWithQuotes?: string;\n        /**\n         * Testing reserved characters in string: * inline * and ** inline ** should work\n         */\n        parameterWithReservedCharacters?: string;\n    };\n    url: '/api/v{api-version}/descriptions';\n};\n\nexport type DeprecatedCallData = {\n    body?: never;\n    headers: {\n        /**\n         * This parameter is deprecated\n         *\n         * @deprecated\n         */\n        parameter: DeprecatedModel | null;\n    };\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/parameters/deprecated';\n};\n\nexport type CallWithParametersData = {\n    /**\n     * This is the parameter that goes into the body\n     */\n    body: {\n        [key: string]: unknown;\n    } | null;\n    headers: {\n        /**\n         * This is the parameter that goes into the header\n         */\n        parameterHeader: string | null;\n    };\n    path: {\n        /**\n         * This is the parameter that goes into the path\n         */\n        parameterPath: string | null;\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string | null;\n    };\n    query: {\n        foo_ref_enum?: ModelWithNestedArrayEnumsDataFoo;\n        foo_all_of_enum: ModelWithNestedArrayEnumsDataFoo;\n        /**\n         * This is the parameter that goes into the query params\n         */\n        cursor: string | null;\n    };\n    url: '/api/v{api-version}/parameters/{parameterPath}';\n};\n\nexport type CallWithWeirdParameterNamesData = {\n    /**\n     * This is the parameter that goes into the body\n     */\n    body: ModelWithString | null;\n    headers: {\n        /**\n         * This is the parameter that goes into the request header\n         */\n        'parameter.header': string | null;\n    };\n    path: {\n        /**\n         * This is the parameter that goes into the path\n         */\n        'parameter.path.1'?: string;\n        /**\n         * This is the parameter that goes into the path\n         */\n        'parameter-path-2'?: string;\n        /**\n         * This is the parameter that goes into the path\n         */\n        'PARAMETER-PATH-3'?: string;\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string | null;\n    };\n    query: {\n        /**\n         * This is the parameter with a reserved keyword\n         */\n        default?: string;\n        /**\n         * This is the parameter that goes into the request query params\n         */\n        'parameter-query': string | null;\n    };\n    url: '/api/v{api-version}/parameters/{parameter.path.1}/{parameter-path-2}/{PARAMETER-PATH-3}';\n};\n\nexport type GetCallWithOptionalParamData = {\n    /**\n     * This is a required parameter\n     */\n    body: ModelWithOneOfEnum;\n    path?: never;\n    query?: {\n        /**\n         * This is an optional parameter\n         */\n        page?: number;\n    };\n    url: '/api/v{api-version}/parameters';\n};\n\nexport type PostCallWithOptionalParamData = {\n    /**\n     * This is an optional parameter\n     */\n    body?: {\n        offset?: number | null;\n    };\n    path?: never;\n    query: {\n        /**\n         * This is a required parameter\n         */\n        parameter: Pageable;\n    };\n    url: '/api/v{api-version}/parameters';\n};\n\nexport type PostCallWithOptionalParamResponses = {\n    /**\n     * Response is a simple number\n     */\n    200: number;\n    /**\n     * Success\n     */\n    204: void;\n};\n\nexport type PostCallWithOptionalParamResponse = PostCallWithOptionalParamResponses[keyof PostCallWithOptionalParamResponses];\n\nexport type PostApiVbyApiVersionRequestBodyData = {\n    /**\n     * A reusable request body\n     */\n    body?: SimpleRequestBody;\n    path?: never;\n    query?: {\n        /**\n         * This is a reusable parameter\n         */\n        parameter?: string;\n    };\n    url: '/api/v{api-version}/requestBody';\n};\n\nexport type PostApiVbyApiVersionFormDataData = {\n    /**\n     * A reusable request body\n     */\n    body?: SimpleFormData;\n    path?: never;\n    query?: {\n        /**\n         * This is a reusable parameter\n         */\n        parameter?: string;\n    };\n    url: '/api/v{api-version}/formData';\n};\n\nexport type CallWithDefaultParametersData = {\n    body?: never;\n    path?: never;\n    query?: {\n        /**\n         * This is a simple string with default value\n         */\n        parameterString?: string | null;\n        /**\n         * This is a simple number with default value\n         */\n        parameterNumber?: number | null;\n        /**\n         * This is a simple boolean with default value\n         */\n        parameterBoolean?: boolean | null;\n        /**\n         * This is a simple enum with default value\n         */\n        parameterEnum?: 'Success' | 'Warning' | 'Error';\n        /**\n         * This is a simple model with default value\n         */\n        parameterModel?: ModelWithString | null;\n    };\n    url: '/api/v{api-version}/defaults';\n};\n\nexport type CallWithDefaultOptionalParametersData = {\n    body?: never;\n    path?: never;\n    query?: {\n        /**\n         * This is a simple string that is optional with default value\n         */\n        parameterString?: string;\n        /**\n         * This is a simple number that is optional with default value\n         */\n        parameterNumber?: number;\n        /**\n         * This is a simple boolean that is optional with default value\n         */\n        parameterBoolean?: boolean;\n        /**\n         * This is a simple enum that is optional with default value\n         */\n        parameterEnum?: 'Success' | 'Warning' | 'Error';\n        /**\n         * This is a simple model that is optional with default value\n         */\n        parameterModel?: ModelWithString;\n    };\n    url: '/api/v{api-version}/defaults';\n};\n\nexport type CallToTestOrderOfParamsData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * This is a optional string with default\n         */\n        parameterOptionalStringWithDefault?: string;\n        /**\n         * This is a optional string with empty default\n         */\n        parameterOptionalStringWithEmptyDefault?: string;\n        /**\n         * This is a optional string with no default\n         */\n        parameterOptionalStringWithNoDefault?: string;\n        /**\n         * This is a string with default\n         */\n        parameterStringWithDefault: string;\n        /**\n         * This is a string with empty default\n         */\n        parameterStringWithEmptyDefault: string;\n        /**\n         * This is a string with no default\n         */\n        parameterStringWithNoDefault: string;\n        /**\n         * This is a string that can be null with no default\n         */\n        parameterStringNullableWithNoDefault?: string | null;\n        /**\n         * This is a string that can be null with default\n         */\n        parameterStringNullableWithDefault?: string | null;\n    };\n    url: '/api/v{api-version}/defaults';\n};\n\nexport type DuplicateNameData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/duplicate';\n};\n\nexport type DuplicateName2Data = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/duplicate';\n};\n\nexport type DuplicateName3Data = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/duplicate';\n};\n\nexport type DuplicateName4Data = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/duplicate';\n};\n\nexport type CallWithNoContentResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no-content';\n};\n\nexport type CallWithNoContentResponseResponses = {\n    /**\n     * Success\n     */\n    204: void;\n};\n\nexport type CallWithNoContentResponseResponse = CallWithNoContentResponseResponses[keyof CallWithNoContentResponseResponses];\n\nexport type CallWithResponseAndNoContentResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multiple-tags/response-and-no-content';\n};\n\nexport type CallWithResponseAndNoContentResponseResponses = {\n    /**\n     * Response is a simple number\n     */\n    200: number;\n    /**\n     * Success\n     */\n    204: void;\n};\n\nexport type CallWithResponseAndNoContentResponseResponse = CallWithResponseAndNoContentResponseResponses[keyof CallWithResponseAndNoContentResponseResponses];\n\nexport type DummyAData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multiple-tags/a';\n};\n\nexport type DummyAResponses = {\n    200: _400;\n};\n\nexport type DummyAResponse = DummyAResponses[keyof DummyAResponses];\n\nexport type DummyBData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multiple-tags/b';\n};\n\nexport type DummyBResponses = {\n    /**\n     * Success\n     */\n    204: void;\n};\n\nexport type DummyBResponse = DummyBResponses[keyof DummyBResponses];\n\nexport type CallWithResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/response';\n};\n\nexport type CallWithResponseResponses = {\n    default: Import;\n};\n\nexport type CallWithResponseResponse = CallWithResponseResponses[keyof CallWithResponseResponses];\n\nexport type CallWithDuplicateResponsesData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/response';\n};\n\nexport type CallWithDuplicateResponsesErrors = {\n    /**\n     * Message for 500 error\n     */\n    500: ModelWithStringError;\n    /**\n     * Message for 501 error\n     */\n    501: ModelWithStringError;\n    /**\n     * Message for 502 error\n     */\n    502: ModelWithStringError;\n    /**\n     * Message for 4XX errors\n     */\n    '4XX': DictionaryWithArray;\n    /**\n     * Default error response\n     */\n    default: ModelWithBoolean;\n};\n\nexport type CallWithDuplicateResponsesError = CallWithDuplicateResponsesErrors[keyof CallWithDuplicateResponsesErrors];\n\nexport type CallWithDuplicateResponsesResponses = {\n    /**\n     * Message for 200 response\n     */\n    200: ModelWithBoolean & ModelWithInteger;\n    /**\n     * Message for 201 response\n     */\n    201: ModelWithString;\n    /**\n     * Message for 202 response\n     */\n    202: ModelWithString;\n};\n\nexport type CallWithDuplicateResponsesResponse = CallWithDuplicateResponsesResponses[keyof CallWithDuplicateResponsesResponses];\n\nexport type CallWithResponsesData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/response';\n};\n\nexport type CallWithResponsesErrors = {\n    /**\n     * Message for 500 error\n     */\n    500: ModelWithStringError;\n    /**\n     * Message for 501 error\n     */\n    501: ModelWithStringError;\n    /**\n     * Message for 502 error\n     */\n    502: ModelWithStringError;\n    /**\n     * Message for default response\n     */\n    default: ModelWithStringError;\n};\n\nexport type CallWithResponsesError = CallWithResponsesErrors[keyof CallWithResponsesErrors];\n\nexport type CallWithResponsesResponses = {\n    /**\n     * Message for 200 response\n     */\n    200: {\n        readonly '@namespace.string'?: string;\n        readonly '@namespace.integer'?: number;\n        readonly value?: Array<ModelWithString>;\n    };\n    /**\n     * Message for 201 response\n     */\n    201: ModelThatExtends;\n    /**\n     * Message for 202 response\n     */\n    202: ModelThatExtendsExtends;\n};\n\nexport type CallWithResponsesResponse = CallWithResponsesResponses[keyof CallWithResponsesResponses];\n\nexport type CollectionFormatData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * This is an array parameter that is sent as csv format (comma-separated values)\n         */\n        parameterArrayCSV: Array<string> | null;\n        /**\n         * This is an array parameter that is sent as ssv format (space-separated values)\n         */\n        parameterArraySSV: Array<string> | null;\n        /**\n         * This is an array parameter that is sent as tsv format (tab-separated values)\n         */\n        parameterArrayTSV: Array<string> | null;\n        /**\n         * This is an array parameter that is sent as pipes format (pipe-separated values)\n         */\n        parameterArrayPipes: Array<string> | null;\n        /**\n         * This is an array parameter that is sent as multi format (multiple parameter instances)\n         */\n        parameterArrayMulti: Array<string> | null;\n    };\n    url: '/api/v{api-version}/collectionFormat';\n};\n\nexport type TypesData = {\n    body?: never;\n    path?: {\n        /**\n         * This is a number parameter\n         */\n        id?: number;\n    };\n    query: {\n        /**\n         * This is a number parameter\n         */\n        parameterNumber: number;\n        /**\n         * This is a string parameter\n         */\n        parameterString: string | null;\n        /**\n         * This is a boolean parameter\n         */\n        parameterBoolean: boolean | null;\n        /**\n         * This is an object parameter\n         */\n        parameterObject: {\n            [key: string]: unknown;\n        } | null;\n        /**\n         * This is an array parameter\n         */\n        parameterArray: Array<string> | null;\n        /**\n         * This is a dictionary parameter\n         */\n        parameterDictionary: {\n            [key: string]: unknown;\n        } | null;\n        /**\n         * This is an enum parameter\n         */\n        parameterEnum: 'Success' | 'Warning' | 'Error' | null;\n    };\n    url: '/api/v{api-version}/types';\n};\n\nexport type TypesResponses = {\n    /**\n     * Response is a simple number\n     */\n    200: number;\n    /**\n     * Response is a simple string\n     */\n    201: string;\n    /**\n     * Response is a simple boolean\n     */\n    202: boolean;\n    /**\n     * Response is a simple object\n     */\n    203: {\n        [key: string]: unknown;\n    };\n};\n\nexport type TypesResponse = TypesResponses[keyof TypesResponses];\n\nexport type UploadFileData = {\n    body: Blob | File;\n    path: {\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string | null;\n    };\n    query?: never;\n    url: '/api/v{api-version}/upload';\n};\n\nexport type UploadFileResponses = {\n    200: boolean;\n};\n\nexport type UploadFileResponse = UploadFileResponses[keyof UploadFileResponses];\n\nexport type FileResponseData = {\n    body?: never;\n    path: {\n        id: string;\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string;\n    };\n    query?: never;\n    url: '/api/v{api-version}/file/{id}';\n};\n\nexport type FileResponseResponses = {\n    /**\n     * Success\n     */\n    200: Blob | File;\n};\n\nexport type FileResponseResponse = FileResponseResponses[keyof FileResponseResponses];\n\nexport type ComplexTypesData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * Parameter containing object\n         */\n        parameterObject: {\n            first?: {\n                second?: {\n                    third?: string;\n                };\n            };\n        };\n        /**\n         * Parameter containing reference\n         */\n        parameterReference: ModelWithString;\n    };\n    url: '/api/v{api-version}/complex';\n};\n\nexport type ComplexTypesErrors = {\n    /**\n     * 400 `server` error\n     */\n    400: unknown;\n    /**\n     * 500 server error\n     */\n    500: unknown;\n};\n\nexport type ComplexTypesResponses = {\n    /**\n     * Successful response\n     */\n    200: Array<ModelWithString>;\n};\n\nexport type ComplexTypesResponse = ComplexTypesResponses[keyof ComplexTypesResponses];\n\nexport type MultipartResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multipart';\n};\n\nexport type MultipartResponseResponses = {\n    /**\n     * OK\n     */\n    200: {\n        file?: Blob | File;\n        metadata?: {\n            foo?: string;\n            bar?: string;\n        };\n    };\n};\n\nexport type MultipartResponseResponse = MultipartResponseResponses[keyof MultipartResponseResponses];\n\nexport type MultipartRequestData = {\n    body?: {\n        content?: Blob | File;\n        data?: ModelWithString | null;\n    };\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multipart';\n};\n\nexport type ComplexParamsData = {\n    body?: {\n        readonly key: string | null;\n        name: string | null;\n        enabled?: boolean;\n        type: 'Monkey' | 'Horse' | 'Bird';\n        listOfModels?: Array<ModelWithString> | null;\n        listOfStrings?: Array<string> | null;\n        parameters: ModelWithString | ModelWithEnum | ModelWithArray | ModelWithDictionary;\n        readonly user?: {\n            readonly id?: number;\n            readonly name?: string | null;\n        };\n    };\n    path: {\n        id: number;\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string;\n    };\n    query?: never;\n    url: '/api/v{api-version}/complex/{id}';\n};\n\nexport type ComplexParamsResponses = {\n    /**\n     * Success\n     */\n    200: ModelWithString;\n};\n\nexport type ComplexParamsResponse = ComplexParamsResponses[keyof ComplexParamsResponses];\n\nexport type CallWithResultFromHeaderData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/header';\n};\n\nexport type CallWithResultFromHeaderErrors = {\n    /**\n     * 400 server error\n     */\n    400: unknown;\n    /**\n     * 500 server error\n     */\n    500: unknown;\n};\n\nexport type CallWithResultFromHeaderResponses = {\n    /**\n     * Successful response\n     */\n    200: unknown;\n};\n\nexport type TestErrorCodeData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * Status code to return\n         */\n        status: number;\n    };\n    url: '/api/v{api-version}/error';\n};\n\nexport type TestErrorCodeErrors = {\n    /**\n     * Custom message: Internal Server Error\n     */\n    500: unknown;\n    /**\n     * Custom message: Not Implemented\n     */\n    501: unknown;\n    /**\n     * Custom message: Bad Gateway\n     */\n    502: unknown;\n    /**\n     * Custom message: Service Unavailable\n     */\n    503: unknown;\n};\n\nexport type TestErrorCodeResponses = {\n    /**\n     * Custom message: Successful response\n     */\n    200: unknown;\n};\n\nexport type NonAsciiæøåÆøÅöôêÊ字符串Data = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * Dummy input param\n         */\n        nonAsciiParamæøåÆØÅöôêÊ: number;\n    };\n    url: '/api/v{api-version}/non-ascii-æøåÆØÅöôêÊ字符串';\n};\n\nexport type NonAsciiæøåÆøÅöôêÊ字符串Responses = {\n    /**\n     * Successful response\n     */\n    200: Array<NonAsciiStringæøåÆøÅöôêÊ字符串>;\n};\n\nexport type NonAsciiæøåÆøÅöôêÊ字符串Response = NonAsciiæøåÆøÅöôêÊ字符串Responses[keyof NonAsciiæøåÆøÅöôêÊ字符串Responses];\n\nexport type PutWithFormUrlEncodedData = {\n    body: ArrayWithStrings;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/non-ascii-æøåÆØÅöôêÊ字符串';\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-fetch/base-url-number/client/client.gen.ts",
    "content": "// 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 (options: RequestOptions) => {\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 url = buildUrl(opts);\n\n    return { opts, url };\n  };\n\n  const request: Client['request'] = async (options) => {\n    // @ts-expect-error\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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-fetch/base-url-number/client/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type { Auth } from '../core/auth.gen';\nexport type { QuerySerializerOptions } from '../core/bodySerializer.gen';\nexport {\n  formDataBodySerializer,\n  jsonBodySerializer,\n  urlSearchParamsBodySerializer,\n} from '../core/bodySerializer.gen';\nexport { buildClientParams } from '../core/params.gen';\nexport { serializeQueryKeyValue } from '../core/queryKeySerializer.gen';\nexport { createClient } from './client.gen';\nexport type {\n  Client,\n  ClientOptions,\n  Config,\n  CreateClientConfig,\n  Options,\n  RequestOptions,\n  RequestResult,\n  ResolvedRequestOptions,\n  ResponseStyle,\n  TDataShape,\n} from './types.gen';\nexport { createConfig, mergeHeaders } from './utils.gen';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-fetch/base-url-number/client/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { Auth } from '../core/auth.gen';\nimport type {\n  ServerSentEventsOptions,\n  ServerSentEventsResult,\n} from '../core/serverSentEvents.gen';\nimport type { Client as CoreClient, Config as CoreConfig } from '../core/types.gen';\nimport type { Middleware } from './utils.gen';\n\nexport type ResponseStyle = 'data' | 'fields';\n\nexport interface Config<T extends ClientOptions = ClientOptions>\n  extends Omit<RequestInit, 'body' | 'headers' | 'method'>, CoreConfig {\n  /**\n   * Base URL for all requests made by this client.\n   */\n  baseUrl?: T['baseUrl'];\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   * Please don't use the Fetch client for Next.js applications. The `next`\n   * options won't have any effect.\n   *\n   * Install {@link https://www.npmjs.com/package/@hey-api/client-next `@hey-api/client-next`} instead.\n   */\n  next?: never;\n  /**\n   * Return the response data parsed in a specified format. By default, `auto`\n   * will infer the appropriate method from the `Content-Type` response header.\n   * You can override this behavior with any of the {@link Body} methods.\n   * Select `stream` if you don't want to parse response data at all.\n   *\n   * @default 'auto'\n   */\n  parseAs?: 'arrayBuffer' | 'auto' | 'blob' | 'formData' | 'json' | 'stream' | 'text';\n  /**\n   * Should we return only data or multiple fields (data, error, response, etc.)?\n   *\n   * @default 'fields'\n   */\n  responseStyle?: ResponseStyle;\n  /**\n   * Throw an error instead of returning it in the response?\n   *\n   * @default false\n   */\n  throwOnError?: T['throwOnError'];\n}\n\nexport interface RequestOptions<\n  TData = unknown,\n  TResponseStyle extends ResponseStyle = 'fields',\n  ThrowOnError extends boolean = boolean,\n  Url extends string = string,\n>\n  extends\n    Config<{\n      responseStyle: TResponseStyle;\n      throwOnError: ThrowOnError;\n    }>,\n    Pick<\n      ServerSentEventsOptions<TData>,\n      | 'onRequest'\n      | 'onSseError'\n      | 'onSseEvent'\n      | 'sseDefaultRetryDelay'\n      | 'sseMaxRetryAttempts'\n      | 'sseMaxRetryDelay'\n    > {\n  /**\n   * Any body that you want to add to your request.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/fetch#body}\n   */\n  body?: unknown;\n  path?: Record<string, unknown>;\n  query?: Record<string, unknown>;\n  /**\n   * Security mechanism(s) to use for the request.\n   */\n  security?: ReadonlyArray<Auth>;\n  url: Url;\n}\n\nexport interface ResolvedRequestOptions<\n  TResponseStyle extends ResponseStyle = 'fields',\n  ThrowOnError extends boolean = boolean,\n  Url extends string = string,\n> extends RequestOptions<unknown, TResponseStyle, ThrowOnError, Url> {\n  serializedBody?: string;\n}\n\nexport type RequestResult<\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = boolean,\n  TResponseStyle extends ResponseStyle = 'fields',\n> = ThrowOnError extends true\n  ? Promise<\n      TResponseStyle extends 'data'\n        ? TData extends Record<string, unknown>\n          ? TData[keyof TData]\n          : TData\n        : {\n            data: TData extends Record<string, unknown> ? TData[keyof TData] : TData;\n            request: Request;\n            response: Response;\n          }\n    >\n  : Promise<\n      TResponseStyle extends 'data'\n        ? (TData extends Record<string, unknown> ? TData[keyof TData] : TData) | undefined\n        : (\n            | {\n                data: TData extends Record<string, unknown> ? TData[keyof TData] : TData;\n                error: undefined;\n              }\n            | {\n                data: undefined;\n                error: TError extends Record<string, unknown> ? TError[keyof TError] : TError;\n              }\n          ) & {\n            request: Request;\n            response: Response;\n          }\n    >;\n\nexport interface ClientOptions {\n  baseUrl?: string;\n  responseStyle?: ResponseStyle;\n  throwOnError?: boolean;\n}\n\ntype MethodFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'>,\n) => RequestResult<TData, TError, ThrowOnError, TResponseStyle>;\n\ntype SseFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'>,\n) => Promise<ServerSentEventsResult<TData, TError>>;\n\ntype RequestFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'> &\n    Pick<Required<RequestOptions<TData, TResponseStyle, ThrowOnError>>, 'method'>,\n) => RequestResult<TData, TError, ThrowOnError, TResponseStyle>;\n\ntype BuildUrlFn = <\n  TData extends {\n    body?: unknown;\n    path?: Record<string, unknown>;\n    query?: Record<string, unknown>;\n    url: string;\n  },\n>(\n  options: TData & Options<TData>,\n) => string;\n\nexport type Client = CoreClient<RequestFn, Config, MethodFn, BuildUrlFn, SseFn> & {\n  interceptors: Middleware<Request, Response, unknown, ResolvedRequestOptions>;\n};\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 = ClientOptions> = (\n  override?: Config<ClientOptions & T>,\n) => Config<Required<ClientOptions> & T>;\n\nexport interface TDataShape {\n  body?: unknown;\n  headers?: unknown;\n  path?: unknown;\n  query?: unknown;\n  url: string;\n}\n\ntype OmitKeys<T, K> = Pick<T, Exclude<keyof T, K>>;\n\nexport type Options<\n  TData extends TDataShape = TDataShape,\n  ThrowOnError extends boolean = boolean,\n  TResponse = unknown,\n  TResponseStyle extends ResponseStyle = 'fields',\n> = OmitKeys<\n  RequestOptions<TResponse, TResponseStyle, ThrowOnError>,\n  'body' | 'path' | 'query' | 'url'\n> &\n  ([TData] extends [never] ? unknown : Omit<TData, 'url'>);\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-fetch/base-url-number/client/utils.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-fetch/base-url-number/client.gen.ts",
    "content": "// 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: 'http://localhost:3000/base' }));\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-fetch/base-url-number/core/auth.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-fetch/base-url-number/core/bodySerializer.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-fetch/base-url-number/core/params.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-fetch/base-url-number/core/pathSerializer.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-fetch/base-url-number/core/queryKeySerializer.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\n/**\n * JSON-friendly union that mirrors what Pinia Colada can hash.\n */\nexport type JsonValue =\n  | null\n  | string\n  | number\n  | boolean\n  | JsonValue[]\n  | { [key: string]: JsonValue };\n\n/**\n * Replacer that converts non-JSON values (bigint, Date, etc.) to safe substitutes.\n */\nexport const queryKeyJsonReplacer = (_key: string, value: unknown) => {\n  if (value === undefined || typeof value === 'function' || typeof value === 'symbol') {\n    return undefined;\n  }\n  if (typeof value === 'bigint') {\n    return value.toString();\n  }\n  if (value instanceof Date) {\n    return value.toISOString();\n  }\n  return value;\n};\n\n/**\n * Safely stringifies a value and parses it back into a JsonValue.\n */\nexport const stringifyToJsonValue = (input: unknown): JsonValue | undefined => {\n  try {\n    const json = JSON.stringify(input, queryKeyJsonReplacer);\n    if (json === undefined) {\n      return undefined;\n    }\n    return JSON.parse(json) as JsonValue;\n  } catch {\n    return undefined;\n  }\n};\n\n/**\n * Detects plain objects (including objects with a null prototype).\n */\nconst isPlainObject = (value: unknown): value is Record<string, unknown> => {\n  if (value === null || typeof value !== 'object') {\n    return false;\n  }\n  const prototype = Object.getPrototypeOf(value as object);\n  return prototype === Object.prototype || prototype === null;\n};\n\n/**\n * Turns URLSearchParams into a sorted JSON object for deterministic keys.\n */\nconst serializeSearchParams = (params: URLSearchParams): JsonValue => {\n  const entries = Array.from(params.entries()).sort(([a], [b]) => a.localeCompare(b));\n  const result: Record<string, JsonValue> = {};\n\n  for (const [key, value] of entries) {\n    const existing = result[key];\n    if (existing === undefined) {\n      result[key] = value;\n      continue;\n    }\n\n    if (Array.isArray(existing)) {\n      (existing as string[]).push(value);\n    } else {\n      result[key] = [existing, value];\n    }\n  }\n\n  return result;\n};\n\n/**\n * Normalizes any accepted value into a JSON-friendly shape for query keys.\n */\nexport const serializeQueryKeyValue = (value: unknown): JsonValue | undefined => {\n  if (value === null) {\n    return null;\n  }\n\n  if (typeof value === 'string' || typeof value === 'number' || typeof value === 'boolean') {\n    return value;\n  }\n\n  if (value === undefined || typeof value === 'function' || typeof value === 'symbol') {\n    return undefined;\n  }\n\n  if (typeof value === 'bigint') {\n    return value.toString();\n  }\n\n  if (value instanceof Date) {\n    return value.toISOString();\n  }\n\n  if (Array.isArray(value)) {\n    return stringifyToJsonValue(value);\n  }\n\n  if (typeof URLSearchParams !== 'undefined' && value instanceof URLSearchParams) {\n    return serializeSearchParams(value);\n  }\n\n  if (isPlainObject(value)) {\n    return stringifyToJsonValue(value);\n  }\n\n  return undefined;\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-fetch/base-url-number/core/serverSentEvents.gen.ts",
    "content": "// 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 const 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            // Normalize line endings: CRLF -> LF, then CR -> LF\n            buffer = buffer.replace(/\\r\\n/g, '\\n').replace(/\\r/g, '\\n');\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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-fetch/base-url-number/core/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { Auth, AuthToken } from './auth.gen';\nimport type { BodySerializer, QuerySerializer, QuerySerializerOptions } from './bodySerializer.gen';\n\nexport type HttpMethod =\n  | 'connect'\n  | 'delete'\n  | 'get'\n  | 'head'\n  | 'options'\n  | 'patch'\n  | 'post'\n  | 'put'\n  | 'trace';\n\nexport type Client<\n  RequestFn = never,\n  Config = unknown,\n  MethodFn = never,\n  BuildUrlFn = never,\n  SseFn = never,\n> = {\n  /**\n   * Returns the final request URL.\n   */\n  buildUrl: BuildUrlFn;\n  getConfig: () => Config;\n  request: RequestFn;\n  setConfig: (config: Config) => Config;\n} & {\n  [K in HttpMethod]: MethodFn;\n} & ([SseFn] extends [never] ? { sse?: never } : { sse: { [K in HttpMethod]: SseFn } });\n\nexport interface Config {\n  /**\n   * Auth token or a function returning auth token. The resolved value will be\n   * added to the request payload as defined by its `security` array.\n   */\n  auth?: ((auth: Auth) => Promise<AuthToken> | AuthToken) | AuthToken;\n  /**\n   * A function for serializing request body parameter. By default,\n   * {@link JSON.stringify()} will be used.\n   */\n  bodySerializer?: BodySerializer | null;\n  /**\n   * An object containing any HTTP headers that you want to pre-populate your\n   * `Headers` object with.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/Headers/Headers#init See more}\n   */\n  headers?:\n    | RequestInit['headers']\n    | Record<\n        string,\n        string | number | boolean | (string | number | boolean)[] | null | undefined | unknown\n      >;\n  /**\n   * The request method.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/fetch#method See more}\n   */\n  method?: Uppercase<HttpMethod>;\n  /**\n   * A function for serializing request query parameters. By default, arrays\n   * will be exploded in form style, objects will be exploded in deepObject\n   * style, and reserved characters are percent-encoded.\n   *\n   * This method will have no effect if the native `paramsSerializer()` Axios\n   * API function is used.\n   *\n   * {@link https://swagger.io/docs/specification/serialization/#query View examples}\n   */\n  querySerializer?: QuerySerializer | QuerySerializerOptions;\n  /**\n   * A function validating request data. This is useful if you want to ensure\n   * the request conforms to the desired shape, so it can be safely sent to\n   * the server.\n   */\n  requestValidator?: (data: unknown) => Promise<unknown>;\n  /**\n   * A function transforming response data before it's returned. This is useful\n   * for post-processing data, e.g. converting ISO strings into Date objects.\n   */\n  responseTransformer?: (data: unknown) => Promise<unknown>;\n  /**\n   * A function validating response data. This is useful if you want to ensure\n   * the response conforms to the desired shape, so it can be safely passed to\n   * the transformers and returned to the user.\n   */\n  responseValidator?: (data: unknown) => Promise<unknown>;\n}\n\ntype IsExactlyNeverOrNeverUndefined<T> = [T] extends [never]\n  ? true\n  : [T] extends [never | undefined]\n    ? [undefined] extends [T]\n      ? false\n      : true\n    : false;\n\nexport type OmitNever<T extends Record<string, unknown>> = {\n  [K in keyof T as IsExactlyNeverOrNeverUndefined<T[K]> extends true ? never : K]: T[K];\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-fetch/base-url-number/core/utils.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-fetch/base-url-number/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type { _3eNum1Период, _400, AdditionalPropertiesIntegerIssue, AdditionalPropertiesUnknownIssue, AdditionalPropertiesUnknownIssue2, AdditionalPropertiesUnknownIssue3, AdditionalPropertiesUnknownIssueWritable, AnyOfAnyAndNull, AnyOfArrays, ApiVVersionODataControllerCountData, ApiVVersionODataControllerCountResponse, ApiVVersionODataControllerCountResponses, ArrayWithAnyOfProperties, ArrayWithArray, ArrayWithBooleans, ArrayWithNumbers, ArrayWithProperties, ArrayWithReferences, ArrayWithStrings, CallToTestOrderOfParamsData, CallWithDefaultOptionalParametersData, CallWithDefaultParametersData, CallWithDescriptionsData, CallWithDuplicateResponsesData, CallWithDuplicateResponsesError, CallWithDuplicateResponsesErrors, CallWithDuplicateResponsesResponse, CallWithDuplicateResponsesResponses, CallWithNoContentResponseData, CallWithNoContentResponseResponse, CallWithNoContentResponseResponses, CallWithParametersData, CallWithResponseAndNoContentResponseData, CallWithResponseAndNoContentResponseResponse, CallWithResponseAndNoContentResponseResponses, CallWithResponseData, CallWithResponseResponse, CallWithResponseResponses, CallWithResponsesData, CallWithResponsesError, CallWithResponsesErrors, CallWithResponsesResponse, CallWithResponsesResponses, CallWithResultFromHeaderData, CallWithResultFromHeaderErrors, CallWithResultFromHeaderResponses, CallWithWeirdParameterNamesData, CamelCaseCommentWithBreaks, CharactersInDescription, ClientOptions, CollectionFormatData, CommentWithBackticks, CommentWithBackticksAndQuotes, CommentWithBreaks, CommentWithExpressionPlaceholders, CommentWithQuotes, CommentWithReservedCharacters, CommentWithSlashes, ComplexParamsData, ComplexParamsResponse, ComplexParamsResponses, ComplexTypesData, ComplexTypesErrors, ComplexTypesResponse, ComplexTypesResponses, CompositionBaseModel, CompositionExtendedModel, CompositionWithAllOfAndNullable, CompositionWithAnyOf, CompositionWithAnyOfAndNullable, CompositionWithAnyOfAnonymous, CompositionWithNestedAnyAndTypeNull, CompositionWithNestedAnyOfAndNull, CompositionWithOneOf, CompositionWithOneOfAndComplexArrayDictionary, CompositionWithOneOfAndNullable, CompositionWithOneOfAndProperties, CompositionWithOneOfAndSimpleArrayDictionary, CompositionWithOneOfAndSimpleDictionary, CompositionWithOneOfAnonymous, CompositionWithOneOfDiscriminator, ConstValue, Default, DeleteCallWithoutParametersAndResponseData, DeleteFooData, DeleteFooData2, DeleteFooData3, DeprecatedCallData, DeprecatedModel, DictionaryWithArray, DictionaryWithDictionary, DictionaryWithProperties, DictionaryWithPropertiesAndAdditionalProperties, DictionaryWithReference, DictionaryWithString, DummyAData, DummyAResponse, DummyAResponses, DummyBData, DummyBResponse, DummyBResponses, DuplicateName2Data, DuplicateName3Data, DuplicateName4Data, DuplicateNameData, EnumFromDescription, EnumWithExtensions, EnumWithNumbers, EnumWithReplacedCharacters, EnumWithStrings, EnumWithXEnumNames, ExportData, ExternalRefA, ExternalRefB, ExternalSharedModel, File, FileResponseData, FileResponseResponse, FileResponseResponses, FileWritable, FooWowData, FooWowResponses, FreeFormObjectWithAdditionalPropertiesEqEmptyObject, FreeFormObjectWithAdditionalPropertiesEqTrue, FreeFormObjectWithoutAdditionalProperties, GenericSchemaDuplicateIssue1SystemBoolean, GenericSchemaDuplicateIssue1SystemBooleanWritable, GenericSchemaDuplicateIssue1SystemString, GenericSchemaDuplicateIssue1SystemStringWritable, GetApiVbyApiVersionSimpleOperationData, GetApiVbyApiVersionSimpleOperationError, GetApiVbyApiVersionSimpleOperationErrors, GetApiVbyApiVersionSimpleOperationResponse, GetApiVbyApiVersionSimpleOperationResponses, GetCallWithOptionalParamData, GetCallWithoutParametersAndResponseData, HeadCallWithoutParametersAndResponseData, Import, ImportData, ImportResponse, ImportResponses, IoK8sApimachineryPkgApisMetaV1DeleteOptions, IoK8sApimachineryPkgApisMetaV1Preconditions, ModelCircle, ModelFromZendesk, ModelSquare, ModelThatExtends, ModelThatExtendsExtends, ModelWithAdditionalPropertiesEqTrue, ModelWithAdditionalPropertiesRef, ModelWithAnyOfConstantSizeArray, ModelWithAnyOfConstantSizeArrayAndIntersect, ModelWithAnyOfConstantSizeArrayNullable, ModelWithAnyOfConstantSizeArrayWithNSizeAndOptions, ModelWithAnyOfConstantSizeArrayWithNSizeAndOptionsWritable, ModelWithArray, ModelWithArrayReadOnlyAndWriteOnly, ModelWithArrayReadOnlyAndWriteOnlyWritable, ModelWithBackticksInDescription, ModelWithBoolean, ModelWithCircularReference, ModelWithConst, ModelWithConstantSizeArray, ModelWithDictionary, ModelWithDuplicateImports, ModelWithDuplicateProperties, ModelWithEnum, ModelWithEnumFromDescription, ModelWithEnumWithHyphen, ModelWithInteger, ModelWithNestedArrayEnums, ModelWithNestedArrayEnumsData, ModelWithNestedArrayEnumsDataBar, ModelWithNestedArrayEnumsDataFoo, ModelWithNestedCompositionEnums, ModelWithNestedEnums, ModelWithNestedProperties, ModelWithNullableObject, ModelWithNullableString, ModelWithNumericEnumUnion, ModelWithOneOfAndProperties, ModelWithOneOfEnum, ModelWithOrderedProperties, ModelWithPattern, ModelWithPatternWritable, ModelWithPrefixItemsConstantSizeArray, ModelWithProperties, ModelWithPropertiesWritable, ModelWithReadOnlyAndWriteOnly, ModelWithReadOnlyAndWriteOnlyWritable, ModelWithReference, ModelWithReferenceWritable, ModelWithString, ModelWithStringError, MultipartRequestData, MultipartResponseData, MultipartResponseResponse, MultipartResponseResponses, NestedAnyOfArraysNullable, NonAsciiæøåÆøÅöôêÊ字符串Data, NonAsciiæøåÆøÅöôêÊ字符串Response, NonAsciiæøåÆøÅöôêÊ字符串Responses, NonAsciiStringæøåÆøÅöôêÊ字符串, NullableObject, OneOfAllOfIssue, OneOfAllOfIssueWritable, OptionsCallWithoutParametersAndResponseData, Pageable, ParameterSimpleParameterUnused, PatchApiVbyApiVersionNoTagData, PatchApiVbyApiVersionNoTagResponses, PatchCallWithoutParametersAndResponseData, PostApiVbyApiVersionFormDataData, PostApiVbyApiVersionRequestBodyData, PostCallWithOptionalParamData, PostCallWithOptionalParamResponse, PostCallWithOptionalParamResponses, PostCallWithoutParametersAndResponseData, PostServiceWithEmptyTagResponse, PostServiceWithEmptyTagResponse2, PutCallWithoutParametersAndResponseData, PutWithFormUrlEncodedData, SchemaWithFormRestrictedKeys, SimpleBoolean, SimpleFile, SimpleFormData, SimpleInteger, SimpleParameter, SimpleReference, SimpleRequestBody, SimpleString, SimpleStringWithPattern, TestErrorCodeData, TestErrorCodeErrors, TestErrorCodeResponses, TypesData, TypesResponse, TypesResponses, UploadFileData, UploadFileResponse, UploadFileResponses, XFooBar } from './types.gen';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-fetch/base-url-number/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type ClientOptions = {\n    baseUrl: 'http://localhost:3000/base' | (string & {});\n};\n\n/**\n * Model with number-only name\n */\nexport type _400 = string;\n\n/**\n * External ref to shared model (A)\n */\nexport type ExternalRefA = ExternalSharedModel;\n\n/**\n * External ref to shared model (B)\n */\nexport type ExternalRefB = ExternalSharedModel;\n\n/**\n * Testing multiline comments in string: First line\n * Second line\n *\n * Fourth line\n */\nexport type CamelCaseCommentWithBreaks = number;\n\n/**\n * Testing multiline comments in string: First line\n * Second line\n *\n * Fourth line\n */\nexport type CommentWithBreaks = number;\n\n/**\n * Testing backticks in string: `backticks` and ```multiple backticks``` should work\n */\nexport type CommentWithBackticks = number;\n\n/**\n * Testing backticks and quotes in string: `backticks`, 'quotes', \"double quotes\" and ```multiple backticks``` should work\n */\nexport type CommentWithBackticksAndQuotes = number;\n\n/**\n * Testing slashes in string: \\backwards\\\\\\ and /forwards/// should work\n */\nexport type CommentWithSlashes = number;\n\n/**\n * Testing expression placeholders in string: ${expression} should work\n */\nexport type CommentWithExpressionPlaceholders = number;\n\n/**\n * Testing quotes in string: 'single quote''' and \"double quotes\"\"\" should work\n */\nexport type CommentWithQuotes = number;\n\n/**\n * Testing reserved characters in string: * inline * and ** inline ** should work\n */\nexport type CommentWithReservedCharacters = number;\n\n/**\n * This is a simple number\n */\nexport type SimpleInteger = number;\n\n/**\n * This is a simple boolean\n */\nexport type SimpleBoolean = boolean;\n\n/**\n * This is a simple string\n */\nexport type SimpleString = string;\n\n/**\n * A string with non-ascii (unicode) characters valid in typescript identifiers (æøåÆØÅöÔèÈ字符串)\n */\nexport type NonAsciiStringæøåÆøÅöôêÊ字符串 = string;\n\n/**\n * This is a simple file\n */\nexport type SimpleFile = Blob | File;\n\n/**\n * This is a simple reference\n */\nexport type SimpleReference = ModelWithString;\n\n/**\n * This is a simple string\n */\nexport type SimpleStringWithPattern = string | null;\n\n/**\n * This is a simple enum with strings\n */\nexport type EnumWithStrings = 'Success' | 'Warning' | 'Error' | '\\'Single Quote\\'' | '\"Double Quotes\"' | 'Non-ascii: øæåôöØÆÅÔÖ字符串';\n\nexport type EnumWithReplacedCharacters = '\\'Single Quote\\'' | '\"Double Quotes\"' | 'øæåôöØÆÅÔÖ字符串' | 3.1 | '';\n\n/**\n * This is a simple enum with numbers\n */\nexport type EnumWithNumbers = 1 | 2 | 3 | 1.1 | 1.2 | 1.3 | 100 | 200 | 300 | -100 | -200 | -300 | -1.1 | -1.2 | -1.3;\n\n/**\n * Success=1,Warning=2,Error=3\n */\nexport type EnumFromDescription = number;\n\n/**\n * This is a simple enum with numbers\n */\nexport type EnumWithExtensions = 200 | 400 | 500;\n\nexport type EnumWithXEnumNames = 0 | 1 | 2;\n\n/**\n * This is a simple array with numbers\n */\nexport type ArrayWithNumbers = Array<number>;\n\n/**\n * This is a simple array with booleans\n */\nexport type ArrayWithBooleans = Array<boolean>;\n\n/**\n * This is a simple array with strings\n */\nexport type ArrayWithStrings = Array<string>;\n\n/**\n * This is a simple array with references\n */\nexport type ArrayWithReferences = Array<ModelWithString>;\n\n/**\n * This is a simple array containing an array\n */\nexport type ArrayWithArray = Array<Array<ModelWithString>>;\n\n/**\n * This is a simple array with properties\n */\nexport type ArrayWithProperties = Array<{\n    '16x16'?: CamelCaseCommentWithBreaks;\n    bar?: string;\n}>;\n\n/**\n * This is a simple array with any of properties\n */\nexport type ArrayWithAnyOfProperties = Array<{\n    foo?: string;\n} | {\n    bar?: string;\n}>;\n\nexport type AnyOfAnyAndNull = {\n    data?: unknown | null;\n};\n\n/**\n * This is a simple array with any of properties\n */\nexport type AnyOfArrays = {\n    results?: Array<{\n        foo?: string;\n    } | {\n        bar?: string;\n    }>;\n};\n\n/**\n * This is a string dictionary\n */\nexport type DictionaryWithString = {\n    [key: string]: string;\n};\n\nexport type DictionaryWithPropertiesAndAdditionalProperties = {\n    foo?: number;\n    bar?: boolean;\n    [key: string]: string | number | boolean | undefined;\n};\n\n/**\n * This is a string reference\n */\nexport type DictionaryWithReference = {\n    [key: string]: ModelWithString;\n};\n\n/**\n * This is a complex dictionary\n */\nexport type DictionaryWithArray = {\n    [key: string]: Array<ModelWithString>;\n};\n\n/**\n * This is a string dictionary\n */\nexport type DictionaryWithDictionary = {\n    [key: string]: {\n        [key: string]: string;\n    };\n};\n\n/**\n * This is a complex dictionary\n */\nexport type DictionaryWithProperties = {\n    [key: string]: {\n        foo?: string;\n        bar?: string;\n    };\n};\n\n/**\n * This is a model with one number property\n */\nexport type ModelWithInteger = {\n    /**\n     * This is a simple number property\n     */\n    prop?: number;\n};\n\n/**\n * This is a model with one boolean property\n */\nexport type ModelWithBoolean = {\n    /**\n     * This is a simple boolean property\n     */\n    prop?: boolean;\n};\n\n/**\n * This is a model with one string property\n */\nexport type ModelWithString = {\n    /**\n     * This is a simple string property\n     */\n    prop?: string;\n};\n\n/**\n * This is a model with one string property\n */\nexport type ModelWithStringError = {\n    /**\n     * This is a simple string property\n     */\n    prop?: string;\n};\n\n/**\n * `Comment` or `VoiceComment`. The JSON object for adding voice comments to tickets is different. See [Adding voice comments to tickets](/documentation/ticketing/managing-tickets/adding-voice-comments-to-tickets)\n */\nexport type ModelFromZendesk = string;\n\n/**\n * This is a model with one string property\n */\nexport type ModelWithNullableString = {\n    /**\n     * This is a simple string property\n     */\n    nullableProp1?: string | null;\n    /**\n     * This is a simple string property\n     */\n    nullableRequiredProp1: string | null;\n    /**\n     * This is a simple string property\n     */\n    nullableProp2?: string | null;\n    /**\n     * This is a simple string property\n     */\n    nullableRequiredProp2: string | null;\n    /**\n     * This is a simple enum with strings\n     */\n    'foo_bar-enum'?: 'Success' | 'Warning' | 'Error' | 'ØÆÅ字符串';\n};\n\n/**\n * This is a model with one enum\n */\nexport type ModelWithEnum = {\n    /**\n     * This is a simple enum with strings\n     */\n    'foo_bar-enum'?: 'Success' | 'Warning' | 'Error' | 'ØÆÅ字符串';\n    /**\n     * These are the HTTP error code enums\n     */\n    statusCode?: '100' | '200 FOO' | '300 FOO_BAR' | '400 foo-bar' | '500 foo.bar' | '600 foo&bar';\n    /**\n     * Simple boolean enum\n     */\n    bool?: true;\n};\n\n/**\n * This is a model with one enum with escaped name\n */\nexport type ModelWithEnumWithHyphen = {\n    /**\n     * Foo-Bar-Baz-Qux\n     */\n    'foo-bar-baz-qux'?: '3.0';\n};\n\n/**\n * This is a model with one enum\n */\nexport type ModelWithEnumFromDescription = {\n    /**\n     * Success=1,Warning=2,Error=3\n     */\n    test?: number;\n};\n\n/**\n * This is a model with nested enums\n */\nexport type ModelWithNestedEnums = {\n    dictionaryWithEnum?: {\n        [key: string]: 'Success' | 'Warning' | 'Error';\n    };\n    dictionaryWithEnumFromDescription?: {\n        [key: string]: number;\n    };\n    arrayWithEnum?: Array<'Success' | 'Warning' | 'Error'>;\n    arrayWithDescription?: Array<number>;\n    /**\n     * This is a simple enum with strings\n     */\n    'foo_bar-enum'?: 'Success' | 'Warning' | 'Error' | 'ØÆÅ字符串';\n};\n\n/**\n * This is a model with one property containing a reference\n */\nexport type ModelWithReference = {\n    prop?: ModelWithProperties;\n};\n\n/**\n * This is a model with one property containing an array\n */\nexport type ModelWithArrayReadOnlyAndWriteOnly = {\n    prop?: Array<ModelWithReadOnlyAndWriteOnly>;\n    propWithFile?: Array<Blob | File>;\n    propWithNumber?: Array<number>;\n};\n\n/**\n * This is a model with one property containing an array\n */\nexport type ModelWithArray = {\n    prop?: Array<ModelWithString>;\n    propWithFile?: Array<Blob | File>;\n    propWithNumber?: Array<number>;\n};\n\n/**\n * This is a model with one property containing a dictionary\n */\nexport type ModelWithDictionary = {\n    prop?: {\n        [key: string]: string;\n    };\n};\n\n/**\n * This is a deprecated model with a deprecated property\n *\n * @deprecated\n */\nexport type DeprecatedModel = {\n    /**\n     * This is a deprecated property\n     *\n     * @deprecated\n     */\n    prop?: string;\n};\n\n/**\n * This is a model with one property containing a circular reference\n */\nexport type ModelWithCircularReference = {\n    prop?: ModelWithCircularReference;\n};\n\n/**\n * This is a model with one property with a 'one of' relationship\n */\nexport type CompositionWithOneOf = {\n    propA?: ModelWithString | ModelWithEnum | ModelWithArray | ModelWithDictionary;\n};\n\n/**\n * This is a model with one property with a 'one of' relationship where the options are not $ref\n */\nexport type CompositionWithOneOfAnonymous = {\n    propA?: {\n        propA?: string;\n    } | string | number;\n};\n\n/**\n * Circle\n */\nexport type ModelCircle = {\n    kind: string;\n    radius?: number;\n};\n\n/**\n * Square\n */\nexport type ModelSquare = {\n    kind: string;\n    sideLength?: number;\n};\n\n/**\n * This is a model with one property with a 'one of' relationship where the options are not $ref\n */\nexport type CompositionWithOneOfDiscriminator = ({\n    kind: 'circle';\n} & ModelCircle) | ({\n    kind: 'square';\n} & ModelSquare);\n\n/**\n * This is a model with one property with a 'any of' relationship\n */\nexport type CompositionWithAnyOf = {\n    propA?: ModelWithString | ModelWithEnum | ModelWithArray | ModelWithDictionary;\n};\n\n/**\n * This is a model with one property with a 'any of' relationship where the options are not $ref\n */\nexport type CompositionWithAnyOfAnonymous = {\n    propA?: {\n        propA?: string;\n    } | string | number;\n};\n\n/**\n * This is a model with nested 'any of' property with a type null\n */\nexport type CompositionWithNestedAnyAndTypeNull = {\n    propA?: Array<ModelWithDictionary | null> | Array<ModelWithArray | null>;\n};\n\nexport type _3eNum1Период = 'Bird' | 'Dog';\n\nexport type ConstValue = 'ConstValue';\n\n/**\n * This is a model with one property with a 'any of' relationship where the options are not $ref\n */\nexport type CompositionWithNestedAnyOfAndNull = {\n    /**\n     * Scopes\n     */\n    propA?: Array<_3eNum1Период | ConstValue> | null;\n};\n\n/**\n * This is a model with one property with a 'one of' relationship\n */\nexport type CompositionWithOneOfAndNullable = {\n    propA?: {\n        boolean?: boolean;\n    } | ModelWithEnum | ModelWithArray | ModelWithDictionary | null;\n};\n\n/**\n * This is a model that contains a simple dictionary within composition\n */\nexport type CompositionWithOneOfAndSimpleDictionary = {\n    propA?: boolean | {\n        [key: string]: number;\n    };\n};\n\n/**\n * This is a model that contains a dictionary of simple arrays within composition\n */\nexport type CompositionWithOneOfAndSimpleArrayDictionary = {\n    propA?: boolean | {\n        [key: string]: Array<boolean>;\n    };\n};\n\n/**\n * This is a model that contains a dictionary of complex arrays (composited) within composition\n */\nexport type CompositionWithOneOfAndComplexArrayDictionary = {\n    propA?: boolean | {\n        [key: string]: Array<number | string>;\n    };\n};\n\n/**\n * This is a model with one property with a 'all of' relationship\n */\nexport type CompositionWithAllOfAndNullable = {\n    propA?: ({\n        boolean?: boolean;\n    } & ModelWithEnum & ModelWithArray & ModelWithDictionary) | null;\n};\n\n/**\n * This is a model with one property with a 'any of' relationship\n */\nexport type CompositionWithAnyOfAndNullable = {\n    propA?: {\n        boolean?: boolean;\n    } | ModelWithEnum | ModelWithArray | ModelWithDictionary | null;\n};\n\n/**\n * This is a base model with two simple optional properties\n */\nexport type CompositionBaseModel = {\n    firstName?: string;\n    lastname?: string;\n};\n\n/**\n * This is a model that extends the base model\n */\nexport type CompositionExtendedModel = CompositionBaseModel & {\n    age: number;\n    firstName: string;\n    lastname: string;\n};\n\n/**\n * This is a model with one nested property\n */\nexport type ModelWithProperties = {\n    required: string;\n    readonly requiredAndReadOnly: string;\n    requiredAndNullable: string | null;\n    string?: string;\n    number?: number;\n    boolean?: boolean;\n    reference?: ModelWithString;\n    'property with space'?: string;\n    default?: string;\n    try?: string;\n    readonly '@namespace.string'?: string;\n    readonly '@namespace.integer'?: number;\n};\n\n/**\n * This is a model with one nested property\n */\nexport type ModelWithNestedProperties = {\n    readonly first: {\n        readonly second: {\n            readonly third: string | null;\n        } | null;\n    } | null;\n};\n\n/**\n * This is a model with duplicated properties\n */\nexport type ModelWithDuplicateProperties = {\n    prop?: ModelWithString;\n};\n\n/**\n * This is a model with ordered properties\n */\nexport type ModelWithOrderedProperties = {\n    zebra?: string;\n    apple?: string;\n    hawaii?: string;\n};\n\n/**\n * This is a model with duplicated imports\n */\nexport type ModelWithDuplicateImports = {\n    propA?: ModelWithString;\n    propB?: ModelWithString;\n    propC?: ModelWithString;\n};\n\n/**\n * This is a model that extends another model\n */\nexport type ModelThatExtends = ModelWithString & {\n    propExtendsA?: string;\n    propExtendsB?: ModelWithString;\n};\n\n/**\n * This is a model that extends another model\n */\nexport type ModelThatExtendsExtends = ModelWithString & ModelThatExtends & {\n    propExtendsC?: string;\n    propExtendsD?: ModelWithString;\n};\n\n/**\n * This is a model that contains a some patterns\n */\nexport type ModelWithPattern = {\n    key: string;\n    name: string;\n    readonly enabled?: boolean;\n    readonly modified?: string;\n    id?: string;\n    text?: string;\n    patternWithSingleQuotes?: string;\n    patternWithNewline?: string;\n    patternWithBacktick?: string;\n    patternWithUnicode?: string;\n};\n\nexport type File = {\n    /**\n     * Id\n     */\n    readonly id?: string;\n    /**\n     * Updated at\n     */\n    readonly updated_at?: string;\n    /**\n     * Created at\n     */\n    readonly created_at?: string;\n    /**\n     * Mime\n     */\n    mime: string;\n    /**\n     * File\n     */\n    readonly file?: string;\n};\n\nexport type Default = {\n    name?: string;\n};\n\nexport type Pageable = {\n    page?: number;\n    size?: number;\n    sort?: Array<string>;\n};\n\n/**\n * This is a free-form object without additionalProperties.\n */\nexport type FreeFormObjectWithoutAdditionalProperties = {\n    [key: string]: unknown;\n};\n\n/**\n * This is a free-form object with additionalProperties: true.\n */\nexport type FreeFormObjectWithAdditionalPropertiesEqTrue = {\n    [key: string]: unknown;\n};\n\n/**\n * This is a free-form object with additionalProperties: {}.\n */\nexport type FreeFormObjectWithAdditionalPropertiesEqEmptyObject = {\n    [key: string]: unknown;\n};\n\nexport type ModelWithConst = {\n    String?: 'String';\n    number?: 0;\n    null?: null;\n    withType?: 'Some string';\n};\n\n/**\n * This is a model with one property and additionalProperties: true\n */\nexport type ModelWithAdditionalPropertiesEqTrue = {\n    /**\n     * This is a simple string property\n     */\n    prop?: string;\n    [key: string]: unknown;\n};\n\nexport type NestedAnyOfArraysNullable = {\n    nullableArray?: Array<string | boolean> | null;\n};\n\nexport type CompositionWithOneOfAndProperties = ({\n    foo: SimpleParameter;\n} | {\n    bar: NonAsciiStringæøåÆøÅöôêÊ字符串;\n}) & {\n    baz: number | null;\n    qux: number;\n};\n\n/**\n * An object that can be null\n */\nexport type NullableObject = {\n    foo?: string;\n} | null;\n\n/**\n * Some % character\n */\nexport type CharactersInDescription = string;\n\nexport type ModelWithNullableObject = {\n    data?: NullableObject;\n};\n\n/**\n * An object with additional properties that can be null (anyOf ref + null)\n */\nexport type ModelWithAdditionalPropertiesRef = {\n    [key: string]: NullableObject | null;\n};\n\nexport type ModelWithOneOfEnum = {\n    foo: 'Bar';\n} | {\n    foo: 'Baz';\n} | {\n    foo: 'Qux';\n} | {\n    content: string;\n    foo: 'Quux';\n} | {\n    content: [\n        string,\n        string\n    ];\n    foo: 'Corge';\n};\n\nexport type ModelWithNestedArrayEnumsDataFoo = 'foo' | 'bar';\n\nexport type ModelWithNestedArrayEnumsDataBar = 'baz' | 'qux';\n\nexport type ModelWithNestedArrayEnumsData = {\n    foo?: Array<ModelWithNestedArrayEnumsDataFoo>;\n    bar?: Array<ModelWithNestedArrayEnumsDataBar>;\n};\n\nexport type ModelWithNestedArrayEnums = {\n    array_strings?: Array<string>;\n    data?: ModelWithNestedArrayEnumsData;\n};\n\nexport type ModelWithNestedCompositionEnums = {\n    foo?: ModelWithNestedArrayEnumsDataFoo;\n};\n\nexport type ModelWithReadOnlyAndWriteOnly = {\n    foo: string;\n    readonly bar: string;\n};\n\nexport type ModelWithConstantSizeArray = [\n    number,\n    number\n];\n\nexport type ModelWithAnyOfConstantSizeArray = [\n    number | string,\n    number | string,\n    number | string\n];\n\nexport type ModelWithPrefixItemsConstantSizeArray = [\n    ModelWithInteger,\n    number | string,\n    string\n];\n\nexport type ModelWithAnyOfConstantSizeArrayNullable = [\n    number | null | string,\n    number | null | string,\n    number | null | string\n];\n\nexport type ModelWithAnyOfConstantSizeArrayWithNSizeAndOptions = [\n    number | Import,\n    number | Import\n];\n\nexport type ModelWithAnyOfConstantSizeArrayAndIntersect = [\n    number & string,\n    number & string\n];\n\nexport type ModelWithNumericEnumUnion = {\n    /**\n     * Период\n     */\n    value?: -10 | -1 | 0 | 1 | 3 | 6 | 12;\n};\n\n/**\n * Some description with `back ticks`\n */\nexport type ModelWithBackticksInDescription = {\n    /**\n     * The template `that` should be used for parsing and importing the contents of the CSV file.\n     *\n     * <br/><p>There is one placeholder currently supported:<ul>     <li><b>${x}</b> - refers to the n-th column in the CSV file, e.g. ${1}, ${2}, ...)</li></ul><p>Example of a correct JSON template:</p>\n     * <pre>\n     * [\n     * {\n     * \"resourceType\": \"Asset\",\n     * \"identifier\": {\n     * \"name\": \"${1}\",\n     * \"domain\": {\n     * \"name\": \"${2}\",\n     * \"community\": {\n     * \"name\": \"Some Community\"\n     * }\n     * }\n     * },\n     * \"attributes\" : {\n     * \"00000000-0000-0000-0000-000000003115\" : [ {\n     * \"value\" : \"${3}\"\n     * } ],\n     * \"00000000-0000-0000-0000-000000000222\" : [ {\n     * \"value\" : \"${4}\"\n     * } ]\n     * }\n     * }\n     * ]\n     * </pre>\n     */\n    template?: string;\n};\n\nexport type ModelWithOneOfAndProperties = (SimpleParameter | NonAsciiStringæøåÆøÅöôêÊ字符串) & {\n    baz: number | null;\n    qux: number;\n};\n\n/**\n * Model used to test deduplication strategy (unused)\n */\nexport type ParameterSimpleParameterUnused = string;\n\n/**\n * Model used to test deduplication strategy\n */\nexport type PostServiceWithEmptyTagResponse = string;\n\n/**\n * Model used to test deduplication strategy\n */\nexport type PostServiceWithEmptyTagResponse2 = string;\n\n/**\n * Model used to test deduplication strategy\n */\nexport type DeleteFooData = string;\n\n/**\n * Model used to test deduplication strategy\n */\nexport type DeleteFooData2 = string;\n\n/**\n * Model with restricted keyword name\n */\nexport type Import = string;\n\nexport type SchemaWithFormRestrictedKeys = {\n    description?: string;\n    'x-enum-descriptions'?: string;\n    'x-enum-varnames'?: string;\n    'x-enumNames'?: string;\n    title?: string;\n    object?: {\n        description?: string;\n        'x-enum-descriptions'?: string;\n        'x-enum-varnames'?: string;\n        'x-enumNames'?: string;\n        title?: string;\n    };\n    array?: Array<{\n        description?: string;\n        'x-enum-descriptions'?: string;\n        'x-enum-varnames'?: string;\n        'x-enumNames'?: string;\n        title?: string;\n    }>;\n};\n\n/**\n * This schema was giving PascalCase transformations a hard time\n */\nexport type IoK8sApimachineryPkgApisMetaV1DeleteOptions = {\n    /**\n     * Must be fulfilled before a deletion is carried out. If not possible, a 409 Conflict status will be returned.\n     */\n    preconditions?: IoK8sApimachineryPkgApisMetaV1Preconditions;\n};\n\n/**\n * This schema was giving PascalCase transformations a hard time\n */\nexport type IoK8sApimachineryPkgApisMetaV1Preconditions = {\n    /**\n     * Specifies the target ResourceVersion\n     */\n    resourceVersion?: string;\n    /**\n     * Specifies the target UID.\n     */\n    uid?: string;\n};\n\nexport type AdditionalPropertiesUnknownIssue = {\n    [key: string]: string | number;\n};\n\nexport type AdditionalPropertiesUnknownIssue2 = {\n    [key: string]: string | number;\n};\n\nexport type AdditionalPropertiesUnknownIssue3 = string & {\n    entries: {\n        [key: string]: AdditionalPropertiesUnknownIssue;\n    };\n};\n\nexport type AdditionalPropertiesIntegerIssue = {\n    value: number;\n    [key: string]: number;\n};\n\nexport type OneOfAllOfIssue = ((ConstValue | GenericSchemaDuplicateIssue1SystemBoolean) & _3eNum1Период) | GenericSchemaDuplicateIssue1SystemString;\n\nexport type GenericSchemaDuplicateIssue1SystemBoolean = {\n    item?: boolean;\n    error?: string | null;\n    readonly hasError?: boolean;\n    data?: {\n        [key: string]: never;\n    };\n};\n\nexport type GenericSchemaDuplicateIssue1SystemString = {\n    item?: string | null;\n    error?: string | null;\n    readonly hasError?: boolean;\n};\n\nexport type ExternalSharedModel = {\n    id: string;\n    name?: string;\n};\n\n/**\n * This is a model with one property containing a reference\n */\nexport type ModelWithReferenceWritable = {\n    prop?: ModelWithPropertiesWritable;\n};\n\n/**\n * This is a model with one property containing an array\n */\nexport type ModelWithArrayReadOnlyAndWriteOnlyWritable = {\n    prop?: Array<ModelWithReadOnlyAndWriteOnlyWritable>;\n    propWithFile?: Array<Blob | File>;\n    propWithNumber?: Array<number>;\n};\n\n/**\n * This is a model with one nested property\n */\nexport type ModelWithPropertiesWritable = {\n    required: string;\n    requiredAndNullable: string | null;\n    string?: string;\n    number?: number;\n    boolean?: boolean;\n    reference?: ModelWithString;\n    'property with space'?: string;\n    default?: string;\n    try?: string;\n};\n\n/**\n * This is a model that contains a some patterns\n */\nexport type ModelWithPatternWritable = {\n    key: string;\n    name: string;\n    id?: string;\n    text?: string;\n    patternWithSingleQuotes?: string;\n    patternWithNewline?: string;\n    patternWithBacktick?: string;\n    patternWithUnicode?: string;\n};\n\nexport type FileWritable = {\n    /**\n     * Mime\n     */\n    mime: string;\n};\n\nexport type ModelWithReadOnlyAndWriteOnlyWritable = {\n    foo: string;\n    baz: string;\n};\n\nexport type ModelWithAnyOfConstantSizeArrayWithNSizeAndOptionsWritable = [\n    number | Import,\n    number | Import\n];\n\nexport type AdditionalPropertiesUnknownIssueWritable = {\n    [key: string]: string | number;\n};\n\nexport type OneOfAllOfIssueWritable = ((ConstValue | GenericSchemaDuplicateIssue1SystemBoolean) & _3eNum1Период) | GenericSchemaDuplicateIssue1SystemString;\n\nexport type GenericSchemaDuplicateIssue1SystemBooleanWritable = {\n    item?: boolean;\n    error?: string | null;\n    data?: {\n        [key: string]: never;\n    };\n};\n\nexport type GenericSchemaDuplicateIssue1SystemStringWritable = {\n    item?: string | null;\n    error?: string | null;\n};\n\n/**\n * This is a reusable parameter\n */\nexport type SimpleParameter = string;\n\n/**\n * Parameter with illegal characters\n */\nexport type XFooBar = ModelWithString;\n\n/**\n * A reusable request body\n */\nexport type SimpleRequestBody = ModelWithString;\n\n/**\n * A reusable request body\n */\nexport type SimpleFormData = ModelWithString;\n\nexport type ExportData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no+tag';\n};\n\nexport type PatchApiVbyApiVersionNoTagData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no+tag';\n};\n\nexport type PatchApiVbyApiVersionNoTagResponses = {\n    /**\n     * OK\n     */\n    default: unknown;\n};\n\nexport type ImportData = {\n    body: ModelWithReadOnlyAndWriteOnlyWritable | ModelWithArrayReadOnlyAndWriteOnlyWritable;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no+tag';\n};\n\nexport type ImportResponses = {\n    /**\n     * Success\n     */\n    200: ModelFromZendesk;\n    /**\n     * Default success response\n     */\n    default: ModelWithReadOnlyAndWriteOnly;\n};\n\nexport type ImportResponse = ImportResponses[keyof ImportResponses];\n\nexport type FooWowData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no+tag';\n};\n\nexport type FooWowResponses = {\n    /**\n     * OK\n     */\n    default: unknown;\n};\n\nexport type ApiVVersionODataControllerCountData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple/$count';\n};\n\nexport type ApiVVersionODataControllerCountResponses = {\n    /**\n     * Success\n     */\n    200: ModelFromZendesk;\n};\n\nexport type ApiVVersionODataControllerCountResponse = ApiVVersionODataControllerCountResponses[keyof ApiVVersionODataControllerCountResponses];\n\nexport type GetApiVbyApiVersionSimpleOperationData = {\n    body?: never;\n    path: {\n        /**\n         * foo in method\n         */\n        foo_param: string;\n    };\n    query?: never;\n    url: '/api/v{api-version}/simple:operation';\n};\n\nexport type GetApiVbyApiVersionSimpleOperationErrors = {\n    /**\n     * Default error response\n     */\n    default: ModelWithBoolean;\n};\n\nexport type GetApiVbyApiVersionSimpleOperationError = GetApiVbyApiVersionSimpleOperationErrors[keyof GetApiVbyApiVersionSimpleOperationErrors];\n\nexport type GetApiVbyApiVersionSimpleOperationResponses = {\n    /**\n     * Response is a simple number\n     */\n    200: number;\n};\n\nexport type GetApiVbyApiVersionSimpleOperationResponse = GetApiVbyApiVersionSimpleOperationResponses[keyof GetApiVbyApiVersionSimpleOperationResponses];\n\nexport type DeleteCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type GetCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type HeadCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type OptionsCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type PatchCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type PostCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type PutCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type DeleteFooData3 = {\n    body?: never;\n    headers: {\n        /**\n         * Parameter with illegal characters\n         */\n        'x-Foo-Bar': ModelWithString;\n    };\n    path: {\n        /**\n         * foo in method\n         */\n        foo_param: string;\n        /**\n         * bar in method\n         */\n        BarParam: string;\n    };\n    query?: never;\n    url: '/api/v{api-version}/foo/{foo_param}/bar/{BarParam}';\n};\n\nexport type CallWithDescriptionsData = {\n    body?: never;\n    path?: never;\n    query?: {\n        /**\n         * Testing multiline comments in string: First line\n         * Second line\n         *\n         * Fourth line\n         */\n        parameterWithBreaks?: string;\n        /**\n         * Testing backticks in string: `backticks` and ```multiple backticks``` should work\n         */\n        parameterWithBackticks?: string;\n        /**\n         * Testing slashes in string: \\backwards\\\\\\ and /forwards/// should work\n         */\n        parameterWithSlashes?: string;\n        /**\n         * Testing expression placeholders in string: ${expression} should work\n         */\n        parameterWithExpressionPlaceholders?: string;\n        /**\n         * Testing quotes in string: 'single quote''' and \"double quotes\"\"\" should work\n         */\n        parameterWithQuotes?: string;\n        /**\n         * Testing reserved characters in string: * inline * and ** inline ** should work\n         */\n        parameterWithReservedCharacters?: string;\n    };\n    url: '/api/v{api-version}/descriptions';\n};\n\nexport type DeprecatedCallData = {\n    body?: never;\n    headers: {\n        /**\n         * This parameter is deprecated\n         *\n         * @deprecated\n         */\n        parameter: DeprecatedModel | null;\n    };\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/parameters/deprecated';\n};\n\nexport type CallWithParametersData = {\n    /**\n     * This is the parameter that goes into the body\n     */\n    body: {\n        [key: string]: unknown;\n    } | null;\n    headers: {\n        /**\n         * This is the parameter that goes into the header\n         */\n        parameterHeader: string | null;\n    };\n    path: {\n        /**\n         * This is the parameter that goes into the path\n         */\n        parameterPath: string | null;\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string | null;\n    };\n    query: {\n        foo_ref_enum?: ModelWithNestedArrayEnumsDataFoo;\n        foo_all_of_enum: ModelWithNestedArrayEnumsDataFoo;\n        /**\n         * This is the parameter that goes into the query params\n         */\n        cursor: string | null;\n    };\n    url: '/api/v{api-version}/parameters/{parameterPath}';\n};\n\nexport type CallWithWeirdParameterNamesData = {\n    /**\n     * This is the parameter that goes into the body\n     */\n    body: ModelWithString | null;\n    headers: {\n        /**\n         * This is the parameter that goes into the request header\n         */\n        'parameter.header': string | null;\n    };\n    path: {\n        /**\n         * This is the parameter that goes into the path\n         */\n        'parameter.path.1'?: string;\n        /**\n         * This is the parameter that goes into the path\n         */\n        'parameter-path-2'?: string;\n        /**\n         * This is the parameter that goes into the path\n         */\n        'PARAMETER-PATH-3'?: string;\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string | null;\n    };\n    query: {\n        /**\n         * This is the parameter with a reserved keyword\n         */\n        default?: string;\n        /**\n         * This is the parameter that goes into the request query params\n         */\n        'parameter-query': string | null;\n    };\n    url: '/api/v{api-version}/parameters/{parameter.path.1}/{parameter-path-2}/{PARAMETER-PATH-3}';\n};\n\nexport type GetCallWithOptionalParamData = {\n    /**\n     * This is a required parameter\n     */\n    body: ModelWithOneOfEnum;\n    path?: never;\n    query?: {\n        /**\n         * This is an optional parameter\n         */\n        page?: number;\n    };\n    url: '/api/v{api-version}/parameters';\n};\n\nexport type PostCallWithOptionalParamData = {\n    /**\n     * This is an optional parameter\n     */\n    body?: {\n        offset?: number | null;\n    };\n    path?: never;\n    query: {\n        /**\n         * This is a required parameter\n         */\n        parameter: Pageable;\n    };\n    url: '/api/v{api-version}/parameters';\n};\n\nexport type PostCallWithOptionalParamResponses = {\n    /**\n     * Response is a simple number\n     */\n    200: number;\n    /**\n     * Success\n     */\n    204: void;\n};\n\nexport type PostCallWithOptionalParamResponse = PostCallWithOptionalParamResponses[keyof PostCallWithOptionalParamResponses];\n\nexport type PostApiVbyApiVersionRequestBodyData = {\n    /**\n     * A reusable request body\n     */\n    body?: SimpleRequestBody;\n    path?: never;\n    query?: {\n        /**\n         * This is a reusable parameter\n         */\n        parameter?: string;\n    };\n    url: '/api/v{api-version}/requestBody';\n};\n\nexport type PostApiVbyApiVersionFormDataData = {\n    /**\n     * A reusable request body\n     */\n    body?: SimpleFormData;\n    path?: never;\n    query?: {\n        /**\n         * This is a reusable parameter\n         */\n        parameter?: string;\n    };\n    url: '/api/v{api-version}/formData';\n};\n\nexport type CallWithDefaultParametersData = {\n    body?: never;\n    path?: never;\n    query?: {\n        /**\n         * This is a simple string with default value\n         */\n        parameterString?: string | null;\n        /**\n         * This is a simple number with default value\n         */\n        parameterNumber?: number | null;\n        /**\n         * This is a simple boolean with default value\n         */\n        parameterBoolean?: boolean | null;\n        /**\n         * This is a simple enum with default value\n         */\n        parameterEnum?: 'Success' | 'Warning' | 'Error';\n        /**\n         * This is a simple model with default value\n         */\n        parameterModel?: ModelWithString | null;\n    };\n    url: '/api/v{api-version}/defaults';\n};\n\nexport type CallWithDefaultOptionalParametersData = {\n    body?: never;\n    path?: never;\n    query?: {\n        /**\n         * This is a simple string that is optional with default value\n         */\n        parameterString?: string;\n        /**\n         * This is a simple number that is optional with default value\n         */\n        parameterNumber?: number;\n        /**\n         * This is a simple boolean that is optional with default value\n         */\n        parameterBoolean?: boolean;\n        /**\n         * This is a simple enum that is optional with default value\n         */\n        parameterEnum?: 'Success' | 'Warning' | 'Error';\n        /**\n         * This is a simple model that is optional with default value\n         */\n        parameterModel?: ModelWithString;\n    };\n    url: '/api/v{api-version}/defaults';\n};\n\nexport type CallToTestOrderOfParamsData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * This is a optional string with default\n         */\n        parameterOptionalStringWithDefault?: string;\n        /**\n         * This is a optional string with empty default\n         */\n        parameterOptionalStringWithEmptyDefault?: string;\n        /**\n         * This is a optional string with no default\n         */\n        parameterOptionalStringWithNoDefault?: string;\n        /**\n         * This is a string with default\n         */\n        parameterStringWithDefault: string;\n        /**\n         * This is a string with empty default\n         */\n        parameterStringWithEmptyDefault: string;\n        /**\n         * This is a string with no default\n         */\n        parameterStringWithNoDefault: string;\n        /**\n         * This is a string that can be null with no default\n         */\n        parameterStringNullableWithNoDefault?: string | null;\n        /**\n         * This is a string that can be null with default\n         */\n        parameterStringNullableWithDefault?: string | null;\n    };\n    url: '/api/v{api-version}/defaults';\n};\n\nexport type DuplicateNameData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/duplicate';\n};\n\nexport type DuplicateName2Data = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/duplicate';\n};\n\nexport type DuplicateName3Data = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/duplicate';\n};\n\nexport type DuplicateName4Data = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/duplicate';\n};\n\nexport type CallWithNoContentResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no-content';\n};\n\nexport type CallWithNoContentResponseResponses = {\n    /**\n     * Success\n     */\n    204: void;\n};\n\nexport type CallWithNoContentResponseResponse = CallWithNoContentResponseResponses[keyof CallWithNoContentResponseResponses];\n\nexport type CallWithResponseAndNoContentResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multiple-tags/response-and-no-content';\n};\n\nexport type CallWithResponseAndNoContentResponseResponses = {\n    /**\n     * Response is a simple number\n     */\n    200: number;\n    /**\n     * Success\n     */\n    204: void;\n};\n\nexport type CallWithResponseAndNoContentResponseResponse = CallWithResponseAndNoContentResponseResponses[keyof CallWithResponseAndNoContentResponseResponses];\n\nexport type DummyAData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multiple-tags/a';\n};\n\nexport type DummyAResponses = {\n    200: _400;\n};\n\nexport type DummyAResponse = DummyAResponses[keyof DummyAResponses];\n\nexport type DummyBData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multiple-tags/b';\n};\n\nexport type DummyBResponses = {\n    /**\n     * Success\n     */\n    204: void;\n};\n\nexport type DummyBResponse = DummyBResponses[keyof DummyBResponses];\n\nexport type CallWithResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/response';\n};\n\nexport type CallWithResponseResponses = {\n    default: Import;\n};\n\nexport type CallWithResponseResponse = CallWithResponseResponses[keyof CallWithResponseResponses];\n\nexport type CallWithDuplicateResponsesData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/response';\n};\n\nexport type CallWithDuplicateResponsesErrors = {\n    /**\n     * Message for 500 error\n     */\n    500: ModelWithStringError;\n    /**\n     * Message for 501 error\n     */\n    501: ModelWithStringError;\n    /**\n     * Message for 502 error\n     */\n    502: ModelWithStringError;\n    /**\n     * Message for 4XX errors\n     */\n    '4XX': DictionaryWithArray;\n    /**\n     * Default error response\n     */\n    default: ModelWithBoolean;\n};\n\nexport type CallWithDuplicateResponsesError = CallWithDuplicateResponsesErrors[keyof CallWithDuplicateResponsesErrors];\n\nexport type CallWithDuplicateResponsesResponses = {\n    /**\n     * Message for 200 response\n     */\n    200: ModelWithBoolean & ModelWithInteger;\n    /**\n     * Message for 201 response\n     */\n    201: ModelWithString;\n    /**\n     * Message for 202 response\n     */\n    202: ModelWithString;\n};\n\nexport type CallWithDuplicateResponsesResponse = CallWithDuplicateResponsesResponses[keyof CallWithDuplicateResponsesResponses];\n\nexport type CallWithResponsesData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/response';\n};\n\nexport type CallWithResponsesErrors = {\n    /**\n     * Message for 500 error\n     */\n    500: ModelWithStringError;\n    /**\n     * Message for 501 error\n     */\n    501: ModelWithStringError;\n    /**\n     * Message for 502 error\n     */\n    502: ModelWithStringError;\n    /**\n     * Message for default response\n     */\n    default: ModelWithStringError;\n};\n\nexport type CallWithResponsesError = CallWithResponsesErrors[keyof CallWithResponsesErrors];\n\nexport type CallWithResponsesResponses = {\n    /**\n     * Message for 200 response\n     */\n    200: {\n        readonly '@namespace.string'?: string;\n        readonly '@namespace.integer'?: number;\n        readonly value?: Array<ModelWithString>;\n    };\n    /**\n     * Message for 201 response\n     */\n    201: ModelThatExtends;\n    /**\n     * Message for 202 response\n     */\n    202: ModelThatExtendsExtends;\n};\n\nexport type CallWithResponsesResponse = CallWithResponsesResponses[keyof CallWithResponsesResponses];\n\nexport type CollectionFormatData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * This is an array parameter that is sent as csv format (comma-separated values)\n         */\n        parameterArrayCSV: Array<string> | null;\n        /**\n         * This is an array parameter that is sent as ssv format (space-separated values)\n         */\n        parameterArraySSV: Array<string> | null;\n        /**\n         * This is an array parameter that is sent as tsv format (tab-separated values)\n         */\n        parameterArrayTSV: Array<string> | null;\n        /**\n         * This is an array parameter that is sent as pipes format (pipe-separated values)\n         */\n        parameterArrayPipes: Array<string> | null;\n        /**\n         * This is an array parameter that is sent as multi format (multiple parameter instances)\n         */\n        parameterArrayMulti: Array<string> | null;\n    };\n    url: '/api/v{api-version}/collectionFormat';\n};\n\nexport type TypesData = {\n    body?: never;\n    path?: {\n        /**\n         * This is a number parameter\n         */\n        id?: number;\n    };\n    query: {\n        /**\n         * This is a number parameter\n         */\n        parameterNumber: number;\n        /**\n         * This is a string parameter\n         */\n        parameterString: string | null;\n        /**\n         * This is a boolean parameter\n         */\n        parameterBoolean: boolean | null;\n        /**\n         * This is an object parameter\n         */\n        parameterObject: {\n            [key: string]: unknown;\n        } | null;\n        /**\n         * This is an array parameter\n         */\n        parameterArray: Array<string> | null;\n        /**\n         * This is a dictionary parameter\n         */\n        parameterDictionary: {\n            [key: string]: unknown;\n        } | null;\n        /**\n         * This is an enum parameter\n         */\n        parameterEnum: 'Success' | 'Warning' | 'Error' | null;\n    };\n    url: '/api/v{api-version}/types';\n};\n\nexport type TypesResponses = {\n    /**\n     * Response is a simple number\n     */\n    200: number;\n    /**\n     * Response is a simple string\n     */\n    201: string;\n    /**\n     * Response is a simple boolean\n     */\n    202: boolean;\n    /**\n     * Response is a simple object\n     */\n    203: {\n        [key: string]: unknown;\n    };\n};\n\nexport type TypesResponse = TypesResponses[keyof TypesResponses];\n\nexport type UploadFileData = {\n    body: Blob | File;\n    path: {\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string | null;\n    };\n    query?: never;\n    url: '/api/v{api-version}/upload';\n};\n\nexport type UploadFileResponses = {\n    200: boolean;\n};\n\nexport type UploadFileResponse = UploadFileResponses[keyof UploadFileResponses];\n\nexport type FileResponseData = {\n    body?: never;\n    path: {\n        id: string;\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string;\n    };\n    query?: never;\n    url: '/api/v{api-version}/file/{id}';\n};\n\nexport type FileResponseResponses = {\n    /**\n     * Success\n     */\n    200: Blob | File;\n};\n\nexport type FileResponseResponse = FileResponseResponses[keyof FileResponseResponses];\n\nexport type ComplexTypesData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * Parameter containing object\n         */\n        parameterObject: {\n            first?: {\n                second?: {\n                    third?: string;\n                };\n            };\n        };\n        /**\n         * Parameter containing reference\n         */\n        parameterReference: ModelWithString;\n    };\n    url: '/api/v{api-version}/complex';\n};\n\nexport type ComplexTypesErrors = {\n    /**\n     * 400 `server` error\n     */\n    400: unknown;\n    /**\n     * 500 server error\n     */\n    500: unknown;\n};\n\nexport type ComplexTypesResponses = {\n    /**\n     * Successful response\n     */\n    200: Array<ModelWithString>;\n};\n\nexport type ComplexTypesResponse = ComplexTypesResponses[keyof ComplexTypesResponses];\n\nexport type MultipartResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multipart';\n};\n\nexport type MultipartResponseResponses = {\n    /**\n     * OK\n     */\n    200: {\n        file?: Blob | File;\n        metadata?: {\n            foo?: string;\n            bar?: string;\n        };\n    };\n};\n\nexport type MultipartResponseResponse = MultipartResponseResponses[keyof MultipartResponseResponses];\n\nexport type MultipartRequestData = {\n    body?: {\n        content?: Blob | File;\n        data?: ModelWithString | null;\n    };\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multipart';\n};\n\nexport type ComplexParamsData = {\n    body?: {\n        readonly key: string | null;\n        name: string | null;\n        enabled?: boolean;\n        type: 'Monkey' | 'Horse' | 'Bird';\n        listOfModels?: Array<ModelWithString> | null;\n        listOfStrings?: Array<string> | null;\n        parameters: ModelWithString | ModelWithEnum | ModelWithArray | ModelWithDictionary;\n        readonly user?: {\n            readonly id?: number;\n            readonly name?: string | null;\n        };\n    };\n    path: {\n        id: number;\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string;\n    };\n    query?: never;\n    url: '/api/v{api-version}/complex/{id}';\n};\n\nexport type ComplexParamsResponses = {\n    /**\n     * Success\n     */\n    200: ModelWithString;\n};\n\nexport type ComplexParamsResponse = ComplexParamsResponses[keyof ComplexParamsResponses];\n\nexport type CallWithResultFromHeaderData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/header';\n};\n\nexport type CallWithResultFromHeaderErrors = {\n    /**\n     * 400 server error\n     */\n    400: unknown;\n    /**\n     * 500 server error\n     */\n    500: unknown;\n};\n\nexport type CallWithResultFromHeaderResponses = {\n    /**\n     * Successful response\n     */\n    200: unknown;\n};\n\nexport type TestErrorCodeData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * Status code to return\n         */\n        status: number;\n    };\n    url: '/api/v{api-version}/error';\n};\n\nexport type TestErrorCodeErrors = {\n    /**\n     * Custom message: Internal Server Error\n     */\n    500: unknown;\n    /**\n     * Custom message: Not Implemented\n     */\n    501: unknown;\n    /**\n     * Custom message: Bad Gateway\n     */\n    502: unknown;\n    /**\n     * Custom message: Service Unavailable\n     */\n    503: unknown;\n};\n\nexport type TestErrorCodeResponses = {\n    /**\n     * Custom message: Successful response\n     */\n    200: unknown;\n};\n\nexport type NonAsciiæøåÆøÅöôêÊ字符串Data = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * Dummy input param\n         */\n        nonAsciiParamæøåÆØÅöôêÊ: number;\n    };\n    url: '/api/v{api-version}/non-ascii-æøåÆØÅöôêÊ字符串';\n};\n\nexport type NonAsciiæøåÆøÅöôêÊ字符串Responses = {\n    /**\n     * Successful response\n     */\n    200: Array<NonAsciiStringæøåÆøÅöôêÊ字符串>;\n};\n\nexport type NonAsciiæøåÆøÅöôêÊ字符串Response = NonAsciiæøåÆøÅöôêÊ字符串Responses[keyof NonAsciiæøåÆøÅöôêÊ字符串Responses];\n\nexport type PutWithFormUrlEncodedData = {\n    body: ArrayWithStrings;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/non-ascii-æøåÆØÅöôêÊ字符串';\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-fetch/base-url-strict/client/client.gen.ts",
    "content": "// 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 (options: RequestOptions) => {\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 url = buildUrl(opts);\n\n    return { opts, url };\n  };\n\n  const request: Client['request'] = async (options) => {\n    // @ts-expect-error\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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-fetch/base-url-strict/client/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type { Auth } from '../core/auth.gen';\nexport type { QuerySerializerOptions } from '../core/bodySerializer.gen';\nexport {\n  formDataBodySerializer,\n  jsonBodySerializer,\n  urlSearchParamsBodySerializer,\n} from '../core/bodySerializer.gen';\nexport { buildClientParams } from '../core/params.gen';\nexport { serializeQueryKeyValue } from '../core/queryKeySerializer.gen';\nexport { createClient } from './client.gen';\nexport type {\n  Client,\n  ClientOptions,\n  Config,\n  CreateClientConfig,\n  Options,\n  RequestOptions,\n  RequestResult,\n  ResolvedRequestOptions,\n  ResponseStyle,\n  TDataShape,\n} from './types.gen';\nexport { createConfig, mergeHeaders } from './utils.gen';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-fetch/base-url-strict/client/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { Auth } from '../core/auth.gen';\nimport type {\n  ServerSentEventsOptions,\n  ServerSentEventsResult,\n} from '../core/serverSentEvents.gen';\nimport type { Client as CoreClient, Config as CoreConfig } from '../core/types.gen';\nimport type { Middleware } from './utils.gen';\n\nexport type ResponseStyle = 'data' | 'fields';\n\nexport interface Config<T extends ClientOptions = ClientOptions>\n  extends Omit<RequestInit, 'body' | 'headers' | 'method'>, CoreConfig {\n  /**\n   * Base URL for all requests made by this client.\n   */\n  baseUrl?: T['baseUrl'];\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   * Please don't use the Fetch client for Next.js applications. The `next`\n   * options won't have any effect.\n   *\n   * Install {@link https://www.npmjs.com/package/@hey-api/client-next `@hey-api/client-next`} instead.\n   */\n  next?: never;\n  /**\n   * Return the response data parsed in a specified format. By default, `auto`\n   * will infer the appropriate method from the `Content-Type` response header.\n   * You can override this behavior with any of the {@link Body} methods.\n   * Select `stream` if you don't want to parse response data at all.\n   *\n   * @default 'auto'\n   */\n  parseAs?: 'arrayBuffer' | 'auto' | 'blob' | 'formData' | 'json' | 'stream' | 'text';\n  /**\n   * Should we return only data or multiple fields (data, error, response, etc.)?\n   *\n   * @default 'fields'\n   */\n  responseStyle?: ResponseStyle;\n  /**\n   * Throw an error instead of returning it in the response?\n   *\n   * @default false\n   */\n  throwOnError?: T['throwOnError'];\n}\n\nexport interface RequestOptions<\n  TData = unknown,\n  TResponseStyle extends ResponseStyle = 'fields',\n  ThrowOnError extends boolean = boolean,\n  Url extends string = string,\n>\n  extends\n    Config<{\n      responseStyle: TResponseStyle;\n      throwOnError: ThrowOnError;\n    }>,\n    Pick<\n      ServerSentEventsOptions<TData>,\n      | 'onRequest'\n      | 'onSseError'\n      | 'onSseEvent'\n      | 'sseDefaultRetryDelay'\n      | 'sseMaxRetryAttempts'\n      | 'sseMaxRetryDelay'\n    > {\n  /**\n   * Any body that you want to add to your request.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/fetch#body}\n   */\n  body?: unknown;\n  path?: Record<string, unknown>;\n  query?: Record<string, unknown>;\n  /**\n   * Security mechanism(s) to use for the request.\n   */\n  security?: ReadonlyArray<Auth>;\n  url: Url;\n}\n\nexport interface ResolvedRequestOptions<\n  TResponseStyle extends ResponseStyle = 'fields',\n  ThrowOnError extends boolean = boolean,\n  Url extends string = string,\n> extends RequestOptions<unknown, TResponseStyle, ThrowOnError, Url> {\n  serializedBody?: string;\n}\n\nexport type RequestResult<\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = boolean,\n  TResponseStyle extends ResponseStyle = 'fields',\n> = ThrowOnError extends true\n  ? Promise<\n      TResponseStyle extends 'data'\n        ? TData extends Record<string, unknown>\n          ? TData[keyof TData]\n          : TData\n        : {\n            data: TData extends Record<string, unknown> ? TData[keyof TData] : TData;\n            request: Request;\n            response: Response;\n          }\n    >\n  : Promise<\n      TResponseStyle extends 'data'\n        ? (TData extends Record<string, unknown> ? TData[keyof TData] : TData) | undefined\n        : (\n            | {\n                data: TData extends Record<string, unknown> ? TData[keyof TData] : TData;\n                error: undefined;\n              }\n            | {\n                data: undefined;\n                error: TError extends Record<string, unknown> ? TError[keyof TError] : TError;\n              }\n          ) & {\n            request: Request;\n            response: Response;\n          }\n    >;\n\nexport interface ClientOptions {\n  baseUrl?: string;\n  responseStyle?: ResponseStyle;\n  throwOnError?: boolean;\n}\n\ntype MethodFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'>,\n) => RequestResult<TData, TError, ThrowOnError, TResponseStyle>;\n\ntype SseFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'>,\n) => Promise<ServerSentEventsResult<TData, TError>>;\n\ntype RequestFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'> &\n    Pick<Required<RequestOptions<TData, TResponseStyle, ThrowOnError>>, 'method'>,\n) => RequestResult<TData, TError, ThrowOnError, TResponseStyle>;\n\ntype BuildUrlFn = <\n  TData extends {\n    body?: unknown;\n    path?: Record<string, unknown>;\n    query?: Record<string, unknown>;\n    url: string;\n  },\n>(\n  options: TData & Options<TData>,\n) => string;\n\nexport type Client = CoreClient<RequestFn, Config, MethodFn, BuildUrlFn, SseFn> & {\n  interceptors: Middleware<Request, Response, unknown, ResolvedRequestOptions>;\n};\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 = ClientOptions> = (\n  override?: Config<ClientOptions & T>,\n) => Config<Required<ClientOptions> & T>;\n\nexport interface TDataShape {\n  body?: unknown;\n  headers?: unknown;\n  path?: unknown;\n  query?: unknown;\n  url: string;\n}\n\ntype OmitKeys<T, K> = Pick<T, Exclude<keyof T, K>>;\n\nexport type Options<\n  TData extends TDataShape = TDataShape,\n  ThrowOnError extends boolean = boolean,\n  TResponse = unknown,\n  TResponseStyle extends ResponseStyle = 'fields',\n> = OmitKeys<\n  RequestOptions<TResponse, TResponseStyle, ThrowOnError>,\n  'body' | 'path' | 'query' | 'url'\n> &\n  ([TData] extends [never] ? unknown : Omit<TData, 'url'>);\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-fetch/base-url-strict/client/utils.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-fetch/base-url-strict/client.gen.ts",
    "content": "// 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: 'http://localhost:3000/base' }));\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-fetch/base-url-strict/core/auth.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-fetch/base-url-strict/core/bodySerializer.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-fetch/base-url-strict/core/params.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-fetch/base-url-strict/core/pathSerializer.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-fetch/base-url-strict/core/queryKeySerializer.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\n/**\n * JSON-friendly union that mirrors what Pinia Colada can hash.\n */\nexport type JsonValue =\n  | null\n  | string\n  | number\n  | boolean\n  | JsonValue[]\n  | { [key: string]: JsonValue };\n\n/**\n * Replacer that converts non-JSON values (bigint, Date, etc.) to safe substitutes.\n */\nexport const queryKeyJsonReplacer = (_key: string, value: unknown) => {\n  if (value === undefined || typeof value === 'function' || typeof value === 'symbol') {\n    return undefined;\n  }\n  if (typeof value === 'bigint') {\n    return value.toString();\n  }\n  if (value instanceof Date) {\n    return value.toISOString();\n  }\n  return value;\n};\n\n/**\n * Safely stringifies a value and parses it back into a JsonValue.\n */\nexport const stringifyToJsonValue = (input: unknown): JsonValue | undefined => {\n  try {\n    const json = JSON.stringify(input, queryKeyJsonReplacer);\n    if (json === undefined) {\n      return undefined;\n    }\n    return JSON.parse(json) as JsonValue;\n  } catch {\n    return undefined;\n  }\n};\n\n/**\n * Detects plain objects (including objects with a null prototype).\n */\nconst isPlainObject = (value: unknown): value is Record<string, unknown> => {\n  if (value === null || typeof value !== 'object') {\n    return false;\n  }\n  const prototype = Object.getPrototypeOf(value as object);\n  return prototype === Object.prototype || prototype === null;\n};\n\n/**\n * Turns URLSearchParams into a sorted JSON object for deterministic keys.\n */\nconst serializeSearchParams = (params: URLSearchParams): JsonValue => {\n  const entries = Array.from(params.entries()).sort(([a], [b]) => a.localeCompare(b));\n  const result: Record<string, JsonValue> = {};\n\n  for (const [key, value] of entries) {\n    const existing = result[key];\n    if (existing === undefined) {\n      result[key] = value;\n      continue;\n    }\n\n    if (Array.isArray(existing)) {\n      (existing as string[]).push(value);\n    } else {\n      result[key] = [existing, value];\n    }\n  }\n\n  return result;\n};\n\n/**\n * Normalizes any accepted value into a JSON-friendly shape for query keys.\n */\nexport const serializeQueryKeyValue = (value: unknown): JsonValue | undefined => {\n  if (value === null) {\n    return null;\n  }\n\n  if (typeof value === 'string' || typeof value === 'number' || typeof value === 'boolean') {\n    return value;\n  }\n\n  if (value === undefined || typeof value === 'function' || typeof value === 'symbol') {\n    return undefined;\n  }\n\n  if (typeof value === 'bigint') {\n    return value.toString();\n  }\n\n  if (value instanceof Date) {\n    return value.toISOString();\n  }\n\n  if (Array.isArray(value)) {\n    return stringifyToJsonValue(value);\n  }\n\n  if (typeof URLSearchParams !== 'undefined' && value instanceof URLSearchParams) {\n    return serializeSearchParams(value);\n  }\n\n  if (isPlainObject(value)) {\n    return stringifyToJsonValue(value);\n  }\n\n  return undefined;\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-fetch/base-url-strict/core/serverSentEvents.gen.ts",
    "content": "// 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 const 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            // Normalize line endings: CRLF -> LF, then CR -> LF\n            buffer = buffer.replace(/\\r\\n/g, '\\n').replace(/\\r/g, '\\n');\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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-fetch/base-url-strict/core/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { Auth, AuthToken } from './auth.gen';\nimport type { BodySerializer, QuerySerializer, QuerySerializerOptions } from './bodySerializer.gen';\n\nexport type HttpMethod =\n  | 'connect'\n  | 'delete'\n  | 'get'\n  | 'head'\n  | 'options'\n  | 'patch'\n  | 'post'\n  | 'put'\n  | 'trace';\n\nexport type Client<\n  RequestFn = never,\n  Config = unknown,\n  MethodFn = never,\n  BuildUrlFn = never,\n  SseFn = never,\n> = {\n  /**\n   * Returns the final request URL.\n   */\n  buildUrl: BuildUrlFn;\n  getConfig: () => Config;\n  request: RequestFn;\n  setConfig: (config: Config) => Config;\n} & {\n  [K in HttpMethod]: MethodFn;\n} & ([SseFn] extends [never] ? { sse?: never } : { sse: { [K in HttpMethod]: SseFn } });\n\nexport interface Config {\n  /**\n   * Auth token or a function returning auth token. The resolved value will be\n   * added to the request payload as defined by its `security` array.\n   */\n  auth?: ((auth: Auth) => Promise<AuthToken> | AuthToken) | AuthToken;\n  /**\n   * A function for serializing request body parameter. By default,\n   * {@link JSON.stringify()} will be used.\n   */\n  bodySerializer?: BodySerializer | null;\n  /**\n   * An object containing any HTTP headers that you want to pre-populate your\n   * `Headers` object with.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/Headers/Headers#init See more}\n   */\n  headers?:\n    | RequestInit['headers']\n    | Record<\n        string,\n        string | number | boolean | (string | number | boolean)[] | null | undefined | unknown\n      >;\n  /**\n   * The request method.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/fetch#method See more}\n   */\n  method?: Uppercase<HttpMethod>;\n  /**\n   * A function for serializing request query parameters. By default, arrays\n   * will be exploded in form style, objects will be exploded in deepObject\n   * style, and reserved characters are percent-encoded.\n   *\n   * This method will have no effect if the native `paramsSerializer()` Axios\n   * API function is used.\n   *\n   * {@link https://swagger.io/docs/specification/serialization/#query View examples}\n   */\n  querySerializer?: QuerySerializer | QuerySerializerOptions;\n  /**\n   * A function validating request data. This is useful if you want to ensure\n   * the request conforms to the desired shape, so it can be safely sent to\n   * the server.\n   */\n  requestValidator?: (data: unknown) => Promise<unknown>;\n  /**\n   * A function transforming response data before it's returned. This is useful\n   * for post-processing data, e.g. converting ISO strings into Date objects.\n   */\n  responseTransformer?: (data: unknown) => Promise<unknown>;\n  /**\n   * A function validating response data. This is useful if you want to ensure\n   * the response conforms to the desired shape, so it can be safely passed to\n   * the transformers and returned to the user.\n   */\n  responseValidator?: (data: unknown) => Promise<unknown>;\n}\n\ntype IsExactlyNeverOrNeverUndefined<T> = [T] extends [never]\n  ? true\n  : [T] extends [never | undefined]\n    ? [undefined] extends [T]\n      ? false\n      : true\n    : false;\n\nexport type OmitNever<T extends Record<string, unknown>> = {\n  [K in keyof T as IsExactlyNeverOrNeverUndefined<T[K]> extends true ? never : K]: T[K];\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-fetch/base-url-strict/core/utils.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-fetch/base-url-strict/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type { _3eNum1Период, _400, AdditionalPropertiesIntegerIssue, AdditionalPropertiesUnknownIssue, AdditionalPropertiesUnknownIssue2, AdditionalPropertiesUnknownIssue3, AdditionalPropertiesUnknownIssueWritable, AnyOfAnyAndNull, AnyOfArrays, ApiVVersionODataControllerCountData, ApiVVersionODataControllerCountResponse, ApiVVersionODataControllerCountResponses, ArrayWithAnyOfProperties, ArrayWithArray, ArrayWithBooleans, ArrayWithNumbers, ArrayWithProperties, ArrayWithReferences, ArrayWithStrings, CallToTestOrderOfParamsData, CallWithDefaultOptionalParametersData, CallWithDefaultParametersData, CallWithDescriptionsData, CallWithDuplicateResponsesData, CallWithDuplicateResponsesError, CallWithDuplicateResponsesErrors, CallWithDuplicateResponsesResponse, CallWithDuplicateResponsesResponses, CallWithNoContentResponseData, CallWithNoContentResponseResponse, CallWithNoContentResponseResponses, CallWithParametersData, CallWithResponseAndNoContentResponseData, CallWithResponseAndNoContentResponseResponse, CallWithResponseAndNoContentResponseResponses, CallWithResponseData, CallWithResponseResponse, CallWithResponseResponses, CallWithResponsesData, CallWithResponsesError, CallWithResponsesErrors, CallWithResponsesResponse, CallWithResponsesResponses, CallWithResultFromHeaderData, CallWithResultFromHeaderErrors, CallWithResultFromHeaderResponses, CallWithWeirdParameterNamesData, CamelCaseCommentWithBreaks, CharactersInDescription, ClientOptions, CollectionFormatData, CommentWithBackticks, CommentWithBackticksAndQuotes, CommentWithBreaks, CommentWithExpressionPlaceholders, CommentWithQuotes, CommentWithReservedCharacters, CommentWithSlashes, ComplexParamsData, ComplexParamsResponse, ComplexParamsResponses, ComplexTypesData, ComplexTypesErrors, ComplexTypesResponse, ComplexTypesResponses, CompositionBaseModel, CompositionExtendedModel, CompositionWithAllOfAndNullable, CompositionWithAnyOf, CompositionWithAnyOfAndNullable, CompositionWithAnyOfAnonymous, CompositionWithNestedAnyAndTypeNull, CompositionWithNestedAnyOfAndNull, CompositionWithOneOf, CompositionWithOneOfAndComplexArrayDictionary, CompositionWithOneOfAndNullable, CompositionWithOneOfAndProperties, CompositionWithOneOfAndSimpleArrayDictionary, CompositionWithOneOfAndSimpleDictionary, CompositionWithOneOfAnonymous, CompositionWithOneOfDiscriminator, ConstValue, Default, DeleteCallWithoutParametersAndResponseData, DeleteFooData, DeleteFooData2, DeleteFooData3, DeprecatedCallData, DeprecatedModel, DictionaryWithArray, DictionaryWithDictionary, DictionaryWithProperties, DictionaryWithPropertiesAndAdditionalProperties, DictionaryWithReference, DictionaryWithString, DummyAData, DummyAResponse, DummyAResponses, DummyBData, DummyBResponse, DummyBResponses, DuplicateName2Data, DuplicateName3Data, DuplicateName4Data, DuplicateNameData, EnumFromDescription, EnumWithExtensions, EnumWithNumbers, EnumWithReplacedCharacters, EnumWithStrings, EnumWithXEnumNames, ExportData, ExternalRefA, ExternalRefB, ExternalSharedModel, File, FileResponseData, FileResponseResponse, FileResponseResponses, FileWritable, FooWowData, FooWowResponses, FreeFormObjectWithAdditionalPropertiesEqEmptyObject, FreeFormObjectWithAdditionalPropertiesEqTrue, FreeFormObjectWithoutAdditionalProperties, GenericSchemaDuplicateIssue1SystemBoolean, GenericSchemaDuplicateIssue1SystemBooleanWritable, GenericSchemaDuplicateIssue1SystemString, GenericSchemaDuplicateIssue1SystemStringWritable, GetApiVbyApiVersionSimpleOperationData, GetApiVbyApiVersionSimpleOperationError, GetApiVbyApiVersionSimpleOperationErrors, GetApiVbyApiVersionSimpleOperationResponse, GetApiVbyApiVersionSimpleOperationResponses, GetCallWithOptionalParamData, GetCallWithoutParametersAndResponseData, HeadCallWithoutParametersAndResponseData, Import, ImportData, ImportResponse, ImportResponses, IoK8sApimachineryPkgApisMetaV1DeleteOptions, IoK8sApimachineryPkgApisMetaV1Preconditions, ModelCircle, ModelFromZendesk, ModelSquare, ModelThatExtends, ModelThatExtendsExtends, ModelWithAdditionalPropertiesEqTrue, ModelWithAdditionalPropertiesRef, ModelWithAnyOfConstantSizeArray, ModelWithAnyOfConstantSizeArrayAndIntersect, ModelWithAnyOfConstantSizeArrayNullable, ModelWithAnyOfConstantSizeArrayWithNSizeAndOptions, ModelWithAnyOfConstantSizeArrayWithNSizeAndOptionsWritable, ModelWithArray, ModelWithArrayReadOnlyAndWriteOnly, ModelWithArrayReadOnlyAndWriteOnlyWritable, ModelWithBackticksInDescription, ModelWithBoolean, ModelWithCircularReference, ModelWithConst, ModelWithConstantSizeArray, ModelWithDictionary, ModelWithDuplicateImports, ModelWithDuplicateProperties, ModelWithEnum, ModelWithEnumFromDescription, ModelWithEnumWithHyphen, ModelWithInteger, ModelWithNestedArrayEnums, ModelWithNestedArrayEnumsData, ModelWithNestedArrayEnumsDataBar, ModelWithNestedArrayEnumsDataFoo, ModelWithNestedCompositionEnums, ModelWithNestedEnums, ModelWithNestedProperties, ModelWithNullableObject, ModelWithNullableString, ModelWithNumericEnumUnion, ModelWithOneOfAndProperties, ModelWithOneOfEnum, ModelWithOrderedProperties, ModelWithPattern, ModelWithPatternWritable, ModelWithPrefixItemsConstantSizeArray, ModelWithProperties, ModelWithPropertiesWritable, ModelWithReadOnlyAndWriteOnly, ModelWithReadOnlyAndWriteOnlyWritable, ModelWithReference, ModelWithReferenceWritable, ModelWithString, ModelWithStringError, MultipartRequestData, MultipartResponseData, MultipartResponseResponse, MultipartResponseResponses, NestedAnyOfArraysNullable, NonAsciiæøåÆøÅöôêÊ字符串Data, NonAsciiæøåÆøÅöôêÊ字符串Response, NonAsciiæøåÆøÅöôêÊ字符串Responses, NonAsciiStringæøåÆøÅöôêÊ字符串, NullableObject, OneOfAllOfIssue, OneOfAllOfIssueWritable, OptionsCallWithoutParametersAndResponseData, Pageable, ParameterSimpleParameterUnused, PatchApiVbyApiVersionNoTagData, PatchApiVbyApiVersionNoTagResponses, PatchCallWithoutParametersAndResponseData, PostApiVbyApiVersionFormDataData, PostApiVbyApiVersionRequestBodyData, PostCallWithOptionalParamData, PostCallWithOptionalParamResponse, PostCallWithOptionalParamResponses, PostCallWithoutParametersAndResponseData, PostServiceWithEmptyTagResponse, PostServiceWithEmptyTagResponse2, PutCallWithoutParametersAndResponseData, PutWithFormUrlEncodedData, SchemaWithFormRestrictedKeys, SimpleBoolean, SimpleFile, SimpleFormData, SimpleInteger, SimpleParameter, SimpleReference, SimpleRequestBody, SimpleString, SimpleStringWithPattern, TestErrorCodeData, TestErrorCodeErrors, TestErrorCodeResponses, TypesData, TypesResponse, TypesResponses, UploadFileData, UploadFileResponse, UploadFileResponses, XFooBar } from './types.gen';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-fetch/base-url-strict/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type ClientOptions = {\n    baseUrl: 'http://localhost:3000/base';\n};\n\n/**\n * Model with number-only name\n */\nexport type _400 = string;\n\n/**\n * External ref to shared model (A)\n */\nexport type ExternalRefA = ExternalSharedModel;\n\n/**\n * External ref to shared model (B)\n */\nexport type ExternalRefB = ExternalSharedModel;\n\n/**\n * Testing multiline comments in string: First line\n * Second line\n *\n * Fourth line\n */\nexport type CamelCaseCommentWithBreaks = number;\n\n/**\n * Testing multiline comments in string: First line\n * Second line\n *\n * Fourth line\n */\nexport type CommentWithBreaks = number;\n\n/**\n * Testing backticks in string: `backticks` and ```multiple backticks``` should work\n */\nexport type CommentWithBackticks = number;\n\n/**\n * Testing backticks and quotes in string: `backticks`, 'quotes', \"double quotes\" and ```multiple backticks``` should work\n */\nexport type CommentWithBackticksAndQuotes = number;\n\n/**\n * Testing slashes in string: \\backwards\\\\\\ and /forwards/// should work\n */\nexport type CommentWithSlashes = number;\n\n/**\n * Testing expression placeholders in string: ${expression} should work\n */\nexport type CommentWithExpressionPlaceholders = number;\n\n/**\n * Testing quotes in string: 'single quote''' and \"double quotes\"\"\" should work\n */\nexport type CommentWithQuotes = number;\n\n/**\n * Testing reserved characters in string: * inline * and ** inline ** should work\n */\nexport type CommentWithReservedCharacters = number;\n\n/**\n * This is a simple number\n */\nexport type SimpleInteger = number;\n\n/**\n * This is a simple boolean\n */\nexport type SimpleBoolean = boolean;\n\n/**\n * This is a simple string\n */\nexport type SimpleString = string;\n\n/**\n * A string with non-ascii (unicode) characters valid in typescript identifiers (æøåÆØÅöÔèÈ字符串)\n */\nexport type NonAsciiStringæøåÆøÅöôêÊ字符串 = string;\n\n/**\n * This is a simple file\n */\nexport type SimpleFile = Blob | File;\n\n/**\n * This is a simple reference\n */\nexport type SimpleReference = ModelWithString;\n\n/**\n * This is a simple string\n */\nexport type SimpleStringWithPattern = string | null;\n\n/**\n * This is a simple enum with strings\n */\nexport type EnumWithStrings = 'Success' | 'Warning' | 'Error' | '\\'Single Quote\\'' | '\"Double Quotes\"' | 'Non-ascii: øæåôöØÆÅÔÖ字符串';\n\nexport type EnumWithReplacedCharacters = '\\'Single Quote\\'' | '\"Double Quotes\"' | 'øæåôöØÆÅÔÖ字符串' | 3.1 | '';\n\n/**\n * This is a simple enum with numbers\n */\nexport type EnumWithNumbers = 1 | 2 | 3 | 1.1 | 1.2 | 1.3 | 100 | 200 | 300 | -100 | -200 | -300 | -1.1 | -1.2 | -1.3;\n\n/**\n * Success=1,Warning=2,Error=3\n */\nexport type EnumFromDescription = number;\n\n/**\n * This is a simple enum with numbers\n */\nexport type EnumWithExtensions = 200 | 400 | 500;\n\nexport type EnumWithXEnumNames = 0 | 1 | 2;\n\n/**\n * This is a simple array with numbers\n */\nexport type ArrayWithNumbers = Array<number>;\n\n/**\n * This is a simple array with booleans\n */\nexport type ArrayWithBooleans = Array<boolean>;\n\n/**\n * This is a simple array with strings\n */\nexport type ArrayWithStrings = Array<string>;\n\n/**\n * This is a simple array with references\n */\nexport type ArrayWithReferences = Array<ModelWithString>;\n\n/**\n * This is a simple array containing an array\n */\nexport type ArrayWithArray = Array<Array<ModelWithString>>;\n\n/**\n * This is a simple array with properties\n */\nexport type ArrayWithProperties = Array<{\n    '16x16'?: CamelCaseCommentWithBreaks;\n    bar?: string;\n}>;\n\n/**\n * This is a simple array with any of properties\n */\nexport type ArrayWithAnyOfProperties = Array<{\n    foo?: string;\n} | {\n    bar?: string;\n}>;\n\nexport type AnyOfAnyAndNull = {\n    data?: unknown | null;\n};\n\n/**\n * This is a simple array with any of properties\n */\nexport type AnyOfArrays = {\n    results?: Array<{\n        foo?: string;\n    } | {\n        bar?: string;\n    }>;\n};\n\n/**\n * This is a string dictionary\n */\nexport type DictionaryWithString = {\n    [key: string]: string;\n};\n\nexport type DictionaryWithPropertiesAndAdditionalProperties = {\n    foo?: number;\n    bar?: boolean;\n    [key: string]: string | number | boolean | undefined;\n};\n\n/**\n * This is a string reference\n */\nexport type DictionaryWithReference = {\n    [key: string]: ModelWithString;\n};\n\n/**\n * This is a complex dictionary\n */\nexport type DictionaryWithArray = {\n    [key: string]: Array<ModelWithString>;\n};\n\n/**\n * This is a string dictionary\n */\nexport type DictionaryWithDictionary = {\n    [key: string]: {\n        [key: string]: string;\n    };\n};\n\n/**\n * This is a complex dictionary\n */\nexport type DictionaryWithProperties = {\n    [key: string]: {\n        foo?: string;\n        bar?: string;\n    };\n};\n\n/**\n * This is a model with one number property\n */\nexport type ModelWithInteger = {\n    /**\n     * This is a simple number property\n     */\n    prop?: number;\n};\n\n/**\n * This is a model with one boolean property\n */\nexport type ModelWithBoolean = {\n    /**\n     * This is a simple boolean property\n     */\n    prop?: boolean;\n};\n\n/**\n * This is a model with one string property\n */\nexport type ModelWithString = {\n    /**\n     * This is a simple string property\n     */\n    prop?: string;\n};\n\n/**\n * This is a model with one string property\n */\nexport type ModelWithStringError = {\n    /**\n     * This is a simple string property\n     */\n    prop?: string;\n};\n\n/**\n * `Comment` or `VoiceComment`. The JSON object for adding voice comments to tickets is different. See [Adding voice comments to tickets](/documentation/ticketing/managing-tickets/adding-voice-comments-to-tickets)\n */\nexport type ModelFromZendesk = string;\n\n/**\n * This is a model with one string property\n */\nexport type ModelWithNullableString = {\n    /**\n     * This is a simple string property\n     */\n    nullableProp1?: string | null;\n    /**\n     * This is a simple string property\n     */\n    nullableRequiredProp1: string | null;\n    /**\n     * This is a simple string property\n     */\n    nullableProp2?: string | null;\n    /**\n     * This is a simple string property\n     */\n    nullableRequiredProp2: string | null;\n    /**\n     * This is a simple enum with strings\n     */\n    'foo_bar-enum'?: 'Success' | 'Warning' | 'Error' | 'ØÆÅ字符串';\n};\n\n/**\n * This is a model with one enum\n */\nexport type ModelWithEnum = {\n    /**\n     * This is a simple enum with strings\n     */\n    'foo_bar-enum'?: 'Success' | 'Warning' | 'Error' | 'ØÆÅ字符串';\n    /**\n     * These are the HTTP error code enums\n     */\n    statusCode?: '100' | '200 FOO' | '300 FOO_BAR' | '400 foo-bar' | '500 foo.bar' | '600 foo&bar';\n    /**\n     * Simple boolean enum\n     */\n    bool?: true;\n};\n\n/**\n * This is a model with one enum with escaped name\n */\nexport type ModelWithEnumWithHyphen = {\n    /**\n     * Foo-Bar-Baz-Qux\n     */\n    'foo-bar-baz-qux'?: '3.0';\n};\n\n/**\n * This is a model with one enum\n */\nexport type ModelWithEnumFromDescription = {\n    /**\n     * Success=1,Warning=2,Error=3\n     */\n    test?: number;\n};\n\n/**\n * This is a model with nested enums\n */\nexport type ModelWithNestedEnums = {\n    dictionaryWithEnum?: {\n        [key: string]: 'Success' | 'Warning' | 'Error';\n    };\n    dictionaryWithEnumFromDescription?: {\n        [key: string]: number;\n    };\n    arrayWithEnum?: Array<'Success' | 'Warning' | 'Error'>;\n    arrayWithDescription?: Array<number>;\n    /**\n     * This is a simple enum with strings\n     */\n    'foo_bar-enum'?: 'Success' | 'Warning' | 'Error' | 'ØÆÅ字符串';\n};\n\n/**\n * This is a model with one property containing a reference\n */\nexport type ModelWithReference = {\n    prop?: ModelWithProperties;\n};\n\n/**\n * This is a model with one property containing an array\n */\nexport type ModelWithArrayReadOnlyAndWriteOnly = {\n    prop?: Array<ModelWithReadOnlyAndWriteOnly>;\n    propWithFile?: Array<Blob | File>;\n    propWithNumber?: Array<number>;\n};\n\n/**\n * This is a model with one property containing an array\n */\nexport type ModelWithArray = {\n    prop?: Array<ModelWithString>;\n    propWithFile?: Array<Blob | File>;\n    propWithNumber?: Array<number>;\n};\n\n/**\n * This is a model with one property containing a dictionary\n */\nexport type ModelWithDictionary = {\n    prop?: {\n        [key: string]: string;\n    };\n};\n\n/**\n * This is a deprecated model with a deprecated property\n *\n * @deprecated\n */\nexport type DeprecatedModel = {\n    /**\n     * This is a deprecated property\n     *\n     * @deprecated\n     */\n    prop?: string;\n};\n\n/**\n * This is a model with one property containing a circular reference\n */\nexport type ModelWithCircularReference = {\n    prop?: ModelWithCircularReference;\n};\n\n/**\n * This is a model with one property with a 'one of' relationship\n */\nexport type CompositionWithOneOf = {\n    propA?: ModelWithString | ModelWithEnum | ModelWithArray | ModelWithDictionary;\n};\n\n/**\n * This is a model with one property with a 'one of' relationship where the options are not $ref\n */\nexport type CompositionWithOneOfAnonymous = {\n    propA?: {\n        propA?: string;\n    } | string | number;\n};\n\n/**\n * Circle\n */\nexport type ModelCircle = {\n    kind: string;\n    radius?: number;\n};\n\n/**\n * Square\n */\nexport type ModelSquare = {\n    kind: string;\n    sideLength?: number;\n};\n\n/**\n * This is a model with one property with a 'one of' relationship where the options are not $ref\n */\nexport type CompositionWithOneOfDiscriminator = ({\n    kind: 'circle';\n} & ModelCircle) | ({\n    kind: 'square';\n} & ModelSquare);\n\n/**\n * This is a model with one property with a 'any of' relationship\n */\nexport type CompositionWithAnyOf = {\n    propA?: ModelWithString | ModelWithEnum | ModelWithArray | ModelWithDictionary;\n};\n\n/**\n * This is a model with one property with a 'any of' relationship where the options are not $ref\n */\nexport type CompositionWithAnyOfAnonymous = {\n    propA?: {\n        propA?: string;\n    } | string | number;\n};\n\n/**\n * This is a model with nested 'any of' property with a type null\n */\nexport type CompositionWithNestedAnyAndTypeNull = {\n    propA?: Array<ModelWithDictionary | null> | Array<ModelWithArray | null>;\n};\n\nexport type _3eNum1Период = 'Bird' | 'Dog';\n\nexport type ConstValue = 'ConstValue';\n\n/**\n * This is a model with one property with a 'any of' relationship where the options are not $ref\n */\nexport type CompositionWithNestedAnyOfAndNull = {\n    /**\n     * Scopes\n     */\n    propA?: Array<_3eNum1Период | ConstValue> | null;\n};\n\n/**\n * This is a model with one property with a 'one of' relationship\n */\nexport type CompositionWithOneOfAndNullable = {\n    propA?: {\n        boolean?: boolean;\n    } | ModelWithEnum | ModelWithArray | ModelWithDictionary | null;\n};\n\n/**\n * This is a model that contains a simple dictionary within composition\n */\nexport type CompositionWithOneOfAndSimpleDictionary = {\n    propA?: boolean | {\n        [key: string]: number;\n    };\n};\n\n/**\n * This is a model that contains a dictionary of simple arrays within composition\n */\nexport type CompositionWithOneOfAndSimpleArrayDictionary = {\n    propA?: boolean | {\n        [key: string]: Array<boolean>;\n    };\n};\n\n/**\n * This is a model that contains a dictionary of complex arrays (composited) within composition\n */\nexport type CompositionWithOneOfAndComplexArrayDictionary = {\n    propA?: boolean | {\n        [key: string]: Array<number | string>;\n    };\n};\n\n/**\n * This is a model with one property with a 'all of' relationship\n */\nexport type CompositionWithAllOfAndNullable = {\n    propA?: ({\n        boolean?: boolean;\n    } & ModelWithEnum & ModelWithArray & ModelWithDictionary) | null;\n};\n\n/**\n * This is a model with one property with a 'any of' relationship\n */\nexport type CompositionWithAnyOfAndNullable = {\n    propA?: {\n        boolean?: boolean;\n    } | ModelWithEnum | ModelWithArray | ModelWithDictionary | null;\n};\n\n/**\n * This is a base model with two simple optional properties\n */\nexport type CompositionBaseModel = {\n    firstName?: string;\n    lastname?: string;\n};\n\n/**\n * This is a model that extends the base model\n */\nexport type CompositionExtendedModel = CompositionBaseModel & {\n    age: number;\n    firstName: string;\n    lastname: string;\n};\n\n/**\n * This is a model with one nested property\n */\nexport type ModelWithProperties = {\n    required: string;\n    readonly requiredAndReadOnly: string;\n    requiredAndNullable: string | null;\n    string?: string;\n    number?: number;\n    boolean?: boolean;\n    reference?: ModelWithString;\n    'property with space'?: string;\n    default?: string;\n    try?: string;\n    readonly '@namespace.string'?: string;\n    readonly '@namespace.integer'?: number;\n};\n\n/**\n * This is a model with one nested property\n */\nexport type ModelWithNestedProperties = {\n    readonly first: {\n        readonly second: {\n            readonly third: string | null;\n        } | null;\n    } | null;\n};\n\n/**\n * This is a model with duplicated properties\n */\nexport type ModelWithDuplicateProperties = {\n    prop?: ModelWithString;\n};\n\n/**\n * This is a model with ordered properties\n */\nexport type ModelWithOrderedProperties = {\n    zebra?: string;\n    apple?: string;\n    hawaii?: string;\n};\n\n/**\n * This is a model with duplicated imports\n */\nexport type ModelWithDuplicateImports = {\n    propA?: ModelWithString;\n    propB?: ModelWithString;\n    propC?: ModelWithString;\n};\n\n/**\n * This is a model that extends another model\n */\nexport type ModelThatExtends = ModelWithString & {\n    propExtendsA?: string;\n    propExtendsB?: ModelWithString;\n};\n\n/**\n * This is a model that extends another model\n */\nexport type ModelThatExtendsExtends = ModelWithString & ModelThatExtends & {\n    propExtendsC?: string;\n    propExtendsD?: ModelWithString;\n};\n\n/**\n * This is a model that contains a some patterns\n */\nexport type ModelWithPattern = {\n    key: string;\n    name: string;\n    readonly enabled?: boolean;\n    readonly modified?: string;\n    id?: string;\n    text?: string;\n    patternWithSingleQuotes?: string;\n    patternWithNewline?: string;\n    patternWithBacktick?: string;\n    patternWithUnicode?: string;\n};\n\nexport type File = {\n    /**\n     * Id\n     */\n    readonly id?: string;\n    /**\n     * Updated at\n     */\n    readonly updated_at?: string;\n    /**\n     * Created at\n     */\n    readonly created_at?: string;\n    /**\n     * Mime\n     */\n    mime: string;\n    /**\n     * File\n     */\n    readonly file?: string;\n};\n\nexport type Default = {\n    name?: string;\n};\n\nexport type Pageable = {\n    page?: number;\n    size?: number;\n    sort?: Array<string>;\n};\n\n/**\n * This is a free-form object without additionalProperties.\n */\nexport type FreeFormObjectWithoutAdditionalProperties = {\n    [key: string]: unknown;\n};\n\n/**\n * This is a free-form object with additionalProperties: true.\n */\nexport type FreeFormObjectWithAdditionalPropertiesEqTrue = {\n    [key: string]: unknown;\n};\n\n/**\n * This is a free-form object with additionalProperties: {}.\n */\nexport type FreeFormObjectWithAdditionalPropertiesEqEmptyObject = {\n    [key: string]: unknown;\n};\n\nexport type ModelWithConst = {\n    String?: 'String';\n    number?: 0;\n    null?: null;\n    withType?: 'Some string';\n};\n\n/**\n * This is a model with one property and additionalProperties: true\n */\nexport type ModelWithAdditionalPropertiesEqTrue = {\n    /**\n     * This is a simple string property\n     */\n    prop?: string;\n    [key: string]: unknown;\n};\n\nexport type NestedAnyOfArraysNullable = {\n    nullableArray?: Array<string | boolean> | null;\n};\n\nexport type CompositionWithOneOfAndProperties = ({\n    foo: SimpleParameter;\n} | {\n    bar: NonAsciiStringæøåÆøÅöôêÊ字符串;\n}) & {\n    baz: number | null;\n    qux: number;\n};\n\n/**\n * An object that can be null\n */\nexport type NullableObject = {\n    foo?: string;\n} | null;\n\n/**\n * Some % character\n */\nexport type CharactersInDescription = string;\n\nexport type ModelWithNullableObject = {\n    data?: NullableObject;\n};\n\n/**\n * An object with additional properties that can be null (anyOf ref + null)\n */\nexport type ModelWithAdditionalPropertiesRef = {\n    [key: string]: NullableObject | null;\n};\n\nexport type ModelWithOneOfEnum = {\n    foo: 'Bar';\n} | {\n    foo: 'Baz';\n} | {\n    foo: 'Qux';\n} | {\n    content: string;\n    foo: 'Quux';\n} | {\n    content: [\n        string,\n        string\n    ];\n    foo: 'Corge';\n};\n\nexport type ModelWithNestedArrayEnumsDataFoo = 'foo' | 'bar';\n\nexport type ModelWithNestedArrayEnumsDataBar = 'baz' | 'qux';\n\nexport type ModelWithNestedArrayEnumsData = {\n    foo?: Array<ModelWithNestedArrayEnumsDataFoo>;\n    bar?: Array<ModelWithNestedArrayEnumsDataBar>;\n};\n\nexport type ModelWithNestedArrayEnums = {\n    array_strings?: Array<string>;\n    data?: ModelWithNestedArrayEnumsData;\n};\n\nexport type ModelWithNestedCompositionEnums = {\n    foo?: ModelWithNestedArrayEnumsDataFoo;\n};\n\nexport type ModelWithReadOnlyAndWriteOnly = {\n    foo: string;\n    readonly bar: string;\n};\n\nexport type ModelWithConstantSizeArray = [\n    number,\n    number\n];\n\nexport type ModelWithAnyOfConstantSizeArray = [\n    number | string,\n    number | string,\n    number | string\n];\n\nexport type ModelWithPrefixItemsConstantSizeArray = [\n    ModelWithInteger,\n    number | string,\n    string\n];\n\nexport type ModelWithAnyOfConstantSizeArrayNullable = [\n    number | null | string,\n    number | null | string,\n    number | null | string\n];\n\nexport type ModelWithAnyOfConstantSizeArrayWithNSizeAndOptions = [\n    number | Import,\n    number | Import\n];\n\nexport type ModelWithAnyOfConstantSizeArrayAndIntersect = [\n    number & string,\n    number & string\n];\n\nexport type ModelWithNumericEnumUnion = {\n    /**\n     * Период\n     */\n    value?: -10 | -1 | 0 | 1 | 3 | 6 | 12;\n};\n\n/**\n * Some description with `back ticks`\n */\nexport type ModelWithBackticksInDescription = {\n    /**\n     * The template `that` should be used for parsing and importing the contents of the CSV file.\n     *\n     * <br/><p>There is one placeholder currently supported:<ul>     <li><b>${x}</b> - refers to the n-th column in the CSV file, e.g. ${1}, ${2}, ...)</li></ul><p>Example of a correct JSON template:</p>\n     * <pre>\n     * [\n     * {\n     * \"resourceType\": \"Asset\",\n     * \"identifier\": {\n     * \"name\": \"${1}\",\n     * \"domain\": {\n     * \"name\": \"${2}\",\n     * \"community\": {\n     * \"name\": \"Some Community\"\n     * }\n     * }\n     * },\n     * \"attributes\" : {\n     * \"00000000-0000-0000-0000-000000003115\" : [ {\n     * \"value\" : \"${3}\"\n     * } ],\n     * \"00000000-0000-0000-0000-000000000222\" : [ {\n     * \"value\" : \"${4}\"\n     * } ]\n     * }\n     * }\n     * ]\n     * </pre>\n     */\n    template?: string;\n};\n\nexport type ModelWithOneOfAndProperties = (SimpleParameter | NonAsciiStringæøåÆøÅöôêÊ字符串) & {\n    baz: number | null;\n    qux: number;\n};\n\n/**\n * Model used to test deduplication strategy (unused)\n */\nexport type ParameterSimpleParameterUnused = string;\n\n/**\n * Model used to test deduplication strategy\n */\nexport type PostServiceWithEmptyTagResponse = string;\n\n/**\n * Model used to test deduplication strategy\n */\nexport type PostServiceWithEmptyTagResponse2 = string;\n\n/**\n * Model used to test deduplication strategy\n */\nexport type DeleteFooData = string;\n\n/**\n * Model used to test deduplication strategy\n */\nexport type DeleteFooData2 = string;\n\n/**\n * Model with restricted keyword name\n */\nexport type Import = string;\n\nexport type SchemaWithFormRestrictedKeys = {\n    description?: string;\n    'x-enum-descriptions'?: string;\n    'x-enum-varnames'?: string;\n    'x-enumNames'?: string;\n    title?: string;\n    object?: {\n        description?: string;\n        'x-enum-descriptions'?: string;\n        'x-enum-varnames'?: string;\n        'x-enumNames'?: string;\n        title?: string;\n    };\n    array?: Array<{\n        description?: string;\n        'x-enum-descriptions'?: string;\n        'x-enum-varnames'?: string;\n        'x-enumNames'?: string;\n        title?: string;\n    }>;\n};\n\n/**\n * This schema was giving PascalCase transformations a hard time\n */\nexport type IoK8sApimachineryPkgApisMetaV1DeleteOptions = {\n    /**\n     * Must be fulfilled before a deletion is carried out. If not possible, a 409 Conflict status will be returned.\n     */\n    preconditions?: IoK8sApimachineryPkgApisMetaV1Preconditions;\n};\n\n/**\n * This schema was giving PascalCase transformations a hard time\n */\nexport type IoK8sApimachineryPkgApisMetaV1Preconditions = {\n    /**\n     * Specifies the target ResourceVersion\n     */\n    resourceVersion?: string;\n    /**\n     * Specifies the target UID.\n     */\n    uid?: string;\n};\n\nexport type AdditionalPropertiesUnknownIssue = {\n    [key: string]: string | number;\n};\n\nexport type AdditionalPropertiesUnknownIssue2 = {\n    [key: string]: string | number;\n};\n\nexport type AdditionalPropertiesUnknownIssue3 = string & {\n    entries: {\n        [key: string]: AdditionalPropertiesUnknownIssue;\n    };\n};\n\nexport type AdditionalPropertiesIntegerIssue = {\n    value: number;\n    [key: string]: number;\n};\n\nexport type OneOfAllOfIssue = ((ConstValue | GenericSchemaDuplicateIssue1SystemBoolean) & _3eNum1Период) | GenericSchemaDuplicateIssue1SystemString;\n\nexport type GenericSchemaDuplicateIssue1SystemBoolean = {\n    item?: boolean;\n    error?: string | null;\n    readonly hasError?: boolean;\n    data?: {\n        [key: string]: never;\n    };\n};\n\nexport type GenericSchemaDuplicateIssue1SystemString = {\n    item?: string | null;\n    error?: string | null;\n    readonly hasError?: boolean;\n};\n\nexport type ExternalSharedModel = {\n    id: string;\n    name?: string;\n};\n\n/**\n * This is a model with one property containing a reference\n */\nexport type ModelWithReferenceWritable = {\n    prop?: ModelWithPropertiesWritable;\n};\n\n/**\n * This is a model with one property containing an array\n */\nexport type ModelWithArrayReadOnlyAndWriteOnlyWritable = {\n    prop?: Array<ModelWithReadOnlyAndWriteOnlyWritable>;\n    propWithFile?: Array<Blob | File>;\n    propWithNumber?: Array<number>;\n};\n\n/**\n * This is a model with one nested property\n */\nexport type ModelWithPropertiesWritable = {\n    required: string;\n    requiredAndNullable: string | null;\n    string?: string;\n    number?: number;\n    boolean?: boolean;\n    reference?: ModelWithString;\n    'property with space'?: string;\n    default?: string;\n    try?: string;\n};\n\n/**\n * This is a model that contains a some patterns\n */\nexport type ModelWithPatternWritable = {\n    key: string;\n    name: string;\n    id?: string;\n    text?: string;\n    patternWithSingleQuotes?: string;\n    patternWithNewline?: string;\n    patternWithBacktick?: string;\n    patternWithUnicode?: string;\n};\n\nexport type FileWritable = {\n    /**\n     * Mime\n     */\n    mime: string;\n};\n\nexport type ModelWithReadOnlyAndWriteOnlyWritable = {\n    foo: string;\n    baz: string;\n};\n\nexport type ModelWithAnyOfConstantSizeArrayWithNSizeAndOptionsWritable = [\n    number | Import,\n    number | Import\n];\n\nexport type AdditionalPropertiesUnknownIssueWritable = {\n    [key: string]: string | number;\n};\n\nexport type OneOfAllOfIssueWritable = ((ConstValue | GenericSchemaDuplicateIssue1SystemBoolean) & _3eNum1Период) | GenericSchemaDuplicateIssue1SystemString;\n\nexport type GenericSchemaDuplicateIssue1SystemBooleanWritable = {\n    item?: boolean;\n    error?: string | null;\n    data?: {\n        [key: string]: never;\n    };\n};\n\nexport type GenericSchemaDuplicateIssue1SystemStringWritable = {\n    item?: string | null;\n    error?: string | null;\n};\n\n/**\n * This is a reusable parameter\n */\nexport type SimpleParameter = string;\n\n/**\n * Parameter with illegal characters\n */\nexport type XFooBar = ModelWithString;\n\n/**\n * A reusable request body\n */\nexport type SimpleRequestBody = ModelWithString;\n\n/**\n * A reusable request body\n */\nexport type SimpleFormData = ModelWithString;\n\nexport type ExportData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no+tag';\n};\n\nexport type PatchApiVbyApiVersionNoTagData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no+tag';\n};\n\nexport type PatchApiVbyApiVersionNoTagResponses = {\n    /**\n     * OK\n     */\n    default: unknown;\n};\n\nexport type ImportData = {\n    body: ModelWithReadOnlyAndWriteOnlyWritable | ModelWithArrayReadOnlyAndWriteOnlyWritable;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no+tag';\n};\n\nexport type ImportResponses = {\n    /**\n     * Success\n     */\n    200: ModelFromZendesk;\n    /**\n     * Default success response\n     */\n    default: ModelWithReadOnlyAndWriteOnly;\n};\n\nexport type ImportResponse = ImportResponses[keyof ImportResponses];\n\nexport type FooWowData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no+tag';\n};\n\nexport type FooWowResponses = {\n    /**\n     * OK\n     */\n    default: unknown;\n};\n\nexport type ApiVVersionODataControllerCountData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple/$count';\n};\n\nexport type ApiVVersionODataControllerCountResponses = {\n    /**\n     * Success\n     */\n    200: ModelFromZendesk;\n};\n\nexport type ApiVVersionODataControllerCountResponse = ApiVVersionODataControllerCountResponses[keyof ApiVVersionODataControllerCountResponses];\n\nexport type GetApiVbyApiVersionSimpleOperationData = {\n    body?: never;\n    path: {\n        /**\n         * foo in method\n         */\n        foo_param: string;\n    };\n    query?: never;\n    url: '/api/v{api-version}/simple:operation';\n};\n\nexport type GetApiVbyApiVersionSimpleOperationErrors = {\n    /**\n     * Default error response\n     */\n    default: ModelWithBoolean;\n};\n\nexport type GetApiVbyApiVersionSimpleOperationError = GetApiVbyApiVersionSimpleOperationErrors[keyof GetApiVbyApiVersionSimpleOperationErrors];\n\nexport type GetApiVbyApiVersionSimpleOperationResponses = {\n    /**\n     * Response is a simple number\n     */\n    200: number;\n};\n\nexport type GetApiVbyApiVersionSimpleOperationResponse = GetApiVbyApiVersionSimpleOperationResponses[keyof GetApiVbyApiVersionSimpleOperationResponses];\n\nexport type DeleteCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type GetCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type HeadCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type OptionsCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type PatchCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type PostCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type PutCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type DeleteFooData3 = {\n    body?: never;\n    headers: {\n        /**\n         * Parameter with illegal characters\n         */\n        'x-Foo-Bar': ModelWithString;\n    };\n    path: {\n        /**\n         * foo in method\n         */\n        foo_param: string;\n        /**\n         * bar in method\n         */\n        BarParam: string;\n    };\n    query?: never;\n    url: '/api/v{api-version}/foo/{foo_param}/bar/{BarParam}';\n};\n\nexport type CallWithDescriptionsData = {\n    body?: never;\n    path?: never;\n    query?: {\n        /**\n         * Testing multiline comments in string: First line\n         * Second line\n         *\n         * Fourth line\n         */\n        parameterWithBreaks?: string;\n        /**\n         * Testing backticks in string: `backticks` and ```multiple backticks``` should work\n         */\n        parameterWithBackticks?: string;\n        /**\n         * Testing slashes in string: \\backwards\\\\\\ and /forwards/// should work\n         */\n        parameterWithSlashes?: string;\n        /**\n         * Testing expression placeholders in string: ${expression} should work\n         */\n        parameterWithExpressionPlaceholders?: string;\n        /**\n         * Testing quotes in string: 'single quote''' and \"double quotes\"\"\" should work\n         */\n        parameterWithQuotes?: string;\n        /**\n         * Testing reserved characters in string: * inline * and ** inline ** should work\n         */\n        parameterWithReservedCharacters?: string;\n    };\n    url: '/api/v{api-version}/descriptions';\n};\n\nexport type DeprecatedCallData = {\n    body?: never;\n    headers: {\n        /**\n         * This parameter is deprecated\n         *\n         * @deprecated\n         */\n        parameter: DeprecatedModel | null;\n    };\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/parameters/deprecated';\n};\n\nexport type CallWithParametersData = {\n    /**\n     * This is the parameter that goes into the body\n     */\n    body: {\n        [key: string]: unknown;\n    } | null;\n    headers: {\n        /**\n         * This is the parameter that goes into the header\n         */\n        parameterHeader: string | null;\n    };\n    path: {\n        /**\n         * This is the parameter that goes into the path\n         */\n        parameterPath: string | null;\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string | null;\n    };\n    query: {\n        foo_ref_enum?: ModelWithNestedArrayEnumsDataFoo;\n        foo_all_of_enum: ModelWithNestedArrayEnumsDataFoo;\n        /**\n         * This is the parameter that goes into the query params\n         */\n        cursor: string | null;\n    };\n    url: '/api/v{api-version}/parameters/{parameterPath}';\n};\n\nexport type CallWithWeirdParameterNamesData = {\n    /**\n     * This is the parameter that goes into the body\n     */\n    body: ModelWithString | null;\n    headers: {\n        /**\n         * This is the parameter that goes into the request header\n         */\n        'parameter.header': string | null;\n    };\n    path: {\n        /**\n         * This is the parameter that goes into the path\n         */\n        'parameter.path.1'?: string;\n        /**\n         * This is the parameter that goes into the path\n         */\n        'parameter-path-2'?: string;\n        /**\n         * This is the parameter that goes into the path\n         */\n        'PARAMETER-PATH-3'?: string;\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string | null;\n    };\n    query: {\n        /**\n         * This is the parameter with a reserved keyword\n         */\n        default?: string;\n        /**\n         * This is the parameter that goes into the request query params\n         */\n        'parameter-query': string | null;\n    };\n    url: '/api/v{api-version}/parameters/{parameter.path.1}/{parameter-path-2}/{PARAMETER-PATH-3}';\n};\n\nexport type GetCallWithOptionalParamData = {\n    /**\n     * This is a required parameter\n     */\n    body: ModelWithOneOfEnum;\n    path?: never;\n    query?: {\n        /**\n         * This is an optional parameter\n         */\n        page?: number;\n    };\n    url: '/api/v{api-version}/parameters';\n};\n\nexport type PostCallWithOptionalParamData = {\n    /**\n     * This is an optional parameter\n     */\n    body?: {\n        offset?: number | null;\n    };\n    path?: never;\n    query: {\n        /**\n         * This is a required parameter\n         */\n        parameter: Pageable;\n    };\n    url: '/api/v{api-version}/parameters';\n};\n\nexport type PostCallWithOptionalParamResponses = {\n    /**\n     * Response is a simple number\n     */\n    200: number;\n    /**\n     * Success\n     */\n    204: void;\n};\n\nexport type PostCallWithOptionalParamResponse = PostCallWithOptionalParamResponses[keyof PostCallWithOptionalParamResponses];\n\nexport type PostApiVbyApiVersionRequestBodyData = {\n    /**\n     * A reusable request body\n     */\n    body?: SimpleRequestBody;\n    path?: never;\n    query?: {\n        /**\n         * This is a reusable parameter\n         */\n        parameter?: string;\n    };\n    url: '/api/v{api-version}/requestBody';\n};\n\nexport type PostApiVbyApiVersionFormDataData = {\n    /**\n     * A reusable request body\n     */\n    body?: SimpleFormData;\n    path?: never;\n    query?: {\n        /**\n         * This is a reusable parameter\n         */\n        parameter?: string;\n    };\n    url: '/api/v{api-version}/formData';\n};\n\nexport type CallWithDefaultParametersData = {\n    body?: never;\n    path?: never;\n    query?: {\n        /**\n         * This is a simple string with default value\n         */\n        parameterString?: string | null;\n        /**\n         * This is a simple number with default value\n         */\n        parameterNumber?: number | null;\n        /**\n         * This is a simple boolean with default value\n         */\n        parameterBoolean?: boolean | null;\n        /**\n         * This is a simple enum with default value\n         */\n        parameterEnum?: 'Success' | 'Warning' | 'Error';\n        /**\n         * This is a simple model with default value\n         */\n        parameterModel?: ModelWithString | null;\n    };\n    url: '/api/v{api-version}/defaults';\n};\n\nexport type CallWithDefaultOptionalParametersData = {\n    body?: never;\n    path?: never;\n    query?: {\n        /**\n         * This is a simple string that is optional with default value\n         */\n        parameterString?: string;\n        /**\n         * This is a simple number that is optional with default value\n         */\n        parameterNumber?: number;\n        /**\n         * This is a simple boolean that is optional with default value\n         */\n        parameterBoolean?: boolean;\n        /**\n         * This is a simple enum that is optional with default value\n         */\n        parameterEnum?: 'Success' | 'Warning' | 'Error';\n        /**\n         * This is a simple model that is optional with default value\n         */\n        parameterModel?: ModelWithString;\n    };\n    url: '/api/v{api-version}/defaults';\n};\n\nexport type CallToTestOrderOfParamsData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * This is a optional string with default\n         */\n        parameterOptionalStringWithDefault?: string;\n        /**\n         * This is a optional string with empty default\n         */\n        parameterOptionalStringWithEmptyDefault?: string;\n        /**\n         * This is a optional string with no default\n         */\n        parameterOptionalStringWithNoDefault?: string;\n        /**\n         * This is a string with default\n         */\n        parameterStringWithDefault: string;\n        /**\n         * This is a string with empty default\n         */\n        parameterStringWithEmptyDefault: string;\n        /**\n         * This is a string with no default\n         */\n        parameterStringWithNoDefault: string;\n        /**\n         * This is a string that can be null with no default\n         */\n        parameterStringNullableWithNoDefault?: string | null;\n        /**\n         * This is a string that can be null with default\n         */\n        parameterStringNullableWithDefault?: string | null;\n    };\n    url: '/api/v{api-version}/defaults';\n};\n\nexport type DuplicateNameData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/duplicate';\n};\n\nexport type DuplicateName2Data = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/duplicate';\n};\n\nexport type DuplicateName3Data = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/duplicate';\n};\n\nexport type DuplicateName4Data = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/duplicate';\n};\n\nexport type CallWithNoContentResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no-content';\n};\n\nexport type CallWithNoContentResponseResponses = {\n    /**\n     * Success\n     */\n    204: void;\n};\n\nexport type CallWithNoContentResponseResponse = CallWithNoContentResponseResponses[keyof CallWithNoContentResponseResponses];\n\nexport type CallWithResponseAndNoContentResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multiple-tags/response-and-no-content';\n};\n\nexport type CallWithResponseAndNoContentResponseResponses = {\n    /**\n     * Response is a simple number\n     */\n    200: number;\n    /**\n     * Success\n     */\n    204: void;\n};\n\nexport type CallWithResponseAndNoContentResponseResponse = CallWithResponseAndNoContentResponseResponses[keyof CallWithResponseAndNoContentResponseResponses];\n\nexport type DummyAData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multiple-tags/a';\n};\n\nexport type DummyAResponses = {\n    200: _400;\n};\n\nexport type DummyAResponse = DummyAResponses[keyof DummyAResponses];\n\nexport type DummyBData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multiple-tags/b';\n};\n\nexport type DummyBResponses = {\n    /**\n     * Success\n     */\n    204: void;\n};\n\nexport type DummyBResponse = DummyBResponses[keyof DummyBResponses];\n\nexport type CallWithResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/response';\n};\n\nexport type CallWithResponseResponses = {\n    default: Import;\n};\n\nexport type CallWithResponseResponse = CallWithResponseResponses[keyof CallWithResponseResponses];\n\nexport type CallWithDuplicateResponsesData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/response';\n};\n\nexport type CallWithDuplicateResponsesErrors = {\n    /**\n     * Message for 500 error\n     */\n    500: ModelWithStringError;\n    /**\n     * Message for 501 error\n     */\n    501: ModelWithStringError;\n    /**\n     * Message for 502 error\n     */\n    502: ModelWithStringError;\n    /**\n     * Message for 4XX errors\n     */\n    '4XX': DictionaryWithArray;\n    /**\n     * Default error response\n     */\n    default: ModelWithBoolean;\n};\n\nexport type CallWithDuplicateResponsesError = CallWithDuplicateResponsesErrors[keyof CallWithDuplicateResponsesErrors];\n\nexport type CallWithDuplicateResponsesResponses = {\n    /**\n     * Message for 200 response\n     */\n    200: ModelWithBoolean & ModelWithInteger;\n    /**\n     * Message for 201 response\n     */\n    201: ModelWithString;\n    /**\n     * Message for 202 response\n     */\n    202: ModelWithString;\n};\n\nexport type CallWithDuplicateResponsesResponse = CallWithDuplicateResponsesResponses[keyof CallWithDuplicateResponsesResponses];\n\nexport type CallWithResponsesData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/response';\n};\n\nexport type CallWithResponsesErrors = {\n    /**\n     * Message for 500 error\n     */\n    500: ModelWithStringError;\n    /**\n     * Message for 501 error\n     */\n    501: ModelWithStringError;\n    /**\n     * Message for 502 error\n     */\n    502: ModelWithStringError;\n    /**\n     * Message for default response\n     */\n    default: ModelWithStringError;\n};\n\nexport type CallWithResponsesError = CallWithResponsesErrors[keyof CallWithResponsesErrors];\n\nexport type CallWithResponsesResponses = {\n    /**\n     * Message for 200 response\n     */\n    200: {\n        readonly '@namespace.string'?: string;\n        readonly '@namespace.integer'?: number;\n        readonly value?: Array<ModelWithString>;\n    };\n    /**\n     * Message for 201 response\n     */\n    201: ModelThatExtends;\n    /**\n     * Message for 202 response\n     */\n    202: ModelThatExtendsExtends;\n};\n\nexport type CallWithResponsesResponse = CallWithResponsesResponses[keyof CallWithResponsesResponses];\n\nexport type CollectionFormatData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * This is an array parameter that is sent as csv format (comma-separated values)\n         */\n        parameterArrayCSV: Array<string> | null;\n        /**\n         * This is an array parameter that is sent as ssv format (space-separated values)\n         */\n        parameterArraySSV: Array<string> | null;\n        /**\n         * This is an array parameter that is sent as tsv format (tab-separated values)\n         */\n        parameterArrayTSV: Array<string> | null;\n        /**\n         * This is an array parameter that is sent as pipes format (pipe-separated values)\n         */\n        parameterArrayPipes: Array<string> | null;\n        /**\n         * This is an array parameter that is sent as multi format (multiple parameter instances)\n         */\n        parameterArrayMulti: Array<string> | null;\n    };\n    url: '/api/v{api-version}/collectionFormat';\n};\n\nexport type TypesData = {\n    body?: never;\n    path?: {\n        /**\n         * This is a number parameter\n         */\n        id?: number;\n    };\n    query: {\n        /**\n         * This is a number parameter\n         */\n        parameterNumber: number;\n        /**\n         * This is a string parameter\n         */\n        parameterString: string | null;\n        /**\n         * This is a boolean parameter\n         */\n        parameterBoolean: boolean | null;\n        /**\n         * This is an object parameter\n         */\n        parameterObject: {\n            [key: string]: unknown;\n        } | null;\n        /**\n         * This is an array parameter\n         */\n        parameterArray: Array<string> | null;\n        /**\n         * This is a dictionary parameter\n         */\n        parameterDictionary: {\n            [key: string]: unknown;\n        } | null;\n        /**\n         * This is an enum parameter\n         */\n        parameterEnum: 'Success' | 'Warning' | 'Error' | null;\n    };\n    url: '/api/v{api-version}/types';\n};\n\nexport type TypesResponses = {\n    /**\n     * Response is a simple number\n     */\n    200: number;\n    /**\n     * Response is a simple string\n     */\n    201: string;\n    /**\n     * Response is a simple boolean\n     */\n    202: boolean;\n    /**\n     * Response is a simple object\n     */\n    203: {\n        [key: string]: unknown;\n    };\n};\n\nexport type TypesResponse = TypesResponses[keyof TypesResponses];\n\nexport type UploadFileData = {\n    body: Blob | File;\n    path: {\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string | null;\n    };\n    query?: never;\n    url: '/api/v{api-version}/upload';\n};\n\nexport type UploadFileResponses = {\n    200: boolean;\n};\n\nexport type UploadFileResponse = UploadFileResponses[keyof UploadFileResponses];\n\nexport type FileResponseData = {\n    body?: never;\n    path: {\n        id: string;\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string;\n    };\n    query?: never;\n    url: '/api/v{api-version}/file/{id}';\n};\n\nexport type FileResponseResponses = {\n    /**\n     * Success\n     */\n    200: Blob | File;\n};\n\nexport type FileResponseResponse = FileResponseResponses[keyof FileResponseResponses];\n\nexport type ComplexTypesData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * Parameter containing object\n         */\n        parameterObject: {\n            first?: {\n                second?: {\n                    third?: string;\n                };\n            };\n        };\n        /**\n         * Parameter containing reference\n         */\n        parameterReference: ModelWithString;\n    };\n    url: '/api/v{api-version}/complex';\n};\n\nexport type ComplexTypesErrors = {\n    /**\n     * 400 `server` error\n     */\n    400: unknown;\n    /**\n     * 500 server error\n     */\n    500: unknown;\n};\n\nexport type ComplexTypesResponses = {\n    /**\n     * Successful response\n     */\n    200: Array<ModelWithString>;\n};\n\nexport type ComplexTypesResponse = ComplexTypesResponses[keyof ComplexTypesResponses];\n\nexport type MultipartResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multipart';\n};\n\nexport type MultipartResponseResponses = {\n    /**\n     * OK\n     */\n    200: {\n        file?: Blob | File;\n        metadata?: {\n            foo?: string;\n            bar?: string;\n        };\n    };\n};\n\nexport type MultipartResponseResponse = MultipartResponseResponses[keyof MultipartResponseResponses];\n\nexport type MultipartRequestData = {\n    body?: {\n        content?: Blob | File;\n        data?: ModelWithString | null;\n    };\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multipart';\n};\n\nexport type ComplexParamsData = {\n    body?: {\n        readonly key: string | null;\n        name: string | null;\n        enabled?: boolean;\n        type: 'Monkey' | 'Horse' | 'Bird';\n        listOfModels?: Array<ModelWithString> | null;\n        listOfStrings?: Array<string> | null;\n        parameters: ModelWithString | ModelWithEnum | ModelWithArray | ModelWithDictionary;\n        readonly user?: {\n            readonly id?: number;\n            readonly name?: string | null;\n        };\n    };\n    path: {\n        id: number;\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string;\n    };\n    query?: never;\n    url: '/api/v{api-version}/complex/{id}';\n};\n\nexport type ComplexParamsResponses = {\n    /**\n     * Success\n     */\n    200: ModelWithString;\n};\n\nexport type ComplexParamsResponse = ComplexParamsResponses[keyof ComplexParamsResponses];\n\nexport type CallWithResultFromHeaderData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/header';\n};\n\nexport type CallWithResultFromHeaderErrors = {\n    /**\n     * 400 server error\n     */\n    400: unknown;\n    /**\n     * 500 server error\n     */\n    500: unknown;\n};\n\nexport type CallWithResultFromHeaderResponses = {\n    /**\n     * Successful response\n     */\n    200: unknown;\n};\n\nexport type TestErrorCodeData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * Status code to return\n         */\n        status: number;\n    };\n    url: '/api/v{api-version}/error';\n};\n\nexport type TestErrorCodeErrors = {\n    /**\n     * Custom message: Internal Server Error\n     */\n    500: unknown;\n    /**\n     * Custom message: Not Implemented\n     */\n    501: unknown;\n    /**\n     * Custom message: Bad Gateway\n     */\n    502: unknown;\n    /**\n     * Custom message: Service Unavailable\n     */\n    503: unknown;\n};\n\nexport type TestErrorCodeResponses = {\n    /**\n     * Custom message: Successful response\n     */\n    200: unknown;\n};\n\nexport type NonAsciiæøåÆøÅöôêÊ字符串Data = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * Dummy input param\n         */\n        nonAsciiParamæøåÆØÅöôêÊ: number;\n    };\n    url: '/api/v{api-version}/non-ascii-æøåÆØÅöôêÊ字符串';\n};\n\nexport type NonAsciiæøåÆøÅöôêÊ字符串Responses = {\n    /**\n     * Successful response\n     */\n    200: Array<NonAsciiStringæøåÆøÅöôêÊ字符串>;\n};\n\nexport type NonAsciiæøåÆøÅöôêÊ字符串Response = NonAsciiæøåÆøÅöôêÊ字符串Responses[keyof NonAsciiæøåÆøÅöôêÊ字符串Responses];\n\nexport type PutWithFormUrlEncodedData = {\n    body: ArrayWithStrings;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/non-ascii-æøåÆØÅöôêÊ字符串';\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-fetch/base-url-string/client/client.gen.ts",
    "content": "// 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 (options: RequestOptions) => {\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 url = buildUrl(opts);\n\n    return { opts, url };\n  };\n\n  const request: Client['request'] = async (options) => {\n    // @ts-expect-error\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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-fetch/base-url-string/client/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type { Auth } from '../core/auth.gen';\nexport type { QuerySerializerOptions } from '../core/bodySerializer.gen';\nexport {\n  formDataBodySerializer,\n  jsonBodySerializer,\n  urlSearchParamsBodySerializer,\n} from '../core/bodySerializer.gen';\nexport { buildClientParams } from '../core/params.gen';\nexport { serializeQueryKeyValue } from '../core/queryKeySerializer.gen';\nexport { createClient } from './client.gen';\nexport type {\n  Client,\n  ClientOptions,\n  Config,\n  CreateClientConfig,\n  Options,\n  RequestOptions,\n  RequestResult,\n  ResolvedRequestOptions,\n  ResponseStyle,\n  TDataShape,\n} from './types.gen';\nexport { createConfig, mergeHeaders } from './utils.gen';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-fetch/base-url-string/client/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { Auth } from '../core/auth.gen';\nimport type {\n  ServerSentEventsOptions,\n  ServerSentEventsResult,\n} from '../core/serverSentEvents.gen';\nimport type { Client as CoreClient, Config as CoreConfig } from '../core/types.gen';\nimport type { Middleware } from './utils.gen';\n\nexport type ResponseStyle = 'data' | 'fields';\n\nexport interface Config<T extends ClientOptions = ClientOptions>\n  extends Omit<RequestInit, 'body' | 'headers' | 'method'>, CoreConfig {\n  /**\n   * Base URL for all requests made by this client.\n   */\n  baseUrl?: T['baseUrl'];\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   * Please don't use the Fetch client for Next.js applications. The `next`\n   * options won't have any effect.\n   *\n   * Install {@link https://www.npmjs.com/package/@hey-api/client-next `@hey-api/client-next`} instead.\n   */\n  next?: never;\n  /**\n   * Return the response data parsed in a specified format. By default, `auto`\n   * will infer the appropriate method from the `Content-Type` response header.\n   * You can override this behavior with any of the {@link Body} methods.\n   * Select `stream` if you don't want to parse response data at all.\n   *\n   * @default 'auto'\n   */\n  parseAs?: 'arrayBuffer' | 'auto' | 'blob' | 'formData' | 'json' | 'stream' | 'text';\n  /**\n   * Should we return only data or multiple fields (data, error, response, etc.)?\n   *\n   * @default 'fields'\n   */\n  responseStyle?: ResponseStyle;\n  /**\n   * Throw an error instead of returning it in the response?\n   *\n   * @default false\n   */\n  throwOnError?: T['throwOnError'];\n}\n\nexport interface RequestOptions<\n  TData = unknown,\n  TResponseStyle extends ResponseStyle = 'fields',\n  ThrowOnError extends boolean = boolean,\n  Url extends string = string,\n>\n  extends\n    Config<{\n      responseStyle: TResponseStyle;\n      throwOnError: ThrowOnError;\n    }>,\n    Pick<\n      ServerSentEventsOptions<TData>,\n      | 'onRequest'\n      | 'onSseError'\n      | 'onSseEvent'\n      | 'sseDefaultRetryDelay'\n      | 'sseMaxRetryAttempts'\n      | 'sseMaxRetryDelay'\n    > {\n  /**\n   * Any body that you want to add to your request.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/fetch#body}\n   */\n  body?: unknown;\n  path?: Record<string, unknown>;\n  query?: Record<string, unknown>;\n  /**\n   * Security mechanism(s) to use for the request.\n   */\n  security?: ReadonlyArray<Auth>;\n  url: Url;\n}\n\nexport interface ResolvedRequestOptions<\n  TResponseStyle extends ResponseStyle = 'fields',\n  ThrowOnError extends boolean = boolean,\n  Url extends string = string,\n> extends RequestOptions<unknown, TResponseStyle, ThrowOnError, Url> {\n  serializedBody?: string;\n}\n\nexport type RequestResult<\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = boolean,\n  TResponseStyle extends ResponseStyle = 'fields',\n> = ThrowOnError extends true\n  ? Promise<\n      TResponseStyle extends 'data'\n        ? TData extends Record<string, unknown>\n          ? TData[keyof TData]\n          : TData\n        : {\n            data: TData extends Record<string, unknown> ? TData[keyof TData] : TData;\n            request: Request;\n            response: Response;\n          }\n    >\n  : Promise<\n      TResponseStyle extends 'data'\n        ? (TData extends Record<string, unknown> ? TData[keyof TData] : TData) | undefined\n        : (\n            | {\n                data: TData extends Record<string, unknown> ? TData[keyof TData] : TData;\n                error: undefined;\n              }\n            | {\n                data: undefined;\n                error: TError extends Record<string, unknown> ? TError[keyof TError] : TError;\n              }\n          ) & {\n            request: Request;\n            response: Response;\n          }\n    >;\n\nexport interface ClientOptions {\n  baseUrl?: string;\n  responseStyle?: ResponseStyle;\n  throwOnError?: boolean;\n}\n\ntype MethodFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'>,\n) => RequestResult<TData, TError, ThrowOnError, TResponseStyle>;\n\ntype SseFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'>,\n) => Promise<ServerSentEventsResult<TData, TError>>;\n\ntype RequestFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'> &\n    Pick<Required<RequestOptions<TData, TResponseStyle, ThrowOnError>>, 'method'>,\n) => RequestResult<TData, TError, ThrowOnError, TResponseStyle>;\n\ntype BuildUrlFn = <\n  TData extends {\n    body?: unknown;\n    path?: Record<string, unknown>;\n    query?: Record<string, unknown>;\n    url: string;\n  },\n>(\n  options: TData & Options<TData>,\n) => string;\n\nexport type Client = CoreClient<RequestFn, Config, MethodFn, BuildUrlFn, SseFn> & {\n  interceptors: Middleware<Request, Response, unknown, ResolvedRequestOptions>;\n};\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 = ClientOptions> = (\n  override?: Config<ClientOptions & T>,\n) => Config<Required<ClientOptions> & T>;\n\nexport interface TDataShape {\n  body?: unknown;\n  headers?: unknown;\n  path?: unknown;\n  query?: unknown;\n  url: string;\n}\n\ntype OmitKeys<T, K> = Pick<T, Exclude<keyof T, K>>;\n\nexport type Options<\n  TData extends TDataShape = TDataShape,\n  ThrowOnError extends boolean = boolean,\n  TResponse = unknown,\n  TResponseStyle extends ResponseStyle = 'fields',\n> = OmitKeys<\n  RequestOptions<TResponse, TResponseStyle, ThrowOnError>,\n  'body' | 'path' | 'query' | 'url'\n> &\n  ([TData] extends [never] ? unknown : Omit<TData, 'url'>);\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-fetch/base-url-string/client/utils.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-fetch/base-url-string/client.gen.ts",
    "content": "// 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://foo.com' }));\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-fetch/base-url-string/core/auth.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-fetch/base-url-string/core/bodySerializer.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-fetch/base-url-string/core/params.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-fetch/base-url-string/core/pathSerializer.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-fetch/base-url-string/core/queryKeySerializer.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\n/**\n * JSON-friendly union that mirrors what Pinia Colada can hash.\n */\nexport type JsonValue =\n  | null\n  | string\n  | number\n  | boolean\n  | JsonValue[]\n  | { [key: string]: JsonValue };\n\n/**\n * Replacer that converts non-JSON values (bigint, Date, etc.) to safe substitutes.\n */\nexport const queryKeyJsonReplacer = (_key: string, value: unknown) => {\n  if (value === undefined || typeof value === 'function' || typeof value === 'symbol') {\n    return undefined;\n  }\n  if (typeof value === 'bigint') {\n    return value.toString();\n  }\n  if (value instanceof Date) {\n    return value.toISOString();\n  }\n  return value;\n};\n\n/**\n * Safely stringifies a value and parses it back into a JsonValue.\n */\nexport const stringifyToJsonValue = (input: unknown): JsonValue | undefined => {\n  try {\n    const json = JSON.stringify(input, queryKeyJsonReplacer);\n    if (json === undefined) {\n      return undefined;\n    }\n    return JSON.parse(json) as JsonValue;\n  } catch {\n    return undefined;\n  }\n};\n\n/**\n * Detects plain objects (including objects with a null prototype).\n */\nconst isPlainObject = (value: unknown): value is Record<string, unknown> => {\n  if (value === null || typeof value !== 'object') {\n    return false;\n  }\n  const prototype = Object.getPrototypeOf(value as object);\n  return prototype === Object.prototype || prototype === null;\n};\n\n/**\n * Turns URLSearchParams into a sorted JSON object for deterministic keys.\n */\nconst serializeSearchParams = (params: URLSearchParams): JsonValue => {\n  const entries = Array.from(params.entries()).sort(([a], [b]) => a.localeCompare(b));\n  const result: Record<string, JsonValue> = {};\n\n  for (const [key, value] of entries) {\n    const existing = result[key];\n    if (existing === undefined) {\n      result[key] = value;\n      continue;\n    }\n\n    if (Array.isArray(existing)) {\n      (existing as string[]).push(value);\n    } else {\n      result[key] = [existing, value];\n    }\n  }\n\n  return result;\n};\n\n/**\n * Normalizes any accepted value into a JSON-friendly shape for query keys.\n */\nexport const serializeQueryKeyValue = (value: unknown): JsonValue | undefined => {\n  if (value === null) {\n    return null;\n  }\n\n  if (typeof value === 'string' || typeof value === 'number' || typeof value === 'boolean') {\n    return value;\n  }\n\n  if (value === undefined || typeof value === 'function' || typeof value === 'symbol') {\n    return undefined;\n  }\n\n  if (typeof value === 'bigint') {\n    return value.toString();\n  }\n\n  if (value instanceof Date) {\n    return value.toISOString();\n  }\n\n  if (Array.isArray(value)) {\n    return stringifyToJsonValue(value);\n  }\n\n  if (typeof URLSearchParams !== 'undefined' && value instanceof URLSearchParams) {\n    return serializeSearchParams(value);\n  }\n\n  if (isPlainObject(value)) {\n    return stringifyToJsonValue(value);\n  }\n\n  return undefined;\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-fetch/base-url-string/core/serverSentEvents.gen.ts",
    "content": "// 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 const 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            // Normalize line endings: CRLF -> LF, then CR -> LF\n            buffer = buffer.replace(/\\r\\n/g, '\\n').replace(/\\r/g, '\\n');\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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-fetch/base-url-string/core/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { Auth, AuthToken } from './auth.gen';\nimport type { BodySerializer, QuerySerializer, QuerySerializerOptions } from './bodySerializer.gen';\n\nexport type HttpMethod =\n  | 'connect'\n  | 'delete'\n  | 'get'\n  | 'head'\n  | 'options'\n  | 'patch'\n  | 'post'\n  | 'put'\n  | 'trace';\n\nexport type Client<\n  RequestFn = never,\n  Config = unknown,\n  MethodFn = never,\n  BuildUrlFn = never,\n  SseFn = never,\n> = {\n  /**\n   * Returns the final request URL.\n   */\n  buildUrl: BuildUrlFn;\n  getConfig: () => Config;\n  request: RequestFn;\n  setConfig: (config: Config) => Config;\n} & {\n  [K in HttpMethod]: MethodFn;\n} & ([SseFn] extends [never] ? { sse?: never } : { sse: { [K in HttpMethod]: SseFn } });\n\nexport interface Config {\n  /**\n   * Auth token or a function returning auth token. The resolved value will be\n   * added to the request payload as defined by its `security` array.\n   */\n  auth?: ((auth: Auth) => Promise<AuthToken> | AuthToken) | AuthToken;\n  /**\n   * A function for serializing request body parameter. By default,\n   * {@link JSON.stringify()} will be used.\n   */\n  bodySerializer?: BodySerializer | null;\n  /**\n   * An object containing any HTTP headers that you want to pre-populate your\n   * `Headers` object with.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/Headers/Headers#init See more}\n   */\n  headers?:\n    | RequestInit['headers']\n    | Record<\n        string,\n        string | number | boolean | (string | number | boolean)[] | null | undefined | unknown\n      >;\n  /**\n   * The request method.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/fetch#method See more}\n   */\n  method?: Uppercase<HttpMethod>;\n  /**\n   * A function for serializing request query parameters. By default, arrays\n   * will be exploded in form style, objects will be exploded in deepObject\n   * style, and reserved characters are percent-encoded.\n   *\n   * This method will have no effect if the native `paramsSerializer()` Axios\n   * API function is used.\n   *\n   * {@link https://swagger.io/docs/specification/serialization/#query View examples}\n   */\n  querySerializer?: QuerySerializer | QuerySerializerOptions;\n  /**\n   * A function validating request data. This is useful if you want to ensure\n   * the request conforms to the desired shape, so it can be safely sent to\n   * the server.\n   */\n  requestValidator?: (data: unknown) => Promise<unknown>;\n  /**\n   * A function transforming response data before it's returned. This is useful\n   * for post-processing data, e.g. converting ISO strings into Date objects.\n   */\n  responseTransformer?: (data: unknown) => Promise<unknown>;\n  /**\n   * A function validating response data. This is useful if you want to ensure\n   * the response conforms to the desired shape, so it can be safely passed to\n   * the transformers and returned to the user.\n   */\n  responseValidator?: (data: unknown) => Promise<unknown>;\n}\n\ntype IsExactlyNeverOrNeverUndefined<T> = [T] extends [never]\n  ? true\n  : [T] extends [never | undefined]\n    ? [undefined] extends [T]\n      ? false\n      : true\n    : false;\n\nexport type OmitNever<T extends Record<string, unknown>> = {\n  [K in keyof T as IsExactlyNeverOrNeverUndefined<T[K]> extends true ? never : K]: T[K];\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-fetch/base-url-string/core/utils.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-fetch/base-url-string/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type { _3eNum1Период, _400, AdditionalPropertiesIntegerIssue, AdditionalPropertiesUnknownIssue, AdditionalPropertiesUnknownIssue2, AdditionalPropertiesUnknownIssue3, AdditionalPropertiesUnknownIssueWritable, AnyOfAnyAndNull, AnyOfArrays, ApiVVersionODataControllerCountData, ApiVVersionODataControllerCountResponse, ApiVVersionODataControllerCountResponses, ArrayWithAnyOfProperties, ArrayWithArray, ArrayWithBooleans, ArrayWithNumbers, ArrayWithProperties, ArrayWithReferences, ArrayWithStrings, CallToTestOrderOfParamsData, CallWithDefaultOptionalParametersData, CallWithDefaultParametersData, CallWithDescriptionsData, CallWithDuplicateResponsesData, CallWithDuplicateResponsesError, CallWithDuplicateResponsesErrors, CallWithDuplicateResponsesResponse, CallWithDuplicateResponsesResponses, CallWithNoContentResponseData, CallWithNoContentResponseResponse, CallWithNoContentResponseResponses, CallWithParametersData, CallWithResponseAndNoContentResponseData, CallWithResponseAndNoContentResponseResponse, CallWithResponseAndNoContentResponseResponses, CallWithResponseData, CallWithResponseResponse, CallWithResponseResponses, CallWithResponsesData, CallWithResponsesError, CallWithResponsesErrors, CallWithResponsesResponse, CallWithResponsesResponses, CallWithResultFromHeaderData, CallWithResultFromHeaderErrors, CallWithResultFromHeaderResponses, CallWithWeirdParameterNamesData, CamelCaseCommentWithBreaks, CharactersInDescription, ClientOptions, CollectionFormatData, CommentWithBackticks, CommentWithBackticksAndQuotes, CommentWithBreaks, CommentWithExpressionPlaceholders, CommentWithQuotes, CommentWithReservedCharacters, CommentWithSlashes, ComplexParamsData, ComplexParamsResponse, ComplexParamsResponses, ComplexTypesData, ComplexTypesErrors, ComplexTypesResponse, ComplexTypesResponses, CompositionBaseModel, CompositionExtendedModel, CompositionWithAllOfAndNullable, CompositionWithAnyOf, CompositionWithAnyOfAndNullable, CompositionWithAnyOfAnonymous, CompositionWithNestedAnyAndTypeNull, CompositionWithNestedAnyOfAndNull, CompositionWithOneOf, CompositionWithOneOfAndComplexArrayDictionary, CompositionWithOneOfAndNullable, CompositionWithOneOfAndProperties, CompositionWithOneOfAndSimpleArrayDictionary, CompositionWithOneOfAndSimpleDictionary, CompositionWithOneOfAnonymous, CompositionWithOneOfDiscriminator, ConstValue, Default, DeleteCallWithoutParametersAndResponseData, DeleteFooData, DeleteFooData2, DeleteFooData3, DeprecatedCallData, DeprecatedModel, DictionaryWithArray, DictionaryWithDictionary, DictionaryWithProperties, DictionaryWithPropertiesAndAdditionalProperties, DictionaryWithReference, DictionaryWithString, DummyAData, DummyAResponse, DummyAResponses, DummyBData, DummyBResponse, DummyBResponses, DuplicateName2Data, DuplicateName3Data, DuplicateName4Data, DuplicateNameData, EnumFromDescription, EnumWithExtensions, EnumWithNumbers, EnumWithReplacedCharacters, EnumWithStrings, EnumWithXEnumNames, ExportData, ExternalRefA, ExternalRefB, ExternalSharedModel, File, FileResponseData, FileResponseResponse, FileResponseResponses, FileWritable, FooWowData, FooWowResponses, FreeFormObjectWithAdditionalPropertiesEqEmptyObject, FreeFormObjectWithAdditionalPropertiesEqTrue, FreeFormObjectWithoutAdditionalProperties, GenericSchemaDuplicateIssue1SystemBoolean, GenericSchemaDuplicateIssue1SystemBooleanWritable, GenericSchemaDuplicateIssue1SystemString, GenericSchemaDuplicateIssue1SystemStringWritable, GetApiVbyApiVersionSimpleOperationData, GetApiVbyApiVersionSimpleOperationError, GetApiVbyApiVersionSimpleOperationErrors, GetApiVbyApiVersionSimpleOperationResponse, GetApiVbyApiVersionSimpleOperationResponses, GetCallWithOptionalParamData, GetCallWithoutParametersAndResponseData, HeadCallWithoutParametersAndResponseData, Import, ImportData, ImportResponse, ImportResponses, IoK8sApimachineryPkgApisMetaV1DeleteOptions, IoK8sApimachineryPkgApisMetaV1Preconditions, ModelCircle, ModelFromZendesk, ModelSquare, ModelThatExtends, ModelThatExtendsExtends, ModelWithAdditionalPropertiesEqTrue, ModelWithAdditionalPropertiesRef, ModelWithAnyOfConstantSizeArray, ModelWithAnyOfConstantSizeArrayAndIntersect, ModelWithAnyOfConstantSizeArrayNullable, ModelWithAnyOfConstantSizeArrayWithNSizeAndOptions, ModelWithAnyOfConstantSizeArrayWithNSizeAndOptionsWritable, ModelWithArray, ModelWithArrayReadOnlyAndWriteOnly, ModelWithArrayReadOnlyAndWriteOnlyWritable, ModelWithBackticksInDescription, ModelWithBoolean, ModelWithCircularReference, ModelWithConst, ModelWithConstantSizeArray, ModelWithDictionary, ModelWithDuplicateImports, ModelWithDuplicateProperties, ModelWithEnum, ModelWithEnumFromDescription, ModelWithEnumWithHyphen, ModelWithInteger, ModelWithNestedArrayEnums, ModelWithNestedArrayEnumsData, ModelWithNestedArrayEnumsDataBar, ModelWithNestedArrayEnumsDataFoo, ModelWithNestedCompositionEnums, ModelWithNestedEnums, ModelWithNestedProperties, ModelWithNullableObject, ModelWithNullableString, ModelWithNumericEnumUnion, ModelWithOneOfAndProperties, ModelWithOneOfEnum, ModelWithOrderedProperties, ModelWithPattern, ModelWithPatternWritable, ModelWithPrefixItemsConstantSizeArray, ModelWithProperties, ModelWithPropertiesWritable, ModelWithReadOnlyAndWriteOnly, ModelWithReadOnlyAndWriteOnlyWritable, ModelWithReference, ModelWithReferenceWritable, ModelWithString, ModelWithStringError, MultipartRequestData, MultipartResponseData, MultipartResponseResponse, MultipartResponseResponses, NestedAnyOfArraysNullable, NonAsciiæøåÆøÅöôêÊ字符串Data, NonAsciiæøåÆøÅöôêÊ字符串Response, NonAsciiæøåÆøÅöôêÊ字符串Responses, NonAsciiStringæøåÆøÅöôêÊ字符串, NullableObject, OneOfAllOfIssue, OneOfAllOfIssueWritable, OptionsCallWithoutParametersAndResponseData, Pageable, ParameterSimpleParameterUnused, PatchApiVbyApiVersionNoTagData, PatchApiVbyApiVersionNoTagResponses, PatchCallWithoutParametersAndResponseData, PostApiVbyApiVersionFormDataData, PostApiVbyApiVersionRequestBodyData, PostCallWithOptionalParamData, PostCallWithOptionalParamResponse, PostCallWithOptionalParamResponses, PostCallWithoutParametersAndResponseData, PostServiceWithEmptyTagResponse, PostServiceWithEmptyTagResponse2, PutCallWithoutParametersAndResponseData, PutWithFormUrlEncodedData, SchemaWithFormRestrictedKeys, SimpleBoolean, SimpleFile, SimpleFormData, SimpleInteger, SimpleParameter, SimpleReference, SimpleRequestBody, SimpleString, SimpleStringWithPattern, TestErrorCodeData, TestErrorCodeErrors, TestErrorCodeResponses, TypesData, TypesResponse, TypesResponses, UploadFileData, UploadFileResponse, UploadFileResponses, XFooBar } from './types.gen';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-fetch/base-url-string/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type ClientOptions = {\n    baseUrl: 'http://localhost:3000/base' | (string & {});\n};\n\n/**\n * Model with number-only name\n */\nexport type _400 = string;\n\n/**\n * External ref to shared model (A)\n */\nexport type ExternalRefA = ExternalSharedModel;\n\n/**\n * External ref to shared model (B)\n */\nexport type ExternalRefB = ExternalSharedModel;\n\n/**\n * Testing multiline comments in string: First line\n * Second line\n *\n * Fourth line\n */\nexport type CamelCaseCommentWithBreaks = number;\n\n/**\n * Testing multiline comments in string: First line\n * Second line\n *\n * Fourth line\n */\nexport type CommentWithBreaks = number;\n\n/**\n * Testing backticks in string: `backticks` and ```multiple backticks``` should work\n */\nexport type CommentWithBackticks = number;\n\n/**\n * Testing backticks and quotes in string: `backticks`, 'quotes', \"double quotes\" and ```multiple backticks``` should work\n */\nexport type CommentWithBackticksAndQuotes = number;\n\n/**\n * Testing slashes in string: \\backwards\\\\\\ and /forwards/// should work\n */\nexport type CommentWithSlashes = number;\n\n/**\n * Testing expression placeholders in string: ${expression} should work\n */\nexport type CommentWithExpressionPlaceholders = number;\n\n/**\n * Testing quotes in string: 'single quote''' and \"double quotes\"\"\" should work\n */\nexport type CommentWithQuotes = number;\n\n/**\n * Testing reserved characters in string: * inline * and ** inline ** should work\n */\nexport type CommentWithReservedCharacters = number;\n\n/**\n * This is a simple number\n */\nexport type SimpleInteger = number;\n\n/**\n * This is a simple boolean\n */\nexport type SimpleBoolean = boolean;\n\n/**\n * This is a simple string\n */\nexport type SimpleString = string;\n\n/**\n * A string with non-ascii (unicode) characters valid in typescript identifiers (æøåÆØÅöÔèÈ字符串)\n */\nexport type NonAsciiStringæøåÆøÅöôêÊ字符串 = string;\n\n/**\n * This is a simple file\n */\nexport type SimpleFile = Blob | File;\n\n/**\n * This is a simple reference\n */\nexport type SimpleReference = ModelWithString;\n\n/**\n * This is a simple string\n */\nexport type SimpleStringWithPattern = string | null;\n\n/**\n * This is a simple enum with strings\n */\nexport type EnumWithStrings = 'Success' | 'Warning' | 'Error' | '\\'Single Quote\\'' | '\"Double Quotes\"' | 'Non-ascii: øæåôöØÆÅÔÖ字符串';\n\nexport type EnumWithReplacedCharacters = '\\'Single Quote\\'' | '\"Double Quotes\"' | 'øæåôöØÆÅÔÖ字符串' | 3.1 | '';\n\n/**\n * This is a simple enum with numbers\n */\nexport type EnumWithNumbers = 1 | 2 | 3 | 1.1 | 1.2 | 1.3 | 100 | 200 | 300 | -100 | -200 | -300 | -1.1 | -1.2 | -1.3;\n\n/**\n * Success=1,Warning=2,Error=3\n */\nexport type EnumFromDescription = number;\n\n/**\n * This is a simple enum with numbers\n */\nexport type EnumWithExtensions = 200 | 400 | 500;\n\nexport type EnumWithXEnumNames = 0 | 1 | 2;\n\n/**\n * This is a simple array with numbers\n */\nexport type ArrayWithNumbers = Array<number>;\n\n/**\n * This is a simple array with booleans\n */\nexport type ArrayWithBooleans = Array<boolean>;\n\n/**\n * This is a simple array with strings\n */\nexport type ArrayWithStrings = Array<string>;\n\n/**\n * This is a simple array with references\n */\nexport type ArrayWithReferences = Array<ModelWithString>;\n\n/**\n * This is a simple array containing an array\n */\nexport type ArrayWithArray = Array<Array<ModelWithString>>;\n\n/**\n * This is a simple array with properties\n */\nexport type ArrayWithProperties = Array<{\n    '16x16'?: CamelCaseCommentWithBreaks;\n    bar?: string;\n}>;\n\n/**\n * This is a simple array with any of properties\n */\nexport type ArrayWithAnyOfProperties = Array<{\n    foo?: string;\n} | {\n    bar?: string;\n}>;\n\nexport type AnyOfAnyAndNull = {\n    data?: unknown | null;\n};\n\n/**\n * This is a simple array with any of properties\n */\nexport type AnyOfArrays = {\n    results?: Array<{\n        foo?: string;\n    } | {\n        bar?: string;\n    }>;\n};\n\n/**\n * This is a string dictionary\n */\nexport type DictionaryWithString = {\n    [key: string]: string;\n};\n\nexport type DictionaryWithPropertiesAndAdditionalProperties = {\n    foo?: number;\n    bar?: boolean;\n    [key: string]: string | number | boolean | undefined;\n};\n\n/**\n * This is a string reference\n */\nexport type DictionaryWithReference = {\n    [key: string]: ModelWithString;\n};\n\n/**\n * This is a complex dictionary\n */\nexport type DictionaryWithArray = {\n    [key: string]: Array<ModelWithString>;\n};\n\n/**\n * This is a string dictionary\n */\nexport type DictionaryWithDictionary = {\n    [key: string]: {\n        [key: string]: string;\n    };\n};\n\n/**\n * This is a complex dictionary\n */\nexport type DictionaryWithProperties = {\n    [key: string]: {\n        foo?: string;\n        bar?: string;\n    };\n};\n\n/**\n * This is a model with one number property\n */\nexport type ModelWithInteger = {\n    /**\n     * This is a simple number property\n     */\n    prop?: number;\n};\n\n/**\n * This is a model with one boolean property\n */\nexport type ModelWithBoolean = {\n    /**\n     * This is a simple boolean property\n     */\n    prop?: boolean;\n};\n\n/**\n * This is a model with one string property\n */\nexport type ModelWithString = {\n    /**\n     * This is a simple string property\n     */\n    prop?: string;\n};\n\n/**\n * This is a model with one string property\n */\nexport type ModelWithStringError = {\n    /**\n     * This is a simple string property\n     */\n    prop?: string;\n};\n\n/**\n * `Comment` or `VoiceComment`. The JSON object for adding voice comments to tickets is different. See [Adding voice comments to tickets](/documentation/ticketing/managing-tickets/adding-voice-comments-to-tickets)\n */\nexport type ModelFromZendesk = string;\n\n/**\n * This is a model with one string property\n */\nexport type ModelWithNullableString = {\n    /**\n     * This is a simple string property\n     */\n    nullableProp1?: string | null;\n    /**\n     * This is a simple string property\n     */\n    nullableRequiredProp1: string | null;\n    /**\n     * This is a simple string property\n     */\n    nullableProp2?: string | null;\n    /**\n     * This is a simple string property\n     */\n    nullableRequiredProp2: string | null;\n    /**\n     * This is a simple enum with strings\n     */\n    'foo_bar-enum'?: 'Success' | 'Warning' | 'Error' | 'ØÆÅ字符串';\n};\n\n/**\n * This is a model with one enum\n */\nexport type ModelWithEnum = {\n    /**\n     * This is a simple enum with strings\n     */\n    'foo_bar-enum'?: 'Success' | 'Warning' | 'Error' | 'ØÆÅ字符串';\n    /**\n     * These are the HTTP error code enums\n     */\n    statusCode?: '100' | '200 FOO' | '300 FOO_BAR' | '400 foo-bar' | '500 foo.bar' | '600 foo&bar';\n    /**\n     * Simple boolean enum\n     */\n    bool?: true;\n};\n\n/**\n * This is a model with one enum with escaped name\n */\nexport type ModelWithEnumWithHyphen = {\n    /**\n     * Foo-Bar-Baz-Qux\n     */\n    'foo-bar-baz-qux'?: '3.0';\n};\n\n/**\n * This is a model with one enum\n */\nexport type ModelWithEnumFromDescription = {\n    /**\n     * Success=1,Warning=2,Error=3\n     */\n    test?: number;\n};\n\n/**\n * This is a model with nested enums\n */\nexport type ModelWithNestedEnums = {\n    dictionaryWithEnum?: {\n        [key: string]: 'Success' | 'Warning' | 'Error';\n    };\n    dictionaryWithEnumFromDescription?: {\n        [key: string]: number;\n    };\n    arrayWithEnum?: Array<'Success' | 'Warning' | 'Error'>;\n    arrayWithDescription?: Array<number>;\n    /**\n     * This is a simple enum with strings\n     */\n    'foo_bar-enum'?: 'Success' | 'Warning' | 'Error' | 'ØÆÅ字符串';\n};\n\n/**\n * This is a model with one property containing a reference\n */\nexport type ModelWithReference = {\n    prop?: ModelWithProperties;\n};\n\n/**\n * This is a model with one property containing an array\n */\nexport type ModelWithArrayReadOnlyAndWriteOnly = {\n    prop?: Array<ModelWithReadOnlyAndWriteOnly>;\n    propWithFile?: Array<Blob | File>;\n    propWithNumber?: Array<number>;\n};\n\n/**\n * This is a model with one property containing an array\n */\nexport type ModelWithArray = {\n    prop?: Array<ModelWithString>;\n    propWithFile?: Array<Blob | File>;\n    propWithNumber?: Array<number>;\n};\n\n/**\n * This is a model with one property containing a dictionary\n */\nexport type ModelWithDictionary = {\n    prop?: {\n        [key: string]: string;\n    };\n};\n\n/**\n * This is a deprecated model with a deprecated property\n *\n * @deprecated\n */\nexport type DeprecatedModel = {\n    /**\n     * This is a deprecated property\n     *\n     * @deprecated\n     */\n    prop?: string;\n};\n\n/**\n * This is a model with one property containing a circular reference\n */\nexport type ModelWithCircularReference = {\n    prop?: ModelWithCircularReference;\n};\n\n/**\n * This is a model with one property with a 'one of' relationship\n */\nexport type CompositionWithOneOf = {\n    propA?: ModelWithString | ModelWithEnum | ModelWithArray | ModelWithDictionary;\n};\n\n/**\n * This is a model with one property with a 'one of' relationship where the options are not $ref\n */\nexport type CompositionWithOneOfAnonymous = {\n    propA?: {\n        propA?: string;\n    } | string | number;\n};\n\n/**\n * Circle\n */\nexport type ModelCircle = {\n    kind: string;\n    radius?: number;\n};\n\n/**\n * Square\n */\nexport type ModelSquare = {\n    kind: string;\n    sideLength?: number;\n};\n\n/**\n * This is a model with one property with a 'one of' relationship where the options are not $ref\n */\nexport type CompositionWithOneOfDiscriminator = ({\n    kind: 'circle';\n} & ModelCircle) | ({\n    kind: 'square';\n} & ModelSquare);\n\n/**\n * This is a model with one property with a 'any of' relationship\n */\nexport type CompositionWithAnyOf = {\n    propA?: ModelWithString | ModelWithEnum | ModelWithArray | ModelWithDictionary;\n};\n\n/**\n * This is a model with one property with a 'any of' relationship where the options are not $ref\n */\nexport type CompositionWithAnyOfAnonymous = {\n    propA?: {\n        propA?: string;\n    } | string | number;\n};\n\n/**\n * This is a model with nested 'any of' property with a type null\n */\nexport type CompositionWithNestedAnyAndTypeNull = {\n    propA?: Array<ModelWithDictionary | null> | Array<ModelWithArray | null>;\n};\n\nexport type _3eNum1Период = 'Bird' | 'Dog';\n\nexport type ConstValue = 'ConstValue';\n\n/**\n * This is a model with one property with a 'any of' relationship where the options are not $ref\n */\nexport type CompositionWithNestedAnyOfAndNull = {\n    /**\n     * Scopes\n     */\n    propA?: Array<_3eNum1Период | ConstValue> | null;\n};\n\n/**\n * This is a model with one property with a 'one of' relationship\n */\nexport type CompositionWithOneOfAndNullable = {\n    propA?: {\n        boolean?: boolean;\n    } | ModelWithEnum | ModelWithArray | ModelWithDictionary | null;\n};\n\n/**\n * This is a model that contains a simple dictionary within composition\n */\nexport type CompositionWithOneOfAndSimpleDictionary = {\n    propA?: boolean | {\n        [key: string]: number;\n    };\n};\n\n/**\n * This is a model that contains a dictionary of simple arrays within composition\n */\nexport type CompositionWithOneOfAndSimpleArrayDictionary = {\n    propA?: boolean | {\n        [key: string]: Array<boolean>;\n    };\n};\n\n/**\n * This is a model that contains a dictionary of complex arrays (composited) within composition\n */\nexport type CompositionWithOneOfAndComplexArrayDictionary = {\n    propA?: boolean | {\n        [key: string]: Array<number | string>;\n    };\n};\n\n/**\n * This is a model with one property with a 'all of' relationship\n */\nexport type CompositionWithAllOfAndNullable = {\n    propA?: ({\n        boolean?: boolean;\n    } & ModelWithEnum & ModelWithArray & ModelWithDictionary) | null;\n};\n\n/**\n * This is a model with one property with a 'any of' relationship\n */\nexport type CompositionWithAnyOfAndNullable = {\n    propA?: {\n        boolean?: boolean;\n    } | ModelWithEnum | ModelWithArray | ModelWithDictionary | null;\n};\n\n/**\n * This is a base model with two simple optional properties\n */\nexport type CompositionBaseModel = {\n    firstName?: string;\n    lastname?: string;\n};\n\n/**\n * This is a model that extends the base model\n */\nexport type CompositionExtendedModel = CompositionBaseModel & {\n    age: number;\n    firstName: string;\n    lastname: string;\n};\n\n/**\n * This is a model with one nested property\n */\nexport type ModelWithProperties = {\n    required: string;\n    readonly requiredAndReadOnly: string;\n    requiredAndNullable: string | null;\n    string?: string;\n    number?: number;\n    boolean?: boolean;\n    reference?: ModelWithString;\n    'property with space'?: string;\n    default?: string;\n    try?: string;\n    readonly '@namespace.string'?: string;\n    readonly '@namespace.integer'?: number;\n};\n\n/**\n * This is a model with one nested property\n */\nexport type ModelWithNestedProperties = {\n    readonly first: {\n        readonly second: {\n            readonly third: string | null;\n        } | null;\n    } | null;\n};\n\n/**\n * This is a model with duplicated properties\n */\nexport type ModelWithDuplicateProperties = {\n    prop?: ModelWithString;\n};\n\n/**\n * This is a model with ordered properties\n */\nexport type ModelWithOrderedProperties = {\n    zebra?: string;\n    apple?: string;\n    hawaii?: string;\n};\n\n/**\n * This is a model with duplicated imports\n */\nexport type ModelWithDuplicateImports = {\n    propA?: ModelWithString;\n    propB?: ModelWithString;\n    propC?: ModelWithString;\n};\n\n/**\n * This is a model that extends another model\n */\nexport type ModelThatExtends = ModelWithString & {\n    propExtendsA?: string;\n    propExtendsB?: ModelWithString;\n};\n\n/**\n * This is a model that extends another model\n */\nexport type ModelThatExtendsExtends = ModelWithString & ModelThatExtends & {\n    propExtendsC?: string;\n    propExtendsD?: ModelWithString;\n};\n\n/**\n * This is a model that contains a some patterns\n */\nexport type ModelWithPattern = {\n    key: string;\n    name: string;\n    readonly enabled?: boolean;\n    readonly modified?: string;\n    id?: string;\n    text?: string;\n    patternWithSingleQuotes?: string;\n    patternWithNewline?: string;\n    patternWithBacktick?: string;\n    patternWithUnicode?: string;\n};\n\nexport type File = {\n    /**\n     * Id\n     */\n    readonly id?: string;\n    /**\n     * Updated at\n     */\n    readonly updated_at?: string;\n    /**\n     * Created at\n     */\n    readonly created_at?: string;\n    /**\n     * Mime\n     */\n    mime: string;\n    /**\n     * File\n     */\n    readonly file?: string;\n};\n\nexport type Default = {\n    name?: string;\n};\n\nexport type Pageable = {\n    page?: number;\n    size?: number;\n    sort?: Array<string>;\n};\n\n/**\n * This is a free-form object without additionalProperties.\n */\nexport type FreeFormObjectWithoutAdditionalProperties = {\n    [key: string]: unknown;\n};\n\n/**\n * This is a free-form object with additionalProperties: true.\n */\nexport type FreeFormObjectWithAdditionalPropertiesEqTrue = {\n    [key: string]: unknown;\n};\n\n/**\n * This is a free-form object with additionalProperties: {}.\n */\nexport type FreeFormObjectWithAdditionalPropertiesEqEmptyObject = {\n    [key: string]: unknown;\n};\n\nexport type ModelWithConst = {\n    String?: 'String';\n    number?: 0;\n    null?: null;\n    withType?: 'Some string';\n};\n\n/**\n * This is a model with one property and additionalProperties: true\n */\nexport type ModelWithAdditionalPropertiesEqTrue = {\n    /**\n     * This is a simple string property\n     */\n    prop?: string;\n    [key: string]: unknown;\n};\n\nexport type NestedAnyOfArraysNullable = {\n    nullableArray?: Array<string | boolean> | null;\n};\n\nexport type CompositionWithOneOfAndProperties = ({\n    foo: SimpleParameter;\n} | {\n    bar: NonAsciiStringæøåÆøÅöôêÊ字符串;\n}) & {\n    baz: number | null;\n    qux: number;\n};\n\n/**\n * An object that can be null\n */\nexport type NullableObject = {\n    foo?: string;\n} | null;\n\n/**\n * Some % character\n */\nexport type CharactersInDescription = string;\n\nexport type ModelWithNullableObject = {\n    data?: NullableObject;\n};\n\n/**\n * An object with additional properties that can be null (anyOf ref + null)\n */\nexport type ModelWithAdditionalPropertiesRef = {\n    [key: string]: NullableObject | null;\n};\n\nexport type ModelWithOneOfEnum = {\n    foo: 'Bar';\n} | {\n    foo: 'Baz';\n} | {\n    foo: 'Qux';\n} | {\n    content: string;\n    foo: 'Quux';\n} | {\n    content: [\n        string,\n        string\n    ];\n    foo: 'Corge';\n};\n\nexport type ModelWithNestedArrayEnumsDataFoo = 'foo' | 'bar';\n\nexport type ModelWithNestedArrayEnumsDataBar = 'baz' | 'qux';\n\nexport type ModelWithNestedArrayEnumsData = {\n    foo?: Array<ModelWithNestedArrayEnumsDataFoo>;\n    bar?: Array<ModelWithNestedArrayEnumsDataBar>;\n};\n\nexport type ModelWithNestedArrayEnums = {\n    array_strings?: Array<string>;\n    data?: ModelWithNestedArrayEnumsData;\n};\n\nexport type ModelWithNestedCompositionEnums = {\n    foo?: ModelWithNestedArrayEnumsDataFoo;\n};\n\nexport type ModelWithReadOnlyAndWriteOnly = {\n    foo: string;\n    readonly bar: string;\n};\n\nexport type ModelWithConstantSizeArray = [\n    number,\n    number\n];\n\nexport type ModelWithAnyOfConstantSizeArray = [\n    number | string,\n    number | string,\n    number | string\n];\n\nexport type ModelWithPrefixItemsConstantSizeArray = [\n    ModelWithInteger,\n    number | string,\n    string\n];\n\nexport type ModelWithAnyOfConstantSizeArrayNullable = [\n    number | null | string,\n    number | null | string,\n    number | null | string\n];\n\nexport type ModelWithAnyOfConstantSizeArrayWithNSizeAndOptions = [\n    number | Import,\n    number | Import\n];\n\nexport type ModelWithAnyOfConstantSizeArrayAndIntersect = [\n    number & string,\n    number & string\n];\n\nexport type ModelWithNumericEnumUnion = {\n    /**\n     * Период\n     */\n    value?: -10 | -1 | 0 | 1 | 3 | 6 | 12;\n};\n\n/**\n * Some description with `back ticks`\n */\nexport type ModelWithBackticksInDescription = {\n    /**\n     * The template `that` should be used for parsing and importing the contents of the CSV file.\n     *\n     * <br/><p>There is one placeholder currently supported:<ul>     <li><b>${x}</b> - refers to the n-th column in the CSV file, e.g. ${1}, ${2}, ...)</li></ul><p>Example of a correct JSON template:</p>\n     * <pre>\n     * [\n     * {\n     * \"resourceType\": \"Asset\",\n     * \"identifier\": {\n     * \"name\": \"${1}\",\n     * \"domain\": {\n     * \"name\": \"${2}\",\n     * \"community\": {\n     * \"name\": \"Some Community\"\n     * }\n     * }\n     * },\n     * \"attributes\" : {\n     * \"00000000-0000-0000-0000-000000003115\" : [ {\n     * \"value\" : \"${3}\"\n     * } ],\n     * \"00000000-0000-0000-0000-000000000222\" : [ {\n     * \"value\" : \"${4}\"\n     * } ]\n     * }\n     * }\n     * ]\n     * </pre>\n     */\n    template?: string;\n};\n\nexport type ModelWithOneOfAndProperties = (SimpleParameter | NonAsciiStringæøåÆøÅöôêÊ字符串) & {\n    baz: number | null;\n    qux: number;\n};\n\n/**\n * Model used to test deduplication strategy (unused)\n */\nexport type ParameterSimpleParameterUnused = string;\n\n/**\n * Model used to test deduplication strategy\n */\nexport type PostServiceWithEmptyTagResponse = string;\n\n/**\n * Model used to test deduplication strategy\n */\nexport type PostServiceWithEmptyTagResponse2 = string;\n\n/**\n * Model used to test deduplication strategy\n */\nexport type DeleteFooData = string;\n\n/**\n * Model used to test deduplication strategy\n */\nexport type DeleteFooData2 = string;\n\n/**\n * Model with restricted keyword name\n */\nexport type Import = string;\n\nexport type SchemaWithFormRestrictedKeys = {\n    description?: string;\n    'x-enum-descriptions'?: string;\n    'x-enum-varnames'?: string;\n    'x-enumNames'?: string;\n    title?: string;\n    object?: {\n        description?: string;\n        'x-enum-descriptions'?: string;\n        'x-enum-varnames'?: string;\n        'x-enumNames'?: string;\n        title?: string;\n    };\n    array?: Array<{\n        description?: string;\n        'x-enum-descriptions'?: string;\n        'x-enum-varnames'?: string;\n        'x-enumNames'?: string;\n        title?: string;\n    }>;\n};\n\n/**\n * This schema was giving PascalCase transformations a hard time\n */\nexport type IoK8sApimachineryPkgApisMetaV1DeleteOptions = {\n    /**\n     * Must be fulfilled before a deletion is carried out. If not possible, a 409 Conflict status will be returned.\n     */\n    preconditions?: IoK8sApimachineryPkgApisMetaV1Preconditions;\n};\n\n/**\n * This schema was giving PascalCase transformations a hard time\n */\nexport type IoK8sApimachineryPkgApisMetaV1Preconditions = {\n    /**\n     * Specifies the target ResourceVersion\n     */\n    resourceVersion?: string;\n    /**\n     * Specifies the target UID.\n     */\n    uid?: string;\n};\n\nexport type AdditionalPropertiesUnknownIssue = {\n    [key: string]: string | number;\n};\n\nexport type AdditionalPropertiesUnknownIssue2 = {\n    [key: string]: string | number;\n};\n\nexport type AdditionalPropertiesUnknownIssue3 = string & {\n    entries: {\n        [key: string]: AdditionalPropertiesUnknownIssue;\n    };\n};\n\nexport type AdditionalPropertiesIntegerIssue = {\n    value: number;\n    [key: string]: number;\n};\n\nexport type OneOfAllOfIssue = ((ConstValue | GenericSchemaDuplicateIssue1SystemBoolean) & _3eNum1Период) | GenericSchemaDuplicateIssue1SystemString;\n\nexport type GenericSchemaDuplicateIssue1SystemBoolean = {\n    item?: boolean;\n    error?: string | null;\n    readonly hasError?: boolean;\n    data?: {\n        [key: string]: never;\n    };\n};\n\nexport type GenericSchemaDuplicateIssue1SystemString = {\n    item?: string | null;\n    error?: string | null;\n    readonly hasError?: boolean;\n};\n\nexport type ExternalSharedModel = {\n    id: string;\n    name?: string;\n};\n\n/**\n * This is a model with one property containing a reference\n */\nexport type ModelWithReferenceWritable = {\n    prop?: ModelWithPropertiesWritable;\n};\n\n/**\n * This is a model with one property containing an array\n */\nexport type ModelWithArrayReadOnlyAndWriteOnlyWritable = {\n    prop?: Array<ModelWithReadOnlyAndWriteOnlyWritable>;\n    propWithFile?: Array<Blob | File>;\n    propWithNumber?: Array<number>;\n};\n\n/**\n * This is a model with one nested property\n */\nexport type ModelWithPropertiesWritable = {\n    required: string;\n    requiredAndNullable: string | null;\n    string?: string;\n    number?: number;\n    boolean?: boolean;\n    reference?: ModelWithString;\n    'property with space'?: string;\n    default?: string;\n    try?: string;\n};\n\n/**\n * This is a model that contains a some patterns\n */\nexport type ModelWithPatternWritable = {\n    key: string;\n    name: string;\n    id?: string;\n    text?: string;\n    patternWithSingleQuotes?: string;\n    patternWithNewline?: string;\n    patternWithBacktick?: string;\n    patternWithUnicode?: string;\n};\n\nexport type FileWritable = {\n    /**\n     * Mime\n     */\n    mime: string;\n};\n\nexport type ModelWithReadOnlyAndWriteOnlyWritable = {\n    foo: string;\n    baz: string;\n};\n\nexport type ModelWithAnyOfConstantSizeArrayWithNSizeAndOptionsWritable = [\n    number | Import,\n    number | Import\n];\n\nexport type AdditionalPropertiesUnknownIssueWritable = {\n    [key: string]: string | number;\n};\n\nexport type OneOfAllOfIssueWritable = ((ConstValue | GenericSchemaDuplicateIssue1SystemBoolean) & _3eNum1Период) | GenericSchemaDuplicateIssue1SystemString;\n\nexport type GenericSchemaDuplicateIssue1SystemBooleanWritable = {\n    item?: boolean;\n    error?: string | null;\n    data?: {\n        [key: string]: never;\n    };\n};\n\nexport type GenericSchemaDuplicateIssue1SystemStringWritable = {\n    item?: string | null;\n    error?: string | null;\n};\n\n/**\n * This is a reusable parameter\n */\nexport type SimpleParameter = string;\n\n/**\n * Parameter with illegal characters\n */\nexport type XFooBar = ModelWithString;\n\n/**\n * A reusable request body\n */\nexport type SimpleRequestBody = ModelWithString;\n\n/**\n * A reusable request body\n */\nexport type SimpleFormData = ModelWithString;\n\nexport type ExportData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no+tag';\n};\n\nexport type PatchApiVbyApiVersionNoTagData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no+tag';\n};\n\nexport type PatchApiVbyApiVersionNoTagResponses = {\n    /**\n     * OK\n     */\n    default: unknown;\n};\n\nexport type ImportData = {\n    body: ModelWithReadOnlyAndWriteOnlyWritable | ModelWithArrayReadOnlyAndWriteOnlyWritable;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no+tag';\n};\n\nexport type ImportResponses = {\n    /**\n     * Success\n     */\n    200: ModelFromZendesk;\n    /**\n     * Default success response\n     */\n    default: ModelWithReadOnlyAndWriteOnly;\n};\n\nexport type ImportResponse = ImportResponses[keyof ImportResponses];\n\nexport type FooWowData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no+tag';\n};\n\nexport type FooWowResponses = {\n    /**\n     * OK\n     */\n    default: unknown;\n};\n\nexport type ApiVVersionODataControllerCountData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple/$count';\n};\n\nexport type ApiVVersionODataControllerCountResponses = {\n    /**\n     * Success\n     */\n    200: ModelFromZendesk;\n};\n\nexport type ApiVVersionODataControllerCountResponse = ApiVVersionODataControllerCountResponses[keyof ApiVVersionODataControllerCountResponses];\n\nexport type GetApiVbyApiVersionSimpleOperationData = {\n    body?: never;\n    path: {\n        /**\n         * foo in method\n         */\n        foo_param: string;\n    };\n    query?: never;\n    url: '/api/v{api-version}/simple:operation';\n};\n\nexport type GetApiVbyApiVersionSimpleOperationErrors = {\n    /**\n     * Default error response\n     */\n    default: ModelWithBoolean;\n};\n\nexport type GetApiVbyApiVersionSimpleOperationError = GetApiVbyApiVersionSimpleOperationErrors[keyof GetApiVbyApiVersionSimpleOperationErrors];\n\nexport type GetApiVbyApiVersionSimpleOperationResponses = {\n    /**\n     * Response is a simple number\n     */\n    200: number;\n};\n\nexport type GetApiVbyApiVersionSimpleOperationResponse = GetApiVbyApiVersionSimpleOperationResponses[keyof GetApiVbyApiVersionSimpleOperationResponses];\n\nexport type DeleteCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type GetCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type HeadCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type OptionsCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type PatchCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type PostCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type PutCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type DeleteFooData3 = {\n    body?: never;\n    headers: {\n        /**\n         * Parameter with illegal characters\n         */\n        'x-Foo-Bar': ModelWithString;\n    };\n    path: {\n        /**\n         * foo in method\n         */\n        foo_param: string;\n        /**\n         * bar in method\n         */\n        BarParam: string;\n    };\n    query?: never;\n    url: '/api/v{api-version}/foo/{foo_param}/bar/{BarParam}';\n};\n\nexport type CallWithDescriptionsData = {\n    body?: never;\n    path?: never;\n    query?: {\n        /**\n         * Testing multiline comments in string: First line\n         * Second line\n         *\n         * Fourth line\n         */\n        parameterWithBreaks?: string;\n        /**\n         * Testing backticks in string: `backticks` and ```multiple backticks``` should work\n         */\n        parameterWithBackticks?: string;\n        /**\n         * Testing slashes in string: \\backwards\\\\\\ and /forwards/// should work\n         */\n        parameterWithSlashes?: string;\n        /**\n         * Testing expression placeholders in string: ${expression} should work\n         */\n        parameterWithExpressionPlaceholders?: string;\n        /**\n         * Testing quotes in string: 'single quote''' and \"double quotes\"\"\" should work\n         */\n        parameterWithQuotes?: string;\n        /**\n         * Testing reserved characters in string: * inline * and ** inline ** should work\n         */\n        parameterWithReservedCharacters?: string;\n    };\n    url: '/api/v{api-version}/descriptions';\n};\n\nexport type DeprecatedCallData = {\n    body?: never;\n    headers: {\n        /**\n         * This parameter is deprecated\n         *\n         * @deprecated\n         */\n        parameter: DeprecatedModel | null;\n    };\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/parameters/deprecated';\n};\n\nexport type CallWithParametersData = {\n    /**\n     * This is the parameter that goes into the body\n     */\n    body: {\n        [key: string]: unknown;\n    } | null;\n    headers: {\n        /**\n         * This is the parameter that goes into the header\n         */\n        parameterHeader: string | null;\n    };\n    path: {\n        /**\n         * This is the parameter that goes into the path\n         */\n        parameterPath: string | null;\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string | null;\n    };\n    query: {\n        foo_ref_enum?: ModelWithNestedArrayEnumsDataFoo;\n        foo_all_of_enum: ModelWithNestedArrayEnumsDataFoo;\n        /**\n         * This is the parameter that goes into the query params\n         */\n        cursor: string | null;\n    };\n    url: '/api/v{api-version}/parameters/{parameterPath}';\n};\n\nexport type CallWithWeirdParameterNamesData = {\n    /**\n     * This is the parameter that goes into the body\n     */\n    body: ModelWithString | null;\n    headers: {\n        /**\n         * This is the parameter that goes into the request header\n         */\n        'parameter.header': string | null;\n    };\n    path: {\n        /**\n         * This is the parameter that goes into the path\n         */\n        'parameter.path.1'?: string;\n        /**\n         * This is the parameter that goes into the path\n         */\n        'parameter-path-2'?: string;\n        /**\n         * This is the parameter that goes into the path\n         */\n        'PARAMETER-PATH-3'?: string;\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string | null;\n    };\n    query: {\n        /**\n         * This is the parameter with a reserved keyword\n         */\n        default?: string;\n        /**\n         * This is the parameter that goes into the request query params\n         */\n        'parameter-query': string | null;\n    };\n    url: '/api/v{api-version}/parameters/{parameter.path.1}/{parameter-path-2}/{PARAMETER-PATH-3}';\n};\n\nexport type GetCallWithOptionalParamData = {\n    /**\n     * This is a required parameter\n     */\n    body: ModelWithOneOfEnum;\n    path?: never;\n    query?: {\n        /**\n         * This is an optional parameter\n         */\n        page?: number;\n    };\n    url: '/api/v{api-version}/parameters';\n};\n\nexport type PostCallWithOptionalParamData = {\n    /**\n     * This is an optional parameter\n     */\n    body?: {\n        offset?: number | null;\n    };\n    path?: never;\n    query: {\n        /**\n         * This is a required parameter\n         */\n        parameter: Pageable;\n    };\n    url: '/api/v{api-version}/parameters';\n};\n\nexport type PostCallWithOptionalParamResponses = {\n    /**\n     * Response is a simple number\n     */\n    200: number;\n    /**\n     * Success\n     */\n    204: void;\n};\n\nexport type PostCallWithOptionalParamResponse = PostCallWithOptionalParamResponses[keyof PostCallWithOptionalParamResponses];\n\nexport type PostApiVbyApiVersionRequestBodyData = {\n    /**\n     * A reusable request body\n     */\n    body?: SimpleRequestBody;\n    path?: never;\n    query?: {\n        /**\n         * This is a reusable parameter\n         */\n        parameter?: string;\n    };\n    url: '/api/v{api-version}/requestBody';\n};\n\nexport type PostApiVbyApiVersionFormDataData = {\n    /**\n     * A reusable request body\n     */\n    body?: SimpleFormData;\n    path?: never;\n    query?: {\n        /**\n         * This is a reusable parameter\n         */\n        parameter?: string;\n    };\n    url: '/api/v{api-version}/formData';\n};\n\nexport type CallWithDefaultParametersData = {\n    body?: never;\n    path?: never;\n    query?: {\n        /**\n         * This is a simple string with default value\n         */\n        parameterString?: string | null;\n        /**\n         * This is a simple number with default value\n         */\n        parameterNumber?: number | null;\n        /**\n         * This is a simple boolean with default value\n         */\n        parameterBoolean?: boolean | null;\n        /**\n         * This is a simple enum with default value\n         */\n        parameterEnum?: 'Success' | 'Warning' | 'Error';\n        /**\n         * This is a simple model with default value\n         */\n        parameterModel?: ModelWithString | null;\n    };\n    url: '/api/v{api-version}/defaults';\n};\n\nexport type CallWithDefaultOptionalParametersData = {\n    body?: never;\n    path?: never;\n    query?: {\n        /**\n         * This is a simple string that is optional with default value\n         */\n        parameterString?: string;\n        /**\n         * This is a simple number that is optional with default value\n         */\n        parameterNumber?: number;\n        /**\n         * This is a simple boolean that is optional with default value\n         */\n        parameterBoolean?: boolean;\n        /**\n         * This is a simple enum that is optional with default value\n         */\n        parameterEnum?: 'Success' | 'Warning' | 'Error';\n        /**\n         * This is a simple model that is optional with default value\n         */\n        parameterModel?: ModelWithString;\n    };\n    url: '/api/v{api-version}/defaults';\n};\n\nexport type CallToTestOrderOfParamsData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * This is a optional string with default\n         */\n        parameterOptionalStringWithDefault?: string;\n        /**\n         * This is a optional string with empty default\n         */\n        parameterOptionalStringWithEmptyDefault?: string;\n        /**\n         * This is a optional string with no default\n         */\n        parameterOptionalStringWithNoDefault?: string;\n        /**\n         * This is a string with default\n         */\n        parameterStringWithDefault: string;\n        /**\n         * This is a string with empty default\n         */\n        parameterStringWithEmptyDefault: string;\n        /**\n         * This is a string with no default\n         */\n        parameterStringWithNoDefault: string;\n        /**\n         * This is a string that can be null with no default\n         */\n        parameterStringNullableWithNoDefault?: string | null;\n        /**\n         * This is a string that can be null with default\n         */\n        parameterStringNullableWithDefault?: string | null;\n    };\n    url: '/api/v{api-version}/defaults';\n};\n\nexport type DuplicateNameData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/duplicate';\n};\n\nexport type DuplicateName2Data = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/duplicate';\n};\n\nexport type DuplicateName3Data = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/duplicate';\n};\n\nexport type DuplicateName4Data = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/duplicate';\n};\n\nexport type CallWithNoContentResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no-content';\n};\n\nexport type CallWithNoContentResponseResponses = {\n    /**\n     * Success\n     */\n    204: void;\n};\n\nexport type CallWithNoContentResponseResponse = CallWithNoContentResponseResponses[keyof CallWithNoContentResponseResponses];\n\nexport type CallWithResponseAndNoContentResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multiple-tags/response-and-no-content';\n};\n\nexport type CallWithResponseAndNoContentResponseResponses = {\n    /**\n     * Response is a simple number\n     */\n    200: number;\n    /**\n     * Success\n     */\n    204: void;\n};\n\nexport type CallWithResponseAndNoContentResponseResponse = CallWithResponseAndNoContentResponseResponses[keyof CallWithResponseAndNoContentResponseResponses];\n\nexport type DummyAData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multiple-tags/a';\n};\n\nexport type DummyAResponses = {\n    200: _400;\n};\n\nexport type DummyAResponse = DummyAResponses[keyof DummyAResponses];\n\nexport type DummyBData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multiple-tags/b';\n};\n\nexport type DummyBResponses = {\n    /**\n     * Success\n     */\n    204: void;\n};\n\nexport type DummyBResponse = DummyBResponses[keyof DummyBResponses];\n\nexport type CallWithResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/response';\n};\n\nexport type CallWithResponseResponses = {\n    default: Import;\n};\n\nexport type CallWithResponseResponse = CallWithResponseResponses[keyof CallWithResponseResponses];\n\nexport type CallWithDuplicateResponsesData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/response';\n};\n\nexport type CallWithDuplicateResponsesErrors = {\n    /**\n     * Message for 500 error\n     */\n    500: ModelWithStringError;\n    /**\n     * Message for 501 error\n     */\n    501: ModelWithStringError;\n    /**\n     * Message for 502 error\n     */\n    502: ModelWithStringError;\n    /**\n     * Message for 4XX errors\n     */\n    '4XX': DictionaryWithArray;\n    /**\n     * Default error response\n     */\n    default: ModelWithBoolean;\n};\n\nexport type CallWithDuplicateResponsesError = CallWithDuplicateResponsesErrors[keyof CallWithDuplicateResponsesErrors];\n\nexport type CallWithDuplicateResponsesResponses = {\n    /**\n     * Message for 200 response\n     */\n    200: ModelWithBoolean & ModelWithInteger;\n    /**\n     * Message for 201 response\n     */\n    201: ModelWithString;\n    /**\n     * Message for 202 response\n     */\n    202: ModelWithString;\n};\n\nexport type CallWithDuplicateResponsesResponse = CallWithDuplicateResponsesResponses[keyof CallWithDuplicateResponsesResponses];\n\nexport type CallWithResponsesData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/response';\n};\n\nexport type CallWithResponsesErrors = {\n    /**\n     * Message for 500 error\n     */\n    500: ModelWithStringError;\n    /**\n     * Message for 501 error\n     */\n    501: ModelWithStringError;\n    /**\n     * Message for 502 error\n     */\n    502: ModelWithStringError;\n    /**\n     * Message for default response\n     */\n    default: ModelWithStringError;\n};\n\nexport type CallWithResponsesError = CallWithResponsesErrors[keyof CallWithResponsesErrors];\n\nexport type CallWithResponsesResponses = {\n    /**\n     * Message for 200 response\n     */\n    200: {\n        readonly '@namespace.string'?: string;\n        readonly '@namespace.integer'?: number;\n        readonly value?: Array<ModelWithString>;\n    };\n    /**\n     * Message for 201 response\n     */\n    201: ModelThatExtends;\n    /**\n     * Message for 202 response\n     */\n    202: ModelThatExtendsExtends;\n};\n\nexport type CallWithResponsesResponse = CallWithResponsesResponses[keyof CallWithResponsesResponses];\n\nexport type CollectionFormatData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * This is an array parameter that is sent as csv format (comma-separated values)\n         */\n        parameterArrayCSV: Array<string> | null;\n        /**\n         * This is an array parameter that is sent as ssv format (space-separated values)\n         */\n        parameterArraySSV: Array<string> | null;\n        /**\n         * This is an array parameter that is sent as tsv format (tab-separated values)\n         */\n        parameterArrayTSV: Array<string> | null;\n        /**\n         * This is an array parameter that is sent as pipes format (pipe-separated values)\n         */\n        parameterArrayPipes: Array<string> | null;\n        /**\n         * This is an array parameter that is sent as multi format (multiple parameter instances)\n         */\n        parameterArrayMulti: Array<string> | null;\n    };\n    url: '/api/v{api-version}/collectionFormat';\n};\n\nexport type TypesData = {\n    body?: never;\n    path?: {\n        /**\n         * This is a number parameter\n         */\n        id?: number;\n    };\n    query: {\n        /**\n         * This is a number parameter\n         */\n        parameterNumber: number;\n        /**\n         * This is a string parameter\n         */\n        parameterString: string | null;\n        /**\n         * This is a boolean parameter\n         */\n        parameterBoolean: boolean | null;\n        /**\n         * This is an object parameter\n         */\n        parameterObject: {\n            [key: string]: unknown;\n        } | null;\n        /**\n         * This is an array parameter\n         */\n        parameterArray: Array<string> | null;\n        /**\n         * This is a dictionary parameter\n         */\n        parameterDictionary: {\n            [key: string]: unknown;\n        } | null;\n        /**\n         * This is an enum parameter\n         */\n        parameterEnum: 'Success' | 'Warning' | 'Error' | null;\n    };\n    url: '/api/v{api-version}/types';\n};\n\nexport type TypesResponses = {\n    /**\n     * Response is a simple number\n     */\n    200: number;\n    /**\n     * Response is a simple string\n     */\n    201: string;\n    /**\n     * Response is a simple boolean\n     */\n    202: boolean;\n    /**\n     * Response is a simple object\n     */\n    203: {\n        [key: string]: unknown;\n    };\n};\n\nexport type TypesResponse = TypesResponses[keyof TypesResponses];\n\nexport type UploadFileData = {\n    body: Blob | File;\n    path: {\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string | null;\n    };\n    query?: never;\n    url: '/api/v{api-version}/upload';\n};\n\nexport type UploadFileResponses = {\n    200: boolean;\n};\n\nexport type UploadFileResponse = UploadFileResponses[keyof UploadFileResponses];\n\nexport type FileResponseData = {\n    body?: never;\n    path: {\n        id: string;\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string;\n    };\n    query?: never;\n    url: '/api/v{api-version}/file/{id}';\n};\n\nexport type FileResponseResponses = {\n    /**\n     * Success\n     */\n    200: Blob | File;\n};\n\nexport type FileResponseResponse = FileResponseResponses[keyof FileResponseResponses];\n\nexport type ComplexTypesData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * Parameter containing object\n         */\n        parameterObject: {\n            first?: {\n                second?: {\n                    third?: string;\n                };\n            };\n        };\n        /**\n         * Parameter containing reference\n         */\n        parameterReference: ModelWithString;\n    };\n    url: '/api/v{api-version}/complex';\n};\n\nexport type ComplexTypesErrors = {\n    /**\n     * 400 `server` error\n     */\n    400: unknown;\n    /**\n     * 500 server error\n     */\n    500: unknown;\n};\n\nexport type ComplexTypesResponses = {\n    /**\n     * Successful response\n     */\n    200: Array<ModelWithString>;\n};\n\nexport type ComplexTypesResponse = ComplexTypesResponses[keyof ComplexTypesResponses];\n\nexport type MultipartResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multipart';\n};\n\nexport type MultipartResponseResponses = {\n    /**\n     * OK\n     */\n    200: {\n        file?: Blob | File;\n        metadata?: {\n            foo?: string;\n            bar?: string;\n        };\n    };\n};\n\nexport type MultipartResponseResponse = MultipartResponseResponses[keyof MultipartResponseResponses];\n\nexport type MultipartRequestData = {\n    body?: {\n        content?: Blob | File;\n        data?: ModelWithString | null;\n    };\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multipart';\n};\n\nexport type ComplexParamsData = {\n    body?: {\n        readonly key: string | null;\n        name: string | null;\n        enabled?: boolean;\n        type: 'Monkey' | 'Horse' | 'Bird';\n        listOfModels?: Array<ModelWithString> | null;\n        listOfStrings?: Array<string> | null;\n        parameters: ModelWithString | ModelWithEnum | ModelWithArray | ModelWithDictionary;\n        readonly user?: {\n            readonly id?: number;\n            readonly name?: string | null;\n        };\n    };\n    path: {\n        id: number;\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string;\n    };\n    query?: never;\n    url: '/api/v{api-version}/complex/{id}';\n};\n\nexport type ComplexParamsResponses = {\n    /**\n     * Success\n     */\n    200: ModelWithString;\n};\n\nexport type ComplexParamsResponse = ComplexParamsResponses[keyof ComplexParamsResponses];\n\nexport type CallWithResultFromHeaderData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/header';\n};\n\nexport type CallWithResultFromHeaderErrors = {\n    /**\n     * 400 server error\n     */\n    400: unknown;\n    /**\n     * 500 server error\n     */\n    500: unknown;\n};\n\nexport type CallWithResultFromHeaderResponses = {\n    /**\n     * Successful response\n     */\n    200: unknown;\n};\n\nexport type TestErrorCodeData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * Status code to return\n         */\n        status: number;\n    };\n    url: '/api/v{api-version}/error';\n};\n\nexport type TestErrorCodeErrors = {\n    /**\n     * Custom message: Internal Server Error\n     */\n    500: unknown;\n    /**\n     * Custom message: Not Implemented\n     */\n    501: unknown;\n    /**\n     * Custom message: Bad Gateway\n     */\n    502: unknown;\n    /**\n     * Custom message: Service Unavailable\n     */\n    503: unknown;\n};\n\nexport type TestErrorCodeResponses = {\n    /**\n     * Custom message: Successful response\n     */\n    200: unknown;\n};\n\nexport type NonAsciiæøåÆøÅöôêÊ字符串Data = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * Dummy input param\n         */\n        nonAsciiParamæøåÆØÅöôêÊ: number;\n    };\n    url: '/api/v{api-version}/non-ascii-æøåÆØÅöôêÊ字符串';\n};\n\nexport type NonAsciiæøåÆøÅöôêÊ字符串Responses = {\n    /**\n     * Successful response\n     */\n    200: Array<NonAsciiStringæøåÆøÅöôêÊ字符串>;\n};\n\nexport type NonAsciiæøåÆøÅöôêÊ字符串Response = NonAsciiæøåÆøÅöôêÊ字符串Responses[keyof NonAsciiæøåÆøÅöôêÊ字符串Responses];\n\nexport type PutWithFormUrlEncodedData = {\n    body: ArrayWithStrings;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/non-ascii-æøåÆØÅöôêÊ字符串';\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-fetch/clean-false/client/client.gen.ts",
    "content": "// 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 (options: RequestOptions) => {\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 url = buildUrl(opts);\n\n    return { opts, url };\n  };\n\n  const request: Client['request'] = async (options) => {\n    // @ts-expect-error\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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-fetch/clean-false/client/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type { Auth } from '../core/auth.gen';\nexport type { QuerySerializerOptions } from '../core/bodySerializer.gen';\nexport {\n  formDataBodySerializer,\n  jsonBodySerializer,\n  urlSearchParamsBodySerializer,\n} from '../core/bodySerializer.gen';\nexport { buildClientParams } from '../core/params.gen';\nexport { serializeQueryKeyValue } from '../core/queryKeySerializer.gen';\nexport { createClient } from './client.gen';\nexport type {\n  Client,\n  ClientOptions,\n  Config,\n  CreateClientConfig,\n  Options,\n  RequestOptions,\n  RequestResult,\n  ResolvedRequestOptions,\n  ResponseStyle,\n  TDataShape,\n} from './types.gen';\nexport { createConfig, mergeHeaders } from './utils.gen';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-fetch/clean-false/client/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { Auth } from '../core/auth.gen';\nimport type {\n  ServerSentEventsOptions,\n  ServerSentEventsResult,\n} from '../core/serverSentEvents.gen';\nimport type { Client as CoreClient, Config as CoreConfig } from '../core/types.gen';\nimport type { Middleware } from './utils.gen';\n\nexport type ResponseStyle = 'data' | 'fields';\n\nexport interface Config<T extends ClientOptions = ClientOptions>\n  extends Omit<RequestInit, 'body' | 'headers' | 'method'>, CoreConfig {\n  /**\n   * Base URL for all requests made by this client.\n   */\n  baseUrl?: T['baseUrl'];\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   * Please don't use the Fetch client for Next.js applications. The `next`\n   * options won't have any effect.\n   *\n   * Install {@link https://www.npmjs.com/package/@hey-api/client-next `@hey-api/client-next`} instead.\n   */\n  next?: never;\n  /**\n   * Return the response data parsed in a specified format. By default, `auto`\n   * will infer the appropriate method from the `Content-Type` response header.\n   * You can override this behavior with any of the {@link Body} methods.\n   * Select `stream` if you don't want to parse response data at all.\n   *\n   * @default 'auto'\n   */\n  parseAs?: 'arrayBuffer' | 'auto' | 'blob' | 'formData' | 'json' | 'stream' | 'text';\n  /**\n   * Should we return only data or multiple fields (data, error, response, etc.)?\n   *\n   * @default 'fields'\n   */\n  responseStyle?: ResponseStyle;\n  /**\n   * Throw an error instead of returning it in the response?\n   *\n   * @default false\n   */\n  throwOnError?: T['throwOnError'];\n}\n\nexport interface RequestOptions<\n  TData = unknown,\n  TResponseStyle extends ResponseStyle = 'fields',\n  ThrowOnError extends boolean = boolean,\n  Url extends string = string,\n>\n  extends\n    Config<{\n      responseStyle: TResponseStyle;\n      throwOnError: ThrowOnError;\n    }>,\n    Pick<\n      ServerSentEventsOptions<TData>,\n      | 'onRequest'\n      | 'onSseError'\n      | 'onSseEvent'\n      | 'sseDefaultRetryDelay'\n      | 'sseMaxRetryAttempts'\n      | 'sseMaxRetryDelay'\n    > {\n  /**\n   * Any body that you want to add to your request.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/fetch#body}\n   */\n  body?: unknown;\n  path?: Record<string, unknown>;\n  query?: Record<string, unknown>;\n  /**\n   * Security mechanism(s) to use for the request.\n   */\n  security?: ReadonlyArray<Auth>;\n  url: Url;\n}\n\nexport interface ResolvedRequestOptions<\n  TResponseStyle extends ResponseStyle = 'fields',\n  ThrowOnError extends boolean = boolean,\n  Url extends string = string,\n> extends RequestOptions<unknown, TResponseStyle, ThrowOnError, Url> {\n  serializedBody?: string;\n}\n\nexport type RequestResult<\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = boolean,\n  TResponseStyle extends ResponseStyle = 'fields',\n> = ThrowOnError extends true\n  ? Promise<\n      TResponseStyle extends 'data'\n        ? TData extends Record<string, unknown>\n          ? TData[keyof TData]\n          : TData\n        : {\n            data: TData extends Record<string, unknown> ? TData[keyof TData] : TData;\n            request: Request;\n            response: Response;\n          }\n    >\n  : Promise<\n      TResponseStyle extends 'data'\n        ? (TData extends Record<string, unknown> ? TData[keyof TData] : TData) | undefined\n        : (\n            | {\n                data: TData extends Record<string, unknown> ? TData[keyof TData] : TData;\n                error: undefined;\n              }\n            | {\n                data: undefined;\n                error: TError extends Record<string, unknown> ? TError[keyof TError] : TError;\n              }\n          ) & {\n            request: Request;\n            response: Response;\n          }\n    >;\n\nexport interface ClientOptions {\n  baseUrl?: string;\n  responseStyle?: ResponseStyle;\n  throwOnError?: boolean;\n}\n\ntype MethodFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'>,\n) => RequestResult<TData, TError, ThrowOnError, TResponseStyle>;\n\ntype SseFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'>,\n) => Promise<ServerSentEventsResult<TData, TError>>;\n\ntype RequestFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'> &\n    Pick<Required<RequestOptions<TData, TResponseStyle, ThrowOnError>>, 'method'>,\n) => RequestResult<TData, TError, ThrowOnError, TResponseStyle>;\n\ntype BuildUrlFn = <\n  TData extends {\n    body?: unknown;\n    path?: Record<string, unknown>;\n    query?: Record<string, unknown>;\n    url: string;\n  },\n>(\n  options: TData & Options<TData>,\n) => string;\n\nexport type Client = CoreClient<RequestFn, Config, MethodFn, BuildUrlFn, SseFn> & {\n  interceptors: Middleware<Request, Response, unknown, ResolvedRequestOptions>;\n};\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 = ClientOptions> = (\n  override?: Config<ClientOptions & T>,\n) => Config<Required<ClientOptions> & T>;\n\nexport interface TDataShape {\n  body?: unknown;\n  headers?: unknown;\n  path?: unknown;\n  query?: unknown;\n  url: string;\n}\n\ntype OmitKeys<T, K> = Pick<T, Exclude<keyof T, K>>;\n\nexport type Options<\n  TData extends TDataShape = TDataShape,\n  ThrowOnError extends boolean = boolean,\n  TResponse = unknown,\n  TResponseStyle extends ResponseStyle = 'fields',\n> = OmitKeys<\n  RequestOptions<TResponse, TResponseStyle, ThrowOnError>,\n  'body' | 'path' | 'query' | 'url'\n> &\n  ([TData] extends [never] ? unknown : Omit<TData, 'url'>);\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-fetch/clean-false/client/utils.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-fetch/clean-false/client.gen.ts",
    "content": "// 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: 'http://localhost:3000/base' }));\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-fetch/clean-false/core/auth.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-fetch/clean-false/core/bodySerializer.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-fetch/clean-false/core/params.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-fetch/clean-false/core/pathSerializer.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-fetch/clean-false/core/queryKeySerializer.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\n/**\n * JSON-friendly union that mirrors what Pinia Colada can hash.\n */\nexport type JsonValue =\n  | null\n  | string\n  | number\n  | boolean\n  | JsonValue[]\n  | { [key: string]: JsonValue };\n\n/**\n * Replacer that converts non-JSON values (bigint, Date, etc.) to safe substitutes.\n */\nexport const queryKeyJsonReplacer = (_key: string, value: unknown) => {\n  if (value === undefined || typeof value === 'function' || typeof value === 'symbol') {\n    return undefined;\n  }\n  if (typeof value === 'bigint') {\n    return value.toString();\n  }\n  if (value instanceof Date) {\n    return value.toISOString();\n  }\n  return value;\n};\n\n/**\n * Safely stringifies a value and parses it back into a JsonValue.\n */\nexport const stringifyToJsonValue = (input: unknown): JsonValue | undefined => {\n  try {\n    const json = JSON.stringify(input, queryKeyJsonReplacer);\n    if (json === undefined) {\n      return undefined;\n    }\n    return JSON.parse(json) as JsonValue;\n  } catch {\n    return undefined;\n  }\n};\n\n/**\n * Detects plain objects (including objects with a null prototype).\n */\nconst isPlainObject = (value: unknown): value is Record<string, unknown> => {\n  if (value === null || typeof value !== 'object') {\n    return false;\n  }\n  const prototype = Object.getPrototypeOf(value as object);\n  return prototype === Object.prototype || prototype === null;\n};\n\n/**\n * Turns URLSearchParams into a sorted JSON object for deterministic keys.\n */\nconst serializeSearchParams = (params: URLSearchParams): JsonValue => {\n  const entries = Array.from(params.entries()).sort(([a], [b]) => a.localeCompare(b));\n  const result: Record<string, JsonValue> = {};\n\n  for (const [key, value] of entries) {\n    const existing = result[key];\n    if (existing === undefined) {\n      result[key] = value;\n      continue;\n    }\n\n    if (Array.isArray(existing)) {\n      (existing as string[]).push(value);\n    } else {\n      result[key] = [existing, value];\n    }\n  }\n\n  return result;\n};\n\n/**\n * Normalizes any accepted value into a JSON-friendly shape for query keys.\n */\nexport const serializeQueryKeyValue = (value: unknown): JsonValue | undefined => {\n  if (value === null) {\n    return null;\n  }\n\n  if (typeof value === 'string' || typeof value === 'number' || typeof value === 'boolean') {\n    return value;\n  }\n\n  if (value === undefined || typeof value === 'function' || typeof value === 'symbol') {\n    return undefined;\n  }\n\n  if (typeof value === 'bigint') {\n    return value.toString();\n  }\n\n  if (value instanceof Date) {\n    return value.toISOString();\n  }\n\n  if (Array.isArray(value)) {\n    return stringifyToJsonValue(value);\n  }\n\n  if (typeof URLSearchParams !== 'undefined' && value instanceof URLSearchParams) {\n    return serializeSearchParams(value);\n  }\n\n  if (isPlainObject(value)) {\n    return stringifyToJsonValue(value);\n  }\n\n  return undefined;\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-fetch/clean-false/core/serverSentEvents.gen.ts",
    "content": "// 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 const 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            // Normalize line endings: CRLF -> LF, then CR -> LF\n            buffer = buffer.replace(/\\r\\n/g, '\\n').replace(/\\r/g, '\\n');\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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-fetch/clean-false/core/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { Auth, AuthToken } from './auth.gen';\nimport type { BodySerializer, QuerySerializer, QuerySerializerOptions } from './bodySerializer.gen';\n\nexport type HttpMethod =\n  | 'connect'\n  | 'delete'\n  | 'get'\n  | 'head'\n  | 'options'\n  | 'patch'\n  | 'post'\n  | 'put'\n  | 'trace';\n\nexport type Client<\n  RequestFn = never,\n  Config = unknown,\n  MethodFn = never,\n  BuildUrlFn = never,\n  SseFn = never,\n> = {\n  /**\n   * Returns the final request URL.\n   */\n  buildUrl: BuildUrlFn;\n  getConfig: () => Config;\n  request: RequestFn;\n  setConfig: (config: Config) => Config;\n} & {\n  [K in HttpMethod]: MethodFn;\n} & ([SseFn] extends [never] ? { sse?: never } : { sse: { [K in HttpMethod]: SseFn } });\n\nexport interface Config {\n  /**\n   * Auth token or a function returning auth token. The resolved value will be\n   * added to the request payload as defined by its `security` array.\n   */\n  auth?: ((auth: Auth) => Promise<AuthToken> | AuthToken) | AuthToken;\n  /**\n   * A function for serializing request body parameter. By default,\n   * {@link JSON.stringify()} will be used.\n   */\n  bodySerializer?: BodySerializer | null;\n  /**\n   * An object containing any HTTP headers that you want to pre-populate your\n   * `Headers` object with.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/Headers/Headers#init See more}\n   */\n  headers?:\n    | RequestInit['headers']\n    | Record<\n        string,\n        string | number | boolean | (string | number | boolean)[] | null | undefined | unknown\n      >;\n  /**\n   * The request method.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/fetch#method See more}\n   */\n  method?: Uppercase<HttpMethod>;\n  /**\n   * A function for serializing request query parameters. By default, arrays\n   * will be exploded in form style, objects will be exploded in deepObject\n   * style, and reserved characters are percent-encoded.\n   *\n   * This method will have no effect if the native `paramsSerializer()` Axios\n   * API function is used.\n   *\n   * {@link https://swagger.io/docs/specification/serialization/#query View examples}\n   */\n  querySerializer?: QuerySerializer | QuerySerializerOptions;\n  /**\n   * A function validating request data. This is useful if you want to ensure\n   * the request conforms to the desired shape, so it can be safely sent to\n   * the server.\n   */\n  requestValidator?: (data: unknown) => Promise<unknown>;\n  /**\n   * A function transforming response data before it's returned. This is useful\n   * for post-processing data, e.g. converting ISO strings into Date objects.\n   */\n  responseTransformer?: (data: unknown) => Promise<unknown>;\n  /**\n   * A function validating response data. This is useful if you want to ensure\n   * the response conforms to the desired shape, so it can be safely passed to\n   * the transformers and returned to the user.\n   */\n  responseValidator?: (data: unknown) => Promise<unknown>;\n}\n\ntype IsExactlyNeverOrNeverUndefined<T> = [T] extends [never]\n  ? true\n  : [T] extends [never | undefined]\n    ? [undefined] extends [T]\n      ? false\n      : true\n    : false;\n\nexport type OmitNever<T extends Record<string, unknown>> = {\n  [K in keyof T as IsExactlyNeverOrNeverUndefined<T[K]> extends true ? never : K]: T[K];\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-fetch/clean-false/core/utils.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-fetch/clean-false/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport { apiVVersionODataControllerCount, callToTestOrderOfParams, callWithDefaultOptionalParameters, callWithDefaultParameters, callWithDescriptions, callWithDuplicateResponses, callWithNoContentResponse, callWithParameters, callWithResponse, callWithResponseAndNoContentResponse, callWithResponses, callWithResultFromHeader, callWithWeirdParameterNames, collectionFormat, complexParams, complexTypes, deleteCallWithoutParametersAndResponse, deleteFoo, deprecatedCall, dummyA, dummyB, duplicateName, duplicateName2, duplicateName3, duplicateName4, export_, fileResponse, fooWow, getApiVbyApiVersionSimpleOperation, getCallWithOptionalParam, getCallWithoutParametersAndResponse, headCallWithoutParametersAndResponse, import_, multipartRequest, multipartResponse, nonAsciiæøåÆøÅöôêÊ字符串, type Options, optionsCallWithoutParametersAndResponse, patchApiVbyApiVersionNoTag, patchCallWithoutParametersAndResponse, postApiVbyApiVersionFormData, postApiVbyApiVersionRequestBody, postCallWithOptionalParam, postCallWithoutParametersAndResponse, putCallWithoutParametersAndResponse, putWithFormUrlEncoded, testErrorCode, types, uploadFile } from './sdk.gen';\nexport type { _3eNum1Период, _400, AdditionalPropertiesIntegerIssue, AdditionalPropertiesUnknownIssue, AdditionalPropertiesUnknownIssue2, AdditionalPropertiesUnknownIssue3, AdditionalPropertiesUnknownIssueWritable, AnyOfAnyAndNull, AnyOfArrays, ApiVVersionODataControllerCountData, ApiVVersionODataControllerCountResponse, ApiVVersionODataControllerCountResponses, ArrayWithAnyOfProperties, ArrayWithArray, ArrayWithBooleans, ArrayWithNumbers, ArrayWithProperties, ArrayWithReferences, ArrayWithStrings, CallToTestOrderOfParamsData, CallWithDefaultOptionalParametersData, CallWithDefaultParametersData, CallWithDescriptionsData, CallWithDuplicateResponsesData, CallWithDuplicateResponsesError, CallWithDuplicateResponsesErrors, CallWithDuplicateResponsesResponse, CallWithDuplicateResponsesResponses, CallWithNoContentResponseData, CallWithNoContentResponseResponse, CallWithNoContentResponseResponses, CallWithParametersData, CallWithResponseAndNoContentResponseData, CallWithResponseAndNoContentResponseResponse, CallWithResponseAndNoContentResponseResponses, CallWithResponseData, CallWithResponseResponse, CallWithResponseResponses, CallWithResponsesData, CallWithResponsesError, CallWithResponsesErrors, CallWithResponsesResponse, CallWithResponsesResponses, CallWithResultFromHeaderData, CallWithResultFromHeaderErrors, CallWithResultFromHeaderResponses, CallWithWeirdParameterNamesData, CamelCaseCommentWithBreaks, CharactersInDescription, ClientOptions, CollectionFormatData, CommentWithBackticks, CommentWithBackticksAndQuotes, CommentWithBreaks, CommentWithExpressionPlaceholders, CommentWithQuotes, CommentWithReservedCharacters, CommentWithSlashes, ComplexParamsData, ComplexParamsResponse, ComplexParamsResponses, ComplexTypesData, ComplexTypesErrors, ComplexTypesResponse, ComplexTypesResponses, CompositionBaseModel, CompositionExtendedModel, CompositionWithAllOfAndNullable, CompositionWithAnyOf, CompositionWithAnyOfAndNullable, CompositionWithAnyOfAnonymous, CompositionWithNestedAnyAndTypeNull, CompositionWithNestedAnyOfAndNull, CompositionWithOneOf, CompositionWithOneOfAndComplexArrayDictionary, CompositionWithOneOfAndNullable, CompositionWithOneOfAndProperties, CompositionWithOneOfAndSimpleArrayDictionary, CompositionWithOneOfAndSimpleDictionary, CompositionWithOneOfAnonymous, CompositionWithOneOfDiscriminator, ConstValue, Default, DeleteCallWithoutParametersAndResponseData, DeleteFooData, DeleteFooData2, DeleteFooData3, DeprecatedCallData, DeprecatedModel, DictionaryWithArray, DictionaryWithDictionary, DictionaryWithProperties, DictionaryWithPropertiesAndAdditionalProperties, DictionaryWithReference, DictionaryWithString, DummyAData, DummyAResponse, DummyAResponses, DummyBData, DummyBResponse, DummyBResponses, DuplicateName2Data, DuplicateName3Data, DuplicateName4Data, DuplicateNameData, EnumFromDescription, EnumWithExtensions, EnumWithNumbers, EnumWithReplacedCharacters, EnumWithStrings, EnumWithXEnumNames, ExportData, ExternalRefA, ExternalRefB, ExternalSharedModel, File, FileResponseData, FileResponseResponse, FileResponseResponses, FileWritable, FooWowData, FooWowResponses, FreeFormObjectWithAdditionalPropertiesEqEmptyObject, FreeFormObjectWithAdditionalPropertiesEqTrue, FreeFormObjectWithoutAdditionalProperties, GenericSchemaDuplicateIssue1SystemBoolean, GenericSchemaDuplicateIssue1SystemBooleanWritable, GenericSchemaDuplicateIssue1SystemString, GenericSchemaDuplicateIssue1SystemStringWritable, GetApiVbyApiVersionSimpleOperationData, GetApiVbyApiVersionSimpleOperationError, GetApiVbyApiVersionSimpleOperationErrors, GetApiVbyApiVersionSimpleOperationResponse, GetApiVbyApiVersionSimpleOperationResponses, GetCallWithOptionalParamData, GetCallWithoutParametersAndResponseData, HeadCallWithoutParametersAndResponseData, Import, ImportData, ImportResponse, ImportResponses, IoK8sApimachineryPkgApisMetaV1DeleteOptions, IoK8sApimachineryPkgApisMetaV1Preconditions, ModelCircle, ModelFromZendesk, ModelSquare, ModelThatExtends, ModelThatExtendsExtends, ModelWithAdditionalPropertiesEqTrue, ModelWithAdditionalPropertiesRef, ModelWithAnyOfConstantSizeArray, ModelWithAnyOfConstantSizeArrayAndIntersect, ModelWithAnyOfConstantSizeArrayNullable, ModelWithAnyOfConstantSizeArrayWithNSizeAndOptions, ModelWithAnyOfConstantSizeArrayWithNSizeAndOptionsWritable, ModelWithArray, ModelWithArrayReadOnlyAndWriteOnly, ModelWithArrayReadOnlyAndWriteOnlyWritable, ModelWithBackticksInDescription, ModelWithBoolean, ModelWithCircularReference, ModelWithConst, ModelWithConstantSizeArray, ModelWithDictionary, ModelWithDuplicateImports, ModelWithDuplicateProperties, ModelWithEnum, ModelWithEnumFromDescription, ModelWithEnumWithHyphen, ModelWithInteger, ModelWithNestedArrayEnums, ModelWithNestedArrayEnumsData, ModelWithNestedArrayEnumsDataBar, ModelWithNestedArrayEnumsDataFoo, ModelWithNestedCompositionEnums, ModelWithNestedEnums, ModelWithNestedProperties, ModelWithNullableObject, ModelWithNullableString, ModelWithNumericEnumUnion, ModelWithOneOfAndProperties, ModelWithOneOfEnum, ModelWithOrderedProperties, ModelWithPattern, ModelWithPatternWritable, ModelWithPrefixItemsConstantSizeArray, ModelWithProperties, ModelWithPropertiesWritable, ModelWithReadOnlyAndWriteOnly, ModelWithReadOnlyAndWriteOnlyWritable, ModelWithReference, ModelWithReferenceWritable, ModelWithString, ModelWithStringError, MultipartRequestData, MultipartResponseData, MultipartResponseResponse, MultipartResponseResponses, NestedAnyOfArraysNullable, NonAsciiæøåÆøÅöôêÊ字符串Data, NonAsciiæøåÆøÅöôêÊ字符串Response, NonAsciiæøåÆøÅöôêÊ字符串Responses, NonAsciiStringæøåÆøÅöôêÊ字符串, NullableObject, OneOfAllOfIssue, OneOfAllOfIssueWritable, OptionsCallWithoutParametersAndResponseData, Pageable, ParameterSimpleParameterUnused, PatchApiVbyApiVersionNoTagData, PatchApiVbyApiVersionNoTagResponses, PatchCallWithoutParametersAndResponseData, PostApiVbyApiVersionFormDataData, PostApiVbyApiVersionRequestBodyData, PostCallWithOptionalParamData, PostCallWithOptionalParamResponse, PostCallWithOptionalParamResponses, PostCallWithoutParametersAndResponseData, PostServiceWithEmptyTagResponse, PostServiceWithEmptyTagResponse2, PutCallWithoutParametersAndResponseData, PutWithFormUrlEncodedData, SchemaWithFormRestrictedKeys, SimpleBoolean, SimpleFile, SimpleFormData, SimpleInteger, SimpleParameter, SimpleReference, SimpleRequestBody, SimpleString, SimpleStringWithPattern, TestErrorCodeData, TestErrorCodeErrors, TestErrorCodeResponses, TypesData, TypesResponse, TypesResponses, UploadFileData, UploadFileResponse, UploadFileResponses, XFooBar } from './types.gen';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-fetch/clean-false/sdk.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport { type Client, formDataBodySerializer, type Options as Options2, type TDataShape, urlSearchParamsBodySerializer } from './client';\nimport { client } from './client.gen';\nimport type { ApiVVersionODataControllerCountData, ApiVVersionODataControllerCountResponses, CallToTestOrderOfParamsData, CallWithDefaultOptionalParametersData, CallWithDefaultParametersData, CallWithDescriptionsData, CallWithDuplicateResponsesData, CallWithDuplicateResponsesErrors, CallWithDuplicateResponsesResponses, CallWithNoContentResponseData, CallWithNoContentResponseResponses, CallWithParametersData, CallWithResponseAndNoContentResponseData, CallWithResponseAndNoContentResponseResponses, CallWithResponseData, CallWithResponseResponses, CallWithResponsesData, CallWithResponsesErrors, CallWithResponsesResponses, CallWithResultFromHeaderData, CallWithResultFromHeaderErrors, CallWithResultFromHeaderResponses, CallWithWeirdParameterNamesData, CollectionFormatData, ComplexParamsData, ComplexParamsResponses, ComplexTypesData, ComplexTypesErrors, ComplexTypesResponses, DeleteCallWithoutParametersAndResponseData, DeleteFooData3, DeprecatedCallData, DummyAData, DummyAResponses, DummyBData, DummyBResponses, DuplicateName2Data, DuplicateName3Data, DuplicateName4Data, DuplicateNameData, ExportData, FileResponseData, FileResponseResponses, FooWowData, FooWowResponses, GetApiVbyApiVersionSimpleOperationData, GetApiVbyApiVersionSimpleOperationErrors, GetApiVbyApiVersionSimpleOperationResponses, GetCallWithOptionalParamData, GetCallWithoutParametersAndResponseData, HeadCallWithoutParametersAndResponseData, ImportData, ImportResponses, MultipartRequestData, MultipartResponseData, MultipartResponseResponses, NonAsciiæøåÆøÅöôêÊ字符串Data, NonAsciiæøåÆøÅöôêÊ字符串Responses, OptionsCallWithoutParametersAndResponseData, PatchApiVbyApiVersionNoTagData, PatchApiVbyApiVersionNoTagResponses, PatchCallWithoutParametersAndResponseData, PostApiVbyApiVersionFormDataData, PostApiVbyApiVersionRequestBodyData, PostCallWithOptionalParamData, PostCallWithOptionalParamResponses, PostCallWithoutParametersAndResponseData, PutCallWithoutParametersAndResponseData, PutWithFormUrlEncodedData, TestErrorCodeData, TestErrorCodeErrors, TestErrorCodeResponses, TypesData, TypesResponses, UploadFileData, UploadFileResponses } from './types.gen';\n\nexport type Options<TData extends TDataShape = TDataShape, ThrowOnError extends boolean = boolean> = Options2<TData, ThrowOnError> & {\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\nexport const export_ = <ThrowOnError extends boolean = false>(options?: Options<ExportData, ThrowOnError>) => (options?.client ?? client).get<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/no+tag', ...options });\n\nexport const patchApiVbyApiVersionNoTag = <ThrowOnError extends boolean = false>(options?: Options<PatchApiVbyApiVersionNoTagData, ThrowOnError>) => (options?.client ?? client).patch<PatchApiVbyApiVersionNoTagResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/no+tag', ...options });\n\nexport const import_ = <ThrowOnError extends boolean = false>(options: Options<ImportData, ThrowOnError>) => (options.client ?? client).post<ImportResponses, unknown, ThrowOnError>({\n    url: '/api/v{api-version}/no+tag',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options.headers\n    }\n});\n\nexport const fooWow = <ThrowOnError extends boolean = false>(options?: Options<FooWowData, ThrowOnError>) => (options?.client ?? client).put<FooWowResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/no+tag', ...options });\n\nexport const apiVVersionODataControllerCount = <ThrowOnError extends boolean = false>(options?: Options<ApiVVersionODataControllerCountData, ThrowOnError>) => (options?.client ?? client).get<ApiVVersionODataControllerCountResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple/$count', ...options });\n\nexport const getApiVbyApiVersionSimpleOperation = <ThrowOnError extends boolean = false>(options: Options<GetApiVbyApiVersionSimpleOperationData, ThrowOnError>) => (options.client ?? client).get<GetApiVbyApiVersionSimpleOperationResponses, GetApiVbyApiVersionSimpleOperationErrors, ThrowOnError>({ url: '/api/v{api-version}/simple:operation', ...options });\n\nexport const deleteCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<DeleteCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).delete<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const getCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<GetCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).get<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const headCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<HeadCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).head<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const optionsCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<OptionsCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).options<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const patchCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<PatchCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).patch<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const postCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<PostCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).post<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const putCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<PutCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).put<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const deleteFoo = <ThrowOnError extends boolean = false>(options: Options<DeleteFooData3, ThrowOnError>) => (options.client ?? client).delete<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/foo/{foo_param}/bar/{BarParam}', ...options });\n\nexport const callWithDescriptions = <ThrowOnError extends boolean = false>(options?: Options<CallWithDescriptionsData, ThrowOnError>) => (options?.client ?? client).post<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/descriptions', ...options });\n\n/**\n * @deprecated\n */\nexport const deprecatedCall = <ThrowOnError extends boolean = false>(options: Options<DeprecatedCallData, ThrowOnError>) => (options.client ?? client).post<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/parameters/deprecated', ...options });\n\nexport const callWithParameters = <ThrowOnError extends boolean = false>(options: Options<CallWithParametersData, ThrowOnError>) => (options.client ?? client).post<unknown, unknown, ThrowOnError>({\n    url: '/api/v{api-version}/parameters/{parameterPath}',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options.headers\n    }\n});\n\nexport const callWithWeirdParameterNames = <ThrowOnError extends boolean = false>(options: Options<CallWithWeirdParameterNamesData, ThrowOnError>) => (options.client ?? client).post<unknown, unknown, ThrowOnError>({\n    url: '/api/v{api-version}/parameters/{parameter.path.1}/{parameter-path-2}/{PARAMETER-PATH-3}',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options.headers\n    }\n});\n\nexport const getCallWithOptionalParam = <ThrowOnError extends boolean = false>(options: Options<GetCallWithOptionalParamData, ThrowOnError>) => (options.client ?? client).get<unknown, unknown, ThrowOnError>({\n    url: '/api/v{api-version}/parameters',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options.headers\n    }\n});\n\nexport const postCallWithOptionalParam = <ThrowOnError extends boolean = false>(options: Options<PostCallWithOptionalParamData, ThrowOnError>) => (options.client ?? client).post<PostCallWithOptionalParamResponses, unknown, ThrowOnError>({\n    url: '/api/v{api-version}/parameters',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options.headers\n    }\n});\n\nexport const postApiVbyApiVersionRequestBody = <ThrowOnError extends boolean = false>(options?: Options<PostApiVbyApiVersionRequestBodyData, ThrowOnError>) => (options?.client ?? client).post<unknown, unknown, ThrowOnError>({\n    url: '/api/v{api-version}/requestBody',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options?.headers\n    }\n});\n\nexport const postApiVbyApiVersionFormData = <ThrowOnError extends boolean = false>(options?: Options<PostApiVbyApiVersionFormDataData, ThrowOnError>) => (options?.client ?? client).post<unknown, unknown, ThrowOnError>({\n    ...formDataBodySerializer,\n    url: '/api/v{api-version}/formData',\n    ...options,\n    headers: {\n        'Content-Type': null,\n        ...options?.headers\n    }\n});\n\nexport const callWithDefaultParameters = <ThrowOnError extends boolean = false>(options?: Options<CallWithDefaultParametersData, ThrowOnError>) => (options?.client ?? client).get<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/defaults', ...options });\n\nexport const callWithDefaultOptionalParameters = <ThrowOnError extends boolean = false>(options?: Options<CallWithDefaultOptionalParametersData, ThrowOnError>) => (options?.client ?? client).post<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/defaults', ...options });\n\nexport const callToTestOrderOfParams = <ThrowOnError extends boolean = false>(options: Options<CallToTestOrderOfParamsData, ThrowOnError>) => (options.client ?? client).put<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/defaults', ...options });\n\nexport const duplicateName = <ThrowOnError extends boolean = false>(options?: Options<DuplicateNameData, ThrowOnError>) => (options?.client ?? client).delete<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/duplicate', ...options });\n\nexport const duplicateName2 = <ThrowOnError extends boolean = false>(options?: Options<DuplicateName2Data, ThrowOnError>) => (options?.client ?? client).get<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/duplicate', ...options });\n\nexport const duplicateName3 = <ThrowOnError extends boolean = false>(options?: Options<DuplicateName3Data, ThrowOnError>) => (options?.client ?? client).post<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/duplicate', ...options });\n\nexport const duplicateName4 = <ThrowOnError extends boolean = false>(options?: Options<DuplicateName4Data, ThrowOnError>) => (options?.client ?? client).put<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/duplicate', ...options });\n\nexport const callWithNoContentResponse = <ThrowOnError extends boolean = false>(options?: Options<CallWithNoContentResponseData, ThrowOnError>) => (options?.client ?? client).get<CallWithNoContentResponseResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/no-content', ...options });\n\nexport const callWithResponseAndNoContentResponse = <ThrowOnError extends boolean = false>(options?: Options<CallWithResponseAndNoContentResponseData, ThrowOnError>) => (options?.client ?? client).get<CallWithResponseAndNoContentResponseResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/multiple-tags/response-and-no-content', ...options });\n\nexport const dummyA = <ThrowOnError extends boolean = false>(options?: Options<DummyAData, ThrowOnError>) => (options?.client ?? client).get<DummyAResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/multiple-tags/a', ...options });\n\nexport const dummyB = <ThrowOnError extends boolean = false>(options?: Options<DummyBData, ThrowOnError>) => (options?.client ?? client).get<DummyBResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/multiple-tags/b', ...options });\n\nexport const callWithResponse = <ThrowOnError extends boolean = false>(options?: Options<CallWithResponseData, ThrowOnError>) => (options?.client ?? client).get<CallWithResponseResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/response', ...options });\n\nexport const callWithDuplicateResponses = <ThrowOnError extends boolean = false>(options?: Options<CallWithDuplicateResponsesData, ThrowOnError>) => (options?.client ?? client).post<CallWithDuplicateResponsesResponses, CallWithDuplicateResponsesErrors, ThrowOnError>({ url: '/api/v{api-version}/response', ...options });\n\nexport const callWithResponses = <ThrowOnError extends boolean = false>(options?: Options<CallWithResponsesData, ThrowOnError>) => (options?.client ?? client).put<CallWithResponsesResponses, CallWithResponsesErrors, ThrowOnError>({ url: '/api/v{api-version}/response', ...options });\n\nexport const collectionFormat = <ThrowOnError extends boolean = false>(options: Options<CollectionFormatData, ThrowOnError>) => (options.client ?? client).get<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/collectionFormat', ...options });\n\nexport const types = <ThrowOnError extends boolean = false>(options: Options<TypesData, ThrowOnError>) => (options.client ?? client).get<TypesResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/types', ...options });\n\nexport const uploadFile = <ThrowOnError extends boolean = false>(options: Options<UploadFileData, ThrowOnError>) => (options.client ?? client).post<UploadFileResponses, unknown, ThrowOnError>({\n    ...urlSearchParamsBodySerializer,\n    url: '/api/v{api-version}/upload',\n    ...options,\n    headers: {\n        'Content-Type': 'application/x-www-form-urlencoded',\n        ...options.headers\n    }\n});\n\nexport const fileResponse = <ThrowOnError extends boolean = false>(options: Options<FileResponseData, ThrowOnError>) => (options.client ?? client).get<FileResponseResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/file/{id}', ...options });\n\nexport const complexTypes = <ThrowOnError extends boolean = false>(options: Options<ComplexTypesData, ThrowOnError>) => (options.client ?? client).get<ComplexTypesResponses, ComplexTypesErrors, ThrowOnError>({\n    querySerializer: { parameters: { parameterObject: { object: { style: 'form' } } } },\n    url: '/api/v{api-version}/complex',\n    ...options\n});\n\nexport const multipartResponse = <ThrowOnError extends boolean = false>(options?: Options<MultipartResponseData, ThrowOnError>) => (options?.client ?? client).get<MultipartResponseResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/multipart', ...options });\n\nexport const multipartRequest = <ThrowOnError extends boolean = false>(options?: Options<MultipartRequestData, ThrowOnError>) => (options?.client ?? client).post<unknown, unknown, ThrowOnError>({\n    ...formDataBodySerializer,\n    url: '/api/v{api-version}/multipart',\n    ...options,\n    headers: {\n        'Content-Type': null,\n        ...options?.headers\n    }\n});\n\nexport const complexParams = <ThrowOnError extends boolean = false>(options: Options<ComplexParamsData, ThrowOnError>) => (options.client ?? client).put<ComplexParamsResponses, unknown, ThrowOnError>({\n    url: '/api/v{api-version}/complex/{id}',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json-patch+json',\n        ...options.headers\n    }\n});\n\nexport const callWithResultFromHeader = <ThrowOnError extends boolean = false>(options?: Options<CallWithResultFromHeaderData, ThrowOnError>) => (options?.client ?? client).post<CallWithResultFromHeaderResponses, CallWithResultFromHeaderErrors, ThrowOnError>({ url: '/api/v{api-version}/header', ...options });\n\nexport const testErrorCode = <ThrowOnError extends boolean = false>(options: Options<TestErrorCodeData, ThrowOnError>) => (options.client ?? client).post<TestErrorCodeResponses, TestErrorCodeErrors, ThrowOnError>({ url: '/api/v{api-version}/error', ...options });\n\nexport const nonAsciiæøåÆøÅöôêÊ字符串 = <ThrowOnError extends boolean = false>(options: Options<NonAsciiæøåÆøÅöôêÊ字符串Data, ThrowOnError>) => (options.client ?? client).post<NonAsciiæøåÆøÅöôêÊ字符串Responses, unknown, ThrowOnError>({ url: '/api/v{api-version}/non-ascii-æøåÆØÅöôêÊ字符串', ...options });\n\n/**\n * Login User\n */\nexport const putWithFormUrlEncoded = <ThrowOnError extends boolean = false>(options: Options<PutWithFormUrlEncodedData, ThrowOnError>) => (options.client ?? client).put<unknown, unknown, ThrowOnError>({\n    ...urlSearchParamsBodySerializer,\n    url: '/api/v{api-version}/non-ascii-æøåÆØÅöôêÊ字符串',\n    ...options,\n    headers: {\n        'Content-Type': 'application/x-www-form-urlencoded',\n        ...options.headers\n    }\n});\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-fetch/clean-false/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type ClientOptions = {\n    baseUrl: 'http://localhost:3000/base' | (string & {});\n};\n\n/**\n * Model with number-only name\n */\nexport type _400 = string;\n\n/**\n * External ref to shared model (A)\n */\nexport type ExternalRefA = ExternalSharedModel;\n\n/**\n * External ref to shared model (B)\n */\nexport type ExternalRefB = ExternalSharedModel;\n\n/**\n * Testing multiline comments in string: First line\n * Second line\n *\n * Fourth line\n */\nexport type CamelCaseCommentWithBreaks = number;\n\n/**\n * Testing multiline comments in string: First line\n * Second line\n *\n * Fourth line\n */\nexport type CommentWithBreaks = number;\n\n/**\n * Testing backticks in string: `backticks` and ```multiple backticks``` should work\n */\nexport type CommentWithBackticks = number;\n\n/**\n * Testing backticks and quotes in string: `backticks`, 'quotes', \"double quotes\" and ```multiple backticks``` should work\n */\nexport type CommentWithBackticksAndQuotes = number;\n\n/**\n * Testing slashes in string: \\backwards\\\\\\ and /forwards/// should work\n */\nexport type CommentWithSlashes = number;\n\n/**\n * Testing expression placeholders in string: ${expression} should work\n */\nexport type CommentWithExpressionPlaceholders = number;\n\n/**\n * Testing quotes in string: 'single quote''' and \"double quotes\"\"\" should work\n */\nexport type CommentWithQuotes = number;\n\n/**\n * Testing reserved characters in string: * inline * and ** inline ** should work\n */\nexport type CommentWithReservedCharacters = number;\n\n/**\n * This is a simple number\n */\nexport type SimpleInteger = number;\n\n/**\n * This is a simple boolean\n */\nexport type SimpleBoolean = boolean;\n\n/**\n * This is a simple string\n */\nexport type SimpleString = string;\n\n/**\n * A string with non-ascii (unicode) characters valid in typescript identifiers (æøåÆØÅöÔèÈ字符串)\n */\nexport type NonAsciiStringæøåÆøÅöôêÊ字符串 = string;\n\n/**\n * This is a simple file\n */\nexport type SimpleFile = Blob | File;\n\n/**\n * This is a simple reference\n */\nexport type SimpleReference = ModelWithString;\n\n/**\n * This is a simple string\n */\nexport type SimpleStringWithPattern = string | null;\n\n/**\n * This is a simple enum with strings\n */\nexport type EnumWithStrings = 'Success' | 'Warning' | 'Error' | '\\'Single Quote\\'' | '\"Double Quotes\"' | 'Non-ascii: øæåôöØÆÅÔÖ字符串';\n\nexport type EnumWithReplacedCharacters = '\\'Single Quote\\'' | '\"Double Quotes\"' | 'øæåôöØÆÅÔÖ字符串' | 3.1 | '';\n\n/**\n * This is a simple enum with numbers\n */\nexport type EnumWithNumbers = 1 | 2 | 3 | 1.1 | 1.2 | 1.3 | 100 | 200 | 300 | -100 | -200 | -300 | -1.1 | -1.2 | -1.3;\n\n/**\n * Success=1,Warning=2,Error=3\n */\nexport type EnumFromDescription = number;\n\n/**\n * This is a simple enum with numbers\n */\nexport type EnumWithExtensions = 200 | 400 | 500;\n\nexport type EnumWithXEnumNames = 0 | 1 | 2;\n\n/**\n * This is a simple array with numbers\n */\nexport type ArrayWithNumbers = Array<number>;\n\n/**\n * This is a simple array with booleans\n */\nexport type ArrayWithBooleans = Array<boolean>;\n\n/**\n * This is a simple array with strings\n */\nexport type ArrayWithStrings = Array<string>;\n\n/**\n * This is a simple array with references\n */\nexport type ArrayWithReferences = Array<ModelWithString>;\n\n/**\n * This is a simple array containing an array\n */\nexport type ArrayWithArray = Array<Array<ModelWithString>>;\n\n/**\n * This is a simple array with properties\n */\nexport type ArrayWithProperties = Array<{\n    '16x16'?: CamelCaseCommentWithBreaks;\n    bar?: string;\n}>;\n\n/**\n * This is a simple array with any of properties\n */\nexport type ArrayWithAnyOfProperties = Array<{\n    foo?: string;\n} | {\n    bar?: string;\n}>;\n\nexport type AnyOfAnyAndNull = {\n    data?: unknown | null;\n};\n\n/**\n * This is a simple array with any of properties\n */\nexport type AnyOfArrays = {\n    results?: Array<{\n        foo?: string;\n    } | {\n        bar?: string;\n    }>;\n};\n\n/**\n * This is a string dictionary\n */\nexport type DictionaryWithString = {\n    [key: string]: string;\n};\n\nexport type DictionaryWithPropertiesAndAdditionalProperties = {\n    foo?: number;\n    bar?: boolean;\n    [key: string]: string | number | boolean | undefined;\n};\n\n/**\n * This is a string reference\n */\nexport type DictionaryWithReference = {\n    [key: string]: ModelWithString;\n};\n\n/**\n * This is a complex dictionary\n */\nexport type DictionaryWithArray = {\n    [key: string]: Array<ModelWithString>;\n};\n\n/**\n * This is a string dictionary\n */\nexport type DictionaryWithDictionary = {\n    [key: string]: {\n        [key: string]: string;\n    };\n};\n\n/**\n * This is a complex dictionary\n */\nexport type DictionaryWithProperties = {\n    [key: string]: {\n        foo?: string;\n        bar?: string;\n    };\n};\n\n/**\n * This is a model with one number property\n */\nexport type ModelWithInteger = {\n    /**\n     * This is a simple number property\n     */\n    prop?: number;\n};\n\n/**\n * This is a model with one boolean property\n */\nexport type ModelWithBoolean = {\n    /**\n     * This is a simple boolean property\n     */\n    prop?: boolean;\n};\n\n/**\n * This is a model with one string property\n */\nexport type ModelWithString = {\n    /**\n     * This is a simple string property\n     */\n    prop?: string;\n};\n\n/**\n * This is a model with one string property\n */\nexport type ModelWithStringError = {\n    /**\n     * This is a simple string property\n     */\n    prop?: string;\n};\n\n/**\n * `Comment` or `VoiceComment`. The JSON object for adding voice comments to tickets is different. See [Adding voice comments to tickets](/documentation/ticketing/managing-tickets/adding-voice-comments-to-tickets)\n */\nexport type ModelFromZendesk = string;\n\n/**\n * This is a model with one string property\n */\nexport type ModelWithNullableString = {\n    /**\n     * This is a simple string property\n     */\n    nullableProp1?: string | null;\n    /**\n     * This is a simple string property\n     */\n    nullableRequiredProp1: string | null;\n    /**\n     * This is a simple string property\n     */\n    nullableProp2?: string | null;\n    /**\n     * This is a simple string property\n     */\n    nullableRequiredProp2: string | null;\n    /**\n     * This is a simple enum with strings\n     */\n    'foo_bar-enum'?: 'Success' | 'Warning' | 'Error' | 'ØÆÅ字符串';\n};\n\n/**\n * This is a model with one enum\n */\nexport type ModelWithEnum = {\n    /**\n     * This is a simple enum with strings\n     */\n    'foo_bar-enum'?: 'Success' | 'Warning' | 'Error' | 'ØÆÅ字符串';\n    /**\n     * These are the HTTP error code enums\n     */\n    statusCode?: '100' | '200 FOO' | '300 FOO_BAR' | '400 foo-bar' | '500 foo.bar' | '600 foo&bar';\n    /**\n     * Simple boolean enum\n     */\n    bool?: true;\n};\n\n/**\n * This is a model with one enum with escaped name\n */\nexport type ModelWithEnumWithHyphen = {\n    /**\n     * Foo-Bar-Baz-Qux\n     */\n    'foo-bar-baz-qux'?: '3.0';\n};\n\n/**\n * This is a model with one enum\n */\nexport type ModelWithEnumFromDescription = {\n    /**\n     * Success=1,Warning=2,Error=3\n     */\n    test?: number;\n};\n\n/**\n * This is a model with nested enums\n */\nexport type ModelWithNestedEnums = {\n    dictionaryWithEnum?: {\n        [key: string]: 'Success' | 'Warning' | 'Error';\n    };\n    dictionaryWithEnumFromDescription?: {\n        [key: string]: number;\n    };\n    arrayWithEnum?: Array<'Success' | 'Warning' | 'Error'>;\n    arrayWithDescription?: Array<number>;\n    /**\n     * This is a simple enum with strings\n     */\n    'foo_bar-enum'?: 'Success' | 'Warning' | 'Error' | 'ØÆÅ字符串';\n};\n\n/**\n * This is a model with one property containing a reference\n */\nexport type ModelWithReference = {\n    prop?: ModelWithProperties;\n};\n\n/**\n * This is a model with one property containing an array\n */\nexport type ModelWithArrayReadOnlyAndWriteOnly = {\n    prop?: Array<ModelWithReadOnlyAndWriteOnly>;\n    propWithFile?: Array<Blob | File>;\n    propWithNumber?: Array<number>;\n};\n\n/**\n * This is a model with one property containing an array\n */\nexport type ModelWithArray = {\n    prop?: Array<ModelWithString>;\n    propWithFile?: Array<Blob | File>;\n    propWithNumber?: Array<number>;\n};\n\n/**\n * This is a model with one property containing a dictionary\n */\nexport type ModelWithDictionary = {\n    prop?: {\n        [key: string]: string;\n    };\n};\n\n/**\n * This is a deprecated model with a deprecated property\n *\n * @deprecated\n */\nexport type DeprecatedModel = {\n    /**\n     * This is a deprecated property\n     *\n     * @deprecated\n     */\n    prop?: string;\n};\n\n/**\n * This is a model with one property containing a circular reference\n */\nexport type ModelWithCircularReference = {\n    prop?: ModelWithCircularReference;\n};\n\n/**\n * This is a model with one property with a 'one of' relationship\n */\nexport type CompositionWithOneOf = {\n    propA?: ModelWithString | ModelWithEnum | ModelWithArray | ModelWithDictionary;\n};\n\n/**\n * This is a model with one property with a 'one of' relationship where the options are not $ref\n */\nexport type CompositionWithOneOfAnonymous = {\n    propA?: {\n        propA?: string;\n    } | string | number;\n};\n\n/**\n * Circle\n */\nexport type ModelCircle = {\n    kind: string;\n    radius?: number;\n};\n\n/**\n * Square\n */\nexport type ModelSquare = {\n    kind: string;\n    sideLength?: number;\n};\n\n/**\n * This is a model with one property with a 'one of' relationship where the options are not $ref\n */\nexport type CompositionWithOneOfDiscriminator = ({\n    kind: 'circle';\n} & ModelCircle) | ({\n    kind: 'square';\n} & ModelSquare);\n\n/**\n * This is a model with one property with a 'any of' relationship\n */\nexport type CompositionWithAnyOf = {\n    propA?: ModelWithString | ModelWithEnum | ModelWithArray | ModelWithDictionary;\n};\n\n/**\n * This is a model with one property with a 'any of' relationship where the options are not $ref\n */\nexport type CompositionWithAnyOfAnonymous = {\n    propA?: {\n        propA?: string;\n    } | string | number;\n};\n\n/**\n * This is a model with nested 'any of' property with a type null\n */\nexport type CompositionWithNestedAnyAndTypeNull = {\n    propA?: Array<ModelWithDictionary | null> | Array<ModelWithArray | null>;\n};\n\nexport type _3eNum1Период = 'Bird' | 'Dog';\n\nexport type ConstValue = 'ConstValue';\n\n/**\n * This is a model with one property with a 'any of' relationship where the options are not $ref\n */\nexport type CompositionWithNestedAnyOfAndNull = {\n    /**\n     * Scopes\n     */\n    propA?: Array<_3eNum1Период | ConstValue> | null;\n};\n\n/**\n * This is a model with one property with a 'one of' relationship\n */\nexport type CompositionWithOneOfAndNullable = {\n    propA?: {\n        boolean?: boolean;\n    } | ModelWithEnum | ModelWithArray | ModelWithDictionary | null;\n};\n\n/**\n * This is a model that contains a simple dictionary within composition\n */\nexport type CompositionWithOneOfAndSimpleDictionary = {\n    propA?: boolean | {\n        [key: string]: number;\n    };\n};\n\n/**\n * This is a model that contains a dictionary of simple arrays within composition\n */\nexport type CompositionWithOneOfAndSimpleArrayDictionary = {\n    propA?: boolean | {\n        [key: string]: Array<boolean>;\n    };\n};\n\n/**\n * This is a model that contains a dictionary of complex arrays (composited) within composition\n */\nexport type CompositionWithOneOfAndComplexArrayDictionary = {\n    propA?: boolean | {\n        [key: string]: Array<number | string>;\n    };\n};\n\n/**\n * This is a model with one property with a 'all of' relationship\n */\nexport type CompositionWithAllOfAndNullable = {\n    propA?: ({\n        boolean?: boolean;\n    } & ModelWithEnum & ModelWithArray & ModelWithDictionary) | null;\n};\n\n/**\n * This is a model with one property with a 'any of' relationship\n */\nexport type CompositionWithAnyOfAndNullable = {\n    propA?: {\n        boolean?: boolean;\n    } | ModelWithEnum | ModelWithArray | ModelWithDictionary | null;\n};\n\n/**\n * This is a base model with two simple optional properties\n */\nexport type CompositionBaseModel = {\n    firstName?: string;\n    lastname?: string;\n};\n\n/**\n * This is a model that extends the base model\n */\nexport type CompositionExtendedModel = CompositionBaseModel & {\n    age: number;\n    firstName: string;\n    lastname: string;\n};\n\n/**\n * This is a model with one nested property\n */\nexport type ModelWithProperties = {\n    required: string;\n    readonly requiredAndReadOnly: string;\n    requiredAndNullable: string | null;\n    string?: string;\n    number?: number;\n    boolean?: boolean;\n    reference?: ModelWithString;\n    'property with space'?: string;\n    default?: string;\n    try?: string;\n    readonly '@namespace.string'?: string;\n    readonly '@namespace.integer'?: number;\n};\n\n/**\n * This is a model with one nested property\n */\nexport type ModelWithNestedProperties = {\n    readonly first: {\n        readonly second: {\n            readonly third: string | null;\n        } | null;\n    } | null;\n};\n\n/**\n * This is a model with duplicated properties\n */\nexport type ModelWithDuplicateProperties = {\n    prop?: ModelWithString;\n};\n\n/**\n * This is a model with ordered properties\n */\nexport type ModelWithOrderedProperties = {\n    zebra?: string;\n    apple?: string;\n    hawaii?: string;\n};\n\n/**\n * This is a model with duplicated imports\n */\nexport type ModelWithDuplicateImports = {\n    propA?: ModelWithString;\n    propB?: ModelWithString;\n    propC?: ModelWithString;\n};\n\n/**\n * This is a model that extends another model\n */\nexport type ModelThatExtends = ModelWithString & {\n    propExtendsA?: string;\n    propExtendsB?: ModelWithString;\n};\n\n/**\n * This is a model that extends another model\n */\nexport type ModelThatExtendsExtends = ModelWithString & ModelThatExtends & {\n    propExtendsC?: string;\n    propExtendsD?: ModelWithString;\n};\n\n/**\n * This is a model that contains a some patterns\n */\nexport type ModelWithPattern = {\n    key: string;\n    name: string;\n    readonly enabled?: boolean;\n    readonly modified?: string;\n    id?: string;\n    text?: string;\n    patternWithSingleQuotes?: string;\n    patternWithNewline?: string;\n    patternWithBacktick?: string;\n    patternWithUnicode?: string;\n};\n\nexport type File = {\n    /**\n     * Id\n     */\n    readonly id?: string;\n    /**\n     * Updated at\n     */\n    readonly updated_at?: string;\n    /**\n     * Created at\n     */\n    readonly created_at?: string;\n    /**\n     * Mime\n     */\n    mime: string;\n    /**\n     * File\n     */\n    readonly file?: string;\n};\n\nexport type Default = {\n    name?: string;\n};\n\nexport type Pageable = {\n    page?: number;\n    size?: number;\n    sort?: Array<string>;\n};\n\n/**\n * This is a free-form object without additionalProperties.\n */\nexport type FreeFormObjectWithoutAdditionalProperties = {\n    [key: string]: unknown;\n};\n\n/**\n * This is a free-form object with additionalProperties: true.\n */\nexport type FreeFormObjectWithAdditionalPropertiesEqTrue = {\n    [key: string]: unknown;\n};\n\n/**\n * This is a free-form object with additionalProperties: {}.\n */\nexport type FreeFormObjectWithAdditionalPropertiesEqEmptyObject = {\n    [key: string]: unknown;\n};\n\nexport type ModelWithConst = {\n    String?: 'String';\n    number?: 0;\n    null?: null;\n    withType?: 'Some string';\n};\n\n/**\n * This is a model with one property and additionalProperties: true\n */\nexport type ModelWithAdditionalPropertiesEqTrue = {\n    /**\n     * This is a simple string property\n     */\n    prop?: string;\n    [key: string]: unknown;\n};\n\nexport type NestedAnyOfArraysNullable = {\n    nullableArray?: Array<string | boolean> | null;\n};\n\nexport type CompositionWithOneOfAndProperties = ({\n    foo: SimpleParameter;\n} | {\n    bar: NonAsciiStringæøåÆøÅöôêÊ字符串;\n}) & {\n    baz: number | null;\n    qux: number;\n};\n\n/**\n * An object that can be null\n */\nexport type NullableObject = {\n    foo?: string;\n} | null;\n\n/**\n * Some % character\n */\nexport type CharactersInDescription = string;\n\nexport type ModelWithNullableObject = {\n    data?: NullableObject;\n};\n\n/**\n * An object with additional properties that can be null (anyOf ref + null)\n */\nexport type ModelWithAdditionalPropertiesRef = {\n    [key: string]: NullableObject | null;\n};\n\nexport type ModelWithOneOfEnum = {\n    foo: 'Bar';\n} | {\n    foo: 'Baz';\n} | {\n    foo: 'Qux';\n} | {\n    content: string;\n    foo: 'Quux';\n} | {\n    content: [\n        string,\n        string\n    ];\n    foo: 'Corge';\n};\n\nexport type ModelWithNestedArrayEnumsDataFoo = 'foo' | 'bar';\n\nexport type ModelWithNestedArrayEnumsDataBar = 'baz' | 'qux';\n\nexport type ModelWithNestedArrayEnumsData = {\n    foo?: Array<ModelWithNestedArrayEnumsDataFoo>;\n    bar?: Array<ModelWithNestedArrayEnumsDataBar>;\n};\n\nexport type ModelWithNestedArrayEnums = {\n    array_strings?: Array<string>;\n    data?: ModelWithNestedArrayEnumsData;\n};\n\nexport type ModelWithNestedCompositionEnums = {\n    foo?: ModelWithNestedArrayEnumsDataFoo;\n};\n\nexport type ModelWithReadOnlyAndWriteOnly = {\n    foo: string;\n    readonly bar: string;\n};\n\nexport type ModelWithConstantSizeArray = [\n    number,\n    number\n];\n\nexport type ModelWithAnyOfConstantSizeArray = [\n    number | string,\n    number | string,\n    number | string\n];\n\nexport type ModelWithPrefixItemsConstantSizeArray = [\n    ModelWithInteger,\n    number | string,\n    string\n];\n\nexport type ModelWithAnyOfConstantSizeArrayNullable = [\n    number | null | string,\n    number | null | string,\n    number | null | string\n];\n\nexport type ModelWithAnyOfConstantSizeArrayWithNSizeAndOptions = [\n    number | Import,\n    number | Import\n];\n\nexport type ModelWithAnyOfConstantSizeArrayAndIntersect = [\n    number & string,\n    number & string\n];\n\nexport type ModelWithNumericEnumUnion = {\n    /**\n     * Период\n     */\n    value?: -10 | -1 | 0 | 1 | 3 | 6 | 12;\n};\n\n/**\n * Some description with `back ticks`\n */\nexport type ModelWithBackticksInDescription = {\n    /**\n     * The template `that` should be used for parsing and importing the contents of the CSV file.\n     *\n     * <br/><p>There is one placeholder currently supported:<ul>     <li><b>${x}</b> - refers to the n-th column in the CSV file, e.g. ${1}, ${2}, ...)</li></ul><p>Example of a correct JSON template:</p>\n     * <pre>\n     * [\n     * {\n     * \"resourceType\": \"Asset\",\n     * \"identifier\": {\n     * \"name\": \"${1}\",\n     * \"domain\": {\n     * \"name\": \"${2}\",\n     * \"community\": {\n     * \"name\": \"Some Community\"\n     * }\n     * }\n     * },\n     * \"attributes\" : {\n     * \"00000000-0000-0000-0000-000000003115\" : [ {\n     * \"value\" : \"${3}\"\n     * } ],\n     * \"00000000-0000-0000-0000-000000000222\" : [ {\n     * \"value\" : \"${4}\"\n     * } ]\n     * }\n     * }\n     * ]\n     * </pre>\n     */\n    template?: string;\n};\n\nexport type ModelWithOneOfAndProperties = (SimpleParameter | NonAsciiStringæøåÆøÅöôêÊ字符串) & {\n    baz: number | null;\n    qux: number;\n};\n\n/**\n * Model used to test deduplication strategy (unused)\n */\nexport type ParameterSimpleParameterUnused = string;\n\n/**\n * Model used to test deduplication strategy\n */\nexport type PostServiceWithEmptyTagResponse = string;\n\n/**\n * Model used to test deduplication strategy\n */\nexport type PostServiceWithEmptyTagResponse2 = string;\n\n/**\n * Model used to test deduplication strategy\n */\nexport type DeleteFooData = string;\n\n/**\n * Model used to test deduplication strategy\n */\nexport type DeleteFooData2 = string;\n\n/**\n * Model with restricted keyword name\n */\nexport type Import = string;\n\nexport type SchemaWithFormRestrictedKeys = {\n    description?: string;\n    'x-enum-descriptions'?: string;\n    'x-enum-varnames'?: string;\n    'x-enumNames'?: string;\n    title?: string;\n    object?: {\n        description?: string;\n        'x-enum-descriptions'?: string;\n        'x-enum-varnames'?: string;\n        'x-enumNames'?: string;\n        title?: string;\n    };\n    array?: Array<{\n        description?: string;\n        'x-enum-descriptions'?: string;\n        'x-enum-varnames'?: string;\n        'x-enumNames'?: string;\n        title?: string;\n    }>;\n};\n\n/**\n * This schema was giving PascalCase transformations a hard time\n */\nexport type IoK8sApimachineryPkgApisMetaV1DeleteOptions = {\n    /**\n     * Must be fulfilled before a deletion is carried out. If not possible, a 409 Conflict status will be returned.\n     */\n    preconditions?: IoK8sApimachineryPkgApisMetaV1Preconditions;\n};\n\n/**\n * This schema was giving PascalCase transformations a hard time\n */\nexport type IoK8sApimachineryPkgApisMetaV1Preconditions = {\n    /**\n     * Specifies the target ResourceVersion\n     */\n    resourceVersion?: string;\n    /**\n     * Specifies the target UID.\n     */\n    uid?: string;\n};\n\nexport type AdditionalPropertiesUnknownIssue = {\n    [key: string]: string | number;\n};\n\nexport type AdditionalPropertiesUnknownIssue2 = {\n    [key: string]: string | number;\n};\n\nexport type AdditionalPropertiesUnknownIssue3 = string & {\n    entries: {\n        [key: string]: AdditionalPropertiesUnknownIssue;\n    };\n};\n\nexport type AdditionalPropertiesIntegerIssue = {\n    value: number;\n    [key: string]: number;\n};\n\nexport type OneOfAllOfIssue = ((ConstValue | GenericSchemaDuplicateIssue1SystemBoolean) & _3eNum1Период) | GenericSchemaDuplicateIssue1SystemString;\n\nexport type GenericSchemaDuplicateIssue1SystemBoolean = {\n    item?: boolean;\n    error?: string | null;\n    readonly hasError?: boolean;\n    data?: {\n        [key: string]: never;\n    };\n};\n\nexport type GenericSchemaDuplicateIssue1SystemString = {\n    item?: string | null;\n    error?: string | null;\n    readonly hasError?: boolean;\n};\n\nexport type ExternalSharedModel = {\n    id: string;\n    name?: string;\n};\n\n/**\n * This is a model with one property containing a reference\n */\nexport type ModelWithReferenceWritable = {\n    prop?: ModelWithPropertiesWritable;\n};\n\n/**\n * This is a model with one property containing an array\n */\nexport type ModelWithArrayReadOnlyAndWriteOnlyWritable = {\n    prop?: Array<ModelWithReadOnlyAndWriteOnlyWritable>;\n    propWithFile?: Array<Blob | File>;\n    propWithNumber?: Array<number>;\n};\n\n/**\n * This is a model with one nested property\n */\nexport type ModelWithPropertiesWritable = {\n    required: string;\n    requiredAndNullable: string | null;\n    string?: string;\n    number?: number;\n    boolean?: boolean;\n    reference?: ModelWithString;\n    'property with space'?: string;\n    default?: string;\n    try?: string;\n};\n\n/**\n * This is a model that contains a some patterns\n */\nexport type ModelWithPatternWritable = {\n    key: string;\n    name: string;\n    id?: string;\n    text?: string;\n    patternWithSingleQuotes?: string;\n    patternWithNewline?: string;\n    patternWithBacktick?: string;\n    patternWithUnicode?: string;\n};\n\nexport type FileWritable = {\n    /**\n     * Mime\n     */\n    mime: string;\n};\n\nexport type ModelWithReadOnlyAndWriteOnlyWritable = {\n    foo: string;\n    baz: string;\n};\n\nexport type ModelWithAnyOfConstantSizeArrayWithNSizeAndOptionsWritable = [\n    number | Import,\n    number | Import\n];\n\nexport type AdditionalPropertiesUnknownIssueWritable = {\n    [key: string]: string | number;\n};\n\nexport type OneOfAllOfIssueWritable = ((ConstValue | GenericSchemaDuplicateIssue1SystemBoolean) & _3eNum1Период) | GenericSchemaDuplicateIssue1SystemString;\n\nexport type GenericSchemaDuplicateIssue1SystemBooleanWritable = {\n    item?: boolean;\n    error?: string | null;\n    data?: {\n        [key: string]: never;\n    };\n};\n\nexport type GenericSchemaDuplicateIssue1SystemStringWritable = {\n    item?: string | null;\n    error?: string | null;\n};\n\n/**\n * This is a reusable parameter\n */\nexport type SimpleParameter = string;\n\n/**\n * Parameter with illegal characters\n */\nexport type XFooBar = ModelWithString;\n\n/**\n * A reusable request body\n */\nexport type SimpleRequestBody = ModelWithString;\n\n/**\n * A reusable request body\n */\nexport type SimpleFormData = ModelWithString;\n\nexport type ExportData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no+tag';\n};\n\nexport type PatchApiVbyApiVersionNoTagData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no+tag';\n};\n\nexport type PatchApiVbyApiVersionNoTagResponses = {\n    /**\n     * OK\n     */\n    default: unknown;\n};\n\nexport type ImportData = {\n    body: ModelWithReadOnlyAndWriteOnlyWritable | ModelWithArrayReadOnlyAndWriteOnlyWritable;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no+tag';\n};\n\nexport type ImportResponses = {\n    /**\n     * Success\n     */\n    200: ModelFromZendesk;\n    /**\n     * Default success response\n     */\n    default: ModelWithReadOnlyAndWriteOnly;\n};\n\nexport type ImportResponse = ImportResponses[keyof ImportResponses];\n\nexport type FooWowData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no+tag';\n};\n\nexport type FooWowResponses = {\n    /**\n     * OK\n     */\n    default: unknown;\n};\n\nexport type ApiVVersionODataControllerCountData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple/$count';\n};\n\nexport type ApiVVersionODataControllerCountResponses = {\n    /**\n     * Success\n     */\n    200: ModelFromZendesk;\n};\n\nexport type ApiVVersionODataControllerCountResponse = ApiVVersionODataControllerCountResponses[keyof ApiVVersionODataControllerCountResponses];\n\nexport type GetApiVbyApiVersionSimpleOperationData = {\n    body?: never;\n    path: {\n        /**\n         * foo in method\n         */\n        foo_param: string;\n    };\n    query?: never;\n    url: '/api/v{api-version}/simple:operation';\n};\n\nexport type GetApiVbyApiVersionSimpleOperationErrors = {\n    /**\n     * Default error response\n     */\n    default: ModelWithBoolean;\n};\n\nexport type GetApiVbyApiVersionSimpleOperationError = GetApiVbyApiVersionSimpleOperationErrors[keyof GetApiVbyApiVersionSimpleOperationErrors];\n\nexport type GetApiVbyApiVersionSimpleOperationResponses = {\n    /**\n     * Response is a simple number\n     */\n    200: number;\n};\n\nexport type GetApiVbyApiVersionSimpleOperationResponse = GetApiVbyApiVersionSimpleOperationResponses[keyof GetApiVbyApiVersionSimpleOperationResponses];\n\nexport type DeleteCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type GetCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type HeadCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type OptionsCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type PatchCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type PostCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type PutCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type DeleteFooData3 = {\n    body?: never;\n    headers: {\n        /**\n         * Parameter with illegal characters\n         */\n        'x-Foo-Bar': ModelWithString;\n    };\n    path: {\n        /**\n         * foo in method\n         */\n        foo_param: string;\n        /**\n         * bar in method\n         */\n        BarParam: string;\n    };\n    query?: never;\n    url: '/api/v{api-version}/foo/{foo_param}/bar/{BarParam}';\n};\n\nexport type CallWithDescriptionsData = {\n    body?: never;\n    path?: never;\n    query?: {\n        /**\n         * Testing multiline comments in string: First line\n         * Second line\n         *\n         * Fourth line\n         */\n        parameterWithBreaks?: string;\n        /**\n         * Testing backticks in string: `backticks` and ```multiple backticks``` should work\n         */\n        parameterWithBackticks?: string;\n        /**\n         * Testing slashes in string: \\backwards\\\\\\ and /forwards/// should work\n         */\n        parameterWithSlashes?: string;\n        /**\n         * Testing expression placeholders in string: ${expression} should work\n         */\n        parameterWithExpressionPlaceholders?: string;\n        /**\n         * Testing quotes in string: 'single quote''' and \"double quotes\"\"\" should work\n         */\n        parameterWithQuotes?: string;\n        /**\n         * Testing reserved characters in string: * inline * and ** inline ** should work\n         */\n        parameterWithReservedCharacters?: string;\n    };\n    url: '/api/v{api-version}/descriptions';\n};\n\nexport type DeprecatedCallData = {\n    body?: never;\n    headers: {\n        /**\n         * This parameter is deprecated\n         *\n         * @deprecated\n         */\n        parameter: DeprecatedModel | null;\n    };\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/parameters/deprecated';\n};\n\nexport type CallWithParametersData = {\n    /**\n     * This is the parameter that goes into the body\n     */\n    body: {\n        [key: string]: unknown;\n    } | null;\n    headers: {\n        /**\n         * This is the parameter that goes into the header\n         */\n        parameterHeader: string | null;\n    };\n    path: {\n        /**\n         * This is the parameter that goes into the path\n         */\n        parameterPath: string | null;\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string | null;\n    };\n    query: {\n        foo_ref_enum?: ModelWithNestedArrayEnumsDataFoo;\n        foo_all_of_enum: ModelWithNestedArrayEnumsDataFoo;\n        /**\n         * This is the parameter that goes into the query params\n         */\n        cursor: string | null;\n    };\n    url: '/api/v{api-version}/parameters/{parameterPath}';\n};\n\nexport type CallWithWeirdParameterNamesData = {\n    /**\n     * This is the parameter that goes into the body\n     */\n    body: ModelWithString | null;\n    headers: {\n        /**\n         * This is the parameter that goes into the request header\n         */\n        'parameter.header': string | null;\n    };\n    path: {\n        /**\n         * This is the parameter that goes into the path\n         */\n        'parameter.path.1'?: string;\n        /**\n         * This is the parameter that goes into the path\n         */\n        'parameter-path-2'?: string;\n        /**\n         * This is the parameter that goes into the path\n         */\n        'PARAMETER-PATH-3'?: string;\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string | null;\n    };\n    query: {\n        /**\n         * This is the parameter with a reserved keyword\n         */\n        default?: string;\n        /**\n         * This is the parameter that goes into the request query params\n         */\n        'parameter-query': string | null;\n    };\n    url: '/api/v{api-version}/parameters/{parameter.path.1}/{parameter-path-2}/{PARAMETER-PATH-3}';\n};\n\nexport type GetCallWithOptionalParamData = {\n    /**\n     * This is a required parameter\n     */\n    body: ModelWithOneOfEnum;\n    path?: never;\n    query?: {\n        /**\n         * This is an optional parameter\n         */\n        page?: number;\n    };\n    url: '/api/v{api-version}/parameters';\n};\n\nexport type PostCallWithOptionalParamData = {\n    /**\n     * This is an optional parameter\n     */\n    body?: {\n        offset?: number | null;\n    };\n    path?: never;\n    query: {\n        /**\n         * This is a required parameter\n         */\n        parameter: Pageable;\n    };\n    url: '/api/v{api-version}/parameters';\n};\n\nexport type PostCallWithOptionalParamResponses = {\n    /**\n     * Response is a simple number\n     */\n    200: number;\n    /**\n     * Success\n     */\n    204: void;\n};\n\nexport type PostCallWithOptionalParamResponse = PostCallWithOptionalParamResponses[keyof PostCallWithOptionalParamResponses];\n\nexport type PostApiVbyApiVersionRequestBodyData = {\n    /**\n     * A reusable request body\n     */\n    body?: SimpleRequestBody;\n    path?: never;\n    query?: {\n        /**\n         * This is a reusable parameter\n         */\n        parameter?: string;\n    };\n    url: '/api/v{api-version}/requestBody';\n};\n\nexport type PostApiVbyApiVersionFormDataData = {\n    /**\n     * A reusable request body\n     */\n    body?: SimpleFormData;\n    path?: never;\n    query?: {\n        /**\n         * This is a reusable parameter\n         */\n        parameter?: string;\n    };\n    url: '/api/v{api-version}/formData';\n};\n\nexport type CallWithDefaultParametersData = {\n    body?: never;\n    path?: never;\n    query?: {\n        /**\n         * This is a simple string with default value\n         */\n        parameterString?: string | null;\n        /**\n         * This is a simple number with default value\n         */\n        parameterNumber?: number | null;\n        /**\n         * This is a simple boolean with default value\n         */\n        parameterBoolean?: boolean | null;\n        /**\n         * This is a simple enum with default value\n         */\n        parameterEnum?: 'Success' | 'Warning' | 'Error';\n        /**\n         * This is a simple model with default value\n         */\n        parameterModel?: ModelWithString | null;\n    };\n    url: '/api/v{api-version}/defaults';\n};\n\nexport type CallWithDefaultOptionalParametersData = {\n    body?: never;\n    path?: never;\n    query?: {\n        /**\n         * This is a simple string that is optional with default value\n         */\n        parameterString?: string;\n        /**\n         * This is a simple number that is optional with default value\n         */\n        parameterNumber?: number;\n        /**\n         * This is a simple boolean that is optional with default value\n         */\n        parameterBoolean?: boolean;\n        /**\n         * This is a simple enum that is optional with default value\n         */\n        parameterEnum?: 'Success' | 'Warning' | 'Error';\n        /**\n         * This is a simple model that is optional with default value\n         */\n        parameterModel?: ModelWithString;\n    };\n    url: '/api/v{api-version}/defaults';\n};\n\nexport type CallToTestOrderOfParamsData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * This is a optional string with default\n         */\n        parameterOptionalStringWithDefault?: string;\n        /**\n         * This is a optional string with empty default\n         */\n        parameterOptionalStringWithEmptyDefault?: string;\n        /**\n         * This is a optional string with no default\n         */\n        parameterOptionalStringWithNoDefault?: string;\n        /**\n         * This is a string with default\n         */\n        parameterStringWithDefault: string;\n        /**\n         * This is a string with empty default\n         */\n        parameterStringWithEmptyDefault: string;\n        /**\n         * This is a string with no default\n         */\n        parameterStringWithNoDefault: string;\n        /**\n         * This is a string that can be null with no default\n         */\n        parameterStringNullableWithNoDefault?: string | null;\n        /**\n         * This is a string that can be null with default\n         */\n        parameterStringNullableWithDefault?: string | null;\n    };\n    url: '/api/v{api-version}/defaults';\n};\n\nexport type DuplicateNameData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/duplicate';\n};\n\nexport type DuplicateName2Data = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/duplicate';\n};\n\nexport type DuplicateName3Data = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/duplicate';\n};\n\nexport type DuplicateName4Data = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/duplicate';\n};\n\nexport type CallWithNoContentResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no-content';\n};\n\nexport type CallWithNoContentResponseResponses = {\n    /**\n     * Success\n     */\n    204: void;\n};\n\nexport type CallWithNoContentResponseResponse = CallWithNoContentResponseResponses[keyof CallWithNoContentResponseResponses];\n\nexport type CallWithResponseAndNoContentResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multiple-tags/response-and-no-content';\n};\n\nexport type CallWithResponseAndNoContentResponseResponses = {\n    /**\n     * Response is a simple number\n     */\n    200: number;\n    /**\n     * Success\n     */\n    204: void;\n};\n\nexport type CallWithResponseAndNoContentResponseResponse = CallWithResponseAndNoContentResponseResponses[keyof CallWithResponseAndNoContentResponseResponses];\n\nexport type DummyAData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multiple-tags/a';\n};\n\nexport type DummyAResponses = {\n    200: _400;\n};\n\nexport type DummyAResponse = DummyAResponses[keyof DummyAResponses];\n\nexport type DummyBData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multiple-tags/b';\n};\n\nexport type DummyBResponses = {\n    /**\n     * Success\n     */\n    204: void;\n};\n\nexport type DummyBResponse = DummyBResponses[keyof DummyBResponses];\n\nexport type CallWithResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/response';\n};\n\nexport type CallWithResponseResponses = {\n    default: Import;\n};\n\nexport type CallWithResponseResponse = CallWithResponseResponses[keyof CallWithResponseResponses];\n\nexport type CallWithDuplicateResponsesData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/response';\n};\n\nexport type CallWithDuplicateResponsesErrors = {\n    /**\n     * Message for 500 error\n     */\n    500: ModelWithStringError;\n    /**\n     * Message for 501 error\n     */\n    501: ModelWithStringError;\n    /**\n     * Message for 502 error\n     */\n    502: ModelWithStringError;\n    /**\n     * Message for 4XX errors\n     */\n    '4XX': DictionaryWithArray;\n    /**\n     * Default error response\n     */\n    default: ModelWithBoolean;\n};\n\nexport type CallWithDuplicateResponsesError = CallWithDuplicateResponsesErrors[keyof CallWithDuplicateResponsesErrors];\n\nexport type CallWithDuplicateResponsesResponses = {\n    /**\n     * Message for 200 response\n     */\n    200: ModelWithBoolean & ModelWithInteger;\n    /**\n     * Message for 201 response\n     */\n    201: ModelWithString;\n    /**\n     * Message for 202 response\n     */\n    202: ModelWithString;\n};\n\nexport type CallWithDuplicateResponsesResponse = CallWithDuplicateResponsesResponses[keyof CallWithDuplicateResponsesResponses];\n\nexport type CallWithResponsesData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/response';\n};\n\nexport type CallWithResponsesErrors = {\n    /**\n     * Message for 500 error\n     */\n    500: ModelWithStringError;\n    /**\n     * Message for 501 error\n     */\n    501: ModelWithStringError;\n    /**\n     * Message for 502 error\n     */\n    502: ModelWithStringError;\n    /**\n     * Message for default response\n     */\n    default: ModelWithStringError;\n};\n\nexport type CallWithResponsesError = CallWithResponsesErrors[keyof CallWithResponsesErrors];\n\nexport type CallWithResponsesResponses = {\n    /**\n     * Message for 200 response\n     */\n    200: {\n        readonly '@namespace.string'?: string;\n        readonly '@namespace.integer'?: number;\n        readonly value?: Array<ModelWithString>;\n    };\n    /**\n     * Message for 201 response\n     */\n    201: ModelThatExtends;\n    /**\n     * Message for 202 response\n     */\n    202: ModelThatExtendsExtends;\n};\n\nexport type CallWithResponsesResponse = CallWithResponsesResponses[keyof CallWithResponsesResponses];\n\nexport type CollectionFormatData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * This is an array parameter that is sent as csv format (comma-separated values)\n         */\n        parameterArrayCSV: Array<string> | null;\n        /**\n         * This is an array parameter that is sent as ssv format (space-separated values)\n         */\n        parameterArraySSV: Array<string> | null;\n        /**\n         * This is an array parameter that is sent as tsv format (tab-separated values)\n         */\n        parameterArrayTSV: Array<string> | null;\n        /**\n         * This is an array parameter that is sent as pipes format (pipe-separated values)\n         */\n        parameterArrayPipes: Array<string> | null;\n        /**\n         * This is an array parameter that is sent as multi format (multiple parameter instances)\n         */\n        parameterArrayMulti: Array<string> | null;\n    };\n    url: '/api/v{api-version}/collectionFormat';\n};\n\nexport type TypesData = {\n    body?: never;\n    path?: {\n        /**\n         * This is a number parameter\n         */\n        id?: number;\n    };\n    query: {\n        /**\n         * This is a number parameter\n         */\n        parameterNumber: number;\n        /**\n         * This is a string parameter\n         */\n        parameterString: string | null;\n        /**\n         * This is a boolean parameter\n         */\n        parameterBoolean: boolean | null;\n        /**\n         * This is an object parameter\n         */\n        parameterObject: {\n            [key: string]: unknown;\n        } | null;\n        /**\n         * This is an array parameter\n         */\n        parameterArray: Array<string> | null;\n        /**\n         * This is a dictionary parameter\n         */\n        parameterDictionary: {\n            [key: string]: unknown;\n        } | null;\n        /**\n         * This is an enum parameter\n         */\n        parameterEnum: 'Success' | 'Warning' | 'Error' | null;\n    };\n    url: '/api/v{api-version}/types';\n};\n\nexport type TypesResponses = {\n    /**\n     * Response is a simple number\n     */\n    200: number;\n    /**\n     * Response is a simple string\n     */\n    201: string;\n    /**\n     * Response is a simple boolean\n     */\n    202: boolean;\n    /**\n     * Response is a simple object\n     */\n    203: {\n        [key: string]: unknown;\n    };\n};\n\nexport type TypesResponse = TypesResponses[keyof TypesResponses];\n\nexport type UploadFileData = {\n    body: Blob | File;\n    path: {\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string | null;\n    };\n    query?: never;\n    url: '/api/v{api-version}/upload';\n};\n\nexport type UploadFileResponses = {\n    200: boolean;\n};\n\nexport type UploadFileResponse = UploadFileResponses[keyof UploadFileResponses];\n\nexport type FileResponseData = {\n    body?: never;\n    path: {\n        id: string;\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string;\n    };\n    query?: never;\n    url: '/api/v{api-version}/file/{id}';\n};\n\nexport type FileResponseResponses = {\n    /**\n     * Success\n     */\n    200: Blob | File;\n};\n\nexport type FileResponseResponse = FileResponseResponses[keyof FileResponseResponses];\n\nexport type ComplexTypesData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * Parameter containing object\n         */\n        parameterObject: {\n            first?: {\n                second?: {\n                    third?: string;\n                };\n            };\n        };\n        /**\n         * Parameter containing reference\n         */\n        parameterReference: ModelWithString;\n    };\n    url: '/api/v{api-version}/complex';\n};\n\nexport type ComplexTypesErrors = {\n    /**\n     * 400 `server` error\n     */\n    400: unknown;\n    /**\n     * 500 server error\n     */\n    500: unknown;\n};\n\nexport type ComplexTypesResponses = {\n    /**\n     * Successful response\n     */\n    200: Array<ModelWithString>;\n};\n\nexport type ComplexTypesResponse = ComplexTypesResponses[keyof ComplexTypesResponses];\n\nexport type MultipartResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multipart';\n};\n\nexport type MultipartResponseResponses = {\n    /**\n     * OK\n     */\n    200: {\n        file?: Blob | File;\n        metadata?: {\n            foo?: string;\n            bar?: string;\n        };\n    };\n};\n\nexport type MultipartResponseResponse = MultipartResponseResponses[keyof MultipartResponseResponses];\n\nexport type MultipartRequestData = {\n    body?: {\n        content?: Blob | File;\n        data?: ModelWithString | null;\n    };\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multipart';\n};\n\nexport type ComplexParamsData = {\n    body?: {\n        readonly key: string | null;\n        name: string | null;\n        enabled?: boolean;\n        type: 'Monkey' | 'Horse' | 'Bird';\n        listOfModels?: Array<ModelWithString> | null;\n        listOfStrings?: Array<string> | null;\n        parameters: ModelWithString | ModelWithEnum | ModelWithArray | ModelWithDictionary;\n        readonly user?: {\n            readonly id?: number;\n            readonly name?: string | null;\n        };\n    };\n    path: {\n        id: number;\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string;\n    };\n    query?: never;\n    url: '/api/v{api-version}/complex/{id}';\n};\n\nexport type ComplexParamsResponses = {\n    /**\n     * Success\n     */\n    200: ModelWithString;\n};\n\nexport type ComplexParamsResponse = ComplexParamsResponses[keyof ComplexParamsResponses];\n\nexport type CallWithResultFromHeaderData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/header';\n};\n\nexport type CallWithResultFromHeaderErrors = {\n    /**\n     * 400 server error\n     */\n    400: unknown;\n    /**\n     * 500 server error\n     */\n    500: unknown;\n};\n\nexport type CallWithResultFromHeaderResponses = {\n    /**\n     * Successful response\n     */\n    200: unknown;\n};\n\nexport type TestErrorCodeData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * Status code to return\n         */\n        status: number;\n    };\n    url: '/api/v{api-version}/error';\n};\n\nexport type TestErrorCodeErrors = {\n    /**\n     * Custom message: Internal Server Error\n     */\n    500: unknown;\n    /**\n     * Custom message: Not Implemented\n     */\n    501: unknown;\n    /**\n     * Custom message: Bad Gateway\n     */\n    502: unknown;\n    /**\n     * Custom message: Service Unavailable\n     */\n    503: unknown;\n};\n\nexport type TestErrorCodeResponses = {\n    /**\n     * Custom message: Successful response\n     */\n    200: unknown;\n};\n\nexport type NonAsciiæøåÆøÅöôêÊ字符串Data = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * Dummy input param\n         */\n        nonAsciiParamæøåÆØÅöôêÊ: number;\n    };\n    url: '/api/v{api-version}/non-ascii-æøåÆØÅöôêÊ字符串';\n};\n\nexport type NonAsciiæøåÆøÅöôêÊ字符串Responses = {\n    /**\n     * Successful response\n     */\n    200: Array<NonAsciiStringæøåÆøÅöôêÊ字符串>;\n};\n\nexport type NonAsciiæøåÆøÅöôêÊ字符串Response = NonAsciiæøåÆøÅöôêÊ字符串Responses[keyof NonAsciiæøåÆøÅöôêÊ字符串Responses];\n\nexport type PutWithFormUrlEncodedData = {\n    body: ArrayWithStrings;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/non-ascii-æøåÆØÅöôêÊ字符串';\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-fetch/default/client/client.gen.ts",
    "content": "// 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 (options: RequestOptions) => {\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 url = buildUrl(opts);\n\n    return { opts, url };\n  };\n\n  const request: Client['request'] = async (options) => {\n    // @ts-expect-error\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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-fetch/default/client/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type { Auth } from '../core/auth.gen';\nexport type { QuerySerializerOptions } from '../core/bodySerializer.gen';\nexport {\n  formDataBodySerializer,\n  jsonBodySerializer,\n  urlSearchParamsBodySerializer,\n} from '../core/bodySerializer.gen';\nexport { buildClientParams } from '../core/params.gen';\nexport { serializeQueryKeyValue } from '../core/queryKeySerializer.gen';\nexport { createClient } from './client.gen';\nexport type {\n  Client,\n  ClientOptions,\n  Config,\n  CreateClientConfig,\n  Options,\n  RequestOptions,\n  RequestResult,\n  ResolvedRequestOptions,\n  ResponseStyle,\n  TDataShape,\n} from './types.gen';\nexport { createConfig, mergeHeaders } from './utils.gen';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-fetch/default/client/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { Auth } from '../core/auth.gen';\nimport type {\n  ServerSentEventsOptions,\n  ServerSentEventsResult,\n} from '../core/serverSentEvents.gen';\nimport type { Client as CoreClient, Config as CoreConfig } from '../core/types.gen';\nimport type { Middleware } from './utils.gen';\n\nexport type ResponseStyle = 'data' | 'fields';\n\nexport interface Config<T extends ClientOptions = ClientOptions>\n  extends Omit<RequestInit, 'body' | 'headers' | 'method'>, CoreConfig {\n  /**\n   * Base URL for all requests made by this client.\n   */\n  baseUrl?: T['baseUrl'];\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   * Please don't use the Fetch client for Next.js applications. The `next`\n   * options won't have any effect.\n   *\n   * Install {@link https://www.npmjs.com/package/@hey-api/client-next `@hey-api/client-next`} instead.\n   */\n  next?: never;\n  /**\n   * Return the response data parsed in a specified format. By default, `auto`\n   * will infer the appropriate method from the `Content-Type` response header.\n   * You can override this behavior with any of the {@link Body} methods.\n   * Select `stream` if you don't want to parse response data at all.\n   *\n   * @default 'auto'\n   */\n  parseAs?: 'arrayBuffer' | 'auto' | 'blob' | 'formData' | 'json' | 'stream' | 'text';\n  /**\n   * Should we return only data or multiple fields (data, error, response, etc.)?\n   *\n   * @default 'fields'\n   */\n  responseStyle?: ResponseStyle;\n  /**\n   * Throw an error instead of returning it in the response?\n   *\n   * @default false\n   */\n  throwOnError?: T['throwOnError'];\n}\n\nexport interface RequestOptions<\n  TData = unknown,\n  TResponseStyle extends ResponseStyle = 'fields',\n  ThrowOnError extends boolean = boolean,\n  Url extends string = string,\n>\n  extends\n    Config<{\n      responseStyle: TResponseStyle;\n      throwOnError: ThrowOnError;\n    }>,\n    Pick<\n      ServerSentEventsOptions<TData>,\n      | 'onRequest'\n      | 'onSseError'\n      | 'onSseEvent'\n      | 'sseDefaultRetryDelay'\n      | 'sseMaxRetryAttempts'\n      | 'sseMaxRetryDelay'\n    > {\n  /**\n   * Any body that you want to add to your request.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/fetch#body}\n   */\n  body?: unknown;\n  path?: Record<string, unknown>;\n  query?: Record<string, unknown>;\n  /**\n   * Security mechanism(s) to use for the request.\n   */\n  security?: ReadonlyArray<Auth>;\n  url: Url;\n}\n\nexport interface ResolvedRequestOptions<\n  TResponseStyle extends ResponseStyle = 'fields',\n  ThrowOnError extends boolean = boolean,\n  Url extends string = string,\n> extends RequestOptions<unknown, TResponseStyle, ThrowOnError, Url> {\n  serializedBody?: string;\n}\n\nexport type RequestResult<\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = boolean,\n  TResponseStyle extends ResponseStyle = 'fields',\n> = ThrowOnError extends true\n  ? Promise<\n      TResponseStyle extends 'data'\n        ? TData extends Record<string, unknown>\n          ? TData[keyof TData]\n          : TData\n        : {\n            data: TData extends Record<string, unknown> ? TData[keyof TData] : TData;\n            request: Request;\n            response: Response;\n          }\n    >\n  : Promise<\n      TResponseStyle extends 'data'\n        ? (TData extends Record<string, unknown> ? TData[keyof TData] : TData) | undefined\n        : (\n            | {\n                data: TData extends Record<string, unknown> ? TData[keyof TData] : TData;\n                error: undefined;\n              }\n            | {\n                data: undefined;\n                error: TError extends Record<string, unknown> ? TError[keyof TError] : TError;\n              }\n          ) & {\n            request: Request;\n            response: Response;\n          }\n    >;\n\nexport interface ClientOptions {\n  baseUrl?: string;\n  responseStyle?: ResponseStyle;\n  throwOnError?: boolean;\n}\n\ntype MethodFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'>,\n) => RequestResult<TData, TError, ThrowOnError, TResponseStyle>;\n\ntype SseFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'>,\n) => Promise<ServerSentEventsResult<TData, TError>>;\n\ntype RequestFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'> &\n    Pick<Required<RequestOptions<TData, TResponseStyle, ThrowOnError>>, 'method'>,\n) => RequestResult<TData, TError, ThrowOnError, TResponseStyle>;\n\ntype BuildUrlFn = <\n  TData extends {\n    body?: unknown;\n    path?: Record<string, unknown>;\n    query?: Record<string, unknown>;\n    url: string;\n  },\n>(\n  options: TData & Options<TData>,\n) => string;\n\nexport type Client = CoreClient<RequestFn, Config, MethodFn, BuildUrlFn, SseFn> & {\n  interceptors: Middleware<Request, Response, unknown, ResolvedRequestOptions>;\n};\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 = ClientOptions> = (\n  override?: Config<ClientOptions & T>,\n) => Config<Required<ClientOptions> & T>;\n\nexport interface TDataShape {\n  body?: unknown;\n  headers?: unknown;\n  path?: unknown;\n  query?: unknown;\n  url: string;\n}\n\ntype OmitKeys<T, K> = Pick<T, Exclude<keyof T, K>>;\n\nexport type Options<\n  TData extends TDataShape = TDataShape,\n  ThrowOnError extends boolean = boolean,\n  TResponse = unknown,\n  TResponseStyle extends ResponseStyle = 'fields',\n> = OmitKeys<\n  RequestOptions<TResponse, TResponseStyle, ThrowOnError>,\n  'body' | 'path' | 'query' | 'url'\n> &\n  ([TData] extends [never] ? unknown : Omit<TData, 'url'>);\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-fetch/default/client/utils.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-fetch/default/client.gen.ts",
    "content": "// 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: 'http://localhost:3000/base' }));\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-fetch/default/core/auth.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-fetch/default/core/bodySerializer.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-fetch/default/core/params.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-fetch/default/core/pathSerializer.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-fetch/default/core/queryKeySerializer.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\n/**\n * JSON-friendly union that mirrors what Pinia Colada can hash.\n */\nexport type JsonValue =\n  | null\n  | string\n  | number\n  | boolean\n  | JsonValue[]\n  | { [key: string]: JsonValue };\n\n/**\n * Replacer that converts non-JSON values (bigint, Date, etc.) to safe substitutes.\n */\nexport const queryKeyJsonReplacer = (_key: string, value: unknown) => {\n  if (value === undefined || typeof value === 'function' || typeof value === 'symbol') {\n    return undefined;\n  }\n  if (typeof value === 'bigint') {\n    return value.toString();\n  }\n  if (value instanceof Date) {\n    return value.toISOString();\n  }\n  return value;\n};\n\n/**\n * Safely stringifies a value and parses it back into a JsonValue.\n */\nexport const stringifyToJsonValue = (input: unknown): JsonValue | undefined => {\n  try {\n    const json = JSON.stringify(input, queryKeyJsonReplacer);\n    if (json === undefined) {\n      return undefined;\n    }\n    return JSON.parse(json) as JsonValue;\n  } catch {\n    return undefined;\n  }\n};\n\n/**\n * Detects plain objects (including objects with a null prototype).\n */\nconst isPlainObject = (value: unknown): value is Record<string, unknown> => {\n  if (value === null || typeof value !== 'object') {\n    return false;\n  }\n  const prototype = Object.getPrototypeOf(value as object);\n  return prototype === Object.prototype || prototype === null;\n};\n\n/**\n * Turns URLSearchParams into a sorted JSON object for deterministic keys.\n */\nconst serializeSearchParams = (params: URLSearchParams): JsonValue => {\n  const entries = Array.from(params.entries()).sort(([a], [b]) => a.localeCompare(b));\n  const result: Record<string, JsonValue> = {};\n\n  for (const [key, value] of entries) {\n    const existing = result[key];\n    if (existing === undefined) {\n      result[key] = value;\n      continue;\n    }\n\n    if (Array.isArray(existing)) {\n      (existing as string[]).push(value);\n    } else {\n      result[key] = [existing, value];\n    }\n  }\n\n  return result;\n};\n\n/**\n * Normalizes any accepted value into a JSON-friendly shape for query keys.\n */\nexport const serializeQueryKeyValue = (value: unknown): JsonValue | undefined => {\n  if (value === null) {\n    return null;\n  }\n\n  if (typeof value === 'string' || typeof value === 'number' || typeof value === 'boolean') {\n    return value;\n  }\n\n  if (value === undefined || typeof value === 'function' || typeof value === 'symbol') {\n    return undefined;\n  }\n\n  if (typeof value === 'bigint') {\n    return value.toString();\n  }\n\n  if (value instanceof Date) {\n    return value.toISOString();\n  }\n\n  if (Array.isArray(value)) {\n    return stringifyToJsonValue(value);\n  }\n\n  if (typeof URLSearchParams !== 'undefined' && value instanceof URLSearchParams) {\n    return serializeSearchParams(value);\n  }\n\n  if (isPlainObject(value)) {\n    return stringifyToJsonValue(value);\n  }\n\n  return undefined;\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-fetch/default/core/serverSentEvents.gen.ts",
    "content": "// 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 const 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            // Normalize line endings: CRLF -> LF, then CR -> LF\n            buffer = buffer.replace(/\\r\\n/g, '\\n').replace(/\\r/g, '\\n');\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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-fetch/default/core/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { Auth, AuthToken } from './auth.gen';\nimport type { BodySerializer, QuerySerializer, QuerySerializerOptions } from './bodySerializer.gen';\n\nexport type HttpMethod =\n  | 'connect'\n  | 'delete'\n  | 'get'\n  | 'head'\n  | 'options'\n  | 'patch'\n  | 'post'\n  | 'put'\n  | 'trace';\n\nexport type Client<\n  RequestFn = never,\n  Config = unknown,\n  MethodFn = never,\n  BuildUrlFn = never,\n  SseFn = never,\n> = {\n  /**\n   * Returns the final request URL.\n   */\n  buildUrl: BuildUrlFn;\n  getConfig: () => Config;\n  request: RequestFn;\n  setConfig: (config: Config) => Config;\n} & {\n  [K in HttpMethod]: MethodFn;\n} & ([SseFn] extends [never] ? { sse?: never } : { sse: { [K in HttpMethod]: SseFn } });\n\nexport interface Config {\n  /**\n   * Auth token or a function returning auth token. The resolved value will be\n   * added to the request payload as defined by its `security` array.\n   */\n  auth?: ((auth: Auth) => Promise<AuthToken> | AuthToken) | AuthToken;\n  /**\n   * A function for serializing request body parameter. By default,\n   * {@link JSON.stringify()} will be used.\n   */\n  bodySerializer?: BodySerializer | null;\n  /**\n   * An object containing any HTTP headers that you want to pre-populate your\n   * `Headers` object with.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/Headers/Headers#init See more}\n   */\n  headers?:\n    | RequestInit['headers']\n    | Record<\n        string,\n        string | number | boolean | (string | number | boolean)[] | null | undefined | unknown\n      >;\n  /**\n   * The request method.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/fetch#method See more}\n   */\n  method?: Uppercase<HttpMethod>;\n  /**\n   * A function for serializing request query parameters. By default, arrays\n   * will be exploded in form style, objects will be exploded in deepObject\n   * style, and reserved characters are percent-encoded.\n   *\n   * This method will have no effect if the native `paramsSerializer()` Axios\n   * API function is used.\n   *\n   * {@link https://swagger.io/docs/specification/serialization/#query View examples}\n   */\n  querySerializer?: QuerySerializer | QuerySerializerOptions;\n  /**\n   * A function validating request data. This is useful if you want to ensure\n   * the request conforms to the desired shape, so it can be safely sent to\n   * the server.\n   */\n  requestValidator?: (data: unknown) => Promise<unknown>;\n  /**\n   * A function transforming response data before it's returned. This is useful\n   * for post-processing data, e.g. converting ISO strings into Date objects.\n   */\n  responseTransformer?: (data: unknown) => Promise<unknown>;\n  /**\n   * A function validating response data. This is useful if you want to ensure\n   * the response conforms to the desired shape, so it can be safely passed to\n   * the transformers and returned to the user.\n   */\n  responseValidator?: (data: unknown) => Promise<unknown>;\n}\n\ntype IsExactlyNeverOrNeverUndefined<T> = [T] extends [never]\n  ? true\n  : [T] extends [never | undefined]\n    ? [undefined] extends [T]\n      ? false\n      : true\n    : false;\n\nexport type OmitNever<T extends Record<string, unknown>> = {\n  [K in keyof T as IsExactlyNeverOrNeverUndefined<T[K]> extends true ? never : K]: T[K];\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-fetch/default/core/utils.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-fetch/default/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport { apiVVersionODataControllerCount, callToTestOrderOfParams, callWithDefaultOptionalParameters, callWithDefaultParameters, callWithDescriptions, callWithDuplicateResponses, callWithNoContentResponse, callWithParameters, callWithResponse, callWithResponseAndNoContentResponse, callWithResponses, callWithResultFromHeader, callWithWeirdParameterNames, collectionFormat, complexParams, complexTypes, deleteCallWithoutParametersAndResponse, deleteFoo, deprecatedCall, dummyA, dummyB, duplicateName, duplicateName2, duplicateName3, duplicateName4, export_, fileResponse, fooWow, getApiVbyApiVersionSimpleOperation, getCallWithOptionalParam, getCallWithoutParametersAndResponse, headCallWithoutParametersAndResponse, import_, multipartRequest, multipartResponse, nonAsciiæøåÆøÅöôêÊ字符串, type Options, optionsCallWithoutParametersAndResponse, patchApiVbyApiVersionNoTag, patchCallWithoutParametersAndResponse, postApiVbyApiVersionFormData, postApiVbyApiVersionRequestBody, postCallWithOptionalParam, postCallWithoutParametersAndResponse, putCallWithoutParametersAndResponse, putWithFormUrlEncoded, testErrorCode, types, uploadFile } from './sdk.gen';\nexport type { _3eNum1Период, _400, AdditionalPropertiesIntegerIssue, AdditionalPropertiesUnknownIssue, AdditionalPropertiesUnknownIssue2, AdditionalPropertiesUnknownIssue3, AdditionalPropertiesUnknownIssueWritable, AnyOfAnyAndNull, AnyOfArrays, ApiVVersionODataControllerCountData, ApiVVersionODataControllerCountResponse, ApiVVersionODataControllerCountResponses, ArrayWithAnyOfProperties, ArrayWithArray, ArrayWithBooleans, ArrayWithNumbers, ArrayWithProperties, ArrayWithReferences, ArrayWithStrings, CallToTestOrderOfParamsData, CallWithDefaultOptionalParametersData, CallWithDefaultParametersData, CallWithDescriptionsData, CallWithDuplicateResponsesData, CallWithDuplicateResponsesError, CallWithDuplicateResponsesErrors, CallWithDuplicateResponsesResponse, CallWithDuplicateResponsesResponses, CallWithNoContentResponseData, CallWithNoContentResponseResponse, CallWithNoContentResponseResponses, CallWithParametersData, CallWithResponseAndNoContentResponseData, CallWithResponseAndNoContentResponseResponse, CallWithResponseAndNoContentResponseResponses, CallWithResponseData, CallWithResponseResponse, CallWithResponseResponses, CallWithResponsesData, CallWithResponsesError, CallWithResponsesErrors, CallWithResponsesResponse, CallWithResponsesResponses, CallWithResultFromHeaderData, CallWithResultFromHeaderErrors, CallWithResultFromHeaderResponses, CallWithWeirdParameterNamesData, CamelCaseCommentWithBreaks, CharactersInDescription, ClientOptions, CollectionFormatData, CommentWithBackticks, CommentWithBackticksAndQuotes, CommentWithBreaks, CommentWithExpressionPlaceholders, CommentWithQuotes, CommentWithReservedCharacters, CommentWithSlashes, ComplexParamsData, ComplexParamsResponse, ComplexParamsResponses, ComplexTypesData, ComplexTypesErrors, ComplexTypesResponse, ComplexTypesResponses, CompositionBaseModel, CompositionExtendedModel, CompositionWithAllOfAndNullable, CompositionWithAnyOf, CompositionWithAnyOfAndNullable, CompositionWithAnyOfAnonymous, CompositionWithNestedAnyAndTypeNull, CompositionWithNestedAnyOfAndNull, CompositionWithOneOf, CompositionWithOneOfAndComplexArrayDictionary, CompositionWithOneOfAndNullable, CompositionWithOneOfAndProperties, CompositionWithOneOfAndSimpleArrayDictionary, CompositionWithOneOfAndSimpleDictionary, CompositionWithOneOfAnonymous, CompositionWithOneOfDiscriminator, ConstValue, Default, DeleteCallWithoutParametersAndResponseData, DeleteFooData, DeleteFooData2, DeleteFooData3, DeprecatedCallData, DeprecatedModel, DictionaryWithArray, DictionaryWithDictionary, DictionaryWithProperties, DictionaryWithPropertiesAndAdditionalProperties, DictionaryWithReference, DictionaryWithString, DummyAData, DummyAResponse, DummyAResponses, DummyBData, DummyBResponse, DummyBResponses, DuplicateName2Data, DuplicateName3Data, DuplicateName4Data, DuplicateNameData, EnumFromDescription, EnumWithExtensions, EnumWithNumbers, EnumWithReplacedCharacters, EnumWithStrings, EnumWithXEnumNames, ExportData, ExternalRefA, ExternalRefB, ExternalSharedModel, File, FileResponseData, FileResponseResponse, FileResponseResponses, FileWritable, FooWowData, FooWowResponses, FreeFormObjectWithAdditionalPropertiesEqEmptyObject, FreeFormObjectWithAdditionalPropertiesEqTrue, FreeFormObjectWithoutAdditionalProperties, GenericSchemaDuplicateIssue1SystemBoolean, GenericSchemaDuplicateIssue1SystemBooleanWritable, GenericSchemaDuplicateIssue1SystemString, GenericSchemaDuplicateIssue1SystemStringWritable, GetApiVbyApiVersionSimpleOperationData, GetApiVbyApiVersionSimpleOperationError, GetApiVbyApiVersionSimpleOperationErrors, GetApiVbyApiVersionSimpleOperationResponse, GetApiVbyApiVersionSimpleOperationResponses, GetCallWithOptionalParamData, GetCallWithoutParametersAndResponseData, HeadCallWithoutParametersAndResponseData, Import, ImportData, ImportResponse, ImportResponses, IoK8sApimachineryPkgApisMetaV1DeleteOptions, IoK8sApimachineryPkgApisMetaV1Preconditions, ModelCircle, ModelFromZendesk, ModelSquare, ModelThatExtends, ModelThatExtendsExtends, ModelWithAdditionalPropertiesEqTrue, ModelWithAdditionalPropertiesRef, ModelWithAnyOfConstantSizeArray, ModelWithAnyOfConstantSizeArrayAndIntersect, ModelWithAnyOfConstantSizeArrayNullable, ModelWithAnyOfConstantSizeArrayWithNSizeAndOptions, ModelWithAnyOfConstantSizeArrayWithNSizeAndOptionsWritable, ModelWithArray, ModelWithArrayReadOnlyAndWriteOnly, ModelWithArrayReadOnlyAndWriteOnlyWritable, ModelWithBackticksInDescription, ModelWithBoolean, ModelWithCircularReference, ModelWithConst, ModelWithConstantSizeArray, ModelWithDictionary, ModelWithDuplicateImports, ModelWithDuplicateProperties, ModelWithEnum, ModelWithEnumFromDescription, ModelWithEnumWithHyphen, ModelWithInteger, ModelWithNestedArrayEnums, ModelWithNestedArrayEnumsData, ModelWithNestedArrayEnumsDataBar, ModelWithNestedArrayEnumsDataFoo, ModelWithNestedCompositionEnums, ModelWithNestedEnums, ModelWithNestedProperties, ModelWithNullableObject, ModelWithNullableString, ModelWithNumericEnumUnion, ModelWithOneOfAndProperties, ModelWithOneOfEnum, ModelWithOrderedProperties, ModelWithPattern, ModelWithPatternWritable, ModelWithPrefixItemsConstantSizeArray, ModelWithProperties, ModelWithPropertiesWritable, ModelWithReadOnlyAndWriteOnly, ModelWithReadOnlyAndWriteOnlyWritable, ModelWithReference, ModelWithReferenceWritable, ModelWithString, ModelWithStringError, MultipartRequestData, MultipartResponseData, MultipartResponseResponse, MultipartResponseResponses, NestedAnyOfArraysNullable, NonAsciiæøåÆøÅöôêÊ字符串Data, NonAsciiæøåÆøÅöôêÊ字符串Response, NonAsciiæøåÆøÅöôêÊ字符串Responses, NonAsciiStringæøåÆøÅöôêÊ字符串, NullableObject, OneOfAllOfIssue, OneOfAllOfIssueWritable, OptionsCallWithoutParametersAndResponseData, Pageable, ParameterSimpleParameterUnused, PatchApiVbyApiVersionNoTagData, PatchApiVbyApiVersionNoTagResponses, PatchCallWithoutParametersAndResponseData, PostApiVbyApiVersionFormDataData, PostApiVbyApiVersionRequestBodyData, PostCallWithOptionalParamData, PostCallWithOptionalParamResponse, PostCallWithOptionalParamResponses, PostCallWithoutParametersAndResponseData, PostServiceWithEmptyTagResponse, PostServiceWithEmptyTagResponse2, PutCallWithoutParametersAndResponseData, PutWithFormUrlEncodedData, SchemaWithFormRestrictedKeys, SimpleBoolean, SimpleFile, SimpleFormData, SimpleInteger, SimpleParameter, SimpleReference, SimpleRequestBody, SimpleString, SimpleStringWithPattern, TestErrorCodeData, TestErrorCodeErrors, TestErrorCodeResponses, TypesData, TypesResponse, TypesResponses, UploadFileData, UploadFileResponse, UploadFileResponses, XFooBar } from './types.gen';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-fetch/default/sdk.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport { type Client, formDataBodySerializer, type Options as Options2, type TDataShape, urlSearchParamsBodySerializer } from './client';\nimport { client } from './client.gen';\nimport type { ApiVVersionODataControllerCountData, ApiVVersionODataControllerCountResponses, CallToTestOrderOfParamsData, CallWithDefaultOptionalParametersData, CallWithDefaultParametersData, CallWithDescriptionsData, CallWithDuplicateResponsesData, CallWithDuplicateResponsesErrors, CallWithDuplicateResponsesResponses, CallWithNoContentResponseData, CallWithNoContentResponseResponses, CallWithParametersData, CallWithResponseAndNoContentResponseData, CallWithResponseAndNoContentResponseResponses, CallWithResponseData, CallWithResponseResponses, CallWithResponsesData, CallWithResponsesErrors, CallWithResponsesResponses, CallWithResultFromHeaderData, CallWithResultFromHeaderErrors, CallWithResultFromHeaderResponses, CallWithWeirdParameterNamesData, CollectionFormatData, ComplexParamsData, ComplexParamsResponses, ComplexTypesData, ComplexTypesErrors, ComplexTypesResponses, DeleteCallWithoutParametersAndResponseData, DeleteFooData3, DeprecatedCallData, DummyAData, DummyAResponses, DummyBData, DummyBResponses, DuplicateName2Data, DuplicateName3Data, DuplicateName4Data, DuplicateNameData, ExportData, FileResponseData, FileResponseResponses, FooWowData, FooWowResponses, GetApiVbyApiVersionSimpleOperationData, GetApiVbyApiVersionSimpleOperationErrors, GetApiVbyApiVersionSimpleOperationResponses, GetCallWithOptionalParamData, GetCallWithoutParametersAndResponseData, HeadCallWithoutParametersAndResponseData, ImportData, ImportResponses, MultipartRequestData, MultipartResponseData, MultipartResponseResponses, NonAsciiæøåÆøÅöôêÊ字符串Data, NonAsciiæøåÆøÅöôêÊ字符串Responses, OptionsCallWithoutParametersAndResponseData, PatchApiVbyApiVersionNoTagData, PatchApiVbyApiVersionNoTagResponses, PatchCallWithoutParametersAndResponseData, PostApiVbyApiVersionFormDataData, PostApiVbyApiVersionRequestBodyData, PostCallWithOptionalParamData, PostCallWithOptionalParamResponses, PostCallWithoutParametersAndResponseData, PutCallWithoutParametersAndResponseData, PutWithFormUrlEncodedData, TestErrorCodeData, TestErrorCodeErrors, TestErrorCodeResponses, TypesData, TypesResponses, UploadFileData, UploadFileResponses } from './types.gen';\n\nexport type Options<TData extends TDataShape = TDataShape, ThrowOnError extends boolean = boolean> = Options2<TData, ThrowOnError> & {\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\nexport const export_ = <ThrowOnError extends boolean = false>(options?: Options<ExportData, ThrowOnError>) => (options?.client ?? client).get<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/no+tag', ...options });\n\nexport const patchApiVbyApiVersionNoTag = <ThrowOnError extends boolean = false>(options?: Options<PatchApiVbyApiVersionNoTagData, ThrowOnError>) => (options?.client ?? client).patch<PatchApiVbyApiVersionNoTagResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/no+tag', ...options });\n\nexport const import_ = <ThrowOnError extends boolean = false>(options: Options<ImportData, ThrowOnError>) => (options.client ?? client).post<ImportResponses, unknown, ThrowOnError>({\n    url: '/api/v{api-version}/no+tag',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options.headers\n    }\n});\n\nexport const fooWow = <ThrowOnError extends boolean = false>(options?: Options<FooWowData, ThrowOnError>) => (options?.client ?? client).put<FooWowResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/no+tag', ...options });\n\nexport const apiVVersionODataControllerCount = <ThrowOnError extends boolean = false>(options?: Options<ApiVVersionODataControllerCountData, ThrowOnError>) => (options?.client ?? client).get<ApiVVersionODataControllerCountResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple/$count', ...options });\n\nexport const getApiVbyApiVersionSimpleOperation = <ThrowOnError extends boolean = false>(options: Options<GetApiVbyApiVersionSimpleOperationData, ThrowOnError>) => (options.client ?? client).get<GetApiVbyApiVersionSimpleOperationResponses, GetApiVbyApiVersionSimpleOperationErrors, ThrowOnError>({ url: '/api/v{api-version}/simple:operation', ...options });\n\nexport const deleteCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<DeleteCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).delete<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const getCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<GetCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).get<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const headCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<HeadCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).head<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const optionsCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<OptionsCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).options<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const patchCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<PatchCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).patch<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const postCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<PostCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).post<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const putCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<PutCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).put<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const deleteFoo = <ThrowOnError extends boolean = false>(options: Options<DeleteFooData3, ThrowOnError>) => (options.client ?? client).delete<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/foo/{foo_param}/bar/{BarParam}', ...options });\n\nexport const callWithDescriptions = <ThrowOnError extends boolean = false>(options?: Options<CallWithDescriptionsData, ThrowOnError>) => (options?.client ?? client).post<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/descriptions', ...options });\n\n/**\n * @deprecated\n */\nexport const deprecatedCall = <ThrowOnError extends boolean = false>(options: Options<DeprecatedCallData, ThrowOnError>) => (options.client ?? client).post<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/parameters/deprecated', ...options });\n\nexport const callWithParameters = <ThrowOnError extends boolean = false>(options: Options<CallWithParametersData, ThrowOnError>) => (options.client ?? client).post<unknown, unknown, ThrowOnError>({\n    url: '/api/v{api-version}/parameters/{parameterPath}',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options.headers\n    }\n});\n\nexport const callWithWeirdParameterNames = <ThrowOnError extends boolean = false>(options: Options<CallWithWeirdParameterNamesData, ThrowOnError>) => (options.client ?? client).post<unknown, unknown, ThrowOnError>({\n    url: '/api/v{api-version}/parameters/{parameter.path.1}/{parameter-path-2}/{PARAMETER-PATH-3}',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options.headers\n    }\n});\n\nexport const getCallWithOptionalParam = <ThrowOnError extends boolean = false>(options: Options<GetCallWithOptionalParamData, ThrowOnError>) => (options.client ?? client).get<unknown, unknown, ThrowOnError>({\n    url: '/api/v{api-version}/parameters',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options.headers\n    }\n});\n\nexport const postCallWithOptionalParam = <ThrowOnError extends boolean = false>(options: Options<PostCallWithOptionalParamData, ThrowOnError>) => (options.client ?? client).post<PostCallWithOptionalParamResponses, unknown, ThrowOnError>({\n    url: '/api/v{api-version}/parameters',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options.headers\n    }\n});\n\nexport const postApiVbyApiVersionRequestBody = <ThrowOnError extends boolean = false>(options?: Options<PostApiVbyApiVersionRequestBodyData, ThrowOnError>) => (options?.client ?? client).post<unknown, unknown, ThrowOnError>({\n    url: '/api/v{api-version}/requestBody',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options?.headers\n    }\n});\n\nexport const postApiVbyApiVersionFormData = <ThrowOnError extends boolean = false>(options?: Options<PostApiVbyApiVersionFormDataData, ThrowOnError>) => (options?.client ?? client).post<unknown, unknown, ThrowOnError>({\n    ...formDataBodySerializer,\n    url: '/api/v{api-version}/formData',\n    ...options,\n    headers: {\n        'Content-Type': null,\n        ...options?.headers\n    }\n});\n\nexport const callWithDefaultParameters = <ThrowOnError extends boolean = false>(options?: Options<CallWithDefaultParametersData, ThrowOnError>) => (options?.client ?? client).get<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/defaults', ...options });\n\nexport const callWithDefaultOptionalParameters = <ThrowOnError extends boolean = false>(options?: Options<CallWithDefaultOptionalParametersData, ThrowOnError>) => (options?.client ?? client).post<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/defaults', ...options });\n\nexport const callToTestOrderOfParams = <ThrowOnError extends boolean = false>(options: Options<CallToTestOrderOfParamsData, ThrowOnError>) => (options.client ?? client).put<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/defaults', ...options });\n\nexport const duplicateName = <ThrowOnError extends boolean = false>(options?: Options<DuplicateNameData, ThrowOnError>) => (options?.client ?? client).delete<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/duplicate', ...options });\n\nexport const duplicateName2 = <ThrowOnError extends boolean = false>(options?: Options<DuplicateName2Data, ThrowOnError>) => (options?.client ?? client).get<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/duplicate', ...options });\n\nexport const duplicateName3 = <ThrowOnError extends boolean = false>(options?: Options<DuplicateName3Data, ThrowOnError>) => (options?.client ?? client).post<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/duplicate', ...options });\n\nexport const duplicateName4 = <ThrowOnError extends boolean = false>(options?: Options<DuplicateName4Data, ThrowOnError>) => (options?.client ?? client).put<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/duplicate', ...options });\n\nexport const callWithNoContentResponse = <ThrowOnError extends boolean = false>(options?: Options<CallWithNoContentResponseData, ThrowOnError>) => (options?.client ?? client).get<CallWithNoContentResponseResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/no-content', ...options });\n\nexport const callWithResponseAndNoContentResponse = <ThrowOnError extends boolean = false>(options?: Options<CallWithResponseAndNoContentResponseData, ThrowOnError>) => (options?.client ?? client).get<CallWithResponseAndNoContentResponseResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/multiple-tags/response-and-no-content', ...options });\n\nexport const dummyA = <ThrowOnError extends boolean = false>(options?: Options<DummyAData, ThrowOnError>) => (options?.client ?? client).get<DummyAResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/multiple-tags/a', ...options });\n\nexport const dummyB = <ThrowOnError extends boolean = false>(options?: Options<DummyBData, ThrowOnError>) => (options?.client ?? client).get<DummyBResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/multiple-tags/b', ...options });\n\nexport const callWithResponse = <ThrowOnError extends boolean = false>(options?: Options<CallWithResponseData, ThrowOnError>) => (options?.client ?? client).get<CallWithResponseResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/response', ...options });\n\nexport const callWithDuplicateResponses = <ThrowOnError extends boolean = false>(options?: Options<CallWithDuplicateResponsesData, ThrowOnError>) => (options?.client ?? client).post<CallWithDuplicateResponsesResponses, CallWithDuplicateResponsesErrors, ThrowOnError>({ url: '/api/v{api-version}/response', ...options });\n\nexport const callWithResponses = <ThrowOnError extends boolean = false>(options?: Options<CallWithResponsesData, ThrowOnError>) => (options?.client ?? client).put<CallWithResponsesResponses, CallWithResponsesErrors, ThrowOnError>({ url: '/api/v{api-version}/response', ...options });\n\nexport const collectionFormat = <ThrowOnError extends boolean = false>(options: Options<CollectionFormatData, ThrowOnError>) => (options.client ?? client).get<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/collectionFormat', ...options });\n\nexport const types = <ThrowOnError extends boolean = false>(options: Options<TypesData, ThrowOnError>) => (options.client ?? client).get<TypesResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/types', ...options });\n\nexport const uploadFile = <ThrowOnError extends boolean = false>(options: Options<UploadFileData, ThrowOnError>) => (options.client ?? client).post<UploadFileResponses, unknown, ThrowOnError>({\n    ...urlSearchParamsBodySerializer,\n    url: '/api/v{api-version}/upload',\n    ...options,\n    headers: {\n        'Content-Type': 'application/x-www-form-urlencoded',\n        ...options.headers\n    }\n});\n\nexport const fileResponse = <ThrowOnError extends boolean = false>(options: Options<FileResponseData, ThrowOnError>) => (options.client ?? client).get<FileResponseResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/file/{id}', ...options });\n\nexport const complexTypes = <ThrowOnError extends boolean = false>(options: Options<ComplexTypesData, ThrowOnError>) => (options.client ?? client).get<ComplexTypesResponses, ComplexTypesErrors, ThrowOnError>({\n    querySerializer: { parameters: { parameterObject: { object: { style: 'form' } } } },\n    url: '/api/v{api-version}/complex',\n    ...options\n});\n\nexport const multipartResponse = <ThrowOnError extends boolean = false>(options?: Options<MultipartResponseData, ThrowOnError>) => (options?.client ?? client).get<MultipartResponseResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/multipart', ...options });\n\nexport const multipartRequest = <ThrowOnError extends boolean = false>(options?: Options<MultipartRequestData, ThrowOnError>) => (options?.client ?? client).post<unknown, unknown, ThrowOnError>({\n    ...formDataBodySerializer,\n    url: '/api/v{api-version}/multipart',\n    ...options,\n    headers: {\n        'Content-Type': null,\n        ...options?.headers\n    }\n});\n\nexport const complexParams = <ThrowOnError extends boolean = false>(options: Options<ComplexParamsData, ThrowOnError>) => (options.client ?? client).put<ComplexParamsResponses, unknown, ThrowOnError>({\n    url: '/api/v{api-version}/complex/{id}',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json-patch+json',\n        ...options.headers\n    }\n});\n\nexport const callWithResultFromHeader = <ThrowOnError extends boolean = false>(options?: Options<CallWithResultFromHeaderData, ThrowOnError>) => (options?.client ?? client).post<CallWithResultFromHeaderResponses, CallWithResultFromHeaderErrors, ThrowOnError>({ url: '/api/v{api-version}/header', ...options });\n\nexport const testErrorCode = <ThrowOnError extends boolean = false>(options: Options<TestErrorCodeData, ThrowOnError>) => (options.client ?? client).post<TestErrorCodeResponses, TestErrorCodeErrors, ThrowOnError>({ url: '/api/v{api-version}/error', ...options });\n\nexport const nonAsciiæøåÆøÅöôêÊ字符串 = <ThrowOnError extends boolean = false>(options: Options<NonAsciiæøåÆøÅöôêÊ字符串Data, ThrowOnError>) => (options.client ?? client).post<NonAsciiæøåÆøÅöôêÊ字符串Responses, unknown, ThrowOnError>({ url: '/api/v{api-version}/non-ascii-æøåÆØÅöôêÊ字符串', ...options });\n\n/**\n * Login User\n */\nexport const putWithFormUrlEncoded = <ThrowOnError extends boolean = false>(options: Options<PutWithFormUrlEncodedData, ThrowOnError>) => (options.client ?? client).put<unknown, unknown, ThrowOnError>({\n    ...urlSearchParamsBodySerializer,\n    url: '/api/v{api-version}/non-ascii-æøåÆØÅöôêÊ字符串',\n    ...options,\n    headers: {\n        'Content-Type': 'application/x-www-form-urlencoded',\n        ...options.headers\n    }\n});\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-fetch/default/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type ClientOptions = {\n    baseUrl: 'http://localhost:3000/base' | (string & {});\n};\n\n/**\n * Model with number-only name\n */\nexport type _400 = string;\n\n/**\n * External ref to shared model (A)\n */\nexport type ExternalRefA = ExternalSharedModel;\n\n/**\n * External ref to shared model (B)\n */\nexport type ExternalRefB = ExternalSharedModel;\n\n/**\n * Testing multiline comments in string: First line\n * Second line\n *\n * Fourth line\n */\nexport type CamelCaseCommentWithBreaks = number;\n\n/**\n * Testing multiline comments in string: First line\n * Second line\n *\n * Fourth line\n */\nexport type CommentWithBreaks = number;\n\n/**\n * Testing backticks in string: `backticks` and ```multiple backticks``` should work\n */\nexport type CommentWithBackticks = number;\n\n/**\n * Testing backticks and quotes in string: `backticks`, 'quotes', \"double quotes\" and ```multiple backticks``` should work\n */\nexport type CommentWithBackticksAndQuotes = number;\n\n/**\n * Testing slashes in string: \\backwards\\\\\\ and /forwards/// should work\n */\nexport type CommentWithSlashes = number;\n\n/**\n * Testing expression placeholders in string: ${expression} should work\n */\nexport type CommentWithExpressionPlaceholders = number;\n\n/**\n * Testing quotes in string: 'single quote''' and \"double quotes\"\"\" should work\n */\nexport type CommentWithQuotes = number;\n\n/**\n * Testing reserved characters in string: * inline * and ** inline ** should work\n */\nexport type CommentWithReservedCharacters = number;\n\n/**\n * This is a simple number\n */\nexport type SimpleInteger = number;\n\n/**\n * This is a simple boolean\n */\nexport type SimpleBoolean = boolean;\n\n/**\n * This is a simple string\n */\nexport type SimpleString = string;\n\n/**\n * A string with non-ascii (unicode) characters valid in typescript identifiers (æøåÆØÅöÔèÈ字符串)\n */\nexport type NonAsciiStringæøåÆøÅöôêÊ字符串 = string;\n\n/**\n * This is a simple file\n */\nexport type SimpleFile = Blob | File;\n\n/**\n * This is a simple reference\n */\nexport type SimpleReference = ModelWithString;\n\n/**\n * This is a simple string\n */\nexport type SimpleStringWithPattern = string | null;\n\n/**\n * This is a simple enum with strings\n */\nexport type EnumWithStrings = 'Success' | 'Warning' | 'Error' | '\\'Single Quote\\'' | '\"Double Quotes\"' | 'Non-ascii: øæåôöØÆÅÔÖ字符串';\n\nexport type EnumWithReplacedCharacters = '\\'Single Quote\\'' | '\"Double Quotes\"' | 'øæåôöØÆÅÔÖ字符串' | 3.1 | '';\n\n/**\n * This is a simple enum with numbers\n */\nexport type EnumWithNumbers = 1 | 2 | 3 | 1.1 | 1.2 | 1.3 | 100 | 200 | 300 | -100 | -200 | -300 | -1.1 | -1.2 | -1.3;\n\n/**\n * Success=1,Warning=2,Error=3\n */\nexport type EnumFromDescription = number;\n\n/**\n * This is a simple enum with numbers\n */\nexport type EnumWithExtensions = 200 | 400 | 500;\n\nexport type EnumWithXEnumNames = 0 | 1 | 2;\n\n/**\n * This is a simple array with numbers\n */\nexport type ArrayWithNumbers = Array<number>;\n\n/**\n * This is a simple array with booleans\n */\nexport type ArrayWithBooleans = Array<boolean>;\n\n/**\n * This is a simple array with strings\n */\nexport type ArrayWithStrings = Array<string>;\n\n/**\n * This is a simple array with references\n */\nexport type ArrayWithReferences = Array<ModelWithString>;\n\n/**\n * This is a simple array containing an array\n */\nexport type ArrayWithArray = Array<Array<ModelWithString>>;\n\n/**\n * This is a simple array with properties\n */\nexport type ArrayWithProperties = Array<{\n    '16x16'?: CamelCaseCommentWithBreaks;\n    bar?: string;\n}>;\n\n/**\n * This is a simple array with any of properties\n */\nexport type ArrayWithAnyOfProperties = Array<{\n    foo?: string;\n} | {\n    bar?: string;\n}>;\n\nexport type AnyOfAnyAndNull = {\n    data?: unknown | null;\n};\n\n/**\n * This is a simple array with any of properties\n */\nexport type AnyOfArrays = {\n    results?: Array<{\n        foo?: string;\n    } | {\n        bar?: string;\n    }>;\n};\n\n/**\n * This is a string dictionary\n */\nexport type DictionaryWithString = {\n    [key: string]: string;\n};\n\nexport type DictionaryWithPropertiesAndAdditionalProperties = {\n    foo?: number;\n    bar?: boolean;\n    [key: string]: string | number | boolean | undefined;\n};\n\n/**\n * This is a string reference\n */\nexport type DictionaryWithReference = {\n    [key: string]: ModelWithString;\n};\n\n/**\n * This is a complex dictionary\n */\nexport type DictionaryWithArray = {\n    [key: string]: Array<ModelWithString>;\n};\n\n/**\n * This is a string dictionary\n */\nexport type DictionaryWithDictionary = {\n    [key: string]: {\n        [key: string]: string;\n    };\n};\n\n/**\n * This is a complex dictionary\n */\nexport type DictionaryWithProperties = {\n    [key: string]: {\n        foo?: string;\n        bar?: string;\n    };\n};\n\n/**\n * This is a model with one number property\n */\nexport type ModelWithInteger = {\n    /**\n     * This is a simple number property\n     */\n    prop?: number;\n};\n\n/**\n * This is a model with one boolean property\n */\nexport type ModelWithBoolean = {\n    /**\n     * This is a simple boolean property\n     */\n    prop?: boolean;\n};\n\n/**\n * This is a model with one string property\n */\nexport type ModelWithString = {\n    /**\n     * This is a simple string property\n     */\n    prop?: string;\n};\n\n/**\n * This is a model with one string property\n */\nexport type ModelWithStringError = {\n    /**\n     * This is a simple string property\n     */\n    prop?: string;\n};\n\n/**\n * `Comment` or `VoiceComment`. The JSON object for adding voice comments to tickets is different. See [Adding voice comments to tickets](/documentation/ticketing/managing-tickets/adding-voice-comments-to-tickets)\n */\nexport type ModelFromZendesk = string;\n\n/**\n * This is a model with one string property\n */\nexport type ModelWithNullableString = {\n    /**\n     * This is a simple string property\n     */\n    nullableProp1?: string | null;\n    /**\n     * This is a simple string property\n     */\n    nullableRequiredProp1: string | null;\n    /**\n     * This is a simple string property\n     */\n    nullableProp2?: string | null;\n    /**\n     * This is a simple string property\n     */\n    nullableRequiredProp2: string | null;\n    /**\n     * This is a simple enum with strings\n     */\n    'foo_bar-enum'?: 'Success' | 'Warning' | 'Error' | 'ØÆÅ字符串';\n};\n\n/**\n * This is a model with one enum\n */\nexport type ModelWithEnum = {\n    /**\n     * This is a simple enum with strings\n     */\n    'foo_bar-enum'?: 'Success' | 'Warning' | 'Error' | 'ØÆÅ字符串';\n    /**\n     * These are the HTTP error code enums\n     */\n    statusCode?: '100' | '200 FOO' | '300 FOO_BAR' | '400 foo-bar' | '500 foo.bar' | '600 foo&bar';\n    /**\n     * Simple boolean enum\n     */\n    bool?: true;\n};\n\n/**\n * This is a model with one enum with escaped name\n */\nexport type ModelWithEnumWithHyphen = {\n    /**\n     * Foo-Bar-Baz-Qux\n     */\n    'foo-bar-baz-qux'?: '3.0';\n};\n\n/**\n * This is a model with one enum\n */\nexport type ModelWithEnumFromDescription = {\n    /**\n     * Success=1,Warning=2,Error=3\n     */\n    test?: number;\n};\n\n/**\n * This is a model with nested enums\n */\nexport type ModelWithNestedEnums = {\n    dictionaryWithEnum?: {\n        [key: string]: 'Success' | 'Warning' | 'Error';\n    };\n    dictionaryWithEnumFromDescription?: {\n        [key: string]: number;\n    };\n    arrayWithEnum?: Array<'Success' | 'Warning' | 'Error'>;\n    arrayWithDescription?: Array<number>;\n    /**\n     * This is a simple enum with strings\n     */\n    'foo_bar-enum'?: 'Success' | 'Warning' | 'Error' | 'ØÆÅ字符串';\n};\n\n/**\n * This is a model with one property containing a reference\n */\nexport type ModelWithReference = {\n    prop?: ModelWithProperties;\n};\n\n/**\n * This is a model with one property containing an array\n */\nexport type ModelWithArrayReadOnlyAndWriteOnly = {\n    prop?: Array<ModelWithReadOnlyAndWriteOnly>;\n    propWithFile?: Array<Blob | File>;\n    propWithNumber?: Array<number>;\n};\n\n/**\n * This is a model with one property containing an array\n */\nexport type ModelWithArray = {\n    prop?: Array<ModelWithString>;\n    propWithFile?: Array<Blob | File>;\n    propWithNumber?: Array<number>;\n};\n\n/**\n * This is a model with one property containing a dictionary\n */\nexport type ModelWithDictionary = {\n    prop?: {\n        [key: string]: string;\n    };\n};\n\n/**\n * This is a deprecated model with a deprecated property\n *\n * @deprecated\n */\nexport type DeprecatedModel = {\n    /**\n     * This is a deprecated property\n     *\n     * @deprecated\n     */\n    prop?: string;\n};\n\n/**\n * This is a model with one property containing a circular reference\n */\nexport type ModelWithCircularReference = {\n    prop?: ModelWithCircularReference;\n};\n\n/**\n * This is a model with one property with a 'one of' relationship\n */\nexport type CompositionWithOneOf = {\n    propA?: ModelWithString | ModelWithEnum | ModelWithArray | ModelWithDictionary;\n};\n\n/**\n * This is a model with one property with a 'one of' relationship where the options are not $ref\n */\nexport type CompositionWithOneOfAnonymous = {\n    propA?: {\n        propA?: string;\n    } | string | number;\n};\n\n/**\n * Circle\n */\nexport type ModelCircle = {\n    kind: string;\n    radius?: number;\n};\n\n/**\n * Square\n */\nexport type ModelSquare = {\n    kind: string;\n    sideLength?: number;\n};\n\n/**\n * This is a model with one property with a 'one of' relationship where the options are not $ref\n */\nexport type CompositionWithOneOfDiscriminator = ({\n    kind: 'circle';\n} & ModelCircle) | ({\n    kind: 'square';\n} & ModelSquare);\n\n/**\n * This is a model with one property with a 'any of' relationship\n */\nexport type CompositionWithAnyOf = {\n    propA?: ModelWithString | ModelWithEnum | ModelWithArray | ModelWithDictionary;\n};\n\n/**\n * This is a model with one property with a 'any of' relationship where the options are not $ref\n */\nexport type CompositionWithAnyOfAnonymous = {\n    propA?: {\n        propA?: string;\n    } | string | number;\n};\n\n/**\n * This is a model with nested 'any of' property with a type null\n */\nexport type CompositionWithNestedAnyAndTypeNull = {\n    propA?: Array<ModelWithDictionary | null> | Array<ModelWithArray | null>;\n};\n\nexport type _3eNum1Период = 'Bird' | 'Dog';\n\nexport type ConstValue = 'ConstValue';\n\n/**\n * This is a model with one property with a 'any of' relationship where the options are not $ref\n */\nexport type CompositionWithNestedAnyOfAndNull = {\n    /**\n     * Scopes\n     */\n    propA?: Array<_3eNum1Период | ConstValue> | null;\n};\n\n/**\n * This is a model with one property with a 'one of' relationship\n */\nexport type CompositionWithOneOfAndNullable = {\n    propA?: {\n        boolean?: boolean;\n    } | ModelWithEnum | ModelWithArray | ModelWithDictionary | null;\n};\n\n/**\n * This is a model that contains a simple dictionary within composition\n */\nexport type CompositionWithOneOfAndSimpleDictionary = {\n    propA?: boolean | {\n        [key: string]: number;\n    };\n};\n\n/**\n * This is a model that contains a dictionary of simple arrays within composition\n */\nexport type CompositionWithOneOfAndSimpleArrayDictionary = {\n    propA?: boolean | {\n        [key: string]: Array<boolean>;\n    };\n};\n\n/**\n * This is a model that contains a dictionary of complex arrays (composited) within composition\n */\nexport type CompositionWithOneOfAndComplexArrayDictionary = {\n    propA?: boolean | {\n        [key: string]: Array<number | string>;\n    };\n};\n\n/**\n * This is a model with one property with a 'all of' relationship\n */\nexport type CompositionWithAllOfAndNullable = {\n    propA?: ({\n        boolean?: boolean;\n    } & ModelWithEnum & ModelWithArray & ModelWithDictionary) | null;\n};\n\n/**\n * This is a model with one property with a 'any of' relationship\n */\nexport type CompositionWithAnyOfAndNullable = {\n    propA?: {\n        boolean?: boolean;\n    } | ModelWithEnum | ModelWithArray | ModelWithDictionary | null;\n};\n\n/**\n * This is a base model with two simple optional properties\n */\nexport type CompositionBaseModel = {\n    firstName?: string;\n    lastname?: string;\n};\n\n/**\n * This is a model that extends the base model\n */\nexport type CompositionExtendedModel = CompositionBaseModel & {\n    age: number;\n    firstName: string;\n    lastname: string;\n};\n\n/**\n * This is a model with one nested property\n */\nexport type ModelWithProperties = {\n    required: string;\n    readonly requiredAndReadOnly: string;\n    requiredAndNullable: string | null;\n    string?: string;\n    number?: number;\n    boolean?: boolean;\n    reference?: ModelWithString;\n    'property with space'?: string;\n    default?: string;\n    try?: string;\n    readonly '@namespace.string'?: string;\n    readonly '@namespace.integer'?: number;\n};\n\n/**\n * This is a model with one nested property\n */\nexport type ModelWithNestedProperties = {\n    readonly first: {\n        readonly second: {\n            readonly third: string | null;\n        } | null;\n    } | null;\n};\n\n/**\n * This is a model with duplicated properties\n */\nexport type ModelWithDuplicateProperties = {\n    prop?: ModelWithString;\n};\n\n/**\n * This is a model with ordered properties\n */\nexport type ModelWithOrderedProperties = {\n    zebra?: string;\n    apple?: string;\n    hawaii?: string;\n};\n\n/**\n * This is a model with duplicated imports\n */\nexport type ModelWithDuplicateImports = {\n    propA?: ModelWithString;\n    propB?: ModelWithString;\n    propC?: ModelWithString;\n};\n\n/**\n * This is a model that extends another model\n */\nexport type ModelThatExtends = ModelWithString & {\n    propExtendsA?: string;\n    propExtendsB?: ModelWithString;\n};\n\n/**\n * This is a model that extends another model\n */\nexport type ModelThatExtendsExtends = ModelWithString & ModelThatExtends & {\n    propExtendsC?: string;\n    propExtendsD?: ModelWithString;\n};\n\n/**\n * This is a model that contains a some patterns\n */\nexport type ModelWithPattern = {\n    key: string;\n    name: string;\n    readonly enabled?: boolean;\n    readonly modified?: string;\n    id?: string;\n    text?: string;\n    patternWithSingleQuotes?: string;\n    patternWithNewline?: string;\n    patternWithBacktick?: string;\n    patternWithUnicode?: string;\n};\n\nexport type File = {\n    /**\n     * Id\n     */\n    readonly id?: string;\n    /**\n     * Updated at\n     */\n    readonly updated_at?: string;\n    /**\n     * Created at\n     */\n    readonly created_at?: string;\n    /**\n     * Mime\n     */\n    mime: string;\n    /**\n     * File\n     */\n    readonly file?: string;\n};\n\nexport type Default = {\n    name?: string;\n};\n\nexport type Pageable = {\n    page?: number;\n    size?: number;\n    sort?: Array<string>;\n};\n\n/**\n * This is a free-form object without additionalProperties.\n */\nexport type FreeFormObjectWithoutAdditionalProperties = {\n    [key: string]: unknown;\n};\n\n/**\n * This is a free-form object with additionalProperties: true.\n */\nexport type FreeFormObjectWithAdditionalPropertiesEqTrue = {\n    [key: string]: unknown;\n};\n\n/**\n * This is a free-form object with additionalProperties: {}.\n */\nexport type FreeFormObjectWithAdditionalPropertiesEqEmptyObject = {\n    [key: string]: unknown;\n};\n\nexport type ModelWithConst = {\n    String?: 'String';\n    number?: 0;\n    null?: null;\n    withType?: 'Some string';\n};\n\n/**\n * This is a model with one property and additionalProperties: true\n */\nexport type ModelWithAdditionalPropertiesEqTrue = {\n    /**\n     * This is a simple string property\n     */\n    prop?: string;\n    [key: string]: unknown;\n};\n\nexport type NestedAnyOfArraysNullable = {\n    nullableArray?: Array<string | boolean> | null;\n};\n\nexport type CompositionWithOneOfAndProperties = ({\n    foo: SimpleParameter;\n} | {\n    bar: NonAsciiStringæøåÆøÅöôêÊ字符串;\n}) & {\n    baz: number | null;\n    qux: number;\n};\n\n/**\n * An object that can be null\n */\nexport type NullableObject = {\n    foo?: string;\n} | null;\n\n/**\n * Some % character\n */\nexport type CharactersInDescription = string;\n\nexport type ModelWithNullableObject = {\n    data?: NullableObject;\n};\n\n/**\n * An object with additional properties that can be null (anyOf ref + null)\n */\nexport type ModelWithAdditionalPropertiesRef = {\n    [key: string]: NullableObject | null;\n};\n\nexport type ModelWithOneOfEnum = {\n    foo: 'Bar';\n} | {\n    foo: 'Baz';\n} | {\n    foo: 'Qux';\n} | {\n    content: string;\n    foo: 'Quux';\n} | {\n    content: [\n        string,\n        string\n    ];\n    foo: 'Corge';\n};\n\nexport type ModelWithNestedArrayEnumsDataFoo = 'foo' | 'bar';\n\nexport type ModelWithNestedArrayEnumsDataBar = 'baz' | 'qux';\n\nexport type ModelWithNestedArrayEnumsData = {\n    foo?: Array<ModelWithNestedArrayEnumsDataFoo>;\n    bar?: Array<ModelWithNestedArrayEnumsDataBar>;\n};\n\nexport type ModelWithNestedArrayEnums = {\n    array_strings?: Array<string>;\n    data?: ModelWithNestedArrayEnumsData;\n};\n\nexport type ModelWithNestedCompositionEnums = {\n    foo?: ModelWithNestedArrayEnumsDataFoo;\n};\n\nexport type ModelWithReadOnlyAndWriteOnly = {\n    foo: string;\n    readonly bar: string;\n};\n\nexport type ModelWithConstantSizeArray = [\n    number,\n    number\n];\n\nexport type ModelWithAnyOfConstantSizeArray = [\n    number | string,\n    number | string,\n    number | string\n];\n\nexport type ModelWithPrefixItemsConstantSizeArray = [\n    ModelWithInteger,\n    number | string,\n    string\n];\n\nexport type ModelWithAnyOfConstantSizeArrayNullable = [\n    number | null | string,\n    number | null | string,\n    number | null | string\n];\n\nexport type ModelWithAnyOfConstantSizeArrayWithNSizeAndOptions = [\n    number | Import,\n    number | Import\n];\n\nexport type ModelWithAnyOfConstantSizeArrayAndIntersect = [\n    number & string,\n    number & string\n];\n\nexport type ModelWithNumericEnumUnion = {\n    /**\n     * Период\n     */\n    value?: -10 | -1 | 0 | 1 | 3 | 6 | 12;\n};\n\n/**\n * Some description with `back ticks`\n */\nexport type ModelWithBackticksInDescription = {\n    /**\n     * The template `that` should be used for parsing and importing the contents of the CSV file.\n     *\n     * <br/><p>There is one placeholder currently supported:<ul>     <li><b>${x}</b> - refers to the n-th column in the CSV file, e.g. ${1}, ${2}, ...)</li></ul><p>Example of a correct JSON template:</p>\n     * <pre>\n     * [\n     * {\n     * \"resourceType\": \"Asset\",\n     * \"identifier\": {\n     * \"name\": \"${1}\",\n     * \"domain\": {\n     * \"name\": \"${2}\",\n     * \"community\": {\n     * \"name\": \"Some Community\"\n     * }\n     * }\n     * },\n     * \"attributes\" : {\n     * \"00000000-0000-0000-0000-000000003115\" : [ {\n     * \"value\" : \"${3}\"\n     * } ],\n     * \"00000000-0000-0000-0000-000000000222\" : [ {\n     * \"value\" : \"${4}\"\n     * } ]\n     * }\n     * }\n     * ]\n     * </pre>\n     */\n    template?: string;\n};\n\nexport type ModelWithOneOfAndProperties = (SimpleParameter | NonAsciiStringæøåÆøÅöôêÊ字符串) & {\n    baz: number | null;\n    qux: number;\n};\n\n/**\n * Model used to test deduplication strategy (unused)\n */\nexport type ParameterSimpleParameterUnused = string;\n\n/**\n * Model used to test deduplication strategy\n */\nexport type PostServiceWithEmptyTagResponse = string;\n\n/**\n * Model used to test deduplication strategy\n */\nexport type PostServiceWithEmptyTagResponse2 = string;\n\n/**\n * Model used to test deduplication strategy\n */\nexport type DeleteFooData = string;\n\n/**\n * Model used to test deduplication strategy\n */\nexport type DeleteFooData2 = string;\n\n/**\n * Model with restricted keyword name\n */\nexport type Import = string;\n\nexport type SchemaWithFormRestrictedKeys = {\n    description?: string;\n    'x-enum-descriptions'?: string;\n    'x-enum-varnames'?: string;\n    'x-enumNames'?: string;\n    title?: string;\n    object?: {\n        description?: string;\n        'x-enum-descriptions'?: string;\n        'x-enum-varnames'?: string;\n        'x-enumNames'?: string;\n        title?: string;\n    };\n    array?: Array<{\n        description?: string;\n        'x-enum-descriptions'?: string;\n        'x-enum-varnames'?: string;\n        'x-enumNames'?: string;\n        title?: string;\n    }>;\n};\n\n/**\n * This schema was giving PascalCase transformations a hard time\n */\nexport type IoK8sApimachineryPkgApisMetaV1DeleteOptions = {\n    /**\n     * Must be fulfilled before a deletion is carried out. If not possible, a 409 Conflict status will be returned.\n     */\n    preconditions?: IoK8sApimachineryPkgApisMetaV1Preconditions;\n};\n\n/**\n * This schema was giving PascalCase transformations a hard time\n */\nexport type IoK8sApimachineryPkgApisMetaV1Preconditions = {\n    /**\n     * Specifies the target ResourceVersion\n     */\n    resourceVersion?: string;\n    /**\n     * Specifies the target UID.\n     */\n    uid?: string;\n};\n\nexport type AdditionalPropertiesUnknownIssue = {\n    [key: string]: string | number;\n};\n\nexport type AdditionalPropertiesUnknownIssue2 = {\n    [key: string]: string | number;\n};\n\nexport type AdditionalPropertiesUnknownIssue3 = string & {\n    entries: {\n        [key: string]: AdditionalPropertiesUnknownIssue;\n    };\n};\n\nexport type AdditionalPropertiesIntegerIssue = {\n    value: number;\n    [key: string]: number;\n};\n\nexport type OneOfAllOfIssue = ((ConstValue | GenericSchemaDuplicateIssue1SystemBoolean) & _3eNum1Период) | GenericSchemaDuplicateIssue1SystemString;\n\nexport type GenericSchemaDuplicateIssue1SystemBoolean = {\n    item?: boolean;\n    error?: string | null;\n    readonly hasError?: boolean;\n    data?: {\n        [key: string]: never;\n    };\n};\n\nexport type GenericSchemaDuplicateIssue1SystemString = {\n    item?: string | null;\n    error?: string | null;\n    readonly hasError?: boolean;\n};\n\nexport type ExternalSharedModel = {\n    id: string;\n    name?: string;\n};\n\n/**\n * This is a model with one property containing a reference\n */\nexport type ModelWithReferenceWritable = {\n    prop?: ModelWithPropertiesWritable;\n};\n\n/**\n * This is a model with one property containing an array\n */\nexport type ModelWithArrayReadOnlyAndWriteOnlyWritable = {\n    prop?: Array<ModelWithReadOnlyAndWriteOnlyWritable>;\n    propWithFile?: Array<Blob | File>;\n    propWithNumber?: Array<number>;\n};\n\n/**\n * This is a model with one nested property\n */\nexport type ModelWithPropertiesWritable = {\n    required: string;\n    requiredAndNullable: string | null;\n    string?: string;\n    number?: number;\n    boolean?: boolean;\n    reference?: ModelWithString;\n    'property with space'?: string;\n    default?: string;\n    try?: string;\n};\n\n/**\n * This is a model that contains a some patterns\n */\nexport type ModelWithPatternWritable = {\n    key: string;\n    name: string;\n    id?: string;\n    text?: string;\n    patternWithSingleQuotes?: string;\n    patternWithNewline?: string;\n    patternWithBacktick?: string;\n    patternWithUnicode?: string;\n};\n\nexport type FileWritable = {\n    /**\n     * Mime\n     */\n    mime: string;\n};\n\nexport type ModelWithReadOnlyAndWriteOnlyWritable = {\n    foo: string;\n    baz: string;\n};\n\nexport type ModelWithAnyOfConstantSizeArrayWithNSizeAndOptionsWritable = [\n    number | Import,\n    number | Import\n];\n\nexport type AdditionalPropertiesUnknownIssueWritable = {\n    [key: string]: string | number;\n};\n\nexport type OneOfAllOfIssueWritable = ((ConstValue | GenericSchemaDuplicateIssue1SystemBoolean) & _3eNum1Период) | GenericSchemaDuplicateIssue1SystemString;\n\nexport type GenericSchemaDuplicateIssue1SystemBooleanWritable = {\n    item?: boolean;\n    error?: string | null;\n    data?: {\n        [key: string]: never;\n    };\n};\n\nexport type GenericSchemaDuplicateIssue1SystemStringWritable = {\n    item?: string | null;\n    error?: string | null;\n};\n\n/**\n * This is a reusable parameter\n */\nexport type SimpleParameter = string;\n\n/**\n * Parameter with illegal characters\n */\nexport type XFooBar = ModelWithString;\n\n/**\n * A reusable request body\n */\nexport type SimpleRequestBody = ModelWithString;\n\n/**\n * A reusable request body\n */\nexport type SimpleFormData = ModelWithString;\n\nexport type ExportData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no+tag';\n};\n\nexport type PatchApiVbyApiVersionNoTagData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no+tag';\n};\n\nexport type PatchApiVbyApiVersionNoTagResponses = {\n    /**\n     * OK\n     */\n    default: unknown;\n};\n\nexport type ImportData = {\n    body: ModelWithReadOnlyAndWriteOnlyWritable | ModelWithArrayReadOnlyAndWriteOnlyWritable;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no+tag';\n};\n\nexport type ImportResponses = {\n    /**\n     * Success\n     */\n    200: ModelFromZendesk;\n    /**\n     * Default success response\n     */\n    default: ModelWithReadOnlyAndWriteOnly;\n};\n\nexport type ImportResponse = ImportResponses[keyof ImportResponses];\n\nexport type FooWowData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no+tag';\n};\n\nexport type FooWowResponses = {\n    /**\n     * OK\n     */\n    default: unknown;\n};\n\nexport type ApiVVersionODataControllerCountData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple/$count';\n};\n\nexport type ApiVVersionODataControllerCountResponses = {\n    /**\n     * Success\n     */\n    200: ModelFromZendesk;\n};\n\nexport type ApiVVersionODataControllerCountResponse = ApiVVersionODataControllerCountResponses[keyof ApiVVersionODataControllerCountResponses];\n\nexport type GetApiVbyApiVersionSimpleOperationData = {\n    body?: never;\n    path: {\n        /**\n         * foo in method\n         */\n        foo_param: string;\n    };\n    query?: never;\n    url: '/api/v{api-version}/simple:operation';\n};\n\nexport type GetApiVbyApiVersionSimpleOperationErrors = {\n    /**\n     * Default error response\n     */\n    default: ModelWithBoolean;\n};\n\nexport type GetApiVbyApiVersionSimpleOperationError = GetApiVbyApiVersionSimpleOperationErrors[keyof GetApiVbyApiVersionSimpleOperationErrors];\n\nexport type GetApiVbyApiVersionSimpleOperationResponses = {\n    /**\n     * Response is a simple number\n     */\n    200: number;\n};\n\nexport type GetApiVbyApiVersionSimpleOperationResponse = GetApiVbyApiVersionSimpleOperationResponses[keyof GetApiVbyApiVersionSimpleOperationResponses];\n\nexport type DeleteCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type GetCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type HeadCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type OptionsCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type PatchCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type PostCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type PutCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type DeleteFooData3 = {\n    body?: never;\n    headers: {\n        /**\n         * Parameter with illegal characters\n         */\n        'x-Foo-Bar': ModelWithString;\n    };\n    path: {\n        /**\n         * foo in method\n         */\n        foo_param: string;\n        /**\n         * bar in method\n         */\n        BarParam: string;\n    };\n    query?: never;\n    url: '/api/v{api-version}/foo/{foo_param}/bar/{BarParam}';\n};\n\nexport type CallWithDescriptionsData = {\n    body?: never;\n    path?: never;\n    query?: {\n        /**\n         * Testing multiline comments in string: First line\n         * Second line\n         *\n         * Fourth line\n         */\n        parameterWithBreaks?: string;\n        /**\n         * Testing backticks in string: `backticks` and ```multiple backticks``` should work\n         */\n        parameterWithBackticks?: string;\n        /**\n         * Testing slashes in string: \\backwards\\\\\\ and /forwards/// should work\n         */\n        parameterWithSlashes?: string;\n        /**\n         * Testing expression placeholders in string: ${expression} should work\n         */\n        parameterWithExpressionPlaceholders?: string;\n        /**\n         * Testing quotes in string: 'single quote''' and \"double quotes\"\"\" should work\n         */\n        parameterWithQuotes?: string;\n        /**\n         * Testing reserved characters in string: * inline * and ** inline ** should work\n         */\n        parameterWithReservedCharacters?: string;\n    };\n    url: '/api/v{api-version}/descriptions';\n};\n\nexport type DeprecatedCallData = {\n    body?: never;\n    headers: {\n        /**\n         * This parameter is deprecated\n         *\n         * @deprecated\n         */\n        parameter: DeprecatedModel | null;\n    };\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/parameters/deprecated';\n};\n\nexport type CallWithParametersData = {\n    /**\n     * This is the parameter that goes into the body\n     */\n    body: {\n        [key: string]: unknown;\n    } | null;\n    headers: {\n        /**\n         * This is the parameter that goes into the header\n         */\n        parameterHeader: string | null;\n    };\n    path: {\n        /**\n         * This is the parameter that goes into the path\n         */\n        parameterPath: string | null;\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string | null;\n    };\n    query: {\n        foo_ref_enum?: ModelWithNestedArrayEnumsDataFoo;\n        foo_all_of_enum: ModelWithNestedArrayEnumsDataFoo;\n        /**\n         * This is the parameter that goes into the query params\n         */\n        cursor: string | null;\n    };\n    url: '/api/v{api-version}/parameters/{parameterPath}';\n};\n\nexport type CallWithWeirdParameterNamesData = {\n    /**\n     * This is the parameter that goes into the body\n     */\n    body: ModelWithString | null;\n    headers: {\n        /**\n         * This is the parameter that goes into the request header\n         */\n        'parameter.header': string | null;\n    };\n    path: {\n        /**\n         * This is the parameter that goes into the path\n         */\n        'parameter.path.1'?: string;\n        /**\n         * This is the parameter that goes into the path\n         */\n        'parameter-path-2'?: string;\n        /**\n         * This is the parameter that goes into the path\n         */\n        'PARAMETER-PATH-3'?: string;\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string | null;\n    };\n    query: {\n        /**\n         * This is the parameter with a reserved keyword\n         */\n        default?: string;\n        /**\n         * This is the parameter that goes into the request query params\n         */\n        'parameter-query': string | null;\n    };\n    url: '/api/v{api-version}/parameters/{parameter.path.1}/{parameter-path-2}/{PARAMETER-PATH-3}';\n};\n\nexport type GetCallWithOptionalParamData = {\n    /**\n     * This is a required parameter\n     */\n    body: ModelWithOneOfEnum;\n    path?: never;\n    query?: {\n        /**\n         * This is an optional parameter\n         */\n        page?: number;\n    };\n    url: '/api/v{api-version}/parameters';\n};\n\nexport type PostCallWithOptionalParamData = {\n    /**\n     * This is an optional parameter\n     */\n    body?: {\n        offset?: number | null;\n    };\n    path?: never;\n    query: {\n        /**\n         * This is a required parameter\n         */\n        parameter: Pageable;\n    };\n    url: '/api/v{api-version}/parameters';\n};\n\nexport type PostCallWithOptionalParamResponses = {\n    /**\n     * Response is a simple number\n     */\n    200: number;\n    /**\n     * Success\n     */\n    204: void;\n};\n\nexport type PostCallWithOptionalParamResponse = PostCallWithOptionalParamResponses[keyof PostCallWithOptionalParamResponses];\n\nexport type PostApiVbyApiVersionRequestBodyData = {\n    /**\n     * A reusable request body\n     */\n    body?: SimpleRequestBody;\n    path?: never;\n    query?: {\n        /**\n         * This is a reusable parameter\n         */\n        parameter?: string;\n    };\n    url: '/api/v{api-version}/requestBody';\n};\n\nexport type PostApiVbyApiVersionFormDataData = {\n    /**\n     * A reusable request body\n     */\n    body?: SimpleFormData;\n    path?: never;\n    query?: {\n        /**\n         * This is a reusable parameter\n         */\n        parameter?: string;\n    };\n    url: '/api/v{api-version}/formData';\n};\n\nexport type CallWithDefaultParametersData = {\n    body?: never;\n    path?: never;\n    query?: {\n        /**\n         * This is a simple string with default value\n         */\n        parameterString?: string | null;\n        /**\n         * This is a simple number with default value\n         */\n        parameterNumber?: number | null;\n        /**\n         * This is a simple boolean with default value\n         */\n        parameterBoolean?: boolean | null;\n        /**\n         * This is a simple enum with default value\n         */\n        parameterEnum?: 'Success' | 'Warning' | 'Error';\n        /**\n         * This is a simple model with default value\n         */\n        parameterModel?: ModelWithString | null;\n    };\n    url: '/api/v{api-version}/defaults';\n};\n\nexport type CallWithDefaultOptionalParametersData = {\n    body?: never;\n    path?: never;\n    query?: {\n        /**\n         * This is a simple string that is optional with default value\n         */\n        parameterString?: string;\n        /**\n         * This is a simple number that is optional with default value\n         */\n        parameterNumber?: number;\n        /**\n         * This is a simple boolean that is optional with default value\n         */\n        parameterBoolean?: boolean;\n        /**\n         * This is a simple enum that is optional with default value\n         */\n        parameterEnum?: 'Success' | 'Warning' | 'Error';\n        /**\n         * This is a simple model that is optional with default value\n         */\n        parameterModel?: ModelWithString;\n    };\n    url: '/api/v{api-version}/defaults';\n};\n\nexport type CallToTestOrderOfParamsData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * This is a optional string with default\n         */\n        parameterOptionalStringWithDefault?: string;\n        /**\n         * This is a optional string with empty default\n         */\n        parameterOptionalStringWithEmptyDefault?: string;\n        /**\n         * This is a optional string with no default\n         */\n        parameterOptionalStringWithNoDefault?: string;\n        /**\n         * This is a string with default\n         */\n        parameterStringWithDefault: string;\n        /**\n         * This is a string with empty default\n         */\n        parameterStringWithEmptyDefault: string;\n        /**\n         * This is a string with no default\n         */\n        parameterStringWithNoDefault: string;\n        /**\n         * This is a string that can be null with no default\n         */\n        parameterStringNullableWithNoDefault?: string | null;\n        /**\n         * This is a string that can be null with default\n         */\n        parameterStringNullableWithDefault?: string | null;\n    };\n    url: '/api/v{api-version}/defaults';\n};\n\nexport type DuplicateNameData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/duplicate';\n};\n\nexport type DuplicateName2Data = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/duplicate';\n};\n\nexport type DuplicateName3Data = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/duplicate';\n};\n\nexport type DuplicateName4Data = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/duplicate';\n};\n\nexport type CallWithNoContentResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no-content';\n};\n\nexport type CallWithNoContentResponseResponses = {\n    /**\n     * Success\n     */\n    204: void;\n};\n\nexport type CallWithNoContentResponseResponse = CallWithNoContentResponseResponses[keyof CallWithNoContentResponseResponses];\n\nexport type CallWithResponseAndNoContentResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multiple-tags/response-and-no-content';\n};\n\nexport type CallWithResponseAndNoContentResponseResponses = {\n    /**\n     * Response is a simple number\n     */\n    200: number;\n    /**\n     * Success\n     */\n    204: void;\n};\n\nexport type CallWithResponseAndNoContentResponseResponse = CallWithResponseAndNoContentResponseResponses[keyof CallWithResponseAndNoContentResponseResponses];\n\nexport type DummyAData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multiple-tags/a';\n};\n\nexport type DummyAResponses = {\n    200: _400;\n};\n\nexport type DummyAResponse = DummyAResponses[keyof DummyAResponses];\n\nexport type DummyBData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multiple-tags/b';\n};\n\nexport type DummyBResponses = {\n    /**\n     * Success\n     */\n    204: void;\n};\n\nexport type DummyBResponse = DummyBResponses[keyof DummyBResponses];\n\nexport type CallWithResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/response';\n};\n\nexport type CallWithResponseResponses = {\n    default: Import;\n};\n\nexport type CallWithResponseResponse = CallWithResponseResponses[keyof CallWithResponseResponses];\n\nexport type CallWithDuplicateResponsesData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/response';\n};\n\nexport type CallWithDuplicateResponsesErrors = {\n    /**\n     * Message for 500 error\n     */\n    500: ModelWithStringError;\n    /**\n     * Message for 501 error\n     */\n    501: ModelWithStringError;\n    /**\n     * Message for 502 error\n     */\n    502: ModelWithStringError;\n    /**\n     * Message for 4XX errors\n     */\n    '4XX': DictionaryWithArray;\n    /**\n     * Default error response\n     */\n    default: ModelWithBoolean;\n};\n\nexport type CallWithDuplicateResponsesError = CallWithDuplicateResponsesErrors[keyof CallWithDuplicateResponsesErrors];\n\nexport type CallWithDuplicateResponsesResponses = {\n    /**\n     * Message for 200 response\n     */\n    200: ModelWithBoolean & ModelWithInteger;\n    /**\n     * Message for 201 response\n     */\n    201: ModelWithString;\n    /**\n     * Message for 202 response\n     */\n    202: ModelWithString;\n};\n\nexport type CallWithDuplicateResponsesResponse = CallWithDuplicateResponsesResponses[keyof CallWithDuplicateResponsesResponses];\n\nexport type CallWithResponsesData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/response';\n};\n\nexport type CallWithResponsesErrors = {\n    /**\n     * Message for 500 error\n     */\n    500: ModelWithStringError;\n    /**\n     * Message for 501 error\n     */\n    501: ModelWithStringError;\n    /**\n     * Message for 502 error\n     */\n    502: ModelWithStringError;\n    /**\n     * Message for default response\n     */\n    default: ModelWithStringError;\n};\n\nexport type CallWithResponsesError = CallWithResponsesErrors[keyof CallWithResponsesErrors];\n\nexport type CallWithResponsesResponses = {\n    /**\n     * Message for 200 response\n     */\n    200: {\n        readonly '@namespace.string'?: string;\n        readonly '@namespace.integer'?: number;\n        readonly value?: Array<ModelWithString>;\n    };\n    /**\n     * Message for 201 response\n     */\n    201: ModelThatExtends;\n    /**\n     * Message for 202 response\n     */\n    202: ModelThatExtendsExtends;\n};\n\nexport type CallWithResponsesResponse = CallWithResponsesResponses[keyof CallWithResponsesResponses];\n\nexport type CollectionFormatData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * This is an array parameter that is sent as csv format (comma-separated values)\n         */\n        parameterArrayCSV: Array<string> | null;\n        /**\n         * This is an array parameter that is sent as ssv format (space-separated values)\n         */\n        parameterArraySSV: Array<string> | null;\n        /**\n         * This is an array parameter that is sent as tsv format (tab-separated values)\n         */\n        parameterArrayTSV: Array<string> | null;\n        /**\n         * This is an array parameter that is sent as pipes format (pipe-separated values)\n         */\n        parameterArrayPipes: Array<string> | null;\n        /**\n         * This is an array parameter that is sent as multi format (multiple parameter instances)\n         */\n        parameterArrayMulti: Array<string> | null;\n    };\n    url: '/api/v{api-version}/collectionFormat';\n};\n\nexport type TypesData = {\n    body?: never;\n    path?: {\n        /**\n         * This is a number parameter\n         */\n        id?: number;\n    };\n    query: {\n        /**\n         * This is a number parameter\n         */\n        parameterNumber: number;\n        /**\n         * This is a string parameter\n         */\n        parameterString: string | null;\n        /**\n         * This is a boolean parameter\n         */\n        parameterBoolean: boolean | null;\n        /**\n         * This is an object parameter\n         */\n        parameterObject: {\n            [key: string]: unknown;\n        } | null;\n        /**\n         * This is an array parameter\n         */\n        parameterArray: Array<string> | null;\n        /**\n         * This is a dictionary parameter\n         */\n        parameterDictionary: {\n            [key: string]: unknown;\n        } | null;\n        /**\n         * This is an enum parameter\n         */\n        parameterEnum: 'Success' | 'Warning' | 'Error' | null;\n    };\n    url: '/api/v{api-version}/types';\n};\n\nexport type TypesResponses = {\n    /**\n     * Response is a simple number\n     */\n    200: number;\n    /**\n     * Response is a simple string\n     */\n    201: string;\n    /**\n     * Response is a simple boolean\n     */\n    202: boolean;\n    /**\n     * Response is a simple object\n     */\n    203: {\n        [key: string]: unknown;\n    };\n};\n\nexport type TypesResponse = TypesResponses[keyof TypesResponses];\n\nexport type UploadFileData = {\n    body: Blob | File;\n    path: {\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string | null;\n    };\n    query?: never;\n    url: '/api/v{api-version}/upload';\n};\n\nexport type UploadFileResponses = {\n    200: boolean;\n};\n\nexport type UploadFileResponse = UploadFileResponses[keyof UploadFileResponses];\n\nexport type FileResponseData = {\n    body?: never;\n    path: {\n        id: string;\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string;\n    };\n    query?: never;\n    url: '/api/v{api-version}/file/{id}';\n};\n\nexport type FileResponseResponses = {\n    /**\n     * Success\n     */\n    200: Blob | File;\n};\n\nexport type FileResponseResponse = FileResponseResponses[keyof FileResponseResponses];\n\nexport type ComplexTypesData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * Parameter containing object\n         */\n        parameterObject: {\n            first?: {\n                second?: {\n                    third?: string;\n                };\n            };\n        };\n        /**\n         * Parameter containing reference\n         */\n        parameterReference: ModelWithString;\n    };\n    url: '/api/v{api-version}/complex';\n};\n\nexport type ComplexTypesErrors = {\n    /**\n     * 400 `server` error\n     */\n    400: unknown;\n    /**\n     * 500 server error\n     */\n    500: unknown;\n};\n\nexport type ComplexTypesResponses = {\n    /**\n     * Successful response\n     */\n    200: Array<ModelWithString>;\n};\n\nexport type ComplexTypesResponse = ComplexTypesResponses[keyof ComplexTypesResponses];\n\nexport type MultipartResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multipart';\n};\n\nexport type MultipartResponseResponses = {\n    /**\n     * OK\n     */\n    200: {\n        file?: Blob | File;\n        metadata?: {\n            foo?: string;\n            bar?: string;\n        };\n    };\n};\n\nexport type MultipartResponseResponse = MultipartResponseResponses[keyof MultipartResponseResponses];\n\nexport type MultipartRequestData = {\n    body?: {\n        content?: Blob | File;\n        data?: ModelWithString | null;\n    };\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multipart';\n};\n\nexport type ComplexParamsData = {\n    body?: {\n        readonly key: string | null;\n        name: string | null;\n        enabled?: boolean;\n        type: 'Monkey' | 'Horse' | 'Bird';\n        listOfModels?: Array<ModelWithString> | null;\n        listOfStrings?: Array<string> | null;\n        parameters: ModelWithString | ModelWithEnum | ModelWithArray | ModelWithDictionary;\n        readonly user?: {\n            readonly id?: number;\n            readonly name?: string | null;\n        };\n    };\n    path: {\n        id: number;\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string;\n    };\n    query?: never;\n    url: '/api/v{api-version}/complex/{id}';\n};\n\nexport type ComplexParamsResponses = {\n    /**\n     * Success\n     */\n    200: ModelWithString;\n};\n\nexport type ComplexParamsResponse = ComplexParamsResponses[keyof ComplexParamsResponses];\n\nexport type CallWithResultFromHeaderData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/header';\n};\n\nexport type CallWithResultFromHeaderErrors = {\n    /**\n     * 400 server error\n     */\n    400: unknown;\n    /**\n     * 500 server error\n     */\n    500: unknown;\n};\n\nexport type CallWithResultFromHeaderResponses = {\n    /**\n     * Successful response\n     */\n    200: unknown;\n};\n\nexport type TestErrorCodeData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * Status code to return\n         */\n        status: number;\n    };\n    url: '/api/v{api-version}/error';\n};\n\nexport type TestErrorCodeErrors = {\n    /**\n     * Custom message: Internal Server Error\n     */\n    500: unknown;\n    /**\n     * Custom message: Not Implemented\n     */\n    501: unknown;\n    /**\n     * Custom message: Bad Gateway\n     */\n    502: unknown;\n    /**\n     * Custom message: Service Unavailable\n     */\n    503: unknown;\n};\n\nexport type TestErrorCodeResponses = {\n    /**\n     * Custom message: Successful response\n     */\n    200: unknown;\n};\n\nexport type NonAsciiæøåÆøÅöôêÊ字符串Data = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * Dummy input param\n         */\n        nonAsciiParamæøåÆØÅöôêÊ: number;\n    };\n    url: '/api/v{api-version}/non-ascii-æøåÆØÅöôêÊ字符串';\n};\n\nexport type NonAsciiæøåÆøÅöôêÊ字符串Responses = {\n    /**\n     * Successful response\n     */\n    200: Array<NonAsciiStringæøåÆøÅöôêÊ字符串>;\n};\n\nexport type NonAsciiæøåÆøÅöôêÊ字符串Response = NonAsciiæøåÆøÅöôêÊ字符串Responses[keyof NonAsciiæøåÆøÅöôêÊ字符串Responses];\n\nexport type PutWithFormUrlEncodedData = {\n    body: ArrayWithStrings;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/non-ascii-æøåÆØÅöôêÊ字符串';\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-fetch/import-file-extension-ts/client/client.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport { createSseClient } from '../core/serverSentEvents.gen.ts';\nimport type { HttpMethod } from '../core/types.gen.ts';\nimport { getValidRequestBody } from '../core/utils.gen.ts';\nimport type { Client, Config, RequestOptions, ResolvedRequestOptions } from './types.gen.ts';\nimport {\n  buildUrl,\n  createConfig,\n  createInterceptors,\n  getParseAs,\n  mergeConfigs,\n  mergeHeaders,\n  setAuthParams,\n} from './utils.gen.ts';\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 (options: RequestOptions) => {\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 url = buildUrl(opts);\n\n    return { opts, url };\n  };\n\n  const request: Client['request'] = async (options) => {\n    // @ts-expect-error\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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-fetch/import-file-extension-ts/client/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type { Auth } from '../core/auth.gen.ts';\nexport type { QuerySerializerOptions } from '../core/bodySerializer.gen.ts';\nexport {\n  formDataBodySerializer,\n  jsonBodySerializer,\n  urlSearchParamsBodySerializer,\n} from '../core/bodySerializer.gen.ts';\nexport { buildClientParams } from '../core/params.gen.ts';\nexport { serializeQueryKeyValue } from '../core/queryKeySerializer.gen.ts';\nexport { createClient } from './client.gen.ts';\nexport type {\n  Client,\n  ClientOptions,\n  Config,\n  CreateClientConfig,\n  Options,\n  RequestOptions,\n  RequestResult,\n  ResolvedRequestOptions,\n  ResponseStyle,\n  TDataShape,\n} from './types.gen.ts';\nexport { createConfig, mergeHeaders } from './utils.gen.ts';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-fetch/import-file-extension-ts/client/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { Auth } from '../core/auth.gen.ts';\nimport type {\n  ServerSentEventsOptions,\n  ServerSentEventsResult,\n} from '../core/serverSentEvents.gen.ts';\nimport type { Client as CoreClient, Config as CoreConfig } from '../core/types.gen.ts';\nimport type { Middleware } from './utils.gen.ts';\n\nexport type ResponseStyle = 'data' | 'fields';\n\nexport interface Config<T extends ClientOptions = ClientOptions>\n  extends Omit<RequestInit, 'body' | 'headers' | 'method'>, CoreConfig {\n  /**\n   * Base URL for all requests made by this client.\n   */\n  baseUrl?: T['baseUrl'];\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   * Please don't use the Fetch client for Next.js applications. The `next`\n   * options won't have any effect.\n   *\n   * Install {@link https://www.npmjs.com/package/@hey-api/client-next `@hey-api/client-next`} instead.\n   */\n  next?: never;\n  /**\n   * Return the response data parsed in a specified format. By default, `auto`\n   * will infer the appropriate method from the `Content-Type` response header.\n   * You can override this behavior with any of the {@link Body} methods.\n   * Select `stream` if you don't want to parse response data at all.\n   *\n   * @default 'auto'\n   */\n  parseAs?: 'arrayBuffer' | 'auto' | 'blob' | 'formData' | 'json' | 'stream' | 'text';\n  /**\n   * Should we return only data or multiple fields (data, error, response, etc.)?\n   *\n   * @default 'fields'\n   */\n  responseStyle?: ResponseStyle;\n  /**\n   * Throw an error instead of returning it in the response?\n   *\n   * @default false\n   */\n  throwOnError?: T['throwOnError'];\n}\n\nexport interface RequestOptions<\n  TData = unknown,\n  TResponseStyle extends ResponseStyle = 'fields',\n  ThrowOnError extends boolean = boolean,\n  Url extends string = string,\n>\n  extends\n    Config<{\n      responseStyle: TResponseStyle;\n      throwOnError: ThrowOnError;\n    }>,\n    Pick<\n      ServerSentEventsOptions<TData>,\n      | 'onRequest'\n      | 'onSseError'\n      | 'onSseEvent'\n      | 'sseDefaultRetryDelay'\n      | 'sseMaxRetryAttempts'\n      | 'sseMaxRetryDelay'\n    > {\n  /**\n   * Any body that you want to add to your request.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/fetch#body}\n   */\n  body?: unknown;\n  path?: Record<string, unknown>;\n  query?: Record<string, unknown>;\n  /**\n   * Security mechanism(s) to use for the request.\n   */\n  security?: ReadonlyArray<Auth>;\n  url: Url;\n}\n\nexport interface ResolvedRequestOptions<\n  TResponseStyle extends ResponseStyle = 'fields',\n  ThrowOnError extends boolean = boolean,\n  Url extends string = string,\n> extends RequestOptions<unknown, TResponseStyle, ThrowOnError, Url> {\n  serializedBody?: string;\n}\n\nexport type RequestResult<\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = boolean,\n  TResponseStyle extends ResponseStyle = 'fields',\n> = ThrowOnError extends true\n  ? Promise<\n      TResponseStyle extends 'data'\n        ? TData extends Record<string, unknown>\n          ? TData[keyof TData]\n          : TData\n        : {\n            data: TData extends Record<string, unknown> ? TData[keyof TData] : TData;\n            request: Request;\n            response: Response;\n          }\n    >\n  : Promise<\n      TResponseStyle extends 'data'\n        ? (TData extends Record<string, unknown> ? TData[keyof TData] : TData) | undefined\n        : (\n            | {\n                data: TData extends Record<string, unknown> ? TData[keyof TData] : TData;\n                error: undefined;\n              }\n            | {\n                data: undefined;\n                error: TError extends Record<string, unknown> ? TError[keyof TError] : TError;\n              }\n          ) & {\n            request: Request;\n            response: Response;\n          }\n    >;\n\nexport interface ClientOptions {\n  baseUrl?: string;\n  responseStyle?: ResponseStyle;\n  throwOnError?: boolean;\n}\n\ntype MethodFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'>,\n) => RequestResult<TData, TError, ThrowOnError, TResponseStyle>;\n\ntype SseFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'>,\n) => Promise<ServerSentEventsResult<TData, TError>>;\n\ntype RequestFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'> &\n    Pick<Required<RequestOptions<TData, TResponseStyle, ThrowOnError>>, 'method'>,\n) => RequestResult<TData, TError, ThrowOnError, TResponseStyle>;\n\ntype BuildUrlFn = <\n  TData extends {\n    body?: unknown;\n    path?: Record<string, unknown>;\n    query?: Record<string, unknown>;\n    url: string;\n  },\n>(\n  options: TData & Options<TData>,\n) => string;\n\nexport type Client = CoreClient<RequestFn, Config, MethodFn, BuildUrlFn, SseFn> & {\n  interceptors: Middleware<Request, Response, unknown, ResolvedRequestOptions>;\n};\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 = ClientOptions> = (\n  override?: Config<ClientOptions & T>,\n) => Config<Required<ClientOptions> & T>;\n\nexport interface TDataShape {\n  body?: unknown;\n  headers?: unknown;\n  path?: unknown;\n  query?: unknown;\n  url: string;\n}\n\ntype OmitKeys<T, K> = Pick<T, Exclude<keyof T, K>>;\n\nexport type Options<\n  TData extends TDataShape = TDataShape,\n  ThrowOnError extends boolean = boolean,\n  TResponse = unknown,\n  TResponseStyle extends ResponseStyle = 'fields',\n> = OmitKeys<\n  RequestOptions<TResponse, TResponseStyle, ThrowOnError>,\n  'body' | 'path' | 'query' | 'url'\n> &\n  ([TData] extends [never] ? unknown : Omit<TData, 'url'>);\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-fetch/import-file-extension-ts/client/utils.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport { getAuthToken } from '../core/auth.gen.ts';\nimport type { QuerySerializerOptions } from '../core/bodySerializer.gen.ts';\nimport { jsonBodySerializer } from '../core/bodySerializer.gen.ts';\nimport {\n  serializeArrayParam,\n  serializeObjectParam,\n  serializePrimitiveParam,\n} from '../core/pathSerializer.gen.ts';\nimport { getUrl } from '../core/utils.gen.ts';\nimport type { Client, ClientOptions, Config, RequestOptions } from './types.gen.ts';\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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-fetch/import-file-extension-ts/client.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport { type ClientOptions, type Config, createClient, createConfig } from './client/index.ts';\nimport type { ClientOptions as ClientOptions2 } from './types.gen.ts';\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: 'http://localhost:3000/base' }));\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-fetch/import-file-extension-ts/core/auth.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-fetch/import-file-extension-ts/core/bodySerializer.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { ArrayStyle, ObjectStyle, SerializerOptions } from './pathSerializer.gen.ts';\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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-fetch/import-file-extension-ts/core/params.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-fetch/import-file-extension-ts/core/pathSerializer.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-fetch/import-file-extension-ts/core/queryKeySerializer.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\n/**\n * JSON-friendly union that mirrors what Pinia Colada can hash.\n */\nexport type JsonValue =\n  | null\n  | string\n  | number\n  | boolean\n  | JsonValue[]\n  | { [key: string]: JsonValue };\n\n/**\n * Replacer that converts non-JSON values (bigint, Date, etc.) to safe substitutes.\n */\nexport const queryKeyJsonReplacer = (_key: string, value: unknown) => {\n  if (value === undefined || typeof value === 'function' || typeof value === 'symbol') {\n    return undefined;\n  }\n  if (typeof value === 'bigint') {\n    return value.toString();\n  }\n  if (value instanceof Date) {\n    return value.toISOString();\n  }\n  return value;\n};\n\n/**\n * Safely stringifies a value and parses it back into a JsonValue.\n */\nexport const stringifyToJsonValue = (input: unknown): JsonValue | undefined => {\n  try {\n    const json = JSON.stringify(input, queryKeyJsonReplacer);\n    if (json === undefined) {\n      return undefined;\n    }\n    return JSON.parse(json) as JsonValue;\n  } catch {\n    return undefined;\n  }\n};\n\n/**\n * Detects plain objects (including objects with a null prototype).\n */\nconst isPlainObject = (value: unknown): value is Record<string, unknown> => {\n  if (value === null || typeof value !== 'object') {\n    return false;\n  }\n  const prototype = Object.getPrototypeOf(value as object);\n  return prototype === Object.prototype || prototype === null;\n};\n\n/**\n * Turns URLSearchParams into a sorted JSON object for deterministic keys.\n */\nconst serializeSearchParams = (params: URLSearchParams): JsonValue => {\n  const entries = Array.from(params.entries()).sort(([a], [b]) => a.localeCompare(b));\n  const result: Record<string, JsonValue> = {};\n\n  for (const [key, value] of entries) {\n    const existing = result[key];\n    if (existing === undefined) {\n      result[key] = value;\n      continue;\n    }\n\n    if (Array.isArray(existing)) {\n      (existing as string[]).push(value);\n    } else {\n      result[key] = [existing, value];\n    }\n  }\n\n  return result;\n};\n\n/**\n * Normalizes any accepted value into a JSON-friendly shape for query keys.\n */\nexport const serializeQueryKeyValue = (value: unknown): JsonValue | undefined => {\n  if (value === null) {\n    return null;\n  }\n\n  if (typeof value === 'string' || typeof value === 'number' || typeof value === 'boolean') {\n    return value;\n  }\n\n  if (value === undefined || typeof value === 'function' || typeof value === 'symbol') {\n    return undefined;\n  }\n\n  if (typeof value === 'bigint') {\n    return value.toString();\n  }\n\n  if (value instanceof Date) {\n    return value.toISOString();\n  }\n\n  if (Array.isArray(value)) {\n    return stringifyToJsonValue(value);\n  }\n\n  if (typeof URLSearchParams !== 'undefined' && value instanceof URLSearchParams) {\n    return serializeSearchParams(value);\n  }\n\n  if (isPlainObject(value)) {\n    return stringifyToJsonValue(value);\n  }\n\n  return undefined;\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-fetch/import-file-extension-ts/core/serverSentEvents.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { Config } from './types.gen.ts';\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 const 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            // Normalize line endings: CRLF -> LF, then CR -> LF\n            buffer = buffer.replace(/\\r\\n/g, '\\n').replace(/\\r/g, '\\n');\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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-fetch/import-file-extension-ts/core/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { Auth, AuthToken } from './auth.gen.ts';\nimport type { BodySerializer, QuerySerializer, QuerySerializerOptions } from './bodySerializer.gen.ts';\n\nexport type HttpMethod =\n  | 'connect'\n  | 'delete'\n  | 'get'\n  | 'head'\n  | 'options'\n  | 'patch'\n  | 'post'\n  | 'put'\n  | 'trace';\n\nexport type Client<\n  RequestFn = never,\n  Config = unknown,\n  MethodFn = never,\n  BuildUrlFn = never,\n  SseFn = never,\n> = {\n  /**\n   * Returns the final request URL.\n   */\n  buildUrl: BuildUrlFn;\n  getConfig: () => Config;\n  request: RequestFn;\n  setConfig: (config: Config) => Config;\n} & {\n  [K in HttpMethod]: MethodFn;\n} & ([SseFn] extends [never] ? { sse?: never } : { sse: { [K in HttpMethod]: SseFn } });\n\nexport interface Config {\n  /**\n   * Auth token or a function returning auth token. The resolved value will be\n   * added to the request payload as defined by its `security` array.\n   */\n  auth?: ((auth: Auth) => Promise<AuthToken> | AuthToken) | AuthToken;\n  /**\n   * A function for serializing request body parameter. By default,\n   * {@link JSON.stringify()} will be used.\n   */\n  bodySerializer?: BodySerializer | null;\n  /**\n   * An object containing any HTTP headers that you want to pre-populate your\n   * `Headers` object with.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/Headers/Headers#init See more}\n   */\n  headers?:\n    | RequestInit['headers']\n    | Record<\n        string,\n        string | number | boolean | (string | number | boolean)[] | null | undefined | unknown\n      >;\n  /**\n   * The request method.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/fetch#method See more}\n   */\n  method?: Uppercase<HttpMethod>;\n  /**\n   * A function for serializing request query parameters. By default, arrays\n   * will be exploded in form style, objects will be exploded in deepObject\n   * style, and reserved characters are percent-encoded.\n   *\n   * This method will have no effect if the native `paramsSerializer()` Axios\n   * API function is used.\n   *\n   * {@link https://swagger.io/docs/specification/serialization/#query View examples}\n   */\n  querySerializer?: QuerySerializer | QuerySerializerOptions;\n  /**\n   * A function validating request data. This is useful if you want to ensure\n   * the request conforms to the desired shape, so it can be safely sent to\n   * the server.\n   */\n  requestValidator?: (data: unknown) => Promise<unknown>;\n  /**\n   * A function transforming response data before it's returned. This is useful\n   * for post-processing data, e.g. converting ISO strings into Date objects.\n   */\n  responseTransformer?: (data: unknown) => Promise<unknown>;\n  /**\n   * A function validating response data. This is useful if you want to ensure\n   * the response conforms to the desired shape, so it can be safely passed to\n   * the transformers and returned to the user.\n   */\n  responseValidator?: (data: unknown) => Promise<unknown>;\n}\n\ntype IsExactlyNeverOrNeverUndefined<T> = [T] extends [never]\n  ? true\n  : [T] extends [never | undefined]\n    ? [undefined] extends [T]\n      ? false\n      : true\n    : false;\n\nexport type OmitNever<T extends Record<string, unknown>> = {\n  [K in keyof T as IsExactlyNeverOrNeverUndefined<T[K]> extends true ? never : K]: T[K];\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-fetch/import-file-extension-ts/core/utils.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { BodySerializer, QuerySerializer } from './bodySerializer.gen.ts';\nimport {\n  type ArraySeparatorStyle,\n  serializeArrayParam,\n  serializeObjectParam,\n  serializePrimitiveParam,\n} from './pathSerializer.gen.ts';\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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-fetch/import-file-extension-ts/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport { apiVVersionODataControllerCount, callToTestOrderOfParams, callWithDefaultOptionalParameters, callWithDefaultParameters, callWithDescriptions, callWithDuplicateResponses, callWithNoContentResponse, callWithParameters, callWithResponse, callWithResponseAndNoContentResponse, callWithResponses, callWithResultFromHeader, callWithWeirdParameterNames, collectionFormat, complexParams, complexTypes, deleteCallWithoutParametersAndResponse, deleteFoo, deprecatedCall, dummyA, dummyB, duplicateName, duplicateName2, duplicateName3, duplicateName4, export_, fileResponse, fooWow, getApiVbyApiVersionSimpleOperation, getCallWithOptionalParam, getCallWithoutParametersAndResponse, headCallWithoutParametersAndResponse, import_, multipartRequest, multipartResponse, nonAsciiæøåÆøÅöôêÊ字符串, type Options, optionsCallWithoutParametersAndResponse, patchApiVbyApiVersionNoTag, patchCallWithoutParametersAndResponse, postApiVbyApiVersionFormData, postApiVbyApiVersionRequestBody, postCallWithOptionalParam, postCallWithoutParametersAndResponse, putCallWithoutParametersAndResponse, putWithFormUrlEncoded, testErrorCode, types, uploadFile } from './sdk.gen.ts';\nexport type { _3eNum1Период, _400, AdditionalPropertiesIntegerIssue, AdditionalPropertiesUnknownIssue, AdditionalPropertiesUnknownIssue2, AdditionalPropertiesUnknownIssue3, AdditionalPropertiesUnknownIssueWritable, AnyOfAnyAndNull, AnyOfArrays, ApiVVersionODataControllerCountData, ApiVVersionODataControllerCountResponse, ApiVVersionODataControllerCountResponses, ArrayWithAnyOfProperties, ArrayWithArray, ArrayWithBooleans, ArrayWithNumbers, ArrayWithProperties, ArrayWithReferences, ArrayWithStrings, CallToTestOrderOfParamsData, CallWithDefaultOptionalParametersData, CallWithDefaultParametersData, CallWithDescriptionsData, CallWithDuplicateResponsesData, CallWithDuplicateResponsesError, CallWithDuplicateResponsesErrors, CallWithDuplicateResponsesResponse, CallWithDuplicateResponsesResponses, CallWithNoContentResponseData, CallWithNoContentResponseResponse, CallWithNoContentResponseResponses, CallWithParametersData, CallWithResponseAndNoContentResponseData, CallWithResponseAndNoContentResponseResponse, CallWithResponseAndNoContentResponseResponses, CallWithResponseData, CallWithResponseResponse, CallWithResponseResponses, CallWithResponsesData, CallWithResponsesError, CallWithResponsesErrors, CallWithResponsesResponse, CallWithResponsesResponses, CallWithResultFromHeaderData, CallWithResultFromHeaderErrors, CallWithResultFromHeaderResponses, CallWithWeirdParameterNamesData, CamelCaseCommentWithBreaks, CharactersInDescription, ClientOptions, CollectionFormatData, CommentWithBackticks, CommentWithBackticksAndQuotes, CommentWithBreaks, CommentWithExpressionPlaceholders, CommentWithQuotes, CommentWithReservedCharacters, CommentWithSlashes, ComplexParamsData, ComplexParamsResponse, ComplexParamsResponses, ComplexTypesData, ComplexTypesErrors, ComplexTypesResponse, ComplexTypesResponses, CompositionBaseModel, CompositionExtendedModel, CompositionWithAllOfAndNullable, CompositionWithAnyOf, CompositionWithAnyOfAndNullable, CompositionWithAnyOfAnonymous, CompositionWithNestedAnyAndTypeNull, CompositionWithNestedAnyOfAndNull, CompositionWithOneOf, CompositionWithOneOfAndComplexArrayDictionary, CompositionWithOneOfAndNullable, CompositionWithOneOfAndProperties, CompositionWithOneOfAndSimpleArrayDictionary, CompositionWithOneOfAndSimpleDictionary, CompositionWithOneOfAnonymous, CompositionWithOneOfDiscriminator, ConstValue, Default, DeleteCallWithoutParametersAndResponseData, DeleteFooData, DeleteFooData2, DeleteFooData3, DeprecatedCallData, DeprecatedModel, DictionaryWithArray, DictionaryWithDictionary, DictionaryWithProperties, DictionaryWithPropertiesAndAdditionalProperties, DictionaryWithReference, DictionaryWithString, DummyAData, DummyAResponse, DummyAResponses, DummyBData, DummyBResponse, DummyBResponses, DuplicateName2Data, DuplicateName3Data, DuplicateName4Data, DuplicateNameData, EnumFromDescription, EnumWithExtensions, EnumWithNumbers, EnumWithReplacedCharacters, EnumWithStrings, EnumWithXEnumNames, ExportData, ExternalRefA, ExternalRefB, ExternalSharedModel, File, FileResponseData, FileResponseResponse, FileResponseResponses, FileWritable, FooWowData, FooWowResponses, FreeFormObjectWithAdditionalPropertiesEqEmptyObject, FreeFormObjectWithAdditionalPropertiesEqTrue, FreeFormObjectWithoutAdditionalProperties, GenericSchemaDuplicateIssue1SystemBoolean, GenericSchemaDuplicateIssue1SystemBooleanWritable, GenericSchemaDuplicateIssue1SystemString, GenericSchemaDuplicateIssue1SystemStringWritable, GetApiVbyApiVersionSimpleOperationData, GetApiVbyApiVersionSimpleOperationError, GetApiVbyApiVersionSimpleOperationErrors, GetApiVbyApiVersionSimpleOperationResponse, GetApiVbyApiVersionSimpleOperationResponses, GetCallWithOptionalParamData, GetCallWithoutParametersAndResponseData, HeadCallWithoutParametersAndResponseData, Import, ImportData, ImportResponse, ImportResponses, IoK8sApimachineryPkgApisMetaV1DeleteOptions, IoK8sApimachineryPkgApisMetaV1Preconditions, ModelCircle, ModelFromZendesk, ModelSquare, ModelThatExtends, ModelThatExtendsExtends, ModelWithAdditionalPropertiesEqTrue, ModelWithAdditionalPropertiesRef, ModelWithAnyOfConstantSizeArray, ModelWithAnyOfConstantSizeArrayAndIntersect, ModelWithAnyOfConstantSizeArrayNullable, ModelWithAnyOfConstantSizeArrayWithNSizeAndOptions, ModelWithAnyOfConstantSizeArrayWithNSizeAndOptionsWritable, ModelWithArray, ModelWithArrayReadOnlyAndWriteOnly, ModelWithArrayReadOnlyAndWriteOnlyWritable, ModelWithBackticksInDescription, ModelWithBoolean, ModelWithCircularReference, ModelWithConst, ModelWithConstantSizeArray, ModelWithDictionary, ModelWithDuplicateImports, ModelWithDuplicateProperties, ModelWithEnum, ModelWithEnumFromDescription, ModelWithEnumWithHyphen, ModelWithInteger, ModelWithNestedArrayEnums, ModelWithNestedArrayEnumsData, ModelWithNestedArrayEnumsDataBar, ModelWithNestedArrayEnumsDataFoo, ModelWithNestedCompositionEnums, ModelWithNestedEnums, ModelWithNestedProperties, ModelWithNullableObject, ModelWithNullableString, ModelWithNumericEnumUnion, ModelWithOneOfAndProperties, ModelWithOneOfEnum, ModelWithOrderedProperties, ModelWithPattern, ModelWithPatternWritable, ModelWithPrefixItemsConstantSizeArray, ModelWithProperties, ModelWithPropertiesWritable, ModelWithReadOnlyAndWriteOnly, ModelWithReadOnlyAndWriteOnlyWritable, ModelWithReference, ModelWithReferenceWritable, ModelWithString, ModelWithStringError, MultipartRequestData, MultipartResponseData, MultipartResponseResponse, MultipartResponseResponses, NestedAnyOfArraysNullable, NonAsciiæøåÆøÅöôêÊ字符串Data, NonAsciiæøåÆøÅöôêÊ字符串Response, NonAsciiæøåÆøÅöôêÊ字符串Responses, NonAsciiStringæøåÆøÅöôêÊ字符串, NullableObject, OneOfAllOfIssue, OneOfAllOfIssueWritable, OptionsCallWithoutParametersAndResponseData, Pageable, ParameterSimpleParameterUnused, PatchApiVbyApiVersionNoTagData, PatchApiVbyApiVersionNoTagResponses, PatchCallWithoutParametersAndResponseData, PostApiVbyApiVersionFormDataData, PostApiVbyApiVersionRequestBodyData, PostCallWithOptionalParamData, PostCallWithOptionalParamResponse, PostCallWithOptionalParamResponses, PostCallWithoutParametersAndResponseData, PostServiceWithEmptyTagResponse, PostServiceWithEmptyTagResponse2, PutCallWithoutParametersAndResponseData, PutWithFormUrlEncodedData, SchemaWithFormRestrictedKeys, SimpleBoolean, SimpleFile, SimpleFormData, SimpleInteger, SimpleParameter, SimpleReference, SimpleRequestBody, SimpleString, SimpleStringWithPattern, TestErrorCodeData, TestErrorCodeErrors, TestErrorCodeResponses, TypesData, TypesResponse, TypesResponses, UploadFileData, UploadFileResponse, UploadFileResponses, XFooBar } from './types.gen.ts';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-fetch/import-file-extension-ts/sdk.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport { client } from './client.gen.ts';\nimport { type Client, formDataBodySerializer, type Options as Options2, type TDataShape, urlSearchParamsBodySerializer } from './client/index.ts';\nimport type { ApiVVersionODataControllerCountData, ApiVVersionODataControllerCountResponses, CallToTestOrderOfParamsData, CallWithDefaultOptionalParametersData, CallWithDefaultParametersData, CallWithDescriptionsData, CallWithDuplicateResponsesData, CallWithDuplicateResponsesErrors, CallWithDuplicateResponsesResponses, CallWithNoContentResponseData, CallWithNoContentResponseResponses, CallWithParametersData, CallWithResponseAndNoContentResponseData, CallWithResponseAndNoContentResponseResponses, CallWithResponseData, CallWithResponseResponses, CallWithResponsesData, CallWithResponsesErrors, CallWithResponsesResponses, CallWithResultFromHeaderData, CallWithResultFromHeaderErrors, CallWithResultFromHeaderResponses, CallWithWeirdParameterNamesData, CollectionFormatData, ComplexParamsData, ComplexParamsResponses, ComplexTypesData, ComplexTypesErrors, ComplexTypesResponses, DeleteCallWithoutParametersAndResponseData, DeleteFooData3, DeprecatedCallData, DummyAData, DummyAResponses, DummyBData, DummyBResponses, DuplicateName2Data, DuplicateName3Data, DuplicateName4Data, DuplicateNameData, ExportData, FileResponseData, FileResponseResponses, FooWowData, FooWowResponses, GetApiVbyApiVersionSimpleOperationData, GetApiVbyApiVersionSimpleOperationErrors, GetApiVbyApiVersionSimpleOperationResponses, GetCallWithOptionalParamData, GetCallWithoutParametersAndResponseData, HeadCallWithoutParametersAndResponseData, ImportData, ImportResponses, MultipartRequestData, MultipartResponseData, MultipartResponseResponses, NonAsciiæøåÆøÅöôêÊ字符串Data, NonAsciiæøåÆøÅöôêÊ字符串Responses, OptionsCallWithoutParametersAndResponseData, PatchApiVbyApiVersionNoTagData, PatchApiVbyApiVersionNoTagResponses, PatchCallWithoutParametersAndResponseData, PostApiVbyApiVersionFormDataData, PostApiVbyApiVersionRequestBodyData, PostCallWithOptionalParamData, PostCallWithOptionalParamResponses, PostCallWithoutParametersAndResponseData, PutCallWithoutParametersAndResponseData, PutWithFormUrlEncodedData, TestErrorCodeData, TestErrorCodeErrors, TestErrorCodeResponses, TypesData, TypesResponses, UploadFileData, UploadFileResponses } from './types.gen.ts';\n\nexport type Options<TData extends TDataShape = TDataShape, ThrowOnError extends boolean = boolean> = Options2<TData, ThrowOnError> & {\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\nexport const export_ = <ThrowOnError extends boolean = false>(options?: Options<ExportData, ThrowOnError>) => (options?.client ?? client).get<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/no+tag', ...options });\n\nexport const patchApiVbyApiVersionNoTag = <ThrowOnError extends boolean = false>(options?: Options<PatchApiVbyApiVersionNoTagData, ThrowOnError>) => (options?.client ?? client).patch<PatchApiVbyApiVersionNoTagResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/no+tag', ...options });\n\nexport const import_ = <ThrowOnError extends boolean = false>(options: Options<ImportData, ThrowOnError>) => (options.client ?? client).post<ImportResponses, unknown, ThrowOnError>({\n    url: '/api/v{api-version}/no+tag',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options.headers\n    }\n});\n\nexport const fooWow = <ThrowOnError extends boolean = false>(options?: Options<FooWowData, ThrowOnError>) => (options?.client ?? client).put<FooWowResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/no+tag', ...options });\n\nexport const apiVVersionODataControllerCount = <ThrowOnError extends boolean = false>(options?: Options<ApiVVersionODataControllerCountData, ThrowOnError>) => (options?.client ?? client).get<ApiVVersionODataControllerCountResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple/$count', ...options });\n\nexport const getApiVbyApiVersionSimpleOperation = <ThrowOnError extends boolean = false>(options: Options<GetApiVbyApiVersionSimpleOperationData, ThrowOnError>) => (options.client ?? client).get<GetApiVbyApiVersionSimpleOperationResponses, GetApiVbyApiVersionSimpleOperationErrors, ThrowOnError>({ url: '/api/v{api-version}/simple:operation', ...options });\n\nexport const deleteCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<DeleteCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).delete<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const getCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<GetCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).get<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const headCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<HeadCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).head<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const optionsCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<OptionsCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).options<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const patchCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<PatchCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).patch<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const postCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<PostCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).post<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const putCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<PutCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).put<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const deleteFoo = <ThrowOnError extends boolean = false>(options: Options<DeleteFooData3, ThrowOnError>) => (options.client ?? client).delete<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/foo/{foo_param}/bar/{BarParam}', ...options });\n\nexport const callWithDescriptions = <ThrowOnError extends boolean = false>(options?: Options<CallWithDescriptionsData, ThrowOnError>) => (options?.client ?? client).post<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/descriptions', ...options });\n\n/**\n * @deprecated\n */\nexport const deprecatedCall = <ThrowOnError extends boolean = false>(options: Options<DeprecatedCallData, ThrowOnError>) => (options.client ?? client).post<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/parameters/deprecated', ...options });\n\nexport const callWithParameters = <ThrowOnError extends boolean = false>(options: Options<CallWithParametersData, ThrowOnError>) => (options.client ?? client).post<unknown, unknown, ThrowOnError>({\n    url: '/api/v{api-version}/parameters/{parameterPath}',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options.headers\n    }\n});\n\nexport const callWithWeirdParameterNames = <ThrowOnError extends boolean = false>(options: Options<CallWithWeirdParameterNamesData, ThrowOnError>) => (options.client ?? client).post<unknown, unknown, ThrowOnError>({\n    url: '/api/v{api-version}/parameters/{parameter.path.1}/{parameter-path-2}/{PARAMETER-PATH-3}',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options.headers\n    }\n});\n\nexport const getCallWithOptionalParam = <ThrowOnError extends boolean = false>(options: Options<GetCallWithOptionalParamData, ThrowOnError>) => (options.client ?? client).get<unknown, unknown, ThrowOnError>({\n    url: '/api/v{api-version}/parameters',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options.headers\n    }\n});\n\nexport const postCallWithOptionalParam = <ThrowOnError extends boolean = false>(options: Options<PostCallWithOptionalParamData, ThrowOnError>) => (options.client ?? client).post<PostCallWithOptionalParamResponses, unknown, ThrowOnError>({\n    url: '/api/v{api-version}/parameters',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options.headers\n    }\n});\n\nexport const postApiVbyApiVersionRequestBody = <ThrowOnError extends boolean = false>(options?: Options<PostApiVbyApiVersionRequestBodyData, ThrowOnError>) => (options?.client ?? client).post<unknown, unknown, ThrowOnError>({\n    url: '/api/v{api-version}/requestBody',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options?.headers\n    }\n});\n\nexport const postApiVbyApiVersionFormData = <ThrowOnError extends boolean = false>(options?: Options<PostApiVbyApiVersionFormDataData, ThrowOnError>) => (options?.client ?? client).post<unknown, unknown, ThrowOnError>({\n    ...formDataBodySerializer,\n    url: '/api/v{api-version}/formData',\n    ...options,\n    headers: {\n        'Content-Type': null,\n        ...options?.headers\n    }\n});\n\nexport const callWithDefaultParameters = <ThrowOnError extends boolean = false>(options?: Options<CallWithDefaultParametersData, ThrowOnError>) => (options?.client ?? client).get<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/defaults', ...options });\n\nexport const callWithDefaultOptionalParameters = <ThrowOnError extends boolean = false>(options?: Options<CallWithDefaultOptionalParametersData, ThrowOnError>) => (options?.client ?? client).post<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/defaults', ...options });\n\nexport const callToTestOrderOfParams = <ThrowOnError extends boolean = false>(options: Options<CallToTestOrderOfParamsData, ThrowOnError>) => (options.client ?? client).put<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/defaults', ...options });\n\nexport const duplicateName = <ThrowOnError extends boolean = false>(options?: Options<DuplicateNameData, ThrowOnError>) => (options?.client ?? client).delete<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/duplicate', ...options });\n\nexport const duplicateName2 = <ThrowOnError extends boolean = false>(options?: Options<DuplicateName2Data, ThrowOnError>) => (options?.client ?? client).get<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/duplicate', ...options });\n\nexport const duplicateName3 = <ThrowOnError extends boolean = false>(options?: Options<DuplicateName3Data, ThrowOnError>) => (options?.client ?? client).post<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/duplicate', ...options });\n\nexport const duplicateName4 = <ThrowOnError extends boolean = false>(options?: Options<DuplicateName4Data, ThrowOnError>) => (options?.client ?? client).put<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/duplicate', ...options });\n\nexport const callWithNoContentResponse = <ThrowOnError extends boolean = false>(options?: Options<CallWithNoContentResponseData, ThrowOnError>) => (options?.client ?? client).get<CallWithNoContentResponseResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/no-content', ...options });\n\nexport const callWithResponseAndNoContentResponse = <ThrowOnError extends boolean = false>(options?: Options<CallWithResponseAndNoContentResponseData, ThrowOnError>) => (options?.client ?? client).get<CallWithResponseAndNoContentResponseResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/multiple-tags/response-and-no-content', ...options });\n\nexport const dummyA = <ThrowOnError extends boolean = false>(options?: Options<DummyAData, ThrowOnError>) => (options?.client ?? client).get<DummyAResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/multiple-tags/a', ...options });\n\nexport const dummyB = <ThrowOnError extends boolean = false>(options?: Options<DummyBData, ThrowOnError>) => (options?.client ?? client).get<DummyBResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/multiple-tags/b', ...options });\n\nexport const callWithResponse = <ThrowOnError extends boolean = false>(options?: Options<CallWithResponseData, ThrowOnError>) => (options?.client ?? client).get<CallWithResponseResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/response', ...options });\n\nexport const callWithDuplicateResponses = <ThrowOnError extends boolean = false>(options?: Options<CallWithDuplicateResponsesData, ThrowOnError>) => (options?.client ?? client).post<CallWithDuplicateResponsesResponses, CallWithDuplicateResponsesErrors, ThrowOnError>({ url: '/api/v{api-version}/response', ...options });\n\nexport const callWithResponses = <ThrowOnError extends boolean = false>(options?: Options<CallWithResponsesData, ThrowOnError>) => (options?.client ?? client).put<CallWithResponsesResponses, CallWithResponsesErrors, ThrowOnError>({ url: '/api/v{api-version}/response', ...options });\n\nexport const collectionFormat = <ThrowOnError extends boolean = false>(options: Options<CollectionFormatData, ThrowOnError>) => (options.client ?? client).get<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/collectionFormat', ...options });\n\nexport const types = <ThrowOnError extends boolean = false>(options: Options<TypesData, ThrowOnError>) => (options.client ?? client).get<TypesResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/types', ...options });\n\nexport const uploadFile = <ThrowOnError extends boolean = false>(options: Options<UploadFileData, ThrowOnError>) => (options.client ?? client).post<UploadFileResponses, unknown, ThrowOnError>({\n    ...urlSearchParamsBodySerializer,\n    url: '/api/v{api-version}/upload',\n    ...options,\n    headers: {\n        'Content-Type': 'application/x-www-form-urlencoded',\n        ...options.headers\n    }\n});\n\nexport const fileResponse = <ThrowOnError extends boolean = false>(options: Options<FileResponseData, ThrowOnError>) => (options.client ?? client).get<FileResponseResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/file/{id}', ...options });\n\nexport const complexTypes = <ThrowOnError extends boolean = false>(options: Options<ComplexTypesData, ThrowOnError>) => (options.client ?? client).get<ComplexTypesResponses, ComplexTypesErrors, ThrowOnError>({\n    querySerializer: { parameters: { parameterObject: { object: { style: 'form' } } } },\n    url: '/api/v{api-version}/complex',\n    ...options\n});\n\nexport const multipartResponse = <ThrowOnError extends boolean = false>(options?: Options<MultipartResponseData, ThrowOnError>) => (options?.client ?? client).get<MultipartResponseResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/multipart', ...options });\n\nexport const multipartRequest = <ThrowOnError extends boolean = false>(options?: Options<MultipartRequestData, ThrowOnError>) => (options?.client ?? client).post<unknown, unknown, ThrowOnError>({\n    ...formDataBodySerializer,\n    url: '/api/v{api-version}/multipart',\n    ...options,\n    headers: {\n        'Content-Type': null,\n        ...options?.headers\n    }\n});\n\nexport const complexParams = <ThrowOnError extends boolean = false>(options: Options<ComplexParamsData, ThrowOnError>) => (options.client ?? client).put<ComplexParamsResponses, unknown, ThrowOnError>({\n    url: '/api/v{api-version}/complex/{id}',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json-patch+json',\n        ...options.headers\n    }\n});\n\nexport const callWithResultFromHeader = <ThrowOnError extends boolean = false>(options?: Options<CallWithResultFromHeaderData, ThrowOnError>) => (options?.client ?? client).post<CallWithResultFromHeaderResponses, CallWithResultFromHeaderErrors, ThrowOnError>({ url: '/api/v{api-version}/header', ...options });\n\nexport const testErrorCode = <ThrowOnError extends boolean = false>(options: Options<TestErrorCodeData, ThrowOnError>) => (options.client ?? client).post<TestErrorCodeResponses, TestErrorCodeErrors, ThrowOnError>({ url: '/api/v{api-version}/error', ...options });\n\nexport const nonAsciiæøåÆøÅöôêÊ字符串 = <ThrowOnError extends boolean = false>(options: Options<NonAsciiæøåÆøÅöôêÊ字符串Data, ThrowOnError>) => (options.client ?? client).post<NonAsciiæøåÆøÅöôêÊ字符串Responses, unknown, ThrowOnError>({ url: '/api/v{api-version}/non-ascii-æøåÆØÅöôêÊ字符串', ...options });\n\n/**\n * Login User\n */\nexport const putWithFormUrlEncoded = <ThrowOnError extends boolean = false>(options: Options<PutWithFormUrlEncodedData, ThrowOnError>) => (options.client ?? client).put<unknown, unknown, ThrowOnError>({\n    ...urlSearchParamsBodySerializer,\n    url: '/api/v{api-version}/non-ascii-æøåÆØÅöôêÊ字符串',\n    ...options,\n    headers: {\n        'Content-Type': 'application/x-www-form-urlencoded',\n        ...options.headers\n    }\n});\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-fetch/import-file-extension-ts/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type ClientOptions = {\n    baseUrl: 'http://localhost:3000/base' | (string & {});\n};\n\n/**\n * Model with number-only name\n */\nexport type _400 = string;\n\n/**\n * External ref to shared model (A)\n */\nexport type ExternalRefA = ExternalSharedModel;\n\n/**\n * External ref to shared model (B)\n */\nexport type ExternalRefB = ExternalSharedModel;\n\n/**\n * Testing multiline comments in string: First line\n * Second line\n *\n * Fourth line\n */\nexport type CamelCaseCommentWithBreaks = number;\n\n/**\n * Testing multiline comments in string: First line\n * Second line\n *\n * Fourth line\n */\nexport type CommentWithBreaks = number;\n\n/**\n * Testing backticks in string: `backticks` and ```multiple backticks``` should work\n */\nexport type CommentWithBackticks = number;\n\n/**\n * Testing backticks and quotes in string: `backticks`, 'quotes', \"double quotes\" and ```multiple backticks``` should work\n */\nexport type CommentWithBackticksAndQuotes = number;\n\n/**\n * Testing slashes in string: \\backwards\\\\\\ and /forwards/// should work\n */\nexport type CommentWithSlashes = number;\n\n/**\n * Testing expression placeholders in string: ${expression} should work\n */\nexport type CommentWithExpressionPlaceholders = number;\n\n/**\n * Testing quotes in string: 'single quote''' and \"double quotes\"\"\" should work\n */\nexport type CommentWithQuotes = number;\n\n/**\n * Testing reserved characters in string: * inline * and ** inline ** should work\n */\nexport type CommentWithReservedCharacters = number;\n\n/**\n * This is a simple number\n */\nexport type SimpleInteger = number;\n\n/**\n * This is a simple boolean\n */\nexport type SimpleBoolean = boolean;\n\n/**\n * This is a simple string\n */\nexport type SimpleString = string;\n\n/**\n * A string with non-ascii (unicode) characters valid in typescript identifiers (æøåÆØÅöÔèÈ字符串)\n */\nexport type NonAsciiStringæøåÆøÅöôêÊ字符串 = string;\n\n/**\n * This is a simple file\n */\nexport type SimpleFile = Blob | File;\n\n/**\n * This is a simple reference\n */\nexport type SimpleReference = ModelWithString;\n\n/**\n * This is a simple string\n */\nexport type SimpleStringWithPattern = string | null;\n\n/**\n * This is a simple enum with strings\n */\nexport type EnumWithStrings = 'Success' | 'Warning' | 'Error' | '\\'Single Quote\\'' | '\"Double Quotes\"' | 'Non-ascii: øæåôöØÆÅÔÖ字符串';\n\nexport type EnumWithReplacedCharacters = '\\'Single Quote\\'' | '\"Double Quotes\"' | 'øæåôöØÆÅÔÖ字符串' | 3.1 | '';\n\n/**\n * This is a simple enum with numbers\n */\nexport type EnumWithNumbers = 1 | 2 | 3 | 1.1 | 1.2 | 1.3 | 100 | 200 | 300 | -100 | -200 | -300 | -1.1 | -1.2 | -1.3;\n\n/**\n * Success=1,Warning=2,Error=3\n */\nexport type EnumFromDescription = number;\n\n/**\n * This is a simple enum with numbers\n */\nexport type EnumWithExtensions = 200 | 400 | 500;\n\nexport type EnumWithXEnumNames = 0 | 1 | 2;\n\n/**\n * This is a simple array with numbers\n */\nexport type ArrayWithNumbers = Array<number>;\n\n/**\n * This is a simple array with booleans\n */\nexport type ArrayWithBooleans = Array<boolean>;\n\n/**\n * This is a simple array with strings\n */\nexport type ArrayWithStrings = Array<string>;\n\n/**\n * This is a simple array with references\n */\nexport type ArrayWithReferences = Array<ModelWithString>;\n\n/**\n * This is a simple array containing an array\n */\nexport type ArrayWithArray = Array<Array<ModelWithString>>;\n\n/**\n * This is a simple array with properties\n */\nexport type ArrayWithProperties = Array<{\n    '16x16'?: CamelCaseCommentWithBreaks;\n    bar?: string;\n}>;\n\n/**\n * This is a simple array with any of properties\n */\nexport type ArrayWithAnyOfProperties = Array<{\n    foo?: string;\n} | {\n    bar?: string;\n}>;\n\nexport type AnyOfAnyAndNull = {\n    data?: unknown | null;\n};\n\n/**\n * This is a simple array with any of properties\n */\nexport type AnyOfArrays = {\n    results?: Array<{\n        foo?: string;\n    } | {\n        bar?: string;\n    }>;\n};\n\n/**\n * This is a string dictionary\n */\nexport type DictionaryWithString = {\n    [key: string]: string;\n};\n\nexport type DictionaryWithPropertiesAndAdditionalProperties = {\n    foo?: number;\n    bar?: boolean;\n    [key: string]: string | number | boolean | undefined;\n};\n\n/**\n * This is a string reference\n */\nexport type DictionaryWithReference = {\n    [key: string]: ModelWithString;\n};\n\n/**\n * This is a complex dictionary\n */\nexport type DictionaryWithArray = {\n    [key: string]: Array<ModelWithString>;\n};\n\n/**\n * This is a string dictionary\n */\nexport type DictionaryWithDictionary = {\n    [key: string]: {\n        [key: string]: string;\n    };\n};\n\n/**\n * This is a complex dictionary\n */\nexport type DictionaryWithProperties = {\n    [key: string]: {\n        foo?: string;\n        bar?: string;\n    };\n};\n\n/**\n * This is a model with one number property\n */\nexport type ModelWithInteger = {\n    /**\n     * This is a simple number property\n     */\n    prop?: number;\n};\n\n/**\n * This is a model with one boolean property\n */\nexport type ModelWithBoolean = {\n    /**\n     * This is a simple boolean property\n     */\n    prop?: boolean;\n};\n\n/**\n * This is a model with one string property\n */\nexport type ModelWithString = {\n    /**\n     * This is a simple string property\n     */\n    prop?: string;\n};\n\n/**\n * This is a model with one string property\n */\nexport type ModelWithStringError = {\n    /**\n     * This is a simple string property\n     */\n    prop?: string;\n};\n\n/**\n * `Comment` or `VoiceComment`. The JSON object for adding voice comments to tickets is different. See [Adding voice comments to tickets](/documentation/ticketing/managing-tickets/adding-voice-comments-to-tickets)\n */\nexport type ModelFromZendesk = string;\n\n/**\n * This is a model with one string property\n */\nexport type ModelWithNullableString = {\n    /**\n     * This is a simple string property\n     */\n    nullableProp1?: string | null;\n    /**\n     * This is a simple string property\n     */\n    nullableRequiredProp1: string | null;\n    /**\n     * This is a simple string property\n     */\n    nullableProp2?: string | null;\n    /**\n     * This is a simple string property\n     */\n    nullableRequiredProp2: string | null;\n    /**\n     * This is a simple enum with strings\n     */\n    'foo_bar-enum'?: 'Success' | 'Warning' | 'Error' | 'ØÆÅ字符串';\n};\n\n/**\n * This is a model with one enum\n */\nexport type ModelWithEnum = {\n    /**\n     * This is a simple enum with strings\n     */\n    'foo_bar-enum'?: 'Success' | 'Warning' | 'Error' | 'ØÆÅ字符串';\n    /**\n     * These are the HTTP error code enums\n     */\n    statusCode?: '100' | '200 FOO' | '300 FOO_BAR' | '400 foo-bar' | '500 foo.bar' | '600 foo&bar';\n    /**\n     * Simple boolean enum\n     */\n    bool?: true;\n};\n\n/**\n * This is a model with one enum with escaped name\n */\nexport type ModelWithEnumWithHyphen = {\n    /**\n     * Foo-Bar-Baz-Qux\n     */\n    'foo-bar-baz-qux'?: '3.0';\n};\n\n/**\n * This is a model with one enum\n */\nexport type ModelWithEnumFromDescription = {\n    /**\n     * Success=1,Warning=2,Error=3\n     */\n    test?: number;\n};\n\n/**\n * This is a model with nested enums\n */\nexport type ModelWithNestedEnums = {\n    dictionaryWithEnum?: {\n        [key: string]: 'Success' | 'Warning' | 'Error';\n    };\n    dictionaryWithEnumFromDescription?: {\n        [key: string]: number;\n    };\n    arrayWithEnum?: Array<'Success' | 'Warning' | 'Error'>;\n    arrayWithDescription?: Array<number>;\n    /**\n     * This is a simple enum with strings\n     */\n    'foo_bar-enum'?: 'Success' | 'Warning' | 'Error' | 'ØÆÅ字符串';\n};\n\n/**\n * This is a model with one property containing a reference\n */\nexport type ModelWithReference = {\n    prop?: ModelWithProperties;\n};\n\n/**\n * This is a model with one property containing an array\n */\nexport type ModelWithArrayReadOnlyAndWriteOnly = {\n    prop?: Array<ModelWithReadOnlyAndWriteOnly>;\n    propWithFile?: Array<Blob | File>;\n    propWithNumber?: Array<number>;\n};\n\n/**\n * This is a model with one property containing an array\n */\nexport type ModelWithArray = {\n    prop?: Array<ModelWithString>;\n    propWithFile?: Array<Blob | File>;\n    propWithNumber?: Array<number>;\n};\n\n/**\n * This is a model with one property containing a dictionary\n */\nexport type ModelWithDictionary = {\n    prop?: {\n        [key: string]: string;\n    };\n};\n\n/**\n * This is a deprecated model with a deprecated property\n *\n * @deprecated\n */\nexport type DeprecatedModel = {\n    /**\n     * This is a deprecated property\n     *\n     * @deprecated\n     */\n    prop?: string;\n};\n\n/**\n * This is a model with one property containing a circular reference\n */\nexport type ModelWithCircularReference = {\n    prop?: ModelWithCircularReference;\n};\n\n/**\n * This is a model with one property with a 'one of' relationship\n */\nexport type CompositionWithOneOf = {\n    propA?: ModelWithString | ModelWithEnum | ModelWithArray | ModelWithDictionary;\n};\n\n/**\n * This is a model with one property with a 'one of' relationship where the options are not $ref\n */\nexport type CompositionWithOneOfAnonymous = {\n    propA?: {\n        propA?: string;\n    } | string | number;\n};\n\n/**\n * Circle\n */\nexport type ModelCircle = {\n    kind: string;\n    radius?: number;\n};\n\n/**\n * Square\n */\nexport type ModelSquare = {\n    kind: string;\n    sideLength?: number;\n};\n\n/**\n * This is a model with one property with a 'one of' relationship where the options are not $ref\n */\nexport type CompositionWithOneOfDiscriminator = ({\n    kind: 'circle';\n} & ModelCircle) | ({\n    kind: 'square';\n} & ModelSquare);\n\n/**\n * This is a model with one property with a 'any of' relationship\n */\nexport type CompositionWithAnyOf = {\n    propA?: ModelWithString | ModelWithEnum | ModelWithArray | ModelWithDictionary;\n};\n\n/**\n * This is a model with one property with a 'any of' relationship where the options are not $ref\n */\nexport type CompositionWithAnyOfAnonymous = {\n    propA?: {\n        propA?: string;\n    } | string | number;\n};\n\n/**\n * This is a model with nested 'any of' property with a type null\n */\nexport type CompositionWithNestedAnyAndTypeNull = {\n    propA?: Array<ModelWithDictionary | null> | Array<ModelWithArray | null>;\n};\n\nexport type _3eNum1Период = 'Bird' | 'Dog';\n\nexport type ConstValue = 'ConstValue';\n\n/**\n * This is a model with one property with a 'any of' relationship where the options are not $ref\n */\nexport type CompositionWithNestedAnyOfAndNull = {\n    /**\n     * Scopes\n     */\n    propA?: Array<_3eNum1Период | ConstValue> | null;\n};\n\n/**\n * This is a model with one property with a 'one of' relationship\n */\nexport type CompositionWithOneOfAndNullable = {\n    propA?: {\n        boolean?: boolean;\n    } | ModelWithEnum | ModelWithArray | ModelWithDictionary | null;\n};\n\n/**\n * This is a model that contains a simple dictionary within composition\n */\nexport type CompositionWithOneOfAndSimpleDictionary = {\n    propA?: boolean | {\n        [key: string]: number;\n    };\n};\n\n/**\n * This is a model that contains a dictionary of simple arrays within composition\n */\nexport type CompositionWithOneOfAndSimpleArrayDictionary = {\n    propA?: boolean | {\n        [key: string]: Array<boolean>;\n    };\n};\n\n/**\n * This is a model that contains a dictionary of complex arrays (composited) within composition\n */\nexport type CompositionWithOneOfAndComplexArrayDictionary = {\n    propA?: boolean | {\n        [key: string]: Array<number | string>;\n    };\n};\n\n/**\n * This is a model with one property with a 'all of' relationship\n */\nexport type CompositionWithAllOfAndNullable = {\n    propA?: ({\n        boolean?: boolean;\n    } & ModelWithEnum & ModelWithArray & ModelWithDictionary) | null;\n};\n\n/**\n * This is a model with one property with a 'any of' relationship\n */\nexport type CompositionWithAnyOfAndNullable = {\n    propA?: {\n        boolean?: boolean;\n    } | ModelWithEnum | ModelWithArray | ModelWithDictionary | null;\n};\n\n/**\n * This is a base model with two simple optional properties\n */\nexport type CompositionBaseModel = {\n    firstName?: string;\n    lastname?: string;\n};\n\n/**\n * This is a model that extends the base model\n */\nexport type CompositionExtendedModel = CompositionBaseModel & {\n    age: number;\n    firstName: string;\n    lastname: string;\n};\n\n/**\n * This is a model with one nested property\n */\nexport type ModelWithProperties = {\n    required: string;\n    readonly requiredAndReadOnly: string;\n    requiredAndNullable: string | null;\n    string?: string;\n    number?: number;\n    boolean?: boolean;\n    reference?: ModelWithString;\n    'property with space'?: string;\n    default?: string;\n    try?: string;\n    readonly '@namespace.string'?: string;\n    readonly '@namespace.integer'?: number;\n};\n\n/**\n * This is a model with one nested property\n */\nexport type ModelWithNestedProperties = {\n    readonly first: {\n        readonly second: {\n            readonly third: string | null;\n        } | null;\n    } | null;\n};\n\n/**\n * This is a model with duplicated properties\n */\nexport type ModelWithDuplicateProperties = {\n    prop?: ModelWithString;\n};\n\n/**\n * This is a model with ordered properties\n */\nexport type ModelWithOrderedProperties = {\n    zebra?: string;\n    apple?: string;\n    hawaii?: string;\n};\n\n/**\n * This is a model with duplicated imports\n */\nexport type ModelWithDuplicateImports = {\n    propA?: ModelWithString;\n    propB?: ModelWithString;\n    propC?: ModelWithString;\n};\n\n/**\n * This is a model that extends another model\n */\nexport type ModelThatExtends = ModelWithString & {\n    propExtendsA?: string;\n    propExtendsB?: ModelWithString;\n};\n\n/**\n * This is a model that extends another model\n */\nexport type ModelThatExtendsExtends = ModelWithString & ModelThatExtends & {\n    propExtendsC?: string;\n    propExtendsD?: ModelWithString;\n};\n\n/**\n * This is a model that contains a some patterns\n */\nexport type ModelWithPattern = {\n    key: string;\n    name: string;\n    readonly enabled?: boolean;\n    readonly modified?: string;\n    id?: string;\n    text?: string;\n    patternWithSingleQuotes?: string;\n    patternWithNewline?: string;\n    patternWithBacktick?: string;\n    patternWithUnicode?: string;\n};\n\nexport type File = {\n    /**\n     * Id\n     */\n    readonly id?: string;\n    /**\n     * Updated at\n     */\n    readonly updated_at?: string;\n    /**\n     * Created at\n     */\n    readonly created_at?: string;\n    /**\n     * Mime\n     */\n    mime: string;\n    /**\n     * File\n     */\n    readonly file?: string;\n};\n\nexport type Default = {\n    name?: string;\n};\n\nexport type Pageable = {\n    page?: number;\n    size?: number;\n    sort?: Array<string>;\n};\n\n/**\n * This is a free-form object without additionalProperties.\n */\nexport type FreeFormObjectWithoutAdditionalProperties = {\n    [key: string]: unknown;\n};\n\n/**\n * This is a free-form object with additionalProperties: true.\n */\nexport type FreeFormObjectWithAdditionalPropertiesEqTrue = {\n    [key: string]: unknown;\n};\n\n/**\n * This is a free-form object with additionalProperties: {}.\n */\nexport type FreeFormObjectWithAdditionalPropertiesEqEmptyObject = {\n    [key: string]: unknown;\n};\n\nexport type ModelWithConst = {\n    String?: 'String';\n    number?: 0;\n    null?: null;\n    withType?: 'Some string';\n};\n\n/**\n * This is a model with one property and additionalProperties: true\n */\nexport type ModelWithAdditionalPropertiesEqTrue = {\n    /**\n     * This is a simple string property\n     */\n    prop?: string;\n    [key: string]: unknown;\n};\n\nexport type NestedAnyOfArraysNullable = {\n    nullableArray?: Array<string | boolean> | null;\n};\n\nexport type CompositionWithOneOfAndProperties = ({\n    foo: SimpleParameter;\n} | {\n    bar: NonAsciiStringæøåÆøÅöôêÊ字符串;\n}) & {\n    baz: number | null;\n    qux: number;\n};\n\n/**\n * An object that can be null\n */\nexport type NullableObject = {\n    foo?: string;\n} | null;\n\n/**\n * Some % character\n */\nexport type CharactersInDescription = string;\n\nexport type ModelWithNullableObject = {\n    data?: NullableObject;\n};\n\n/**\n * An object with additional properties that can be null (anyOf ref + null)\n */\nexport type ModelWithAdditionalPropertiesRef = {\n    [key: string]: NullableObject | null;\n};\n\nexport type ModelWithOneOfEnum = {\n    foo: 'Bar';\n} | {\n    foo: 'Baz';\n} | {\n    foo: 'Qux';\n} | {\n    content: string;\n    foo: 'Quux';\n} | {\n    content: [\n        string,\n        string\n    ];\n    foo: 'Corge';\n};\n\nexport type ModelWithNestedArrayEnumsDataFoo = 'foo' | 'bar';\n\nexport type ModelWithNestedArrayEnumsDataBar = 'baz' | 'qux';\n\nexport type ModelWithNestedArrayEnumsData = {\n    foo?: Array<ModelWithNestedArrayEnumsDataFoo>;\n    bar?: Array<ModelWithNestedArrayEnumsDataBar>;\n};\n\nexport type ModelWithNestedArrayEnums = {\n    array_strings?: Array<string>;\n    data?: ModelWithNestedArrayEnumsData;\n};\n\nexport type ModelWithNestedCompositionEnums = {\n    foo?: ModelWithNestedArrayEnumsDataFoo;\n};\n\nexport type ModelWithReadOnlyAndWriteOnly = {\n    foo: string;\n    readonly bar: string;\n};\n\nexport type ModelWithConstantSizeArray = [\n    number,\n    number\n];\n\nexport type ModelWithAnyOfConstantSizeArray = [\n    number | string,\n    number | string,\n    number | string\n];\n\nexport type ModelWithPrefixItemsConstantSizeArray = [\n    ModelWithInteger,\n    number | string,\n    string\n];\n\nexport type ModelWithAnyOfConstantSizeArrayNullable = [\n    number | null | string,\n    number | null | string,\n    number | null | string\n];\n\nexport type ModelWithAnyOfConstantSizeArrayWithNSizeAndOptions = [\n    number | Import,\n    number | Import\n];\n\nexport type ModelWithAnyOfConstantSizeArrayAndIntersect = [\n    number & string,\n    number & string\n];\n\nexport type ModelWithNumericEnumUnion = {\n    /**\n     * Период\n     */\n    value?: -10 | -1 | 0 | 1 | 3 | 6 | 12;\n};\n\n/**\n * Some description with `back ticks`\n */\nexport type ModelWithBackticksInDescription = {\n    /**\n     * The template `that` should be used for parsing and importing the contents of the CSV file.\n     *\n     * <br/><p>There is one placeholder currently supported:<ul>     <li><b>${x}</b> - refers to the n-th column in the CSV file, e.g. ${1}, ${2}, ...)</li></ul><p>Example of a correct JSON template:</p>\n     * <pre>\n     * [\n     * {\n     * \"resourceType\": \"Asset\",\n     * \"identifier\": {\n     * \"name\": \"${1}\",\n     * \"domain\": {\n     * \"name\": \"${2}\",\n     * \"community\": {\n     * \"name\": \"Some Community\"\n     * }\n     * }\n     * },\n     * \"attributes\" : {\n     * \"00000000-0000-0000-0000-000000003115\" : [ {\n     * \"value\" : \"${3}\"\n     * } ],\n     * \"00000000-0000-0000-0000-000000000222\" : [ {\n     * \"value\" : \"${4}\"\n     * } ]\n     * }\n     * }\n     * ]\n     * </pre>\n     */\n    template?: string;\n};\n\nexport type ModelWithOneOfAndProperties = (SimpleParameter | NonAsciiStringæøåÆøÅöôêÊ字符串) & {\n    baz: number | null;\n    qux: number;\n};\n\n/**\n * Model used to test deduplication strategy (unused)\n */\nexport type ParameterSimpleParameterUnused = string;\n\n/**\n * Model used to test deduplication strategy\n */\nexport type PostServiceWithEmptyTagResponse = string;\n\n/**\n * Model used to test deduplication strategy\n */\nexport type PostServiceWithEmptyTagResponse2 = string;\n\n/**\n * Model used to test deduplication strategy\n */\nexport type DeleteFooData = string;\n\n/**\n * Model used to test deduplication strategy\n */\nexport type DeleteFooData2 = string;\n\n/**\n * Model with restricted keyword name\n */\nexport type Import = string;\n\nexport type SchemaWithFormRestrictedKeys = {\n    description?: string;\n    'x-enum-descriptions'?: string;\n    'x-enum-varnames'?: string;\n    'x-enumNames'?: string;\n    title?: string;\n    object?: {\n        description?: string;\n        'x-enum-descriptions'?: string;\n        'x-enum-varnames'?: string;\n        'x-enumNames'?: string;\n        title?: string;\n    };\n    array?: Array<{\n        description?: string;\n        'x-enum-descriptions'?: string;\n        'x-enum-varnames'?: string;\n        'x-enumNames'?: string;\n        title?: string;\n    }>;\n};\n\n/**\n * This schema was giving PascalCase transformations a hard time\n */\nexport type IoK8sApimachineryPkgApisMetaV1DeleteOptions = {\n    /**\n     * Must be fulfilled before a deletion is carried out. If not possible, a 409 Conflict status will be returned.\n     */\n    preconditions?: IoK8sApimachineryPkgApisMetaV1Preconditions;\n};\n\n/**\n * This schema was giving PascalCase transformations a hard time\n */\nexport type IoK8sApimachineryPkgApisMetaV1Preconditions = {\n    /**\n     * Specifies the target ResourceVersion\n     */\n    resourceVersion?: string;\n    /**\n     * Specifies the target UID.\n     */\n    uid?: string;\n};\n\nexport type AdditionalPropertiesUnknownIssue = {\n    [key: string]: string | number;\n};\n\nexport type AdditionalPropertiesUnknownIssue2 = {\n    [key: string]: string | number;\n};\n\nexport type AdditionalPropertiesUnknownIssue3 = string & {\n    entries: {\n        [key: string]: AdditionalPropertiesUnknownIssue;\n    };\n};\n\nexport type AdditionalPropertiesIntegerIssue = {\n    value: number;\n    [key: string]: number;\n};\n\nexport type OneOfAllOfIssue = ((ConstValue | GenericSchemaDuplicateIssue1SystemBoolean) & _3eNum1Период) | GenericSchemaDuplicateIssue1SystemString;\n\nexport type GenericSchemaDuplicateIssue1SystemBoolean = {\n    item?: boolean;\n    error?: string | null;\n    readonly hasError?: boolean;\n    data?: {\n        [key: string]: never;\n    };\n};\n\nexport type GenericSchemaDuplicateIssue1SystemString = {\n    item?: string | null;\n    error?: string | null;\n    readonly hasError?: boolean;\n};\n\nexport type ExternalSharedModel = {\n    id: string;\n    name?: string;\n};\n\n/**\n * This is a model with one property containing a reference\n */\nexport type ModelWithReferenceWritable = {\n    prop?: ModelWithPropertiesWritable;\n};\n\n/**\n * This is a model with one property containing an array\n */\nexport type ModelWithArrayReadOnlyAndWriteOnlyWritable = {\n    prop?: Array<ModelWithReadOnlyAndWriteOnlyWritable>;\n    propWithFile?: Array<Blob | File>;\n    propWithNumber?: Array<number>;\n};\n\n/**\n * This is a model with one nested property\n */\nexport type ModelWithPropertiesWritable = {\n    required: string;\n    requiredAndNullable: string | null;\n    string?: string;\n    number?: number;\n    boolean?: boolean;\n    reference?: ModelWithString;\n    'property with space'?: string;\n    default?: string;\n    try?: string;\n};\n\n/**\n * This is a model that contains a some patterns\n */\nexport type ModelWithPatternWritable = {\n    key: string;\n    name: string;\n    id?: string;\n    text?: string;\n    patternWithSingleQuotes?: string;\n    patternWithNewline?: string;\n    patternWithBacktick?: string;\n    patternWithUnicode?: string;\n};\n\nexport type FileWritable = {\n    /**\n     * Mime\n     */\n    mime: string;\n};\n\nexport type ModelWithReadOnlyAndWriteOnlyWritable = {\n    foo: string;\n    baz: string;\n};\n\nexport type ModelWithAnyOfConstantSizeArrayWithNSizeAndOptionsWritable = [\n    number | Import,\n    number | Import\n];\n\nexport type AdditionalPropertiesUnknownIssueWritable = {\n    [key: string]: string | number;\n};\n\nexport type OneOfAllOfIssueWritable = ((ConstValue | GenericSchemaDuplicateIssue1SystemBoolean) & _3eNum1Период) | GenericSchemaDuplicateIssue1SystemString;\n\nexport type GenericSchemaDuplicateIssue1SystemBooleanWritable = {\n    item?: boolean;\n    error?: string | null;\n    data?: {\n        [key: string]: never;\n    };\n};\n\nexport type GenericSchemaDuplicateIssue1SystemStringWritable = {\n    item?: string | null;\n    error?: string | null;\n};\n\n/**\n * This is a reusable parameter\n */\nexport type SimpleParameter = string;\n\n/**\n * Parameter with illegal characters\n */\nexport type XFooBar = ModelWithString;\n\n/**\n * A reusable request body\n */\nexport type SimpleRequestBody = ModelWithString;\n\n/**\n * A reusable request body\n */\nexport type SimpleFormData = ModelWithString;\n\nexport type ExportData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no+tag';\n};\n\nexport type PatchApiVbyApiVersionNoTagData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no+tag';\n};\n\nexport type PatchApiVbyApiVersionNoTagResponses = {\n    /**\n     * OK\n     */\n    default: unknown;\n};\n\nexport type ImportData = {\n    body: ModelWithReadOnlyAndWriteOnlyWritable | ModelWithArrayReadOnlyAndWriteOnlyWritable;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no+tag';\n};\n\nexport type ImportResponses = {\n    /**\n     * Success\n     */\n    200: ModelFromZendesk;\n    /**\n     * Default success response\n     */\n    default: ModelWithReadOnlyAndWriteOnly;\n};\n\nexport type ImportResponse = ImportResponses[keyof ImportResponses];\n\nexport type FooWowData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no+tag';\n};\n\nexport type FooWowResponses = {\n    /**\n     * OK\n     */\n    default: unknown;\n};\n\nexport type ApiVVersionODataControllerCountData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple/$count';\n};\n\nexport type ApiVVersionODataControllerCountResponses = {\n    /**\n     * Success\n     */\n    200: ModelFromZendesk;\n};\n\nexport type ApiVVersionODataControllerCountResponse = ApiVVersionODataControllerCountResponses[keyof ApiVVersionODataControllerCountResponses];\n\nexport type GetApiVbyApiVersionSimpleOperationData = {\n    body?: never;\n    path: {\n        /**\n         * foo in method\n         */\n        foo_param: string;\n    };\n    query?: never;\n    url: '/api/v{api-version}/simple:operation';\n};\n\nexport type GetApiVbyApiVersionSimpleOperationErrors = {\n    /**\n     * Default error response\n     */\n    default: ModelWithBoolean;\n};\n\nexport type GetApiVbyApiVersionSimpleOperationError = GetApiVbyApiVersionSimpleOperationErrors[keyof GetApiVbyApiVersionSimpleOperationErrors];\n\nexport type GetApiVbyApiVersionSimpleOperationResponses = {\n    /**\n     * Response is a simple number\n     */\n    200: number;\n};\n\nexport type GetApiVbyApiVersionSimpleOperationResponse = GetApiVbyApiVersionSimpleOperationResponses[keyof GetApiVbyApiVersionSimpleOperationResponses];\n\nexport type DeleteCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type GetCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type HeadCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type OptionsCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type PatchCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type PostCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type PutCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type DeleteFooData3 = {\n    body?: never;\n    headers: {\n        /**\n         * Parameter with illegal characters\n         */\n        'x-Foo-Bar': ModelWithString;\n    };\n    path: {\n        /**\n         * foo in method\n         */\n        foo_param: string;\n        /**\n         * bar in method\n         */\n        BarParam: string;\n    };\n    query?: never;\n    url: '/api/v{api-version}/foo/{foo_param}/bar/{BarParam}';\n};\n\nexport type CallWithDescriptionsData = {\n    body?: never;\n    path?: never;\n    query?: {\n        /**\n         * Testing multiline comments in string: First line\n         * Second line\n         *\n         * Fourth line\n         */\n        parameterWithBreaks?: string;\n        /**\n         * Testing backticks in string: `backticks` and ```multiple backticks``` should work\n         */\n        parameterWithBackticks?: string;\n        /**\n         * Testing slashes in string: \\backwards\\\\\\ and /forwards/// should work\n         */\n        parameterWithSlashes?: string;\n        /**\n         * Testing expression placeholders in string: ${expression} should work\n         */\n        parameterWithExpressionPlaceholders?: string;\n        /**\n         * Testing quotes in string: 'single quote''' and \"double quotes\"\"\" should work\n         */\n        parameterWithQuotes?: string;\n        /**\n         * Testing reserved characters in string: * inline * and ** inline ** should work\n         */\n        parameterWithReservedCharacters?: string;\n    };\n    url: '/api/v{api-version}/descriptions';\n};\n\nexport type DeprecatedCallData = {\n    body?: never;\n    headers: {\n        /**\n         * This parameter is deprecated\n         *\n         * @deprecated\n         */\n        parameter: DeprecatedModel | null;\n    };\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/parameters/deprecated';\n};\n\nexport type CallWithParametersData = {\n    /**\n     * This is the parameter that goes into the body\n     */\n    body: {\n        [key: string]: unknown;\n    } | null;\n    headers: {\n        /**\n         * This is the parameter that goes into the header\n         */\n        parameterHeader: string | null;\n    };\n    path: {\n        /**\n         * This is the parameter that goes into the path\n         */\n        parameterPath: string | null;\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string | null;\n    };\n    query: {\n        foo_ref_enum?: ModelWithNestedArrayEnumsDataFoo;\n        foo_all_of_enum: ModelWithNestedArrayEnumsDataFoo;\n        /**\n         * This is the parameter that goes into the query params\n         */\n        cursor: string | null;\n    };\n    url: '/api/v{api-version}/parameters/{parameterPath}';\n};\n\nexport type CallWithWeirdParameterNamesData = {\n    /**\n     * This is the parameter that goes into the body\n     */\n    body: ModelWithString | null;\n    headers: {\n        /**\n         * This is the parameter that goes into the request header\n         */\n        'parameter.header': string | null;\n    };\n    path: {\n        /**\n         * This is the parameter that goes into the path\n         */\n        'parameter.path.1'?: string;\n        /**\n         * This is the parameter that goes into the path\n         */\n        'parameter-path-2'?: string;\n        /**\n         * This is the parameter that goes into the path\n         */\n        'PARAMETER-PATH-3'?: string;\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string | null;\n    };\n    query: {\n        /**\n         * This is the parameter with a reserved keyword\n         */\n        default?: string;\n        /**\n         * This is the parameter that goes into the request query params\n         */\n        'parameter-query': string | null;\n    };\n    url: '/api/v{api-version}/parameters/{parameter.path.1}/{parameter-path-2}/{PARAMETER-PATH-3}';\n};\n\nexport type GetCallWithOptionalParamData = {\n    /**\n     * This is a required parameter\n     */\n    body: ModelWithOneOfEnum;\n    path?: never;\n    query?: {\n        /**\n         * This is an optional parameter\n         */\n        page?: number;\n    };\n    url: '/api/v{api-version}/parameters';\n};\n\nexport type PostCallWithOptionalParamData = {\n    /**\n     * This is an optional parameter\n     */\n    body?: {\n        offset?: number | null;\n    };\n    path?: never;\n    query: {\n        /**\n         * This is a required parameter\n         */\n        parameter: Pageable;\n    };\n    url: '/api/v{api-version}/parameters';\n};\n\nexport type PostCallWithOptionalParamResponses = {\n    /**\n     * Response is a simple number\n     */\n    200: number;\n    /**\n     * Success\n     */\n    204: void;\n};\n\nexport type PostCallWithOptionalParamResponse = PostCallWithOptionalParamResponses[keyof PostCallWithOptionalParamResponses];\n\nexport type PostApiVbyApiVersionRequestBodyData = {\n    /**\n     * A reusable request body\n     */\n    body?: SimpleRequestBody;\n    path?: never;\n    query?: {\n        /**\n         * This is a reusable parameter\n         */\n        parameter?: string;\n    };\n    url: '/api/v{api-version}/requestBody';\n};\n\nexport type PostApiVbyApiVersionFormDataData = {\n    /**\n     * A reusable request body\n     */\n    body?: SimpleFormData;\n    path?: never;\n    query?: {\n        /**\n         * This is a reusable parameter\n         */\n        parameter?: string;\n    };\n    url: '/api/v{api-version}/formData';\n};\n\nexport type CallWithDefaultParametersData = {\n    body?: never;\n    path?: never;\n    query?: {\n        /**\n         * This is a simple string with default value\n         */\n        parameterString?: string | null;\n        /**\n         * This is a simple number with default value\n         */\n        parameterNumber?: number | null;\n        /**\n         * This is a simple boolean with default value\n         */\n        parameterBoolean?: boolean | null;\n        /**\n         * This is a simple enum with default value\n         */\n        parameterEnum?: 'Success' | 'Warning' | 'Error';\n        /**\n         * This is a simple model with default value\n         */\n        parameterModel?: ModelWithString | null;\n    };\n    url: '/api/v{api-version}/defaults';\n};\n\nexport type CallWithDefaultOptionalParametersData = {\n    body?: never;\n    path?: never;\n    query?: {\n        /**\n         * This is a simple string that is optional with default value\n         */\n        parameterString?: string;\n        /**\n         * This is a simple number that is optional with default value\n         */\n        parameterNumber?: number;\n        /**\n         * This is a simple boolean that is optional with default value\n         */\n        parameterBoolean?: boolean;\n        /**\n         * This is a simple enum that is optional with default value\n         */\n        parameterEnum?: 'Success' | 'Warning' | 'Error';\n        /**\n         * This is a simple model that is optional with default value\n         */\n        parameterModel?: ModelWithString;\n    };\n    url: '/api/v{api-version}/defaults';\n};\n\nexport type CallToTestOrderOfParamsData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * This is a optional string with default\n         */\n        parameterOptionalStringWithDefault?: string;\n        /**\n         * This is a optional string with empty default\n         */\n        parameterOptionalStringWithEmptyDefault?: string;\n        /**\n         * This is a optional string with no default\n         */\n        parameterOptionalStringWithNoDefault?: string;\n        /**\n         * This is a string with default\n         */\n        parameterStringWithDefault: string;\n        /**\n         * This is a string with empty default\n         */\n        parameterStringWithEmptyDefault: string;\n        /**\n         * This is a string with no default\n         */\n        parameterStringWithNoDefault: string;\n        /**\n         * This is a string that can be null with no default\n         */\n        parameterStringNullableWithNoDefault?: string | null;\n        /**\n         * This is a string that can be null with default\n         */\n        parameterStringNullableWithDefault?: string | null;\n    };\n    url: '/api/v{api-version}/defaults';\n};\n\nexport type DuplicateNameData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/duplicate';\n};\n\nexport type DuplicateName2Data = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/duplicate';\n};\n\nexport type DuplicateName3Data = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/duplicate';\n};\n\nexport type DuplicateName4Data = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/duplicate';\n};\n\nexport type CallWithNoContentResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no-content';\n};\n\nexport type CallWithNoContentResponseResponses = {\n    /**\n     * Success\n     */\n    204: void;\n};\n\nexport type CallWithNoContentResponseResponse = CallWithNoContentResponseResponses[keyof CallWithNoContentResponseResponses];\n\nexport type CallWithResponseAndNoContentResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multiple-tags/response-and-no-content';\n};\n\nexport type CallWithResponseAndNoContentResponseResponses = {\n    /**\n     * Response is a simple number\n     */\n    200: number;\n    /**\n     * Success\n     */\n    204: void;\n};\n\nexport type CallWithResponseAndNoContentResponseResponse = CallWithResponseAndNoContentResponseResponses[keyof CallWithResponseAndNoContentResponseResponses];\n\nexport type DummyAData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multiple-tags/a';\n};\n\nexport type DummyAResponses = {\n    200: _400;\n};\n\nexport type DummyAResponse = DummyAResponses[keyof DummyAResponses];\n\nexport type DummyBData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multiple-tags/b';\n};\n\nexport type DummyBResponses = {\n    /**\n     * Success\n     */\n    204: void;\n};\n\nexport type DummyBResponse = DummyBResponses[keyof DummyBResponses];\n\nexport type CallWithResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/response';\n};\n\nexport type CallWithResponseResponses = {\n    default: Import;\n};\n\nexport type CallWithResponseResponse = CallWithResponseResponses[keyof CallWithResponseResponses];\n\nexport type CallWithDuplicateResponsesData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/response';\n};\n\nexport type CallWithDuplicateResponsesErrors = {\n    /**\n     * Message for 500 error\n     */\n    500: ModelWithStringError;\n    /**\n     * Message for 501 error\n     */\n    501: ModelWithStringError;\n    /**\n     * Message for 502 error\n     */\n    502: ModelWithStringError;\n    /**\n     * Message for 4XX errors\n     */\n    '4XX': DictionaryWithArray;\n    /**\n     * Default error response\n     */\n    default: ModelWithBoolean;\n};\n\nexport type CallWithDuplicateResponsesError = CallWithDuplicateResponsesErrors[keyof CallWithDuplicateResponsesErrors];\n\nexport type CallWithDuplicateResponsesResponses = {\n    /**\n     * Message for 200 response\n     */\n    200: ModelWithBoolean & ModelWithInteger;\n    /**\n     * Message for 201 response\n     */\n    201: ModelWithString;\n    /**\n     * Message for 202 response\n     */\n    202: ModelWithString;\n};\n\nexport type CallWithDuplicateResponsesResponse = CallWithDuplicateResponsesResponses[keyof CallWithDuplicateResponsesResponses];\n\nexport type CallWithResponsesData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/response';\n};\n\nexport type CallWithResponsesErrors = {\n    /**\n     * Message for 500 error\n     */\n    500: ModelWithStringError;\n    /**\n     * Message for 501 error\n     */\n    501: ModelWithStringError;\n    /**\n     * Message for 502 error\n     */\n    502: ModelWithStringError;\n    /**\n     * Message for default response\n     */\n    default: ModelWithStringError;\n};\n\nexport type CallWithResponsesError = CallWithResponsesErrors[keyof CallWithResponsesErrors];\n\nexport type CallWithResponsesResponses = {\n    /**\n     * Message for 200 response\n     */\n    200: {\n        readonly '@namespace.string'?: string;\n        readonly '@namespace.integer'?: number;\n        readonly value?: Array<ModelWithString>;\n    };\n    /**\n     * Message for 201 response\n     */\n    201: ModelThatExtends;\n    /**\n     * Message for 202 response\n     */\n    202: ModelThatExtendsExtends;\n};\n\nexport type CallWithResponsesResponse = CallWithResponsesResponses[keyof CallWithResponsesResponses];\n\nexport type CollectionFormatData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * This is an array parameter that is sent as csv format (comma-separated values)\n         */\n        parameterArrayCSV: Array<string> | null;\n        /**\n         * This is an array parameter that is sent as ssv format (space-separated values)\n         */\n        parameterArraySSV: Array<string> | null;\n        /**\n         * This is an array parameter that is sent as tsv format (tab-separated values)\n         */\n        parameterArrayTSV: Array<string> | null;\n        /**\n         * This is an array parameter that is sent as pipes format (pipe-separated values)\n         */\n        parameterArrayPipes: Array<string> | null;\n        /**\n         * This is an array parameter that is sent as multi format (multiple parameter instances)\n         */\n        parameterArrayMulti: Array<string> | null;\n    };\n    url: '/api/v{api-version}/collectionFormat';\n};\n\nexport type TypesData = {\n    body?: never;\n    path?: {\n        /**\n         * This is a number parameter\n         */\n        id?: number;\n    };\n    query: {\n        /**\n         * This is a number parameter\n         */\n        parameterNumber: number;\n        /**\n         * This is a string parameter\n         */\n        parameterString: string | null;\n        /**\n         * This is a boolean parameter\n         */\n        parameterBoolean: boolean | null;\n        /**\n         * This is an object parameter\n         */\n        parameterObject: {\n            [key: string]: unknown;\n        } | null;\n        /**\n         * This is an array parameter\n         */\n        parameterArray: Array<string> | null;\n        /**\n         * This is a dictionary parameter\n         */\n        parameterDictionary: {\n            [key: string]: unknown;\n        } | null;\n        /**\n         * This is an enum parameter\n         */\n        parameterEnum: 'Success' | 'Warning' | 'Error' | null;\n    };\n    url: '/api/v{api-version}/types';\n};\n\nexport type TypesResponses = {\n    /**\n     * Response is a simple number\n     */\n    200: number;\n    /**\n     * Response is a simple string\n     */\n    201: string;\n    /**\n     * Response is a simple boolean\n     */\n    202: boolean;\n    /**\n     * Response is a simple object\n     */\n    203: {\n        [key: string]: unknown;\n    };\n};\n\nexport type TypesResponse = TypesResponses[keyof TypesResponses];\n\nexport type UploadFileData = {\n    body: Blob | File;\n    path: {\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string | null;\n    };\n    query?: never;\n    url: '/api/v{api-version}/upload';\n};\n\nexport type UploadFileResponses = {\n    200: boolean;\n};\n\nexport type UploadFileResponse = UploadFileResponses[keyof UploadFileResponses];\n\nexport type FileResponseData = {\n    body?: never;\n    path: {\n        id: string;\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string;\n    };\n    query?: never;\n    url: '/api/v{api-version}/file/{id}';\n};\n\nexport type FileResponseResponses = {\n    /**\n     * Success\n     */\n    200: Blob | File;\n};\n\nexport type FileResponseResponse = FileResponseResponses[keyof FileResponseResponses];\n\nexport type ComplexTypesData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * Parameter containing object\n         */\n        parameterObject: {\n            first?: {\n                second?: {\n                    third?: string;\n                };\n            };\n        };\n        /**\n         * Parameter containing reference\n         */\n        parameterReference: ModelWithString;\n    };\n    url: '/api/v{api-version}/complex';\n};\n\nexport type ComplexTypesErrors = {\n    /**\n     * 400 `server` error\n     */\n    400: unknown;\n    /**\n     * 500 server error\n     */\n    500: unknown;\n};\n\nexport type ComplexTypesResponses = {\n    /**\n     * Successful response\n     */\n    200: Array<ModelWithString>;\n};\n\nexport type ComplexTypesResponse = ComplexTypesResponses[keyof ComplexTypesResponses];\n\nexport type MultipartResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multipart';\n};\n\nexport type MultipartResponseResponses = {\n    /**\n     * OK\n     */\n    200: {\n        file?: Blob | File;\n        metadata?: {\n            foo?: string;\n            bar?: string;\n        };\n    };\n};\n\nexport type MultipartResponseResponse = MultipartResponseResponses[keyof MultipartResponseResponses];\n\nexport type MultipartRequestData = {\n    body?: {\n        content?: Blob | File;\n        data?: ModelWithString | null;\n    };\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multipart';\n};\n\nexport type ComplexParamsData = {\n    body?: {\n        readonly key: string | null;\n        name: string | null;\n        enabled?: boolean;\n        type: 'Monkey' | 'Horse' | 'Bird';\n        listOfModels?: Array<ModelWithString> | null;\n        listOfStrings?: Array<string> | null;\n        parameters: ModelWithString | ModelWithEnum | ModelWithArray | ModelWithDictionary;\n        readonly user?: {\n            readonly id?: number;\n            readonly name?: string | null;\n        };\n    };\n    path: {\n        id: number;\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string;\n    };\n    query?: never;\n    url: '/api/v{api-version}/complex/{id}';\n};\n\nexport type ComplexParamsResponses = {\n    /**\n     * Success\n     */\n    200: ModelWithString;\n};\n\nexport type ComplexParamsResponse = ComplexParamsResponses[keyof ComplexParamsResponses];\n\nexport type CallWithResultFromHeaderData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/header';\n};\n\nexport type CallWithResultFromHeaderErrors = {\n    /**\n     * 400 server error\n     */\n    400: unknown;\n    /**\n     * 500 server error\n     */\n    500: unknown;\n};\n\nexport type CallWithResultFromHeaderResponses = {\n    /**\n     * Successful response\n     */\n    200: unknown;\n};\n\nexport type TestErrorCodeData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * Status code to return\n         */\n        status: number;\n    };\n    url: '/api/v{api-version}/error';\n};\n\nexport type TestErrorCodeErrors = {\n    /**\n     * Custom message: Internal Server Error\n     */\n    500: unknown;\n    /**\n     * Custom message: Not Implemented\n     */\n    501: unknown;\n    /**\n     * Custom message: Bad Gateway\n     */\n    502: unknown;\n    /**\n     * Custom message: Service Unavailable\n     */\n    503: unknown;\n};\n\nexport type TestErrorCodeResponses = {\n    /**\n     * Custom message: Successful response\n     */\n    200: unknown;\n};\n\nexport type NonAsciiæøåÆøÅöôêÊ字符串Data = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * Dummy input param\n         */\n        nonAsciiParamæøåÆØÅöôêÊ: number;\n    };\n    url: '/api/v{api-version}/non-ascii-æøåÆØÅöôêÊ字符串';\n};\n\nexport type NonAsciiæøåÆøÅöôêÊ字符串Responses = {\n    /**\n     * Successful response\n     */\n    200: Array<NonAsciiStringæøåÆøÅöôêÊ字符串>;\n};\n\nexport type NonAsciiæøåÆøÅöôêÊ字符串Response = NonAsciiæøåÆøÅöôêÊ字符串Responses[keyof NonAsciiæøåÆøÅöôêÊ字符串Responses];\n\nexport type PutWithFormUrlEncodedData = {\n    body: ArrayWithStrings;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/non-ascii-æøåÆØÅöôêÊ字符串';\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-fetch/sdk-client-optional/client/client.gen.ts",
    "content": "// 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 (options: RequestOptions) => {\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 url = buildUrl(opts);\n\n    return { opts, url };\n  };\n\n  const request: Client['request'] = async (options) => {\n    // @ts-expect-error\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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-fetch/sdk-client-optional/client/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type { Auth } from '../core/auth.gen';\nexport type { QuerySerializerOptions } from '../core/bodySerializer.gen';\nexport {\n  formDataBodySerializer,\n  jsonBodySerializer,\n  urlSearchParamsBodySerializer,\n} from '../core/bodySerializer.gen';\nexport { buildClientParams } from '../core/params.gen';\nexport { serializeQueryKeyValue } from '../core/queryKeySerializer.gen';\nexport { createClient } from './client.gen';\nexport type {\n  Client,\n  ClientOptions,\n  Config,\n  CreateClientConfig,\n  Options,\n  RequestOptions,\n  RequestResult,\n  ResolvedRequestOptions,\n  ResponseStyle,\n  TDataShape,\n} from './types.gen';\nexport { createConfig, mergeHeaders } from './utils.gen';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-fetch/sdk-client-optional/client/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { Auth } from '../core/auth.gen';\nimport type {\n  ServerSentEventsOptions,\n  ServerSentEventsResult,\n} from '../core/serverSentEvents.gen';\nimport type { Client as CoreClient, Config as CoreConfig } from '../core/types.gen';\nimport type { Middleware } from './utils.gen';\n\nexport type ResponseStyle = 'data' | 'fields';\n\nexport interface Config<T extends ClientOptions = ClientOptions>\n  extends Omit<RequestInit, 'body' | 'headers' | 'method'>, CoreConfig {\n  /**\n   * Base URL for all requests made by this client.\n   */\n  baseUrl?: T['baseUrl'];\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   * Please don't use the Fetch client for Next.js applications. The `next`\n   * options won't have any effect.\n   *\n   * Install {@link https://www.npmjs.com/package/@hey-api/client-next `@hey-api/client-next`} instead.\n   */\n  next?: never;\n  /**\n   * Return the response data parsed in a specified format. By default, `auto`\n   * will infer the appropriate method from the `Content-Type` response header.\n   * You can override this behavior with any of the {@link Body} methods.\n   * Select `stream` if you don't want to parse response data at all.\n   *\n   * @default 'auto'\n   */\n  parseAs?: 'arrayBuffer' | 'auto' | 'blob' | 'formData' | 'json' | 'stream' | 'text';\n  /**\n   * Should we return only data or multiple fields (data, error, response, etc.)?\n   *\n   * @default 'fields'\n   */\n  responseStyle?: ResponseStyle;\n  /**\n   * Throw an error instead of returning it in the response?\n   *\n   * @default false\n   */\n  throwOnError?: T['throwOnError'];\n}\n\nexport interface RequestOptions<\n  TData = unknown,\n  TResponseStyle extends ResponseStyle = 'fields',\n  ThrowOnError extends boolean = boolean,\n  Url extends string = string,\n>\n  extends\n    Config<{\n      responseStyle: TResponseStyle;\n      throwOnError: ThrowOnError;\n    }>,\n    Pick<\n      ServerSentEventsOptions<TData>,\n      | 'onRequest'\n      | 'onSseError'\n      | 'onSseEvent'\n      | 'sseDefaultRetryDelay'\n      | 'sseMaxRetryAttempts'\n      | 'sseMaxRetryDelay'\n    > {\n  /**\n   * Any body that you want to add to your request.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/fetch#body}\n   */\n  body?: unknown;\n  path?: Record<string, unknown>;\n  query?: Record<string, unknown>;\n  /**\n   * Security mechanism(s) to use for the request.\n   */\n  security?: ReadonlyArray<Auth>;\n  url: Url;\n}\n\nexport interface ResolvedRequestOptions<\n  TResponseStyle extends ResponseStyle = 'fields',\n  ThrowOnError extends boolean = boolean,\n  Url extends string = string,\n> extends RequestOptions<unknown, TResponseStyle, ThrowOnError, Url> {\n  serializedBody?: string;\n}\n\nexport type RequestResult<\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = boolean,\n  TResponseStyle extends ResponseStyle = 'fields',\n> = ThrowOnError extends true\n  ? Promise<\n      TResponseStyle extends 'data'\n        ? TData extends Record<string, unknown>\n          ? TData[keyof TData]\n          : TData\n        : {\n            data: TData extends Record<string, unknown> ? TData[keyof TData] : TData;\n            request: Request;\n            response: Response;\n          }\n    >\n  : Promise<\n      TResponseStyle extends 'data'\n        ? (TData extends Record<string, unknown> ? TData[keyof TData] : TData) | undefined\n        : (\n            | {\n                data: TData extends Record<string, unknown> ? TData[keyof TData] : TData;\n                error: undefined;\n              }\n            | {\n                data: undefined;\n                error: TError extends Record<string, unknown> ? TError[keyof TError] : TError;\n              }\n          ) & {\n            request: Request;\n            response: Response;\n          }\n    >;\n\nexport interface ClientOptions {\n  baseUrl?: string;\n  responseStyle?: ResponseStyle;\n  throwOnError?: boolean;\n}\n\ntype MethodFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'>,\n) => RequestResult<TData, TError, ThrowOnError, TResponseStyle>;\n\ntype SseFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'>,\n) => Promise<ServerSentEventsResult<TData, TError>>;\n\ntype RequestFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'> &\n    Pick<Required<RequestOptions<TData, TResponseStyle, ThrowOnError>>, 'method'>,\n) => RequestResult<TData, TError, ThrowOnError, TResponseStyle>;\n\ntype BuildUrlFn = <\n  TData extends {\n    body?: unknown;\n    path?: Record<string, unknown>;\n    query?: Record<string, unknown>;\n    url: string;\n  },\n>(\n  options: TData & Options<TData>,\n) => string;\n\nexport type Client = CoreClient<RequestFn, Config, MethodFn, BuildUrlFn, SseFn> & {\n  interceptors: Middleware<Request, Response, unknown, ResolvedRequestOptions>;\n};\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 = ClientOptions> = (\n  override?: Config<ClientOptions & T>,\n) => Config<Required<ClientOptions> & T>;\n\nexport interface TDataShape {\n  body?: unknown;\n  headers?: unknown;\n  path?: unknown;\n  query?: unknown;\n  url: string;\n}\n\ntype OmitKeys<T, K> = Pick<T, Exclude<keyof T, K>>;\n\nexport type Options<\n  TData extends TDataShape = TDataShape,\n  ThrowOnError extends boolean = boolean,\n  TResponse = unknown,\n  TResponseStyle extends ResponseStyle = 'fields',\n> = OmitKeys<\n  RequestOptions<TResponse, TResponseStyle, ThrowOnError>,\n  'body' | 'path' | 'query' | 'url'\n> &\n  ([TData] extends [never] ? unknown : Omit<TData, 'url'>);\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-fetch/sdk-client-optional/client/utils.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-fetch/sdk-client-optional/client.gen.ts",
    "content": "// 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: 'http://localhost:3000/base' }));\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-fetch/sdk-client-optional/core/auth.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-fetch/sdk-client-optional/core/bodySerializer.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-fetch/sdk-client-optional/core/params.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-fetch/sdk-client-optional/core/pathSerializer.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-fetch/sdk-client-optional/core/queryKeySerializer.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\n/**\n * JSON-friendly union that mirrors what Pinia Colada can hash.\n */\nexport type JsonValue =\n  | null\n  | string\n  | number\n  | boolean\n  | JsonValue[]\n  | { [key: string]: JsonValue };\n\n/**\n * Replacer that converts non-JSON values (bigint, Date, etc.) to safe substitutes.\n */\nexport const queryKeyJsonReplacer = (_key: string, value: unknown) => {\n  if (value === undefined || typeof value === 'function' || typeof value === 'symbol') {\n    return undefined;\n  }\n  if (typeof value === 'bigint') {\n    return value.toString();\n  }\n  if (value instanceof Date) {\n    return value.toISOString();\n  }\n  return value;\n};\n\n/**\n * Safely stringifies a value and parses it back into a JsonValue.\n */\nexport const stringifyToJsonValue = (input: unknown): JsonValue | undefined => {\n  try {\n    const json = JSON.stringify(input, queryKeyJsonReplacer);\n    if (json === undefined) {\n      return undefined;\n    }\n    return JSON.parse(json) as JsonValue;\n  } catch {\n    return undefined;\n  }\n};\n\n/**\n * Detects plain objects (including objects with a null prototype).\n */\nconst isPlainObject = (value: unknown): value is Record<string, unknown> => {\n  if (value === null || typeof value !== 'object') {\n    return false;\n  }\n  const prototype = Object.getPrototypeOf(value as object);\n  return prototype === Object.prototype || prototype === null;\n};\n\n/**\n * Turns URLSearchParams into a sorted JSON object for deterministic keys.\n */\nconst serializeSearchParams = (params: URLSearchParams): JsonValue => {\n  const entries = Array.from(params.entries()).sort(([a], [b]) => a.localeCompare(b));\n  const result: Record<string, JsonValue> = {};\n\n  for (const [key, value] of entries) {\n    const existing = result[key];\n    if (existing === undefined) {\n      result[key] = value;\n      continue;\n    }\n\n    if (Array.isArray(existing)) {\n      (existing as string[]).push(value);\n    } else {\n      result[key] = [existing, value];\n    }\n  }\n\n  return result;\n};\n\n/**\n * Normalizes any accepted value into a JSON-friendly shape for query keys.\n */\nexport const serializeQueryKeyValue = (value: unknown): JsonValue | undefined => {\n  if (value === null) {\n    return null;\n  }\n\n  if (typeof value === 'string' || typeof value === 'number' || typeof value === 'boolean') {\n    return value;\n  }\n\n  if (value === undefined || typeof value === 'function' || typeof value === 'symbol') {\n    return undefined;\n  }\n\n  if (typeof value === 'bigint') {\n    return value.toString();\n  }\n\n  if (value instanceof Date) {\n    return value.toISOString();\n  }\n\n  if (Array.isArray(value)) {\n    return stringifyToJsonValue(value);\n  }\n\n  if (typeof URLSearchParams !== 'undefined' && value instanceof URLSearchParams) {\n    return serializeSearchParams(value);\n  }\n\n  if (isPlainObject(value)) {\n    return stringifyToJsonValue(value);\n  }\n\n  return undefined;\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-fetch/sdk-client-optional/core/serverSentEvents.gen.ts",
    "content": "// 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 const 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            // Normalize line endings: CRLF -> LF, then CR -> LF\n            buffer = buffer.replace(/\\r\\n/g, '\\n').replace(/\\r/g, '\\n');\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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-fetch/sdk-client-optional/core/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { Auth, AuthToken } from './auth.gen';\nimport type { BodySerializer, QuerySerializer, QuerySerializerOptions } from './bodySerializer.gen';\n\nexport type HttpMethod =\n  | 'connect'\n  | 'delete'\n  | 'get'\n  | 'head'\n  | 'options'\n  | 'patch'\n  | 'post'\n  | 'put'\n  | 'trace';\n\nexport type Client<\n  RequestFn = never,\n  Config = unknown,\n  MethodFn = never,\n  BuildUrlFn = never,\n  SseFn = never,\n> = {\n  /**\n   * Returns the final request URL.\n   */\n  buildUrl: BuildUrlFn;\n  getConfig: () => Config;\n  request: RequestFn;\n  setConfig: (config: Config) => Config;\n} & {\n  [K in HttpMethod]: MethodFn;\n} & ([SseFn] extends [never] ? { sse?: never } : { sse: { [K in HttpMethod]: SseFn } });\n\nexport interface Config {\n  /**\n   * Auth token or a function returning auth token. The resolved value will be\n   * added to the request payload as defined by its `security` array.\n   */\n  auth?: ((auth: Auth) => Promise<AuthToken> | AuthToken) | AuthToken;\n  /**\n   * A function for serializing request body parameter. By default,\n   * {@link JSON.stringify()} will be used.\n   */\n  bodySerializer?: BodySerializer | null;\n  /**\n   * An object containing any HTTP headers that you want to pre-populate your\n   * `Headers` object with.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/Headers/Headers#init See more}\n   */\n  headers?:\n    | RequestInit['headers']\n    | Record<\n        string,\n        string | number | boolean | (string | number | boolean)[] | null | undefined | unknown\n      >;\n  /**\n   * The request method.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/fetch#method See more}\n   */\n  method?: Uppercase<HttpMethod>;\n  /**\n   * A function for serializing request query parameters. By default, arrays\n   * will be exploded in form style, objects will be exploded in deepObject\n   * style, and reserved characters are percent-encoded.\n   *\n   * This method will have no effect if the native `paramsSerializer()` Axios\n   * API function is used.\n   *\n   * {@link https://swagger.io/docs/specification/serialization/#query View examples}\n   */\n  querySerializer?: QuerySerializer | QuerySerializerOptions;\n  /**\n   * A function validating request data. This is useful if you want to ensure\n   * the request conforms to the desired shape, so it can be safely sent to\n   * the server.\n   */\n  requestValidator?: (data: unknown) => Promise<unknown>;\n  /**\n   * A function transforming response data before it's returned. This is useful\n   * for post-processing data, e.g. converting ISO strings into Date objects.\n   */\n  responseTransformer?: (data: unknown) => Promise<unknown>;\n  /**\n   * A function validating response data. This is useful if you want to ensure\n   * the response conforms to the desired shape, so it can be safely passed to\n   * the transformers and returned to the user.\n   */\n  responseValidator?: (data: unknown) => Promise<unknown>;\n}\n\ntype IsExactlyNeverOrNeverUndefined<T> = [T] extends [never]\n  ? true\n  : [T] extends [never | undefined]\n    ? [undefined] extends [T]\n      ? false\n      : true\n    : false;\n\nexport type OmitNever<T extends Record<string, unknown>> = {\n  [K in keyof T as IsExactlyNeverOrNeverUndefined<T[K]> extends true ? never : K]: T[K];\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-fetch/sdk-client-optional/core/utils.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-fetch/sdk-client-optional/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport { apiVVersionODataControllerCount, callToTestOrderOfParams, callWithDefaultOptionalParameters, callWithDefaultParameters, callWithDescriptions, callWithDuplicateResponses, callWithNoContentResponse, callWithParameters, callWithResponse, callWithResponseAndNoContentResponse, callWithResponses, callWithResultFromHeader, callWithWeirdParameterNames, collectionFormat, complexParams, complexTypes, deleteCallWithoutParametersAndResponse, deleteFoo, deprecatedCall, dummyA, dummyB, duplicateName, duplicateName2, duplicateName3, duplicateName4, export_, fileResponse, fooWow, getApiVbyApiVersionSimpleOperation, getCallWithOptionalParam, getCallWithoutParametersAndResponse, headCallWithoutParametersAndResponse, import_, multipartRequest, multipartResponse, nonAsciiæøåÆøÅöôêÊ字符串, type Options, optionsCallWithoutParametersAndResponse, patchApiVbyApiVersionNoTag, patchCallWithoutParametersAndResponse, postApiVbyApiVersionFormData, postApiVbyApiVersionRequestBody, postCallWithOptionalParam, postCallWithoutParametersAndResponse, putCallWithoutParametersAndResponse, putWithFormUrlEncoded, testErrorCode, types, uploadFile } from './sdk.gen';\nexport type { _3eNum1Период, _400, AdditionalPropertiesIntegerIssue, AdditionalPropertiesUnknownIssue, AdditionalPropertiesUnknownIssue2, AdditionalPropertiesUnknownIssue3, AdditionalPropertiesUnknownIssueWritable, AnyOfAnyAndNull, AnyOfArrays, ApiVVersionODataControllerCountData, ApiVVersionODataControllerCountResponse, ApiVVersionODataControllerCountResponses, ArrayWithAnyOfProperties, ArrayWithArray, ArrayWithBooleans, ArrayWithNumbers, ArrayWithProperties, ArrayWithReferences, ArrayWithStrings, CallToTestOrderOfParamsData, CallWithDefaultOptionalParametersData, CallWithDefaultParametersData, CallWithDescriptionsData, CallWithDuplicateResponsesData, CallWithDuplicateResponsesError, CallWithDuplicateResponsesErrors, CallWithDuplicateResponsesResponse, CallWithDuplicateResponsesResponses, CallWithNoContentResponseData, CallWithNoContentResponseResponse, CallWithNoContentResponseResponses, CallWithParametersData, CallWithResponseAndNoContentResponseData, CallWithResponseAndNoContentResponseResponse, CallWithResponseAndNoContentResponseResponses, CallWithResponseData, CallWithResponseResponse, CallWithResponseResponses, CallWithResponsesData, CallWithResponsesError, CallWithResponsesErrors, CallWithResponsesResponse, CallWithResponsesResponses, CallWithResultFromHeaderData, CallWithResultFromHeaderErrors, CallWithResultFromHeaderResponses, CallWithWeirdParameterNamesData, CamelCaseCommentWithBreaks, CharactersInDescription, ClientOptions, CollectionFormatData, CommentWithBackticks, CommentWithBackticksAndQuotes, CommentWithBreaks, CommentWithExpressionPlaceholders, CommentWithQuotes, CommentWithReservedCharacters, CommentWithSlashes, ComplexParamsData, ComplexParamsResponse, ComplexParamsResponses, ComplexTypesData, ComplexTypesErrors, ComplexTypesResponse, ComplexTypesResponses, CompositionBaseModel, CompositionExtendedModel, CompositionWithAllOfAndNullable, CompositionWithAnyOf, CompositionWithAnyOfAndNullable, CompositionWithAnyOfAnonymous, CompositionWithNestedAnyAndTypeNull, CompositionWithNestedAnyOfAndNull, CompositionWithOneOf, CompositionWithOneOfAndComplexArrayDictionary, CompositionWithOneOfAndNullable, CompositionWithOneOfAndProperties, CompositionWithOneOfAndSimpleArrayDictionary, CompositionWithOneOfAndSimpleDictionary, CompositionWithOneOfAnonymous, CompositionWithOneOfDiscriminator, ConstValue, Default, DeleteCallWithoutParametersAndResponseData, DeleteFooData, DeleteFooData2, DeleteFooData3, DeprecatedCallData, DeprecatedModel, DictionaryWithArray, DictionaryWithDictionary, DictionaryWithProperties, DictionaryWithPropertiesAndAdditionalProperties, DictionaryWithReference, DictionaryWithString, DummyAData, DummyAResponse, DummyAResponses, DummyBData, DummyBResponse, DummyBResponses, DuplicateName2Data, DuplicateName3Data, DuplicateName4Data, DuplicateNameData, EnumFromDescription, EnumWithExtensions, EnumWithNumbers, EnumWithReplacedCharacters, EnumWithStrings, EnumWithXEnumNames, ExportData, ExternalRefA, ExternalRefB, ExternalSharedModel, File, FileResponseData, FileResponseResponse, FileResponseResponses, FileWritable, FooWowData, FooWowResponses, FreeFormObjectWithAdditionalPropertiesEqEmptyObject, FreeFormObjectWithAdditionalPropertiesEqTrue, FreeFormObjectWithoutAdditionalProperties, GenericSchemaDuplicateIssue1SystemBoolean, GenericSchemaDuplicateIssue1SystemBooleanWritable, GenericSchemaDuplicateIssue1SystemString, GenericSchemaDuplicateIssue1SystemStringWritable, GetApiVbyApiVersionSimpleOperationData, GetApiVbyApiVersionSimpleOperationError, GetApiVbyApiVersionSimpleOperationErrors, GetApiVbyApiVersionSimpleOperationResponse, GetApiVbyApiVersionSimpleOperationResponses, GetCallWithOptionalParamData, GetCallWithoutParametersAndResponseData, HeadCallWithoutParametersAndResponseData, Import, ImportData, ImportResponse, ImportResponses, IoK8sApimachineryPkgApisMetaV1DeleteOptions, IoK8sApimachineryPkgApisMetaV1Preconditions, ModelCircle, ModelFromZendesk, ModelSquare, ModelThatExtends, ModelThatExtendsExtends, ModelWithAdditionalPropertiesEqTrue, ModelWithAdditionalPropertiesRef, ModelWithAnyOfConstantSizeArray, ModelWithAnyOfConstantSizeArrayAndIntersect, ModelWithAnyOfConstantSizeArrayNullable, ModelWithAnyOfConstantSizeArrayWithNSizeAndOptions, ModelWithAnyOfConstantSizeArrayWithNSizeAndOptionsWritable, ModelWithArray, ModelWithArrayReadOnlyAndWriteOnly, ModelWithArrayReadOnlyAndWriteOnlyWritable, ModelWithBackticksInDescription, ModelWithBoolean, ModelWithCircularReference, ModelWithConst, ModelWithConstantSizeArray, ModelWithDictionary, ModelWithDuplicateImports, ModelWithDuplicateProperties, ModelWithEnum, ModelWithEnumFromDescription, ModelWithEnumWithHyphen, ModelWithInteger, ModelWithNestedArrayEnums, ModelWithNestedArrayEnumsData, ModelWithNestedArrayEnumsDataBar, ModelWithNestedArrayEnumsDataFoo, ModelWithNestedCompositionEnums, ModelWithNestedEnums, ModelWithNestedProperties, ModelWithNullableObject, ModelWithNullableString, ModelWithNumericEnumUnion, ModelWithOneOfAndProperties, ModelWithOneOfEnum, ModelWithOrderedProperties, ModelWithPattern, ModelWithPatternWritable, ModelWithPrefixItemsConstantSizeArray, ModelWithProperties, ModelWithPropertiesWritable, ModelWithReadOnlyAndWriteOnly, ModelWithReadOnlyAndWriteOnlyWritable, ModelWithReference, ModelWithReferenceWritable, ModelWithString, ModelWithStringError, MultipartRequestData, MultipartResponseData, MultipartResponseResponse, MultipartResponseResponses, NestedAnyOfArraysNullable, NonAsciiæøåÆøÅöôêÊ字符串Data, NonAsciiæøåÆøÅöôêÊ字符串Response, NonAsciiæøåÆøÅöôêÊ字符串Responses, NonAsciiStringæøåÆøÅöôêÊ字符串, NullableObject, OneOfAllOfIssue, OneOfAllOfIssueWritable, OptionsCallWithoutParametersAndResponseData, Pageable, ParameterSimpleParameterUnused, PatchApiVbyApiVersionNoTagData, PatchApiVbyApiVersionNoTagResponses, PatchCallWithoutParametersAndResponseData, PostApiVbyApiVersionFormDataData, PostApiVbyApiVersionRequestBodyData, PostCallWithOptionalParamData, PostCallWithOptionalParamResponse, PostCallWithOptionalParamResponses, PostCallWithoutParametersAndResponseData, PostServiceWithEmptyTagResponse, PostServiceWithEmptyTagResponse2, PutCallWithoutParametersAndResponseData, PutWithFormUrlEncodedData, SchemaWithFormRestrictedKeys, SimpleBoolean, SimpleFile, SimpleFormData, SimpleInteger, SimpleParameter, SimpleReference, SimpleRequestBody, SimpleString, SimpleStringWithPattern, TestErrorCodeData, TestErrorCodeErrors, TestErrorCodeResponses, TypesData, TypesResponse, TypesResponses, UploadFileData, UploadFileResponse, UploadFileResponses, XFooBar } from './types.gen';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-fetch/sdk-client-optional/sdk.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport { type Client, formDataBodySerializer, type Options as Options2, type TDataShape, urlSearchParamsBodySerializer } from './client';\nimport { client } from './client.gen';\nimport type { ApiVVersionODataControllerCountData, ApiVVersionODataControllerCountResponses, CallToTestOrderOfParamsData, CallWithDefaultOptionalParametersData, CallWithDefaultParametersData, CallWithDescriptionsData, CallWithDuplicateResponsesData, CallWithDuplicateResponsesErrors, CallWithDuplicateResponsesResponses, CallWithNoContentResponseData, CallWithNoContentResponseResponses, CallWithParametersData, CallWithResponseAndNoContentResponseData, CallWithResponseAndNoContentResponseResponses, CallWithResponseData, CallWithResponseResponses, CallWithResponsesData, CallWithResponsesErrors, CallWithResponsesResponses, CallWithResultFromHeaderData, CallWithResultFromHeaderErrors, CallWithResultFromHeaderResponses, CallWithWeirdParameterNamesData, CollectionFormatData, ComplexParamsData, ComplexParamsResponses, ComplexTypesData, ComplexTypesErrors, ComplexTypesResponses, DeleteCallWithoutParametersAndResponseData, DeleteFooData3, DeprecatedCallData, DummyAData, DummyAResponses, DummyBData, DummyBResponses, DuplicateName2Data, DuplicateName3Data, DuplicateName4Data, DuplicateNameData, ExportData, FileResponseData, FileResponseResponses, FooWowData, FooWowResponses, GetApiVbyApiVersionSimpleOperationData, GetApiVbyApiVersionSimpleOperationErrors, GetApiVbyApiVersionSimpleOperationResponses, GetCallWithOptionalParamData, GetCallWithoutParametersAndResponseData, HeadCallWithoutParametersAndResponseData, ImportData, ImportResponses, MultipartRequestData, MultipartResponseData, MultipartResponseResponses, NonAsciiæøåÆøÅöôêÊ字符串Data, NonAsciiæøåÆøÅöôêÊ字符串Responses, OptionsCallWithoutParametersAndResponseData, PatchApiVbyApiVersionNoTagData, PatchApiVbyApiVersionNoTagResponses, PatchCallWithoutParametersAndResponseData, PostApiVbyApiVersionFormDataData, PostApiVbyApiVersionRequestBodyData, PostCallWithOptionalParamData, PostCallWithOptionalParamResponses, PostCallWithoutParametersAndResponseData, PutCallWithoutParametersAndResponseData, PutWithFormUrlEncodedData, TestErrorCodeData, TestErrorCodeErrors, TestErrorCodeResponses, TypesData, TypesResponses, UploadFileData, UploadFileResponses } from './types.gen';\n\nexport type Options<TData extends TDataShape = TDataShape, ThrowOnError extends boolean = boolean> = Options2<TData, ThrowOnError> & {\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\nexport const export_ = <ThrowOnError extends boolean = false>(options?: Options<ExportData, ThrowOnError>) => (options?.client ?? client).get<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/no+tag', ...options });\n\nexport const patchApiVbyApiVersionNoTag = <ThrowOnError extends boolean = false>(options?: Options<PatchApiVbyApiVersionNoTagData, ThrowOnError>) => (options?.client ?? client).patch<PatchApiVbyApiVersionNoTagResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/no+tag', ...options });\n\nexport const import_ = <ThrowOnError extends boolean = false>(options: Options<ImportData, ThrowOnError>) => (options.client ?? client).post<ImportResponses, unknown, ThrowOnError>({\n    url: '/api/v{api-version}/no+tag',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options.headers\n    }\n});\n\nexport const fooWow = <ThrowOnError extends boolean = false>(options?: Options<FooWowData, ThrowOnError>) => (options?.client ?? client).put<FooWowResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/no+tag', ...options });\n\nexport const apiVVersionODataControllerCount = <ThrowOnError extends boolean = false>(options?: Options<ApiVVersionODataControllerCountData, ThrowOnError>) => (options?.client ?? client).get<ApiVVersionODataControllerCountResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple/$count', ...options });\n\nexport const getApiVbyApiVersionSimpleOperation = <ThrowOnError extends boolean = false>(options: Options<GetApiVbyApiVersionSimpleOperationData, ThrowOnError>) => (options.client ?? client).get<GetApiVbyApiVersionSimpleOperationResponses, GetApiVbyApiVersionSimpleOperationErrors, ThrowOnError>({ url: '/api/v{api-version}/simple:operation', ...options });\n\nexport const deleteCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<DeleteCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).delete<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const getCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<GetCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).get<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const headCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<HeadCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).head<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const optionsCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<OptionsCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).options<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const patchCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<PatchCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).patch<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const postCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<PostCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).post<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const putCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<PutCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).put<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const deleteFoo = <ThrowOnError extends boolean = false>(options: Options<DeleteFooData3, ThrowOnError>) => (options.client ?? client).delete<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/foo/{foo_param}/bar/{BarParam}', ...options });\n\nexport const callWithDescriptions = <ThrowOnError extends boolean = false>(options?: Options<CallWithDescriptionsData, ThrowOnError>) => (options?.client ?? client).post<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/descriptions', ...options });\n\n/**\n * @deprecated\n */\nexport const deprecatedCall = <ThrowOnError extends boolean = false>(options: Options<DeprecatedCallData, ThrowOnError>) => (options.client ?? client).post<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/parameters/deprecated', ...options });\n\nexport const callWithParameters = <ThrowOnError extends boolean = false>(options: Options<CallWithParametersData, ThrowOnError>) => (options.client ?? client).post<unknown, unknown, ThrowOnError>({\n    url: '/api/v{api-version}/parameters/{parameterPath}',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options.headers\n    }\n});\n\nexport const callWithWeirdParameterNames = <ThrowOnError extends boolean = false>(options: Options<CallWithWeirdParameterNamesData, ThrowOnError>) => (options.client ?? client).post<unknown, unknown, ThrowOnError>({\n    url: '/api/v{api-version}/parameters/{parameter.path.1}/{parameter-path-2}/{PARAMETER-PATH-3}',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options.headers\n    }\n});\n\nexport const getCallWithOptionalParam = <ThrowOnError extends boolean = false>(options: Options<GetCallWithOptionalParamData, ThrowOnError>) => (options.client ?? client).get<unknown, unknown, ThrowOnError>({\n    url: '/api/v{api-version}/parameters',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options.headers\n    }\n});\n\nexport const postCallWithOptionalParam = <ThrowOnError extends boolean = false>(options: Options<PostCallWithOptionalParamData, ThrowOnError>) => (options.client ?? client).post<PostCallWithOptionalParamResponses, unknown, ThrowOnError>({\n    url: '/api/v{api-version}/parameters',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options.headers\n    }\n});\n\nexport const postApiVbyApiVersionRequestBody = <ThrowOnError extends boolean = false>(options?: Options<PostApiVbyApiVersionRequestBodyData, ThrowOnError>) => (options?.client ?? client).post<unknown, unknown, ThrowOnError>({\n    url: '/api/v{api-version}/requestBody',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options?.headers\n    }\n});\n\nexport const postApiVbyApiVersionFormData = <ThrowOnError extends boolean = false>(options?: Options<PostApiVbyApiVersionFormDataData, ThrowOnError>) => (options?.client ?? client).post<unknown, unknown, ThrowOnError>({\n    ...formDataBodySerializer,\n    url: '/api/v{api-version}/formData',\n    ...options,\n    headers: {\n        'Content-Type': null,\n        ...options?.headers\n    }\n});\n\nexport const callWithDefaultParameters = <ThrowOnError extends boolean = false>(options?: Options<CallWithDefaultParametersData, ThrowOnError>) => (options?.client ?? client).get<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/defaults', ...options });\n\nexport const callWithDefaultOptionalParameters = <ThrowOnError extends boolean = false>(options?: Options<CallWithDefaultOptionalParametersData, ThrowOnError>) => (options?.client ?? client).post<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/defaults', ...options });\n\nexport const callToTestOrderOfParams = <ThrowOnError extends boolean = false>(options: Options<CallToTestOrderOfParamsData, ThrowOnError>) => (options.client ?? client).put<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/defaults', ...options });\n\nexport const duplicateName = <ThrowOnError extends boolean = false>(options?: Options<DuplicateNameData, ThrowOnError>) => (options?.client ?? client).delete<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/duplicate', ...options });\n\nexport const duplicateName2 = <ThrowOnError extends boolean = false>(options?: Options<DuplicateName2Data, ThrowOnError>) => (options?.client ?? client).get<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/duplicate', ...options });\n\nexport const duplicateName3 = <ThrowOnError extends boolean = false>(options?: Options<DuplicateName3Data, ThrowOnError>) => (options?.client ?? client).post<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/duplicate', ...options });\n\nexport const duplicateName4 = <ThrowOnError extends boolean = false>(options?: Options<DuplicateName4Data, ThrowOnError>) => (options?.client ?? client).put<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/duplicate', ...options });\n\nexport const callWithNoContentResponse = <ThrowOnError extends boolean = false>(options?: Options<CallWithNoContentResponseData, ThrowOnError>) => (options?.client ?? client).get<CallWithNoContentResponseResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/no-content', ...options });\n\nexport const callWithResponseAndNoContentResponse = <ThrowOnError extends boolean = false>(options?: Options<CallWithResponseAndNoContentResponseData, ThrowOnError>) => (options?.client ?? client).get<CallWithResponseAndNoContentResponseResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/multiple-tags/response-and-no-content', ...options });\n\nexport const dummyA = <ThrowOnError extends boolean = false>(options?: Options<DummyAData, ThrowOnError>) => (options?.client ?? client).get<DummyAResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/multiple-tags/a', ...options });\n\nexport const dummyB = <ThrowOnError extends boolean = false>(options?: Options<DummyBData, ThrowOnError>) => (options?.client ?? client).get<DummyBResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/multiple-tags/b', ...options });\n\nexport const callWithResponse = <ThrowOnError extends boolean = false>(options?: Options<CallWithResponseData, ThrowOnError>) => (options?.client ?? client).get<CallWithResponseResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/response', ...options });\n\nexport const callWithDuplicateResponses = <ThrowOnError extends boolean = false>(options?: Options<CallWithDuplicateResponsesData, ThrowOnError>) => (options?.client ?? client).post<CallWithDuplicateResponsesResponses, CallWithDuplicateResponsesErrors, ThrowOnError>({ url: '/api/v{api-version}/response', ...options });\n\nexport const callWithResponses = <ThrowOnError extends boolean = false>(options?: Options<CallWithResponsesData, ThrowOnError>) => (options?.client ?? client).put<CallWithResponsesResponses, CallWithResponsesErrors, ThrowOnError>({ url: '/api/v{api-version}/response', ...options });\n\nexport const collectionFormat = <ThrowOnError extends boolean = false>(options: Options<CollectionFormatData, ThrowOnError>) => (options.client ?? client).get<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/collectionFormat', ...options });\n\nexport const types = <ThrowOnError extends boolean = false>(options: Options<TypesData, ThrowOnError>) => (options.client ?? client).get<TypesResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/types', ...options });\n\nexport const uploadFile = <ThrowOnError extends boolean = false>(options: Options<UploadFileData, ThrowOnError>) => (options.client ?? client).post<UploadFileResponses, unknown, ThrowOnError>({\n    ...urlSearchParamsBodySerializer,\n    url: '/api/v{api-version}/upload',\n    ...options,\n    headers: {\n        'Content-Type': 'application/x-www-form-urlencoded',\n        ...options.headers\n    }\n});\n\nexport const fileResponse = <ThrowOnError extends boolean = false>(options: Options<FileResponseData, ThrowOnError>) => (options.client ?? client).get<FileResponseResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/file/{id}', ...options });\n\nexport const complexTypes = <ThrowOnError extends boolean = false>(options: Options<ComplexTypesData, ThrowOnError>) => (options.client ?? client).get<ComplexTypesResponses, ComplexTypesErrors, ThrowOnError>({\n    querySerializer: { parameters: { parameterObject: { object: { style: 'form' } } } },\n    url: '/api/v{api-version}/complex',\n    ...options\n});\n\nexport const multipartResponse = <ThrowOnError extends boolean = false>(options?: Options<MultipartResponseData, ThrowOnError>) => (options?.client ?? client).get<MultipartResponseResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/multipart', ...options });\n\nexport const multipartRequest = <ThrowOnError extends boolean = false>(options?: Options<MultipartRequestData, ThrowOnError>) => (options?.client ?? client).post<unknown, unknown, ThrowOnError>({\n    ...formDataBodySerializer,\n    url: '/api/v{api-version}/multipart',\n    ...options,\n    headers: {\n        'Content-Type': null,\n        ...options?.headers\n    }\n});\n\nexport const complexParams = <ThrowOnError extends boolean = false>(options: Options<ComplexParamsData, ThrowOnError>) => (options.client ?? client).put<ComplexParamsResponses, unknown, ThrowOnError>({\n    url: '/api/v{api-version}/complex/{id}',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json-patch+json',\n        ...options.headers\n    }\n});\n\nexport const callWithResultFromHeader = <ThrowOnError extends boolean = false>(options?: Options<CallWithResultFromHeaderData, ThrowOnError>) => (options?.client ?? client).post<CallWithResultFromHeaderResponses, CallWithResultFromHeaderErrors, ThrowOnError>({ url: '/api/v{api-version}/header', ...options });\n\nexport const testErrorCode = <ThrowOnError extends boolean = false>(options: Options<TestErrorCodeData, ThrowOnError>) => (options.client ?? client).post<TestErrorCodeResponses, TestErrorCodeErrors, ThrowOnError>({ url: '/api/v{api-version}/error', ...options });\n\nexport const nonAsciiæøåÆøÅöôêÊ字符串 = <ThrowOnError extends boolean = false>(options: Options<NonAsciiæøåÆøÅöôêÊ字符串Data, ThrowOnError>) => (options.client ?? client).post<NonAsciiæøåÆøÅöôêÊ字符串Responses, unknown, ThrowOnError>({ url: '/api/v{api-version}/non-ascii-æøåÆØÅöôêÊ字符串', ...options });\n\n/**\n * Login User\n */\nexport const putWithFormUrlEncoded = <ThrowOnError extends boolean = false>(options: Options<PutWithFormUrlEncodedData, ThrowOnError>) => (options.client ?? client).put<unknown, unknown, ThrowOnError>({\n    ...urlSearchParamsBodySerializer,\n    url: '/api/v{api-version}/non-ascii-æøåÆØÅöôêÊ字符串',\n    ...options,\n    headers: {\n        'Content-Type': 'application/x-www-form-urlencoded',\n        ...options.headers\n    }\n});\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-fetch/sdk-client-optional/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type ClientOptions = {\n    baseUrl: 'http://localhost:3000/base' | (string & {});\n};\n\n/**\n * Model with number-only name\n */\nexport type _400 = string;\n\n/**\n * External ref to shared model (A)\n */\nexport type ExternalRefA = ExternalSharedModel;\n\n/**\n * External ref to shared model (B)\n */\nexport type ExternalRefB = ExternalSharedModel;\n\n/**\n * Testing multiline comments in string: First line\n * Second line\n *\n * Fourth line\n */\nexport type CamelCaseCommentWithBreaks = number;\n\n/**\n * Testing multiline comments in string: First line\n * Second line\n *\n * Fourth line\n */\nexport type CommentWithBreaks = number;\n\n/**\n * Testing backticks in string: `backticks` and ```multiple backticks``` should work\n */\nexport type CommentWithBackticks = number;\n\n/**\n * Testing backticks and quotes in string: `backticks`, 'quotes', \"double quotes\" and ```multiple backticks``` should work\n */\nexport type CommentWithBackticksAndQuotes = number;\n\n/**\n * Testing slashes in string: \\backwards\\\\\\ and /forwards/// should work\n */\nexport type CommentWithSlashes = number;\n\n/**\n * Testing expression placeholders in string: ${expression} should work\n */\nexport type CommentWithExpressionPlaceholders = number;\n\n/**\n * Testing quotes in string: 'single quote''' and \"double quotes\"\"\" should work\n */\nexport type CommentWithQuotes = number;\n\n/**\n * Testing reserved characters in string: * inline * and ** inline ** should work\n */\nexport type CommentWithReservedCharacters = number;\n\n/**\n * This is a simple number\n */\nexport type SimpleInteger = number;\n\n/**\n * This is a simple boolean\n */\nexport type SimpleBoolean = boolean;\n\n/**\n * This is a simple string\n */\nexport type SimpleString = string;\n\n/**\n * A string with non-ascii (unicode) characters valid in typescript identifiers (æøåÆØÅöÔèÈ字符串)\n */\nexport type NonAsciiStringæøåÆøÅöôêÊ字符串 = string;\n\n/**\n * This is a simple file\n */\nexport type SimpleFile = Blob | File;\n\n/**\n * This is a simple reference\n */\nexport type SimpleReference = ModelWithString;\n\n/**\n * This is a simple string\n */\nexport type SimpleStringWithPattern = string | null;\n\n/**\n * This is a simple enum with strings\n */\nexport type EnumWithStrings = 'Success' | 'Warning' | 'Error' | '\\'Single Quote\\'' | '\"Double Quotes\"' | 'Non-ascii: øæåôöØÆÅÔÖ字符串';\n\nexport type EnumWithReplacedCharacters = '\\'Single Quote\\'' | '\"Double Quotes\"' | 'øæåôöØÆÅÔÖ字符串' | 3.1 | '';\n\n/**\n * This is a simple enum with numbers\n */\nexport type EnumWithNumbers = 1 | 2 | 3 | 1.1 | 1.2 | 1.3 | 100 | 200 | 300 | -100 | -200 | -300 | -1.1 | -1.2 | -1.3;\n\n/**\n * Success=1,Warning=2,Error=3\n */\nexport type EnumFromDescription = number;\n\n/**\n * This is a simple enum with numbers\n */\nexport type EnumWithExtensions = 200 | 400 | 500;\n\nexport type EnumWithXEnumNames = 0 | 1 | 2;\n\n/**\n * This is a simple array with numbers\n */\nexport type ArrayWithNumbers = Array<number>;\n\n/**\n * This is a simple array with booleans\n */\nexport type ArrayWithBooleans = Array<boolean>;\n\n/**\n * This is a simple array with strings\n */\nexport type ArrayWithStrings = Array<string>;\n\n/**\n * This is a simple array with references\n */\nexport type ArrayWithReferences = Array<ModelWithString>;\n\n/**\n * This is a simple array containing an array\n */\nexport type ArrayWithArray = Array<Array<ModelWithString>>;\n\n/**\n * This is a simple array with properties\n */\nexport type ArrayWithProperties = Array<{\n    '16x16'?: CamelCaseCommentWithBreaks;\n    bar?: string;\n}>;\n\n/**\n * This is a simple array with any of properties\n */\nexport type ArrayWithAnyOfProperties = Array<{\n    foo?: string;\n} | {\n    bar?: string;\n}>;\n\nexport type AnyOfAnyAndNull = {\n    data?: unknown | null;\n};\n\n/**\n * This is a simple array with any of properties\n */\nexport type AnyOfArrays = {\n    results?: Array<{\n        foo?: string;\n    } | {\n        bar?: string;\n    }>;\n};\n\n/**\n * This is a string dictionary\n */\nexport type DictionaryWithString = {\n    [key: string]: string;\n};\n\nexport type DictionaryWithPropertiesAndAdditionalProperties = {\n    foo?: number;\n    bar?: boolean;\n    [key: string]: string | number | boolean | undefined;\n};\n\n/**\n * This is a string reference\n */\nexport type DictionaryWithReference = {\n    [key: string]: ModelWithString;\n};\n\n/**\n * This is a complex dictionary\n */\nexport type DictionaryWithArray = {\n    [key: string]: Array<ModelWithString>;\n};\n\n/**\n * This is a string dictionary\n */\nexport type DictionaryWithDictionary = {\n    [key: string]: {\n        [key: string]: string;\n    };\n};\n\n/**\n * This is a complex dictionary\n */\nexport type DictionaryWithProperties = {\n    [key: string]: {\n        foo?: string;\n        bar?: string;\n    };\n};\n\n/**\n * This is a model with one number property\n */\nexport type ModelWithInteger = {\n    /**\n     * This is a simple number property\n     */\n    prop?: number;\n};\n\n/**\n * This is a model with one boolean property\n */\nexport type ModelWithBoolean = {\n    /**\n     * This is a simple boolean property\n     */\n    prop?: boolean;\n};\n\n/**\n * This is a model with one string property\n */\nexport type ModelWithString = {\n    /**\n     * This is a simple string property\n     */\n    prop?: string;\n};\n\n/**\n * This is a model with one string property\n */\nexport type ModelWithStringError = {\n    /**\n     * This is a simple string property\n     */\n    prop?: string;\n};\n\n/**\n * `Comment` or `VoiceComment`. The JSON object for adding voice comments to tickets is different. See [Adding voice comments to tickets](/documentation/ticketing/managing-tickets/adding-voice-comments-to-tickets)\n */\nexport type ModelFromZendesk = string;\n\n/**\n * This is a model with one string property\n */\nexport type ModelWithNullableString = {\n    /**\n     * This is a simple string property\n     */\n    nullableProp1?: string | null;\n    /**\n     * This is a simple string property\n     */\n    nullableRequiredProp1: string | null;\n    /**\n     * This is a simple string property\n     */\n    nullableProp2?: string | null;\n    /**\n     * This is a simple string property\n     */\n    nullableRequiredProp2: string | null;\n    /**\n     * This is a simple enum with strings\n     */\n    'foo_bar-enum'?: 'Success' | 'Warning' | 'Error' | 'ØÆÅ字符串';\n};\n\n/**\n * This is a model with one enum\n */\nexport type ModelWithEnum = {\n    /**\n     * This is a simple enum with strings\n     */\n    'foo_bar-enum'?: 'Success' | 'Warning' | 'Error' | 'ØÆÅ字符串';\n    /**\n     * These are the HTTP error code enums\n     */\n    statusCode?: '100' | '200 FOO' | '300 FOO_BAR' | '400 foo-bar' | '500 foo.bar' | '600 foo&bar';\n    /**\n     * Simple boolean enum\n     */\n    bool?: true;\n};\n\n/**\n * This is a model with one enum with escaped name\n */\nexport type ModelWithEnumWithHyphen = {\n    /**\n     * Foo-Bar-Baz-Qux\n     */\n    'foo-bar-baz-qux'?: '3.0';\n};\n\n/**\n * This is a model with one enum\n */\nexport type ModelWithEnumFromDescription = {\n    /**\n     * Success=1,Warning=2,Error=3\n     */\n    test?: number;\n};\n\n/**\n * This is a model with nested enums\n */\nexport type ModelWithNestedEnums = {\n    dictionaryWithEnum?: {\n        [key: string]: 'Success' | 'Warning' | 'Error';\n    };\n    dictionaryWithEnumFromDescription?: {\n        [key: string]: number;\n    };\n    arrayWithEnum?: Array<'Success' | 'Warning' | 'Error'>;\n    arrayWithDescription?: Array<number>;\n    /**\n     * This is a simple enum with strings\n     */\n    'foo_bar-enum'?: 'Success' | 'Warning' | 'Error' | 'ØÆÅ字符串';\n};\n\n/**\n * This is a model with one property containing a reference\n */\nexport type ModelWithReference = {\n    prop?: ModelWithProperties;\n};\n\n/**\n * This is a model with one property containing an array\n */\nexport type ModelWithArrayReadOnlyAndWriteOnly = {\n    prop?: Array<ModelWithReadOnlyAndWriteOnly>;\n    propWithFile?: Array<Blob | File>;\n    propWithNumber?: Array<number>;\n};\n\n/**\n * This is a model with one property containing an array\n */\nexport type ModelWithArray = {\n    prop?: Array<ModelWithString>;\n    propWithFile?: Array<Blob | File>;\n    propWithNumber?: Array<number>;\n};\n\n/**\n * This is a model with one property containing a dictionary\n */\nexport type ModelWithDictionary = {\n    prop?: {\n        [key: string]: string;\n    };\n};\n\n/**\n * This is a deprecated model with a deprecated property\n *\n * @deprecated\n */\nexport type DeprecatedModel = {\n    /**\n     * This is a deprecated property\n     *\n     * @deprecated\n     */\n    prop?: string;\n};\n\n/**\n * This is a model with one property containing a circular reference\n */\nexport type ModelWithCircularReference = {\n    prop?: ModelWithCircularReference;\n};\n\n/**\n * This is a model with one property with a 'one of' relationship\n */\nexport type CompositionWithOneOf = {\n    propA?: ModelWithString | ModelWithEnum | ModelWithArray | ModelWithDictionary;\n};\n\n/**\n * This is a model with one property with a 'one of' relationship where the options are not $ref\n */\nexport type CompositionWithOneOfAnonymous = {\n    propA?: {\n        propA?: string;\n    } | string | number;\n};\n\n/**\n * Circle\n */\nexport type ModelCircle = {\n    kind: string;\n    radius?: number;\n};\n\n/**\n * Square\n */\nexport type ModelSquare = {\n    kind: string;\n    sideLength?: number;\n};\n\n/**\n * This is a model with one property with a 'one of' relationship where the options are not $ref\n */\nexport type CompositionWithOneOfDiscriminator = ({\n    kind: 'circle';\n} & ModelCircle) | ({\n    kind: 'square';\n} & ModelSquare);\n\n/**\n * This is a model with one property with a 'any of' relationship\n */\nexport type CompositionWithAnyOf = {\n    propA?: ModelWithString | ModelWithEnum | ModelWithArray | ModelWithDictionary;\n};\n\n/**\n * This is a model with one property with a 'any of' relationship where the options are not $ref\n */\nexport type CompositionWithAnyOfAnonymous = {\n    propA?: {\n        propA?: string;\n    } | string | number;\n};\n\n/**\n * This is a model with nested 'any of' property with a type null\n */\nexport type CompositionWithNestedAnyAndTypeNull = {\n    propA?: Array<ModelWithDictionary | null> | Array<ModelWithArray | null>;\n};\n\nexport type _3eNum1Период = 'Bird' | 'Dog';\n\nexport type ConstValue = 'ConstValue';\n\n/**\n * This is a model with one property with a 'any of' relationship where the options are not $ref\n */\nexport type CompositionWithNestedAnyOfAndNull = {\n    /**\n     * Scopes\n     */\n    propA?: Array<_3eNum1Период | ConstValue> | null;\n};\n\n/**\n * This is a model with one property with a 'one of' relationship\n */\nexport type CompositionWithOneOfAndNullable = {\n    propA?: {\n        boolean?: boolean;\n    } | ModelWithEnum | ModelWithArray | ModelWithDictionary | null;\n};\n\n/**\n * This is a model that contains a simple dictionary within composition\n */\nexport type CompositionWithOneOfAndSimpleDictionary = {\n    propA?: boolean | {\n        [key: string]: number;\n    };\n};\n\n/**\n * This is a model that contains a dictionary of simple arrays within composition\n */\nexport type CompositionWithOneOfAndSimpleArrayDictionary = {\n    propA?: boolean | {\n        [key: string]: Array<boolean>;\n    };\n};\n\n/**\n * This is a model that contains a dictionary of complex arrays (composited) within composition\n */\nexport type CompositionWithOneOfAndComplexArrayDictionary = {\n    propA?: boolean | {\n        [key: string]: Array<number | string>;\n    };\n};\n\n/**\n * This is a model with one property with a 'all of' relationship\n */\nexport type CompositionWithAllOfAndNullable = {\n    propA?: ({\n        boolean?: boolean;\n    } & ModelWithEnum & ModelWithArray & ModelWithDictionary) | null;\n};\n\n/**\n * This is a model with one property with a 'any of' relationship\n */\nexport type CompositionWithAnyOfAndNullable = {\n    propA?: {\n        boolean?: boolean;\n    } | ModelWithEnum | ModelWithArray | ModelWithDictionary | null;\n};\n\n/**\n * This is a base model with two simple optional properties\n */\nexport type CompositionBaseModel = {\n    firstName?: string;\n    lastname?: string;\n};\n\n/**\n * This is a model that extends the base model\n */\nexport type CompositionExtendedModel = CompositionBaseModel & {\n    age: number;\n    firstName: string;\n    lastname: string;\n};\n\n/**\n * This is a model with one nested property\n */\nexport type ModelWithProperties = {\n    required: string;\n    readonly requiredAndReadOnly: string;\n    requiredAndNullable: string | null;\n    string?: string;\n    number?: number;\n    boolean?: boolean;\n    reference?: ModelWithString;\n    'property with space'?: string;\n    default?: string;\n    try?: string;\n    readonly '@namespace.string'?: string;\n    readonly '@namespace.integer'?: number;\n};\n\n/**\n * This is a model with one nested property\n */\nexport type ModelWithNestedProperties = {\n    readonly first: {\n        readonly second: {\n            readonly third: string | null;\n        } | null;\n    } | null;\n};\n\n/**\n * This is a model with duplicated properties\n */\nexport type ModelWithDuplicateProperties = {\n    prop?: ModelWithString;\n};\n\n/**\n * This is a model with ordered properties\n */\nexport type ModelWithOrderedProperties = {\n    zebra?: string;\n    apple?: string;\n    hawaii?: string;\n};\n\n/**\n * This is a model with duplicated imports\n */\nexport type ModelWithDuplicateImports = {\n    propA?: ModelWithString;\n    propB?: ModelWithString;\n    propC?: ModelWithString;\n};\n\n/**\n * This is a model that extends another model\n */\nexport type ModelThatExtends = ModelWithString & {\n    propExtendsA?: string;\n    propExtendsB?: ModelWithString;\n};\n\n/**\n * This is a model that extends another model\n */\nexport type ModelThatExtendsExtends = ModelWithString & ModelThatExtends & {\n    propExtendsC?: string;\n    propExtendsD?: ModelWithString;\n};\n\n/**\n * This is a model that contains a some patterns\n */\nexport type ModelWithPattern = {\n    key: string;\n    name: string;\n    readonly enabled?: boolean;\n    readonly modified?: string;\n    id?: string;\n    text?: string;\n    patternWithSingleQuotes?: string;\n    patternWithNewline?: string;\n    patternWithBacktick?: string;\n    patternWithUnicode?: string;\n};\n\nexport type File = {\n    /**\n     * Id\n     */\n    readonly id?: string;\n    /**\n     * Updated at\n     */\n    readonly updated_at?: string;\n    /**\n     * Created at\n     */\n    readonly created_at?: string;\n    /**\n     * Mime\n     */\n    mime: string;\n    /**\n     * File\n     */\n    readonly file?: string;\n};\n\nexport type Default = {\n    name?: string;\n};\n\nexport type Pageable = {\n    page?: number;\n    size?: number;\n    sort?: Array<string>;\n};\n\n/**\n * This is a free-form object without additionalProperties.\n */\nexport type FreeFormObjectWithoutAdditionalProperties = {\n    [key: string]: unknown;\n};\n\n/**\n * This is a free-form object with additionalProperties: true.\n */\nexport type FreeFormObjectWithAdditionalPropertiesEqTrue = {\n    [key: string]: unknown;\n};\n\n/**\n * This is a free-form object with additionalProperties: {}.\n */\nexport type FreeFormObjectWithAdditionalPropertiesEqEmptyObject = {\n    [key: string]: unknown;\n};\n\nexport type ModelWithConst = {\n    String?: 'String';\n    number?: 0;\n    null?: null;\n    withType?: 'Some string';\n};\n\n/**\n * This is a model with one property and additionalProperties: true\n */\nexport type ModelWithAdditionalPropertiesEqTrue = {\n    /**\n     * This is a simple string property\n     */\n    prop?: string;\n    [key: string]: unknown;\n};\n\nexport type NestedAnyOfArraysNullable = {\n    nullableArray?: Array<string | boolean> | null;\n};\n\nexport type CompositionWithOneOfAndProperties = ({\n    foo: SimpleParameter;\n} | {\n    bar: NonAsciiStringæøåÆøÅöôêÊ字符串;\n}) & {\n    baz: number | null;\n    qux: number;\n};\n\n/**\n * An object that can be null\n */\nexport type NullableObject = {\n    foo?: string;\n} | null;\n\n/**\n * Some % character\n */\nexport type CharactersInDescription = string;\n\nexport type ModelWithNullableObject = {\n    data?: NullableObject;\n};\n\n/**\n * An object with additional properties that can be null (anyOf ref + null)\n */\nexport type ModelWithAdditionalPropertiesRef = {\n    [key: string]: NullableObject | null;\n};\n\nexport type ModelWithOneOfEnum = {\n    foo: 'Bar';\n} | {\n    foo: 'Baz';\n} | {\n    foo: 'Qux';\n} | {\n    content: string;\n    foo: 'Quux';\n} | {\n    content: [\n        string,\n        string\n    ];\n    foo: 'Corge';\n};\n\nexport type ModelWithNestedArrayEnumsDataFoo = 'foo' | 'bar';\n\nexport type ModelWithNestedArrayEnumsDataBar = 'baz' | 'qux';\n\nexport type ModelWithNestedArrayEnumsData = {\n    foo?: Array<ModelWithNestedArrayEnumsDataFoo>;\n    bar?: Array<ModelWithNestedArrayEnumsDataBar>;\n};\n\nexport type ModelWithNestedArrayEnums = {\n    array_strings?: Array<string>;\n    data?: ModelWithNestedArrayEnumsData;\n};\n\nexport type ModelWithNestedCompositionEnums = {\n    foo?: ModelWithNestedArrayEnumsDataFoo;\n};\n\nexport type ModelWithReadOnlyAndWriteOnly = {\n    foo: string;\n    readonly bar: string;\n};\n\nexport type ModelWithConstantSizeArray = [\n    number,\n    number\n];\n\nexport type ModelWithAnyOfConstantSizeArray = [\n    number | string,\n    number | string,\n    number | string\n];\n\nexport type ModelWithPrefixItemsConstantSizeArray = [\n    ModelWithInteger,\n    number | string,\n    string\n];\n\nexport type ModelWithAnyOfConstantSizeArrayNullable = [\n    number | null | string,\n    number | null | string,\n    number | null | string\n];\n\nexport type ModelWithAnyOfConstantSizeArrayWithNSizeAndOptions = [\n    number | Import,\n    number | Import\n];\n\nexport type ModelWithAnyOfConstantSizeArrayAndIntersect = [\n    number & string,\n    number & string\n];\n\nexport type ModelWithNumericEnumUnion = {\n    /**\n     * Период\n     */\n    value?: -10 | -1 | 0 | 1 | 3 | 6 | 12;\n};\n\n/**\n * Some description with `back ticks`\n */\nexport type ModelWithBackticksInDescription = {\n    /**\n     * The template `that` should be used for parsing and importing the contents of the CSV file.\n     *\n     * <br/><p>There is one placeholder currently supported:<ul>     <li><b>${x}</b> - refers to the n-th column in the CSV file, e.g. ${1}, ${2}, ...)</li></ul><p>Example of a correct JSON template:</p>\n     * <pre>\n     * [\n     * {\n     * \"resourceType\": \"Asset\",\n     * \"identifier\": {\n     * \"name\": \"${1}\",\n     * \"domain\": {\n     * \"name\": \"${2}\",\n     * \"community\": {\n     * \"name\": \"Some Community\"\n     * }\n     * }\n     * },\n     * \"attributes\" : {\n     * \"00000000-0000-0000-0000-000000003115\" : [ {\n     * \"value\" : \"${3}\"\n     * } ],\n     * \"00000000-0000-0000-0000-000000000222\" : [ {\n     * \"value\" : \"${4}\"\n     * } ]\n     * }\n     * }\n     * ]\n     * </pre>\n     */\n    template?: string;\n};\n\nexport type ModelWithOneOfAndProperties = (SimpleParameter | NonAsciiStringæøåÆøÅöôêÊ字符串) & {\n    baz: number | null;\n    qux: number;\n};\n\n/**\n * Model used to test deduplication strategy (unused)\n */\nexport type ParameterSimpleParameterUnused = string;\n\n/**\n * Model used to test deduplication strategy\n */\nexport type PostServiceWithEmptyTagResponse = string;\n\n/**\n * Model used to test deduplication strategy\n */\nexport type PostServiceWithEmptyTagResponse2 = string;\n\n/**\n * Model used to test deduplication strategy\n */\nexport type DeleteFooData = string;\n\n/**\n * Model used to test deduplication strategy\n */\nexport type DeleteFooData2 = string;\n\n/**\n * Model with restricted keyword name\n */\nexport type Import = string;\n\nexport type SchemaWithFormRestrictedKeys = {\n    description?: string;\n    'x-enum-descriptions'?: string;\n    'x-enum-varnames'?: string;\n    'x-enumNames'?: string;\n    title?: string;\n    object?: {\n        description?: string;\n        'x-enum-descriptions'?: string;\n        'x-enum-varnames'?: string;\n        'x-enumNames'?: string;\n        title?: string;\n    };\n    array?: Array<{\n        description?: string;\n        'x-enum-descriptions'?: string;\n        'x-enum-varnames'?: string;\n        'x-enumNames'?: string;\n        title?: string;\n    }>;\n};\n\n/**\n * This schema was giving PascalCase transformations a hard time\n */\nexport type IoK8sApimachineryPkgApisMetaV1DeleteOptions = {\n    /**\n     * Must be fulfilled before a deletion is carried out. If not possible, a 409 Conflict status will be returned.\n     */\n    preconditions?: IoK8sApimachineryPkgApisMetaV1Preconditions;\n};\n\n/**\n * This schema was giving PascalCase transformations a hard time\n */\nexport type IoK8sApimachineryPkgApisMetaV1Preconditions = {\n    /**\n     * Specifies the target ResourceVersion\n     */\n    resourceVersion?: string;\n    /**\n     * Specifies the target UID.\n     */\n    uid?: string;\n};\n\nexport type AdditionalPropertiesUnknownIssue = {\n    [key: string]: string | number;\n};\n\nexport type AdditionalPropertiesUnknownIssue2 = {\n    [key: string]: string | number;\n};\n\nexport type AdditionalPropertiesUnknownIssue3 = string & {\n    entries: {\n        [key: string]: AdditionalPropertiesUnknownIssue;\n    };\n};\n\nexport type AdditionalPropertiesIntegerIssue = {\n    value: number;\n    [key: string]: number;\n};\n\nexport type OneOfAllOfIssue = ((ConstValue | GenericSchemaDuplicateIssue1SystemBoolean) & _3eNum1Период) | GenericSchemaDuplicateIssue1SystemString;\n\nexport type GenericSchemaDuplicateIssue1SystemBoolean = {\n    item?: boolean;\n    error?: string | null;\n    readonly hasError?: boolean;\n    data?: {\n        [key: string]: never;\n    };\n};\n\nexport type GenericSchemaDuplicateIssue1SystemString = {\n    item?: string | null;\n    error?: string | null;\n    readonly hasError?: boolean;\n};\n\nexport type ExternalSharedModel = {\n    id: string;\n    name?: string;\n};\n\n/**\n * This is a model with one property containing a reference\n */\nexport type ModelWithReferenceWritable = {\n    prop?: ModelWithPropertiesWritable;\n};\n\n/**\n * This is a model with one property containing an array\n */\nexport type ModelWithArrayReadOnlyAndWriteOnlyWritable = {\n    prop?: Array<ModelWithReadOnlyAndWriteOnlyWritable>;\n    propWithFile?: Array<Blob | File>;\n    propWithNumber?: Array<number>;\n};\n\n/**\n * This is a model with one nested property\n */\nexport type ModelWithPropertiesWritable = {\n    required: string;\n    requiredAndNullable: string | null;\n    string?: string;\n    number?: number;\n    boolean?: boolean;\n    reference?: ModelWithString;\n    'property with space'?: string;\n    default?: string;\n    try?: string;\n};\n\n/**\n * This is a model that contains a some patterns\n */\nexport type ModelWithPatternWritable = {\n    key: string;\n    name: string;\n    id?: string;\n    text?: string;\n    patternWithSingleQuotes?: string;\n    patternWithNewline?: string;\n    patternWithBacktick?: string;\n    patternWithUnicode?: string;\n};\n\nexport type FileWritable = {\n    /**\n     * Mime\n     */\n    mime: string;\n};\n\nexport type ModelWithReadOnlyAndWriteOnlyWritable = {\n    foo: string;\n    baz: string;\n};\n\nexport type ModelWithAnyOfConstantSizeArrayWithNSizeAndOptionsWritable = [\n    number | Import,\n    number | Import\n];\n\nexport type AdditionalPropertiesUnknownIssueWritable = {\n    [key: string]: string | number;\n};\n\nexport type OneOfAllOfIssueWritable = ((ConstValue | GenericSchemaDuplicateIssue1SystemBoolean) & _3eNum1Период) | GenericSchemaDuplicateIssue1SystemString;\n\nexport type GenericSchemaDuplicateIssue1SystemBooleanWritable = {\n    item?: boolean;\n    error?: string | null;\n    data?: {\n        [key: string]: never;\n    };\n};\n\nexport type GenericSchemaDuplicateIssue1SystemStringWritable = {\n    item?: string | null;\n    error?: string | null;\n};\n\n/**\n * This is a reusable parameter\n */\nexport type SimpleParameter = string;\n\n/**\n * Parameter with illegal characters\n */\nexport type XFooBar = ModelWithString;\n\n/**\n * A reusable request body\n */\nexport type SimpleRequestBody = ModelWithString;\n\n/**\n * A reusable request body\n */\nexport type SimpleFormData = ModelWithString;\n\nexport type ExportData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no+tag';\n};\n\nexport type PatchApiVbyApiVersionNoTagData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no+tag';\n};\n\nexport type PatchApiVbyApiVersionNoTagResponses = {\n    /**\n     * OK\n     */\n    default: unknown;\n};\n\nexport type ImportData = {\n    body: ModelWithReadOnlyAndWriteOnlyWritable | ModelWithArrayReadOnlyAndWriteOnlyWritable;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no+tag';\n};\n\nexport type ImportResponses = {\n    /**\n     * Success\n     */\n    200: ModelFromZendesk;\n    /**\n     * Default success response\n     */\n    default: ModelWithReadOnlyAndWriteOnly;\n};\n\nexport type ImportResponse = ImportResponses[keyof ImportResponses];\n\nexport type FooWowData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no+tag';\n};\n\nexport type FooWowResponses = {\n    /**\n     * OK\n     */\n    default: unknown;\n};\n\nexport type ApiVVersionODataControllerCountData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple/$count';\n};\n\nexport type ApiVVersionODataControllerCountResponses = {\n    /**\n     * Success\n     */\n    200: ModelFromZendesk;\n};\n\nexport type ApiVVersionODataControllerCountResponse = ApiVVersionODataControllerCountResponses[keyof ApiVVersionODataControllerCountResponses];\n\nexport type GetApiVbyApiVersionSimpleOperationData = {\n    body?: never;\n    path: {\n        /**\n         * foo in method\n         */\n        foo_param: string;\n    };\n    query?: never;\n    url: '/api/v{api-version}/simple:operation';\n};\n\nexport type GetApiVbyApiVersionSimpleOperationErrors = {\n    /**\n     * Default error response\n     */\n    default: ModelWithBoolean;\n};\n\nexport type GetApiVbyApiVersionSimpleOperationError = GetApiVbyApiVersionSimpleOperationErrors[keyof GetApiVbyApiVersionSimpleOperationErrors];\n\nexport type GetApiVbyApiVersionSimpleOperationResponses = {\n    /**\n     * Response is a simple number\n     */\n    200: number;\n};\n\nexport type GetApiVbyApiVersionSimpleOperationResponse = GetApiVbyApiVersionSimpleOperationResponses[keyof GetApiVbyApiVersionSimpleOperationResponses];\n\nexport type DeleteCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type GetCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type HeadCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type OptionsCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type PatchCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type PostCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type PutCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type DeleteFooData3 = {\n    body?: never;\n    headers: {\n        /**\n         * Parameter with illegal characters\n         */\n        'x-Foo-Bar': ModelWithString;\n    };\n    path: {\n        /**\n         * foo in method\n         */\n        foo_param: string;\n        /**\n         * bar in method\n         */\n        BarParam: string;\n    };\n    query?: never;\n    url: '/api/v{api-version}/foo/{foo_param}/bar/{BarParam}';\n};\n\nexport type CallWithDescriptionsData = {\n    body?: never;\n    path?: never;\n    query?: {\n        /**\n         * Testing multiline comments in string: First line\n         * Second line\n         *\n         * Fourth line\n         */\n        parameterWithBreaks?: string;\n        /**\n         * Testing backticks in string: `backticks` and ```multiple backticks``` should work\n         */\n        parameterWithBackticks?: string;\n        /**\n         * Testing slashes in string: \\backwards\\\\\\ and /forwards/// should work\n         */\n        parameterWithSlashes?: string;\n        /**\n         * Testing expression placeholders in string: ${expression} should work\n         */\n        parameterWithExpressionPlaceholders?: string;\n        /**\n         * Testing quotes in string: 'single quote''' and \"double quotes\"\"\" should work\n         */\n        parameterWithQuotes?: string;\n        /**\n         * Testing reserved characters in string: * inline * and ** inline ** should work\n         */\n        parameterWithReservedCharacters?: string;\n    };\n    url: '/api/v{api-version}/descriptions';\n};\n\nexport type DeprecatedCallData = {\n    body?: never;\n    headers: {\n        /**\n         * This parameter is deprecated\n         *\n         * @deprecated\n         */\n        parameter: DeprecatedModel | null;\n    };\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/parameters/deprecated';\n};\n\nexport type CallWithParametersData = {\n    /**\n     * This is the parameter that goes into the body\n     */\n    body: {\n        [key: string]: unknown;\n    } | null;\n    headers: {\n        /**\n         * This is the parameter that goes into the header\n         */\n        parameterHeader: string | null;\n    };\n    path: {\n        /**\n         * This is the parameter that goes into the path\n         */\n        parameterPath: string | null;\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string | null;\n    };\n    query: {\n        foo_ref_enum?: ModelWithNestedArrayEnumsDataFoo;\n        foo_all_of_enum: ModelWithNestedArrayEnumsDataFoo;\n        /**\n         * This is the parameter that goes into the query params\n         */\n        cursor: string | null;\n    };\n    url: '/api/v{api-version}/parameters/{parameterPath}';\n};\n\nexport type CallWithWeirdParameterNamesData = {\n    /**\n     * This is the parameter that goes into the body\n     */\n    body: ModelWithString | null;\n    headers: {\n        /**\n         * This is the parameter that goes into the request header\n         */\n        'parameter.header': string | null;\n    };\n    path: {\n        /**\n         * This is the parameter that goes into the path\n         */\n        'parameter.path.1'?: string;\n        /**\n         * This is the parameter that goes into the path\n         */\n        'parameter-path-2'?: string;\n        /**\n         * This is the parameter that goes into the path\n         */\n        'PARAMETER-PATH-3'?: string;\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string | null;\n    };\n    query: {\n        /**\n         * This is the parameter with a reserved keyword\n         */\n        default?: string;\n        /**\n         * This is the parameter that goes into the request query params\n         */\n        'parameter-query': string | null;\n    };\n    url: '/api/v{api-version}/parameters/{parameter.path.1}/{parameter-path-2}/{PARAMETER-PATH-3}';\n};\n\nexport type GetCallWithOptionalParamData = {\n    /**\n     * This is a required parameter\n     */\n    body: ModelWithOneOfEnum;\n    path?: never;\n    query?: {\n        /**\n         * This is an optional parameter\n         */\n        page?: number;\n    };\n    url: '/api/v{api-version}/parameters';\n};\n\nexport type PostCallWithOptionalParamData = {\n    /**\n     * This is an optional parameter\n     */\n    body?: {\n        offset?: number | null;\n    };\n    path?: never;\n    query: {\n        /**\n         * This is a required parameter\n         */\n        parameter: Pageable;\n    };\n    url: '/api/v{api-version}/parameters';\n};\n\nexport type PostCallWithOptionalParamResponses = {\n    /**\n     * Response is a simple number\n     */\n    200: number;\n    /**\n     * Success\n     */\n    204: void;\n};\n\nexport type PostCallWithOptionalParamResponse = PostCallWithOptionalParamResponses[keyof PostCallWithOptionalParamResponses];\n\nexport type PostApiVbyApiVersionRequestBodyData = {\n    /**\n     * A reusable request body\n     */\n    body?: SimpleRequestBody;\n    path?: never;\n    query?: {\n        /**\n         * This is a reusable parameter\n         */\n        parameter?: string;\n    };\n    url: '/api/v{api-version}/requestBody';\n};\n\nexport type PostApiVbyApiVersionFormDataData = {\n    /**\n     * A reusable request body\n     */\n    body?: SimpleFormData;\n    path?: never;\n    query?: {\n        /**\n         * This is a reusable parameter\n         */\n        parameter?: string;\n    };\n    url: '/api/v{api-version}/formData';\n};\n\nexport type CallWithDefaultParametersData = {\n    body?: never;\n    path?: never;\n    query?: {\n        /**\n         * This is a simple string with default value\n         */\n        parameterString?: string | null;\n        /**\n         * This is a simple number with default value\n         */\n        parameterNumber?: number | null;\n        /**\n         * This is a simple boolean with default value\n         */\n        parameterBoolean?: boolean | null;\n        /**\n         * This is a simple enum with default value\n         */\n        parameterEnum?: 'Success' | 'Warning' | 'Error';\n        /**\n         * This is a simple model with default value\n         */\n        parameterModel?: ModelWithString | null;\n    };\n    url: '/api/v{api-version}/defaults';\n};\n\nexport type CallWithDefaultOptionalParametersData = {\n    body?: never;\n    path?: never;\n    query?: {\n        /**\n         * This is a simple string that is optional with default value\n         */\n        parameterString?: string;\n        /**\n         * This is a simple number that is optional with default value\n         */\n        parameterNumber?: number;\n        /**\n         * This is a simple boolean that is optional with default value\n         */\n        parameterBoolean?: boolean;\n        /**\n         * This is a simple enum that is optional with default value\n         */\n        parameterEnum?: 'Success' | 'Warning' | 'Error';\n        /**\n         * This is a simple model that is optional with default value\n         */\n        parameterModel?: ModelWithString;\n    };\n    url: '/api/v{api-version}/defaults';\n};\n\nexport type CallToTestOrderOfParamsData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * This is a optional string with default\n         */\n        parameterOptionalStringWithDefault?: string;\n        /**\n         * This is a optional string with empty default\n         */\n        parameterOptionalStringWithEmptyDefault?: string;\n        /**\n         * This is a optional string with no default\n         */\n        parameterOptionalStringWithNoDefault?: string;\n        /**\n         * This is a string with default\n         */\n        parameterStringWithDefault: string;\n        /**\n         * This is a string with empty default\n         */\n        parameterStringWithEmptyDefault: string;\n        /**\n         * This is a string with no default\n         */\n        parameterStringWithNoDefault: string;\n        /**\n         * This is a string that can be null with no default\n         */\n        parameterStringNullableWithNoDefault?: string | null;\n        /**\n         * This is a string that can be null with default\n         */\n        parameterStringNullableWithDefault?: string | null;\n    };\n    url: '/api/v{api-version}/defaults';\n};\n\nexport type DuplicateNameData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/duplicate';\n};\n\nexport type DuplicateName2Data = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/duplicate';\n};\n\nexport type DuplicateName3Data = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/duplicate';\n};\n\nexport type DuplicateName4Data = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/duplicate';\n};\n\nexport type CallWithNoContentResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no-content';\n};\n\nexport type CallWithNoContentResponseResponses = {\n    /**\n     * Success\n     */\n    204: void;\n};\n\nexport type CallWithNoContentResponseResponse = CallWithNoContentResponseResponses[keyof CallWithNoContentResponseResponses];\n\nexport type CallWithResponseAndNoContentResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multiple-tags/response-and-no-content';\n};\n\nexport type CallWithResponseAndNoContentResponseResponses = {\n    /**\n     * Response is a simple number\n     */\n    200: number;\n    /**\n     * Success\n     */\n    204: void;\n};\n\nexport type CallWithResponseAndNoContentResponseResponse = CallWithResponseAndNoContentResponseResponses[keyof CallWithResponseAndNoContentResponseResponses];\n\nexport type DummyAData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multiple-tags/a';\n};\n\nexport type DummyAResponses = {\n    200: _400;\n};\n\nexport type DummyAResponse = DummyAResponses[keyof DummyAResponses];\n\nexport type DummyBData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multiple-tags/b';\n};\n\nexport type DummyBResponses = {\n    /**\n     * Success\n     */\n    204: void;\n};\n\nexport type DummyBResponse = DummyBResponses[keyof DummyBResponses];\n\nexport type CallWithResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/response';\n};\n\nexport type CallWithResponseResponses = {\n    default: Import;\n};\n\nexport type CallWithResponseResponse = CallWithResponseResponses[keyof CallWithResponseResponses];\n\nexport type CallWithDuplicateResponsesData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/response';\n};\n\nexport type CallWithDuplicateResponsesErrors = {\n    /**\n     * Message for 500 error\n     */\n    500: ModelWithStringError;\n    /**\n     * Message for 501 error\n     */\n    501: ModelWithStringError;\n    /**\n     * Message for 502 error\n     */\n    502: ModelWithStringError;\n    /**\n     * Message for 4XX errors\n     */\n    '4XX': DictionaryWithArray;\n    /**\n     * Default error response\n     */\n    default: ModelWithBoolean;\n};\n\nexport type CallWithDuplicateResponsesError = CallWithDuplicateResponsesErrors[keyof CallWithDuplicateResponsesErrors];\n\nexport type CallWithDuplicateResponsesResponses = {\n    /**\n     * Message for 200 response\n     */\n    200: ModelWithBoolean & ModelWithInteger;\n    /**\n     * Message for 201 response\n     */\n    201: ModelWithString;\n    /**\n     * Message for 202 response\n     */\n    202: ModelWithString;\n};\n\nexport type CallWithDuplicateResponsesResponse = CallWithDuplicateResponsesResponses[keyof CallWithDuplicateResponsesResponses];\n\nexport type CallWithResponsesData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/response';\n};\n\nexport type CallWithResponsesErrors = {\n    /**\n     * Message for 500 error\n     */\n    500: ModelWithStringError;\n    /**\n     * Message for 501 error\n     */\n    501: ModelWithStringError;\n    /**\n     * Message for 502 error\n     */\n    502: ModelWithStringError;\n    /**\n     * Message for default response\n     */\n    default: ModelWithStringError;\n};\n\nexport type CallWithResponsesError = CallWithResponsesErrors[keyof CallWithResponsesErrors];\n\nexport type CallWithResponsesResponses = {\n    /**\n     * Message for 200 response\n     */\n    200: {\n        readonly '@namespace.string'?: string;\n        readonly '@namespace.integer'?: number;\n        readonly value?: Array<ModelWithString>;\n    };\n    /**\n     * Message for 201 response\n     */\n    201: ModelThatExtends;\n    /**\n     * Message for 202 response\n     */\n    202: ModelThatExtendsExtends;\n};\n\nexport type CallWithResponsesResponse = CallWithResponsesResponses[keyof CallWithResponsesResponses];\n\nexport type CollectionFormatData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * This is an array parameter that is sent as csv format (comma-separated values)\n         */\n        parameterArrayCSV: Array<string> | null;\n        /**\n         * This is an array parameter that is sent as ssv format (space-separated values)\n         */\n        parameterArraySSV: Array<string> | null;\n        /**\n         * This is an array parameter that is sent as tsv format (tab-separated values)\n         */\n        parameterArrayTSV: Array<string> | null;\n        /**\n         * This is an array parameter that is sent as pipes format (pipe-separated values)\n         */\n        parameterArrayPipes: Array<string> | null;\n        /**\n         * This is an array parameter that is sent as multi format (multiple parameter instances)\n         */\n        parameterArrayMulti: Array<string> | null;\n    };\n    url: '/api/v{api-version}/collectionFormat';\n};\n\nexport type TypesData = {\n    body?: never;\n    path?: {\n        /**\n         * This is a number parameter\n         */\n        id?: number;\n    };\n    query: {\n        /**\n         * This is a number parameter\n         */\n        parameterNumber: number;\n        /**\n         * This is a string parameter\n         */\n        parameterString: string | null;\n        /**\n         * This is a boolean parameter\n         */\n        parameterBoolean: boolean | null;\n        /**\n         * This is an object parameter\n         */\n        parameterObject: {\n            [key: string]: unknown;\n        } | null;\n        /**\n         * This is an array parameter\n         */\n        parameterArray: Array<string> | null;\n        /**\n         * This is a dictionary parameter\n         */\n        parameterDictionary: {\n            [key: string]: unknown;\n        } | null;\n        /**\n         * This is an enum parameter\n         */\n        parameterEnum: 'Success' | 'Warning' | 'Error' | null;\n    };\n    url: '/api/v{api-version}/types';\n};\n\nexport type TypesResponses = {\n    /**\n     * Response is a simple number\n     */\n    200: number;\n    /**\n     * Response is a simple string\n     */\n    201: string;\n    /**\n     * Response is a simple boolean\n     */\n    202: boolean;\n    /**\n     * Response is a simple object\n     */\n    203: {\n        [key: string]: unknown;\n    };\n};\n\nexport type TypesResponse = TypesResponses[keyof TypesResponses];\n\nexport type UploadFileData = {\n    body: Blob | File;\n    path: {\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string | null;\n    };\n    query?: never;\n    url: '/api/v{api-version}/upload';\n};\n\nexport type UploadFileResponses = {\n    200: boolean;\n};\n\nexport type UploadFileResponse = UploadFileResponses[keyof UploadFileResponses];\n\nexport type FileResponseData = {\n    body?: never;\n    path: {\n        id: string;\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string;\n    };\n    query?: never;\n    url: '/api/v{api-version}/file/{id}';\n};\n\nexport type FileResponseResponses = {\n    /**\n     * Success\n     */\n    200: Blob | File;\n};\n\nexport type FileResponseResponse = FileResponseResponses[keyof FileResponseResponses];\n\nexport type ComplexTypesData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * Parameter containing object\n         */\n        parameterObject: {\n            first?: {\n                second?: {\n                    third?: string;\n                };\n            };\n        };\n        /**\n         * Parameter containing reference\n         */\n        parameterReference: ModelWithString;\n    };\n    url: '/api/v{api-version}/complex';\n};\n\nexport type ComplexTypesErrors = {\n    /**\n     * 400 `server` error\n     */\n    400: unknown;\n    /**\n     * 500 server error\n     */\n    500: unknown;\n};\n\nexport type ComplexTypesResponses = {\n    /**\n     * Successful response\n     */\n    200: Array<ModelWithString>;\n};\n\nexport type ComplexTypesResponse = ComplexTypesResponses[keyof ComplexTypesResponses];\n\nexport type MultipartResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multipart';\n};\n\nexport type MultipartResponseResponses = {\n    /**\n     * OK\n     */\n    200: {\n        file?: Blob | File;\n        metadata?: {\n            foo?: string;\n            bar?: string;\n        };\n    };\n};\n\nexport type MultipartResponseResponse = MultipartResponseResponses[keyof MultipartResponseResponses];\n\nexport type MultipartRequestData = {\n    body?: {\n        content?: Blob | File;\n        data?: ModelWithString | null;\n    };\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multipart';\n};\n\nexport type ComplexParamsData = {\n    body?: {\n        readonly key: string | null;\n        name: string | null;\n        enabled?: boolean;\n        type: 'Monkey' | 'Horse' | 'Bird';\n        listOfModels?: Array<ModelWithString> | null;\n        listOfStrings?: Array<string> | null;\n        parameters: ModelWithString | ModelWithEnum | ModelWithArray | ModelWithDictionary;\n        readonly user?: {\n            readonly id?: number;\n            readonly name?: string | null;\n        };\n    };\n    path: {\n        id: number;\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string;\n    };\n    query?: never;\n    url: '/api/v{api-version}/complex/{id}';\n};\n\nexport type ComplexParamsResponses = {\n    /**\n     * Success\n     */\n    200: ModelWithString;\n};\n\nexport type ComplexParamsResponse = ComplexParamsResponses[keyof ComplexParamsResponses];\n\nexport type CallWithResultFromHeaderData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/header';\n};\n\nexport type CallWithResultFromHeaderErrors = {\n    /**\n     * 400 server error\n     */\n    400: unknown;\n    /**\n     * 500 server error\n     */\n    500: unknown;\n};\n\nexport type CallWithResultFromHeaderResponses = {\n    /**\n     * Successful response\n     */\n    200: unknown;\n};\n\nexport type TestErrorCodeData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * Status code to return\n         */\n        status: number;\n    };\n    url: '/api/v{api-version}/error';\n};\n\nexport type TestErrorCodeErrors = {\n    /**\n     * Custom message: Internal Server Error\n     */\n    500: unknown;\n    /**\n     * Custom message: Not Implemented\n     */\n    501: unknown;\n    /**\n     * Custom message: Bad Gateway\n     */\n    502: unknown;\n    /**\n     * Custom message: Service Unavailable\n     */\n    503: unknown;\n};\n\nexport type TestErrorCodeResponses = {\n    /**\n     * Custom message: Successful response\n     */\n    200: unknown;\n};\n\nexport type NonAsciiæøåÆøÅöôêÊ字符串Data = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * Dummy input param\n         */\n        nonAsciiParamæøåÆØÅöôêÊ: number;\n    };\n    url: '/api/v{api-version}/non-ascii-æøåÆØÅöôêÊ字符串';\n};\n\nexport type NonAsciiæøåÆøÅöôêÊ字符串Responses = {\n    /**\n     * Successful response\n     */\n    200: Array<NonAsciiStringæøåÆøÅöôêÊ字符串>;\n};\n\nexport type NonAsciiæøåÆøÅöôêÊ字符串Response = NonAsciiæøåÆøÅöôêÊ字符串Responses[keyof NonAsciiæøåÆøÅöôêÊ字符串Responses];\n\nexport type PutWithFormUrlEncodedData = {\n    body: ArrayWithStrings;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/non-ascii-æøåÆØÅöôêÊ字符串';\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-fetch/sdk-client-required/client/client.gen.ts",
    "content": "// 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 (options: RequestOptions) => {\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 url = buildUrl(opts);\n\n    return { opts, url };\n  };\n\n  const request: Client['request'] = async (options) => {\n    // @ts-expect-error\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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-fetch/sdk-client-required/client/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type { Auth } from '../core/auth.gen';\nexport type { QuerySerializerOptions } from '../core/bodySerializer.gen';\nexport {\n  formDataBodySerializer,\n  jsonBodySerializer,\n  urlSearchParamsBodySerializer,\n} from '../core/bodySerializer.gen';\nexport { buildClientParams } from '../core/params.gen';\nexport { serializeQueryKeyValue } from '../core/queryKeySerializer.gen';\nexport { createClient } from './client.gen';\nexport type {\n  Client,\n  ClientOptions,\n  Config,\n  CreateClientConfig,\n  Options,\n  RequestOptions,\n  RequestResult,\n  ResolvedRequestOptions,\n  ResponseStyle,\n  TDataShape,\n} from './types.gen';\nexport { createConfig, mergeHeaders } from './utils.gen';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-fetch/sdk-client-required/client/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { Auth } from '../core/auth.gen';\nimport type {\n  ServerSentEventsOptions,\n  ServerSentEventsResult,\n} from '../core/serverSentEvents.gen';\nimport type { Client as CoreClient, Config as CoreConfig } from '../core/types.gen';\nimport type { Middleware } from './utils.gen';\n\nexport type ResponseStyle = 'data' | 'fields';\n\nexport interface Config<T extends ClientOptions = ClientOptions>\n  extends Omit<RequestInit, 'body' | 'headers' | 'method'>, CoreConfig {\n  /**\n   * Base URL for all requests made by this client.\n   */\n  baseUrl?: T['baseUrl'];\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   * Please don't use the Fetch client for Next.js applications. The `next`\n   * options won't have any effect.\n   *\n   * Install {@link https://www.npmjs.com/package/@hey-api/client-next `@hey-api/client-next`} instead.\n   */\n  next?: never;\n  /**\n   * Return the response data parsed in a specified format. By default, `auto`\n   * will infer the appropriate method from the `Content-Type` response header.\n   * You can override this behavior with any of the {@link Body} methods.\n   * Select `stream` if you don't want to parse response data at all.\n   *\n   * @default 'auto'\n   */\n  parseAs?: 'arrayBuffer' | 'auto' | 'blob' | 'formData' | 'json' | 'stream' | 'text';\n  /**\n   * Should we return only data or multiple fields (data, error, response, etc.)?\n   *\n   * @default 'fields'\n   */\n  responseStyle?: ResponseStyle;\n  /**\n   * Throw an error instead of returning it in the response?\n   *\n   * @default false\n   */\n  throwOnError?: T['throwOnError'];\n}\n\nexport interface RequestOptions<\n  TData = unknown,\n  TResponseStyle extends ResponseStyle = 'fields',\n  ThrowOnError extends boolean = boolean,\n  Url extends string = string,\n>\n  extends\n    Config<{\n      responseStyle: TResponseStyle;\n      throwOnError: ThrowOnError;\n    }>,\n    Pick<\n      ServerSentEventsOptions<TData>,\n      | 'onRequest'\n      | 'onSseError'\n      | 'onSseEvent'\n      | 'sseDefaultRetryDelay'\n      | 'sseMaxRetryAttempts'\n      | 'sseMaxRetryDelay'\n    > {\n  /**\n   * Any body that you want to add to your request.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/fetch#body}\n   */\n  body?: unknown;\n  path?: Record<string, unknown>;\n  query?: Record<string, unknown>;\n  /**\n   * Security mechanism(s) to use for the request.\n   */\n  security?: ReadonlyArray<Auth>;\n  url: Url;\n}\n\nexport interface ResolvedRequestOptions<\n  TResponseStyle extends ResponseStyle = 'fields',\n  ThrowOnError extends boolean = boolean,\n  Url extends string = string,\n> extends RequestOptions<unknown, TResponseStyle, ThrowOnError, Url> {\n  serializedBody?: string;\n}\n\nexport type RequestResult<\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = boolean,\n  TResponseStyle extends ResponseStyle = 'fields',\n> = ThrowOnError extends true\n  ? Promise<\n      TResponseStyle extends 'data'\n        ? TData extends Record<string, unknown>\n          ? TData[keyof TData]\n          : TData\n        : {\n            data: TData extends Record<string, unknown> ? TData[keyof TData] : TData;\n            request: Request;\n            response: Response;\n          }\n    >\n  : Promise<\n      TResponseStyle extends 'data'\n        ? (TData extends Record<string, unknown> ? TData[keyof TData] : TData) | undefined\n        : (\n            | {\n                data: TData extends Record<string, unknown> ? TData[keyof TData] : TData;\n                error: undefined;\n              }\n            | {\n                data: undefined;\n                error: TError extends Record<string, unknown> ? TError[keyof TError] : TError;\n              }\n          ) & {\n            request: Request;\n            response: Response;\n          }\n    >;\n\nexport interface ClientOptions {\n  baseUrl?: string;\n  responseStyle?: ResponseStyle;\n  throwOnError?: boolean;\n}\n\ntype MethodFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'>,\n) => RequestResult<TData, TError, ThrowOnError, TResponseStyle>;\n\ntype SseFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'>,\n) => Promise<ServerSentEventsResult<TData, TError>>;\n\ntype RequestFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'> &\n    Pick<Required<RequestOptions<TData, TResponseStyle, ThrowOnError>>, 'method'>,\n) => RequestResult<TData, TError, ThrowOnError, TResponseStyle>;\n\ntype BuildUrlFn = <\n  TData extends {\n    body?: unknown;\n    path?: Record<string, unknown>;\n    query?: Record<string, unknown>;\n    url: string;\n  },\n>(\n  options: TData & Options<TData>,\n) => string;\n\nexport type Client = CoreClient<RequestFn, Config, MethodFn, BuildUrlFn, SseFn> & {\n  interceptors: Middleware<Request, Response, unknown, ResolvedRequestOptions>;\n};\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 = ClientOptions> = (\n  override?: Config<ClientOptions & T>,\n) => Config<Required<ClientOptions> & T>;\n\nexport interface TDataShape {\n  body?: unknown;\n  headers?: unknown;\n  path?: unknown;\n  query?: unknown;\n  url: string;\n}\n\ntype OmitKeys<T, K> = Pick<T, Exclude<keyof T, K>>;\n\nexport type Options<\n  TData extends TDataShape = TDataShape,\n  ThrowOnError extends boolean = boolean,\n  TResponse = unknown,\n  TResponseStyle extends ResponseStyle = 'fields',\n> = OmitKeys<\n  RequestOptions<TResponse, TResponseStyle, ThrowOnError>,\n  'body' | 'path' | 'query' | 'url'\n> &\n  ([TData] extends [never] ? unknown : Omit<TData, 'url'>);\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-fetch/sdk-client-required/client/utils.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-fetch/sdk-client-required/client.gen.ts",
    "content": "// 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: 'http://localhost:3000/base' }));\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-fetch/sdk-client-required/core/auth.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-fetch/sdk-client-required/core/bodySerializer.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-fetch/sdk-client-required/core/params.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-fetch/sdk-client-required/core/pathSerializer.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-fetch/sdk-client-required/core/queryKeySerializer.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\n/**\n * JSON-friendly union that mirrors what Pinia Colada can hash.\n */\nexport type JsonValue =\n  | null\n  | string\n  | number\n  | boolean\n  | JsonValue[]\n  | { [key: string]: JsonValue };\n\n/**\n * Replacer that converts non-JSON values (bigint, Date, etc.) to safe substitutes.\n */\nexport const queryKeyJsonReplacer = (_key: string, value: unknown) => {\n  if (value === undefined || typeof value === 'function' || typeof value === 'symbol') {\n    return undefined;\n  }\n  if (typeof value === 'bigint') {\n    return value.toString();\n  }\n  if (value instanceof Date) {\n    return value.toISOString();\n  }\n  return value;\n};\n\n/**\n * Safely stringifies a value and parses it back into a JsonValue.\n */\nexport const stringifyToJsonValue = (input: unknown): JsonValue | undefined => {\n  try {\n    const json = JSON.stringify(input, queryKeyJsonReplacer);\n    if (json === undefined) {\n      return undefined;\n    }\n    return JSON.parse(json) as JsonValue;\n  } catch {\n    return undefined;\n  }\n};\n\n/**\n * Detects plain objects (including objects with a null prototype).\n */\nconst isPlainObject = (value: unknown): value is Record<string, unknown> => {\n  if (value === null || typeof value !== 'object') {\n    return false;\n  }\n  const prototype = Object.getPrototypeOf(value as object);\n  return prototype === Object.prototype || prototype === null;\n};\n\n/**\n * Turns URLSearchParams into a sorted JSON object for deterministic keys.\n */\nconst serializeSearchParams = (params: URLSearchParams): JsonValue => {\n  const entries = Array.from(params.entries()).sort(([a], [b]) => a.localeCompare(b));\n  const result: Record<string, JsonValue> = {};\n\n  for (const [key, value] of entries) {\n    const existing = result[key];\n    if (existing === undefined) {\n      result[key] = value;\n      continue;\n    }\n\n    if (Array.isArray(existing)) {\n      (existing as string[]).push(value);\n    } else {\n      result[key] = [existing, value];\n    }\n  }\n\n  return result;\n};\n\n/**\n * Normalizes any accepted value into a JSON-friendly shape for query keys.\n */\nexport const serializeQueryKeyValue = (value: unknown): JsonValue | undefined => {\n  if (value === null) {\n    return null;\n  }\n\n  if (typeof value === 'string' || typeof value === 'number' || typeof value === 'boolean') {\n    return value;\n  }\n\n  if (value === undefined || typeof value === 'function' || typeof value === 'symbol') {\n    return undefined;\n  }\n\n  if (typeof value === 'bigint') {\n    return value.toString();\n  }\n\n  if (value instanceof Date) {\n    return value.toISOString();\n  }\n\n  if (Array.isArray(value)) {\n    return stringifyToJsonValue(value);\n  }\n\n  if (typeof URLSearchParams !== 'undefined' && value instanceof URLSearchParams) {\n    return serializeSearchParams(value);\n  }\n\n  if (isPlainObject(value)) {\n    return stringifyToJsonValue(value);\n  }\n\n  return undefined;\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-fetch/sdk-client-required/core/serverSentEvents.gen.ts",
    "content": "// 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 const 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            // Normalize line endings: CRLF -> LF, then CR -> LF\n            buffer = buffer.replace(/\\r\\n/g, '\\n').replace(/\\r/g, '\\n');\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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-fetch/sdk-client-required/core/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { Auth, AuthToken } from './auth.gen';\nimport type { BodySerializer, QuerySerializer, QuerySerializerOptions } from './bodySerializer.gen';\n\nexport type HttpMethod =\n  | 'connect'\n  | 'delete'\n  | 'get'\n  | 'head'\n  | 'options'\n  | 'patch'\n  | 'post'\n  | 'put'\n  | 'trace';\n\nexport type Client<\n  RequestFn = never,\n  Config = unknown,\n  MethodFn = never,\n  BuildUrlFn = never,\n  SseFn = never,\n> = {\n  /**\n   * Returns the final request URL.\n   */\n  buildUrl: BuildUrlFn;\n  getConfig: () => Config;\n  request: RequestFn;\n  setConfig: (config: Config) => Config;\n} & {\n  [K in HttpMethod]: MethodFn;\n} & ([SseFn] extends [never] ? { sse?: never } : { sse: { [K in HttpMethod]: SseFn } });\n\nexport interface Config {\n  /**\n   * Auth token or a function returning auth token. The resolved value will be\n   * added to the request payload as defined by its `security` array.\n   */\n  auth?: ((auth: Auth) => Promise<AuthToken> | AuthToken) | AuthToken;\n  /**\n   * A function for serializing request body parameter. By default,\n   * {@link JSON.stringify()} will be used.\n   */\n  bodySerializer?: BodySerializer | null;\n  /**\n   * An object containing any HTTP headers that you want to pre-populate your\n   * `Headers` object with.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/Headers/Headers#init See more}\n   */\n  headers?:\n    | RequestInit['headers']\n    | Record<\n        string,\n        string | number | boolean | (string | number | boolean)[] | null | undefined | unknown\n      >;\n  /**\n   * The request method.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/fetch#method See more}\n   */\n  method?: Uppercase<HttpMethod>;\n  /**\n   * A function for serializing request query parameters. By default, arrays\n   * will be exploded in form style, objects will be exploded in deepObject\n   * style, and reserved characters are percent-encoded.\n   *\n   * This method will have no effect if the native `paramsSerializer()` Axios\n   * API function is used.\n   *\n   * {@link https://swagger.io/docs/specification/serialization/#query View examples}\n   */\n  querySerializer?: QuerySerializer | QuerySerializerOptions;\n  /**\n   * A function validating request data. This is useful if you want to ensure\n   * the request conforms to the desired shape, so it can be safely sent to\n   * the server.\n   */\n  requestValidator?: (data: unknown) => Promise<unknown>;\n  /**\n   * A function transforming response data before it's returned. This is useful\n   * for post-processing data, e.g. converting ISO strings into Date objects.\n   */\n  responseTransformer?: (data: unknown) => Promise<unknown>;\n  /**\n   * A function validating response data. This is useful if you want to ensure\n   * the response conforms to the desired shape, so it can be safely passed to\n   * the transformers and returned to the user.\n   */\n  responseValidator?: (data: unknown) => Promise<unknown>;\n}\n\ntype IsExactlyNeverOrNeverUndefined<T> = [T] extends [never]\n  ? true\n  : [T] extends [never | undefined]\n    ? [undefined] extends [T]\n      ? false\n      : true\n    : false;\n\nexport type OmitNever<T extends Record<string, unknown>> = {\n  [K in keyof T as IsExactlyNeverOrNeverUndefined<T[K]> extends true ? never : K]: T[K];\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-fetch/sdk-client-required/core/utils.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-fetch/sdk-client-required/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport { apiVVersionODataControllerCount, callToTestOrderOfParams, callWithDefaultOptionalParameters, callWithDefaultParameters, callWithDescriptions, callWithDuplicateResponses, callWithNoContentResponse, callWithParameters, callWithResponse, callWithResponseAndNoContentResponse, callWithResponses, callWithResultFromHeader, callWithWeirdParameterNames, collectionFormat, complexParams, complexTypes, deleteCallWithoutParametersAndResponse, deleteFoo, deprecatedCall, dummyA, dummyB, duplicateName, duplicateName2, duplicateName3, duplicateName4, export_, fileResponse, fooWow, getApiVbyApiVersionSimpleOperation, getCallWithOptionalParam, getCallWithoutParametersAndResponse, headCallWithoutParametersAndResponse, import_, multipartRequest, multipartResponse, nonAsciiæøåÆøÅöôêÊ字符串, type Options, optionsCallWithoutParametersAndResponse, patchApiVbyApiVersionNoTag, patchCallWithoutParametersAndResponse, postApiVbyApiVersionFormData, postApiVbyApiVersionRequestBody, postCallWithOptionalParam, postCallWithoutParametersAndResponse, putCallWithoutParametersAndResponse, putWithFormUrlEncoded, testErrorCode, types, uploadFile } from './sdk.gen';\nexport type { _3eNum1Период, _400, AdditionalPropertiesIntegerIssue, AdditionalPropertiesUnknownIssue, AdditionalPropertiesUnknownIssue2, AdditionalPropertiesUnknownIssue3, AdditionalPropertiesUnknownIssueWritable, AnyOfAnyAndNull, AnyOfArrays, ApiVVersionODataControllerCountData, ApiVVersionODataControllerCountResponse, ApiVVersionODataControllerCountResponses, ArrayWithAnyOfProperties, ArrayWithArray, ArrayWithBooleans, ArrayWithNumbers, ArrayWithProperties, ArrayWithReferences, ArrayWithStrings, CallToTestOrderOfParamsData, CallWithDefaultOptionalParametersData, CallWithDefaultParametersData, CallWithDescriptionsData, CallWithDuplicateResponsesData, CallWithDuplicateResponsesError, CallWithDuplicateResponsesErrors, CallWithDuplicateResponsesResponse, CallWithDuplicateResponsesResponses, CallWithNoContentResponseData, CallWithNoContentResponseResponse, CallWithNoContentResponseResponses, CallWithParametersData, CallWithResponseAndNoContentResponseData, CallWithResponseAndNoContentResponseResponse, CallWithResponseAndNoContentResponseResponses, CallWithResponseData, CallWithResponseResponse, CallWithResponseResponses, CallWithResponsesData, CallWithResponsesError, CallWithResponsesErrors, CallWithResponsesResponse, CallWithResponsesResponses, CallWithResultFromHeaderData, CallWithResultFromHeaderErrors, CallWithResultFromHeaderResponses, CallWithWeirdParameterNamesData, CamelCaseCommentWithBreaks, CharactersInDescription, ClientOptions, CollectionFormatData, CommentWithBackticks, CommentWithBackticksAndQuotes, CommentWithBreaks, CommentWithExpressionPlaceholders, CommentWithQuotes, CommentWithReservedCharacters, CommentWithSlashes, ComplexParamsData, ComplexParamsResponse, ComplexParamsResponses, ComplexTypesData, ComplexTypesErrors, ComplexTypesResponse, ComplexTypesResponses, CompositionBaseModel, CompositionExtendedModel, CompositionWithAllOfAndNullable, CompositionWithAnyOf, CompositionWithAnyOfAndNullable, CompositionWithAnyOfAnonymous, CompositionWithNestedAnyAndTypeNull, CompositionWithNestedAnyOfAndNull, CompositionWithOneOf, CompositionWithOneOfAndComplexArrayDictionary, CompositionWithOneOfAndNullable, CompositionWithOneOfAndProperties, CompositionWithOneOfAndSimpleArrayDictionary, CompositionWithOneOfAndSimpleDictionary, CompositionWithOneOfAnonymous, CompositionWithOneOfDiscriminator, ConstValue, Default, DeleteCallWithoutParametersAndResponseData, DeleteFooData, DeleteFooData2, DeleteFooData3, DeprecatedCallData, DeprecatedModel, DictionaryWithArray, DictionaryWithDictionary, DictionaryWithProperties, DictionaryWithPropertiesAndAdditionalProperties, DictionaryWithReference, DictionaryWithString, DummyAData, DummyAResponse, DummyAResponses, DummyBData, DummyBResponse, DummyBResponses, DuplicateName2Data, DuplicateName3Data, DuplicateName4Data, DuplicateNameData, EnumFromDescription, EnumWithExtensions, EnumWithNumbers, EnumWithReplacedCharacters, EnumWithStrings, EnumWithXEnumNames, ExportData, ExternalRefA, ExternalRefB, ExternalSharedModel, File, FileResponseData, FileResponseResponse, FileResponseResponses, FileWritable, FooWowData, FooWowResponses, FreeFormObjectWithAdditionalPropertiesEqEmptyObject, FreeFormObjectWithAdditionalPropertiesEqTrue, FreeFormObjectWithoutAdditionalProperties, GenericSchemaDuplicateIssue1SystemBoolean, GenericSchemaDuplicateIssue1SystemBooleanWritable, GenericSchemaDuplicateIssue1SystemString, GenericSchemaDuplicateIssue1SystemStringWritable, GetApiVbyApiVersionSimpleOperationData, GetApiVbyApiVersionSimpleOperationError, GetApiVbyApiVersionSimpleOperationErrors, GetApiVbyApiVersionSimpleOperationResponse, GetApiVbyApiVersionSimpleOperationResponses, GetCallWithOptionalParamData, GetCallWithoutParametersAndResponseData, HeadCallWithoutParametersAndResponseData, Import, ImportData, ImportResponse, ImportResponses, IoK8sApimachineryPkgApisMetaV1DeleteOptions, IoK8sApimachineryPkgApisMetaV1Preconditions, ModelCircle, ModelFromZendesk, ModelSquare, ModelThatExtends, ModelThatExtendsExtends, ModelWithAdditionalPropertiesEqTrue, ModelWithAdditionalPropertiesRef, ModelWithAnyOfConstantSizeArray, ModelWithAnyOfConstantSizeArrayAndIntersect, ModelWithAnyOfConstantSizeArrayNullable, ModelWithAnyOfConstantSizeArrayWithNSizeAndOptions, ModelWithAnyOfConstantSizeArrayWithNSizeAndOptionsWritable, ModelWithArray, ModelWithArrayReadOnlyAndWriteOnly, ModelWithArrayReadOnlyAndWriteOnlyWritable, ModelWithBackticksInDescription, ModelWithBoolean, ModelWithCircularReference, ModelWithConst, ModelWithConstantSizeArray, ModelWithDictionary, ModelWithDuplicateImports, ModelWithDuplicateProperties, ModelWithEnum, ModelWithEnumFromDescription, ModelWithEnumWithHyphen, ModelWithInteger, ModelWithNestedArrayEnums, ModelWithNestedArrayEnumsData, ModelWithNestedArrayEnumsDataBar, ModelWithNestedArrayEnumsDataFoo, ModelWithNestedCompositionEnums, ModelWithNestedEnums, ModelWithNestedProperties, ModelWithNullableObject, ModelWithNullableString, ModelWithNumericEnumUnion, ModelWithOneOfAndProperties, ModelWithOneOfEnum, ModelWithOrderedProperties, ModelWithPattern, ModelWithPatternWritable, ModelWithPrefixItemsConstantSizeArray, ModelWithProperties, ModelWithPropertiesWritable, ModelWithReadOnlyAndWriteOnly, ModelWithReadOnlyAndWriteOnlyWritable, ModelWithReference, ModelWithReferenceWritable, ModelWithString, ModelWithStringError, MultipartRequestData, MultipartResponseData, MultipartResponseResponse, MultipartResponseResponses, NestedAnyOfArraysNullable, NonAsciiæøåÆøÅöôêÊ字符串Data, NonAsciiæøåÆøÅöôêÊ字符串Response, NonAsciiæøåÆøÅöôêÊ字符串Responses, NonAsciiStringæøåÆøÅöôêÊ字符串, NullableObject, OneOfAllOfIssue, OneOfAllOfIssueWritable, OptionsCallWithoutParametersAndResponseData, Pageable, ParameterSimpleParameterUnused, PatchApiVbyApiVersionNoTagData, PatchApiVbyApiVersionNoTagResponses, PatchCallWithoutParametersAndResponseData, PostApiVbyApiVersionFormDataData, PostApiVbyApiVersionRequestBodyData, PostCallWithOptionalParamData, PostCallWithOptionalParamResponse, PostCallWithOptionalParamResponses, PostCallWithoutParametersAndResponseData, PostServiceWithEmptyTagResponse, PostServiceWithEmptyTagResponse2, PutCallWithoutParametersAndResponseData, PutWithFormUrlEncodedData, SchemaWithFormRestrictedKeys, SimpleBoolean, SimpleFile, SimpleFormData, SimpleInteger, SimpleParameter, SimpleReference, SimpleRequestBody, SimpleString, SimpleStringWithPattern, TestErrorCodeData, TestErrorCodeErrors, TestErrorCodeResponses, TypesData, TypesResponse, TypesResponses, UploadFileData, UploadFileResponse, UploadFileResponses, XFooBar } from './types.gen';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-fetch/sdk-client-required/sdk.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport { type Client, formDataBodySerializer, type Options as Options2, type TDataShape, urlSearchParamsBodySerializer } from './client';\nimport type { ApiVVersionODataControllerCountData, ApiVVersionODataControllerCountResponses, CallToTestOrderOfParamsData, CallWithDefaultOptionalParametersData, CallWithDefaultParametersData, CallWithDescriptionsData, CallWithDuplicateResponsesData, CallWithDuplicateResponsesErrors, CallWithDuplicateResponsesResponses, CallWithNoContentResponseData, CallWithNoContentResponseResponses, CallWithParametersData, CallWithResponseAndNoContentResponseData, CallWithResponseAndNoContentResponseResponses, CallWithResponseData, CallWithResponseResponses, CallWithResponsesData, CallWithResponsesErrors, CallWithResponsesResponses, CallWithResultFromHeaderData, CallWithResultFromHeaderErrors, CallWithResultFromHeaderResponses, CallWithWeirdParameterNamesData, CollectionFormatData, ComplexParamsData, ComplexParamsResponses, ComplexTypesData, ComplexTypesErrors, ComplexTypesResponses, DeleteCallWithoutParametersAndResponseData, DeleteFooData3, DeprecatedCallData, DummyAData, DummyAResponses, DummyBData, DummyBResponses, DuplicateName2Data, DuplicateName3Data, DuplicateName4Data, DuplicateNameData, ExportData, FileResponseData, FileResponseResponses, FooWowData, FooWowResponses, GetApiVbyApiVersionSimpleOperationData, GetApiVbyApiVersionSimpleOperationErrors, GetApiVbyApiVersionSimpleOperationResponses, GetCallWithOptionalParamData, GetCallWithoutParametersAndResponseData, HeadCallWithoutParametersAndResponseData, ImportData, ImportResponses, MultipartRequestData, MultipartResponseData, MultipartResponseResponses, NonAsciiæøåÆøÅöôêÊ字符串Data, NonAsciiæøåÆøÅöôêÊ字符串Responses, OptionsCallWithoutParametersAndResponseData, PatchApiVbyApiVersionNoTagData, PatchApiVbyApiVersionNoTagResponses, PatchCallWithoutParametersAndResponseData, PostApiVbyApiVersionFormDataData, PostApiVbyApiVersionRequestBodyData, PostCallWithOptionalParamData, PostCallWithOptionalParamResponses, PostCallWithoutParametersAndResponseData, PutCallWithoutParametersAndResponseData, PutWithFormUrlEncodedData, TestErrorCodeData, TestErrorCodeErrors, TestErrorCodeResponses, TypesData, TypesResponses, UploadFileData, UploadFileResponses } from './types.gen';\n\nexport type Options<TData extends TDataShape = TDataShape, ThrowOnError extends boolean = boolean> = Options2<TData, ThrowOnError> & {\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\nexport const export_ = <ThrowOnError extends boolean = false>(options: Options<ExportData, ThrowOnError>) => options.client.get<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/no+tag', ...options });\n\nexport const patchApiVbyApiVersionNoTag = <ThrowOnError extends boolean = false>(options: Options<PatchApiVbyApiVersionNoTagData, ThrowOnError>) => options.client.patch<PatchApiVbyApiVersionNoTagResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/no+tag', ...options });\n\nexport const import_ = <ThrowOnError extends boolean = false>(options: Options<ImportData, ThrowOnError>) => options.client.post<ImportResponses, unknown, ThrowOnError>({\n    url: '/api/v{api-version}/no+tag',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options.headers\n    }\n});\n\nexport const fooWow = <ThrowOnError extends boolean = false>(options: Options<FooWowData, ThrowOnError>) => options.client.put<FooWowResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/no+tag', ...options });\n\nexport const apiVVersionODataControllerCount = <ThrowOnError extends boolean = false>(options: Options<ApiVVersionODataControllerCountData, ThrowOnError>) => options.client.get<ApiVVersionODataControllerCountResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple/$count', ...options });\n\nexport const getApiVbyApiVersionSimpleOperation = <ThrowOnError extends boolean = false>(options: Options<GetApiVbyApiVersionSimpleOperationData, ThrowOnError>) => options.client.get<GetApiVbyApiVersionSimpleOperationResponses, GetApiVbyApiVersionSimpleOperationErrors, ThrowOnError>({ url: '/api/v{api-version}/simple:operation', ...options });\n\nexport const deleteCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options: Options<DeleteCallWithoutParametersAndResponseData, ThrowOnError>) => options.client.delete<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const getCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options: Options<GetCallWithoutParametersAndResponseData, ThrowOnError>) => options.client.get<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const headCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options: Options<HeadCallWithoutParametersAndResponseData, ThrowOnError>) => options.client.head<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const optionsCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options: Options<OptionsCallWithoutParametersAndResponseData, ThrowOnError>) => options.client.options<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const patchCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options: Options<PatchCallWithoutParametersAndResponseData, ThrowOnError>) => options.client.patch<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const postCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options: Options<PostCallWithoutParametersAndResponseData, ThrowOnError>) => options.client.post<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const putCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options: Options<PutCallWithoutParametersAndResponseData, ThrowOnError>) => options.client.put<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const deleteFoo = <ThrowOnError extends boolean = false>(options: Options<DeleteFooData3, ThrowOnError>) => options.client.delete<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/foo/{foo_param}/bar/{BarParam}', ...options });\n\nexport const callWithDescriptions = <ThrowOnError extends boolean = false>(options: Options<CallWithDescriptionsData, ThrowOnError>) => options.client.post<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/descriptions', ...options });\n\n/**\n * @deprecated\n */\nexport const deprecatedCall = <ThrowOnError extends boolean = false>(options: Options<DeprecatedCallData, ThrowOnError>) => options.client.post<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/parameters/deprecated', ...options });\n\nexport const callWithParameters = <ThrowOnError extends boolean = false>(options: Options<CallWithParametersData, ThrowOnError>) => options.client.post<unknown, unknown, ThrowOnError>({\n    url: '/api/v{api-version}/parameters/{parameterPath}',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options.headers\n    }\n});\n\nexport const callWithWeirdParameterNames = <ThrowOnError extends boolean = false>(options: Options<CallWithWeirdParameterNamesData, ThrowOnError>) => options.client.post<unknown, unknown, ThrowOnError>({\n    url: '/api/v{api-version}/parameters/{parameter.path.1}/{parameter-path-2}/{PARAMETER-PATH-3}',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options.headers\n    }\n});\n\nexport const getCallWithOptionalParam = <ThrowOnError extends boolean = false>(options: Options<GetCallWithOptionalParamData, ThrowOnError>) => options.client.get<unknown, unknown, ThrowOnError>({\n    url: '/api/v{api-version}/parameters',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options.headers\n    }\n});\n\nexport const postCallWithOptionalParam = <ThrowOnError extends boolean = false>(options: Options<PostCallWithOptionalParamData, ThrowOnError>) => options.client.post<PostCallWithOptionalParamResponses, unknown, ThrowOnError>({\n    url: '/api/v{api-version}/parameters',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options.headers\n    }\n});\n\nexport const postApiVbyApiVersionRequestBody = <ThrowOnError extends boolean = false>(options: Options<PostApiVbyApiVersionRequestBodyData, ThrowOnError>) => options.client.post<unknown, unknown, ThrowOnError>({\n    url: '/api/v{api-version}/requestBody',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options.headers\n    }\n});\n\nexport const postApiVbyApiVersionFormData = <ThrowOnError extends boolean = false>(options: Options<PostApiVbyApiVersionFormDataData, ThrowOnError>) => options.client.post<unknown, unknown, ThrowOnError>({\n    ...formDataBodySerializer,\n    url: '/api/v{api-version}/formData',\n    ...options,\n    headers: {\n        'Content-Type': null,\n        ...options.headers\n    }\n});\n\nexport const callWithDefaultParameters = <ThrowOnError extends boolean = false>(options: Options<CallWithDefaultParametersData, ThrowOnError>) => options.client.get<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/defaults', ...options });\n\nexport const callWithDefaultOptionalParameters = <ThrowOnError extends boolean = false>(options: Options<CallWithDefaultOptionalParametersData, ThrowOnError>) => options.client.post<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/defaults', ...options });\n\nexport const callToTestOrderOfParams = <ThrowOnError extends boolean = false>(options: Options<CallToTestOrderOfParamsData, ThrowOnError>) => options.client.put<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/defaults', ...options });\n\nexport const duplicateName = <ThrowOnError extends boolean = false>(options: Options<DuplicateNameData, ThrowOnError>) => options.client.delete<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/duplicate', ...options });\n\nexport const duplicateName2 = <ThrowOnError extends boolean = false>(options: Options<DuplicateName2Data, ThrowOnError>) => options.client.get<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/duplicate', ...options });\n\nexport const duplicateName3 = <ThrowOnError extends boolean = false>(options: Options<DuplicateName3Data, ThrowOnError>) => options.client.post<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/duplicate', ...options });\n\nexport const duplicateName4 = <ThrowOnError extends boolean = false>(options: Options<DuplicateName4Data, ThrowOnError>) => options.client.put<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/duplicate', ...options });\n\nexport const callWithNoContentResponse = <ThrowOnError extends boolean = false>(options: Options<CallWithNoContentResponseData, ThrowOnError>) => options.client.get<CallWithNoContentResponseResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/no-content', ...options });\n\nexport const callWithResponseAndNoContentResponse = <ThrowOnError extends boolean = false>(options: Options<CallWithResponseAndNoContentResponseData, ThrowOnError>) => options.client.get<CallWithResponseAndNoContentResponseResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/multiple-tags/response-and-no-content', ...options });\n\nexport const dummyA = <ThrowOnError extends boolean = false>(options: Options<DummyAData, ThrowOnError>) => options.client.get<DummyAResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/multiple-tags/a', ...options });\n\nexport const dummyB = <ThrowOnError extends boolean = false>(options: Options<DummyBData, ThrowOnError>) => options.client.get<DummyBResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/multiple-tags/b', ...options });\n\nexport const callWithResponse = <ThrowOnError extends boolean = false>(options: Options<CallWithResponseData, ThrowOnError>) => options.client.get<CallWithResponseResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/response', ...options });\n\nexport const callWithDuplicateResponses = <ThrowOnError extends boolean = false>(options: Options<CallWithDuplicateResponsesData, ThrowOnError>) => options.client.post<CallWithDuplicateResponsesResponses, CallWithDuplicateResponsesErrors, ThrowOnError>({ url: '/api/v{api-version}/response', ...options });\n\nexport const callWithResponses = <ThrowOnError extends boolean = false>(options: Options<CallWithResponsesData, ThrowOnError>) => options.client.put<CallWithResponsesResponses, CallWithResponsesErrors, ThrowOnError>({ url: '/api/v{api-version}/response', ...options });\n\nexport const collectionFormat = <ThrowOnError extends boolean = false>(options: Options<CollectionFormatData, ThrowOnError>) => options.client.get<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/collectionFormat', ...options });\n\nexport const types = <ThrowOnError extends boolean = false>(options: Options<TypesData, ThrowOnError>) => options.client.get<TypesResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/types', ...options });\n\nexport const uploadFile = <ThrowOnError extends boolean = false>(options: Options<UploadFileData, ThrowOnError>) => options.client.post<UploadFileResponses, unknown, ThrowOnError>({\n    ...urlSearchParamsBodySerializer,\n    url: '/api/v{api-version}/upload',\n    ...options,\n    headers: {\n        'Content-Type': 'application/x-www-form-urlencoded',\n        ...options.headers\n    }\n});\n\nexport const fileResponse = <ThrowOnError extends boolean = false>(options: Options<FileResponseData, ThrowOnError>) => options.client.get<FileResponseResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/file/{id}', ...options });\n\nexport const complexTypes = <ThrowOnError extends boolean = false>(options: Options<ComplexTypesData, ThrowOnError>) => options.client.get<ComplexTypesResponses, ComplexTypesErrors, ThrowOnError>({\n    querySerializer: { parameters: { parameterObject: { object: { style: 'form' } } } },\n    url: '/api/v{api-version}/complex',\n    ...options\n});\n\nexport const multipartResponse = <ThrowOnError extends boolean = false>(options: Options<MultipartResponseData, ThrowOnError>) => options.client.get<MultipartResponseResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/multipart', ...options });\n\nexport const multipartRequest = <ThrowOnError extends boolean = false>(options: Options<MultipartRequestData, ThrowOnError>) => options.client.post<unknown, unknown, ThrowOnError>({\n    ...formDataBodySerializer,\n    url: '/api/v{api-version}/multipart',\n    ...options,\n    headers: {\n        'Content-Type': null,\n        ...options.headers\n    }\n});\n\nexport const complexParams = <ThrowOnError extends boolean = false>(options: Options<ComplexParamsData, ThrowOnError>) => options.client.put<ComplexParamsResponses, unknown, ThrowOnError>({\n    url: '/api/v{api-version}/complex/{id}',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json-patch+json',\n        ...options.headers\n    }\n});\n\nexport const callWithResultFromHeader = <ThrowOnError extends boolean = false>(options: Options<CallWithResultFromHeaderData, ThrowOnError>) => options.client.post<CallWithResultFromHeaderResponses, CallWithResultFromHeaderErrors, ThrowOnError>({ url: '/api/v{api-version}/header', ...options });\n\nexport const testErrorCode = <ThrowOnError extends boolean = false>(options: Options<TestErrorCodeData, ThrowOnError>) => options.client.post<TestErrorCodeResponses, TestErrorCodeErrors, ThrowOnError>({ url: '/api/v{api-version}/error', ...options });\n\nexport const nonAsciiæøåÆøÅöôêÊ字符串 = <ThrowOnError extends boolean = false>(options: Options<NonAsciiæøåÆøÅöôêÊ字符串Data, ThrowOnError>) => options.client.post<NonAsciiæøåÆøÅöôêÊ字符串Responses, unknown, ThrowOnError>({ url: '/api/v{api-version}/non-ascii-æøåÆØÅöôêÊ字符串', ...options });\n\n/**\n * Login User\n */\nexport const putWithFormUrlEncoded = <ThrowOnError extends boolean = false>(options: Options<PutWithFormUrlEncodedData, ThrowOnError>) => options.client.put<unknown, unknown, ThrowOnError>({\n    ...urlSearchParamsBodySerializer,\n    url: '/api/v{api-version}/non-ascii-æøåÆØÅöôêÊ字符串',\n    ...options,\n    headers: {\n        'Content-Type': 'application/x-www-form-urlencoded',\n        ...options.headers\n    }\n});\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-fetch/sdk-client-required/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type ClientOptions = {\n    baseUrl: 'http://localhost:3000/base' | (string & {});\n};\n\n/**\n * Model with number-only name\n */\nexport type _400 = string;\n\n/**\n * External ref to shared model (A)\n */\nexport type ExternalRefA = ExternalSharedModel;\n\n/**\n * External ref to shared model (B)\n */\nexport type ExternalRefB = ExternalSharedModel;\n\n/**\n * Testing multiline comments in string: First line\n * Second line\n *\n * Fourth line\n */\nexport type CamelCaseCommentWithBreaks = number;\n\n/**\n * Testing multiline comments in string: First line\n * Second line\n *\n * Fourth line\n */\nexport type CommentWithBreaks = number;\n\n/**\n * Testing backticks in string: `backticks` and ```multiple backticks``` should work\n */\nexport type CommentWithBackticks = number;\n\n/**\n * Testing backticks and quotes in string: `backticks`, 'quotes', \"double quotes\" and ```multiple backticks``` should work\n */\nexport type CommentWithBackticksAndQuotes = number;\n\n/**\n * Testing slashes in string: \\backwards\\\\\\ and /forwards/// should work\n */\nexport type CommentWithSlashes = number;\n\n/**\n * Testing expression placeholders in string: ${expression} should work\n */\nexport type CommentWithExpressionPlaceholders = number;\n\n/**\n * Testing quotes in string: 'single quote''' and \"double quotes\"\"\" should work\n */\nexport type CommentWithQuotes = number;\n\n/**\n * Testing reserved characters in string: * inline * and ** inline ** should work\n */\nexport type CommentWithReservedCharacters = number;\n\n/**\n * This is a simple number\n */\nexport type SimpleInteger = number;\n\n/**\n * This is a simple boolean\n */\nexport type SimpleBoolean = boolean;\n\n/**\n * This is a simple string\n */\nexport type SimpleString = string;\n\n/**\n * A string with non-ascii (unicode) characters valid in typescript identifiers (æøåÆØÅöÔèÈ字符串)\n */\nexport type NonAsciiStringæøåÆøÅöôêÊ字符串 = string;\n\n/**\n * This is a simple file\n */\nexport type SimpleFile = Blob | File;\n\n/**\n * This is a simple reference\n */\nexport type SimpleReference = ModelWithString;\n\n/**\n * This is a simple string\n */\nexport type SimpleStringWithPattern = string | null;\n\n/**\n * This is a simple enum with strings\n */\nexport type EnumWithStrings = 'Success' | 'Warning' | 'Error' | '\\'Single Quote\\'' | '\"Double Quotes\"' | 'Non-ascii: øæåôöØÆÅÔÖ字符串';\n\nexport type EnumWithReplacedCharacters = '\\'Single Quote\\'' | '\"Double Quotes\"' | 'øæåôöØÆÅÔÖ字符串' | 3.1 | '';\n\n/**\n * This is a simple enum with numbers\n */\nexport type EnumWithNumbers = 1 | 2 | 3 | 1.1 | 1.2 | 1.3 | 100 | 200 | 300 | -100 | -200 | -300 | -1.1 | -1.2 | -1.3;\n\n/**\n * Success=1,Warning=2,Error=3\n */\nexport type EnumFromDescription = number;\n\n/**\n * This is a simple enum with numbers\n */\nexport type EnumWithExtensions = 200 | 400 | 500;\n\nexport type EnumWithXEnumNames = 0 | 1 | 2;\n\n/**\n * This is a simple array with numbers\n */\nexport type ArrayWithNumbers = Array<number>;\n\n/**\n * This is a simple array with booleans\n */\nexport type ArrayWithBooleans = Array<boolean>;\n\n/**\n * This is a simple array with strings\n */\nexport type ArrayWithStrings = Array<string>;\n\n/**\n * This is a simple array with references\n */\nexport type ArrayWithReferences = Array<ModelWithString>;\n\n/**\n * This is a simple array containing an array\n */\nexport type ArrayWithArray = Array<Array<ModelWithString>>;\n\n/**\n * This is a simple array with properties\n */\nexport type ArrayWithProperties = Array<{\n    '16x16'?: CamelCaseCommentWithBreaks;\n    bar?: string;\n}>;\n\n/**\n * This is a simple array with any of properties\n */\nexport type ArrayWithAnyOfProperties = Array<{\n    foo?: string;\n} | {\n    bar?: string;\n}>;\n\nexport type AnyOfAnyAndNull = {\n    data?: unknown | null;\n};\n\n/**\n * This is a simple array with any of properties\n */\nexport type AnyOfArrays = {\n    results?: Array<{\n        foo?: string;\n    } | {\n        bar?: string;\n    }>;\n};\n\n/**\n * This is a string dictionary\n */\nexport type DictionaryWithString = {\n    [key: string]: string;\n};\n\nexport type DictionaryWithPropertiesAndAdditionalProperties = {\n    foo?: number;\n    bar?: boolean;\n    [key: string]: string | number | boolean | undefined;\n};\n\n/**\n * This is a string reference\n */\nexport type DictionaryWithReference = {\n    [key: string]: ModelWithString;\n};\n\n/**\n * This is a complex dictionary\n */\nexport type DictionaryWithArray = {\n    [key: string]: Array<ModelWithString>;\n};\n\n/**\n * This is a string dictionary\n */\nexport type DictionaryWithDictionary = {\n    [key: string]: {\n        [key: string]: string;\n    };\n};\n\n/**\n * This is a complex dictionary\n */\nexport type DictionaryWithProperties = {\n    [key: string]: {\n        foo?: string;\n        bar?: string;\n    };\n};\n\n/**\n * This is a model with one number property\n */\nexport type ModelWithInteger = {\n    /**\n     * This is a simple number property\n     */\n    prop?: number;\n};\n\n/**\n * This is a model with one boolean property\n */\nexport type ModelWithBoolean = {\n    /**\n     * This is a simple boolean property\n     */\n    prop?: boolean;\n};\n\n/**\n * This is a model with one string property\n */\nexport type ModelWithString = {\n    /**\n     * This is a simple string property\n     */\n    prop?: string;\n};\n\n/**\n * This is a model with one string property\n */\nexport type ModelWithStringError = {\n    /**\n     * This is a simple string property\n     */\n    prop?: string;\n};\n\n/**\n * `Comment` or `VoiceComment`. The JSON object for adding voice comments to tickets is different. See [Adding voice comments to tickets](/documentation/ticketing/managing-tickets/adding-voice-comments-to-tickets)\n */\nexport type ModelFromZendesk = string;\n\n/**\n * This is a model with one string property\n */\nexport type ModelWithNullableString = {\n    /**\n     * This is a simple string property\n     */\n    nullableProp1?: string | null;\n    /**\n     * This is a simple string property\n     */\n    nullableRequiredProp1: string | null;\n    /**\n     * This is a simple string property\n     */\n    nullableProp2?: string | null;\n    /**\n     * This is a simple string property\n     */\n    nullableRequiredProp2: string | null;\n    /**\n     * This is a simple enum with strings\n     */\n    'foo_bar-enum'?: 'Success' | 'Warning' | 'Error' | 'ØÆÅ字符串';\n};\n\n/**\n * This is a model with one enum\n */\nexport type ModelWithEnum = {\n    /**\n     * This is a simple enum with strings\n     */\n    'foo_bar-enum'?: 'Success' | 'Warning' | 'Error' | 'ØÆÅ字符串';\n    /**\n     * These are the HTTP error code enums\n     */\n    statusCode?: '100' | '200 FOO' | '300 FOO_BAR' | '400 foo-bar' | '500 foo.bar' | '600 foo&bar';\n    /**\n     * Simple boolean enum\n     */\n    bool?: true;\n};\n\n/**\n * This is a model with one enum with escaped name\n */\nexport type ModelWithEnumWithHyphen = {\n    /**\n     * Foo-Bar-Baz-Qux\n     */\n    'foo-bar-baz-qux'?: '3.0';\n};\n\n/**\n * This is a model with one enum\n */\nexport type ModelWithEnumFromDescription = {\n    /**\n     * Success=1,Warning=2,Error=3\n     */\n    test?: number;\n};\n\n/**\n * This is a model with nested enums\n */\nexport type ModelWithNestedEnums = {\n    dictionaryWithEnum?: {\n        [key: string]: 'Success' | 'Warning' | 'Error';\n    };\n    dictionaryWithEnumFromDescription?: {\n        [key: string]: number;\n    };\n    arrayWithEnum?: Array<'Success' | 'Warning' | 'Error'>;\n    arrayWithDescription?: Array<number>;\n    /**\n     * This is a simple enum with strings\n     */\n    'foo_bar-enum'?: 'Success' | 'Warning' | 'Error' | 'ØÆÅ字符串';\n};\n\n/**\n * This is a model with one property containing a reference\n */\nexport type ModelWithReference = {\n    prop?: ModelWithProperties;\n};\n\n/**\n * This is a model with one property containing an array\n */\nexport type ModelWithArrayReadOnlyAndWriteOnly = {\n    prop?: Array<ModelWithReadOnlyAndWriteOnly>;\n    propWithFile?: Array<Blob | File>;\n    propWithNumber?: Array<number>;\n};\n\n/**\n * This is a model with one property containing an array\n */\nexport type ModelWithArray = {\n    prop?: Array<ModelWithString>;\n    propWithFile?: Array<Blob | File>;\n    propWithNumber?: Array<number>;\n};\n\n/**\n * This is a model with one property containing a dictionary\n */\nexport type ModelWithDictionary = {\n    prop?: {\n        [key: string]: string;\n    };\n};\n\n/**\n * This is a deprecated model with a deprecated property\n *\n * @deprecated\n */\nexport type DeprecatedModel = {\n    /**\n     * This is a deprecated property\n     *\n     * @deprecated\n     */\n    prop?: string;\n};\n\n/**\n * This is a model with one property containing a circular reference\n */\nexport type ModelWithCircularReference = {\n    prop?: ModelWithCircularReference;\n};\n\n/**\n * This is a model with one property with a 'one of' relationship\n */\nexport type CompositionWithOneOf = {\n    propA?: ModelWithString | ModelWithEnum | ModelWithArray | ModelWithDictionary;\n};\n\n/**\n * This is a model with one property with a 'one of' relationship where the options are not $ref\n */\nexport type CompositionWithOneOfAnonymous = {\n    propA?: {\n        propA?: string;\n    } | string | number;\n};\n\n/**\n * Circle\n */\nexport type ModelCircle = {\n    kind: string;\n    radius?: number;\n};\n\n/**\n * Square\n */\nexport type ModelSquare = {\n    kind: string;\n    sideLength?: number;\n};\n\n/**\n * This is a model with one property with a 'one of' relationship where the options are not $ref\n */\nexport type CompositionWithOneOfDiscriminator = ({\n    kind: 'circle';\n} & ModelCircle) | ({\n    kind: 'square';\n} & ModelSquare);\n\n/**\n * This is a model with one property with a 'any of' relationship\n */\nexport type CompositionWithAnyOf = {\n    propA?: ModelWithString | ModelWithEnum | ModelWithArray | ModelWithDictionary;\n};\n\n/**\n * This is a model with one property with a 'any of' relationship where the options are not $ref\n */\nexport type CompositionWithAnyOfAnonymous = {\n    propA?: {\n        propA?: string;\n    } | string | number;\n};\n\n/**\n * This is a model with nested 'any of' property with a type null\n */\nexport type CompositionWithNestedAnyAndTypeNull = {\n    propA?: Array<ModelWithDictionary | null> | Array<ModelWithArray | null>;\n};\n\nexport type _3eNum1Период = 'Bird' | 'Dog';\n\nexport type ConstValue = 'ConstValue';\n\n/**\n * This is a model with one property with a 'any of' relationship where the options are not $ref\n */\nexport type CompositionWithNestedAnyOfAndNull = {\n    /**\n     * Scopes\n     */\n    propA?: Array<_3eNum1Период | ConstValue> | null;\n};\n\n/**\n * This is a model with one property with a 'one of' relationship\n */\nexport type CompositionWithOneOfAndNullable = {\n    propA?: {\n        boolean?: boolean;\n    } | ModelWithEnum | ModelWithArray | ModelWithDictionary | null;\n};\n\n/**\n * This is a model that contains a simple dictionary within composition\n */\nexport type CompositionWithOneOfAndSimpleDictionary = {\n    propA?: boolean | {\n        [key: string]: number;\n    };\n};\n\n/**\n * This is a model that contains a dictionary of simple arrays within composition\n */\nexport type CompositionWithOneOfAndSimpleArrayDictionary = {\n    propA?: boolean | {\n        [key: string]: Array<boolean>;\n    };\n};\n\n/**\n * This is a model that contains a dictionary of complex arrays (composited) within composition\n */\nexport type CompositionWithOneOfAndComplexArrayDictionary = {\n    propA?: boolean | {\n        [key: string]: Array<number | string>;\n    };\n};\n\n/**\n * This is a model with one property with a 'all of' relationship\n */\nexport type CompositionWithAllOfAndNullable = {\n    propA?: ({\n        boolean?: boolean;\n    } & ModelWithEnum & ModelWithArray & ModelWithDictionary) | null;\n};\n\n/**\n * This is a model with one property with a 'any of' relationship\n */\nexport type CompositionWithAnyOfAndNullable = {\n    propA?: {\n        boolean?: boolean;\n    } | ModelWithEnum | ModelWithArray | ModelWithDictionary | null;\n};\n\n/**\n * This is a base model with two simple optional properties\n */\nexport type CompositionBaseModel = {\n    firstName?: string;\n    lastname?: string;\n};\n\n/**\n * This is a model that extends the base model\n */\nexport type CompositionExtendedModel = CompositionBaseModel & {\n    age: number;\n    firstName: string;\n    lastname: string;\n};\n\n/**\n * This is a model with one nested property\n */\nexport type ModelWithProperties = {\n    required: string;\n    readonly requiredAndReadOnly: string;\n    requiredAndNullable: string | null;\n    string?: string;\n    number?: number;\n    boolean?: boolean;\n    reference?: ModelWithString;\n    'property with space'?: string;\n    default?: string;\n    try?: string;\n    readonly '@namespace.string'?: string;\n    readonly '@namespace.integer'?: number;\n};\n\n/**\n * This is a model with one nested property\n */\nexport type ModelWithNestedProperties = {\n    readonly first: {\n        readonly second: {\n            readonly third: string | null;\n        } | null;\n    } | null;\n};\n\n/**\n * This is a model with duplicated properties\n */\nexport type ModelWithDuplicateProperties = {\n    prop?: ModelWithString;\n};\n\n/**\n * This is a model with ordered properties\n */\nexport type ModelWithOrderedProperties = {\n    zebra?: string;\n    apple?: string;\n    hawaii?: string;\n};\n\n/**\n * This is a model with duplicated imports\n */\nexport type ModelWithDuplicateImports = {\n    propA?: ModelWithString;\n    propB?: ModelWithString;\n    propC?: ModelWithString;\n};\n\n/**\n * This is a model that extends another model\n */\nexport type ModelThatExtends = ModelWithString & {\n    propExtendsA?: string;\n    propExtendsB?: ModelWithString;\n};\n\n/**\n * This is a model that extends another model\n */\nexport type ModelThatExtendsExtends = ModelWithString & ModelThatExtends & {\n    propExtendsC?: string;\n    propExtendsD?: ModelWithString;\n};\n\n/**\n * This is a model that contains a some patterns\n */\nexport type ModelWithPattern = {\n    key: string;\n    name: string;\n    readonly enabled?: boolean;\n    readonly modified?: string;\n    id?: string;\n    text?: string;\n    patternWithSingleQuotes?: string;\n    patternWithNewline?: string;\n    patternWithBacktick?: string;\n    patternWithUnicode?: string;\n};\n\nexport type File = {\n    /**\n     * Id\n     */\n    readonly id?: string;\n    /**\n     * Updated at\n     */\n    readonly updated_at?: string;\n    /**\n     * Created at\n     */\n    readonly created_at?: string;\n    /**\n     * Mime\n     */\n    mime: string;\n    /**\n     * File\n     */\n    readonly file?: string;\n};\n\nexport type Default = {\n    name?: string;\n};\n\nexport type Pageable = {\n    page?: number;\n    size?: number;\n    sort?: Array<string>;\n};\n\n/**\n * This is a free-form object without additionalProperties.\n */\nexport type FreeFormObjectWithoutAdditionalProperties = {\n    [key: string]: unknown;\n};\n\n/**\n * This is a free-form object with additionalProperties: true.\n */\nexport type FreeFormObjectWithAdditionalPropertiesEqTrue = {\n    [key: string]: unknown;\n};\n\n/**\n * This is a free-form object with additionalProperties: {}.\n */\nexport type FreeFormObjectWithAdditionalPropertiesEqEmptyObject = {\n    [key: string]: unknown;\n};\n\nexport type ModelWithConst = {\n    String?: 'String';\n    number?: 0;\n    null?: null;\n    withType?: 'Some string';\n};\n\n/**\n * This is a model with one property and additionalProperties: true\n */\nexport type ModelWithAdditionalPropertiesEqTrue = {\n    /**\n     * This is a simple string property\n     */\n    prop?: string;\n    [key: string]: unknown;\n};\n\nexport type NestedAnyOfArraysNullable = {\n    nullableArray?: Array<string | boolean> | null;\n};\n\nexport type CompositionWithOneOfAndProperties = ({\n    foo: SimpleParameter;\n} | {\n    bar: NonAsciiStringæøåÆøÅöôêÊ字符串;\n}) & {\n    baz: number | null;\n    qux: number;\n};\n\n/**\n * An object that can be null\n */\nexport type NullableObject = {\n    foo?: string;\n} | null;\n\n/**\n * Some % character\n */\nexport type CharactersInDescription = string;\n\nexport type ModelWithNullableObject = {\n    data?: NullableObject;\n};\n\n/**\n * An object with additional properties that can be null (anyOf ref + null)\n */\nexport type ModelWithAdditionalPropertiesRef = {\n    [key: string]: NullableObject | null;\n};\n\nexport type ModelWithOneOfEnum = {\n    foo: 'Bar';\n} | {\n    foo: 'Baz';\n} | {\n    foo: 'Qux';\n} | {\n    content: string;\n    foo: 'Quux';\n} | {\n    content: [\n        string,\n        string\n    ];\n    foo: 'Corge';\n};\n\nexport type ModelWithNestedArrayEnumsDataFoo = 'foo' | 'bar';\n\nexport type ModelWithNestedArrayEnumsDataBar = 'baz' | 'qux';\n\nexport type ModelWithNestedArrayEnumsData = {\n    foo?: Array<ModelWithNestedArrayEnumsDataFoo>;\n    bar?: Array<ModelWithNestedArrayEnumsDataBar>;\n};\n\nexport type ModelWithNestedArrayEnums = {\n    array_strings?: Array<string>;\n    data?: ModelWithNestedArrayEnumsData;\n};\n\nexport type ModelWithNestedCompositionEnums = {\n    foo?: ModelWithNestedArrayEnumsDataFoo;\n};\n\nexport type ModelWithReadOnlyAndWriteOnly = {\n    foo: string;\n    readonly bar: string;\n};\n\nexport type ModelWithConstantSizeArray = [\n    number,\n    number\n];\n\nexport type ModelWithAnyOfConstantSizeArray = [\n    number | string,\n    number | string,\n    number | string\n];\n\nexport type ModelWithPrefixItemsConstantSizeArray = [\n    ModelWithInteger,\n    number | string,\n    string\n];\n\nexport type ModelWithAnyOfConstantSizeArrayNullable = [\n    number | null | string,\n    number | null | string,\n    number | null | string\n];\n\nexport type ModelWithAnyOfConstantSizeArrayWithNSizeAndOptions = [\n    number | Import,\n    number | Import\n];\n\nexport type ModelWithAnyOfConstantSizeArrayAndIntersect = [\n    number & string,\n    number & string\n];\n\nexport type ModelWithNumericEnumUnion = {\n    /**\n     * Период\n     */\n    value?: -10 | -1 | 0 | 1 | 3 | 6 | 12;\n};\n\n/**\n * Some description with `back ticks`\n */\nexport type ModelWithBackticksInDescription = {\n    /**\n     * The template `that` should be used for parsing and importing the contents of the CSV file.\n     *\n     * <br/><p>There is one placeholder currently supported:<ul>     <li><b>${x}</b> - refers to the n-th column in the CSV file, e.g. ${1}, ${2}, ...)</li></ul><p>Example of a correct JSON template:</p>\n     * <pre>\n     * [\n     * {\n     * \"resourceType\": \"Asset\",\n     * \"identifier\": {\n     * \"name\": \"${1}\",\n     * \"domain\": {\n     * \"name\": \"${2}\",\n     * \"community\": {\n     * \"name\": \"Some Community\"\n     * }\n     * }\n     * },\n     * \"attributes\" : {\n     * \"00000000-0000-0000-0000-000000003115\" : [ {\n     * \"value\" : \"${3}\"\n     * } ],\n     * \"00000000-0000-0000-0000-000000000222\" : [ {\n     * \"value\" : \"${4}\"\n     * } ]\n     * }\n     * }\n     * ]\n     * </pre>\n     */\n    template?: string;\n};\n\nexport type ModelWithOneOfAndProperties = (SimpleParameter | NonAsciiStringæøåÆøÅöôêÊ字符串) & {\n    baz: number | null;\n    qux: number;\n};\n\n/**\n * Model used to test deduplication strategy (unused)\n */\nexport type ParameterSimpleParameterUnused = string;\n\n/**\n * Model used to test deduplication strategy\n */\nexport type PostServiceWithEmptyTagResponse = string;\n\n/**\n * Model used to test deduplication strategy\n */\nexport type PostServiceWithEmptyTagResponse2 = string;\n\n/**\n * Model used to test deduplication strategy\n */\nexport type DeleteFooData = string;\n\n/**\n * Model used to test deduplication strategy\n */\nexport type DeleteFooData2 = string;\n\n/**\n * Model with restricted keyword name\n */\nexport type Import = string;\n\nexport type SchemaWithFormRestrictedKeys = {\n    description?: string;\n    'x-enum-descriptions'?: string;\n    'x-enum-varnames'?: string;\n    'x-enumNames'?: string;\n    title?: string;\n    object?: {\n        description?: string;\n        'x-enum-descriptions'?: string;\n        'x-enum-varnames'?: string;\n        'x-enumNames'?: string;\n        title?: string;\n    };\n    array?: Array<{\n        description?: string;\n        'x-enum-descriptions'?: string;\n        'x-enum-varnames'?: string;\n        'x-enumNames'?: string;\n        title?: string;\n    }>;\n};\n\n/**\n * This schema was giving PascalCase transformations a hard time\n */\nexport type IoK8sApimachineryPkgApisMetaV1DeleteOptions = {\n    /**\n     * Must be fulfilled before a deletion is carried out. If not possible, a 409 Conflict status will be returned.\n     */\n    preconditions?: IoK8sApimachineryPkgApisMetaV1Preconditions;\n};\n\n/**\n * This schema was giving PascalCase transformations a hard time\n */\nexport type IoK8sApimachineryPkgApisMetaV1Preconditions = {\n    /**\n     * Specifies the target ResourceVersion\n     */\n    resourceVersion?: string;\n    /**\n     * Specifies the target UID.\n     */\n    uid?: string;\n};\n\nexport type AdditionalPropertiesUnknownIssue = {\n    [key: string]: string | number;\n};\n\nexport type AdditionalPropertiesUnknownIssue2 = {\n    [key: string]: string | number;\n};\n\nexport type AdditionalPropertiesUnknownIssue3 = string & {\n    entries: {\n        [key: string]: AdditionalPropertiesUnknownIssue;\n    };\n};\n\nexport type AdditionalPropertiesIntegerIssue = {\n    value: number;\n    [key: string]: number;\n};\n\nexport type OneOfAllOfIssue = ((ConstValue | GenericSchemaDuplicateIssue1SystemBoolean) & _3eNum1Период) | GenericSchemaDuplicateIssue1SystemString;\n\nexport type GenericSchemaDuplicateIssue1SystemBoolean = {\n    item?: boolean;\n    error?: string | null;\n    readonly hasError?: boolean;\n    data?: {\n        [key: string]: never;\n    };\n};\n\nexport type GenericSchemaDuplicateIssue1SystemString = {\n    item?: string | null;\n    error?: string | null;\n    readonly hasError?: boolean;\n};\n\nexport type ExternalSharedModel = {\n    id: string;\n    name?: string;\n};\n\n/**\n * This is a model with one property containing a reference\n */\nexport type ModelWithReferenceWritable = {\n    prop?: ModelWithPropertiesWritable;\n};\n\n/**\n * This is a model with one property containing an array\n */\nexport type ModelWithArrayReadOnlyAndWriteOnlyWritable = {\n    prop?: Array<ModelWithReadOnlyAndWriteOnlyWritable>;\n    propWithFile?: Array<Blob | File>;\n    propWithNumber?: Array<number>;\n};\n\n/**\n * This is a model with one nested property\n */\nexport type ModelWithPropertiesWritable = {\n    required: string;\n    requiredAndNullable: string | null;\n    string?: string;\n    number?: number;\n    boolean?: boolean;\n    reference?: ModelWithString;\n    'property with space'?: string;\n    default?: string;\n    try?: string;\n};\n\n/**\n * This is a model that contains a some patterns\n */\nexport type ModelWithPatternWritable = {\n    key: string;\n    name: string;\n    id?: string;\n    text?: string;\n    patternWithSingleQuotes?: string;\n    patternWithNewline?: string;\n    patternWithBacktick?: string;\n    patternWithUnicode?: string;\n};\n\nexport type FileWritable = {\n    /**\n     * Mime\n     */\n    mime: string;\n};\n\nexport type ModelWithReadOnlyAndWriteOnlyWritable = {\n    foo: string;\n    baz: string;\n};\n\nexport type ModelWithAnyOfConstantSizeArrayWithNSizeAndOptionsWritable = [\n    number | Import,\n    number | Import\n];\n\nexport type AdditionalPropertiesUnknownIssueWritable = {\n    [key: string]: string | number;\n};\n\nexport type OneOfAllOfIssueWritable = ((ConstValue | GenericSchemaDuplicateIssue1SystemBoolean) & _3eNum1Период) | GenericSchemaDuplicateIssue1SystemString;\n\nexport type GenericSchemaDuplicateIssue1SystemBooleanWritable = {\n    item?: boolean;\n    error?: string | null;\n    data?: {\n        [key: string]: never;\n    };\n};\n\nexport type GenericSchemaDuplicateIssue1SystemStringWritable = {\n    item?: string | null;\n    error?: string | null;\n};\n\n/**\n * This is a reusable parameter\n */\nexport type SimpleParameter = string;\n\n/**\n * Parameter with illegal characters\n */\nexport type XFooBar = ModelWithString;\n\n/**\n * A reusable request body\n */\nexport type SimpleRequestBody = ModelWithString;\n\n/**\n * A reusable request body\n */\nexport type SimpleFormData = ModelWithString;\n\nexport type ExportData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no+tag';\n};\n\nexport type PatchApiVbyApiVersionNoTagData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no+tag';\n};\n\nexport type PatchApiVbyApiVersionNoTagResponses = {\n    /**\n     * OK\n     */\n    default: unknown;\n};\n\nexport type ImportData = {\n    body: ModelWithReadOnlyAndWriteOnlyWritable | ModelWithArrayReadOnlyAndWriteOnlyWritable;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no+tag';\n};\n\nexport type ImportResponses = {\n    /**\n     * Success\n     */\n    200: ModelFromZendesk;\n    /**\n     * Default success response\n     */\n    default: ModelWithReadOnlyAndWriteOnly;\n};\n\nexport type ImportResponse = ImportResponses[keyof ImportResponses];\n\nexport type FooWowData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no+tag';\n};\n\nexport type FooWowResponses = {\n    /**\n     * OK\n     */\n    default: unknown;\n};\n\nexport type ApiVVersionODataControllerCountData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple/$count';\n};\n\nexport type ApiVVersionODataControllerCountResponses = {\n    /**\n     * Success\n     */\n    200: ModelFromZendesk;\n};\n\nexport type ApiVVersionODataControllerCountResponse = ApiVVersionODataControllerCountResponses[keyof ApiVVersionODataControllerCountResponses];\n\nexport type GetApiVbyApiVersionSimpleOperationData = {\n    body?: never;\n    path: {\n        /**\n         * foo in method\n         */\n        foo_param: string;\n    };\n    query?: never;\n    url: '/api/v{api-version}/simple:operation';\n};\n\nexport type GetApiVbyApiVersionSimpleOperationErrors = {\n    /**\n     * Default error response\n     */\n    default: ModelWithBoolean;\n};\n\nexport type GetApiVbyApiVersionSimpleOperationError = GetApiVbyApiVersionSimpleOperationErrors[keyof GetApiVbyApiVersionSimpleOperationErrors];\n\nexport type GetApiVbyApiVersionSimpleOperationResponses = {\n    /**\n     * Response is a simple number\n     */\n    200: number;\n};\n\nexport type GetApiVbyApiVersionSimpleOperationResponse = GetApiVbyApiVersionSimpleOperationResponses[keyof GetApiVbyApiVersionSimpleOperationResponses];\n\nexport type DeleteCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type GetCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type HeadCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type OptionsCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type PatchCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type PostCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type PutCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type DeleteFooData3 = {\n    body?: never;\n    headers: {\n        /**\n         * Parameter with illegal characters\n         */\n        'x-Foo-Bar': ModelWithString;\n    };\n    path: {\n        /**\n         * foo in method\n         */\n        foo_param: string;\n        /**\n         * bar in method\n         */\n        BarParam: string;\n    };\n    query?: never;\n    url: '/api/v{api-version}/foo/{foo_param}/bar/{BarParam}';\n};\n\nexport type CallWithDescriptionsData = {\n    body?: never;\n    path?: never;\n    query?: {\n        /**\n         * Testing multiline comments in string: First line\n         * Second line\n         *\n         * Fourth line\n         */\n        parameterWithBreaks?: string;\n        /**\n         * Testing backticks in string: `backticks` and ```multiple backticks``` should work\n         */\n        parameterWithBackticks?: string;\n        /**\n         * Testing slashes in string: \\backwards\\\\\\ and /forwards/// should work\n         */\n        parameterWithSlashes?: string;\n        /**\n         * Testing expression placeholders in string: ${expression} should work\n         */\n        parameterWithExpressionPlaceholders?: string;\n        /**\n         * Testing quotes in string: 'single quote''' and \"double quotes\"\"\" should work\n         */\n        parameterWithQuotes?: string;\n        /**\n         * Testing reserved characters in string: * inline * and ** inline ** should work\n         */\n        parameterWithReservedCharacters?: string;\n    };\n    url: '/api/v{api-version}/descriptions';\n};\n\nexport type DeprecatedCallData = {\n    body?: never;\n    headers: {\n        /**\n         * This parameter is deprecated\n         *\n         * @deprecated\n         */\n        parameter: DeprecatedModel | null;\n    };\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/parameters/deprecated';\n};\n\nexport type CallWithParametersData = {\n    /**\n     * This is the parameter that goes into the body\n     */\n    body: {\n        [key: string]: unknown;\n    } | null;\n    headers: {\n        /**\n         * This is the parameter that goes into the header\n         */\n        parameterHeader: string | null;\n    };\n    path: {\n        /**\n         * This is the parameter that goes into the path\n         */\n        parameterPath: string | null;\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string | null;\n    };\n    query: {\n        foo_ref_enum?: ModelWithNestedArrayEnumsDataFoo;\n        foo_all_of_enum: ModelWithNestedArrayEnumsDataFoo;\n        /**\n         * This is the parameter that goes into the query params\n         */\n        cursor: string | null;\n    };\n    url: '/api/v{api-version}/parameters/{parameterPath}';\n};\n\nexport type CallWithWeirdParameterNamesData = {\n    /**\n     * This is the parameter that goes into the body\n     */\n    body: ModelWithString | null;\n    headers: {\n        /**\n         * This is the parameter that goes into the request header\n         */\n        'parameter.header': string | null;\n    };\n    path: {\n        /**\n         * This is the parameter that goes into the path\n         */\n        'parameter.path.1'?: string;\n        /**\n         * This is the parameter that goes into the path\n         */\n        'parameter-path-2'?: string;\n        /**\n         * This is the parameter that goes into the path\n         */\n        'PARAMETER-PATH-3'?: string;\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string | null;\n    };\n    query: {\n        /**\n         * This is the parameter with a reserved keyword\n         */\n        default?: string;\n        /**\n         * This is the parameter that goes into the request query params\n         */\n        'parameter-query': string | null;\n    };\n    url: '/api/v{api-version}/parameters/{parameter.path.1}/{parameter-path-2}/{PARAMETER-PATH-3}';\n};\n\nexport type GetCallWithOptionalParamData = {\n    /**\n     * This is a required parameter\n     */\n    body: ModelWithOneOfEnum;\n    path?: never;\n    query?: {\n        /**\n         * This is an optional parameter\n         */\n        page?: number;\n    };\n    url: '/api/v{api-version}/parameters';\n};\n\nexport type PostCallWithOptionalParamData = {\n    /**\n     * This is an optional parameter\n     */\n    body?: {\n        offset?: number | null;\n    };\n    path?: never;\n    query: {\n        /**\n         * This is a required parameter\n         */\n        parameter: Pageable;\n    };\n    url: '/api/v{api-version}/parameters';\n};\n\nexport type PostCallWithOptionalParamResponses = {\n    /**\n     * Response is a simple number\n     */\n    200: number;\n    /**\n     * Success\n     */\n    204: void;\n};\n\nexport type PostCallWithOptionalParamResponse = PostCallWithOptionalParamResponses[keyof PostCallWithOptionalParamResponses];\n\nexport type PostApiVbyApiVersionRequestBodyData = {\n    /**\n     * A reusable request body\n     */\n    body?: SimpleRequestBody;\n    path?: never;\n    query?: {\n        /**\n         * This is a reusable parameter\n         */\n        parameter?: string;\n    };\n    url: '/api/v{api-version}/requestBody';\n};\n\nexport type PostApiVbyApiVersionFormDataData = {\n    /**\n     * A reusable request body\n     */\n    body?: SimpleFormData;\n    path?: never;\n    query?: {\n        /**\n         * This is a reusable parameter\n         */\n        parameter?: string;\n    };\n    url: '/api/v{api-version}/formData';\n};\n\nexport type CallWithDefaultParametersData = {\n    body?: never;\n    path?: never;\n    query?: {\n        /**\n         * This is a simple string with default value\n         */\n        parameterString?: string | null;\n        /**\n         * This is a simple number with default value\n         */\n        parameterNumber?: number | null;\n        /**\n         * This is a simple boolean with default value\n         */\n        parameterBoolean?: boolean | null;\n        /**\n         * This is a simple enum with default value\n         */\n        parameterEnum?: 'Success' | 'Warning' | 'Error';\n        /**\n         * This is a simple model with default value\n         */\n        parameterModel?: ModelWithString | null;\n    };\n    url: '/api/v{api-version}/defaults';\n};\n\nexport type CallWithDefaultOptionalParametersData = {\n    body?: never;\n    path?: never;\n    query?: {\n        /**\n         * This is a simple string that is optional with default value\n         */\n        parameterString?: string;\n        /**\n         * This is a simple number that is optional with default value\n         */\n        parameterNumber?: number;\n        /**\n         * This is a simple boolean that is optional with default value\n         */\n        parameterBoolean?: boolean;\n        /**\n         * This is a simple enum that is optional with default value\n         */\n        parameterEnum?: 'Success' | 'Warning' | 'Error';\n        /**\n         * This is a simple model that is optional with default value\n         */\n        parameterModel?: ModelWithString;\n    };\n    url: '/api/v{api-version}/defaults';\n};\n\nexport type CallToTestOrderOfParamsData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * This is a optional string with default\n         */\n        parameterOptionalStringWithDefault?: string;\n        /**\n         * This is a optional string with empty default\n         */\n        parameterOptionalStringWithEmptyDefault?: string;\n        /**\n         * This is a optional string with no default\n         */\n        parameterOptionalStringWithNoDefault?: string;\n        /**\n         * This is a string with default\n         */\n        parameterStringWithDefault: string;\n        /**\n         * This is a string with empty default\n         */\n        parameterStringWithEmptyDefault: string;\n        /**\n         * This is a string with no default\n         */\n        parameterStringWithNoDefault: string;\n        /**\n         * This is a string that can be null with no default\n         */\n        parameterStringNullableWithNoDefault?: string | null;\n        /**\n         * This is a string that can be null with default\n         */\n        parameterStringNullableWithDefault?: string | null;\n    };\n    url: '/api/v{api-version}/defaults';\n};\n\nexport type DuplicateNameData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/duplicate';\n};\n\nexport type DuplicateName2Data = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/duplicate';\n};\n\nexport type DuplicateName3Data = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/duplicate';\n};\n\nexport type DuplicateName4Data = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/duplicate';\n};\n\nexport type CallWithNoContentResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no-content';\n};\n\nexport type CallWithNoContentResponseResponses = {\n    /**\n     * Success\n     */\n    204: void;\n};\n\nexport type CallWithNoContentResponseResponse = CallWithNoContentResponseResponses[keyof CallWithNoContentResponseResponses];\n\nexport type CallWithResponseAndNoContentResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multiple-tags/response-and-no-content';\n};\n\nexport type CallWithResponseAndNoContentResponseResponses = {\n    /**\n     * Response is a simple number\n     */\n    200: number;\n    /**\n     * Success\n     */\n    204: void;\n};\n\nexport type CallWithResponseAndNoContentResponseResponse = CallWithResponseAndNoContentResponseResponses[keyof CallWithResponseAndNoContentResponseResponses];\n\nexport type DummyAData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multiple-tags/a';\n};\n\nexport type DummyAResponses = {\n    200: _400;\n};\n\nexport type DummyAResponse = DummyAResponses[keyof DummyAResponses];\n\nexport type DummyBData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multiple-tags/b';\n};\n\nexport type DummyBResponses = {\n    /**\n     * Success\n     */\n    204: void;\n};\n\nexport type DummyBResponse = DummyBResponses[keyof DummyBResponses];\n\nexport type CallWithResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/response';\n};\n\nexport type CallWithResponseResponses = {\n    default: Import;\n};\n\nexport type CallWithResponseResponse = CallWithResponseResponses[keyof CallWithResponseResponses];\n\nexport type CallWithDuplicateResponsesData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/response';\n};\n\nexport type CallWithDuplicateResponsesErrors = {\n    /**\n     * Message for 500 error\n     */\n    500: ModelWithStringError;\n    /**\n     * Message for 501 error\n     */\n    501: ModelWithStringError;\n    /**\n     * Message for 502 error\n     */\n    502: ModelWithStringError;\n    /**\n     * Message for 4XX errors\n     */\n    '4XX': DictionaryWithArray;\n    /**\n     * Default error response\n     */\n    default: ModelWithBoolean;\n};\n\nexport type CallWithDuplicateResponsesError = CallWithDuplicateResponsesErrors[keyof CallWithDuplicateResponsesErrors];\n\nexport type CallWithDuplicateResponsesResponses = {\n    /**\n     * Message for 200 response\n     */\n    200: ModelWithBoolean & ModelWithInteger;\n    /**\n     * Message for 201 response\n     */\n    201: ModelWithString;\n    /**\n     * Message for 202 response\n     */\n    202: ModelWithString;\n};\n\nexport type CallWithDuplicateResponsesResponse = CallWithDuplicateResponsesResponses[keyof CallWithDuplicateResponsesResponses];\n\nexport type CallWithResponsesData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/response';\n};\n\nexport type CallWithResponsesErrors = {\n    /**\n     * Message for 500 error\n     */\n    500: ModelWithStringError;\n    /**\n     * Message for 501 error\n     */\n    501: ModelWithStringError;\n    /**\n     * Message for 502 error\n     */\n    502: ModelWithStringError;\n    /**\n     * Message for default response\n     */\n    default: ModelWithStringError;\n};\n\nexport type CallWithResponsesError = CallWithResponsesErrors[keyof CallWithResponsesErrors];\n\nexport type CallWithResponsesResponses = {\n    /**\n     * Message for 200 response\n     */\n    200: {\n        readonly '@namespace.string'?: string;\n        readonly '@namespace.integer'?: number;\n        readonly value?: Array<ModelWithString>;\n    };\n    /**\n     * Message for 201 response\n     */\n    201: ModelThatExtends;\n    /**\n     * Message for 202 response\n     */\n    202: ModelThatExtendsExtends;\n};\n\nexport type CallWithResponsesResponse = CallWithResponsesResponses[keyof CallWithResponsesResponses];\n\nexport type CollectionFormatData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * This is an array parameter that is sent as csv format (comma-separated values)\n         */\n        parameterArrayCSV: Array<string> | null;\n        /**\n         * This is an array parameter that is sent as ssv format (space-separated values)\n         */\n        parameterArraySSV: Array<string> | null;\n        /**\n         * This is an array parameter that is sent as tsv format (tab-separated values)\n         */\n        parameterArrayTSV: Array<string> | null;\n        /**\n         * This is an array parameter that is sent as pipes format (pipe-separated values)\n         */\n        parameterArrayPipes: Array<string> | null;\n        /**\n         * This is an array parameter that is sent as multi format (multiple parameter instances)\n         */\n        parameterArrayMulti: Array<string> | null;\n    };\n    url: '/api/v{api-version}/collectionFormat';\n};\n\nexport type TypesData = {\n    body?: never;\n    path?: {\n        /**\n         * This is a number parameter\n         */\n        id?: number;\n    };\n    query: {\n        /**\n         * This is a number parameter\n         */\n        parameterNumber: number;\n        /**\n         * This is a string parameter\n         */\n        parameterString: string | null;\n        /**\n         * This is a boolean parameter\n         */\n        parameterBoolean: boolean | null;\n        /**\n         * This is an object parameter\n         */\n        parameterObject: {\n            [key: string]: unknown;\n        } | null;\n        /**\n         * This is an array parameter\n         */\n        parameterArray: Array<string> | null;\n        /**\n         * This is a dictionary parameter\n         */\n        parameterDictionary: {\n            [key: string]: unknown;\n        } | null;\n        /**\n         * This is an enum parameter\n         */\n        parameterEnum: 'Success' | 'Warning' | 'Error' | null;\n    };\n    url: '/api/v{api-version}/types';\n};\n\nexport type TypesResponses = {\n    /**\n     * Response is a simple number\n     */\n    200: number;\n    /**\n     * Response is a simple string\n     */\n    201: string;\n    /**\n     * Response is a simple boolean\n     */\n    202: boolean;\n    /**\n     * Response is a simple object\n     */\n    203: {\n        [key: string]: unknown;\n    };\n};\n\nexport type TypesResponse = TypesResponses[keyof TypesResponses];\n\nexport type UploadFileData = {\n    body: Blob | File;\n    path: {\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string | null;\n    };\n    query?: never;\n    url: '/api/v{api-version}/upload';\n};\n\nexport type UploadFileResponses = {\n    200: boolean;\n};\n\nexport type UploadFileResponse = UploadFileResponses[keyof UploadFileResponses];\n\nexport type FileResponseData = {\n    body?: never;\n    path: {\n        id: string;\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string;\n    };\n    query?: never;\n    url: '/api/v{api-version}/file/{id}';\n};\n\nexport type FileResponseResponses = {\n    /**\n     * Success\n     */\n    200: Blob | File;\n};\n\nexport type FileResponseResponse = FileResponseResponses[keyof FileResponseResponses];\n\nexport type ComplexTypesData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * Parameter containing object\n         */\n        parameterObject: {\n            first?: {\n                second?: {\n                    third?: string;\n                };\n            };\n        };\n        /**\n         * Parameter containing reference\n         */\n        parameterReference: ModelWithString;\n    };\n    url: '/api/v{api-version}/complex';\n};\n\nexport type ComplexTypesErrors = {\n    /**\n     * 400 `server` error\n     */\n    400: unknown;\n    /**\n     * 500 server error\n     */\n    500: unknown;\n};\n\nexport type ComplexTypesResponses = {\n    /**\n     * Successful response\n     */\n    200: Array<ModelWithString>;\n};\n\nexport type ComplexTypesResponse = ComplexTypesResponses[keyof ComplexTypesResponses];\n\nexport type MultipartResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multipart';\n};\n\nexport type MultipartResponseResponses = {\n    /**\n     * OK\n     */\n    200: {\n        file?: Blob | File;\n        metadata?: {\n            foo?: string;\n            bar?: string;\n        };\n    };\n};\n\nexport type MultipartResponseResponse = MultipartResponseResponses[keyof MultipartResponseResponses];\n\nexport type MultipartRequestData = {\n    body?: {\n        content?: Blob | File;\n        data?: ModelWithString | null;\n    };\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multipart';\n};\n\nexport type ComplexParamsData = {\n    body?: {\n        readonly key: string | null;\n        name: string | null;\n        enabled?: boolean;\n        type: 'Monkey' | 'Horse' | 'Bird';\n        listOfModels?: Array<ModelWithString> | null;\n        listOfStrings?: Array<string> | null;\n        parameters: ModelWithString | ModelWithEnum | ModelWithArray | ModelWithDictionary;\n        readonly user?: {\n            readonly id?: number;\n            readonly name?: string | null;\n        };\n    };\n    path: {\n        id: number;\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string;\n    };\n    query?: never;\n    url: '/api/v{api-version}/complex/{id}';\n};\n\nexport type ComplexParamsResponses = {\n    /**\n     * Success\n     */\n    200: ModelWithString;\n};\n\nexport type ComplexParamsResponse = ComplexParamsResponses[keyof ComplexParamsResponses];\n\nexport type CallWithResultFromHeaderData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/header';\n};\n\nexport type CallWithResultFromHeaderErrors = {\n    /**\n     * 400 server error\n     */\n    400: unknown;\n    /**\n     * 500 server error\n     */\n    500: unknown;\n};\n\nexport type CallWithResultFromHeaderResponses = {\n    /**\n     * Successful response\n     */\n    200: unknown;\n};\n\nexport type TestErrorCodeData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * Status code to return\n         */\n        status: number;\n    };\n    url: '/api/v{api-version}/error';\n};\n\nexport type TestErrorCodeErrors = {\n    /**\n     * Custom message: Internal Server Error\n     */\n    500: unknown;\n    /**\n     * Custom message: Not Implemented\n     */\n    501: unknown;\n    /**\n     * Custom message: Bad Gateway\n     */\n    502: unknown;\n    /**\n     * Custom message: Service Unavailable\n     */\n    503: unknown;\n};\n\nexport type TestErrorCodeResponses = {\n    /**\n     * Custom message: Successful response\n     */\n    200: unknown;\n};\n\nexport type NonAsciiæøåÆøÅöôêÊ字符串Data = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * Dummy input param\n         */\n        nonAsciiParamæøåÆØÅöôêÊ: number;\n    };\n    url: '/api/v{api-version}/non-ascii-æøåÆØÅöôêÊ字符串';\n};\n\nexport type NonAsciiæøåÆøÅöôêÊ字符串Responses = {\n    /**\n     * Successful response\n     */\n    200: Array<NonAsciiStringæøåÆøÅöôêÊ字符串>;\n};\n\nexport type NonAsciiæøåÆøÅöôêÊ字符串Response = NonAsciiæøåÆøÅöôêÊ字符串Responses[keyof NonAsciiæøåÆøÅöôêÊ字符串Responses];\n\nexport type PutWithFormUrlEncodedData = {\n    body: ArrayWithStrings;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/non-ascii-æøåÆØÅöôêÊ字符串';\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-fetch/tsconfig-node16-sdk/client/client.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport { createSseClient } from '../core/serverSentEvents.gen.js';\nimport type { HttpMethod } from '../core/types.gen.js';\nimport { getValidRequestBody } from '../core/utils.gen.js';\nimport type { Client, Config, RequestOptions, ResolvedRequestOptions } from './types.gen.js';\nimport {\n  buildUrl,\n  createConfig,\n  createInterceptors,\n  getParseAs,\n  mergeConfigs,\n  mergeHeaders,\n  setAuthParams,\n} from './utils.gen.js';\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 (options: RequestOptions) => {\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 url = buildUrl(opts);\n\n    return { opts, url };\n  };\n\n  const request: Client['request'] = async (options) => {\n    // @ts-expect-error\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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-fetch/tsconfig-node16-sdk/client/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type { Auth } from '../core/auth.gen.js';\nexport type { QuerySerializerOptions } from '../core/bodySerializer.gen.js';\nexport {\n  formDataBodySerializer,\n  jsonBodySerializer,\n  urlSearchParamsBodySerializer,\n} from '../core/bodySerializer.gen.js';\nexport { buildClientParams } from '../core/params.gen.js';\nexport { serializeQueryKeyValue } from '../core/queryKeySerializer.gen.js';\nexport { createClient } from './client.gen.js';\nexport type {\n  Client,\n  ClientOptions,\n  Config,\n  CreateClientConfig,\n  Options,\n  RequestOptions,\n  RequestResult,\n  ResolvedRequestOptions,\n  ResponseStyle,\n  TDataShape,\n} from './types.gen.js';\nexport { createConfig, mergeHeaders } from './utils.gen.js';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-fetch/tsconfig-node16-sdk/client/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { Auth } from '../core/auth.gen.js';\nimport type {\n  ServerSentEventsOptions,\n  ServerSentEventsResult,\n} from '../core/serverSentEvents.gen.js';\nimport type { Client as CoreClient, Config as CoreConfig } from '../core/types.gen.js';\nimport type { Middleware } from './utils.gen.js';\n\nexport type ResponseStyle = 'data' | 'fields';\n\nexport interface Config<T extends ClientOptions = ClientOptions>\n  extends Omit<RequestInit, 'body' | 'headers' | 'method'>, CoreConfig {\n  /**\n   * Base URL for all requests made by this client.\n   */\n  baseUrl?: T['baseUrl'];\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   * Please don't use the Fetch client for Next.js applications. The `next`\n   * options won't have any effect.\n   *\n   * Install {@link https://www.npmjs.com/package/@hey-api/client-next `@hey-api/client-next`} instead.\n   */\n  next?: never;\n  /**\n   * Return the response data parsed in a specified format. By default, `auto`\n   * will infer the appropriate method from the `Content-Type` response header.\n   * You can override this behavior with any of the {@link Body} methods.\n   * Select `stream` if you don't want to parse response data at all.\n   *\n   * @default 'auto'\n   */\n  parseAs?: 'arrayBuffer' | 'auto' | 'blob' | 'formData' | 'json' | 'stream' | 'text';\n  /**\n   * Should we return only data or multiple fields (data, error, response, etc.)?\n   *\n   * @default 'fields'\n   */\n  responseStyle?: ResponseStyle;\n  /**\n   * Throw an error instead of returning it in the response?\n   *\n   * @default false\n   */\n  throwOnError?: T['throwOnError'];\n}\n\nexport interface RequestOptions<\n  TData = unknown,\n  TResponseStyle extends ResponseStyle = 'fields',\n  ThrowOnError extends boolean = boolean,\n  Url extends string = string,\n>\n  extends\n    Config<{\n      responseStyle: TResponseStyle;\n      throwOnError: ThrowOnError;\n    }>,\n    Pick<\n      ServerSentEventsOptions<TData>,\n      | 'onRequest'\n      | 'onSseError'\n      | 'onSseEvent'\n      | 'sseDefaultRetryDelay'\n      | 'sseMaxRetryAttempts'\n      | 'sseMaxRetryDelay'\n    > {\n  /**\n   * Any body that you want to add to your request.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/fetch#body}\n   */\n  body?: unknown;\n  path?: Record<string, unknown>;\n  query?: Record<string, unknown>;\n  /**\n   * Security mechanism(s) to use for the request.\n   */\n  security?: ReadonlyArray<Auth>;\n  url: Url;\n}\n\nexport interface ResolvedRequestOptions<\n  TResponseStyle extends ResponseStyle = 'fields',\n  ThrowOnError extends boolean = boolean,\n  Url extends string = string,\n> extends RequestOptions<unknown, TResponseStyle, ThrowOnError, Url> {\n  serializedBody?: string;\n}\n\nexport type RequestResult<\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = boolean,\n  TResponseStyle extends ResponseStyle = 'fields',\n> = ThrowOnError extends true\n  ? Promise<\n      TResponseStyle extends 'data'\n        ? TData extends Record<string, unknown>\n          ? TData[keyof TData]\n          : TData\n        : {\n            data: TData extends Record<string, unknown> ? TData[keyof TData] : TData;\n            request: Request;\n            response: Response;\n          }\n    >\n  : Promise<\n      TResponseStyle extends 'data'\n        ? (TData extends Record<string, unknown> ? TData[keyof TData] : TData) | undefined\n        : (\n            | {\n                data: TData extends Record<string, unknown> ? TData[keyof TData] : TData;\n                error: undefined;\n              }\n            | {\n                data: undefined;\n                error: TError extends Record<string, unknown> ? TError[keyof TError] : TError;\n              }\n          ) & {\n            request: Request;\n            response: Response;\n          }\n    >;\n\nexport interface ClientOptions {\n  baseUrl?: string;\n  responseStyle?: ResponseStyle;\n  throwOnError?: boolean;\n}\n\ntype MethodFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'>,\n) => RequestResult<TData, TError, ThrowOnError, TResponseStyle>;\n\ntype SseFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'>,\n) => Promise<ServerSentEventsResult<TData, TError>>;\n\ntype RequestFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'> &\n    Pick<Required<RequestOptions<TData, TResponseStyle, ThrowOnError>>, 'method'>,\n) => RequestResult<TData, TError, ThrowOnError, TResponseStyle>;\n\ntype BuildUrlFn = <\n  TData extends {\n    body?: unknown;\n    path?: Record<string, unknown>;\n    query?: Record<string, unknown>;\n    url: string;\n  },\n>(\n  options: TData & Options<TData>,\n) => string;\n\nexport type Client = CoreClient<RequestFn, Config, MethodFn, BuildUrlFn, SseFn> & {\n  interceptors: Middleware<Request, Response, unknown, ResolvedRequestOptions>;\n};\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 = ClientOptions> = (\n  override?: Config<ClientOptions & T>,\n) => Config<Required<ClientOptions> & T>;\n\nexport interface TDataShape {\n  body?: unknown;\n  headers?: unknown;\n  path?: unknown;\n  query?: unknown;\n  url: string;\n}\n\ntype OmitKeys<T, K> = Pick<T, Exclude<keyof T, K>>;\n\nexport type Options<\n  TData extends TDataShape = TDataShape,\n  ThrowOnError extends boolean = boolean,\n  TResponse = unknown,\n  TResponseStyle extends ResponseStyle = 'fields',\n> = OmitKeys<\n  RequestOptions<TResponse, TResponseStyle, ThrowOnError>,\n  'body' | 'path' | 'query' | 'url'\n> &\n  ([TData] extends [never] ? unknown : Omit<TData, 'url'>);\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-fetch/tsconfig-node16-sdk/client/utils.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport { getAuthToken } from '../core/auth.gen.js';\nimport type { QuerySerializerOptions } from '../core/bodySerializer.gen.js';\nimport { jsonBodySerializer } from '../core/bodySerializer.gen.js';\nimport {\n  serializeArrayParam,\n  serializeObjectParam,\n  serializePrimitiveParam,\n} from '../core/pathSerializer.gen.js';\nimport { getUrl } from '../core/utils.gen.js';\nimport type { Client, ClientOptions, Config, RequestOptions } from './types.gen.js';\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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-fetch/tsconfig-node16-sdk/client.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport { type ClientOptions, type Config, createClient, createConfig } from './client/index.js';\nimport type { ClientOptions as ClientOptions2 } from './types.gen.js';\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: 'http://localhost:3000/base' }));\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-fetch/tsconfig-node16-sdk/core/auth.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-fetch/tsconfig-node16-sdk/core/bodySerializer.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { ArrayStyle, ObjectStyle, SerializerOptions } from './pathSerializer.gen.js';\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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-fetch/tsconfig-node16-sdk/core/params.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-fetch/tsconfig-node16-sdk/core/pathSerializer.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-fetch/tsconfig-node16-sdk/core/queryKeySerializer.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\n/**\n * JSON-friendly union that mirrors what Pinia Colada can hash.\n */\nexport type JsonValue =\n  | null\n  | string\n  | number\n  | boolean\n  | JsonValue[]\n  | { [key: string]: JsonValue };\n\n/**\n * Replacer that converts non-JSON values (bigint, Date, etc.) to safe substitutes.\n */\nexport const queryKeyJsonReplacer = (_key: string, value: unknown) => {\n  if (value === undefined || typeof value === 'function' || typeof value === 'symbol') {\n    return undefined;\n  }\n  if (typeof value === 'bigint') {\n    return value.toString();\n  }\n  if (value instanceof Date) {\n    return value.toISOString();\n  }\n  return value;\n};\n\n/**\n * Safely stringifies a value and parses it back into a JsonValue.\n */\nexport const stringifyToJsonValue = (input: unknown): JsonValue | undefined => {\n  try {\n    const json = JSON.stringify(input, queryKeyJsonReplacer);\n    if (json === undefined) {\n      return undefined;\n    }\n    return JSON.parse(json) as JsonValue;\n  } catch {\n    return undefined;\n  }\n};\n\n/**\n * Detects plain objects (including objects with a null prototype).\n */\nconst isPlainObject = (value: unknown): value is Record<string, unknown> => {\n  if (value === null || typeof value !== 'object') {\n    return false;\n  }\n  const prototype = Object.getPrototypeOf(value as object);\n  return prototype === Object.prototype || prototype === null;\n};\n\n/**\n * Turns URLSearchParams into a sorted JSON object for deterministic keys.\n */\nconst serializeSearchParams = (params: URLSearchParams): JsonValue => {\n  const entries = Array.from(params.entries()).sort(([a], [b]) => a.localeCompare(b));\n  const result: Record<string, JsonValue> = {};\n\n  for (const [key, value] of entries) {\n    const existing = result[key];\n    if (existing === undefined) {\n      result[key] = value;\n      continue;\n    }\n\n    if (Array.isArray(existing)) {\n      (existing as string[]).push(value);\n    } else {\n      result[key] = [existing, value];\n    }\n  }\n\n  return result;\n};\n\n/**\n * Normalizes any accepted value into a JSON-friendly shape for query keys.\n */\nexport const serializeQueryKeyValue = (value: unknown): JsonValue | undefined => {\n  if (value === null) {\n    return null;\n  }\n\n  if (typeof value === 'string' || typeof value === 'number' || typeof value === 'boolean') {\n    return value;\n  }\n\n  if (value === undefined || typeof value === 'function' || typeof value === 'symbol') {\n    return undefined;\n  }\n\n  if (typeof value === 'bigint') {\n    return value.toString();\n  }\n\n  if (value instanceof Date) {\n    return value.toISOString();\n  }\n\n  if (Array.isArray(value)) {\n    return stringifyToJsonValue(value);\n  }\n\n  if (typeof URLSearchParams !== 'undefined' && value instanceof URLSearchParams) {\n    return serializeSearchParams(value);\n  }\n\n  if (isPlainObject(value)) {\n    return stringifyToJsonValue(value);\n  }\n\n  return undefined;\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-fetch/tsconfig-node16-sdk/core/serverSentEvents.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { Config } from './types.gen.js';\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 const 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            // Normalize line endings: CRLF -> LF, then CR -> LF\n            buffer = buffer.replace(/\\r\\n/g, '\\n').replace(/\\r/g, '\\n');\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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-fetch/tsconfig-node16-sdk/core/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { Auth, AuthToken } from './auth.gen.js';\nimport type { BodySerializer, QuerySerializer, QuerySerializerOptions } from './bodySerializer.gen.js';\n\nexport type HttpMethod =\n  | 'connect'\n  | 'delete'\n  | 'get'\n  | 'head'\n  | 'options'\n  | 'patch'\n  | 'post'\n  | 'put'\n  | 'trace';\n\nexport type Client<\n  RequestFn = never,\n  Config = unknown,\n  MethodFn = never,\n  BuildUrlFn = never,\n  SseFn = never,\n> = {\n  /**\n   * Returns the final request URL.\n   */\n  buildUrl: BuildUrlFn;\n  getConfig: () => Config;\n  request: RequestFn;\n  setConfig: (config: Config) => Config;\n} & {\n  [K in HttpMethod]: MethodFn;\n} & ([SseFn] extends [never] ? { sse?: never } : { sse: { [K in HttpMethod]: SseFn } });\n\nexport interface Config {\n  /**\n   * Auth token or a function returning auth token. The resolved value will be\n   * added to the request payload as defined by its `security` array.\n   */\n  auth?: ((auth: Auth) => Promise<AuthToken> | AuthToken) | AuthToken;\n  /**\n   * A function for serializing request body parameter. By default,\n   * {@link JSON.stringify()} will be used.\n   */\n  bodySerializer?: BodySerializer | null;\n  /**\n   * An object containing any HTTP headers that you want to pre-populate your\n   * `Headers` object with.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/Headers/Headers#init See more}\n   */\n  headers?:\n    | RequestInit['headers']\n    | Record<\n        string,\n        string | number | boolean | (string | number | boolean)[] | null | undefined | unknown\n      >;\n  /**\n   * The request method.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/fetch#method See more}\n   */\n  method?: Uppercase<HttpMethod>;\n  /**\n   * A function for serializing request query parameters. By default, arrays\n   * will be exploded in form style, objects will be exploded in deepObject\n   * style, and reserved characters are percent-encoded.\n   *\n   * This method will have no effect if the native `paramsSerializer()` Axios\n   * API function is used.\n   *\n   * {@link https://swagger.io/docs/specification/serialization/#query View examples}\n   */\n  querySerializer?: QuerySerializer | QuerySerializerOptions;\n  /**\n   * A function validating request data. This is useful if you want to ensure\n   * the request conforms to the desired shape, so it can be safely sent to\n   * the server.\n   */\n  requestValidator?: (data: unknown) => Promise<unknown>;\n  /**\n   * A function transforming response data before it's returned. This is useful\n   * for post-processing data, e.g. converting ISO strings into Date objects.\n   */\n  responseTransformer?: (data: unknown) => Promise<unknown>;\n  /**\n   * A function validating response data. This is useful if you want to ensure\n   * the response conforms to the desired shape, so it can be safely passed to\n   * the transformers and returned to the user.\n   */\n  responseValidator?: (data: unknown) => Promise<unknown>;\n}\n\ntype IsExactlyNeverOrNeverUndefined<T> = [T] extends [never]\n  ? true\n  : [T] extends [never | undefined]\n    ? [undefined] extends [T]\n      ? false\n      : true\n    : false;\n\nexport type OmitNever<T extends Record<string, unknown>> = {\n  [K in keyof T as IsExactlyNeverOrNeverUndefined<T[K]> extends true ? never : K]: T[K];\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-fetch/tsconfig-node16-sdk/core/utils.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { BodySerializer, QuerySerializer } from './bodySerializer.gen.js';\nimport {\n  type ArraySeparatorStyle,\n  serializeArrayParam,\n  serializeObjectParam,\n  serializePrimitiveParam,\n} from './pathSerializer.gen.js';\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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-fetch/tsconfig-node16-sdk/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport { apiVVersionODataControllerCount, callToTestOrderOfParams, callWithDefaultOptionalParameters, callWithDefaultParameters, callWithDescriptions, callWithDuplicateResponses, callWithNoContentResponse, callWithParameters, callWithResponse, callWithResponseAndNoContentResponse, callWithResponses, callWithResultFromHeader, callWithWeirdParameterNames, collectionFormat, complexParams, complexTypes, deleteCallWithoutParametersAndResponse, deleteFoo, deprecatedCall, dummyA, dummyB, duplicateName, duplicateName2, duplicateName3, duplicateName4, export_, fileResponse, fooWow, getApiVbyApiVersionSimpleOperation, getCallWithOptionalParam, getCallWithoutParametersAndResponse, headCallWithoutParametersAndResponse, import_, multipartRequest, multipartResponse, nonAsciiæøåÆøÅöôêÊ字符串, type Options, optionsCallWithoutParametersAndResponse, patchApiVbyApiVersionNoTag, patchCallWithoutParametersAndResponse, postApiVbyApiVersionFormData, postApiVbyApiVersionRequestBody, postCallWithOptionalParam, postCallWithoutParametersAndResponse, putCallWithoutParametersAndResponse, putWithFormUrlEncoded, testErrorCode, types, uploadFile } from './sdk.gen.js';\nexport type { _3eNum1Период, _400, AdditionalPropertiesIntegerIssue, AdditionalPropertiesUnknownIssue, AdditionalPropertiesUnknownIssue2, AdditionalPropertiesUnknownIssue3, AdditionalPropertiesUnknownIssueWritable, AnyOfAnyAndNull, AnyOfArrays, ApiVVersionODataControllerCountData, ApiVVersionODataControllerCountResponse, ApiVVersionODataControllerCountResponses, ArrayWithAnyOfProperties, ArrayWithArray, ArrayWithBooleans, ArrayWithNumbers, ArrayWithProperties, ArrayWithReferences, ArrayWithStrings, CallToTestOrderOfParamsData, CallWithDefaultOptionalParametersData, CallWithDefaultParametersData, CallWithDescriptionsData, CallWithDuplicateResponsesData, CallWithDuplicateResponsesError, CallWithDuplicateResponsesErrors, CallWithDuplicateResponsesResponse, CallWithDuplicateResponsesResponses, CallWithNoContentResponseData, CallWithNoContentResponseResponse, CallWithNoContentResponseResponses, CallWithParametersData, CallWithResponseAndNoContentResponseData, CallWithResponseAndNoContentResponseResponse, CallWithResponseAndNoContentResponseResponses, CallWithResponseData, CallWithResponseResponse, CallWithResponseResponses, CallWithResponsesData, CallWithResponsesError, CallWithResponsesErrors, CallWithResponsesResponse, CallWithResponsesResponses, CallWithResultFromHeaderData, CallWithResultFromHeaderErrors, CallWithResultFromHeaderResponses, CallWithWeirdParameterNamesData, CamelCaseCommentWithBreaks, CharactersInDescription, ClientOptions, CollectionFormatData, CommentWithBackticks, CommentWithBackticksAndQuotes, CommentWithBreaks, CommentWithExpressionPlaceholders, CommentWithQuotes, CommentWithReservedCharacters, CommentWithSlashes, ComplexParamsData, ComplexParamsResponse, ComplexParamsResponses, ComplexTypesData, ComplexTypesErrors, ComplexTypesResponse, ComplexTypesResponses, CompositionBaseModel, CompositionExtendedModel, CompositionWithAllOfAndNullable, CompositionWithAnyOf, CompositionWithAnyOfAndNullable, CompositionWithAnyOfAnonymous, CompositionWithNestedAnyAndTypeNull, CompositionWithNestedAnyOfAndNull, CompositionWithOneOf, CompositionWithOneOfAndComplexArrayDictionary, CompositionWithOneOfAndNullable, CompositionWithOneOfAndProperties, CompositionWithOneOfAndSimpleArrayDictionary, CompositionWithOneOfAndSimpleDictionary, CompositionWithOneOfAnonymous, CompositionWithOneOfDiscriminator, ConstValue, Default, DeleteCallWithoutParametersAndResponseData, DeleteFooData, DeleteFooData2, DeleteFooData3, DeprecatedCallData, DeprecatedModel, DictionaryWithArray, DictionaryWithDictionary, DictionaryWithProperties, DictionaryWithPropertiesAndAdditionalProperties, DictionaryWithReference, DictionaryWithString, DummyAData, DummyAResponse, DummyAResponses, DummyBData, DummyBResponse, DummyBResponses, DuplicateName2Data, DuplicateName3Data, DuplicateName4Data, DuplicateNameData, EnumFromDescription, EnumWithExtensions, EnumWithNumbers, EnumWithReplacedCharacters, EnumWithStrings, EnumWithXEnumNames, ExportData, ExternalRefA, ExternalRefB, ExternalSharedModel, File, FileResponseData, FileResponseResponse, FileResponseResponses, FileWritable, FooWowData, FooWowResponses, FreeFormObjectWithAdditionalPropertiesEqEmptyObject, FreeFormObjectWithAdditionalPropertiesEqTrue, FreeFormObjectWithoutAdditionalProperties, GenericSchemaDuplicateIssue1SystemBoolean, GenericSchemaDuplicateIssue1SystemBooleanWritable, GenericSchemaDuplicateIssue1SystemString, GenericSchemaDuplicateIssue1SystemStringWritable, GetApiVbyApiVersionSimpleOperationData, GetApiVbyApiVersionSimpleOperationError, GetApiVbyApiVersionSimpleOperationErrors, GetApiVbyApiVersionSimpleOperationResponse, GetApiVbyApiVersionSimpleOperationResponses, GetCallWithOptionalParamData, GetCallWithoutParametersAndResponseData, HeadCallWithoutParametersAndResponseData, Import, ImportData, ImportResponse, ImportResponses, IoK8sApimachineryPkgApisMetaV1DeleteOptions, IoK8sApimachineryPkgApisMetaV1Preconditions, ModelCircle, ModelFromZendesk, ModelSquare, ModelThatExtends, ModelThatExtendsExtends, ModelWithAdditionalPropertiesEqTrue, ModelWithAdditionalPropertiesRef, ModelWithAnyOfConstantSizeArray, ModelWithAnyOfConstantSizeArrayAndIntersect, ModelWithAnyOfConstantSizeArrayNullable, ModelWithAnyOfConstantSizeArrayWithNSizeAndOptions, ModelWithAnyOfConstantSizeArrayWithNSizeAndOptionsWritable, ModelWithArray, ModelWithArrayReadOnlyAndWriteOnly, ModelWithArrayReadOnlyAndWriteOnlyWritable, ModelWithBackticksInDescription, ModelWithBoolean, ModelWithCircularReference, ModelWithConst, ModelWithConstantSizeArray, ModelWithDictionary, ModelWithDuplicateImports, ModelWithDuplicateProperties, ModelWithEnum, ModelWithEnumFromDescription, ModelWithEnumWithHyphen, ModelWithInteger, ModelWithNestedArrayEnums, ModelWithNestedArrayEnumsData, ModelWithNestedArrayEnumsDataBar, ModelWithNestedArrayEnumsDataFoo, ModelWithNestedCompositionEnums, ModelWithNestedEnums, ModelWithNestedProperties, ModelWithNullableObject, ModelWithNullableString, ModelWithNumericEnumUnion, ModelWithOneOfAndProperties, ModelWithOneOfEnum, ModelWithOrderedProperties, ModelWithPattern, ModelWithPatternWritable, ModelWithPrefixItemsConstantSizeArray, ModelWithProperties, ModelWithPropertiesWritable, ModelWithReadOnlyAndWriteOnly, ModelWithReadOnlyAndWriteOnlyWritable, ModelWithReference, ModelWithReferenceWritable, ModelWithString, ModelWithStringError, MultipartRequestData, MultipartResponseData, MultipartResponseResponse, MultipartResponseResponses, NestedAnyOfArraysNullable, NonAsciiæøåÆøÅöôêÊ字符串Data, NonAsciiæøåÆøÅöôêÊ字符串Response, NonAsciiæøåÆøÅöôêÊ字符串Responses, NonAsciiStringæøåÆøÅöôêÊ字符串, NullableObject, OneOfAllOfIssue, OneOfAllOfIssueWritable, OptionsCallWithoutParametersAndResponseData, Pageable, ParameterSimpleParameterUnused, PatchApiVbyApiVersionNoTagData, PatchApiVbyApiVersionNoTagResponses, PatchCallWithoutParametersAndResponseData, PostApiVbyApiVersionFormDataData, PostApiVbyApiVersionRequestBodyData, PostCallWithOptionalParamData, PostCallWithOptionalParamResponse, PostCallWithOptionalParamResponses, PostCallWithoutParametersAndResponseData, PostServiceWithEmptyTagResponse, PostServiceWithEmptyTagResponse2, PutCallWithoutParametersAndResponseData, PutWithFormUrlEncodedData, SchemaWithFormRestrictedKeys, SimpleBoolean, SimpleFile, SimpleFormData, SimpleInteger, SimpleParameter, SimpleReference, SimpleRequestBody, SimpleString, SimpleStringWithPattern, TestErrorCodeData, TestErrorCodeErrors, TestErrorCodeResponses, TypesData, TypesResponse, TypesResponses, UploadFileData, UploadFileResponse, UploadFileResponses, XFooBar } from './types.gen.js';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-fetch/tsconfig-node16-sdk/sdk.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport { client } from './client.gen.js';\nimport { type Client, formDataBodySerializer, type Options as Options2, type TDataShape, urlSearchParamsBodySerializer } from './client/index.js';\nimport type { ApiVVersionODataControllerCountData, ApiVVersionODataControllerCountResponses, CallToTestOrderOfParamsData, CallWithDefaultOptionalParametersData, CallWithDefaultParametersData, CallWithDescriptionsData, CallWithDuplicateResponsesData, CallWithDuplicateResponsesErrors, CallWithDuplicateResponsesResponses, CallWithNoContentResponseData, CallWithNoContentResponseResponses, CallWithParametersData, CallWithResponseAndNoContentResponseData, CallWithResponseAndNoContentResponseResponses, CallWithResponseData, CallWithResponseResponses, CallWithResponsesData, CallWithResponsesErrors, CallWithResponsesResponses, CallWithResultFromHeaderData, CallWithResultFromHeaderErrors, CallWithResultFromHeaderResponses, CallWithWeirdParameterNamesData, CollectionFormatData, ComplexParamsData, ComplexParamsResponses, ComplexTypesData, ComplexTypesErrors, ComplexTypesResponses, DeleteCallWithoutParametersAndResponseData, DeleteFooData3, DeprecatedCallData, DummyAData, DummyAResponses, DummyBData, DummyBResponses, DuplicateName2Data, DuplicateName3Data, DuplicateName4Data, DuplicateNameData, ExportData, FileResponseData, FileResponseResponses, FooWowData, FooWowResponses, GetApiVbyApiVersionSimpleOperationData, GetApiVbyApiVersionSimpleOperationErrors, GetApiVbyApiVersionSimpleOperationResponses, GetCallWithOptionalParamData, GetCallWithoutParametersAndResponseData, HeadCallWithoutParametersAndResponseData, ImportData, ImportResponses, MultipartRequestData, MultipartResponseData, MultipartResponseResponses, NonAsciiæøåÆøÅöôêÊ字符串Data, NonAsciiæøåÆøÅöôêÊ字符串Responses, OptionsCallWithoutParametersAndResponseData, PatchApiVbyApiVersionNoTagData, PatchApiVbyApiVersionNoTagResponses, PatchCallWithoutParametersAndResponseData, PostApiVbyApiVersionFormDataData, PostApiVbyApiVersionRequestBodyData, PostCallWithOptionalParamData, PostCallWithOptionalParamResponses, PostCallWithoutParametersAndResponseData, PutCallWithoutParametersAndResponseData, PutWithFormUrlEncodedData, TestErrorCodeData, TestErrorCodeErrors, TestErrorCodeResponses, TypesData, TypesResponses, UploadFileData, UploadFileResponses } from './types.gen.js';\n\nexport type Options<TData extends TDataShape = TDataShape, ThrowOnError extends boolean = boolean> = Options2<TData, ThrowOnError> & {\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\nexport const export_ = <ThrowOnError extends boolean = false>(options?: Options<ExportData, ThrowOnError>) => (options?.client ?? client).get<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/no+tag', ...options });\n\nexport const patchApiVbyApiVersionNoTag = <ThrowOnError extends boolean = false>(options?: Options<PatchApiVbyApiVersionNoTagData, ThrowOnError>) => (options?.client ?? client).patch<PatchApiVbyApiVersionNoTagResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/no+tag', ...options });\n\nexport const import_ = <ThrowOnError extends boolean = false>(options: Options<ImportData, ThrowOnError>) => (options.client ?? client).post<ImportResponses, unknown, ThrowOnError>({\n    url: '/api/v{api-version}/no+tag',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options.headers\n    }\n});\n\nexport const fooWow = <ThrowOnError extends boolean = false>(options?: Options<FooWowData, ThrowOnError>) => (options?.client ?? client).put<FooWowResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/no+tag', ...options });\n\nexport const apiVVersionODataControllerCount = <ThrowOnError extends boolean = false>(options?: Options<ApiVVersionODataControllerCountData, ThrowOnError>) => (options?.client ?? client).get<ApiVVersionODataControllerCountResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple/$count', ...options });\n\nexport const getApiVbyApiVersionSimpleOperation = <ThrowOnError extends boolean = false>(options: Options<GetApiVbyApiVersionSimpleOperationData, ThrowOnError>) => (options.client ?? client).get<GetApiVbyApiVersionSimpleOperationResponses, GetApiVbyApiVersionSimpleOperationErrors, ThrowOnError>({ url: '/api/v{api-version}/simple:operation', ...options });\n\nexport const deleteCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<DeleteCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).delete<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const getCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<GetCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).get<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const headCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<HeadCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).head<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const optionsCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<OptionsCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).options<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const patchCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<PatchCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).patch<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const postCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<PostCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).post<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const putCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<PutCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).put<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const deleteFoo = <ThrowOnError extends boolean = false>(options: Options<DeleteFooData3, ThrowOnError>) => (options.client ?? client).delete<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/foo/{foo_param}/bar/{BarParam}', ...options });\n\nexport const callWithDescriptions = <ThrowOnError extends boolean = false>(options?: Options<CallWithDescriptionsData, ThrowOnError>) => (options?.client ?? client).post<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/descriptions', ...options });\n\n/**\n * @deprecated\n */\nexport const deprecatedCall = <ThrowOnError extends boolean = false>(options: Options<DeprecatedCallData, ThrowOnError>) => (options.client ?? client).post<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/parameters/deprecated', ...options });\n\nexport const callWithParameters = <ThrowOnError extends boolean = false>(options: Options<CallWithParametersData, ThrowOnError>) => (options.client ?? client).post<unknown, unknown, ThrowOnError>({\n    url: '/api/v{api-version}/parameters/{parameterPath}',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options.headers\n    }\n});\n\nexport const callWithWeirdParameterNames = <ThrowOnError extends boolean = false>(options: Options<CallWithWeirdParameterNamesData, ThrowOnError>) => (options.client ?? client).post<unknown, unknown, ThrowOnError>({\n    url: '/api/v{api-version}/parameters/{parameter.path.1}/{parameter-path-2}/{PARAMETER-PATH-3}',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options.headers\n    }\n});\n\nexport const getCallWithOptionalParam = <ThrowOnError extends boolean = false>(options: Options<GetCallWithOptionalParamData, ThrowOnError>) => (options.client ?? client).get<unknown, unknown, ThrowOnError>({\n    url: '/api/v{api-version}/parameters',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options.headers\n    }\n});\n\nexport const postCallWithOptionalParam = <ThrowOnError extends boolean = false>(options: Options<PostCallWithOptionalParamData, ThrowOnError>) => (options.client ?? client).post<PostCallWithOptionalParamResponses, unknown, ThrowOnError>({\n    url: '/api/v{api-version}/parameters',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options.headers\n    }\n});\n\nexport const postApiVbyApiVersionRequestBody = <ThrowOnError extends boolean = false>(options?: Options<PostApiVbyApiVersionRequestBodyData, ThrowOnError>) => (options?.client ?? client).post<unknown, unknown, ThrowOnError>({\n    url: '/api/v{api-version}/requestBody',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options?.headers\n    }\n});\n\nexport const postApiVbyApiVersionFormData = <ThrowOnError extends boolean = false>(options?: Options<PostApiVbyApiVersionFormDataData, ThrowOnError>) => (options?.client ?? client).post<unknown, unknown, ThrowOnError>({\n    ...formDataBodySerializer,\n    url: '/api/v{api-version}/formData',\n    ...options,\n    headers: {\n        'Content-Type': null,\n        ...options?.headers\n    }\n});\n\nexport const callWithDefaultParameters = <ThrowOnError extends boolean = false>(options?: Options<CallWithDefaultParametersData, ThrowOnError>) => (options?.client ?? client).get<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/defaults', ...options });\n\nexport const callWithDefaultOptionalParameters = <ThrowOnError extends boolean = false>(options?: Options<CallWithDefaultOptionalParametersData, ThrowOnError>) => (options?.client ?? client).post<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/defaults', ...options });\n\nexport const callToTestOrderOfParams = <ThrowOnError extends boolean = false>(options: Options<CallToTestOrderOfParamsData, ThrowOnError>) => (options.client ?? client).put<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/defaults', ...options });\n\nexport const duplicateName = <ThrowOnError extends boolean = false>(options?: Options<DuplicateNameData, ThrowOnError>) => (options?.client ?? client).delete<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/duplicate', ...options });\n\nexport const duplicateName2 = <ThrowOnError extends boolean = false>(options?: Options<DuplicateName2Data, ThrowOnError>) => (options?.client ?? client).get<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/duplicate', ...options });\n\nexport const duplicateName3 = <ThrowOnError extends boolean = false>(options?: Options<DuplicateName3Data, ThrowOnError>) => (options?.client ?? client).post<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/duplicate', ...options });\n\nexport const duplicateName4 = <ThrowOnError extends boolean = false>(options?: Options<DuplicateName4Data, ThrowOnError>) => (options?.client ?? client).put<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/duplicate', ...options });\n\nexport const callWithNoContentResponse = <ThrowOnError extends boolean = false>(options?: Options<CallWithNoContentResponseData, ThrowOnError>) => (options?.client ?? client).get<CallWithNoContentResponseResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/no-content', ...options });\n\nexport const callWithResponseAndNoContentResponse = <ThrowOnError extends boolean = false>(options?: Options<CallWithResponseAndNoContentResponseData, ThrowOnError>) => (options?.client ?? client).get<CallWithResponseAndNoContentResponseResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/multiple-tags/response-and-no-content', ...options });\n\nexport const dummyA = <ThrowOnError extends boolean = false>(options?: Options<DummyAData, ThrowOnError>) => (options?.client ?? client).get<DummyAResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/multiple-tags/a', ...options });\n\nexport const dummyB = <ThrowOnError extends boolean = false>(options?: Options<DummyBData, ThrowOnError>) => (options?.client ?? client).get<DummyBResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/multiple-tags/b', ...options });\n\nexport const callWithResponse = <ThrowOnError extends boolean = false>(options?: Options<CallWithResponseData, ThrowOnError>) => (options?.client ?? client).get<CallWithResponseResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/response', ...options });\n\nexport const callWithDuplicateResponses = <ThrowOnError extends boolean = false>(options?: Options<CallWithDuplicateResponsesData, ThrowOnError>) => (options?.client ?? client).post<CallWithDuplicateResponsesResponses, CallWithDuplicateResponsesErrors, ThrowOnError>({ url: '/api/v{api-version}/response', ...options });\n\nexport const callWithResponses = <ThrowOnError extends boolean = false>(options?: Options<CallWithResponsesData, ThrowOnError>) => (options?.client ?? client).put<CallWithResponsesResponses, CallWithResponsesErrors, ThrowOnError>({ url: '/api/v{api-version}/response', ...options });\n\nexport const collectionFormat = <ThrowOnError extends boolean = false>(options: Options<CollectionFormatData, ThrowOnError>) => (options.client ?? client).get<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/collectionFormat', ...options });\n\nexport const types = <ThrowOnError extends boolean = false>(options: Options<TypesData, ThrowOnError>) => (options.client ?? client).get<TypesResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/types', ...options });\n\nexport const uploadFile = <ThrowOnError extends boolean = false>(options: Options<UploadFileData, ThrowOnError>) => (options.client ?? client).post<UploadFileResponses, unknown, ThrowOnError>({\n    ...urlSearchParamsBodySerializer,\n    url: '/api/v{api-version}/upload',\n    ...options,\n    headers: {\n        'Content-Type': 'application/x-www-form-urlencoded',\n        ...options.headers\n    }\n});\n\nexport const fileResponse = <ThrowOnError extends boolean = false>(options: Options<FileResponseData, ThrowOnError>) => (options.client ?? client).get<FileResponseResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/file/{id}', ...options });\n\nexport const complexTypes = <ThrowOnError extends boolean = false>(options: Options<ComplexTypesData, ThrowOnError>) => (options.client ?? client).get<ComplexTypesResponses, ComplexTypesErrors, ThrowOnError>({\n    querySerializer: { parameters: { parameterObject: { object: { style: 'form' } } } },\n    url: '/api/v{api-version}/complex',\n    ...options\n});\n\nexport const multipartResponse = <ThrowOnError extends boolean = false>(options?: Options<MultipartResponseData, ThrowOnError>) => (options?.client ?? client).get<MultipartResponseResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/multipart', ...options });\n\nexport const multipartRequest = <ThrowOnError extends boolean = false>(options?: Options<MultipartRequestData, ThrowOnError>) => (options?.client ?? client).post<unknown, unknown, ThrowOnError>({\n    ...formDataBodySerializer,\n    url: '/api/v{api-version}/multipart',\n    ...options,\n    headers: {\n        'Content-Type': null,\n        ...options?.headers\n    }\n});\n\nexport const complexParams = <ThrowOnError extends boolean = false>(options: Options<ComplexParamsData, ThrowOnError>) => (options.client ?? client).put<ComplexParamsResponses, unknown, ThrowOnError>({\n    url: '/api/v{api-version}/complex/{id}',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json-patch+json',\n        ...options.headers\n    }\n});\n\nexport const callWithResultFromHeader = <ThrowOnError extends boolean = false>(options?: Options<CallWithResultFromHeaderData, ThrowOnError>) => (options?.client ?? client).post<CallWithResultFromHeaderResponses, CallWithResultFromHeaderErrors, ThrowOnError>({ url: '/api/v{api-version}/header', ...options });\n\nexport const testErrorCode = <ThrowOnError extends boolean = false>(options: Options<TestErrorCodeData, ThrowOnError>) => (options.client ?? client).post<TestErrorCodeResponses, TestErrorCodeErrors, ThrowOnError>({ url: '/api/v{api-version}/error', ...options });\n\nexport const nonAsciiæøåÆøÅöôêÊ字符串 = <ThrowOnError extends boolean = false>(options: Options<NonAsciiæøåÆøÅöôêÊ字符串Data, ThrowOnError>) => (options.client ?? client).post<NonAsciiæøåÆøÅöôêÊ字符串Responses, unknown, ThrowOnError>({ url: '/api/v{api-version}/non-ascii-æøåÆØÅöôêÊ字符串', ...options });\n\n/**\n * Login User\n */\nexport const putWithFormUrlEncoded = <ThrowOnError extends boolean = false>(options: Options<PutWithFormUrlEncodedData, ThrowOnError>) => (options.client ?? client).put<unknown, unknown, ThrowOnError>({\n    ...urlSearchParamsBodySerializer,\n    url: '/api/v{api-version}/non-ascii-æøåÆØÅöôêÊ字符串',\n    ...options,\n    headers: {\n        'Content-Type': 'application/x-www-form-urlencoded',\n        ...options.headers\n    }\n});\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-fetch/tsconfig-node16-sdk/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type ClientOptions = {\n    baseUrl: 'http://localhost:3000/base' | (string & {});\n};\n\n/**\n * Model with number-only name\n */\nexport type _400 = string;\n\n/**\n * External ref to shared model (A)\n */\nexport type ExternalRefA = ExternalSharedModel;\n\n/**\n * External ref to shared model (B)\n */\nexport type ExternalRefB = ExternalSharedModel;\n\n/**\n * Testing multiline comments in string: First line\n * Second line\n *\n * Fourth line\n */\nexport type CamelCaseCommentWithBreaks = number;\n\n/**\n * Testing multiline comments in string: First line\n * Second line\n *\n * Fourth line\n */\nexport type CommentWithBreaks = number;\n\n/**\n * Testing backticks in string: `backticks` and ```multiple backticks``` should work\n */\nexport type CommentWithBackticks = number;\n\n/**\n * Testing backticks and quotes in string: `backticks`, 'quotes', \"double quotes\" and ```multiple backticks``` should work\n */\nexport type CommentWithBackticksAndQuotes = number;\n\n/**\n * Testing slashes in string: \\backwards\\\\\\ and /forwards/// should work\n */\nexport type CommentWithSlashes = number;\n\n/**\n * Testing expression placeholders in string: ${expression} should work\n */\nexport type CommentWithExpressionPlaceholders = number;\n\n/**\n * Testing quotes in string: 'single quote''' and \"double quotes\"\"\" should work\n */\nexport type CommentWithQuotes = number;\n\n/**\n * Testing reserved characters in string: * inline * and ** inline ** should work\n */\nexport type CommentWithReservedCharacters = number;\n\n/**\n * This is a simple number\n */\nexport type SimpleInteger = number;\n\n/**\n * This is a simple boolean\n */\nexport type SimpleBoolean = boolean;\n\n/**\n * This is a simple string\n */\nexport type SimpleString = string;\n\n/**\n * A string with non-ascii (unicode) characters valid in typescript identifiers (æøåÆØÅöÔèÈ字符串)\n */\nexport type NonAsciiStringæøåÆøÅöôêÊ字符串 = string;\n\n/**\n * This is a simple file\n */\nexport type SimpleFile = Blob | File;\n\n/**\n * This is a simple reference\n */\nexport type SimpleReference = ModelWithString;\n\n/**\n * This is a simple string\n */\nexport type SimpleStringWithPattern = string | null;\n\n/**\n * This is a simple enum with strings\n */\nexport type EnumWithStrings = 'Success' | 'Warning' | 'Error' | '\\'Single Quote\\'' | '\"Double Quotes\"' | 'Non-ascii: øæåôöØÆÅÔÖ字符串';\n\nexport type EnumWithReplacedCharacters = '\\'Single Quote\\'' | '\"Double Quotes\"' | 'øæåôöØÆÅÔÖ字符串' | 3.1 | '';\n\n/**\n * This is a simple enum with numbers\n */\nexport type EnumWithNumbers = 1 | 2 | 3 | 1.1 | 1.2 | 1.3 | 100 | 200 | 300 | -100 | -200 | -300 | -1.1 | -1.2 | -1.3;\n\n/**\n * Success=1,Warning=2,Error=3\n */\nexport type EnumFromDescription = number;\n\n/**\n * This is a simple enum with numbers\n */\nexport type EnumWithExtensions = 200 | 400 | 500;\n\nexport type EnumWithXEnumNames = 0 | 1 | 2;\n\n/**\n * This is a simple array with numbers\n */\nexport type ArrayWithNumbers = Array<number>;\n\n/**\n * This is a simple array with booleans\n */\nexport type ArrayWithBooleans = Array<boolean>;\n\n/**\n * This is a simple array with strings\n */\nexport type ArrayWithStrings = Array<string>;\n\n/**\n * This is a simple array with references\n */\nexport type ArrayWithReferences = Array<ModelWithString>;\n\n/**\n * This is a simple array containing an array\n */\nexport type ArrayWithArray = Array<Array<ModelWithString>>;\n\n/**\n * This is a simple array with properties\n */\nexport type ArrayWithProperties = Array<{\n    '16x16'?: CamelCaseCommentWithBreaks;\n    bar?: string;\n}>;\n\n/**\n * This is a simple array with any of properties\n */\nexport type ArrayWithAnyOfProperties = Array<{\n    foo?: string;\n} | {\n    bar?: string;\n}>;\n\nexport type AnyOfAnyAndNull = {\n    data?: unknown | null;\n};\n\n/**\n * This is a simple array with any of properties\n */\nexport type AnyOfArrays = {\n    results?: Array<{\n        foo?: string;\n    } | {\n        bar?: string;\n    }>;\n};\n\n/**\n * This is a string dictionary\n */\nexport type DictionaryWithString = {\n    [key: string]: string;\n};\n\nexport type DictionaryWithPropertiesAndAdditionalProperties = {\n    foo?: number;\n    bar?: boolean;\n    [key: string]: string | number | boolean | undefined;\n};\n\n/**\n * This is a string reference\n */\nexport type DictionaryWithReference = {\n    [key: string]: ModelWithString;\n};\n\n/**\n * This is a complex dictionary\n */\nexport type DictionaryWithArray = {\n    [key: string]: Array<ModelWithString>;\n};\n\n/**\n * This is a string dictionary\n */\nexport type DictionaryWithDictionary = {\n    [key: string]: {\n        [key: string]: string;\n    };\n};\n\n/**\n * This is a complex dictionary\n */\nexport type DictionaryWithProperties = {\n    [key: string]: {\n        foo?: string;\n        bar?: string;\n    };\n};\n\n/**\n * This is a model with one number property\n */\nexport type ModelWithInteger = {\n    /**\n     * This is a simple number property\n     */\n    prop?: number;\n};\n\n/**\n * This is a model with one boolean property\n */\nexport type ModelWithBoolean = {\n    /**\n     * This is a simple boolean property\n     */\n    prop?: boolean;\n};\n\n/**\n * This is a model with one string property\n */\nexport type ModelWithString = {\n    /**\n     * This is a simple string property\n     */\n    prop?: string;\n};\n\n/**\n * This is a model with one string property\n */\nexport type ModelWithStringError = {\n    /**\n     * This is a simple string property\n     */\n    prop?: string;\n};\n\n/**\n * `Comment` or `VoiceComment`. The JSON object for adding voice comments to tickets is different. See [Adding voice comments to tickets](/documentation/ticketing/managing-tickets/adding-voice-comments-to-tickets)\n */\nexport type ModelFromZendesk = string;\n\n/**\n * This is a model with one string property\n */\nexport type ModelWithNullableString = {\n    /**\n     * This is a simple string property\n     */\n    nullableProp1?: string | null;\n    /**\n     * This is a simple string property\n     */\n    nullableRequiredProp1: string | null;\n    /**\n     * This is a simple string property\n     */\n    nullableProp2?: string | null;\n    /**\n     * This is a simple string property\n     */\n    nullableRequiredProp2: string | null;\n    /**\n     * This is a simple enum with strings\n     */\n    'foo_bar-enum'?: 'Success' | 'Warning' | 'Error' | 'ØÆÅ字符串';\n};\n\n/**\n * This is a model with one enum\n */\nexport type ModelWithEnum = {\n    /**\n     * This is a simple enum with strings\n     */\n    'foo_bar-enum'?: 'Success' | 'Warning' | 'Error' | 'ØÆÅ字符串';\n    /**\n     * These are the HTTP error code enums\n     */\n    statusCode?: '100' | '200 FOO' | '300 FOO_BAR' | '400 foo-bar' | '500 foo.bar' | '600 foo&bar';\n    /**\n     * Simple boolean enum\n     */\n    bool?: true;\n};\n\n/**\n * This is a model with one enum with escaped name\n */\nexport type ModelWithEnumWithHyphen = {\n    /**\n     * Foo-Bar-Baz-Qux\n     */\n    'foo-bar-baz-qux'?: '3.0';\n};\n\n/**\n * This is a model with one enum\n */\nexport type ModelWithEnumFromDescription = {\n    /**\n     * Success=1,Warning=2,Error=3\n     */\n    test?: number;\n};\n\n/**\n * This is a model with nested enums\n */\nexport type ModelWithNestedEnums = {\n    dictionaryWithEnum?: {\n        [key: string]: 'Success' | 'Warning' | 'Error';\n    };\n    dictionaryWithEnumFromDescription?: {\n        [key: string]: number;\n    };\n    arrayWithEnum?: Array<'Success' | 'Warning' | 'Error'>;\n    arrayWithDescription?: Array<number>;\n    /**\n     * This is a simple enum with strings\n     */\n    'foo_bar-enum'?: 'Success' | 'Warning' | 'Error' | 'ØÆÅ字符串';\n};\n\n/**\n * This is a model with one property containing a reference\n */\nexport type ModelWithReference = {\n    prop?: ModelWithProperties;\n};\n\n/**\n * This is a model with one property containing an array\n */\nexport type ModelWithArrayReadOnlyAndWriteOnly = {\n    prop?: Array<ModelWithReadOnlyAndWriteOnly>;\n    propWithFile?: Array<Blob | File>;\n    propWithNumber?: Array<number>;\n};\n\n/**\n * This is a model with one property containing an array\n */\nexport type ModelWithArray = {\n    prop?: Array<ModelWithString>;\n    propWithFile?: Array<Blob | File>;\n    propWithNumber?: Array<number>;\n};\n\n/**\n * This is a model with one property containing a dictionary\n */\nexport type ModelWithDictionary = {\n    prop?: {\n        [key: string]: string;\n    };\n};\n\n/**\n * This is a deprecated model with a deprecated property\n *\n * @deprecated\n */\nexport type DeprecatedModel = {\n    /**\n     * This is a deprecated property\n     *\n     * @deprecated\n     */\n    prop?: string;\n};\n\n/**\n * This is a model with one property containing a circular reference\n */\nexport type ModelWithCircularReference = {\n    prop?: ModelWithCircularReference;\n};\n\n/**\n * This is a model with one property with a 'one of' relationship\n */\nexport type CompositionWithOneOf = {\n    propA?: ModelWithString | ModelWithEnum | ModelWithArray | ModelWithDictionary;\n};\n\n/**\n * This is a model with one property with a 'one of' relationship where the options are not $ref\n */\nexport type CompositionWithOneOfAnonymous = {\n    propA?: {\n        propA?: string;\n    } | string | number;\n};\n\n/**\n * Circle\n */\nexport type ModelCircle = {\n    kind: string;\n    radius?: number;\n};\n\n/**\n * Square\n */\nexport type ModelSquare = {\n    kind: string;\n    sideLength?: number;\n};\n\n/**\n * This is a model with one property with a 'one of' relationship where the options are not $ref\n */\nexport type CompositionWithOneOfDiscriminator = ({\n    kind: 'circle';\n} & ModelCircle) | ({\n    kind: 'square';\n} & ModelSquare);\n\n/**\n * This is a model with one property with a 'any of' relationship\n */\nexport type CompositionWithAnyOf = {\n    propA?: ModelWithString | ModelWithEnum | ModelWithArray | ModelWithDictionary;\n};\n\n/**\n * This is a model with one property with a 'any of' relationship where the options are not $ref\n */\nexport type CompositionWithAnyOfAnonymous = {\n    propA?: {\n        propA?: string;\n    } | string | number;\n};\n\n/**\n * This is a model with nested 'any of' property with a type null\n */\nexport type CompositionWithNestedAnyAndTypeNull = {\n    propA?: Array<ModelWithDictionary | null> | Array<ModelWithArray | null>;\n};\n\nexport type _3eNum1Период = 'Bird' | 'Dog';\n\nexport type ConstValue = 'ConstValue';\n\n/**\n * This is a model with one property with a 'any of' relationship where the options are not $ref\n */\nexport type CompositionWithNestedAnyOfAndNull = {\n    /**\n     * Scopes\n     */\n    propA?: Array<_3eNum1Период | ConstValue> | null;\n};\n\n/**\n * This is a model with one property with a 'one of' relationship\n */\nexport type CompositionWithOneOfAndNullable = {\n    propA?: {\n        boolean?: boolean;\n    } | ModelWithEnum | ModelWithArray | ModelWithDictionary | null;\n};\n\n/**\n * This is a model that contains a simple dictionary within composition\n */\nexport type CompositionWithOneOfAndSimpleDictionary = {\n    propA?: boolean | {\n        [key: string]: number;\n    };\n};\n\n/**\n * This is a model that contains a dictionary of simple arrays within composition\n */\nexport type CompositionWithOneOfAndSimpleArrayDictionary = {\n    propA?: boolean | {\n        [key: string]: Array<boolean>;\n    };\n};\n\n/**\n * This is a model that contains a dictionary of complex arrays (composited) within composition\n */\nexport type CompositionWithOneOfAndComplexArrayDictionary = {\n    propA?: boolean | {\n        [key: string]: Array<number | string>;\n    };\n};\n\n/**\n * This is a model with one property with a 'all of' relationship\n */\nexport type CompositionWithAllOfAndNullable = {\n    propA?: ({\n        boolean?: boolean;\n    } & ModelWithEnum & ModelWithArray & ModelWithDictionary) | null;\n};\n\n/**\n * This is a model with one property with a 'any of' relationship\n */\nexport type CompositionWithAnyOfAndNullable = {\n    propA?: {\n        boolean?: boolean;\n    } | ModelWithEnum | ModelWithArray | ModelWithDictionary | null;\n};\n\n/**\n * This is a base model with two simple optional properties\n */\nexport type CompositionBaseModel = {\n    firstName?: string;\n    lastname?: string;\n};\n\n/**\n * This is a model that extends the base model\n */\nexport type CompositionExtendedModel = CompositionBaseModel & {\n    age: number;\n    firstName: string;\n    lastname: string;\n};\n\n/**\n * This is a model with one nested property\n */\nexport type ModelWithProperties = {\n    required: string;\n    readonly requiredAndReadOnly: string;\n    requiredAndNullable: string | null;\n    string?: string;\n    number?: number;\n    boolean?: boolean;\n    reference?: ModelWithString;\n    'property with space'?: string;\n    default?: string;\n    try?: string;\n    readonly '@namespace.string'?: string;\n    readonly '@namespace.integer'?: number;\n};\n\n/**\n * This is a model with one nested property\n */\nexport type ModelWithNestedProperties = {\n    readonly first: {\n        readonly second: {\n            readonly third: string | null;\n        } | null;\n    } | null;\n};\n\n/**\n * This is a model with duplicated properties\n */\nexport type ModelWithDuplicateProperties = {\n    prop?: ModelWithString;\n};\n\n/**\n * This is a model with ordered properties\n */\nexport type ModelWithOrderedProperties = {\n    zebra?: string;\n    apple?: string;\n    hawaii?: string;\n};\n\n/**\n * This is a model with duplicated imports\n */\nexport type ModelWithDuplicateImports = {\n    propA?: ModelWithString;\n    propB?: ModelWithString;\n    propC?: ModelWithString;\n};\n\n/**\n * This is a model that extends another model\n */\nexport type ModelThatExtends = ModelWithString & {\n    propExtendsA?: string;\n    propExtendsB?: ModelWithString;\n};\n\n/**\n * This is a model that extends another model\n */\nexport type ModelThatExtendsExtends = ModelWithString & ModelThatExtends & {\n    propExtendsC?: string;\n    propExtendsD?: ModelWithString;\n};\n\n/**\n * This is a model that contains a some patterns\n */\nexport type ModelWithPattern = {\n    key: string;\n    name: string;\n    readonly enabled?: boolean;\n    readonly modified?: string;\n    id?: string;\n    text?: string;\n    patternWithSingleQuotes?: string;\n    patternWithNewline?: string;\n    patternWithBacktick?: string;\n    patternWithUnicode?: string;\n};\n\nexport type File = {\n    /**\n     * Id\n     */\n    readonly id?: string;\n    /**\n     * Updated at\n     */\n    readonly updated_at?: string;\n    /**\n     * Created at\n     */\n    readonly created_at?: string;\n    /**\n     * Mime\n     */\n    mime: string;\n    /**\n     * File\n     */\n    readonly file?: string;\n};\n\nexport type Default = {\n    name?: string;\n};\n\nexport type Pageable = {\n    page?: number;\n    size?: number;\n    sort?: Array<string>;\n};\n\n/**\n * This is a free-form object without additionalProperties.\n */\nexport type FreeFormObjectWithoutAdditionalProperties = {\n    [key: string]: unknown;\n};\n\n/**\n * This is a free-form object with additionalProperties: true.\n */\nexport type FreeFormObjectWithAdditionalPropertiesEqTrue = {\n    [key: string]: unknown;\n};\n\n/**\n * This is a free-form object with additionalProperties: {}.\n */\nexport type FreeFormObjectWithAdditionalPropertiesEqEmptyObject = {\n    [key: string]: unknown;\n};\n\nexport type ModelWithConst = {\n    String?: 'String';\n    number?: 0;\n    null?: null;\n    withType?: 'Some string';\n};\n\n/**\n * This is a model with one property and additionalProperties: true\n */\nexport type ModelWithAdditionalPropertiesEqTrue = {\n    /**\n     * This is a simple string property\n     */\n    prop?: string;\n    [key: string]: unknown;\n};\n\nexport type NestedAnyOfArraysNullable = {\n    nullableArray?: Array<string | boolean> | null;\n};\n\nexport type CompositionWithOneOfAndProperties = ({\n    foo: SimpleParameter;\n} | {\n    bar: NonAsciiStringæøåÆøÅöôêÊ字符串;\n}) & {\n    baz: number | null;\n    qux: number;\n};\n\n/**\n * An object that can be null\n */\nexport type NullableObject = {\n    foo?: string;\n} | null;\n\n/**\n * Some % character\n */\nexport type CharactersInDescription = string;\n\nexport type ModelWithNullableObject = {\n    data?: NullableObject;\n};\n\n/**\n * An object with additional properties that can be null (anyOf ref + null)\n */\nexport type ModelWithAdditionalPropertiesRef = {\n    [key: string]: NullableObject | null;\n};\n\nexport type ModelWithOneOfEnum = {\n    foo: 'Bar';\n} | {\n    foo: 'Baz';\n} | {\n    foo: 'Qux';\n} | {\n    content: string;\n    foo: 'Quux';\n} | {\n    content: [\n        string,\n        string\n    ];\n    foo: 'Corge';\n};\n\nexport type ModelWithNestedArrayEnumsDataFoo = 'foo' | 'bar';\n\nexport type ModelWithNestedArrayEnumsDataBar = 'baz' | 'qux';\n\nexport type ModelWithNestedArrayEnumsData = {\n    foo?: Array<ModelWithNestedArrayEnumsDataFoo>;\n    bar?: Array<ModelWithNestedArrayEnumsDataBar>;\n};\n\nexport type ModelWithNestedArrayEnums = {\n    array_strings?: Array<string>;\n    data?: ModelWithNestedArrayEnumsData;\n};\n\nexport type ModelWithNestedCompositionEnums = {\n    foo?: ModelWithNestedArrayEnumsDataFoo;\n};\n\nexport type ModelWithReadOnlyAndWriteOnly = {\n    foo: string;\n    readonly bar: string;\n};\n\nexport type ModelWithConstantSizeArray = [\n    number,\n    number\n];\n\nexport type ModelWithAnyOfConstantSizeArray = [\n    number | string,\n    number | string,\n    number | string\n];\n\nexport type ModelWithPrefixItemsConstantSizeArray = [\n    ModelWithInteger,\n    number | string,\n    string\n];\n\nexport type ModelWithAnyOfConstantSizeArrayNullable = [\n    number | null | string,\n    number | null | string,\n    number | null | string\n];\n\nexport type ModelWithAnyOfConstantSizeArrayWithNSizeAndOptions = [\n    number | Import,\n    number | Import\n];\n\nexport type ModelWithAnyOfConstantSizeArrayAndIntersect = [\n    number & string,\n    number & string\n];\n\nexport type ModelWithNumericEnumUnion = {\n    /**\n     * Период\n     */\n    value?: -10 | -1 | 0 | 1 | 3 | 6 | 12;\n};\n\n/**\n * Some description with `back ticks`\n */\nexport type ModelWithBackticksInDescription = {\n    /**\n     * The template `that` should be used for parsing and importing the contents of the CSV file.\n     *\n     * <br/><p>There is one placeholder currently supported:<ul>     <li><b>${x}</b> - refers to the n-th column in the CSV file, e.g. ${1}, ${2}, ...)</li></ul><p>Example of a correct JSON template:</p>\n     * <pre>\n     * [\n     * {\n     * \"resourceType\": \"Asset\",\n     * \"identifier\": {\n     * \"name\": \"${1}\",\n     * \"domain\": {\n     * \"name\": \"${2}\",\n     * \"community\": {\n     * \"name\": \"Some Community\"\n     * }\n     * }\n     * },\n     * \"attributes\" : {\n     * \"00000000-0000-0000-0000-000000003115\" : [ {\n     * \"value\" : \"${3}\"\n     * } ],\n     * \"00000000-0000-0000-0000-000000000222\" : [ {\n     * \"value\" : \"${4}\"\n     * } ]\n     * }\n     * }\n     * ]\n     * </pre>\n     */\n    template?: string;\n};\n\nexport type ModelWithOneOfAndProperties = (SimpleParameter | NonAsciiStringæøåÆøÅöôêÊ字符串) & {\n    baz: number | null;\n    qux: number;\n};\n\n/**\n * Model used to test deduplication strategy (unused)\n */\nexport type ParameterSimpleParameterUnused = string;\n\n/**\n * Model used to test deduplication strategy\n */\nexport type PostServiceWithEmptyTagResponse = string;\n\n/**\n * Model used to test deduplication strategy\n */\nexport type PostServiceWithEmptyTagResponse2 = string;\n\n/**\n * Model used to test deduplication strategy\n */\nexport type DeleteFooData = string;\n\n/**\n * Model used to test deduplication strategy\n */\nexport type DeleteFooData2 = string;\n\n/**\n * Model with restricted keyword name\n */\nexport type Import = string;\n\nexport type SchemaWithFormRestrictedKeys = {\n    description?: string;\n    'x-enum-descriptions'?: string;\n    'x-enum-varnames'?: string;\n    'x-enumNames'?: string;\n    title?: string;\n    object?: {\n        description?: string;\n        'x-enum-descriptions'?: string;\n        'x-enum-varnames'?: string;\n        'x-enumNames'?: string;\n        title?: string;\n    };\n    array?: Array<{\n        description?: string;\n        'x-enum-descriptions'?: string;\n        'x-enum-varnames'?: string;\n        'x-enumNames'?: string;\n        title?: string;\n    }>;\n};\n\n/**\n * This schema was giving PascalCase transformations a hard time\n */\nexport type IoK8sApimachineryPkgApisMetaV1DeleteOptions = {\n    /**\n     * Must be fulfilled before a deletion is carried out. If not possible, a 409 Conflict status will be returned.\n     */\n    preconditions?: IoK8sApimachineryPkgApisMetaV1Preconditions;\n};\n\n/**\n * This schema was giving PascalCase transformations a hard time\n */\nexport type IoK8sApimachineryPkgApisMetaV1Preconditions = {\n    /**\n     * Specifies the target ResourceVersion\n     */\n    resourceVersion?: string;\n    /**\n     * Specifies the target UID.\n     */\n    uid?: string;\n};\n\nexport type AdditionalPropertiesUnknownIssue = {\n    [key: string]: string | number;\n};\n\nexport type AdditionalPropertiesUnknownIssue2 = {\n    [key: string]: string | number;\n};\n\nexport type AdditionalPropertiesUnknownIssue3 = string & {\n    entries: {\n        [key: string]: AdditionalPropertiesUnknownIssue;\n    };\n};\n\nexport type AdditionalPropertiesIntegerIssue = {\n    value: number;\n    [key: string]: number;\n};\n\nexport type OneOfAllOfIssue = ((ConstValue | GenericSchemaDuplicateIssue1SystemBoolean) & _3eNum1Период) | GenericSchemaDuplicateIssue1SystemString;\n\nexport type GenericSchemaDuplicateIssue1SystemBoolean = {\n    item?: boolean;\n    error?: string | null;\n    readonly hasError?: boolean;\n    data?: {\n        [key: string]: never;\n    };\n};\n\nexport type GenericSchemaDuplicateIssue1SystemString = {\n    item?: string | null;\n    error?: string | null;\n    readonly hasError?: boolean;\n};\n\nexport type ExternalSharedModel = {\n    id: string;\n    name?: string;\n};\n\n/**\n * This is a model with one property containing a reference\n */\nexport type ModelWithReferenceWritable = {\n    prop?: ModelWithPropertiesWritable;\n};\n\n/**\n * This is a model with one property containing an array\n */\nexport type ModelWithArrayReadOnlyAndWriteOnlyWritable = {\n    prop?: Array<ModelWithReadOnlyAndWriteOnlyWritable>;\n    propWithFile?: Array<Blob | File>;\n    propWithNumber?: Array<number>;\n};\n\n/**\n * This is a model with one nested property\n */\nexport type ModelWithPropertiesWritable = {\n    required: string;\n    requiredAndNullable: string | null;\n    string?: string;\n    number?: number;\n    boolean?: boolean;\n    reference?: ModelWithString;\n    'property with space'?: string;\n    default?: string;\n    try?: string;\n};\n\n/**\n * This is a model that contains a some patterns\n */\nexport type ModelWithPatternWritable = {\n    key: string;\n    name: string;\n    id?: string;\n    text?: string;\n    patternWithSingleQuotes?: string;\n    patternWithNewline?: string;\n    patternWithBacktick?: string;\n    patternWithUnicode?: string;\n};\n\nexport type FileWritable = {\n    /**\n     * Mime\n     */\n    mime: string;\n};\n\nexport type ModelWithReadOnlyAndWriteOnlyWritable = {\n    foo: string;\n    baz: string;\n};\n\nexport type ModelWithAnyOfConstantSizeArrayWithNSizeAndOptionsWritable = [\n    number | Import,\n    number | Import\n];\n\nexport type AdditionalPropertiesUnknownIssueWritable = {\n    [key: string]: string | number;\n};\n\nexport type OneOfAllOfIssueWritable = ((ConstValue | GenericSchemaDuplicateIssue1SystemBoolean) & _3eNum1Период) | GenericSchemaDuplicateIssue1SystemString;\n\nexport type GenericSchemaDuplicateIssue1SystemBooleanWritable = {\n    item?: boolean;\n    error?: string | null;\n    data?: {\n        [key: string]: never;\n    };\n};\n\nexport type GenericSchemaDuplicateIssue1SystemStringWritable = {\n    item?: string | null;\n    error?: string | null;\n};\n\n/**\n * This is a reusable parameter\n */\nexport type SimpleParameter = string;\n\n/**\n * Parameter with illegal characters\n */\nexport type XFooBar = ModelWithString;\n\n/**\n * A reusable request body\n */\nexport type SimpleRequestBody = ModelWithString;\n\n/**\n * A reusable request body\n */\nexport type SimpleFormData = ModelWithString;\n\nexport type ExportData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no+tag';\n};\n\nexport type PatchApiVbyApiVersionNoTagData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no+tag';\n};\n\nexport type PatchApiVbyApiVersionNoTagResponses = {\n    /**\n     * OK\n     */\n    default: unknown;\n};\n\nexport type ImportData = {\n    body: ModelWithReadOnlyAndWriteOnlyWritable | ModelWithArrayReadOnlyAndWriteOnlyWritable;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no+tag';\n};\n\nexport type ImportResponses = {\n    /**\n     * Success\n     */\n    200: ModelFromZendesk;\n    /**\n     * Default success response\n     */\n    default: ModelWithReadOnlyAndWriteOnly;\n};\n\nexport type ImportResponse = ImportResponses[keyof ImportResponses];\n\nexport type FooWowData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no+tag';\n};\n\nexport type FooWowResponses = {\n    /**\n     * OK\n     */\n    default: unknown;\n};\n\nexport type ApiVVersionODataControllerCountData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple/$count';\n};\n\nexport type ApiVVersionODataControllerCountResponses = {\n    /**\n     * Success\n     */\n    200: ModelFromZendesk;\n};\n\nexport type ApiVVersionODataControllerCountResponse = ApiVVersionODataControllerCountResponses[keyof ApiVVersionODataControllerCountResponses];\n\nexport type GetApiVbyApiVersionSimpleOperationData = {\n    body?: never;\n    path: {\n        /**\n         * foo in method\n         */\n        foo_param: string;\n    };\n    query?: never;\n    url: '/api/v{api-version}/simple:operation';\n};\n\nexport type GetApiVbyApiVersionSimpleOperationErrors = {\n    /**\n     * Default error response\n     */\n    default: ModelWithBoolean;\n};\n\nexport type GetApiVbyApiVersionSimpleOperationError = GetApiVbyApiVersionSimpleOperationErrors[keyof GetApiVbyApiVersionSimpleOperationErrors];\n\nexport type GetApiVbyApiVersionSimpleOperationResponses = {\n    /**\n     * Response is a simple number\n     */\n    200: number;\n};\n\nexport type GetApiVbyApiVersionSimpleOperationResponse = GetApiVbyApiVersionSimpleOperationResponses[keyof GetApiVbyApiVersionSimpleOperationResponses];\n\nexport type DeleteCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type GetCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type HeadCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type OptionsCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type PatchCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type PostCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type PutCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type DeleteFooData3 = {\n    body?: never;\n    headers: {\n        /**\n         * Parameter with illegal characters\n         */\n        'x-Foo-Bar': ModelWithString;\n    };\n    path: {\n        /**\n         * foo in method\n         */\n        foo_param: string;\n        /**\n         * bar in method\n         */\n        BarParam: string;\n    };\n    query?: never;\n    url: '/api/v{api-version}/foo/{foo_param}/bar/{BarParam}';\n};\n\nexport type CallWithDescriptionsData = {\n    body?: never;\n    path?: never;\n    query?: {\n        /**\n         * Testing multiline comments in string: First line\n         * Second line\n         *\n         * Fourth line\n         */\n        parameterWithBreaks?: string;\n        /**\n         * Testing backticks in string: `backticks` and ```multiple backticks``` should work\n         */\n        parameterWithBackticks?: string;\n        /**\n         * Testing slashes in string: \\backwards\\\\\\ and /forwards/// should work\n         */\n        parameterWithSlashes?: string;\n        /**\n         * Testing expression placeholders in string: ${expression} should work\n         */\n        parameterWithExpressionPlaceholders?: string;\n        /**\n         * Testing quotes in string: 'single quote''' and \"double quotes\"\"\" should work\n         */\n        parameterWithQuotes?: string;\n        /**\n         * Testing reserved characters in string: * inline * and ** inline ** should work\n         */\n        parameterWithReservedCharacters?: string;\n    };\n    url: '/api/v{api-version}/descriptions';\n};\n\nexport type DeprecatedCallData = {\n    body?: never;\n    headers: {\n        /**\n         * This parameter is deprecated\n         *\n         * @deprecated\n         */\n        parameter: DeprecatedModel | null;\n    };\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/parameters/deprecated';\n};\n\nexport type CallWithParametersData = {\n    /**\n     * This is the parameter that goes into the body\n     */\n    body: {\n        [key: string]: unknown;\n    } | null;\n    headers: {\n        /**\n         * This is the parameter that goes into the header\n         */\n        parameterHeader: string | null;\n    };\n    path: {\n        /**\n         * This is the parameter that goes into the path\n         */\n        parameterPath: string | null;\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string | null;\n    };\n    query: {\n        foo_ref_enum?: ModelWithNestedArrayEnumsDataFoo;\n        foo_all_of_enum: ModelWithNestedArrayEnumsDataFoo;\n        /**\n         * This is the parameter that goes into the query params\n         */\n        cursor: string | null;\n    };\n    url: '/api/v{api-version}/parameters/{parameterPath}';\n};\n\nexport type CallWithWeirdParameterNamesData = {\n    /**\n     * This is the parameter that goes into the body\n     */\n    body: ModelWithString | null;\n    headers: {\n        /**\n         * This is the parameter that goes into the request header\n         */\n        'parameter.header': string | null;\n    };\n    path: {\n        /**\n         * This is the parameter that goes into the path\n         */\n        'parameter.path.1'?: string;\n        /**\n         * This is the parameter that goes into the path\n         */\n        'parameter-path-2'?: string;\n        /**\n         * This is the parameter that goes into the path\n         */\n        'PARAMETER-PATH-3'?: string;\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string | null;\n    };\n    query: {\n        /**\n         * This is the parameter with a reserved keyword\n         */\n        default?: string;\n        /**\n         * This is the parameter that goes into the request query params\n         */\n        'parameter-query': string | null;\n    };\n    url: '/api/v{api-version}/parameters/{parameter.path.1}/{parameter-path-2}/{PARAMETER-PATH-3}';\n};\n\nexport type GetCallWithOptionalParamData = {\n    /**\n     * This is a required parameter\n     */\n    body: ModelWithOneOfEnum;\n    path?: never;\n    query?: {\n        /**\n         * This is an optional parameter\n         */\n        page?: number;\n    };\n    url: '/api/v{api-version}/parameters';\n};\n\nexport type PostCallWithOptionalParamData = {\n    /**\n     * This is an optional parameter\n     */\n    body?: {\n        offset?: number | null;\n    };\n    path?: never;\n    query: {\n        /**\n         * This is a required parameter\n         */\n        parameter: Pageable;\n    };\n    url: '/api/v{api-version}/parameters';\n};\n\nexport type PostCallWithOptionalParamResponses = {\n    /**\n     * Response is a simple number\n     */\n    200: number;\n    /**\n     * Success\n     */\n    204: void;\n};\n\nexport type PostCallWithOptionalParamResponse = PostCallWithOptionalParamResponses[keyof PostCallWithOptionalParamResponses];\n\nexport type PostApiVbyApiVersionRequestBodyData = {\n    /**\n     * A reusable request body\n     */\n    body?: SimpleRequestBody;\n    path?: never;\n    query?: {\n        /**\n         * This is a reusable parameter\n         */\n        parameter?: string;\n    };\n    url: '/api/v{api-version}/requestBody';\n};\n\nexport type PostApiVbyApiVersionFormDataData = {\n    /**\n     * A reusable request body\n     */\n    body?: SimpleFormData;\n    path?: never;\n    query?: {\n        /**\n         * This is a reusable parameter\n         */\n        parameter?: string;\n    };\n    url: '/api/v{api-version}/formData';\n};\n\nexport type CallWithDefaultParametersData = {\n    body?: never;\n    path?: never;\n    query?: {\n        /**\n         * This is a simple string with default value\n         */\n        parameterString?: string | null;\n        /**\n         * This is a simple number with default value\n         */\n        parameterNumber?: number | null;\n        /**\n         * This is a simple boolean with default value\n         */\n        parameterBoolean?: boolean | null;\n        /**\n         * This is a simple enum with default value\n         */\n        parameterEnum?: 'Success' | 'Warning' | 'Error';\n        /**\n         * This is a simple model with default value\n         */\n        parameterModel?: ModelWithString | null;\n    };\n    url: '/api/v{api-version}/defaults';\n};\n\nexport type CallWithDefaultOptionalParametersData = {\n    body?: never;\n    path?: never;\n    query?: {\n        /**\n         * This is a simple string that is optional with default value\n         */\n        parameterString?: string;\n        /**\n         * This is a simple number that is optional with default value\n         */\n        parameterNumber?: number;\n        /**\n         * This is a simple boolean that is optional with default value\n         */\n        parameterBoolean?: boolean;\n        /**\n         * This is a simple enum that is optional with default value\n         */\n        parameterEnum?: 'Success' | 'Warning' | 'Error';\n        /**\n         * This is a simple model that is optional with default value\n         */\n        parameterModel?: ModelWithString;\n    };\n    url: '/api/v{api-version}/defaults';\n};\n\nexport type CallToTestOrderOfParamsData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * This is a optional string with default\n         */\n        parameterOptionalStringWithDefault?: string;\n        /**\n         * This is a optional string with empty default\n         */\n        parameterOptionalStringWithEmptyDefault?: string;\n        /**\n         * This is a optional string with no default\n         */\n        parameterOptionalStringWithNoDefault?: string;\n        /**\n         * This is a string with default\n         */\n        parameterStringWithDefault: string;\n        /**\n         * This is a string with empty default\n         */\n        parameterStringWithEmptyDefault: string;\n        /**\n         * This is a string with no default\n         */\n        parameterStringWithNoDefault: string;\n        /**\n         * This is a string that can be null with no default\n         */\n        parameterStringNullableWithNoDefault?: string | null;\n        /**\n         * This is a string that can be null with default\n         */\n        parameterStringNullableWithDefault?: string | null;\n    };\n    url: '/api/v{api-version}/defaults';\n};\n\nexport type DuplicateNameData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/duplicate';\n};\n\nexport type DuplicateName2Data = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/duplicate';\n};\n\nexport type DuplicateName3Data = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/duplicate';\n};\n\nexport type DuplicateName4Data = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/duplicate';\n};\n\nexport type CallWithNoContentResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no-content';\n};\n\nexport type CallWithNoContentResponseResponses = {\n    /**\n     * Success\n     */\n    204: void;\n};\n\nexport type CallWithNoContentResponseResponse = CallWithNoContentResponseResponses[keyof CallWithNoContentResponseResponses];\n\nexport type CallWithResponseAndNoContentResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multiple-tags/response-and-no-content';\n};\n\nexport type CallWithResponseAndNoContentResponseResponses = {\n    /**\n     * Response is a simple number\n     */\n    200: number;\n    /**\n     * Success\n     */\n    204: void;\n};\n\nexport type CallWithResponseAndNoContentResponseResponse = CallWithResponseAndNoContentResponseResponses[keyof CallWithResponseAndNoContentResponseResponses];\n\nexport type DummyAData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multiple-tags/a';\n};\n\nexport type DummyAResponses = {\n    200: _400;\n};\n\nexport type DummyAResponse = DummyAResponses[keyof DummyAResponses];\n\nexport type DummyBData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multiple-tags/b';\n};\n\nexport type DummyBResponses = {\n    /**\n     * Success\n     */\n    204: void;\n};\n\nexport type DummyBResponse = DummyBResponses[keyof DummyBResponses];\n\nexport type CallWithResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/response';\n};\n\nexport type CallWithResponseResponses = {\n    default: Import;\n};\n\nexport type CallWithResponseResponse = CallWithResponseResponses[keyof CallWithResponseResponses];\n\nexport type CallWithDuplicateResponsesData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/response';\n};\n\nexport type CallWithDuplicateResponsesErrors = {\n    /**\n     * Message for 500 error\n     */\n    500: ModelWithStringError;\n    /**\n     * Message for 501 error\n     */\n    501: ModelWithStringError;\n    /**\n     * Message for 502 error\n     */\n    502: ModelWithStringError;\n    /**\n     * Message for 4XX errors\n     */\n    '4XX': DictionaryWithArray;\n    /**\n     * Default error response\n     */\n    default: ModelWithBoolean;\n};\n\nexport type CallWithDuplicateResponsesError = CallWithDuplicateResponsesErrors[keyof CallWithDuplicateResponsesErrors];\n\nexport type CallWithDuplicateResponsesResponses = {\n    /**\n     * Message for 200 response\n     */\n    200: ModelWithBoolean & ModelWithInteger;\n    /**\n     * Message for 201 response\n     */\n    201: ModelWithString;\n    /**\n     * Message for 202 response\n     */\n    202: ModelWithString;\n};\n\nexport type CallWithDuplicateResponsesResponse = CallWithDuplicateResponsesResponses[keyof CallWithDuplicateResponsesResponses];\n\nexport type CallWithResponsesData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/response';\n};\n\nexport type CallWithResponsesErrors = {\n    /**\n     * Message for 500 error\n     */\n    500: ModelWithStringError;\n    /**\n     * Message for 501 error\n     */\n    501: ModelWithStringError;\n    /**\n     * Message for 502 error\n     */\n    502: ModelWithStringError;\n    /**\n     * Message for default response\n     */\n    default: ModelWithStringError;\n};\n\nexport type CallWithResponsesError = CallWithResponsesErrors[keyof CallWithResponsesErrors];\n\nexport type CallWithResponsesResponses = {\n    /**\n     * Message for 200 response\n     */\n    200: {\n        readonly '@namespace.string'?: string;\n        readonly '@namespace.integer'?: number;\n        readonly value?: Array<ModelWithString>;\n    };\n    /**\n     * Message for 201 response\n     */\n    201: ModelThatExtends;\n    /**\n     * Message for 202 response\n     */\n    202: ModelThatExtendsExtends;\n};\n\nexport type CallWithResponsesResponse = CallWithResponsesResponses[keyof CallWithResponsesResponses];\n\nexport type CollectionFormatData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * This is an array parameter that is sent as csv format (comma-separated values)\n         */\n        parameterArrayCSV: Array<string> | null;\n        /**\n         * This is an array parameter that is sent as ssv format (space-separated values)\n         */\n        parameterArraySSV: Array<string> | null;\n        /**\n         * This is an array parameter that is sent as tsv format (tab-separated values)\n         */\n        parameterArrayTSV: Array<string> | null;\n        /**\n         * This is an array parameter that is sent as pipes format (pipe-separated values)\n         */\n        parameterArrayPipes: Array<string> | null;\n        /**\n         * This is an array parameter that is sent as multi format (multiple parameter instances)\n         */\n        parameterArrayMulti: Array<string> | null;\n    };\n    url: '/api/v{api-version}/collectionFormat';\n};\n\nexport type TypesData = {\n    body?: never;\n    path?: {\n        /**\n         * This is a number parameter\n         */\n        id?: number;\n    };\n    query: {\n        /**\n         * This is a number parameter\n         */\n        parameterNumber: number;\n        /**\n         * This is a string parameter\n         */\n        parameterString: string | null;\n        /**\n         * This is a boolean parameter\n         */\n        parameterBoolean: boolean | null;\n        /**\n         * This is an object parameter\n         */\n        parameterObject: {\n            [key: string]: unknown;\n        } | null;\n        /**\n         * This is an array parameter\n         */\n        parameterArray: Array<string> | null;\n        /**\n         * This is a dictionary parameter\n         */\n        parameterDictionary: {\n            [key: string]: unknown;\n        } | null;\n        /**\n         * This is an enum parameter\n         */\n        parameterEnum: 'Success' | 'Warning' | 'Error' | null;\n    };\n    url: '/api/v{api-version}/types';\n};\n\nexport type TypesResponses = {\n    /**\n     * Response is a simple number\n     */\n    200: number;\n    /**\n     * Response is a simple string\n     */\n    201: string;\n    /**\n     * Response is a simple boolean\n     */\n    202: boolean;\n    /**\n     * Response is a simple object\n     */\n    203: {\n        [key: string]: unknown;\n    };\n};\n\nexport type TypesResponse = TypesResponses[keyof TypesResponses];\n\nexport type UploadFileData = {\n    body: Blob | File;\n    path: {\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string | null;\n    };\n    query?: never;\n    url: '/api/v{api-version}/upload';\n};\n\nexport type UploadFileResponses = {\n    200: boolean;\n};\n\nexport type UploadFileResponse = UploadFileResponses[keyof UploadFileResponses];\n\nexport type FileResponseData = {\n    body?: never;\n    path: {\n        id: string;\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string;\n    };\n    query?: never;\n    url: '/api/v{api-version}/file/{id}';\n};\n\nexport type FileResponseResponses = {\n    /**\n     * Success\n     */\n    200: Blob | File;\n};\n\nexport type FileResponseResponse = FileResponseResponses[keyof FileResponseResponses];\n\nexport type ComplexTypesData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * Parameter containing object\n         */\n        parameterObject: {\n            first?: {\n                second?: {\n                    third?: string;\n                };\n            };\n        };\n        /**\n         * Parameter containing reference\n         */\n        parameterReference: ModelWithString;\n    };\n    url: '/api/v{api-version}/complex';\n};\n\nexport type ComplexTypesErrors = {\n    /**\n     * 400 `server` error\n     */\n    400: unknown;\n    /**\n     * 500 server error\n     */\n    500: unknown;\n};\n\nexport type ComplexTypesResponses = {\n    /**\n     * Successful response\n     */\n    200: Array<ModelWithString>;\n};\n\nexport type ComplexTypesResponse = ComplexTypesResponses[keyof ComplexTypesResponses];\n\nexport type MultipartResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multipart';\n};\n\nexport type MultipartResponseResponses = {\n    /**\n     * OK\n     */\n    200: {\n        file?: Blob | File;\n        metadata?: {\n            foo?: string;\n            bar?: string;\n        };\n    };\n};\n\nexport type MultipartResponseResponse = MultipartResponseResponses[keyof MultipartResponseResponses];\n\nexport type MultipartRequestData = {\n    body?: {\n        content?: Blob | File;\n        data?: ModelWithString | null;\n    };\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multipart';\n};\n\nexport type ComplexParamsData = {\n    body?: {\n        readonly key: string | null;\n        name: string | null;\n        enabled?: boolean;\n        type: 'Monkey' | 'Horse' | 'Bird';\n        listOfModels?: Array<ModelWithString> | null;\n        listOfStrings?: Array<string> | null;\n        parameters: ModelWithString | ModelWithEnum | ModelWithArray | ModelWithDictionary;\n        readonly user?: {\n            readonly id?: number;\n            readonly name?: string | null;\n        };\n    };\n    path: {\n        id: number;\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string;\n    };\n    query?: never;\n    url: '/api/v{api-version}/complex/{id}';\n};\n\nexport type ComplexParamsResponses = {\n    /**\n     * Success\n     */\n    200: ModelWithString;\n};\n\nexport type ComplexParamsResponse = ComplexParamsResponses[keyof ComplexParamsResponses];\n\nexport type CallWithResultFromHeaderData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/header';\n};\n\nexport type CallWithResultFromHeaderErrors = {\n    /**\n     * 400 server error\n     */\n    400: unknown;\n    /**\n     * 500 server error\n     */\n    500: unknown;\n};\n\nexport type CallWithResultFromHeaderResponses = {\n    /**\n     * Successful response\n     */\n    200: unknown;\n};\n\nexport type TestErrorCodeData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * Status code to return\n         */\n        status: number;\n    };\n    url: '/api/v{api-version}/error';\n};\n\nexport type TestErrorCodeErrors = {\n    /**\n     * Custom message: Internal Server Error\n     */\n    500: unknown;\n    /**\n     * Custom message: Not Implemented\n     */\n    501: unknown;\n    /**\n     * Custom message: Bad Gateway\n     */\n    502: unknown;\n    /**\n     * Custom message: Service Unavailable\n     */\n    503: unknown;\n};\n\nexport type TestErrorCodeResponses = {\n    /**\n     * Custom message: Successful response\n     */\n    200: unknown;\n};\n\nexport type NonAsciiæøåÆøÅöôêÊ字符串Data = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * Dummy input param\n         */\n        nonAsciiParamæøåÆØÅöôêÊ: number;\n    };\n    url: '/api/v{api-version}/non-ascii-æøåÆØÅöôêÊ字符串';\n};\n\nexport type NonAsciiæøåÆøÅöôêÊ字符串Responses = {\n    /**\n     * Successful response\n     */\n    200: Array<NonAsciiStringæøåÆøÅöôêÊ字符串>;\n};\n\nexport type NonAsciiæøåÆøÅöôêÊ字符串Response = NonAsciiæøåÆøÅöôêÊ字符串Responses[keyof NonAsciiæøåÆøÅöôêÊ字符串Responses];\n\nexport type PutWithFormUrlEncodedData = {\n    body: ArrayWithStrings;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/non-ascii-æøåÆØÅöôêÊ字符串';\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-fetch/tsconfig-nodenext-sdk/client/client.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport { createSseClient } from '../core/serverSentEvents.gen.js';\nimport type { HttpMethod } from '../core/types.gen.js';\nimport { getValidRequestBody } from '../core/utils.gen.js';\nimport type { Client, Config, RequestOptions, ResolvedRequestOptions } from './types.gen.js';\nimport {\n  buildUrl,\n  createConfig,\n  createInterceptors,\n  getParseAs,\n  mergeConfigs,\n  mergeHeaders,\n  setAuthParams,\n} from './utils.gen.js';\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 (options: RequestOptions) => {\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 url = buildUrl(opts);\n\n    return { opts, url };\n  };\n\n  const request: Client['request'] = async (options) => {\n    // @ts-expect-error\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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-fetch/tsconfig-nodenext-sdk/client/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type { Auth } from '../core/auth.gen.js';\nexport type { QuerySerializerOptions } from '../core/bodySerializer.gen.js';\nexport {\n  formDataBodySerializer,\n  jsonBodySerializer,\n  urlSearchParamsBodySerializer,\n} from '../core/bodySerializer.gen.js';\nexport { buildClientParams } from '../core/params.gen.js';\nexport { serializeQueryKeyValue } from '../core/queryKeySerializer.gen.js';\nexport { createClient } from './client.gen.js';\nexport type {\n  Client,\n  ClientOptions,\n  Config,\n  CreateClientConfig,\n  Options,\n  RequestOptions,\n  RequestResult,\n  ResolvedRequestOptions,\n  ResponseStyle,\n  TDataShape,\n} from './types.gen.js';\nexport { createConfig, mergeHeaders } from './utils.gen.js';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-fetch/tsconfig-nodenext-sdk/client/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { Auth } from '../core/auth.gen.js';\nimport type {\n  ServerSentEventsOptions,\n  ServerSentEventsResult,\n} from '../core/serverSentEvents.gen.js';\nimport type { Client as CoreClient, Config as CoreConfig } from '../core/types.gen.js';\nimport type { Middleware } from './utils.gen.js';\n\nexport type ResponseStyle = 'data' | 'fields';\n\nexport interface Config<T extends ClientOptions = ClientOptions>\n  extends Omit<RequestInit, 'body' | 'headers' | 'method'>, CoreConfig {\n  /**\n   * Base URL for all requests made by this client.\n   */\n  baseUrl?: T['baseUrl'];\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   * Please don't use the Fetch client for Next.js applications. The `next`\n   * options won't have any effect.\n   *\n   * Install {@link https://www.npmjs.com/package/@hey-api/client-next `@hey-api/client-next`} instead.\n   */\n  next?: never;\n  /**\n   * Return the response data parsed in a specified format. By default, `auto`\n   * will infer the appropriate method from the `Content-Type` response header.\n   * You can override this behavior with any of the {@link Body} methods.\n   * Select `stream` if you don't want to parse response data at all.\n   *\n   * @default 'auto'\n   */\n  parseAs?: 'arrayBuffer' | 'auto' | 'blob' | 'formData' | 'json' | 'stream' | 'text';\n  /**\n   * Should we return only data or multiple fields (data, error, response, etc.)?\n   *\n   * @default 'fields'\n   */\n  responseStyle?: ResponseStyle;\n  /**\n   * Throw an error instead of returning it in the response?\n   *\n   * @default false\n   */\n  throwOnError?: T['throwOnError'];\n}\n\nexport interface RequestOptions<\n  TData = unknown,\n  TResponseStyle extends ResponseStyle = 'fields',\n  ThrowOnError extends boolean = boolean,\n  Url extends string = string,\n>\n  extends\n    Config<{\n      responseStyle: TResponseStyle;\n      throwOnError: ThrowOnError;\n    }>,\n    Pick<\n      ServerSentEventsOptions<TData>,\n      | 'onRequest'\n      | 'onSseError'\n      | 'onSseEvent'\n      | 'sseDefaultRetryDelay'\n      | 'sseMaxRetryAttempts'\n      | 'sseMaxRetryDelay'\n    > {\n  /**\n   * Any body that you want to add to your request.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/fetch#body}\n   */\n  body?: unknown;\n  path?: Record<string, unknown>;\n  query?: Record<string, unknown>;\n  /**\n   * Security mechanism(s) to use for the request.\n   */\n  security?: ReadonlyArray<Auth>;\n  url: Url;\n}\n\nexport interface ResolvedRequestOptions<\n  TResponseStyle extends ResponseStyle = 'fields',\n  ThrowOnError extends boolean = boolean,\n  Url extends string = string,\n> extends RequestOptions<unknown, TResponseStyle, ThrowOnError, Url> {\n  serializedBody?: string;\n}\n\nexport type RequestResult<\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = boolean,\n  TResponseStyle extends ResponseStyle = 'fields',\n> = ThrowOnError extends true\n  ? Promise<\n      TResponseStyle extends 'data'\n        ? TData extends Record<string, unknown>\n          ? TData[keyof TData]\n          : TData\n        : {\n            data: TData extends Record<string, unknown> ? TData[keyof TData] : TData;\n            request: Request;\n            response: Response;\n          }\n    >\n  : Promise<\n      TResponseStyle extends 'data'\n        ? (TData extends Record<string, unknown> ? TData[keyof TData] : TData) | undefined\n        : (\n            | {\n                data: TData extends Record<string, unknown> ? TData[keyof TData] : TData;\n                error: undefined;\n              }\n            | {\n                data: undefined;\n                error: TError extends Record<string, unknown> ? TError[keyof TError] : TError;\n              }\n          ) & {\n            request: Request;\n            response: Response;\n          }\n    >;\n\nexport interface ClientOptions {\n  baseUrl?: string;\n  responseStyle?: ResponseStyle;\n  throwOnError?: boolean;\n}\n\ntype MethodFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'>,\n) => RequestResult<TData, TError, ThrowOnError, TResponseStyle>;\n\ntype SseFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'>,\n) => Promise<ServerSentEventsResult<TData, TError>>;\n\ntype RequestFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'> &\n    Pick<Required<RequestOptions<TData, TResponseStyle, ThrowOnError>>, 'method'>,\n) => RequestResult<TData, TError, ThrowOnError, TResponseStyle>;\n\ntype BuildUrlFn = <\n  TData extends {\n    body?: unknown;\n    path?: Record<string, unknown>;\n    query?: Record<string, unknown>;\n    url: string;\n  },\n>(\n  options: TData & Options<TData>,\n) => string;\n\nexport type Client = CoreClient<RequestFn, Config, MethodFn, BuildUrlFn, SseFn> & {\n  interceptors: Middleware<Request, Response, unknown, ResolvedRequestOptions>;\n};\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 = ClientOptions> = (\n  override?: Config<ClientOptions & T>,\n) => Config<Required<ClientOptions> & T>;\n\nexport interface TDataShape {\n  body?: unknown;\n  headers?: unknown;\n  path?: unknown;\n  query?: unknown;\n  url: string;\n}\n\ntype OmitKeys<T, K> = Pick<T, Exclude<keyof T, K>>;\n\nexport type Options<\n  TData extends TDataShape = TDataShape,\n  ThrowOnError extends boolean = boolean,\n  TResponse = unknown,\n  TResponseStyle extends ResponseStyle = 'fields',\n> = OmitKeys<\n  RequestOptions<TResponse, TResponseStyle, ThrowOnError>,\n  'body' | 'path' | 'query' | 'url'\n> &\n  ([TData] extends [never] ? unknown : Omit<TData, 'url'>);\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-fetch/tsconfig-nodenext-sdk/client/utils.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport { getAuthToken } from '../core/auth.gen.js';\nimport type { QuerySerializerOptions } from '../core/bodySerializer.gen.js';\nimport { jsonBodySerializer } from '../core/bodySerializer.gen.js';\nimport {\n  serializeArrayParam,\n  serializeObjectParam,\n  serializePrimitiveParam,\n} from '../core/pathSerializer.gen.js';\nimport { getUrl } from '../core/utils.gen.js';\nimport type { Client, ClientOptions, Config, RequestOptions } from './types.gen.js';\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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-fetch/tsconfig-nodenext-sdk/client.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport { type ClientOptions, type Config, createClient, createConfig } from './client/index.js';\nimport type { ClientOptions as ClientOptions2 } from './types.gen.js';\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: 'http://localhost:3000/base' }));\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-fetch/tsconfig-nodenext-sdk/core/auth.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-fetch/tsconfig-nodenext-sdk/core/bodySerializer.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { ArrayStyle, ObjectStyle, SerializerOptions } from './pathSerializer.gen.js';\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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-fetch/tsconfig-nodenext-sdk/core/params.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-fetch/tsconfig-nodenext-sdk/core/pathSerializer.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-fetch/tsconfig-nodenext-sdk/core/queryKeySerializer.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\n/**\n * JSON-friendly union that mirrors what Pinia Colada can hash.\n */\nexport type JsonValue =\n  | null\n  | string\n  | number\n  | boolean\n  | JsonValue[]\n  | { [key: string]: JsonValue };\n\n/**\n * Replacer that converts non-JSON values (bigint, Date, etc.) to safe substitutes.\n */\nexport const queryKeyJsonReplacer = (_key: string, value: unknown) => {\n  if (value === undefined || typeof value === 'function' || typeof value === 'symbol') {\n    return undefined;\n  }\n  if (typeof value === 'bigint') {\n    return value.toString();\n  }\n  if (value instanceof Date) {\n    return value.toISOString();\n  }\n  return value;\n};\n\n/**\n * Safely stringifies a value and parses it back into a JsonValue.\n */\nexport const stringifyToJsonValue = (input: unknown): JsonValue | undefined => {\n  try {\n    const json = JSON.stringify(input, queryKeyJsonReplacer);\n    if (json === undefined) {\n      return undefined;\n    }\n    return JSON.parse(json) as JsonValue;\n  } catch {\n    return undefined;\n  }\n};\n\n/**\n * Detects plain objects (including objects with a null prototype).\n */\nconst isPlainObject = (value: unknown): value is Record<string, unknown> => {\n  if (value === null || typeof value !== 'object') {\n    return false;\n  }\n  const prototype = Object.getPrototypeOf(value as object);\n  return prototype === Object.prototype || prototype === null;\n};\n\n/**\n * Turns URLSearchParams into a sorted JSON object for deterministic keys.\n */\nconst serializeSearchParams = (params: URLSearchParams): JsonValue => {\n  const entries = Array.from(params.entries()).sort(([a], [b]) => a.localeCompare(b));\n  const result: Record<string, JsonValue> = {};\n\n  for (const [key, value] of entries) {\n    const existing = result[key];\n    if (existing === undefined) {\n      result[key] = value;\n      continue;\n    }\n\n    if (Array.isArray(existing)) {\n      (existing as string[]).push(value);\n    } else {\n      result[key] = [existing, value];\n    }\n  }\n\n  return result;\n};\n\n/**\n * Normalizes any accepted value into a JSON-friendly shape for query keys.\n */\nexport const serializeQueryKeyValue = (value: unknown): JsonValue | undefined => {\n  if (value === null) {\n    return null;\n  }\n\n  if (typeof value === 'string' || typeof value === 'number' || typeof value === 'boolean') {\n    return value;\n  }\n\n  if (value === undefined || typeof value === 'function' || typeof value === 'symbol') {\n    return undefined;\n  }\n\n  if (typeof value === 'bigint') {\n    return value.toString();\n  }\n\n  if (value instanceof Date) {\n    return value.toISOString();\n  }\n\n  if (Array.isArray(value)) {\n    return stringifyToJsonValue(value);\n  }\n\n  if (typeof URLSearchParams !== 'undefined' && value instanceof URLSearchParams) {\n    return serializeSearchParams(value);\n  }\n\n  if (isPlainObject(value)) {\n    return stringifyToJsonValue(value);\n  }\n\n  return undefined;\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-fetch/tsconfig-nodenext-sdk/core/serverSentEvents.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { Config } from './types.gen.js';\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 const 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            // Normalize line endings: CRLF -> LF, then CR -> LF\n            buffer = buffer.replace(/\\r\\n/g, '\\n').replace(/\\r/g, '\\n');\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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-fetch/tsconfig-nodenext-sdk/core/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { Auth, AuthToken } from './auth.gen.js';\nimport type { BodySerializer, QuerySerializer, QuerySerializerOptions } from './bodySerializer.gen.js';\n\nexport type HttpMethod =\n  | 'connect'\n  | 'delete'\n  | 'get'\n  | 'head'\n  | 'options'\n  | 'patch'\n  | 'post'\n  | 'put'\n  | 'trace';\n\nexport type Client<\n  RequestFn = never,\n  Config = unknown,\n  MethodFn = never,\n  BuildUrlFn = never,\n  SseFn = never,\n> = {\n  /**\n   * Returns the final request URL.\n   */\n  buildUrl: BuildUrlFn;\n  getConfig: () => Config;\n  request: RequestFn;\n  setConfig: (config: Config) => Config;\n} & {\n  [K in HttpMethod]: MethodFn;\n} & ([SseFn] extends [never] ? { sse?: never } : { sse: { [K in HttpMethod]: SseFn } });\n\nexport interface Config {\n  /**\n   * Auth token or a function returning auth token. The resolved value will be\n   * added to the request payload as defined by its `security` array.\n   */\n  auth?: ((auth: Auth) => Promise<AuthToken> | AuthToken) | AuthToken;\n  /**\n   * A function for serializing request body parameter. By default,\n   * {@link JSON.stringify()} will be used.\n   */\n  bodySerializer?: BodySerializer | null;\n  /**\n   * An object containing any HTTP headers that you want to pre-populate your\n   * `Headers` object with.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/Headers/Headers#init See more}\n   */\n  headers?:\n    | RequestInit['headers']\n    | Record<\n        string,\n        string | number | boolean | (string | number | boolean)[] | null | undefined | unknown\n      >;\n  /**\n   * The request method.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/fetch#method See more}\n   */\n  method?: Uppercase<HttpMethod>;\n  /**\n   * A function for serializing request query parameters. By default, arrays\n   * will be exploded in form style, objects will be exploded in deepObject\n   * style, and reserved characters are percent-encoded.\n   *\n   * This method will have no effect if the native `paramsSerializer()` Axios\n   * API function is used.\n   *\n   * {@link https://swagger.io/docs/specification/serialization/#query View examples}\n   */\n  querySerializer?: QuerySerializer | QuerySerializerOptions;\n  /**\n   * A function validating request data. This is useful if you want to ensure\n   * the request conforms to the desired shape, so it can be safely sent to\n   * the server.\n   */\n  requestValidator?: (data: unknown) => Promise<unknown>;\n  /**\n   * A function transforming response data before it's returned. This is useful\n   * for post-processing data, e.g. converting ISO strings into Date objects.\n   */\n  responseTransformer?: (data: unknown) => Promise<unknown>;\n  /**\n   * A function validating response data. This is useful if you want to ensure\n   * the response conforms to the desired shape, so it can be safely passed to\n   * the transformers and returned to the user.\n   */\n  responseValidator?: (data: unknown) => Promise<unknown>;\n}\n\ntype IsExactlyNeverOrNeverUndefined<T> = [T] extends [never]\n  ? true\n  : [T] extends [never | undefined]\n    ? [undefined] extends [T]\n      ? false\n      : true\n    : false;\n\nexport type OmitNever<T extends Record<string, unknown>> = {\n  [K in keyof T as IsExactlyNeverOrNeverUndefined<T[K]> extends true ? never : K]: T[K];\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-fetch/tsconfig-nodenext-sdk/core/utils.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { BodySerializer, QuerySerializer } from './bodySerializer.gen.js';\nimport {\n  type ArraySeparatorStyle,\n  serializeArrayParam,\n  serializeObjectParam,\n  serializePrimitiveParam,\n} from './pathSerializer.gen.js';\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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-fetch/tsconfig-nodenext-sdk/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport { apiVVersionODataControllerCount, callToTestOrderOfParams, callWithDefaultOptionalParameters, callWithDefaultParameters, callWithDescriptions, callWithDuplicateResponses, callWithNoContentResponse, callWithParameters, callWithResponse, callWithResponseAndNoContentResponse, callWithResponses, callWithResultFromHeader, callWithWeirdParameterNames, collectionFormat, complexParams, complexTypes, deleteCallWithoutParametersAndResponse, deleteFoo, deprecatedCall, dummyA, dummyB, duplicateName, duplicateName2, duplicateName3, duplicateName4, export_, fileResponse, fooWow, getApiVbyApiVersionSimpleOperation, getCallWithOptionalParam, getCallWithoutParametersAndResponse, headCallWithoutParametersAndResponse, import_, multipartRequest, multipartResponse, nonAsciiæøåÆøÅöôêÊ字符串, type Options, optionsCallWithoutParametersAndResponse, patchApiVbyApiVersionNoTag, patchCallWithoutParametersAndResponse, postApiVbyApiVersionFormData, postApiVbyApiVersionRequestBody, postCallWithOptionalParam, postCallWithoutParametersAndResponse, putCallWithoutParametersAndResponse, putWithFormUrlEncoded, testErrorCode, types, uploadFile } from './sdk.gen.js';\nexport type { _3eNum1Период, _400, AdditionalPropertiesIntegerIssue, AdditionalPropertiesUnknownIssue, AdditionalPropertiesUnknownIssue2, AdditionalPropertiesUnknownIssue3, AdditionalPropertiesUnknownIssueWritable, AnyOfAnyAndNull, AnyOfArrays, ApiVVersionODataControllerCountData, ApiVVersionODataControllerCountResponse, ApiVVersionODataControllerCountResponses, ArrayWithAnyOfProperties, ArrayWithArray, ArrayWithBooleans, ArrayWithNumbers, ArrayWithProperties, ArrayWithReferences, ArrayWithStrings, CallToTestOrderOfParamsData, CallWithDefaultOptionalParametersData, CallWithDefaultParametersData, CallWithDescriptionsData, CallWithDuplicateResponsesData, CallWithDuplicateResponsesError, CallWithDuplicateResponsesErrors, CallWithDuplicateResponsesResponse, CallWithDuplicateResponsesResponses, CallWithNoContentResponseData, CallWithNoContentResponseResponse, CallWithNoContentResponseResponses, CallWithParametersData, CallWithResponseAndNoContentResponseData, CallWithResponseAndNoContentResponseResponse, CallWithResponseAndNoContentResponseResponses, CallWithResponseData, CallWithResponseResponse, CallWithResponseResponses, CallWithResponsesData, CallWithResponsesError, CallWithResponsesErrors, CallWithResponsesResponse, CallWithResponsesResponses, CallWithResultFromHeaderData, CallWithResultFromHeaderErrors, CallWithResultFromHeaderResponses, CallWithWeirdParameterNamesData, CamelCaseCommentWithBreaks, CharactersInDescription, ClientOptions, CollectionFormatData, CommentWithBackticks, CommentWithBackticksAndQuotes, CommentWithBreaks, CommentWithExpressionPlaceholders, CommentWithQuotes, CommentWithReservedCharacters, CommentWithSlashes, ComplexParamsData, ComplexParamsResponse, ComplexParamsResponses, ComplexTypesData, ComplexTypesErrors, ComplexTypesResponse, ComplexTypesResponses, CompositionBaseModel, CompositionExtendedModel, CompositionWithAllOfAndNullable, CompositionWithAnyOf, CompositionWithAnyOfAndNullable, CompositionWithAnyOfAnonymous, CompositionWithNestedAnyAndTypeNull, CompositionWithNestedAnyOfAndNull, CompositionWithOneOf, CompositionWithOneOfAndComplexArrayDictionary, CompositionWithOneOfAndNullable, CompositionWithOneOfAndProperties, CompositionWithOneOfAndSimpleArrayDictionary, CompositionWithOneOfAndSimpleDictionary, CompositionWithOneOfAnonymous, CompositionWithOneOfDiscriminator, ConstValue, Default, DeleteCallWithoutParametersAndResponseData, DeleteFooData, DeleteFooData2, DeleteFooData3, DeprecatedCallData, DeprecatedModel, DictionaryWithArray, DictionaryWithDictionary, DictionaryWithProperties, DictionaryWithPropertiesAndAdditionalProperties, DictionaryWithReference, DictionaryWithString, DummyAData, DummyAResponse, DummyAResponses, DummyBData, DummyBResponse, DummyBResponses, DuplicateName2Data, DuplicateName3Data, DuplicateName4Data, DuplicateNameData, EnumFromDescription, EnumWithExtensions, EnumWithNumbers, EnumWithReplacedCharacters, EnumWithStrings, EnumWithXEnumNames, ExportData, ExternalRefA, ExternalRefB, ExternalSharedModel, File, FileResponseData, FileResponseResponse, FileResponseResponses, FileWritable, FooWowData, FooWowResponses, FreeFormObjectWithAdditionalPropertiesEqEmptyObject, FreeFormObjectWithAdditionalPropertiesEqTrue, FreeFormObjectWithoutAdditionalProperties, GenericSchemaDuplicateIssue1SystemBoolean, GenericSchemaDuplicateIssue1SystemBooleanWritable, GenericSchemaDuplicateIssue1SystemString, GenericSchemaDuplicateIssue1SystemStringWritable, GetApiVbyApiVersionSimpleOperationData, GetApiVbyApiVersionSimpleOperationError, GetApiVbyApiVersionSimpleOperationErrors, GetApiVbyApiVersionSimpleOperationResponse, GetApiVbyApiVersionSimpleOperationResponses, GetCallWithOptionalParamData, GetCallWithoutParametersAndResponseData, HeadCallWithoutParametersAndResponseData, Import, ImportData, ImportResponse, ImportResponses, IoK8sApimachineryPkgApisMetaV1DeleteOptions, IoK8sApimachineryPkgApisMetaV1Preconditions, ModelCircle, ModelFromZendesk, ModelSquare, ModelThatExtends, ModelThatExtendsExtends, ModelWithAdditionalPropertiesEqTrue, ModelWithAdditionalPropertiesRef, ModelWithAnyOfConstantSizeArray, ModelWithAnyOfConstantSizeArrayAndIntersect, ModelWithAnyOfConstantSizeArrayNullable, ModelWithAnyOfConstantSizeArrayWithNSizeAndOptions, ModelWithAnyOfConstantSizeArrayWithNSizeAndOptionsWritable, ModelWithArray, ModelWithArrayReadOnlyAndWriteOnly, ModelWithArrayReadOnlyAndWriteOnlyWritable, ModelWithBackticksInDescription, ModelWithBoolean, ModelWithCircularReference, ModelWithConst, ModelWithConstantSizeArray, ModelWithDictionary, ModelWithDuplicateImports, ModelWithDuplicateProperties, ModelWithEnum, ModelWithEnumFromDescription, ModelWithEnumWithHyphen, ModelWithInteger, ModelWithNestedArrayEnums, ModelWithNestedArrayEnumsData, ModelWithNestedArrayEnumsDataBar, ModelWithNestedArrayEnumsDataFoo, ModelWithNestedCompositionEnums, ModelWithNestedEnums, ModelWithNestedProperties, ModelWithNullableObject, ModelWithNullableString, ModelWithNumericEnumUnion, ModelWithOneOfAndProperties, ModelWithOneOfEnum, ModelWithOrderedProperties, ModelWithPattern, ModelWithPatternWritable, ModelWithPrefixItemsConstantSizeArray, ModelWithProperties, ModelWithPropertiesWritable, ModelWithReadOnlyAndWriteOnly, ModelWithReadOnlyAndWriteOnlyWritable, ModelWithReference, ModelWithReferenceWritable, ModelWithString, ModelWithStringError, MultipartRequestData, MultipartResponseData, MultipartResponseResponse, MultipartResponseResponses, NestedAnyOfArraysNullable, NonAsciiæøåÆøÅöôêÊ字符串Data, NonAsciiæøåÆøÅöôêÊ字符串Response, NonAsciiæøåÆøÅöôêÊ字符串Responses, NonAsciiStringæøåÆøÅöôêÊ字符串, NullableObject, OneOfAllOfIssue, OneOfAllOfIssueWritable, OptionsCallWithoutParametersAndResponseData, Pageable, ParameterSimpleParameterUnused, PatchApiVbyApiVersionNoTagData, PatchApiVbyApiVersionNoTagResponses, PatchCallWithoutParametersAndResponseData, PostApiVbyApiVersionFormDataData, PostApiVbyApiVersionRequestBodyData, PostCallWithOptionalParamData, PostCallWithOptionalParamResponse, PostCallWithOptionalParamResponses, PostCallWithoutParametersAndResponseData, PostServiceWithEmptyTagResponse, PostServiceWithEmptyTagResponse2, PutCallWithoutParametersAndResponseData, PutWithFormUrlEncodedData, SchemaWithFormRestrictedKeys, SimpleBoolean, SimpleFile, SimpleFormData, SimpleInteger, SimpleParameter, SimpleReference, SimpleRequestBody, SimpleString, SimpleStringWithPattern, TestErrorCodeData, TestErrorCodeErrors, TestErrorCodeResponses, TypesData, TypesResponse, TypesResponses, UploadFileData, UploadFileResponse, UploadFileResponses, XFooBar } from './types.gen.js';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-fetch/tsconfig-nodenext-sdk/sdk.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport { client } from './client.gen.js';\nimport { type Client, formDataBodySerializer, type Options as Options2, type TDataShape, urlSearchParamsBodySerializer } from './client/index.js';\nimport type { ApiVVersionODataControllerCountData, ApiVVersionODataControllerCountResponses, CallToTestOrderOfParamsData, CallWithDefaultOptionalParametersData, CallWithDefaultParametersData, CallWithDescriptionsData, CallWithDuplicateResponsesData, CallWithDuplicateResponsesErrors, CallWithDuplicateResponsesResponses, CallWithNoContentResponseData, CallWithNoContentResponseResponses, CallWithParametersData, CallWithResponseAndNoContentResponseData, CallWithResponseAndNoContentResponseResponses, CallWithResponseData, CallWithResponseResponses, CallWithResponsesData, CallWithResponsesErrors, CallWithResponsesResponses, CallWithResultFromHeaderData, CallWithResultFromHeaderErrors, CallWithResultFromHeaderResponses, CallWithWeirdParameterNamesData, CollectionFormatData, ComplexParamsData, ComplexParamsResponses, ComplexTypesData, ComplexTypesErrors, ComplexTypesResponses, DeleteCallWithoutParametersAndResponseData, DeleteFooData3, DeprecatedCallData, DummyAData, DummyAResponses, DummyBData, DummyBResponses, DuplicateName2Data, DuplicateName3Data, DuplicateName4Data, DuplicateNameData, ExportData, FileResponseData, FileResponseResponses, FooWowData, FooWowResponses, GetApiVbyApiVersionSimpleOperationData, GetApiVbyApiVersionSimpleOperationErrors, GetApiVbyApiVersionSimpleOperationResponses, GetCallWithOptionalParamData, GetCallWithoutParametersAndResponseData, HeadCallWithoutParametersAndResponseData, ImportData, ImportResponses, MultipartRequestData, MultipartResponseData, MultipartResponseResponses, NonAsciiæøåÆøÅöôêÊ字符串Data, NonAsciiæøåÆøÅöôêÊ字符串Responses, OptionsCallWithoutParametersAndResponseData, PatchApiVbyApiVersionNoTagData, PatchApiVbyApiVersionNoTagResponses, PatchCallWithoutParametersAndResponseData, PostApiVbyApiVersionFormDataData, PostApiVbyApiVersionRequestBodyData, PostCallWithOptionalParamData, PostCallWithOptionalParamResponses, PostCallWithoutParametersAndResponseData, PutCallWithoutParametersAndResponseData, PutWithFormUrlEncodedData, TestErrorCodeData, TestErrorCodeErrors, TestErrorCodeResponses, TypesData, TypesResponses, UploadFileData, UploadFileResponses } from './types.gen.js';\n\nexport type Options<TData extends TDataShape = TDataShape, ThrowOnError extends boolean = boolean> = Options2<TData, ThrowOnError> & {\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\nexport const export_ = <ThrowOnError extends boolean = false>(options?: Options<ExportData, ThrowOnError>) => (options?.client ?? client).get<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/no+tag', ...options });\n\nexport const patchApiVbyApiVersionNoTag = <ThrowOnError extends boolean = false>(options?: Options<PatchApiVbyApiVersionNoTagData, ThrowOnError>) => (options?.client ?? client).patch<PatchApiVbyApiVersionNoTagResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/no+tag', ...options });\n\nexport const import_ = <ThrowOnError extends boolean = false>(options: Options<ImportData, ThrowOnError>) => (options.client ?? client).post<ImportResponses, unknown, ThrowOnError>({\n    url: '/api/v{api-version}/no+tag',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options.headers\n    }\n});\n\nexport const fooWow = <ThrowOnError extends boolean = false>(options?: Options<FooWowData, ThrowOnError>) => (options?.client ?? client).put<FooWowResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/no+tag', ...options });\n\nexport const apiVVersionODataControllerCount = <ThrowOnError extends boolean = false>(options?: Options<ApiVVersionODataControllerCountData, ThrowOnError>) => (options?.client ?? client).get<ApiVVersionODataControllerCountResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple/$count', ...options });\n\nexport const getApiVbyApiVersionSimpleOperation = <ThrowOnError extends boolean = false>(options: Options<GetApiVbyApiVersionSimpleOperationData, ThrowOnError>) => (options.client ?? client).get<GetApiVbyApiVersionSimpleOperationResponses, GetApiVbyApiVersionSimpleOperationErrors, ThrowOnError>({ url: '/api/v{api-version}/simple:operation', ...options });\n\nexport const deleteCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<DeleteCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).delete<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const getCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<GetCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).get<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const headCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<HeadCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).head<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const optionsCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<OptionsCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).options<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const patchCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<PatchCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).patch<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const postCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<PostCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).post<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const putCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<PutCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).put<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const deleteFoo = <ThrowOnError extends boolean = false>(options: Options<DeleteFooData3, ThrowOnError>) => (options.client ?? client).delete<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/foo/{foo_param}/bar/{BarParam}', ...options });\n\nexport const callWithDescriptions = <ThrowOnError extends boolean = false>(options?: Options<CallWithDescriptionsData, ThrowOnError>) => (options?.client ?? client).post<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/descriptions', ...options });\n\n/**\n * @deprecated\n */\nexport const deprecatedCall = <ThrowOnError extends boolean = false>(options: Options<DeprecatedCallData, ThrowOnError>) => (options.client ?? client).post<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/parameters/deprecated', ...options });\n\nexport const callWithParameters = <ThrowOnError extends boolean = false>(options: Options<CallWithParametersData, ThrowOnError>) => (options.client ?? client).post<unknown, unknown, ThrowOnError>({\n    url: '/api/v{api-version}/parameters/{parameterPath}',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options.headers\n    }\n});\n\nexport const callWithWeirdParameterNames = <ThrowOnError extends boolean = false>(options: Options<CallWithWeirdParameterNamesData, ThrowOnError>) => (options.client ?? client).post<unknown, unknown, ThrowOnError>({\n    url: '/api/v{api-version}/parameters/{parameter.path.1}/{parameter-path-2}/{PARAMETER-PATH-3}',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options.headers\n    }\n});\n\nexport const getCallWithOptionalParam = <ThrowOnError extends boolean = false>(options: Options<GetCallWithOptionalParamData, ThrowOnError>) => (options.client ?? client).get<unknown, unknown, ThrowOnError>({\n    url: '/api/v{api-version}/parameters',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options.headers\n    }\n});\n\nexport const postCallWithOptionalParam = <ThrowOnError extends boolean = false>(options: Options<PostCallWithOptionalParamData, ThrowOnError>) => (options.client ?? client).post<PostCallWithOptionalParamResponses, unknown, ThrowOnError>({\n    url: '/api/v{api-version}/parameters',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options.headers\n    }\n});\n\nexport const postApiVbyApiVersionRequestBody = <ThrowOnError extends boolean = false>(options?: Options<PostApiVbyApiVersionRequestBodyData, ThrowOnError>) => (options?.client ?? client).post<unknown, unknown, ThrowOnError>({\n    url: '/api/v{api-version}/requestBody',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options?.headers\n    }\n});\n\nexport const postApiVbyApiVersionFormData = <ThrowOnError extends boolean = false>(options?: Options<PostApiVbyApiVersionFormDataData, ThrowOnError>) => (options?.client ?? client).post<unknown, unknown, ThrowOnError>({\n    ...formDataBodySerializer,\n    url: '/api/v{api-version}/formData',\n    ...options,\n    headers: {\n        'Content-Type': null,\n        ...options?.headers\n    }\n});\n\nexport const callWithDefaultParameters = <ThrowOnError extends boolean = false>(options?: Options<CallWithDefaultParametersData, ThrowOnError>) => (options?.client ?? client).get<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/defaults', ...options });\n\nexport const callWithDefaultOptionalParameters = <ThrowOnError extends boolean = false>(options?: Options<CallWithDefaultOptionalParametersData, ThrowOnError>) => (options?.client ?? client).post<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/defaults', ...options });\n\nexport const callToTestOrderOfParams = <ThrowOnError extends boolean = false>(options: Options<CallToTestOrderOfParamsData, ThrowOnError>) => (options.client ?? client).put<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/defaults', ...options });\n\nexport const duplicateName = <ThrowOnError extends boolean = false>(options?: Options<DuplicateNameData, ThrowOnError>) => (options?.client ?? client).delete<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/duplicate', ...options });\n\nexport const duplicateName2 = <ThrowOnError extends boolean = false>(options?: Options<DuplicateName2Data, ThrowOnError>) => (options?.client ?? client).get<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/duplicate', ...options });\n\nexport const duplicateName3 = <ThrowOnError extends boolean = false>(options?: Options<DuplicateName3Data, ThrowOnError>) => (options?.client ?? client).post<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/duplicate', ...options });\n\nexport const duplicateName4 = <ThrowOnError extends boolean = false>(options?: Options<DuplicateName4Data, ThrowOnError>) => (options?.client ?? client).put<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/duplicate', ...options });\n\nexport const callWithNoContentResponse = <ThrowOnError extends boolean = false>(options?: Options<CallWithNoContentResponseData, ThrowOnError>) => (options?.client ?? client).get<CallWithNoContentResponseResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/no-content', ...options });\n\nexport const callWithResponseAndNoContentResponse = <ThrowOnError extends boolean = false>(options?: Options<CallWithResponseAndNoContentResponseData, ThrowOnError>) => (options?.client ?? client).get<CallWithResponseAndNoContentResponseResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/multiple-tags/response-and-no-content', ...options });\n\nexport const dummyA = <ThrowOnError extends boolean = false>(options?: Options<DummyAData, ThrowOnError>) => (options?.client ?? client).get<DummyAResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/multiple-tags/a', ...options });\n\nexport const dummyB = <ThrowOnError extends boolean = false>(options?: Options<DummyBData, ThrowOnError>) => (options?.client ?? client).get<DummyBResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/multiple-tags/b', ...options });\n\nexport const callWithResponse = <ThrowOnError extends boolean = false>(options?: Options<CallWithResponseData, ThrowOnError>) => (options?.client ?? client).get<CallWithResponseResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/response', ...options });\n\nexport const callWithDuplicateResponses = <ThrowOnError extends boolean = false>(options?: Options<CallWithDuplicateResponsesData, ThrowOnError>) => (options?.client ?? client).post<CallWithDuplicateResponsesResponses, CallWithDuplicateResponsesErrors, ThrowOnError>({ url: '/api/v{api-version}/response', ...options });\n\nexport const callWithResponses = <ThrowOnError extends boolean = false>(options?: Options<CallWithResponsesData, ThrowOnError>) => (options?.client ?? client).put<CallWithResponsesResponses, CallWithResponsesErrors, ThrowOnError>({ url: '/api/v{api-version}/response', ...options });\n\nexport const collectionFormat = <ThrowOnError extends boolean = false>(options: Options<CollectionFormatData, ThrowOnError>) => (options.client ?? client).get<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/collectionFormat', ...options });\n\nexport const types = <ThrowOnError extends boolean = false>(options: Options<TypesData, ThrowOnError>) => (options.client ?? client).get<TypesResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/types', ...options });\n\nexport const uploadFile = <ThrowOnError extends boolean = false>(options: Options<UploadFileData, ThrowOnError>) => (options.client ?? client).post<UploadFileResponses, unknown, ThrowOnError>({\n    ...urlSearchParamsBodySerializer,\n    url: '/api/v{api-version}/upload',\n    ...options,\n    headers: {\n        'Content-Type': 'application/x-www-form-urlencoded',\n        ...options.headers\n    }\n});\n\nexport const fileResponse = <ThrowOnError extends boolean = false>(options: Options<FileResponseData, ThrowOnError>) => (options.client ?? client).get<FileResponseResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/file/{id}', ...options });\n\nexport const complexTypes = <ThrowOnError extends boolean = false>(options: Options<ComplexTypesData, ThrowOnError>) => (options.client ?? client).get<ComplexTypesResponses, ComplexTypesErrors, ThrowOnError>({\n    querySerializer: { parameters: { parameterObject: { object: { style: 'form' } } } },\n    url: '/api/v{api-version}/complex',\n    ...options\n});\n\nexport const multipartResponse = <ThrowOnError extends boolean = false>(options?: Options<MultipartResponseData, ThrowOnError>) => (options?.client ?? client).get<MultipartResponseResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/multipart', ...options });\n\nexport const multipartRequest = <ThrowOnError extends boolean = false>(options?: Options<MultipartRequestData, ThrowOnError>) => (options?.client ?? client).post<unknown, unknown, ThrowOnError>({\n    ...formDataBodySerializer,\n    url: '/api/v{api-version}/multipart',\n    ...options,\n    headers: {\n        'Content-Type': null,\n        ...options?.headers\n    }\n});\n\nexport const complexParams = <ThrowOnError extends boolean = false>(options: Options<ComplexParamsData, ThrowOnError>) => (options.client ?? client).put<ComplexParamsResponses, unknown, ThrowOnError>({\n    url: '/api/v{api-version}/complex/{id}',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json-patch+json',\n        ...options.headers\n    }\n});\n\nexport const callWithResultFromHeader = <ThrowOnError extends boolean = false>(options?: Options<CallWithResultFromHeaderData, ThrowOnError>) => (options?.client ?? client).post<CallWithResultFromHeaderResponses, CallWithResultFromHeaderErrors, ThrowOnError>({ url: '/api/v{api-version}/header', ...options });\n\nexport const testErrorCode = <ThrowOnError extends boolean = false>(options: Options<TestErrorCodeData, ThrowOnError>) => (options.client ?? client).post<TestErrorCodeResponses, TestErrorCodeErrors, ThrowOnError>({ url: '/api/v{api-version}/error', ...options });\n\nexport const nonAsciiæøåÆøÅöôêÊ字符串 = <ThrowOnError extends boolean = false>(options: Options<NonAsciiæøåÆøÅöôêÊ字符串Data, ThrowOnError>) => (options.client ?? client).post<NonAsciiæøåÆøÅöôêÊ字符串Responses, unknown, ThrowOnError>({ url: '/api/v{api-version}/non-ascii-æøåÆØÅöôêÊ字符串', ...options });\n\n/**\n * Login User\n */\nexport const putWithFormUrlEncoded = <ThrowOnError extends boolean = false>(options: Options<PutWithFormUrlEncodedData, ThrowOnError>) => (options.client ?? client).put<unknown, unknown, ThrowOnError>({\n    ...urlSearchParamsBodySerializer,\n    url: '/api/v{api-version}/non-ascii-æøåÆØÅöôêÊ字符串',\n    ...options,\n    headers: {\n        'Content-Type': 'application/x-www-form-urlencoded',\n        ...options.headers\n    }\n});\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-fetch/tsconfig-nodenext-sdk/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type ClientOptions = {\n    baseUrl: 'http://localhost:3000/base' | (string & {});\n};\n\n/**\n * Model with number-only name\n */\nexport type _400 = string;\n\n/**\n * External ref to shared model (A)\n */\nexport type ExternalRefA = ExternalSharedModel;\n\n/**\n * External ref to shared model (B)\n */\nexport type ExternalRefB = ExternalSharedModel;\n\n/**\n * Testing multiline comments in string: First line\n * Second line\n *\n * Fourth line\n */\nexport type CamelCaseCommentWithBreaks = number;\n\n/**\n * Testing multiline comments in string: First line\n * Second line\n *\n * Fourth line\n */\nexport type CommentWithBreaks = number;\n\n/**\n * Testing backticks in string: `backticks` and ```multiple backticks``` should work\n */\nexport type CommentWithBackticks = number;\n\n/**\n * Testing backticks and quotes in string: `backticks`, 'quotes', \"double quotes\" and ```multiple backticks``` should work\n */\nexport type CommentWithBackticksAndQuotes = number;\n\n/**\n * Testing slashes in string: \\backwards\\\\\\ and /forwards/// should work\n */\nexport type CommentWithSlashes = number;\n\n/**\n * Testing expression placeholders in string: ${expression} should work\n */\nexport type CommentWithExpressionPlaceholders = number;\n\n/**\n * Testing quotes in string: 'single quote''' and \"double quotes\"\"\" should work\n */\nexport type CommentWithQuotes = number;\n\n/**\n * Testing reserved characters in string: * inline * and ** inline ** should work\n */\nexport type CommentWithReservedCharacters = number;\n\n/**\n * This is a simple number\n */\nexport type SimpleInteger = number;\n\n/**\n * This is a simple boolean\n */\nexport type SimpleBoolean = boolean;\n\n/**\n * This is a simple string\n */\nexport type SimpleString = string;\n\n/**\n * A string with non-ascii (unicode) characters valid in typescript identifiers (æøåÆØÅöÔèÈ字符串)\n */\nexport type NonAsciiStringæøåÆøÅöôêÊ字符串 = string;\n\n/**\n * This is a simple file\n */\nexport type SimpleFile = Blob | File;\n\n/**\n * This is a simple reference\n */\nexport type SimpleReference = ModelWithString;\n\n/**\n * This is a simple string\n */\nexport type SimpleStringWithPattern = string | null;\n\n/**\n * This is a simple enum with strings\n */\nexport type EnumWithStrings = 'Success' | 'Warning' | 'Error' | '\\'Single Quote\\'' | '\"Double Quotes\"' | 'Non-ascii: øæåôöØÆÅÔÖ字符串';\n\nexport type EnumWithReplacedCharacters = '\\'Single Quote\\'' | '\"Double Quotes\"' | 'øæåôöØÆÅÔÖ字符串' | 3.1 | '';\n\n/**\n * This is a simple enum with numbers\n */\nexport type EnumWithNumbers = 1 | 2 | 3 | 1.1 | 1.2 | 1.3 | 100 | 200 | 300 | -100 | -200 | -300 | -1.1 | -1.2 | -1.3;\n\n/**\n * Success=1,Warning=2,Error=3\n */\nexport type EnumFromDescription = number;\n\n/**\n * This is a simple enum with numbers\n */\nexport type EnumWithExtensions = 200 | 400 | 500;\n\nexport type EnumWithXEnumNames = 0 | 1 | 2;\n\n/**\n * This is a simple array with numbers\n */\nexport type ArrayWithNumbers = Array<number>;\n\n/**\n * This is a simple array with booleans\n */\nexport type ArrayWithBooleans = Array<boolean>;\n\n/**\n * This is a simple array with strings\n */\nexport type ArrayWithStrings = Array<string>;\n\n/**\n * This is a simple array with references\n */\nexport type ArrayWithReferences = Array<ModelWithString>;\n\n/**\n * This is a simple array containing an array\n */\nexport type ArrayWithArray = Array<Array<ModelWithString>>;\n\n/**\n * This is a simple array with properties\n */\nexport type ArrayWithProperties = Array<{\n    '16x16'?: CamelCaseCommentWithBreaks;\n    bar?: string;\n}>;\n\n/**\n * This is a simple array with any of properties\n */\nexport type ArrayWithAnyOfProperties = Array<{\n    foo?: string;\n} | {\n    bar?: string;\n}>;\n\nexport type AnyOfAnyAndNull = {\n    data?: unknown | null;\n};\n\n/**\n * This is a simple array with any of properties\n */\nexport type AnyOfArrays = {\n    results?: Array<{\n        foo?: string;\n    } | {\n        bar?: string;\n    }>;\n};\n\n/**\n * This is a string dictionary\n */\nexport type DictionaryWithString = {\n    [key: string]: string;\n};\n\nexport type DictionaryWithPropertiesAndAdditionalProperties = {\n    foo?: number;\n    bar?: boolean;\n    [key: string]: string | number | boolean | undefined;\n};\n\n/**\n * This is a string reference\n */\nexport type DictionaryWithReference = {\n    [key: string]: ModelWithString;\n};\n\n/**\n * This is a complex dictionary\n */\nexport type DictionaryWithArray = {\n    [key: string]: Array<ModelWithString>;\n};\n\n/**\n * This is a string dictionary\n */\nexport type DictionaryWithDictionary = {\n    [key: string]: {\n        [key: string]: string;\n    };\n};\n\n/**\n * This is a complex dictionary\n */\nexport type DictionaryWithProperties = {\n    [key: string]: {\n        foo?: string;\n        bar?: string;\n    };\n};\n\n/**\n * This is a model with one number property\n */\nexport type ModelWithInteger = {\n    /**\n     * This is a simple number property\n     */\n    prop?: number;\n};\n\n/**\n * This is a model with one boolean property\n */\nexport type ModelWithBoolean = {\n    /**\n     * This is a simple boolean property\n     */\n    prop?: boolean;\n};\n\n/**\n * This is a model with one string property\n */\nexport type ModelWithString = {\n    /**\n     * This is a simple string property\n     */\n    prop?: string;\n};\n\n/**\n * This is a model with one string property\n */\nexport type ModelWithStringError = {\n    /**\n     * This is a simple string property\n     */\n    prop?: string;\n};\n\n/**\n * `Comment` or `VoiceComment`. The JSON object for adding voice comments to tickets is different. See [Adding voice comments to tickets](/documentation/ticketing/managing-tickets/adding-voice-comments-to-tickets)\n */\nexport type ModelFromZendesk = string;\n\n/**\n * This is a model with one string property\n */\nexport type ModelWithNullableString = {\n    /**\n     * This is a simple string property\n     */\n    nullableProp1?: string | null;\n    /**\n     * This is a simple string property\n     */\n    nullableRequiredProp1: string | null;\n    /**\n     * This is a simple string property\n     */\n    nullableProp2?: string | null;\n    /**\n     * This is a simple string property\n     */\n    nullableRequiredProp2: string | null;\n    /**\n     * This is a simple enum with strings\n     */\n    'foo_bar-enum'?: 'Success' | 'Warning' | 'Error' | 'ØÆÅ字符串';\n};\n\n/**\n * This is a model with one enum\n */\nexport type ModelWithEnum = {\n    /**\n     * This is a simple enum with strings\n     */\n    'foo_bar-enum'?: 'Success' | 'Warning' | 'Error' | 'ØÆÅ字符串';\n    /**\n     * These are the HTTP error code enums\n     */\n    statusCode?: '100' | '200 FOO' | '300 FOO_BAR' | '400 foo-bar' | '500 foo.bar' | '600 foo&bar';\n    /**\n     * Simple boolean enum\n     */\n    bool?: true;\n};\n\n/**\n * This is a model with one enum with escaped name\n */\nexport type ModelWithEnumWithHyphen = {\n    /**\n     * Foo-Bar-Baz-Qux\n     */\n    'foo-bar-baz-qux'?: '3.0';\n};\n\n/**\n * This is a model with one enum\n */\nexport type ModelWithEnumFromDescription = {\n    /**\n     * Success=1,Warning=2,Error=3\n     */\n    test?: number;\n};\n\n/**\n * This is a model with nested enums\n */\nexport type ModelWithNestedEnums = {\n    dictionaryWithEnum?: {\n        [key: string]: 'Success' | 'Warning' | 'Error';\n    };\n    dictionaryWithEnumFromDescription?: {\n        [key: string]: number;\n    };\n    arrayWithEnum?: Array<'Success' | 'Warning' | 'Error'>;\n    arrayWithDescription?: Array<number>;\n    /**\n     * This is a simple enum with strings\n     */\n    'foo_bar-enum'?: 'Success' | 'Warning' | 'Error' | 'ØÆÅ字符串';\n};\n\n/**\n * This is a model with one property containing a reference\n */\nexport type ModelWithReference = {\n    prop?: ModelWithProperties;\n};\n\n/**\n * This is a model with one property containing an array\n */\nexport type ModelWithArrayReadOnlyAndWriteOnly = {\n    prop?: Array<ModelWithReadOnlyAndWriteOnly>;\n    propWithFile?: Array<Blob | File>;\n    propWithNumber?: Array<number>;\n};\n\n/**\n * This is a model with one property containing an array\n */\nexport type ModelWithArray = {\n    prop?: Array<ModelWithString>;\n    propWithFile?: Array<Blob | File>;\n    propWithNumber?: Array<number>;\n};\n\n/**\n * This is a model with one property containing a dictionary\n */\nexport type ModelWithDictionary = {\n    prop?: {\n        [key: string]: string;\n    };\n};\n\n/**\n * This is a deprecated model with a deprecated property\n *\n * @deprecated\n */\nexport type DeprecatedModel = {\n    /**\n     * This is a deprecated property\n     *\n     * @deprecated\n     */\n    prop?: string;\n};\n\n/**\n * This is a model with one property containing a circular reference\n */\nexport type ModelWithCircularReference = {\n    prop?: ModelWithCircularReference;\n};\n\n/**\n * This is a model with one property with a 'one of' relationship\n */\nexport type CompositionWithOneOf = {\n    propA?: ModelWithString | ModelWithEnum | ModelWithArray | ModelWithDictionary;\n};\n\n/**\n * This is a model with one property with a 'one of' relationship where the options are not $ref\n */\nexport type CompositionWithOneOfAnonymous = {\n    propA?: {\n        propA?: string;\n    } | string | number;\n};\n\n/**\n * Circle\n */\nexport type ModelCircle = {\n    kind: string;\n    radius?: number;\n};\n\n/**\n * Square\n */\nexport type ModelSquare = {\n    kind: string;\n    sideLength?: number;\n};\n\n/**\n * This is a model with one property with a 'one of' relationship where the options are not $ref\n */\nexport type CompositionWithOneOfDiscriminator = ({\n    kind: 'circle';\n} & ModelCircle) | ({\n    kind: 'square';\n} & ModelSquare);\n\n/**\n * This is a model with one property with a 'any of' relationship\n */\nexport type CompositionWithAnyOf = {\n    propA?: ModelWithString | ModelWithEnum | ModelWithArray | ModelWithDictionary;\n};\n\n/**\n * This is a model with one property with a 'any of' relationship where the options are not $ref\n */\nexport type CompositionWithAnyOfAnonymous = {\n    propA?: {\n        propA?: string;\n    } | string | number;\n};\n\n/**\n * This is a model with nested 'any of' property with a type null\n */\nexport type CompositionWithNestedAnyAndTypeNull = {\n    propA?: Array<ModelWithDictionary | null> | Array<ModelWithArray | null>;\n};\n\nexport type _3eNum1Период = 'Bird' | 'Dog';\n\nexport type ConstValue = 'ConstValue';\n\n/**\n * This is a model with one property with a 'any of' relationship where the options are not $ref\n */\nexport type CompositionWithNestedAnyOfAndNull = {\n    /**\n     * Scopes\n     */\n    propA?: Array<_3eNum1Период | ConstValue> | null;\n};\n\n/**\n * This is a model with one property with a 'one of' relationship\n */\nexport type CompositionWithOneOfAndNullable = {\n    propA?: {\n        boolean?: boolean;\n    } | ModelWithEnum | ModelWithArray | ModelWithDictionary | null;\n};\n\n/**\n * This is a model that contains a simple dictionary within composition\n */\nexport type CompositionWithOneOfAndSimpleDictionary = {\n    propA?: boolean | {\n        [key: string]: number;\n    };\n};\n\n/**\n * This is a model that contains a dictionary of simple arrays within composition\n */\nexport type CompositionWithOneOfAndSimpleArrayDictionary = {\n    propA?: boolean | {\n        [key: string]: Array<boolean>;\n    };\n};\n\n/**\n * This is a model that contains a dictionary of complex arrays (composited) within composition\n */\nexport type CompositionWithOneOfAndComplexArrayDictionary = {\n    propA?: boolean | {\n        [key: string]: Array<number | string>;\n    };\n};\n\n/**\n * This is a model with one property with a 'all of' relationship\n */\nexport type CompositionWithAllOfAndNullable = {\n    propA?: ({\n        boolean?: boolean;\n    } & ModelWithEnum & ModelWithArray & ModelWithDictionary) | null;\n};\n\n/**\n * This is a model with one property with a 'any of' relationship\n */\nexport type CompositionWithAnyOfAndNullable = {\n    propA?: {\n        boolean?: boolean;\n    } | ModelWithEnum | ModelWithArray | ModelWithDictionary | null;\n};\n\n/**\n * This is a base model with two simple optional properties\n */\nexport type CompositionBaseModel = {\n    firstName?: string;\n    lastname?: string;\n};\n\n/**\n * This is a model that extends the base model\n */\nexport type CompositionExtendedModel = CompositionBaseModel & {\n    age: number;\n    firstName: string;\n    lastname: string;\n};\n\n/**\n * This is a model with one nested property\n */\nexport type ModelWithProperties = {\n    required: string;\n    readonly requiredAndReadOnly: string;\n    requiredAndNullable: string | null;\n    string?: string;\n    number?: number;\n    boolean?: boolean;\n    reference?: ModelWithString;\n    'property with space'?: string;\n    default?: string;\n    try?: string;\n    readonly '@namespace.string'?: string;\n    readonly '@namespace.integer'?: number;\n};\n\n/**\n * This is a model with one nested property\n */\nexport type ModelWithNestedProperties = {\n    readonly first: {\n        readonly second: {\n            readonly third: string | null;\n        } | null;\n    } | null;\n};\n\n/**\n * This is a model with duplicated properties\n */\nexport type ModelWithDuplicateProperties = {\n    prop?: ModelWithString;\n};\n\n/**\n * This is a model with ordered properties\n */\nexport type ModelWithOrderedProperties = {\n    zebra?: string;\n    apple?: string;\n    hawaii?: string;\n};\n\n/**\n * This is a model with duplicated imports\n */\nexport type ModelWithDuplicateImports = {\n    propA?: ModelWithString;\n    propB?: ModelWithString;\n    propC?: ModelWithString;\n};\n\n/**\n * This is a model that extends another model\n */\nexport type ModelThatExtends = ModelWithString & {\n    propExtendsA?: string;\n    propExtendsB?: ModelWithString;\n};\n\n/**\n * This is a model that extends another model\n */\nexport type ModelThatExtendsExtends = ModelWithString & ModelThatExtends & {\n    propExtendsC?: string;\n    propExtendsD?: ModelWithString;\n};\n\n/**\n * This is a model that contains a some patterns\n */\nexport type ModelWithPattern = {\n    key: string;\n    name: string;\n    readonly enabled?: boolean;\n    readonly modified?: string;\n    id?: string;\n    text?: string;\n    patternWithSingleQuotes?: string;\n    patternWithNewline?: string;\n    patternWithBacktick?: string;\n    patternWithUnicode?: string;\n};\n\nexport type File = {\n    /**\n     * Id\n     */\n    readonly id?: string;\n    /**\n     * Updated at\n     */\n    readonly updated_at?: string;\n    /**\n     * Created at\n     */\n    readonly created_at?: string;\n    /**\n     * Mime\n     */\n    mime: string;\n    /**\n     * File\n     */\n    readonly file?: string;\n};\n\nexport type Default = {\n    name?: string;\n};\n\nexport type Pageable = {\n    page?: number;\n    size?: number;\n    sort?: Array<string>;\n};\n\n/**\n * This is a free-form object without additionalProperties.\n */\nexport type FreeFormObjectWithoutAdditionalProperties = {\n    [key: string]: unknown;\n};\n\n/**\n * This is a free-form object with additionalProperties: true.\n */\nexport type FreeFormObjectWithAdditionalPropertiesEqTrue = {\n    [key: string]: unknown;\n};\n\n/**\n * This is a free-form object with additionalProperties: {}.\n */\nexport type FreeFormObjectWithAdditionalPropertiesEqEmptyObject = {\n    [key: string]: unknown;\n};\n\nexport type ModelWithConst = {\n    String?: 'String';\n    number?: 0;\n    null?: null;\n    withType?: 'Some string';\n};\n\n/**\n * This is a model with one property and additionalProperties: true\n */\nexport type ModelWithAdditionalPropertiesEqTrue = {\n    /**\n     * This is a simple string property\n     */\n    prop?: string;\n    [key: string]: unknown;\n};\n\nexport type NestedAnyOfArraysNullable = {\n    nullableArray?: Array<string | boolean> | null;\n};\n\nexport type CompositionWithOneOfAndProperties = ({\n    foo: SimpleParameter;\n} | {\n    bar: NonAsciiStringæøåÆøÅöôêÊ字符串;\n}) & {\n    baz: number | null;\n    qux: number;\n};\n\n/**\n * An object that can be null\n */\nexport type NullableObject = {\n    foo?: string;\n} | null;\n\n/**\n * Some % character\n */\nexport type CharactersInDescription = string;\n\nexport type ModelWithNullableObject = {\n    data?: NullableObject;\n};\n\n/**\n * An object with additional properties that can be null (anyOf ref + null)\n */\nexport type ModelWithAdditionalPropertiesRef = {\n    [key: string]: NullableObject | null;\n};\n\nexport type ModelWithOneOfEnum = {\n    foo: 'Bar';\n} | {\n    foo: 'Baz';\n} | {\n    foo: 'Qux';\n} | {\n    content: string;\n    foo: 'Quux';\n} | {\n    content: [\n        string,\n        string\n    ];\n    foo: 'Corge';\n};\n\nexport type ModelWithNestedArrayEnumsDataFoo = 'foo' | 'bar';\n\nexport type ModelWithNestedArrayEnumsDataBar = 'baz' | 'qux';\n\nexport type ModelWithNestedArrayEnumsData = {\n    foo?: Array<ModelWithNestedArrayEnumsDataFoo>;\n    bar?: Array<ModelWithNestedArrayEnumsDataBar>;\n};\n\nexport type ModelWithNestedArrayEnums = {\n    array_strings?: Array<string>;\n    data?: ModelWithNestedArrayEnumsData;\n};\n\nexport type ModelWithNestedCompositionEnums = {\n    foo?: ModelWithNestedArrayEnumsDataFoo;\n};\n\nexport type ModelWithReadOnlyAndWriteOnly = {\n    foo: string;\n    readonly bar: string;\n};\n\nexport type ModelWithConstantSizeArray = [\n    number,\n    number\n];\n\nexport type ModelWithAnyOfConstantSizeArray = [\n    number | string,\n    number | string,\n    number | string\n];\n\nexport type ModelWithPrefixItemsConstantSizeArray = [\n    ModelWithInteger,\n    number | string,\n    string\n];\n\nexport type ModelWithAnyOfConstantSizeArrayNullable = [\n    number | null | string,\n    number | null | string,\n    number | null | string\n];\n\nexport type ModelWithAnyOfConstantSizeArrayWithNSizeAndOptions = [\n    number | Import,\n    number | Import\n];\n\nexport type ModelWithAnyOfConstantSizeArrayAndIntersect = [\n    number & string,\n    number & string\n];\n\nexport type ModelWithNumericEnumUnion = {\n    /**\n     * Период\n     */\n    value?: -10 | -1 | 0 | 1 | 3 | 6 | 12;\n};\n\n/**\n * Some description with `back ticks`\n */\nexport type ModelWithBackticksInDescription = {\n    /**\n     * The template `that` should be used for parsing and importing the contents of the CSV file.\n     *\n     * <br/><p>There is one placeholder currently supported:<ul>     <li><b>${x}</b> - refers to the n-th column in the CSV file, e.g. ${1}, ${2}, ...)</li></ul><p>Example of a correct JSON template:</p>\n     * <pre>\n     * [\n     * {\n     * \"resourceType\": \"Asset\",\n     * \"identifier\": {\n     * \"name\": \"${1}\",\n     * \"domain\": {\n     * \"name\": \"${2}\",\n     * \"community\": {\n     * \"name\": \"Some Community\"\n     * }\n     * }\n     * },\n     * \"attributes\" : {\n     * \"00000000-0000-0000-0000-000000003115\" : [ {\n     * \"value\" : \"${3}\"\n     * } ],\n     * \"00000000-0000-0000-0000-000000000222\" : [ {\n     * \"value\" : \"${4}\"\n     * } ]\n     * }\n     * }\n     * ]\n     * </pre>\n     */\n    template?: string;\n};\n\nexport type ModelWithOneOfAndProperties = (SimpleParameter | NonAsciiStringæøåÆøÅöôêÊ字符串) & {\n    baz: number | null;\n    qux: number;\n};\n\n/**\n * Model used to test deduplication strategy (unused)\n */\nexport type ParameterSimpleParameterUnused = string;\n\n/**\n * Model used to test deduplication strategy\n */\nexport type PostServiceWithEmptyTagResponse = string;\n\n/**\n * Model used to test deduplication strategy\n */\nexport type PostServiceWithEmptyTagResponse2 = string;\n\n/**\n * Model used to test deduplication strategy\n */\nexport type DeleteFooData = string;\n\n/**\n * Model used to test deduplication strategy\n */\nexport type DeleteFooData2 = string;\n\n/**\n * Model with restricted keyword name\n */\nexport type Import = string;\n\nexport type SchemaWithFormRestrictedKeys = {\n    description?: string;\n    'x-enum-descriptions'?: string;\n    'x-enum-varnames'?: string;\n    'x-enumNames'?: string;\n    title?: string;\n    object?: {\n        description?: string;\n        'x-enum-descriptions'?: string;\n        'x-enum-varnames'?: string;\n        'x-enumNames'?: string;\n        title?: string;\n    };\n    array?: Array<{\n        description?: string;\n        'x-enum-descriptions'?: string;\n        'x-enum-varnames'?: string;\n        'x-enumNames'?: string;\n        title?: string;\n    }>;\n};\n\n/**\n * This schema was giving PascalCase transformations a hard time\n */\nexport type IoK8sApimachineryPkgApisMetaV1DeleteOptions = {\n    /**\n     * Must be fulfilled before a deletion is carried out. If not possible, a 409 Conflict status will be returned.\n     */\n    preconditions?: IoK8sApimachineryPkgApisMetaV1Preconditions;\n};\n\n/**\n * This schema was giving PascalCase transformations a hard time\n */\nexport type IoK8sApimachineryPkgApisMetaV1Preconditions = {\n    /**\n     * Specifies the target ResourceVersion\n     */\n    resourceVersion?: string;\n    /**\n     * Specifies the target UID.\n     */\n    uid?: string;\n};\n\nexport type AdditionalPropertiesUnknownIssue = {\n    [key: string]: string | number;\n};\n\nexport type AdditionalPropertiesUnknownIssue2 = {\n    [key: string]: string | number;\n};\n\nexport type AdditionalPropertiesUnknownIssue3 = string & {\n    entries: {\n        [key: string]: AdditionalPropertiesUnknownIssue;\n    };\n};\n\nexport type AdditionalPropertiesIntegerIssue = {\n    value: number;\n    [key: string]: number;\n};\n\nexport type OneOfAllOfIssue = ((ConstValue | GenericSchemaDuplicateIssue1SystemBoolean) & _3eNum1Период) | GenericSchemaDuplicateIssue1SystemString;\n\nexport type GenericSchemaDuplicateIssue1SystemBoolean = {\n    item?: boolean;\n    error?: string | null;\n    readonly hasError?: boolean;\n    data?: {\n        [key: string]: never;\n    };\n};\n\nexport type GenericSchemaDuplicateIssue1SystemString = {\n    item?: string | null;\n    error?: string | null;\n    readonly hasError?: boolean;\n};\n\nexport type ExternalSharedModel = {\n    id: string;\n    name?: string;\n};\n\n/**\n * This is a model with one property containing a reference\n */\nexport type ModelWithReferenceWritable = {\n    prop?: ModelWithPropertiesWritable;\n};\n\n/**\n * This is a model with one property containing an array\n */\nexport type ModelWithArrayReadOnlyAndWriteOnlyWritable = {\n    prop?: Array<ModelWithReadOnlyAndWriteOnlyWritable>;\n    propWithFile?: Array<Blob | File>;\n    propWithNumber?: Array<number>;\n};\n\n/**\n * This is a model with one nested property\n */\nexport type ModelWithPropertiesWritable = {\n    required: string;\n    requiredAndNullable: string | null;\n    string?: string;\n    number?: number;\n    boolean?: boolean;\n    reference?: ModelWithString;\n    'property with space'?: string;\n    default?: string;\n    try?: string;\n};\n\n/**\n * This is a model that contains a some patterns\n */\nexport type ModelWithPatternWritable = {\n    key: string;\n    name: string;\n    id?: string;\n    text?: string;\n    patternWithSingleQuotes?: string;\n    patternWithNewline?: string;\n    patternWithBacktick?: string;\n    patternWithUnicode?: string;\n};\n\nexport type FileWritable = {\n    /**\n     * Mime\n     */\n    mime: string;\n};\n\nexport type ModelWithReadOnlyAndWriteOnlyWritable = {\n    foo: string;\n    baz: string;\n};\n\nexport type ModelWithAnyOfConstantSizeArrayWithNSizeAndOptionsWritable = [\n    number | Import,\n    number | Import\n];\n\nexport type AdditionalPropertiesUnknownIssueWritable = {\n    [key: string]: string | number;\n};\n\nexport type OneOfAllOfIssueWritable = ((ConstValue | GenericSchemaDuplicateIssue1SystemBoolean) & _3eNum1Период) | GenericSchemaDuplicateIssue1SystemString;\n\nexport type GenericSchemaDuplicateIssue1SystemBooleanWritable = {\n    item?: boolean;\n    error?: string | null;\n    data?: {\n        [key: string]: never;\n    };\n};\n\nexport type GenericSchemaDuplicateIssue1SystemStringWritable = {\n    item?: string | null;\n    error?: string | null;\n};\n\n/**\n * This is a reusable parameter\n */\nexport type SimpleParameter = string;\n\n/**\n * Parameter with illegal characters\n */\nexport type XFooBar = ModelWithString;\n\n/**\n * A reusable request body\n */\nexport type SimpleRequestBody = ModelWithString;\n\n/**\n * A reusable request body\n */\nexport type SimpleFormData = ModelWithString;\n\nexport type ExportData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no+tag';\n};\n\nexport type PatchApiVbyApiVersionNoTagData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no+tag';\n};\n\nexport type PatchApiVbyApiVersionNoTagResponses = {\n    /**\n     * OK\n     */\n    default: unknown;\n};\n\nexport type ImportData = {\n    body: ModelWithReadOnlyAndWriteOnlyWritable | ModelWithArrayReadOnlyAndWriteOnlyWritable;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no+tag';\n};\n\nexport type ImportResponses = {\n    /**\n     * Success\n     */\n    200: ModelFromZendesk;\n    /**\n     * Default success response\n     */\n    default: ModelWithReadOnlyAndWriteOnly;\n};\n\nexport type ImportResponse = ImportResponses[keyof ImportResponses];\n\nexport type FooWowData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no+tag';\n};\n\nexport type FooWowResponses = {\n    /**\n     * OK\n     */\n    default: unknown;\n};\n\nexport type ApiVVersionODataControllerCountData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple/$count';\n};\n\nexport type ApiVVersionODataControllerCountResponses = {\n    /**\n     * Success\n     */\n    200: ModelFromZendesk;\n};\n\nexport type ApiVVersionODataControllerCountResponse = ApiVVersionODataControllerCountResponses[keyof ApiVVersionODataControllerCountResponses];\n\nexport type GetApiVbyApiVersionSimpleOperationData = {\n    body?: never;\n    path: {\n        /**\n         * foo in method\n         */\n        foo_param: string;\n    };\n    query?: never;\n    url: '/api/v{api-version}/simple:operation';\n};\n\nexport type GetApiVbyApiVersionSimpleOperationErrors = {\n    /**\n     * Default error response\n     */\n    default: ModelWithBoolean;\n};\n\nexport type GetApiVbyApiVersionSimpleOperationError = GetApiVbyApiVersionSimpleOperationErrors[keyof GetApiVbyApiVersionSimpleOperationErrors];\n\nexport type GetApiVbyApiVersionSimpleOperationResponses = {\n    /**\n     * Response is a simple number\n     */\n    200: number;\n};\n\nexport type GetApiVbyApiVersionSimpleOperationResponse = GetApiVbyApiVersionSimpleOperationResponses[keyof GetApiVbyApiVersionSimpleOperationResponses];\n\nexport type DeleteCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type GetCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type HeadCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type OptionsCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type PatchCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type PostCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type PutCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type DeleteFooData3 = {\n    body?: never;\n    headers: {\n        /**\n         * Parameter with illegal characters\n         */\n        'x-Foo-Bar': ModelWithString;\n    };\n    path: {\n        /**\n         * foo in method\n         */\n        foo_param: string;\n        /**\n         * bar in method\n         */\n        BarParam: string;\n    };\n    query?: never;\n    url: '/api/v{api-version}/foo/{foo_param}/bar/{BarParam}';\n};\n\nexport type CallWithDescriptionsData = {\n    body?: never;\n    path?: never;\n    query?: {\n        /**\n         * Testing multiline comments in string: First line\n         * Second line\n         *\n         * Fourth line\n         */\n        parameterWithBreaks?: string;\n        /**\n         * Testing backticks in string: `backticks` and ```multiple backticks``` should work\n         */\n        parameterWithBackticks?: string;\n        /**\n         * Testing slashes in string: \\backwards\\\\\\ and /forwards/// should work\n         */\n        parameterWithSlashes?: string;\n        /**\n         * Testing expression placeholders in string: ${expression} should work\n         */\n        parameterWithExpressionPlaceholders?: string;\n        /**\n         * Testing quotes in string: 'single quote''' and \"double quotes\"\"\" should work\n         */\n        parameterWithQuotes?: string;\n        /**\n         * Testing reserved characters in string: * inline * and ** inline ** should work\n         */\n        parameterWithReservedCharacters?: string;\n    };\n    url: '/api/v{api-version}/descriptions';\n};\n\nexport type DeprecatedCallData = {\n    body?: never;\n    headers: {\n        /**\n         * This parameter is deprecated\n         *\n         * @deprecated\n         */\n        parameter: DeprecatedModel | null;\n    };\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/parameters/deprecated';\n};\n\nexport type CallWithParametersData = {\n    /**\n     * This is the parameter that goes into the body\n     */\n    body: {\n        [key: string]: unknown;\n    } | null;\n    headers: {\n        /**\n         * This is the parameter that goes into the header\n         */\n        parameterHeader: string | null;\n    };\n    path: {\n        /**\n         * This is the parameter that goes into the path\n         */\n        parameterPath: string | null;\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string | null;\n    };\n    query: {\n        foo_ref_enum?: ModelWithNestedArrayEnumsDataFoo;\n        foo_all_of_enum: ModelWithNestedArrayEnumsDataFoo;\n        /**\n         * This is the parameter that goes into the query params\n         */\n        cursor: string | null;\n    };\n    url: '/api/v{api-version}/parameters/{parameterPath}';\n};\n\nexport type CallWithWeirdParameterNamesData = {\n    /**\n     * This is the parameter that goes into the body\n     */\n    body: ModelWithString | null;\n    headers: {\n        /**\n         * This is the parameter that goes into the request header\n         */\n        'parameter.header': string | null;\n    };\n    path: {\n        /**\n         * This is the parameter that goes into the path\n         */\n        'parameter.path.1'?: string;\n        /**\n         * This is the parameter that goes into the path\n         */\n        'parameter-path-2'?: string;\n        /**\n         * This is the parameter that goes into the path\n         */\n        'PARAMETER-PATH-3'?: string;\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string | null;\n    };\n    query: {\n        /**\n         * This is the parameter with a reserved keyword\n         */\n        default?: string;\n        /**\n         * This is the parameter that goes into the request query params\n         */\n        'parameter-query': string | null;\n    };\n    url: '/api/v{api-version}/parameters/{parameter.path.1}/{parameter-path-2}/{PARAMETER-PATH-3}';\n};\n\nexport type GetCallWithOptionalParamData = {\n    /**\n     * This is a required parameter\n     */\n    body: ModelWithOneOfEnum;\n    path?: never;\n    query?: {\n        /**\n         * This is an optional parameter\n         */\n        page?: number;\n    };\n    url: '/api/v{api-version}/parameters';\n};\n\nexport type PostCallWithOptionalParamData = {\n    /**\n     * This is an optional parameter\n     */\n    body?: {\n        offset?: number | null;\n    };\n    path?: never;\n    query: {\n        /**\n         * This is a required parameter\n         */\n        parameter: Pageable;\n    };\n    url: '/api/v{api-version}/parameters';\n};\n\nexport type PostCallWithOptionalParamResponses = {\n    /**\n     * Response is a simple number\n     */\n    200: number;\n    /**\n     * Success\n     */\n    204: void;\n};\n\nexport type PostCallWithOptionalParamResponse = PostCallWithOptionalParamResponses[keyof PostCallWithOptionalParamResponses];\n\nexport type PostApiVbyApiVersionRequestBodyData = {\n    /**\n     * A reusable request body\n     */\n    body?: SimpleRequestBody;\n    path?: never;\n    query?: {\n        /**\n         * This is a reusable parameter\n         */\n        parameter?: string;\n    };\n    url: '/api/v{api-version}/requestBody';\n};\n\nexport type PostApiVbyApiVersionFormDataData = {\n    /**\n     * A reusable request body\n     */\n    body?: SimpleFormData;\n    path?: never;\n    query?: {\n        /**\n         * This is a reusable parameter\n         */\n        parameter?: string;\n    };\n    url: '/api/v{api-version}/formData';\n};\n\nexport type CallWithDefaultParametersData = {\n    body?: never;\n    path?: never;\n    query?: {\n        /**\n         * This is a simple string with default value\n         */\n        parameterString?: string | null;\n        /**\n         * This is a simple number with default value\n         */\n        parameterNumber?: number | null;\n        /**\n         * This is a simple boolean with default value\n         */\n        parameterBoolean?: boolean | null;\n        /**\n         * This is a simple enum with default value\n         */\n        parameterEnum?: 'Success' | 'Warning' | 'Error';\n        /**\n         * This is a simple model with default value\n         */\n        parameterModel?: ModelWithString | null;\n    };\n    url: '/api/v{api-version}/defaults';\n};\n\nexport type CallWithDefaultOptionalParametersData = {\n    body?: never;\n    path?: never;\n    query?: {\n        /**\n         * This is a simple string that is optional with default value\n         */\n        parameterString?: string;\n        /**\n         * This is a simple number that is optional with default value\n         */\n        parameterNumber?: number;\n        /**\n         * This is a simple boolean that is optional with default value\n         */\n        parameterBoolean?: boolean;\n        /**\n         * This is a simple enum that is optional with default value\n         */\n        parameterEnum?: 'Success' | 'Warning' | 'Error';\n        /**\n         * This is a simple model that is optional with default value\n         */\n        parameterModel?: ModelWithString;\n    };\n    url: '/api/v{api-version}/defaults';\n};\n\nexport type CallToTestOrderOfParamsData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * This is a optional string with default\n         */\n        parameterOptionalStringWithDefault?: string;\n        /**\n         * This is a optional string with empty default\n         */\n        parameterOptionalStringWithEmptyDefault?: string;\n        /**\n         * This is a optional string with no default\n         */\n        parameterOptionalStringWithNoDefault?: string;\n        /**\n         * This is a string with default\n         */\n        parameterStringWithDefault: string;\n        /**\n         * This is a string with empty default\n         */\n        parameterStringWithEmptyDefault: string;\n        /**\n         * This is a string with no default\n         */\n        parameterStringWithNoDefault: string;\n        /**\n         * This is a string that can be null with no default\n         */\n        parameterStringNullableWithNoDefault?: string | null;\n        /**\n         * This is a string that can be null with default\n         */\n        parameterStringNullableWithDefault?: string | null;\n    };\n    url: '/api/v{api-version}/defaults';\n};\n\nexport type DuplicateNameData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/duplicate';\n};\n\nexport type DuplicateName2Data = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/duplicate';\n};\n\nexport type DuplicateName3Data = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/duplicate';\n};\n\nexport type DuplicateName4Data = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/duplicate';\n};\n\nexport type CallWithNoContentResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no-content';\n};\n\nexport type CallWithNoContentResponseResponses = {\n    /**\n     * Success\n     */\n    204: void;\n};\n\nexport type CallWithNoContentResponseResponse = CallWithNoContentResponseResponses[keyof CallWithNoContentResponseResponses];\n\nexport type CallWithResponseAndNoContentResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multiple-tags/response-and-no-content';\n};\n\nexport type CallWithResponseAndNoContentResponseResponses = {\n    /**\n     * Response is a simple number\n     */\n    200: number;\n    /**\n     * Success\n     */\n    204: void;\n};\n\nexport type CallWithResponseAndNoContentResponseResponse = CallWithResponseAndNoContentResponseResponses[keyof CallWithResponseAndNoContentResponseResponses];\n\nexport type DummyAData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multiple-tags/a';\n};\n\nexport type DummyAResponses = {\n    200: _400;\n};\n\nexport type DummyAResponse = DummyAResponses[keyof DummyAResponses];\n\nexport type DummyBData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multiple-tags/b';\n};\n\nexport type DummyBResponses = {\n    /**\n     * Success\n     */\n    204: void;\n};\n\nexport type DummyBResponse = DummyBResponses[keyof DummyBResponses];\n\nexport type CallWithResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/response';\n};\n\nexport type CallWithResponseResponses = {\n    default: Import;\n};\n\nexport type CallWithResponseResponse = CallWithResponseResponses[keyof CallWithResponseResponses];\n\nexport type CallWithDuplicateResponsesData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/response';\n};\n\nexport type CallWithDuplicateResponsesErrors = {\n    /**\n     * Message for 500 error\n     */\n    500: ModelWithStringError;\n    /**\n     * Message for 501 error\n     */\n    501: ModelWithStringError;\n    /**\n     * Message for 502 error\n     */\n    502: ModelWithStringError;\n    /**\n     * Message for 4XX errors\n     */\n    '4XX': DictionaryWithArray;\n    /**\n     * Default error response\n     */\n    default: ModelWithBoolean;\n};\n\nexport type CallWithDuplicateResponsesError = CallWithDuplicateResponsesErrors[keyof CallWithDuplicateResponsesErrors];\n\nexport type CallWithDuplicateResponsesResponses = {\n    /**\n     * Message for 200 response\n     */\n    200: ModelWithBoolean & ModelWithInteger;\n    /**\n     * Message for 201 response\n     */\n    201: ModelWithString;\n    /**\n     * Message for 202 response\n     */\n    202: ModelWithString;\n};\n\nexport type CallWithDuplicateResponsesResponse = CallWithDuplicateResponsesResponses[keyof CallWithDuplicateResponsesResponses];\n\nexport type CallWithResponsesData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/response';\n};\n\nexport type CallWithResponsesErrors = {\n    /**\n     * Message for 500 error\n     */\n    500: ModelWithStringError;\n    /**\n     * Message for 501 error\n     */\n    501: ModelWithStringError;\n    /**\n     * Message for 502 error\n     */\n    502: ModelWithStringError;\n    /**\n     * Message for default response\n     */\n    default: ModelWithStringError;\n};\n\nexport type CallWithResponsesError = CallWithResponsesErrors[keyof CallWithResponsesErrors];\n\nexport type CallWithResponsesResponses = {\n    /**\n     * Message for 200 response\n     */\n    200: {\n        readonly '@namespace.string'?: string;\n        readonly '@namespace.integer'?: number;\n        readonly value?: Array<ModelWithString>;\n    };\n    /**\n     * Message for 201 response\n     */\n    201: ModelThatExtends;\n    /**\n     * Message for 202 response\n     */\n    202: ModelThatExtendsExtends;\n};\n\nexport type CallWithResponsesResponse = CallWithResponsesResponses[keyof CallWithResponsesResponses];\n\nexport type CollectionFormatData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * This is an array parameter that is sent as csv format (comma-separated values)\n         */\n        parameterArrayCSV: Array<string> | null;\n        /**\n         * This is an array parameter that is sent as ssv format (space-separated values)\n         */\n        parameterArraySSV: Array<string> | null;\n        /**\n         * This is an array parameter that is sent as tsv format (tab-separated values)\n         */\n        parameterArrayTSV: Array<string> | null;\n        /**\n         * This is an array parameter that is sent as pipes format (pipe-separated values)\n         */\n        parameterArrayPipes: Array<string> | null;\n        /**\n         * This is an array parameter that is sent as multi format (multiple parameter instances)\n         */\n        parameterArrayMulti: Array<string> | null;\n    };\n    url: '/api/v{api-version}/collectionFormat';\n};\n\nexport type TypesData = {\n    body?: never;\n    path?: {\n        /**\n         * This is a number parameter\n         */\n        id?: number;\n    };\n    query: {\n        /**\n         * This is a number parameter\n         */\n        parameterNumber: number;\n        /**\n         * This is a string parameter\n         */\n        parameterString: string | null;\n        /**\n         * This is a boolean parameter\n         */\n        parameterBoolean: boolean | null;\n        /**\n         * This is an object parameter\n         */\n        parameterObject: {\n            [key: string]: unknown;\n        } | null;\n        /**\n         * This is an array parameter\n         */\n        parameterArray: Array<string> | null;\n        /**\n         * This is a dictionary parameter\n         */\n        parameterDictionary: {\n            [key: string]: unknown;\n        } | null;\n        /**\n         * This is an enum parameter\n         */\n        parameterEnum: 'Success' | 'Warning' | 'Error' | null;\n    };\n    url: '/api/v{api-version}/types';\n};\n\nexport type TypesResponses = {\n    /**\n     * Response is a simple number\n     */\n    200: number;\n    /**\n     * Response is a simple string\n     */\n    201: string;\n    /**\n     * Response is a simple boolean\n     */\n    202: boolean;\n    /**\n     * Response is a simple object\n     */\n    203: {\n        [key: string]: unknown;\n    };\n};\n\nexport type TypesResponse = TypesResponses[keyof TypesResponses];\n\nexport type UploadFileData = {\n    body: Blob | File;\n    path: {\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string | null;\n    };\n    query?: never;\n    url: '/api/v{api-version}/upload';\n};\n\nexport type UploadFileResponses = {\n    200: boolean;\n};\n\nexport type UploadFileResponse = UploadFileResponses[keyof UploadFileResponses];\n\nexport type FileResponseData = {\n    body?: never;\n    path: {\n        id: string;\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string;\n    };\n    query?: never;\n    url: '/api/v{api-version}/file/{id}';\n};\n\nexport type FileResponseResponses = {\n    /**\n     * Success\n     */\n    200: Blob | File;\n};\n\nexport type FileResponseResponse = FileResponseResponses[keyof FileResponseResponses];\n\nexport type ComplexTypesData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * Parameter containing object\n         */\n        parameterObject: {\n            first?: {\n                second?: {\n                    third?: string;\n                };\n            };\n        };\n        /**\n         * Parameter containing reference\n         */\n        parameterReference: ModelWithString;\n    };\n    url: '/api/v{api-version}/complex';\n};\n\nexport type ComplexTypesErrors = {\n    /**\n     * 400 `server` error\n     */\n    400: unknown;\n    /**\n     * 500 server error\n     */\n    500: unknown;\n};\n\nexport type ComplexTypesResponses = {\n    /**\n     * Successful response\n     */\n    200: Array<ModelWithString>;\n};\n\nexport type ComplexTypesResponse = ComplexTypesResponses[keyof ComplexTypesResponses];\n\nexport type MultipartResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multipart';\n};\n\nexport type MultipartResponseResponses = {\n    /**\n     * OK\n     */\n    200: {\n        file?: Blob | File;\n        metadata?: {\n            foo?: string;\n            bar?: string;\n        };\n    };\n};\n\nexport type MultipartResponseResponse = MultipartResponseResponses[keyof MultipartResponseResponses];\n\nexport type MultipartRequestData = {\n    body?: {\n        content?: Blob | File;\n        data?: ModelWithString | null;\n    };\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multipart';\n};\n\nexport type ComplexParamsData = {\n    body?: {\n        readonly key: string | null;\n        name: string | null;\n        enabled?: boolean;\n        type: 'Monkey' | 'Horse' | 'Bird';\n        listOfModels?: Array<ModelWithString> | null;\n        listOfStrings?: Array<string> | null;\n        parameters: ModelWithString | ModelWithEnum | ModelWithArray | ModelWithDictionary;\n        readonly user?: {\n            readonly id?: number;\n            readonly name?: string | null;\n        };\n    };\n    path: {\n        id: number;\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string;\n    };\n    query?: never;\n    url: '/api/v{api-version}/complex/{id}';\n};\n\nexport type ComplexParamsResponses = {\n    /**\n     * Success\n     */\n    200: ModelWithString;\n};\n\nexport type ComplexParamsResponse = ComplexParamsResponses[keyof ComplexParamsResponses];\n\nexport type CallWithResultFromHeaderData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/header';\n};\n\nexport type CallWithResultFromHeaderErrors = {\n    /**\n     * 400 server error\n     */\n    400: unknown;\n    /**\n     * 500 server error\n     */\n    500: unknown;\n};\n\nexport type CallWithResultFromHeaderResponses = {\n    /**\n     * Successful response\n     */\n    200: unknown;\n};\n\nexport type TestErrorCodeData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * Status code to return\n         */\n        status: number;\n    };\n    url: '/api/v{api-version}/error';\n};\n\nexport type TestErrorCodeErrors = {\n    /**\n     * Custom message: Internal Server Error\n     */\n    500: unknown;\n    /**\n     * Custom message: Not Implemented\n     */\n    501: unknown;\n    /**\n     * Custom message: Bad Gateway\n     */\n    502: unknown;\n    /**\n     * Custom message: Service Unavailable\n     */\n    503: unknown;\n};\n\nexport type TestErrorCodeResponses = {\n    /**\n     * Custom message: Successful response\n     */\n    200: unknown;\n};\n\nexport type NonAsciiæøåÆøÅöôêÊ字符串Data = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * Dummy input param\n         */\n        nonAsciiParamæøåÆØÅöôêÊ: number;\n    };\n    url: '/api/v{api-version}/non-ascii-æøåÆØÅöôêÊ字符串';\n};\n\nexport type NonAsciiæøåÆøÅöôêÊ字符串Responses = {\n    /**\n     * Successful response\n     */\n    200: Array<NonAsciiStringæøåÆøÅöôêÊ字符串>;\n};\n\nexport type NonAsciiæøåÆøÅöôêÊ字符串Response = NonAsciiæøåÆøÅöôêÊ字符串Responses[keyof NonAsciiæøåÆøÅöôêÊ字符串Responses];\n\nexport type PutWithFormUrlEncodedData = {\n    body: ArrayWithStrings;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/non-ascii-æøåÆØÅöôêÊ字符串';\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-ky/base-url-false/client/client.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { HTTPError, Options as KyOptions } from 'ky';\nimport ky from 'ky';\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, RetryOptions } from './types.gen';\nimport type { Middleware } from './utils.gen';\nimport {\n  buildUrl,\n  createConfig,\n  createInterceptors,\n  getParseAs,\n  mergeConfigs,\n  mergeHeaders,\n  setAuthParams,\n} from './utils.gen';\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 (options: RequestOptions) => {\n    const opts = {\n      ..._config,\n      ...options,\n      headers: mergeHeaders(_config.headers, options.headers),\n      ky: options.ky ?? _config.ky ?? ky,\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    if (opts.body === undefined || opts.serializedBody === '') {\n      opts.headers.delete('Content-Type');\n    }\n\n    const url = buildUrl(opts);\n\n    return { opts, url };\n  };\n\n  const parseErrorResponse = async (\n    response: Response,\n    request: Request,\n    opts: ResolvedRequestOptions,\n    interceptorsMiddleware: Middleware<Request, Response, unknown, ResolvedRequestOptions>,\n  ) => {\n    const result = {\n      request,\n      response,\n    };\n\n    const textError = await response.text();\n    let jsonError: unknown;\n\n    try {\n      jsonError = JSON.parse(textError);\n    } catch {\n      jsonError = undefined;\n    }\n\n    const error = jsonError ?? textError;\n    let finalError = error;\n\n    for (const fn of interceptorsMiddleware.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    return opts.responseStyle === 'data'\n      ? undefined\n      : {\n          error: finalError,\n          ...result,\n        };\n  };\n\n  const request: Client['request'] = async (options) => {\n    // @ts-expect-error\n    const { opts, url } = await beforeRequest(options);\n\n    const kyInstance = opts.ky!;\n\n    const validBody = getValidRequestBody(opts);\n\n    const kyOptions: KyOptions = {\n      body: validBody as BodyInit,\n      cache: opts.cache,\n      credentials: opts.credentials,\n      headers: opts.headers,\n      integrity: opts.integrity,\n      keepalive: opts.keepalive,\n      method: opts.method as KyOptions['method'],\n      mode: opts.mode,\n      redirect: 'follow',\n      referrer: opts.referrer,\n      referrerPolicy: opts.referrerPolicy,\n      signal: opts.signal,\n      throwHttpErrors: opts.throwOnError ?? false,\n      timeout: opts.timeout,\n      ...opts.kyOptions,\n    };\n\n    if (opts.retry && typeof opts.retry === 'object') {\n      const retryOpts = opts.retry as RetryOptions;\n      kyOptions.retry = {\n        limit: retryOpts.limit ?? 2,\n        methods: retryOpts.methods as Array<\n          'get' | 'post' | 'put' | 'patch' | 'head' | 'delete' | 'options' | 'trace'\n        >,\n        statusCodes: retryOpts.statusCodes,\n      };\n    }\n\n    let request = new Request(url, {\n      body: kyOptions.body as BodyInit,\n      headers: kyOptions.headers as HeadersInit,\n      method: kyOptions.method,\n    });\n\n    for (const fn of interceptors.request.fns) {\n      if (fn) {\n        request = await fn(request, opts);\n      }\n    }\n\n    let response: Response;\n\n    try {\n      response = await kyInstance(request, kyOptions);\n    } catch (error) {\n      if (error && typeof error === 'object' && 'response' in error) {\n        const httpError = error as HTTPError;\n        response = httpError.response;\n\n        for (const fn of interceptors.response.fns) {\n          if (fn) {\n            response = await fn(response, request, opts);\n          }\n        }\n\n        return parseErrorResponse(response, request, opts, interceptors);\n      }\n\n      throw error;\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    return parseErrorResponse(response, request, opts, interceptors);\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      fetch: globalThis.fetch,\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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-ky/base-url-false/client/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type { Auth } from '../core/auth.gen';\nexport type { QuerySerializerOptions } from '../core/bodySerializer.gen';\nexport {\n  formDataBodySerializer,\n  jsonBodySerializer,\n  urlSearchParamsBodySerializer,\n} from '../core/bodySerializer.gen';\nexport { buildClientParams } from '../core/params.gen';\nexport { serializeQueryKeyValue } from '../core/queryKeySerializer.gen';\nexport { createClient } from './client.gen';\nexport type {\n  Client,\n  ClientOptions,\n  Config,\n  CreateClientConfig,\n  Options,\n  RequestOptions,\n  RequestResult,\n  ResolvedRequestOptions,\n  ResponseStyle,\n  RetryOptions,\n  TDataShape,\n} from './types.gen';\nexport { createConfig, mergeHeaders } from './utils.gen';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-ky/base-url-false/client/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { Options as KyOptions } from 'ky';\nimport type ky from 'ky';\n\nimport type { Auth } from '../core/auth.gen';\nimport type {\n  ServerSentEventsOptions,\n  ServerSentEventsResult,\n} from '../core/serverSentEvents.gen';\nimport type { Client as CoreClient, Config as CoreConfig } from '../core/types.gen';\nimport type { Middleware } from './utils.gen';\n\nexport type ResponseStyle = 'data' | 'fields';\n\nexport interface RetryOptions {\n  /**\n   * Maximum number of retry attempts\n   *\n   * @default 2\n   */\n  limit?: number;\n  /**\n   * HTTP methods to retry\n   *\n   * @default ['get', 'put', 'head', 'delete', 'options', 'trace']\n   */\n  methods?: Array<'get' | 'post' | 'put' | 'delete' | 'patch' | 'head' | 'options' | 'trace'>;\n  /**\n   * HTTP status codes to retry\n   *\n   * @default [408, 413, 429, 500, 502, 503, 504]\n   */\n  statusCodes?: number[];\n}\n\nexport interface Config<T extends ClientOptions = ClientOptions>\n  extends\n    Omit<KyOptions, 'body' | 'headers' | 'method' | 'prefixUrl' | 'retry' | 'throwHttpErrors'>,\n    CoreConfig {\n  /**\n   * Base URL for all requests made by this client.\n   */\n  baseUrl?: T['baseUrl'];\n  /**\n   * Ky instance to use. You can use this option to provide a custom\n   * ky instance.\n   */\n  ky?: typeof ky;\n  /**\n   * Additional ky-specific options that will be passed directly to ky.\n   * This allows you to use any ky option not explicitly exposed in the config.\n   */\n  kyOptions?: Omit<KyOptions, 'method' | 'prefixUrl'>;\n  /**\n   * Return the response data parsed in a specified format. By default, `auto`\n   * will infer the appropriate method from the `Content-Type` response header.\n   * You can override this behavior with any of the {@link Body} methods.\n   * Select `stream` if you don't want to parse response data at all.\n   *\n   * @default 'auto'\n   */\n  parseAs?: 'arrayBuffer' | 'auto' | 'blob' | 'formData' | 'json' | 'stream' | 'text';\n  /**\n   * Should we return only data or multiple fields (data, error, response, etc.)?\n   *\n   * @default 'fields'\n   */\n  responseStyle?: ResponseStyle;\n  /**\n   * Retry configuration\n   */\n  retry?: RetryOptions;\n  /**\n   * Throw an error instead of returning it in the response?\n   *\n   * @default false\n   */\n  throwOnError?: T['throwOnError'];\n  /**\n   * Request timeout in milliseconds\n   *\n   * @default 10000\n   */\n  timeout?: number;\n}\n\nexport interface RequestOptions<\n  TData = unknown,\n  TResponseStyle extends ResponseStyle = 'fields',\n  ThrowOnError extends boolean = boolean,\n  Url extends string = string,\n>\n  extends\n    Config<{\n      responseStyle: TResponseStyle;\n      throwOnError: ThrowOnError;\n    }>,\n    Pick<\n      ServerSentEventsOptions<TData>,\n      | 'onRequest'\n      | 'onSseError'\n      | 'onSseEvent'\n      | 'sseDefaultRetryDelay'\n      | 'sseMaxRetryAttempts'\n      | 'sseMaxRetryDelay'\n    > {\n  /**\n   * Any body that you want to add to your request.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/fetch#body}\n   */\n  body?: unknown;\n  path?: Record<string, unknown>;\n  query?: Record<string, unknown>;\n  /**\n   * Security mechanism(s) to use for the request.\n   */\n  security?: ReadonlyArray<Auth>;\n  url: Url;\n}\n\nexport interface ResolvedRequestOptions<\n  TResponseStyle extends ResponseStyle = 'fields',\n  ThrowOnError extends boolean = boolean,\n  Url extends string = string,\n> extends RequestOptions<unknown, TResponseStyle, ThrowOnError, Url> {\n  serializedBody?: string;\n}\n\nexport type RequestResult<\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = boolean,\n  TResponseStyle extends ResponseStyle = 'fields',\n> = ThrowOnError extends true\n  ? Promise<\n      TResponseStyle extends 'data'\n        ? TData extends Record<string, unknown>\n          ? TData[keyof TData]\n          : TData\n        : {\n            data: TData extends Record<string, unknown> ? TData[keyof TData] : TData;\n            request: Request;\n            response: Response;\n          }\n    >\n  : Promise<\n      TResponseStyle extends 'data'\n        ? (TData extends Record<string, unknown> ? TData[keyof TData] : TData) | undefined\n        : (\n            | {\n                data: TData extends Record<string, unknown> ? TData[keyof TData] : TData;\n                error: undefined;\n              }\n            | {\n                data: undefined;\n                error: TError extends Record<string, unknown> ? TError[keyof TError] : TError;\n              }\n          ) & {\n            request: Request;\n            response: Response;\n          }\n    >;\n\nexport interface ClientOptions {\n  baseUrl?: string;\n  responseStyle?: ResponseStyle;\n  throwOnError?: boolean;\n}\n\ntype MethodFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'>,\n) => RequestResult<TData, TError, ThrowOnError, TResponseStyle>;\n\ntype SseFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'>,\n) => Promise<ServerSentEventsResult<TData, TError>>;\n\ntype RequestFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'> &\n    Pick<Required<RequestOptions<TData, TResponseStyle, ThrowOnError>>, 'method'>,\n) => RequestResult<TData, TError, ThrowOnError, TResponseStyle>;\n\ntype BuildUrlFn = <\n  TData extends {\n    body?: unknown;\n    path?: Record<string, unknown>;\n    query?: Record<string, unknown>;\n    url: string;\n  },\n>(\n  options: TData & Options<TData>,\n) => string;\n\nexport type Client = CoreClient<RequestFn, Config, MethodFn, BuildUrlFn, SseFn> & {\n  interceptors: Middleware<Request, Response, unknown, ResolvedRequestOptions>;\n};\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 = ClientOptions> = (\n  override?: Config<ClientOptions & T>,\n) => Config<Required<ClientOptions> & T>;\n\nexport interface TDataShape {\n  body?: unknown;\n  headers?: unknown;\n  path?: unknown;\n  query?: unknown;\n  url: string;\n}\n\ntype OmitKeys<T, K> = Pick<T, Exclude<keyof T, K>>;\n\nexport type Options<\n  TData extends TDataShape = TDataShape,\n  ThrowOnError extends boolean = boolean,\n  TResponse = unknown,\n  TResponseStyle extends ResponseStyle = 'fields',\n> = OmitKeys<\n  RequestOptions<TResponse, TResponseStyle, ThrowOnError>,\n  'body' | 'path' | 'query' | 'url'\n> &\n  ([TData] extends [never] ? unknown : Omit<TData, 'url'>);\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-ky/base-url-false/client/utils.gen.ts",
    "content": "// 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    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        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  throwOnError: false,\n  timeout: 10000,\n  ...override,\n});\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-ky/base-url-false/client.gen.ts",
    "content": "// 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>());\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-ky/base-url-false/core/auth.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-ky/base-url-false/core/bodySerializer.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-ky/base-url-false/core/params.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-ky/base-url-false/core/pathSerializer.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-ky/base-url-false/core/queryKeySerializer.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\n/**\n * JSON-friendly union that mirrors what Pinia Colada can hash.\n */\nexport type JsonValue =\n  | null\n  | string\n  | number\n  | boolean\n  | JsonValue[]\n  | { [key: string]: JsonValue };\n\n/**\n * Replacer that converts non-JSON values (bigint, Date, etc.) to safe substitutes.\n */\nexport const queryKeyJsonReplacer = (_key: string, value: unknown) => {\n  if (value === undefined || typeof value === 'function' || typeof value === 'symbol') {\n    return undefined;\n  }\n  if (typeof value === 'bigint') {\n    return value.toString();\n  }\n  if (value instanceof Date) {\n    return value.toISOString();\n  }\n  return value;\n};\n\n/**\n * Safely stringifies a value and parses it back into a JsonValue.\n */\nexport const stringifyToJsonValue = (input: unknown): JsonValue | undefined => {\n  try {\n    const json = JSON.stringify(input, queryKeyJsonReplacer);\n    if (json === undefined) {\n      return undefined;\n    }\n    return JSON.parse(json) as JsonValue;\n  } catch {\n    return undefined;\n  }\n};\n\n/**\n * Detects plain objects (including objects with a null prototype).\n */\nconst isPlainObject = (value: unknown): value is Record<string, unknown> => {\n  if (value === null || typeof value !== 'object') {\n    return false;\n  }\n  const prototype = Object.getPrototypeOf(value as object);\n  return prototype === Object.prototype || prototype === null;\n};\n\n/**\n * Turns URLSearchParams into a sorted JSON object for deterministic keys.\n */\nconst serializeSearchParams = (params: URLSearchParams): JsonValue => {\n  const entries = Array.from(params.entries()).sort(([a], [b]) => a.localeCompare(b));\n  const result: Record<string, JsonValue> = {};\n\n  for (const [key, value] of entries) {\n    const existing = result[key];\n    if (existing === undefined) {\n      result[key] = value;\n      continue;\n    }\n\n    if (Array.isArray(existing)) {\n      (existing as string[]).push(value);\n    } else {\n      result[key] = [existing, value];\n    }\n  }\n\n  return result;\n};\n\n/**\n * Normalizes any accepted value into a JSON-friendly shape for query keys.\n */\nexport const serializeQueryKeyValue = (value: unknown): JsonValue | undefined => {\n  if (value === null) {\n    return null;\n  }\n\n  if (typeof value === 'string' || typeof value === 'number' || typeof value === 'boolean') {\n    return value;\n  }\n\n  if (value === undefined || typeof value === 'function' || typeof value === 'symbol') {\n    return undefined;\n  }\n\n  if (typeof value === 'bigint') {\n    return value.toString();\n  }\n\n  if (value instanceof Date) {\n    return value.toISOString();\n  }\n\n  if (Array.isArray(value)) {\n    return stringifyToJsonValue(value);\n  }\n\n  if (typeof URLSearchParams !== 'undefined' && value instanceof URLSearchParams) {\n    return serializeSearchParams(value);\n  }\n\n  if (isPlainObject(value)) {\n    return stringifyToJsonValue(value);\n  }\n\n  return undefined;\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-ky/base-url-false/core/serverSentEvents.gen.ts",
    "content": "// 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 const 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            // Normalize line endings: CRLF -> LF, then CR -> LF\n            buffer = buffer.replace(/\\r\\n/g, '\\n').replace(/\\r/g, '\\n');\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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-ky/base-url-false/core/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { Auth, AuthToken } from './auth.gen';\nimport type { BodySerializer, QuerySerializer, QuerySerializerOptions } from './bodySerializer.gen';\n\nexport type HttpMethod =\n  | 'connect'\n  | 'delete'\n  | 'get'\n  | 'head'\n  | 'options'\n  | 'patch'\n  | 'post'\n  | 'put'\n  | 'trace';\n\nexport type Client<\n  RequestFn = never,\n  Config = unknown,\n  MethodFn = never,\n  BuildUrlFn = never,\n  SseFn = never,\n> = {\n  /**\n   * Returns the final request URL.\n   */\n  buildUrl: BuildUrlFn;\n  getConfig: () => Config;\n  request: RequestFn;\n  setConfig: (config: Config) => Config;\n} & {\n  [K in HttpMethod]: MethodFn;\n} & ([SseFn] extends [never] ? { sse?: never } : { sse: { [K in HttpMethod]: SseFn } });\n\nexport interface Config {\n  /**\n   * Auth token or a function returning auth token. The resolved value will be\n   * added to the request payload as defined by its `security` array.\n   */\n  auth?: ((auth: Auth) => Promise<AuthToken> | AuthToken) | AuthToken;\n  /**\n   * A function for serializing request body parameter. By default,\n   * {@link JSON.stringify()} will be used.\n   */\n  bodySerializer?: BodySerializer | null;\n  /**\n   * An object containing any HTTP headers that you want to pre-populate your\n   * `Headers` object with.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/Headers/Headers#init See more}\n   */\n  headers?:\n    | RequestInit['headers']\n    | Record<\n        string,\n        string | number | boolean | (string | number | boolean)[] | null | undefined | unknown\n      >;\n  /**\n   * The request method.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/fetch#method See more}\n   */\n  method?: Uppercase<HttpMethod>;\n  /**\n   * A function for serializing request query parameters. By default, arrays\n   * will be exploded in form style, objects will be exploded in deepObject\n   * style, and reserved characters are percent-encoded.\n   *\n   * This method will have no effect if the native `paramsSerializer()` Axios\n   * API function is used.\n   *\n   * {@link https://swagger.io/docs/specification/serialization/#query View examples}\n   */\n  querySerializer?: QuerySerializer | QuerySerializerOptions;\n  /**\n   * A function validating request data. This is useful if you want to ensure\n   * the request conforms to the desired shape, so it can be safely sent to\n   * the server.\n   */\n  requestValidator?: (data: unknown) => Promise<unknown>;\n  /**\n   * A function transforming response data before it's returned. This is useful\n   * for post-processing data, e.g. converting ISO strings into Date objects.\n   */\n  responseTransformer?: (data: unknown) => Promise<unknown>;\n  /**\n   * A function validating response data. This is useful if you want to ensure\n   * the response conforms to the desired shape, so it can be safely passed to\n   * the transformers and returned to the user.\n   */\n  responseValidator?: (data: unknown) => Promise<unknown>;\n}\n\ntype IsExactlyNeverOrNeverUndefined<T> = [T] extends [never]\n  ? true\n  : [T] extends [never | undefined]\n    ? [undefined] extends [T]\n      ? false\n      : true\n    : false;\n\nexport type OmitNever<T extends Record<string, unknown>> = {\n  [K in keyof T as IsExactlyNeverOrNeverUndefined<T[K]> extends true ? never : K]: T[K];\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-ky/base-url-false/core/utils.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-ky/base-url-false/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type { _3eNum1Период, _400, AdditionalPropertiesIntegerIssue, AdditionalPropertiesUnknownIssue, AdditionalPropertiesUnknownIssue2, AdditionalPropertiesUnknownIssue3, AdditionalPropertiesUnknownIssueWritable, AnyOfAnyAndNull, AnyOfArrays, ApiVVersionODataControllerCountData, ApiVVersionODataControllerCountResponse, ApiVVersionODataControllerCountResponses, ArrayWithAnyOfProperties, ArrayWithArray, ArrayWithBooleans, ArrayWithNumbers, ArrayWithProperties, ArrayWithReferences, ArrayWithStrings, CallToTestOrderOfParamsData, CallWithDefaultOptionalParametersData, CallWithDefaultParametersData, CallWithDescriptionsData, CallWithDuplicateResponsesData, CallWithDuplicateResponsesError, CallWithDuplicateResponsesErrors, CallWithDuplicateResponsesResponse, CallWithDuplicateResponsesResponses, CallWithNoContentResponseData, CallWithNoContentResponseResponse, CallWithNoContentResponseResponses, CallWithParametersData, CallWithResponseAndNoContentResponseData, CallWithResponseAndNoContentResponseResponse, CallWithResponseAndNoContentResponseResponses, CallWithResponseData, CallWithResponseResponse, CallWithResponseResponses, CallWithResponsesData, CallWithResponsesError, CallWithResponsesErrors, CallWithResponsesResponse, CallWithResponsesResponses, CallWithResultFromHeaderData, CallWithResultFromHeaderErrors, CallWithResultFromHeaderResponses, CallWithWeirdParameterNamesData, CamelCaseCommentWithBreaks, CharactersInDescription, ClientOptions, CollectionFormatData, CommentWithBackticks, CommentWithBackticksAndQuotes, CommentWithBreaks, CommentWithExpressionPlaceholders, CommentWithQuotes, CommentWithReservedCharacters, CommentWithSlashes, ComplexParamsData, ComplexParamsResponse, ComplexParamsResponses, ComplexTypesData, ComplexTypesErrors, ComplexTypesResponse, ComplexTypesResponses, CompositionBaseModel, CompositionExtendedModel, CompositionWithAllOfAndNullable, CompositionWithAnyOf, CompositionWithAnyOfAndNullable, CompositionWithAnyOfAnonymous, CompositionWithNestedAnyAndTypeNull, CompositionWithNestedAnyOfAndNull, CompositionWithOneOf, CompositionWithOneOfAndComplexArrayDictionary, CompositionWithOneOfAndNullable, CompositionWithOneOfAndProperties, CompositionWithOneOfAndSimpleArrayDictionary, CompositionWithOneOfAndSimpleDictionary, CompositionWithOneOfAnonymous, CompositionWithOneOfDiscriminator, ConstValue, Default, DeleteCallWithoutParametersAndResponseData, DeleteFooData, DeleteFooData2, DeleteFooData3, DeprecatedCallData, DeprecatedModel, DictionaryWithArray, DictionaryWithDictionary, DictionaryWithProperties, DictionaryWithPropertiesAndAdditionalProperties, DictionaryWithReference, DictionaryWithString, DummyAData, DummyAResponse, DummyAResponses, DummyBData, DummyBResponse, DummyBResponses, DuplicateName2Data, DuplicateName3Data, DuplicateName4Data, DuplicateNameData, EnumFromDescription, EnumWithExtensions, EnumWithNumbers, EnumWithReplacedCharacters, EnumWithStrings, EnumWithXEnumNames, ExportData, ExternalRefA, ExternalRefB, ExternalSharedModel, File, FileResponseData, FileResponseResponse, FileResponseResponses, FileWritable, FooWowData, FooWowResponses, FreeFormObjectWithAdditionalPropertiesEqEmptyObject, FreeFormObjectWithAdditionalPropertiesEqTrue, FreeFormObjectWithoutAdditionalProperties, GenericSchemaDuplicateIssue1SystemBoolean, GenericSchemaDuplicateIssue1SystemBooleanWritable, GenericSchemaDuplicateIssue1SystemString, GenericSchemaDuplicateIssue1SystemStringWritable, GetApiVbyApiVersionSimpleOperationData, GetApiVbyApiVersionSimpleOperationError, GetApiVbyApiVersionSimpleOperationErrors, GetApiVbyApiVersionSimpleOperationResponse, GetApiVbyApiVersionSimpleOperationResponses, GetCallWithOptionalParamData, GetCallWithoutParametersAndResponseData, HeadCallWithoutParametersAndResponseData, Import, ImportData, ImportResponse, ImportResponses, IoK8sApimachineryPkgApisMetaV1DeleteOptions, IoK8sApimachineryPkgApisMetaV1Preconditions, ModelCircle, ModelFromZendesk, ModelSquare, ModelThatExtends, ModelThatExtendsExtends, ModelWithAdditionalPropertiesEqTrue, ModelWithAdditionalPropertiesRef, ModelWithAnyOfConstantSizeArray, ModelWithAnyOfConstantSizeArrayAndIntersect, ModelWithAnyOfConstantSizeArrayNullable, ModelWithAnyOfConstantSizeArrayWithNSizeAndOptions, ModelWithAnyOfConstantSizeArrayWithNSizeAndOptionsWritable, ModelWithArray, ModelWithArrayReadOnlyAndWriteOnly, ModelWithArrayReadOnlyAndWriteOnlyWritable, ModelWithBackticksInDescription, ModelWithBoolean, ModelWithCircularReference, ModelWithConst, ModelWithConstantSizeArray, ModelWithDictionary, ModelWithDuplicateImports, ModelWithDuplicateProperties, ModelWithEnum, ModelWithEnumFromDescription, ModelWithEnumWithHyphen, ModelWithInteger, ModelWithNestedArrayEnums, ModelWithNestedArrayEnumsData, ModelWithNestedArrayEnumsDataBar, ModelWithNestedArrayEnumsDataFoo, ModelWithNestedCompositionEnums, ModelWithNestedEnums, ModelWithNestedProperties, ModelWithNullableObject, ModelWithNullableString, ModelWithNumericEnumUnion, ModelWithOneOfAndProperties, ModelWithOneOfEnum, ModelWithOrderedProperties, ModelWithPattern, ModelWithPatternWritable, ModelWithPrefixItemsConstantSizeArray, ModelWithProperties, ModelWithPropertiesWritable, ModelWithReadOnlyAndWriteOnly, ModelWithReadOnlyAndWriteOnlyWritable, ModelWithReference, ModelWithReferenceWritable, ModelWithString, ModelWithStringError, MultipartRequestData, MultipartResponseData, MultipartResponseResponse, MultipartResponseResponses, NestedAnyOfArraysNullable, NonAsciiæøåÆøÅöôêÊ字符串Data, NonAsciiæøåÆøÅöôêÊ字符串Response, NonAsciiæøåÆøÅöôêÊ字符串Responses, NonAsciiStringæøåÆøÅöôêÊ字符串, NullableObject, OneOfAllOfIssue, OneOfAllOfIssueWritable, OptionsCallWithoutParametersAndResponseData, Pageable, ParameterSimpleParameterUnused, PatchApiVbyApiVersionNoTagData, PatchApiVbyApiVersionNoTagResponses, PatchCallWithoutParametersAndResponseData, PostApiVbyApiVersionFormDataData, PostApiVbyApiVersionRequestBodyData, PostCallWithOptionalParamData, PostCallWithOptionalParamResponse, PostCallWithOptionalParamResponses, PostCallWithoutParametersAndResponseData, PostServiceWithEmptyTagResponse, PostServiceWithEmptyTagResponse2, PutCallWithoutParametersAndResponseData, PutWithFormUrlEncodedData, SchemaWithFormRestrictedKeys, SimpleBoolean, SimpleFile, SimpleFormData, SimpleInteger, SimpleParameter, SimpleReference, SimpleRequestBody, SimpleString, SimpleStringWithPattern, TestErrorCodeData, TestErrorCodeErrors, TestErrorCodeResponses, TypesData, TypesResponse, TypesResponses, UploadFileData, UploadFileResponse, UploadFileResponses, XFooBar } from './types.gen';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-ky/base-url-false/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type ClientOptions = {\n    baseUrl: 'http://localhost:3000/base' | (string & {});\n};\n\n/**\n * Model with number-only name\n */\nexport type _400 = string;\n\n/**\n * External ref to shared model (A)\n */\nexport type ExternalRefA = ExternalSharedModel;\n\n/**\n * External ref to shared model (B)\n */\nexport type ExternalRefB = ExternalSharedModel;\n\n/**\n * Testing multiline comments in string: First line\n * Second line\n *\n * Fourth line\n */\nexport type CamelCaseCommentWithBreaks = number;\n\n/**\n * Testing multiline comments in string: First line\n * Second line\n *\n * Fourth line\n */\nexport type CommentWithBreaks = number;\n\n/**\n * Testing backticks in string: `backticks` and ```multiple backticks``` should work\n */\nexport type CommentWithBackticks = number;\n\n/**\n * Testing backticks and quotes in string: `backticks`, 'quotes', \"double quotes\" and ```multiple backticks``` should work\n */\nexport type CommentWithBackticksAndQuotes = number;\n\n/**\n * Testing slashes in string: \\backwards\\\\\\ and /forwards/// should work\n */\nexport type CommentWithSlashes = number;\n\n/**\n * Testing expression placeholders in string: ${expression} should work\n */\nexport type CommentWithExpressionPlaceholders = number;\n\n/**\n * Testing quotes in string: 'single quote''' and \"double quotes\"\"\" should work\n */\nexport type CommentWithQuotes = number;\n\n/**\n * Testing reserved characters in string: * inline * and ** inline ** should work\n */\nexport type CommentWithReservedCharacters = number;\n\n/**\n * This is a simple number\n */\nexport type SimpleInteger = number;\n\n/**\n * This is a simple boolean\n */\nexport type SimpleBoolean = boolean;\n\n/**\n * This is a simple string\n */\nexport type SimpleString = string;\n\n/**\n * A string with non-ascii (unicode) characters valid in typescript identifiers (æøåÆØÅöÔèÈ字符串)\n */\nexport type NonAsciiStringæøåÆøÅöôêÊ字符串 = string;\n\n/**\n * This is a simple file\n */\nexport type SimpleFile = Blob | File;\n\n/**\n * This is a simple reference\n */\nexport type SimpleReference = ModelWithString;\n\n/**\n * This is a simple string\n */\nexport type SimpleStringWithPattern = string | null;\n\n/**\n * This is a simple enum with strings\n */\nexport type EnumWithStrings = 'Success' | 'Warning' | 'Error' | '\\'Single Quote\\'' | '\"Double Quotes\"' | 'Non-ascii: øæåôöØÆÅÔÖ字符串';\n\nexport type EnumWithReplacedCharacters = '\\'Single Quote\\'' | '\"Double Quotes\"' | 'øæåôöØÆÅÔÖ字符串' | 3.1 | '';\n\n/**\n * This is a simple enum with numbers\n */\nexport type EnumWithNumbers = 1 | 2 | 3 | 1.1 | 1.2 | 1.3 | 100 | 200 | 300 | -100 | -200 | -300 | -1.1 | -1.2 | -1.3;\n\n/**\n * Success=1,Warning=2,Error=3\n */\nexport type EnumFromDescription = number;\n\n/**\n * This is a simple enum with numbers\n */\nexport type EnumWithExtensions = 200 | 400 | 500;\n\nexport type EnumWithXEnumNames = 0 | 1 | 2;\n\n/**\n * This is a simple array with numbers\n */\nexport type ArrayWithNumbers = Array<number>;\n\n/**\n * This is a simple array with booleans\n */\nexport type ArrayWithBooleans = Array<boolean>;\n\n/**\n * This is a simple array with strings\n */\nexport type ArrayWithStrings = Array<string>;\n\n/**\n * This is a simple array with references\n */\nexport type ArrayWithReferences = Array<ModelWithString>;\n\n/**\n * This is a simple array containing an array\n */\nexport type ArrayWithArray = Array<Array<ModelWithString>>;\n\n/**\n * This is a simple array with properties\n */\nexport type ArrayWithProperties = Array<{\n    '16x16'?: CamelCaseCommentWithBreaks;\n    bar?: string;\n}>;\n\n/**\n * This is a simple array with any of properties\n */\nexport type ArrayWithAnyOfProperties = Array<{\n    foo?: string;\n} | {\n    bar?: string;\n}>;\n\nexport type AnyOfAnyAndNull = {\n    data?: unknown | null;\n};\n\n/**\n * This is a simple array with any of properties\n */\nexport type AnyOfArrays = {\n    results?: Array<{\n        foo?: string;\n    } | {\n        bar?: string;\n    }>;\n};\n\n/**\n * This is a string dictionary\n */\nexport type DictionaryWithString = {\n    [key: string]: string;\n};\n\nexport type DictionaryWithPropertiesAndAdditionalProperties = {\n    foo?: number;\n    bar?: boolean;\n    [key: string]: string | number | boolean | undefined;\n};\n\n/**\n * This is a string reference\n */\nexport type DictionaryWithReference = {\n    [key: string]: ModelWithString;\n};\n\n/**\n * This is a complex dictionary\n */\nexport type DictionaryWithArray = {\n    [key: string]: Array<ModelWithString>;\n};\n\n/**\n * This is a string dictionary\n */\nexport type DictionaryWithDictionary = {\n    [key: string]: {\n        [key: string]: string;\n    };\n};\n\n/**\n * This is a complex dictionary\n */\nexport type DictionaryWithProperties = {\n    [key: string]: {\n        foo?: string;\n        bar?: string;\n    };\n};\n\n/**\n * This is a model with one number property\n */\nexport type ModelWithInteger = {\n    /**\n     * This is a simple number property\n     */\n    prop?: number;\n};\n\n/**\n * This is a model with one boolean property\n */\nexport type ModelWithBoolean = {\n    /**\n     * This is a simple boolean property\n     */\n    prop?: boolean;\n};\n\n/**\n * This is a model with one string property\n */\nexport type ModelWithString = {\n    /**\n     * This is a simple string property\n     */\n    prop?: string;\n};\n\n/**\n * This is a model with one string property\n */\nexport type ModelWithStringError = {\n    /**\n     * This is a simple string property\n     */\n    prop?: string;\n};\n\n/**\n * `Comment` or `VoiceComment`. The JSON object for adding voice comments to tickets is different. See [Adding voice comments to tickets](/documentation/ticketing/managing-tickets/adding-voice-comments-to-tickets)\n */\nexport type ModelFromZendesk = string;\n\n/**\n * This is a model with one string property\n */\nexport type ModelWithNullableString = {\n    /**\n     * This is a simple string property\n     */\n    nullableProp1?: string | null;\n    /**\n     * This is a simple string property\n     */\n    nullableRequiredProp1: string | null;\n    /**\n     * This is a simple string property\n     */\n    nullableProp2?: string | null;\n    /**\n     * This is a simple string property\n     */\n    nullableRequiredProp2: string | null;\n    /**\n     * This is a simple enum with strings\n     */\n    'foo_bar-enum'?: 'Success' | 'Warning' | 'Error' | 'ØÆÅ字符串';\n};\n\n/**\n * This is a model with one enum\n */\nexport type ModelWithEnum = {\n    /**\n     * This is a simple enum with strings\n     */\n    'foo_bar-enum'?: 'Success' | 'Warning' | 'Error' | 'ØÆÅ字符串';\n    /**\n     * These are the HTTP error code enums\n     */\n    statusCode?: '100' | '200 FOO' | '300 FOO_BAR' | '400 foo-bar' | '500 foo.bar' | '600 foo&bar';\n    /**\n     * Simple boolean enum\n     */\n    bool?: true;\n};\n\n/**\n * This is a model with one enum with escaped name\n */\nexport type ModelWithEnumWithHyphen = {\n    /**\n     * Foo-Bar-Baz-Qux\n     */\n    'foo-bar-baz-qux'?: '3.0';\n};\n\n/**\n * This is a model with one enum\n */\nexport type ModelWithEnumFromDescription = {\n    /**\n     * Success=1,Warning=2,Error=3\n     */\n    test?: number;\n};\n\n/**\n * This is a model with nested enums\n */\nexport type ModelWithNestedEnums = {\n    dictionaryWithEnum?: {\n        [key: string]: 'Success' | 'Warning' | 'Error';\n    };\n    dictionaryWithEnumFromDescription?: {\n        [key: string]: number;\n    };\n    arrayWithEnum?: Array<'Success' | 'Warning' | 'Error'>;\n    arrayWithDescription?: Array<number>;\n    /**\n     * This is a simple enum with strings\n     */\n    'foo_bar-enum'?: 'Success' | 'Warning' | 'Error' | 'ØÆÅ字符串';\n};\n\n/**\n * This is a model with one property containing a reference\n */\nexport type ModelWithReference = {\n    prop?: ModelWithProperties;\n};\n\n/**\n * This is a model with one property containing an array\n */\nexport type ModelWithArrayReadOnlyAndWriteOnly = {\n    prop?: Array<ModelWithReadOnlyAndWriteOnly>;\n    propWithFile?: Array<Blob | File>;\n    propWithNumber?: Array<number>;\n};\n\n/**\n * This is a model with one property containing an array\n */\nexport type ModelWithArray = {\n    prop?: Array<ModelWithString>;\n    propWithFile?: Array<Blob | File>;\n    propWithNumber?: Array<number>;\n};\n\n/**\n * This is a model with one property containing a dictionary\n */\nexport type ModelWithDictionary = {\n    prop?: {\n        [key: string]: string;\n    };\n};\n\n/**\n * This is a deprecated model with a deprecated property\n *\n * @deprecated\n */\nexport type DeprecatedModel = {\n    /**\n     * This is a deprecated property\n     *\n     * @deprecated\n     */\n    prop?: string;\n};\n\n/**\n * This is a model with one property containing a circular reference\n */\nexport type ModelWithCircularReference = {\n    prop?: ModelWithCircularReference;\n};\n\n/**\n * This is a model with one property with a 'one of' relationship\n */\nexport type CompositionWithOneOf = {\n    propA?: ModelWithString | ModelWithEnum | ModelWithArray | ModelWithDictionary;\n};\n\n/**\n * This is a model with one property with a 'one of' relationship where the options are not $ref\n */\nexport type CompositionWithOneOfAnonymous = {\n    propA?: {\n        propA?: string;\n    } | string | number;\n};\n\n/**\n * Circle\n */\nexport type ModelCircle = {\n    kind: string;\n    radius?: number;\n};\n\n/**\n * Square\n */\nexport type ModelSquare = {\n    kind: string;\n    sideLength?: number;\n};\n\n/**\n * This is a model with one property with a 'one of' relationship where the options are not $ref\n */\nexport type CompositionWithOneOfDiscriminator = ({\n    kind: 'circle';\n} & ModelCircle) | ({\n    kind: 'square';\n} & ModelSquare);\n\n/**\n * This is a model with one property with a 'any of' relationship\n */\nexport type CompositionWithAnyOf = {\n    propA?: ModelWithString | ModelWithEnum | ModelWithArray | ModelWithDictionary;\n};\n\n/**\n * This is a model with one property with a 'any of' relationship where the options are not $ref\n */\nexport type CompositionWithAnyOfAnonymous = {\n    propA?: {\n        propA?: string;\n    } | string | number;\n};\n\n/**\n * This is a model with nested 'any of' property with a type null\n */\nexport type CompositionWithNestedAnyAndTypeNull = {\n    propA?: Array<ModelWithDictionary | null> | Array<ModelWithArray | null>;\n};\n\nexport type _3eNum1Период = 'Bird' | 'Dog';\n\nexport type ConstValue = 'ConstValue';\n\n/**\n * This is a model with one property with a 'any of' relationship where the options are not $ref\n */\nexport type CompositionWithNestedAnyOfAndNull = {\n    /**\n     * Scopes\n     */\n    propA?: Array<_3eNum1Период | ConstValue> | null;\n};\n\n/**\n * This is a model with one property with a 'one of' relationship\n */\nexport type CompositionWithOneOfAndNullable = {\n    propA?: {\n        boolean?: boolean;\n    } | ModelWithEnum | ModelWithArray | ModelWithDictionary | null;\n};\n\n/**\n * This is a model that contains a simple dictionary within composition\n */\nexport type CompositionWithOneOfAndSimpleDictionary = {\n    propA?: boolean | {\n        [key: string]: number;\n    };\n};\n\n/**\n * This is a model that contains a dictionary of simple arrays within composition\n */\nexport type CompositionWithOneOfAndSimpleArrayDictionary = {\n    propA?: boolean | {\n        [key: string]: Array<boolean>;\n    };\n};\n\n/**\n * This is a model that contains a dictionary of complex arrays (composited) within composition\n */\nexport type CompositionWithOneOfAndComplexArrayDictionary = {\n    propA?: boolean | {\n        [key: string]: Array<number | string>;\n    };\n};\n\n/**\n * This is a model with one property with a 'all of' relationship\n */\nexport type CompositionWithAllOfAndNullable = {\n    propA?: ({\n        boolean?: boolean;\n    } & ModelWithEnum & ModelWithArray & ModelWithDictionary) | null;\n};\n\n/**\n * This is a model with one property with a 'any of' relationship\n */\nexport type CompositionWithAnyOfAndNullable = {\n    propA?: {\n        boolean?: boolean;\n    } | ModelWithEnum | ModelWithArray | ModelWithDictionary | null;\n};\n\n/**\n * This is a base model with two simple optional properties\n */\nexport type CompositionBaseModel = {\n    firstName?: string;\n    lastname?: string;\n};\n\n/**\n * This is a model that extends the base model\n */\nexport type CompositionExtendedModel = CompositionBaseModel & {\n    age: number;\n    firstName: string;\n    lastname: string;\n};\n\n/**\n * This is a model with one nested property\n */\nexport type ModelWithProperties = {\n    required: string;\n    readonly requiredAndReadOnly: string;\n    requiredAndNullable: string | null;\n    string?: string;\n    number?: number;\n    boolean?: boolean;\n    reference?: ModelWithString;\n    'property with space'?: string;\n    default?: string;\n    try?: string;\n    readonly '@namespace.string'?: string;\n    readonly '@namespace.integer'?: number;\n};\n\n/**\n * This is a model with one nested property\n */\nexport type ModelWithNestedProperties = {\n    readonly first: {\n        readonly second: {\n            readonly third: string | null;\n        } | null;\n    } | null;\n};\n\n/**\n * This is a model with duplicated properties\n */\nexport type ModelWithDuplicateProperties = {\n    prop?: ModelWithString;\n};\n\n/**\n * This is a model with ordered properties\n */\nexport type ModelWithOrderedProperties = {\n    zebra?: string;\n    apple?: string;\n    hawaii?: string;\n};\n\n/**\n * This is a model with duplicated imports\n */\nexport type ModelWithDuplicateImports = {\n    propA?: ModelWithString;\n    propB?: ModelWithString;\n    propC?: ModelWithString;\n};\n\n/**\n * This is a model that extends another model\n */\nexport type ModelThatExtends = ModelWithString & {\n    propExtendsA?: string;\n    propExtendsB?: ModelWithString;\n};\n\n/**\n * This is a model that extends another model\n */\nexport type ModelThatExtendsExtends = ModelWithString & ModelThatExtends & {\n    propExtendsC?: string;\n    propExtendsD?: ModelWithString;\n};\n\n/**\n * This is a model that contains a some patterns\n */\nexport type ModelWithPattern = {\n    key: string;\n    name: string;\n    readonly enabled?: boolean;\n    readonly modified?: string;\n    id?: string;\n    text?: string;\n    patternWithSingleQuotes?: string;\n    patternWithNewline?: string;\n    patternWithBacktick?: string;\n    patternWithUnicode?: string;\n};\n\nexport type File = {\n    /**\n     * Id\n     */\n    readonly id?: string;\n    /**\n     * Updated at\n     */\n    readonly updated_at?: string;\n    /**\n     * Created at\n     */\n    readonly created_at?: string;\n    /**\n     * Mime\n     */\n    mime: string;\n    /**\n     * File\n     */\n    readonly file?: string;\n};\n\nexport type Default = {\n    name?: string;\n};\n\nexport type Pageable = {\n    page?: number;\n    size?: number;\n    sort?: Array<string>;\n};\n\n/**\n * This is a free-form object without additionalProperties.\n */\nexport type FreeFormObjectWithoutAdditionalProperties = {\n    [key: string]: unknown;\n};\n\n/**\n * This is a free-form object with additionalProperties: true.\n */\nexport type FreeFormObjectWithAdditionalPropertiesEqTrue = {\n    [key: string]: unknown;\n};\n\n/**\n * This is a free-form object with additionalProperties: {}.\n */\nexport type FreeFormObjectWithAdditionalPropertiesEqEmptyObject = {\n    [key: string]: unknown;\n};\n\nexport type ModelWithConst = {\n    String?: 'String';\n    number?: 0;\n    null?: null;\n    withType?: 'Some string';\n};\n\n/**\n * This is a model with one property and additionalProperties: true\n */\nexport type ModelWithAdditionalPropertiesEqTrue = {\n    /**\n     * This is a simple string property\n     */\n    prop?: string;\n    [key: string]: unknown;\n};\n\nexport type NestedAnyOfArraysNullable = {\n    nullableArray?: Array<string | boolean> | null;\n};\n\nexport type CompositionWithOneOfAndProperties = ({\n    foo: SimpleParameter;\n} | {\n    bar: NonAsciiStringæøåÆøÅöôêÊ字符串;\n}) & {\n    baz: number | null;\n    qux: number;\n};\n\n/**\n * An object that can be null\n */\nexport type NullableObject = {\n    foo?: string;\n} | null;\n\n/**\n * Some % character\n */\nexport type CharactersInDescription = string;\n\nexport type ModelWithNullableObject = {\n    data?: NullableObject;\n};\n\n/**\n * An object with additional properties that can be null (anyOf ref + null)\n */\nexport type ModelWithAdditionalPropertiesRef = {\n    [key: string]: NullableObject | null;\n};\n\nexport type ModelWithOneOfEnum = {\n    foo: 'Bar';\n} | {\n    foo: 'Baz';\n} | {\n    foo: 'Qux';\n} | {\n    content: string;\n    foo: 'Quux';\n} | {\n    content: [\n        string,\n        string\n    ];\n    foo: 'Corge';\n};\n\nexport type ModelWithNestedArrayEnumsDataFoo = 'foo' | 'bar';\n\nexport type ModelWithNestedArrayEnumsDataBar = 'baz' | 'qux';\n\nexport type ModelWithNestedArrayEnumsData = {\n    foo?: Array<ModelWithNestedArrayEnumsDataFoo>;\n    bar?: Array<ModelWithNestedArrayEnumsDataBar>;\n};\n\nexport type ModelWithNestedArrayEnums = {\n    array_strings?: Array<string>;\n    data?: ModelWithNestedArrayEnumsData;\n};\n\nexport type ModelWithNestedCompositionEnums = {\n    foo?: ModelWithNestedArrayEnumsDataFoo;\n};\n\nexport type ModelWithReadOnlyAndWriteOnly = {\n    foo: string;\n    readonly bar: string;\n};\n\nexport type ModelWithConstantSizeArray = [\n    number,\n    number\n];\n\nexport type ModelWithAnyOfConstantSizeArray = [\n    number | string,\n    number | string,\n    number | string\n];\n\nexport type ModelWithPrefixItemsConstantSizeArray = [\n    ModelWithInteger,\n    number | string,\n    string\n];\n\nexport type ModelWithAnyOfConstantSizeArrayNullable = [\n    number | null | string,\n    number | null | string,\n    number | null | string\n];\n\nexport type ModelWithAnyOfConstantSizeArrayWithNSizeAndOptions = [\n    number | Import,\n    number | Import\n];\n\nexport type ModelWithAnyOfConstantSizeArrayAndIntersect = [\n    number & string,\n    number & string\n];\n\nexport type ModelWithNumericEnumUnion = {\n    /**\n     * Период\n     */\n    value?: -10 | -1 | 0 | 1 | 3 | 6 | 12;\n};\n\n/**\n * Some description with `back ticks`\n */\nexport type ModelWithBackticksInDescription = {\n    /**\n     * The template `that` should be used for parsing and importing the contents of the CSV file.\n     *\n     * <br/><p>There is one placeholder currently supported:<ul>     <li><b>${x}</b> - refers to the n-th column in the CSV file, e.g. ${1}, ${2}, ...)</li></ul><p>Example of a correct JSON template:</p>\n     * <pre>\n     * [\n     * {\n     * \"resourceType\": \"Asset\",\n     * \"identifier\": {\n     * \"name\": \"${1}\",\n     * \"domain\": {\n     * \"name\": \"${2}\",\n     * \"community\": {\n     * \"name\": \"Some Community\"\n     * }\n     * }\n     * },\n     * \"attributes\" : {\n     * \"00000000-0000-0000-0000-000000003115\" : [ {\n     * \"value\" : \"${3}\"\n     * } ],\n     * \"00000000-0000-0000-0000-000000000222\" : [ {\n     * \"value\" : \"${4}\"\n     * } ]\n     * }\n     * }\n     * ]\n     * </pre>\n     */\n    template?: string;\n};\n\nexport type ModelWithOneOfAndProperties = (SimpleParameter | NonAsciiStringæøåÆøÅöôêÊ字符串) & {\n    baz: number | null;\n    qux: number;\n};\n\n/**\n * Model used to test deduplication strategy (unused)\n */\nexport type ParameterSimpleParameterUnused = string;\n\n/**\n * Model used to test deduplication strategy\n */\nexport type PostServiceWithEmptyTagResponse = string;\n\n/**\n * Model used to test deduplication strategy\n */\nexport type PostServiceWithEmptyTagResponse2 = string;\n\n/**\n * Model used to test deduplication strategy\n */\nexport type DeleteFooData = string;\n\n/**\n * Model used to test deduplication strategy\n */\nexport type DeleteFooData2 = string;\n\n/**\n * Model with restricted keyword name\n */\nexport type Import = string;\n\nexport type SchemaWithFormRestrictedKeys = {\n    description?: string;\n    'x-enum-descriptions'?: string;\n    'x-enum-varnames'?: string;\n    'x-enumNames'?: string;\n    title?: string;\n    object?: {\n        description?: string;\n        'x-enum-descriptions'?: string;\n        'x-enum-varnames'?: string;\n        'x-enumNames'?: string;\n        title?: string;\n    };\n    array?: Array<{\n        description?: string;\n        'x-enum-descriptions'?: string;\n        'x-enum-varnames'?: string;\n        'x-enumNames'?: string;\n        title?: string;\n    }>;\n};\n\n/**\n * This schema was giving PascalCase transformations a hard time\n */\nexport type IoK8sApimachineryPkgApisMetaV1DeleteOptions = {\n    /**\n     * Must be fulfilled before a deletion is carried out. If not possible, a 409 Conflict status will be returned.\n     */\n    preconditions?: IoK8sApimachineryPkgApisMetaV1Preconditions;\n};\n\n/**\n * This schema was giving PascalCase transformations a hard time\n */\nexport type IoK8sApimachineryPkgApisMetaV1Preconditions = {\n    /**\n     * Specifies the target ResourceVersion\n     */\n    resourceVersion?: string;\n    /**\n     * Specifies the target UID.\n     */\n    uid?: string;\n};\n\nexport type AdditionalPropertiesUnknownIssue = {\n    [key: string]: string | number;\n};\n\nexport type AdditionalPropertiesUnknownIssue2 = {\n    [key: string]: string | number;\n};\n\nexport type AdditionalPropertiesUnknownIssue3 = string & {\n    entries: {\n        [key: string]: AdditionalPropertiesUnknownIssue;\n    };\n};\n\nexport type AdditionalPropertiesIntegerIssue = {\n    value: number;\n    [key: string]: number;\n};\n\nexport type OneOfAllOfIssue = ((ConstValue | GenericSchemaDuplicateIssue1SystemBoolean) & _3eNum1Период) | GenericSchemaDuplicateIssue1SystemString;\n\nexport type GenericSchemaDuplicateIssue1SystemBoolean = {\n    item?: boolean;\n    error?: string | null;\n    readonly hasError?: boolean;\n    data?: {\n        [key: string]: never;\n    };\n};\n\nexport type GenericSchemaDuplicateIssue1SystemString = {\n    item?: string | null;\n    error?: string | null;\n    readonly hasError?: boolean;\n};\n\nexport type ExternalSharedModel = {\n    id: string;\n    name?: string;\n};\n\n/**\n * This is a model with one property containing a reference\n */\nexport type ModelWithReferenceWritable = {\n    prop?: ModelWithPropertiesWritable;\n};\n\n/**\n * This is a model with one property containing an array\n */\nexport type ModelWithArrayReadOnlyAndWriteOnlyWritable = {\n    prop?: Array<ModelWithReadOnlyAndWriteOnlyWritable>;\n    propWithFile?: Array<Blob | File>;\n    propWithNumber?: Array<number>;\n};\n\n/**\n * This is a model with one nested property\n */\nexport type ModelWithPropertiesWritable = {\n    required: string;\n    requiredAndNullable: string | null;\n    string?: string;\n    number?: number;\n    boolean?: boolean;\n    reference?: ModelWithString;\n    'property with space'?: string;\n    default?: string;\n    try?: string;\n};\n\n/**\n * This is a model that contains a some patterns\n */\nexport type ModelWithPatternWritable = {\n    key: string;\n    name: string;\n    id?: string;\n    text?: string;\n    patternWithSingleQuotes?: string;\n    patternWithNewline?: string;\n    patternWithBacktick?: string;\n    patternWithUnicode?: string;\n};\n\nexport type FileWritable = {\n    /**\n     * Mime\n     */\n    mime: string;\n};\n\nexport type ModelWithReadOnlyAndWriteOnlyWritable = {\n    foo: string;\n    baz: string;\n};\n\nexport type ModelWithAnyOfConstantSizeArrayWithNSizeAndOptionsWritable = [\n    number | Import,\n    number | Import\n];\n\nexport type AdditionalPropertiesUnknownIssueWritable = {\n    [key: string]: string | number;\n};\n\nexport type OneOfAllOfIssueWritable = ((ConstValue | GenericSchemaDuplicateIssue1SystemBoolean) & _3eNum1Период) | GenericSchemaDuplicateIssue1SystemString;\n\nexport type GenericSchemaDuplicateIssue1SystemBooleanWritable = {\n    item?: boolean;\n    error?: string | null;\n    data?: {\n        [key: string]: never;\n    };\n};\n\nexport type GenericSchemaDuplicateIssue1SystemStringWritable = {\n    item?: string | null;\n    error?: string | null;\n};\n\n/**\n * This is a reusable parameter\n */\nexport type SimpleParameter = string;\n\n/**\n * Parameter with illegal characters\n */\nexport type XFooBar = ModelWithString;\n\n/**\n * A reusable request body\n */\nexport type SimpleRequestBody = ModelWithString;\n\n/**\n * A reusable request body\n */\nexport type SimpleFormData = ModelWithString;\n\nexport type ExportData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no+tag';\n};\n\nexport type PatchApiVbyApiVersionNoTagData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no+tag';\n};\n\nexport type PatchApiVbyApiVersionNoTagResponses = {\n    /**\n     * OK\n     */\n    default: unknown;\n};\n\nexport type ImportData = {\n    body: ModelWithReadOnlyAndWriteOnlyWritable | ModelWithArrayReadOnlyAndWriteOnlyWritable;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no+tag';\n};\n\nexport type ImportResponses = {\n    /**\n     * Success\n     */\n    200: ModelFromZendesk;\n    /**\n     * Default success response\n     */\n    default: ModelWithReadOnlyAndWriteOnly;\n};\n\nexport type ImportResponse = ImportResponses[keyof ImportResponses];\n\nexport type FooWowData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no+tag';\n};\n\nexport type FooWowResponses = {\n    /**\n     * OK\n     */\n    default: unknown;\n};\n\nexport type ApiVVersionODataControllerCountData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple/$count';\n};\n\nexport type ApiVVersionODataControllerCountResponses = {\n    /**\n     * Success\n     */\n    200: ModelFromZendesk;\n};\n\nexport type ApiVVersionODataControllerCountResponse = ApiVVersionODataControllerCountResponses[keyof ApiVVersionODataControllerCountResponses];\n\nexport type GetApiVbyApiVersionSimpleOperationData = {\n    body?: never;\n    path: {\n        /**\n         * foo in method\n         */\n        foo_param: string;\n    };\n    query?: never;\n    url: '/api/v{api-version}/simple:operation';\n};\n\nexport type GetApiVbyApiVersionSimpleOperationErrors = {\n    /**\n     * Default error response\n     */\n    default: ModelWithBoolean;\n};\n\nexport type GetApiVbyApiVersionSimpleOperationError = GetApiVbyApiVersionSimpleOperationErrors[keyof GetApiVbyApiVersionSimpleOperationErrors];\n\nexport type GetApiVbyApiVersionSimpleOperationResponses = {\n    /**\n     * Response is a simple number\n     */\n    200: number;\n};\n\nexport type GetApiVbyApiVersionSimpleOperationResponse = GetApiVbyApiVersionSimpleOperationResponses[keyof GetApiVbyApiVersionSimpleOperationResponses];\n\nexport type DeleteCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type GetCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type HeadCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type OptionsCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type PatchCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type PostCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type PutCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type DeleteFooData3 = {\n    body?: never;\n    headers: {\n        /**\n         * Parameter with illegal characters\n         */\n        'x-Foo-Bar': ModelWithString;\n    };\n    path: {\n        /**\n         * foo in method\n         */\n        foo_param: string;\n        /**\n         * bar in method\n         */\n        BarParam: string;\n    };\n    query?: never;\n    url: '/api/v{api-version}/foo/{foo_param}/bar/{BarParam}';\n};\n\nexport type CallWithDescriptionsData = {\n    body?: never;\n    path?: never;\n    query?: {\n        /**\n         * Testing multiline comments in string: First line\n         * Second line\n         *\n         * Fourth line\n         */\n        parameterWithBreaks?: string;\n        /**\n         * Testing backticks in string: `backticks` and ```multiple backticks``` should work\n         */\n        parameterWithBackticks?: string;\n        /**\n         * Testing slashes in string: \\backwards\\\\\\ and /forwards/// should work\n         */\n        parameterWithSlashes?: string;\n        /**\n         * Testing expression placeholders in string: ${expression} should work\n         */\n        parameterWithExpressionPlaceholders?: string;\n        /**\n         * Testing quotes in string: 'single quote''' and \"double quotes\"\"\" should work\n         */\n        parameterWithQuotes?: string;\n        /**\n         * Testing reserved characters in string: * inline * and ** inline ** should work\n         */\n        parameterWithReservedCharacters?: string;\n    };\n    url: '/api/v{api-version}/descriptions';\n};\n\nexport type DeprecatedCallData = {\n    body?: never;\n    headers: {\n        /**\n         * This parameter is deprecated\n         *\n         * @deprecated\n         */\n        parameter: DeprecatedModel | null;\n    };\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/parameters/deprecated';\n};\n\nexport type CallWithParametersData = {\n    /**\n     * This is the parameter that goes into the body\n     */\n    body: {\n        [key: string]: unknown;\n    } | null;\n    headers: {\n        /**\n         * This is the parameter that goes into the header\n         */\n        parameterHeader: string | null;\n    };\n    path: {\n        /**\n         * This is the parameter that goes into the path\n         */\n        parameterPath: string | null;\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string | null;\n    };\n    query: {\n        foo_ref_enum?: ModelWithNestedArrayEnumsDataFoo;\n        foo_all_of_enum: ModelWithNestedArrayEnumsDataFoo;\n        /**\n         * This is the parameter that goes into the query params\n         */\n        cursor: string | null;\n    };\n    url: '/api/v{api-version}/parameters/{parameterPath}';\n};\n\nexport type CallWithWeirdParameterNamesData = {\n    /**\n     * This is the parameter that goes into the body\n     */\n    body: ModelWithString | null;\n    headers: {\n        /**\n         * This is the parameter that goes into the request header\n         */\n        'parameter.header': string | null;\n    };\n    path: {\n        /**\n         * This is the parameter that goes into the path\n         */\n        'parameter.path.1'?: string;\n        /**\n         * This is the parameter that goes into the path\n         */\n        'parameter-path-2'?: string;\n        /**\n         * This is the parameter that goes into the path\n         */\n        'PARAMETER-PATH-3'?: string;\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string | null;\n    };\n    query: {\n        /**\n         * This is the parameter with a reserved keyword\n         */\n        default?: string;\n        /**\n         * This is the parameter that goes into the request query params\n         */\n        'parameter-query': string | null;\n    };\n    url: '/api/v{api-version}/parameters/{parameter.path.1}/{parameter-path-2}/{PARAMETER-PATH-3}';\n};\n\nexport type GetCallWithOptionalParamData = {\n    /**\n     * This is a required parameter\n     */\n    body: ModelWithOneOfEnum;\n    path?: never;\n    query?: {\n        /**\n         * This is an optional parameter\n         */\n        page?: number;\n    };\n    url: '/api/v{api-version}/parameters';\n};\n\nexport type PostCallWithOptionalParamData = {\n    /**\n     * This is an optional parameter\n     */\n    body?: {\n        offset?: number | null;\n    };\n    path?: never;\n    query: {\n        /**\n         * This is a required parameter\n         */\n        parameter: Pageable;\n    };\n    url: '/api/v{api-version}/parameters';\n};\n\nexport type PostCallWithOptionalParamResponses = {\n    /**\n     * Response is a simple number\n     */\n    200: number;\n    /**\n     * Success\n     */\n    204: void;\n};\n\nexport type PostCallWithOptionalParamResponse = PostCallWithOptionalParamResponses[keyof PostCallWithOptionalParamResponses];\n\nexport type PostApiVbyApiVersionRequestBodyData = {\n    /**\n     * A reusable request body\n     */\n    body?: SimpleRequestBody;\n    path?: never;\n    query?: {\n        /**\n         * This is a reusable parameter\n         */\n        parameter?: string;\n    };\n    url: '/api/v{api-version}/requestBody';\n};\n\nexport type PostApiVbyApiVersionFormDataData = {\n    /**\n     * A reusable request body\n     */\n    body?: SimpleFormData;\n    path?: never;\n    query?: {\n        /**\n         * This is a reusable parameter\n         */\n        parameter?: string;\n    };\n    url: '/api/v{api-version}/formData';\n};\n\nexport type CallWithDefaultParametersData = {\n    body?: never;\n    path?: never;\n    query?: {\n        /**\n         * This is a simple string with default value\n         */\n        parameterString?: string | null;\n        /**\n         * This is a simple number with default value\n         */\n        parameterNumber?: number | null;\n        /**\n         * This is a simple boolean with default value\n         */\n        parameterBoolean?: boolean | null;\n        /**\n         * This is a simple enum with default value\n         */\n        parameterEnum?: 'Success' | 'Warning' | 'Error';\n        /**\n         * This is a simple model with default value\n         */\n        parameterModel?: ModelWithString | null;\n    };\n    url: '/api/v{api-version}/defaults';\n};\n\nexport type CallWithDefaultOptionalParametersData = {\n    body?: never;\n    path?: never;\n    query?: {\n        /**\n         * This is a simple string that is optional with default value\n         */\n        parameterString?: string;\n        /**\n         * This is a simple number that is optional with default value\n         */\n        parameterNumber?: number;\n        /**\n         * This is a simple boolean that is optional with default value\n         */\n        parameterBoolean?: boolean;\n        /**\n         * This is a simple enum that is optional with default value\n         */\n        parameterEnum?: 'Success' | 'Warning' | 'Error';\n        /**\n         * This is a simple model that is optional with default value\n         */\n        parameterModel?: ModelWithString;\n    };\n    url: '/api/v{api-version}/defaults';\n};\n\nexport type CallToTestOrderOfParamsData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * This is a optional string with default\n         */\n        parameterOptionalStringWithDefault?: string;\n        /**\n         * This is a optional string with empty default\n         */\n        parameterOptionalStringWithEmptyDefault?: string;\n        /**\n         * This is a optional string with no default\n         */\n        parameterOptionalStringWithNoDefault?: string;\n        /**\n         * This is a string with default\n         */\n        parameterStringWithDefault: string;\n        /**\n         * This is a string with empty default\n         */\n        parameterStringWithEmptyDefault: string;\n        /**\n         * This is a string with no default\n         */\n        parameterStringWithNoDefault: string;\n        /**\n         * This is a string that can be null with no default\n         */\n        parameterStringNullableWithNoDefault?: string | null;\n        /**\n         * This is a string that can be null with default\n         */\n        parameterStringNullableWithDefault?: string | null;\n    };\n    url: '/api/v{api-version}/defaults';\n};\n\nexport type DuplicateNameData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/duplicate';\n};\n\nexport type DuplicateName2Data = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/duplicate';\n};\n\nexport type DuplicateName3Data = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/duplicate';\n};\n\nexport type DuplicateName4Data = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/duplicate';\n};\n\nexport type CallWithNoContentResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no-content';\n};\n\nexport type CallWithNoContentResponseResponses = {\n    /**\n     * Success\n     */\n    204: void;\n};\n\nexport type CallWithNoContentResponseResponse = CallWithNoContentResponseResponses[keyof CallWithNoContentResponseResponses];\n\nexport type CallWithResponseAndNoContentResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multiple-tags/response-and-no-content';\n};\n\nexport type CallWithResponseAndNoContentResponseResponses = {\n    /**\n     * Response is a simple number\n     */\n    200: number;\n    /**\n     * Success\n     */\n    204: void;\n};\n\nexport type CallWithResponseAndNoContentResponseResponse = CallWithResponseAndNoContentResponseResponses[keyof CallWithResponseAndNoContentResponseResponses];\n\nexport type DummyAData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multiple-tags/a';\n};\n\nexport type DummyAResponses = {\n    200: _400;\n};\n\nexport type DummyAResponse = DummyAResponses[keyof DummyAResponses];\n\nexport type DummyBData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multiple-tags/b';\n};\n\nexport type DummyBResponses = {\n    /**\n     * Success\n     */\n    204: void;\n};\n\nexport type DummyBResponse = DummyBResponses[keyof DummyBResponses];\n\nexport type CallWithResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/response';\n};\n\nexport type CallWithResponseResponses = {\n    default: Import;\n};\n\nexport type CallWithResponseResponse = CallWithResponseResponses[keyof CallWithResponseResponses];\n\nexport type CallWithDuplicateResponsesData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/response';\n};\n\nexport type CallWithDuplicateResponsesErrors = {\n    /**\n     * Message for 500 error\n     */\n    500: ModelWithStringError;\n    /**\n     * Message for 501 error\n     */\n    501: ModelWithStringError;\n    /**\n     * Message for 502 error\n     */\n    502: ModelWithStringError;\n    /**\n     * Message for 4XX errors\n     */\n    '4XX': DictionaryWithArray;\n    /**\n     * Default error response\n     */\n    default: ModelWithBoolean;\n};\n\nexport type CallWithDuplicateResponsesError = CallWithDuplicateResponsesErrors[keyof CallWithDuplicateResponsesErrors];\n\nexport type CallWithDuplicateResponsesResponses = {\n    /**\n     * Message for 200 response\n     */\n    200: ModelWithBoolean & ModelWithInteger;\n    /**\n     * Message for 201 response\n     */\n    201: ModelWithString;\n    /**\n     * Message for 202 response\n     */\n    202: ModelWithString;\n};\n\nexport type CallWithDuplicateResponsesResponse = CallWithDuplicateResponsesResponses[keyof CallWithDuplicateResponsesResponses];\n\nexport type CallWithResponsesData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/response';\n};\n\nexport type CallWithResponsesErrors = {\n    /**\n     * Message for 500 error\n     */\n    500: ModelWithStringError;\n    /**\n     * Message for 501 error\n     */\n    501: ModelWithStringError;\n    /**\n     * Message for 502 error\n     */\n    502: ModelWithStringError;\n    /**\n     * Message for default response\n     */\n    default: ModelWithStringError;\n};\n\nexport type CallWithResponsesError = CallWithResponsesErrors[keyof CallWithResponsesErrors];\n\nexport type CallWithResponsesResponses = {\n    /**\n     * Message for 200 response\n     */\n    200: {\n        readonly '@namespace.string'?: string;\n        readonly '@namespace.integer'?: number;\n        readonly value?: Array<ModelWithString>;\n    };\n    /**\n     * Message for 201 response\n     */\n    201: ModelThatExtends;\n    /**\n     * Message for 202 response\n     */\n    202: ModelThatExtendsExtends;\n};\n\nexport type CallWithResponsesResponse = CallWithResponsesResponses[keyof CallWithResponsesResponses];\n\nexport type CollectionFormatData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * This is an array parameter that is sent as csv format (comma-separated values)\n         */\n        parameterArrayCSV: Array<string> | null;\n        /**\n         * This is an array parameter that is sent as ssv format (space-separated values)\n         */\n        parameterArraySSV: Array<string> | null;\n        /**\n         * This is an array parameter that is sent as tsv format (tab-separated values)\n         */\n        parameterArrayTSV: Array<string> | null;\n        /**\n         * This is an array parameter that is sent as pipes format (pipe-separated values)\n         */\n        parameterArrayPipes: Array<string> | null;\n        /**\n         * This is an array parameter that is sent as multi format (multiple parameter instances)\n         */\n        parameterArrayMulti: Array<string> | null;\n    };\n    url: '/api/v{api-version}/collectionFormat';\n};\n\nexport type TypesData = {\n    body?: never;\n    path?: {\n        /**\n         * This is a number parameter\n         */\n        id?: number;\n    };\n    query: {\n        /**\n         * This is a number parameter\n         */\n        parameterNumber: number;\n        /**\n         * This is a string parameter\n         */\n        parameterString: string | null;\n        /**\n         * This is a boolean parameter\n         */\n        parameterBoolean: boolean | null;\n        /**\n         * This is an object parameter\n         */\n        parameterObject: {\n            [key: string]: unknown;\n        } | null;\n        /**\n         * This is an array parameter\n         */\n        parameterArray: Array<string> | null;\n        /**\n         * This is a dictionary parameter\n         */\n        parameterDictionary: {\n            [key: string]: unknown;\n        } | null;\n        /**\n         * This is an enum parameter\n         */\n        parameterEnum: 'Success' | 'Warning' | 'Error' | null;\n    };\n    url: '/api/v{api-version}/types';\n};\n\nexport type TypesResponses = {\n    /**\n     * Response is a simple number\n     */\n    200: number;\n    /**\n     * Response is a simple string\n     */\n    201: string;\n    /**\n     * Response is a simple boolean\n     */\n    202: boolean;\n    /**\n     * Response is a simple object\n     */\n    203: {\n        [key: string]: unknown;\n    };\n};\n\nexport type TypesResponse = TypesResponses[keyof TypesResponses];\n\nexport type UploadFileData = {\n    body: Blob | File;\n    path: {\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string | null;\n    };\n    query?: never;\n    url: '/api/v{api-version}/upload';\n};\n\nexport type UploadFileResponses = {\n    200: boolean;\n};\n\nexport type UploadFileResponse = UploadFileResponses[keyof UploadFileResponses];\n\nexport type FileResponseData = {\n    body?: never;\n    path: {\n        id: string;\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string;\n    };\n    query?: never;\n    url: '/api/v{api-version}/file/{id}';\n};\n\nexport type FileResponseResponses = {\n    /**\n     * Success\n     */\n    200: Blob | File;\n};\n\nexport type FileResponseResponse = FileResponseResponses[keyof FileResponseResponses];\n\nexport type ComplexTypesData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * Parameter containing object\n         */\n        parameterObject: {\n            first?: {\n                second?: {\n                    third?: string;\n                };\n            };\n        };\n        /**\n         * Parameter containing reference\n         */\n        parameterReference: ModelWithString;\n    };\n    url: '/api/v{api-version}/complex';\n};\n\nexport type ComplexTypesErrors = {\n    /**\n     * 400 `server` error\n     */\n    400: unknown;\n    /**\n     * 500 server error\n     */\n    500: unknown;\n};\n\nexport type ComplexTypesResponses = {\n    /**\n     * Successful response\n     */\n    200: Array<ModelWithString>;\n};\n\nexport type ComplexTypesResponse = ComplexTypesResponses[keyof ComplexTypesResponses];\n\nexport type MultipartResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multipart';\n};\n\nexport type MultipartResponseResponses = {\n    /**\n     * OK\n     */\n    200: {\n        file?: Blob | File;\n        metadata?: {\n            foo?: string;\n            bar?: string;\n        };\n    };\n};\n\nexport type MultipartResponseResponse = MultipartResponseResponses[keyof MultipartResponseResponses];\n\nexport type MultipartRequestData = {\n    body?: {\n        content?: Blob | File;\n        data?: ModelWithString | null;\n    };\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multipart';\n};\n\nexport type ComplexParamsData = {\n    body?: {\n        readonly key: string | null;\n        name: string | null;\n        enabled?: boolean;\n        type: 'Monkey' | 'Horse' | 'Bird';\n        listOfModels?: Array<ModelWithString> | null;\n        listOfStrings?: Array<string> | null;\n        parameters: ModelWithString | ModelWithEnum | ModelWithArray | ModelWithDictionary;\n        readonly user?: {\n            readonly id?: number;\n            readonly name?: string | null;\n        };\n    };\n    path: {\n        id: number;\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string;\n    };\n    query?: never;\n    url: '/api/v{api-version}/complex/{id}';\n};\n\nexport type ComplexParamsResponses = {\n    /**\n     * Success\n     */\n    200: ModelWithString;\n};\n\nexport type ComplexParamsResponse = ComplexParamsResponses[keyof ComplexParamsResponses];\n\nexport type CallWithResultFromHeaderData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/header';\n};\n\nexport type CallWithResultFromHeaderErrors = {\n    /**\n     * 400 server error\n     */\n    400: unknown;\n    /**\n     * 500 server error\n     */\n    500: unknown;\n};\n\nexport type CallWithResultFromHeaderResponses = {\n    /**\n     * Successful response\n     */\n    200: unknown;\n};\n\nexport type TestErrorCodeData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * Status code to return\n         */\n        status: number;\n    };\n    url: '/api/v{api-version}/error';\n};\n\nexport type TestErrorCodeErrors = {\n    /**\n     * Custom message: Internal Server Error\n     */\n    500: unknown;\n    /**\n     * Custom message: Not Implemented\n     */\n    501: unknown;\n    /**\n     * Custom message: Bad Gateway\n     */\n    502: unknown;\n    /**\n     * Custom message: Service Unavailable\n     */\n    503: unknown;\n};\n\nexport type TestErrorCodeResponses = {\n    /**\n     * Custom message: Successful response\n     */\n    200: unknown;\n};\n\nexport type NonAsciiæøåÆøÅöôêÊ字符串Data = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * Dummy input param\n         */\n        nonAsciiParamæøåÆØÅöôêÊ: number;\n    };\n    url: '/api/v{api-version}/non-ascii-æøåÆØÅöôêÊ字符串';\n};\n\nexport type NonAsciiæøåÆøÅöôêÊ字符串Responses = {\n    /**\n     * Successful response\n     */\n    200: Array<NonAsciiStringæøåÆøÅöôêÊ字符串>;\n};\n\nexport type NonAsciiæøåÆøÅöôêÊ字符串Response = NonAsciiæøåÆøÅöôêÊ字符串Responses[keyof NonAsciiæøåÆøÅöôêÊ字符串Responses];\n\nexport type PutWithFormUrlEncodedData = {\n    body: ArrayWithStrings;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/non-ascii-æøåÆØÅöôêÊ字符串';\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-ky/base-url-number/client/client.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { HTTPError, Options as KyOptions } from 'ky';\nimport ky from 'ky';\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, RetryOptions } from './types.gen';\nimport type { Middleware } from './utils.gen';\nimport {\n  buildUrl,\n  createConfig,\n  createInterceptors,\n  getParseAs,\n  mergeConfigs,\n  mergeHeaders,\n  setAuthParams,\n} from './utils.gen';\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 (options: RequestOptions) => {\n    const opts = {\n      ..._config,\n      ...options,\n      headers: mergeHeaders(_config.headers, options.headers),\n      ky: options.ky ?? _config.ky ?? ky,\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    if (opts.body === undefined || opts.serializedBody === '') {\n      opts.headers.delete('Content-Type');\n    }\n\n    const url = buildUrl(opts);\n\n    return { opts, url };\n  };\n\n  const parseErrorResponse = async (\n    response: Response,\n    request: Request,\n    opts: ResolvedRequestOptions,\n    interceptorsMiddleware: Middleware<Request, Response, unknown, ResolvedRequestOptions>,\n  ) => {\n    const result = {\n      request,\n      response,\n    };\n\n    const textError = await response.text();\n    let jsonError: unknown;\n\n    try {\n      jsonError = JSON.parse(textError);\n    } catch {\n      jsonError = undefined;\n    }\n\n    const error = jsonError ?? textError;\n    let finalError = error;\n\n    for (const fn of interceptorsMiddleware.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    return opts.responseStyle === 'data'\n      ? undefined\n      : {\n          error: finalError,\n          ...result,\n        };\n  };\n\n  const request: Client['request'] = async (options) => {\n    // @ts-expect-error\n    const { opts, url } = await beforeRequest(options);\n\n    const kyInstance = opts.ky!;\n\n    const validBody = getValidRequestBody(opts);\n\n    const kyOptions: KyOptions = {\n      body: validBody as BodyInit,\n      cache: opts.cache,\n      credentials: opts.credentials,\n      headers: opts.headers,\n      integrity: opts.integrity,\n      keepalive: opts.keepalive,\n      method: opts.method as KyOptions['method'],\n      mode: opts.mode,\n      redirect: 'follow',\n      referrer: opts.referrer,\n      referrerPolicy: opts.referrerPolicy,\n      signal: opts.signal,\n      throwHttpErrors: opts.throwOnError ?? false,\n      timeout: opts.timeout,\n      ...opts.kyOptions,\n    };\n\n    if (opts.retry && typeof opts.retry === 'object') {\n      const retryOpts = opts.retry as RetryOptions;\n      kyOptions.retry = {\n        limit: retryOpts.limit ?? 2,\n        methods: retryOpts.methods as Array<\n          'get' | 'post' | 'put' | 'patch' | 'head' | 'delete' | 'options' | 'trace'\n        >,\n        statusCodes: retryOpts.statusCodes,\n      };\n    }\n\n    let request = new Request(url, {\n      body: kyOptions.body as BodyInit,\n      headers: kyOptions.headers as HeadersInit,\n      method: kyOptions.method,\n    });\n\n    for (const fn of interceptors.request.fns) {\n      if (fn) {\n        request = await fn(request, opts);\n      }\n    }\n\n    let response: Response;\n\n    try {\n      response = await kyInstance(request, kyOptions);\n    } catch (error) {\n      if (error && typeof error === 'object' && 'response' in error) {\n        const httpError = error as HTTPError;\n        response = httpError.response;\n\n        for (const fn of interceptors.response.fns) {\n          if (fn) {\n            response = await fn(response, request, opts);\n          }\n        }\n\n        return parseErrorResponse(response, request, opts, interceptors);\n      }\n\n      throw error;\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    return parseErrorResponse(response, request, opts, interceptors);\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      fetch: globalThis.fetch,\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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-ky/base-url-number/client/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type { Auth } from '../core/auth.gen';\nexport type { QuerySerializerOptions } from '../core/bodySerializer.gen';\nexport {\n  formDataBodySerializer,\n  jsonBodySerializer,\n  urlSearchParamsBodySerializer,\n} from '../core/bodySerializer.gen';\nexport { buildClientParams } from '../core/params.gen';\nexport { serializeQueryKeyValue } from '../core/queryKeySerializer.gen';\nexport { createClient } from './client.gen';\nexport type {\n  Client,\n  ClientOptions,\n  Config,\n  CreateClientConfig,\n  Options,\n  RequestOptions,\n  RequestResult,\n  ResolvedRequestOptions,\n  ResponseStyle,\n  RetryOptions,\n  TDataShape,\n} from './types.gen';\nexport { createConfig, mergeHeaders } from './utils.gen';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-ky/base-url-number/client/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { Options as KyOptions } from 'ky';\nimport type ky from 'ky';\n\nimport type { Auth } from '../core/auth.gen';\nimport type {\n  ServerSentEventsOptions,\n  ServerSentEventsResult,\n} from '../core/serverSentEvents.gen';\nimport type { Client as CoreClient, Config as CoreConfig } from '../core/types.gen';\nimport type { Middleware } from './utils.gen';\n\nexport type ResponseStyle = 'data' | 'fields';\n\nexport interface RetryOptions {\n  /**\n   * Maximum number of retry attempts\n   *\n   * @default 2\n   */\n  limit?: number;\n  /**\n   * HTTP methods to retry\n   *\n   * @default ['get', 'put', 'head', 'delete', 'options', 'trace']\n   */\n  methods?: Array<'get' | 'post' | 'put' | 'delete' | 'patch' | 'head' | 'options' | 'trace'>;\n  /**\n   * HTTP status codes to retry\n   *\n   * @default [408, 413, 429, 500, 502, 503, 504]\n   */\n  statusCodes?: number[];\n}\n\nexport interface Config<T extends ClientOptions = ClientOptions>\n  extends\n    Omit<KyOptions, 'body' | 'headers' | 'method' | 'prefixUrl' | 'retry' | 'throwHttpErrors'>,\n    CoreConfig {\n  /**\n   * Base URL for all requests made by this client.\n   */\n  baseUrl?: T['baseUrl'];\n  /**\n   * Ky instance to use. You can use this option to provide a custom\n   * ky instance.\n   */\n  ky?: typeof ky;\n  /**\n   * Additional ky-specific options that will be passed directly to ky.\n   * This allows you to use any ky option not explicitly exposed in the config.\n   */\n  kyOptions?: Omit<KyOptions, 'method' | 'prefixUrl'>;\n  /**\n   * Return the response data parsed in a specified format. By default, `auto`\n   * will infer the appropriate method from the `Content-Type` response header.\n   * You can override this behavior with any of the {@link Body} methods.\n   * Select `stream` if you don't want to parse response data at all.\n   *\n   * @default 'auto'\n   */\n  parseAs?: 'arrayBuffer' | 'auto' | 'blob' | 'formData' | 'json' | 'stream' | 'text';\n  /**\n   * Should we return only data or multiple fields (data, error, response, etc.)?\n   *\n   * @default 'fields'\n   */\n  responseStyle?: ResponseStyle;\n  /**\n   * Retry configuration\n   */\n  retry?: RetryOptions;\n  /**\n   * Throw an error instead of returning it in the response?\n   *\n   * @default false\n   */\n  throwOnError?: T['throwOnError'];\n  /**\n   * Request timeout in milliseconds\n   *\n   * @default 10000\n   */\n  timeout?: number;\n}\n\nexport interface RequestOptions<\n  TData = unknown,\n  TResponseStyle extends ResponseStyle = 'fields',\n  ThrowOnError extends boolean = boolean,\n  Url extends string = string,\n>\n  extends\n    Config<{\n      responseStyle: TResponseStyle;\n      throwOnError: ThrowOnError;\n    }>,\n    Pick<\n      ServerSentEventsOptions<TData>,\n      | 'onRequest'\n      | 'onSseError'\n      | 'onSseEvent'\n      | 'sseDefaultRetryDelay'\n      | 'sseMaxRetryAttempts'\n      | 'sseMaxRetryDelay'\n    > {\n  /**\n   * Any body that you want to add to your request.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/fetch#body}\n   */\n  body?: unknown;\n  path?: Record<string, unknown>;\n  query?: Record<string, unknown>;\n  /**\n   * Security mechanism(s) to use for the request.\n   */\n  security?: ReadonlyArray<Auth>;\n  url: Url;\n}\n\nexport interface ResolvedRequestOptions<\n  TResponseStyle extends ResponseStyle = 'fields',\n  ThrowOnError extends boolean = boolean,\n  Url extends string = string,\n> extends RequestOptions<unknown, TResponseStyle, ThrowOnError, Url> {\n  serializedBody?: string;\n}\n\nexport type RequestResult<\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = boolean,\n  TResponseStyle extends ResponseStyle = 'fields',\n> = ThrowOnError extends true\n  ? Promise<\n      TResponseStyle extends 'data'\n        ? TData extends Record<string, unknown>\n          ? TData[keyof TData]\n          : TData\n        : {\n            data: TData extends Record<string, unknown> ? TData[keyof TData] : TData;\n            request: Request;\n            response: Response;\n          }\n    >\n  : Promise<\n      TResponseStyle extends 'data'\n        ? (TData extends Record<string, unknown> ? TData[keyof TData] : TData) | undefined\n        : (\n            | {\n                data: TData extends Record<string, unknown> ? TData[keyof TData] : TData;\n                error: undefined;\n              }\n            | {\n                data: undefined;\n                error: TError extends Record<string, unknown> ? TError[keyof TError] : TError;\n              }\n          ) & {\n            request: Request;\n            response: Response;\n          }\n    >;\n\nexport interface ClientOptions {\n  baseUrl?: string;\n  responseStyle?: ResponseStyle;\n  throwOnError?: boolean;\n}\n\ntype MethodFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'>,\n) => RequestResult<TData, TError, ThrowOnError, TResponseStyle>;\n\ntype SseFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'>,\n) => Promise<ServerSentEventsResult<TData, TError>>;\n\ntype RequestFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'> &\n    Pick<Required<RequestOptions<TData, TResponseStyle, ThrowOnError>>, 'method'>,\n) => RequestResult<TData, TError, ThrowOnError, TResponseStyle>;\n\ntype BuildUrlFn = <\n  TData extends {\n    body?: unknown;\n    path?: Record<string, unknown>;\n    query?: Record<string, unknown>;\n    url: string;\n  },\n>(\n  options: TData & Options<TData>,\n) => string;\n\nexport type Client = CoreClient<RequestFn, Config, MethodFn, BuildUrlFn, SseFn> & {\n  interceptors: Middleware<Request, Response, unknown, ResolvedRequestOptions>;\n};\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 = ClientOptions> = (\n  override?: Config<ClientOptions & T>,\n) => Config<Required<ClientOptions> & T>;\n\nexport interface TDataShape {\n  body?: unknown;\n  headers?: unknown;\n  path?: unknown;\n  query?: unknown;\n  url: string;\n}\n\ntype OmitKeys<T, K> = Pick<T, Exclude<keyof T, K>>;\n\nexport type Options<\n  TData extends TDataShape = TDataShape,\n  ThrowOnError extends boolean = boolean,\n  TResponse = unknown,\n  TResponseStyle extends ResponseStyle = 'fields',\n> = OmitKeys<\n  RequestOptions<TResponse, TResponseStyle, ThrowOnError>,\n  'body' | 'path' | 'query' | 'url'\n> &\n  ([TData] extends [never] ? unknown : Omit<TData, 'url'>);\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-ky/base-url-number/client/utils.gen.ts",
    "content": "// 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    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        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  throwOnError: false,\n  timeout: 10000,\n  ...override,\n});\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-ky/base-url-number/client.gen.ts",
    "content": "// 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: 'http://localhost:3000/base' }));\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-ky/base-url-number/core/auth.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-ky/base-url-number/core/bodySerializer.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-ky/base-url-number/core/params.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-ky/base-url-number/core/pathSerializer.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-ky/base-url-number/core/queryKeySerializer.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\n/**\n * JSON-friendly union that mirrors what Pinia Colada can hash.\n */\nexport type JsonValue =\n  | null\n  | string\n  | number\n  | boolean\n  | JsonValue[]\n  | { [key: string]: JsonValue };\n\n/**\n * Replacer that converts non-JSON values (bigint, Date, etc.) to safe substitutes.\n */\nexport const queryKeyJsonReplacer = (_key: string, value: unknown) => {\n  if (value === undefined || typeof value === 'function' || typeof value === 'symbol') {\n    return undefined;\n  }\n  if (typeof value === 'bigint') {\n    return value.toString();\n  }\n  if (value instanceof Date) {\n    return value.toISOString();\n  }\n  return value;\n};\n\n/**\n * Safely stringifies a value and parses it back into a JsonValue.\n */\nexport const stringifyToJsonValue = (input: unknown): JsonValue | undefined => {\n  try {\n    const json = JSON.stringify(input, queryKeyJsonReplacer);\n    if (json === undefined) {\n      return undefined;\n    }\n    return JSON.parse(json) as JsonValue;\n  } catch {\n    return undefined;\n  }\n};\n\n/**\n * Detects plain objects (including objects with a null prototype).\n */\nconst isPlainObject = (value: unknown): value is Record<string, unknown> => {\n  if (value === null || typeof value !== 'object') {\n    return false;\n  }\n  const prototype = Object.getPrototypeOf(value as object);\n  return prototype === Object.prototype || prototype === null;\n};\n\n/**\n * Turns URLSearchParams into a sorted JSON object for deterministic keys.\n */\nconst serializeSearchParams = (params: URLSearchParams): JsonValue => {\n  const entries = Array.from(params.entries()).sort(([a], [b]) => a.localeCompare(b));\n  const result: Record<string, JsonValue> = {};\n\n  for (const [key, value] of entries) {\n    const existing = result[key];\n    if (existing === undefined) {\n      result[key] = value;\n      continue;\n    }\n\n    if (Array.isArray(existing)) {\n      (existing as string[]).push(value);\n    } else {\n      result[key] = [existing, value];\n    }\n  }\n\n  return result;\n};\n\n/**\n * Normalizes any accepted value into a JSON-friendly shape for query keys.\n */\nexport const serializeQueryKeyValue = (value: unknown): JsonValue | undefined => {\n  if (value === null) {\n    return null;\n  }\n\n  if (typeof value === 'string' || typeof value === 'number' || typeof value === 'boolean') {\n    return value;\n  }\n\n  if (value === undefined || typeof value === 'function' || typeof value === 'symbol') {\n    return undefined;\n  }\n\n  if (typeof value === 'bigint') {\n    return value.toString();\n  }\n\n  if (value instanceof Date) {\n    return value.toISOString();\n  }\n\n  if (Array.isArray(value)) {\n    return stringifyToJsonValue(value);\n  }\n\n  if (typeof URLSearchParams !== 'undefined' && value instanceof URLSearchParams) {\n    return serializeSearchParams(value);\n  }\n\n  if (isPlainObject(value)) {\n    return stringifyToJsonValue(value);\n  }\n\n  return undefined;\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-ky/base-url-number/core/serverSentEvents.gen.ts",
    "content": "// 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 const 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            // Normalize line endings: CRLF -> LF, then CR -> LF\n            buffer = buffer.replace(/\\r\\n/g, '\\n').replace(/\\r/g, '\\n');\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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-ky/base-url-number/core/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { Auth, AuthToken } from './auth.gen';\nimport type { BodySerializer, QuerySerializer, QuerySerializerOptions } from './bodySerializer.gen';\n\nexport type HttpMethod =\n  | 'connect'\n  | 'delete'\n  | 'get'\n  | 'head'\n  | 'options'\n  | 'patch'\n  | 'post'\n  | 'put'\n  | 'trace';\n\nexport type Client<\n  RequestFn = never,\n  Config = unknown,\n  MethodFn = never,\n  BuildUrlFn = never,\n  SseFn = never,\n> = {\n  /**\n   * Returns the final request URL.\n   */\n  buildUrl: BuildUrlFn;\n  getConfig: () => Config;\n  request: RequestFn;\n  setConfig: (config: Config) => Config;\n} & {\n  [K in HttpMethod]: MethodFn;\n} & ([SseFn] extends [never] ? { sse?: never } : { sse: { [K in HttpMethod]: SseFn } });\n\nexport interface Config {\n  /**\n   * Auth token or a function returning auth token. The resolved value will be\n   * added to the request payload as defined by its `security` array.\n   */\n  auth?: ((auth: Auth) => Promise<AuthToken> | AuthToken) | AuthToken;\n  /**\n   * A function for serializing request body parameter. By default,\n   * {@link JSON.stringify()} will be used.\n   */\n  bodySerializer?: BodySerializer | null;\n  /**\n   * An object containing any HTTP headers that you want to pre-populate your\n   * `Headers` object with.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/Headers/Headers#init See more}\n   */\n  headers?:\n    | RequestInit['headers']\n    | Record<\n        string,\n        string | number | boolean | (string | number | boolean)[] | null | undefined | unknown\n      >;\n  /**\n   * The request method.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/fetch#method See more}\n   */\n  method?: Uppercase<HttpMethod>;\n  /**\n   * A function for serializing request query parameters. By default, arrays\n   * will be exploded in form style, objects will be exploded in deepObject\n   * style, and reserved characters are percent-encoded.\n   *\n   * This method will have no effect if the native `paramsSerializer()` Axios\n   * API function is used.\n   *\n   * {@link https://swagger.io/docs/specification/serialization/#query View examples}\n   */\n  querySerializer?: QuerySerializer | QuerySerializerOptions;\n  /**\n   * A function validating request data. This is useful if you want to ensure\n   * the request conforms to the desired shape, so it can be safely sent to\n   * the server.\n   */\n  requestValidator?: (data: unknown) => Promise<unknown>;\n  /**\n   * A function transforming response data before it's returned. This is useful\n   * for post-processing data, e.g. converting ISO strings into Date objects.\n   */\n  responseTransformer?: (data: unknown) => Promise<unknown>;\n  /**\n   * A function validating response data. This is useful if you want to ensure\n   * the response conforms to the desired shape, so it can be safely passed to\n   * the transformers and returned to the user.\n   */\n  responseValidator?: (data: unknown) => Promise<unknown>;\n}\n\ntype IsExactlyNeverOrNeverUndefined<T> = [T] extends [never]\n  ? true\n  : [T] extends [never | undefined]\n    ? [undefined] extends [T]\n      ? false\n      : true\n    : false;\n\nexport type OmitNever<T extends Record<string, unknown>> = {\n  [K in keyof T as IsExactlyNeverOrNeverUndefined<T[K]> extends true ? never : K]: T[K];\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-ky/base-url-number/core/utils.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-ky/base-url-number/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type { _3eNum1Период, _400, AdditionalPropertiesIntegerIssue, AdditionalPropertiesUnknownIssue, AdditionalPropertiesUnknownIssue2, AdditionalPropertiesUnknownIssue3, AdditionalPropertiesUnknownIssueWritable, AnyOfAnyAndNull, AnyOfArrays, ApiVVersionODataControllerCountData, ApiVVersionODataControllerCountResponse, ApiVVersionODataControllerCountResponses, ArrayWithAnyOfProperties, ArrayWithArray, ArrayWithBooleans, ArrayWithNumbers, ArrayWithProperties, ArrayWithReferences, ArrayWithStrings, CallToTestOrderOfParamsData, CallWithDefaultOptionalParametersData, CallWithDefaultParametersData, CallWithDescriptionsData, CallWithDuplicateResponsesData, CallWithDuplicateResponsesError, CallWithDuplicateResponsesErrors, CallWithDuplicateResponsesResponse, CallWithDuplicateResponsesResponses, CallWithNoContentResponseData, CallWithNoContentResponseResponse, CallWithNoContentResponseResponses, CallWithParametersData, CallWithResponseAndNoContentResponseData, CallWithResponseAndNoContentResponseResponse, CallWithResponseAndNoContentResponseResponses, CallWithResponseData, CallWithResponseResponse, CallWithResponseResponses, CallWithResponsesData, CallWithResponsesError, CallWithResponsesErrors, CallWithResponsesResponse, CallWithResponsesResponses, CallWithResultFromHeaderData, CallWithResultFromHeaderErrors, CallWithResultFromHeaderResponses, CallWithWeirdParameterNamesData, CamelCaseCommentWithBreaks, CharactersInDescription, ClientOptions, CollectionFormatData, CommentWithBackticks, CommentWithBackticksAndQuotes, CommentWithBreaks, CommentWithExpressionPlaceholders, CommentWithQuotes, CommentWithReservedCharacters, CommentWithSlashes, ComplexParamsData, ComplexParamsResponse, ComplexParamsResponses, ComplexTypesData, ComplexTypesErrors, ComplexTypesResponse, ComplexTypesResponses, CompositionBaseModel, CompositionExtendedModel, CompositionWithAllOfAndNullable, CompositionWithAnyOf, CompositionWithAnyOfAndNullable, CompositionWithAnyOfAnonymous, CompositionWithNestedAnyAndTypeNull, CompositionWithNestedAnyOfAndNull, CompositionWithOneOf, CompositionWithOneOfAndComplexArrayDictionary, CompositionWithOneOfAndNullable, CompositionWithOneOfAndProperties, CompositionWithOneOfAndSimpleArrayDictionary, CompositionWithOneOfAndSimpleDictionary, CompositionWithOneOfAnonymous, CompositionWithOneOfDiscriminator, ConstValue, Default, DeleteCallWithoutParametersAndResponseData, DeleteFooData, DeleteFooData2, DeleteFooData3, DeprecatedCallData, DeprecatedModel, DictionaryWithArray, DictionaryWithDictionary, DictionaryWithProperties, DictionaryWithPropertiesAndAdditionalProperties, DictionaryWithReference, DictionaryWithString, DummyAData, DummyAResponse, DummyAResponses, DummyBData, DummyBResponse, DummyBResponses, DuplicateName2Data, DuplicateName3Data, DuplicateName4Data, DuplicateNameData, EnumFromDescription, EnumWithExtensions, EnumWithNumbers, EnumWithReplacedCharacters, EnumWithStrings, EnumWithXEnumNames, ExportData, ExternalRefA, ExternalRefB, ExternalSharedModel, File, FileResponseData, FileResponseResponse, FileResponseResponses, FileWritable, FooWowData, FooWowResponses, FreeFormObjectWithAdditionalPropertiesEqEmptyObject, FreeFormObjectWithAdditionalPropertiesEqTrue, FreeFormObjectWithoutAdditionalProperties, GenericSchemaDuplicateIssue1SystemBoolean, GenericSchemaDuplicateIssue1SystemBooleanWritable, GenericSchemaDuplicateIssue1SystemString, GenericSchemaDuplicateIssue1SystemStringWritable, GetApiVbyApiVersionSimpleOperationData, GetApiVbyApiVersionSimpleOperationError, GetApiVbyApiVersionSimpleOperationErrors, GetApiVbyApiVersionSimpleOperationResponse, GetApiVbyApiVersionSimpleOperationResponses, GetCallWithOptionalParamData, GetCallWithoutParametersAndResponseData, HeadCallWithoutParametersAndResponseData, Import, ImportData, ImportResponse, ImportResponses, IoK8sApimachineryPkgApisMetaV1DeleteOptions, IoK8sApimachineryPkgApisMetaV1Preconditions, ModelCircle, ModelFromZendesk, ModelSquare, ModelThatExtends, ModelThatExtendsExtends, ModelWithAdditionalPropertiesEqTrue, ModelWithAdditionalPropertiesRef, ModelWithAnyOfConstantSizeArray, ModelWithAnyOfConstantSizeArrayAndIntersect, ModelWithAnyOfConstantSizeArrayNullable, ModelWithAnyOfConstantSizeArrayWithNSizeAndOptions, ModelWithAnyOfConstantSizeArrayWithNSizeAndOptionsWritable, ModelWithArray, ModelWithArrayReadOnlyAndWriteOnly, ModelWithArrayReadOnlyAndWriteOnlyWritable, ModelWithBackticksInDescription, ModelWithBoolean, ModelWithCircularReference, ModelWithConst, ModelWithConstantSizeArray, ModelWithDictionary, ModelWithDuplicateImports, ModelWithDuplicateProperties, ModelWithEnum, ModelWithEnumFromDescription, ModelWithEnumWithHyphen, ModelWithInteger, ModelWithNestedArrayEnums, ModelWithNestedArrayEnumsData, ModelWithNestedArrayEnumsDataBar, ModelWithNestedArrayEnumsDataFoo, ModelWithNestedCompositionEnums, ModelWithNestedEnums, ModelWithNestedProperties, ModelWithNullableObject, ModelWithNullableString, ModelWithNumericEnumUnion, ModelWithOneOfAndProperties, ModelWithOneOfEnum, ModelWithOrderedProperties, ModelWithPattern, ModelWithPatternWritable, ModelWithPrefixItemsConstantSizeArray, ModelWithProperties, ModelWithPropertiesWritable, ModelWithReadOnlyAndWriteOnly, ModelWithReadOnlyAndWriteOnlyWritable, ModelWithReference, ModelWithReferenceWritable, ModelWithString, ModelWithStringError, MultipartRequestData, MultipartResponseData, MultipartResponseResponse, MultipartResponseResponses, NestedAnyOfArraysNullable, NonAsciiæøåÆøÅöôêÊ字符串Data, NonAsciiæøåÆøÅöôêÊ字符串Response, NonAsciiæøåÆøÅöôêÊ字符串Responses, NonAsciiStringæøåÆøÅöôêÊ字符串, NullableObject, OneOfAllOfIssue, OneOfAllOfIssueWritable, OptionsCallWithoutParametersAndResponseData, Pageable, ParameterSimpleParameterUnused, PatchApiVbyApiVersionNoTagData, PatchApiVbyApiVersionNoTagResponses, PatchCallWithoutParametersAndResponseData, PostApiVbyApiVersionFormDataData, PostApiVbyApiVersionRequestBodyData, PostCallWithOptionalParamData, PostCallWithOptionalParamResponse, PostCallWithOptionalParamResponses, PostCallWithoutParametersAndResponseData, PostServiceWithEmptyTagResponse, PostServiceWithEmptyTagResponse2, PutCallWithoutParametersAndResponseData, PutWithFormUrlEncodedData, SchemaWithFormRestrictedKeys, SimpleBoolean, SimpleFile, SimpleFormData, SimpleInteger, SimpleParameter, SimpleReference, SimpleRequestBody, SimpleString, SimpleStringWithPattern, TestErrorCodeData, TestErrorCodeErrors, TestErrorCodeResponses, TypesData, TypesResponse, TypesResponses, UploadFileData, UploadFileResponse, UploadFileResponses, XFooBar } from './types.gen';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-ky/base-url-number/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type ClientOptions = {\n    baseUrl: 'http://localhost:3000/base' | (string & {});\n};\n\n/**\n * Model with number-only name\n */\nexport type _400 = string;\n\n/**\n * External ref to shared model (A)\n */\nexport type ExternalRefA = ExternalSharedModel;\n\n/**\n * External ref to shared model (B)\n */\nexport type ExternalRefB = ExternalSharedModel;\n\n/**\n * Testing multiline comments in string: First line\n * Second line\n *\n * Fourth line\n */\nexport type CamelCaseCommentWithBreaks = number;\n\n/**\n * Testing multiline comments in string: First line\n * Second line\n *\n * Fourth line\n */\nexport type CommentWithBreaks = number;\n\n/**\n * Testing backticks in string: `backticks` and ```multiple backticks``` should work\n */\nexport type CommentWithBackticks = number;\n\n/**\n * Testing backticks and quotes in string: `backticks`, 'quotes', \"double quotes\" and ```multiple backticks``` should work\n */\nexport type CommentWithBackticksAndQuotes = number;\n\n/**\n * Testing slashes in string: \\backwards\\\\\\ and /forwards/// should work\n */\nexport type CommentWithSlashes = number;\n\n/**\n * Testing expression placeholders in string: ${expression} should work\n */\nexport type CommentWithExpressionPlaceholders = number;\n\n/**\n * Testing quotes in string: 'single quote''' and \"double quotes\"\"\" should work\n */\nexport type CommentWithQuotes = number;\n\n/**\n * Testing reserved characters in string: * inline * and ** inline ** should work\n */\nexport type CommentWithReservedCharacters = number;\n\n/**\n * This is a simple number\n */\nexport type SimpleInteger = number;\n\n/**\n * This is a simple boolean\n */\nexport type SimpleBoolean = boolean;\n\n/**\n * This is a simple string\n */\nexport type SimpleString = string;\n\n/**\n * A string with non-ascii (unicode) characters valid in typescript identifiers (æøåÆØÅöÔèÈ字符串)\n */\nexport type NonAsciiStringæøåÆøÅöôêÊ字符串 = string;\n\n/**\n * This is a simple file\n */\nexport type SimpleFile = Blob | File;\n\n/**\n * This is a simple reference\n */\nexport type SimpleReference = ModelWithString;\n\n/**\n * This is a simple string\n */\nexport type SimpleStringWithPattern = string | null;\n\n/**\n * This is a simple enum with strings\n */\nexport type EnumWithStrings = 'Success' | 'Warning' | 'Error' | '\\'Single Quote\\'' | '\"Double Quotes\"' | 'Non-ascii: øæåôöØÆÅÔÖ字符串';\n\nexport type EnumWithReplacedCharacters = '\\'Single Quote\\'' | '\"Double Quotes\"' | 'øæåôöØÆÅÔÖ字符串' | 3.1 | '';\n\n/**\n * This is a simple enum with numbers\n */\nexport type EnumWithNumbers = 1 | 2 | 3 | 1.1 | 1.2 | 1.3 | 100 | 200 | 300 | -100 | -200 | -300 | -1.1 | -1.2 | -1.3;\n\n/**\n * Success=1,Warning=2,Error=3\n */\nexport type EnumFromDescription = number;\n\n/**\n * This is a simple enum with numbers\n */\nexport type EnumWithExtensions = 200 | 400 | 500;\n\nexport type EnumWithXEnumNames = 0 | 1 | 2;\n\n/**\n * This is a simple array with numbers\n */\nexport type ArrayWithNumbers = Array<number>;\n\n/**\n * This is a simple array with booleans\n */\nexport type ArrayWithBooleans = Array<boolean>;\n\n/**\n * This is a simple array with strings\n */\nexport type ArrayWithStrings = Array<string>;\n\n/**\n * This is a simple array with references\n */\nexport type ArrayWithReferences = Array<ModelWithString>;\n\n/**\n * This is a simple array containing an array\n */\nexport type ArrayWithArray = Array<Array<ModelWithString>>;\n\n/**\n * This is a simple array with properties\n */\nexport type ArrayWithProperties = Array<{\n    '16x16'?: CamelCaseCommentWithBreaks;\n    bar?: string;\n}>;\n\n/**\n * This is a simple array with any of properties\n */\nexport type ArrayWithAnyOfProperties = Array<{\n    foo?: string;\n} | {\n    bar?: string;\n}>;\n\nexport type AnyOfAnyAndNull = {\n    data?: unknown | null;\n};\n\n/**\n * This is a simple array with any of properties\n */\nexport type AnyOfArrays = {\n    results?: Array<{\n        foo?: string;\n    } | {\n        bar?: string;\n    }>;\n};\n\n/**\n * This is a string dictionary\n */\nexport type DictionaryWithString = {\n    [key: string]: string;\n};\n\nexport type DictionaryWithPropertiesAndAdditionalProperties = {\n    foo?: number;\n    bar?: boolean;\n    [key: string]: string | number | boolean | undefined;\n};\n\n/**\n * This is a string reference\n */\nexport type DictionaryWithReference = {\n    [key: string]: ModelWithString;\n};\n\n/**\n * This is a complex dictionary\n */\nexport type DictionaryWithArray = {\n    [key: string]: Array<ModelWithString>;\n};\n\n/**\n * This is a string dictionary\n */\nexport type DictionaryWithDictionary = {\n    [key: string]: {\n        [key: string]: string;\n    };\n};\n\n/**\n * This is a complex dictionary\n */\nexport type DictionaryWithProperties = {\n    [key: string]: {\n        foo?: string;\n        bar?: string;\n    };\n};\n\n/**\n * This is a model with one number property\n */\nexport type ModelWithInteger = {\n    /**\n     * This is a simple number property\n     */\n    prop?: number;\n};\n\n/**\n * This is a model with one boolean property\n */\nexport type ModelWithBoolean = {\n    /**\n     * This is a simple boolean property\n     */\n    prop?: boolean;\n};\n\n/**\n * This is a model with one string property\n */\nexport type ModelWithString = {\n    /**\n     * This is a simple string property\n     */\n    prop?: string;\n};\n\n/**\n * This is a model with one string property\n */\nexport type ModelWithStringError = {\n    /**\n     * This is a simple string property\n     */\n    prop?: string;\n};\n\n/**\n * `Comment` or `VoiceComment`. The JSON object for adding voice comments to tickets is different. See [Adding voice comments to tickets](/documentation/ticketing/managing-tickets/adding-voice-comments-to-tickets)\n */\nexport type ModelFromZendesk = string;\n\n/**\n * This is a model with one string property\n */\nexport type ModelWithNullableString = {\n    /**\n     * This is a simple string property\n     */\n    nullableProp1?: string | null;\n    /**\n     * This is a simple string property\n     */\n    nullableRequiredProp1: string | null;\n    /**\n     * This is a simple string property\n     */\n    nullableProp2?: string | null;\n    /**\n     * This is a simple string property\n     */\n    nullableRequiredProp2: string | null;\n    /**\n     * This is a simple enum with strings\n     */\n    'foo_bar-enum'?: 'Success' | 'Warning' | 'Error' | 'ØÆÅ字符串';\n};\n\n/**\n * This is a model with one enum\n */\nexport type ModelWithEnum = {\n    /**\n     * This is a simple enum with strings\n     */\n    'foo_bar-enum'?: 'Success' | 'Warning' | 'Error' | 'ØÆÅ字符串';\n    /**\n     * These are the HTTP error code enums\n     */\n    statusCode?: '100' | '200 FOO' | '300 FOO_BAR' | '400 foo-bar' | '500 foo.bar' | '600 foo&bar';\n    /**\n     * Simple boolean enum\n     */\n    bool?: true;\n};\n\n/**\n * This is a model with one enum with escaped name\n */\nexport type ModelWithEnumWithHyphen = {\n    /**\n     * Foo-Bar-Baz-Qux\n     */\n    'foo-bar-baz-qux'?: '3.0';\n};\n\n/**\n * This is a model with one enum\n */\nexport type ModelWithEnumFromDescription = {\n    /**\n     * Success=1,Warning=2,Error=3\n     */\n    test?: number;\n};\n\n/**\n * This is a model with nested enums\n */\nexport type ModelWithNestedEnums = {\n    dictionaryWithEnum?: {\n        [key: string]: 'Success' | 'Warning' | 'Error';\n    };\n    dictionaryWithEnumFromDescription?: {\n        [key: string]: number;\n    };\n    arrayWithEnum?: Array<'Success' | 'Warning' | 'Error'>;\n    arrayWithDescription?: Array<number>;\n    /**\n     * This is a simple enum with strings\n     */\n    'foo_bar-enum'?: 'Success' | 'Warning' | 'Error' | 'ØÆÅ字符串';\n};\n\n/**\n * This is a model with one property containing a reference\n */\nexport type ModelWithReference = {\n    prop?: ModelWithProperties;\n};\n\n/**\n * This is a model with one property containing an array\n */\nexport type ModelWithArrayReadOnlyAndWriteOnly = {\n    prop?: Array<ModelWithReadOnlyAndWriteOnly>;\n    propWithFile?: Array<Blob | File>;\n    propWithNumber?: Array<number>;\n};\n\n/**\n * This is a model with one property containing an array\n */\nexport type ModelWithArray = {\n    prop?: Array<ModelWithString>;\n    propWithFile?: Array<Blob | File>;\n    propWithNumber?: Array<number>;\n};\n\n/**\n * This is a model with one property containing a dictionary\n */\nexport type ModelWithDictionary = {\n    prop?: {\n        [key: string]: string;\n    };\n};\n\n/**\n * This is a deprecated model with a deprecated property\n *\n * @deprecated\n */\nexport type DeprecatedModel = {\n    /**\n     * This is a deprecated property\n     *\n     * @deprecated\n     */\n    prop?: string;\n};\n\n/**\n * This is a model with one property containing a circular reference\n */\nexport type ModelWithCircularReference = {\n    prop?: ModelWithCircularReference;\n};\n\n/**\n * This is a model with one property with a 'one of' relationship\n */\nexport type CompositionWithOneOf = {\n    propA?: ModelWithString | ModelWithEnum | ModelWithArray | ModelWithDictionary;\n};\n\n/**\n * This is a model with one property with a 'one of' relationship where the options are not $ref\n */\nexport type CompositionWithOneOfAnonymous = {\n    propA?: {\n        propA?: string;\n    } | string | number;\n};\n\n/**\n * Circle\n */\nexport type ModelCircle = {\n    kind: string;\n    radius?: number;\n};\n\n/**\n * Square\n */\nexport type ModelSquare = {\n    kind: string;\n    sideLength?: number;\n};\n\n/**\n * This is a model with one property with a 'one of' relationship where the options are not $ref\n */\nexport type CompositionWithOneOfDiscriminator = ({\n    kind: 'circle';\n} & ModelCircle) | ({\n    kind: 'square';\n} & ModelSquare);\n\n/**\n * This is a model with one property with a 'any of' relationship\n */\nexport type CompositionWithAnyOf = {\n    propA?: ModelWithString | ModelWithEnum | ModelWithArray | ModelWithDictionary;\n};\n\n/**\n * This is a model with one property with a 'any of' relationship where the options are not $ref\n */\nexport type CompositionWithAnyOfAnonymous = {\n    propA?: {\n        propA?: string;\n    } | string | number;\n};\n\n/**\n * This is a model with nested 'any of' property with a type null\n */\nexport type CompositionWithNestedAnyAndTypeNull = {\n    propA?: Array<ModelWithDictionary | null> | Array<ModelWithArray | null>;\n};\n\nexport type _3eNum1Период = 'Bird' | 'Dog';\n\nexport type ConstValue = 'ConstValue';\n\n/**\n * This is a model with one property with a 'any of' relationship where the options are not $ref\n */\nexport type CompositionWithNestedAnyOfAndNull = {\n    /**\n     * Scopes\n     */\n    propA?: Array<_3eNum1Период | ConstValue> | null;\n};\n\n/**\n * This is a model with one property with a 'one of' relationship\n */\nexport type CompositionWithOneOfAndNullable = {\n    propA?: {\n        boolean?: boolean;\n    } | ModelWithEnum | ModelWithArray | ModelWithDictionary | null;\n};\n\n/**\n * This is a model that contains a simple dictionary within composition\n */\nexport type CompositionWithOneOfAndSimpleDictionary = {\n    propA?: boolean | {\n        [key: string]: number;\n    };\n};\n\n/**\n * This is a model that contains a dictionary of simple arrays within composition\n */\nexport type CompositionWithOneOfAndSimpleArrayDictionary = {\n    propA?: boolean | {\n        [key: string]: Array<boolean>;\n    };\n};\n\n/**\n * This is a model that contains a dictionary of complex arrays (composited) within composition\n */\nexport type CompositionWithOneOfAndComplexArrayDictionary = {\n    propA?: boolean | {\n        [key: string]: Array<number | string>;\n    };\n};\n\n/**\n * This is a model with one property with a 'all of' relationship\n */\nexport type CompositionWithAllOfAndNullable = {\n    propA?: ({\n        boolean?: boolean;\n    } & ModelWithEnum & ModelWithArray & ModelWithDictionary) | null;\n};\n\n/**\n * This is a model with one property with a 'any of' relationship\n */\nexport type CompositionWithAnyOfAndNullable = {\n    propA?: {\n        boolean?: boolean;\n    } | ModelWithEnum | ModelWithArray | ModelWithDictionary | null;\n};\n\n/**\n * This is a base model with two simple optional properties\n */\nexport type CompositionBaseModel = {\n    firstName?: string;\n    lastname?: string;\n};\n\n/**\n * This is a model that extends the base model\n */\nexport type CompositionExtendedModel = CompositionBaseModel & {\n    age: number;\n    firstName: string;\n    lastname: string;\n};\n\n/**\n * This is a model with one nested property\n */\nexport type ModelWithProperties = {\n    required: string;\n    readonly requiredAndReadOnly: string;\n    requiredAndNullable: string | null;\n    string?: string;\n    number?: number;\n    boolean?: boolean;\n    reference?: ModelWithString;\n    'property with space'?: string;\n    default?: string;\n    try?: string;\n    readonly '@namespace.string'?: string;\n    readonly '@namespace.integer'?: number;\n};\n\n/**\n * This is a model with one nested property\n */\nexport type ModelWithNestedProperties = {\n    readonly first: {\n        readonly second: {\n            readonly third: string | null;\n        } | null;\n    } | null;\n};\n\n/**\n * This is a model with duplicated properties\n */\nexport type ModelWithDuplicateProperties = {\n    prop?: ModelWithString;\n};\n\n/**\n * This is a model with ordered properties\n */\nexport type ModelWithOrderedProperties = {\n    zebra?: string;\n    apple?: string;\n    hawaii?: string;\n};\n\n/**\n * This is a model with duplicated imports\n */\nexport type ModelWithDuplicateImports = {\n    propA?: ModelWithString;\n    propB?: ModelWithString;\n    propC?: ModelWithString;\n};\n\n/**\n * This is a model that extends another model\n */\nexport type ModelThatExtends = ModelWithString & {\n    propExtendsA?: string;\n    propExtendsB?: ModelWithString;\n};\n\n/**\n * This is a model that extends another model\n */\nexport type ModelThatExtendsExtends = ModelWithString & ModelThatExtends & {\n    propExtendsC?: string;\n    propExtendsD?: ModelWithString;\n};\n\n/**\n * This is a model that contains a some patterns\n */\nexport type ModelWithPattern = {\n    key: string;\n    name: string;\n    readonly enabled?: boolean;\n    readonly modified?: string;\n    id?: string;\n    text?: string;\n    patternWithSingleQuotes?: string;\n    patternWithNewline?: string;\n    patternWithBacktick?: string;\n    patternWithUnicode?: string;\n};\n\nexport type File = {\n    /**\n     * Id\n     */\n    readonly id?: string;\n    /**\n     * Updated at\n     */\n    readonly updated_at?: string;\n    /**\n     * Created at\n     */\n    readonly created_at?: string;\n    /**\n     * Mime\n     */\n    mime: string;\n    /**\n     * File\n     */\n    readonly file?: string;\n};\n\nexport type Default = {\n    name?: string;\n};\n\nexport type Pageable = {\n    page?: number;\n    size?: number;\n    sort?: Array<string>;\n};\n\n/**\n * This is a free-form object without additionalProperties.\n */\nexport type FreeFormObjectWithoutAdditionalProperties = {\n    [key: string]: unknown;\n};\n\n/**\n * This is a free-form object with additionalProperties: true.\n */\nexport type FreeFormObjectWithAdditionalPropertiesEqTrue = {\n    [key: string]: unknown;\n};\n\n/**\n * This is a free-form object with additionalProperties: {}.\n */\nexport type FreeFormObjectWithAdditionalPropertiesEqEmptyObject = {\n    [key: string]: unknown;\n};\n\nexport type ModelWithConst = {\n    String?: 'String';\n    number?: 0;\n    null?: null;\n    withType?: 'Some string';\n};\n\n/**\n * This is a model with one property and additionalProperties: true\n */\nexport type ModelWithAdditionalPropertiesEqTrue = {\n    /**\n     * This is a simple string property\n     */\n    prop?: string;\n    [key: string]: unknown;\n};\n\nexport type NestedAnyOfArraysNullable = {\n    nullableArray?: Array<string | boolean> | null;\n};\n\nexport type CompositionWithOneOfAndProperties = ({\n    foo: SimpleParameter;\n} | {\n    bar: NonAsciiStringæøåÆøÅöôêÊ字符串;\n}) & {\n    baz: number | null;\n    qux: number;\n};\n\n/**\n * An object that can be null\n */\nexport type NullableObject = {\n    foo?: string;\n} | null;\n\n/**\n * Some % character\n */\nexport type CharactersInDescription = string;\n\nexport type ModelWithNullableObject = {\n    data?: NullableObject;\n};\n\n/**\n * An object with additional properties that can be null (anyOf ref + null)\n */\nexport type ModelWithAdditionalPropertiesRef = {\n    [key: string]: NullableObject | null;\n};\n\nexport type ModelWithOneOfEnum = {\n    foo: 'Bar';\n} | {\n    foo: 'Baz';\n} | {\n    foo: 'Qux';\n} | {\n    content: string;\n    foo: 'Quux';\n} | {\n    content: [\n        string,\n        string\n    ];\n    foo: 'Corge';\n};\n\nexport type ModelWithNestedArrayEnumsDataFoo = 'foo' | 'bar';\n\nexport type ModelWithNestedArrayEnumsDataBar = 'baz' | 'qux';\n\nexport type ModelWithNestedArrayEnumsData = {\n    foo?: Array<ModelWithNestedArrayEnumsDataFoo>;\n    bar?: Array<ModelWithNestedArrayEnumsDataBar>;\n};\n\nexport type ModelWithNestedArrayEnums = {\n    array_strings?: Array<string>;\n    data?: ModelWithNestedArrayEnumsData;\n};\n\nexport type ModelWithNestedCompositionEnums = {\n    foo?: ModelWithNestedArrayEnumsDataFoo;\n};\n\nexport type ModelWithReadOnlyAndWriteOnly = {\n    foo: string;\n    readonly bar: string;\n};\n\nexport type ModelWithConstantSizeArray = [\n    number,\n    number\n];\n\nexport type ModelWithAnyOfConstantSizeArray = [\n    number | string,\n    number | string,\n    number | string\n];\n\nexport type ModelWithPrefixItemsConstantSizeArray = [\n    ModelWithInteger,\n    number | string,\n    string\n];\n\nexport type ModelWithAnyOfConstantSizeArrayNullable = [\n    number | null | string,\n    number | null | string,\n    number | null | string\n];\n\nexport type ModelWithAnyOfConstantSizeArrayWithNSizeAndOptions = [\n    number | Import,\n    number | Import\n];\n\nexport type ModelWithAnyOfConstantSizeArrayAndIntersect = [\n    number & string,\n    number & string\n];\n\nexport type ModelWithNumericEnumUnion = {\n    /**\n     * Период\n     */\n    value?: -10 | -1 | 0 | 1 | 3 | 6 | 12;\n};\n\n/**\n * Some description with `back ticks`\n */\nexport type ModelWithBackticksInDescription = {\n    /**\n     * The template `that` should be used for parsing and importing the contents of the CSV file.\n     *\n     * <br/><p>There is one placeholder currently supported:<ul>     <li><b>${x}</b> - refers to the n-th column in the CSV file, e.g. ${1}, ${2}, ...)</li></ul><p>Example of a correct JSON template:</p>\n     * <pre>\n     * [\n     * {\n     * \"resourceType\": \"Asset\",\n     * \"identifier\": {\n     * \"name\": \"${1}\",\n     * \"domain\": {\n     * \"name\": \"${2}\",\n     * \"community\": {\n     * \"name\": \"Some Community\"\n     * }\n     * }\n     * },\n     * \"attributes\" : {\n     * \"00000000-0000-0000-0000-000000003115\" : [ {\n     * \"value\" : \"${3}\"\n     * } ],\n     * \"00000000-0000-0000-0000-000000000222\" : [ {\n     * \"value\" : \"${4}\"\n     * } ]\n     * }\n     * }\n     * ]\n     * </pre>\n     */\n    template?: string;\n};\n\nexport type ModelWithOneOfAndProperties = (SimpleParameter | NonAsciiStringæøåÆøÅöôêÊ字符串) & {\n    baz: number | null;\n    qux: number;\n};\n\n/**\n * Model used to test deduplication strategy (unused)\n */\nexport type ParameterSimpleParameterUnused = string;\n\n/**\n * Model used to test deduplication strategy\n */\nexport type PostServiceWithEmptyTagResponse = string;\n\n/**\n * Model used to test deduplication strategy\n */\nexport type PostServiceWithEmptyTagResponse2 = string;\n\n/**\n * Model used to test deduplication strategy\n */\nexport type DeleteFooData = string;\n\n/**\n * Model used to test deduplication strategy\n */\nexport type DeleteFooData2 = string;\n\n/**\n * Model with restricted keyword name\n */\nexport type Import = string;\n\nexport type SchemaWithFormRestrictedKeys = {\n    description?: string;\n    'x-enum-descriptions'?: string;\n    'x-enum-varnames'?: string;\n    'x-enumNames'?: string;\n    title?: string;\n    object?: {\n        description?: string;\n        'x-enum-descriptions'?: string;\n        'x-enum-varnames'?: string;\n        'x-enumNames'?: string;\n        title?: string;\n    };\n    array?: Array<{\n        description?: string;\n        'x-enum-descriptions'?: string;\n        'x-enum-varnames'?: string;\n        'x-enumNames'?: string;\n        title?: string;\n    }>;\n};\n\n/**\n * This schema was giving PascalCase transformations a hard time\n */\nexport type IoK8sApimachineryPkgApisMetaV1DeleteOptions = {\n    /**\n     * Must be fulfilled before a deletion is carried out. If not possible, a 409 Conflict status will be returned.\n     */\n    preconditions?: IoK8sApimachineryPkgApisMetaV1Preconditions;\n};\n\n/**\n * This schema was giving PascalCase transformations a hard time\n */\nexport type IoK8sApimachineryPkgApisMetaV1Preconditions = {\n    /**\n     * Specifies the target ResourceVersion\n     */\n    resourceVersion?: string;\n    /**\n     * Specifies the target UID.\n     */\n    uid?: string;\n};\n\nexport type AdditionalPropertiesUnknownIssue = {\n    [key: string]: string | number;\n};\n\nexport type AdditionalPropertiesUnknownIssue2 = {\n    [key: string]: string | number;\n};\n\nexport type AdditionalPropertiesUnknownIssue3 = string & {\n    entries: {\n        [key: string]: AdditionalPropertiesUnknownIssue;\n    };\n};\n\nexport type AdditionalPropertiesIntegerIssue = {\n    value: number;\n    [key: string]: number;\n};\n\nexport type OneOfAllOfIssue = ((ConstValue | GenericSchemaDuplicateIssue1SystemBoolean) & _3eNum1Период) | GenericSchemaDuplicateIssue1SystemString;\n\nexport type GenericSchemaDuplicateIssue1SystemBoolean = {\n    item?: boolean;\n    error?: string | null;\n    readonly hasError?: boolean;\n    data?: {\n        [key: string]: never;\n    };\n};\n\nexport type GenericSchemaDuplicateIssue1SystemString = {\n    item?: string | null;\n    error?: string | null;\n    readonly hasError?: boolean;\n};\n\nexport type ExternalSharedModel = {\n    id: string;\n    name?: string;\n};\n\n/**\n * This is a model with one property containing a reference\n */\nexport type ModelWithReferenceWritable = {\n    prop?: ModelWithPropertiesWritable;\n};\n\n/**\n * This is a model with one property containing an array\n */\nexport type ModelWithArrayReadOnlyAndWriteOnlyWritable = {\n    prop?: Array<ModelWithReadOnlyAndWriteOnlyWritable>;\n    propWithFile?: Array<Blob | File>;\n    propWithNumber?: Array<number>;\n};\n\n/**\n * This is a model with one nested property\n */\nexport type ModelWithPropertiesWritable = {\n    required: string;\n    requiredAndNullable: string | null;\n    string?: string;\n    number?: number;\n    boolean?: boolean;\n    reference?: ModelWithString;\n    'property with space'?: string;\n    default?: string;\n    try?: string;\n};\n\n/**\n * This is a model that contains a some patterns\n */\nexport type ModelWithPatternWritable = {\n    key: string;\n    name: string;\n    id?: string;\n    text?: string;\n    patternWithSingleQuotes?: string;\n    patternWithNewline?: string;\n    patternWithBacktick?: string;\n    patternWithUnicode?: string;\n};\n\nexport type FileWritable = {\n    /**\n     * Mime\n     */\n    mime: string;\n};\n\nexport type ModelWithReadOnlyAndWriteOnlyWritable = {\n    foo: string;\n    baz: string;\n};\n\nexport type ModelWithAnyOfConstantSizeArrayWithNSizeAndOptionsWritable = [\n    number | Import,\n    number | Import\n];\n\nexport type AdditionalPropertiesUnknownIssueWritable = {\n    [key: string]: string | number;\n};\n\nexport type OneOfAllOfIssueWritable = ((ConstValue | GenericSchemaDuplicateIssue1SystemBoolean) & _3eNum1Период) | GenericSchemaDuplicateIssue1SystemString;\n\nexport type GenericSchemaDuplicateIssue1SystemBooleanWritable = {\n    item?: boolean;\n    error?: string | null;\n    data?: {\n        [key: string]: never;\n    };\n};\n\nexport type GenericSchemaDuplicateIssue1SystemStringWritable = {\n    item?: string | null;\n    error?: string | null;\n};\n\n/**\n * This is a reusable parameter\n */\nexport type SimpleParameter = string;\n\n/**\n * Parameter with illegal characters\n */\nexport type XFooBar = ModelWithString;\n\n/**\n * A reusable request body\n */\nexport type SimpleRequestBody = ModelWithString;\n\n/**\n * A reusable request body\n */\nexport type SimpleFormData = ModelWithString;\n\nexport type ExportData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no+tag';\n};\n\nexport type PatchApiVbyApiVersionNoTagData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no+tag';\n};\n\nexport type PatchApiVbyApiVersionNoTagResponses = {\n    /**\n     * OK\n     */\n    default: unknown;\n};\n\nexport type ImportData = {\n    body: ModelWithReadOnlyAndWriteOnlyWritable | ModelWithArrayReadOnlyAndWriteOnlyWritable;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no+tag';\n};\n\nexport type ImportResponses = {\n    /**\n     * Success\n     */\n    200: ModelFromZendesk;\n    /**\n     * Default success response\n     */\n    default: ModelWithReadOnlyAndWriteOnly;\n};\n\nexport type ImportResponse = ImportResponses[keyof ImportResponses];\n\nexport type FooWowData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no+tag';\n};\n\nexport type FooWowResponses = {\n    /**\n     * OK\n     */\n    default: unknown;\n};\n\nexport type ApiVVersionODataControllerCountData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple/$count';\n};\n\nexport type ApiVVersionODataControllerCountResponses = {\n    /**\n     * Success\n     */\n    200: ModelFromZendesk;\n};\n\nexport type ApiVVersionODataControllerCountResponse = ApiVVersionODataControllerCountResponses[keyof ApiVVersionODataControllerCountResponses];\n\nexport type GetApiVbyApiVersionSimpleOperationData = {\n    body?: never;\n    path: {\n        /**\n         * foo in method\n         */\n        foo_param: string;\n    };\n    query?: never;\n    url: '/api/v{api-version}/simple:operation';\n};\n\nexport type GetApiVbyApiVersionSimpleOperationErrors = {\n    /**\n     * Default error response\n     */\n    default: ModelWithBoolean;\n};\n\nexport type GetApiVbyApiVersionSimpleOperationError = GetApiVbyApiVersionSimpleOperationErrors[keyof GetApiVbyApiVersionSimpleOperationErrors];\n\nexport type GetApiVbyApiVersionSimpleOperationResponses = {\n    /**\n     * Response is a simple number\n     */\n    200: number;\n};\n\nexport type GetApiVbyApiVersionSimpleOperationResponse = GetApiVbyApiVersionSimpleOperationResponses[keyof GetApiVbyApiVersionSimpleOperationResponses];\n\nexport type DeleteCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type GetCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type HeadCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type OptionsCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type PatchCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type PostCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type PutCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type DeleteFooData3 = {\n    body?: never;\n    headers: {\n        /**\n         * Parameter with illegal characters\n         */\n        'x-Foo-Bar': ModelWithString;\n    };\n    path: {\n        /**\n         * foo in method\n         */\n        foo_param: string;\n        /**\n         * bar in method\n         */\n        BarParam: string;\n    };\n    query?: never;\n    url: '/api/v{api-version}/foo/{foo_param}/bar/{BarParam}';\n};\n\nexport type CallWithDescriptionsData = {\n    body?: never;\n    path?: never;\n    query?: {\n        /**\n         * Testing multiline comments in string: First line\n         * Second line\n         *\n         * Fourth line\n         */\n        parameterWithBreaks?: string;\n        /**\n         * Testing backticks in string: `backticks` and ```multiple backticks``` should work\n         */\n        parameterWithBackticks?: string;\n        /**\n         * Testing slashes in string: \\backwards\\\\\\ and /forwards/// should work\n         */\n        parameterWithSlashes?: string;\n        /**\n         * Testing expression placeholders in string: ${expression} should work\n         */\n        parameterWithExpressionPlaceholders?: string;\n        /**\n         * Testing quotes in string: 'single quote''' and \"double quotes\"\"\" should work\n         */\n        parameterWithQuotes?: string;\n        /**\n         * Testing reserved characters in string: * inline * and ** inline ** should work\n         */\n        parameterWithReservedCharacters?: string;\n    };\n    url: '/api/v{api-version}/descriptions';\n};\n\nexport type DeprecatedCallData = {\n    body?: never;\n    headers: {\n        /**\n         * This parameter is deprecated\n         *\n         * @deprecated\n         */\n        parameter: DeprecatedModel | null;\n    };\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/parameters/deprecated';\n};\n\nexport type CallWithParametersData = {\n    /**\n     * This is the parameter that goes into the body\n     */\n    body: {\n        [key: string]: unknown;\n    } | null;\n    headers: {\n        /**\n         * This is the parameter that goes into the header\n         */\n        parameterHeader: string | null;\n    };\n    path: {\n        /**\n         * This is the parameter that goes into the path\n         */\n        parameterPath: string | null;\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string | null;\n    };\n    query: {\n        foo_ref_enum?: ModelWithNestedArrayEnumsDataFoo;\n        foo_all_of_enum: ModelWithNestedArrayEnumsDataFoo;\n        /**\n         * This is the parameter that goes into the query params\n         */\n        cursor: string | null;\n    };\n    url: '/api/v{api-version}/parameters/{parameterPath}';\n};\n\nexport type CallWithWeirdParameterNamesData = {\n    /**\n     * This is the parameter that goes into the body\n     */\n    body: ModelWithString | null;\n    headers: {\n        /**\n         * This is the parameter that goes into the request header\n         */\n        'parameter.header': string | null;\n    };\n    path: {\n        /**\n         * This is the parameter that goes into the path\n         */\n        'parameter.path.1'?: string;\n        /**\n         * This is the parameter that goes into the path\n         */\n        'parameter-path-2'?: string;\n        /**\n         * This is the parameter that goes into the path\n         */\n        'PARAMETER-PATH-3'?: string;\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string | null;\n    };\n    query: {\n        /**\n         * This is the parameter with a reserved keyword\n         */\n        default?: string;\n        /**\n         * This is the parameter that goes into the request query params\n         */\n        'parameter-query': string | null;\n    };\n    url: '/api/v{api-version}/parameters/{parameter.path.1}/{parameter-path-2}/{PARAMETER-PATH-3}';\n};\n\nexport type GetCallWithOptionalParamData = {\n    /**\n     * This is a required parameter\n     */\n    body: ModelWithOneOfEnum;\n    path?: never;\n    query?: {\n        /**\n         * This is an optional parameter\n         */\n        page?: number;\n    };\n    url: '/api/v{api-version}/parameters';\n};\n\nexport type PostCallWithOptionalParamData = {\n    /**\n     * This is an optional parameter\n     */\n    body?: {\n        offset?: number | null;\n    };\n    path?: never;\n    query: {\n        /**\n         * This is a required parameter\n         */\n        parameter: Pageable;\n    };\n    url: '/api/v{api-version}/parameters';\n};\n\nexport type PostCallWithOptionalParamResponses = {\n    /**\n     * Response is a simple number\n     */\n    200: number;\n    /**\n     * Success\n     */\n    204: void;\n};\n\nexport type PostCallWithOptionalParamResponse = PostCallWithOptionalParamResponses[keyof PostCallWithOptionalParamResponses];\n\nexport type PostApiVbyApiVersionRequestBodyData = {\n    /**\n     * A reusable request body\n     */\n    body?: SimpleRequestBody;\n    path?: never;\n    query?: {\n        /**\n         * This is a reusable parameter\n         */\n        parameter?: string;\n    };\n    url: '/api/v{api-version}/requestBody';\n};\n\nexport type PostApiVbyApiVersionFormDataData = {\n    /**\n     * A reusable request body\n     */\n    body?: SimpleFormData;\n    path?: never;\n    query?: {\n        /**\n         * This is a reusable parameter\n         */\n        parameter?: string;\n    };\n    url: '/api/v{api-version}/formData';\n};\n\nexport type CallWithDefaultParametersData = {\n    body?: never;\n    path?: never;\n    query?: {\n        /**\n         * This is a simple string with default value\n         */\n        parameterString?: string | null;\n        /**\n         * This is a simple number with default value\n         */\n        parameterNumber?: number | null;\n        /**\n         * This is a simple boolean with default value\n         */\n        parameterBoolean?: boolean | null;\n        /**\n         * This is a simple enum with default value\n         */\n        parameterEnum?: 'Success' | 'Warning' | 'Error';\n        /**\n         * This is a simple model with default value\n         */\n        parameterModel?: ModelWithString | null;\n    };\n    url: '/api/v{api-version}/defaults';\n};\n\nexport type CallWithDefaultOptionalParametersData = {\n    body?: never;\n    path?: never;\n    query?: {\n        /**\n         * This is a simple string that is optional with default value\n         */\n        parameterString?: string;\n        /**\n         * This is a simple number that is optional with default value\n         */\n        parameterNumber?: number;\n        /**\n         * This is a simple boolean that is optional with default value\n         */\n        parameterBoolean?: boolean;\n        /**\n         * This is a simple enum that is optional with default value\n         */\n        parameterEnum?: 'Success' | 'Warning' | 'Error';\n        /**\n         * This is a simple model that is optional with default value\n         */\n        parameterModel?: ModelWithString;\n    };\n    url: '/api/v{api-version}/defaults';\n};\n\nexport type CallToTestOrderOfParamsData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * This is a optional string with default\n         */\n        parameterOptionalStringWithDefault?: string;\n        /**\n         * This is a optional string with empty default\n         */\n        parameterOptionalStringWithEmptyDefault?: string;\n        /**\n         * This is a optional string with no default\n         */\n        parameterOptionalStringWithNoDefault?: string;\n        /**\n         * This is a string with default\n         */\n        parameterStringWithDefault: string;\n        /**\n         * This is a string with empty default\n         */\n        parameterStringWithEmptyDefault: string;\n        /**\n         * This is a string with no default\n         */\n        parameterStringWithNoDefault: string;\n        /**\n         * This is a string that can be null with no default\n         */\n        parameterStringNullableWithNoDefault?: string | null;\n        /**\n         * This is a string that can be null with default\n         */\n        parameterStringNullableWithDefault?: string | null;\n    };\n    url: '/api/v{api-version}/defaults';\n};\n\nexport type DuplicateNameData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/duplicate';\n};\n\nexport type DuplicateName2Data = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/duplicate';\n};\n\nexport type DuplicateName3Data = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/duplicate';\n};\n\nexport type DuplicateName4Data = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/duplicate';\n};\n\nexport type CallWithNoContentResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no-content';\n};\n\nexport type CallWithNoContentResponseResponses = {\n    /**\n     * Success\n     */\n    204: void;\n};\n\nexport type CallWithNoContentResponseResponse = CallWithNoContentResponseResponses[keyof CallWithNoContentResponseResponses];\n\nexport type CallWithResponseAndNoContentResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multiple-tags/response-and-no-content';\n};\n\nexport type CallWithResponseAndNoContentResponseResponses = {\n    /**\n     * Response is a simple number\n     */\n    200: number;\n    /**\n     * Success\n     */\n    204: void;\n};\n\nexport type CallWithResponseAndNoContentResponseResponse = CallWithResponseAndNoContentResponseResponses[keyof CallWithResponseAndNoContentResponseResponses];\n\nexport type DummyAData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multiple-tags/a';\n};\n\nexport type DummyAResponses = {\n    200: _400;\n};\n\nexport type DummyAResponse = DummyAResponses[keyof DummyAResponses];\n\nexport type DummyBData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multiple-tags/b';\n};\n\nexport type DummyBResponses = {\n    /**\n     * Success\n     */\n    204: void;\n};\n\nexport type DummyBResponse = DummyBResponses[keyof DummyBResponses];\n\nexport type CallWithResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/response';\n};\n\nexport type CallWithResponseResponses = {\n    default: Import;\n};\n\nexport type CallWithResponseResponse = CallWithResponseResponses[keyof CallWithResponseResponses];\n\nexport type CallWithDuplicateResponsesData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/response';\n};\n\nexport type CallWithDuplicateResponsesErrors = {\n    /**\n     * Message for 500 error\n     */\n    500: ModelWithStringError;\n    /**\n     * Message for 501 error\n     */\n    501: ModelWithStringError;\n    /**\n     * Message for 502 error\n     */\n    502: ModelWithStringError;\n    /**\n     * Message for 4XX errors\n     */\n    '4XX': DictionaryWithArray;\n    /**\n     * Default error response\n     */\n    default: ModelWithBoolean;\n};\n\nexport type CallWithDuplicateResponsesError = CallWithDuplicateResponsesErrors[keyof CallWithDuplicateResponsesErrors];\n\nexport type CallWithDuplicateResponsesResponses = {\n    /**\n     * Message for 200 response\n     */\n    200: ModelWithBoolean & ModelWithInteger;\n    /**\n     * Message for 201 response\n     */\n    201: ModelWithString;\n    /**\n     * Message for 202 response\n     */\n    202: ModelWithString;\n};\n\nexport type CallWithDuplicateResponsesResponse = CallWithDuplicateResponsesResponses[keyof CallWithDuplicateResponsesResponses];\n\nexport type CallWithResponsesData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/response';\n};\n\nexport type CallWithResponsesErrors = {\n    /**\n     * Message for 500 error\n     */\n    500: ModelWithStringError;\n    /**\n     * Message for 501 error\n     */\n    501: ModelWithStringError;\n    /**\n     * Message for 502 error\n     */\n    502: ModelWithStringError;\n    /**\n     * Message for default response\n     */\n    default: ModelWithStringError;\n};\n\nexport type CallWithResponsesError = CallWithResponsesErrors[keyof CallWithResponsesErrors];\n\nexport type CallWithResponsesResponses = {\n    /**\n     * Message for 200 response\n     */\n    200: {\n        readonly '@namespace.string'?: string;\n        readonly '@namespace.integer'?: number;\n        readonly value?: Array<ModelWithString>;\n    };\n    /**\n     * Message for 201 response\n     */\n    201: ModelThatExtends;\n    /**\n     * Message for 202 response\n     */\n    202: ModelThatExtendsExtends;\n};\n\nexport type CallWithResponsesResponse = CallWithResponsesResponses[keyof CallWithResponsesResponses];\n\nexport type CollectionFormatData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * This is an array parameter that is sent as csv format (comma-separated values)\n         */\n        parameterArrayCSV: Array<string> | null;\n        /**\n         * This is an array parameter that is sent as ssv format (space-separated values)\n         */\n        parameterArraySSV: Array<string> | null;\n        /**\n         * This is an array parameter that is sent as tsv format (tab-separated values)\n         */\n        parameterArrayTSV: Array<string> | null;\n        /**\n         * This is an array parameter that is sent as pipes format (pipe-separated values)\n         */\n        parameterArrayPipes: Array<string> | null;\n        /**\n         * This is an array parameter that is sent as multi format (multiple parameter instances)\n         */\n        parameterArrayMulti: Array<string> | null;\n    };\n    url: '/api/v{api-version}/collectionFormat';\n};\n\nexport type TypesData = {\n    body?: never;\n    path?: {\n        /**\n         * This is a number parameter\n         */\n        id?: number;\n    };\n    query: {\n        /**\n         * This is a number parameter\n         */\n        parameterNumber: number;\n        /**\n         * This is a string parameter\n         */\n        parameterString: string | null;\n        /**\n         * This is a boolean parameter\n         */\n        parameterBoolean: boolean | null;\n        /**\n         * This is an object parameter\n         */\n        parameterObject: {\n            [key: string]: unknown;\n        } | null;\n        /**\n         * This is an array parameter\n         */\n        parameterArray: Array<string> | null;\n        /**\n         * This is a dictionary parameter\n         */\n        parameterDictionary: {\n            [key: string]: unknown;\n        } | null;\n        /**\n         * This is an enum parameter\n         */\n        parameterEnum: 'Success' | 'Warning' | 'Error' | null;\n    };\n    url: '/api/v{api-version}/types';\n};\n\nexport type TypesResponses = {\n    /**\n     * Response is a simple number\n     */\n    200: number;\n    /**\n     * Response is a simple string\n     */\n    201: string;\n    /**\n     * Response is a simple boolean\n     */\n    202: boolean;\n    /**\n     * Response is a simple object\n     */\n    203: {\n        [key: string]: unknown;\n    };\n};\n\nexport type TypesResponse = TypesResponses[keyof TypesResponses];\n\nexport type UploadFileData = {\n    body: Blob | File;\n    path: {\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string | null;\n    };\n    query?: never;\n    url: '/api/v{api-version}/upload';\n};\n\nexport type UploadFileResponses = {\n    200: boolean;\n};\n\nexport type UploadFileResponse = UploadFileResponses[keyof UploadFileResponses];\n\nexport type FileResponseData = {\n    body?: never;\n    path: {\n        id: string;\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string;\n    };\n    query?: never;\n    url: '/api/v{api-version}/file/{id}';\n};\n\nexport type FileResponseResponses = {\n    /**\n     * Success\n     */\n    200: Blob | File;\n};\n\nexport type FileResponseResponse = FileResponseResponses[keyof FileResponseResponses];\n\nexport type ComplexTypesData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * Parameter containing object\n         */\n        parameterObject: {\n            first?: {\n                second?: {\n                    third?: string;\n                };\n            };\n        };\n        /**\n         * Parameter containing reference\n         */\n        parameterReference: ModelWithString;\n    };\n    url: '/api/v{api-version}/complex';\n};\n\nexport type ComplexTypesErrors = {\n    /**\n     * 400 `server` error\n     */\n    400: unknown;\n    /**\n     * 500 server error\n     */\n    500: unknown;\n};\n\nexport type ComplexTypesResponses = {\n    /**\n     * Successful response\n     */\n    200: Array<ModelWithString>;\n};\n\nexport type ComplexTypesResponse = ComplexTypesResponses[keyof ComplexTypesResponses];\n\nexport type MultipartResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multipart';\n};\n\nexport type MultipartResponseResponses = {\n    /**\n     * OK\n     */\n    200: {\n        file?: Blob | File;\n        metadata?: {\n            foo?: string;\n            bar?: string;\n        };\n    };\n};\n\nexport type MultipartResponseResponse = MultipartResponseResponses[keyof MultipartResponseResponses];\n\nexport type MultipartRequestData = {\n    body?: {\n        content?: Blob | File;\n        data?: ModelWithString | null;\n    };\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multipart';\n};\n\nexport type ComplexParamsData = {\n    body?: {\n        readonly key: string | null;\n        name: string | null;\n        enabled?: boolean;\n        type: 'Monkey' | 'Horse' | 'Bird';\n        listOfModels?: Array<ModelWithString> | null;\n        listOfStrings?: Array<string> | null;\n        parameters: ModelWithString | ModelWithEnum | ModelWithArray | ModelWithDictionary;\n        readonly user?: {\n            readonly id?: number;\n            readonly name?: string | null;\n        };\n    };\n    path: {\n        id: number;\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string;\n    };\n    query?: never;\n    url: '/api/v{api-version}/complex/{id}';\n};\n\nexport type ComplexParamsResponses = {\n    /**\n     * Success\n     */\n    200: ModelWithString;\n};\n\nexport type ComplexParamsResponse = ComplexParamsResponses[keyof ComplexParamsResponses];\n\nexport type CallWithResultFromHeaderData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/header';\n};\n\nexport type CallWithResultFromHeaderErrors = {\n    /**\n     * 400 server error\n     */\n    400: unknown;\n    /**\n     * 500 server error\n     */\n    500: unknown;\n};\n\nexport type CallWithResultFromHeaderResponses = {\n    /**\n     * Successful response\n     */\n    200: unknown;\n};\n\nexport type TestErrorCodeData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * Status code to return\n         */\n        status: number;\n    };\n    url: '/api/v{api-version}/error';\n};\n\nexport type TestErrorCodeErrors = {\n    /**\n     * Custom message: Internal Server Error\n     */\n    500: unknown;\n    /**\n     * Custom message: Not Implemented\n     */\n    501: unknown;\n    /**\n     * Custom message: Bad Gateway\n     */\n    502: unknown;\n    /**\n     * Custom message: Service Unavailable\n     */\n    503: unknown;\n};\n\nexport type TestErrorCodeResponses = {\n    /**\n     * Custom message: Successful response\n     */\n    200: unknown;\n};\n\nexport type NonAsciiæøåÆøÅöôêÊ字符串Data = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * Dummy input param\n         */\n        nonAsciiParamæøåÆØÅöôêÊ: number;\n    };\n    url: '/api/v{api-version}/non-ascii-æøåÆØÅöôêÊ字符串';\n};\n\nexport type NonAsciiæøåÆøÅöôêÊ字符串Responses = {\n    /**\n     * Successful response\n     */\n    200: Array<NonAsciiStringæøåÆøÅöôêÊ字符串>;\n};\n\nexport type NonAsciiæøåÆøÅöôêÊ字符串Response = NonAsciiæøåÆøÅöôêÊ字符串Responses[keyof NonAsciiæøåÆøÅöôêÊ字符串Responses];\n\nexport type PutWithFormUrlEncodedData = {\n    body: ArrayWithStrings;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/non-ascii-æøåÆØÅöôêÊ字符串';\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-ky/base-url-strict/client/client.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { HTTPError, Options as KyOptions } from 'ky';\nimport ky from 'ky';\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, RetryOptions } from './types.gen';\nimport type { Middleware } from './utils.gen';\nimport {\n  buildUrl,\n  createConfig,\n  createInterceptors,\n  getParseAs,\n  mergeConfigs,\n  mergeHeaders,\n  setAuthParams,\n} from './utils.gen';\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 (options: RequestOptions) => {\n    const opts = {\n      ..._config,\n      ...options,\n      headers: mergeHeaders(_config.headers, options.headers),\n      ky: options.ky ?? _config.ky ?? ky,\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    if (opts.body === undefined || opts.serializedBody === '') {\n      opts.headers.delete('Content-Type');\n    }\n\n    const url = buildUrl(opts);\n\n    return { opts, url };\n  };\n\n  const parseErrorResponse = async (\n    response: Response,\n    request: Request,\n    opts: ResolvedRequestOptions,\n    interceptorsMiddleware: Middleware<Request, Response, unknown, ResolvedRequestOptions>,\n  ) => {\n    const result = {\n      request,\n      response,\n    };\n\n    const textError = await response.text();\n    let jsonError: unknown;\n\n    try {\n      jsonError = JSON.parse(textError);\n    } catch {\n      jsonError = undefined;\n    }\n\n    const error = jsonError ?? textError;\n    let finalError = error;\n\n    for (const fn of interceptorsMiddleware.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    return opts.responseStyle === 'data'\n      ? undefined\n      : {\n          error: finalError,\n          ...result,\n        };\n  };\n\n  const request: Client['request'] = async (options) => {\n    // @ts-expect-error\n    const { opts, url } = await beforeRequest(options);\n\n    const kyInstance = opts.ky!;\n\n    const validBody = getValidRequestBody(opts);\n\n    const kyOptions: KyOptions = {\n      body: validBody as BodyInit,\n      cache: opts.cache,\n      credentials: opts.credentials,\n      headers: opts.headers,\n      integrity: opts.integrity,\n      keepalive: opts.keepalive,\n      method: opts.method as KyOptions['method'],\n      mode: opts.mode,\n      redirect: 'follow',\n      referrer: opts.referrer,\n      referrerPolicy: opts.referrerPolicy,\n      signal: opts.signal,\n      throwHttpErrors: opts.throwOnError ?? false,\n      timeout: opts.timeout,\n      ...opts.kyOptions,\n    };\n\n    if (opts.retry && typeof opts.retry === 'object') {\n      const retryOpts = opts.retry as RetryOptions;\n      kyOptions.retry = {\n        limit: retryOpts.limit ?? 2,\n        methods: retryOpts.methods as Array<\n          'get' | 'post' | 'put' | 'patch' | 'head' | 'delete' | 'options' | 'trace'\n        >,\n        statusCodes: retryOpts.statusCodes,\n      };\n    }\n\n    let request = new Request(url, {\n      body: kyOptions.body as BodyInit,\n      headers: kyOptions.headers as HeadersInit,\n      method: kyOptions.method,\n    });\n\n    for (const fn of interceptors.request.fns) {\n      if (fn) {\n        request = await fn(request, opts);\n      }\n    }\n\n    let response: Response;\n\n    try {\n      response = await kyInstance(request, kyOptions);\n    } catch (error) {\n      if (error && typeof error === 'object' && 'response' in error) {\n        const httpError = error as HTTPError;\n        response = httpError.response;\n\n        for (const fn of interceptors.response.fns) {\n          if (fn) {\n            response = await fn(response, request, opts);\n          }\n        }\n\n        return parseErrorResponse(response, request, opts, interceptors);\n      }\n\n      throw error;\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    return parseErrorResponse(response, request, opts, interceptors);\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      fetch: globalThis.fetch,\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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-ky/base-url-strict/client/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type { Auth } from '../core/auth.gen';\nexport type { QuerySerializerOptions } from '../core/bodySerializer.gen';\nexport {\n  formDataBodySerializer,\n  jsonBodySerializer,\n  urlSearchParamsBodySerializer,\n} from '../core/bodySerializer.gen';\nexport { buildClientParams } from '../core/params.gen';\nexport { serializeQueryKeyValue } from '../core/queryKeySerializer.gen';\nexport { createClient } from './client.gen';\nexport type {\n  Client,\n  ClientOptions,\n  Config,\n  CreateClientConfig,\n  Options,\n  RequestOptions,\n  RequestResult,\n  ResolvedRequestOptions,\n  ResponseStyle,\n  RetryOptions,\n  TDataShape,\n} from './types.gen';\nexport { createConfig, mergeHeaders } from './utils.gen';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-ky/base-url-strict/client/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { Options as KyOptions } from 'ky';\nimport type ky from 'ky';\n\nimport type { Auth } from '../core/auth.gen';\nimport type {\n  ServerSentEventsOptions,\n  ServerSentEventsResult,\n} from '../core/serverSentEvents.gen';\nimport type { Client as CoreClient, Config as CoreConfig } from '../core/types.gen';\nimport type { Middleware } from './utils.gen';\n\nexport type ResponseStyle = 'data' | 'fields';\n\nexport interface RetryOptions {\n  /**\n   * Maximum number of retry attempts\n   *\n   * @default 2\n   */\n  limit?: number;\n  /**\n   * HTTP methods to retry\n   *\n   * @default ['get', 'put', 'head', 'delete', 'options', 'trace']\n   */\n  methods?: Array<'get' | 'post' | 'put' | 'delete' | 'patch' | 'head' | 'options' | 'trace'>;\n  /**\n   * HTTP status codes to retry\n   *\n   * @default [408, 413, 429, 500, 502, 503, 504]\n   */\n  statusCodes?: number[];\n}\n\nexport interface Config<T extends ClientOptions = ClientOptions>\n  extends\n    Omit<KyOptions, 'body' | 'headers' | 'method' | 'prefixUrl' | 'retry' | 'throwHttpErrors'>,\n    CoreConfig {\n  /**\n   * Base URL for all requests made by this client.\n   */\n  baseUrl?: T['baseUrl'];\n  /**\n   * Ky instance to use. You can use this option to provide a custom\n   * ky instance.\n   */\n  ky?: typeof ky;\n  /**\n   * Additional ky-specific options that will be passed directly to ky.\n   * This allows you to use any ky option not explicitly exposed in the config.\n   */\n  kyOptions?: Omit<KyOptions, 'method' | 'prefixUrl'>;\n  /**\n   * Return the response data parsed in a specified format. By default, `auto`\n   * will infer the appropriate method from the `Content-Type` response header.\n   * You can override this behavior with any of the {@link Body} methods.\n   * Select `stream` if you don't want to parse response data at all.\n   *\n   * @default 'auto'\n   */\n  parseAs?: 'arrayBuffer' | 'auto' | 'blob' | 'formData' | 'json' | 'stream' | 'text';\n  /**\n   * Should we return only data or multiple fields (data, error, response, etc.)?\n   *\n   * @default 'fields'\n   */\n  responseStyle?: ResponseStyle;\n  /**\n   * Retry configuration\n   */\n  retry?: RetryOptions;\n  /**\n   * Throw an error instead of returning it in the response?\n   *\n   * @default false\n   */\n  throwOnError?: T['throwOnError'];\n  /**\n   * Request timeout in milliseconds\n   *\n   * @default 10000\n   */\n  timeout?: number;\n}\n\nexport interface RequestOptions<\n  TData = unknown,\n  TResponseStyle extends ResponseStyle = 'fields',\n  ThrowOnError extends boolean = boolean,\n  Url extends string = string,\n>\n  extends\n    Config<{\n      responseStyle: TResponseStyle;\n      throwOnError: ThrowOnError;\n    }>,\n    Pick<\n      ServerSentEventsOptions<TData>,\n      | 'onRequest'\n      | 'onSseError'\n      | 'onSseEvent'\n      | 'sseDefaultRetryDelay'\n      | 'sseMaxRetryAttempts'\n      | 'sseMaxRetryDelay'\n    > {\n  /**\n   * Any body that you want to add to your request.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/fetch#body}\n   */\n  body?: unknown;\n  path?: Record<string, unknown>;\n  query?: Record<string, unknown>;\n  /**\n   * Security mechanism(s) to use for the request.\n   */\n  security?: ReadonlyArray<Auth>;\n  url: Url;\n}\n\nexport interface ResolvedRequestOptions<\n  TResponseStyle extends ResponseStyle = 'fields',\n  ThrowOnError extends boolean = boolean,\n  Url extends string = string,\n> extends RequestOptions<unknown, TResponseStyle, ThrowOnError, Url> {\n  serializedBody?: string;\n}\n\nexport type RequestResult<\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = boolean,\n  TResponseStyle extends ResponseStyle = 'fields',\n> = ThrowOnError extends true\n  ? Promise<\n      TResponseStyle extends 'data'\n        ? TData extends Record<string, unknown>\n          ? TData[keyof TData]\n          : TData\n        : {\n            data: TData extends Record<string, unknown> ? TData[keyof TData] : TData;\n            request: Request;\n            response: Response;\n          }\n    >\n  : Promise<\n      TResponseStyle extends 'data'\n        ? (TData extends Record<string, unknown> ? TData[keyof TData] : TData) | undefined\n        : (\n            | {\n                data: TData extends Record<string, unknown> ? TData[keyof TData] : TData;\n                error: undefined;\n              }\n            | {\n                data: undefined;\n                error: TError extends Record<string, unknown> ? TError[keyof TError] : TError;\n              }\n          ) & {\n            request: Request;\n            response: Response;\n          }\n    >;\n\nexport interface ClientOptions {\n  baseUrl?: string;\n  responseStyle?: ResponseStyle;\n  throwOnError?: boolean;\n}\n\ntype MethodFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'>,\n) => RequestResult<TData, TError, ThrowOnError, TResponseStyle>;\n\ntype SseFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'>,\n) => Promise<ServerSentEventsResult<TData, TError>>;\n\ntype RequestFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'> &\n    Pick<Required<RequestOptions<TData, TResponseStyle, ThrowOnError>>, 'method'>,\n) => RequestResult<TData, TError, ThrowOnError, TResponseStyle>;\n\ntype BuildUrlFn = <\n  TData extends {\n    body?: unknown;\n    path?: Record<string, unknown>;\n    query?: Record<string, unknown>;\n    url: string;\n  },\n>(\n  options: TData & Options<TData>,\n) => string;\n\nexport type Client = CoreClient<RequestFn, Config, MethodFn, BuildUrlFn, SseFn> & {\n  interceptors: Middleware<Request, Response, unknown, ResolvedRequestOptions>;\n};\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 = ClientOptions> = (\n  override?: Config<ClientOptions & T>,\n) => Config<Required<ClientOptions> & T>;\n\nexport interface TDataShape {\n  body?: unknown;\n  headers?: unknown;\n  path?: unknown;\n  query?: unknown;\n  url: string;\n}\n\ntype OmitKeys<T, K> = Pick<T, Exclude<keyof T, K>>;\n\nexport type Options<\n  TData extends TDataShape = TDataShape,\n  ThrowOnError extends boolean = boolean,\n  TResponse = unknown,\n  TResponseStyle extends ResponseStyle = 'fields',\n> = OmitKeys<\n  RequestOptions<TResponse, TResponseStyle, ThrowOnError>,\n  'body' | 'path' | 'query' | 'url'\n> &\n  ([TData] extends [never] ? unknown : Omit<TData, 'url'>);\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-ky/base-url-strict/client/utils.gen.ts",
    "content": "// 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    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        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  throwOnError: false,\n  timeout: 10000,\n  ...override,\n});\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-ky/base-url-strict/client.gen.ts",
    "content": "// 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: 'http://localhost:3000/base' }));\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-ky/base-url-strict/core/auth.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-ky/base-url-strict/core/bodySerializer.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-ky/base-url-strict/core/params.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-ky/base-url-strict/core/pathSerializer.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-ky/base-url-strict/core/queryKeySerializer.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\n/**\n * JSON-friendly union that mirrors what Pinia Colada can hash.\n */\nexport type JsonValue =\n  | null\n  | string\n  | number\n  | boolean\n  | JsonValue[]\n  | { [key: string]: JsonValue };\n\n/**\n * Replacer that converts non-JSON values (bigint, Date, etc.) to safe substitutes.\n */\nexport const queryKeyJsonReplacer = (_key: string, value: unknown) => {\n  if (value === undefined || typeof value === 'function' || typeof value === 'symbol') {\n    return undefined;\n  }\n  if (typeof value === 'bigint') {\n    return value.toString();\n  }\n  if (value instanceof Date) {\n    return value.toISOString();\n  }\n  return value;\n};\n\n/**\n * Safely stringifies a value and parses it back into a JsonValue.\n */\nexport const stringifyToJsonValue = (input: unknown): JsonValue | undefined => {\n  try {\n    const json = JSON.stringify(input, queryKeyJsonReplacer);\n    if (json === undefined) {\n      return undefined;\n    }\n    return JSON.parse(json) as JsonValue;\n  } catch {\n    return undefined;\n  }\n};\n\n/**\n * Detects plain objects (including objects with a null prototype).\n */\nconst isPlainObject = (value: unknown): value is Record<string, unknown> => {\n  if (value === null || typeof value !== 'object') {\n    return false;\n  }\n  const prototype = Object.getPrototypeOf(value as object);\n  return prototype === Object.prototype || prototype === null;\n};\n\n/**\n * Turns URLSearchParams into a sorted JSON object for deterministic keys.\n */\nconst serializeSearchParams = (params: URLSearchParams): JsonValue => {\n  const entries = Array.from(params.entries()).sort(([a], [b]) => a.localeCompare(b));\n  const result: Record<string, JsonValue> = {};\n\n  for (const [key, value] of entries) {\n    const existing = result[key];\n    if (existing === undefined) {\n      result[key] = value;\n      continue;\n    }\n\n    if (Array.isArray(existing)) {\n      (existing as string[]).push(value);\n    } else {\n      result[key] = [existing, value];\n    }\n  }\n\n  return result;\n};\n\n/**\n * Normalizes any accepted value into a JSON-friendly shape for query keys.\n */\nexport const serializeQueryKeyValue = (value: unknown): JsonValue | undefined => {\n  if (value === null) {\n    return null;\n  }\n\n  if (typeof value === 'string' || typeof value === 'number' || typeof value === 'boolean') {\n    return value;\n  }\n\n  if (value === undefined || typeof value === 'function' || typeof value === 'symbol') {\n    return undefined;\n  }\n\n  if (typeof value === 'bigint') {\n    return value.toString();\n  }\n\n  if (value instanceof Date) {\n    return value.toISOString();\n  }\n\n  if (Array.isArray(value)) {\n    return stringifyToJsonValue(value);\n  }\n\n  if (typeof URLSearchParams !== 'undefined' && value instanceof URLSearchParams) {\n    return serializeSearchParams(value);\n  }\n\n  if (isPlainObject(value)) {\n    return stringifyToJsonValue(value);\n  }\n\n  return undefined;\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-ky/base-url-strict/core/serverSentEvents.gen.ts",
    "content": "// 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 const 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            // Normalize line endings: CRLF -> LF, then CR -> LF\n            buffer = buffer.replace(/\\r\\n/g, '\\n').replace(/\\r/g, '\\n');\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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-ky/base-url-strict/core/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { Auth, AuthToken } from './auth.gen';\nimport type { BodySerializer, QuerySerializer, QuerySerializerOptions } from './bodySerializer.gen';\n\nexport type HttpMethod =\n  | 'connect'\n  | 'delete'\n  | 'get'\n  | 'head'\n  | 'options'\n  | 'patch'\n  | 'post'\n  | 'put'\n  | 'trace';\n\nexport type Client<\n  RequestFn = never,\n  Config = unknown,\n  MethodFn = never,\n  BuildUrlFn = never,\n  SseFn = never,\n> = {\n  /**\n   * Returns the final request URL.\n   */\n  buildUrl: BuildUrlFn;\n  getConfig: () => Config;\n  request: RequestFn;\n  setConfig: (config: Config) => Config;\n} & {\n  [K in HttpMethod]: MethodFn;\n} & ([SseFn] extends [never] ? { sse?: never } : { sse: { [K in HttpMethod]: SseFn } });\n\nexport interface Config {\n  /**\n   * Auth token or a function returning auth token. The resolved value will be\n   * added to the request payload as defined by its `security` array.\n   */\n  auth?: ((auth: Auth) => Promise<AuthToken> | AuthToken) | AuthToken;\n  /**\n   * A function for serializing request body parameter. By default,\n   * {@link JSON.stringify()} will be used.\n   */\n  bodySerializer?: BodySerializer | null;\n  /**\n   * An object containing any HTTP headers that you want to pre-populate your\n   * `Headers` object with.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/Headers/Headers#init See more}\n   */\n  headers?:\n    | RequestInit['headers']\n    | Record<\n        string,\n        string | number | boolean | (string | number | boolean)[] | null | undefined | unknown\n      >;\n  /**\n   * The request method.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/fetch#method See more}\n   */\n  method?: Uppercase<HttpMethod>;\n  /**\n   * A function for serializing request query parameters. By default, arrays\n   * will be exploded in form style, objects will be exploded in deepObject\n   * style, and reserved characters are percent-encoded.\n   *\n   * This method will have no effect if the native `paramsSerializer()` Axios\n   * API function is used.\n   *\n   * {@link https://swagger.io/docs/specification/serialization/#query View examples}\n   */\n  querySerializer?: QuerySerializer | QuerySerializerOptions;\n  /**\n   * A function validating request data. This is useful if you want to ensure\n   * the request conforms to the desired shape, so it can be safely sent to\n   * the server.\n   */\n  requestValidator?: (data: unknown) => Promise<unknown>;\n  /**\n   * A function transforming response data before it's returned. This is useful\n   * for post-processing data, e.g. converting ISO strings into Date objects.\n   */\n  responseTransformer?: (data: unknown) => Promise<unknown>;\n  /**\n   * A function validating response data. This is useful if you want to ensure\n   * the response conforms to the desired shape, so it can be safely passed to\n   * the transformers and returned to the user.\n   */\n  responseValidator?: (data: unknown) => Promise<unknown>;\n}\n\ntype IsExactlyNeverOrNeverUndefined<T> = [T] extends [never]\n  ? true\n  : [T] extends [never | undefined]\n    ? [undefined] extends [T]\n      ? false\n      : true\n    : false;\n\nexport type OmitNever<T extends Record<string, unknown>> = {\n  [K in keyof T as IsExactlyNeverOrNeverUndefined<T[K]> extends true ? never : K]: T[K];\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-ky/base-url-strict/core/utils.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-ky/base-url-strict/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type { _3eNum1Период, _400, AdditionalPropertiesIntegerIssue, AdditionalPropertiesUnknownIssue, AdditionalPropertiesUnknownIssue2, AdditionalPropertiesUnknownIssue3, AdditionalPropertiesUnknownIssueWritable, AnyOfAnyAndNull, AnyOfArrays, ApiVVersionODataControllerCountData, ApiVVersionODataControllerCountResponse, ApiVVersionODataControllerCountResponses, ArrayWithAnyOfProperties, ArrayWithArray, ArrayWithBooleans, ArrayWithNumbers, ArrayWithProperties, ArrayWithReferences, ArrayWithStrings, CallToTestOrderOfParamsData, CallWithDefaultOptionalParametersData, CallWithDefaultParametersData, CallWithDescriptionsData, CallWithDuplicateResponsesData, CallWithDuplicateResponsesError, CallWithDuplicateResponsesErrors, CallWithDuplicateResponsesResponse, CallWithDuplicateResponsesResponses, CallWithNoContentResponseData, CallWithNoContentResponseResponse, CallWithNoContentResponseResponses, CallWithParametersData, CallWithResponseAndNoContentResponseData, CallWithResponseAndNoContentResponseResponse, CallWithResponseAndNoContentResponseResponses, CallWithResponseData, CallWithResponseResponse, CallWithResponseResponses, CallWithResponsesData, CallWithResponsesError, CallWithResponsesErrors, CallWithResponsesResponse, CallWithResponsesResponses, CallWithResultFromHeaderData, CallWithResultFromHeaderErrors, CallWithResultFromHeaderResponses, CallWithWeirdParameterNamesData, CamelCaseCommentWithBreaks, CharactersInDescription, ClientOptions, CollectionFormatData, CommentWithBackticks, CommentWithBackticksAndQuotes, CommentWithBreaks, CommentWithExpressionPlaceholders, CommentWithQuotes, CommentWithReservedCharacters, CommentWithSlashes, ComplexParamsData, ComplexParamsResponse, ComplexParamsResponses, ComplexTypesData, ComplexTypesErrors, ComplexTypesResponse, ComplexTypesResponses, CompositionBaseModel, CompositionExtendedModel, CompositionWithAllOfAndNullable, CompositionWithAnyOf, CompositionWithAnyOfAndNullable, CompositionWithAnyOfAnonymous, CompositionWithNestedAnyAndTypeNull, CompositionWithNestedAnyOfAndNull, CompositionWithOneOf, CompositionWithOneOfAndComplexArrayDictionary, CompositionWithOneOfAndNullable, CompositionWithOneOfAndProperties, CompositionWithOneOfAndSimpleArrayDictionary, CompositionWithOneOfAndSimpleDictionary, CompositionWithOneOfAnonymous, CompositionWithOneOfDiscriminator, ConstValue, Default, DeleteCallWithoutParametersAndResponseData, DeleteFooData, DeleteFooData2, DeleteFooData3, DeprecatedCallData, DeprecatedModel, DictionaryWithArray, DictionaryWithDictionary, DictionaryWithProperties, DictionaryWithPropertiesAndAdditionalProperties, DictionaryWithReference, DictionaryWithString, DummyAData, DummyAResponse, DummyAResponses, DummyBData, DummyBResponse, DummyBResponses, DuplicateName2Data, DuplicateName3Data, DuplicateName4Data, DuplicateNameData, EnumFromDescription, EnumWithExtensions, EnumWithNumbers, EnumWithReplacedCharacters, EnumWithStrings, EnumWithXEnumNames, ExportData, ExternalRefA, ExternalRefB, ExternalSharedModel, File, FileResponseData, FileResponseResponse, FileResponseResponses, FileWritable, FooWowData, FooWowResponses, FreeFormObjectWithAdditionalPropertiesEqEmptyObject, FreeFormObjectWithAdditionalPropertiesEqTrue, FreeFormObjectWithoutAdditionalProperties, GenericSchemaDuplicateIssue1SystemBoolean, GenericSchemaDuplicateIssue1SystemBooleanWritable, GenericSchemaDuplicateIssue1SystemString, GenericSchemaDuplicateIssue1SystemStringWritable, GetApiVbyApiVersionSimpleOperationData, GetApiVbyApiVersionSimpleOperationError, GetApiVbyApiVersionSimpleOperationErrors, GetApiVbyApiVersionSimpleOperationResponse, GetApiVbyApiVersionSimpleOperationResponses, GetCallWithOptionalParamData, GetCallWithoutParametersAndResponseData, HeadCallWithoutParametersAndResponseData, Import, ImportData, ImportResponse, ImportResponses, IoK8sApimachineryPkgApisMetaV1DeleteOptions, IoK8sApimachineryPkgApisMetaV1Preconditions, ModelCircle, ModelFromZendesk, ModelSquare, ModelThatExtends, ModelThatExtendsExtends, ModelWithAdditionalPropertiesEqTrue, ModelWithAdditionalPropertiesRef, ModelWithAnyOfConstantSizeArray, ModelWithAnyOfConstantSizeArrayAndIntersect, ModelWithAnyOfConstantSizeArrayNullable, ModelWithAnyOfConstantSizeArrayWithNSizeAndOptions, ModelWithAnyOfConstantSizeArrayWithNSizeAndOptionsWritable, ModelWithArray, ModelWithArrayReadOnlyAndWriteOnly, ModelWithArrayReadOnlyAndWriteOnlyWritable, ModelWithBackticksInDescription, ModelWithBoolean, ModelWithCircularReference, ModelWithConst, ModelWithConstantSizeArray, ModelWithDictionary, ModelWithDuplicateImports, ModelWithDuplicateProperties, ModelWithEnum, ModelWithEnumFromDescription, ModelWithEnumWithHyphen, ModelWithInteger, ModelWithNestedArrayEnums, ModelWithNestedArrayEnumsData, ModelWithNestedArrayEnumsDataBar, ModelWithNestedArrayEnumsDataFoo, ModelWithNestedCompositionEnums, ModelWithNestedEnums, ModelWithNestedProperties, ModelWithNullableObject, ModelWithNullableString, ModelWithNumericEnumUnion, ModelWithOneOfAndProperties, ModelWithOneOfEnum, ModelWithOrderedProperties, ModelWithPattern, ModelWithPatternWritable, ModelWithPrefixItemsConstantSizeArray, ModelWithProperties, ModelWithPropertiesWritable, ModelWithReadOnlyAndWriteOnly, ModelWithReadOnlyAndWriteOnlyWritable, ModelWithReference, ModelWithReferenceWritable, ModelWithString, ModelWithStringError, MultipartRequestData, MultipartResponseData, MultipartResponseResponse, MultipartResponseResponses, NestedAnyOfArraysNullable, NonAsciiæøåÆøÅöôêÊ字符串Data, NonAsciiæøåÆøÅöôêÊ字符串Response, NonAsciiæøåÆøÅöôêÊ字符串Responses, NonAsciiStringæøåÆøÅöôêÊ字符串, NullableObject, OneOfAllOfIssue, OneOfAllOfIssueWritable, OptionsCallWithoutParametersAndResponseData, Pageable, ParameterSimpleParameterUnused, PatchApiVbyApiVersionNoTagData, PatchApiVbyApiVersionNoTagResponses, PatchCallWithoutParametersAndResponseData, PostApiVbyApiVersionFormDataData, PostApiVbyApiVersionRequestBodyData, PostCallWithOptionalParamData, PostCallWithOptionalParamResponse, PostCallWithOptionalParamResponses, PostCallWithoutParametersAndResponseData, PostServiceWithEmptyTagResponse, PostServiceWithEmptyTagResponse2, PutCallWithoutParametersAndResponseData, PutWithFormUrlEncodedData, SchemaWithFormRestrictedKeys, SimpleBoolean, SimpleFile, SimpleFormData, SimpleInteger, SimpleParameter, SimpleReference, SimpleRequestBody, SimpleString, SimpleStringWithPattern, TestErrorCodeData, TestErrorCodeErrors, TestErrorCodeResponses, TypesData, TypesResponse, TypesResponses, UploadFileData, UploadFileResponse, UploadFileResponses, XFooBar } from './types.gen';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-ky/base-url-strict/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type ClientOptions = {\n    baseUrl: 'http://localhost:3000/base';\n};\n\n/**\n * Model with number-only name\n */\nexport type _400 = string;\n\n/**\n * External ref to shared model (A)\n */\nexport type ExternalRefA = ExternalSharedModel;\n\n/**\n * External ref to shared model (B)\n */\nexport type ExternalRefB = ExternalSharedModel;\n\n/**\n * Testing multiline comments in string: First line\n * Second line\n *\n * Fourth line\n */\nexport type CamelCaseCommentWithBreaks = number;\n\n/**\n * Testing multiline comments in string: First line\n * Second line\n *\n * Fourth line\n */\nexport type CommentWithBreaks = number;\n\n/**\n * Testing backticks in string: `backticks` and ```multiple backticks``` should work\n */\nexport type CommentWithBackticks = number;\n\n/**\n * Testing backticks and quotes in string: `backticks`, 'quotes', \"double quotes\" and ```multiple backticks``` should work\n */\nexport type CommentWithBackticksAndQuotes = number;\n\n/**\n * Testing slashes in string: \\backwards\\\\\\ and /forwards/// should work\n */\nexport type CommentWithSlashes = number;\n\n/**\n * Testing expression placeholders in string: ${expression} should work\n */\nexport type CommentWithExpressionPlaceholders = number;\n\n/**\n * Testing quotes in string: 'single quote''' and \"double quotes\"\"\" should work\n */\nexport type CommentWithQuotes = number;\n\n/**\n * Testing reserved characters in string: * inline * and ** inline ** should work\n */\nexport type CommentWithReservedCharacters = number;\n\n/**\n * This is a simple number\n */\nexport type SimpleInteger = number;\n\n/**\n * This is a simple boolean\n */\nexport type SimpleBoolean = boolean;\n\n/**\n * This is a simple string\n */\nexport type SimpleString = string;\n\n/**\n * A string with non-ascii (unicode) characters valid in typescript identifiers (æøåÆØÅöÔèÈ字符串)\n */\nexport type NonAsciiStringæøåÆøÅöôêÊ字符串 = string;\n\n/**\n * This is a simple file\n */\nexport type SimpleFile = Blob | File;\n\n/**\n * This is a simple reference\n */\nexport type SimpleReference = ModelWithString;\n\n/**\n * This is a simple string\n */\nexport type SimpleStringWithPattern = string | null;\n\n/**\n * This is a simple enum with strings\n */\nexport type EnumWithStrings = 'Success' | 'Warning' | 'Error' | '\\'Single Quote\\'' | '\"Double Quotes\"' | 'Non-ascii: øæåôöØÆÅÔÖ字符串';\n\nexport type EnumWithReplacedCharacters = '\\'Single Quote\\'' | '\"Double Quotes\"' | 'øæåôöØÆÅÔÖ字符串' | 3.1 | '';\n\n/**\n * This is a simple enum with numbers\n */\nexport type EnumWithNumbers = 1 | 2 | 3 | 1.1 | 1.2 | 1.3 | 100 | 200 | 300 | -100 | -200 | -300 | -1.1 | -1.2 | -1.3;\n\n/**\n * Success=1,Warning=2,Error=3\n */\nexport type EnumFromDescription = number;\n\n/**\n * This is a simple enum with numbers\n */\nexport type EnumWithExtensions = 200 | 400 | 500;\n\nexport type EnumWithXEnumNames = 0 | 1 | 2;\n\n/**\n * This is a simple array with numbers\n */\nexport type ArrayWithNumbers = Array<number>;\n\n/**\n * This is a simple array with booleans\n */\nexport type ArrayWithBooleans = Array<boolean>;\n\n/**\n * This is a simple array with strings\n */\nexport type ArrayWithStrings = Array<string>;\n\n/**\n * This is a simple array with references\n */\nexport type ArrayWithReferences = Array<ModelWithString>;\n\n/**\n * This is a simple array containing an array\n */\nexport type ArrayWithArray = Array<Array<ModelWithString>>;\n\n/**\n * This is a simple array with properties\n */\nexport type ArrayWithProperties = Array<{\n    '16x16'?: CamelCaseCommentWithBreaks;\n    bar?: string;\n}>;\n\n/**\n * This is a simple array with any of properties\n */\nexport type ArrayWithAnyOfProperties = Array<{\n    foo?: string;\n} | {\n    bar?: string;\n}>;\n\nexport type AnyOfAnyAndNull = {\n    data?: unknown | null;\n};\n\n/**\n * This is a simple array with any of properties\n */\nexport type AnyOfArrays = {\n    results?: Array<{\n        foo?: string;\n    } | {\n        bar?: string;\n    }>;\n};\n\n/**\n * This is a string dictionary\n */\nexport type DictionaryWithString = {\n    [key: string]: string;\n};\n\nexport type DictionaryWithPropertiesAndAdditionalProperties = {\n    foo?: number;\n    bar?: boolean;\n    [key: string]: string | number | boolean | undefined;\n};\n\n/**\n * This is a string reference\n */\nexport type DictionaryWithReference = {\n    [key: string]: ModelWithString;\n};\n\n/**\n * This is a complex dictionary\n */\nexport type DictionaryWithArray = {\n    [key: string]: Array<ModelWithString>;\n};\n\n/**\n * This is a string dictionary\n */\nexport type DictionaryWithDictionary = {\n    [key: string]: {\n        [key: string]: string;\n    };\n};\n\n/**\n * This is a complex dictionary\n */\nexport type DictionaryWithProperties = {\n    [key: string]: {\n        foo?: string;\n        bar?: string;\n    };\n};\n\n/**\n * This is a model with one number property\n */\nexport type ModelWithInteger = {\n    /**\n     * This is a simple number property\n     */\n    prop?: number;\n};\n\n/**\n * This is a model with one boolean property\n */\nexport type ModelWithBoolean = {\n    /**\n     * This is a simple boolean property\n     */\n    prop?: boolean;\n};\n\n/**\n * This is a model with one string property\n */\nexport type ModelWithString = {\n    /**\n     * This is a simple string property\n     */\n    prop?: string;\n};\n\n/**\n * This is a model with one string property\n */\nexport type ModelWithStringError = {\n    /**\n     * This is a simple string property\n     */\n    prop?: string;\n};\n\n/**\n * `Comment` or `VoiceComment`. The JSON object for adding voice comments to tickets is different. See [Adding voice comments to tickets](/documentation/ticketing/managing-tickets/adding-voice-comments-to-tickets)\n */\nexport type ModelFromZendesk = string;\n\n/**\n * This is a model with one string property\n */\nexport type ModelWithNullableString = {\n    /**\n     * This is a simple string property\n     */\n    nullableProp1?: string | null;\n    /**\n     * This is a simple string property\n     */\n    nullableRequiredProp1: string | null;\n    /**\n     * This is a simple string property\n     */\n    nullableProp2?: string | null;\n    /**\n     * This is a simple string property\n     */\n    nullableRequiredProp2: string | null;\n    /**\n     * This is a simple enum with strings\n     */\n    'foo_bar-enum'?: 'Success' | 'Warning' | 'Error' | 'ØÆÅ字符串';\n};\n\n/**\n * This is a model with one enum\n */\nexport type ModelWithEnum = {\n    /**\n     * This is a simple enum with strings\n     */\n    'foo_bar-enum'?: 'Success' | 'Warning' | 'Error' | 'ØÆÅ字符串';\n    /**\n     * These are the HTTP error code enums\n     */\n    statusCode?: '100' | '200 FOO' | '300 FOO_BAR' | '400 foo-bar' | '500 foo.bar' | '600 foo&bar';\n    /**\n     * Simple boolean enum\n     */\n    bool?: true;\n};\n\n/**\n * This is a model with one enum with escaped name\n */\nexport type ModelWithEnumWithHyphen = {\n    /**\n     * Foo-Bar-Baz-Qux\n     */\n    'foo-bar-baz-qux'?: '3.0';\n};\n\n/**\n * This is a model with one enum\n */\nexport type ModelWithEnumFromDescription = {\n    /**\n     * Success=1,Warning=2,Error=3\n     */\n    test?: number;\n};\n\n/**\n * This is a model with nested enums\n */\nexport type ModelWithNestedEnums = {\n    dictionaryWithEnum?: {\n        [key: string]: 'Success' | 'Warning' | 'Error';\n    };\n    dictionaryWithEnumFromDescription?: {\n        [key: string]: number;\n    };\n    arrayWithEnum?: Array<'Success' | 'Warning' | 'Error'>;\n    arrayWithDescription?: Array<number>;\n    /**\n     * This is a simple enum with strings\n     */\n    'foo_bar-enum'?: 'Success' | 'Warning' | 'Error' | 'ØÆÅ字符串';\n};\n\n/**\n * This is a model with one property containing a reference\n */\nexport type ModelWithReference = {\n    prop?: ModelWithProperties;\n};\n\n/**\n * This is a model with one property containing an array\n */\nexport type ModelWithArrayReadOnlyAndWriteOnly = {\n    prop?: Array<ModelWithReadOnlyAndWriteOnly>;\n    propWithFile?: Array<Blob | File>;\n    propWithNumber?: Array<number>;\n};\n\n/**\n * This is a model with one property containing an array\n */\nexport type ModelWithArray = {\n    prop?: Array<ModelWithString>;\n    propWithFile?: Array<Blob | File>;\n    propWithNumber?: Array<number>;\n};\n\n/**\n * This is a model with one property containing a dictionary\n */\nexport type ModelWithDictionary = {\n    prop?: {\n        [key: string]: string;\n    };\n};\n\n/**\n * This is a deprecated model with a deprecated property\n *\n * @deprecated\n */\nexport type DeprecatedModel = {\n    /**\n     * This is a deprecated property\n     *\n     * @deprecated\n     */\n    prop?: string;\n};\n\n/**\n * This is a model with one property containing a circular reference\n */\nexport type ModelWithCircularReference = {\n    prop?: ModelWithCircularReference;\n};\n\n/**\n * This is a model with one property with a 'one of' relationship\n */\nexport type CompositionWithOneOf = {\n    propA?: ModelWithString | ModelWithEnum | ModelWithArray | ModelWithDictionary;\n};\n\n/**\n * This is a model with one property with a 'one of' relationship where the options are not $ref\n */\nexport type CompositionWithOneOfAnonymous = {\n    propA?: {\n        propA?: string;\n    } | string | number;\n};\n\n/**\n * Circle\n */\nexport type ModelCircle = {\n    kind: string;\n    radius?: number;\n};\n\n/**\n * Square\n */\nexport type ModelSquare = {\n    kind: string;\n    sideLength?: number;\n};\n\n/**\n * This is a model with one property with a 'one of' relationship where the options are not $ref\n */\nexport type CompositionWithOneOfDiscriminator = ({\n    kind: 'circle';\n} & ModelCircle) | ({\n    kind: 'square';\n} & ModelSquare);\n\n/**\n * This is a model with one property with a 'any of' relationship\n */\nexport type CompositionWithAnyOf = {\n    propA?: ModelWithString | ModelWithEnum | ModelWithArray | ModelWithDictionary;\n};\n\n/**\n * This is a model with one property with a 'any of' relationship where the options are not $ref\n */\nexport type CompositionWithAnyOfAnonymous = {\n    propA?: {\n        propA?: string;\n    } | string | number;\n};\n\n/**\n * This is a model with nested 'any of' property with a type null\n */\nexport type CompositionWithNestedAnyAndTypeNull = {\n    propA?: Array<ModelWithDictionary | null> | Array<ModelWithArray | null>;\n};\n\nexport type _3eNum1Период = 'Bird' | 'Dog';\n\nexport type ConstValue = 'ConstValue';\n\n/**\n * This is a model with one property with a 'any of' relationship where the options are not $ref\n */\nexport type CompositionWithNestedAnyOfAndNull = {\n    /**\n     * Scopes\n     */\n    propA?: Array<_3eNum1Период | ConstValue> | null;\n};\n\n/**\n * This is a model with one property with a 'one of' relationship\n */\nexport type CompositionWithOneOfAndNullable = {\n    propA?: {\n        boolean?: boolean;\n    } | ModelWithEnum | ModelWithArray | ModelWithDictionary | null;\n};\n\n/**\n * This is a model that contains a simple dictionary within composition\n */\nexport type CompositionWithOneOfAndSimpleDictionary = {\n    propA?: boolean | {\n        [key: string]: number;\n    };\n};\n\n/**\n * This is a model that contains a dictionary of simple arrays within composition\n */\nexport type CompositionWithOneOfAndSimpleArrayDictionary = {\n    propA?: boolean | {\n        [key: string]: Array<boolean>;\n    };\n};\n\n/**\n * This is a model that contains a dictionary of complex arrays (composited) within composition\n */\nexport type CompositionWithOneOfAndComplexArrayDictionary = {\n    propA?: boolean | {\n        [key: string]: Array<number | string>;\n    };\n};\n\n/**\n * This is a model with one property with a 'all of' relationship\n */\nexport type CompositionWithAllOfAndNullable = {\n    propA?: ({\n        boolean?: boolean;\n    } & ModelWithEnum & ModelWithArray & ModelWithDictionary) | null;\n};\n\n/**\n * This is a model with one property with a 'any of' relationship\n */\nexport type CompositionWithAnyOfAndNullable = {\n    propA?: {\n        boolean?: boolean;\n    } | ModelWithEnum | ModelWithArray | ModelWithDictionary | null;\n};\n\n/**\n * This is a base model with two simple optional properties\n */\nexport type CompositionBaseModel = {\n    firstName?: string;\n    lastname?: string;\n};\n\n/**\n * This is a model that extends the base model\n */\nexport type CompositionExtendedModel = CompositionBaseModel & {\n    age: number;\n    firstName: string;\n    lastname: string;\n};\n\n/**\n * This is a model with one nested property\n */\nexport type ModelWithProperties = {\n    required: string;\n    readonly requiredAndReadOnly: string;\n    requiredAndNullable: string | null;\n    string?: string;\n    number?: number;\n    boolean?: boolean;\n    reference?: ModelWithString;\n    'property with space'?: string;\n    default?: string;\n    try?: string;\n    readonly '@namespace.string'?: string;\n    readonly '@namespace.integer'?: number;\n};\n\n/**\n * This is a model with one nested property\n */\nexport type ModelWithNestedProperties = {\n    readonly first: {\n        readonly second: {\n            readonly third: string | null;\n        } | null;\n    } | null;\n};\n\n/**\n * This is a model with duplicated properties\n */\nexport type ModelWithDuplicateProperties = {\n    prop?: ModelWithString;\n};\n\n/**\n * This is a model with ordered properties\n */\nexport type ModelWithOrderedProperties = {\n    zebra?: string;\n    apple?: string;\n    hawaii?: string;\n};\n\n/**\n * This is a model with duplicated imports\n */\nexport type ModelWithDuplicateImports = {\n    propA?: ModelWithString;\n    propB?: ModelWithString;\n    propC?: ModelWithString;\n};\n\n/**\n * This is a model that extends another model\n */\nexport type ModelThatExtends = ModelWithString & {\n    propExtendsA?: string;\n    propExtendsB?: ModelWithString;\n};\n\n/**\n * This is a model that extends another model\n */\nexport type ModelThatExtendsExtends = ModelWithString & ModelThatExtends & {\n    propExtendsC?: string;\n    propExtendsD?: ModelWithString;\n};\n\n/**\n * This is a model that contains a some patterns\n */\nexport type ModelWithPattern = {\n    key: string;\n    name: string;\n    readonly enabled?: boolean;\n    readonly modified?: string;\n    id?: string;\n    text?: string;\n    patternWithSingleQuotes?: string;\n    patternWithNewline?: string;\n    patternWithBacktick?: string;\n    patternWithUnicode?: string;\n};\n\nexport type File = {\n    /**\n     * Id\n     */\n    readonly id?: string;\n    /**\n     * Updated at\n     */\n    readonly updated_at?: string;\n    /**\n     * Created at\n     */\n    readonly created_at?: string;\n    /**\n     * Mime\n     */\n    mime: string;\n    /**\n     * File\n     */\n    readonly file?: string;\n};\n\nexport type Default = {\n    name?: string;\n};\n\nexport type Pageable = {\n    page?: number;\n    size?: number;\n    sort?: Array<string>;\n};\n\n/**\n * This is a free-form object without additionalProperties.\n */\nexport type FreeFormObjectWithoutAdditionalProperties = {\n    [key: string]: unknown;\n};\n\n/**\n * This is a free-form object with additionalProperties: true.\n */\nexport type FreeFormObjectWithAdditionalPropertiesEqTrue = {\n    [key: string]: unknown;\n};\n\n/**\n * This is a free-form object with additionalProperties: {}.\n */\nexport type FreeFormObjectWithAdditionalPropertiesEqEmptyObject = {\n    [key: string]: unknown;\n};\n\nexport type ModelWithConst = {\n    String?: 'String';\n    number?: 0;\n    null?: null;\n    withType?: 'Some string';\n};\n\n/**\n * This is a model with one property and additionalProperties: true\n */\nexport type ModelWithAdditionalPropertiesEqTrue = {\n    /**\n     * This is a simple string property\n     */\n    prop?: string;\n    [key: string]: unknown;\n};\n\nexport type NestedAnyOfArraysNullable = {\n    nullableArray?: Array<string | boolean> | null;\n};\n\nexport type CompositionWithOneOfAndProperties = ({\n    foo: SimpleParameter;\n} | {\n    bar: NonAsciiStringæøåÆøÅöôêÊ字符串;\n}) & {\n    baz: number | null;\n    qux: number;\n};\n\n/**\n * An object that can be null\n */\nexport type NullableObject = {\n    foo?: string;\n} | null;\n\n/**\n * Some % character\n */\nexport type CharactersInDescription = string;\n\nexport type ModelWithNullableObject = {\n    data?: NullableObject;\n};\n\n/**\n * An object with additional properties that can be null (anyOf ref + null)\n */\nexport type ModelWithAdditionalPropertiesRef = {\n    [key: string]: NullableObject | null;\n};\n\nexport type ModelWithOneOfEnum = {\n    foo: 'Bar';\n} | {\n    foo: 'Baz';\n} | {\n    foo: 'Qux';\n} | {\n    content: string;\n    foo: 'Quux';\n} | {\n    content: [\n        string,\n        string\n    ];\n    foo: 'Corge';\n};\n\nexport type ModelWithNestedArrayEnumsDataFoo = 'foo' | 'bar';\n\nexport type ModelWithNestedArrayEnumsDataBar = 'baz' | 'qux';\n\nexport type ModelWithNestedArrayEnumsData = {\n    foo?: Array<ModelWithNestedArrayEnumsDataFoo>;\n    bar?: Array<ModelWithNestedArrayEnumsDataBar>;\n};\n\nexport type ModelWithNestedArrayEnums = {\n    array_strings?: Array<string>;\n    data?: ModelWithNestedArrayEnumsData;\n};\n\nexport type ModelWithNestedCompositionEnums = {\n    foo?: ModelWithNestedArrayEnumsDataFoo;\n};\n\nexport type ModelWithReadOnlyAndWriteOnly = {\n    foo: string;\n    readonly bar: string;\n};\n\nexport type ModelWithConstantSizeArray = [\n    number,\n    number\n];\n\nexport type ModelWithAnyOfConstantSizeArray = [\n    number | string,\n    number | string,\n    number | string\n];\n\nexport type ModelWithPrefixItemsConstantSizeArray = [\n    ModelWithInteger,\n    number | string,\n    string\n];\n\nexport type ModelWithAnyOfConstantSizeArrayNullable = [\n    number | null | string,\n    number | null | string,\n    number | null | string\n];\n\nexport type ModelWithAnyOfConstantSizeArrayWithNSizeAndOptions = [\n    number | Import,\n    number | Import\n];\n\nexport type ModelWithAnyOfConstantSizeArrayAndIntersect = [\n    number & string,\n    number & string\n];\n\nexport type ModelWithNumericEnumUnion = {\n    /**\n     * Период\n     */\n    value?: -10 | -1 | 0 | 1 | 3 | 6 | 12;\n};\n\n/**\n * Some description with `back ticks`\n */\nexport type ModelWithBackticksInDescription = {\n    /**\n     * The template `that` should be used for parsing and importing the contents of the CSV file.\n     *\n     * <br/><p>There is one placeholder currently supported:<ul>     <li><b>${x}</b> - refers to the n-th column in the CSV file, e.g. ${1}, ${2}, ...)</li></ul><p>Example of a correct JSON template:</p>\n     * <pre>\n     * [\n     * {\n     * \"resourceType\": \"Asset\",\n     * \"identifier\": {\n     * \"name\": \"${1}\",\n     * \"domain\": {\n     * \"name\": \"${2}\",\n     * \"community\": {\n     * \"name\": \"Some Community\"\n     * }\n     * }\n     * },\n     * \"attributes\" : {\n     * \"00000000-0000-0000-0000-000000003115\" : [ {\n     * \"value\" : \"${3}\"\n     * } ],\n     * \"00000000-0000-0000-0000-000000000222\" : [ {\n     * \"value\" : \"${4}\"\n     * } ]\n     * }\n     * }\n     * ]\n     * </pre>\n     */\n    template?: string;\n};\n\nexport type ModelWithOneOfAndProperties = (SimpleParameter | NonAsciiStringæøåÆøÅöôêÊ字符串) & {\n    baz: number | null;\n    qux: number;\n};\n\n/**\n * Model used to test deduplication strategy (unused)\n */\nexport type ParameterSimpleParameterUnused = string;\n\n/**\n * Model used to test deduplication strategy\n */\nexport type PostServiceWithEmptyTagResponse = string;\n\n/**\n * Model used to test deduplication strategy\n */\nexport type PostServiceWithEmptyTagResponse2 = string;\n\n/**\n * Model used to test deduplication strategy\n */\nexport type DeleteFooData = string;\n\n/**\n * Model used to test deduplication strategy\n */\nexport type DeleteFooData2 = string;\n\n/**\n * Model with restricted keyword name\n */\nexport type Import = string;\n\nexport type SchemaWithFormRestrictedKeys = {\n    description?: string;\n    'x-enum-descriptions'?: string;\n    'x-enum-varnames'?: string;\n    'x-enumNames'?: string;\n    title?: string;\n    object?: {\n        description?: string;\n        'x-enum-descriptions'?: string;\n        'x-enum-varnames'?: string;\n        'x-enumNames'?: string;\n        title?: string;\n    };\n    array?: Array<{\n        description?: string;\n        'x-enum-descriptions'?: string;\n        'x-enum-varnames'?: string;\n        'x-enumNames'?: string;\n        title?: string;\n    }>;\n};\n\n/**\n * This schema was giving PascalCase transformations a hard time\n */\nexport type IoK8sApimachineryPkgApisMetaV1DeleteOptions = {\n    /**\n     * Must be fulfilled before a deletion is carried out. If not possible, a 409 Conflict status will be returned.\n     */\n    preconditions?: IoK8sApimachineryPkgApisMetaV1Preconditions;\n};\n\n/**\n * This schema was giving PascalCase transformations a hard time\n */\nexport type IoK8sApimachineryPkgApisMetaV1Preconditions = {\n    /**\n     * Specifies the target ResourceVersion\n     */\n    resourceVersion?: string;\n    /**\n     * Specifies the target UID.\n     */\n    uid?: string;\n};\n\nexport type AdditionalPropertiesUnknownIssue = {\n    [key: string]: string | number;\n};\n\nexport type AdditionalPropertiesUnknownIssue2 = {\n    [key: string]: string | number;\n};\n\nexport type AdditionalPropertiesUnknownIssue3 = string & {\n    entries: {\n        [key: string]: AdditionalPropertiesUnknownIssue;\n    };\n};\n\nexport type AdditionalPropertiesIntegerIssue = {\n    value: number;\n    [key: string]: number;\n};\n\nexport type OneOfAllOfIssue = ((ConstValue | GenericSchemaDuplicateIssue1SystemBoolean) & _3eNum1Период) | GenericSchemaDuplicateIssue1SystemString;\n\nexport type GenericSchemaDuplicateIssue1SystemBoolean = {\n    item?: boolean;\n    error?: string | null;\n    readonly hasError?: boolean;\n    data?: {\n        [key: string]: never;\n    };\n};\n\nexport type GenericSchemaDuplicateIssue1SystemString = {\n    item?: string | null;\n    error?: string | null;\n    readonly hasError?: boolean;\n};\n\nexport type ExternalSharedModel = {\n    id: string;\n    name?: string;\n};\n\n/**\n * This is a model with one property containing a reference\n */\nexport type ModelWithReferenceWritable = {\n    prop?: ModelWithPropertiesWritable;\n};\n\n/**\n * This is a model with one property containing an array\n */\nexport type ModelWithArrayReadOnlyAndWriteOnlyWritable = {\n    prop?: Array<ModelWithReadOnlyAndWriteOnlyWritable>;\n    propWithFile?: Array<Blob | File>;\n    propWithNumber?: Array<number>;\n};\n\n/**\n * This is a model with one nested property\n */\nexport type ModelWithPropertiesWritable = {\n    required: string;\n    requiredAndNullable: string | null;\n    string?: string;\n    number?: number;\n    boolean?: boolean;\n    reference?: ModelWithString;\n    'property with space'?: string;\n    default?: string;\n    try?: string;\n};\n\n/**\n * This is a model that contains a some patterns\n */\nexport type ModelWithPatternWritable = {\n    key: string;\n    name: string;\n    id?: string;\n    text?: string;\n    patternWithSingleQuotes?: string;\n    patternWithNewline?: string;\n    patternWithBacktick?: string;\n    patternWithUnicode?: string;\n};\n\nexport type FileWritable = {\n    /**\n     * Mime\n     */\n    mime: string;\n};\n\nexport type ModelWithReadOnlyAndWriteOnlyWritable = {\n    foo: string;\n    baz: string;\n};\n\nexport type ModelWithAnyOfConstantSizeArrayWithNSizeAndOptionsWritable = [\n    number | Import,\n    number | Import\n];\n\nexport type AdditionalPropertiesUnknownIssueWritable = {\n    [key: string]: string | number;\n};\n\nexport type OneOfAllOfIssueWritable = ((ConstValue | GenericSchemaDuplicateIssue1SystemBoolean) & _3eNum1Период) | GenericSchemaDuplicateIssue1SystemString;\n\nexport type GenericSchemaDuplicateIssue1SystemBooleanWritable = {\n    item?: boolean;\n    error?: string | null;\n    data?: {\n        [key: string]: never;\n    };\n};\n\nexport type GenericSchemaDuplicateIssue1SystemStringWritable = {\n    item?: string | null;\n    error?: string | null;\n};\n\n/**\n * This is a reusable parameter\n */\nexport type SimpleParameter = string;\n\n/**\n * Parameter with illegal characters\n */\nexport type XFooBar = ModelWithString;\n\n/**\n * A reusable request body\n */\nexport type SimpleRequestBody = ModelWithString;\n\n/**\n * A reusable request body\n */\nexport type SimpleFormData = ModelWithString;\n\nexport type ExportData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no+tag';\n};\n\nexport type PatchApiVbyApiVersionNoTagData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no+tag';\n};\n\nexport type PatchApiVbyApiVersionNoTagResponses = {\n    /**\n     * OK\n     */\n    default: unknown;\n};\n\nexport type ImportData = {\n    body: ModelWithReadOnlyAndWriteOnlyWritable | ModelWithArrayReadOnlyAndWriteOnlyWritable;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no+tag';\n};\n\nexport type ImportResponses = {\n    /**\n     * Success\n     */\n    200: ModelFromZendesk;\n    /**\n     * Default success response\n     */\n    default: ModelWithReadOnlyAndWriteOnly;\n};\n\nexport type ImportResponse = ImportResponses[keyof ImportResponses];\n\nexport type FooWowData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no+tag';\n};\n\nexport type FooWowResponses = {\n    /**\n     * OK\n     */\n    default: unknown;\n};\n\nexport type ApiVVersionODataControllerCountData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple/$count';\n};\n\nexport type ApiVVersionODataControllerCountResponses = {\n    /**\n     * Success\n     */\n    200: ModelFromZendesk;\n};\n\nexport type ApiVVersionODataControllerCountResponse = ApiVVersionODataControllerCountResponses[keyof ApiVVersionODataControllerCountResponses];\n\nexport type GetApiVbyApiVersionSimpleOperationData = {\n    body?: never;\n    path: {\n        /**\n         * foo in method\n         */\n        foo_param: string;\n    };\n    query?: never;\n    url: '/api/v{api-version}/simple:operation';\n};\n\nexport type GetApiVbyApiVersionSimpleOperationErrors = {\n    /**\n     * Default error response\n     */\n    default: ModelWithBoolean;\n};\n\nexport type GetApiVbyApiVersionSimpleOperationError = GetApiVbyApiVersionSimpleOperationErrors[keyof GetApiVbyApiVersionSimpleOperationErrors];\n\nexport type GetApiVbyApiVersionSimpleOperationResponses = {\n    /**\n     * Response is a simple number\n     */\n    200: number;\n};\n\nexport type GetApiVbyApiVersionSimpleOperationResponse = GetApiVbyApiVersionSimpleOperationResponses[keyof GetApiVbyApiVersionSimpleOperationResponses];\n\nexport type DeleteCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type GetCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type HeadCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type OptionsCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type PatchCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type PostCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type PutCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type DeleteFooData3 = {\n    body?: never;\n    headers: {\n        /**\n         * Parameter with illegal characters\n         */\n        'x-Foo-Bar': ModelWithString;\n    };\n    path: {\n        /**\n         * foo in method\n         */\n        foo_param: string;\n        /**\n         * bar in method\n         */\n        BarParam: string;\n    };\n    query?: never;\n    url: '/api/v{api-version}/foo/{foo_param}/bar/{BarParam}';\n};\n\nexport type CallWithDescriptionsData = {\n    body?: never;\n    path?: never;\n    query?: {\n        /**\n         * Testing multiline comments in string: First line\n         * Second line\n         *\n         * Fourth line\n         */\n        parameterWithBreaks?: string;\n        /**\n         * Testing backticks in string: `backticks` and ```multiple backticks``` should work\n         */\n        parameterWithBackticks?: string;\n        /**\n         * Testing slashes in string: \\backwards\\\\\\ and /forwards/// should work\n         */\n        parameterWithSlashes?: string;\n        /**\n         * Testing expression placeholders in string: ${expression} should work\n         */\n        parameterWithExpressionPlaceholders?: string;\n        /**\n         * Testing quotes in string: 'single quote''' and \"double quotes\"\"\" should work\n         */\n        parameterWithQuotes?: string;\n        /**\n         * Testing reserved characters in string: * inline * and ** inline ** should work\n         */\n        parameterWithReservedCharacters?: string;\n    };\n    url: '/api/v{api-version}/descriptions';\n};\n\nexport type DeprecatedCallData = {\n    body?: never;\n    headers: {\n        /**\n         * This parameter is deprecated\n         *\n         * @deprecated\n         */\n        parameter: DeprecatedModel | null;\n    };\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/parameters/deprecated';\n};\n\nexport type CallWithParametersData = {\n    /**\n     * This is the parameter that goes into the body\n     */\n    body: {\n        [key: string]: unknown;\n    } | null;\n    headers: {\n        /**\n         * This is the parameter that goes into the header\n         */\n        parameterHeader: string | null;\n    };\n    path: {\n        /**\n         * This is the parameter that goes into the path\n         */\n        parameterPath: string | null;\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string | null;\n    };\n    query: {\n        foo_ref_enum?: ModelWithNestedArrayEnumsDataFoo;\n        foo_all_of_enum: ModelWithNestedArrayEnumsDataFoo;\n        /**\n         * This is the parameter that goes into the query params\n         */\n        cursor: string | null;\n    };\n    url: '/api/v{api-version}/parameters/{parameterPath}';\n};\n\nexport type CallWithWeirdParameterNamesData = {\n    /**\n     * This is the parameter that goes into the body\n     */\n    body: ModelWithString | null;\n    headers: {\n        /**\n         * This is the parameter that goes into the request header\n         */\n        'parameter.header': string | null;\n    };\n    path: {\n        /**\n         * This is the parameter that goes into the path\n         */\n        'parameter.path.1'?: string;\n        /**\n         * This is the parameter that goes into the path\n         */\n        'parameter-path-2'?: string;\n        /**\n         * This is the parameter that goes into the path\n         */\n        'PARAMETER-PATH-3'?: string;\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string | null;\n    };\n    query: {\n        /**\n         * This is the parameter with a reserved keyword\n         */\n        default?: string;\n        /**\n         * This is the parameter that goes into the request query params\n         */\n        'parameter-query': string | null;\n    };\n    url: '/api/v{api-version}/parameters/{parameter.path.1}/{parameter-path-2}/{PARAMETER-PATH-3}';\n};\n\nexport type GetCallWithOptionalParamData = {\n    /**\n     * This is a required parameter\n     */\n    body: ModelWithOneOfEnum;\n    path?: never;\n    query?: {\n        /**\n         * This is an optional parameter\n         */\n        page?: number;\n    };\n    url: '/api/v{api-version}/parameters';\n};\n\nexport type PostCallWithOptionalParamData = {\n    /**\n     * This is an optional parameter\n     */\n    body?: {\n        offset?: number | null;\n    };\n    path?: never;\n    query: {\n        /**\n         * This is a required parameter\n         */\n        parameter: Pageable;\n    };\n    url: '/api/v{api-version}/parameters';\n};\n\nexport type PostCallWithOptionalParamResponses = {\n    /**\n     * Response is a simple number\n     */\n    200: number;\n    /**\n     * Success\n     */\n    204: void;\n};\n\nexport type PostCallWithOptionalParamResponse = PostCallWithOptionalParamResponses[keyof PostCallWithOptionalParamResponses];\n\nexport type PostApiVbyApiVersionRequestBodyData = {\n    /**\n     * A reusable request body\n     */\n    body?: SimpleRequestBody;\n    path?: never;\n    query?: {\n        /**\n         * This is a reusable parameter\n         */\n        parameter?: string;\n    };\n    url: '/api/v{api-version}/requestBody';\n};\n\nexport type PostApiVbyApiVersionFormDataData = {\n    /**\n     * A reusable request body\n     */\n    body?: SimpleFormData;\n    path?: never;\n    query?: {\n        /**\n         * This is a reusable parameter\n         */\n        parameter?: string;\n    };\n    url: '/api/v{api-version}/formData';\n};\n\nexport type CallWithDefaultParametersData = {\n    body?: never;\n    path?: never;\n    query?: {\n        /**\n         * This is a simple string with default value\n         */\n        parameterString?: string | null;\n        /**\n         * This is a simple number with default value\n         */\n        parameterNumber?: number | null;\n        /**\n         * This is a simple boolean with default value\n         */\n        parameterBoolean?: boolean | null;\n        /**\n         * This is a simple enum with default value\n         */\n        parameterEnum?: 'Success' | 'Warning' | 'Error';\n        /**\n         * This is a simple model with default value\n         */\n        parameterModel?: ModelWithString | null;\n    };\n    url: '/api/v{api-version}/defaults';\n};\n\nexport type CallWithDefaultOptionalParametersData = {\n    body?: never;\n    path?: never;\n    query?: {\n        /**\n         * This is a simple string that is optional with default value\n         */\n        parameterString?: string;\n        /**\n         * This is a simple number that is optional with default value\n         */\n        parameterNumber?: number;\n        /**\n         * This is a simple boolean that is optional with default value\n         */\n        parameterBoolean?: boolean;\n        /**\n         * This is a simple enum that is optional with default value\n         */\n        parameterEnum?: 'Success' | 'Warning' | 'Error';\n        /**\n         * This is a simple model that is optional with default value\n         */\n        parameterModel?: ModelWithString;\n    };\n    url: '/api/v{api-version}/defaults';\n};\n\nexport type CallToTestOrderOfParamsData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * This is a optional string with default\n         */\n        parameterOptionalStringWithDefault?: string;\n        /**\n         * This is a optional string with empty default\n         */\n        parameterOptionalStringWithEmptyDefault?: string;\n        /**\n         * This is a optional string with no default\n         */\n        parameterOptionalStringWithNoDefault?: string;\n        /**\n         * This is a string with default\n         */\n        parameterStringWithDefault: string;\n        /**\n         * This is a string with empty default\n         */\n        parameterStringWithEmptyDefault: string;\n        /**\n         * This is a string with no default\n         */\n        parameterStringWithNoDefault: string;\n        /**\n         * This is a string that can be null with no default\n         */\n        parameterStringNullableWithNoDefault?: string | null;\n        /**\n         * This is a string that can be null with default\n         */\n        parameterStringNullableWithDefault?: string | null;\n    };\n    url: '/api/v{api-version}/defaults';\n};\n\nexport type DuplicateNameData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/duplicate';\n};\n\nexport type DuplicateName2Data = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/duplicate';\n};\n\nexport type DuplicateName3Data = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/duplicate';\n};\n\nexport type DuplicateName4Data = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/duplicate';\n};\n\nexport type CallWithNoContentResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no-content';\n};\n\nexport type CallWithNoContentResponseResponses = {\n    /**\n     * Success\n     */\n    204: void;\n};\n\nexport type CallWithNoContentResponseResponse = CallWithNoContentResponseResponses[keyof CallWithNoContentResponseResponses];\n\nexport type CallWithResponseAndNoContentResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multiple-tags/response-and-no-content';\n};\n\nexport type CallWithResponseAndNoContentResponseResponses = {\n    /**\n     * Response is a simple number\n     */\n    200: number;\n    /**\n     * Success\n     */\n    204: void;\n};\n\nexport type CallWithResponseAndNoContentResponseResponse = CallWithResponseAndNoContentResponseResponses[keyof CallWithResponseAndNoContentResponseResponses];\n\nexport type DummyAData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multiple-tags/a';\n};\n\nexport type DummyAResponses = {\n    200: _400;\n};\n\nexport type DummyAResponse = DummyAResponses[keyof DummyAResponses];\n\nexport type DummyBData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multiple-tags/b';\n};\n\nexport type DummyBResponses = {\n    /**\n     * Success\n     */\n    204: void;\n};\n\nexport type DummyBResponse = DummyBResponses[keyof DummyBResponses];\n\nexport type CallWithResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/response';\n};\n\nexport type CallWithResponseResponses = {\n    default: Import;\n};\n\nexport type CallWithResponseResponse = CallWithResponseResponses[keyof CallWithResponseResponses];\n\nexport type CallWithDuplicateResponsesData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/response';\n};\n\nexport type CallWithDuplicateResponsesErrors = {\n    /**\n     * Message for 500 error\n     */\n    500: ModelWithStringError;\n    /**\n     * Message for 501 error\n     */\n    501: ModelWithStringError;\n    /**\n     * Message for 502 error\n     */\n    502: ModelWithStringError;\n    /**\n     * Message for 4XX errors\n     */\n    '4XX': DictionaryWithArray;\n    /**\n     * Default error response\n     */\n    default: ModelWithBoolean;\n};\n\nexport type CallWithDuplicateResponsesError = CallWithDuplicateResponsesErrors[keyof CallWithDuplicateResponsesErrors];\n\nexport type CallWithDuplicateResponsesResponses = {\n    /**\n     * Message for 200 response\n     */\n    200: ModelWithBoolean & ModelWithInteger;\n    /**\n     * Message for 201 response\n     */\n    201: ModelWithString;\n    /**\n     * Message for 202 response\n     */\n    202: ModelWithString;\n};\n\nexport type CallWithDuplicateResponsesResponse = CallWithDuplicateResponsesResponses[keyof CallWithDuplicateResponsesResponses];\n\nexport type CallWithResponsesData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/response';\n};\n\nexport type CallWithResponsesErrors = {\n    /**\n     * Message for 500 error\n     */\n    500: ModelWithStringError;\n    /**\n     * Message for 501 error\n     */\n    501: ModelWithStringError;\n    /**\n     * Message for 502 error\n     */\n    502: ModelWithStringError;\n    /**\n     * Message for default response\n     */\n    default: ModelWithStringError;\n};\n\nexport type CallWithResponsesError = CallWithResponsesErrors[keyof CallWithResponsesErrors];\n\nexport type CallWithResponsesResponses = {\n    /**\n     * Message for 200 response\n     */\n    200: {\n        readonly '@namespace.string'?: string;\n        readonly '@namespace.integer'?: number;\n        readonly value?: Array<ModelWithString>;\n    };\n    /**\n     * Message for 201 response\n     */\n    201: ModelThatExtends;\n    /**\n     * Message for 202 response\n     */\n    202: ModelThatExtendsExtends;\n};\n\nexport type CallWithResponsesResponse = CallWithResponsesResponses[keyof CallWithResponsesResponses];\n\nexport type CollectionFormatData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * This is an array parameter that is sent as csv format (comma-separated values)\n         */\n        parameterArrayCSV: Array<string> | null;\n        /**\n         * This is an array parameter that is sent as ssv format (space-separated values)\n         */\n        parameterArraySSV: Array<string> | null;\n        /**\n         * This is an array parameter that is sent as tsv format (tab-separated values)\n         */\n        parameterArrayTSV: Array<string> | null;\n        /**\n         * This is an array parameter that is sent as pipes format (pipe-separated values)\n         */\n        parameterArrayPipes: Array<string> | null;\n        /**\n         * This is an array parameter that is sent as multi format (multiple parameter instances)\n         */\n        parameterArrayMulti: Array<string> | null;\n    };\n    url: '/api/v{api-version}/collectionFormat';\n};\n\nexport type TypesData = {\n    body?: never;\n    path?: {\n        /**\n         * This is a number parameter\n         */\n        id?: number;\n    };\n    query: {\n        /**\n         * This is a number parameter\n         */\n        parameterNumber: number;\n        /**\n         * This is a string parameter\n         */\n        parameterString: string | null;\n        /**\n         * This is a boolean parameter\n         */\n        parameterBoolean: boolean | null;\n        /**\n         * This is an object parameter\n         */\n        parameterObject: {\n            [key: string]: unknown;\n        } | null;\n        /**\n         * This is an array parameter\n         */\n        parameterArray: Array<string> | null;\n        /**\n         * This is a dictionary parameter\n         */\n        parameterDictionary: {\n            [key: string]: unknown;\n        } | null;\n        /**\n         * This is an enum parameter\n         */\n        parameterEnum: 'Success' | 'Warning' | 'Error' | null;\n    };\n    url: '/api/v{api-version}/types';\n};\n\nexport type TypesResponses = {\n    /**\n     * Response is a simple number\n     */\n    200: number;\n    /**\n     * Response is a simple string\n     */\n    201: string;\n    /**\n     * Response is a simple boolean\n     */\n    202: boolean;\n    /**\n     * Response is a simple object\n     */\n    203: {\n        [key: string]: unknown;\n    };\n};\n\nexport type TypesResponse = TypesResponses[keyof TypesResponses];\n\nexport type UploadFileData = {\n    body: Blob | File;\n    path: {\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string | null;\n    };\n    query?: never;\n    url: '/api/v{api-version}/upload';\n};\n\nexport type UploadFileResponses = {\n    200: boolean;\n};\n\nexport type UploadFileResponse = UploadFileResponses[keyof UploadFileResponses];\n\nexport type FileResponseData = {\n    body?: never;\n    path: {\n        id: string;\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string;\n    };\n    query?: never;\n    url: '/api/v{api-version}/file/{id}';\n};\n\nexport type FileResponseResponses = {\n    /**\n     * Success\n     */\n    200: Blob | File;\n};\n\nexport type FileResponseResponse = FileResponseResponses[keyof FileResponseResponses];\n\nexport type ComplexTypesData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * Parameter containing object\n         */\n        parameterObject: {\n            first?: {\n                second?: {\n                    third?: string;\n                };\n            };\n        };\n        /**\n         * Parameter containing reference\n         */\n        parameterReference: ModelWithString;\n    };\n    url: '/api/v{api-version}/complex';\n};\n\nexport type ComplexTypesErrors = {\n    /**\n     * 400 `server` error\n     */\n    400: unknown;\n    /**\n     * 500 server error\n     */\n    500: unknown;\n};\n\nexport type ComplexTypesResponses = {\n    /**\n     * Successful response\n     */\n    200: Array<ModelWithString>;\n};\n\nexport type ComplexTypesResponse = ComplexTypesResponses[keyof ComplexTypesResponses];\n\nexport type MultipartResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multipart';\n};\n\nexport type MultipartResponseResponses = {\n    /**\n     * OK\n     */\n    200: {\n        file?: Blob | File;\n        metadata?: {\n            foo?: string;\n            bar?: string;\n        };\n    };\n};\n\nexport type MultipartResponseResponse = MultipartResponseResponses[keyof MultipartResponseResponses];\n\nexport type MultipartRequestData = {\n    body?: {\n        content?: Blob | File;\n        data?: ModelWithString | null;\n    };\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multipart';\n};\n\nexport type ComplexParamsData = {\n    body?: {\n        readonly key: string | null;\n        name: string | null;\n        enabled?: boolean;\n        type: 'Monkey' | 'Horse' | 'Bird';\n        listOfModels?: Array<ModelWithString> | null;\n        listOfStrings?: Array<string> | null;\n        parameters: ModelWithString | ModelWithEnum | ModelWithArray | ModelWithDictionary;\n        readonly user?: {\n            readonly id?: number;\n            readonly name?: string | null;\n        };\n    };\n    path: {\n        id: number;\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string;\n    };\n    query?: never;\n    url: '/api/v{api-version}/complex/{id}';\n};\n\nexport type ComplexParamsResponses = {\n    /**\n     * Success\n     */\n    200: ModelWithString;\n};\n\nexport type ComplexParamsResponse = ComplexParamsResponses[keyof ComplexParamsResponses];\n\nexport type CallWithResultFromHeaderData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/header';\n};\n\nexport type CallWithResultFromHeaderErrors = {\n    /**\n     * 400 server error\n     */\n    400: unknown;\n    /**\n     * 500 server error\n     */\n    500: unknown;\n};\n\nexport type CallWithResultFromHeaderResponses = {\n    /**\n     * Successful response\n     */\n    200: unknown;\n};\n\nexport type TestErrorCodeData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * Status code to return\n         */\n        status: number;\n    };\n    url: '/api/v{api-version}/error';\n};\n\nexport type TestErrorCodeErrors = {\n    /**\n     * Custom message: Internal Server Error\n     */\n    500: unknown;\n    /**\n     * Custom message: Not Implemented\n     */\n    501: unknown;\n    /**\n     * Custom message: Bad Gateway\n     */\n    502: unknown;\n    /**\n     * Custom message: Service Unavailable\n     */\n    503: unknown;\n};\n\nexport type TestErrorCodeResponses = {\n    /**\n     * Custom message: Successful response\n     */\n    200: unknown;\n};\n\nexport type NonAsciiæøåÆøÅöôêÊ字符串Data = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * Dummy input param\n         */\n        nonAsciiParamæøåÆØÅöôêÊ: number;\n    };\n    url: '/api/v{api-version}/non-ascii-æøåÆØÅöôêÊ字符串';\n};\n\nexport type NonAsciiæøåÆøÅöôêÊ字符串Responses = {\n    /**\n     * Successful response\n     */\n    200: Array<NonAsciiStringæøåÆøÅöôêÊ字符串>;\n};\n\nexport type NonAsciiæøåÆøÅöôêÊ字符串Response = NonAsciiæøåÆøÅöôêÊ字符串Responses[keyof NonAsciiæøåÆøÅöôêÊ字符串Responses];\n\nexport type PutWithFormUrlEncodedData = {\n    body: ArrayWithStrings;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/non-ascii-æøåÆØÅöôêÊ字符串';\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-ky/base-url-string/client/client.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { HTTPError, Options as KyOptions } from 'ky';\nimport ky from 'ky';\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, RetryOptions } from './types.gen';\nimport type { Middleware } from './utils.gen';\nimport {\n  buildUrl,\n  createConfig,\n  createInterceptors,\n  getParseAs,\n  mergeConfigs,\n  mergeHeaders,\n  setAuthParams,\n} from './utils.gen';\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 (options: RequestOptions) => {\n    const opts = {\n      ..._config,\n      ...options,\n      headers: mergeHeaders(_config.headers, options.headers),\n      ky: options.ky ?? _config.ky ?? ky,\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    if (opts.body === undefined || opts.serializedBody === '') {\n      opts.headers.delete('Content-Type');\n    }\n\n    const url = buildUrl(opts);\n\n    return { opts, url };\n  };\n\n  const parseErrorResponse = async (\n    response: Response,\n    request: Request,\n    opts: ResolvedRequestOptions,\n    interceptorsMiddleware: Middleware<Request, Response, unknown, ResolvedRequestOptions>,\n  ) => {\n    const result = {\n      request,\n      response,\n    };\n\n    const textError = await response.text();\n    let jsonError: unknown;\n\n    try {\n      jsonError = JSON.parse(textError);\n    } catch {\n      jsonError = undefined;\n    }\n\n    const error = jsonError ?? textError;\n    let finalError = error;\n\n    for (const fn of interceptorsMiddleware.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    return opts.responseStyle === 'data'\n      ? undefined\n      : {\n          error: finalError,\n          ...result,\n        };\n  };\n\n  const request: Client['request'] = async (options) => {\n    // @ts-expect-error\n    const { opts, url } = await beforeRequest(options);\n\n    const kyInstance = opts.ky!;\n\n    const validBody = getValidRequestBody(opts);\n\n    const kyOptions: KyOptions = {\n      body: validBody as BodyInit,\n      cache: opts.cache,\n      credentials: opts.credentials,\n      headers: opts.headers,\n      integrity: opts.integrity,\n      keepalive: opts.keepalive,\n      method: opts.method as KyOptions['method'],\n      mode: opts.mode,\n      redirect: 'follow',\n      referrer: opts.referrer,\n      referrerPolicy: opts.referrerPolicy,\n      signal: opts.signal,\n      throwHttpErrors: opts.throwOnError ?? false,\n      timeout: opts.timeout,\n      ...opts.kyOptions,\n    };\n\n    if (opts.retry && typeof opts.retry === 'object') {\n      const retryOpts = opts.retry as RetryOptions;\n      kyOptions.retry = {\n        limit: retryOpts.limit ?? 2,\n        methods: retryOpts.methods as Array<\n          'get' | 'post' | 'put' | 'patch' | 'head' | 'delete' | 'options' | 'trace'\n        >,\n        statusCodes: retryOpts.statusCodes,\n      };\n    }\n\n    let request = new Request(url, {\n      body: kyOptions.body as BodyInit,\n      headers: kyOptions.headers as HeadersInit,\n      method: kyOptions.method,\n    });\n\n    for (const fn of interceptors.request.fns) {\n      if (fn) {\n        request = await fn(request, opts);\n      }\n    }\n\n    let response: Response;\n\n    try {\n      response = await kyInstance(request, kyOptions);\n    } catch (error) {\n      if (error && typeof error === 'object' && 'response' in error) {\n        const httpError = error as HTTPError;\n        response = httpError.response;\n\n        for (const fn of interceptors.response.fns) {\n          if (fn) {\n            response = await fn(response, request, opts);\n          }\n        }\n\n        return parseErrorResponse(response, request, opts, interceptors);\n      }\n\n      throw error;\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    return parseErrorResponse(response, request, opts, interceptors);\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      fetch: globalThis.fetch,\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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-ky/base-url-string/client/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type { Auth } from '../core/auth.gen';\nexport type { QuerySerializerOptions } from '../core/bodySerializer.gen';\nexport {\n  formDataBodySerializer,\n  jsonBodySerializer,\n  urlSearchParamsBodySerializer,\n} from '../core/bodySerializer.gen';\nexport { buildClientParams } from '../core/params.gen';\nexport { serializeQueryKeyValue } from '../core/queryKeySerializer.gen';\nexport { createClient } from './client.gen';\nexport type {\n  Client,\n  ClientOptions,\n  Config,\n  CreateClientConfig,\n  Options,\n  RequestOptions,\n  RequestResult,\n  ResolvedRequestOptions,\n  ResponseStyle,\n  RetryOptions,\n  TDataShape,\n} from './types.gen';\nexport { createConfig, mergeHeaders } from './utils.gen';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-ky/base-url-string/client/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { Options as KyOptions } from 'ky';\nimport type ky from 'ky';\n\nimport type { Auth } from '../core/auth.gen';\nimport type {\n  ServerSentEventsOptions,\n  ServerSentEventsResult,\n} from '../core/serverSentEvents.gen';\nimport type { Client as CoreClient, Config as CoreConfig } from '../core/types.gen';\nimport type { Middleware } from './utils.gen';\n\nexport type ResponseStyle = 'data' | 'fields';\n\nexport interface RetryOptions {\n  /**\n   * Maximum number of retry attempts\n   *\n   * @default 2\n   */\n  limit?: number;\n  /**\n   * HTTP methods to retry\n   *\n   * @default ['get', 'put', 'head', 'delete', 'options', 'trace']\n   */\n  methods?: Array<'get' | 'post' | 'put' | 'delete' | 'patch' | 'head' | 'options' | 'trace'>;\n  /**\n   * HTTP status codes to retry\n   *\n   * @default [408, 413, 429, 500, 502, 503, 504]\n   */\n  statusCodes?: number[];\n}\n\nexport interface Config<T extends ClientOptions = ClientOptions>\n  extends\n    Omit<KyOptions, 'body' | 'headers' | 'method' | 'prefixUrl' | 'retry' | 'throwHttpErrors'>,\n    CoreConfig {\n  /**\n   * Base URL for all requests made by this client.\n   */\n  baseUrl?: T['baseUrl'];\n  /**\n   * Ky instance to use. You can use this option to provide a custom\n   * ky instance.\n   */\n  ky?: typeof ky;\n  /**\n   * Additional ky-specific options that will be passed directly to ky.\n   * This allows you to use any ky option not explicitly exposed in the config.\n   */\n  kyOptions?: Omit<KyOptions, 'method' | 'prefixUrl'>;\n  /**\n   * Return the response data parsed in a specified format. By default, `auto`\n   * will infer the appropriate method from the `Content-Type` response header.\n   * You can override this behavior with any of the {@link Body} methods.\n   * Select `stream` if you don't want to parse response data at all.\n   *\n   * @default 'auto'\n   */\n  parseAs?: 'arrayBuffer' | 'auto' | 'blob' | 'formData' | 'json' | 'stream' | 'text';\n  /**\n   * Should we return only data or multiple fields (data, error, response, etc.)?\n   *\n   * @default 'fields'\n   */\n  responseStyle?: ResponseStyle;\n  /**\n   * Retry configuration\n   */\n  retry?: RetryOptions;\n  /**\n   * Throw an error instead of returning it in the response?\n   *\n   * @default false\n   */\n  throwOnError?: T['throwOnError'];\n  /**\n   * Request timeout in milliseconds\n   *\n   * @default 10000\n   */\n  timeout?: number;\n}\n\nexport interface RequestOptions<\n  TData = unknown,\n  TResponseStyle extends ResponseStyle = 'fields',\n  ThrowOnError extends boolean = boolean,\n  Url extends string = string,\n>\n  extends\n    Config<{\n      responseStyle: TResponseStyle;\n      throwOnError: ThrowOnError;\n    }>,\n    Pick<\n      ServerSentEventsOptions<TData>,\n      | 'onRequest'\n      | 'onSseError'\n      | 'onSseEvent'\n      | 'sseDefaultRetryDelay'\n      | 'sseMaxRetryAttempts'\n      | 'sseMaxRetryDelay'\n    > {\n  /**\n   * Any body that you want to add to your request.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/fetch#body}\n   */\n  body?: unknown;\n  path?: Record<string, unknown>;\n  query?: Record<string, unknown>;\n  /**\n   * Security mechanism(s) to use for the request.\n   */\n  security?: ReadonlyArray<Auth>;\n  url: Url;\n}\n\nexport interface ResolvedRequestOptions<\n  TResponseStyle extends ResponseStyle = 'fields',\n  ThrowOnError extends boolean = boolean,\n  Url extends string = string,\n> extends RequestOptions<unknown, TResponseStyle, ThrowOnError, Url> {\n  serializedBody?: string;\n}\n\nexport type RequestResult<\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = boolean,\n  TResponseStyle extends ResponseStyle = 'fields',\n> = ThrowOnError extends true\n  ? Promise<\n      TResponseStyle extends 'data'\n        ? TData extends Record<string, unknown>\n          ? TData[keyof TData]\n          : TData\n        : {\n            data: TData extends Record<string, unknown> ? TData[keyof TData] : TData;\n            request: Request;\n            response: Response;\n          }\n    >\n  : Promise<\n      TResponseStyle extends 'data'\n        ? (TData extends Record<string, unknown> ? TData[keyof TData] : TData) | undefined\n        : (\n            | {\n                data: TData extends Record<string, unknown> ? TData[keyof TData] : TData;\n                error: undefined;\n              }\n            | {\n                data: undefined;\n                error: TError extends Record<string, unknown> ? TError[keyof TError] : TError;\n              }\n          ) & {\n            request: Request;\n            response: Response;\n          }\n    >;\n\nexport interface ClientOptions {\n  baseUrl?: string;\n  responseStyle?: ResponseStyle;\n  throwOnError?: boolean;\n}\n\ntype MethodFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'>,\n) => RequestResult<TData, TError, ThrowOnError, TResponseStyle>;\n\ntype SseFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'>,\n) => Promise<ServerSentEventsResult<TData, TError>>;\n\ntype RequestFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'> &\n    Pick<Required<RequestOptions<TData, TResponseStyle, ThrowOnError>>, 'method'>,\n) => RequestResult<TData, TError, ThrowOnError, TResponseStyle>;\n\ntype BuildUrlFn = <\n  TData extends {\n    body?: unknown;\n    path?: Record<string, unknown>;\n    query?: Record<string, unknown>;\n    url: string;\n  },\n>(\n  options: TData & Options<TData>,\n) => string;\n\nexport type Client = CoreClient<RequestFn, Config, MethodFn, BuildUrlFn, SseFn> & {\n  interceptors: Middleware<Request, Response, unknown, ResolvedRequestOptions>;\n};\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 = ClientOptions> = (\n  override?: Config<ClientOptions & T>,\n) => Config<Required<ClientOptions> & T>;\n\nexport interface TDataShape {\n  body?: unknown;\n  headers?: unknown;\n  path?: unknown;\n  query?: unknown;\n  url: string;\n}\n\ntype OmitKeys<T, K> = Pick<T, Exclude<keyof T, K>>;\n\nexport type Options<\n  TData extends TDataShape = TDataShape,\n  ThrowOnError extends boolean = boolean,\n  TResponse = unknown,\n  TResponseStyle extends ResponseStyle = 'fields',\n> = OmitKeys<\n  RequestOptions<TResponse, TResponseStyle, ThrowOnError>,\n  'body' | 'path' | 'query' | 'url'\n> &\n  ([TData] extends [never] ? unknown : Omit<TData, 'url'>);\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-ky/base-url-string/client/utils.gen.ts",
    "content": "// 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    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        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  throwOnError: false,\n  timeout: 10000,\n  ...override,\n});\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-ky/base-url-string/client.gen.ts",
    "content": "// 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://foo.com' }));\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-ky/base-url-string/core/auth.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-ky/base-url-string/core/bodySerializer.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-ky/base-url-string/core/params.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-ky/base-url-string/core/pathSerializer.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-ky/base-url-string/core/queryKeySerializer.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\n/**\n * JSON-friendly union that mirrors what Pinia Colada can hash.\n */\nexport type JsonValue =\n  | null\n  | string\n  | number\n  | boolean\n  | JsonValue[]\n  | { [key: string]: JsonValue };\n\n/**\n * Replacer that converts non-JSON values (bigint, Date, etc.) to safe substitutes.\n */\nexport const queryKeyJsonReplacer = (_key: string, value: unknown) => {\n  if (value === undefined || typeof value === 'function' || typeof value === 'symbol') {\n    return undefined;\n  }\n  if (typeof value === 'bigint') {\n    return value.toString();\n  }\n  if (value instanceof Date) {\n    return value.toISOString();\n  }\n  return value;\n};\n\n/**\n * Safely stringifies a value and parses it back into a JsonValue.\n */\nexport const stringifyToJsonValue = (input: unknown): JsonValue | undefined => {\n  try {\n    const json = JSON.stringify(input, queryKeyJsonReplacer);\n    if (json === undefined) {\n      return undefined;\n    }\n    return JSON.parse(json) as JsonValue;\n  } catch {\n    return undefined;\n  }\n};\n\n/**\n * Detects plain objects (including objects with a null prototype).\n */\nconst isPlainObject = (value: unknown): value is Record<string, unknown> => {\n  if (value === null || typeof value !== 'object') {\n    return false;\n  }\n  const prototype = Object.getPrototypeOf(value as object);\n  return prototype === Object.prototype || prototype === null;\n};\n\n/**\n * Turns URLSearchParams into a sorted JSON object for deterministic keys.\n */\nconst serializeSearchParams = (params: URLSearchParams): JsonValue => {\n  const entries = Array.from(params.entries()).sort(([a], [b]) => a.localeCompare(b));\n  const result: Record<string, JsonValue> = {};\n\n  for (const [key, value] of entries) {\n    const existing = result[key];\n    if (existing === undefined) {\n      result[key] = value;\n      continue;\n    }\n\n    if (Array.isArray(existing)) {\n      (existing as string[]).push(value);\n    } else {\n      result[key] = [existing, value];\n    }\n  }\n\n  return result;\n};\n\n/**\n * Normalizes any accepted value into a JSON-friendly shape for query keys.\n */\nexport const serializeQueryKeyValue = (value: unknown): JsonValue | undefined => {\n  if (value === null) {\n    return null;\n  }\n\n  if (typeof value === 'string' || typeof value === 'number' || typeof value === 'boolean') {\n    return value;\n  }\n\n  if (value === undefined || typeof value === 'function' || typeof value === 'symbol') {\n    return undefined;\n  }\n\n  if (typeof value === 'bigint') {\n    return value.toString();\n  }\n\n  if (value instanceof Date) {\n    return value.toISOString();\n  }\n\n  if (Array.isArray(value)) {\n    return stringifyToJsonValue(value);\n  }\n\n  if (typeof URLSearchParams !== 'undefined' && value instanceof URLSearchParams) {\n    return serializeSearchParams(value);\n  }\n\n  if (isPlainObject(value)) {\n    return stringifyToJsonValue(value);\n  }\n\n  return undefined;\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-ky/base-url-string/core/serverSentEvents.gen.ts",
    "content": "// 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 const 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            // Normalize line endings: CRLF -> LF, then CR -> LF\n            buffer = buffer.replace(/\\r\\n/g, '\\n').replace(/\\r/g, '\\n');\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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-ky/base-url-string/core/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { Auth, AuthToken } from './auth.gen';\nimport type { BodySerializer, QuerySerializer, QuerySerializerOptions } from './bodySerializer.gen';\n\nexport type HttpMethod =\n  | 'connect'\n  | 'delete'\n  | 'get'\n  | 'head'\n  | 'options'\n  | 'patch'\n  | 'post'\n  | 'put'\n  | 'trace';\n\nexport type Client<\n  RequestFn = never,\n  Config = unknown,\n  MethodFn = never,\n  BuildUrlFn = never,\n  SseFn = never,\n> = {\n  /**\n   * Returns the final request URL.\n   */\n  buildUrl: BuildUrlFn;\n  getConfig: () => Config;\n  request: RequestFn;\n  setConfig: (config: Config) => Config;\n} & {\n  [K in HttpMethod]: MethodFn;\n} & ([SseFn] extends [never] ? { sse?: never } : { sse: { [K in HttpMethod]: SseFn } });\n\nexport interface Config {\n  /**\n   * Auth token or a function returning auth token. The resolved value will be\n   * added to the request payload as defined by its `security` array.\n   */\n  auth?: ((auth: Auth) => Promise<AuthToken> | AuthToken) | AuthToken;\n  /**\n   * A function for serializing request body parameter. By default,\n   * {@link JSON.stringify()} will be used.\n   */\n  bodySerializer?: BodySerializer | null;\n  /**\n   * An object containing any HTTP headers that you want to pre-populate your\n   * `Headers` object with.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/Headers/Headers#init See more}\n   */\n  headers?:\n    | RequestInit['headers']\n    | Record<\n        string,\n        string | number | boolean | (string | number | boolean)[] | null | undefined | unknown\n      >;\n  /**\n   * The request method.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/fetch#method See more}\n   */\n  method?: Uppercase<HttpMethod>;\n  /**\n   * A function for serializing request query parameters. By default, arrays\n   * will be exploded in form style, objects will be exploded in deepObject\n   * style, and reserved characters are percent-encoded.\n   *\n   * This method will have no effect if the native `paramsSerializer()` Axios\n   * API function is used.\n   *\n   * {@link https://swagger.io/docs/specification/serialization/#query View examples}\n   */\n  querySerializer?: QuerySerializer | QuerySerializerOptions;\n  /**\n   * A function validating request data. This is useful if you want to ensure\n   * the request conforms to the desired shape, so it can be safely sent to\n   * the server.\n   */\n  requestValidator?: (data: unknown) => Promise<unknown>;\n  /**\n   * A function transforming response data before it's returned. This is useful\n   * for post-processing data, e.g. converting ISO strings into Date objects.\n   */\n  responseTransformer?: (data: unknown) => Promise<unknown>;\n  /**\n   * A function validating response data. This is useful if you want to ensure\n   * the response conforms to the desired shape, so it can be safely passed to\n   * the transformers and returned to the user.\n   */\n  responseValidator?: (data: unknown) => Promise<unknown>;\n}\n\ntype IsExactlyNeverOrNeverUndefined<T> = [T] extends [never]\n  ? true\n  : [T] extends [never | undefined]\n    ? [undefined] extends [T]\n      ? false\n      : true\n    : false;\n\nexport type OmitNever<T extends Record<string, unknown>> = {\n  [K in keyof T as IsExactlyNeverOrNeverUndefined<T[K]> extends true ? never : K]: T[K];\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-ky/base-url-string/core/utils.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-ky/base-url-string/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type { _3eNum1Период, _400, AdditionalPropertiesIntegerIssue, AdditionalPropertiesUnknownIssue, AdditionalPropertiesUnknownIssue2, AdditionalPropertiesUnknownIssue3, AdditionalPropertiesUnknownIssueWritable, AnyOfAnyAndNull, AnyOfArrays, ApiVVersionODataControllerCountData, ApiVVersionODataControllerCountResponse, ApiVVersionODataControllerCountResponses, ArrayWithAnyOfProperties, ArrayWithArray, ArrayWithBooleans, ArrayWithNumbers, ArrayWithProperties, ArrayWithReferences, ArrayWithStrings, CallToTestOrderOfParamsData, CallWithDefaultOptionalParametersData, CallWithDefaultParametersData, CallWithDescriptionsData, CallWithDuplicateResponsesData, CallWithDuplicateResponsesError, CallWithDuplicateResponsesErrors, CallWithDuplicateResponsesResponse, CallWithDuplicateResponsesResponses, CallWithNoContentResponseData, CallWithNoContentResponseResponse, CallWithNoContentResponseResponses, CallWithParametersData, CallWithResponseAndNoContentResponseData, CallWithResponseAndNoContentResponseResponse, CallWithResponseAndNoContentResponseResponses, CallWithResponseData, CallWithResponseResponse, CallWithResponseResponses, CallWithResponsesData, CallWithResponsesError, CallWithResponsesErrors, CallWithResponsesResponse, CallWithResponsesResponses, CallWithResultFromHeaderData, CallWithResultFromHeaderErrors, CallWithResultFromHeaderResponses, CallWithWeirdParameterNamesData, CamelCaseCommentWithBreaks, CharactersInDescription, ClientOptions, CollectionFormatData, CommentWithBackticks, CommentWithBackticksAndQuotes, CommentWithBreaks, CommentWithExpressionPlaceholders, CommentWithQuotes, CommentWithReservedCharacters, CommentWithSlashes, ComplexParamsData, ComplexParamsResponse, ComplexParamsResponses, ComplexTypesData, ComplexTypesErrors, ComplexTypesResponse, ComplexTypesResponses, CompositionBaseModel, CompositionExtendedModel, CompositionWithAllOfAndNullable, CompositionWithAnyOf, CompositionWithAnyOfAndNullable, CompositionWithAnyOfAnonymous, CompositionWithNestedAnyAndTypeNull, CompositionWithNestedAnyOfAndNull, CompositionWithOneOf, CompositionWithOneOfAndComplexArrayDictionary, CompositionWithOneOfAndNullable, CompositionWithOneOfAndProperties, CompositionWithOneOfAndSimpleArrayDictionary, CompositionWithOneOfAndSimpleDictionary, CompositionWithOneOfAnonymous, CompositionWithOneOfDiscriminator, ConstValue, Default, DeleteCallWithoutParametersAndResponseData, DeleteFooData, DeleteFooData2, DeleteFooData3, DeprecatedCallData, DeprecatedModel, DictionaryWithArray, DictionaryWithDictionary, DictionaryWithProperties, DictionaryWithPropertiesAndAdditionalProperties, DictionaryWithReference, DictionaryWithString, DummyAData, DummyAResponse, DummyAResponses, DummyBData, DummyBResponse, DummyBResponses, DuplicateName2Data, DuplicateName3Data, DuplicateName4Data, DuplicateNameData, EnumFromDescription, EnumWithExtensions, EnumWithNumbers, EnumWithReplacedCharacters, EnumWithStrings, EnumWithXEnumNames, ExportData, ExternalRefA, ExternalRefB, ExternalSharedModel, File, FileResponseData, FileResponseResponse, FileResponseResponses, FileWritable, FooWowData, FooWowResponses, FreeFormObjectWithAdditionalPropertiesEqEmptyObject, FreeFormObjectWithAdditionalPropertiesEqTrue, FreeFormObjectWithoutAdditionalProperties, GenericSchemaDuplicateIssue1SystemBoolean, GenericSchemaDuplicateIssue1SystemBooleanWritable, GenericSchemaDuplicateIssue1SystemString, GenericSchemaDuplicateIssue1SystemStringWritable, GetApiVbyApiVersionSimpleOperationData, GetApiVbyApiVersionSimpleOperationError, GetApiVbyApiVersionSimpleOperationErrors, GetApiVbyApiVersionSimpleOperationResponse, GetApiVbyApiVersionSimpleOperationResponses, GetCallWithOptionalParamData, GetCallWithoutParametersAndResponseData, HeadCallWithoutParametersAndResponseData, Import, ImportData, ImportResponse, ImportResponses, IoK8sApimachineryPkgApisMetaV1DeleteOptions, IoK8sApimachineryPkgApisMetaV1Preconditions, ModelCircle, ModelFromZendesk, ModelSquare, ModelThatExtends, ModelThatExtendsExtends, ModelWithAdditionalPropertiesEqTrue, ModelWithAdditionalPropertiesRef, ModelWithAnyOfConstantSizeArray, ModelWithAnyOfConstantSizeArrayAndIntersect, ModelWithAnyOfConstantSizeArrayNullable, ModelWithAnyOfConstantSizeArrayWithNSizeAndOptions, ModelWithAnyOfConstantSizeArrayWithNSizeAndOptionsWritable, ModelWithArray, ModelWithArrayReadOnlyAndWriteOnly, ModelWithArrayReadOnlyAndWriteOnlyWritable, ModelWithBackticksInDescription, ModelWithBoolean, ModelWithCircularReference, ModelWithConst, ModelWithConstantSizeArray, ModelWithDictionary, ModelWithDuplicateImports, ModelWithDuplicateProperties, ModelWithEnum, ModelWithEnumFromDescription, ModelWithEnumWithHyphen, ModelWithInteger, ModelWithNestedArrayEnums, ModelWithNestedArrayEnumsData, ModelWithNestedArrayEnumsDataBar, ModelWithNestedArrayEnumsDataFoo, ModelWithNestedCompositionEnums, ModelWithNestedEnums, ModelWithNestedProperties, ModelWithNullableObject, ModelWithNullableString, ModelWithNumericEnumUnion, ModelWithOneOfAndProperties, ModelWithOneOfEnum, ModelWithOrderedProperties, ModelWithPattern, ModelWithPatternWritable, ModelWithPrefixItemsConstantSizeArray, ModelWithProperties, ModelWithPropertiesWritable, ModelWithReadOnlyAndWriteOnly, ModelWithReadOnlyAndWriteOnlyWritable, ModelWithReference, ModelWithReferenceWritable, ModelWithString, ModelWithStringError, MultipartRequestData, MultipartResponseData, MultipartResponseResponse, MultipartResponseResponses, NestedAnyOfArraysNullable, NonAsciiæøåÆøÅöôêÊ字符串Data, NonAsciiæøåÆøÅöôêÊ字符串Response, NonAsciiæøåÆøÅöôêÊ字符串Responses, NonAsciiStringæøåÆøÅöôêÊ字符串, NullableObject, OneOfAllOfIssue, OneOfAllOfIssueWritable, OptionsCallWithoutParametersAndResponseData, Pageable, ParameterSimpleParameterUnused, PatchApiVbyApiVersionNoTagData, PatchApiVbyApiVersionNoTagResponses, PatchCallWithoutParametersAndResponseData, PostApiVbyApiVersionFormDataData, PostApiVbyApiVersionRequestBodyData, PostCallWithOptionalParamData, PostCallWithOptionalParamResponse, PostCallWithOptionalParamResponses, PostCallWithoutParametersAndResponseData, PostServiceWithEmptyTagResponse, PostServiceWithEmptyTagResponse2, PutCallWithoutParametersAndResponseData, PutWithFormUrlEncodedData, SchemaWithFormRestrictedKeys, SimpleBoolean, SimpleFile, SimpleFormData, SimpleInteger, SimpleParameter, SimpleReference, SimpleRequestBody, SimpleString, SimpleStringWithPattern, TestErrorCodeData, TestErrorCodeErrors, TestErrorCodeResponses, TypesData, TypesResponse, TypesResponses, UploadFileData, UploadFileResponse, UploadFileResponses, XFooBar } from './types.gen';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-ky/base-url-string/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type ClientOptions = {\n    baseUrl: 'http://localhost:3000/base' | (string & {});\n};\n\n/**\n * Model with number-only name\n */\nexport type _400 = string;\n\n/**\n * External ref to shared model (A)\n */\nexport type ExternalRefA = ExternalSharedModel;\n\n/**\n * External ref to shared model (B)\n */\nexport type ExternalRefB = ExternalSharedModel;\n\n/**\n * Testing multiline comments in string: First line\n * Second line\n *\n * Fourth line\n */\nexport type CamelCaseCommentWithBreaks = number;\n\n/**\n * Testing multiline comments in string: First line\n * Second line\n *\n * Fourth line\n */\nexport type CommentWithBreaks = number;\n\n/**\n * Testing backticks in string: `backticks` and ```multiple backticks``` should work\n */\nexport type CommentWithBackticks = number;\n\n/**\n * Testing backticks and quotes in string: `backticks`, 'quotes', \"double quotes\" and ```multiple backticks``` should work\n */\nexport type CommentWithBackticksAndQuotes = number;\n\n/**\n * Testing slashes in string: \\backwards\\\\\\ and /forwards/// should work\n */\nexport type CommentWithSlashes = number;\n\n/**\n * Testing expression placeholders in string: ${expression} should work\n */\nexport type CommentWithExpressionPlaceholders = number;\n\n/**\n * Testing quotes in string: 'single quote''' and \"double quotes\"\"\" should work\n */\nexport type CommentWithQuotes = number;\n\n/**\n * Testing reserved characters in string: * inline * and ** inline ** should work\n */\nexport type CommentWithReservedCharacters = number;\n\n/**\n * This is a simple number\n */\nexport type SimpleInteger = number;\n\n/**\n * This is a simple boolean\n */\nexport type SimpleBoolean = boolean;\n\n/**\n * This is a simple string\n */\nexport type SimpleString = string;\n\n/**\n * A string with non-ascii (unicode) characters valid in typescript identifiers (æøåÆØÅöÔèÈ字符串)\n */\nexport type NonAsciiStringæøåÆøÅöôêÊ字符串 = string;\n\n/**\n * This is a simple file\n */\nexport type SimpleFile = Blob | File;\n\n/**\n * This is a simple reference\n */\nexport type SimpleReference = ModelWithString;\n\n/**\n * This is a simple string\n */\nexport type SimpleStringWithPattern = string | null;\n\n/**\n * This is a simple enum with strings\n */\nexport type EnumWithStrings = 'Success' | 'Warning' | 'Error' | '\\'Single Quote\\'' | '\"Double Quotes\"' | 'Non-ascii: øæåôöØÆÅÔÖ字符串';\n\nexport type EnumWithReplacedCharacters = '\\'Single Quote\\'' | '\"Double Quotes\"' | 'øæåôöØÆÅÔÖ字符串' | 3.1 | '';\n\n/**\n * This is a simple enum with numbers\n */\nexport type EnumWithNumbers = 1 | 2 | 3 | 1.1 | 1.2 | 1.3 | 100 | 200 | 300 | -100 | -200 | -300 | -1.1 | -1.2 | -1.3;\n\n/**\n * Success=1,Warning=2,Error=3\n */\nexport type EnumFromDescription = number;\n\n/**\n * This is a simple enum with numbers\n */\nexport type EnumWithExtensions = 200 | 400 | 500;\n\nexport type EnumWithXEnumNames = 0 | 1 | 2;\n\n/**\n * This is a simple array with numbers\n */\nexport type ArrayWithNumbers = Array<number>;\n\n/**\n * This is a simple array with booleans\n */\nexport type ArrayWithBooleans = Array<boolean>;\n\n/**\n * This is a simple array with strings\n */\nexport type ArrayWithStrings = Array<string>;\n\n/**\n * This is a simple array with references\n */\nexport type ArrayWithReferences = Array<ModelWithString>;\n\n/**\n * This is a simple array containing an array\n */\nexport type ArrayWithArray = Array<Array<ModelWithString>>;\n\n/**\n * This is a simple array with properties\n */\nexport type ArrayWithProperties = Array<{\n    '16x16'?: CamelCaseCommentWithBreaks;\n    bar?: string;\n}>;\n\n/**\n * This is a simple array with any of properties\n */\nexport type ArrayWithAnyOfProperties = Array<{\n    foo?: string;\n} | {\n    bar?: string;\n}>;\n\nexport type AnyOfAnyAndNull = {\n    data?: unknown | null;\n};\n\n/**\n * This is a simple array with any of properties\n */\nexport type AnyOfArrays = {\n    results?: Array<{\n        foo?: string;\n    } | {\n        bar?: string;\n    }>;\n};\n\n/**\n * This is a string dictionary\n */\nexport type DictionaryWithString = {\n    [key: string]: string;\n};\n\nexport type DictionaryWithPropertiesAndAdditionalProperties = {\n    foo?: number;\n    bar?: boolean;\n    [key: string]: string | number | boolean | undefined;\n};\n\n/**\n * This is a string reference\n */\nexport type DictionaryWithReference = {\n    [key: string]: ModelWithString;\n};\n\n/**\n * This is a complex dictionary\n */\nexport type DictionaryWithArray = {\n    [key: string]: Array<ModelWithString>;\n};\n\n/**\n * This is a string dictionary\n */\nexport type DictionaryWithDictionary = {\n    [key: string]: {\n        [key: string]: string;\n    };\n};\n\n/**\n * This is a complex dictionary\n */\nexport type DictionaryWithProperties = {\n    [key: string]: {\n        foo?: string;\n        bar?: string;\n    };\n};\n\n/**\n * This is a model with one number property\n */\nexport type ModelWithInteger = {\n    /**\n     * This is a simple number property\n     */\n    prop?: number;\n};\n\n/**\n * This is a model with one boolean property\n */\nexport type ModelWithBoolean = {\n    /**\n     * This is a simple boolean property\n     */\n    prop?: boolean;\n};\n\n/**\n * This is a model with one string property\n */\nexport type ModelWithString = {\n    /**\n     * This is a simple string property\n     */\n    prop?: string;\n};\n\n/**\n * This is a model with one string property\n */\nexport type ModelWithStringError = {\n    /**\n     * This is a simple string property\n     */\n    prop?: string;\n};\n\n/**\n * `Comment` or `VoiceComment`. The JSON object for adding voice comments to tickets is different. See [Adding voice comments to tickets](/documentation/ticketing/managing-tickets/adding-voice-comments-to-tickets)\n */\nexport type ModelFromZendesk = string;\n\n/**\n * This is a model with one string property\n */\nexport type ModelWithNullableString = {\n    /**\n     * This is a simple string property\n     */\n    nullableProp1?: string | null;\n    /**\n     * This is a simple string property\n     */\n    nullableRequiredProp1: string | null;\n    /**\n     * This is a simple string property\n     */\n    nullableProp2?: string | null;\n    /**\n     * This is a simple string property\n     */\n    nullableRequiredProp2: string | null;\n    /**\n     * This is a simple enum with strings\n     */\n    'foo_bar-enum'?: 'Success' | 'Warning' | 'Error' | 'ØÆÅ字符串';\n};\n\n/**\n * This is a model with one enum\n */\nexport type ModelWithEnum = {\n    /**\n     * This is a simple enum with strings\n     */\n    'foo_bar-enum'?: 'Success' | 'Warning' | 'Error' | 'ØÆÅ字符串';\n    /**\n     * These are the HTTP error code enums\n     */\n    statusCode?: '100' | '200 FOO' | '300 FOO_BAR' | '400 foo-bar' | '500 foo.bar' | '600 foo&bar';\n    /**\n     * Simple boolean enum\n     */\n    bool?: true;\n};\n\n/**\n * This is a model with one enum with escaped name\n */\nexport type ModelWithEnumWithHyphen = {\n    /**\n     * Foo-Bar-Baz-Qux\n     */\n    'foo-bar-baz-qux'?: '3.0';\n};\n\n/**\n * This is a model with one enum\n */\nexport type ModelWithEnumFromDescription = {\n    /**\n     * Success=1,Warning=2,Error=3\n     */\n    test?: number;\n};\n\n/**\n * This is a model with nested enums\n */\nexport type ModelWithNestedEnums = {\n    dictionaryWithEnum?: {\n        [key: string]: 'Success' | 'Warning' | 'Error';\n    };\n    dictionaryWithEnumFromDescription?: {\n        [key: string]: number;\n    };\n    arrayWithEnum?: Array<'Success' | 'Warning' | 'Error'>;\n    arrayWithDescription?: Array<number>;\n    /**\n     * This is a simple enum with strings\n     */\n    'foo_bar-enum'?: 'Success' | 'Warning' | 'Error' | 'ØÆÅ字符串';\n};\n\n/**\n * This is a model with one property containing a reference\n */\nexport type ModelWithReference = {\n    prop?: ModelWithProperties;\n};\n\n/**\n * This is a model with one property containing an array\n */\nexport type ModelWithArrayReadOnlyAndWriteOnly = {\n    prop?: Array<ModelWithReadOnlyAndWriteOnly>;\n    propWithFile?: Array<Blob | File>;\n    propWithNumber?: Array<number>;\n};\n\n/**\n * This is a model with one property containing an array\n */\nexport type ModelWithArray = {\n    prop?: Array<ModelWithString>;\n    propWithFile?: Array<Blob | File>;\n    propWithNumber?: Array<number>;\n};\n\n/**\n * This is a model with one property containing a dictionary\n */\nexport type ModelWithDictionary = {\n    prop?: {\n        [key: string]: string;\n    };\n};\n\n/**\n * This is a deprecated model with a deprecated property\n *\n * @deprecated\n */\nexport type DeprecatedModel = {\n    /**\n     * This is a deprecated property\n     *\n     * @deprecated\n     */\n    prop?: string;\n};\n\n/**\n * This is a model with one property containing a circular reference\n */\nexport type ModelWithCircularReference = {\n    prop?: ModelWithCircularReference;\n};\n\n/**\n * This is a model with one property with a 'one of' relationship\n */\nexport type CompositionWithOneOf = {\n    propA?: ModelWithString | ModelWithEnum | ModelWithArray | ModelWithDictionary;\n};\n\n/**\n * This is a model with one property with a 'one of' relationship where the options are not $ref\n */\nexport type CompositionWithOneOfAnonymous = {\n    propA?: {\n        propA?: string;\n    } | string | number;\n};\n\n/**\n * Circle\n */\nexport type ModelCircle = {\n    kind: string;\n    radius?: number;\n};\n\n/**\n * Square\n */\nexport type ModelSquare = {\n    kind: string;\n    sideLength?: number;\n};\n\n/**\n * This is a model with one property with a 'one of' relationship where the options are not $ref\n */\nexport type CompositionWithOneOfDiscriminator = ({\n    kind: 'circle';\n} & ModelCircle) | ({\n    kind: 'square';\n} & ModelSquare);\n\n/**\n * This is a model with one property with a 'any of' relationship\n */\nexport type CompositionWithAnyOf = {\n    propA?: ModelWithString | ModelWithEnum | ModelWithArray | ModelWithDictionary;\n};\n\n/**\n * This is a model with one property with a 'any of' relationship where the options are not $ref\n */\nexport type CompositionWithAnyOfAnonymous = {\n    propA?: {\n        propA?: string;\n    } | string | number;\n};\n\n/**\n * This is a model with nested 'any of' property with a type null\n */\nexport type CompositionWithNestedAnyAndTypeNull = {\n    propA?: Array<ModelWithDictionary | null> | Array<ModelWithArray | null>;\n};\n\nexport type _3eNum1Период = 'Bird' | 'Dog';\n\nexport type ConstValue = 'ConstValue';\n\n/**\n * This is a model with one property with a 'any of' relationship where the options are not $ref\n */\nexport type CompositionWithNestedAnyOfAndNull = {\n    /**\n     * Scopes\n     */\n    propA?: Array<_3eNum1Период | ConstValue> | null;\n};\n\n/**\n * This is a model with one property with a 'one of' relationship\n */\nexport type CompositionWithOneOfAndNullable = {\n    propA?: {\n        boolean?: boolean;\n    } | ModelWithEnum | ModelWithArray | ModelWithDictionary | null;\n};\n\n/**\n * This is a model that contains a simple dictionary within composition\n */\nexport type CompositionWithOneOfAndSimpleDictionary = {\n    propA?: boolean | {\n        [key: string]: number;\n    };\n};\n\n/**\n * This is a model that contains a dictionary of simple arrays within composition\n */\nexport type CompositionWithOneOfAndSimpleArrayDictionary = {\n    propA?: boolean | {\n        [key: string]: Array<boolean>;\n    };\n};\n\n/**\n * This is a model that contains a dictionary of complex arrays (composited) within composition\n */\nexport type CompositionWithOneOfAndComplexArrayDictionary = {\n    propA?: boolean | {\n        [key: string]: Array<number | string>;\n    };\n};\n\n/**\n * This is a model with one property with a 'all of' relationship\n */\nexport type CompositionWithAllOfAndNullable = {\n    propA?: ({\n        boolean?: boolean;\n    } & ModelWithEnum & ModelWithArray & ModelWithDictionary) | null;\n};\n\n/**\n * This is a model with one property with a 'any of' relationship\n */\nexport type CompositionWithAnyOfAndNullable = {\n    propA?: {\n        boolean?: boolean;\n    } | ModelWithEnum | ModelWithArray | ModelWithDictionary | null;\n};\n\n/**\n * This is a base model with two simple optional properties\n */\nexport type CompositionBaseModel = {\n    firstName?: string;\n    lastname?: string;\n};\n\n/**\n * This is a model that extends the base model\n */\nexport type CompositionExtendedModel = CompositionBaseModel & {\n    age: number;\n    firstName: string;\n    lastname: string;\n};\n\n/**\n * This is a model with one nested property\n */\nexport type ModelWithProperties = {\n    required: string;\n    readonly requiredAndReadOnly: string;\n    requiredAndNullable: string | null;\n    string?: string;\n    number?: number;\n    boolean?: boolean;\n    reference?: ModelWithString;\n    'property with space'?: string;\n    default?: string;\n    try?: string;\n    readonly '@namespace.string'?: string;\n    readonly '@namespace.integer'?: number;\n};\n\n/**\n * This is a model with one nested property\n */\nexport type ModelWithNestedProperties = {\n    readonly first: {\n        readonly second: {\n            readonly third: string | null;\n        } | null;\n    } | null;\n};\n\n/**\n * This is a model with duplicated properties\n */\nexport type ModelWithDuplicateProperties = {\n    prop?: ModelWithString;\n};\n\n/**\n * This is a model with ordered properties\n */\nexport type ModelWithOrderedProperties = {\n    zebra?: string;\n    apple?: string;\n    hawaii?: string;\n};\n\n/**\n * This is a model with duplicated imports\n */\nexport type ModelWithDuplicateImports = {\n    propA?: ModelWithString;\n    propB?: ModelWithString;\n    propC?: ModelWithString;\n};\n\n/**\n * This is a model that extends another model\n */\nexport type ModelThatExtends = ModelWithString & {\n    propExtendsA?: string;\n    propExtendsB?: ModelWithString;\n};\n\n/**\n * This is a model that extends another model\n */\nexport type ModelThatExtendsExtends = ModelWithString & ModelThatExtends & {\n    propExtendsC?: string;\n    propExtendsD?: ModelWithString;\n};\n\n/**\n * This is a model that contains a some patterns\n */\nexport type ModelWithPattern = {\n    key: string;\n    name: string;\n    readonly enabled?: boolean;\n    readonly modified?: string;\n    id?: string;\n    text?: string;\n    patternWithSingleQuotes?: string;\n    patternWithNewline?: string;\n    patternWithBacktick?: string;\n    patternWithUnicode?: string;\n};\n\nexport type File = {\n    /**\n     * Id\n     */\n    readonly id?: string;\n    /**\n     * Updated at\n     */\n    readonly updated_at?: string;\n    /**\n     * Created at\n     */\n    readonly created_at?: string;\n    /**\n     * Mime\n     */\n    mime: string;\n    /**\n     * File\n     */\n    readonly file?: string;\n};\n\nexport type Default = {\n    name?: string;\n};\n\nexport type Pageable = {\n    page?: number;\n    size?: number;\n    sort?: Array<string>;\n};\n\n/**\n * This is a free-form object without additionalProperties.\n */\nexport type FreeFormObjectWithoutAdditionalProperties = {\n    [key: string]: unknown;\n};\n\n/**\n * This is a free-form object with additionalProperties: true.\n */\nexport type FreeFormObjectWithAdditionalPropertiesEqTrue = {\n    [key: string]: unknown;\n};\n\n/**\n * This is a free-form object with additionalProperties: {}.\n */\nexport type FreeFormObjectWithAdditionalPropertiesEqEmptyObject = {\n    [key: string]: unknown;\n};\n\nexport type ModelWithConst = {\n    String?: 'String';\n    number?: 0;\n    null?: null;\n    withType?: 'Some string';\n};\n\n/**\n * This is a model with one property and additionalProperties: true\n */\nexport type ModelWithAdditionalPropertiesEqTrue = {\n    /**\n     * This is a simple string property\n     */\n    prop?: string;\n    [key: string]: unknown;\n};\n\nexport type NestedAnyOfArraysNullable = {\n    nullableArray?: Array<string | boolean> | null;\n};\n\nexport type CompositionWithOneOfAndProperties = ({\n    foo: SimpleParameter;\n} | {\n    bar: NonAsciiStringæøåÆøÅöôêÊ字符串;\n}) & {\n    baz: number | null;\n    qux: number;\n};\n\n/**\n * An object that can be null\n */\nexport type NullableObject = {\n    foo?: string;\n} | null;\n\n/**\n * Some % character\n */\nexport type CharactersInDescription = string;\n\nexport type ModelWithNullableObject = {\n    data?: NullableObject;\n};\n\n/**\n * An object with additional properties that can be null (anyOf ref + null)\n */\nexport type ModelWithAdditionalPropertiesRef = {\n    [key: string]: NullableObject | null;\n};\n\nexport type ModelWithOneOfEnum = {\n    foo: 'Bar';\n} | {\n    foo: 'Baz';\n} | {\n    foo: 'Qux';\n} | {\n    content: string;\n    foo: 'Quux';\n} | {\n    content: [\n        string,\n        string\n    ];\n    foo: 'Corge';\n};\n\nexport type ModelWithNestedArrayEnumsDataFoo = 'foo' | 'bar';\n\nexport type ModelWithNestedArrayEnumsDataBar = 'baz' | 'qux';\n\nexport type ModelWithNestedArrayEnumsData = {\n    foo?: Array<ModelWithNestedArrayEnumsDataFoo>;\n    bar?: Array<ModelWithNestedArrayEnumsDataBar>;\n};\n\nexport type ModelWithNestedArrayEnums = {\n    array_strings?: Array<string>;\n    data?: ModelWithNestedArrayEnumsData;\n};\n\nexport type ModelWithNestedCompositionEnums = {\n    foo?: ModelWithNestedArrayEnumsDataFoo;\n};\n\nexport type ModelWithReadOnlyAndWriteOnly = {\n    foo: string;\n    readonly bar: string;\n};\n\nexport type ModelWithConstantSizeArray = [\n    number,\n    number\n];\n\nexport type ModelWithAnyOfConstantSizeArray = [\n    number | string,\n    number | string,\n    number | string\n];\n\nexport type ModelWithPrefixItemsConstantSizeArray = [\n    ModelWithInteger,\n    number | string,\n    string\n];\n\nexport type ModelWithAnyOfConstantSizeArrayNullable = [\n    number | null | string,\n    number | null | string,\n    number | null | string\n];\n\nexport type ModelWithAnyOfConstantSizeArrayWithNSizeAndOptions = [\n    number | Import,\n    number | Import\n];\n\nexport type ModelWithAnyOfConstantSizeArrayAndIntersect = [\n    number & string,\n    number & string\n];\n\nexport type ModelWithNumericEnumUnion = {\n    /**\n     * Период\n     */\n    value?: -10 | -1 | 0 | 1 | 3 | 6 | 12;\n};\n\n/**\n * Some description with `back ticks`\n */\nexport type ModelWithBackticksInDescription = {\n    /**\n     * The template `that` should be used for parsing and importing the contents of the CSV file.\n     *\n     * <br/><p>There is one placeholder currently supported:<ul>     <li><b>${x}</b> - refers to the n-th column in the CSV file, e.g. ${1}, ${2}, ...)</li></ul><p>Example of a correct JSON template:</p>\n     * <pre>\n     * [\n     * {\n     * \"resourceType\": \"Asset\",\n     * \"identifier\": {\n     * \"name\": \"${1}\",\n     * \"domain\": {\n     * \"name\": \"${2}\",\n     * \"community\": {\n     * \"name\": \"Some Community\"\n     * }\n     * }\n     * },\n     * \"attributes\" : {\n     * \"00000000-0000-0000-0000-000000003115\" : [ {\n     * \"value\" : \"${3}\"\n     * } ],\n     * \"00000000-0000-0000-0000-000000000222\" : [ {\n     * \"value\" : \"${4}\"\n     * } ]\n     * }\n     * }\n     * ]\n     * </pre>\n     */\n    template?: string;\n};\n\nexport type ModelWithOneOfAndProperties = (SimpleParameter | NonAsciiStringæøåÆøÅöôêÊ字符串) & {\n    baz: number | null;\n    qux: number;\n};\n\n/**\n * Model used to test deduplication strategy (unused)\n */\nexport type ParameterSimpleParameterUnused = string;\n\n/**\n * Model used to test deduplication strategy\n */\nexport type PostServiceWithEmptyTagResponse = string;\n\n/**\n * Model used to test deduplication strategy\n */\nexport type PostServiceWithEmptyTagResponse2 = string;\n\n/**\n * Model used to test deduplication strategy\n */\nexport type DeleteFooData = string;\n\n/**\n * Model used to test deduplication strategy\n */\nexport type DeleteFooData2 = string;\n\n/**\n * Model with restricted keyword name\n */\nexport type Import = string;\n\nexport type SchemaWithFormRestrictedKeys = {\n    description?: string;\n    'x-enum-descriptions'?: string;\n    'x-enum-varnames'?: string;\n    'x-enumNames'?: string;\n    title?: string;\n    object?: {\n        description?: string;\n        'x-enum-descriptions'?: string;\n        'x-enum-varnames'?: string;\n        'x-enumNames'?: string;\n        title?: string;\n    };\n    array?: Array<{\n        description?: string;\n        'x-enum-descriptions'?: string;\n        'x-enum-varnames'?: string;\n        'x-enumNames'?: string;\n        title?: string;\n    }>;\n};\n\n/**\n * This schema was giving PascalCase transformations a hard time\n */\nexport type IoK8sApimachineryPkgApisMetaV1DeleteOptions = {\n    /**\n     * Must be fulfilled before a deletion is carried out. If not possible, a 409 Conflict status will be returned.\n     */\n    preconditions?: IoK8sApimachineryPkgApisMetaV1Preconditions;\n};\n\n/**\n * This schema was giving PascalCase transformations a hard time\n */\nexport type IoK8sApimachineryPkgApisMetaV1Preconditions = {\n    /**\n     * Specifies the target ResourceVersion\n     */\n    resourceVersion?: string;\n    /**\n     * Specifies the target UID.\n     */\n    uid?: string;\n};\n\nexport type AdditionalPropertiesUnknownIssue = {\n    [key: string]: string | number;\n};\n\nexport type AdditionalPropertiesUnknownIssue2 = {\n    [key: string]: string | number;\n};\n\nexport type AdditionalPropertiesUnknownIssue3 = string & {\n    entries: {\n        [key: string]: AdditionalPropertiesUnknownIssue;\n    };\n};\n\nexport type AdditionalPropertiesIntegerIssue = {\n    value: number;\n    [key: string]: number;\n};\n\nexport type OneOfAllOfIssue = ((ConstValue | GenericSchemaDuplicateIssue1SystemBoolean) & _3eNum1Период) | GenericSchemaDuplicateIssue1SystemString;\n\nexport type GenericSchemaDuplicateIssue1SystemBoolean = {\n    item?: boolean;\n    error?: string | null;\n    readonly hasError?: boolean;\n    data?: {\n        [key: string]: never;\n    };\n};\n\nexport type GenericSchemaDuplicateIssue1SystemString = {\n    item?: string | null;\n    error?: string | null;\n    readonly hasError?: boolean;\n};\n\nexport type ExternalSharedModel = {\n    id: string;\n    name?: string;\n};\n\n/**\n * This is a model with one property containing a reference\n */\nexport type ModelWithReferenceWritable = {\n    prop?: ModelWithPropertiesWritable;\n};\n\n/**\n * This is a model with one property containing an array\n */\nexport type ModelWithArrayReadOnlyAndWriteOnlyWritable = {\n    prop?: Array<ModelWithReadOnlyAndWriteOnlyWritable>;\n    propWithFile?: Array<Blob | File>;\n    propWithNumber?: Array<number>;\n};\n\n/**\n * This is a model with one nested property\n */\nexport type ModelWithPropertiesWritable = {\n    required: string;\n    requiredAndNullable: string | null;\n    string?: string;\n    number?: number;\n    boolean?: boolean;\n    reference?: ModelWithString;\n    'property with space'?: string;\n    default?: string;\n    try?: string;\n};\n\n/**\n * This is a model that contains a some patterns\n */\nexport type ModelWithPatternWritable = {\n    key: string;\n    name: string;\n    id?: string;\n    text?: string;\n    patternWithSingleQuotes?: string;\n    patternWithNewline?: string;\n    patternWithBacktick?: string;\n    patternWithUnicode?: string;\n};\n\nexport type FileWritable = {\n    /**\n     * Mime\n     */\n    mime: string;\n};\n\nexport type ModelWithReadOnlyAndWriteOnlyWritable = {\n    foo: string;\n    baz: string;\n};\n\nexport type ModelWithAnyOfConstantSizeArrayWithNSizeAndOptionsWritable = [\n    number | Import,\n    number | Import\n];\n\nexport type AdditionalPropertiesUnknownIssueWritable = {\n    [key: string]: string | number;\n};\n\nexport type OneOfAllOfIssueWritable = ((ConstValue | GenericSchemaDuplicateIssue1SystemBoolean) & _3eNum1Период) | GenericSchemaDuplicateIssue1SystemString;\n\nexport type GenericSchemaDuplicateIssue1SystemBooleanWritable = {\n    item?: boolean;\n    error?: string | null;\n    data?: {\n        [key: string]: never;\n    };\n};\n\nexport type GenericSchemaDuplicateIssue1SystemStringWritable = {\n    item?: string | null;\n    error?: string | null;\n};\n\n/**\n * This is a reusable parameter\n */\nexport type SimpleParameter = string;\n\n/**\n * Parameter with illegal characters\n */\nexport type XFooBar = ModelWithString;\n\n/**\n * A reusable request body\n */\nexport type SimpleRequestBody = ModelWithString;\n\n/**\n * A reusable request body\n */\nexport type SimpleFormData = ModelWithString;\n\nexport type ExportData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no+tag';\n};\n\nexport type PatchApiVbyApiVersionNoTagData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no+tag';\n};\n\nexport type PatchApiVbyApiVersionNoTagResponses = {\n    /**\n     * OK\n     */\n    default: unknown;\n};\n\nexport type ImportData = {\n    body: ModelWithReadOnlyAndWriteOnlyWritable | ModelWithArrayReadOnlyAndWriteOnlyWritable;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no+tag';\n};\n\nexport type ImportResponses = {\n    /**\n     * Success\n     */\n    200: ModelFromZendesk;\n    /**\n     * Default success response\n     */\n    default: ModelWithReadOnlyAndWriteOnly;\n};\n\nexport type ImportResponse = ImportResponses[keyof ImportResponses];\n\nexport type FooWowData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no+tag';\n};\n\nexport type FooWowResponses = {\n    /**\n     * OK\n     */\n    default: unknown;\n};\n\nexport type ApiVVersionODataControllerCountData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple/$count';\n};\n\nexport type ApiVVersionODataControllerCountResponses = {\n    /**\n     * Success\n     */\n    200: ModelFromZendesk;\n};\n\nexport type ApiVVersionODataControllerCountResponse = ApiVVersionODataControllerCountResponses[keyof ApiVVersionODataControllerCountResponses];\n\nexport type GetApiVbyApiVersionSimpleOperationData = {\n    body?: never;\n    path: {\n        /**\n         * foo in method\n         */\n        foo_param: string;\n    };\n    query?: never;\n    url: '/api/v{api-version}/simple:operation';\n};\n\nexport type GetApiVbyApiVersionSimpleOperationErrors = {\n    /**\n     * Default error response\n     */\n    default: ModelWithBoolean;\n};\n\nexport type GetApiVbyApiVersionSimpleOperationError = GetApiVbyApiVersionSimpleOperationErrors[keyof GetApiVbyApiVersionSimpleOperationErrors];\n\nexport type GetApiVbyApiVersionSimpleOperationResponses = {\n    /**\n     * Response is a simple number\n     */\n    200: number;\n};\n\nexport type GetApiVbyApiVersionSimpleOperationResponse = GetApiVbyApiVersionSimpleOperationResponses[keyof GetApiVbyApiVersionSimpleOperationResponses];\n\nexport type DeleteCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type GetCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type HeadCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type OptionsCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type PatchCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type PostCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type PutCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type DeleteFooData3 = {\n    body?: never;\n    headers: {\n        /**\n         * Parameter with illegal characters\n         */\n        'x-Foo-Bar': ModelWithString;\n    };\n    path: {\n        /**\n         * foo in method\n         */\n        foo_param: string;\n        /**\n         * bar in method\n         */\n        BarParam: string;\n    };\n    query?: never;\n    url: '/api/v{api-version}/foo/{foo_param}/bar/{BarParam}';\n};\n\nexport type CallWithDescriptionsData = {\n    body?: never;\n    path?: never;\n    query?: {\n        /**\n         * Testing multiline comments in string: First line\n         * Second line\n         *\n         * Fourth line\n         */\n        parameterWithBreaks?: string;\n        /**\n         * Testing backticks in string: `backticks` and ```multiple backticks``` should work\n         */\n        parameterWithBackticks?: string;\n        /**\n         * Testing slashes in string: \\backwards\\\\\\ and /forwards/// should work\n         */\n        parameterWithSlashes?: string;\n        /**\n         * Testing expression placeholders in string: ${expression} should work\n         */\n        parameterWithExpressionPlaceholders?: string;\n        /**\n         * Testing quotes in string: 'single quote''' and \"double quotes\"\"\" should work\n         */\n        parameterWithQuotes?: string;\n        /**\n         * Testing reserved characters in string: * inline * and ** inline ** should work\n         */\n        parameterWithReservedCharacters?: string;\n    };\n    url: '/api/v{api-version}/descriptions';\n};\n\nexport type DeprecatedCallData = {\n    body?: never;\n    headers: {\n        /**\n         * This parameter is deprecated\n         *\n         * @deprecated\n         */\n        parameter: DeprecatedModel | null;\n    };\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/parameters/deprecated';\n};\n\nexport type CallWithParametersData = {\n    /**\n     * This is the parameter that goes into the body\n     */\n    body: {\n        [key: string]: unknown;\n    } | null;\n    headers: {\n        /**\n         * This is the parameter that goes into the header\n         */\n        parameterHeader: string | null;\n    };\n    path: {\n        /**\n         * This is the parameter that goes into the path\n         */\n        parameterPath: string | null;\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string | null;\n    };\n    query: {\n        foo_ref_enum?: ModelWithNestedArrayEnumsDataFoo;\n        foo_all_of_enum: ModelWithNestedArrayEnumsDataFoo;\n        /**\n         * This is the parameter that goes into the query params\n         */\n        cursor: string | null;\n    };\n    url: '/api/v{api-version}/parameters/{parameterPath}';\n};\n\nexport type CallWithWeirdParameterNamesData = {\n    /**\n     * This is the parameter that goes into the body\n     */\n    body: ModelWithString | null;\n    headers: {\n        /**\n         * This is the parameter that goes into the request header\n         */\n        'parameter.header': string | null;\n    };\n    path: {\n        /**\n         * This is the parameter that goes into the path\n         */\n        'parameter.path.1'?: string;\n        /**\n         * This is the parameter that goes into the path\n         */\n        'parameter-path-2'?: string;\n        /**\n         * This is the parameter that goes into the path\n         */\n        'PARAMETER-PATH-3'?: string;\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string | null;\n    };\n    query: {\n        /**\n         * This is the parameter with a reserved keyword\n         */\n        default?: string;\n        /**\n         * This is the parameter that goes into the request query params\n         */\n        'parameter-query': string | null;\n    };\n    url: '/api/v{api-version}/parameters/{parameter.path.1}/{parameter-path-2}/{PARAMETER-PATH-3}';\n};\n\nexport type GetCallWithOptionalParamData = {\n    /**\n     * This is a required parameter\n     */\n    body: ModelWithOneOfEnum;\n    path?: never;\n    query?: {\n        /**\n         * This is an optional parameter\n         */\n        page?: number;\n    };\n    url: '/api/v{api-version}/parameters';\n};\n\nexport type PostCallWithOptionalParamData = {\n    /**\n     * This is an optional parameter\n     */\n    body?: {\n        offset?: number | null;\n    };\n    path?: never;\n    query: {\n        /**\n         * This is a required parameter\n         */\n        parameter: Pageable;\n    };\n    url: '/api/v{api-version}/parameters';\n};\n\nexport type PostCallWithOptionalParamResponses = {\n    /**\n     * Response is a simple number\n     */\n    200: number;\n    /**\n     * Success\n     */\n    204: void;\n};\n\nexport type PostCallWithOptionalParamResponse = PostCallWithOptionalParamResponses[keyof PostCallWithOptionalParamResponses];\n\nexport type PostApiVbyApiVersionRequestBodyData = {\n    /**\n     * A reusable request body\n     */\n    body?: SimpleRequestBody;\n    path?: never;\n    query?: {\n        /**\n         * This is a reusable parameter\n         */\n        parameter?: string;\n    };\n    url: '/api/v{api-version}/requestBody';\n};\n\nexport type PostApiVbyApiVersionFormDataData = {\n    /**\n     * A reusable request body\n     */\n    body?: SimpleFormData;\n    path?: never;\n    query?: {\n        /**\n         * This is a reusable parameter\n         */\n        parameter?: string;\n    };\n    url: '/api/v{api-version}/formData';\n};\n\nexport type CallWithDefaultParametersData = {\n    body?: never;\n    path?: never;\n    query?: {\n        /**\n         * This is a simple string with default value\n         */\n        parameterString?: string | null;\n        /**\n         * This is a simple number with default value\n         */\n        parameterNumber?: number | null;\n        /**\n         * This is a simple boolean with default value\n         */\n        parameterBoolean?: boolean | null;\n        /**\n         * This is a simple enum with default value\n         */\n        parameterEnum?: 'Success' | 'Warning' | 'Error';\n        /**\n         * This is a simple model with default value\n         */\n        parameterModel?: ModelWithString | null;\n    };\n    url: '/api/v{api-version}/defaults';\n};\n\nexport type CallWithDefaultOptionalParametersData = {\n    body?: never;\n    path?: never;\n    query?: {\n        /**\n         * This is a simple string that is optional with default value\n         */\n        parameterString?: string;\n        /**\n         * This is a simple number that is optional with default value\n         */\n        parameterNumber?: number;\n        /**\n         * This is a simple boolean that is optional with default value\n         */\n        parameterBoolean?: boolean;\n        /**\n         * This is a simple enum that is optional with default value\n         */\n        parameterEnum?: 'Success' | 'Warning' | 'Error';\n        /**\n         * This is a simple model that is optional with default value\n         */\n        parameterModel?: ModelWithString;\n    };\n    url: '/api/v{api-version}/defaults';\n};\n\nexport type CallToTestOrderOfParamsData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * This is a optional string with default\n         */\n        parameterOptionalStringWithDefault?: string;\n        /**\n         * This is a optional string with empty default\n         */\n        parameterOptionalStringWithEmptyDefault?: string;\n        /**\n         * This is a optional string with no default\n         */\n        parameterOptionalStringWithNoDefault?: string;\n        /**\n         * This is a string with default\n         */\n        parameterStringWithDefault: string;\n        /**\n         * This is a string with empty default\n         */\n        parameterStringWithEmptyDefault: string;\n        /**\n         * This is a string with no default\n         */\n        parameterStringWithNoDefault: string;\n        /**\n         * This is a string that can be null with no default\n         */\n        parameterStringNullableWithNoDefault?: string | null;\n        /**\n         * This is a string that can be null with default\n         */\n        parameterStringNullableWithDefault?: string | null;\n    };\n    url: '/api/v{api-version}/defaults';\n};\n\nexport type DuplicateNameData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/duplicate';\n};\n\nexport type DuplicateName2Data = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/duplicate';\n};\n\nexport type DuplicateName3Data = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/duplicate';\n};\n\nexport type DuplicateName4Data = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/duplicate';\n};\n\nexport type CallWithNoContentResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no-content';\n};\n\nexport type CallWithNoContentResponseResponses = {\n    /**\n     * Success\n     */\n    204: void;\n};\n\nexport type CallWithNoContentResponseResponse = CallWithNoContentResponseResponses[keyof CallWithNoContentResponseResponses];\n\nexport type CallWithResponseAndNoContentResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multiple-tags/response-and-no-content';\n};\n\nexport type CallWithResponseAndNoContentResponseResponses = {\n    /**\n     * Response is a simple number\n     */\n    200: number;\n    /**\n     * Success\n     */\n    204: void;\n};\n\nexport type CallWithResponseAndNoContentResponseResponse = CallWithResponseAndNoContentResponseResponses[keyof CallWithResponseAndNoContentResponseResponses];\n\nexport type DummyAData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multiple-tags/a';\n};\n\nexport type DummyAResponses = {\n    200: _400;\n};\n\nexport type DummyAResponse = DummyAResponses[keyof DummyAResponses];\n\nexport type DummyBData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multiple-tags/b';\n};\n\nexport type DummyBResponses = {\n    /**\n     * Success\n     */\n    204: void;\n};\n\nexport type DummyBResponse = DummyBResponses[keyof DummyBResponses];\n\nexport type CallWithResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/response';\n};\n\nexport type CallWithResponseResponses = {\n    default: Import;\n};\n\nexport type CallWithResponseResponse = CallWithResponseResponses[keyof CallWithResponseResponses];\n\nexport type CallWithDuplicateResponsesData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/response';\n};\n\nexport type CallWithDuplicateResponsesErrors = {\n    /**\n     * Message for 500 error\n     */\n    500: ModelWithStringError;\n    /**\n     * Message for 501 error\n     */\n    501: ModelWithStringError;\n    /**\n     * Message for 502 error\n     */\n    502: ModelWithStringError;\n    /**\n     * Message for 4XX errors\n     */\n    '4XX': DictionaryWithArray;\n    /**\n     * Default error response\n     */\n    default: ModelWithBoolean;\n};\n\nexport type CallWithDuplicateResponsesError = CallWithDuplicateResponsesErrors[keyof CallWithDuplicateResponsesErrors];\n\nexport type CallWithDuplicateResponsesResponses = {\n    /**\n     * Message for 200 response\n     */\n    200: ModelWithBoolean & ModelWithInteger;\n    /**\n     * Message for 201 response\n     */\n    201: ModelWithString;\n    /**\n     * Message for 202 response\n     */\n    202: ModelWithString;\n};\n\nexport type CallWithDuplicateResponsesResponse = CallWithDuplicateResponsesResponses[keyof CallWithDuplicateResponsesResponses];\n\nexport type CallWithResponsesData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/response';\n};\n\nexport type CallWithResponsesErrors = {\n    /**\n     * Message for 500 error\n     */\n    500: ModelWithStringError;\n    /**\n     * Message for 501 error\n     */\n    501: ModelWithStringError;\n    /**\n     * Message for 502 error\n     */\n    502: ModelWithStringError;\n    /**\n     * Message for default response\n     */\n    default: ModelWithStringError;\n};\n\nexport type CallWithResponsesError = CallWithResponsesErrors[keyof CallWithResponsesErrors];\n\nexport type CallWithResponsesResponses = {\n    /**\n     * Message for 200 response\n     */\n    200: {\n        readonly '@namespace.string'?: string;\n        readonly '@namespace.integer'?: number;\n        readonly value?: Array<ModelWithString>;\n    };\n    /**\n     * Message for 201 response\n     */\n    201: ModelThatExtends;\n    /**\n     * Message for 202 response\n     */\n    202: ModelThatExtendsExtends;\n};\n\nexport type CallWithResponsesResponse = CallWithResponsesResponses[keyof CallWithResponsesResponses];\n\nexport type CollectionFormatData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * This is an array parameter that is sent as csv format (comma-separated values)\n         */\n        parameterArrayCSV: Array<string> | null;\n        /**\n         * This is an array parameter that is sent as ssv format (space-separated values)\n         */\n        parameterArraySSV: Array<string> | null;\n        /**\n         * This is an array parameter that is sent as tsv format (tab-separated values)\n         */\n        parameterArrayTSV: Array<string> | null;\n        /**\n         * This is an array parameter that is sent as pipes format (pipe-separated values)\n         */\n        parameterArrayPipes: Array<string> | null;\n        /**\n         * This is an array parameter that is sent as multi format (multiple parameter instances)\n         */\n        parameterArrayMulti: Array<string> | null;\n    };\n    url: '/api/v{api-version}/collectionFormat';\n};\n\nexport type TypesData = {\n    body?: never;\n    path?: {\n        /**\n         * This is a number parameter\n         */\n        id?: number;\n    };\n    query: {\n        /**\n         * This is a number parameter\n         */\n        parameterNumber: number;\n        /**\n         * This is a string parameter\n         */\n        parameterString: string | null;\n        /**\n         * This is a boolean parameter\n         */\n        parameterBoolean: boolean | null;\n        /**\n         * This is an object parameter\n         */\n        parameterObject: {\n            [key: string]: unknown;\n        } | null;\n        /**\n         * This is an array parameter\n         */\n        parameterArray: Array<string> | null;\n        /**\n         * This is a dictionary parameter\n         */\n        parameterDictionary: {\n            [key: string]: unknown;\n        } | null;\n        /**\n         * This is an enum parameter\n         */\n        parameterEnum: 'Success' | 'Warning' | 'Error' | null;\n    };\n    url: '/api/v{api-version}/types';\n};\n\nexport type TypesResponses = {\n    /**\n     * Response is a simple number\n     */\n    200: number;\n    /**\n     * Response is a simple string\n     */\n    201: string;\n    /**\n     * Response is a simple boolean\n     */\n    202: boolean;\n    /**\n     * Response is a simple object\n     */\n    203: {\n        [key: string]: unknown;\n    };\n};\n\nexport type TypesResponse = TypesResponses[keyof TypesResponses];\n\nexport type UploadFileData = {\n    body: Blob | File;\n    path: {\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string | null;\n    };\n    query?: never;\n    url: '/api/v{api-version}/upload';\n};\n\nexport type UploadFileResponses = {\n    200: boolean;\n};\n\nexport type UploadFileResponse = UploadFileResponses[keyof UploadFileResponses];\n\nexport type FileResponseData = {\n    body?: never;\n    path: {\n        id: string;\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string;\n    };\n    query?: never;\n    url: '/api/v{api-version}/file/{id}';\n};\n\nexport type FileResponseResponses = {\n    /**\n     * Success\n     */\n    200: Blob | File;\n};\n\nexport type FileResponseResponse = FileResponseResponses[keyof FileResponseResponses];\n\nexport type ComplexTypesData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * Parameter containing object\n         */\n        parameterObject: {\n            first?: {\n                second?: {\n                    third?: string;\n                };\n            };\n        };\n        /**\n         * Parameter containing reference\n         */\n        parameterReference: ModelWithString;\n    };\n    url: '/api/v{api-version}/complex';\n};\n\nexport type ComplexTypesErrors = {\n    /**\n     * 400 `server` error\n     */\n    400: unknown;\n    /**\n     * 500 server error\n     */\n    500: unknown;\n};\n\nexport type ComplexTypesResponses = {\n    /**\n     * Successful response\n     */\n    200: Array<ModelWithString>;\n};\n\nexport type ComplexTypesResponse = ComplexTypesResponses[keyof ComplexTypesResponses];\n\nexport type MultipartResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multipart';\n};\n\nexport type MultipartResponseResponses = {\n    /**\n     * OK\n     */\n    200: {\n        file?: Blob | File;\n        metadata?: {\n            foo?: string;\n            bar?: string;\n        };\n    };\n};\n\nexport type MultipartResponseResponse = MultipartResponseResponses[keyof MultipartResponseResponses];\n\nexport type MultipartRequestData = {\n    body?: {\n        content?: Blob | File;\n        data?: ModelWithString | null;\n    };\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multipart';\n};\n\nexport type ComplexParamsData = {\n    body?: {\n        readonly key: string | null;\n        name: string | null;\n        enabled?: boolean;\n        type: 'Monkey' | 'Horse' | 'Bird';\n        listOfModels?: Array<ModelWithString> | null;\n        listOfStrings?: Array<string> | null;\n        parameters: ModelWithString | ModelWithEnum | ModelWithArray | ModelWithDictionary;\n        readonly user?: {\n            readonly id?: number;\n            readonly name?: string | null;\n        };\n    };\n    path: {\n        id: number;\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string;\n    };\n    query?: never;\n    url: '/api/v{api-version}/complex/{id}';\n};\n\nexport type ComplexParamsResponses = {\n    /**\n     * Success\n     */\n    200: ModelWithString;\n};\n\nexport type ComplexParamsResponse = ComplexParamsResponses[keyof ComplexParamsResponses];\n\nexport type CallWithResultFromHeaderData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/header';\n};\n\nexport type CallWithResultFromHeaderErrors = {\n    /**\n     * 400 server error\n     */\n    400: unknown;\n    /**\n     * 500 server error\n     */\n    500: unknown;\n};\n\nexport type CallWithResultFromHeaderResponses = {\n    /**\n     * Successful response\n     */\n    200: unknown;\n};\n\nexport type TestErrorCodeData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * Status code to return\n         */\n        status: number;\n    };\n    url: '/api/v{api-version}/error';\n};\n\nexport type TestErrorCodeErrors = {\n    /**\n     * Custom message: Internal Server Error\n     */\n    500: unknown;\n    /**\n     * Custom message: Not Implemented\n     */\n    501: unknown;\n    /**\n     * Custom message: Bad Gateway\n     */\n    502: unknown;\n    /**\n     * Custom message: Service Unavailable\n     */\n    503: unknown;\n};\n\nexport type TestErrorCodeResponses = {\n    /**\n     * Custom message: Successful response\n     */\n    200: unknown;\n};\n\nexport type NonAsciiæøåÆøÅöôêÊ字符串Data = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * Dummy input param\n         */\n        nonAsciiParamæøåÆØÅöôêÊ: number;\n    };\n    url: '/api/v{api-version}/non-ascii-æøåÆØÅöôêÊ字符串';\n};\n\nexport type NonAsciiæøåÆøÅöôêÊ字符串Responses = {\n    /**\n     * Successful response\n     */\n    200: Array<NonAsciiStringæøåÆøÅöôêÊ字符串>;\n};\n\nexport type NonAsciiæøåÆøÅöôêÊ字符串Response = NonAsciiæøåÆøÅöôêÊ字符串Responses[keyof NonAsciiæøåÆøÅöôêÊ字符串Responses];\n\nexport type PutWithFormUrlEncodedData = {\n    body: ArrayWithStrings;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/non-ascii-æøåÆØÅöôêÊ字符串';\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-ky/clean-false/client/client.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { HTTPError, Options as KyOptions } from 'ky';\nimport ky from 'ky';\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, RetryOptions } from './types.gen';\nimport type { Middleware } from './utils.gen';\nimport {\n  buildUrl,\n  createConfig,\n  createInterceptors,\n  getParseAs,\n  mergeConfigs,\n  mergeHeaders,\n  setAuthParams,\n} from './utils.gen';\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 (options: RequestOptions) => {\n    const opts = {\n      ..._config,\n      ...options,\n      headers: mergeHeaders(_config.headers, options.headers),\n      ky: options.ky ?? _config.ky ?? ky,\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    if (opts.body === undefined || opts.serializedBody === '') {\n      opts.headers.delete('Content-Type');\n    }\n\n    const url = buildUrl(opts);\n\n    return { opts, url };\n  };\n\n  const parseErrorResponse = async (\n    response: Response,\n    request: Request,\n    opts: ResolvedRequestOptions,\n    interceptorsMiddleware: Middleware<Request, Response, unknown, ResolvedRequestOptions>,\n  ) => {\n    const result = {\n      request,\n      response,\n    };\n\n    const textError = await response.text();\n    let jsonError: unknown;\n\n    try {\n      jsonError = JSON.parse(textError);\n    } catch {\n      jsonError = undefined;\n    }\n\n    const error = jsonError ?? textError;\n    let finalError = error;\n\n    for (const fn of interceptorsMiddleware.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    return opts.responseStyle === 'data'\n      ? undefined\n      : {\n          error: finalError,\n          ...result,\n        };\n  };\n\n  const request: Client['request'] = async (options) => {\n    // @ts-expect-error\n    const { opts, url } = await beforeRequest(options);\n\n    const kyInstance = opts.ky!;\n\n    const validBody = getValidRequestBody(opts);\n\n    const kyOptions: KyOptions = {\n      body: validBody as BodyInit,\n      cache: opts.cache,\n      credentials: opts.credentials,\n      headers: opts.headers,\n      integrity: opts.integrity,\n      keepalive: opts.keepalive,\n      method: opts.method as KyOptions['method'],\n      mode: opts.mode,\n      redirect: 'follow',\n      referrer: opts.referrer,\n      referrerPolicy: opts.referrerPolicy,\n      signal: opts.signal,\n      throwHttpErrors: opts.throwOnError ?? false,\n      timeout: opts.timeout,\n      ...opts.kyOptions,\n    };\n\n    if (opts.retry && typeof opts.retry === 'object') {\n      const retryOpts = opts.retry as RetryOptions;\n      kyOptions.retry = {\n        limit: retryOpts.limit ?? 2,\n        methods: retryOpts.methods as Array<\n          'get' | 'post' | 'put' | 'patch' | 'head' | 'delete' | 'options' | 'trace'\n        >,\n        statusCodes: retryOpts.statusCodes,\n      };\n    }\n\n    let request = new Request(url, {\n      body: kyOptions.body as BodyInit,\n      headers: kyOptions.headers as HeadersInit,\n      method: kyOptions.method,\n    });\n\n    for (const fn of interceptors.request.fns) {\n      if (fn) {\n        request = await fn(request, opts);\n      }\n    }\n\n    let response: Response;\n\n    try {\n      response = await kyInstance(request, kyOptions);\n    } catch (error) {\n      if (error && typeof error === 'object' && 'response' in error) {\n        const httpError = error as HTTPError;\n        response = httpError.response;\n\n        for (const fn of interceptors.response.fns) {\n          if (fn) {\n            response = await fn(response, request, opts);\n          }\n        }\n\n        return parseErrorResponse(response, request, opts, interceptors);\n      }\n\n      throw error;\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    return parseErrorResponse(response, request, opts, interceptors);\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      fetch: globalThis.fetch,\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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-ky/clean-false/client/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type { Auth } from '../core/auth.gen';\nexport type { QuerySerializerOptions } from '../core/bodySerializer.gen';\nexport {\n  formDataBodySerializer,\n  jsonBodySerializer,\n  urlSearchParamsBodySerializer,\n} from '../core/bodySerializer.gen';\nexport { buildClientParams } from '../core/params.gen';\nexport { serializeQueryKeyValue } from '../core/queryKeySerializer.gen';\nexport { createClient } from './client.gen';\nexport type {\n  Client,\n  ClientOptions,\n  Config,\n  CreateClientConfig,\n  Options,\n  RequestOptions,\n  RequestResult,\n  ResolvedRequestOptions,\n  ResponseStyle,\n  RetryOptions,\n  TDataShape,\n} from './types.gen';\nexport { createConfig, mergeHeaders } from './utils.gen';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-ky/clean-false/client/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { Options as KyOptions } from 'ky';\nimport type ky from 'ky';\n\nimport type { Auth } from '../core/auth.gen';\nimport type {\n  ServerSentEventsOptions,\n  ServerSentEventsResult,\n} from '../core/serverSentEvents.gen';\nimport type { Client as CoreClient, Config as CoreConfig } from '../core/types.gen';\nimport type { Middleware } from './utils.gen';\n\nexport type ResponseStyle = 'data' | 'fields';\n\nexport interface RetryOptions {\n  /**\n   * Maximum number of retry attempts\n   *\n   * @default 2\n   */\n  limit?: number;\n  /**\n   * HTTP methods to retry\n   *\n   * @default ['get', 'put', 'head', 'delete', 'options', 'trace']\n   */\n  methods?: Array<'get' | 'post' | 'put' | 'delete' | 'patch' | 'head' | 'options' | 'trace'>;\n  /**\n   * HTTP status codes to retry\n   *\n   * @default [408, 413, 429, 500, 502, 503, 504]\n   */\n  statusCodes?: number[];\n}\n\nexport interface Config<T extends ClientOptions = ClientOptions>\n  extends\n    Omit<KyOptions, 'body' | 'headers' | 'method' | 'prefixUrl' | 'retry' | 'throwHttpErrors'>,\n    CoreConfig {\n  /**\n   * Base URL for all requests made by this client.\n   */\n  baseUrl?: T['baseUrl'];\n  /**\n   * Ky instance to use. You can use this option to provide a custom\n   * ky instance.\n   */\n  ky?: typeof ky;\n  /**\n   * Additional ky-specific options that will be passed directly to ky.\n   * This allows you to use any ky option not explicitly exposed in the config.\n   */\n  kyOptions?: Omit<KyOptions, 'method' | 'prefixUrl'>;\n  /**\n   * Return the response data parsed in a specified format. By default, `auto`\n   * will infer the appropriate method from the `Content-Type` response header.\n   * You can override this behavior with any of the {@link Body} methods.\n   * Select `stream` if you don't want to parse response data at all.\n   *\n   * @default 'auto'\n   */\n  parseAs?: 'arrayBuffer' | 'auto' | 'blob' | 'formData' | 'json' | 'stream' | 'text';\n  /**\n   * Should we return only data or multiple fields (data, error, response, etc.)?\n   *\n   * @default 'fields'\n   */\n  responseStyle?: ResponseStyle;\n  /**\n   * Retry configuration\n   */\n  retry?: RetryOptions;\n  /**\n   * Throw an error instead of returning it in the response?\n   *\n   * @default false\n   */\n  throwOnError?: T['throwOnError'];\n  /**\n   * Request timeout in milliseconds\n   *\n   * @default 10000\n   */\n  timeout?: number;\n}\n\nexport interface RequestOptions<\n  TData = unknown,\n  TResponseStyle extends ResponseStyle = 'fields',\n  ThrowOnError extends boolean = boolean,\n  Url extends string = string,\n>\n  extends\n    Config<{\n      responseStyle: TResponseStyle;\n      throwOnError: ThrowOnError;\n    }>,\n    Pick<\n      ServerSentEventsOptions<TData>,\n      | 'onRequest'\n      | 'onSseError'\n      | 'onSseEvent'\n      | 'sseDefaultRetryDelay'\n      | 'sseMaxRetryAttempts'\n      | 'sseMaxRetryDelay'\n    > {\n  /**\n   * Any body that you want to add to your request.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/fetch#body}\n   */\n  body?: unknown;\n  path?: Record<string, unknown>;\n  query?: Record<string, unknown>;\n  /**\n   * Security mechanism(s) to use for the request.\n   */\n  security?: ReadonlyArray<Auth>;\n  url: Url;\n}\n\nexport interface ResolvedRequestOptions<\n  TResponseStyle extends ResponseStyle = 'fields',\n  ThrowOnError extends boolean = boolean,\n  Url extends string = string,\n> extends RequestOptions<unknown, TResponseStyle, ThrowOnError, Url> {\n  serializedBody?: string;\n}\n\nexport type RequestResult<\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = boolean,\n  TResponseStyle extends ResponseStyle = 'fields',\n> = ThrowOnError extends true\n  ? Promise<\n      TResponseStyle extends 'data'\n        ? TData extends Record<string, unknown>\n          ? TData[keyof TData]\n          : TData\n        : {\n            data: TData extends Record<string, unknown> ? TData[keyof TData] : TData;\n            request: Request;\n            response: Response;\n          }\n    >\n  : Promise<\n      TResponseStyle extends 'data'\n        ? (TData extends Record<string, unknown> ? TData[keyof TData] : TData) | undefined\n        : (\n            | {\n                data: TData extends Record<string, unknown> ? TData[keyof TData] : TData;\n                error: undefined;\n              }\n            | {\n                data: undefined;\n                error: TError extends Record<string, unknown> ? TError[keyof TError] : TError;\n              }\n          ) & {\n            request: Request;\n            response: Response;\n          }\n    >;\n\nexport interface ClientOptions {\n  baseUrl?: string;\n  responseStyle?: ResponseStyle;\n  throwOnError?: boolean;\n}\n\ntype MethodFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'>,\n) => RequestResult<TData, TError, ThrowOnError, TResponseStyle>;\n\ntype SseFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'>,\n) => Promise<ServerSentEventsResult<TData, TError>>;\n\ntype RequestFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'> &\n    Pick<Required<RequestOptions<TData, TResponseStyle, ThrowOnError>>, 'method'>,\n) => RequestResult<TData, TError, ThrowOnError, TResponseStyle>;\n\ntype BuildUrlFn = <\n  TData extends {\n    body?: unknown;\n    path?: Record<string, unknown>;\n    query?: Record<string, unknown>;\n    url: string;\n  },\n>(\n  options: TData & Options<TData>,\n) => string;\n\nexport type Client = CoreClient<RequestFn, Config, MethodFn, BuildUrlFn, SseFn> & {\n  interceptors: Middleware<Request, Response, unknown, ResolvedRequestOptions>;\n};\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 = ClientOptions> = (\n  override?: Config<ClientOptions & T>,\n) => Config<Required<ClientOptions> & T>;\n\nexport interface TDataShape {\n  body?: unknown;\n  headers?: unknown;\n  path?: unknown;\n  query?: unknown;\n  url: string;\n}\n\ntype OmitKeys<T, K> = Pick<T, Exclude<keyof T, K>>;\n\nexport type Options<\n  TData extends TDataShape = TDataShape,\n  ThrowOnError extends boolean = boolean,\n  TResponse = unknown,\n  TResponseStyle extends ResponseStyle = 'fields',\n> = OmitKeys<\n  RequestOptions<TResponse, TResponseStyle, ThrowOnError>,\n  'body' | 'path' | 'query' | 'url'\n> &\n  ([TData] extends [never] ? unknown : Omit<TData, 'url'>);\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-ky/clean-false/client/utils.gen.ts",
    "content": "// 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    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        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  throwOnError: false,\n  timeout: 10000,\n  ...override,\n});\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-ky/clean-false/client.gen.ts",
    "content": "// 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: 'http://localhost:3000/base' }));\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-ky/clean-false/core/auth.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-ky/clean-false/core/bodySerializer.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-ky/clean-false/core/params.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-ky/clean-false/core/pathSerializer.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-ky/clean-false/core/queryKeySerializer.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\n/**\n * JSON-friendly union that mirrors what Pinia Colada can hash.\n */\nexport type JsonValue =\n  | null\n  | string\n  | number\n  | boolean\n  | JsonValue[]\n  | { [key: string]: JsonValue };\n\n/**\n * Replacer that converts non-JSON values (bigint, Date, etc.) to safe substitutes.\n */\nexport const queryKeyJsonReplacer = (_key: string, value: unknown) => {\n  if (value === undefined || typeof value === 'function' || typeof value === 'symbol') {\n    return undefined;\n  }\n  if (typeof value === 'bigint') {\n    return value.toString();\n  }\n  if (value instanceof Date) {\n    return value.toISOString();\n  }\n  return value;\n};\n\n/**\n * Safely stringifies a value and parses it back into a JsonValue.\n */\nexport const stringifyToJsonValue = (input: unknown): JsonValue | undefined => {\n  try {\n    const json = JSON.stringify(input, queryKeyJsonReplacer);\n    if (json === undefined) {\n      return undefined;\n    }\n    return JSON.parse(json) as JsonValue;\n  } catch {\n    return undefined;\n  }\n};\n\n/**\n * Detects plain objects (including objects with a null prototype).\n */\nconst isPlainObject = (value: unknown): value is Record<string, unknown> => {\n  if (value === null || typeof value !== 'object') {\n    return false;\n  }\n  const prototype = Object.getPrototypeOf(value as object);\n  return prototype === Object.prototype || prototype === null;\n};\n\n/**\n * Turns URLSearchParams into a sorted JSON object for deterministic keys.\n */\nconst serializeSearchParams = (params: URLSearchParams): JsonValue => {\n  const entries = Array.from(params.entries()).sort(([a], [b]) => a.localeCompare(b));\n  const result: Record<string, JsonValue> = {};\n\n  for (const [key, value] of entries) {\n    const existing = result[key];\n    if (existing === undefined) {\n      result[key] = value;\n      continue;\n    }\n\n    if (Array.isArray(existing)) {\n      (existing as string[]).push(value);\n    } else {\n      result[key] = [existing, value];\n    }\n  }\n\n  return result;\n};\n\n/**\n * Normalizes any accepted value into a JSON-friendly shape for query keys.\n */\nexport const serializeQueryKeyValue = (value: unknown): JsonValue | undefined => {\n  if (value === null) {\n    return null;\n  }\n\n  if (typeof value === 'string' || typeof value === 'number' || typeof value === 'boolean') {\n    return value;\n  }\n\n  if (value === undefined || typeof value === 'function' || typeof value === 'symbol') {\n    return undefined;\n  }\n\n  if (typeof value === 'bigint') {\n    return value.toString();\n  }\n\n  if (value instanceof Date) {\n    return value.toISOString();\n  }\n\n  if (Array.isArray(value)) {\n    return stringifyToJsonValue(value);\n  }\n\n  if (typeof URLSearchParams !== 'undefined' && value instanceof URLSearchParams) {\n    return serializeSearchParams(value);\n  }\n\n  if (isPlainObject(value)) {\n    return stringifyToJsonValue(value);\n  }\n\n  return undefined;\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-ky/clean-false/core/serverSentEvents.gen.ts",
    "content": "// 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 const 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            // Normalize line endings: CRLF -> LF, then CR -> LF\n            buffer = buffer.replace(/\\r\\n/g, '\\n').replace(/\\r/g, '\\n');\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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-ky/clean-false/core/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { Auth, AuthToken } from './auth.gen';\nimport type { BodySerializer, QuerySerializer, QuerySerializerOptions } from './bodySerializer.gen';\n\nexport type HttpMethod =\n  | 'connect'\n  | 'delete'\n  | 'get'\n  | 'head'\n  | 'options'\n  | 'patch'\n  | 'post'\n  | 'put'\n  | 'trace';\n\nexport type Client<\n  RequestFn = never,\n  Config = unknown,\n  MethodFn = never,\n  BuildUrlFn = never,\n  SseFn = never,\n> = {\n  /**\n   * Returns the final request URL.\n   */\n  buildUrl: BuildUrlFn;\n  getConfig: () => Config;\n  request: RequestFn;\n  setConfig: (config: Config) => Config;\n} & {\n  [K in HttpMethod]: MethodFn;\n} & ([SseFn] extends [never] ? { sse?: never } : { sse: { [K in HttpMethod]: SseFn } });\n\nexport interface Config {\n  /**\n   * Auth token or a function returning auth token. The resolved value will be\n   * added to the request payload as defined by its `security` array.\n   */\n  auth?: ((auth: Auth) => Promise<AuthToken> | AuthToken) | AuthToken;\n  /**\n   * A function for serializing request body parameter. By default,\n   * {@link JSON.stringify()} will be used.\n   */\n  bodySerializer?: BodySerializer | null;\n  /**\n   * An object containing any HTTP headers that you want to pre-populate your\n   * `Headers` object with.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/Headers/Headers#init See more}\n   */\n  headers?:\n    | RequestInit['headers']\n    | Record<\n        string,\n        string | number | boolean | (string | number | boolean)[] | null | undefined | unknown\n      >;\n  /**\n   * The request method.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/fetch#method See more}\n   */\n  method?: Uppercase<HttpMethod>;\n  /**\n   * A function for serializing request query parameters. By default, arrays\n   * will be exploded in form style, objects will be exploded in deepObject\n   * style, and reserved characters are percent-encoded.\n   *\n   * This method will have no effect if the native `paramsSerializer()` Axios\n   * API function is used.\n   *\n   * {@link https://swagger.io/docs/specification/serialization/#query View examples}\n   */\n  querySerializer?: QuerySerializer | QuerySerializerOptions;\n  /**\n   * A function validating request data. This is useful if you want to ensure\n   * the request conforms to the desired shape, so it can be safely sent to\n   * the server.\n   */\n  requestValidator?: (data: unknown) => Promise<unknown>;\n  /**\n   * A function transforming response data before it's returned. This is useful\n   * for post-processing data, e.g. converting ISO strings into Date objects.\n   */\n  responseTransformer?: (data: unknown) => Promise<unknown>;\n  /**\n   * A function validating response data. This is useful if you want to ensure\n   * the response conforms to the desired shape, so it can be safely passed to\n   * the transformers and returned to the user.\n   */\n  responseValidator?: (data: unknown) => Promise<unknown>;\n}\n\ntype IsExactlyNeverOrNeverUndefined<T> = [T] extends [never]\n  ? true\n  : [T] extends [never | undefined]\n    ? [undefined] extends [T]\n      ? false\n      : true\n    : false;\n\nexport type OmitNever<T extends Record<string, unknown>> = {\n  [K in keyof T as IsExactlyNeverOrNeverUndefined<T[K]> extends true ? never : K]: T[K];\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-ky/clean-false/core/utils.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-ky/clean-false/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport { apiVVersionODataControllerCount, callToTestOrderOfParams, callWithDefaultOptionalParameters, callWithDefaultParameters, callWithDescriptions, callWithDuplicateResponses, callWithNoContentResponse, callWithParameters, callWithResponse, callWithResponseAndNoContentResponse, callWithResponses, callWithResultFromHeader, callWithWeirdParameterNames, collectionFormat, complexParams, complexTypes, deleteCallWithoutParametersAndResponse, deleteFoo, deprecatedCall, dummyA, dummyB, duplicateName, duplicateName2, duplicateName3, duplicateName4, export_, fileResponse, fooWow, getApiVbyApiVersionSimpleOperation, getCallWithOptionalParam, getCallWithoutParametersAndResponse, headCallWithoutParametersAndResponse, import_, multipartRequest, multipartResponse, nonAsciiæøåÆøÅöôêÊ字符串, type Options, optionsCallWithoutParametersAndResponse, patchApiVbyApiVersionNoTag, patchCallWithoutParametersAndResponse, postApiVbyApiVersionFormData, postApiVbyApiVersionRequestBody, postCallWithOptionalParam, postCallWithoutParametersAndResponse, putCallWithoutParametersAndResponse, putWithFormUrlEncoded, testErrorCode, types, uploadFile } from './sdk.gen';\nexport type { _3eNum1Период, _400, AdditionalPropertiesIntegerIssue, AdditionalPropertiesUnknownIssue, AdditionalPropertiesUnknownIssue2, AdditionalPropertiesUnknownIssue3, AdditionalPropertiesUnknownIssueWritable, AnyOfAnyAndNull, AnyOfArrays, ApiVVersionODataControllerCountData, ApiVVersionODataControllerCountResponse, ApiVVersionODataControllerCountResponses, ArrayWithAnyOfProperties, ArrayWithArray, ArrayWithBooleans, ArrayWithNumbers, ArrayWithProperties, ArrayWithReferences, ArrayWithStrings, CallToTestOrderOfParamsData, CallWithDefaultOptionalParametersData, CallWithDefaultParametersData, CallWithDescriptionsData, CallWithDuplicateResponsesData, CallWithDuplicateResponsesError, CallWithDuplicateResponsesErrors, CallWithDuplicateResponsesResponse, CallWithDuplicateResponsesResponses, CallWithNoContentResponseData, CallWithNoContentResponseResponse, CallWithNoContentResponseResponses, CallWithParametersData, CallWithResponseAndNoContentResponseData, CallWithResponseAndNoContentResponseResponse, CallWithResponseAndNoContentResponseResponses, CallWithResponseData, CallWithResponseResponse, CallWithResponseResponses, CallWithResponsesData, CallWithResponsesError, CallWithResponsesErrors, CallWithResponsesResponse, CallWithResponsesResponses, CallWithResultFromHeaderData, CallWithResultFromHeaderErrors, CallWithResultFromHeaderResponses, CallWithWeirdParameterNamesData, CamelCaseCommentWithBreaks, CharactersInDescription, ClientOptions, CollectionFormatData, CommentWithBackticks, CommentWithBackticksAndQuotes, CommentWithBreaks, CommentWithExpressionPlaceholders, CommentWithQuotes, CommentWithReservedCharacters, CommentWithSlashes, ComplexParamsData, ComplexParamsResponse, ComplexParamsResponses, ComplexTypesData, ComplexTypesErrors, ComplexTypesResponse, ComplexTypesResponses, CompositionBaseModel, CompositionExtendedModel, CompositionWithAllOfAndNullable, CompositionWithAnyOf, CompositionWithAnyOfAndNullable, CompositionWithAnyOfAnonymous, CompositionWithNestedAnyAndTypeNull, CompositionWithNestedAnyOfAndNull, CompositionWithOneOf, CompositionWithOneOfAndComplexArrayDictionary, CompositionWithOneOfAndNullable, CompositionWithOneOfAndProperties, CompositionWithOneOfAndSimpleArrayDictionary, CompositionWithOneOfAndSimpleDictionary, CompositionWithOneOfAnonymous, CompositionWithOneOfDiscriminator, ConstValue, Default, DeleteCallWithoutParametersAndResponseData, DeleteFooData, DeleteFooData2, DeleteFooData3, DeprecatedCallData, DeprecatedModel, DictionaryWithArray, DictionaryWithDictionary, DictionaryWithProperties, DictionaryWithPropertiesAndAdditionalProperties, DictionaryWithReference, DictionaryWithString, DummyAData, DummyAResponse, DummyAResponses, DummyBData, DummyBResponse, DummyBResponses, DuplicateName2Data, DuplicateName3Data, DuplicateName4Data, DuplicateNameData, EnumFromDescription, EnumWithExtensions, EnumWithNumbers, EnumWithReplacedCharacters, EnumWithStrings, EnumWithXEnumNames, ExportData, ExternalRefA, ExternalRefB, ExternalSharedModel, File, FileResponseData, FileResponseResponse, FileResponseResponses, FileWritable, FooWowData, FooWowResponses, FreeFormObjectWithAdditionalPropertiesEqEmptyObject, FreeFormObjectWithAdditionalPropertiesEqTrue, FreeFormObjectWithoutAdditionalProperties, GenericSchemaDuplicateIssue1SystemBoolean, GenericSchemaDuplicateIssue1SystemBooleanWritable, GenericSchemaDuplicateIssue1SystemString, GenericSchemaDuplicateIssue1SystemStringWritable, GetApiVbyApiVersionSimpleOperationData, GetApiVbyApiVersionSimpleOperationError, GetApiVbyApiVersionSimpleOperationErrors, GetApiVbyApiVersionSimpleOperationResponse, GetApiVbyApiVersionSimpleOperationResponses, GetCallWithOptionalParamData, GetCallWithoutParametersAndResponseData, HeadCallWithoutParametersAndResponseData, Import, ImportData, ImportResponse, ImportResponses, IoK8sApimachineryPkgApisMetaV1DeleteOptions, IoK8sApimachineryPkgApisMetaV1Preconditions, ModelCircle, ModelFromZendesk, ModelSquare, ModelThatExtends, ModelThatExtendsExtends, ModelWithAdditionalPropertiesEqTrue, ModelWithAdditionalPropertiesRef, ModelWithAnyOfConstantSizeArray, ModelWithAnyOfConstantSizeArrayAndIntersect, ModelWithAnyOfConstantSizeArrayNullable, ModelWithAnyOfConstantSizeArrayWithNSizeAndOptions, ModelWithAnyOfConstantSizeArrayWithNSizeAndOptionsWritable, ModelWithArray, ModelWithArrayReadOnlyAndWriteOnly, ModelWithArrayReadOnlyAndWriteOnlyWritable, ModelWithBackticksInDescription, ModelWithBoolean, ModelWithCircularReference, ModelWithConst, ModelWithConstantSizeArray, ModelWithDictionary, ModelWithDuplicateImports, ModelWithDuplicateProperties, ModelWithEnum, ModelWithEnumFromDescription, ModelWithEnumWithHyphen, ModelWithInteger, ModelWithNestedArrayEnums, ModelWithNestedArrayEnumsData, ModelWithNestedArrayEnumsDataBar, ModelWithNestedArrayEnumsDataFoo, ModelWithNestedCompositionEnums, ModelWithNestedEnums, ModelWithNestedProperties, ModelWithNullableObject, ModelWithNullableString, ModelWithNumericEnumUnion, ModelWithOneOfAndProperties, ModelWithOneOfEnum, ModelWithOrderedProperties, ModelWithPattern, ModelWithPatternWritable, ModelWithPrefixItemsConstantSizeArray, ModelWithProperties, ModelWithPropertiesWritable, ModelWithReadOnlyAndWriteOnly, ModelWithReadOnlyAndWriteOnlyWritable, ModelWithReference, ModelWithReferenceWritable, ModelWithString, ModelWithStringError, MultipartRequestData, MultipartResponseData, MultipartResponseResponse, MultipartResponseResponses, NestedAnyOfArraysNullable, NonAsciiæøåÆøÅöôêÊ字符串Data, NonAsciiæøåÆøÅöôêÊ字符串Response, NonAsciiæøåÆøÅöôêÊ字符串Responses, NonAsciiStringæøåÆøÅöôêÊ字符串, NullableObject, OneOfAllOfIssue, OneOfAllOfIssueWritable, OptionsCallWithoutParametersAndResponseData, Pageable, ParameterSimpleParameterUnused, PatchApiVbyApiVersionNoTagData, PatchApiVbyApiVersionNoTagResponses, PatchCallWithoutParametersAndResponseData, PostApiVbyApiVersionFormDataData, PostApiVbyApiVersionRequestBodyData, PostCallWithOptionalParamData, PostCallWithOptionalParamResponse, PostCallWithOptionalParamResponses, PostCallWithoutParametersAndResponseData, PostServiceWithEmptyTagResponse, PostServiceWithEmptyTagResponse2, PutCallWithoutParametersAndResponseData, PutWithFormUrlEncodedData, SchemaWithFormRestrictedKeys, SimpleBoolean, SimpleFile, SimpleFormData, SimpleInteger, SimpleParameter, SimpleReference, SimpleRequestBody, SimpleString, SimpleStringWithPattern, TestErrorCodeData, TestErrorCodeErrors, TestErrorCodeResponses, TypesData, TypesResponse, TypesResponses, UploadFileData, UploadFileResponse, UploadFileResponses, XFooBar } from './types.gen';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-ky/clean-false/sdk.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport { type Client, formDataBodySerializer, type Options as Options2, type TDataShape, urlSearchParamsBodySerializer } from './client';\nimport { client } from './client.gen';\nimport type { ApiVVersionODataControllerCountData, ApiVVersionODataControllerCountResponses, CallToTestOrderOfParamsData, CallWithDefaultOptionalParametersData, CallWithDefaultParametersData, CallWithDescriptionsData, CallWithDuplicateResponsesData, CallWithDuplicateResponsesErrors, CallWithDuplicateResponsesResponses, CallWithNoContentResponseData, CallWithNoContentResponseResponses, CallWithParametersData, CallWithResponseAndNoContentResponseData, CallWithResponseAndNoContentResponseResponses, CallWithResponseData, CallWithResponseResponses, CallWithResponsesData, CallWithResponsesErrors, CallWithResponsesResponses, CallWithResultFromHeaderData, CallWithResultFromHeaderErrors, CallWithResultFromHeaderResponses, CallWithWeirdParameterNamesData, CollectionFormatData, ComplexParamsData, ComplexParamsResponses, ComplexTypesData, ComplexTypesErrors, ComplexTypesResponses, DeleteCallWithoutParametersAndResponseData, DeleteFooData3, DeprecatedCallData, DummyAData, DummyAResponses, DummyBData, DummyBResponses, DuplicateName2Data, DuplicateName3Data, DuplicateName4Data, DuplicateNameData, ExportData, FileResponseData, FileResponseResponses, FooWowData, FooWowResponses, GetApiVbyApiVersionSimpleOperationData, GetApiVbyApiVersionSimpleOperationErrors, GetApiVbyApiVersionSimpleOperationResponses, GetCallWithOptionalParamData, GetCallWithoutParametersAndResponseData, HeadCallWithoutParametersAndResponseData, ImportData, ImportResponses, MultipartRequestData, MultipartResponseData, MultipartResponseResponses, NonAsciiæøåÆøÅöôêÊ字符串Data, NonAsciiæøåÆøÅöôêÊ字符串Responses, OptionsCallWithoutParametersAndResponseData, PatchApiVbyApiVersionNoTagData, PatchApiVbyApiVersionNoTagResponses, PatchCallWithoutParametersAndResponseData, PostApiVbyApiVersionFormDataData, PostApiVbyApiVersionRequestBodyData, PostCallWithOptionalParamData, PostCallWithOptionalParamResponses, PostCallWithoutParametersAndResponseData, PutCallWithoutParametersAndResponseData, PutWithFormUrlEncodedData, TestErrorCodeData, TestErrorCodeErrors, TestErrorCodeResponses, TypesData, TypesResponses, UploadFileData, UploadFileResponses } from './types.gen';\n\nexport type Options<TData extends TDataShape = TDataShape, ThrowOnError extends boolean = boolean> = Options2<TData, ThrowOnError> & {\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\nexport const export_ = <ThrowOnError extends boolean = false>(options?: Options<ExportData, ThrowOnError>) => (options?.client ?? client).get<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/no+tag', ...options });\n\nexport const patchApiVbyApiVersionNoTag = <ThrowOnError extends boolean = false>(options?: Options<PatchApiVbyApiVersionNoTagData, ThrowOnError>) => (options?.client ?? client).patch<PatchApiVbyApiVersionNoTagResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/no+tag', ...options });\n\nexport const import_ = <ThrowOnError extends boolean = false>(options: Options<ImportData, ThrowOnError>) => (options.client ?? client).post<ImportResponses, unknown, ThrowOnError>({\n    url: '/api/v{api-version}/no+tag',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options.headers\n    }\n});\n\nexport const fooWow = <ThrowOnError extends boolean = false>(options?: Options<FooWowData, ThrowOnError>) => (options?.client ?? client).put<FooWowResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/no+tag', ...options });\n\nexport const apiVVersionODataControllerCount = <ThrowOnError extends boolean = false>(options?: Options<ApiVVersionODataControllerCountData, ThrowOnError>) => (options?.client ?? client).get<ApiVVersionODataControllerCountResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple/$count', ...options });\n\nexport const getApiVbyApiVersionSimpleOperation = <ThrowOnError extends boolean = false>(options: Options<GetApiVbyApiVersionSimpleOperationData, ThrowOnError>) => (options.client ?? client).get<GetApiVbyApiVersionSimpleOperationResponses, GetApiVbyApiVersionSimpleOperationErrors, ThrowOnError>({ url: '/api/v{api-version}/simple:operation', ...options });\n\nexport const deleteCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<DeleteCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).delete<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const getCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<GetCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).get<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const headCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<HeadCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).head<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const optionsCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<OptionsCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).options<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const patchCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<PatchCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).patch<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const postCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<PostCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).post<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const putCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<PutCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).put<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const deleteFoo = <ThrowOnError extends boolean = false>(options: Options<DeleteFooData3, ThrowOnError>) => (options.client ?? client).delete<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/foo/{foo_param}/bar/{BarParam}', ...options });\n\nexport const callWithDescriptions = <ThrowOnError extends boolean = false>(options?: Options<CallWithDescriptionsData, ThrowOnError>) => (options?.client ?? client).post<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/descriptions', ...options });\n\n/**\n * @deprecated\n */\nexport const deprecatedCall = <ThrowOnError extends boolean = false>(options: Options<DeprecatedCallData, ThrowOnError>) => (options.client ?? client).post<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/parameters/deprecated', ...options });\n\nexport const callWithParameters = <ThrowOnError extends boolean = false>(options: Options<CallWithParametersData, ThrowOnError>) => (options.client ?? client).post<unknown, unknown, ThrowOnError>({\n    url: '/api/v{api-version}/parameters/{parameterPath}',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options.headers\n    }\n});\n\nexport const callWithWeirdParameterNames = <ThrowOnError extends boolean = false>(options: Options<CallWithWeirdParameterNamesData, ThrowOnError>) => (options.client ?? client).post<unknown, unknown, ThrowOnError>({\n    url: '/api/v{api-version}/parameters/{parameter.path.1}/{parameter-path-2}/{PARAMETER-PATH-3}',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options.headers\n    }\n});\n\nexport const getCallWithOptionalParam = <ThrowOnError extends boolean = false>(options: Options<GetCallWithOptionalParamData, ThrowOnError>) => (options.client ?? client).get<unknown, unknown, ThrowOnError>({\n    url: '/api/v{api-version}/parameters',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options.headers\n    }\n});\n\nexport const postCallWithOptionalParam = <ThrowOnError extends boolean = false>(options: Options<PostCallWithOptionalParamData, ThrowOnError>) => (options.client ?? client).post<PostCallWithOptionalParamResponses, unknown, ThrowOnError>({\n    url: '/api/v{api-version}/parameters',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options.headers\n    }\n});\n\nexport const postApiVbyApiVersionRequestBody = <ThrowOnError extends boolean = false>(options?: Options<PostApiVbyApiVersionRequestBodyData, ThrowOnError>) => (options?.client ?? client).post<unknown, unknown, ThrowOnError>({\n    url: '/api/v{api-version}/requestBody',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options?.headers\n    }\n});\n\nexport const postApiVbyApiVersionFormData = <ThrowOnError extends boolean = false>(options?: Options<PostApiVbyApiVersionFormDataData, ThrowOnError>) => (options?.client ?? client).post<unknown, unknown, ThrowOnError>({\n    ...formDataBodySerializer,\n    url: '/api/v{api-version}/formData',\n    ...options,\n    headers: {\n        'Content-Type': null,\n        ...options?.headers\n    }\n});\n\nexport const callWithDefaultParameters = <ThrowOnError extends boolean = false>(options?: Options<CallWithDefaultParametersData, ThrowOnError>) => (options?.client ?? client).get<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/defaults', ...options });\n\nexport const callWithDefaultOptionalParameters = <ThrowOnError extends boolean = false>(options?: Options<CallWithDefaultOptionalParametersData, ThrowOnError>) => (options?.client ?? client).post<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/defaults', ...options });\n\nexport const callToTestOrderOfParams = <ThrowOnError extends boolean = false>(options: Options<CallToTestOrderOfParamsData, ThrowOnError>) => (options.client ?? client).put<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/defaults', ...options });\n\nexport const duplicateName = <ThrowOnError extends boolean = false>(options?: Options<DuplicateNameData, ThrowOnError>) => (options?.client ?? client).delete<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/duplicate', ...options });\n\nexport const duplicateName2 = <ThrowOnError extends boolean = false>(options?: Options<DuplicateName2Data, ThrowOnError>) => (options?.client ?? client).get<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/duplicate', ...options });\n\nexport const duplicateName3 = <ThrowOnError extends boolean = false>(options?: Options<DuplicateName3Data, ThrowOnError>) => (options?.client ?? client).post<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/duplicate', ...options });\n\nexport const duplicateName4 = <ThrowOnError extends boolean = false>(options?: Options<DuplicateName4Data, ThrowOnError>) => (options?.client ?? client).put<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/duplicate', ...options });\n\nexport const callWithNoContentResponse = <ThrowOnError extends boolean = false>(options?: Options<CallWithNoContentResponseData, ThrowOnError>) => (options?.client ?? client).get<CallWithNoContentResponseResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/no-content', ...options });\n\nexport const callWithResponseAndNoContentResponse = <ThrowOnError extends boolean = false>(options?: Options<CallWithResponseAndNoContentResponseData, ThrowOnError>) => (options?.client ?? client).get<CallWithResponseAndNoContentResponseResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/multiple-tags/response-and-no-content', ...options });\n\nexport const dummyA = <ThrowOnError extends boolean = false>(options?: Options<DummyAData, ThrowOnError>) => (options?.client ?? client).get<DummyAResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/multiple-tags/a', ...options });\n\nexport const dummyB = <ThrowOnError extends boolean = false>(options?: Options<DummyBData, ThrowOnError>) => (options?.client ?? client).get<DummyBResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/multiple-tags/b', ...options });\n\nexport const callWithResponse = <ThrowOnError extends boolean = false>(options?: Options<CallWithResponseData, ThrowOnError>) => (options?.client ?? client).get<CallWithResponseResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/response', ...options });\n\nexport const callWithDuplicateResponses = <ThrowOnError extends boolean = false>(options?: Options<CallWithDuplicateResponsesData, ThrowOnError>) => (options?.client ?? client).post<CallWithDuplicateResponsesResponses, CallWithDuplicateResponsesErrors, ThrowOnError>({ url: '/api/v{api-version}/response', ...options });\n\nexport const callWithResponses = <ThrowOnError extends boolean = false>(options?: Options<CallWithResponsesData, ThrowOnError>) => (options?.client ?? client).put<CallWithResponsesResponses, CallWithResponsesErrors, ThrowOnError>({ url: '/api/v{api-version}/response', ...options });\n\nexport const collectionFormat = <ThrowOnError extends boolean = false>(options: Options<CollectionFormatData, ThrowOnError>) => (options.client ?? client).get<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/collectionFormat', ...options });\n\nexport const types = <ThrowOnError extends boolean = false>(options: Options<TypesData, ThrowOnError>) => (options.client ?? client).get<TypesResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/types', ...options });\n\nexport const uploadFile = <ThrowOnError extends boolean = false>(options: Options<UploadFileData, ThrowOnError>) => (options.client ?? client).post<UploadFileResponses, unknown, ThrowOnError>({\n    ...urlSearchParamsBodySerializer,\n    url: '/api/v{api-version}/upload',\n    ...options,\n    headers: {\n        'Content-Type': 'application/x-www-form-urlencoded',\n        ...options.headers\n    }\n});\n\nexport const fileResponse = <ThrowOnError extends boolean = false>(options: Options<FileResponseData, ThrowOnError>) => (options.client ?? client).get<FileResponseResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/file/{id}', ...options });\n\nexport const complexTypes = <ThrowOnError extends boolean = false>(options: Options<ComplexTypesData, ThrowOnError>) => (options.client ?? client).get<ComplexTypesResponses, ComplexTypesErrors, ThrowOnError>({\n    querySerializer: { parameters: { parameterObject: { object: { style: 'form' } } } },\n    url: '/api/v{api-version}/complex',\n    ...options\n});\n\nexport const multipartResponse = <ThrowOnError extends boolean = false>(options?: Options<MultipartResponseData, ThrowOnError>) => (options?.client ?? client).get<MultipartResponseResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/multipart', ...options });\n\nexport const multipartRequest = <ThrowOnError extends boolean = false>(options?: Options<MultipartRequestData, ThrowOnError>) => (options?.client ?? client).post<unknown, unknown, ThrowOnError>({\n    ...formDataBodySerializer,\n    url: '/api/v{api-version}/multipart',\n    ...options,\n    headers: {\n        'Content-Type': null,\n        ...options?.headers\n    }\n});\n\nexport const complexParams = <ThrowOnError extends boolean = false>(options: Options<ComplexParamsData, ThrowOnError>) => (options.client ?? client).put<ComplexParamsResponses, unknown, ThrowOnError>({\n    url: '/api/v{api-version}/complex/{id}',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json-patch+json',\n        ...options.headers\n    }\n});\n\nexport const callWithResultFromHeader = <ThrowOnError extends boolean = false>(options?: Options<CallWithResultFromHeaderData, ThrowOnError>) => (options?.client ?? client).post<CallWithResultFromHeaderResponses, CallWithResultFromHeaderErrors, ThrowOnError>({ url: '/api/v{api-version}/header', ...options });\n\nexport const testErrorCode = <ThrowOnError extends boolean = false>(options: Options<TestErrorCodeData, ThrowOnError>) => (options.client ?? client).post<TestErrorCodeResponses, TestErrorCodeErrors, ThrowOnError>({ url: '/api/v{api-version}/error', ...options });\n\nexport const nonAsciiæøåÆøÅöôêÊ字符串 = <ThrowOnError extends boolean = false>(options: Options<NonAsciiæøåÆøÅöôêÊ字符串Data, ThrowOnError>) => (options.client ?? client).post<NonAsciiæøåÆøÅöôêÊ字符串Responses, unknown, ThrowOnError>({ url: '/api/v{api-version}/non-ascii-æøåÆØÅöôêÊ字符串', ...options });\n\n/**\n * Login User\n */\nexport const putWithFormUrlEncoded = <ThrowOnError extends boolean = false>(options: Options<PutWithFormUrlEncodedData, ThrowOnError>) => (options.client ?? client).put<unknown, unknown, ThrowOnError>({\n    ...urlSearchParamsBodySerializer,\n    url: '/api/v{api-version}/non-ascii-æøåÆØÅöôêÊ字符串',\n    ...options,\n    headers: {\n        'Content-Type': 'application/x-www-form-urlencoded',\n        ...options.headers\n    }\n});\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-ky/clean-false/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type ClientOptions = {\n    baseUrl: 'http://localhost:3000/base' | (string & {});\n};\n\n/**\n * Model with number-only name\n */\nexport type _400 = string;\n\n/**\n * External ref to shared model (A)\n */\nexport type ExternalRefA = ExternalSharedModel;\n\n/**\n * External ref to shared model (B)\n */\nexport type ExternalRefB = ExternalSharedModel;\n\n/**\n * Testing multiline comments in string: First line\n * Second line\n *\n * Fourth line\n */\nexport type CamelCaseCommentWithBreaks = number;\n\n/**\n * Testing multiline comments in string: First line\n * Second line\n *\n * Fourth line\n */\nexport type CommentWithBreaks = number;\n\n/**\n * Testing backticks in string: `backticks` and ```multiple backticks``` should work\n */\nexport type CommentWithBackticks = number;\n\n/**\n * Testing backticks and quotes in string: `backticks`, 'quotes', \"double quotes\" and ```multiple backticks``` should work\n */\nexport type CommentWithBackticksAndQuotes = number;\n\n/**\n * Testing slashes in string: \\backwards\\\\\\ and /forwards/// should work\n */\nexport type CommentWithSlashes = number;\n\n/**\n * Testing expression placeholders in string: ${expression} should work\n */\nexport type CommentWithExpressionPlaceholders = number;\n\n/**\n * Testing quotes in string: 'single quote''' and \"double quotes\"\"\" should work\n */\nexport type CommentWithQuotes = number;\n\n/**\n * Testing reserved characters in string: * inline * and ** inline ** should work\n */\nexport type CommentWithReservedCharacters = number;\n\n/**\n * This is a simple number\n */\nexport type SimpleInteger = number;\n\n/**\n * This is a simple boolean\n */\nexport type SimpleBoolean = boolean;\n\n/**\n * This is a simple string\n */\nexport type SimpleString = string;\n\n/**\n * A string with non-ascii (unicode) characters valid in typescript identifiers (æøåÆØÅöÔèÈ字符串)\n */\nexport type NonAsciiStringæøåÆøÅöôêÊ字符串 = string;\n\n/**\n * This is a simple file\n */\nexport type SimpleFile = Blob | File;\n\n/**\n * This is a simple reference\n */\nexport type SimpleReference = ModelWithString;\n\n/**\n * This is a simple string\n */\nexport type SimpleStringWithPattern = string | null;\n\n/**\n * This is a simple enum with strings\n */\nexport type EnumWithStrings = 'Success' | 'Warning' | 'Error' | '\\'Single Quote\\'' | '\"Double Quotes\"' | 'Non-ascii: øæåôöØÆÅÔÖ字符串';\n\nexport type EnumWithReplacedCharacters = '\\'Single Quote\\'' | '\"Double Quotes\"' | 'øæåôöØÆÅÔÖ字符串' | 3.1 | '';\n\n/**\n * This is a simple enum with numbers\n */\nexport type EnumWithNumbers = 1 | 2 | 3 | 1.1 | 1.2 | 1.3 | 100 | 200 | 300 | -100 | -200 | -300 | -1.1 | -1.2 | -1.3;\n\n/**\n * Success=1,Warning=2,Error=3\n */\nexport type EnumFromDescription = number;\n\n/**\n * This is a simple enum with numbers\n */\nexport type EnumWithExtensions = 200 | 400 | 500;\n\nexport type EnumWithXEnumNames = 0 | 1 | 2;\n\n/**\n * This is a simple array with numbers\n */\nexport type ArrayWithNumbers = Array<number>;\n\n/**\n * This is a simple array with booleans\n */\nexport type ArrayWithBooleans = Array<boolean>;\n\n/**\n * This is a simple array with strings\n */\nexport type ArrayWithStrings = Array<string>;\n\n/**\n * This is a simple array with references\n */\nexport type ArrayWithReferences = Array<ModelWithString>;\n\n/**\n * This is a simple array containing an array\n */\nexport type ArrayWithArray = Array<Array<ModelWithString>>;\n\n/**\n * This is a simple array with properties\n */\nexport type ArrayWithProperties = Array<{\n    '16x16'?: CamelCaseCommentWithBreaks;\n    bar?: string;\n}>;\n\n/**\n * This is a simple array with any of properties\n */\nexport type ArrayWithAnyOfProperties = Array<{\n    foo?: string;\n} | {\n    bar?: string;\n}>;\n\nexport type AnyOfAnyAndNull = {\n    data?: unknown | null;\n};\n\n/**\n * This is a simple array with any of properties\n */\nexport type AnyOfArrays = {\n    results?: Array<{\n        foo?: string;\n    } | {\n        bar?: string;\n    }>;\n};\n\n/**\n * This is a string dictionary\n */\nexport type DictionaryWithString = {\n    [key: string]: string;\n};\n\nexport type DictionaryWithPropertiesAndAdditionalProperties = {\n    foo?: number;\n    bar?: boolean;\n    [key: string]: string | number | boolean | undefined;\n};\n\n/**\n * This is a string reference\n */\nexport type DictionaryWithReference = {\n    [key: string]: ModelWithString;\n};\n\n/**\n * This is a complex dictionary\n */\nexport type DictionaryWithArray = {\n    [key: string]: Array<ModelWithString>;\n};\n\n/**\n * This is a string dictionary\n */\nexport type DictionaryWithDictionary = {\n    [key: string]: {\n        [key: string]: string;\n    };\n};\n\n/**\n * This is a complex dictionary\n */\nexport type DictionaryWithProperties = {\n    [key: string]: {\n        foo?: string;\n        bar?: string;\n    };\n};\n\n/**\n * This is a model with one number property\n */\nexport type ModelWithInteger = {\n    /**\n     * This is a simple number property\n     */\n    prop?: number;\n};\n\n/**\n * This is a model with one boolean property\n */\nexport type ModelWithBoolean = {\n    /**\n     * This is a simple boolean property\n     */\n    prop?: boolean;\n};\n\n/**\n * This is a model with one string property\n */\nexport type ModelWithString = {\n    /**\n     * This is a simple string property\n     */\n    prop?: string;\n};\n\n/**\n * This is a model with one string property\n */\nexport type ModelWithStringError = {\n    /**\n     * This is a simple string property\n     */\n    prop?: string;\n};\n\n/**\n * `Comment` or `VoiceComment`. The JSON object for adding voice comments to tickets is different. See [Adding voice comments to tickets](/documentation/ticketing/managing-tickets/adding-voice-comments-to-tickets)\n */\nexport type ModelFromZendesk = string;\n\n/**\n * This is a model with one string property\n */\nexport type ModelWithNullableString = {\n    /**\n     * This is a simple string property\n     */\n    nullableProp1?: string | null;\n    /**\n     * This is a simple string property\n     */\n    nullableRequiredProp1: string | null;\n    /**\n     * This is a simple string property\n     */\n    nullableProp2?: string | null;\n    /**\n     * This is a simple string property\n     */\n    nullableRequiredProp2: string | null;\n    /**\n     * This is a simple enum with strings\n     */\n    'foo_bar-enum'?: 'Success' | 'Warning' | 'Error' | 'ØÆÅ字符串';\n};\n\n/**\n * This is a model with one enum\n */\nexport type ModelWithEnum = {\n    /**\n     * This is a simple enum with strings\n     */\n    'foo_bar-enum'?: 'Success' | 'Warning' | 'Error' | 'ØÆÅ字符串';\n    /**\n     * These are the HTTP error code enums\n     */\n    statusCode?: '100' | '200 FOO' | '300 FOO_BAR' | '400 foo-bar' | '500 foo.bar' | '600 foo&bar';\n    /**\n     * Simple boolean enum\n     */\n    bool?: true;\n};\n\n/**\n * This is a model with one enum with escaped name\n */\nexport type ModelWithEnumWithHyphen = {\n    /**\n     * Foo-Bar-Baz-Qux\n     */\n    'foo-bar-baz-qux'?: '3.0';\n};\n\n/**\n * This is a model with one enum\n */\nexport type ModelWithEnumFromDescription = {\n    /**\n     * Success=1,Warning=2,Error=3\n     */\n    test?: number;\n};\n\n/**\n * This is a model with nested enums\n */\nexport type ModelWithNestedEnums = {\n    dictionaryWithEnum?: {\n        [key: string]: 'Success' | 'Warning' | 'Error';\n    };\n    dictionaryWithEnumFromDescription?: {\n        [key: string]: number;\n    };\n    arrayWithEnum?: Array<'Success' | 'Warning' | 'Error'>;\n    arrayWithDescription?: Array<number>;\n    /**\n     * This is a simple enum with strings\n     */\n    'foo_bar-enum'?: 'Success' | 'Warning' | 'Error' | 'ØÆÅ字符串';\n};\n\n/**\n * This is a model with one property containing a reference\n */\nexport type ModelWithReference = {\n    prop?: ModelWithProperties;\n};\n\n/**\n * This is a model with one property containing an array\n */\nexport type ModelWithArrayReadOnlyAndWriteOnly = {\n    prop?: Array<ModelWithReadOnlyAndWriteOnly>;\n    propWithFile?: Array<Blob | File>;\n    propWithNumber?: Array<number>;\n};\n\n/**\n * This is a model with one property containing an array\n */\nexport type ModelWithArray = {\n    prop?: Array<ModelWithString>;\n    propWithFile?: Array<Blob | File>;\n    propWithNumber?: Array<number>;\n};\n\n/**\n * This is a model with one property containing a dictionary\n */\nexport type ModelWithDictionary = {\n    prop?: {\n        [key: string]: string;\n    };\n};\n\n/**\n * This is a deprecated model with a deprecated property\n *\n * @deprecated\n */\nexport type DeprecatedModel = {\n    /**\n     * This is a deprecated property\n     *\n     * @deprecated\n     */\n    prop?: string;\n};\n\n/**\n * This is a model with one property containing a circular reference\n */\nexport type ModelWithCircularReference = {\n    prop?: ModelWithCircularReference;\n};\n\n/**\n * This is a model with one property with a 'one of' relationship\n */\nexport type CompositionWithOneOf = {\n    propA?: ModelWithString | ModelWithEnum | ModelWithArray | ModelWithDictionary;\n};\n\n/**\n * This is a model with one property with a 'one of' relationship where the options are not $ref\n */\nexport type CompositionWithOneOfAnonymous = {\n    propA?: {\n        propA?: string;\n    } | string | number;\n};\n\n/**\n * Circle\n */\nexport type ModelCircle = {\n    kind: string;\n    radius?: number;\n};\n\n/**\n * Square\n */\nexport type ModelSquare = {\n    kind: string;\n    sideLength?: number;\n};\n\n/**\n * This is a model with one property with a 'one of' relationship where the options are not $ref\n */\nexport type CompositionWithOneOfDiscriminator = ({\n    kind: 'circle';\n} & ModelCircle) | ({\n    kind: 'square';\n} & ModelSquare);\n\n/**\n * This is a model with one property with a 'any of' relationship\n */\nexport type CompositionWithAnyOf = {\n    propA?: ModelWithString | ModelWithEnum | ModelWithArray | ModelWithDictionary;\n};\n\n/**\n * This is a model with one property with a 'any of' relationship where the options are not $ref\n */\nexport type CompositionWithAnyOfAnonymous = {\n    propA?: {\n        propA?: string;\n    } | string | number;\n};\n\n/**\n * This is a model with nested 'any of' property with a type null\n */\nexport type CompositionWithNestedAnyAndTypeNull = {\n    propA?: Array<ModelWithDictionary | null> | Array<ModelWithArray | null>;\n};\n\nexport type _3eNum1Период = 'Bird' | 'Dog';\n\nexport type ConstValue = 'ConstValue';\n\n/**\n * This is a model with one property with a 'any of' relationship where the options are not $ref\n */\nexport type CompositionWithNestedAnyOfAndNull = {\n    /**\n     * Scopes\n     */\n    propA?: Array<_3eNum1Период | ConstValue> | null;\n};\n\n/**\n * This is a model with one property with a 'one of' relationship\n */\nexport type CompositionWithOneOfAndNullable = {\n    propA?: {\n        boolean?: boolean;\n    } | ModelWithEnum | ModelWithArray | ModelWithDictionary | null;\n};\n\n/**\n * This is a model that contains a simple dictionary within composition\n */\nexport type CompositionWithOneOfAndSimpleDictionary = {\n    propA?: boolean | {\n        [key: string]: number;\n    };\n};\n\n/**\n * This is a model that contains a dictionary of simple arrays within composition\n */\nexport type CompositionWithOneOfAndSimpleArrayDictionary = {\n    propA?: boolean | {\n        [key: string]: Array<boolean>;\n    };\n};\n\n/**\n * This is a model that contains a dictionary of complex arrays (composited) within composition\n */\nexport type CompositionWithOneOfAndComplexArrayDictionary = {\n    propA?: boolean | {\n        [key: string]: Array<number | string>;\n    };\n};\n\n/**\n * This is a model with one property with a 'all of' relationship\n */\nexport type CompositionWithAllOfAndNullable = {\n    propA?: ({\n        boolean?: boolean;\n    } & ModelWithEnum & ModelWithArray & ModelWithDictionary) | null;\n};\n\n/**\n * This is a model with one property with a 'any of' relationship\n */\nexport type CompositionWithAnyOfAndNullable = {\n    propA?: {\n        boolean?: boolean;\n    } | ModelWithEnum | ModelWithArray | ModelWithDictionary | null;\n};\n\n/**\n * This is a base model with two simple optional properties\n */\nexport type CompositionBaseModel = {\n    firstName?: string;\n    lastname?: string;\n};\n\n/**\n * This is a model that extends the base model\n */\nexport type CompositionExtendedModel = CompositionBaseModel & {\n    age: number;\n    firstName: string;\n    lastname: string;\n};\n\n/**\n * This is a model with one nested property\n */\nexport type ModelWithProperties = {\n    required: string;\n    readonly requiredAndReadOnly: string;\n    requiredAndNullable: string | null;\n    string?: string;\n    number?: number;\n    boolean?: boolean;\n    reference?: ModelWithString;\n    'property with space'?: string;\n    default?: string;\n    try?: string;\n    readonly '@namespace.string'?: string;\n    readonly '@namespace.integer'?: number;\n};\n\n/**\n * This is a model with one nested property\n */\nexport type ModelWithNestedProperties = {\n    readonly first: {\n        readonly second: {\n            readonly third: string | null;\n        } | null;\n    } | null;\n};\n\n/**\n * This is a model with duplicated properties\n */\nexport type ModelWithDuplicateProperties = {\n    prop?: ModelWithString;\n};\n\n/**\n * This is a model with ordered properties\n */\nexport type ModelWithOrderedProperties = {\n    zebra?: string;\n    apple?: string;\n    hawaii?: string;\n};\n\n/**\n * This is a model with duplicated imports\n */\nexport type ModelWithDuplicateImports = {\n    propA?: ModelWithString;\n    propB?: ModelWithString;\n    propC?: ModelWithString;\n};\n\n/**\n * This is a model that extends another model\n */\nexport type ModelThatExtends = ModelWithString & {\n    propExtendsA?: string;\n    propExtendsB?: ModelWithString;\n};\n\n/**\n * This is a model that extends another model\n */\nexport type ModelThatExtendsExtends = ModelWithString & ModelThatExtends & {\n    propExtendsC?: string;\n    propExtendsD?: ModelWithString;\n};\n\n/**\n * This is a model that contains a some patterns\n */\nexport type ModelWithPattern = {\n    key: string;\n    name: string;\n    readonly enabled?: boolean;\n    readonly modified?: string;\n    id?: string;\n    text?: string;\n    patternWithSingleQuotes?: string;\n    patternWithNewline?: string;\n    patternWithBacktick?: string;\n    patternWithUnicode?: string;\n};\n\nexport type File = {\n    /**\n     * Id\n     */\n    readonly id?: string;\n    /**\n     * Updated at\n     */\n    readonly updated_at?: string;\n    /**\n     * Created at\n     */\n    readonly created_at?: string;\n    /**\n     * Mime\n     */\n    mime: string;\n    /**\n     * File\n     */\n    readonly file?: string;\n};\n\nexport type Default = {\n    name?: string;\n};\n\nexport type Pageable = {\n    page?: number;\n    size?: number;\n    sort?: Array<string>;\n};\n\n/**\n * This is a free-form object without additionalProperties.\n */\nexport type FreeFormObjectWithoutAdditionalProperties = {\n    [key: string]: unknown;\n};\n\n/**\n * This is a free-form object with additionalProperties: true.\n */\nexport type FreeFormObjectWithAdditionalPropertiesEqTrue = {\n    [key: string]: unknown;\n};\n\n/**\n * This is a free-form object with additionalProperties: {}.\n */\nexport type FreeFormObjectWithAdditionalPropertiesEqEmptyObject = {\n    [key: string]: unknown;\n};\n\nexport type ModelWithConst = {\n    String?: 'String';\n    number?: 0;\n    null?: null;\n    withType?: 'Some string';\n};\n\n/**\n * This is a model with one property and additionalProperties: true\n */\nexport type ModelWithAdditionalPropertiesEqTrue = {\n    /**\n     * This is a simple string property\n     */\n    prop?: string;\n    [key: string]: unknown;\n};\n\nexport type NestedAnyOfArraysNullable = {\n    nullableArray?: Array<string | boolean> | null;\n};\n\nexport type CompositionWithOneOfAndProperties = ({\n    foo: SimpleParameter;\n} | {\n    bar: NonAsciiStringæøåÆøÅöôêÊ字符串;\n}) & {\n    baz: number | null;\n    qux: number;\n};\n\n/**\n * An object that can be null\n */\nexport type NullableObject = {\n    foo?: string;\n} | null;\n\n/**\n * Some % character\n */\nexport type CharactersInDescription = string;\n\nexport type ModelWithNullableObject = {\n    data?: NullableObject;\n};\n\n/**\n * An object with additional properties that can be null (anyOf ref + null)\n */\nexport type ModelWithAdditionalPropertiesRef = {\n    [key: string]: NullableObject | null;\n};\n\nexport type ModelWithOneOfEnum = {\n    foo: 'Bar';\n} | {\n    foo: 'Baz';\n} | {\n    foo: 'Qux';\n} | {\n    content: string;\n    foo: 'Quux';\n} | {\n    content: [\n        string,\n        string\n    ];\n    foo: 'Corge';\n};\n\nexport type ModelWithNestedArrayEnumsDataFoo = 'foo' | 'bar';\n\nexport type ModelWithNestedArrayEnumsDataBar = 'baz' | 'qux';\n\nexport type ModelWithNestedArrayEnumsData = {\n    foo?: Array<ModelWithNestedArrayEnumsDataFoo>;\n    bar?: Array<ModelWithNestedArrayEnumsDataBar>;\n};\n\nexport type ModelWithNestedArrayEnums = {\n    array_strings?: Array<string>;\n    data?: ModelWithNestedArrayEnumsData;\n};\n\nexport type ModelWithNestedCompositionEnums = {\n    foo?: ModelWithNestedArrayEnumsDataFoo;\n};\n\nexport type ModelWithReadOnlyAndWriteOnly = {\n    foo: string;\n    readonly bar: string;\n};\n\nexport type ModelWithConstantSizeArray = [\n    number,\n    number\n];\n\nexport type ModelWithAnyOfConstantSizeArray = [\n    number | string,\n    number | string,\n    number | string\n];\n\nexport type ModelWithPrefixItemsConstantSizeArray = [\n    ModelWithInteger,\n    number | string,\n    string\n];\n\nexport type ModelWithAnyOfConstantSizeArrayNullable = [\n    number | null | string,\n    number | null | string,\n    number | null | string\n];\n\nexport type ModelWithAnyOfConstantSizeArrayWithNSizeAndOptions = [\n    number | Import,\n    number | Import\n];\n\nexport type ModelWithAnyOfConstantSizeArrayAndIntersect = [\n    number & string,\n    number & string\n];\n\nexport type ModelWithNumericEnumUnion = {\n    /**\n     * Период\n     */\n    value?: -10 | -1 | 0 | 1 | 3 | 6 | 12;\n};\n\n/**\n * Some description with `back ticks`\n */\nexport type ModelWithBackticksInDescription = {\n    /**\n     * The template `that` should be used for parsing and importing the contents of the CSV file.\n     *\n     * <br/><p>There is one placeholder currently supported:<ul>     <li><b>${x}</b> - refers to the n-th column in the CSV file, e.g. ${1}, ${2}, ...)</li></ul><p>Example of a correct JSON template:</p>\n     * <pre>\n     * [\n     * {\n     * \"resourceType\": \"Asset\",\n     * \"identifier\": {\n     * \"name\": \"${1}\",\n     * \"domain\": {\n     * \"name\": \"${2}\",\n     * \"community\": {\n     * \"name\": \"Some Community\"\n     * }\n     * }\n     * },\n     * \"attributes\" : {\n     * \"00000000-0000-0000-0000-000000003115\" : [ {\n     * \"value\" : \"${3}\"\n     * } ],\n     * \"00000000-0000-0000-0000-000000000222\" : [ {\n     * \"value\" : \"${4}\"\n     * } ]\n     * }\n     * }\n     * ]\n     * </pre>\n     */\n    template?: string;\n};\n\nexport type ModelWithOneOfAndProperties = (SimpleParameter | NonAsciiStringæøåÆøÅöôêÊ字符串) & {\n    baz: number | null;\n    qux: number;\n};\n\n/**\n * Model used to test deduplication strategy (unused)\n */\nexport type ParameterSimpleParameterUnused = string;\n\n/**\n * Model used to test deduplication strategy\n */\nexport type PostServiceWithEmptyTagResponse = string;\n\n/**\n * Model used to test deduplication strategy\n */\nexport type PostServiceWithEmptyTagResponse2 = string;\n\n/**\n * Model used to test deduplication strategy\n */\nexport type DeleteFooData = string;\n\n/**\n * Model used to test deduplication strategy\n */\nexport type DeleteFooData2 = string;\n\n/**\n * Model with restricted keyword name\n */\nexport type Import = string;\n\nexport type SchemaWithFormRestrictedKeys = {\n    description?: string;\n    'x-enum-descriptions'?: string;\n    'x-enum-varnames'?: string;\n    'x-enumNames'?: string;\n    title?: string;\n    object?: {\n        description?: string;\n        'x-enum-descriptions'?: string;\n        'x-enum-varnames'?: string;\n        'x-enumNames'?: string;\n        title?: string;\n    };\n    array?: Array<{\n        description?: string;\n        'x-enum-descriptions'?: string;\n        'x-enum-varnames'?: string;\n        'x-enumNames'?: string;\n        title?: string;\n    }>;\n};\n\n/**\n * This schema was giving PascalCase transformations a hard time\n */\nexport type IoK8sApimachineryPkgApisMetaV1DeleteOptions = {\n    /**\n     * Must be fulfilled before a deletion is carried out. If not possible, a 409 Conflict status will be returned.\n     */\n    preconditions?: IoK8sApimachineryPkgApisMetaV1Preconditions;\n};\n\n/**\n * This schema was giving PascalCase transformations a hard time\n */\nexport type IoK8sApimachineryPkgApisMetaV1Preconditions = {\n    /**\n     * Specifies the target ResourceVersion\n     */\n    resourceVersion?: string;\n    /**\n     * Specifies the target UID.\n     */\n    uid?: string;\n};\n\nexport type AdditionalPropertiesUnknownIssue = {\n    [key: string]: string | number;\n};\n\nexport type AdditionalPropertiesUnknownIssue2 = {\n    [key: string]: string | number;\n};\n\nexport type AdditionalPropertiesUnknownIssue3 = string & {\n    entries: {\n        [key: string]: AdditionalPropertiesUnknownIssue;\n    };\n};\n\nexport type AdditionalPropertiesIntegerIssue = {\n    value: number;\n    [key: string]: number;\n};\n\nexport type OneOfAllOfIssue = ((ConstValue | GenericSchemaDuplicateIssue1SystemBoolean) & _3eNum1Период) | GenericSchemaDuplicateIssue1SystemString;\n\nexport type GenericSchemaDuplicateIssue1SystemBoolean = {\n    item?: boolean;\n    error?: string | null;\n    readonly hasError?: boolean;\n    data?: {\n        [key: string]: never;\n    };\n};\n\nexport type GenericSchemaDuplicateIssue1SystemString = {\n    item?: string | null;\n    error?: string | null;\n    readonly hasError?: boolean;\n};\n\nexport type ExternalSharedModel = {\n    id: string;\n    name?: string;\n};\n\n/**\n * This is a model with one property containing a reference\n */\nexport type ModelWithReferenceWritable = {\n    prop?: ModelWithPropertiesWritable;\n};\n\n/**\n * This is a model with one property containing an array\n */\nexport type ModelWithArrayReadOnlyAndWriteOnlyWritable = {\n    prop?: Array<ModelWithReadOnlyAndWriteOnlyWritable>;\n    propWithFile?: Array<Blob | File>;\n    propWithNumber?: Array<number>;\n};\n\n/**\n * This is a model with one nested property\n */\nexport type ModelWithPropertiesWritable = {\n    required: string;\n    requiredAndNullable: string | null;\n    string?: string;\n    number?: number;\n    boolean?: boolean;\n    reference?: ModelWithString;\n    'property with space'?: string;\n    default?: string;\n    try?: string;\n};\n\n/**\n * This is a model that contains a some patterns\n */\nexport type ModelWithPatternWritable = {\n    key: string;\n    name: string;\n    id?: string;\n    text?: string;\n    patternWithSingleQuotes?: string;\n    patternWithNewline?: string;\n    patternWithBacktick?: string;\n    patternWithUnicode?: string;\n};\n\nexport type FileWritable = {\n    /**\n     * Mime\n     */\n    mime: string;\n};\n\nexport type ModelWithReadOnlyAndWriteOnlyWritable = {\n    foo: string;\n    baz: string;\n};\n\nexport type ModelWithAnyOfConstantSizeArrayWithNSizeAndOptionsWritable = [\n    number | Import,\n    number | Import\n];\n\nexport type AdditionalPropertiesUnknownIssueWritable = {\n    [key: string]: string | number;\n};\n\nexport type OneOfAllOfIssueWritable = ((ConstValue | GenericSchemaDuplicateIssue1SystemBoolean) & _3eNum1Период) | GenericSchemaDuplicateIssue1SystemString;\n\nexport type GenericSchemaDuplicateIssue1SystemBooleanWritable = {\n    item?: boolean;\n    error?: string | null;\n    data?: {\n        [key: string]: never;\n    };\n};\n\nexport type GenericSchemaDuplicateIssue1SystemStringWritable = {\n    item?: string | null;\n    error?: string | null;\n};\n\n/**\n * This is a reusable parameter\n */\nexport type SimpleParameter = string;\n\n/**\n * Parameter with illegal characters\n */\nexport type XFooBar = ModelWithString;\n\n/**\n * A reusable request body\n */\nexport type SimpleRequestBody = ModelWithString;\n\n/**\n * A reusable request body\n */\nexport type SimpleFormData = ModelWithString;\n\nexport type ExportData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no+tag';\n};\n\nexport type PatchApiVbyApiVersionNoTagData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no+tag';\n};\n\nexport type PatchApiVbyApiVersionNoTagResponses = {\n    /**\n     * OK\n     */\n    default: unknown;\n};\n\nexport type ImportData = {\n    body: ModelWithReadOnlyAndWriteOnlyWritable | ModelWithArrayReadOnlyAndWriteOnlyWritable;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no+tag';\n};\n\nexport type ImportResponses = {\n    /**\n     * Success\n     */\n    200: ModelFromZendesk;\n    /**\n     * Default success response\n     */\n    default: ModelWithReadOnlyAndWriteOnly;\n};\n\nexport type ImportResponse = ImportResponses[keyof ImportResponses];\n\nexport type FooWowData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no+tag';\n};\n\nexport type FooWowResponses = {\n    /**\n     * OK\n     */\n    default: unknown;\n};\n\nexport type ApiVVersionODataControllerCountData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple/$count';\n};\n\nexport type ApiVVersionODataControllerCountResponses = {\n    /**\n     * Success\n     */\n    200: ModelFromZendesk;\n};\n\nexport type ApiVVersionODataControllerCountResponse = ApiVVersionODataControllerCountResponses[keyof ApiVVersionODataControllerCountResponses];\n\nexport type GetApiVbyApiVersionSimpleOperationData = {\n    body?: never;\n    path: {\n        /**\n         * foo in method\n         */\n        foo_param: string;\n    };\n    query?: never;\n    url: '/api/v{api-version}/simple:operation';\n};\n\nexport type GetApiVbyApiVersionSimpleOperationErrors = {\n    /**\n     * Default error response\n     */\n    default: ModelWithBoolean;\n};\n\nexport type GetApiVbyApiVersionSimpleOperationError = GetApiVbyApiVersionSimpleOperationErrors[keyof GetApiVbyApiVersionSimpleOperationErrors];\n\nexport type GetApiVbyApiVersionSimpleOperationResponses = {\n    /**\n     * Response is a simple number\n     */\n    200: number;\n};\n\nexport type GetApiVbyApiVersionSimpleOperationResponse = GetApiVbyApiVersionSimpleOperationResponses[keyof GetApiVbyApiVersionSimpleOperationResponses];\n\nexport type DeleteCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type GetCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type HeadCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type OptionsCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type PatchCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type PostCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type PutCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type DeleteFooData3 = {\n    body?: never;\n    headers: {\n        /**\n         * Parameter with illegal characters\n         */\n        'x-Foo-Bar': ModelWithString;\n    };\n    path: {\n        /**\n         * foo in method\n         */\n        foo_param: string;\n        /**\n         * bar in method\n         */\n        BarParam: string;\n    };\n    query?: never;\n    url: '/api/v{api-version}/foo/{foo_param}/bar/{BarParam}';\n};\n\nexport type CallWithDescriptionsData = {\n    body?: never;\n    path?: never;\n    query?: {\n        /**\n         * Testing multiline comments in string: First line\n         * Second line\n         *\n         * Fourth line\n         */\n        parameterWithBreaks?: string;\n        /**\n         * Testing backticks in string: `backticks` and ```multiple backticks``` should work\n         */\n        parameterWithBackticks?: string;\n        /**\n         * Testing slashes in string: \\backwards\\\\\\ and /forwards/// should work\n         */\n        parameterWithSlashes?: string;\n        /**\n         * Testing expression placeholders in string: ${expression} should work\n         */\n        parameterWithExpressionPlaceholders?: string;\n        /**\n         * Testing quotes in string: 'single quote''' and \"double quotes\"\"\" should work\n         */\n        parameterWithQuotes?: string;\n        /**\n         * Testing reserved characters in string: * inline * and ** inline ** should work\n         */\n        parameterWithReservedCharacters?: string;\n    };\n    url: '/api/v{api-version}/descriptions';\n};\n\nexport type DeprecatedCallData = {\n    body?: never;\n    headers: {\n        /**\n         * This parameter is deprecated\n         *\n         * @deprecated\n         */\n        parameter: DeprecatedModel | null;\n    };\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/parameters/deprecated';\n};\n\nexport type CallWithParametersData = {\n    /**\n     * This is the parameter that goes into the body\n     */\n    body: {\n        [key: string]: unknown;\n    } | null;\n    headers: {\n        /**\n         * This is the parameter that goes into the header\n         */\n        parameterHeader: string | null;\n    };\n    path: {\n        /**\n         * This is the parameter that goes into the path\n         */\n        parameterPath: string | null;\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string | null;\n    };\n    query: {\n        foo_ref_enum?: ModelWithNestedArrayEnumsDataFoo;\n        foo_all_of_enum: ModelWithNestedArrayEnumsDataFoo;\n        /**\n         * This is the parameter that goes into the query params\n         */\n        cursor: string | null;\n    };\n    url: '/api/v{api-version}/parameters/{parameterPath}';\n};\n\nexport type CallWithWeirdParameterNamesData = {\n    /**\n     * This is the parameter that goes into the body\n     */\n    body: ModelWithString | null;\n    headers: {\n        /**\n         * This is the parameter that goes into the request header\n         */\n        'parameter.header': string | null;\n    };\n    path: {\n        /**\n         * This is the parameter that goes into the path\n         */\n        'parameter.path.1'?: string;\n        /**\n         * This is the parameter that goes into the path\n         */\n        'parameter-path-2'?: string;\n        /**\n         * This is the parameter that goes into the path\n         */\n        'PARAMETER-PATH-3'?: string;\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string | null;\n    };\n    query: {\n        /**\n         * This is the parameter with a reserved keyword\n         */\n        default?: string;\n        /**\n         * This is the parameter that goes into the request query params\n         */\n        'parameter-query': string | null;\n    };\n    url: '/api/v{api-version}/parameters/{parameter.path.1}/{parameter-path-2}/{PARAMETER-PATH-3}';\n};\n\nexport type GetCallWithOptionalParamData = {\n    /**\n     * This is a required parameter\n     */\n    body: ModelWithOneOfEnum;\n    path?: never;\n    query?: {\n        /**\n         * This is an optional parameter\n         */\n        page?: number;\n    };\n    url: '/api/v{api-version}/parameters';\n};\n\nexport type PostCallWithOptionalParamData = {\n    /**\n     * This is an optional parameter\n     */\n    body?: {\n        offset?: number | null;\n    };\n    path?: never;\n    query: {\n        /**\n         * This is a required parameter\n         */\n        parameter: Pageable;\n    };\n    url: '/api/v{api-version}/parameters';\n};\n\nexport type PostCallWithOptionalParamResponses = {\n    /**\n     * Response is a simple number\n     */\n    200: number;\n    /**\n     * Success\n     */\n    204: void;\n};\n\nexport type PostCallWithOptionalParamResponse = PostCallWithOptionalParamResponses[keyof PostCallWithOptionalParamResponses];\n\nexport type PostApiVbyApiVersionRequestBodyData = {\n    /**\n     * A reusable request body\n     */\n    body?: SimpleRequestBody;\n    path?: never;\n    query?: {\n        /**\n         * This is a reusable parameter\n         */\n        parameter?: string;\n    };\n    url: '/api/v{api-version}/requestBody';\n};\n\nexport type PostApiVbyApiVersionFormDataData = {\n    /**\n     * A reusable request body\n     */\n    body?: SimpleFormData;\n    path?: never;\n    query?: {\n        /**\n         * This is a reusable parameter\n         */\n        parameter?: string;\n    };\n    url: '/api/v{api-version}/formData';\n};\n\nexport type CallWithDefaultParametersData = {\n    body?: never;\n    path?: never;\n    query?: {\n        /**\n         * This is a simple string with default value\n         */\n        parameterString?: string | null;\n        /**\n         * This is a simple number with default value\n         */\n        parameterNumber?: number | null;\n        /**\n         * This is a simple boolean with default value\n         */\n        parameterBoolean?: boolean | null;\n        /**\n         * This is a simple enum with default value\n         */\n        parameterEnum?: 'Success' | 'Warning' | 'Error';\n        /**\n         * This is a simple model with default value\n         */\n        parameterModel?: ModelWithString | null;\n    };\n    url: '/api/v{api-version}/defaults';\n};\n\nexport type CallWithDefaultOptionalParametersData = {\n    body?: never;\n    path?: never;\n    query?: {\n        /**\n         * This is a simple string that is optional with default value\n         */\n        parameterString?: string;\n        /**\n         * This is a simple number that is optional with default value\n         */\n        parameterNumber?: number;\n        /**\n         * This is a simple boolean that is optional with default value\n         */\n        parameterBoolean?: boolean;\n        /**\n         * This is a simple enum that is optional with default value\n         */\n        parameterEnum?: 'Success' | 'Warning' | 'Error';\n        /**\n         * This is a simple model that is optional with default value\n         */\n        parameterModel?: ModelWithString;\n    };\n    url: '/api/v{api-version}/defaults';\n};\n\nexport type CallToTestOrderOfParamsData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * This is a optional string with default\n         */\n        parameterOptionalStringWithDefault?: string;\n        /**\n         * This is a optional string with empty default\n         */\n        parameterOptionalStringWithEmptyDefault?: string;\n        /**\n         * This is a optional string with no default\n         */\n        parameterOptionalStringWithNoDefault?: string;\n        /**\n         * This is a string with default\n         */\n        parameterStringWithDefault: string;\n        /**\n         * This is a string with empty default\n         */\n        parameterStringWithEmptyDefault: string;\n        /**\n         * This is a string with no default\n         */\n        parameterStringWithNoDefault: string;\n        /**\n         * This is a string that can be null with no default\n         */\n        parameterStringNullableWithNoDefault?: string | null;\n        /**\n         * This is a string that can be null with default\n         */\n        parameterStringNullableWithDefault?: string | null;\n    };\n    url: '/api/v{api-version}/defaults';\n};\n\nexport type DuplicateNameData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/duplicate';\n};\n\nexport type DuplicateName2Data = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/duplicate';\n};\n\nexport type DuplicateName3Data = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/duplicate';\n};\n\nexport type DuplicateName4Data = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/duplicate';\n};\n\nexport type CallWithNoContentResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no-content';\n};\n\nexport type CallWithNoContentResponseResponses = {\n    /**\n     * Success\n     */\n    204: void;\n};\n\nexport type CallWithNoContentResponseResponse = CallWithNoContentResponseResponses[keyof CallWithNoContentResponseResponses];\n\nexport type CallWithResponseAndNoContentResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multiple-tags/response-and-no-content';\n};\n\nexport type CallWithResponseAndNoContentResponseResponses = {\n    /**\n     * Response is a simple number\n     */\n    200: number;\n    /**\n     * Success\n     */\n    204: void;\n};\n\nexport type CallWithResponseAndNoContentResponseResponse = CallWithResponseAndNoContentResponseResponses[keyof CallWithResponseAndNoContentResponseResponses];\n\nexport type DummyAData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multiple-tags/a';\n};\n\nexport type DummyAResponses = {\n    200: _400;\n};\n\nexport type DummyAResponse = DummyAResponses[keyof DummyAResponses];\n\nexport type DummyBData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multiple-tags/b';\n};\n\nexport type DummyBResponses = {\n    /**\n     * Success\n     */\n    204: void;\n};\n\nexport type DummyBResponse = DummyBResponses[keyof DummyBResponses];\n\nexport type CallWithResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/response';\n};\n\nexport type CallWithResponseResponses = {\n    default: Import;\n};\n\nexport type CallWithResponseResponse = CallWithResponseResponses[keyof CallWithResponseResponses];\n\nexport type CallWithDuplicateResponsesData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/response';\n};\n\nexport type CallWithDuplicateResponsesErrors = {\n    /**\n     * Message for 500 error\n     */\n    500: ModelWithStringError;\n    /**\n     * Message for 501 error\n     */\n    501: ModelWithStringError;\n    /**\n     * Message for 502 error\n     */\n    502: ModelWithStringError;\n    /**\n     * Message for 4XX errors\n     */\n    '4XX': DictionaryWithArray;\n    /**\n     * Default error response\n     */\n    default: ModelWithBoolean;\n};\n\nexport type CallWithDuplicateResponsesError = CallWithDuplicateResponsesErrors[keyof CallWithDuplicateResponsesErrors];\n\nexport type CallWithDuplicateResponsesResponses = {\n    /**\n     * Message for 200 response\n     */\n    200: ModelWithBoolean & ModelWithInteger;\n    /**\n     * Message for 201 response\n     */\n    201: ModelWithString;\n    /**\n     * Message for 202 response\n     */\n    202: ModelWithString;\n};\n\nexport type CallWithDuplicateResponsesResponse = CallWithDuplicateResponsesResponses[keyof CallWithDuplicateResponsesResponses];\n\nexport type CallWithResponsesData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/response';\n};\n\nexport type CallWithResponsesErrors = {\n    /**\n     * Message for 500 error\n     */\n    500: ModelWithStringError;\n    /**\n     * Message for 501 error\n     */\n    501: ModelWithStringError;\n    /**\n     * Message for 502 error\n     */\n    502: ModelWithStringError;\n    /**\n     * Message for default response\n     */\n    default: ModelWithStringError;\n};\n\nexport type CallWithResponsesError = CallWithResponsesErrors[keyof CallWithResponsesErrors];\n\nexport type CallWithResponsesResponses = {\n    /**\n     * Message for 200 response\n     */\n    200: {\n        readonly '@namespace.string'?: string;\n        readonly '@namespace.integer'?: number;\n        readonly value?: Array<ModelWithString>;\n    };\n    /**\n     * Message for 201 response\n     */\n    201: ModelThatExtends;\n    /**\n     * Message for 202 response\n     */\n    202: ModelThatExtendsExtends;\n};\n\nexport type CallWithResponsesResponse = CallWithResponsesResponses[keyof CallWithResponsesResponses];\n\nexport type CollectionFormatData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * This is an array parameter that is sent as csv format (comma-separated values)\n         */\n        parameterArrayCSV: Array<string> | null;\n        /**\n         * This is an array parameter that is sent as ssv format (space-separated values)\n         */\n        parameterArraySSV: Array<string> | null;\n        /**\n         * This is an array parameter that is sent as tsv format (tab-separated values)\n         */\n        parameterArrayTSV: Array<string> | null;\n        /**\n         * This is an array parameter that is sent as pipes format (pipe-separated values)\n         */\n        parameterArrayPipes: Array<string> | null;\n        /**\n         * This is an array parameter that is sent as multi format (multiple parameter instances)\n         */\n        parameterArrayMulti: Array<string> | null;\n    };\n    url: '/api/v{api-version}/collectionFormat';\n};\n\nexport type TypesData = {\n    body?: never;\n    path?: {\n        /**\n         * This is a number parameter\n         */\n        id?: number;\n    };\n    query: {\n        /**\n         * This is a number parameter\n         */\n        parameterNumber: number;\n        /**\n         * This is a string parameter\n         */\n        parameterString: string | null;\n        /**\n         * This is a boolean parameter\n         */\n        parameterBoolean: boolean | null;\n        /**\n         * This is an object parameter\n         */\n        parameterObject: {\n            [key: string]: unknown;\n        } | null;\n        /**\n         * This is an array parameter\n         */\n        parameterArray: Array<string> | null;\n        /**\n         * This is a dictionary parameter\n         */\n        parameterDictionary: {\n            [key: string]: unknown;\n        } | null;\n        /**\n         * This is an enum parameter\n         */\n        parameterEnum: 'Success' | 'Warning' | 'Error' | null;\n    };\n    url: '/api/v{api-version}/types';\n};\n\nexport type TypesResponses = {\n    /**\n     * Response is a simple number\n     */\n    200: number;\n    /**\n     * Response is a simple string\n     */\n    201: string;\n    /**\n     * Response is a simple boolean\n     */\n    202: boolean;\n    /**\n     * Response is a simple object\n     */\n    203: {\n        [key: string]: unknown;\n    };\n};\n\nexport type TypesResponse = TypesResponses[keyof TypesResponses];\n\nexport type UploadFileData = {\n    body: Blob | File;\n    path: {\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string | null;\n    };\n    query?: never;\n    url: '/api/v{api-version}/upload';\n};\n\nexport type UploadFileResponses = {\n    200: boolean;\n};\n\nexport type UploadFileResponse = UploadFileResponses[keyof UploadFileResponses];\n\nexport type FileResponseData = {\n    body?: never;\n    path: {\n        id: string;\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string;\n    };\n    query?: never;\n    url: '/api/v{api-version}/file/{id}';\n};\n\nexport type FileResponseResponses = {\n    /**\n     * Success\n     */\n    200: Blob | File;\n};\n\nexport type FileResponseResponse = FileResponseResponses[keyof FileResponseResponses];\n\nexport type ComplexTypesData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * Parameter containing object\n         */\n        parameterObject: {\n            first?: {\n                second?: {\n                    third?: string;\n                };\n            };\n        };\n        /**\n         * Parameter containing reference\n         */\n        parameterReference: ModelWithString;\n    };\n    url: '/api/v{api-version}/complex';\n};\n\nexport type ComplexTypesErrors = {\n    /**\n     * 400 `server` error\n     */\n    400: unknown;\n    /**\n     * 500 server error\n     */\n    500: unknown;\n};\n\nexport type ComplexTypesResponses = {\n    /**\n     * Successful response\n     */\n    200: Array<ModelWithString>;\n};\n\nexport type ComplexTypesResponse = ComplexTypesResponses[keyof ComplexTypesResponses];\n\nexport type MultipartResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multipart';\n};\n\nexport type MultipartResponseResponses = {\n    /**\n     * OK\n     */\n    200: {\n        file?: Blob | File;\n        metadata?: {\n            foo?: string;\n            bar?: string;\n        };\n    };\n};\n\nexport type MultipartResponseResponse = MultipartResponseResponses[keyof MultipartResponseResponses];\n\nexport type MultipartRequestData = {\n    body?: {\n        content?: Blob | File;\n        data?: ModelWithString | null;\n    };\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multipart';\n};\n\nexport type ComplexParamsData = {\n    body?: {\n        readonly key: string | null;\n        name: string | null;\n        enabled?: boolean;\n        type: 'Monkey' | 'Horse' | 'Bird';\n        listOfModels?: Array<ModelWithString> | null;\n        listOfStrings?: Array<string> | null;\n        parameters: ModelWithString | ModelWithEnum | ModelWithArray | ModelWithDictionary;\n        readonly user?: {\n            readonly id?: number;\n            readonly name?: string | null;\n        };\n    };\n    path: {\n        id: number;\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string;\n    };\n    query?: never;\n    url: '/api/v{api-version}/complex/{id}';\n};\n\nexport type ComplexParamsResponses = {\n    /**\n     * Success\n     */\n    200: ModelWithString;\n};\n\nexport type ComplexParamsResponse = ComplexParamsResponses[keyof ComplexParamsResponses];\n\nexport type CallWithResultFromHeaderData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/header';\n};\n\nexport type CallWithResultFromHeaderErrors = {\n    /**\n     * 400 server error\n     */\n    400: unknown;\n    /**\n     * 500 server error\n     */\n    500: unknown;\n};\n\nexport type CallWithResultFromHeaderResponses = {\n    /**\n     * Successful response\n     */\n    200: unknown;\n};\n\nexport type TestErrorCodeData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * Status code to return\n         */\n        status: number;\n    };\n    url: '/api/v{api-version}/error';\n};\n\nexport type TestErrorCodeErrors = {\n    /**\n     * Custom message: Internal Server Error\n     */\n    500: unknown;\n    /**\n     * Custom message: Not Implemented\n     */\n    501: unknown;\n    /**\n     * Custom message: Bad Gateway\n     */\n    502: unknown;\n    /**\n     * Custom message: Service Unavailable\n     */\n    503: unknown;\n};\n\nexport type TestErrorCodeResponses = {\n    /**\n     * Custom message: Successful response\n     */\n    200: unknown;\n};\n\nexport type NonAsciiæøåÆøÅöôêÊ字符串Data = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * Dummy input param\n         */\n        nonAsciiParamæøåÆØÅöôêÊ: number;\n    };\n    url: '/api/v{api-version}/non-ascii-æøåÆØÅöôêÊ字符串';\n};\n\nexport type NonAsciiæøåÆøÅöôêÊ字符串Responses = {\n    /**\n     * Successful response\n     */\n    200: Array<NonAsciiStringæøåÆøÅöôêÊ字符串>;\n};\n\nexport type NonAsciiæøåÆøÅöôêÊ字符串Response = NonAsciiæøåÆøÅöôêÊ字符串Responses[keyof NonAsciiæøåÆøÅöôêÊ字符串Responses];\n\nexport type PutWithFormUrlEncodedData = {\n    body: ArrayWithStrings;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/non-ascii-æøåÆØÅöôêÊ字符串';\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-ky/default/client/client.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { HTTPError, Options as KyOptions } from 'ky';\nimport ky from 'ky';\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, RetryOptions } from './types.gen';\nimport type { Middleware } from './utils.gen';\nimport {\n  buildUrl,\n  createConfig,\n  createInterceptors,\n  getParseAs,\n  mergeConfigs,\n  mergeHeaders,\n  setAuthParams,\n} from './utils.gen';\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 (options: RequestOptions) => {\n    const opts = {\n      ..._config,\n      ...options,\n      headers: mergeHeaders(_config.headers, options.headers),\n      ky: options.ky ?? _config.ky ?? ky,\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    if (opts.body === undefined || opts.serializedBody === '') {\n      opts.headers.delete('Content-Type');\n    }\n\n    const url = buildUrl(opts);\n\n    return { opts, url };\n  };\n\n  const parseErrorResponse = async (\n    response: Response,\n    request: Request,\n    opts: ResolvedRequestOptions,\n    interceptorsMiddleware: Middleware<Request, Response, unknown, ResolvedRequestOptions>,\n  ) => {\n    const result = {\n      request,\n      response,\n    };\n\n    const textError = await response.text();\n    let jsonError: unknown;\n\n    try {\n      jsonError = JSON.parse(textError);\n    } catch {\n      jsonError = undefined;\n    }\n\n    const error = jsonError ?? textError;\n    let finalError = error;\n\n    for (const fn of interceptorsMiddleware.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    return opts.responseStyle === 'data'\n      ? undefined\n      : {\n          error: finalError,\n          ...result,\n        };\n  };\n\n  const request: Client['request'] = async (options) => {\n    // @ts-expect-error\n    const { opts, url } = await beforeRequest(options);\n\n    const kyInstance = opts.ky!;\n\n    const validBody = getValidRequestBody(opts);\n\n    const kyOptions: KyOptions = {\n      body: validBody as BodyInit,\n      cache: opts.cache,\n      credentials: opts.credentials,\n      headers: opts.headers,\n      integrity: opts.integrity,\n      keepalive: opts.keepalive,\n      method: opts.method as KyOptions['method'],\n      mode: opts.mode,\n      redirect: 'follow',\n      referrer: opts.referrer,\n      referrerPolicy: opts.referrerPolicy,\n      signal: opts.signal,\n      throwHttpErrors: opts.throwOnError ?? false,\n      timeout: opts.timeout,\n      ...opts.kyOptions,\n    };\n\n    if (opts.retry && typeof opts.retry === 'object') {\n      const retryOpts = opts.retry as RetryOptions;\n      kyOptions.retry = {\n        limit: retryOpts.limit ?? 2,\n        methods: retryOpts.methods as Array<\n          'get' | 'post' | 'put' | 'patch' | 'head' | 'delete' | 'options' | 'trace'\n        >,\n        statusCodes: retryOpts.statusCodes,\n      };\n    }\n\n    let request = new Request(url, {\n      body: kyOptions.body as BodyInit,\n      headers: kyOptions.headers as HeadersInit,\n      method: kyOptions.method,\n    });\n\n    for (const fn of interceptors.request.fns) {\n      if (fn) {\n        request = await fn(request, opts);\n      }\n    }\n\n    let response: Response;\n\n    try {\n      response = await kyInstance(request, kyOptions);\n    } catch (error) {\n      if (error && typeof error === 'object' && 'response' in error) {\n        const httpError = error as HTTPError;\n        response = httpError.response;\n\n        for (const fn of interceptors.response.fns) {\n          if (fn) {\n            response = await fn(response, request, opts);\n          }\n        }\n\n        return parseErrorResponse(response, request, opts, interceptors);\n      }\n\n      throw error;\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    return parseErrorResponse(response, request, opts, interceptors);\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      fetch: globalThis.fetch,\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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-ky/default/client/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type { Auth } from '../core/auth.gen';\nexport type { QuerySerializerOptions } from '../core/bodySerializer.gen';\nexport {\n  formDataBodySerializer,\n  jsonBodySerializer,\n  urlSearchParamsBodySerializer,\n} from '../core/bodySerializer.gen';\nexport { buildClientParams } from '../core/params.gen';\nexport { serializeQueryKeyValue } from '../core/queryKeySerializer.gen';\nexport { createClient } from './client.gen';\nexport type {\n  Client,\n  ClientOptions,\n  Config,\n  CreateClientConfig,\n  Options,\n  RequestOptions,\n  RequestResult,\n  ResolvedRequestOptions,\n  ResponseStyle,\n  RetryOptions,\n  TDataShape,\n} from './types.gen';\nexport { createConfig, mergeHeaders } from './utils.gen';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-ky/default/client/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { Options as KyOptions } from 'ky';\nimport type ky from 'ky';\n\nimport type { Auth } from '../core/auth.gen';\nimport type {\n  ServerSentEventsOptions,\n  ServerSentEventsResult,\n} from '../core/serverSentEvents.gen';\nimport type { Client as CoreClient, Config as CoreConfig } from '../core/types.gen';\nimport type { Middleware } from './utils.gen';\n\nexport type ResponseStyle = 'data' | 'fields';\n\nexport interface RetryOptions {\n  /**\n   * Maximum number of retry attempts\n   *\n   * @default 2\n   */\n  limit?: number;\n  /**\n   * HTTP methods to retry\n   *\n   * @default ['get', 'put', 'head', 'delete', 'options', 'trace']\n   */\n  methods?: Array<'get' | 'post' | 'put' | 'delete' | 'patch' | 'head' | 'options' | 'trace'>;\n  /**\n   * HTTP status codes to retry\n   *\n   * @default [408, 413, 429, 500, 502, 503, 504]\n   */\n  statusCodes?: number[];\n}\n\nexport interface Config<T extends ClientOptions = ClientOptions>\n  extends\n    Omit<KyOptions, 'body' | 'headers' | 'method' | 'prefixUrl' | 'retry' | 'throwHttpErrors'>,\n    CoreConfig {\n  /**\n   * Base URL for all requests made by this client.\n   */\n  baseUrl?: T['baseUrl'];\n  /**\n   * Ky instance to use. You can use this option to provide a custom\n   * ky instance.\n   */\n  ky?: typeof ky;\n  /**\n   * Additional ky-specific options that will be passed directly to ky.\n   * This allows you to use any ky option not explicitly exposed in the config.\n   */\n  kyOptions?: Omit<KyOptions, 'method' | 'prefixUrl'>;\n  /**\n   * Return the response data parsed in a specified format. By default, `auto`\n   * will infer the appropriate method from the `Content-Type` response header.\n   * You can override this behavior with any of the {@link Body} methods.\n   * Select `stream` if you don't want to parse response data at all.\n   *\n   * @default 'auto'\n   */\n  parseAs?: 'arrayBuffer' | 'auto' | 'blob' | 'formData' | 'json' | 'stream' | 'text';\n  /**\n   * Should we return only data or multiple fields (data, error, response, etc.)?\n   *\n   * @default 'fields'\n   */\n  responseStyle?: ResponseStyle;\n  /**\n   * Retry configuration\n   */\n  retry?: RetryOptions;\n  /**\n   * Throw an error instead of returning it in the response?\n   *\n   * @default false\n   */\n  throwOnError?: T['throwOnError'];\n  /**\n   * Request timeout in milliseconds\n   *\n   * @default 10000\n   */\n  timeout?: number;\n}\n\nexport interface RequestOptions<\n  TData = unknown,\n  TResponseStyle extends ResponseStyle = 'fields',\n  ThrowOnError extends boolean = boolean,\n  Url extends string = string,\n>\n  extends\n    Config<{\n      responseStyle: TResponseStyle;\n      throwOnError: ThrowOnError;\n    }>,\n    Pick<\n      ServerSentEventsOptions<TData>,\n      | 'onRequest'\n      | 'onSseError'\n      | 'onSseEvent'\n      | 'sseDefaultRetryDelay'\n      | 'sseMaxRetryAttempts'\n      | 'sseMaxRetryDelay'\n    > {\n  /**\n   * Any body that you want to add to your request.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/fetch#body}\n   */\n  body?: unknown;\n  path?: Record<string, unknown>;\n  query?: Record<string, unknown>;\n  /**\n   * Security mechanism(s) to use for the request.\n   */\n  security?: ReadonlyArray<Auth>;\n  url: Url;\n}\n\nexport interface ResolvedRequestOptions<\n  TResponseStyle extends ResponseStyle = 'fields',\n  ThrowOnError extends boolean = boolean,\n  Url extends string = string,\n> extends RequestOptions<unknown, TResponseStyle, ThrowOnError, Url> {\n  serializedBody?: string;\n}\n\nexport type RequestResult<\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = boolean,\n  TResponseStyle extends ResponseStyle = 'fields',\n> = ThrowOnError extends true\n  ? Promise<\n      TResponseStyle extends 'data'\n        ? TData extends Record<string, unknown>\n          ? TData[keyof TData]\n          : TData\n        : {\n            data: TData extends Record<string, unknown> ? TData[keyof TData] : TData;\n            request: Request;\n            response: Response;\n          }\n    >\n  : Promise<\n      TResponseStyle extends 'data'\n        ? (TData extends Record<string, unknown> ? TData[keyof TData] : TData) | undefined\n        : (\n            | {\n                data: TData extends Record<string, unknown> ? TData[keyof TData] : TData;\n                error: undefined;\n              }\n            | {\n                data: undefined;\n                error: TError extends Record<string, unknown> ? TError[keyof TError] : TError;\n              }\n          ) & {\n            request: Request;\n            response: Response;\n          }\n    >;\n\nexport interface ClientOptions {\n  baseUrl?: string;\n  responseStyle?: ResponseStyle;\n  throwOnError?: boolean;\n}\n\ntype MethodFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'>,\n) => RequestResult<TData, TError, ThrowOnError, TResponseStyle>;\n\ntype SseFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'>,\n) => Promise<ServerSentEventsResult<TData, TError>>;\n\ntype RequestFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'> &\n    Pick<Required<RequestOptions<TData, TResponseStyle, ThrowOnError>>, 'method'>,\n) => RequestResult<TData, TError, ThrowOnError, TResponseStyle>;\n\ntype BuildUrlFn = <\n  TData extends {\n    body?: unknown;\n    path?: Record<string, unknown>;\n    query?: Record<string, unknown>;\n    url: string;\n  },\n>(\n  options: TData & Options<TData>,\n) => string;\n\nexport type Client = CoreClient<RequestFn, Config, MethodFn, BuildUrlFn, SseFn> & {\n  interceptors: Middleware<Request, Response, unknown, ResolvedRequestOptions>;\n};\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 = ClientOptions> = (\n  override?: Config<ClientOptions & T>,\n) => Config<Required<ClientOptions> & T>;\n\nexport interface TDataShape {\n  body?: unknown;\n  headers?: unknown;\n  path?: unknown;\n  query?: unknown;\n  url: string;\n}\n\ntype OmitKeys<T, K> = Pick<T, Exclude<keyof T, K>>;\n\nexport type Options<\n  TData extends TDataShape = TDataShape,\n  ThrowOnError extends boolean = boolean,\n  TResponse = unknown,\n  TResponseStyle extends ResponseStyle = 'fields',\n> = OmitKeys<\n  RequestOptions<TResponse, TResponseStyle, ThrowOnError>,\n  'body' | 'path' | 'query' | 'url'\n> &\n  ([TData] extends [never] ? unknown : Omit<TData, 'url'>);\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-ky/default/client/utils.gen.ts",
    "content": "// 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    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        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  throwOnError: false,\n  timeout: 10000,\n  ...override,\n});\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-ky/default/client.gen.ts",
    "content": "// 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: 'http://localhost:3000/base' }));\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-ky/default/core/auth.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-ky/default/core/bodySerializer.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-ky/default/core/params.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-ky/default/core/pathSerializer.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-ky/default/core/queryKeySerializer.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\n/**\n * JSON-friendly union that mirrors what Pinia Colada can hash.\n */\nexport type JsonValue =\n  | null\n  | string\n  | number\n  | boolean\n  | JsonValue[]\n  | { [key: string]: JsonValue };\n\n/**\n * Replacer that converts non-JSON values (bigint, Date, etc.) to safe substitutes.\n */\nexport const queryKeyJsonReplacer = (_key: string, value: unknown) => {\n  if (value === undefined || typeof value === 'function' || typeof value === 'symbol') {\n    return undefined;\n  }\n  if (typeof value === 'bigint') {\n    return value.toString();\n  }\n  if (value instanceof Date) {\n    return value.toISOString();\n  }\n  return value;\n};\n\n/**\n * Safely stringifies a value and parses it back into a JsonValue.\n */\nexport const stringifyToJsonValue = (input: unknown): JsonValue | undefined => {\n  try {\n    const json = JSON.stringify(input, queryKeyJsonReplacer);\n    if (json === undefined) {\n      return undefined;\n    }\n    return JSON.parse(json) as JsonValue;\n  } catch {\n    return undefined;\n  }\n};\n\n/**\n * Detects plain objects (including objects with a null prototype).\n */\nconst isPlainObject = (value: unknown): value is Record<string, unknown> => {\n  if (value === null || typeof value !== 'object') {\n    return false;\n  }\n  const prototype = Object.getPrototypeOf(value as object);\n  return prototype === Object.prototype || prototype === null;\n};\n\n/**\n * Turns URLSearchParams into a sorted JSON object for deterministic keys.\n */\nconst serializeSearchParams = (params: URLSearchParams): JsonValue => {\n  const entries = Array.from(params.entries()).sort(([a], [b]) => a.localeCompare(b));\n  const result: Record<string, JsonValue> = {};\n\n  for (const [key, value] of entries) {\n    const existing = result[key];\n    if (existing === undefined) {\n      result[key] = value;\n      continue;\n    }\n\n    if (Array.isArray(existing)) {\n      (existing as string[]).push(value);\n    } else {\n      result[key] = [existing, value];\n    }\n  }\n\n  return result;\n};\n\n/**\n * Normalizes any accepted value into a JSON-friendly shape for query keys.\n */\nexport const serializeQueryKeyValue = (value: unknown): JsonValue | undefined => {\n  if (value === null) {\n    return null;\n  }\n\n  if (typeof value === 'string' || typeof value === 'number' || typeof value === 'boolean') {\n    return value;\n  }\n\n  if (value === undefined || typeof value === 'function' || typeof value === 'symbol') {\n    return undefined;\n  }\n\n  if (typeof value === 'bigint') {\n    return value.toString();\n  }\n\n  if (value instanceof Date) {\n    return value.toISOString();\n  }\n\n  if (Array.isArray(value)) {\n    return stringifyToJsonValue(value);\n  }\n\n  if (typeof URLSearchParams !== 'undefined' && value instanceof URLSearchParams) {\n    return serializeSearchParams(value);\n  }\n\n  if (isPlainObject(value)) {\n    return stringifyToJsonValue(value);\n  }\n\n  return undefined;\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-ky/default/core/serverSentEvents.gen.ts",
    "content": "// 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 const 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            // Normalize line endings: CRLF -> LF, then CR -> LF\n            buffer = buffer.replace(/\\r\\n/g, '\\n').replace(/\\r/g, '\\n');\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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-ky/default/core/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { Auth, AuthToken } from './auth.gen';\nimport type { BodySerializer, QuerySerializer, QuerySerializerOptions } from './bodySerializer.gen';\n\nexport type HttpMethod =\n  | 'connect'\n  | 'delete'\n  | 'get'\n  | 'head'\n  | 'options'\n  | 'patch'\n  | 'post'\n  | 'put'\n  | 'trace';\n\nexport type Client<\n  RequestFn = never,\n  Config = unknown,\n  MethodFn = never,\n  BuildUrlFn = never,\n  SseFn = never,\n> = {\n  /**\n   * Returns the final request URL.\n   */\n  buildUrl: BuildUrlFn;\n  getConfig: () => Config;\n  request: RequestFn;\n  setConfig: (config: Config) => Config;\n} & {\n  [K in HttpMethod]: MethodFn;\n} & ([SseFn] extends [never] ? { sse?: never } : { sse: { [K in HttpMethod]: SseFn } });\n\nexport interface Config {\n  /**\n   * Auth token or a function returning auth token. The resolved value will be\n   * added to the request payload as defined by its `security` array.\n   */\n  auth?: ((auth: Auth) => Promise<AuthToken> | AuthToken) | AuthToken;\n  /**\n   * A function for serializing request body parameter. By default,\n   * {@link JSON.stringify()} will be used.\n   */\n  bodySerializer?: BodySerializer | null;\n  /**\n   * An object containing any HTTP headers that you want to pre-populate your\n   * `Headers` object with.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/Headers/Headers#init See more}\n   */\n  headers?:\n    | RequestInit['headers']\n    | Record<\n        string,\n        string | number | boolean | (string | number | boolean)[] | null | undefined | unknown\n      >;\n  /**\n   * The request method.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/fetch#method See more}\n   */\n  method?: Uppercase<HttpMethod>;\n  /**\n   * A function for serializing request query parameters. By default, arrays\n   * will be exploded in form style, objects will be exploded in deepObject\n   * style, and reserved characters are percent-encoded.\n   *\n   * This method will have no effect if the native `paramsSerializer()` Axios\n   * API function is used.\n   *\n   * {@link https://swagger.io/docs/specification/serialization/#query View examples}\n   */\n  querySerializer?: QuerySerializer | QuerySerializerOptions;\n  /**\n   * A function validating request data. This is useful if you want to ensure\n   * the request conforms to the desired shape, so it can be safely sent to\n   * the server.\n   */\n  requestValidator?: (data: unknown) => Promise<unknown>;\n  /**\n   * A function transforming response data before it's returned. This is useful\n   * for post-processing data, e.g. converting ISO strings into Date objects.\n   */\n  responseTransformer?: (data: unknown) => Promise<unknown>;\n  /**\n   * A function validating response data. This is useful if you want to ensure\n   * the response conforms to the desired shape, so it can be safely passed to\n   * the transformers and returned to the user.\n   */\n  responseValidator?: (data: unknown) => Promise<unknown>;\n}\n\ntype IsExactlyNeverOrNeverUndefined<T> = [T] extends [never]\n  ? true\n  : [T] extends [never | undefined]\n    ? [undefined] extends [T]\n      ? false\n      : true\n    : false;\n\nexport type OmitNever<T extends Record<string, unknown>> = {\n  [K in keyof T as IsExactlyNeverOrNeverUndefined<T[K]> extends true ? never : K]: T[K];\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-ky/default/core/utils.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-ky/default/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport { apiVVersionODataControllerCount, callToTestOrderOfParams, callWithDefaultOptionalParameters, callWithDefaultParameters, callWithDescriptions, callWithDuplicateResponses, callWithNoContentResponse, callWithParameters, callWithResponse, callWithResponseAndNoContentResponse, callWithResponses, callWithResultFromHeader, callWithWeirdParameterNames, collectionFormat, complexParams, complexTypes, deleteCallWithoutParametersAndResponse, deleteFoo, deprecatedCall, dummyA, dummyB, duplicateName, duplicateName2, duplicateName3, duplicateName4, export_, fileResponse, fooWow, getApiVbyApiVersionSimpleOperation, getCallWithOptionalParam, getCallWithoutParametersAndResponse, headCallWithoutParametersAndResponse, import_, multipartRequest, multipartResponse, nonAsciiæøåÆøÅöôêÊ字符串, type Options, optionsCallWithoutParametersAndResponse, patchApiVbyApiVersionNoTag, patchCallWithoutParametersAndResponse, postApiVbyApiVersionFormData, postApiVbyApiVersionRequestBody, postCallWithOptionalParam, postCallWithoutParametersAndResponse, putCallWithoutParametersAndResponse, putWithFormUrlEncoded, testErrorCode, types, uploadFile } from './sdk.gen';\nexport type { _3eNum1Период, _400, AdditionalPropertiesIntegerIssue, AdditionalPropertiesUnknownIssue, AdditionalPropertiesUnknownIssue2, AdditionalPropertiesUnknownIssue3, AdditionalPropertiesUnknownIssueWritable, AnyOfAnyAndNull, AnyOfArrays, ApiVVersionODataControllerCountData, ApiVVersionODataControllerCountResponse, ApiVVersionODataControllerCountResponses, ArrayWithAnyOfProperties, ArrayWithArray, ArrayWithBooleans, ArrayWithNumbers, ArrayWithProperties, ArrayWithReferences, ArrayWithStrings, CallToTestOrderOfParamsData, CallWithDefaultOptionalParametersData, CallWithDefaultParametersData, CallWithDescriptionsData, CallWithDuplicateResponsesData, CallWithDuplicateResponsesError, CallWithDuplicateResponsesErrors, CallWithDuplicateResponsesResponse, CallWithDuplicateResponsesResponses, CallWithNoContentResponseData, CallWithNoContentResponseResponse, CallWithNoContentResponseResponses, CallWithParametersData, CallWithResponseAndNoContentResponseData, CallWithResponseAndNoContentResponseResponse, CallWithResponseAndNoContentResponseResponses, CallWithResponseData, CallWithResponseResponse, CallWithResponseResponses, CallWithResponsesData, CallWithResponsesError, CallWithResponsesErrors, CallWithResponsesResponse, CallWithResponsesResponses, CallWithResultFromHeaderData, CallWithResultFromHeaderErrors, CallWithResultFromHeaderResponses, CallWithWeirdParameterNamesData, CamelCaseCommentWithBreaks, CharactersInDescription, ClientOptions, CollectionFormatData, CommentWithBackticks, CommentWithBackticksAndQuotes, CommentWithBreaks, CommentWithExpressionPlaceholders, CommentWithQuotes, CommentWithReservedCharacters, CommentWithSlashes, ComplexParamsData, ComplexParamsResponse, ComplexParamsResponses, ComplexTypesData, ComplexTypesErrors, ComplexTypesResponse, ComplexTypesResponses, CompositionBaseModel, CompositionExtendedModel, CompositionWithAllOfAndNullable, CompositionWithAnyOf, CompositionWithAnyOfAndNullable, CompositionWithAnyOfAnonymous, CompositionWithNestedAnyAndTypeNull, CompositionWithNestedAnyOfAndNull, CompositionWithOneOf, CompositionWithOneOfAndComplexArrayDictionary, CompositionWithOneOfAndNullable, CompositionWithOneOfAndProperties, CompositionWithOneOfAndSimpleArrayDictionary, CompositionWithOneOfAndSimpleDictionary, CompositionWithOneOfAnonymous, CompositionWithOneOfDiscriminator, ConstValue, Default, DeleteCallWithoutParametersAndResponseData, DeleteFooData, DeleteFooData2, DeleteFooData3, DeprecatedCallData, DeprecatedModel, DictionaryWithArray, DictionaryWithDictionary, DictionaryWithProperties, DictionaryWithPropertiesAndAdditionalProperties, DictionaryWithReference, DictionaryWithString, DummyAData, DummyAResponse, DummyAResponses, DummyBData, DummyBResponse, DummyBResponses, DuplicateName2Data, DuplicateName3Data, DuplicateName4Data, DuplicateNameData, EnumFromDescription, EnumWithExtensions, EnumWithNumbers, EnumWithReplacedCharacters, EnumWithStrings, EnumWithXEnumNames, ExportData, ExternalRefA, ExternalRefB, ExternalSharedModel, File, FileResponseData, FileResponseResponse, FileResponseResponses, FileWritable, FooWowData, FooWowResponses, FreeFormObjectWithAdditionalPropertiesEqEmptyObject, FreeFormObjectWithAdditionalPropertiesEqTrue, FreeFormObjectWithoutAdditionalProperties, GenericSchemaDuplicateIssue1SystemBoolean, GenericSchemaDuplicateIssue1SystemBooleanWritable, GenericSchemaDuplicateIssue1SystemString, GenericSchemaDuplicateIssue1SystemStringWritable, GetApiVbyApiVersionSimpleOperationData, GetApiVbyApiVersionSimpleOperationError, GetApiVbyApiVersionSimpleOperationErrors, GetApiVbyApiVersionSimpleOperationResponse, GetApiVbyApiVersionSimpleOperationResponses, GetCallWithOptionalParamData, GetCallWithoutParametersAndResponseData, HeadCallWithoutParametersAndResponseData, Import, ImportData, ImportResponse, ImportResponses, IoK8sApimachineryPkgApisMetaV1DeleteOptions, IoK8sApimachineryPkgApisMetaV1Preconditions, ModelCircle, ModelFromZendesk, ModelSquare, ModelThatExtends, ModelThatExtendsExtends, ModelWithAdditionalPropertiesEqTrue, ModelWithAdditionalPropertiesRef, ModelWithAnyOfConstantSizeArray, ModelWithAnyOfConstantSizeArrayAndIntersect, ModelWithAnyOfConstantSizeArrayNullable, ModelWithAnyOfConstantSizeArrayWithNSizeAndOptions, ModelWithAnyOfConstantSizeArrayWithNSizeAndOptionsWritable, ModelWithArray, ModelWithArrayReadOnlyAndWriteOnly, ModelWithArrayReadOnlyAndWriteOnlyWritable, ModelWithBackticksInDescription, ModelWithBoolean, ModelWithCircularReference, ModelWithConst, ModelWithConstantSizeArray, ModelWithDictionary, ModelWithDuplicateImports, ModelWithDuplicateProperties, ModelWithEnum, ModelWithEnumFromDescription, ModelWithEnumWithHyphen, ModelWithInteger, ModelWithNestedArrayEnums, ModelWithNestedArrayEnumsData, ModelWithNestedArrayEnumsDataBar, ModelWithNestedArrayEnumsDataFoo, ModelWithNestedCompositionEnums, ModelWithNestedEnums, ModelWithNestedProperties, ModelWithNullableObject, ModelWithNullableString, ModelWithNumericEnumUnion, ModelWithOneOfAndProperties, ModelWithOneOfEnum, ModelWithOrderedProperties, ModelWithPattern, ModelWithPatternWritable, ModelWithPrefixItemsConstantSizeArray, ModelWithProperties, ModelWithPropertiesWritable, ModelWithReadOnlyAndWriteOnly, ModelWithReadOnlyAndWriteOnlyWritable, ModelWithReference, ModelWithReferenceWritable, ModelWithString, ModelWithStringError, MultipartRequestData, MultipartResponseData, MultipartResponseResponse, MultipartResponseResponses, NestedAnyOfArraysNullable, NonAsciiæøåÆøÅöôêÊ字符串Data, NonAsciiæøåÆøÅöôêÊ字符串Response, NonAsciiæøåÆøÅöôêÊ字符串Responses, NonAsciiStringæøåÆøÅöôêÊ字符串, NullableObject, OneOfAllOfIssue, OneOfAllOfIssueWritable, OptionsCallWithoutParametersAndResponseData, Pageable, ParameterSimpleParameterUnused, PatchApiVbyApiVersionNoTagData, PatchApiVbyApiVersionNoTagResponses, PatchCallWithoutParametersAndResponseData, PostApiVbyApiVersionFormDataData, PostApiVbyApiVersionRequestBodyData, PostCallWithOptionalParamData, PostCallWithOptionalParamResponse, PostCallWithOptionalParamResponses, PostCallWithoutParametersAndResponseData, PostServiceWithEmptyTagResponse, PostServiceWithEmptyTagResponse2, PutCallWithoutParametersAndResponseData, PutWithFormUrlEncodedData, SchemaWithFormRestrictedKeys, SimpleBoolean, SimpleFile, SimpleFormData, SimpleInteger, SimpleParameter, SimpleReference, SimpleRequestBody, SimpleString, SimpleStringWithPattern, TestErrorCodeData, TestErrorCodeErrors, TestErrorCodeResponses, TypesData, TypesResponse, TypesResponses, UploadFileData, UploadFileResponse, UploadFileResponses, XFooBar } from './types.gen';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-ky/default/sdk.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport { type Client, formDataBodySerializer, type Options as Options2, type TDataShape, urlSearchParamsBodySerializer } from './client';\nimport { client } from './client.gen';\nimport type { ApiVVersionODataControllerCountData, ApiVVersionODataControllerCountResponses, CallToTestOrderOfParamsData, CallWithDefaultOptionalParametersData, CallWithDefaultParametersData, CallWithDescriptionsData, CallWithDuplicateResponsesData, CallWithDuplicateResponsesErrors, CallWithDuplicateResponsesResponses, CallWithNoContentResponseData, CallWithNoContentResponseResponses, CallWithParametersData, CallWithResponseAndNoContentResponseData, CallWithResponseAndNoContentResponseResponses, CallWithResponseData, CallWithResponseResponses, CallWithResponsesData, CallWithResponsesErrors, CallWithResponsesResponses, CallWithResultFromHeaderData, CallWithResultFromHeaderErrors, CallWithResultFromHeaderResponses, CallWithWeirdParameterNamesData, CollectionFormatData, ComplexParamsData, ComplexParamsResponses, ComplexTypesData, ComplexTypesErrors, ComplexTypesResponses, DeleteCallWithoutParametersAndResponseData, DeleteFooData3, DeprecatedCallData, DummyAData, DummyAResponses, DummyBData, DummyBResponses, DuplicateName2Data, DuplicateName3Data, DuplicateName4Data, DuplicateNameData, ExportData, FileResponseData, FileResponseResponses, FooWowData, FooWowResponses, GetApiVbyApiVersionSimpleOperationData, GetApiVbyApiVersionSimpleOperationErrors, GetApiVbyApiVersionSimpleOperationResponses, GetCallWithOptionalParamData, GetCallWithoutParametersAndResponseData, HeadCallWithoutParametersAndResponseData, ImportData, ImportResponses, MultipartRequestData, MultipartResponseData, MultipartResponseResponses, NonAsciiæøåÆøÅöôêÊ字符串Data, NonAsciiæøåÆøÅöôêÊ字符串Responses, OptionsCallWithoutParametersAndResponseData, PatchApiVbyApiVersionNoTagData, PatchApiVbyApiVersionNoTagResponses, PatchCallWithoutParametersAndResponseData, PostApiVbyApiVersionFormDataData, PostApiVbyApiVersionRequestBodyData, PostCallWithOptionalParamData, PostCallWithOptionalParamResponses, PostCallWithoutParametersAndResponseData, PutCallWithoutParametersAndResponseData, PutWithFormUrlEncodedData, TestErrorCodeData, TestErrorCodeErrors, TestErrorCodeResponses, TypesData, TypesResponses, UploadFileData, UploadFileResponses } from './types.gen';\n\nexport type Options<TData extends TDataShape = TDataShape, ThrowOnError extends boolean = boolean> = Options2<TData, ThrowOnError> & {\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\nexport const export_ = <ThrowOnError extends boolean = false>(options?: Options<ExportData, ThrowOnError>) => (options?.client ?? client).get<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/no+tag', ...options });\n\nexport const patchApiVbyApiVersionNoTag = <ThrowOnError extends boolean = false>(options?: Options<PatchApiVbyApiVersionNoTagData, ThrowOnError>) => (options?.client ?? client).patch<PatchApiVbyApiVersionNoTagResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/no+tag', ...options });\n\nexport const import_ = <ThrowOnError extends boolean = false>(options: Options<ImportData, ThrowOnError>) => (options.client ?? client).post<ImportResponses, unknown, ThrowOnError>({\n    url: '/api/v{api-version}/no+tag',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options.headers\n    }\n});\n\nexport const fooWow = <ThrowOnError extends boolean = false>(options?: Options<FooWowData, ThrowOnError>) => (options?.client ?? client).put<FooWowResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/no+tag', ...options });\n\nexport const apiVVersionODataControllerCount = <ThrowOnError extends boolean = false>(options?: Options<ApiVVersionODataControllerCountData, ThrowOnError>) => (options?.client ?? client).get<ApiVVersionODataControllerCountResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple/$count', ...options });\n\nexport const getApiVbyApiVersionSimpleOperation = <ThrowOnError extends boolean = false>(options: Options<GetApiVbyApiVersionSimpleOperationData, ThrowOnError>) => (options.client ?? client).get<GetApiVbyApiVersionSimpleOperationResponses, GetApiVbyApiVersionSimpleOperationErrors, ThrowOnError>({ url: '/api/v{api-version}/simple:operation', ...options });\n\nexport const deleteCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<DeleteCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).delete<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const getCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<GetCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).get<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const headCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<HeadCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).head<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const optionsCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<OptionsCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).options<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const patchCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<PatchCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).patch<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const postCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<PostCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).post<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const putCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<PutCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).put<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const deleteFoo = <ThrowOnError extends boolean = false>(options: Options<DeleteFooData3, ThrowOnError>) => (options.client ?? client).delete<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/foo/{foo_param}/bar/{BarParam}', ...options });\n\nexport const callWithDescriptions = <ThrowOnError extends boolean = false>(options?: Options<CallWithDescriptionsData, ThrowOnError>) => (options?.client ?? client).post<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/descriptions', ...options });\n\n/**\n * @deprecated\n */\nexport const deprecatedCall = <ThrowOnError extends boolean = false>(options: Options<DeprecatedCallData, ThrowOnError>) => (options.client ?? client).post<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/parameters/deprecated', ...options });\n\nexport const callWithParameters = <ThrowOnError extends boolean = false>(options: Options<CallWithParametersData, ThrowOnError>) => (options.client ?? client).post<unknown, unknown, ThrowOnError>({\n    url: '/api/v{api-version}/parameters/{parameterPath}',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options.headers\n    }\n});\n\nexport const callWithWeirdParameterNames = <ThrowOnError extends boolean = false>(options: Options<CallWithWeirdParameterNamesData, ThrowOnError>) => (options.client ?? client).post<unknown, unknown, ThrowOnError>({\n    url: '/api/v{api-version}/parameters/{parameter.path.1}/{parameter-path-2}/{PARAMETER-PATH-3}',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options.headers\n    }\n});\n\nexport const getCallWithOptionalParam = <ThrowOnError extends boolean = false>(options: Options<GetCallWithOptionalParamData, ThrowOnError>) => (options.client ?? client).get<unknown, unknown, ThrowOnError>({\n    url: '/api/v{api-version}/parameters',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options.headers\n    }\n});\n\nexport const postCallWithOptionalParam = <ThrowOnError extends boolean = false>(options: Options<PostCallWithOptionalParamData, ThrowOnError>) => (options.client ?? client).post<PostCallWithOptionalParamResponses, unknown, ThrowOnError>({\n    url: '/api/v{api-version}/parameters',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options.headers\n    }\n});\n\nexport const postApiVbyApiVersionRequestBody = <ThrowOnError extends boolean = false>(options?: Options<PostApiVbyApiVersionRequestBodyData, ThrowOnError>) => (options?.client ?? client).post<unknown, unknown, ThrowOnError>({\n    url: '/api/v{api-version}/requestBody',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options?.headers\n    }\n});\n\nexport const postApiVbyApiVersionFormData = <ThrowOnError extends boolean = false>(options?: Options<PostApiVbyApiVersionFormDataData, ThrowOnError>) => (options?.client ?? client).post<unknown, unknown, ThrowOnError>({\n    ...formDataBodySerializer,\n    url: '/api/v{api-version}/formData',\n    ...options,\n    headers: {\n        'Content-Type': null,\n        ...options?.headers\n    }\n});\n\nexport const callWithDefaultParameters = <ThrowOnError extends boolean = false>(options?: Options<CallWithDefaultParametersData, ThrowOnError>) => (options?.client ?? client).get<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/defaults', ...options });\n\nexport const callWithDefaultOptionalParameters = <ThrowOnError extends boolean = false>(options?: Options<CallWithDefaultOptionalParametersData, ThrowOnError>) => (options?.client ?? client).post<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/defaults', ...options });\n\nexport const callToTestOrderOfParams = <ThrowOnError extends boolean = false>(options: Options<CallToTestOrderOfParamsData, ThrowOnError>) => (options.client ?? client).put<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/defaults', ...options });\n\nexport const duplicateName = <ThrowOnError extends boolean = false>(options?: Options<DuplicateNameData, ThrowOnError>) => (options?.client ?? client).delete<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/duplicate', ...options });\n\nexport const duplicateName2 = <ThrowOnError extends boolean = false>(options?: Options<DuplicateName2Data, ThrowOnError>) => (options?.client ?? client).get<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/duplicate', ...options });\n\nexport const duplicateName3 = <ThrowOnError extends boolean = false>(options?: Options<DuplicateName3Data, ThrowOnError>) => (options?.client ?? client).post<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/duplicate', ...options });\n\nexport const duplicateName4 = <ThrowOnError extends boolean = false>(options?: Options<DuplicateName4Data, ThrowOnError>) => (options?.client ?? client).put<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/duplicate', ...options });\n\nexport const callWithNoContentResponse = <ThrowOnError extends boolean = false>(options?: Options<CallWithNoContentResponseData, ThrowOnError>) => (options?.client ?? client).get<CallWithNoContentResponseResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/no-content', ...options });\n\nexport const callWithResponseAndNoContentResponse = <ThrowOnError extends boolean = false>(options?: Options<CallWithResponseAndNoContentResponseData, ThrowOnError>) => (options?.client ?? client).get<CallWithResponseAndNoContentResponseResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/multiple-tags/response-and-no-content', ...options });\n\nexport const dummyA = <ThrowOnError extends boolean = false>(options?: Options<DummyAData, ThrowOnError>) => (options?.client ?? client).get<DummyAResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/multiple-tags/a', ...options });\n\nexport const dummyB = <ThrowOnError extends boolean = false>(options?: Options<DummyBData, ThrowOnError>) => (options?.client ?? client).get<DummyBResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/multiple-tags/b', ...options });\n\nexport const callWithResponse = <ThrowOnError extends boolean = false>(options?: Options<CallWithResponseData, ThrowOnError>) => (options?.client ?? client).get<CallWithResponseResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/response', ...options });\n\nexport const callWithDuplicateResponses = <ThrowOnError extends boolean = false>(options?: Options<CallWithDuplicateResponsesData, ThrowOnError>) => (options?.client ?? client).post<CallWithDuplicateResponsesResponses, CallWithDuplicateResponsesErrors, ThrowOnError>({ url: '/api/v{api-version}/response', ...options });\n\nexport const callWithResponses = <ThrowOnError extends boolean = false>(options?: Options<CallWithResponsesData, ThrowOnError>) => (options?.client ?? client).put<CallWithResponsesResponses, CallWithResponsesErrors, ThrowOnError>({ url: '/api/v{api-version}/response', ...options });\n\nexport const collectionFormat = <ThrowOnError extends boolean = false>(options: Options<CollectionFormatData, ThrowOnError>) => (options.client ?? client).get<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/collectionFormat', ...options });\n\nexport const types = <ThrowOnError extends boolean = false>(options: Options<TypesData, ThrowOnError>) => (options.client ?? client).get<TypesResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/types', ...options });\n\nexport const uploadFile = <ThrowOnError extends boolean = false>(options: Options<UploadFileData, ThrowOnError>) => (options.client ?? client).post<UploadFileResponses, unknown, ThrowOnError>({\n    ...urlSearchParamsBodySerializer,\n    url: '/api/v{api-version}/upload',\n    ...options,\n    headers: {\n        'Content-Type': 'application/x-www-form-urlencoded',\n        ...options.headers\n    }\n});\n\nexport const fileResponse = <ThrowOnError extends boolean = false>(options: Options<FileResponseData, ThrowOnError>) => (options.client ?? client).get<FileResponseResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/file/{id}', ...options });\n\nexport const complexTypes = <ThrowOnError extends boolean = false>(options: Options<ComplexTypesData, ThrowOnError>) => (options.client ?? client).get<ComplexTypesResponses, ComplexTypesErrors, ThrowOnError>({\n    querySerializer: { parameters: { parameterObject: { object: { style: 'form' } } } },\n    url: '/api/v{api-version}/complex',\n    ...options\n});\n\nexport const multipartResponse = <ThrowOnError extends boolean = false>(options?: Options<MultipartResponseData, ThrowOnError>) => (options?.client ?? client).get<MultipartResponseResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/multipart', ...options });\n\nexport const multipartRequest = <ThrowOnError extends boolean = false>(options?: Options<MultipartRequestData, ThrowOnError>) => (options?.client ?? client).post<unknown, unknown, ThrowOnError>({\n    ...formDataBodySerializer,\n    url: '/api/v{api-version}/multipart',\n    ...options,\n    headers: {\n        'Content-Type': null,\n        ...options?.headers\n    }\n});\n\nexport const complexParams = <ThrowOnError extends boolean = false>(options: Options<ComplexParamsData, ThrowOnError>) => (options.client ?? client).put<ComplexParamsResponses, unknown, ThrowOnError>({\n    url: '/api/v{api-version}/complex/{id}',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json-patch+json',\n        ...options.headers\n    }\n});\n\nexport const callWithResultFromHeader = <ThrowOnError extends boolean = false>(options?: Options<CallWithResultFromHeaderData, ThrowOnError>) => (options?.client ?? client).post<CallWithResultFromHeaderResponses, CallWithResultFromHeaderErrors, ThrowOnError>({ url: '/api/v{api-version}/header', ...options });\n\nexport const testErrorCode = <ThrowOnError extends boolean = false>(options: Options<TestErrorCodeData, ThrowOnError>) => (options.client ?? client).post<TestErrorCodeResponses, TestErrorCodeErrors, ThrowOnError>({ url: '/api/v{api-version}/error', ...options });\n\nexport const nonAsciiæøåÆøÅöôêÊ字符串 = <ThrowOnError extends boolean = false>(options: Options<NonAsciiæøåÆøÅöôêÊ字符串Data, ThrowOnError>) => (options.client ?? client).post<NonAsciiæøåÆøÅöôêÊ字符串Responses, unknown, ThrowOnError>({ url: '/api/v{api-version}/non-ascii-æøåÆØÅöôêÊ字符串', ...options });\n\n/**\n * Login User\n */\nexport const putWithFormUrlEncoded = <ThrowOnError extends boolean = false>(options: Options<PutWithFormUrlEncodedData, ThrowOnError>) => (options.client ?? client).put<unknown, unknown, ThrowOnError>({\n    ...urlSearchParamsBodySerializer,\n    url: '/api/v{api-version}/non-ascii-æøåÆØÅöôêÊ字符串',\n    ...options,\n    headers: {\n        'Content-Type': 'application/x-www-form-urlencoded',\n        ...options.headers\n    }\n});\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-ky/default/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type ClientOptions = {\n    baseUrl: 'http://localhost:3000/base' | (string & {});\n};\n\n/**\n * Model with number-only name\n */\nexport type _400 = string;\n\n/**\n * External ref to shared model (A)\n */\nexport type ExternalRefA = ExternalSharedModel;\n\n/**\n * External ref to shared model (B)\n */\nexport type ExternalRefB = ExternalSharedModel;\n\n/**\n * Testing multiline comments in string: First line\n * Second line\n *\n * Fourth line\n */\nexport type CamelCaseCommentWithBreaks = number;\n\n/**\n * Testing multiline comments in string: First line\n * Second line\n *\n * Fourth line\n */\nexport type CommentWithBreaks = number;\n\n/**\n * Testing backticks in string: `backticks` and ```multiple backticks``` should work\n */\nexport type CommentWithBackticks = number;\n\n/**\n * Testing backticks and quotes in string: `backticks`, 'quotes', \"double quotes\" and ```multiple backticks``` should work\n */\nexport type CommentWithBackticksAndQuotes = number;\n\n/**\n * Testing slashes in string: \\backwards\\\\\\ and /forwards/// should work\n */\nexport type CommentWithSlashes = number;\n\n/**\n * Testing expression placeholders in string: ${expression} should work\n */\nexport type CommentWithExpressionPlaceholders = number;\n\n/**\n * Testing quotes in string: 'single quote''' and \"double quotes\"\"\" should work\n */\nexport type CommentWithQuotes = number;\n\n/**\n * Testing reserved characters in string: * inline * and ** inline ** should work\n */\nexport type CommentWithReservedCharacters = number;\n\n/**\n * This is a simple number\n */\nexport type SimpleInteger = number;\n\n/**\n * This is a simple boolean\n */\nexport type SimpleBoolean = boolean;\n\n/**\n * This is a simple string\n */\nexport type SimpleString = string;\n\n/**\n * A string with non-ascii (unicode) characters valid in typescript identifiers (æøåÆØÅöÔèÈ字符串)\n */\nexport type NonAsciiStringæøåÆøÅöôêÊ字符串 = string;\n\n/**\n * This is a simple file\n */\nexport type SimpleFile = Blob | File;\n\n/**\n * This is a simple reference\n */\nexport type SimpleReference = ModelWithString;\n\n/**\n * This is a simple string\n */\nexport type SimpleStringWithPattern = string | null;\n\n/**\n * This is a simple enum with strings\n */\nexport type EnumWithStrings = 'Success' | 'Warning' | 'Error' | '\\'Single Quote\\'' | '\"Double Quotes\"' | 'Non-ascii: øæåôöØÆÅÔÖ字符串';\n\nexport type EnumWithReplacedCharacters = '\\'Single Quote\\'' | '\"Double Quotes\"' | 'øæåôöØÆÅÔÖ字符串' | 3.1 | '';\n\n/**\n * This is a simple enum with numbers\n */\nexport type EnumWithNumbers = 1 | 2 | 3 | 1.1 | 1.2 | 1.3 | 100 | 200 | 300 | -100 | -200 | -300 | -1.1 | -1.2 | -1.3;\n\n/**\n * Success=1,Warning=2,Error=3\n */\nexport type EnumFromDescription = number;\n\n/**\n * This is a simple enum with numbers\n */\nexport type EnumWithExtensions = 200 | 400 | 500;\n\nexport type EnumWithXEnumNames = 0 | 1 | 2;\n\n/**\n * This is a simple array with numbers\n */\nexport type ArrayWithNumbers = Array<number>;\n\n/**\n * This is a simple array with booleans\n */\nexport type ArrayWithBooleans = Array<boolean>;\n\n/**\n * This is a simple array with strings\n */\nexport type ArrayWithStrings = Array<string>;\n\n/**\n * This is a simple array with references\n */\nexport type ArrayWithReferences = Array<ModelWithString>;\n\n/**\n * This is a simple array containing an array\n */\nexport type ArrayWithArray = Array<Array<ModelWithString>>;\n\n/**\n * This is a simple array with properties\n */\nexport type ArrayWithProperties = Array<{\n    '16x16'?: CamelCaseCommentWithBreaks;\n    bar?: string;\n}>;\n\n/**\n * This is a simple array with any of properties\n */\nexport type ArrayWithAnyOfProperties = Array<{\n    foo?: string;\n} | {\n    bar?: string;\n}>;\n\nexport type AnyOfAnyAndNull = {\n    data?: unknown | null;\n};\n\n/**\n * This is a simple array with any of properties\n */\nexport type AnyOfArrays = {\n    results?: Array<{\n        foo?: string;\n    } | {\n        bar?: string;\n    }>;\n};\n\n/**\n * This is a string dictionary\n */\nexport type DictionaryWithString = {\n    [key: string]: string;\n};\n\nexport type DictionaryWithPropertiesAndAdditionalProperties = {\n    foo?: number;\n    bar?: boolean;\n    [key: string]: string | number | boolean | undefined;\n};\n\n/**\n * This is a string reference\n */\nexport type DictionaryWithReference = {\n    [key: string]: ModelWithString;\n};\n\n/**\n * This is a complex dictionary\n */\nexport type DictionaryWithArray = {\n    [key: string]: Array<ModelWithString>;\n};\n\n/**\n * This is a string dictionary\n */\nexport type DictionaryWithDictionary = {\n    [key: string]: {\n        [key: string]: string;\n    };\n};\n\n/**\n * This is a complex dictionary\n */\nexport type DictionaryWithProperties = {\n    [key: string]: {\n        foo?: string;\n        bar?: string;\n    };\n};\n\n/**\n * This is a model with one number property\n */\nexport type ModelWithInteger = {\n    /**\n     * This is a simple number property\n     */\n    prop?: number;\n};\n\n/**\n * This is a model with one boolean property\n */\nexport type ModelWithBoolean = {\n    /**\n     * This is a simple boolean property\n     */\n    prop?: boolean;\n};\n\n/**\n * This is a model with one string property\n */\nexport type ModelWithString = {\n    /**\n     * This is a simple string property\n     */\n    prop?: string;\n};\n\n/**\n * This is a model with one string property\n */\nexport type ModelWithStringError = {\n    /**\n     * This is a simple string property\n     */\n    prop?: string;\n};\n\n/**\n * `Comment` or `VoiceComment`. The JSON object for adding voice comments to tickets is different. See [Adding voice comments to tickets](/documentation/ticketing/managing-tickets/adding-voice-comments-to-tickets)\n */\nexport type ModelFromZendesk = string;\n\n/**\n * This is a model with one string property\n */\nexport type ModelWithNullableString = {\n    /**\n     * This is a simple string property\n     */\n    nullableProp1?: string | null;\n    /**\n     * This is a simple string property\n     */\n    nullableRequiredProp1: string | null;\n    /**\n     * This is a simple string property\n     */\n    nullableProp2?: string | null;\n    /**\n     * This is a simple string property\n     */\n    nullableRequiredProp2: string | null;\n    /**\n     * This is a simple enum with strings\n     */\n    'foo_bar-enum'?: 'Success' | 'Warning' | 'Error' | 'ØÆÅ字符串';\n};\n\n/**\n * This is a model with one enum\n */\nexport type ModelWithEnum = {\n    /**\n     * This is a simple enum with strings\n     */\n    'foo_bar-enum'?: 'Success' | 'Warning' | 'Error' | 'ØÆÅ字符串';\n    /**\n     * These are the HTTP error code enums\n     */\n    statusCode?: '100' | '200 FOO' | '300 FOO_BAR' | '400 foo-bar' | '500 foo.bar' | '600 foo&bar';\n    /**\n     * Simple boolean enum\n     */\n    bool?: true;\n};\n\n/**\n * This is a model with one enum with escaped name\n */\nexport type ModelWithEnumWithHyphen = {\n    /**\n     * Foo-Bar-Baz-Qux\n     */\n    'foo-bar-baz-qux'?: '3.0';\n};\n\n/**\n * This is a model with one enum\n */\nexport type ModelWithEnumFromDescription = {\n    /**\n     * Success=1,Warning=2,Error=3\n     */\n    test?: number;\n};\n\n/**\n * This is a model with nested enums\n */\nexport type ModelWithNestedEnums = {\n    dictionaryWithEnum?: {\n        [key: string]: 'Success' | 'Warning' | 'Error';\n    };\n    dictionaryWithEnumFromDescription?: {\n        [key: string]: number;\n    };\n    arrayWithEnum?: Array<'Success' | 'Warning' | 'Error'>;\n    arrayWithDescription?: Array<number>;\n    /**\n     * This is a simple enum with strings\n     */\n    'foo_bar-enum'?: 'Success' | 'Warning' | 'Error' | 'ØÆÅ字符串';\n};\n\n/**\n * This is a model with one property containing a reference\n */\nexport type ModelWithReference = {\n    prop?: ModelWithProperties;\n};\n\n/**\n * This is a model with one property containing an array\n */\nexport type ModelWithArrayReadOnlyAndWriteOnly = {\n    prop?: Array<ModelWithReadOnlyAndWriteOnly>;\n    propWithFile?: Array<Blob | File>;\n    propWithNumber?: Array<number>;\n};\n\n/**\n * This is a model with one property containing an array\n */\nexport type ModelWithArray = {\n    prop?: Array<ModelWithString>;\n    propWithFile?: Array<Blob | File>;\n    propWithNumber?: Array<number>;\n};\n\n/**\n * This is a model with one property containing a dictionary\n */\nexport type ModelWithDictionary = {\n    prop?: {\n        [key: string]: string;\n    };\n};\n\n/**\n * This is a deprecated model with a deprecated property\n *\n * @deprecated\n */\nexport type DeprecatedModel = {\n    /**\n     * This is a deprecated property\n     *\n     * @deprecated\n     */\n    prop?: string;\n};\n\n/**\n * This is a model with one property containing a circular reference\n */\nexport type ModelWithCircularReference = {\n    prop?: ModelWithCircularReference;\n};\n\n/**\n * This is a model with one property with a 'one of' relationship\n */\nexport type CompositionWithOneOf = {\n    propA?: ModelWithString | ModelWithEnum | ModelWithArray | ModelWithDictionary;\n};\n\n/**\n * This is a model with one property with a 'one of' relationship where the options are not $ref\n */\nexport type CompositionWithOneOfAnonymous = {\n    propA?: {\n        propA?: string;\n    } | string | number;\n};\n\n/**\n * Circle\n */\nexport type ModelCircle = {\n    kind: string;\n    radius?: number;\n};\n\n/**\n * Square\n */\nexport type ModelSquare = {\n    kind: string;\n    sideLength?: number;\n};\n\n/**\n * This is a model with one property with a 'one of' relationship where the options are not $ref\n */\nexport type CompositionWithOneOfDiscriminator = ({\n    kind: 'circle';\n} & ModelCircle) | ({\n    kind: 'square';\n} & ModelSquare);\n\n/**\n * This is a model with one property with a 'any of' relationship\n */\nexport type CompositionWithAnyOf = {\n    propA?: ModelWithString | ModelWithEnum | ModelWithArray | ModelWithDictionary;\n};\n\n/**\n * This is a model with one property with a 'any of' relationship where the options are not $ref\n */\nexport type CompositionWithAnyOfAnonymous = {\n    propA?: {\n        propA?: string;\n    } | string | number;\n};\n\n/**\n * This is a model with nested 'any of' property with a type null\n */\nexport type CompositionWithNestedAnyAndTypeNull = {\n    propA?: Array<ModelWithDictionary | null> | Array<ModelWithArray | null>;\n};\n\nexport type _3eNum1Период = 'Bird' | 'Dog';\n\nexport type ConstValue = 'ConstValue';\n\n/**\n * This is a model with one property with a 'any of' relationship where the options are not $ref\n */\nexport type CompositionWithNestedAnyOfAndNull = {\n    /**\n     * Scopes\n     */\n    propA?: Array<_3eNum1Период | ConstValue> | null;\n};\n\n/**\n * This is a model with one property with a 'one of' relationship\n */\nexport type CompositionWithOneOfAndNullable = {\n    propA?: {\n        boolean?: boolean;\n    } | ModelWithEnum | ModelWithArray | ModelWithDictionary | null;\n};\n\n/**\n * This is a model that contains a simple dictionary within composition\n */\nexport type CompositionWithOneOfAndSimpleDictionary = {\n    propA?: boolean | {\n        [key: string]: number;\n    };\n};\n\n/**\n * This is a model that contains a dictionary of simple arrays within composition\n */\nexport type CompositionWithOneOfAndSimpleArrayDictionary = {\n    propA?: boolean | {\n        [key: string]: Array<boolean>;\n    };\n};\n\n/**\n * This is a model that contains a dictionary of complex arrays (composited) within composition\n */\nexport type CompositionWithOneOfAndComplexArrayDictionary = {\n    propA?: boolean | {\n        [key: string]: Array<number | string>;\n    };\n};\n\n/**\n * This is a model with one property with a 'all of' relationship\n */\nexport type CompositionWithAllOfAndNullable = {\n    propA?: ({\n        boolean?: boolean;\n    } & ModelWithEnum & ModelWithArray & ModelWithDictionary) | null;\n};\n\n/**\n * This is a model with one property with a 'any of' relationship\n */\nexport type CompositionWithAnyOfAndNullable = {\n    propA?: {\n        boolean?: boolean;\n    } | ModelWithEnum | ModelWithArray | ModelWithDictionary | null;\n};\n\n/**\n * This is a base model with two simple optional properties\n */\nexport type CompositionBaseModel = {\n    firstName?: string;\n    lastname?: string;\n};\n\n/**\n * This is a model that extends the base model\n */\nexport type CompositionExtendedModel = CompositionBaseModel & {\n    age: number;\n    firstName: string;\n    lastname: string;\n};\n\n/**\n * This is a model with one nested property\n */\nexport type ModelWithProperties = {\n    required: string;\n    readonly requiredAndReadOnly: string;\n    requiredAndNullable: string | null;\n    string?: string;\n    number?: number;\n    boolean?: boolean;\n    reference?: ModelWithString;\n    'property with space'?: string;\n    default?: string;\n    try?: string;\n    readonly '@namespace.string'?: string;\n    readonly '@namespace.integer'?: number;\n};\n\n/**\n * This is a model with one nested property\n */\nexport type ModelWithNestedProperties = {\n    readonly first: {\n        readonly second: {\n            readonly third: string | null;\n        } | null;\n    } | null;\n};\n\n/**\n * This is a model with duplicated properties\n */\nexport type ModelWithDuplicateProperties = {\n    prop?: ModelWithString;\n};\n\n/**\n * This is a model with ordered properties\n */\nexport type ModelWithOrderedProperties = {\n    zebra?: string;\n    apple?: string;\n    hawaii?: string;\n};\n\n/**\n * This is a model with duplicated imports\n */\nexport type ModelWithDuplicateImports = {\n    propA?: ModelWithString;\n    propB?: ModelWithString;\n    propC?: ModelWithString;\n};\n\n/**\n * This is a model that extends another model\n */\nexport type ModelThatExtends = ModelWithString & {\n    propExtendsA?: string;\n    propExtendsB?: ModelWithString;\n};\n\n/**\n * This is a model that extends another model\n */\nexport type ModelThatExtendsExtends = ModelWithString & ModelThatExtends & {\n    propExtendsC?: string;\n    propExtendsD?: ModelWithString;\n};\n\n/**\n * This is a model that contains a some patterns\n */\nexport type ModelWithPattern = {\n    key: string;\n    name: string;\n    readonly enabled?: boolean;\n    readonly modified?: string;\n    id?: string;\n    text?: string;\n    patternWithSingleQuotes?: string;\n    patternWithNewline?: string;\n    patternWithBacktick?: string;\n    patternWithUnicode?: string;\n};\n\nexport type File = {\n    /**\n     * Id\n     */\n    readonly id?: string;\n    /**\n     * Updated at\n     */\n    readonly updated_at?: string;\n    /**\n     * Created at\n     */\n    readonly created_at?: string;\n    /**\n     * Mime\n     */\n    mime: string;\n    /**\n     * File\n     */\n    readonly file?: string;\n};\n\nexport type Default = {\n    name?: string;\n};\n\nexport type Pageable = {\n    page?: number;\n    size?: number;\n    sort?: Array<string>;\n};\n\n/**\n * This is a free-form object without additionalProperties.\n */\nexport type FreeFormObjectWithoutAdditionalProperties = {\n    [key: string]: unknown;\n};\n\n/**\n * This is a free-form object with additionalProperties: true.\n */\nexport type FreeFormObjectWithAdditionalPropertiesEqTrue = {\n    [key: string]: unknown;\n};\n\n/**\n * This is a free-form object with additionalProperties: {}.\n */\nexport type FreeFormObjectWithAdditionalPropertiesEqEmptyObject = {\n    [key: string]: unknown;\n};\n\nexport type ModelWithConst = {\n    String?: 'String';\n    number?: 0;\n    null?: null;\n    withType?: 'Some string';\n};\n\n/**\n * This is a model with one property and additionalProperties: true\n */\nexport type ModelWithAdditionalPropertiesEqTrue = {\n    /**\n     * This is a simple string property\n     */\n    prop?: string;\n    [key: string]: unknown;\n};\n\nexport type NestedAnyOfArraysNullable = {\n    nullableArray?: Array<string | boolean> | null;\n};\n\nexport type CompositionWithOneOfAndProperties = ({\n    foo: SimpleParameter;\n} | {\n    bar: NonAsciiStringæøåÆøÅöôêÊ字符串;\n}) & {\n    baz: number | null;\n    qux: number;\n};\n\n/**\n * An object that can be null\n */\nexport type NullableObject = {\n    foo?: string;\n} | null;\n\n/**\n * Some % character\n */\nexport type CharactersInDescription = string;\n\nexport type ModelWithNullableObject = {\n    data?: NullableObject;\n};\n\n/**\n * An object with additional properties that can be null (anyOf ref + null)\n */\nexport type ModelWithAdditionalPropertiesRef = {\n    [key: string]: NullableObject | null;\n};\n\nexport type ModelWithOneOfEnum = {\n    foo: 'Bar';\n} | {\n    foo: 'Baz';\n} | {\n    foo: 'Qux';\n} | {\n    content: string;\n    foo: 'Quux';\n} | {\n    content: [\n        string,\n        string\n    ];\n    foo: 'Corge';\n};\n\nexport type ModelWithNestedArrayEnumsDataFoo = 'foo' | 'bar';\n\nexport type ModelWithNestedArrayEnumsDataBar = 'baz' | 'qux';\n\nexport type ModelWithNestedArrayEnumsData = {\n    foo?: Array<ModelWithNestedArrayEnumsDataFoo>;\n    bar?: Array<ModelWithNestedArrayEnumsDataBar>;\n};\n\nexport type ModelWithNestedArrayEnums = {\n    array_strings?: Array<string>;\n    data?: ModelWithNestedArrayEnumsData;\n};\n\nexport type ModelWithNestedCompositionEnums = {\n    foo?: ModelWithNestedArrayEnumsDataFoo;\n};\n\nexport type ModelWithReadOnlyAndWriteOnly = {\n    foo: string;\n    readonly bar: string;\n};\n\nexport type ModelWithConstantSizeArray = [\n    number,\n    number\n];\n\nexport type ModelWithAnyOfConstantSizeArray = [\n    number | string,\n    number | string,\n    number | string\n];\n\nexport type ModelWithPrefixItemsConstantSizeArray = [\n    ModelWithInteger,\n    number | string,\n    string\n];\n\nexport type ModelWithAnyOfConstantSizeArrayNullable = [\n    number | null | string,\n    number | null | string,\n    number | null | string\n];\n\nexport type ModelWithAnyOfConstantSizeArrayWithNSizeAndOptions = [\n    number | Import,\n    number | Import\n];\n\nexport type ModelWithAnyOfConstantSizeArrayAndIntersect = [\n    number & string,\n    number & string\n];\n\nexport type ModelWithNumericEnumUnion = {\n    /**\n     * Период\n     */\n    value?: -10 | -1 | 0 | 1 | 3 | 6 | 12;\n};\n\n/**\n * Some description with `back ticks`\n */\nexport type ModelWithBackticksInDescription = {\n    /**\n     * The template `that` should be used for parsing and importing the contents of the CSV file.\n     *\n     * <br/><p>There is one placeholder currently supported:<ul>     <li><b>${x}</b> - refers to the n-th column in the CSV file, e.g. ${1}, ${2}, ...)</li></ul><p>Example of a correct JSON template:</p>\n     * <pre>\n     * [\n     * {\n     * \"resourceType\": \"Asset\",\n     * \"identifier\": {\n     * \"name\": \"${1}\",\n     * \"domain\": {\n     * \"name\": \"${2}\",\n     * \"community\": {\n     * \"name\": \"Some Community\"\n     * }\n     * }\n     * },\n     * \"attributes\" : {\n     * \"00000000-0000-0000-0000-000000003115\" : [ {\n     * \"value\" : \"${3}\"\n     * } ],\n     * \"00000000-0000-0000-0000-000000000222\" : [ {\n     * \"value\" : \"${4}\"\n     * } ]\n     * }\n     * }\n     * ]\n     * </pre>\n     */\n    template?: string;\n};\n\nexport type ModelWithOneOfAndProperties = (SimpleParameter | NonAsciiStringæøåÆøÅöôêÊ字符串) & {\n    baz: number | null;\n    qux: number;\n};\n\n/**\n * Model used to test deduplication strategy (unused)\n */\nexport type ParameterSimpleParameterUnused = string;\n\n/**\n * Model used to test deduplication strategy\n */\nexport type PostServiceWithEmptyTagResponse = string;\n\n/**\n * Model used to test deduplication strategy\n */\nexport type PostServiceWithEmptyTagResponse2 = string;\n\n/**\n * Model used to test deduplication strategy\n */\nexport type DeleteFooData = string;\n\n/**\n * Model used to test deduplication strategy\n */\nexport type DeleteFooData2 = string;\n\n/**\n * Model with restricted keyword name\n */\nexport type Import = string;\n\nexport type SchemaWithFormRestrictedKeys = {\n    description?: string;\n    'x-enum-descriptions'?: string;\n    'x-enum-varnames'?: string;\n    'x-enumNames'?: string;\n    title?: string;\n    object?: {\n        description?: string;\n        'x-enum-descriptions'?: string;\n        'x-enum-varnames'?: string;\n        'x-enumNames'?: string;\n        title?: string;\n    };\n    array?: Array<{\n        description?: string;\n        'x-enum-descriptions'?: string;\n        'x-enum-varnames'?: string;\n        'x-enumNames'?: string;\n        title?: string;\n    }>;\n};\n\n/**\n * This schema was giving PascalCase transformations a hard time\n */\nexport type IoK8sApimachineryPkgApisMetaV1DeleteOptions = {\n    /**\n     * Must be fulfilled before a deletion is carried out. If not possible, a 409 Conflict status will be returned.\n     */\n    preconditions?: IoK8sApimachineryPkgApisMetaV1Preconditions;\n};\n\n/**\n * This schema was giving PascalCase transformations a hard time\n */\nexport type IoK8sApimachineryPkgApisMetaV1Preconditions = {\n    /**\n     * Specifies the target ResourceVersion\n     */\n    resourceVersion?: string;\n    /**\n     * Specifies the target UID.\n     */\n    uid?: string;\n};\n\nexport type AdditionalPropertiesUnknownIssue = {\n    [key: string]: string | number;\n};\n\nexport type AdditionalPropertiesUnknownIssue2 = {\n    [key: string]: string | number;\n};\n\nexport type AdditionalPropertiesUnknownIssue3 = string & {\n    entries: {\n        [key: string]: AdditionalPropertiesUnknownIssue;\n    };\n};\n\nexport type AdditionalPropertiesIntegerIssue = {\n    value: number;\n    [key: string]: number;\n};\n\nexport type OneOfAllOfIssue = ((ConstValue | GenericSchemaDuplicateIssue1SystemBoolean) & _3eNum1Период) | GenericSchemaDuplicateIssue1SystemString;\n\nexport type GenericSchemaDuplicateIssue1SystemBoolean = {\n    item?: boolean;\n    error?: string | null;\n    readonly hasError?: boolean;\n    data?: {\n        [key: string]: never;\n    };\n};\n\nexport type GenericSchemaDuplicateIssue1SystemString = {\n    item?: string | null;\n    error?: string | null;\n    readonly hasError?: boolean;\n};\n\nexport type ExternalSharedModel = {\n    id: string;\n    name?: string;\n};\n\n/**\n * This is a model with one property containing a reference\n */\nexport type ModelWithReferenceWritable = {\n    prop?: ModelWithPropertiesWritable;\n};\n\n/**\n * This is a model with one property containing an array\n */\nexport type ModelWithArrayReadOnlyAndWriteOnlyWritable = {\n    prop?: Array<ModelWithReadOnlyAndWriteOnlyWritable>;\n    propWithFile?: Array<Blob | File>;\n    propWithNumber?: Array<number>;\n};\n\n/**\n * This is a model with one nested property\n */\nexport type ModelWithPropertiesWritable = {\n    required: string;\n    requiredAndNullable: string | null;\n    string?: string;\n    number?: number;\n    boolean?: boolean;\n    reference?: ModelWithString;\n    'property with space'?: string;\n    default?: string;\n    try?: string;\n};\n\n/**\n * This is a model that contains a some patterns\n */\nexport type ModelWithPatternWritable = {\n    key: string;\n    name: string;\n    id?: string;\n    text?: string;\n    patternWithSingleQuotes?: string;\n    patternWithNewline?: string;\n    patternWithBacktick?: string;\n    patternWithUnicode?: string;\n};\n\nexport type FileWritable = {\n    /**\n     * Mime\n     */\n    mime: string;\n};\n\nexport type ModelWithReadOnlyAndWriteOnlyWritable = {\n    foo: string;\n    baz: string;\n};\n\nexport type ModelWithAnyOfConstantSizeArrayWithNSizeAndOptionsWritable = [\n    number | Import,\n    number | Import\n];\n\nexport type AdditionalPropertiesUnknownIssueWritable = {\n    [key: string]: string | number;\n};\n\nexport type OneOfAllOfIssueWritable = ((ConstValue | GenericSchemaDuplicateIssue1SystemBoolean) & _3eNum1Период) | GenericSchemaDuplicateIssue1SystemString;\n\nexport type GenericSchemaDuplicateIssue1SystemBooleanWritable = {\n    item?: boolean;\n    error?: string | null;\n    data?: {\n        [key: string]: never;\n    };\n};\n\nexport type GenericSchemaDuplicateIssue1SystemStringWritable = {\n    item?: string | null;\n    error?: string | null;\n};\n\n/**\n * This is a reusable parameter\n */\nexport type SimpleParameter = string;\n\n/**\n * Parameter with illegal characters\n */\nexport type XFooBar = ModelWithString;\n\n/**\n * A reusable request body\n */\nexport type SimpleRequestBody = ModelWithString;\n\n/**\n * A reusable request body\n */\nexport type SimpleFormData = ModelWithString;\n\nexport type ExportData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no+tag';\n};\n\nexport type PatchApiVbyApiVersionNoTagData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no+tag';\n};\n\nexport type PatchApiVbyApiVersionNoTagResponses = {\n    /**\n     * OK\n     */\n    default: unknown;\n};\n\nexport type ImportData = {\n    body: ModelWithReadOnlyAndWriteOnlyWritable | ModelWithArrayReadOnlyAndWriteOnlyWritable;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no+tag';\n};\n\nexport type ImportResponses = {\n    /**\n     * Success\n     */\n    200: ModelFromZendesk;\n    /**\n     * Default success response\n     */\n    default: ModelWithReadOnlyAndWriteOnly;\n};\n\nexport type ImportResponse = ImportResponses[keyof ImportResponses];\n\nexport type FooWowData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no+tag';\n};\n\nexport type FooWowResponses = {\n    /**\n     * OK\n     */\n    default: unknown;\n};\n\nexport type ApiVVersionODataControllerCountData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple/$count';\n};\n\nexport type ApiVVersionODataControllerCountResponses = {\n    /**\n     * Success\n     */\n    200: ModelFromZendesk;\n};\n\nexport type ApiVVersionODataControllerCountResponse = ApiVVersionODataControllerCountResponses[keyof ApiVVersionODataControllerCountResponses];\n\nexport type GetApiVbyApiVersionSimpleOperationData = {\n    body?: never;\n    path: {\n        /**\n         * foo in method\n         */\n        foo_param: string;\n    };\n    query?: never;\n    url: '/api/v{api-version}/simple:operation';\n};\n\nexport type GetApiVbyApiVersionSimpleOperationErrors = {\n    /**\n     * Default error response\n     */\n    default: ModelWithBoolean;\n};\n\nexport type GetApiVbyApiVersionSimpleOperationError = GetApiVbyApiVersionSimpleOperationErrors[keyof GetApiVbyApiVersionSimpleOperationErrors];\n\nexport type GetApiVbyApiVersionSimpleOperationResponses = {\n    /**\n     * Response is a simple number\n     */\n    200: number;\n};\n\nexport type GetApiVbyApiVersionSimpleOperationResponse = GetApiVbyApiVersionSimpleOperationResponses[keyof GetApiVbyApiVersionSimpleOperationResponses];\n\nexport type DeleteCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type GetCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type HeadCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type OptionsCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type PatchCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type PostCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type PutCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type DeleteFooData3 = {\n    body?: never;\n    headers: {\n        /**\n         * Parameter with illegal characters\n         */\n        'x-Foo-Bar': ModelWithString;\n    };\n    path: {\n        /**\n         * foo in method\n         */\n        foo_param: string;\n        /**\n         * bar in method\n         */\n        BarParam: string;\n    };\n    query?: never;\n    url: '/api/v{api-version}/foo/{foo_param}/bar/{BarParam}';\n};\n\nexport type CallWithDescriptionsData = {\n    body?: never;\n    path?: never;\n    query?: {\n        /**\n         * Testing multiline comments in string: First line\n         * Second line\n         *\n         * Fourth line\n         */\n        parameterWithBreaks?: string;\n        /**\n         * Testing backticks in string: `backticks` and ```multiple backticks``` should work\n         */\n        parameterWithBackticks?: string;\n        /**\n         * Testing slashes in string: \\backwards\\\\\\ and /forwards/// should work\n         */\n        parameterWithSlashes?: string;\n        /**\n         * Testing expression placeholders in string: ${expression} should work\n         */\n        parameterWithExpressionPlaceholders?: string;\n        /**\n         * Testing quotes in string: 'single quote''' and \"double quotes\"\"\" should work\n         */\n        parameterWithQuotes?: string;\n        /**\n         * Testing reserved characters in string: * inline * and ** inline ** should work\n         */\n        parameterWithReservedCharacters?: string;\n    };\n    url: '/api/v{api-version}/descriptions';\n};\n\nexport type DeprecatedCallData = {\n    body?: never;\n    headers: {\n        /**\n         * This parameter is deprecated\n         *\n         * @deprecated\n         */\n        parameter: DeprecatedModel | null;\n    };\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/parameters/deprecated';\n};\n\nexport type CallWithParametersData = {\n    /**\n     * This is the parameter that goes into the body\n     */\n    body: {\n        [key: string]: unknown;\n    } | null;\n    headers: {\n        /**\n         * This is the parameter that goes into the header\n         */\n        parameterHeader: string | null;\n    };\n    path: {\n        /**\n         * This is the parameter that goes into the path\n         */\n        parameterPath: string | null;\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string | null;\n    };\n    query: {\n        foo_ref_enum?: ModelWithNestedArrayEnumsDataFoo;\n        foo_all_of_enum: ModelWithNestedArrayEnumsDataFoo;\n        /**\n         * This is the parameter that goes into the query params\n         */\n        cursor: string | null;\n    };\n    url: '/api/v{api-version}/parameters/{parameterPath}';\n};\n\nexport type CallWithWeirdParameterNamesData = {\n    /**\n     * This is the parameter that goes into the body\n     */\n    body: ModelWithString | null;\n    headers: {\n        /**\n         * This is the parameter that goes into the request header\n         */\n        'parameter.header': string | null;\n    };\n    path: {\n        /**\n         * This is the parameter that goes into the path\n         */\n        'parameter.path.1'?: string;\n        /**\n         * This is the parameter that goes into the path\n         */\n        'parameter-path-2'?: string;\n        /**\n         * This is the parameter that goes into the path\n         */\n        'PARAMETER-PATH-3'?: string;\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string | null;\n    };\n    query: {\n        /**\n         * This is the parameter with a reserved keyword\n         */\n        default?: string;\n        /**\n         * This is the parameter that goes into the request query params\n         */\n        'parameter-query': string | null;\n    };\n    url: '/api/v{api-version}/parameters/{parameter.path.1}/{parameter-path-2}/{PARAMETER-PATH-3}';\n};\n\nexport type GetCallWithOptionalParamData = {\n    /**\n     * This is a required parameter\n     */\n    body: ModelWithOneOfEnum;\n    path?: never;\n    query?: {\n        /**\n         * This is an optional parameter\n         */\n        page?: number;\n    };\n    url: '/api/v{api-version}/parameters';\n};\n\nexport type PostCallWithOptionalParamData = {\n    /**\n     * This is an optional parameter\n     */\n    body?: {\n        offset?: number | null;\n    };\n    path?: never;\n    query: {\n        /**\n         * This is a required parameter\n         */\n        parameter: Pageable;\n    };\n    url: '/api/v{api-version}/parameters';\n};\n\nexport type PostCallWithOptionalParamResponses = {\n    /**\n     * Response is a simple number\n     */\n    200: number;\n    /**\n     * Success\n     */\n    204: void;\n};\n\nexport type PostCallWithOptionalParamResponse = PostCallWithOptionalParamResponses[keyof PostCallWithOptionalParamResponses];\n\nexport type PostApiVbyApiVersionRequestBodyData = {\n    /**\n     * A reusable request body\n     */\n    body?: SimpleRequestBody;\n    path?: never;\n    query?: {\n        /**\n         * This is a reusable parameter\n         */\n        parameter?: string;\n    };\n    url: '/api/v{api-version}/requestBody';\n};\n\nexport type PostApiVbyApiVersionFormDataData = {\n    /**\n     * A reusable request body\n     */\n    body?: SimpleFormData;\n    path?: never;\n    query?: {\n        /**\n         * This is a reusable parameter\n         */\n        parameter?: string;\n    };\n    url: '/api/v{api-version}/formData';\n};\n\nexport type CallWithDefaultParametersData = {\n    body?: never;\n    path?: never;\n    query?: {\n        /**\n         * This is a simple string with default value\n         */\n        parameterString?: string | null;\n        /**\n         * This is a simple number with default value\n         */\n        parameterNumber?: number | null;\n        /**\n         * This is a simple boolean with default value\n         */\n        parameterBoolean?: boolean | null;\n        /**\n         * This is a simple enum with default value\n         */\n        parameterEnum?: 'Success' | 'Warning' | 'Error';\n        /**\n         * This is a simple model with default value\n         */\n        parameterModel?: ModelWithString | null;\n    };\n    url: '/api/v{api-version}/defaults';\n};\n\nexport type CallWithDefaultOptionalParametersData = {\n    body?: never;\n    path?: never;\n    query?: {\n        /**\n         * This is a simple string that is optional with default value\n         */\n        parameterString?: string;\n        /**\n         * This is a simple number that is optional with default value\n         */\n        parameterNumber?: number;\n        /**\n         * This is a simple boolean that is optional with default value\n         */\n        parameterBoolean?: boolean;\n        /**\n         * This is a simple enum that is optional with default value\n         */\n        parameterEnum?: 'Success' | 'Warning' | 'Error';\n        /**\n         * This is a simple model that is optional with default value\n         */\n        parameterModel?: ModelWithString;\n    };\n    url: '/api/v{api-version}/defaults';\n};\n\nexport type CallToTestOrderOfParamsData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * This is a optional string with default\n         */\n        parameterOptionalStringWithDefault?: string;\n        /**\n         * This is a optional string with empty default\n         */\n        parameterOptionalStringWithEmptyDefault?: string;\n        /**\n         * This is a optional string with no default\n         */\n        parameterOptionalStringWithNoDefault?: string;\n        /**\n         * This is a string with default\n         */\n        parameterStringWithDefault: string;\n        /**\n         * This is a string with empty default\n         */\n        parameterStringWithEmptyDefault: string;\n        /**\n         * This is a string with no default\n         */\n        parameterStringWithNoDefault: string;\n        /**\n         * This is a string that can be null with no default\n         */\n        parameterStringNullableWithNoDefault?: string | null;\n        /**\n         * This is a string that can be null with default\n         */\n        parameterStringNullableWithDefault?: string | null;\n    };\n    url: '/api/v{api-version}/defaults';\n};\n\nexport type DuplicateNameData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/duplicate';\n};\n\nexport type DuplicateName2Data = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/duplicate';\n};\n\nexport type DuplicateName3Data = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/duplicate';\n};\n\nexport type DuplicateName4Data = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/duplicate';\n};\n\nexport type CallWithNoContentResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no-content';\n};\n\nexport type CallWithNoContentResponseResponses = {\n    /**\n     * Success\n     */\n    204: void;\n};\n\nexport type CallWithNoContentResponseResponse = CallWithNoContentResponseResponses[keyof CallWithNoContentResponseResponses];\n\nexport type CallWithResponseAndNoContentResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multiple-tags/response-and-no-content';\n};\n\nexport type CallWithResponseAndNoContentResponseResponses = {\n    /**\n     * Response is a simple number\n     */\n    200: number;\n    /**\n     * Success\n     */\n    204: void;\n};\n\nexport type CallWithResponseAndNoContentResponseResponse = CallWithResponseAndNoContentResponseResponses[keyof CallWithResponseAndNoContentResponseResponses];\n\nexport type DummyAData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multiple-tags/a';\n};\n\nexport type DummyAResponses = {\n    200: _400;\n};\n\nexport type DummyAResponse = DummyAResponses[keyof DummyAResponses];\n\nexport type DummyBData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multiple-tags/b';\n};\n\nexport type DummyBResponses = {\n    /**\n     * Success\n     */\n    204: void;\n};\n\nexport type DummyBResponse = DummyBResponses[keyof DummyBResponses];\n\nexport type CallWithResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/response';\n};\n\nexport type CallWithResponseResponses = {\n    default: Import;\n};\n\nexport type CallWithResponseResponse = CallWithResponseResponses[keyof CallWithResponseResponses];\n\nexport type CallWithDuplicateResponsesData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/response';\n};\n\nexport type CallWithDuplicateResponsesErrors = {\n    /**\n     * Message for 500 error\n     */\n    500: ModelWithStringError;\n    /**\n     * Message for 501 error\n     */\n    501: ModelWithStringError;\n    /**\n     * Message for 502 error\n     */\n    502: ModelWithStringError;\n    /**\n     * Message for 4XX errors\n     */\n    '4XX': DictionaryWithArray;\n    /**\n     * Default error response\n     */\n    default: ModelWithBoolean;\n};\n\nexport type CallWithDuplicateResponsesError = CallWithDuplicateResponsesErrors[keyof CallWithDuplicateResponsesErrors];\n\nexport type CallWithDuplicateResponsesResponses = {\n    /**\n     * Message for 200 response\n     */\n    200: ModelWithBoolean & ModelWithInteger;\n    /**\n     * Message for 201 response\n     */\n    201: ModelWithString;\n    /**\n     * Message for 202 response\n     */\n    202: ModelWithString;\n};\n\nexport type CallWithDuplicateResponsesResponse = CallWithDuplicateResponsesResponses[keyof CallWithDuplicateResponsesResponses];\n\nexport type CallWithResponsesData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/response';\n};\n\nexport type CallWithResponsesErrors = {\n    /**\n     * Message for 500 error\n     */\n    500: ModelWithStringError;\n    /**\n     * Message for 501 error\n     */\n    501: ModelWithStringError;\n    /**\n     * Message for 502 error\n     */\n    502: ModelWithStringError;\n    /**\n     * Message for default response\n     */\n    default: ModelWithStringError;\n};\n\nexport type CallWithResponsesError = CallWithResponsesErrors[keyof CallWithResponsesErrors];\n\nexport type CallWithResponsesResponses = {\n    /**\n     * Message for 200 response\n     */\n    200: {\n        readonly '@namespace.string'?: string;\n        readonly '@namespace.integer'?: number;\n        readonly value?: Array<ModelWithString>;\n    };\n    /**\n     * Message for 201 response\n     */\n    201: ModelThatExtends;\n    /**\n     * Message for 202 response\n     */\n    202: ModelThatExtendsExtends;\n};\n\nexport type CallWithResponsesResponse = CallWithResponsesResponses[keyof CallWithResponsesResponses];\n\nexport type CollectionFormatData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * This is an array parameter that is sent as csv format (comma-separated values)\n         */\n        parameterArrayCSV: Array<string> | null;\n        /**\n         * This is an array parameter that is sent as ssv format (space-separated values)\n         */\n        parameterArraySSV: Array<string> | null;\n        /**\n         * This is an array parameter that is sent as tsv format (tab-separated values)\n         */\n        parameterArrayTSV: Array<string> | null;\n        /**\n         * This is an array parameter that is sent as pipes format (pipe-separated values)\n         */\n        parameterArrayPipes: Array<string> | null;\n        /**\n         * This is an array parameter that is sent as multi format (multiple parameter instances)\n         */\n        parameterArrayMulti: Array<string> | null;\n    };\n    url: '/api/v{api-version}/collectionFormat';\n};\n\nexport type TypesData = {\n    body?: never;\n    path?: {\n        /**\n         * This is a number parameter\n         */\n        id?: number;\n    };\n    query: {\n        /**\n         * This is a number parameter\n         */\n        parameterNumber: number;\n        /**\n         * This is a string parameter\n         */\n        parameterString: string | null;\n        /**\n         * This is a boolean parameter\n         */\n        parameterBoolean: boolean | null;\n        /**\n         * This is an object parameter\n         */\n        parameterObject: {\n            [key: string]: unknown;\n        } | null;\n        /**\n         * This is an array parameter\n         */\n        parameterArray: Array<string> | null;\n        /**\n         * This is a dictionary parameter\n         */\n        parameterDictionary: {\n            [key: string]: unknown;\n        } | null;\n        /**\n         * This is an enum parameter\n         */\n        parameterEnum: 'Success' | 'Warning' | 'Error' | null;\n    };\n    url: '/api/v{api-version}/types';\n};\n\nexport type TypesResponses = {\n    /**\n     * Response is a simple number\n     */\n    200: number;\n    /**\n     * Response is a simple string\n     */\n    201: string;\n    /**\n     * Response is a simple boolean\n     */\n    202: boolean;\n    /**\n     * Response is a simple object\n     */\n    203: {\n        [key: string]: unknown;\n    };\n};\n\nexport type TypesResponse = TypesResponses[keyof TypesResponses];\n\nexport type UploadFileData = {\n    body: Blob | File;\n    path: {\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string | null;\n    };\n    query?: never;\n    url: '/api/v{api-version}/upload';\n};\n\nexport type UploadFileResponses = {\n    200: boolean;\n};\n\nexport type UploadFileResponse = UploadFileResponses[keyof UploadFileResponses];\n\nexport type FileResponseData = {\n    body?: never;\n    path: {\n        id: string;\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string;\n    };\n    query?: never;\n    url: '/api/v{api-version}/file/{id}';\n};\n\nexport type FileResponseResponses = {\n    /**\n     * Success\n     */\n    200: Blob | File;\n};\n\nexport type FileResponseResponse = FileResponseResponses[keyof FileResponseResponses];\n\nexport type ComplexTypesData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * Parameter containing object\n         */\n        parameterObject: {\n            first?: {\n                second?: {\n                    third?: string;\n                };\n            };\n        };\n        /**\n         * Parameter containing reference\n         */\n        parameterReference: ModelWithString;\n    };\n    url: '/api/v{api-version}/complex';\n};\n\nexport type ComplexTypesErrors = {\n    /**\n     * 400 `server` error\n     */\n    400: unknown;\n    /**\n     * 500 server error\n     */\n    500: unknown;\n};\n\nexport type ComplexTypesResponses = {\n    /**\n     * Successful response\n     */\n    200: Array<ModelWithString>;\n};\n\nexport type ComplexTypesResponse = ComplexTypesResponses[keyof ComplexTypesResponses];\n\nexport type MultipartResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multipart';\n};\n\nexport type MultipartResponseResponses = {\n    /**\n     * OK\n     */\n    200: {\n        file?: Blob | File;\n        metadata?: {\n            foo?: string;\n            bar?: string;\n        };\n    };\n};\n\nexport type MultipartResponseResponse = MultipartResponseResponses[keyof MultipartResponseResponses];\n\nexport type MultipartRequestData = {\n    body?: {\n        content?: Blob | File;\n        data?: ModelWithString | null;\n    };\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multipart';\n};\n\nexport type ComplexParamsData = {\n    body?: {\n        readonly key: string | null;\n        name: string | null;\n        enabled?: boolean;\n        type: 'Monkey' | 'Horse' | 'Bird';\n        listOfModels?: Array<ModelWithString> | null;\n        listOfStrings?: Array<string> | null;\n        parameters: ModelWithString | ModelWithEnum | ModelWithArray | ModelWithDictionary;\n        readonly user?: {\n            readonly id?: number;\n            readonly name?: string | null;\n        };\n    };\n    path: {\n        id: number;\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string;\n    };\n    query?: never;\n    url: '/api/v{api-version}/complex/{id}';\n};\n\nexport type ComplexParamsResponses = {\n    /**\n     * Success\n     */\n    200: ModelWithString;\n};\n\nexport type ComplexParamsResponse = ComplexParamsResponses[keyof ComplexParamsResponses];\n\nexport type CallWithResultFromHeaderData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/header';\n};\n\nexport type CallWithResultFromHeaderErrors = {\n    /**\n     * 400 server error\n     */\n    400: unknown;\n    /**\n     * 500 server error\n     */\n    500: unknown;\n};\n\nexport type CallWithResultFromHeaderResponses = {\n    /**\n     * Successful response\n     */\n    200: unknown;\n};\n\nexport type TestErrorCodeData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * Status code to return\n         */\n        status: number;\n    };\n    url: '/api/v{api-version}/error';\n};\n\nexport type TestErrorCodeErrors = {\n    /**\n     * Custom message: Internal Server Error\n     */\n    500: unknown;\n    /**\n     * Custom message: Not Implemented\n     */\n    501: unknown;\n    /**\n     * Custom message: Bad Gateway\n     */\n    502: unknown;\n    /**\n     * Custom message: Service Unavailable\n     */\n    503: unknown;\n};\n\nexport type TestErrorCodeResponses = {\n    /**\n     * Custom message: Successful response\n     */\n    200: unknown;\n};\n\nexport type NonAsciiæøåÆøÅöôêÊ字符串Data = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * Dummy input param\n         */\n        nonAsciiParamæøåÆØÅöôêÊ: number;\n    };\n    url: '/api/v{api-version}/non-ascii-æøåÆØÅöôêÊ字符串';\n};\n\nexport type NonAsciiæøåÆøÅöôêÊ字符串Responses = {\n    /**\n     * Successful response\n     */\n    200: Array<NonAsciiStringæøåÆøÅöôêÊ字符串>;\n};\n\nexport type NonAsciiæøåÆøÅöôêÊ字符串Response = NonAsciiæøåÆøÅöôêÊ字符串Responses[keyof NonAsciiæøåÆøÅöôêÊ字符串Responses];\n\nexport type PutWithFormUrlEncodedData = {\n    body: ArrayWithStrings;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/non-ascii-æøåÆØÅöôêÊ字符串';\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-ky/import-file-extension-ts/client/client.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { HTTPError, Options as KyOptions } from 'ky';\nimport ky from 'ky';\n\nimport { createSseClient } from '../core/serverSentEvents.gen.ts';\nimport type { HttpMethod } from '../core/types.gen.ts';\nimport { getValidRequestBody } from '../core/utils.gen.ts';\nimport type { Client, Config, RequestOptions, ResolvedRequestOptions, RetryOptions } from './types.gen.ts';\nimport type { Middleware } from './utils.gen.ts';\nimport {\n  buildUrl,\n  createConfig,\n  createInterceptors,\n  getParseAs,\n  mergeConfigs,\n  mergeHeaders,\n  setAuthParams,\n} from './utils.gen.ts';\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 (options: RequestOptions) => {\n    const opts = {\n      ..._config,\n      ...options,\n      headers: mergeHeaders(_config.headers, options.headers),\n      ky: options.ky ?? _config.ky ?? ky,\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    if (opts.body === undefined || opts.serializedBody === '') {\n      opts.headers.delete('Content-Type');\n    }\n\n    const url = buildUrl(opts);\n\n    return { opts, url };\n  };\n\n  const parseErrorResponse = async (\n    response: Response,\n    request: Request,\n    opts: ResolvedRequestOptions,\n    interceptorsMiddleware: Middleware<Request, Response, unknown, ResolvedRequestOptions>,\n  ) => {\n    const result = {\n      request,\n      response,\n    };\n\n    const textError = await response.text();\n    let jsonError: unknown;\n\n    try {\n      jsonError = JSON.parse(textError);\n    } catch {\n      jsonError = undefined;\n    }\n\n    const error = jsonError ?? textError;\n    let finalError = error;\n\n    for (const fn of interceptorsMiddleware.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    return opts.responseStyle === 'data'\n      ? undefined\n      : {\n          error: finalError,\n          ...result,\n        };\n  };\n\n  const request: Client['request'] = async (options) => {\n    // @ts-expect-error\n    const { opts, url } = await beforeRequest(options);\n\n    const kyInstance = opts.ky!;\n\n    const validBody = getValidRequestBody(opts);\n\n    const kyOptions: KyOptions = {\n      body: validBody as BodyInit,\n      cache: opts.cache,\n      credentials: opts.credentials,\n      headers: opts.headers,\n      integrity: opts.integrity,\n      keepalive: opts.keepalive,\n      method: opts.method as KyOptions['method'],\n      mode: opts.mode,\n      redirect: 'follow',\n      referrer: opts.referrer,\n      referrerPolicy: opts.referrerPolicy,\n      signal: opts.signal,\n      throwHttpErrors: opts.throwOnError ?? false,\n      timeout: opts.timeout,\n      ...opts.kyOptions,\n    };\n\n    if (opts.retry && typeof opts.retry === 'object') {\n      const retryOpts = opts.retry as RetryOptions;\n      kyOptions.retry = {\n        limit: retryOpts.limit ?? 2,\n        methods: retryOpts.methods as Array<\n          'get' | 'post' | 'put' | 'patch' | 'head' | 'delete' | 'options' | 'trace'\n        >,\n        statusCodes: retryOpts.statusCodes,\n      };\n    }\n\n    let request = new Request(url, {\n      body: kyOptions.body as BodyInit,\n      headers: kyOptions.headers as HeadersInit,\n      method: kyOptions.method,\n    });\n\n    for (const fn of interceptors.request.fns) {\n      if (fn) {\n        request = await fn(request, opts);\n      }\n    }\n\n    let response: Response;\n\n    try {\n      response = await kyInstance(request, kyOptions);\n    } catch (error) {\n      if (error && typeof error === 'object' && 'response' in error) {\n        const httpError = error as HTTPError;\n        response = httpError.response;\n\n        for (const fn of interceptors.response.fns) {\n          if (fn) {\n            response = await fn(response, request, opts);\n          }\n        }\n\n        return parseErrorResponse(response, request, opts, interceptors);\n      }\n\n      throw error;\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    return parseErrorResponse(response, request, opts, interceptors);\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      fetch: globalThis.fetch,\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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-ky/import-file-extension-ts/client/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type { Auth } from '../core/auth.gen.ts';\nexport type { QuerySerializerOptions } from '../core/bodySerializer.gen.ts';\nexport {\n  formDataBodySerializer,\n  jsonBodySerializer,\n  urlSearchParamsBodySerializer,\n} from '../core/bodySerializer.gen.ts';\nexport { buildClientParams } from '../core/params.gen.ts';\nexport { serializeQueryKeyValue } from '../core/queryKeySerializer.gen.ts';\nexport { createClient } from './client.gen.ts';\nexport type {\n  Client,\n  ClientOptions,\n  Config,\n  CreateClientConfig,\n  Options,\n  RequestOptions,\n  RequestResult,\n  ResolvedRequestOptions,\n  ResponseStyle,\n  RetryOptions,\n  TDataShape,\n} from './types.gen.ts';\nexport { createConfig, mergeHeaders } from './utils.gen.ts';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-ky/import-file-extension-ts/client/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { Options as KyOptions } from 'ky';\nimport type ky from 'ky';\n\nimport type { Auth } from '../core/auth.gen.ts';\nimport type {\n  ServerSentEventsOptions,\n  ServerSentEventsResult,\n} from '../core/serverSentEvents.gen.ts';\nimport type { Client as CoreClient, Config as CoreConfig } from '../core/types.gen.ts';\nimport type { Middleware } from './utils.gen.ts';\n\nexport type ResponseStyle = 'data' | 'fields';\n\nexport interface RetryOptions {\n  /**\n   * Maximum number of retry attempts\n   *\n   * @default 2\n   */\n  limit?: number;\n  /**\n   * HTTP methods to retry\n   *\n   * @default ['get', 'put', 'head', 'delete', 'options', 'trace']\n   */\n  methods?: Array<'get' | 'post' | 'put' | 'delete' | 'patch' | 'head' | 'options' | 'trace'>;\n  /**\n   * HTTP status codes to retry\n   *\n   * @default [408, 413, 429, 500, 502, 503, 504]\n   */\n  statusCodes?: number[];\n}\n\nexport interface Config<T extends ClientOptions = ClientOptions>\n  extends\n    Omit<KyOptions, 'body' | 'headers' | 'method' | 'prefixUrl' | 'retry' | 'throwHttpErrors'>,\n    CoreConfig {\n  /**\n   * Base URL for all requests made by this client.\n   */\n  baseUrl?: T['baseUrl'];\n  /**\n   * Ky instance to use. You can use this option to provide a custom\n   * ky instance.\n   */\n  ky?: typeof ky;\n  /**\n   * Additional ky-specific options that will be passed directly to ky.\n   * This allows you to use any ky option not explicitly exposed in the config.\n   */\n  kyOptions?: Omit<KyOptions, 'method' | 'prefixUrl'>;\n  /**\n   * Return the response data parsed in a specified format. By default, `auto`\n   * will infer the appropriate method from the `Content-Type` response header.\n   * You can override this behavior with any of the {@link Body} methods.\n   * Select `stream` if you don't want to parse response data at all.\n   *\n   * @default 'auto'\n   */\n  parseAs?: 'arrayBuffer' | 'auto' | 'blob' | 'formData' | 'json' | 'stream' | 'text';\n  /**\n   * Should we return only data or multiple fields (data, error, response, etc.)?\n   *\n   * @default 'fields'\n   */\n  responseStyle?: ResponseStyle;\n  /**\n   * Retry configuration\n   */\n  retry?: RetryOptions;\n  /**\n   * Throw an error instead of returning it in the response?\n   *\n   * @default false\n   */\n  throwOnError?: T['throwOnError'];\n  /**\n   * Request timeout in milliseconds\n   *\n   * @default 10000\n   */\n  timeout?: number;\n}\n\nexport interface RequestOptions<\n  TData = unknown,\n  TResponseStyle extends ResponseStyle = 'fields',\n  ThrowOnError extends boolean = boolean,\n  Url extends string = string,\n>\n  extends\n    Config<{\n      responseStyle: TResponseStyle;\n      throwOnError: ThrowOnError;\n    }>,\n    Pick<\n      ServerSentEventsOptions<TData>,\n      | 'onRequest'\n      | 'onSseError'\n      | 'onSseEvent'\n      | 'sseDefaultRetryDelay'\n      | 'sseMaxRetryAttempts'\n      | 'sseMaxRetryDelay'\n    > {\n  /**\n   * Any body that you want to add to your request.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/fetch#body}\n   */\n  body?: unknown;\n  path?: Record<string, unknown>;\n  query?: Record<string, unknown>;\n  /**\n   * Security mechanism(s) to use for the request.\n   */\n  security?: ReadonlyArray<Auth>;\n  url: Url;\n}\n\nexport interface ResolvedRequestOptions<\n  TResponseStyle extends ResponseStyle = 'fields',\n  ThrowOnError extends boolean = boolean,\n  Url extends string = string,\n> extends RequestOptions<unknown, TResponseStyle, ThrowOnError, Url> {\n  serializedBody?: string;\n}\n\nexport type RequestResult<\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = boolean,\n  TResponseStyle extends ResponseStyle = 'fields',\n> = ThrowOnError extends true\n  ? Promise<\n      TResponseStyle extends 'data'\n        ? TData extends Record<string, unknown>\n          ? TData[keyof TData]\n          : TData\n        : {\n            data: TData extends Record<string, unknown> ? TData[keyof TData] : TData;\n            request: Request;\n            response: Response;\n          }\n    >\n  : Promise<\n      TResponseStyle extends 'data'\n        ? (TData extends Record<string, unknown> ? TData[keyof TData] : TData) | undefined\n        : (\n            | {\n                data: TData extends Record<string, unknown> ? TData[keyof TData] : TData;\n                error: undefined;\n              }\n            | {\n                data: undefined;\n                error: TError extends Record<string, unknown> ? TError[keyof TError] : TError;\n              }\n          ) & {\n            request: Request;\n            response: Response;\n          }\n    >;\n\nexport interface ClientOptions {\n  baseUrl?: string;\n  responseStyle?: ResponseStyle;\n  throwOnError?: boolean;\n}\n\ntype MethodFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'>,\n) => RequestResult<TData, TError, ThrowOnError, TResponseStyle>;\n\ntype SseFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'>,\n) => Promise<ServerSentEventsResult<TData, TError>>;\n\ntype RequestFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'> &\n    Pick<Required<RequestOptions<TData, TResponseStyle, ThrowOnError>>, 'method'>,\n) => RequestResult<TData, TError, ThrowOnError, TResponseStyle>;\n\ntype BuildUrlFn = <\n  TData extends {\n    body?: unknown;\n    path?: Record<string, unknown>;\n    query?: Record<string, unknown>;\n    url: string;\n  },\n>(\n  options: TData & Options<TData>,\n) => string;\n\nexport type Client = CoreClient<RequestFn, Config, MethodFn, BuildUrlFn, SseFn> & {\n  interceptors: Middleware<Request, Response, unknown, ResolvedRequestOptions>;\n};\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 = ClientOptions> = (\n  override?: Config<ClientOptions & T>,\n) => Config<Required<ClientOptions> & T>;\n\nexport interface TDataShape {\n  body?: unknown;\n  headers?: unknown;\n  path?: unknown;\n  query?: unknown;\n  url: string;\n}\n\ntype OmitKeys<T, K> = Pick<T, Exclude<keyof T, K>>;\n\nexport type Options<\n  TData extends TDataShape = TDataShape,\n  ThrowOnError extends boolean = boolean,\n  TResponse = unknown,\n  TResponseStyle extends ResponseStyle = 'fields',\n> = OmitKeys<\n  RequestOptions<TResponse, TResponseStyle, ThrowOnError>,\n  'body' | 'path' | 'query' | 'url'\n> &\n  ([TData] extends [never] ? unknown : Omit<TData, 'url'>);\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-ky/import-file-extension-ts/client/utils.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport { getAuthToken } from '../core/auth.gen.ts';\nimport type { QuerySerializerOptions } from '../core/bodySerializer.gen.ts';\nimport { jsonBodySerializer } from '../core/bodySerializer.gen.ts';\nimport {\n  serializeArrayParam,\n  serializeObjectParam,\n  serializePrimitiveParam,\n} from '../core/pathSerializer.gen.ts';\nimport { getUrl } from '../core/utils.gen.ts';\nimport type { Client, ClientOptions, Config, RequestOptions } from './types.gen.ts';\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    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        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  throwOnError: false,\n  timeout: 10000,\n  ...override,\n});\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-ky/import-file-extension-ts/client.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport { type ClientOptions, type Config, createClient, createConfig } from './client/index.ts';\nimport type { ClientOptions as ClientOptions2 } from './types.gen.ts';\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: 'http://localhost:3000/base' }));\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-ky/import-file-extension-ts/core/auth.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-ky/import-file-extension-ts/core/bodySerializer.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { ArrayStyle, ObjectStyle, SerializerOptions } from './pathSerializer.gen.ts';\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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-ky/import-file-extension-ts/core/params.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-ky/import-file-extension-ts/core/pathSerializer.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-ky/import-file-extension-ts/core/queryKeySerializer.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\n/**\n * JSON-friendly union that mirrors what Pinia Colada can hash.\n */\nexport type JsonValue =\n  | null\n  | string\n  | number\n  | boolean\n  | JsonValue[]\n  | { [key: string]: JsonValue };\n\n/**\n * Replacer that converts non-JSON values (bigint, Date, etc.) to safe substitutes.\n */\nexport const queryKeyJsonReplacer = (_key: string, value: unknown) => {\n  if (value === undefined || typeof value === 'function' || typeof value === 'symbol') {\n    return undefined;\n  }\n  if (typeof value === 'bigint') {\n    return value.toString();\n  }\n  if (value instanceof Date) {\n    return value.toISOString();\n  }\n  return value;\n};\n\n/**\n * Safely stringifies a value and parses it back into a JsonValue.\n */\nexport const stringifyToJsonValue = (input: unknown): JsonValue | undefined => {\n  try {\n    const json = JSON.stringify(input, queryKeyJsonReplacer);\n    if (json === undefined) {\n      return undefined;\n    }\n    return JSON.parse(json) as JsonValue;\n  } catch {\n    return undefined;\n  }\n};\n\n/**\n * Detects plain objects (including objects with a null prototype).\n */\nconst isPlainObject = (value: unknown): value is Record<string, unknown> => {\n  if (value === null || typeof value !== 'object') {\n    return false;\n  }\n  const prototype = Object.getPrototypeOf(value as object);\n  return prototype === Object.prototype || prototype === null;\n};\n\n/**\n * Turns URLSearchParams into a sorted JSON object for deterministic keys.\n */\nconst serializeSearchParams = (params: URLSearchParams): JsonValue => {\n  const entries = Array.from(params.entries()).sort(([a], [b]) => a.localeCompare(b));\n  const result: Record<string, JsonValue> = {};\n\n  for (const [key, value] of entries) {\n    const existing = result[key];\n    if (existing === undefined) {\n      result[key] = value;\n      continue;\n    }\n\n    if (Array.isArray(existing)) {\n      (existing as string[]).push(value);\n    } else {\n      result[key] = [existing, value];\n    }\n  }\n\n  return result;\n};\n\n/**\n * Normalizes any accepted value into a JSON-friendly shape for query keys.\n */\nexport const serializeQueryKeyValue = (value: unknown): JsonValue | undefined => {\n  if (value === null) {\n    return null;\n  }\n\n  if (typeof value === 'string' || typeof value === 'number' || typeof value === 'boolean') {\n    return value;\n  }\n\n  if (value === undefined || typeof value === 'function' || typeof value === 'symbol') {\n    return undefined;\n  }\n\n  if (typeof value === 'bigint') {\n    return value.toString();\n  }\n\n  if (value instanceof Date) {\n    return value.toISOString();\n  }\n\n  if (Array.isArray(value)) {\n    return stringifyToJsonValue(value);\n  }\n\n  if (typeof URLSearchParams !== 'undefined' && value instanceof URLSearchParams) {\n    return serializeSearchParams(value);\n  }\n\n  if (isPlainObject(value)) {\n    return stringifyToJsonValue(value);\n  }\n\n  return undefined;\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-ky/import-file-extension-ts/core/serverSentEvents.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { Config } from './types.gen.ts';\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 const 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            // Normalize line endings: CRLF -> LF, then CR -> LF\n            buffer = buffer.replace(/\\r\\n/g, '\\n').replace(/\\r/g, '\\n');\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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-ky/import-file-extension-ts/core/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { Auth, AuthToken } from './auth.gen.ts';\nimport type { BodySerializer, QuerySerializer, QuerySerializerOptions } from './bodySerializer.gen.ts';\n\nexport type HttpMethod =\n  | 'connect'\n  | 'delete'\n  | 'get'\n  | 'head'\n  | 'options'\n  | 'patch'\n  | 'post'\n  | 'put'\n  | 'trace';\n\nexport type Client<\n  RequestFn = never,\n  Config = unknown,\n  MethodFn = never,\n  BuildUrlFn = never,\n  SseFn = never,\n> = {\n  /**\n   * Returns the final request URL.\n   */\n  buildUrl: BuildUrlFn;\n  getConfig: () => Config;\n  request: RequestFn;\n  setConfig: (config: Config) => Config;\n} & {\n  [K in HttpMethod]: MethodFn;\n} & ([SseFn] extends [never] ? { sse?: never } : { sse: { [K in HttpMethod]: SseFn } });\n\nexport interface Config {\n  /**\n   * Auth token or a function returning auth token. The resolved value will be\n   * added to the request payload as defined by its `security` array.\n   */\n  auth?: ((auth: Auth) => Promise<AuthToken> | AuthToken) | AuthToken;\n  /**\n   * A function for serializing request body parameter. By default,\n   * {@link JSON.stringify()} will be used.\n   */\n  bodySerializer?: BodySerializer | null;\n  /**\n   * An object containing any HTTP headers that you want to pre-populate your\n   * `Headers` object with.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/Headers/Headers#init See more}\n   */\n  headers?:\n    | RequestInit['headers']\n    | Record<\n        string,\n        string | number | boolean | (string | number | boolean)[] | null | undefined | unknown\n      >;\n  /**\n   * The request method.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/fetch#method See more}\n   */\n  method?: Uppercase<HttpMethod>;\n  /**\n   * A function for serializing request query parameters. By default, arrays\n   * will be exploded in form style, objects will be exploded in deepObject\n   * style, and reserved characters are percent-encoded.\n   *\n   * This method will have no effect if the native `paramsSerializer()` Axios\n   * API function is used.\n   *\n   * {@link https://swagger.io/docs/specification/serialization/#query View examples}\n   */\n  querySerializer?: QuerySerializer | QuerySerializerOptions;\n  /**\n   * A function validating request data. This is useful if you want to ensure\n   * the request conforms to the desired shape, so it can be safely sent to\n   * the server.\n   */\n  requestValidator?: (data: unknown) => Promise<unknown>;\n  /**\n   * A function transforming response data before it's returned. This is useful\n   * for post-processing data, e.g. converting ISO strings into Date objects.\n   */\n  responseTransformer?: (data: unknown) => Promise<unknown>;\n  /**\n   * A function validating response data. This is useful if you want to ensure\n   * the response conforms to the desired shape, so it can be safely passed to\n   * the transformers and returned to the user.\n   */\n  responseValidator?: (data: unknown) => Promise<unknown>;\n}\n\ntype IsExactlyNeverOrNeverUndefined<T> = [T] extends [never]\n  ? true\n  : [T] extends [never | undefined]\n    ? [undefined] extends [T]\n      ? false\n      : true\n    : false;\n\nexport type OmitNever<T extends Record<string, unknown>> = {\n  [K in keyof T as IsExactlyNeverOrNeverUndefined<T[K]> extends true ? never : K]: T[K];\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-ky/import-file-extension-ts/core/utils.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { BodySerializer, QuerySerializer } from './bodySerializer.gen.ts';\nimport {\n  type ArraySeparatorStyle,\n  serializeArrayParam,\n  serializeObjectParam,\n  serializePrimitiveParam,\n} from './pathSerializer.gen.ts';\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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-ky/import-file-extension-ts/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport { apiVVersionODataControllerCount, callToTestOrderOfParams, callWithDefaultOptionalParameters, callWithDefaultParameters, callWithDescriptions, callWithDuplicateResponses, callWithNoContentResponse, callWithParameters, callWithResponse, callWithResponseAndNoContentResponse, callWithResponses, callWithResultFromHeader, callWithWeirdParameterNames, collectionFormat, complexParams, complexTypes, deleteCallWithoutParametersAndResponse, deleteFoo, deprecatedCall, dummyA, dummyB, duplicateName, duplicateName2, duplicateName3, duplicateName4, export_, fileResponse, fooWow, getApiVbyApiVersionSimpleOperation, getCallWithOptionalParam, getCallWithoutParametersAndResponse, headCallWithoutParametersAndResponse, import_, multipartRequest, multipartResponse, nonAsciiæøåÆøÅöôêÊ字符串, type Options, optionsCallWithoutParametersAndResponse, patchApiVbyApiVersionNoTag, patchCallWithoutParametersAndResponse, postApiVbyApiVersionFormData, postApiVbyApiVersionRequestBody, postCallWithOptionalParam, postCallWithoutParametersAndResponse, putCallWithoutParametersAndResponse, putWithFormUrlEncoded, testErrorCode, types, uploadFile } from './sdk.gen.ts';\nexport type { _3eNum1Период, _400, AdditionalPropertiesIntegerIssue, AdditionalPropertiesUnknownIssue, AdditionalPropertiesUnknownIssue2, AdditionalPropertiesUnknownIssue3, AdditionalPropertiesUnknownIssueWritable, AnyOfAnyAndNull, AnyOfArrays, ApiVVersionODataControllerCountData, ApiVVersionODataControllerCountResponse, ApiVVersionODataControllerCountResponses, ArrayWithAnyOfProperties, ArrayWithArray, ArrayWithBooleans, ArrayWithNumbers, ArrayWithProperties, ArrayWithReferences, ArrayWithStrings, CallToTestOrderOfParamsData, CallWithDefaultOptionalParametersData, CallWithDefaultParametersData, CallWithDescriptionsData, CallWithDuplicateResponsesData, CallWithDuplicateResponsesError, CallWithDuplicateResponsesErrors, CallWithDuplicateResponsesResponse, CallWithDuplicateResponsesResponses, CallWithNoContentResponseData, CallWithNoContentResponseResponse, CallWithNoContentResponseResponses, CallWithParametersData, CallWithResponseAndNoContentResponseData, CallWithResponseAndNoContentResponseResponse, CallWithResponseAndNoContentResponseResponses, CallWithResponseData, CallWithResponseResponse, CallWithResponseResponses, CallWithResponsesData, CallWithResponsesError, CallWithResponsesErrors, CallWithResponsesResponse, CallWithResponsesResponses, CallWithResultFromHeaderData, CallWithResultFromHeaderErrors, CallWithResultFromHeaderResponses, CallWithWeirdParameterNamesData, CamelCaseCommentWithBreaks, CharactersInDescription, ClientOptions, CollectionFormatData, CommentWithBackticks, CommentWithBackticksAndQuotes, CommentWithBreaks, CommentWithExpressionPlaceholders, CommentWithQuotes, CommentWithReservedCharacters, CommentWithSlashes, ComplexParamsData, ComplexParamsResponse, ComplexParamsResponses, ComplexTypesData, ComplexTypesErrors, ComplexTypesResponse, ComplexTypesResponses, CompositionBaseModel, CompositionExtendedModel, CompositionWithAllOfAndNullable, CompositionWithAnyOf, CompositionWithAnyOfAndNullable, CompositionWithAnyOfAnonymous, CompositionWithNestedAnyAndTypeNull, CompositionWithNestedAnyOfAndNull, CompositionWithOneOf, CompositionWithOneOfAndComplexArrayDictionary, CompositionWithOneOfAndNullable, CompositionWithOneOfAndProperties, CompositionWithOneOfAndSimpleArrayDictionary, CompositionWithOneOfAndSimpleDictionary, CompositionWithOneOfAnonymous, CompositionWithOneOfDiscriminator, ConstValue, Default, DeleteCallWithoutParametersAndResponseData, DeleteFooData, DeleteFooData2, DeleteFooData3, DeprecatedCallData, DeprecatedModel, DictionaryWithArray, DictionaryWithDictionary, DictionaryWithProperties, DictionaryWithPropertiesAndAdditionalProperties, DictionaryWithReference, DictionaryWithString, DummyAData, DummyAResponse, DummyAResponses, DummyBData, DummyBResponse, DummyBResponses, DuplicateName2Data, DuplicateName3Data, DuplicateName4Data, DuplicateNameData, EnumFromDescription, EnumWithExtensions, EnumWithNumbers, EnumWithReplacedCharacters, EnumWithStrings, EnumWithXEnumNames, ExportData, ExternalRefA, ExternalRefB, ExternalSharedModel, File, FileResponseData, FileResponseResponse, FileResponseResponses, FileWritable, FooWowData, FooWowResponses, FreeFormObjectWithAdditionalPropertiesEqEmptyObject, FreeFormObjectWithAdditionalPropertiesEqTrue, FreeFormObjectWithoutAdditionalProperties, GenericSchemaDuplicateIssue1SystemBoolean, GenericSchemaDuplicateIssue1SystemBooleanWritable, GenericSchemaDuplicateIssue1SystemString, GenericSchemaDuplicateIssue1SystemStringWritable, GetApiVbyApiVersionSimpleOperationData, GetApiVbyApiVersionSimpleOperationError, GetApiVbyApiVersionSimpleOperationErrors, GetApiVbyApiVersionSimpleOperationResponse, GetApiVbyApiVersionSimpleOperationResponses, GetCallWithOptionalParamData, GetCallWithoutParametersAndResponseData, HeadCallWithoutParametersAndResponseData, Import, ImportData, ImportResponse, ImportResponses, IoK8sApimachineryPkgApisMetaV1DeleteOptions, IoK8sApimachineryPkgApisMetaV1Preconditions, ModelCircle, ModelFromZendesk, ModelSquare, ModelThatExtends, ModelThatExtendsExtends, ModelWithAdditionalPropertiesEqTrue, ModelWithAdditionalPropertiesRef, ModelWithAnyOfConstantSizeArray, ModelWithAnyOfConstantSizeArrayAndIntersect, ModelWithAnyOfConstantSizeArrayNullable, ModelWithAnyOfConstantSizeArrayWithNSizeAndOptions, ModelWithAnyOfConstantSizeArrayWithNSizeAndOptionsWritable, ModelWithArray, ModelWithArrayReadOnlyAndWriteOnly, ModelWithArrayReadOnlyAndWriteOnlyWritable, ModelWithBackticksInDescription, ModelWithBoolean, ModelWithCircularReference, ModelWithConst, ModelWithConstantSizeArray, ModelWithDictionary, ModelWithDuplicateImports, ModelWithDuplicateProperties, ModelWithEnum, ModelWithEnumFromDescription, ModelWithEnumWithHyphen, ModelWithInteger, ModelWithNestedArrayEnums, ModelWithNestedArrayEnumsData, ModelWithNestedArrayEnumsDataBar, ModelWithNestedArrayEnumsDataFoo, ModelWithNestedCompositionEnums, ModelWithNestedEnums, ModelWithNestedProperties, ModelWithNullableObject, ModelWithNullableString, ModelWithNumericEnumUnion, ModelWithOneOfAndProperties, ModelWithOneOfEnum, ModelWithOrderedProperties, ModelWithPattern, ModelWithPatternWritable, ModelWithPrefixItemsConstantSizeArray, ModelWithProperties, ModelWithPropertiesWritable, ModelWithReadOnlyAndWriteOnly, ModelWithReadOnlyAndWriteOnlyWritable, ModelWithReference, ModelWithReferenceWritable, ModelWithString, ModelWithStringError, MultipartRequestData, MultipartResponseData, MultipartResponseResponse, MultipartResponseResponses, NestedAnyOfArraysNullable, NonAsciiæøåÆøÅöôêÊ字符串Data, NonAsciiæøåÆøÅöôêÊ字符串Response, NonAsciiæøåÆøÅöôêÊ字符串Responses, NonAsciiStringæøåÆøÅöôêÊ字符串, NullableObject, OneOfAllOfIssue, OneOfAllOfIssueWritable, OptionsCallWithoutParametersAndResponseData, Pageable, ParameterSimpleParameterUnused, PatchApiVbyApiVersionNoTagData, PatchApiVbyApiVersionNoTagResponses, PatchCallWithoutParametersAndResponseData, PostApiVbyApiVersionFormDataData, PostApiVbyApiVersionRequestBodyData, PostCallWithOptionalParamData, PostCallWithOptionalParamResponse, PostCallWithOptionalParamResponses, PostCallWithoutParametersAndResponseData, PostServiceWithEmptyTagResponse, PostServiceWithEmptyTagResponse2, PutCallWithoutParametersAndResponseData, PutWithFormUrlEncodedData, SchemaWithFormRestrictedKeys, SimpleBoolean, SimpleFile, SimpleFormData, SimpleInteger, SimpleParameter, SimpleReference, SimpleRequestBody, SimpleString, SimpleStringWithPattern, TestErrorCodeData, TestErrorCodeErrors, TestErrorCodeResponses, TypesData, TypesResponse, TypesResponses, UploadFileData, UploadFileResponse, UploadFileResponses, XFooBar } from './types.gen.ts';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-ky/import-file-extension-ts/sdk.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport { client } from './client.gen.ts';\nimport { type Client, formDataBodySerializer, type Options as Options2, type TDataShape, urlSearchParamsBodySerializer } from './client/index.ts';\nimport type { ApiVVersionODataControllerCountData, ApiVVersionODataControllerCountResponses, CallToTestOrderOfParamsData, CallWithDefaultOptionalParametersData, CallWithDefaultParametersData, CallWithDescriptionsData, CallWithDuplicateResponsesData, CallWithDuplicateResponsesErrors, CallWithDuplicateResponsesResponses, CallWithNoContentResponseData, CallWithNoContentResponseResponses, CallWithParametersData, CallWithResponseAndNoContentResponseData, CallWithResponseAndNoContentResponseResponses, CallWithResponseData, CallWithResponseResponses, CallWithResponsesData, CallWithResponsesErrors, CallWithResponsesResponses, CallWithResultFromHeaderData, CallWithResultFromHeaderErrors, CallWithResultFromHeaderResponses, CallWithWeirdParameterNamesData, CollectionFormatData, ComplexParamsData, ComplexParamsResponses, ComplexTypesData, ComplexTypesErrors, ComplexTypesResponses, DeleteCallWithoutParametersAndResponseData, DeleteFooData3, DeprecatedCallData, DummyAData, DummyAResponses, DummyBData, DummyBResponses, DuplicateName2Data, DuplicateName3Data, DuplicateName4Data, DuplicateNameData, ExportData, FileResponseData, FileResponseResponses, FooWowData, FooWowResponses, GetApiVbyApiVersionSimpleOperationData, GetApiVbyApiVersionSimpleOperationErrors, GetApiVbyApiVersionSimpleOperationResponses, GetCallWithOptionalParamData, GetCallWithoutParametersAndResponseData, HeadCallWithoutParametersAndResponseData, ImportData, ImportResponses, MultipartRequestData, MultipartResponseData, MultipartResponseResponses, NonAsciiæøåÆøÅöôêÊ字符串Data, NonAsciiæøåÆøÅöôêÊ字符串Responses, OptionsCallWithoutParametersAndResponseData, PatchApiVbyApiVersionNoTagData, PatchApiVbyApiVersionNoTagResponses, PatchCallWithoutParametersAndResponseData, PostApiVbyApiVersionFormDataData, PostApiVbyApiVersionRequestBodyData, PostCallWithOptionalParamData, PostCallWithOptionalParamResponses, PostCallWithoutParametersAndResponseData, PutCallWithoutParametersAndResponseData, PutWithFormUrlEncodedData, TestErrorCodeData, TestErrorCodeErrors, TestErrorCodeResponses, TypesData, TypesResponses, UploadFileData, UploadFileResponses } from './types.gen.ts';\n\nexport type Options<TData extends TDataShape = TDataShape, ThrowOnError extends boolean = boolean> = Options2<TData, ThrowOnError> & {\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\nexport const export_ = <ThrowOnError extends boolean = false>(options?: Options<ExportData, ThrowOnError>) => (options?.client ?? client).get<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/no+tag', ...options });\n\nexport const patchApiVbyApiVersionNoTag = <ThrowOnError extends boolean = false>(options?: Options<PatchApiVbyApiVersionNoTagData, ThrowOnError>) => (options?.client ?? client).patch<PatchApiVbyApiVersionNoTagResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/no+tag', ...options });\n\nexport const import_ = <ThrowOnError extends boolean = false>(options: Options<ImportData, ThrowOnError>) => (options.client ?? client).post<ImportResponses, unknown, ThrowOnError>({\n    url: '/api/v{api-version}/no+tag',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options.headers\n    }\n});\n\nexport const fooWow = <ThrowOnError extends boolean = false>(options?: Options<FooWowData, ThrowOnError>) => (options?.client ?? client).put<FooWowResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/no+tag', ...options });\n\nexport const apiVVersionODataControllerCount = <ThrowOnError extends boolean = false>(options?: Options<ApiVVersionODataControllerCountData, ThrowOnError>) => (options?.client ?? client).get<ApiVVersionODataControllerCountResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple/$count', ...options });\n\nexport const getApiVbyApiVersionSimpleOperation = <ThrowOnError extends boolean = false>(options: Options<GetApiVbyApiVersionSimpleOperationData, ThrowOnError>) => (options.client ?? client).get<GetApiVbyApiVersionSimpleOperationResponses, GetApiVbyApiVersionSimpleOperationErrors, ThrowOnError>({ url: '/api/v{api-version}/simple:operation', ...options });\n\nexport const deleteCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<DeleteCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).delete<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const getCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<GetCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).get<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const headCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<HeadCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).head<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const optionsCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<OptionsCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).options<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const patchCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<PatchCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).patch<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const postCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<PostCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).post<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const putCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<PutCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).put<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const deleteFoo = <ThrowOnError extends boolean = false>(options: Options<DeleteFooData3, ThrowOnError>) => (options.client ?? client).delete<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/foo/{foo_param}/bar/{BarParam}', ...options });\n\nexport const callWithDescriptions = <ThrowOnError extends boolean = false>(options?: Options<CallWithDescriptionsData, ThrowOnError>) => (options?.client ?? client).post<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/descriptions', ...options });\n\n/**\n * @deprecated\n */\nexport const deprecatedCall = <ThrowOnError extends boolean = false>(options: Options<DeprecatedCallData, ThrowOnError>) => (options.client ?? client).post<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/parameters/deprecated', ...options });\n\nexport const callWithParameters = <ThrowOnError extends boolean = false>(options: Options<CallWithParametersData, ThrowOnError>) => (options.client ?? client).post<unknown, unknown, ThrowOnError>({\n    url: '/api/v{api-version}/parameters/{parameterPath}',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options.headers\n    }\n});\n\nexport const callWithWeirdParameterNames = <ThrowOnError extends boolean = false>(options: Options<CallWithWeirdParameterNamesData, ThrowOnError>) => (options.client ?? client).post<unknown, unknown, ThrowOnError>({\n    url: '/api/v{api-version}/parameters/{parameter.path.1}/{parameter-path-2}/{PARAMETER-PATH-3}',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options.headers\n    }\n});\n\nexport const getCallWithOptionalParam = <ThrowOnError extends boolean = false>(options: Options<GetCallWithOptionalParamData, ThrowOnError>) => (options.client ?? client).get<unknown, unknown, ThrowOnError>({\n    url: '/api/v{api-version}/parameters',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options.headers\n    }\n});\n\nexport const postCallWithOptionalParam = <ThrowOnError extends boolean = false>(options: Options<PostCallWithOptionalParamData, ThrowOnError>) => (options.client ?? client).post<PostCallWithOptionalParamResponses, unknown, ThrowOnError>({\n    url: '/api/v{api-version}/parameters',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options.headers\n    }\n});\n\nexport const postApiVbyApiVersionRequestBody = <ThrowOnError extends boolean = false>(options?: Options<PostApiVbyApiVersionRequestBodyData, ThrowOnError>) => (options?.client ?? client).post<unknown, unknown, ThrowOnError>({\n    url: '/api/v{api-version}/requestBody',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options?.headers\n    }\n});\n\nexport const postApiVbyApiVersionFormData = <ThrowOnError extends boolean = false>(options?: Options<PostApiVbyApiVersionFormDataData, ThrowOnError>) => (options?.client ?? client).post<unknown, unknown, ThrowOnError>({\n    ...formDataBodySerializer,\n    url: '/api/v{api-version}/formData',\n    ...options,\n    headers: {\n        'Content-Type': null,\n        ...options?.headers\n    }\n});\n\nexport const callWithDefaultParameters = <ThrowOnError extends boolean = false>(options?: Options<CallWithDefaultParametersData, ThrowOnError>) => (options?.client ?? client).get<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/defaults', ...options });\n\nexport const callWithDefaultOptionalParameters = <ThrowOnError extends boolean = false>(options?: Options<CallWithDefaultOptionalParametersData, ThrowOnError>) => (options?.client ?? client).post<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/defaults', ...options });\n\nexport const callToTestOrderOfParams = <ThrowOnError extends boolean = false>(options: Options<CallToTestOrderOfParamsData, ThrowOnError>) => (options.client ?? client).put<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/defaults', ...options });\n\nexport const duplicateName = <ThrowOnError extends boolean = false>(options?: Options<DuplicateNameData, ThrowOnError>) => (options?.client ?? client).delete<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/duplicate', ...options });\n\nexport const duplicateName2 = <ThrowOnError extends boolean = false>(options?: Options<DuplicateName2Data, ThrowOnError>) => (options?.client ?? client).get<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/duplicate', ...options });\n\nexport const duplicateName3 = <ThrowOnError extends boolean = false>(options?: Options<DuplicateName3Data, ThrowOnError>) => (options?.client ?? client).post<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/duplicate', ...options });\n\nexport const duplicateName4 = <ThrowOnError extends boolean = false>(options?: Options<DuplicateName4Data, ThrowOnError>) => (options?.client ?? client).put<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/duplicate', ...options });\n\nexport const callWithNoContentResponse = <ThrowOnError extends boolean = false>(options?: Options<CallWithNoContentResponseData, ThrowOnError>) => (options?.client ?? client).get<CallWithNoContentResponseResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/no-content', ...options });\n\nexport const callWithResponseAndNoContentResponse = <ThrowOnError extends boolean = false>(options?: Options<CallWithResponseAndNoContentResponseData, ThrowOnError>) => (options?.client ?? client).get<CallWithResponseAndNoContentResponseResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/multiple-tags/response-and-no-content', ...options });\n\nexport const dummyA = <ThrowOnError extends boolean = false>(options?: Options<DummyAData, ThrowOnError>) => (options?.client ?? client).get<DummyAResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/multiple-tags/a', ...options });\n\nexport const dummyB = <ThrowOnError extends boolean = false>(options?: Options<DummyBData, ThrowOnError>) => (options?.client ?? client).get<DummyBResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/multiple-tags/b', ...options });\n\nexport const callWithResponse = <ThrowOnError extends boolean = false>(options?: Options<CallWithResponseData, ThrowOnError>) => (options?.client ?? client).get<CallWithResponseResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/response', ...options });\n\nexport const callWithDuplicateResponses = <ThrowOnError extends boolean = false>(options?: Options<CallWithDuplicateResponsesData, ThrowOnError>) => (options?.client ?? client).post<CallWithDuplicateResponsesResponses, CallWithDuplicateResponsesErrors, ThrowOnError>({ url: '/api/v{api-version}/response', ...options });\n\nexport const callWithResponses = <ThrowOnError extends boolean = false>(options?: Options<CallWithResponsesData, ThrowOnError>) => (options?.client ?? client).put<CallWithResponsesResponses, CallWithResponsesErrors, ThrowOnError>({ url: '/api/v{api-version}/response', ...options });\n\nexport const collectionFormat = <ThrowOnError extends boolean = false>(options: Options<CollectionFormatData, ThrowOnError>) => (options.client ?? client).get<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/collectionFormat', ...options });\n\nexport const types = <ThrowOnError extends boolean = false>(options: Options<TypesData, ThrowOnError>) => (options.client ?? client).get<TypesResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/types', ...options });\n\nexport const uploadFile = <ThrowOnError extends boolean = false>(options: Options<UploadFileData, ThrowOnError>) => (options.client ?? client).post<UploadFileResponses, unknown, ThrowOnError>({\n    ...urlSearchParamsBodySerializer,\n    url: '/api/v{api-version}/upload',\n    ...options,\n    headers: {\n        'Content-Type': 'application/x-www-form-urlencoded',\n        ...options.headers\n    }\n});\n\nexport const fileResponse = <ThrowOnError extends boolean = false>(options: Options<FileResponseData, ThrowOnError>) => (options.client ?? client).get<FileResponseResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/file/{id}', ...options });\n\nexport const complexTypes = <ThrowOnError extends boolean = false>(options: Options<ComplexTypesData, ThrowOnError>) => (options.client ?? client).get<ComplexTypesResponses, ComplexTypesErrors, ThrowOnError>({\n    querySerializer: { parameters: { parameterObject: { object: { style: 'form' } } } },\n    url: '/api/v{api-version}/complex',\n    ...options\n});\n\nexport const multipartResponse = <ThrowOnError extends boolean = false>(options?: Options<MultipartResponseData, ThrowOnError>) => (options?.client ?? client).get<MultipartResponseResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/multipart', ...options });\n\nexport const multipartRequest = <ThrowOnError extends boolean = false>(options?: Options<MultipartRequestData, ThrowOnError>) => (options?.client ?? client).post<unknown, unknown, ThrowOnError>({\n    ...formDataBodySerializer,\n    url: '/api/v{api-version}/multipart',\n    ...options,\n    headers: {\n        'Content-Type': null,\n        ...options?.headers\n    }\n});\n\nexport const complexParams = <ThrowOnError extends boolean = false>(options: Options<ComplexParamsData, ThrowOnError>) => (options.client ?? client).put<ComplexParamsResponses, unknown, ThrowOnError>({\n    url: '/api/v{api-version}/complex/{id}',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json-patch+json',\n        ...options.headers\n    }\n});\n\nexport const callWithResultFromHeader = <ThrowOnError extends boolean = false>(options?: Options<CallWithResultFromHeaderData, ThrowOnError>) => (options?.client ?? client).post<CallWithResultFromHeaderResponses, CallWithResultFromHeaderErrors, ThrowOnError>({ url: '/api/v{api-version}/header', ...options });\n\nexport const testErrorCode = <ThrowOnError extends boolean = false>(options: Options<TestErrorCodeData, ThrowOnError>) => (options.client ?? client).post<TestErrorCodeResponses, TestErrorCodeErrors, ThrowOnError>({ url: '/api/v{api-version}/error', ...options });\n\nexport const nonAsciiæøåÆøÅöôêÊ字符串 = <ThrowOnError extends boolean = false>(options: Options<NonAsciiæøåÆøÅöôêÊ字符串Data, ThrowOnError>) => (options.client ?? client).post<NonAsciiæøåÆøÅöôêÊ字符串Responses, unknown, ThrowOnError>({ url: '/api/v{api-version}/non-ascii-æøåÆØÅöôêÊ字符串', ...options });\n\n/**\n * Login User\n */\nexport const putWithFormUrlEncoded = <ThrowOnError extends boolean = false>(options: Options<PutWithFormUrlEncodedData, ThrowOnError>) => (options.client ?? client).put<unknown, unknown, ThrowOnError>({\n    ...urlSearchParamsBodySerializer,\n    url: '/api/v{api-version}/non-ascii-æøåÆØÅöôêÊ字符串',\n    ...options,\n    headers: {\n        'Content-Type': 'application/x-www-form-urlencoded',\n        ...options.headers\n    }\n});\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-ky/import-file-extension-ts/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type ClientOptions = {\n    baseUrl: 'http://localhost:3000/base' | (string & {});\n};\n\n/**\n * Model with number-only name\n */\nexport type _400 = string;\n\n/**\n * External ref to shared model (A)\n */\nexport type ExternalRefA = ExternalSharedModel;\n\n/**\n * External ref to shared model (B)\n */\nexport type ExternalRefB = ExternalSharedModel;\n\n/**\n * Testing multiline comments in string: First line\n * Second line\n *\n * Fourth line\n */\nexport type CamelCaseCommentWithBreaks = number;\n\n/**\n * Testing multiline comments in string: First line\n * Second line\n *\n * Fourth line\n */\nexport type CommentWithBreaks = number;\n\n/**\n * Testing backticks in string: `backticks` and ```multiple backticks``` should work\n */\nexport type CommentWithBackticks = number;\n\n/**\n * Testing backticks and quotes in string: `backticks`, 'quotes', \"double quotes\" and ```multiple backticks``` should work\n */\nexport type CommentWithBackticksAndQuotes = number;\n\n/**\n * Testing slashes in string: \\backwards\\\\\\ and /forwards/// should work\n */\nexport type CommentWithSlashes = number;\n\n/**\n * Testing expression placeholders in string: ${expression} should work\n */\nexport type CommentWithExpressionPlaceholders = number;\n\n/**\n * Testing quotes in string: 'single quote''' and \"double quotes\"\"\" should work\n */\nexport type CommentWithQuotes = number;\n\n/**\n * Testing reserved characters in string: * inline * and ** inline ** should work\n */\nexport type CommentWithReservedCharacters = number;\n\n/**\n * This is a simple number\n */\nexport type SimpleInteger = number;\n\n/**\n * This is a simple boolean\n */\nexport type SimpleBoolean = boolean;\n\n/**\n * This is a simple string\n */\nexport type SimpleString = string;\n\n/**\n * A string with non-ascii (unicode) characters valid in typescript identifiers (æøåÆØÅöÔèÈ字符串)\n */\nexport type NonAsciiStringæøåÆøÅöôêÊ字符串 = string;\n\n/**\n * This is a simple file\n */\nexport type SimpleFile = Blob | File;\n\n/**\n * This is a simple reference\n */\nexport type SimpleReference = ModelWithString;\n\n/**\n * This is a simple string\n */\nexport type SimpleStringWithPattern = string | null;\n\n/**\n * This is a simple enum with strings\n */\nexport type EnumWithStrings = 'Success' | 'Warning' | 'Error' | '\\'Single Quote\\'' | '\"Double Quotes\"' | 'Non-ascii: øæåôöØÆÅÔÖ字符串';\n\nexport type EnumWithReplacedCharacters = '\\'Single Quote\\'' | '\"Double Quotes\"' | 'øæåôöØÆÅÔÖ字符串' | 3.1 | '';\n\n/**\n * This is a simple enum with numbers\n */\nexport type EnumWithNumbers = 1 | 2 | 3 | 1.1 | 1.2 | 1.3 | 100 | 200 | 300 | -100 | -200 | -300 | -1.1 | -1.2 | -1.3;\n\n/**\n * Success=1,Warning=2,Error=3\n */\nexport type EnumFromDescription = number;\n\n/**\n * This is a simple enum with numbers\n */\nexport type EnumWithExtensions = 200 | 400 | 500;\n\nexport type EnumWithXEnumNames = 0 | 1 | 2;\n\n/**\n * This is a simple array with numbers\n */\nexport type ArrayWithNumbers = Array<number>;\n\n/**\n * This is a simple array with booleans\n */\nexport type ArrayWithBooleans = Array<boolean>;\n\n/**\n * This is a simple array with strings\n */\nexport type ArrayWithStrings = Array<string>;\n\n/**\n * This is a simple array with references\n */\nexport type ArrayWithReferences = Array<ModelWithString>;\n\n/**\n * This is a simple array containing an array\n */\nexport type ArrayWithArray = Array<Array<ModelWithString>>;\n\n/**\n * This is a simple array with properties\n */\nexport type ArrayWithProperties = Array<{\n    '16x16'?: CamelCaseCommentWithBreaks;\n    bar?: string;\n}>;\n\n/**\n * This is a simple array with any of properties\n */\nexport type ArrayWithAnyOfProperties = Array<{\n    foo?: string;\n} | {\n    bar?: string;\n}>;\n\nexport type AnyOfAnyAndNull = {\n    data?: unknown | null;\n};\n\n/**\n * This is a simple array with any of properties\n */\nexport type AnyOfArrays = {\n    results?: Array<{\n        foo?: string;\n    } | {\n        bar?: string;\n    }>;\n};\n\n/**\n * This is a string dictionary\n */\nexport type DictionaryWithString = {\n    [key: string]: string;\n};\n\nexport type DictionaryWithPropertiesAndAdditionalProperties = {\n    foo?: number;\n    bar?: boolean;\n    [key: string]: string | number | boolean | undefined;\n};\n\n/**\n * This is a string reference\n */\nexport type DictionaryWithReference = {\n    [key: string]: ModelWithString;\n};\n\n/**\n * This is a complex dictionary\n */\nexport type DictionaryWithArray = {\n    [key: string]: Array<ModelWithString>;\n};\n\n/**\n * This is a string dictionary\n */\nexport type DictionaryWithDictionary = {\n    [key: string]: {\n        [key: string]: string;\n    };\n};\n\n/**\n * This is a complex dictionary\n */\nexport type DictionaryWithProperties = {\n    [key: string]: {\n        foo?: string;\n        bar?: string;\n    };\n};\n\n/**\n * This is a model with one number property\n */\nexport type ModelWithInteger = {\n    /**\n     * This is a simple number property\n     */\n    prop?: number;\n};\n\n/**\n * This is a model with one boolean property\n */\nexport type ModelWithBoolean = {\n    /**\n     * This is a simple boolean property\n     */\n    prop?: boolean;\n};\n\n/**\n * This is a model with one string property\n */\nexport type ModelWithString = {\n    /**\n     * This is a simple string property\n     */\n    prop?: string;\n};\n\n/**\n * This is a model with one string property\n */\nexport type ModelWithStringError = {\n    /**\n     * This is a simple string property\n     */\n    prop?: string;\n};\n\n/**\n * `Comment` or `VoiceComment`. The JSON object for adding voice comments to tickets is different. See [Adding voice comments to tickets](/documentation/ticketing/managing-tickets/adding-voice-comments-to-tickets)\n */\nexport type ModelFromZendesk = string;\n\n/**\n * This is a model with one string property\n */\nexport type ModelWithNullableString = {\n    /**\n     * This is a simple string property\n     */\n    nullableProp1?: string | null;\n    /**\n     * This is a simple string property\n     */\n    nullableRequiredProp1: string | null;\n    /**\n     * This is a simple string property\n     */\n    nullableProp2?: string | null;\n    /**\n     * This is a simple string property\n     */\n    nullableRequiredProp2: string | null;\n    /**\n     * This is a simple enum with strings\n     */\n    'foo_bar-enum'?: 'Success' | 'Warning' | 'Error' | 'ØÆÅ字符串';\n};\n\n/**\n * This is a model with one enum\n */\nexport type ModelWithEnum = {\n    /**\n     * This is a simple enum with strings\n     */\n    'foo_bar-enum'?: 'Success' | 'Warning' | 'Error' | 'ØÆÅ字符串';\n    /**\n     * These are the HTTP error code enums\n     */\n    statusCode?: '100' | '200 FOO' | '300 FOO_BAR' | '400 foo-bar' | '500 foo.bar' | '600 foo&bar';\n    /**\n     * Simple boolean enum\n     */\n    bool?: true;\n};\n\n/**\n * This is a model with one enum with escaped name\n */\nexport type ModelWithEnumWithHyphen = {\n    /**\n     * Foo-Bar-Baz-Qux\n     */\n    'foo-bar-baz-qux'?: '3.0';\n};\n\n/**\n * This is a model with one enum\n */\nexport type ModelWithEnumFromDescription = {\n    /**\n     * Success=1,Warning=2,Error=3\n     */\n    test?: number;\n};\n\n/**\n * This is a model with nested enums\n */\nexport type ModelWithNestedEnums = {\n    dictionaryWithEnum?: {\n        [key: string]: 'Success' | 'Warning' | 'Error';\n    };\n    dictionaryWithEnumFromDescription?: {\n        [key: string]: number;\n    };\n    arrayWithEnum?: Array<'Success' | 'Warning' | 'Error'>;\n    arrayWithDescription?: Array<number>;\n    /**\n     * This is a simple enum with strings\n     */\n    'foo_bar-enum'?: 'Success' | 'Warning' | 'Error' | 'ØÆÅ字符串';\n};\n\n/**\n * This is a model with one property containing a reference\n */\nexport type ModelWithReference = {\n    prop?: ModelWithProperties;\n};\n\n/**\n * This is a model with one property containing an array\n */\nexport type ModelWithArrayReadOnlyAndWriteOnly = {\n    prop?: Array<ModelWithReadOnlyAndWriteOnly>;\n    propWithFile?: Array<Blob | File>;\n    propWithNumber?: Array<number>;\n};\n\n/**\n * This is a model with one property containing an array\n */\nexport type ModelWithArray = {\n    prop?: Array<ModelWithString>;\n    propWithFile?: Array<Blob | File>;\n    propWithNumber?: Array<number>;\n};\n\n/**\n * This is a model with one property containing a dictionary\n */\nexport type ModelWithDictionary = {\n    prop?: {\n        [key: string]: string;\n    };\n};\n\n/**\n * This is a deprecated model with a deprecated property\n *\n * @deprecated\n */\nexport type DeprecatedModel = {\n    /**\n     * This is a deprecated property\n     *\n     * @deprecated\n     */\n    prop?: string;\n};\n\n/**\n * This is a model with one property containing a circular reference\n */\nexport type ModelWithCircularReference = {\n    prop?: ModelWithCircularReference;\n};\n\n/**\n * This is a model with one property with a 'one of' relationship\n */\nexport type CompositionWithOneOf = {\n    propA?: ModelWithString | ModelWithEnum | ModelWithArray | ModelWithDictionary;\n};\n\n/**\n * This is a model with one property with a 'one of' relationship where the options are not $ref\n */\nexport type CompositionWithOneOfAnonymous = {\n    propA?: {\n        propA?: string;\n    } | string | number;\n};\n\n/**\n * Circle\n */\nexport type ModelCircle = {\n    kind: string;\n    radius?: number;\n};\n\n/**\n * Square\n */\nexport type ModelSquare = {\n    kind: string;\n    sideLength?: number;\n};\n\n/**\n * This is a model with one property with a 'one of' relationship where the options are not $ref\n */\nexport type CompositionWithOneOfDiscriminator = ({\n    kind: 'circle';\n} & ModelCircle) | ({\n    kind: 'square';\n} & ModelSquare);\n\n/**\n * This is a model with one property with a 'any of' relationship\n */\nexport type CompositionWithAnyOf = {\n    propA?: ModelWithString | ModelWithEnum | ModelWithArray | ModelWithDictionary;\n};\n\n/**\n * This is a model with one property with a 'any of' relationship where the options are not $ref\n */\nexport type CompositionWithAnyOfAnonymous = {\n    propA?: {\n        propA?: string;\n    } | string | number;\n};\n\n/**\n * This is a model with nested 'any of' property with a type null\n */\nexport type CompositionWithNestedAnyAndTypeNull = {\n    propA?: Array<ModelWithDictionary | null> | Array<ModelWithArray | null>;\n};\n\nexport type _3eNum1Период = 'Bird' | 'Dog';\n\nexport type ConstValue = 'ConstValue';\n\n/**\n * This is a model with one property with a 'any of' relationship where the options are not $ref\n */\nexport type CompositionWithNestedAnyOfAndNull = {\n    /**\n     * Scopes\n     */\n    propA?: Array<_3eNum1Период | ConstValue> | null;\n};\n\n/**\n * This is a model with one property with a 'one of' relationship\n */\nexport type CompositionWithOneOfAndNullable = {\n    propA?: {\n        boolean?: boolean;\n    } | ModelWithEnum | ModelWithArray | ModelWithDictionary | null;\n};\n\n/**\n * This is a model that contains a simple dictionary within composition\n */\nexport type CompositionWithOneOfAndSimpleDictionary = {\n    propA?: boolean | {\n        [key: string]: number;\n    };\n};\n\n/**\n * This is a model that contains a dictionary of simple arrays within composition\n */\nexport type CompositionWithOneOfAndSimpleArrayDictionary = {\n    propA?: boolean | {\n        [key: string]: Array<boolean>;\n    };\n};\n\n/**\n * This is a model that contains a dictionary of complex arrays (composited) within composition\n */\nexport type CompositionWithOneOfAndComplexArrayDictionary = {\n    propA?: boolean | {\n        [key: string]: Array<number | string>;\n    };\n};\n\n/**\n * This is a model with one property with a 'all of' relationship\n */\nexport type CompositionWithAllOfAndNullable = {\n    propA?: ({\n        boolean?: boolean;\n    } & ModelWithEnum & ModelWithArray & ModelWithDictionary) | null;\n};\n\n/**\n * This is a model with one property with a 'any of' relationship\n */\nexport type CompositionWithAnyOfAndNullable = {\n    propA?: {\n        boolean?: boolean;\n    } | ModelWithEnum | ModelWithArray | ModelWithDictionary | null;\n};\n\n/**\n * This is a base model with two simple optional properties\n */\nexport type CompositionBaseModel = {\n    firstName?: string;\n    lastname?: string;\n};\n\n/**\n * This is a model that extends the base model\n */\nexport type CompositionExtendedModel = CompositionBaseModel & {\n    age: number;\n    firstName: string;\n    lastname: string;\n};\n\n/**\n * This is a model with one nested property\n */\nexport type ModelWithProperties = {\n    required: string;\n    readonly requiredAndReadOnly: string;\n    requiredAndNullable: string | null;\n    string?: string;\n    number?: number;\n    boolean?: boolean;\n    reference?: ModelWithString;\n    'property with space'?: string;\n    default?: string;\n    try?: string;\n    readonly '@namespace.string'?: string;\n    readonly '@namespace.integer'?: number;\n};\n\n/**\n * This is a model with one nested property\n */\nexport type ModelWithNestedProperties = {\n    readonly first: {\n        readonly second: {\n            readonly third: string | null;\n        } | null;\n    } | null;\n};\n\n/**\n * This is a model with duplicated properties\n */\nexport type ModelWithDuplicateProperties = {\n    prop?: ModelWithString;\n};\n\n/**\n * This is a model with ordered properties\n */\nexport type ModelWithOrderedProperties = {\n    zebra?: string;\n    apple?: string;\n    hawaii?: string;\n};\n\n/**\n * This is a model with duplicated imports\n */\nexport type ModelWithDuplicateImports = {\n    propA?: ModelWithString;\n    propB?: ModelWithString;\n    propC?: ModelWithString;\n};\n\n/**\n * This is a model that extends another model\n */\nexport type ModelThatExtends = ModelWithString & {\n    propExtendsA?: string;\n    propExtendsB?: ModelWithString;\n};\n\n/**\n * This is a model that extends another model\n */\nexport type ModelThatExtendsExtends = ModelWithString & ModelThatExtends & {\n    propExtendsC?: string;\n    propExtendsD?: ModelWithString;\n};\n\n/**\n * This is a model that contains a some patterns\n */\nexport type ModelWithPattern = {\n    key: string;\n    name: string;\n    readonly enabled?: boolean;\n    readonly modified?: string;\n    id?: string;\n    text?: string;\n    patternWithSingleQuotes?: string;\n    patternWithNewline?: string;\n    patternWithBacktick?: string;\n    patternWithUnicode?: string;\n};\n\nexport type File = {\n    /**\n     * Id\n     */\n    readonly id?: string;\n    /**\n     * Updated at\n     */\n    readonly updated_at?: string;\n    /**\n     * Created at\n     */\n    readonly created_at?: string;\n    /**\n     * Mime\n     */\n    mime: string;\n    /**\n     * File\n     */\n    readonly file?: string;\n};\n\nexport type Default = {\n    name?: string;\n};\n\nexport type Pageable = {\n    page?: number;\n    size?: number;\n    sort?: Array<string>;\n};\n\n/**\n * This is a free-form object without additionalProperties.\n */\nexport type FreeFormObjectWithoutAdditionalProperties = {\n    [key: string]: unknown;\n};\n\n/**\n * This is a free-form object with additionalProperties: true.\n */\nexport type FreeFormObjectWithAdditionalPropertiesEqTrue = {\n    [key: string]: unknown;\n};\n\n/**\n * This is a free-form object with additionalProperties: {}.\n */\nexport type FreeFormObjectWithAdditionalPropertiesEqEmptyObject = {\n    [key: string]: unknown;\n};\n\nexport type ModelWithConst = {\n    String?: 'String';\n    number?: 0;\n    null?: null;\n    withType?: 'Some string';\n};\n\n/**\n * This is a model with one property and additionalProperties: true\n */\nexport type ModelWithAdditionalPropertiesEqTrue = {\n    /**\n     * This is a simple string property\n     */\n    prop?: string;\n    [key: string]: unknown;\n};\n\nexport type NestedAnyOfArraysNullable = {\n    nullableArray?: Array<string | boolean> | null;\n};\n\nexport type CompositionWithOneOfAndProperties = ({\n    foo: SimpleParameter;\n} | {\n    bar: NonAsciiStringæøåÆøÅöôêÊ字符串;\n}) & {\n    baz: number | null;\n    qux: number;\n};\n\n/**\n * An object that can be null\n */\nexport type NullableObject = {\n    foo?: string;\n} | null;\n\n/**\n * Some % character\n */\nexport type CharactersInDescription = string;\n\nexport type ModelWithNullableObject = {\n    data?: NullableObject;\n};\n\n/**\n * An object with additional properties that can be null (anyOf ref + null)\n */\nexport type ModelWithAdditionalPropertiesRef = {\n    [key: string]: NullableObject | null;\n};\n\nexport type ModelWithOneOfEnum = {\n    foo: 'Bar';\n} | {\n    foo: 'Baz';\n} | {\n    foo: 'Qux';\n} | {\n    content: string;\n    foo: 'Quux';\n} | {\n    content: [\n        string,\n        string\n    ];\n    foo: 'Corge';\n};\n\nexport type ModelWithNestedArrayEnumsDataFoo = 'foo' | 'bar';\n\nexport type ModelWithNestedArrayEnumsDataBar = 'baz' | 'qux';\n\nexport type ModelWithNestedArrayEnumsData = {\n    foo?: Array<ModelWithNestedArrayEnumsDataFoo>;\n    bar?: Array<ModelWithNestedArrayEnumsDataBar>;\n};\n\nexport type ModelWithNestedArrayEnums = {\n    array_strings?: Array<string>;\n    data?: ModelWithNestedArrayEnumsData;\n};\n\nexport type ModelWithNestedCompositionEnums = {\n    foo?: ModelWithNestedArrayEnumsDataFoo;\n};\n\nexport type ModelWithReadOnlyAndWriteOnly = {\n    foo: string;\n    readonly bar: string;\n};\n\nexport type ModelWithConstantSizeArray = [\n    number,\n    number\n];\n\nexport type ModelWithAnyOfConstantSizeArray = [\n    number | string,\n    number | string,\n    number | string\n];\n\nexport type ModelWithPrefixItemsConstantSizeArray = [\n    ModelWithInteger,\n    number | string,\n    string\n];\n\nexport type ModelWithAnyOfConstantSizeArrayNullable = [\n    number | null | string,\n    number | null | string,\n    number | null | string\n];\n\nexport type ModelWithAnyOfConstantSizeArrayWithNSizeAndOptions = [\n    number | Import,\n    number | Import\n];\n\nexport type ModelWithAnyOfConstantSizeArrayAndIntersect = [\n    number & string,\n    number & string\n];\n\nexport type ModelWithNumericEnumUnion = {\n    /**\n     * Период\n     */\n    value?: -10 | -1 | 0 | 1 | 3 | 6 | 12;\n};\n\n/**\n * Some description with `back ticks`\n */\nexport type ModelWithBackticksInDescription = {\n    /**\n     * The template `that` should be used for parsing and importing the contents of the CSV file.\n     *\n     * <br/><p>There is one placeholder currently supported:<ul>     <li><b>${x}</b> - refers to the n-th column in the CSV file, e.g. ${1}, ${2}, ...)</li></ul><p>Example of a correct JSON template:</p>\n     * <pre>\n     * [\n     * {\n     * \"resourceType\": \"Asset\",\n     * \"identifier\": {\n     * \"name\": \"${1}\",\n     * \"domain\": {\n     * \"name\": \"${2}\",\n     * \"community\": {\n     * \"name\": \"Some Community\"\n     * }\n     * }\n     * },\n     * \"attributes\" : {\n     * \"00000000-0000-0000-0000-000000003115\" : [ {\n     * \"value\" : \"${3}\"\n     * } ],\n     * \"00000000-0000-0000-0000-000000000222\" : [ {\n     * \"value\" : \"${4}\"\n     * } ]\n     * }\n     * }\n     * ]\n     * </pre>\n     */\n    template?: string;\n};\n\nexport type ModelWithOneOfAndProperties = (SimpleParameter | NonAsciiStringæøåÆøÅöôêÊ字符串) & {\n    baz: number | null;\n    qux: number;\n};\n\n/**\n * Model used to test deduplication strategy (unused)\n */\nexport type ParameterSimpleParameterUnused = string;\n\n/**\n * Model used to test deduplication strategy\n */\nexport type PostServiceWithEmptyTagResponse = string;\n\n/**\n * Model used to test deduplication strategy\n */\nexport type PostServiceWithEmptyTagResponse2 = string;\n\n/**\n * Model used to test deduplication strategy\n */\nexport type DeleteFooData = string;\n\n/**\n * Model used to test deduplication strategy\n */\nexport type DeleteFooData2 = string;\n\n/**\n * Model with restricted keyword name\n */\nexport type Import = string;\n\nexport type SchemaWithFormRestrictedKeys = {\n    description?: string;\n    'x-enum-descriptions'?: string;\n    'x-enum-varnames'?: string;\n    'x-enumNames'?: string;\n    title?: string;\n    object?: {\n        description?: string;\n        'x-enum-descriptions'?: string;\n        'x-enum-varnames'?: string;\n        'x-enumNames'?: string;\n        title?: string;\n    };\n    array?: Array<{\n        description?: string;\n        'x-enum-descriptions'?: string;\n        'x-enum-varnames'?: string;\n        'x-enumNames'?: string;\n        title?: string;\n    }>;\n};\n\n/**\n * This schema was giving PascalCase transformations a hard time\n */\nexport type IoK8sApimachineryPkgApisMetaV1DeleteOptions = {\n    /**\n     * Must be fulfilled before a deletion is carried out. If not possible, a 409 Conflict status will be returned.\n     */\n    preconditions?: IoK8sApimachineryPkgApisMetaV1Preconditions;\n};\n\n/**\n * This schema was giving PascalCase transformations a hard time\n */\nexport type IoK8sApimachineryPkgApisMetaV1Preconditions = {\n    /**\n     * Specifies the target ResourceVersion\n     */\n    resourceVersion?: string;\n    /**\n     * Specifies the target UID.\n     */\n    uid?: string;\n};\n\nexport type AdditionalPropertiesUnknownIssue = {\n    [key: string]: string | number;\n};\n\nexport type AdditionalPropertiesUnknownIssue2 = {\n    [key: string]: string | number;\n};\n\nexport type AdditionalPropertiesUnknownIssue3 = string & {\n    entries: {\n        [key: string]: AdditionalPropertiesUnknownIssue;\n    };\n};\n\nexport type AdditionalPropertiesIntegerIssue = {\n    value: number;\n    [key: string]: number;\n};\n\nexport type OneOfAllOfIssue = ((ConstValue | GenericSchemaDuplicateIssue1SystemBoolean) & _3eNum1Период) | GenericSchemaDuplicateIssue1SystemString;\n\nexport type GenericSchemaDuplicateIssue1SystemBoolean = {\n    item?: boolean;\n    error?: string | null;\n    readonly hasError?: boolean;\n    data?: {\n        [key: string]: never;\n    };\n};\n\nexport type GenericSchemaDuplicateIssue1SystemString = {\n    item?: string | null;\n    error?: string | null;\n    readonly hasError?: boolean;\n};\n\nexport type ExternalSharedModel = {\n    id: string;\n    name?: string;\n};\n\n/**\n * This is a model with one property containing a reference\n */\nexport type ModelWithReferenceWritable = {\n    prop?: ModelWithPropertiesWritable;\n};\n\n/**\n * This is a model with one property containing an array\n */\nexport type ModelWithArrayReadOnlyAndWriteOnlyWritable = {\n    prop?: Array<ModelWithReadOnlyAndWriteOnlyWritable>;\n    propWithFile?: Array<Blob | File>;\n    propWithNumber?: Array<number>;\n};\n\n/**\n * This is a model with one nested property\n */\nexport type ModelWithPropertiesWritable = {\n    required: string;\n    requiredAndNullable: string | null;\n    string?: string;\n    number?: number;\n    boolean?: boolean;\n    reference?: ModelWithString;\n    'property with space'?: string;\n    default?: string;\n    try?: string;\n};\n\n/**\n * This is a model that contains a some patterns\n */\nexport type ModelWithPatternWritable = {\n    key: string;\n    name: string;\n    id?: string;\n    text?: string;\n    patternWithSingleQuotes?: string;\n    patternWithNewline?: string;\n    patternWithBacktick?: string;\n    patternWithUnicode?: string;\n};\n\nexport type FileWritable = {\n    /**\n     * Mime\n     */\n    mime: string;\n};\n\nexport type ModelWithReadOnlyAndWriteOnlyWritable = {\n    foo: string;\n    baz: string;\n};\n\nexport type ModelWithAnyOfConstantSizeArrayWithNSizeAndOptionsWritable = [\n    number | Import,\n    number | Import\n];\n\nexport type AdditionalPropertiesUnknownIssueWritable = {\n    [key: string]: string | number;\n};\n\nexport type OneOfAllOfIssueWritable = ((ConstValue | GenericSchemaDuplicateIssue1SystemBoolean) & _3eNum1Период) | GenericSchemaDuplicateIssue1SystemString;\n\nexport type GenericSchemaDuplicateIssue1SystemBooleanWritable = {\n    item?: boolean;\n    error?: string | null;\n    data?: {\n        [key: string]: never;\n    };\n};\n\nexport type GenericSchemaDuplicateIssue1SystemStringWritable = {\n    item?: string | null;\n    error?: string | null;\n};\n\n/**\n * This is a reusable parameter\n */\nexport type SimpleParameter = string;\n\n/**\n * Parameter with illegal characters\n */\nexport type XFooBar = ModelWithString;\n\n/**\n * A reusable request body\n */\nexport type SimpleRequestBody = ModelWithString;\n\n/**\n * A reusable request body\n */\nexport type SimpleFormData = ModelWithString;\n\nexport type ExportData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no+tag';\n};\n\nexport type PatchApiVbyApiVersionNoTagData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no+tag';\n};\n\nexport type PatchApiVbyApiVersionNoTagResponses = {\n    /**\n     * OK\n     */\n    default: unknown;\n};\n\nexport type ImportData = {\n    body: ModelWithReadOnlyAndWriteOnlyWritable | ModelWithArrayReadOnlyAndWriteOnlyWritable;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no+tag';\n};\n\nexport type ImportResponses = {\n    /**\n     * Success\n     */\n    200: ModelFromZendesk;\n    /**\n     * Default success response\n     */\n    default: ModelWithReadOnlyAndWriteOnly;\n};\n\nexport type ImportResponse = ImportResponses[keyof ImportResponses];\n\nexport type FooWowData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no+tag';\n};\n\nexport type FooWowResponses = {\n    /**\n     * OK\n     */\n    default: unknown;\n};\n\nexport type ApiVVersionODataControllerCountData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple/$count';\n};\n\nexport type ApiVVersionODataControllerCountResponses = {\n    /**\n     * Success\n     */\n    200: ModelFromZendesk;\n};\n\nexport type ApiVVersionODataControllerCountResponse = ApiVVersionODataControllerCountResponses[keyof ApiVVersionODataControllerCountResponses];\n\nexport type GetApiVbyApiVersionSimpleOperationData = {\n    body?: never;\n    path: {\n        /**\n         * foo in method\n         */\n        foo_param: string;\n    };\n    query?: never;\n    url: '/api/v{api-version}/simple:operation';\n};\n\nexport type GetApiVbyApiVersionSimpleOperationErrors = {\n    /**\n     * Default error response\n     */\n    default: ModelWithBoolean;\n};\n\nexport type GetApiVbyApiVersionSimpleOperationError = GetApiVbyApiVersionSimpleOperationErrors[keyof GetApiVbyApiVersionSimpleOperationErrors];\n\nexport type GetApiVbyApiVersionSimpleOperationResponses = {\n    /**\n     * Response is a simple number\n     */\n    200: number;\n};\n\nexport type GetApiVbyApiVersionSimpleOperationResponse = GetApiVbyApiVersionSimpleOperationResponses[keyof GetApiVbyApiVersionSimpleOperationResponses];\n\nexport type DeleteCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type GetCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type HeadCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type OptionsCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type PatchCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type PostCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type PutCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type DeleteFooData3 = {\n    body?: never;\n    headers: {\n        /**\n         * Parameter with illegal characters\n         */\n        'x-Foo-Bar': ModelWithString;\n    };\n    path: {\n        /**\n         * foo in method\n         */\n        foo_param: string;\n        /**\n         * bar in method\n         */\n        BarParam: string;\n    };\n    query?: never;\n    url: '/api/v{api-version}/foo/{foo_param}/bar/{BarParam}';\n};\n\nexport type CallWithDescriptionsData = {\n    body?: never;\n    path?: never;\n    query?: {\n        /**\n         * Testing multiline comments in string: First line\n         * Second line\n         *\n         * Fourth line\n         */\n        parameterWithBreaks?: string;\n        /**\n         * Testing backticks in string: `backticks` and ```multiple backticks``` should work\n         */\n        parameterWithBackticks?: string;\n        /**\n         * Testing slashes in string: \\backwards\\\\\\ and /forwards/// should work\n         */\n        parameterWithSlashes?: string;\n        /**\n         * Testing expression placeholders in string: ${expression} should work\n         */\n        parameterWithExpressionPlaceholders?: string;\n        /**\n         * Testing quotes in string: 'single quote''' and \"double quotes\"\"\" should work\n         */\n        parameterWithQuotes?: string;\n        /**\n         * Testing reserved characters in string: * inline * and ** inline ** should work\n         */\n        parameterWithReservedCharacters?: string;\n    };\n    url: '/api/v{api-version}/descriptions';\n};\n\nexport type DeprecatedCallData = {\n    body?: never;\n    headers: {\n        /**\n         * This parameter is deprecated\n         *\n         * @deprecated\n         */\n        parameter: DeprecatedModel | null;\n    };\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/parameters/deprecated';\n};\n\nexport type CallWithParametersData = {\n    /**\n     * This is the parameter that goes into the body\n     */\n    body: {\n        [key: string]: unknown;\n    } | null;\n    headers: {\n        /**\n         * This is the parameter that goes into the header\n         */\n        parameterHeader: string | null;\n    };\n    path: {\n        /**\n         * This is the parameter that goes into the path\n         */\n        parameterPath: string | null;\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string | null;\n    };\n    query: {\n        foo_ref_enum?: ModelWithNestedArrayEnumsDataFoo;\n        foo_all_of_enum: ModelWithNestedArrayEnumsDataFoo;\n        /**\n         * This is the parameter that goes into the query params\n         */\n        cursor: string | null;\n    };\n    url: '/api/v{api-version}/parameters/{parameterPath}';\n};\n\nexport type CallWithWeirdParameterNamesData = {\n    /**\n     * This is the parameter that goes into the body\n     */\n    body: ModelWithString | null;\n    headers: {\n        /**\n         * This is the parameter that goes into the request header\n         */\n        'parameter.header': string | null;\n    };\n    path: {\n        /**\n         * This is the parameter that goes into the path\n         */\n        'parameter.path.1'?: string;\n        /**\n         * This is the parameter that goes into the path\n         */\n        'parameter-path-2'?: string;\n        /**\n         * This is the parameter that goes into the path\n         */\n        'PARAMETER-PATH-3'?: string;\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string | null;\n    };\n    query: {\n        /**\n         * This is the parameter with a reserved keyword\n         */\n        default?: string;\n        /**\n         * This is the parameter that goes into the request query params\n         */\n        'parameter-query': string | null;\n    };\n    url: '/api/v{api-version}/parameters/{parameter.path.1}/{parameter-path-2}/{PARAMETER-PATH-3}';\n};\n\nexport type GetCallWithOptionalParamData = {\n    /**\n     * This is a required parameter\n     */\n    body: ModelWithOneOfEnum;\n    path?: never;\n    query?: {\n        /**\n         * This is an optional parameter\n         */\n        page?: number;\n    };\n    url: '/api/v{api-version}/parameters';\n};\n\nexport type PostCallWithOptionalParamData = {\n    /**\n     * This is an optional parameter\n     */\n    body?: {\n        offset?: number | null;\n    };\n    path?: never;\n    query: {\n        /**\n         * This is a required parameter\n         */\n        parameter: Pageable;\n    };\n    url: '/api/v{api-version}/parameters';\n};\n\nexport type PostCallWithOptionalParamResponses = {\n    /**\n     * Response is a simple number\n     */\n    200: number;\n    /**\n     * Success\n     */\n    204: void;\n};\n\nexport type PostCallWithOptionalParamResponse = PostCallWithOptionalParamResponses[keyof PostCallWithOptionalParamResponses];\n\nexport type PostApiVbyApiVersionRequestBodyData = {\n    /**\n     * A reusable request body\n     */\n    body?: SimpleRequestBody;\n    path?: never;\n    query?: {\n        /**\n         * This is a reusable parameter\n         */\n        parameter?: string;\n    };\n    url: '/api/v{api-version}/requestBody';\n};\n\nexport type PostApiVbyApiVersionFormDataData = {\n    /**\n     * A reusable request body\n     */\n    body?: SimpleFormData;\n    path?: never;\n    query?: {\n        /**\n         * This is a reusable parameter\n         */\n        parameter?: string;\n    };\n    url: '/api/v{api-version}/formData';\n};\n\nexport type CallWithDefaultParametersData = {\n    body?: never;\n    path?: never;\n    query?: {\n        /**\n         * This is a simple string with default value\n         */\n        parameterString?: string | null;\n        /**\n         * This is a simple number with default value\n         */\n        parameterNumber?: number | null;\n        /**\n         * This is a simple boolean with default value\n         */\n        parameterBoolean?: boolean | null;\n        /**\n         * This is a simple enum with default value\n         */\n        parameterEnum?: 'Success' | 'Warning' | 'Error';\n        /**\n         * This is a simple model with default value\n         */\n        parameterModel?: ModelWithString | null;\n    };\n    url: '/api/v{api-version}/defaults';\n};\n\nexport type CallWithDefaultOptionalParametersData = {\n    body?: never;\n    path?: never;\n    query?: {\n        /**\n         * This is a simple string that is optional with default value\n         */\n        parameterString?: string;\n        /**\n         * This is a simple number that is optional with default value\n         */\n        parameterNumber?: number;\n        /**\n         * This is a simple boolean that is optional with default value\n         */\n        parameterBoolean?: boolean;\n        /**\n         * This is a simple enum that is optional with default value\n         */\n        parameterEnum?: 'Success' | 'Warning' | 'Error';\n        /**\n         * This is a simple model that is optional with default value\n         */\n        parameterModel?: ModelWithString;\n    };\n    url: '/api/v{api-version}/defaults';\n};\n\nexport type CallToTestOrderOfParamsData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * This is a optional string with default\n         */\n        parameterOptionalStringWithDefault?: string;\n        /**\n         * This is a optional string with empty default\n         */\n        parameterOptionalStringWithEmptyDefault?: string;\n        /**\n         * This is a optional string with no default\n         */\n        parameterOptionalStringWithNoDefault?: string;\n        /**\n         * This is a string with default\n         */\n        parameterStringWithDefault: string;\n        /**\n         * This is a string with empty default\n         */\n        parameterStringWithEmptyDefault: string;\n        /**\n         * This is a string with no default\n         */\n        parameterStringWithNoDefault: string;\n        /**\n         * This is a string that can be null with no default\n         */\n        parameterStringNullableWithNoDefault?: string | null;\n        /**\n         * This is a string that can be null with default\n         */\n        parameterStringNullableWithDefault?: string | null;\n    };\n    url: '/api/v{api-version}/defaults';\n};\n\nexport type DuplicateNameData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/duplicate';\n};\n\nexport type DuplicateName2Data = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/duplicate';\n};\n\nexport type DuplicateName3Data = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/duplicate';\n};\n\nexport type DuplicateName4Data = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/duplicate';\n};\n\nexport type CallWithNoContentResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no-content';\n};\n\nexport type CallWithNoContentResponseResponses = {\n    /**\n     * Success\n     */\n    204: void;\n};\n\nexport type CallWithNoContentResponseResponse = CallWithNoContentResponseResponses[keyof CallWithNoContentResponseResponses];\n\nexport type CallWithResponseAndNoContentResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multiple-tags/response-and-no-content';\n};\n\nexport type CallWithResponseAndNoContentResponseResponses = {\n    /**\n     * Response is a simple number\n     */\n    200: number;\n    /**\n     * Success\n     */\n    204: void;\n};\n\nexport type CallWithResponseAndNoContentResponseResponse = CallWithResponseAndNoContentResponseResponses[keyof CallWithResponseAndNoContentResponseResponses];\n\nexport type DummyAData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multiple-tags/a';\n};\n\nexport type DummyAResponses = {\n    200: _400;\n};\n\nexport type DummyAResponse = DummyAResponses[keyof DummyAResponses];\n\nexport type DummyBData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multiple-tags/b';\n};\n\nexport type DummyBResponses = {\n    /**\n     * Success\n     */\n    204: void;\n};\n\nexport type DummyBResponse = DummyBResponses[keyof DummyBResponses];\n\nexport type CallWithResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/response';\n};\n\nexport type CallWithResponseResponses = {\n    default: Import;\n};\n\nexport type CallWithResponseResponse = CallWithResponseResponses[keyof CallWithResponseResponses];\n\nexport type CallWithDuplicateResponsesData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/response';\n};\n\nexport type CallWithDuplicateResponsesErrors = {\n    /**\n     * Message for 500 error\n     */\n    500: ModelWithStringError;\n    /**\n     * Message for 501 error\n     */\n    501: ModelWithStringError;\n    /**\n     * Message for 502 error\n     */\n    502: ModelWithStringError;\n    /**\n     * Message for 4XX errors\n     */\n    '4XX': DictionaryWithArray;\n    /**\n     * Default error response\n     */\n    default: ModelWithBoolean;\n};\n\nexport type CallWithDuplicateResponsesError = CallWithDuplicateResponsesErrors[keyof CallWithDuplicateResponsesErrors];\n\nexport type CallWithDuplicateResponsesResponses = {\n    /**\n     * Message for 200 response\n     */\n    200: ModelWithBoolean & ModelWithInteger;\n    /**\n     * Message for 201 response\n     */\n    201: ModelWithString;\n    /**\n     * Message for 202 response\n     */\n    202: ModelWithString;\n};\n\nexport type CallWithDuplicateResponsesResponse = CallWithDuplicateResponsesResponses[keyof CallWithDuplicateResponsesResponses];\n\nexport type CallWithResponsesData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/response';\n};\n\nexport type CallWithResponsesErrors = {\n    /**\n     * Message for 500 error\n     */\n    500: ModelWithStringError;\n    /**\n     * Message for 501 error\n     */\n    501: ModelWithStringError;\n    /**\n     * Message for 502 error\n     */\n    502: ModelWithStringError;\n    /**\n     * Message for default response\n     */\n    default: ModelWithStringError;\n};\n\nexport type CallWithResponsesError = CallWithResponsesErrors[keyof CallWithResponsesErrors];\n\nexport type CallWithResponsesResponses = {\n    /**\n     * Message for 200 response\n     */\n    200: {\n        readonly '@namespace.string'?: string;\n        readonly '@namespace.integer'?: number;\n        readonly value?: Array<ModelWithString>;\n    };\n    /**\n     * Message for 201 response\n     */\n    201: ModelThatExtends;\n    /**\n     * Message for 202 response\n     */\n    202: ModelThatExtendsExtends;\n};\n\nexport type CallWithResponsesResponse = CallWithResponsesResponses[keyof CallWithResponsesResponses];\n\nexport type CollectionFormatData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * This is an array parameter that is sent as csv format (comma-separated values)\n         */\n        parameterArrayCSV: Array<string> | null;\n        /**\n         * This is an array parameter that is sent as ssv format (space-separated values)\n         */\n        parameterArraySSV: Array<string> | null;\n        /**\n         * This is an array parameter that is sent as tsv format (tab-separated values)\n         */\n        parameterArrayTSV: Array<string> | null;\n        /**\n         * This is an array parameter that is sent as pipes format (pipe-separated values)\n         */\n        parameterArrayPipes: Array<string> | null;\n        /**\n         * This is an array parameter that is sent as multi format (multiple parameter instances)\n         */\n        parameterArrayMulti: Array<string> | null;\n    };\n    url: '/api/v{api-version}/collectionFormat';\n};\n\nexport type TypesData = {\n    body?: never;\n    path?: {\n        /**\n         * This is a number parameter\n         */\n        id?: number;\n    };\n    query: {\n        /**\n         * This is a number parameter\n         */\n        parameterNumber: number;\n        /**\n         * This is a string parameter\n         */\n        parameterString: string | null;\n        /**\n         * This is a boolean parameter\n         */\n        parameterBoolean: boolean | null;\n        /**\n         * This is an object parameter\n         */\n        parameterObject: {\n            [key: string]: unknown;\n        } | null;\n        /**\n         * This is an array parameter\n         */\n        parameterArray: Array<string> | null;\n        /**\n         * This is a dictionary parameter\n         */\n        parameterDictionary: {\n            [key: string]: unknown;\n        } | null;\n        /**\n         * This is an enum parameter\n         */\n        parameterEnum: 'Success' | 'Warning' | 'Error' | null;\n    };\n    url: '/api/v{api-version}/types';\n};\n\nexport type TypesResponses = {\n    /**\n     * Response is a simple number\n     */\n    200: number;\n    /**\n     * Response is a simple string\n     */\n    201: string;\n    /**\n     * Response is a simple boolean\n     */\n    202: boolean;\n    /**\n     * Response is a simple object\n     */\n    203: {\n        [key: string]: unknown;\n    };\n};\n\nexport type TypesResponse = TypesResponses[keyof TypesResponses];\n\nexport type UploadFileData = {\n    body: Blob | File;\n    path: {\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string | null;\n    };\n    query?: never;\n    url: '/api/v{api-version}/upload';\n};\n\nexport type UploadFileResponses = {\n    200: boolean;\n};\n\nexport type UploadFileResponse = UploadFileResponses[keyof UploadFileResponses];\n\nexport type FileResponseData = {\n    body?: never;\n    path: {\n        id: string;\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string;\n    };\n    query?: never;\n    url: '/api/v{api-version}/file/{id}';\n};\n\nexport type FileResponseResponses = {\n    /**\n     * Success\n     */\n    200: Blob | File;\n};\n\nexport type FileResponseResponse = FileResponseResponses[keyof FileResponseResponses];\n\nexport type ComplexTypesData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * Parameter containing object\n         */\n        parameterObject: {\n            first?: {\n                second?: {\n                    third?: string;\n                };\n            };\n        };\n        /**\n         * Parameter containing reference\n         */\n        parameterReference: ModelWithString;\n    };\n    url: '/api/v{api-version}/complex';\n};\n\nexport type ComplexTypesErrors = {\n    /**\n     * 400 `server` error\n     */\n    400: unknown;\n    /**\n     * 500 server error\n     */\n    500: unknown;\n};\n\nexport type ComplexTypesResponses = {\n    /**\n     * Successful response\n     */\n    200: Array<ModelWithString>;\n};\n\nexport type ComplexTypesResponse = ComplexTypesResponses[keyof ComplexTypesResponses];\n\nexport type MultipartResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multipart';\n};\n\nexport type MultipartResponseResponses = {\n    /**\n     * OK\n     */\n    200: {\n        file?: Blob | File;\n        metadata?: {\n            foo?: string;\n            bar?: string;\n        };\n    };\n};\n\nexport type MultipartResponseResponse = MultipartResponseResponses[keyof MultipartResponseResponses];\n\nexport type MultipartRequestData = {\n    body?: {\n        content?: Blob | File;\n        data?: ModelWithString | null;\n    };\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multipart';\n};\n\nexport type ComplexParamsData = {\n    body?: {\n        readonly key: string | null;\n        name: string | null;\n        enabled?: boolean;\n        type: 'Monkey' | 'Horse' | 'Bird';\n        listOfModels?: Array<ModelWithString> | null;\n        listOfStrings?: Array<string> | null;\n        parameters: ModelWithString | ModelWithEnum | ModelWithArray | ModelWithDictionary;\n        readonly user?: {\n            readonly id?: number;\n            readonly name?: string | null;\n        };\n    };\n    path: {\n        id: number;\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string;\n    };\n    query?: never;\n    url: '/api/v{api-version}/complex/{id}';\n};\n\nexport type ComplexParamsResponses = {\n    /**\n     * Success\n     */\n    200: ModelWithString;\n};\n\nexport type ComplexParamsResponse = ComplexParamsResponses[keyof ComplexParamsResponses];\n\nexport type CallWithResultFromHeaderData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/header';\n};\n\nexport type CallWithResultFromHeaderErrors = {\n    /**\n     * 400 server error\n     */\n    400: unknown;\n    /**\n     * 500 server error\n     */\n    500: unknown;\n};\n\nexport type CallWithResultFromHeaderResponses = {\n    /**\n     * Successful response\n     */\n    200: unknown;\n};\n\nexport type TestErrorCodeData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * Status code to return\n         */\n        status: number;\n    };\n    url: '/api/v{api-version}/error';\n};\n\nexport type TestErrorCodeErrors = {\n    /**\n     * Custom message: Internal Server Error\n     */\n    500: unknown;\n    /**\n     * Custom message: Not Implemented\n     */\n    501: unknown;\n    /**\n     * Custom message: Bad Gateway\n     */\n    502: unknown;\n    /**\n     * Custom message: Service Unavailable\n     */\n    503: unknown;\n};\n\nexport type TestErrorCodeResponses = {\n    /**\n     * Custom message: Successful response\n     */\n    200: unknown;\n};\n\nexport type NonAsciiæøåÆøÅöôêÊ字符串Data = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * Dummy input param\n         */\n        nonAsciiParamæøåÆØÅöôêÊ: number;\n    };\n    url: '/api/v{api-version}/non-ascii-æøåÆØÅöôêÊ字符串';\n};\n\nexport type NonAsciiæøåÆøÅöôêÊ字符串Responses = {\n    /**\n     * Successful response\n     */\n    200: Array<NonAsciiStringæøåÆøÅöôêÊ字符串>;\n};\n\nexport type NonAsciiæøåÆøÅöôêÊ字符串Response = NonAsciiæøåÆøÅöôêÊ字符串Responses[keyof NonAsciiæøåÆøÅöôêÊ字符串Responses];\n\nexport type PutWithFormUrlEncodedData = {\n    body: ArrayWithStrings;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/non-ascii-æøåÆØÅöôêÊ字符串';\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-ky/sdk-client-optional/client/client.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { HTTPError, Options as KyOptions } from 'ky';\nimport ky from 'ky';\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, RetryOptions } from './types.gen';\nimport type { Middleware } from './utils.gen';\nimport {\n  buildUrl,\n  createConfig,\n  createInterceptors,\n  getParseAs,\n  mergeConfigs,\n  mergeHeaders,\n  setAuthParams,\n} from './utils.gen';\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 (options: RequestOptions) => {\n    const opts = {\n      ..._config,\n      ...options,\n      headers: mergeHeaders(_config.headers, options.headers),\n      ky: options.ky ?? _config.ky ?? ky,\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    if (opts.body === undefined || opts.serializedBody === '') {\n      opts.headers.delete('Content-Type');\n    }\n\n    const url = buildUrl(opts);\n\n    return { opts, url };\n  };\n\n  const parseErrorResponse = async (\n    response: Response,\n    request: Request,\n    opts: ResolvedRequestOptions,\n    interceptorsMiddleware: Middleware<Request, Response, unknown, ResolvedRequestOptions>,\n  ) => {\n    const result = {\n      request,\n      response,\n    };\n\n    const textError = await response.text();\n    let jsonError: unknown;\n\n    try {\n      jsonError = JSON.parse(textError);\n    } catch {\n      jsonError = undefined;\n    }\n\n    const error = jsonError ?? textError;\n    let finalError = error;\n\n    for (const fn of interceptorsMiddleware.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    return opts.responseStyle === 'data'\n      ? undefined\n      : {\n          error: finalError,\n          ...result,\n        };\n  };\n\n  const request: Client['request'] = async (options) => {\n    // @ts-expect-error\n    const { opts, url } = await beforeRequest(options);\n\n    const kyInstance = opts.ky!;\n\n    const validBody = getValidRequestBody(opts);\n\n    const kyOptions: KyOptions = {\n      body: validBody as BodyInit,\n      cache: opts.cache,\n      credentials: opts.credentials,\n      headers: opts.headers,\n      integrity: opts.integrity,\n      keepalive: opts.keepalive,\n      method: opts.method as KyOptions['method'],\n      mode: opts.mode,\n      redirect: 'follow',\n      referrer: opts.referrer,\n      referrerPolicy: opts.referrerPolicy,\n      signal: opts.signal,\n      throwHttpErrors: opts.throwOnError ?? false,\n      timeout: opts.timeout,\n      ...opts.kyOptions,\n    };\n\n    if (opts.retry && typeof opts.retry === 'object') {\n      const retryOpts = opts.retry as RetryOptions;\n      kyOptions.retry = {\n        limit: retryOpts.limit ?? 2,\n        methods: retryOpts.methods as Array<\n          'get' | 'post' | 'put' | 'patch' | 'head' | 'delete' | 'options' | 'trace'\n        >,\n        statusCodes: retryOpts.statusCodes,\n      };\n    }\n\n    let request = new Request(url, {\n      body: kyOptions.body as BodyInit,\n      headers: kyOptions.headers as HeadersInit,\n      method: kyOptions.method,\n    });\n\n    for (const fn of interceptors.request.fns) {\n      if (fn) {\n        request = await fn(request, opts);\n      }\n    }\n\n    let response: Response;\n\n    try {\n      response = await kyInstance(request, kyOptions);\n    } catch (error) {\n      if (error && typeof error === 'object' && 'response' in error) {\n        const httpError = error as HTTPError;\n        response = httpError.response;\n\n        for (const fn of interceptors.response.fns) {\n          if (fn) {\n            response = await fn(response, request, opts);\n          }\n        }\n\n        return parseErrorResponse(response, request, opts, interceptors);\n      }\n\n      throw error;\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    return parseErrorResponse(response, request, opts, interceptors);\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      fetch: globalThis.fetch,\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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-ky/sdk-client-optional/client/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type { Auth } from '../core/auth.gen';\nexport type { QuerySerializerOptions } from '../core/bodySerializer.gen';\nexport {\n  formDataBodySerializer,\n  jsonBodySerializer,\n  urlSearchParamsBodySerializer,\n} from '../core/bodySerializer.gen';\nexport { buildClientParams } from '../core/params.gen';\nexport { serializeQueryKeyValue } from '../core/queryKeySerializer.gen';\nexport { createClient } from './client.gen';\nexport type {\n  Client,\n  ClientOptions,\n  Config,\n  CreateClientConfig,\n  Options,\n  RequestOptions,\n  RequestResult,\n  ResolvedRequestOptions,\n  ResponseStyle,\n  RetryOptions,\n  TDataShape,\n} from './types.gen';\nexport { createConfig, mergeHeaders } from './utils.gen';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-ky/sdk-client-optional/client/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { Options as KyOptions } from 'ky';\nimport type ky from 'ky';\n\nimport type { Auth } from '../core/auth.gen';\nimport type {\n  ServerSentEventsOptions,\n  ServerSentEventsResult,\n} from '../core/serverSentEvents.gen';\nimport type { Client as CoreClient, Config as CoreConfig } from '../core/types.gen';\nimport type { Middleware } from './utils.gen';\n\nexport type ResponseStyle = 'data' | 'fields';\n\nexport interface RetryOptions {\n  /**\n   * Maximum number of retry attempts\n   *\n   * @default 2\n   */\n  limit?: number;\n  /**\n   * HTTP methods to retry\n   *\n   * @default ['get', 'put', 'head', 'delete', 'options', 'trace']\n   */\n  methods?: Array<'get' | 'post' | 'put' | 'delete' | 'patch' | 'head' | 'options' | 'trace'>;\n  /**\n   * HTTP status codes to retry\n   *\n   * @default [408, 413, 429, 500, 502, 503, 504]\n   */\n  statusCodes?: number[];\n}\n\nexport interface Config<T extends ClientOptions = ClientOptions>\n  extends\n    Omit<KyOptions, 'body' | 'headers' | 'method' | 'prefixUrl' | 'retry' | 'throwHttpErrors'>,\n    CoreConfig {\n  /**\n   * Base URL for all requests made by this client.\n   */\n  baseUrl?: T['baseUrl'];\n  /**\n   * Ky instance to use. You can use this option to provide a custom\n   * ky instance.\n   */\n  ky?: typeof ky;\n  /**\n   * Additional ky-specific options that will be passed directly to ky.\n   * This allows you to use any ky option not explicitly exposed in the config.\n   */\n  kyOptions?: Omit<KyOptions, 'method' | 'prefixUrl'>;\n  /**\n   * Return the response data parsed in a specified format. By default, `auto`\n   * will infer the appropriate method from the `Content-Type` response header.\n   * You can override this behavior with any of the {@link Body} methods.\n   * Select `stream` if you don't want to parse response data at all.\n   *\n   * @default 'auto'\n   */\n  parseAs?: 'arrayBuffer' | 'auto' | 'blob' | 'formData' | 'json' | 'stream' | 'text';\n  /**\n   * Should we return only data or multiple fields (data, error, response, etc.)?\n   *\n   * @default 'fields'\n   */\n  responseStyle?: ResponseStyle;\n  /**\n   * Retry configuration\n   */\n  retry?: RetryOptions;\n  /**\n   * Throw an error instead of returning it in the response?\n   *\n   * @default false\n   */\n  throwOnError?: T['throwOnError'];\n  /**\n   * Request timeout in milliseconds\n   *\n   * @default 10000\n   */\n  timeout?: number;\n}\n\nexport interface RequestOptions<\n  TData = unknown,\n  TResponseStyle extends ResponseStyle = 'fields',\n  ThrowOnError extends boolean = boolean,\n  Url extends string = string,\n>\n  extends\n    Config<{\n      responseStyle: TResponseStyle;\n      throwOnError: ThrowOnError;\n    }>,\n    Pick<\n      ServerSentEventsOptions<TData>,\n      | 'onRequest'\n      | 'onSseError'\n      | 'onSseEvent'\n      | 'sseDefaultRetryDelay'\n      | 'sseMaxRetryAttempts'\n      | 'sseMaxRetryDelay'\n    > {\n  /**\n   * Any body that you want to add to your request.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/fetch#body}\n   */\n  body?: unknown;\n  path?: Record<string, unknown>;\n  query?: Record<string, unknown>;\n  /**\n   * Security mechanism(s) to use for the request.\n   */\n  security?: ReadonlyArray<Auth>;\n  url: Url;\n}\n\nexport interface ResolvedRequestOptions<\n  TResponseStyle extends ResponseStyle = 'fields',\n  ThrowOnError extends boolean = boolean,\n  Url extends string = string,\n> extends RequestOptions<unknown, TResponseStyle, ThrowOnError, Url> {\n  serializedBody?: string;\n}\n\nexport type RequestResult<\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = boolean,\n  TResponseStyle extends ResponseStyle = 'fields',\n> = ThrowOnError extends true\n  ? Promise<\n      TResponseStyle extends 'data'\n        ? TData extends Record<string, unknown>\n          ? TData[keyof TData]\n          : TData\n        : {\n            data: TData extends Record<string, unknown> ? TData[keyof TData] : TData;\n            request: Request;\n            response: Response;\n          }\n    >\n  : Promise<\n      TResponseStyle extends 'data'\n        ? (TData extends Record<string, unknown> ? TData[keyof TData] : TData) | undefined\n        : (\n            | {\n                data: TData extends Record<string, unknown> ? TData[keyof TData] : TData;\n                error: undefined;\n              }\n            | {\n                data: undefined;\n                error: TError extends Record<string, unknown> ? TError[keyof TError] : TError;\n              }\n          ) & {\n            request: Request;\n            response: Response;\n          }\n    >;\n\nexport interface ClientOptions {\n  baseUrl?: string;\n  responseStyle?: ResponseStyle;\n  throwOnError?: boolean;\n}\n\ntype MethodFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'>,\n) => RequestResult<TData, TError, ThrowOnError, TResponseStyle>;\n\ntype SseFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'>,\n) => Promise<ServerSentEventsResult<TData, TError>>;\n\ntype RequestFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'> &\n    Pick<Required<RequestOptions<TData, TResponseStyle, ThrowOnError>>, 'method'>,\n) => RequestResult<TData, TError, ThrowOnError, TResponseStyle>;\n\ntype BuildUrlFn = <\n  TData extends {\n    body?: unknown;\n    path?: Record<string, unknown>;\n    query?: Record<string, unknown>;\n    url: string;\n  },\n>(\n  options: TData & Options<TData>,\n) => string;\n\nexport type Client = CoreClient<RequestFn, Config, MethodFn, BuildUrlFn, SseFn> & {\n  interceptors: Middleware<Request, Response, unknown, ResolvedRequestOptions>;\n};\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 = ClientOptions> = (\n  override?: Config<ClientOptions & T>,\n) => Config<Required<ClientOptions> & T>;\n\nexport interface TDataShape {\n  body?: unknown;\n  headers?: unknown;\n  path?: unknown;\n  query?: unknown;\n  url: string;\n}\n\ntype OmitKeys<T, K> = Pick<T, Exclude<keyof T, K>>;\n\nexport type Options<\n  TData extends TDataShape = TDataShape,\n  ThrowOnError extends boolean = boolean,\n  TResponse = unknown,\n  TResponseStyle extends ResponseStyle = 'fields',\n> = OmitKeys<\n  RequestOptions<TResponse, TResponseStyle, ThrowOnError>,\n  'body' | 'path' | 'query' | 'url'\n> &\n  ([TData] extends [never] ? unknown : Omit<TData, 'url'>);\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-ky/sdk-client-optional/client/utils.gen.ts",
    "content": "// 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    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        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  throwOnError: false,\n  timeout: 10000,\n  ...override,\n});\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-ky/sdk-client-optional/client.gen.ts",
    "content": "// 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: 'http://localhost:3000/base' }));\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-ky/sdk-client-optional/core/auth.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-ky/sdk-client-optional/core/bodySerializer.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-ky/sdk-client-optional/core/params.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-ky/sdk-client-optional/core/pathSerializer.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-ky/sdk-client-optional/core/queryKeySerializer.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\n/**\n * JSON-friendly union that mirrors what Pinia Colada can hash.\n */\nexport type JsonValue =\n  | null\n  | string\n  | number\n  | boolean\n  | JsonValue[]\n  | { [key: string]: JsonValue };\n\n/**\n * Replacer that converts non-JSON values (bigint, Date, etc.) to safe substitutes.\n */\nexport const queryKeyJsonReplacer = (_key: string, value: unknown) => {\n  if (value === undefined || typeof value === 'function' || typeof value === 'symbol') {\n    return undefined;\n  }\n  if (typeof value === 'bigint') {\n    return value.toString();\n  }\n  if (value instanceof Date) {\n    return value.toISOString();\n  }\n  return value;\n};\n\n/**\n * Safely stringifies a value and parses it back into a JsonValue.\n */\nexport const stringifyToJsonValue = (input: unknown): JsonValue | undefined => {\n  try {\n    const json = JSON.stringify(input, queryKeyJsonReplacer);\n    if (json === undefined) {\n      return undefined;\n    }\n    return JSON.parse(json) as JsonValue;\n  } catch {\n    return undefined;\n  }\n};\n\n/**\n * Detects plain objects (including objects with a null prototype).\n */\nconst isPlainObject = (value: unknown): value is Record<string, unknown> => {\n  if (value === null || typeof value !== 'object') {\n    return false;\n  }\n  const prototype = Object.getPrototypeOf(value as object);\n  return prototype === Object.prototype || prototype === null;\n};\n\n/**\n * Turns URLSearchParams into a sorted JSON object for deterministic keys.\n */\nconst serializeSearchParams = (params: URLSearchParams): JsonValue => {\n  const entries = Array.from(params.entries()).sort(([a], [b]) => a.localeCompare(b));\n  const result: Record<string, JsonValue> = {};\n\n  for (const [key, value] of entries) {\n    const existing = result[key];\n    if (existing === undefined) {\n      result[key] = value;\n      continue;\n    }\n\n    if (Array.isArray(existing)) {\n      (existing as string[]).push(value);\n    } else {\n      result[key] = [existing, value];\n    }\n  }\n\n  return result;\n};\n\n/**\n * Normalizes any accepted value into a JSON-friendly shape for query keys.\n */\nexport const serializeQueryKeyValue = (value: unknown): JsonValue | undefined => {\n  if (value === null) {\n    return null;\n  }\n\n  if (typeof value === 'string' || typeof value === 'number' || typeof value === 'boolean') {\n    return value;\n  }\n\n  if (value === undefined || typeof value === 'function' || typeof value === 'symbol') {\n    return undefined;\n  }\n\n  if (typeof value === 'bigint') {\n    return value.toString();\n  }\n\n  if (value instanceof Date) {\n    return value.toISOString();\n  }\n\n  if (Array.isArray(value)) {\n    return stringifyToJsonValue(value);\n  }\n\n  if (typeof URLSearchParams !== 'undefined' && value instanceof URLSearchParams) {\n    return serializeSearchParams(value);\n  }\n\n  if (isPlainObject(value)) {\n    return stringifyToJsonValue(value);\n  }\n\n  return undefined;\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-ky/sdk-client-optional/core/serverSentEvents.gen.ts",
    "content": "// 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 const 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            // Normalize line endings: CRLF -> LF, then CR -> LF\n            buffer = buffer.replace(/\\r\\n/g, '\\n').replace(/\\r/g, '\\n');\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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-ky/sdk-client-optional/core/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { Auth, AuthToken } from './auth.gen';\nimport type { BodySerializer, QuerySerializer, QuerySerializerOptions } from './bodySerializer.gen';\n\nexport type HttpMethod =\n  | 'connect'\n  | 'delete'\n  | 'get'\n  | 'head'\n  | 'options'\n  | 'patch'\n  | 'post'\n  | 'put'\n  | 'trace';\n\nexport type Client<\n  RequestFn = never,\n  Config = unknown,\n  MethodFn = never,\n  BuildUrlFn = never,\n  SseFn = never,\n> = {\n  /**\n   * Returns the final request URL.\n   */\n  buildUrl: BuildUrlFn;\n  getConfig: () => Config;\n  request: RequestFn;\n  setConfig: (config: Config) => Config;\n} & {\n  [K in HttpMethod]: MethodFn;\n} & ([SseFn] extends [never] ? { sse?: never } : { sse: { [K in HttpMethod]: SseFn } });\n\nexport interface Config {\n  /**\n   * Auth token or a function returning auth token. The resolved value will be\n   * added to the request payload as defined by its `security` array.\n   */\n  auth?: ((auth: Auth) => Promise<AuthToken> | AuthToken) | AuthToken;\n  /**\n   * A function for serializing request body parameter. By default,\n   * {@link JSON.stringify()} will be used.\n   */\n  bodySerializer?: BodySerializer | null;\n  /**\n   * An object containing any HTTP headers that you want to pre-populate your\n   * `Headers` object with.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/Headers/Headers#init See more}\n   */\n  headers?:\n    | RequestInit['headers']\n    | Record<\n        string,\n        string | number | boolean | (string | number | boolean)[] | null | undefined | unknown\n      >;\n  /**\n   * The request method.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/fetch#method See more}\n   */\n  method?: Uppercase<HttpMethod>;\n  /**\n   * A function for serializing request query parameters. By default, arrays\n   * will be exploded in form style, objects will be exploded in deepObject\n   * style, and reserved characters are percent-encoded.\n   *\n   * This method will have no effect if the native `paramsSerializer()` Axios\n   * API function is used.\n   *\n   * {@link https://swagger.io/docs/specification/serialization/#query View examples}\n   */\n  querySerializer?: QuerySerializer | QuerySerializerOptions;\n  /**\n   * A function validating request data. This is useful if you want to ensure\n   * the request conforms to the desired shape, so it can be safely sent to\n   * the server.\n   */\n  requestValidator?: (data: unknown) => Promise<unknown>;\n  /**\n   * A function transforming response data before it's returned. This is useful\n   * for post-processing data, e.g. converting ISO strings into Date objects.\n   */\n  responseTransformer?: (data: unknown) => Promise<unknown>;\n  /**\n   * A function validating response data. This is useful if you want to ensure\n   * the response conforms to the desired shape, so it can be safely passed to\n   * the transformers and returned to the user.\n   */\n  responseValidator?: (data: unknown) => Promise<unknown>;\n}\n\ntype IsExactlyNeverOrNeverUndefined<T> = [T] extends [never]\n  ? true\n  : [T] extends [never | undefined]\n    ? [undefined] extends [T]\n      ? false\n      : true\n    : false;\n\nexport type OmitNever<T extends Record<string, unknown>> = {\n  [K in keyof T as IsExactlyNeverOrNeverUndefined<T[K]> extends true ? never : K]: T[K];\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-ky/sdk-client-optional/core/utils.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-ky/sdk-client-optional/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport { apiVVersionODataControllerCount, callToTestOrderOfParams, callWithDefaultOptionalParameters, callWithDefaultParameters, callWithDescriptions, callWithDuplicateResponses, callWithNoContentResponse, callWithParameters, callWithResponse, callWithResponseAndNoContentResponse, callWithResponses, callWithResultFromHeader, callWithWeirdParameterNames, collectionFormat, complexParams, complexTypes, deleteCallWithoutParametersAndResponse, deleteFoo, deprecatedCall, dummyA, dummyB, duplicateName, duplicateName2, duplicateName3, duplicateName4, export_, fileResponse, fooWow, getApiVbyApiVersionSimpleOperation, getCallWithOptionalParam, getCallWithoutParametersAndResponse, headCallWithoutParametersAndResponse, import_, multipartRequest, multipartResponse, nonAsciiæøåÆøÅöôêÊ字符串, type Options, optionsCallWithoutParametersAndResponse, patchApiVbyApiVersionNoTag, patchCallWithoutParametersAndResponse, postApiVbyApiVersionFormData, postApiVbyApiVersionRequestBody, postCallWithOptionalParam, postCallWithoutParametersAndResponse, putCallWithoutParametersAndResponse, putWithFormUrlEncoded, testErrorCode, types, uploadFile } from './sdk.gen';\nexport type { _3eNum1Период, _400, AdditionalPropertiesIntegerIssue, AdditionalPropertiesUnknownIssue, AdditionalPropertiesUnknownIssue2, AdditionalPropertiesUnknownIssue3, AdditionalPropertiesUnknownIssueWritable, AnyOfAnyAndNull, AnyOfArrays, ApiVVersionODataControllerCountData, ApiVVersionODataControllerCountResponse, ApiVVersionODataControllerCountResponses, ArrayWithAnyOfProperties, ArrayWithArray, ArrayWithBooleans, ArrayWithNumbers, ArrayWithProperties, ArrayWithReferences, ArrayWithStrings, CallToTestOrderOfParamsData, CallWithDefaultOptionalParametersData, CallWithDefaultParametersData, CallWithDescriptionsData, CallWithDuplicateResponsesData, CallWithDuplicateResponsesError, CallWithDuplicateResponsesErrors, CallWithDuplicateResponsesResponse, CallWithDuplicateResponsesResponses, CallWithNoContentResponseData, CallWithNoContentResponseResponse, CallWithNoContentResponseResponses, CallWithParametersData, CallWithResponseAndNoContentResponseData, CallWithResponseAndNoContentResponseResponse, CallWithResponseAndNoContentResponseResponses, CallWithResponseData, CallWithResponseResponse, CallWithResponseResponses, CallWithResponsesData, CallWithResponsesError, CallWithResponsesErrors, CallWithResponsesResponse, CallWithResponsesResponses, CallWithResultFromHeaderData, CallWithResultFromHeaderErrors, CallWithResultFromHeaderResponses, CallWithWeirdParameterNamesData, CamelCaseCommentWithBreaks, CharactersInDescription, ClientOptions, CollectionFormatData, CommentWithBackticks, CommentWithBackticksAndQuotes, CommentWithBreaks, CommentWithExpressionPlaceholders, CommentWithQuotes, CommentWithReservedCharacters, CommentWithSlashes, ComplexParamsData, ComplexParamsResponse, ComplexParamsResponses, ComplexTypesData, ComplexTypesErrors, ComplexTypesResponse, ComplexTypesResponses, CompositionBaseModel, CompositionExtendedModel, CompositionWithAllOfAndNullable, CompositionWithAnyOf, CompositionWithAnyOfAndNullable, CompositionWithAnyOfAnonymous, CompositionWithNestedAnyAndTypeNull, CompositionWithNestedAnyOfAndNull, CompositionWithOneOf, CompositionWithOneOfAndComplexArrayDictionary, CompositionWithOneOfAndNullable, CompositionWithOneOfAndProperties, CompositionWithOneOfAndSimpleArrayDictionary, CompositionWithOneOfAndSimpleDictionary, CompositionWithOneOfAnonymous, CompositionWithOneOfDiscriminator, ConstValue, Default, DeleteCallWithoutParametersAndResponseData, DeleteFooData, DeleteFooData2, DeleteFooData3, DeprecatedCallData, DeprecatedModel, DictionaryWithArray, DictionaryWithDictionary, DictionaryWithProperties, DictionaryWithPropertiesAndAdditionalProperties, DictionaryWithReference, DictionaryWithString, DummyAData, DummyAResponse, DummyAResponses, DummyBData, DummyBResponse, DummyBResponses, DuplicateName2Data, DuplicateName3Data, DuplicateName4Data, DuplicateNameData, EnumFromDescription, EnumWithExtensions, EnumWithNumbers, EnumWithReplacedCharacters, EnumWithStrings, EnumWithXEnumNames, ExportData, ExternalRefA, ExternalRefB, ExternalSharedModel, File, FileResponseData, FileResponseResponse, FileResponseResponses, FileWritable, FooWowData, FooWowResponses, FreeFormObjectWithAdditionalPropertiesEqEmptyObject, FreeFormObjectWithAdditionalPropertiesEqTrue, FreeFormObjectWithoutAdditionalProperties, GenericSchemaDuplicateIssue1SystemBoolean, GenericSchemaDuplicateIssue1SystemBooleanWritable, GenericSchemaDuplicateIssue1SystemString, GenericSchemaDuplicateIssue1SystemStringWritable, GetApiVbyApiVersionSimpleOperationData, GetApiVbyApiVersionSimpleOperationError, GetApiVbyApiVersionSimpleOperationErrors, GetApiVbyApiVersionSimpleOperationResponse, GetApiVbyApiVersionSimpleOperationResponses, GetCallWithOptionalParamData, GetCallWithoutParametersAndResponseData, HeadCallWithoutParametersAndResponseData, Import, ImportData, ImportResponse, ImportResponses, IoK8sApimachineryPkgApisMetaV1DeleteOptions, IoK8sApimachineryPkgApisMetaV1Preconditions, ModelCircle, ModelFromZendesk, ModelSquare, ModelThatExtends, ModelThatExtendsExtends, ModelWithAdditionalPropertiesEqTrue, ModelWithAdditionalPropertiesRef, ModelWithAnyOfConstantSizeArray, ModelWithAnyOfConstantSizeArrayAndIntersect, ModelWithAnyOfConstantSizeArrayNullable, ModelWithAnyOfConstantSizeArrayWithNSizeAndOptions, ModelWithAnyOfConstantSizeArrayWithNSizeAndOptionsWritable, ModelWithArray, ModelWithArrayReadOnlyAndWriteOnly, ModelWithArrayReadOnlyAndWriteOnlyWritable, ModelWithBackticksInDescription, ModelWithBoolean, ModelWithCircularReference, ModelWithConst, ModelWithConstantSizeArray, ModelWithDictionary, ModelWithDuplicateImports, ModelWithDuplicateProperties, ModelWithEnum, ModelWithEnumFromDescription, ModelWithEnumWithHyphen, ModelWithInteger, ModelWithNestedArrayEnums, ModelWithNestedArrayEnumsData, ModelWithNestedArrayEnumsDataBar, ModelWithNestedArrayEnumsDataFoo, ModelWithNestedCompositionEnums, ModelWithNestedEnums, ModelWithNestedProperties, ModelWithNullableObject, ModelWithNullableString, ModelWithNumericEnumUnion, ModelWithOneOfAndProperties, ModelWithOneOfEnum, ModelWithOrderedProperties, ModelWithPattern, ModelWithPatternWritable, ModelWithPrefixItemsConstantSizeArray, ModelWithProperties, ModelWithPropertiesWritable, ModelWithReadOnlyAndWriteOnly, ModelWithReadOnlyAndWriteOnlyWritable, ModelWithReference, ModelWithReferenceWritable, ModelWithString, ModelWithStringError, MultipartRequestData, MultipartResponseData, MultipartResponseResponse, MultipartResponseResponses, NestedAnyOfArraysNullable, NonAsciiæøåÆøÅöôêÊ字符串Data, NonAsciiæøåÆøÅöôêÊ字符串Response, NonAsciiæøåÆøÅöôêÊ字符串Responses, NonAsciiStringæøåÆøÅöôêÊ字符串, NullableObject, OneOfAllOfIssue, OneOfAllOfIssueWritable, OptionsCallWithoutParametersAndResponseData, Pageable, ParameterSimpleParameterUnused, PatchApiVbyApiVersionNoTagData, PatchApiVbyApiVersionNoTagResponses, PatchCallWithoutParametersAndResponseData, PostApiVbyApiVersionFormDataData, PostApiVbyApiVersionRequestBodyData, PostCallWithOptionalParamData, PostCallWithOptionalParamResponse, PostCallWithOptionalParamResponses, PostCallWithoutParametersAndResponseData, PostServiceWithEmptyTagResponse, PostServiceWithEmptyTagResponse2, PutCallWithoutParametersAndResponseData, PutWithFormUrlEncodedData, SchemaWithFormRestrictedKeys, SimpleBoolean, SimpleFile, SimpleFormData, SimpleInteger, SimpleParameter, SimpleReference, SimpleRequestBody, SimpleString, SimpleStringWithPattern, TestErrorCodeData, TestErrorCodeErrors, TestErrorCodeResponses, TypesData, TypesResponse, TypesResponses, UploadFileData, UploadFileResponse, UploadFileResponses, XFooBar } from './types.gen';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-ky/sdk-client-optional/sdk.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport { type Client, formDataBodySerializer, type Options as Options2, type TDataShape, urlSearchParamsBodySerializer } from './client';\nimport { client } from './client.gen';\nimport type { ApiVVersionODataControllerCountData, ApiVVersionODataControllerCountResponses, CallToTestOrderOfParamsData, CallWithDefaultOptionalParametersData, CallWithDefaultParametersData, CallWithDescriptionsData, CallWithDuplicateResponsesData, CallWithDuplicateResponsesErrors, CallWithDuplicateResponsesResponses, CallWithNoContentResponseData, CallWithNoContentResponseResponses, CallWithParametersData, CallWithResponseAndNoContentResponseData, CallWithResponseAndNoContentResponseResponses, CallWithResponseData, CallWithResponseResponses, CallWithResponsesData, CallWithResponsesErrors, CallWithResponsesResponses, CallWithResultFromHeaderData, CallWithResultFromHeaderErrors, CallWithResultFromHeaderResponses, CallWithWeirdParameterNamesData, CollectionFormatData, ComplexParamsData, ComplexParamsResponses, ComplexTypesData, ComplexTypesErrors, ComplexTypesResponses, DeleteCallWithoutParametersAndResponseData, DeleteFooData3, DeprecatedCallData, DummyAData, DummyAResponses, DummyBData, DummyBResponses, DuplicateName2Data, DuplicateName3Data, DuplicateName4Data, DuplicateNameData, ExportData, FileResponseData, FileResponseResponses, FooWowData, FooWowResponses, GetApiVbyApiVersionSimpleOperationData, GetApiVbyApiVersionSimpleOperationErrors, GetApiVbyApiVersionSimpleOperationResponses, GetCallWithOptionalParamData, GetCallWithoutParametersAndResponseData, HeadCallWithoutParametersAndResponseData, ImportData, ImportResponses, MultipartRequestData, MultipartResponseData, MultipartResponseResponses, NonAsciiæøåÆøÅöôêÊ字符串Data, NonAsciiæøåÆøÅöôêÊ字符串Responses, OptionsCallWithoutParametersAndResponseData, PatchApiVbyApiVersionNoTagData, PatchApiVbyApiVersionNoTagResponses, PatchCallWithoutParametersAndResponseData, PostApiVbyApiVersionFormDataData, PostApiVbyApiVersionRequestBodyData, PostCallWithOptionalParamData, PostCallWithOptionalParamResponses, PostCallWithoutParametersAndResponseData, PutCallWithoutParametersAndResponseData, PutWithFormUrlEncodedData, TestErrorCodeData, TestErrorCodeErrors, TestErrorCodeResponses, TypesData, TypesResponses, UploadFileData, UploadFileResponses } from './types.gen';\n\nexport type Options<TData extends TDataShape = TDataShape, ThrowOnError extends boolean = boolean> = Options2<TData, ThrowOnError> & {\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\nexport const export_ = <ThrowOnError extends boolean = false>(options?: Options<ExportData, ThrowOnError>) => (options?.client ?? client).get<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/no+tag', ...options });\n\nexport const patchApiVbyApiVersionNoTag = <ThrowOnError extends boolean = false>(options?: Options<PatchApiVbyApiVersionNoTagData, ThrowOnError>) => (options?.client ?? client).patch<PatchApiVbyApiVersionNoTagResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/no+tag', ...options });\n\nexport const import_ = <ThrowOnError extends boolean = false>(options: Options<ImportData, ThrowOnError>) => (options.client ?? client).post<ImportResponses, unknown, ThrowOnError>({\n    url: '/api/v{api-version}/no+tag',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options.headers\n    }\n});\n\nexport const fooWow = <ThrowOnError extends boolean = false>(options?: Options<FooWowData, ThrowOnError>) => (options?.client ?? client).put<FooWowResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/no+tag', ...options });\n\nexport const apiVVersionODataControllerCount = <ThrowOnError extends boolean = false>(options?: Options<ApiVVersionODataControllerCountData, ThrowOnError>) => (options?.client ?? client).get<ApiVVersionODataControllerCountResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple/$count', ...options });\n\nexport const getApiVbyApiVersionSimpleOperation = <ThrowOnError extends boolean = false>(options: Options<GetApiVbyApiVersionSimpleOperationData, ThrowOnError>) => (options.client ?? client).get<GetApiVbyApiVersionSimpleOperationResponses, GetApiVbyApiVersionSimpleOperationErrors, ThrowOnError>({ url: '/api/v{api-version}/simple:operation', ...options });\n\nexport const deleteCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<DeleteCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).delete<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const getCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<GetCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).get<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const headCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<HeadCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).head<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const optionsCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<OptionsCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).options<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const patchCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<PatchCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).patch<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const postCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<PostCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).post<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const putCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<PutCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).put<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const deleteFoo = <ThrowOnError extends boolean = false>(options: Options<DeleteFooData3, ThrowOnError>) => (options.client ?? client).delete<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/foo/{foo_param}/bar/{BarParam}', ...options });\n\nexport const callWithDescriptions = <ThrowOnError extends boolean = false>(options?: Options<CallWithDescriptionsData, ThrowOnError>) => (options?.client ?? client).post<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/descriptions', ...options });\n\n/**\n * @deprecated\n */\nexport const deprecatedCall = <ThrowOnError extends boolean = false>(options: Options<DeprecatedCallData, ThrowOnError>) => (options.client ?? client).post<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/parameters/deprecated', ...options });\n\nexport const callWithParameters = <ThrowOnError extends boolean = false>(options: Options<CallWithParametersData, ThrowOnError>) => (options.client ?? client).post<unknown, unknown, ThrowOnError>({\n    url: '/api/v{api-version}/parameters/{parameterPath}',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options.headers\n    }\n});\n\nexport const callWithWeirdParameterNames = <ThrowOnError extends boolean = false>(options: Options<CallWithWeirdParameterNamesData, ThrowOnError>) => (options.client ?? client).post<unknown, unknown, ThrowOnError>({\n    url: '/api/v{api-version}/parameters/{parameter.path.1}/{parameter-path-2}/{PARAMETER-PATH-3}',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options.headers\n    }\n});\n\nexport const getCallWithOptionalParam = <ThrowOnError extends boolean = false>(options: Options<GetCallWithOptionalParamData, ThrowOnError>) => (options.client ?? client).get<unknown, unknown, ThrowOnError>({\n    url: '/api/v{api-version}/parameters',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options.headers\n    }\n});\n\nexport const postCallWithOptionalParam = <ThrowOnError extends boolean = false>(options: Options<PostCallWithOptionalParamData, ThrowOnError>) => (options.client ?? client).post<PostCallWithOptionalParamResponses, unknown, ThrowOnError>({\n    url: '/api/v{api-version}/parameters',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options.headers\n    }\n});\n\nexport const postApiVbyApiVersionRequestBody = <ThrowOnError extends boolean = false>(options?: Options<PostApiVbyApiVersionRequestBodyData, ThrowOnError>) => (options?.client ?? client).post<unknown, unknown, ThrowOnError>({\n    url: '/api/v{api-version}/requestBody',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options?.headers\n    }\n});\n\nexport const postApiVbyApiVersionFormData = <ThrowOnError extends boolean = false>(options?: Options<PostApiVbyApiVersionFormDataData, ThrowOnError>) => (options?.client ?? client).post<unknown, unknown, ThrowOnError>({\n    ...formDataBodySerializer,\n    url: '/api/v{api-version}/formData',\n    ...options,\n    headers: {\n        'Content-Type': null,\n        ...options?.headers\n    }\n});\n\nexport const callWithDefaultParameters = <ThrowOnError extends boolean = false>(options?: Options<CallWithDefaultParametersData, ThrowOnError>) => (options?.client ?? client).get<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/defaults', ...options });\n\nexport const callWithDefaultOptionalParameters = <ThrowOnError extends boolean = false>(options?: Options<CallWithDefaultOptionalParametersData, ThrowOnError>) => (options?.client ?? client).post<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/defaults', ...options });\n\nexport const callToTestOrderOfParams = <ThrowOnError extends boolean = false>(options: Options<CallToTestOrderOfParamsData, ThrowOnError>) => (options.client ?? client).put<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/defaults', ...options });\n\nexport const duplicateName = <ThrowOnError extends boolean = false>(options?: Options<DuplicateNameData, ThrowOnError>) => (options?.client ?? client).delete<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/duplicate', ...options });\n\nexport const duplicateName2 = <ThrowOnError extends boolean = false>(options?: Options<DuplicateName2Data, ThrowOnError>) => (options?.client ?? client).get<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/duplicate', ...options });\n\nexport const duplicateName3 = <ThrowOnError extends boolean = false>(options?: Options<DuplicateName3Data, ThrowOnError>) => (options?.client ?? client).post<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/duplicate', ...options });\n\nexport const duplicateName4 = <ThrowOnError extends boolean = false>(options?: Options<DuplicateName4Data, ThrowOnError>) => (options?.client ?? client).put<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/duplicate', ...options });\n\nexport const callWithNoContentResponse = <ThrowOnError extends boolean = false>(options?: Options<CallWithNoContentResponseData, ThrowOnError>) => (options?.client ?? client).get<CallWithNoContentResponseResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/no-content', ...options });\n\nexport const callWithResponseAndNoContentResponse = <ThrowOnError extends boolean = false>(options?: Options<CallWithResponseAndNoContentResponseData, ThrowOnError>) => (options?.client ?? client).get<CallWithResponseAndNoContentResponseResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/multiple-tags/response-and-no-content', ...options });\n\nexport const dummyA = <ThrowOnError extends boolean = false>(options?: Options<DummyAData, ThrowOnError>) => (options?.client ?? client).get<DummyAResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/multiple-tags/a', ...options });\n\nexport const dummyB = <ThrowOnError extends boolean = false>(options?: Options<DummyBData, ThrowOnError>) => (options?.client ?? client).get<DummyBResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/multiple-tags/b', ...options });\n\nexport const callWithResponse = <ThrowOnError extends boolean = false>(options?: Options<CallWithResponseData, ThrowOnError>) => (options?.client ?? client).get<CallWithResponseResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/response', ...options });\n\nexport const callWithDuplicateResponses = <ThrowOnError extends boolean = false>(options?: Options<CallWithDuplicateResponsesData, ThrowOnError>) => (options?.client ?? client).post<CallWithDuplicateResponsesResponses, CallWithDuplicateResponsesErrors, ThrowOnError>({ url: '/api/v{api-version}/response', ...options });\n\nexport const callWithResponses = <ThrowOnError extends boolean = false>(options?: Options<CallWithResponsesData, ThrowOnError>) => (options?.client ?? client).put<CallWithResponsesResponses, CallWithResponsesErrors, ThrowOnError>({ url: '/api/v{api-version}/response', ...options });\n\nexport const collectionFormat = <ThrowOnError extends boolean = false>(options: Options<CollectionFormatData, ThrowOnError>) => (options.client ?? client).get<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/collectionFormat', ...options });\n\nexport const types = <ThrowOnError extends boolean = false>(options: Options<TypesData, ThrowOnError>) => (options.client ?? client).get<TypesResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/types', ...options });\n\nexport const uploadFile = <ThrowOnError extends boolean = false>(options: Options<UploadFileData, ThrowOnError>) => (options.client ?? client).post<UploadFileResponses, unknown, ThrowOnError>({\n    ...urlSearchParamsBodySerializer,\n    url: '/api/v{api-version}/upload',\n    ...options,\n    headers: {\n        'Content-Type': 'application/x-www-form-urlencoded',\n        ...options.headers\n    }\n});\n\nexport const fileResponse = <ThrowOnError extends boolean = false>(options: Options<FileResponseData, ThrowOnError>) => (options.client ?? client).get<FileResponseResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/file/{id}', ...options });\n\nexport const complexTypes = <ThrowOnError extends boolean = false>(options: Options<ComplexTypesData, ThrowOnError>) => (options.client ?? client).get<ComplexTypesResponses, ComplexTypesErrors, ThrowOnError>({\n    querySerializer: { parameters: { parameterObject: { object: { style: 'form' } } } },\n    url: '/api/v{api-version}/complex',\n    ...options\n});\n\nexport const multipartResponse = <ThrowOnError extends boolean = false>(options?: Options<MultipartResponseData, ThrowOnError>) => (options?.client ?? client).get<MultipartResponseResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/multipart', ...options });\n\nexport const multipartRequest = <ThrowOnError extends boolean = false>(options?: Options<MultipartRequestData, ThrowOnError>) => (options?.client ?? client).post<unknown, unknown, ThrowOnError>({\n    ...formDataBodySerializer,\n    url: '/api/v{api-version}/multipart',\n    ...options,\n    headers: {\n        'Content-Type': null,\n        ...options?.headers\n    }\n});\n\nexport const complexParams = <ThrowOnError extends boolean = false>(options: Options<ComplexParamsData, ThrowOnError>) => (options.client ?? client).put<ComplexParamsResponses, unknown, ThrowOnError>({\n    url: '/api/v{api-version}/complex/{id}',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json-patch+json',\n        ...options.headers\n    }\n});\n\nexport const callWithResultFromHeader = <ThrowOnError extends boolean = false>(options?: Options<CallWithResultFromHeaderData, ThrowOnError>) => (options?.client ?? client).post<CallWithResultFromHeaderResponses, CallWithResultFromHeaderErrors, ThrowOnError>({ url: '/api/v{api-version}/header', ...options });\n\nexport const testErrorCode = <ThrowOnError extends boolean = false>(options: Options<TestErrorCodeData, ThrowOnError>) => (options.client ?? client).post<TestErrorCodeResponses, TestErrorCodeErrors, ThrowOnError>({ url: '/api/v{api-version}/error', ...options });\n\nexport const nonAsciiæøåÆøÅöôêÊ字符串 = <ThrowOnError extends boolean = false>(options: Options<NonAsciiæøåÆøÅöôêÊ字符串Data, ThrowOnError>) => (options.client ?? client).post<NonAsciiæøåÆøÅöôêÊ字符串Responses, unknown, ThrowOnError>({ url: '/api/v{api-version}/non-ascii-æøåÆØÅöôêÊ字符串', ...options });\n\n/**\n * Login User\n */\nexport const putWithFormUrlEncoded = <ThrowOnError extends boolean = false>(options: Options<PutWithFormUrlEncodedData, ThrowOnError>) => (options.client ?? client).put<unknown, unknown, ThrowOnError>({\n    ...urlSearchParamsBodySerializer,\n    url: '/api/v{api-version}/non-ascii-æøåÆØÅöôêÊ字符串',\n    ...options,\n    headers: {\n        'Content-Type': 'application/x-www-form-urlencoded',\n        ...options.headers\n    }\n});\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-ky/sdk-client-optional/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type ClientOptions = {\n    baseUrl: 'http://localhost:3000/base' | (string & {});\n};\n\n/**\n * Model with number-only name\n */\nexport type _400 = string;\n\n/**\n * External ref to shared model (A)\n */\nexport type ExternalRefA = ExternalSharedModel;\n\n/**\n * External ref to shared model (B)\n */\nexport type ExternalRefB = ExternalSharedModel;\n\n/**\n * Testing multiline comments in string: First line\n * Second line\n *\n * Fourth line\n */\nexport type CamelCaseCommentWithBreaks = number;\n\n/**\n * Testing multiline comments in string: First line\n * Second line\n *\n * Fourth line\n */\nexport type CommentWithBreaks = number;\n\n/**\n * Testing backticks in string: `backticks` and ```multiple backticks``` should work\n */\nexport type CommentWithBackticks = number;\n\n/**\n * Testing backticks and quotes in string: `backticks`, 'quotes', \"double quotes\" and ```multiple backticks``` should work\n */\nexport type CommentWithBackticksAndQuotes = number;\n\n/**\n * Testing slashes in string: \\backwards\\\\\\ and /forwards/// should work\n */\nexport type CommentWithSlashes = number;\n\n/**\n * Testing expression placeholders in string: ${expression} should work\n */\nexport type CommentWithExpressionPlaceholders = number;\n\n/**\n * Testing quotes in string: 'single quote''' and \"double quotes\"\"\" should work\n */\nexport type CommentWithQuotes = number;\n\n/**\n * Testing reserved characters in string: * inline * and ** inline ** should work\n */\nexport type CommentWithReservedCharacters = number;\n\n/**\n * This is a simple number\n */\nexport type SimpleInteger = number;\n\n/**\n * This is a simple boolean\n */\nexport type SimpleBoolean = boolean;\n\n/**\n * This is a simple string\n */\nexport type SimpleString = string;\n\n/**\n * A string with non-ascii (unicode) characters valid in typescript identifiers (æøåÆØÅöÔèÈ字符串)\n */\nexport type NonAsciiStringæøåÆøÅöôêÊ字符串 = string;\n\n/**\n * This is a simple file\n */\nexport type SimpleFile = Blob | File;\n\n/**\n * This is a simple reference\n */\nexport type SimpleReference = ModelWithString;\n\n/**\n * This is a simple string\n */\nexport type SimpleStringWithPattern = string | null;\n\n/**\n * This is a simple enum with strings\n */\nexport type EnumWithStrings = 'Success' | 'Warning' | 'Error' | '\\'Single Quote\\'' | '\"Double Quotes\"' | 'Non-ascii: øæåôöØÆÅÔÖ字符串';\n\nexport type EnumWithReplacedCharacters = '\\'Single Quote\\'' | '\"Double Quotes\"' | 'øæåôöØÆÅÔÖ字符串' | 3.1 | '';\n\n/**\n * This is a simple enum with numbers\n */\nexport type EnumWithNumbers = 1 | 2 | 3 | 1.1 | 1.2 | 1.3 | 100 | 200 | 300 | -100 | -200 | -300 | -1.1 | -1.2 | -1.3;\n\n/**\n * Success=1,Warning=2,Error=3\n */\nexport type EnumFromDescription = number;\n\n/**\n * This is a simple enum with numbers\n */\nexport type EnumWithExtensions = 200 | 400 | 500;\n\nexport type EnumWithXEnumNames = 0 | 1 | 2;\n\n/**\n * This is a simple array with numbers\n */\nexport type ArrayWithNumbers = Array<number>;\n\n/**\n * This is a simple array with booleans\n */\nexport type ArrayWithBooleans = Array<boolean>;\n\n/**\n * This is a simple array with strings\n */\nexport type ArrayWithStrings = Array<string>;\n\n/**\n * This is a simple array with references\n */\nexport type ArrayWithReferences = Array<ModelWithString>;\n\n/**\n * This is a simple array containing an array\n */\nexport type ArrayWithArray = Array<Array<ModelWithString>>;\n\n/**\n * This is a simple array with properties\n */\nexport type ArrayWithProperties = Array<{\n    '16x16'?: CamelCaseCommentWithBreaks;\n    bar?: string;\n}>;\n\n/**\n * This is a simple array with any of properties\n */\nexport type ArrayWithAnyOfProperties = Array<{\n    foo?: string;\n} | {\n    bar?: string;\n}>;\n\nexport type AnyOfAnyAndNull = {\n    data?: unknown | null;\n};\n\n/**\n * This is a simple array with any of properties\n */\nexport type AnyOfArrays = {\n    results?: Array<{\n        foo?: string;\n    } | {\n        bar?: string;\n    }>;\n};\n\n/**\n * This is a string dictionary\n */\nexport type DictionaryWithString = {\n    [key: string]: string;\n};\n\nexport type DictionaryWithPropertiesAndAdditionalProperties = {\n    foo?: number;\n    bar?: boolean;\n    [key: string]: string | number | boolean | undefined;\n};\n\n/**\n * This is a string reference\n */\nexport type DictionaryWithReference = {\n    [key: string]: ModelWithString;\n};\n\n/**\n * This is a complex dictionary\n */\nexport type DictionaryWithArray = {\n    [key: string]: Array<ModelWithString>;\n};\n\n/**\n * This is a string dictionary\n */\nexport type DictionaryWithDictionary = {\n    [key: string]: {\n        [key: string]: string;\n    };\n};\n\n/**\n * This is a complex dictionary\n */\nexport type DictionaryWithProperties = {\n    [key: string]: {\n        foo?: string;\n        bar?: string;\n    };\n};\n\n/**\n * This is a model with one number property\n */\nexport type ModelWithInteger = {\n    /**\n     * This is a simple number property\n     */\n    prop?: number;\n};\n\n/**\n * This is a model with one boolean property\n */\nexport type ModelWithBoolean = {\n    /**\n     * This is a simple boolean property\n     */\n    prop?: boolean;\n};\n\n/**\n * This is a model with one string property\n */\nexport type ModelWithString = {\n    /**\n     * This is a simple string property\n     */\n    prop?: string;\n};\n\n/**\n * This is a model with one string property\n */\nexport type ModelWithStringError = {\n    /**\n     * This is a simple string property\n     */\n    prop?: string;\n};\n\n/**\n * `Comment` or `VoiceComment`. The JSON object for adding voice comments to tickets is different. See [Adding voice comments to tickets](/documentation/ticketing/managing-tickets/adding-voice-comments-to-tickets)\n */\nexport type ModelFromZendesk = string;\n\n/**\n * This is a model with one string property\n */\nexport type ModelWithNullableString = {\n    /**\n     * This is a simple string property\n     */\n    nullableProp1?: string | null;\n    /**\n     * This is a simple string property\n     */\n    nullableRequiredProp1: string | null;\n    /**\n     * This is a simple string property\n     */\n    nullableProp2?: string | null;\n    /**\n     * This is a simple string property\n     */\n    nullableRequiredProp2: string | null;\n    /**\n     * This is a simple enum with strings\n     */\n    'foo_bar-enum'?: 'Success' | 'Warning' | 'Error' | 'ØÆÅ字符串';\n};\n\n/**\n * This is a model with one enum\n */\nexport type ModelWithEnum = {\n    /**\n     * This is a simple enum with strings\n     */\n    'foo_bar-enum'?: 'Success' | 'Warning' | 'Error' | 'ØÆÅ字符串';\n    /**\n     * These are the HTTP error code enums\n     */\n    statusCode?: '100' | '200 FOO' | '300 FOO_BAR' | '400 foo-bar' | '500 foo.bar' | '600 foo&bar';\n    /**\n     * Simple boolean enum\n     */\n    bool?: true;\n};\n\n/**\n * This is a model with one enum with escaped name\n */\nexport type ModelWithEnumWithHyphen = {\n    /**\n     * Foo-Bar-Baz-Qux\n     */\n    'foo-bar-baz-qux'?: '3.0';\n};\n\n/**\n * This is a model with one enum\n */\nexport type ModelWithEnumFromDescription = {\n    /**\n     * Success=1,Warning=2,Error=3\n     */\n    test?: number;\n};\n\n/**\n * This is a model with nested enums\n */\nexport type ModelWithNestedEnums = {\n    dictionaryWithEnum?: {\n        [key: string]: 'Success' | 'Warning' | 'Error';\n    };\n    dictionaryWithEnumFromDescription?: {\n        [key: string]: number;\n    };\n    arrayWithEnum?: Array<'Success' | 'Warning' | 'Error'>;\n    arrayWithDescription?: Array<number>;\n    /**\n     * This is a simple enum with strings\n     */\n    'foo_bar-enum'?: 'Success' | 'Warning' | 'Error' | 'ØÆÅ字符串';\n};\n\n/**\n * This is a model with one property containing a reference\n */\nexport type ModelWithReference = {\n    prop?: ModelWithProperties;\n};\n\n/**\n * This is a model with one property containing an array\n */\nexport type ModelWithArrayReadOnlyAndWriteOnly = {\n    prop?: Array<ModelWithReadOnlyAndWriteOnly>;\n    propWithFile?: Array<Blob | File>;\n    propWithNumber?: Array<number>;\n};\n\n/**\n * This is a model with one property containing an array\n */\nexport type ModelWithArray = {\n    prop?: Array<ModelWithString>;\n    propWithFile?: Array<Blob | File>;\n    propWithNumber?: Array<number>;\n};\n\n/**\n * This is a model with one property containing a dictionary\n */\nexport type ModelWithDictionary = {\n    prop?: {\n        [key: string]: string;\n    };\n};\n\n/**\n * This is a deprecated model with a deprecated property\n *\n * @deprecated\n */\nexport type DeprecatedModel = {\n    /**\n     * This is a deprecated property\n     *\n     * @deprecated\n     */\n    prop?: string;\n};\n\n/**\n * This is a model with one property containing a circular reference\n */\nexport type ModelWithCircularReference = {\n    prop?: ModelWithCircularReference;\n};\n\n/**\n * This is a model with one property with a 'one of' relationship\n */\nexport type CompositionWithOneOf = {\n    propA?: ModelWithString | ModelWithEnum | ModelWithArray | ModelWithDictionary;\n};\n\n/**\n * This is a model with one property with a 'one of' relationship where the options are not $ref\n */\nexport type CompositionWithOneOfAnonymous = {\n    propA?: {\n        propA?: string;\n    } | string | number;\n};\n\n/**\n * Circle\n */\nexport type ModelCircle = {\n    kind: string;\n    radius?: number;\n};\n\n/**\n * Square\n */\nexport type ModelSquare = {\n    kind: string;\n    sideLength?: number;\n};\n\n/**\n * This is a model with one property with a 'one of' relationship where the options are not $ref\n */\nexport type CompositionWithOneOfDiscriminator = ({\n    kind: 'circle';\n} & ModelCircle) | ({\n    kind: 'square';\n} & ModelSquare);\n\n/**\n * This is a model with one property with a 'any of' relationship\n */\nexport type CompositionWithAnyOf = {\n    propA?: ModelWithString | ModelWithEnum | ModelWithArray | ModelWithDictionary;\n};\n\n/**\n * This is a model with one property with a 'any of' relationship where the options are not $ref\n */\nexport type CompositionWithAnyOfAnonymous = {\n    propA?: {\n        propA?: string;\n    } | string | number;\n};\n\n/**\n * This is a model with nested 'any of' property with a type null\n */\nexport type CompositionWithNestedAnyAndTypeNull = {\n    propA?: Array<ModelWithDictionary | null> | Array<ModelWithArray | null>;\n};\n\nexport type _3eNum1Период = 'Bird' | 'Dog';\n\nexport type ConstValue = 'ConstValue';\n\n/**\n * This is a model with one property with a 'any of' relationship where the options are not $ref\n */\nexport type CompositionWithNestedAnyOfAndNull = {\n    /**\n     * Scopes\n     */\n    propA?: Array<_3eNum1Период | ConstValue> | null;\n};\n\n/**\n * This is a model with one property with a 'one of' relationship\n */\nexport type CompositionWithOneOfAndNullable = {\n    propA?: {\n        boolean?: boolean;\n    } | ModelWithEnum | ModelWithArray | ModelWithDictionary | null;\n};\n\n/**\n * This is a model that contains a simple dictionary within composition\n */\nexport type CompositionWithOneOfAndSimpleDictionary = {\n    propA?: boolean | {\n        [key: string]: number;\n    };\n};\n\n/**\n * This is a model that contains a dictionary of simple arrays within composition\n */\nexport type CompositionWithOneOfAndSimpleArrayDictionary = {\n    propA?: boolean | {\n        [key: string]: Array<boolean>;\n    };\n};\n\n/**\n * This is a model that contains a dictionary of complex arrays (composited) within composition\n */\nexport type CompositionWithOneOfAndComplexArrayDictionary = {\n    propA?: boolean | {\n        [key: string]: Array<number | string>;\n    };\n};\n\n/**\n * This is a model with one property with a 'all of' relationship\n */\nexport type CompositionWithAllOfAndNullable = {\n    propA?: ({\n        boolean?: boolean;\n    } & ModelWithEnum & ModelWithArray & ModelWithDictionary) | null;\n};\n\n/**\n * This is a model with one property with a 'any of' relationship\n */\nexport type CompositionWithAnyOfAndNullable = {\n    propA?: {\n        boolean?: boolean;\n    } | ModelWithEnum | ModelWithArray | ModelWithDictionary | null;\n};\n\n/**\n * This is a base model with two simple optional properties\n */\nexport type CompositionBaseModel = {\n    firstName?: string;\n    lastname?: string;\n};\n\n/**\n * This is a model that extends the base model\n */\nexport type CompositionExtendedModel = CompositionBaseModel & {\n    age: number;\n    firstName: string;\n    lastname: string;\n};\n\n/**\n * This is a model with one nested property\n */\nexport type ModelWithProperties = {\n    required: string;\n    readonly requiredAndReadOnly: string;\n    requiredAndNullable: string | null;\n    string?: string;\n    number?: number;\n    boolean?: boolean;\n    reference?: ModelWithString;\n    'property with space'?: string;\n    default?: string;\n    try?: string;\n    readonly '@namespace.string'?: string;\n    readonly '@namespace.integer'?: number;\n};\n\n/**\n * This is a model with one nested property\n */\nexport type ModelWithNestedProperties = {\n    readonly first: {\n        readonly second: {\n            readonly third: string | null;\n        } | null;\n    } | null;\n};\n\n/**\n * This is a model with duplicated properties\n */\nexport type ModelWithDuplicateProperties = {\n    prop?: ModelWithString;\n};\n\n/**\n * This is a model with ordered properties\n */\nexport type ModelWithOrderedProperties = {\n    zebra?: string;\n    apple?: string;\n    hawaii?: string;\n};\n\n/**\n * This is a model with duplicated imports\n */\nexport type ModelWithDuplicateImports = {\n    propA?: ModelWithString;\n    propB?: ModelWithString;\n    propC?: ModelWithString;\n};\n\n/**\n * This is a model that extends another model\n */\nexport type ModelThatExtends = ModelWithString & {\n    propExtendsA?: string;\n    propExtendsB?: ModelWithString;\n};\n\n/**\n * This is a model that extends another model\n */\nexport type ModelThatExtendsExtends = ModelWithString & ModelThatExtends & {\n    propExtendsC?: string;\n    propExtendsD?: ModelWithString;\n};\n\n/**\n * This is a model that contains a some patterns\n */\nexport type ModelWithPattern = {\n    key: string;\n    name: string;\n    readonly enabled?: boolean;\n    readonly modified?: string;\n    id?: string;\n    text?: string;\n    patternWithSingleQuotes?: string;\n    patternWithNewline?: string;\n    patternWithBacktick?: string;\n    patternWithUnicode?: string;\n};\n\nexport type File = {\n    /**\n     * Id\n     */\n    readonly id?: string;\n    /**\n     * Updated at\n     */\n    readonly updated_at?: string;\n    /**\n     * Created at\n     */\n    readonly created_at?: string;\n    /**\n     * Mime\n     */\n    mime: string;\n    /**\n     * File\n     */\n    readonly file?: string;\n};\n\nexport type Default = {\n    name?: string;\n};\n\nexport type Pageable = {\n    page?: number;\n    size?: number;\n    sort?: Array<string>;\n};\n\n/**\n * This is a free-form object without additionalProperties.\n */\nexport type FreeFormObjectWithoutAdditionalProperties = {\n    [key: string]: unknown;\n};\n\n/**\n * This is a free-form object with additionalProperties: true.\n */\nexport type FreeFormObjectWithAdditionalPropertiesEqTrue = {\n    [key: string]: unknown;\n};\n\n/**\n * This is a free-form object with additionalProperties: {}.\n */\nexport type FreeFormObjectWithAdditionalPropertiesEqEmptyObject = {\n    [key: string]: unknown;\n};\n\nexport type ModelWithConst = {\n    String?: 'String';\n    number?: 0;\n    null?: null;\n    withType?: 'Some string';\n};\n\n/**\n * This is a model with one property and additionalProperties: true\n */\nexport type ModelWithAdditionalPropertiesEqTrue = {\n    /**\n     * This is a simple string property\n     */\n    prop?: string;\n    [key: string]: unknown;\n};\n\nexport type NestedAnyOfArraysNullable = {\n    nullableArray?: Array<string | boolean> | null;\n};\n\nexport type CompositionWithOneOfAndProperties = ({\n    foo: SimpleParameter;\n} | {\n    bar: NonAsciiStringæøåÆøÅöôêÊ字符串;\n}) & {\n    baz: number | null;\n    qux: number;\n};\n\n/**\n * An object that can be null\n */\nexport type NullableObject = {\n    foo?: string;\n} | null;\n\n/**\n * Some % character\n */\nexport type CharactersInDescription = string;\n\nexport type ModelWithNullableObject = {\n    data?: NullableObject;\n};\n\n/**\n * An object with additional properties that can be null (anyOf ref + null)\n */\nexport type ModelWithAdditionalPropertiesRef = {\n    [key: string]: NullableObject | null;\n};\n\nexport type ModelWithOneOfEnum = {\n    foo: 'Bar';\n} | {\n    foo: 'Baz';\n} | {\n    foo: 'Qux';\n} | {\n    content: string;\n    foo: 'Quux';\n} | {\n    content: [\n        string,\n        string\n    ];\n    foo: 'Corge';\n};\n\nexport type ModelWithNestedArrayEnumsDataFoo = 'foo' | 'bar';\n\nexport type ModelWithNestedArrayEnumsDataBar = 'baz' | 'qux';\n\nexport type ModelWithNestedArrayEnumsData = {\n    foo?: Array<ModelWithNestedArrayEnumsDataFoo>;\n    bar?: Array<ModelWithNestedArrayEnumsDataBar>;\n};\n\nexport type ModelWithNestedArrayEnums = {\n    array_strings?: Array<string>;\n    data?: ModelWithNestedArrayEnumsData;\n};\n\nexport type ModelWithNestedCompositionEnums = {\n    foo?: ModelWithNestedArrayEnumsDataFoo;\n};\n\nexport type ModelWithReadOnlyAndWriteOnly = {\n    foo: string;\n    readonly bar: string;\n};\n\nexport type ModelWithConstantSizeArray = [\n    number,\n    number\n];\n\nexport type ModelWithAnyOfConstantSizeArray = [\n    number | string,\n    number | string,\n    number | string\n];\n\nexport type ModelWithPrefixItemsConstantSizeArray = [\n    ModelWithInteger,\n    number | string,\n    string\n];\n\nexport type ModelWithAnyOfConstantSizeArrayNullable = [\n    number | null | string,\n    number | null | string,\n    number | null | string\n];\n\nexport type ModelWithAnyOfConstantSizeArrayWithNSizeAndOptions = [\n    number | Import,\n    number | Import\n];\n\nexport type ModelWithAnyOfConstantSizeArrayAndIntersect = [\n    number & string,\n    number & string\n];\n\nexport type ModelWithNumericEnumUnion = {\n    /**\n     * Период\n     */\n    value?: -10 | -1 | 0 | 1 | 3 | 6 | 12;\n};\n\n/**\n * Some description with `back ticks`\n */\nexport type ModelWithBackticksInDescription = {\n    /**\n     * The template `that` should be used for parsing and importing the contents of the CSV file.\n     *\n     * <br/><p>There is one placeholder currently supported:<ul>     <li><b>${x}</b> - refers to the n-th column in the CSV file, e.g. ${1}, ${2}, ...)</li></ul><p>Example of a correct JSON template:</p>\n     * <pre>\n     * [\n     * {\n     * \"resourceType\": \"Asset\",\n     * \"identifier\": {\n     * \"name\": \"${1}\",\n     * \"domain\": {\n     * \"name\": \"${2}\",\n     * \"community\": {\n     * \"name\": \"Some Community\"\n     * }\n     * }\n     * },\n     * \"attributes\" : {\n     * \"00000000-0000-0000-0000-000000003115\" : [ {\n     * \"value\" : \"${3}\"\n     * } ],\n     * \"00000000-0000-0000-0000-000000000222\" : [ {\n     * \"value\" : \"${4}\"\n     * } ]\n     * }\n     * }\n     * ]\n     * </pre>\n     */\n    template?: string;\n};\n\nexport type ModelWithOneOfAndProperties = (SimpleParameter | NonAsciiStringæøåÆøÅöôêÊ字符串) & {\n    baz: number | null;\n    qux: number;\n};\n\n/**\n * Model used to test deduplication strategy (unused)\n */\nexport type ParameterSimpleParameterUnused = string;\n\n/**\n * Model used to test deduplication strategy\n */\nexport type PostServiceWithEmptyTagResponse = string;\n\n/**\n * Model used to test deduplication strategy\n */\nexport type PostServiceWithEmptyTagResponse2 = string;\n\n/**\n * Model used to test deduplication strategy\n */\nexport type DeleteFooData = string;\n\n/**\n * Model used to test deduplication strategy\n */\nexport type DeleteFooData2 = string;\n\n/**\n * Model with restricted keyword name\n */\nexport type Import = string;\n\nexport type SchemaWithFormRestrictedKeys = {\n    description?: string;\n    'x-enum-descriptions'?: string;\n    'x-enum-varnames'?: string;\n    'x-enumNames'?: string;\n    title?: string;\n    object?: {\n        description?: string;\n        'x-enum-descriptions'?: string;\n        'x-enum-varnames'?: string;\n        'x-enumNames'?: string;\n        title?: string;\n    };\n    array?: Array<{\n        description?: string;\n        'x-enum-descriptions'?: string;\n        'x-enum-varnames'?: string;\n        'x-enumNames'?: string;\n        title?: string;\n    }>;\n};\n\n/**\n * This schema was giving PascalCase transformations a hard time\n */\nexport type IoK8sApimachineryPkgApisMetaV1DeleteOptions = {\n    /**\n     * Must be fulfilled before a deletion is carried out. If not possible, a 409 Conflict status will be returned.\n     */\n    preconditions?: IoK8sApimachineryPkgApisMetaV1Preconditions;\n};\n\n/**\n * This schema was giving PascalCase transformations a hard time\n */\nexport type IoK8sApimachineryPkgApisMetaV1Preconditions = {\n    /**\n     * Specifies the target ResourceVersion\n     */\n    resourceVersion?: string;\n    /**\n     * Specifies the target UID.\n     */\n    uid?: string;\n};\n\nexport type AdditionalPropertiesUnknownIssue = {\n    [key: string]: string | number;\n};\n\nexport type AdditionalPropertiesUnknownIssue2 = {\n    [key: string]: string | number;\n};\n\nexport type AdditionalPropertiesUnknownIssue3 = string & {\n    entries: {\n        [key: string]: AdditionalPropertiesUnknownIssue;\n    };\n};\n\nexport type AdditionalPropertiesIntegerIssue = {\n    value: number;\n    [key: string]: number;\n};\n\nexport type OneOfAllOfIssue = ((ConstValue | GenericSchemaDuplicateIssue1SystemBoolean) & _3eNum1Период) | GenericSchemaDuplicateIssue1SystemString;\n\nexport type GenericSchemaDuplicateIssue1SystemBoolean = {\n    item?: boolean;\n    error?: string | null;\n    readonly hasError?: boolean;\n    data?: {\n        [key: string]: never;\n    };\n};\n\nexport type GenericSchemaDuplicateIssue1SystemString = {\n    item?: string | null;\n    error?: string | null;\n    readonly hasError?: boolean;\n};\n\nexport type ExternalSharedModel = {\n    id: string;\n    name?: string;\n};\n\n/**\n * This is a model with one property containing a reference\n */\nexport type ModelWithReferenceWritable = {\n    prop?: ModelWithPropertiesWritable;\n};\n\n/**\n * This is a model with one property containing an array\n */\nexport type ModelWithArrayReadOnlyAndWriteOnlyWritable = {\n    prop?: Array<ModelWithReadOnlyAndWriteOnlyWritable>;\n    propWithFile?: Array<Blob | File>;\n    propWithNumber?: Array<number>;\n};\n\n/**\n * This is a model with one nested property\n */\nexport type ModelWithPropertiesWritable = {\n    required: string;\n    requiredAndNullable: string | null;\n    string?: string;\n    number?: number;\n    boolean?: boolean;\n    reference?: ModelWithString;\n    'property with space'?: string;\n    default?: string;\n    try?: string;\n};\n\n/**\n * This is a model that contains a some patterns\n */\nexport type ModelWithPatternWritable = {\n    key: string;\n    name: string;\n    id?: string;\n    text?: string;\n    patternWithSingleQuotes?: string;\n    patternWithNewline?: string;\n    patternWithBacktick?: string;\n    patternWithUnicode?: string;\n};\n\nexport type FileWritable = {\n    /**\n     * Mime\n     */\n    mime: string;\n};\n\nexport type ModelWithReadOnlyAndWriteOnlyWritable = {\n    foo: string;\n    baz: string;\n};\n\nexport type ModelWithAnyOfConstantSizeArrayWithNSizeAndOptionsWritable = [\n    number | Import,\n    number | Import\n];\n\nexport type AdditionalPropertiesUnknownIssueWritable = {\n    [key: string]: string | number;\n};\n\nexport type OneOfAllOfIssueWritable = ((ConstValue | GenericSchemaDuplicateIssue1SystemBoolean) & _3eNum1Период) | GenericSchemaDuplicateIssue1SystemString;\n\nexport type GenericSchemaDuplicateIssue1SystemBooleanWritable = {\n    item?: boolean;\n    error?: string | null;\n    data?: {\n        [key: string]: never;\n    };\n};\n\nexport type GenericSchemaDuplicateIssue1SystemStringWritable = {\n    item?: string | null;\n    error?: string | null;\n};\n\n/**\n * This is a reusable parameter\n */\nexport type SimpleParameter = string;\n\n/**\n * Parameter with illegal characters\n */\nexport type XFooBar = ModelWithString;\n\n/**\n * A reusable request body\n */\nexport type SimpleRequestBody = ModelWithString;\n\n/**\n * A reusable request body\n */\nexport type SimpleFormData = ModelWithString;\n\nexport type ExportData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no+tag';\n};\n\nexport type PatchApiVbyApiVersionNoTagData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no+tag';\n};\n\nexport type PatchApiVbyApiVersionNoTagResponses = {\n    /**\n     * OK\n     */\n    default: unknown;\n};\n\nexport type ImportData = {\n    body: ModelWithReadOnlyAndWriteOnlyWritable | ModelWithArrayReadOnlyAndWriteOnlyWritable;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no+tag';\n};\n\nexport type ImportResponses = {\n    /**\n     * Success\n     */\n    200: ModelFromZendesk;\n    /**\n     * Default success response\n     */\n    default: ModelWithReadOnlyAndWriteOnly;\n};\n\nexport type ImportResponse = ImportResponses[keyof ImportResponses];\n\nexport type FooWowData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no+tag';\n};\n\nexport type FooWowResponses = {\n    /**\n     * OK\n     */\n    default: unknown;\n};\n\nexport type ApiVVersionODataControllerCountData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple/$count';\n};\n\nexport type ApiVVersionODataControllerCountResponses = {\n    /**\n     * Success\n     */\n    200: ModelFromZendesk;\n};\n\nexport type ApiVVersionODataControllerCountResponse = ApiVVersionODataControllerCountResponses[keyof ApiVVersionODataControllerCountResponses];\n\nexport type GetApiVbyApiVersionSimpleOperationData = {\n    body?: never;\n    path: {\n        /**\n         * foo in method\n         */\n        foo_param: string;\n    };\n    query?: never;\n    url: '/api/v{api-version}/simple:operation';\n};\n\nexport type GetApiVbyApiVersionSimpleOperationErrors = {\n    /**\n     * Default error response\n     */\n    default: ModelWithBoolean;\n};\n\nexport type GetApiVbyApiVersionSimpleOperationError = GetApiVbyApiVersionSimpleOperationErrors[keyof GetApiVbyApiVersionSimpleOperationErrors];\n\nexport type GetApiVbyApiVersionSimpleOperationResponses = {\n    /**\n     * Response is a simple number\n     */\n    200: number;\n};\n\nexport type GetApiVbyApiVersionSimpleOperationResponse = GetApiVbyApiVersionSimpleOperationResponses[keyof GetApiVbyApiVersionSimpleOperationResponses];\n\nexport type DeleteCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type GetCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type HeadCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type OptionsCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type PatchCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type PostCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type PutCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type DeleteFooData3 = {\n    body?: never;\n    headers: {\n        /**\n         * Parameter with illegal characters\n         */\n        'x-Foo-Bar': ModelWithString;\n    };\n    path: {\n        /**\n         * foo in method\n         */\n        foo_param: string;\n        /**\n         * bar in method\n         */\n        BarParam: string;\n    };\n    query?: never;\n    url: '/api/v{api-version}/foo/{foo_param}/bar/{BarParam}';\n};\n\nexport type CallWithDescriptionsData = {\n    body?: never;\n    path?: never;\n    query?: {\n        /**\n         * Testing multiline comments in string: First line\n         * Second line\n         *\n         * Fourth line\n         */\n        parameterWithBreaks?: string;\n        /**\n         * Testing backticks in string: `backticks` and ```multiple backticks``` should work\n         */\n        parameterWithBackticks?: string;\n        /**\n         * Testing slashes in string: \\backwards\\\\\\ and /forwards/// should work\n         */\n        parameterWithSlashes?: string;\n        /**\n         * Testing expression placeholders in string: ${expression} should work\n         */\n        parameterWithExpressionPlaceholders?: string;\n        /**\n         * Testing quotes in string: 'single quote''' and \"double quotes\"\"\" should work\n         */\n        parameterWithQuotes?: string;\n        /**\n         * Testing reserved characters in string: * inline * and ** inline ** should work\n         */\n        parameterWithReservedCharacters?: string;\n    };\n    url: '/api/v{api-version}/descriptions';\n};\n\nexport type DeprecatedCallData = {\n    body?: never;\n    headers: {\n        /**\n         * This parameter is deprecated\n         *\n         * @deprecated\n         */\n        parameter: DeprecatedModel | null;\n    };\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/parameters/deprecated';\n};\n\nexport type CallWithParametersData = {\n    /**\n     * This is the parameter that goes into the body\n     */\n    body: {\n        [key: string]: unknown;\n    } | null;\n    headers: {\n        /**\n         * This is the parameter that goes into the header\n         */\n        parameterHeader: string | null;\n    };\n    path: {\n        /**\n         * This is the parameter that goes into the path\n         */\n        parameterPath: string | null;\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string | null;\n    };\n    query: {\n        foo_ref_enum?: ModelWithNestedArrayEnumsDataFoo;\n        foo_all_of_enum: ModelWithNestedArrayEnumsDataFoo;\n        /**\n         * This is the parameter that goes into the query params\n         */\n        cursor: string | null;\n    };\n    url: '/api/v{api-version}/parameters/{parameterPath}';\n};\n\nexport type CallWithWeirdParameterNamesData = {\n    /**\n     * This is the parameter that goes into the body\n     */\n    body: ModelWithString | null;\n    headers: {\n        /**\n         * This is the parameter that goes into the request header\n         */\n        'parameter.header': string | null;\n    };\n    path: {\n        /**\n         * This is the parameter that goes into the path\n         */\n        'parameter.path.1'?: string;\n        /**\n         * This is the parameter that goes into the path\n         */\n        'parameter-path-2'?: string;\n        /**\n         * This is the parameter that goes into the path\n         */\n        'PARAMETER-PATH-3'?: string;\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string | null;\n    };\n    query: {\n        /**\n         * This is the parameter with a reserved keyword\n         */\n        default?: string;\n        /**\n         * This is the parameter that goes into the request query params\n         */\n        'parameter-query': string | null;\n    };\n    url: '/api/v{api-version}/parameters/{parameter.path.1}/{parameter-path-2}/{PARAMETER-PATH-3}';\n};\n\nexport type GetCallWithOptionalParamData = {\n    /**\n     * This is a required parameter\n     */\n    body: ModelWithOneOfEnum;\n    path?: never;\n    query?: {\n        /**\n         * This is an optional parameter\n         */\n        page?: number;\n    };\n    url: '/api/v{api-version}/parameters';\n};\n\nexport type PostCallWithOptionalParamData = {\n    /**\n     * This is an optional parameter\n     */\n    body?: {\n        offset?: number | null;\n    };\n    path?: never;\n    query: {\n        /**\n         * This is a required parameter\n         */\n        parameter: Pageable;\n    };\n    url: '/api/v{api-version}/parameters';\n};\n\nexport type PostCallWithOptionalParamResponses = {\n    /**\n     * Response is a simple number\n     */\n    200: number;\n    /**\n     * Success\n     */\n    204: void;\n};\n\nexport type PostCallWithOptionalParamResponse = PostCallWithOptionalParamResponses[keyof PostCallWithOptionalParamResponses];\n\nexport type PostApiVbyApiVersionRequestBodyData = {\n    /**\n     * A reusable request body\n     */\n    body?: SimpleRequestBody;\n    path?: never;\n    query?: {\n        /**\n         * This is a reusable parameter\n         */\n        parameter?: string;\n    };\n    url: '/api/v{api-version}/requestBody';\n};\n\nexport type PostApiVbyApiVersionFormDataData = {\n    /**\n     * A reusable request body\n     */\n    body?: SimpleFormData;\n    path?: never;\n    query?: {\n        /**\n         * This is a reusable parameter\n         */\n        parameter?: string;\n    };\n    url: '/api/v{api-version}/formData';\n};\n\nexport type CallWithDefaultParametersData = {\n    body?: never;\n    path?: never;\n    query?: {\n        /**\n         * This is a simple string with default value\n         */\n        parameterString?: string | null;\n        /**\n         * This is a simple number with default value\n         */\n        parameterNumber?: number | null;\n        /**\n         * This is a simple boolean with default value\n         */\n        parameterBoolean?: boolean | null;\n        /**\n         * This is a simple enum with default value\n         */\n        parameterEnum?: 'Success' | 'Warning' | 'Error';\n        /**\n         * This is a simple model with default value\n         */\n        parameterModel?: ModelWithString | null;\n    };\n    url: '/api/v{api-version}/defaults';\n};\n\nexport type CallWithDefaultOptionalParametersData = {\n    body?: never;\n    path?: never;\n    query?: {\n        /**\n         * This is a simple string that is optional with default value\n         */\n        parameterString?: string;\n        /**\n         * This is a simple number that is optional with default value\n         */\n        parameterNumber?: number;\n        /**\n         * This is a simple boolean that is optional with default value\n         */\n        parameterBoolean?: boolean;\n        /**\n         * This is a simple enum that is optional with default value\n         */\n        parameterEnum?: 'Success' | 'Warning' | 'Error';\n        /**\n         * This is a simple model that is optional with default value\n         */\n        parameterModel?: ModelWithString;\n    };\n    url: '/api/v{api-version}/defaults';\n};\n\nexport type CallToTestOrderOfParamsData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * This is a optional string with default\n         */\n        parameterOptionalStringWithDefault?: string;\n        /**\n         * This is a optional string with empty default\n         */\n        parameterOptionalStringWithEmptyDefault?: string;\n        /**\n         * This is a optional string with no default\n         */\n        parameterOptionalStringWithNoDefault?: string;\n        /**\n         * This is a string with default\n         */\n        parameterStringWithDefault: string;\n        /**\n         * This is a string with empty default\n         */\n        parameterStringWithEmptyDefault: string;\n        /**\n         * This is a string with no default\n         */\n        parameterStringWithNoDefault: string;\n        /**\n         * This is a string that can be null with no default\n         */\n        parameterStringNullableWithNoDefault?: string | null;\n        /**\n         * This is a string that can be null with default\n         */\n        parameterStringNullableWithDefault?: string | null;\n    };\n    url: '/api/v{api-version}/defaults';\n};\n\nexport type DuplicateNameData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/duplicate';\n};\n\nexport type DuplicateName2Data = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/duplicate';\n};\n\nexport type DuplicateName3Data = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/duplicate';\n};\n\nexport type DuplicateName4Data = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/duplicate';\n};\n\nexport type CallWithNoContentResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no-content';\n};\n\nexport type CallWithNoContentResponseResponses = {\n    /**\n     * Success\n     */\n    204: void;\n};\n\nexport type CallWithNoContentResponseResponse = CallWithNoContentResponseResponses[keyof CallWithNoContentResponseResponses];\n\nexport type CallWithResponseAndNoContentResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multiple-tags/response-and-no-content';\n};\n\nexport type CallWithResponseAndNoContentResponseResponses = {\n    /**\n     * Response is a simple number\n     */\n    200: number;\n    /**\n     * Success\n     */\n    204: void;\n};\n\nexport type CallWithResponseAndNoContentResponseResponse = CallWithResponseAndNoContentResponseResponses[keyof CallWithResponseAndNoContentResponseResponses];\n\nexport type DummyAData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multiple-tags/a';\n};\n\nexport type DummyAResponses = {\n    200: _400;\n};\n\nexport type DummyAResponse = DummyAResponses[keyof DummyAResponses];\n\nexport type DummyBData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multiple-tags/b';\n};\n\nexport type DummyBResponses = {\n    /**\n     * Success\n     */\n    204: void;\n};\n\nexport type DummyBResponse = DummyBResponses[keyof DummyBResponses];\n\nexport type CallWithResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/response';\n};\n\nexport type CallWithResponseResponses = {\n    default: Import;\n};\n\nexport type CallWithResponseResponse = CallWithResponseResponses[keyof CallWithResponseResponses];\n\nexport type CallWithDuplicateResponsesData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/response';\n};\n\nexport type CallWithDuplicateResponsesErrors = {\n    /**\n     * Message for 500 error\n     */\n    500: ModelWithStringError;\n    /**\n     * Message for 501 error\n     */\n    501: ModelWithStringError;\n    /**\n     * Message for 502 error\n     */\n    502: ModelWithStringError;\n    /**\n     * Message for 4XX errors\n     */\n    '4XX': DictionaryWithArray;\n    /**\n     * Default error response\n     */\n    default: ModelWithBoolean;\n};\n\nexport type CallWithDuplicateResponsesError = CallWithDuplicateResponsesErrors[keyof CallWithDuplicateResponsesErrors];\n\nexport type CallWithDuplicateResponsesResponses = {\n    /**\n     * Message for 200 response\n     */\n    200: ModelWithBoolean & ModelWithInteger;\n    /**\n     * Message for 201 response\n     */\n    201: ModelWithString;\n    /**\n     * Message for 202 response\n     */\n    202: ModelWithString;\n};\n\nexport type CallWithDuplicateResponsesResponse = CallWithDuplicateResponsesResponses[keyof CallWithDuplicateResponsesResponses];\n\nexport type CallWithResponsesData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/response';\n};\n\nexport type CallWithResponsesErrors = {\n    /**\n     * Message for 500 error\n     */\n    500: ModelWithStringError;\n    /**\n     * Message for 501 error\n     */\n    501: ModelWithStringError;\n    /**\n     * Message for 502 error\n     */\n    502: ModelWithStringError;\n    /**\n     * Message for default response\n     */\n    default: ModelWithStringError;\n};\n\nexport type CallWithResponsesError = CallWithResponsesErrors[keyof CallWithResponsesErrors];\n\nexport type CallWithResponsesResponses = {\n    /**\n     * Message for 200 response\n     */\n    200: {\n        readonly '@namespace.string'?: string;\n        readonly '@namespace.integer'?: number;\n        readonly value?: Array<ModelWithString>;\n    };\n    /**\n     * Message for 201 response\n     */\n    201: ModelThatExtends;\n    /**\n     * Message for 202 response\n     */\n    202: ModelThatExtendsExtends;\n};\n\nexport type CallWithResponsesResponse = CallWithResponsesResponses[keyof CallWithResponsesResponses];\n\nexport type CollectionFormatData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * This is an array parameter that is sent as csv format (comma-separated values)\n         */\n        parameterArrayCSV: Array<string> | null;\n        /**\n         * This is an array parameter that is sent as ssv format (space-separated values)\n         */\n        parameterArraySSV: Array<string> | null;\n        /**\n         * This is an array parameter that is sent as tsv format (tab-separated values)\n         */\n        parameterArrayTSV: Array<string> | null;\n        /**\n         * This is an array parameter that is sent as pipes format (pipe-separated values)\n         */\n        parameterArrayPipes: Array<string> | null;\n        /**\n         * This is an array parameter that is sent as multi format (multiple parameter instances)\n         */\n        parameterArrayMulti: Array<string> | null;\n    };\n    url: '/api/v{api-version}/collectionFormat';\n};\n\nexport type TypesData = {\n    body?: never;\n    path?: {\n        /**\n         * This is a number parameter\n         */\n        id?: number;\n    };\n    query: {\n        /**\n         * This is a number parameter\n         */\n        parameterNumber: number;\n        /**\n         * This is a string parameter\n         */\n        parameterString: string | null;\n        /**\n         * This is a boolean parameter\n         */\n        parameterBoolean: boolean | null;\n        /**\n         * This is an object parameter\n         */\n        parameterObject: {\n            [key: string]: unknown;\n        } | null;\n        /**\n         * This is an array parameter\n         */\n        parameterArray: Array<string> | null;\n        /**\n         * This is a dictionary parameter\n         */\n        parameterDictionary: {\n            [key: string]: unknown;\n        } | null;\n        /**\n         * This is an enum parameter\n         */\n        parameterEnum: 'Success' | 'Warning' | 'Error' | null;\n    };\n    url: '/api/v{api-version}/types';\n};\n\nexport type TypesResponses = {\n    /**\n     * Response is a simple number\n     */\n    200: number;\n    /**\n     * Response is a simple string\n     */\n    201: string;\n    /**\n     * Response is a simple boolean\n     */\n    202: boolean;\n    /**\n     * Response is a simple object\n     */\n    203: {\n        [key: string]: unknown;\n    };\n};\n\nexport type TypesResponse = TypesResponses[keyof TypesResponses];\n\nexport type UploadFileData = {\n    body: Blob | File;\n    path: {\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string | null;\n    };\n    query?: never;\n    url: '/api/v{api-version}/upload';\n};\n\nexport type UploadFileResponses = {\n    200: boolean;\n};\n\nexport type UploadFileResponse = UploadFileResponses[keyof UploadFileResponses];\n\nexport type FileResponseData = {\n    body?: never;\n    path: {\n        id: string;\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string;\n    };\n    query?: never;\n    url: '/api/v{api-version}/file/{id}';\n};\n\nexport type FileResponseResponses = {\n    /**\n     * Success\n     */\n    200: Blob | File;\n};\n\nexport type FileResponseResponse = FileResponseResponses[keyof FileResponseResponses];\n\nexport type ComplexTypesData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * Parameter containing object\n         */\n        parameterObject: {\n            first?: {\n                second?: {\n                    third?: string;\n                };\n            };\n        };\n        /**\n         * Parameter containing reference\n         */\n        parameterReference: ModelWithString;\n    };\n    url: '/api/v{api-version}/complex';\n};\n\nexport type ComplexTypesErrors = {\n    /**\n     * 400 `server` error\n     */\n    400: unknown;\n    /**\n     * 500 server error\n     */\n    500: unknown;\n};\n\nexport type ComplexTypesResponses = {\n    /**\n     * Successful response\n     */\n    200: Array<ModelWithString>;\n};\n\nexport type ComplexTypesResponse = ComplexTypesResponses[keyof ComplexTypesResponses];\n\nexport type MultipartResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multipart';\n};\n\nexport type MultipartResponseResponses = {\n    /**\n     * OK\n     */\n    200: {\n        file?: Blob | File;\n        metadata?: {\n            foo?: string;\n            bar?: string;\n        };\n    };\n};\n\nexport type MultipartResponseResponse = MultipartResponseResponses[keyof MultipartResponseResponses];\n\nexport type MultipartRequestData = {\n    body?: {\n        content?: Blob | File;\n        data?: ModelWithString | null;\n    };\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multipart';\n};\n\nexport type ComplexParamsData = {\n    body?: {\n        readonly key: string | null;\n        name: string | null;\n        enabled?: boolean;\n        type: 'Monkey' | 'Horse' | 'Bird';\n        listOfModels?: Array<ModelWithString> | null;\n        listOfStrings?: Array<string> | null;\n        parameters: ModelWithString | ModelWithEnum | ModelWithArray | ModelWithDictionary;\n        readonly user?: {\n            readonly id?: number;\n            readonly name?: string | null;\n        };\n    };\n    path: {\n        id: number;\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string;\n    };\n    query?: never;\n    url: '/api/v{api-version}/complex/{id}';\n};\n\nexport type ComplexParamsResponses = {\n    /**\n     * Success\n     */\n    200: ModelWithString;\n};\n\nexport type ComplexParamsResponse = ComplexParamsResponses[keyof ComplexParamsResponses];\n\nexport type CallWithResultFromHeaderData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/header';\n};\n\nexport type CallWithResultFromHeaderErrors = {\n    /**\n     * 400 server error\n     */\n    400: unknown;\n    /**\n     * 500 server error\n     */\n    500: unknown;\n};\n\nexport type CallWithResultFromHeaderResponses = {\n    /**\n     * Successful response\n     */\n    200: unknown;\n};\n\nexport type TestErrorCodeData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * Status code to return\n         */\n        status: number;\n    };\n    url: '/api/v{api-version}/error';\n};\n\nexport type TestErrorCodeErrors = {\n    /**\n     * Custom message: Internal Server Error\n     */\n    500: unknown;\n    /**\n     * Custom message: Not Implemented\n     */\n    501: unknown;\n    /**\n     * Custom message: Bad Gateway\n     */\n    502: unknown;\n    /**\n     * Custom message: Service Unavailable\n     */\n    503: unknown;\n};\n\nexport type TestErrorCodeResponses = {\n    /**\n     * Custom message: Successful response\n     */\n    200: unknown;\n};\n\nexport type NonAsciiæøåÆøÅöôêÊ字符串Data = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * Dummy input param\n         */\n        nonAsciiParamæøåÆØÅöôêÊ: number;\n    };\n    url: '/api/v{api-version}/non-ascii-æøåÆØÅöôêÊ字符串';\n};\n\nexport type NonAsciiæøåÆøÅöôêÊ字符串Responses = {\n    /**\n     * Successful response\n     */\n    200: Array<NonAsciiStringæøåÆøÅöôêÊ字符串>;\n};\n\nexport type NonAsciiæøåÆøÅöôêÊ字符串Response = NonAsciiæøåÆøÅöôêÊ字符串Responses[keyof NonAsciiæøåÆøÅöôêÊ字符串Responses];\n\nexport type PutWithFormUrlEncodedData = {\n    body: ArrayWithStrings;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/non-ascii-æøåÆØÅöôêÊ字符串';\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-ky/sdk-client-required/client/client.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { HTTPError, Options as KyOptions } from 'ky';\nimport ky from 'ky';\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, RetryOptions } from './types.gen';\nimport type { Middleware } from './utils.gen';\nimport {\n  buildUrl,\n  createConfig,\n  createInterceptors,\n  getParseAs,\n  mergeConfigs,\n  mergeHeaders,\n  setAuthParams,\n} from './utils.gen';\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 (options: RequestOptions) => {\n    const opts = {\n      ..._config,\n      ...options,\n      headers: mergeHeaders(_config.headers, options.headers),\n      ky: options.ky ?? _config.ky ?? ky,\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    if (opts.body === undefined || opts.serializedBody === '') {\n      opts.headers.delete('Content-Type');\n    }\n\n    const url = buildUrl(opts);\n\n    return { opts, url };\n  };\n\n  const parseErrorResponse = async (\n    response: Response,\n    request: Request,\n    opts: ResolvedRequestOptions,\n    interceptorsMiddleware: Middleware<Request, Response, unknown, ResolvedRequestOptions>,\n  ) => {\n    const result = {\n      request,\n      response,\n    };\n\n    const textError = await response.text();\n    let jsonError: unknown;\n\n    try {\n      jsonError = JSON.parse(textError);\n    } catch {\n      jsonError = undefined;\n    }\n\n    const error = jsonError ?? textError;\n    let finalError = error;\n\n    for (const fn of interceptorsMiddleware.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    return opts.responseStyle === 'data'\n      ? undefined\n      : {\n          error: finalError,\n          ...result,\n        };\n  };\n\n  const request: Client['request'] = async (options) => {\n    // @ts-expect-error\n    const { opts, url } = await beforeRequest(options);\n\n    const kyInstance = opts.ky!;\n\n    const validBody = getValidRequestBody(opts);\n\n    const kyOptions: KyOptions = {\n      body: validBody as BodyInit,\n      cache: opts.cache,\n      credentials: opts.credentials,\n      headers: opts.headers,\n      integrity: opts.integrity,\n      keepalive: opts.keepalive,\n      method: opts.method as KyOptions['method'],\n      mode: opts.mode,\n      redirect: 'follow',\n      referrer: opts.referrer,\n      referrerPolicy: opts.referrerPolicy,\n      signal: opts.signal,\n      throwHttpErrors: opts.throwOnError ?? false,\n      timeout: opts.timeout,\n      ...opts.kyOptions,\n    };\n\n    if (opts.retry && typeof opts.retry === 'object') {\n      const retryOpts = opts.retry as RetryOptions;\n      kyOptions.retry = {\n        limit: retryOpts.limit ?? 2,\n        methods: retryOpts.methods as Array<\n          'get' | 'post' | 'put' | 'patch' | 'head' | 'delete' | 'options' | 'trace'\n        >,\n        statusCodes: retryOpts.statusCodes,\n      };\n    }\n\n    let request = new Request(url, {\n      body: kyOptions.body as BodyInit,\n      headers: kyOptions.headers as HeadersInit,\n      method: kyOptions.method,\n    });\n\n    for (const fn of interceptors.request.fns) {\n      if (fn) {\n        request = await fn(request, opts);\n      }\n    }\n\n    let response: Response;\n\n    try {\n      response = await kyInstance(request, kyOptions);\n    } catch (error) {\n      if (error && typeof error === 'object' && 'response' in error) {\n        const httpError = error as HTTPError;\n        response = httpError.response;\n\n        for (const fn of interceptors.response.fns) {\n          if (fn) {\n            response = await fn(response, request, opts);\n          }\n        }\n\n        return parseErrorResponse(response, request, opts, interceptors);\n      }\n\n      throw error;\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    return parseErrorResponse(response, request, opts, interceptors);\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      fetch: globalThis.fetch,\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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-ky/sdk-client-required/client/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type { Auth } from '../core/auth.gen';\nexport type { QuerySerializerOptions } from '../core/bodySerializer.gen';\nexport {\n  formDataBodySerializer,\n  jsonBodySerializer,\n  urlSearchParamsBodySerializer,\n} from '../core/bodySerializer.gen';\nexport { buildClientParams } from '../core/params.gen';\nexport { serializeQueryKeyValue } from '../core/queryKeySerializer.gen';\nexport { createClient } from './client.gen';\nexport type {\n  Client,\n  ClientOptions,\n  Config,\n  CreateClientConfig,\n  Options,\n  RequestOptions,\n  RequestResult,\n  ResolvedRequestOptions,\n  ResponseStyle,\n  RetryOptions,\n  TDataShape,\n} from './types.gen';\nexport { createConfig, mergeHeaders } from './utils.gen';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-ky/sdk-client-required/client/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { Options as KyOptions } from 'ky';\nimport type ky from 'ky';\n\nimport type { Auth } from '../core/auth.gen';\nimport type {\n  ServerSentEventsOptions,\n  ServerSentEventsResult,\n} from '../core/serverSentEvents.gen';\nimport type { Client as CoreClient, Config as CoreConfig } from '../core/types.gen';\nimport type { Middleware } from './utils.gen';\n\nexport type ResponseStyle = 'data' | 'fields';\n\nexport interface RetryOptions {\n  /**\n   * Maximum number of retry attempts\n   *\n   * @default 2\n   */\n  limit?: number;\n  /**\n   * HTTP methods to retry\n   *\n   * @default ['get', 'put', 'head', 'delete', 'options', 'trace']\n   */\n  methods?: Array<'get' | 'post' | 'put' | 'delete' | 'patch' | 'head' | 'options' | 'trace'>;\n  /**\n   * HTTP status codes to retry\n   *\n   * @default [408, 413, 429, 500, 502, 503, 504]\n   */\n  statusCodes?: number[];\n}\n\nexport interface Config<T extends ClientOptions = ClientOptions>\n  extends\n    Omit<KyOptions, 'body' | 'headers' | 'method' | 'prefixUrl' | 'retry' | 'throwHttpErrors'>,\n    CoreConfig {\n  /**\n   * Base URL for all requests made by this client.\n   */\n  baseUrl?: T['baseUrl'];\n  /**\n   * Ky instance to use. You can use this option to provide a custom\n   * ky instance.\n   */\n  ky?: typeof ky;\n  /**\n   * Additional ky-specific options that will be passed directly to ky.\n   * This allows you to use any ky option not explicitly exposed in the config.\n   */\n  kyOptions?: Omit<KyOptions, 'method' | 'prefixUrl'>;\n  /**\n   * Return the response data parsed in a specified format. By default, `auto`\n   * will infer the appropriate method from the `Content-Type` response header.\n   * You can override this behavior with any of the {@link Body} methods.\n   * Select `stream` if you don't want to parse response data at all.\n   *\n   * @default 'auto'\n   */\n  parseAs?: 'arrayBuffer' | 'auto' | 'blob' | 'formData' | 'json' | 'stream' | 'text';\n  /**\n   * Should we return only data or multiple fields (data, error, response, etc.)?\n   *\n   * @default 'fields'\n   */\n  responseStyle?: ResponseStyle;\n  /**\n   * Retry configuration\n   */\n  retry?: RetryOptions;\n  /**\n   * Throw an error instead of returning it in the response?\n   *\n   * @default false\n   */\n  throwOnError?: T['throwOnError'];\n  /**\n   * Request timeout in milliseconds\n   *\n   * @default 10000\n   */\n  timeout?: number;\n}\n\nexport interface RequestOptions<\n  TData = unknown,\n  TResponseStyle extends ResponseStyle = 'fields',\n  ThrowOnError extends boolean = boolean,\n  Url extends string = string,\n>\n  extends\n    Config<{\n      responseStyle: TResponseStyle;\n      throwOnError: ThrowOnError;\n    }>,\n    Pick<\n      ServerSentEventsOptions<TData>,\n      | 'onRequest'\n      | 'onSseError'\n      | 'onSseEvent'\n      | 'sseDefaultRetryDelay'\n      | 'sseMaxRetryAttempts'\n      | 'sseMaxRetryDelay'\n    > {\n  /**\n   * Any body that you want to add to your request.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/fetch#body}\n   */\n  body?: unknown;\n  path?: Record<string, unknown>;\n  query?: Record<string, unknown>;\n  /**\n   * Security mechanism(s) to use for the request.\n   */\n  security?: ReadonlyArray<Auth>;\n  url: Url;\n}\n\nexport interface ResolvedRequestOptions<\n  TResponseStyle extends ResponseStyle = 'fields',\n  ThrowOnError extends boolean = boolean,\n  Url extends string = string,\n> extends RequestOptions<unknown, TResponseStyle, ThrowOnError, Url> {\n  serializedBody?: string;\n}\n\nexport type RequestResult<\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = boolean,\n  TResponseStyle extends ResponseStyle = 'fields',\n> = ThrowOnError extends true\n  ? Promise<\n      TResponseStyle extends 'data'\n        ? TData extends Record<string, unknown>\n          ? TData[keyof TData]\n          : TData\n        : {\n            data: TData extends Record<string, unknown> ? TData[keyof TData] : TData;\n            request: Request;\n            response: Response;\n          }\n    >\n  : Promise<\n      TResponseStyle extends 'data'\n        ? (TData extends Record<string, unknown> ? TData[keyof TData] : TData) | undefined\n        : (\n            | {\n                data: TData extends Record<string, unknown> ? TData[keyof TData] : TData;\n                error: undefined;\n              }\n            | {\n                data: undefined;\n                error: TError extends Record<string, unknown> ? TError[keyof TError] : TError;\n              }\n          ) & {\n            request: Request;\n            response: Response;\n          }\n    >;\n\nexport interface ClientOptions {\n  baseUrl?: string;\n  responseStyle?: ResponseStyle;\n  throwOnError?: boolean;\n}\n\ntype MethodFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'>,\n) => RequestResult<TData, TError, ThrowOnError, TResponseStyle>;\n\ntype SseFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'>,\n) => Promise<ServerSentEventsResult<TData, TError>>;\n\ntype RequestFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'> &\n    Pick<Required<RequestOptions<TData, TResponseStyle, ThrowOnError>>, 'method'>,\n) => RequestResult<TData, TError, ThrowOnError, TResponseStyle>;\n\ntype BuildUrlFn = <\n  TData extends {\n    body?: unknown;\n    path?: Record<string, unknown>;\n    query?: Record<string, unknown>;\n    url: string;\n  },\n>(\n  options: TData & Options<TData>,\n) => string;\n\nexport type Client = CoreClient<RequestFn, Config, MethodFn, BuildUrlFn, SseFn> & {\n  interceptors: Middleware<Request, Response, unknown, ResolvedRequestOptions>;\n};\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 = ClientOptions> = (\n  override?: Config<ClientOptions & T>,\n) => Config<Required<ClientOptions> & T>;\n\nexport interface TDataShape {\n  body?: unknown;\n  headers?: unknown;\n  path?: unknown;\n  query?: unknown;\n  url: string;\n}\n\ntype OmitKeys<T, K> = Pick<T, Exclude<keyof T, K>>;\n\nexport type Options<\n  TData extends TDataShape = TDataShape,\n  ThrowOnError extends boolean = boolean,\n  TResponse = unknown,\n  TResponseStyle extends ResponseStyle = 'fields',\n> = OmitKeys<\n  RequestOptions<TResponse, TResponseStyle, ThrowOnError>,\n  'body' | 'path' | 'query' | 'url'\n> &\n  ([TData] extends [never] ? unknown : Omit<TData, 'url'>);\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-ky/sdk-client-required/client/utils.gen.ts",
    "content": "// 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    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        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  throwOnError: false,\n  timeout: 10000,\n  ...override,\n});\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-ky/sdk-client-required/client.gen.ts",
    "content": "// 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: 'http://localhost:3000/base' }));\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-ky/sdk-client-required/core/auth.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-ky/sdk-client-required/core/bodySerializer.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-ky/sdk-client-required/core/params.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-ky/sdk-client-required/core/pathSerializer.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-ky/sdk-client-required/core/queryKeySerializer.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\n/**\n * JSON-friendly union that mirrors what Pinia Colada can hash.\n */\nexport type JsonValue =\n  | null\n  | string\n  | number\n  | boolean\n  | JsonValue[]\n  | { [key: string]: JsonValue };\n\n/**\n * Replacer that converts non-JSON values (bigint, Date, etc.) to safe substitutes.\n */\nexport const queryKeyJsonReplacer = (_key: string, value: unknown) => {\n  if (value === undefined || typeof value === 'function' || typeof value === 'symbol') {\n    return undefined;\n  }\n  if (typeof value === 'bigint') {\n    return value.toString();\n  }\n  if (value instanceof Date) {\n    return value.toISOString();\n  }\n  return value;\n};\n\n/**\n * Safely stringifies a value and parses it back into a JsonValue.\n */\nexport const stringifyToJsonValue = (input: unknown): JsonValue | undefined => {\n  try {\n    const json = JSON.stringify(input, queryKeyJsonReplacer);\n    if (json === undefined) {\n      return undefined;\n    }\n    return JSON.parse(json) as JsonValue;\n  } catch {\n    return undefined;\n  }\n};\n\n/**\n * Detects plain objects (including objects with a null prototype).\n */\nconst isPlainObject = (value: unknown): value is Record<string, unknown> => {\n  if (value === null || typeof value !== 'object') {\n    return false;\n  }\n  const prototype = Object.getPrototypeOf(value as object);\n  return prototype === Object.prototype || prototype === null;\n};\n\n/**\n * Turns URLSearchParams into a sorted JSON object for deterministic keys.\n */\nconst serializeSearchParams = (params: URLSearchParams): JsonValue => {\n  const entries = Array.from(params.entries()).sort(([a], [b]) => a.localeCompare(b));\n  const result: Record<string, JsonValue> = {};\n\n  for (const [key, value] of entries) {\n    const existing = result[key];\n    if (existing === undefined) {\n      result[key] = value;\n      continue;\n    }\n\n    if (Array.isArray(existing)) {\n      (existing as string[]).push(value);\n    } else {\n      result[key] = [existing, value];\n    }\n  }\n\n  return result;\n};\n\n/**\n * Normalizes any accepted value into a JSON-friendly shape for query keys.\n */\nexport const serializeQueryKeyValue = (value: unknown): JsonValue | undefined => {\n  if (value === null) {\n    return null;\n  }\n\n  if (typeof value === 'string' || typeof value === 'number' || typeof value === 'boolean') {\n    return value;\n  }\n\n  if (value === undefined || typeof value === 'function' || typeof value === 'symbol') {\n    return undefined;\n  }\n\n  if (typeof value === 'bigint') {\n    return value.toString();\n  }\n\n  if (value instanceof Date) {\n    return value.toISOString();\n  }\n\n  if (Array.isArray(value)) {\n    return stringifyToJsonValue(value);\n  }\n\n  if (typeof URLSearchParams !== 'undefined' && value instanceof URLSearchParams) {\n    return serializeSearchParams(value);\n  }\n\n  if (isPlainObject(value)) {\n    return stringifyToJsonValue(value);\n  }\n\n  return undefined;\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-ky/sdk-client-required/core/serverSentEvents.gen.ts",
    "content": "// 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 const 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            // Normalize line endings: CRLF -> LF, then CR -> LF\n            buffer = buffer.replace(/\\r\\n/g, '\\n').replace(/\\r/g, '\\n');\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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-ky/sdk-client-required/core/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { Auth, AuthToken } from './auth.gen';\nimport type { BodySerializer, QuerySerializer, QuerySerializerOptions } from './bodySerializer.gen';\n\nexport type HttpMethod =\n  | 'connect'\n  | 'delete'\n  | 'get'\n  | 'head'\n  | 'options'\n  | 'patch'\n  | 'post'\n  | 'put'\n  | 'trace';\n\nexport type Client<\n  RequestFn = never,\n  Config = unknown,\n  MethodFn = never,\n  BuildUrlFn = never,\n  SseFn = never,\n> = {\n  /**\n   * Returns the final request URL.\n   */\n  buildUrl: BuildUrlFn;\n  getConfig: () => Config;\n  request: RequestFn;\n  setConfig: (config: Config) => Config;\n} & {\n  [K in HttpMethod]: MethodFn;\n} & ([SseFn] extends [never] ? { sse?: never } : { sse: { [K in HttpMethod]: SseFn } });\n\nexport interface Config {\n  /**\n   * Auth token or a function returning auth token. The resolved value will be\n   * added to the request payload as defined by its `security` array.\n   */\n  auth?: ((auth: Auth) => Promise<AuthToken> | AuthToken) | AuthToken;\n  /**\n   * A function for serializing request body parameter. By default,\n   * {@link JSON.stringify()} will be used.\n   */\n  bodySerializer?: BodySerializer | null;\n  /**\n   * An object containing any HTTP headers that you want to pre-populate your\n   * `Headers` object with.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/Headers/Headers#init See more}\n   */\n  headers?:\n    | RequestInit['headers']\n    | Record<\n        string,\n        string | number | boolean | (string | number | boolean)[] | null | undefined | unknown\n      >;\n  /**\n   * The request method.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/fetch#method See more}\n   */\n  method?: Uppercase<HttpMethod>;\n  /**\n   * A function for serializing request query parameters. By default, arrays\n   * will be exploded in form style, objects will be exploded in deepObject\n   * style, and reserved characters are percent-encoded.\n   *\n   * This method will have no effect if the native `paramsSerializer()` Axios\n   * API function is used.\n   *\n   * {@link https://swagger.io/docs/specification/serialization/#query View examples}\n   */\n  querySerializer?: QuerySerializer | QuerySerializerOptions;\n  /**\n   * A function validating request data. This is useful if you want to ensure\n   * the request conforms to the desired shape, so it can be safely sent to\n   * the server.\n   */\n  requestValidator?: (data: unknown) => Promise<unknown>;\n  /**\n   * A function transforming response data before it's returned. This is useful\n   * for post-processing data, e.g. converting ISO strings into Date objects.\n   */\n  responseTransformer?: (data: unknown) => Promise<unknown>;\n  /**\n   * A function validating response data. This is useful if you want to ensure\n   * the response conforms to the desired shape, so it can be safely passed to\n   * the transformers and returned to the user.\n   */\n  responseValidator?: (data: unknown) => Promise<unknown>;\n}\n\ntype IsExactlyNeverOrNeverUndefined<T> = [T] extends [never]\n  ? true\n  : [T] extends [never | undefined]\n    ? [undefined] extends [T]\n      ? false\n      : true\n    : false;\n\nexport type OmitNever<T extends Record<string, unknown>> = {\n  [K in keyof T as IsExactlyNeverOrNeverUndefined<T[K]> extends true ? never : K]: T[K];\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-ky/sdk-client-required/core/utils.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-ky/sdk-client-required/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport { apiVVersionODataControllerCount, callToTestOrderOfParams, callWithDefaultOptionalParameters, callWithDefaultParameters, callWithDescriptions, callWithDuplicateResponses, callWithNoContentResponse, callWithParameters, callWithResponse, callWithResponseAndNoContentResponse, callWithResponses, callWithResultFromHeader, callWithWeirdParameterNames, collectionFormat, complexParams, complexTypes, deleteCallWithoutParametersAndResponse, deleteFoo, deprecatedCall, dummyA, dummyB, duplicateName, duplicateName2, duplicateName3, duplicateName4, export_, fileResponse, fooWow, getApiVbyApiVersionSimpleOperation, getCallWithOptionalParam, getCallWithoutParametersAndResponse, headCallWithoutParametersAndResponse, import_, multipartRequest, multipartResponse, nonAsciiæøåÆøÅöôêÊ字符串, type Options, optionsCallWithoutParametersAndResponse, patchApiVbyApiVersionNoTag, patchCallWithoutParametersAndResponse, postApiVbyApiVersionFormData, postApiVbyApiVersionRequestBody, postCallWithOptionalParam, postCallWithoutParametersAndResponse, putCallWithoutParametersAndResponse, putWithFormUrlEncoded, testErrorCode, types, uploadFile } from './sdk.gen';\nexport type { _3eNum1Период, _400, AdditionalPropertiesIntegerIssue, AdditionalPropertiesUnknownIssue, AdditionalPropertiesUnknownIssue2, AdditionalPropertiesUnknownIssue3, AdditionalPropertiesUnknownIssueWritable, AnyOfAnyAndNull, AnyOfArrays, ApiVVersionODataControllerCountData, ApiVVersionODataControllerCountResponse, ApiVVersionODataControllerCountResponses, ArrayWithAnyOfProperties, ArrayWithArray, ArrayWithBooleans, ArrayWithNumbers, ArrayWithProperties, ArrayWithReferences, ArrayWithStrings, CallToTestOrderOfParamsData, CallWithDefaultOptionalParametersData, CallWithDefaultParametersData, CallWithDescriptionsData, CallWithDuplicateResponsesData, CallWithDuplicateResponsesError, CallWithDuplicateResponsesErrors, CallWithDuplicateResponsesResponse, CallWithDuplicateResponsesResponses, CallWithNoContentResponseData, CallWithNoContentResponseResponse, CallWithNoContentResponseResponses, CallWithParametersData, CallWithResponseAndNoContentResponseData, CallWithResponseAndNoContentResponseResponse, CallWithResponseAndNoContentResponseResponses, CallWithResponseData, CallWithResponseResponse, CallWithResponseResponses, CallWithResponsesData, CallWithResponsesError, CallWithResponsesErrors, CallWithResponsesResponse, CallWithResponsesResponses, CallWithResultFromHeaderData, CallWithResultFromHeaderErrors, CallWithResultFromHeaderResponses, CallWithWeirdParameterNamesData, CamelCaseCommentWithBreaks, CharactersInDescription, ClientOptions, CollectionFormatData, CommentWithBackticks, CommentWithBackticksAndQuotes, CommentWithBreaks, CommentWithExpressionPlaceholders, CommentWithQuotes, CommentWithReservedCharacters, CommentWithSlashes, ComplexParamsData, ComplexParamsResponse, ComplexParamsResponses, ComplexTypesData, ComplexTypesErrors, ComplexTypesResponse, ComplexTypesResponses, CompositionBaseModel, CompositionExtendedModel, CompositionWithAllOfAndNullable, CompositionWithAnyOf, CompositionWithAnyOfAndNullable, CompositionWithAnyOfAnonymous, CompositionWithNestedAnyAndTypeNull, CompositionWithNestedAnyOfAndNull, CompositionWithOneOf, CompositionWithOneOfAndComplexArrayDictionary, CompositionWithOneOfAndNullable, CompositionWithOneOfAndProperties, CompositionWithOneOfAndSimpleArrayDictionary, CompositionWithOneOfAndSimpleDictionary, CompositionWithOneOfAnonymous, CompositionWithOneOfDiscriminator, ConstValue, Default, DeleteCallWithoutParametersAndResponseData, DeleteFooData, DeleteFooData2, DeleteFooData3, DeprecatedCallData, DeprecatedModel, DictionaryWithArray, DictionaryWithDictionary, DictionaryWithProperties, DictionaryWithPropertiesAndAdditionalProperties, DictionaryWithReference, DictionaryWithString, DummyAData, DummyAResponse, DummyAResponses, DummyBData, DummyBResponse, DummyBResponses, DuplicateName2Data, DuplicateName3Data, DuplicateName4Data, DuplicateNameData, EnumFromDescription, EnumWithExtensions, EnumWithNumbers, EnumWithReplacedCharacters, EnumWithStrings, EnumWithXEnumNames, ExportData, ExternalRefA, ExternalRefB, ExternalSharedModel, File, FileResponseData, FileResponseResponse, FileResponseResponses, FileWritable, FooWowData, FooWowResponses, FreeFormObjectWithAdditionalPropertiesEqEmptyObject, FreeFormObjectWithAdditionalPropertiesEqTrue, FreeFormObjectWithoutAdditionalProperties, GenericSchemaDuplicateIssue1SystemBoolean, GenericSchemaDuplicateIssue1SystemBooleanWritable, GenericSchemaDuplicateIssue1SystemString, GenericSchemaDuplicateIssue1SystemStringWritable, GetApiVbyApiVersionSimpleOperationData, GetApiVbyApiVersionSimpleOperationError, GetApiVbyApiVersionSimpleOperationErrors, GetApiVbyApiVersionSimpleOperationResponse, GetApiVbyApiVersionSimpleOperationResponses, GetCallWithOptionalParamData, GetCallWithoutParametersAndResponseData, HeadCallWithoutParametersAndResponseData, Import, ImportData, ImportResponse, ImportResponses, IoK8sApimachineryPkgApisMetaV1DeleteOptions, IoK8sApimachineryPkgApisMetaV1Preconditions, ModelCircle, ModelFromZendesk, ModelSquare, ModelThatExtends, ModelThatExtendsExtends, ModelWithAdditionalPropertiesEqTrue, ModelWithAdditionalPropertiesRef, ModelWithAnyOfConstantSizeArray, ModelWithAnyOfConstantSizeArrayAndIntersect, ModelWithAnyOfConstantSizeArrayNullable, ModelWithAnyOfConstantSizeArrayWithNSizeAndOptions, ModelWithAnyOfConstantSizeArrayWithNSizeAndOptionsWritable, ModelWithArray, ModelWithArrayReadOnlyAndWriteOnly, ModelWithArrayReadOnlyAndWriteOnlyWritable, ModelWithBackticksInDescription, ModelWithBoolean, ModelWithCircularReference, ModelWithConst, ModelWithConstantSizeArray, ModelWithDictionary, ModelWithDuplicateImports, ModelWithDuplicateProperties, ModelWithEnum, ModelWithEnumFromDescription, ModelWithEnumWithHyphen, ModelWithInteger, ModelWithNestedArrayEnums, ModelWithNestedArrayEnumsData, ModelWithNestedArrayEnumsDataBar, ModelWithNestedArrayEnumsDataFoo, ModelWithNestedCompositionEnums, ModelWithNestedEnums, ModelWithNestedProperties, ModelWithNullableObject, ModelWithNullableString, ModelWithNumericEnumUnion, ModelWithOneOfAndProperties, ModelWithOneOfEnum, ModelWithOrderedProperties, ModelWithPattern, ModelWithPatternWritable, ModelWithPrefixItemsConstantSizeArray, ModelWithProperties, ModelWithPropertiesWritable, ModelWithReadOnlyAndWriteOnly, ModelWithReadOnlyAndWriteOnlyWritable, ModelWithReference, ModelWithReferenceWritable, ModelWithString, ModelWithStringError, MultipartRequestData, MultipartResponseData, MultipartResponseResponse, MultipartResponseResponses, NestedAnyOfArraysNullable, NonAsciiæøåÆøÅöôêÊ字符串Data, NonAsciiæøåÆøÅöôêÊ字符串Response, NonAsciiæøåÆøÅöôêÊ字符串Responses, NonAsciiStringæøåÆøÅöôêÊ字符串, NullableObject, OneOfAllOfIssue, OneOfAllOfIssueWritable, OptionsCallWithoutParametersAndResponseData, Pageable, ParameterSimpleParameterUnused, PatchApiVbyApiVersionNoTagData, PatchApiVbyApiVersionNoTagResponses, PatchCallWithoutParametersAndResponseData, PostApiVbyApiVersionFormDataData, PostApiVbyApiVersionRequestBodyData, PostCallWithOptionalParamData, PostCallWithOptionalParamResponse, PostCallWithOptionalParamResponses, PostCallWithoutParametersAndResponseData, PostServiceWithEmptyTagResponse, PostServiceWithEmptyTagResponse2, PutCallWithoutParametersAndResponseData, PutWithFormUrlEncodedData, SchemaWithFormRestrictedKeys, SimpleBoolean, SimpleFile, SimpleFormData, SimpleInteger, SimpleParameter, SimpleReference, SimpleRequestBody, SimpleString, SimpleStringWithPattern, TestErrorCodeData, TestErrorCodeErrors, TestErrorCodeResponses, TypesData, TypesResponse, TypesResponses, UploadFileData, UploadFileResponse, UploadFileResponses, XFooBar } from './types.gen';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-ky/sdk-client-required/sdk.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport { type Client, formDataBodySerializer, type Options as Options2, type TDataShape, urlSearchParamsBodySerializer } from './client';\nimport type { ApiVVersionODataControllerCountData, ApiVVersionODataControllerCountResponses, CallToTestOrderOfParamsData, CallWithDefaultOptionalParametersData, CallWithDefaultParametersData, CallWithDescriptionsData, CallWithDuplicateResponsesData, CallWithDuplicateResponsesErrors, CallWithDuplicateResponsesResponses, CallWithNoContentResponseData, CallWithNoContentResponseResponses, CallWithParametersData, CallWithResponseAndNoContentResponseData, CallWithResponseAndNoContentResponseResponses, CallWithResponseData, CallWithResponseResponses, CallWithResponsesData, CallWithResponsesErrors, CallWithResponsesResponses, CallWithResultFromHeaderData, CallWithResultFromHeaderErrors, CallWithResultFromHeaderResponses, CallWithWeirdParameterNamesData, CollectionFormatData, ComplexParamsData, ComplexParamsResponses, ComplexTypesData, ComplexTypesErrors, ComplexTypesResponses, DeleteCallWithoutParametersAndResponseData, DeleteFooData3, DeprecatedCallData, DummyAData, DummyAResponses, DummyBData, DummyBResponses, DuplicateName2Data, DuplicateName3Data, DuplicateName4Data, DuplicateNameData, ExportData, FileResponseData, FileResponseResponses, FooWowData, FooWowResponses, GetApiVbyApiVersionSimpleOperationData, GetApiVbyApiVersionSimpleOperationErrors, GetApiVbyApiVersionSimpleOperationResponses, GetCallWithOptionalParamData, GetCallWithoutParametersAndResponseData, HeadCallWithoutParametersAndResponseData, ImportData, ImportResponses, MultipartRequestData, MultipartResponseData, MultipartResponseResponses, NonAsciiæøåÆøÅöôêÊ字符串Data, NonAsciiæøåÆøÅöôêÊ字符串Responses, OptionsCallWithoutParametersAndResponseData, PatchApiVbyApiVersionNoTagData, PatchApiVbyApiVersionNoTagResponses, PatchCallWithoutParametersAndResponseData, PostApiVbyApiVersionFormDataData, PostApiVbyApiVersionRequestBodyData, PostCallWithOptionalParamData, PostCallWithOptionalParamResponses, PostCallWithoutParametersAndResponseData, PutCallWithoutParametersAndResponseData, PutWithFormUrlEncodedData, TestErrorCodeData, TestErrorCodeErrors, TestErrorCodeResponses, TypesData, TypesResponses, UploadFileData, UploadFileResponses } from './types.gen';\n\nexport type Options<TData extends TDataShape = TDataShape, ThrowOnError extends boolean = boolean> = Options2<TData, ThrowOnError> & {\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\nexport const export_ = <ThrowOnError extends boolean = false>(options: Options<ExportData, ThrowOnError>) => options.client.get<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/no+tag', ...options });\n\nexport const patchApiVbyApiVersionNoTag = <ThrowOnError extends boolean = false>(options: Options<PatchApiVbyApiVersionNoTagData, ThrowOnError>) => options.client.patch<PatchApiVbyApiVersionNoTagResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/no+tag', ...options });\n\nexport const import_ = <ThrowOnError extends boolean = false>(options: Options<ImportData, ThrowOnError>) => options.client.post<ImportResponses, unknown, ThrowOnError>({\n    url: '/api/v{api-version}/no+tag',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options.headers\n    }\n});\n\nexport const fooWow = <ThrowOnError extends boolean = false>(options: Options<FooWowData, ThrowOnError>) => options.client.put<FooWowResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/no+tag', ...options });\n\nexport const apiVVersionODataControllerCount = <ThrowOnError extends boolean = false>(options: Options<ApiVVersionODataControllerCountData, ThrowOnError>) => options.client.get<ApiVVersionODataControllerCountResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple/$count', ...options });\n\nexport const getApiVbyApiVersionSimpleOperation = <ThrowOnError extends boolean = false>(options: Options<GetApiVbyApiVersionSimpleOperationData, ThrowOnError>) => options.client.get<GetApiVbyApiVersionSimpleOperationResponses, GetApiVbyApiVersionSimpleOperationErrors, ThrowOnError>({ url: '/api/v{api-version}/simple:operation', ...options });\n\nexport const deleteCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options: Options<DeleteCallWithoutParametersAndResponseData, ThrowOnError>) => options.client.delete<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const getCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options: Options<GetCallWithoutParametersAndResponseData, ThrowOnError>) => options.client.get<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const headCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options: Options<HeadCallWithoutParametersAndResponseData, ThrowOnError>) => options.client.head<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const optionsCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options: Options<OptionsCallWithoutParametersAndResponseData, ThrowOnError>) => options.client.options<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const patchCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options: Options<PatchCallWithoutParametersAndResponseData, ThrowOnError>) => options.client.patch<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const postCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options: Options<PostCallWithoutParametersAndResponseData, ThrowOnError>) => options.client.post<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const putCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options: Options<PutCallWithoutParametersAndResponseData, ThrowOnError>) => options.client.put<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const deleteFoo = <ThrowOnError extends boolean = false>(options: Options<DeleteFooData3, ThrowOnError>) => options.client.delete<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/foo/{foo_param}/bar/{BarParam}', ...options });\n\nexport const callWithDescriptions = <ThrowOnError extends boolean = false>(options: Options<CallWithDescriptionsData, ThrowOnError>) => options.client.post<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/descriptions', ...options });\n\n/**\n * @deprecated\n */\nexport const deprecatedCall = <ThrowOnError extends boolean = false>(options: Options<DeprecatedCallData, ThrowOnError>) => options.client.post<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/parameters/deprecated', ...options });\n\nexport const callWithParameters = <ThrowOnError extends boolean = false>(options: Options<CallWithParametersData, ThrowOnError>) => options.client.post<unknown, unknown, ThrowOnError>({\n    url: '/api/v{api-version}/parameters/{parameterPath}',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options.headers\n    }\n});\n\nexport const callWithWeirdParameterNames = <ThrowOnError extends boolean = false>(options: Options<CallWithWeirdParameterNamesData, ThrowOnError>) => options.client.post<unknown, unknown, ThrowOnError>({\n    url: '/api/v{api-version}/parameters/{parameter.path.1}/{parameter-path-2}/{PARAMETER-PATH-3}',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options.headers\n    }\n});\n\nexport const getCallWithOptionalParam = <ThrowOnError extends boolean = false>(options: Options<GetCallWithOptionalParamData, ThrowOnError>) => options.client.get<unknown, unknown, ThrowOnError>({\n    url: '/api/v{api-version}/parameters',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options.headers\n    }\n});\n\nexport const postCallWithOptionalParam = <ThrowOnError extends boolean = false>(options: Options<PostCallWithOptionalParamData, ThrowOnError>) => options.client.post<PostCallWithOptionalParamResponses, unknown, ThrowOnError>({\n    url: '/api/v{api-version}/parameters',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options.headers\n    }\n});\n\nexport const postApiVbyApiVersionRequestBody = <ThrowOnError extends boolean = false>(options: Options<PostApiVbyApiVersionRequestBodyData, ThrowOnError>) => options.client.post<unknown, unknown, ThrowOnError>({\n    url: '/api/v{api-version}/requestBody',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options.headers\n    }\n});\n\nexport const postApiVbyApiVersionFormData = <ThrowOnError extends boolean = false>(options: Options<PostApiVbyApiVersionFormDataData, ThrowOnError>) => options.client.post<unknown, unknown, ThrowOnError>({\n    ...formDataBodySerializer,\n    url: '/api/v{api-version}/formData',\n    ...options,\n    headers: {\n        'Content-Type': null,\n        ...options.headers\n    }\n});\n\nexport const callWithDefaultParameters = <ThrowOnError extends boolean = false>(options: Options<CallWithDefaultParametersData, ThrowOnError>) => options.client.get<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/defaults', ...options });\n\nexport const callWithDefaultOptionalParameters = <ThrowOnError extends boolean = false>(options: Options<CallWithDefaultOptionalParametersData, ThrowOnError>) => options.client.post<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/defaults', ...options });\n\nexport const callToTestOrderOfParams = <ThrowOnError extends boolean = false>(options: Options<CallToTestOrderOfParamsData, ThrowOnError>) => options.client.put<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/defaults', ...options });\n\nexport const duplicateName = <ThrowOnError extends boolean = false>(options: Options<DuplicateNameData, ThrowOnError>) => options.client.delete<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/duplicate', ...options });\n\nexport const duplicateName2 = <ThrowOnError extends boolean = false>(options: Options<DuplicateName2Data, ThrowOnError>) => options.client.get<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/duplicate', ...options });\n\nexport const duplicateName3 = <ThrowOnError extends boolean = false>(options: Options<DuplicateName3Data, ThrowOnError>) => options.client.post<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/duplicate', ...options });\n\nexport const duplicateName4 = <ThrowOnError extends boolean = false>(options: Options<DuplicateName4Data, ThrowOnError>) => options.client.put<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/duplicate', ...options });\n\nexport const callWithNoContentResponse = <ThrowOnError extends boolean = false>(options: Options<CallWithNoContentResponseData, ThrowOnError>) => options.client.get<CallWithNoContentResponseResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/no-content', ...options });\n\nexport const callWithResponseAndNoContentResponse = <ThrowOnError extends boolean = false>(options: Options<CallWithResponseAndNoContentResponseData, ThrowOnError>) => options.client.get<CallWithResponseAndNoContentResponseResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/multiple-tags/response-and-no-content', ...options });\n\nexport const dummyA = <ThrowOnError extends boolean = false>(options: Options<DummyAData, ThrowOnError>) => options.client.get<DummyAResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/multiple-tags/a', ...options });\n\nexport const dummyB = <ThrowOnError extends boolean = false>(options: Options<DummyBData, ThrowOnError>) => options.client.get<DummyBResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/multiple-tags/b', ...options });\n\nexport const callWithResponse = <ThrowOnError extends boolean = false>(options: Options<CallWithResponseData, ThrowOnError>) => options.client.get<CallWithResponseResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/response', ...options });\n\nexport const callWithDuplicateResponses = <ThrowOnError extends boolean = false>(options: Options<CallWithDuplicateResponsesData, ThrowOnError>) => options.client.post<CallWithDuplicateResponsesResponses, CallWithDuplicateResponsesErrors, ThrowOnError>({ url: '/api/v{api-version}/response', ...options });\n\nexport const callWithResponses = <ThrowOnError extends boolean = false>(options: Options<CallWithResponsesData, ThrowOnError>) => options.client.put<CallWithResponsesResponses, CallWithResponsesErrors, ThrowOnError>({ url: '/api/v{api-version}/response', ...options });\n\nexport const collectionFormat = <ThrowOnError extends boolean = false>(options: Options<CollectionFormatData, ThrowOnError>) => options.client.get<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/collectionFormat', ...options });\n\nexport const types = <ThrowOnError extends boolean = false>(options: Options<TypesData, ThrowOnError>) => options.client.get<TypesResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/types', ...options });\n\nexport const uploadFile = <ThrowOnError extends boolean = false>(options: Options<UploadFileData, ThrowOnError>) => options.client.post<UploadFileResponses, unknown, ThrowOnError>({\n    ...urlSearchParamsBodySerializer,\n    url: '/api/v{api-version}/upload',\n    ...options,\n    headers: {\n        'Content-Type': 'application/x-www-form-urlencoded',\n        ...options.headers\n    }\n});\n\nexport const fileResponse = <ThrowOnError extends boolean = false>(options: Options<FileResponseData, ThrowOnError>) => options.client.get<FileResponseResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/file/{id}', ...options });\n\nexport const complexTypes = <ThrowOnError extends boolean = false>(options: Options<ComplexTypesData, ThrowOnError>) => options.client.get<ComplexTypesResponses, ComplexTypesErrors, ThrowOnError>({\n    querySerializer: { parameters: { parameterObject: { object: { style: 'form' } } } },\n    url: '/api/v{api-version}/complex',\n    ...options\n});\n\nexport const multipartResponse = <ThrowOnError extends boolean = false>(options: Options<MultipartResponseData, ThrowOnError>) => options.client.get<MultipartResponseResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/multipart', ...options });\n\nexport const multipartRequest = <ThrowOnError extends boolean = false>(options: Options<MultipartRequestData, ThrowOnError>) => options.client.post<unknown, unknown, ThrowOnError>({\n    ...formDataBodySerializer,\n    url: '/api/v{api-version}/multipart',\n    ...options,\n    headers: {\n        'Content-Type': null,\n        ...options.headers\n    }\n});\n\nexport const complexParams = <ThrowOnError extends boolean = false>(options: Options<ComplexParamsData, ThrowOnError>) => options.client.put<ComplexParamsResponses, unknown, ThrowOnError>({\n    url: '/api/v{api-version}/complex/{id}',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json-patch+json',\n        ...options.headers\n    }\n});\n\nexport const callWithResultFromHeader = <ThrowOnError extends boolean = false>(options: Options<CallWithResultFromHeaderData, ThrowOnError>) => options.client.post<CallWithResultFromHeaderResponses, CallWithResultFromHeaderErrors, ThrowOnError>({ url: '/api/v{api-version}/header', ...options });\n\nexport const testErrorCode = <ThrowOnError extends boolean = false>(options: Options<TestErrorCodeData, ThrowOnError>) => options.client.post<TestErrorCodeResponses, TestErrorCodeErrors, ThrowOnError>({ url: '/api/v{api-version}/error', ...options });\n\nexport const nonAsciiæøåÆøÅöôêÊ字符串 = <ThrowOnError extends boolean = false>(options: Options<NonAsciiæøåÆøÅöôêÊ字符串Data, ThrowOnError>) => options.client.post<NonAsciiæøåÆøÅöôêÊ字符串Responses, unknown, ThrowOnError>({ url: '/api/v{api-version}/non-ascii-æøåÆØÅöôêÊ字符串', ...options });\n\n/**\n * Login User\n */\nexport const putWithFormUrlEncoded = <ThrowOnError extends boolean = false>(options: Options<PutWithFormUrlEncodedData, ThrowOnError>) => options.client.put<unknown, unknown, ThrowOnError>({\n    ...urlSearchParamsBodySerializer,\n    url: '/api/v{api-version}/non-ascii-æøåÆØÅöôêÊ字符串',\n    ...options,\n    headers: {\n        'Content-Type': 'application/x-www-form-urlencoded',\n        ...options.headers\n    }\n});\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-ky/sdk-client-required/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type ClientOptions = {\n    baseUrl: 'http://localhost:3000/base' | (string & {});\n};\n\n/**\n * Model with number-only name\n */\nexport type _400 = string;\n\n/**\n * External ref to shared model (A)\n */\nexport type ExternalRefA = ExternalSharedModel;\n\n/**\n * External ref to shared model (B)\n */\nexport type ExternalRefB = ExternalSharedModel;\n\n/**\n * Testing multiline comments in string: First line\n * Second line\n *\n * Fourth line\n */\nexport type CamelCaseCommentWithBreaks = number;\n\n/**\n * Testing multiline comments in string: First line\n * Second line\n *\n * Fourth line\n */\nexport type CommentWithBreaks = number;\n\n/**\n * Testing backticks in string: `backticks` and ```multiple backticks``` should work\n */\nexport type CommentWithBackticks = number;\n\n/**\n * Testing backticks and quotes in string: `backticks`, 'quotes', \"double quotes\" and ```multiple backticks``` should work\n */\nexport type CommentWithBackticksAndQuotes = number;\n\n/**\n * Testing slashes in string: \\backwards\\\\\\ and /forwards/// should work\n */\nexport type CommentWithSlashes = number;\n\n/**\n * Testing expression placeholders in string: ${expression} should work\n */\nexport type CommentWithExpressionPlaceholders = number;\n\n/**\n * Testing quotes in string: 'single quote''' and \"double quotes\"\"\" should work\n */\nexport type CommentWithQuotes = number;\n\n/**\n * Testing reserved characters in string: * inline * and ** inline ** should work\n */\nexport type CommentWithReservedCharacters = number;\n\n/**\n * This is a simple number\n */\nexport type SimpleInteger = number;\n\n/**\n * This is a simple boolean\n */\nexport type SimpleBoolean = boolean;\n\n/**\n * This is a simple string\n */\nexport type SimpleString = string;\n\n/**\n * A string with non-ascii (unicode) characters valid in typescript identifiers (æøåÆØÅöÔèÈ字符串)\n */\nexport type NonAsciiStringæøåÆøÅöôêÊ字符串 = string;\n\n/**\n * This is a simple file\n */\nexport type SimpleFile = Blob | File;\n\n/**\n * This is a simple reference\n */\nexport type SimpleReference = ModelWithString;\n\n/**\n * This is a simple string\n */\nexport type SimpleStringWithPattern = string | null;\n\n/**\n * This is a simple enum with strings\n */\nexport type EnumWithStrings = 'Success' | 'Warning' | 'Error' | '\\'Single Quote\\'' | '\"Double Quotes\"' | 'Non-ascii: øæåôöØÆÅÔÖ字符串';\n\nexport type EnumWithReplacedCharacters = '\\'Single Quote\\'' | '\"Double Quotes\"' | 'øæåôöØÆÅÔÖ字符串' | 3.1 | '';\n\n/**\n * This is a simple enum with numbers\n */\nexport type EnumWithNumbers = 1 | 2 | 3 | 1.1 | 1.2 | 1.3 | 100 | 200 | 300 | -100 | -200 | -300 | -1.1 | -1.2 | -1.3;\n\n/**\n * Success=1,Warning=2,Error=3\n */\nexport type EnumFromDescription = number;\n\n/**\n * This is a simple enum with numbers\n */\nexport type EnumWithExtensions = 200 | 400 | 500;\n\nexport type EnumWithXEnumNames = 0 | 1 | 2;\n\n/**\n * This is a simple array with numbers\n */\nexport type ArrayWithNumbers = Array<number>;\n\n/**\n * This is a simple array with booleans\n */\nexport type ArrayWithBooleans = Array<boolean>;\n\n/**\n * This is a simple array with strings\n */\nexport type ArrayWithStrings = Array<string>;\n\n/**\n * This is a simple array with references\n */\nexport type ArrayWithReferences = Array<ModelWithString>;\n\n/**\n * This is a simple array containing an array\n */\nexport type ArrayWithArray = Array<Array<ModelWithString>>;\n\n/**\n * This is a simple array with properties\n */\nexport type ArrayWithProperties = Array<{\n    '16x16'?: CamelCaseCommentWithBreaks;\n    bar?: string;\n}>;\n\n/**\n * This is a simple array with any of properties\n */\nexport type ArrayWithAnyOfProperties = Array<{\n    foo?: string;\n} | {\n    bar?: string;\n}>;\n\nexport type AnyOfAnyAndNull = {\n    data?: unknown | null;\n};\n\n/**\n * This is a simple array with any of properties\n */\nexport type AnyOfArrays = {\n    results?: Array<{\n        foo?: string;\n    } | {\n        bar?: string;\n    }>;\n};\n\n/**\n * This is a string dictionary\n */\nexport type DictionaryWithString = {\n    [key: string]: string;\n};\n\nexport type DictionaryWithPropertiesAndAdditionalProperties = {\n    foo?: number;\n    bar?: boolean;\n    [key: string]: string | number | boolean | undefined;\n};\n\n/**\n * This is a string reference\n */\nexport type DictionaryWithReference = {\n    [key: string]: ModelWithString;\n};\n\n/**\n * This is a complex dictionary\n */\nexport type DictionaryWithArray = {\n    [key: string]: Array<ModelWithString>;\n};\n\n/**\n * This is a string dictionary\n */\nexport type DictionaryWithDictionary = {\n    [key: string]: {\n        [key: string]: string;\n    };\n};\n\n/**\n * This is a complex dictionary\n */\nexport type DictionaryWithProperties = {\n    [key: string]: {\n        foo?: string;\n        bar?: string;\n    };\n};\n\n/**\n * This is a model with one number property\n */\nexport type ModelWithInteger = {\n    /**\n     * This is a simple number property\n     */\n    prop?: number;\n};\n\n/**\n * This is a model with one boolean property\n */\nexport type ModelWithBoolean = {\n    /**\n     * This is a simple boolean property\n     */\n    prop?: boolean;\n};\n\n/**\n * This is a model with one string property\n */\nexport type ModelWithString = {\n    /**\n     * This is a simple string property\n     */\n    prop?: string;\n};\n\n/**\n * This is a model with one string property\n */\nexport type ModelWithStringError = {\n    /**\n     * This is a simple string property\n     */\n    prop?: string;\n};\n\n/**\n * `Comment` or `VoiceComment`. The JSON object for adding voice comments to tickets is different. See [Adding voice comments to tickets](/documentation/ticketing/managing-tickets/adding-voice-comments-to-tickets)\n */\nexport type ModelFromZendesk = string;\n\n/**\n * This is a model with one string property\n */\nexport type ModelWithNullableString = {\n    /**\n     * This is a simple string property\n     */\n    nullableProp1?: string | null;\n    /**\n     * This is a simple string property\n     */\n    nullableRequiredProp1: string | null;\n    /**\n     * This is a simple string property\n     */\n    nullableProp2?: string | null;\n    /**\n     * This is a simple string property\n     */\n    nullableRequiredProp2: string | null;\n    /**\n     * This is a simple enum with strings\n     */\n    'foo_bar-enum'?: 'Success' | 'Warning' | 'Error' | 'ØÆÅ字符串';\n};\n\n/**\n * This is a model with one enum\n */\nexport type ModelWithEnum = {\n    /**\n     * This is a simple enum with strings\n     */\n    'foo_bar-enum'?: 'Success' | 'Warning' | 'Error' | 'ØÆÅ字符串';\n    /**\n     * These are the HTTP error code enums\n     */\n    statusCode?: '100' | '200 FOO' | '300 FOO_BAR' | '400 foo-bar' | '500 foo.bar' | '600 foo&bar';\n    /**\n     * Simple boolean enum\n     */\n    bool?: true;\n};\n\n/**\n * This is a model with one enum with escaped name\n */\nexport type ModelWithEnumWithHyphen = {\n    /**\n     * Foo-Bar-Baz-Qux\n     */\n    'foo-bar-baz-qux'?: '3.0';\n};\n\n/**\n * This is a model with one enum\n */\nexport type ModelWithEnumFromDescription = {\n    /**\n     * Success=1,Warning=2,Error=3\n     */\n    test?: number;\n};\n\n/**\n * This is a model with nested enums\n */\nexport type ModelWithNestedEnums = {\n    dictionaryWithEnum?: {\n        [key: string]: 'Success' | 'Warning' | 'Error';\n    };\n    dictionaryWithEnumFromDescription?: {\n        [key: string]: number;\n    };\n    arrayWithEnum?: Array<'Success' | 'Warning' | 'Error'>;\n    arrayWithDescription?: Array<number>;\n    /**\n     * This is a simple enum with strings\n     */\n    'foo_bar-enum'?: 'Success' | 'Warning' | 'Error' | 'ØÆÅ字符串';\n};\n\n/**\n * This is a model with one property containing a reference\n */\nexport type ModelWithReference = {\n    prop?: ModelWithProperties;\n};\n\n/**\n * This is a model with one property containing an array\n */\nexport type ModelWithArrayReadOnlyAndWriteOnly = {\n    prop?: Array<ModelWithReadOnlyAndWriteOnly>;\n    propWithFile?: Array<Blob | File>;\n    propWithNumber?: Array<number>;\n};\n\n/**\n * This is a model with one property containing an array\n */\nexport type ModelWithArray = {\n    prop?: Array<ModelWithString>;\n    propWithFile?: Array<Blob | File>;\n    propWithNumber?: Array<number>;\n};\n\n/**\n * This is a model with one property containing a dictionary\n */\nexport type ModelWithDictionary = {\n    prop?: {\n        [key: string]: string;\n    };\n};\n\n/**\n * This is a deprecated model with a deprecated property\n *\n * @deprecated\n */\nexport type DeprecatedModel = {\n    /**\n     * This is a deprecated property\n     *\n     * @deprecated\n     */\n    prop?: string;\n};\n\n/**\n * This is a model with one property containing a circular reference\n */\nexport type ModelWithCircularReference = {\n    prop?: ModelWithCircularReference;\n};\n\n/**\n * This is a model with one property with a 'one of' relationship\n */\nexport type CompositionWithOneOf = {\n    propA?: ModelWithString | ModelWithEnum | ModelWithArray | ModelWithDictionary;\n};\n\n/**\n * This is a model with one property with a 'one of' relationship where the options are not $ref\n */\nexport type CompositionWithOneOfAnonymous = {\n    propA?: {\n        propA?: string;\n    } | string | number;\n};\n\n/**\n * Circle\n */\nexport type ModelCircle = {\n    kind: string;\n    radius?: number;\n};\n\n/**\n * Square\n */\nexport type ModelSquare = {\n    kind: string;\n    sideLength?: number;\n};\n\n/**\n * This is a model with one property with a 'one of' relationship where the options are not $ref\n */\nexport type CompositionWithOneOfDiscriminator = ({\n    kind: 'circle';\n} & ModelCircle) | ({\n    kind: 'square';\n} & ModelSquare);\n\n/**\n * This is a model with one property with a 'any of' relationship\n */\nexport type CompositionWithAnyOf = {\n    propA?: ModelWithString | ModelWithEnum | ModelWithArray | ModelWithDictionary;\n};\n\n/**\n * This is a model with one property with a 'any of' relationship where the options are not $ref\n */\nexport type CompositionWithAnyOfAnonymous = {\n    propA?: {\n        propA?: string;\n    } | string | number;\n};\n\n/**\n * This is a model with nested 'any of' property with a type null\n */\nexport type CompositionWithNestedAnyAndTypeNull = {\n    propA?: Array<ModelWithDictionary | null> | Array<ModelWithArray | null>;\n};\n\nexport type _3eNum1Период = 'Bird' | 'Dog';\n\nexport type ConstValue = 'ConstValue';\n\n/**\n * This is a model with one property with a 'any of' relationship where the options are not $ref\n */\nexport type CompositionWithNestedAnyOfAndNull = {\n    /**\n     * Scopes\n     */\n    propA?: Array<_3eNum1Период | ConstValue> | null;\n};\n\n/**\n * This is a model with one property with a 'one of' relationship\n */\nexport type CompositionWithOneOfAndNullable = {\n    propA?: {\n        boolean?: boolean;\n    } | ModelWithEnum | ModelWithArray | ModelWithDictionary | null;\n};\n\n/**\n * This is a model that contains a simple dictionary within composition\n */\nexport type CompositionWithOneOfAndSimpleDictionary = {\n    propA?: boolean | {\n        [key: string]: number;\n    };\n};\n\n/**\n * This is a model that contains a dictionary of simple arrays within composition\n */\nexport type CompositionWithOneOfAndSimpleArrayDictionary = {\n    propA?: boolean | {\n        [key: string]: Array<boolean>;\n    };\n};\n\n/**\n * This is a model that contains a dictionary of complex arrays (composited) within composition\n */\nexport type CompositionWithOneOfAndComplexArrayDictionary = {\n    propA?: boolean | {\n        [key: string]: Array<number | string>;\n    };\n};\n\n/**\n * This is a model with one property with a 'all of' relationship\n */\nexport type CompositionWithAllOfAndNullable = {\n    propA?: ({\n        boolean?: boolean;\n    } & ModelWithEnum & ModelWithArray & ModelWithDictionary) | null;\n};\n\n/**\n * This is a model with one property with a 'any of' relationship\n */\nexport type CompositionWithAnyOfAndNullable = {\n    propA?: {\n        boolean?: boolean;\n    } | ModelWithEnum | ModelWithArray | ModelWithDictionary | null;\n};\n\n/**\n * This is a base model with two simple optional properties\n */\nexport type CompositionBaseModel = {\n    firstName?: string;\n    lastname?: string;\n};\n\n/**\n * This is a model that extends the base model\n */\nexport type CompositionExtendedModel = CompositionBaseModel & {\n    age: number;\n    firstName: string;\n    lastname: string;\n};\n\n/**\n * This is a model with one nested property\n */\nexport type ModelWithProperties = {\n    required: string;\n    readonly requiredAndReadOnly: string;\n    requiredAndNullable: string | null;\n    string?: string;\n    number?: number;\n    boolean?: boolean;\n    reference?: ModelWithString;\n    'property with space'?: string;\n    default?: string;\n    try?: string;\n    readonly '@namespace.string'?: string;\n    readonly '@namespace.integer'?: number;\n};\n\n/**\n * This is a model with one nested property\n */\nexport type ModelWithNestedProperties = {\n    readonly first: {\n        readonly second: {\n            readonly third: string | null;\n        } | null;\n    } | null;\n};\n\n/**\n * This is a model with duplicated properties\n */\nexport type ModelWithDuplicateProperties = {\n    prop?: ModelWithString;\n};\n\n/**\n * This is a model with ordered properties\n */\nexport type ModelWithOrderedProperties = {\n    zebra?: string;\n    apple?: string;\n    hawaii?: string;\n};\n\n/**\n * This is a model with duplicated imports\n */\nexport type ModelWithDuplicateImports = {\n    propA?: ModelWithString;\n    propB?: ModelWithString;\n    propC?: ModelWithString;\n};\n\n/**\n * This is a model that extends another model\n */\nexport type ModelThatExtends = ModelWithString & {\n    propExtendsA?: string;\n    propExtendsB?: ModelWithString;\n};\n\n/**\n * This is a model that extends another model\n */\nexport type ModelThatExtendsExtends = ModelWithString & ModelThatExtends & {\n    propExtendsC?: string;\n    propExtendsD?: ModelWithString;\n};\n\n/**\n * This is a model that contains a some patterns\n */\nexport type ModelWithPattern = {\n    key: string;\n    name: string;\n    readonly enabled?: boolean;\n    readonly modified?: string;\n    id?: string;\n    text?: string;\n    patternWithSingleQuotes?: string;\n    patternWithNewline?: string;\n    patternWithBacktick?: string;\n    patternWithUnicode?: string;\n};\n\nexport type File = {\n    /**\n     * Id\n     */\n    readonly id?: string;\n    /**\n     * Updated at\n     */\n    readonly updated_at?: string;\n    /**\n     * Created at\n     */\n    readonly created_at?: string;\n    /**\n     * Mime\n     */\n    mime: string;\n    /**\n     * File\n     */\n    readonly file?: string;\n};\n\nexport type Default = {\n    name?: string;\n};\n\nexport type Pageable = {\n    page?: number;\n    size?: number;\n    sort?: Array<string>;\n};\n\n/**\n * This is a free-form object without additionalProperties.\n */\nexport type FreeFormObjectWithoutAdditionalProperties = {\n    [key: string]: unknown;\n};\n\n/**\n * This is a free-form object with additionalProperties: true.\n */\nexport type FreeFormObjectWithAdditionalPropertiesEqTrue = {\n    [key: string]: unknown;\n};\n\n/**\n * This is a free-form object with additionalProperties: {}.\n */\nexport type FreeFormObjectWithAdditionalPropertiesEqEmptyObject = {\n    [key: string]: unknown;\n};\n\nexport type ModelWithConst = {\n    String?: 'String';\n    number?: 0;\n    null?: null;\n    withType?: 'Some string';\n};\n\n/**\n * This is a model with one property and additionalProperties: true\n */\nexport type ModelWithAdditionalPropertiesEqTrue = {\n    /**\n     * This is a simple string property\n     */\n    prop?: string;\n    [key: string]: unknown;\n};\n\nexport type NestedAnyOfArraysNullable = {\n    nullableArray?: Array<string | boolean> | null;\n};\n\nexport type CompositionWithOneOfAndProperties = ({\n    foo: SimpleParameter;\n} | {\n    bar: NonAsciiStringæøåÆøÅöôêÊ字符串;\n}) & {\n    baz: number | null;\n    qux: number;\n};\n\n/**\n * An object that can be null\n */\nexport type NullableObject = {\n    foo?: string;\n} | null;\n\n/**\n * Some % character\n */\nexport type CharactersInDescription = string;\n\nexport type ModelWithNullableObject = {\n    data?: NullableObject;\n};\n\n/**\n * An object with additional properties that can be null (anyOf ref + null)\n */\nexport type ModelWithAdditionalPropertiesRef = {\n    [key: string]: NullableObject | null;\n};\n\nexport type ModelWithOneOfEnum = {\n    foo: 'Bar';\n} | {\n    foo: 'Baz';\n} | {\n    foo: 'Qux';\n} | {\n    content: string;\n    foo: 'Quux';\n} | {\n    content: [\n        string,\n        string\n    ];\n    foo: 'Corge';\n};\n\nexport type ModelWithNestedArrayEnumsDataFoo = 'foo' | 'bar';\n\nexport type ModelWithNestedArrayEnumsDataBar = 'baz' | 'qux';\n\nexport type ModelWithNestedArrayEnumsData = {\n    foo?: Array<ModelWithNestedArrayEnumsDataFoo>;\n    bar?: Array<ModelWithNestedArrayEnumsDataBar>;\n};\n\nexport type ModelWithNestedArrayEnums = {\n    array_strings?: Array<string>;\n    data?: ModelWithNestedArrayEnumsData;\n};\n\nexport type ModelWithNestedCompositionEnums = {\n    foo?: ModelWithNestedArrayEnumsDataFoo;\n};\n\nexport type ModelWithReadOnlyAndWriteOnly = {\n    foo: string;\n    readonly bar: string;\n};\n\nexport type ModelWithConstantSizeArray = [\n    number,\n    number\n];\n\nexport type ModelWithAnyOfConstantSizeArray = [\n    number | string,\n    number | string,\n    number | string\n];\n\nexport type ModelWithPrefixItemsConstantSizeArray = [\n    ModelWithInteger,\n    number | string,\n    string\n];\n\nexport type ModelWithAnyOfConstantSizeArrayNullable = [\n    number | null | string,\n    number | null | string,\n    number | null | string\n];\n\nexport type ModelWithAnyOfConstantSizeArrayWithNSizeAndOptions = [\n    number | Import,\n    number | Import\n];\n\nexport type ModelWithAnyOfConstantSizeArrayAndIntersect = [\n    number & string,\n    number & string\n];\n\nexport type ModelWithNumericEnumUnion = {\n    /**\n     * Период\n     */\n    value?: -10 | -1 | 0 | 1 | 3 | 6 | 12;\n};\n\n/**\n * Some description with `back ticks`\n */\nexport type ModelWithBackticksInDescription = {\n    /**\n     * The template `that` should be used for parsing and importing the contents of the CSV file.\n     *\n     * <br/><p>There is one placeholder currently supported:<ul>     <li><b>${x}</b> - refers to the n-th column in the CSV file, e.g. ${1}, ${2}, ...)</li></ul><p>Example of a correct JSON template:</p>\n     * <pre>\n     * [\n     * {\n     * \"resourceType\": \"Asset\",\n     * \"identifier\": {\n     * \"name\": \"${1}\",\n     * \"domain\": {\n     * \"name\": \"${2}\",\n     * \"community\": {\n     * \"name\": \"Some Community\"\n     * }\n     * }\n     * },\n     * \"attributes\" : {\n     * \"00000000-0000-0000-0000-000000003115\" : [ {\n     * \"value\" : \"${3}\"\n     * } ],\n     * \"00000000-0000-0000-0000-000000000222\" : [ {\n     * \"value\" : \"${4}\"\n     * } ]\n     * }\n     * }\n     * ]\n     * </pre>\n     */\n    template?: string;\n};\n\nexport type ModelWithOneOfAndProperties = (SimpleParameter | NonAsciiStringæøåÆøÅöôêÊ字符串) & {\n    baz: number | null;\n    qux: number;\n};\n\n/**\n * Model used to test deduplication strategy (unused)\n */\nexport type ParameterSimpleParameterUnused = string;\n\n/**\n * Model used to test deduplication strategy\n */\nexport type PostServiceWithEmptyTagResponse = string;\n\n/**\n * Model used to test deduplication strategy\n */\nexport type PostServiceWithEmptyTagResponse2 = string;\n\n/**\n * Model used to test deduplication strategy\n */\nexport type DeleteFooData = string;\n\n/**\n * Model used to test deduplication strategy\n */\nexport type DeleteFooData2 = string;\n\n/**\n * Model with restricted keyword name\n */\nexport type Import = string;\n\nexport type SchemaWithFormRestrictedKeys = {\n    description?: string;\n    'x-enum-descriptions'?: string;\n    'x-enum-varnames'?: string;\n    'x-enumNames'?: string;\n    title?: string;\n    object?: {\n        description?: string;\n        'x-enum-descriptions'?: string;\n        'x-enum-varnames'?: string;\n        'x-enumNames'?: string;\n        title?: string;\n    };\n    array?: Array<{\n        description?: string;\n        'x-enum-descriptions'?: string;\n        'x-enum-varnames'?: string;\n        'x-enumNames'?: string;\n        title?: string;\n    }>;\n};\n\n/**\n * This schema was giving PascalCase transformations a hard time\n */\nexport type IoK8sApimachineryPkgApisMetaV1DeleteOptions = {\n    /**\n     * Must be fulfilled before a deletion is carried out. If not possible, a 409 Conflict status will be returned.\n     */\n    preconditions?: IoK8sApimachineryPkgApisMetaV1Preconditions;\n};\n\n/**\n * This schema was giving PascalCase transformations a hard time\n */\nexport type IoK8sApimachineryPkgApisMetaV1Preconditions = {\n    /**\n     * Specifies the target ResourceVersion\n     */\n    resourceVersion?: string;\n    /**\n     * Specifies the target UID.\n     */\n    uid?: string;\n};\n\nexport type AdditionalPropertiesUnknownIssue = {\n    [key: string]: string | number;\n};\n\nexport type AdditionalPropertiesUnknownIssue2 = {\n    [key: string]: string | number;\n};\n\nexport type AdditionalPropertiesUnknownIssue3 = string & {\n    entries: {\n        [key: string]: AdditionalPropertiesUnknownIssue;\n    };\n};\n\nexport type AdditionalPropertiesIntegerIssue = {\n    value: number;\n    [key: string]: number;\n};\n\nexport type OneOfAllOfIssue = ((ConstValue | GenericSchemaDuplicateIssue1SystemBoolean) & _3eNum1Период) | GenericSchemaDuplicateIssue1SystemString;\n\nexport type GenericSchemaDuplicateIssue1SystemBoolean = {\n    item?: boolean;\n    error?: string | null;\n    readonly hasError?: boolean;\n    data?: {\n        [key: string]: never;\n    };\n};\n\nexport type GenericSchemaDuplicateIssue1SystemString = {\n    item?: string | null;\n    error?: string | null;\n    readonly hasError?: boolean;\n};\n\nexport type ExternalSharedModel = {\n    id: string;\n    name?: string;\n};\n\n/**\n * This is a model with one property containing a reference\n */\nexport type ModelWithReferenceWritable = {\n    prop?: ModelWithPropertiesWritable;\n};\n\n/**\n * This is a model with one property containing an array\n */\nexport type ModelWithArrayReadOnlyAndWriteOnlyWritable = {\n    prop?: Array<ModelWithReadOnlyAndWriteOnlyWritable>;\n    propWithFile?: Array<Blob | File>;\n    propWithNumber?: Array<number>;\n};\n\n/**\n * This is a model with one nested property\n */\nexport type ModelWithPropertiesWritable = {\n    required: string;\n    requiredAndNullable: string | null;\n    string?: string;\n    number?: number;\n    boolean?: boolean;\n    reference?: ModelWithString;\n    'property with space'?: string;\n    default?: string;\n    try?: string;\n};\n\n/**\n * This is a model that contains a some patterns\n */\nexport type ModelWithPatternWritable = {\n    key: string;\n    name: string;\n    id?: string;\n    text?: string;\n    patternWithSingleQuotes?: string;\n    patternWithNewline?: string;\n    patternWithBacktick?: string;\n    patternWithUnicode?: string;\n};\n\nexport type FileWritable = {\n    /**\n     * Mime\n     */\n    mime: string;\n};\n\nexport type ModelWithReadOnlyAndWriteOnlyWritable = {\n    foo: string;\n    baz: string;\n};\n\nexport type ModelWithAnyOfConstantSizeArrayWithNSizeAndOptionsWritable = [\n    number | Import,\n    number | Import\n];\n\nexport type AdditionalPropertiesUnknownIssueWritable = {\n    [key: string]: string | number;\n};\n\nexport type OneOfAllOfIssueWritable = ((ConstValue | GenericSchemaDuplicateIssue1SystemBoolean) & _3eNum1Период) | GenericSchemaDuplicateIssue1SystemString;\n\nexport type GenericSchemaDuplicateIssue1SystemBooleanWritable = {\n    item?: boolean;\n    error?: string | null;\n    data?: {\n        [key: string]: never;\n    };\n};\n\nexport type GenericSchemaDuplicateIssue1SystemStringWritable = {\n    item?: string | null;\n    error?: string | null;\n};\n\n/**\n * This is a reusable parameter\n */\nexport type SimpleParameter = string;\n\n/**\n * Parameter with illegal characters\n */\nexport type XFooBar = ModelWithString;\n\n/**\n * A reusable request body\n */\nexport type SimpleRequestBody = ModelWithString;\n\n/**\n * A reusable request body\n */\nexport type SimpleFormData = ModelWithString;\n\nexport type ExportData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no+tag';\n};\n\nexport type PatchApiVbyApiVersionNoTagData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no+tag';\n};\n\nexport type PatchApiVbyApiVersionNoTagResponses = {\n    /**\n     * OK\n     */\n    default: unknown;\n};\n\nexport type ImportData = {\n    body: ModelWithReadOnlyAndWriteOnlyWritable | ModelWithArrayReadOnlyAndWriteOnlyWritable;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no+tag';\n};\n\nexport type ImportResponses = {\n    /**\n     * Success\n     */\n    200: ModelFromZendesk;\n    /**\n     * Default success response\n     */\n    default: ModelWithReadOnlyAndWriteOnly;\n};\n\nexport type ImportResponse = ImportResponses[keyof ImportResponses];\n\nexport type FooWowData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no+tag';\n};\n\nexport type FooWowResponses = {\n    /**\n     * OK\n     */\n    default: unknown;\n};\n\nexport type ApiVVersionODataControllerCountData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple/$count';\n};\n\nexport type ApiVVersionODataControllerCountResponses = {\n    /**\n     * Success\n     */\n    200: ModelFromZendesk;\n};\n\nexport type ApiVVersionODataControllerCountResponse = ApiVVersionODataControllerCountResponses[keyof ApiVVersionODataControllerCountResponses];\n\nexport type GetApiVbyApiVersionSimpleOperationData = {\n    body?: never;\n    path: {\n        /**\n         * foo in method\n         */\n        foo_param: string;\n    };\n    query?: never;\n    url: '/api/v{api-version}/simple:operation';\n};\n\nexport type GetApiVbyApiVersionSimpleOperationErrors = {\n    /**\n     * Default error response\n     */\n    default: ModelWithBoolean;\n};\n\nexport type GetApiVbyApiVersionSimpleOperationError = GetApiVbyApiVersionSimpleOperationErrors[keyof GetApiVbyApiVersionSimpleOperationErrors];\n\nexport type GetApiVbyApiVersionSimpleOperationResponses = {\n    /**\n     * Response is a simple number\n     */\n    200: number;\n};\n\nexport type GetApiVbyApiVersionSimpleOperationResponse = GetApiVbyApiVersionSimpleOperationResponses[keyof GetApiVbyApiVersionSimpleOperationResponses];\n\nexport type DeleteCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type GetCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type HeadCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type OptionsCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type PatchCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type PostCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type PutCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type DeleteFooData3 = {\n    body?: never;\n    headers: {\n        /**\n         * Parameter with illegal characters\n         */\n        'x-Foo-Bar': ModelWithString;\n    };\n    path: {\n        /**\n         * foo in method\n         */\n        foo_param: string;\n        /**\n         * bar in method\n         */\n        BarParam: string;\n    };\n    query?: never;\n    url: '/api/v{api-version}/foo/{foo_param}/bar/{BarParam}';\n};\n\nexport type CallWithDescriptionsData = {\n    body?: never;\n    path?: never;\n    query?: {\n        /**\n         * Testing multiline comments in string: First line\n         * Second line\n         *\n         * Fourth line\n         */\n        parameterWithBreaks?: string;\n        /**\n         * Testing backticks in string: `backticks` and ```multiple backticks``` should work\n         */\n        parameterWithBackticks?: string;\n        /**\n         * Testing slashes in string: \\backwards\\\\\\ and /forwards/// should work\n         */\n        parameterWithSlashes?: string;\n        /**\n         * Testing expression placeholders in string: ${expression} should work\n         */\n        parameterWithExpressionPlaceholders?: string;\n        /**\n         * Testing quotes in string: 'single quote''' and \"double quotes\"\"\" should work\n         */\n        parameterWithQuotes?: string;\n        /**\n         * Testing reserved characters in string: * inline * and ** inline ** should work\n         */\n        parameterWithReservedCharacters?: string;\n    };\n    url: '/api/v{api-version}/descriptions';\n};\n\nexport type DeprecatedCallData = {\n    body?: never;\n    headers: {\n        /**\n         * This parameter is deprecated\n         *\n         * @deprecated\n         */\n        parameter: DeprecatedModel | null;\n    };\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/parameters/deprecated';\n};\n\nexport type CallWithParametersData = {\n    /**\n     * This is the parameter that goes into the body\n     */\n    body: {\n        [key: string]: unknown;\n    } | null;\n    headers: {\n        /**\n         * This is the parameter that goes into the header\n         */\n        parameterHeader: string | null;\n    };\n    path: {\n        /**\n         * This is the parameter that goes into the path\n         */\n        parameterPath: string | null;\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string | null;\n    };\n    query: {\n        foo_ref_enum?: ModelWithNestedArrayEnumsDataFoo;\n        foo_all_of_enum: ModelWithNestedArrayEnumsDataFoo;\n        /**\n         * This is the parameter that goes into the query params\n         */\n        cursor: string | null;\n    };\n    url: '/api/v{api-version}/parameters/{parameterPath}';\n};\n\nexport type CallWithWeirdParameterNamesData = {\n    /**\n     * This is the parameter that goes into the body\n     */\n    body: ModelWithString | null;\n    headers: {\n        /**\n         * This is the parameter that goes into the request header\n         */\n        'parameter.header': string | null;\n    };\n    path: {\n        /**\n         * This is the parameter that goes into the path\n         */\n        'parameter.path.1'?: string;\n        /**\n         * This is the parameter that goes into the path\n         */\n        'parameter-path-2'?: string;\n        /**\n         * This is the parameter that goes into the path\n         */\n        'PARAMETER-PATH-3'?: string;\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string | null;\n    };\n    query: {\n        /**\n         * This is the parameter with a reserved keyword\n         */\n        default?: string;\n        /**\n         * This is the parameter that goes into the request query params\n         */\n        'parameter-query': string | null;\n    };\n    url: '/api/v{api-version}/parameters/{parameter.path.1}/{parameter-path-2}/{PARAMETER-PATH-3}';\n};\n\nexport type GetCallWithOptionalParamData = {\n    /**\n     * This is a required parameter\n     */\n    body: ModelWithOneOfEnum;\n    path?: never;\n    query?: {\n        /**\n         * This is an optional parameter\n         */\n        page?: number;\n    };\n    url: '/api/v{api-version}/parameters';\n};\n\nexport type PostCallWithOptionalParamData = {\n    /**\n     * This is an optional parameter\n     */\n    body?: {\n        offset?: number | null;\n    };\n    path?: never;\n    query: {\n        /**\n         * This is a required parameter\n         */\n        parameter: Pageable;\n    };\n    url: '/api/v{api-version}/parameters';\n};\n\nexport type PostCallWithOptionalParamResponses = {\n    /**\n     * Response is a simple number\n     */\n    200: number;\n    /**\n     * Success\n     */\n    204: void;\n};\n\nexport type PostCallWithOptionalParamResponse = PostCallWithOptionalParamResponses[keyof PostCallWithOptionalParamResponses];\n\nexport type PostApiVbyApiVersionRequestBodyData = {\n    /**\n     * A reusable request body\n     */\n    body?: SimpleRequestBody;\n    path?: never;\n    query?: {\n        /**\n         * This is a reusable parameter\n         */\n        parameter?: string;\n    };\n    url: '/api/v{api-version}/requestBody';\n};\n\nexport type PostApiVbyApiVersionFormDataData = {\n    /**\n     * A reusable request body\n     */\n    body?: SimpleFormData;\n    path?: never;\n    query?: {\n        /**\n         * This is a reusable parameter\n         */\n        parameter?: string;\n    };\n    url: '/api/v{api-version}/formData';\n};\n\nexport type CallWithDefaultParametersData = {\n    body?: never;\n    path?: never;\n    query?: {\n        /**\n         * This is a simple string with default value\n         */\n        parameterString?: string | null;\n        /**\n         * This is a simple number with default value\n         */\n        parameterNumber?: number | null;\n        /**\n         * This is a simple boolean with default value\n         */\n        parameterBoolean?: boolean | null;\n        /**\n         * This is a simple enum with default value\n         */\n        parameterEnum?: 'Success' | 'Warning' | 'Error';\n        /**\n         * This is a simple model with default value\n         */\n        parameterModel?: ModelWithString | null;\n    };\n    url: '/api/v{api-version}/defaults';\n};\n\nexport type CallWithDefaultOptionalParametersData = {\n    body?: never;\n    path?: never;\n    query?: {\n        /**\n         * This is a simple string that is optional with default value\n         */\n        parameterString?: string;\n        /**\n         * This is a simple number that is optional with default value\n         */\n        parameterNumber?: number;\n        /**\n         * This is a simple boolean that is optional with default value\n         */\n        parameterBoolean?: boolean;\n        /**\n         * This is a simple enum that is optional with default value\n         */\n        parameterEnum?: 'Success' | 'Warning' | 'Error';\n        /**\n         * This is a simple model that is optional with default value\n         */\n        parameterModel?: ModelWithString;\n    };\n    url: '/api/v{api-version}/defaults';\n};\n\nexport type CallToTestOrderOfParamsData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * This is a optional string with default\n         */\n        parameterOptionalStringWithDefault?: string;\n        /**\n         * This is a optional string with empty default\n         */\n        parameterOptionalStringWithEmptyDefault?: string;\n        /**\n         * This is a optional string with no default\n         */\n        parameterOptionalStringWithNoDefault?: string;\n        /**\n         * This is a string with default\n         */\n        parameterStringWithDefault: string;\n        /**\n         * This is a string with empty default\n         */\n        parameterStringWithEmptyDefault: string;\n        /**\n         * This is a string with no default\n         */\n        parameterStringWithNoDefault: string;\n        /**\n         * This is a string that can be null with no default\n         */\n        parameterStringNullableWithNoDefault?: string | null;\n        /**\n         * This is a string that can be null with default\n         */\n        parameterStringNullableWithDefault?: string | null;\n    };\n    url: '/api/v{api-version}/defaults';\n};\n\nexport type DuplicateNameData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/duplicate';\n};\n\nexport type DuplicateName2Data = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/duplicate';\n};\n\nexport type DuplicateName3Data = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/duplicate';\n};\n\nexport type DuplicateName4Data = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/duplicate';\n};\n\nexport type CallWithNoContentResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no-content';\n};\n\nexport type CallWithNoContentResponseResponses = {\n    /**\n     * Success\n     */\n    204: void;\n};\n\nexport type CallWithNoContentResponseResponse = CallWithNoContentResponseResponses[keyof CallWithNoContentResponseResponses];\n\nexport type CallWithResponseAndNoContentResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multiple-tags/response-and-no-content';\n};\n\nexport type CallWithResponseAndNoContentResponseResponses = {\n    /**\n     * Response is a simple number\n     */\n    200: number;\n    /**\n     * Success\n     */\n    204: void;\n};\n\nexport type CallWithResponseAndNoContentResponseResponse = CallWithResponseAndNoContentResponseResponses[keyof CallWithResponseAndNoContentResponseResponses];\n\nexport type DummyAData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multiple-tags/a';\n};\n\nexport type DummyAResponses = {\n    200: _400;\n};\n\nexport type DummyAResponse = DummyAResponses[keyof DummyAResponses];\n\nexport type DummyBData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multiple-tags/b';\n};\n\nexport type DummyBResponses = {\n    /**\n     * Success\n     */\n    204: void;\n};\n\nexport type DummyBResponse = DummyBResponses[keyof DummyBResponses];\n\nexport type CallWithResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/response';\n};\n\nexport type CallWithResponseResponses = {\n    default: Import;\n};\n\nexport type CallWithResponseResponse = CallWithResponseResponses[keyof CallWithResponseResponses];\n\nexport type CallWithDuplicateResponsesData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/response';\n};\n\nexport type CallWithDuplicateResponsesErrors = {\n    /**\n     * Message for 500 error\n     */\n    500: ModelWithStringError;\n    /**\n     * Message for 501 error\n     */\n    501: ModelWithStringError;\n    /**\n     * Message for 502 error\n     */\n    502: ModelWithStringError;\n    /**\n     * Message for 4XX errors\n     */\n    '4XX': DictionaryWithArray;\n    /**\n     * Default error response\n     */\n    default: ModelWithBoolean;\n};\n\nexport type CallWithDuplicateResponsesError = CallWithDuplicateResponsesErrors[keyof CallWithDuplicateResponsesErrors];\n\nexport type CallWithDuplicateResponsesResponses = {\n    /**\n     * Message for 200 response\n     */\n    200: ModelWithBoolean & ModelWithInteger;\n    /**\n     * Message for 201 response\n     */\n    201: ModelWithString;\n    /**\n     * Message for 202 response\n     */\n    202: ModelWithString;\n};\n\nexport type CallWithDuplicateResponsesResponse = CallWithDuplicateResponsesResponses[keyof CallWithDuplicateResponsesResponses];\n\nexport type CallWithResponsesData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/response';\n};\n\nexport type CallWithResponsesErrors = {\n    /**\n     * Message for 500 error\n     */\n    500: ModelWithStringError;\n    /**\n     * Message for 501 error\n     */\n    501: ModelWithStringError;\n    /**\n     * Message for 502 error\n     */\n    502: ModelWithStringError;\n    /**\n     * Message for default response\n     */\n    default: ModelWithStringError;\n};\n\nexport type CallWithResponsesError = CallWithResponsesErrors[keyof CallWithResponsesErrors];\n\nexport type CallWithResponsesResponses = {\n    /**\n     * Message for 200 response\n     */\n    200: {\n        readonly '@namespace.string'?: string;\n        readonly '@namespace.integer'?: number;\n        readonly value?: Array<ModelWithString>;\n    };\n    /**\n     * Message for 201 response\n     */\n    201: ModelThatExtends;\n    /**\n     * Message for 202 response\n     */\n    202: ModelThatExtendsExtends;\n};\n\nexport type CallWithResponsesResponse = CallWithResponsesResponses[keyof CallWithResponsesResponses];\n\nexport type CollectionFormatData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * This is an array parameter that is sent as csv format (comma-separated values)\n         */\n        parameterArrayCSV: Array<string> | null;\n        /**\n         * This is an array parameter that is sent as ssv format (space-separated values)\n         */\n        parameterArraySSV: Array<string> | null;\n        /**\n         * This is an array parameter that is sent as tsv format (tab-separated values)\n         */\n        parameterArrayTSV: Array<string> | null;\n        /**\n         * This is an array parameter that is sent as pipes format (pipe-separated values)\n         */\n        parameterArrayPipes: Array<string> | null;\n        /**\n         * This is an array parameter that is sent as multi format (multiple parameter instances)\n         */\n        parameterArrayMulti: Array<string> | null;\n    };\n    url: '/api/v{api-version}/collectionFormat';\n};\n\nexport type TypesData = {\n    body?: never;\n    path?: {\n        /**\n         * This is a number parameter\n         */\n        id?: number;\n    };\n    query: {\n        /**\n         * This is a number parameter\n         */\n        parameterNumber: number;\n        /**\n         * This is a string parameter\n         */\n        parameterString: string | null;\n        /**\n         * This is a boolean parameter\n         */\n        parameterBoolean: boolean | null;\n        /**\n         * This is an object parameter\n         */\n        parameterObject: {\n            [key: string]: unknown;\n        } | null;\n        /**\n         * This is an array parameter\n         */\n        parameterArray: Array<string> | null;\n        /**\n         * This is a dictionary parameter\n         */\n        parameterDictionary: {\n            [key: string]: unknown;\n        } | null;\n        /**\n         * This is an enum parameter\n         */\n        parameterEnum: 'Success' | 'Warning' | 'Error' | null;\n    };\n    url: '/api/v{api-version}/types';\n};\n\nexport type TypesResponses = {\n    /**\n     * Response is a simple number\n     */\n    200: number;\n    /**\n     * Response is a simple string\n     */\n    201: string;\n    /**\n     * Response is a simple boolean\n     */\n    202: boolean;\n    /**\n     * Response is a simple object\n     */\n    203: {\n        [key: string]: unknown;\n    };\n};\n\nexport type TypesResponse = TypesResponses[keyof TypesResponses];\n\nexport type UploadFileData = {\n    body: Blob | File;\n    path: {\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string | null;\n    };\n    query?: never;\n    url: '/api/v{api-version}/upload';\n};\n\nexport type UploadFileResponses = {\n    200: boolean;\n};\n\nexport type UploadFileResponse = UploadFileResponses[keyof UploadFileResponses];\n\nexport type FileResponseData = {\n    body?: never;\n    path: {\n        id: string;\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string;\n    };\n    query?: never;\n    url: '/api/v{api-version}/file/{id}';\n};\n\nexport type FileResponseResponses = {\n    /**\n     * Success\n     */\n    200: Blob | File;\n};\n\nexport type FileResponseResponse = FileResponseResponses[keyof FileResponseResponses];\n\nexport type ComplexTypesData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * Parameter containing object\n         */\n        parameterObject: {\n            first?: {\n                second?: {\n                    third?: string;\n                };\n            };\n        };\n        /**\n         * Parameter containing reference\n         */\n        parameterReference: ModelWithString;\n    };\n    url: '/api/v{api-version}/complex';\n};\n\nexport type ComplexTypesErrors = {\n    /**\n     * 400 `server` error\n     */\n    400: unknown;\n    /**\n     * 500 server error\n     */\n    500: unknown;\n};\n\nexport type ComplexTypesResponses = {\n    /**\n     * Successful response\n     */\n    200: Array<ModelWithString>;\n};\n\nexport type ComplexTypesResponse = ComplexTypesResponses[keyof ComplexTypesResponses];\n\nexport type MultipartResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multipart';\n};\n\nexport type MultipartResponseResponses = {\n    /**\n     * OK\n     */\n    200: {\n        file?: Blob | File;\n        metadata?: {\n            foo?: string;\n            bar?: string;\n        };\n    };\n};\n\nexport type MultipartResponseResponse = MultipartResponseResponses[keyof MultipartResponseResponses];\n\nexport type MultipartRequestData = {\n    body?: {\n        content?: Blob | File;\n        data?: ModelWithString | null;\n    };\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multipart';\n};\n\nexport type ComplexParamsData = {\n    body?: {\n        readonly key: string | null;\n        name: string | null;\n        enabled?: boolean;\n        type: 'Monkey' | 'Horse' | 'Bird';\n        listOfModels?: Array<ModelWithString> | null;\n        listOfStrings?: Array<string> | null;\n        parameters: ModelWithString | ModelWithEnum | ModelWithArray | ModelWithDictionary;\n        readonly user?: {\n            readonly id?: number;\n            readonly name?: string | null;\n        };\n    };\n    path: {\n        id: number;\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string;\n    };\n    query?: never;\n    url: '/api/v{api-version}/complex/{id}';\n};\n\nexport type ComplexParamsResponses = {\n    /**\n     * Success\n     */\n    200: ModelWithString;\n};\n\nexport type ComplexParamsResponse = ComplexParamsResponses[keyof ComplexParamsResponses];\n\nexport type CallWithResultFromHeaderData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/header';\n};\n\nexport type CallWithResultFromHeaderErrors = {\n    /**\n     * 400 server error\n     */\n    400: unknown;\n    /**\n     * 500 server error\n     */\n    500: unknown;\n};\n\nexport type CallWithResultFromHeaderResponses = {\n    /**\n     * Successful response\n     */\n    200: unknown;\n};\n\nexport type TestErrorCodeData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * Status code to return\n         */\n        status: number;\n    };\n    url: '/api/v{api-version}/error';\n};\n\nexport type TestErrorCodeErrors = {\n    /**\n     * Custom message: Internal Server Error\n     */\n    500: unknown;\n    /**\n     * Custom message: Not Implemented\n     */\n    501: unknown;\n    /**\n     * Custom message: Bad Gateway\n     */\n    502: unknown;\n    /**\n     * Custom message: Service Unavailable\n     */\n    503: unknown;\n};\n\nexport type TestErrorCodeResponses = {\n    /**\n     * Custom message: Successful response\n     */\n    200: unknown;\n};\n\nexport type NonAsciiæøåÆøÅöôêÊ字符串Data = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * Dummy input param\n         */\n        nonAsciiParamæøåÆØÅöôêÊ: number;\n    };\n    url: '/api/v{api-version}/non-ascii-æøåÆØÅöôêÊ字符串';\n};\n\nexport type NonAsciiæøåÆøÅöôêÊ字符串Responses = {\n    /**\n     * Successful response\n     */\n    200: Array<NonAsciiStringæøåÆøÅöôêÊ字符串>;\n};\n\nexport type NonAsciiæøåÆøÅöôêÊ字符串Response = NonAsciiæøåÆøÅöôêÊ字符串Responses[keyof NonAsciiæøåÆøÅöôêÊ字符串Responses];\n\nexport type PutWithFormUrlEncodedData = {\n    body: ArrayWithStrings;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/non-ascii-æøåÆØÅöôêÊ字符串';\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-ky/tsconfig-node16-sdk/client/client.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { HTTPError, Options as KyOptions } from 'ky';\nimport ky from 'ky';\n\nimport { createSseClient } from '../core/serverSentEvents.gen.js';\nimport type { HttpMethod } from '../core/types.gen.js';\nimport { getValidRequestBody } from '../core/utils.gen.js';\nimport type { Client, Config, RequestOptions, ResolvedRequestOptions, RetryOptions } from './types.gen.js';\nimport type { Middleware } from './utils.gen.js';\nimport {\n  buildUrl,\n  createConfig,\n  createInterceptors,\n  getParseAs,\n  mergeConfigs,\n  mergeHeaders,\n  setAuthParams,\n} from './utils.gen.js';\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 (options: RequestOptions) => {\n    const opts = {\n      ..._config,\n      ...options,\n      headers: mergeHeaders(_config.headers, options.headers),\n      ky: options.ky ?? _config.ky ?? ky,\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    if (opts.body === undefined || opts.serializedBody === '') {\n      opts.headers.delete('Content-Type');\n    }\n\n    const url = buildUrl(opts);\n\n    return { opts, url };\n  };\n\n  const parseErrorResponse = async (\n    response: Response,\n    request: Request,\n    opts: ResolvedRequestOptions,\n    interceptorsMiddleware: Middleware<Request, Response, unknown, ResolvedRequestOptions>,\n  ) => {\n    const result = {\n      request,\n      response,\n    };\n\n    const textError = await response.text();\n    let jsonError: unknown;\n\n    try {\n      jsonError = JSON.parse(textError);\n    } catch {\n      jsonError = undefined;\n    }\n\n    const error = jsonError ?? textError;\n    let finalError = error;\n\n    for (const fn of interceptorsMiddleware.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    return opts.responseStyle === 'data'\n      ? undefined\n      : {\n          error: finalError,\n          ...result,\n        };\n  };\n\n  const request: Client['request'] = async (options) => {\n    // @ts-expect-error\n    const { opts, url } = await beforeRequest(options);\n\n    const kyInstance = opts.ky!;\n\n    const validBody = getValidRequestBody(opts);\n\n    const kyOptions: KyOptions = {\n      body: validBody as BodyInit,\n      cache: opts.cache,\n      credentials: opts.credentials,\n      headers: opts.headers,\n      integrity: opts.integrity,\n      keepalive: opts.keepalive,\n      method: opts.method as KyOptions['method'],\n      mode: opts.mode,\n      redirect: 'follow',\n      referrer: opts.referrer,\n      referrerPolicy: opts.referrerPolicy,\n      signal: opts.signal,\n      throwHttpErrors: opts.throwOnError ?? false,\n      timeout: opts.timeout,\n      ...opts.kyOptions,\n    };\n\n    if (opts.retry && typeof opts.retry === 'object') {\n      const retryOpts = opts.retry as RetryOptions;\n      kyOptions.retry = {\n        limit: retryOpts.limit ?? 2,\n        methods: retryOpts.methods as Array<\n          'get' | 'post' | 'put' | 'patch' | 'head' | 'delete' | 'options' | 'trace'\n        >,\n        statusCodes: retryOpts.statusCodes,\n      };\n    }\n\n    let request = new Request(url, {\n      body: kyOptions.body as BodyInit,\n      headers: kyOptions.headers as HeadersInit,\n      method: kyOptions.method,\n    });\n\n    for (const fn of interceptors.request.fns) {\n      if (fn) {\n        request = await fn(request, opts);\n      }\n    }\n\n    let response: Response;\n\n    try {\n      response = await kyInstance(request, kyOptions);\n    } catch (error) {\n      if (error && typeof error === 'object' && 'response' in error) {\n        const httpError = error as HTTPError;\n        response = httpError.response;\n\n        for (const fn of interceptors.response.fns) {\n          if (fn) {\n            response = await fn(response, request, opts);\n          }\n        }\n\n        return parseErrorResponse(response, request, opts, interceptors);\n      }\n\n      throw error;\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    return parseErrorResponse(response, request, opts, interceptors);\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      fetch: globalThis.fetch,\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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-ky/tsconfig-node16-sdk/client/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type { Auth } from '../core/auth.gen.js';\nexport type { QuerySerializerOptions } from '../core/bodySerializer.gen.js';\nexport {\n  formDataBodySerializer,\n  jsonBodySerializer,\n  urlSearchParamsBodySerializer,\n} from '../core/bodySerializer.gen.js';\nexport { buildClientParams } from '../core/params.gen.js';\nexport { serializeQueryKeyValue } from '../core/queryKeySerializer.gen.js';\nexport { createClient } from './client.gen.js';\nexport type {\n  Client,\n  ClientOptions,\n  Config,\n  CreateClientConfig,\n  Options,\n  RequestOptions,\n  RequestResult,\n  ResolvedRequestOptions,\n  ResponseStyle,\n  RetryOptions,\n  TDataShape,\n} from './types.gen.js';\nexport { createConfig, mergeHeaders } from './utils.gen.js';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-ky/tsconfig-node16-sdk/client/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { Options as KyOptions } from 'ky';\nimport type ky from 'ky';\n\nimport type { Auth } from '../core/auth.gen.js';\nimport type {\n  ServerSentEventsOptions,\n  ServerSentEventsResult,\n} from '../core/serverSentEvents.gen.js';\nimport type { Client as CoreClient, Config as CoreConfig } from '../core/types.gen.js';\nimport type { Middleware } from './utils.gen.js';\n\nexport type ResponseStyle = 'data' | 'fields';\n\nexport interface RetryOptions {\n  /**\n   * Maximum number of retry attempts\n   *\n   * @default 2\n   */\n  limit?: number;\n  /**\n   * HTTP methods to retry\n   *\n   * @default ['get', 'put', 'head', 'delete', 'options', 'trace']\n   */\n  methods?: Array<'get' | 'post' | 'put' | 'delete' | 'patch' | 'head' | 'options' | 'trace'>;\n  /**\n   * HTTP status codes to retry\n   *\n   * @default [408, 413, 429, 500, 502, 503, 504]\n   */\n  statusCodes?: number[];\n}\n\nexport interface Config<T extends ClientOptions = ClientOptions>\n  extends\n    Omit<KyOptions, 'body' | 'headers' | 'method' | 'prefixUrl' | 'retry' | 'throwHttpErrors'>,\n    CoreConfig {\n  /**\n   * Base URL for all requests made by this client.\n   */\n  baseUrl?: T['baseUrl'];\n  /**\n   * Ky instance to use. You can use this option to provide a custom\n   * ky instance.\n   */\n  ky?: typeof ky;\n  /**\n   * Additional ky-specific options that will be passed directly to ky.\n   * This allows you to use any ky option not explicitly exposed in the config.\n   */\n  kyOptions?: Omit<KyOptions, 'method' | 'prefixUrl'>;\n  /**\n   * Return the response data parsed in a specified format. By default, `auto`\n   * will infer the appropriate method from the `Content-Type` response header.\n   * You can override this behavior with any of the {@link Body} methods.\n   * Select `stream` if you don't want to parse response data at all.\n   *\n   * @default 'auto'\n   */\n  parseAs?: 'arrayBuffer' | 'auto' | 'blob' | 'formData' | 'json' | 'stream' | 'text';\n  /**\n   * Should we return only data or multiple fields (data, error, response, etc.)?\n   *\n   * @default 'fields'\n   */\n  responseStyle?: ResponseStyle;\n  /**\n   * Retry configuration\n   */\n  retry?: RetryOptions;\n  /**\n   * Throw an error instead of returning it in the response?\n   *\n   * @default false\n   */\n  throwOnError?: T['throwOnError'];\n  /**\n   * Request timeout in milliseconds\n   *\n   * @default 10000\n   */\n  timeout?: number;\n}\n\nexport interface RequestOptions<\n  TData = unknown,\n  TResponseStyle extends ResponseStyle = 'fields',\n  ThrowOnError extends boolean = boolean,\n  Url extends string = string,\n>\n  extends\n    Config<{\n      responseStyle: TResponseStyle;\n      throwOnError: ThrowOnError;\n    }>,\n    Pick<\n      ServerSentEventsOptions<TData>,\n      | 'onRequest'\n      | 'onSseError'\n      | 'onSseEvent'\n      | 'sseDefaultRetryDelay'\n      | 'sseMaxRetryAttempts'\n      | 'sseMaxRetryDelay'\n    > {\n  /**\n   * Any body that you want to add to your request.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/fetch#body}\n   */\n  body?: unknown;\n  path?: Record<string, unknown>;\n  query?: Record<string, unknown>;\n  /**\n   * Security mechanism(s) to use for the request.\n   */\n  security?: ReadonlyArray<Auth>;\n  url: Url;\n}\n\nexport interface ResolvedRequestOptions<\n  TResponseStyle extends ResponseStyle = 'fields',\n  ThrowOnError extends boolean = boolean,\n  Url extends string = string,\n> extends RequestOptions<unknown, TResponseStyle, ThrowOnError, Url> {\n  serializedBody?: string;\n}\n\nexport type RequestResult<\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = boolean,\n  TResponseStyle extends ResponseStyle = 'fields',\n> = ThrowOnError extends true\n  ? Promise<\n      TResponseStyle extends 'data'\n        ? TData extends Record<string, unknown>\n          ? TData[keyof TData]\n          : TData\n        : {\n            data: TData extends Record<string, unknown> ? TData[keyof TData] : TData;\n            request: Request;\n            response: Response;\n          }\n    >\n  : Promise<\n      TResponseStyle extends 'data'\n        ? (TData extends Record<string, unknown> ? TData[keyof TData] : TData) | undefined\n        : (\n            | {\n                data: TData extends Record<string, unknown> ? TData[keyof TData] : TData;\n                error: undefined;\n              }\n            | {\n                data: undefined;\n                error: TError extends Record<string, unknown> ? TError[keyof TError] : TError;\n              }\n          ) & {\n            request: Request;\n            response: Response;\n          }\n    >;\n\nexport interface ClientOptions {\n  baseUrl?: string;\n  responseStyle?: ResponseStyle;\n  throwOnError?: boolean;\n}\n\ntype MethodFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'>,\n) => RequestResult<TData, TError, ThrowOnError, TResponseStyle>;\n\ntype SseFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'>,\n) => Promise<ServerSentEventsResult<TData, TError>>;\n\ntype RequestFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'> &\n    Pick<Required<RequestOptions<TData, TResponseStyle, ThrowOnError>>, 'method'>,\n) => RequestResult<TData, TError, ThrowOnError, TResponseStyle>;\n\ntype BuildUrlFn = <\n  TData extends {\n    body?: unknown;\n    path?: Record<string, unknown>;\n    query?: Record<string, unknown>;\n    url: string;\n  },\n>(\n  options: TData & Options<TData>,\n) => string;\n\nexport type Client = CoreClient<RequestFn, Config, MethodFn, BuildUrlFn, SseFn> & {\n  interceptors: Middleware<Request, Response, unknown, ResolvedRequestOptions>;\n};\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 = ClientOptions> = (\n  override?: Config<ClientOptions & T>,\n) => Config<Required<ClientOptions> & T>;\n\nexport interface TDataShape {\n  body?: unknown;\n  headers?: unknown;\n  path?: unknown;\n  query?: unknown;\n  url: string;\n}\n\ntype OmitKeys<T, K> = Pick<T, Exclude<keyof T, K>>;\n\nexport type Options<\n  TData extends TDataShape = TDataShape,\n  ThrowOnError extends boolean = boolean,\n  TResponse = unknown,\n  TResponseStyle extends ResponseStyle = 'fields',\n> = OmitKeys<\n  RequestOptions<TResponse, TResponseStyle, ThrowOnError>,\n  'body' | 'path' | 'query' | 'url'\n> &\n  ([TData] extends [never] ? unknown : Omit<TData, 'url'>);\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-ky/tsconfig-node16-sdk/client/utils.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport { getAuthToken } from '../core/auth.gen.js';\nimport type { QuerySerializerOptions } from '../core/bodySerializer.gen.js';\nimport { jsonBodySerializer } from '../core/bodySerializer.gen.js';\nimport {\n  serializeArrayParam,\n  serializeObjectParam,\n  serializePrimitiveParam,\n} from '../core/pathSerializer.gen.js';\nimport { getUrl } from '../core/utils.gen.js';\nimport type { Client, ClientOptions, Config, RequestOptions } from './types.gen.js';\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    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        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  throwOnError: false,\n  timeout: 10000,\n  ...override,\n});\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-ky/tsconfig-node16-sdk/client.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport { type ClientOptions, type Config, createClient, createConfig } from './client/index.js';\nimport type { ClientOptions as ClientOptions2 } from './types.gen.js';\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: 'http://localhost:3000/base' }));\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-ky/tsconfig-node16-sdk/core/auth.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-ky/tsconfig-node16-sdk/core/bodySerializer.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { ArrayStyle, ObjectStyle, SerializerOptions } from './pathSerializer.gen.js';\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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-ky/tsconfig-node16-sdk/core/params.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-ky/tsconfig-node16-sdk/core/pathSerializer.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-ky/tsconfig-node16-sdk/core/queryKeySerializer.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\n/**\n * JSON-friendly union that mirrors what Pinia Colada can hash.\n */\nexport type JsonValue =\n  | null\n  | string\n  | number\n  | boolean\n  | JsonValue[]\n  | { [key: string]: JsonValue };\n\n/**\n * Replacer that converts non-JSON values (bigint, Date, etc.) to safe substitutes.\n */\nexport const queryKeyJsonReplacer = (_key: string, value: unknown) => {\n  if (value === undefined || typeof value === 'function' || typeof value === 'symbol') {\n    return undefined;\n  }\n  if (typeof value === 'bigint') {\n    return value.toString();\n  }\n  if (value instanceof Date) {\n    return value.toISOString();\n  }\n  return value;\n};\n\n/**\n * Safely stringifies a value and parses it back into a JsonValue.\n */\nexport const stringifyToJsonValue = (input: unknown): JsonValue | undefined => {\n  try {\n    const json = JSON.stringify(input, queryKeyJsonReplacer);\n    if (json === undefined) {\n      return undefined;\n    }\n    return JSON.parse(json) as JsonValue;\n  } catch {\n    return undefined;\n  }\n};\n\n/**\n * Detects plain objects (including objects with a null prototype).\n */\nconst isPlainObject = (value: unknown): value is Record<string, unknown> => {\n  if (value === null || typeof value !== 'object') {\n    return false;\n  }\n  const prototype = Object.getPrototypeOf(value as object);\n  return prototype === Object.prototype || prototype === null;\n};\n\n/**\n * Turns URLSearchParams into a sorted JSON object for deterministic keys.\n */\nconst serializeSearchParams = (params: URLSearchParams): JsonValue => {\n  const entries = Array.from(params.entries()).sort(([a], [b]) => a.localeCompare(b));\n  const result: Record<string, JsonValue> = {};\n\n  for (const [key, value] of entries) {\n    const existing = result[key];\n    if (existing === undefined) {\n      result[key] = value;\n      continue;\n    }\n\n    if (Array.isArray(existing)) {\n      (existing as string[]).push(value);\n    } else {\n      result[key] = [existing, value];\n    }\n  }\n\n  return result;\n};\n\n/**\n * Normalizes any accepted value into a JSON-friendly shape for query keys.\n */\nexport const serializeQueryKeyValue = (value: unknown): JsonValue | undefined => {\n  if (value === null) {\n    return null;\n  }\n\n  if (typeof value === 'string' || typeof value === 'number' || typeof value === 'boolean') {\n    return value;\n  }\n\n  if (value === undefined || typeof value === 'function' || typeof value === 'symbol') {\n    return undefined;\n  }\n\n  if (typeof value === 'bigint') {\n    return value.toString();\n  }\n\n  if (value instanceof Date) {\n    return value.toISOString();\n  }\n\n  if (Array.isArray(value)) {\n    return stringifyToJsonValue(value);\n  }\n\n  if (typeof URLSearchParams !== 'undefined' && value instanceof URLSearchParams) {\n    return serializeSearchParams(value);\n  }\n\n  if (isPlainObject(value)) {\n    return stringifyToJsonValue(value);\n  }\n\n  return undefined;\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-ky/tsconfig-node16-sdk/core/serverSentEvents.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { Config } from './types.gen.js';\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 const 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            // Normalize line endings: CRLF -> LF, then CR -> LF\n            buffer = buffer.replace(/\\r\\n/g, '\\n').replace(/\\r/g, '\\n');\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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-ky/tsconfig-node16-sdk/core/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { Auth, AuthToken } from './auth.gen.js';\nimport type { BodySerializer, QuerySerializer, QuerySerializerOptions } from './bodySerializer.gen.js';\n\nexport type HttpMethod =\n  | 'connect'\n  | 'delete'\n  | 'get'\n  | 'head'\n  | 'options'\n  | 'patch'\n  | 'post'\n  | 'put'\n  | 'trace';\n\nexport type Client<\n  RequestFn = never,\n  Config = unknown,\n  MethodFn = never,\n  BuildUrlFn = never,\n  SseFn = never,\n> = {\n  /**\n   * Returns the final request URL.\n   */\n  buildUrl: BuildUrlFn;\n  getConfig: () => Config;\n  request: RequestFn;\n  setConfig: (config: Config) => Config;\n} & {\n  [K in HttpMethod]: MethodFn;\n} & ([SseFn] extends [never] ? { sse?: never } : { sse: { [K in HttpMethod]: SseFn } });\n\nexport interface Config {\n  /**\n   * Auth token or a function returning auth token. The resolved value will be\n   * added to the request payload as defined by its `security` array.\n   */\n  auth?: ((auth: Auth) => Promise<AuthToken> | AuthToken) | AuthToken;\n  /**\n   * A function for serializing request body parameter. By default,\n   * {@link JSON.stringify()} will be used.\n   */\n  bodySerializer?: BodySerializer | null;\n  /**\n   * An object containing any HTTP headers that you want to pre-populate your\n   * `Headers` object with.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/Headers/Headers#init See more}\n   */\n  headers?:\n    | RequestInit['headers']\n    | Record<\n        string,\n        string | number | boolean | (string | number | boolean)[] | null | undefined | unknown\n      >;\n  /**\n   * The request method.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/fetch#method See more}\n   */\n  method?: Uppercase<HttpMethod>;\n  /**\n   * A function for serializing request query parameters. By default, arrays\n   * will be exploded in form style, objects will be exploded in deepObject\n   * style, and reserved characters are percent-encoded.\n   *\n   * This method will have no effect if the native `paramsSerializer()` Axios\n   * API function is used.\n   *\n   * {@link https://swagger.io/docs/specification/serialization/#query View examples}\n   */\n  querySerializer?: QuerySerializer | QuerySerializerOptions;\n  /**\n   * A function validating request data. This is useful if you want to ensure\n   * the request conforms to the desired shape, so it can be safely sent to\n   * the server.\n   */\n  requestValidator?: (data: unknown) => Promise<unknown>;\n  /**\n   * A function transforming response data before it's returned. This is useful\n   * for post-processing data, e.g. converting ISO strings into Date objects.\n   */\n  responseTransformer?: (data: unknown) => Promise<unknown>;\n  /**\n   * A function validating response data. This is useful if you want to ensure\n   * the response conforms to the desired shape, so it can be safely passed to\n   * the transformers and returned to the user.\n   */\n  responseValidator?: (data: unknown) => Promise<unknown>;\n}\n\ntype IsExactlyNeverOrNeverUndefined<T> = [T] extends [never]\n  ? true\n  : [T] extends [never | undefined]\n    ? [undefined] extends [T]\n      ? false\n      : true\n    : false;\n\nexport type OmitNever<T extends Record<string, unknown>> = {\n  [K in keyof T as IsExactlyNeverOrNeverUndefined<T[K]> extends true ? never : K]: T[K];\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-ky/tsconfig-node16-sdk/core/utils.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { BodySerializer, QuerySerializer } from './bodySerializer.gen.js';\nimport {\n  type ArraySeparatorStyle,\n  serializeArrayParam,\n  serializeObjectParam,\n  serializePrimitiveParam,\n} from './pathSerializer.gen.js';\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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-ky/tsconfig-node16-sdk/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport { apiVVersionODataControllerCount, callToTestOrderOfParams, callWithDefaultOptionalParameters, callWithDefaultParameters, callWithDescriptions, callWithDuplicateResponses, callWithNoContentResponse, callWithParameters, callWithResponse, callWithResponseAndNoContentResponse, callWithResponses, callWithResultFromHeader, callWithWeirdParameterNames, collectionFormat, complexParams, complexTypes, deleteCallWithoutParametersAndResponse, deleteFoo, deprecatedCall, dummyA, dummyB, duplicateName, duplicateName2, duplicateName3, duplicateName4, export_, fileResponse, fooWow, getApiVbyApiVersionSimpleOperation, getCallWithOptionalParam, getCallWithoutParametersAndResponse, headCallWithoutParametersAndResponse, import_, multipartRequest, multipartResponse, nonAsciiæøåÆøÅöôêÊ字符串, type Options, optionsCallWithoutParametersAndResponse, patchApiVbyApiVersionNoTag, patchCallWithoutParametersAndResponse, postApiVbyApiVersionFormData, postApiVbyApiVersionRequestBody, postCallWithOptionalParam, postCallWithoutParametersAndResponse, putCallWithoutParametersAndResponse, putWithFormUrlEncoded, testErrorCode, types, uploadFile } from './sdk.gen.js';\nexport type { _3eNum1Период, _400, AdditionalPropertiesIntegerIssue, AdditionalPropertiesUnknownIssue, AdditionalPropertiesUnknownIssue2, AdditionalPropertiesUnknownIssue3, AdditionalPropertiesUnknownIssueWritable, AnyOfAnyAndNull, AnyOfArrays, ApiVVersionODataControllerCountData, ApiVVersionODataControllerCountResponse, ApiVVersionODataControllerCountResponses, ArrayWithAnyOfProperties, ArrayWithArray, ArrayWithBooleans, ArrayWithNumbers, ArrayWithProperties, ArrayWithReferences, ArrayWithStrings, CallToTestOrderOfParamsData, CallWithDefaultOptionalParametersData, CallWithDefaultParametersData, CallWithDescriptionsData, CallWithDuplicateResponsesData, CallWithDuplicateResponsesError, CallWithDuplicateResponsesErrors, CallWithDuplicateResponsesResponse, CallWithDuplicateResponsesResponses, CallWithNoContentResponseData, CallWithNoContentResponseResponse, CallWithNoContentResponseResponses, CallWithParametersData, CallWithResponseAndNoContentResponseData, CallWithResponseAndNoContentResponseResponse, CallWithResponseAndNoContentResponseResponses, CallWithResponseData, CallWithResponseResponse, CallWithResponseResponses, CallWithResponsesData, CallWithResponsesError, CallWithResponsesErrors, CallWithResponsesResponse, CallWithResponsesResponses, CallWithResultFromHeaderData, CallWithResultFromHeaderErrors, CallWithResultFromHeaderResponses, CallWithWeirdParameterNamesData, CamelCaseCommentWithBreaks, CharactersInDescription, ClientOptions, CollectionFormatData, CommentWithBackticks, CommentWithBackticksAndQuotes, CommentWithBreaks, CommentWithExpressionPlaceholders, CommentWithQuotes, CommentWithReservedCharacters, CommentWithSlashes, ComplexParamsData, ComplexParamsResponse, ComplexParamsResponses, ComplexTypesData, ComplexTypesErrors, ComplexTypesResponse, ComplexTypesResponses, CompositionBaseModel, CompositionExtendedModel, CompositionWithAllOfAndNullable, CompositionWithAnyOf, CompositionWithAnyOfAndNullable, CompositionWithAnyOfAnonymous, CompositionWithNestedAnyAndTypeNull, CompositionWithNestedAnyOfAndNull, CompositionWithOneOf, CompositionWithOneOfAndComplexArrayDictionary, CompositionWithOneOfAndNullable, CompositionWithOneOfAndProperties, CompositionWithOneOfAndSimpleArrayDictionary, CompositionWithOneOfAndSimpleDictionary, CompositionWithOneOfAnonymous, CompositionWithOneOfDiscriminator, ConstValue, Default, DeleteCallWithoutParametersAndResponseData, DeleteFooData, DeleteFooData2, DeleteFooData3, DeprecatedCallData, DeprecatedModel, DictionaryWithArray, DictionaryWithDictionary, DictionaryWithProperties, DictionaryWithPropertiesAndAdditionalProperties, DictionaryWithReference, DictionaryWithString, DummyAData, DummyAResponse, DummyAResponses, DummyBData, DummyBResponse, DummyBResponses, DuplicateName2Data, DuplicateName3Data, DuplicateName4Data, DuplicateNameData, EnumFromDescription, EnumWithExtensions, EnumWithNumbers, EnumWithReplacedCharacters, EnumWithStrings, EnumWithXEnumNames, ExportData, ExternalRefA, ExternalRefB, ExternalSharedModel, File, FileResponseData, FileResponseResponse, FileResponseResponses, FileWritable, FooWowData, FooWowResponses, FreeFormObjectWithAdditionalPropertiesEqEmptyObject, FreeFormObjectWithAdditionalPropertiesEqTrue, FreeFormObjectWithoutAdditionalProperties, GenericSchemaDuplicateIssue1SystemBoolean, GenericSchemaDuplicateIssue1SystemBooleanWritable, GenericSchemaDuplicateIssue1SystemString, GenericSchemaDuplicateIssue1SystemStringWritable, GetApiVbyApiVersionSimpleOperationData, GetApiVbyApiVersionSimpleOperationError, GetApiVbyApiVersionSimpleOperationErrors, GetApiVbyApiVersionSimpleOperationResponse, GetApiVbyApiVersionSimpleOperationResponses, GetCallWithOptionalParamData, GetCallWithoutParametersAndResponseData, HeadCallWithoutParametersAndResponseData, Import, ImportData, ImportResponse, ImportResponses, IoK8sApimachineryPkgApisMetaV1DeleteOptions, IoK8sApimachineryPkgApisMetaV1Preconditions, ModelCircle, ModelFromZendesk, ModelSquare, ModelThatExtends, ModelThatExtendsExtends, ModelWithAdditionalPropertiesEqTrue, ModelWithAdditionalPropertiesRef, ModelWithAnyOfConstantSizeArray, ModelWithAnyOfConstantSizeArrayAndIntersect, ModelWithAnyOfConstantSizeArrayNullable, ModelWithAnyOfConstantSizeArrayWithNSizeAndOptions, ModelWithAnyOfConstantSizeArrayWithNSizeAndOptionsWritable, ModelWithArray, ModelWithArrayReadOnlyAndWriteOnly, ModelWithArrayReadOnlyAndWriteOnlyWritable, ModelWithBackticksInDescription, ModelWithBoolean, ModelWithCircularReference, ModelWithConst, ModelWithConstantSizeArray, ModelWithDictionary, ModelWithDuplicateImports, ModelWithDuplicateProperties, ModelWithEnum, ModelWithEnumFromDescription, ModelWithEnumWithHyphen, ModelWithInteger, ModelWithNestedArrayEnums, ModelWithNestedArrayEnumsData, ModelWithNestedArrayEnumsDataBar, ModelWithNestedArrayEnumsDataFoo, ModelWithNestedCompositionEnums, ModelWithNestedEnums, ModelWithNestedProperties, ModelWithNullableObject, ModelWithNullableString, ModelWithNumericEnumUnion, ModelWithOneOfAndProperties, ModelWithOneOfEnum, ModelWithOrderedProperties, ModelWithPattern, ModelWithPatternWritable, ModelWithPrefixItemsConstantSizeArray, ModelWithProperties, ModelWithPropertiesWritable, ModelWithReadOnlyAndWriteOnly, ModelWithReadOnlyAndWriteOnlyWritable, ModelWithReference, ModelWithReferenceWritable, ModelWithString, ModelWithStringError, MultipartRequestData, MultipartResponseData, MultipartResponseResponse, MultipartResponseResponses, NestedAnyOfArraysNullable, NonAsciiæøåÆøÅöôêÊ字符串Data, NonAsciiæøåÆøÅöôêÊ字符串Response, NonAsciiæøåÆøÅöôêÊ字符串Responses, NonAsciiStringæøåÆøÅöôêÊ字符串, NullableObject, OneOfAllOfIssue, OneOfAllOfIssueWritable, OptionsCallWithoutParametersAndResponseData, Pageable, ParameterSimpleParameterUnused, PatchApiVbyApiVersionNoTagData, PatchApiVbyApiVersionNoTagResponses, PatchCallWithoutParametersAndResponseData, PostApiVbyApiVersionFormDataData, PostApiVbyApiVersionRequestBodyData, PostCallWithOptionalParamData, PostCallWithOptionalParamResponse, PostCallWithOptionalParamResponses, PostCallWithoutParametersAndResponseData, PostServiceWithEmptyTagResponse, PostServiceWithEmptyTagResponse2, PutCallWithoutParametersAndResponseData, PutWithFormUrlEncodedData, SchemaWithFormRestrictedKeys, SimpleBoolean, SimpleFile, SimpleFormData, SimpleInteger, SimpleParameter, SimpleReference, SimpleRequestBody, SimpleString, SimpleStringWithPattern, TestErrorCodeData, TestErrorCodeErrors, TestErrorCodeResponses, TypesData, TypesResponse, TypesResponses, UploadFileData, UploadFileResponse, UploadFileResponses, XFooBar } from './types.gen.js';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-ky/tsconfig-node16-sdk/sdk.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport { client } from './client.gen.js';\nimport { type Client, formDataBodySerializer, type Options as Options2, type TDataShape, urlSearchParamsBodySerializer } from './client/index.js';\nimport type { ApiVVersionODataControllerCountData, ApiVVersionODataControllerCountResponses, CallToTestOrderOfParamsData, CallWithDefaultOptionalParametersData, CallWithDefaultParametersData, CallWithDescriptionsData, CallWithDuplicateResponsesData, CallWithDuplicateResponsesErrors, CallWithDuplicateResponsesResponses, CallWithNoContentResponseData, CallWithNoContentResponseResponses, CallWithParametersData, CallWithResponseAndNoContentResponseData, CallWithResponseAndNoContentResponseResponses, CallWithResponseData, CallWithResponseResponses, CallWithResponsesData, CallWithResponsesErrors, CallWithResponsesResponses, CallWithResultFromHeaderData, CallWithResultFromHeaderErrors, CallWithResultFromHeaderResponses, CallWithWeirdParameterNamesData, CollectionFormatData, ComplexParamsData, ComplexParamsResponses, ComplexTypesData, ComplexTypesErrors, ComplexTypesResponses, DeleteCallWithoutParametersAndResponseData, DeleteFooData3, DeprecatedCallData, DummyAData, DummyAResponses, DummyBData, DummyBResponses, DuplicateName2Data, DuplicateName3Data, DuplicateName4Data, DuplicateNameData, ExportData, FileResponseData, FileResponseResponses, FooWowData, FooWowResponses, GetApiVbyApiVersionSimpleOperationData, GetApiVbyApiVersionSimpleOperationErrors, GetApiVbyApiVersionSimpleOperationResponses, GetCallWithOptionalParamData, GetCallWithoutParametersAndResponseData, HeadCallWithoutParametersAndResponseData, ImportData, ImportResponses, MultipartRequestData, MultipartResponseData, MultipartResponseResponses, NonAsciiæøåÆøÅöôêÊ字符串Data, NonAsciiæøåÆøÅöôêÊ字符串Responses, OptionsCallWithoutParametersAndResponseData, PatchApiVbyApiVersionNoTagData, PatchApiVbyApiVersionNoTagResponses, PatchCallWithoutParametersAndResponseData, PostApiVbyApiVersionFormDataData, PostApiVbyApiVersionRequestBodyData, PostCallWithOptionalParamData, PostCallWithOptionalParamResponses, PostCallWithoutParametersAndResponseData, PutCallWithoutParametersAndResponseData, PutWithFormUrlEncodedData, TestErrorCodeData, TestErrorCodeErrors, TestErrorCodeResponses, TypesData, TypesResponses, UploadFileData, UploadFileResponses } from './types.gen.js';\n\nexport type Options<TData extends TDataShape = TDataShape, ThrowOnError extends boolean = boolean> = Options2<TData, ThrowOnError> & {\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\nexport const export_ = <ThrowOnError extends boolean = false>(options?: Options<ExportData, ThrowOnError>) => (options?.client ?? client).get<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/no+tag', ...options });\n\nexport const patchApiVbyApiVersionNoTag = <ThrowOnError extends boolean = false>(options?: Options<PatchApiVbyApiVersionNoTagData, ThrowOnError>) => (options?.client ?? client).patch<PatchApiVbyApiVersionNoTagResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/no+tag', ...options });\n\nexport const import_ = <ThrowOnError extends boolean = false>(options: Options<ImportData, ThrowOnError>) => (options.client ?? client).post<ImportResponses, unknown, ThrowOnError>({\n    url: '/api/v{api-version}/no+tag',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options.headers\n    }\n});\n\nexport const fooWow = <ThrowOnError extends boolean = false>(options?: Options<FooWowData, ThrowOnError>) => (options?.client ?? client).put<FooWowResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/no+tag', ...options });\n\nexport const apiVVersionODataControllerCount = <ThrowOnError extends boolean = false>(options?: Options<ApiVVersionODataControllerCountData, ThrowOnError>) => (options?.client ?? client).get<ApiVVersionODataControllerCountResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple/$count', ...options });\n\nexport const getApiVbyApiVersionSimpleOperation = <ThrowOnError extends boolean = false>(options: Options<GetApiVbyApiVersionSimpleOperationData, ThrowOnError>) => (options.client ?? client).get<GetApiVbyApiVersionSimpleOperationResponses, GetApiVbyApiVersionSimpleOperationErrors, ThrowOnError>({ url: '/api/v{api-version}/simple:operation', ...options });\n\nexport const deleteCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<DeleteCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).delete<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const getCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<GetCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).get<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const headCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<HeadCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).head<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const optionsCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<OptionsCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).options<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const patchCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<PatchCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).patch<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const postCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<PostCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).post<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const putCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<PutCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).put<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const deleteFoo = <ThrowOnError extends boolean = false>(options: Options<DeleteFooData3, ThrowOnError>) => (options.client ?? client).delete<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/foo/{foo_param}/bar/{BarParam}', ...options });\n\nexport const callWithDescriptions = <ThrowOnError extends boolean = false>(options?: Options<CallWithDescriptionsData, ThrowOnError>) => (options?.client ?? client).post<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/descriptions', ...options });\n\n/**\n * @deprecated\n */\nexport const deprecatedCall = <ThrowOnError extends boolean = false>(options: Options<DeprecatedCallData, ThrowOnError>) => (options.client ?? client).post<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/parameters/deprecated', ...options });\n\nexport const callWithParameters = <ThrowOnError extends boolean = false>(options: Options<CallWithParametersData, ThrowOnError>) => (options.client ?? client).post<unknown, unknown, ThrowOnError>({\n    url: '/api/v{api-version}/parameters/{parameterPath}',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options.headers\n    }\n});\n\nexport const callWithWeirdParameterNames = <ThrowOnError extends boolean = false>(options: Options<CallWithWeirdParameterNamesData, ThrowOnError>) => (options.client ?? client).post<unknown, unknown, ThrowOnError>({\n    url: '/api/v{api-version}/parameters/{parameter.path.1}/{parameter-path-2}/{PARAMETER-PATH-3}',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options.headers\n    }\n});\n\nexport const getCallWithOptionalParam = <ThrowOnError extends boolean = false>(options: Options<GetCallWithOptionalParamData, ThrowOnError>) => (options.client ?? client).get<unknown, unknown, ThrowOnError>({\n    url: '/api/v{api-version}/parameters',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options.headers\n    }\n});\n\nexport const postCallWithOptionalParam = <ThrowOnError extends boolean = false>(options: Options<PostCallWithOptionalParamData, ThrowOnError>) => (options.client ?? client).post<PostCallWithOptionalParamResponses, unknown, ThrowOnError>({\n    url: '/api/v{api-version}/parameters',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options.headers\n    }\n});\n\nexport const postApiVbyApiVersionRequestBody = <ThrowOnError extends boolean = false>(options?: Options<PostApiVbyApiVersionRequestBodyData, ThrowOnError>) => (options?.client ?? client).post<unknown, unknown, ThrowOnError>({\n    url: '/api/v{api-version}/requestBody',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options?.headers\n    }\n});\n\nexport const postApiVbyApiVersionFormData = <ThrowOnError extends boolean = false>(options?: Options<PostApiVbyApiVersionFormDataData, ThrowOnError>) => (options?.client ?? client).post<unknown, unknown, ThrowOnError>({\n    ...formDataBodySerializer,\n    url: '/api/v{api-version}/formData',\n    ...options,\n    headers: {\n        'Content-Type': null,\n        ...options?.headers\n    }\n});\n\nexport const callWithDefaultParameters = <ThrowOnError extends boolean = false>(options?: Options<CallWithDefaultParametersData, ThrowOnError>) => (options?.client ?? client).get<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/defaults', ...options });\n\nexport const callWithDefaultOptionalParameters = <ThrowOnError extends boolean = false>(options?: Options<CallWithDefaultOptionalParametersData, ThrowOnError>) => (options?.client ?? client).post<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/defaults', ...options });\n\nexport const callToTestOrderOfParams = <ThrowOnError extends boolean = false>(options: Options<CallToTestOrderOfParamsData, ThrowOnError>) => (options.client ?? client).put<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/defaults', ...options });\n\nexport const duplicateName = <ThrowOnError extends boolean = false>(options?: Options<DuplicateNameData, ThrowOnError>) => (options?.client ?? client).delete<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/duplicate', ...options });\n\nexport const duplicateName2 = <ThrowOnError extends boolean = false>(options?: Options<DuplicateName2Data, ThrowOnError>) => (options?.client ?? client).get<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/duplicate', ...options });\n\nexport const duplicateName3 = <ThrowOnError extends boolean = false>(options?: Options<DuplicateName3Data, ThrowOnError>) => (options?.client ?? client).post<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/duplicate', ...options });\n\nexport const duplicateName4 = <ThrowOnError extends boolean = false>(options?: Options<DuplicateName4Data, ThrowOnError>) => (options?.client ?? client).put<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/duplicate', ...options });\n\nexport const callWithNoContentResponse = <ThrowOnError extends boolean = false>(options?: Options<CallWithNoContentResponseData, ThrowOnError>) => (options?.client ?? client).get<CallWithNoContentResponseResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/no-content', ...options });\n\nexport const callWithResponseAndNoContentResponse = <ThrowOnError extends boolean = false>(options?: Options<CallWithResponseAndNoContentResponseData, ThrowOnError>) => (options?.client ?? client).get<CallWithResponseAndNoContentResponseResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/multiple-tags/response-and-no-content', ...options });\n\nexport const dummyA = <ThrowOnError extends boolean = false>(options?: Options<DummyAData, ThrowOnError>) => (options?.client ?? client).get<DummyAResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/multiple-tags/a', ...options });\n\nexport const dummyB = <ThrowOnError extends boolean = false>(options?: Options<DummyBData, ThrowOnError>) => (options?.client ?? client).get<DummyBResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/multiple-tags/b', ...options });\n\nexport const callWithResponse = <ThrowOnError extends boolean = false>(options?: Options<CallWithResponseData, ThrowOnError>) => (options?.client ?? client).get<CallWithResponseResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/response', ...options });\n\nexport const callWithDuplicateResponses = <ThrowOnError extends boolean = false>(options?: Options<CallWithDuplicateResponsesData, ThrowOnError>) => (options?.client ?? client).post<CallWithDuplicateResponsesResponses, CallWithDuplicateResponsesErrors, ThrowOnError>({ url: '/api/v{api-version}/response', ...options });\n\nexport const callWithResponses = <ThrowOnError extends boolean = false>(options?: Options<CallWithResponsesData, ThrowOnError>) => (options?.client ?? client).put<CallWithResponsesResponses, CallWithResponsesErrors, ThrowOnError>({ url: '/api/v{api-version}/response', ...options });\n\nexport const collectionFormat = <ThrowOnError extends boolean = false>(options: Options<CollectionFormatData, ThrowOnError>) => (options.client ?? client).get<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/collectionFormat', ...options });\n\nexport const types = <ThrowOnError extends boolean = false>(options: Options<TypesData, ThrowOnError>) => (options.client ?? client).get<TypesResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/types', ...options });\n\nexport const uploadFile = <ThrowOnError extends boolean = false>(options: Options<UploadFileData, ThrowOnError>) => (options.client ?? client).post<UploadFileResponses, unknown, ThrowOnError>({\n    ...urlSearchParamsBodySerializer,\n    url: '/api/v{api-version}/upload',\n    ...options,\n    headers: {\n        'Content-Type': 'application/x-www-form-urlencoded',\n        ...options.headers\n    }\n});\n\nexport const fileResponse = <ThrowOnError extends boolean = false>(options: Options<FileResponseData, ThrowOnError>) => (options.client ?? client).get<FileResponseResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/file/{id}', ...options });\n\nexport const complexTypes = <ThrowOnError extends boolean = false>(options: Options<ComplexTypesData, ThrowOnError>) => (options.client ?? client).get<ComplexTypesResponses, ComplexTypesErrors, ThrowOnError>({\n    querySerializer: { parameters: { parameterObject: { object: { style: 'form' } } } },\n    url: '/api/v{api-version}/complex',\n    ...options\n});\n\nexport const multipartResponse = <ThrowOnError extends boolean = false>(options?: Options<MultipartResponseData, ThrowOnError>) => (options?.client ?? client).get<MultipartResponseResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/multipart', ...options });\n\nexport const multipartRequest = <ThrowOnError extends boolean = false>(options?: Options<MultipartRequestData, ThrowOnError>) => (options?.client ?? client).post<unknown, unknown, ThrowOnError>({\n    ...formDataBodySerializer,\n    url: '/api/v{api-version}/multipart',\n    ...options,\n    headers: {\n        'Content-Type': null,\n        ...options?.headers\n    }\n});\n\nexport const complexParams = <ThrowOnError extends boolean = false>(options: Options<ComplexParamsData, ThrowOnError>) => (options.client ?? client).put<ComplexParamsResponses, unknown, ThrowOnError>({\n    url: '/api/v{api-version}/complex/{id}',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json-patch+json',\n        ...options.headers\n    }\n});\n\nexport const callWithResultFromHeader = <ThrowOnError extends boolean = false>(options?: Options<CallWithResultFromHeaderData, ThrowOnError>) => (options?.client ?? client).post<CallWithResultFromHeaderResponses, CallWithResultFromHeaderErrors, ThrowOnError>({ url: '/api/v{api-version}/header', ...options });\n\nexport const testErrorCode = <ThrowOnError extends boolean = false>(options: Options<TestErrorCodeData, ThrowOnError>) => (options.client ?? client).post<TestErrorCodeResponses, TestErrorCodeErrors, ThrowOnError>({ url: '/api/v{api-version}/error', ...options });\n\nexport const nonAsciiæøåÆøÅöôêÊ字符串 = <ThrowOnError extends boolean = false>(options: Options<NonAsciiæøåÆøÅöôêÊ字符串Data, ThrowOnError>) => (options.client ?? client).post<NonAsciiæøåÆøÅöôêÊ字符串Responses, unknown, ThrowOnError>({ url: '/api/v{api-version}/non-ascii-æøåÆØÅöôêÊ字符串', ...options });\n\n/**\n * Login User\n */\nexport const putWithFormUrlEncoded = <ThrowOnError extends boolean = false>(options: Options<PutWithFormUrlEncodedData, ThrowOnError>) => (options.client ?? client).put<unknown, unknown, ThrowOnError>({\n    ...urlSearchParamsBodySerializer,\n    url: '/api/v{api-version}/non-ascii-æøåÆØÅöôêÊ字符串',\n    ...options,\n    headers: {\n        'Content-Type': 'application/x-www-form-urlencoded',\n        ...options.headers\n    }\n});\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-ky/tsconfig-node16-sdk/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type ClientOptions = {\n    baseUrl: 'http://localhost:3000/base' | (string & {});\n};\n\n/**\n * Model with number-only name\n */\nexport type _400 = string;\n\n/**\n * External ref to shared model (A)\n */\nexport type ExternalRefA = ExternalSharedModel;\n\n/**\n * External ref to shared model (B)\n */\nexport type ExternalRefB = ExternalSharedModel;\n\n/**\n * Testing multiline comments in string: First line\n * Second line\n *\n * Fourth line\n */\nexport type CamelCaseCommentWithBreaks = number;\n\n/**\n * Testing multiline comments in string: First line\n * Second line\n *\n * Fourth line\n */\nexport type CommentWithBreaks = number;\n\n/**\n * Testing backticks in string: `backticks` and ```multiple backticks``` should work\n */\nexport type CommentWithBackticks = number;\n\n/**\n * Testing backticks and quotes in string: `backticks`, 'quotes', \"double quotes\" and ```multiple backticks``` should work\n */\nexport type CommentWithBackticksAndQuotes = number;\n\n/**\n * Testing slashes in string: \\backwards\\\\\\ and /forwards/// should work\n */\nexport type CommentWithSlashes = number;\n\n/**\n * Testing expression placeholders in string: ${expression} should work\n */\nexport type CommentWithExpressionPlaceholders = number;\n\n/**\n * Testing quotes in string: 'single quote''' and \"double quotes\"\"\" should work\n */\nexport type CommentWithQuotes = number;\n\n/**\n * Testing reserved characters in string: * inline * and ** inline ** should work\n */\nexport type CommentWithReservedCharacters = number;\n\n/**\n * This is a simple number\n */\nexport type SimpleInteger = number;\n\n/**\n * This is a simple boolean\n */\nexport type SimpleBoolean = boolean;\n\n/**\n * This is a simple string\n */\nexport type SimpleString = string;\n\n/**\n * A string with non-ascii (unicode) characters valid in typescript identifiers (æøåÆØÅöÔèÈ字符串)\n */\nexport type NonAsciiStringæøåÆøÅöôêÊ字符串 = string;\n\n/**\n * This is a simple file\n */\nexport type SimpleFile = Blob | File;\n\n/**\n * This is a simple reference\n */\nexport type SimpleReference = ModelWithString;\n\n/**\n * This is a simple string\n */\nexport type SimpleStringWithPattern = string | null;\n\n/**\n * This is a simple enum with strings\n */\nexport type EnumWithStrings = 'Success' | 'Warning' | 'Error' | '\\'Single Quote\\'' | '\"Double Quotes\"' | 'Non-ascii: øæåôöØÆÅÔÖ字符串';\n\nexport type EnumWithReplacedCharacters = '\\'Single Quote\\'' | '\"Double Quotes\"' | 'øæåôöØÆÅÔÖ字符串' | 3.1 | '';\n\n/**\n * This is a simple enum with numbers\n */\nexport type EnumWithNumbers = 1 | 2 | 3 | 1.1 | 1.2 | 1.3 | 100 | 200 | 300 | -100 | -200 | -300 | -1.1 | -1.2 | -1.3;\n\n/**\n * Success=1,Warning=2,Error=3\n */\nexport type EnumFromDescription = number;\n\n/**\n * This is a simple enum with numbers\n */\nexport type EnumWithExtensions = 200 | 400 | 500;\n\nexport type EnumWithXEnumNames = 0 | 1 | 2;\n\n/**\n * This is a simple array with numbers\n */\nexport type ArrayWithNumbers = Array<number>;\n\n/**\n * This is a simple array with booleans\n */\nexport type ArrayWithBooleans = Array<boolean>;\n\n/**\n * This is a simple array with strings\n */\nexport type ArrayWithStrings = Array<string>;\n\n/**\n * This is a simple array with references\n */\nexport type ArrayWithReferences = Array<ModelWithString>;\n\n/**\n * This is a simple array containing an array\n */\nexport type ArrayWithArray = Array<Array<ModelWithString>>;\n\n/**\n * This is a simple array with properties\n */\nexport type ArrayWithProperties = Array<{\n    '16x16'?: CamelCaseCommentWithBreaks;\n    bar?: string;\n}>;\n\n/**\n * This is a simple array with any of properties\n */\nexport type ArrayWithAnyOfProperties = Array<{\n    foo?: string;\n} | {\n    bar?: string;\n}>;\n\nexport type AnyOfAnyAndNull = {\n    data?: unknown | null;\n};\n\n/**\n * This is a simple array with any of properties\n */\nexport type AnyOfArrays = {\n    results?: Array<{\n        foo?: string;\n    } | {\n        bar?: string;\n    }>;\n};\n\n/**\n * This is a string dictionary\n */\nexport type DictionaryWithString = {\n    [key: string]: string;\n};\n\nexport type DictionaryWithPropertiesAndAdditionalProperties = {\n    foo?: number;\n    bar?: boolean;\n    [key: string]: string | number | boolean | undefined;\n};\n\n/**\n * This is a string reference\n */\nexport type DictionaryWithReference = {\n    [key: string]: ModelWithString;\n};\n\n/**\n * This is a complex dictionary\n */\nexport type DictionaryWithArray = {\n    [key: string]: Array<ModelWithString>;\n};\n\n/**\n * This is a string dictionary\n */\nexport type DictionaryWithDictionary = {\n    [key: string]: {\n        [key: string]: string;\n    };\n};\n\n/**\n * This is a complex dictionary\n */\nexport type DictionaryWithProperties = {\n    [key: string]: {\n        foo?: string;\n        bar?: string;\n    };\n};\n\n/**\n * This is a model with one number property\n */\nexport type ModelWithInteger = {\n    /**\n     * This is a simple number property\n     */\n    prop?: number;\n};\n\n/**\n * This is a model with one boolean property\n */\nexport type ModelWithBoolean = {\n    /**\n     * This is a simple boolean property\n     */\n    prop?: boolean;\n};\n\n/**\n * This is a model with one string property\n */\nexport type ModelWithString = {\n    /**\n     * This is a simple string property\n     */\n    prop?: string;\n};\n\n/**\n * This is a model with one string property\n */\nexport type ModelWithStringError = {\n    /**\n     * This is a simple string property\n     */\n    prop?: string;\n};\n\n/**\n * `Comment` or `VoiceComment`. The JSON object for adding voice comments to tickets is different. See [Adding voice comments to tickets](/documentation/ticketing/managing-tickets/adding-voice-comments-to-tickets)\n */\nexport type ModelFromZendesk = string;\n\n/**\n * This is a model with one string property\n */\nexport type ModelWithNullableString = {\n    /**\n     * This is a simple string property\n     */\n    nullableProp1?: string | null;\n    /**\n     * This is a simple string property\n     */\n    nullableRequiredProp1: string | null;\n    /**\n     * This is a simple string property\n     */\n    nullableProp2?: string | null;\n    /**\n     * This is a simple string property\n     */\n    nullableRequiredProp2: string | null;\n    /**\n     * This is a simple enum with strings\n     */\n    'foo_bar-enum'?: 'Success' | 'Warning' | 'Error' | 'ØÆÅ字符串';\n};\n\n/**\n * This is a model with one enum\n */\nexport type ModelWithEnum = {\n    /**\n     * This is a simple enum with strings\n     */\n    'foo_bar-enum'?: 'Success' | 'Warning' | 'Error' | 'ØÆÅ字符串';\n    /**\n     * These are the HTTP error code enums\n     */\n    statusCode?: '100' | '200 FOO' | '300 FOO_BAR' | '400 foo-bar' | '500 foo.bar' | '600 foo&bar';\n    /**\n     * Simple boolean enum\n     */\n    bool?: true;\n};\n\n/**\n * This is a model with one enum with escaped name\n */\nexport type ModelWithEnumWithHyphen = {\n    /**\n     * Foo-Bar-Baz-Qux\n     */\n    'foo-bar-baz-qux'?: '3.0';\n};\n\n/**\n * This is a model with one enum\n */\nexport type ModelWithEnumFromDescription = {\n    /**\n     * Success=1,Warning=2,Error=3\n     */\n    test?: number;\n};\n\n/**\n * This is a model with nested enums\n */\nexport type ModelWithNestedEnums = {\n    dictionaryWithEnum?: {\n        [key: string]: 'Success' | 'Warning' | 'Error';\n    };\n    dictionaryWithEnumFromDescription?: {\n        [key: string]: number;\n    };\n    arrayWithEnum?: Array<'Success' | 'Warning' | 'Error'>;\n    arrayWithDescription?: Array<number>;\n    /**\n     * This is a simple enum with strings\n     */\n    'foo_bar-enum'?: 'Success' | 'Warning' | 'Error' | 'ØÆÅ字符串';\n};\n\n/**\n * This is a model with one property containing a reference\n */\nexport type ModelWithReference = {\n    prop?: ModelWithProperties;\n};\n\n/**\n * This is a model with one property containing an array\n */\nexport type ModelWithArrayReadOnlyAndWriteOnly = {\n    prop?: Array<ModelWithReadOnlyAndWriteOnly>;\n    propWithFile?: Array<Blob | File>;\n    propWithNumber?: Array<number>;\n};\n\n/**\n * This is a model with one property containing an array\n */\nexport type ModelWithArray = {\n    prop?: Array<ModelWithString>;\n    propWithFile?: Array<Blob | File>;\n    propWithNumber?: Array<number>;\n};\n\n/**\n * This is a model with one property containing a dictionary\n */\nexport type ModelWithDictionary = {\n    prop?: {\n        [key: string]: string;\n    };\n};\n\n/**\n * This is a deprecated model with a deprecated property\n *\n * @deprecated\n */\nexport type DeprecatedModel = {\n    /**\n     * This is a deprecated property\n     *\n     * @deprecated\n     */\n    prop?: string;\n};\n\n/**\n * This is a model with one property containing a circular reference\n */\nexport type ModelWithCircularReference = {\n    prop?: ModelWithCircularReference;\n};\n\n/**\n * This is a model with one property with a 'one of' relationship\n */\nexport type CompositionWithOneOf = {\n    propA?: ModelWithString | ModelWithEnum | ModelWithArray | ModelWithDictionary;\n};\n\n/**\n * This is a model with one property with a 'one of' relationship where the options are not $ref\n */\nexport type CompositionWithOneOfAnonymous = {\n    propA?: {\n        propA?: string;\n    } | string | number;\n};\n\n/**\n * Circle\n */\nexport type ModelCircle = {\n    kind: string;\n    radius?: number;\n};\n\n/**\n * Square\n */\nexport type ModelSquare = {\n    kind: string;\n    sideLength?: number;\n};\n\n/**\n * This is a model with one property with a 'one of' relationship where the options are not $ref\n */\nexport type CompositionWithOneOfDiscriminator = ({\n    kind: 'circle';\n} & ModelCircle) | ({\n    kind: 'square';\n} & ModelSquare);\n\n/**\n * This is a model with one property with a 'any of' relationship\n */\nexport type CompositionWithAnyOf = {\n    propA?: ModelWithString | ModelWithEnum | ModelWithArray | ModelWithDictionary;\n};\n\n/**\n * This is a model with one property with a 'any of' relationship where the options are not $ref\n */\nexport type CompositionWithAnyOfAnonymous = {\n    propA?: {\n        propA?: string;\n    } | string | number;\n};\n\n/**\n * This is a model with nested 'any of' property with a type null\n */\nexport type CompositionWithNestedAnyAndTypeNull = {\n    propA?: Array<ModelWithDictionary | null> | Array<ModelWithArray | null>;\n};\n\nexport type _3eNum1Период = 'Bird' | 'Dog';\n\nexport type ConstValue = 'ConstValue';\n\n/**\n * This is a model with one property with a 'any of' relationship where the options are not $ref\n */\nexport type CompositionWithNestedAnyOfAndNull = {\n    /**\n     * Scopes\n     */\n    propA?: Array<_3eNum1Период | ConstValue> | null;\n};\n\n/**\n * This is a model with one property with a 'one of' relationship\n */\nexport type CompositionWithOneOfAndNullable = {\n    propA?: {\n        boolean?: boolean;\n    } | ModelWithEnum | ModelWithArray | ModelWithDictionary | null;\n};\n\n/**\n * This is a model that contains a simple dictionary within composition\n */\nexport type CompositionWithOneOfAndSimpleDictionary = {\n    propA?: boolean | {\n        [key: string]: number;\n    };\n};\n\n/**\n * This is a model that contains a dictionary of simple arrays within composition\n */\nexport type CompositionWithOneOfAndSimpleArrayDictionary = {\n    propA?: boolean | {\n        [key: string]: Array<boolean>;\n    };\n};\n\n/**\n * This is a model that contains a dictionary of complex arrays (composited) within composition\n */\nexport type CompositionWithOneOfAndComplexArrayDictionary = {\n    propA?: boolean | {\n        [key: string]: Array<number | string>;\n    };\n};\n\n/**\n * This is a model with one property with a 'all of' relationship\n */\nexport type CompositionWithAllOfAndNullable = {\n    propA?: ({\n        boolean?: boolean;\n    } & ModelWithEnum & ModelWithArray & ModelWithDictionary) | null;\n};\n\n/**\n * This is a model with one property with a 'any of' relationship\n */\nexport type CompositionWithAnyOfAndNullable = {\n    propA?: {\n        boolean?: boolean;\n    } | ModelWithEnum | ModelWithArray | ModelWithDictionary | null;\n};\n\n/**\n * This is a base model with two simple optional properties\n */\nexport type CompositionBaseModel = {\n    firstName?: string;\n    lastname?: string;\n};\n\n/**\n * This is a model that extends the base model\n */\nexport type CompositionExtendedModel = CompositionBaseModel & {\n    age: number;\n    firstName: string;\n    lastname: string;\n};\n\n/**\n * This is a model with one nested property\n */\nexport type ModelWithProperties = {\n    required: string;\n    readonly requiredAndReadOnly: string;\n    requiredAndNullable: string | null;\n    string?: string;\n    number?: number;\n    boolean?: boolean;\n    reference?: ModelWithString;\n    'property with space'?: string;\n    default?: string;\n    try?: string;\n    readonly '@namespace.string'?: string;\n    readonly '@namespace.integer'?: number;\n};\n\n/**\n * This is a model with one nested property\n */\nexport type ModelWithNestedProperties = {\n    readonly first: {\n        readonly second: {\n            readonly third: string | null;\n        } | null;\n    } | null;\n};\n\n/**\n * This is a model with duplicated properties\n */\nexport type ModelWithDuplicateProperties = {\n    prop?: ModelWithString;\n};\n\n/**\n * This is a model with ordered properties\n */\nexport type ModelWithOrderedProperties = {\n    zebra?: string;\n    apple?: string;\n    hawaii?: string;\n};\n\n/**\n * This is a model with duplicated imports\n */\nexport type ModelWithDuplicateImports = {\n    propA?: ModelWithString;\n    propB?: ModelWithString;\n    propC?: ModelWithString;\n};\n\n/**\n * This is a model that extends another model\n */\nexport type ModelThatExtends = ModelWithString & {\n    propExtendsA?: string;\n    propExtendsB?: ModelWithString;\n};\n\n/**\n * This is a model that extends another model\n */\nexport type ModelThatExtendsExtends = ModelWithString & ModelThatExtends & {\n    propExtendsC?: string;\n    propExtendsD?: ModelWithString;\n};\n\n/**\n * This is a model that contains a some patterns\n */\nexport type ModelWithPattern = {\n    key: string;\n    name: string;\n    readonly enabled?: boolean;\n    readonly modified?: string;\n    id?: string;\n    text?: string;\n    patternWithSingleQuotes?: string;\n    patternWithNewline?: string;\n    patternWithBacktick?: string;\n    patternWithUnicode?: string;\n};\n\nexport type File = {\n    /**\n     * Id\n     */\n    readonly id?: string;\n    /**\n     * Updated at\n     */\n    readonly updated_at?: string;\n    /**\n     * Created at\n     */\n    readonly created_at?: string;\n    /**\n     * Mime\n     */\n    mime: string;\n    /**\n     * File\n     */\n    readonly file?: string;\n};\n\nexport type Default = {\n    name?: string;\n};\n\nexport type Pageable = {\n    page?: number;\n    size?: number;\n    sort?: Array<string>;\n};\n\n/**\n * This is a free-form object without additionalProperties.\n */\nexport type FreeFormObjectWithoutAdditionalProperties = {\n    [key: string]: unknown;\n};\n\n/**\n * This is a free-form object with additionalProperties: true.\n */\nexport type FreeFormObjectWithAdditionalPropertiesEqTrue = {\n    [key: string]: unknown;\n};\n\n/**\n * This is a free-form object with additionalProperties: {}.\n */\nexport type FreeFormObjectWithAdditionalPropertiesEqEmptyObject = {\n    [key: string]: unknown;\n};\n\nexport type ModelWithConst = {\n    String?: 'String';\n    number?: 0;\n    null?: null;\n    withType?: 'Some string';\n};\n\n/**\n * This is a model with one property and additionalProperties: true\n */\nexport type ModelWithAdditionalPropertiesEqTrue = {\n    /**\n     * This is a simple string property\n     */\n    prop?: string;\n    [key: string]: unknown;\n};\n\nexport type NestedAnyOfArraysNullable = {\n    nullableArray?: Array<string | boolean> | null;\n};\n\nexport type CompositionWithOneOfAndProperties = ({\n    foo: SimpleParameter;\n} | {\n    bar: NonAsciiStringæøåÆøÅöôêÊ字符串;\n}) & {\n    baz: number | null;\n    qux: number;\n};\n\n/**\n * An object that can be null\n */\nexport type NullableObject = {\n    foo?: string;\n} | null;\n\n/**\n * Some % character\n */\nexport type CharactersInDescription = string;\n\nexport type ModelWithNullableObject = {\n    data?: NullableObject;\n};\n\n/**\n * An object with additional properties that can be null (anyOf ref + null)\n */\nexport type ModelWithAdditionalPropertiesRef = {\n    [key: string]: NullableObject | null;\n};\n\nexport type ModelWithOneOfEnum = {\n    foo: 'Bar';\n} | {\n    foo: 'Baz';\n} | {\n    foo: 'Qux';\n} | {\n    content: string;\n    foo: 'Quux';\n} | {\n    content: [\n        string,\n        string\n    ];\n    foo: 'Corge';\n};\n\nexport type ModelWithNestedArrayEnumsDataFoo = 'foo' | 'bar';\n\nexport type ModelWithNestedArrayEnumsDataBar = 'baz' | 'qux';\n\nexport type ModelWithNestedArrayEnumsData = {\n    foo?: Array<ModelWithNestedArrayEnumsDataFoo>;\n    bar?: Array<ModelWithNestedArrayEnumsDataBar>;\n};\n\nexport type ModelWithNestedArrayEnums = {\n    array_strings?: Array<string>;\n    data?: ModelWithNestedArrayEnumsData;\n};\n\nexport type ModelWithNestedCompositionEnums = {\n    foo?: ModelWithNestedArrayEnumsDataFoo;\n};\n\nexport type ModelWithReadOnlyAndWriteOnly = {\n    foo: string;\n    readonly bar: string;\n};\n\nexport type ModelWithConstantSizeArray = [\n    number,\n    number\n];\n\nexport type ModelWithAnyOfConstantSizeArray = [\n    number | string,\n    number | string,\n    number | string\n];\n\nexport type ModelWithPrefixItemsConstantSizeArray = [\n    ModelWithInteger,\n    number | string,\n    string\n];\n\nexport type ModelWithAnyOfConstantSizeArrayNullable = [\n    number | null | string,\n    number | null | string,\n    number | null | string\n];\n\nexport type ModelWithAnyOfConstantSizeArrayWithNSizeAndOptions = [\n    number | Import,\n    number | Import\n];\n\nexport type ModelWithAnyOfConstantSizeArrayAndIntersect = [\n    number & string,\n    number & string\n];\n\nexport type ModelWithNumericEnumUnion = {\n    /**\n     * Период\n     */\n    value?: -10 | -1 | 0 | 1 | 3 | 6 | 12;\n};\n\n/**\n * Some description with `back ticks`\n */\nexport type ModelWithBackticksInDescription = {\n    /**\n     * The template `that` should be used for parsing and importing the contents of the CSV file.\n     *\n     * <br/><p>There is one placeholder currently supported:<ul>     <li><b>${x}</b> - refers to the n-th column in the CSV file, e.g. ${1}, ${2}, ...)</li></ul><p>Example of a correct JSON template:</p>\n     * <pre>\n     * [\n     * {\n     * \"resourceType\": \"Asset\",\n     * \"identifier\": {\n     * \"name\": \"${1}\",\n     * \"domain\": {\n     * \"name\": \"${2}\",\n     * \"community\": {\n     * \"name\": \"Some Community\"\n     * }\n     * }\n     * },\n     * \"attributes\" : {\n     * \"00000000-0000-0000-0000-000000003115\" : [ {\n     * \"value\" : \"${3}\"\n     * } ],\n     * \"00000000-0000-0000-0000-000000000222\" : [ {\n     * \"value\" : \"${4}\"\n     * } ]\n     * }\n     * }\n     * ]\n     * </pre>\n     */\n    template?: string;\n};\n\nexport type ModelWithOneOfAndProperties = (SimpleParameter | NonAsciiStringæøåÆøÅöôêÊ字符串) & {\n    baz: number | null;\n    qux: number;\n};\n\n/**\n * Model used to test deduplication strategy (unused)\n */\nexport type ParameterSimpleParameterUnused = string;\n\n/**\n * Model used to test deduplication strategy\n */\nexport type PostServiceWithEmptyTagResponse = string;\n\n/**\n * Model used to test deduplication strategy\n */\nexport type PostServiceWithEmptyTagResponse2 = string;\n\n/**\n * Model used to test deduplication strategy\n */\nexport type DeleteFooData = string;\n\n/**\n * Model used to test deduplication strategy\n */\nexport type DeleteFooData2 = string;\n\n/**\n * Model with restricted keyword name\n */\nexport type Import = string;\n\nexport type SchemaWithFormRestrictedKeys = {\n    description?: string;\n    'x-enum-descriptions'?: string;\n    'x-enum-varnames'?: string;\n    'x-enumNames'?: string;\n    title?: string;\n    object?: {\n        description?: string;\n        'x-enum-descriptions'?: string;\n        'x-enum-varnames'?: string;\n        'x-enumNames'?: string;\n        title?: string;\n    };\n    array?: Array<{\n        description?: string;\n        'x-enum-descriptions'?: string;\n        'x-enum-varnames'?: string;\n        'x-enumNames'?: string;\n        title?: string;\n    }>;\n};\n\n/**\n * This schema was giving PascalCase transformations a hard time\n */\nexport type IoK8sApimachineryPkgApisMetaV1DeleteOptions = {\n    /**\n     * Must be fulfilled before a deletion is carried out. If not possible, a 409 Conflict status will be returned.\n     */\n    preconditions?: IoK8sApimachineryPkgApisMetaV1Preconditions;\n};\n\n/**\n * This schema was giving PascalCase transformations a hard time\n */\nexport type IoK8sApimachineryPkgApisMetaV1Preconditions = {\n    /**\n     * Specifies the target ResourceVersion\n     */\n    resourceVersion?: string;\n    /**\n     * Specifies the target UID.\n     */\n    uid?: string;\n};\n\nexport type AdditionalPropertiesUnknownIssue = {\n    [key: string]: string | number;\n};\n\nexport type AdditionalPropertiesUnknownIssue2 = {\n    [key: string]: string | number;\n};\n\nexport type AdditionalPropertiesUnknownIssue3 = string & {\n    entries: {\n        [key: string]: AdditionalPropertiesUnknownIssue;\n    };\n};\n\nexport type AdditionalPropertiesIntegerIssue = {\n    value: number;\n    [key: string]: number;\n};\n\nexport type OneOfAllOfIssue = ((ConstValue | GenericSchemaDuplicateIssue1SystemBoolean) & _3eNum1Период) | GenericSchemaDuplicateIssue1SystemString;\n\nexport type GenericSchemaDuplicateIssue1SystemBoolean = {\n    item?: boolean;\n    error?: string | null;\n    readonly hasError?: boolean;\n    data?: {\n        [key: string]: never;\n    };\n};\n\nexport type GenericSchemaDuplicateIssue1SystemString = {\n    item?: string | null;\n    error?: string | null;\n    readonly hasError?: boolean;\n};\n\nexport type ExternalSharedModel = {\n    id: string;\n    name?: string;\n};\n\n/**\n * This is a model with one property containing a reference\n */\nexport type ModelWithReferenceWritable = {\n    prop?: ModelWithPropertiesWritable;\n};\n\n/**\n * This is a model with one property containing an array\n */\nexport type ModelWithArrayReadOnlyAndWriteOnlyWritable = {\n    prop?: Array<ModelWithReadOnlyAndWriteOnlyWritable>;\n    propWithFile?: Array<Blob | File>;\n    propWithNumber?: Array<number>;\n};\n\n/**\n * This is a model with one nested property\n */\nexport type ModelWithPropertiesWritable = {\n    required: string;\n    requiredAndNullable: string | null;\n    string?: string;\n    number?: number;\n    boolean?: boolean;\n    reference?: ModelWithString;\n    'property with space'?: string;\n    default?: string;\n    try?: string;\n};\n\n/**\n * This is a model that contains a some patterns\n */\nexport type ModelWithPatternWritable = {\n    key: string;\n    name: string;\n    id?: string;\n    text?: string;\n    patternWithSingleQuotes?: string;\n    patternWithNewline?: string;\n    patternWithBacktick?: string;\n    patternWithUnicode?: string;\n};\n\nexport type FileWritable = {\n    /**\n     * Mime\n     */\n    mime: string;\n};\n\nexport type ModelWithReadOnlyAndWriteOnlyWritable = {\n    foo: string;\n    baz: string;\n};\n\nexport type ModelWithAnyOfConstantSizeArrayWithNSizeAndOptionsWritable = [\n    number | Import,\n    number | Import\n];\n\nexport type AdditionalPropertiesUnknownIssueWritable = {\n    [key: string]: string | number;\n};\n\nexport type OneOfAllOfIssueWritable = ((ConstValue | GenericSchemaDuplicateIssue1SystemBoolean) & _3eNum1Период) | GenericSchemaDuplicateIssue1SystemString;\n\nexport type GenericSchemaDuplicateIssue1SystemBooleanWritable = {\n    item?: boolean;\n    error?: string | null;\n    data?: {\n        [key: string]: never;\n    };\n};\n\nexport type GenericSchemaDuplicateIssue1SystemStringWritable = {\n    item?: string | null;\n    error?: string | null;\n};\n\n/**\n * This is a reusable parameter\n */\nexport type SimpleParameter = string;\n\n/**\n * Parameter with illegal characters\n */\nexport type XFooBar = ModelWithString;\n\n/**\n * A reusable request body\n */\nexport type SimpleRequestBody = ModelWithString;\n\n/**\n * A reusable request body\n */\nexport type SimpleFormData = ModelWithString;\n\nexport type ExportData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no+tag';\n};\n\nexport type PatchApiVbyApiVersionNoTagData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no+tag';\n};\n\nexport type PatchApiVbyApiVersionNoTagResponses = {\n    /**\n     * OK\n     */\n    default: unknown;\n};\n\nexport type ImportData = {\n    body: ModelWithReadOnlyAndWriteOnlyWritable | ModelWithArrayReadOnlyAndWriteOnlyWritable;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no+tag';\n};\n\nexport type ImportResponses = {\n    /**\n     * Success\n     */\n    200: ModelFromZendesk;\n    /**\n     * Default success response\n     */\n    default: ModelWithReadOnlyAndWriteOnly;\n};\n\nexport type ImportResponse = ImportResponses[keyof ImportResponses];\n\nexport type FooWowData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no+tag';\n};\n\nexport type FooWowResponses = {\n    /**\n     * OK\n     */\n    default: unknown;\n};\n\nexport type ApiVVersionODataControllerCountData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple/$count';\n};\n\nexport type ApiVVersionODataControllerCountResponses = {\n    /**\n     * Success\n     */\n    200: ModelFromZendesk;\n};\n\nexport type ApiVVersionODataControllerCountResponse = ApiVVersionODataControllerCountResponses[keyof ApiVVersionODataControllerCountResponses];\n\nexport type GetApiVbyApiVersionSimpleOperationData = {\n    body?: never;\n    path: {\n        /**\n         * foo in method\n         */\n        foo_param: string;\n    };\n    query?: never;\n    url: '/api/v{api-version}/simple:operation';\n};\n\nexport type GetApiVbyApiVersionSimpleOperationErrors = {\n    /**\n     * Default error response\n     */\n    default: ModelWithBoolean;\n};\n\nexport type GetApiVbyApiVersionSimpleOperationError = GetApiVbyApiVersionSimpleOperationErrors[keyof GetApiVbyApiVersionSimpleOperationErrors];\n\nexport type GetApiVbyApiVersionSimpleOperationResponses = {\n    /**\n     * Response is a simple number\n     */\n    200: number;\n};\n\nexport type GetApiVbyApiVersionSimpleOperationResponse = GetApiVbyApiVersionSimpleOperationResponses[keyof GetApiVbyApiVersionSimpleOperationResponses];\n\nexport type DeleteCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type GetCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type HeadCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type OptionsCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type PatchCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type PostCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type PutCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type DeleteFooData3 = {\n    body?: never;\n    headers: {\n        /**\n         * Parameter with illegal characters\n         */\n        'x-Foo-Bar': ModelWithString;\n    };\n    path: {\n        /**\n         * foo in method\n         */\n        foo_param: string;\n        /**\n         * bar in method\n         */\n        BarParam: string;\n    };\n    query?: never;\n    url: '/api/v{api-version}/foo/{foo_param}/bar/{BarParam}';\n};\n\nexport type CallWithDescriptionsData = {\n    body?: never;\n    path?: never;\n    query?: {\n        /**\n         * Testing multiline comments in string: First line\n         * Second line\n         *\n         * Fourth line\n         */\n        parameterWithBreaks?: string;\n        /**\n         * Testing backticks in string: `backticks` and ```multiple backticks``` should work\n         */\n        parameterWithBackticks?: string;\n        /**\n         * Testing slashes in string: \\backwards\\\\\\ and /forwards/// should work\n         */\n        parameterWithSlashes?: string;\n        /**\n         * Testing expression placeholders in string: ${expression} should work\n         */\n        parameterWithExpressionPlaceholders?: string;\n        /**\n         * Testing quotes in string: 'single quote''' and \"double quotes\"\"\" should work\n         */\n        parameterWithQuotes?: string;\n        /**\n         * Testing reserved characters in string: * inline * and ** inline ** should work\n         */\n        parameterWithReservedCharacters?: string;\n    };\n    url: '/api/v{api-version}/descriptions';\n};\n\nexport type DeprecatedCallData = {\n    body?: never;\n    headers: {\n        /**\n         * This parameter is deprecated\n         *\n         * @deprecated\n         */\n        parameter: DeprecatedModel | null;\n    };\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/parameters/deprecated';\n};\n\nexport type CallWithParametersData = {\n    /**\n     * This is the parameter that goes into the body\n     */\n    body: {\n        [key: string]: unknown;\n    } | null;\n    headers: {\n        /**\n         * This is the parameter that goes into the header\n         */\n        parameterHeader: string | null;\n    };\n    path: {\n        /**\n         * This is the parameter that goes into the path\n         */\n        parameterPath: string | null;\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string | null;\n    };\n    query: {\n        foo_ref_enum?: ModelWithNestedArrayEnumsDataFoo;\n        foo_all_of_enum: ModelWithNestedArrayEnumsDataFoo;\n        /**\n         * This is the parameter that goes into the query params\n         */\n        cursor: string | null;\n    };\n    url: '/api/v{api-version}/parameters/{parameterPath}';\n};\n\nexport type CallWithWeirdParameterNamesData = {\n    /**\n     * This is the parameter that goes into the body\n     */\n    body: ModelWithString | null;\n    headers: {\n        /**\n         * This is the parameter that goes into the request header\n         */\n        'parameter.header': string | null;\n    };\n    path: {\n        /**\n         * This is the parameter that goes into the path\n         */\n        'parameter.path.1'?: string;\n        /**\n         * This is the parameter that goes into the path\n         */\n        'parameter-path-2'?: string;\n        /**\n         * This is the parameter that goes into the path\n         */\n        'PARAMETER-PATH-3'?: string;\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string | null;\n    };\n    query: {\n        /**\n         * This is the parameter with a reserved keyword\n         */\n        default?: string;\n        /**\n         * This is the parameter that goes into the request query params\n         */\n        'parameter-query': string | null;\n    };\n    url: '/api/v{api-version}/parameters/{parameter.path.1}/{parameter-path-2}/{PARAMETER-PATH-3}';\n};\n\nexport type GetCallWithOptionalParamData = {\n    /**\n     * This is a required parameter\n     */\n    body: ModelWithOneOfEnum;\n    path?: never;\n    query?: {\n        /**\n         * This is an optional parameter\n         */\n        page?: number;\n    };\n    url: '/api/v{api-version}/parameters';\n};\n\nexport type PostCallWithOptionalParamData = {\n    /**\n     * This is an optional parameter\n     */\n    body?: {\n        offset?: number | null;\n    };\n    path?: never;\n    query: {\n        /**\n         * This is a required parameter\n         */\n        parameter: Pageable;\n    };\n    url: '/api/v{api-version}/parameters';\n};\n\nexport type PostCallWithOptionalParamResponses = {\n    /**\n     * Response is a simple number\n     */\n    200: number;\n    /**\n     * Success\n     */\n    204: void;\n};\n\nexport type PostCallWithOptionalParamResponse = PostCallWithOptionalParamResponses[keyof PostCallWithOptionalParamResponses];\n\nexport type PostApiVbyApiVersionRequestBodyData = {\n    /**\n     * A reusable request body\n     */\n    body?: SimpleRequestBody;\n    path?: never;\n    query?: {\n        /**\n         * This is a reusable parameter\n         */\n        parameter?: string;\n    };\n    url: '/api/v{api-version}/requestBody';\n};\n\nexport type PostApiVbyApiVersionFormDataData = {\n    /**\n     * A reusable request body\n     */\n    body?: SimpleFormData;\n    path?: never;\n    query?: {\n        /**\n         * This is a reusable parameter\n         */\n        parameter?: string;\n    };\n    url: '/api/v{api-version}/formData';\n};\n\nexport type CallWithDefaultParametersData = {\n    body?: never;\n    path?: never;\n    query?: {\n        /**\n         * This is a simple string with default value\n         */\n        parameterString?: string | null;\n        /**\n         * This is a simple number with default value\n         */\n        parameterNumber?: number | null;\n        /**\n         * This is a simple boolean with default value\n         */\n        parameterBoolean?: boolean | null;\n        /**\n         * This is a simple enum with default value\n         */\n        parameterEnum?: 'Success' | 'Warning' | 'Error';\n        /**\n         * This is a simple model with default value\n         */\n        parameterModel?: ModelWithString | null;\n    };\n    url: '/api/v{api-version}/defaults';\n};\n\nexport type CallWithDefaultOptionalParametersData = {\n    body?: never;\n    path?: never;\n    query?: {\n        /**\n         * This is a simple string that is optional with default value\n         */\n        parameterString?: string;\n        /**\n         * This is a simple number that is optional with default value\n         */\n        parameterNumber?: number;\n        /**\n         * This is a simple boolean that is optional with default value\n         */\n        parameterBoolean?: boolean;\n        /**\n         * This is a simple enum that is optional with default value\n         */\n        parameterEnum?: 'Success' | 'Warning' | 'Error';\n        /**\n         * This is a simple model that is optional with default value\n         */\n        parameterModel?: ModelWithString;\n    };\n    url: '/api/v{api-version}/defaults';\n};\n\nexport type CallToTestOrderOfParamsData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * This is a optional string with default\n         */\n        parameterOptionalStringWithDefault?: string;\n        /**\n         * This is a optional string with empty default\n         */\n        parameterOptionalStringWithEmptyDefault?: string;\n        /**\n         * This is a optional string with no default\n         */\n        parameterOptionalStringWithNoDefault?: string;\n        /**\n         * This is a string with default\n         */\n        parameterStringWithDefault: string;\n        /**\n         * This is a string with empty default\n         */\n        parameterStringWithEmptyDefault: string;\n        /**\n         * This is a string with no default\n         */\n        parameterStringWithNoDefault: string;\n        /**\n         * This is a string that can be null with no default\n         */\n        parameterStringNullableWithNoDefault?: string | null;\n        /**\n         * This is a string that can be null with default\n         */\n        parameterStringNullableWithDefault?: string | null;\n    };\n    url: '/api/v{api-version}/defaults';\n};\n\nexport type DuplicateNameData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/duplicate';\n};\n\nexport type DuplicateName2Data = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/duplicate';\n};\n\nexport type DuplicateName3Data = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/duplicate';\n};\n\nexport type DuplicateName4Data = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/duplicate';\n};\n\nexport type CallWithNoContentResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no-content';\n};\n\nexport type CallWithNoContentResponseResponses = {\n    /**\n     * Success\n     */\n    204: void;\n};\n\nexport type CallWithNoContentResponseResponse = CallWithNoContentResponseResponses[keyof CallWithNoContentResponseResponses];\n\nexport type CallWithResponseAndNoContentResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multiple-tags/response-and-no-content';\n};\n\nexport type CallWithResponseAndNoContentResponseResponses = {\n    /**\n     * Response is a simple number\n     */\n    200: number;\n    /**\n     * Success\n     */\n    204: void;\n};\n\nexport type CallWithResponseAndNoContentResponseResponse = CallWithResponseAndNoContentResponseResponses[keyof CallWithResponseAndNoContentResponseResponses];\n\nexport type DummyAData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multiple-tags/a';\n};\n\nexport type DummyAResponses = {\n    200: _400;\n};\n\nexport type DummyAResponse = DummyAResponses[keyof DummyAResponses];\n\nexport type DummyBData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multiple-tags/b';\n};\n\nexport type DummyBResponses = {\n    /**\n     * Success\n     */\n    204: void;\n};\n\nexport type DummyBResponse = DummyBResponses[keyof DummyBResponses];\n\nexport type CallWithResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/response';\n};\n\nexport type CallWithResponseResponses = {\n    default: Import;\n};\n\nexport type CallWithResponseResponse = CallWithResponseResponses[keyof CallWithResponseResponses];\n\nexport type CallWithDuplicateResponsesData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/response';\n};\n\nexport type CallWithDuplicateResponsesErrors = {\n    /**\n     * Message for 500 error\n     */\n    500: ModelWithStringError;\n    /**\n     * Message for 501 error\n     */\n    501: ModelWithStringError;\n    /**\n     * Message for 502 error\n     */\n    502: ModelWithStringError;\n    /**\n     * Message for 4XX errors\n     */\n    '4XX': DictionaryWithArray;\n    /**\n     * Default error response\n     */\n    default: ModelWithBoolean;\n};\n\nexport type CallWithDuplicateResponsesError = CallWithDuplicateResponsesErrors[keyof CallWithDuplicateResponsesErrors];\n\nexport type CallWithDuplicateResponsesResponses = {\n    /**\n     * Message for 200 response\n     */\n    200: ModelWithBoolean & ModelWithInteger;\n    /**\n     * Message for 201 response\n     */\n    201: ModelWithString;\n    /**\n     * Message for 202 response\n     */\n    202: ModelWithString;\n};\n\nexport type CallWithDuplicateResponsesResponse = CallWithDuplicateResponsesResponses[keyof CallWithDuplicateResponsesResponses];\n\nexport type CallWithResponsesData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/response';\n};\n\nexport type CallWithResponsesErrors = {\n    /**\n     * Message for 500 error\n     */\n    500: ModelWithStringError;\n    /**\n     * Message for 501 error\n     */\n    501: ModelWithStringError;\n    /**\n     * Message for 502 error\n     */\n    502: ModelWithStringError;\n    /**\n     * Message for default response\n     */\n    default: ModelWithStringError;\n};\n\nexport type CallWithResponsesError = CallWithResponsesErrors[keyof CallWithResponsesErrors];\n\nexport type CallWithResponsesResponses = {\n    /**\n     * Message for 200 response\n     */\n    200: {\n        readonly '@namespace.string'?: string;\n        readonly '@namespace.integer'?: number;\n        readonly value?: Array<ModelWithString>;\n    };\n    /**\n     * Message for 201 response\n     */\n    201: ModelThatExtends;\n    /**\n     * Message for 202 response\n     */\n    202: ModelThatExtendsExtends;\n};\n\nexport type CallWithResponsesResponse = CallWithResponsesResponses[keyof CallWithResponsesResponses];\n\nexport type CollectionFormatData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * This is an array parameter that is sent as csv format (comma-separated values)\n         */\n        parameterArrayCSV: Array<string> | null;\n        /**\n         * This is an array parameter that is sent as ssv format (space-separated values)\n         */\n        parameterArraySSV: Array<string> | null;\n        /**\n         * This is an array parameter that is sent as tsv format (tab-separated values)\n         */\n        parameterArrayTSV: Array<string> | null;\n        /**\n         * This is an array parameter that is sent as pipes format (pipe-separated values)\n         */\n        parameterArrayPipes: Array<string> | null;\n        /**\n         * This is an array parameter that is sent as multi format (multiple parameter instances)\n         */\n        parameterArrayMulti: Array<string> | null;\n    };\n    url: '/api/v{api-version}/collectionFormat';\n};\n\nexport type TypesData = {\n    body?: never;\n    path?: {\n        /**\n         * This is a number parameter\n         */\n        id?: number;\n    };\n    query: {\n        /**\n         * This is a number parameter\n         */\n        parameterNumber: number;\n        /**\n         * This is a string parameter\n         */\n        parameterString: string | null;\n        /**\n         * This is a boolean parameter\n         */\n        parameterBoolean: boolean | null;\n        /**\n         * This is an object parameter\n         */\n        parameterObject: {\n            [key: string]: unknown;\n        } | null;\n        /**\n         * This is an array parameter\n         */\n        parameterArray: Array<string> | null;\n        /**\n         * This is a dictionary parameter\n         */\n        parameterDictionary: {\n            [key: string]: unknown;\n        } | null;\n        /**\n         * This is an enum parameter\n         */\n        parameterEnum: 'Success' | 'Warning' | 'Error' | null;\n    };\n    url: '/api/v{api-version}/types';\n};\n\nexport type TypesResponses = {\n    /**\n     * Response is a simple number\n     */\n    200: number;\n    /**\n     * Response is a simple string\n     */\n    201: string;\n    /**\n     * Response is a simple boolean\n     */\n    202: boolean;\n    /**\n     * Response is a simple object\n     */\n    203: {\n        [key: string]: unknown;\n    };\n};\n\nexport type TypesResponse = TypesResponses[keyof TypesResponses];\n\nexport type UploadFileData = {\n    body: Blob | File;\n    path: {\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string | null;\n    };\n    query?: never;\n    url: '/api/v{api-version}/upload';\n};\n\nexport type UploadFileResponses = {\n    200: boolean;\n};\n\nexport type UploadFileResponse = UploadFileResponses[keyof UploadFileResponses];\n\nexport type FileResponseData = {\n    body?: never;\n    path: {\n        id: string;\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string;\n    };\n    query?: never;\n    url: '/api/v{api-version}/file/{id}';\n};\n\nexport type FileResponseResponses = {\n    /**\n     * Success\n     */\n    200: Blob | File;\n};\n\nexport type FileResponseResponse = FileResponseResponses[keyof FileResponseResponses];\n\nexport type ComplexTypesData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * Parameter containing object\n         */\n        parameterObject: {\n            first?: {\n                second?: {\n                    third?: string;\n                };\n            };\n        };\n        /**\n         * Parameter containing reference\n         */\n        parameterReference: ModelWithString;\n    };\n    url: '/api/v{api-version}/complex';\n};\n\nexport type ComplexTypesErrors = {\n    /**\n     * 400 `server` error\n     */\n    400: unknown;\n    /**\n     * 500 server error\n     */\n    500: unknown;\n};\n\nexport type ComplexTypesResponses = {\n    /**\n     * Successful response\n     */\n    200: Array<ModelWithString>;\n};\n\nexport type ComplexTypesResponse = ComplexTypesResponses[keyof ComplexTypesResponses];\n\nexport type MultipartResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multipart';\n};\n\nexport type MultipartResponseResponses = {\n    /**\n     * OK\n     */\n    200: {\n        file?: Blob | File;\n        metadata?: {\n            foo?: string;\n            bar?: string;\n        };\n    };\n};\n\nexport type MultipartResponseResponse = MultipartResponseResponses[keyof MultipartResponseResponses];\n\nexport type MultipartRequestData = {\n    body?: {\n        content?: Blob | File;\n        data?: ModelWithString | null;\n    };\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multipart';\n};\n\nexport type ComplexParamsData = {\n    body?: {\n        readonly key: string | null;\n        name: string | null;\n        enabled?: boolean;\n        type: 'Monkey' | 'Horse' | 'Bird';\n        listOfModels?: Array<ModelWithString> | null;\n        listOfStrings?: Array<string> | null;\n        parameters: ModelWithString | ModelWithEnum | ModelWithArray | ModelWithDictionary;\n        readonly user?: {\n            readonly id?: number;\n            readonly name?: string | null;\n        };\n    };\n    path: {\n        id: number;\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string;\n    };\n    query?: never;\n    url: '/api/v{api-version}/complex/{id}';\n};\n\nexport type ComplexParamsResponses = {\n    /**\n     * Success\n     */\n    200: ModelWithString;\n};\n\nexport type ComplexParamsResponse = ComplexParamsResponses[keyof ComplexParamsResponses];\n\nexport type CallWithResultFromHeaderData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/header';\n};\n\nexport type CallWithResultFromHeaderErrors = {\n    /**\n     * 400 server error\n     */\n    400: unknown;\n    /**\n     * 500 server error\n     */\n    500: unknown;\n};\n\nexport type CallWithResultFromHeaderResponses = {\n    /**\n     * Successful response\n     */\n    200: unknown;\n};\n\nexport type TestErrorCodeData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * Status code to return\n         */\n        status: number;\n    };\n    url: '/api/v{api-version}/error';\n};\n\nexport type TestErrorCodeErrors = {\n    /**\n     * Custom message: Internal Server Error\n     */\n    500: unknown;\n    /**\n     * Custom message: Not Implemented\n     */\n    501: unknown;\n    /**\n     * Custom message: Bad Gateway\n     */\n    502: unknown;\n    /**\n     * Custom message: Service Unavailable\n     */\n    503: unknown;\n};\n\nexport type TestErrorCodeResponses = {\n    /**\n     * Custom message: Successful response\n     */\n    200: unknown;\n};\n\nexport type NonAsciiæøåÆøÅöôêÊ字符串Data = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * Dummy input param\n         */\n        nonAsciiParamæøåÆØÅöôêÊ: number;\n    };\n    url: '/api/v{api-version}/non-ascii-æøåÆØÅöôêÊ字符串';\n};\n\nexport type NonAsciiæøåÆøÅöôêÊ字符串Responses = {\n    /**\n     * Successful response\n     */\n    200: Array<NonAsciiStringæøåÆøÅöôêÊ字符串>;\n};\n\nexport type NonAsciiæøåÆøÅöôêÊ字符串Response = NonAsciiæøåÆøÅöôêÊ字符串Responses[keyof NonAsciiæøåÆøÅöôêÊ字符串Responses];\n\nexport type PutWithFormUrlEncodedData = {\n    body: ArrayWithStrings;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/non-ascii-æøåÆØÅöôêÊ字符串';\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-ky/tsconfig-nodenext-sdk/client/client.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { HTTPError, Options as KyOptions } from 'ky';\nimport ky from 'ky';\n\nimport { createSseClient } from '../core/serverSentEvents.gen.js';\nimport type { HttpMethod } from '../core/types.gen.js';\nimport { getValidRequestBody } from '../core/utils.gen.js';\nimport type { Client, Config, RequestOptions, ResolvedRequestOptions, RetryOptions } from './types.gen.js';\nimport type { Middleware } from './utils.gen.js';\nimport {\n  buildUrl,\n  createConfig,\n  createInterceptors,\n  getParseAs,\n  mergeConfigs,\n  mergeHeaders,\n  setAuthParams,\n} from './utils.gen.js';\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 (options: RequestOptions) => {\n    const opts = {\n      ..._config,\n      ...options,\n      headers: mergeHeaders(_config.headers, options.headers),\n      ky: options.ky ?? _config.ky ?? ky,\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    if (opts.body === undefined || opts.serializedBody === '') {\n      opts.headers.delete('Content-Type');\n    }\n\n    const url = buildUrl(opts);\n\n    return { opts, url };\n  };\n\n  const parseErrorResponse = async (\n    response: Response,\n    request: Request,\n    opts: ResolvedRequestOptions,\n    interceptorsMiddleware: Middleware<Request, Response, unknown, ResolvedRequestOptions>,\n  ) => {\n    const result = {\n      request,\n      response,\n    };\n\n    const textError = await response.text();\n    let jsonError: unknown;\n\n    try {\n      jsonError = JSON.parse(textError);\n    } catch {\n      jsonError = undefined;\n    }\n\n    const error = jsonError ?? textError;\n    let finalError = error;\n\n    for (const fn of interceptorsMiddleware.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    return opts.responseStyle === 'data'\n      ? undefined\n      : {\n          error: finalError,\n          ...result,\n        };\n  };\n\n  const request: Client['request'] = async (options) => {\n    // @ts-expect-error\n    const { opts, url } = await beforeRequest(options);\n\n    const kyInstance = opts.ky!;\n\n    const validBody = getValidRequestBody(opts);\n\n    const kyOptions: KyOptions = {\n      body: validBody as BodyInit,\n      cache: opts.cache,\n      credentials: opts.credentials,\n      headers: opts.headers,\n      integrity: opts.integrity,\n      keepalive: opts.keepalive,\n      method: opts.method as KyOptions['method'],\n      mode: opts.mode,\n      redirect: 'follow',\n      referrer: opts.referrer,\n      referrerPolicy: opts.referrerPolicy,\n      signal: opts.signal,\n      throwHttpErrors: opts.throwOnError ?? false,\n      timeout: opts.timeout,\n      ...opts.kyOptions,\n    };\n\n    if (opts.retry && typeof opts.retry === 'object') {\n      const retryOpts = opts.retry as RetryOptions;\n      kyOptions.retry = {\n        limit: retryOpts.limit ?? 2,\n        methods: retryOpts.methods as Array<\n          'get' | 'post' | 'put' | 'patch' | 'head' | 'delete' | 'options' | 'trace'\n        >,\n        statusCodes: retryOpts.statusCodes,\n      };\n    }\n\n    let request = new Request(url, {\n      body: kyOptions.body as BodyInit,\n      headers: kyOptions.headers as HeadersInit,\n      method: kyOptions.method,\n    });\n\n    for (const fn of interceptors.request.fns) {\n      if (fn) {\n        request = await fn(request, opts);\n      }\n    }\n\n    let response: Response;\n\n    try {\n      response = await kyInstance(request, kyOptions);\n    } catch (error) {\n      if (error && typeof error === 'object' && 'response' in error) {\n        const httpError = error as HTTPError;\n        response = httpError.response;\n\n        for (const fn of interceptors.response.fns) {\n          if (fn) {\n            response = await fn(response, request, opts);\n          }\n        }\n\n        return parseErrorResponse(response, request, opts, interceptors);\n      }\n\n      throw error;\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    return parseErrorResponse(response, request, opts, interceptors);\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      fetch: globalThis.fetch,\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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-ky/tsconfig-nodenext-sdk/client/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type { Auth } from '../core/auth.gen.js';\nexport type { QuerySerializerOptions } from '../core/bodySerializer.gen.js';\nexport {\n  formDataBodySerializer,\n  jsonBodySerializer,\n  urlSearchParamsBodySerializer,\n} from '../core/bodySerializer.gen.js';\nexport { buildClientParams } from '../core/params.gen.js';\nexport { serializeQueryKeyValue } from '../core/queryKeySerializer.gen.js';\nexport { createClient } from './client.gen.js';\nexport type {\n  Client,\n  ClientOptions,\n  Config,\n  CreateClientConfig,\n  Options,\n  RequestOptions,\n  RequestResult,\n  ResolvedRequestOptions,\n  ResponseStyle,\n  RetryOptions,\n  TDataShape,\n} from './types.gen.js';\nexport { createConfig, mergeHeaders } from './utils.gen.js';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-ky/tsconfig-nodenext-sdk/client/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { Options as KyOptions } from 'ky';\nimport type ky from 'ky';\n\nimport type { Auth } from '../core/auth.gen.js';\nimport type {\n  ServerSentEventsOptions,\n  ServerSentEventsResult,\n} from '../core/serverSentEvents.gen.js';\nimport type { Client as CoreClient, Config as CoreConfig } from '../core/types.gen.js';\nimport type { Middleware } from './utils.gen.js';\n\nexport type ResponseStyle = 'data' | 'fields';\n\nexport interface RetryOptions {\n  /**\n   * Maximum number of retry attempts\n   *\n   * @default 2\n   */\n  limit?: number;\n  /**\n   * HTTP methods to retry\n   *\n   * @default ['get', 'put', 'head', 'delete', 'options', 'trace']\n   */\n  methods?: Array<'get' | 'post' | 'put' | 'delete' | 'patch' | 'head' | 'options' | 'trace'>;\n  /**\n   * HTTP status codes to retry\n   *\n   * @default [408, 413, 429, 500, 502, 503, 504]\n   */\n  statusCodes?: number[];\n}\n\nexport interface Config<T extends ClientOptions = ClientOptions>\n  extends\n    Omit<KyOptions, 'body' | 'headers' | 'method' | 'prefixUrl' | 'retry' | 'throwHttpErrors'>,\n    CoreConfig {\n  /**\n   * Base URL for all requests made by this client.\n   */\n  baseUrl?: T['baseUrl'];\n  /**\n   * Ky instance to use. You can use this option to provide a custom\n   * ky instance.\n   */\n  ky?: typeof ky;\n  /**\n   * Additional ky-specific options that will be passed directly to ky.\n   * This allows you to use any ky option not explicitly exposed in the config.\n   */\n  kyOptions?: Omit<KyOptions, 'method' | 'prefixUrl'>;\n  /**\n   * Return the response data parsed in a specified format. By default, `auto`\n   * will infer the appropriate method from the `Content-Type` response header.\n   * You can override this behavior with any of the {@link Body} methods.\n   * Select `stream` if you don't want to parse response data at all.\n   *\n   * @default 'auto'\n   */\n  parseAs?: 'arrayBuffer' | 'auto' | 'blob' | 'formData' | 'json' | 'stream' | 'text';\n  /**\n   * Should we return only data or multiple fields (data, error, response, etc.)?\n   *\n   * @default 'fields'\n   */\n  responseStyle?: ResponseStyle;\n  /**\n   * Retry configuration\n   */\n  retry?: RetryOptions;\n  /**\n   * Throw an error instead of returning it in the response?\n   *\n   * @default false\n   */\n  throwOnError?: T['throwOnError'];\n  /**\n   * Request timeout in milliseconds\n   *\n   * @default 10000\n   */\n  timeout?: number;\n}\n\nexport interface RequestOptions<\n  TData = unknown,\n  TResponseStyle extends ResponseStyle = 'fields',\n  ThrowOnError extends boolean = boolean,\n  Url extends string = string,\n>\n  extends\n    Config<{\n      responseStyle: TResponseStyle;\n      throwOnError: ThrowOnError;\n    }>,\n    Pick<\n      ServerSentEventsOptions<TData>,\n      | 'onRequest'\n      | 'onSseError'\n      | 'onSseEvent'\n      | 'sseDefaultRetryDelay'\n      | 'sseMaxRetryAttempts'\n      | 'sseMaxRetryDelay'\n    > {\n  /**\n   * Any body that you want to add to your request.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/fetch#body}\n   */\n  body?: unknown;\n  path?: Record<string, unknown>;\n  query?: Record<string, unknown>;\n  /**\n   * Security mechanism(s) to use for the request.\n   */\n  security?: ReadonlyArray<Auth>;\n  url: Url;\n}\n\nexport interface ResolvedRequestOptions<\n  TResponseStyle extends ResponseStyle = 'fields',\n  ThrowOnError extends boolean = boolean,\n  Url extends string = string,\n> extends RequestOptions<unknown, TResponseStyle, ThrowOnError, Url> {\n  serializedBody?: string;\n}\n\nexport type RequestResult<\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = boolean,\n  TResponseStyle extends ResponseStyle = 'fields',\n> = ThrowOnError extends true\n  ? Promise<\n      TResponseStyle extends 'data'\n        ? TData extends Record<string, unknown>\n          ? TData[keyof TData]\n          : TData\n        : {\n            data: TData extends Record<string, unknown> ? TData[keyof TData] : TData;\n            request: Request;\n            response: Response;\n          }\n    >\n  : Promise<\n      TResponseStyle extends 'data'\n        ? (TData extends Record<string, unknown> ? TData[keyof TData] : TData) | undefined\n        : (\n            | {\n                data: TData extends Record<string, unknown> ? TData[keyof TData] : TData;\n                error: undefined;\n              }\n            | {\n                data: undefined;\n                error: TError extends Record<string, unknown> ? TError[keyof TError] : TError;\n              }\n          ) & {\n            request: Request;\n            response: Response;\n          }\n    >;\n\nexport interface ClientOptions {\n  baseUrl?: string;\n  responseStyle?: ResponseStyle;\n  throwOnError?: boolean;\n}\n\ntype MethodFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'>,\n) => RequestResult<TData, TError, ThrowOnError, TResponseStyle>;\n\ntype SseFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'>,\n) => Promise<ServerSentEventsResult<TData, TError>>;\n\ntype RequestFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'> &\n    Pick<Required<RequestOptions<TData, TResponseStyle, ThrowOnError>>, 'method'>,\n) => RequestResult<TData, TError, ThrowOnError, TResponseStyle>;\n\ntype BuildUrlFn = <\n  TData extends {\n    body?: unknown;\n    path?: Record<string, unknown>;\n    query?: Record<string, unknown>;\n    url: string;\n  },\n>(\n  options: TData & Options<TData>,\n) => string;\n\nexport type Client = CoreClient<RequestFn, Config, MethodFn, BuildUrlFn, SseFn> & {\n  interceptors: Middleware<Request, Response, unknown, ResolvedRequestOptions>;\n};\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 = ClientOptions> = (\n  override?: Config<ClientOptions & T>,\n) => Config<Required<ClientOptions> & T>;\n\nexport interface TDataShape {\n  body?: unknown;\n  headers?: unknown;\n  path?: unknown;\n  query?: unknown;\n  url: string;\n}\n\ntype OmitKeys<T, K> = Pick<T, Exclude<keyof T, K>>;\n\nexport type Options<\n  TData extends TDataShape = TDataShape,\n  ThrowOnError extends boolean = boolean,\n  TResponse = unknown,\n  TResponseStyle extends ResponseStyle = 'fields',\n> = OmitKeys<\n  RequestOptions<TResponse, TResponseStyle, ThrowOnError>,\n  'body' | 'path' | 'query' | 'url'\n> &\n  ([TData] extends [never] ? unknown : Omit<TData, 'url'>);\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-ky/tsconfig-nodenext-sdk/client/utils.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport { getAuthToken } from '../core/auth.gen.js';\nimport type { QuerySerializerOptions } from '../core/bodySerializer.gen.js';\nimport { jsonBodySerializer } from '../core/bodySerializer.gen.js';\nimport {\n  serializeArrayParam,\n  serializeObjectParam,\n  serializePrimitiveParam,\n} from '../core/pathSerializer.gen.js';\nimport { getUrl } from '../core/utils.gen.js';\nimport type { Client, ClientOptions, Config, RequestOptions } from './types.gen.js';\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    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        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  throwOnError: false,\n  timeout: 10000,\n  ...override,\n});\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-ky/tsconfig-nodenext-sdk/client.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport { type ClientOptions, type Config, createClient, createConfig } from './client/index.js';\nimport type { ClientOptions as ClientOptions2 } from './types.gen.js';\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: 'http://localhost:3000/base' }));\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-ky/tsconfig-nodenext-sdk/core/auth.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-ky/tsconfig-nodenext-sdk/core/bodySerializer.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { ArrayStyle, ObjectStyle, SerializerOptions } from './pathSerializer.gen.js';\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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-ky/tsconfig-nodenext-sdk/core/params.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-ky/tsconfig-nodenext-sdk/core/pathSerializer.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-ky/tsconfig-nodenext-sdk/core/queryKeySerializer.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\n/**\n * JSON-friendly union that mirrors what Pinia Colada can hash.\n */\nexport type JsonValue =\n  | null\n  | string\n  | number\n  | boolean\n  | JsonValue[]\n  | { [key: string]: JsonValue };\n\n/**\n * Replacer that converts non-JSON values (bigint, Date, etc.) to safe substitutes.\n */\nexport const queryKeyJsonReplacer = (_key: string, value: unknown) => {\n  if (value === undefined || typeof value === 'function' || typeof value === 'symbol') {\n    return undefined;\n  }\n  if (typeof value === 'bigint') {\n    return value.toString();\n  }\n  if (value instanceof Date) {\n    return value.toISOString();\n  }\n  return value;\n};\n\n/**\n * Safely stringifies a value and parses it back into a JsonValue.\n */\nexport const stringifyToJsonValue = (input: unknown): JsonValue | undefined => {\n  try {\n    const json = JSON.stringify(input, queryKeyJsonReplacer);\n    if (json === undefined) {\n      return undefined;\n    }\n    return JSON.parse(json) as JsonValue;\n  } catch {\n    return undefined;\n  }\n};\n\n/**\n * Detects plain objects (including objects with a null prototype).\n */\nconst isPlainObject = (value: unknown): value is Record<string, unknown> => {\n  if (value === null || typeof value !== 'object') {\n    return false;\n  }\n  const prototype = Object.getPrototypeOf(value as object);\n  return prototype === Object.prototype || prototype === null;\n};\n\n/**\n * Turns URLSearchParams into a sorted JSON object for deterministic keys.\n */\nconst serializeSearchParams = (params: URLSearchParams): JsonValue => {\n  const entries = Array.from(params.entries()).sort(([a], [b]) => a.localeCompare(b));\n  const result: Record<string, JsonValue> = {};\n\n  for (const [key, value] of entries) {\n    const existing = result[key];\n    if (existing === undefined) {\n      result[key] = value;\n      continue;\n    }\n\n    if (Array.isArray(existing)) {\n      (existing as string[]).push(value);\n    } else {\n      result[key] = [existing, value];\n    }\n  }\n\n  return result;\n};\n\n/**\n * Normalizes any accepted value into a JSON-friendly shape for query keys.\n */\nexport const serializeQueryKeyValue = (value: unknown): JsonValue | undefined => {\n  if (value === null) {\n    return null;\n  }\n\n  if (typeof value === 'string' || typeof value === 'number' || typeof value === 'boolean') {\n    return value;\n  }\n\n  if (value === undefined || typeof value === 'function' || typeof value === 'symbol') {\n    return undefined;\n  }\n\n  if (typeof value === 'bigint') {\n    return value.toString();\n  }\n\n  if (value instanceof Date) {\n    return value.toISOString();\n  }\n\n  if (Array.isArray(value)) {\n    return stringifyToJsonValue(value);\n  }\n\n  if (typeof URLSearchParams !== 'undefined' && value instanceof URLSearchParams) {\n    return serializeSearchParams(value);\n  }\n\n  if (isPlainObject(value)) {\n    return stringifyToJsonValue(value);\n  }\n\n  return undefined;\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-ky/tsconfig-nodenext-sdk/core/serverSentEvents.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { Config } from './types.gen.js';\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 const 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            // Normalize line endings: CRLF -> LF, then CR -> LF\n            buffer = buffer.replace(/\\r\\n/g, '\\n').replace(/\\r/g, '\\n');\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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-ky/tsconfig-nodenext-sdk/core/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { Auth, AuthToken } from './auth.gen.js';\nimport type { BodySerializer, QuerySerializer, QuerySerializerOptions } from './bodySerializer.gen.js';\n\nexport type HttpMethod =\n  | 'connect'\n  | 'delete'\n  | 'get'\n  | 'head'\n  | 'options'\n  | 'patch'\n  | 'post'\n  | 'put'\n  | 'trace';\n\nexport type Client<\n  RequestFn = never,\n  Config = unknown,\n  MethodFn = never,\n  BuildUrlFn = never,\n  SseFn = never,\n> = {\n  /**\n   * Returns the final request URL.\n   */\n  buildUrl: BuildUrlFn;\n  getConfig: () => Config;\n  request: RequestFn;\n  setConfig: (config: Config) => Config;\n} & {\n  [K in HttpMethod]: MethodFn;\n} & ([SseFn] extends [never] ? { sse?: never } : { sse: { [K in HttpMethod]: SseFn } });\n\nexport interface Config {\n  /**\n   * Auth token or a function returning auth token. The resolved value will be\n   * added to the request payload as defined by its `security` array.\n   */\n  auth?: ((auth: Auth) => Promise<AuthToken> | AuthToken) | AuthToken;\n  /**\n   * A function for serializing request body parameter. By default,\n   * {@link JSON.stringify()} will be used.\n   */\n  bodySerializer?: BodySerializer | null;\n  /**\n   * An object containing any HTTP headers that you want to pre-populate your\n   * `Headers` object with.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/Headers/Headers#init See more}\n   */\n  headers?:\n    | RequestInit['headers']\n    | Record<\n        string,\n        string | number | boolean | (string | number | boolean)[] | null | undefined | unknown\n      >;\n  /**\n   * The request method.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/fetch#method See more}\n   */\n  method?: Uppercase<HttpMethod>;\n  /**\n   * A function for serializing request query parameters. By default, arrays\n   * will be exploded in form style, objects will be exploded in deepObject\n   * style, and reserved characters are percent-encoded.\n   *\n   * This method will have no effect if the native `paramsSerializer()` Axios\n   * API function is used.\n   *\n   * {@link https://swagger.io/docs/specification/serialization/#query View examples}\n   */\n  querySerializer?: QuerySerializer | QuerySerializerOptions;\n  /**\n   * A function validating request data. This is useful if you want to ensure\n   * the request conforms to the desired shape, so it can be safely sent to\n   * the server.\n   */\n  requestValidator?: (data: unknown) => Promise<unknown>;\n  /**\n   * A function transforming response data before it's returned. This is useful\n   * for post-processing data, e.g. converting ISO strings into Date objects.\n   */\n  responseTransformer?: (data: unknown) => Promise<unknown>;\n  /**\n   * A function validating response data. This is useful if you want to ensure\n   * the response conforms to the desired shape, so it can be safely passed to\n   * the transformers and returned to the user.\n   */\n  responseValidator?: (data: unknown) => Promise<unknown>;\n}\n\ntype IsExactlyNeverOrNeverUndefined<T> = [T] extends [never]\n  ? true\n  : [T] extends [never | undefined]\n    ? [undefined] extends [T]\n      ? false\n      : true\n    : false;\n\nexport type OmitNever<T extends Record<string, unknown>> = {\n  [K in keyof T as IsExactlyNeverOrNeverUndefined<T[K]> extends true ? never : K]: T[K];\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-ky/tsconfig-nodenext-sdk/core/utils.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { BodySerializer, QuerySerializer } from './bodySerializer.gen.js';\nimport {\n  type ArraySeparatorStyle,\n  serializeArrayParam,\n  serializeObjectParam,\n  serializePrimitiveParam,\n} from './pathSerializer.gen.js';\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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-ky/tsconfig-nodenext-sdk/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport { apiVVersionODataControllerCount, callToTestOrderOfParams, callWithDefaultOptionalParameters, callWithDefaultParameters, callWithDescriptions, callWithDuplicateResponses, callWithNoContentResponse, callWithParameters, callWithResponse, callWithResponseAndNoContentResponse, callWithResponses, callWithResultFromHeader, callWithWeirdParameterNames, collectionFormat, complexParams, complexTypes, deleteCallWithoutParametersAndResponse, deleteFoo, deprecatedCall, dummyA, dummyB, duplicateName, duplicateName2, duplicateName3, duplicateName4, export_, fileResponse, fooWow, getApiVbyApiVersionSimpleOperation, getCallWithOptionalParam, getCallWithoutParametersAndResponse, headCallWithoutParametersAndResponse, import_, multipartRequest, multipartResponse, nonAsciiæøåÆøÅöôêÊ字符串, type Options, optionsCallWithoutParametersAndResponse, patchApiVbyApiVersionNoTag, patchCallWithoutParametersAndResponse, postApiVbyApiVersionFormData, postApiVbyApiVersionRequestBody, postCallWithOptionalParam, postCallWithoutParametersAndResponse, putCallWithoutParametersAndResponse, putWithFormUrlEncoded, testErrorCode, types, uploadFile } from './sdk.gen.js';\nexport type { _3eNum1Период, _400, AdditionalPropertiesIntegerIssue, AdditionalPropertiesUnknownIssue, AdditionalPropertiesUnknownIssue2, AdditionalPropertiesUnknownIssue3, AdditionalPropertiesUnknownIssueWritable, AnyOfAnyAndNull, AnyOfArrays, ApiVVersionODataControllerCountData, ApiVVersionODataControllerCountResponse, ApiVVersionODataControllerCountResponses, ArrayWithAnyOfProperties, ArrayWithArray, ArrayWithBooleans, ArrayWithNumbers, ArrayWithProperties, ArrayWithReferences, ArrayWithStrings, CallToTestOrderOfParamsData, CallWithDefaultOptionalParametersData, CallWithDefaultParametersData, CallWithDescriptionsData, CallWithDuplicateResponsesData, CallWithDuplicateResponsesError, CallWithDuplicateResponsesErrors, CallWithDuplicateResponsesResponse, CallWithDuplicateResponsesResponses, CallWithNoContentResponseData, CallWithNoContentResponseResponse, CallWithNoContentResponseResponses, CallWithParametersData, CallWithResponseAndNoContentResponseData, CallWithResponseAndNoContentResponseResponse, CallWithResponseAndNoContentResponseResponses, CallWithResponseData, CallWithResponseResponse, CallWithResponseResponses, CallWithResponsesData, CallWithResponsesError, CallWithResponsesErrors, CallWithResponsesResponse, CallWithResponsesResponses, CallWithResultFromHeaderData, CallWithResultFromHeaderErrors, CallWithResultFromHeaderResponses, CallWithWeirdParameterNamesData, CamelCaseCommentWithBreaks, CharactersInDescription, ClientOptions, CollectionFormatData, CommentWithBackticks, CommentWithBackticksAndQuotes, CommentWithBreaks, CommentWithExpressionPlaceholders, CommentWithQuotes, CommentWithReservedCharacters, CommentWithSlashes, ComplexParamsData, ComplexParamsResponse, ComplexParamsResponses, ComplexTypesData, ComplexTypesErrors, ComplexTypesResponse, ComplexTypesResponses, CompositionBaseModel, CompositionExtendedModel, CompositionWithAllOfAndNullable, CompositionWithAnyOf, CompositionWithAnyOfAndNullable, CompositionWithAnyOfAnonymous, CompositionWithNestedAnyAndTypeNull, CompositionWithNestedAnyOfAndNull, CompositionWithOneOf, CompositionWithOneOfAndComplexArrayDictionary, CompositionWithOneOfAndNullable, CompositionWithOneOfAndProperties, CompositionWithOneOfAndSimpleArrayDictionary, CompositionWithOneOfAndSimpleDictionary, CompositionWithOneOfAnonymous, CompositionWithOneOfDiscriminator, ConstValue, Default, DeleteCallWithoutParametersAndResponseData, DeleteFooData, DeleteFooData2, DeleteFooData3, DeprecatedCallData, DeprecatedModel, DictionaryWithArray, DictionaryWithDictionary, DictionaryWithProperties, DictionaryWithPropertiesAndAdditionalProperties, DictionaryWithReference, DictionaryWithString, DummyAData, DummyAResponse, DummyAResponses, DummyBData, DummyBResponse, DummyBResponses, DuplicateName2Data, DuplicateName3Data, DuplicateName4Data, DuplicateNameData, EnumFromDescription, EnumWithExtensions, EnumWithNumbers, EnumWithReplacedCharacters, EnumWithStrings, EnumWithXEnumNames, ExportData, ExternalRefA, ExternalRefB, ExternalSharedModel, File, FileResponseData, FileResponseResponse, FileResponseResponses, FileWritable, FooWowData, FooWowResponses, FreeFormObjectWithAdditionalPropertiesEqEmptyObject, FreeFormObjectWithAdditionalPropertiesEqTrue, FreeFormObjectWithoutAdditionalProperties, GenericSchemaDuplicateIssue1SystemBoolean, GenericSchemaDuplicateIssue1SystemBooleanWritable, GenericSchemaDuplicateIssue1SystemString, GenericSchemaDuplicateIssue1SystemStringWritable, GetApiVbyApiVersionSimpleOperationData, GetApiVbyApiVersionSimpleOperationError, GetApiVbyApiVersionSimpleOperationErrors, GetApiVbyApiVersionSimpleOperationResponse, GetApiVbyApiVersionSimpleOperationResponses, GetCallWithOptionalParamData, GetCallWithoutParametersAndResponseData, HeadCallWithoutParametersAndResponseData, Import, ImportData, ImportResponse, ImportResponses, IoK8sApimachineryPkgApisMetaV1DeleteOptions, IoK8sApimachineryPkgApisMetaV1Preconditions, ModelCircle, ModelFromZendesk, ModelSquare, ModelThatExtends, ModelThatExtendsExtends, ModelWithAdditionalPropertiesEqTrue, ModelWithAdditionalPropertiesRef, ModelWithAnyOfConstantSizeArray, ModelWithAnyOfConstantSizeArrayAndIntersect, ModelWithAnyOfConstantSizeArrayNullable, ModelWithAnyOfConstantSizeArrayWithNSizeAndOptions, ModelWithAnyOfConstantSizeArrayWithNSizeAndOptionsWritable, ModelWithArray, ModelWithArrayReadOnlyAndWriteOnly, ModelWithArrayReadOnlyAndWriteOnlyWritable, ModelWithBackticksInDescription, ModelWithBoolean, ModelWithCircularReference, ModelWithConst, ModelWithConstantSizeArray, ModelWithDictionary, ModelWithDuplicateImports, ModelWithDuplicateProperties, ModelWithEnum, ModelWithEnumFromDescription, ModelWithEnumWithHyphen, ModelWithInteger, ModelWithNestedArrayEnums, ModelWithNestedArrayEnumsData, ModelWithNestedArrayEnumsDataBar, ModelWithNestedArrayEnumsDataFoo, ModelWithNestedCompositionEnums, ModelWithNestedEnums, ModelWithNestedProperties, ModelWithNullableObject, ModelWithNullableString, ModelWithNumericEnumUnion, ModelWithOneOfAndProperties, ModelWithOneOfEnum, ModelWithOrderedProperties, ModelWithPattern, ModelWithPatternWritable, ModelWithPrefixItemsConstantSizeArray, ModelWithProperties, ModelWithPropertiesWritable, ModelWithReadOnlyAndWriteOnly, ModelWithReadOnlyAndWriteOnlyWritable, ModelWithReference, ModelWithReferenceWritable, ModelWithString, ModelWithStringError, MultipartRequestData, MultipartResponseData, MultipartResponseResponse, MultipartResponseResponses, NestedAnyOfArraysNullable, NonAsciiæøåÆøÅöôêÊ字符串Data, NonAsciiæøåÆøÅöôêÊ字符串Response, NonAsciiæøåÆøÅöôêÊ字符串Responses, NonAsciiStringæøåÆøÅöôêÊ字符串, NullableObject, OneOfAllOfIssue, OneOfAllOfIssueWritable, OptionsCallWithoutParametersAndResponseData, Pageable, ParameterSimpleParameterUnused, PatchApiVbyApiVersionNoTagData, PatchApiVbyApiVersionNoTagResponses, PatchCallWithoutParametersAndResponseData, PostApiVbyApiVersionFormDataData, PostApiVbyApiVersionRequestBodyData, PostCallWithOptionalParamData, PostCallWithOptionalParamResponse, PostCallWithOptionalParamResponses, PostCallWithoutParametersAndResponseData, PostServiceWithEmptyTagResponse, PostServiceWithEmptyTagResponse2, PutCallWithoutParametersAndResponseData, PutWithFormUrlEncodedData, SchemaWithFormRestrictedKeys, SimpleBoolean, SimpleFile, SimpleFormData, SimpleInteger, SimpleParameter, SimpleReference, SimpleRequestBody, SimpleString, SimpleStringWithPattern, TestErrorCodeData, TestErrorCodeErrors, TestErrorCodeResponses, TypesData, TypesResponse, TypesResponses, UploadFileData, UploadFileResponse, UploadFileResponses, XFooBar } from './types.gen.js';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-ky/tsconfig-nodenext-sdk/sdk.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport { client } from './client.gen.js';\nimport { type Client, formDataBodySerializer, type Options as Options2, type TDataShape, urlSearchParamsBodySerializer } from './client/index.js';\nimport type { ApiVVersionODataControllerCountData, ApiVVersionODataControllerCountResponses, CallToTestOrderOfParamsData, CallWithDefaultOptionalParametersData, CallWithDefaultParametersData, CallWithDescriptionsData, CallWithDuplicateResponsesData, CallWithDuplicateResponsesErrors, CallWithDuplicateResponsesResponses, CallWithNoContentResponseData, CallWithNoContentResponseResponses, CallWithParametersData, CallWithResponseAndNoContentResponseData, CallWithResponseAndNoContentResponseResponses, CallWithResponseData, CallWithResponseResponses, CallWithResponsesData, CallWithResponsesErrors, CallWithResponsesResponses, CallWithResultFromHeaderData, CallWithResultFromHeaderErrors, CallWithResultFromHeaderResponses, CallWithWeirdParameterNamesData, CollectionFormatData, ComplexParamsData, ComplexParamsResponses, ComplexTypesData, ComplexTypesErrors, ComplexTypesResponses, DeleteCallWithoutParametersAndResponseData, DeleteFooData3, DeprecatedCallData, DummyAData, DummyAResponses, DummyBData, DummyBResponses, DuplicateName2Data, DuplicateName3Data, DuplicateName4Data, DuplicateNameData, ExportData, FileResponseData, FileResponseResponses, FooWowData, FooWowResponses, GetApiVbyApiVersionSimpleOperationData, GetApiVbyApiVersionSimpleOperationErrors, GetApiVbyApiVersionSimpleOperationResponses, GetCallWithOptionalParamData, GetCallWithoutParametersAndResponseData, HeadCallWithoutParametersAndResponseData, ImportData, ImportResponses, MultipartRequestData, MultipartResponseData, MultipartResponseResponses, NonAsciiæøåÆøÅöôêÊ字符串Data, NonAsciiæøåÆøÅöôêÊ字符串Responses, OptionsCallWithoutParametersAndResponseData, PatchApiVbyApiVersionNoTagData, PatchApiVbyApiVersionNoTagResponses, PatchCallWithoutParametersAndResponseData, PostApiVbyApiVersionFormDataData, PostApiVbyApiVersionRequestBodyData, PostCallWithOptionalParamData, PostCallWithOptionalParamResponses, PostCallWithoutParametersAndResponseData, PutCallWithoutParametersAndResponseData, PutWithFormUrlEncodedData, TestErrorCodeData, TestErrorCodeErrors, TestErrorCodeResponses, TypesData, TypesResponses, UploadFileData, UploadFileResponses } from './types.gen.js';\n\nexport type Options<TData extends TDataShape = TDataShape, ThrowOnError extends boolean = boolean> = Options2<TData, ThrowOnError> & {\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\nexport const export_ = <ThrowOnError extends boolean = false>(options?: Options<ExportData, ThrowOnError>) => (options?.client ?? client).get<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/no+tag', ...options });\n\nexport const patchApiVbyApiVersionNoTag = <ThrowOnError extends boolean = false>(options?: Options<PatchApiVbyApiVersionNoTagData, ThrowOnError>) => (options?.client ?? client).patch<PatchApiVbyApiVersionNoTagResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/no+tag', ...options });\n\nexport const import_ = <ThrowOnError extends boolean = false>(options: Options<ImportData, ThrowOnError>) => (options.client ?? client).post<ImportResponses, unknown, ThrowOnError>({\n    url: '/api/v{api-version}/no+tag',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options.headers\n    }\n});\n\nexport const fooWow = <ThrowOnError extends boolean = false>(options?: Options<FooWowData, ThrowOnError>) => (options?.client ?? client).put<FooWowResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/no+tag', ...options });\n\nexport const apiVVersionODataControllerCount = <ThrowOnError extends boolean = false>(options?: Options<ApiVVersionODataControllerCountData, ThrowOnError>) => (options?.client ?? client).get<ApiVVersionODataControllerCountResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple/$count', ...options });\n\nexport const getApiVbyApiVersionSimpleOperation = <ThrowOnError extends boolean = false>(options: Options<GetApiVbyApiVersionSimpleOperationData, ThrowOnError>) => (options.client ?? client).get<GetApiVbyApiVersionSimpleOperationResponses, GetApiVbyApiVersionSimpleOperationErrors, ThrowOnError>({ url: '/api/v{api-version}/simple:operation', ...options });\n\nexport const deleteCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<DeleteCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).delete<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const getCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<GetCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).get<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const headCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<HeadCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).head<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const optionsCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<OptionsCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).options<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const patchCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<PatchCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).patch<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const postCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<PostCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).post<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const putCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<PutCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).put<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const deleteFoo = <ThrowOnError extends boolean = false>(options: Options<DeleteFooData3, ThrowOnError>) => (options.client ?? client).delete<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/foo/{foo_param}/bar/{BarParam}', ...options });\n\nexport const callWithDescriptions = <ThrowOnError extends boolean = false>(options?: Options<CallWithDescriptionsData, ThrowOnError>) => (options?.client ?? client).post<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/descriptions', ...options });\n\n/**\n * @deprecated\n */\nexport const deprecatedCall = <ThrowOnError extends boolean = false>(options: Options<DeprecatedCallData, ThrowOnError>) => (options.client ?? client).post<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/parameters/deprecated', ...options });\n\nexport const callWithParameters = <ThrowOnError extends boolean = false>(options: Options<CallWithParametersData, ThrowOnError>) => (options.client ?? client).post<unknown, unknown, ThrowOnError>({\n    url: '/api/v{api-version}/parameters/{parameterPath}',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options.headers\n    }\n});\n\nexport const callWithWeirdParameterNames = <ThrowOnError extends boolean = false>(options: Options<CallWithWeirdParameterNamesData, ThrowOnError>) => (options.client ?? client).post<unknown, unknown, ThrowOnError>({\n    url: '/api/v{api-version}/parameters/{parameter.path.1}/{parameter-path-2}/{PARAMETER-PATH-3}',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options.headers\n    }\n});\n\nexport const getCallWithOptionalParam = <ThrowOnError extends boolean = false>(options: Options<GetCallWithOptionalParamData, ThrowOnError>) => (options.client ?? client).get<unknown, unknown, ThrowOnError>({\n    url: '/api/v{api-version}/parameters',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options.headers\n    }\n});\n\nexport const postCallWithOptionalParam = <ThrowOnError extends boolean = false>(options: Options<PostCallWithOptionalParamData, ThrowOnError>) => (options.client ?? client).post<PostCallWithOptionalParamResponses, unknown, ThrowOnError>({\n    url: '/api/v{api-version}/parameters',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options.headers\n    }\n});\n\nexport const postApiVbyApiVersionRequestBody = <ThrowOnError extends boolean = false>(options?: Options<PostApiVbyApiVersionRequestBodyData, ThrowOnError>) => (options?.client ?? client).post<unknown, unknown, ThrowOnError>({\n    url: '/api/v{api-version}/requestBody',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options?.headers\n    }\n});\n\nexport const postApiVbyApiVersionFormData = <ThrowOnError extends boolean = false>(options?: Options<PostApiVbyApiVersionFormDataData, ThrowOnError>) => (options?.client ?? client).post<unknown, unknown, ThrowOnError>({\n    ...formDataBodySerializer,\n    url: '/api/v{api-version}/formData',\n    ...options,\n    headers: {\n        'Content-Type': null,\n        ...options?.headers\n    }\n});\n\nexport const callWithDefaultParameters = <ThrowOnError extends boolean = false>(options?: Options<CallWithDefaultParametersData, ThrowOnError>) => (options?.client ?? client).get<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/defaults', ...options });\n\nexport const callWithDefaultOptionalParameters = <ThrowOnError extends boolean = false>(options?: Options<CallWithDefaultOptionalParametersData, ThrowOnError>) => (options?.client ?? client).post<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/defaults', ...options });\n\nexport const callToTestOrderOfParams = <ThrowOnError extends boolean = false>(options: Options<CallToTestOrderOfParamsData, ThrowOnError>) => (options.client ?? client).put<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/defaults', ...options });\n\nexport const duplicateName = <ThrowOnError extends boolean = false>(options?: Options<DuplicateNameData, ThrowOnError>) => (options?.client ?? client).delete<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/duplicate', ...options });\n\nexport const duplicateName2 = <ThrowOnError extends boolean = false>(options?: Options<DuplicateName2Data, ThrowOnError>) => (options?.client ?? client).get<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/duplicate', ...options });\n\nexport const duplicateName3 = <ThrowOnError extends boolean = false>(options?: Options<DuplicateName3Data, ThrowOnError>) => (options?.client ?? client).post<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/duplicate', ...options });\n\nexport const duplicateName4 = <ThrowOnError extends boolean = false>(options?: Options<DuplicateName4Data, ThrowOnError>) => (options?.client ?? client).put<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/duplicate', ...options });\n\nexport const callWithNoContentResponse = <ThrowOnError extends boolean = false>(options?: Options<CallWithNoContentResponseData, ThrowOnError>) => (options?.client ?? client).get<CallWithNoContentResponseResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/no-content', ...options });\n\nexport const callWithResponseAndNoContentResponse = <ThrowOnError extends boolean = false>(options?: Options<CallWithResponseAndNoContentResponseData, ThrowOnError>) => (options?.client ?? client).get<CallWithResponseAndNoContentResponseResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/multiple-tags/response-and-no-content', ...options });\n\nexport const dummyA = <ThrowOnError extends boolean = false>(options?: Options<DummyAData, ThrowOnError>) => (options?.client ?? client).get<DummyAResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/multiple-tags/a', ...options });\n\nexport const dummyB = <ThrowOnError extends boolean = false>(options?: Options<DummyBData, ThrowOnError>) => (options?.client ?? client).get<DummyBResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/multiple-tags/b', ...options });\n\nexport const callWithResponse = <ThrowOnError extends boolean = false>(options?: Options<CallWithResponseData, ThrowOnError>) => (options?.client ?? client).get<CallWithResponseResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/response', ...options });\n\nexport const callWithDuplicateResponses = <ThrowOnError extends boolean = false>(options?: Options<CallWithDuplicateResponsesData, ThrowOnError>) => (options?.client ?? client).post<CallWithDuplicateResponsesResponses, CallWithDuplicateResponsesErrors, ThrowOnError>({ url: '/api/v{api-version}/response', ...options });\n\nexport const callWithResponses = <ThrowOnError extends boolean = false>(options?: Options<CallWithResponsesData, ThrowOnError>) => (options?.client ?? client).put<CallWithResponsesResponses, CallWithResponsesErrors, ThrowOnError>({ url: '/api/v{api-version}/response', ...options });\n\nexport const collectionFormat = <ThrowOnError extends boolean = false>(options: Options<CollectionFormatData, ThrowOnError>) => (options.client ?? client).get<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/collectionFormat', ...options });\n\nexport const types = <ThrowOnError extends boolean = false>(options: Options<TypesData, ThrowOnError>) => (options.client ?? client).get<TypesResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/types', ...options });\n\nexport const uploadFile = <ThrowOnError extends boolean = false>(options: Options<UploadFileData, ThrowOnError>) => (options.client ?? client).post<UploadFileResponses, unknown, ThrowOnError>({\n    ...urlSearchParamsBodySerializer,\n    url: '/api/v{api-version}/upload',\n    ...options,\n    headers: {\n        'Content-Type': 'application/x-www-form-urlencoded',\n        ...options.headers\n    }\n});\n\nexport const fileResponse = <ThrowOnError extends boolean = false>(options: Options<FileResponseData, ThrowOnError>) => (options.client ?? client).get<FileResponseResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/file/{id}', ...options });\n\nexport const complexTypes = <ThrowOnError extends boolean = false>(options: Options<ComplexTypesData, ThrowOnError>) => (options.client ?? client).get<ComplexTypesResponses, ComplexTypesErrors, ThrowOnError>({\n    querySerializer: { parameters: { parameterObject: { object: { style: 'form' } } } },\n    url: '/api/v{api-version}/complex',\n    ...options\n});\n\nexport const multipartResponse = <ThrowOnError extends boolean = false>(options?: Options<MultipartResponseData, ThrowOnError>) => (options?.client ?? client).get<MultipartResponseResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/multipart', ...options });\n\nexport const multipartRequest = <ThrowOnError extends boolean = false>(options?: Options<MultipartRequestData, ThrowOnError>) => (options?.client ?? client).post<unknown, unknown, ThrowOnError>({\n    ...formDataBodySerializer,\n    url: '/api/v{api-version}/multipart',\n    ...options,\n    headers: {\n        'Content-Type': null,\n        ...options?.headers\n    }\n});\n\nexport const complexParams = <ThrowOnError extends boolean = false>(options: Options<ComplexParamsData, ThrowOnError>) => (options.client ?? client).put<ComplexParamsResponses, unknown, ThrowOnError>({\n    url: '/api/v{api-version}/complex/{id}',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json-patch+json',\n        ...options.headers\n    }\n});\n\nexport const callWithResultFromHeader = <ThrowOnError extends boolean = false>(options?: Options<CallWithResultFromHeaderData, ThrowOnError>) => (options?.client ?? client).post<CallWithResultFromHeaderResponses, CallWithResultFromHeaderErrors, ThrowOnError>({ url: '/api/v{api-version}/header', ...options });\n\nexport const testErrorCode = <ThrowOnError extends boolean = false>(options: Options<TestErrorCodeData, ThrowOnError>) => (options.client ?? client).post<TestErrorCodeResponses, TestErrorCodeErrors, ThrowOnError>({ url: '/api/v{api-version}/error', ...options });\n\nexport const nonAsciiæøåÆøÅöôêÊ字符串 = <ThrowOnError extends boolean = false>(options: Options<NonAsciiæøåÆøÅöôêÊ字符串Data, ThrowOnError>) => (options.client ?? client).post<NonAsciiæøåÆøÅöôêÊ字符串Responses, unknown, ThrowOnError>({ url: '/api/v{api-version}/non-ascii-æøåÆØÅöôêÊ字符串', ...options });\n\n/**\n * Login User\n */\nexport const putWithFormUrlEncoded = <ThrowOnError extends boolean = false>(options: Options<PutWithFormUrlEncodedData, ThrowOnError>) => (options.client ?? client).put<unknown, unknown, ThrowOnError>({\n    ...urlSearchParamsBodySerializer,\n    url: '/api/v{api-version}/non-ascii-æøåÆØÅöôêÊ字符串',\n    ...options,\n    headers: {\n        'Content-Type': 'application/x-www-form-urlencoded',\n        ...options.headers\n    }\n});\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-ky/tsconfig-nodenext-sdk/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type ClientOptions = {\n    baseUrl: 'http://localhost:3000/base' | (string & {});\n};\n\n/**\n * Model with number-only name\n */\nexport type _400 = string;\n\n/**\n * External ref to shared model (A)\n */\nexport type ExternalRefA = ExternalSharedModel;\n\n/**\n * External ref to shared model (B)\n */\nexport type ExternalRefB = ExternalSharedModel;\n\n/**\n * Testing multiline comments in string: First line\n * Second line\n *\n * Fourth line\n */\nexport type CamelCaseCommentWithBreaks = number;\n\n/**\n * Testing multiline comments in string: First line\n * Second line\n *\n * Fourth line\n */\nexport type CommentWithBreaks = number;\n\n/**\n * Testing backticks in string: `backticks` and ```multiple backticks``` should work\n */\nexport type CommentWithBackticks = number;\n\n/**\n * Testing backticks and quotes in string: `backticks`, 'quotes', \"double quotes\" and ```multiple backticks``` should work\n */\nexport type CommentWithBackticksAndQuotes = number;\n\n/**\n * Testing slashes in string: \\backwards\\\\\\ and /forwards/// should work\n */\nexport type CommentWithSlashes = number;\n\n/**\n * Testing expression placeholders in string: ${expression} should work\n */\nexport type CommentWithExpressionPlaceholders = number;\n\n/**\n * Testing quotes in string: 'single quote''' and \"double quotes\"\"\" should work\n */\nexport type CommentWithQuotes = number;\n\n/**\n * Testing reserved characters in string: * inline * and ** inline ** should work\n */\nexport type CommentWithReservedCharacters = number;\n\n/**\n * This is a simple number\n */\nexport type SimpleInteger = number;\n\n/**\n * This is a simple boolean\n */\nexport type SimpleBoolean = boolean;\n\n/**\n * This is a simple string\n */\nexport type SimpleString = string;\n\n/**\n * A string with non-ascii (unicode) characters valid in typescript identifiers (æøåÆØÅöÔèÈ字符串)\n */\nexport type NonAsciiStringæøåÆøÅöôêÊ字符串 = string;\n\n/**\n * This is a simple file\n */\nexport type SimpleFile = Blob | File;\n\n/**\n * This is a simple reference\n */\nexport type SimpleReference = ModelWithString;\n\n/**\n * This is a simple string\n */\nexport type SimpleStringWithPattern = string | null;\n\n/**\n * This is a simple enum with strings\n */\nexport type EnumWithStrings = 'Success' | 'Warning' | 'Error' | '\\'Single Quote\\'' | '\"Double Quotes\"' | 'Non-ascii: øæåôöØÆÅÔÖ字符串';\n\nexport type EnumWithReplacedCharacters = '\\'Single Quote\\'' | '\"Double Quotes\"' | 'øæåôöØÆÅÔÖ字符串' | 3.1 | '';\n\n/**\n * This is a simple enum with numbers\n */\nexport type EnumWithNumbers = 1 | 2 | 3 | 1.1 | 1.2 | 1.3 | 100 | 200 | 300 | -100 | -200 | -300 | -1.1 | -1.2 | -1.3;\n\n/**\n * Success=1,Warning=2,Error=3\n */\nexport type EnumFromDescription = number;\n\n/**\n * This is a simple enum with numbers\n */\nexport type EnumWithExtensions = 200 | 400 | 500;\n\nexport type EnumWithXEnumNames = 0 | 1 | 2;\n\n/**\n * This is a simple array with numbers\n */\nexport type ArrayWithNumbers = Array<number>;\n\n/**\n * This is a simple array with booleans\n */\nexport type ArrayWithBooleans = Array<boolean>;\n\n/**\n * This is a simple array with strings\n */\nexport type ArrayWithStrings = Array<string>;\n\n/**\n * This is a simple array with references\n */\nexport type ArrayWithReferences = Array<ModelWithString>;\n\n/**\n * This is a simple array containing an array\n */\nexport type ArrayWithArray = Array<Array<ModelWithString>>;\n\n/**\n * This is a simple array with properties\n */\nexport type ArrayWithProperties = Array<{\n    '16x16'?: CamelCaseCommentWithBreaks;\n    bar?: string;\n}>;\n\n/**\n * This is a simple array with any of properties\n */\nexport type ArrayWithAnyOfProperties = Array<{\n    foo?: string;\n} | {\n    bar?: string;\n}>;\n\nexport type AnyOfAnyAndNull = {\n    data?: unknown | null;\n};\n\n/**\n * This is a simple array with any of properties\n */\nexport type AnyOfArrays = {\n    results?: Array<{\n        foo?: string;\n    } | {\n        bar?: string;\n    }>;\n};\n\n/**\n * This is a string dictionary\n */\nexport type DictionaryWithString = {\n    [key: string]: string;\n};\n\nexport type DictionaryWithPropertiesAndAdditionalProperties = {\n    foo?: number;\n    bar?: boolean;\n    [key: string]: string | number | boolean | undefined;\n};\n\n/**\n * This is a string reference\n */\nexport type DictionaryWithReference = {\n    [key: string]: ModelWithString;\n};\n\n/**\n * This is a complex dictionary\n */\nexport type DictionaryWithArray = {\n    [key: string]: Array<ModelWithString>;\n};\n\n/**\n * This is a string dictionary\n */\nexport type DictionaryWithDictionary = {\n    [key: string]: {\n        [key: string]: string;\n    };\n};\n\n/**\n * This is a complex dictionary\n */\nexport type DictionaryWithProperties = {\n    [key: string]: {\n        foo?: string;\n        bar?: string;\n    };\n};\n\n/**\n * This is a model with one number property\n */\nexport type ModelWithInteger = {\n    /**\n     * This is a simple number property\n     */\n    prop?: number;\n};\n\n/**\n * This is a model with one boolean property\n */\nexport type ModelWithBoolean = {\n    /**\n     * This is a simple boolean property\n     */\n    prop?: boolean;\n};\n\n/**\n * This is a model with one string property\n */\nexport type ModelWithString = {\n    /**\n     * This is a simple string property\n     */\n    prop?: string;\n};\n\n/**\n * This is a model with one string property\n */\nexport type ModelWithStringError = {\n    /**\n     * This is a simple string property\n     */\n    prop?: string;\n};\n\n/**\n * `Comment` or `VoiceComment`. The JSON object for adding voice comments to tickets is different. See [Adding voice comments to tickets](/documentation/ticketing/managing-tickets/adding-voice-comments-to-tickets)\n */\nexport type ModelFromZendesk = string;\n\n/**\n * This is a model with one string property\n */\nexport type ModelWithNullableString = {\n    /**\n     * This is a simple string property\n     */\n    nullableProp1?: string | null;\n    /**\n     * This is a simple string property\n     */\n    nullableRequiredProp1: string | null;\n    /**\n     * This is a simple string property\n     */\n    nullableProp2?: string | null;\n    /**\n     * This is a simple string property\n     */\n    nullableRequiredProp2: string | null;\n    /**\n     * This is a simple enum with strings\n     */\n    'foo_bar-enum'?: 'Success' | 'Warning' | 'Error' | 'ØÆÅ字符串';\n};\n\n/**\n * This is a model with one enum\n */\nexport type ModelWithEnum = {\n    /**\n     * This is a simple enum with strings\n     */\n    'foo_bar-enum'?: 'Success' | 'Warning' | 'Error' | 'ØÆÅ字符串';\n    /**\n     * These are the HTTP error code enums\n     */\n    statusCode?: '100' | '200 FOO' | '300 FOO_BAR' | '400 foo-bar' | '500 foo.bar' | '600 foo&bar';\n    /**\n     * Simple boolean enum\n     */\n    bool?: true;\n};\n\n/**\n * This is a model with one enum with escaped name\n */\nexport type ModelWithEnumWithHyphen = {\n    /**\n     * Foo-Bar-Baz-Qux\n     */\n    'foo-bar-baz-qux'?: '3.0';\n};\n\n/**\n * This is a model with one enum\n */\nexport type ModelWithEnumFromDescription = {\n    /**\n     * Success=1,Warning=2,Error=3\n     */\n    test?: number;\n};\n\n/**\n * This is a model with nested enums\n */\nexport type ModelWithNestedEnums = {\n    dictionaryWithEnum?: {\n        [key: string]: 'Success' | 'Warning' | 'Error';\n    };\n    dictionaryWithEnumFromDescription?: {\n        [key: string]: number;\n    };\n    arrayWithEnum?: Array<'Success' | 'Warning' | 'Error'>;\n    arrayWithDescription?: Array<number>;\n    /**\n     * This is a simple enum with strings\n     */\n    'foo_bar-enum'?: 'Success' | 'Warning' | 'Error' | 'ØÆÅ字符串';\n};\n\n/**\n * This is a model with one property containing a reference\n */\nexport type ModelWithReference = {\n    prop?: ModelWithProperties;\n};\n\n/**\n * This is a model with one property containing an array\n */\nexport type ModelWithArrayReadOnlyAndWriteOnly = {\n    prop?: Array<ModelWithReadOnlyAndWriteOnly>;\n    propWithFile?: Array<Blob | File>;\n    propWithNumber?: Array<number>;\n};\n\n/**\n * This is a model with one property containing an array\n */\nexport type ModelWithArray = {\n    prop?: Array<ModelWithString>;\n    propWithFile?: Array<Blob | File>;\n    propWithNumber?: Array<number>;\n};\n\n/**\n * This is a model with one property containing a dictionary\n */\nexport type ModelWithDictionary = {\n    prop?: {\n        [key: string]: string;\n    };\n};\n\n/**\n * This is a deprecated model with a deprecated property\n *\n * @deprecated\n */\nexport type DeprecatedModel = {\n    /**\n     * This is a deprecated property\n     *\n     * @deprecated\n     */\n    prop?: string;\n};\n\n/**\n * This is a model with one property containing a circular reference\n */\nexport type ModelWithCircularReference = {\n    prop?: ModelWithCircularReference;\n};\n\n/**\n * This is a model with one property with a 'one of' relationship\n */\nexport type CompositionWithOneOf = {\n    propA?: ModelWithString | ModelWithEnum | ModelWithArray | ModelWithDictionary;\n};\n\n/**\n * This is a model with one property with a 'one of' relationship where the options are not $ref\n */\nexport type CompositionWithOneOfAnonymous = {\n    propA?: {\n        propA?: string;\n    } | string | number;\n};\n\n/**\n * Circle\n */\nexport type ModelCircle = {\n    kind: string;\n    radius?: number;\n};\n\n/**\n * Square\n */\nexport type ModelSquare = {\n    kind: string;\n    sideLength?: number;\n};\n\n/**\n * This is a model with one property with a 'one of' relationship where the options are not $ref\n */\nexport type CompositionWithOneOfDiscriminator = ({\n    kind: 'circle';\n} & ModelCircle) | ({\n    kind: 'square';\n} & ModelSquare);\n\n/**\n * This is a model with one property with a 'any of' relationship\n */\nexport type CompositionWithAnyOf = {\n    propA?: ModelWithString | ModelWithEnum | ModelWithArray | ModelWithDictionary;\n};\n\n/**\n * This is a model with one property with a 'any of' relationship where the options are not $ref\n */\nexport type CompositionWithAnyOfAnonymous = {\n    propA?: {\n        propA?: string;\n    } | string | number;\n};\n\n/**\n * This is a model with nested 'any of' property with a type null\n */\nexport type CompositionWithNestedAnyAndTypeNull = {\n    propA?: Array<ModelWithDictionary | null> | Array<ModelWithArray | null>;\n};\n\nexport type _3eNum1Период = 'Bird' | 'Dog';\n\nexport type ConstValue = 'ConstValue';\n\n/**\n * This is a model with one property with a 'any of' relationship where the options are not $ref\n */\nexport type CompositionWithNestedAnyOfAndNull = {\n    /**\n     * Scopes\n     */\n    propA?: Array<_3eNum1Период | ConstValue> | null;\n};\n\n/**\n * This is a model with one property with a 'one of' relationship\n */\nexport type CompositionWithOneOfAndNullable = {\n    propA?: {\n        boolean?: boolean;\n    } | ModelWithEnum | ModelWithArray | ModelWithDictionary | null;\n};\n\n/**\n * This is a model that contains a simple dictionary within composition\n */\nexport type CompositionWithOneOfAndSimpleDictionary = {\n    propA?: boolean | {\n        [key: string]: number;\n    };\n};\n\n/**\n * This is a model that contains a dictionary of simple arrays within composition\n */\nexport type CompositionWithOneOfAndSimpleArrayDictionary = {\n    propA?: boolean | {\n        [key: string]: Array<boolean>;\n    };\n};\n\n/**\n * This is a model that contains a dictionary of complex arrays (composited) within composition\n */\nexport type CompositionWithOneOfAndComplexArrayDictionary = {\n    propA?: boolean | {\n        [key: string]: Array<number | string>;\n    };\n};\n\n/**\n * This is a model with one property with a 'all of' relationship\n */\nexport type CompositionWithAllOfAndNullable = {\n    propA?: ({\n        boolean?: boolean;\n    } & ModelWithEnum & ModelWithArray & ModelWithDictionary) | null;\n};\n\n/**\n * This is a model with one property with a 'any of' relationship\n */\nexport type CompositionWithAnyOfAndNullable = {\n    propA?: {\n        boolean?: boolean;\n    } | ModelWithEnum | ModelWithArray | ModelWithDictionary | null;\n};\n\n/**\n * This is a base model with two simple optional properties\n */\nexport type CompositionBaseModel = {\n    firstName?: string;\n    lastname?: string;\n};\n\n/**\n * This is a model that extends the base model\n */\nexport type CompositionExtendedModel = CompositionBaseModel & {\n    age: number;\n    firstName: string;\n    lastname: string;\n};\n\n/**\n * This is a model with one nested property\n */\nexport type ModelWithProperties = {\n    required: string;\n    readonly requiredAndReadOnly: string;\n    requiredAndNullable: string | null;\n    string?: string;\n    number?: number;\n    boolean?: boolean;\n    reference?: ModelWithString;\n    'property with space'?: string;\n    default?: string;\n    try?: string;\n    readonly '@namespace.string'?: string;\n    readonly '@namespace.integer'?: number;\n};\n\n/**\n * This is a model with one nested property\n */\nexport type ModelWithNestedProperties = {\n    readonly first: {\n        readonly second: {\n            readonly third: string | null;\n        } | null;\n    } | null;\n};\n\n/**\n * This is a model with duplicated properties\n */\nexport type ModelWithDuplicateProperties = {\n    prop?: ModelWithString;\n};\n\n/**\n * This is a model with ordered properties\n */\nexport type ModelWithOrderedProperties = {\n    zebra?: string;\n    apple?: string;\n    hawaii?: string;\n};\n\n/**\n * This is a model with duplicated imports\n */\nexport type ModelWithDuplicateImports = {\n    propA?: ModelWithString;\n    propB?: ModelWithString;\n    propC?: ModelWithString;\n};\n\n/**\n * This is a model that extends another model\n */\nexport type ModelThatExtends = ModelWithString & {\n    propExtendsA?: string;\n    propExtendsB?: ModelWithString;\n};\n\n/**\n * This is a model that extends another model\n */\nexport type ModelThatExtendsExtends = ModelWithString & ModelThatExtends & {\n    propExtendsC?: string;\n    propExtendsD?: ModelWithString;\n};\n\n/**\n * This is a model that contains a some patterns\n */\nexport type ModelWithPattern = {\n    key: string;\n    name: string;\n    readonly enabled?: boolean;\n    readonly modified?: string;\n    id?: string;\n    text?: string;\n    patternWithSingleQuotes?: string;\n    patternWithNewline?: string;\n    patternWithBacktick?: string;\n    patternWithUnicode?: string;\n};\n\nexport type File = {\n    /**\n     * Id\n     */\n    readonly id?: string;\n    /**\n     * Updated at\n     */\n    readonly updated_at?: string;\n    /**\n     * Created at\n     */\n    readonly created_at?: string;\n    /**\n     * Mime\n     */\n    mime: string;\n    /**\n     * File\n     */\n    readonly file?: string;\n};\n\nexport type Default = {\n    name?: string;\n};\n\nexport type Pageable = {\n    page?: number;\n    size?: number;\n    sort?: Array<string>;\n};\n\n/**\n * This is a free-form object without additionalProperties.\n */\nexport type FreeFormObjectWithoutAdditionalProperties = {\n    [key: string]: unknown;\n};\n\n/**\n * This is a free-form object with additionalProperties: true.\n */\nexport type FreeFormObjectWithAdditionalPropertiesEqTrue = {\n    [key: string]: unknown;\n};\n\n/**\n * This is a free-form object with additionalProperties: {}.\n */\nexport type FreeFormObjectWithAdditionalPropertiesEqEmptyObject = {\n    [key: string]: unknown;\n};\n\nexport type ModelWithConst = {\n    String?: 'String';\n    number?: 0;\n    null?: null;\n    withType?: 'Some string';\n};\n\n/**\n * This is a model with one property and additionalProperties: true\n */\nexport type ModelWithAdditionalPropertiesEqTrue = {\n    /**\n     * This is a simple string property\n     */\n    prop?: string;\n    [key: string]: unknown;\n};\n\nexport type NestedAnyOfArraysNullable = {\n    nullableArray?: Array<string | boolean> | null;\n};\n\nexport type CompositionWithOneOfAndProperties = ({\n    foo: SimpleParameter;\n} | {\n    bar: NonAsciiStringæøåÆøÅöôêÊ字符串;\n}) & {\n    baz: number | null;\n    qux: number;\n};\n\n/**\n * An object that can be null\n */\nexport type NullableObject = {\n    foo?: string;\n} | null;\n\n/**\n * Some % character\n */\nexport type CharactersInDescription = string;\n\nexport type ModelWithNullableObject = {\n    data?: NullableObject;\n};\n\n/**\n * An object with additional properties that can be null (anyOf ref + null)\n */\nexport type ModelWithAdditionalPropertiesRef = {\n    [key: string]: NullableObject | null;\n};\n\nexport type ModelWithOneOfEnum = {\n    foo: 'Bar';\n} | {\n    foo: 'Baz';\n} | {\n    foo: 'Qux';\n} | {\n    content: string;\n    foo: 'Quux';\n} | {\n    content: [\n        string,\n        string\n    ];\n    foo: 'Corge';\n};\n\nexport type ModelWithNestedArrayEnumsDataFoo = 'foo' | 'bar';\n\nexport type ModelWithNestedArrayEnumsDataBar = 'baz' | 'qux';\n\nexport type ModelWithNestedArrayEnumsData = {\n    foo?: Array<ModelWithNestedArrayEnumsDataFoo>;\n    bar?: Array<ModelWithNestedArrayEnumsDataBar>;\n};\n\nexport type ModelWithNestedArrayEnums = {\n    array_strings?: Array<string>;\n    data?: ModelWithNestedArrayEnumsData;\n};\n\nexport type ModelWithNestedCompositionEnums = {\n    foo?: ModelWithNestedArrayEnumsDataFoo;\n};\n\nexport type ModelWithReadOnlyAndWriteOnly = {\n    foo: string;\n    readonly bar: string;\n};\n\nexport type ModelWithConstantSizeArray = [\n    number,\n    number\n];\n\nexport type ModelWithAnyOfConstantSizeArray = [\n    number | string,\n    number | string,\n    number | string\n];\n\nexport type ModelWithPrefixItemsConstantSizeArray = [\n    ModelWithInteger,\n    number | string,\n    string\n];\n\nexport type ModelWithAnyOfConstantSizeArrayNullable = [\n    number | null | string,\n    number | null | string,\n    number | null | string\n];\n\nexport type ModelWithAnyOfConstantSizeArrayWithNSizeAndOptions = [\n    number | Import,\n    number | Import\n];\n\nexport type ModelWithAnyOfConstantSizeArrayAndIntersect = [\n    number & string,\n    number & string\n];\n\nexport type ModelWithNumericEnumUnion = {\n    /**\n     * Период\n     */\n    value?: -10 | -1 | 0 | 1 | 3 | 6 | 12;\n};\n\n/**\n * Some description with `back ticks`\n */\nexport type ModelWithBackticksInDescription = {\n    /**\n     * The template `that` should be used for parsing and importing the contents of the CSV file.\n     *\n     * <br/><p>There is one placeholder currently supported:<ul>     <li><b>${x}</b> - refers to the n-th column in the CSV file, e.g. ${1}, ${2}, ...)</li></ul><p>Example of a correct JSON template:</p>\n     * <pre>\n     * [\n     * {\n     * \"resourceType\": \"Asset\",\n     * \"identifier\": {\n     * \"name\": \"${1}\",\n     * \"domain\": {\n     * \"name\": \"${2}\",\n     * \"community\": {\n     * \"name\": \"Some Community\"\n     * }\n     * }\n     * },\n     * \"attributes\" : {\n     * \"00000000-0000-0000-0000-000000003115\" : [ {\n     * \"value\" : \"${3}\"\n     * } ],\n     * \"00000000-0000-0000-0000-000000000222\" : [ {\n     * \"value\" : \"${4}\"\n     * } ]\n     * }\n     * }\n     * ]\n     * </pre>\n     */\n    template?: string;\n};\n\nexport type ModelWithOneOfAndProperties = (SimpleParameter | NonAsciiStringæøåÆøÅöôêÊ字符串) & {\n    baz: number | null;\n    qux: number;\n};\n\n/**\n * Model used to test deduplication strategy (unused)\n */\nexport type ParameterSimpleParameterUnused = string;\n\n/**\n * Model used to test deduplication strategy\n */\nexport type PostServiceWithEmptyTagResponse = string;\n\n/**\n * Model used to test deduplication strategy\n */\nexport type PostServiceWithEmptyTagResponse2 = string;\n\n/**\n * Model used to test deduplication strategy\n */\nexport type DeleteFooData = string;\n\n/**\n * Model used to test deduplication strategy\n */\nexport type DeleteFooData2 = string;\n\n/**\n * Model with restricted keyword name\n */\nexport type Import = string;\n\nexport type SchemaWithFormRestrictedKeys = {\n    description?: string;\n    'x-enum-descriptions'?: string;\n    'x-enum-varnames'?: string;\n    'x-enumNames'?: string;\n    title?: string;\n    object?: {\n        description?: string;\n        'x-enum-descriptions'?: string;\n        'x-enum-varnames'?: string;\n        'x-enumNames'?: string;\n        title?: string;\n    };\n    array?: Array<{\n        description?: string;\n        'x-enum-descriptions'?: string;\n        'x-enum-varnames'?: string;\n        'x-enumNames'?: string;\n        title?: string;\n    }>;\n};\n\n/**\n * This schema was giving PascalCase transformations a hard time\n */\nexport type IoK8sApimachineryPkgApisMetaV1DeleteOptions = {\n    /**\n     * Must be fulfilled before a deletion is carried out. If not possible, a 409 Conflict status will be returned.\n     */\n    preconditions?: IoK8sApimachineryPkgApisMetaV1Preconditions;\n};\n\n/**\n * This schema was giving PascalCase transformations a hard time\n */\nexport type IoK8sApimachineryPkgApisMetaV1Preconditions = {\n    /**\n     * Specifies the target ResourceVersion\n     */\n    resourceVersion?: string;\n    /**\n     * Specifies the target UID.\n     */\n    uid?: string;\n};\n\nexport type AdditionalPropertiesUnknownIssue = {\n    [key: string]: string | number;\n};\n\nexport type AdditionalPropertiesUnknownIssue2 = {\n    [key: string]: string | number;\n};\n\nexport type AdditionalPropertiesUnknownIssue3 = string & {\n    entries: {\n        [key: string]: AdditionalPropertiesUnknownIssue;\n    };\n};\n\nexport type AdditionalPropertiesIntegerIssue = {\n    value: number;\n    [key: string]: number;\n};\n\nexport type OneOfAllOfIssue = ((ConstValue | GenericSchemaDuplicateIssue1SystemBoolean) & _3eNum1Период) | GenericSchemaDuplicateIssue1SystemString;\n\nexport type GenericSchemaDuplicateIssue1SystemBoolean = {\n    item?: boolean;\n    error?: string | null;\n    readonly hasError?: boolean;\n    data?: {\n        [key: string]: never;\n    };\n};\n\nexport type GenericSchemaDuplicateIssue1SystemString = {\n    item?: string | null;\n    error?: string | null;\n    readonly hasError?: boolean;\n};\n\nexport type ExternalSharedModel = {\n    id: string;\n    name?: string;\n};\n\n/**\n * This is a model with one property containing a reference\n */\nexport type ModelWithReferenceWritable = {\n    prop?: ModelWithPropertiesWritable;\n};\n\n/**\n * This is a model with one property containing an array\n */\nexport type ModelWithArrayReadOnlyAndWriteOnlyWritable = {\n    prop?: Array<ModelWithReadOnlyAndWriteOnlyWritable>;\n    propWithFile?: Array<Blob | File>;\n    propWithNumber?: Array<number>;\n};\n\n/**\n * This is a model with one nested property\n */\nexport type ModelWithPropertiesWritable = {\n    required: string;\n    requiredAndNullable: string | null;\n    string?: string;\n    number?: number;\n    boolean?: boolean;\n    reference?: ModelWithString;\n    'property with space'?: string;\n    default?: string;\n    try?: string;\n};\n\n/**\n * This is a model that contains a some patterns\n */\nexport type ModelWithPatternWritable = {\n    key: string;\n    name: string;\n    id?: string;\n    text?: string;\n    patternWithSingleQuotes?: string;\n    patternWithNewline?: string;\n    patternWithBacktick?: string;\n    patternWithUnicode?: string;\n};\n\nexport type FileWritable = {\n    /**\n     * Mime\n     */\n    mime: string;\n};\n\nexport type ModelWithReadOnlyAndWriteOnlyWritable = {\n    foo: string;\n    baz: string;\n};\n\nexport type ModelWithAnyOfConstantSizeArrayWithNSizeAndOptionsWritable = [\n    number | Import,\n    number | Import\n];\n\nexport type AdditionalPropertiesUnknownIssueWritable = {\n    [key: string]: string | number;\n};\n\nexport type OneOfAllOfIssueWritable = ((ConstValue | GenericSchemaDuplicateIssue1SystemBoolean) & _3eNum1Период) | GenericSchemaDuplicateIssue1SystemString;\n\nexport type GenericSchemaDuplicateIssue1SystemBooleanWritable = {\n    item?: boolean;\n    error?: string | null;\n    data?: {\n        [key: string]: never;\n    };\n};\n\nexport type GenericSchemaDuplicateIssue1SystemStringWritable = {\n    item?: string | null;\n    error?: string | null;\n};\n\n/**\n * This is a reusable parameter\n */\nexport type SimpleParameter = string;\n\n/**\n * Parameter with illegal characters\n */\nexport type XFooBar = ModelWithString;\n\n/**\n * A reusable request body\n */\nexport type SimpleRequestBody = ModelWithString;\n\n/**\n * A reusable request body\n */\nexport type SimpleFormData = ModelWithString;\n\nexport type ExportData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no+tag';\n};\n\nexport type PatchApiVbyApiVersionNoTagData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no+tag';\n};\n\nexport type PatchApiVbyApiVersionNoTagResponses = {\n    /**\n     * OK\n     */\n    default: unknown;\n};\n\nexport type ImportData = {\n    body: ModelWithReadOnlyAndWriteOnlyWritable | ModelWithArrayReadOnlyAndWriteOnlyWritable;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no+tag';\n};\n\nexport type ImportResponses = {\n    /**\n     * Success\n     */\n    200: ModelFromZendesk;\n    /**\n     * Default success response\n     */\n    default: ModelWithReadOnlyAndWriteOnly;\n};\n\nexport type ImportResponse = ImportResponses[keyof ImportResponses];\n\nexport type FooWowData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no+tag';\n};\n\nexport type FooWowResponses = {\n    /**\n     * OK\n     */\n    default: unknown;\n};\n\nexport type ApiVVersionODataControllerCountData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple/$count';\n};\n\nexport type ApiVVersionODataControllerCountResponses = {\n    /**\n     * Success\n     */\n    200: ModelFromZendesk;\n};\n\nexport type ApiVVersionODataControllerCountResponse = ApiVVersionODataControllerCountResponses[keyof ApiVVersionODataControllerCountResponses];\n\nexport type GetApiVbyApiVersionSimpleOperationData = {\n    body?: never;\n    path: {\n        /**\n         * foo in method\n         */\n        foo_param: string;\n    };\n    query?: never;\n    url: '/api/v{api-version}/simple:operation';\n};\n\nexport type GetApiVbyApiVersionSimpleOperationErrors = {\n    /**\n     * Default error response\n     */\n    default: ModelWithBoolean;\n};\n\nexport type GetApiVbyApiVersionSimpleOperationError = GetApiVbyApiVersionSimpleOperationErrors[keyof GetApiVbyApiVersionSimpleOperationErrors];\n\nexport type GetApiVbyApiVersionSimpleOperationResponses = {\n    /**\n     * Response is a simple number\n     */\n    200: number;\n};\n\nexport type GetApiVbyApiVersionSimpleOperationResponse = GetApiVbyApiVersionSimpleOperationResponses[keyof GetApiVbyApiVersionSimpleOperationResponses];\n\nexport type DeleteCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type GetCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type HeadCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type OptionsCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type PatchCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type PostCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type PutCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type DeleteFooData3 = {\n    body?: never;\n    headers: {\n        /**\n         * Parameter with illegal characters\n         */\n        'x-Foo-Bar': ModelWithString;\n    };\n    path: {\n        /**\n         * foo in method\n         */\n        foo_param: string;\n        /**\n         * bar in method\n         */\n        BarParam: string;\n    };\n    query?: never;\n    url: '/api/v{api-version}/foo/{foo_param}/bar/{BarParam}';\n};\n\nexport type CallWithDescriptionsData = {\n    body?: never;\n    path?: never;\n    query?: {\n        /**\n         * Testing multiline comments in string: First line\n         * Second line\n         *\n         * Fourth line\n         */\n        parameterWithBreaks?: string;\n        /**\n         * Testing backticks in string: `backticks` and ```multiple backticks``` should work\n         */\n        parameterWithBackticks?: string;\n        /**\n         * Testing slashes in string: \\backwards\\\\\\ and /forwards/// should work\n         */\n        parameterWithSlashes?: string;\n        /**\n         * Testing expression placeholders in string: ${expression} should work\n         */\n        parameterWithExpressionPlaceholders?: string;\n        /**\n         * Testing quotes in string: 'single quote''' and \"double quotes\"\"\" should work\n         */\n        parameterWithQuotes?: string;\n        /**\n         * Testing reserved characters in string: * inline * and ** inline ** should work\n         */\n        parameterWithReservedCharacters?: string;\n    };\n    url: '/api/v{api-version}/descriptions';\n};\n\nexport type DeprecatedCallData = {\n    body?: never;\n    headers: {\n        /**\n         * This parameter is deprecated\n         *\n         * @deprecated\n         */\n        parameter: DeprecatedModel | null;\n    };\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/parameters/deprecated';\n};\n\nexport type CallWithParametersData = {\n    /**\n     * This is the parameter that goes into the body\n     */\n    body: {\n        [key: string]: unknown;\n    } | null;\n    headers: {\n        /**\n         * This is the parameter that goes into the header\n         */\n        parameterHeader: string | null;\n    };\n    path: {\n        /**\n         * This is the parameter that goes into the path\n         */\n        parameterPath: string | null;\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string | null;\n    };\n    query: {\n        foo_ref_enum?: ModelWithNestedArrayEnumsDataFoo;\n        foo_all_of_enum: ModelWithNestedArrayEnumsDataFoo;\n        /**\n         * This is the parameter that goes into the query params\n         */\n        cursor: string | null;\n    };\n    url: '/api/v{api-version}/parameters/{parameterPath}';\n};\n\nexport type CallWithWeirdParameterNamesData = {\n    /**\n     * This is the parameter that goes into the body\n     */\n    body: ModelWithString | null;\n    headers: {\n        /**\n         * This is the parameter that goes into the request header\n         */\n        'parameter.header': string | null;\n    };\n    path: {\n        /**\n         * This is the parameter that goes into the path\n         */\n        'parameter.path.1'?: string;\n        /**\n         * This is the parameter that goes into the path\n         */\n        'parameter-path-2'?: string;\n        /**\n         * This is the parameter that goes into the path\n         */\n        'PARAMETER-PATH-3'?: string;\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string | null;\n    };\n    query: {\n        /**\n         * This is the parameter with a reserved keyword\n         */\n        default?: string;\n        /**\n         * This is the parameter that goes into the request query params\n         */\n        'parameter-query': string | null;\n    };\n    url: '/api/v{api-version}/parameters/{parameter.path.1}/{parameter-path-2}/{PARAMETER-PATH-3}';\n};\n\nexport type GetCallWithOptionalParamData = {\n    /**\n     * This is a required parameter\n     */\n    body: ModelWithOneOfEnum;\n    path?: never;\n    query?: {\n        /**\n         * This is an optional parameter\n         */\n        page?: number;\n    };\n    url: '/api/v{api-version}/parameters';\n};\n\nexport type PostCallWithOptionalParamData = {\n    /**\n     * This is an optional parameter\n     */\n    body?: {\n        offset?: number | null;\n    };\n    path?: never;\n    query: {\n        /**\n         * This is a required parameter\n         */\n        parameter: Pageable;\n    };\n    url: '/api/v{api-version}/parameters';\n};\n\nexport type PostCallWithOptionalParamResponses = {\n    /**\n     * Response is a simple number\n     */\n    200: number;\n    /**\n     * Success\n     */\n    204: void;\n};\n\nexport type PostCallWithOptionalParamResponse = PostCallWithOptionalParamResponses[keyof PostCallWithOptionalParamResponses];\n\nexport type PostApiVbyApiVersionRequestBodyData = {\n    /**\n     * A reusable request body\n     */\n    body?: SimpleRequestBody;\n    path?: never;\n    query?: {\n        /**\n         * This is a reusable parameter\n         */\n        parameter?: string;\n    };\n    url: '/api/v{api-version}/requestBody';\n};\n\nexport type PostApiVbyApiVersionFormDataData = {\n    /**\n     * A reusable request body\n     */\n    body?: SimpleFormData;\n    path?: never;\n    query?: {\n        /**\n         * This is a reusable parameter\n         */\n        parameter?: string;\n    };\n    url: '/api/v{api-version}/formData';\n};\n\nexport type CallWithDefaultParametersData = {\n    body?: never;\n    path?: never;\n    query?: {\n        /**\n         * This is a simple string with default value\n         */\n        parameterString?: string | null;\n        /**\n         * This is a simple number with default value\n         */\n        parameterNumber?: number | null;\n        /**\n         * This is a simple boolean with default value\n         */\n        parameterBoolean?: boolean | null;\n        /**\n         * This is a simple enum with default value\n         */\n        parameterEnum?: 'Success' | 'Warning' | 'Error';\n        /**\n         * This is a simple model with default value\n         */\n        parameterModel?: ModelWithString | null;\n    };\n    url: '/api/v{api-version}/defaults';\n};\n\nexport type CallWithDefaultOptionalParametersData = {\n    body?: never;\n    path?: never;\n    query?: {\n        /**\n         * This is a simple string that is optional with default value\n         */\n        parameterString?: string;\n        /**\n         * This is a simple number that is optional with default value\n         */\n        parameterNumber?: number;\n        /**\n         * This is a simple boolean that is optional with default value\n         */\n        parameterBoolean?: boolean;\n        /**\n         * This is a simple enum that is optional with default value\n         */\n        parameterEnum?: 'Success' | 'Warning' | 'Error';\n        /**\n         * This is a simple model that is optional with default value\n         */\n        parameterModel?: ModelWithString;\n    };\n    url: '/api/v{api-version}/defaults';\n};\n\nexport type CallToTestOrderOfParamsData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * This is a optional string with default\n         */\n        parameterOptionalStringWithDefault?: string;\n        /**\n         * This is a optional string with empty default\n         */\n        parameterOptionalStringWithEmptyDefault?: string;\n        /**\n         * This is a optional string with no default\n         */\n        parameterOptionalStringWithNoDefault?: string;\n        /**\n         * This is a string with default\n         */\n        parameterStringWithDefault: string;\n        /**\n         * This is a string with empty default\n         */\n        parameterStringWithEmptyDefault: string;\n        /**\n         * This is a string with no default\n         */\n        parameterStringWithNoDefault: string;\n        /**\n         * This is a string that can be null with no default\n         */\n        parameterStringNullableWithNoDefault?: string | null;\n        /**\n         * This is a string that can be null with default\n         */\n        parameterStringNullableWithDefault?: string | null;\n    };\n    url: '/api/v{api-version}/defaults';\n};\n\nexport type DuplicateNameData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/duplicate';\n};\n\nexport type DuplicateName2Data = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/duplicate';\n};\n\nexport type DuplicateName3Data = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/duplicate';\n};\n\nexport type DuplicateName4Data = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/duplicate';\n};\n\nexport type CallWithNoContentResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no-content';\n};\n\nexport type CallWithNoContentResponseResponses = {\n    /**\n     * Success\n     */\n    204: void;\n};\n\nexport type CallWithNoContentResponseResponse = CallWithNoContentResponseResponses[keyof CallWithNoContentResponseResponses];\n\nexport type CallWithResponseAndNoContentResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multiple-tags/response-and-no-content';\n};\n\nexport type CallWithResponseAndNoContentResponseResponses = {\n    /**\n     * Response is a simple number\n     */\n    200: number;\n    /**\n     * Success\n     */\n    204: void;\n};\n\nexport type CallWithResponseAndNoContentResponseResponse = CallWithResponseAndNoContentResponseResponses[keyof CallWithResponseAndNoContentResponseResponses];\n\nexport type DummyAData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multiple-tags/a';\n};\n\nexport type DummyAResponses = {\n    200: _400;\n};\n\nexport type DummyAResponse = DummyAResponses[keyof DummyAResponses];\n\nexport type DummyBData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multiple-tags/b';\n};\n\nexport type DummyBResponses = {\n    /**\n     * Success\n     */\n    204: void;\n};\n\nexport type DummyBResponse = DummyBResponses[keyof DummyBResponses];\n\nexport type CallWithResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/response';\n};\n\nexport type CallWithResponseResponses = {\n    default: Import;\n};\n\nexport type CallWithResponseResponse = CallWithResponseResponses[keyof CallWithResponseResponses];\n\nexport type CallWithDuplicateResponsesData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/response';\n};\n\nexport type CallWithDuplicateResponsesErrors = {\n    /**\n     * Message for 500 error\n     */\n    500: ModelWithStringError;\n    /**\n     * Message for 501 error\n     */\n    501: ModelWithStringError;\n    /**\n     * Message for 502 error\n     */\n    502: ModelWithStringError;\n    /**\n     * Message for 4XX errors\n     */\n    '4XX': DictionaryWithArray;\n    /**\n     * Default error response\n     */\n    default: ModelWithBoolean;\n};\n\nexport type CallWithDuplicateResponsesError = CallWithDuplicateResponsesErrors[keyof CallWithDuplicateResponsesErrors];\n\nexport type CallWithDuplicateResponsesResponses = {\n    /**\n     * Message for 200 response\n     */\n    200: ModelWithBoolean & ModelWithInteger;\n    /**\n     * Message for 201 response\n     */\n    201: ModelWithString;\n    /**\n     * Message for 202 response\n     */\n    202: ModelWithString;\n};\n\nexport type CallWithDuplicateResponsesResponse = CallWithDuplicateResponsesResponses[keyof CallWithDuplicateResponsesResponses];\n\nexport type CallWithResponsesData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/response';\n};\n\nexport type CallWithResponsesErrors = {\n    /**\n     * Message for 500 error\n     */\n    500: ModelWithStringError;\n    /**\n     * Message for 501 error\n     */\n    501: ModelWithStringError;\n    /**\n     * Message for 502 error\n     */\n    502: ModelWithStringError;\n    /**\n     * Message for default response\n     */\n    default: ModelWithStringError;\n};\n\nexport type CallWithResponsesError = CallWithResponsesErrors[keyof CallWithResponsesErrors];\n\nexport type CallWithResponsesResponses = {\n    /**\n     * Message for 200 response\n     */\n    200: {\n        readonly '@namespace.string'?: string;\n        readonly '@namespace.integer'?: number;\n        readonly value?: Array<ModelWithString>;\n    };\n    /**\n     * Message for 201 response\n     */\n    201: ModelThatExtends;\n    /**\n     * Message for 202 response\n     */\n    202: ModelThatExtendsExtends;\n};\n\nexport type CallWithResponsesResponse = CallWithResponsesResponses[keyof CallWithResponsesResponses];\n\nexport type CollectionFormatData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * This is an array parameter that is sent as csv format (comma-separated values)\n         */\n        parameterArrayCSV: Array<string> | null;\n        /**\n         * This is an array parameter that is sent as ssv format (space-separated values)\n         */\n        parameterArraySSV: Array<string> | null;\n        /**\n         * This is an array parameter that is sent as tsv format (tab-separated values)\n         */\n        parameterArrayTSV: Array<string> | null;\n        /**\n         * This is an array parameter that is sent as pipes format (pipe-separated values)\n         */\n        parameterArrayPipes: Array<string> | null;\n        /**\n         * This is an array parameter that is sent as multi format (multiple parameter instances)\n         */\n        parameterArrayMulti: Array<string> | null;\n    };\n    url: '/api/v{api-version}/collectionFormat';\n};\n\nexport type TypesData = {\n    body?: never;\n    path?: {\n        /**\n         * This is a number parameter\n         */\n        id?: number;\n    };\n    query: {\n        /**\n         * This is a number parameter\n         */\n        parameterNumber: number;\n        /**\n         * This is a string parameter\n         */\n        parameterString: string | null;\n        /**\n         * This is a boolean parameter\n         */\n        parameterBoolean: boolean | null;\n        /**\n         * This is an object parameter\n         */\n        parameterObject: {\n            [key: string]: unknown;\n        } | null;\n        /**\n         * This is an array parameter\n         */\n        parameterArray: Array<string> | null;\n        /**\n         * This is a dictionary parameter\n         */\n        parameterDictionary: {\n            [key: string]: unknown;\n        } | null;\n        /**\n         * This is an enum parameter\n         */\n        parameterEnum: 'Success' | 'Warning' | 'Error' | null;\n    };\n    url: '/api/v{api-version}/types';\n};\n\nexport type TypesResponses = {\n    /**\n     * Response is a simple number\n     */\n    200: number;\n    /**\n     * Response is a simple string\n     */\n    201: string;\n    /**\n     * Response is a simple boolean\n     */\n    202: boolean;\n    /**\n     * Response is a simple object\n     */\n    203: {\n        [key: string]: unknown;\n    };\n};\n\nexport type TypesResponse = TypesResponses[keyof TypesResponses];\n\nexport type UploadFileData = {\n    body: Blob | File;\n    path: {\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string | null;\n    };\n    query?: never;\n    url: '/api/v{api-version}/upload';\n};\n\nexport type UploadFileResponses = {\n    200: boolean;\n};\n\nexport type UploadFileResponse = UploadFileResponses[keyof UploadFileResponses];\n\nexport type FileResponseData = {\n    body?: never;\n    path: {\n        id: string;\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string;\n    };\n    query?: never;\n    url: '/api/v{api-version}/file/{id}';\n};\n\nexport type FileResponseResponses = {\n    /**\n     * Success\n     */\n    200: Blob | File;\n};\n\nexport type FileResponseResponse = FileResponseResponses[keyof FileResponseResponses];\n\nexport type ComplexTypesData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * Parameter containing object\n         */\n        parameterObject: {\n            first?: {\n                second?: {\n                    third?: string;\n                };\n            };\n        };\n        /**\n         * Parameter containing reference\n         */\n        parameterReference: ModelWithString;\n    };\n    url: '/api/v{api-version}/complex';\n};\n\nexport type ComplexTypesErrors = {\n    /**\n     * 400 `server` error\n     */\n    400: unknown;\n    /**\n     * 500 server error\n     */\n    500: unknown;\n};\n\nexport type ComplexTypesResponses = {\n    /**\n     * Successful response\n     */\n    200: Array<ModelWithString>;\n};\n\nexport type ComplexTypesResponse = ComplexTypesResponses[keyof ComplexTypesResponses];\n\nexport type MultipartResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multipart';\n};\n\nexport type MultipartResponseResponses = {\n    /**\n     * OK\n     */\n    200: {\n        file?: Blob | File;\n        metadata?: {\n            foo?: string;\n            bar?: string;\n        };\n    };\n};\n\nexport type MultipartResponseResponse = MultipartResponseResponses[keyof MultipartResponseResponses];\n\nexport type MultipartRequestData = {\n    body?: {\n        content?: Blob | File;\n        data?: ModelWithString | null;\n    };\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multipart';\n};\n\nexport type ComplexParamsData = {\n    body?: {\n        readonly key: string | null;\n        name: string | null;\n        enabled?: boolean;\n        type: 'Monkey' | 'Horse' | 'Bird';\n        listOfModels?: Array<ModelWithString> | null;\n        listOfStrings?: Array<string> | null;\n        parameters: ModelWithString | ModelWithEnum | ModelWithArray | ModelWithDictionary;\n        readonly user?: {\n            readonly id?: number;\n            readonly name?: string | null;\n        };\n    };\n    path: {\n        id: number;\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string;\n    };\n    query?: never;\n    url: '/api/v{api-version}/complex/{id}';\n};\n\nexport type ComplexParamsResponses = {\n    /**\n     * Success\n     */\n    200: ModelWithString;\n};\n\nexport type ComplexParamsResponse = ComplexParamsResponses[keyof ComplexParamsResponses];\n\nexport type CallWithResultFromHeaderData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/header';\n};\n\nexport type CallWithResultFromHeaderErrors = {\n    /**\n     * 400 server error\n     */\n    400: unknown;\n    /**\n     * 500 server error\n     */\n    500: unknown;\n};\n\nexport type CallWithResultFromHeaderResponses = {\n    /**\n     * Successful response\n     */\n    200: unknown;\n};\n\nexport type TestErrorCodeData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * Status code to return\n         */\n        status: number;\n    };\n    url: '/api/v{api-version}/error';\n};\n\nexport type TestErrorCodeErrors = {\n    /**\n     * Custom message: Internal Server Error\n     */\n    500: unknown;\n    /**\n     * Custom message: Not Implemented\n     */\n    501: unknown;\n    /**\n     * Custom message: Bad Gateway\n     */\n    502: unknown;\n    /**\n     * Custom message: Service Unavailable\n     */\n    503: unknown;\n};\n\nexport type TestErrorCodeResponses = {\n    /**\n     * Custom message: Successful response\n     */\n    200: unknown;\n};\n\nexport type NonAsciiæøåÆøÅöôêÊ字符串Data = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * Dummy input param\n         */\n        nonAsciiParamæøåÆØÅöôêÊ: number;\n    };\n    url: '/api/v{api-version}/non-ascii-æøåÆØÅöôêÊ字符串';\n};\n\nexport type NonAsciiæøåÆøÅöôêÊ字符串Responses = {\n    /**\n     * Successful response\n     */\n    200: Array<NonAsciiStringæøåÆøÅöôêÊ字符串>;\n};\n\nexport type NonAsciiæøåÆøÅöôêÊ字符串Response = NonAsciiæøåÆøÅöôêÊ字符串Responses[keyof NonAsciiæøåÆøÅöôêÊ字符串Responses];\n\nexport type PutWithFormUrlEncodedData = {\n    body: ArrayWithStrings;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/non-ascii-æøåÆØÅöôêÊ字符串';\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-next/base-url-false/client/client.gen.ts",
    "content": "// 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<Response, unknown, ResolvedRequestOptions>();\n\n  const beforeRequest = async (options: RequestOptions) => {\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 url = buildUrl(opts);\n\n    return { opts, url };\n  };\n\n  // @ts-expect-error\n  const request: Client['request'] = async (options) => {\n    // @ts-expect-error\n    const { opts, url } = await beforeRequest(options);\n\n    for (const fn of interceptors.request.fns) {\n      if (fn) {\n        await fn(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    const requestInit: ReqInit = {\n      ...opts,\n      body: getValidRequestBody(opts),\n    };\n\n    let response = await _fetch(url, requestInit);\n\n    for (const fn of interceptors.response.fns) {\n      if (fn) {\n        response = await fn(response, opts);\n      }\n    }\n\n    const result = {\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 {\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 {\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 {\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, opts)) as string;\n      }\n    }\n\n    finalError = finalError || ({} as string);\n\n    if (opts.throwOnError) {\n      throw finalError;\n    }\n\n    return {\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        const requestInit = {\n          ...init,\n          method: init.method as Config['method'],\n          url,\n        };\n        for (const fn of interceptors.request.fns) {\n          if (fn) {\n            await fn(requestInit);\n            request = new Request(requestInit.url, requestInit);\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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-next/base-url-false/client/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type { Auth } from '../core/auth.gen';\nexport type { QuerySerializerOptions } from '../core/bodySerializer.gen';\nexport {\n  formDataBodySerializer,\n  jsonBodySerializer,\n  urlSearchParamsBodySerializer,\n} from '../core/bodySerializer.gen';\nexport { buildClientParams } from '../core/params.gen';\nexport { serializeQueryKeyValue } from '../core/queryKeySerializer.gen';\nexport { createClient } from './client.gen';\nexport type {\n  Client,\n  ClientOptions,\n  Config,\n  CreateClientConfig,\n  Options,\n  RequestOptions,\n  RequestResult,\n  TDataShape,\n} from './types.gen';\nexport { createConfig } from './utils.gen';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-next/base-url-false/client/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { Auth } from '../core/auth.gen';\nimport type {\n  ServerSentEventsOptions,\n  ServerSentEventsResult,\n} from '../core/serverSentEvents.gen';\nimport type { Client as CoreClient, Config as CoreConfig } from '../core/types.gen';\nimport type { Middleware } from './utils.gen';\n\nexport interface Config<T extends ClientOptions = ClientOptions>\n  extends Omit<RequestInit, 'body' | 'headers' | 'method'>, CoreConfig {\n  /**\n   * Base URL for all requests made by this client.\n   */\n  baseUrl?: T['baseUrl'];\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   * Return the response data parsed in a specified format. By default, `auto`\n   * will infer the appropriate method from the `Content-Type` response header.\n   * You can override this behavior with any of the {@link Body} methods.\n   * Select `stream` if you don't want to parse response data at all.\n   *\n   * @default 'auto'\n   */\n  parseAs?: 'arrayBuffer' | 'auto' | 'blob' | 'formData' | 'json' | 'stream' | 'text';\n  /**\n   * Throw an error instead of returning it in the response?\n   *\n   * @default false\n   */\n  throwOnError?: T['throwOnError'];\n}\n\nexport interface RequestOptions<\n  TData = unknown,\n  ThrowOnError extends boolean = boolean,\n  Url extends string = string,\n>\n  extends\n    Config<{\n      throwOnError: ThrowOnError;\n    }>,\n    Pick<\n      ServerSentEventsOptions<TData>,\n      | 'onRequest'\n      | 'onSseError'\n      | 'onSseEvent'\n      | 'sseDefaultRetryDelay'\n      | 'sseMaxRetryAttempts'\n      | 'sseMaxRetryDelay'\n    > {\n  /**\n   * Any body that you want to add to your request.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/fetch#body}\n   */\n  body?: unknown;\n  path?: Record<string, unknown>;\n  query?: Record<string, unknown>;\n  /**\n   * Security mechanism(s) to use for the request.\n   */\n  security?: ReadonlyArray<Auth>;\n  url: Url;\n}\n\nexport interface ResolvedRequestOptions<\n  ThrowOnError extends boolean = boolean,\n  Url extends string = string,\n> extends RequestOptions<unknown, ThrowOnError, Url> {\n  serializedBody?: string;\n}\n\nexport type RequestResult<\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = boolean,\n> = ThrowOnError extends true\n  ? Promise<{\n      data: TData extends Record<string, unknown> ? TData[keyof TData] : TData;\n      response: Response;\n    }>\n  : Promise<\n      (\n        | {\n            data: TData extends Record<string, unknown> ? TData[keyof TData] : TData;\n            error: undefined;\n          }\n        | {\n            data: undefined;\n            error: TError extends Record<string, unknown> ? TError[keyof TError] : TError;\n          }\n      ) & {\n        response: Response;\n      }\n    >;\n\nexport interface ClientOptions {\n  baseUrl?: string;\n  throwOnError?: boolean;\n}\n\ntype MethodFn = <TData = unknown, TError = unknown, ThrowOnError extends boolean = false>(\n  options: Omit<RequestOptions<TData, ThrowOnError>, 'method'>,\n) => RequestResult<TData, TError, ThrowOnError>;\n\ntype SseFn = <TData = unknown, TError = unknown, ThrowOnError extends boolean = false>(\n  options: Omit<RequestOptions<TData, ThrowOnError>, 'method'>,\n) => Promise<ServerSentEventsResult<TData, TError>>;\n\ntype RequestFn = <TData = unknown, TError = unknown, ThrowOnError extends boolean = false>(\n  options: Omit<RequestOptions<TData, ThrowOnError>, 'method'> &\n    Pick<Required<RequestOptions<TData, ThrowOnError>>, 'method'>,\n) => RequestResult<TData, TError, ThrowOnError>;\n\ntype BuildUrlFn = <\n  TData extends {\n    body?: unknown;\n    path?: Record<string, unknown>;\n    query?: Record<string, unknown>;\n    url: string;\n  },\n>(\n  options: TData & Options<TData>,\n) => string;\n\nexport type Client = CoreClient<RequestFn, Config, MethodFn, BuildUrlFn, SseFn> & {\n  interceptors: Middleware<Response, unknown, ResolvedRequestOptions>;\n};\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 = ClientOptions> = (\n  override?: Config<ClientOptions & T>,\n) => Config<Required<ClientOptions> & T>;\n\nexport interface TDataShape {\n  body?: unknown;\n  headers?: unknown;\n  path?: unknown;\n  query?: unknown;\n  url: string;\n}\n\ntype OmitKeys<T, K> = Pick<T, Exclude<keyof T, K>>;\n\nexport type Options<\n  TData extends TDataShape = TDataShape,\n  ThrowOnError extends boolean = boolean,\n  TResponse = unknown,\n> = OmitKeys<RequestOptions<TResponse, ThrowOnError>, 'body' | 'path' | 'query' | 'url'> &\n  ([TData] extends [never] ? unknown : Omit<TData, 'url'>);\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-next/base-url-false/client/utils.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport { getAuthToken } from '../core/auth.gen';\nimport type {\n  QuerySerializer,\n  QuerySerializerOptions,\n} from '../core/bodySerializer.gen';\nimport { jsonBodySerializer } from '../core/bodySerializer.gen';\nimport {\n  serializeArrayParam,\n  serializeObjectParam,\n  serializePrimitiveParam,\n} from '../core/pathSerializer.gen';\nimport type { Client, ClientOptions, Config, RequestOptions } from './types.gen';\n\ninterface PathSerializer {\n  path: Record<string, unknown>;\n  url: string;\n}\n\nconst PATH_PARAM_RE = /\\{[^{}]+\\}/g;\n\ntype ArrayStyle = 'form' | 'spaceDelimited' | 'pipeDelimited';\ntype MatrixStyle = 'label' | 'matrix' | 'simple';\ntype ArraySeparatorStyle = ArrayStyle | MatrixStyle;\n\nconst 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 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    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  const url = 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  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 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 || typeof header !== 'object') {\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, Options> = (\n  error: Err,\n  response: Res,\n  options: Options,\n) => Err | Promise<Err>;\n\ntype ReqInterceptor<Options> = (options: Options) => void | Promise<void>;\n\ntype ResInterceptor<Res, Options> = (response: Res, options: Options) => 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<Res, Err, Options> {\n  error: Interceptors<ErrInterceptor<Err, Res, Options>>;\n  request: Interceptors<ReqInterceptor<Options>>;\n  response: Interceptors<ResInterceptor<Res, Options>>;\n}\n\nexport const createInterceptors = <Res, Err, Options>(): Middleware<Res, Err, Options> => ({\n  error: new Interceptors<ErrInterceptor<Err, Res, Options>>(),\n  request: new Interceptors<ReqInterceptor<Options>>(),\n  response: new Interceptors<ResInterceptor<Res, 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-next/base-url-false/client.gen.ts",
    "content": "// 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>());\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-next/base-url-false/core/auth.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-next/base-url-false/core/bodySerializer.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-next/base-url-false/core/params.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-next/base-url-false/core/pathSerializer.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-next/base-url-false/core/queryKeySerializer.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\n/**\n * JSON-friendly union that mirrors what Pinia Colada can hash.\n */\nexport type JsonValue =\n  | null\n  | string\n  | number\n  | boolean\n  | JsonValue[]\n  | { [key: string]: JsonValue };\n\n/**\n * Replacer that converts non-JSON values (bigint, Date, etc.) to safe substitutes.\n */\nexport const queryKeyJsonReplacer = (_key: string, value: unknown) => {\n  if (value === undefined || typeof value === 'function' || typeof value === 'symbol') {\n    return undefined;\n  }\n  if (typeof value === 'bigint') {\n    return value.toString();\n  }\n  if (value instanceof Date) {\n    return value.toISOString();\n  }\n  return value;\n};\n\n/**\n * Safely stringifies a value and parses it back into a JsonValue.\n */\nexport const stringifyToJsonValue = (input: unknown): JsonValue | undefined => {\n  try {\n    const json = JSON.stringify(input, queryKeyJsonReplacer);\n    if (json === undefined) {\n      return undefined;\n    }\n    return JSON.parse(json) as JsonValue;\n  } catch {\n    return undefined;\n  }\n};\n\n/**\n * Detects plain objects (including objects with a null prototype).\n */\nconst isPlainObject = (value: unknown): value is Record<string, unknown> => {\n  if (value === null || typeof value !== 'object') {\n    return false;\n  }\n  const prototype = Object.getPrototypeOf(value as object);\n  return prototype === Object.prototype || prototype === null;\n};\n\n/**\n * Turns URLSearchParams into a sorted JSON object for deterministic keys.\n */\nconst serializeSearchParams = (params: URLSearchParams): JsonValue => {\n  const entries = Array.from(params.entries()).sort(([a], [b]) => a.localeCompare(b));\n  const result: Record<string, JsonValue> = {};\n\n  for (const [key, value] of entries) {\n    const existing = result[key];\n    if (existing === undefined) {\n      result[key] = value;\n      continue;\n    }\n\n    if (Array.isArray(existing)) {\n      (existing as string[]).push(value);\n    } else {\n      result[key] = [existing, value];\n    }\n  }\n\n  return result;\n};\n\n/**\n * Normalizes any accepted value into a JSON-friendly shape for query keys.\n */\nexport const serializeQueryKeyValue = (value: unknown): JsonValue | undefined => {\n  if (value === null) {\n    return null;\n  }\n\n  if (typeof value === 'string' || typeof value === 'number' || typeof value === 'boolean') {\n    return value;\n  }\n\n  if (value === undefined || typeof value === 'function' || typeof value === 'symbol') {\n    return undefined;\n  }\n\n  if (typeof value === 'bigint') {\n    return value.toString();\n  }\n\n  if (value instanceof Date) {\n    return value.toISOString();\n  }\n\n  if (Array.isArray(value)) {\n    return stringifyToJsonValue(value);\n  }\n\n  if (typeof URLSearchParams !== 'undefined' && value instanceof URLSearchParams) {\n    return serializeSearchParams(value);\n  }\n\n  if (isPlainObject(value)) {\n    return stringifyToJsonValue(value);\n  }\n\n  return undefined;\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-next/base-url-false/core/serverSentEvents.gen.ts",
    "content": "// 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 const 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            // Normalize line endings: CRLF -> LF, then CR -> LF\n            buffer = buffer.replace(/\\r\\n/g, '\\n').replace(/\\r/g, '\\n');\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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-next/base-url-false/core/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { Auth, AuthToken } from './auth.gen';\nimport type { BodySerializer, QuerySerializer, QuerySerializerOptions } from './bodySerializer.gen';\n\nexport type HttpMethod =\n  | 'connect'\n  | 'delete'\n  | 'get'\n  | 'head'\n  | 'options'\n  | 'patch'\n  | 'post'\n  | 'put'\n  | 'trace';\n\nexport type Client<\n  RequestFn = never,\n  Config = unknown,\n  MethodFn = never,\n  BuildUrlFn = never,\n  SseFn = never,\n> = {\n  /**\n   * Returns the final request URL.\n   */\n  buildUrl: BuildUrlFn;\n  getConfig: () => Config;\n  request: RequestFn;\n  setConfig: (config: Config) => Config;\n} & {\n  [K in HttpMethod]: MethodFn;\n} & ([SseFn] extends [never] ? { sse?: never } : { sse: { [K in HttpMethod]: SseFn } });\n\nexport interface Config {\n  /**\n   * Auth token or a function returning auth token. The resolved value will be\n   * added to the request payload as defined by its `security` array.\n   */\n  auth?: ((auth: Auth) => Promise<AuthToken> | AuthToken) | AuthToken;\n  /**\n   * A function for serializing request body parameter. By default,\n   * {@link JSON.stringify()} will be used.\n   */\n  bodySerializer?: BodySerializer | null;\n  /**\n   * An object containing any HTTP headers that you want to pre-populate your\n   * `Headers` object with.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/Headers/Headers#init See more}\n   */\n  headers?:\n    | RequestInit['headers']\n    | Record<\n        string,\n        string | number | boolean | (string | number | boolean)[] | null | undefined | unknown\n      >;\n  /**\n   * The request method.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/fetch#method See more}\n   */\n  method?: Uppercase<HttpMethod>;\n  /**\n   * A function for serializing request query parameters. By default, arrays\n   * will be exploded in form style, objects will be exploded in deepObject\n   * style, and reserved characters are percent-encoded.\n   *\n   * This method will have no effect if the native `paramsSerializer()` Axios\n   * API function is used.\n   *\n   * {@link https://swagger.io/docs/specification/serialization/#query View examples}\n   */\n  querySerializer?: QuerySerializer | QuerySerializerOptions;\n  /**\n   * A function validating request data. This is useful if you want to ensure\n   * the request conforms to the desired shape, so it can be safely sent to\n   * the server.\n   */\n  requestValidator?: (data: unknown) => Promise<unknown>;\n  /**\n   * A function transforming response data before it's returned. This is useful\n   * for post-processing data, e.g. converting ISO strings into Date objects.\n   */\n  responseTransformer?: (data: unknown) => Promise<unknown>;\n  /**\n   * A function validating response data. This is useful if you want to ensure\n   * the response conforms to the desired shape, so it can be safely passed to\n   * the transformers and returned to the user.\n   */\n  responseValidator?: (data: unknown) => Promise<unknown>;\n}\n\ntype IsExactlyNeverOrNeverUndefined<T> = [T] extends [never]\n  ? true\n  : [T] extends [never | undefined]\n    ? [undefined] extends [T]\n      ? false\n      : true\n    : false;\n\nexport type OmitNever<T extends Record<string, unknown>> = {\n  [K in keyof T as IsExactlyNeverOrNeverUndefined<T[K]> extends true ? never : K]: T[K];\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-next/base-url-false/core/utils.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-next/base-url-false/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type { _3eNum1Период, _400, AdditionalPropertiesIntegerIssue, AdditionalPropertiesUnknownIssue, AdditionalPropertiesUnknownIssue2, AdditionalPropertiesUnknownIssue3, AdditionalPropertiesUnknownIssueWritable, AnyOfAnyAndNull, AnyOfArrays, ApiVVersionODataControllerCountData, ApiVVersionODataControllerCountResponse, ApiVVersionODataControllerCountResponses, ArrayWithAnyOfProperties, ArrayWithArray, ArrayWithBooleans, ArrayWithNumbers, ArrayWithProperties, ArrayWithReferences, ArrayWithStrings, CallToTestOrderOfParamsData, CallWithDefaultOptionalParametersData, CallWithDefaultParametersData, CallWithDescriptionsData, CallWithDuplicateResponsesData, CallWithDuplicateResponsesError, CallWithDuplicateResponsesErrors, CallWithDuplicateResponsesResponse, CallWithDuplicateResponsesResponses, CallWithNoContentResponseData, CallWithNoContentResponseResponse, CallWithNoContentResponseResponses, CallWithParametersData, CallWithResponseAndNoContentResponseData, CallWithResponseAndNoContentResponseResponse, CallWithResponseAndNoContentResponseResponses, CallWithResponseData, CallWithResponseResponse, CallWithResponseResponses, CallWithResponsesData, CallWithResponsesError, CallWithResponsesErrors, CallWithResponsesResponse, CallWithResponsesResponses, CallWithResultFromHeaderData, CallWithResultFromHeaderErrors, CallWithResultFromHeaderResponses, CallWithWeirdParameterNamesData, CamelCaseCommentWithBreaks, CharactersInDescription, ClientOptions, CollectionFormatData, CommentWithBackticks, CommentWithBackticksAndQuotes, CommentWithBreaks, CommentWithExpressionPlaceholders, CommentWithQuotes, CommentWithReservedCharacters, CommentWithSlashes, ComplexParamsData, ComplexParamsResponse, ComplexParamsResponses, ComplexTypesData, ComplexTypesErrors, ComplexTypesResponse, ComplexTypesResponses, CompositionBaseModel, CompositionExtendedModel, CompositionWithAllOfAndNullable, CompositionWithAnyOf, CompositionWithAnyOfAndNullable, CompositionWithAnyOfAnonymous, CompositionWithNestedAnyAndTypeNull, CompositionWithNestedAnyOfAndNull, CompositionWithOneOf, CompositionWithOneOfAndComplexArrayDictionary, CompositionWithOneOfAndNullable, CompositionWithOneOfAndProperties, CompositionWithOneOfAndSimpleArrayDictionary, CompositionWithOneOfAndSimpleDictionary, CompositionWithOneOfAnonymous, CompositionWithOneOfDiscriminator, ConstValue, Default, DeleteCallWithoutParametersAndResponseData, DeleteFooData, DeleteFooData2, DeleteFooData3, DeprecatedCallData, DeprecatedModel, DictionaryWithArray, DictionaryWithDictionary, DictionaryWithProperties, DictionaryWithPropertiesAndAdditionalProperties, DictionaryWithReference, DictionaryWithString, DummyAData, DummyAResponse, DummyAResponses, DummyBData, DummyBResponse, DummyBResponses, DuplicateName2Data, DuplicateName3Data, DuplicateName4Data, DuplicateNameData, EnumFromDescription, EnumWithExtensions, EnumWithNumbers, EnumWithReplacedCharacters, EnumWithStrings, EnumWithXEnumNames, ExportData, ExternalRefA, ExternalRefB, ExternalSharedModel, File, FileResponseData, FileResponseResponse, FileResponseResponses, FileWritable, FooWowData, FooWowResponses, FreeFormObjectWithAdditionalPropertiesEqEmptyObject, FreeFormObjectWithAdditionalPropertiesEqTrue, FreeFormObjectWithoutAdditionalProperties, GenericSchemaDuplicateIssue1SystemBoolean, GenericSchemaDuplicateIssue1SystemBooleanWritable, GenericSchemaDuplicateIssue1SystemString, GenericSchemaDuplicateIssue1SystemStringWritable, GetApiVbyApiVersionSimpleOperationData, GetApiVbyApiVersionSimpleOperationError, GetApiVbyApiVersionSimpleOperationErrors, GetApiVbyApiVersionSimpleOperationResponse, GetApiVbyApiVersionSimpleOperationResponses, GetCallWithOptionalParamData, GetCallWithoutParametersAndResponseData, HeadCallWithoutParametersAndResponseData, Import, ImportData, ImportResponse, ImportResponses, IoK8sApimachineryPkgApisMetaV1DeleteOptions, IoK8sApimachineryPkgApisMetaV1Preconditions, ModelCircle, ModelFromZendesk, ModelSquare, ModelThatExtends, ModelThatExtendsExtends, ModelWithAdditionalPropertiesEqTrue, ModelWithAdditionalPropertiesRef, ModelWithAnyOfConstantSizeArray, ModelWithAnyOfConstantSizeArrayAndIntersect, ModelWithAnyOfConstantSizeArrayNullable, ModelWithAnyOfConstantSizeArrayWithNSizeAndOptions, ModelWithAnyOfConstantSizeArrayWithNSizeAndOptionsWritable, ModelWithArray, ModelWithArrayReadOnlyAndWriteOnly, ModelWithArrayReadOnlyAndWriteOnlyWritable, ModelWithBackticksInDescription, ModelWithBoolean, ModelWithCircularReference, ModelWithConst, ModelWithConstantSizeArray, ModelWithDictionary, ModelWithDuplicateImports, ModelWithDuplicateProperties, ModelWithEnum, ModelWithEnumFromDescription, ModelWithEnumWithHyphen, ModelWithInteger, ModelWithNestedArrayEnums, ModelWithNestedArrayEnumsData, ModelWithNestedArrayEnumsDataBar, ModelWithNestedArrayEnumsDataFoo, ModelWithNestedCompositionEnums, ModelWithNestedEnums, ModelWithNestedProperties, ModelWithNullableObject, ModelWithNullableString, ModelWithNumericEnumUnion, ModelWithOneOfAndProperties, ModelWithOneOfEnum, ModelWithOrderedProperties, ModelWithPattern, ModelWithPatternWritable, ModelWithPrefixItemsConstantSizeArray, ModelWithProperties, ModelWithPropertiesWritable, ModelWithReadOnlyAndWriteOnly, ModelWithReadOnlyAndWriteOnlyWritable, ModelWithReference, ModelWithReferenceWritable, ModelWithString, ModelWithStringError, MultipartRequestData, MultipartResponseData, MultipartResponseResponse, MultipartResponseResponses, NestedAnyOfArraysNullable, NonAsciiæøåÆøÅöôêÊ字符串Data, NonAsciiæøåÆøÅöôêÊ字符串Response, NonAsciiæøåÆøÅöôêÊ字符串Responses, NonAsciiStringæøåÆøÅöôêÊ字符串, NullableObject, OneOfAllOfIssue, OneOfAllOfIssueWritable, OptionsCallWithoutParametersAndResponseData, Pageable, ParameterSimpleParameterUnused, PatchApiVbyApiVersionNoTagData, PatchApiVbyApiVersionNoTagResponses, PatchCallWithoutParametersAndResponseData, PostApiVbyApiVersionFormDataData, PostApiVbyApiVersionRequestBodyData, PostCallWithOptionalParamData, PostCallWithOptionalParamResponse, PostCallWithOptionalParamResponses, PostCallWithoutParametersAndResponseData, PostServiceWithEmptyTagResponse, PostServiceWithEmptyTagResponse2, PutCallWithoutParametersAndResponseData, PutWithFormUrlEncodedData, SchemaWithFormRestrictedKeys, SimpleBoolean, SimpleFile, SimpleFormData, SimpleInteger, SimpleParameter, SimpleReference, SimpleRequestBody, SimpleString, SimpleStringWithPattern, TestErrorCodeData, TestErrorCodeErrors, TestErrorCodeResponses, TypesData, TypesResponse, TypesResponses, UploadFileData, UploadFileResponse, UploadFileResponses, XFooBar } from './types.gen';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-next/base-url-false/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type ClientOptions = {\n    baseUrl: 'http://localhost:3000/base' | (string & {});\n};\n\n/**\n * Model with number-only name\n */\nexport type _400 = string;\n\n/**\n * External ref to shared model (A)\n */\nexport type ExternalRefA = ExternalSharedModel;\n\n/**\n * External ref to shared model (B)\n */\nexport type ExternalRefB = ExternalSharedModel;\n\n/**\n * Testing multiline comments in string: First line\n * Second line\n *\n * Fourth line\n */\nexport type CamelCaseCommentWithBreaks = number;\n\n/**\n * Testing multiline comments in string: First line\n * Second line\n *\n * Fourth line\n */\nexport type CommentWithBreaks = number;\n\n/**\n * Testing backticks in string: `backticks` and ```multiple backticks``` should work\n */\nexport type CommentWithBackticks = number;\n\n/**\n * Testing backticks and quotes in string: `backticks`, 'quotes', \"double quotes\" and ```multiple backticks``` should work\n */\nexport type CommentWithBackticksAndQuotes = number;\n\n/**\n * Testing slashes in string: \\backwards\\\\\\ and /forwards/// should work\n */\nexport type CommentWithSlashes = number;\n\n/**\n * Testing expression placeholders in string: ${expression} should work\n */\nexport type CommentWithExpressionPlaceholders = number;\n\n/**\n * Testing quotes in string: 'single quote''' and \"double quotes\"\"\" should work\n */\nexport type CommentWithQuotes = number;\n\n/**\n * Testing reserved characters in string: * inline * and ** inline ** should work\n */\nexport type CommentWithReservedCharacters = number;\n\n/**\n * This is a simple number\n */\nexport type SimpleInteger = number;\n\n/**\n * This is a simple boolean\n */\nexport type SimpleBoolean = boolean;\n\n/**\n * This is a simple string\n */\nexport type SimpleString = string;\n\n/**\n * A string with non-ascii (unicode) characters valid in typescript identifiers (æøåÆØÅöÔèÈ字符串)\n */\nexport type NonAsciiStringæøåÆøÅöôêÊ字符串 = string;\n\n/**\n * This is a simple file\n */\nexport type SimpleFile = Blob | File;\n\n/**\n * This is a simple reference\n */\nexport type SimpleReference = ModelWithString;\n\n/**\n * This is a simple string\n */\nexport type SimpleStringWithPattern = string | null;\n\n/**\n * This is a simple enum with strings\n */\nexport type EnumWithStrings = 'Success' | 'Warning' | 'Error' | '\\'Single Quote\\'' | '\"Double Quotes\"' | 'Non-ascii: øæåôöØÆÅÔÖ字符串';\n\nexport type EnumWithReplacedCharacters = '\\'Single Quote\\'' | '\"Double Quotes\"' | 'øæåôöØÆÅÔÖ字符串' | 3.1 | '';\n\n/**\n * This is a simple enum with numbers\n */\nexport type EnumWithNumbers = 1 | 2 | 3 | 1.1 | 1.2 | 1.3 | 100 | 200 | 300 | -100 | -200 | -300 | -1.1 | -1.2 | -1.3;\n\n/**\n * Success=1,Warning=2,Error=3\n */\nexport type EnumFromDescription = number;\n\n/**\n * This is a simple enum with numbers\n */\nexport type EnumWithExtensions = 200 | 400 | 500;\n\nexport type EnumWithXEnumNames = 0 | 1 | 2;\n\n/**\n * This is a simple array with numbers\n */\nexport type ArrayWithNumbers = Array<number>;\n\n/**\n * This is a simple array with booleans\n */\nexport type ArrayWithBooleans = Array<boolean>;\n\n/**\n * This is a simple array with strings\n */\nexport type ArrayWithStrings = Array<string>;\n\n/**\n * This is a simple array with references\n */\nexport type ArrayWithReferences = Array<ModelWithString>;\n\n/**\n * This is a simple array containing an array\n */\nexport type ArrayWithArray = Array<Array<ModelWithString>>;\n\n/**\n * This is a simple array with properties\n */\nexport type ArrayWithProperties = Array<{\n    '16x16'?: CamelCaseCommentWithBreaks;\n    bar?: string;\n}>;\n\n/**\n * This is a simple array with any of properties\n */\nexport type ArrayWithAnyOfProperties = Array<{\n    foo?: string;\n} | {\n    bar?: string;\n}>;\n\nexport type AnyOfAnyAndNull = {\n    data?: unknown | null;\n};\n\n/**\n * This is a simple array with any of properties\n */\nexport type AnyOfArrays = {\n    results?: Array<{\n        foo?: string;\n    } | {\n        bar?: string;\n    }>;\n};\n\n/**\n * This is a string dictionary\n */\nexport type DictionaryWithString = {\n    [key: string]: string;\n};\n\nexport type DictionaryWithPropertiesAndAdditionalProperties = {\n    foo?: number;\n    bar?: boolean;\n    [key: string]: string | number | boolean | undefined;\n};\n\n/**\n * This is a string reference\n */\nexport type DictionaryWithReference = {\n    [key: string]: ModelWithString;\n};\n\n/**\n * This is a complex dictionary\n */\nexport type DictionaryWithArray = {\n    [key: string]: Array<ModelWithString>;\n};\n\n/**\n * This is a string dictionary\n */\nexport type DictionaryWithDictionary = {\n    [key: string]: {\n        [key: string]: string;\n    };\n};\n\n/**\n * This is a complex dictionary\n */\nexport type DictionaryWithProperties = {\n    [key: string]: {\n        foo?: string;\n        bar?: string;\n    };\n};\n\n/**\n * This is a model with one number property\n */\nexport type ModelWithInteger = {\n    /**\n     * This is a simple number property\n     */\n    prop?: number;\n};\n\n/**\n * This is a model with one boolean property\n */\nexport type ModelWithBoolean = {\n    /**\n     * This is a simple boolean property\n     */\n    prop?: boolean;\n};\n\n/**\n * This is a model with one string property\n */\nexport type ModelWithString = {\n    /**\n     * This is a simple string property\n     */\n    prop?: string;\n};\n\n/**\n * This is a model with one string property\n */\nexport type ModelWithStringError = {\n    /**\n     * This is a simple string property\n     */\n    prop?: string;\n};\n\n/**\n * `Comment` or `VoiceComment`. The JSON object for adding voice comments to tickets is different. See [Adding voice comments to tickets](/documentation/ticketing/managing-tickets/adding-voice-comments-to-tickets)\n */\nexport type ModelFromZendesk = string;\n\n/**\n * This is a model with one string property\n */\nexport type ModelWithNullableString = {\n    /**\n     * This is a simple string property\n     */\n    nullableProp1?: string | null;\n    /**\n     * This is a simple string property\n     */\n    nullableRequiredProp1: string | null;\n    /**\n     * This is a simple string property\n     */\n    nullableProp2?: string | null;\n    /**\n     * This is a simple string property\n     */\n    nullableRequiredProp2: string | null;\n    /**\n     * This is a simple enum with strings\n     */\n    'foo_bar-enum'?: 'Success' | 'Warning' | 'Error' | 'ØÆÅ字符串';\n};\n\n/**\n * This is a model with one enum\n */\nexport type ModelWithEnum = {\n    /**\n     * This is a simple enum with strings\n     */\n    'foo_bar-enum'?: 'Success' | 'Warning' | 'Error' | 'ØÆÅ字符串';\n    /**\n     * These are the HTTP error code enums\n     */\n    statusCode?: '100' | '200 FOO' | '300 FOO_BAR' | '400 foo-bar' | '500 foo.bar' | '600 foo&bar';\n    /**\n     * Simple boolean enum\n     */\n    bool?: true;\n};\n\n/**\n * This is a model with one enum with escaped name\n */\nexport type ModelWithEnumWithHyphen = {\n    /**\n     * Foo-Bar-Baz-Qux\n     */\n    'foo-bar-baz-qux'?: '3.0';\n};\n\n/**\n * This is a model with one enum\n */\nexport type ModelWithEnumFromDescription = {\n    /**\n     * Success=1,Warning=2,Error=3\n     */\n    test?: number;\n};\n\n/**\n * This is a model with nested enums\n */\nexport type ModelWithNestedEnums = {\n    dictionaryWithEnum?: {\n        [key: string]: 'Success' | 'Warning' | 'Error';\n    };\n    dictionaryWithEnumFromDescription?: {\n        [key: string]: number;\n    };\n    arrayWithEnum?: Array<'Success' | 'Warning' | 'Error'>;\n    arrayWithDescription?: Array<number>;\n    /**\n     * This is a simple enum with strings\n     */\n    'foo_bar-enum'?: 'Success' | 'Warning' | 'Error' | 'ØÆÅ字符串';\n};\n\n/**\n * This is a model with one property containing a reference\n */\nexport type ModelWithReference = {\n    prop?: ModelWithProperties;\n};\n\n/**\n * This is a model with one property containing an array\n */\nexport type ModelWithArrayReadOnlyAndWriteOnly = {\n    prop?: Array<ModelWithReadOnlyAndWriteOnly>;\n    propWithFile?: Array<Blob | File>;\n    propWithNumber?: Array<number>;\n};\n\n/**\n * This is a model with one property containing an array\n */\nexport type ModelWithArray = {\n    prop?: Array<ModelWithString>;\n    propWithFile?: Array<Blob | File>;\n    propWithNumber?: Array<number>;\n};\n\n/**\n * This is a model with one property containing a dictionary\n */\nexport type ModelWithDictionary = {\n    prop?: {\n        [key: string]: string;\n    };\n};\n\n/**\n * This is a deprecated model with a deprecated property\n *\n * @deprecated\n */\nexport type DeprecatedModel = {\n    /**\n     * This is a deprecated property\n     *\n     * @deprecated\n     */\n    prop?: string;\n};\n\n/**\n * This is a model with one property containing a circular reference\n */\nexport type ModelWithCircularReference = {\n    prop?: ModelWithCircularReference;\n};\n\n/**\n * This is a model with one property with a 'one of' relationship\n */\nexport type CompositionWithOneOf = {\n    propA?: ModelWithString | ModelWithEnum | ModelWithArray | ModelWithDictionary;\n};\n\n/**\n * This is a model with one property with a 'one of' relationship where the options are not $ref\n */\nexport type CompositionWithOneOfAnonymous = {\n    propA?: {\n        propA?: string;\n    } | string | number;\n};\n\n/**\n * Circle\n */\nexport type ModelCircle = {\n    kind: string;\n    radius?: number;\n};\n\n/**\n * Square\n */\nexport type ModelSquare = {\n    kind: string;\n    sideLength?: number;\n};\n\n/**\n * This is a model with one property with a 'one of' relationship where the options are not $ref\n */\nexport type CompositionWithOneOfDiscriminator = ({\n    kind: 'circle';\n} & ModelCircle) | ({\n    kind: 'square';\n} & ModelSquare);\n\n/**\n * This is a model with one property with a 'any of' relationship\n */\nexport type CompositionWithAnyOf = {\n    propA?: ModelWithString | ModelWithEnum | ModelWithArray | ModelWithDictionary;\n};\n\n/**\n * This is a model with one property with a 'any of' relationship where the options are not $ref\n */\nexport type CompositionWithAnyOfAnonymous = {\n    propA?: {\n        propA?: string;\n    } | string | number;\n};\n\n/**\n * This is a model with nested 'any of' property with a type null\n */\nexport type CompositionWithNestedAnyAndTypeNull = {\n    propA?: Array<ModelWithDictionary | null> | Array<ModelWithArray | null>;\n};\n\nexport type _3eNum1Период = 'Bird' | 'Dog';\n\nexport type ConstValue = 'ConstValue';\n\n/**\n * This is a model with one property with a 'any of' relationship where the options are not $ref\n */\nexport type CompositionWithNestedAnyOfAndNull = {\n    /**\n     * Scopes\n     */\n    propA?: Array<_3eNum1Период | ConstValue> | null;\n};\n\n/**\n * This is a model with one property with a 'one of' relationship\n */\nexport type CompositionWithOneOfAndNullable = {\n    propA?: {\n        boolean?: boolean;\n    } | ModelWithEnum | ModelWithArray | ModelWithDictionary | null;\n};\n\n/**\n * This is a model that contains a simple dictionary within composition\n */\nexport type CompositionWithOneOfAndSimpleDictionary = {\n    propA?: boolean | {\n        [key: string]: number;\n    };\n};\n\n/**\n * This is a model that contains a dictionary of simple arrays within composition\n */\nexport type CompositionWithOneOfAndSimpleArrayDictionary = {\n    propA?: boolean | {\n        [key: string]: Array<boolean>;\n    };\n};\n\n/**\n * This is a model that contains a dictionary of complex arrays (composited) within composition\n */\nexport type CompositionWithOneOfAndComplexArrayDictionary = {\n    propA?: boolean | {\n        [key: string]: Array<number | string>;\n    };\n};\n\n/**\n * This is a model with one property with a 'all of' relationship\n */\nexport type CompositionWithAllOfAndNullable = {\n    propA?: ({\n        boolean?: boolean;\n    } & ModelWithEnum & ModelWithArray & ModelWithDictionary) | null;\n};\n\n/**\n * This is a model with one property with a 'any of' relationship\n */\nexport type CompositionWithAnyOfAndNullable = {\n    propA?: {\n        boolean?: boolean;\n    } | ModelWithEnum | ModelWithArray | ModelWithDictionary | null;\n};\n\n/**\n * This is a base model with two simple optional properties\n */\nexport type CompositionBaseModel = {\n    firstName?: string;\n    lastname?: string;\n};\n\n/**\n * This is a model that extends the base model\n */\nexport type CompositionExtendedModel = CompositionBaseModel & {\n    age: number;\n    firstName: string;\n    lastname: string;\n};\n\n/**\n * This is a model with one nested property\n */\nexport type ModelWithProperties = {\n    required: string;\n    readonly requiredAndReadOnly: string;\n    requiredAndNullable: string | null;\n    string?: string;\n    number?: number;\n    boolean?: boolean;\n    reference?: ModelWithString;\n    'property with space'?: string;\n    default?: string;\n    try?: string;\n    readonly '@namespace.string'?: string;\n    readonly '@namespace.integer'?: number;\n};\n\n/**\n * This is a model with one nested property\n */\nexport type ModelWithNestedProperties = {\n    readonly first: {\n        readonly second: {\n            readonly third: string | null;\n        } | null;\n    } | null;\n};\n\n/**\n * This is a model with duplicated properties\n */\nexport type ModelWithDuplicateProperties = {\n    prop?: ModelWithString;\n};\n\n/**\n * This is a model with ordered properties\n */\nexport type ModelWithOrderedProperties = {\n    zebra?: string;\n    apple?: string;\n    hawaii?: string;\n};\n\n/**\n * This is a model with duplicated imports\n */\nexport type ModelWithDuplicateImports = {\n    propA?: ModelWithString;\n    propB?: ModelWithString;\n    propC?: ModelWithString;\n};\n\n/**\n * This is a model that extends another model\n */\nexport type ModelThatExtends = ModelWithString & {\n    propExtendsA?: string;\n    propExtendsB?: ModelWithString;\n};\n\n/**\n * This is a model that extends another model\n */\nexport type ModelThatExtendsExtends = ModelWithString & ModelThatExtends & {\n    propExtendsC?: string;\n    propExtendsD?: ModelWithString;\n};\n\n/**\n * This is a model that contains a some patterns\n */\nexport type ModelWithPattern = {\n    key: string;\n    name: string;\n    readonly enabled?: boolean;\n    readonly modified?: string;\n    id?: string;\n    text?: string;\n    patternWithSingleQuotes?: string;\n    patternWithNewline?: string;\n    patternWithBacktick?: string;\n    patternWithUnicode?: string;\n};\n\nexport type File = {\n    /**\n     * Id\n     */\n    readonly id?: string;\n    /**\n     * Updated at\n     */\n    readonly updated_at?: string;\n    /**\n     * Created at\n     */\n    readonly created_at?: string;\n    /**\n     * Mime\n     */\n    mime: string;\n    /**\n     * File\n     */\n    readonly file?: string;\n};\n\nexport type Default = {\n    name?: string;\n};\n\nexport type Pageable = {\n    page?: number;\n    size?: number;\n    sort?: Array<string>;\n};\n\n/**\n * This is a free-form object without additionalProperties.\n */\nexport type FreeFormObjectWithoutAdditionalProperties = {\n    [key: string]: unknown;\n};\n\n/**\n * This is a free-form object with additionalProperties: true.\n */\nexport type FreeFormObjectWithAdditionalPropertiesEqTrue = {\n    [key: string]: unknown;\n};\n\n/**\n * This is a free-form object with additionalProperties: {}.\n */\nexport type FreeFormObjectWithAdditionalPropertiesEqEmptyObject = {\n    [key: string]: unknown;\n};\n\nexport type ModelWithConst = {\n    String?: 'String';\n    number?: 0;\n    null?: null;\n    withType?: 'Some string';\n};\n\n/**\n * This is a model with one property and additionalProperties: true\n */\nexport type ModelWithAdditionalPropertiesEqTrue = {\n    /**\n     * This is a simple string property\n     */\n    prop?: string;\n    [key: string]: unknown;\n};\n\nexport type NestedAnyOfArraysNullable = {\n    nullableArray?: Array<string | boolean> | null;\n};\n\nexport type CompositionWithOneOfAndProperties = ({\n    foo: SimpleParameter;\n} | {\n    bar: NonAsciiStringæøåÆøÅöôêÊ字符串;\n}) & {\n    baz: number | null;\n    qux: number;\n};\n\n/**\n * An object that can be null\n */\nexport type NullableObject = {\n    foo?: string;\n} | null;\n\n/**\n * Some % character\n */\nexport type CharactersInDescription = string;\n\nexport type ModelWithNullableObject = {\n    data?: NullableObject;\n};\n\n/**\n * An object with additional properties that can be null (anyOf ref + null)\n */\nexport type ModelWithAdditionalPropertiesRef = {\n    [key: string]: NullableObject | null;\n};\n\nexport type ModelWithOneOfEnum = {\n    foo: 'Bar';\n} | {\n    foo: 'Baz';\n} | {\n    foo: 'Qux';\n} | {\n    content: string;\n    foo: 'Quux';\n} | {\n    content: [\n        string,\n        string\n    ];\n    foo: 'Corge';\n};\n\nexport type ModelWithNestedArrayEnumsDataFoo = 'foo' | 'bar';\n\nexport type ModelWithNestedArrayEnumsDataBar = 'baz' | 'qux';\n\nexport type ModelWithNestedArrayEnumsData = {\n    foo?: Array<ModelWithNestedArrayEnumsDataFoo>;\n    bar?: Array<ModelWithNestedArrayEnumsDataBar>;\n};\n\nexport type ModelWithNestedArrayEnums = {\n    array_strings?: Array<string>;\n    data?: ModelWithNestedArrayEnumsData;\n};\n\nexport type ModelWithNestedCompositionEnums = {\n    foo?: ModelWithNestedArrayEnumsDataFoo;\n};\n\nexport type ModelWithReadOnlyAndWriteOnly = {\n    foo: string;\n    readonly bar: string;\n};\n\nexport type ModelWithConstantSizeArray = [\n    number,\n    number\n];\n\nexport type ModelWithAnyOfConstantSizeArray = [\n    number | string,\n    number | string,\n    number | string\n];\n\nexport type ModelWithPrefixItemsConstantSizeArray = [\n    ModelWithInteger,\n    number | string,\n    string\n];\n\nexport type ModelWithAnyOfConstantSizeArrayNullable = [\n    number | null | string,\n    number | null | string,\n    number | null | string\n];\n\nexport type ModelWithAnyOfConstantSizeArrayWithNSizeAndOptions = [\n    number | Import,\n    number | Import\n];\n\nexport type ModelWithAnyOfConstantSizeArrayAndIntersect = [\n    number & string,\n    number & string\n];\n\nexport type ModelWithNumericEnumUnion = {\n    /**\n     * Период\n     */\n    value?: -10 | -1 | 0 | 1 | 3 | 6 | 12;\n};\n\n/**\n * Some description with `back ticks`\n */\nexport type ModelWithBackticksInDescription = {\n    /**\n     * The template `that` should be used for parsing and importing the contents of the CSV file.\n     *\n     * <br/><p>There is one placeholder currently supported:<ul>     <li><b>${x}</b> - refers to the n-th column in the CSV file, e.g. ${1}, ${2}, ...)</li></ul><p>Example of a correct JSON template:</p>\n     * <pre>\n     * [\n     * {\n     * \"resourceType\": \"Asset\",\n     * \"identifier\": {\n     * \"name\": \"${1}\",\n     * \"domain\": {\n     * \"name\": \"${2}\",\n     * \"community\": {\n     * \"name\": \"Some Community\"\n     * }\n     * }\n     * },\n     * \"attributes\" : {\n     * \"00000000-0000-0000-0000-000000003115\" : [ {\n     * \"value\" : \"${3}\"\n     * } ],\n     * \"00000000-0000-0000-0000-000000000222\" : [ {\n     * \"value\" : \"${4}\"\n     * } ]\n     * }\n     * }\n     * ]\n     * </pre>\n     */\n    template?: string;\n};\n\nexport type ModelWithOneOfAndProperties = (SimpleParameter | NonAsciiStringæøåÆøÅöôêÊ字符串) & {\n    baz: number | null;\n    qux: number;\n};\n\n/**\n * Model used to test deduplication strategy (unused)\n */\nexport type ParameterSimpleParameterUnused = string;\n\n/**\n * Model used to test deduplication strategy\n */\nexport type PostServiceWithEmptyTagResponse = string;\n\n/**\n * Model used to test deduplication strategy\n */\nexport type PostServiceWithEmptyTagResponse2 = string;\n\n/**\n * Model used to test deduplication strategy\n */\nexport type DeleteFooData = string;\n\n/**\n * Model used to test deduplication strategy\n */\nexport type DeleteFooData2 = string;\n\n/**\n * Model with restricted keyword name\n */\nexport type Import = string;\n\nexport type SchemaWithFormRestrictedKeys = {\n    description?: string;\n    'x-enum-descriptions'?: string;\n    'x-enum-varnames'?: string;\n    'x-enumNames'?: string;\n    title?: string;\n    object?: {\n        description?: string;\n        'x-enum-descriptions'?: string;\n        'x-enum-varnames'?: string;\n        'x-enumNames'?: string;\n        title?: string;\n    };\n    array?: Array<{\n        description?: string;\n        'x-enum-descriptions'?: string;\n        'x-enum-varnames'?: string;\n        'x-enumNames'?: string;\n        title?: string;\n    }>;\n};\n\n/**\n * This schema was giving PascalCase transformations a hard time\n */\nexport type IoK8sApimachineryPkgApisMetaV1DeleteOptions = {\n    /**\n     * Must be fulfilled before a deletion is carried out. If not possible, a 409 Conflict status will be returned.\n     */\n    preconditions?: IoK8sApimachineryPkgApisMetaV1Preconditions;\n};\n\n/**\n * This schema was giving PascalCase transformations a hard time\n */\nexport type IoK8sApimachineryPkgApisMetaV1Preconditions = {\n    /**\n     * Specifies the target ResourceVersion\n     */\n    resourceVersion?: string;\n    /**\n     * Specifies the target UID.\n     */\n    uid?: string;\n};\n\nexport type AdditionalPropertiesUnknownIssue = {\n    [key: string]: string | number;\n};\n\nexport type AdditionalPropertiesUnknownIssue2 = {\n    [key: string]: string | number;\n};\n\nexport type AdditionalPropertiesUnknownIssue3 = string & {\n    entries: {\n        [key: string]: AdditionalPropertiesUnknownIssue;\n    };\n};\n\nexport type AdditionalPropertiesIntegerIssue = {\n    value: number;\n    [key: string]: number;\n};\n\nexport type OneOfAllOfIssue = ((ConstValue | GenericSchemaDuplicateIssue1SystemBoolean) & _3eNum1Период) | GenericSchemaDuplicateIssue1SystemString;\n\nexport type GenericSchemaDuplicateIssue1SystemBoolean = {\n    item?: boolean;\n    error?: string | null;\n    readonly hasError?: boolean;\n    data?: {\n        [key: string]: never;\n    };\n};\n\nexport type GenericSchemaDuplicateIssue1SystemString = {\n    item?: string | null;\n    error?: string | null;\n    readonly hasError?: boolean;\n};\n\nexport type ExternalSharedModel = {\n    id: string;\n    name?: string;\n};\n\n/**\n * This is a model with one property containing a reference\n */\nexport type ModelWithReferenceWritable = {\n    prop?: ModelWithPropertiesWritable;\n};\n\n/**\n * This is a model with one property containing an array\n */\nexport type ModelWithArrayReadOnlyAndWriteOnlyWritable = {\n    prop?: Array<ModelWithReadOnlyAndWriteOnlyWritable>;\n    propWithFile?: Array<Blob | File>;\n    propWithNumber?: Array<number>;\n};\n\n/**\n * This is a model with one nested property\n */\nexport type ModelWithPropertiesWritable = {\n    required: string;\n    requiredAndNullable: string | null;\n    string?: string;\n    number?: number;\n    boolean?: boolean;\n    reference?: ModelWithString;\n    'property with space'?: string;\n    default?: string;\n    try?: string;\n};\n\n/**\n * This is a model that contains a some patterns\n */\nexport type ModelWithPatternWritable = {\n    key: string;\n    name: string;\n    id?: string;\n    text?: string;\n    patternWithSingleQuotes?: string;\n    patternWithNewline?: string;\n    patternWithBacktick?: string;\n    patternWithUnicode?: string;\n};\n\nexport type FileWritable = {\n    /**\n     * Mime\n     */\n    mime: string;\n};\n\nexport type ModelWithReadOnlyAndWriteOnlyWritable = {\n    foo: string;\n    baz: string;\n};\n\nexport type ModelWithAnyOfConstantSizeArrayWithNSizeAndOptionsWritable = [\n    number | Import,\n    number | Import\n];\n\nexport type AdditionalPropertiesUnknownIssueWritable = {\n    [key: string]: string | number;\n};\n\nexport type OneOfAllOfIssueWritable = ((ConstValue | GenericSchemaDuplicateIssue1SystemBoolean) & _3eNum1Период) | GenericSchemaDuplicateIssue1SystemString;\n\nexport type GenericSchemaDuplicateIssue1SystemBooleanWritable = {\n    item?: boolean;\n    error?: string | null;\n    data?: {\n        [key: string]: never;\n    };\n};\n\nexport type GenericSchemaDuplicateIssue1SystemStringWritable = {\n    item?: string | null;\n    error?: string | null;\n};\n\n/**\n * This is a reusable parameter\n */\nexport type SimpleParameter = string;\n\n/**\n * Parameter with illegal characters\n */\nexport type XFooBar = ModelWithString;\n\n/**\n * A reusable request body\n */\nexport type SimpleRequestBody = ModelWithString;\n\n/**\n * A reusable request body\n */\nexport type SimpleFormData = ModelWithString;\n\nexport type ExportData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no+tag';\n};\n\nexport type PatchApiVbyApiVersionNoTagData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no+tag';\n};\n\nexport type PatchApiVbyApiVersionNoTagResponses = {\n    /**\n     * OK\n     */\n    default: unknown;\n};\n\nexport type ImportData = {\n    body: ModelWithReadOnlyAndWriteOnlyWritable | ModelWithArrayReadOnlyAndWriteOnlyWritable;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no+tag';\n};\n\nexport type ImportResponses = {\n    /**\n     * Success\n     */\n    200: ModelFromZendesk;\n    /**\n     * Default success response\n     */\n    default: ModelWithReadOnlyAndWriteOnly;\n};\n\nexport type ImportResponse = ImportResponses[keyof ImportResponses];\n\nexport type FooWowData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no+tag';\n};\n\nexport type FooWowResponses = {\n    /**\n     * OK\n     */\n    default: unknown;\n};\n\nexport type ApiVVersionODataControllerCountData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple/$count';\n};\n\nexport type ApiVVersionODataControllerCountResponses = {\n    /**\n     * Success\n     */\n    200: ModelFromZendesk;\n};\n\nexport type ApiVVersionODataControllerCountResponse = ApiVVersionODataControllerCountResponses[keyof ApiVVersionODataControllerCountResponses];\n\nexport type GetApiVbyApiVersionSimpleOperationData = {\n    body?: never;\n    path: {\n        /**\n         * foo in method\n         */\n        foo_param: string;\n    };\n    query?: never;\n    url: '/api/v{api-version}/simple:operation';\n};\n\nexport type GetApiVbyApiVersionSimpleOperationErrors = {\n    /**\n     * Default error response\n     */\n    default: ModelWithBoolean;\n};\n\nexport type GetApiVbyApiVersionSimpleOperationError = GetApiVbyApiVersionSimpleOperationErrors[keyof GetApiVbyApiVersionSimpleOperationErrors];\n\nexport type GetApiVbyApiVersionSimpleOperationResponses = {\n    /**\n     * Response is a simple number\n     */\n    200: number;\n};\n\nexport type GetApiVbyApiVersionSimpleOperationResponse = GetApiVbyApiVersionSimpleOperationResponses[keyof GetApiVbyApiVersionSimpleOperationResponses];\n\nexport type DeleteCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type GetCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type HeadCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type OptionsCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type PatchCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type PostCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type PutCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type DeleteFooData3 = {\n    body?: never;\n    headers: {\n        /**\n         * Parameter with illegal characters\n         */\n        'x-Foo-Bar': ModelWithString;\n    };\n    path: {\n        /**\n         * foo in method\n         */\n        foo_param: string;\n        /**\n         * bar in method\n         */\n        BarParam: string;\n    };\n    query?: never;\n    url: '/api/v{api-version}/foo/{foo_param}/bar/{BarParam}';\n};\n\nexport type CallWithDescriptionsData = {\n    body?: never;\n    path?: never;\n    query?: {\n        /**\n         * Testing multiline comments in string: First line\n         * Second line\n         *\n         * Fourth line\n         */\n        parameterWithBreaks?: string;\n        /**\n         * Testing backticks in string: `backticks` and ```multiple backticks``` should work\n         */\n        parameterWithBackticks?: string;\n        /**\n         * Testing slashes in string: \\backwards\\\\\\ and /forwards/// should work\n         */\n        parameterWithSlashes?: string;\n        /**\n         * Testing expression placeholders in string: ${expression} should work\n         */\n        parameterWithExpressionPlaceholders?: string;\n        /**\n         * Testing quotes in string: 'single quote''' and \"double quotes\"\"\" should work\n         */\n        parameterWithQuotes?: string;\n        /**\n         * Testing reserved characters in string: * inline * and ** inline ** should work\n         */\n        parameterWithReservedCharacters?: string;\n    };\n    url: '/api/v{api-version}/descriptions';\n};\n\nexport type DeprecatedCallData = {\n    body?: never;\n    headers: {\n        /**\n         * This parameter is deprecated\n         *\n         * @deprecated\n         */\n        parameter: DeprecatedModel | null;\n    };\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/parameters/deprecated';\n};\n\nexport type CallWithParametersData = {\n    /**\n     * This is the parameter that goes into the body\n     */\n    body: {\n        [key: string]: unknown;\n    } | null;\n    headers: {\n        /**\n         * This is the parameter that goes into the header\n         */\n        parameterHeader: string | null;\n    };\n    path: {\n        /**\n         * This is the parameter that goes into the path\n         */\n        parameterPath: string | null;\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string | null;\n    };\n    query: {\n        foo_ref_enum?: ModelWithNestedArrayEnumsDataFoo;\n        foo_all_of_enum: ModelWithNestedArrayEnumsDataFoo;\n        /**\n         * This is the parameter that goes into the query params\n         */\n        cursor: string | null;\n    };\n    url: '/api/v{api-version}/parameters/{parameterPath}';\n};\n\nexport type CallWithWeirdParameterNamesData = {\n    /**\n     * This is the parameter that goes into the body\n     */\n    body: ModelWithString | null;\n    headers: {\n        /**\n         * This is the parameter that goes into the request header\n         */\n        'parameter.header': string | null;\n    };\n    path: {\n        /**\n         * This is the parameter that goes into the path\n         */\n        'parameter.path.1'?: string;\n        /**\n         * This is the parameter that goes into the path\n         */\n        'parameter-path-2'?: string;\n        /**\n         * This is the parameter that goes into the path\n         */\n        'PARAMETER-PATH-3'?: string;\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string | null;\n    };\n    query: {\n        /**\n         * This is the parameter with a reserved keyword\n         */\n        default?: string;\n        /**\n         * This is the parameter that goes into the request query params\n         */\n        'parameter-query': string | null;\n    };\n    url: '/api/v{api-version}/parameters/{parameter.path.1}/{parameter-path-2}/{PARAMETER-PATH-3}';\n};\n\nexport type GetCallWithOptionalParamData = {\n    /**\n     * This is a required parameter\n     */\n    body: ModelWithOneOfEnum;\n    path?: never;\n    query?: {\n        /**\n         * This is an optional parameter\n         */\n        page?: number;\n    };\n    url: '/api/v{api-version}/parameters';\n};\n\nexport type PostCallWithOptionalParamData = {\n    /**\n     * This is an optional parameter\n     */\n    body?: {\n        offset?: number | null;\n    };\n    path?: never;\n    query: {\n        /**\n         * This is a required parameter\n         */\n        parameter: Pageable;\n    };\n    url: '/api/v{api-version}/parameters';\n};\n\nexport type PostCallWithOptionalParamResponses = {\n    /**\n     * Response is a simple number\n     */\n    200: number;\n    /**\n     * Success\n     */\n    204: void;\n};\n\nexport type PostCallWithOptionalParamResponse = PostCallWithOptionalParamResponses[keyof PostCallWithOptionalParamResponses];\n\nexport type PostApiVbyApiVersionRequestBodyData = {\n    /**\n     * A reusable request body\n     */\n    body?: SimpleRequestBody;\n    path?: never;\n    query?: {\n        /**\n         * This is a reusable parameter\n         */\n        parameter?: string;\n    };\n    url: '/api/v{api-version}/requestBody';\n};\n\nexport type PostApiVbyApiVersionFormDataData = {\n    /**\n     * A reusable request body\n     */\n    body?: SimpleFormData;\n    path?: never;\n    query?: {\n        /**\n         * This is a reusable parameter\n         */\n        parameter?: string;\n    };\n    url: '/api/v{api-version}/formData';\n};\n\nexport type CallWithDefaultParametersData = {\n    body?: never;\n    path?: never;\n    query?: {\n        /**\n         * This is a simple string with default value\n         */\n        parameterString?: string | null;\n        /**\n         * This is a simple number with default value\n         */\n        parameterNumber?: number | null;\n        /**\n         * This is a simple boolean with default value\n         */\n        parameterBoolean?: boolean | null;\n        /**\n         * This is a simple enum with default value\n         */\n        parameterEnum?: 'Success' | 'Warning' | 'Error';\n        /**\n         * This is a simple model with default value\n         */\n        parameterModel?: ModelWithString | null;\n    };\n    url: '/api/v{api-version}/defaults';\n};\n\nexport type CallWithDefaultOptionalParametersData = {\n    body?: never;\n    path?: never;\n    query?: {\n        /**\n         * This is a simple string that is optional with default value\n         */\n        parameterString?: string;\n        /**\n         * This is a simple number that is optional with default value\n         */\n        parameterNumber?: number;\n        /**\n         * This is a simple boolean that is optional with default value\n         */\n        parameterBoolean?: boolean;\n        /**\n         * This is a simple enum that is optional with default value\n         */\n        parameterEnum?: 'Success' | 'Warning' | 'Error';\n        /**\n         * This is a simple model that is optional with default value\n         */\n        parameterModel?: ModelWithString;\n    };\n    url: '/api/v{api-version}/defaults';\n};\n\nexport type CallToTestOrderOfParamsData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * This is a optional string with default\n         */\n        parameterOptionalStringWithDefault?: string;\n        /**\n         * This is a optional string with empty default\n         */\n        parameterOptionalStringWithEmptyDefault?: string;\n        /**\n         * This is a optional string with no default\n         */\n        parameterOptionalStringWithNoDefault?: string;\n        /**\n         * This is a string with default\n         */\n        parameterStringWithDefault: string;\n        /**\n         * This is a string with empty default\n         */\n        parameterStringWithEmptyDefault: string;\n        /**\n         * This is a string with no default\n         */\n        parameterStringWithNoDefault: string;\n        /**\n         * This is a string that can be null with no default\n         */\n        parameterStringNullableWithNoDefault?: string | null;\n        /**\n         * This is a string that can be null with default\n         */\n        parameterStringNullableWithDefault?: string | null;\n    };\n    url: '/api/v{api-version}/defaults';\n};\n\nexport type DuplicateNameData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/duplicate';\n};\n\nexport type DuplicateName2Data = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/duplicate';\n};\n\nexport type DuplicateName3Data = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/duplicate';\n};\n\nexport type DuplicateName4Data = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/duplicate';\n};\n\nexport type CallWithNoContentResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no-content';\n};\n\nexport type CallWithNoContentResponseResponses = {\n    /**\n     * Success\n     */\n    204: void;\n};\n\nexport type CallWithNoContentResponseResponse = CallWithNoContentResponseResponses[keyof CallWithNoContentResponseResponses];\n\nexport type CallWithResponseAndNoContentResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multiple-tags/response-and-no-content';\n};\n\nexport type CallWithResponseAndNoContentResponseResponses = {\n    /**\n     * Response is a simple number\n     */\n    200: number;\n    /**\n     * Success\n     */\n    204: void;\n};\n\nexport type CallWithResponseAndNoContentResponseResponse = CallWithResponseAndNoContentResponseResponses[keyof CallWithResponseAndNoContentResponseResponses];\n\nexport type DummyAData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multiple-tags/a';\n};\n\nexport type DummyAResponses = {\n    200: _400;\n};\n\nexport type DummyAResponse = DummyAResponses[keyof DummyAResponses];\n\nexport type DummyBData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multiple-tags/b';\n};\n\nexport type DummyBResponses = {\n    /**\n     * Success\n     */\n    204: void;\n};\n\nexport type DummyBResponse = DummyBResponses[keyof DummyBResponses];\n\nexport type CallWithResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/response';\n};\n\nexport type CallWithResponseResponses = {\n    default: Import;\n};\n\nexport type CallWithResponseResponse = CallWithResponseResponses[keyof CallWithResponseResponses];\n\nexport type CallWithDuplicateResponsesData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/response';\n};\n\nexport type CallWithDuplicateResponsesErrors = {\n    /**\n     * Message for 500 error\n     */\n    500: ModelWithStringError;\n    /**\n     * Message for 501 error\n     */\n    501: ModelWithStringError;\n    /**\n     * Message for 502 error\n     */\n    502: ModelWithStringError;\n    /**\n     * Message for 4XX errors\n     */\n    '4XX': DictionaryWithArray;\n    /**\n     * Default error response\n     */\n    default: ModelWithBoolean;\n};\n\nexport type CallWithDuplicateResponsesError = CallWithDuplicateResponsesErrors[keyof CallWithDuplicateResponsesErrors];\n\nexport type CallWithDuplicateResponsesResponses = {\n    /**\n     * Message for 200 response\n     */\n    200: ModelWithBoolean & ModelWithInteger;\n    /**\n     * Message for 201 response\n     */\n    201: ModelWithString;\n    /**\n     * Message for 202 response\n     */\n    202: ModelWithString;\n};\n\nexport type CallWithDuplicateResponsesResponse = CallWithDuplicateResponsesResponses[keyof CallWithDuplicateResponsesResponses];\n\nexport type CallWithResponsesData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/response';\n};\n\nexport type CallWithResponsesErrors = {\n    /**\n     * Message for 500 error\n     */\n    500: ModelWithStringError;\n    /**\n     * Message for 501 error\n     */\n    501: ModelWithStringError;\n    /**\n     * Message for 502 error\n     */\n    502: ModelWithStringError;\n    /**\n     * Message for default response\n     */\n    default: ModelWithStringError;\n};\n\nexport type CallWithResponsesError = CallWithResponsesErrors[keyof CallWithResponsesErrors];\n\nexport type CallWithResponsesResponses = {\n    /**\n     * Message for 200 response\n     */\n    200: {\n        readonly '@namespace.string'?: string;\n        readonly '@namespace.integer'?: number;\n        readonly value?: Array<ModelWithString>;\n    };\n    /**\n     * Message for 201 response\n     */\n    201: ModelThatExtends;\n    /**\n     * Message for 202 response\n     */\n    202: ModelThatExtendsExtends;\n};\n\nexport type CallWithResponsesResponse = CallWithResponsesResponses[keyof CallWithResponsesResponses];\n\nexport type CollectionFormatData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * This is an array parameter that is sent as csv format (comma-separated values)\n         */\n        parameterArrayCSV: Array<string> | null;\n        /**\n         * This is an array parameter that is sent as ssv format (space-separated values)\n         */\n        parameterArraySSV: Array<string> | null;\n        /**\n         * This is an array parameter that is sent as tsv format (tab-separated values)\n         */\n        parameterArrayTSV: Array<string> | null;\n        /**\n         * This is an array parameter that is sent as pipes format (pipe-separated values)\n         */\n        parameterArrayPipes: Array<string> | null;\n        /**\n         * This is an array parameter that is sent as multi format (multiple parameter instances)\n         */\n        parameterArrayMulti: Array<string> | null;\n    };\n    url: '/api/v{api-version}/collectionFormat';\n};\n\nexport type TypesData = {\n    body?: never;\n    path?: {\n        /**\n         * This is a number parameter\n         */\n        id?: number;\n    };\n    query: {\n        /**\n         * This is a number parameter\n         */\n        parameterNumber: number;\n        /**\n         * This is a string parameter\n         */\n        parameterString: string | null;\n        /**\n         * This is a boolean parameter\n         */\n        parameterBoolean: boolean | null;\n        /**\n         * This is an object parameter\n         */\n        parameterObject: {\n            [key: string]: unknown;\n        } | null;\n        /**\n         * This is an array parameter\n         */\n        parameterArray: Array<string> | null;\n        /**\n         * This is a dictionary parameter\n         */\n        parameterDictionary: {\n            [key: string]: unknown;\n        } | null;\n        /**\n         * This is an enum parameter\n         */\n        parameterEnum: 'Success' | 'Warning' | 'Error' | null;\n    };\n    url: '/api/v{api-version}/types';\n};\n\nexport type TypesResponses = {\n    /**\n     * Response is a simple number\n     */\n    200: number;\n    /**\n     * Response is a simple string\n     */\n    201: string;\n    /**\n     * Response is a simple boolean\n     */\n    202: boolean;\n    /**\n     * Response is a simple object\n     */\n    203: {\n        [key: string]: unknown;\n    };\n};\n\nexport type TypesResponse = TypesResponses[keyof TypesResponses];\n\nexport type UploadFileData = {\n    body: Blob | File;\n    path: {\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string | null;\n    };\n    query?: never;\n    url: '/api/v{api-version}/upload';\n};\n\nexport type UploadFileResponses = {\n    200: boolean;\n};\n\nexport type UploadFileResponse = UploadFileResponses[keyof UploadFileResponses];\n\nexport type FileResponseData = {\n    body?: never;\n    path: {\n        id: string;\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string;\n    };\n    query?: never;\n    url: '/api/v{api-version}/file/{id}';\n};\n\nexport type FileResponseResponses = {\n    /**\n     * Success\n     */\n    200: Blob | File;\n};\n\nexport type FileResponseResponse = FileResponseResponses[keyof FileResponseResponses];\n\nexport type ComplexTypesData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * Parameter containing object\n         */\n        parameterObject: {\n            first?: {\n                second?: {\n                    third?: string;\n                };\n            };\n        };\n        /**\n         * Parameter containing reference\n         */\n        parameterReference: ModelWithString;\n    };\n    url: '/api/v{api-version}/complex';\n};\n\nexport type ComplexTypesErrors = {\n    /**\n     * 400 `server` error\n     */\n    400: unknown;\n    /**\n     * 500 server error\n     */\n    500: unknown;\n};\n\nexport type ComplexTypesResponses = {\n    /**\n     * Successful response\n     */\n    200: Array<ModelWithString>;\n};\n\nexport type ComplexTypesResponse = ComplexTypesResponses[keyof ComplexTypesResponses];\n\nexport type MultipartResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multipart';\n};\n\nexport type MultipartResponseResponses = {\n    /**\n     * OK\n     */\n    200: {\n        file?: Blob | File;\n        metadata?: {\n            foo?: string;\n            bar?: string;\n        };\n    };\n};\n\nexport type MultipartResponseResponse = MultipartResponseResponses[keyof MultipartResponseResponses];\n\nexport type MultipartRequestData = {\n    body?: {\n        content?: Blob | File;\n        data?: ModelWithString | null;\n    };\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multipart';\n};\n\nexport type ComplexParamsData = {\n    body?: {\n        readonly key: string | null;\n        name: string | null;\n        enabled?: boolean;\n        type: 'Monkey' | 'Horse' | 'Bird';\n        listOfModels?: Array<ModelWithString> | null;\n        listOfStrings?: Array<string> | null;\n        parameters: ModelWithString | ModelWithEnum | ModelWithArray | ModelWithDictionary;\n        readonly user?: {\n            readonly id?: number;\n            readonly name?: string | null;\n        };\n    };\n    path: {\n        id: number;\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string;\n    };\n    query?: never;\n    url: '/api/v{api-version}/complex/{id}';\n};\n\nexport type ComplexParamsResponses = {\n    /**\n     * Success\n     */\n    200: ModelWithString;\n};\n\nexport type ComplexParamsResponse = ComplexParamsResponses[keyof ComplexParamsResponses];\n\nexport type CallWithResultFromHeaderData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/header';\n};\n\nexport type CallWithResultFromHeaderErrors = {\n    /**\n     * 400 server error\n     */\n    400: unknown;\n    /**\n     * 500 server error\n     */\n    500: unknown;\n};\n\nexport type CallWithResultFromHeaderResponses = {\n    /**\n     * Successful response\n     */\n    200: unknown;\n};\n\nexport type TestErrorCodeData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * Status code to return\n         */\n        status: number;\n    };\n    url: '/api/v{api-version}/error';\n};\n\nexport type TestErrorCodeErrors = {\n    /**\n     * Custom message: Internal Server Error\n     */\n    500: unknown;\n    /**\n     * Custom message: Not Implemented\n     */\n    501: unknown;\n    /**\n     * Custom message: Bad Gateway\n     */\n    502: unknown;\n    /**\n     * Custom message: Service Unavailable\n     */\n    503: unknown;\n};\n\nexport type TestErrorCodeResponses = {\n    /**\n     * Custom message: Successful response\n     */\n    200: unknown;\n};\n\nexport type NonAsciiæøåÆøÅöôêÊ字符串Data = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * Dummy input param\n         */\n        nonAsciiParamæøåÆØÅöôêÊ: number;\n    };\n    url: '/api/v{api-version}/non-ascii-æøåÆØÅöôêÊ字符串';\n};\n\nexport type NonAsciiæøåÆøÅöôêÊ字符串Responses = {\n    /**\n     * Successful response\n     */\n    200: Array<NonAsciiStringæøåÆøÅöôêÊ字符串>;\n};\n\nexport type NonAsciiæøåÆøÅöôêÊ字符串Response = NonAsciiæøåÆøÅöôêÊ字符串Responses[keyof NonAsciiæøåÆøÅöôêÊ字符串Responses];\n\nexport type PutWithFormUrlEncodedData = {\n    body: ArrayWithStrings;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/non-ascii-æøåÆØÅöôêÊ字符串';\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-next/base-url-number/client/client.gen.ts",
    "content": "// 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<Response, unknown, ResolvedRequestOptions>();\n\n  const beforeRequest = async (options: RequestOptions) => {\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 url = buildUrl(opts);\n\n    return { opts, url };\n  };\n\n  // @ts-expect-error\n  const request: Client['request'] = async (options) => {\n    // @ts-expect-error\n    const { opts, url } = await beforeRequest(options);\n\n    for (const fn of interceptors.request.fns) {\n      if (fn) {\n        await fn(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    const requestInit: ReqInit = {\n      ...opts,\n      body: getValidRequestBody(opts),\n    };\n\n    let response = await _fetch(url, requestInit);\n\n    for (const fn of interceptors.response.fns) {\n      if (fn) {\n        response = await fn(response, opts);\n      }\n    }\n\n    const result = {\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 {\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 {\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 {\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, opts)) as string;\n      }\n    }\n\n    finalError = finalError || ({} as string);\n\n    if (opts.throwOnError) {\n      throw finalError;\n    }\n\n    return {\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        const requestInit = {\n          ...init,\n          method: init.method as Config['method'],\n          url,\n        };\n        for (const fn of interceptors.request.fns) {\n          if (fn) {\n            await fn(requestInit);\n            request = new Request(requestInit.url, requestInit);\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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-next/base-url-number/client/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type { Auth } from '../core/auth.gen';\nexport type { QuerySerializerOptions } from '../core/bodySerializer.gen';\nexport {\n  formDataBodySerializer,\n  jsonBodySerializer,\n  urlSearchParamsBodySerializer,\n} from '../core/bodySerializer.gen';\nexport { buildClientParams } from '../core/params.gen';\nexport { serializeQueryKeyValue } from '../core/queryKeySerializer.gen';\nexport { createClient } from './client.gen';\nexport type {\n  Client,\n  ClientOptions,\n  Config,\n  CreateClientConfig,\n  Options,\n  RequestOptions,\n  RequestResult,\n  TDataShape,\n} from './types.gen';\nexport { createConfig } from './utils.gen';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-next/base-url-number/client/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { Auth } from '../core/auth.gen';\nimport type {\n  ServerSentEventsOptions,\n  ServerSentEventsResult,\n} from '../core/serverSentEvents.gen';\nimport type { Client as CoreClient, Config as CoreConfig } from '../core/types.gen';\nimport type { Middleware } from './utils.gen';\n\nexport interface Config<T extends ClientOptions = ClientOptions>\n  extends Omit<RequestInit, 'body' | 'headers' | 'method'>, CoreConfig {\n  /**\n   * Base URL for all requests made by this client.\n   */\n  baseUrl?: T['baseUrl'];\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   * Return the response data parsed in a specified format. By default, `auto`\n   * will infer the appropriate method from the `Content-Type` response header.\n   * You can override this behavior with any of the {@link Body} methods.\n   * Select `stream` if you don't want to parse response data at all.\n   *\n   * @default 'auto'\n   */\n  parseAs?: 'arrayBuffer' | 'auto' | 'blob' | 'formData' | 'json' | 'stream' | 'text';\n  /**\n   * Throw an error instead of returning it in the response?\n   *\n   * @default false\n   */\n  throwOnError?: T['throwOnError'];\n}\n\nexport interface RequestOptions<\n  TData = unknown,\n  ThrowOnError extends boolean = boolean,\n  Url extends string = string,\n>\n  extends\n    Config<{\n      throwOnError: ThrowOnError;\n    }>,\n    Pick<\n      ServerSentEventsOptions<TData>,\n      | 'onRequest'\n      | 'onSseError'\n      | 'onSseEvent'\n      | 'sseDefaultRetryDelay'\n      | 'sseMaxRetryAttempts'\n      | 'sseMaxRetryDelay'\n    > {\n  /**\n   * Any body that you want to add to your request.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/fetch#body}\n   */\n  body?: unknown;\n  path?: Record<string, unknown>;\n  query?: Record<string, unknown>;\n  /**\n   * Security mechanism(s) to use for the request.\n   */\n  security?: ReadonlyArray<Auth>;\n  url: Url;\n}\n\nexport interface ResolvedRequestOptions<\n  ThrowOnError extends boolean = boolean,\n  Url extends string = string,\n> extends RequestOptions<unknown, ThrowOnError, Url> {\n  serializedBody?: string;\n}\n\nexport type RequestResult<\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = boolean,\n> = ThrowOnError extends true\n  ? Promise<{\n      data: TData extends Record<string, unknown> ? TData[keyof TData] : TData;\n      response: Response;\n    }>\n  : Promise<\n      (\n        | {\n            data: TData extends Record<string, unknown> ? TData[keyof TData] : TData;\n            error: undefined;\n          }\n        | {\n            data: undefined;\n            error: TError extends Record<string, unknown> ? TError[keyof TError] : TError;\n          }\n      ) & {\n        response: Response;\n      }\n    >;\n\nexport interface ClientOptions {\n  baseUrl?: string;\n  throwOnError?: boolean;\n}\n\ntype MethodFn = <TData = unknown, TError = unknown, ThrowOnError extends boolean = false>(\n  options: Omit<RequestOptions<TData, ThrowOnError>, 'method'>,\n) => RequestResult<TData, TError, ThrowOnError>;\n\ntype SseFn = <TData = unknown, TError = unknown, ThrowOnError extends boolean = false>(\n  options: Omit<RequestOptions<TData, ThrowOnError>, 'method'>,\n) => Promise<ServerSentEventsResult<TData, TError>>;\n\ntype RequestFn = <TData = unknown, TError = unknown, ThrowOnError extends boolean = false>(\n  options: Omit<RequestOptions<TData, ThrowOnError>, 'method'> &\n    Pick<Required<RequestOptions<TData, ThrowOnError>>, 'method'>,\n) => RequestResult<TData, TError, ThrowOnError>;\n\ntype BuildUrlFn = <\n  TData extends {\n    body?: unknown;\n    path?: Record<string, unknown>;\n    query?: Record<string, unknown>;\n    url: string;\n  },\n>(\n  options: TData & Options<TData>,\n) => string;\n\nexport type Client = CoreClient<RequestFn, Config, MethodFn, BuildUrlFn, SseFn> & {\n  interceptors: Middleware<Response, unknown, ResolvedRequestOptions>;\n};\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 = ClientOptions> = (\n  override?: Config<ClientOptions & T>,\n) => Config<Required<ClientOptions> & T>;\n\nexport interface TDataShape {\n  body?: unknown;\n  headers?: unknown;\n  path?: unknown;\n  query?: unknown;\n  url: string;\n}\n\ntype OmitKeys<T, K> = Pick<T, Exclude<keyof T, K>>;\n\nexport type Options<\n  TData extends TDataShape = TDataShape,\n  ThrowOnError extends boolean = boolean,\n  TResponse = unknown,\n> = OmitKeys<RequestOptions<TResponse, ThrowOnError>, 'body' | 'path' | 'query' | 'url'> &\n  ([TData] extends [never] ? unknown : Omit<TData, 'url'>);\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-next/base-url-number/client/utils.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport { getAuthToken } from '../core/auth.gen';\nimport type {\n  QuerySerializer,\n  QuerySerializerOptions,\n} from '../core/bodySerializer.gen';\nimport { jsonBodySerializer } from '../core/bodySerializer.gen';\nimport {\n  serializeArrayParam,\n  serializeObjectParam,\n  serializePrimitiveParam,\n} from '../core/pathSerializer.gen';\nimport type { Client, ClientOptions, Config, RequestOptions } from './types.gen';\n\ninterface PathSerializer {\n  path: Record<string, unknown>;\n  url: string;\n}\n\nconst PATH_PARAM_RE = /\\{[^{}]+\\}/g;\n\ntype ArrayStyle = 'form' | 'spaceDelimited' | 'pipeDelimited';\ntype MatrixStyle = 'label' | 'matrix' | 'simple';\ntype ArraySeparatorStyle = ArrayStyle | MatrixStyle;\n\nconst 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 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    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  const url = 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  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 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 || typeof header !== 'object') {\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, Options> = (\n  error: Err,\n  response: Res,\n  options: Options,\n) => Err | Promise<Err>;\n\ntype ReqInterceptor<Options> = (options: Options) => void | Promise<void>;\n\ntype ResInterceptor<Res, Options> = (response: Res, options: Options) => 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<Res, Err, Options> {\n  error: Interceptors<ErrInterceptor<Err, Res, Options>>;\n  request: Interceptors<ReqInterceptor<Options>>;\n  response: Interceptors<ResInterceptor<Res, Options>>;\n}\n\nexport const createInterceptors = <Res, Err, Options>(): Middleware<Res, Err, Options> => ({\n  error: new Interceptors<ErrInterceptor<Err, Res, Options>>(),\n  request: new Interceptors<ReqInterceptor<Options>>(),\n  response: new Interceptors<ResInterceptor<Res, 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-next/base-url-number/client.gen.ts",
    "content": "// 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: 'http://localhost:3000/base' }));\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-next/base-url-number/core/auth.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-next/base-url-number/core/bodySerializer.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-next/base-url-number/core/params.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-next/base-url-number/core/pathSerializer.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-next/base-url-number/core/queryKeySerializer.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\n/**\n * JSON-friendly union that mirrors what Pinia Colada can hash.\n */\nexport type JsonValue =\n  | null\n  | string\n  | number\n  | boolean\n  | JsonValue[]\n  | { [key: string]: JsonValue };\n\n/**\n * Replacer that converts non-JSON values (bigint, Date, etc.) to safe substitutes.\n */\nexport const queryKeyJsonReplacer = (_key: string, value: unknown) => {\n  if (value === undefined || typeof value === 'function' || typeof value === 'symbol') {\n    return undefined;\n  }\n  if (typeof value === 'bigint') {\n    return value.toString();\n  }\n  if (value instanceof Date) {\n    return value.toISOString();\n  }\n  return value;\n};\n\n/**\n * Safely stringifies a value and parses it back into a JsonValue.\n */\nexport const stringifyToJsonValue = (input: unknown): JsonValue | undefined => {\n  try {\n    const json = JSON.stringify(input, queryKeyJsonReplacer);\n    if (json === undefined) {\n      return undefined;\n    }\n    return JSON.parse(json) as JsonValue;\n  } catch {\n    return undefined;\n  }\n};\n\n/**\n * Detects plain objects (including objects with a null prototype).\n */\nconst isPlainObject = (value: unknown): value is Record<string, unknown> => {\n  if (value === null || typeof value !== 'object') {\n    return false;\n  }\n  const prototype = Object.getPrototypeOf(value as object);\n  return prototype === Object.prototype || prototype === null;\n};\n\n/**\n * Turns URLSearchParams into a sorted JSON object for deterministic keys.\n */\nconst serializeSearchParams = (params: URLSearchParams): JsonValue => {\n  const entries = Array.from(params.entries()).sort(([a], [b]) => a.localeCompare(b));\n  const result: Record<string, JsonValue> = {};\n\n  for (const [key, value] of entries) {\n    const existing = result[key];\n    if (existing === undefined) {\n      result[key] = value;\n      continue;\n    }\n\n    if (Array.isArray(existing)) {\n      (existing as string[]).push(value);\n    } else {\n      result[key] = [existing, value];\n    }\n  }\n\n  return result;\n};\n\n/**\n * Normalizes any accepted value into a JSON-friendly shape for query keys.\n */\nexport const serializeQueryKeyValue = (value: unknown): JsonValue | undefined => {\n  if (value === null) {\n    return null;\n  }\n\n  if (typeof value === 'string' || typeof value === 'number' || typeof value === 'boolean') {\n    return value;\n  }\n\n  if (value === undefined || typeof value === 'function' || typeof value === 'symbol') {\n    return undefined;\n  }\n\n  if (typeof value === 'bigint') {\n    return value.toString();\n  }\n\n  if (value instanceof Date) {\n    return value.toISOString();\n  }\n\n  if (Array.isArray(value)) {\n    return stringifyToJsonValue(value);\n  }\n\n  if (typeof URLSearchParams !== 'undefined' && value instanceof URLSearchParams) {\n    return serializeSearchParams(value);\n  }\n\n  if (isPlainObject(value)) {\n    return stringifyToJsonValue(value);\n  }\n\n  return undefined;\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-next/base-url-number/core/serverSentEvents.gen.ts",
    "content": "// 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 const 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            // Normalize line endings: CRLF -> LF, then CR -> LF\n            buffer = buffer.replace(/\\r\\n/g, '\\n').replace(/\\r/g, '\\n');\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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-next/base-url-number/core/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { Auth, AuthToken } from './auth.gen';\nimport type { BodySerializer, QuerySerializer, QuerySerializerOptions } from './bodySerializer.gen';\n\nexport type HttpMethod =\n  | 'connect'\n  | 'delete'\n  | 'get'\n  | 'head'\n  | 'options'\n  | 'patch'\n  | 'post'\n  | 'put'\n  | 'trace';\n\nexport type Client<\n  RequestFn = never,\n  Config = unknown,\n  MethodFn = never,\n  BuildUrlFn = never,\n  SseFn = never,\n> = {\n  /**\n   * Returns the final request URL.\n   */\n  buildUrl: BuildUrlFn;\n  getConfig: () => Config;\n  request: RequestFn;\n  setConfig: (config: Config) => Config;\n} & {\n  [K in HttpMethod]: MethodFn;\n} & ([SseFn] extends [never] ? { sse?: never } : { sse: { [K in HttpMethod]: SseFn } });\n\nexport interface Config {\n  /**\n   * Auth token or a function returning auth token. The resolved value will be\n   * added to the request payload as defined by its `security` array.\n   */\n  auth?: ((auth: Auth) => Promise<AuthToken> | AuthToken) | AuthToken;\n  /**\n   * A function for serializing request body parameter. By default,\n   * {@link JSON.stringify()} will be used.\n   */\n  bodySerializer?: BodySerializer | null;\n  /**\n   * An object containing any HTTP headers that you want to pre-populate your\n   * `Headers` object with.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/Headers/Headers#init See more}\n   */\n  headers?:\n    | RequestInit['headers']\n    | Record<\n        string,\n        string | number | boolean | (string | number | boolean)[] | null | undefined | unknown\n      >;\n  /**\n   * The request method.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/fetch#method See more}\n   */\n  method?: Uppercase<HttpMethod>;\n  /**\n   * A function for serializing request query parameters. By default, arrays\n   * will be exploded in form style, objects will be exploded in deepObject\n   * style, and reserved characters are percent-encoded.\n   *\n   * This method will have no effect if the native `paramsSerializer()` Axios\n   * API function is used.\n   *\n   * {@link https://swagger.io/docs/specification/serialization/#query View examples}\n   */\n  querySerializer?: QuerySerializer | QuerySerializerOptions;\n  /**\n   * A function validating request data. This is useful if you want to ensure\n   * the request conforms to the desired shape, so it can be safely sent to\n   * the server.\n   */\n  requestValidator?: (data: unknown) => Promise<unknown>;\n  /**\n   * A function transforming response data before it's returned. This is useful\n   * for post-processing data, e.g. converting ISO strings into Date objects.\n   */\n  responseTransformer?: (data: unknown) => Promise<unknown>;\n  /**\n   * A function validating response data. This is useful if you want to ensure\n   * the response conforms to the desired shape, so it can be safely passed to\n   * the transformers and returned to the user.\n   */\n  responseValidator?: (data: unknown) => Promise<unknown>;\n}\n\ntype IsExactlyNeverOrNeverUndefined<T> = [T] extends [never]\n  ? true\n  : [T] extends [never | undefined]\n    ? [undefined] extends [T]\n      ? false\n      : true\n    : false;\n\nexport type OmitNever<T extends Record<string, unknown>> = {\n  [K in keyof T as IsExactlyNeverOrNeverUndefined<T[K]> extends true ? never : K]: T[K];\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-next/base-url-number/core/utils.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-next/base-url-number/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type { _3eNum1Период, _400, AdditionalPropertiesIntegerIssue, AdditionalPropertiesUnknownIssue, AdditionalPropertiesUnknownIssue2, AdditionalPropertiesUnknownIssue3, AdditionalPropertiesUnknownIssueWritable, AnyOfAnyAndNull, AnyOfArrays, ApiVVersionODataControllerCountData, ApiVVersionODataControllerCountResponse, ApiVVersionODataControllerCountResponses, ArrayWithAnyOfProperties, ArrayWithArray, ArrayWithBooleans, ArrayWithNumbers, ArrayWithProperties, ArrayWithReferences, ArrayWithStrings, CallToTestOrderOfParamsData, CallWithDefaultOptionalParametersData, CallWithDefaultParametersData, CallWithDescriptionsData, CallWithDuplicateResponsesData, CallWithDuplicateResponsesError, CallWithDuplicateResponsesErrors, CallWithDuplicateResponsesResponse, CallWithDuplicateResponsesResponses, CallWithNoContentResponseData, CallWithNoContentResponseResponse, CallWithNoContentResponseResponses, CallWithParametersData, CallWithResponseAndNoContentResponseData, CallWithResponseAndNoContentResponseResponse, CallWithResponseAndNoContentResponseResponses, CallWithResponseData, CallWithResponseResponse, CallWithResponseResponses, CallWithResponsesData, CallWithResponsesError, CallWithResponsesErrors, CallWithResponsesResponse, CallWithResponsesResponses, CallWithResultFromHeaderData, CallWithResultFromHeaderErrors, CallWithResultFromHeaderResponses, CallWithWeirdParameterNamesData, CamelCaseCommentWithBreaks, CharactersInDescription, ClientOptions, CollectionFormatData, CommentWithBackticks, CommentWithBackticksAndQuotes, CommentWithBreaks, CommentWithExpressionPlaceholders, CommentWithQuotes, CommentWithReservedCharacters, CommentWithSlashes, ComplexParamsData, ComplexParamsResponse, ComplexParamsResponses, ComplexTypesData, ComplexTypesErrors, ComplexTypesResponse, ComplexTypesResponses, CompositionBaseModel, CompositionExtendedModel, CompositionWithAllOfAndNullable, CompositionWithAnyOf, CompositionWithAnyOfAndNullable, CompositionWithAnyOfAnonymous, CompositionWithNestedAnyAndTypeNull, CompositionWithNestedAnyOfAndNull, CompositionWithOneOf, CompositionWithOneOfAndComplexArrayDictionary, CompositionWithOneOfAndNullable, CompositionWithOneOfAndProperties, CompositionWithOneOfAndSimpleArrayDictionary, CompositionWithOneOfAndSimpleDictionary, CompositionWithOneOfAnonymous, CompositionWithOneOfDiscriminator, ConstValue, Default, DeleteCallWithoutParametersAndResponseData, DeleteFooData, DeleteFooData2, DeleteFooData3, DeprecatedCallData, DeprecatedModel, DictionaryWithArray, DictionaryWithDictionary, DictionaryWithProperties, DictionaryWithPropertiesAndAdditionalProperties, DictionaryWithReference, DictionaryWithString, DummyAData, DummyAResponse, DummyAResponses, DummyBData, DummyBResponse, DummyBResponses, DuplicateName2Data, DuplicateName3Data, DuplicateName4Data, DuplicateNameData, EnumFromDescription, EnumWithExtensions, EnumWithNumbers, EnumWithReplacedCharacters, EnumWithStrings, EnumWithXEnumNames, ExportData, ExternalRefA, ExternalRefB, ExternalSharedModel, File, FileResponseData, FileResponseResponse, FileResponseResponses, FileWritable, FooWowData, FooWowResponses, FreeFormObjectWithAdditionalPropertiesEqEmptyObject, FreeFormObjectWithAdditionalPropertiesEqTrue, FreeFormObjectWithoutAdditionalProperties, GenericSchemaDuplicateIssue1SystemBoolean, GenericSchemaDuplicateIssue1SystemBooleanWritable, GenericSchemaDuplicateIssue1SystemString, GenericSchemaDuplicateIssue1SystemStringWritable, GetApiVbyApiVersionSimpleOperationData, GetApiVbyApiVersionSimpleOperationError, GetApiVbyApiVersionSimpleOperationErrors, GetApiVbyApiVersionSimpleOperationResponse, GetApiVbyApiVersionSimpleOperationResponses, GetCallWithOptionalParamData, GetCallWithoutParametersAndResponseData, HeadCallWithoutParametersAndResponseData, Import, ImportData, ImportResponse, ImportResponses, IoK8sApimachineryPkgApisMetaV1DeleteOptions, IoK8sApimachineryPkgApisMetaV1Preconditions, ModelCircle, ModelFromZendesk, ModelSquare, ModelThatExtends, ModelThatExtendsExtends, ModelWithAdditionalPropertiesEqTrue, ModelWithAdditionalPropertiesRef, ModelWithAnyOfConstantSizeArray, ModelWithAnyOfConstantSizeArrayAndIntersect, ModelWithAnyOfConstantSizeArrayNullable, ModelWithAnyOfConstantSizeArrayWithNSizeAndOptions, ModelWithAnyOfConstantSizeArrayWithNSizeAndOptionsWritable, ModelWithArray, ModelWithArrayReadOnlyAndWriteOnly, ModelWithArrayReadOnlyAndWriteOnlyWritable, ModelWithBackticksInDescription, ModelWithBoolean, ModelWithCircularReference, ModelWithConst, ModelWithConstantSizeArray, ModelWithDictionary, ModelWithDuplicateImports, ModelWithDuplicateProperties, ModelWithEnum, ModelWithEnumFromDescription, ModelWithEnumWithHyphen, ModelWithInteger, ModelWithNestedArrayEnums, ModelWithNestedArrayEnumsData, ModelWithNestedArrayEnumsDataBar, ModelWithNestedArrayEnumsDataFoo, ModelWithNestedCompositionEnums, ModelWithNestedEnums, ModelWithNestedProperties, ModelWithNullableObject, ModelWithNullableString, ModelWithNumericEnumUnion, ModelWithOneOfAndProperties, ModelWithOneOfEnum, ModelWithOrderedProperties, ModelWithPattern, ModelWithPatternWritable, ModelWithPrefixItemsConstantSizeArray, ModelWithProperties, ModelWithPropertiesWritable, ModelWithReadOnlyAndWriteOnly, ModelWithReadOnlyAndWriteOnlyWritable, ModelWithReference, ModelWithReferenceWritable, ModelWithString, ModelWithStringError, MultipartRequestData, MultipartResponseData, MultipartResponseResponse, MultipartResponseResponses, NestedAnyOfArraysNullable, NonAsciiæøåÆøÅöôêÊ字符串Data, NonAsciiæøåÆøÅöôêÊ字符串Response, NonAsciiæøåÆøÅöôêÊ字符串Responses, NonAsciiStringæøåÆøÅöôêÊ字符串, NullableObject, OneOfAllOfIssue, OneOfAllOfIssueWritable, OptionsCallWithoutParametersAndResponseData, Pageable, ParameterSimpleParameterUnused, PatchApiVbyApiVersionNoTagData, PatchApiVbyApiVersionNoTagResponses, PatchCallWithoutParametersAndResponseData, PostApiVbyApiVersionFormDataData, PostApiVbyApiVersionRequestBodyData, PostCallWithOptionalParamData, PostCallWithOptionalParamResponse, PostCallWithOptionalParamResponses, PostCallWithoutParametersAndResponseData, PostServiceWithEmptyTagResponse, PostServiceWithEmptyTagResponse2, PutCallWithoutParametersAndResponseData, PutWithFormUrlEncodedData, SchemaWithFormRestrictedKeys, SimpleBoolean, SimpleFile, SimpleFormData, SimpleInteger, SimpleParameter, SimpleReference, SimpleRequestBody, SimpleString, SimpleStringWithPattern, TestErrorCodeData, TestErrorCodeErrors, TestErrorCodeResponses, TypesData, TypesResponse, TypesResponses, UploadFileData, UploadFileResponse, UploadFileResponses, XFooBar } from './types.gen';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-next/base-url-number/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type ClientOptions = {\n    baseUrl: 'http://localhost:3000/base' | (string & {});\n};\n\n/**\n * Model with number-only name\n */\nexport type _400 = string;\n\n/**\n * External ref to shared model (A)\n */\nexport type ExternalRefA = ExternalSharedModel;\n\n/**\n * External ref to shared model (B)\n */\nexport type ExternalRefB = ExternalSharedModel;\n\n/**\n * Testing multiline comments in string: First line\n * Second line\n *\n * Fourth line\n */\nexport type CamelCaseCommentWithBreaks = number;\n\n/**\n * Testing multiline comments in string: First line\n * Second line\n *\n * Fourth line\n */\nexport type CommentWithBreaks = number;\n\n/**\n * Testing backticks in string: `backticks` and ```multiple backticks``` should work\n */\nexport type CommentWithBackticks = number;\n\n/**\n * Testing backticks and quotes in string: `backticks`, 'quotes', \"double quotes\" and ```multiple backticks``` should work\n */\nexport type CommentWithBackticksAndQuotes = number;\n\n/**\n * Testing slashes in string: \\backwards\\\\\\ and /forwards/// should work\n */\nexport type CommentWithSlashes = number;\n\n/**\n * Testing expression placeholders in string: ${expression} should work\n */\nexport type CommentWithExpressionPlaceholders = number;\n\n/**\n * Testing quotes in string: 'single quote''' and \"double quotes\"\"\" should work\n */\nexport type CommentWithQuotes = number;\n\n/**\n * Testing reserved characters in string: * inline * and ** inline ** should work\n */\nexport type CommentWithReservedCharacters = number;\n\n/**\n * This is a simple number\n */\nexport type SimpleInteger = number;\n\n/**\n * This is a simple boolean\n */\nexport type SimpleBoolean = boolean;\n\n/**\n * This is a simple string\n */\nexport type SimpleString = string;\n\n/**\n * A string with non-ascii (unicode) characters valid in typescript identifiers (æøåÆØÅöÔèÈ字符串)\n */\nexport type NonAsciiStringæøåÆøÅöôêÊ字符串 = string;\n\n/**\n * This is a simple file\n */\nexport type SimpleFile = Blob | File;\n\n/**\n * This is a simple reference\n */\nexport type SimpleReference = ModelWithString;\n\n/**\n * This is a simple string\n */\nexport type SimpleStringWithPattern = string | null;\n\n/**\n * This is a simple enum with strings\n */\nexport type EnumWithStrings = 'Success' | 'Warning' | 'Error' | '\\'Single Quote\\'' | '\"Double Quotes\"' | 'Non-ascii: øæåôöØÆÅÔÖ字符串';\n\nexport type EnumWithReplacedCharacters = '\\'Single Quote\\'' | '\"Double Quotes\"' | 'øæåôöØÆÅÔÖ字符串' | 3.1 | '';\n\n/**\n * This is a simple enum with numbers\n */\nexport type EnumWithNumbers = 1 | 2 | 3 | 1.1 | 1.2 | 1.3 | 100 | 200 | 300 | -100 | -200 | -300 | -1.1 | -1.2 | -1.3;\n\n/**\n * Success=1,Warning=2,Error=3\n */\nexport type EnumFromDescription = number;\n\n/**\n * This is a simple enum with numbers\n */\nexport type EnumWithExtensions = 200 | 400 | 500;\n\nexport type EnumWithXEnumNames = 0 | 1 | 2;\n\n/**\n * This is a simple array with numbers\n */\nexport type ArrayWithNumbers = Array<number>;\n\n/**\n * This is a simple array with booleans\n */\nexport type ArrayWithBooleans = Array<boolean>;\n\n/**\n * This is a simple array with strings\n */\nexport type ArrayWithStrings = Array<string>;\n\n/**\n * This is a simple array with references\n */\nexport type ArrayWithReferences = Array<ModelWithString>;\n\n/**\n * This is a simple array containing an array\n */\nexport type ArrayWithArray = Array<Array<ModelWithString>>;\n\n/**\n * This is a simple array with properties\n */\nexport type ArrayWithProperties = Array<{\n    '16x16'?: CamelCaseCommentWithBreaks;\n    bar?: string;\n}>;\n\n/**\n * This is a simple array with any of properties\n */\nexport type ArrayWithAnyOfProperties = Array<{\n    foo?: string;\n} | {\n    bar?: string;\n}>;\n\nexport type AnyOfAnyAndNull = {\n    data?: unknown | null;\n};\n\n/**\n * This is a simple array with any of properties\n */\nexport type AnyOfArrays = {\n    results?: Array<{\n        foo?: string;\n    } | {\n        bar?: string;\n    }>;\n};\n\n/**\n * This is a string dictionary\n */\nexport type DictionaryWithString = {\n    [key: string]: string;\n};\n\nexport type DictionaryWithPropertiesAndAdditionalProperties = {\n    foo?: number;\n    bar?: boolean;\n    [key: string]: string | number | boolean | undefined;\n};\n\n/**\n * This is a string reference\n */\nexport type DictionaryWithReference = {\n    [key: string]: ModelWithString;\n};\n\n/**\n * This is a complex dictionary\n */\nexport type DictionaryWithArray = {\n    [key: string]: Array<ModelWithString>;\n};\n\n/**\n * This is a string dictionary\n */\nexport type DictionaryWithDictionary = {\n    [key: string]: {\n        [key: string]: string;\n    };\n};\n\n/**\n * This is a complex dictionary\n */\nexport type DictionaryWithProperties = {\n    [key: string]: {\n        foo?: string;\n        bar?: string;\n    };\n};\n\n/**\n * This is a model with one number property\n */\nexport type ModelWithInteger = {\n    /**\n     * This is a simple number property\n     */\n    prop?: number;\n};\n\n/**\n * This is a model with one boolean property\n */\nexport type ModelWithBoolean = {\n    /**\n     * This is a simple boolean property\n     */\n    prop?: boolean;\n};\n\n/**\n * This is a model with one string property\n */\nexport type ModelWithString = {\n    /**\n     * This is a simple string property\n     */\n    prop?: string;\n};\n\n/**\n * This is a model with one string property\n */\nexport type ModelWithStringError = {\n    /**\n     * This is a simple string property\n     */\n    prop?: string;\n};\n\n/**\n * `Comment` or `VoiceComment`. The JSON object for adding voice comments to tickets is different. See [Adding voice comments to tickets](/documentation/ticketing/managing-tickets/adding-voice-comments-to-tickets)\n */\nexport type ModelFromZendesk = string;\n\n/**\n * This is a model with one string property\n */\nexport type ModelWithNullableString = {\n    /**\n     * This is a simple string property\n     */\n    nullableProp1?: string | null;\n    /**\n     * This is a simple string property\n     */\n    nullableRequiredProp1: string | null;\n    /**\n     * This is a simple string property\n     */\n    nullableProp2?: string | null;\n    /**\n     * This is a simple string property\n     */\n    nullableRequiredProp2: string | null;\n    /**\n     * This is a simple enum with strings\n     */\n    'foo_bar-enum'?: 'Success' | 'Warning' | 'Error' | 'ØÆÅ字符串';\n};\n\n/**\n * This is a model with one enum\n */\nexport type ModelWithEnum = {\n    /**\n     * This is a simple enum with strings\n     */\n    'foo_bar-enum'?: 'Success' | 'Warning' | 'Error' | 'ØÆÅ字符串';\n    /**\n     * These are the HTTP error code enums\n     */\n    statusCode?: '100' | '200 FOO' | '300 FOO_BAR' | '400 foo-bar' | '500 foo.bar' | '600 foo&bar';\n    /**\n     * Simple boolean enum\n     */\n    bool?: true;\n};\n\n/**\n * This is a model with one enum with escaped name\n */\nexport type ModelWithEnumWithHyphen = {\n    /**\n     * Foo-Bar-Baz-Qux\n     */\n    'foo-bar-baz-qux'?: '3.0';\n};\n\n/**\n * This is a model with one enum\n */\nexport type ModelWithEnumFromDescription = {\n    /**\n     * Success=1,Warning=2,Error=3\n     */\n    test?: number;\n};\n\n/**\n * This is a model with nested enums\n */\nexport type ModelWithNestedEnums = {\n    dictionaryWithEnum?: {\n        [key: string]: 'Success' | 'Warning' | 'Error';\n    };\n    dictionaryWithEnumFromDescription?: {\n        [key: string]: number;\n    };\n    arrayWithEnum?: Array<'Success' | 'Warning' | 'Error'>;\n    arrayWithDescription?: Array<number>;\n    /**\n     * This is a simple enum with strings\n     */\n    'foo_bar-enum'?: 'Success' | 'Warning' | 'Error' | 'ØÆÅ字符串';\n};\n\n/**\n * This is a model with one property containing a reference\n */\nexport type ModelWithReference = {\n    prop?: ModelWithProperties;\n};\n\n/**\n * This is a model with one property containing an array\n */\nexport type ModelWithArrayReadOnlyAndWriteOnly = {\n    prop?: Array<ModelWithReadOnlyAndWriteOnly>;\n    propWithFile?: Array<Blob | File>;\n    propWithNumber?: Array<number>;\n};\n\n/**\n * This is a model with one property containing an array\n */\nexport type ModelWithArray = {\n    prop?: Array<ModelWithString>;\n    propWithFile?: Array<Blob | File>;\n    propWithNumber?: Array<number>;\n};\n\n/**\n * This is a model with one property containing a dictionary\n */\nexport type ModelWithDictionary = {\n    prop?: {\n        [key: string]: string;\n    };\n};\n\n/**\n * This is a deprecated model with a deprecated property\n *\n * @deprecated\n */\nexport type DeprecatedModel = {\n    /**\n     * This is a deprecated property\n     *\n     * @deprecated\n     */\n    prop?: string;\n};\n\n/**\n * This is a model with one property containing a circular reference\n */\nexport type ModelWithCircularReference = {\n    prop?: ModelWithCircularReference;\n};\n\n/**\n * This is a model with one property with a 'one of' relationship\n */\nexport type CompositionWithOneOf = {\n    propA?: ModelWithString | ModelWithEnum | ModelWithArray | ModelWithDictionary;\n};\n\n/**\n * This is a model with one property with a 'one of' relationship where the options are not $ref\n */\nexport type CompositionWithOneOfAnonymous = {\n    propA?: {\n        propA?: string;\n    } | string | number;\n};\n\n/**\n * Circle\n */\nexport type ModelCircle = {\n    kind: string;\n    radius?: number;\n};\n\n/**\n * Square\n */\nexport type ModelSquare = {\n    kind: string;\n    sideLength?: number;\n};\n\n/**\n * This is a model with one property with a 'one of' relationship where the options are not $ref\n */\nexport type CompositionWithOneOfDiscriminator = ({\n    kind: 'circle';\n} & ModelCircle) | ({\n    kind: 'square';\n} & ModelSquare);\n\n/**\n * This is a model with one property with a 'any of' relationship\n */\nexport type CompositionWithAnyOf = {\n    propA?: ModelWithString | ModelWithEnum | ModelWithArray | ModelWithDictionary;\n};\n\n/**\n * This is a model with one property with a 'any of' relationship where the options are not $ref\n */\nexport type CompositionWithAnyOfAnonymous = {\n    propA?: {\n        propA?: string;\n    } | string | number;\n};\n\n/**\n * This is a model with nested 'any of' property with a type null\n */\nexport type CompositionWithNestedAnyAndTypeNull = {\n    propA?: Array<ModelWithDictionary | null> | Array<ModelWithArray | null>;\n};\n\nexport type _3eNum1Период = 'Bird' | 'Dog';\n\nexport type ConstValue = 'ConstValue';\n\n/**\n * This is a model with one property with a 'any of' relationship where the options are not $ref\n */\nexport type CompositionWithNestedAnyOfAndNull = {\n    /**\n     * Scopes\n     */\n    propA?: Array<_3eNum1Период | ConstValue> | null;\n};\n\n/**\n * This is a model with one property with a 'one of' relationship\n */\nexport type CompositionWithOneOfAndNullable = {\n    propA?: {\n        boolean?: boolean;\n    } | ModelWithEnum | ModelWithArray | ModelWithDictionary | null;\n};\n\n/**\n * This is a model that contains a simple dictionary within composition\n */\nexport type CompositionWithOneOfAndSimpleDictionary = {\n    propA?: boolean | {\n        [key: string]: number;\n    };\n};\n\n/**\n * This is a model that contains a dictionary of simple arrays within composition\n */\nexport type CompositionWithOneOfAndSimpleArrayDictionary = {\n    propA?: boolean | {\n        [key: string]: Array<boolean>;\n    };\n};\n\n/**\n * This is a model that contains a dictionary of complex arrays (composited) within composition\n */\nexport type CompositionWithOneOfAndComplexArrayDictionary = {\n    propA?: boolean | {\n        [key: string]: Array<number | string>;\n    };\n};\n\n/**\n * This is a model with one property with a 'all of' relationship\n */\nexport type CompositionWithAllOfAndNullable = {\n    propA?: ({\n        boolean?: boolean;\n    } & ModelWithEnum & ModelWithArray & ModelWithDictionary) | null;\n};\n\n/**\n * This is a model with one property with a 'any of' relationship\n */\nexport type CompositionWithAnyOfAndNullable = {\n    propA?: {\n        boolean?: boolean;\n    } | ModelWithEnum | ModelWithArray | ModelWithDictionary | null;\n};\n\n/**\n * This is a base model with two simple optional properties\n */\nexport type CompositionBaseModel = {\n    firstName?: string;\n    lastname?: string;\n};\n\n/**\n * This is a model that extends the base model\n */\nexport type CompositionExtendedModel = CompositionBaseModel & {\n    age: number;\n    firstName: string;\n    lastname: string;\n};\n\n/**\n * This is a model with one nested property\n */\nexport type ModelWithProperties = {\n    required: string;\n    readonly requiredAndReadOnly: string;\n    requiredAndNullable: string | null;\n    string?: string;\n    number?: number;\n    boolean?: boolean;\n    reference?: ModelWithString;\n    'property with space'?: string;\n    default?: string;\n    try?: string;\n    readonly '@namespace.string'?: string;\n    readonly '@namespace.integer'?: number;\n};\n\n/**\n * This is a model with one nested property\n */\nexport type ModelWithNestedProperties = {\n    readonly first: {\n        readonly second: {\n            readonly third: string | null;\n        } | null;\n    } | null;\n};\n\n/**\n * This is a model with duplicated properties\n */\nexport type ModelWithDuplicateProperties = {\n    prop?: ModelWithString;\n};\n\n/**\n * This is a model with ordered properties\n */\nexport type ModelWithOrderedProperties = {\n    zebra?: string;\n    apple?: string;\n    hawaii?: string;\n};\n\n/**\n * This is a model with duplicated imports\n */\nexport type ModelWithDuplicateImports = {\n    propA?: ModelWithString;\n    propB?: ModelWithString;\n    propC?: ModelWithString;\n};\n\n/**\n * This is a model that extends another model\n */\nexport type ModelThatExtends = ModelWithString & {\n    propExtendsA?: string;\n    propExtendsB?: ModelWithString;\n};\n\n/**\n * This is a model that extends another model\n */\nexport type ModelThatExtendsExtends = ModelWithString & ModelThatExtends & {\n    propExtendsC?: string;\n    propExtendsD?: ModelWithString;\n};\n\n/**\n * This is a model that contains a some patterns\n */\nexport type ModelWithPattern = {\n    key: string;\n    name: string;\n    readonly enabled?: boolean;\n    readonly modified?: string;\n    id?: string;\n    text?: string;\n    patternWithSingleQuotes?: string;\n    patternWithNewline?: string;\n    patternWithBacktick?: string;\n    patternWithUnicode?: string;\n};\n\nexport type File = {\n    /**\n     * Id\n     */\n    readonly id?: string;\n    /**\n     * Updated at\n     */\n    readonly updated_at?: string;\n    /**\n     * Created at\n     */\n    readonly created_at?: string;\n    /**\n     * Mime\n     */\n    mime: string;\n    /**\n     * File\n     */\n    readonly file?: string;\n};\n\nexport type Default = {\n    name?: string;\n};\n\nexport type Pageable = {\n    page?: number;\n    size?: number;\n    sort?: Array<string>;\n};\n\n/**\n * This is a free-form object without additionalProperties.\n */\nexport type FreeFormObjectWithoutAdditionalProperties = {\n    [key: string]: unknown;\n};\n\n/**\n * This is a free-form object with additionalProperties: true.\n */\nexport type FreeFormObjectWithAdditionalPropertiesEqTrue = {\n    [key: string]: unknown;\n};\n\n/**\n * This is a free-form object with additionalProperties: {}.\n */\nexport type FreeFormObjectWithAdditionalPropertiesEqEmptyObject = {\n    [key: string]: unknown;\n};\n\nexport type ModelWithConst = {\n    String?: 'String';\n    number?: 0;\n    null?: null;\n    withType?: 'Some string';\n};\n\n/**\n * This is a model with one property and additionalProperties: true\n */\nexport type ModelWithAdditionalPropertiesEqTrue = {\n    /**\n     * This is a simple string property\n     */\n    prop?: string;\n    [key: string]: unknown;\n};\n\nexport type NestedAnyOfArraysNullable = {\n    nullableArray?: Array<string | boolean> | null;\n};\n\nexport type CompositionWithOneOfAndProperties = ({\n    foo: SimpleParameter;\n} | {\n    bar: NonAsciiStringæøåÆøÅöôêÊ字符串;\n}) & {\n    baz: number | null;\n    qux: number;\n};\n\n/**\n * An object that can be null\n */\nexport type NullableObject = {\n    foo?: string;\n} | null;\n\n/**\n * Some % character\n */\nexport type CharactersInDescription = string;\n\nexport type ModelWithNullableObject = {\n    data?: NullableObject;\n};\n\n/**\n * An object with additional properties that can be null (anyOf ref + null)\n */\nexport type ModelWithAdditionalPropertiesRef = {\n    [key: string]: NullableObject | null;\n};\n\nexport type ModelWithOneOfEnum = {\n    foo: 'Bar';\n} | {\n    foo: 'Baz';\n} | {\n    foo: 'Qux';\n} | {\n    content: string;\n    foo: 'Quux';\n} | {\n    content: [\n        string,\n        string\n    ];\n    foo: 'Corge';\n};\n\nexport type ModelWithNestedArrayEnumsDataFoo = 'foo' | 'bar';\n\nexport type ModelWithNestedArrayEnumsDataBar = 'baz' | 'qux';\n\nexport type ModelWithNestedArrayEnumsData = {\n    foo?: Array<ModelWithNestedArrayEnumsDataFoo>;\n    bar?: Array<ModelWithNestedArrayEnumsDataBar>;\n};\n\nexport type ModelWithNestedArrayEnums = {\n    array_strings?: Array<string>;\n    data?: ModelWithNestedArrayEnumsData;\n};\n\nexport type ModelWithNestedCompositionEnums = {\n    foo?: ModelWithNestedArrayEnumsDataFoo;\n};\n\nexport type ModelWithReadOnlyAndWriteOnly = {\n    foo: string;\n    readonly bar: string;\n};\n\nexport type ModelWithConstantSizeArray = [\n    number,\n    number\n];\n\nexport type ModelWithAnyOfConstantSizeArray = [\n    number | string,\n    number | string,\n    number | string\n];\n\nexport type ModelWithPrefixItemsConstantSizeArray = [\n    ModelWithInteger,\n    number | string,\n    string\n];\n\nexport type ModelWithAnyOfConstantSizeArrayNullable = [\n    number | null | string,\n    number | null | string,\n    number | null | string\n];\n\nexport type ModelWithAnyOfConstantSizeArrayWithNSizeAndOptions = [\n    number | Import,\n    number | Import\n];\n\nexport type ModelWithAnyOfConstantSizeArrayAndIntersect = [\n    number & string,\n    number & string\n];\n\nexport type ModelWithNumericEnumUnion = {\n    /**\n     * Период\n     */\n    value?: -10 | -1 | 0 | 1 | 3 | 6 | 12;\n};\n\n/**\n * Some description with `back ticks`\n */\nexport type ModelWithBackticksInDescription = {\n    /**\n     * The template `that` should be used for parsing and importing the contents of the CSV file.\n     *\n     * <br/><p>There is one placeholder currently supported:<ul>     <li><b>${x}</b> - refers to the n-th column in the CSV file, e.g. ${1}, ${2}, ...)</li></ul><p>Example of a correct JSON template:</p>\n     * <pre>\n     * [\n     * {\n     * \"resourceType\": \"Asset\",\n     * \"identifier\": {\n     * \"name\": \"${1}\",\n     * \"domain\": {\n     * \"name\": \"${2}\",\n     * \"community\": {\n     * \"name\": \"Some Community\"\n     * }\n     * }\n     * },\n     * \"attributes\" : {\n     * \"00000000-0000-0000-0000-000000003115\" : [ {\n     * \"value\" : \"${3}\"\n     * } ],\n     * \"00000000-0000-0000-0000-000000000222\" : [ {\n     * \"value\" : \"${4}\"\n     * } ]\n     * }\n     * }\n     * ]\n     * </pre>\n     */\n    template?: string;\n};\n\nexport type ModelWithOneOfAndProperties = (SimpleParameter | NonAsciiStringæøåÆøÅöôêÊ字符串) & {\n    baz: number | null;\n    qux: number;\n};\n\n/**\n * Model used to test deduplication strategy (unused)\n */\nexport type ParameterSimpleParameterUnused = string;\n\n/**\n * Model used to test deduplication strategy\n */\nexport type PostServiceWithEmptyTagResponse = string;\n\n/**\n * Model used to test deduplication strategy\n */\nexport type PostServiceWithEmptyTagResponse2 = string;\n\n/**\n * Model used to test deduplication strategy\n */\nexport type DeleteFooData = string;\n\n/**\n * Model used to test deduplication strategy\n */\nexport type DeleteFooData2 = string;\n\n/**\n * Model with restricted keyword name\n */\nexport type Import = string;\n\nexport type SchemaWithFormRestrictedKeys = {\n    description?: string;\n    'x-enum-descriptions'?: string;\n    'x-enum-varnames'?: string;\n    'x-enumNames'?: string;\n    title?: string;\n    object?: {\n        description?: string;\n        'x-enum-descriptions'?: string;\n        'x-enum-varnames'?: string;\n        'x-enumNames'?: string;\n        title?: string;\n    };\n    array?: Array<{\n        description?: string;\n        'x-enum-descriptions'?: string;\n        'x-enum-varnames'?: string;\n        'x-enumNames'?: string;\n        title?: string;\n    }>;\n};\n\n/**\n * This schema was giving PascalCase transformations a hard time\n */\nexport type IoK8sApimachineryPkgApisMetaV1DeleteOptions = {\n    /**\n     * Must be fulfilled before a deletion is carried out. If not possible, a 409 Conflict status will be returned.\n     */\n    preconditions?: IoK8sApimachineryPkgApisMetaV1Preconditions;\n};\n\n/**\n * This schema was giving PascalCase transformations a hard time\n */\nexport type IoK8sApimachineryPkgApisMetaV1Preconditions = {\n    /**\n     * Specifies the target ResourceVersion\n     */\n    resourceVersion?: string;\n    /**\n     * Specifies the target UID.\n     */\n    uid?: string;\n};\n\nexport type AdditionalPropertiesUnknownIssue = {\n    [key: string]: string | number;\n};\n\nexport type AdditionalPropertiesUnknownIssue2 = {\n    [key: string]: string | number;\n};\n\nexport type AdditionalPropertiesUnknownIssue3 = string & {\n    entries: {\n        [key: string]: AdditionalPropertiesUnknownIssue;\n    };\n};\n\nexport type AdditionalPropertiesIntegerIssue = {\n    value: number;\n    [key: string]: number;\n};\n\nexport type OneOfAllOfIssue = ((ConstValue | GenericSchemaDuplicateIssue1SystemBoolean) & _3eNum1Период) | GenericSchemaDuplicateIssue1SystemString;\n\nexport type GenericSchemaDuplicateIssue1SystemBoolean = {\n    item?: boolean;\n    error?: string | null;\n    readonly hasError?: boolean;\n    data?: {\n        [key: string]: never;\n    };\n};\n\nexport type GenericSchemaDuplicateIssue1SystemString = {\n    item?: string | null;\n    error?: string | null;\n    readonly hasError?: boolean;\n};\n\nexport type ExternalSharedModel = {\n    id: string;\n    name?: string;\n};\n\n/**\n * This is a model with one property containing a reference\n */\nexport type ModelWithReferenceWritable = {\n    prop?: ModelWithPropertiesWritable;\n};\n\n/**\n * This is a model with one property containing an array\n */\nexport type ModelWithArrayReadOnlyAndWriteOnlyWritable = {\n    prop?: Array<ModelWithReadOnlyAndWriteOnlyWritable>;\n    propWithFile?: Array<Blob | File>;\n    propWithNumber?: Array<number>;\n};\n\n/**\n * This is a model with one nested property\n */\nexport type ModelWithPropertiesWritable = {\n    required: string;\n    requiredAndNullable: string | null;\n    string?: string;\n    number?: number;\n    boolean?: boolean;\n    reference?: ModelWithString;\n    'property with space'?: string;\n    default?: string;\n    try?: string;\n};\n\n/**\n * This is a model that contains a some patterns\n */\nexport type ModelWithPatternWritable = {\n    key: string;\n    name: string;\n    id?: string;\n    text?: string;\n    patternWithSingleQuotes?: string;\n    patternWithNewline?: string;\n    patternWithBacktick?: string;\n    patternWithUnicode?: string;\n};\n\nexport type FileWritable = {\n    /**\n     * Mime\n     */\n    mime: string;\n};\n\nexport type ModelWithReadOnlyAndWriteOnlyWritable = {\n    foo: string;\n    baz: string;\n};\n\nexport type ModelWithAnyOfConstantSizeArrayWithNSizeAndOptionsWritable = [\n    number | Import,\n    number | Import\n];\n\nexport type AdditionalPropertiesUnknownIssueWritable = {\n    [key: string]: string | number;\n};\n\nexport type OneOfAllOfIssueWritable = ((ConstValue | GenericSchemaDuplicateIssue1SystemBoolean) & _3eNum1Период) | GenericSchemaDuplicateIssue1SystemString;\n\nexport type GenericSchemaDuplicateIssue1SystemBooleanWritable = {\n    item?: boolean;\n    error?: string | null;\n    data?: {\n        [key: string]: never;\n    };\n};\n\nexport type GenericSchemaDuplicateIssue1SystemStringWritable = {\n    item?: string | null;\n    error?: string | null;\n};\n\n/**\n * This is a reusable parameter\n */\nexport type SimpleParameter = string;\n\n/**\n * Parameter with illegal characters\n */\nexport type XFooBar = ModelWithString;\n\n/**\n * A reusable request body\n */\nexport type SimpleRequestBody = ModelWithString;\n\n/**\n * A reusable request body\n */\nexport type SimpleFormData = ModelWithString;\n\nexport type ExportData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no+tag';\n};\n\nexport type PatchApiVbyApiVersionNoTagData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no+tag';\n};\n\nexport type PatchApiVbyApiVersionNoTagResponses = {\n    /**\n     * OK\n     */\n    default: unknown;\n};\n\nexport type ImportData = {\n    body: ModelWithReadOnlyAndWriteOnlyWritable | ModelWithArrayReadOnlyAndWriteOnlyWritable;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no+tag';\n};\n\nexport type ImportResponses = {\n    /**\n     * Success\n     */\n    200: ModelFromZendesk;\n    /**\n     * Default success response\n     */\n    default: ModelWithReadOnlyAndWriteOnly;\n};\n\nexport type ImportResponse = ImportResponses[keyof ImportResponses];\n\nexport type FooWowData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no+tag';\n};\n\nexport type FooWowResponses = {\n    /**\n     * OK\n     */\n    default: unknown;\n};\n\nexport type ApiVVersionODataControllerCountData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple/$count';\n};\n\nexport type ApiVVersionODataControllerCountResponses = {\n    /**\n     * Success\n     */\n    200: ModelFromZendesk;\n};\n\nexport type ApiVVersionODataControllerCountResponse = ApiVVersionODataControllerCountResponses[keyof ApiVVersionODataControllerCountResponses];\n\nexport type GetApiVbyApiVersionSimpleOperationData = {\n    body?: never;\n    path: {\n        /**\n         * foo in method\n         */\n        foo_param: string;\n    };\n    query?: never;\n    url: '/api/v{api-version}/simple:operation';\n};\n\nexport type GetApiVbyApiVersionSimpleOperationErrors = {\n    /**\n     * Default error response\n     */\n    default: ModelWithBoolean;\n};\n\nexport type GetApiVbyApiVersionSimpleOperationError = GetApiVbyApiVersionSimpleOperationErrors[keyof GetApiVbyApiVersionSimpleOperationErrors];\n\nexport type GetApiVbyApiVersionSimpleOperationResponses = {\n    /**\n     * Response is a simple number\n     */\n    200: number;\n};\n\nexport type GetApiVbyApiVersionSimpleOperationResponse = GetApiVbyApiVersionSimpleOperationResponses[keyof GetApiVbyApiVersionSimpleOperationResponses];\n\nexport type DeleteCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type GetCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type HeadCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type OptionsCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type PatchCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type PostCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type PutCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type DeleteFooData3 = {\n    body?: never;\n    headers: {\n        /**\n         * Parameter with illegal characters\n         */\n        'x-Foo-Bar': ModelWithString;\n    };\n    path: {\n        /**\n         * foo in method\n         */\n        foo_param: string;\n        /**\n         * bar in method\n         */\n        BarParam: string;\n    };\n    query?: never;\n    url: '/api/v{api-version}/foo/{foo_param}/bar/{BarParam}';\n};\n\nexport type CallWithDescriptionsData = {\n    body?: never;\n    path?: never;\n    query?: {\n        /**\n         * Testing multiline comments in string: First line\n         * Second line\n         *\n         * Fourth line\n         */\n        parameterWithBreaks?: string;\n        /**\n         * Testing backticks in string: `backticks` and ```multiple backticks``` should work\n         */\n        parameterWithBackticks?: string;\n        /**\n         * Testing slashes in string: \\backwards\\\\\\ and /forwards/// should work\n         */\n        parameterWithSlashes?: string;\n        /**\n         * Testing expression placeholders in string: ${expression} should work\n         */\n        parameterWithExpressionPlaceholders?: string;\n        /**\n         * Testing quotes in string: 'single quote''' and \"double quotes\"\"\" should work\n         */\n        parameterWithQuotes?: string;\n        /**\n         * Testing reserved characters in string: * inline * and ** inline ** should work\n         */\n        parameterWithReservedCharacters?: string;\n    };\n    url: '/api/v{api-version}/descriptions';\n};\n\nexport type DeprecatedCallData = {\n    body?: never;\n    headers: {\n        /**\n         * This parameter is deprecated\n         *\n         * @deprecated\n         */\n        parameter: DeprecatedModel | null;\n    };\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/parameters/deprecated';\n};\n\nexport type CallWithParametersData = {\n    /**\n     * This is the parameter that goes into the body\n     */\n    body: {\n        [key: string]: unknown;\n    } | null;\n    headers: {\n        /**\n         * This is the parameter that goes into the header\n         */\n        parameterHeader: string | null;\n    };\n    path: {\n        /**\n         * This is the parameter that goes into the path\n         */\n        parameterPath: string | null;\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string | null;\n    };\n    query: {\n        foo_ref_enum?: ModelWithNestedArrayEnumsDataFoo;\n        foo_all_of_enum: ModelWithNestedArrayEnumsDataFoo;\n        /**\n         * This is the parameter that goes into the query params\n         */\n        cursor: string | null;\n    };\n    url: '/api/v{api-version}/parameters/{parameterPath}';\n};\n\nexport type CallWithWeirdParameterNamesData = {\n    /**\n     * This is the parameter that goes into the body\n     */\n    body: ModelWithString | null;\n    headers: {\n        /**\n         * This is the parameter that goes into the request header\n         */\n        'parameter.header': string | null;\n    };\n    path: {\n        /**\n         * This is the parameter that goes into the path\n         */\n        'parameter.path.1'?: string;\n        /**\n         * This is the parameter that goes into the path\n         */\n        'parameter-path-2'?: string;\n        /**\n         * This is the parameter that goes into the path\n         */\n        'PARAMETER-PATH-3'?: string;\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string | null;\n    };\n    query: {\n        /**\n         * This is the parameter with a reserved keyword\n         */\n        default?: string;\n        /**\n         * This is the parameter that goes into the request query params\n         */\n        'parameter-query': string | null;\n    };\n    url: '/api/v{api-version}/parameters/{parameter.path.1}/{parameter-path-2}/{PARAMETER-PATH-3}';\n};\n\nexport type GetCallWithOptionalParamData = {\n    /**\n     * This is a required parameter\n     */\n    body: ModelWithOneOfEnum;\n    path?: never;\n    query?: {\n        /**\n         * This is an optional parameter\n         */\n        page?: number;\n    };\n    url: '/api/v{api-version}/parameters';\n};\n\nexport type PostCallWithOptionalParamData = {\n    /**\n     * This is an optional parameter\n     */\n    body?: {\n        offset?: number | null;\n    };\n    path?: never;\n    query: {\n        /**\n         * This is a required parameter\n         */\n        parameter: Pageable;\n    };\n    url: '/api/v{api-version}/parameters';\n};\n\nexport type PostCallWithOptionalParamResponses = {\n    /**\n     * Response is a simple number\n     */\n    200: number;\n    /**\n     * Success\n     */\n    204: void;\n};\n\nexport type PostCallWithOptionalParamResponse = PostCallWithOptionalParamResponses[keyof PostCallWithOptionalParamResponses];\n\nexport type PostApiVbyApiVersionRequestBodyData = {\n    /**\n     * A reusable request body\n     */\n    body?: SimpleRequestBody;\n    path?: never;\n    query?: {\n        /**\n         * This is a reusable parameter\n         */\n        parameter?: string;\n    };\n    url: '/api/v{api-version}/requestBody';\n};\n\nexport type PostApiVbyApiVersionFormDataData = {\n    /**\n     * A reusable request body\n     */\n    body?: SimpleFormData;\n    path?: never;\n    query?: {\n        /**\n         * This is a reusable parameter\n         */\n        parameter?: string;\n    };\n    url: '/api/v{api-version}/formData';\n};\n\nexport type CallWithDefaultParametersData = {\n    body?: never;\n    path?: never;\n    query?: {\n        /**\n         * This is a simple string with default value\n         */\n        parameterString?: string | null;\n        /**\n         * This is a simple number with default value\n         */\n        parameterNumber?: number | null;\n        /**\n         * This is a simple boolean with default value\n         */\n        parameterBoolean?: boolean | null;\n        /**\n         * This is a simple enum with default value\n         */\n        parameterEnum?: 'Success' | 'Warning' | 'Error';\n        /**\n         * This is a simple model with default value\n         */\n        parameterModel?: ModelWithString | null;\n    };\n    url: '/api/v{api-version}/defaults';\n};\n\nexport type CallWithDefaultOptionalParametersData = {\n    body?: never;\n    path?: never;\n    query?: {\n        /**\n         * This is a simple string that is optional with default value\n         */\n        parameterString?: string;\n        /**\n         * This is a simple number that is optional with default value\n         */\n        parameterNumber?: number;\n        /**\n         * This is a simple boolean that is optional with default value\n         */\n        parameterBoolean?: boolean;\n        /**\n         * This is a simple enum that is optional with default value\n         */\n        parameterEnum?: 'Success' | 'Warning' | 'Error';\n        /**\n         * This is a simple model that is optional with default value\n         */\n        parameterModel?: ModelWithString;\n    };\n    url: '/api/v{api-version}/defaults';\n};\n\nexport type CallToTestOrderOfParamsData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * This is a optional string with default\n         */\n        parameterOptionalStringWithDefault?: string;\n        /**\n         * This is a optional string with empty default\n         */\n        parameterOptionalStringWithEmptyDefault?: string;\n        /**\n         * This is a optional string with no default\n         */\n        parameterOptionalStringWithNoDefault?: string;\n        /**\n         * This is a string with default\n         */\n        parameterStringWithDefault: string;\n        /**\n         * This is a string with empty default\n         */\n        parameterStringWithEmptyDefault: string;\n        /**\n         * This is a string with no default\n         */\n        parameterStringWithNoDefault: string;\n        /**\n         * This is a string that can be null with no default\n         */\n        parameterStringNullableWithNoDefault?: string | null;\n        /**\n         * This is a string that can be null with default\n         */\n        parameterStringNullableWithDefault?: string | null;\n    };\n    url: '/api/v{api-version}/defaults';\n};\n\nexport type DuplicateNameData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/duplicate';\n};\n\nexport type DuplicateName2Data = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/duplicate';\n};\n\nexport type DuplicateName3Data = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/duplicate';\n};\n\nexport type DuplicateName4Data = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/duplicate';\n};\n\nexport type CallWithNoContentResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no-content';\n};\n\nexport type CallWithNoContentResponseResponses = {\n    /**\n     * Success\n     */\n    204: void;\n};\n\nexport type CallWithNoContentResponseResponse = CallWithNoContentResponseResponses[keyof CallWithNoContentResponseResponses];\n\nexport type CallWithResponseAndNoContentResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multiple-tags/response-and-no-content';\n};\n\nexport type CallWithResponseAndNoContentResponseResponses = {\n    /**\n     * Response is a simple number\n     */\n    200: number;\n    /**\n     * Success\n     */\n    204: void;\n};\n\nexport type CallWithResponseAndNoContentResponseResponse = CallWithResponseAndNoContentResponseResponses[keyof CallWithResponseAndNoContentResponseResponses];\n\nexport type DummyAData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multiple-tags/a';\n};\n\nexport type DummyAResponses = {\n    200: _400;\n};\n\nexport type DummyAResponse = DummyAResponses[keyof DummyAResponses];\n\nexport type DummyBData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multiple-tags/b';\n};\n\nexport type DummyBResponses = {\n    /**\n     * Success\n     */\n    204: void;\n};\n\nexport type DummyBResponse = DummyBResponses[keyof DummyBResponses];\n\nexport type CallWithResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/response';\n};\n\nexport type CallWithResponseResponses = {\n    default: Import;\n};\n\nexport type CallWithResponseResponse = CallWithResponseResponses[keyof CallWithResponseResponses];\n\nexport type CallWithDuplicateResponsesData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/response';\n};\n\nexport type CallWithDuplicateResponsesErrors = {\n    /**\n     * Message for 500 error\n     */\n    500: ModelWithStringError;\n    /**\n     * Message for 501 error\n     */\n    501: ModelWithStringError;\n    /**\n     * Message for 502 error\n     */\n    502: ModelWithStringError;\n    /**\n     * Message for 4XX errors\n     */\n    '4XX': DictionaryWithArray;\n    /**\n     * Default error response\n     */\n    default: ModelWithBoolean;\n};\n\nexport type CallWithDuplicateResponsesError = CallWithDuplicateResponsesErrors[keyof CallWithDuplicateResponsesErrors];\n\nexport type CallWithDuplicateResponsesResponses = {\n    /**\n     * Message for 200 response\n     */\n    200: ModelWithBoolean & ModelWithInteger;\n    /**\n     * Message for 201 response\n     */\n    201: ModelWithString;\n    /**\n     * Message for 202 response\n     */\n    202: ModelWithString;\n};\n\nexport type CallWithDuplicateResponsesResponse = CallWithDuplicateResponsesResponses[keyof CallWithDuplicateResponsesResponses];\n\nexport type CallWithResponsesData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/response';\n};\n\nexport type CallWithResponsesErrors = {\n    /**\n     * Message for 500 error\n     */\n    500: ModelWithStringError;\n    /**\n     * Message for 501 error\n     */\n    501: ModelWithStringError;\n    /**\n     * Message for 502 error\n     */\n    502: ModelWithStringError;\n    /**\n     * Message for default response\n     */\n    default: ModelWithStringError;\n};\n\nexport type CallWithResponsesError = CallWithResponsesErrors[keyof CallWithResponsesErrors];\n\nexport type CallWithResponsesResponses = {\n    /**\n     * Message for 200 response\n     */\n    200: {\n        readonly '@namespace.string'?: string;\n        readonly '@namespace.integer'?: number;\n        readonly value?: Array<ModelWithString>;\n    };\n    /**\n     * Message for 201 response\n     */\n    201: ModelThatExtends;\n    /**\n     * Message for 202 response\n     */\n    202: ModelThatExtendsExtends;\n};\n\nexport type CallWithResponsesResponse = CallWithResponsesResponses[keyof CallWithResponsesResponses];\n\nexport type CollectionFormatData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * This is an array parameter that is sent as csv format (comma-separated values)\n         */\n        parameterArrayCSV: Array<string> | null;\n        /**\n         * This is an array parameter that is sent as ssv format (space-separated values)\n         */\n        parameterArraySSV: Array<string> | null;\n        /**\n         * This is an array parameter that is sent as tsv format (tab-separated values)\n         */\n        parameterArrayTSV: Array<string> | null;\n        /**\n         * This is an array parameter that is sent as pipes format (pipe-separated values)\n         */\n        parameterArrayPipes: Array<string> | null;\n        /**\n         * This is an array parameter that is sent as multi format (multiple parameter instances)\n         */\n        parameterArrayMulti: Array<string> | null;\n    };\n    url: '/api/v{api-version}/collectionFormat';\n};\n\nexport type TypesData = {\n    body?: never;\n    path?: {\n        /**\n         * This is a number parameter\n         */\n        id?: number;\n    };\n    query: {\n        /**\n         * This is a number parameter\n         */\n        parameterNumber: number;\n        /**\n         * This is a string parameter\n         */\n        parameterString: string | null;\n        /**\n         * This is a boolean parameter\n         */\n        parameterBoolean: boolean | null;\n        /**\n         * This is an object parameter\n         */\n        parameterObject: {\n            [key: string]: unknown;\n        } | null;\n        /**\n         * This is an array parameter\n         */\n        parameterArray: Array<string> | null;\n        /**\n         * This is a dictionary parameter\n         */\n        parameterDictionary: {\n            [key: string]: unknown;\n        } | null;\n        /**\n         * This is an enum parameter\n         */\n        parameterEnum: 'Success' | 'Warning' | 'Error' | null;\n    };\n    url: '/api/v{api-version}/types';\n};\n\nexport type TypesResponses = {\n    /**\n     * Response is a simple number\n     */\n    200: number;\n    /**\n     * Response is a simple string\n     */\n    201: string;\n    /**\n     * Response is a simple boolean\n     */\n    202: boolean;\n    /**\n     * Response is a simple object\n     */\n    203: {\n        [key: string]: unknown;\n    };\n};\n\nexport type TypesResponse = TypesResponses[keyof TypesResponses];\n\nexport type UploadFileData = {\n    body: Blob | File;\n    path: {\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string | null;\n    };\n    query?: never;\n    url: '/api/v{api-version}/upload';\n};\n\nexport type UploadFileResponses = {\n    200: boolean;\n};\n\nexport type UploadFileResponse = UploadFileResponses[keyof UploadFileResponses];\n\nexport type FileResponseData = {\n    body?: never;\n    path: {\n        id: string;\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string;\n    };\n    query?: never;\n    url: '/api/v{api-version}/file/{id}';\n};\n\nexport type FileResponseResponses = {\n    /**\n     * Success\n     */\n    200: Blob | File;\n};\n\nexport type FileResponseResponse = FileResponseResponses[keyof FileResponseResponses];\n\nexport type ComplexTypesData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * Parameter containing object\n         */\n        parameterObject: {\n            first?: {\n                second?: {\n                    third?: string;\n                };\n            };\n        };\n        /**\n         * Parameter containing reference\n         */\n        parameterReference: ModelWithString;\n    };\n    url: '/api/v{api-version}/complex';\n};\n\nexport type ComplexTypesErrors = {\n    /**\n     * 400 `server` error\n     */\n    400: unknown;\n    /**\n     * 500 server error\n     */\n    500: unknown;\n};\n\nexport type ComplexTypesResponses = {\n    /**\n     * Successful response\n     */\n    200: Array<ModelWithString>;\n};\n\nexport type ComplexTypesResponse = ComplexTypesResponses[keyof ComplexTypesResponses];\n\nexport type MultipartResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multipart';\n};\n\nexport type MultipartResponseResponses = {\n    /**\n     * OK\n     */\n    200: {\n        file?: Blob | File;\n        metadata?: {\n            foo?: string;\n            bar?: string;\n        };\n    };\n};\n\nexport type MultipartResponseResponse = MultipartResponseResponses[keyof MultipartResponseResponses];\n\nexport type MultipartRequestData = {\n    body?: {\n        content?: Blob | File;\n        data?: ModelWithString | null;\n    };\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multipart';\n};\n\nexport type ComplexParamsData = {\n    body?: {\n        readonly key: string | null;\n        name: string | null;\n        enabled?: boolean;\n        type: 'Monkey' | 'Horse' | 'Bird';\n        listOfModels?: Array<ModelWithString> | null;\n        listOfStrings?: Array<string> | null;\n        parameters: ModelWithString | ModelWithEnum | ModelWithArray | ModelWithDictionary;\n        readonly user?: {\n            readonly id?: number;\n            readonly name?: string | null;\n        };\n    };\n    path: {\n        id: number;\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string;\n    };\n    query?: never;\n    url: '/api/v{api-version}/complex/{id}';\n};\n\nexport type ComplexParamsResponses = {\n    /**\n     * Success\n     */\n    200: ModelWithString;\n};\n\nexport type ComplexParamsResponse = ComplexParamsResponses[keyof ComplexParamsResponses];\n\nexport type CallWithResultFromHeaderData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/header';\n};\n\nexport type CallWithResultFromHeaderErrors = {\n    /**\n     * 400 server error\n     */\n    400: unknown;\n    /**\n     * 500 server error\n     */\n    500: unknown;\n};\n\nexport type CallWithResultFromHeaderResponses = {\n    /**\n     * Successful response\n     */\n    200: unknown;\n};\n\nexport type TestErrorCodeData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * Status code to return\n         */\n        status: number;\n    };\n    url: '/api/v{api-version}/error';\n};\n\nexport type TestErrorCodeErrors = {\n    /**\n     * Custom message: Internal Server Error\n     */\n    500: unknown;\n    /**\n     * Custom message: Not Implemented\n     */\n    501: unknown;\n    /**\n     * Custom message: Bad Gateway\n     */\n    502: unknown;\n    /**\n     * Custom message: Service Unavailable\n     */\n    503: unknown;\n};\n\nexport type TestErrorCodeResponses = {\n    /**\n     * Custom message: Successful response\n     */\n    200: unknown;\n};\n\nexport type NonAsciiæøåÆøÅöôêÊ字符串Data = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * Dummy input param\n         */\n        nonAsciiParamæøåÆØÅöôêÊ: number;\n    };\n    url: '/api/v{api-version}/non-ascii-æøåÆØÅöôêÊ字符串';\n};\n\nexport type NonAsciiæøåÆøÅöôêÊ字符串Responses = {\n    /**\n     * Successful response\n     */\n    200: Array<NonAsciiStringæøåÆøÅöôêÊ字符串>;\n};\n\nexport type NonAsciiæøåÆøÅöôêÊ字符串Response = NonAsciiæøåÆøÅöôêÊ字符串Responses[keyof NonAsciiæøåÆøÅöôêÊ字符串Responses];\n\nexport type PutWithFormUrlEncodedData = {\n    body: ArrayWithStrings;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/non-ascii-æøåÆØÅöôêÊ字符串';\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-next/base-url-strict/client/client.gen.ts",
    "content": "// 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<Response, unknown, ResolvedRequestOptions>();\n\n  const beforeRequest = async (options: RequestOptions) => {\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 url = buildUrl(opts);\n\n    return { opts, url };\n  };\n\n  // @ts-expect-error\n  const request: Client['request'] = async (options) => {\n    // @ts-expect-error\n    const { opts, url } = await beforeRequest(options);\n\n    for (const fn of interceptors.request.fns) {\n      if (fn) {\n        await fn(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    const requestInit: ReqInit = {\n      ...opts,\n      body: getValidRequestBody(opts),\n    };\n\n    let response = await _fetch(url, requestInit);\n\n    for (const fn of interceptors.response.fns) {\n      if (fn) {\n        response = await fn(response, opts);\n      }\n    }\n\n    const result = {\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 {\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 {\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 {\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, opts)) as string;\n      }\n    }\n\n    finalError = finalError || ({} as string);\n\n    if (opts.throwOnError) {\n      throw finalError;\n    }\n\n    return {\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        const requestInit = {\n          ...init,\n          method: init.method as Config['method'],\n          url,\n        };\n        for (const fn of interceptors.request.fns) {\n          if (fn) {\n            await fn(requestInit);\n            request = new Request(requestInit.url, requestInit);\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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-next/base-url-strict/client/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type { Auth } from '../core/auth.gen';\nexport type { QuerySerializerOptions } from '../core/bodySerializer.gen';\nexport {\n  formDataBodySerializer,\n  jsonBodySerializer,\n  urlSearchParamsBodySerializer,\n} from '../core/bodySerializer.gen';\nexport { buildClientParams } from '../core/params.gen';\nexport { serializeQueryKeyValue } from '../core/queryKeySerializer.gen';\nexport { createClient } from './client.gen';\nexport type {\n  Client,\n  ClientOptions,\n  Config,\n  CreateClientConfig,\n  Options,\n  RequestOptions,\n  RequestResult,\n  TDataShape,\n} from './types.gen';\nexport { createConfig } from './utils.gen';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-next/base-url-strict/client/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { Auth } from '../core/auth.gen';\nimport type {\n  ServerSentEventsOptions,\n  ServerSentEventsResult,\n} from '../core/serverSentEvents.gen';\nimport type { Client as CoreClient, Config as CoreConfig } from '../core/types.gen';\nimport type { Middleware } from './utils.gen';\n\nexport interface Config<T extends ClientOptions = ClientOptions>\n  extends Omit<RequestInit, 'body' | 'headers' | 'method'>, CoreConfig {\n  /**\n   * Base URL for all requests made by this client.\n   */\n  baseUrl?: T['baseUrl'];\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   * Return the response data parsed in a specified format. By default, `auto`\n   * will infer the appropriate method from the `Content-Type` response header.\n   * You can override this behavior with any of the {@link Body} methods.\n   * Select `stream` if you don't want to parse response data at all.\n   *\n   * @default 'auto'\n   */\n  parseAs?: 'arrayBuffer' | 'auto' | 'blob' | 'formData' | 'json' | 'stream' | 'text';\n  /**\n   * Throw an error instead of returning it in the response?\n   *\n   * @default false\n   */\n  throwOnError?: T['throwOnError'];\n}\n\nexport interface RequestOptions<\n  TData = unknown,\n  ThrowOnError extends boolean = boolean,\n  Url extends string = string,\n>\n  extends\n    Config<{\n      throwOnError: ThrowOnError;\n    }>,\n    Pick<\n      ServerSentEventsOptions<TData>,\n      | 'onRequest'\n      | 'onSseError'\n      | 'onSseEvent'\n      | 'sseDefaultRetryDelay'\n      | 'sseMaxRetryAttempts'\n      | 'sseMaxRetryDelay'\n    > {\n  /**\n   * Any body that you want to add to your request.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/fetch#body}\n   */\n  body?: unknown;\n  path?: Record<string, unknown>;\n  query?: Record<string, unknown>;\n  /**\n   * Security mechanism(s) to use for the request.\n   */\n  security?: ReadonlyArray<Auth>;\n  url: Url;\n}\n\nexport interface ResolvedRequestOptions<\n  ThrowOnError extends boolean = boolean,\n  Url extends string = string,\n> extends RequestOptions<unknown, ThrowOnError, Url> {\n  serializedBody?: string;\n}\n\nexport type RequestResult<\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = boolean,\n> = ThrowOnError extends true\n  ? Promise<{\n      data: TData extends Record<string, unknown> ? TData[keyof TData] : TData;\n      response: Response;\n    }>\n  : Promise<\n      (\n        | {\n            data: TData extends Record<string, unknown> ? TData[keyof TData] : TData;\n            error: undefined;\n          }\n        | {\n            data: undefined;\n            error: TError extends Record<string, unknown> ? TError[keyof TError] : TError;\n          }\n      ) & {\n        response: Response;\n      }\n    >;\n\nexport interface ClientOptions {\n  baseUrl?: string;\n  throwOnError?: boolean;\n}\n\ntype MethodFn = <TData = unknown, TError = unknown, ThrowOnError extends boolean = false>(\n  options: Omit<RequestOptions<TData, ThrowOnError>, 'method'>,\n) => RequestResult<TData, TError, ThrowOnError>;\n\ntype SseFn = <TData = unknown, TError = unknown, ThrowOnError extends boolean = false>(\n  options: Omit<RequestOptions<TData, ThrowOnError>, 'method'>,\n) => Promise<ServerSentEventsResult<TData, TError>>;\n\ntype RequestFn = <TData = unknown, TError = unknown, ThrowOnError extends boolean = false>(\n  options: Omit<RequestOptions<TData, ThrowOnError>, 'method'> &\n    Pick<Required<RequestOptions<TData, ThrowOnError>>, 'method'>,\n) => RequestResult<TData, TError, ThrowOnError>;\n\ntype BuildUrlFn = <\n  TData extends {\n    body?: unknown;\n    path?: Record<string, unknown>;\n    query?: Record<string, unknown>;\n    url: string;\n  },\n>(\n  options: TData & Options<TData>,\n) => string;\n\nexport type Client = CoreClient<RequestFn, Config, MethodFn, BuildUrlFn, SseFn> & {\n  interceptors: Middleware<Response, unknown, ResolvedRequestOptions>;\n};\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 = ClientOptions> = (\n  override?: Config<ClientOptions & T>,\n) => Config<Required<ClientOptions> & T>;\n\nexport interface TDataShape {\n  body?: unknown;\n  headers?: unknown;\n  path?: unknown;\n  query?: unknown;\n  url: string;\n}\n\ntype OmitKeys<T, K> = Pick<T, Exclude<keyof T, K>>;\n\nexport type Options<\n  TData extends TDataShape = TDataShape,\n  ThrowOnError extends boolean = boolean,\n  TResponse = unknown,\n> = OmitKeys<RequestOptions<TResponse, ThrowOnError>, 'body' | 'path' | 'query' | 'url'> &\n  ([TData] extends [never] ? unknown : Omit<TData, 'url'>);\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-next/base-url-strict/client/utils.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport { getAuthToken } from '../core/auth.gen';\nimport type {\n  QuerySerializer,\n  QuerySerializerOptions,\n} from '../core/bodySerializer.gen';\nimport { jsonBodySerializer } from '../core/bodySerializer.gen';\nimport {\n  serializeArrayParam,\n  serializeObjectParam,\n  serializePrimitiveParam,\n} from '../core/pathSerializer.gen';\nimport type { Client, ClientOptions, Config, RequestOptions } from './types.gen';\n\ninterface PathSerializer {\n  path: Record<string, unknown>;\n  url: string;\n}\n\nconst PATH_PARAM_RE = /\\{[^{}]+\\}/g;\n\ntype ArrayStyle = 'form' | 'spaceDelimited' | 'pipeDelimited';\ntype MatrixStyle = 'label' | 'matrix' | 'simple';\ntype ArraySeparatorStyle = ArrayStyle | MatrixStyle;\n\nconst 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 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    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  const url = 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  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 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 || typeof header !== 'object') {\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, Options> = (\n  error: Err,\n  response: Res,\n  options: Options,\n) => Err | Promise<Err>;\n\ntype ReqInterceptor<Options> = (options: Options) => void | Promise<void>;\n\ntype ResInterceptor<Res, Options> = (response: Res, options: Options) => 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<Res, Err, Options> {\n  error: Interceptors<ErrInterceptor<Err, Res, Options>>;\n  request: Interceptors<ReqInterceptor<Options>>;\n  response: Interceptors<ResInterceptor<Res, Options>>;\n}\n\nexport const createInterceptors = <Res, Err, Options>(): Middleware<Res, Err, Options> => ({\n  error: new Interceptors<ErrInterceptor<Err, Res, Options>>(),\n  request: new Interceptors<ReqInterceptor<Options>>(),\n  response: new Interceptors<ResInterceptor<Res, 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-next/base-url-strict/client.gen.ts",
    "content": "// 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: 'http://localhost:3000/base' }));\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-next/base-url-strict/core/auth.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-next/base-url-strict/core/bodySerializer.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-next/base-url-strict/core/params.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-next/base-url-strict/core/pathSerializer.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-next/base-url-strict/core/queryKeySerializer.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\n/**\n * JSON-friendly union that mirrors what Pinia Colada can hash.\n */\nexport type JsonValue =\n  | null\n  | string\n  | number\n  | boolean\n  | JsonValue[]\n  | { [key: string]: JsonValue };\n\n/**\n * Replacer that converts non-JSON values (bigint, Date, etc.) to safe substitutes.\n */\nexport const queryKeyJsonReplacer = (_key: string, value: unknown) => {\n  if (value === undefined || typeof value === 'function' || typeof value === 'symbol') {\n    return undefined;\n  }\n  if (typeof value === 'bigint') {\n    return value.toString();\n  }\n  if (value instanceof Date) {\n    return value.toISOString();\n  }\n  return value;\n};\n\n/**\n * Safely stringifies a value and parses it back into a JsonValue.\n */\nexport const stringifyToJsonValue = (input: unknown): JsonValue | undefined => {\n  try {\n    const json = JSON.stringify(input, queryKeyJsonReplacer);\n    if (json === undefined) {\n      return undefined;\n    }\n    return JSON.parse(json) as JsonValue;\n  } catch {\n    return undefined;\n  }\n};\n\n/**\n * Detects plain objects (including objects with a null prototype).\n */\nconst isPlainObject = (value: unknown): value is Record<string, unknown> => {\n  if (value === null || typeof value !== 'object') {\n    return false;\n  }\n  const prototype = Object.getPrototypeOf(value as object);\n  return prototype === Object.prototype || prototype === null;\n};\n\n/**\n * Turns URLSearchParams into a sorted JSON object for deterministic keys.\n */\nconst serializeSearchParams = (params: URLSearchParams): JsonValue => {\n  const entries = Array.from(params.entries()).sort(([a], [b]) => a.localeCompare(b));\n  const result: Record<string, JsonValue> = {};\n\n  for (const [key, value] of entries) {\n    const existing = result[key];\n    if (existing === undefined) {\n      result[key] = value;\n      continue;\n    }\n\n    if (Array.isArray(existing)) {\n      (existing as string[]).push(value);\n    } else {\n      result[key] = [existing, value];\n    }\n  }\n\n  return result;\n};\n\n/**\n * Normalizes any accepted value into a JSON-friendly shape for query keys.\n */\nexport const serializeQueryKeyValue = (value: unknown): JsonValue | undefined => {\n  if (value === null) {\n    return null;\n  }\n\n  if (typeof value === 'string' || typeof value === 'number' || typeof value === 'boolean') {\n    return value;\n  }\n\n  if (value === undefined || typeof value === 'function' || typeof value === 'symbol') {\n    return undefined;\n  }\n\n  if (typeof value === 'bigint') {\n    return value.toString();\n  }\n\n  if (value instanceof Date) {\n    return value.toISOString();\n  }\n\n  if (Array.isArray(value)) {\n    return stringifyToJsonValue(value);\n  }\n\n  if (typeof URLSearchParams !== 'undefined' && value instanceof URLSearchParams) {\n    return serializeSearchParams(value);\n  }\n\n  if (isPlainObject(value)) {\n    return stringifyToJsonValue(value);\n  }\n\n  return undefined;\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-next/base-url-strict/core/serverSentEvents.gen.ts",
    "content": "// 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 const 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            // Normalize line endings: CRLF -> LF, then CR -> LF\n            buffer = buffer.replace(/\\r\\n/g, '\\n').replace(/\\r/g, '\\n');\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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-next/base-url-strict/core/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { Auth, AuthToken } from './auth.gen';\nimport type { BodySerializer, QuerySerializer, QuerySerializerOptions } from './bodySerializer.gen';\n\nexport type HttpMethod =\n  | 'connect'\n  | 'delete'\n  | 'get'\n  | 'head'\n  | 'options'\n  | 'patch'\n  | 'post'\n  | 'put'\n  | 'trace';\n\nexport type Client<\n  RequestFn = never,\n  Config = unknown,\n  MethodFn = never,\n  BuildUrlFn = never,\n  SseFn = never,\n> = {\n  /**\n   * Returns the final request URL.\n   */\n  buildUrl: BuildUrlFn;\n  getConfig: () => Config;\n  request: RequestFn;\n  setConfig: (config: Config) => Config;\n} & {\n  [K in HttpMethod]: MethodFn;\n} & ([SseFn] extends [never] ? { sse?: never } : { sse: { [K in HttpMethod]: SseFn } });\n\nexport interface Config {\n  /**\n   * Auth token or a function returning auth token. The resolved value will be\n   * added to the request payload as defined by its `security` array.\n   */\n  auth?: ((auth: Auth) => Promise<AuthToken> | AuthToken) | AuthToken;\n  /**\n   * A function for serializing request body parameter. By default,\n   * {@link JSON.stringify()} will be used.\n   */\n  bodySerializer?: BodySerializer | null;\n  /**\n   * An object containing any HTTP headers that you want to pre-populate your\n   * `Headers` object with.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/Headers/Headers#init See more}\n   */\n  headers?:\n    | RequestInit['headers']\n    | Record<\n        string,\n        string | number | boolean | (string | number | boolean)[] | null | undefined | unknown\n      >;\n  /**\n   * The request method.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/fetch#method See more}\n   */\n  method?: Uppercase<HttpMethod>;\n  /**\n   * A function for serializing request query parameters. By default, arrays\n   * will be exploded in form style, objects will be exploded in deepObject\n   * style, and reserved characters are percent-encoded.\n   *\n   * This method will have no effect if the native `paramsSerializer()` Axios\n   * API function is used.\n   *\n   * {@link https://swagger.io/docs/specification/serialization/#query View examples}\n   */\n  querySerializer?: QuerySerializer | QuerySerializerOptions;\n  /**\n   * A function validating request data. This is useful if you want to ensure\n   * the request conforms to the desired shape, so it can be safely sent to\n   * the server.\n   */\n  requestValidator?: (data: unknown) => Promise<unknown>;\n  /**\n   * A function transforming response data before it's returned. This is useful\n   * for post-processing data, e.g. converting ISO strings into Date objects.\n   */\n  responseTransformer?: (data: unknown) => Promise<unknown>;\n  /**\n   * A function validating response data. This is useful if you want to ensure\n   * the response conforms to the desired shape, so it can be safely passed to\n   * the transformers and returned to the user.\n   */\n  responseValidator?: (data: unknown) => Promise<unknown>;\n}\n\ntype IsExactlyNeverOrNeverUndefined<T> = [T] extends [never]\n  ? true\n  : [T] extends [never | undefined]\n    ? [undefined] extends [T]\n      ? false\n      : true\n    : false;\n\nexport type OmitNever<T extends Record<string, unknown>> = {\n  [K in keyof T as IsExactlyNeverOrNeverUndefined<T[K]> extends true ? never : K]: T[K];\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-next/base-url-strict/core/utils.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-next/base-url-strict/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type { _3eNum1Период, _400, AdditionalPropertiesIntegerIssue, AdditionalPropertiesUnknownIssue, AdditionalPropertiesUnknownIssue2, AdditionalPropertiesUnknownIssue3, AdditionalPropertiesUnknownIssueWritable, AnyOfAnyAndNull, AnyOfArrays, ApiVVersionODataControllerCountData, ApiVVersionODataControllerCountResponse, ApiVVersionODataControllerCountResponses, ArrayWithAnyOfProperties, ArrayWithArray, ArrayWithBooleans, ArrayWithNumbers, ArrayWithProperties, ArrayWithReferences, ArrayWithStrings, CallToTestOrderOfParamsData, CallWithDefaultOptionalParametersData, CallWithDefaultParametersData, CallWithDescriptionsData, CallWithDuplicateResponsesData, CallWithDuplicateResponsesError, CallWithDuplicateResponsesErrors, CallWithDuplicateResponsesResponse, CallWithDuplicateResponsesResponses, CallWithNoContentResponseData, CallWithNoContentResponseResponse, CallWithNoContentResponseResponses, CallWithParametersData, CallWithResponseAndNoContentResponseData, CallWithResponseAndNoContentResponseResponse, CallWithResponseAndNoContentResponseResponses, CallWithResponseData, CallWithResponseResponse, CallWithResponseResponses, CallWithResponsesData, CallWithResponsesError, CallWithResponsesErrors, CallWithResponsesResponse, CallWithResponsesResponses, CallWithResultFromHeaderData, CallWithResultFromHeaderErrors, CallWithResultFromHeaderResponses, CallWithWeirdParameterNamesData, CamelCaseCommentWithBreaks, CharactersInDescription, ClientOptions, CollectionFormatData, CommentWithBackticks, CommentWithBackticksAndQuotes, CommentWithBreaks, CommentWithExpressionPlaceholders, CommentWithQuotes, CommentWithReservedCharacters, CommentWithSlashes, ComplexParamsData, ComplexParamsResponse, ComplexParamsResponses, ComplexTypesData, ComplexTypesErrors, ComplexTypesResponse, ComplexTypesResponses, CompositionBaseModel, CompositionExtendedModel, CompositionWithAllOfAndNullable, CompositionWithAnyOf, CompositionWithAnyOfAndNullable, CompositionWithAnyOfAnonymous, CompositionWithNestedAnyAndTypeNull, CompositionWithNestedAnyOfAndNull, CompositionWithOneOf, CompositionWithOneOfAndComplexArrayDictionary, CompositionWithOneOfAndNullable, CompositionWithOneOfAndProperties, CompositionWithOneOfAndSimpleArrayDictionary, CompositionWithOneOfAndSimpleDictionary, CompositionWithOneOfAnonymous, CompositionWithOneOfDiscriminator, ConstValue, Default, DeleteCallWithoutParametersAndResponseData, DeleteFooData, DeleteFooData2, DeleteFooData3, DeprecatedCallData, DeprecatedModel, DictionaryWithArray, DictionaryWithDictionary, DictionaryWithProperties, DictionaryWithPropertiesAndAdditionalProperties, DictionaryWithReference, DictionaryWithString, DummyAData, DummyAResponse, DummyAResponses, DummyBData, DummyBResponse, DummyBResponses, DuplicateName2Data, DuplicateName3Data, DuplicateName4Data, DuplicateNameData, EnumFromDescription, EnumWithExtensions, EnumWithNumbers, EnumWithReplacedCharacters, EnumWithStrings, EnumWithXEnumNames, ExportData, ExternalRefA, ExternalRefB, ExternalSharedModel, File, FileResponseData, FileResponseResponse, FileResponseResponses, FileWritable, FooWowData, FooWowResponses, FreeFormObjectWithAdditionalPropertiesEqEmptyObject, FreeFormObjectWithAdditionalPropertiesEqTrue, FreeFormObjectWithoutAdditionalProperties, GenericSchemaDuplicateIssue1SystemBoolean, GenericSchemaDuplicateIssue1SystemBooleanWritable, GenericSchemaDuplicateIssue1SystemString, GenericSchemaDuplicateIssue1SystemStringWritable, GetApiVbyApiVersionSimpleOperationData, GetApiVbyApiVersionSimpleOperationError, GetApiVbyApiVersionSimpleOperationErrors, GetApiVbyApiVersionSimpleOperationResponse, GetApiVbyApiVersionSimpleOperationResponses, GetCallWithOptionalParamData, GetCallWithoutParametersAndResponseData, HeadCallWithoutParametersAndResponseData, Import, ImportData, ImportResponse, ImportResponses, IoK8sApimachineryPkgApisMetaV1DeleteOptions, IoK8sApimachineryPkgApisMetaV1Preconditions, ModelCircle, ModelFromZendesk, ModelSquare, ModelThatExtends, ModelThatExtendsExtends, ModelWithAdditionalPropertiesEqTrue, ModelWithAdditionalPropertiesRef, ModelWithAnyOfConstantSizeArray, ModelWithAnyOfConstantSizeArrayAndIntersect, ModelWithAnyOfConstantSizeArrayNullable, ModelWithAnyOfConstantSizeArrayWithNSizeAndOptions, ModelWithAnyOfConstantSizeArrayWithNSizeAndOptionsWritable, ModelWithArray, ModelWithArrayReadOnlyAndWriteOnly, ModelWithArrayReadOnlyAndWriteOnlyWritable, ModelWithBackticksInDescription, ModelWithBoolean, ModelWithCircularReference, ModelWithConst, ModelWithConstantSizeArray, ModelWithDictionary, ModelWithDuplicateImports, ModelWithDuplicateProperties, ModelWithEnum, ModelWithEnumFromDescription, ModelWithEnumWithHyphen, ModelWithInteger, ModelWithNestedArrayEnums, ModelWithNestedArrayEnumsData, ModelWithNestedArrayEnumsDataBar, ModelWithNestedArrayEnumsDataFoo, ModelWithNestedCompositionEnums, ModelWithNestedEnums, ModelWithNestedProperties, ModelWithNullableObject, ModelWithNullableString, ModelWithNumericEnumUnion, ModelWithOneOfAndProperties, ModelWithOneOfEnum, ModelWithOrderedProperties, ModelWithPattern, ModelWithPatternWritable, ModelWithPrefixItemsConstantSizeArray, ModelWithProperties, ModelWithPropertiesWritable, ModelWithReadOnlyAndWriteOnly, ModelWithReadOnlyAndWriteOnlyWritable, ModelWithReference, ModelWithReferenceWritable, ModelWithString, ModelWithStringError, MultipartRequestData, MultipartResponseData, MultipartResponseResponse, MultipartResponseResponses, NestedAnyOfArraysNullable, NonAsciiæøåÆøÅöôêÊ字符串Data, NonAsciiæøåÆøÅöôêÊ字符串Response, NonAsciiæøåÆøÅöôêÊ字符串Responses, NonAsciiStringæøåÆøÅöôêÊ字符串, NullableObject, OneOfAllOfIssue, OneOfAllOfIssueWritable, OptionsCallWithoutParametersAndResponseData, Pageable, ParameterSimpleParameterUnused, PatchApiVbyApiVersionNoTagData, PatchApiVbyApiVersionNoTagResponses, PatchCallWithoutParametersAndResponseData, PostApiVbyApiVersionFormDataData, PostApiVbyApiVersionRequestBodyData, PostCallWithOptionalParamData, PostCallWithOptionalParamResponse, PostCallWithOptionalParamResponses, PostCallWithoutParametersAndResponseData, PostServiceWithEmptyTagResponse, PostServiceWithEmptyTagResponse2, PutCallWithoutParametersAndResponseData, PutWithFormUrlEncodedData, SchemaWithFormRestrictedKeys, SimpleBoolean, SimpleFile, SimpleFormData, SimpleInteger, SimpleParameter, SimpleReference, SimpleRequestBody, SimpleString, SimpleStringWithPattern, TestErrorCodeData, TestErrorCodeErrors, TestErrorCodeResponses, TypesData, TypesResponse, TypesResponses, UploadFileData, UploadFileResponse, UploadFileResponses, XFooBar } from './types.gen';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-next/base-url-strict/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type ClientOptions = {\n    baseUrl: 'http://localhost:3000/base';\n};\n\n/**\n * Model with number-only name\n */\nexport type _400 = string;\n\n/**\n * External ref to shared model (A)\n */\nexport type ExternalRefA = ExternalSharedModel;\n\n/**\n * External ref to shared model (B)\n */\nexport type ExternalRefB = ExternalSharedModel;\n\n/**\n * Testing multiline comments in string: First line\n * Second line\n *\n * Fourth line\n */\nexport type CamelCaseCommentWithBreaks = number;\n\n/**\n * Testing multiline comments in string: First line\n * Second line\n *\n * Fourth line\n */\nexport type CommentWithBreaks = number;\n\n/**\n * Testing backticks in string: `backticks` and ```multiple backticks``` should work\n */\nexport type CommentWithBackticks = number;\n\n/**\n * Testing backticks and quotes in string: `backticks`, 'quotes', \"double quotes\" and ```multiple backticks``` should work\n */\nexport type CommentWithBackticksAndQuotes = number;\n\n/**\n * Testing slashes in string: \\backwards\\\\\\ and /forwards/// should work\n */\nexport type CommentWithSlashes = number;\n\n/**\n * Testing expression placeholders in string: ${expression} should work\n */\nexport type CommentWithExpressionPlaceholders = number;\n\n/**\n * Testing quotes in string: 'single quote''' and \"double quotes\"\"\" should work\n */\nexport type CommentWithQuotes = number;\n\n/**\n * Testing reserved characters in string: * inline * and ** inline ** should work\n */\nexport type CommentWithReservedCharacters = number;\n\n/**\n * This is a simple number\n */\nexport type SimpleInteger = number;\n\n/**\n * This is a simple boolean\n */\nexport type SimpleBoolean = boolean;\n\n/**\n * This is a simple string\n */\nexport type SimpleString = string;\n\n/**\n * A string with non-ascii (unicode) characters valid in typescript identifiers (æøåÆØÅöÔèÈ字符串)\n */\nexport type NonAsciiStringæøåÆøÅöôêÊ字符串 = string;\n\n/**\n * This is a simple file\n */\nexport type SimpleFile = Blob | File;\n\n/**\n * This is a simple reference\n */\nexport type SimpleReference = ModelWithString;\n\n/**\n * This is a simple string\n */\nexport type SimpleStringWithPattern = string | null;\n\n/**\n * This is a simple enum with strings\n */\nexport type EnumWithStrings = 'Success' | 'Warning' | 'Error' | '\\'Single Quote\\'' | '\"Double Quotes\"' | 'Non-ascii: øæåôöØÆÅÔÖ字符串';\n\nexport type EnumWithReplacedCharacters = '\\'Single Quote\\'' | '\"Double Quotes\"' | 'øæåôöØÆÅÔÖ字符串' | 3.1 | '';\n\n/**\n * This is a simple enum with numbers\n */\nexport type EnumWithNumbers = 1 | 2 | 3 | 1.1 | 1.2 | 1.3 | 100 | 200 | 300 | -100 | -200 | -300 | -1.1 | -1.2 | -1.3;\n\n/**\n * Success=1,Warning=2,Error=3\n */\nexport type EnumFromDescription = number;\n\n/**\n * This is a simple enum with numbers\n */\nexport type EnumWithExtensions = 200 | 400 | 500;\n\nexport type EnumWithXEnumNames = 0 | 1 | 2;\n\n/**\n * This is a simple array with numbers\n */\nexport type ArrayWithNumbers = Array<number>;\n\n/**\n * This is a simple array with booleans\n */\nexport type ArrayWithBooleans = Array<boolean>;\n\n/**\n * This is a simple array with strings\n */\nexport type ArrayWithStrings = Array<string>;\n\n/**\n * This is a simple array with references\n */\nexport type ArrayWithReferences = Array<ModelWithString>;\n\n/**\n * This is a simple array containing an array\n */\nexport type ArrayWithArray = Array<Array<ModelWithString>>;\n\n/**\n * This is a simple array with properties\n */\nexport type ArrayWithProperties = Array<{\n    '16x16'?: CamelCaseCommentWithBreaks;\n    bar?: string;\n}>;\n\n/**\n * This is a simple array with any of properties\n */\nexport type ArrayWithAnyOfProperties = Array<{\n    foo?: string;\n} | {\n    bar?: string;\n}>;\n\nexport type AnyOfAnyAndNull = {\n    data?: unknown | null;\n};\n\n/**\n * This is a simple array with any of properties\n */\nexport type AnyOfArrays = {\n    results?: Array<{\n        foo?: string;\n    } | {\n        bar?: string;\n    }>;\n};\n\n/**\n * This is a string dictionary\n */\nexport type DictionaryWithString = {\n    [key: string]: string;\n};\n\nexport type DictionaryWithPropertiesAndAdditionalProperties = {\n    foo?: number;\n    bar?: boolean;\n    [key: string]: string | number | boolean | undefined;\n};\n\n/**\n * This is a string reference\n */\nexport type DictionaryWithReference = {\n    [key: string]: ModelWithString;\n};\n\n/**\n * This is a complex dictionary\n */\nexport type DictionaryWithArray = {\n    [key: string]: Array<ModelWithString>;\n};\n\n/**\n * This is a string dictionary\n */\nexport type DictionaryWithDictionary = {\n    [key: string]: {\n        [key: string]: string;\n    };\n};\n\n/**\n * This is a complex dictionary\n */\nexport type DictionaryWithProperties = {\n    [key: string]: {\n        foo?: string;\n        bar?: string;\n    };\n};\n\n/**\n * This is a model with one number property\n */\nexport type ModelWithInteger = {\n    /**\n     * This is a simple number property\n     */\n    prop?: number;\n};\n\n/**\n * This is a model with one boolean property\n */\nexport type ModelWithBoolean = {\n    /**\n     * This is a simple boolean property\n     */\n    prop?: boolean;\n};\n\n/**\n * This is a model with one string property\n */\nexport type ModelWithString = {\n    /**\n     * This is a simple string property\n     */\n    prop?: string;\n};\n\n/**\n * This is a model with one string property\n */\nexport type ModelWithStringError = {\n    /**\n     * This is a simple string property\n     */\n    prop?: string;\n};\n\n/**\n * `Comment` or `VoiceComment`. The JSON object for adding voice comments to tickets is different. See [Adding voice comments to tickets](/documentation/ticketing/managing-tickets/adding-voice-comments-to-tickets)\n */\nexport type ModelFromZendesk = string;\n\n/**\n * This is a model with one string property\n */\nexport type ModelWithNullableString = {\n    /**\n     * This is a simple string property\n     */\n    nullableProp1?: string | null;\n    /**\n     * This is a simple string property\n     */\n    nullableRequiredProp1: string | null;\n    /**\n     * This is a simple string property\n     */\n    nullableProp2?: string | null;\n    /**\n     * This is a simple string property\n     */\n    nullableRequiredProp2: string | null;\n    /**\n     * This is a simple enum with strings\n     */\n    'foo_bar-enum'?: 'Success' | 'Warning' | 'Error' | 'ØÆÅ字符串';\n};\n\n/**\n * This is a model with one enum\n */\nexport type ModelWithEnum = {\n    /**\n     * This is a simple enum with strings\n     */\n    'foo_bar-enum'?: 'Success' | 'Warning' | 'Error' | 'ØÆÅ字符串';\n    /**\n     * These are the HTTP error code enums\n     */\n    statusCode?: '100' | '200 FOO' | '300 FOO_BAR' | '400 foo-bar' | '500 foo.bar' | '600 foo&bar';\n    /**\n     * Simple boolean enum\n     */\n    bool?: true;\n};\n\n/**\n * This is a model with one enum with escaped name\n */\nexport type ModelWithEnumWithHyphen = {\n    /**\n     * Foo-Bar-Baz-Qux\n     */\n    'foo-bar-baz-qux'?: '3.0';\n};\n\n/**\n * This is a model with one enum\n */\nexport type ModelWithEnumFromDescription = {\n    /**\n     * Success=1,Warning=2,Error=3\n     */\n    test?: number;\n};\n\n/**\n * This is a model with nested enums\n */\nexport type ModelWithNestedEnums = {\n    dictionaryWithEnum?: {\n        [key: string]: 'Success' | 'Warning' | 'Error';\n    };\n    dictionaryWithEnumFromDescription?: {\n        [key: string]: number;\n    };\n    arrayWithEnum?: Array<'Success' | 'Warning' | 'Error'>;\n    arrayWithDescription?: Array<number>;\n    /**\n     * This is a simple enum with strings\n     */\n    'foo_bar-enum'?: 'Success' | 'Warning' | 'Error' | 'ØÆÅ字符串';\n};\n\n/**\n * This is a model with one property containing a reference\n */\nexport type ModelWithReference = {\n    prop?: ModelWithProperties;\n};\n\n/**\n * This is a model with one property containing an array\n */\nexport type ModelWithArrayReadOnlyAndWriteOnly = {\n    prop?: Array<ModelWithReadOnlyAndWriteOnly>;\n    propWithFile?: Array<Blob | File>;\n    propWithNumber?: Array<number>;\n};\n\n/**\n * This is a model with one property containing an array\n */\nexport type ModelWithArray = {\n    prop?: Array<ModelWithString>;\n    propWithFile?: Array<Blob | File>;\n    propWithNumber?: Array<number>;\n};\n\n/**\n * This is a model with one property containing a dictionary\n */\nexport type ModelWithDictionary = {\n    prop?: {\n        [key: string]: string;\n    };\n};\n\n/**\n * This is a deprecated model with a deprecated property\n *\n * @deprecated\n */\nexport type DeprecatedModel = {\n    /**\n     * This is a deprecated property\n     *\n     * @deprecated\n     */\n    prop?: string;\n};\n\n/**\n * This is a model with one property containing a circular reference\n */\nexport type ModelWithCircularReference = {\n    prop?: ModelWithCircularReference;\n};\n\n/**\n * This is a model with one property with a 'one of' relationship\n */\nexport type CompositionWithOneOf = {\n    propA?: ModelWithString | ModelWithEnum | ModelWithArray | ModelWithDictionary;\n};\n\n/**\n * This is a model with one property with a 'one of' relationship where the options are not $ref\n */\nexport type CompositionWithOneOfAnonymous = {\n    propA?: {\n        propA?: string;\n    } | string | number;\n};\n\n/**\n * Circle\n */\nexport type ModelCircle = {\n    kind: string;\n    radius?: number;\n};\n\n/**\n * Square\n */\nexport type ModelSquare = {\n    kind: string;\n    sideLength?: number;\n};\n\n/**\n * This is a model with one property with a 'one of' relationship where the options are not $ref\n */\nexport type CompositionWithOneOfDiscriminator = ({\n    kind: 'circle';\n} & ModelCircle) | ({\n    kind: 'square';\n} & ModelSquare);\n\n/**\n * This is a model with one property with a 'any of' relationship\n */\nexport type CompositionWithAnyOf = {\n    propA?: ModelWithString | ModelWithEnum | ModelWithArray | ModelWithDictionary;\n};\n\n/**\n * This is a model with one property with a 'any of' relationship where the options are not $ref\n */\nexport type CompositionWithAnyOfAnonymous = {\n    propA?: {\n        propA?: string;\n    } | string | number;\n};\n\n/**\n * This is a model with nested 'any of' property with a type null\n */\nexport type CompositionWithNestedAnyAndTypeNull = {\n    propA?: Array<ModelWithDictionary | null> | Array<ModelWithArray | null>;\n};\n\nexport type _3eNum1Период = 'Bird' | 'Dog';\n\nexport type ConstValue = 'ConstValue';\n\n/**\n * This is a model with one property with a 'any of' relationship where the options are not $ref\n */\nexport type CompositionWithNestedAnyOfAndNull = {\n    /**\n     * Scopes\n     */\n    propA?: Array<_3eNum1Период | ConstValue> | null;\n};\n\n/**\n * This is a model with one property with a 'one of' relationship\n */\nexport type CompositionWithOneOfAndNullable = {\n    propA?: {\n        boolean?: boolean;\n    } | ModelWithEnum | ModelWithArray | ModelWithDictionary | null;\n};\n\n/**\n * This is a model that contains a simple dictionary within composition\n */\nexport type CompositionWithOneOfAndSimpleDictionary = {\n    propA?: boolean | {\n        [key: string]: number;\n    };\n};\n\n/**\n * This is a model that contains a dictionary of simple arrays within composition\n */\nexport type CompositionWithOneOfAndSimpleArrayDictionary = {\n    propA?: boolean | {\n        [key: string]: Array<boolean>;\n    };\n};\n\n/**\n * This is a model that contains a dictionary of complex arrays (composited) within composition\n */\nexport type CompositionWithOneOfAndComplexArrayDictionary = {\n    propA?: boolean | {\n        [key: string]: Array<number | string>;\n    };\n};\n\n/**\n * This is a model with one property with a 'all of' relationship\n */\nexport type CompositionWithAllOfAndNullable = {\n    propA?: ({\n        boolean?: boolean;\n    } & ModelWithEnum & ModelWithArray & ModelWithDictionary) | null;\n};\n\n/**\n * This is a model with one property with a 'any of' relationship\n */\nexport type CompositionWithAnyOfAndNullable = {\n    propA?: {\n        boolean?: boolean;\n    } | ModelWithEnum | ModelWithArray | ModelWithDictionary | null;\n};\n\n/**\n * This is a base model with two simple optional properties\n */\nexport type CompositionBaseModel = {\n    firstName?: string;\n    lastname?: string;\n};\n\n/**\n * This is a model that extends the base model\n */\nexport type CompositionExtendedModel = CompositionBaseModel & {\n    age: number;\n    firstName: string;\n    lastname: string;\n};\n\n/**\n * This is a model with one nested property\n */\nexport type ModelWithProperties = {\n    required: string;\n    readonly requiredAndReadOnly: string;\n    requiredAndNullable: string | null;\n    string?: string;\n    number?: number;\n    boolean?: boolean;\n    reference?: ModelWithString;\n    'property with space'?: string;\n    default?: string;\n    try?: string;\n    readonly '@namespace.string'?: string;\n    readonly '@namespace.integer'?: number;\n};\n\n/**\n * This is a model with one nested property\n */\nexport type ModelWithNestedProperties = {\n    readonly first: {\n        readonly second: {\n            readonly third: string | null;\n        } | null;\n    } | null;\n};\n\n/**\n * This is a model with duplicated properties\n */\nexport type ModelWithDuplicateProperties = {\n    prop?: ModelWithString;\n};\n\n/**\n * This is a model with ordered properties\n */\nexport type ModelWithOrderedProperties = {\n    zebra?: string;\n    apple?: string;\n    hawaii?: string;\n};\n\n/**\n * This is a model with duplicated imports\n */\nexport type ModelWithDuplicateImports = {\n    propA?: ModelWithString;\n    propB?: ModelWithString;\n    propC?: ModelWithString;\n};\n\n/**\n * This is a model that extends another model\n */\nexport type ModelThatExtends = ModelWithString & {\n    propExtendsA?: string;\n    propExtendsB?: ModelWithString;\n};\n\n/**\n * This is a model that extends another model\n */\nexport type ModelThatExtendsExtends = ModelWithString & ModelThatExtends & {\n    propExtendsC?: string;\n    propExtendsD?: ModelWithString;\n};\n\n/**\n * This is a model that contains a some patterns\n */\nexport type ModelWithPattern = {\n    key: string;\n    name: string;\n    readonly enabled?: boolean;\n    readonly modified?: string;\n    id?: string;\n    text?: string;\n    patternWithSingleQuotes?: string;\n    patternWithNewline?: string;\n    patternWithBacktick?: string;\n    patternWithUnicode?: string;\n};\n\nexport type File = {\n    /**\n     * Id\n     */\n    readonly id?: string;\n    /**\n     * Updated at\n     */\n    readonly updated_at?: string;\n    /**\n     * Created at\n     */\n    readonly created_at?: string;\n    /**\n     * Mime\n     */\n    mime: string;\n    /**\n     * File\n     */\n    readonly file?: string;\n};\n\nexport type Default = {\n    name?: string;\n};\n\nexport type Pageable = {\n    page?: number;\n    size?: number;\n    sort?: Array<string>;\n};\n\n/**\n * This is a free-form object without additionalProperties.\n */\nexport type FreeFormObjectWithoutAdditionalProperties = {\n    [key: string]: unknown;\n};\n\n/**\n * This is a free-form object with additionalProperties: true.\n */\nexport type FreeFormObjectWithAdditionalPropertiesEqTrue = {\n    [key: string]: unknown;\n};\n\n/**\n * This is a free-form object with additionalProperties: {}.\n */\nexport type FreeFormObjectWithAdditionalPropertiesEqEmptyObject = {\n    [key: string]: unknown;\n};\n\nexport type ModelWithConst = {\n    String?: 'String';\n    number?: 0;\n    null?: null;\n    withType?: 'Some string';\n};\n\n/**\n * This is a model with one property and additionalProperties: true\n */\nexport type ModelWithAdditionalPropertiesEqTrue = {\n    /**\n     * This is a simple string property\n     */\n    prop?: string;\n    [key: string]: unknown;\n};\n\nexport type NestedAnyOfArraysNullable = {\n    nullableArray?: Array<string | boolean> | null;\n};\n\nexport type CompositionWithOneOfAndProperties = ({\n    foo: SimpleParameter;\n} | {\n    bar: NonAsciiStringæøåÆøÅöôêÊ字符串;\n}) & {\n    baz: number | null;\n    qux: number;\n};\n\n/**\n * An object that can be null\n */\nexport type NullableObject = {\n    foo?: string;\n} | null;\n\n/**\n * Some % character\n */\nexport type CharactersInDescription = string;\n\nexport type ModelWithNullableObject = {\n    data?: NullableObject;\n};\n\n/**\n * An object with additional properties that can be null (anyOf ref + null)\n */\nexport type ModelWithAdditionalPropertiesRef = {\n    [key: string]: NullableObject | null;\n};\n\nexport type ModelWithOneOfEnum = {\n    foo: 'Bar';\n} | {\n    foo: 'Baz';\n} | {\n    foo: 'Qux';\n} | {\n    content: string;\n    foo: 'Quux';\n} | {\n    content: [\n        string,\n        string\n    ];\n    foo: 'Corge';\n};\n\nexport type ModelWithNestedArrayEnumsDataFoo = 'foo' | 'bar';\n\nexport type ModelWithNestedArrayEnumsDataBar = 'baz' | 'qux';\n\nexport type ModelWithNestedArrayEnumsData = {\n    foo?: Array<ModelWithNestedArrayEnumsDataFoo>;\n    bar?: Array<ModelWithNestedArrayEnumsDataBar>;\n};\n\nexport type ModelWithNestedArrayEnums = {\n    array_strings?: Array<string>;\n    data?: ModelWithNestedArrayEnumsData;\n};\n\nexport type ModelWithNestedCompositionEnums = {\n    foo?: ModelWithNestedArrayEnumsDataFoo;\n};\n\nexport type ModelWithReadOnlyAndWriteOnly = {\n    foo: string;\n    readonly bar: string;\n};\n\nexport type ModelWithConstantSizeArray = [\n    number,\n    number\n];\n\nexport type ModelWithAnyOfConstantSizeArray = [\n    number | string,\n    number | string,\n    number | string\n];\n\nexport type ModelWithPrefixItemsConstantSizeArray = [\n    ModelWithInteger,\n    number | string,\n    string\n];\n\nexport type ModelWithAnyOfConstantSizeArrayNullable = [\n    number | null | string,\n    number | null | string,\n    number | null | string\n];\n\nexport type ModelWithAnyOfConstantSizeArrayWithNSizeAndOptions = [\n    number | Import,\n    number | Import\n];\n\nexport type ModelWithAnyOfConstantSizeArrayAndIntersect = [\n    number & string,\n    number & string\n];\n\nexport type ModelWithNumericEnumUnion = {\n    /**\n     * Период\n     */\n    value?: -10 | -1 | 0 | 1 | 3 | 6 | 12;\n};\n\n/**\n * Some description with `back ticks`\n */\nexport type ModelWithBackticksInDescription = {\n    /**\n     * The template `that` should be used for parsing and importing the contents of the CSV file.\n     *\n     * <br/><p>There is one placeholder currently supported:<ul>     <li><b>${x}</b> - refers to the n-th column in the CSV file, e.g. ${1}, ${2}, ...)</li></ul><p>Example of a correct JSON template:</p>\n     * <pre>\n     * [\n     * {\n     * \"resourceType\": \"Asset\",\n     * \"identifier\": {\n     * \"name\": \"${1}\",\n     * \"domain\": {\n     * \"name\": \"${2}\",\n     * \"community\": {\n     * \"name\": \"Some Community\"\n     * }\n     * }\n     * },\n     * \"attributes\" : {\n     * \"00000000-0000-0000-0000-000000003115\" : [ {\n     * \"value\" : \"${3}\"\n     * } ],\n     * \"00000000-0000-0000-0000-000000000222\" : [ {\n     * \"value\" : \"${4}\"\n     * } ]\n     * }\n     * }\n     * ]\n     * </pre>\n     */\n    template?: string;\n};\n\nexport type ModelWithOneOfAndProperties = (SimpleParameter | NonAsciiStringæøåÆøÅöôêÊ字符串) & {\n    baz: number | null;\n    qux: number;\n};\n\n/**\n * Model used to test deduplication strategy (unused)\n */\nexport type ParameterSimpleParameterUnused = string;\n\n/**\n * Model used to test deduplication strategy\n */\nexport type PostServiceWithEmptyTagResponse = string;\n\n/**\n * Model used to test deduplication strategy\n */\nexport type PostServiceWithEmptyTagResponse2 = string;\n\n/**\n * Model used to test deduplication strategy\n */\nexport type DeleteFooData = string;\n\n/**\n * Model used to test deduplication strategy\n */\nexport type DeleteFooData2 = string;\n\n/**\n * Model with restricted keyword name\n */\nexport type Import = string;\n\nexport type SchemaWithFormRestrictedKeys = {\n    description?: string;\n    'x-enum-descriptions'?: string;\n    'x-enum-varnames'?: string;\n    'x-enumNames'?: string;\n    title?: string;\n    object?: {\n        description?: string;\n        'x-enum-descriptions'?: string;\n        'x-enum-varnames'?: string;\n        'x-enumNames'?: string;\n        title?: string;\n    };\n    array?: Array<{\n        description?: string;\n        'x-enum-descriptions'?: string;\n        'x-enum-varnames'?: string;\n        'x-enumNames'?: string;\n        title?: string;\n    }>;\n};\n\n/**\n * This schema was giving PascalCase transformations a hard time\n */\nexport type IoK8sApimachineryPkgApisMetaV1DeleteOptions = {\n    /**\n     * Must be fulfilled before a deletion is carried out. If not possible, a 409 Conflict status will be returned.\n     */\n    preconditions?: IoK8sApimachineryPkgApisMetaV1Preconditions;\n};\n\n/**\n * This schema was giving PascalCase transformations a hard time\n */\nexport type IoK8sApimachineryPkgApisMetaV1Preconditions = {\n    /**\n     * Specifies the target ResourceVersion\n     */\n    resourceVersion?: string;\n    /**\n     * Specifies the target UID.\n     */\n    uid?: string;\n};\n\nexport type AdditionalPropertiesUnknownIssue = {\n    [key: string]: string | number;\n};\n\nexport type AdditionalPropertiesUnknownIssue2 = {\n    [key: string]: string | number;\n};\n\nexport type AdditionalPropertiesUnknownIssue3 = string & {\n    entries: {\n        [key: string]: AdditionalPropertiesUnknownIssue;\n    };\n};\n\nexport type AdditionalPropertiesIntegerIssue = {\n    value: number;\n    [key: string]: number;\n};\n\nexport type OneOfAllOfIssue = ((ConstValue | GenericSchemaDuplicateIssue1SystemBoolean) & _3eNum1Период) | GenericSchemaDuplicateIssue1SystemString;\n\nexport type GenericSchemaDuplicateIssue1SystemBoolean = {\n    item?: boolean;\n    error?: string | null;\n    readonly hasError?: boolean;\n    data?: {\n        [key: string]: never;\n    };\n};\n\nexport type GenericSchemaDuplicateIssue1SystemString = {\n    item?: string | null;\n    error?: string | null;\n    readonly hasError?: boolean;\n};\n\nexport type ExternalSharedModel = {\n    id: string;\n    name?: string;\n};\n\n/**\n * This is a model with one property containing a reference\n */\nexport type ModelWithReferenceWritable = {\n    prop?: ModelWithPropertiesWritable;\n};\n\n/**\n * This is a model with one property containing an array\n */\nexport type ModelWithArrayReadOnlyAndWriteOnlyWritable = {\n    prop?: Array<ModelWithReadOnlyAndWriteOnlyWritable>;\n    propWithFile?: Array<Blob | File>;\n    propWithNumber?: Array<number>;\n};\n\n/**\n * This is a model with one nested property\n */\nexport type ModelWithPropertiesWritable = {\n    required: string;\n    requiredAndNullable: string | null;\n    string?: string;\n    number?: number;\n    boolean?: boolean;\n    reference?: ModelWithString;\n    'property with space'?: string;\n    default?: string;\n    try?: string;\n};\n\n/**\n * This is a model that contains a some patterns\n */\nexport type ModelWithPatternWritable = {\n    key: string;\n    name: string;\n    id?: string;\n    text?: string;\n    patternWithSingleQuotes?: string;\n    patternWithNewline?: string;\n    patternWithBacktick?: string;\n    patternWithUnicode?: string;\n};\n\nexport type FileWritable = {\n    /**\n     * Mime\n     */\n    mime: string;\n};\n\nexport type ModelWithReadOnlyAndWriteOnlyWritable = {\n    foo: string;\n    baz: string;\n};\n\nexport type ModelWithAnyOfConstantSizeArrayWithNSizeAndOptionsWritable = [\n    number | Import,\n    number | Import\n];\n\nexport type AdditionalPropertiesUnknownIssueWritable = {\n    [key: string]: string | number;\n};\n\nexport type OneOfAllOfIssueWritable = ((ConstValue | GenericSchemaDuplicateIssue1SystemBoolean) & _3eNum1Период) | GenericSchemaDuplicateIssue1SystemString;\n\nexport type GenericSchemaDuplicateIssue1SystemBooleanWritable = {\n    item?: boolean;\n    error?: string | null;\n    data?: {\n        [key: string]: never;\n    };\n};\n\nexport type GenericSchemaDuplicateIssue1SystemStringWritable = {\n    item?: string | null;\n    error?: string | null;\n};\n\n/**\n * This is a reusable parameter\n */\nexport type SimpleParameter = string;\n\n/**\n * Parameter with illegal characters\n */\nexport type XFooBar = ModelWithString;\n\n/**\n * A reusable request body\n */\nexport type SimpleRequestBody = ModelWithString;\n\n/**\n * A reusable request body\n */\nexport type SimpleFormData = ModelWithString;\n\nexport type ExportData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no+tag';\n};\n\nexport type PatchApiVbyApiVersionNoTagData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no+tag';\n};\n\nexport type PatchApiVbyApiVersionNoTagResponses = {\n    /**\n     * OK\n     */\n    default: unknown;\n};\n\nexport type ImportData = {\n    body: ModelWithReadOnlyAndWriteOnlyWritable | ModelWithArrayReadOnlyAndWriteOnlyWritable;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no+tag';\n};\n\nexport type ImportResponses = {\n    /**\n     * Success\n     */\n    200: ModelFromZendesk;\n    /**\n     * Default success response\n     */\n    default: ModelWithReadOnlyAndWriteOnly;\n};\n\nexport type ImportResponse = ImportResponses[keyof ImportResponses];\n\nexport type FooWowData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no+tag';\n};\n\nexport type FooWowResponses = {\n    /**\n     * OK\n     */\n    default: unknown;\n};\n\nexport type ApiVVersionODataControllerCountData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple/$count';\n};\n\nexport type ApiVVersionODataControllerCountResponses = {\n    /**\n     * Success\n     */\n    200: ModelFromZendesk;\n};\n\nexport type ApiVVersionODataControllerCountResponse = ApiVVersionODataControllerCountResponses[keyof ApiVVersionODataControllerCountResponses];\n\nexport type GetApiVbyApiVersionSimpleOperationData = {\n    body?: never;\n    path: {\n        /**\n         * foo in method\n         */\n        foo_param: string;\n    };\n    query?: never;\n    url: '/api/v{api-version}/simple:operation';\n};\n\nexport type GetApiVbyApiVersionSimpleOperationErrors = {\n    /**\n     * Default error response\n     */\n    default: ModelWithBoolean;\n};\n\nexport type GetApiVbyApiVersionSimpleOperationError = GetApiVbyApiVersionSimpleOperationErrors[keyof GetApiVbyApiVersionSimpleOperationErrors];\n\nexport type GetApiVbyApiVersionSimpleOperationResponses = {\n    /**\n     * Response is a simple number\n     */\n    200: number;\n};\n\nexport type GetApiVbyApiVersionSimpleOperationResponse = GetApiVbyApiVersionSimpleOperationResponses[keyof GetApiVbyApiVersionSimpleOperationResponses];\n\nexport type DeleteCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type GetCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type HeadCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type OptionsCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type PatchCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type PostCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type PutCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type DeleteFooData3 = {\n    body?: never;\n    headers: {\n        /**\n         * Parameter with illegal characters\n         */\n        'x-Foo-Bar': ModelWithString;\n    };\n    path: {\n        /**\n         * foo in method\n         */\n        foo_param: string;\n        /**\n         * bar in method\n         */\n        BarParam: string;\n    };\n    query?: never;\n    url: '/api/v{api-version}/foo/{foo_param}/bar/{BarParam}';\n};\n\nexport type CallWithDescriptionsData = {\n    body?: never;\n    path?: never;\n    query?: {\n        /**\n         * Testing multiline comments in string: First line\n         * Second line\n         *\n         * Fourth line\n         */\n        parameterWithBreaks?: string;\n        /**\n         * Testing backticks in string: `backticks` and ```multiple backticks``` should work\n         */\n        parameterWithBackticks?: string;\n        /**\n         * Testing slashes in string: \\backwards\\\\\\ and /forwards/// should work\n         */\n        parameterWithSlashes?: string;\n        /**\n         * Testing expression placeholders in string: ${expression} should work\n         */\n        parameterWithExpressionPlaceholders?: string;\n        /**\n         * Testing quotes in string: 'single quote''' and \"double quotes\"\"\" should work\n         */\n        parameterWithQuotes?: string;\n        /**\n         * Testing reserved characters in string: * inline * and ** inline ** should work\n         */\n        parameterWithReservedCharacters?: string;\n    };\n    url: '/api/v{api-version}/descriptions';\n};\n\nexport type DeprecatedCallData = {\n    body?: never;\n    headers: {\n        /**\n         * This parameter is deprecated\n         *\n         * @deprecated\n         */\n        parameter: DeprecatedModel | null;\n    };\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/parameters/deprecated';\n};\n\nexport type CallWithParametersData = {\n    /**\n     * This is the parameter that goes into the body\n     */\n    body: {\n        [key: string]: unknown;\n    } | null;\n    headers: {\n        /**\n         * This is the parameter that goes into the header\n         */\n        parameterHeader: string | null;\n    };\n    path: {\n        /**\n         * This is the parameter that goes into the path\n         */\n        parameterPath: string | null;\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string | null;\n    };\n    query: {\n        foo_ref_enum?: ModelWithNestedArrayEnumsDataFoo;\n        foo_all_of_enum: ModelWithNestedArrayEnumsDataFoo;\n        /**\n         * This is the parameter that goes into the query params\n         */\n        cursor: string | null;\n    };\n    url: '/api/v{api-version}/parameters/{parameterPath}';\n};\n\nexport type CallWithWeirdParameterNamesData = {\n    /**\n     * This is the parameter that goes into the body\n     */\n    body: ModelWithString | null;\n    headers: {\n        /**\n         * This is the parameter that goes into the request header\n         */\n        'parameter.header': string | null;\n    };\n    path: {\n        /**\n         * This is the parameter that goes into the path\n         */\n        'parameter.path.1'?: string;\n        /**\n         * This is the parameter that goes into the path\n         */\n        'parameter-path-2'?: string;\n        /**\n         * This is the parameter that goes into the path\n         */\n        'PARAMETER-PATH-3'?: string;\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string | null;\n    };\n    query: {\n        /**\n         * This is the parameter with a reserved keyword\n         */\n        default?: string;\n        /**\n         * This is the parameter that goes into the request query params\n         */\n        'parameter-query': string | null;\n    };\n    url: '/api/v{api-version}/parameters/{parameter.path.1}/{parameter-path-2}/{PARAMETER-PATH-3}';\n};\n\nexport type GetCallWithOptionalParamData = {\n    /**\n     * This is a required parameter\n     */\n    body: ModelWithOneOfEnum;\n    path?: never;\n    query?: {\n        /**\n         * This is an optional parameter\n         */\n        page?: number;\n    };\n    url: '/api/v{api-version}/parameters';\n};\n\nexport type PostCallWithOptionalParamData = {\n    /**\n     * This is an optional parameter\n     */\n    body?: {\n        offset?: number | null;\n    };\n    path?: never;\n    query: {\n        /**\n         * This is a required parameter\n         */\n        parameter: Pageable;\n    };\n    url: '/api/v{api-version}/parameters';\n};\n\nexport type PostCallWithOptionalParamResponses = {\n    /**\n     * Response is a simple number\n     */\n    200: number;\n    /**\n     * Success\n     */\n    204: void;\n};\n\nexport type PostCallWithOptionalParamResponse = PostCallWithOptionalParamResponses[keyof PostCallWithOptionalParamResponses];\n\nexport type PostApiVbyApiVersionRequestBodyData = {\n    /**\n     * A reusable request body\n     */\n    body?: SimpleRequestBody;\n    path?: never;\n    query?: {\n        /**\n         * This is a reusable parameter\n         */\n        parameter?: string;\n    };\n    url: '/api/v{api-version}/requestBody';\n};\n\nexport type PostApiVbyApiVersionFormDataData = {\n    /**\n     * A reusable request body\n     */\n    body?: SimpleFormData;\n    path?: never;\n    query?: {\n        /**\n         * This is a reusable parameter\n         */\n        parameter?: string;\n    };\n    url: '/api/v{api-version}/formData';\n};\n\nexport type CallWithDefaultParametersData = {\n    body?: never;\n    path?: never;\n    query?: {\n        /**\n         * This is a simple string with default value\n         */\n        parameterString?: string | null;\n        /**\n         * This is a simple number with default value\n         */\n        parameterNumber?: number | null;\n        /**\n         * This is a simple boolean with default value\n         */\n        parameterBoolean?: boolean | null;\n        /**\n         * This is a simple enum with default value\n         */\n        parameterEnum?: 'Success' | 'Warning' | 'Error';\n        /**\n         * This is a simple model with default value\n         */\n        parameterModel?: ModelWithString | null;\n    };\n    url: '/api/v{api-version}/defaults';\n};\n\nexport type CallWithDefaultOptionalParametersData = {\n    body?: never;\n    path?: never;\n    query?: {\n        /**\n         * This is a simple string that is optional with default value\n         */\n        parameterString?: string;\n        /**\n         * This is a simple number that is optional with default value\n         */\n        parameterNumber?: number;\n        /**\n         * This is a simple boolean that is optional with default value\n         */\n        parameterBoolean?: boolean;\n        /**\n         * This is a simple enum that is optional with default value\n         */\n        parameterEnum?: 'Success' | 'Warning' | 'Error';\n        /**\n         * This is a simple model that is optional with default value\n         */\n        parameterModel?: ModelWithString;\n    };\n    url: '/api/v{api-version}/defaults';\n};\n\nexport type CallToTestOrderOfParamsData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * This is a optional string with default\n         */\n        parameterOptionalStringWithDefault?: string;\n        /**\n         * This is a optional string with empty default\n         */\n        parameterOptionalStringWithEmptyDefault?: string;\n        /**\n         * This is a optional string with no default\n         */\n        parameterOptionalStringWithNoDefault?: string;\n        /**\n         * This is a string with default\n         */\n        parameterStringWithDefault: string;\n        /**\n         * This is a string with empty default\n         */\n        parameterStringWithEmptyDefault: string;\n        /**\n         * This is a string with no default\n         */\n        parameterStringWithNoDefault: string;\n        /**\n         * This is a string that can be null with no default\n         */\n        parameterStringNullableWithNoDefault?: string | null;\n        /**\n         * This is a string that can be null with default\n         */\n        parameterStringNullableWithDefault?: string | null;\n    };\n    url: '/api/v{api-version}/defaults';\n};\n\nexport type DuplicateNameData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/duplicate';\n};\n\nexport type DuplicateName2Data = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/duplicate';\n};\n\nexport type DuplicateName3Data = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/duplicate';\n};\n\nexport type DuplicateName4Data = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/duplicate';\n};\n\nexport type CallWithNoContentResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no-content';\n};\n\nexport type CallWithNoContentResponseResponses = {\n    /**\n     * Success\n     */\n    204: void;\n};\n\nexport type CallWithNoContentResponseResponse = CallWithNoContentResponseResponses[keyof CallWithNoContentResponseResponses];\n\nexport type CallWithResponseAndNoContentResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multiple-tags/response-and-no-content';\n};\n\nexport type CallWithResponseAndNoContentResponseResponses = {\n    /**\n     * Response is a simple number\n     */\n    200: number;\n    /**\n     * Success\n     */\n    204: void;\n};\n\nexport type CallWithResponseAndNoContentResponseResponse = CallWithResponseAndNoContentResponseResponses[keyof CallWithResponseAndNoContentResponseResponses];\n\nexport type DummyAData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multiple-tags/a';\n};\n\nexport type DummyAResponses = {\n    200: _400;\n};\n\nexport type DummyAResponse = DummyAResponses[keyof DummyAResponses];\n\nexport type DummyBData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multiple-tags/b';\n};\n\nexport type DummyBResponses = {\n    /**\n     * Success\n     */\n    204: void;\n};\n\nexport type DummyBResponse = DummyBResponses[keyof DummyBResponses];\n\nexport type CallWithResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/response';\n};\n\nexport type CallWithResponseResponses = {\n    default: Import;\n};\n\nexport type CallWithResponseResponse = CallWithResponseResponses[keyof CallWithResponseResponses];\n\nexport type CallWithDuplicateResponsesData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/response';\n};\n\nexport type CallWithDuplicateResponsesErrors = {\n    /**\n     * Message for 500 error\n     */\n    500: ModelWithStringError;\n    /**\n     * Message for 501 error\n     */\n    501: ModelWithStringError;\n    /**\n     * Message for 502 error\n     */\n    502: ModelWithStringError;\n    /**\n     * Message for 4XX errors\n     */\n    '4XX': DictionaryWithArray;\n    /**\n     * Default error response\n     */\n    default: ModelWithBoolean;\n};\n\nexport type CallWithDuplicateResponsesError = CallWithDuplicateResponsesErrors[keyof CallWithDuplicateResponsesErrors];\n\nexport type CallWithDuplicateResponsesResponses = {\n    /**\n     * Message for 200 response\n     */\n    200: ModelWithBoolean & ModelWithInteger;\n    /**\n     * Message for 201 response\n     */\n    201: ModelWithString;\n    /**\n     * Message for 202 response\n     */\n    202: ModelWithString;\n};\n\nexport type CallWithDuplicateResponsesResponse = CallWithDuplicateResponsesResponses[keyof CallWithDuplicateResponsesResponses];\n\nexport type CallWithResponsesData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/response';\n};\n\nexport type CallWithResponsesErrors = {\n    /**\n     * Message for 500 error\n     */\n    500: ModelWithStringError;\n    /**\n     * Message for 501 error\n     */\n    501: ModelWithStringError;\n    /**\n     * Message for 502 error\n     */\n    502: ModelWithStringError;\n    /**\n     * Message for default response\n     */\n    default: ModelWithStringError;\n};\n\nexport type CallWithResponsesError = CallWithResponsesErrors[keyof CallWithResponsesErrors];\n\nexport type CallWithResponsesResponses = {\n    /**\n     * Message for 200 response\n     */\n    200: {\n        readonly '@namespace.string'?: string;\n        readonly '@namespace.integer'?: number;\n        readonly value?: Array<ModelWithString>;\n    };\n    /**\n     * Message for 201 response\n     */\n    201: ModelThatExtends;\n    /**\n     * Message for 202 response\n     */\n    202: ModelThatExtendsExtends;\n};\n\nexport type CallWithResponsesResponse = CallWithResponsesResponses[keyof CallWithResponsesResponses];\n\nexport type CollectionFormatData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * This is an array parameter that is sent as csv format (comma-separated values)\n         */\n        parameterArrayCSV: Array<string> | null;\n        /**\n         * This is an array parameter that is sent as ssv format (space-separated values)\n         */\n        parameterArraySSV: Array<string> | null;\n        /**\n         * This is an array parameter that is sent as tsv format (tab-separated values)\n         */\n        parameterArrayTSV: Array<string> | null;\n        /**\n         * This is an array parameter that is sent as pipes format (pipe-separated values)\n         */\n        parameterArrayPipes: Array<string> | null;\n        /**\n         * This is an array parameter that is sent as multi format (multiple parameter instances)\n         */\n        parameterArrayMulti: Array<string> | null;\n    };\n    url: '/api/v{api-version}/collectionFormat';\n};\n\nexport type TypesData = {\n    body?: never;\n    path?: {\n        /**\n         * This is a number parameter\n         */\n        id?: number;\n    };\n    query: {\n        /**\n         * This is a number parameter\n         */\n        parameterNumber: number;\n        /**\n         * This is a string parameter\n         */\n        parameterString: string | null;\n        /**\n         * This is a boolean parameter\n         */\n        parameterBoolean: boolean | null;\n        /**\n         * This is an object parameter\n         */\n        parameterObject: {\n            [key: string]: unknown;\n        } | null;\n        /**\n         * This is an array parameter\n         */\n        parameterArray: Array<string> | null;\n        /**\n         * This is a dictionary parameter\n         */\n        parameterDictionary: {\n            [key: string]: unknown;\n        } | null;\n        /**\n         * This is an enum parameter\n         */\n        parameterEnum: 'Success' | 'Warning' | 'Error' | null;\n    };\n    url: '/api/v{api-version}/types';\n};\n\nexport type TypesResponses = {\n    /**\n     * Response is a simple number\n     */\n    200: number;\n    /**\n     * Response is a simple string\n     */\n    201: string;\n    /**\n     * Response is a simple boolean\n     */\n    202: boolean;\n    /**\n     * Response is a simple object\n     */\n    203: {\n        [key: string]: unknown;\n    };\n};\n\nexport type TypesResponse = TypesResponses[keyof TypesResponses];\n\nexport type UploadFileData = {\n    body: Blob | File;\n    path: {\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string | null;\n    };\n    query?: never;\n    url: '/api/v{api-version}/upload';\n};\n\nexport type UploadFileResponses = {\n    200: boolean;\n};\n\nexport type UploadFileResponse = UploadFileResponses[keyof UploadFileResponses];\n\nexport type FileResponseData = {\n    body?: never;\n    path: {\n        id: string;\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string;\n    };\n    query?: never;\n    url: '/api/v{api-version}/file/{id}';\n};\n\nexport type FileResponseResponses = {\n    /**\n     * Success\n     */\n    200: Blob | File;\n};\n\nexport type FileResponseResponse = FileResponseResponses[keyof FileResponseResponses];\n\nexport type ComplexTypesData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * Parameter containing object\n         */\n        parameterObject: {\n            first?: {\n                second?: {\n                    third?: string;\n                };\n            };\n        };\n        /**\n         * Parameter containing reference\n         */\n        parameterReference: ModelWithString;\n    };\n    url: '/api/v{api-version}/complex';\n};\n\nexport type ComplexTypesErrors = {\n    /**\n     * 400 `server` error\n     */\n    400: unknown;\n    /**\n     * 500 server error\n     */\n    500: unknown;\n};\n\nexport type ComplexTypesResponses = {\n    /**\n     * Successful response\n     */\n    200: Array<ModelWithString>;\n};\n\nexport type ComplexTypesResponse = ComplexTypesResponses[keyof ComplexTypesResponses];\n\nexport type MultipartResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multipart';\n};\n\nexport type MultipartResponseResponses = {\n    /**\n     * OK\n     */\n    200: {\n        file?: Blob | File;\n        metadata?: {\n            foo?: string;\n            bar?: string;\n        };\n    };\n};\n\nexport type MultipartResponseResponse = MultipartResponseResponses[keyof MultipartResponseResponses];\n\nexport type MultipartRequestData = {\n    body?: {\n        content?: Blob | File;\n        data?: ModelWithString | null;\n    };\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multipart';\n};\n\nexport type ComplexParamsData = {\n    body?: {\n        readonly key: string | null;\n        name: string | null;\n        enabled?: boolean;\n        type: 'Monkey' | 'Horse' | 'Bird';\n        listOfModels?: Array<ModelWithString> | null;\n        listOfStrings?: Array<string> | null;\n        parameters: ModelWithString | ModelWithEnum | ModelWithArray | ModelWithDictionary;\n        readonly user?: {\n            readonly id?: number;\n            readonly name?: string | null;\n        };\n    };\n    path: {\n        id: number;\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string;\n    };\n    query?: never;\n    url: '/api/v{api-version}/complex/{id}';\n};\n\nexport type ComplexParamsResponses = {\n    /**\n     * Success\n     */\n    200: ModelWithString;\n};\n\nexport type ComplexParamsResponse = ComplexParamsResponses[keyof ComplexParamsResponses];\n\nexport type CallWithResultFromHeaderData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/header';\n};\n\nexport type CallWithResultFromHeaderErrors = {\n    /**\n     * 400 server error\n     */\n    400: unknown;\n    /**\n     * 500 server error\n     */\n    500: unknown;\n};\n\nexport type CallWithResultFromHeaderResponses = {\n    /**\n     * Successful response\n     */\n    200: unknown;\n};\n\nexport type TestErrorCodeData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * Status code to return\n         */\n        status: number;\n    };\n    url: '/api/v{api-version}/error';\n};\n\nexport type TestErrorCodeErrors = {\n    /**\n     * Custom message: Internal Server Error\n     */\n    500: unknown;\n    /**\n     * Custom message: Not Implemented\n     */\n    501: unknown;\n    /**\n     * Custom message: Bad Gateway\n     */\n    502: unknown;\n    /**\n     * Custom message: Service Unavailable\n     */\n    503: unknown;\n};\n\nexport type TestErrorCodeResponses = {\n    /**\n     * Custom message: Successful response\n     */\n    200: unknown;\n};\n\nexport type NonAsciiæøåÆøÅöôêÊ字符串Data = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * Dummy input param\n         */\n        nonAsciiParamæøåÆØÅöôêÊ: number;\n    };\n    url: '/api/v{api-version}/non-ascii-æøåÆØÅöôêÊ字符串';\n};\n\nexport type NonAsciiæøåÆøÅöôêÊ字符串Responses = {\n    /**\n     * Successful response\n     */\n    200: Array<NonAsciiStringæøåÆøÅöôêÊ字符串>;\n};\n\nexport type NonAsciiæøåÆøÅöôêÊ字符串Response = NonAsciiæøåÆøÅöôêÊ字符串Responses[keyof NonAsciiæøåÆøÅöôêÊ字符串Responses];\n\nexport type PutWithFormUrlEncodedData = {\n    body: ArrayWithStrings;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/non-ascii-æøåÆØÅöôêÊ字符串';\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-next/base-url-string/client/client.gen.ts",
    "content": "// 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<Response, unknown, ResolvedRequestOptions>();\n\n  const beforeRequest = async (options: RequestOptions) => {\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 url = buildUrl(opts);\n\n    return { opts, url };\n  };\n\n  // @ts-expect-error\n  const request: Client['request'] = async (options) => {\n    // @ts-expect-error\n    const { opts, url } = await beforeRequest(options);\n\n    for (const fn of interceptors.request.fns) {\n      if (fn) {\n        await fn(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    const requestInit: ReqInit = {\n      ...opts,\n      body: getValidRequestBody(opts),\n    };\n\n    let response = await _fetch(url, requestInit);\n\n    for (const fn of interceptors.response.fns) {\n      if (fn) {\n        response = await fn(response, opts);\n      }\n    }\n\n    const result = {\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 {\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 {\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 {\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, opts)) as string;\n      }\n    }\n\n    finalError = finalError || ({} as string);\n\n    if (opts.throwOnError) {\n      throw finalError;\n    }\n\n    return {\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        const requestInit = {\n          ...init,\n          method: init.method as Config['method'],\n          url,\n        };\n        for (const fn of interceptors.request.fns) {\n          if (fn) {\n            await fn(requestInit);\n            request = new Request(requestInit.url, requestInit);\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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-next/base-url-string/client/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type { Auth } from '../core/auth.gen';\nexport type { QuerySerializerOptions } from '../core/bodySerializer.gen';\nexport {\n  formDataBodySerializer,\n  jsonBodySerializer,\n  urlSearchParamsBodySerializer,\n} from '../core/bodySerializer.gen';\nexport { buildClientParams } from '../core/params.gen';\nexport { serializeQueryKeyValue } from '../core/queryKeySerializer.gen';\nexport { createClient } from './client.gen';\nexport type {\n  Client,\n  ClientOptions,\n  Config,\n  CreateClientConfig,\n  Options,\n  RequestOptions,\n  RequestResult,\n  TDataShape,\n} from './types.gen';\nexport { createConfig } from './utils.gen';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-next/base-url-string/client/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { Auth } from '../core/auth.gen';\nimport type {\n  ServerSentEventsOptions,\n  ServerSentEventsResult,\n} from '../core/serverSentEvents.gen';\nimport type { Client as CoreClient, Config as CoreConfig } from '../core/types.gen';\nimport type { Middleware } from './utils.gen';\n\nexport interface Config<T extends ClientOptions = ClientOptions>\n  extends Omit<RequestInit, 'body' | 'headers' | 'method'>, CoreConfig {\n  /**\n   * Base URL for all requests made by this client.\n   */\n  baseUrl?: T['baseUrl'];\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   * Return the response data parsed in a specified format. By default, `auto`\n   * will infer the appropriate method from the `Content-Type` response header.\n   * You can override this behavior with any of the {@link Body} methods.\n   * Select `stream` if you don't want to parse response data at all.\n   *\n   * @default 'auto'\n   */\n  parseAs?: 'arrayBuffer' | 'auto' | 'blob' | 'formData' | 'json' | 'stream' | 'text';\n  /**\n   * Throw an error instead of returning it in the response?\n   *\n   * @default false\n   */\n  throwOnError?: T['throwOnError'];\n}\n\nexport interface RequestOptions<\n  TData = unknown,\n  ThrowOnError extends boolean = boolean,\n  Url extends string = string,\n>\n  extends\n    Config<{\n      throwOnError: ThrowOnError;\n    }>,\n    Pick<\n      ServerSentEventsOptions<TData>,\n      | 'onRequest'\n      | 'onSseError'\n      | 'onSseEvent'\n      | 'sseDefaultRetryDelay'\n      | 'sseMaxRetryAttempts'\n      | 'sseMaxRetryDelay'\n    > {\n  /**\n   * Any body that you want to add to your request.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/fetch#body}\n   */\n  body?: unknown;\n  path?: Record<string, unknown>;\n  query?: Record<string, unknown>;\n  /**\n   * Security mechanism(s) to use for the request.\n   */\n  security?: ReadonlyArray<Auth>;\n  url: Url;\n}\n\nexport interface ResolvedRequestOptions<\n  ThrowOnError extends boolean = boolean,\n  Url extends string = string,\n> extends RequestOptions<unknown, ThrowOnError, Url> {\n  serializedBody?: string;\n}\n\nexport type RequestResult<\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = boolean,\n> = ThrowOnError extends true\n  ? Promise<{\n      data: TData extends Record<string, unknown> ? TData[keyof TData] : TData;\n      response: Response;\n    }>\n  : Promise<\n      (\n        | {\n            data: TData extends Record<string, unknown> ? TData[keyof TData] : TData;\n            error: undefined;\n          }\n        | {\n            data: undefined;\n            error: TError extends Record<string, unknown> ? TError[keyof TError] : TError;\n          }\n      ) & {\n        response: Response;\n      }\n    >;\n\nexport interface ClientOptions {\n  baseUrl?: string;\n  throwOnError?: boolean;\n}\n\ntype MethodFn = <TData = unknown, TError = unknown, ThrowOnError extends boolean = false>(\n  options: Omit<RequestOptions<TData, ThrowOnError>, 'method'>,\n) => RequestResult<TData, TError, ThrowOnError>;\n\ntype SseFn = <TData = unknown, TError = unknown, ThrowOnError extends boolean = false>(\n  options: Omit<RequestOptions<TData, ThrowOnError>, 'method'>,\n) => Promise<ServerSentEventsResult<TData, TError>>;\n\ntype RequestFn = <TData = unknown, TError = unknown, ThrowOnError extends boolean = false>(\n  options: Omit<RequestOptions<TData, ThrowOnError>, 'method'> &\n    Pick<Required<RequestOptions<TData, ThrowOnError>>, 'method'>,\n) => RequestResult<TData, TError, ThrowOnError>;\n\ntype BuildUrlFn = <\n  TData extends {\n    body?: unknown;\n    path?: Record<string, unknown>;\n    query?: Record<string, unknown>;\n    url: string;\n  },\n>(\n  options: TData & Options<TData>,\n) => string;\n\nexport type Client = CoreClient<RequestFn, Config, MethodFn, BuildUrlFn, SseFn> & {\n  interceptors: Middleware<Response, unknown, ResolvedRequestOptions>;\n};\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 = ClientOptions> = (\n  override?: Config<ClientOptions & T>,\n) => Config<Required<ClientOptions> & T>;\n\nexport interface TDataShape {\n  body?: unknown;\n  headers?: unknown;\n  path?: unknown;\n  query?: unknown;\n  url: string;\n}\n\ntype OmitKeys<T, K> = Pick<T, Exclude<keyof T, K>>;\n\nexport type Options<\n  TData extends TDataShape = TDataShape,\n  ThrowOnError extends boolean = boolean,\n  TResponse = unknown,\n> = OmitKeys<RequestOptions<TResponse, ThrowOnError>, 'body' | 'path' | 'query' | 'url'> &\n  ([TData] extends [never] ? unknown : Omit<TData, 'url'>);\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-next/base-url-string/client/utils.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport { getAuthToken } from '../core/auth.gen';\nimport type {\n  QuerySerializer,\n  QuerySerializerOptions,\n} from '../core/bodySerializer.gen';\nimport { jsonBodySerializer } from '../core/bodySerializer.gen';\nimport {\n  serializeArrayParam,\n  serializeObjectParam,\n  serializePrimitiveParam,\n} from '../core/pathSerializer.gen';\nimport type { Client, ClientOptions, Config, RequestOptions } from './types.gen';\n\ninterface PathSerializer {\n  path: Record<string, unknown>;\n  url: string;\n}\n\nconst PATH_PARAM_RE = /\\{[^{}]+\\}/g;\n\ntype ArrayStyle = 'form' | 'spaceDelimited' | 'pipeDelimited';\ntype MatrixStyle = 'label' | 'matrix' | 'simple';\ntype ArraySeparatorStyle = ArrayStyle | MatrixStyle;\n\nconst 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 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    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  const url = 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  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 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 || typeof header !== 'object') {\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, Options> = (\n  error: Err,\n  response: Res,\n  options: Options,\n) => Err | Promise<Err>;\n\ntype ReqInterceptor<Options> = (options: Options) => void | Promise<void>;\n\ntype ResInterceptor<Res, Options> = (response: Res, options: Options) => 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<Res, Err, Options> {\n  error: Interceptors<ErrInterceptor<Err, Res, Options>>;\n  request: Interceptors<ReqInterceptor<Options>>;\n  response: Interceptors<ResInterceptor<Res, Options>>;\n}\n\nexport const createInterceptors = <Res, Err, Options>(): Middleware<Res, Err, Options> => ({\n  error: new Interceptors<ErrInterceptor<Err, Res, Options>>(),\n  request: new Interceptors<ReqInterceptor<Options>>(),\n  response: new Interceptors<ResInterceptor<Res, 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-next/base-url-string/client.gen.ts",
    "content": "// 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://foo.com' }));\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-next/base-url-string/core/auth.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-next/base-url-string/core/bodySerializer.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-next/base-url-string/core/params.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-next/base-url-string/core/pathSerializer.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-next/base-url-string/core/queryKeySerializer.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\n/**\n * JSON-friendly union that mirrors what Pinia Colada can hash.\n */\nexport type JsonValue =\n  | null\n  | string\n  | number\n  | boolean\n  | JsonValue[]\n  | { [key: string]: JsonValue };\n\n/**\n * Replacer that converts non-JSON values (bigint, Date, etc.) to safe substitutes.\n */\nexport const queryKeyJsonReplacer = (_key: string, value: unknown) => {\n  if (value === undefined || typeof value === 'function' || typeof value === 'symbol') {\n    return undefined;\n  }\n  if (typeof value === 'bigint') {\n    return value.toString();\n  }\n  if (value instanceof Date) {\n    return value.toISOString();\n  }\n  return value;\n};\n\n/**\n * Safely stringifies a value and parses it back into a JsonValue.\n */\nexport const stringifyToJsonValue = (input: unknown): JsonValue | undefined => {\n  try {\n    const json = JSON.stringify(input, queryKeyJsonReplacer);\n    if (json === undefined) {\n      return undefined;\n    }\n    return JSON.parse(json) as JsonValue;\n  } catch {\n    return undefined;\n  }\n};\n\n/**\n * Detects plain objects (including objects with a null prototype).\n */\nconst isPlainObject = (value: unknown): value is Record<string, unknown> => {\n  if (value === null || typeof value !== 'object') {\n    return false;\n  }\n  const prototype = Object.getPrototypeOf(value as object);\n  return prototype === Object.prototype || prototype === null;\n};\n\n/**\n * Turns URLSearchParams into a sorted JSON object for deterministic keys.\n */\nconst serializeSearchParams = (params: URLSearchParams): JsonValue => {\n  const entries = Array.from(params.entries()).sort(([a], [b]) => a.localeCompare(b));\n  const result: Record<string, JsonValue> = {};\n\n  for (const [key, value] of entries) {\n    const existing = result[key];\n    if (existing === undefined) {\n      result[key] = value;\n      continue;\n    }\n\n    if (Array.isArray(existing)) {\n      (existing as string[]).push(value);\n    } else {\n      result[key] = [existing, value];\n    }\n  }\n\n  return result;\n};\n\n/**\n * Normalizes any accepted value into a JSON-friendly shape for query keys.\n */\nexport const serializeQueryKeyValue = (value: unknown): JsonValue | undefined => {\n  if (value === null) {\n    return null;\n  }\n\n  if (typeof value === 'string' || typeof value === 'number' || typeof value === 'boolean') {\n    return value;\n  }\n\n  if (value === undefined || typeof value === 'function' || typeof value === 'symbol') {\n    return undefined;\n  }\n\n  if (typeof value === 'bigint') {\n    return value.toString();\n  }\n\n  if (value instanceof Date) {\n    return value.toISOString();\n  }\n\n  if (Array.isArray(value)) {\n    return stringifyToJsonValue(value);\n  }\n\n  if (typeof URLSearchParams !== 'undefined' && value instanceof URLSearchParams) {\n    return serializeSearchParams(value);\n  }\n\n  if (isPlainObject(value)) {\n    return stringifyToJsonValue(value);\n  }\n\n  return undefined;\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-next/base-url-string/core/serverSentEvents.gen.ts",
    "content": "// 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 const 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            // Normalize line endings: CRLF -> LF, then CR -> LF\n            buffer = buffer.replace(/\\r\\n/g, '\\n').replace(/\\r/g, '\\n');\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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-next/base-url-string/core/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { Auth, AuthToken } from './auth.gen';\nimport type { BodySerializer, QuerySerializer, QuerySerializerOptions } from './bodySerializer.gen';\n\nexport type HttpMethod =\n  | 'connect'\n  | 'delete'\n  | 'get'\n  | 'head'\n  | 'options'\n  | 'patch'\n  | 'post'\n  | 'put'\n  | 'trace';\n\nexport type Client<\n  RequestFn = never,\n  Config = unknown,\n  MethodFn = never,\n  BuildUrlFn = never,\n  SseFn = never,\n> = {\n  /**\n   * Returns the final request URL.\n   */\n  buildUrl: BuildUrlFn;\n  getConfig: () => Config;\n  request: RequestFn;\n  setConfig: (config: Config) => Config;\n} & {\n  [K in HttpMethod]: MethodFn;\n} & ([SseFn] extends [never] ? { sse?: never } : { sse: { [K in HttpMethod]: SseFn } });\n\nexport interface Config {\n  /**\n   * Auth token or a function returning auth token. The resolved value will be\n   * added to the request payload as defined by its `security` array.\n   */\n  auth?: ((auth: Auth) => Promise<AuthToken> | AuthToken) | AuthToken;\n  /**\n   * A function for serializing request body parameter. By default,\n   * {@link JSON.stringify()} will be used.\n   */\n  bodySerializer?: BodySerializer | null;\n  /**\n   * An object containing any HTTP headers that you want to pre-populate your\n   * `Headers` object with.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/Headers/Headers#init See more}\n   */\n  headers?:\n    | RequestInit['headers']\n    | Record<\n        string,\n        string | number | boolean | (string | number | boolean)[] | null | undefined | unknown\n      >;\n  /**\n   * The request method.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/fetch#method See more}\n   */\n  method?: Uppercase<HttpMethod>;\n  /**\n   * A function for serializing request query parameters. By default, arrays\n   * will be exploded in form style, objects will be exploded in deepObject\n   * style, and reserved characters are percent-encoded.\n   *\n   * This method will have no effect if the native `paramsSerializer()` Axios\n   * API function is used.\n   *\n   * {@link https://swagger.io/docs/specification/serialization/#query View examples}\n   */\n  querySerializer?: QuerySerializer | QuerySerializerOptions;\n  /**\n   * A function validating request data. This is useful if you want to ensure\n   * the request conforms to the desired shape, so it can be safely sent to\n   * the server.\n   */\n  requestValidator?: (data: unknown) => Promise<unknown>;\n  /**\n   * A function transforming response data before it's returned. This is useful\n   * for post-processing data, e.g. converting ISO strings into Date objects.\n   */\n  responseTransformer?: (data: unknown) => Promise<unknown>;\n  /**\n   * A function validating response data. This is useful if you want to ensure\n   * the response conforms to the desired shape, so it can be safely passed to\n   * the transformers and returned to the user.\n   */\n  responseValidator?: (data: unknown) => Promise<unknown>;\n}\n\ntype IsExactlyNeverOrNeverUndefined<T> = [T] extends [never]\n  ? true\n  : [T] extends [never | undefined]\n    ? [undefined] extends [T]\n      ? false\n      : true\n    : false;\n\nexport type OmitNever<T extends Record<string, unknown>> = {\n  [K in keyof T as IsExactlyNeverOrNeverUndefined<T[K]> extends true ? never : K]: T[K];\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-next/base-url-string/core/utils.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-next/base-url-string/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type { _3eNum1Период, _400, AdditionalPropertiesIntegerIssue, AdditionalPropertiesUnknownIssue, AdditionalPropertiesUnknownIssue2, AdditionalPropertiesUnknownIssue3, AdditionalPropertiesUnknownIssueWritable, AnyOfAnyAndNull, AnyOfArrays, ApiVVersionODataControllerCountData, ApiVVersionODataControllerCountResponse, ApiVVersionODataControllerCountResponses, ArrayWithAnyOfProperties, ArrayWithArray, ArrayWithBooleans, ArrayWithNumbers, ArrayWithProperties, ArrayWithReferences, ArrayWithStrings, CallToTestOrderOfParamsData, CallWithDefaultOptionalParametersData, CallWithDefaultParametersData, CallWithDescriptionsData, CallWithDuplicateResponsesData, CallWithDuplicateResponsesError, CallWithDuplicateResponsesErrors, CallWithDuplicateResponsesResponse, CallWithDuplicateResponsesResponses, CallWithNoContentResponseData, CallWithNoContentResponseResponse, CallWithNoContentResponseResponses, CallWithParametersData, CallWithResponseAndNoContentResponseData, CallWithResponseAndNoContentResponseResponse, CallWithResponseAndNoContentResponseResponses, CallWithResponseData, CallWithResponseResponse, CallWithResponseResponses, CallWithResponsesData, CallWithResponsesError, CallWithResponsesErrors, CallWithResponsesResponse, CallWithResponsesResponses, CallWithResultFromHeaderData, CallWithResultFromHeaderErrors, CallWithResultFromHeaderResponses, CallWithWeirdParameterNamesData, CamelCaseCommentWithBreaks, CharactersInDescription, ClientOptions, CollectionFormatData, CommentWithBackticks, CommentWithBackticksAndQuotes, CommentWithBreaks, CommentWithExpressionPlaceholders, CommentWithQuotes, CommentWithReservedCharacters, CommentWithSlashes, ComplexParamsData, ComplexParamsResponse, ComplexParamsResponses, ComplexTypesData, ComplexTypesErrors, ComplexTypesResponse, ComplexTypesResponses, CompositionBaseModel, CompositionExtendedModel, CompositionWithAllOfAndNullable, CompositionWithAnyOf, CompositionWithAnyOfAndNullable, CompositionWithAnyOfAnonymous, CompositionWithNestedAnyAndTypeNull, CompositionWithNestedAnyOfAndNull, CompositionWithOneOf, CompositionWithOneOfAndComplexArrayDictionary, CompositionWithOneOfAndNullable, CompositionWithOneOfAndProperties, CompositionWithOneOfAndSimpleArrayDictionary, CompositionWithOneOfAndSimpleDictionary, CompositionWithOneOfAnonymous, CompositionWithOneOfDiscriminator, ConstValue, Default, DeleteCallWithoutParametersAndResponseData, DeleteFooData, DeleteFooData2, DeleteFooData3, DeprecatedCallData, DeprecatedModel, DictionaryWithArray, DictionaryWithDictionary, DictionaryWithProperties, DictionaryWithPropertiesAndAdditionalProperties, DictionaryWithReference, DictionaryWithString, DummyAData, DummyAResponse, DummyAResponses, DummyBData, DummyBResponse, DummyBResponses, DuplicateName2Data, DuplicateName3Data, DuplicateName4Data, DuplicateNameData, EnumFromDescription, EnumWithExtensions, EnumWithNumbers, EnumWithReplacedCharacters, EnumWithStrings, EnumWithXEnumNames, ExportData, ExternalRefA, ExternalRefB, ExternalSharedModel, File, FileResponseData, FileResponseResponse, FileResponseResponses, FileWritable, FooWowData, FooWowResponses, FreeFormObjectWithAdditionalPropertiesEqEmptyObject, FreeFormObjectWithAdditionalPropertiesEqTrue, FreeFormObjectWithoutAdditionalProperties, GenericSchemaDuplicateIssue1SystemBoolean, GenericSchemaDuplicateIssue1SystemBooleanWritable, GenericSchemaDuplicateIssue1SystemString, GenericSchemaDuplicateIssue1SystemStringWritable, GetApiVbyApiVersionSimpleOperationData, GetApiVbyApiVersionSimpleOperationError, GetApiVbyApiVersionSimpleOperationErrors, GetApiVbyApiVersionSimpleOperationResponse, GetApiVbyApiVersionSimpleOperationResponses, GetCallWithOptionalParamData, GetCallWithoutParametersAndResponseData, HeadCallWithoutParametersAndResponseData, Import, ImportData, ImportResponse, ImportResponses, IoK8sApimachineryPkgApisMetaV1DeleteOptions, IoK8sApimachineryPkgApisMetaV1Preconditions, ModelCircle, ModelFromZendesk, ModelSquare, ModelThatExtends, ModelThatExtendsExtends, ModelWithAdditionalPropertiesEqTrue, ModelWithAdditionalPropertiesRef, ModelWithAnyOfConstantSizeArray, ModelWithAnyOfConstantSizeArrayAndIntersect, ModelWithAnyOfConstantSizeArrayNullable, ModelWithAnyOfConstantSizeArrayWithNSizeAndOptions, ModelWithAnyOfConstantSizeArrayWithNSizeAndOptionsWritable, ModelWithArray, ModelWithArrayReadOnlyAndWriteOnly, ModelWithArrayReadOnlyAndWriteOnlyWritable, ModelWithBackticksInDescription, ModelWithBoolean, ModelWithCircularReference, ModelWithConst, ModelWithConstantSizeArray, ModelWithDictionary, ModelWithDuplicateImports, ModelWithDuplicateProperties, ModelWithEnum, ModelWithEnumFromDescription, ModelWithEnumWithHyphen, ModelWithInteger, ModelWithNestedArrayEnums, ModelWithNestedArrayEnumsData, ModelWithNestedArrayEnumsDataBar, ModelWithNestedArrayEnumsDataFoo, ModelWithNestedCompositionEnums, ModelWithNestedEnums, ModelWithNestedProperties, ModelWithNullableObject, ModelWithNullableString, ModelWithNumericEnumUnion, ModelWithOneOfAndProperties, ModelWithOneOfEnum, ModelWithOrderedProperties, ModelWithPattern, ModelWithPatternWritable, ModelWithPrefixItemsConstantSizeArray, ModelWithProperties, ModelWithPropertiesWritable, ModelWithReadOnlyAndWriteOnly, ModelWithReadOnlyAndWriteOnlyWritable, ModelWithReference, ModelWithReferenceWritable, ModelWithString, ModelWithStringError, MultipartRequestData, MultipartResponseData, MultipartResponseResponse, MultipartResponseResponses, NestedAnyOfArraysNullable, NonAsciiæøåÆøÅöôêÊ字符串Data, NonAsciiæøåÆøÅöôêÊ字符串Response, NonAsciiæøåÆøÅöôêÊ字符串Responses, NonAsciiStringæøåÆøÅöôêÊ字符串, NullableObject, OneOfAllOfIssue, OneOfAllOfIssueWritable, OptionsCallWithoutParametersAndResponseData, Pageable, ParameterSimpleParameterUnused, PatchApiVbyApiVersionNoTagData, PatchApiVbyApiVersionNoTagResponses, PatchCallWithoutParametersAndResponseData, PostApiVbyApiVersionFormDataData, PostApiVbyApiVersionRequestBodyData, PostCallWithOptionalParamData, PostCallWithOptionalParamResponse, PostCallWithOptionalParamResponses, PostCallWithoutParametersAndResponseData, PostServiceWithEmptyTagResponse, PostServiceWithEmptyTagResponse2, PutCallWithoutParametersAndResponseData, PutWithFormUrlEncodedData, SchemaWithFormRestrictedKeys, SimpleBoolean, SimpleFile, SimpleFormData, SimpleInteger, SimpleParameter, SimpleReference, SimpleRequestBody, SimpleString, SimpleStringWithPattern, TestErrorCodeData, TestErrorCodeErrors, TestErrorCodeResponses, TypesData, TypesResponse, TypesResponses, UploadFileData, UploadFileResponse, UploadFileResponses, XFooBar } from './types.gen';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-next/base-url-string/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type ClientOptions = {\n    baseUrl: 'http://localhost:3000/base' | (string & {});\n};\n\n/**\n * Model with number-only name\n */\nexport type _400 = string;\n\n/**\n * External ref to shared model (A)\n */\nexport type ExternalRefA = ExternalSharedModel;\n\n/**\n * External ref to shared model (B)\n */\nexport type ExternalRefB = ExternalSharedModel;\n\n/**\n * Testing multiline comments in string: First line\n * Second line\n *\n * Fourth line\n */\nexport type CamelCaseCommentWithBreaks = number;\n\n/**\n * Testing multiline comments in string: First line\n * Second line\n *\n * Fourth line\n */\nexport type CommentWithBreaks = number;\n\n/**\n * Testing backticks in string: `backticks` and ```multiple backticks``` should work\n */\nexport type CommentWithBackticks = number;\n\n/**\n * Testing backticks and quotes in string: `backticks`, 'quotes', \"double quotes\" and ```multiple backticks``` should work\n */\nexport type CommentWithBackticksAndQuotes = number;\n\n/**\n * Testing slashes in string: \\backwards\\\\\\ and /forwards/// should work\n */\nexport type CommentWithSlashes = number;\n\n/**\n * Testing expression placeholders in string: ${expression} should work\n */\nexport type CommentWithExpressionPlaceholders = number;\n\n/**\n * Testing quotes in string: 'single quote''' and \"double quotes\"\"\" should work\n */\nexport type CommentWithQuotes = number;\n\n/**\n * Testing reserved characters in string: * inline * and ** inline ** should work\n */\nexport type CommentWithReservedCharacters = number;\n\n/**\n * This is a simple number\n */\nexport type SimpleInteger = number;\n\n/**\n * This is a simple boolean\n */\nexport type SimpleBoolean = boolean;\n\n/**\n * This is a simple string\n */\nexport type SimpleString = string;\n\n/**\n * A string with non-ascii (unicode) characters valid in typescript identifiers (æøåÆØÅöÔèÈ字符串)\n */\nexport type NonAsciiStringæøåÆøÅöôêÊ字符串 = string;\n\n/**\n * This is a simple file\n */\nexport type SimpleFile = Blob | File;\n\n/**\n * This is a simple reference\n */\nexport type SimpleReference = ModelWithString;\n\n/**\n * This is a simple string\n */\nexport type SimpleStringWithPattern = string | null;\n\n/**\n * This is a simple enum with strings\n */\nexport type EnumWithStrings = 'Success' | 'Warning' | 'Error' | '\\'Single Quote\\'' | '\"Double Quotes\"' | 'Non-ascii: øæåôöØÆÅÔÖ字符串';\n\nexport type EnumWithReplacedCharacters = '\\'Single Quote\\'' | '\"Double Quotes\"' | 'øæåôöØÆÅÔÖ字符串' | 3.1 | '';\n\n/**\n * This is a simple enum with numbers\n */\nexport type EnumWithNumbers = 1 | 2 | 3 | 1.1 | 1.2 | 1.3 | 100 | 200 | 300 | -100 | -200 | -300 | -1.1 | -1.2 | -1.3;\n\n/**\n * Success=1,Warning=2,Error=3\n */\nexport type EnumFromDescription = number;\n\n/**\n * This is a simple enum with numbers\n */\nexport type EnumWithExtensions = 200 | 400 | 500;\n\nexport type EnumWithXEnumNames = 0 | 1 | 2;\n\n/**\n * This is a simple array with numbers\n */\nexport type ArrayWithNumbers = Array<number>;\n\n/**\n * This is a simple array with booleans\n */\nexport type ArrayWithBooleans = Array<boolean>;\n\n/**\n * This is a simple array with strings\n */\nexport type ArrayWithStrings = Array<string>;\n\n/**\n * This is a simple array with references\n */\nexport type ArrayWithReferences = Array<ModelWithString>;\n\n/**\n * This is a simple array containing an array\n */\nexport type ArrayWithArray = Array<Array<ModelWithString>>;\n\n/**\n * This is a simple array with properties\n */\nexport type ArrayWithProperties = Array<{\n    '16x16'?: CamelCaseCommentWithBreaks;\n    bar?: string;\n}>;\n\n/**\n * This is a simple array with any of properties\n */\nexport type ArrayWithAnyOfProperties = Array<{\n    foo?: string;\n} | {\n    bar?: string;\n}>;\n\nexport type AnyOfAnyAndNull = {\n    data?: unknown | null;\n};\n\n/**\n * This is a simple array with any of properties\n */\nexport type AnyOfArrays = {\n    results?: Array<{\n        foo?: string;\n    } | {\n        bar?: string;\n    }>;\n};\n\n/**\n * This is a string dictionary\n */\nexport type DictionaryWithString = {\n    [key: string]: string;\n};\n\nexport type DictionaryWithPropertiesAndAdditionalProperties = {\n    foo?: number;\n    bar?: boolean;\n    [key: string]: string | number | boolean | undefined;\n};\n\n/**\n * This is a string reference\n */\nexport type DictionaryWithReference = {\n    [key: string]: ModelWithString;\n};\n\n/**\n * This is a complex dictionary\n */\nexport type DictionaryWithArray = {\n    [key: string]: Array<ModelWithString>;\n};\n\n/**\n * This is a string dictionary\n */\nexport type DictionaryWithDictionary = {\n    [key: string]: {\n        [key: string]: string;\n    };\n};\n\n/**\n * This is a complex dictionary\n */\nexport type DictionaryWithProperties = {\n    [key: string]: {\n        foo?: string;\n        bar?: string;\n    };\n};\n\n/**\n * This is a model with one number property\n */\nexport type ModelWithInteger = {\n    /**\n     * This is a simple number property\n     */\n    prop?: number;\n};\n\n/**\n * This is a model with one boolean property\n */\nexport type ModelWithBoolean = {\n    /**\n     * This is a simple boolean property\n     */\n    prop?: boolean;\n};\n\n/**\n * This is a model with one string property\n */\nexport type ModelWithString = {\n    /**\n     * This is a simple string property\n     */\n    prop?: string;\n};\n\n/**\n * This is a model with one string property\n */\nexport type ModelWithStringError = {\n    /**\n     * This is a simple string property\n     */\n    prop?: string;\n};\n\n/**\n * `Comment` or `VoiceComment`. The JSON object for adding voice comments to tickets is different. See [Adding voice comments to tickets](/documentation/ticketing/managing-tickets/adding-voice-comments-to-tickets)\n */\nexport type ModelFromZendesk = string;\n\n/**\n * This is a model with one string property\n */\nexport type ModelWithNullableString = {\n    /**\n     * This is a simple string property\n     */\n    nullableProp1?: string | null;\n    /**\n     * This is a simple string property\n     */\n    nullableRequiredProp1: string | null;\n    /**\n     * This is a simple string property\n     */\n    nullableProp2?: string | null;\n    /**\n     * This is a simple string property\n     */\n    nullableRequiredProp2: string | null;\n    /**\n     * This is a simple enum with strings\n     */\n    'foo_bar-enum'?: 'Success' | 'Warning' | 'Error' | 'ØÆÅ字符串';\n};\n\n/**\n * This is a model with one enum\n */\nexport type ModelWithEnum = {\n    /**\n     * This is a simple enum with strings\n     */\n    'foo_bar-enum'?: 'Success' | 'Warning' | 'Error' | 'ØÆÅ字符串';\n    /**\n     * These are the HTTP error code enums\n     */\n    statusCode?: '100' | '200 FOO' | '300 FOO_BAR' | '400 foo-bar' | '500 foo.bar' | '600 foo&bar';\n    /**\n     * Simple boolean enum\n     */\n    bool?: true;\n};\n\n/**\n * This is a model with one enum with escaped name\n */\nexport type ModelWithEnumWithHyphen = {\n    /**\n     * Foo-Bar-Baz-Qux\n     */\n    'foo-bar-baz-qux'?: '3.0';\n};\n\n/**\n * This is a model with one enum\n */\nexport type ModelWithEnumFromDescription = {\n    /**\n     * Success=1,Warning=2,Error=3\n     */\n    test?: number;\n};\n\n/**\n * This is a model with nested enums\n */\nexport type ModelWithNestedEnums = {\n    dictionaryWithEnum?: {\n        [key: string]: 'Success' | 'Warning' | 'Error';\n    };\n    dictionaryWithEnumFromDescription?: {\n        [key: string]: number;\n    };\n    arrayWithEnum?: Array<'Success' | 'Warning' | 'Error'>;\n    arrayWithDescription?: Array<number>;\n    /**\n     * This is a simple enum with strings\n     */\n    'foo_bar-enum'?: 'Success' | 'Warning' | 'Error' | 'ØÆÅ字符串';\n};\n\n/**\n * This is a model with one property containing a reference\n */\nexport type ModelWithReference = {\n    prop?: ModelWithProperties;\n};\n\n/**\n * This is a model with one property containing an array\n */\nexport type ModelWithArrayReadOnlyAndWriteOnly = {\n    prop?: Array<ModelWithReadOnlyAndWriteOnly>;\n    propWithFile?: Array<Blob | File>;\n    propWithNumber?: Array<number>;\n};\n\n/**\n * This is a model with one property containing an array\n */\nexport type ModelWithArray = {\n    prop?: Array<ModelWithString>;\n    propWithFile?: Array<Blob | File>;\n    propWithNumber?: Array<number>;\n};\n\n/**\n * This is a model with one property containing a dictionary\n */\nexport type ModelWithDictionary = {\n    prop?: {\n        [key: string]: string;\n    };\n};\n\n/**\n * This is a deprecated model with a deprecated property\n *\n * @deprecated\n */\nexport type DeprecatedModel = {\n    /**\n     * This is a deprecated property\n     *\n     * @deprecated\n     */\n    prop?: string;\n};\n\n/**\n * This is a model with one property containing a circular reference\n */\nexport type ModelWithCircularReference = {\n    prop?: ModelWithCircularReference;\n};\n\n/**\n * This is a model with one property with a 'one of' relationship\n */\nexport type CompositionWithOneOf = {\n    propA?: ModelWithString | ModelWithEnum | ModelWithArray | ModelWithDictionary;\n};\n\n/**\n * This is a model with one property with a 'one of' relationship where the options are not $ref\n */\nexport type CompositionWithOneOfAnonymous = {\n    propA?: {\n        propA?: string;\n    } | string | number;\n};\n\n/**\n * Circle\n */\nexport type ModelCircle = {\n    kind: string;\n    radius?: number;\n};\n\n/**\n * Square\n */\nexport type ModelSquare = {\n    kind: string;\n    sideLength?: number;\n};\n\n/**\n * This is a model with one property with a 'one of' relationship where the options are not $ref\n */\nexport type CompositionWithOneOfDiscriminator = ({\n    kind: 'circle';\n} & ModelCircle) | ({\n    kind: 'square';\n} & ModelSquare);\n\n/**\n * This is a model with one property with a 'any of' relationship\n */\nexport type CompositionWithAnyOf = {\n    propA?: ModelWithString | ModelWithEnum | ModelWithArray | ModelWithDictionary;\n};\n\n/**\n * This is a model with one property with a 'any of' relationship where the options are not $ref\n */\nexport type CompositionWithAnyOfAnonymous = {\n    propA?: {\n        propA?: string;\n    } | string | number;\n};\n\n/**\n * This is a model with nested 'any of' property with a type null\n */\nexport type CompositionWithNestedAnyAndTypeNull = {\n    propA?: Array<ModelWithDictionary | null> | Array<ModelWithArray | null>;\n};\n\nexport type _3eNum1Период = 'Bird' | 'Dog';\n\nexport type ConstValue = 'ConstValue';\n\n/**\n * This is a model with one property with a 'any of' relationship where the options are not $ref\n */\nexport type CompositionWithNestedAnyOfAndNull = {\n    /**\n     * Scopes\n     */\n    propA?: Array<_3eNum1Период | ConstValue> | null;\n};\n\n/**\n * This is a model with one property with a 'one of' relationship\n */\nexport type CompositionWithOneOfAndNullable = {\n    propA?: {\n        boolean?: boolean;\n    } | ModelWithEnum | ModelWithArray | ModelWithDictionary | null;\n};\n\n/**\n * This is a model that contains a simple dictionary within composition\n */\nexport type CompositionWithOneOfAndSimpleDictionary = {\n    propA?: boolean | {\n        [key: string]: number;\n    };\n};\n\n/**\n * This is a model that contains a dictionary of simple arrays within composition\n */\nexport type CompositionWithOneOfAndSimpleArrayDictionary = {\n    propA?: boolean | {\n        [key: string]: Array<boolean>;\n    };\n};\n\n/**\n * This is a model that contains a dictionary of complex arrays (composited) within composition\n */\nexport type CompositionWithOneOfAndComplexArrayDictionary = {\n    propA?: boolean | {\n        [key: string]: Array<number | string>;\n    };\n};\n\n/**\n * This is a model with one property with a 'all of' relationship\n */\nexport type CompositionWithAllOfAndNullable = {\n    propA?: ({\n        boolean?: boolean;\n    } & ModelWithEnum & ModelWithArray & ModelWithDictionary) | null;\n};\n\n/**\n * This is a model with one property with a 'any of' relationship\n */\nexport type CompositionWithAnyOfAndNullable = {\n    propA?: {\n        boolean?: boolean;\n    } | ModelWithEnum | ModelWithArray | ModelWithDictionary | null;\n};\n\n/**\n * This is a base model with two simple optional properties\n */\nexport type CompositionBaseModel = {\n    firstName?: string;\n    lastname?: string;\n};\n\n/**\n * This is a model that extends the base model\n */\nexport type CompositionExtendedModel = CompositionBaseModel & {\n    age: number;\n    firstName: string;\n    lastname: string;\n};\n\n/**\n * This is a model with one nested property\n */\nexport type ModelWithProperties = {\n    required: string;\n    readonly requiredAndReadOnly: string;\n    requiredAndNullable: string | null;\n    string?: string;\n    number?: number;\n    boolean?: boolean;\n    reference?: ModelWithString;\n    'property with space'?: string;\n    default?: string;\n    try?: string;\n    readonly '@namespace.string'?: string;\n    readonly '@namespace.integer'?: number;\n};\n\n/**\n * This is a model with one nested property\n */\nexport type ModelWithNestedProperties = {\n    readonly first: {\n        readonly second: {\n            readonly third: string | null;\n        } | null;\n    } | null;\n};\n\n/**\n * This is a model with duplicated properties\n */\nexport type ModelWithDuplicateProperties = {\n    prop?: ModelWithString;\n};\n\n/**\n * This is a model with ordered properties\n */\nexport type ModelWithOrderedProperties = {\n    zebra?: string;\n    apple?: string;\n    hawaii?: string;\n};\n\n/**\n * This is a model with duplicated imports\n */\nexport type ModelWithDuplicateImports = {\n    propA?: ModelWithString;\n    propB?: ModelWithString;\n    propC?: ModelWithString;\n};\n\n/**\n * This is a model that extends another model\n */\nexport type ModelThatExtends = ModelWithString & {\n    propExtendsA?: string;\n    propExtendsB?: ModelWithString;\n};\n\n/**\n * This is a model that extends another model\n */\nexport type ModelThatExtendsExtends = ModelWithString & ModelThatExtends & {\n    propExtendsC?: string;\n    propExtendsD?: ModelWithString;\n};\n\n/**\n * This is a model that contains a some patterns\n */\nexport type ModelWithPattern = {\n    key: string;\n    name: string;\n    readonly enabled?: boolean;\n    readonly modified?: string;\n    id?: string;\n    text?: string;\n    patternWithSingleQuotes?: string;\n    patternWithNewline?: string;\n    patternWithBacktick?: string;\n    patternWithUnicode?: string;\n};\n\nexport type File = {\n    /**\n     * Id\n     */\n    readonly id?: string;\n    /**\n     * Updated at\n     */\n    readonly updated_at?: string;\n    /**\n     * Created at\n     */\n    readonly created_at?: string;\n    /**\n     * Mime\n     */\n    mime: string;\n    /**\n     * File\n     */\n    readonly file?: string;\n};\n\nexport type Default = {\n    name?: string;\n};\n\nexport type Pageable = {\n    page?: number;\n    size?: number;\n    sort?: Array<string>;\n};\n\n/**\n * This is a free-form object without additionalProperties.\n */\nexport type FreeFormObjectWithoutAdditionalProperties = {\n    [key: string]: unknown;\n};\n\n/**\n * This is a free-form object with additionalProperties: true.\n */\nexport type FreeFormObjectWithAdditionalPropertiesEqTrue = {\n    [key: string]: unknown;\n};\n\n/**\n * This is a free-form object with additionalProperties: {}.\n */\nexport type FreeFormObjectWithAdditionalPropertiesEqEmptyObject = {\n    [key: string]: unknown;\n};\n\nexport type ModelWithConst = {\n    String?: 'String';\n    number?: 0;\n    null?: null;\n    withType?: 'Some string';\n};\n\n/**\n * This is a model with one property and additionalProperties: true\n */\nexport type ModelWithAdditionalPropertiesEqTrue = {\n    /**\n     * This is a simple string property\n     */\n    prop?: string;\n    [key: string]: unknown;\n};\n\nexport type NestedAnyOfArraysNullable = {\n    nullableArray?: Array<string | boolean> | null;\n};\n\nexport type CompositionWithOneOfAndProperties = ({\n    foo: SimpleParameter;\n} | {\n    bar: NonAsciiStringæøåÆøÅöôêÊ字符串;\n}) & {\n    baz: number | null;\n    qux: number;\n};\n\n/**\n * An object that can be null\n */\nexport type NullableObject = {\n    foo?: string;\n} | null;\n\n/**\n * Some % character\n */\nexport type CharactersInDescription = string;\n\nexport type ModelWithNullableObject = {\n    data?: NullableObject;\n};\n\n/**\n * An object with additional properties that can be null (anyOf ref + null)\n */\nexport type ModelWithAdditionalPropertiesRef = {\n    [key: string]: NullableObject | null;\n};\n\nexport type ModelWithOneOfEnum = {\n    foo: 'Bar';\n} | {\n    foo: 'Baz';\n} | {\n    foo: 'Qux';\n} | {\n    content: string;\n    foo: 'Quux';\n} | {\n    content: [\n        string,\n        string\n    ];\n    foo: 'Corge';\n};\n\nexport type ModelWithNestedArrayEnumsDataFoo = 'foo' | 'bar';\n\nexport type ModelWithNestedArrayEnumsDataBar = 'baz' | 'qux';\n\nexport type ModelWithNestedArrayEnumsData = {\n    foo?: Array<ModelWithNestedArrayEnumsDataFoo>;\n    bar?: Array<ModelWithNestedArrayEnumsDataBar>;\n};\n\nexport type ModelWithNestedArrayEnums = {\n    array_strings?: Array<string>;\n    data?: ModelWithNestedArrayEnumsData;\n};\n\nexport type ModelWithNestedCompositionEnums = {\n    foo?: ModelWithNestedArrayEnumsDataFoo;\n};\n\nexport type ModelWithReadOnlyAndWriteOnly = {\n    foo: string;\n    readonly bar: string;\n};\n\nexport type ModelWithConstantSizeArray = [\n    number,\n    number\n];\n\nexport type ModelWithAnyOfConstantSizeArray = [\n    number | string,\n    number | string,\n    number | string\n];\n\nexport type ModelWithPrefixItemsConstantSizeArray = [\n    ModelWithInteger,\n    number | string,\n    string\n];\n\nexport type ModelWithAnyOfConstantSizeArrayNullable = [\n    number | null | string,\n    number | null | string,\n    number | null | string\n];\n\nexport type ModelWithAnyOfConstantSizeArrayWithNSizeAndOptions = [\n    number | Import,\n    number | Import\n];\n\nexport type ModelWithAnyOfConstantSizeArrayAndIntersect = [\n    number & string,\n    number & string\n];\n\nexport type ModelWithNumericEnumUnion = {\n    /**\n     * Период\n     */\n    value?: -10 | -1 | 0 | 1 | 3 | 6 | 12;\n};\n\n/**\n * Some description with `back ticks`\n */\nexport type ModelWithBackticksInDescription = {\n    /**\n     * The template `that` should be used for parsing and importing the contents of the CSV file.\n     *\n     * <br/><p>There is one placeholder currently supported:<ul>     <li><b>${x}</b> - refers to the n-th column in the CSV file, e.g. ${1}, ${2}, ...)</li></ul><p>Example of a correct JSON template:</p>\n     * <pre>\n     * [\n     * {\n     * \"resourceType\": \"Asset\",\n     * \"identifier\": {\n     * \"name\": \"${1}\",\n     * \"domain\": {\n     * \"name\": \"${2}\",\n     * \"community\": {\n     * \"name\": \"Some Community\"\n     * }\n     * }\n     * },\n     * \"attributes\" : {\n     * \"00000000-0000-0000-0000-000000003115\" : [ {\n     * \"value\" : \"${3}\"\n     * } ],\n     * \"00000000-0000-0000-0000-000000000222\" : [ {\n     * \"value\" : \"${4}\"\n     * } ]\n     * }\n     * }\n     * ]\n     * </pre>\n     */\n    template?: string;\n};\n\nexport type ModelWithOneOfAndProperties = (SimpleParameter | NonAsciiStringæøåÆøÅöôêÊ字符串) & {\n    baz: number | null;\n    qux: number;\n};\n\n/**\n * Model used to test deduplication strategy (unused)\n */\nexport type ParameterSimpleParameterUnused = string;\n\n/**\n * Model used to test deduplication strategy\n */\nexport type PostServiceWithEmptyTagResponse = string;\n\n/**\n * Model used to test deduplication strategy\n */\nexport type PostServiceWithEmptyTagResponse2 = string;\n\n/**\n * Model used to test deduplication strategy\n */\nexport type DeleteFooData = string;\n\n/**\n * Model used to test deduplication strategy\n */\nexport type DeleteFooData2 = string;\n\n/**\n * Model with restricted keyword name\n */\nexport type Import = string;\n\nexport type SchemaWithFormRestrictedKeys = {\n    description?: string;\n    'x-enum-descriptions'?: string;\n    'x-enum-varnames'?: string;\n    'x-enumNames'?: string;\n    title?: string;\n    object?: {\n        description?: string;\n        'x-enum-descriptions'?: string;\n        'x-enum-varnames'?: string;\n        'x-enumNames'?: string;\n        title?: string;\n    };\n    array?: Array<{\n        description?: string;\n        'x-enum-descriptions'?: string;\n        'x-enum-varnames'?: string;\n        'x-enumNames'?: string;\n        title?: string;\n    }>;\n};\n\n/**\n * This schema was giving PascalCase transformations a hard time\n */\nexport type IoK8sApimachineryPkgApisMetaV1DeleteOptions = {\n    /**\n     * Must be fulfilled before a deletion is carried out. If not possible, a 409 Conflict status will be returned.\n     */\n    preconditions?: IoK8sApimachineryPkgApisMetaV1Preconditions;\n};\n\n/**\n * This schema was giving PascalCase transformations a hard time\n */\nexport type IoK8sApimachineryPkgApisMetaV1Preconditions = {\n    /**\n     * Specifies the target ResourceVersion\n     */\n    resourceVersion?: string;\n    /**\n     * Specifies the target UID.\n     */\n    uid?: string;\n};\n\nexport type AdditionalPropertiesUnknownIssue = {\n    [key: string]: string | number;\n};\n\nexport type AdditionalPropertiesUnknownIssue2 = {\n    [key: string]: string | number;\n};\n\nexport type AdditionalPropertiesUnknownIssue3 = string & {\n    entries: {\n        [key: string]: AdditionalPropertiesUnknownIssue;\n    };\n};\n\nexport type AdditionalPropertiesIntegerIssue = {\n    value: number;\n    [key: string]: number;\n};\n\nexport type OneOfAllOfIssue = ((ConstValue | GenericSchemaDuplicateIssue1SystemBoolean) & _3eNum1Период) | GenericSchemaDuplicateIssue1SystemString;\n\nexport type GenericSchemaDuplicateIssue1SystemBoolean = {\n    item?: boolean;\n    error?: string | null;\n    readonly hasError?: boolean;\n    data?: {\n        [key: string]: never;\n    };\n};\n\nexport type GenericSchemaDuplicateIssue1SystemString = {\n    item?: string | null;\n    error?: string | null;\n    readonly hasError?: boolean;\n};\n\nexport type ExternalSharedModel = {\n    id: string;\n    name?: string;\n};\n\n/**\n * This is a model with one property containing a reference\n */\nexport type ModelWithReferenceWritable = {\n    prop?: ModelWithPropertiesWritable;\n};\n\n/**\n * This is a model with one property containing an array\n */\nexport type ModelWithArrayReadOnlyAndWriteOnlyWritable = {\n    prop?: Array<ModelWithReadOnlyAndWriteOnlyWritable>;\n    propWithFile?: Array<Blob | File>;\n    propWithNumber?: Array<number>;\n};\n\n/**\n * This is a model with one nested property\n */\nexport type ModelWithPropertiesWritable = {\n    required: string;\n    requiredAndNullable: string | null;\n    string?: string;\n    number?: number;\n    boolean?: boolean;\n    reference?: ModelWithString;\n    'property with space'?: string;\n    default?: string;\n    try?: string;\n};\n\n/**\n * This is a model that contains a some patterns\n */\nexport type ModelWithPatternWritable = {\n    key: string;\n    name: string;\n    id?: string;\n    text?: string;\n    patternWithSingleQuotes?: string;\n    patternWithNewline?: string;\n    patternWithBacktick?: string;\n    patternWithUnicode?: string;\n};\n\nexport type FileWritable = {\n    /**\n     * Mime\n     */\n    mime: string;\n};\n\nexport type ModelWithReadOnlyAndWriteOnlyWritable = {\n    foo: string;\n    baz: string;\n};\n\nexport type ModelWithAnyOfConstantSizeArrayWithNSizeAndOptionsWritable = [\n    number | Import,\n    number | Import\n];\n\nexport type AdditionalPropertiesUnknownIssueWritable = {\n    [key: string]: string | number;\n};\n\nexport type OneOfAllOfIssueWritable = ((ConstValue | GenericSchemaDuplicateIssue1SystemBoolean) & _3eNum1Период) | GenericSchemaDuplicateIssue1SystemString;\n\nexport type GenericSchemaDuplicateIssue1SystemBooleanWritable = {\n    item?: boolean;\n    error?: string | null;\n    data?: {\n        [key: string]: never;\n    };\n};\n\nexport type GenericSchemaDuplicateIssue1SystemStringWritable = {\n    item?: string | null;\n    error?: string | null;\n};\n\n/**\n * This is a reusable parameter\n */\nexport type SimpleParameter = string;\n\n/**\n * Parameter with illegal characters\n */\nexport type XFooBar = ModelWithString;\n\n/**\n * A reusable request body\n */\nexport type SimpleRequestBody = ModelWithString;\n\n/**\n * A reusable request body\n */\nexport type SimpleFormData = ModelWithString;\n\nexport type ExportData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no+tag';\n};\n\nexport type PatchApiVbyApiVersionNoTagData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no+tag';\n};\n\nexport type PatchApiVbyApiVersionNoTagResponses = {\n    /**\n     * OK\n     */\n    default: unknown;\n};\n\nexport type ImportData = {\n    body: ModelWithReadOnlyAndWriteOnlyWritable | ModelWithArrayReadOnlyAndWriteOnlyWritable;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no+tag';\n};\n\nexport type ImportResponses = {\n    /**\n     * Success\n     */\n    200: ModelFromZendesk;\n    /**\n     * Default success response\n     */\n    default: ModelWithReadOnlyAndWriteOnly;\n};\n\nexport type ImportResponse = ImportResponses[keyof ImportResponses];\n\nexport type FooWowData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no+tag';\n};\n\nexport type FooWowResponses = {\n    /**\n     * OK\n     */\n    default: unknown;\n};\n\nexport type ApiVVersionODataControllerCountData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple/$count';\n};\n\nexport type ApiVVersionODataControllerCountResponses = {\n    /**\n     * Success\n     */\n    200: ModelFromZendesk;\n};\n\nexport type ApiVVersionODataControllerCountResponse = ApiVVersionODataControllerCountResponses[keyof ApiVVersionODataControllerCountResponses];\n\nexport type GetApiVbyApiVersionSimpleOperationData = {\n    body?: never;\n    path: {\n        /**\n         * foo in method\n         */\n        foo_param: string;\n    };\n    query?: never;\n    url: '/api/v{api-version}/simple:operation';\n};\n\nexport type GetApiVbyApiVersionSimpleOperationErrors = {\n    /**\n     * Default error response\n     */\n    default: ModelWithBoolean;\n};\n\nexport type GetApiVbyApiVersionSimpleOperationError = GetApiVbyApiVersionSimpleOperationErrors[keyof GetApiVbyApiVersionSimpleOperationErrors];\n\nexport type GetApiVbyApiVersionSimpleOperationResponses = {\n    /**\n     * Response is a simple number\n     */\n    200: number;\n};\n\nexport type GetApiVbyApiVersionSimpleOperationResponse = GetApiVbyApiVersionSimpleOperationResponses[keyof GetApiVbyApiVersionSimpleOperationResponses];\n\nexport type DeleteCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type GetCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type HeadCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type OptionsCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type PatchCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type PostCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type PutCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type DeleteFooData3 = {\n    body?: never;\n    headers: {\n        /**\n         * Parameter with illegal characters\n         */\n        'x-Foo-Bar': ModelWithString;\n    };\n    path: {\n        /**\n         * foo in method\n         */\n        foo_param: string;\n        /**\n         * bar in method\n         */\n        BarParam: string;\n    };\n    query?: never;\n    url: '/api/v{api-version}/foo/{foo_param}/bar/{BarParam}';\n};\n\nexport type CallWithDescriptionsData = {\n    body?: never;\n    path?: never;\n    query?: {\n        /**\n         * Testing multiline comments in string: First line\n         * Second line\n         *\n         * Fourth line\n         */\n        parameterWithBreaks?: string;\n        /**\n         * Testing backticks in string: `backticks` and ```multiple backticks``` should work\n         */\n        parameterWithBackticks?: string;\n        /**\n         * Testing slashes in string: \\backwards\\\\\\ and /forwards/// should work\n         */\n        parameterWithSlashes?: string;\n        /**\n         * Testing expression placeholders in string: ${expression} should work\n         */\n        parameterWithExpressionPlaceholders?: string;\n        /**\n         * Testing quotes in string: 'single quote''' and \"double quotes\"\"\" should work\n         */\n        parameterWithQuotes?: string;\n        /**\n         * Testing reserved characters in string: * inline * and ** inline ** should work\n         */\n        parameterWithReservedCharacters?: string;\n    };\n    url: '/api/v{api-version}/descriptions';\n};\n\nexport type DeprecatedCallData = {\n    body?: never;\n    headers: {\n        /**\n         * This parameter is deprecated\n         *\n         * @deprecated\n         */\n        parameter: DeprecatedModel | null;\n    };\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/parameters/deprecated';\n};\n\nexport type CallWithParametersData = {\n    /**\n     * This is the parameter that goes into the body\n     */\n    body: {\n        [key: string]: unknown;\n    } | null;\n    headers: {\n        /**\n         * This is the parameter that goes into the header\n         */\n        parameterHeader: string | null;\n    };\n    path: {\n        /**\n         * This is the parameter that goes into the path\n         */\n        parameterPath: string | null;\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string | null;\n    };\n    query: {\n        foo_ref_enum?: ModelWithNestedArrayEnumsDataFoo;\n        foo_all_of_enum: ModelWithNestedArrayEnumsDataFoo;\n        /**\n         * This is the parameter that goes into the query params\n         */\n        cursor: string | null;\n    };\n    url: '/api/v{api-version}/parameters/{parameterPath}';\n};\n\nexport type CallWithWeirdParameterNamesData = {\n    /**\n     * This is the parameter that goes into the body\n     */\n    body: ModelWithString | null;\n    headers: {\n        /**\n         * This is the parameter that goes into the request header\n         */\n        'parameter.header': string | null;\n    };\n    path: {\n        /**\n         * This is the parameter that goes into the path\n         */\n        'parameter.path.1'?: string;\n        /**\n         * This is the parameter that goes into the path\n         */\n        'parameter-path-2'?: string;\n        /**\n         * This is the parameter that goes into the path\n         */\n        'PARAMETER-PATH-3'?: string;\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string | null;\n    };\n    query: {\n        /**\n         * This is the parameter with a reserved keyword\n         */\n        default?: string;\n        /**\n         * This is the parameter that goes into the request query params\n         */\n        'parameter-query': string | null;\n    };\n    url: '/api/v{api-version}/parameters/{parameter.path.1}/{parameter-path-2}/{PARAMETER-PATH-3}';\n};\n\nexport type GetCallWithOptionalParamData = {\n    /**\n     * This is a required parameter\n     */\n    body: ModelWithOneOfEnum;\n    path?: never;\n    query?: {\n        /**\n         * This is an optional parameter\n         */\n        page?: number;\n    };\n    url: '/api/v{api-version}/parameters';\n};\n\nexport type PostCallWithOptionalParamData = {\n    /**\n     * This is an optional parameter\n     */\n    body?: {\n        offset?: number | null;\n    };\n    path?: never;\n    query: {\n        /**\n         * This is a required parameter\n         */\n        parameter: Pageable;\n    };\n    url: '/api/v{api-version}/parameters';\n};\n\nexport type PostCallWithOptionalParamResponses = {\n    /**\n     * Response is a simple number\n     */\n    200: number;\n    /**\n     * Success\n     */\n    204: void;\n};\n\nexport type PostCallWithOptionalParamResponse = PostCallWithOptionalParamResponses[keyof PostCallWithOptionalParamResponses];\n\nexport type PostApiVbyApiVersionRequestBodyData = {\n    /**\n     * A reusable request body\n     */\n    body?: SimpleRequestBody;\n    path?: never;\n    query?: {\n        /**\n         * This is a reusable parameter\n         */\n        parameter?: string;\n    };\n    url: '/api/v{api-version}/requestBody';\n};\n\nexport type PostApiVbyApiVersionFormDataData = {\n    /**\n     * A reusable request body\n     */\n    body?: SimpleFormData;\n    path?: never;\n    query?: {\n        /**\n         * This is a reusable parameter\n         */\n        parameter?: string;\n    };\n    url: '/api/v{api-version}/formData';\n};\n\nexport type CallWithDefaultParametersData = {\n    body?: never;\n    path?: never;\n    query?: {\n        /**\n         * This is a simple string with default value\n         */\n        parameterString?: string | null;\n        /**\n         * This is a simple number with default value\n         */\n        parameterNumber?: number | null;\n        /**\n         * This is a simple boolean with default value\n         */\n        parameterBoolean?: boolean | null;\n        /**\n         * This is a simple enum with default value\n         */\n        parameterEnum?: 'Success' | 'Warning' | 'Error';\n        /**\n         * This is a simple model with default value\n         */\n        parameterModel?: ModelWithString | null;\n    };\n    url: '/api/v{api-version}/defaults';\n};\n\nexport type CallWithDefaultOptionalParametersData = {\n    body?: never;\n    path?: never;\n    query?: {\n        /**\n         * This is a simple string that is optional with default value\n         */\n        parameterString?: string;\n        /**\n         * This is a simple number that is optional with default value\n         */\n        parameterNumber?: number;\n        /**\n         * This is a simple boolean that is optional with default value\n         */\n        parameterBoolean?: boolean;\n        /**\n         * This is a simple enum that is optional with default value\n         */\n        parameterEnum?: 'Success' | 'Warning' | 'Error';\n        /**\n         * This is a simple model that is optional with default value\n         */\n        parameterModel?: ModelWithString;\n    };\n    url: '/api/v{api-version}/defaults';\n};\n\nexport type CallToTestOrderOfParamsData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * This is a optional string with default\n         */\n        parameterOptionalStringWithDefault?: string;\n        /**\n         * This is a optional string with empty default\n         */\n        parameterOptionalStringWithEmptyDefault?: string;\n        /**\n         * This is a optional string with no default\n         */\n        parameterOptionalStringWithNoDefault?: string;\n        /**\n         * This is a string with default\n         */\n        parameterStringWithDefault: string;\n        /**\n         * This is a string with empty default\n         */\n        parameterStringWithEmptyDefault: string;\n        /**\n         * This is a string with no default\n         */\n        parameterStringWithNoDefault: string;\n        /**\n         * This is a string that can be null with no default\n         */\n        parameterStringNullableWithNoDefault?: string | null;\n        /**\n         * This is a string that can be null with default\n         */\n        parameterStringNullableWithDefault?: string | null;\n    };\n    url: '/api/v{api-version}/defaults';\n};\n\nexport type DuplicateNameData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/duplicate';\n};\n\nexport type DuplicateName2Data = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/duplicate';\n};\n\nexport type DuplicateName3Data = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/duplicate';\n};\n\nexport type DuplicateName4Data = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/duplicate';\n};\n\nexport type CallWithNoContentResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no-content';\n};\n\nexport type CallWithNoContentResponseResponses = {\n    /**\n     * Success\n     */\n    204: void;\n};\n\nexport type CallWithNoContentResponseResponse = CallWithNoContentResponseResponses[keyof CallWithNoContentResponseResponses];\n\nexport type CallWithResponseAndNoContentResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multiple-tags/response-and-no-content';\n};\n\nexport type CallWithResponseAndNoContentResponseResponses = {\n    /**\n     * Response is a simple number\n     */\n    200: number;\n    /**\n     * Success\n     */\n    204: void;\n};\n\nexport type CallWithResponseAndNoContentResponseResponse = CallWithResponseAndNoContentResponseResponses[keyof CallWithResponseAndNoContentResponseResponses];\n\nexport type DummyAData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multiple-tags/a';\n};\n\nexport type DummyAResponses = {\n    200: _400;\n};\n\nexport type DummyAResponse = DummyAResponses[keyof DummyAResponses];\n\nexport type DummyBData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multiple-tags/b';\n};\n\nexport type DummyBResponses = {\n    /**\n     * Success\n     */\n    204: void;\n};\n\nexport type DummyBResponse = DummyBResponses[keyof DummyBResponses];\n\nexport type CallWithResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/response';\n};\n\nexport type CallWithResponseResponses = {\n    default: Import;\n};\n\nexport type CallWithResponseResponse = CallWithResponseResponses[keyof CallWithResponseResponses];\n\nexport type CallWithDuplicateResponsesData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/response';\n};\n\nexport type CallWithDuplicateResponsesErrors = {\n    /**\n     * Message for 500 error\n     */\n    500: ModelWithStringError;\n    /**\n     * Message for 501 error\n     */\n    501: ModelWithStringError;\n    /**\n     * Message for 502 error\n     */\n    502: ModelWithStringError;\n    /**\n     * Message for 4XX errors\n     */\n    '4XX': DictionaryWithArray;\n    /**\n     * Default error response\n     */\n    default: ModelWithBoolean;\n};\n\nexport type CallWithDuplicateResponsesError = CallWithDuplicateResponsesErrors[keyof CallWithDuplicateResponsesErrors];\n\nexport type CallWithDuplicateResponsesResponses = {\n    /**\n     * Message for 200 response\n     */\n    200: ModelWithBoolean & ModelWithInteger;\n    /**\n     * Message for 201 response\n     */\n    201: ModelWithString;\n    /**\n     * Message for 202 response\n     */\n    202: ModelWithString;\n};\n\nexport type CallWithDuplicateResponsesResponse = CallWithDuplicateResponsesResponses[keyof CallWithDuplicateResponsesResponses];\n\nexport type CallWithResponsesData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/response';\n};\n\nexport type CallWithResponsesErrors = {\n    /**\n     * Message for 500 error\n     */\n    500: ModelWithStringError;\n    /**\n     * Message for 501 error\n     */\n    501: ModelWithStringError;\n    /**\n     * Message for 502 error\n     */\n    502: ModelWithStringError;\n    /**\n     * Message for default response\n     */\n    default: ModelWithStringError;\n};\n\nexport type CallWithResponsesError = CallWithResponsesErrors[keyof CallWithResponsesErrors];\n\nexport type CallWithResponsesResponses = {\n    /**\n     * Message for 200 response\n     */\n    200: {\n        readonly '@namespace.string'?: string;\n        readonly '@namespace.integer'?: number;\n        readonly value?: Array<ModelWithString>;\n    };\n    /**\n     * Message for 201 response\n     */\n    201: ModelThatExtends;\n    /**\n     * Message for 202 response\n     */\n    202: ModelThatExtendsExtends;\n};\n\nexport type CallWithResponsesResponse = CallWithResponsesResponses[keyof CallWithResponsesResponses];\n\nexport type CollectionFormatData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * This is an array parameter that is sent as csv format (comma-separated values)\n         */\n        parameterArrayCSV: Array<string> | null;\n        /**\n         * This is an array parameter that is sent as ssv format (space-separated values)\n         */\n        parameterArraySSV: Array<string> | null;\n        /**\n         * This is an array parameter that is sent as tsv format (tab-separated values)\n         */\n        parameterArrayTSV: Array<string> | null;\n        /**\n         * This is an array parameter that is sent as pipes format (pipe-separated values)\n         */\n        parameterArrayPipes: Array<string> | null;\n        /**\n         * This is an array parameter that is sent as multi format (multiple parameter instances)\n         */\n        parameterArrayMulti: Array<string> | null;\n    };\n    url: '/api/v{api-version}/collectionFormat';\n};\n\nexport type TypesData = {\n    body?: never;\n    path?: {\n        /**\n         * This is a number parameter\n         */\n        id?: number;\n    };\n    query: {\n        /**\n         * This is a number parameter\n         */\n        parameterNumber: number;\n        /**\n         * This is a string parameter\n         */\n        parameterString: string | null;\n        /**\n         * This is a boolean parameter\n         */\n        parameterBoolean: boolean | null;\n        /**\n         * This is an object parameter\n         */\n        parameterObject: {\n            [key: string]: unknown;\n        } | null;\n        /**\n         * This is an array parameter\n         */\n        parameterArray: Array<string> | null;\n        /**\n         * This is a dictionary parameter\n         */\n        parameterDictionary: {\n            [key: string]: unknown;\n        } | null;\n        /**\n         * This is an enum parameter\n         */\n        parameterEnum: 'Success' | 'Warning' | 'Error' | null;\n    };\n    url: '/api/v{api-version}/types';\n};\n\nexport type TypesResponses = {\n    /**\n     * Response is a simple number\n     */\n    200: number;\n    /**\n     * Response is a simple string\n     */\n    201: string;\n    /**\n     * Response is a simple boolean\n     */\n    202: boolean;\n    /**\n     * Response is a simple object\n     */\n    203: {\n        [key: string]: unknown;\n    };\n};\n\nexport type TypesResponse = TypesResponses[keyof TypesResponses];\n\nexport type UploadFileData = {\n    body: Blob | File;\n    path: {\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string | null;\n    };\n    query?: never;\n    url: '/api/v{api-version}/upload';\n};\n\nexport type UploadFileResponses = {\n    200: boolean;\n};\n\nexport type UploadFileResponse = UploadFileResponses[keyof UploadFileResponses];\n\nexport type FileResponseData = {\n    body?: never;\n    path: {\n        id: string;\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string;\n    };\n    query?: never;\n    url: '/api/v{api-version}/file/{id}';\n};\n\nexport type FileResponseResponses = {\n    /**\n     * Success\n     */\n    200: Blob | File;\n};\n\nexport type FileResponseResponse = FileResponseResponses[keyof FileResponseResponses];\n\nexport type ComplexTypesData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * Parameter containing object\n         */\n        parameterObject: {\n            first?: {\n                second?: {\n                    third?: string;\n                };\n            };\n        };\n        /**\n         * Parameter containing reference\n         */\n        parameterReference: ModelWithString;\n    };\n    url: '/api/v{api-version}/complex';\n};\n\nexport type ComplexTypesErrors = {\n    /**\n     * 400 `server` error\n     */\n    400: unknown;\n    /**\n     * 500 server error\n     */\n    500: unknown;\n};\n\nexport type ComplexTypesResponses = {\n    /**\n     * Successful response\n     */\n    200: Array<ModelWithString>;\n};\n\nexport type ComplexTypesResponse = ComplexTypesResponses[keyof ComplexTypesResponses];\n\nexport type MultipartResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multipart';\n};\n\nexport type MultipartResponseResponses = {\n    /**\n     * OK\n     */\n    200: {\n        file?: Blob | File;\n        metadata?: {\n            foo?: string;\n            bar?: string;\n        };\n    };\n};\n\nexport type MultipartResponseResponse = MultipartResponseResponses[keyof MultipartResponseResponses];\n\nexport type MultipartRequestData = {\n    body?: {\n        content?: Blob | File;\n        data?: ModelWithString | null;\n    };\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multipart';\n};\n\nexport type ComplexParamsData = {\n    body?: {\n        readonly key: string | null;\n        name: string | null;\n        enabled?: boolean;\n        type: 'Monkey' | 'Horse' | 'Bird';\n        listOfModels?: Array<ModelWithString> | null;\n        listOfStrings?: Array<string> | null;\n        parameters: ModelWithString | ModelWithEnum | ModelWithArray | ModelWithDictionary;\n        readonly user?: {\n            readonly id?: number;\n            readonly name?: string | null;\n        };\n    };\n    path: {\n        id: number;\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string;\n    };\n    query?: never;\n    url: '/api/v{api-version}/complex/{id}';\n};\n\nexport type ComplexParamsResponses = {\n    /**\n     * Success\n     */\n    200: ModelWithString;\n};\n\nexport type ComplexParamsResponse = ComplexParamsResponses[keyof ComplexParamsResponses];\n\nexport type CallWithResultFromHeaderData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/header';\n};\n\nexport type CallWithResultFromHeaderErrors = {\n    /**\n     * 400 server error\n     */\n    400: unknown;\n    /**\n     * 500 server error\n     */\n    500: unknown;\n};\n\nexport type CallWithResultFromHeaderResponses = {\n    /**\n     * Successful response\n     */\n    200: unknown;\n};\n\nexport type TestErrorCodeData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * Status code to return\n         */\n        status: number;\n    };\n    url: '/api/v{api-version}/error';\n};\n\nexport type TestErrorCodeErrors = {\n    /**\n     * Custom message: Internal Server Error\n     */\n    500: unknown;\n    /**\n     * Custom message: Not Implemented\n     */\n    501: unknown;\n    /**\n     * Custom message: Bad Gateway\n     */\n    502: unknown;\n    /**\n     * Custom message: Service Unavailable\n     */\n    503: unknown;\n};\n\nexport type TestErrorCodeResponses = {\n    /**\n     * Custom message: Successful response\n     */\n    200: unknown;\n};\n\nexport type NonAsciiæøåÆøÅöôêÊ字符串Data = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * Dummy input param\n         */\n        nonAsciiParamæøåÆØÅöôêÊ: number;\n    };\n    url: '/api/v{api-version}/non-ascii-æøåÆØÅöôêÊ字符串';\n};\n\nexport type NonAsciiæøåÆøÅöôêÊ字符串Responses = {\n    /**\n     * Successful response\n     */\n    200: Array<NonAsciiStringæøåÆøÅöôêÊ字符串>;\n};\n\nexport type NonAsciiæøåÆøÅöôêÊ字符串Response = NonAsciiæøåÆøÅöôêÊ字符串Responses[keyof NonAsciiæøåÆøÅöôêÊ字符串Responses];\n\nexport type PutWithFormUrlEncodedData = {\n    body: ArrayWithStrings;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/non-ascii-æøåÆØÅöôêÊ字符串';\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-next/clean-false/client/client.gen.ts",
    "content": "// 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<Response, unknown, ResolvedRequestOptions>();\n\n  const beforeRequest = async (options: RequestOptions) => {\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 url = buildUrl(opts);\n\n    return { opts, url };\n  };\n\n  // @ts-expect-error\n  const request: Client['request'] = async (options) => {\n    // @ts-expect-error\n    const { opts, url } = await beforeRequest(options);\n\n    for (const fn of interceptors.request.fns) {\n      if (fn) {\n        await fn(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    const requestInit: ReqInit = {\n      ...opts,\n      body: getValidRequestBody(opts),\n    };\n\n    let response = await _fetch(url, requestInit);\n\n    for (const fn of interceptors.response.fns) {\n      if (fn) {\n        response = await fn(response, opts);\n      }\n    }\n\n    const result = {\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 {\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 {\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 {\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, opts)) as string;\n      }\n    }\n\n    finalError = finalError || ({} as string);\n\n    if (opts.throwOnError) {\n      throw finalError;\n    }\n\n    return {\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        const requestInit = {\n          ...init,\n          method: init.method as Config['method'],\n          url,\n        };\n        for (const fn of interceptors.request.fns) {\n          if (fn) {\n            await fn(requestInit);\n            request = new Request(requestInit.url, requestInit);\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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-next/clean-false/client/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type { Auth } from '../core/auth.gen';\nexport type { QuerySerializerOptions } from '../core/bodySerializer.gen';\nexport {\n  formDataBodySerializer,\n  jsonBodySerializer,\n  urlSearchParamsBodySerializer,\n} from '../core/bodySerializer.gen';\nexport { buildClientParams } from '../core/params.gen';\nexport { serializeQueryKeyValue } from '../core/queryKeySerializer.gen';\nexport { createClient } from './client.gen';\nexport type {\n  Client,\n  ClientOptions,\n  Config,\n  CreateClientConfig,\n  Options,\n  RequestOptions,\n  RequestResult,\n  TDataShape,\n} from './types.gen';\nexport { createConfig } from './utils.gen';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-next/clean-false/client/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { Auth } from '../core/auth.gen';\nimport type {\n  ServerSentEventsOptions,\n  ServerSentEventsResult,\n} from '../core/serverSentEvents.gen';\nimport type { Client as CoreClient, Config as CoreConfig } from '../core/types.gen';\nimport type { Middleware } from './utils.gen';\n\nexport interface Config<T extends ClientOptions = ClientOptions>\n  extends Omit<RequestInit, 'body' | 'headers' | 'method'>, CoreConfig {\n  /**\n   * Base URL for all requests made by this client.\n   */\n  baseUrl?: T['baseUrl'];\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   * Return the response data parsed in a specified format. By default, `auto`\n   * will infer the appropriate method from the `Content-Type` response header.\n   * You can override this behavior with any of the {@link Body} methods.\n   * Select `stream` if you don't want to parse response data at all.\n   *\n   * @default 'auto'\n   */\n  parseAs?: 'arrayBuffer' | 'auto' | 'blob' | 'formData' | 'json' | 'stream' | 'text';\n  /**\n   * Throw an error instead of returning it in the response?\n   *\n   * @default false\n   */\n  throwOnError?: T['throwOnError'];\n}\n\nexport interface RequestOptions<\n  TData = unknown,\n  ThrowOnError extends boolean = boolean,\n  Url extends string = string,\n>\n  extends\n    Config<{\n      throwOnError: ThrowOnError;\n    }>,\n    Pick<\n      ServerSentEventsOptions<TData>,\n      | 'onRequest'\n      | 'onSseError'\n      | 'onSseEvent'\n      | 'sseDefaultRetryDelay'\n      | 'sseMaxRetryAttempts'\n      | 'sseMaxRetryDelay'\n    > {\n  /**\n   * Any body that you want to add to your request.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/fetch#body}\n   */\n  body?: unknown;\n  path?: Record<string, unknown>;\n  query?: Record<string, unknown>;\n  /**\n   * Security mechanism(s) to use for the request.\n   */\n  security?: ReadonlyArray<Auth>;\n  url: Url;\n}\n\nexport interface ResolvedRequestOptions<\n  ThrowOnError extends boolean = boolean,\n  Url extends string = string,\n> extends RequestOptions<unknown, ThrowOnError, Url> {\n  serializedBody?: string;\n}\n\nexport type RequestResult<\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = boolean,\n> = ThrowOnError extends true\n  ? Promise<{\n      data: TData extends Record<string, unknown> ? TData[keyof TData] : TData;\n      response: Response;\n    }>\n  : Promise<\n      (\n        | {\n            data: TData extends Record<string, unknown> ? TData[keyof TData] : TData;\n            error: undefined;\n          }\n        | {\n            data: undefined;\n            error: TError extends Record<string, unknown> ? TError[keyof TError] : TError;\n          }\n      ) & {\n        response: Response;\n      }\n    >;\n\nexport interface ClientOptions {\n  baseUrl?: string;\n  throwOnError?: boolean;\n}\n\ntype MethodFn = <TData = unknown, TError = unknown, ThrowOnError extends boolean = false>(\n  options: Omit<RequestOptions<TData, ThrowOnError>, 'method'>,\n) => RequestResult<TData, TError, ThrowOnError>;\n\ntype SseFn = <TData = unknown, TError = unknown, ThrowOnError extends boolean = false>(\n  options: Omit<RequestOptions<TData, ThrowOnError>, 'method'>,\n) => Promise<ServerSentEventsResult<TData, TError>>;\n\ntype RequestFn = <TData = unknown, TError = unknown, ThrowOnError extends boolean = false>(\n  options: Omit<RequestOptions<TData, ThrowOnError>, 'method'> &\n    Pick<Required<RequestOptions<TData, ThrowOnError>>, 'method'>,\n) => RequestResult<TData, TError, ThrowOnError>;\n\ntype BuildUrlFn = <\n  TData extends {\n    body?: unknown;\n    path?: Record<string, unknown>;\n    query?: Record<string, unknown>;\n    url: string;\n  },\n>(\n  options: TData & Options<TData>,\n) => string;\n\nexport type Client = CoreClient<RequestFn, Config, MethodFn, BuildUrlFn, SseFn> & {\n  interceptors: Middleware<Response, unknown, ResolvedRequestOptions>;\n};\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 = ClientOptions> = (\n  override?: Config<ClientOptions & T>,\n) => Config<Required<ClientOptions> & T>;\n\nexport interface TDataShape {\n  body?: unknown;\n  headers?: unknown;\n  path?: unknown;\n  query?: unknown;\n  url: string;\n}\n\ntype OmitKeys<T, K> = Pick<T, Exclude<keyof T, K>>;\n\nexport type Options<\n  TData extends TDataShape = TDataShape,\n  ThrowOnError extends boolean = boolean,\n  TResponse = unknown,\n> = OmitKeys<RequestOptions<TResponse, ThrowOnError>, 'body' | 'path' | 'query' | 'url'> &\n  ([TData] extends [never] ? unknown : Omit<TData, 'url'>);\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-next/clean-false/client/utils.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport { getAuthToken } from '../core/auth.gen';\nimport type {\n  QuerySerializer,\n  QuerySerializerOptions,\n} from '../core/bodySerializer.gen';\nimport { jsonBodySerializer } from '../core/bodySerializer.gen';\nimport {\n  serializeArrayParam,\n  serializeObjectParam,\n  serializePrimitiveParam,\n} from '../core/pathSerializer.gen';\nimport type { Client, ClientOptions, Config, RequestOptions } from './types.gen';\n\ninterface PathSerializer {\n  path: Record<string, unknown>;\n  url: string;\n}\n\nconst PATH_PARAM_RE = /\\{[^{}]+\\}/g;\n\ntype ArrayStyle = 'form' | 'spaceDelimited' | 'pipeDelimited';\ntype MatrixStyle = 'label' | 'matrix' | 'simple';\ntype ArraySeparatorStyle = ArrayStyle | MatrixStyle;\n\nconst 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 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    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  const url = 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  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 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 || typeof header !== 'object') {\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, Options> = (\n  error: Err,\n  response: Res,\n  options: Options,\n) => Err | Promise<Err>;\n\ntype ReqInterceptor<Options> = (options: Options) => void | Promise<void>;\n\ntype ResInterceptor<Res, Options> = (response: Res, options: Options) => 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<Res, Err, Options> {\n  error: Interceptors<ErrInterceptor<Err, Res, Options>>;\n  request: Interceptors<ReqInterceptor<Options>>;\n  response: Interceptors<ResInterceptor<Res, Options>>;\n}\n\nexport const createInterceptors = <Res, Err, Options>(): Middleware<Res, Err, Options> => ({\n  error: new Interceptors<ErrInterceptor<Err, Res, Options>>(),\n  request: new Interceptors<ReqInterceptor<Options>>(),\n  response: new Interceptors<ResInterceptor<Res, 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-next/clean-false/client.gen.ts",
    "content": "// 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: 'http://localhost:3000/base' }));\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-next/clean-false/core/auth.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-next/clean-false/core/bodySerializer.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-next/clean-false/core/params.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-next/clean-false/core/pathSerializer.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-next/clean-false/core/queryKeySerializer.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\n/**\n * JSON-friendly union that mirrors what Pinia Colada can hash.\n */\nexport type JsonValue =\n  | null\n  | string\n  | number\n  | boolean\n  | JsonValue[]\n  | { [key: string]: JsonValue };\n\n/**\n * Replacer that converts non-JSON values (bigint, Date, etc.) to safe substitutes.\n */\nexport const queryKeyJsonReplacer = (_key: string, value: unknown) => {\n  if (value === undefined || typeof value === 'function' || typeof value === 'symbol') {\n    return undefined;\n  }\n  if (typeof value === 'bigint') {\n    return value.toString();\n  }\n  if (value instanceof Date) {\n    return value.toISOString();\n  }\n  return value;\n};\n\n/**\n * Safely stringifies a value and parses it back into a JsonValue.\n */\nexport const stringifyToJsonValue = (input: unknown): JsonValue | undefined => {\n  try {\n    const json = JSON.stringify(input, queryKeyJsonReplacer);\n    if (json === undefined) {\n      return undefined;\n    }\n    return JSON.parse(json) as JsonValue;\n  } catch {\n    return undefined;\n  }\n};\n\n/**\n * Detects plain objects (including objects with a null prototype).\n */\nconst isPlainObject = (value: unknown): value is Record<string, unknown> => {\n  if (value === null || typeof value !== 'object') {\n    return false;\n  }\n  const prototype = Object.getPrototypeOf(value as object);\n  return prototype === Object.prototype || prototype === null;\n};\n\n/**\n * Turns URLSearchParams into a sorted JSON object for deterministic keys.\n */\nconst serializeSearchParams = (params: URLSearchParams): JsonValue => {\n  const entries = Array.from(params.entries()).sort(([a], [b]) => a.localeCompare(b));\n  const result: Record<string, JsonValue> = {};\n\n  for (const [key, value] of entries) {\n    const existing = result[key];\n    if (existing === undefined) {\n      result[key] = value;\n      continue;\n    }\n\n    if (Array.isArray(existing)) {\n      (existing as string[]).push(value);\n    } else {\n      result[key] = [existing, value];\n    }\n  }\n\n  return result;\n};\n\n/**\n * Normalizes any accepted value into a JSON-friendly shape for query keys.\n */\nexport const serializeQueryKeyValue = (value: unknown): JsonValue | undefined => {\n  if (value === null) {\n    return null;\n  }\n\n  if (typeof value === 'string' || typeof value === 'number' || typeof value === 'boolean') {\n    return value;\n  }\n\n  if (value === undefined || typeof value === 'function' || typeof value === 'symbol') {\n    return undefined;\n  }\n\n  if (typeof value === 'bigint') {\n    return value.toString();\n  }\n\n  if (value instanceof Date) {\n    return value.toISOString();\n  }\n\n  if (Array.isArray(value)) {\n    return stringifyToJsonValue(value);\n  }\n\n  if (typeof URLSearchParams !== 'undefined' && value instanceof URLSearchParams) {\n    return serializeSearchParams(value);\n  }\n\n  if (isPlainObject(value)) {\n    return stringifyToJsonValue(value);\n  }\n\n  return undefined;\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-next/clean-false/core/serverSentEvents.gen.ts",
    "content": "// 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 const 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            // Normalize line endings: CRLF -> LF, then CR -> LF\n            buffer = buffer.replace(/\\r\\n/g, '\\n').replace(/\\r/g, '\\n');\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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-next/clean-false/core/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { Auth, AuthToken } from './auth.gen';\nimport type { BodySerializer, QuerySerializer, QuerySerializerOptions } from './bodySerializer.gen';\n\nexport type HttpMethod =\n  | 'connect'\n  | 'delete'\n  | 'get'\n  | 'head'\n  | 'options'\n  | 'patch'\n  | 'post'\n  | 'put'\n  | 'trace';\n\nexport type Client<\n  RequestFn = never,\n  Config = unknown,\n  MethodFn = never,\n  BuildUrlFn = never,\n  SseFn = never,\n> = {\n  /**\n   * Returns the final request URL.\n   */\n  buildUrl: BuildUrlFn;\n  getConfig: () => Config;\n  request: RequestFn;\n  setConfig: (config: Config) => Config;\n} & {\n  [K in HttpMethod]: MethodFn;\n} & ([SseFn] extends [never] ? { sse?: never } : { sse: { [K in HttpMethod]: SseFn } });\n\nexport interface Config {\n  /**\n   * Auth token or a function returning auth token. The resolved value will be\n   * added to the request payload as defined by its `security` array.\n   */\n  auth?: ((auth: Auth) => Promise<AuthToken> | AuthToken) | AuthToken;\n  /**\n   * A function for serializing request body parameter. By default,\n   * {@link JSON.stringify()} will be used.\n   */\n  bodySerializer?: BodySerializer | null;\n  /**\n   * An object containing any HTTP headers that you want to pre-populate your\n   * `Headers` object with.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/Headers/Headers#init See more}\n   */\n  headers?:\n    | RequestInit['headers']\n    | Record<\n        string,\n        string | number | boolean | (string | number | boolean)[] | null | undefined | unknown\n      >;\n  /**\n   * The request method.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/fetch#method See more}\n   */\n  method?: Uppercase<HttpMethod>;\n  /**\n   * A function for serializing request query parameters. By default, arrays\n   * will be exploded in form style, objects will be exploded in deepObject\n   * style, and reserved characters are percent-encoded.\n   *\n   * This method will have no effect if the native `paramsSerializer()` Axios\n   * API function is used.\n   *\n   * {@link https://swagger.io/docs/specification/serialization/#query View examples}\n   */\n  querySerializer?: QuerySerializer | QuerySerializerOptions;\n  /**\n   * A function validating request data. This is useful if you want to ensure\n   * the request conforms to the desired shape, so it can be safely sent to\n   * the server.\n   */\n  requestValidator?: (data: unknown) => Promise<unknown>;\n  /**\n   * A function transforming response data before it's returned. This is useful\n   * for post-processing data, e.g. converting ISO strings into Date objects.\n   */\n  responseTransformer?: (data: unknown) => Promise<unknown>;\n  /**\n   * A function validating response data. This is useful if you want to ensure\n   * the response conforms to the desired shape, so it can be safely passed to\n   * the transformers and returned to the user.\n   */\n  responseValidator?: (data: unknown) => Promise<unknown>;\n}\n\ntype IsExactlyNeverOrNeverUndefined<T> = [T] extends [never]\n  ? true\n  : [T] extends [never | undefined]\n    ? [undefined] extends [T]\n      ? false\n      : true\n    : false;\n\nexport type OmitNever<T extends Record<string, unknown>> = {\n  [K in keyof T as IsExactlyNeverOrNeverUndefined<T[K]> extends true ? never : K]: T[K];\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-next/clean-false/core/utils.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-next/clean-false/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport { apiVVersionODataControllerCount, callToTestOrderOfParams, callWithDefaultOptionalParameters, callWithDefaultParameters, callWithDescriptions, callWithDuplicateResponses, callWithNoContentResponse, callWithParameters, callWithResponse, callWithResponseAndNoContentResponse, callWithResponses, callWithResultFromHeader, callWithWeirdParameterNames, collectionFormat, complexParams, complexTypes, deleteCallWithoutParametersAndResponse, deleteFoo, deprecatedCall, dummyA, dummyB, duplicateName, duplicateName2, duplicateName3, duplicateName4, export_, fileResponse, fooWow, getApiVbyApiVersionSimpleOperation, getCallWithOptionalParam, getCallWithoutParametersAndResponse, headCallWithoutParametersAndResponse, import_, multipartRequest, multipartResponse, nonAsciiæøåÆøÅöôêÊ字符串, type Options, optionsCallWithoutParametersAndResponse, patchApiVbyApiVersionNoTag, patchCallWithoutParametersAndResponse, postApiVbyApiVersionFormData, postApiVbyApiVersionRequestBody, postCallWithOptionalParam, postCallWithoutParametersAndResponse, putCallWithoutParametersAndResponse, putWithFormUrlEncoded, testErrorCode, types, uploadFile } from './sdk.gen';\nexport type { _3eNum1Период, _400, AdditionalPropertiesIntegerIssue, AdditionalPropertiesUnknownIssue, AdditionalPropertiesUnknownIssue2, AdditionalPropertiesUnknownIssue3, AdditionalPropertiesUnknownIssueWritable, AnyOfAnyAndNull, AnyOfArrays, ApiVVersionODataControllerCountData, ApiVVersionODataControllerCountResponse, ApiVVersionODataControllerCountResponses, ArrayWithAnyOfProperties, ArrayWithArray, ArrayWithBooleans, ArrayWithNumbers, ArrayWithProperties, ArrayWithReferences, ArrayWithStrings, CallToTestOrderOfParamsData, CallWithDefaultOptionalParametersData, CallWithDefaultParametersData, CallWithDescriptionsData, CallWithDuplicateResponsesData, CallWithDuplicateResponsesError, CallWithDuplicateResponsesErrors, CallWithDuplicateResponsesResponse, CallWithDuplicateResponsesResponses, CallWithNoContentResponseData, CallWithNoContentResponseResponse, CallWithNoContentResponseResponses, CallWithParametersData, CallWithResponseAndNoContentResponseData, CallWithResponseAndNoContentResponseResponse, CallWithResponseAndNoContentResponseResponses, CallWithResponseData, CallWithResponseResponse, CallWithResponseResponses, CallWithResponsesData, CallWithResponsesError, CallWithResponsesErrors, CallWithResponsesResponse, CallWithResponsesResponses, CallWithResultFromHeaderData, CallWithResultFromHeaderErrors, CallWithResultFromHeaderResponses, CallWithWeirdParameterNamesData, CamelCaseCommentWithBreaks, CharactersInDescription, ClientOptions, CollectionFormatData, CommentWithBackticks, CommentWithBackticksAndQuotes, CommentWithBreaks, CommentWithExpressionPlaceholders, CommentWithQuotes, CommentWithReservedCharacters, CommentWithSlashes, ComplexParamsData, ComplexParamsResponse, ComplexParamsResponses, ComplexTypesData, ComplexTypesErrors, ComplexTypesResponse, ComplexTypesResponses, CompositionBaseModel, CompositionExtendedModel, CompositionWithAllOfAndNullable, CompositionWithAnyOf, CompositionWithAnyOfAndNullable, CompositionWithAnyOfAnonymous, CompositionWithNestedAnyAndTypeNull, CompositionWithNestedAnyOfAndNull, CompositionWithOneOf, CompositionWithOneOfAndComplexArrayDictionary, CompositionWithOneOfAndNullable, CompositionWithOneOfAndProperties, CompositionWithOneOfAndSimpleArrayDictionary, CompositionWithOneOfAndSimpleDictionary, CompositionWithOneOfAnonymous, CompositionWithOneOfDiscriminator, ConstValue, Default, DeleteCallWithoutParametersAndResponseData, DeleteFooData, DeleteFooData2, DeleteFooData3, DeprecatedCallData, DeprecatedModel, DictionaryWithArray, DictionaryWithDictionary, DictionaryWithProperties, DictionaryWithPropertiesAndAdditionalProperties, DictionaryWithReference, DictionaryWithString, DummyAData, DummyAResponse, DummyAResponses, DummyBData, DummyBResponse, DummyBResponses, DuplicateName2Data, DuplicateName3Data, DuplicateName4Data, DuplicateNameData, EnumFromDescription, EnumWithExtensions, EnumWithNumbers, EnumWithReplacedCharacters, EnumWithStrings, EnumWithXEnumNames, ExportData, ExternalRefA, ExternalRefB, ExternalSharedModel, File, FileResponseData, FileResponseResponse, FileResponseResponses, FileWritable, FooWowData, FooWowResponses, FreeFormObjectWithAdditionalPropertiesEqEmptyObject, FreeFormObjectWithAdditionalPropertiesEqTrue, FreeFormObjectWithoutAdditionalProperties, GenericSchemaDuplicateIssue1SystemBoolean, GenericSchemaDuplicateIssue1SystemBooleanWritable, GenericSchemaDuplicateIssue1SystemString, GenericSchemaDuplicateIssue1SystemStringWritable, GetApiVbyApiVersionSimpleOperationData, GetApiVbyApiVersionSimpleOperationError, GetApiVbyApiVersionSimpleOperationErrors, GetApiVbyApiVersionSimpleOperationResponse, GetApiVbyApiVersionSimpleOperationResponses, GetCallWithOptionalParamData, GetCallWithoutParametersAndResponseData, HeadCallWithoutParametersAndResponseData, Import, ImportData, ImportResponse, ImportResponses, IoK8sApimachineryPkgApisMetaV1DeleteOptions, IoK8sApimachineryPkgApisMetaV1Preconditions, ModelCircle, ModelFromZendesk, ModelSquare, ModelThatExtends, ModelThatExtendsExtends, ModelWithAdditionalPropertiesEqTrue, ModelWithAdditionalPropertiesRef, ModelWithAnyOfConstantSizeArray, ModelWithAnyOfConstantSizeArrayAndIntersect, ModelWithAnyOfConstantSizeArrayNullable, ModelWithAnyOfConstantSizeArrayWithNSizeAndOptions, ModelWithAnyOfConstantSizeArrayWithNSizeAndOptionsWritable, ModelWithArray, ModelWithArrayReadOnlyAndWriteOnly, ModelWithArrayReadOnlyAndWriteOnlyWritable, ModelWithBackticksInDescription, ModelWithBoolean, ModelWithCircularReference, ModelWithConst, ModelWithConstantSizeArray, ModelWithDictionary, ModelWithDuplicateImports, ModelWithDuplicateProperties, ModelWithEnum, ModelWithEnumFromDescription, ModelWithEnumWithHyphen, ModelWithInteger, ModelWithNestedArrayEnums, ModelWithNestedArrayEnumsData, ModelWithNestedArrayEnumsDataBar, ModelWithNestedArrayEnumsDataFoo, ModelWithNestedCompositionEnums, ModelWithNestedEnums, ModelWithNestedProperties, ModelWithNullableObject, ModelWithNullableString, ModelWithNumericEnumUnion, ModelWithOneOfAndProperties, ModelWithOneOfEnum, ModelWithOrderedProperties, ModelWithPattern, ModelWithPatternWritable, ModelWithPrefixItemsConstantSizeArray, ModelWithProperties, ModelWithPropertiesWritable, ModelWithReadOnlyAndWriteOnly, ModelWithReadOnlyAndWriteOnlyWritable, ModelWithReference, ModelWithReferenceWritable, ModelWithString, ModelWithStringError, MultipartRequestData, MultipartResponseData, MultipartResponseResponse, MultipartResponseResponses, NestedAnyOfArraysNullable, NonAsciiæøåÆøÅöôêÊ字符串Data, NonAsciiæøåÆøÅöôêÊ字符串Response, NonAsciiæøåÆøÅöôêÊ字符串Responses, NonAsciiStringæøåÆøÅöôêÊ字符串, NullableObject, OneOfAllOfIssue, OneOfAllOfIssueWritable, OptionsCallWithoutParametersAndResponseData, Pageable, ParameterSimpleParameterUnused, PatchApiVbyApiVersionNoTagData, PatchApiVbyApiVersionNoTagResponses, PatchCallWithoutParametersAndResponseData, PostApiVbyApiVersionFormDataData, PostApiVbyApiVersionRequestBodyData, PostCallWithOptionalParamData, PostCallWithOptionalParamResponse, PostCallWithOptionalParamResponses, PostCallWithoutParametersAndResponseData, PostServiceWithEmptyTagResponse, PostServiceWithEmptyTagResponse2, PutCallWithoutParametersAndResponseData, PutWithFormUrlEncodedData, SchemaWithFormRestrictedKeys, SimpleBoolean, SimpleFile, SimpleFormData, SimpleInteger, SimpleParameter, SimpleReference, SimpleRequestBody, SimpleString, SimpleStringWithPattern, TestErrorCodeData, TestErrorCodeErrors, TestErrorCodeResponses, TypesData, TypesResponse, TypesResponses, UploadFileData, UploadFileResponse, UploadFileResponses, XFooBar } from './types.gen';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-next/clean-false/sdk.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport { type Client, formDataBodySerializer, type Options as Options2, type TDataShape, urlSearchParamsBodySerializer } from './client';\nimport { client } from './client.gen';\nimport type { ApiVVersionODataControllerCountData, ApiVVersionODataControllerCountResponses, CallToTestOrderOfParamsData, CallWithDefaultOptionalParametersData, CallWithDefaultParametersData, CallWithDescriptionsData, CallWithDuplicateResponsesData, CallWithDuplicateResponsesErrors, CallWithDuplicateResponsesResponses, CallWithNoContentResponseData, CallWithNoContentResponseResponses, CallWithParametersData, CallWithResponseAndNoContentResponseData, CallWithResponseAndNoContentResponseResponses, CallWithResponseData, CallWithResponseResponses, CallWithResponsesData, CallWithResponsesErrors, CallWithResponsesResponses, CallWithResultFromHeaderData, CallWithResultFromHeaderErrors, CallWithResultFromHeaderResponses, CallWithWeirdParameterNamesData, CollectionFormatData, ComplexParamsData, ComplexParamsResponses, ComplexTypesData, ComplexTypesErrors, ComplexTypesResponses, DeleteCallWithoutParametersAndResponseData, DeleteFooData3, DeprecatedCallData, DummyAData, DummyAResponses, DummyBData, DummyBResponses, DuplicateName2Data, DuplicateName3Data, DuplicateName4Data, DuplicateNameData, ExportData, FileResponseData, FileResponseResponses, FooWowData, FooWowResponses, GetApiVbyApiVersionSimpleOperationData, GetApiVbyApiVersionSimpleOperationErrors, GetApiVbyApiVersionSimpleOperationResponses, GetCallWithOptionalParamData, GetCallWithoutParametersAndResponseData, HeadCallWithoutParametersAndResponseData, ImportData, ImportResponses, MultipartRequestData, MultipartResponseData, MultipartResponseResponses, NonAsciiæøåÆøÅöôêÊ字符串Data, NonAsciiæøåÆøÅöôêÊ字符串Responses, OptionsCallWithoutParametersAndResponseData, PatchApiVbyApiVersionNoTagData, PatchApiVbyApiVersionNoTagResponses, PatchCallWithoutParametersAndResponseData, PostApiVbyApiVersionFormDataData, PostApiVbyApiVersionRequestBodyData, PostCallWithOptionalParamData, PostCallWithOptionalParamResponses, PostCallWithoutParametersAndResponseData, PutCallWithoutParametersAndResponseData, PutWithFormUrlEncodedData, TestErrorCodeData, TestErrorCodeErrors, TestErrorCodeResponses, TypesData, TypesResponses, UploadFileData, UploadFileResponses } from './types.gen';\n\nexport type Options<TData extends TDataShape = TDataShape, ThrowOnError extends boolean = boolean> = Options2<TData, ThrowOnError> & {\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\nexport const export_ = <ThrowOnError extends boolean = false>(options?: Options<ExportData, ThrowOnError>) => (options?.client ?? client).get<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/no+tag', ...options });\n\nexport const patchApiVbyApiVersionNoTag = <ThrowOnError extends boolean = false>(options?: Options<PatchApiVbyApiVersionNoTagData, ThrowOnError>) => (options?.client ?? client).patch<PatchApiVbyApiVersionNoTagResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/no+tag', ...options });\n\nexport const import_ = <ThrowOnError extends boolean = false>(options: Options<ImportData, ThrowOnError>) => (options.client ?? client).post<ImportResponses, unknown, ThrowOnError>({\n    url: '/api/v{api-version}/no+tag',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options.headers\n    }\n});\n\nexport const fooWow = <ThrowOnError extends boolean = false>(options?: Options<FooWowData, ThrowOnError>) => (options?.client ?? client).put<FooWowResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/no+tag', ...options });\n\nexport const apiVVersionODataControllerCount = <ThrowOnError extends boolean = false>(options?: Options<ApiVVersionODataControllerCountData, ThrowOnError>) => (options?.client ?? client).get<ApiVVersionODataControllerCountResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple/$count', ...options });\n\nexport const getApiVbyApiVersionSimpleOperation = <ThrowOnError extends boolean = false>(options: Options<GetApiVbyApiVersionSimpleOperationData, ThrowOnError>) => (options.client ?? client).get<GetApiVbyApiVersionSimpleOperationResponses, GetApiVbyApiVersionSimpleOperationErrors, ThrowOnError>({ url: '/api/v{api-version}/simple:operation', ...options });\n\nexport const deleteCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<DeleteCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).delete<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const getCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<GetCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).get<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const headCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<HeadCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).head<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const optionsCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<OptionsCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).options<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const patchCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<PatchCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).patch<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const postCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<PostCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).post<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const putCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<PutCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).put<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const deleteFoo = <ThrowOnError extends boolean = false>(options: Options<DeleteFooData3, ThrowOnError>) => (options.client ?? client).delete<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/foo/{foo_param}/bar/{BarParam}', ...options });\n\nexport const callWithDescriptions = <ThrowOnError extends boolean = false>(options?: Options<CallWithDescriptionsData, ThrowOnError>) => (options?.client ?? client).post<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/descriptions', ...options });\n\n/**\n * @deprecated\n */\nexport const deprecatedCall = <ThrowOnError extends boolean = false>(options: Options<DeprecatedCallData, ThrowOnError>) => (options.client ?? client).post<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/parameters/deprecated', ...options });\n\nexport const callWithParameters = <ThrowOnError extends boolean = false>(options: Options<CallWithParametersData, ThrowOnError>) => (options.client ?? client).post<unknown, unknown, ThrowOnError>({\n    url: '/api/v{api-version}/parameters/{parameterPath}',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options.headers\n    }\n});\n\nexport const callWithWeirdParameterNames = <ThrowOnError extends boolean = false>(options: Options<CallWithWeirdParameterNamesData, ThrowOnError>) => (options.client ?? client).post<unknown, unknown, ThrowOnError>({\n    url: '/api/v{api-version}/parameters/{parameter.path.1}/{parameter-path-2}/{PARAMETER-PATH-3}',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options.headers\n    }\n});\n\nexport const getCallWithOptionalParam = <ThrowOnError extends boolean = false>(options: Options<GetCallWithOptionalParamData, ThrowOnError>) => (options.client ?? client).get<unknown, unknown, ThrowOnError>({\n    url: '/api/v{api-version}/parameters',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options.headers\n    }\n});\n\nexport const postCallWithOptionalParam = <ThrowOnError extends boolean = false>(options: Options<PostCallWithOptionalParamData, ThrowOnError>) => (options.client ?? client).post<PostCallWithOptionalParamResponses, unknown, ThrowOnError>({\n    url: '/api/v{api-version}/parameters',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options.headers\n    }\n});\n\nexport const postApiVbyApiVersionRequestBody = <ThrowOnError extends boolean = false>(options?: Options<PostApiVbyApiVersionRequestBodyData, ThrowOnError>) => (options?.client ?? client).post<unknown, unknown, ThrowOnError>({\n    url: '/api/v{api-version}/requestBody',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options?.headers\n    }\n});\n\nexport const postApiVbyApiVersionFormData = <ThrowOnError extends boolean = false>(options?: Options<PostApiVbyApiVersionFormDataData, ThrowOnError>) => (options?.client ?? client).post<unknown, unknown, ThrowOnError>({\n    ...formDataBodySerializer,\n    url: '/api/v{api-version}/formData',\n    ...options,\n    headers: {\n        'Content-Type': null,\n        ...options?.headers\n    }\n});\n\nexport const callWithDefaultParameters = <ThrowOnError extends boolean = false>(options?: Options<CallWithDefaultParametersData, ThrowOnError>) => (options?.client ?? client).get<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/defaults', ...options });\n\nexport const callWithDefaultOptionalParameters = <ThrowOnError extends boolean = false>(options?: Options<CallWithDefaultOptionalParametersData, ThrowOnError>) => (options?.client ?? client).post<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/defaults', ...options });\n\nexport const callToTestOrderOfParams = <ThrowOnError extends boolean = false>(options: Options<CallToTestOrderOfParamsData, ThrowOnError>) => (options.client ?? client).put<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/defaults', ...options });\n\nexport const duplicateName = <ThrowOnError extends boolean = false>(options?: Options<DuplicateNameData, ThrowOnError>) => (options?.client ?? client).delete<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/duplicate', ...options });\n\nexport const duplicateName2 = <ThrowOnError extends boolean = false>(options?: Options<DuplicateName2Data, ThrowOnError>) => (options?.client ?? client).get<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/duplicate', ...options });\n\nexport const duplicateName3 = <ThrowOnError extends boolean = false>(options?: Options<DuplicateName3Data, ThrowOnError>) => (options?.client ?? client).post<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/duplicate', ...options });\n\nexport const duplicateName4 = <ThrowOnError extends boolean = false>(options?: Options<DuplicateName4Data, ThrowOnError>) => (options?.client ?? client).put<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/duplicate', ...options });\n\nexport const callWithNoContentResponse = <ThrowOnError extends boolean = false>(options?: Options<CallWithNoContentResponseData, ThrowOnError>) => (options?.client ?? client).get<CallWithNoContentResponseResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/no-content', ...options });\n\nexport const callWithResponseAndNoContentResponse = <ThrowOnError extends boolean = false>(options?: Options<CallWithResponseAndNoContentResponseData, ThrowOnError>) => (options?.client ?? client).get<CallWithResponseAndNoContentResponseResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/multiple-tags/response-and-no-content', ...options });\n\nexport const dummyA = <ThrowOnError extends boolean = false>(options?: Options<DummyAData, ThrowOnError>) => (options?.client ?? client).get<DummyAResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/multiple-tags/a', ...options });\n\nexport const dummyB = <ThrowOnError extends boolean = false>(options?: Options<DummyBData, ThrowOnError>) => (options?.client ?? client).get<DummyBResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/multiple-tags/b', ...options });\n\nexport const callWithResponse = <ThrowOnError extends boolean = false>(options?: Options<CallWithResponseData, ThrowOnError>) => (options?.client ?? client).get<CallWithResponseResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/response', ...options });\n\nexport const callWithDuplicateResponses = <ThrowOnError extends boolean = false>(options?: Options<CallWithDuplicateResponsesData, ThrowOnError>) => (options?.client ?? client).post<CallWithDuplicateResponsesResponses, CallWithDuplicateResponsesErrors, ThrowOnError>({ url: '/api/v{api-version}/response', ...options });\n\nexport const callWithResponses = <ThrowOnError extends boolean = false>(options?: Options<CallWithResponsesData, ThrowOnError>) => (options?.client ?? client).put<CallWithResponsesResponses, CallWithResponsesErrors, ThrowOnError>({ url: '/api/v{api-version}/response', ...options });\n\nexport const collectionFormat = <ThrowOnError extends boolean = false>(options: Options<CollectionFormatData, ThrowOnError>) => (options.client ?? client).get<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/collectionFormat', ...options });\n\nexport const types = <ThrowOnError extends boolean = false>(options: Options<TypesData, ThrowOnError>) => (options.client ?? client).get<TypesResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/types', ...options });\n\nexport const uploadFile = <ThrowOnError extends boolean = false>(options: Options<UploadFileData, ThrowOnError>) => (options.client ?? client).post<UploadFileResponses, unknown, ThrowOnError>({\n    ...urlSearchParamsBodySerializer,\n    url: '/api/v{api-version}/upload',\n    ...options,\n    headers: {\n        'Content-Type': 'application/x-www-form-urlencoded',\n        ...options.headers\n    }\n});\n\nexport const fileResponse = <ThrowOnError extends boolean = false>(options: Options<FileResponseData, ThrowOnError>) => (options.client ?? client).get<FileResponseResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/file/{id}', ...options });\n\nexport const complexTypes = <ThrowOnError extends boolean = false>(options: Options<ComplexTypesData, ThrowOnError>) => (options.client ?? client).get<ComplexTypesResponses, ComplexTypesErrors, ThrowOnError>({\n    querySerializer: { parameters: { parameterObject: { object: { style: 'form' } } } },\n    url: '/api/v{api-version}/complex',\n    ...options\n});\n\nexport const multipartResponse = <ThrowOnError extends boolean = false>(options?: Options<MultipartResponseData, ThrowOnError>) => (options?.client ?? client).get<MultipartResponseResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/multipart', ...options });\n\nexport const multipartRequest = <ThrowOnError extends boolean = false>(options?: Options<MultipartRequestData, ThrowOnError>) => (options?.client ?? client).post<unknown, unknown, ThrowOnError>({\n    ...formDataBodySerializer,\n    url: '/api/v{api-version}/multipart',\n    ...options,\n    headers: {\n        'Content-Type': null,\n        ...options?.headers\n    }\n});\n\nexport const complexParams = <ThrowOnError extends boolean = false>(options: Options<ComplexParamsData, ThrowOnError>) => (options.client ?? client).put<ComplexParamsResponses, unknown, ThrowOnError>({\n    url: '/api/v{api-version}/complex/{id}',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json-patch+json',\n        ...options.headers\n    }\n});\n\nexport const callWithResultFromHeader = <ThrowOnError extends boolean = false>(options?: Options<CallWithResultFromHeaderData, ThrowOnError>) => (options?.client ?? client).post<CallWithResultFromHeaderResponses, CallWithResultFromHeaderErrors, ThrowOnError>({ url: '/api/v{api-version}/header', ...options });\n\nexport const testErrorCode = <ThrowOnError extends boolean = false>(options: Options<TestErrorCodeData, ThrowOnError>) => (options.client ?? client).post<TestErrorCodeResponses, TestErrorCodeErrors, ThrowOnError>({ url: '/api/v{api-version}/error', ...options });\n\nexport const nonAsciiæøåÆøÅöôêÊ字符串 = <ThrowOnError extends boolean = false>(options: Options<NonAsciiæøåÆøÅöôêÊ字符串Data, ThrowOnError>) => (options.client ?? client).post<NonAsciiæøåÆøÅöôêÊ字符串Responses, unknown, ThrowOnError>({ url: '/api/v{api-version}/non-ascii-æøåÆØÅöôêÊ字符串', ...options });\n\n/**\n * Login User\n */\nexport const putWithFormUrlEncoded = <ThrowOnError extends boolean = false>(options: Options<PutWithFormUrlEncodedData, ThrowOnError>) => (options.client ?? client).put<unknown, unknown, ThrowOnError>({\n    ...urlSearchParamsBodySerializer,\n    url: '/api/v{api-version}/non-ascii-æøåÆØÅöôêÊ字符串',\n    ...options,\n    headers: {\n        'Content-Type': 'application/x-www-form-urlencoded',\n        ...options.headers\n    }\n});\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-next/clean-false/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type ClientOptions = {\n    baseUrl: 'http://localhost:3000/base' | (string & {});\n};\n\n/**\n * Model with number-only name\n */\nexport type _400 = string;\n\n/**\n * External ref to shared model (A)\n */\nexport type ExternalRefA = ExternalSharedModel;\n\n/**\n * External ref to shared model (B)\n */\nexport type ExternalRefB = ExternalSharedModel;\n\n/**\n * Testing multiline comments in string: First line\n * Second line\n *\n * Fourth line\n */\nexport type CamelCaseCommentWithBreaks = number;\n\n/**\n * Testing multiline comments in string: First line\n * Second line\n *\n * Fourth line\n */\nexport type CommentWithBreaks = number;\n\n/**\n * Testing backticks in string: `backticks` and ```multiple backticks``` should work\n */\nexport type CommentWithBackticks = number;\n\n/**\n * Testing backticks and quotes in string: `backticks`, 'quotes', \"double quotes\" and ```multiple backticks``` should work\n */\nexport type CommentWithBackticksAndQuotes = number;\n\n/**\n * Testing slashes in string: \\backwards\\\\\\ and /forwards/// should work\n */\nexport type CommentWithSlashes = number;\n\n/**\n * Testing expression placeholders in string: ${expression} should work\n */\nexport type CommentWithExpressionPlaceholders = number;\n\n/**\n * Testing quotes in string: 'single quote''' and \"double quotes\"\"\" should work\n */\nexport type CommentWithQuotes = number;\n\n/**\n * Testing reserved characters in string: * inline * and ** inline ** should work\n */\nexport type CommentWithReservedCharacters = number;\n\n/**\n * This is a simple number\n */\nexport type SimpleInteger = number;\n\n/**\n * This is a simple boolean\n */\nexport type SimpleBoolean = boolean;\n\n/**\n * This is a simple string\n */\nexport type SimpleString = string;\n\n/**\n * A string with non-ascii (unicode) characters valid in typescript identifiers (æøåÆØÅöÔèÈ字符串)\n */\nexport type NonAsciiStringæøåÆøÅöôêÊ字符串 = string;\n\n/**\n * This is a simple file\n */\nexport type SimpleFile = Blob | File;\n\n/**\n * This is a simple reference\n */\nexport type SimpleReference = ModelWithString;\n\n/**\n * This is a simple string\n */\nexport type SimpleStringWithPattern = string | null;\n\n/**\n * This is a simple enum with strings\n */\nexport type EnumWithStrings = 'Success' | 'Warning' | 'Error' | '\\'Single Quote\\'' | '\"Double Quotes\"' | 'Non-ascii: øæåôöØÆÅÔÖ字符串';\n\nexport type EnumWithReplacedCharacters = '\\'Single Quote\\'' | '\"Double Quotes\"' | 'øæåôöØÆÅÔÖ字符串' | 3.1 | '';\n\n/**\n * This is a simple enum with numbers\n */\nexport type EnumWithNumbers = 1 | 2 | 3 | 1.1 | 1.2 | 1.3 | 100 | 200 | 300 | -100 | -200 | -300 | -1.1 | -1.2 | -1.3;\n\n/**\n * Success=1,Warning=2,Error=3\n */\nexport type EnumFromDescription = number;\n\n/**\n * This is a simple enum with numbers\n */\nexport type EnumWithExtensions = 200 | 400 | 500;\n\nexport type EnumWithXEnumNames = 0 | 1 | 2;\n\n/**\n * This is a simple array with numbers\n */\nexport type ArrayWithNumbers = Array<number>;\n\n/**\n * This is a simple array with booleans\n */\nexport type ArrayWithBooleans = Array<boolean>;\n\n/**\n * This is a simple array with strings\n */\nexport type ArrayWithStrings = Array<string>;\n\n/**\n * This is a simple array with references\n */\nexport type ArrayWithReferences = Array<ModelWithString>;\n\n/**\n * This is a simple array containing an array\n */\nexport type ArrayWithArray = Array<Array<ModelWithString>>;\n\n/**\n * This is a simple array with properties\n */\nexport type ArrayWithProperties = Array<{\n    '16x16'?: CamelCaseCommentWithBreaks;\n    bar?: string;\n}>;\n\n/**\n * This is a simple array with any of properties\n */\nexport type ArrayWithAnyOfProperties = Array<{\n    foo?: string;\n} | {\n    bar?: string;\n}>;\n\nexport type AnyOfAnyAndNull = {\n    data?: unknown | null;\n};\n\n/**\n * This is a simple array with any of properties\n */\nexport type AnyOfArrays = {\n    results?: Array<{\n        foo?: string;\n    } | {\n        bar?: string;\n    }>;\n};\n\n/**\n * This is a string dictionary\n */\nexport type DictionaryWithString = {\n    [key: string]: string;\n};\n\nexport type DictionaryWithPropertiesAndAdditionalProperties = {\n    foo?: number;\n    bar?: boolean;\n    [key: string]: string | number | boolean | undefined;\n};\n\n/**\n * This is a string reference\n */\nexport type DictionaryWithReference = {\n    [key: string]: ModelWithString;\n};\n\n/**\n * This is a complex dictionary\n */\nexport type DictionaryWithArray = {\n    [key: string]: Array<ModelWithString>;\n};\n\n/**\n * This is a string dictionary\n */\nexport type DictionaryWithDictionary = {\n    [key: string]: {\n        [key: string]: string;\n    };\n};\n\n/**\n * This is a complex dictionary\n */\nexport type DictionaryWithProperties = {\n    [key: string]: {\n        foo?: string;\n        bar?: string;\n    };\n};\n\n/**\n * This is a model with one number property\n */\nexport type ModelWithInteger = {\n    /**\n     * This is a simple number property\n     */\n    prop?: number;\n};\n\n/**\n * This is a model with one boolean property\n */\nexport type ModelWithBoolean = {\n    /**\n     * This is a simple boolean property\n     */\n    prop?: boolean;\n};\n\n/**\n * This is a model with one string property\n */\nexport type ModelWithString = {\n    /**\n     * This is a simple string property\n     */\n    prop?: string;\n};\n\n/**\n * This is a model with one string property\n */\nexport type ModelWithStringError = {\n    /**\n     * This is a simple string property\n     */\n    prop?: string;\n};\n\n/**\n * `Comment` or `VoiceComment`. The JSON object for adding voice comments to tickets is different. See [Adding voice comments to tickets](/documentation/ticketing/managing-tickets/adding-voice-comments-to-tickets)\n */\nexport type ModelFromZendesk = string;\n\n/**\n * This is a model with one string property\n */\nexport type ModelWithNullableString = {\n    /**\n     * This is a simple string property\n     */\n    nullableProp1?: string | null;\n    /**\n     * This is a simple string property\n     */\n    nullableRequiredProp1: string | null;\n    /**\n     * This is a simple string property\n     */\n    nullableProp2?: string | null;\n    /**\n     * This is a simple string property\n     */\n    nullableRequiredProp2: string | null;\n    /**\n     * This is a simple enum with strings\n     */\n    'foo_bar-enum'?: 'Success' | 'Warning' | 'Error' | 'ØÆÅ字符串';\n};\n\n/**\n * This is a model with one enum\n */\nexport type ModelWithEnum = {\n    /**\n     * This is a simple enum with strings\n     */\n    'foo_bar-enum'?: 'Success' | 'Warning' | 'Error' | 'ØÆÅ字符串';\n    /**\n     * These are the HTTP error code enums\n     */\n    statusCode?: '100' | '200 FOO' | '300 FOO_BAR' | '400 foo-bar' | '500 foo.bar' | '600 foo&bar';\n    /**\n     * Simple boolean enum\n     */\n    bool?: true;\n};\n\n/**\n * This is a model with one enum with escaped name\n */\nexport type ModelWithEnumWithHyphen = {\n    /**\n     * Foo-Bar-Baz-Qux\n     */\n    'foo-bar-baz-qux'?: '3.0';\n};\n\n/**\n * This is a model with one enum\n */\nexport type ModelWithEnumFromDescription = {\n    /**\n     * Success=1,Warning=2,Error=3\n     */\n    test?: number;\n};\n\n/**\n * This is a model with nested enums\n */\nexport type ModelWithNestedEnums = {\n    dictionaryWithEnum?: {\n        [key: string]: 'Success' | 'Warning' | 'Error';\n    };\n    dictionaryWithEnumFromDescription?: {\n        [key: string]: number;\n    };\n    arrayWithEnum?: Array<'Success' | 'Warning' | 'Error'>;\n    arrayWithDescription?: Array<number>;\n    /**\n     * This is a simple enum with strings\n     */\n    'foo_bar-enum'?: 'Success' | 'Warning' | 'Error' | 'ØÆÅ字符串';\n};\n\n/**\n * This is a model with one property containing a reference\n */\nexport type ModelWithReference = {\n    prop?: ModelWithProperties;\n};\n\n/**\n * This is a model with one property containing an array\n */\nexport type ModelWithArrayReadOnlyAndWriteOnly = {\n    prop?: Array<ModelWithReadOnlyAndWriteOnly>;\n    propWithFile?: Array<Blob | File>;\n    propWithNumber?: Array<number>;\n};\n\n/**\n * This is a model with one property containing an array\n */\nexport type ModelWithArray = {\n    prop?: Array<ModelWithString>;\n    propWithFile?: Array<Blob | File>;\n    propWithNumber?: Array<number>;\n};\n\n/**\n * This is a model with one property containing a dictionary\n */\nexport type ModelWithDictionary = {\n    prop?: {\n        [key: string]: string;\n    };\n};\n\n/**\n * This is a deprecated model with a deprecated property\n *\n * @deprecated\n */\nexport type DeprecatedModel = {\n    /**\n     * This is a deprecated property\n     *\n     * @deprecated\n     */\n    prop?: string;\n};\n\n/**\n * This is a model with one property containing a circular reference\n */\nexport type ModelWithCircularReference = {\n    prop?: ModelWithCircularReference;\n};\n\n/**\n * This is a model with one property with a 'one of' relationship\n */\nexport type CompositionWithOneOf = {\n    propA?: ModelWithString | ModelWithEnum | ModelWithArray | ModelWithDictionary;\n};\n\n/**\n * This is a model with one property with a 'one of' relationship where the options are not $ref\n */\nexport type CompositionWithOneOfAnonymous = {\n    propA?: {\n        propA?: string;\n    } | string | number;\n};\n\n/**\n * Circle\n */\nexport type ModelCircle = {\n    kind: string;\n    radius?: number;\n};\n\n/**\n * Square\n */\nexport type ModelSquare = {\n    kind: string;\n    sideLength?: number;\n};\n\n/**\n * This is a model with one property with a 'one of' relationship where the options are not $ref\n */\nexport type CompositionWithOneOfDiscriminator = ({\n    kind: 'circle';\n} & ModelCircle) | ({\n    kind: 'square';\n} & ModelSquare);\n\n/**\n * This is a model with one property with a 'any of' relationship\n */\nexport type CompositionWithAnyOf = {\n    propA?: ModelWithString | ModelWithEnum | ModelWithArray | ModelWithDictionary;\n};\n\n/**\n * This is a model with one property with a 'any of' relationship where the options are not $ref\n */\nexport type CompositionWithAnyOfAnonymous = {\n    propA?: {\n        propA?: string;\n    } | string | number;\n};\n\n/**\n * This is a model with nested 'any of' property with a type null\n */\nexport type CompositionWithNestedAnyAndTypeNull = {\n    propA?: Array<ModelWithDictionary | null> | Array<ModelWithArray | null>;\n};\n\nexport type _3eNum1Период = 'Bird' | 'Dog';\n\nexport type ConstValue = 'ConstValue';\n\n/**\n * This is a model with one property with a 'any of' relationship where the options are not $ref\n */\nexport type CompositionWithNestedAnyOfAndNull = {\n    /**\n     * Scopes\n     */\n    propA?: Array<_3eNum1Период | ConstValue> | null;\n};\n\n/**\n * This is a model with one property with a 'one of' relationship\n */\nexport type CompositionWithOneOfAndNullable = {\n    propA?: {\n        boolean?: boolean;\n    } | ModelWithEnum | ModelWithArray | ModelWithDictionary | null;\n};\n\n/**\n * This is a model that contains a simple dictionary within composition\n */\nexport type CompositionWithOneOfAndSimpleDictionary = {\n    propA?: boolean | {\n        [key: string]: number;\n    };\n};\n\n/**\n * This is a model that contains a dictionary of simple arrays within composition\n */\nexport type CompositionWithOneOfAndSimpleArrayDictionary = {\n    propA?: boolean | {\n        [key: string]: Array<boolean>;\n    };\n};\n\n/**\n * This is a model that contains a dictionary of complex arrays (composited) within composition\n */\nexport type CompositionWithOneOfAndComplexArrayDictionary = {\n    propA?: boolean | {\n        [key: string]: Array<number | string>;\n    };\n};\n\n/**\n * This is a model with one property with a 'all of' relationship\n */\nexport type CompositionWithAllOfAndNullable = {\n    propA?: ({\n        boolean?: boolean;\n    } & ModelWithEnum & ModelWithArray & ModelWithDictionary) | null;\n};\n\n/**\n * This is a model with one property with a 'any of' relationship\n */\nexport type CompositionWithAnyOfAndNullable = {\n    propA?: {\n        boolean?: boolean;\n    } | ModelWithEnum | ModelWithArray | ModelWithDictionary | null;\n};\n\n/**\n * This is a base model with two simple optional properties\n */\nexport type CompositionBaseModel = {\n    firstName?: string;\n    lastname?: string;\n};\n\n/**\n * This is a model that extends the base model\n */\nexport type CompositionExtendedModel = CompositionBaseModel & {\n    age: number;\n    firstName: string;\n    lastname: string;\n};\n\n/**\n * This is a model with one nested property\n */\nexport type ModelWithProperties = {\n    required: string;\n    readonly requiredAndReadOnly: string;\n    requiredAndNullable: string | null;\n    string?: string;\n    number?: number;\n    boolean?: boolean;\n    reference?: ModelWithString;\n    'property with space'?: string;\n    default?: string;\n    try?: string;\n    readonly '@namespace.string'?: string;\n    readonly '@namespace.integer'?: number;\n};\n\n/**\n * This is a model with one nested property\n */\nexport type ModelWithNestedProperties = {\n    readonly first: {\n        readonly second: {\n            readonly third: string | null;\n        } | null;\n    } | null;\n};\n\n/**\n * This is a model with duplicated properties\n */\nexport type ModelWithDuplicateProperties = {\n    prop?: ModelWithString;\n};\n\n/**\n * This is a model with ordered properties\n */\nexport type ModelWithOrderedProperties = {\n    zebra?: string;\n    apple?: string;\n    hawaii?: string;\n};\n\n/**\n * This is a model with duplicated imports\n */\nexport type ModelWithDuplicateImports = {\n    propA?: ModelWithString;\n    propB?: ModelWithString;\n    propC?: ModelWithString;\n};\n\n/**\n * This is a model that extends another model\n */\nexport type ModelThatExtends = ModelWithString & {\n    propExtendsA?: string;\n    propExtendsB?: ModelWithString;\n};\n\n/**\n * This is a model that extends another model\n */\nexport type ModelThatExtendsExtends = ModelWithString & ModelThatExtends & {\n    propExtendsC?: string;\n    propExtendsD?: ModelWithString;\n};\n\n/**\n * This is a model that contains a some patterns\n */\nexport type ModelWithPattern = {\n    key: string;\n    name: string;\n    readonly enabled?: boolean;\n    readonly modified?: string;\n    id?: string;\n    text?: string;\n    patternWithSingleQuotes?: string;\n    patternWithNewline?: string;\n    patternWithBacktick?: string;\n    patternWithUnicode?: string;\n};\n\nexport type File = {\n    /**\n     * Id\n     */\n    readonly id?: string;\n    /**\n     * Updated at\n     */\n    readonly updated_at?: string;\n    /**\n     * Created at\n     */\n    readonly created_at?: string;\n    /**\n     * Mime\n     */\n    mime: string;\n    /**\n     * File\n     */\n    readonly file?: string;\n};\n\nexport type Default = {\n    name?: string;\n};\n\nexport type Pageable = {\n    page?: number;\n    size?: number;\n    sort?: Array<string>;\n};\n\n/**\n * This is a free-form object without additionalProperties.\n */\nexport type FreeFormObjectWithoutAdditionalProperties = {\n    [key: string]: unknown;\n};\n\n/**\n * This is a free-form object with additionalProperties: true.\n */\nexport type FreeFormObjectWithAdditionalPropertiesEqTrue = {\n    [key: string]: unknown;\n};\n\n/**\n * This is a free-form object with additionalProperties: {}.\n */\nexport type FreeFormObjectWithAdditionalPropertiesEqEmptyObject = {\n    [key: string]: unknown;\n};\n\nexport type ModelWithConst = {\n    String?: 'String';\n    number?: 0;\n    null?: null;\n    withType?: 'Some string';\n};\n\n/**\n * This is a model with one property and additionalProperties: true\n */\nexport type ModelWithAdditionalPropertiesEqTrue = {\n    /**\n     * This is a simple string property\n     */\n    prop?: string;\n    [key: string]: unknown;\n};\n\nexport type NestedAnyOfArraysNullable = {\n    nullableArray?: Array<string | boolean> | null;\n};\n\nexport type CompositionWithOneOfAndProperties = ({\n    foo: SimpleParameter;\n} | {\n    bar: NonAsciiStringæøåÆøÅöôêÊ字符串;\n}) & {\n    baz: number | null;\n    qux: number;\n};\n\n/**\n * An object that can be null\n */\nexport type NullableObject = {\n    foo?: string;\n} | null;\n\n/**\n * Some % character\n */\nexport type CharactersInDescription = string;\n\nexport type ModelWithNullableObject = {\n    data?: NullableObject;\n};\n\n/**\n * An object with additional properties that can be null (anyOf ref + null)\n */\nexport type ModelWithAdditionalPropertiesRef = {\n    [key: string]: NullableObject | null;\n};\n\nexport type ModelWithOneOfEnum = {\n    foo: 'Bar';\n} | {\n    foo: 'Baz';\n} | {\n    foo: 'Qux';\n} | {\n    content: string;\n    foo: 'Quux';\n} | {\n    content: [\n        string,\n        string\n    ];\n    foo: 'Corge';\n};\n\nexport type ModelWithNestedArrayEnumsDataFoo = 'foo' | 'bar';\n\nexport type ModelWithNestedArrayEnumsDataBar = 'baz' | 'qux';\n\nexport type ModelWithNestedArrayEnumsData = {\n    foo?: Array<ModelWithNestedArrayEnumsDataFoo>;\n    bar?: Array<ModelWithNestedArrayEnumsDataBar>;\n};\n\nexport type ModelWithNestedArrayEnums = {\n    array_strings?: Array<string>;\n    data?: ModelWithNestedArrayEnumsData;\n};\n\nexport type ModelWithNestedCompositionEnums = {\n    foo?: ModelWithNestedArrayEnumsDataFoo;\n};\n\nexport type ModelWithReadOnlyAndWriteOnly = {\n    foo: string;\n    readonly bar: string;\n};\n\nexport type ModelWithConstantSizeArray = [\n    number,\n    number\n];\n\nexport type ModelWithAnyOfConstantSizeArray = [\n    number | string,\n    number | string,\n    number | string\n];\n\nexport type ModelWithPrefixItemsConstantSizeArray = [\n    ModelWithInteger,\n    number | string,\n    string\n];\n\nexport type ModelWithAnyOfConstantSizeArrayNullable = [\n    number | null | string,\n    number | null | string,\n    number | null | string\n];\n\nexport type ModelWithAnyOfConstantSizeArrayWithNSizeAndOptions = [\n    number | Import,\n    number | Import\n];\n\nexport type ModelWithAnyOfConstantSizeArrayAndIntersect = [\n    number & string,\n    number & string\n];\n\nexport type ModelWithNumericEnumUnion = {\n    /**\n     * Период\n     */\n    value?: -10 | -1 | 0 | 1 | 3 | 6 | 12;\n};\n\n/**\n * Some description with `back ticks`\n */\nexport type ModelWithBackticksInDescription = {\n    /**\n     * The template `that` should be used for parsing and importing the contents of the CSV file.\n     *\n     * <br/><p>There is one placeholder currently supported:<ul>     <li><b>${x}</b> - refers to the n-th column in the CSV file, e.g. ${1}, ${2}, ...)</li></ul><p>Example of a correct JSON template:</p>\n     * <pre>\n     * [\n     * {\n     * \"resourceType\": \"Asset\",\n     * \"identifier\": {\n     * \"name\": \"${1}\",\n     * \"domain\": {\n     * \"name\": \"${2}\",\n     * \"community\": {\n     * \"name\": \"Some Community\"\n     * }\n     * }\n     * },\n     * \"attributes\" : {\n     * \"00000000-0000-0000-0000-000000003115\" : [ {\n     * \"value\" : \"${3}\"\n     * } ],\n     * \"00000000-0000-0000-0000-000000000222\" : [ {\n     * \"value\" : \"${4}\"\n     * } ]\n     * }\n     * }\n     * ]\n     * </pre>\n     */\n    template?: string;\n};\n\nexport type ModelWithOneOfAndProperties = (SimpleParameter | NonAsciiStringæøåÆøÅöôêÊ字符串) & {\n    baz: number | null;\n    qux: number;\n};\n\n/**\n * Model used to test deduplication strategy (unused)\n */\nexport type ParameterSimpleParameterUnused = string;\n\n/**\n * Model used to test deduplication strategy\n */\nexport type PostServiceWithEmptyTagResponse = string;\n\n/**\n * Model used to test deduplication strategy\n */\nexport type PostServiceWithEmptyTagResponse2 = string;\n\n/**\n * Model used to test deduplication strategy\n */\nexport type DeleteFooData = string;\n\n/**\n * Model used to test deduplication strategy\n */\nexport type DeleteFooData2 = string;\n\n/**\n * Model with restricted keyword name\n */\nexport type Import = string;\n\nexport type SchemaWithFormRestrictedKeys = {\n    description?: string;\n    'x-enum-descriptions'?: string;\n    'x-enum-varnames'?: string;\n    'x-enumNames'?: string;\n    title?: string;\n    object?: {\n        description?: string;\n        'x-enum-descriptions'?: string;\n        'x-enum-varnames'?: string;\n        'x-enumNames'?: string;\n        title?: string;\n    };\n    array?: Array<{\n        description?: string;\n        'x-enum-descriptions'?: string;\n        'x-enum-varnames'?: string;\n        'x-enumNames'?: string;\n        title?: string;\n    }>;\n};\n\n/**\n * This schema was giving PascalCase transformations a hard time\n */\nexport type IoK8sApimachineryPkgApisMetaV1DeleteOptions = {\n    /**\n     * Must be fulfilled before a deletion is carried out. If not possible, a 409 Conflict status will be returned.\n     */\n    preconditions?: IoK8sApimachineryPkgApisMetaV1Preconditions;\n};\n\n/**\n * This schema was giving PascalCase transformations a hard time\n */\nexport type IoK8sApimachineryPkgApisMetaV1Preconditions = {\n    /**\n     * Specifies the target ResourceVersion\n     */\n    resourceVersion?: string;\n    /**\n     * Specifies the target UID.\n     */\n    uid?: string;\n};\n\nexport type AdditionalPropertiesUnknownIssue = {\n    [key: string]: string | number;\n};\n\nexport type AdditionalPropertiesUnknownIssue2 = {\n    [key: string]: string | number;\n};\n\nexport type AdditionalPropertiesUnknownIssue3 = string & {\n    entries: {\n        [key: string]: AdditionalPropertiesUnknownIssue;\n    };\n};\n\nexport type AdditionalPropertiesIntegerIssue = {\n    value: number;\n    [key: string]: number;\n};\n\nexport type OneOfAllOfIssue = ((ConstValue | GenericSchemaDuplicateIssue1SystemBoolean) & _3eNum1Период) | GenericSchemaDuplicateIssue1SystemString;\n\nexport type GenericSchemaDuplicateIssue1SystemBoolean = {\n    item?: boolean;\n    error?: string | null;\n    readonly hasError?: boolean;\n    data?: {\n        [key: string]: never;\n    };\n};\n\nexport type GenericSchemaDuplicateIssue1SystemString = {\n    item?: string | null;\n    error?: string | null;\n    readonly hasError?: boolean;\n};\n\nexport type ExternalSharedModel = {\n    id: string;\n    name?: string;\n};\n\n/**\n * This is a model with one property containing a reference\n */\nexport type ModelWithReferenceWritable = {\n    prop?: ModelWithPropertiesWritable;\n};\n\n/**\n * This is a model with one property containing an array\n */\nexport type ModelWithArrayReadOnlyAndWriteOnlyWritable = {\n    prop?: Array<ModelWithReadOnlyAndWriteOnlyWritable>;\n    propWithFile?: Array<Blob | File>;\n    propWithNumber?: Array<number>;\n};\n\n/**\n * This is a model with one nested property\n */\nexport type ModelWithPropertiesWritable = {\n    required: string;\n    requiredAndNullable: string | null;\n    string?: string;\n    number?: number;\n    boolean?: boolean;\n    reference?: ModelWithString;\n    'property with space'?: string;\n    default?: string;\n    try?: string;\n};\n\n/**\n * This is a model that contains a some patterns\n */\nexport type ModelWithPatternWritable = {\n    key: string;\n    name: string;\n    id?: string;\n    text?: string;\n    patternWithSingleQuotes?: string;\n    patternWithNewline?: string;\n    patternWithBacktick?: string;\n    patternWithUnicode?: string;\n};\n\nexport type FileWritable = {\n    /**\n     * Mime\n     */\n    mime: string;\n};\n\nexport type ModelWithReadOnlyAndWriteOnlyWritable = {\n    foo: string;\n    baz: string;\n};\n\nexport type ModelWithAnyOfConstantSizeArrayWithNSizeAndOptionsWritable = [\n    number | Import,\n    number | Import\n];\n\nexport type AdditionalPropertiesUnknownIssueWritable = {\n    [key: string]: string | number;\n};\n\nexport type OneOfAllOfIssueWritable = ((ConstValue | GenericSchemaDuplicateIssue1SystemBoolean) & _3eNum1Период) | GenericSchemaDuplicateIssue1SystemString;\n\nexport type GenericSchemaDuplicateIssue1SystemBooleanWritable = {\n    item?: boolean;\n    error?: string | null;\n    data?: {\n        [key: string]: never;\n    };\n};\n\nexport type GenericSchemaDuplicateIssue1SystemStringWritable = {\n    item?: string | null;\n    error?: string | null;\n};\n\n/**\n * This is a reusable parameter\n */\nexport type SimpleParameter = string;\n\n/**\n * Parameter with illegal characters\n */\nexport type XFooBar = ModelWithString;\n\n/**\n * A reusable request body\n */\nexport type SimpleRequestBody = ModelWithString;\n\n/**\n * A reusable request body\n */\nexport type SimpleFormData = ModelWithString;\n\nexport type ExportData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no+tag';\n};\n\nexport type PatchApiVbyApiVersionNoTagData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no+tag';\n};\n\nexport type PatchApiVbyApiVersionNoTagResponses = {\n    /**\n     * OK\n     */\n    default: unknown;\n};\n\nexport type ImportData = {\n    body: ModelWithReadOnlyAndWriteOnlyWritable | ModelWithArrayReadOnlyAndWriteOnlyWritable;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no+tag';\n};\n\nexport type ImportResponses = {\n    /**\n     * Success\n     */\n    200: ModelFromZendesk;\n    /**\n     * Default success response\n     */\n    default: ModelWithReadOnlyAndWriteOnly;\n};\n\nexport type ImportResponse = ImportResponses[keyof ImportResponses];\n\nexport type FooWowData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no+tag';\n};\n\nexport type FooWowResponses = {\n    /**\n     * OK\n     */\n    default: unknown;\n};\n\nexport type ApiVVersionODataControllerCountData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple/$count';\n};\n\nexport type ApiVVersionODataControllerCountResponses = {\n    /**\n     * Success\n     */\n    200: ModelFromZendesk;\n};\n\nexport type ApiVVersionODataControllerCountResponse = ApiVVersionODataControllerCountResponses[keyof ApiVVersionODataControllerCountResponses];\n\nexport type GetApiVbyApiVersionSimpleOperationData = {\n    body?: never;\n    path: {\n        /**\n         * foo in method\n         */\n        foo_param: string;\n    };\n    query?: never;\n    url: '/api/v{api-version}/simple:operation';\n};\n\nexport type GetApiVbyApiVersionSimpleOperationErrors = {\n    /**\n     * Default error response\n     */\n    default: ModelWithBoolean;\n};\n\nexport type GetApiVbyApiVersionSimpleOperationError = GetApiVbyApiVersionSimpleOperationErrors[keyof GetApiVbyApiVersionSimpleOperationErrors];\n\nexport type GetApiVbyApiVersionSimpleOperationResponses = {\n    /**\n     * Response is a simple number\n     */\n    200: number;\n};\n\nexport type GetApiVbyApiVersionSimpleOperationResponse = GetApiVbyApiVersionSimpleOperationResponses[keyof GetApiVbyApiVersionSimpleOperationResponses];\n\nexport type DeleteCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type GetCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type HeadCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type OptionsCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type PatchCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type PostCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type PutCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type DeleteFooData3 = {\n    body?: never;\n    headers: {\n        /**\n         * Parameter with illegal characters\n         */\n        'x-Foo-Bar': ModelWithString;\n    };\n    path: {\n        /**\n         * foo in method\n         */\n        foo_param: string;\n        /**\n         * bar in method\n         */\n        BarParam: string;\n    };\n    query?: never;\n    url: '/api/v{api-version}/foo/{foo_param}/bar/{BarParam}';\n};\n\nexport type CallWithDescriptionsData = {\n    body?: never;\n    path?: never;\n    query?: {\n        /**\n         * Testing multiline comments in string: First line\n         * Second line\n         *\n         * Fourth line\n         */\n        parameterWithBreaks?: string;\n        /**\n         * Testing backticks in string: `backticks` and ```multiple backticks``` should work\n         */\n        parameterWithBackticks?: string;\n        /**\n         * Testing slashes in string: \\backwards\\\\\\ and /forwards/// should work\n         */\n        parameterWithSlashes?: string;\n        /**\n         * Testing expression placeholders in string: ${expression} should work\n         */\n        parameterWithExpressionPlaceholders?: string;\n        /**\n         * Testing quotes in string: 'single quote''' and \"double quotes\"\"\" should work\n         */\n        parameterWithQuotes?: string;\n        /**\n         * Testing reserved characters in string: * inline * and ** inline ** should work\n         */\n        parameterWithReservedCharacters?: string;\n    };\n    url: '/api/v{api-version}/descriptions';\n};\n\nexport type DeprecatedCallData = {\n    body?: never;\n    headers: {\n        /**\n         * This parameter is deprecated\n         *\n         * @deprecated\n         */\n        parameter: DeprecatedModel | null;\n    };\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/parameters/deprecated';\n};\n\nexport type CallWithParametersData = {\n    /**\n     * This is the parameter that goes into the body\n     */\n    body: {\n        [key: string]: unknown;\n    } | null;\n    headers: {\n        /**\n         * This is the parameter that goes into the header\n         */\n        parameterHeader: string | null;\n    };\n    path: {\n        /**\n         * This is the parameter that goes into the path\n         */\n        parameterPath: string | null;\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string | null;\n    };\n    query: {\n        foo_ref_enum?: ModelWithNestedArrayEnumsDataFoo;\n        foo_all_of_enum: ModelWithNestedArrayEnumsDataFoo;\n        /**\n         * This is the parameter that goes into the query params\n         */\n        cursor: string | null;\n    };\n    url: '/api/v{api-version}/parameters/{parameterPath}';\n};\n\nexport type CallWithWeirdParameterNamesData = {\n    /**\n     * This is the parameter that goes into the body\n     */\n    body: ModelWithString | null;\n    headers: {\n        /**\n         * This is the parameter that goes into the request header\n         */\n        'parameter.header': string | null;\n    };\n    path: {\n        /**\n         * This is the parameter that goes into the path\n         */\n        'parameter.path.1'?: string;\n        /**\n         * This is the parameter that goes into the path\n         */\n        'parameter-path-2'?: string;\n        /**\n         * This is the parameter that goes into the path\n         */\n        'PARAMETER-PATH-3'?: string;\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string | null;\n    };\n    query: {\n        /**\n         * This is the parameter with a reserved keyword\n         */\n        default?: string;\n        /**\n         * This is the parameter that goes into the request query params\n         */\n        'parameter-query': string | null;\n    };\n    url: '/api/v{api-version}/parameters/{parameter.path.1}/{parameter-path-2}/{PARAMETER-PATH-3}';\n};\n\nexport type GetCallWithOptionalParamData = {\n    /**\n     * This is a required parameter\n     */\n    body: ModelWithOneOfEnum;\n    path?: never;\n    query?: {\n        /**\n         * This is an optional parameter\n         */\n        page?: number;\n    };\n    url: '/api/v{api-version}/parameters';\n};\n\nexport type PostCallWithOptionalParamData = {\n    /**\n     * This is an optional parameter\n     */\n    body?: {\n        offset?: number | null;\n    };\n    path?: never;\n    query: {\n        /**\n         * This is a required parameter\n         */\n        parameter: Pageable;\n    };\n    url: '/api/v{api-version}/parameters';\n};\n\nexport type PostCallWithOptionalParamResponses = {\n    /**\n     * Response is a simple number\n     */\n    200: number;\n    /**\n     * Success\n     */\n    204: void;\n};\n\nexport type PostCallWithOptionalParamResponse = PostCallWithOptionalParamResponses[keyof PostCallWithOptionalParamResponses];\n\nexport type PostApiVbyApiVersionRequestBodyData = {\n    /**\n     * A reusable request body\n     */\n    body?: SimpleRequestBody;\n    path?: never;\n    query?: {\n        /**\n         * This is a reusable parameter\n         */\n        parameter?: string;\n    };\n    url: '/api/v{api-version}/requestBody';\n};\n\nexport type PostApiVbyApiVersionFormDataData = {\n    /**\n     * A reusable request body\n     */\n    body?: SimpleFormData;\n    path?: never;\n    query?: {\n        /**\n         * This is a reusable parameter\n         */\n        parameter?: string;\n    };\n    url: '/api/v{api-version}/formData';\n};\n\nexport type CallWithDefaultParametersData = {\n    body?: never;\n    path?: never;\n    query?: {\n        /**\n         * This is a simple string with default value\n         */\n        parameterString?: string | null;\n        /**\n         * This is a simple number with default value\n         */\n        parameterNumber?: number | null;\n        /**\n         * This is a simple boolean with default value\n         */\n        parameterBoolean?: boolean | null;\n        /**\n         * This is a simple enum with default value\n         */\n        parameterEnum?: 'Success' | 'Warning' | 'Error';\n        /**\n         * This is a simple model with default value\n         */\n        parameterModel?: ModelWithString | null;\n    };\n    url: '/api/v{api-version}/defaults';\n};\n\nexport type CallWithDefaultOptionalParametersData = {\n    body?: never;\n    path?: never;\n    query?: {\n        /**\n         * This is a simple string that is optional with default value\n         */\n        parameterString?: string;\n        /**\n         * This is a simple number that is optional with default value\n         */\n        parameterNumber?: number;\n        /**\n         * This is a simple boolean that is optional with default value\n         */\n        parameterBoolean?: boolean;\n        /**\n         * This is a simple enum that is optional with default value\n         */\n        parameterEnum?: 'Success' | 'Warning' | 'Error';\n        /**\n         * This is a simple model that is optional with default value\n         */\n        parameterModel?: ModelWithString;\n    };\n    url: '/api/v{api-version}/defaults';\n};\n\nexport type CallToTestOrderOfParamsData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * This is a optional string with default\n         */\n        parameterOptionalStringWithDefault?: string;\n        /**\n         * This is a optional string with empty default\n         */\n        parameterOptionalStringWithEmptyDefault?: string;\n        /**\n         * This is a optional string with no default\n         */\n        parameterOptionalStringWithNoDefault?: string;\n        /**\n         * This is a string with default\n         */\n        parameterStringWithDefault: string;\n        /**\n         * This is a string with empty default\n         */\n        parameterStringWithEmptyDefault: string;\n        /**\n         * This is a string with no default\n         */\n        parameterStringWithNoDefault: string;\n        /**\n         * This is a string that can be null with no default\n         */\n        parameterStringNullableWithNoDefault?: string | null;\n        /**\n         * This is a string that can be null with default\n         */\n        parameterStringNullableWithDefault?: string | null;\n    };\n    url: '/api/v{api-version}/defaults';\n};\n\nexport type DuplicateNameData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/duplicate';\n};\n\nexport type DuplicateName2Data = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/duplicate';\n};\n\nexport type DuplicateName3Data = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/duplicate';\n};\n\nexport type DuplicateName4Data = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/duplicate';\n};\n\nexport type CallWithNoContentResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no-content';\n};\n\nexport type CallWithNoContentResponseResponses = {\n    /**\n     * Success\n     */\n    204: void;\n};\n\nexport type CallWithNoContentResponseResponse = CallWithNoContentResponseResponses[keyof CallWithNoContentResponseResponses];\n\nexport type CallWithResponseAndNoContentResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multiple-tags/response-and-no-content';\n};\n\nexport type CallWithResponseAndNoContentResponseResponses = {\n    /**\n     * Response is a simple number\n     */\n    200: number;\n    /**\n     * Success\n     */\n    204: void;\n};\n\nexport type CallWithResponseAndNoContentResponseResponse = CallWithResponseAndNoContentResponseResponses[keyof CallWithResponseAndNoContentResponseResponses];\n\nexport type DummyAData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multiple-tags/a';\n};\n\nexport type DummyAResponses = {\n    200: _400;\n};\n\nexport type DummyAResponse = DummyAResponses[keyof DummyAResponses];\n\nexport type DummyBData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multiple-tags/b';\n};\n\nexport type DummyBResponses = {\n    /**\n     * Success\n     */\n    204: void;\n};\n\nexport type DummyBResponse = DummyBResponses[keyof DummyBResponses];\n\nexport type CallWithResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/response';\n};\n\nexport type CallWithResponseResponses = {\n    default: Import;\n};\n\nexport type CallWithResponseResponse = CallWithResponseResponses[keyof CallWithResponseResponses];\n\nexport type CallWithDuplicateResponsesData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/response';\n};\n\nexport type CallWithDuplicateResponsesErrors = {\n    /**\n     * Message for 500 error\n     */\n    500: ModelWithStringError;\n    /**\n     * Message for 501 error\n     */\n    501: ModelWithStringError;\n    /**\n     * Message for 502 error\n     */\n    502: ModelWithStringError;\n    /**\n     * Message for 4XX errors\n     */\n    '4XX': DictionaryWithArray;\n    /**\n     * Default error response\n     */\n    default: ModelWithBoolean;\n};\n\nexport type CallWithDuplicateResponsesError = CallWithDuplicateResponsesErrors[keyof CallWithDuplicateResponsesErrors];\n\nexport type CallWithDuplicateResponsesResponses = {\n    /**\n     * Message for 200 response\n     */\n    200: ModelWithBoolean & ModelWithInteger;\n    /**\n     * Message for 201 response\n     */\n    201: ModelWithString;\n    /**\n     * Message for 202 response\n     */\n    202: ModelWithString;\n};\n\nexport type CallWithDuplicateResponsesResponse = CallWithDuplicateResponsesResponses[keyof CallWithDuplicateResponsesResponses];\n\nexport type CallWithResponsesData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/response';\n};\n\nexport type CallWithResponsesErrors = {\n    /**\n     * Message for 500 error\n     */\n    500: ModelWithStringError;\n    /**\n     * Message for 501 error\n     */\n    501: ModelWithStringError;\n    /**\n     * Message for 502 error\n     */\n    502: ModelWithStringError;\n    /**\n     * Message for default response\n     */\n    default: ModelWithStringError;\n};\n\nexport type CallWithResponsesError = CallWithResponsesErrors[keyof CallWithResponsesErrors];\n\nexport type CallWithResponsesResponses = {\n    /**\n     * Message for 200 response\n     */\n    200: {\n        readonly '@namespace.string'?: string;\n        readonly '@namespace.integer'?: number;\n        readonly value?: Array<ModelWithString>;\n    };\n    /**\n     * Message for 201 response\n     */\n    201: ModelThatExtends;\n    /**\n     * Message for 202 response\n     */\n    202: ModelThatExtendsExtends;\n};\n\nexport type CallWithResponsesResponse = CallWithResponsesResponses[keyof CallWithResponsesResponses];\n\nexport type CollectionFormatData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * This is an array parameter that is sent as csv format (comma-separated values)\n         */\n        parameterArrayCSV: Array<string> | null;\n        /**\n         * This is an array parameter that is sent as ssv format (space-separated values)\n         */\n        parameterArraySSV: Array<string> | null;\n        /**\n         * This is an array parameter that is sent as tsv format (tab-separated values)\n         */\n        parameterArrayTSV: Array<string> | null;\n        /**\n         * This is an array parameter that is sent as pipes format (pipe-separated values)\n         */\n        parameterArrayPipes: Array<string> | null;\n        /**\n         * This is an array parameter that is sent as multi format (multiple parameter instances)\n         */\n        parameterArrayMulti: Array<string> | null;\n    };\n    url: '/api/v{api-version}/collectionFormat';\n};\n\nexport type TypesData = {\n    body?: never;\n    path?: {\n        /**\n         * This is a number parameter\n         */\n        id?: number;\n    };\n    query: {\n        /**\n         * This is a number parameter\n         */\n        parameterNumber: number;\n        /**\n         * This is a string parameter\n         */\n        parameterString: string | null;\n        /**\n         * This is a boolean parameter\n         */\n        parameterBoolean: boolean | null;\n        /**\n         * This is an object parameter\n         */\n        parameterObject: {\n            [key: string]: unknown;\n        } | null;\n        /**\n         * This is an array parameter\n         */\n        parameterArray: Array<string> | null;\n        /**\n         * This is a dictionary parameter\n         */\n        parameterDictionary: {\n            [key: string]: unknown;\n        } | null;\n        /**\n         * This is an enum parameter\n         */\n        parameterEnum: 'Success' | 'Warning' | 'Error' | null;\n    };\n    url: '/api/v{api-version}/types';\n};\n\nexport type TypesResponses = {\n    /**\n     * Response is a simple number\n     */\n    200: number;\n    /**\n     * Response is a simple string\n     */\n    201: string;\n    /**\n     * Response is a simple boolean\n     */\n    202: boolean;\n    /**\n     * Response is a simple object\n     */\n    203: {\n        [key: string]: unknown;\n    };\n};\n\nexport type TypesResponse = TypesResponses[keyof TypesResponses];\n\nexport type UploadFileData = {\n    body: Blob | File;\n    path: {\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string | null;\n    };\n    query?: never;\n    url: '/api/v{api-version}/upload';\n};\n\nexport type UploadFileResponses = {\n    200: boolean;\n};\n\nexport type UploadFileResponse = UploadFileResponses[keyof UploadFileResponses];\n\nexport type FileResponseData = {\n    body?: never;\n    path: {\n        id: string;\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string;\n    };\n    query?: never;\n    url: '/api/v{api-version}/file/{id}';\n};\n\nexport type FileResponseResponses = {\n    /**\n     * Success\n     */\n    200: Blob | File;\n};\n\nexport type FileResponseResponse = FileResponseResponses[keyof FileResponseResponses];\n\nexport type ComplexTypesData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * Parameter containing object\n         */\n        parameterObject: {\n            first?: {\n                second?: {\n                    third?: string;\n                };\n            };\n        };\n        /**\n         * Parameter containing reference\n         */\n        parameterReference: ModelWithString;\n    };\n    url: '/api/v{api-version}/complex';\n};\n\nexport type ComplexTypesErrors = {\n    /**\n     * 400 `server` error\n     */\n    400: unknown;\n    /**\n     * 500 server error\n     */\n    500: unknown;\n};\n\nexport type ComplexTypesResponses = {\n    /**\n     * Successful response\n     */\n    200: Array<ModelWithString>;\n};\n\nexport type ComplexTypesResponse = ComplexTypesResponses[keyof ComplexTypesResponses];\n\nexport type MultipartResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multipart';\n};\n\nexport type MultipartResponseResponses = {\n    /**\n     * OK\n     */\n    200: {\n        file?: Blob | File;\n        metadata?: {\n            foo?: string;\n            bar?: string;\n        };\n    };\n};\n\nexport type MultipartResponseResponse = MultipartResponseResponses[keyof MultipartResponseResponses];\n\nexport type MultipartRequestData = {\n    body?: {\n        content?: Blob | File;\n        data?: ModelWithString | null;\n    };\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multipart';\n};\n\nexport type ComplexParamsData = {\n    body?: {\n        readonly key: string | null;\n        name: string | null;\n        enabled?: boolean;\n        type: 'Monkey' | 'Horse' | 'Bird';\n        listOfModels?: Array<ModelWithString> | null;\n        listOfStrings?: Array<string> | null;\n        parameters: ModelWithString | ModelWithEnum | ModelWithArray | ModelWithDictionary;\n        readonly user?: {\n            readonly id?: number;\n            readonly name?: string | null;\n        };\n    };\n    path: {\n        id: number;\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string;\n    };\n    query?: never;\n    url: '/api/v{api-version}/complex/{id}';\n};\n\nexport type ComplexParamsResponses = {\n    /**\n     * Success\n     */\n    200: ModelWithString;\n};\n\nexport type ComplexParamsResponse = ComplexParamsResponses[keyof ComplexParamsResponses];\n\nexport type CallWithResultFromHeaderData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/header';\n};\n\nexport type CallWithResultFromHeaderErrors = {\n    /**\n     * 400 server error\n     */\n    400: unknown;\n    /**\n     * 500 server error\n     */\n    500: unknown;\n};\n\nexport type CallWithResultFromHeaderResponses = {\n    /**\n     * Successful response\n     */\n    200: unknown;\n};\n\nexport type TestErrorCodeData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * Status code to return\n         */\n        status: number;\n    };\n    url: '/api/v{api-version}/error';\n};\n\nexport type TestErrorCodeErrors = {\n    /**\n     * Custom message: Internal Server Error\n     */\n    500: unknown;\n    /**\n     * Custom message: Not Implemented\n     */\n    501: unknown;\n    /**\n     * Custom message: Bad Gateway\n     */\n    502: unknown;\n    /**\n     * Custom message: Service Unavailable\n     */\n    503: unknown;\n};\n\nexport type TestErrorCodeResponses = {\n    /**\n     * Custom message: Successful response\n     */\n    200: unknown;\n};\n\nexport type NonAsciiæøåÆøÅöôêÊ字符串Data = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * Dummy input param\n         */\n        nonAsciiParamæøåÆØÅöôêÊ: number;\n    };\n    url: '/api/v{api-version}/non-ascii-æøåÆØÅöôêÊ字符串';\n};\n\nexport type NonAsciiæøåÆøÅöôêÊ字符串Responses = {\n    /**\n     * Successful response\n     */\n    200: Array<NonAsciiStringæøåÆøÅöôêÊ字符串>;\n};\n\nexport type NonAsciiæøåÆøÅöôêÊ字符串Response = NonAsciiæøåÆøÅöôêÊ字符串Responses[keyof NonAsciiæøåÆøÅöôêÊ字符串Responses];\n\nexport type PutWithFormUrlEncodedData = {\n    body: ArrayWithStrings;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/non-ascii-æøåÆØÅöôêÊ字符串';\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-next/default/client/client.gen.ts",
    "content": "// 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<Response, unknown, ResolvedRequestOptions>();\n\n  const beforeRequest = async (options: RequestOptions) => {\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 url = buildUrl(opts);\n\n    return { opts, url };\n  };\n\n  // @ts-expect-error\n  const request: Client['request'] = async (options) => {\n    // @ts-expect-error\n    const { opts, url } = await beforeRequest(options);\n\n    for (const fn of interceptors.request.fns) {\n      if (fn) {\n        await fn(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    const requestInit: ReqInit = {\n      ...opts,\n      body: getValidRequestBody(opts),\n    };\n\n    let response = await _fetch(url, requestInit);\n\n    for (const fn of interceptors.response.fns) {\n      if (fn) {\n        response = await fn(response, opts);\n      }\n    }\n\n    const result = {\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 {\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 {\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 {\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, opts)) as string;\n      }\n    }\n\n    finalError = finalError || ({} as string);\n\n    if (opts.throwOnError) {\n      throw finalError;\n    }\n\n    return {\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        const requestInit = {\n          ...init,\n          method: init.method as Config['method'],\n          url,\n        };\n        for (const fn of interceptors.request.fns) {\n          if (fn) {\n            await fn(requestInit);\n            request = new Request(requestInit.url, requestInit);\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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-next/default/client/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type { Auth } from '../core/auth.gen';\nexport type { QuerySerializerOptions } from '../core/bodySerializer.gen';\nexport {\n  formDataBodySerializer,\n  jsonBodySerializer,\n  urlSearchParamsBodySerializer,\n} from '../core/bodySerializer.gen';\nexport { buildClientParams } from '../core/params.gen';\nexport { serializeQueryKeyValue } from '../core/queryKeySerializer.gen';\nexport { createClient } from './client.gen';\nexport type {\n  Client,\n  ClientOptions,\n  Config,\n  CreateClientConfig,\n  Options,\n  RequestOptions,\n  RequestResult,\n  TDataShape,\n} from './types.gen';\nexport { createConfig } from './utils.gen';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-next/default/client/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { Auth } from '../core/auth.gen';\nimport type {\n  ServerSentEventsOptions,\n  ServerSentEventsResult,\n} from '../core/serverSentEvents.gen';\nimport type { Client as CoreClient, Config as CoreConfig } from '../core/types.gen';\nimport type { Middleware } from './utils.gen';\n\nexport interface Config<T extends ClientOptions = ClientOptions>\n  extends Omit<RequestInit, 'body' | 'headers' | 'method'>, CoreConfig {\n  /**\n   * Base URL for all requests made by this client.\n   */\n  baseUrl?: T['baseUrl'];\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   * Return the response data parsed in a specified format. By default, `auto`\n   * will infer the appropriate method from the `Content-Type` response header.\n   * You can override this behavior with any of the {@link Body} methods.\n   * Select `stream` if you don't want to parse response data at all.\n   *\n   * @default 'auto'\n   */\n  parseAs?: 'arrayBuffer' | 'auto' | 'blob' | 'formData' | 'json' | 'stream' | 'text';\n  /**\n   * Throw an error instead of returning it in the response?\n   *\n   * @default false\n   */\n  throwOnError?: T['throwOnError'];\n}\n\nexport interface RequestOptions<\n  TData = unknown,\n  ThrowOnError extends boolean = boolean,\n  Url extends string = string,\n>\n  extends\n    Config<{\n      throwOnError: ThrowOnError;\n    }>,\n    Pick<\n      ServerSentEventsOptions<TData>,\n      | 'onRequest'\n      | 'onSseError'\n      | 'onSseEvent'\n      | 'sseDefaultRetryDelay'\n      | 'sseMaxRetryAttempts'\n      | 'sseMaxRetryDelay'\n    > {\n  /**\n   * Any body that you want to add to your request.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/fetch#body}\n   */\n  body?: unknown;\n  path?: Record<string, unknown>;\n  query?: Record<string, unknown>;\n  /**\n   * Security mechanism(s) to use for the request.\n   */\n  security?: ReadonlyArray<Auth>;\n  url: Url;\n}\n\nexport interface ResolvedRequestOptions<\n  ThrowOnError extends boolean = boolean,\n  Url extends string = string,\n> extends RequestOptions<unknown, ThrowOnError, Url> {\n  serializedBody?: string;\n}\n\nexport type RequestResult<\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = boolean,\n> = ThrowOnError extends true\n  ? Promise<{\n      data: TData extends Record<string, unknown> ? TData[keyof TData] : TData;\n      response: Response;\n    }>\n  : Promise<\n      (\n        | {\n            data: TData extends Record<string, unknown> ? TData[keyof TData] : TData;\n            error: undefined;\n          }\n        | {\n            data: undefined;\n            error: TError extends Record<string, unknown> ? TError[keyof TError] : TError;\n          }\n      ) & {\n        response: Response;\n      }\n    >;\n\nexport interface ClientOptions {\n  baseUrl?: string;\n  throwOnError?: boolean;\n}\n\ntype MethodFn = <TData = unknown, TError = unknown, ThrowOnError extends boolean = false>(\n  options: Omit<RequestOptions<TData, ThrowOnError>, 'method'>,\n) => RequestResult<TData, TError, ThrowOnError>;\n\ntype SseFn = <TData = unknown, TError = unknown, ThrowOnError extends boolean = false>(\n  options: Omit<RequestOptions<TData, ThrowOnError>, 'method'>,\n) => Promise<ServerSentEventsResult<TData, TError>>;\n\ntype RequestFn = <TData = unknown, TError = unknown, ThrowOnError extends boolean = false>(\n  options: Omit<RequestOptions<TData, ThrowOnError>, 'method'> &\n    Pick<Required<RequestOptions<TData, ThrowOnError>>, 'method'>,\n) => RequestResult<TData, TError, ThrowOnError>;\n\ntype BuildUrlFn = <\n  TData extends {\n    body?: unknown;\n    path?: Record<string, unknown>;\n    query?: Record<string, unknown>;\n    url: string;\n  },\n>(\n  options: TData & Options<TData>,\n) => string;\n\nexport type Client = CoreClient<RequestFn, Config, MethodFn, BuildUrlFn, SseFn> & {\n  interceptors: Middleware<Response, unknown, ResolvedRequestOptions>;\n};\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 = ClientOptions> = (\n  override?: Config<ClientOptions & T>,\n) => Config<Required<ClientOptions> & T>;\n\nexport interface TDataShape {\n  body?: unknown;\n  headers?: unknown;\n  path?: unknown;\n  query?: unknown;\n  url: string;\n}\n\ntype OmitKeys<T, K> = Pick<T, Exclude<keyof T, K>>;\n\nexport type Options<\n  TData extends TDataShape = TDataShape,\n  ThrowOnError extends boolean = boolean,\n  TResponse = unknown,\n> = OmitKeys<RequestOptions<TResponse, ThrowOnError>, 'body' | 'path' | 'query' | 'url'> &\n  ([TData] extends [never] ? unknown : Omit<TData, 'url'>);\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-next/default/client/utils.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport { getAuthToken } from '../core/auth.gen';\nimport type {\n  QuerySerializer,\n  QuerySerializerOptions,\n} from '../core/bodySerializer.gen';\nimport { jsonBodySerializer } from '../core/bodySerializer.gen';\nimport {\n  serializeArrayParam,\n  serializeObjectParam,\n  serializePrimitiveParam,\n} from '../core/pathSerializer.gen';\nimport type { Client, ClientOptions, Config, RequestOptions } from './types.gen';\n\ninterface PathSerializer {\n  path: Record<string, unknown>;\n  url: string;\n}\n\nconst PATH_PARAM_RE = /\\{[^{}]+\\}/g;\n\ntype ArrayStyle = 'form' | 'spaceDelimited' | 'pipeDelimited';\ntype MatrixStyle = 'label' | 'matrix' | 'simple';\ntype ArraySeparatorStyle = ArrayStyle | MatrixStyle;\n\nconst 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 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    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  const url = 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  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 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 || typeof header !== 'object') {\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, Options> = (\n  error: Err,\n  response: Res,\n  options: Options,\n) => Err | Promise<Err>;\n\ntype ReqInterceptor<Options> = (options: Options) => void | Promise<void>;\n\ntype ResInterceptor<Res, Options> = (response: Res, options: Options) => 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<Res, Err, Options> {\n  error: Interceptors<ErrInterceptor<Err, Res, Options>>;\n  request: Interceptors<ReqInterceptor<Options>>;\n  response: Interceptors<ResInterceptor<Res, Options>>;\n}\n\nexport const createInterceptors = <Res, Err, Options>(): Middleware<Res, Err, Options> => ({\n  error: new Interceptors<ErrInterceptor<Err, Res, Options>>(),\n  request: new Interceptors<ReqInterceptor<Options>>(),\n  response: new Interceptors<ResInterceptor<Res, 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-next/default/client.gen.ts",
    "content": "// 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: 'http://localhost:3000/base' }));\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-next/default/core/auth.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-next/default/core/bodySerializer.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-next/default/core/params.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-next/default/core/pathSerializer.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-next/default/core/queryKeySerializer.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\n/**\n * JSON-friendly union that mirrors what Pinia Colada can hash.\n */\nexport type JsonValue =\n  | null\n  | string\n  | number\n  | boolean\n  | JsonValue[]\n  | { [key: string]: JsonValue };\n\n/**\n * Replacer that converts non-JSON values (bigint, Date, etc.) to safe substitutes.\n */\nexport const queryKeyJsonReplacer = (_key: string, value: unknown) => {\n  if (value === undefined || typeof value === 'function' || typeof value === 'symbol') {\n    return undefined;\n  }\n  if (typeof value === 'bigint') {\n    return value.toString();\n  }\n  if (value instanceof Date) {\n    return value.toISOString();\n  }\n  return value;\n};\n\n/**\n * Safely stringifies a value and parses it back into a JsonValue.\n */\nexport const stringifyToJsonValue = (input: unknown): JsonValue | undefined => {\n  try {\n    const json = JSON.stringify(input, queryKeyJsonReplacer);\n    if (json === undefined) {\n      return undefined;\n    }\n    return JSON.parse(json) as JsonValue;\n  } catch {\n    return undefined;\n  }\n};\n\n/**\n * Detects plain objects (including objects with a null prototype).\n */\nconst isPlainObject = (value: unknown): value is Record<string, unknown> => {\n  if (value === null || typeof value !== 'object') {\n    return false;\n  }\n  const prototype = Object.getPrototypeOf(value as object);\n  return prototype === Object.prototype || prototype === null;\n};\n\n/**\n * Turns URLSearchParams into a sorted JSON object for deterministic keys.\n */\nconst serializeSearchParams = (params: URLSearchParams): JsonValue => {\n  const entries = Array.from(params.entries()).sort(([a], [b]) => a.localeCompare(b));\n  const result: Record<string, JsonValue> = {};\n\n  for (const [key, value] of entries) {\n    const existing = result[key];\n    if (existing === undefined) {\n      result[key] = value;\n      continue;\n    }\n\n    if (Array.isArray(existing)) {\n      (existing as string[]).push(value);\n    } else {\n      result[key] = [existing, value];\n    }\n  }\n\n  return result;\n};\n\n/**\n * Normalizes any accepted value into a JSON-friendly shape for query keys.\n */\nexport const serializeQueryKeyValue = (value: unknown): JsonValue | undefined => {\n  if (value === null) {\n    return null;\n  }\n\n  if (typeof value === 'string' || typeof value === 'number' || typeof value === 'boolean') {\n    return value;\n  }\n\n  if (value === undefined || typeof value === 'function' || typeof value === 'symbol') {\n    return undefined;\n  }\n\n  if (typeof value === 'bigint') {\n    return value.toString();\n  }\n\n  if (value instanceof Date) {\n    return value.toISOString();\n  }\n\n  if (Array.isArray(value)) {\n    return stringifyToJsonValue(value);\n  }\n\n  if (typeof URLSearchParams !== 'undefined' && value instanceof URLSearchParams) {\n    return serializeSearchParams(value);\n  }\n\n  if (isPlainObject(value)) {\n    return stringifyToJsonValue(value);\n  }\n\n  return undefined;\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-next/default/core/serverSentEvents.gen.ts",
    "content": "// 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 const 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            // Normalize line endings: CRLF -> LF, then CR -> LF\n            buffer = buffer.replace(/\\r\\n/g, '\\n').replace(/\\r/g, '\\n');\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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-next/default/core/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { Auth, AuthToken } from './auth.gen';\nimport type { BodySerializer, QuerySerializer, QuerySerializerOptions } from './bodySerializer.gen';\n\nexport type HttpMethod =\n  | 'connect'\n  | 'delete'\n  | 'get'\n  | 'head'\n  | 'options'\n  | 'patch'\n  | 'post'\n  | 'put'\n  | 'trace';\n\nexport type Client<\n  RequestFn = never,\n  Config = unknown,\n  MethodFn = never,\n  BuildUrlFn = never,\n  SseFn = never,\n> = {\n  /**\n   * Returns the final request URL.\n   */\n  buildUrl: BuildUrlFn;\n  getConfig: () => Config;\n  request: RequestFn;\n  setConfig: (config: Config) => Config;\n} & {\n  [K in HttpMethod]: MethodFn;\n} & ([SseFn] extends [never] ? { sse?: never } : { sse: { [K in HttpMethod]: SseFn } });\n\nexport interface Config {\n  /**\n   * Auth token or a function returning auth token. The resolved value will be\n   * added to the request payload as defined by its `security` array.\n   */\n  auth?: ((auth: Auth) => Promise<AuthToken> | AuthToken) | AuthToken;\n  /**\n   * A function for serializing request body parameter. By default,\n   * {@link JSON.stringify()} will be used.\n   */\n  bodySerializer?: BodySerializer | null;\n  /**\n   * An object containing any HTTP headers that you want to pre-populate your\n   * `Headers` object with.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/Headers/Headers#init See more}\n   */\n  headers?:\n    | RequestInit['headers']\n    | Record<\n        string,\n        string | number | boolean | (string | number | boolean)[] | null | undefined | unknown\n      >;\n  /**\n   * The request method.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/fetch#method See more}\n   */\n  method?: Uppercase<HttpMethod>;\n  /**\n   * A function for serializing request query parameters. By default, arrays\n   * will be exploded in form style, objects will be exploded in deepObject\n   * style, and reserved characters are percent-encoded.\n   *\n   * This method will have no effect if the native `paramsSerializer()` Axios\n   * API function is used.\n   *\n   * {@link https://swagger.io/docs/specification/serialization/#query View examples}\n   */\n  querySerializer?: QuerySerializer | QuerySerializerOptions;\n  /**\n   * A function validating request data. This is useful if you want to ensure\n   * the request conforms to the desired shape, so it can be safely sent to\n   * the server.\n   */\n  requestValidator?: (data: unknown) => Promise<unknown>;\n  /**\n   * A function transforming response data before it's returned. This is useful\n   * for post-processing data, e.g. converting ISO strings into Date objects.\n   */\n  responseTransformer?: (data: unknown) => Promise<unknown>;\n  /**\n   * A function validating response data. This is useful if you want to ensure\n   * the response conforms to the desired shape, so it can be safely passed to\n   * the transformers and returned to the user.\n   */\n  responseValidator?: (data: unknown) => Promise<unknown>;\n}\n\ntype IsExactlyNeverOrNeverUndefined<T> = [T] extends [never]\n  ? true\n  : [T] extends [never | undefined]\n    ? [undefined] extends [T]\n      ? false\n      : true\n    : false;\n\nexport type OmitNever<T extends Record<string, unknown>> = {\n  [K in keyof T as IsExactlyNeverOrNeverUndefined<T[K]> extends true ? never : K]: T[K];\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-next/default/core/utils.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-next/default/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport { apiVVersionODataControllerCount, callToTestOrderOfParams, callWithDefaultOptionalParameters, callWithDefaultParameters, callWithDescriptions, callWithDuplicateResponses, callWithNoContentResponse, callWithParameters, callWithResponse, callWithResponseAndNoContentResponse, callWithResponses, callWithResultFromHeader, callWithWeirdParameterNames, collectionFormat, complexParams, complexTypes, deleteCallWithoutParametersAndResponse, deleteFoo, deprecatedCall, dummyA, dummyB, duplicateName, duplicateName2, duplicateName3, duplicateName4, export_, fileResponse, fooWow, getApiVbyApiVersionSimpleOperation, getCallWithOptionalParam, getCallWithoutParametersAndResponse, headCallWithoutParametersAndResponse, import_, multipartRequest, multipartResponse, nonAsciiæøåÆøÅöôêÊ字符串, type Options, optionsCallWithoutParametersAndResponse, patchApiVbyApiVersionNoTag, patchCallWithoutParametersAndResponse, postApiVbyApiVersionFormData, postApiVbyApiVersionRequestBody, postCallWithOptionalParam, postCallWithoutParametersAndResponse, putCallWithoutParametersAndResponse, putWithFormUrlEncoded, testErrorCode, types, uploadFile } from './sdk.gen';\nexport type { _3eNum1Период, _400, AdditionalPropertiesIntegerIssue, AdditionalPropertiesUnknownIssue, AdditionalPropertiesUnknownIssue2, AdditionalPropertiesUnknownIssue3, AdditionalPropertiesUnknownIssueWritable, AnyOfAnyAndNull, AnyOfArrays, ApiVVersionODataControllerCountData, ApiVVersionODataControllerCountResponse, ApiVVersionODataControllerCountResponses, ArrayWithAnyOfProperties, ArrayWithArray, ArrayWithBooleans, ArrayWithNumbers, ArrayWithProperties, ArrayWithReferences, ArrayWithStrings, CallToTestOrderOfParamsData, CallWithDefaultOptionalParametersData, CallWithDefaultParametersData, CallWithDescriptionsData, CallWithDuplicateResponsesData, CallWithDuplicateResponsesError, CallWithDuplicateResponsesErrors, CallWithDuplicateResponsesResponse, CallWithDuplicateResponsesResponses, CallWithNoContentResponseData, CallWithNoContentResponseResponse, CallWithNoContentResponseResponses, CallWithParametersData, CallWithResponseAndNoContentResponseData, CallWithResponseAndNoContentResponseResponse, CallWithResponseAndNoContentResponseResponses, CallWithResponseData, CallWithResponseResponse, CallWithResponseResponses, CallWithResponsesData, CallWithResponsesError, CallWithResponsesErrors, CallWithResponsesResponse, CallWithResponsesResponses, CallWithResultFromHeaderData, CallWithResultFromHeaderErrors, CallWithResultFromHeaderResponses, CallWithWeirdParameterNamesData, CamelCaseCommentWithBreaks, CharactersInDescription, ClientOptions, CollectionFormatData, CommentWithBackticks, CommentWithBackticksAndQuotes, CommentWithBreaks, CommentWithExpressionPlaceholders, CommentWithQuotes, CommentWithReservedCharacters, CommentWithSlashes, ComplexParamsData, ComplexParamsResponse, ComplexParamsResponses, ComplexTypesData, ComplexTypesErrors, ComplexTypesResponse, ComplexTypesResponses, CompositionBaseModel, CompositionExtendedModel, CompositionWithAllOfAndNullable, CompositionWithAnyOf, CompositionWithAnyOfAndNullable, CompositionWithAnyOfAnonymous, CompositionWithNestedAnyAndTypeNull, CompositionWithNestedAnyOfAndNull, CompositionWithOneOf, CompositionWithOneOfAndComplexArrayDictionary, CompositionWithOneOfAndNullable, CompositionWithOneOfAndProperties, CompositionWithOneOfAndSimpleArrayDictionary, CompositionWithOneOfAndSimpleDictionary, CompositionWithOneOfAnonymous, CompositionWithOneOfDiscriminator, ConstValue, Default, DeleteCallWithoutParametersAndResponseData, DeleteFooData, DeleteFooData2, DeleteFooData3, DeprecatedCallData, DeprecatedModel, DictionaryWithArray, DictionaryWithDictionary, DictionaryWithProperties, DictionaryWithPropertiesAndAdditionalProperties, DictionaryWithReference, DictionaryWithString, DummyAData, DummyAResponse, DummyAResponses, DummyBData, DummyBResponse, DummyBResponses, DuplicateName2Data, DuplicateName3Data, DuplicateName4Data, DuplicateNameData, EnumFromDescription, EnumWithExtensions, EnumWithNumbers, EnumWithReplacedCharacters, EnumWithStrings, EnumWithXEnumNames, ExportData, ExternalRefA, ExternalRefB, ExternalSharedModel, File, FileResponseData, FileResponseResponse, FileResponseResponses, FileWritable, FooWowData, FooWowResponses, FreeFormObjectWithAdditionalPropertiesEqEmptyObject, FreeFormObjectWithAdditionalPropertiesEqTrue, FreeFormObjectWithoutAdditionalProperties, GenericSchemaDuplicateIssue1SystemBoolean, GenericSchemaDuplicateIssue1SystemBooleanWritable, GenericSchemaDuplicateIssue1SystemString, GenericSchemaDuplicateIssue1SystemStringWritable, GetApiVbyApiVersionSimpleOperationData, GetApiVbyApiVersionSimpleOperationError, GetApiVbyApiVersionSimpleOperationErrors, GetApiVbyApiVersionSimpleOperationResponse, GetApiVbyApiVersionSimpleOperationResponses, GetCallWithOptionalParamData, GetCallWithoutParametersAndResponseData, HeadCallWithoutParametersAndResponseData, Import, ImportData, ImportResponse, ImportResponses, IoK8sApimachineryPkgApisMetaV1DeleteOptions, IoK8sApimachineryPkgApisMetaV1Preconditions, ModelCircle, ModelFromZendesk, ModelSquare, ModelThatExtends, ModelThatExtendsExtends, ModelWithAdditionalPropertiesEqTrue, ModelWithAdditionalPropertiesRef, ModelWithAnyOfConstantSizeArray, ModelWithAnyOfConstantSizeArrayAndIntersect, ModelWithAnyOfConstantSizeArrayNullable, ModelWithAnyOfConstantSizeArrayWithNSizeAndOptions, ModelWithAnyOfConstantSizeArrayWithNSizeAndOptionsWritable, ModelWithArray, ModelWithArrayReadOnlyAndWriteOnly, ModelWithArrayReadOnlyAndWriteOnlyWritable, ModelWithBackticksInDescription, ModelWithBoolean, ModelWithCircularReference, ModelWithConst, ModelWithConstantSizeArray, ModelWithDictionary, ModelWithDuplicateImports, ModelWithDuplicateProperties, ModelWithEnum, ModelWithEnumFromDescription, ModelWithEnumWithHyphen, ModelWithInteger, ModelWithNestedArrayEnums, ModelWithNestedArrayEnumsData, ModelWithNestedArrayEnumsDataBar, ModelWithNestedArrayEnumsDataFoo, ModelWithNestedCompositionEnums, ModelWithNestedEnums, ModelWithNestedProperties, ModelWithNullableObject, ModelWithNullableString, ModelWithNumericEnumUnion, ModelWithOneOfAndProperties, ModelWithOneOfEnum, ModelWithOrderedProperties, ModelWithPattern, ModelWithPatternWritable, ModelWithPrefixItemsConstantSizeArray, ModelWithProperties, ModelWithPropertiesWritable, ModelWithReadOnlyAndWriteOnly, ModelWithReadOnlyAndWriteOnlyWritable, ModelWithReference, ModelWithReferenceWritable, ModelWithString, ModelWithStringError, MultipartRequestData, MultipartResponseData, MultipartResponseResponse, MultipartResponseResponses, NestedAnyOfArraysNullable, NonAsciiæøåÆøÅöôêÊ字符串Data, NonAsciiæøåÆøÅöôêÊ字符串Response, NonAsciiæøåÆøÅöôêÊ字符串Responses, NonAsciiStringæøåÆøÅöôêÊ字符串, NullableObject, OneOfAllOfIssue, OneOfAllOfIssueWritable, OptionsCallWithoutParametersAndResponseData, Pageable, ParameterSimpleParameterUnused, PatchApiVbyApiVersionNoTagData, PatchApiVbyApiVersionNoTagResponses, PatchCallWithoutParametersAndResponseData, PostApiVbyApiVersionFormDataData, PostApiVbyApiVersionRequestBodyData, PostCallWithOptionalParamData, PostCallWithOptionalParamResponse, PostCallWithOptionalParamResponses, PostCallWithoutParametersAndResponseData, PostServiceWithEmptyTagResponse, PostServiceWithEmptyTagResponse2, PutCallWithoutParametersAndResponseData, PutWithFormUrlEncodedData, SchemaWithFormRestrictedKeys, SimpleBoolean, SimpleFile, SimpleFormData, SimpleInteger, SimpleParameter, SimpleReference, SimpleRequestBody, SimpleString, SimpleStringWithPattern, TestErrorCodeData, TestErrorCodeErrors, TestErrorCodeResponses, TypesData, TypesResponse, TypesResponses, UploadFileData, UploadFileResponse, UploadFileResponses, XFooBar } from './types.gen';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-next/default/sdk.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport { type Client, formDataBodySerializer, type Options as Options2, type TDataShape, urlSearchParamsBodySerializer } from './client';\nimport { client } from './client.gen';\nimport type { ApiVVersionODataControllerCountData, ApiVVersionODataControllerCountResponses, CallToTestOrderOfParamsData, CallWithDefaultOptionalParametersData, CallWithDefaultParametersData, CallWithDescriptionsData, CallWithDuplicateResponsesData, CallWithDuplicateResponsesErrors, CallWithDuplicateResponsesResponses, CallWithNoContentResponseData, CallWithNoContentResponseResponses, CallWithParametersData, CallWithResponseAndNoContentResponseData, CallWithResponseAndNoContentResponseResponses, CallWithResponseData, CallWithResponseResponses, CallWithResponsesData, CallWithResponsesErrors, CallWithResponsesResponses, CallWithResultFromHeaderData, CallWithResultFromHeaderErrors, CallWithResultFromHeaderResponses, CallWithWeirdParameterNamesData, CollectionFormatData, ComplexParamsData, ComplexParamsResponses, ComplexTypesData, ComplexTypesErrors, ComplexTypesResponses, DeleteCallWithoutParametersAndResponseData, DeleteFooData3, DeprecatedCallData, DummyAData, DummyAResponses, DummyBData, DummyBResponses, DuplicateName2Data, DuplicateName3Data, DuplicateName4Data, DuplicateNameData, ExportData, FileResponseData, FileResponseResponses, FooWowData, FooWowResponses, GetApiVbyApiVersionSimpleOperationData, GetApiVbyApiVersionSimpleOperationErrors, GetApiVbyApiVersionSimpleOperationResponses, GetCallWithOptionalParamData, GetCallWithoutParametersAndResponseData, HeadCallWithoutParametersAndResponseData, ImportData, ImportResponses, MultipartRequestData, MultipartResponseData, MultipartResponseResponses, NonAsciiæøåÆøÅöôêÊ字符串Data, NonAsciiæøåÆøÅöôêÊ字符串Responses, OptionsCallWithoutParametersAndResponseData, PatchApiVbyApiVersionNoTagData, PatchApiVbyApiVersionNoTagResponses, PatchCallWithoutParametersAndResponseData, PostApiVbyApiVersionFormDataData, PostApiVbyApiVersionRequestBodyData, PostCallWithOptionalParamData, PostCallWithOptionalParamResponses, PostCallWithoutParametersAndResponseData, PutCallWithoutParametersAndResponseData, PutWithFormUrlEncodedData, TestErrorCodeData, TestErrorCodeErrors, TestErrorCodeResponses, TypesData, TypesResponses, UploadFileData, UploadFileResponses } from './types.gen';\n\nexport type Options<TData extends TDataShape = TDataShape, ThrowOnError extends boolean = boolean> = Options2<TData, ThrowOnError> & {\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\nexport const export_ = <ThrowOnError extends boolean = false>(options?: Options<ExportData, ThrowOnError>) => (options?.client ?? client).get<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/no+tag', ...options });\n\nexport const patchApiVbyApiVersionNoTag = <ThrowOnError extends boolean = false>(options?: Options<PatchApiVbyApiVersionNoTagData, ThrowOnError>) => (options?.client ?? client).patch<PatchApiVbyApiVersionNoTagResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/no+tag', ...options });\n\nexport const import_ = <ThrowOnError extends boolean = false>(options: Options<ImportData, ThrowOnError>) => (options.client ?? client).post<ImportResponses, unknown, ThrowOnError>({\n    url: '/api/v{api-version}/no+tag',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options.headers\n    }\n});\n\nexport const fooWow = <ThrowOnError extends boolean = false>(options?: Options<FooWowData, ThrowOnError>) => (options?.client ?? client).put<FooWowResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/no+tag', ...options });\n\nexport const apiVVersionODataControllerCount = <ThrowOnError extends boolean = false>(options?: Options<ApiVVersionODataControllerCountData, ThrowOnError>) => (options?.client ?? client).get<ApiVVersionODataControllerCountResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple/$count', ...options });\n\nexport const getApiVbyApiVersionSimpleOperation = <ThrowOnError extends boolean = false>(options: Options<GetApiVbyApiVersionSimpleOperationData, ThrowOnError>) => (options.client ?? client).get<GetApiVbyApiVersionSimpleOperationResponses, GetApiVbyApiVersionSimpleOperationErrors, ThrowOnError>({ url: '/api/v{api-version}/simple:operation', ...options });\n\nexport const deleteCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<DeleteCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).delete<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const getCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<GetCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).get<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const headCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<HeadCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).head<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const optionsCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<OptionsCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).options<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const patchCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<PatchCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).patch<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const postCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<PostCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).post<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const putCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<PutCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).put<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const deleteFoo = <ThrowOnError extends boolean = false>(options: Options<DeleteFooData3, ThrowOnError>) => (options.client ?? client).delete<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/foo/{foo_param}/bar/{BarParam}', ...options });\n\nexport const callWithDescriptions = <ThrowOnError extends boolean = false>(options?: Options<CallWithDescriptionsData, ThrowOnError>) => (options?.client ?? client).post<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/descriptions', ...options });\n\n/**\n * @deprecated\n */\nexport const deprecatedCall = <ThrowOnError extends boolean = false>(options: Options<DeprecatedCallData, ThrowOnError>) => (options.client ?? client).post<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/parameters/deprecated', ...options });\n\nexport const callWithParameters = <ThrowOnError extends boolean = false>(options: Options<CallWithParametersData, ThrowOnError>) => (options.client ?? client).post<unknown, unknown, ThrowOnError>({\n    url: '/api/v{api-version}/parameters/{parameterPath}',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options.headers\n    }\n});\n\nexport const callWithWeirdParameterNames = <ThrowOnError extends boolean = false>(options: Options<CallWithWeirdParameterNamesData, ThrowOnError>) => (options.client ?? client).post<unknown, unknown, ThrowOnError>({\n    url: '/api/v{api-version}/parameters/{parameter.path.1}/{parameter-path-2}/{PARAMETER-PATH-3}',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options.headers\n    }\n});\n\nexport const getCallWithOptionalParam = <ThrowOnError extends boolean = false>(options: Options<GetCallWithOptionalParamData, ThrowOnError>) => (options.client ?? client).get<unknown, unknown, ThrowOnError>({\n    url: '/api/v{api-version}/parameters',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options.headers\n    }\n});\n\nexport const postCallWithOptionalParam = <ThrowOnError extends boolean = false>(options: Options<PostCallWithOptionalParamData, ThrowOnError>) => (options.client ?? client).post<PostCallWithOptionalParamResponses, unknown, ThrowOnError>({\n    url: '/api/v{api-version}/parameters',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options.headers\n    }\n});\n\nexport const postApiVbyApiVersionRequestBody = <ThrowOnError extends boolean = false>(options?: Options<PostApiVbyApiVersionRequestBodyData, ThrowOnError>) => (options?.client ?? client).post<unknown, unknown, ThrowOnError>({\n    url: '/api/v{api-version}/requestBody',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options?.headers\n    }\n});\n\nexport const postApiVbyApiVersionFormData = <ThrowOnError extends boolean = false>(options?: Options<PostApiVbyApiVersionFormDataData, ThrowOnError>) => (options?.client ?? client).post<unknown, unknown, ThrowOnError>({\n    ...formDataBodySerializer,\n    url: '/api/v{api-version}/formData',\n    ...options,\n    headers: {\n        'Content-Type': null,\n        ...options?.headers\n    }\n});\n\nexport const callWithDefaultParameters = <ThrowOnError extends boolean = false>(options?: Options<CallWithDefaultParametersData, ThrowOnError>) => (options?.client ?? client).get<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/defaults', ...options });\n\nexport const callWithDefaultOptionalParameters = <ThrowOnError extends boolean = false>(options?: Options<CallWithDefaultOptionalParametersData, ThrowOnError>) => (options?.client ?? client).post<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/defaults', ...options });\n\nexport const callToTestOrderOfParams = <ThrowOnError extends boolean = false>(options: Options<CallToTestOrderOfParamsData, ThrowOnError>) => (options.client ?? client).put<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/defaults', ...options });\n\nexport const duplicateName = <ThrowOnError extends boolean = false>(options?: Options<DuplicateNameData, ThrowOnError>) => (options?.client ?? client).delete<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/duplicate', ...options });\n\nexport const duplicateName2 = <ThrowOnError extends boolean = false>(options?: Options<DuplicateName2Data, ThrowOnError>) => (options?.client ?? client).get<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/duplicate', ...options });\n\nexport const duplicateName3 = <ThrowOnError extends boolean = false>(options?: Options<DuplicateName3Data, ThrowOnError>) => (options?.client ?? client).post<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/duplicate', ...options });\n\nexport const duplicateName4 = <ThrowOnError extends boolean = false>(options?: Options<DuplicateName4Data, ThrowOnError>) => (options?.client ?? client).put<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/duplicate', ...options });\n\nexport const callWithNoContentResponse = <ThrowOnError extends boolean = false>(options?: Options<CallWithNoContentResponseData, ThrowOnError>) => (options?.client ?? client).get<CallWithNoContentResponseResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/no-content', ...options });\n\nexport const callWithResponseAndNoContentResponse = <ThrowOnError extends boolean = false>(options?: Options<CallWithResponseAndNoContentResponseData, ThrowOnError>) => (options?.client ?? client).get<CallWithResponseAndNoContentResponseResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/multiple-tags/response-and-no-content', ...options });\n\nexport const dummyA = <ThrowOnError extends boolean = false>(options?: Options<DummyAData, ThrowOnError>) => (options?.client ?? client).get<DummyAResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/multiple-tags/a', ...options });\n\nexport const dummyB = <ThrowOnError extends boolean = false>(options?: Options<DummyBData, ThrowOnError>) => (options?.client ?? client).get<DummyBResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/multiple-tags/b', ...options });\n\nexport const callWithResponse = <ThrowOnError extends boolean = false>(options?: Options<CallWithResponseData, ThrowOnError>) => (options?.client ?? client).get<CallWithResponseResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/response', ...options });\n\nexport const callWithDuplicateResponses = <ThrowOnError extends boolean = false>(options?: Options<CallWithDuplicateResponsesData, ThrowOnError>) => (options?.client ?? client).post<CallWithDuplicateResponsesResponses, CallWithDuplicateResponsesErrors, ThrowOnError>({ url: '/api/v{api-version}/response', ...options });\n\nexport const callWithResponses = <ThrowOnError extends boolean = false>(options?: Options<CallWithResponsesData, ThrowOnError>) => (options?.client ?? client).put<CallWithResponsesResponses, CallWithResponsesErrors, ThrowOnError>({ url: '/api/v{api-version}/response', ...options });\n\nexport const collectionFormat = <ThrowOnError extends boolean = false>(options: Options<CollectionFormatData, ThrowOnError>) => (options.client ?? client).get<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/collectionFormat', ...options });\n\nexport const types = <ThrowOnError extends boolean = false>(options: Options<TypesData, ThrowOnError>) => (options.client ?? client).get<TypesResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/types', ...options });\n\nexport const uploadFile = <ThrowOnError extends boolean = false>(options: Options<UploadFileData, ThrowOnError>) => (options.client ?? client).post<UploadFileResponses, unknown, ThrowOnError>({\n    ...urlSearchParamsBodySerializer,\n    url: '/api/v{api-version}/upload',\n    ...options,\n    headers: {\n        'Content-Type': 'application/x-www-form-urlencoded',\n        ...options.headers\n    }\n});\n\nexport const fileResponse = <ThrowOnError extends boolean = false>(options: Options<FileResponseData, ThrowOnError>) => (options.client ?? client).get<FileResponseResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/file/{id}', ...options });\n\nexport const complexTypes = <ThrowOnError extends boolean = false>(options: Options<ComplexTypesData, ThrowOnError>) => (options.client ?? client).get<ComplexTypesResponses, ComplexTypesErrors, ThrowOnError>({\n    querySerializer: { parameters: { parameterObject: { object: { style: 'form' } } } },\n    url: '/api/v{api-version}/complex',\n    ...options\n});\n\nexport const multipartResponse = <ThrowOnError extends boolean = false>(options?: Options<MultipartResponseData, ThrowOnError>) => (options?.client ?? client).get<MultipartResponseResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/multipart', ...options });\n\nexport const multipartRequest = <ThrowOnError extends boolean = false>(options?: Options<MultipartRequestData, ThrowOnError>) => (options?.client ?? client).post<unknown, unknown, ThrowOnError>({\n    ...formDataBodySerializer,\n    url: '/api/v{api-version}/multipart',\n    ...options,\n    headers: {\n        'Content-Type': null,\n        ...options?.headers\n    }\n});\n\nexport const complexParams = <ThrowOnError extends boolean = false>(options: Options<ComplexParamsData, ThrowOnError>) => (options.client ?? client).put<ComplexParamsResponses, unknown, ThrowOnError>({\n    url: '/api/v{api-version}/complex/{id}',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json-patch+json',\n        ...options.headers\n    }\n});\n\nexport const callWithResultFromHeader = <ThrowOnError extends boolean = false>(options?: Options<CallWithResultFromHeaderData, ThrowOnError>) => (options?.client ?? client).post<CallWithResultFromHeaderResponses, CallWithResultFromHeaderErrors, ThrowOnError>({ url: '/api/v{api-version}/header', ...options });\n\nexport const testErrorCode = <ThrowOnError extends boolean = false>(options: Options<TestErrorCodeData, ThrowOnError>) => (options.client ?? client).post<TestErrorCodeResponses, TestErrorCodeErrors, ThrowOnError>({ url: '/api/v{api-version}/error', ...options });\n\nexport const nonAsciiæøåÆøÅöôêÊ字符串 = <ThrowOnError extends boolean = false>(options: Options<NonAsciiæøåÆøÅöôêÊ字符串Data, ThrowOnError>) => (options.client ?? client).post<NonAsciiæøåÆøÅöôêÊ字符串Responses, unknown, ThrowOnError>({ url: '/api/v{api-version}/non-ascii-æøåÆØÅöôêÊ字符串', ...options });\n\n/**\n * Login User\n */\nexport const putWithFormUrlEncoded = <ThrowOnError extends boolean = false>(options: Options<PutWithFormUrlEncodedData, ThrowOnError>) => (options.client ?? client).put<unknown, unknown, ThrowOnError>({\n    ...urlSearchParamsBodySerializer,\n    url: '/api/v{api-version}/non-ascii-æøåÆØÅöôêÊ字符串',\n    ...options,\n    headers: {\n        'Content-Type': 'application/x-www-form-urlencoded',\n        ...options.headers\n    }\n});\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-next/default/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type ClientOptions = {\n    baseUrl: 'http://localhost:3000/base' | (string & {});\n};\n\n/**\n * Model with number-only name\n */\nexport type _400 = string;\n\n/**\n * External ref to shared model (A)\n */\nexport type ExternalRefA = ExternalSharedModel;\n\n/**\n * External ref to shared model (B)\n */\nexport type ExternalRefB = ExternalSharedModel;\n\n/**\n * Testing multiline comments in string: First line\n * Second line\n *\n * Fourth line\n */\nexport type CamelCaseCommentWithBreaks = number;\n\n/**\n * Testing multiline comments in string: First line\n * Second line\n *\n * Fourth line\n */\nexport type CommentWithBreaks = number;\n\n/**\n * Testing backticks in string: `backticks` and ```multiple backticks``` should work\n */\nexport type CommentWithBackticks = number;\n\n/**\n * Testing backticks and quotes in string: `backticks`, 'quotes', \"double quotes\" and ```multiple backticks``` should work\n */\nexport type CommentWithBackticksAndQuotes = number;\n\n/**\n * Testing slashes in string: \\backwards\\\\\\ and /forwards/// should work\n */\nexport type CommentWithSlashes = number;\n\n/**\n * Testing expression placeholders in string: ${expression} should work\n */\nexport type CommentWithExpressionPlaceholders = number;\n\n/**\n * Testing quotes in string: 'single quote''' and \"double quotes\"\"\" should work\n */\nexport type CommentWithQuotes = number;\n\n/**\n * Testing reserved characters in string: * inline * and ** inline ** should work\n */\nexport type CommentWithReservedCharacters = number;\n\n/**\n * This is a simple number\n */\nexport type SimpleInteger = number;\n\n/**\n * This is a simple boolean\n */\nexport type SimpleBoolean = boolean;\n\n/**\n * This is a simple string\n */\nexport type SimpleString = string;\n\n/**\n * A string with non-ascii (unicode) characters valid in typescript identifiers (æøåÆØÅöÔèÈ字符串)\n */\nexport type NonAsciiStringæøåÆøÅöôêÊ字符串 = string;\n\n/**\n * This is a simple file\n */\nexport type SimpleFile = Blob | File;\n\n/**\n * This is a simple reference\n */\nexport type SimpleReference = ModelWithString;\n\n/**\n * This is a simple string\n */\nexport type SimpleStringWithPattern = string | null;\n\n/**\n * This is a simple enum with strings\n */\nexport type EnumWithStrings = 'Success' | 'Warning' | 'Error' | '\\'Single Quote\\'' | '\"Double Quotes\"' | 'Non-ascii: øæåôöØÆÅÔÖ字符串';\n\nexport type EnumWithReplacedCharacters = '\\'Single Quote\\'' | '\"Double Quotes\"' | 'øæåôöØÆÅÔÖ字符串' | 3.1 | '';\n\n/**\n * This is a simple enum with numbers\n */\nexport type EnumWithNumbers = 1 | 2 | 3 | 1.1 | 1.2 | 1.3 | 100 | 200 | 300 | -100 | -200 | -300 | -1.1 | -1.2 | -1.3;\n\n/**\n * Success=1,Warning=2,Error=3\n */\nexport type EnumFromDescription = number;\n\n/**\n * This is a simple enum with numbers\n */\nexport type EnumWithExtensions = 200 | 400 | 500;\n\nexport type EnumWithXEnumNames = 0 | 1 | 2;\n\n/**\n * This is a simple array with numbers\n */\nexport type ArrayWithNumbers = Array<number>;\n\n/**\n * This is a simple array with booleans\n */\nexport type ArrayWithBooleans = Array<boolean>;\n\n/**\n * This is a simple array with strings\n */\nexport type ArrayWithStrings = Array<string>;\n\n/**\n * This is a simple array with references\n */\nexport type ArrayWithReferences = Array<ModelWithString>;\n\n/**\n * This is a simple array containing an array\n */\nexport type ArrayWithArray = Array<Array<ModelWithString>>;\n\n/**\n * This is a simple array with properties\n */\nexport type ArrayWithProperties = Array<{\n    '16x16'?: CamelCaseCommentWithBreaks;\n    bar?: string;\n}>;\n\n/**\n * This is a simple array with any of properties\n */\nexport type ArrayWithAnyOfProperties = Array<{\n    foo?: string;\n} | {\n    bar?: string;\n}>;\n\nexport type AnyOfAnyAndNull = {\n    data?: unknown | null;\n};\n\n/**\n * This is a simple array with any of properties\n */\nexport type AnyOfArrays = {\n    results?: Array<{\n        foo?: string;\n    } | {\n        bar?: string;\n    }>;\n};\n\n/**\n * This is a string dictionary\n */\nexport type DictionaryWithString = {\n    [key: string]: string;\n};\n\nexport type DictionaryWithPropertiesAndAdditionalProperties = {\n    foo?: number;\n    bar?: boolean;\n    [key: string]: string | number | boolean | undefined;\n};\n\n/**\n * This is a string reference\n */\nexport type DictionaryWithReference = {\n    [key: string]: ModelWithString;\n};\n\n/**\n * This is a complex dictionary\n */\nexport type DictionaryWithArray = {\n    [key: string]: Array<ModelWithString>;\n};\n\n/**\n * This is a string dictionary\n */\nexport type DictionaryWithDictionary = {\n    [key: string]: {\n        [key: string]: string;\n    };\n};\n\n/**\n * This is a complex dictionary\n */\nexport type DictionaryWithProperties = {\n    [key: string]: {\n        foo?: string;\n        bar?: string;\n    };\n};\n\n/**\n * This is a model with one number property\n */\nexport type ModelWithInteger = {\n    /**\n     * This is a simple number property\n     */\n    prop?: number;\n};\n\n/**\n * This is a model with one boolean property\n */\nexport type ModelWithBoolean = {\n    /**\n     * This is a simple boolean property\n     */\n    prop?: boolean;\n};\n\n/**\n * This is a model with one string property\n */\nexport type ModelWithString = {\n    /**\n     * This is a simple string property\n     */\n    prop?: string;\n};\n\n/**\n * This is a model with one string property\n */\nexport type ModelWithStringError = {\n    /**\n     * This is a simple string property\n     */\n    prop?: string;\n};\n\n/**\n * `Comment` or `VoiceComment`. The JSON object for adding voice comments to tickets is different. See [Adding voice comments to tickets](/documentation/ticketing/managing-tickets/adding-voice-comments-to-tickets)\n */\nexport type ModelFromZendesk = string;\n\n/**\n * This is a model with one string property\n */\nexport type ModelWithNullableString = {\n    /**\n     * This is a simple string property\n     */\n    nullableProp1?: string | null;\n    /**\n     * This is a simple string property\n     */\n    nullableRequiredProp1: string | null;\n    /**\n     * This is a simple string property\n     */\n    nullableProp2?: string | null;\n    /**\n     * This is a simple string property\n     */\n    nullableRequiredProp2: string | null;\n    /**\n     * This is a simple enum with strings\n     */\n    'foo_bar-enum'?: 'Success' | 'Warning' | 'Error' | 'ØÆÅ字符串';\n};\n\n/**\n * This is a model with one enum\n */\nexport type ModelWithEnum = {\n    /**\n     * This is a simple enum with strings\n     */\n    'foo_bar-enum'?: 'Success' | 'Warning' | 'Error' | 'ØÆÅ字符串';\n    /**\n     * These are the HTTP error code enums\n     */\n    statusCode?: '100' | '200 FOO' | '300 FOO_BAR' | '400 foo-bar' | '500 foo.bar' | '600 foo&bar';\n    /**\n     * Simple boolean enum\n     */\n    bool?: true;\n};\n\n/**\n * This is a model with one enum with escaped name\n */\nexport type ModelWithEnumWithHyphen = {\n    /**\n     * Foo-Bar-Baz-Qux\n     */\n    'foo-bar-baz-qux'?: '3.0';\n};\n\n/**\n * This is a model with one enum\n */\nexport type ModelWithEnumFromDescription = {\n    /**\n     * Success=1,Warning=2,Error=3\n     */\n    test?: number;\n};\n\n/**\n * This is a model with nested enums\n */\nexport type ModelWithNestedEnums = {\n    dictionaryWithEnum?: {\n        [key: string]: 'Success' | 'Warning' | 'Error';\n    };\n    dictionaryWithEnumFromDescription?: {\n        [key: string]: number;\n    };\n    arrayWithEnum?: Array<'Success' | 'Warning' | 'Error'>;\n    arrayWithDescription?: Array<number>;\n    /**\n     * This is a simple enum with strings\n     */\n    'foo_bar-enum'?: 'Success' | 'Warning' | 'Error' | 'ØÆÅ字符串';\n};\n\n/**\n * This is a model with one property containing a reference\n */\nexport type ModelWithReference = {\n    prop?: ModelWithProperties;\n};\n\n/**\n * This is a model with one property containing an array\n */\nexport type ModelWithArrayReadOnlyAndWriteOnly = {\n    prop?: Array<ModelWithReadOnlyAndWriteOnly>;\n    propWithFile?: Array<Blob | File>;\n    propWithNumber?: Array<number>;\n};\n\n/**\n * This is a model with one property containing an array\n */\nexport type ModelWithArray = {\n    prop?: Array<ModelWithString>;\n    propWithFile?: Array<Blob | File>;\n    propWithNumber?: Array<number>;\n};\n\n/**\n * This is a model with one property containing a dictionary\n */\nexport type ModelWithDictionary = {\n    prop?: {\n        [key: string]: string;\n    };\n};\n\n/**\n * This is a deprecated model with a deprecated property\n *\n * @deprecated\n */\nexport type DeprecatedModel = {\n    /**\n     * This is a deprecated property\n     *\n     * @deprecated\n     */\n    prop?: string;\n};\n\n/**\n * This is a model with one property containing a circular reference\n */\nexport type ModelWithCircularReference = {\n    prop?: ModelWithCircularReference;\n};\n\n/**\n * This is a model with one property with a 'one of' relationship\n */\nexport type CompositionWithOneOf = {\n    propA?: ModelWithString | ModelWithEnum | ModelWithArray | ModelWithDictionary;\n};\n\n/**\n * This is a model with one property with a 'one of' relationship where the options are not $ref\n */\nexport type CompositionWithOneOfAnonymous = {\n    propA?: {\n        propA?: string;\n    } | string | number;\n};\n\n/**\n * Circle\n */\nexport type ModelCircle = {\n    kind: string;\n    radius?: number;\n};\n\n/**\n * Square\n */\nexport type ModelSquare = {\n    kind: string;\n    sideLength?: number;\n};\n\n/**\n * This is a model with one property with a 'one of' relationship where the options are not $ref\n */\nexport type CompositionWithOneOfDiscriminator = ({\n    kind: 'circle';\n} & ModelCircle) | ({\n    kind: 'square';\n} & ModelSquare);\n\n/**\n * This is a model with one property with a 'any of' relationship\n */\nexport type CompositionWithAnyOf = {\n    propA?: ModelWithString | ModelWithEnum | ModelWithArray | ModelWithDictionary;\n};\n\n/**\n * This is a model with one property with a 'any of' relationship where the options are not $ref\n */\nexport type CompositionWithAnyOfAnonymous = {\n    propA?: {\n        propA?: string;\n    } | string | number;\n};\n\n/**\n * This is a model with nested 'any of' property with a type null\n */\nexport type CompositionWithNestedAnyAndTypeNull = {\n    propA?: Array<ModelWithDictionary | null> | Array<ModelWithArray | null>;\n};\n\nexport type _3eNum1Период = 'Bird' | 'Dog';\n\nexport type ConstValue = 'ConstValue';\n\n/**\n * This is a model with one property with a 'any of' relationship where the options are not $ref\n */\nexport type CompositionWithNestedAnyOfAndNull = {\n    /**\n     * Scopes\n     */\n    propA?: Array<_3eNum1Период | ConstValue> | null;\n};\n\n/**\n * This is a model with one property with a 'one of' relationship\n */\nexport type CompositionWithOneOfAndNullable = {\n    propA?: {\n        boolean?: boolean;\n    } | ModelWithEnum | ModelWithArray | ModelWithDictionary | null;\n};\n\n/**\n * This is a model that contains a simple dictionary within composition\n */\nexport type CompositionWithOneOfAndSimpleDictionary = {\n    propA?: boolean | {\n        [key: string]: number;\n    };\n};\n\n/**\n * This is a model that contains a dictionary of simple arrays within composition\n */\nexport type CompositionWithOneOfAndSimpleArrayDictionary = {\n    propA?: boolean | {\n        [key: string]: Array<boolean>;\n    };\n};\n\n/**\n * This is a model that contains a dictionary of complex arrays (composited) within composition\n */\nexport type CompositionWithOneOfAndComplexArrayDictionary = {\n    propA?: boolean | {\n        [key: string]: Array<number | string>;\n    };\n};\n\n/**\n * This is a model with one property with a 'all of' relationship\n */\nexport type CompositionWithAllOfAndNullable = {\n    propA?: ({\n        boolean?: boolean;\n    } & ModelWithEnum & ModelWithArray & ModelWithDictionary) | null;\n};\n\n/**\n * This is a model with one property with a 'any of' relationship\n */\nexport type CompositionWithAnyOfAndNullable = {\n    propA?: {\n        boolean?: boolean;\n    } | ModelWithEnum | ModelWithArray | ModelWithDictionary | null;\n};\n\n/**\n * This is a base model with two simple optional properties\n */\nexport type CompositionBaseModel = {\n    firstName?: string;\n    lastname?: string;\n};\n\n/**\n * This is a model that extends the base model\n */\nexport type CompositionExtendedModel = CompositionBaseModel & {\n    age: number;\n    firstName: string;\n    lastname: string;\n};\n\n/**\n * This is a model with one nested property\n */\nexport type ModelWithProperties = {\n    required: string;\n    readonly requiredAndReadOnly: string;\n    requiredAndNullable: string | null;\n    string?: string;\n    number?: number;\n    boolean?: boolean;\n    reference?: ModelWithString;\n    'property with space'?: string;\n    default?: string;\n    try?: string;\n    readonly '@namespace.string'?: string;\n    readonly '@namespace.integer'?: number;\n};\n\n/**\n * This is a model with one nested property\n */\nexport type ModelWithNestedProperties = {\n    readonly first: {\n        readonly second: {\n            readonly third: string | null;\n        } | null;\n    } | null;\n};\n\n/**\n * This is a model with duplicated properties\n */\nexport type ModelWithDuplicateProperties = {\n    prop?: ModelWithString;\n};\n\n/**\n * This is a model with ordered properties\n */\nexport type ModelWithOrderedProperties = {\n    zebra?: string;\n    apple?: string;\n    hawaii?: string;\n};\n\n/**\n * This is a model with duplicated imports\n */\nexport type ModelWithDuplicateImports = {\n    propA?: ModelWithString;\n    propB?: ModelWithString;\n    propC?: ModelWithString;\n};\n\n/**\n * This is a model that extends another model\n */\nexport type ModelThatExtends = ModelWithString & {\n    propExtendsA?: string;\n    propExtendsB?: ModelWithString;\n};\n\n/**\n * This is a model that extends another model\n */\nexport type ModelThatExtendsExtends = ModelWithString & ModelThatExtends & {\n    propExtendsC?: string;\n    propExtendsD?: ModelWithString;\n};\n\n/**\n * This is a model that contains a some patterns\n */\nexport type ModelWithPattern = {\n    key: string;\n    name: string;\n    readonly enabled?: boolean;\n    readonly modified?: string;\n    id?: string;\n    text?: string;\n    patternWithSingleQuotes?: string;\n    patternWithNewline?: string;\n    patternWithBacktick?: string;\n    patternWithUnicode?: string;\n};\n\nexport type File = {\n    /**\n     * Id\n     */\n    readonly id?: string;\n    /**\n     * Updated at\n     */\n    readonly updated_at?: string;\n    /**\n     * Created at\n     */\n    readonly created_at?: string;\n    /**\n     * Mime\n     */\n    mime: string;\n    /**\n     * File\n     */\n    readonly file?: string;\n};\n\nexport type Default = {\n    name?: string;\n};\n\nexport type Pageable = {\n    page?: number;\n    size?: number;\n    sort?: Array<string>;\n};\n\n/**\n * This is a free-form object without additionalProperties.\n */\nexport type FreeFormObjectWithoutAdditionalProperties = {\n    [key: string]: unknown;\n};\n\n/**\n * This is a free-form object with additionalProperties: true.\n */\nexport type FreeFormObjectWithAdditionalPropertiesEqTrue = {\n    [key: string]: unknown;\n};\n\n/**\n * This is a free-form object with additionalProperties: {}.\n */\nexport type FreeFormObjectWithAdditionalPropertiesEqEmptyObject = {\n    [key: string]: unknown;\n};\n\nexport type ModelWithConst = {\n    String?: 'String';\n    number?: 0;\n    null?: null;\n    withType?: 'Some string';\n};\n\n/**\n * This is a model with one property and additionalProperties: true\n */\nexport type ModelWithAdditionalPropertiesEqTrue = {\n    /**\n     * This is a simple string property\n     */\n    prop?: string;\n    [key: string]: unknown;\n};\n\nexport type NestedAnyOfArraysNullable = {\n    nullableArray?: Array<string | boolean> | null;\n};\n\nexport type CompositionWithOneOfAndProperties = ({\n    foo: SimpleParameter;\n} | {\n    bar: NonAsciiStringæøåÆøÅöôêÊ字符串;\n}) & {\n    baz: number | null;\n    qux: number;\n};\n\n/**\n * An object that can be null\n */\nexport type NullableObject = {\n    foo?: string;\n} | null;\n\n/**\n * Some % character\n */\nexport type CharactersInDescription = string;\n\nexport type ModelWithNullableObject = {\n    data?: NullableObject;\n};\n\n/**\n * An object with additional properties that can be null (anyOf ref + null)\n */\nexport type ModelWithAdditionalPropertiesRef = {\n    [key: string]: NullableObject | null;\n};\n\nexport type ModelWithOneOfEnum = {\n    foo: 'Bar';\n} | {\n    foo: 'Baz';\n} | {\n    foo: 'Qux';\n} | {\n    content: string;\n    foo: 'Quux';\n} | {\n    content: [\n        string,\n        string\n    ];\n    foo: 'Corge';\n};\n\nexport type ModelWithNestedArrayEnumsDataFoo = 'foo' | 'bar';\n\nexport type ModelWithNestedArrayEnumsDataBar = 'baz' | 'qux';\n\nexport type ModelWithNestedArrayEnumsData = {\n    foo?: Array<ModelWithNestedArrayEnumsDataFoo>;\n    bar?: Array<ModelWithNestedArrayEnumsDataBar>;\n};\n\nexport type ModelWithNestedArrayEnums = {\n    array_strings?: Array<string>;\n    data?: ModelWithNestedArrayEnumsData;\n};\n\nexport type ModelWithNestedCompositionEnums = {\n    foo?: ModelWithNestedArrayEnumsDataFoo;\n};\n\nexport type ModelWithReadOnlyAndWriteOnly = {\n    foo: string;\n    readonly bar: string;\n};\n\nexport type ModelWithConstantSizeArray = [\n    number,\n    number\n];\n\nexport type ModelWithAnyOfConstantSizeArray = [\n    number | string,\n    number | string,\n    number | string\n];\n\nexport type ModelWithPrefixItemsConstantSizeArray = [\n    ModelWithInteger,\n    number | string,\n    string\n];\n\nexport type ModelWithAnyOfConstantSizeArrayNullable = [\n    number | null | string,\n    number | null | string,\n    number | null | string\n];\n\nexport type ModelWithAnyOfConstantSizeArrayWithNSizeAndOptions = [\n    number | Import,\n    number | Import\n];\n\nexport type ModelWithAnyOfConstantSizeArrayAndIntersect = [\n    number & string,\n    number & string\n];\n\nexport type ModelWithNumericEnumUnion = {\n    /**\n     * Период\n     */\n    value?: -10 | -1 | 0 | 1 | 3 | 6 | 12;\n};\n\n/**\n * Some description with `back ticks`\n */\nexport type ModelWithBackticksInDescription = {\n    /**\n     * The template `that` should be used for parsing and importing the contents of the CSV file.\n     *\n     * <br/><p>There is one placeholder currently supported:<ul>     <li><b>${x}</b> - refers to the n-th column in the CSV file, e.g. ${1}, ${2}, ...)</li></ul><p>Example of a correct JSON template:</p>\n     * <pre>\n     * [\n     * {\n     * \"resourceType\": \"Asset\",\n     * \"identifier\": {\n     * \"name\": \"${1}\",\n     * \"domain\": {\n     * \"name\": \"${2}\",\n     * \"community\": {\n     * \"name\": \"Some Community\"\n     * }\n     * }\n     * },\n     * \"attributes\" : {\n     * \"00000000-0000-0000-0000-000000003115\" : [ {\n     * \"value\" : \"${3}\"\n     * } ],\n     * \"00000000-0000-0000-0000-000000000222\" : [ {\n     * \"value\" : \"${4}\"\n     * } ]\n     * }\n     * }\n     * ]\n     * </pre>\n     */\n    template?: string;\n};\n\nexport type ModelWithOneOfAndProperties = (SimpleParameter | NonAsciiStringæøåÆøÅöôêÊ字符串) & {\n    baz: number | null;\n    qux: number;\n};\n\n/**\n * Model used to test deduplication strategy (unused)\n */\nexport type ParameterSimpleParameterUnused = string;\n\n/**\n * Model used to test deduplication strategy\n */\nexport type PostServiceWithEmptyTagResponse = string;\n\n/**\n * Model used to test deduplication strategy\n */\nexport type PostServiceWithEmptyTagResponse2 = string;\n\n/**\n * Model used to test deduplication strategy\n */\nexport type DeleteFooData = string;\n\n/**\n * Model used to test deduplication strategy\n */\nexport type DeleteFooData2 = string;\n\n/**\n * Model with restricted keyword name\n */\nexport type Import = string;\n\nexport type SchemaWithFormRestrictedKeys = {\n    description?: string;\n    'x-enum-descriptions'?: string;\n    'x-enum-varnames'?: string;\n    'x-enumNames'?: string;\n    title?: string;\n    object?: {\n        description?: string;\n        'x-enum-descriptions'?: string;\n        'x-enum-varnames'?: string;\n        'x-enumNames'?: string;\n        title?: string;\n    };\n    array?: Array<{\n        description?: string;\n        'x-enum-descriptions'?: string;\n        'x-enum-varnames'?: string;\n        'x-enumNames'?: string;\n        title?: string;\n    }>;\n};\n\n/**\n * This schema was giving PascalCase transformations a hard time\n */\nexport type IoK8sApimachineryPkgApisMetaV1DeleteOptions = {\n    /**\n     * Must be fulfilled before a deletion is carried out. If not possible, a 409 Conflict status will be returned.\n     */\n    preconditions?: IoK8sApimachineryPkgApisMetaV1Preconditions;\n};\n\n/**\n * This schema was giving PascalCase transformations a hard time\n */\nexport type IoK8sApimachineryPkgApisMetaV1Preconditions = {\n    /**\n     * Specifies the target ResourceVersion\n     */\n    resourceVersion?: string;\n    /**\n     * Specifies the target UID.\n     */\n    uid?: string;\n};\n\nexport type AdditionalPropertiesUnknownIssue = {\n    [key: string]: string | number;\n};\n\nexport type AdditionalPropertiesUnknownIssue2 = {\n    [key: string]: string | number;\n};\n\nexport type AdditionalPropertiesUnknownIssue3 = string & {\n    entries: {\n        [key: string]: AdditionalPropertiesUnknownIssue;\n    };\n};\n\nexport type AdditionalPropertiesIntegerIssue = {\n    value: number;\n    [key: string]: number;\n};\n\nexport type OneOfAllOfIssue = ((ConstValue | GenericSchemaDuplicateIssue1SystemBoolean) & _3eNum1Период) | GenericSchemaDuplicateIssue1SystemString;\n\nexport type GenericSchemaDuplicateIssue1SystemBoolean = {\n    item?: boolean;\n    error?: string | null;\n    readonly hasError?: boolean;\n    data?: {\n        [key: string]: never;\n    };\n};\n\nexport type GenericSchemaDuplicateIssue1SystemString = {\n    item?: string | null;\n    error?: string | null;\n    readonly hasError?: boolean;\n};\n\nexport type ExternalSharedModel = {\n    id: string;\n    name?: string;\n};\n\n/**\n * This is a model with one property containing a reference\n */\nexport type ModelWithReferenceWritable = {\n    prop?: ModelWithPropertiesWritable;\n};\n\n/**\n * This is a model with one property containing an array\n */\nexport type ModelWithArrayReadOnlyAndWriteOnlyWritable = {\n    prop?: Array<ModelWithReadOnlyAndWriteOnlyWritable>;\n    propWithFile?: Array<Blob | File>;\n    propWithNumber?: Array<number>;\n};\n\n/**\n * This is a model with one nested property\n */\nexport type ModelWithPropertiesWritable = {\n    required: string;\n    requiredAndNullable: string | null;\n    string?: string;\n    number?: number;\n    boolean?: boolean;\n    reference?: ModelWithString;\n    'property with space'?: string;\n    default?: string;\n    try?: string;\n};\n\n/**\n * This is a model that contains a some patterns\n */\nexport type ModelWithPatternWritable = {\n    key: string;\n    name: string;\n    id?: string;\n    text?: string;\n    patternWithSingleQuotes?: string;\n    patternWithNewline?: string;\n    patternWithBacktick?: string;\n    patternWithUnicode?: string;\n};\n\nexport type FileWritable = {\n    /**\n     * Mime\n     */\n    mime: string;\n};\n\nexport type ModelWithReadOnlyAndWriteOnlyWritable = {\n    foo: string;\n    baz: string;\n};\n\nexport type ModelWithAnyOfConstantSizeArrayWithNSizeAndOptionsWritable = [\n    number | Import,\n    number | Import\n];\n\nexport type AdditionalPropertiesUnknownIssueWritable = {\n    [key: string]: string | number;\n};\n\nexport type OneOfAllOfIssueWritable = ((ConstValue | GenericSchemaDuplicateIssue1SystemBoolean) & _3eNum1Период) | GenericSchemaDuplicateIssue1SystemString;\n\nexport type GenericSchemaDuplicateIssue1SystemBooleanWritable = {\n    item?: boolean;\n    error?: string | null;\n    data?: {\n        [key: string]: never;\n    };\n};\n\nexport type GenericSchemaDuplicateIssue1SystemStringWritable = {\n    item?: string | null;\n    error?: string | null;\n};\n\n/**\n * This is a reusable parameter\n */\nexport type SimpleParameter = string;\n\n/**\n * Parameter with illegal characters\n */\nexport type XFooBar = ModelWithString;\n\n/**\n * A reusable request body\n */\nexport type SimpleRequestBody = ModelWithString;\n\n/**\n * A reusable request body\n */\nexport type SimpleFormData = ModelWithString;\n\nexport type ExportData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no+tag';\n};\n\nexport type PatchApiVbyApiVersionNoTagData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no+tag';\n};\n\nexport type PatchApiVbyApiVersionNoTagResponses = {\n    /**\n     * OK\n     */\n    default: unknown;\n};\n\nexport type ImportData = {\n    body: ModelWithReadOnlyAndWriteOnlyWritable | ModelWithArrayReadOnlyAndWriteOnlyWritable;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no+tag';\n};\n\nexport type ImportResponses = {\n    /**\n     * Success\n     */\n    200: ModelFromZendesk;\n    /**\n     * Default success response\n     */\n    default: ModelWithReadOnlyAndWriteOnly;\n};\n\nexport type ImportResponse = ImportResponses[keyof ImportResponses];\n\nexport type FooWowData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no+tag';\n};\n\nexport type FooWowResponses = {\n    /**\n     * OK\n     */\n    default: unknown;\n};\n\nexport type ApiVVersionODataControllerCountData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple/$count';\n};\n\nexport type ApiVVersionODataControllerCountResponses = {\n    /**\n     * Success\n     */\n    200: ModelFromZendesk;\n};\n\nexport type ApiVVersionODataControllerCountResponse = ApiVVersionODataControllerCountResponses[keyof ApiVVersionODataControllerCountResponses];\n\nexport type GetApiVbyApiVersionSimpleOperationData = {\n    body?: never;\n    path: {\n        /**\n         * foo in method\n         */\n        foo_param: string;\n    };\n    query?: never;\n    url: '/api/v{api-version}/simple:operation';\n};\n\nexport type GetApiVbyApiVersionSimpleOperationErrors = {\n    /**\n     * Default error response\n     */\n    default: ModelWithBoolean;\n};\n\nexport type GetApiVbyApiVersionSimpleOperationError = GetApiVbyApiVersionSimpleOperationErrors[keyof GetApiVbyApiVersionSimpleOperationErrors];\n\nexport type GetApiVbyApiVersionSimpleOperationResponses = {\n    /**\n     * Response is a simple number\n     */\n    200: number;\n};\n\nexport type GetApiVbyApiVersionSimpleOperationResponse = GetApiVbyApiVersionSimpleOperationResponses[keyof GetApiVbyApiVersionSimpleOperationResponses];\n\nexport type DeleteCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type GetCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type HeadCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type OptionsCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type PatchCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type PostCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type PutCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type DeleteFooData3 = {\n    body?: never;\n    headers: {\n        /**\n         * Parameter with illegal characters\n         */\n        'x-Foo-Bar': ModelWithString;\n    };\n    path: {\n        /**\n         * foo in method\n         */\n        foo_param: string;\n        /**\n         * bar in method\n         */\n        BarParam: string;\n    };\n    query?: never;\n    url: '/api/v{api-version}/foo/{foo_param}/bar/{BarParam}';\n};\n\nexport type CallWithDescriptionsData = {\n    body?: never;\n    path?: never;\n    query?: {\n        /**\n         * Testing multiline comments in string: First line\n         * Second line\n         *\n         * Fourth line\n         */\n        parameterWithBreaks?: string;\n        /**\n         * Testing backticks in string: `backticks` and ```multiple backticks``` should work\n         */\n        parameterWithBackticks?: string;\n        /**\n         * Testing slashes in string: \\backwards\\\\\\ and /forwards/// should work\n         */\n        parameterWithSlashes?: string;\n        /**\n         * Testing expression placeholders in string: ${expression} should work\n         */\n        parameterWithExpressionPlaceholders?: string;\n        /**\n         * Testing quotes in string: 'single quote''' and \"double quotes\"\"\" should work\n         */\n        parameterWithQuotes?: string;\n        /**\n         * Testing reserved characters in string: * inline * and ** inline ** should work\n         */\n        parameterWithReservedCharacters?: string;\n    };\n    url: '/api/v{api-version}/descriptions';\n};\n\nexport type DeprecatedCallData = {\n    body?: never;\n    headers: {\n        /**\n         * This parameter is deprecated\n         *\n         * @deprecated\n         */\n        parameter: DeprecatedModel | null;\n    };\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/parameters/deprecated';\n};\n\nexport type CallWithParametersData = {\n    /**\n     * This is the parameter that goes into the body\n     */\n    body: {\n        [key: string]: unknown;\n    } | null;\n    headers: {\n        /**\n         * This is the parameter that goes into the header\n         */\n        parameterHeader: string | null;\n    };\n    path: {\n        /**\n         * This is the parameter that goes into the path\n         */\n        parameterPath: string | null;\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string | null;\n    };\n    query: {\n        foo_ref_enum?: ModelWithNestedArrayEnumsDataFoo;\n        foo_all_of_enum: ModelWithNestedArrayEnumsDataFoo;\n        /**\n         * This is the parameter that goes into the query params\n         */\n        cursor: string | null;\n    };\n    url: '/api/v{api-version}/parameters/{parameterPath}';\n};\n\nexport type CallWithWeirdParameterNamesData = {\n    /**\n     * This is the parameter that goes into the body\n     */\n    body: ModelWithString | null;\n    headers: {\n        /**\n         * This is the parameter that goes into the request header\n         */\n        'parameter.header': string | null;\n    };\n    path: {\n        /**\n         * This is the parameter that goes into the path\n         */\n        'parameter.path.1'?: string;\n        /**\n         * This is the parameter that goes into the path\n         */\n        'parameter-path-2'?: string;\n        /**\n         * This is the parameter that goes into the path\n         */\n        'PARAMETER-PATH-3'?: string;\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string | null;\n    };\n    query: {\n        /**\n         * This is the parameter with a reserved keyword\n         */\n        default?: string;\n        /**\n         * This is the parameter that goes into the request query params\n         */\n        'parameter-query': string | null;\n    };\n    url: '/api/v{api-version}/parameters/{parameter.path.1}/{parameter-path-2}/{PARAMETER-PATH-3}';\n};\n\nexport type GetCallWithOptionalParamData = {\n    /**\n     * This is a required parameter\n     */\n    body: ModelWithOneOfEnum;\n    path?: never;\n    query?: {\n        /**\n         * This is an optional parameter\n         */\n        page?: number;\n    };\n    url: '/api/v{api-version}/parameters';\n};\n\nexport type PostCallWithOptionalParamData = {\n    /**\n     * This is an optional parameter\n     */\n    body?: {\n        offset?: number | null;\n    };\n    path?: never;\n    query: {\n        /**\n         * This is a required parameter\n         */\n        parameter: Pageable;\n    };\n    url: '/api/v{api-version}/parameters';\n};\n\nexport type PostCallWithOptionalParamResponses = {\n    /**\n     * Response is a simple number\n     */\n    200: number;\n    /**\n     * Success\n     */\n    204: void;\n};\n\nexport type PostCallWithOptionalParamResponse = PostCallWithOptionalParamResponses[keyof PostCallWithOptionalParamResponses];\n\nexport type PostApiVbyApiVersionRequestBodyData = {\n    /**\n     * A reusable request body\n     */\n    body?: SimpleRequestBody;\n    path?: never;\n    query?: {\n        /**\n         * This is a reusable parameter\n         */\n        parameter?: string;\n    };\n    url: '/api/v{api-version}/requestBody';\n};\n\nexport type PostApiVbyApiVersionFormDataData = {\n    /**\n     * A reusable request body\n     */\n    body?: SimpleFormData;\n    path?: never;\n    query?: {\n        /**\n         * This is a reusable parameter\n         */\n        parameter?: string;\n    };\n    url: '/api/v{api-version}/formData';\n};\n\nexport type CallWithDefaultParametersData = {\n    body?: never;\n    path?: never;\n    query?: {\n        /**\n         * This is a simple string with default value\n         */\n        parameterString?: string | null;\n        /**\n         * This is a simple number with default value\n         */\n        parameterNumber?: number | null;\n        /**\n         * This is a simple boolean with default value\n         */\n        parameterBoolean?: boolean | null;\n        /**\n         * This is a simple enum with default value\n         */\n        parameterEnum?: 'Success' | 'Warning' | 'Error';\n        /**\n         * This is a simple model with default value\n         */\n        parameterModel?: ModelWithString | null;\n    };\n    url: '/api/v{api-version}/defaults';\n};\n\nexport type CallWithDefaultOptionalParametersData = {\n    body?: never;\n    path?: never;\n    query?: {\n        /**\n         * This is a simple string that is optional with default value\n         */\n        parameterString?: string;\n        /**\n         * This is a simple number that is optional with default value\n         */\n        parameterNumber?: number;\n        /**\n         * This is a simple boolean that is optional with default value\n         */\n        parameterBoolean?: boolean;\n        /**\n         * This is a simple enum that is optional with default value\n         */\n        parameterEnum?: 'Success' | 'Warning' | 'Error';\n        /**\n         * This is a simple model that is optional with default value\n         */\n        parameterModel?: ModelWithString;\n    };\n    url: '/api/v{api-version}/defaults';\n};\n\nexport type CallToTestOrderOfParamsData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * This is a optional string with default\n         */\n        parameterOptionalStringWithDefault?: string;\n        /**\n         * This is a optional string with empty default\n         */\n        parameterOptionalStringWithEmptyDefault?: string;\n        /**\n         * This is a optional string with no default\n         */\n        parameterOptionalStringWithNoDefault?: string;\n        /**\n         * This is a string with default\n         */\n        parameterStringWithDefault: string;\n        /**\n         * This is a string with empty default\n         */\n        parameterStringWithEmptyDefault: string;\n        /**\n         * This is a string with no default\n         */\n        parameterStringWithNoDefault: string;\n        /**\n         * This is a string that can be null with no default\n         */\n        parameterStringNullableWithNoDefault?: string | null;\n        /**\n         * This is a string that can be null with default\n         */\n        parameterStringNullableWithDefault?: string | null;\n    };\n    url: '/api/v{api-version}/defaults';\n};\n\nexport type DuplicateNameData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/duplicate';\n};\n\nexport type DuplicateName2Data = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/duplicate';\n};\n\nexport type DuplicateName3Data = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/duplicate';\n};\n\nexport type DuplicateName4Data = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/duplicate';\n};\n\nexport type CallWithNoContentResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no-content';\n};\n\nexport type CallWithNoContentResponseResponses = {\n    /**\n     * Success\n     */\n    204: void;\n};\n\nexport type CallWithNoContentResponseResponse = CallWithNoContentResponseResponses[keyof CallWithNoContentResponseResponses];\n\nexport type CallWithResponseAndNoContentResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multiple-tags/response-and-no-content';\n};\n\nexport type CallWithResponseAndNoContentResponseResponses = {\n    /**\n     * Response is a simple number\n     */\n    200: number;\n    /**\n     * Success\n     */\n    204: void;\n};\n\nexport type CallWithResponseAndNoContentResponseResponse = CallWithResponseAndNoContentResponseResponses[keyof CallWithResponseAndNoContentResponseResponses];\n\nexport type DummyAData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multiple-tags/a';\n};\n\nexport type DummyAResponses = {\n    200: _400;\n};\n\nexport type DummyAResponse = DummyAResponses[keyof DummyAResponses];\n\nexport type DummyBData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multiple-tags/b';\n};\n\nexport type DummyBResponses = {\n    /**\n     * Success\n     */\n    204: void;\n};\n\nexport type DummyBResponse = DummyBResponses[keyof DummyBResponses];\n\nexport type CallWithResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/response';\n};\n\nexport type CallWithResponseResponses = {\n    default: Import;\n};\n\nexport type CallWithResponseResponse = CallWithResponseResponses[keyof CallWithResponseResponses];\n\nexport type CallWithDuplicateResponsesData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/response';\n};\n\nexport type CallWithDuplicateResponsesErrors = {\n    /**\n     * Message for 500 error\n     */\n    500: ModelWithStringError;\n    /**\n     * Message for 501 error\n     */\n    501: ModelWithStringError;\n    /**\n     * Message for 502 error\n     */\n    502: ModelWithStringError;\n    /**\n     * Message for 4XX errors\n     */\n    '4XX': DictionaryWithArray;\n    /**\n     * Default error response\n     */\n    default: ModelWithBoolean;\n};\n\nexport type CallWithDuplicateResponsesError = CallWithDuplicateResponsesErrors[keyof CallWithDuplicateResponsesErrors];\n\nexport type CallWithDuplicateResponsesResponses = {\n    /**\n     * Message for 200 response\n     */\n    200: ModelWithBoolean & ModelWithInteger;\n    /**\n     * Message for 201 response\n     */\n    201: ModelWithString;\n    /**\n     * Message for 202 response\n     */\n    202: ModelWithString;\n};\n\nexport type CallWithDuplicateResponsesResponse = CallWithDuplicateResponsesResponses[keyof CallWithDuplicateResponsesResponses];\n\nexport type CallWithResponsesData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/response';\n};\n\nexport type CallWithResponsesErrors = {\n    /**\n     * Message for 500 error\n     */\n    500: ModelWithStringError;\n    /**\n     * Message for 501 error\n     */\n    501: ModelWithStringError;\n    /**\n     * Message for 502 error\n     */\n    502: ModelWithStringError;\n    /**\n     * Message for default response\n     */\n    default: ModelWithStringError;\n};\n\nexport type CallWithResponsesError = CallWithResponsesErrors[keyof CallWithResponsesErrors];\n\nexport type CallWithResponsesResponses = {\n    /**\n     * Message for 200 response\n     */\n    200: {\n        readonly '@namespace.string'?: string;\n        readonly '@namespace.integer'?: number;\n        readonly value?: Array<ModelWithString>;\n    };\n    /**\n     * Message for 201 response\n     */\n    201: ModelThatExtends;\n    /**\n     * Message for 202 response\n     */\n    202: ModelThatExtendsExtends;\n};\n\nexport type CallWithResponsesResponse = CallWithResponsesResponses[keyof CallWithResponsesResponses];\n\nexport type CollectionFormatData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * This is an array parameter that is sent as csv format (comma-separated values)\n         */\n        parameterArrayCSV: Array<string> | null;\n        /**\n         * This is an array parameter that is sent as ssv format (space-separated values)\n         */\n        parameterArraySSV: Array<string> | null;\n        /**\n         * This is an array parameter that is sent as tsv format (tab-separated values)\n         */\n        parameterArrayTSV: Array<string> | null;\n        /**\n         * This is an array parameter that is sent as pipes format (pipe-separated values)\n         */\n        parameterArrayPipes: Array<string> | null;\n        /**\n         * This is an array parameter that is sent as multi format (multiple parameter instances)\n         */\n        parameterArrayMulti: Array<string> | null;\n    };\n    url: '/api/v{api-version}/collectionFormat';\n};\n\nexport type TypesData = {\n    body?: never;\n    path?: {\n        /**\n         * This is a number parameter\n         */\n        id?: number;\n    };\n    query: {\n        /**\n         * This is a number parameter\n         */\n        parameterNumber: number;\n        /**\n         * This is a string parameter\n         */\n        parameterString: string | null;\n        /**\n         * This is a boolean parameter\n         */\n        parameterBoolean: boolean | null;\n        /**\n         * This is an object parameter\n         */\n        parameterObject: {\n            [key: string]: unknown;\n        } | null;\n        /**\n         * This is an array parameter\n         */\n        parameterArray: Array<string> | null;\n        /**\n         * This is a dictionary parameter\n         */\n        parameterDictionary: {\n            [key: string]: unknown;\n        } | null;\n        /**\n         * This is an enum parameter\n         */\n        parameterEnum: 'Success' | 'Warning' | 'Error' | null;\n    };\n    url: '/api/v{api-version}/types';\n};\n\nexport type TypesResponses = {\n    /**\n     * Response is a simple number\n     */\n    200: number;\n    /**\n     * Response is a simple string\n     */\n    201: string;\n    /**\n     * Response is a simple boolean\n     */\n    202: boolean;\n    /**\n     * Response is a simple object\n     */\n    203: {\n        [key: string]: unknown;\n    };\n};\n\nexport type TypesResponse = TypesResponses[keyof TypesResponses];\n\nexport type UploadFileData = {\n    body: Blob | File;\n    path: {\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string | null;\n    };\n    query?: never;\n    url: '/api/v{api-version}/upload';\n};\n\nexport type UploadFileResponses = {\n    200: boolean;\n};\n\nexport type UploadFileResponse = UploadFileResponses[keyof UploadFileResponses];\n\nexport type FileResponseData = {\n    body?: never;\n    path: {\n        id: string;\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string;\n    };\n    query?: never;\n    url: '/api/v{api-version}/file/{id}';\n};\n\nexport type FileResponseResponses = {\n    /**\n     * Success\n     */\n    200: Blob | File;\n};\n\nexport type FileResponseResponse = FileResponseResponses[keyof FileResponseResponses];\n\nexport type ComplexTypesData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * Parameter containing object\n         */\n        parameterObject: {\n            first?: {\n                second?: {\n                    third?: string;\n                };\n            };\n        };\n        /**\n         * Parameter containing reference\n         */\n        parameterReference: ModelWithString;\n    };\n    url: '/api/v{api-version}/complex';\n};\n\nexport type ComplexTypesErrors = {\n    /**\n     * 400 `server` error\n     */\n    400: unknown;\n    /**\n     * 500 server error\n     */\n    500: unknown;\n};\n\nexport type ComplexTypesResponses = {\n    /**\n     * Successful response\n     */\n    200: Array<ModelWithString>;\n};\n\nexport type ComplexTypesResponse = ComplexTypesResponses[keyof ComplexTypesResponses];\n\nexport type MultipartResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multipart';\n};\n\nexport type MultipartResponseResponses = {\n    /**\n     * OK\n     */\n    200: {\n        file?: Blob | File;\n        metadata?: {\n            foo?: string;\n            bar?: string;\n        };\n    };\n};\n\nexport type MultipartResponseResponse = MultipartResponseResponses[keyof MultipartResponseResponses];\n\nexport type MultipartRequestData = {\n    body?: {\n        content?: Blob | File;\n        data?: ModelWithString | null;\n    };\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multipart';\n};\n\nexport type ComplexParamsData = {\n    body?: {\n        readonly key: string | null;\n        name: string | null;\n        enabled?: boolean;\n        type: 'Monkey' | 'Horse' | 'Bird';\n        listOfModels?: Array<ModelWithString> | null;\n        listOfStrings?: Array<string> | null;\n        parameters: ModelWithString | ModelWithEnum | ModelWithArray | ModelWithDictionary;\n        readonly user?: {\n            readonly id?: number;\n            readonly name?: string | null;\n        };\n    };\n    path: {\n        id: number;\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string;\n    };\n    query?: never;\n    url: '/api/v{api-version}/complex/{id}';\n};\n\nexport type ComplexParamsResponses = {\n    /**\n     * Success\n     */\n    200: ModelWithString;\n};\n\nexport type ComplexParamsResponse = ComplexParamsResponses[keyof ComplexParamsResponses];\n\nexport type CallWithResultFromHeaderData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/header';\n};\n\nexport type CallWithResultFromHeaderErrors = {\n    /**\n     * 400 server error\n     */\n    400: unknown;\n    /**\n     * 500 server error\n     */\n    500: unknown;\n};\n\nexport type CallWithResultFromHeaderResponses = {\n    /**\n     * Successful response\n     */\n    200: unknown;\n};\n\nexport type TestErrorCodeData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * Status code to return\n         */\n        status: number;\n    };\n    url: '/api/v{api-version}/error';\n};\n\nexport type TestErrorCodeErrors = {\n    /**\n     * Custom message: Internal Server Error\n     */\n    500: unknown;\n    /**\n     * Custom message: Not Implemented\n     */\n    501: unknown;\n    /**\n     * Custom message: Bad Gateway\n     */\n    502: unknown;\n    /**\n     * Custom message: Service Unavailable\n     */\n    503: unknown;\n};\n\nexport type TestErrorCodeResponses = {\n    /**\n     * Custom message: Successful response\n     */\n    200: unknown;\n};\n\nexport type NonAsciiæøåÆøÅöôêÊ字符串Data = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * Dummy input param\n         */\n        nonAsciiParamæøåÆØÅöôêÊ: number;\n    };\n    url: '/api/v{api-version}/non-ascii-æøåÆØÅöôêÊ字符串';\n};\n\nexport type NonAsciiæøåÆøÅöôêÊ字符串Responses = {\n    /**\n     * Successful response\n     */\n    200: Array<NonAsciiStringæøåÆøÅöôêÊ字符串>;\n};\n\nexport type NonAsciiæøåÆøÅöôêÊ字符串Response = NonAsciiæøåÆøÅöôêÊ字符串Responses[keyof NonAsciiæøåÆøÅöôêÊ字符串Responses];\n\nexport type PutWithFormUrlEncodedData = {\n    body: ArrayWithStrings;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/non-ascii-æøåÆØÅöôêÊ字符串';\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-next/import-file-extension-ts/client/client.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport { createSseClient } from '../core/serverSentEvents.gen.ts';\nimport type { HttpMethod } from '../core/types.gen.ts';\nimport { getValidRequestBody } from '../core/utils.gen.ts';\nimport type { Client, Config, RequestOptions, ResolvedRequestOptions } from './types.gen.ts';\nimport {\n  buildUrl,\n  createConfig,\n  createInterceptors,\n  getParseAs,\n  mergeConfigs,\n  mergeHeaders,\n  setAuthParams,\n} from './utils.gen.ts';\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<Response, unknown, ResolvedRequestOptions>();\n\n  const beforeRequest = async (options: RequestOptions) => {\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 url = buildUrl(opts);\n\n    return { opts, url };\n  };\n\n  // @ts-expect-error\n  const request: Client['request'] = async (options) => {\n    // @ts-expect-error\n    const { opts, url } = await beforeRequest(options);\n\n    for (const fn of interceptors.request.fns) {\n      if (fn) {\n        await fn(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    const requestInit: ReqInit = {\n      ...opts,\n      body: getValidRequestBody(opts),\n    };\n\n    let response = await _fetch(url, requestInit);\n\n    for (const fn of interceptors.response.fns) {\n      if (fn) {\n        response = await fn(response, opts);\n      }\n    }\n\n    const result = {\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 {\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 {\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 {\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, opts)) as string;\n      }\n    }\n\n    finalError = finalError || ({} as string);\n\n    if (opts.throwOnError) {\n      throw finalError;\n    }\n\n    return {\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        const requestInit = {\n          ...init,\n          method: init.method as Config['method'],\n          url,\n        };\n        for (const fn of interceptors.request.fns) {\n          if (fn) {\n            await fn(requestInit);\n            request = new Request(requestInit.url, requestInit);\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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-next/import-file-extension-ts/client/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type { Auth } from '../core/auth.gen.ts';\nexport type { QuerySerializerOptions } from '../core/bodySerializer.gen.ts';\nexport {\n  formDataBodySerializer,\n  jsonBodySerializer,\n  urlSearchParamsBodySerializer,\n} from '../core/bodySerializer.gen.ts';\nexport { buildClientParams } from '../core/params.gen.ts';\nexport { serializeQueryKeyValue } from '../core/queryKeySerializer.gen.ts';\nexport { createClient } from './client.gen.ts';\nexport type {\n  Client,\n  ClientOptions,\n  Config,\n  CreateClientConfig,\n  Options,\n  RequestOptions,\n  RequestResult,\n  TDataShape,\n} from './types.gen.ts';\nexport { createConfig } from './utils.gen.ts';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-next/import-file-extension-ts/client/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { Auth } from '../core/auth.gen.ts';\nimport type {\n  ServerSentEventsOptions,\n  ServerSentEventsResult,\n} from '../core/serverSentEvents.gen.ts';\nimport type { Client as CoreClient, Config as CoreConfig } from '../core/types.gen.ts';\nimport type { Middleware } from './utils.gen.ts';\n\nexport interface Config<T extends ClientOptions = ClientOptions>\n  extends Omit<RequestInit, 'body' | 'headers' | 'method'>, CoreConfig {\n  /**\n   * Base URL for all requests made by this client.\n   */\n  baseUrl?: T['baseUrl'];\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   * Return the response data parsed in a specified format. By default, `auto`\n   * will infer the appropriate method from the `Content-Type` response header.\n   * You can override this behavior with any of the {@link Body} methods.\n   * Select `stream` if you don't want to parse response data at all.\n   *\n   * @default 'auto'\n   */\n  parseAs?: 'arrayBuffer' | 'auto' | 'blob' | 'formData' | 'json' | 'stream' | 'text';\n  /**\n   * Throw an error instead of returning it in the response?\n   *\n   * @default false\n   */\n  throwOnError?: T['throwOnError'];\n}\n\nexport interface RequestOptions<\n  TData = unknown,\n  ThrowOnError extends boolean = boolean,\n  Url extends string = string,\n>\n  extends\n    Config<{\n      throwOnError: ThrowOnError;\n    }>,\n    Pick<\n      ServerSentEventsOptions<TData>,\n      | 'onRequest'\n      | 'onSseError'\n      | 'onSseEvent'\n      | 'sseDefaultRetryDelay'\n      | 'sseMaxRetryAttempts'\n      | 'sseMaxRetryDelay'\n    > {\n  /**\n   * Any body that you want to add to your request.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/fetch#body}\n   */\n  body?: unknown;\n  path?: Record<string, unknown>;\n  query?: Record<string, unknown>;\n  /**\n   * Security mechanism(s) to use for the request.\n   */\n  security?: ReadonlyArray<Auth>;\n  url: Url;\n}\n\nexport interface ResolvedRequestOptions<\n  ThrowOnError extends boolean = boolean,\n  Url extends string = string,\n> extends RequestOptions<unknown, ThrowOnError, Url> {\n  serializedBody?: string;\n}\n\nexport type RequestResult<\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = boolean,\n> = ThrowOnError extends true\n  ? Promise<{\n      data: TData extends Record<string, unknown> ? TData[keyof TData] : TData;\n      response: Response;\n    }>\n  : Promise<\n      (\n        | {\n            data: TData extends Record<string, unknown> ? TData[keyof TData] : TData;\n            error: undefined;\n          }\n        | {\n            data: undefined;\n            error: TError extends Record<string, unknown> ? TError[keyof TError] : TError;\n          }\n      ) & {\n        response: Response;\n      }\n    >;\n\nexport interface ClientOptions {\n  baseUrl?: string;\n  throwOnError?: boolean;\n}\n\ntype MethodFn = <TData = unknown, TError = unknown, ThrowOnError extends boolean = false>(\n  options: Omit<RequestOptions<TData, ThrowOnError>, 'method'>,\n) => RequestResult<TData, TError, ThrowOnError>;\n\ntype SseFn = <TData = unknown, TError = unknown, ThrowOnError extends boolean = false>(\n  options: Omit<RequestOptions<TData, ThrowOnError>, 'method'>,\n) => Promise<ServerSentEventsResult<TData, TError>>;\n\ntype RequestFn = <TData = unknown, TError = unknown, ThrowOnError extends boolean = false>(\n  options: Omit<RequestOptions<TData, ThrowOnError>, 'method'> &\n    Pick<Required<RequestOptions<TData, ThrowOnError>>, 'method'>,\n) => RequestResult<TData, TError, ThrowOnError>;\n\ntype BuildUrlFn = <\n  TData extends {\n    body?: unknown;\n    path?: Record<string, unknown>;\n    query?: Record<string, unknown>;\n    url: string;\n  },\n>(\n  options: TData & Options<TData>,\n) => string;\n\nexport type Client = CoreClient<RequestFn, Config, MethodFn, BuildUrlFn, SseFn> & {\n  interceptors: Middleware<Response, unknown, ResolvedRequestOptions>;\n};\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 = ClientOptions> = (\n  override?: Config<ClientOptions & T>,\n) => Config<Required<ClientOptions> & T>;\n\nexport interface TDataShape {\n  body?: unknown;\n  headers?: unknown;\n  path?: unknown;\n  query?: unknown;\n  url: string;\n}\n\ntype OmitKeys<T, K> = Pick<T, Exclude<keyof T, K>>;\n\nexport type Options<\n  TData extends TDataShape = TDataShape,\n  ThrowOnError extends boolean = boolean,\n  TResponse = unknown,\n> = OmitKeys<RequestOptions<TResponse, ThrowOnError>, 'body' | 'path' | 'query' | 'url'> &\n  ([TData] extends [never] ? unknown : Omit<TData, 'url'>);\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-next/import-file-extension-ts/client/utils.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport { getAuthToken } from '../core/auth.gen.ts';\nimport type {\n  QuerySerializer,\n  QuerySerializerOptions,\n} from '../core/bodySerializer.gen.ts';\nimport { jsonBodySerializer } from '../core/bodySerializer.gen.ts';\nimport {\n  serializeArrayParam,\n  serializeObjectParam,\n  serializePrimitiveParam,\n} from '../core/pathSerializer.gen.ts';\nimport type { Client, ClientOptions, Config, RequestOptions } from './types.gen.ts';\n\ninterface PathSerializer {\n  path: Record<string, unknown>;\n  url: string;\n}\n\nconst PATH_PARAM_RE = /\\{[^{}]+\\}/g;\n\ntype ArrayStyle = 'form' | 'spaceDelimited' | 'pipeDelimited';\ntype MatrixStyle = 'label' | 'matrix' | 'simple';\ntype ArraySeparatorStyle = ArrayStyle | MatrixStyle;\n\nconst 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 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    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  const url = 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  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 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 || typeof header !== 'object') {\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, Options> = (\n  error: Err,\n  response: Res,\n  options: Options,\n) => Err | Promise<Err>;\n\ntype ReqInterceptor<Options> = (options: Options) => void | Promise<void>;\n\ntype ResInterceptor<Res, Options> = (response: Res, options: Options) => 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<Res, Err, Options> {\n  error: Interceptors<ErrInterceptor<Err, Res, Options>>;\n  request: Interceptors<ReqInterceptor<Options>>;\n  response: Interceptors<ResInterceptor<Res, Options>>;\n}\n\nexport const createInterceptors = <Res, Err, Options>(): Middleware<Res, Err, Options> => ({\n  error: new Interceptors<ErrInterceptor<Err, Res, Options>>(),\n  request: new Interceptors<ReqInterceptor<Options>>(),\n  response: new Interceptors<ResInterceptor<Res, 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-next/import-file-extension-ts/client.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport { type ClientOptions, type Config, createClient, createConfig } from './client/index.ts';\nimport type { ClientOptions as ClientOptions2 } from './types.gen.ts';\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: 'http://localhost:3000/base' }));\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-next/import-file-extension-ts/core/auth.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-next/import-file-extension-ts/core/bodySerializer.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { ArrayStyle, ObjectStyle, SerializerOptions } from './pathSerializer.gen.ts';\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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-next/import-file-extension-ts/core/params.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-next/import-file-extension-ts/core/pathSerializer.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-next/import-file-extension-ts/core/queryKeySerializer.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\n/**\n * JSON-friendly union that mirrors what Pinia Colada can hash.\n */\nexport type JsonValue =\n  | null\n  | string\n  | number\n  | boolean\n  | JsonValue[]\n  | { [key: string]: JsonValue };\n\n/**\n * Replacer that converts non-JSON values (bigint, Date, etc.) to safe substitutes.\n */\nexport const queryKeyJsonReplacer = (_key: string, value: unknown) => {\n  if (value === undefined || typeof value === 'function' || typeof value === 'symbol') {\n    return undefined;\n  }\n  if (typeof value === 'bigint') {\n    return value.toString();\n  }\n  if (value instanceof Date) {\n    return value.toISOString();\n  }\n  return value;\n};\n\n/**\n * Safely stringifies a value and parses it back into a JsonValue.\n */\nexport const stringifyToJsonValue = (input: unknown): JsonValue | undefined => {\n  try {\n    const json = JSON.stringify(input, queryKeyJsonReplacer);\n    if (json === undefined) {\n      return undefined;\n    }\n    return JSON.parse(json) as JsonValue;\n  } catch {\n    return undefined;\n  }\n};\n\n/**\n * Detects plain objects (including objects with a null prototype).\n */\nconst isPlainObject = (value: unknown): value is Record<string, unknown> => {\n  if (value === null || typeof value !== 'object') {\n    return false;\n  }\n  const prototype = Object.getPrototypeOf(value as object);\n  return prototype === Object.prototype || prototype === null;\n};\n\n/**\n * Turns URLSearchParams into a sorted JSON object for deterministic keys.\n */\nconst serializeSearchParams = (params: URLSearchParams): JsonValue => {\n  const entries = Array.from(params.entries()).sort(([a], [b]) => a.localeCompare(b));\n  const result: Record<string, JsonValue> = {};\n\n  for (const [key, value] of entries) {\n    const existing = result[key];\n    if (existing === undefined) {\n      result[key] = value;\n      continue;\n    }\n\n    if (Array.isArray(existing)) {\n      (existing as string[]).push(value);\n    } else {\n      result[key] = [existing, value];\n    }\n  }\n\n  return result;\n};\n\n/**\n * Normalizes any accepted value into a JSON-friendly shape for query keys.\n */\nexport const serializeQueryKeyValue = (value: unknown): JsonValue | undefined => {\n  if (value === null) {\n    return null;\n  }\n\n  if (typeof value === 'string' || typeof value === 'number' || typeof value === 'boolean') {\n    return value;\n  }\n\n  if (value === undefined || typeof value === 'function' || typeof value === 'symbol') {\n    return undefined;\n  }\n\n  if (typeof value === 'bigint') {\n    return value.toString();\n  }\n\n  if (value instanceof Date) {\n    return value.toISOString();\n  }\n\n  if (Array.isArray(value)) {\n    return stringifyToJsonValue(value);\n  }\n\n  if (typeof URLSearchParams !== 'undefined' && value instanceof URLSearchParams) {\n    return serializeSearchParams(value);\n  }\n\n  if (isPlainObject(value)) {\n    return stringifyToJsonValue(value);\n  }\n\n  return undefined;\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-next/import-file-extension-ts/core/serverSentEvents.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { Config } from './types.gen.ts';\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 const 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            // Normalize line endings: CRLF -> LF, then CR -> LF\n            buffer = buffer.replace(/\\r\\n/g, '\\n').replace(/\\r/g, '\\n');\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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-next/import-file-extension-ts/core/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { Auth, AuthToken } from './auth.gen.ts';\nimport type { BodySerializer, QuerySerializer, QuerySerializerOptions } from './bodySerializer.gen.ts';\n\nexport type HttpMethod =\n  | 'connect'\n  | 'delete'\n  | 'get'\n  | 'head'\n  | 'options'\n  | 'patch'\n  | 'post'\n  | 'put'\n  | 'trace';\n\nexport type Client<\n  RequestFn = never,\n  Config = unknown,\n  MethodFn = never,\n  BuildUrlFn = never,\n  SseFn = never,\n> = {\n  /**\n   * Returns the final request URL.\n   */\n  buildUrl: BuildUrlFn;\n  getConfig: () => Config;\n  request: RequestFn;\n  setConfig: (config: Config) => Config;\n} & {\n  [K in HttpMethod]: MethodFn;\n} & ([SseFn] extends [never] ? { sse?: never } : { sse: { [K in HttpMethod]: SseFn } });\n\nexport interface Config {\n  /**\n   * Auth token or a function returning auth token. The resolved value will be\n   * added to the request payload as defined by its `security` array.\n   */\n  auth?: ((auth: Auth) => Promise<AuthToken> | AuthToken) | AuthToken;\n  /**\n   * A function for serializing request body parameter. By default,\n   * {@link JSON.stringify()} will be used.\n   */\n  bodySerializer?: BodySerializer | null;\n  /**\n   * An object containing any HTTP headers that you want to pre-populate your\n   * `Headers` object with.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/Headers/Headers#init See more}\n   */\n  headers?:\n    | RequestInit['headers']\n    | Record<\n        string,\n        string | number | boolean | (string | number | boolean)[] | null | undefined | unknown\n      >;\n  /**\n   * The request method.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/fetch#method See more}\n   */\n  method?: Uppercase<HttpMethod>;\n  /**\n   * A function for serializing request query parameters. By default, arrays\n   * will be exploded in form style, objects will be exploded in deepObject\n   * style, and reserved characters are percent-encoded.\n   *\n   * This method will have no effect if the native `paramsSerializer()` Axios\n   * API function is used.\n   *\n   * {@link https://swagger.io/docs/specification/serialization/#query View examples}\n   */\n  querySerializer?: QuerySerializer | QuerySerializerOptions;\n  /**\n   * A function validating request data. This is useful if you want to ensure\n   * the request conforms to the desired shape, so it can be safely sent to\n   * the server.\n   */\n  requestValidator?: (data: unknown) => Promise<unknown>;\n  /**\n   * A function transforming response data before it's returned. This is useful\n   * for post-processing data, e.g. converting ISO strings into Date objects.\n   */\n  responseTransformer?: (data: unknown) => Promise<unknown>;\n  /**\n   * A function validating response data. This is useful if you want to ensure\n   * the response conforms to the desired shape, so it can be safely passed to\n   * the transformers and returned to the user.\n   */\n  responseValidator?: (data: unknown) => Promise<unknown>;\n}\n\ntype IsExactlyNeverOrNeverUndefined<T> = [T] extends [never]\n  ? true\n  : [T] extends [never | undefined]\n    ? [undefined] extends [T]\n      ? false\n      : true\n    : false;\n\nexport type OmitNever<T extends Record<string, unknown>> = {\n  [K in keyof T as IsExactlyNeverOrNeverUndefined<T[K]> extends true ? never : K]: T[K];\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-next/import-file-extension-ts/core/utils.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { BodySerializer, QuerySerializer } from './bodySerializer.gen.ts';\nimport {\n  type ArraySeparatorStyle,\n  serializeArrayParam,\n  serializeObjectParam,\n  serializePrimitiveParam,\n} from './pathSerializer.gen.ts';\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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-next/import-file-extension-ts/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport { apiVVersionODataControllerCount, callToTestOrderOfParams, callWithDefaultOptionalParameters, callWithDefaultParameters, callWithDescriptions, callWithDuplicateResponses, callWithNoContentResponse, callWithParameters, callWithResponse, callWithResponseAndNoContentResponse, callWithResponses, callWithResultFromHeader, callWithWeirdParameterNames, collectionFormat, complexParams, complexTypes, deleteCallWithoutParametersAndResponse, deleteFoo, deprecatedCall, dummyA, dummyB, duplicateName, duplicateName2, duplicateName3, duplicateName4, export_, fileResponse, fooWow, getApiVbyApiVersionSimpleOperation, getCallWithOptionalParam, getCallWithoutParametersAndResponse, headCallWithoutParametersAndResponse, import_, multipartRequest, multipartResponse, nonAsciiæøåÆøÅöôêÊ字符串, type Options, optionsCallWithoutParametersAndResponse, patchApiVbyApiVersionNoTag, patchCallWithoutParametersAndResponse, postApiVbyApiVersionFormData, postApiVbyApiVersionRequestBody, postCallWithOptionalParam, postCallWithoutParametersAndResponse, putCallWithoutParametersAndResponse, putWithFormUrlEncoded, testErrorCode, types, uploadFile } from './sdk.gen.ts';\nexport type { _3eNum1Период, _400, AdditionalPropertiesIntegerIssue, AdditionalPropertiesUnknownIssue, AdditionalPropertiesUnknownIssue2, AdditionalPropertiesUnknownIssue3, AdditionalPropertiesUnknownIssueWritable, AnyOfAnyAndNull, AnyOfArrays, ApiVVersionODataControllerCountData, ApiVVersionODataControllerCountResponse, ApiVVersionODataControllerCountResponses, ArrayWithAnyOfProperties, ArrayWithArray, ArrayWithBooleans, ArrayWithNumbers, ArrayWithProperties, ArrayWithReferences, ArrayWithStrings, CallToTestOrderOfParamsData, CallWithDefaultOptionalParametersData, CallWithDefaultParametersData, CallWithDescriptionsData, CallWithDuplicateResponsesData, CallWithDuplicateResponsesError, CallWithDuplicateResponsesErrors, CallWithDuplicateResponsesResponse, CallWithDuplicateResponsesResponses, CallWithNoContentResponseData, CallWithNoContentResponseResponse, CallWithNoContentResponseResponses, CallWithParametersData, CallWithResponseAndNoContentResponseData, CallWithResponseAndNoContentResponseResponse, CallWithResponseAndNoContentResponseResponses, CallWithResponseData, CallWithResponseResponse, CallWithResponseResponses, CallWithResponsesData, CallWithResponsesError, CallWithResponsesErrors, CallWithResponsesResponse, CallWithResponsesResponses, CallWithResultFromHeaderData, CallWithResultFromHeaderErrors, CallWithResultFromHeaderResponses, CallWithWeirdParameterNamesData, CamelCaseCommentWithBreaks, CharactersInDescription, ClientOptions, CollectionFormatData, CommentWithBackticks, CommentWithBackticksAndQuotes, CommentWithBreaks, CommentWithExpressionPlaceholders, CommentWithQuotes, CommentWithReservedCharacters, CommentWithSlashes, ComplexParamsData, ComplexParamsResponse, ComplexParamsResponses, ComplexTypesData, ComplexTypesErrors, ComplexTypesResponse, ComplexTypesResponses, CompositionBaseModel, CompositionExtendedModel, CompositionWithAllOfAndNullable, CompositionWithAnyOf, CompositionWithAnyOfAndNullable, CompositionWithAnyOfAnonymous, CompositionWithNestedAnyAndTypeNull, CompositionWithNestedAnyOfAndNull, CompositionWithOneOf, CompositionWithOneOfAndComplexArrayDictionary, CompositionWithOneOfAndNullable, CompositionWithOneOfAndProperties, CompositionWithOneOfAndSimpleArrayDictionary, CompositionWithOneOfAndSimpleDictionary, CompositionWithOneOfAnonymous, CompositionWithOneOfDiscriminator, ConstValue, Default, DeleteCallWithoutParametersAndResponseData, DeleteFooData, DeleteFooData2, DeleteFooData3, DeprecatedCallData, DeprecatedModel, DictionaryWithArray, DictionaryWithDictionary, DictionaryWithProperties, DictionaryWithPropertiesAndAdditionalProperties, DictionaryWithReference, DictionaryWithString, DummyAData, DummyAResponse, DummyAResponses, DummyBData, DummyBResponse, DummyBResponses, DuplicateName2Data, DuplicateName3Data, DuplicateName4Data, DuplicateNameData, EnumFromDescription, EnumWithExtensions, EnumWithNumbers, EnumWithReplacedCharacters, EnumWithStrings, EnumWithXEnumNames, ExportData, ExternalRefA, ExternalRefB, ExternalSharedModel, File, FileResponseData, FileResponseResponse, FileResponseResponses, FileWritable, FooWowData, FooWowResponses, FreeFormObjectWithAdditionalPropertiesEqEmptyObject, FreeFormObjectWithAdditionalPropertiesEqTrue, FreeFormObjectWithoutAdditionalProperties, GenericSchemaDuplicateIssue1SystemBoolean, GenericSchemaDuplicateIssue1SystemBooleanWritable, GenericSchemaDuplicateIssue1SystemString, GenericSchemaDuplicateIssue1SystemStringWritable, GetApiVbyApiVersionSimpleOperationData, GetApiVbyApiVersionSimpleOperationError, GetApiVbyApiVersionSimpleOperationErrors, GetApiVbyApiVersionSimpleOperationResponse, GetApiVbyApiVersionSimpleOperationResponses, GetCallWithOptionalParamData, GetCallWithoutParametersAndResponseData, HeadCallWithoutParametersAndResponseData, Import, ImportData, ImportResponse, ImportResponses, IoK8sApimachineryPkgApisMetaV1DeleteOptions, IoK8sApimachineryPkgApisMetaV1Preconditions, ModelCircle, ModelFromZendesk, ModelSquare, ModelThatExtends, ModelThatExtendsExtends, ModelWithAdditionalPropertiesEqTrue, ModelWithAdditionalPropertiesRef, ModelWithAnyOfConstantSizeArray, ModelWithAnyOfConstantSizeArrayAndIntersect, ModelWithAnyOfConstantSizeArrayNullable, ModelWithAnyOfConstantSizeArrayWithNSizeAndOptions, ModelWithAnyOfConstantSizeArrayWithNSizeAndOptionsWritable, ModelWithArray, ModelWithArrayReadOnlyAndWriteOnly, ModelWithArrayReadOnlyAndWriteOnlyWritable, ModelWithBackticksInDescription, ModelWithBoolean, ModelWithCircularReference, ModelWithConst, ModelWithConstantSizeArray, ModelWithDictionary, ModelWithDuplicateImports, ModelWithDuplicateProperties, ModelWithEnum, ModelWithEnumFromDescription, ModelWithEnumWithHyphen, ModelWithInteger, ModelWithNestedArrayEnums, ModelWithNestedArrayEnumsData, ModelWithNestedArrayEnumsDataBar, ModelWithNestedArrayEnumsDataFoo, ModelWithNestedCompositionEnums, ModelWithNestedEnums, ModelWithNestedProperties, ModelWithNullableObject, ModelWithNullableString, ModelWithNumericEnumUnion, ModelWithOneOfAndProperties, ModelWithOneOfEnum, ModelWithOrderedProperties, ModelWithPattern, ModelWithPatternWritable, ModelWithPrefixItemsConstantSizeArray, ModelWithProperties, ModelWithPropertiesWritable, ModelWithReadOnlyAndWriteOnly, ModelWithReadOnlyAndWriteOnlyWritable, ModelWithReference, ModelWithReferenceWritable, ModelWithString, ModelWithStringError, MultipartRequestData, MultipartResponseData, MultipartResponseResponse, MultipartResponseResponses, NestedAnyOfArraysNullable, NonAsciiæøåÆøÅöôêÊ字符串Data, NonAsciiæøåÆøÅöôêÊ字符串Response, NonAsciiæøåÆøÅöôêÊ字符串Responses, NonAsciiStringæøåÆøÅöôêÊ字符串, NullableObject, OneOfAllOfIssue, OneOfAllOfIssueWritable, OptionsCallWithoutParametersAndResponseData, Pageable, ParameterSimpleParameterUnused, PatchApiVbyApiVersionNoTagData, PatchApiVbyApiVersionNoTagResponses, PatchCallWithoutParametersAndResponseData, PostApiVbyApiVersionFormDataData, PostApiVbyApiVersionRequestBodyData, PostCallWithOptionalParamData, PostCallWithOptionalParamResponse, PostCallWithOptionalParamResponses, PostCallWithoutParametersAndResponseData, PostServiceWithEmptyTagResponse, PostServiceWithEmptyTagResponse2, PutCallWithoutParametersAndResponseData, PutWithFormUrlEncodedData, SchemaWithFormRestrictedKeys, SimpleBoolean, SimpleFile, SimpleFormData, SimpleInteger, SimpleParameter, SimpleReference, SimpleRequestBody, SimpleString, SimpleStringWithPattern, TestErrorCodeData, TestErrorCodeErrors, TestErrorCodeResponses, TypesData, TypesResponse, TypesResponses, UploadFileData, UploadFileResponse, UploadFileResponses, XFooBar } from './types.gen.ts';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-next/import-file-extension-ts/sdk.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport { client } from './client.gen.ts';\nimport { type Client, formDataBodySerializer, type Options as Options2, type TDataShape, urlSearchParamsBodySerializer } from './client/index.ts';\nimport type { ApiVVersionODataControllerCountData, ApiVVersionODataControllerCountResponses, CallToTestOrderOfParamsData, CallWithDefaultOptionalParametersData, CallWithDefaultParametersData, CallWithDescriptionsData, CallWithDuplicateResponsesData, CallWithDuplicateResponsesErrors, CallWithDuplicateResponsesResponses, CallWithNoContentResponseData, CallWithNoContentResponseResponses, CallWithParametersData, CallWithResponseAndNoContentResponseData, CallWithResponseAndNoContentResponseResponses, CallWithResponseData, CallWithResponseResponses, CallWithResponsesData, CallWithResponsesErrors, CallWithResponsesResponses, CallWithResultFromHeaderData, CallWithResultFromHeaderErrors, CallWithResultFromHeaderResponses, CallWithWeirdParameterNamesData, CollectionFormatData, ComplexParamsData, ComplexParamsResponses, ComplexTypesData, ComplexTypesErrors, ComplexTypesResponses, DeleteCallWithoutParametersAndResponseData, DeleteFooData3, DeprecatedCallData, DummyAData, DummyAResponses, DummyBData, DummyBResponses, DuplicateName2Data, DuplicateName3Data, DuplicateName4Data, DuplicateNameData, ExportData, FileResponseData, FileResponseResponses, FooWowData, FooWowResponses, GetApiVbyApiVersionSimpleOperationData, GetApiVbyApiVersionSimpleOperationErrors, GetApiVbyApiVersionSimpleOperationResponses, GetCallWithOptionalParamData, GetCallWithoutParametersAndResponseData, HeadCallWithoutParametersAndResponseData, ImportData, ImportResponses, MultipartRequestData, MultipartResponseData, MultipartResponseResponses, NonAsciiæøåÆøÅöôêÊ字符串Data, NonAsciiæøåÆøÅöôêÊ字符串Responses, OptionsCallWithoutParametersAndResponseData, PatchApiVbyApiVersionNoTagData, PatchApiVbyApiVersionNoTagResponses, PatchCallWithoutParametersAndResponseData, PostApiVbyApiVersionFormDataData, PostApiVbyApiVersionRequestBodyData, PostCallWithOptionalParamData, PostCallWithOptionalParamResponses, PostCallWithoutParametersAndResponseData, PutCallWithoutParametersAndResponseData, PutWithFormUrlEncodedData, TestErrorCodeData, TestErrorCodeErrors, TestErrorCodeResponses, TypesData, TypesResponses, UploadFileData, UploadFileResponses } from './types.gen.ts';\n\nexport type Options<TData extends TDataShape = TDataShape, ThrowOnError extends boolean = boolean> = Options2<TData, ThrowOnError> & {\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\nexport const export_ = <ThrowOnError extends boolean = false>(options?: Options<ExportData, ThrowOnError>) => (options?.client ?? client).get<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/no+tag', ...options });\n\nexport const patchApiVbyApiVersionNoTag = <ThrowOnError extends boolean = false>(options?: Options<PatchApiVbyApiVersionNoTagData, ThrowOnError>) => (options?.client ?? client).patch<PatchApiVbyApiVersionNoTagResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/no+tag', ...options });\n\nexport const import_ = <ThrowOnError extends boolean = false>(options: Options<ImportData, ThrowOnError>) => (options.client ?? client).post<ImportResponses, unknown, ThrowOnError>({\n    url: '/api/v{api-version}/no+tag',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options.headers\n    }\n});\n\nexport const fooWow = <ThrowOnError extends boolean = false>(options?: Options<FooWowData, ThrowOnError>) => (options?.client ?? client).put<FooWowResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/no+tag', ...options });\n\nexport const apiVVersionODataControllerCount = <ThrowOnError extends boolean = false>(options?: Options<ApiVVersionODataControllerCountData, ThrowOnError>) => (options?.client ?? client).get<ApiVVersionODataControllerCountResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple/$count', ...options });\n\nexport const getApiVbyApiVersionSimpleOperation = <ThrowOnError extends boolean = false>(options: Options<GetApiVbyApiVersionSimpleOperationData, ThrowOnError>) => (options.client ?? client).get<GetApiVbyApiVersionSimpleOperationResponses, GetApiVbyApiVersionSimpleOperationErrors, ThrowOnError>({ url: '/api/v{api-version}/simple:operation', ...options });\n\nexport const deleteCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<DeleteCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).delete<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const getCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<GetCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).get<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const headCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<HeadCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).head<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const optionsCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<OptionsCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).options<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const patchCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<PatchCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).patch<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const postCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<PostCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).post<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const putCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<PutCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).put<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const deleteFoo = <ThrowOnError extends boolean = false>(options: Options<DeleteFooData3, ThrowOnError>) => (options.client ?? client).delete<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/foo/{foo_param}/bar/{BarParam}', ...options });\n\nexport const callWithDescriptions = <ThrowOnError extends boolean = false>(options?: Options<CallWithDescriptionsData, ThrowOnError>) => (options?.client ?? client).post<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/descriptions', ...options });\n\n/**\n * @deprecated\n */\nexport const deprecatedCall = <ThrowOnError extends boolean = false>(options: Options<DeprecatedCallData, ThrowOnError>) => (options.client ?? client).post<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/parameters/deprecated', ...options });\n\nexport const callWithParameters = <ThrowOnError extends boolean = false>(options: Options<CallWithParametersData, ThrowOnError>) => (options.client ?? client).post<unknown, unknown, ThrowOnError>({\n    url: '/api/v{api-version}/parameters/{parameterPath}',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options.headers\n    }\n});\n\nexport const callWithWeirdParameterNames = <ThrowOnError extends boolean = false>(options: Options<CallWithWeirdParameterNamesData, ThrowOnError>) => (options.client ?? client).post<unknown, unknown, ThrowOnError>({\n    url: '/api/v{api-version}/parameters/{parameter.path.1}/{parameter-path-2}/{PARAMETER-PATH-3}',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options.headers\n    }\n});\n\nexport const getCallWithOptionalParam = <ThrowOnError extends boolean = false>(options: Options<GetCallWithOptionalParamData, ThrowOnError>) => (options.client ?? client).get<unknown, unknown, ThrowOnError>({\n    url: '/api/v{api-version}/parameters',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options.headers\n    }\n});\n\nexport const postCallWithOptionalParam = <ThrowOnError extends boolean = false>(options: Options<PostCallWithOptionalParamData, ThrowOnError>) => (options.client ?? client).post<PostCallWithOptionalParamResponses, unknown, ThrowOnError>({\n    url: '/api/v{api-version}/parameters',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options.headers\n    }\n});\n\nexport const postApiVbyApiVersionRequestBody = <ThrowOnError extends boolean = false>(options?: Options<PostApiVbyApiVersionRequestBodyData, ThrowOnError>) => (options?.client ?? client).post<unknown, unknown, ThrowOnError>({\n    url: '/api/v{api-version}/requestBody',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options?.headers\n    }\n});\n\nexport const postApiVbyApiVersionFormData = <ThrowOnError extends boolean = false>(options?: Options<PostApiVbyApiVersionFormDataData, ThrowOnError>) => (options?.client ?? client).post<unknown, unknown, ThrowOnError>({\n    ...formDataBodySerializer,\n    url: '/api/v{api-version}/formData',\n    ...options,\n    headers: {\n        'Content-Type': null,\n        ...options?.headers\n    }\n});\n\nexport const callWithDefaultParameters = <ThrowOnError extends boolean = false>(options?: Options<CallWithDefaultParametersData, ThrowOnError>) => (options?.client ?? client).get<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/defaults', ...options });\n\nexport const callWithDefaultOptionalParameters = <ThrowOnError extends boolean = false>(options?: Options<CallWithDefaultOptionalParametersData, ThrowOnError>) => (options?.client ?? client).post<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/defaults', ...options });\n\nexport const callToTestOrderOfParams = <ThrowOnError extends boolean = false>(options: Options<CallToTestOrderOfParamsData, ThrowOnError>) => (options.client ?? client).put<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/defaults', ...options });\n\nexport const duplicateName = <ThrowOnError extends boolean = false>(options?: Options<DuplicateNameData, ThrowOnError>) => (options?.client ?? client).delete<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/duplicate', ...options });\n\nexport const duplicateName2 = <ThrowOnError extends boolean = false>(options?: Options<DuplicateName2Data, ThrowOnError>) => (options?.client ?? client).get<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/duplicate', ...options });\n\nexport const duplicateName3 = <ThrowOnError extends boolean = false>(options?: Options<DuplicateName3Data, ThrowOnError>) => (options?.client ?? client).post<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/duplicate', ...options });\n\nexport const duplicateName4 = <ThrowOnError extends boolean = false>(options?: Options<DuplicateName4Data, ThrowOnError>) => (options?.client ?? client).put<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/duplicate', ...options });\n\nexport const callWithNoContentResponse = <ThrowOnError extends boolean = false>(options?: Options<CallWithNoContentResponseData, ThrowOnError>) => (options?.client ?? client).get<CallWithNoContentResponseResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/no-content', ...options });\n\nexport const callWithResponseAndNoContentResponse = <ThrowOnError extends boolean = false>(options?: Options<CallWithResponseAndNoContentResponseData, ThrowOnError>) => (options?.client ?? client).get<CallWithResponseAndNoContentResponseResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/multiple-tags/response-and-no-content', ...options });\n\nexport const dummyA = <ThrowOnError extends boolean = false>(options?: Options<DummyAData, ThrowOnError>) => (options?.client ?? client).get<DummyAResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/multiple-tags/a', ...options });\n\nexport const dummyB = <ThrowOnError extends boolean = false>(options?: Options<DummyBData, ThrowOnError>) => (options?.client ?? client).get<DummyBResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/multiple-tags/b', ...options });\n\nexport const callWithResponse = <ThrowOnError extends boolean = false>(options?: Options<CallWithResponseData, ThrowOnError>) => (options?.client ?? client).get<CallWithResponseResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/response', ...options });\n\nexport const callWithDuplicateResponses = <ThrowOnError extends boolean = false>(options?: Options<CallWithDuplicateResponsesData, ThrowOnError>) => (options?.client ?? client).post<CallWithDuplicateResponsesResponses, CallWithDuplicateResponsesErrors, ThrowOnError>({ url: '/api/v{api-version}/response', ...options });\n\nexport const callWithResponses = <ThrowOnError extends boolean = false>(options?: Options<CallWithResponsesData, ThrowOnError>) => (options?.client ?? client).put<CallWithResponsesResponses, CallWithResponsesErrors, ThrowOnError>({ url: '/api/v{api-version}/response', ...options });\n\nexport const collectionFormat = <ThrowOnError extends boolean = false>(options: Options<CollectionFormatData, ThrowOnError>) => (options.client ?? client).get<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/collectionFormat', ...options });\n\nexport const types = <ThrowOnError extends boolean = false>(options: Options<TypesData, ThrowOnError>) => (options.client ?? client).get<TypesResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/types', ...options });\n\nexport const uploadFile = <ThrowOnError extends boolean = false>(options: Options<UploadFileData, ThrowOnError>) => (options.client ?? client).post<UploadFileResponses, unknown, ThrowOnError>({\n    ...urlSearchParamsBodySerializer,\n    url: '/api/v{api-version}/upload',\n    ...options,\n    headers: {\n        'Content-Type': 'application/x-www-form-urlencoded',\n        ...options.headers\n    }\n});\n\nexport const fileResponse = <ThrowOnError extends boolean = false>(options: Options<FileResponseData, ThrowOnError>) => (options.client ?? client).get<FileResponseResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/file/{id}', ...options });\n\nexport const complexTypes = <ThrowOnError extends boolean = false>(options: Options<ComplexTypesData, ThrowOnError>) => (options.client ?? client).get<ComplexTypesResponses, ComplexTypesErrors, ThrowOnError>({\n    querySerializer: { parameters: { parameterObject: { object: { style: 'form' } } } },\n    url: '/api/v{api-version}/complex',\n    ...options\n});\n\nexport const multipartResponse = <ThrowOnError extends boolean = false>(options?: Options<MultipartResponseData, ThrowOnError>) => (options?.client ?? client).get<MultipartResponseResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/multipart', ...options });\n\nexport const multipartRequest = <ThrowOnError extends boolean = false>(options?: Options<MultipartRequestData, ThrowOnError>) => (options?.client ?? client).post<unknown, unknown, ThrowOnError>({\n    ...formDataBodySerializer,\n    url: '/api/v{api-version}/multipart',\n    ...options,\n    headers: {\n        'Content-Type': null,\n        ...options?.headers\n    }\n});\n\nexport const complexParams = <ThrowOnError extends boolean = false>(options: Options<ComplexParamsData, ThrowOnError>) => (options.client ?? client).put<ComplexParamsResponses, unknown, ThrowOnError>({\n    url: '/api/v{api-version}/complex/{id}',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json-patch+json',\n        ...options.headers\n    }\n});\n\nexport const callWithResultFromHeader = <ThrowOnError extends boolean = false>(options?: Options<CallWithResultFromHeaderData, ThrowOnError>) => (options?.client ?? client).post<CallWithResultFromHeaderResponses, CallWithResultFromHeaderErrors, ThrowOnError>({ url: '/api/v{api-version}/header', ...options });\n\nexport const testErrorCode = <ThrowOnError extends boolean = false>(options: Options<TestErrorCodeData, ThrowOnError>) => (options.client ?? client).post<TestErrorCodeResponses, TestErrorCodeErrors, ThrowOnError>({ url: '/api/v{api-version}/error', ...options });\n\nexport const nonAsciiæøåÆøÅöôêÊ字符串 = <ThrowOnError extends boolean = false>(options: Options<NonAsciiæøåÆøÅöôêÊ字符串Data, ThrowOnError>) => (options.client ?? client).post<NonAsciiæøåÆøÅöôêÊ字符串Responses, unknown, ThrowOnError>({ url: '/api/v{api-version}/non-ascii-æøåÆØÅöôêÊ字符串', ...options });\n\n/**\n * Login User\n */\nexport const putWithFormUrlEncoded = <ThrowOnError extends boolean = false>(options: Options<PutWithFormUrlEncodedData, ThrowOnError>) => (options.client ?? client).put<unknown, unknown, ThrowOnError>({\n    ...urlSearchParamsBodySerializer,\n    url: '/api/v{api-version}/non-ascii-æøåÆØÅöôêÊ字符串',\n    ...options,\n    headers: {\n        'Content-Type': 'application/x-www-form-urlencoded',\n        ...options.headers\n    }\n});\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-next/import-file-extension-ts/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type ClientOptions = {\n    baseUrl: 'http://localhost:3000/base' | (string & {});\n};\n\n/**\n * Model with number-only name\n */\nexport type _400 = string;\n\n/**\n * External ref to shared model (A)\n */\nexport type ExternalRefA = ExternalSharedModel;\n\n/**\n * External ref to shared model (B)\n */\nexport type ExternalRefB = ExternalSharedModel;\n\n/**\n * Testing multiline comments in string: First line\n * Second line\n *\n * Fourth line\n */\nexport type CamelCaseCommentWithBreaks = number;\n\n/**\n * Testing multiline comments in string: First line\n * Second line\n *\n * Fourth line\n */\nexport type CommentWithBreaks = number;\n\n/**\n * Testing backticks in string: `backticks` and ```multiple backticks``` should work\n */\nexport type CommentWithBackticks = number;\n\n/**\n * Testing backticks and quotes in string: `backticks`, 'quotes', \"double quotes\" and ```multiple backticks``` should work\n */\nexport type CommentWithBackticksAndQuotes = number;\n\n/**\n * Testing slashes in string: \\backwards\\\\\\ and /forwards/// should work\n */\nexport type CommentWithSlashes = number;\n\n/**\n * Testing expression placeholders in string: ${expression} should work\n */\nexport type CommentWithExpressionPlaceholders = number;\n\n/**\n * Testing quotes in string: 'single quote''' and \"double quotes\"\"\" should work\n */\nexport type CommentWithQuotes = number;\n\n/**\n * Testing reserved characters in string: * inline * and ** inline ** should work\n */\nexport type CommentWithReservedCharacters = number;\n\n/**\n * This is a simple number\n */\nexport type SimpleInteger = number;\n\n/**\n * This is a simple boolean\n */\nexport type SimpleBoolean = boolean;\n\n/**\n * This is a simple string\n */\nexport type SimpleString = string;\n\n/**\n * A string with non-ascii (unicode) characters valid in typescript identifiers (æøåÆØÅöÔèÈ字符串)\n */\nexport type NonAsciiStringæøåÆøÅöôêÊ字符串 = string;\n\n/**\n * This is a simple file\n */\nexport type SimpleFile = Blob | File;\n\n/**\n * This is a simple reference\n */\nexport type SimpleReference = ModelWithString;\n\n/**\n * This is a simple string\n */\nexport type SimpleStringWithPattern = string | null;\n\n/**\n * This is a simple enum with strings\n */\nexport type EnumWithStrings = 'Success' | 'Warning' | 'Error' | '\\'Single Quote\\'' | '\"Double Quotes\"' | 'Non-ascii: øæåôöØÆÅÔÖ字符串';\n\nexport type EnumWithReplacedCharacters = '\\'Single Quote\\'' | '\"Double Quotes\"' | 'øæåôöØÆÅÔÖ字符串' | 3.1 | '';\n\n/**\n * This is a simple enum with numbers\n */\nexport type EnumWithNumbers = 1 | 2 | 3 | 1.1 | 1.2 | 1.3 | 100 | 200 | 300 | -100 | -200 | -300 | -1.1 | -1.2 | -1.3;\n\n/**\n * Success=1,Warning=2,Error=3\n */\nexport type EnumFromDescription = number;\n\n/**\n * This is a simple enum with numbers\n */\nexport type EnumWithExtensions = 200 | 400 | 500;\n\nexport type EnumWithXEnumNames = 0 | 1 | 2;\n\n/**\n * This is a simple array with numbers\n */\nexport type ArrayWithNumbers = Array<number>;\n\n/**\n * This is a simple array with booleans\n */\nexport type ArrayWithBooleans = Array<boolean>;\n\n/**\n * This is a simple array with strings\n */\nexport type ArrayWithStrings = Array<string>;\n\n/**\n * This is a simple array with references\n */\nexport type ArrayWithReferences = Array<ModelWithString>;\n\n/**\n * This is a simple array containing an array\n */\nexport type ArrayWithArray = Array<Array<ModelWithString>>;\n\n/**\n * This is a simple array with properties\n */\nexport type ArrayWithProperties = Array<{\n    '16x16'?: CamelCaseCommentWithBreaks;\n    bar?: string;\n}>;\n\n/**\n * This is a simple array with any of properties\n */\nexport type ArrayWithAnyOfProperties = Array<{\n    foo?: string;\n} | {\n    bar?: string;\n}>;\n\nexport type AnyOfAnyAndNull = {\n    data?: unknown | null;\n};\n\n/**\n * This is a simple array with any of properties\n */\nexport type AnyOfArrays = {\n    results?: Array<{\n        foo?: string;\n    } | {\n        bar?: string;\n    }>;\n};\n\n/**\n * This is a string dictionary\n */\nexport type DictionaryWithString = {\n    [key: string]: string;\n};\n\nexport type DictionaryWithPropertiesAndAdditionalProperties = {\n    foo?: number;\n    bar?: boolean;\n    [key: string]: string | number | boolean | undefined;\n};\n\n/**\n * This is a string reference\n */\nexport type DictionaryWithReference = {\n    [key: string]: ModelWithString;\n};\n\n/**\n * This is a complex dictionary\n */\nexport type DictionaryWithArray = {\n    [key: string]: Array<ModelWithString>;\n};\n\n/**\n * This is a string dictionary\n */\nexport type DictionaryWithDictionary = {\n    [key: string]: {\n        [key: string]: string;\n    };\n};\n\n/**\n * This is a complex dictionary\n */\nexport type DictionaryWithProperties = {\n    [key: string]: {\n        foo?: string;\n        bar?: string;\n    };\n};\n\n/**\n * This is a model with one number property\n */\nexport type ModelWithInteger = {\n    /**\n     * This is a simple number property\n     */\n    prop?: number;\n};\n\n/**\n * This is a model with one boolean property\n */\nexport type ModelWithBoolean = {\n    /**\n     * This is a simple boolean property\n     */\n    prop?: boolean;\n};\n\n/**\n * This is a model with one string property\n */\nexport type ModelWithString = {\n    /**\n     * This is a simple string property\n     */\n    prop?: string;\n};\n\n/**\n * This is a model with one string property\n */\nexport type ModelWithStringError = {\n    /**\n     * This is a simple string property\n     */\n    prop?: string;\n};\n\n/**\n * `Comment` or `VoiceComment`. The JSON object for adding voice comments to tickets is different. See [Adding voice comments to tickets](/documentation/ticketing/managing-tickets/adding-voice-comments-to-tickets)\n */\nexport type ModelFromZendesk = string;\n\n/**\n * This is a model with one string property\n */\nexport type ModelWithNullableString = {\n    /**\n     * This is a simple string property\n     */\n    nullableProp1?: string | null;\n    /**\n     * This is a simple string property\n     */\n    nullableRequiredProp1: string | null;\n    /**\n     * This is a simple string property\n     */\n    nullableProp2?: string | null;\n    /**\n     * This is a simple string property\n     */\n    nullableRequiredProp2: string | null;\n    /**\n     * This is a simple enum with strings\n     */\n    'foo_bar-enum'?: 'Success' | 'Warning' | 'Error' | 'ØÆÅ字符串';\n};\n\n/**\n * This is a model with one enum\n */\nexport type ModelWithEnum = {\n    /**\n     * This is a simple enum with strings\n     */\n    'foo_bar-enum'?: 'Success' | 'Warning' | 'Error' | 'ØÆÅ字符串';\n    /**\n     * These are the HTTP error code enums\n     */\n    statusCode?: '100' | '200 FOO' | '300 FOO_BAR' | '400 foo-bar' | '500 foo.bar' | '600 foo&bar';\n    /**\n     * Simple boolean enum\n     */\n    bool?: true;\n};\n\n/**\n * This is a model with one enum with escaped name\n */\nexport type ModelWithEnumWithHyphen = {\n    /**\n     * Foo-Bar-Baz-Qux\n     */\n    'foo-bar-baz-qux'?: '3.0';\n};\n\n/**\n * This is a model with one enum\n */\nexport type ModelWithEnumFromDescription = {\n    /**\n     * Success=1,Warning=2,Error=3\n     */\n    test?: number;\n};\n\n/**\n * This is a model with nested enums\n */\nexport type ModelWithNestedEnums = {\n    dictionaryWithEnum?: {\n        [key: string]: 'Success' | 'Warning' | 'Error';\n    };\n    dictionaryWithEnumFromDescription?: {\n        [key: string]: number;\n    };\n    arrayWithEnum?: Array<'Success' | 'Warning' | 'Error'>;\n    arrayWithDescription?: Array<number>;\n    /**\n     * This is a simple enum with strings\n     */\n    'foo_bar-enum'?: 'Success' | 'Warning' | 'Error' | 'ØÆÅ字符串';\n};\n\n/**\n * This is a model with one property containing a reference\n */\nexport type ModelWithReference = {\n    prop?: ModelWithProperties;\n};\n\n/**\n * This is a model with one property containing an array\n */\nexport type ModelWithArrayReadOnlyAndWriteOnly = {\n    prop?: Array<ModelWithReadOnlyAndWriteOnly>;\n    propWithFile?: Array<Blob | File>;\n    propWithNumber?: Array<number>;\n};\n\n/**\n * This is a model with one property containing an array\n */\nexport type ModelWithArray = {\n    prop?: Array<ModelWithString>;\n    propWithFile?: Array<Blob | File>;\n    propWithNumber?: Array<number>;\n};\n\n/**\n * This is a model with one property containing a dictionary\n */\nexport type ModelWithDictionary = {\n    prop?: {\n        [key: string]: string;\n    };\n};\n\n/**\n * This is a deprecated model with a deprecated property\n *\n * @deprecated\n */\nexport type DeprecatedModel = {\n    /**\n     * This is a deprecated property\n     *\n     * @deprecated\n     */\n    prop?: string;\n};\n\n/**\n * This is a model with one property containing a circular reference\n */\nexport type ModelWithCircularReference = {\n    prop?: ModelWithCircularReference;\n};\n\n/**\n * This is a model with one property with a 'one of' relationship\n */\nexport type CompositionWithOneOf = {\n    propA?: ModelWithString | ModelWithEnum | ModelWithArray | ModelWithDictionary;\n};\n\n/**\n * This is a model with one property with a 'one of' relationship where the options are not $ref\n */\nexport type CompositionWithOneOfAnonymous = {\n    propA?: {\n        propA?: string;\n    } | string | number;\n};\n\n/**\n * Circle\n */\nexport type ModelCircle = {\n    kind: string;\n    radius?: number;\n};\n\n/**\n * Square\n */\nexport type ModelSquare = {\n    kind: string;\n    sideLength?: number;\n};\n\n/**\n * This is a model with one property with a 'one of' relationship where the options are not $ref\n */\nexport type CompositionWithOneOfDiscriminator = ({\n    kind: 'circle';\n} & ModelCircle) | ({\n    kind: 'square';\n} & ModelSquare);\n\n/**\n * This is a model with one property with a 'any of' relationship\n */\nexport type CompositionWithAnyOf = {\n    propA?: ModelWithString | ModelWithEnum | ModelWithArray | ModelWithDictionary;\n};\n\n/**\n * This is a model with one property with a 'any of' relationship where the options are not $ref\n */\nexport type CompositionWithAnyOfAnonymous = {\n    propA?: {\n        propA?: string;\n    } | string | number;\n};\n\n/**\n * This is a model with nested 'any of' property with a type null\n */\nexport type CompositionWithNestedAnyAndTypeNull = {\n    propA?: Array<ModelWithDictionary | null> | Array<ModelWithArray | null>;\n};\n\nexport type _3eNum1Период = 'Bird' | 'Dog';\n\nexport type ConstValue = 'ConstValue';\n\n/**\n * This is a model with one property with a 'any of' relationship where the options are not $ref\n */\nexport type CompositionWithNestedAnyOfAndNull = {\n    /**\n     * Scopes\n     */\n    propA?: Array<_3eNum1Период | ConstValue> | null;\n};\n\n/**\n * This is a model with one property with a 'one of' relationship\n */\nexport type CompositionWithOneOfAndNullable = {\n    propA?: {\n        boolean?: boolean;\n    } | ModelWithEnum | ModelWithArray | ModelWithDictionary | null;\n};\n\n/**\n * This is a model that contains a simple dictionary within composition\n */\nexport type CompositionWithOneOfAndSimpleDictionary = {\n    propA?: boolean | {\n        [key: string]: number;\n    };\n};\n\n/**\n * This is a model that contains a dictionary of simple arrays within composition\n */\nexport type CompositionWithOneOfAndSimpleArrayDictionary = {\n    propA?: boolean | {\n        [key: string]: Array<boolean>;\n    };\n};\n\n/**\n * This is a model that contains a dictionary of complex arrays (composited) within composition\n */\nexport type CompositionWithOneOfAndComplexArrayDictionary = {\n    propA?: boolean | {\n        [key: string]: Array<number | string>;\n    };\n};\n\n/**\n * This is a model with one property with a 'all of' relationship\n */\nexport type CompositionWithAllOfAndNullable = {\n    propA?: ({\n        boolean?: boolean;\n    } & ModelWithEnum & ModelWithArray & ModelWithDictionary) | null;\n};\n\n/**\n * This is a model with one property with a 'any of' relationship\n */\nexport type CompositionWithAnyOfAndNullable = {\n    propA?: {\n        boolean?: boolean;\n    } | ModelWithEnum | ModelWithArray | ModelWithDictionary | null;\n};\n\n/**\n * This is a base model with two simple optional properties\n */\nexport type CompositionBaseModel = {\n    firstName?: string;\n    lastname?: string;\n};\n\n/**\n * This is a model that extends the base model\n */\nexport type CompositionExtendedModel = CompositionBaseModel & {\n    age: number;\n    firstName: string;\n    lastname: string;\n};\n\n/**\n * This is a model with one nested property\n */\nexport type ModelWithProperties = {\n    required: string;\n    readonly requiredAndReadOnly: string;\n    requiredAndNullable: string | null;\n    string?: string;\n    number?: number;\n    boolean?: boolean;\n    reference?: ModelWithString;\n    'property with space'?: string;\n    default?: string;\n    try?: string;\n    readonly '@namespace.string'?: string;\n    readonly '@namespace.integer'?: number;\n};\n\n/**\n * This is a model with one nested property\n */\nexport type ModelWithNestedProperties = {\n    readonly first: {\n        readonly second: {\n            readonly third: string | null;\n        } | null;\n    } | null;\n};\n\n/**\n * This is a model with duplicated properties\n */\nexport type ModelWithDuplicateProperties = {\n    prop?: ModelWithString;\n};\n\n/**\n * This is a model with ordered properties\n */\nexport type ModelWithOrderedProperties = {\n    zebra?: string;\n    apple?: string;\n    hawaii?: string;\n};\n\n/**\n * This is a model with duplicated imports\n */\nexport type ModelWithDuplicateImports = {\n    propA?: ModelWithString;\n    propB?: ModelWithString;\n    propC?: ModelWithString;\n};\n\n/**\n * This is a model that extends another model\n */\nexport type ModelThatExtends = ModelWithString & {\n    propExtendsA?: string;\n    propExtendsB?: ModelWithString;\n};\n\n/**\n * This is a model that extends another model\n */\nexport type ModelThatExtendsExtends = ModelWithString & ModelThatExtends & {\n    propExtendsC?: string;\n    propExtendsD?: ModelWithString;\n};\n\n/**\n * This is a model that contains a some patterns\n */\nexport type ModelWithPattern = {\n    key: string;\n    name: string;\n    readonly enabled?: boolean;\n    readonly modified?: string;\n    id?: string;\n    text?: string;\n    patternWithSingleQuotes?: string;\n    patternWithNewline?: string;\n    patternWithBacktick?: string;\n    patternWithUnicode?: string;\n};\n\nexport type File = {\n    /**\n     * Id\n     */\n    readonly id?: string;\n    /**\n     * Updated at\n     */\n    readonly updated_at?: string;\n    /**\n     * Created at\n     */\n    readonly created_at?: string;\n    /**\n     * Mime\n     */\n    mime: string;\n    /**\n     * File\n     */\n    readonly file?: string;\n};\n\nexport type Default = {\n    name?: string;\n};\n\nexport type Pageable = {\n    page?: number;\n    size?: number;\n    sort?: Array<string>;\n};\n\n/**\n * This is a free-form object without additionalProperties.\n */\nexport type FreeFormObjectWithoutAdditionalProperties = {\n    [key: string]: unknown;\n};\n\n/**\n * This is a free-form object with additionalProperties: true.\n */\nexport type FreeFormObjectWithAdditionalPropertiesEqTrue = {\n    [key: string]: unknown;\n};\n\n/**\n * This is a free-form object with additionalProperties: {}.\n */\nexport type FreeFormObjectWithAdditionalPropertiesEqEmptyObject = {\n    [key: string]: unknown;\n};\n\nexport type ModelWithConst = {\n    String?: 'String';\n    number?: 0;\n    null?: null;\n    withType?: 'Some string';\n};\n\n/**\n * This is a model with one property and additionalProperties: true\n */\nexport type ModelWithAdditionalPropertiesEqTrue = {\n    /**\n     * This is a simple string property\n     */\n    prop?: string;\n    [key: string]: unknown;\n};\n\nexport type NestedAnyOfArraysNullable = {\n    nullableArray?: Array<string | boolean> | null;\n};\n\nexport type CompositionWithOneOfAndProperties = ({\n    foo: SimpleParameter;\n} | {\n    bar: NonAsciiStringæøåÆøÅöôêÊ字符串;\n}) & {\n    baz: number | null;\n    qux: number;\n};\n\n/**\n * An object that can be null\n */\nexport type NullableObject = {\n    foo?: string;\n} | null;\n\n/**\n * Some % character\n */\nexport type CharactersInDescription = string;\n\nexport type ModelWithNullableObject = {\n    data?: NullableObject;\n};\n\n/**\n * An object with additional properties that can be null (anyOf ref + null)\n */\nexport type ModelWithAdditionalPropertiesRef = {\n    [key: string]: NullableObject | null;\n};\n\nexport type ModelWithOneOfEnum = {\n    foo: 'Bar';\n} | {\n    foo: 'Baz';\n} | {\n    foo: 'Qux';\n} | {\n    content: string;\n    foo: 'Quux';\n} | {\n    content: [\n        string,\n        string\n    ];\n    foo: 'Corge';\n};\n\nexport type ModelWithNestedArrayEnumsDataFoo = 'foo' | 'bar';\n\nexport type ModelWithNestedArrayEnumsDataBar = 'baz' | 'qux';\n\nexport type ModelWithNestedArrayEnumsData = {\n    foo?: Array<ModelWithNestedArrayEnumsDataFoo>;\n    bar?: Array<ModelWithNestedArrayEnumsDataBar>;\n};\n\nexport type ModelWithNestedArrayEnums = {\n    array_strings?: Array<string>;\n    data?: ModelWithNestedArrayEnumsData;\n};\n\nexport type ModelWithNestedCompositionEnums = {\n    foo?: ModelWithNestedArrayEnumsDataFoo;\n};\n\nexport type ModelWithReadOnlyAndWriteOnly = {\n    foo: string;\n    readonly bar: string;\n};\n\nexport type ModelWithConstantSizeArray = [\n    number,\n    number\n];\n\nexport type ModelWithAnyOfConstantSizeArray = [\n    number | string,\n    number | string,\n    number | string\n];\n\nexport type ModelWithPrefixItemsConstantSizeArray = [\n    ModelWithInteger,\n    number | string,\n    string\n];\n\nexport type ModelWithAnyOfConstantSizeArrayNullable = [\n    number | null | string,\n    number | null | string,\n    number | null | string\n];\n\nexport type ModelWithAnyOfConstantSizeArrayWithNSizeAndOptions = [\n    number | Import,\n    number | Import\n];\n\nexport type ModelWithAnyOfConstantSizeArrayAndIntersect = [\n    number & string,\n    number & string\n];\n\nexport type ModelWithNumericEnumUnion = {\n    /**\n     * Период\n     */\n    value?: -10 | -1 | 0 | 1 | 3 | 6 | 12;\n};\n\n/**\n * Some description with `back ticks`\n */\nexport type ModelWithBackticksInDescription = {\n    /**\n     * The template `that` should be used for parsing and importing the contents of the CSV file.\n     *\n     * <br/><p>There is one placeholder currently supported:<ul>     <li><b>${x}</b> - refers to the n-th column in the CSV file, e.g. ${1}, ${2}, ...)</li></ul><p>Example of a correct JSON template:</p>\n     * <pre>\n     * [\n     * {\n     * \"resourceType\": \"Asset\",\n     * \"identifier\": {\n     * \"name\": \"${1}\",\n     * \"domain\": {\n     * \"name\": \"${2}\",\n     * \"community\": {\n     * \"name\": \"Some Community\"\n     * }\n     * }\n     * },\n     * \"attributes\" : {\n     * \"00000000-0000-0000-0000-000000003115\" : [ {\n     * \"value\" : \"${3}\"\n     * } ],\n     * \"00000000-0000-0000-0000-000000000222\" : [ {\n     * \"value\" : \"${4}\"\n     * } ]\n     * }\n     * }\n     * ]\n     * </pre>\n     */\n    template?: string;\n};\n\nexport type ModelWithOneOfAndProperties = (SimpleParameter | NonAsciiStringæøåÆøÅöôêÊ字符串) & {\n    baz: number | null;\n    qux: number;\n};\n\n/**\n * Model used to test deduplication strategy (unused)\n */\nexport type ParameterSimpleParameterUnused = string;\n\n/**\n * Model used to test deduplication strategy\n */\nexport type PostServiceWithEmptyTagResponse = string;\n\n/**\n * Model used to test deduplication strategy\n */\nexport type PostServiceWithEmptyTagResponse2 = string;\n\n/**\n * Model used to test deduplication strategy\n */\nexport type DeleteFooData = string;\n\n/**\n * Model used to test deduplication strategy\n */\nexport type DeleteFooData2 = string;\n\n/**\n * Model with restricted keyword name\n */\nexport type Import = string;\n\nexport type SchemaWithFormRestrictedKeys = {\n    description?: string;\n    'x-enum-descriptions'?: string;\n    'x-enum-varnames'?: string;\n    'x-enumNames'?: string;\n    title?: string;\n    object?: {\n        description?: string;\n        'x-enum-descriptions'?: string;\n        'x-enum-varnames'?: string;\n        'x-enumNames'?: string;\n        title?: string;\n    };\n    array?: Array<{\n        description?: string;\n        'x-enum-descriptions'?: string;\n        'x-enum-varnames'?: string;\n        'x-enumNames'?: string;\n        title?: string;\n    }>;\n};\n\n/**\n * This schema was giving PascalCase transformations a hard time\n */\nexport type IoK8sApimachineryPkgApisMetaV1DeleteOptions = {\n    /**\n     * Must be fulfilled before a deletion is carried out. If not possible, a 409 Conflict status will be returned.\n     */\n    preconditions?: IoK8sApimachineryPkgApisMetaV1Preconditions;\n};\n\n/**\n * This schema was giving PascalCase transformations a hard time\n */\nexport type IoK8sApimachineryPkgApisMetaV1Preconditions = {\n    /**\n     * Specifies the target ResourceVersion\n     */\n    resourceVersion?: string;\n    /**\n     * Specifies the target UID.\n     */\n    uid?: string;\n};\n\nexport type AdditionalPropertiesUnknownIssue = {\n    [key: string]: string | number;\n};\n\nexport type AdditionalPropertiesUnknownIssue2 = {\n    [key: string]: string | number;\n};\n\nexport type AdditionalPropertiesUnknownIssue3 = string & {\n    entries: {\n        [key: string]: AdditionalPropertiesUnknownIssue;\n    };\n};\n\nexport type AdditionalPropertiesIntegerIssue = {\n    value: number;\n    [key: string]: number;\n};\n\nexport type OneOfAllOfIssue = ((ConstValue | GenericSchemaDuplicateIssue1SystemBoolean) & _3eNum1Период) | GenericSchemaDuplicateIssue1SystemString;\n\nexport type GenericSchemaDuplicateIssue1SystemBoolean = {\n    item?: boolean;\n    error?: string | null;\n    readonly hasError?: boolean;\n    data?: {\n        [key: string]: never;\n    };\n};\n\nexport type GenericSchemaDuplicateIssue1SystemString = {\n    item?: string | null;\n    error?: string | null;\n    readonly hasError?: boolean;\n};\n\nexport type ExternalSharedModel = {\n    id: string;\n    name?: string;\n};\n\n/**\n * This is a model with one property containing a reference\n */\nexport type ModelWithReferenceWritable = {\n    prop?: ModelWithPropertiesWritable;\n};\n\n/**\n * This is a model with one property containing an array\n */\nexport type ModelWithArrayReadOnlyAndWriteOnlyWritable = {\n    prop?: Array<ModelWithReadOnlyAndWriteOnlyWritable>;\n    propWithFile?: Array<Blob | File>;\n    propWithNumber?: Array<number>;\n};\n\n/**\n * This is a model with one nested property\n */\nexport type ModelWithPropertiesWritable = {\n    required: string;\n    requiredAndNullable: string | null;\n    string?: string;\n    number?: number;\n    boolean?: boolean;\n    reference?: ModelWithString;\n    'property with space'?: string;\n    default?: string;\n    try?: string;\n};\n\n/**\n * This is a model that contains a some patterns\n */\nexport type ModelWithPatternWritable = {\n    key: string;\n    name: string;\n    id?: string;\n    text?: string;\n    patternWithSingleQuotes?: string;\n    patternWithNewline?: string;\n    patternWithBacktick?: string;\n    patternWithUnicode?: string;\n};\n\nexport type FileWritable = {\n    /**\n     * Mime\n     */\n    mime: string;\n};\n\nexport type ModelWithReadOnlyAndWriteOnlyWritable = {\n    foo: string;\n    baz: string;\n};\n\nexport type ModelWithAnyOfConstantSizeArrayWithNSizeAndOptionsWritable = [\n    number | Import,\n    number | Import\n];\n\nexport type AdditionalPropertiesUnknownIssueWritable = {\n    [key: string]: string | number;\n};\n\nexport type OneOfAllOfIssueWritable = ((ConstValue | GenericSchemaDuplicateIssue1SystemBoolean) & _3eNum1Период) | GenericSchemaDuplicateIssue1SystemString;\n\nexport type GenericSchemaDuplicateIssue1SystemBooleanWritable = {\n    item?: boolean;\n    error?: string | null;\n    data?: {\n        [key: string]: never;\n    };\n};\n\nexport type GenericSchemaDuplicateIssue1SystemStringWritable = {\n    item?: string | null;\n    error?: string | null;\n};\n\n/**\n * This is a reusable parameter\n */\nexport type SimpleParameter = string;\n\n/**\n * Parameter with illegal characters\n */\nexport type XFooBar = ModelWithString;\n\n/**\n * A reusable request body\n */\nexport type SimpleRequestBody = ModelWithString;\n\n/**\n * A reusable request body\n */\nexport type SimpleFormData = ModelWithString;\n\nexport type ExportData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no+tag';\n};\n\nexport type PatchApiVbyApiVersionNoTagData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no+tag';\n};\n\nexport type PatchApiVbyApiVersionNoTagResponses = {\n    /**\n     * OK\n     */\n    default: unknown;\n};\n\nexport type ImportData = {\n    body: ModelWithReadOnlyAndWriteOnlyWritable | ModelWithArrayReadOnlyAndWriteOnlyWritable;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no+tag';\n};\n\nexport type ImportResponses = {\n    /**\n     * Success\n     */\n    200: ModelFromZendesk;\n    /**\n     * Default success response\n     */\n    default: ModelWithReadOnlyAndWriteOnly;\n};\n\nexport type ImportResponse = ImportResponses[keyof ImportResponses];\n\nexport type FooWowData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no+tag';\n};\n\nexport type FooWowResponses = {\n    /**\n     * OK\n     */\n    default: unknown;\n};\n\nexport type ApiVVersionODataControllerCountData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple/$count';\n};\n\nexport type ApiVVersionODataControllerCountResponses = {\n    /**\n     * Success\n     */\n    200: ModelFromZendesk;\n};\n\nexport type ApiVVersionODataControllerCountResponse = ApiVVersionODataControllerCountResponses[keyof ApiVVersionODataControllerCountResponses];\n\nexport type GetApiVbyApiVersionSimpleOperationData = {\n    body?: never;\n    path: {\n        /**\n         * foo in method\n         */\n        foo_param: string;\n    };\n    query?: never;\n    url: '/api/v{api-version}/simple:operation';\n};\n\nexport type GetApiVbyApiVersionSimpleOperationErrors = {\n    /**\n     * Default error response\n     */\n    default: ModelWithBoolean;\n};\n\nexport type GetApiVbyApiVersionSimpleOperationError = GetApiVbyApiVersionSimpleOperationErrors[keyof GetApiVbyApiVersionSimpleOperationErrors];\n\nexport type GetApiVbyApiVersionSimpleOperationResponses = {\n    /**\n     * Response is a simple number\n     */\n    200: number;\n};\n\nexport type GetApiVbyApiVersionSimpleOperationResponse = GetApiVbyApiVersionSimpleOperationResponses[keyof GetApiVbyApiVersionSimpleOperationResponses];\n\nexport type DeleteCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type GetCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type HeadCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type OptionsCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type PatchCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type PostCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type PutCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type DeleteFooData3 = {\n    body?: never;\n    headers: {\n        /**\n         * Parameter with illegal characters\n         */\n        'x-Foo-Bar': ModelWithString;\n    };\n    path: {\n        /**\n         * foo in method\n         */\n        foo_param: string;\n        /**\n         * bar in method\n         */\n        BarParam: string;\n    };\n    query?: never;\n    url: '/api/v{api-version}/foo/{foo_param}/bar/{BarParam}';\n};\n\nexport type CallWithDescriptionsData = {\n    body?: never;\n    path?: never;\n    query?: {\n        /**\n         * Testing multiline comments in string: First line\n         * Second line\n         *\n         * Fourth line\n         */\n        parameterWithBreaks?: string;\n        /**\n         * Testing backticks in string: `backticks` and ```multiple backticks``` should work\n         */\n        parameterWithBackticks?: string;\n        /**\n         * Testing slashes in string: \\backwards\\\\\\ and /forwards/// should work\n         */\n        parameterWithSlashes?: string;\n        /**\n         * Testing expression placeholders in string: ${expression} should work\n         */\n        parameterWithExpressionPlaceholders?: string;\n        /**\n         * Testing quotes in string: 'single quote''' and \"double quotes\"\"\" should work\n         */\n        parameterWithQuotes?: string;\n        /**\n         * Testing reserved characters in string: * inline * and ** inline ** should work\n         */\n        parameterWithReservedCharacters?: string;\n    };\n    url: '/api/v{api-version}/descriptions';\n};\n\nexport type DeprecatedCallData = {\n    body?: never;\n    headers: {\n        /**\n         * This parameter is deprecated\n         *\n         * @deprecated\n         */\n        parameter: DeprecatedModel | null;\n    };\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/parameters/deprecated';\n};\n\nexport type CallWithParametersData = {\n    /**\n     * This is the parameter that goes into the body\n     */\n    body: {\n        [key: string]: unknown;\n    } | null;\n    headers: {\n        /**\n         * This is the parameter that goes into the header\n         */\n        parameterHeader: string | null;\n    };\n    path: {\n        /**\n         * This is the parameter that goes into the path\n         */\n        parameterPath: string | null;\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string | null;\n    };\n    query: {\n        foo_ref_enum?: ModelWithNestedArrayEnumsDataFoo;\n        foo_all_of_enum: ModelWithNestedArrayEnumsDataFoo;\n        /**\n         * This is the parameter that goes into the query params\n         */\n        cursor: string | null;\n    };\n    url: '/api/v{api-version}/parameters/{parameterPath}';\n};\n\nexport type CallWithWeirdParameterNamesData = {\n    /**\n     * This is the parameter that goes into the body\n     */\n    body: ModelWithString | null;\n    headers: {\n        /**\n         * This is the parameter that goes into the request header\n         */\n        'parameter.header': string | null;\n    };\n    path: {\n        /**\n         * This is the parameter that goes into the path\n         */\n        'parameter.path.1'?: string;\n        /**\n         * This is the parameter that goes into the path\n         */\n        'parameter-path-2'?: string;\n        /**\n         * This is the parameter that goes into the path\n         */\n        'PARAMETER-PATH-3'?: string;\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string | null;\n    };\n    query: {\n        /**\n         * This is the parameter with a reserved keyword\n         */\n        default?: string;\n        /**\n         * This is the parameter that goes into the request query params\n         */\n        'parameter-query': string | null;\n    };\n    url: '/api/v{api-version}/parameters/{parameter.path.1}/{parameter-path-2}/{PARAMETER-PATH-3}';\n};\n\nexport type GetCallWithOptionalParamData = {\n    /**\n     * This is a required parameter\n     */\n    body: ModelWithOneOfEnum;\n    path?: never;\n    query?: {\n        /**\n         * This is an optional parameter\n         */\n        page?: number;\n    };\n    url: '/api/v{api-version}/parameters';\n};\n\nexport type PostCallWithOptionalParamData = {\n    /**\n     * This is an optional parameter\n     */\n    body?: {\n        offset?: number | null;\n    };\n    path?: never;\n    query: {\n        /**\n         * This is a required parameter\n         */\n        parameter: Pageable;\n    };\n    url: '/api/v{api-version}/parameters';\n};\n\nexport type PostCallWithOptionalParamResponses = {\n    /**\n     * Response is a simple number\n     */\n    200: number;\n    /**\n     * Success\n     */\n    204: void;\n};\n\nexport type PostCallWithOptionalParamResponse = PostCallWithOptionalParamResponses[keyof PostCallWithOptionalParamResponses];\n\nexport type PostApiVbyApiVersionRequestBodyData = {\n    /**\n     * A reusable request body\n     */\n    body?: SimpleRequestBody;\n    path?: never;\n    query?: {\n        /**\n         * This is a reusable parameter\n         */\n        parameter?: string;\n    };\n    url: '/api/v{api-version}/requestBody';\n};\n\nexport type PostApiVbyApiVersionFormDataData = {\n    /**\n     * A reusable request body\n     */\n    body?: SimpleFormData;\n    path?: never;\n    query?: {\n        /**\n         * This is a reusable parameter\n         */\n        parameter?: string;\n    };\n    url: '/api/v{api-version}/formData';\n};\n\nexport type CallWithDefaultParametersData = {\n    body?: never;\n    path?: never;\n    query?: {\n        /**\n         * This is a simple string with default value\n         */\n        parameterString?: string | null;\n        /**\n         * This is a simple number with default value\n         */\n        parameterNumber?: number | null;\n        /**\n         * This is a simple boolean with default value\n         */\n        parameterBoolean?: boolean | null;\n        /**\n         * This is a simple enum with default value\n         */\n        parameterEnum?: 'Success' | 'Warning' | 'Error';\n        /**\n         * This is a simple model with default value\n         */\n        parameterModel?: ModelWithString | null;\n    };\n    url: '/api/v{api-version}/defaults';\n};\n\nexport type CallWithDefaultOptionalParametersData = {\n    body?: never;\n    path?: never;\n    query?: {\n        /**\n         * This is a simple string that is optional with default value\n         */\n        parameterString?: string;\n        /**\n         * This is a simple number that is optional with default value\n         */\n        parameterNumber?: number;\n        /**\n         * This is a simple boolean that is optional with default value\n         */\n        parameterBoolean?: boolean;\n        /**\n         * This is a simple enum that is optional with default value\n         */\n        parameterEnum?: 'Success' | 'Warning' | 'Error';\n        /**\n         * This is a simple model that is optional with default value\n         */\n        parameterModel?: ModelWithString;\n    };\n    url: '/api/v{api-version}/defaults';\n};\n\nexport type CallToTestOrderOfParamsData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * This is a optional string with default\n         */\n        parameterOptionalStringWithDefault?: string;\n        /**\n         * This is a optional string with empty default\n         */\n        parameterOptionalStringWithEmptyDefault?: string;\n        /**\n         * This is a optional string with no default\n         */\n        parameterOptionalStringWithNoDefault?: string;\n        /**\n         * This is a string with default\n         */\n        parameterStringWithDefault: string;\n        /**\n         * This is a string with empty default\n         */\n        parameterStringWithEmptyDefault: string;\n        /**\n         * This is a string with no default\n         */\n        parameterStringWithNoDefault: string;\n        /**\n         * This is a string that can be null with no default\n         */\n        parameterStringNullableWithNoDefault?: string | null;\n        /**\n         * This is a string that can be null with default\n         */\n        parameterStringNullableWithDefault?: string | null;\n    };\n    url: '/api/v{api-version}/defaults';\n};\n\nexport type DuplicateNameData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/duplicate';\n};\n\nexport type DuplicateName2Data = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/duplicate';\n};\n\nexport type DuplicateName3Data = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/duplicate';\n};\n\nexport type DuplicateName4Data = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/duplicate';\n};\n\nexport type CallWithNoContentResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no-content';\n};\n\nexport type CallWithNoContentResponseResponses = {\n    /**\n     * Success\n     */\n    204: void;\n};\n\nexport type CallWithNoContentResponseResponse = CallWithNoContentResponseResponses[keyof CallWithNoContentResponseResponses];\n\nexport type CallWithResponseAndNoContentResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multiple-tags/response-and-no-content';\n};\n\nexport type CallWithResponseAndNoContentResponseResponses = {\n    /**\n     * Response is a simple number\n     */\n    200: number;\n    /**\n     * Success\n     */\n    204: void;\n};\n\nexport type CallWithResponseAndNoContentResponseResponse = CallWithResponseAndNoContentResponseResponses[keyof CallWithResponseAndNoContentResponseResponses];\n\nexport type DummyAData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multiple-tags/a';\n};\n\nexport type DummyAResponses = {\n    200: _400;\n};\n\nexport type DummyAResponse = DummyAResponses[keyof DummyAResponses];\n\nexport type DummyBData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multiple-tags/b';\n};\n\nexport type DummyBResponses = {\n    /**\n     * Success\n     */\n    204: void;\n};\n\nexport type DummyBResponse = DummyBResponses[keyof DummyBResponses];\n\nexport type CallWithResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/response';\n};\n\nexport type CallWithResponseResponses = {\n    default: Import;\n};\n\nexport type CallWithResponseResponse = CallWithResponseResponses[keyof CallWithResponseResponses];\n\nexport type CallWithDuplicateResponsesData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/response';\n};\n\nexport type CallWithDuplicateResponsesErrors = {\n    /**\n     * Message for 500 error\n     */\n    500: ModelWithStringError;\n    /**\n     * Message for 501 error\n     */\n    501: ModelWithStringError;\n    /**\n     * Message for 502 error\n     */\n    502: ModelWithStringError;\n    /**\n     * Message for 4XX errors\n     */\n    '4XX': DictionaryWithArray;\n    /**\n     * Default error response\n     */\n    default: ModelWithBoolean;\n};\n\nexport type CallWithDuplicateResponsesError = CallWithDuplicateResponsesErrors[keyof CallWithDuplicateResponsesErrors];\n\nexport type CallWithDuplicateResponsesResponses = {\n    /**\n     * Message for 200 response\n     */\n    200: ModelWithBoolean & ModelWithInteger;\n    /**\n     * Message for 201 response\n     */\n    201: ModelWithString;\n    /**\n     * Message for 202 response\n     */\n    202: ModelWithString;\n};\n\nexport type CallWithDuplicateResponsesResponse = CallWithDuplicateResponsesResponses[keyof CallWithDuplicateResponsesResponses];\n\nexport type CallWithResponsesData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/response';\n};\n\nexport type CallWithResponsesErrors = {\n    /**\n     * Message for 500 error\n     */\n    500: ModelWithStringError;\n    /**\n     * Message for 501 error\n     */\n    501: ModelWithStringError;\n    /**\n     * Message for 502 error\n     */\n    502: ModelWithStringError;\n    /**\n     * Message for default response\n     */\n    default: ModelWithStringError;\n};\n\nexport type CallWithResponsesError = CallWithResponsesErrors[keyof CallWithResponsesErrors];\n\nexport type CallWithResponsesResponses = {\n    /**\n     * Message for 200 response\n     */\n    200: {\n        readonly '@namespace.string'?: string;\n        readonly '@namespace.integer'?: number;\n        readonly value?: Array<ModelWithString>;\n    };\n    /**\n     * Message for 201 response\n     */\n    201: ModelThatExtends;\n    /**\n     * Message for 202 response\n     */\n    202: ModelThatExtendsExtends;\n};\n\nexport type CallWithResponsesResponse = CallWithResponsesResponses[keyof CallWithResponsesResponses];\n\nexport type CollectionFormatData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * This is an array parameter that is sent as csv format (comma-separated values)\n         */\n        parameterArrayCSV: Array<string> | null;\n        /**\n         * This is an array parameter that is sent as ssv format (space-separated values)\n         */\n        parameterArraySSV: Array<string> | null;\n        /**\n         * This is an array parameter that is sent as tsv format (tab-separated values)\n         */\n        parameterArrayTSV: Array<string> | null;\n        /**\n         * This is an array parameter that is sent as pipes format (pipe-separated values)\n         */\n        parameterArrayPipes: Array<string> | null;\n        /**\n         * This is an array parameter that is sent as multi format (multiple parameter instances)\n         */\n        parameterArrayMulti: Array<string> | null;\n    };\n    url: '/api/v{api-version}/collectionFormat';\n};\n\nexport type TypesData = {\n    body?: never;\n    path?: {\n        /**\n         * This is a number parameter\n         */\n        id?: number;\n    };\n    query: {\n        /**\n         * This is a number parameter\n         */\n        parameterNumber: number;\n        /**\n         * This is a string parameter\n         */\n        parameterString: string | null;\n        /**\n         * This is a boolean parameter\n         */\n        parameterBoolean: boolean | null;\n        /**\n         * This is an object parameter\n         */\n        parameterObject: {\n            [key: string]: unknown;\n        } | null;\n        /**\n         * This is an array parameter\n         */\n        parameterArray: Array<string> | null;\n        /**\n         * This is a dictionary parameter\n         */\n        parameterDictionary: {\n            [key: string]: unknown;\n        } | null;\n        /**\n         * This is an enum parameter\n         */\n        parameterEnum: 'Success' | 'Warning' | 'Error' | null;\n    };\n    url: '/api/v{api-version}/types';\n};\n\nexport type TypesResponses = {\n    /**\n     * Response is a simple number\n     */\n    200: number;\n    /**\n     * Response is a simple string\n     */\n    201: string;\n    /**\n     * Response is a simple boolean\n     */\n    202: boolean;\n    /**\n     * Response is a simple object\n     */\n    203: {\n        [key: string]: unknown;\n    };\n};\n\nexport type TypesResponse = TypesResponses[keyof TypesResponses];\n\nexport type UploadFileData = {\n    body: Blob | File;\n    path: {\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string | null;\n    };\n    query?: never;\n    url: '/api/v{api-version}/upload';\n};\n\nexport type UploadFileResponses = {\n    200: boolean;\n};\n\nexport type UploadFileResponse = UploadFileResponses[keyof UploadFileResponses];\n\nexport type FileResponseData = {\n    body?: never;\n    path: {\n        id: string;\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string;\n    };\n    query?: never;\n    url: '/api/v{api-version}/file/{id}';\n};\n\nexport type FileResponseResponses = {\n    /**\n     * Success\n     */\n    200: Blob | File;\n};\n\nexport type FileResponseResponse = FileResponseResponses[keyof FileResponseResponses];\n\nexport type ComplexTypesData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * Parameter containing object\n         */\n        parameterObject: {\n            first?: {\n                second?: {\n                    third?: string;\n                };\n            };\n        };\n        /**\n         * Parameter containing reference\n         */\n        parameterReference: ModelWithString;\n    };\n    url: '/api/v{api-version}/complex';\n};\n\nexport type ComplexTypesErrors = {\n    /**\n     * 400 `server` error\n     */\n    400: unknown;\n    /**\n     * 500 server error\n     */\n    500: unknown;\n};\n\nexport type ComplexTypesResponses = {\n    /**\n     * Successful response\n     */\n    200: Array<ModelWithString>;\n};\n\nexport type ComplexTypesResponse = ComplexTypesResponses[keyof ComplexTypesResponses];\n\nexport type MultipartResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multipart';\n};\n\nexport type MultipartResponseResponses = {\n    /**\n     * OK\n     */\n    200: {\n        file?: Blob | File;\n        metadata?: {\n            foo?: string;\n            bar?: string;\n        };\n    };\n};\n\nexport type MultipartResponseResponse = MultipartResponseResponses[keyof MultipartResponseResponses];\n\nexport type MultipartRequestData = {\n    body?: {\n        content?: Blob | File;\n        data?: ModelWithString | null;\n    };\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multipart';\n};\n\nexport type ComplexParamsData = {\n    body?: {\n        readonly key: string | null;\n        name: string | null;\n        enabled?: boolean;\n        type: 'Monkey' | 'Horse' | 'Bird';\n        listOfModels?: Array<ModelWithString> | null;\n        listOfStrings?: Array<string> | null;\n        parameters: ModelWithString | ModelWithEnum | ModelWithArray | ModelWithDictionary;\n        readonly user?: {\n            readonly id?: number;\n            readonly name?: string | null;\n        };\n    };\n    path: {\n        id: number;\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string;\n    };\n    query?: never;\n    url: '/api/v{api-version}/complex/{id}';\n};\n\nexport type ComplexParamsResponses = {\n    /**\n     * Success\n     */\n    200: ModelWithString;\n};\n\nexport type ComplexParamsResponse = ComplexParamsResponses[keyof ComplexParamsResponses];\n\nexport type CallWithResultFromHeaderData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/header';\n};\n\nexport type CallWithResultFromHeaderErrors = {\n    /**\n     * 400 server error\n     */\n    400: unknown;\n    /**\n     * 500 server error\n     */\n    500: unknown;\n};\n\nexport type CallWithResultFromHeaderResponses = {\n    /**\n     * Successful response\n     */\n    200: unknown;\n};\n\nexport type TestErrorCodeData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * Status code to return\n         */\n        status: number;\n    };\n    url: '/api/v{api-version}/error';\n};\n\nexport type TestErrorCodeErrors = {\n    /**\n     * Custom message: Internal Server Error\n     */\n    500: unknown;\n    /**\n     * Custom message: Not Implemented\n     */\n    501: unknown;\n    /**\n     * Custom message: Bad Gateway\n     */\n    502: unknown;\n    /**\n     * Custom message: Service Unavailable\n     */\n    503: unknown;\n};\n\nexport type TestErrorCodeResponses = {\n    /**\n     * Custom message: Successful response\n     */\n    200: unknown;\n};\n\nexport type NonAsciiæøåÆøÅöôêÊ字符串Data = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * Dummy input param\n         */\n        nonAsciiParamæøåÆØÅöôêÊ: number;\n    };\n    url: '/api/v{api-version}/non-ascii-æøåÆØÅöôêÊ字符串';\n};\n\nexport type NonAsciiæøåÆøÅöôêÊ字符串Responses = {\n    /**\n     * Successful response\n     */\n    200: Array<NonAsciiStringæøåÆøÅöôêÊ字符串>;\n};\n\nexport type NonAsciiæøåÆøÅöôêÊ字符串Response = NonAsciiæøåÆøÅöôêÊ字符串Responses[keyof NonAsciiæøåÆøÅöôêÊ字符串Responses];\n\nexport type PutWithFormUrlEncodedData = {\n    body: ArrayWithStrings;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/non-ascii-æøåÆØÅöôêÊ字符串';\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-next/sdk-client-optional/client/client.gen.ts",
    "content": "// 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<Response, unknown, ResolvedRequestOptions>();\n\n  const beforeRequest = async (options: RequestOptions) => {\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 url = buildUrl(opts);\n\n    return { opts, url };\n  };\n\n  // @ts-expect-error\n  const request: Client['request'] = async (options) => {\n    // @ts-expect-error\n    const { opts, url } = await beforeRequest(options);\n\n    for (const fn of interceptors.request.fns) {\n      if (fn) {\n        await fn(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    const requestInit: ReqInit = {\n      ...opts,\n      body: getValidRequestBody(opts),\n    };\n\n    let response = await _fetch(url, requestInit);\n\n    for (const fn of interceptors.response.fns) {\n      if (fn) {\n        response = await fn(response, opts);\n      }\n    }\n\n    const result = {\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 {\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 {\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 {\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, opts)) as string;\n      }\n    }\n\n    finalError = finalError || ({} as string);\n\n    if (opts.throwOnError) {\n      throw finalError;\n    }\n\n    return {\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        const requestInit = {\n          ...init,\n          method: init.method as Config['method'],\n          url,\n        };\n        for (const fn of interceptors.request.fns) {\n          if (fn) {\n            await fn(requestInit);\n            request = new Request(requestInit.url, requestInit);\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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-next/sdk-client-optional/client/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type { Auth } from '../core/auth.gen';\nexport type { QuerySerializerOptions } from '../core/bodySerializer.gen';\nexport {\n  formDataBodySerializer,\n  jsonBodySerializer,\n  urlSearchParamsBodySerializer,\n} from '../core/bodySerializer.gen';\nexport { buildClientParams } from '../core/params.gen';\nexport { serializeQueryKeyValue } from '../core/queryKeySerializer.gen';\nexport { createClient } from './client.gen';\nexport type {\n  Client,\n  ClientOptions,\n  Config,\n  CreateClientConfig,\n  Options,\n  RequestOptions,\n  RequestResult,\n  TDataShape,\n} from './types.gen';\nexport { createConfig } from './utils.gen';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-next/sdk-client-optional/client/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { Auth } from '../core/auth.gen';\nimport type {\n  ServerSentEventsOptions,\n  ServerSentEventsResult,\n} from '../core/serverSentEvents.gen';\nimport type { Client as CoreClient, Config as CoreConfig } from '../core/types.gen';\nimport type { Middleware } from './utils.gen';\n\nexport interface Config<T extends ClientOptions = ClientOptions>\n  extends Omit<RequestInit, 'body' | 'headers' | 'method'>, CoreConfig {\n  /**\n   * Base URL for all requests made by this client.\n   */\n  baseUrl?: T['baseUrl'];\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   * Return the response data parsed in a specified format. By default, `auto`\n   * will infer the appropriate method from the `Content-Type` response header.\n   * You can override this behavior with any of the {@link Body} methods.\n   * Select `stream` if you don't want to parse response data at all.\n   *\n   * @default 'auto'\n   */\n  parseAs?: 'arrayBuffer' | 'auto' | 'blob' | 'formData' | 'json' | 'stream' | 'text';\n  /**\n   * Throw an error instead of returning it in the response?\n   *\n   * @default false\n   */\n  throwOnError?: T['throwOnError'];\n}\n\nexport interface RequestOptions<\n  TData = unknown,\n  ThrowOnError extends boolean = boolean,\n  Url extends string = string,\n>\n  extends\n    Config<{\n      throwOnError: ThrowOnError;\n    }>,\n    Pick<\n      ServerSentEventsOptions<TData>,\n      | 'onRequest'\n      | 'onSseError'\n      | 'onSseEvent'\n      | 'sseDefaultRetryDelay'\n      | 'sseMaxRetryAttempts'\n      | 'sseMaxRetryDelay'\n    > {\n  /**\n   * Any body that you want to add to your request.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/fetch#body}\n   */\n  body?: unknown;\n  path?: Record<string, unknown>;\n  query?: Record<string, unknown>;\n  /**\n   * Security mechanism(s) to use for the request.\n   */\n  security?: ReadonlyArray<Auth>;\n  url: Url;\n}\n\nexport interface ResolvedRequestOptions<\n  ThrowOnError extends boolean = boolean,\n  Url extends string = string,\n> extends RequestOptions<unknown, ThrowOnError, Url> {\n  serializedBody?: string;\n}\n\nexport type RequestResult<\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = boolean,\n> = ThrowOnError extends true\n  ? Promise<{\n      data: TData extends Record<string, unknown> ? TData[keyof TData] : TData;\n      response: Response;\n    }>\n  : Promise<\n      (\n        | {\n            data: TData extends Record<string, unknown> ? TData[keyof TData] : TData;\n            error: undefined;\n          }\n        | {\n            data: undefined;\n            error: TError extends Record<string, unknown> ? TError[keyof TError] : TError;\n          }\n      ) & {\n        response: Response;\n      }\n    >;\n\nexport interface ClientOptions {\n  baseUrl?: string;\n  throwOnError?: boolean;\n}\n\ntype MethodFn = <TData = unknown, TError = unknown, ThrowOnError extends boolean = false>(\n  options: Omit<RequestOptions<TData, ThrowOnError>, 'method'>,\n) => RequestResult<TData, TError, ThrowOnError>;\n\ntype SseFn = <TData = unknown, TError = unknown, ThrowOnError extends boolean = false>(\n  options: Omit<RequestOptions<TData, ThrowOnError>, 'method'>,\n) => Promise<ServerSentEventsResult<TData, TError>>;\n\ntype RequestFn = <TData = unknown, TError = unknown, ThrowOnError extends boolean = false>(\n  options: Omit<RequestOptions<TData, ThrowOnError>, 'method'> &\n    Pick<Required<RequestOptions<TData, ThrowOnError>>, 'method'>,\n) => RequestResult<TData, TError, ThrowOnError>;\n\ntype BuildUrlFn = <\n  TData extends {\n    body?: unknown;\n    path?: Record<string, unknown>;\n    query?: Record<string, unknown>;\n    url: string;\n  },\n>(\n  options: TData & Options<TData>,\n) => string;\n\nexport type Client = CoreClient<RequestFn, Config, MethodFn, BuildUrlFn, SseFn> & {\n  interceptors: Middleware<Response, unknown, ResolvedRequestOptions>;\n};\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 = ClientOptions> = (\n  override?: Config<ClientOptions & T>,\n) => Config<Required<ClientOptions> & T>;\n\nexport interface TDataShape {\n  body?: unknown;\n  headers?: unknown;\n  path?: unknown;\n  query?: unknown;\n  url: string;\n}\n\ntype OmitKeys<T, K> = Pick<T, Exclude<keyof T, K>>;\n\nexport type Options<\n  TData extends TDataShape = TDataShape,\n  ThrowOnError extends boolean = boolean,\n  TResponse = unknown,\n> = OmitKeys<RequestOptions<TResponse, ThrowOnError>, 'body' | 'path' | 'query' | 'url'> &\n  ([TData] extends [never] ? unknown : Omit<TData, 'url'>);\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-next/sdk-client-optional/client/utils.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport { getAuthToken } from '../core/auth.gen';\nimport type {\n  QuerySerializer,\n  QuerySerializerOptions,\n} from '../core/bodySerializer.gen';\nimport { jsonBodySerializer } from '../core/bodySerializer.gen';\nimport {\n  serializeArrayParam,\n  serializeObjectParam,\n  serializePrimitiveParam,\n} from '../core/pathSerializer.gen';\nimport type { Client, ClientOptions, Config, RequestOptions } from './types.gen';\n\ninterface PathSerializer {\n  path: Record<string, unknown>;\n  url: string;\n}\n\nconst PATH_PARAM_RE = /\\{[^{}]+\\}/g;\n\ntype ArrayStyle = 'form' | 'spaceDelimited' | 'pipeDelimited';\ntype MatrixStyle = 'label' | 'matrix' | 'simple';\ntype ArraySeparatorStyle = ArrayStyle | MatrixStyle;\n\nconst 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 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    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  const url = 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  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 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 || typeof header !== 'object') {\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, Options> = (\n  error: Err,\n  response: Res,\n  options: Options,\n) => Err | Promise<Err>;\n\ntype ReqInterceptor<Options> = (options: Options) => void | Promise<void>;\n\ntype ResInterceptor<Res, Options> = (response: Res, options: Options) => 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<Res, Err, Options> {\n  error: Interceptors<ErrInterceptor<Err, Res, Options>>;\n  request: Interceptors<ReqInterceptor<Options>>;\n  response: Interceptors<ResInterceptor<Res, Options>>;\n}\n\nexport const createInterceptors = <Res, Err, Options>(): Middleware<Res, Err, Options> => ({\n  error: new Interceptors<ErrInterceptor<Err, Res, Options>>(),\n  request: new Interceptors<ReqInterceptor<Options>>(),\n  response: new Interceptors<ResInterceptor<Res, 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-next/sdk-client-optional/client.gen.ts",
    "content": "// 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: 'http://localhost:3000/base' }));\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-next/sdk-client-optional/core/auth.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-next/sdk-client-optional/core/bodySerializer.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-next/sdk-client-optional/core/params.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-next/sdk-client-optional/core/pathSerializer.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-next/sdk-client-optional/core/queryKeySerializer.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\n/**\n * JSON-friendly union that mirrors what Pinia Colada can hash.\n */\nexport type JsonValue =\n  | null\n  | string\n  | number\n  | boolean\n  | JsonValue[]\n  | { [key: string]: JsonValue };\n\n/**\n * Replacer that converts non-JSON values (bigint, Date, etc.) to safe substitutes.\n */\nexport const queryKeyJsonReplacer = (_key: string, value: unknown) => {\n  if (value === undefined || typeof value === 'function' || typeof value === 'symbol') {\n    return undefined;\n  }\n  if (typeof value === 'bigint') {\n    return value.toString();\n  }\n  if (value instanceof Date) {\n    return value.toISOString();\n  }\n  return value;\n};\n\n/**\n * Safely stringifies a value and parses it back into a JsonValue.\n */\nexport const stringifyToJsonValue = (input: unknown): JsonValue | undefined => {\n  try {\n    const json = JSON.stringify(input, queryKeyJsonReplacer);\n    if (json === undefined) {\n      return undefined;\n    }\n    return JSON.parse(json) as JsonValue;\n  } catch {\n    return undefined;\n  }\n};\n\n/**\n * Detects plain objects (including objects with a null prototype).\n */\nconst isPlainObject = (value: unknown): value is Record<string, unknown> => {\n  if (value === null || typeof value !== 'object') {\n    return false;\n  }\n  const prototype = Object.getPrototypeOf(value as object);\n  return prototype === Object.prototype || prototype === null;\n};\n\n/**\n * Turns URLSearchParams into a sorted JSON object for deterministic keys.\n */\nconst serializeSearchParams = (params: URLSearchParams): JsonValue => {\n  const entries = Array.from(params.entries()).sort(([a], [b]) => a.localeCompare(b));\n  const result: Record<string, JsonValue> = {};\n\n  for (const [key, value] of entries) {\n    const existing = result[key];\n    if (existing === undefined) {\n      result[key] = value;\n      continue;\n    }\n\n    if (Array.isArray(existing)) {\n      (existing as string[]).push(value);\n    } else {\n      result[key] = [existing, value];\n    }\n  }\n\n  return result;\n};\n\n/**\n * Normalizes any accepted value into a JSON-friendly shape for query keys.\n */\nexport const serializeQueryKeyValue = (value: unknown): JsonValue | undefined => {\n  if (value === null) {\n    return null;\n  }\n\n  if (typeof value === 'string' || typeof value === 'number' || typeof value === 'boolean') {\n    return value;\n  }\n\n  if (value === undefined || typeof value === 'function' || typeof value === 'symbol') {\n    return undefined;\n  }\n\n  if (typeof value === 'bigint') {\n    return value.toString();\n  }\n\n  if (value instanceof Date) {\n    return value.toISOString();\n  }\n\n  if (Array.isArray(value)) {\n    return stringifyToJsonValue(value);\n  }\n\n  if (typeof URLSearchParams !== 'undefined' && value instanceof URLSearchParams) {\n    return serializeSearchParams(value);\n  }\n\n  if (isPlainObject(value)) {\n    return stringifyToJsonValue(value);\n  }\n\n  return undefined;\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-next/sdk-client-optional/core/serverSentEvents.gen.ts",
    "content": "// 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 const 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            // Normalize line endings: CRLF -> LF, then CR -> LF\n            buffer = buffer.replace(/\\r\\n/g, '\\n').replace(/\\r/g, '\\n');\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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-next/sdk-client-optional/core/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { Auth, AuthToken } from './auth.gen';\nimport type { BodySerializer, QuerySerializer, QuerySerializerOptions } from './bodySerializer.gen';\n\nexport type HttpMethod =\n  | 'connect'\n  | 'delete'\n  | 'get'\n  | 'head'\n  | 'options'\n  | 'patch'\n  | 'post'\n  | 'put'\n  | 'trace';\n\nexport type Client<\n  RequestFn = never,\n  Config = unknown,\n  MethodFn = never,\n  BuildUrlFn = never,\n  SseFn = never,\n> = {\n  /**\n   * Returns the final request URL.\n   */\n  buildUrl: BuildUrlFn;\n  getConfig: () => Config;\n  request: RequestFn;\n  setConfig: (config: Config) => Config;\n} & {\n  [K in HttpMethod]: MethodFn;\n} & ([SseFn] extends [never] ? { sse?: never } : { sse: { [K in HttpMethod]: SseFn } });\n\nexport interface Config {\n  /**\n   * Auth token or a function returning auth token. The resolved value will be\n   * added to the request payload as defined by its `security` array.\n   */\n  auth?: ((auth: Auth) => Promise<AuthToken> | AuthToken) | AuthToken;\n  /**\n   * A function for serializing request body parameter. By default,\n   * {@link JSON.stringify()} will be used.\n   */\n  bodySerializer?: BodySerializer | null;\n  /**\n   * An object containing any HTTP headers that you want to pre-populate your\n   * `Headers` object with.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/Headers/Headers#init See more}\n   */\n  headers?:\n    | RequestInit['headers']\n    | Record<\n        string,\n        string | number | boolean | (string | number | boolean)[] | null | undefined | unknown\n      >;\n  /**\n   * The request method.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/fetch#method See more}\n   */\n  method?: Uppercase<HttpMethod>;\n  /**\n   * A function for serializing request query parameters. By default, arrays\n   * will be exploded in form style, objects will be exploded in deepObject\n   * style, and reserved characters are percent-encoded.\n   *\n   * This method will have no effect if the native `paramsSerializer()` Axios\n   * API function is used.\n   *\n   * {@link https://swagger.io/docs/specification/serialization/#query View examples}\n   */\n  querySerializer?: QuerySerializer | QuerySerializerOptions;\n  /**\n   * A function validating request data. This is useful if you want to ensure\n   * the request conforms to the desired shape, so it can be safely sent to\n   * the server.\n   */\n  requestValidator?: (data: unknown) => Promise<unknown>;\n  /**\n   * A function transforming response data before it's returned. This is useful\n   * for post-processing data, e.g. converting ISO strings into Date objects.\n   */\n  responseTransformer?: (data: unknown) => Promise<unknown>;\n  /**\n   * A function validating response data. This is useful if you want to ensure\n   * the response conforms to the desired shape, so it can be safely passed to\n   * the transformers and returned to the user.\n   */\n  responseValidator?: (data: unknown) => Promise<unknown>;\n}\n\ntype IsExactlyNeverOrNeverUndefined<T> = [T] extends [never]\n  ? true\n  : [T] extends [never | undefined]\n    ? [undefined] extends [T]\n      ? false\n      : true\n    : false;\n\nexport type OmitNever<T extends Record<string, unknown>> = {\n  [K in keyof T as IsExactlyNeverOrNeverUndefined<T[K]> extends true ? never : K]: T[K];\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-next/sdk-client-optional/core/utils.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-next/sdk-client-optional/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport { apiVVersionODataControllerCount, callToTestOrderOfParams, callWithDefaultOptionalParameters, callWithDefaultParameters, callWithDescriptions, callWithDuplicateResponses, callWithNoContentResponse, callWithParameters, callWithResponse, callWithResponseAndNoContentResponse, callWithResponses, callWithResultFromHeader, callWithWeirdParameterNames, collectionFormat, complexParams, complexTypes, deleteCallWithoutParametersAndResponse, deleteFoo, deprecatedCall, dummyA, dummyB, duplicateName, duplicateName2, duplicateName3, duplicateName4, export_, fileResponse, fooWow, getApiVbyApiVersionSimpleOperation, getCallWithOptionalParam, getCallWithoutParametersAndResponse, headCallWithoutParametersAndResponse, import_, multipartRequest, multipartResponse, nonAsciiæøåÆøÅöôêÊ字符串, type Options, optionsCallWithoutParametersAndResponse, patchApiVbyApiVersionNoTag, patchCallWithoutParametersAndResponse, postApiVbyApiVersionFormData, postApiVbyApiVersionRequestBody, postCallWithOptionalParam, postCallWithoutParametersAndResponse, putCallWithoutParametersAndResponse, putWithFormUrlEncoded, testErrorCode, types, uploadFile } from './sdk.gen';\nexport type { _3eNum1Период, _400, AdditionalPropertiesIntegerIssue, AdditionalPropertiesUnknownIssue, AdditionalPropertiesUnknownIssue2, AdditionalPropertiesUnknownIssue3, AdditionalPropertiesUnknownIssueWritable, AnyOfAnyAndNull, AnyOfArrays, ApiVVersionODataControllerCountData, ApiVVersionODataControllerCountResponse, ApiVVersionODataControllerCountResponses, ArrayWithAnyOfProperties, ArrayWithArray, ArrayWithBooleans, ArrayWithNumbers, ArrayWithProperties, ArrayWithReferences, ArrayWithStrings, CallToTestOrderOfParamsData, CallWithDefaultOptionalParametersData, CallWithDefaultParametersData, CallWithDescriptionsData, CallWithDuplicateResponsesData, CallWithDuplicateResponsesError, CallWithDuplicateResponsesErrors, CallWithDuplicateResponsesResponse, CallWithDuplicateResponsesResponses, CallWithNoContentResponseData, CallWithNoContentResponseResponse, CallWithNoContentResponseResponses, CallWithParametersData, CallWithResponseAndNoContentResponseData, CallWithResponseAndNoContentResponseResponse, CallWithResponseAndNoContentResponseResponses, CallWithResponseData, CallWithResponseResponse, CallWithResponseResponses, CallWithResponsesData, CallWithResponsesError, CallWithResponsesErrors, CallWithResponsesResponse, CallWithResponsesResponses, CallWithResultFromHeaderData, CallWithResultFromHeaderErrors, CallWithResultFromHeaderResponses, CallWithWeirdParameterNamesData, CamelCaseCommentWithBreaks, CharactersInDescription, ClientOptions, CollectionFormatData, CommentWithBackticks, CommentWithBackticksAndQuotes, CommentWithBreaks, CommentWithExpressionPlaceholders, CommentWithQuotes, CommentWithReservedCharacters, CommentWithSlashes, ComplexParamsData, ComplexParamsResponse, ComplexParamsResponses, ComplexTypesData, ComplexTypesErrors, ComplexTypesResponse, ComplexTypesResponses, CompositionBaseModel, CompositionExtendedModel, CompositionWithAllOfAndNullable, CompositionWithAnyOf, CompositionWithAnyOfAndNullable, CompositionWithAnyOfAnonymous, CompositionWithNestedAnyAndTypeNull, CompositionWithNestedAnyOfAndNull, CompositionWithOneOf, CompositionWithOneOfAndComplexArrayDictionary, CompositionWithOneOfAndNullable, CompositionWithOneOfAndProperties, CompositionWithOneOfAndSimpleArrayDictionary, CompositionWithOneOfAndSimpleDictionary, CompositionWithOneOfAnonymous, CompositionWithOneOfDiscriminator, ConstValue, Default, DeleteCallWithoutParametersAndResponseData, DeleteFooData, DeleteFooData2, DeleteFooData3, DeprecatedCallData, DeprecatedModel, DictionaryWithArray, DictionaryWithDictionary, DictionaryWithProperties, DictionaryWithPropertiesAndAdditionalProperties, DictionaryWithReference, DictionaryWithString, DummyAData, DummyAResponse, DummyAResponses, DummyBData, DummyBResponse, DummyBResponses, DuplicateName2Data, DuplicateName3Data, DuplicateName4Data, DuplicateNameData, EnumFromDescription, EnumWithExtensions, EnumWithNumbers, EnumWithReplacedCharacters, EnumWithStrings, EnumWithXEnumNames, ExportData, ExternalRefA, ExternalRefB, ExternalSharedModel, File, FileResponseData, FileResponseResponse, FileResponseResponses, FileWritable, FooWowData, FooWowResponses, FreeFormObjectWithAdditionalPropertiesEqEmptyObject, FreeFormObjectWithAdditionalPropertiesEqTrue, FreeFormObjectWithoutAdditionalProperties, GenericSchemaDuplicateIssue1SystemBoolean, GenericSchemaDuplicateIssue1SystemBooleanWritable, GenericSchemaDuplicateIssue1SystemString, GenericSchemaDuplicateIssue1SystemStringWritable, GetApiVbyApiVersionSimpleOperationData, GetApiVbyApiVersionSimpleOperationError, GetApiVbyApiVersionSimpleOperationErrors, GetApiVbyApiVersionSimpleOperationResponse, GetApiVbyApiVersionSimpleOperationResponses, GetCallWithOptionalParamData, GetCallWithoutParametersAndResponseData, HeadCallWithoutParametersAndResponseData, Import, ImportData, ImportResponse, ImportResponses, IoK8sApimachineryPkgApisMetaV1DeleteOptions, IoK8sApimachineryPkgApisMetaV1Preconditions, ModelCircle, ModelFromZendesk, ModelSquare, ModelThatExtends, ModelThatExtendsExtends, ModelWithAdditionalPropertiesEqTrue, ModelWithAdditionalPropertiesRef, ModelWithAnyOfConstantSizeArray, ModelWithAnyOfConstantSizeArrayAndIntersect, ModelWithAnyOfConstantSizeArrayNullable, ModelWithAnyOfConstantSizeArrayWithNSizeAndOptions, ModelWithAnyOfConstantSizeArrayWithNSizeAndOptionsWritable, ModelWithArray, ModelWithArrayReadOnlyAndWriteOnly, ModelWithArrayReadOnlyAndWriteOnlyWritable, ModelWithBackticksInDescription, ModelWithBoolean, ModelWithCircularReference, ModelWithConst, ModelWithConstantSizeArray, ModelWithDictionary, ModelWithDuplicateImports, ModelWithDuplicateProperties, ModelWithEnum, ModelWithEnumFromDescription, ModelWithEnumWithHyphen, ModelWithInteger, ModelWithNestedArrayEnums, ModelWithNestedArrayEnumsData, ModelWithNestedArrayEnumsDataBar, ModelWithNestedArrayEnumsDataFoo, ModelWithNestedCompositionEnums, ModelWithNestedEnums, ModelWithNestedProperties, ModelWithNullableObject, ModelWithNullableString, ModelWithNumericEnumUnion, ModelWithOneOfAndProperties, ModelWithOneOfEnum, ModelWithOrderedProperties, ModelWithPattern, ModelWithPatternWritable, ModelWithPrefixItemsConstantSizeArray, ModelWithProperties, ModelWithPropertiesWritable, ModelWithReadOnlyAndWriteOnly, ModelWithReadOnlyAndWriteOnlyWritable, ModelWithReference, ModelWithReferenceWritable, ModelWithString, ModelWithStringError, MultipartRequestData, MultipartResponseData, MultipartResponseResponse, MultipartResponseResponses, NestedAnyOfArraysNullable, NonAsciiæøåÆøÅöôêÊ字符串Data, NonAsciiæøåÆøÅöôêÊ字符串Response, NonAsciiæøåÆøÅöôêÊ字符串Responses, NonAsciiStringæøåÆøÅöôêÊ字符串, NullableObject, OneOfAllOfIssue, OneOfAllOfIssueWritable, OptionsCallWithoutParametersAndResponseData, Pageable, ParameterSimpleParameterUnused, PatchApiVbyApiVersionNoTagData, PatchApiVbyApiVersionNoTagResponses, PatchCallWithoutParametersAndResponseData, PostApiVbyApiVersionFormDataData, PostApiVbyApiVersionRequestBodyData, PostCallWithOptionalParamData, PostCallWithOptionalParamResponse, PostCallWithOptionalParamResponses, PostCallWithoutParametersAndResponseData, PostServiceWithEmptyTagResponse, PostServiceWithEmptyTagResponse2, PutCallWithoutParametersAndResponseData, PutWithFormUrlEncodedData, SchemaWithFormRestrictedKeys, SimpleBoolean, SimpleFile, SimpleFormData, SimpleInteger, SimpleParameter, SimpleReference, SimpleRequestBody, SimpleString, SimpleStringWithPattern, TestErrorCodeData, TestErrorCodeErrors, TestErrorCodeResponses, TypesData, TypesResponse, TypesResponses, UploadFileData, UploadFileResponse, UploadFileResponses, XFooBar } from './types.gen';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-next/sdk-client-optional/sdk.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport { type Client, formDataBodySerializer, type Options as Options2, type TDataShape, urlSearchParamsBodySerializer } from './client';\nimport { client } from './client.gen';\nimport type { ApiVVersionODataControllerCountData, ApiVVersionODataControllerCountResponses, CallToTestOrderOfParamsData, CallWithDefaultOptionalParametersData, CallWithDefaultParametersData, CallWithDescriptionsData, CallWithDuplicateResponsesData, CallWithDuplicateResponsesErrors, CallWithDuplicateResponsesResponses, CallWithNoContentResponseData, CallWithNoContentResponseResponses, CallWithParametersData, CallWithResponseAndNoContentResponseData, CallWithResponseAndNoContentResponseResponses, CallWithResponseData, CallWithResponseResponses, CallWithResponsesData, CallWithResponsesErrors, CallWithResponsesResponses, CallWithResultFromHeaderData, CallWithResultFromHeaderErrors, CallWithResultFromHeaderResponses, CallWithWeirdParameterNamesData, CollectionFormatData, ComplexParamsData, ComplexParamsResponses, ComplexTypesData, ComplexTypesErrors, ComplexTypesResponses, DeleteCallWithoutParametersAndResponseData, DeleteFooData3, DeprecatedCallData, DummyAData, DummyAResponses, DummyBData, DummyBResponses, DuplicateName2Data, DuplicateName3Data, DuplicateName4Data, DuplicateNameData, ExportData, FileResponseData, FileResponseResponses, FooWowData, FooWowResponses, GetApiVbyApiVersionSimpleOperationData, GetApiVbyApiVersionSimpleOperationErrors, GetApiVbyApiVersionSimpleOperationResponses, GetCallWithOptionalParamData, GetCallWithoutParametersAndResponseData, HeadCallWithoutParametersAndResponseData, ImportData, ImportResponses, MultipartRequestData, MultipartResponseData, MultipartResponseResponses, NonAsciiæøåÆøÅöôêÊ字符串Data, NonAsciiæøåÆøÅöôêÊ字符串Responses, OptionsCallWithoutParametersAndResponseData, PatchApiVbyApiVersionNoTagData, PatchApiVbyApiVersionNoTagResponses, PatchCallWithoutParametersAndResponseData, PostApiVbyApiVersionFormDataData, PostApiVbyApiVersionRequestBodyData, PostCallWithOptionalParamData, PostCallWithOptionalParamResponses, PostCallWithoutParametersAndResponseData, PutCallWithoutParametersAndResponseData, PutWithFormUrlEncodedData, TestErrorCodeData, TestErrorCodeErrors, TestErrorCodeResponses, TypesData, TypesResponses, UploadFileData, UploadFileResponses } from './types.gen';\n\nexport type Options<TData extends TDataShape = TDataShape, ThrowOnError extends boolean = boolean> = Options2<TData, ThrowOnError> & {\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\nexport const export_ = <ThrowOnError extends boolean = false>(options?: Options<ExportData, ThrowOnError>) => (options?.client ?? client).get<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/no+tag', ...options });\n\nexport const patchApiVbyApiVersionNoTag = <ThrowOnError extends boolean = false>(options?: Options<PatchApiVbyApiVersionNoTagData, ThrowOnError>) => (options?.client ?? client).patch<PatchApiVbyApiVersionNoTagResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/no+tag', ...options });\n\nexport const import_ = <ThrowOnError extends boolean = false>(options: Options<ImportData, ThrowOnError>) => (options.client ?? client).post<ImportResponses, unknown, ThrowOnError>({\n    url: '/api/v{api-version}/no+tag',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options.headers\n    }\n});\n\nexport const fooWow = <ThrowOnError extends boolean = false>(options?: Options<FooWowData, ThrowOnError>) => (options?.client ?? client).put<FooWowResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/no+tag', ...options });\n\nexport const apiVVersionODataControllerCount = <ThrowOnError extends boolean = false>(options?: Options<ApiVVersionODataControllerCountData, ThrowOnError>) => (options?.client ?? client).get<ApiVVersionODataControllerCountResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple/$count', ...options });\n\nexport const getApiVbyApiVersionSimpleOperation = <ThrowOnError extends boolean = false>(options: Options<GetApiVbyApiVersionSimpleOperationData, ThrowOnError>) => (options.client ?? client).get<GetApiVbyApiVersionSimpleOperationResponses, GetApiVbyApiVersionSimpleOperationErrors, ThrowOnError>({ url: '/api/v{api-version}/simple:operation', ...options });\n\nexport const deleteCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<DeleteCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).delete<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const getCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<GetCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).get<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const headCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<HeadCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).head<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const optionsCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<OptionsCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).options<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const patchCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<PatchCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).patch<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const postCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<PostCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).post<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const putCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<PutCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).put<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const deleteFoo = <ThrowOnError extends boolean = false>(options: Options<DeleteFooData3, ThrowOnError>) => (options.client ?? client).delete<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/foo/{foo_param}/bar/{BarParam}', ...options });\n\nexport const callWithDescriptions = <ThrowOnError extends boolean = false>(options?: Options<CallWithDescriptionsData, ThrowOnError>) => (options?.client ?? client).post<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/descriptions', ...options });\n\n/**\n * @deprecated\n */\nexport const deprecatedCall = <ThrowOnError extends boolean = false>(options: Options<DeprecatedCallData, ThrowOnError>) => (options.client ?? client).post<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/parameters/deprecated', ...options });\n\nexport const callWithParameters = <ThrowOnError extends boolean = false>(options: Options<CallWithParametersData, ThrowOnError>) => (options.client ?? client).post<unknown, unknown, ThrowOnError>({\n    url: '/api/v{api-version}/parameters/{parameterPath}',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options.headers\n    }\n});\n\nexport const callWithWeirdParameterNames = <ThrowOnError extends boolean = false>(options: Options<CallWithWeirdParameterNamesData, ThrowOnError>) => (options.client ?? client).post<unknown, unknown, ThrowOnError>({\n    url: '/api/v{api-version}/parameters/{parameter.path.1}/{parameter-path-2}/{PARAMETER-PATH-3}',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options.headers\n    }\n});\n\nexport const getCallWithOptionalParam = <ThrowOnError extends boolean = false>(options: Options<GetCallWithOptionalParamData, ThrowOnError>) => (options.client ?? client).get<unknown, unknown, ThrowOnError>({\n    url: '/api/v{api-version}/parameters',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options.headers\n    }\n});\n\nexport const postCallWithOptionalParam = <ThrowOnError extends boolean = false>(options: Options<PostCallWithOptionalParamData, ThrowOnError>) => (options.client ?? client).post<PostCallWithOptionalParamResponses, unknown, ThrowOnError>({\n    url: '/api/v{api-version}/parameters',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options.headers\n    }\n});\n\nexport const postApiVbyApiVersionRequestBody = <ThrowOnError extends boolean = false>(options?: Options<PostApiVbyApiVersionRequestBodyData, ThrowOnError>) => (options?.client ?? client).post<unknown, unknown, ThrowOnError>({\n    url: '/api/v{api-version}/requestBody',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options?.headers\n    }\n});\n\nexport const postApiVbyApiVersionFormData = <ThrowOnError extends boolean = false>(options?: Options<PostApiVbyApiVersionFormDataData, ThrowOnError>) => (options?.client ?? client).post<unknown, unknown, ThrowOnError>({\n    ...formDataBodySerializer,\n    url: '/api/v{api-version}/formData',\n    ...options,\n    headers: {\n        'Content-Type': null,\n        ...options?.headers\n    }\n});\n\nexport const callWithDefaultParameters = <ThrowOnError extends boolean = false>(options?: Options<CallWithDefaultParametersData, ThrowOnError>) => (options?.client ?? client).get<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/defaults', ...options });\n\nexport const callWithDefaultOptionalParameters = <ThrowOnError extends boolean = false>(options?: Options<CallWithDefaultOptionalParametersData, ThrowOnError>) => (options?.client ?? client).post<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/defaults', ...options });\n\nexport const callToTestOrderOfParams = <ThrowOnError extends boolean = false>(options: Options<CallToTestOrderOfParamsData, ThrowOnError>) => (options.client ?? client).put<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/defaults', ...options });\n\nexport const duplicateName = <ThrowOnError extends boolean = false>(options?: Options<DuplicateNameData, ThrowOnError>) => (options?.client ?? client).delete<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/duplicate', ...options });\n\nexport const duplicateName2 = <ThrowOnError extends boolean = false>(options?: Options<DuplicateName2Data, ThrowOnError>) => (options?.client ?? client).get<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/duplicate', ...options });\n\nexport const duplicateName3 = <ThrowOnError extends boolean = false>(options?: Options<DuplicateName3Data, ThrowOnError>) => (options?.client ?? client).post<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/duplicate', ...options });\n\nexport const duplicateName4 = <ThrowOnError extends boolean = false>(options?: Options<DuplicateName4Data, ThrowOnError>) => (options?.client ?? client).put<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/duplicate', ...options });\n\nexport const callWithNoContentResponse = <ThrowOnError extends boolean = false>(options?: Options<CallWithNoContentResponseData, ThrowOnError>) => (options?.client ?? client).get<CallWithNoContentResponseResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/no-content', ...options });\n\nexport const callWithResponseAndNoContentResponse = <ThrowOnError extends boolean = false>(options?: Options<CallWithResponseAndNoContentResponseData, ThrowOnError>) => (options?.client ?? client).get<CallWithResponseAndNoContentResponseResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/multiple-tags/response-and-no-content', ...options });\n\nexport const dummyA = <ThrowOnError extends boolean = false>(options?: Options<DummyAData, ThrowOnError>) => (options?.client ?? client).get<DummyAResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/multiple-tags/a', ...options });\n\nexport const dummyB = <ThrowOnError extends boolean = false>(options?: Options<DummyBData, ThrowOnError>) => (options?.client ?? client).get<DummyBResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/multiple-tags/b', ...options });\n\nexport const callWithResponse = <ThrowOnError extends boolean = false>(options?: Options<CallWithResponseData, ThrowOnError>) => (options?.client ?? client).get<CallWithResponseResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/response', ...options });\n\nexport const callWithDuplicateResponses = <ThrowOnError extends boolean = false>(options?: Options<CallWithDuplicateResponsesData, ThrowOnError>) => (options?.client ?? client).post<CallWithDuplicateResponsesResponses, CallWithDuplicateResponsesErrors, ThrowOnError>({ url: '/api/v{api-version}/response', ...options });\n\nexport const callWithResponses = <ThrowOnError extends boolean = false>(options?: Options<CallWithResponsesData, ThrowOnError>) => (options?.client ?? client).put<CallWithResponsesResponses, CallWithResponsesErrors, ThrowOnError>({ url: '/api/v{api-version}/response', ...options });\n\nexport const collectionFormat = <ThrowOnError extends boolean = false>(options: Options<CollectionFormatData, ThrowOnError>) => (options.client ?? client).get<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/collectionFormat', ...options });\n\nexport const types = <ThrowOnError extends boolean = false>(options: Options<TypesData, ThrowOnError>) => (options.client ?? client).get<TypesResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/types', ...options });\n\nexport const uploadFile = <ThrowOnError extends boolean = false>(options: Options<UploadFileData, ThrowOnError>) => (options.client ?? client).post<UploadFileResponses, unknown, ThrowOnError>({\n    ...urlSearchParamsBodySerializer,\n    url: '/api/v{api-version}/upload',\n    ...options,\n    headers: {\n        'Content-Type': 'application/x-www-form-urlencoded',\n        ...options.headers\n    }\n});\n\nexport const fileResponse = <ThrowOnError extends boolean = false>(options: Options<FileResponseData, ThrowOnError>) => (options.client ?? client).get<FileResponseResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/file/{id}', ...options });\n\nexport const complexTypes = <ThrowOnError extends boolean = false>(options: Options<ComplexTypesData, ThrowOnError>) => (options.client ?? client).get<ComplexTypesResponses, ComplexTypesErrors, ThrowOnError>({\n    querySerializer: { parameters: { parameterObject: { object: { style: 'form' } } } },\n    url: '/api/v{api-version}/complex',\n    ...options\n});\n\nexport const multipartResponse = <ThrowOnError extends boolean = false>(options?: Options<MultipartResponseData, ThrowOnError>) => (options?.client ?? client).get<MultipartResponseResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/multipart', ...options });\n\nexport const multipartRequest = <ThrowOnError extends boolean = false>(options?: Options<MultipartRequestData, ThrowOnError>) => (options?.client ?? client).post<unknown, unknown, ThrowOnError>({\n    ...formDataBodySerializer,\n    url: '/api/v{api-version}/multipart',\n    ...options,\n    headers: {\n        'Content-Type': null,\n        ...options?.headers\n    }\n});\n\nexport const complexParams = <ThrowOnError extends boolean = false>(options: Options<ComplexParamsData, ThrowOnError>) => (options.client ?? client).put<ComplexParamsResponses, unknown, ThrowOnError>({\n    url: '/api/v{api-version}/complex/{id}',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json-patch+json',\n        ...options.headers\n    }\n});\n\nexport const callWithResultFromHeader = <ThrowOnError extends boolean = false>(options?: Options<CallWithResultFromHeaderData, ThrowOnError>) => (options?.client ?? client).post<CallWithResultFromHeaderResponses, CallWithResultFromHeaderErrors, ThrowOnError>({ url: '/api/v{api-version}/header', ...options });\n\nexport const testErrorCode = <ThrowOnError extends boolean = false>(options: Options<TestErrorCodeData, ThrowOnError>) => (options.client ?? client).post<TestErrorCodeResponses, TestErrorCodeErrors, ThrowOnError>({ url: '/api/v{api-version}/error', ...options });\n\nexport const nonAsciiæøåÆøÅöôêÊ字符串 = <ThrowOnError extends boolean = false>(options: Options<NonAsciiæøåÆøÅöôêÊ字符串Data, ThrowOnError>) => (options.client ?? client).post<NonAsciiæøåÆøÅöôêÊ字符串Responses, unknown, ThrowOnError>({ url: '/api/v{api-version}/non-ascii-æøåÆØÅöôêÊ字符串', ...options });\n\n/**\n * Login User\n */\nexport const putWithFormUrlEncoded = <ThrowOnError extends boolean = false>(options: Options<PutWithFormUrlEncodedData, ThrowOnError>) => (options.client ?? client).put<unknown, unknown, ThrowOnError>({\n    ...urlSearchParamsBodySerializer,\n    url: '/api/v{api-version}/non-ascii-æøåÆØÅöôêÊ字符串',\n    ...options,\n    headers: {\n        'Content-Type': 'application/x-www-form-urlencoded',\n        ...options.headers\n    }\n});\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-next/sdk-client-optional/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type ClientOptions = {\n    baseUrl: 'http://localhost:3000/base' | (string & {});\n};\n\n/**\n * Model with number-only name\n */\nexport type _400 = string;\n\n/**\n * External ref to shared model (A)\n */\nexport type ExternalRefA = ExternalSharedModel;\n\n/**\n * External ref to shared model (B)\n */\nexport type ExternalRefB = ExternalSharedModel;\n\n/**\n * Testing multiline comments in string: First line\n * Second line\n *\n * Fourth line\n */\nexport type CamelCaseCommentWithBreaks = number;\n\n/**\n * Testing multiline comments in string: First line\n * Second line\n *\n * Fourth line\n */\nexport type CommentWithBreaks = number;\n\n/**\n * Testing backticks in string: `backticks` and ```multiple backticks``` should work\n */\nexport type CommentWithBackticks = number;\n\n/**\n * Testing backticks and quotes in string: `backticks`, 'quotes', \"double quotes\" and ```multiple backticks``` should work\n */\nexport type CommentWithBackticksAndQuotes = number;\n\n/**\n * Testing slashes in string: \\backwards\\\\\\ and /forwards/// should work\n */\nexport type CommentWithSlashes = number;\n\n/**\n * Testing expression placeholders in string: ${expression} should work\n */\nexport type CommentWithExpressionPlaceholders = number;\n\n/**\n * Testing quotes in string: 'single quote''' and \"double quotes\"\"\" should work\n */\nexport type CommentWithQuotes = number;\n\n/**\n * Testing reserved characters in string: * inline * and ** inline ** should work\n */\nexport type CommentWithReservedCharacters = number;\n\n/**\n * This is a simple number\n */\nexport type SimpleInteger = number;\n\n/**\n * This is a simple boolean\n */\nexport type SimpleBoolean = boolean;\n\n/**\n * This is a simple string\n */\nexport type SimpleString = string;\n\n/**\n * A string with non-ascii (unicode) characters valid in typescript identifiers (æøåÆØÅöÔèÈ字符串)\n */\nexport type NonAsciiStringæøåÆøÅöôêÊ字符串 = string;\n\n/**\n * This is a simple file\n */\nexport type SimpleFile = Blob | File;\n\n/**\n * This is a simple reference\n */\nexport type SimpleReference = ModelWithString;\n\n/**\n * This is a simple string\n */\nexport type SimpleStringWithPattern = string | null;\n\n/**\n * This is a simple enum with strings\n */\nexport type EnumWithStrings = 'Success' | 'Warning' | 'Error' | '\\'Single Quote\\'' | '\"Double Quotes\"' | 'Non-ascii: øæåôöØÆÅÔÖ字符串';\n\nexport type EnumWithReplacedCharacters = '\\'Single Quote\\'' | '\"Double Quotes\"' | 'øæåôöØÆÅÔÖ字符串' | 3.1 | '';\n\n/**\n * This is a simple enum with numbers\n */\nexport type EnumWithNumbers = 1 | 2 | 3 | 1.1 | 1.2 | 1.3 | 100 | 200 | 300 | -100 | -200 | -300 | -1.1 | -1.2 | -1.3;\n\n/**\n * Success=1,Warning=2,Error=3\n */\nexport type EnumFromDescription = number;\n\n/**\n * This is a simple enum with numbers\n */\nexport type EnumWithExtensions = 200 | 400 | 500;\n\nexport type EnumWithXEnumNames = 0 | 1 | 2;\n\n/**\n * This is a simple array with numbers\n */\nexport type ArrayWithNumbers = Array<number>;\n\n/**\n * This is a simple array with booleans\n */\nexport type ArrayWithBooleans = Array<boolean>;\n\n/**\n * This is a simple array with strings\n */\nexport type ArrayWithStrings = Array<string>;\n\n/**\n * This is a simple array with references\n */\nexport type ArrayWithReferences = Array<ModelWithString>;\n\n/**\n * This is a simple array containing an array\n */\nexport type ArrayWithArray = Array<Array<ModelWithString>>;\n\n/**\n * This is a simple array with properties\n */\nexport type ArrayWithProperties = Array<{\n    '16x16'?: CamelCaseCommentWithBreaks;\n    bar?: string;\n}>;\n\n/**\n * This is a simple array with any of properties\n */\nexport type ArrayWithAnyOfProperties = Array<{\n    foo?: string;\n} | {\n    bar?: string;\n}>;\n\nexport type AnyOfAnyAndNull = {\n    data?: unknown | null;\n};\n\n/**\n * This is a simple array with any of properties\n */\nexport type AnyOfArrays = {\n    results?: Array<{\n        foo?: string;\n    } | {\n        bar?: string;\n    }>;\n};\n\n/**\n * This is a string dictionary\n */\nexport type DictionaryWithString = {\n    [key: string]: string;\n};\n\nexport type DictionaryWithPropertiesAndAdditionalProperties = {\n    foo?: number;\n    bar?: boolean;\n    [key: string]: string | number | boolean | undefined;\n};\n\n/**\n * This is a string reference\n */\nexport type DictionaryWithReference = {\n    [key: string]: ModelWithString;\n};\n\n/**\n * This is a complex dictionary\n */\nexport type DictionaryWithArray = {\n    [key: string]: Array<ModelWithString>;\n};\n\n/**\n * This is a string dictionary\n */\nexport type DictionaryWithDictionary = {\n    [key: string]: {\n        [key: string]: string;\n    };\n};\n\n/**\n * This is a complex dictionary\n */\nexport type DictionaryWithProperties = {\n    [key: string]: {\n        foo?: string;\n        bar?: string;\n    };\n};\n\n/**\n * This is a model with one number property\n */\nexport type ModelWithInteger = {\n    /**\n     * This is a simple number property\n     */\n    prop?: number;\n};\n\n/**\n * This is a model with one boolean property\n */\nexport type ModelWithBoolean = {\n    /**\n     * This is a simple boolean property\n     */\n    prop?: boolean;\n};\n\n/**\n * This is a model with one string property\n */\nexport type ModelWithString = {\n    /**\n     * This is a simple string property\n     */\n    prop?: string;\n};\n\n/**\n * This is a model with one string property\n */\nexport type ModelWithStringError = {\n    /**\n     * This is a simple string property\n     */\n    prop?: string;\n};\n\n/**\n * `Comment` or `VoiceComment`. The JSON object for adding voice comments to tickets is different. See [Adding voice comments to tickets](/documentation/ticketing/managing-tickets/adding-voice-comments-to-tickets)\n */\nexport type ModelFromZendesk = string;\n\n/**\n * This is a model with one string property\n */\nexport type ModelWithNullableString = {\n    /**\n     * This is a simple string property\n     */\n    nullableProp1?: string | null;\n    /**\n     * This is a simple string property\n     */\n    nullableRequiredProp1: string | null;\n    /**\n     * This is a simple string property\n     */\n    nullableProp2?: string | null;\n    /**\n     * This is a simple string property\n     */\n    nullableRequiredProp2: string | null;\n    /**\n     * This is a simple enum with strings\n     */\n    'foo_bar-enum'?: 'Success' | 'Warning' | 'Error' | 'ØÆÅ字符串';\n};\n\n/**\n * This is a model with one enum\n */\nexport type ModelWithEnum = {\n    /**\n     * This is a simple enum with strings\n     */\n    'foo_bar-enum'?: 'Success' | 'Warning' | 'Error' | 'ØÆÅ字符串';\n    /**\n     * These are the HTTP error code enums\n     */\n    statusCode?: '100' | '200 FOO' | '300 FOO_BAR' | '400 foo-bar' | '500 foo.bar' | '600 foo&bar';\n    /**\n     * Simple boolean enum\n     */\n    bool?: true;\n};\n\n/**\n * This is a model with one enum with escaped name\n */\nexport type ModelWithEnumWithHyphen = {\n    /**\n     * Foo-Bar-Baz-Qux\n     */\n    'foo-bar-baz-qux'?: '3.0';\n};\n\n/**\n * This is a model with one enum\n */\nexport type ModelWithEnumFromDescription = {\n    /**\n     * Success=1,Warning=2,Error=3\n     */\n    test?: number;\n};\n\n/**\n * This is a model with nested enums\n */\nexport type ModelWithNestedEnums = {\n    dictionaryWithEnum?: {\n        [key: string]: 'Success' | 'Warning' | 'Error';\n    };\n    dictionaryWithEnumFromDescription?: {\n        [key: string]: number;\n    };\n    arrayWithEnum?: Array<'Success' | 'Warning' | 'Error'>;\n    arrayWithDescription?: Array<number>;\n    /**\n     * This is a simple enum with strings\n     */\n    'foo_bar-enum'?: 'Success' | 'Warning' | 'Error' | 'ØÆÅ字符串';\n};\n\n/**\n * This is a model with one property containing a reference\n */\nexport type ModelWithReference = {\n    prop?: ModelWithProperties;\n};\n\n/**\n * This is a model with one property containing an array\n */\nexport type ModelWithArrayReadOnlyAndWriteOnly = {\n    prop?: Array<ModelWithReadOnlyAndWriteOnly>;\n    propWithFile?: Array<Blob | File>;\n    propWithNumber?: Array<number>;\n};\n\n/**\n * This is a model with one property containing an array\n */\nexport type ModelWithArray = {\n    prop?: Array<ModelWithString>;\n    propWithFile?: Array<Blob | File>;\n    propWithNumber?: Array<number>;\n};\n\n/**\n * This is a model with one property containing a dictionary\n */\nexport type ModelWithDictionary = {\n    prop?: {\n        [key: string]: string;\n    };\n};\n\n/**\n * This is a deprecated model with a deprecated property\n *\n * @deprecated\n */\nexport type DeprecatedModel = {\n    /**\n     * This is a deprecated property\n     *\n     * @deprecated\n     */\n    prop?: string;\n};\n\n/**\n * This is a model with one property containing a circular reference\n */\nexport type ModelWithCircularReference = {\n    prop?: ModelWithCircularReference;\n};\n\n/**\n * This is a model with one property with a 'one of' relationship\n */\nexport type CompositionWithOneOf = {\n    propA?: ModelWithString | ModelWithEnum | ModelWithArray | ModelWithDictionary;\n};\n\n/**\n * This is a model with one property with a 'one of' relationship where the options are not $ref\n */\nexport type CompositionWithOneOfAnonymous = {\n    propA?: {\n        propA?: string;\n    } | string | number;\n};\n\n/**\n * Circle\n */\nexport type ModelCircle = {\n    kind: string;\n    radius?: number;\n};\n\n/**\n * Square\n */\nexport type ModelSquare = {\n    kind: string;\n    sideLength?: number;\n};\n\n/**\n * This is a model with one property with a 'one of' relationship where the options are not $ref\n */\nexport type CompositionWithOneOfDiscriminator = ({\n    kind: 'circle';\n} & ModelCircle) | ({\n    kind: 'square';\n} & ModelSquare);\n\n/**\n * This is a model with one property with a 'any of' relationship\n */\nexport type CompositionWithAnyOf = {\n    propA?: ModelWithString | ModelWithEnum | ModelWithArray | ModelWithDictionary;\n};\n\n/**\n * This is a model with one property with a 'any of' relationship where the options are not $ref\n */\nexport type CompositionWithAnyOfAnonymous = {\n    propA?: {\n        propA?: string;\n    } | string | number;\n};\n\n/**\n * This is a model with nested 'any of' property with a type null\n */\nexport type CompositionWithNestedAnyAndTypeNull = {\n    propA?: Array<ModelWithDictionary | null> | Array<ModelWithArray | null>;\n};\n\nexport type _3eNum1Период = 'Bird' | 'Dog';\n\nexport type ConstValue = 'ConstValue';\n\n/**\n * This is a model with one property with a 'any of' relationship where the options are not $ref\n */\nexport type CompositionWithNestedAnyOfAndNull = {\n    /**\n     * Scopes\n     */\n    propA?: Array<_3eNum1Период | ConstValue> | null;\n};\n\n/**\n * This is a model with one property with a 'one of' relationship\n */\nexport type CompositionWithOneOfAndNullable = {\n    propA?: {\n        boolean?: boolean;\n    } | ModelWithEnum | ModelWithArray | ModelWithDictionary | null;\n};\n\n/**\n * This is a model that contains a simple dictionary within composition\n */\nexport type CompositionWithOneOfAndSimpleDictionary = {\n    propA?: boolean | {\n        [key: string]: number;\n    };\n};\n\n/**\n * This is a model that contains a dictionary of simple arrays within composition\n */\nexport type CompositionWithOneOfAndSimpleArrayDictionary = {\n    propA?: boolean | {\n        [key: string]: Array<boolean>;\n    };\n};\n\n/**\n * This is a model that contains a dictionary of complex arrays (composited) within composition\n */\nexport type CompositionWithOneOfAndComplexArrayDictionary = {\n    propA?: boolean | {\n        [key: string]: Array<number | string>;\n    };\n};\n\n/**\n * This is a model with one property with a 'all of' relationship\n */\nexport type CompositionWithAllOfAndNullable = {\n    propA?: ({\n        boolean?: boolean;\n    } & ModelWithEnum & ModelWithArray & ModelWithDictionary) | null;\n};\n\n/**\n * This is a model with one property with a 'any of' relationship\n */\nexport type CompositionWithAnyOfAndNullable = {\n    propA?: {\n        boolean?: boolean;\n    } | ModelWithEnum | ModelWithArray | ModelWithDictionary | null;\n};\n\n/**\n * This is a base model with two simple optional properties\n */\nexport type CompositionBaseModel = {\n    firstName?: string;\n    lastname?: string;\n};\n\n/**\n * This is a model that extends the base model\n */\nexport type CompositionExtendedModel = CompositionBaseModel & {\n    age: number;\n    firstName: string;\n    lastname: string;\n};\n\n/**\n * This is a model with one nested property\n */\nexport type ModelWithProperties = {\n    required: string;\n    readonly requiredAndReadOnly: string;\n    requiredAndNullable: string | null;\n    string?: string;\n    number?: number;\n    boolean?: boolean;\n    reference?: ModelWithString;\n    'property with space'?: string;\n    default?: string;\n    try?: string;\n    readonly '@namespace.string'?: string;\n    readonly '@namespace.integer'?: number;\n};\n\n/**\n * This is a model with one nested property\n */\nexport type ModelWithNestedProperties = {\n    readonly first: {\n        readonly second: {\n            readonly third: string | null;\n        } | null;\n    } | null;\n};\n\n/**\n * This is a model with duplicated properties\n */\nexport type ModelWithDuplicateProperties = {\n    prop?: ModelWithString;\n};\n\n/**\n * This is a model with ordered properties\n */\nexport type ModelWithOrderedProperties = {\n    zebra?: string;\n    apple?: string;\n    hawaii?: string;\n};\n\n/**\n * This is a model with duplicated imports\n */\nexport type ModelWithDuplicateImports = {\n    propA?: ModelWithString;\n    propB?: ModelWithString;\n    propC?: ModelWithString;\n};\n\n/**\n * This is a model that extends another model\n */\nexport type ModelThatExtends = ModelWithString & {\n    propExtendsA?: string;\n    propExtendsB?: ModelWithString;\n};\n\n/**\n * This is a model that extends another model\n */\nexport type ModelThatExtendsExtends = ModelWithString & ModelThatExtends & {\n    propExtendsC?: string;\n    propExtendsD?: ModelWithString;\n};\n\n/**\n * This is a model that contains a some patterns\n */\nexport type ModelWithPattern = {\n    key: string;\n    name: string;\n    readonly enabled?: boolean;\n    readonly modified?: string;\n    id?: string;\n    text?: string;\n    patternWithSingleQuotes?: string;\n    patternWithNewline?: string;\n    patternWithBacktick?: string;\n    patternWithUnicode?: string;\n};\n\nexport type File = {\n    /**\n     * Id\n     */\n    readonly id?: string;\n    /**\n     * Updated at\n     */\n    readonly updated_at?: string;\n    /**\n     * Created at\n     */\n    readonly created_at?: string;\n    /**\n     * Mime\n     */\n    mime: string;\n    /**\n     * File\n     */\n    readonly file?: string;\n};\n\nexport type Default = {\n    name?: string;\n};\n\nexport type Pageable = {\n    page?: number;\n    size?: number;\n    sort?: Array<string>;\n};\n\n/**\n * This is a free-form object without additionalProperties.\n */\nexport type FreeFormObjectWithoutAdditionalProperties = {\n    [key: string]: unknown;\n};\n\n/**\n * This is a free-form object with additionalProperties: true.\n */\nexport type FreeFormObjectWithAdditionalPropertiesEqTrue = {\n    [key: string]: unknown;\n};\n\n/**\n * This is a free-form object with additionalProperties: {}.\n */\nexport type FreeFormObjectWithAdditionalPropertiesEqEmptyObject = {\n    [key: string]: unknown;\n};\n\nexport type ModelWithConst = {\n    String?: 'String';\n    number?: 0;\n    null?: null;\n    withType?: 'Some string';\n};\n\n/**\n * This is a model with one property and additionalProperties: true\n */\nexport type ModelWithAdditionalPropertiesEqTrue = {\n    /**\n     * This is a simple string property\n     */\n    prop?: string;\n    [key: string]: unknown;\n};\n\nexport type NestedAnyOfArraysNullable = {\n    nullableArray?: Array<string | boolean> | null;\n};\n\nexport type CompositionWithOneOfAndProperties = ({\n    foo: SimpleParameter;\n} | {\n    bar: NonAsciiStringæøåÆøÅöôêÊ字符串;\n}) & {\n    baz: number | null;\n    qux: number;\n};\n\n/**\n * An object that can be null\n */\nexport type NullableObject = {\n    foo?: string;\n} | null;\n\n/**\n * Some % character\n */\nexport type CharactersInDescription = string;\n\nexport type ModelWithNullableObject = {\n    data?: NullableObject;\n};\n\n/**\n * An object with additional properties that can be null (anyOf ref + null)\n */\nexport type ModelWithAdditionalPropertiesRef = {\n    [key: string]: NullableObject | null;\n};\n\nexport type ModelWithOneOfEnum = {\n    foo: 'Bar';\n} | {\n    foo: 'Baz';\n} | {\n    foo: 'Qux';\n} | {\n    content: string;\n    foo: 'Quux';\n} | {\n    content: [\n        string,\n        string\n    ];\n    foo: 'Corge';\n};\n\nexport type ModelWithNestedArrayEnumsDataFoo = 'foo' | 'bar';\n\nexport type ModelWithNestedArrayEnumsDataBar = 'baz' | 'qux';\n\nexport type ModelWithNestedArrayEnumsData = {\n    foo?: Array<ModelWithNestedArrayEnumsDataFoo>;\n    bar?: Array<ModelWithNestedArrayEnumsDataBar>;\n};\n\nexport type ModelWithNestedArrayEnums = {\n    array_strings?: Array<string>;\n    data?: ModelWithNestedArrayEnumsData;\n};\n\nexport type ModelWithNestedCompositionEnums = {\n    foo?: ModelWithNestedArrayEnumsDataFoo;\n};\n\nexport type ModelWithReadOnlyAndWriteOnly = {\n    foo: string;\n    readonly bar: string;\n};\n\nexport type ModelWithConstantSizeArray = [\n    number,\n    number\n];\n\nexport type ModelWithAnyOfConstantSizeArray = [\n    number | string,\n    number | string,\n    number | string\n];\n\nexport type ModelWithPrefixItemsConstantSizeArray = [\n    ModelWithInteger,\n    number | string,\n    string\n];\n\nexport type ModelWithAnyOfConstantSizeArrayNullable = [\n    number | null | string,\n    number | null | string,\n    number | null | string\n];\n\nexport type ModelWithAnyOfConstantSizeArrayWithNSizeAndOptions = [\n    number | Import,\n    number | Import\n];\n\nexport type ModelWithAnyOfConstantSizeArrayAndIntersect = [\n    number & string,\n    number & string\n];\n\nexport type ModelWithNumericEnumUnion = {\n    /**\n     * Период\n     */\n    value?: -10 | -1 | 0 | 1 | 3 | 6 | 12;\n};\n\n/**\n * Some description with `back ticks`\n */\nexport type ModelWithBackticksInDescription = {\n    /**\n     * The template `that` should be used for parsing and importing the contents of the CSV file.\n     *\n     * <br/><p>There is one placeholder currently supported:<ul>     <li><b>${x}</b> - refers to the n-th column in the CSV file, e.g. ${1}, ${2}, ...)</li></ul><p>Example of a correct JSON template:</p>\n     * <pre>\n     * [\n     * {\n     * \"resourceType\": \"Asset\",\n     * \"identifier\": {\n     * \"name\": \"${1}\",\n     * \"domain\": {\n     * \"name\": \"${2}\",\n     * \"community\": {\n     * \"name\": \"Some Community\"\n     * }\n     * }\n     * },\n     * \"attributes\" : {\n     * \"00000000-0000-0000-0000-000000003115\" : [ {\n     * \"value\" : \"${3}\"\n     * } ],\n     * \"00000000-0000-0000-0000-000000000222\" : [ {\n     * \"value\" : \"${4}\"\n     * } ]\n     * }\n     * }\n     * ]\n     * </pre>\n     */\n    template?: string;\n};\n\nexport type ModelWithOneOfAndProperties = (SimpleParameter | NonAsciiStringæøåÆøÅöôêÊ字符串) & {\n    baz: number | null;\n    qux: number;\n};\n\n/**\n * Model used to test deduplication strategy (unused)\n */\nexport type ParameterSimpleParameterUnused = string;\n\n/**\n * Model used to test deduplication strategy\n */\nexport type PostServiceWithEmptyTagResponse = string;\n\n/**\n * Model used to test deduplication strategy\n */\nexport type PostServiceWithEmptyTagResponse2 = string;\n\n/**\n * Model used to test deduplication strategy\n */\nexport type DeleteFooData = string;\n\n/**\n * Model used to test deduplication strategy\n */\nexport type DeleteFooData2 = string;\n\n/**\n * Model with restricted keyword name\n */\nexport type Import = string;\n\nexport type SchemaWithFormRestrictedKeys = {\n    description?: string;\n    'x-enum-descriptions'?: string;\n    'x-enum-varnames'?: string;\n    'x-enumNames'?: string;\n    title?: string;\n    object?: {\n        description?: string;\n        'x-enum-descriptions'?: string;\n        'x-enum-varnames'?: string;\n        'x-enumNames'?: string;\n        title?: string;\n    };\n    array?: Array<{\n        description?: string;\n        'x-enum-descriptions'?: string;\n        'x-enum-varnames'?: string;\n        'x-enumNames'?: string;\n        title?: string;\n    }>;\n};\n\n/**\n * This schema was giving PascalCase transformations a hard time\n */\nexport type IoK8sApimachineryPkgApisMetaV1DeleteOptions = {\n    /**\n     * Must be fulfilled before a deletion is carried out. If not possible, a 409 Conflict status will be returned.\n     */\n    preconditions?: IoK8sApimachineryPkgApisMetaV1Preconditions;\n};\n\n/**\n * This schema was giving PascalCase transformations a hard time\n */\nexport type IoK8sApimachineryPkgApisMetaV1Preconditions = {\n    /**\n     * Specifies the target ResourceVersion\n     */\n    resourceVersion?: string;\n    /**\n     * Specifies the target UID.\n     */\n    uid?: string;\n};\n\nexport type AdditionalPropertiesUnknownIssue = {\n    [key: string]: string | number;\n};\n\nexport type AdditionalPropertiesUnknownIssue2 = {\n    [key: string]: string | number;\n};\n\nexport type AdditionalPropertiesUnknownIssue3 = string & {\n    entries: {\n        [key: string]: AdditionalPropertiesUnknownIssue;\n    };\n};\n\nexport type AdditionalPropertiesIntegerIssue = {\n    value: number;\n    [key: string]: number;\n};\n\nexport type OneOfAllOfIssue = ((ConstValue | GenericSchemaDuplicateIssue1SystemBoolean) & _3eNum1Период) | GenericSchemaDuplicateIssue1SystemString;\n\nexport type GenericSchemaDuplicateIssue1SystemBoolean = {\n    item?: boolean;\n    error?: string | null;\n    readonly hasError?: boolean;\n    data?: {\n        [key: string]: never;\n    };\n};\n\nexport type GenericSchemaDuplicateIssue1SystemString = {\n    item?: string | null;\n    error?: string | null;\n    readonly hasError?: boolean;\n};\n\nexport type ExternalSharedModel = {\n    id: string;\n    name?: string;\n};\n\n/**\n * This is a model with one property containing a reference\n */\nexport type ModelWithReferenceWritable = {\n    prop?: ModelWithPropertiesWritable;\n};\n\n/**\n * This is a model with one property containing an array\n */\nexport type ModelWithArrayReadOnlyAndWriteOnlyWritable = {\n    prop?: Array<ModelWithReadOnlyAndWriteOnlyWritable>;\n    propWithFile?: Array<Blob | File>;\n    propWithNumber?: Array<number>;\n};\n\n/**\n * This is a model with one nested property\n */\nexport type ModelWithPropertiesWritable = {\n    required: string;\n    requiredAndNullable: string | null;\n    string?: string;\n    number?: number;\n    boolean?: boolean;\n    reference?: ModelWithString;\n    'property with space'?: string;\n    default?: string;\n    try?: string;\n};\n\n/**\n * This is a model that contains a some patterns\n */\nexport type ModelWithPatternWritable = {\n    key: string;\n    name: string;\n    id?: string;\n    text?: string;\n    patternWithSingleQuotes?: string;\n    patternWithNewline?: string;\n    patternWithBacktick?: string;\n    patternWithUnicode?: string;\n};\n\nexport type FileWritable = {\n    /**\n     * Mime\n     */\n    mime: string;\n};\n\nexport type ModelWithReadOnlyAndWriteOnlyWritable = {\n    foo: string;\n    baz: string;\n};\n\nexport type ModelWithAnyOfConstantSizeArrayWithNSizeAndOptionsWritable = [\n    number | Import,\n    number | Import\n];\n\nexport type AdditionalPropertiesUnknownIssueWritable = {\n    [key: string]: string | number;\n};\n\nexport type OneOfAllOfIssueWritable = ((ConstValue | GenericSchemaDuplicateIssue1SystemBoolean) & _3eNum1Период) | GenericSchemaDuplicateIssue1SystemString;\n\nexport type GenericSchemaDuplicateIssue1SystemBooleanWritable = {\n    item?: boolean;\n    error?: string | null;\n    data?: {\n        [key: string]: never;\n    };\n};\n\nexport type GenericSchemaDuplicateIssue1SystemStringWritable = {\n    item?: string | null;\n    error?: string | null;\n};\n\n/**\n * This is a reusable parameter\n */\nexport type SimpleParameter = string;\n\n/**\n * Parameter with illegal characters\n */\nexport type XFooBar = ModelWithString;\n\n/**\n * A reusable request body\n */\nexport type SimpleRequestBody = ModelWithString;\n\n/**\n * A reusable request body\n */\nexport type SimpleFormData = ModelWithString;\n\nexport type ExportData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no+tag';\n};\n\nexport type PatchApiVbyApiVersionNoTagData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no+tag';\n};\n\nexport type PatchApiVbyApiVersionNoTagResponses = {\n    /**\n     * OK\n     */\n    default: unknown;\n};\n\nexport type ImportData = {\n    body: ModelWithReadOnlyAndWriteOnlyWritable | ModelWithArrayReadOnlyAndWriteOnlyWritable;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no+tag';\n};\n\nexport type ImportResponses = {\n    /**\n     * Success\n     */\n    200: ModelFromZendesk;\n    /**\n     * Default success response\n     */\n    default: ModelWithReadOnlyAndWriteOnly;\n};\n\nexport type ImportResponse = ImportResponses[keyof ImportResponses];\n\nexport type FooWowData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no+tag';\n};\n\nexport type FooWowResponses = {\n    /**\n     * OK\n     */\n    default: unknown;\n};\n\nexport type ApiVVersionODataControllerCountData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple/$count';\n};\n\nexport type ApiVVersionODataControllerCountResponses = {\n    /**\n     * Success\n     */\n    200: ModelFromZendesk;\n};\n\nexport type ApiVVersionODataControllerCountResponse = ApiVVersionODataControllerCountResponses[keyof ApiVVersionODataControllerCountResponses];\n\nexport type GetApiVbyApiVersionSimpleOperationData = {\n    body?: never;\n    path: {\n        /**\n         * foo in method\n         */\n        foo_param: string;\n    };\n    query?: never;\n    url: '/api/v{api-version}/simple:operation';\n};\n\nexport type GetApiVbyApiVersionSimpleOperationErrors = {\n    /**\n     * Default error response\n     */\n    default: ModelWithBoolean;\n};\n\nexport type GetApiVbyApiVersionSimpleOperationError = GetApiVbyApiVersionSimpleOperationErrors[keyof GetApiVbyApiVersionSimpleOperationErrors];\n\nexport type GetApiVbyApiVersionSimpleOperationResponses = {\n    /**\n     * Response is a simple number\n     */\n    200: number;\n};\n\nexport type GetApiVbyApiVersionSimpleOperationResponse = GetApiVbyApiVersionSimpleOperationResponses[keyof GetApiVbyApiVersionSimpleOperationResponses];\n\nexport type DeleteCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type GetCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type HeadCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type OptionsCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type PatchCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type PostCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type PutCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type DeleteFooData3 = {\n    body?: never;\n    headers: {\n        /**\n         * Parameter with illegal characters\n         */\n        'x-Foo-Bar': ModelWithString;\n    };\n    path: {\n        /**\n         * foo in method\n         */\n        foo_param: string;\n        /**\n         * bar in method\n         */\n        BarParam: string;\n    };\n    query?: never;\n    url: '/api/v{api-version}/foo/{foo_param}/bar/{BarParam}';\n};\n\nexport type CallWithDescriptionsData = {\n    body?: never;\n    path?: never;\n    query?: {\n        /**\n         * Testing multiline comments in string: First line\n         * Second line\n         *\n         * Fourth line\n         */\n        parameterWithBreaks?: string;\n        /**\n         * Testing backticks in string: `backticks` and ```multiple backticks``` should work\n         */\n        parameterWithBackticks?: string;\n        /**\n         * Testing slashes in string: \\backwards\\\\\\ and /forwards/// should work\n         */\n        parameterWithSlashes?: string;\n        /**\n         * Testing expression placeholders in string: ${expression} should work\n         */\n        parameterWithExpressionPlaceholders?: string;\n        /**\n         * Testing quotes in string: 'single quote''' and \"double quotes\"\"\" should work\n         */\n        parameterWithQuotes?: string;\n        /**\n         * Testing reserved characters in string: * inline * and ** inline ** should work\n         */\n        parameterWithReservedCharacters?: string;\n    };\n    url: '/api/v{api-version}/descriptions';\n};\n\nexport type DeprecatedCallData = {\n    body?: never;\n    headers: {\n        /**\n         * This parameter is deprecated\n         *\n         * @deprecated\n         */\n        parameter: DeprecatedModel | null;\n    };\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/parameters/deprecated';\n};\n\nexport type CallWithParametersData = {\n    /**\n     * This is the parameter that goes into the body\n     */\n    body: {\n        [key: string]: unknown;\n    } | null;\n    headers: {\n        /**\n         * This is the parameter that goes into the header\n         */\n        parameterHeader: string | null;\n    };\n    path: {\n        /**\n         * This is the parameter that goes into the path\n         */\n        parameterPath: string | null;\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string | null;\n    };\n    query: {\n        foo_ref_enum?: ModelWithNestedArrayEnumsDataFoo;\n        foo_all_of_enum: ModelWithNestedArrayEnumsDataFoo;\n        /**\n         * This is the parameter that goes into the query params\n         */\n        cursor: string | null;\n    };\n    url: '/api/v{api-version}/parameters/{parameterPath}';\n};\n\nexport type CallWithWeirdParameterNamesData = {\n    /**\n     * This is the parameter that goes into the body\n     */\n    body: ModelWithString | null;\n    headers: {\n        /**\n         * This is the parameter that goes into the request header\n         */\n        'parameter.header': string | null;\n    };\n    path: {\n        /**\n         * This is the parameter that goes into the path\n         */\n        'parameter.path.1'?: string;\n        /**\n         * This is the parameter that goes into the path\n         */\n        'parameter-path-2'?: string;\n        /**\n         * This is the parameter that goes into the path\n         */\n        'PARAMETER-PATH-3'?: string;\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string | null;\n    };\n    query: {\n        /**\n         * This is the parameter with a reserved keyword\n         */\n        default?: string;\n        /**\n         * This is the parameter that goes into the request query params\n         */\n        'parameter-query': string | null;\n    };\n    url: '/api/v{api-version}/parameters/{parameter.path.1}/{parameter-path-2}/{PARAMETER-PATH-3}';\n};\n\nexport type GetCallWithOptionalParamData = {\n    /**\n     * This is a required parameter\n     */\n    body: ModelWithOneOfEnum;\n    path?: never;\n    query?: {\n        /**\n         * This is an optional parameter\n         */\n        page?: number;\n    };\n    url: '/api/v{api-version}/parameters';\n};\n\nexport type PostCallWithOptionalParamData = {\n    /**\n     * This is an optional parameter\n     */\n    body?: {\n        offset?: number | null;\n    };\n    path?: never;\n    query: {\n        /**\n         * This is a required parameter\n         */\n        parameter: Pageable;\n    };\n    url: '/api/v{api-version}/parameters';\n};\n\nexport type PostCallWithOptionalParamResponses = {\n    /**\n     * Response is a simple number\n     */\n    200: number;\n    /**\n     * Success\n     */\n    204: void;\n};\n\nexport type PostCallWithOptionalParamResponse = PostCallWithOptionalParamResponses[keyof PostCallWithOptionalParamResponses];\n\nexport type PostApiVbyApiVersionRequestBodyData = {\n    /**\n     * A reusable request body\n     */\n    body?: SimpleRequestBody;\n    path?: never;\n    query?: {\n        /**\n         * This is a reusable parameter\n         */\n        parameter?: string;\n    };\n    url: '/api/v{api-version}/requestBody';\n};\n\nexport type PostApiVbyApiVersionFormDataData = {\n    /**\n     * A reusable request body\n     */\n    body?: SimpleFormData;\n    path?: never;\n    query?: {\n        /**\n         * This is a reusable parameter\n         */\n        parameter?: string;\n    };\n    url: '/api/v{api-version}/formData';\n};\n\nexport type CallWithDefaultParametersData = {\n    body?: never;\n    path?: never;\n    query?: {\n        /**\n         * This is a simple string with default value\n         */\n        parameterString?: string | null;\n        /**\n         * This is a simple number with default value\n         */\n        parameterNumber?: number | null;\n        /**\n         * This is a simple boolean with default value\n         */\n        parameterBoolean?: boolean | null;\n        /**\n         * This is a simple enum with default value\n         */\n        parameterEnum?: 'Success' | 'Warning' | 'Error';\n        /**\n         * This is a simple model with default value\n         */\n        parameterModel?: ModelWithString | null;\n    };\n    url: '/api/v{api-version}/defaults';\n};\n\nexport type CallWithDefaultOptionalParametersData = {\n    body?: never;\n    path?: never;\n    query?: {\n        /**\n         * This is a simple string that is optional with default value\n         */\n        parameterString?: string;\n        /**\n         * This is a simple number that is optional with default value\n         */\n        parameterNumber?: number;\n        /**\n         * This is a simple boolean that is optional with default value\n         */\n        parameterBoolean?: boolean;\n        /**\n         * This is a simple enum that is optional with default value\n         */\n        parameterEnum?: 'Success' | 'Warning' | 'Error';\n        /**\n         * This is a simple model that is optional with default value\n         */\n        parameterModel?: ModelWithString;\n    };\n    url: '/api/v{api-version}/defaults';\n};\n\nexport type CallToTestOrderOfParamsData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * This is a optional string with default\n         */\n        parameterOptionalStringWithDefault?: string;\n        /**\n         * This is a optional string with empty default\n         */\n        parameterOptionalStringWithEmptyDefault?: string;\n        /**\n         * This is a optional string with no default\n         */\n        parameterOptionalStringWithNoDefault?: string;\n        /**\n         * This is a string with default\n         */\n        parameterStringWithDefault: string;\n        /**\n         * This is a string with empty default\n         */\n        parameterStringWithEmptyDefault: string;\n        /**\n         * This is a string with no default\n         */\n        parameterStringWithNoDefault: string;\n        /**\n         * This is a string that can be null with no default\n         */\n        parameterStringNullableWithNoDefault?: string | null;\n        /**\n         * This is a string that can be null with default\n         */\n        parameterStringNullableWithDefault?: string | null;\n    };\n    url: '/api/v{api-version}/defaults';\n};\n\nexport type DuplicateNameData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/duplicate';\n};\n\nexport type DuplicateName2Data = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/duplicate';\n};\n\nexport type DuplicateName3Data = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/duplicate';\n};\n\nexport type DuplicateName4Data = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/duplicate';\n};\n\nexport type CallWithNoContentResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no-content';\n};\n\nexport type CallWithNoContentResponseResponses = {\n    /**\n     * Success\n     */\n    204: void;\n};\n\nexport type CallWithNoContentResponseResponse = CallWithNoContentResponseResponses[keyof CallWithNoContentResponseResponses];\n\nexport type CallWithResponseAndNoContentResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multiple-tags/response-and-no-content';\n};\n\nexport type CallWithResponseAndNoContentResponseResponses = {\n    /**\n     * Response is a simple number\n     */\n    200: number;\n    /**\n     * Success\n     */\n    204: void;\n};\n\nexport type CallWithResponseAndNoContentResponseResponse = CallWithResponseAndNoContentResponseResponses[keyof CallWithResponseAndNoContentResponseResponses];\n\nexport type DummyAData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multiple-tags/a';\n};\n\nexport type DummyAResponses = {\n    200: _400;\n};\n\nexport type DummyAResponse = DummyAResponses[keyof DummyAResponses];\n\nexport type DummyBData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multiple-tags/b';\n};\n\nexport type DummyBResponses = {\n    /**\n     * Success\n     */\n    204: void;\n};\n\nexport type DummyBResponse = DummyBResponses[keyof DummyBResponses];\n\nexport type CallWithResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/response';\n};\n\nexport type CallWithResponseResponses = {\n    default: Import;\n};\n\nexport type CallWithResponseResponse = CallWithResponseResponses[keyof CallWithResponseResponses];\n\nexport type CallWithDuplicateResponsesData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/response';\n};\n\nexport type CallWithDuplicateResponsesErrors = {\n    /**\n     * Message for 500 error\n     */\n    500: ModelWithStringError;\n    /**\n     * Message for 501 error\n     */\n    501: ModelWithStringError;\n    /**\n     * Message for 502 error\n     */\n    502: ModelWithStringError;\n    /**\n     * Message for 4XX errors\n     */\n    '4XX': DictionaryWithArray;\n    /**\n     * Default error response\n     */\n    default: ModelWithBoolean;\n};\n\nexport type CallWithDuplicateResponsesError = CallWithDuplicateResponsesErrors[keyof CallWithDuplicateResponsesErrors];\n\nexport type CallWithDuplicateResponsesResponses = {\n    /**\n     * Message for 200 response\n     */\n    200: ModelWithBoolean & ModelWithInteger;\n    /**\n     * Message for 201 response\n     */\n    201: ModelWithString;\n    /**\n     * Message for 202 response\n     */\n    202: ModelWithString;\n};\n\nexport type CallWithDuplicateResponsesResponse = CallWithDuplicateResponsesResponses[keyof CallWithDuplicateResponsesResponses];\n\nexport type CallWithResponsesData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/response';\n};\n\nexport type CallWithResponsesErrors = {\n    /**\n     * Message for 500 error\n     */\n    500: ModelWithStringError;\n    /**\n     * Message for 501 error\n     */\n    501: ModelWithStringError;\n    /**\n     * Message for 502 error\n     */\n    502: ModelWithStringError;\n    /**\n     * Message for default response\n     */\n    default: ModelWithStringError;\n};\n\nexport type CallWithResponsesError = CallWithResponsesErrors[keyof CallWithResponsesErrors];\n\nexport type CallWithResponsesResponses = {\n    /**\n     * Message for 200 response\n     */\n    200: {\n        readonly '@namespace.string'?: string;\n        readonly '@namespace.integer'?: number;\n        readonly value?: Array<ModelWithString>;\n    };\n    /**\n     * Message for 201 response\n     */\n    201: ModelThatExtends;\n    /**\n     * Message for 202 response\n     */\n    202: ModelThatExtendsExtends;\n};\n\nexport type CallWithResponsesResponse = CallWithResponsesResponses[keyof CallWithResponsesResponses];\n\nexport type CollectionFormatData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * This is an array parameter that is sent as csv format (comma-separated values)\n         */\n        parameterArrayCSV: Array<string> | null;\n        /**\n         * This is an array parameter that is sent as ssv format (space-separated values)\n         */\n        parameterArraySSV: Array<string> | null;\n        /**\n         * This is an array parameter that is sent as tsv format (tab-separated values)\n         */\n        parameterArrayTSV: Array<string> | null;\n        /**\n         * This is an array parameter that is sent as pipes format (pipe-separated values)\n         */\n        parameterArrayPipes: Array<string> | null;\n        /**\n         * This is an array parameter that is sent as multi format (multiple parameter instances)\n         */\n        parameterArrayMulti: Array<string> | null;\n    };\n    url: '/api/v{api-version}/collectionFormat';\n};\n\nexport type TypesData = {\n    body?: never;\n    path?: {\n        /**\n         * This is a number parameter\n         */\n        id?: number;\n    };\n    query: {\n        /**\n         * This is a number parameter\n         */\n        parameterNumber: number;\n        /**\n         * This is a string parameter\n         */\n        parameterString: string | null;\n        /**\n         * This is a boolean parameter\n         */\n        parameterBoolean: boolean | null;\n        /**\n         * This is an object parameter\n         */\n        parameterObject: {\n            [key: string]: unknown;\n        } | null;\n        /**\n         * This is an array parameter\n         */\n        parameterArray: Array<string> | null;\n        /**\n         * This is a dictionary parameter\n         */\n        parameterDictionary: {\n            [key: string]: unknown;\n        } | null;\n        /**\n         * This is an enum parameter\n         */\n        parameterEnum: 'Success' | 'Warning' | 'Error' | null;\n    };\n    url: '/api/v{api-version}/types';\n};\n\nexport type TypesResponses = {\n    /**\n     * Response is a simple number\n     */\n    200: number;\n    /**\n     * Response is a simple string\n     */\n    201: string;\n    /**\n     * Response is a simple boolean\n     */\n    202: boolean;\n    /**\n     * Response is a simple object\n     */\n    203: {\n        [key: string]: unknown;\n    };\n};\n\nexport type TypesResponse = TypesResponses[keyof TypesResponses];\n\nexport type UploadFileData = {\n    body: Blob | File;\n    path: {\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string | null;\n    };\n    query?: never;\n    url: '/api/v{api-version}/upload';\n};\n\nexport type UploadFileResponses = {\n    200: boolean;\n};\n\nexport type UploadFileResponse = UploadFileResponses[keyof UploadFileResponses];\n\nexport type FileResponseData = {\n    body?: never;\n    path: {\n        id: string;\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string;\n    };\n    query?: never;\n    url: '/api/v{api-version}/file/{id}';\n};\n\nexport type FileResponseResponses = {\n    /**\n     * Success\n     */\n    200: Blob | File;\n};\n\nexport type FileResponseResponse = FileResponseResponses[keyof FileResponseResponses];\n\nexport type ComplexTypesData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * Parameter containing object\n         */\n        parameterObject: {\n            first?: {\n                second?: {\n                    third?: string;\n                };\n            };\n        };\n        /**\n         * Parameter containing reference\n         */\n        parameterReference: ModelWithString;\n    };\n    url: '/api/v{api-version}/complex';\n};\n\nexport type ComplexTypesErrors = {\n    /**\n     * 400 `server` error\n     */\n    400: unknown;\n    /**\n     * 500 server error\n     */\n    500: unknown;\n};\n\nexport type ComplexTypesResponses = {\n    /**\n     * Successful response\n     */\n    200: Array<ModelWithString>;\n};\n\nexport type ComplexTypesResponse = ComplexTypesResponses[keyof ComplexTypesResponses];\n\nexport type MultipartResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multipart';\n};\n\nexport type MultipartResponseResponses = {\n    /**\n     * OK\n     */\n    200: {\n        file?: Blob | File;\n        metadata?: {\n            foo?: string;\n            bar?: string;\n        };\n    };\n};\n\nexport type MultipartResponseResponse = MultipartResponseResponses[keyof MultipartResponseResponses];\n\nexport type MultipartRequestData = {\n    body?: {\n        content?: Blob | File;\n        data?: ModelWithString | null;\n    };\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multipart';\n};\n\nexport type ComplexParamsData = {\n    body?: {\n        readonly key: string | null;\n        name: string | null;\n        enabled?: boolean;\n        type: 'Monkey' | 'Horse' | 'Bird';\n        listOfModels?: Array<ModelWithString> | null;\n        listOfStrings?: Array<string> | null;\n        parameters: ModelWithString | ModelWithEnum | ModelWithArray | ModelWithDictionary;\n        readonly user?: {\n            readonly id?: number;\n            readonly name?: string | null;\n        };\n    };\n    path: {\n        id: number;\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string;\n    };\n    query?: never;\n    url: '/api/v{api-version}/complex/{id}';\n};\n\nexport type ComplexParamsResponses = {\n    /**\n     * Success\n     */\n    200: ModelWithString;\n};\n\nexport type ComplexParamsResponse = ComplexParamsResponses[keyof ComplexParamsResponses];\n\nexport type CallWithResultFromHeaderData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/header';\n};\n\nexport type CallWithResultFromHeaderErrors = {\n    /**\n     * 400 server error\n     */\n    400: unknown;\n    /**\n     * 500 server error\n     */\n    500: unknown;\n};\n\nexport type CallWithResultFromHeaderResponses = {\n    /**\n     * Successful response\n     */\n    200: unknown;\n};\n\nexport type TestErrorCodeData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * Status code to return\n         */\n        status: number;\n    };\n    url: '/api/v{api-version}/error';\n};\n\nexport type TestErrorCodeErrors = {\n    /**\n     * Custom message: Internal Server Error\n     */\n    500: unknown;\n    /**\n     * Custom message: Not Implemented\n     */\n    501: unknown;\n    /**\n     * Custom message: Bad Gateway\n     */\n    502: unknown;\n    /**\n     * Custom message: Service Unavailable\n     */\n    503: unknown;\n};\n\nexport type TestErrorCodeResponses = {\n    /**\n     * Custom message: Successful response\n     */\n    200: unknown;\n};\n\nexport type NonAsciiæøåÆøÅöôêÊ字符串Data = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * Dummy input param\n         */\n        nonAsciiParamæøåÆØÅöôêÊ: number;\n    };\n    url: '/api/v{api-version}/non-ascii-æøåÆØÅöôêÊ字符串';\n};\n\nexport type NonAsciiæøåÆøÅöôêÊ字符串Responses = {\n    /**\n     * Successful response\n     */\n    200: Array<NonAsciiStringæøåÆøÅöôêÊ字符串>;\n};\n\nexport type NonAsciiæøåÆøÅöôêÊ字符串Response = NonAsciiæøåÆøÅöôêÊ字符串Responses[keyof NonAsciiæøåÆøÅöôêÊ字符串Responses];\n\nexport type PutWithFormUrlEncodedData = {\n    body: ArrayWithStrings;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/non-ascii-æøåÆØÅöôêÊ字符串';\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-next/sdk-client-required/client/client.gen.ts",
    "content": "// 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<Response, unknown, ResolvedRequestOptions>();\n\n  const beforeRequest = async (options: RequestOptions) => {\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 url = buildUrl(opts);\n\n    return { opts, url };\n  };\n\n  // @ts-expect-error\n  const request: Client['request'] = async (options) => {\n    // @ts-expect-error\n    const { opts, url } = await beforeRequest(options);\n\n    for (const fn of interceptors.request.fns) {\n      if (fn) {\n        await fn(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    const requestInit: ReqInit = {\n      ...opts,\n      body: getValidRequestBody(opts),\n    };\n\n    let response = await _fetch(url, requestInit);\n\n    for (const fn of interceptors.response.fns) {\n      if (fn) {\n        response = await fn(response, opts);\n      }\n    }\n\n    const result = {\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 {\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 {\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 {\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, opts)) as string;\n      }\n    }\n\n    finalError = finalError || ({} as string);\n\n    if (opts.throwOnError) {\n      throw finalError;\n    }\n\n    return {\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        const requestInit = {\n          ...init,\n          method: init.method as Config['method'],\n          url,\n        };\n        for (const fn of interceptors.request.fns) {\n          if (fn) {\n            await fn(requestInit);\n            request = new Request(requestInit.url, requestInit);\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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-next/sdk-client-required/client/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type { Auth } from '../core/auth.gen';\nexport type { QuerySerializerOptions } from '../core/bodySerializer.gen';\nexport {\n  formDataBodySerializer,\n  jsonBodySerializer,\n  urlSearchParamsBodySerializer,\n} from '../core/bodySerializer.gen';\nexport { buildClientParams } from '../core/params.gen';\nexport { serializeQueryKeyValue } from '../core/queryKeySerializer.gen';\nexport { createClient } from './client.gen';\nexport type {\n  Client,\n  ClientOptions,\n  Config,\n  CreateClientConfig,\n  Options,\n  RequestOptions,\n  RequestResult,\n  TDataShape,\n} from './types.gen';\nexport { createConfig } from './utils.gen';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-next/sdk-client-required/client/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { Auth } from '../core/auth.gen';\nimport type {\n  ServerSentEventsOptions,\n  ServerSentEventsResult,\n} from '../core/serverSentEvents.gen';\nimport type { Client as CoreClient, Config as CoreConfig } from '../core/types.gen';\nimport type { Middleware } from './utils.gen';\n\nexport interface Config<T extends ClientOptions = ClientOptions>\n  extends Omit<RequestInit, 'body' | 'headers' | 'method'>, CoreConfig {\n  /**\n   * Base URL for all requests made by this client.\n   */\n  baseUrl?: T['baseUrl'];\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   * Return the response data parsed in a specified format. By default, `auto`\n   * will infer the appropriate method from the `Content-Type` response header.\n   * You can override this behavior with any of the {@link Body} methods.\n   * Select `stream` if you don't want to parse response data at all.\n   *\n   * @default 'auto'\n   */\n  parseAs?: 'arrayBuffer' | 'auto' | 'blob' | 'formData' | 'json' | 'stream' | 'text';\n  /**\n   * Throw an error instead of returning it in the response?\n   *\n   * @default false\n   */\n  throwOnError?: T['throwOnError'];\n}\n\nexport interface RequestOptions<\n  TData = unknown,\n  ThrowOnError extends boolean = boolean,\n  Url extends string = string,\n>\n  extends\n    Config<{\n      throwOnError: ThrowOnError;\n    }>,\n    Pick<\n      ServerSentEventsOptions<TData>,\n      | 'onRequest'\n      | 'onSseError'\n      | 'onSseEvent'\n      | 'sseDefaultRetryDelay'\n      | 'sseMaxRetryAttempts'\n      | 'sseMaxRetryDelay'\n    > {\n  /**\n   * Any body that you want to add to your request.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/fetch#body}\n   */\n  body?: unknown;\n  path?: Record<string, unknown>;\n  query?: Record<string, unknown>;\n  /**\n   * Security mechanism(s) to use for the request.\n   */\n  security?: ReadonlyArray<Auth>;\n  url: Url;\n}\n\nexport interface ResolvedRequestOptions<\n  ThrowOnError extends boolean = boolean,\n  Url extends string = string,\n> extends RequestOptions<unknown, ThrowOnError, Url> {\n  serializedBody?: string;\n}\n\nexport type RequestResult<\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = boolean,\n> = ThrowOnError extends true\n  ? Promise<{\n      data: TData extends Record<string, unknown> ? TData[keyof TData] : TData;\n      response: Response;\n    }>\n  : Promise<\n      (\n        | {\n            data: TData extends Record<string, unknown> ? TData[keyof TData] : TData;\n            error: undefined;\n          }\n        | {\n            data: undefined;\n            error: TError extends Record<string, unknown> ? TError[keyof TError] : TError;\n          }\n      ) & {\n        response: Response;\n      }\n    >;\n\nexport interface ClientOptions {\n  baseUrl?: string;\n  throwOnError?: boolean;\n}\n\ntype MethodFn = <TData = unknown, TError = unknown, ThrowOnError extends boolean = false>(\n  options: Omit<RequestOptions<TData, ThrowOnError>, 'method'>,\n) => RequestResult<TData, TError, ThrowOnError>;\n\ntype SseFn = <TData = unknown, TError = unknown, ThrowOnError extends boolean = false>(\n  options: Omit<RequestOptions<TData, ThrowOnError>, 'method'>,\n) => Promise<ServerSentEventsResult<TData, TError>>;\n\ntype RequestFn = <TData = unknown, TError = unknown, ThrowOnError extends boolean = false>(\n  options: Omit<RequestOptions<TData, ThrowOnError>, 'method'> &\n    Pick<Required<RequestOptions<TData, ThrowOnError>>, 'method'>,\n) => RequestResult<TData, TError, ThrowOnError>;\n\ntype BuildUrlFn = <\n  TData extends {\n    body?: unknown;\n    path?: Record<string, unknown>;\n    query?: Record<string, unknown>;\n    url: string;\n  },\n>(\n  options: TData & Options<TData>,\n) => string;\n\nexport type Client = CoreClient<RequestFn, Config, MethodFn, BuildUrlFn, SseFn> & {\n  interceptors: Middleware<Response, unknown, ResolvedRequestOptions>;\n};\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 = ClientOptions> = (\n  override?: Config<ClientOptions & T>,\n) => Config<Required<ClientOptions> & T>;\n\nexport interface TDataShape {\n  body?: unknown;\n  headers?: unknown;\n  path?: unknown;\n  query?: unknown;\n  url: string;\n}\n\ntype OmitKeys<T, K> = Pick<T, Exclude<keyof T, K>>;\n\nexport type Options<\n  TData extends TDataShape = TDataShape,\n  ThrowOnError extends boolean = boolean,\n  TResponse = unknown,\n> = OmitKeys<RequestOptions<TResponse, ThrowOnError>, 'body' | 'path' | 'query' | 'url'> &\n  ([TData] extends [never] ? unknown : Omit<TData, 'url'>);\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-next/sdk-client-required/client/utils.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport { getAuthToken } from '../core/auth.gen';\nimport type {\n  QuerySerializer,\n  QuerySerializerOptions,\n} from '../core/bodySerializer.gen';\nimport { jsonBodySerializer } from '../core/bodySerializer.gen';\nimport {\n  serializeArrayParam,\n  serializeObjectParam,\n  serializePrimitiveParam,\n} from '../core/pathSerializer.gen';\nimport type { Client, ClientOptions, Config, RequestOptions } from './types.gen';\n\ninterface PathSerializer {\n  path: Record<string, unknown>;\n  url: string;\n}\n\nconst PATH_PARAM_RE = /\\{[^{}]+\\}/g;\n\ntype ArrayStyle = 'form' | 'spaceDelimited' | 'pipeDelimited';\ntype MatrixStyle = 'label' | 'matrix' | 'simple';\ntype ArraySeparatorStyle = ArrayStyle | MatrixStyle;\n\nconst 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 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    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  const url = 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  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 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 || typeof header !== 'object') {\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, Options> = (\n  error: Err,\n  response: Res,\n  options: Options,\n) => Err | Promise<Err>;\n\ntype ReqInterceptor<Options> = (options: Options) => void | Promise<void>;\n\ntype ResInterceptor<Res, Options> = (response: Res, options: Options) => 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<Res, Err, Options> {\n  error: Interceptors<ErrInterceptor<Err, Res, Options>>;\n  request: Interceptors<ReqInterceptor<Options>>;\n  response: Interceptors<ResInterceptor<Res, Options>>;\n}\n\nexport const createInterceptors = <Res, Err, Options>(): Middleware<Res, Err, Options> => ({\n  error: new Interceptors<ErrInterceptor<Err, Res, Options>>(),\n  request: new Interceptors<ReqInterceptor<Options>>(),\n  response: new Interceptors<ResInterceptor<Res, 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-next/sdk-client-required/client.gen.ts",
    "content": "// 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: 'http://localhost:3000/base' }));\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-next/sdk-client-required/core/auth.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-next/sdk-client-required/core/bodySerializer.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-next/sdk-client-required/core/params.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-next/sdk-client-required/core/pathSerializer.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-next/sdk-client-required/core/queryKeySerializer.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\n/**\n * JSON-friendly union that mirrors what Pinia Colada can hash.\n */\nexport type JsonValue =\n  | null\n  | string\n  | number\n  | boolean\n  | JsonValue[]\n  | { [key: string]: JsonValue };\n\n/**\n * Replacer that converts non-JSON values (bigint, Date, etc.) to safe substitutes.\n */\nexport const queryKeyJsonReplacer = (_key: string, value: unknown) => {\n  if (value === undefined || typeof value === 'function' || typeof value === 'symbol') {\n    return undefined;\n  }\n  if (typeof value === 'bigint') {\n    return value.toString();\n  }\n  if (value instanceof Date) {\n    return value.toISOString();\n  }\n  return value;\n};\n\n/**\n * Safely stringifies a value and parses it back into a JsonValue.\n */\nexport const stringifyToJsonValue = (input: unknown): JsonValue | undefined => {\n  try {\n    const json = JSON.stringify(input, queryKeyJsonReplacer);\n    if (json === undefined) {\n      return undefined;\n    }\n    return JSON.parse(json) as JsonValue;\n  } catch {\n    return undefined;\n  }\n};\n\n/**\n * Detects plain objects (including objects with a null prototype).\n */\nconst isPlainObject = (value: unknown): value is Record<string, unknown> => {\n  if (value === null || typeof value !== 'object') {\n    return false;\n  }\n  const prototype = Object.getPrototypeOf(value as object);\n  return prototype === Object.prototype || prototype === null;\n};\n\n/**\n * Turns URLSearchParams into a sorted JSON object for deterministic keys.\n */\nconst serializeSearchParams = (params: URLSearchParams): JsonValue => {\n  const entries = Array.from(params.entries()).sort(([a], [b]) => a.localeCompare(b));\n  const result: Record<string, JsonValue> = {};\n\n  for (const [key, value] of entries) {\n    const existing = result[key];\n    if (existing === undefined) {\n      result[key] = value;\n      continue;\n    }\n\n    if (Array.isArray(existing)) {\n      (existing as string[]).push(value);\n    } else {\n      result[key] = [existing, value];\n    }\n  }\n\n  return result;\n};\n\n/**\n * Normalizes any accepted value into a JSON-friendly shape for query keys.\n */\nexport const serializeQueryKeyValue = (value: unknown): JsonValue | undefined => {\n  if (value === null) {\n    return null;\n  }\n\n  if (typeof value === 'string' || typeof value === 'number' || typeof value === 'boolean') {\n    return value;\n  }\n\n  if (value === undefined || typeof value === 'function' || typeof value === 'symbol') {\n    return undefined;\n  }\n\n  if (typeof value === 'bigint') {\n    return value.toString();\n  }\n\n  if (value instanceof Date) {\n    return value.toISOString();\n  }\n\n  if (Array.isArray(value)) {\n    return stringifyToJsonValue(value);\n  }\n\n  if (typeof URLSearchParams !== 'undefined' && value instanceof URLSearchParams) {\n    return serializeSearchParams(value);\n  }\n\n  if (isPlainObject(value)) {\n    return stringifyToJsonValue(value);\n  }\n\n  return undefined;\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-next/sdk-client-required/core/serverSentEvents.gen.ts",
    "content": "// 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 const 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            // Normalize line endings: CRLF -> LF, then CR -> LF\n            buffer = buffer.replace(/\\r\\n/g, '\\n').replace(/\\r/g, '\\n');\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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-next/sdk-client-required/core/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { Auth, AuthToken } from './auth.gen';\nimport type { BodySerializer, QuerySerializer, QuerySerializerOptions } from './bodySerializer.gen';\n\nexport type HttpMethod =\n  | 'connect'\n  | 'delete'\n  | 'get'\n  | 'head'\n  | 'options'\n  | 'patch'\n  | 'post'\n  | 'put'\n  | 'trace';\n\nexport type Client<\n  RequestFn = never,\n  Config = unknown,\n  MethodFn = never,\n  BuildUrlFn = never,\n  SseFn = never,\n> = {\n  /**\n   * Returns the final request URL.\n   */\n  buildUrl: BuildUrlFn;\n  getConfig: () => Config;\n  request: RequestFn;\n  setConfig: (config: Config) => Config;\n} & {\n  [K in HttpMethod]: MethodFn;\n} & ([SseFn] extends [never] ? { sse?: never } : { sse: { [K in HttpMethod]: SseFn } });\n\nexport interface Config {\n  /**\n   * Auth token or a function returning auth token. The resolved value will be\n   * added to the request payload as defined by its `security` array.\n   */\n  auth?: ((auth: Auth) => Promise<AuthToken> | AuthToken) | AuthToken;\n  /**\n   * A function for serializing request body parameter. By default,\n   * {@link JSON.stringify()} will be used.\n   */\n  bodySerializer?: BodySerializer | null;\n  /**\n   * An object containing any HTTP headers that you want to pre-populate your\n   * `Headers` object with.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/Headers/Headers#init See more}\n   */\n  headers?:\n    | RequestInit['headers']\n    | Record<\n        string,\n        string | number | boolean | (string | number | boolean)[] | null | undefined | unknown\n      >;\n  /**\n   * The request method.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/fetch#method See more}\n   */\n  method?: Uppercase<HttpMethod>;\n  /**\n   * A function for serializing request query parameters. By default, arrays\n   * will be exploded in form style, objects will be exploded in deepObject\n   * style, and reserved characters are percent-encoded.\n   *\n   * This method will have no effect if the native `paramsSerializer()` Axios\n   * API function is used.\n   *\n   * {@link https://swagger.io/docs/specification/serialization/#query View examples}\n   */\n  querySerializer?: QuerySerializer | QuerySerializerOptions;\n  /**\n   * A function validating request data. This is useful if you want to ensure\n   * the request conforms to the desired shape, so it can be safely sent to\n   * the server.\n   */\n  requestValidator?: (data: unknown) => Promise<unknown>;\n  /**\n   * A function transforming response data before it's returned. This is useful\n   * for post-processing data, e.g. converting ISO strings into Date objects.\n   */\n  responseTransformer?: (data: unknown) => Promise<unknown>;\n  /**\n   * A function validating response data. This is useful if you want to ensure\n   * the response conforms to the desired shape, so it can be safely passed to\n   * the transformers and returned to the user.\n   */\n  responseValidator?: (data: unknown) => Promise<unknown>;\n}\n\ntype IsExactlyNeverOrNeverUndefined<T> = [T] extends [never]\n  ? true\n  : [T] extends [never | undefined]\n    ? [undefined] extends [T]\n      ? false\n      : true\n    : false;\n\nexport type OmitNever<T extends Record<string, unknown>> = {\n  [K in keyof T as IsExactlyNeverOrNeverUndefined<T[K]> extends true ? never : K]: T[K];\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-next/sdk-client-required/core/utils.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-next/sdk-client-required/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport { apiVVersionODataControllerCount, callToTestOrderOfParams, callWithDefaultOptionalParameters, callWithDefaultParameters, callWithDescriptions, callWithDuplicateResponses, callWithNoContentResponse, callWithParameters, callWithResponse, callWithResponseAndNoContentResponse, callWithResponses, callWithResultFromHeader, callWithWeirdParameterNames, collectionFormat, complexParams, complexTypes, deleteCallWithoutParametersAndResponse, deleteFoo, deprecatedCall, dummyA, dummyB, duplicateName, duplicateName2, duplicateName3, duplicateName4, export_, fileResponse, fooWow, getApiVbyApiVersionSimpleOperation, getCallWithOptionalParam, getCallWithoutParametersAndResponse, headCallWithoutParametersAndResponse, import_, multipartRequest, multipartResponse, nonAsciiæøåÆøÅöôêÊ字符串, type Options, optionsCallWithoutParametersAndResponse, patchApiVbyApiVersionNoTag, patchCallWithoutParametersAndResponse, postApiVbyApiVersionFormData, postApiVbyApiVersionRequestBody, postCallWithOptionalParam, postCallWithoutParametersAndResponse, putCallWithoutParametersAndResponse, putWithFormUrlEncoded, testErrorCode, types, uploadFile } from './sdk.gen';\nexport type { _3eNum1Период, _400, AdditionalPropertiesIntegerIssue, AdditionalPropertiesUnknownIssue, AdditionalPropertiesUnknownIssue2, AdditionalPropertiesUnknownIssue3, AdditionalPropertiesUnknownIssueWritable, AnyOfAnyAndNull, AnyOfArrays, ApiVVersionODataControllerCountData, ApiVVersionODataControllerCountResponse, ApiVVersionODataControllerCountResponses, ArrayWithAnyOfProperties, ArrayWithArray, ArrayWithBooleans, ArrayWithNumbers, ArrayWithProperties, ArrayWithReferences, ArrayWithStrings, CallToTestOrderOfParamsData, CallWithDefaultOptionalParametersData, CallWithDefaultParametersData, CallWithDescriptionsData, CallWithDuplicateResponsesData, CallWithDuplicateResponsesError, CallWithDuplicateResponsesErrors, CallWithDuplicateResponsesResponse, CallWithDuplicateResponsesResponses, CallWithNoContentResponseData, CallWithNoContentResponseResponse, CallWithNoContentResponseResponses, CallWithParametersData, CallWithResponseAndNoContentResponseData, CallWithResponseAndNoContentResponseResponse, CallWithResponseAndNoContentResponseResponses, CallWithResponseData, CallWithResponseResponse, CallWithResponseResponses, CallWithResponsesData, CallWithResponsesError, CallWithResponsesErrors, CallWithResponsesResponse, CallWithResponsesResponses, CallWithResultFromHeaderData, CallWithResultFromHeaderErrors, CallWithResultFromHeaderResponses, CallWithWeirdParameterNamesData, CamelCaseCommentWithBreaks, CharactersInDescription, ClientOptions, CollectionFormatData, CommentWithBackticks, CommentWithBackticksAndQuotes, CommentWithBreaks, CommentWithExpressionPlaceholders, CommentWithQuotes, CommentWithReservedCharacters, CommentWithSlashes, ComplexParamsData, ComplexParamsResponse, ComplexParamsResponses, ComplexTypesData, ComplexTypesErrors, ComplexTypesResponse, ComplexTypesResponses, CompositionBaseModel, CompositionExtendedModel, CompositionWithAllOfAndNullable, CompositionWithAnyOf, CompositionWithAnyOfAndNullable, CompositionWithAnyOfAnonymous, CompositionWithNestedAnyAndTypeNull, CompositionWithNestedAnyOfAndNull, CompositionWithOneOf, CompositionWithOneOfAndComplexArrayDictionary, CompositionWithOneOfAndNullable, CompositionWithOneOfAndProperties, CompositionWithOneOfAndSimpleArrayDictionary, CompositionWithOneOfAndSimpleDictionary, CompositionWithOneOfAnonymous, CompositionWithOneOfDiscriminator, ConstValue, Default, DeleteCallWithoutParametersAndResponseData, DeleteFooData, DeleteFooData2, DeleteFooData3, DeprecatedCallData, DeprecatedModel, DictionaryWithArray, DictionaryWithDictionary, DictionaryWithProperties, DictionaryWithPropertiesAndAdditionalProperties, DictionaryWithReference, DictionaryWithString, DummyAData, DummyAResponse, DummyAResponses, DummyBData, DummyBResponse, DummyBResponses, DuplicateName2Data, DuplicateName3Data, DuplicateName4Data, DuplicateNameData, EnumFromDescription, EnumWithExtensions, EnumWithNumbers, EnumWithReplacedCharacters, EnumWithStrings, EnumWithXEnumNames, ExportData, ExternalRefA, ExternalRefB, ExternalSharedModel, File, FileResponseData, FileResponseResponse, FileResponseResponses, FileWritable, FooWowData, FooWowResponses, FreeFormObjectWithAdditionalPropertiesEqEmptyObject, FreeFormObjectWithAdditionalPropertiesEqTrue, FreeFormObjectWithoutAdditionalProperties, GenericSchemaDuplicateIssue1SystemBoolean, GenericSchemaDuplicateIssue1SystemBooleanWritable, GenericSchemaDuplicateIssue1SystemString, GenericSchemaDuplicateIssue1SystemStringWritable, GetApiVbyApiVersionSimpleOperationData, GetApiVbyApiVersionSimpleOperationError, GetApiVbyApiVersionSimpleOperationErrors, GetApiVbyApiVersionSimpleOperationResponse, GetApiVbyApiVersionSimpleOperationResponses, GetCallWithOptionalParamData, GetCallWithoutParametersAndResponseData, HeadCallWithoutParametersAndResponseData, Import, ImportData, ImportResponse, ImportResponses, IoK8sApimachineryPkgApisMetaV1DeleteOptions, IoK8sApimachineryPkgApisMetaV1Preconditions, ModelCircle, ModelFromZendesk, ModelSquare, ModelThatExtends, ModelThatExtendsExtends, ModelWithAdditionalPropertiesEqTrue, ModelWithAdditionalPropertiesRef, ModelWithAnyOfConstantSizeArray, ModelWithAnyOfConstantSizeArrayAndIntersect, ModelWithAnyOfConstantSizeArrayNullable, ModelWithAnyOfConstantSizeArrayWithNSizeAndOptions, ModelWithAnyOfConstantSizeArrayWithNSizeAndOptionsWritable, ModelWithArray, ModelWithArrayReadOnlyAndWriteOnly, ModelWithArrayReadOnlyAndWriteOnlyWritable, ModelWithBackticksInDescription, ModelWithBoolean, ModelWithCircularReference, ModelWithConst, ModelWithConstantSizeArray, ModelWithDictionary, ModelWithDuplicateImports, ModelWithDuplicateProperties, ModelWithEnum, ModelWithEnumFromDescription, ModelWithEnumWithHyphen, ModelWithInteger, ModelWithNestedArrayEnums, ModelWithNestedArrayEnumsData, ModelWithNestedArrayEnumsDataBar, ModelWithNestedArrayEnumsDataFoo, ModelWithNestedCompositionEnums, ModelWithNestedEnums, ModelWithNestedProperties, ModelWithNullableObject, ModelWithNullableString, ModelWithNumericEnumUnion, ModelWithOneOfAndProperties, ModelWithOneOfEnum, ModelWithOrderedProperties, ModelWithPattern, ModelWithPatternWritable, ModelWithPrefixItemsConstantSizeArray, ModelWithProperties, ModelWithPropertiesWritable, ModelWithReadOnlyAndWriteOnly, ModelWithReadOnlyAndWriteOnlyWritable, ModelWithReference, ModelWithReferenceWritable, ModelWithString, ModelWithStringError, MultipartRequestData, MultipartResponseData, MultipartResponseResponse, MultipartResponseResponses, NestedAnyOfArraysNullable, NonAsciiæøåÆøÅöôêÊ字符串Data, NonAsciiæøåÆøÅöôêÊ字符串Response, NonAsciiæøåÆøÅöôêÊ字符串Responses, NonAsciiStringæøåÆøÅöôêÊ字符串, NullableObject, OneOfAllOfIssue, OneOfAllOfIssueWritable, OptionsCallWithoutParametersAndResponseData, Pageable, ParameterSimpleParameterUnused, PatchApiVbyApiVersionNoTagData, PatchApiVbyApiVersionNoTagResponses, PatchCallWithoutParametersAndResponseData, PostApiVbyApiVersionFormDataData, PostApiVbyApiVersionRequestBodyData, PostCallWithOptionalParamData, PostCallWithOptionalParamResponse, PostCallWithOptionalParamResponses, PostCallWithoutParametersAndResponseData, PostServiceWithEmptyTagResponse, PostServiceWithEmptyTagResponse2, PutCallWithoutParametersAndResponseData, PutWithFormUrlEncodedData, SchemaWithFormRestrictedKeys, SimpleBoolean, SimpleFile, SimpleFormData, SimpleInteger, SimpleParameter, SimpleReference, SimpleRequestBody, SimpleString, SimpleStringWithPattern, TestErrorCodeData, TestErrorCodeErrors, TestErrorCodeResponses, TypesData, TypesResponse, TypesResponses, UploadFileData, UploadFileResponse, UploadFileResponses, XFooBar } from './types.gen';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-next/sdk-client-required/sdk.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport { type Client, formDataBodySerializer, type Options as Options2, type TDataShape, urlSearchParamsBodySerializer } from './client';\nimport type { ApiVVersionODataControllerCountData, ApiVVersionODataControllerCountResponses, CallToTestOrderOfParamsData, CallWithDefaultOptionalParametersData, CallWithDefaultParametersData, CallWithDescriptionsData, CallWithDuplicateResponsesData, CallWithDuplicateResponsesErrors, CallWithDuplicateResponsesResponses, CallWithNoContentResponseData, CallWithNoContentResponseResponses, CallWithParametersData, CallWithResponseAndNoContentResponseData, CallWithResponseAndNoContentResponseResponses, CallWithResponseData, CallWithResponseResponses, CallWithResponsesData, CallWithResponsesErrors, CallWithResponsesResponses, CallWithResultFromHeaderData, CallWithResultFromHeaderErrors, CallWithResultFromHeaderResponses, CallWithWeirdParameterNamesData, CollectionFormatData, ComplexParamsData, ComplexParamsResponses, ComplexTypesData, ComplexTypesErrors, ComplexTypesResponses, DeleteCallWithoutParametersAndResponseData, DeleteFooData3, DeprecatedCallData, DummyAData, DummyAResponses, DummyBData, DummyBResponses, DuplicateName2Data, DuplicateName3Data, DuplicateName4Data, DuplicateNameData, ExportData, FileResponseData, FileResponseResponses, FooWowData, FooWowResponses, GetApiVbyApiVersionSimpleOperationData, GetApiVbyApiVersionSimpleOperationErrors, GetApiVbyApiVersionSimpleOperationResponses, GetCallWithOptionalParamData, GetCallWithoutParametersAndResponseData, HeadCallWithoutParametersAndResponseData, ImportData, ImportResponses, MultipartRequestData, MultipartResponseData, MultipartResponseResponses, NonAsciiæøåÆøÅöôêÊ字符串Data, NonAsciiæøåÆøÅöôêÊ字符串Responses, OptionsCallWithoutParametersAndResponseData, PatchApiVbyApiVersionNoTagData, PatchApiVbyApiVersionNoTagResponses, PatchCallWithoutParametersAndResponseData, PostApiVbyApiVersionFormDataData, PostApiVbyApiVersionRequestBodyData, PostCallWithOptionalParamData, PostCallWithOptionalParamResponses, PostCallWithoutParametersAndResponseData, PutCallWithoutParametersAndResponseData, PutWithFormUrlEncodedData, TestErrorCodeData, TestErrorCodeErrors, TestErrorCodeResponses, TypesData, TypesResponses, UploadFileData, UploadFileResponses } from './types.gen';\n\nexport type Options<TData extends TDataShape = TDataShape, ThrowOnError extends boolean = boolean> = Options2<TData, ThrowOnError> & {\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\nexport const export_ = <ThrowOnError extends boolean = false>(options: Options<ExportData, ThrowOnError>) => options.client.get<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/no+tag', ...options });\n\nexport const patchApiVbyApiVersionNoTag = <ThrowOnError extends boolean = false>(options: Options<PatchApiVbyApiVersionNoTagData, ThrowOnError>) => options.client.patch<PatchApiVbyApiVersionNoTagResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/no+tag', ...options });\n\nexport const import_ = <ThrowOnError extends boolean = false>(options: Options<ImportData, ThrowOnError>) => options.client.post<ImportResponses, unknown, ThrowOnError>({\n    url: '/api/v{api-version}/no+tag',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options.headers\n    }\n});\n\nexport const fooWow = <ThrowOnError extends boolean = false>(options: Options<FooWowData, ThrowOnError>) => options.client.put<FooWowResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/no+tag', ...options });\n\nexport const apiVVersionODataControllerCount = <ThrowOnError extends boolean = false>(options: Options<ApiVVersionODataControllerCountData, ThrowOnError>) => options.client.get<ApiVVersionODataControllerCountResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple/$count', ...options });\n\nexport const getApiVbyApiVersionSimpleOperation = <ThrowOnError extends boolean = false>(options: Options<GetApiVbyApiVersionSimpleOperationData, ThrowOnError>) => options.client.get<GetApiVbyApiVersionSimpleOperationResponses, GetApiVbyApiVersionSimpleOperationErrors, ThrowOnError>({ url: '/api/v{api-version}/simple:operation', ...options });\n\nexport const deleteCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options: Options<DeleteCallWithoutParametersAndResponseData, ThrowOnError>) => options.client.delete<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const getCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options: Options<GetCallWithoutParametersAndResponseData, ThrowOnError>) => options.client.get<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const headCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options: Options<HeadCallWithoutParametersAndResponseData, ThrowOnError>) => options.client.head<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const optionsCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options: Options<OptionsCallWithoutParametersAndResponseData, ThrowOnError>) => options.client.options<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const patchCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options: Options<PatchCallWithoutParametersAndResponseData, ThrowOnError>) => options.client.patch<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const postCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options: Options<PostCallWithoutParametersAndResponseData, ThrowOnError>) => options.client.post<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const putCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options: Options<PutCallWithoutParametersAndResponseData, ThrowOnError>) => options.client.put<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const deleteFoo = <ThrowOnError extends boolean = false>(options: Options<DeleteFooData3, ThrowOnError>) => options.client.delete<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/foo/{foo_param}/bar/{BarParam}', ...options });\n\nexport const callWithDescriptions = <ThrowOnError extends boolean = false>(options: Options<CallWithDescriptionsData, ThrowOnError>) => options.client.post<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/descriptions', ...options });\n\n/**\n * @deprecated\n */\nexport const deprecatedCall = <ThrowOnError extends boolean = false>(options: Options<DeprecatedCallData, ThrowOnError>) => options.client.post<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/parameters/deprecated', ...options });\n\nexport const callWithParameters = <ThrowOnError extends boolean = false>(options: Options<CallWithParametersData, ThrowOnError>) => options.client.post<unknown, unknown, ThrowOnError>({\n    url: '/api/v{api-version}/parameters/{parameterPath}',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options.headers\n    }\n});\n\nexport const callWithWeirdParameterNames = <ThrowOnError extends boolean = false>(options: Options<CallWithWeirdParameterNamesData, ThrowOnError>) => options.client.post<unknown, unknown, ThrowOnError>({\n    url: '/api/v{api-version}/parameters/{parameter.path.1}/{parameter-path-2}/{PARAMETER-PATH-3}',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options.headers\n    }\n});\n\nexport const getCallWithOptionalParam = <ThrowOnError extends boolean = false>(options: Options<GetCallWithOptionalParamData, ThrowOnError>) => options.client.get<unknown, unknown, ThrowOnError>({\n    url: '/api/v{api-version}/parameters',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options.headers\n    }\n});\n\nexport const postCallWithOptionalParam = <ThrowOnError extends boolean = false>(options: Options<PostCallWithOptionalParamData, ThrowOnError>) => options.client.post<PostCallWithOptionalParamResponses, unknown, ThrowOnError>({\n    url: '/api/v{api-version}/parameters',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options.headers\n    }\n});\n\nexport const postApiVbyApiVersionRequestBody = <ThrowOnError extends boolean = false>(options: Options<PostApiVbyApiVersionRequestBodyData, ThrowOnError>) => options.client.post<unknown, unknown, ThrowOnError>({\n    url: '/api/v{api-version}/requestBody',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options.headers\n    }\n});\n\nexport const postApiVbyApiVersionFormData = <ThrowOnError extends boolean = false>(options: Options<PostApiVbyApiVersionFormDataData, ThrowOnError>) => options.client.post<unknown, unknown, ThrowOnError>({\n    ...formDataBodySerializer,\n    url: '/api/v{api-version}/formData',\n    ...options,\n    headers: {\n        'Content-Type': null,\n        ...options.headers\n    }\n});\n\nexport const callWithDefaultParameters = <ThrowOnError extends boolean = false>(options: Options<CallWithDefaultParametersData, ThrowOnError>) => options.client.get<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/defaults', ...options });\n\nexport const callWithDefaultOptionalParameters = <ThrowOnError extends boolean = false>(options: Options<CallWithDefaultOptionalParametersData, ThrowOnError>) => options.client.post<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/defaults', ...options });\n\nexport const callToTestOrderOfParams = <ThrowOnError extends boolean = false>(options: Options<CallToTestOrderOfParamsData, ThrowOnError>) => options.client.put<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/defaults', ...options });\n\nexport const duplicateName = <ThrowOnError extends boolean = false>(options: Options<DuplicateNameData, ThrowOnError>) => options.client.delete<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/duplicate', ...options });\n\nexport const duplicateName2 = <ThrowOnError extends boolean = false>(options: Options<DuplicateName2Data, ThrowOnError>) => options.client.get<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/duplicate', ...options });\n\nexport const duplicateName3 = <ThrowOnError extends boolean = false>(options: Options<DuplicateName3Data, ThrowOnError>) => options.client.post<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/duplicate', ...options });\n\nexport const duplicateName4 = <ThrowOnError extends boolean = false>(options: Options<DuplicateName4Data, ThrowOnError>) => options.client.put<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/duplicate', ...options });\n\nexport const callWithNoContentResponse = <ThrowOnError extends boolean = false>(options: Options<CallWithNoContentResponseData, ThrowOnError>) => options.client.get<CallWithNoContentResponseResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/no-content', ...options });\n\nexport const callWithResponseAndNoContentResponse = <ThrowOnError extends boolean = false>(options: Options<CallWithResponseAndNoContentResponseData, ThrowOnError>) => options.client.get<CallWithResponseAndNoContentResponseResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/multiple-tags/response-and-no-content', ...options });\n\nexport const dummyA = <ThrowOnError extends boolean = false>(options: Options<DummyAData, ThrowOnError>) => options.client.get<DummyAResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/multiple-tags/a', ...options });\n\nexport const dummyB = <ThrowOnError extends boolean = false>(options: Options<DummyBData, ThrowOnError>) => options.client.get<DummyBResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/multiple-tags/b', ...options });\n\nexport const callWithResponse = <ThrowOnError extends boolean = false>(options: Options<CallWithResponseData, ThrowOnError>) => options.client.get<CallWithResponseResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/response', ...options });\n\nexport const callWithDuplicateResponses = <ThrowOnError extends boolean = false>(options: Options<CallWithDuplicateResponsesData, ThrowOnError>) => options.client.post<CallWithDuplicateResponsesResponses, CallWithDuplicateResponsesErrors, ThrowOnError>({ url: '/api/v{api-version}/response', ...options });\n\nexport const callWithResponses = <ThrowOnError extends boolean = false>(options: Options<CallWithResponsesData, ThrowOnError>) => options.client.put<CallWithResponsesResponses, CallWithResponsesErrors, ThrowOnError>({ url: '/api/v{api-version}/response', ...options });\n\nexport const collectionFormat = <ThrowOnError extends boolean = false>(options: Options<CollectionFormatData, ThrowOnError>) => options.client.get<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/collectionFormat', ...options });\n\nexport const types = <ThrowOnError extends boolean = false>(options: Options<TypesData, ThrowOnError>) => options.client.get<TypesResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/types', ...options });\n\nexport const uploadFile = <ThrowOnError extends boolean = false>(options: Options<UploadFileData, ThrowOnError>) => options.client.post<UploadFileResponses, unknown, ThrowOnError>({\n    ...urlSearchParamsBodySerializer,\n    url: '/api/v{api-version}/upload',\n    ...options,\n    headers: {\n        'Content-Type': 'application/x-www-form-urlencoded',\n        ...options.headers\n    }\n});\n\nexport const fileResponse = <ThrowOnError extends boolean = false>(options: Options<FileResponseData, ThrowOnError>) => options.client.get<FileResponseResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/file/{id}', ...options });\n\nexport const complexTypes = <ThrowOnError extends boolean = false>(options: Options<ComplexTypesData, ThrowOnError>) => options.client.get<ComplexTypesResponses, ComplexTypesErrors, ThrowOnError>({\n    querySerializer: { parameters: { parameterObject: { object: { style: 'form' } } } },\n    url: '/api/v{api-version}/complex',\n    ...options\n});\n\nexport const multipartResponse = <ThrowOnError extends boolean = false>(options: Options<MultipartResponseData, ThrowOnError>) => options.client.get<MultipartResponseResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/multipart', ...options });\n\nexport const multipartRequest = <ThrowOnError extends boolean = false>(options: Options<MultipartRequestData, ThrowOnError>) => options.client.post<unknown, unknown, ThrowOnError>({\n    ...formDataBodySerializer,\n    url: '/api/v{api-version}/multipart',\n    ...options,\n    headers: {\n        'Content-Type': null,\n        ...options.headers\n    }\n});\n\nexport const complexParams = <ThrowOnError extends boolean = false>(options: Options<ComplexParamsData, ThrowOnError>) => options.client.put<ComplexParamsResponses, unknown, ThrowOnError>({\n    url: '/api/v{api-version}/complex/{id}',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json-patch+json',\n        ...options.headers\n    }\n});\n\nexport const callWithResultFromHeader = <ThrowOnError extends boolean = false>(options: Options<CallWithResultFromHeaderData, ThrowOnError>) => options.client.post<CallWithResultFromHeaderResponses, CallWithResultFromHeaderErrors, ThrowOnError>({ url: '/api/v{api-version}/header', ...options });\n\nexport const testErrorCode = <ThrowOnError extends boolean = false>(options: Options<TestErrorCodeData, ThrowOnError>) => options.client.post<TestErrorCodeResponses, TestErrorCodeErrors, ThrowOnError>({ url: '/api/v{api-version}/error', ...options });\n\nexport const nonAsciiæøåÆøÅöôêÊ字符串 = <ThrowOnError extends boolean = false>(options: Options<NonAsciiæøåÆøÅöôêÊ字符串Data, ThrowOnError>) => options.client.post<NonAsciiæøåÆøÅöôêÊ字符串Responses, unknown, ThrowOnError>({ url: '/api/v{api-version}/non-ascii-æøåÆØÅöôêÊ字符串', ...options });\n\n/**\n * Login User\n */\nexport const putWithFormUrlEncoded = <ThrowOnError extends boolean = false>(options: Options<PutWithFormUrlEncodedData, ThrowOnError>) => options.client.put<unknown, unknown, ThrowOnError>({\n    ...urlSearchParamsBodySerializer,\n    url: '/api/v{api-version}/non-ascii-æøåÆØÅöôêÊ字符串',\n    ...options,\n    headers: {\n        'Content-Type': 'application/x-www-form-urlencoded',\n        ...options.headers\n    }\n});\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-next/sdk-client-required/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type ClientOptions = {\n    baseUrl: 'http://localhost:3000/base' | (string & {});\n};\n\n/**\n * Model with number-only name\n */\nexport type _400 = string;\n\n/**\n * External ref to shared model (A)\n */\nexport type ExternalRefA = ExternalSharedModel;\n\n/**\n * External ref to shared model (B)\n */\nexport type ExternalRefB = ExternalSharedModel;\n\n/**\n * Testing multiline comments in string: First line\n * Second line\n *\n * Fourth line\n */\nexport type CamelCaseCommentWithBreaks = number;\n\n/**\n * Testing multiline comments in string: First line\n * Second line\n *\n * Fourth line\n */\nexport type CommentWithBreaks = number;\n\n/**\n * Testing backticks in string: `backticks` and ```multiple backticks``` should work\n */\nexport type CommentWithBackticks = number;\n\n/**\n * Testing backticks and quotes in string: `backticks`, 'quotes', \"double quotes\" and ```multiple backticks``` should work\n */\nexport type CommentWithBackticksAndQuotes = number;\n\n/**\n * Testing slashes in string: \\backwards\\\\\\ and /forwards/// should work\n */\nexport type CommentWithSlashes = number;\n\n/**\n * Testing expression placeholders in string: ${expression} should work\n */\nexport type CommentWithExpressionPlaceholders = number;\n\n/**\n * Testing quotes in string: 'single quote''' and \"double quotes\"\"\" should work\n */\nexport type CommentWithQuotes = number;\n\n/**\n * Testing reserved characters in string: * inline * and ** inline ** should work\n */\nexport type CommentWithReservedCharacters = number;\n\n/**\n * This is a simple number\n */\nexport type SimpleInteger = number;\n\n/**\n * This is a simple boolean\n */\nexport type SimpleBoolean = boolean;\n\n/**\n * This is a simple string\n */\nexport type SimpleString = string;\n\n/**\n * A string with non-ascii (unicode) characters valid in typescript identifiers (æøåÆØÅöÔèÈ字符串)\n */\nexport type NonAsciiStringæøåÆøÅöôêÊ字符串 = string;\n\n/**\n * This is a simple file\n */\nexport type SimpleFile = Blob | File;\n\n/**\n * This is a simple reference\n */\nexport type SimpleReference = ModelWithString;\n\n/**\n * This is a simple string\n */\nexport type SimpleStringWithPattern = string | null;\n\n/**\n * This is a simple enum with strings\n */\nexport type EnumWithStrings = 'Success' | 'Warning' | 'Error' | '\\'Single Quote\\'' | '\"Double Quotes\"' | 'Non-ascii: øæåôöØÆÅÔÖ字符串';\n\nexport type EnumWithReplacedCharacters = '\\'Single Quote\\'' | '\"Double Quotes\"' | 'øæåôöØÆÅÔÖ字符串' | 3.1 | '';\n\n/**\n * This is a simple enum with numbers\n */\nexport type EnumWithNumbers = 1 | 2 | 3 | 1.1 | 1.2 | 1.3 | 100 | 200 | 300 | -100 | -200 | -300 | -1.1 | -1.2 | -1.3;\n\n/**\n * Success=1,Warning=2,Error=3\n */\nexport type EnumFromDescription = number;\n\n/**\n * This is a simple enum with numbers\n */\nexport type EnumWithExtensions = 200 | 400 | 500;\n\nexport type EnumWithXEnumNames = 0 | 1 | 2;\n\n/**\n * This is a simple array with numbers\n */\nexport type ArrayWithNumbers = Array<number>;\n\n/**\n * This is a simple array with booleans\n */\nexport type ArrayWithBooleans = Array<boolean>;\n\n/**\n * This is a simple array with strings\n */\nexport type ArrayWithStrings = Array<string>;\n\n/**\n * This is a simple array with references\n */\nexport type ArrayWithReferences = Array<ModelWithString>;\n\n/**\n * This is a simple array containing an array\n */\nexport type ArrayWithArray = Array<Array<ModelWithString>>;\n\n/**\n * This is a simple array with properties\n */\nexport type ArrayWithProperties = Array<{\n    '16x16'?: CamelCaseCommentWithBreaks;\n    bar?: string;\n}>;\n\n/**\n * This is a simple array with any of properties\n */\nexport type ArrayWithAnyOfProperties = Array<{\n    foo?: string;\n} | {\n    bar?: string;\n}>;\n\nexport type AnyOfAnyAndNull = {\n    data?: unknown | null;\n};\n\n/**\n * This is a simple array with any of properties\n */\nexport type AnyOfArrays = {\n    results?: Array<{\n        foo?: string;\n    } | {\n        bar?: string;\n    }>;\n};\n\n/**\n * This is a string dictionary\n */\nexport type DictionaryWithString = {\n    [key: string]: string;\n};\n\nexport type DictionaryWithPropertiesAndAdditionalProperties = {\n    foo?: number;\n    bar?: boolean;\n    [key: string]: string | number | boolean | undefined;\n};\n\n/**\n * This is a string reference\n */\nexport type DictionaryWithReference = {\n    [key: string]: ModelWithString;\n};\n\n/**\n * This is a complex dictionary\n */\nexport type DictionaryWithArray = {\n    [key: string]: Array<ModelWithString>;\n};\n\n/**\n * This is a string dictionary\n */\nexport type DictionaryWithDictionary = {\n    [key: string]: {\n        [key: string]: string;\n    };\n};\n\n/**\n * This is a complex dictionary\n */\nexport type DictionaryWithProperties = {\n    [key: string]: {\n        foo?: string;\n        bar?: string;\n    };\n};\n\n/**\n * This is a model with one number property\n */\nexport type ModelWithInteger = {\n    /**\n     * This is a simple number property\n     */\n    prop?: number;\n};\n\n/**\n * This is a model with one boolean property\n */\nexport type ModelWithBoolean = {\n    /**\n     * This is a simple boolean property\n     */\n    prop?: boolean;\n};\n\n/**\n * This is a model with one string property\n */\nexport type ModelWithString = {\n    /**\n     * This is a simple string property\n     */\n    prop?: string;\n};\n\n/**\n * This is a model with one string property\n */\nexport type ModelWithStringError = {\n    /**\n     * This is a simple string property\n     */\n    prop?: string;\n};\n\n/**\n * `Comment` or `VoiceComment`. The JSON object for adding voice comments to tickets is different. See [Adding voice comments to tickets](/documentation/ticketing/managing-tickets/adding-voice-comments-to-tickets)\n */\nexport type ModelFromZendesk = string;\n\n/**\n * This is a model with one string property\n */\nexport type ModelWithNullableString = {\n    /**\n     * This is a simple string property\n     */\n    nullableProp1?: string | null;\n    /**\n     * This is a simple string property\n     */\n    nullableRequiredProp1: string | null;\n    /**\n     * This is a simple string property\n     */\n    nullableProp2?: string | null;\n    /**\n     * This is a simple string property\n     */\n    nullableRequiredProp2: string | null;\n    /**\n     * This is a simple enum with strings\n     */\n    'foo_bar-enum'?: 'Success' | 'Warning' | 'Error' | 'ØÆÅ字符串';\n};\n\n/**\n * This is a model with one enum\n */\nexport type ModelWithEnum = {\n    /**\n     * This is a simple enum with strings\n     */\n    'foo_bar-enum'?: 'Success' | 'Warning' | 'Error' | 'ØÆÅ字符串';\n    /**\n     * These are the HTTP error code enums\n     */\n    statusCode?: '100' | '200 FOO' | '300 FOO_BAR' | '400 foo-bar' | '500 foo.bar' | '600 foo&bar';\n    /**\n     * Simple boolean enum\n     */\n    bool?: true;\n};\n\n/**\n * This is a model with one enum with escaped name\n */\nexport type ModelWithEnumWithHyphen = {\n    /**\n     * Foo-Bar-Baz-Qux\n     */\n    'foo-bar-baz-qux'?: '3.0';\n};\n\n/**\n * This is a model with one enum\n */\nexport type ModelWithEnumFromDescription = {\n    /**\n     * Success=1,Warning=2,Error=3\n     */\n    test?: number;\n};\n\n/**\n * This is a model with nested enums\n */\nexport type ModelWithNestedEnums = {\n    dictionaryWithEnum?: {\n        [key: string]: 'Success' | 'Warning' | 'Error';\n    };\n    dictionaryWithEnumFromDescription?: {\n        [key: string]: number;\n    };\n    arrayWithEnum?: Array<'Success' | 'Warning' | 'Error'>;\n    arrayWithDescription?: Array<number>;\n    /**\n     * This is a simple enum with strings\n     */\n    'foo_bar-enum'?: 'Success' | 'Warning' | 'Error' | 'ØÆÅ字符串';\n};\n\n/**\n * This is a model with one property containing a reference\n */\nexport type ModelWithReference = {\n    prop?: ModelWithProperties;\n};\n\n/**\n * This is a model with one property containing an array\n */\nexport type ModelWithArrayReadOnlyAndWriteOnly = {\n    prop?: Array<ModelWithReadOnlyAndWriteOnly>;\n    propWithFile?: Array<Blob | File>;\n    propWithNumber?: Array<number>;\n};\n\n/**\n * This is a model with one property containing an array\n */\nexport type ModelWithArray = {\n    prop?: Array<ModelWithString>;\n    propWithFile?: Array<Blob | File>;\n    propWithNumber?: Array<number>;\n};\n\n/**\n * This is a model with one property containing a dictionary\n */\nexport type ModelWithDictionary = {\n    prop?: {\n        [key: string]: string;\n    };\n};\n\n/**\n * This is a deprecated model with a deprecated property\n *\n * @deprecated\n */\nexport type DeprecatedModel = {\n    /**\n     * This is a deprecated property\n     *\n     * @deprecated\n     */\n    prop?: string;\n};\n\n/**\n * This is a model with one property containing a circular reference\n */\nexport type ModelWithCircularReference = {\n    prop?: ModelWithCircularReference;\n};\n\n/**\n * This is a model with one property with a 'one of' relationship\n */\nexport type CompositionWithOneOf = {\n    propA?: ModelWithString | ModelWithEnum | ModelWithArray | ModelWithDictionary;\n};\n\n/**\n * This is a model with one property with a 'one of' relationship where the options are not $ref\n */\nexport type CompositionWithOneOfAnonymous = {\n    propA?: {\n        propA?: string;\n    } | string | number;\n};\n\n/**\n * Circle\n */\nexport type ModelCircle = {\n    kind: string;\n    radius?: number;\n};\n\n/**\n * Square\n */\nexport type ModelSquare = {\n    kind: string;\n    sideLength?: number;\n};\n\n/**\n * This is a model with one property with a 'one of' relationship where the options are not $ref\n */\nexport type CompositionWithOneOfDiscriminator = ({\n    kind: 'circle';\n} & ModelCircle) | ({\n    kind: 'square';\n} & ModelSquare);\n\n/**\n * This is a model with one property with a 'any of' relationship\n */\nexport type CompositionWithAnyOf = {\n    propA?: ModelWithString | ModelWithEnum | ModelWithArray | ModelWithDictionary;\n};\n\n/**\n * This is a model with one property with a 'any of' relationship where the options are not $ref\n */\nexport type CompositionWithAnyOfAnonymous = {\n    propA?: {\n        propA?: string;\n    } | string | number;\n};\n\n/**\n * This is a model with nested 'any of' property with a type null\n */\nexport type CompositionWithNestedAnyAndTypeNull = {\n    propA?: Array<ModelWithDictionary | null> | Array<ModelWithArray | null>;\n};\n\nexport type _3eNum1Период = 'Bird' | 'Dog';\n\nexport type ConstValue = 'ConstValue';\n\n/**\n * This is a model with one property with a 'any of' relationship where the options are not $ref\n */\nexport type CompositionWithNestedAnyOfAndNull = {\n    /**\n     * Scopes\n     */\n    propA?: Array<_3eNum1Период | ConstValue> | null;\n};\n\n/**\n * This is a model with one property with a 'one of' relationship\n */\nexport type CompositionWithOneOfAndNullable = {\n    propA?: {\n        boolean?: boolean;\n    } | ModelWithEnum | ModelWithArray | ModelWithDictionary | null;\n};\n\n/**\n * This is a model that contains a simple dictionary within composition\n */\nexport type CompositionWithOneOfAndSimpleDictionary = {\n    propA?: boolean | {\n        [key: string]: number;\n    };\n};\n\n/**\n * This is a model that contains a dictionary of simple arrays within composition\n */\nexport type CompositionWithOneOfAndSimpleArrayDictionary = {\n    propA?: boolean | {\n        [key: string]: Array<boolean>;\n    };\n};\n\n/**\n * This is a model that contains a dictionary of complex arrays (composited) within composition\n */\nexport type CompositionWithOneOfAndComplexArrayDictionary = {\n    propA?: boolean | {\n        [key: string]: Array<number | string>;\n    };\n};\n\n/**\n * This is a model with one property with a 'all of' relationship\n */\nexport type CompositionWithAllOfAndNullable = {\n    propA?: ({\n        boolean?: boolean;\n    } & ModelWithEnum & ModelWithArray & ModelWithDictionary) | null;\n};\n\n/**\n * This is a model with one property with a 'any of' relationship\n */\nexport type CompositionWithAnyOfAndNullable = {\n    propA?: {\n        boolean?: boolean;\n    } | ModelWithEnum | ModelWithArray | ModelWithDictionary | null;\n};\n\n/**\n * This is a base model with two simple optional properties\n */\nexport type CompositionBaseModel = {\n    firstName?: string;\n    lastname?: string;\n};\n\n/**\n * This is a model that extends the base model\n */\nexport type CompositionExtendedModel = CompositionBaseModel & {\n    age: number;\n    firstName: string;\n    lastname: string;\n};\n\n/**\n * This is a model with one nested property\n */\nexport type ModelWithProperties = {\n    required: string;\n    readonly requiredAndReadOnly: string;\n    requiredAndNullable: string | null;\n    string?: string;\n    number?: number;\n    boolean?: boolean;\n    reference?: ModelWithString;\n    'property with space'?: string;\n    default?: string;\n    try?: string;\n    readonly '@namespace.string'?: string;\n    readonly '@namespace.integer'?: number;\n};\n\n/**\n * This is a model with one nested property\n */\nexport type ModelWithNestedProperties = {\n    readonly first: {\n        readonly second: {\n            readonly third: string | null;\n        } | null;\n    } | null;\n};\n\n/**\n * This is a model with duplicated properties\n */\nexport type ModelWithDuplicateProperties = {\n    prop?: ModelWithString;\n};\n\n/**\n * This is a model with ordered properties\n */\nexport type ModelWithOrderedProperties = {\n    zebra?: string;\n    apple?: string;\n    hawaii?: string;\n};\n\n/**\n * This is a model with duplicated imports\n */\nexport type ModelWithDuplicateImports = {\n    propA?: ModelWithString;\n    propB?: ModelWithString;\n    propC?: ModelWithString;\n};\n\n/**\n * This is a model that extends another model\n */\nexport type ModelThatExtends = ModelWithString & {\n    propExtendsA?: string;\n    propExtendsB?: ModelWithString;\n};\n\n/**\n * This is a model that extends another model\n */\nexport type ModelThatExtendsExtends = ModelWithString & ModelThatExtends & {\n    propExtendsC?: string;\n    propExtendsD?: ModelWithString;\n};\n\n/**\n * This is a model that contains a some patterns\n */\nexport type ModelWithPattern = {\n    key: string;\n    name: string;\n    readonly enabled?: boolean;\n    readonly modified?: string;\n    id?: string;\n    text?: string;\n    patternWithSingleQuotes?: string;\n    patternWithNewline?: string;\n    patternWithBacktick?: string;\n    patternWithUnicode?: string;\n};\n\nexport type File = {\n    /**\n     * Id\n     */\n    readonly id?: string;\n    /**\n     * Updated at\n     */\n    readonly updated_at?: string;\n    /**\n     * Created at\n     */\n    readonly created_at?: string;\n    /**\n     * Mime\n     */\n    mime: string;\n    /**\n     * File\n     */\n    readonly file?: string;\n};\n\nexport type Default = {\n    name?: string;\n};\n\nexport type Pageable = {\n    page?: number;\n    size?: number;\n    sort?: Array<string>;\n};\n\n/**\n * This is a free-form object without additionalProperties.\n */\nexport type FreeFormObjectWithoutAdditionalProperties = {\n    [key: string]: unknown;\n};\n\n/**\n * This is a free-form object with additionalProperties: true.\n */\nexport type FreeFormObjectWithAdditionalPropertiesEqTrue = {\n    [key: string]: unknown;\n};\n\n/**\n * This is a free-form object with additionalProperties: {}.\n */\nexport type FreeFormObjectWithAdditionalPropertiesEqEmptyObject = {\n    [key: string]: unknown;\n};\n\nexport type ModelWithConst = {\n    String?: 'String';\n    number?: 0;\n    null?: null;\n    withType?: 'Some string';\n};\n\n/**\n * This is a model with one property and additionalProperties: true\n */\nexport type ModelWithAdditionalPropertiesEqTrue = {\n    /**\n     * This is a simple string property\n     */\n    prop?: string;\n    [key: string]: unknown;\n};\n\nexport type NestedAnyOfArraysNullable = {\n    nullableArray?: Array<string | boolean> | null;\n};\n\nexport type CompositionWithOneOfAndProperties = ({\n    foo: SimpleParameter;\n} | {\n    bar: NonAsciiStringæøåÆøÅöôêÊ字符串;\n}) & {\n    baz: number | null;\n    qux: number;\n};\n\n/**\n * An object that can be null\n */\nexport type NullableObject = {\n    foo?: string;\n} | null;\n\n/**\n * Some % character\n */\nexport type CharactersInDescription = string;\n\nexport type ModelWithNullableObject = {\n    data?: NullableObject;\n};\n\n/**\n * An object with additional properties that can be null (anyOf ref + null)\n */\nexport type ModelWithAdditionalPropertiesRef = {\n    [key: string]: NullableObject | null;\n};\n\nexport type ModelWithOneOfEnum = {\n    foo: 'Bar';\n} | {\n    foo: 'Baz';\n} | {\n    foo: 'Qux';\n} | {\n    content: string;\n    foo: 'Quux';\n} | {\n    content: [\n        string,\n        string\n    ];\n    foo: 'Corge';\n};\n\nexport type ModelWithNestedArrayEnumsDataFoo = 'foo' | 'bar';\n\nexport type ModelWithNestedArrayEnumsDataBar = 'baz' | 'qux';\n\nexport type ModelWithNestedArrayEnumsData = {\n    foo?: Array<ModelWithNestedArrayEnumsDataFoo>;\n    bar?: Array<ModelWithNestedArrayEnumsDataBar>;\n};\n\nexport type ModelWithNestedArrayEnums = {\n    array_strings?: Array<string>;\n    data?: ModelWithNestedArrayEnumsData;\n};\n\nexport type ModelWithNestedCompositionEnums = {\n    foo?: ModelWithNestedArrayEnumsDataFoo;\n};\n\nexport type ModelWithReadOnlyAndWriteOnly = {\n    foo: string;\n    readonly bar: string;\n};\n\nexport type ModelWithConstantSizeArray = [\n    number,\n    number\n];\n\nexport type ModelWithAnyOfConstantSizeArray = [\n    number | string,\n    number | string,\n    number | string\n];\n\nexport type ModelWithPrefixItemsConstantSizeArray = [\n    ModelWithInteger,\n    number | string,\n    string\n];\n\nexport type ModelWithAnyOfConstantSizeArrayNullable = [\n    number | null | string,\n    number | null | string,\n    number | null | string\n];\n\nexport type ModelWithAnyOfConstantSizeArrayWithNSizeAndOptions = [\n    number | Import,\n    number | Import\n];\n\nexport type ModelWithAnyOfConstantSizeArrayAndIntersect = [\n    number & string,\n    number & string\n];\n\nexport type ModelWithNumericEnumUnion = {\n    /**\n     * Период\n     */\n    value?: -10 | -1 | 0 | 1 | 3 | 6 | 12;\n};\n\n/**\n * Some description with `back ticks`\n */\nexport type ModelWithBackticksInDescription = {\n    /**\n     * The template `that` should be used for parsing and importing the contents of the CSV file.\n     *\n     * <br/><p>There is one placeholder currently supported:<ul>     <li><b>${x}</b> - refers to the n-th column in the CSV file, e.g. ${1}, ${2}, ...)</li></ul><p>Example of a correct JSON template:</p>\n     * <pre>\n     * [\n     * {\n     * \"resourceType\": \"Asset\",\n     * \"identifier\": {\n     * \"name\": \"${1}\",\n     * \"domain\": {\n     * \"name\": \"${2}\",\n     * \"community\": {\n     * \"name\": \"Some Community\"\n     * }\n     * }\n     * },\n     * \"attributes\" : {\n     * \"00000000-0000-0000-0000-000000003115\" : [ {\n     * \"value\" : \"${3}\"\n     * } ],\n     * \"00000000-0000-0000-0000-000000000222\" : [ {\n     * \"value\" : \"${4}\"\n     * } ]\n     * }\n     * }\n     * ]\n     * </pre>\n     */\n    template?: string;\n};\n\nexport type ModelWithOneOfAndProperties = (SimpleParameter | NonAsciiStringæøåÆøÅöôêÊ字符串) & {\n    baz: number | null;\n    qux: number;\n};\n\n/**\n * Model used to test deduplication strategy (unused)\n */\nexport type ParameterSimpleParameterUnused = string;\n\n/**\n * Model used to test deduplication strategy\n */\nexport type PostServiceWithEmptyTagResponse = string;\n\n/**\n * Model used to test deduplication strategy\n */\nexport type PostServiceWithEmptyTagResponse2 = string;\n\n/**\n * Model used to test deduplication strategy\n */\nexport type DeleteFooData = string;\n\n/**\n * Model used to test deduplication strategy\n */\nexport type DeleteFooData2 = string;\n\n/**\n * Model with restricted keyword name\n */\nexport type Import = string;\n\nexport type SchemaWithFormRestrictedKeys = {\n    description?: string;\n    'x-enum-descriptions'?: string;\n    'x-enum-varnames'?: string;\n    'x-enumNames'?: string;\n    title?: string;\n    object?: {\n        description?: string;\n        'x-enum-descriptions'?: string;\n        'x-enum-varnames'?: string;\n        'x-enumNames'?: string;\n        title?: string;\n    };\n    array?: Array<{\n        description?: string;\n        'x-enum-descriptions'?: string;\n        'x-enum-varnames'?: string;\n        'x-enumNames'?: string;\n        title?: string;\n    }>;\n};\n\n/**\n * This schema was giving PascalCase transformations a hard time\n */\nexport type IoK8sApimachineryPkgApisMetaV1DeleteOptions = {\n    /**\n     * Must be fulfilled before a deletion is carried out. If not possible, a 409 Conflict status will be returned.\n     */\n    preconditions?: IoK8sApimachineryPkgApisMetaV1Preconditions;\n};\n\n/**\n * This schema was giving PascalCase transformations a hard time\n */\nexport type IoK8sApimachineryPkgApisMetaV1Preconditions = {\n    /**\n     * Specifies the target ResourceVersion\n     */\n    resourceVersion?: string;\n    /**\n     * Specifies the target UID.\n     */\n    uid?: string;\n};\n\nexport type AdditionalPropertiesUnknownIssue = {\n    [key: string]: string | number;\n};\n\nexport type AdditionalPropertiesUnknownIssue2 = {\n    [key: string]: string | number;\n};\n\nexport type AdditionalPropertiesUnknownIssue3 = string & {\n    entries: {\n        [key: string]: AdditionalPropertiesUnknownIssue;\n    };\n};\n\nexport type AdditionalPropertiesIntegerIssue = {\n    value: number;\n    [key: string]: number;\n};\n\nexport type OneOfAllOfIssue = ((ConstValue | GenericSchemaDuplicateIssue1SystemBoolean) & _3eNum1Период) | GenericSchemaDuplicateIssue1SystemString;\n\nexport type GenericSchemaDuplicateIssue1SystemBoolean = {\n    item?: boolean;\n    error?: string | null;\n    readonly hasError?: boolean;\n    data?: {\n        [key: string]: never;\n    };\n};\n\nexport type GenericSchemaDuplicateIssue1SystemString = {\n    item?: string | null;\n    error?: string | null;\n    readonly hasError?: boolean;\n};\n\nexport type ExternalSharedModel = {\n    id: string;\n    name?: string;\n};\n\n/**\n * This is a model with one property containing a reference\n */\nexport type ModelWithReferenceWritable = {\n    prop?: ModelWithPropertiesWritable;\n};\n\n/**\n * This is a model with one property containing an array\n */\nexport type ModelWithArrayReadOnlyAndWriteOnlyWritable = {\n    prop?: Array<ModelWithReadOnlyAndWriteOnlyWritable>;\n    propWithFile?: Array<Blob | File>;\n    propWithNumber?: Array<number>;\n};\n\n/**\n * This is a model with one nested property\n */\nexport type ModelWithPropertiesWritable = {\n    required: string;\n    requiredAndNullable: string | null;\n    string?: string;\n    number?: number;\n    boolean?: boolean;\n    reference?: ModelWithString;\n    'property with space'?: string;\n    default?: string;\n    try?: string;\n};\n\n/**\n * This is a model that contains a some patterns\n */\nexport type ModelWithPatternWritable = {\n    key: string;\n    name: string;\n    id?: string;\n    text?: string;\n    patternWithSingleQuotes?: string;\n    patternWithNewline?: string;\n    patternWithBacktick?: string;\n    patternWithUnicode?: string;\n};\n\nexport type FileWritable = {\n    /**\n     * Mime\n     */\n    mime: string;\n};\n\nexport type ModelWithReadOnlyAndWriteOnlyWritable = {\n    foo: string;\n    baz: string;\n};\n\nexport type ModelWithAnyOfConstantSizeArrayWithNSizeAndOptionsWritable = [\n    number | Import,\n    number | Import\n];\n\nexport type AdditionalPropertiesUnknownIssueWritable = {\n    [key: string]: string | number;\n};\n\nexport type OneOfAllOfIssueWritable = ((ConstValue | GenericSchemaDuplicateIssue1SystemBoolean) & _3eNum1Период) | GenericSchemaDuplicateIssue1SystemString;\n\nexport type GenericSchemaDuplicateIssue1SystemBooleanWritable = {\n    item?: boolean;\n    error?: string | null;\n    data?: {\n        [key: string]: never;\n    };\n};\n\nexport type GenericSchemaDuplicateIssue1SystemStringWritable = {\n    item?: string | null;\n    error?: string | null;\n};\n\n/**\n * This is a reusable parameter\n */\nexport type SimpleParameter = string;\n\n/**\n * Parameter with illegal characters\n */\nexport type XFooBar = ModelWithString;\n\n/**\n * A reusable request body\n */\nexport type SimpleRequestBody = ModelWithString;\n\n/**\n * A reusable request body\n */\nexport type SimpleFormData = ModelWithString;\n\nexport type ExportData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no+tag';\n};\n\nexport type PatchApiVbyApiVersionNoTagData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no+tag';\n};\n\nexport type PatchApiVbyApiVersionNoTagResponses = {\n    /**\n     * OK\n     */\n    default: unknown;\n};\n\nexport type ImportData = {\n    body: ModelWithReadOnlyAndWriteOnlyWritable | ModelWithArrayReadOnlyAndWriteOnlyWritable;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no+tag';\n};\n\nexport type ImportResponses = {\n    /**\n     * Success\n     */\n    200: ModelFromZendesk;\n    /**\n     * Default success response\n     */\n    default: ModelWithReadOnlyAndWriteOnly;\n};\n\nexport type ImportResponse = ImportResponses[keyof ImportResponses];\n\nexport type FooWowData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no+tag';\n};\n\nexport type FooWowResponses = {\n    /**\n     * OK\n     */\n    default: unknown;\n};\n\nexport type ApiVVersionODataControllerCountData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple/$count';\n};\n\nexport type ApiVVersionODataControllerCountResponses = {\n    /**\n     * Success\n     */\n    200: ModelFromZendesk;\n};\n\nexport type ApiVVersionODataControllerCountResponse = ApiVVersionODataControllerCountResponses[keyof ApiVVersionODataControllerCountResponses];\n\nexport type GetApiVbyApiVersionSimpleOperationData = {\n    body?: never;\n    path: {\n        /**\n         * foo in method\n         */\n        foo_param: string;\n    };\n    query?: never;\n    url: '/api/v{api-version}/simple:operation';\n};\n\nexport type GetApiVbyApiVersionSimpleOperationErrors = {\n    /**\n     * Default error response\n     */\n    default: ModelWithBoolean;\n};\n\nexport type GetApiVbyApiVersionSimpleOperationError = GetApiVbyApiVersionSimpleOperationErrors[keyof GetApiVbyApiVersionSimpleOperationErrors];\n\nexport type GetApiVbyApiVersionSimpleOperationResponses = {\n    /**\n     * Response is a simple number\n     */\n    200: number;\n};\n\nexport type GetApiVbyApiVersionSimpleOperationResponse = GetApiVbyApiVersionSimpleOperationResponses[keyof GetApiVbyApiVersionSimpleOperationResponses];\n\nexport type DeleteCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type GetCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type HeadCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type OptionsCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type PatchCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type PostCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type PutCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type DeleteFooData3 = {\n    body?: never;\n    headers: {\n        /**\n         * Parameter with illegal characters\n         */\n        'x-Foo-Bar': ModelWithString;\n    };\n    path: {\n        /**\n         * foo in method\n         */\n        foo_param: string;\n        /**\n         * bar in method\n         */\n        BarParam: string;\n    };\n    query?: never;\n    url: '/api/v{api-version}/foo/{foo_param}/bar/{BarParam}';\n};\n\nexport type CallWithDescriptionsData = {\n    body?: never;\n    path?: never;\n    query?: {\n        /**\n         * Testing multiline comments in string: First line\n         * Second line\n         *\n         * Fourth line\n         */\n        parameterWithBreaks?: string;\n        /**\n         * Testing backticks in string: `backticks` and ```multiple backticks``` should work\n         */\n        parameterWithBackticks?: string;\n        /**\n         * Testing slashes in string: \\backwards\\\\\\ and /forwards/// should work\n         */\n        parameterWithSlashes?: string;\n        /**\n         * Testing expression placeholders in string: ${expression} should work\n         */\n        parameterWithExpressionPlaceholders?: string;\n        /**\n         * Testing quotes in string: 'single quote''' and \"double quotes\"\"\" should work\n         */\n        parameterWithQuotes?: string;\n        /**\n         * Testing reserved characters in string: * inline * and ** inline ** should work\n         */\n        parameterWithReservedCharacters?: string;\n    };\n    url: '/api/v{api-version}/descriptions';\n};\n\nexport type DeprecatedCallData = {\n    body?: never;\n    headers: {\n        /**\n         * This parameter is deprecated\n         *\n         * @deprecated\n         */\n        parameter: DeprecatedModel | null;\n    };\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/parameters/deprecated';\n};\n\nexport type CallWithParametersData = {\n    /**\n     * This is the parameter that goes into the body\n     */\n    body: {\n        [key: string]: unknown;\n    } | null;\n    headers: {\n        /**\n         * This is the parameter that goes into the header\n         */\n        parameterHeader: string | null;\n    };\n    path: {\n        /**\n         * This is the parameter that goes into the path\n         */\n        parameterPath: string | null;\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string | null;\n    };\n    query: {\n        foo_ref_enum?: ModelWithNestedArrayEnumsDataFoo;\n        foo_all_of_enum: ModelWithNestedArrayEnumsDataFoo;\n        /**\n         * This is the parameter that goes into the query params\n         */\n        cursor: string | null;\n    };\n    url: '/api/v{api-version}/parameters/{parameterPath}';\n};\n\nexport type CallWithWeirdParameterNamesData = {\n    /**\n     * This is the parameter that goes into the body\n     */\n    body: ModelWithString | null;\n    headers: {\n        /**\n         * This is the parameter that goes into the request header\n         */\n        'parameter.header': string | null;\n    };\n    path: {\n        /**\n         * This is the parameter that goes into the path\n         */\n        'parameter.path.1'?: string;\n        /**\n         * This is the parameter that goes into the path\n         */\n        'parameter-path-2'?: string;\n        /**\n         * This is the parameter that goes into the path\n         */\n        'PARAMETER-PATH-3'?: string;\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string | null;\n    };\n    query: {\n        /**\n         * This is the parameter with a reserved keyword\n         */\n        default?: string;\n        /**\n         * This is the parameter that goes into the request query params\n         */\n        'parameter-query': string | null;\n    };\n    url: '/api/v{api-version}/parameters/{parameter.path.1}/{parameter-path-2}/{PARAMETER-PATH-3}';\n};\n\nexport type GetCallWithOptionalParamData = {\n    /**\n     * This is a required parameter\n     */\n    body: ModelWithOneOfEnum;\n    path?: never;\n    query?: {\n        /**\n         * This is an optional parameter\n         */\n        page?: number;\n    };\n    url: '/api/v{api-version}/parameters';\n};\n\nexport type PostCallWithOptionalParamData = {\n    /**\n     * This is an optional parameter\n     */\n    body?: {\n        offset?: number | null;\n    };\n    path?: never;\n    query: {\n        /**\n         * This is a required parameter\n         */\n        parameter: Pageable;\n    };\n    url: '/api/v{api-version}/parameters';\n};\n\nexport type PostCallWithOptionalParamResponses = {\n    /**\n     * Response is a simple number\n     */\n    200: number;\n    /**\n     * Success\n     */\n    204: void;\n};\n\nexport type PostCallWithOptionalParamResponse = PostCallWithOptionalParamResponses[keyof PostCallWithOptionalParamResponses];\n\nexport type PostApiVbyApiVersionRequestBodyData = {\n    /**\n     * A reusable request body\n     */\n    body?: SimpleRequestBody;\n    path?: never;\n    query?: {\n        /**\n         * This is a reusable parameter\n         */\n        parameter?: string;\n    };\n    url: '/api/v{api-version}/requestBody';\n};\n\nexport type PostApiVbyApiVersionFormDataData = {\n    /**\n     * A reusable request body\n     */\n    body?: SimpleFormData;\n    path?: never;\n    query?: {\n        /**\n         * This is a reusable parameter\n         */\n        parameter?: string;\n    };\n    url: '/api/v{api-version}/formData';\n};\n\nexport type CallWithDefaultParametersData = {\n    body?: never;\n    path?: never;\n    query?: {\n        /**\n         * This is a simple string with default value\n         */\n        parameterString?: string | null;\n        /**\n         * This is a simple number with default value\n         */\n        parameterNumber?: number | null;\n        /**\n         * This is a simple boolean with default value\n         */\n        parameterBoolean?: boolean | null;\n        /**\n         * This is a simple enum with default value\n         */\n        parameterEnum?: 'Success' | 'Warning' | 'Error';\n        /**\n         * This is a simple model with default value\n         */\n        parameterModel?: ModelWithString | null;\n    };\n    url: '/api/v{api-version}/defaults';\n};\n\nexport type CallWithDefaultOptionalParametersData = {\n    body?: never;\n    path?: never;\n    query?: {\n        /**\n         * This is a simple string that is optional with default value\n         */\n        parameterString?: string;\n        /**\n         * This is a simple number that is optional with default value\n         */\n        parameterNumber?: number;\n        /**\n         * This is a simple boolean that is optional with default value\n         */\n        parameterBoolean?: boolean;\n        /**\n         * This is a simple enum that is optional with default value\n         */\n        parameterEnum?: 'Success' | 'Warning' | 'Error';\n        /**\n         * This is a simple model that is optional with default value\n         */\n        parameterModel?: ModelWithString;\n    };\n    url: '/api/v{api-version}/defaults';\n};\n\nexport type CallToTestOrderOfParamsData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * This is a optional string with default\n         */\n        parameterOptionalStringWithDefault?: string;\n        /**\n         * This is a optional string with empty default\n         */\n        parameterOptionalStringWithEmptyDefault?: string;\n        /**\n         * This is a optional string with no default\n         */\n        parameterOptionalStringWithNoDefault?: string;\n        /**\n         * This is a string with default\n         */\n        parameterStringWithDefault: string;\n        /**\n         * This is a string with empty default\n         */\n        parameterStringWithEmptyDefault: string;\n        /**\n         * This is a string with no default\n         */\n        parameterStringWithNoDefault: string;\n        /**\n         * This is a string that can be null with no default\n         */\n        parameterStringNullableWithNoDefault?: string | null;\n        /**\n         * This is a string that can be null with default\n         */\n        parameterStringNullableWithDefault?: string | null;\n    };\n    url: '/api/v{api-version}/defaults';\n};\n\nexport type DuplicateNameData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/duplicate';\n};\n\nexport type DuplicateName2Data = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/duplicate';\n};\n\nexport type DuplicateName3Data = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/duplicate';\n};\n\nexport type DuplicateName4Data = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/duplicate';\n};\n\nexport type CallWithNoContentResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no-content';\n};\n\nexport type CallWithNoContentResponseResponses = {\n    /**\n     * Success\n     */\n    204: void;\n};\n\nexport type CallWithNoContentResponseResponse = CallWithNoContentResponseResponses[keyof CallWithNoContentResponseResponses];\n\nexport type CallWithResponseAndNoContentResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multiple-tags/response-and-no-content';\n};\n\nexport type CallWithResponseAndNoContentResponseResponses = {\n    /**\n     * Response is a simple number\n     */\n    200: number;\n    /**\n     * Success\n     */\n    204: void;\n};\n\nexport type CallWithResponseAndNoContentResponseResponse = CallWithResponseAndNoContentResponseResponses[keyof CallWithResponseAndNoContentResponseResponses];\n\nexport type DummyAData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multiple-tags/a';\n};\n\nexport type DummyAResponses = {\n    200: _400;\n};\n\nexport type DummyAResponse = DummyAResponses[keyof DummyAResponses];\n\nexport type DummyBData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multiple-tags/b';\n};\n\nexport type DummyBResponses = {\n    /**\n     * Success\n     */\n    204: void;\n};\n\nexport type DummyBResponse = DummyBResponses[keyof DummyBResponses];\n\nexport type CallWithResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/response';\n};\n\nexport type CallWithResponseResponses = {\n    default: Import;\n};\n\nexport type CallWithResponseResponse = CallWithResponseResponses[keyof CallWithResponseResponses];\n\nexport type CallWithDuplicateResponsesData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/response';\n};\n\nexport type CallWithDuplicateResponsesErrors = {\n    /**\n     * Message for 500 error\n     */\n    500: ModelWithStringError;\n    /**\n     * Message for 501 error\n     */\n    501: ModelWithStringError;\n    /**\n     * Message for 502 error\n     */\n    502: ModelWithStringError;\n    /**\n     * Message for 4XX errors\n     */\n    '4XX': DictionaryWithArray;\n    /**\n     * Default error response\n     */\n    default: ModelWithBoolean;\n};\n\nexport type CallWithDuplicateResponsesError = CallWithDuplicateResponsesErrors[keyof CallWithDuplicateResponsesErrors];\n\nexport type CallWithDuplicateResponsesResponses = {\n    /**\n     * Message for 200 response\n     */\n    200: ModelWithBoolean & ModelWithInteger;\n    /**\n     * Message for 201 response\n     */\n    201: ModelWithString;\n    /**\n     * Message for 202 response\n     */\n    202: ModelWithString;\n};\n\nexport type CallWithDuplicateResponsesResponse = CallWithDuplicateResponsesResponses[keyof CallWithDuplicateResponsesResponses];\n\nexport type CallWithResponsesData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/response';\n};\n\nexport type CallWithResponsesErrors = {\n    /**\n     * Message for 500 error\n     */\n    500: ModelWithStringError;\n    /**\n     * Message for 501 error\n     */\n    501: ModelWithStringError;\n    /**\n     * Message for 502 error\n     */\n    502: ModelWithStringError;\n    /**\n     * Message for default response\n     */\n    default: ModelWithStringError;\n};\n\nexport type CallWithResponsesError = CallWithResponsesErrors[keyof CallWithResponsesErrors];\n\nexport type CallWithResponsesResponses = {\n    /**\n     * Message for 200 response\n     */\n    200: {\n        readonly '@namespace.string'?: string;\n        readonly '@namespace.integer'?: number;\n        readonly value?: Array<ModelWithString>;\n    };\n    /**\n     * Message for 201 response\n     */\n    201: ModelThatExtends;\n    /**\n     * Message for 202 response\n     */\n    202: ModelThatExtendsExtends;\n};\n\nexport type CallWithResponsesResponse = CallWithResponsesResponses[keyof CallWithResponsesResponses];\n\nexport type CollectionFormatData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * This is an array parameter that is sent as csv format (comma-separated values)\n         */\n        parameterArrayCSV: Array<string> | null;\n        /**\n         * This is an array parameter that is sent as ssv format (space-separated values)\n         */\n        parameterArraySSV: Array<string> | null;\n        /**\n         * This is an array parameter that is sent as tsv format (tab-separated values)\n         */\n        parameterArrayTSV: Array<string> | null;\n        /**\n         * This is an array parameter that is sent as pipes format (pipe-separated values)\n         */\n        parameterArrayPipes: Array<string> | null;\n        /**\n         * This is an array parameter that is sent as multi format (multiple parameter instances)\n         */\n        parameterArrayMulti: Array<string> | null;\n    };\n    url: '/api/v{api-version}/collectionFormat';\n};\n\nexport type TypesData = {\n    body?: never;\n    path?: {\n        /**\n         * This is a number parameter\n         */\n        id?: number;\n    };\n    query: {\n        /**\n         * This is a number parameter\n         */\n        parameterNumber: number;\n        /**\n         * This is a string parameter\n         */\n        parameterString: string | null;\n        /**\n         * This is a boolean parameter\n         */\n        parameterBoolean: boolean | null;\n        /**\n         * This is an object parameter\n         */\n        parameterObject: {\n            [key: string]: unknown;\n        } | null;\n        /**\n         * This is an array parameter\n         */\n        parameterArray: Array<string> | null;\n        /**\n         * This is a dictionary parameter\n         */\n        parameterDictionary: {\n            [key: string]: unknown;\n        } | null;\n        /**\n         * This is an enum parameter\n         */\n        parameterEnum: 'Success' | 'Warning' | 'Error' | null;\n    };\n    url: '/api/v{api-version}/types';\n};\n\nexport type TypesResponses = {\n    /**\n     * Response is a simple number\n     */\n    200: number;\n    /**\n     * Response is a simple string\n     */\n    201: string;\n    /**\n     * Response is a simple boolean\n     */\n    202: boolean;\n    /**\n     * Response is a simple object\n     */\n    203: {\n        [key: string]: unknown;\n    };\n};\n\nexport type TypesResponse = TypesResponses[keyof TypesResponses];\n\nexport type UploadFileData = {\n    body: Blob | File;\n    path: {\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string | null;\n    };\n    query?: never;\n    url: '/api/v{api-version}/upload';\n};\n\nexport type UploadFileResponses = {\n    200: boolean;\n};\n\nexport type UploadFileResponse = UploadFileResponses[keyof UploadFileResponses];\n\nexport type FileResponseData = {\n    body?: never;\n    path: {\n        id: string;\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string;\n    };\n    query?: never;\n    url: '/api/v{api-version}/file/{id}';\n};\n\nexport type FileResponseResponses = {\n    /**\n     * Success\n     */\n    200: Blob | File;\n};\n\nexport type FileResponseResponse = FileResponseResponses[keyof FileResponseResponses];\n\nexport type ComplexTypesData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * Parameter containing object\n         */\n        parameterObject: {\n            first?: {\n                second?: {\n                    third?: string;\n                };\n            };\n        };\n        /**\n         * Parameter containing reference\n         */\n        parameterReference: ModelWithString;\n    };\n    url: '/api/v{api-version}/complex';\n};\n\nexport type ComplexTypesErrors = {\n    /**\n     * 400 `server` error\n     */\n    400: unknown;\n    /**\n     * 500 server error\n     */\n    500: unknown;\n};\n\nexport type ComplexTypesResponses = {\n    /**\n     * Successful response\n     */\n    200: Array<ModelWithString>;\n};\n\nexport type ComplexTypesResponse = ComplexTypesResponses[keyof ComplexTypesResponses];\n\nexport type MultipartResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multipart';\n};\n\nexport type MultipartResponseResponses = {\n    /**\n     * OK\n     */\n    200: {\n        file?: Blob | File;\n        metadata?: {\n            foo?: string;\n            bar?: string;\n        };\n    };\n};\n\nexport type MultipartResponseResponse = MultipartResponseResponses[keyof MultipartResponseResponses];\n\nexport type MultipartRequestData = {\n    body?: {\n        content?: Blob | File;\n        data?: ModelWithString | null;\n    };\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multipart';\n};\n\nexport type ComplexParamsData = {\n    body?: {\n        readonly key: string | null;\n        name: string | null;\n        enabled?: boolean;\n        type: 'Monkey' | 'Horse' | 'Bird';\n        listOfModels?: Array<ModelWithString> | null;\n        listOfStrings?: Array<string> | null;\n        parameters: ModelWithString | ModelWithEnum | ModelWithArray | ModelWithDictionary;\n        readonly user?: {\n            readonly id?: number;\n            readonly name?: string | null;\n        };\n    };\n    path: {\n        id: number;\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string;\n    };\n    query?: never;\n    url: '/api/v{api-version}/complex/{id}';\n};\n\nexport type ComplexParamsResponses = {\n    /**\n     * Success\n     */\n    200: ModelWithString;\n};\n\nexport type ComplexParamsResponse = ComplexParamsResponses[keyof ComplexParamsResponses];\n\nexport type CallWithResultFromHeaderData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/header';\n};\n\nexport type CallWithResultFromHeaderErrors = {\n    /**\n     * 400 server error\n     */\n    400: unknown;\n    /**\n     * 500 server error\n     */\n    500: unknown;\n};\n\nexport type CallWithResultFromHeaderResponses = {\n    /**\n     * Successful response\n     */\n    200: unknown;\n};\n\nexport type TestErrorCodeData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * Status code to return\n         */\n        status: number;\n    };\n    url: '/api/v{api-version}/error';\n};\n\nexport type TestErrorCodeErrors = {\n    /**\n     * Custom message: Internal Server Error\n     */\n    500: unknown;\n    /**\n     * Custom message: Not Implemented\n     */\n    501: unknown;\n    /**\n     * Custom message: Bad Gateway\n     */\n    502: unknown;\n    /**\n     * Custom message: Service Unavailable\n     */\n    503: unknown;\n};\n\nexport type TestErrorCodeResponses = {\n    /**\n     * Custom message: Successful response\n     */\n    200: unknown;\n};\n\nexport type NonAsciiæøåÆøÅöôêÊ字符串Data = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * Dummy input param\n         */\n        nonAsciiParamæøåÆØÅöôêÊ: number;\n    };\n    url: '/api/v{api-version}/non-ascii-æøåÆØÅöôêÊ字符串';\n};\n\nexport type NonAsciiæøåÆøÅöôêÊ字符串Responses = {\n    /**\n     * Successful response\n     */\n    200: Array<NonAsciiStringæøåÆøÅöôêÊ字符串>;\n};\n\nexport type NonAsciiæøåÆøÅöôêÊ字符串Response = NonAsciiæøåÆøÅöôêÊ字符串Responses[keyof NonAsciiæøåÆøÅöôêÊ字符串Responses];\n\nexport type PutWithFormUrlEncodedData = {\n    body: ArrayWithStrings;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/non-ascii-æøåÆØÅöôêÊ字符串';\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-next/tsconfig-node16-sdk/client/client.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport { createSseClient } from '../core/serverSentEvents.gen.js';\nimport type { HttpMethod } from '../core/types.gen.js';\nimport { getValidRequestBody } from '../core/utils.gen.js';\nimport type { Client, Config, RequestOptions, ResolvedRequestOptions } from './types.gen.js';\nimport {\n  buildUrl,\n  createConfig,\n  createInterceptors,\n  getParseAs,\n  mergeConfigs,\n  mergeHeaders,\n  setAuthParams,\n} from './utils.gen.js';\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<Response, unknown, ResolvedRequestOptions>();\n\n  const beforeRequest = async (options: RequestOptions) => {\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 url = buildUrl(opts);\n\n    return { opts, url };\n  };\n\n  // @ts-expect-error\n  const request: Client['request'] = async (options) => {\n    // @ts-expect-error\n    const { opts, url } = await beforeRequest(options);\n\n    for (const fn of interceptors.request.fns) {\n      if (fn) {\n        await fn(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    const requestInit: ReqInit = {\n      ...opts,\n      body: getValidRequestBody(opts),\n    };\n\n    let response = await _fetch(url, requestInit);\n\n    for (const fn of interceptors.response.fns) {\n      if (fn) {\n        response = await fn(response, opts);\n      }\n    }\n\n    const result = {\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 {\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 {\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 {\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, opts)) as string;\n      }\n    }\n\n    finalError = finalError || ({} as string);\n\n    if (opts.throwOnError) {\n      throw finalError;\n    }\n\n    return {\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        const requestInit = {\n          ...init,\n          method: init.method as Config['method'],\n          url,\n        };\n        for (const fn of interceptors.request.fns) {\n          if (fn) {\n            await fn(requestInit);\n            request = new Request(requestInit.url, requestInit);\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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-next/tsconfig-node16-sdk/client/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type { Auth } from '../core/auth.gen.js';\nexport type { QuerySerializerOptions } from '../core/bodySerializer.gen.js';\nexport {\n  formDataBodySerializer,\n  jsonBodySerializer,\n  urlSearchParamsBodySerializer,\n} from '../core/bodySerializer.gen.js';\nexport { buildClientParams } from '../core/params.gen.js';\nexport { serializeQueryKeyValue } from '../core/queryKeySerializer.gen.js';\nexport { createClient } from './client.gen.js';\nexport type {\n  Client,\n  ClientOptions,\n  Config,\n  CreateClientConfig,\n  Options,\n  RequestOptions,\n  RequestResult,\n  TDataShape,\n} from './types.gen.js';\nexport { createConfig } from './utils.gen.js';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-next/tsconfig-node16-sdk/client/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { Auth } from '../core/auth.gen.js';\nimport type {\n  ServerSentEventsOptions,\n  ServerSentEventsResult,\n} from '../core/serverSentEvents.gen.js';\nimport type { Client as CoreClient, Config as CoreConfig } from '../core/types.gen.js';\nimport type { Middleware } from './utils.gen.js';\n\nexport interface Config<T extends ClientOptions = ClientOptions>\n  extends Omit<RequestInit, 'body' | 'headers' | 'method'>, CoreConfig {\n  /**\n   * Base URL for all requests made by this client.\n   */\n  baseUrl?: T['baseUrl'];\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   * Return the response data parsed in a specified format. By default, `auto`\n   * will infer the appropriate method from the `Content-Type` response header.\n   * You can override this behavior with any of the {@link Body} methods.\n   * Select `stream` if you don't want to parse response data at all.\n   *\n   * @default 'auto'\n   */\n  parseAs?: 'arrayBuffer' | 'auto' | 'blob' | 'formData' | 'json' | 'stream' | 'text';\n  /**\n   * Throw an error instead of returning it in the response?\n   *\n   * @default false\n   */\n  throwOnError?: T['throwOnError'];\n}\n\nexport interface RequestOptions<\n  TData = unknown,\n  ThrowOnError extends boolean = boolean,\n  Url extends string = string,\n>\n  extends\n    Config<{\n      throwOnError: ThrowOnError;\n    }>,\n    Pick<\n      ServerSentEventsOptions<TData>,\n      | 'onRequest'\n      | 'onSseError'\n      | 'onSseEvent'\n      | 'sseDefaultRetryDelay'\n      | 'sseMaxRetryAttempts'\n      | 'sseMaxRetryDelay'\n    > {\n  /**\n   * Any body that you want to add to your request.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/fetch#body}\n   */\n  body?: unknown;\n  path?: Record<string, unknown>;\n  query?: Record<string, unknown>;\n  /**\n   * Security mechanism(s) to use for the request.\n   */\n  security?: ReadonlyArray<Auth>;\n  url: Url;\n}\n\nexport interface ResolvedRequestOptions<\n  ThrowOnError extends boolean = boolean,\n  Url extends string = string,\n> extends RequestOptions<unknown, ThrowOnError, Url> {\n  serializedBody?: string;\n}\n\nexport type RequestResult<\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = boolean,\n> = ThrowOnError extends true\n  ? Promise<{\n      data: TData extends Record<string, unknown> ? TData[keyof TData] : TData;\n      response: Response;\n    }>\n  : Promise<\n      (\n        | {\n            data: TData extends Record<string, unknown> ? TData[keyof TData] : TData;\n            error: undefined;\n          }\n        | {\n            data: undefined;\n            error: TError extends Record<string, unknown> ? TError[keyof TError] : TError;\n          }\n      ) & {\n        response: Response;\n      }\n    >;\n\nexport interface ClientOptions {\n  baseUrl?: string;\n  throwOnError?: boolean;\n}\n\ntype MethodFn = <TData = unknown, TError = unknown, ThrowOnError extends boolean = false>(\n  options: Omit<RequestOptions<TData, ThrowOnError>, 'method'>,\n) => RequestResult<TData, TError, ThrowOnError>;\n\ntype SseFn = <TData = unknown, TError = unknown, ThrowOnError extends boolean = false>(\n  options: Omit<RequestOptions<TData, ThrowOnError>, 'method'>,\n) => Promise<ServerSentEventsResult<TData, TError>>;\n\ntype RequestFn = <TData = unknown, TError = unknown, ThrowOnError extends boolean = false>(\n  options: Omit<RequestOptions<TData, ThrowOnError>, 'method'> &\n    Pick<Required<RequestOptions<TData, ThrowOnError>>, 'method'>,\n) => RequestResult<TData, TError, ThrowOnError>;\n\ntype BuildUrlFn = <\n  TData extends {\n    body?: unknown;\n    path?: Record<string, unknown>;\n    query?: Record<string, unknown>;\n    url: string;\n  },\n>(\n  options: TData & Options<TData>,\n) => string;\n\nexport type Client = CoreClient<RequestFn, Config, MethodFn, BuildUrlFn, SseFn> & {\n  interceptors: Middleware<Response, unknown, ResolvedRequestOptions>;\n};\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 = ClientOptions> = (\n  override?: Config<ClientOptions & T>,\n) => Config<Required<ClientOptions> & T>;\n\nexport interface TDataShape {\n  body?: unknown;\n  headers?: unknown;\n  path?: unknown;\n  query?: unknown;\n  url: string;\n}\n\ntype OmitKeys<T, K> = Pick<T, Exclude<keyof T, K>>;\n\nexport type Options<\n  TData extends TDataShape = TDataShape,\n  ThrowOnError extends boolean = boolean,\n  TResponse = unknown,\n> = OmitKeys<RequestOptions<TResponse, ThrowOnError>, 'body' | 'path' | 'query' | 'url'> &\n  ([TData] extends [never] ? unknown : Omit<TData, 'url'>);\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-next/tsconfig-node16-sdk/client/utils.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport { getAuthToken } from '../core/auth.gen.js';\nimport type {\n  QuerySerializer,\n  QuerySerializerOptions,\n} from '../core/bodySerializer.gen.js';\nimport { jsonBodySerializer } from '../core/bodySerializer.gen.js';\nimport {\n  serializeArrayParam,\n  serializeObjectParam,\n  serializePrimitiveParam,\n} from '../core/pathSerializer.gen.js';\nimport type { Client, ClientOptions, Config, RequestOptions } from './types.gen.js';\n\ninterface PathSerializer {\n  path: Record<string, unknown>;\n  url: string;\n}\n\nconst PATH_PARAM_RE = /\\{[^{}]+\\}/g;\n\ntype ArrayStyle = 'form' | 'spaceDelimited' | 'pipeDelimited';\ntype MatrixStyle = 'label' | 'matrix' | 'simple';\ntype ArraySeparatorStyle = ArrayStyle | MatrixStyle;\n\nconst 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 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    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  const url = 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  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 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 || typeof header !== 'object') {\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, Options> = (\n  error: Err,\n  response: Res,\n  options: Options,\n) => Err | Promise<Err>;\n\ntype ReqInterceptor<Options> = (options: Options) => void | Promise<void>;\n\ntype ResInterceptor<Res, Options> = (response: Res, options: Options) => 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<Res, Err, Options> {\n  error: Interceptors<ErrInterceptor<Err, Res, Options>>;\n  request: Interceptors<ReqInterceptor<Options>>;\n  response: Interceptors<ResInterceptor<Res, Options>>;\n}\n\nexport const createInterceptors = <Res, Err, Options>(): Middleware<Res, Err, Options> => ({\n  error: new Interceptors<ErrInterceptor<Err, Res, Options>>(),\n  request: new Interceptors<ReqInterceptor<Options>>(),\n  response: new Interceptors<ResInterceptor<Res, 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-next/tsconfig-node16-sdk/client.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport { type ClientOptions, type Config, createClient, createConfig } from './client/index.js';\nimport type { ClientOptions as ClientOptions2 } from './types.gen.js';\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: 'http://localhost:3000/base' }));\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-next/tsconfig-node16-sdk/core/auth.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-next/tsconfig-node16-sdk/core/bodySerializer.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { ArrayStyle, ObjectStyle, SerializerOptions } from './pathSerializer.gen.js';\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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-next/tsconfig-node16-sdk/core/params.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-next/tsconfig-node16-sdk/core/pathSerializer.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-next/tsconfig-node16-sdk/core/queryKeySerializer.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\n/**\n * JSON-friendly union that mirrors what Pinia Colada can hash.\n */\nexport type JsonValue =\n  | null\n  | string\n  | number\n  | boolean\n  | JsonValue[]\n  | { [key: string]: JsonValue };\n\n/**\n * Replacer that converts non-JSON values (bigint, Date, etc.) to safe substitutes.\n */\nexport const queryKeyJsonReplacer = (_key: string, value: unknown) => {\n  if (value === undefined || typeof value === 'function' || typeof value === 'symbol') {\n    return undefined;\n  }\n  if (typeof value === 'bigint') {\n    return value.toString();\n  }\n  if (value instanceof Date) {\n    return value.toISOString();\n  }\n  return value;\n};\n\n/**\n * Safely stringifies a value and parses it back into a JsonValue.\n */\nexport const stringifyToJsonValue = (input: unknown): JsonValue | undefined => {\n  try {\n    const json = JSON.stringify(input, queryKeyJsonReplacer);\n    if (json === undefined) {\n      return undefined;\n    }\n    return JSON.parse(json) as JsonValue;\n  } catch {\n    return undefined;\n  }\n};\n\n/**\n * Detects plain objects (including objects with a null prototype).\n */\nconst isPlainObject = (value: unknown): value is Record<string, unknown> => {\n  if (value === null || typeof value !== 'object') {\n    return false;\n  }\n  const prototype = Object.getPrototypeOf(value as object);\n  return prototype === Object.prototype || prototype === null;\n};\n\n/**\n * Turns URLSearchParams into a sorted JSON object for deterministic keys.\n */\nconst serializeSearchParams = (params: URLSearchParams): JsonValue => {\n  const entries = Array.from(params.entries()).sort(([a], [b]) => a.localeCompare(b));\n  const result: Record<string, JsonValue> = {};\n\n  for (const [key, value] of entries) {\n    const existing = result[key];\n    if (existing === undefined) {\n      result[key] = value;\n      continue;\n    }\n\n    if (Array.isArray(existing)) {\n      (existing as string[]).push(value);\n    } else {\n      result[key] = [existing, value];\n    }\n  }\n\n  return result;\n};\n\n/**\n * Normalizes any accepted value into a JSON-friendly shape for query keys.\n */\nexport const serializeQueryKeyValue = (value: unknown): JsonValue | undefined => {\n  if (value === null) {\n    return null;\n  }\n\n  if (typeof value === 'string' || typeof value === 'number' || typeof value === 'boolean') {\n    return value;\n  }\n\n  if (value === undefined || typeof value === 'function' || typeof value === 'symbol') {\n    return undefined;\n  }\n\n  if (typeof value === 'bigint') {\n    return value.toString();\n  }\n\n  if (value instanceof Date) {\n    return value.toISOString();\n  }\n\n  if (Array.isArray(value)) {\n    return stringifyToJsonValue(value);\n  }\n\n  if (typeof URLSearchParams !== 'undefined' && value instanceof URLSearchParams) {\n    return serializeSearchParams(value);\n  }\n\n  if (isPlainObject(value)) {\n    return stringifyToJsonValue(value);\n  }\n\n  return undefined;\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-next/tsconfig-node16-sdk/core/serverSentEvents.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { Config } from './types.gen.js';\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 const 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            // Normalize line endings: CRLF -> LF, then CR -> LF\n            buffer = buffer.replace(/\\r\\n/g, '\\n').replace(/\\r/g, '\\n');\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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-next/tsconfig-node16-sdk/core/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { Auth, AuthToken } from './auth.gen.js';\nimport type { BodySerializer, QuerySerializer, QuerySerializerOptions } from './bodySerializer.gen.js';\n\nexport type HttpMethod =\n  | 'connect'\n  | 'delete'\n  | 'get'\n  | 'head'\n  | 'options'\n  | 'patch'\n  | 'post'\n  | 'put'\n  | 'trace';\n\nexport type Client<\n  RequestFn = never,\n  Config = unknown,\n  MethodFn = never,\n  BuildUrlFn = never,\n  SseFn = never,\n> = {\n  /**\n   * Returns the final request URL.\n   */\n  buildUrl: BuildUrlFn;\n  getConfig: () => Config;\n  request: RequestFn;\n  setConfig: (config: Config) => Config;\n} & {\n  [K in HttpMethod]: MethodFn;\n} & ([SseFn] extends [never] ? { sse?: never } : { sse: { [K in HttpMethod]: SseFn } });\n\nexport interface Config {\n  /**\n   * Auth token or a function returning auth token. The resolved value will be\n   * added to the request payload as defined by its `security` array.\n   */\n  auth?: ((auth: Auth) => Promise<AuthToken> | AuthToken) | AuthToken;\n  /**\n   * A function for serializing request body parameter. By default,\n   * {@link JSON.stringify()} will be used.\n   */\n  bodySerializer?: BodySerializer | null;\n  /**\n   * An object containing any HTTP headers that you want to pre-populate your\n   * `Headers` object with.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/Headers/Headers#init See more}\n   */\n  headers?:\n    | RequestInit['headers']\n    | Record<\n        string,\n        string | number | boolean | (string | number | boolean)[] | null | undefined | unknown\n      >;\n  /**\n   * The request method.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/fetch#method See more}\n   */\n  method?: Uppercase<HttpMethod>;\n  /**\n   * A function for serializing request query parameters. By default, arrays\n   * will be exploded in form style, objects will be exploded in deepObject\n   * style, and reserved characters are percent-encoded.\n   *\n   * This method will have no effect if the native `paramsSerializer()` Axios\n   * API function is used.\n   *\n   * {@link https://swagger.io/docs/specification/serialization/#query View examples}\n   */\n  querySerializer?: QuerySerializer | QuerySerializerOptions;\n  /**\n   * A function validating request data. This is useful if you want to ensure\n   * the request conforms to the desired shape, so it can be safely sent to\n   * the server.\n   */\n  requestValidator?: (data: unknown) => Promise<unknown>;\n  /**\n   * A function transforming response data before it's returned. This is useful\n   * for post-processing data, e.g. converting ISO strings into Date objects.\n   */\n  responseTransformer?: (data: unknown) => Promise<unknown>;\n  /**\n   * A function validating response data. This is useful if you want to ensure\n   * the response conforms to the desired shape, so it can be safely passed to\n   * the transformers and returned to the user.\n   */\n  responseValidator?: (data: unknown) => Promise<unknown>;\n}\n\ntype IsExactlyNeverOrNeverUndefined<T> = [T] extends [never]\n  ? true\n  : [T] extends [never | undefined]\n    ? [undefined] extends [T]\n      ? false\n      : true\n    : false;\n\nexport type OmitNever<T extends Record<string, unknown>> = {\n  [K in keyof T as IsExactlyNeverOrNeverUndefined<T[K]> extends true ? never : K]: T[K];\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-next/tsconfig-node16-sdk/core/utils.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { BodySerializer, QuerySerializer } from './bodySerializer.gen.js';\nimport {\n  type ArraySeparatorStyle,\n  serializeArrayParam,\n  serializeObjectParam,\n  serializePrimitiveParam,\n} from './pathSerializer.gen.js';\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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-next/tsconfig-node16-sdk/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport { apiVVersionODataControllerCount, callToTestOrderOfParams, callWithDefaultOptionalParameters, callWithDefaultParameters, callWithDescriptions, callWithDuplicateResponses, callWithNoContentResponse, callWithParameters, callWithResponse, callWithResponseAndNoContentResponse, callWithResponses, callWithResultFromHeader, callWithWeirdParameterNames, collectionFormat, complexParams, complexTypes, deleteCallWithoutParametersAndResponse, deleteFoo, deprecatedCall, dummyA, dummyB, duplicateName, duplicateName2, duplicateName3, duplicateName4, export_, fileResponse, fooWow, getApiVbyApiVersionSimpleOperation, getCallWithOptionalParam, getCallWithoutParametersAndResponse, headCallWithoutParametersAndResponse, import_, multipartRequest, multipartResponse, nonAsciiæøåÆøÅöôêÊ字符串, type Options, optionsCallWithoutParametersAndResponse, patchApiVbyApiVersionNoTag, patchCallWithoutParametersAndResponse, postApiVbyApiVersionFormData, postApiVbyApiVersionRequestBody, postCallWithOptionalParam, postCallWithoutParametersAndResponse, putCallWithoutParametersAndResponse, putWithFormUrlEncoded, testErrorCode, types, uploadFile } from './sdk.gen.js';\nexport type { _3eNum1Период, _400, AdditionalPropertiesIntegerIssue, AdditionalPropertiesUnknownIssue, AdditionalPropertiesUnknownIssue2, AdditionalPropertiesUnknownIssue3, AdditionalPropertiesUnknownIssueWritable, AnyOfAnyAndNull, AnyOfArrays, ApiVVersionODataControllerCountData, ApiVVersionODataControllerCountResponse, ApiVVersionODataControllerCountResponses, ArrayWithAnyOfProperties, ArrayWithArray, ArrayWithBooleans, ArrayWithNumbers, ArrayWithProperties, ArrayWithReferences, ArrayWithStrings, CallToTestOrderOfParamsData, CallWithDefaultOptionalParametersData, CallWithDefaultParametersData, CallWithDescriptionsData, CallWithDuplicateResponsesData, CallWithDuplicateResponsesError, CallWithDuplicateResponsesErrors, CallWithDuplicateResponsesResponse, CallWithDuplicateResponsesResponses, CallWithNoContentResponseData, CallWithNoContentResponseResponse, CallWithNoContentResponseResponses, CallWithParametersData, CallWithResponseAndNoContentResponseData, CallWithResponseAndNoContentResponseResponse, CallWithResponseAndNoContentResponseResponses, CallWithResponseData, CallWithResponseResponse, CallWithResponseResponses, CallWithResponsesData, CallWithResponsesError, CallWithResponsesErrors, CallWithResponsesResponse, CallWithResponsesResponses, CallWithResultFromHeaderData, CallWithResultFromHeaderErrors, CallWithResultFromHeaderResponses, CallWithWeirdParameterNamesData, CamelCaseCommentWithBreaks, CharactersInDescription, ClientOptions, CollectionFormatData, CommentWithBackticks, CommentWithBackticksAndQuotes, CommentWithBreaks, CommentWithExpressionPlaceholders, CommentWithQuotes, CommentWithReservedCharacters, CommentWithSlashes, ComplexParamsData, ComplexParamsResponse, ComplexParamsResponses, ComplexTypesData, ComplexTypesErrors, ComplexTypesResponse, ComplexTypesResponses, CompositionBaseModel, CompositionExtendedModel, CompositionWithAllOfAndNullable, CompositionWithAnyOf, CompositionWithAnyOfAndNullable, CompositionWithAnyOfAnonymous, CompositionWithNestedAnyAndTypeNull, CompositionWithNestedAnyOfAndNull, CompositionWithOneOf, CompositionWithOneOfAndComplexArrayDictionary, CompositionWithOneOfAndNullable, CompositionWithOneOfAndProperties, CompositionWithOneOfAndSimpleArrayDictionary, CompositionWithOneOfAndSimpleDictionary, CompositionWithOneOfAnonymous, CompositionWithOneOfDiscriminator, ConstValue, Default, DeleteCallWithoutParametersAndResponseData, DeleteFooData, DeleteFooData2, DeleteFooData3, DeprecatedCallData, DeprecatedModel, DictionaryWithArray, DictionaryWithDictionary, DictionaryWithProperties, DictionaryWithPropertiesAndAdditionalProperties, DictionaryWithReference, DictionaryWithString, DummyAData, DummyAResponse, DummyAResponses, DummyBData, DummyBResponse, DummyBResponses, DuplicateName2Data, DuplicateName3Data, DuplicateName4Data, DuplicateNameData, EnumFromDescription, EnumWithExtensions, EnumWithNumbers, EnumWithReplacedCharacters, EnumWithStrings, EnumWithXEnumNames, ExportData, ExternalRefA, ExternalRefB, ExternalSharedModel, File, FileResponseData, FileResponseResponse, FileResponseResponses, FileWritable, FooWowData, FooWowResponses, FreeFormObjectWithAdditionalPropertiesEqEmptyObject, FreeFormObjectWithAdditionalPropertiesEqTrue, FreeFormObjectWithoutAdditionalProperties, GenericSchemaDuplicateIssue1SystemBoolean, GenericSchemaDuplicateIssue1SystemBooleanWritable, GenericSchemaDuplicateIssue1SystemString, GenericSchemaDuplicateIssue1SystemStringWritable, GetApiVbyApiVersionSimpleOperationData, GetApiVbyApiVersionSimpleOperationError, GetApiVbyApiVersionSimpleOperationErrors, GetApiVbyApiVersionSimpleOperationResponse, GetApiVbyApiVersionSimpleOperationResponses, GetCallWithOptionalParamData, GetCallWithoutParametersAndResponseData, HeadCallWithoutParametersAndResponseData, Import, ImportData, ImportResponse, ImportResponses, IoK8sApimachineryPkgApisMetaV1DeleteOptions, IoK8sApimachineryPkgApisMetaV1Preconditions, ModelCircle, ModelFromZendesk, ModelSquare, ModelThatExtends, ModelThatExtendsExtends, ModelWithAdditionalPropertiesEqTrue, ModelWithAdditionalPropertiesRef, ModelWithAnyOfConstantSizeArray, ModelWithAnyOfConstantSizeArrayAndIntersect, ModelWithAnyOfConstantSizeArrayNullable, ModelWithAnyOfConstantSizeArrayWithNSizeAndOptions, ModelWithAnyOfConstantSizeArrayWithNSizeAndOptionsWritable, ModelWithArray, ModelWithArrayReadOnlyAndWriteOnly, ModelWithArrayReadOnlyAndWriteOnlyWritable, ModelWithBackticksInDescription, ModelWithBoolean, ModelWithCircularReference, ModelWithConst, ModelWithConstantSizeArray, ModelWithDictionary, ModelWithDuplicateImports, ModelWithDuplicateProperties, ModelWithEnum, ModelWithEnumFromDescription, ModelWithEnumWithHyphen, ModelWithInteger, ModelWithNestedArrayEnums, ModelWithNestedArrayEnumsData, ModelWithNestedArrayEnumsDataBar, ModelWithNestedArrayEnumsDataFoo, ModelWithNestedCompositionEnums, ModelWithNestedEnums, ModelWithNestedProperties, ModelWithNullableObject, ModelWithNullableString, ModelWithNumericEnumUnion, ModelWithOneOfAndProperties, ModelWithOneOfEnum, ModelWithOrderedProperties, ModelWithPattern, ModelWithPatternWritable, ModelWithPrefixItemsConstantSizeArray, ModelWithProperties, ModelWithPropertiesWritable, ModelWithReadOnlyAndWriteOnly, ModelWithReadOnlyAndWriteOnlyWritable, ModelWithReference, ModelWithReferenceWritable, ModelWithString, ModelWithStringError, MultipartRequestData, MultipartResponseData, MultipartResponseResponse, MultipartResponseResponses, NestedAnyOfArraysNullable, NonAsciiæøåÆøÅöôêÊ字符串Data, NonAsciiæøåÆøÅöôêÊ字符串Response, NonAsciiæøåÆøÅöôêÊ字符串Responses, NonAsciiStringæøåÆøÅöôêÊ字符串, NullableObject, OneOfAllOfIssue, OneOfAllOfIssueWritable, OptionsCallWithoutParametersAndResponseData, Pageable, ParameterSimpleParameterUnused, PatchApiVbyApiVersionNoTagData, PatchApiVbyApiVersionNoTagResponses, PatchCallWithoutParametersAndResponseData, PostApiVbyApiVersionFormDataData, PostApiVbyApiVersionRequestBodyData, PostCallWithOptionalParamData, PostCallWithOptionalParamResponse, PostCallWithOptionalParamResponses, PostCallWithoutParametersAndResponseData, PostServiceWithEmptyTagResponse, PostServiceWithEmptyTagResponse2, PutCallWithoutParametersAndResponseData, PutWithFormUrlEncodedData, SchemaWithFormRestrictedKeys, SimpleBoolean, SimpleFile, SimpleFormData, SimpleInteger, SimpleParameter, SimpleReference, SimpleRequestBody, SimpleString, SimpleStringWithPattern, TestErrorCodeData, TestErrorCodeErrors, TestErrorCodeResponses, TypesData, TypesResponse, TypesResponses, UploadFileData, UploadFileResponse, UploadFileResponses, XFooBar } from './types.gen.js';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-next/tsconfig-node16-sdk/sdk.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport { client } from './client.gen.js';\nimport { type Client, formDataBodySerializer, type Options as Options2, type TDataShape, urlSearchParamsBodySerializer } from './client/index.js';\nimport type { ApiVVersionODataControllerCountData, ApiVVersionODataControllerCountResponses, CallToTestOrderOfParamsData, CallWithDefaultOptionalParametersData, CallWithDefaultParametersData, CallWithDescriptionsData, CallWithDuplicateResponsesData, CallWithDuplicateResponsesErrors, CallWithDuplicateResponsesResponses, CallWithNoContentResponseData, CallWithNoContentResponseResponses, CallWithParametersData, CallWithResponseAndNoContentResponseData, CallWithResponseAndNoContentResponseResponses, CallWithResponseData, CallWithResponseResponses, CallWithResponsesData, CallWithResponsesErrors, CallWithResponsesResponses, CallWithResultFromHeaderData, CallWithResultFromHeaderErrors, CallWithResultFromHeaderResponses, CallWithWeirdParameterNamesData, CollectionFormatData, ComplexParamsData, ComplexParamsResponses, ComplexTypesData, ComplexTypesErrors, ComplexTypesResponses, DeleteCallWithoutParametersAndResponseData, DeleteFooData3, DeprecatedCallData, DummyAData, DummyAResponses, DummyBData, DummyBResponses, DuplicateName2Data, DuplicateName3Data, DuplicateName4Data, DuplicateNameData, ExportData, FileResponseData, FileResponseResponses, FooWowData, FooWowResponses, GetApiVbyApiVersionSimpleOperationData, GetApiVbyApiVersionSimpleOperationErrors, GetApiVbyApiVersionSimpleOperationResponses, GetCallWithOptionalParamData, GetCallWithoutParametersAndResponseData, HeadCallWithoutParametersAndResponseData, ImportData, ImportResponses, MultipartRequestData, MultipartResponseData, MultipartResponseResponses, NonAsciiæøåÆøÅöôêÊ字符串Data, NonAsciiæøåÆøÅöôêÊ字符串Responses, OptionsCallWithoutParametersAndResponseData, PatchApiVbyApiVersionNoTagData, PatchApiVbyApiVersionNoTagResponses, PatchCallWithoutParametersAndResponseData, PostApiVbyApiVersionFormDataData, PostApiVbyApiVersionRequestBodyData, PostCallWithOptionalParamData, PostCallWithOptionalParamResponses, PostCallWithoutParametersAndResponseData, PutCallWithoutParametersAndResponseData, PutWithFormUrlEncodedData, TestErrorCodeData, TestErrorCodeErrors, TestErrorCodeResponses, TypesData, TypesResponses, UploadFileData, UploadFileResponses } from './types.gen.js';\n\nexport type Options<TData extends TDataShape = TDataShape, ThrowOnError extends boolean = boolean> = Options2<TData, ThrowOnError> & {\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\nexport const export_ = <ThrowOnError extends boolean = false>(options?: Options<ExportData, ThrowOnError>) => (options?.client ?? client).get<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/no+tag', ...options });\n\nexport const patchApiVbyApiVersionNoTag = <ThrowOnError extends boolean = false>(options?: Options<PatchApiVbyApiVersionNoTagData, ThrowOnError>) => (options?.client ?? client).patch<PatchApiVbyApiVersionNoTagResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/no+tag', ...options });\n\nexport const import_ = <ThrowOnError extends boolean = false>(options: Options<ImportData, ThrowOnError>) => (options.client ?? client).post<ImportResponses, unknown, ThrowOnError>({\n    url: '/api/v{api-version}/no+tag',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options.headers\n    }\n});\n\nexport const fooWow = <ThrowOnError extends boolean = false>(options?: Options<FooWowData, ThrowOnError>) => (options?.client ?? client).put<FooWowResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/no+tag', ...options });\n\nexport const apiVVersionODataControllerCount = <ThrowOnError extends boolean = false>(options?: Options<ApiVVersionODataControllerCountData, ThrowOnError>) => (options?.client ?? client).get<ApiVVersionODataControllerCountResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple/$count', ...options });\n\nexport const getApiVbyApiVersionSimpleOperation = <ThrowOnError extends boolean = false>(options: Options<GetApiVbyApiVersionSimpleOperationData, ThrowOnError>) => (options.client ?? client).get<GetApiVbyApiVersionSimpleOperationResponses, GetApiVbyApiVersionSimpleOperationErrors, ThrowOnError>({ url: '/api/v{api-version}/simple:operation', ...options });\n\nexport const deleteCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<DeleteCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).delete<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const getCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<GetCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).get<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const headCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<HeadCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).head<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const optionsCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<OptionsCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).options<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const patchCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<PatchCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).patch<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const postCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<PostCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).post<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const putCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<PutCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).put<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const deleteFoo = <ThrowOnError extends boolean = false>(options: Options<DeleteFooData3, ThrowOnError>) => (options.client ?? client).delete<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/foo/{foo_param}/bar/{BarParam}', ...options });\n\nexport const callWithDescriptions = <ThrowOnError extends boolean = false>(options?: Options<CallWithDescriptionsData, ThrowOnError>) => (options?.client ?? client).post<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/descriptions', ...options });\n\n/**\n * @deprecated\n */\nexport const deprecatedCall = <ThrowOnError extends boolean = false>(options: Options<DeprecatedCallData, ThrowOnError>) => (options.client ?? client).post<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/parameters/deprecated', ...options });\n\nexport const callWithParameters = <ThrowOnError extends boolean = false>(options: Options<CallWithParametersData, ThrowOnError>) => (options.client ?? client).post<unknown, unknown, ThrowOnError>({\n    url: '/api/v{api-version}/parameters/{parameterPath}',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options.headers\n    }\n});\n\nexport const callWithWeirdParameterNames = <ThrowOnError extends boolean = false>(options: Options<CallWithWeirdParameterNamesData, ThrowOnError>) => (options.client ?? client).post<unknown, unknown, ThrowOnError>({\n    url: '/api/v{api-version}/parameters/{parameter.path.1}/{parameter-path-2}/{PARAMETER-PATH-3}',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options.headers\n    }\n});\n\nexport const getCallWithOptionalParam = <ThrowOnError extends boolean = false>(options: Options<GetCallWithOptionalParamData, ThrowOnError>) => (options.client ?? client).get<unknown, unknown, ThrowOnError>({\n    url: '/api/v{api-version}/parameters',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options.headers\n    }\n});\n\nexport const postCallWithOptionalParam = <ThrowOnError extends boolean = false>(options: Options<PostCallWithOptionalParamData, ThrowOnError>) => (options.client ?? client).post<PostCallWithOptionalParamResponses, unknown, ThrowOnError>({\n    url: '/api/v{api-version}/parameters',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options.headers\n    }\n});\n\nexport const postApiVbyApiVersionRequestBody = <ThrowOnError extends boolean = false>(options?: Options<PostApiVbyApiVersionRequestBodyData, ThrowOnError>) => (options?.client ?? client).post<unknown, unknown, ThrowOnError>({\n    url: '/api/v{api-version}/requestBody',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options?.headers\n    }\n});\n\nexport const postApiVbyApiVersionFormData = <ThrowOnError extends boolean = false>(options?: Options<PostApiVbyApiVersionFormDataData, ThrowOnError>) => (options?.client ?? client).post<unknown, unknown, ThrowOnError>({\n    ...formDataBodySerializer,\n    url: '/api/v{api-version}/formData',\n    ...options,\n    headers: {\n        'Content-Type': null,\n        ...options?.headers\n    }\n});\n\nexport const callWithDefaultParameters = <ThrowOnError extends boolean = false>(options?: Options<CallWithDefaultParametersData, ThrowOnError>) => (options?.client ?? client).get<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/defaults', ...options });\n\nexport const callWithDefaultOptionalParameters = <ThrowOnError extends boolean = false>(options?: Options<CallWithDefaultOptionalParametersData, ThrowOnError>) => (options?.client ?? client).post<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/defaults', ...options });\n\nexport const callToTestOrderOfParams = <ThrowOnError extends boolean = false>(options: Options<CallToTestOrderOfParamsData, ThrowOnError>) => (options.client ?? client).put<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/defaults', ...options });\n\nexport const duplicateName = <ThrowOnError extends boolean = false>(options?: Options<DuplicateNameData, ThrowOnError>) => (options?.client ?? client).delete<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/duplicate', ...options });\n\nexport const duplicateName2 = <ThrowOnError extends boolean = false>(options?: Options<DuplicateName2Data, ThrowOnError>) => (options?.client ?? client).get<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/duplicate', ...options });\n\nexport const duplicateName3 = <ThrowOnError extends boolean = false>(options?: Options<DuplicateName3Data, ThrowOnError>) => (options?.client ?? client).post<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/duplicate', ...options });\n\nexport const duplicateName4 = <ThrowOnError extends boolean = false>(options?: Options<DuplicateName4Data, ThrowOnError>) => (options?.client ?? client).put<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/duplicate', ...options });\n\nexport const callWithNoContentResponse = <ThrowOnError extends boolean = false>(options?: Options<CallWithNoContentResponseData, ThrowOnError>) => (options?.client ?? client).get<CallWithNoContentResponseResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/no-content', ...options });\n\nexport const callWithResponseAndNoContentResponse = <ThrowOnError extends boolean = false>(options?: Options<CallWithResponseAndNoContentResponseData, ThrowOnError>) => (options?.client ?? client).get<CallWithResponseAndNoContentResponseResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/multiple-tags/response-and-no-content', ...options });\n\nexport const dummyA = <ThrowOnError extends boolean = false>(options?: Options<DummyAData, ThrowOnError>) => (options?.client ?? client).get<DummyAResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/multiple-tags/a', ...options });\n\nexport const dummyB = <ThrowOnError extends boolean = false>(options?: Options<DummyBData, ThrowOnError>) => (options?.client ?? client).get<DummyBResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/multiple-tags/b', ...options });\n\nexport const callWithResponse = <ThrowOnError extends boolean = false>(options?: Options<CallWithResponseData, ThrowOnError>) => (options?.client ?? client).get<CallWithResponseResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/response', ...options });\n\nexport const callWithDuplicateResponses = <ThrowOnError extends boolean = false>(options?: Options<CallWithDuplicateResponsesData, ThrowOnError>) => (options?.client ?? client).post<CallWithDuplicateResponsesResponses, CallWithDuplicateResponsesErrors, ThrowOnError>({ url: '/api/v{api-version}/response', ...options });\n\nexport const callWithResponses = <ThrowOnError extends boolean = false>(options?: Options<CallWithResponsesData, ThrowOnError>) => (options?.client ?? client).put<CallWithResponsesResponses, CallWithResponsesErrors, ThrowOnError>({ url: '/api/v{api-version}/response', ...options });\n\nexport const collectionFormat = <ThrowOnError extends boolean = false>(options: Options<CollectionFormatData, ThrowOnError>) => (options.client ?? client).get<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/collectionFormat', ...options });\n\nexport const types = <ThrowOnError extends boolean = false>(options: Options<TypesData, ThrowOnError>) => (options.client ?? client).get<TypesResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/types', ...options });\n\nexport const uploadFile = <ThrowOnError extends boolean = false>(options: Options<UploadFileData, ThrowOnError>) => (options.client ?? client).post<UploadFileResponses, unknown, ThrowOnError>({\n    ...urlSearchParamsBodySerializer,\n    url: '/api/v{api-version}/upload',\n    ...options,\n    headers: {\n        'Content-Type': 'application/x-www-form-urlencoded',\n        ...options.headers\n    }\n});\n\nexport const fileResponse = <ThrowOnError extends boolean = false>(options: Options<FileResponseData, ThrowOnError>) => (options.client ?? client).get<FileResponseResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/file/{id}', ...options });\n\nexport const complexTypes = <ThrowOnError extends boolean = false>(options: Options<ComplexTypesData, ThrowOnError>) => (options.client ?? client).get<ComplexTypesResponses, ComplexTypesErrors, ThrowOnError>({\n    querySerializer: { parameters: { parameterObject: { object: { style: 'form' } } } },\n    url: '/api/v{api-version}/complex',\n    ...options\n});\n\nexport const multipartResponse = <ThrowOnError extends boolean = false>(options?: Options<MultipartResponseData, ThrowOnError>) => (options?.client ?? client).get<MultipartResponseResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/multipart', ...options });\n\nexport const multipartRequest = <ThrowOnError extends boolean = false>(options?: Options<MultipartRequestData, ThrowOnError>) => (options?.client ?? client).post<unknown, unknown, ThrowOnError>({\n    ...formDataBodySerializer,\n    url: '/api/v{api-version}/multipart',\n    ...options,\n    headers: {\n        'Content-Type': null,\n        ...options?.headers\n    }\n});\n\nexport const complexParams = <ThrowOnError extends boolean = false>(options: Options<ComplexParamsData, ThrowOnError>) => (options.client ?? client).put<ComplexParamsResponses, unknown, ThrowOnError>({\n    url: '/api/v{api-version}/complex/{id}',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json-patch+json',\n        ...options.headers\n    }\n});\n\nexport const callWithResultFromHeader = <ThrowOnError extends boolean = false>(options?: Options<CallWithResultFromHeaderData, ThrowOnError>) => (options?.client ?? client).post<CallWithResultFromHeaderResponses, CallWithResultFromHeaderErrors, ThrowOnError>({ url: '/api/v{api-version}/header', ...options });\n\nexport const testErrorCode = <ThrowOnError extends boolean = false>(options: Options<TestErrorCodeData, ThrowOnError>) => (options.client ?? client).post<TestErrorCodeResponses, TestErrorCodeErrors, ThrowOnError>({ url: '/api/v{api-version}/error', ...options });\n\nexport const nonAsciiæøåÆøÅöôêÊ字符串 = <ThrowOnError extends boolean = false>(options: Options<NonAsciiæøåÆøÅöôêÊ字符串Data, ThrowOnError>) => (options.client ?? client).post<NonAsciiæøåÆøÅöôêÊ字符串Responses, unknown, ThrowOnError>({ url: '/api/v{api-version}/non-ascii-æøåÆØÅöôêÊ字符串', ...options });\n\n/**\n * Login User\n */\nexport const putWithFormUrlEncoded = <ThrowOnError extends boolean = false>(options: Options<PutWithFormUrlEncodedData, ThrowOnError>) => (options.client ?? client).put<unknown, unknown, ThrowOnError>({\n    ...urlSearchParamsBodySerializer,\n    url: '/api/v{api-version}/non-ascii-æøåÆØÅöôêÊ字符串',\n    ...options,\n    headers: {\n        'Content-Type': 'application/x-www-form-urlencoded',\n        ...options.headers\n    }\n});\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-next/tsconfig-node16-sdk/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type ClientOptions = {\n    baseUrl: 'http://localhost:3000/base' | (string & {});\n};\n\n/**\n * Model with number-only name\n */\nexport type _400 = string;\n\n/**\n * External ref to shared model (A)\n */\nexport type ExternalRefA = ExternalSharedModel;\n\n/**\n * External ref to shared model (B)\n */\nexport type ExternalRefB = ExternalSharedModel;\n\n/**\n * Testing multiline comments in string: First line\n * Second line\n *\n * Fourth line\n */\nexport type CamelCaseCommentWithBreaks = number;\n\n/**\n * Testing multiline comments in string: First line\n * Second line\n *\n * Fourth line\n */\nexport type CommentWithBreaks = number;\n\n/**\n * Testing backticks in string: `backticks` and ```multiple backticks``` should work\n */\nexport type CommentWithBackticks = number;\n\n/**\n * Testing backticks and quotes in string: `backticks`, 'quotes', \"double quotes\" and ```multiple backticks``` should work\n */\nexport type CommentWithBackticksAndQuotes = number;\n\n/**\n * Testing slashes in string: \\backwards\\\\\\ and /forwards/// should work\n */\nexport type CommentWithSlashes = number;\n\n/**\n * Testing expression placeholders in string: ${expression} should work\n */\nexport type CommentWithExpressionPlaceholders = number;\n\n/**\n * Testing quotes in string: 'single quote''' and \"double quotes\"\"\" should work\n */\nexport type CommentWithQuotes = number;\n\n/**\n * Testing reserved characters in string: * inline * and ** inline ** should work\n */\nexport type CommentWithReservedCharacters = number;\n\n/**\n * This is a simple number\n */\nexport type SimpleInteger = number;\n\n/**\n * This is a simple boolean\n */\nexport type SimpleBoolean = boolean;\n\n/**\n * This is a simple string\n */\nexport type SimpleString = string;\n\n/**\n * A string with non-ascii (unicode) characters valid in typescript identifiers (æøåÆØÅöÔèÈ字符串)\n */\nexport type NonAsciiStringæøåÆøÅöôêÊ字符串 = string;\n\n/**\n * This is a simple file\n */\nexport type SimpleFile = Blob | File;\n\n/**\n * This is a simple reference\n */\nexport type SimpleReference = ModelWithString;\n\n/**\n * This is a simple string\n */\nexport type SimpleStringWithPattern = string | null;\n\n/**\n * This is a simple enum with strings\n */\nexport type EnumWithStrings = 'Success' | 'Warning' | 'Error' | '\\'Single Quote\\'' | '\"Double Quotes\"' | 'Non-ascii: øæåôöØÆÅÔÖ字符串';\n\nexport type EnumWithReplacedCharacters = '\\'Single Quote\\'' | '\"Double Quotes\"' | 'øæåôöØÆÅÔÖ字符串' | 3.1 | '';\n\n/**\n * This is a simple enum with numbers\n */\nexport type EnumWithNumbers = 1 | 2 | 3 | 1.1 | 1.2 | 1.3 | 100 | 200 | 300 | -100 | -200 | -300 | -1.1 | -1.2 | -1.3;\n\n/**\n * Success=1,Warning=2,Error=3\n */\nexport type EnumFromDescription = number;\n\n/**\n * This is a simple enum with numbers\n */\nexport type EnumWithExtensions = 200 | 400 | 500;\n\nexport type EnumWithXEnumNames = 0 | 1 | 2;\n\n/**\n * This is a simple array with numbers\n */\nexport type ArrayWithNumbers = Array<number>;\n\n/**\n * This is a simple array with booleans\n */\nexport type ArrayWithBooleans = Array<boolean>;\n\n/**\n * This is a simple array with strings\n */\nexport type ArrayWithStrings = Array<string>;\n\n/**\n * This is a simple array with references\n */\nexport type ArrayWithReferences = Array<ModelWithString>;\n\n/**\n * This is a simple array containing an array\n */\nexport type ArrayWithArray = Array<Array<ModelWithString>>;\n\n/**\n * This is a simple array with properties\n */\nexport type ArrayWithProperties = Array<{\n    '16x16'?: CamelCaseCommentWithBreaks;\n    bar?: string;\n}>;\n\n/**\n * This is a simple array with any of properties\n */\nexport type ArrayWithAnyOfProperties = Array<{\n    foo?: string;\n} | {\n    bar?: string;\n}>;\n\nexport type AnyOfAnyAndNull = {\n    data?: unknown | null;\n};\n\n/**\n * This is a simple array with any of properties\n */\nexport type AnyOfArrays = {\n    results?: Array<{\n        foo?: string;\n    } | {\n        bar?: string;\n    }>;\n};\n\n/**\n * This is a string dictionary\n */\nexport type DictionaryWithString = {\n    [key: string]: string;\n};\n\nexport type DictionaryWithPropertiesAndAdditionalProperties = {\n    foo?: number;\n    bar?: boolean;\n    [key: string]: string | number | boolean | undefined;\n};\n\n/**\n * This is a string reference\n */\nexport type DictionaryWithReference = {\n    [key: string]: ModelWithString;\n};\n\n/**\n * This is a complex dictionary\n */\nexport type DictionaryWithArray = {\n    [key: string]: Array<ModelWithString>;\n};\n\n/**\n * This is a string dictionary\n */\nexport type DictionaryWithDictionary = {\n    [key: string]: {\n        [key: string]: string;\n    };\n};\n\n/**\n * This is a complex dictionary\n */\nexport type DictionaryWithProperties = {\n    [key: string]: {\n        foo?: string;\n        bar?: string;\n    };\n};\n\n/**\n * This is a model with one number property\n */\nexport type ModelWithInteger = {\n    /**\n     * This is a simple number property\n     */\n    prop?: number;\n};\n\n/**\n * This is a model with one boolean property\n */\nexport type ModelWithBoolean = {\n    /**\n     * This is a simple boolean property\n     */\n    prop?: boolean;\n};\n\n/**\n * This is a model with one string property\n */\nexport type ModelWithString = {\n    /**\n     * This is a simple string property\n     */\n    prop?: string;\n};\n\n/**\n * This is a model with one string property\n */\nexport type ModelWithStringError = {\n    /**\n     * This is a simple string property\n     */\n    prop?: string;\n};\n\n/**\n * `Comment` or `VoiceComment`. The JSON object for adding voice comments to tickets is different. See [Adding voice comments to tickets](/documentation/ticketing/managing-tickets/adding-voice-comments-to-tickets)\n */\nexport type ModelFromZendesk = string;\n\n/**\n * This is a model with one string property\n */\nexport type ModelWithNullableString = {\n    /**\n     * This is a simple string property\n     */\n    nullableProp1?: string | null;\n    /**\n     * This is a simple string property\n     */\n    nullableRequiredProp1: string | null;\n    /**\n     * This is a simple string property\n     */\n    nullableProp2?: string | null;\n    /**\n     * This is a simple string property\n     */\n    nullableRequiredProp2: string | null;\n    /**\n     * This is a simple enum with strings\n     */\n    'foo_bar-enum'?: 'Success' | 'Warning' | 'Error' | 'ØÆÅ字符串';\n};\n\n/**\n * This is a model with one enum\n */\nexport type ModelWithEnum = {\n    /**\n     * This is a simple enum with strings\n     */\n    'foo_bar-enum'?: 'Success' | 'Warning' | 'Error' | 'ØÆÅ字符串';\n    /**\n     * These are the HTTP error code enums\n     */\n    statusCode?: '100' | '200 FOO' | '300 FOO_BAR' | '400 foo-bar' | '500 foo.bar' | '600 foo&bar';\n    /**\n     * Simple boolean enum\n     */\n    bool?: true;\n};\n\n/**\n * This is a model with one enum with escaped name\n */\nexport type ModelWithEnumWithHyphen = {\n    /**\n     * Foo-Bar-Baz-Qux\n     */\n    'foo-bar-baz-qux'?: '3.0';\n};\n\n/**\n * This is a model with one enum\n */\nexport type ModelWithEnumFromDescription = {\n    /**\n     * Success=1,Warning=2,Error=3\n     */\n    test?: number;\n};\n\n/**\n * This is a model with nested enums\n */\nexport type ModelWithNestedEnums = {\n    dictionaryWithEnum?: {\n        [key: string]: 'Success' | 'Warning' | 'Error';\n    };\n    dictionaryWithEnumFromDescription?: {\n        [key: string]: number;\n    };\n    arrayWithEnum?: Array<'Success' | 'Warning' | 'Error'>;\n    arrayWithDescription?: Array<number>;\n    /**\n     * This is a simple enum with strings\n     */\n    'foo_bar-enum'?: 'Success' | 'Warning' | 'Error' | 'ØÆÅ字符串';\n};\n\n/**\n * This is a model with one property containing a reference\n */\nexport type ModelWithReference = {\n    prop?: ModelWithProperties;\n};\n\n/**\n * This is a model with one property containing an array\n */\nexport type ModelWithArrayReadOnlyAndWriteOnly = {\n    prop?: Array<ModelWithReadOnlyAndWriteOnly>;\n    propWithFile?: Array<Blob | File>;\n    propWithNumber?: Array<number>;\n};\n\n/**\n * This is a model with one property containing an array\n */\nexport type ModelWithArray = {\n    prop?: Array<ModelWithString>;\n    propWithFile?: Array<Blob | File>;\n    propWithNumber?: Array<number>;\n};\n\n/**\n * This is a model with one property containing a dictionary\n */\nexport type ModelWithDictionary = {\n    prop?: {\n        [key: string]: string;\n    };\n};\n\n/**\n * This is a deprecated model with a deprecated property\n *\n * @deprecated\n */\nexport type DeprecatedModel = {\n    /**\n     * This is a deprecated property\n     *\n     * @deprecated\n     */\n    prop?: string;\n};\n\n/**\n * This is a model with one property containing a circular reference\n */\nexport type ModelWithCircularReference = {\n    prop?: ModelWithCircularReference;\n};\n\n/**\n * This is a model with one property with a 'one of' relationship\n */\nexport type CompositionWithOneOf = {\n    propA?: ModelWithString | ModelWithEnum | ModelWithArray | ModelWithDictionary;\n};\n\n/**\n * This is a model with one property with a 'one of' relationship where the options are not $ref\n */\nexport type CompositionWithOneOfAnonymous = {\n    propA?: {\n        propA?: string;\n    } | string | number;\n};\n\n/**\n * Circle\n */\nexport type ModelCircle = {\n    kind: string;\n    radius?: number;\n};\n\n/**\n * Square\n */\nexport type ModelSquare = {\n    kind: string;\n    sideLength?: number;\n};\n\n/**\n * This is a model with one property with a 'one of' relationship where the options are not $ref\n */\nexport type CompositionWithOneOfDiscriminator = ({\n    kind: 'circle';\n} & ModelCircle) | ({\n    kind: 'square';\n} & ModelSquare);\n\n/**\n * This is a model with one property with a 'any of' relationship\n */\nexport type CompositionWithAnyOf = {\n    propA?: ModelWithString | ModelWithEnum | ModelWithArray | ModelWithDictionary;\n};\n\n/**\n * This is a model with one property with a 'any of' relationship where the options are not $ref\n */\nexport type CompositionWithAnyOfAnonymous = {\n    propA?: {\n        propA?: string;\n    } | string | number;\n};\n\n/**\n * This is a model with nested 'any of' property with a type null\n */\nexport type CompositionWithNestedAnyAndTypeNull = {\n    propA?: Array<ModelWithDictionary | null> | Array<ModelWithArray | null>;\n};\n\nexport type _3eNum1Период = 'Bird' | 'Dog';\n\nexport type ConstValue = 'ConstValue';\n\n/**\n * This is a model with one property with a 'any of' relationship where the options are not $ref\n */\nexport type CompositionWithNestedAnyOfAndNull = {\n    /**\n     * Scopes\n     */\n    propA?: Array<_3eNum1Период | ConstValue> | null;\n};\n\n/**\n * This is a model with one property with a 'one of' relationship\n */\nexport type CompositionWithOneOfAndNullable = {\n    propA?: {\n        boolean?: boolean;\n    } | ModelWithEnum | ModelWithArray | ModelWithDictionary | null;\n};\n\n/**\n * This is a model that contains a simple dictionary within composition\n */\nexport type CompositionWithOneOfAndSimpleDictionary = {\n    propA?: boolean | {\n        [key: string]: number;\n    };\n};\n\n/**\n * This is a model that contains a dictionary of simple arrays within composition\n */\nexport type CompositionWithOneOfAndSimpleArrayDictionary = {\n    propA?: boolean | {\n        [key: string]: Array<boolean>;\n    };\n};\n\n/**\n * This is a model that contains a dictionary of complex arrays (composited) within composition\n */\nexport type CompositionWithOneOfAndComplexArrayDictionary = {\n    propA?: boolean | {\n        [key: string]: Array<number | string>;\n    };\n};\n\n/**\n * This is a model with one property with a 'all of' relationship\n */\nexport type CompositionWithAllOfAndNullable = {\n    propA?: ({\n        boolean?: boolean;\n    } & ModelWithEnum & ModelWithArray & ModelWithDictionary) | null;\n};\n\n/**\n * This is a model with one property with a 'any of' relationship\n */\nexport type CompositionWithAnyOfAndNullable = {\n    propA?: {\n        boolean?: boolean;\n    } | ModelWithEnum | ModelWithArray | ModelWithDictionary | null;\n};\n\n/**\n * This is a base model with two simple optional properties\n */\nexport type CompositionBaseModel = {\n    firstName?: string;\n    lastname?: string;\n};\n\n/**\n * This is a model that extends the base model\n */\nexport type CompositionExtendedModel = CompositionBaseModel & {\n    age: number;\n    firstName: string;\n    lastname: string;\n};\n\n/**\n * This is a model with one nested property\n */\nexport type ModelWithProperties = {\n    required: string;\n    readonly requiredAndReadOnly: string;\n    requiredAndNullable: string | null;\n    string?: string;\n    number?: number;\n    boolean?: boolean;\n    reference?: ModelWithString;\n    'property with space'?: string;\n    default?: string;\n    try?: string;\n    readonly '@namespace.string'?: string;\n    readonly '@namespace.integer'?: number;\n};\n\n/**\n * This is a model with one nested property\n */\nexport type ModelWithNestedProperties = {\n    readonly first: {\n        readonly second: {\n            readonly third: string | null;\n        } | null;\n    } | null;\n};\n\n/**\n * This is a model with duplicated properties\n */\nexport type ModelWithDuplicateProperties = {\n    prop?: ModelWithString;\n};\n\n/**\n * This is a model with ordered properties\n */\nexport type ModelWithOrderedProperties = {\n    zebra?: string;\n    apple?: string;\n    hawaii?: string;\n};\n\n/**\n * This is a model with duplicated imports\n */\nexport type ModelWithDuplicateImports = {\n    propA?: ModelWithString;\n    propB?: ModelWithString;\n    propC?: ModelWithString;\n};\n\n/**\n * This is a model that extends another model\n */\nexport type ModelThatExtends = ModelWithString & {\n    propExtendsA?: string;\n    propExtendsB?: ModelWithString;\n};\n\n/**\n * This is a model that extends another model\n */\nexport type ModelThatExtendsExtends = ModelWithString & ModelThatExtends & {\n    propExtendsC?: string;\n    propExtendsD?: ModelWithString;\n};\n\n/**\n * This is a model that contains a some patterns\n */\nexport type ModelWithPattern = {\n    key: string;\n    name: string;\n    readonly enabled?: boolean;\n    readonly modified?: string;\n    id?: string;\n    text?: string;\n    patternWithSingleQuotes?: string;\n    patternWithNewline?: string;\n    patternWithBacktick?: string;\n    patternWithUnicode?: string;\n};\n\nexport type File = {\n    /**\n     * Id\n     */\n    readonly id?: string;\n    /**\n     * Updated at\n     */\n    readonly updated_at?: string;\n    /**\n     * Created at\n     */\n    readonly created_at?: string;\n    /**\n     * Mime\n     */\n    mime: string;\n    /**\n     * File\n     */\n    readonly file?: string;\n};\n\nexport type Default = {\n    name?: string;\n};\n\nexport type Pageable = {\n    page?: number;\n    size?: number;\n    sort?: Array<string>;\n};\n\n/**\n * This is a free-form object without additionalProperties.\n */\nexport type FreeFormObjectWithoutAdditionalProperties = {\n    [key: string]: unknown;\n};\n\n/**\n * This is a free-form object with additionalProperties: true.\n */\nexport type FreeFormObjectWithAdditionalPropertiesEqTrue = {\n    [key: string]: unknown;\n};\n\n/**\n * This is a free-form object with additionalProperties: {}.\n */\nexport type FreeFormObjectWithAdditionalPropertiesEqEmptyObject = {\n    [key: string]: unknown;\n};\n\nexport type ModelWithConst = {\n    String?: 'String';\n    number?: 0;\n    null?: null;\n    withType?: 'Some string';\n};\n\n/**\n * This is a model with one property and additionalProperties: true\n */\nexport type ModelWithAdditionalPropertiesEqTrue = {\n    /**\n     * This is a simple string property\n     */\n    prop?: string;\n    [key: string]: unknown;\n};\n\nexport type NestedAnyOfArraysNullable = {\n    nullableArray?: Array<string | boolean> | null;\n};\n\nexport type CompositionWithOneOfAndProperties = ({\n    foo: SimpleParameter;\n} | {\n    bar: NonAsciiStringæøåÆøÅöôêÊ字符串;\n}) & {\n    baz: number | null;\n    qux: number;\n};\n\n/**\n * An object that can be null\n */\nexport type NullableObject = {\n    foo?: string;\n} | null;\n\n/**\n * Some % character\n */\nexport type CharactersInDescription = string;\n\nexport type ModelWithNullableObject = {\n    data?: NullableObject;\n};\n\n/**\n * An object with additional properties that can be null (anyOf ref + null)\n */\nexport type ModelWithAdditionalPropertiesRef = {\n    [key: string]: NullableObject | null;\n};\n\nexport type ModelWithOneOfEnum = {\n    foo: 'Bar';\n} | {\n    foo: 'Baz';\n} | {\n    foo: 'Qux';\n} | {\n    content: string;\n    foo: 'Quux';\n} | {\n    content: [\n        string,\n        string\n    ];\n    foo: 'Corge';\n};\n\nexport type ModelWithNestedArrayEnumsDataFoo = 'foo' | 'bar';\n\nexport type ModelWithNestedArrayEnumsDataBar = 'baz' | 'qux';\n\nexport type ModelWithNestedArrayEnumsData = {\n    foo?: Array<ModelWithNestedArrayEnumsDataFoo>;\n    bar?: Array<ModelWithNestedArrayEnumsDataBar>;\n};\n\nexport type ModelWithNestedArrayEnums = {\n    array_strings?: Array<string>;\n    data?: ModelWithNestedArrayEnumsData;\n};\n\nexport type ModelWithNestedCompositionEnums = {\n    foo?: ModelWithNestedArrayEnumsDataFoo;\n};\n\nexport type ModelWithReadOnlyAndWriteOnly = {\n    foo: string;\n    readonly bar: string;\n};\n\nexport type ModelWithConstantSizeArray = [\n    number,\n    number\n];\n\nexport type ModelWithAnyOfConstantSizeArray = [\n    number | string,\n    number | string,\n    number | string\n];\n\nexport type ModelWithPrefixItemsConstantSizeArray = [\n    ModelWithInteger,\n    number | string,\n    string\n];\n\nexport type ModelWithAnyOfConstantSizeArrayNullable = [\n    number | null | string,\n    number | null | string,\n    number | null | string\n];\n\nexport type ModelWithAnyOfConstantSizeArrayWithNSizeAndOptions = [\n    number | Import,\n    number | Import\n];\n\nexport type ModelWithAnyOfConstantSizeArrayAndIntersect = [\n    number & string,\n    number & string\n];\n\nexport type ModelWithNumericEnumUnion = {\n    /**\n     * Период\n     */\n    value?: -10 | -1 | 0 | 1 | 3 | 6 | 12;\n};\n\n/**\n * Some description with `back ticks`\n */\nexport type ModelWithBackticksInDescription = {\n    /**\n     * The template `that` should be used for parsing and importing the contents of the CSV file.\n     *\n     * <br/><p>There is one placeholder currently supported:<ul>     <li><b>${x}</b> - refers to the n-th column in the CSV file, e.g. ${1}, ${2}, ...)</li></ul><p>Example of a correct JSON template:</p>\n     * <pre>\n     * [\n     * {\n     * \"resourceType\": \"Asset\",\n     * \"identifier\": {\n     * \"name\": \"${1}\",\n     * \"domain\": {\n     * \"name\": \"${2}\",\n     * \"community\": {\n     * \"name\": \"Some Community\"\n     * }\n     * }\n     * },\n     * \"attributes\" : {\n     * \"00000000-0000-0000-0000-000000003115\" : [ {\n     * \"value\" : \"${3}\"\n     * } ],\n     * \"00000000-0000-0000-0000-000000000222\" : [ {\n     * \"value\" : \"${4}\"\n     * } ]\n     * }\n     * }\n     * ]\n     * </pre>\n     */\n    template?: string;\n};\n\nexport type ModelWithOneOfAndProperties = (SimpleParameter | NonAsciiStringæøåÆøÅöôêÊ字符串) & {\n    baz: number | null;\n    qux: number;\n};\n\n/**\n * Model used to test deduplication strategy (unused)\n */\nexport type ParameterSimpleParameterUnused = string;\n\n/**\n * Model used to test deduplication strategy\n */\nexport type PostServiceWithEmptyTagResponse = string;\n\n/**\n * Model used to test deduplication strategy\n */\nexport type PostServiceWithEmptyTagResponse2 = string;\n\n/**\n * Model used to test deduplication strategy\n */\nexport type DeleteFooData = string;\n\n/**\n * Model used to test deduplication strategy\n */\nexport type DeleteFooData2 = string;\n\n/**\n * Model with restricted keyword name\n */\nexport type Import = string;\n\nexport type SchemaWithFormRestrictedKeys = {\n    description?: string;\n    'x-enum-descriptions'?: string;\n    'x-enum-varnames'?: string;\n    'x-enumNames'?: string;\n    title?: string;\n    object?: {\n        description?: string;\n        'x-enum-descriptions'?: string;\n        'x-enum-varnames'?: string;\n        'x-enumNames'?: string;\n        title?: string;\n    };\n    array?: Array<{\n        description?: string;\n        'x-enum-descriptions'?: string;\n        'x-enum-varnames'?: string;\n        'x-enumNames'?: string;\n        title?: string;\n    }>;\n};\n\n/**\n * This schema was giving PascalCase transformations a hard time\n */\nexport type IoK8sApimachineryPkgApisMetaV1DeleteOptions = {\n    /**\n     * Must be fulfilled before a deletion is carried out. If not possible, a 409 Conflict status will be returned.\n     */\n    preconditions?: IoK8sApimachineryPkgApisMetaV1Preconditions;\n};\n\n/**\n * This schema was giving PascalCase transformations a hard time\n */\nexport type IoK8sApimachineryPkgApisMetaV1Preconditions = {\n    /**\n     * Specifies the target ResourceVersion\n     */\n    resourceVersion?: string;\n    /**\n     * Specifies the target UID.\n     */\n    uid?: string;\n};\n\nexport type AdditionalPropertiesUnknownIssue = {\n    [key: string]: string | number;\n};\n\nexport type AdditionalPropertiesUnknownIssue2 = {\n    [key: string]: string | number;\n};\n\nexport type AdditionalPropertiesUnknownIssue3 = string & {\n    entries: {\n        [key: string]: AdditionalPropertiesUnknownIssue;\n    };\n};\n\nexport type AdditionalPropertiesIntegerIssue = {\n    value: number;\n    [key: string]: number;\n};\n\nexport type OneOfAllOfIssue = ((ConstValue | GenericSchemaDuplicateIssue1SystemBoolean) & _3eNum1Период) | GenericSchemaDuplicateIssue1SystemString;\n\nexport type GenericSchemaDuplicateIssue1SystemBoolean = {\n    item?: boolean;\n    error?: string | null;\n    readonly hasError?: boolean;\n    data?: {\n        [key: string]: never;\n    };\n};\n\nexport type GenericSchemaDuplicateIssue1SystemString = {\n    item?: string | null;\n    error?: string | null;\n    readonly hasError?: boolean;\n};\n\nexport type ExternalSharedModel = {\n    id: string;\n    name?: string;\n};\n\n/**\n * This is a model with one property containing a reference\n */\nexport type ModelWithReferenceWritable = {\n    prop?: ModelWithPropertiesWritable;\n};\n\n/**\n * This is a model with one property containing an array\n */\nexport type ModelWithArrayReadOnlyAndWriteOnlyWritable = {\n    prop?: Array<ModelWithReadOnlyAndWriteOnlyWritable>;\n    propWithFile?: Array<Blob | File>;\n    propWithNumber?: Array<number>;\n};\n\n/**\n * This is a model with one nested property\n */\nexport type ModelWithPropertiesWritable = {\n    required: string;\n    requiredAndNullable: string | null;\n    string?: string;\n    number?: number;\n    boolean?: boolean;\n    reference?: ModelWithString;\n    'property with space'?: string;\n    default?: string;\n    try?: string;\n};\n\n/**\n * This is a model that contains a some patterns\n */\nexport type ModelWithPatternWritable = {\n    key: string;\n    name: string;\n    id?: string;\n    text?: string;\n    patternWithSingleQuotes?: string;\n    patternWithNewline?: string;\n    patternWithBacktick?: string;\n    patternWithUnicode?: string;\n};\n\nexport type FileWritable = {\n    /**\n     * Mime\n     */\n    mime: string;\n};\n\nexport type ModelWithReadOnlyAndWriteOnlyWritable = {\n    foo: string;\n    baz: string;\n};\n\nexport type ModelWithAnyOfConstantSizeArrayWithNSizeAndOptionsWritable = [\n    number | Import,\n    number | Import\n];\n\nexport type AdditionalPropertiesUnknownIssueWritable = {\n    [key: string]: string | number;\n};\n\nexport type OneOfAllOfIssueWritable = ((ConstValue | GenericSchemaDuplicateIssue1SystemBoolean) & _3eNum1Период) | GenericSchemaDuplicateIssue1SystemString;\n\nexport type GenericSchemaDuplicateIssue1SystemBooleanWritable = {\n    item?: boolean;\n    error?: string | null;\n    data?: {\n        [key: string]: never;\n    };\n};\n\nexport type GenericSchemaDuplicateIssue1SystemStringWritable = {\n    item?: string | null;\n    error?: string | null;\n};\n\n/**\n * This is a reusable parameter\n */\nexport type SimpleParameter = string;\n\n/**\n * Parameter with illegal characters\n */\nexport type XFooBar = ModelWithString;\n\n/**\n * A reusable request body\n */\nexport type SimpleRequestBody = ModelWithString;\n\n/**\n * A reusable request body\n */\nexport type SimpleFormData = ModelWithString;\n\nexport type ExportData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no+tag';\n};\n\nexport type PatchApiVbyApiVersionNoTagData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no+tag';\n};\n\nexport type PatchApiVbyApiVersionNoTagResponses = {\n    /**\n     * OK\n     */\n    default: unknown;\n};\n\nexport type ImportData = {\n    body: ModelWithReadOnlyAndWriteOnlyWritable | ModelWithArrayReadOnlyAndWriteOnlyWritable;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no+tag';\n};\n\nexport type ImportResponses = {\n    /**\n     * Success\n     */\n    200: ModelFromZendesk;\n    /**\n     * Default success response\n     */\n    default: ModelWithReadOnlyAndWriteOnly;\n};\n\nexport type ImportResponse = ImportResponses[keyof ImportResponses];\n\nexport type FooWowData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no+tag';\n};\n\nexport type FooWowResponses = {\n    /**\n     * OK\n     */\n    default: unknown;\n};\n\nexport type ApiVVersionODataControllerCountData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple/$count';\n};\n\nexport type ApiVVersionODataControllerCountResponses = {\n    /**\n     * Success\n     */\n    200: ModelFromZendesk;\n};\n\nexport type ApiVVersionODataControllerCountResponse = ApiVVersionODataControllerCountResponses[keyof ApiVVersionODataControllerCountResponses];\n\nexport type GetApiVbyApiVersionSimpleOperationData = {\n    body?: never;\n    path: {\n        /**\n         * foo in method\n         */\n        foo_param: string;\n    };\n    query?: never;\n    url: '/api/v{api-version}/simple:operation';\n};\n\nexport type GetApiVbyApiVersionSimpleOperationErrors = {\n    /**\n     * Default error response\n     */\n    default: ModelWithBoolean;\n};\n\nexport type GetApiVbyApiVersionSimpleOperationError = GetApiVbyApiVersionSimpleOperationErrors[keyof GetApiVbyApiVersionSimpleOperationErrors];\n\nexport type GetApiVbyApiVersionSimpleOperationResponses = {\n    /**\n     * Response is a simple number\n     */\n    200: number;\n};\n\nexport type GetApiVbyApiVersionSimpleOperationResponse = GetApiVbyApiVersionSimpleOperationResponses[keyof GetApiVbyApiVersionSimpleOperationResponses];\n\nexport type DeleteCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type GetCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type HeadCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type OptionsCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type PatchCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type PostCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type PutCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type DeleteFooData3 = {\n    body?: never;\n    headers: {\n        /**\n         * Parameter with illegal characters\n         */\n        'x-Foo-Bar': ModelWithString;\n    };\n    path: {\n        /**\n         * foo in method\n         */\n        foo_param: string;\n        /**\n         * bar in method\n         */\n        BarParam: string;\n    };\n    query?: never;\n    url: '/api/v{api-version}/foo/{foo_param}/bar/{BarParam}';\n};\n\nexport type CallWithDescriptionsData = {\n    body?: never;\n    path?: never;\n    query?: {\n        /**\n         * Testing multiline comments in string: First line\n         * Second line\n         *\n         * Fourth line\n         */\n        parameterWithBreaks?: string;\n        /**\n         * Testing backticks in string: `backticks` and ```multiple backticks``` should work\n         */\n        parameterWithBackticks?: string;\n        /**\n         * Testing slashes in string: \\backwards\\\\\\ and /forwards/// should work\n         */\n        parameterWithSlashes?: string;\n        /**\n         * Testing expression placeholders in string: ${expression} should work\n         */\n        parameterWithExpressionPlaceholders?: string;\n        /**\n         * Testing quotes in string: 'single quote''' and \"double quotes\"\"\" should work\n         */\n        parameterWithQuotes?: string;\n        /**\n         * Testing reserved characters in string: * inline * and ** inline ** should work\n         */\n        parameterWithReservedCharacters?: string;\n    };\n    url: '/api/v{api-version}/descriptions';\n};\n\nexport type DeprecatedCallData = {\n    body?: never;\n    headers: {\n        /**\n         * This parameter is deprecated\n         *\n         * @deprecated\n         */\n        parameter: DeprecatedModel | null;\n    };\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/parameters/deprecated';\n};\n\nexport type CallWithParametersData = {\n    /**\n     * This is the parameter that goes into the body\n     */\n    body: {\n        [key: string]: unknown;\n    } | null;\n    headers: {\n        /**\n         * This is the parameter that goes into the header\n         */\n        parameterHeader: string | null;\n    };\n    path: {\n        /**\n         * This is the parameter that goes into the path\n         */\n        parameterPath: string | null;\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string | null;\n    };\n    query: {\n        foo_ref_enum?: ModelWithNestedArrayEnumsDataFoo;\n        foo_all_of_enum: ModelWithNestedArrayEnumsDataFoo;\n        /**\n         * This is the parameter that goes into the query params\n         */\n        cursor: string | null;\n    };\n    url: '/api/v{api-version}/parameters/{parameterPath}';\n};\n\nexport type CallWithWeirdParameterNamesData = {\n    /**\n     * This is the parameter that goes into the body\n     */\n    body: ModelWithString | null;\n    headers: {\n        /**\n         * This is the parameter that goes into the request header\n         */\n        'parameter.header': string | null;\n    };\n    path: {\n        /**\n         * This is the parameter that goes into the path\n         */\n        'parameter.path.1'?: string;\n        /**\n         * This is the parameter that goes into the path\n         */\n        'parameter-path-2'?: string;\n        /**\n         * This is the parameter that goes into the path\n         */\n        'PARAMETER-PATH-3'?: string;\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string | null;\n    };\n    query: {\n        /**\n         * This is the parameter with a reserved keyword\n         */\n        default?: string;\n        /**\n         * This is the parameter that goes into the request query params\n         */\n        'parameter-query': string | null;\n    };\n    url: '/api/v{api-version}/parameters/{parameter.path.1}/{parameter-path-2}/{PARAMETER-PATH-3}';\n};\n\nexport type GetCallWithOptionalParamData = {\n    /**\n     * This is a required parameter\n     */\n    body: ModelWithOneOfEnum;\n    path?: never;\n    query?: {\n        /**\n         * This is an optional parameter\n         */\n        page?: number;\n    };\n    url: '/api/v{api-version}/parameters';\n};\n\nexport type PostCallWithOptionalParamData = {\n    /**\n     * This is an optional parameter\n     */\n    body?: {\n        offset?: number | null;\n    };\n    path?: never;\n    query: {\n        /**\n         * This is a required parameter\n         */\n        parameter: Pageable;\n    };\n    url: '/api/v{api-version}/parameters';\n};\n\nexport type PostCallWithOptionalParamResponses = {\n    /**\n     * Response is a simple number\n     */\n    200: number;\n    /**\n     * Success\n     */\n    204: void;\n};\n\nexport type PostCallWithOptionalParamResponse = PostCallWithOptionalParamResponses[keyof PostCallWithOptionalParamResponses];\n\nexport type PostApiVbyApiVersionRequestBodyData = {\n    /**\n     * A reusable request body\n     */\n    body?: SimpleRequestBody;\n    path?: never;\n    query?: {\n        /**\n         * This is a reusable parameter\n         */\n        parameter?: string;\n    };\n    url: '/api/v{api-version}/requestBody';\n};\n\nexport type PostApiVbyApiVersionFormDataData = {\n    /**\n     * A reusable request body\n     */\n    body?: SimpleFormData;\n    path?: never;\n    query?: {\n        /**\n         * This is a reusable parameter\n         */\n        parameter?: string;\n    };\n    url: '/api/v{api-version}/formData';\n};\n\nexport type CallWithDefaultParametersData = {\n    body?: never;\n    path?: never;\n    query?: {\n        /**\n         * This is a simple string with default value\n         */\n        parameterString?: string | null;\n        /**\n         * This is a simple number with default value\n         */\n        parameterNumber?: number | null;\n        /**\n         * This is a simple boolean with default value\n         */\n        parameterBoolean?: boolean | null;\n        /**\n         * This is a simple enum with default value\n         */\n        parameterEnum?: 'Success' | 'Warning' | 'Error';\n        /**\n         * This is a simple model with default value\n         */\n        parameterModel?: ModelWithString | null;\n    };\n    url: '/api/v{api-version}/defaults';\n};\n\nexport type CallWithDefaultOptionalParametersData = {\n    body?: never;\n    path?: never;\n    query?: {\n        /**\n         * This is a simple string that is optional with default value\n         */\n        parameterString?: string;\n        /**\n         * This is a simple number that is optional with default value\n         */\n        parameterNumber?: number;\n        /**\n         * This is a simple boolean that is optional with default value\n         */\n        parameterBoolean?: boolean;\n        /**\n         * This is a simple enum that is optional with default value\n         */\n        parameterEnum?: 'Success' | 'Warning' | 'Error';\n        /**\n         * This is a simple model that is optional with default value\n         */\n        parameterModel?: ModelWithString;\n    };\n    url: '/api/v{api-version}/defaults';\n};\n\nexport type CallToTestOrderOfParamsData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * This is a optional string with default\n         */\n        parameterOptionalStringWithDefault?: string;\n        /**\n         * This is a optional string with empty default\n         */\n        parameterOptionalStringWithEmptyDefault?: string;\n        /**\n         * This is a optional string with no default\n         */\n        parameterOptionalStringWithNoDefault?: string;\n        /**\n         * This is a string with default\n         */\n        parameterStringWithDefault: string;\n        /**\n         * This is a string with empty default\n         */\n        parameterStringWithEmptyDefault: string;\n        /**\n         * This is a string with no default\n         */\n        parameterStringWithNoDefault: string;\n        /**\n         * This is a string that can be null with no default\n         */\n        parameterStringNullableWithNoDefault?: string | null;\n        /**\n         * This is a string that can be null with default\n         */\n        parameterStringNullableWithDefault?: string | null;\n    };\n    url: '/api/v{api-version}/defaults';\n};\n\nexport type DuplicateNameData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/duplicate';\n};\n\nexport type DuplicateName2Data = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/duplicate';\n};\n\nexport type DuplicateName3Data = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/duplicate';\n};\n\nexport type DuplicateName4Data = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/duplicate';\n};\n\nexport type CallWithNoContentResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no-content';\n};\n\nexport type CallWithNoContentResponseResponses = {\n    /**\n     * Success\n     */\n    204: void;\n};\n\nexport type CallWithNoContentResponseResponse = CallWithNoContentResponseResponses[keyof CallWithNoContentResponseResponses];\n\nexport type CallWithResponseAndNoContentResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multiple-tags/response-and-no-content';\n};\n\nexport type CallWithResponseAndNoContentResponseResponses = {\n    /**\n     * Response is a simple number\n     */\n    200: number;\n    /**\n     * Success\n     */\n    204: void;\n};\n\nexport type CallWithResponseAndNoContentResponseResponse = CallWithResponseAndNoContentResponseResponses[keyof CallWithResponseAndNoContentResponseResponses];\n\nexport type DummyAData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multiple-tags/a';\n};\n\nexport type DummyAResponses = {\n    200: _400;\n};\n\nexport type DummyAResponse = DummyAResponses[keyof DummyAResponses];\n\nexport type DummyBData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multiple-tags/b';\n};\n\nexport type DummyBResponses = {\n    /**\n     * Success\n     */\n    204: void;\n};\n\nexport type DummyBResponse = DummyBResponses[keyof DummyBResponses];\n\nexport type CallWithResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/response';\n};\n\nexport type CallWithResponseResponses = {\n    default: Import;\n};\n\nexport type CallWithResponseResponse = CallWithResponseResponses[keyof CallWithResponseResponses];\n\nexport type CallWithDuplicateResponsesData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/response';\n};\n\nexport type CallWithDuplicateResponsesErrors = {\n    /**\n     * Message for 500 error\n     */\n    500: ModelWithStringError;\n    /**\n     * Message for 501 error\n     */\n    501: ModelWithStringError;\n    /**\n     * Message for 502 error\n     */\n    502: ModelWithStringError;\n    /**\n     * Message for 4XX errors\n     */\n    '4XX': DictionaryWithArray;\n    /**\n     * Default error response\n     */\n    default: ModelWithBoolean;\n};\n\nexport type CallWithDuplicateResponsesError = CallWithDuplicateResponsesErrors[keyof CallWithDuplicateResponsesErrors];\n\nexport type CallWithDuplicateResponsesResponses = {\n    /**\n     * Message for 200 response\n     */\n    200: ModelWithBoolean & ModelWithInteger;\n    /**\n     * Message for 201 response\n     */\n    201: ModelWithString;\n    /**\n     * Message for 202 response\n     */\n    202: ModelWithString;\n};\n\nexport type CallWithDuplicateResponsesResponse = CallWithDuplicateResponsesResponses[keyof CallWithDuplicateResponsesResponses];\n\nexport type CallWithResponsesData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/response';\n};\n\nexport type CallWithResponsesErrors = {\n    /**\n     * Message for 500 error\n     */\n    500: ModelWithStringError;\n    /**\n     * Message for 501 error\n     */\n    501: ModelWithStringError;\n    /**\n     * Message for 502 error\n     */\n    502: ModelWithStringError;\n    /**\n     * Message for default response\n     */\n    default: ModelWithStringError;\n};\n\nexport type CallWithResponsesError = CallWithResponsesErrors[keyof CallWithResponsesErrors];\n\nexport type CallWithResponsesResponses = {\n    /**\n     * Message for 200 response\n     */\n    200: {\n        readonly '@namespace.string'?: string;\n        readonly '@namespace.integer'?: number;\n        readonly value?: Array<ModelWithString>;\n    };\n    /**\n     * Message for 201 response\n     */\n    201: ModelThatExtends;\n    /**\n     * Message for 202 response\n     */\n    202: ModelThatExtendsExtends;\n};\n\nexport type CallWithResponsesResponse = CallWithResponsesResponses[keyof CallWithResponsesResponses];\n\nexport type CollectionFormatData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * This is an array parameter that is sent as csv format (comma-separated values)\n         */\n        parameterArrayCSV: Array<string> | null;\n        /**\n         * This is an array parameter that is sent as ssv format (space-separated values)\n         */\n        parameterArraySSV: Array<string> | null;\n        /**\n         * This is an array parameter that is sent as tsv format (tab-separated values)\n         */\n        parameterArrayTSV: Array<string> | null;\n        /**\n         * This is an array parameter that is sent as pipes format (pipe-separated values)\n         */\n        parameterArrayPipes: Array<string> | null;\n        /**\n         * This is an array parameter that is sent as multi format (multiple parameter instances)\n         */\n        parameterArrayMulti: Array<string> | null;\n    };\n    url: '/api/v{api-version}/collectionFormat';\n};\n\nexport type TypesData = {\n    body?: never;\n    path?: {\n        /**\n         * This is a number parameter\n         */\n        id?: number;\n    };\n    query: {\n        /**\n         * This is a number parameter\n         */\n        parameterNumber: number;\n        /**\n         * This is a string parameter\n         */\n        parameterString: string | null;\n        /**\n         * This is a boolean parameter\n         */\n        parameterBoolean: boolean | null;\n        /**\n         * This is an object parameter\n         */\n        parameterObject: {\n            [key: string]: unknown;\n        } | null;\n        /**\n         * This is an array parameter\n         */\n        parameterArray: Array<string> | null;\n        /**\n         * This is a dictionary parameter\n         */\n        parameterDictionary: {\n            [key: string]: unknown;\n        } | null;\n        /**\n         * This is an enum parameter\n         */\n        parameterEnum: 'Success' | 'Warning' | 'Error' | null;\n    };\n    url: '/api/v{api-version}/types';\n};\n\nexport type TypesResponses = {\n    /**\n     * Response is a simple number\n     */\n    200: number;\n    /**\n     * Response is a simple string\n     */\n    201: string;\n    /**\n     * Response is a simple boolean\n     */\n    202: boolean;\n    /**\n     * Response is a simple object\n     */\n    203: {\n        [key: string]: unknown;\n    };\n};\n\nexport type TypesResponse = TypesResponses[keyof TypesResponses];\n\nexport type UploadFileData = {\n    body: Blob | File;\n    path: {\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string | null;\n    };\n    query?: never;\n    url: '/api/v{api-version}/upload';\n};\n\nexport type UploadFileResponses = {\n    200: boolean;\n};\n\nexport type UploadFileResponse = UploadFileResponses[keyof UploadFileResponses];\n\nexport type FileResponseData = {\n    body?: never;\n    path: {\n        id: string;\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string;\n    };\n    query?: never;\n    url: '/api/v{api-version}/file/{id}';\n};\n\nexport type FileResponseResponses = {\n    /**\n     * Success\n     */\n    200: Blob | File;\n};\n\nexport type FileResponseResponse = FileResponseResponses[keyof FileResponseResponses];\n\nexport type ComplexTypesData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * Parameter containing object\n         */\n        parameterObject: {\n            first?: {\n                second?: {\n                    third?: string;\n                };\n            };\n        };\n        /**\n         * Parameter containing reference\n         */\n        parameterReference: ModelWithString;\n    };\n    url: '/api/v{api-version}/complex';\n};\n\nexport type ComplexTypesErrors = {\n    /**\n     * 400 `server` error\n     */\n    400: unknown;\n    /**\n     * 500 server error\n     */\n    500: unknown;\n};\n\nexport type ComplexTypesResponses = {\n    /**\n     * Successful response\n     */\n    200: Array<ModelWithString>;\n};\n\nexport type ComplexTypesResponse = ComplexTypesResponses[keyof ComplexTypesResponses];\n\nexport type MultipartResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multipart';\n};\n\nexport type MultipartResponseResponses = {\n    /**\n     * OK\n     */\n    200: {\n        file?: Blob | File;\n        metadata?: {\n            foo?: string;\n            bar?: string;\n        };\n    };\n};\n\nexport type MultipartResponseResponse = MultipartResponseResponses[keyof MultipartResponseResponses];\n\nexport type MultipartRequestData = {\n    body?: {\n        content?: Blob | File;\n        data?: ModelWithString | null;\n    };\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multipart';\n};\n\nexport type ComplexParamsData = {\n    body?: {\n        readonly key: string | null;\n        name: string | null;\n        enabled?: boolean;\n        type: 'Monkey' | 'Horse' | 'Bird';\n        listOfModels?: Array<ModelWithString> | null;\n        listOfStrings?: Array<string> | null;\n        parameters: ModelWithString | ModelWithEnum | ModelWithArray | ModelWithDictionary;\n        readonly user?: {\n            readonly id?: number;\n            readonly name?: string | null;\n        };\n    };\n    path: {\n        id: number;\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string;\n    };\n    query?: never;\n    url: '/api/v{api-version}/complex/{id}';\n};\n\nexport type ComplexParamsResponses = {\n    /**\n     * Success\n     */\n    200: ModelWithString;\n};\n\nexport type ComplexParamsResponse = ComplexParamsResponses[keyof ComplexParamsResponses];\n\nexport type CallWithResultFromHeaderData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/header';\n};\n\nexport type CallWithResultFromHeaderErrors = {\n    /**\n     * 400 server error\n     */\n    400: unknown;\n    /**\n     * 500 server error\n     */\n    500: unknown;\n};\n\nexport type CallWithResultFromHeaderResponses = {\n    /**\n     * Successful response\n     */\n    200: unknown;\n};\n\nexport type TestErrorCodeData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * Status code to return\n         */\n        status: number;\n    };\n    url: '/api/v{api-version}/error';\n};\n\nexport type TestErrorCodeErrors = {\n    /**\n     * Custom message: Internal Server Error\n     */\n    500: unknown;\n    /**\n     * Custom message: Not Implemented\n     */\n    501: unknown;\n    /**\n     * Custom message: Bad Gateway\n     */\n    502: unknown;\n    /**\n     * Custom message: Service Unavailable\n     */\n    503: unknown;\n};\n\nexport type TestErrorCodeResponses = {\n    /**\n     * Custom message: Successful response\n     */\n    200: unknown;\n};\n\nexport type NonAsciiæøåÆøÅöôêÊ字符串Data = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * Dummy input param\n         */\n        nonAsciiParamæøåÆØÅöôêÊ: number;\n    };\n    url: '/api/v{api-version}/non-ascii-æøåÆØÅöôêÊ字符串';\n};\n\nexport type NonAsciiæøåÆøÅöôêÊ字符串Responses = {\n    /**\n     * Successful response\n     */\n    200: Array<NonAsciiStringæøåÆøÅöôêÊ字符串>;\n};\n\nexport type NonAsciiæøåÆøÅöôêÊ字符串Response = NonAsciiæøåÆøÅöôêÊ字符串Responses[keyof NonAsciiæøåÆøÅöôêÊ字符串Responses];\n\nexport type PutWithFormUrlEncodedData = {\n    body: ArrayWithStrings;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/non-ascii-æøåÆØÅöôêÊ字符串';\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-next/tsconfig-nodenext-sdk/client/client.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport { createSseClient } from '../core/serverSentEvents.gen.js';\nimport type { HttpMethod } from '../core/types.gen.js';\nimport { getValidRequestBody } from '../core/utils.gen.js';\nimport type { Client, Config, RequestOptions, ResolvedRequestOptions } from './types.gen.js';\nimport {\n  buildUrl,\n  createConfig,\n  createInterceptors,\n  getParseAs,\n  mergeConfigs,\n  mergeHeaders,\n  setAuthParams,\n} from './utils.gen.js';\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<Response, unknown, ResolvedRequestOptions>();\n\n  const beforeRequest = async (options: RequestOptions) => {\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 url = buildUrl(opts);\n\n    return { opts, url };\n  };\n\n  // @ts-expect-error\n  const request: Client['request'] = async (options) => {\n    // @ts-expect-error\n    const { opts, url } = await beforeRequest(options);\n\n    for (const fn of interceptors.request.fns) {\n      if (fn) {\n        await fn(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    const requestInit: ReqInit = {\n      ...opts,\n      body: getValidRequestBody(opts),\n    };\n\n    let response = await _fetch(url, requestInit);\n\n    for (const fn of interceptors.response.fns) {\n      if (fn) {\n        response = await fn(response, opts);\n      }\n    }\n\n    const result = {\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 {\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 {\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 {\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, opts)) as string;\n      }\n    }\n\n    finalError = finalError || ({} as string);\n\n    if (opts.throwOnError) {\n      throw finalError;\n    }\n\n    return {\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        const requestInit = {\n          ...init,\n          method: init.method as Config['method'],\n          url,\n        };\n        for (const fn of interceptors.request.fns) {\n          if (fn) {\n            await fn(requestInit);\n            request = new Request(requestInit.url, requestInit);\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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-next/tsconfig-nodenext-sdk/client/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type { Auth } from '../core/auth.gen.js';\nexport type { QuerySerializerOptions } from '../core/bodySerializer.gen.js';\nexport {\n  formDataBodySerializer,\n  jsonBodySerializer,\n  urlSearchParamsBodySerializer,\n} from '../core/bodySerializer.gen.js';\nexport { buildClientParams } from '../core/params.gen.js';\nexport { serializeQueryKeyValue } from '../core/queryKeySerializer.gen.js';\nexport { createClient } from './client.gen.js';\nexport type {\n  Client,\n  ClientOptions,\n  Config,\n  CreateClientConfig,\n  Options,\n  RequestOptions,\n  RequestResult,\n  TDataShape,\n} from './types.gen.js';\nexport { createConfig } from './utils.gen.js';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-next/tsconfig-nodenext-sdk/client/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { Auth } from '../core/auth.gen.js';\nimport type {\n  ServerSentEventsOptions,\n  ServerSentEventsResult,\n} from '../core/serverSentEvents.gen.js';\nimport type { Client as CoreClient, Config as CoreConfig } from '../core/types.gen.js';\nimport type { Middleware } from './utils.gen.js';\n\nexport interface Config<T extends ClientOptions = ClientOptions>\n  extends Omit<RequestInit, 'body' | 'headers' | 'method'>, CoreConfig {\n  /**\n   * Base URL for all requests made by this client.\n   */\n  baseUrl?: T['baseUrl'];\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   * Return the response data parsed in a specified format. By default, `auto`\n   * will infer the appropriate method from the `Content-Type` response header.\n   * You can override this behavior with any of the {@link Body} methods.\n   * Select `stream` if you don't want to parse response data at all.\n   *\n   * @default 'auto'\n   */\n  parseAs?: 'arrayBuffer' | 'auto' | 'blob' | 'formData' | 'json' | 'stream' | 'text';\n  /**\n   * Throw an error instead of returning it in the response?\n   *\n   * @default false\n   */\n  throwOnError?: T['throwOnError'];\n}\n\nexport interface RequestOptions<\n  TData = unknown,\n  ThrowOnError extends boolean = boolean,\n  Url extends string = string,\n>\n  extends\n    Config<{\n      throwOnError: ThrowOnError;\n    }>,\n    Pick<\n      ServerSentEventsOptions<TData>,\n      | 'onRequest'\n      | 'onSseError'\n      | 'onSseEvent'\n      | 'sseDefaultRetryDelay'\n      | 'sseMaxRetryAttempts'\n      | 'sseMaxRetryDelay'\n    > {\n  /**\n   * Any body that you want to add to your request.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/fetch#body}\n   */\n  body?: unknown;\n  path?: Record<string, unknown>;\n  query?: Record<string, unknown>;\n  /**\n   * Security mechanism(s) to use for the request.\n   */\n  security?: ReadonlyArray<Auth>;\n  url: Url;\n}\n\nexport interface ResolvedRequestOptions<\n  ThrowOnError extends boolean = boolean,\n  Url extends string = string,\n> extends RequestOptions<unknown, ThrowOnError, Url> {\n  serializedBody?: string;\n}\n\nexport type RequestResult<\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = boolean,\n> = ThrowOnError extends true\n  ? Promise<{\n      data: TData extends Record<string, unknown> ? TData[keyof TData] : TData;\n      response: Response;\n    }>\n  : Promise<\n      (\n        | {\n            data: TData extends Record<string, unknown> ? TData[keyof TData] : TData;\n            error: undefined;\n          }\n        | {\n            data: undefined;\n            error: TError extends Record<string, unknown> ? TError[keyof TError] : TError;\n          }\n      ) & {\n        response: Response;\n      }\n    >;\n\nexport interface ClientOptions {\n  baseUrl?: string;\n  throwOnError?: boolean;\n}\n\ntype MethodFn = <TData = unknown, TError = unknown, ThrowOnError extends boolean = false>(\n  options: Omit<RequestOptions<TData, ThrowOnError>, 'method'>,\n) => RequestResult<TData, TError, ThrowOnError>;\n\ntype SseFn = <TData = unknown, TError = unknown, ThrowOnError extends boolean = false>(\n  options: Omit<RequestOptions<TData, ThrowOnError>, 'method'>,\n) => Promise<ServerSentEventsResult<TData, TError>>;\n\ntype RequestFn = <TData = unknown, TError = unknown, ThrowOnError extends boolean = false>(\n  options: Omit<RequestOptions<TData, ThrowOnError>, 'method'> &\n    Pick<Required<RequestOptions<TData, ThrowOnError>>, 'method'>,\n) => RequestResult<TData, TError, ThrowOnError>;\n\ntype BuildUrlFn = <\n  TData extends {\n    body?: unknown;\n    path?: Record<string, unknown>;\n    query?: Record<string, unknown>;\n    url: string;\n  },\n>(\n  options: TData & Options<TData>,\n) => string;\n\nexport type Client = CoreClient<RequestFn, Config, MethodFn, BuildUrlFn, SseFn> & {\n  interceptors: Middleware<Response, unknown, ResolvedRequestOptions>;\n};\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 = ClientOptions> = (\n  override?: Config<ClientOptions & T>,\n) => Config<Required<ClientOptions> & T>;\n\nexport interface TDataShape {\n  body?: unknown;\n  headers?: unknown;\n  path?: unknown;\n  query?: unknown;\n  url: string;\n}\n\ntype OmitKeys<T, K> = Pick<T, Exclude<keyof T, K>>;\n\nexport type Options<\n  TData extends TDataShape = TDataShape,\n  ThrowOnError extends boolean = boolean,\n  TResponse = unknown,\n> = OmitKeys<RequestOptions<TResponse, ThrowOnError>, 'body' | 'path' | 'query' | 'url'> &\n  ([TData] extends [never] ? unknown : Omit<TData, 'url'>);\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-next/tsconfig-nodenext-sdk/client/utils.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport { getAuthToken } from '../core/auth.gen.js';\nimport type {\n  QuerySerializer,\n  QuerySerializerOptions,\n} from '../core/bodySerializer.gen.js';\nimport { jsonBodySerializer } from '../core/bodySerializer.gen.js';\nimport {\n  serializeArrayParam,\n  serializeObjectParam,\n  serializePrimitiveParam,\n} from '../core/pathSerializer.gen.js';\nimport type { Client, ClientOptions, Config, RequestOptions } from './types.gen.js';\n\ninterface PathSerializer {\n  path: Record<string, unknown>;\n  url: string;\n}\n\nconst PATH_PARAM_RE = /\\{[^{}]+\\}/g;\n\ntype ArrayStyle = 'form' | 'spaceDelimited' | 'pipeDelimited';\ntype MatrixStyle = 'label' | 'matrix' | 'simple';\ntype ArraySeparatorStyle = ArrayStyle | MatrixStyle;\n\nconst 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 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    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  const url = 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  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 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 || typeof header !== 'object') {\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, Options> = (\n  error: Err,\n  response: Res,\n  options: Options,\n) => Err | Promise<Err>;\n\ntype ReqInterceptor<Options> = (options: Options) => void | Promise<void>;\n\ntype ResInterceptor<Res, Options> = (response: Res, options: Options) => 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<Res, Err, Options> {\n  error: Interceptors<ErrInterceptor<Err, Res, Options>>;\n  request: Interceptors<ReqInterceptor<Options>>;\n  response: Interceptors<ResInterceptor<Res, Options>>;\n}\n\nexport const createInterceptors = <Res, Err, Options>(): Middleware<Res, Err, Options> => ({\n  error: new Interceptors<ErrInterceptor<Err, Res, Options>>(),\n  request: new Interceptors<ReqInterceptor<Options>>(),\n  response: new Interceptors<ResInterceptor<Res, 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-next/tsconfig-nodenext-sdk/client.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport { type ClientOptions, type Config, createClient, createConfig } from './client/index.js';\nimport type { ClientOptions as ClientOptions2 } from './types.gen.js';\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: 'http://localhost:3000/base' }));\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-next/tsconfig-nodenext-sdk/core/auth.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-next/tsconfig-nodenext-sdk/core/bodySerializer.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { ArrayStyle, ObjectStyle, SerializerOptions } from './pathSerializer.gen.js';\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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-next/tsconfig-nodenext-sdk/core/params.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-next/tsconfig-nodenext-sdk/core/pathSerializer.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-next/tsconfig-nodenext-sdk/core/queryKeySerializer.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\n/**\n * JSON-friendly union that mirrors what Pinia Colada can hash.\n */\nexport type JsonValue =\n  | null\n  | string\n  | number\n  | boolean\n  | JsonValue[]\n  | { [key: string]: JsonValue };\n\n/**\n * Replacer that converts non-JSON values (bigint, Date, etc.) to safe substitutes.\n */\nexport const queryKeyJsonReplacer = (_key: string, value: unknown) => {\n  if (value === undefined || typeof value === 'function' || typeof value === 'symbol') {\n    return undefined;\n  }\n  if (typeof value === 'bigint') {\n    return value.toString();\n  }\n  if (value instanceof Date) {\n    return value.toISOString();\n  }\n  return value;\n};\n\n/**\n * Safely stringifies a value and parses it back into a JsonValue.\n */\nexport const stringifyToJsonValue = (input: unknown): JsonValue | undefined => {\n  try {\n    const json = JSON.stringify(input, queryKeyJsonReplacer);\n    if (json === undefined) {\n      return undefined;\n    }\n    return JSON.parse(json) as JsonValue;\n  } catch {\n    return undefined;\n  }\n};\n\n/**\n * Detects plain objects (including objects with a null prototype).\n */\nconst isPlainObject = (value: unknown): value is Record<string, unknown> => {\n  if (value === null || typeof value !== 'object') {\n    return false;\n  }\n  const prototype = Object.getPrototypeOf(value as object);\n  return prototype === Object.prototype || prototype === null;\n};\n\n/**\n * Turns URLSearchParams into a sorted JSON object for deterministic keys.\n */\nconst serializeSearchParams = (params: URLSearchParams): JsonValue => {\n  const entries = Array.from(params.entries()).sort(([a], [b]) => a.localeCompare(b));\n  const result: Record<string, JsonValue> = {};\n\n  for (const [key, value] of entries) {\n    const existing = result[key];\n    if (existing === undefined) {\n      result[key] = value;\n      continue;\n    }\n\n    if (Array.isArray(existing)) {\n      (existing as string[]).push(value);\n    } else {\n      result[key] = [existing, value];\n    }\n  }\n\n  return result;\n};\n\n/**\n * Normalizes any accepted value into a JSON-friendly shape for query keys.\n */\nexport const serializeQueryKeyValue = (value: unknown): JsonValue | undefined => {\n  if (value === null) {\n    return null;\n  }\n\n  if (typeof value === 'string' || typeof value === 'number' || typeof value === 'boolean') {\n    return value;\n  }\n\n  if (value === undefined || typeof value === 'function' || typeof value === 'symbol') {\n    return undefined;\n  }\n\n  if (typeof value === 'bigint') {\n    return value.toString();\n  }\n\n  if (value instanceof Date) {\n    return value.toISOString();\n  }\n\n  if (Array.isArray(value)) {\n    return stringifyToJsonValue(value);\n  }\n\n  if (typeof URLSearchParams !== 'undefined' && value instanceof URLSearchParams) {\n    return serializeSearchParams(value);\n  }\n\n  if (isPlainObject(value)) {\n    return stringifyToJsonValue(value);\n  }\n\n  return undefined;\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-next/tsconfig-nodenext-sdk/core/serverSentEvents.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { Config } from './types.gen.js';\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 const 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            // Normalize line endings: CRLF -> LF, then CR -> LF\n            buffer = buffer.replace(/\\r\\n/g, '\\n').replace(/\\r/g, '\\n');\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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-next/tsconfig-nodenext-sdk/core/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { Auth, AuthToken } from './auth.gen.js';\nimport type { BodySerializer, QuerySerializer, QuerySerializerOptions } from './bodySerializer.gen.js';\n\nexport type HttpMethod =\n  | 'connect'\n  | 'delete'\n  | 'get'\n  | 'head'\n  | 'options'\n  | 'patch'\n  | 'post'\n  | 'put'\n  | 'trace';\n\nexport type Client<\n  RequestFn = never,\n  Config = unknown,\n  MethodFn = never,\n  BuildUrlFn = never,\n  SseFn = never,\n> = {\n  /**\n   * Returns the final request URL.\n   */\n  buildUrl: BuildUrlFn;\n  getConfig: () => Config;\n  request: RequestFn;\n  setConfig: (config: Config) => Config;\n} & {\n  [K in HttpMethod]: MethodFn;\n} & ([SseFn] extends [never] ? { sse?: never } : { sse: { [K in HttpMethod]: SseFn } });\n\nexport interface Config {\n  /**\n   * Auth token or a function returning auth token. The resolved value will be\n   * added to the request payload as defined by its `security` array.\n   */\n  auth?: ((auth: Auth) => Promise<AuthToken> | AuthToken) | AuthToken;\n  /**\n   * A function for serializing request body parameter. By default,\n   * {@link JSON.stringify()} will be used.\n   */\n  bodySerializer?: BodySerializer | null;\n  /**\n   * An object containing any HTTP headers that you want to pre-populate your\n   * `Headers` object with.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/Headers/Headers#init See more}\n   */\n  headers?:\n    | RequestInit['headers']\n    | Record<\n        string,\n        string | number | boolean | (string | number | boolean)[] | null | undefined | unknown\n      >;\n  /**\n   * The request method.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/fetch#method See more}\n   */\n  method?: Uppercase<HttpMethod>;\n  /**\n   * A function for serializing request query parameters. By default, arrays\n   * will be exploded in form style, objects will be exploded in deepObject\n   * style, and reserved characters are percent-encoded.\n   *\n   * This method will have no effect if the native `paramsSerializer()` Axios\n   * API function is used.\n   *\n   * {@link https://swagger.io/docs/specification/serialization/#query View examples}\n   */\n  querySerializer?: QuerySerializer | QuerySerializerOptions;\n  /**\n   * A function validating request data. This is useful if you want to ensure\n   * the request conforms to the desired shape, so it can be safely sent to\n   * the server.\n   */\n  requestValidator?: (data: unknown) => Promise<unknown>;\n  /**\n   * A function transforming response data before it's returned. This is useful\n   * for post-processing data, e.g. converting ISO strings into Date objects.\n   */\n  responseTransformer?: (data: unknown) => Promise<unknown>;\n  /**\n   * A function validating response data. This is useful if you want to ensure\n   * the response conforms to the desired shape, so it can be safely passed to\n   * the transformers and returned to the user.\n   */\n  responseValidator?: (data: unknown) => Promise<unknown>;\n}\n\ntype IsExactlyNeverOrNeverUndefined<T> = [T] extends [never]\n  ? true\n  : [T] extends [never | undefined]\n    ? [undefined] extends [T]\n      ? false\n      : true\n    : false;\n\nexport type OmitNever<T extends Record<string, unknown>> = {\n  [K in keyof T as IsExactlyNeverOrNeverUndefined<T[K]> extends true ? never : K]: T[K];\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-next/tsconfig-nodenext-sdk/core/utils.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { BodySerializer, QuerySerializer } from './bodySerializer.gen.js';\nimport {\n  type ArraySeparatorStyle,\n  serializeArrayParam,\n  serializeObjectParam,\n  serializePrimitiveParam,\n} from './pathSerializer.gen.js';\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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-next/tsconfig-nodenext-sdk/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport { apiVVersionODataControllerCount, callToTestOrderOfParams, callWithDefaultOptionalParameters, callWithDefaultParameters, callWithDescriptions, callWithDuplicateResponses, callWithNoContentResponse, callWithParameters, callWithResponse, callWithResponseAndNoContentResponse, callWithResponses, callWithResultFromHeader, callWithWeirdParameterNames, collectionFormat, complexParams, complexTypes, deleteCallWithoutParametersAndResponse, deleteFoo, deprecatedCall, dummyA, dummyB, duplicateName, duplicateName2, duplicateName3, duplicateName4, export_, fileResponse, fooWow, getApiVbyApiVersionSimpleOperation, getCallWithOptionalParam, getCallWithoutParametersAndResponse, headCallWithoutParametersAndResponse, import_, multipartRequest, multipartResponse, nonAsciiæøåÆøÅöôêÊ字符串, type Options, optionsCallWithoutParametersAndResponse, patchApiVbyApiVersionNoTag, patchCallWithoutParametersAndResponse, postApiVbyApiVersionFormData, postApiVbyApiVersionRequestBody, postCallWithOptionalParam, postCallWithoutParametersAndResponse, putCallWithoutParametersAndResponse, putWithFormUrlEncoded, testErrorCode, types, uploadFile } from './sdk.gen.js';\nexport type { _3eNum1Период, _400, AdditionalPropertiesIntegerIssue, AdditionalPropertiesUnknownIssue, AdditionalPropertiesUnknownIssue2, AdditionalPropertiesUnknownIssue3, AdditionalPropertiesUnknownIssueWritable, AnyOfAnyAndNull, AnyOfArrays, ApiVVersionODataControllerCountData, ApiVVersionODataControllerCountResponse, ApiVVersionODataControllerCountResponses, ArrayWithAnyOfProperties, ArrayWithArray, ArrayWithBooleans, ArrayWithNumbers, ArrayWithProperties, ArrayWithReferences, ArrayWithStrings, CallToTestOrderOfParamsData, CallWithDefaultOptionalParametersData, CallWithDefaultParametersData, CallWithDescriptionsData, CallWithDuplicateResponsesData, CallWithDuplicateResponsesError, CallWithDuplicateResponsesErrors, CallWithDuplicateResponsesResponse, CallWithDuplicateResponsesResponses, CallWithNoContentResponseData, CallWithNoContentResponseResponse, CallWithNoContentResponseResponses, CallWithParametersData, CallWithResponseAndNoContentResponseData, CallWithResponseAndNoContentResponseResponse, CallWithResponseAndNoContentResponseResponses, CallWithResponseData, CallWithResponseResponse, CallWithResponseResponses, CallWithResponsesData, CallWithResponsesError, CallWithResponsesErrors, CallWithResponsesResponse, CallWithResponsesResponses, CallWithResultFromHeaderData, CallWithResultFromHeaderErrors, CallWithResultFromHeaderResponses, CallWithWeirdParameterNamesData, CamelCaseCommentWithBreaks, CharactersInDescription, ClientOptions, CollectionFormatData, CommentWithBackticks, CommentWithBackticksAndQuotes, CommentWithBreaks, CommentWithExpressionPlaceholders, CommentWithQuotes, CommentWithReservedCharacters, CommentWithSlashes, ComplexParamsData, ComplexParamsResponse, ComplexParamsResponses, ComplexTypesData, ComplexTypesErrors, ComplexTypesResponse, ComplexTypesResponses, CompositionBaseModel, CompositionExtendedModel, CompositionWithAllOfAndNullable, CompositionWithAnyOf, CompositionWithAnyOfAndNullable, CompositionWithAnyOfAnonymous, CompositionWithNestedAnyAndTypeNull, CompositionWithNestedAnyOfAndNull, CompositionWithOneOf, CompositionWithOneOfAndComplexArrayDictionary, CompositionWithOneOfAndNullable, CompositionWithOneOfAndProperties, CompositionWithOneOfAndSimpleArrayDictionary, CompositionWithOneOfAndSimpleDictionary, CompositionWithOneOfAnonymous, CompositionWithOneOfDiscriminator, ConstValue, Default, DeleteCallWithoutParametersAndResponseData, DeleteFooData, DeleteFooData2, DeleteFooData3, DeprecatedCallData, DeprecatedModel, DictionaryWithArray, DictionaryWithDictionary, DictionaryWithProperties, DictionaryWithPropertiesAndAdditionalProperties, DictionaryWithReference, DictionaryWithString, DummyAData, DummyAResponse, DummyAResponses, DummyBData, DummyBResponse, DummyBResponses, DuplicateName2Data, DuplicateName3Data, DuplicateName4Data, DuplicateNameData, EnumFromDescription, EnumWithExtensions, EnumWithNumbers, EnumWithReplacedCharacters, EnumWithStrings, EnumWithXEnumNames, ExportData, ExternalRefA, ExternalRefB, ExternalSharedModel, File, FileResponseData, FileResponseResponse, FileResponseResponses, FileWritable, FooWowData, FooWowResponses, FreeFormObjectWithAdditionalPropertiesEqEmptyObject, FreeFormObjectWithAdditionalPropertiesEqTrue, FreeFormObjectWithoutAdditionalProperties, GenericSchemaDuplicateIssue1SystemBoolean, GenericSchemaDuplicateIssue1SystemBooleanWritable, GenericSchemaDuplicateIssue1SystemString, GenericSchemaDuplicateIssue1SystemStringWritable, GetApiVbyApiVersionSimpleOperationData, GetApiVbyApiVersionSimpleOperationError, GetApiVbyApiVersionSimpleOperationErrors, GetApiVbyApiVersionSimpleOperationResponse, GetApiVbyApiVersionSimpleOperationResponses, GetCallWithOptionalParamData, GetCallWithoutParametersAndResponseData, HeadCallWithoutParametersAndResponseData, Import, ImportData, ImportResponse, ImportResponses, IoK8sApimachineryPkgApisMetaV1DeleteOptions, IoK8sApimachineryPkgApisMetaV1Preconditions, ModelCircle, ModelFromZendesk, ModelSquare, ModelThatExtends, ModelThatExtendsExtends, ModelWithAdditionalPropertiesEqTrue, ModelWithAdditionalPropertiesRef, ModelWithAnyOfConstantSizeArray, ModelWithAnyOfConstantSizeArrayAndIntersect, ModelWithAnyOfConstantSizeArrayNullable, ModelWithAnyOfConstantSizeArrayWithNSizeAndOptions, ModelWithAnyOfConstantSizeArrayWithNSizeAndOptionsWritable, ModelWithArray, ModelWithArrayReadOnlyAndWriteOnly, ModelWithArrayReadOnlyAndWriteOnlyWritable, ModelWithBackticksInDescription, ModelWithBoolean, ModelWithCircularReference, ModelWithConst, ModelWithConstantSizeArray, ModelWithDictionary, ModelWithDuplicateImports, ModelWithDuplicateProperties, ModelWithEnum, ModelWithEnumFromDescription, ModelWithEnumWithHyphen, ModelWithInteger, ModelWithNestedArrayEnums, ModelWithNestedArrayEnumsData, ModelWithNestedArrayEnumsDataBar, ModelWithNestedArrayEnumsDataFoo, ModelWithNestedCompositionEnums, ModelWithNestedEnums, ModelWithNestedProperties, ModelWithNullableObject, ModelWithNullableString, ModelWithNumericEnumUnion, ModelWithOneOfAndProperties, ModelWithOneOfEnum, ModelWithOrderedProperties, ModelWithPattern, ModelWithPatternWritable, ModelWithPrefixItemsConstantSizeArray, ModelWithProperties, ModelWithPropertiesWritable, ModelWithReadOnlyAndWriteOnly, ModelWithReadOnlyAndWriteOnlyWritable, ModelWithReference, ModelWithReferenceWritable, ModelWithString, ModelWithStringError, MultipartRequestData, MultipartResponseData, MultipartResponseResponse, MultipartResponseResponses, NestedAnyOfArraysNullable, NonAsciiæøåÆøÅöôêÊ字符串Data, NonAsciiæøåÆøÅöôêÊ字符串Response, NonAsciiæøåÆøÅöôêÊ字符串Responses, NonAsciiStringæøåÆøÅöôêÊ字符串, NullableObject, OneOfAllOfIssue, OneOfAllOfIssueWritable, OptionsCallWithoutParametersAndResponseData, Pageable, ParameterSimpleParameterUnused, PatchApiVbyApiVersionNoTagData, PatchApiVbyApiVersionNoTagResponses, PatchCallWithoutParametersAndResponseData, PostApiVbyApiVersionFormDataData, PostApiVbyApiVersionRequestBodyData, PostCallWithOptionalParamData, PostCallWithOptionalParamResponse, PostCallWithOptionalParamResponses, PostCallWithoutParametersAndResponseData, PostServiceWithEmptyTagResponse, PostServiceWithEmptyTagResponse2, PutCallWithoutParametersAndResponseData, PutWithFormUrlEncodedData, SchemaWithFormRestrictedKeys, SimpleBoolean, SimpleFile, SimpleFormData, SimpleInteger, SimpleParameter, SimpleReference, SimpleRequestBody, SimpleString, SimpleStringWithPattern, TestErrorCodeData, TestErrorCodeErrors, TestErrorCodeResponses, TypesData, TypesResponse, TypesResponses, UploadFileData, UploadFileResponse, UploadFileResponses, XFooBar } from './types.gen.js';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-next/tsconfig-nodenext-sdk/sdk.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport { client } from './client.gen.js';\nimport { type Client, formDataBodySerializer, type Options as Options2, type TDataShape, urlSearchParamsBodySerializer } from './client/index.js';\nimport type { ApiVVersionODataControllerCountData, ApiVVersionODataControllerCountResponses, CallToTestOrderOfParamsData, CallWithDefaultOptionalParametersData, CallWithDefaultParametersData, CallWithDescriptionsData, CallWithDuplicateResponsesData, CallWithDuplicateResponsesErrors, CallWithDuplicateResponsesResponses, CallWithNoContentResponseData, CallWithNoContentResponseResponses, CallWithParametersData, CallWithResponseAndNoContentResponseData, CallWithResponseAndNoContentResponseResponses, CallWithResponseData, CallWithResponseResponses, CallWithResponsesData, CallWithResponsesErrors, CallWithResponsesResponses, CallWithResultFromHeaderData, CallWithResultFromHeaderErrors, CallWithResultFromHeaderResponses, CallWithWeirdParameterNamesData, CollectionFormatData, ComplexParamsData, ComplexParamsResponses, ComplexTypesData, ComplexTypesErrors, ComplexTypesResponses, DeleteCallWithoutParametersAndResponseData, DeleteFooData3, DeprecatedCallData, DummyAData, DummyAResponses, DummyBData, DummyBResponses, DuplicateName2Data, DuplicateName3Data, DuplicateName4Data, DuplicateNameData, ExportData, FileResponseData, FileResponseResponses, FooWowData, FooWowResponses, GetApiVbyApiVersionSimpleOperationData, GetApiVbyApiVersionSimpleOperationErrors, GetApiVbyApiVersionSimpleOperationResponses, GetCallWithOptionalParamData, GetCallWithoutParametersAndResponseData, HeadCallWithoutParametersAndResponseData, ImportData, ImportResponses, MultipartRequestData, MultipartResponseData, MultipartResponseResponses, NonAsciiæøåÆøÅöôêÊ字符串Data, NonAsciiæøåÆøÅöôêÊ字符串Responses, OptionsCallWithoutParametersAndResponseData, PatchApiVbyApiVersionNoTagData, PatchApiVbyApiVersionNoTagResponses, PatchCallWithoutParametersAndResponseData, PostApiVbyApiVersionFormDataData, PostApiVbyApiVersionRequestBodyData, PostCallWithOptionalParamData, PostCallWithOptionalParamResponses, PostCallWithoutParametersAndResponseData, PutCallWithoutParametersAndResponseData, PutWithFormUrlEncodedData, TestErrorCodeData, TestErrorCodeErrors, TestErrorCodeResponses, TypesData, TypesResponses, UploadFileData, UploadFileResponses } from './types.gen.js';\n\nexport type Options<TData extends TDataShape = TDataShape, ThrowOnError extends boolean = boolean> = Options2<TData, ThrowOnError> & {\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\nexport const export_ = <ThrowOnError extends boolean = false>(options?: Options<ExportData, ThrowOnError>) => (options?.client ?? client).get<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/no+tag', ...options });\n\nexport const patchApiVbyApiVersionNoTag = <ThrowOnError extends boolean = false>(options?: Options<PatchApiVbyApiVersionNoTagData, ThrowOnError>) => (options?.client ?? client).patch<PatchApiVbyApiVersionNoTagResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/no+tag', ...options });\n\nexport const import_ = <ThrowOnError extends boolean = false>(options: Options<ImportData, ThrowOnError>) => (options.client ?? client).post<ImportResponses, unknown, ThrowOnError>({\n    url: '/api/v{api-version}/no+tag',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options.headers\n    }\n});\n\nexport const fooWow = <ThrowOnError extends boolean = false>(options?: Options<FooWowData, ThrowOnError>) => (options?.client ?? client).put<FooWowResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/no+tag', ...options });\n\nexport const apiVVersionODataControllerCount = <ThrowOnError extends boolean = false>(options?: Options<ApiVVersionODataControllerCountData, ThrowOnError>) => (options?.client ?? client).get<ApiVVersionODataControllerCountResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple/$count', ...options });\n\nexport const getApiVbyApiVersionSimpleOperation = <ThrowOnError extends boolean = false>(options: Options<GetApiVbyApiVersionSimpleOperationData, ThrowOnError>) => (options.client ?? client).get<GetApiVbyApiVersionSimpleOperationResponses, GetApiVbyApiVersionSimpleOperationErrors, ThrowOnError>({ url: '/api/v{api-version}/simple:operation', ...options });\n\nexport const deleteCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<DeleteCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).delete<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const getCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<GetCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).get<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const headCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<HeadCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).head<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const optionsCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<OptionsCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).options<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const patchCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<PatchCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).patch<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const postCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<PostCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).post<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const putCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<PutCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).put<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const deleteFoo = <ThrowOnError extends boolean = false>(options: Options<DeleteFooData3, ThrowOnError>) => (options.client ?? client).delete<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/foo/{foo_param}/bar/{BarParam}', ...options });\n\nexport const callWithDescriptions = <ThrowOnError extends boolean = false>(options?: Options<CallWithDescriptionsData, ThrowOnError>) => (options?.client ?? client).post<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/descriptions', ...options });\n\n/**\n * @deprecated\n */\nexport const deprecatedCall = <ThrowOnError extends boolean = false>(options: Options<DeprecatedCallData, ThrowOnError>) => (options.client ?? client).post<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/parameters/deprecated', ...options });\n\nexport const callWithParameters = <ThrowOnError extends boolean = false>(options: Options<CallWithParametersData, ThrowOnError>) => (options.client ?? client).post<unknown, unknown, ThrowOnError>({\n    url: '/api/v{api-version}/parameters/{parameterPath}',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options.headers\n    }\n});\n\nexport const callWithWeirdParameterNames = <ThrowOnError extends boolean = false>(options: Options<CallWithWeirdParameterNamesData, ThrowOnError>) => (options.client ?? client).post<unknown, unknown, ThrowOnError>({\n    url: '/api/v{api-version}/parameters/{parameter.path.1}/{parameter-path-2}/{PARAMETER-PATH-3}',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options.headers\n    }\n});\n\nexport const getCallWithOptionalParam = <ThrowOnError extends boolean = false>(options: Options<GetCallWithOptionalParamData, ThrowOnError>) => (options.client ?? client).get<unknown, unknown, ThrowOnError>({\n    url: '/api/v{api-version}/parameters',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options.headers\n    }\n});\n\nexport const postCallWithOptionalParam = <ThrowOnError extends boolean = false>(options: Options<PostCallWithOptionalParamData, ThrowOnError>) => (options.client ?? client).post<PostCallWithOptionalParamResponses, unknown, ThrowOnError>({\n    url: '/api/v{api-version}/parameters',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options.headers\n    }\n});\n\nexport const postApiVbyApiVersionRequestBody = <ThrowOnError extends boolean = false>(options?: Options<PostApiVbyApiVersionRequestBodyData, ThrowOnError>) => (options?.client ?? client).post<unknown, unknown, ThrowOnError>({\n    url: '/api/v{api-version}/requestBody',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options?.headers\n    }\n});\n\nexport const postApiVbyApiVersionFormData = <ThrowOnError extends boolean = false>(options?: Options<PostApiVbyApiVersionFormDataData, ThrowOnError>) => (options?.client ?? client).post<unknown, unknown, ThrowOnError>({\n    ...formDataBodySerializer,\n    url: '/api/v{api-version}/formData',\n    ...options,\n    headers: {\n        'Content-Type': null,\n        ...options?.headers\n    }\n});\n\nexport const callWithDefaultParameters = <ThrowOnError extends boolean = false>(options?: Options<CallWithDefaultParametersData, ThrowOnError>) => (options?.client ?? client).get<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/defaults', ...options });\n\nexport const callWithDefaultOptionalParameters = <ThrowOnError extends boolean = false>(options?: Options<CallWithDefaultOptionalParametersData, ThrowOnError>) => (options?.client ?? client).post<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/defaults', ...options });\n\nexport const callToTestOrderOfParams = <ThrowOnError extends boolean = false>(options: Options<CallToTestOrderOfParamsData, ThrowOnError>) => (options.client ?? client).put<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/defaults', ...options });\n\nexport const duplicateName = <ThrowOnError extends boolean = false>(options?: Options<DuplicateNameData, ThrowOnError>) => (options?.client ?? client).delete<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/duplicate', ...options });\n\nexport const duplicateName2 = <ThrowOnError extends boolean = false>(options?: Options<DuplicateName2Data, ThrowOnError>) => (options?.client ?? client).get<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/duplicate', ...options });\n\nexport const duplicateName3 = <ThrowOnError extends boolean = false>(options?: Options<DuplicateName3Data, ThrowOnError>) => (options?.client ?? client).post<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/duplicate', ...options });\n\nexport const duplicateName4 = <ThrowOnError extends boolean = false>(options?: Options<DuplicateName4Data, ThrowOnError>) => (options?.client ?? client).put<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/duplicate', ...options });\n\nexport const callWithNoContentResponse = <ThrowOnError extends boolean = false>(options?: Options<CallWithNoContentResponseData, ThrowOnError>) => (options?.client ?? client).get<CallWithNoContentResponseResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/no-content', ...options });\n\nexport const callWithResponseAndNoContentResponse = <ThrowOnError extends boolean = false>(options?: Options<CallWithResponseAndNoContentResponseData, ThrowOnError>) => (options?.client ?? client).get<CallWithResponseAndNoContentResponseResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/multiple-tags/response-and-no-content', ...options });\n\nexport const dummyA = <ThrowOnError extends boolean = false>(options?: Options<DummyAData, ThrowOnError>) => (options?.client ?? client).get<DummyAResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/multiple-tags/a', ...options });\n\nexport const dummyB = <ThrowOnError extends boolean = false>(options?: Options<DummyBData, ThrowOnError>) => (options?.client ?? client).get<DummyBResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/multiple-tags/b', ...options });\n\nexport const callWithResponse = <ThrowOnError extends boolean = false>(options?: Options<CallWithResponseData, ThrowOnError>) => (options?.client ?? client).get<CallWithResponseResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/response', ...options });\n\nexport const callWithDuplicateResponses = <ThrowOnError extends boolean = false>(options?: Options<CallWithDuplicateResponsesData, ThrowOnError>) => (options?.client ?? client).post<CallWithDuplicateResponsesResponses, CallWithDuplicateResponsesErrors, ThrowOnError>({ url: '/api/v{api-version}/response', ...options });\n\nexport const callWithResponses = <ThrowOnError extends boolean = false>(options?: Options<CallWithResponsesData, ThrowOnError>) => (options?.client ?? client).put<CallWithResponsesResponses, CallWithResponsesErrors, ThrowOnError>({ url: '/api/v{api-version}/response', ...options });\n\nexport const collectionFormat = <ThrowOnError extends boolean = false>(options: Options<CollectionFormatData, ThrowOnError>) => (options.client ?? client).get<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/collectionFormat', ...options });\n\nexport const types = <ThrowOnError extends boolean = false>(options: Options<TypesData, ThrowOnError>) => (options.client ?? client).get<TypesResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/types', ...options });\n\nexport const uploadFile = <ThrowOnError extends boolean = false>(options: Options<UploadFileData, ThrowOnError>) => (options.client ?? client).post<UploadFileResponses, unknown, ThrowOnError>({\n    ...urlSearchParamsBodySerializer,\n    url: '/api/v{api-version}/upload',\n    ...options,\n    headers: {\n        'Content-Type': 'application/x-www-form-urlencoded',\n        ...options.headers\n    }\n});\n\nexport const fileResponse = <ThrowOnError extends boolean = false>(options: Options<FileResponseData, ThrowOnError>) => (options.client ?? client).get<FileResponseResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/file/{id}', ...options });\n\nexport const complexTypes = <ThrowOnError extends boolean = false>(options: Options<ComplexTypesData, ThrowOnError>) => (options.client ?? client).get<ComplexTypesResponses, ComplexTypesErrors, ThrowOnError>({\n    querySerializer: { parameters: { parameterObject: { object: { style: 'form' } } } },\n    url: '/api/v{api-version}/complex',\n    ...options\n});\n\nexport const multipartResponse = <ThrowOnError extends boolean = false>(options?: Options<MultipartResponseData, ThrowOnError>) => (options?.client ?? client).get<MultipartResponseResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/multipart', ...options });\n\nexport const multipartRequest = <ThrowOnError extends boolean = false>(options?: Options<MultipartRequestData, ThrowOnError>) => (options?.client ?? client).post<unknown, unknown, ThrowOnError>({\n    ...formDataBodySerializer,\n    url: '/api/v{api-version}/multipart',\n    ...options,\n    headers: {\n        'Content-Type': null,\n        ...options?.headers\n    }\n});\n\nexport const complexParams = <ThrowOnError extends boolean = false>(options: Options<ComplexParamsData, ThrowOnError>) => (options.client ?? client).put<ComplexParamsResponses, unknown, ThrowOnError>({\n    url: '/api/v{api-version}/complex/{id}',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json-patch+json',\n        ...options.headers\n    }\n});\n\nexport const callWithResultFromHeader = <ThrowOnError extends boolean = false>(options?: Options<CallWithResultFromHeaderData, ThrowOnError>) => (options?.client ?? client).post<CallWithResultFromHeaderResponses, CallWithResultFromHeaderErrors, ThrowOnError>({ url: '/api/v{api-version}/header', ...options });\n\nexport const testErrorCode = <ThrowOnError extends boolean = false>(options: Options<TestErrorCodeData, ThrowOnError>) => (options.client ?? client).post<TestErrorCodeResponses, TestErrorCodeErrors, ThrowOnError>({ url: '/api/v{api-version}/error', ...options });\n\nexport const nonAsciiæøåÆøÅöôêÊ字符串 = <ThrowOnError extends boolean = false>(options: Options<NonAsciiæøåÆøÅöôêÊ字符串Data, ThrowOnError>) => (options.client ?? client).post<NonAsciiæøåÆøÅöôêÊ字符串Responses, unknown, ThrowOnError>({ url: '/api/v{api-version}/non-ascii-æøåÆØÅöôêÊ字符串', ...options });\n\n/**\n * Login User\n */\nexport const putWithFormUrlEncoded = <ThrowOnError extends boolean = false>(options: Options<PutWithFormUrlEncodedData, ThrowOnError>) => (options.client ?? client).put<unknown, unknown, ThrowOnError>({\n    ...urlSearchParamsBodySerializer,\n    url: '/api/v{api-version}/non-ascii-æøåÆØÅöôêÊ字符串',\n    ...options,\n    headers: {\n        'Content-Type': 'application/x-www-form-urlencoded',\n        ...options.headers\n    }\n});\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-next/tsconfig-nodenext-sdk/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type ClientOptions = {\n    baseUrl: 'http://localhost:3000/base' | (string & {});\n};\n\n/**\n * Model with number-only name\n */\nexport type _400 = string;\n\n/**\n * External ref to shared model (A)\n */\nexport type ExternalRefA = ExternalSharedModel;\n\n/**\n * External ref to shared model (B)\n */\nexport type ExternalRefB = ExternalSharedModel;\n\n/**\n * Testing multiline comments in string: First line\n * Second line\n *\n * Fourth line\n */\nexport type CamelCaseCommentWithBreaks = number;\n\n/**\n * Testing multiline comments in string: First line\n * Second line\n *\n * Fourth line\n */\nexport type CommentWithBreaks = number;\n\n/**\n * Testing backticks in string: `backticks` and ```multiple backticks``` should work\n */\nexport type CommentWithBackticks = number;\n\n/**\n * Testing backticks and quotes in string: `backticks`, 'quotes', \"double quotes\" and ```multiple backticks``` should work\n */\nexport type CommentWithBackticksAndQuotes = number;\n\n/**\n * Testing slashes in string: \\backwards\\\\\\ and /forwards/// should work\n */\nexport type CommentWithSlashes = number;\n\n/**\n * Testing expression placeholders in string: ${expression} should work\n */\nexport type CommentWithExpressionPlaceholders = number;\n\n/**\n * Testing quotes in string: 'single quote''' and \"double quotes\"\"\" should work\n */\nexport type CommentWithQuotes = number;\n\n/**\n * Testing reserved characters in string: * inline * and ** inline ** should work\n */\nexport type CommentWithReservedCharacters = number;\n\n/**\n * This is a simple number\n */\nexport type SimpleInteger = number;\n\n/**\n * This is a simple boolean\n */\nexport type SimpleBoolean = boolean;\n\n/**\n * This is a simple string\n */\nexport type SimpleString = string;\n\n/**\n * A string with non-ascii (unicode) characters valid in typescript identifiers (æøåÆØÅöÔèÈ字符串)\n */\nexport type NonAsciiStringæøåÆøÅöôêÊ字符串 = string;\n\n/**\n * This is a simple file\n */\nexport type SimpleFile = Blob | File;\n\n/**\n * This is a simple reference\n */\nexport type SimpleReference = ModelWithString;\n\n/**\n * This is a simple string\n */\nexport type SimpleStringWithPattern = string | null;\n\n/**\n * This is a simple enum with strings\n */\nexport type EnumWithStrings = 'Success' | 'Warning' | 'Error' | '\\'Single Quote\\'' | '\"Double Quotes\"' | 'Non-ascii: øæåôöØÆÅÔÖ字符串';\n\nexport type EnumWithReplacedCharacters = '\\'Single Quote\\'' | '\"Double Quotes\"' | 'øæåôöØÆÅÔÖ字符串' | 3.1 | '';\n\n/**\n * This is a simple enum with numbers\n */\nexport type EnumWithNumbers = 1 | 2 | 3 | 1.1 | 1.2 | 1.3 | 100 | 200 | 300 | -100 | -200 | -300 | -1.1 | -1.2 | -1.3;\n\n/**\n * Success=1,Warning=2,Error=3\n */\nexport type EnumFromDescription = number;\n\n/**\n * This is a simple enum with numbers\n */\nexport type EnumWithExtensions = 200 | 400 | 500;\n\nexport type EnumWithXEnumNames = 0 | 1 | 2;\n\n/**\n * This is a simple array with numbers\n */\nexport type ArrayWithNumbers = Array<number>;\n\n/**\n * This is a simple array with booleans\n */\nexport type ArrayWithBooleans = Array<boolean>;\n\n/**\n * This is a simple array with strings\n */\nexport type ArrayWithStrings = Array<string>;\n\n/**\n * This is a simple array with references\n */\nexport type ArrayWithReferences = Array<ModelWithString>;\n\n/**\n * This is a simple array containing an array\n */\nexport type ArrayWithArray = Array<Array<ModelWithString>>;\n\n/**\n * This is a simple array with properties\n */\nexport type ArrayWithProperties = Array<{\n    '16x16'?: CamelCaseCommentWithBreaks;\n    bar?: string;\n}>;\n\n/**\n * This is a simple array with any of properties\n */\nexport type ArrayWithAnyOfProperties = Array<{\n    foo?: string;\n} | {\n    bar?: string;\n}>;\n\nexport type AnyOfAnyAndNull = {\n    data?: unknown | null;\n};\n\n/**\n * This is a simple array with any of properties\n */\nexport type AnyOfArrays = {\n    results?: Array<{\n        foo?: string;\n    } | {\n        bar?: string;\n    }>;\n};\n\n/**\n * This is a string dictionary\n */\nexport type DictionaryWithString = {\n    [key: string]: string;\n};\n\nexport type DictionaryWithPropertiesAndAdditionalProperties = {\n    foo?: number;\n    bar?: boolean;\n    [key: string]: string | number | boolean | undefined;\n};\n\n/**\n * This is a string reference\n */\nexport type DictionaryWithReference = {\n    [key: string]: ModelWithString;\n};\n\n/**\n * This is a complex dictionary\n */\nexport type DictionaryWithArray = {\n    [key: string]: Array<ModelWithString>;\n};\n\n/**\n * This is a string dictionary\n */\nexport type DictionaryWithDictionary = {\n    [key: string]: {\n        [key: string]: string;\n    };\n};\n\n/**\n * This is a complex dictionary\n */\nexport type DictionaryWithProperties = {\n    [key: string]: {\n        foo?: string;\n        bar?: string;\n    };\n};\n\n/**\n * This is a model with one number property\n */\nexport type ModelWithInteger = {\n    /**\n     * This is a simple number property\n     */\n    prop?: number;\n};\n\n/**\n * This is a model with one boolean property\n */\nexport type ModelWithBoolean = {\n    /**\n     * This is a simple boolean property\n     */\n    prop?: boolean;\n};\n\n/**\n * This is a model with one string property\n */\nexport type ModelWithString = {\n    /**\n     * This is a simple string property\n     */\n    prop?: string;\n};\n\n/**\n * This is a model with one string property\n */\nexport type ModelWithStringError = {\n    /**\n     * This is a simple string property\n     */\n    prop?: string;\n};\n\n/**\n * `Comment` or `VoiceComment`. The JSON object for adding voice comments to tickets is different. See [Adding voice comments to tickets](/documentation/ticketing/managing-tickets/adding-voice-comments-to-tickets)\n */\nexport type ModelFromZendesk = string;\n\n/**\n * This is a model with one string property\n */\nexport type ModelWithNullableString = {\n    /**\n     * This is a simple string property\n     */\n    nullableProp1?: string | null;\n    /**\n     * This is a simple string property\n     */\n    nullableRequiredProp1: string | null;\n    /**\n     * This is a simple string property\n     */\n    nullableProp2?: string | null;\n    /**\n     * This is a simple string property\n     */\n    nullableRequiredProp2: string | null;\n    /**\n     * This is a simple enum with strings\n     */\n    'foo_bar-enum'?: 'Success' | 'Warning' | 'Error' | 'ØÆÅ字符串';\n};\n\n/**\n * This is a model with one enum\n */\nexport type ModelWithEnum = {\n    /**\n     * This is a simple enum with strings\n     */\n    'foo_bar-enum'?: 'Success' | 'Warning' | 'Error' | 'ØÆÅ字符串';\n    /**\n     * These are the HTTP error code enums\n     */\n    statusCode?: '100' | '200 FOO' | '300 FOO_BAR' | '400 foo-bar' | '500 foo.bar' | '600 foo&bar';\n    /**\n     * Simple boolean enum\n     */\n    bool?: true;\n};\n\n/**\n * This is a model with one enum with escaped name\n */\nexport type ModelWithEnumWithHyphen = {\n    /**\n     * Foo-Bar-Baz-Qux\n     */\n    'foo-bar-baz-qux'?: '3.0';\n};\n\n/**\n * This is a model with one enum\n */\nexport type ModelWithEnumFromDescription = {\n    /**\n     * Success=1,Warning=2,Error=3\n     */\n    test?: number;\n};\n\n/**\n * This is a model with nested enums\n */\nexport type ModelWithNestedEnums = {\n    dictionaryWithEnum?: {\n        [key: string]: 'Success' | 'Warning' | 'Error';\n    };\n    dictionaryWithEnumFromDescription?: {\n        [key: string]: number;\n    };\n    arrayWithEnum?: Array<'Success' | 'Warning' | 'Error'>;\n    arrayWithDescription?: Array<number>;\n    /**\n     * This is a simple enum with strings\n     */\n    'foo_bar-enum'?: 'Success' | 'Warning' | 'Error' | 'ØÆÅ字符串';\n};\n\n/**\n * This is a model with one property containing a reference\n */\nexport type ModelWithReference = {\n    prop?: ModelWithProperties;\n};\n\n/**\n * This is a model with one property containing an array\n */\nexport type ModelWithArrayReadOnlyAndWriteOnly = {\n    prop?: Array<ModelWithReadOnlyAndWriteOnly>;\n    propWithFile?: Array<Blob | File>;\n    propWithNumber?: Array<number>;\n};\n\n/**\n * This is a model with one property containing an array\n */\nexport type ModelWithArray = {\n    prop?: Array<ModelWithString>;\n    propWithFile?: Array<Blob | File>;\n    propWithNumber?: Array<number>;\n};\n\n/**\n * This is a model with one property containing a dictionary\n */\nexport type ModelWithDictionary = {\n    prop?: {\n        [key: string]: string;\n    };\n};\n\n/**\n * This is a deprecated model with a deprecated property\n *\n * @deprecated\n */\nexport type DeprecatedModel = {\n    /**\n     * This is a deprecated property\n     *\n     * @deprecated\n     */\n    prop?: string;\n};\n\n/**\n * This is a model with one property containing a circular reference\n */\nexport type ModelWithCircularReference = {\n    prop?: ModelWithCircularReference;\n};\n\n/**\n * This is a model with one property with a 'one of' relationship\n */\nexport type CompositionWithOneOf = {\n    propA?: ModelWithString | ModelWithEnum | ModelWithArray | ModelWithDictionary;\n};\n\n/**\n * This is a model with one property with a 'one of' relationship where the options are not $ref\n */\nexport type CompositionWithOneOfAnonymous = {\n    propA?: {\n        propA?: string;\n    } | string | number;\n};\n\n/**\n * Circle\n */\nexport type ModelCircle = {\n    kind: string;\n    radius?: number;\n};\n\n/**\n * Square\n */\nexport type ModelSquare = {\n    kind: string;\n    sideLength?: number;\n};\n\n/**\n * This is a model with one property with a 'one of' relationship where the options are not $ref\n */\nexport type CompositionWithOneOfDiscriminator = ({\n    kind: 'circle';\n} & ModelCircle) | ({\n    kind: 'square';\n} & ModelSquare);\n\n/**\n * This is a model with one property with a 'any of' relationship\n */\nexport type CompositionWithAnyOf = {\n    propA?: ModelWithString | ModelWithEnum | ModelWithArray | ModelWithDictionary;\n};\n\n/**\n * This is a model with one property with a 'any of' relationship where the options are not $ref\n */\nexport type CompositionWithAnyOfAnonymous = {\n    propA?: {\n        propA?: string;\n    } | string | number;\n};\n\n/**\n * This is a model with nested 'any of' property with a type null\n */\nexport type CompositionWithNestedAnyAndTypeNull = {\n    propA?: Array<ModelWithDictionary | null> | Array<ModelWithArray | null>;\n};\n\nexport type _3eNum1Период = 'Bird' | 'Dog';\n\nexport type ConstValue = 'ConstValue';\n\n/**\n * This is a model with one property with a 'any of' relationship where the options are not $ref\n */\nexport type CompositionWithNestedAnyOfAndNull = {\n    /**\n     * Scopes\n     */\n    propA?: Array<_3eNum1Период | ConstValue> | null;\n};\n\n/**\n * This is a model with one property with a 'one of' relationship\n */\nexport type CompositionWithOneOfAndNullable = {\n    propA?: {\n        boolean?: boolean;\n    } | ModelWithEnum | ModelWithArray | ModelWithDictionary | null;\n};\n\n/**\n * This is a model that contains a simple dictionary within composition\n */\nexport type CompositionWithOneOfAndSimpleDictionary = {\n    propA?: boolean | {\n        [key: string]: number;\n    };\n};\n\n/**\n * This is a model that contains a dictionary of simple arrays within composition\n */\nexport type CompositionWithOneOfAndSimpleArrayDictionary = {\n    propA?: boolean | {\n        [key: string]: Array<boolean>;\n    };\n};\n\n/**\n * This is a model that contains a dictionary of complex arrays (composited) within composition\n */\nexport type CompositionWithOneOfAndComplexArrayDictionary = {\n    propA?: boolean | {\n        [key: string]: Array<number | string>;\n    };\n};\n\n/**\n * This is a model with one property with a 'all of' relationship\n */\nexport type CompositionWithAllOfAndNullable = {\n    propA?: ({\n        boolean?: boolean;\n    } & ModelWithEnum & ModelWithArray & ModelWithDictionary) | null;\n};\n\n/**\n * This is a model with one property with a 'any of' relationship\n */\nexport type CompositionWithAnyOfAndNullable = {\n    propA?: {\n        boolean?: boolean;\n    } | ModelWithEnum | ModelWithArray | ModelWithDictionary | null;\n};\n\n/**\n * This is a base model with two simple optional properties\n */\nexport type CompositionBaseModel = {\n    firstName?: string;\n    lastname?: string;\n};\n\n/**\n * This is a model that extends the base model\n */\nexport type CompositionExtendedModel = CompositionBaseModel & {\n    age: number;\n    firstName: string;\n    lastname: string;\n};\n\n/**\n * This is a model with one nested property\n */\nexport type ModelWithProperties = {\n    required: string;\n    readonly requiredAndReadOnly: string;\n    requiredAndNullable: string | null;\n    string?: string;\n    number?: number;\n    boolean?: boolean;\n    reference?: ModelWithString;\n    'property with space'?: string;\n    default?: string;\n    try?: string;\n    readonly '@namespace.string'?: string;\n    readonly '@namespace.integer'?: number;\n};\n\n/**\n * This is a model with one nested property\n */\nexport type ModelWithNestedProperties = {\n    readonly first: {\n        readonly second: {\n            readonly third: string | null;\n        } | null;\n    } | null;\n};\n\n/**\n * This is a model with duplicated properties\n */\nexport type ModelWithDuplicateProperties = {\n    prop?: ModelWithString;\n};\n\n/**\n * This is a model with ordered properties\n */\nexport type ModelWithOrderedProperties = {\n    zebra?: string;\n    apple?: string;\n    hawaii?: string;\n};\n\n/**\n * This is a model with duplicated imports\n */\nexport type ModelWithDuplicateImports = {\n    propA?: ModelWithString;\n    propB?: ModelWithString;\n    propC?: ModelWithString;\n};\n\n/**\n * This is a model that extends another model\n */\nexport type ModelThatExtends = ModelWithString & {\n    propExtendsA?: string;\n    propExtendsB?: ModelWithString;\n};\n\n/**\n * This is a model that extends another model\n */\nexport type ModelThatExtendsExtends = ModelWithString & ModelThatExtends & {\n    propExtendsC?: string;\n    propExtendsD?: ModelWithString;\n};\n\n/**\n * This is a model that contains a some patterns\n */\nexport type ModelWithPattern = {\n    key: string;\n    name: string;\n    readonly enabled?: boolean;\n    readonly modified?: string;\n    id?: string;\n    text?: string;\n    patternWithSingleQuotes?: string;\n    patternWithNewline?: string;\n    patternWithBacktick?: string;\n    patternWithUnicode?: string;\n};\n\nexport type File = {\n    /**\n     * Id\n     */\n    readonly id?: string;\n    /**\n     * Updated at\n     */\n    readonly updated_at?: string;\n    /**\n     * Created at\n     */\n    readonly created_at?: string;\n    /**\n     * Mime\n     */\n    mime: string;\n    /**\n     * File\n     */\n    readonly file?: string;\n};\n\nexport type Default = {\n    name?: string;\n};\n\nexport type Pageable = {\n    page?: number;\n    size?: number;\n    sort?: Array<string>;\n};\n\n/**\n * This is a free-form object without additionalProperties.\n */\nexport type FreeFormObjectWithoutAdditionalProperties = {\n    [key: string]: unknown;\n};\n\n/**\n * This is a free-form object with additionalProperties: true.\n */\nexport type FreeFormObjectWithAdditionalPropertiesEqTrue = {\n    [key: string]: unknown;\n};\n\n/**\n * This is a free-form object with additionalProperties: {}.\n */\nexport type FreeFormObjectWithAdditionalPropertiesEqEmptyObject = {\n    [key: string]: unknown;\n};\n\nexport type ModelWithConst = {\n    String?: 'String';\n    number?: 0;\n    null?: null;\n    withType?: 'Some string';\n};\n\n/**\n * This is a model with one property and additionalProperties: true\n */\nexport type ModelWithAdditionalPropertiesEqTrue = {\n    /**\n     * This is a simple string property\n     */\n    prop?: string;\n    [key: string]: unknown;\n};\n\nexport type NestedAnyOfArraysNullable = {\n    nullableArray?: Array<string | boolean> | null;\n};\n\nexport type CompositionWithOneOfAndProperties = ({\n    foo: SimpleParameter;\n} | {\n    bar: NonAsciiStringæøåÆøÅöôêÊ字符串;\n}) & {\n    baz: number | null;\n    qux: number;\n};\n\n/**\n * An object that can be null\n */\nexport type NullableObject = {\n    foo?: string;\n} | null;\n\n/**\n * Some % character\n */\nexport type CharactersInDescription = string;\n\nexport type ModelWithNullableObject = {\n    data?: NullableObject;\n};\n\n/**\n * An object with additional properties that can be null (anyOf ref + null)\n */\nexport type ModelWithAdditionalPropertiesRef = {\n    [key: string]: NullableObject | null;\n};\n\nexport type ModelWithOneOfEnum = {\n    foo: 'Bar';\n} | {\n    foo: 'Baz';\n} | {\n    foo: 'Qux';\n} | {\n    content: string;\n    foo: 'Quux';\n} | {\n    content: [\n        string,\n        string\n    ];\n    foo: 'Corge';\n};\n\nexport type ModelWithNestedArrayEnumsDataFoo = 'foo' | 'bar';\n\nexport type ModelWithNestedArrayEnumsDataBar = 'baz' | 'qux';\n\nexport type ModelWithNestedArrayEnumsData = {\n    foo?: Array<ModelWithNestedArrayEnumsDataFoo>;\n    bar?: Array<ModelWithNestedArrayEnumsDataBar>;\n};\n\nexport type ModelWithNestedArrayEnums = {\n    array_strings?: Array<string>;\n    data?: ModelWithNestedArrayEnumsData;\n};\n\nexport type ModelWithNestedCompositionEnums = {\n    foo?: ModelWithNestedArrayEnumsDataFoo;\n};\n\nexport type ModelWithReadOnlyAndWriteOnly = {\n    foo: string;\n    readonly bar: string;\n};\n\nexport type ModelWithConstantSizeArray = [\n    number,\n    number\n];\n\nexport type ModelWithAnyOfConstantSizeArray = [\n    number | string,\n    number | string,\n    number | string\n];\n\nexport type ModelWithPrefixItemsConstantSizeArray = [\n    ModelWithInteger,\n    number | string,\n    string\n];\n\nexport type ModelWithAnyOfConstantSizeArrayNullable = [\n    number | null | string,\n    number | null | string,\n    number | null | string\n];\n\nexport type ModelWithAnyOfConstantSizeArrayWithNSizeAndOptions = [\n    number | Import,\n    number | Import\n];\n\nexport type ModelWithAnyOfConstantSizeArrayAndIntersect = [\n    number & string,\n    number & string\n];\n\nexport type ModelWithNumericEnumUnion = {\n    /**\n     * Период\n     */\n    value?: -10 | -1 | 0 | 1 | 3 | 6 | 12;\n};\n\n/**\n * Some description with `back ticks`\n */\nexport type ModelWithBackticksInDescription = {\n    /**\n     * The template `that` should be used for parsing and importing the contents of the CSV file.\n     *\n     * <br/><p>There is one placeholder currently supported:<ul>     <li><b>${x}</b> - refers to the n-th column in the CSV file, e.g. ${1}, ${2}, ...)</li></ul><p>Example of a correct JSON template:</p>\n     * <pre>\n     * [\n     * {\n     * \"resourceType\": \"Asset\",\n     * \"identifier\": {\n     * \"name\": \"${1}\",\n     * \"domain\": {\n     * \"name\": \"${2}\",\n     * \"community\": {\n     * \"name\": \"Some Community\"\n     * }\n     * }\n     * },\n     * \"attributes\" : {\n     * \"00000000-0000-0000-0000-000000003115\" : [ {\n     * \"value\" : \"${3}\"\n     * } ],\n     * \"00000000-0000-0000-0000-000000000222\" : [ {\n     * \"value\" : \"${4}\"\n     * } ]\n     * }\n     * }\n     * ]\n     * </pre>\n     */\n    template?: string;\n};\n\nexport type ModelWithOneOfAndProperties = (SimpleParameter | NonAsciiStringæøåÆøÅöôêÊ字符串) & {\n    baz: number | null;\n    qux: number;\n};\n\n/**\n * Model used to test deduplication strategy (unused)\n */\nexport type ParameterSimpleParameterUnused = string;\n\n/**\n * Model used to test deduplication strategy\n */\nexport type PostServiceWithEmptyTagResponse = string;\n\n/**\n * Model used to test deduplication strategy\n */\nexport type PostServiceWithEmptyTagResponse2 = string;\n\n/**\n * Model used to test deduplication strategy\n */\nexport type DeleteFooData = string;\n\n/**\n * Model used to test deduplication strategy\n */\nexport type DeleteFooData2 = string;\n\n/**\n * Model with restricted keyword name\n */\nexport type Import = string;\n\nexport type SchemaWithFormRestrictedKeys = {\n    description?: string;\n    'x-enum-descriptions'?: string;\n    'x-enum-varnames'?: string;\n    'x-enumNames'?: string;\n    title?: string;\n    object?: {\n        description?: string;\n        'x-enum-descriptions'?: string;\n        'x-enum-varnames'?: string;\n        'x-enumNames'?: string;\n        title?: string;\n    };\n    array?: Array<{\n        description?: string;\n        'x-enum-descriptions'?: string;\n        'x-enum-varnames'?: string;\n        'x-enumNames'?: string;\n        title?: string;\n    }>;\n};\n\n/**\n * This schema was giving PascalCase transformations a hard time\n */\nexport type IoK8sApimachineryPkgApisMetaV1DeleteOptions = {\n    /**\n     * Must be fulfilled before a deletion is carried out. If not possible, a 409 Conflict status will be returned.\n     */\n    preconditions?: IoK8sApimachineryPkgApisMetaV1Preconditions;\n};\n\n/**\n * This schema was giving PascalCase transformations a hard time\n */\nexport type IoK8sApimachineryPkgApisMetaV1Preconditions = {\n    /**\n     * Specifies the target ResourceVersion\n     */\n    resourceVersion?: string;\n    /**\n     * Specifies the target UID.\n     */\n    uid?: string;\n};\n\nexport type AdditionalPropertiesUnknownIssue = {\n    [key: string]: string | number;\n};\n\nexport type AdditionalPropertiesUnknownIssue2 = {\n    [key: string]: string | number;\n};\n\nexport type AdditionalPropertiesUnknownIssue3 = string & {\n    entries: {\n        [key: string]: AdditionalPropertiesUnknownIssue;\n    };\n};\n\nexport type AdditionalPropertiesIntegerIssue = {\n    value: number;\n    [key: string]: number;\n};\n\nexport type OneOfAllOfIssue = ((ConstValue | GenericSchemaDuplicateIssue1SystemBoolean) & _3eNum1Период) | GenericSchemaDuplicateIssue1SystemString;\n\nexport type GenericSchemaDuplicateIssue1SystemBoolean = {\n    item?: boolean;\n    error?: string | null;\n    readonly hasError?: boolean;\n    data?: {\n        [key: string]: never;\n    };\n};\n\nexport type GenericSchemaDuplicateIssue1SystemString = {\n    item?: string | null;\n    error?: string | null;\n    readonly hasError?: boolean;\n};\n\nexport type ExternalSharedModel = {\n    id: string;\n    name?: string;\n};\n\n/**\n * This is a model with one property containing a reference\n */\nexport type ModelWithReferenceWritable = {\n    prop?: ModelWithPropertiesWritable;\n};\n\n/**\n * This is a model with one property containing an array\n */\nexport type ModelWithArrayReadOnlyAndWriteOnlyWritable = {\n    prop?: Array<ModelWithReadOnlyAndWriteOnlyWritable>;\n    propWithFile?: Array<Blob | File>;\n    propWithNumber?: Array<number>;\n};\n\n/**\n * This is a model with one nested property\n */\nexport type ModelWithPropertiesWritable = {\n    required: string;\n    requiredAndNullable: string | null;\n    string?: string;\n    number?: number;\n    boolean?: boolean;\n    reference?: ModelWithString;\n    'property with space'?: string;\n    default?: string;\n    try?: string;\n};\n\n/**\n * This is a model that contains a some patterns\n */\nexport type ModelWithPatternWritable = {\n    key: string;\n    name: string;\n    id?: string;\n    text?: string;\n    patternWithSingleQuotes?: string;\n    patternWithNewline?: string;\n    patternWithBacktick?: string;\n    patternWithUnicode?: string;\n};\n\nexport type FileWritable = {\n    /**\n     * Mime\n     */\n    mime: string;\n};\n\nexport type ModelWithReadOnlyAndWriteOnlyWritable = {\n    foo: string;\n    baz: string;\n};\n\nexport type ModelWithAnyOfConstantSizeArrayWithNSizeAndOptionsWritable = [\n    number | Import,\n    number | Import\n];\n\nexport type AdditionalPropertiesUnknownIssueWritable = {\n    [key: string]: string | number;\n};\n\nexport type OneOfAllOfIssueWritable = ((ConstValue | GenericSchemaDuplicateIssue1SystemBoolean) & _3eNum1Период) | GenericSchemaDuplicateIssue1SystemString;\n\nexport type GenericSchemaDuplicateIssue1SystemBooleanWritable = {\n    item?: boolean;\n    error?: string | null;\n    data?: {\n        [key: string]: never;\n    };\n};\n\nexport type GenericSchemaDuplicateIssue1SystemStringWritable = {\n    item?: string | null;\n    error?: string | null;\n};\n\n/**\n * This is a reusable parameter\n */\nexport type SimpleParameter = string;\n\n/**\n * Parameter with illegal characters\n */\nexport type XFooBar = ModelWithString;\n\n/**\n * A reusable request body\n */\nexport type SimpleRequestBody = ModelWithString;\n\n/**\n * A reusable request body\n */\nexport type SimpleFormData = ModelWithString;\n\nexport type ExportData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no+tag';\n};\n\nexport type PatchApiVbyApiVersionNoTagData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no+tag';\n};\n\nexport type PatchApiVbyApiVersionNoTagResponses = {\n    /**\n     * OK\n     */\n    default: unknown;\n};\n\nexport type ImportData = {\n    body: ModelWithReadOnlyAndWriteOnlyWritable | ModelWithArrayReadOnlyAndWriteOnlyWritable;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no+tag';\n};\n\nexport type ImportResponses = {\n    /**\n     * Success\n     */\n    200: ModelFromZendesk;\n    /**\n     * Default success response\n     */\n    default: ModelWithReadOnlyAndWriteOnly;\n};\n\nexport type ImportResponse = ImportResponses[keyof ImportResponses];\n\nexport type FooWowData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no+tag';\n};\n\nexport type FooWowResponses = {\n    /**\n     * OK\n     */\n    default: unknown;\n};\n\nexport type ApiVVersionODataControllerCountData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple/$count';\n};\n\nexport type ApiVVersionODataControllerCountResponses = {\n    /**\n     * Success\n     */\n    200: ModelFromZendesk;\n};\n\nexport type ApiVVersionODataControllerCountResponse = ApiVVersionODataControllerCountResponses[keyof ApiVVersionODataControllerCountResponses];\n\nexport type GetApiVbyApiVersionSimpleOperationData = {\n    body?: never;\n    path: {\n        /**\n         * foo in method\n         */\n        foo_param: string;\n    };\n    query?: never;\n    url: '/api/v{api-version}/simple:operation';\n};\n\nexport type GetApiVbyApiVersionSimpleOperationErrors = {\n    /**\n     * Default error response\n     */\n    default: ModelWithBoolean;\n};\n\nexport type GetApiVbyApiVersionSimpleOperationError = GetApiVbyApiVersionSimpleOperationErrors[keyof GetApiVbyApiVersionSimpleOperationErrors];\n\nexport type GetApiVbyApiVersionSimpleOperationResponses = {\n    /**\n     * Response is a simple number\n     */\n    200: number;\n};\n\nexport type GetApiVbyApiVersionSimpleOperationResponse = GetApiVbyApiVersionSimpleOperationResponses[keyof GetApiVbyApiVersionSimpleOperationResponses];\n\nexport type DeleteCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type GetCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type HeadCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type OptionsCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type PatchCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type PostCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type PutCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type DeleteFooData3 = {\n    body?: never;\n    headers: {\n        /**\n         * Parameter with illegal characters\n         */\n        'x-Foo-Bar': ModelWithString;\n    };\n    path: {\n        /**\n         * foo in method\n         */\n        foo_param: string;\n        /**\n         * bar in method\n         */\n        BarParam: string;\n    };\n    query?: never;\n    url: '/api/v{api-version}/foo/{foo_param}/bar/{BarParam}';\n};\n\nexport type CallWithDescriptionsData = {\n    body?: never;\n    path?: never;\n    query?: {\n        /**\n         * Testing multiline comments in string: First line\n         * Second line\n         *\n         * Fourth line\n         */\n        parameterWithBreaks?: string;\n        /**\n         * Testing backticks in string: `backticks` and ```multiple backticks``` should work\n         */\n        parameterWithBackticks?: string;\n        /**\n         * Testing slashes in string: \\backwards\\\\\\ and /forwards/// should work\n         */\n        parameterWithSlashes?: string;\n        /**\n         * Testing expression placeholders in string: ${expression} should work\n         */\n        parameterWithExpressionPlaceholders?: string;\n        /**\n         * Testing quotes in string: 'single quote''' and \"double quotes\"\"\" should work\n         */\n        parameterWithQuotes?: string;\n        /**\n         * Testing reserved characters in string: * inline * and ** inline ** should work\n         */\n        parameterWithReservedCharacters?: string;\n    };\n    url: '/api/v{api-version}/descriptions';\n};\n\nexport type DeprecatedCallData = {\n    body?: never;\n    headers: {\n        /**\n         * This parameter is deprecated\n         *\n         * @deprecated\n         */\n        parameter: DeprecatedModel | null;\n    };\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/parameters/deprecated';\n};\n\nexport type CallWithParametersData = {\n    /**\n     * This is the parameter that goes into the body\n     */\n    body: {\n        [key: string]: unknown;\n    } | null;\n    headers: {\n        /**\n         * This is the parameter that goes into the header\n         */\n        parameterHeader: string | null;\n    };\n    path: {\n        /**\n         * This is the parameter that goes into the path\n         */\n        parameterPath: string | null;\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string | null;\n    };\n    query: {\n        foo_ref_enum?: ModelWithNestedArrayEnumsDataFoo;\n        foo_all_of_enum: ModelWithNestedArrayEnumsDataFoo;\n        /**\n         * This is the parameter that goes into the query params\n         */\n        cursor: string | null;\n    };\n    url: '/api/v{api-version}/parameters/{parameterPath}';\n};\n\nexport type CallWithWeirdParameterNamesData = {\n    /**\n     * This is the parameter that goes into the body\n     */\n    body: ModelWithString | null;\n    headers: {\n        /**\n         * This is the parameter that goes into the request header\n         */\n        'parameter.header': string | null;\n    };\n    path: {\n        /**\n         * This is the parameter that goes into the path\n         */\n        'parameter.path.1'?: string;\n        /**\n         * This is the parameter that goes into the path\n         */\n        'parameter-path-2'?: string;\n        /**\n         * This is the parameter that goes into the path\n         */\n        'PARAMETER-PATH-3'?: string;\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string | null;\n    };\n    query: {\n        /**\n         * This is the parameter with a reserved keyword\n         */\n        default?: string;\n        /**\n         * This is the parameter that goes into the request query params\n         */\n        'parameter-query': string | null;\n    };\n    url: '/api/v{api-version}/parameters/{parameter.path.1}/{parameter-path-2}/{PARAMETER-PATH-3}';\n};\n\nexport type GetCallWithOptionalParamData = {\n    /**\n     * This is a required parameter\n     */\n    body: ModelWithOneOfEnum;\n    path?: never;\n    query?: {\n        /**\n         * This is an optional parameter\n         */\n        page?: number;\n    };\n    url: '/api/v{api-version}/parameters';\n};\n\nexport type PostCallWithOptionalParamData = {\n    /**\n     * This is an optional parameter\n     */\n    body?: {\n        offset?: number | null;\n    };\n    path?: never;\n    query: {\n        /**\n         * This is a required parameter\n         */\n        parameter: Pageable;\n    };\n    url: '/api/v{api-version}/parameters';\n};\n\nexport type PostCallWithOptionalParamResponses = {\n    /**\n     * Response is a simple number\n     */\n    200: number;\n    /**\n     * Success\n     */\n    204: void;\n};\n\nexport type PostCallWithOptionalParamResponse = PostCallWithOptionalParamResponses[keyof PostCallWithOptionalParamResponses];\n\nexport type PostApiVbyApiVersionRequestBodyData = {\n    /**\n     * A reusable request body\n     */\n    body?: SimpleRequestBody;\n    path?: never;\n    query?: {\n        /**\n         * This is a reusable parameter\n         */\n        parameter?: string;\n    };\n    url: '/api/v{api-version}/requestBody';\n};\n\nexport type PostApiVbyApiVersionFormDataData = {\n    /**\n     * A reusable request body\n     */\n    body?: SimpleFormData;\n    path?: never;\n    query?: {\n        /**\n         * This is a reusable parameter\n         */\n        parameter?: string;\n    };\n    url: '/api/v{api-version}/formData';\n};\n\nexport type CallWithDefaultParametersData = {\n    body?: never;\n    path?: never;\n    query?: {\n        /**\n         * This is a simple string with default value\n         */\n        parameterString?: string | null;\n        /**\n         * This is a simple number with default value\n         */\n        parameterNumber?: number | null;\n        /**\n         * This is a simple boolean with default value\n         */\n        parameterBoolean?: boolean | null;\n        /**\n         * This is a simple enum with default value\n         */\n        parameterEnum?: 'Success' | 'Warning' | 'Error';\n        /**\n         * This is a simple model with default value\n         */\n        parameterModel?: ModelWithString | null;\n    };\n    url: '/api/v{api-version}/defaults';\n};\n\nexport type CallWithDefaultOptionalParametersData = {\n    body?: never;\n    path?: never;\n    query?: {\n        /**\n         * This is a simple string that is optional with default value\n         */\n        parameterString?: string;\n        /**\n         * This is a simple number that is optional with default value\n         */\n        parameterNumber?: number;\n        /**\n         * This is a simple boolean that is optional with default value\n         */\n        parameterBoolean?: boolean;\n        /**\n         * This is a simple enum that is optional with default value\n         */\n        parameterEnum?: 'Success' | 'Warning' | 'Error';\n        /**\n         * This is a simple model that is optional with default value\n         */\n        parameterModel?: ModelWithString;\n    };\n    url: '/api/v{api-version}/defaults';\n};\n\nexport type CallToTestOrderOfParamsData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * This is a optional string with default\n         */\n        parameterOptionalStringWithDefault?: string;\n        /**\n         * This is a optional string with empty default\n         */\n        parameterOptionalStringWithEmptyDefault?: string;\n        /**\n         * This is a optional string with no default\n         */\n        parameterOptionalStringWithNoDefault?: string;\n        /**\n         * This is a string with default\n         */\n        parameterStringWithDefault: string;\n        /**\n         * This is a string with empty default\n         */\n        parameterStringWithEmptyDefault: string;\n        /**\n         * This is a string with no default\n         */\n        parameterStringWithNoDefault: string;\n        /**\n         * This is a string that can be null with no default\n         */\n        parameterStringNullableWithNoDefault?: string | null;\n        /**\n         * This is a string that can be null with default\n         */\n        parameterStringNullableWithDefault?: string | null;\n    };\n    url: '/api/v{api-version}/defaults';\n};\n\nexport type DuplicateNameData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/duplicate';\n};\n\nexport type DuplicateName2Data = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/duplicate';\n};\n\nexport type DuplicateName3Data = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/duplicate';\n};\n\nexport type DuplicateName4Data = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/duplicate';\n};\n\nexport type CallWithNoContentResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no-content';\n};\n\nexport type CallWithNoContentResponseResponses = {\n    /**\n     * Success\n     */\n    204: void;\n};\n\nexport type CallWithNoContentResponseResponse = CallWithNoContentResponseResponses[keyof CallWithNoContentResponseResponses];\n\nexport type CallWithResponseAndNoContentResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multiple-tags/response-and-no-content';\n};\n\nexport type CallWithResponseAndNoContentResponseResponses = {\n    /**\n     * Response is a simple number\n     */\n    200: number;\n    /**\n     * Success\n     */\n    204: void;\n};\n\nexport type CallWithResponseAndNoContentResponseResponse = CallWithResponseAndNoContentResponseResponses[keyof CallWithResponseAndNoContentResponseResponses];\n\nexport type DummyAData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multiple-tags/a';\n};\n\nexport type DummyAResponses = {\n    200: _400;\n};\n\nexport type DummyAResponse = DummyAResponses[keyof DummyAResponses];\n\nexport type DummyBData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multiple-tags/b';\n};\n\nexport type DummyBResponses = {\n    /**\n     * Success\n     */\n    204: void;\n};\n\nexport type DummyBResponse = DummyBResponses[keyof DummyBResponses];\n\nexport type CallWithResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/response';\n};\n\nexport type CallWithResponseResponses = {\n    default: Import;\n};\n\nexport type CallWithResponseResponse = CallWithResponseResponses[keyof CallWithResponseResponses];\n\nexport type CallWithDuplicateResponsesData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/response';\n};\n\nexport type CallWithDuplicateResponsesErrors = {\n    /**\n     * Message for 500 error\n     */\n    500: ModelWithStringError;\n    /**\n     * Message for 501 error\n     */\n    501: ModelWithStringError;\n    /**\n     * Message for 502 error\n     */\n    502: ModelWithStringError;\n    /**\n     * Message for 4XX errors\n     */\n    '4XX': DictionaryWithArray;\n    /**\n     * Default error response\n     */\n    default: ModelWithBoolean;\n};\n\nexport type CallWithDuplicateResponsesError = CallWithDuplicateResponsesErrors[keyof CallWithDuplicateResponsesErrors];\n\nexport type CallWithDuplicateResponsesResponses = {\n    /**\n     * Message for 200 response\n     */\n    200: ModelWithBoolean & ModelWithInteger;\n    /**\n     * Message for 201 response\n     */\n    201: ModelWithString;\n    /**\n     * Message for 202 response\n     */\n    202: ModelWithString;\n};\n\nexport type CallWithDuplicateResponsesResponse = CallWithDuplicateResponsesResponses[keyof CallWithDuplicateResponsesResponses];\n\nexport type CallWithResponsesData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/response';\n};\n\nexport type CallWithResponsesErrors = {\n    /**\n     * Message for 500 error\n     */\n    500: ModelWithStringError;\n    /**\n     * Message for 501 error\n     */\n    501: ModelWithStringError;\n    /**\n     * Message for 502 error\n     */\n    502: ModelWithStringError;\n    /**\n     * Message for default response\n     */\n    default: ModelWithStringError;\n};\n\nexport type CallWithResponsesError = CallWithResponsesErrors[keyof CallWithResponsesErrors];\n\nexport type CallWithResponsesResponses = {\n    /**\n     * Message for 200 response\n     */\n    200: {\n        readonly '@namespace.string'?: string;\n        readonly '@namespace.integer'?: number;\n        readonly value?: Array<ModelWithString>;\n    };\n    /**\n     * Message for 201 response\n     */\n    201: ModelThatExtends;\n    /**\n     * Message for 202 response\n     */\n    202: ModelThatExtendsExtends;\n};\n\nexport type CallWithResponsesResponse = CallWithResponsesResponses[keyof CallWithResponsesResponses];\n\nexport type CollectionFormatData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * This is an array parameter that is sent as csv format (comma-separated values)\n         */\n        parameterArrayCSV: Array<string> | null;\n        /**\n         * This is an array parameter that is sent as ssv format (space-separated values)\n         */\n        parameterArraySSV: Array<string> | null;\n        /**\n         * This is an array parameter that is sent as tsv format (tab-separated values)\n         */\n        parameterArrayTSV: Array<string> | null;\n        /**\n         * This is an array parameter that is sent as pipes format (pipe-separated values)\n         */\n        parameterArrayPipes: Array<string> | null;\n        /**\n         * This is an array parameter that is sent as multi format (multiple parameter instances)\n         */\n        parameterArrayMulti: Array<string> | null;\n    };\n    url: '/api/v{api-version}/collectionFormat';\n};\n\nexport type TypesData = {\n    body?: never;\n    path?: {\n        /**\n         * This is a number parameter\n         */\n        id?: number;\n    };\n    query: {\n        /**\n         * This is a number parameter\n         */\n        parameterNumber: number;\n        /**\n         * This is a string parameter\n         */\n        parameterString: string | null;\n        /**\n         * This is a boolean parameter\n         */\n        parameterBoolean: boolean | null;\n        /**\n         * This is an object parameter\n         */\n        parameterObject: {\n            [key: string]: unknown;\n        } | null;\n        /**\n         * This is an array parameter\n         */\n        parameterArray: Array<string> | null;\n        /**\n         * This is a dictionary parameter\n         */\n        parameterDictionary: {\n            [key: string]: unknown;\n        } | null;\n        /**\n         * This is an enum parameter\n         */\n        parameterEnum: 'Success' | 'Warning' | 'Error' | null;\n    };\n    url: '/api/v{api-version}/types';\n};\n\nexport type TypesResponses = {\n    /**\n     * Response is a simple number\n     */\n    200: number;\n    /**\n     * Response is a simple string\n     */\n    201: string;\n    /**\n     * Response is a simple boolean\n     */\n    202: boolean;\n    /**\n     * Response is a simple object\n     */\n    203: {\n        [key: string]: unknown;\n    };\n};\n\nexport type TypesResponse = TypesResponses[keyof TypesResponses];\n\nexport type UploadFileData = {\n    body: Blob | File;\n    path: {\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string | null;\n    };\n    query?: never;\n    url: '/api/v{api-version}/upload';\n};\n\nexport type UploadFileResponses = {\n    200: boolean;\n};\n\nexport type UploadFileResponse = UploadFileResponses[keyof UploadFileResponses];\n\nexport type FileResponseData = {\n    body?: never;\n    path: {\n        id: string;\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string;\n    };\n    query?: never;\n    url: '/api/v{api-version}/file/{id}';\n};\n\nexport type FileResponseResponses = {\n    /**\n     * Success\n     */\n    200: Blob | File;\n};\n\nexport type FileResponseResponse = FileResponseResponses[keyof FileResponseResponses];\n\nexport type ComplexTypesData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * Parameter containing object\n         */\n        parameterObject: {\n            first?: {\n                second?: {\n                    third?: string;\n                };\n            };\n        };\n        /**\n         * Parameter containing reference\n         */\n        parameterReference: ModelWithString;\n    };\n    url: '/api/v{api-version}/complex';\n};\n\nexport type ComplexTypesErrors = {\n    /**\n     * 400 `server` error\n     */\n    400: unknown;\n    /**\n     * 500 server error\n     */\n    500: unknown;\n};\n\nexport type ComplexTypesResponses = {\n    /**\n     * Successful response\n     */\n    200: Array<ModelWithString>;\n};\n\nexport type ComplexTypesResponse = ComplexTypesResponses[keyof ComplexTypesResponses];\n\nexport type MultipartResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multipart';\n};\n\nexport type MultipartResponseResponses = {\n    /**\n     * OK\n     */\n    200: {\n        file?: Blob | File;\n        metadata?: {\n            foo?: string;\n            bar?: string;\n        };\n    };\n};\n\nexport type MultipartResponseResponse = MultipartResponseResponses[keyof MultipartResponseResponses];\n\nexport type MultipartRequestData = {\n    body?: {\n        content?: Blob | File;\n        data?: ModelWithString | null;\n    };\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multipart';\n};\n\nexport type ComplexParamsData = {\n    body?: {\n        readonly key: string | null;\n        name: string | null;\n        enabled?: boolean;\n        type: 'Monkey' | 'Horse' | 'Bird';\n        listOfModels?: Array<ModelWithString> | null;\n        listOfStrings?: Array<string> | null;\n        parameters: ModelWithString | ModelWithEnum | ModelWithArray | ModelWithDictionary;\n        readonly user?: {\n            readonly id?: number;\n            readonly name?: string | null;\n        };\n    };\n    path: {\n        id: number;\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string;\n    };\n    query?: never;\n    url: '/api/v{api-version}/complex/{id}';\n};\n\nexport type ComplexParamsResponses = {\n    /**\n     * Success\n     */\n    200: ModelWithString;\n};\n\nexport type ComplexParamsResponse = ComplexParamsResponses[keyof ComplexParamsResponses];\n\nexport type CallWithResultFromHeaderData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/header';\n};\n\nexport type CallWithResultFromHeaderErrors = {\n    /**\n     * 400 server error\n     */\n    400: unknown;\n    /**\n     * 500 server error\n     */\n    500: unknown;\n};\n\nexport type CallWithResultFromHeaderResponses = {\n    /**\n     * Successful response\n     */\n    200: unknown;\n};\n\nexport type TestErrorCodeData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * Status code to return\n         */\n        status: number;\n    };\n    url: '/api/v{api-version}/error';\n};\n\nexport type TestErrorCodeErrors = {\n    /**\n     * Custom message: Internal Server Error\n     */\n    500: unknown;\n    /**\n     * Custom message: Not Implemented\n     */\n    501: unknown;\n    /**\n     * Custom message: Bad Gateway\n     */\n    502: unknown;\n    /**\n     * Custom message: Service Unavailable\n     */\n    503: unknown;\n};\n\nexport type TestErrorCodeResponses = {\n    /**\n     * Custom message: Successful response\n     */\n    200: unknown;\n};\n\nexport type NonAsciiæøåÆøÅöôêÊ字符串Data = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * Dummy input param\n         */\n        nonAsciiParamæøåÆØÅöôêÊ: number;\n    };\n    url: '/api/v{api-version}/non-ascii-æøåÆØÅöôêÊ字符串';\n};\n\nexport type NonAsciiæøåÆøÅöôêÊ字符串Responses = {\n    /**\n     * Successful response\n     */\n    200: Array<NonAsciiStringæøåÆøÅöôêÊ字符串>;\n};\n\nexport type NonAsciiæøåÆøÅöôêÊ字符串Response = NonAsciiæøåÆøÅöôêÊ字符串Responses[keyof NonAsciiæøåÆøÅöôêÊ字符串Responses];\n\nexport type PutWithFormUrlEncodedData = {\n    body: ArrayWithStrings;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/non-ascii-æøåÆØÅöôêÊ字符串';\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-nuxt/base-url-false/client/client.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport { useAsyncData, useFetch, useLazyAsyncData, useLazyFetch } from 'nuxt/app';\nimport { reactive, ref, toValue, watch } from 'vue';\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 } from './types.gen';\nimport {\n  buildUrl,\n  createConfig,\n  executeFetchFn,\n  mergeConfigs,\n  mergeHeaders,\n  mergeInterceptors,\n  serializeBody,\n  setAuthParams,\n  unwrapRefs,\n} from './utils.gen';\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 beforeRequest = async (options: RequestOptions) => {\n    const opts = {\n      ..._config,\n      ...options,\n      $fetch: options.$fetch ?? _config.$fetch ?? $fetch,\n      headers: mergeHeaders(_config.headers, options.headers),\n      onRequest: mergeInterceptors(_config.onRequest, options.onRequest),\n      onResponse: mergeInterceptors(_config.onResponse, options.onResponse),\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    const url = buildUrl(opts);\n\n    return { opts, url };\n  };\n\n  const request: Client['request'] = ({ asyncDataOptions, composable = '$fetch', ...options }) => {\n    const key = options.key;\n    const opts = {\n      ..._config,\n      ...options,\n      $fetch: options.$fetch ?? _config.$fetch ?? $fetch,\n      headers: mergeHeaders(_config.headers, options.headers),\n      onRequest: mergeInterceptors(_config.onRequest, options.onRequest),\n      onResponse: mergeInterceptors(_config.onResponse, options.onResponse),\n    };\n\n    const { requestValidator, responseTransformer, responseValidator, security } = opts;\n    if (requestValidator || security) {\n      // auth must happen in interceptors otherwise we'd need to require\n      // asyncContext enabled\n      // https://nuxt.com/docs/guide/going-further/experimental-features#asynccontext\n      opts.onRequest = [\n        async ({ options }) => {\n          if (security) {\n            await setAuthParams({\n              auth: opts.auth,\n              headers: options.headers,\n              query: options.query,\n              security,\n            });\n          }\n\n          if (requestValidator) {\n            await requestValidator({\n              ...options,\n              // @ts-expect-error\n              body: options.rawBody,\n            });\n          }\n        },\n        ...opts.onRequest,\n      ];\n    }\n\n    if (responseTransformer || responseValidator) {\n      opts.onResponse = [\n        ...opts.onResponse,\n        async ({ options, response }) => {\n          if (options.responseType && options.responseType !== 'json') {\n            return;\n          }\n\n          if (!response.ok) {\n            return;\n          }\n\n          if (responseValidator) {\n            await responseValidator(response._data);\n          }\n\n          if (responseTransformer) {\n            response._data = await responseTransformer(response._data);\n          }\n        },\n      ];\n    }\n\n    // remove Content-Type header if body is empty to avoid sending invalid requests\n    if (opts.body === undefined || opts.body === '') {\n      opts.headers.delete('Content-Type');\n    }\n\n    const fetchFn = opts.$fetch;\n\n    if (composable === '$fetch') {\n      return executeFetchFn(\n        // @ts-expect-error\n        opts,\n        fetchFn,\n      );\n    }\n\n    if (composable === 'useFetch' || composable === 'useLazyFetch') {\n      opts.rawBody = opts.body;\n      const bodyParams = reactive({\n        body: opts.body,\n        bodySerializer: opts.bodySerializer,\n      });\n      const body = ref(serializeBody({ ...opts, body: toValue(opts.body) }));\n      opts.body = body;\n      watch(bodyParams, (changed) => {\n        body.value = serializeBody(changed);\n      });\n      return composable === 'useLazyFetch'\n        ? useLazyFetch(() => buildUrl(opts), { ...opts, ...asyncDataOptions })\n        : useFetch(() => buildUrl(opts), { ...opts, ...asyncDataOptions });\n    }\n\n    const handler: any = () =>\n      executeFetchFn(\n        // @ts-expect-error\n        opts,\n        fetchFn,\n      );\n\n    if (composable === 'useAsyncData') {\n      return key\n        ? useAsyncData(key, handler, asyncDataOptions)\n        : useAsyncData(handler, asyncDataOptions);\n    }\n\n    if (composable === 'useLazyAsyncData') {\n      return key\n        ? useLazyAsyncData(key, handler, asyncDataOptions)\n        : useLazyAsyncData(handler, asyncDataOptions);\n    }\n\n    return undefined as any;\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      ...unwrapRefs(opts),\n      body: opts.body as BodyInit | null | undefined,\n      method,\n      onRequest: undefined,\n      serializedBody: getValidRequestBody(opts) as BodyInit | null | undefined,\n      signal: unwrapRefs(opts.signal) as AbortSignal,\n      url,\n    });\n  };\n\n  const _buildUrl: Client['buildUrl'] = (options) =>\n    buildUrl({ ..._config, ...options } as typeof 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    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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-nuxt/base-url-false/client/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type { Auth } from '../core/auth.gen';\nexport type { QuerySerializerOptions } from '../core/bodySerializer.gen';\nexport {\n  formDataBodySerializer,\n  jsonBodySerializer,\n  urlSearchParamsBodySerializer,\n} from '../core/bodySerializer.gen';\nexport { buildClientParams } from '../core/params.gen';\nexport { serializeQueryKeyValue } from '../core/queryKeySerializer.gen';\nexport { createClient } from './client.gen';\nexport type {\n  Client,\n  ClientOptions,\n  Composable,\n  Config,\n  CreateClientConfig,\n  Options,\n  RequestOptions,\n  RequestResult,\n  TDataShape,\n} from './types.gen';\nexport { createConfig } from './utils.gen';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-nuxt/base-url-false/client/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type {\n  AsyncDataOptions,\n  useAsyncData,\n  useFetch,\n  UseFetchOptions,\n  useLazyAsyncData,\n  useLazyFetch,\n} from 'nuxt/app';\nimport type { Ref } from 'vue';\n\nimport type { Auth } from '../core/auth.gen';\nimport type { QuerySerializerOptions } from '../core/bodySerializer.gen';\nimport type {\n  ServerSentEventsOptions,\n  ServerSentEventsResult,\n} from '../core/serverSentEvents.gen';\nimport type { Client as CoreClient, Config as CoreConfig } from '../core/types.gen';\n\nexport type ArraySeparatorStyle = ArrayStyle | MatrixStyle;\ntype ArrayStyle = 'form' | 'spaceDelimited' | 'pipeDelimited';\ntype MatrixStyle = 'label' | 'matrix' | 'simple';\nexport type ObjectSeparatorStyle = ObjectStyle | MatrixStyle;\ntype ObjectStyle = 'form' | 'deepObject';\n\nexport type QuerySerializer = (query: Parameters<Client['buildUrl']>[0]['query']) => string;\n\ntype WithRefs<TData> = {\n  [K in keyof TData]: NonNullable<TData[K]> extends object\n    ? WithRefs<NonNullable<TData[K]>> | Ref<NonNullable<TData[K]>> | Extract<TData[K], null>\n    : NonNullable<TData[K]> | Ref<NonNullable<TData[K]>> | Extract<TData[K], null>;\n};\n\n// copied from Nuxt\nexport type KeysOf<T> = Array<T extends T ? (keyof T extends string ? keyof T : never) : never>;\n\nexport interface Config<T extends ClientOptions = ClientOptions>\n  extends\n    Omit<FetchOptions<unknown>, 'baseURL' | 'body' | 'headers' | 'method' | 'query'>,\n    WithRefs<Pick<FetchOptions<unknown>, 'query'>>,\n    Omit<CoreConfig, 'querySerializer'> {\n  /**\n   * Base URL for all requests made by this client.\n   */\n  baseURL?: T['baseURL'];\n  /**\n   * A function for serializing request query parameters. By default, arrays\n   * will be exploded in form style, objects will be exploded in deepObject\n   * style, and reserved characters are percent-encoded.\n   *\n   * {@link https://swagger.io/docs/specification/serialization/#query View examples}\n   */\n  querySerializer?: QuerySerializer | QuerySerializerOptions;\n}\n\nexport interface RequestOptions<\n  TComposable extends Composable = '$fetch',\n  ResT = unknown,\n  DefaultT = undefined,\n  Url extends string = string,\n>\n  extends\n    Config,\n    WithRefs<{\n      path?: FetchOptions<unknown>['query'];\n      query?: FetchOptions<unknown>['query'];\n    }>,\n    Pick<\n      ServerSentEventsOptions<ResT>,\n      | 'onSseError'\n      | 'onSseEvent'\n      | 'sseDefaultRetryDelay'\n      | 'sseMaxRetryAttempts'\n      | 'sseMaxRetryDelay'\n    > {\n  asyncDataOptions?: AsyncDataOptions<ResT, ResT, KeysOf<ResT>, DefaultT>;\n  /**\n   * Any body that you want to add to your request.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/fetch#body}\n   */\n  body?: NonNullable<unknown> | Ref<NonNullable<unknown>> | null;\n  composable?: TComposable;\n  key?: string;\n  rawBody?: NonNullable<unknown> | Ref<NonNullable<unknown>> | null;\n  /**\n   * Security mechanism(s) to use for the request.\n   */\n  security?: ReadonlyArray<Auth>;\n  url: Url;\n}\n\nexport type RequestResult<\n  TComposable extends Composable,\n  ResT,\n  TError,\n> = TComposable extends '$fetch'\n  ? ReturnType<typeof $fetch<ResT>>\n  : TComposable extends 'useAsyncData'\n    ? ReturnType<typeof useAsyncData<ResT | null, TError>>\n    : TComposable extends 'useFetch'\n      ? ReturnType<typeof useFetch<ResT | null, TError>>\n      : TComposable extends 'useLazyAsyncData'\n        ? ReturnType<typeof useLazyAsyncData<ResT | null, TError>>\n        : TComposable extends 'useLazyFetch'\n          ? ReturnType<typeof useLazyFetch<ResT | null, TError>>\n          : never;\n\nexport interface ClientOptions {\n  baseURL?: string;\n}\n\ntype MethodFn = <\n  TComposable extends Composable = '$fetch',\n  ResT = unknown,\n  TError = unknown,\n  DefaultT = undefined,\n>(\n  options: Omit<RequestOptions<TComposable, ResT, DefaultT>, 'method'>,\n) => RequestResult<TComposable, ResT, TError>;\n\ntype SseFn = <\n  TComposable extends Composable = '$fetch',\n  ResT = unknown,\n  TError = unknown,\n  DefaultT = undefined,\n>(\n  options: Omit<RequestOptions<TComposable, ResT, DefaultT>, 'method'>,\n) => Promise<ServerSentEventsResult<RequestResult<TComposable, ResT, TError>>>;\n\ntype RequestFn = <\n  TComposable extends Composable = '$fetch',\n  ResT = unknown,\n  TError = unknown,\n  DefaultT = undefined,\n>(\n  options: Omit<RequestOptions<TComposable, ResT, DefaultT>, 'method'> &\n    Pick<Required<RequestOptions<TComposable, ResT, DefaultT>>, 'method'>,\n) => RequestResult<TComposable, ResT, TError>;\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 = ClientOptions> = (\n  override?: Config<ClientOptions & T>,\n) => Config<Required<ClientOptions> & T>;\n\nexport interface TDataShape {\n  body?: unknown;\n  headers?: unknown;\n  path?: FetchOptions<unknown>['query'];\n  query?: FetchOptions<unknown>['query'];\n  url: string;\n}\n\nexport type BuildUrlOptions<\n  TData extends Omit<TDataShape, 'headers'> = Omit<TDataShape, 'headers'>,\n> = Pick<WithRefs<TData>, 'path' | 'query'> &\n  Pick<TData, 'url'> &\n  Pick<Options<'$fetch', TData>, 'baseURL' | 'querySerializer'>;\n\ntype BuildUrlFn = <TData extends Omit<TDataShape, 'headers'>>(\n  options: BuildUrlOptions<TData>,\n) => string;\n\nexport type Client = CoreClient<RequestFn, Config, MethodFn, BuildUrlFn, SseFn>;\n\ntype OmitKeys<T, K> = Pick<T, Exclude<keyof T, K>>;\n\nexport type Options<\n  TComposable extends Composable = '$fetch',\n  TData extends TDataShape = TDataShape,\n  ResT = unknown,\n  DefaultT = undefined,\n> = OmitKeys<RequestOptions<TComposable, ResT, DefaultT>, 'body' | 'path' | 'query' | 'url'> &\n  ([TData] extends [never] ? unknown : WithRefs<Omit<TData, 'url'>>);\n\ntype FetchOptions<TData> = Omit<UseFetchOptions<TData, TData>, keyof AsyncDataOptions<TData>>;\n\nexport type Composable =\n  | '$fetch'\n  | 'useAsyncData'\n  | 'useFetch'\n  | 'useLazyAsyncData'\n  | 'useLazyFetch';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-nuxt/base-url-false/client/utils.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { ComputedRef, Ref } from 'vue';\nimport { isRef, toValue, unref } from 'vue';\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 type {\n  ArraySeparatorStyle,\n  BuildUrlOptions,\n  Client,\n  ClientOptions,\n  Config,\n  QuerySerializer,\n  RequestOptions,\n} from './types.gen';\n\ntype PathSerializer = Pick<Required<BuildUrlOptions>, 'path' | 'url'>;\n\nconst PATH_PARAM_RE = /\\{[^{}]+\\}/g;\n\ntype MaybeArray<T> = T | T[];\n\nconst 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 = toValue((toValue(path) as Record<string, unknown> | undefined)?.[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 createQuerySerializer = <T = unknown>({\n  parameters = {},\n  ...args\n}: QuerySerializerOptions = {}) => {\n  const querySerializer = (queryParams: T) => {\n    const search: string[] = [];\n    const qParams = toValue(queryParams);\n    if (qParams && typeof qParams === 'object') {\n      for (const name in qParams) {\n        const value = toValue(qParams[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\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    (toValue(options.query) as Record<string, unknown> | undefined)?.[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    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        const queryValue = toValue(options.query) as Record<string, unknown> | undefined;\n        if (queryValue) {\n          queryValue[name] = token;\n        }\n        break;\n      }\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  const url = 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  return url;\n};\n\nexport const getUrl = ({\n  baseUrl,\n  path,\n  query,\n  querySerializer,\n  url: _url,\n}: Pick<BuildUrlOptions, 'path' | 'query' | 'url'> & {\n  baseUrl?: string;\n  querySerializer: QuerySerializer;\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 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 || typeof header !== 'object') {\n      continue;\n    }\n\n    let h: unknown = header;\n    if (isRef(h)) {\n      h = unref(h);\n    }\n\n    const iterator =\n      h instanceof Headers ? headersEntries(h) : Object.entries(h as Record<string, unknown>);\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, unwrapRefs(v) as string);\n        }\n      } else if (value !== undefined) {\n        const v = unwrapRefs(value);\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(key, typeof v === 'object' ? JSON.stringify(v) : (v as string));\n      }\n    }\n  }\n  return mergedHeaders;\n};\n\nexport const mergeInterceptors = <T>(...args: Array<MaybeArray<T>>): Array<T> =>\n  args.reduce<Array<T>>((acc, item) => {\n    if (typeof item === 'function') {\n      acc.push(item);\n    } else if (Array.isArray(item)) {\n      return acc.concat(item);\n    }\n    return acc;\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  querySerializer: defaultQuerySerializer,\n  ...override,\n});\n\ntype UnwrapRefs<T> =\n  T extends Ref<infer V>\n    ? V\n    : T extends ComputedRef<infer V>\n      ? V\n      : T extends Record<string, unknown> // this doesn't handle functions well\n        ? { [K in keyof T]: UnwrapRefs<T[K]> }\n        : T;\n\nexport const unwrapRefs = <T>(value: T): UnwrapRefs<T> => {\n  if (value === null || typeof value !== 'object' || value instanceof Headers) {\n    return (isRef(value) ? unref(value) : value) as UnwrapRefs<T>;\n  }\n\n  if (\n    value instanceof Blob ||\n    value instanceof FormData ||\n    value instanceof ReadableStream ||\n    value instanceof AbortSignal\n  ) {\n    return value as UnwrapRefs<T>;\n  }\n\n  if (Array.isArray(value)) {\n    return value.map((item) => unwrapRefs(item)) as UnwrapRefs<T>;\n  }\n\n  if (isRef(value)) {\n    return unwrapRefs(unref(value) as T);\n  }\n\n  // unwrap into new object to avoid modifying the source\n  const result: Record<string, unknown> = {};\n  for (const key in value) {\n    result[key] = unwrapRefs(value[key] as T);\n  }\n  return result as UnwrapRefs<T>;\n};\n\nexport const serializeBody = (\n  opts: Pick<Parameters<Client['request']>[0], 'body' | 'bodySerializer'>,\n) => {\n  if (opts.body && opts.bodySerializer) {\n    return opts.bodySerializer(opts.body);\n  }\n  return opts.body;\n};\n\nexport const executeFetchFn = (\n  opts: Omit<Parameters<Client['request']>[0], 'composable'>,\n  fetchFn: Required<Config>['$fetch'],\n) => {\n  const unwrappedOpts = unwrapRefs(opts);\n  unwrappedOpts.rawBody = unwrappedOpts.body;\n  unwrappedOpts.body = serializeBody(unwrappedOpts);\n  return fetchFn(\n    buildUrl(opts),\n    // @ts-expect-error\n    unwrappedOpts,\n  );\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-nuxt/base-url-false/client.gen.ts",
    "content": "// 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>());\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-nuxt/base-url-false/core/auth.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-nuxt/base-url-false/core/bodySerializer.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-nuxt/base-url-false/core/params.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-nuxt/base-url-false/core/pathSerializer.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-nuxt/base-url-false/core/queryKeySerializer.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\n/**\n * JSON-friendly union that mirrors what Pinia Colada can hash.\n */\nexport type JsonValue =\n  | null\n  | string\n  | number\n  | boolean\n  | JsonValue[]\n  | { [key: string]: JsonValue };\n\n/**\n * Replacer that converts non-JSON values (bigint, Date, etc.) to safe substitutes.\n */\nexport const queryKeyJsonReplacer = (_key: string, value: unknown) => {\n  if (value === undefined || typeof value === 'function' || typeof value === 'symbol') {\n    return undefined;\n  }\n  if (typeof value === 'bigint') {\n    return value.toString();\n  }\n  if (value instanceof Date) {\n    return value.toISOString();\n  }\n  return value;\n};\n\n/**\n * Safely stringifies a value and parses it back into a JsonValue.\n */\nexport const stringifyToJsonValue = (input: unknown): JsonValue | undefined => {\n  try {\n    const json = JSON.stringify(input, queryKeyJsonReplacer);\n    if (json === undefined) {\n      return undefined;\n    }\n    return JSON.parse(json) as JsonValue;\n  } catch {\n    return undefined;\n  }\n};\n\n/**\n * Detects plain objects (including objects with a null prototype).\n */\nconst isPlainObject = (value: unknown): value is Record<string, unknown> => {\n  if (value === null || typeof value !== 'object') {\n    return false;\n  }\n  const prototype = Object.getPrototypeOf(value as object);\n  return prototype === Object.prototype || prototype === null;\n};\n\n/**\n * Turns URLSearchParams into a sorted JSON object for deterministic keys.\n */\nconst serializeSearchParams = (params: URLSearchParams): JsonValue => {\n  const entries = Array.from(params.entries()).sort(([a], [b]) => a.localeCompare(b));\n  const result: Record<string, JsonValue> = {};\n\n  for (const [key, value] of entries) {\n    const existing = result[key];\n    if (existing === undefined) {\n      result[key] = value;\n      continue;\n    }\n\n    if (Array.isArray(existing)) {\n      (existing as string[]).push(value);\n    } else {\n      result[key] = [existing, value];\n    }\n  }\n\n  return result;\n};\n\n/**\n * Normalizes any accepted value into a JSON-friendly shape for query keys.\n */\nexport const serializeQueryKeyValue = (value: unknown): JsonValue | undefined => {\n  if (value === null) {\n    return null;\n  }\n\n  if (typeof value === 'string' || typeof value === 'number' || typeof value === 'boolean') {\n    return value;\n  }\n\n  if (value === undefined || typeof value === 'function' || typeof value === 'symbol') {\n    return undefined;\n  }\n\n  if (typeof value === 'bigint') {\n    return value.toString();\n  }\n\n  if (value instanceof Date) {\n    return value.toISOString();\n  }\n\n  if (Array.isArray(value)) {\n    return stringifyToJsonValue(value);\n  }\n\n  if (typeof URLSearchParams !== 'undefined' && value instanceof URLSearchParams) {\n    return serializeSearchParams(value);\n  }\n\n  if (isPlainObject(value)) {\n    return stringifyToJsonValue(value);\n  }\n\n  return undefined;\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-nuxt/base-url-false/core/serverSentEvents.gen.ts",
    "content": "// 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 const 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            // Normalize line endings: CRLF -> LF, then CR -> LF\n            buffer = buffer.replace(/\\r\\n/g, '\\n').replace(/\\r/g, '\\n');\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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-nuxt/base-url-false/core/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { Auth, AuthToken } from './auth.gen';\nimport type { BodySerializer, QuerySerializer, QuerySerializerOptions } from './bodySerializer.gen';\n\nexport type HttpMethod =\n  | 'connect'\n  | 'delete'\n  | 'get'\n  | 'head'\n  | 'options'\n  | 'patch'\n  | 'post'\n  | 'put'\n  | 'trace';\n\nexport type Client<\n  RequestFn = never,\n  Config = unknown,\n  MethodFn = never,\n  BuildUrlFn = never,\n  SseFn = never,\n> = {\n  /**\n   * Returns the final request URL.\n   */\n  buildUrl: BuildUrlFn;\n  getConfig: () => Config;\n  request: RequestFn;\n  setConfig: (config: Config) => Config;\n} & {\n  [K in HttpMethod]: MethodFn;\n} & ([SseFn] extends [never] ? { sse?: never } : { sse: { [K in HttpMethod]: SseFn } });\n\nexport interface Config {\n  /**\n   * Auth token or a function returning auth token. The resolved value will be\n   * added to the request payload as defined by its `security` array.\n   */\n  auth?: ((auth: Auth) => Promise<AuthToken> | AuthToken) | AuthToken;\n  /**\n   * A function for serializing request body parameter. By default,\n   * {@link JSON.stringify()} will be used.\n   */\n  bodySerializer?: BodySerializer | null;\n  /**\n   * An object containing any HTTP headers that you want to pre-populate your\n   * `Headers` object with.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/Headers/Headers#init See more}\n   */\n  headers?:\n    | RequestInit['headers']\n    | Record<\n        string,\n        string | number | boolean | (string | number | boolean)[] | null | undefined | unknown\n      >;\n  /**\n   * The request method.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/fetch#method See more}\n   */\n  method?: Uppercase<HttpMethod>;\n  /**\n   * A function for serializing request query parameters. By default, arrays\n   * will be exploded in form style, objects will be exploded in deepObject\n   * style, and reserved characters are percent-encoded.\n   *\n   * This method will have no effect if the native `paramsSerializer()` Axios\n   * API function is used.\n   *\n   * {@link https://swagger.io/docs/specification/serialization/#query View examples}\n   */\n  querySerializer?: QuerySerializer | QuerySerializerOptions;\n  /**\n   * A function validating request data. This is useful if you want to ensure\n   * the request conforms to the desired shape, so it can be safely sent to\n   * the server.\n   */\n  requestValidator?: (data: unknown) => Promise<unknown>;\n  /**\n   * A function transforming response data before it's returned. This is useful\n   * for post-processing data, e.g. converting ISO strings into Date objects.\n   */\n  responseTransformer?: (data: unknown) => Promise<unknown>;\n  /**\n   * A function validating response data. This is useful if you want to ensure\n   * the response conforms to the desired shape, so it can be safely passed to\n   * the transformers and returned to the user.\n   */\n  responseValidator?: (data: unknown) => Promise<unknown>;\n}\n\ntype IsExactlyNeverOrNeverUndefined<T> = [T] extends [never]\n  ? true\n  : [T] extends [never | undefined]\n    ? [undefined] extends [T]\n      ? false\n      : true\n    : false;\n\nexport type OmitNever<T extends Record<string, unknown>> = {\n  [K in keyof T as IsExactlyNeverOrNeverUndefined<T[K]> extends true ? never : K]: T[K];\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-nuxt/base-url-false/core/utils.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-nuxt/base-url-false/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type { _3eNum1Период, _400, AdditionalPropertiesIntegerIssue, AdditionalPropertiesUnknownIssue, AdditionalPropertiesUnknownIssue2, AdditionalPropertiesUnknownIssue3, AdditionalPropertiesUnknownIssueWritable, AnyOfAnyAndNull, AnyOfArrays, ApiVVersionODataControllerCountData, ApiVVersionODataControllerCountResponse, ApiVVersionODataControllerCountResponses, ArrayWithAnyOfProperties, ArrayWithArray, ArrayWithBooleans, ArrayWithNumbers, ArrayWithProperties, ArrayWithReferences, ArrayWithStrings, CallToTestOrderOfParamsData, CallWithDefaultOptionalParametersData, CallWithDefaultParametersData, CallWithDescriptionsData, CallWithDuplicateResponsesData, CallWithDuplicateResponsesError, CallWithDuplicateResponsesErrors, CallWithDuplicateResponsesResponse, CallWithDuplicateResponsesResponses, CallWithNoContentResponseData, CallWithNoContentResponseResponse, CallWithNoContentResponseResponses, CallWithParametersData, CallWithResponseAndNoContentResponseData, CallWithResponseAndNoContentResponseResponse, CallWithResponseAndNoContentResponseResponses, CallWithResponseData, CallWithResponseResponse, CallWithResponseResponses, CallWithResponsesData, CallWithResponsesError, CallWithResponsesErrors, CallWithResponsesResponse, CallWithResponsesResponses, CallWithResultFromHeaderData, CallWithResultFromHeaderErrors, CallWithResultFromHeaderResponses, CallWithWeirdParameterNamesData, CamelCaseCommentWithBreaks, CharactersInDescription, ClientOptions, CollectionFormatData, CommentWithBackticks, CommentWithBackticksAndQuotes, CommentWithBreaks, CommentWithExpressionPlaceholders, CommentWithQuotes, CommentWithReservedCharacters, CommentWithSlashes, ComplexParamsData, ComplexParamsResponse, ComplexParamsResponses, ComplexTypesData, ComplexTypesErrors, ComplexTypesResponse, ComplexTypesResponses, CompositionBaseModel, CompositionExtendedModel, CompositionWithAllOfAndNullable, CompositionWithAnyOf, CompositionWithAnyOfAndNullable, CompositionWithAnyOfAnonymous, CompositionWithNestedAnyAndTypeNull, CompositionWithNestedAnyOfAndNull, CompositionWithOneOf, CompositionWithOneOfAndComplexArrayDictionary, CompositionWithOneOfAndNullable, CompositionWithOneOfAndProperties, CompositionWithOneOfAndSimpleArrayDictionary, CompositionWithOneOfAndSimpleDictionary, CompositionWithOneOfAnonymous, CompositionWithOneOfDiscriminator, ConstValue, Default, DeleteCallWithoutParametersAndResponseData, DeleteFooData, DeleteFooData2, DeleteFooData3, DeprecatedCallData, DeprecatedModel, DictionaryWithArray, DictionaryWithDictionary, DictionaryWithProperties, DictionaryWithPropertiesAndAdditionalProperties, DictionaryWithReference, DictionaryWithString, DummyAData, DummyAResponse, DummyAResponses, DummyBData, DummyBResponse, DummyBResponses, DuplicateName2Data, DuplicateName3Data, DuplicateName4Data, DuplicateNameData, EnumFromDescription, EnumWithExtensions, EnumWithNumbers, EnumWithReplacedCharacters, EnumWithStrings, EnumWithXEnumNames, ExportData, ExternalRefA, ExternalRefB, ExternalSharedModel, File, FileResponseData, FileResponseResponse, FileResponseResponses, FileWritable, FooWowData, FooWowResponses, FreeFormObjectWithAdditionalPropertiesEqEmptyObject, FreeFormObjectWithAdditionalPropertiesEqTrue, FreeFormObjectWithoutAdditionalProperties, GenericSchemaDuplicateIssue1SystemBoolean, GenericSchemaDuplicateIssue1SystemBooleanWritable, GenericSchemaDuplicateIssue1SystemString, GenericSchemaDuplicateIssue1SystemStringWritable, GetApiVbyApiVersionSimpleOperationData, GetApiVbyApiVersionSimpleOperationError, GetApiVbyApiVersionSimpleOperationErrors, GetApiVbyApiVersionSimpleOperationResponse, GetApiVbyApiVersionSimpleOperationResponses, GetCallWithOptionalParamData, GetCallWithoutParametersAndResponseData, HeadCallWithoutParametersAndResponseData, Import, ImportData, ImportResponse, ImportResponses, IoK8sApimachineryPkgApisMetaV1DeleteOptions, IoK8sApimachineryPkgApisMetaV1Preconditions, ModelCircle, ModelFromZendesk, ModelSquare, ModelThatExtends, ModelThatExtendsExtends, ModelWithAdditionalPropertiesEqTrue, ModelWithAdditionalPropertiesRef, ModelWithAnyOfConstantSizeArray, ModelWithAnyOfConstantSizeArrayAndIntersect, ModelWithAnyOfConstantSizeArrayNullable, ModelWithAnyOfConstantSizeArrayWithNSizeAndOptions, ModelWithAnyOfConstantSizeArrayWithNSizeAndOptionsWritable, ModelWithArray, ModelWithArrayReadOnlyAndWriteOnly, ModelWithArrayReadOnlyAndWriteOnlyWritable, ModelWithBackticksInDescription, ModelWithBoolean, ModelWithCircularReference, ModelWithConst, ModelWithConstantSizeArray, ModelWithDictionary, ModelWithDuplicateImports, ModelWithDuplicateProperties, ModelWithEnum, ModelWithEnumFromDescription, ModelWithEnumWithHyphen, ModelWithInteger, ModelWithNestedArrayEnums, ModelWithNestedArrayEnumsData, ModelWithNestedArrayEnumsDataBar, ModelWithNestedArrayEnumsDataFoo, ModelWithNestedCompositionEnums, ModelWithNestedEnums, ModelWithNestedProperties, ModelWithNullableObject, ModelWithNullableString, ModelWithNumericEnumUnion, ModelWithOneOfAndProperties, ModelWithOneOfEnum, ModelWithOrderedProperties, ModelWithPattern, ModelWithPatternWritable, ModelWithPrefixItemsConstantSizeArray, ModelWithProperties, ModelWithPropertiesWritable, ModelWithReadOnlyAndWriteOnly, ModelWithReadOnlyAndWriteOnlyWritable, ModelWithReference, ModelWithReferenceWritable, ModelWithString, ModelWithStringError, MultipartRequestData, MultipartResponseData, MultipartResponseResponse, MultipartResponseResponses, NestedAnyOfArraysNullable, NonAsciiæøåÆøÅöôêÊ字符串Data, NonAsciiæøåÆøÅöôêÊ字符串Response, NonAsciiæøåÆøÅöôêÊ字符串Responses, NonAsciiStringæøåÆøÅöôêÊ字符串, NullableObject, OneOfAllOfIssue, OneOfAllOfIssueWritable, OptionsCallWithoutParametersAndResponseData, Pageable, ParameterSimpleParameterUnused, PatchApiVbyApiVersionNoTagData, PatchApiVbyApiVersionNoTagResponses, PatchCallWithoutParametersAndResponseData, PostApiVbyApiVersionFormDataData, PostApiVbyApiVersionRequestBodyData, PostCallWithOptionalParamData, PostCallWithOptionalParamResponse, PostCallWithOptionalParamResponses, PostCallWithoutParametersAndResponseData, PostServiceWithEmptyTagResponse, PostServiceWithEmptyTagResponse2, PutCallWithoutParametersAndResponseData, PutWithFormUrlEncodedData, SchemaWithFormRestrictedKeys, SimpleBoolean, SimpleFile, SimpleFormData, SimpleInteger, SimpleParameter, SimpleReference, SimpleRequestBody, SimpleString, SimpleStringWithPattern, TestErrorCodeData, TestErrorCodeErrors, TestErrorCodeResponses, TypesData, TypesResponse, TypesResponses, UploadFileData, UploadFileResponse, UploadFileResponses, XFooBar } from './types.gen';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-nuxt/base-url-false/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type ClientOptions = {\n    baseURL: 'http://localhost:3000/base' | (string & {});\n};\n\n/**\n * Model with number-only name\n */\nexport type _400 = string;\n\n/**\n * External ref to shared model (A)\n */\nexport type ExternalRefA = ExternalSharedModel;\n\n/**\n * External ref to shared model (B)\n */\nexport type ExternalRefB = ExternalSharedModel;\n\n/**\n * Testing multiline comments in string: First line\n * Second line\n *\n * Fourth line\n */\nexport type CamelCaseCommentWithBreaks = number;\n\n/**\n * Testing multiline comments in string: First line\n * Second line\n *\n * Fourth line\n */\nexport type CommentWithBreaks = number;\n\n/**\n * Testing backticks in string: `backticks` and ```multiple backticks``` should work\n */\nexport type CommentWithBackticks = number;\n\n/**\n * Testing backticks and quotes in string: `backticks`, 'quotes', \"double quotes\" and ```multiple backticks``` should work\n */\nexport type CommentWithBackticksAndQuotes = number;\n\n/**\n * Testing slashes in string: \\backwards\\\\\\ and /forwards/// should work\n */\nexport type CommentWithSlashes = number;\n\n/**\n * Testing expression placeholders in string: ${expression} should work\n */\nexport type CommentWithExpressionPlaceholders = number;\n\n/**\n * Testing quotes in string: 'single quote''' and \"double quotes\"\"\" should work\n */\nexport type CommentWithQuotes = number;\n\n/**\n * Testing reserved characters in string: * inline * and ** inline ** should work\n */\nexport type CommentWithReservedCharacters = number;\n\n/**\n * This is a simple number\n */\nexport type SimpleInteger = number;\n\n/**\n * This is a simple boolean\n */\nexport type SimpleBoolean = boolean;\n\n/**\n * This is a simple string\n */\nexport type SimpleString = string;\n\n/**\n * A string with non-ascii (unicode) characters valid in typescript identifiers (æøåÆØÅöÔèÈ字符串)\n */\nexport type NonAsciiStringæøåÆøÅöôêÊ字符串 = string;\n\n/**\n * This is a simple file\n */\nexport type SimpleFile = Blob | File;\n\n/**\n * This is a simple reference\n */\nexport type SimpleReference = ModelWithString;\n\n/**\n * This is a simple string\n */\nexport type SimpleStringWithPattern = string | null;\n\n/**\n * This is a simple enum with strings\n */\nexport type EnumWithStrings = 'Success' | 'Warning' | 'Error' | '\\'Single Quote\\'' | '\"Double Quotes\"' | 'Non-ascii: øæåôöØÆÅÔÖ字符串';\n\nexport type EnumWithReplacedCharacters = '\\'Single Quote\\'' | '\"Double Quotes\"' | 'øæåôöØÆÅÔÖ字符串' | 3.1 | '';\n\n/**\n * This is a simple enum with numbers\n */\nexport type EnumWithNumbers = 1 | 2 | 3 | 1.1 | 1.2 | 1.3 | 100 | 200 | 300 | -100 | -200 | -300 | -1.1 | -1.2 | -1.3;\n\n/**\n * Success=1,Warning=2,Error=3\n */\nexport type EnumFromDescription = number;\n\n/**\n * This is a simple enum with numbers\n */\nexport type EnumWithExtensions = 200 | 400 | 500;\n\nexport type EnumWithXEnumNames = 0 | 1 | 2;\n\n/**\n * This is a simple array with numbers\n */\nexport type ArrayWithNumbers = Array<number>;\n\n/**\n * This is a simple array with booleans\n */\nexport type ArrayWithBooleans = Array<boolean>;\n\n/**\n * This is a simple array with strings\n */\nexport type ArrayWithStrings = Array<string>;\n\n/**\n * This is a simple array with references\n */\nexport type ArrayWithReferences = Array<ModelWithString>;\n\n/**\n * This is a simple array containing an array\n */\nexport type ArrayWithArray = Array<Array<ModelWithString>>;\n\n/**\n * This is a simple array with properties\n */\nexport type ArrayWithProperties = Array<{\n    '16x16'?: CamelCaseCommentWithBreaks;\n    bar?: string;\n}>;\n\n/**\n * This is a simple array with any of properties\n */\nexport type ArrayWithAnyOfProperties = Array<{\n    foo?: string;\n} | {\n    bar?: string;\n}>;\n\nexport type AnyOfAnyAndNull = {\n    data?: unknown | null;\n};\n\n/**\n * This is a simple array with any of properties\n */\nexport type AnyOfArrays = {\n    results?: Array<{\n        foo?: string;\n    } | {\n        bar?: string;\n    }>;\n};\n\n/**\n * This is a string dictionary\n */\nexport type DictionaryWithString = {\n    [key: string]: string;\n};\n\nexport type DictionaryWithPropertiesAndAdditionalProperties = {\n    foo?: number;\n    bar?: boolean;\n    [key: string]: string | number | boolean | undefined;\n};\n\n/**\n * This is a string reference\n */\nexport type DictionaryWithReference = {\n    [key: string]: ModelWithString;\n};\n\n/**\n * This is a complex dictionary\n */\nexport type DictionaryWithArray = {\n    [key: string]: Array<ModelWithString>;\n};\n\n/**\n * This is a string dictionary\n */\nexport type DictionaryWithDictionary = {\n    [key: string]: {\n        [key: string]: string;\n    };\n};\n\n/**\n * This is a complex dictionary\n */\nexport type DictionaryWithProperties = {\n    [key: string]: {\n        foo?: string;\n        bar?: string;\n    };\n};\n\n/**\n * This is a model with one number property\n */\nexport type ModelWithInteger = {\n    /**\n     * This is a simple number property\n     */\n    prop?: number;\n};\n\n/**\n * This is a model with one boolean property\n */\nexport type ModelWithBoolean = {\n    /**\n     * This is a simple boolean property\n     */\n    prop?: boolean;\n};\n\n/**\n * This is a model with one string property\n */\nexport type ModelWithString = {\n    /**\n     * This is a simple string property\n     */\n    prop?: string;\n};\n\n/**\n * This is a model with one string property\n */\nexport type ModelWithStringError = {\n    /**\n     * This is a simple string property\n     */\n    prop?: string;\n};\n\n/**\n * `Comment` or `VoiceComment`. The JSON object for adding voice comments to tickets is different. See [Adding voice comments to tickets](/documentation/ticketing/managing-tickets/adding-voice-comments-to-tickets)\n */\nexport type ModelFromZendesk = string;\n\n/**\n * This is a model with one string property\n */\nexport type ModelWithNullableString = {\n    /**\n     * This is a simple string property\n     */\n    nullableProp1?: string | null;\n    /**\n     * This is a simple string property\n     */\n    nullableRequiredProp1: string | null;\n    /**\n     * This is a simple string property\n     */\n    nullableProp2?: string | null;\n    /**\n     * This is a simple string property\n     */\n    nullableRequiredProp2: string | null;\n    /**\n     * This is a simple enum with strings\n     */\n    'foo_bar-enum'?: 'Success' | 'Warning' | 'Error' | 'ØÆÅ字符串';\n};\n\n/**\n * This is a model with one enum\n */\nexport type ModelWithEnum = {\n    /**\n     * This is a simple enum with strings\n     */\n    'foo_bar-enum'?: 'Success' | 'Warning' | 'Error' | 'ØÆÅ字符串';\n    /**\n     * These are the HTTP error code enums\n     */\n    statusCode?: '100' | '200 FOO' | '300 FOO_BAR' | '400 foo-bar' | '500 foo.bar' | '600 foo&bar';\n    /**\n     * Simple boolean enum\n     */\n    bool?: true;\n};\n\n/**\n * This is a model with one enum with escaped name\n */\nexport type ModelWithEnumWithHyphen = {\n    /**\n     * Foo-Bar-Baz-Qux\n     */\n    'foo-bar-baz-qux'?: '3.0';\n};\n\n/**\n * This is a model with one enum\n */\nexport type ModelWithEnumFromDescription = {\n    /**\n     * Success=1,Warning=2,Error=3\n     */\n    test?: number;\n};\n\n/**\n * This is a model with nested enums\n */\nexport type ModelWithNestedEnums = {\n    dictionaryWithEnum?: {\n        [key: string]: 'Success' | 'Warning' | 'Error';\n    };\n    dictionaryWithEnumFromDescription?: {\n        [key: string]: number;\n    };\n    arrayWithEnum?: Array<'Success' | 'Warning' | 'Error'>;\n    arrayWithDescription?: Array<number>;\n    /**\n     * This is a simple enum with strings\n     */\n    'foo_bar-enum'?: 'Success' | 'Warning' | 'Error' | 'ØÆÅ字符串';\n};\n\n/**\n * This is a model with one property containing a reference\n */\nexport type ModelWithReference = {\n    prop?: ModelWithProperties;\n};\n\n/**\n * This is a model with one property containing an array\n */\nexport type ModelWithArrayReadOnlyAndWriteOnly = {\n    prop?: Array<ModelWithReadOnlyAndWriteOnly>;\n    propWithFile?: Array<Blob | File>;\n    propWithNumber?: Array<number>;\n};\n\n/**\n * This is a model with one property containing an array\n */\nexport type ModelWithArray = {\n    prop?: Array<ModelWithString>;\n    propWithFile?: Array<Blob | File>;\n    propWithNumber?: Array<number>;\n};\n\n/**\n * This is a model with one property containing a dictionary\n */\nexport type ModelWithDictionary = {\n    prop?: {\n        [key: string]: string;\n    };\n};\n\n/**\n * This is a deprecated model with a deprecated property\n *\n * @deprecated\n */\nexport type DeprecatedModel = {\n    /**\n     * This is a deprecated property\n     *\n     * @deprecated\n     */\n    prop?: string;\n};\n\n/**\n * This is a model with one property containing a circular reference\n */\nexport type ModelWithCircularReference = {\n    prop?: ModelWithCircularReference;\n};\n\n/**\n * This is a model with one property with a 'one of' relationship\n */\nexport type CompositionWithOneOf = {\n    propA?: ModelWithString | ModelWithEnum | ModelWithArray | ModelWithDictionary;\n};\n\n/**\n * This is a model with one property with a 'one of' relationship where the options are not $ref\n */\nexport type CompositionWithOneOfAnonymous = {\n    propA?: {\n        propA?: string;\n    } | string | number;\n};\n\n/**\n * Circle\n */\nexport type ModelCircle = {\n    kind: string;\n    radius?: number;\n};\n\n/**\n * Square\n */\nexport type ModelSquare = {\n    kind: string;\n    sideLength?: number;\n};\n\n/**\n * This is a model with one property with a 'one of' relationship where the options are not $ref\n */\nexport type CompositionWithOneOfDiscriminator = ({\n    kind: 'circle';\n} & ModelCircle) | ({\n    kind: 'square';\n} & ModelSquare);\n\n/**\n * This is a model with one property with a 'any of' relationship\n */\nexport type CompositionWithAnyOf = {\n    propA?: ModelWithString | ModelWithEnum | ModelWithArray | ModelWithDictionary;\n};\n\n/**\n * This is a model with one property with a 'any of' relationship where the options are not $ref\n */\nexport type CompositionWithAnyOfAnonymous = {\n    propA?: {\n        propA?: string;\n    } | string | number;\n};\n\n/**\n * This is a model with nested 'any of' property with a type null\n */\nexport type CompositionWithNestedAnyAndTypeNull = {\n    propA?: Array<ModelWithDictionary | null> | Array<ModelWithArray | null>;\n};\n\nexport type _3eNum1Период = 'Bird' | 'Dog';\n\nexport type ConstValue = 'ConstValue';\n\n/**\n * This is a model with one property with a 'any of' relationship where the options are not $ref\n */\nexport type CompositionWithNestedAnyOfAndNull = {\n    /**\n     * Scopes\n     */\n    propA?: Array<_3eNum1Период | ConstValue> | null;\n};\n\n/**\n * This is a model with one property with a 'one of' relationship\n */\nexport type CompositionWithOneOfAndNullable = {\n    propA?: {\n        boolean?: boolean;\n    } | ModelWithEnum | ModelWithArray | ModelWithDictionary | null;\n};\n\n/**\n * This is a model that contains a simple dictionary within composition\n */\nexport type CompositionWithOneOfAndSimpleDictionary = {\n    propA?: boolean | {\n        [key: string]: number;\n    };\n};\n\n/**\n * This is a model that contains a dictionary of simple arrays within composition\n */\nexport type CompositionWithOneOfAndSimpleArrayDictionary = {\n    propA?: boolean | {\n        [key: string]: Array<boolean>;\n    };\n};\n\n/**\n * This is a model that contains a dictionary of complex arrays (composited) within composition\n */\nexport type CompositionWithOneOfAndComplexArrayDictionary = {\n    propA?: boolean | {\n        [key: string]: Array<number | string>;\n    };\n};\n\n/**\n * This is a model with one property with a 'all of' relationship\n */\nexport type CompositionWithAllOfAndNullable = {\n    propA?: ({\n        boolean?: boolean;\n    } & ModelWithEnum & ModelWithArray & ModelWithDictionary) | null;\n};\n\n/**\n * This is a model with one property with a 'any of' relationship\n */\nexport type CompositionWithAnyOfAndNullable = {\n    propA?: {\n        boolean?: boolean;\n    } | ModelWithEnum | ModelWithArray | ModelWithDictionary | null;\n};\n\n/**\n * This is a base model with two simple optional properties\n */\nexport type CompositionBaseModel = {\n    firstName?: string;\n    lastname?: string;\n};\n\n/**\n * This is a model that extends the base model\n */\nexport type CompositionExtendedModel = CompositionBaseModel & {\n    age: number;\n    firstName: string;\n    lastname: string;\n};\n\n/**\n * This is a model with one nested property\n */\nexport type ModelWithProperties = {\n    required: string;\n    readonly requiredAndReadOnly: string;\n    requiredAndNullable: string | null;\n    string?: string;\n    number?: number;\n    boolean?: boolean;\n    reference?: ModelWithString;\n    'property with space'?: string;\n    default?: string;\n    try?: string;\n    readonly '@namespace.string'?: string;\n    readonly '@namespace.integer'?: number;\n};\n\n/**\n * This is a model with one nested property\n */\nexport type ModelWithNestedProperties = {\n    readonly first: {\n        readonly second: {\n            readonly third: string | null;\n        } | null;\n    } | null;\n};\n\n/**\n * This is a model with duplicated properties\n */\nexport type ModelWithDuplicateProperties = {\n    prop?: ModelWithString;\n};\n\n/**\n * This is a model with ordered properties\n */\nexport type ModelWithOrderedProperties = {\n    zebra?: string;\n    apple?: string;\n    hawaii?: string;\n};\n\n/**\n * This is a model with duplicated imports\n */\nexport type ModelWithDuplicateImports = {\n    propA?: ModelWithString;\n    propB?: ModelWithString;\n    propC?: ModelWithString;\n};\n\n/**\n * This is a model that extends another model\n */\nexport type ModelThatExtends = ModelWithString & {\n    propExtendsA?: string;\n    propExtendsB?: ModelWithString;\n};\n\n/**\n * This is a model that extends another model\n */\nexport type ModelThatExtendsExtends = ModelWithString & ModelThatExtends & {\n    propExtendsC?: string;\n    propExtendsD?: ModelWithString;\n};\n\n/**\n * This is a model that contains a some patterns\n */\nexport type ModelWithPattern = {\n    key: string;\n    name: string;\n    readonly enabled?: boolean;\n    readonly modified?: string;\n    id?: string;\n    text?: string;\n    patternWithSingleQuotes?: string;\n    patternWithNewline?: string;\n    patternWithBacktick?: string;\n    patternWithUnicode?: string;\n};\n\nexport type File = {\n    /**\n     * Id\n     */\n    readonly id?: string;\n    /**\n     * Updated at\n     */\n    readonly updated_at?: string;\n    /**\n     * Created at\n     */\n    readonly created_at?: string;\n    /**\n     * Mime\n     */\n    mime: string;\n    /**\n     * File\n     */\n    readonly file?: string;\n};\n\nexport type Default = {\n    name?: string;\n};\n\nexport type Pageable = {\n    page?: number;\n    size?: number;\n    sort?: Array<string>;\n};\n\n/**\n * This is a free-form object without additionalProperties.\n */\nexport type FreeFormObjectWithoutAdditionalProperties = {\n    [key: string]: unknown;\n};\n\n/**\n * This is a free-form object with additionalProperties: true.\n */\nexport type FreeFormObjectWithAdditionalPropertiesEqTrue = {\n    [key: string]: unknown;\n};\n\n/**\n * This is a free-form object with additionalProperties: {}.\n */\nexport type FreeFormObjectWithAdditionalPropertiesEqEmptyObject = {\n    [key: string]: unknown;\n};\n\nexport type ModelWithConst = {\n    String?: 'String';\n    number?: 0;\n    null?: null;\n    withType?: 'Some string';\n};\n\n/**\n * This is a model with one property and additionalProperties: true\n */\nexport type ModelWithAdditionalPropertiesEqTrue = {\n    /**\n     * This is a simple string property\n     */\n    prop?: string;\n    [key: string]: unknown;\n};\n\nexport type NestedAnyOfArraysNullable = {\n    nullableArray?: Array<string | boolean> | null;\n};\n\nexport type CompositionWithOneOfAndProperties = ({\n    foo: SimpleParameter;\n} | {\n    bar: NonAsciiStringæøåÆøÅöôêÊ字符串;\n}) & {\n    baz: number | null;\n    qux: number;\n};\n\n/**\n * An object that can be null\n */\nexport type NullableObject = {\n    foo?: string;\n} | null;\n\n/**\n * Some % character\n */\nexport type CharactersInDescription = string;\n\nexport type ModelWithNullableObject = {\n    data?: NullableObject;\n};\n\n/**\n * An object with additional properties that can be null (anyOf ref + null)\n */\nexport type ModelWithAdditionalPropertiesRef = {\n    [key: string]: NullableObject | null;\n};\n\nexport type ModelWithOneOfEnum = {\n    foo: 'Bar';\n} | {\n    foo: 'Baz';\n} | {\n    foo: 'Qux';\n} | {\n    content: string;\n    foo: 'Quux';\n} | {\n    content: [\n        string,\n        string\n    ];\n    foo: 'Corge';\n};\n\nexport type ModelWithNestedArrayEnumsDataFoo = 'foo' | 'bar';\n\nexport type ModelWithNestedArrayEnumsDataBar = 'baz' | 'qux';\n\nexport type ModelWithNestedArrayEnumsData = {\n    foo?: Array<ModelWithNestedArrayEnumsDataFoo>;\n    bar?: Array<ModelWithNestedArrayEnumsDataBar>;\n};\n\nexport type ModelWithNestedArrayEnums = {\n    array_strings?: Array<string>;\n    data?: ModelWithNestedArrayEnumsData;\n};\n\nexport type ModelWithNestedCompositionEnums = {\n    foo?: ModelWithNestedArrayEnumsDataFoo;\n};\n\nexport type ModelWithReadOnlyAndWriteOnly = {\n    foo: string;\n    readonly bar: string;\n};\n\nexport type ModelWithConstantSizeArray = [\n    number,\n    number\n];\n\nexport type ModelWithAnyOfConstantSizeArray = [\n    number | string,\n    number | string,\n    number | string\n];\n\nexport type ModelWithPrefixItemsConstantSizeArray = [\n    ModelWithInteger,\n    number | string,\n    string\n];\n\nexport type ModelWithAnyOfConstantSizeArrayNullable = [\n    number | null | string,\n    number | null | string,\n    number | null | string\n];\n\nexport type ModelWithAnyOfConstantSizeArrayWithNSizeAndOptions = [\n    number | Import,\n    number | Import\n];\n\nexport type ModelWithAnyOfConstantSizeArrayAndIntersect = [\n    number & string,\n    number & string\n];\n\nexport type ModelWithNumericEnumUnion = {\n    /**\n     * Период\n     */\n    value?: -10 | -1 | 0 | 1 | 3 | 6 | 12;\n};\n\n/**\n * Some description with `back ticks`\n */\nexport type ModelWithBackticksInDescription = {\n    /**\n     * The template `that` should be used for parsing and importing the contents of the CSV file.\n     *\n     * <br/><p>There is one placeholder currently supported:<ul>     <li><b>${x}</b> - refers to the n-th column in the CSV file, e.g. ${1}, ${2}, ...)</li></ul><p>Example of a correct JSON template:</p>\n     * <pre>\n     * [\n     * {\n     * \"resourceType\": \"Asset\",\n     * \"identifier\": {\n     * \"name\": \"${1}\",\n     * \"domain\": {\n     * \"name\": \"${2}\",\n     * \"community\": {\n     * \"name\": \"Some Community\"\n     * }\n     * }\n     * },\n     * \"attributes\" : {\n     * \"00000000-0000-0000-0000-000000003115\" : [ {\n     * \"value\" : \"${3}\"\n     * } ],\n     * \"00000000-0000-0000-0000-000000000222\" : [ {\n     * \"value\" : \"${4}\"\n     * } ]\n     * }\n     * }\n     * ]\n     * </pre>\n     */\n    template?: string;\n};\n\nexport type ModelWithOneOfAndProperties = (SimpleParameter | NonAsciiStringæøåÆøÅöôêÊ字符串) & {\n    baz: number | null;\n    qux: number;\n};\n\n/**\n * Model used to test deduplication strategy (unused)\n */\nexport type ParameterSimpleParameterUnused = string;\n\n/**\n * Model used to test deduplication strategy\n */\nexport type PostServiceWithEmptyTagResponse = string;\n\n/**\n * Model used to test deduplication strategy\n */\nexport type PostServiceWithEmptyTagResponse2 = string;\n\n/**\n * Model used to test deduplication strategy\n */\nexport type DeleteFooData = string;\n\n/**\n * Model used to test deduplication strategy\n */\nexport type DeleteFooData2 = string;\n\n/**\n * Model with restricted keyword name\n */\nexport type Import = string;\n\nexport type SchemaWithFormRestrictedKeys = {\n    description?: string;\n    'x-enum-descriptions'?: string;\n    'x-enum-varnames'?: string;\n    'x-enumNames'?: string;\n    title?: string;\n    object?: {\n        description?: string;\n        'x-enum-descriptions'?: string;\n        'x-enum-varnames'?: string;\n        'x-enumNames'?: string;\n        title?: string;\n    };\n    array?: Array<{\n        description?: string;\n        'x-enum-descriptions'?: string;\n        'x-enum-varnames'?: string;\n        'x-enumNames'?: string;\n        title?: string;\n    }>;\n};\n\n/**\n * This schema was giving PascalCase transformations a hard time\n */\nexport type IoK8sApimachineryPkgApisMetaV1DeleteOptions = {\n    /**\n     * Must be fulfilled before a deletion is carried out. If not possible, a 409 Conflict status will be returned.\n     */\n    preconditions?: IoK8sApimachineryPkgApisMetaV1Preconditions;\n};\n\n/**\n * This schema was giving PascalCase transformations a hard time\n */\nexport type IoK8sApimachineryPkgApisMetaV1Preconditions = {\n    /**\n     * Specifies the target ResourceVersion\n     */\n    resourceVersion?: string;\n    /**\n     * Specifies the target UID.\n     */\n    uid?: string;\n};\n\nexport type AdditionalPropertiesUnknownIssue = {\n    [key: string]: string | number;\n};\n\nexport type AdditionalPropertiesUnknownIssue2 = {\n    [key: string]: string | number;\n};\n\nexport type AdditionalPropertiesUnknownIssue3 = string & {\n    entries: {\n        [key: string]: AdditionalPropertiesUnknownIssue;\n    };\n};\n\nexport type AdditionalPropertiesIntegerIssue = {\n    value: number;\n    [key: string]: number;\n};\n\nexport type OneOfAllOfIssue = ((ConstValue | GenericSchemaDuplicateIssue1SystemBoolean) & _3eNum1Период) | GenericSchemaDuplicateIssue1SystemString;\n\nexport type GenericSchemaDuplicateIssue1SystemBoolean = {\n    item?: boolean;\n    error?: string | null;\n    readonly hasError?: boolean;\n    data?: {\n        [key: string]: never;\n    };\n};\n\nexport type GenericSchemaDuplicateIssue1SystemString = {\n    item?: string | null;\n    error?: string | null;\n    readonly hasError?: boolean;\n};\n\nexport type ExternalSharedModel = {\n    id: string;\n    name?: string;\n};\n\n/**\n * This is a model with one property containing a reference\n */\nexport type ModelWithReferenceWritable = {\n    prop?: ModelWithPropertiesWritable;\n};\n\n/**\n * This is a model with one property containing an array\n */\nexport type ModelWithArrayReadOnlyAndWriteOnlyWritable = {\n    prop?: Array<ModelWithReadOnlyAndWriteOnlyWritable>;\n    propWithFile?: Array<Blob | File>;\n    propWithNumber?: Array<number>;\n};\n\n/**\n * This is a model with one nested property\n */\nexport type ModelWithPropertiesWritable = {\n    required: string;\n    requiredAndNullable: string | null;\n    string?: string;\n    number?: number;\n    boolean?: boolean;\n    reference?: ModelWithString;\n    'property with space'?: string;\n    default?: string;\n    try?: string;\n};\n\n/**\n * This is a model that contains a some patterns\n */\nexport type ModelWithPatternWritable = {\n    key: string;\n    name: string;\n    id?: string;\n    text?: string;\n    patternWithSingleQuotes?: string;\n    patternWithNewline?: string;\n    patternWithBacktick?: string;\n    patternWithUnicode?: string;\n};\n\nexport type FileWritable = {\n    /**\n     * Mime\n     */\n    mime: string;\n};\n\nexport type ModelWithReadOnlyAndWriteOnlyWritable = {\n    foo: string;\n    baz: string;\n};\n\nexport type ModelWithAnyOfConstantSizeArrayWithNSizeAndOptionsWritable = [\n    number | Import,\n    number | Import\n];\n\nexport type AdditionalPropertiesUnknownIssueWritable = {\n    [key: string]: string | number;\n};\n\nexport type OneOfAllOfIssueWritable = ((ConstValue | GenericSchemaDuplicateIssue1SystemBoolean) & _3eNum1Период) | GenericSchemaDuplicateIssue1SystemString;\n\nexport type GenericSchemaDuplicateIssue1SystemBooleanWritable = {\n    item?: boolean;\n    error?: string | null;\n    data?: {\n        [key: string]: never;\n    };\n};\n\nexport type GenericSchemaDuplicateIssue1SystemStringWritable = {\n    item?: string | null;\n    error?: string | null;\n};\n\n/**\n * This is a reusable parameter\n */\nexport type SimpleParameter = string;\n\n/**\n * Parameter with illegal characters\n */\nexport type XFooBar = ModelWithString;\n\n/**\n * A reusable request body\n */\nexport type SimpleRequestBody = ModelWithString;\n\n/**\n * A reusable request body\n */\nexport type SimpleFormData = ModelWithString;\n\nexport type ExportData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no+tag';\n};\n\nexport type PatchApiVbyApiVersionNoTagData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no+tag';\n};\n\nexport type PatchApiVbyApiVersionNoTagResponses = {\n    /**\n     * OK\n     */\n    default: unknown;\n};\n\nexport type ImportData = {\n    body: ModelWithReadOnlyAndWriteOnlyWritable | ModelWithArrayReadOnlyAndWriteOnlyWritable;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no+tag';\n};\n\nexport type ImportResponses = {\n    /**\n     * Success\n     */\n    200: ModelFromZendesk;\n    /**\n     * Default success response\n     */\n    default: ModelWithReadOnlyAndWriteOnly;\n};\n\nexport type ImportResponse = ImportResponses[keyof ImportResponses];\n\nexport type FooWowData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no+tag';\n};\n\nexport type FooWowResponses = {\n    /**\n     * OK\n     */\n    default: unknown;\n};\n\nexport type ApiVVersionODataControllerCountData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple/$count';\n};\n\nexport type ApiVVersionODataControllerCountResponses = {\n    /**\n     * Success\n     */\n    200: ModelFromZendesk;\n};\n\nexport type ApiVVersionODataControllerCountResponse = ApiVVersionODataControllerCountResponses[keyof ApiVVersionODataControllerCountResponses];\n\nexport type GetApiVbyApiVersionSimpleOperationData = {\n    body?: never;\n    path: {\n        /**\n         * foo in method\n         */\n        foo_param: string;\n    };\n    query?: never;\n    url: '/api/v{api-version}/simple:operation';\n};\n\nexport type GetApiVbyApiVersionSimpleOperationErrors = {\n    /**\n     * Default error response\n     */\n    default: ModelWithBoolean;\n};\n\nexport type GetApiVbyApiVersionSimpleOperationError = GetApiVbyApiVersionSimpleOperationErrors[keyof GetApiVbyApiVersionSimpleOperationErrors];\n\nexport type GetApiVbyApiVersionSimpleOperationResponses = {\n    /**\n     * Response is a simple number\n     */\n    200: number;\n};\n\nexport type GetApiVbyApiVersionSimpleOperationResponse = GetApiVbyApiVersionSimpleOperationResponses[keyof GetApiVbyApiVersionSimpleOperationResponses];\n\nexport type DeleteCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type GetCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type HeadCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type OptionsCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type PatchCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type PostCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type PutCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type DeleteFooData3 = {\n    body?: never;\n    headers: {\n        /**\n         * Parameter with illegal characters\n         */\n        'x-Foo-Bar': ModelWithString;\n    };\n    path: {\n        /**\n         * foo in method\n         */\n        foo_param: string;\n        /**\n         * bar in method\n         */\n        BarParam: string;\n    };\n    query?: never;\n    url: '/api/v{api-version}/foo/{foo_param}/bar/{BarParam}';\n};\n\nexport type CallWithDescriptionsData = {\n    body?: never;\n    path?: never;\n    query?: {\n        /**\n         * Testing multiline comments in string: First line\n         * Second line\n         *\n         * Fourth line\n         */\n        parameterWithBreaks?: string;\n        /**\n         * Testing backticks in string: `backticks` and ```multiple backticks``` should work\n         */\n        parameterWithBackticks?: string;\n        /**\n         * Testing slashes in string: \\backwards\\\\\\ and /forwards/// should work\n         */\n        parameterWithSlashes?: string;\n        /**\n         * Testing expression placeholders in string: ${expression} should work\n         */\n        parameterWithExpressionPlaceholders?: string;\n        /**\n         * Testing quotes in string: 'single quote''' and \"double quotes\"\"\" should work\n         */\n        parameterWithQuotes?: string;\n        /**\n         * Testing reserved characters in string: * inline * and ** inline ** should work\n         */\n        parameterWithReservedCharacters?: string;\n    };\n    url: '/api/v{api-version}/descriptions';\n};\n\nexport type DeprecatedCallData = {\n    body?: never;\n    headers: {\n        /**\n         * This parameter is deprecated\n         *\n         * @deprecated\n         */\n        parameter: DeprecatedModel | null;\n    };\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/parameters/deprecated';\n};\n\nexport type CallWithParametersData = {\n    /**\n     * This is the parameter that goes into the body\n     */\n    body: {\n        [key: string]: unknown;\n    } | null;\n    headers: {\n        /**\n         * This is the parameter that goes into the header\n         */\n        parameterHeader: string | null;\n    };\n    path: {\n        /**\n         * This is the parameter that goes into the path\n         */\n        parameterPath: string | null;\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string | null;\n    };\n    query: {\n        foo_ref_enum?: ModelWithNestedArrayEnumsDataFoo;\n        foo_all_of_enum: ModelWithNestedArrayEnumsDataFoo;\n        /**\n         * This is the parameter that goes into the query params\n         */\n        cursor: string | null;\n    };\n    url: '/api/v{api-version}/parameters/{parameterPath}';\n};\n\nexport type CallWithWeirdParameterNamesData = {\n    /**\n     * This is the parameter that goes into the body\n     */\n    body: ModelWithString | null;\n    headers: {\n        /**\n         * This is the parameter that goes into the request header\n         */\n        'parameter.header': string | null;\n    };\n    path: {\n        /**\n         * This is the parameter that goes into the path\n         */\n        'parameter.path.1'?: string;\n        /**\n         * This is the parameter that goes into the path\n         */\n        'parameter-path-2'?: string;\n        /**\n         * This is the parameter that goes into the path\n         */\n        'PARAMETER-PATH-3'?: string;\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string | null;\n    };\n    query: {\n        /**\n         * This is the parameter with a reserved keyword\n         */\n        default?: string;\n        /**\n         * This is the parameter that goes into the request query params\n         */\n        'parameter-query': string | null;\n    };\n    url: '/api/v{api-version}/parameters/{parameter.path.1}/{parameter-path-2}/{PARAMETER-PATH-3}';\n};\n\nexport type GetCallWithOptionalParamData = {\n    /**\n     * This is a required parameter\n     */\n    body: ModelWithOneOfEnum;\n    path?: never;\n    query?: {\n        /**\n         * This is an optional parameter\n         */\n        page?: number;\n    };\n    url: '/api/v{api-version}/parameters';\n};\n\nexport type PostCallWithOptionalParamData = {\n    /**\n     * This is an optional parameter\n     */\n    body?: {\n        offset?: number | null;\n    };\n    path?: never;\n    query: {\n        /**\n         * This is a required parameter\n         */\n        parameter: Pageable;\n    };\n    url: '/api/v{api-version}/parameters';\n};\n\nexport type PostCallWithOptionalParamResponses = {\n    /**\n     * Response is a simple number\n     */\n    200: number;\n    /**\n     * Success\n     */\n    204: void;\n};\n\nexport type PostCallWithOptionalParamResponse = PostCallWithOptionalParamResponses[keyof PostCallWithOptionalParamResponses];\n\nexport type PostApiVbyApiVersionRequestBodyData = {\n    /**\n     * A reusable request body\n     */\n    body?: SimpleRequestBody;\n    path?: never;\n    query?: {\n        /**\n         * This is a reusable parameter\n         */\n        parameter?: string;\n    };\n    url: '/api/v{api-version}/requestBody';\n};\n\nexport type PostApiVbyApiVersionFormDataData = {\n    /**\n     * A reusable request body\n     */\n    body?: SimpleFormData;\n    path?: never;\n    query?: {\n        /**\n         * This is a reusable parameter\n         */\n        parameter?: string;\n    };\n    url: '/api/v{api-version}/formData';\n};\n\nexport type CallWithDefaultParametersData = {\n    body?: never;\n    path?: never;\n    query?: {\n        /**\n         * This is a simple string with default value\n         */\n        parameterString?: string | null;\n        /**\n         * This is a simple number with default value\n         */\n        parameterNumber?: number | null;\n        /**\n         * This is a simple boolean with default value\n         */\n        parameterBoolean?: boolean | null;\n        /**\n         * This is a simple enum with default value\n         */\n        parameterEnum?: 'Success' | 'Warning' | 'Error';\n        /**\n         * This is a simple model with default value\n         */\n        parameterModel?: ModelWithString | null;\n    };\n    url: '/api/v{api-version}/defaults';\n};\n\nexport type CallWithDefaultOptionalParametersData = {\n    body?: never;\n    path?: never;\n    query?: {\n        /**\n         * This is a simple string that is optional with default value\n         */\n        parameterString?: string;\n        /**\n         * This is a simple number that is optional with default value\n         */\n        parameterNumber?: number;\n        /**\n         * This is a simple boolean that is optional with default value\n         */\n        parameterBoolean?: boolean;\n        /**\n         * This is a simple enum that is optional with default value\n         */\n        parameterEnum?: 'Success' | 'Warning' | 'Error';\n        /**\n         * This is a simple model that is optional with default value\n         */\n        parameterModel?: ModelWithString;\n    };\n    url: '/api/v{api-version}/defaults';\n};\n\nexport type CallToTestOrderOfParamsData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * This is a optional string with default\n         */\n        parameterOptionalStringWithDefault?: string;\n        /**\n         * This is a optional string with empty default\n         */\n        parameterOptionalStringWithEmptyDefault?: string;\n        /**\n         * This is a optional string with no default\n         */\n        parameterOptionalStringWithNoDefault?: string;\n        /**\n         * This is a string with default\n         */\n        parameterStringWithDefault: string;\n        /**\n         * This is a string with empty default\n         */\n        parameterStringWithEmptyDefault: string;\n        /**\n         * This is a string with no default\n         */\n        parameterStringWithNoDefault: string;\n        /**\n         * This is a string that can be null with no default\n         */\n        parameterStringNullableWithNoDefault?: string | null;\n        /**\n         * This is a string that can be null with default\n         */\n        parameterStringNullableWithDefault?: string | null;\n    };\n    url: '/api/v{api-version}/defaults';\n};\n\nexport type DuplicateNameData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/duplicate';\n};\n\nexport type DuplicateName2Data = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/duplicate';\n};\n\nexport type DuplicateName3Data = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/duplicate';\n};\n\nexport type DuplicateName4Data = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/duplicate';\n};\n\nexport type CallWithNoContentResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no-content';\n};\n\nexport type CallWithNoContentResponseResponses = {\n    /**\n     * Success\n     */\n    204: void;\n};\n\nexport type CallWithNoContentResponseResponse = CallWithNoContentResponseResponses[keyof CallWithNoContentResponseResponses];\n\nexport type CallWithResponseAndNoContentResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multiple-tags/response-and-no-content';\n};\n\nexport type CallWithResponseAndNoContentResponseResponses = {\n    /**\n     * Response is a simple number\n     */\n    200: number;\n    /**\n     * Success\n     */\n    204: void;\n};\n\nexport type CallWithResponseAndNoContentResponseResponse = CallWithResponseAndNoContentResponseResponses[keyof CallWithResponseAndNoContentResponseResponses];\n\nexport type DummyAData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multiple-tags/a';\n};\n\nexport type DummyAResponses = {\n    200: _400;\n};\n\nexport type DummyAResponse = DummyAResponses[keyof DummyAResponses];\n\nexport type DummyBData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multiple-tags/b';\n};\n\nexport type DummyBResponses = {\n    /**\n     * Success\n     */\n    204: void;\n};\n\nexport type DummyBResponse = DummyBResponses[keyof DummyBResponses];\n\nexport type CallWithResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/response';\n};\n\nexport type CallWithResponseResponses = {\n    default: Import;\n};\n\nexport type CallWithResponseResponse = CallWithResponseResponses[keyof CallWithResponseResponses];\n\nexport type CallWithDuplicateResponsesData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/response';\n};\n\nexport type CallWithDuplicateResponsesErrors = {\n    /**\n     * Message for 500 error\n     */\n    500: ModelWithStringError;\n    /**\n     * Message for 501 error\n     */\n    501: ModelWithStringError;\n    /**\n     * Message for 502 error\n     */\n    502: ModelWithStringError;\n    /**\n     * Message for 4XX errors\n     */\n    '4XX': DictionaryWithArray;\n    /**\n     * Default error response\n     */\n    default: ModelWithBoolean;\n};\n\nexport type CallWithDuplicateResponsesError = CallWithDuplicateResponsesErrors[keyof CallWithDuplicateResponsesErrors];\n\nexport type CallWithDuplicateResponsesResponses = {\n    /**\n     * Message for 200 response\n     */\n    200: ModelWithBoolean & ModelWithInteger;\n    /**\n     * Message for 201 response\n     */\n    201: ModelWithString;\n    /**\n     * Message for 202 response\n     */\n    202: ModelWithString;\n};\n\nexport type CallWithDuplicateResponsesResponse = CallWithDuplicateResponsesResponses[keyof CallWithDuplicateResponsesResponses];\n\nexport type CallWithResponsesData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/response';\n};\n\nexport type CallWithResponsesErrors = {\n    /**\n     * Message for 500 error\n     */\n    500: ModelWithStringError;\n    /**\n     * Message for 501 error\n     */\n    501: ModelWithStringError;\n    /**\n     * Message for 502 error\n     */\n    502: ModelWithStringError;\n    /**\n     * Message for default response\n     */\n    default: ModelWithStringError;\n};\n\nexport type CallWithResponsesError = CallWithResponsesErrors[keyof CallWithResponsesErrors];\n\nexport type CallWithResponsesResponses = {\n    /**\n     * Message for 200 response\n     */\n    200: {\n        readonly '@namespace.string'?: string;\n        readonly '@namespace.integer'?: number;\n        readonly value?: Array<ModelWithString>;\n    };\n    /**\n     * Message for 201 response\n     */\n    201: ModelThatExtends;\n    /**\n     * Message for 202 response\n     */\n    202: ModelThatExtendsExtends;\n};\n\nexport type CallWithResponsesResponse = CallWithResponsesResponses[keyof CallWithResponsesResponses];\n\nexport type CollectionFormatData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * This is an array parameter that is sent as csv format (comma-separated values)\n         */\n        parameterArrayCSV: Array<string> | null;\n        /**\n         * This is an array parameter that is sent as ssv format (space-separated values)\n         */\n        parameterArraySSV: Array<string> | null;\n        /**\n         * This is an array parameter that is sent as tsv format (tab-separated values)\n         */\n        parameterArrayTSV: Array<string> | null;\n        /**\n         * This is an array parameter that is sent as pipes format (pipe-separated values)\n         */\n        parameterArrayPipes: Array<string> | null;\n        /**\n         * This is an array parameter that is sent as multi format (multiple parameter instances)\n         */\n        parameterArrayMulti: Array<string> | null;\n    };\n    url: '/api/v{api-version}/collectionFormat';\n};\n\nexport type TypesData = {\n    body?: never;\n    path?: {\n        /**\n         * This is a number parameter\n         */\n        id?: number;\n    };\n    query: {\n        /**\n         * This is a number parameter\n         */\n        parameterNumber: number;\n        /**\n         * This is a string parameter\n         */\n        parameterString: string | null;\n        /**\n         * This is a boolean parameter\n         */\n        parameterBoolean: boolean | null;\n        /**\n         * This is an object parameter\n         */\n        parameterObject: {\n            [key: string]: unknown;\n        } | null;\n        /**\n         * This is an array parameter\n         */\n        parameterArray: Array<string> | null;\n        /**\n         * This is a dictionary parameter\n         */\n        parameterDictionary: {\n            [key: string]: unknown;\n        } | null;\n        /**\n         * This is an enum parameter\n         */\n        parameterEnum: 'Success' | 'Warning' | 'Error' | null;\n    };\n    url: '/api/v{api-version}/types';\n};\n\nexport type TypesResponses = {\n    /**\n     * Response is a simple number\n     */\n    200: number;\n    /**\n     * Response is a simple string\n     */\n    201: string;\n    /**\n     * Response is a simple boolean\n     */\n    202: boolean;\n    /**\n     * Response is a simple object\n     */\n    203: {\n        [key: string]: unknown;\n    };\n};\n\nexport type TypesResponse = TypesResponses[keyof TypesResponses];\n\nexport type UploadFileData = {\n    body: Blob | File;\n    path: {\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string | null;\n    };\n    query?: never;\n    url: '/api/v{api-version}/upload';\n};\n\nexport type UploadFileResponses = {\n    200: boolean;\n};\n\nexport type UploadFileResponse = UploadFileResponses[keyof UploadFileResponses];\n\nexport type FileResponseData = {\n    body?: never;\n    path: {\n        id: string;\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string;\n    };\n    query?: never;\n    url: '/api/v{api-version}/file/{id}';\n};\n\nexport type FileResponseResponses = {\n    /**\n     * Success\n     */\n    200: Blob | File;\n};\n\nexport type FileResponseResponse = FileResponseResponses[keyof FileResponseResponses];\n\nexport type ComplexTypesData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * Parameter containing object\n         */\n        parameterObject: {\n            first?: {\n                second?: {\n                    third?: string;\n                };\n            };\n        };\n        /**\n         * Parameter containing reference\n         */\n        parameterReference: ModelWithString;\n    };\n    url: '/api/v{api-version}/complex';\n};\n\nexport type ComplexTypesErrors = {\n    /**\n     * 400 `server` error\n     */\n    400: unknown;\n    /**\n     * 500 server error\n     */\n    500: unknown;\n};\n\nexport type ComplexTypesResponses = {\n    /**\n     * Successful response\n     */\n    200: Array<ModelWithString>;\n};\n\nexport type ComplexTypesResponse = ComplexTypesResponses[keyof ComplexTypesResponses];\n\nexport type MultipartResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multipart';\n};\n\nexport type MultipartResponseResponses = {\n    /**\n     * OK\n     */\n    200: {\n        file?: Blob | File;\n        metadata?: {\n            foo?: string;\n            bar?: string;\n        };\n    };\n};\n\nexport type MultipartResponseResponse = MultipartResponseResponses[keyof MultipartResponseResponses];\n\nexport type MultipartRequestData = {\n    body?: {\n        content?: Blob | File;\n        data?: ModelWithString | null;\n    };\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multipart';\n};\n\nexport type ComplexParamsData = {\n    body?: {\n        readonly key: string | null;\n        name: string | null;\n        enabled?: boolean;\n        type: 'Monkey' | 'Horse' | 'Bird';\n        listOfModels?: Array<ModelWithString> | null;\n        listOfStrings?: Array<string> | null;\n        parameters: ModelWithString | ModelWithEnum | ModelWithArray | ModelWithDictionary;\n        readonly user?: {\n            readonly id?: number;\n            readonly name?: string | null;\n        };\n    };\n    path: {\n        id: number;\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string;\n    };\n    query?: never;\n    url: '/api/v{api-version}/complex/{id}';\n};\n\nexport type ComplexParamsResponses = {\n    /**\n     * Success\n     */\n    200: ModelWithString;\n};\n\nexport type ComplexParamsResponse = ComplexParamsResponses[keyof ComplexParamsResponses];\n\nexport type CallWithResultFromHeaderData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/header';\n};\n\nexport type CallWithResultFromHeaderErrors = {\n    /**\n     * 400 server error\n     */\n    400: unknown;\n    /**\n     * 500 server error\n     */\n    500: unknown;\n};\n\nexport type CallWithResultFromHeaderResponses = {\n    /**\n     * Successful response\n     */\n    200: unknown;\n};\n\nexport type TestErrorCodeData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * Status code to return\n         */\n        status: number;\n    };\n    url: '/api/v{api-version}/error';\n};\n\nexport type TestErrorCodeErrors = {\n    /**\n     * Custom message: Internal Server Error\n     */\n    500: unknown;\n    /**\n     * Custom message: Not Implemented\n     */\n    501: unknown;\n    /**\n     * Custom message: Bad Gateway\n     */\n    502: unknown;\n    /**\n     * Custom message: Service Unavailable\n     */\n    503: unknown;\n};\n\nexport type TestErrorCodeResponses = {\n    /**\n     * Custom message: Successful response\n     */\n    200: unknown;\n};\n\nexport type NonAsciiæøåÆøÅöôêÊ字符串Data = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * Dummy input param\n         */\n        nonAsciiParamæøåÆØÅöôêÊ: number;\n    };\n    url: '/api/v{api-version}/non-ascii-æøåÆØÅöôêÊ字符串';\n};\n\nexport type NonAsciiæøåÆøÅöôêÊ字符串Responses = {\n    /**\n     * Successful response\n     */\n    200: Array<NonAsciiStringæøåÆøÅöôêÊ字符串>;\n};\n\nexport type NonAsciiæøåÆøÅöôêÊ字符串Response = NonAsciiæøåÆøÅöôêÊ字符串Responses[keyof NonAsciiæøåÆøÅöôêÊ字符串Responses];\n\nexport type PutWithFormUrlEncodedData = {\n    body: ArrayWithStrings;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/non-ascii-æøåÆØÅöôêÊ字符串';\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-nuxt/base-url-number/client/client.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport { useAsyncData, useFetch, useLazyAsyncData, useLazyFetch } from 'nuxt/app';\nimport { reactive, ref, toValue, watch } from 'vue';\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 } from './types.gen';\nimport {\n  buildUrl,\n  createConfig,\n  executeFetchFn,\n  mergeConfigs,\n  mergeHeaders,\n  mergeInterceptors,\n  serializeBody,\n  setAuthParams,\n  unwrapRefs,\n} from './utils.gen';\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 beforeRequest = async (options: RequestOptions) => {\n    const opts = {\n      ..._config,\n      ...options,\n      $fetch: options.$fetch ?? _config.$fetch ?? $fetch,\n      headers: mergeHeaders(_config.headers, options.headers),\n      onRequest: mergeInterceptors(_config.onRequest, options.onRequest),\n      onResponse: mergeInterceptors(_config.onResponse, options.onResponse),\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    const url = buildUrl(opts);\n\n    return { opts, url };\n  };\n\n  const request: Client['request'] = ({ asyncDataOptions, composable = '$fetch', ...options }) => {\n    const key = options.key;\n    const opts = {\n      ..._config,\n      ...options,\n      $fetch: options.$fetch ?? _config.$fetch ?? $fetch,\n      headers: mergeHeaders(_config.headers, options.headers),\n      onRequest: mergeInterceptors(_config.onRequest, options.onRequest),\n      onResponse: mergeInterceptors(_config.onResponse, options.onResponse),\n    };\n\n    const { requestValidator, responseTransformer, responseValidator, security } = opts;\n    if (requestValidator || security) {\n      // auth must happen in interceptors otherwise we'd need to require\n      // asyncContext enabled\n      // https://nuxt.com/docs/guide/going-further/experimental-features#asynccontext\n      opts.onRequest = [\n        async ({ options }) => {\n          if (security) {\n            await setAuthParams({\n              auth: opts.auth,\n              headers: options.headers,\n              query: options.query,\n              security,\n            });\n          }\n\n          if (requestValidator) {\n            await requestValidator({\n              ...options,\n              // @ts-expect-error\n              body: options.rawBody,\n            });\n          }\n        },\n        ...opts.onRequest,\n      ];\n    }\n\n    if (responseTransformer || responseValidator) {\n      opts.onResponse = [\n        ...opts.onResponse,\n        async ({ options, response }) => {\n          if (options.responseType && options.responseType !== 'json') {\n            return;\n          }\n\n          if (!response.ok) {\n            return;\n          }\n\n          if (responseValidator) {\n            await responseValidator(response._data);\n          }\n\n          if (responseTransformer) {\n            response._data = await responseTransformer(response._data);\n          }\n        },\n      ];\n    }\n\n    // remove Content-Type header if body is empty to avoid sending invalid requests\n    if (opts.body === undefined || opts.body === '') {\n      opts.headers.delete('Content-Type');\n    }\n\n    const fetchFn = opts.$fetch;\n\n    if (composable === '$fetch') {\n      return executeFetchFn(\n        // @ts-expect-error\n        opts,\n        fetchFn,\n      );\n    }\n\n    if (composable === 'useFetch' || composable === 'useLazyFetch') {\n      opts.rawBody = opts.body;\n      const bodyParams = reactive({\n        body: opts.body,\n        bodySerializer: opts.bodySerializer,\n      });\n      const body = ref(serializeBody({ ...opts, body: toValue(opts.body) }));\n      opts.body = body;\n      watch(bodyParams, (changed) => {\n        body.value = serializeBody(changed);\n      });\n      return composable === 'useLazyFetch'\n        ? useLazyFetch(() => buildUrl(opts), { ...opts, ...asyncDataOptions })\n        : useFetch(() => buildUrl(opts), { ...opts, ...asyncDataOptions });\n    }\n\n    const handler: any = () =>\n      executeFetchFn(\n        // @ts-expect-error\n        opts,\n        fetchFn,\n      );\n\n    if (composable === 'useAsyncData') {\n      return key\n        ? useAsyncData(key, handler, asyncDataOptions)\n        : useAsyncData(handler, asyncDataOptions);\n    }\n\n    if (composable === 'useLazyAsyncData') {\n      return key\n        ? useLazyAsyncData(key, handler, asyncDataOptions)\n        : useLazyAsyncData(handler, asyncDataOptions);\n    }\n\n    return undefined as any;\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      ...unwrapRefs(opts),\n      body: opts.body as BodyInit | null | undefined,\n      method,\n      onRequest: undefined,\n      serializedBody: getValidRequestBody(opts) as BodyInit | null | undefined,\n      signal: unwrapRefs(opts.signal) as AbortSignal,\n      url,\n    });\n  };\n\n  const _buildUrl: Client['buildUrl'] = (options) =>\n    buildUrl({ ..._config, ...options } as typeof 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    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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-nuxt/base-url-number/client/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type { Auth } from '../core/auth.gen';\nexport type { QuerySerializerOptions } from '../core/bodySerializer.gen';\nexport {\n  formDataBodySerializer,\n  jsonBodySerializer,\n  urlSearchParamsBodySerializer,\n} from '../core/bodySerializer.gen';\nexport { buildClientParams } from '../core/params.gen';\nexport { serializeQueryKeyValue } from '../core/queryKeySerializer.gen';\nexport { createClient } from './client.gen';\nexport type {\n  Client,\n  ClientOptions,\n  Composable,\n  Config,\n  CreateClientConfig,\n  Options,\n  RequestOptions,\n  RequestResult,\n  TDataShape,\n} from './types.gen';\nexport { createConfig } from './utils.gen';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-nuxt/base-url-number/client/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type {\n  AsyncDataOptions,\n  useAsyncData,\n  useFetch,\n  UseFetchOptions,\n  useLazyAsyncData,\n  useLazyFetch,\n} from 'nuxt/app';\nimport type { Ref } from 'vue';\n\nimport type { Auth } from '../core/auth.gen';\nimport type { QuerySerializerOptions } from '../core/bodySerializer.gen';\nimport type {\n  ServerSentEventsOptions,\n  ServerSentEventsResult,\n} from '../core/serverSentEvents.gen';\nimport type { Client as CoreClient, Config as CoreConfig } from '../core/types.gen';\n\nexport type ArraySeparatorStyle = ArrayStyle | MatrixStyle;\ntype ArrayStyle = 'form' | 'spaceDelimited' | 'pipeDelimited';\ntype MatrixStyle = 'label' | 'matrix' | 'simple';\nexport type ObjectSeparatorStyle = ObjectStyle | MatrixStyle;\ntype ObjectStyle = 'form' | 'deepObject';\n\nexport type QuerySerializer = (query: Parameters<Client['buildUrl']>[0]['query']) => string;\n\ntype WithRefs<TData> = {\n  [K in keyof TData]: NonNullable<TData[K]> extends object\n    ? WithRefs<NonNullable<TData[K]>> | Ref<NonNullable<TData[K]>> | Extract<TData[K], null>\n    : NonNullable<TData[K]> | Ref<NonNullable<TData[K]>> | Extract<TData[K], null>;\n};\n\n// copied from Nuxt\nexport type KeysOf<T> = Array<T extends T ? (keyof T extends string ? keyof T : never) : never>;\n\nexport interface Config<T extends ClientOptions = ClientOptions>\n  extends\n    Omit<FetchOptions<unknown>, 'baseURL' | 'body' | 'headers' | 'method' | 'query'>,\n    WithRefs<Pick<FetchOptions<unknown>, 'query'>>,\n    Omit<CoreConfig, 'querySerializer'> {\n  /**\n   * Base URL for all requests made by this client.\n   */\n  baseURL?: T['baseURL'];\n  /**\n   * A function for serializing request query parameters. By default, arrays\n   * will be exploded in form style, objects will be exploded in deepObject\n   * style, and reserved characters are percent-encoded.\n   *\n   * {@link https://swagger.io/docs/specification/serialization/#query View examples}\n   */\n  querySerializer?: QuerySerializer | QuerySerializerOptions;\n}\n\nexport interface RequestOptions<\n  TComposable extends Composable = '$fetch',\n  ResT = unknown,\n  DefaultT = undefined,\n  Url extends string = string,\n>\n  extends\n    Config,\n    WithRefs<{\n      path?: FetchOptions<unknown>['query'];\n      query?: FetchOptions<unknown>['query'];\n    }>,\n    Pick<\n      ServerSentEventsOptions<ResT>,\n      | 'onSseError'\n      | 'onSseEvent'\n      | 'sseDefaultRetryDelay'\n      | 'sseMaxRetryAttempts'\n      | 'sseMaxRetryDelay'\n    > {\n  asyncDataOptions?: AsyncDataOptions<ResT, ResT, KeysOf<ResT>, DefaultT>;\n  /**\n   * Any body that you want to add to your request.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/fetch#body}\n   */\n  body?: NonNullable<unknown> | Ref<NonNullable<unknown>> | null;\n  composable?: TComposable;\n  key?: string;\n  rawBody?: NonNullable<unknown> | Ref<NonNullable<unknown>> | null;\n  /**\n   * Security mechanism(s) to use for the request.\n   */\n  security?: ReadonlyArray<Auth>;\n  url: Url;\n}\n\nexport type RequestResult<\n  TComposable extends Composable,\n  ResT,\n  TError,\n> = TComposable extends '$fetch'\n  ? ReturnType<typeof $fetch<ResT>>\n  : TComposable extends 'useAsyncData'\n    ? ReturnType<typeof useAsyncData<ResT | null, TError>>\n    : TComposable extends 'useFetch'\n      ? ReturnType<typeof useFetch<ResT | null, TError>>\n      : TComposable extends 'useLazyAsyncData'\n        ? ReturnType<typeof useLazyAsyncData<ResT | null, TError>>\n        : TComposable extends 'useLazyFetch'\n          ? ReturnType<typeof useLazyFetch<ResT | null, TError>>\n          : never;\n\nexport interface ClientOptions {\n  baseURL?: string;\n}\n\ntype MethodFn = <\n  TComposable extends Composable = '$fetch',\n  ResT = unknown,\n  TError = unknown,\n  DefaultT = undefined,\n>(\n  options: Omit<RequestOptions<TComposable, ResT, DefaultT>, 'method'>,\n) => RequestResult<TComposable, ResT, TError>;\n\ntype SseFn = <\n  TComposable extends Composable = '$fetch',\n  ResT = unknown,\n  TError = unknown,\n  DefaultT = undefined,\n>(\n  options: Omit<RequestOptions<TComposable, ResT, DefaultT>, 'method'>,\n) => Promise<ServerSentEventsResult<RequestResult<TComposable, ResT, TError>>>;\n\ntype RequestFn = <\n  TComposable extends Composable = '$fetch',\n  ResT = unknown,\n  TError = unknown,\n  DefaultT = undefined,\n>(\n  options: Omit<RequestOptions<TComposable, ResT, DefaultT>, 'method'> &\n    Pick<Required<RequestOptions<TComposable, ResT, DefaultT>>, 'method'>,\n) => RequestResult<TComposable, ResT, TError>;\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 = ClientOptions> = (\n  override?: Config<ClientOptions & T>,\n) => Config<Required<ClientOptions> & T>;\n\nexport interface TDataShape {\n  body?: unknown;\n  headers?: unknown;\n  path?: FetchOptions<unknown>['query'];\n  query?: FetchOptions<unknown>['query'];\n  url: string;\n}\n\nexport type BuildUrlOptions<\n  TData extends Omit<TDataShape, 'headers'> = Omit<TDataShape, 'headers'>,\n> = Pick<WithRefs<TData>, 'path' | 'query'> &\n  Pick<TData, 'url'> &\n  Pick<Options<'$fetch', TData>, 'baseURL' | 'querySerializer'>;\n\ntype BuildUrlFn = <TData extends Omit<TDataShape, 'headers'>>(\n  options: BuildUrlOptions<TData>,\n) => string;\n\nexport type Client = CoreClient<RequestFn, Config, MethodFn, BuildUrlFn, SseFn>;\n\ntype OmitKeys<T, K> = Pick<T, Exclude<keyof T, K>>;\n\nexport type Options<\n  TComposable extends Composable = '$fetch',\n  TData extends TDataShape = TDataShape,\n  ResT = unknown,\n  DefaultT = undefined,\n> = OmitKeys<RequestOptions<TComposable, ResT, DefaultT>, 'body' | 'path' | 'query' | 'url'> &\n  ([TData] extends [never] ? unknown : WithRefs<Omit<TData, 'url'>>);\n\ntype FetchOptions<TData> = Omit<UseFetchOptions<TData, TData>, keyof AsyncDataOptions<TData>>;\n\nexport type Composable =\n  | '$fetch'\n  | 'useAsyncData'\n  | 'useFetch'\n  | 'useLazyAsyncData'\n  | 'useLazyFetch';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-nuxt/base-url-number/client/utils.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { ComputedRef, Ref } from 'vue';\nimport { isRef, toValue, unref } from 'vue';\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 type {\n  ArraySeparatorStyle,\n  BuildUrlOptions,\n  Client,\n  ClientOptions,\n  Config,\n  QuerySerializer,\n  RequestOptions,\n} from './types.gen';\n\ntype PathSerializer = Pick<Required<BuildUrlOptions>, 'path' | 'url'>;\n\nconst PATH_PARAM_RE = /\\{[^{}]+\\}/g;\n\ntype MaybeArray<T> = T | T[];\n\nconst 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 = toValue((toValue(path) as Record<string, unknown> | undefined)?.[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 createQuerySerializer = <T = unknown>({\n  parameters = {},\n  ...args\n}: QuerySerializerOptions = {}) => {\n  const querySerializer = (queryParams: T) => {\n    const search: string[] = [];\n    const qParams = toValue(queryParams);\n    if (qParams && typeof qParams === 'object') {\n      for (const name in qParams) {\n        const value = toValue(qParams[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\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    (toValue(options.query) as Record<string, unknown> | undefined)?.[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    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        const queryValue = toValue(options.query) as Record<string, unknown> | undefined;\n        if (queryValue) {\n          queryValue[name] = token;\n        }\n        break;\n      }\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  const url = 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  return url;\n};\n\nexport const getUrl = ({\n  baseUrl,\n  path,\n  query,\n  querySerializer,\n  url: _url,\n}: Pick<BuildUrlOptions, 'path' | 'query' | 'url'> & {\n  baseUrl?: string;\n  querySerializer: QuerySerializer;\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 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 || typeof header !== 'object') {\n      continue;\n    }\n\n    let h: unknown = header;\n    if (isRef(h)) {\n      h = unref(h);\n    }\n\n    const iterator =\n      h instanceof Headers ? headersEntries(h) : Object.entries(h as Record<string, unknown>);\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, unwrapRefs(v) as string);\n        }\n      } else if (value !== undefined) {\n        const v = unwrapRefs(value);\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(key, typeof v === 'object' ? JSON.stringify(v) : (v as string));\n      }\n    }\n  }\n  return mergedHeaders;\n};\n\nexport const mergeInterceptors = <T>(...args: Array<MaybeArray<T>>): Array<T> =>\n  args.reduce<Array<T>>((acc, item) => {\n    if (typeof item === 'function') {\n      acc.push(item);\n    } else if (Array.isArray(item)) {\n      return acc.concat(item);\n    }\n    return acc;\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  querySerializer: defaultQuerySerializer,\n  ...override,\n});\n\ntype UnwrapRefs<T> =\n  T extends Ref<infer V>\n    ? V\n    : T extends ComputedRef<infer V>\n      ? V\n      : T extends Record<string, unknown> // this doesn't handle functions well\n        ? { [K in keyof T]: UnwrapRefs<T[K]> }\n        : T;\n\nexport const unwrapRefs = <T>(value: T): UnwrapRefs<T> => {\n  if (value === null || typeof value !== 'object' || value instanceof Headers) {\n    return (isRef(value) ? unref(value) : value) as UnwrapRefs<T>;\n  }\n\n  if (\n    value instanceof Blob ||\n    value instanceof FormData ||\n    value instanceof ReadableStream ||\n    value instanceof AbortSignal\n  ) {\n    return value as UnwrapRefs<T>;\n  }\n\n  if (Array.isArray(value)) {\n    return value.map((item) => unwrapRefs(item)) as UnwrapRefs<T>;\n  }\n\n  if (isRef(value)) {\n    return unwrapRefs(unref(value) as T);\n  }\n\n  // unwrap into new object to avoid modifying the source\n  const result: Record<string, unknown> = {};\n  for (const key in value) {\n    result[key] = unwrapRefs(value[key] as T);\n  }\n  return result as UnwrapRefs<T>;\n};\n\nexport const serializeBody = (\n  opts: Pick<Parameters<Client['request']>[0], 'body' | 'bodySerializer'>,\n) => {\n  if (opts.body && opts.bodySerializer) {\n    return opts.bodySerializer(opts.body);\n  }\n  return opts.body;\n};\n\nexport const executeFetchFn = (\n  opts: Omit<Parameters<Client['request']>[0], 'composable'>,\n  fetchFn: Required<Config>['$fetch'],\n) => {\n  const unwrappedOpts = unwrapRefs(opts);\n  unwrappedOpts.rawBody = unwrappedOpts.body;\n  unwrappedOpts.body = serializeBody(unwrappedOpts);\n  return fetchFn(\n    buildUrl(opts),\n    // @ts-expect-error\n    unwrappedOpts,\n  );\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-nuxt/base-url-number/client.gen.ts",
    "content": "// 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: 'http://localhost:3000/base' }));\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-nuxt/base-url-number/core/auth.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-nuxt/base-url-number/core/bodySerializer.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-nuxt/base-url-number/core/params.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-nuxt/base-url-number/core/pathSerializer.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-nuxt/base-url-number/core/queryKeySerializer.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\n/**\n * JSON-friendly union that mirrors what Pinia Colada can hash.\n */\nexport type JsonValue =\n  | null\n  | string\n  | number\n  | boolean\n  | JsonValue[]\n  | { [key: string]: JsonValue };\n\n/**\n * Replacer that converts non-JSON values (bigint, Date, etc.) to safe substitutes.\n */\nexport const queryKeyJsonReplacer = (_key: string, value: unknown) => {\n  if (value === undefined || typeof value === 'function' || typeof value === 'symbol') {\n    return undefined;\n  }\n  if (typeof value === 'bigint') {\n    return value.toString();\n  }\n  if (value instanceof Date) {\n    return value.toISOString();\n  }\n  return value;\n};\n\n/**\n * Safely stringifies a value and parses it back into a JsonValue.\n */\nexport const stringifyToJsonValue = (input: unknown): JsonValue | undefined => {\n  try {\n    const json = JSON.stringify(input, queryKeyJsonReplacer);\n    if (json === undefined) {\n      return undefined;\n    }\n    return JSON.parse(json) as JsonValue;\n  } catch {\n    return undefined;\n  }\n};\n\n/**\n * Detects plain objects (including objects with a null prototype).\n */\nconst isPlainObject = (value: unknown): value is Record<string, unknown> => {\n  if (value === null || typeof value !== 'object') {\n    return false;\n  }\n  const prototype = Object.getPrototypeOf(value as object);\n  return prototype === Object.prototype || prototype === null;\n};\n\n/**\n * Turns URLSearchParams into a sorted JSON object for deterministic keys.\n */\nconst serializeSearchParams = (params: URLSearchParams): JsonValue => {\n  const entries = Array.from(params.entries()).sort(([a], [b]) => a.localeCompare(b));\n  const result: Record<string, JsonValue> = {};\n\n  for (const [key, value] of entries) {\n    const existing = result[key];\n    if (existing === undefined) {\n      result[key] = value;\n      continue;\n    }\n\n    if (Array.isArray(existing)) {\n      (existing as string[]).push(value);\n    } else {\n      result[key] = [existing, value];\n    }\n  }\n\n  return result;\n};\n\n/**\n * Normalizes any accepted value into a JSON-friendly shape for query keys.\n */\nexport const serializeQueryKeyValue = (value: unknown): JsonValue | undefined => {\n  if (value === null) {\n    return null;\n  }\n\n  if (typeof value === 'string' || typeof value === 'number' || typeof value === 'boolean') {\n    return value;\n  }\n\n  if (value === undefined || typeof value === 'function' || typeof value === 'symbol') {\n    return undefined;\n  }\n\n  if (typeof value === 'bigint') {\n    return value.toString();\n  }\n\n  if (value instanceof Date) {\n    return value.toISOString();\n  }\n\n  if (Array.isArray(value)) {\n    return stringifyToJsonValue(value);\n  }\n\n  if (typeof URLSearchParams !== 'undefined' && value instanceof URLSearchParams) {\n    return serializeSearchParams(value);\n  }\n\n  if (isPlainObject(value)) {\n    return stringifyToJsonValue(value);\n  }\n\n  return undefined;\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-nuxt/base-url-number/core/serverSentEvents.gen.ts",
    "content": "// 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 const 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            // Normalize line endings: CRLF -> LF, then CR -> LF\n            buffer = buffer.replace(/\\r\\n/g, '\\n').replace(/\\r/g, '\\n');\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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-nuxt/base-url-number/core/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { Auth, AuthToken } from './auth.gen';\nimport type { BodySerializer, QuerySerializer, QuerySerializerOptions } from './bodySerializer.gen';\n\nexport type HttpMethod =\n  | 'connect'\n  | 'delete'\n  | 'get'\n  | 'head'\n  | 'options'\n  | 'patch'\n  | 'post'\n  | 'put'\n  | 'trace';\n\nexport type Client<\n  RequestFn = never,\n  Config = unknown,\n  MethodFn = never,\n  BuildUrlFn = never,\n  SseFn = never,\n> = {\n  /**\n   * Returns the final request URL.\n   */\n  buildUrl: BuildUrlFn;\n  getConfig: () => Config;\n  request: RequestFn;\n  setConfig: (config: Config) => Config;\n} & {\n  [K in HttpMethod]: MethodFn;\n} & ([SseFn] extends [never] ? { sse?: never } : { sse: { [K in HttpMethod]: SseFn } });\n\nexport interface Config {\n  /**\n   * Auth token or a function returning auth token. The resolved value will be\n   * added to the request payload as defined by its `security` array.\n   */\n  auth?: ((auth: Auth) => Promise<AuthToken> | AuthToken) | AuthToken;\n  /**\n   * A function for serializing request body parameter. By default,\n   * {@link JSON.stringify()} will be used.\n   */\n  bodySerializer?: BodySerializer | null;\n  /**\n   * An object containing any HTTP headers that you want to pre-populate your\n   * `Headers` object with.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/Headers/Headers#init See more}\n   */\n  headers?:\n    | RequestInit['headers']\n    | Record<\n        string,\n        string | number | boolean | (string | number | boolean)[] | null | undefined | unknown\n      >;\n  /**\n   * The request method.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/fetch#method See more}\n   */\n  method?: Uppercase<HttpMethod>;\n  /**\n   * A function for serializing request query parameters. By default, arrays\n   * will be exploded in form style, objects will be exploded in deepObject\n   * style, and reserved characters are percent-encoded.\n   *\n   * This method will have no effect if the native `paramsSerializer()` Axios\n   * API function is used.\n   *\n   * {@link https://swagger.io/docs/specification/serialization/#query View examples}\n   */\n  querySerializer?: QuerySerializer | QuerySerializerOptions;\n  /**\n   * A function validating request data. This is useful if you want to ensure\n   * the request conforms to the desired shape, so it can be safely sent to\n   * the server.\n   */\n  requestValidator?: (data: unknown) => Promise<unknown>;\n  /**\n   * A function transforming response data before it's returned. This is useful\n   * for post-processing data, e.g. converting ISO strings into Date objects.\n   */\n  responseTransformer?: (data: unknown) => Promise<unknown>;\n  /**\n   * A function validating response data. This is useful if you want to ensure\n   * the response conforms to the desired shape, so it can be safely passed to\n   * the transformers and returned to the user.\n   */\n  responseValidator?: (data: unknown) => Promise<unknown>;\n}\n\ntype IsExactlyNeverOrNeverUndefined<T> = [T] extends [never]\n  ? true\n  : [T] extends [never | undefined]\n    ? [undefined] extends [T]\n      ? false\n      : true\n    : false;\n\nexport type OmitNever<T extends Record<string, unknown>> = {\n  [K in keyof T as IsExactlyNeverOrNeverUndefined<T[K]> extends true ? never : K]: T[K];\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-nuxt/base-url-number/core/utils.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-nuxt/base-url-number/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type { _3eNum1Период, _400, AdditionalPropertiesIntegerIssue, AdditionalPropertiesUnknownIssue, AdditionalPropertiesUnknownIssue2, AdditionalPropertiesUnknownIssue3, AdditionalPropertiesUnknownIssueWritable, AnyOfAnyAndNull, AnyOfArrays, ApiVVersionODataControllerCountData, ApiVVersionODataControllerCountResponse, ApiVVersionODataControllerCountResponses, ArrayWithAnyOfProperties, ArrayWithArray, ArrayWithBooleans, ArrayWithNumbers, ArrayWithProperties, ArrayWithReferences, ArrayWithStrings, CallToTestOrderOfParamsData, CallWithDefaultOptionalParametersData, CallWithDefaultParametersData, CallWithDescriptionsData, CallWithDuplicateResponsesData, CallWithDuplicateResponsesError, CallWithDuplicateResponsesErrors, CallWithDuplicateResponsesResponse, CallWithDuplicateResponsesResponses, CallWithNoContentResponseData, CallWithNoContentResponseResponse, CallWithNoContentResponseResponses, CallWithParametersData, CallWithResponseAndNoContentResponseData, CallWithResponseAndNoContentResponseResponse, CallWithResponseAndNoContentResponseResponses, CallWithResponseData, CallWithResponseResponse, CallWithResponseResponses, CallWithResponsesData, CallWithResponsesError, CallWithResponsesErrors, CallWithResponsesResponse, CallWithResponsesResponses, CallWithResultFromHeaderData, CallWithResultFromHeaderErrors, CallWithResultFromHeaderResponses, CallWithWeirdParameterNamesData, CamelCaseCommentWithBreaks, CharactersInDescription, ClientOptions, CollectionFormatData, CommentWithBackticks, CommentWithBackticksAndQuotes, CommentWithBreaks, CommentWithExpressionPlaceholders, CommentWithQuotes, CommentWithReservedCharacters, CommentWithSlashes, ComplexParamsData, ComplexParamsResponse, ComplexParamsResponses, ComplexTypesData, ComplexTypesErrors, ComplexTypesResponse, ComplexTypesResponses, CompositionBaseModel, CompositionExtendedModel, CompositionWithAllOfAndNullable, CompositionWithAnyOf, CompositionWithAnyOfAndNullable, CompositionWithAnyOfAnonymous, CompositionWithNestedAnyAndTypeNull, CompositionWithNestedAnyOfAndNull, CompositionWithOneOf, CompositionWithOneOfAndComplexArrayDictionary, CompositionWithOneOfAndNullable, CompositionWithOneOfAndProperties, CompositionWithOneOfAndSimpleArrayDictionary, CompositionWithOneOfAndSimpleDictionary, CompositionWithOneOfAnonymous, CompositionWithOneOfDiscriminator, ConstValue, Default, DeleteCallWithoutParametersAndResponseData, DeleteFooData, DeleteFooData2, DeleteFooData3, DeprecatedCallData, DeprecatedModel, DictionaryWithArray, DictionaryWithDictionary, DictionaryWithProperties, DictionaryWithPropertiesAndAdditionalProperties, DictionaryWithReference, DictionaryWithString, DummyAData, DummyAResponse, DummyAResponses, DummyBData, DummyBResponse, DummyBResponses, DuplicateName2Data, DuplicateName3Data, DuplicateName4Data, DuplicateNameData, EnumFromDescription, EnumWithExtensions, EnumWithNumbers, EnumWithReplacedCharacters, EnumWithStrings, EnumWithXEnumNames, ExportData, ExternalRefA, ExternalRefB, ExternalSharedModel, File, FileResponseData, FileResponseResponse, FileResponseResponses, FileWritable, FooWowData, FooWowResponses, FreeFormObjectWithAdditionalPropertiesEqEmptyObject, FreeFormObjectWithAdditionalPropertiesEqTrue, FreeFormObjectWithoutAdditionalProperties, GenericSchemaDuplicateIssue1SystemBoolean, GenericSchemaDuplicateIssue1SystemBooleanWritable, GenericSchemaDuplicateIssue1SystemString, GenericSchemaDuplicateIssue1SystemStringWritable, GetApiVbyApiVersionSimpleOperationData, GetApiVbyApiVersionSimpleOperationError, GetApiVbyApiVersionSimpleOperationErrors, GetApiVbyApiVersionSimpleOperationResponse, GetApiVbyApiVersionSimpleOperationResponses, GetCallWithOptionalParamData, GetCallWithoutParametersAndResponseData, HeadCallWithoutParametersAndResponseData, Import, ImportData, ImportResponse, ImportResponses, IoK8sApimachineryPkgApisMetaV1DeleteOptions, IoK8sApimachineryPkgApisMetaV1Preconditions, ModelCircle, ModelFromZendesk, ModelSquare, ModelThatExtends, ModelThatExtendsExtends, ModelWithAdditionalPropertiesEqTrue, ModelWithAdditionalPropertiesRef, ModelWithAnyOfConstantSizeArray, ModelWithAnyOfConstantSizeArrayAndIntersect, ModelWithAnyOfConstantSizeArrayNullable, ModelWithAnyOfConstantSizeArrayWithNSizeAndOptions, ModelWithAnyOfConstantSizeArrayWithNSizeAndOptionsWritable, ModelWithArray, ModelWithArrayReadOnlyAndWriteOnly, ModelWithArrayReadOnlyAndWriteOnlyWritable, ModelWithBackticksInDescription, ModelWithBoolean, ModelWithCircularReference, ModelWithConst, ModelWithConstantSizeArray, ModelWithDictionary, ModelWithDuplicateImports, ModelWithDuplicateProperties, ModelWithEnum, ModelWithEnumFromDescription, ModelWithEnumWithHyphen, ModelWithInteger, ModelWithNestedArrayEnums, ModelWithNestedArrayEnumsData, ModelWithNestedArrayEnumsDataBar, ModelWithNestedArrayEnumsDataFoo, ModelWithNestedCompositionEnums, ModelWithNestedEnums, ModelWithNestedProperties, ModelWithNullableObject, ModelWithNullableString, ModelWithNumericEnumUnion, ModelWithOneOfAndProperties, ModelWithOneOfEnum, ModelWithOrderedProperties, ModelWithPattern, ModelWithPatternWritable, ModelWithPrefixItemsConstantSizeArray, ModelWithProperties, ModelWithPropertiesWritable, ModelWithReadOnlyAndWriteOnly, ModelWithReadOnlyAndWriteOnlyWritable, ModelWithReference, ModelWithReferenceWritable, ModelWithString, ModelWithStringError, MultipartRequestData, MultipartResponseData, MultipartResponseResponse, MultipartResponseResponses, NestedAnyOfArraysNullable, NonAsciiæøåÆøÅöôêÊ字符串Data, NonAsciiæøåÆøÅöôêÊ字符串Response, NonAsciiæøåÆøÅöôêÊ字符串Responses, NonAsciiStringæøåÆøÅöôêÊ字符串, NullableObject, OneOfAllOfIssue, OneOfAllOfIssueWritable, OptionsCallWithoutParametersAndResponseData, Pageable, ParameterSimpleParameterUnused, PatchApiVbyApiVersionNoTagData, PatchApiVbyApiVersionNoTagResponses, PatchCallWithoutParametersAndResponseData, PostApiVbyApiVersionFormDataData, PostApiVbyApiVersionRequestBodyData, PostCallWithOptionalParamData, PostCallWithOptionalParamResponse, PostCallWithOptionalParamResponses, PostCallWithoutParametersAndResponseData, PostServiceWithEmptyTagResponse, PostServiceWithEmptyTagResponse2, PutCallWithoutParametersAndResponseData, PutWithFormUrlEncodedData, SchemaWithFormRestrictedKeys, SimpleBoolean, SimpleFile, SimpleFormData, SimpleInteger, SimpleParameter, SimpleReference, SimpleRequestBody, SimpleString, SimpleStringWithPattern, TestErrorCodeData, TestErrorCodeErrors, TestErrorCodeResponses, TypesData, TypesResponse, TypesResponses, UploadFileData, UploadFileResponse, UploadFileResponses, XFooBar } from './types.gen';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-nuxt/base-url-number/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type ClientOptions = {\n    baseURL: 'http://localhost:3000/base' | (string & {});\n};\n\n/**\n * Model with number-only name\n */\nexport type _400 = string;\n\n/**\n * External ref to shared model (A)\n */\nexport type ExternalRefA = ExternalSharedModel;\n\n/**\n * External ref to shared model (B)\n */\nexport type ExternalRefB = ExternalSharedModel;\n\n/**\n * Testing multiline comments in string: First line\n * Second line\n *\n * Fourth line\n */\nexport type CamelCaseCommentWithBreaks = number;\n\n/**\n * Testing multiline comments in string: First line\n * Second line\n *\n * Fourth line\n */\nexport type CommentWithBreaks = number;\n\n/**\n * Testing backticks in string: `backticks` and ```multiple backticks``` should work\n */\nexport type CommentWithBackticks = number;\n\n/**\n * Testing backticks and quotes in string: `backticks`, 'quotes', \"double quotes\" and ```multiple backticks``` should work\n */\nexport type CommentWithBackticksAndQuotes = number;\n\n/**\n * Testing slashes in string: \\backwards\\\\\\ and /forwards/// should work\n */\nexport type CommentWithSlashes = number;\n\n/**\n * Testing expression placeholders in string: ${expression} should work\n */\nexport type CommentWithExpressionPlaceholders = number;\n\n/**\n * Testing quotes in string: 'single quote''' and \"double quotes\"\"\" should work\n */\nexport type CommentWithQuotes = number;\n\n/**\n * Testing reserved characters in string: * inline * and ** inline ** should work\n */\nexport type CommentWithReservedCharacters = number;\n\n/**\n * This is a simple number\n */\nexport type SimpleInteger = number;\n\n/**\n * This is a simple boolean\n */\nexport type SimpleBoolean = boolean;\n\n/**\n * This is a simple string\n */\nexport type SimpleString = string;\n\n/**\n * A string with non-ascii (unicode) characters valid in typescript identifiers (æøåÆØÅöÔèÈ字符串)\n */\nexport type NonAsciiStringæøåÆøÅöôêÊ字符串 = string;\n\n/**\n * This is a simple file\n */\nexport type SimpleFile = Blob | File;\n\n/**\n * This is a simple reference\n */\nexport type SimpleReference = ModelWithString;\n\n/**\n * This is a simple string\n */\nexport type SimpleStringWithPattern = string | null;\n\n/**\n * This is a simple enum with strings\n */\nexport type EnumWithStrings = 'Success' | 'Warning' | 'Error' | '\\'Single Quote\\'' | '\"Double Quotes\"' | 'Non-ascii: øæåôöØÆÅÔÖ字符串';\n\nexport type EnumWithReplacedCharacters = '\\'Single Quote\\'' | '\"Double Quotes\"' | 'øæåôöØÆÅÔÖ字符串' | 3.1 | '';\n\n/**\n * This is a simple enum with numbers\n */\nexport type EnumWithNumbers = 1 | 2 | 3 | 1.1 | 1.2 | 1.3 | 100 | 200 | 300 | -100 | -200 | -300 | -1.1 | -1.2 | -1.3;\n\n/**\n * Success=1,Warning=2,Error=3\n */\nexport type EnumFromDescription = number;\n\n/**\n * This is a simple enum with numbers\n */\nexport type EnumWithExtensions = 200 | 400 | 500;\n\nexport type EnumWithXEnumNames = 0 | 1 | 2;\n\n/**\n * This is a simple array with numbers\n */\nexport type ArrayWithNumbers = Array<number>;\n\n/**\n * This is a simple array with booleans\n */\nexport type ArrayWithBooleans = Array<boolean>;\n\n/**\n * This is a simple array with strings\n */\nexport type ArrayWithStrings = Array<string>;\n\n/**\n * This is a simple array with references\n */\nexport type ArrayWithReferences = Array<ModelWithString>;\n\n/**\n * This is a simple array containing an array\n */\nexport type ArrayWithArray = Array<Array<ModelWithString>>;\n\n/**\n * This is a simple array with properties\n */\nexport type ArrayWithProperties = Array<{\n    '16x16'?: CamelCaseCommentWithBreaks;\n    bar?: string;\n}>;\n\n/**\n * This is a simple array with any of properties\n */\nexport type ArrayWithAnyOfProperties = Array<{\n    foo?: string;\n} | {\n    bar?: string;\n}>;\n\nexport type AnyOfAnyAndNull = {\n    data?: unknown | null;\n};\n\n/**\n * This is a simple array with any of properties\n */\nexport type AnyOfArrays = {\n    results?: Array<{\n        foo?: string;\n    } | {\n        bar?: string;\n    }>;\n};\n\n/**\n * This is a string dictionary\n */\nexport type DictionaryWithString = {\n    [key: string]: string;\n};\n\nexport type DictionaryWithPropertiesAndAdditionalProperties = {\n    foo?: number;\n    bar?: boolean;\n    [key: string]: string | number | boolean | undefined;\n};\n\n/**\n * This is a string reference\n */\nexport type DictionaryWithReference = {\n    [key: string]: ModelWithString;\n};\n\n/**\n * This is a complex dictionary\n */\nexport type DictionaryWithArray = {\n    [key: string]: Array<ModelWithString>;\n};\n\n/**\n * This is a string dictionary\n */\nexport type DictionaryWithDictionary = {\n    [key: string]: {\n        [key: string]: string;\n    };\n};\n\n/**\n * This is a complex dictionary\n */\nexport type DictionaryWithProperties = {\n    [key: string]: {\n        foo?: string;\n        bar?: string;\n    };\n};\n\n/**\n * This is a model with one number property\n */\nexport type ModelWithInteger = {\n    /**\n     * This is a simple number property\n     */\n    prop?: number;\n};\n\n/**\n * This is a model with one boolean property\n */\nexport type ModelWithBoolean = {\n    /**\n     * This is a simple boolean property\n     */\n    prop?: boolean;\n};\n\n/**\n * This is a model with one string property\n */\nexport type ModelWithString = {\n    /**\n     * This is a simple string property\n     */\n    prop?: string;\n};\n\n/**\n * This is a model with one string property\n */\nexport type ModelWithStringError = {\n    /**\n     * This is a simple string property\n     */\n    prop?: string;\n};\n\n/**\n * `Comment` or `VoiceComment`. The JSON object for adding voice comments to tickets is different. See [Adding voice comments to tickets](/documentation/ticketing/managing-tickets/adding-voice-comments-to-tickets)\n */\nexport type ModelFromZendesk = string;\n\n/**\n * This is a model with one string property\n */\nexport type ModelWithNullableString = {\n    /**\n     * This is a simple string property\n     */\n    nullableProp1?: string | null;\n    /**\n     * This is a simple string property\n     */\n    nullableRequiredProp1: string | null;\n    /**\n     * This is a simple string property\n     */\n    nullableProp2?: string | null;\n    /**\n     * This is a simple string property\n     */\n    nullableRequiredProp2: string | null;\n    /**\n     * This is a simple enum with strings\n     */\n    'foo_bar-enum'?: 'Success' | 'Warning' | 'Error' | 'ØÆÅ字符串';\n};\n\n/**\n * This is a model with one enum\n */\nexport type ModelWithEnum = {\n    /**\n     * This is a simple enum with strings\n     */\n    'foo_bar-enum'?: 'Success' | 'Warning' | 'Error' | 'ØÆÅ字符串';\n    /**\n     * These are the HTTP error code enums\n     */\n    statusCode?: '100' | '200 FOO' | '300 FOO_BAR' | '400 foo-bar' | '500 foo.bar' | '600 foo&bar';\n    /**\n     * Simple boolean enum\n     */\n    bool?: true;\n};\n\n/**\n * This is a model with one enum with escaped name\n */\nexport type ModelWithEnumWithHyphen = {\n    /**\n     * Foo-Bar-Baz-Qux\n     */\n    'foo-bar-baz-qux'?: '3.0';\n};\n\n/**\n * This is a model with one enum\n */\nexport type ModelWithEnumFromDescription = {\n    /**\n     * Success=1,Warning=2,Error=3\n     */\n    test?: number;\n};\n\n/**\n * This is a model with nested enums\n */\nexport type ModelWithNestedEnums = {\n    dictionaryWithEnum?: {\n        [key: string]: 'Success' | 'Warning' | 'Error';\n    };\n    dictionaryWithEnumFromDescription?: {\n        [key: string]: number;\n    };\n    arrayWithEnum?: Array<'Success' | 'Warning' | 'Error'>;\n    arrayWithDescription?: Array<number>;\n    /**\n     * This is a simple enum with strings\n     */\n    'foo_bar-enum'?: 'Success' | 'Warning' | 'Error' | 'ØÆÅ字符串';\n};\n\n/**\n * This is a model with one property containing a reference\n */\nexport type ModelWithReference = {\n    prop?: ModelWithProperties;\n};\n\n/**\n * This is a model with one property containing an array\n */\nexport type ModelWithArrayReadOnlyAndWriteOnly = {\n    prop?: Array<ModelWithReadOnlyAndWriteOnly>;\n    propWithFile?: Array<Blob | File>;\n    propWithNumber?: Array<number>;\n};\n\n/**\n * This is a model with one property containing an array\n */\nexport type ModelWithArray = {\n    prop?: Array<ModelWithString>;\n    propWithFile?: Array<Blob | File>;\n    propWithNumber?: Array<number>;\n};\n\n/**\n * This is a model with one property containing a dictionary\n */\nexport type ModelWithDictionary = {\n    prop?: {\n        [key: string]: string;\n    };\n};\n\n/**\n * This is a deprecated model with a deprecated property\n *\n * @deprecated\n */\nexport type DeprecatedModel = {\n    /**\n     * This is a deprecated property\n     *\n     * @deprecated\n     */\n    prop?: string;\n};\n\n/**\n * This is a model with one property containing a circular reference\n */\nexport type ModelWithCircularReference = {\n    prop?: ModelWithCircularReference;\n};\n\n/**\n * This is a model with one property with a 'one of' relationship\n */\nexport type CompositionWithOneOf = {\n    propA?: ModelWithString | ModelWithEnum | ModelWithArray | ModelWithDictionary;\n};\n\n/**\n * This is a model with one property with a 'one of' relationship where the options are not $ref\n */\nexport type CompositionWithOneOfAnonymous = {\n    propA?: {\n        propA?: string;\n    } | string | number;\n};\n\n/**\n * Circle\n */\nexport type ModelCircle = {\n    kind: string;\n    radius?: number;\n};\n\n/**\n * Square\n */\nexport type ModelSquare = {\n    kind: string;\n    sideLength?: number;\n};\n\n/**\n * This is a model with one property with a 'one of' relationship where the options are not $ref\n */\nexport type CompositionWithOneOfDiscriminator = ({\n    kind: 'circle';\n} & ModelCircle) | ({\n    kind: 'square';\n} & ModelSquare);\n\n/**\n * This is a model with one property with a 'any of' relationship\n */\nexport type CompositionWithAnyOf = {\n    propA?: ModelWithString | ModelWithEnum | ModelWithArray | ModelWithDictionary;\n};\n\n/**\n * This is a model with one property with a 'any of' relationship where the options are not $ref\n */\nexport type CompositionWithAnyOfAnonymous = {\n    propA?: {\n        propA?: string;\n    } | string | number;\n};\n\n/**\n * This is a model with nested 'any of' property with a type null\n */\nexport type CompositionWithNestedAnyAndTypeNull = {\n    propA?: Array<ModelWithDictionary | null> | Array<ModelWithArray | null>;\n};\n\nexport type _3eNum1Период = 'Bird' | 'Dog';\n\nexport type ConstValue = 'ConstValue';\n\n/**\n * This is a model with one property with a 'any of' relationship where the options are not $ref\n */\nexport type CompositionWithNestedAnyOfAndNull = {\n    /**\n     * Scopes\n     */\n    propA?: Array<_3eNum1Период | ConstValue> | null;\n};\n\n/**\n * This is a model with one property with a 'one of' relationship\n */\nexport type CompositionWithOneOfAndNullable = {\n    propA?: {\n        boolean?: boolean;\n    } | ModelWithEnum | ModelWithArray | ModelWithDictionary | null;\n};\n\n/**\n * This is a model that contains a simple dictionary within composition\n */\nexport type CompositionWithOneOfAndSimpleDictionary = {\n    propA?: boolean | {\n        [key: string]: number;\n    };\n};\n\n/**\n * This is a model that contains a dictionary of simple arrays within composition\n */\nexport type CompositionWithOneOfAndSimpleArrayDictionary = {\n    propA?: boolean | {\n        [key: string]: Array<boolean>;\n    };\n};\n\n/**\n * This is a model that contains a dictionary of complex arrays (composited) within composition\n */\nexport type CompositionWithOneOfAndComplexArrayDictionary = {\n    propA?: boolean | {\n        [key: string]: Array<number | string>;\n    };\n};\n\n/**\n * This is a model with one property with a 'all of' relationship\n */\nexport type CompositionWithAllOfAndNullable = {\n    propA?: ({\n        boolean?: boolean;\n    } & ModelWithEnum & ModelWithArray & ModelWithDictionary) | null;\n};\n\n/**\n * This is a model with one property with a 'any of' relationship\n */\nexport type CompositionWithAnyOfAndNullable = {\n    propA?: {\n        boolean?: boolean;\n    } | ModelWithEnum | ModelWithArray | ModelWithDictionary | null;\n};\n\n/**\n * This is a base model with two simple optional properties\n */\nexport type CompositionBaseModel = {\n    firstName?: string;\n    lastname?: string;\n};\n\n/**\n * This is a model that extends the base model\n */\nexport type CompositionExtendedModel = CompositionBaseModel & {\n    age: number;\n    firstName: string;\n    lastname: string;\n};\n\n/**\n * This is a model with one nested property\n */\nexport type ModelWithProperties = {\n    required: string;\n    readonly requiredAndReadOnly: string;\n    requiredAndNullable: string | null;\n    string?: string;\n    number?: number;\n    boolean?: boolean;\n    reference?: ModelWithString;\n    'property with space'?: string;\n    default?: string;\n    try?: string;\n    readonly '@namespace.string'?: string;\n    readonly '@namespace.integer'?: number;\n};\n\n/**\n * This is a model with one nested property\n */\nexport type ModelWithNestedProperties = {\n    readonly first: {\n        readonly second: {\n            readonly third: string | null;\n        } | null;\n    } | null;\n};\n\n/**\n * This is a model with duplicated properties\n */\nexport type ModelWithDuplicateProperties = {\n    prop?: ModelWithString;\n};\n\n/**\n * This is a model with ordered properties\n */\nexport type ModelWithOrderedProperties = {\n    zebra?: string;\n    apple?: string;\n    hawaii?: string;\n};\n\n/**\n * This is a model with duplicated imports\n */\nexport type ModelWithDuplicateImports = {\n    propA?: ModelWithString;\n    propB?: ModelWithString;\n    propC?: ModelWithString;\n};\n\n/**\n * This is a model that extends another model\n */\nexport type ModelThatExtends = ModelWithString & {\n    propExtendsA?: string;\n    propExtendsB?: ModelWithString;\n};\n\n/**\n * This is a model that extends another model\n */\nexport type ModelThatExtendsExtends = ModelWithString & ModelThatExtends & {\n    propExtendsC?: string;\n    propExtendsD?: ModelWithString;\n};\n\n/**\n * This is a model that contains a some patterns\n */\nexport type ModelWithPattern = {\n    key: string;\n    name: string;\n    readonly enabled?: boolean;\n    readonly modified?: string;\n    id?: string;\n    text?: string;\n    patternWithSingleQuotes?: string;\n    patternWithNewline?: string;\n    patternWithBacktick?: string;\n    patternWithUnicode?: string;\n};\n\nexport type File = {\n    /**\n     * Id\n     */\n    readonly id?: string;\n    /**\n     * Updated at\n     */\n    readonly updated_at?: string;\n    /**\n     * Created at\n     */\n    readonly created_at?: string;\n    /**\n     * Mime\n     */\n    mime: string;\n    /**\n     * File\n     */\n    readonly file?: string;\n};\n\nexport type Default = {\n    name?: string;\n};\n\nexport type Pageable = {\n    page?: number;\n    size?: number;\n    sort?: Array<string>;\n};\n\n/**\n * This is a free-form object without additionalProperties.\n */\nexport type FreeFormObjectWithoutAdditionalProperties = {\n    [key: string]: unknown;\n};\n\n/**\n * This is a free-form object with additionalProperties: true.\n */\nexport type FreeFormObjectWithAdditionalPropertiesEqTrue = {\n    [key: string]: unknown;\n};\n\n/**\n * This is a free-form object with additionalProperties: {}.\n */\nexport type FreeFormObjectWithAdditionalPropertiesEqEmptyObject = {\n    [key: string]: unknown;\n};\n\nexport type ModelWithConst = {\n    String?: 'String';\n    number?: 0;\n    null?: null;\n    withType?: 'Some string';\n};\n\n/**\n * This is a model with one property and additionalProperties: true\n */\nexport type ModelWithAdditionalPropertiesEqTrue = {\n    /**\n     * This is a simple string property\n     */\n    prop?: string;\n    [key: string]: unknown;\n};\n\nexport type NestedAnyOfArraysNullable = {\n    nullableArray?: Array<string | boolean> | null;\n};\n\nexport type CompositionWithOneOfAndProperties = ({\n    foo: SimpleParameter;\n} | {\n    bar: NonAsciiStringæøåÆøÅöôêÊ字符串;\n}) & {\n    baz: number | null;\n    qux: number;\n};\n\n/**\n * An object that can be null\n */\nexport type NullableObject = {\n    foo?: string;\n} | null;\n\n/**\n * Some % character\n */\nexport type CharactersInDescription = string;\n\nexport type ModelWithNullableObject = {\n    data?: NullableObject;\n};\n\n/**\n * An object with additional properties that can be null (anyOf ref + null)\n */\nexport type ModelWithAdditionalPropertiesRef = {\n    [key: string]: NullableObject | null;\n};\n\nexport type ModelWithOneOfEnum = {\n    foo: 'Bar';\n} | {\n    foo: 'Baz';\n} | {\n    foo: 'Qux';\n} | {\n    content: string;\n    foo: 'Quux';\n} | {\n    content: [\n        string,\n        string\n    ];\n    foo: 'Corge';\n};\n\nexport type ModelWithNestedArrayEnumsDataFoo = 'foo' | 'bar';\n\nexport type ModelWithNestedArrayEnumsDataBar = 'baz' | 'qux';\n\nexport type ModelWithNestedArrayEnumsData = {\n    foo?: Array<ModelWithNestedArrayEnumsDataFoo>;\n    bar?: Array<ModelWithNestedArrayEnumsDataBar>;\n};\n\nexport type ModelWithNestedArrayEnums = {\n    array_strings?: Array<string>;\n    data?: ModelWithNestedArrayEnumsData;\n};\n\nexport type ModelWithNestedCompositionEnums = {\n    foo?: ModelWithNestedArrayEnumsDataFoo;\n};\n\nexport type ModelWithReadOnlyAndWriteOnly = {\n    foo: string;\n    readonly bar: string;\n};\n\nexport type ModelWithConstantSizeArray = [\n    number,\n    number\n];\n\nexport type ModelWithAnyOfConstantSizeArray = [\n    number | string,\n    number | string,\n    number | string\n];\n\nexport type ModelWithPrefixItemsConstantSizeArray = [\n    ModelWithInteger,\n    number | string,\n    string\n];\n\nexport type ModelWithAnyOfConstantSizeArrayNullable = [\n    number | null | string,\n    number | null | string,\n    number | null | string\n];\n\nexport type ModelWithAnyOfConstantSizeArrayWithNSizeAndOptions = [\n    number | Import,\n    number | Import\n];\n\nexport type ModelWithAnyOfConstantSizeArrayAndIntersect = [\n    number & string,\n    number & string\n];\n\nexport type ModelWithNumericEnumUnion = {\n    /**\n     * Период\n     */\n    value?: -10 | -1 | 0 | 1 | 3 | 6 | 12;\n};\n\n/**\n * Some description with `back ticks`\n */\nexport type ModelWithBackticksInDescription = {\n    /**\n     * The template `that` should be used for parsing and importing the contents of the CSV file.\n     *\n     * <br/><p>There is one placeholder currently supported:<ul>     <li><b>${x}</b> - refers to the n-th column in the CSV file, e.g. ${1}, ${2}, ...)</li></ul><p>Example of a correct JSON template:</p>\n     * <pre>\n     * [\n     * {\n     * \"resourceType\": \"Asset\",\n     * \"identifier\": {\n     * \"name\": \"${1}\",\n     * \"domain\": {\n     * \"name\": \"${2}\",\n     * \"community\": {\n     * \"name\": \"Some Community\"\n     * }\n     * }\n     * },\n     * \"attributes\" : {\n     * \"00000000-0000-0000-0000-000000003115\" : [ {\n     * \"value\" : \"${3}\"\n     * } ],\n     * \"00000000-0000-0000-0000-000000000222\" : [ {\n     * \"value\" : \"${4}\"\n     * } ]\n     * }\n     * }\n     * ]\n     * </pre>\n     */\n    template?: string;\n};\n\nexport type ModelWithOneOfAndProperties = (SimpleParameter | NonAsciiStringæøåÆøÅöôêÊ字符串) & {\n    baz: number | null;\n    qux: number;\n};\n\n/**\n * Model used to test deduplication strategy (unused)\n */\nexport type ParameterSimpleParameterUnused = string;\n\n/**\n * Model used to test deduplication strategy\n */\nexport type PostServiceWithEmptyTagResponse = string;\n\n/**\n * Model used to test deduplication strategy\n */\nexport type PostServiceWithEmptyTagResponse2 = string;\n\n/**\n * Model used to test deduplication strategy\n */\nexport type DeleteFooData = string;\n\n/**\n * Model used to test deduplication strategy\n */\nexport type DeleteFooData2 = string;\n\n/**\n * Model with restricted keyword name\n */\nexport type Import = string;\n\nexport type SchemaWithFormRestrictedKeys = {\n    description?: string;\n    'x-enum-descriptions'?: string;\n    'x-enum-varnames'?: string;\n    'x-enumNames'?: string;\n    title?: string;\n    object?: {\n        description?: string;\n        'x-enum-descriptions'?: string;\n        'x-enum-varnames'?: string;\n        'x-enumNames'?: string;\n        title?: string;\n    };\n    array?: Array<{\n        description?: string;\n        'x-enum-descriptions'?: string;\n        'x-enum-varnames'?: string;\n        'x-enumNames'?: string;\n        title?: string;\n    }>;\n};\n\n/**\n * This schema was giving PascalCase transformations a hard time\n */\nexport type IoK8sApimachineryPkgApisMetaV1DeleteOptions = {\n    /**\n     * Must be fulfilled before a deletion is carried out. If not possible, a 409 Conflict status will be returned.\n     */\n    preconditions?: IoK8sApimachineryPkgApisMetaV1Preconditions;\n};\n\n/**\n * This schema was giving PascalCase transformations a hard time\n */\nexport type IoK8sApimachineryPkgApisMetaV1Preconditions = {\n    /**\n     * Specifies the target ResourceVersion\n     */\n    resourceVersion?: string;\n    /**\n     * Specifies the target UID.\n     */\n    uid?: string;\n};\n\nexport type AdditionalPropertiesUnknownIssue = {\n    [key: string]: string | number;\n};\n\nexport type AdditionalPropertiesUnknownIssue2 = {\n    [key: string]: string | number;\n};\n\nexport type AdditionalPropertiesUnknownIssue3 = string & {\n    entries: {\n        [key: string]: AdditionalPropertiesUnknownIssue;\n    };\n};\n\nexport type AdditionalPropertiesIntegerIssue = {\n    value: number;\n    [key: string]: number;\n};\n\nexport type OneOfAllOfIssue = ((ConstValue | GenericSchemaDuplicateIssue1SystemBoolean) & _3eNum1Период) | GenericSchemaDuplicateIssue1SystemString;\n\nexport type GenericSchemaDuplicateIssue1SystemBoolean = {\n    item?: boolean;\n    error?: string | null;\n    readonly hasError?: boolean;\n    data?: {\n        [key: string]: never;\n    };\n};\n\nexport type GenericSchemaDuplicateIssue1SystemString = {\n    item?: string | null;\n    error?: string | null;\n    readonly hasError?: boolean;\n};\n\nexport type ExternalSharedModel = {\n    id: string;\n    name?: string;\n};\n\n/**\n * This is a model with one property containing a reference\n */\nexport type ModelWithReferenceWritable = {\n    prop?: ModelWithPropertiesWritable;\n};\n\n/**\n * This is a model with one property containing an array\n */\nexport type ModelWithArrayReadOnlyAndWriteOnlyWritable = {\n    prop?: Array<ModelWithReadOnlyAndWriteOnlyWritable>;\n    propWithFile?: Array<Blob | File>;\n    propWithNumber?: Array<number>;\n};\n\n/**\n * This is a model with one nested property\n */\nexport type ModelWithPropertiesWritable = {\n    required: string;\n    requiredAndNullable: string | null;\n    string?: string;\n    number?: number;\n    boolean?: boolean;\n    reference?: ModelWithString;\n    'property with space'?: string;\n    default?: string;\n    try?: string;\n};\n\n/**\n * This is a model that contains a some patterns\n */\nexport type ModelWithPatternWritable = {\n    key: string;\n    name: string;\n    id?: string;\n    text?: string;\n    patternWithSingleQuotes?: string;\n    patternWithNewline?: string;\n    patternWithBacktick?: string;\n    patternWithUnicode?: string;\n};\n\nexport type FileWritable = {\n    /**\n     * Mime\n     */\n    mime: string;\n};\n\nexport type ModelWithReadOnlyAndWriteOnlyWritable = {\n    foo: string;\n    baz: string;\n};\n\nexport type ModelWithAnyOfConstantSizeArrayWithNSizeAndOptionsWritable = [\n    number | Import,\n    number | Import\n];\n\nexport type AdditionalPropertiesUnknownIssueWritable = {\n    [key: string]: string | number;\n};\n\nexport type OneOfAllOfIssueWritable = ((ConstValue | GenericSchemaDuplicateIssue1SystemBoolean) & _3eNum1Период) | GenericSchemaDuplicateIssue1SystemString;\n\nexport type GenericSchemaDuplicateIssue1SystemBooleanWritable = {\n    item?: boolean;\n    error?: string | null;\n    data?: {\n        [key: string]: never;\n    };\n};\n\nexport type GenericSchemaDuplicateIssue1SystemStringWritable = {\n    item?: string | null;\n    error?: string | null;\n};\n\n/**\n * This is a reusable parameter\n */\nexport type SimpleParameter = string;\n\n/**\n * Parameter with illegal characters\n */\nexport type XFooBar = ModelWithString;\n\n/**\n * A reusable request body\n */\nexport type SimpleRequestBody = ModelWithString;\n\n/**\n * A reusable request body\n */\nexport type SimpleFormData = ModelWithString;\n\nexport type ExportData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no+tag';\n};\n\nexport type PatchApiVbyApiVersionNoTagData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no+tag';\n};\n\nexport type PatchApiVbyApiVersionNoTagResponses = {\n    /**\n     * OK\n     */\n    default: unknown;\n};\n\nexport type ImportData = {\n    body: ModelWithReadOnlyAndWriteOnlyWritable | ModelWithArrayReadOnlyAndWriteOnlyWritable;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no+tag';\n};\n\nexport type ImportResponses = {\n    /**\n     * Success\n     */\n    200: ModelFromZendesk;\n    /**\n     * Default success response\n     */\n    default: ModelWithReadOnlyAndWriteOnly;\n};\n\nexport type ImportResponse = ImportResponses[keyof ImportResponses];\n\nexport type FooWowData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no+tag';\n};\n\nexport type FooWowResponses = {\n    /**\n     * OK\n     */\n    default: unknown;\n};\n\nexport type ApiVVersionODataControllerCountData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple/$count';\n};\n\nexport type ApiVVersionODataControllerCountResponses = {\n    /**\n     * Success\n     */\n    200: ModelFromZendesk;\n};\n\nexport type ApiVVersionODataControllerCountResponse = ApiVVersionODataControllerCountResponses[keyof ApiVVersionODataControllerCountResponses];\n\nexport type GetApiVbyApiVersionSimpleOperationData = {\n    body?: never;\n    path: {\n        /**\n         * foo in method\n         */\n        foo_param: string;\n    };\n    query?: never;\n    url: '/api/v{api-version}/simple:operation';\n};\n\nexport type GetApiVbyApiVersionSimpleOperationErrors = {\n    /**\n     * Default error response\n     */\n    default: ModelWithBoolean;\n};\n\nexport type GetApiVbyApiVersionSimpleOperationError = GetApiVbyApiVersionSimpleOperationErrors[keyof GetApiVbyApiVersionSimpleOperationErrors];\n\nexport type GetApiVbyApiVersionSimpleOperationResponses = {\n    /**\n     * Response is a simple number\n     */\n    200: number;\n};\n\nexport type GetApiVbyApiVersionSimpleOperationResponse = GetApiVbyApiVersionSimpleOperationResponses[keyof GetApiVbyApiVersionSimpleOperationResponses];\n\nexport type DeleteCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type GetCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type HeadCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type OptionsCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type PatchCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type PostCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type PutCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type DeleteFooData3 = {\n    body?: never;\n    headers: {\n        /**\n         * Parameter with illegal characters\n         */\n        'x-Foo-Bar': ModelWithString;\n    };\n    path: {\n        /**\n         * foo in method\n         */\n        foo_param: string;\n        /**\n         * bar in method\n         */\n        BarParam: string;\n    };\n    query?: never;\n    url: '/api/v{api-version}/foo/{foo_param}/bar/{BarParam}';\n};\n\nexport type CallWithDescriptionsData = {\n    body?: never;\n    path?: never;\n    query?: {\n        /**\n         * Testing multiline comments in string: First line\n         * Second line\n         *\n         * Fourth line\n         */\n        parameterWithBreaks?: string;\n        /**\n         * Testing backticks in string: `backticks` and ```multiple backticks``` should work\n         */\n        parameterWithBackticks?: string;\n        /**\n         * Testing slashes in string: \\backwards\\\\\\ and /forwards/// should work\n         */\n        parameterWithSlashes?: string;\n        /**\n         * Testing expression placeholders in string: ${expression} should work\n         */\n        parameterWithExpressionPlaceholders?: string;\n        /**\n         * Testing quotes in string: 'single quote''' and \"double quotes\"\"\" should work\n         */\n        parameterWithQuotes?: string;\n        /**\n         * Testing reserved characters in string: * inline * and ** inline ** should work\n         */\n        parameterWithReservedCharacters?: string;\n    };\n    url: '/api/v{api-version}/descriptions';\n};\n\nexport type DeprecatedCallData = {\n    body?: never;\n    headers: {\n        /**\n         * This parameter is deprecated\n         *\n         * @deprecated\n         */\n        parameter: DeprecatedModel | null;\n    };\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/parameters/deprecated';\n};\n\nexport type CallWithParametersData = {\n    /**\n     * This is the parameter that goes into the body\n     */\n    body: {\n        [key: string]: unknown;\n    } | null;\n    headers: {\n        /**\n         * This is the parameter that goes into the header\n         */\n        parameterHeader: string | null;\n    };\n    path: {\n        /**\n         * This is the parameter that goes into the path\n         */\n        parameterPath: string | null;\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string | null;\n    };\n    query: {\n        foo_ref_enum?: ModelWithNestedArrayEnumsDataFoo;\n        foo_all_of_enum: ModelWithNestedArrayEnumsDataFoo;\n        /**\n         * This is the parameter that goes into the query params\n         */\n        cursor: string | null;\n    };\n    url: '/api/v{api-version}/parameters/{parameterPath}';\n};\n\nexport type CallWithWeirdParameterNamesData = {\n    /**\n     * This is the parameter that goes into the body\n     */\n    body: ModelWithString | null;\n    headers: {\n        /**\n         * This is the parameter that goes into the request header\n         */\n        'parameter.header': string | null;\n    };\n    path: {\n        /**\n         * This is the parameter that goes into the path\n         */\n        'parameter.path.1'?: string;\n        /**\n         * This is the parameter that goes into the path\n         */\n        'parameter-path-2'?: string;\n        /**\n         * This is the parameter that goes into the path\n         */\n        'PARAMETER-PATH-3'?: string;\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string | null;\n    };\n    query: {\n        /**\n         * This is the parameter with a reserved keyword\n         */\n        default?: string;\n        /**\n         * This is the parameter that goes into the request query params\n         */\n        'parameter-query': string | null;\n    };\n    url: '/api/v{api-version}/parameters/{parameter.path.1}/{parameter-path-2}/{PARAMETER-PATH-3}';\n};\n\nexport type GetCallWithOptionalParamData = {\n    /**\n     * This is a required parameter\n     */\n    body: ModelWithOneOfEnum;\n    path?: never;\n    query?: {\n        /**\n         * This is an optional parameter\n         */\n        page?: number;\n    };\n    url: '/api/v{api-version}/parameters';\n};\n\nexport type PostCallWithOptionalParamData = {\n    /**\n     * This is an optional parameter\n     */\n    body?: {\n        offset?: number | null;\n    };\n    path?: never;\n    query: {\n        /**\n         * This is a required parameter\n         */\n        parameter: Pageable;\n    };\n    url: '/api/v{api-version}/parameters';\n};\n\nexport type PostCallWithOptionalParamResponses = {\n    /**\n     * Response is a simple number\n     */\n    200: number;\n    /**\n     * Success\n     */\n    204: void;\n};\n\nexport type PostCallWithOptionalParamResponse = PostCallWithOptionalParamResponses[keyof PostCallWithOptionalParamResponses];\n\nexport type PostApiVbyApiVersionRequestBodyData = {\n    /**\n     * A reusable request body\n     */\n    body?: SimpleRequestBody;\n    path?: never;\n    query?: {\n        /**\n         * This is a reusable parameter\n         */\n        parameter?: string;\n    };\n    url: '/api/v{api-version}/requestBody';\n};\n\nexport type PostApiVbyApiVersionFormDataData = {\n    /**\n     * A reusable request body\n     */\n    body?: SimpleFormData;\n    path?: never;\n    query?: {\n        /**\n         * This is a reusable parameter\n         */\n        parameter?: string;\n    };\n    url: '/api/v{api-version}/formData';\n};\n\nexport type CallWithDefaultParametersData = {\n    body?: never;\n    path?: never;\n    query?: {\n        /**\n         * This is a simple string with default value\n         */\n        parameterString?: string | null;\n        /**\n         * This is a simple number with default value\n         */\n        parameterNumber?: number | null;\n        /**\n         * This is a simple boolean with default value\n         */\n        parameterBoolean?: boolean | null;\n        /**\n         * This is a simple enum with default value\n         */\n        parameterEnum?: 'Success' | 'Warning' | 'Error';\n        /**\n         * This is a simple model with default value\n         */\n        parameterModel?: ModelWithString | null;\n    };\n    url: '/api/v{api-version}/defaults';\n};\n\nexport type CallWithDefaultOptionalParametersData = {\n    body?: never;\n    path?: never;\n    query?: {\n        /**\n         * This is a simple string that is optional with default value\n         */\n        parameterString?: string;\n        /**\n         * This is a simple number that is optional with default value\n         */\n        parameterNumber?: number;\n        /**\n         * This is a simple boolean that is optional with default value\n         */\n        parameterBoolean?: boolean;\n        /**\n         * This is a simple enum that is optional with default value\n         */\n        parameterEnum?: 'Success' | 'Warning' | 'Error';\n        /**\n         * This is a simple model that is optional with default value\n         */\n        parameterModel?: ModelWithString;\n    };\n    url: '/api/v{api-version}/defaults';\n};\n\nexport type CallToTestOrderOfParamsData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * This is a optional string with default\n         */\n        parameterOptionalStringWithDefault?: string;\n        /**\n         * This is a optional string with empty default\n         */\n        parameterOptionalStringWithEmptyDefault?: string;\n        /**\n         * This is a optional string with no default\n         */\n        parameterOptionalStringWithNoDefault?: string;\n        /**\n         * This is a string with default\n         */\n        parameterStringWithDefault: string;\n        /**\n         * This is a string with empty default\n         */\n        parameterStringWithEmptyDefault: string;\n        /**\n         * This is a string with no default\n         */\n        parameterStringWithNoDefault: string;\n        /**\n         * This is a string that can be null with no default\n         */\n        parameterStringNullableWithNoDefault?: string | null;\n        /**\n         * This is a string that can be null with default\n         */\n        parameterStringNullableWithDefault?: string | null;\n    };\n    url: '/api/v{api-version}/defaults';\n};\n\nexport type DuplicateNameData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/duplicate';\n};\n\nexport type DuplicateName2Data = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/duplicate';\n};\n\nexport type DuplicateName3Data = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/duplicate';\n};\n\nexport type DuplicateName4Data = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/duplicate';\n};\n\nexport type CallWithNoContentResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no-content';\n};\n\nexport type CallWithNoContentResponseResponses = {\n    /**\n     * Success\n     */\n    204: void;\n};\n\nexport type CallWithNoContentResponseResponse = CallWithNoContentResponseResponses[keyof CallWithNoContentResponseResponses];\n\nexport type CallWithResponseAndNoContentResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multiple-tags/response-and-no-content';\n};\n\nexport type CallWithResponseAndNoContentResponseResponses = {\n    /**\n     * Response is a simple number\n     */\n    200: number;\n    /**\n     * Success\n     */\n    204: void;\n};\n\nexport type CallWithResponseAndNoContentResponseResponse = CallWithResponseAndNoContentResponseResponses[keyof CallWithResponseAndNoContentResponseResponses];\n\nexport type DummyAData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multiple-tags/a';\n};\n\nexport type DummyAResponses = {\n    200: _400;\n};\n\nexport type DummyAResponse = DummyAResponses[keyof DummyAResponses];\n\nexport type DummyBData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multiple-tags/b';\n};\n\nexport type DummyBResponses = {\n    /**\n     * Success\n     */\n    204: void;\n};\n\nexport type DummyBResponse = DummyBResponses[keyof DummyBResponses];\n\nexport type CallWithResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/response';\n};\n\nexport type CallWithResponseResponses = {\n    default: Import;\n};\n\nexport type CallWithResponseResponse = CallWithResponseResponses[keyof CallWithResponseResponses];\n\nexport type CallWithDuplicateResponsesData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/response';\n};\n\nexport type CallWithDuplicateResponsesErrors = {\n    /**\n     * Message for 500 error\n     */\n    500: ModelWithStringError;\n    /**\n     * Message for 501 error\n     */\n    501: ModelWithStringError;\n    /**\n     * Message for 502 error\n     */\n    502: ModelWithStringError;\n    /**\n     * Message for 4XX errors\n     */\n    '4XX': DictionaryWithArray;\n    /**\n     * Default error response\n     */\n    default: ModelWithBoolean;\n};\n\nexport type CallWithDuplicateResponsesError = CallWithDuplicateResponsesErrors[keyof CallWithDuplicateResponsesErrors];\n\nexport type CallWithDuplicateResponsesResponses = {\n    /**\n     * Message for 200 response\n     */\n    200: ModelWithBoolean & ModelWithInteger;\n    /**\n     * Message for 201 response\n     */\n    201: ModelWithString;\n    /**\n     * Message for 202 response\n     */\n    202: ModelWithString;\n};\n\nexport type CallWithDuplicateResponsesResponse = CallWithDuplicateResponsesResponses[keyof CallWithDuplicateResponsesResponses];\n\nexport type CallWithResponsesData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/response';\n};\n\nexport type CallWithResponsesErrors = {\n    /**\n     * Message for 500 error\n     */\n    500: ModelWithStringError;\n    /**\n     * Message for 501 error\n     */\n    501: ModelWithStringError;\n    /**\n     * Message for 502 error\n     */\n    502: ModelWithStringError;\n    /**\n     * Message for default response\n     */\n    default: ModelWithStringError;\n};\n\nexport type CallWithResponsesError = CallWithResponsesErrors[keyof CallWithResponsesErrors];\n\nexport type CallWithResponsesResponses = {\n    /**\n     * Message for 200 response\n     */\n    200: {\n        readonly '@namespace.string'?: string;\n        readonly '@namespace.integer'?: number;\n        readonly value?: Array<ModelWithString>;\n    };\n    /**\n     * Message for 201 response\n     */\n    201: ModelThatExtends;\n    /**\n     * Message for 202 response\n     */\n    202: ModelThatExtendsExtends;\n};\n\nexport type CallWithResponsesResponse = CallWithResponsesResponses[keyof CallWithResponsesResponses];\n\nexport type CollectionFormatData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * This is an array parameter that is sent as csv format (comma-separated values)\n         */\n        parameterArrayCSV: Array<string> | null;\n        /**\n         * This is an array parameter that is sent as ssv format (space-separated values)\n         */\n        parameterArraySSV: Array<string> | null;\n        /**\n         * This is an array parameter that is sent as tsv format (tab-separated values)\n         */\n        parameterArrayTSV: Array<string> | null;\n        /**\n         * This is an array parameter that is sent as pipes format (pipe-separated values)\n         */\n        parameterArrayPipes: Array<string> | null;\n        /**\n         * This is an array parameter that is sent as multi format (multiple parameter instances)\n         */\n        parameterArrayMulti: Array<string> | null;\n    };\n    url: '/api/v{api-version}/collectionFormat';\n};\n\nexport type TypesData = {\n    body?: never;\n    path?: {\n        /**\n         * This is a number parameter\n         */\n        id?: number;\n    };\n    query: {\n        /**\n         * This is a number parameter\n         */\n        parameterNumber: number;\n        /**\n         * This is a string parameter\n         */\n        parameterString: string | null;\n        /**\n         * This is a boolean parameter\n         */\n        parameterBoolean: boolean | null;\n        /**\n         * This is an object parameter\n         */\n        parameterObject: {\n            [key: string]: unknown;\n        } | null;\n        /**\n         * This is an array parameter\n         */\n        parameterArray: Array<string> | null;\n        /**\n         * This is a dictionary parameter\n         */\n        parameterDictionary: {\n            [key: string]: unknown;\n        } | null;\n        /**\n         * This is an enum parameter\n         */\n        parameterEnum: 'Success' | 'Warning' | 'Error' | null;\n    };\n    url: '/api/v{api-version}/types';\n};\n\nexport type TypesResponses = {\n    /**\n     * Response is a simple number\n     */\n    200: number;\n    /**\n     * Response is a simple string\n     */\n    201: string;\n    /**\n     * Response is a simple boolean\n     */\n    202: boolean;\n    /**\n     * Response is a simple object\n     */\n    203: {\n        [key: string]: unknown;\n    };\n};\n\nexport type TypesResponse = TypesResponses[keyof TypesResponses];\n\nexport type UploadFileData = {\n    body: Blob | File;\n    path: {\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string | null;\n    };\n    query?: never;\n    url: '/api/v{api-version}/upload';\n};\n\nexport type UploadFileResponses = {\n    200: boolean;\n};\n\nexport type UploadFileResponse = UploadFileResponses[keyof UploadFileResponses];\n\nexport type FileResponseData = {\n    body?: never;\n    path: {\n        id: string;\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string;\n    };\n    query?: never;\n    url: '/api/v{api-version}/file/{id}';\n};\n\nexport type FileResponseResponses = {\n    /**\n     * Success\n     */\n    200: Blob | File;\n};\n\nexport type FileResponseResponse = FileResponseResponses[keyof FileResponseResponses];\n\nexport type ComplexTypesData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * Parameter containing object\n         */\n        parameterObject: {\n            first?: {\n                second?: {\n                    third?: string;\n                };\n            };\n        };\n        /**\n         * Parameter containing reference\n         */\n        parameterReference: ModelWithString;\n    };\n    url: '/api/v{api-version}/complex';\n};\n\nexport type ComplexTypesErrors = {\n    /**\n     * 400 `server` error\n     */\n    400: unknown;\n    /**\n     * 500 server error\n     */\n    500: unknown;\n};\n\nexport type ComplexTypesResponses = {\n    /**\n     * Successful response\n     */\n    200: Array<ModelWithString>;\n};\n\nexport type ComplexTypesResponse = ComplexTypesResponses[keyof ComplexTypesResponses];\n\nexport type MultipartResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multipart';\n};\n\nexport type MultipartResponseResponses = {\n    /**\n     * OK\n     */\n    200: {\n        file?: Blob | File;\n        metadata?: {\n            foo?: string;\n            bar?: string;\n        };\n    };\n};\n\nexport type MultipartResponseResponse = MultipartResponseResponses[keyof MultipartResponseResponses];\n\nexport type MultipartRequestData = {\n    body?: {\n        content?: Blob | File;\n        data?: ModelWithString | null;\n    };\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multipart';\n};\n\nexport type ComplexParamsData = {\n    body?: {\n        readonly key: string | null;\n        name: string | null;\n        enabled?: boolean;\n        type: 'Monkey' | 'Horse' | 'Bird';\n        listOfModels?: Array<ModelWithString> | null;\n        listOfStrings?: Array<string> | null;\n        parameters: ModelWithString | ModelWithEnum | ModelWithArray | ModelWithDictionary;\n        readonly user?: {\n            readonly id?: number;\n            readonly name?: string | null;\n        };\n    };\n    path: {\n        id: number;\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string;\n    };\n    query?: never;\n    url: '/api/v{api-version}/complex/{id}';\n};\n\nexport type ComplexParamsResponses = {\n    /**\n     * Success\n     */\n    200: ModelWithString;\n};\n\nexport type ComplexParamsResponse = ComplexParamsResponses[keyof ComplexParamsResponses];\n\nexport type CallWithResultFromHeaderData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/header';\n};\n\nexport type CallWithResultFromHeaderErrors = {\n    /**\n     * 400 server error\n     */\n    400: unknown;\n    /**\n     * 500 server error\n     */\n    500: unknown;\n};\n\nexport type CallWithResultFromHeaderResponses = {\n    /**\n     * Successful response\n     */\n    200: unknown;\n};\n\nexport type TestErrorCodeData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * Status code to return\n         */\n        status: number;\n    };\n    url: '/api/v{api-version}/error';\n};\n\nexport type TestErrorCodeErrors = {\n    /**\n     * Custom message: Internal Server Error\n     */\n    500: unknown;\n    /**\n     * Custom message: Not Implemented\n     */\n    501: unknown;\n    /**\n     * Custom message: Bad Gateway\n     */\n    502: unknown;\n    /**\n     * Custom message: Service Unavailable\n     */\n    503: unknown;\n};\n\nexport type TestErrorCodeResponses = {\n    /**\n     * Custom message: Successful response\n     */\n    200: unknown;\n};\n\nexport type NonAsciiæøåÆøÅöôêÊ字符串Data = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * Dummy input param\n         */\n        nonAsciiParamæøåÆØÅöôêÊ: number;\n    };\n    url: '/api/v{api-version}/non-ascii-æøåÆØÅöôêÊ字符串';\n};\n\nexport type NonAsciiæøåÆøÅöôêÊ字符串Responses = {\n    /**\n     * Successful response\n     */\n    200: Array<NonAsciiStringæøåÆøÅöôêÊ字符串>;\n};\n\nexport type NonAsciiæøåÆøÅöôêÊ字符串Response = NonAsciiæøåÆøÅöôêÊ字符串Responses[keyof NonAsciiæøåÆøÅöôêÊ字符串Responses];\n\nexport type PutWithFormUrlEncodedData = {\n    body: ArrayWithStrings;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/non-ascii-æøåÆØÅöôêÊ字符串';\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-nuxt/base-url-strict/client/client.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport { useAsyncData, useFetch, useLazyAsyncData, useLazyFetch } from 'nuxt/app';\nimport { reactive, ref, toValue, watch } from 'vue';\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 } from './types.gen';\nimport {\n  buildUrl,\n  createConfig,\n  executeFetchFn,\n  mergeConfigs,\n  mergeHeaders,\n  mergeInterceptors,\n  serializeBody,\n  setAuthParams,\n  unwrapRefs,\n} from './utils.gen';\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 beforeRequest = async (options: RequestOptions) => {\n    const opts = {\n      ..._config,\n      ...options,\n      $fetch: options.$fetch ?? _config.$fetch ?? $fetch,\n      headers: mergeHeaders(_config.headers, options.headers),\n      onRequest: mergeInterceptors(_config.onRequest, options.onRequest),\n      onResponse: mergeInterceptors(_config.onResponse, options.onResponse),\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    const url = buildUrl(opts);\n\n    return { opts, url };\n  };\n\n  const request: Client['request'] = ({ asyncDataOptions, composable = '$fetch', ...options }) => {\n    const key = options.key;\n    const opts = {\n      ..._config,\n      ...options,\n      $fetch: options.$fetch ?? _config.$fetch ?? $fetch,\n      headers: mergeHeaders(_config.headers, options.headers),\n      onRequest: mergeInterceptors(_config.onRequest, options.onRequest),\n      onResponse: mergeInterceptors(_config.onResponse, options.onResponse),\n    };\n\n    const { requestValidator, responseTransformer, responseValidator, security } = opts;\n    if (requestValidator || security) {\n      // auth must happen in interceptors otherwise we'd need to require\n      // asyncContext enabled\n      // https://nuxt.com/docs/guide/going-further/experimental-features#asynccontext\n      opts.onRequest = [\n        async ({ options }) => {\n          if (security) {\n            await setAuthParams({\n              auth: opts.auth,\n              headers: options.headers,\n              query: options.query,\n              security,\n            });\n          }\n\n          if (requestValidator) {\n            await requestValidator({\n              ...options,\n              // @ts-expect-error\n              body: options.rawBody,\n            });\n          }\n        },\n        ...opts.onRequest,\n      ];\n    }\n\n    if (responseTransformer || responseValidator) {\n      opts.onResponse = [\n        ...opts.onResponse,\n        async ({ options, response }) => {\n          if (options.responseType && options.responseType !== 'json') {\n            return;\n          }\n\n          if (!response.ok) {\n            return;\n          }\n\n          if (responseValidator) {\n            await responseValidator(response._data);\n          }\n\n          if (responseTransformer) {\n            response._data = await responseTransformer(response._data);\n          }\n        },\n      ];\n    }\n\n    // remove Content-Type header if body is empty to avoid sending invalid requests\n    if (opts.body === undefined || opts.body === '') {\n      opts.headers.delete('Content-Type');\n    }\n\n    const fetchFn = opts.$fetch;\n\n    if (composable === '$fetch') {\n      return executeFetchFn(\n        // @ts-expect-error\n        opts,\n        fetchFn,\n      );\n    }\n\n    if (composable === 'useFetch' || composable === 'useLazyFetch') {\n      opts.rawBody = opts.body;\n      const bodyParams = reactive({\n        body: opts.body,\n        bodySerializer: opts.bodySerializer,\n      });\n      const body = ref(serializeBody({ ...opts, body: toValue(opts.body) }));\n      opts.body = body;\n      watch(bodyParams, (changed) => {\n        body.value = serializeBody(changed);\n      });\n      return composable === 'useLazyFetch'\n        ? useLazyFetch(() => buildUrl(opts), { ...opts, ...asyncDataOptions })\n        : useFetch(() => buildUrl(opts), { ...opts, ...asyncDataOptions });\n    }\n\n    const handler: any = () =>\n      executeFetchFn(\n        // @ts-expect-error\n        opts,\n        fetchFn,\n      );\n\n    if (composable === 'useAsyncData') {\n      return key\n        ? useAsyncData(key, handler, asyncDataOptions)\n        : useAsyncData(handler, asyncDataOptions);\n    }\n\n    if (composable === 'useLazyAsyncData') {\n      return key\n        ? useLazyAsyncData(key, handler, asyncDataOptions)\n        : useLazyAsyncData(handler, asyncDataOptions);\n    }\n\n    return undefined as any;\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      ...unwrapRefs(opts),\n      body: opts.body as BodyInit | null | undefined,\n      method,\n      onRequest: undefined,\n      serializedBody: getValidRequestBody(opts) as BodyInit | null | undefined,\n      signal: unwrapRefs(opts.signal) as AbortSignal,\n      url,\n    });\n  };\n\n  const _buildUrl: Client['buildUrl'] = (options) =>\n    buildUrl({ ..._config, ...options } as typeof 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    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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-nuxt/base-url-strict/client/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type { Auth } from '../core/auth.gen';\nexport type { QuerySerializerOptions } from '../core/bodySerializer.gen';\nexport {\n  formDataBodySerializer,\n  jsonBodySerializer,\n  urlSearchParamsBodySerializer,\n} from '../core/bodySerializer.gen';\nexport { buildClientParams } from '../core/params.gen';\nexport { serializeQueryKeyValue } from '../core/queryKeySerializer.gen';\nexport { createClient } from './client.gen';\nexport type {\n  Client,\n  ClientOptions,\n  Composable,\n  Config,\n  CreateClientConfig,\n  Options,\n  RequestOptions,\n  RequestResult,\n  TDataShape,\n} from './types.gen';\nexport { createConfig } from './utils.gen';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-nuxt/base-url-strict/client/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type {\n  AsyncDataOptions,\n  useAsyncData,\n  useFetch,\n  UseFetchOptions,\n  useLazyAsyncData,\n  useLazyFetch,\n} from 'nuxt/app';\nimport type { Ref } from 'vue';\n\nimport type { Auth } from '../core/auth.gen';\nimport type { QuerySerializerOptions } from '../core/bodySerializer.gen';\nimport type {\n  ServerSentEventsOptions,\n  ServerSentEventsResult,\n} from '../core/serverSentEvents.gen';\nimport type { Client as CoreClient, Config as CoreConfig } from '../core/types.gen';\n\nexport type ArraySeparatorStyle = ArrayStyle | MatrixStyle;\ntype ArrayStyle = 'form' | 'spaceDelimited' | 'pipeDelimited';\ntype MatrixStyle = 'label' | 'matrix' | 'simple';\nexport type ObjectSeparatorStyle = ObjectStyle | MatrixStyle;\ntype ObjectStyle = 'form' | 'deepObject';\n\nexport type QuerySerializer = (query: Parameters<Client['buildUrl']>[0]['query']) => string;\n\ntype WithRefs<TData> = {\n  [K in keyof TData]: NonNullable<TData[K]> extends object\n    ? WithRefs<NonNullable<TData[K]>> | Ref<NonNullable<TData[K]>> | Extract<TData[K], null>\n    : NonNullable<TData[K]> | Ref<NonNullable<TData[K]>> | Extract<TData[K], null>;\n};\n\n// copied from Nuxt\nexport type KeysOf<T> = Array<T extends T ? (keyof T extends string ? keyof T : never) : never>;\n\nexport interface Config<T extends ClientOptions = ClientOptions>\n  extends\n    Omit<FetchOptions<unknown>, 'baseURL' | 'body' | 'headers' | 'method' | 'query'>,\n    WithRefs<Pick<FetchOptions<unknown>, 'query'>>,\n    Omit<CoreConfig, 'querySerializer'> {\n  /**\n   * Base URL for all requests made by this client.\n   */\n  baseURL?: T['baseURL'];\n  /**\n   * A function for serializing request query parameters. By default, arrays\n   * will be exploded in form style, objects will be exploded in deepObject\n   * style, and reserved characters are percent-encoded.\n   *\n   * {@link https://swagger.io/docs/specification/serialization/#query View examples}\n   */\n  querySerializer?: QuerySerializer | QuerySerializerOptions;\n}\n\nexport interface RequestOptions<\n  TComposable extends Composable = '$fetch',\n  ResT = unknown,\n  DefaultT = undefined,\n  Url extends string = string,\n>\n  extends\n    Config,\n    WithRefs<{\n      path?: FetchOptions<unknown>['query'];\n      query?: FetchOptions<unknown>['query'];\n    }>,\n    Pick<\n      ServerSentEventsOptions<ResT>,\n      | 'onSseError'\n      | 'onSseEvent'\n      | 'sseDefaultRetryDelay'\n      | 'sseMaxRetryAttempts'\n      | 'sseMaxRetryDelay'\n    > {\n  asyncDataOptions?: AsyncDataOptions<ResT, ResT, KeysOf<ResT>, DefaultT>;\n  /**\n   * Any body that you want to add to your request.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/fetch#body}\n   */\n  body?: NonNullable<unknown> | Ref<NonNullable<unknown>> | null;\n  composable?: TComposable;\n  key?: string;\n  rawBody?: NonNullable<unknown> | Ref<NonNullable<unknown>> | null;\n  /**\n   * Security mechanism(s) to use for the request.\n   */\n  security?: ReadonlyArray<Auth>;\n  url: Url;\n}\n\nexport type RequestResult<\n  TComposable extends Composable,\n  ResT,\n  TError,\n> = TComposable extends '$fetch'\n  ? ReturnType<typeof $fetch<ResT>>\n  : TComposable extends 'useAsyncData'\n    ? ReturnType<typeof useAsyncData<ResT | null, TError>>\n    : TComposable extends 'useFetch'\n      ? ReturnType<typeof useFetch<ResT | null, TError>>\n      : TComposable extends 'useLazyAsyncData'\n        ? ReturnType<typeof useLazyAsyncData<ResT | null, TError>>\n        : TComposable extends 'useLazyFetch'\n          ? ReturnType<typeof useLazyFetch<ResT | null, TError>>\n          : never;\n\nexport interface ClientOptions {\n  baseURL?: string;\n}\n\ntype MethodFn = <\n  TComposable extends Composable = '$fetch',\n  ResT = unknown,\n  TError = unknown,\n  DefaultT = undefined,\n>(\n  options: Omit<RequestOptions<TComposable, ResT, DefaultT>, 'method'>,\n) => RequestResult<TComposable, ResT, TError>;\n\ntype SseFn = <\n  TComposable extends Composable = '$fetch',\n  ResT = unknown,\n  TError = unknown,\n  DefaultT = undefined,\n>(\n  options: Omit<RequestOptions<TComposable, ResT, DefaultT>, 'method'>,\n) => Promise<ServerSentEventsResult<RequestResult<TComposable, ResT, TError>>>;\n\ntype RequestFn = <\n  TComposable extends Composable = '$fetch',\n  ResT = unknown,\n  TError = unknown,\n  DefaultT = undefined,\n>(\n  options: Omit<RequestOptions<TComposable, ResT, DefaultT>, 'method'> &\n    Pick<Required<RequestOptions<TComposable, ResT, DefaultT>>, 'method'>,\n) => RequestResult<TComposable, ResT, TError>;\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 = ClientOptions> = (\n  override?: Config<ClientOptions & T>,\n) => Config<Required<ClientOptions> & T>;\n\nexport interface TDataShape {\n  body?: unknown;\n  headers?: unknown;\n  path?: FetchOptions<unknown>['query'];\n  query?: FetchOptions<unknown>['query'];\n  url: string;\n}\n\nexport type BuildUrlOptions<\n  TData extends Omit<TDataShape, 'headers'> = Omit<TDataShape, 'headers'>,\n> = Pick<WithRefs<TData>, 'path' | 'query'> &\n  Pick<TData, 'url'> &\n  Pick<Options<'$fetch', TData>, 'baseURL' | 'querySerializer'>;\n\ntype BuildUrlFn = <TData extends Omit<TDataShape, 'headers'>>(\n  options: BuildUrlOptions<TData>,\n) => string;\n\nexport type Client = CoreClient<RequestFn, Config, MethodFn, BuildUrlFn, SseFn>;\n\ntype OmitKeys<T, K> = Pick<T, Exclude<keyof T, K>>;\n\nexport type Options<\n  TComposable extends Composable = '$fetch',\n  TData extends TDataShape = TDataShape,\n  ResT = unknown,\n  DefaultT = undefined,\n> = OmitKeys<RequestOptions<TComposable, ResT, DefaultT>, 'body' | 'path' | 'query' | 'url'> &\n  ([TData] extends [never] ? unknown : WithRefs<Omit<TData, 'url'>>);\n\ntype FetchOptions<TData> = Omit<UseFetchOptions<TData, TData>, keyof AsyncDataOptions<TData>>;\n\nexport type Composable =\n  | '$fetch'\n  | 'useAsyncData'\n  | 'useFetch'\n  | 'useLazyAsyncData'\n  | 'useLazyFetch';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-nuxt/base-url-strict/client/utils.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { ComputedRef, Ref } from 'vue';\nimport { isRef, toValue, unref } from 'vue';\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 type {\n  ArraySeparatorStyle,\n  BuildUrlOptions,\n  Client,\n  ClientOptions,\n  Config,\n  QuerySerializer,\n  RequestOptions,\n} from './types.gen';\n\ntype PathSerializer = Pick<Required<BuildUrlOptions>, 'path' | 'url'>;\n\nconst PATH_PARAM_RE = /\\{[^{}]+\\}/g;\n\ntype MaybeArray<T> = T | T[];\n\nconst 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 = toValue((toValue(path) as Record<string, unknown> | undefined)?.[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 createQuerySerializer = <T = unknown>({\n  parameters = {},\n  ...args\n}: QuerySerializerOptions = {}) => {\n  const querySerializer = (queryParams: T) => {\n    const search: string[] = [];\n    const qParams = toValue(queryParams);\n    if (qParams && typeof qParams === 'object') {\n      for (const name in qParams) {\n        const value = toValue(qParams[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\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    (toValue(options.query) as Record<string, unknown> | undefined)?.[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    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        const queryValue = toValue(options.query) as Record<string, unknown> | undefined;\n        if (queryValue) {\n          queryValue[name] = token;\n        }\n        break;\n      }\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  const url = 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  return url;\n};\n\nexport const getUrl = ({\n  baseUrl,\n  path,\n  query,\n  querySerializer,\n  url: _url,\n}: Pick<BuildUrlOptions, 'path' | 'query' | 'url'> & {\n  baseUrl?: string;\n  querySerializer: QuerySerializer;\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 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 || typeof header !== 'object') {\n      continue;\n    }\n\n    let h: unknown = header;\n    if (isRef(h)) {\n      h = unref(h);\n    }\n\n    const iterator =\n      h instanceof Headers ? headersEntries(h) : Object.entries(h as Record<string, unknown>);\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, unwrapRefs(v) as string);\n        }\n      } else if (value !== undefined) {\n        const v = unwrapRefs(value);\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(key, typeof v === 'object' ? JSON.stringify(v) : (v as string));\n      }\n    }\n  }\n  return mergedHeaders;\n};\n\nexport const mergeInterceptors = <T>(...args: Array<MaybeArray<T>>): Array<T> =>\n  args.reduce<Array<T>>((acc, item) => {\n    if (typeof item === 'function') {\n      acc.push(item);\n    } else if (Array.isArray(item)) {\n      return acc.concat(item);\n    }\n    return acc;\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  querySerializer: defaultQuerySerializer,\n  ...override,\n});\n\ntype UnwrapRefs<T> =\n  T extends Ref<infer V>\n    ? V\n    : T extends ComputedRef<infer V>\n      ? V\n      : T extends Record<string, unknown> // this doesn't handle functions well\n        ? { [K in keyof T]: UnwrapRefs<T[K]> }\n        : T;\n\nexport const unwrapRefs = <T>(value: T): UnwrapRefs<T> => {\n  if (value === null || typeof value !== 'object' || value instanceof Headers) {\n    return (isRef(value) ? unref(value) : value) as UnwrapRefs<T>;\n  }\n\n  if (\n    value instanceof Blob ||\n    value instanceof FormData ||\n    value instanceof ReadableStream ||\n    value instanceof AbortSignal\n  ) {\n    return value as UnwrapRefs<T>;\n  }\n\n  if (Array.isArray(value)) {\n    return value.map((item) => unwrapRefs(item)) as UnwrapRefs<T>;\n  }\n\n  if (isRef(value)) {\n    return unwrapRefs(unref(value) as T);\n  }\n\n  // unwrap into new object to avoid modifying the source\n  const result: Record<string, unknown> = {};\n  for (const key in value) {\n    result[key] = unwrapRefs(value[key] as T);\n  }\n  return result as UnwrapRefs<T>;\n};\n\nexport const serializeBody = (\n  opts: Pick<Parameters<Client['request']>[0], 'body' | 'bodySerializer'>,\n) => {\n  if (opts.body && opts.bodySerializer) {\n    return opts.bodySerializer(opts.body);\n  }\n  return opts.body;\n};\n\nexport const executeFetchFn = (\n  opts: Omit<Parameters<Client['request']>[0], 'composable'>,\n  fetchFn: Required<Config>['$fetch'],\n) => {\n  const unwrappedOpts = unwrapRefs(opts);\n  unwrappedOpts.rawBody = unwrappedOpts.body;\n  unwrappedOpts.body = serializeBody(unwrappedOpts);\n  return fetchFn(\n    buildUrl(opts),\n    // @ts-expect-error\n    unwrappedOpts,\n  );\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-nuxt/base-url-strict/client.gen.ts",
    "content": "// 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: 'http://localhost:3000/base' }));\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-nuxt/base-url-strict/core/auth.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-nuxt/base-url-strict/core/bodySerializer.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-nuxt/base-url-strict/core/params.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-nuxt/base-url-strict/core/pathSerializer.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-nuxt/base-url-strict/core/queryKeySerializer.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\n/**\n * JSON-friendly union that mirrors what Pinia Colada can hash.\n */\nexport type JsonValue =\n  | null\n  | string\n  | number\n  | boolean\n  | JsonValue[]\n  | { [key: string]: JsonValue };\n\n/**\n * Replacer that converts non-JSON values (bigint, Date, etc.) to safe substitutes.\n */\nexport const queryKeyJsonReplacer = (_key: string, value: unknown) => {\n  if (value === undefined || typeof value === 'function' || typeof value === 'symbol') {\n    return undefined;\n  }\n  if (typeof value === 'bigint') {\n    return value.toString();\n  }\n  if (value instanceof Date) {\n    return value.toISOString();\n  }\n  return value;\n};\n\n/**\n * Safely stringifies a value and parses it back into a JsonValue.\n */\nexport const stringifyToJsonValue = (input: unknown): JsonValue | undefined => {\n  try {\n    const json = JSON.stringify(input, queryKeyJsonReplacer);\n    if (json === undefined) {\n      return undefined;\n    }\n    return JSON.parse(json) as JsonValue;\n  } catch {\n    return undefined;\n  }\n};\n\n/**\n * Detects plain objects (including objects with a null prototype).\n */\nconst isPlainObject = (value: unknown): value is Record<string, unknown> => {\n  if (value === null || typeof value !== 'object') {\n    return false;\n  }\n  const prototype = Object.getPrototypeOf(value as object);\n  return prototype === Object.prototype || prototype === null;\n};\n\n/**\n * Turns URLSearchParams into a sorted JSON object for deterministic keys.\n */\nconst serializeSearchParams = (params: URLSearchParams): JsonValue => {\n  const entries = Array.from(params.entries()).sort(([a], [b]) => a.localeCompare(b));\n  const result: Record<string, JsonValue> = {};\n\n  for (const [key, value] of entries) {\n    const existing = result[key];\n    if (existing === undefined) {\n      result[key] = value;\n      continue;\n    }\n\n    if (Array.isArray(existing)) {\n      (existing as string[]).push(value);\n    } else {\n      result[key] = [existing, value];\n    }\n  }\n\n  return result;\n};\n\n/**\n * Normalizes any accepted value into a JSON-friendly shape for query keys.\n */\nexport const serializeQueryKeyValue = (value: unknown): JsonValue | undefined => {\n  if (value === null) {\n    return null;\n  }\n\n  if (typeof value === 'string' || typeof value === 'number' || typeof value === 'boolean') {\n    return value;\n  }\n\n  if (value === undefined || typeof value === 'function' || typeof value === 'symbol') {\n    return undefined;\n  }\n\n  if (typeof value === 'bigint') {\n    return value.toString();\n  }\n\n  if (value instanceof Date) {\n    return value.toISOString();\n  }\n\n  if (Array.isArray(value)) {\n    return stringifyToJsonValue(value);\n  }\n\n  if (typeof URLSearchParams !== 'undefined' && value instanceof URLSearchParams) {\n    return serializeSearchParams(value);\n  }\n\n  if (isPlainObject(value)) {\n    return stringifyToJsonValue(value);\n  }\n\n  return undefined;\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-nuxt/base-url-strict/core/serverSentEvents.gen.ts",
    "content": "// 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 const 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            // Normalize line endings: CRLF -> LF, then CR -> LF\n            buffer = buffer.replace(/\\r\\n/g, '\\n').replace(/\\r/g, '\\n');\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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-nuxt/base-url-strict/core/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { Auth, AuthToken } from './auth.gen';\nimport type { BodySerializer, QuerySerializer, QuerySerializerOptions } from './bodySerializer.gen';\n\nexport type HttpMethod =\n  | 'connect'\n  | 'delete'\n  | 'get'\n  | 'head'\n  | 'options'\n  | 'patch'\n  | 'post'\n  | 'put'\n  | 'trace';\n\nexport type Client<\n  RequestFn = never,\n  Config = unknown,\n  MethodFn = never,\n  BuildUrlFn = never,\n  SseFn = never,\n> = {\n  /**\n   * Returns the final request URL.\n   */\n  buildUrl: BuildUrlFn;\n  getConfig: () => Config;\n  request: RequestFn;\n  setConfig: (config: Config) => Config;\n} & {\n  [K in HttpMethod]: MethodFn;\n} & ([SseFn] extends [never] ? { sse?: never } : { sse: { [K in HttpMethod]: SseFn } });\n\nexport interface Config {\n  /**\n   * Auth token or a function returning auth token. The resolved value will be\n   * added to the request payload as defined by its `security` array.\n   */\n  auth?: ((auth: Auth) => Promise<AuthToken> | AuthToken) | AuthToken;\n  /**\n   * A function for serializing request body parameter. By default,\n   * {@link JSON.stringify()} will be used.\n   */\n  bodySerializer?: BodySerializer | null;\n  /**\n   * An object containing any HTTP headers that you want to pre-populate your\n   * `Headers` object with.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/Headers/Headers#init See more}\n   */\n  headers?:\n    | RequestInit['headers']\n    | Record<\n        string,\n        string | number | boolean | (string | number | boolean)[] | null | undefined | unknown\n      >;\n  /**\n   * The request method.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/fetch#method See more}\n   */\n  method?: Uppercase<HttpMethod>;\n  /**\n   * A function for serializing request query parameters. By default, arrays\n   * will be exploded in form style, objects will be exploded in deepObject\n   * style, and reserved characters are percent-encoded.\n   *\n   * This method will have no effect if the native `paramsSerializer()` Axios\n   * API function is used.\n   *\n   * {@link https://swagger.io/docs/specification/serialization/#query View examples}\n   */\n  querySerializer?: QuerySerializer | QuerySerializerOptions;\n  /**\n   * A function validating request data. This is useful if you want to ensure\n   * the request conforms to the desired shape, so it can be safely sent to\n   * the server.\n   */\n  requestValidator?: (data: unknown) => Promise<unknown>;\n  /**\n   * A function transforming response data before it's returned. This is useful\n   * for post-processing data, e.g. converting ISO strings into Date objects.\n   */\n  responseTransformer?: (data: unknown) => Promise<unknown>;\n  /**\n   * A function validating response data. This is useful if you want to ensure\n   * the response conforms to the desired shape, so it can be safely passed to\n   * the transformers and returned to the user.\n   */\n  responseValidator?: (data: unknown) => Promise<unknown>;\n}\n\ntype IsExactlyNeverOrNeverUndefined<T> = [T] extends [never]\n  ? true\n  : [T] extends [never | undefined]\n    ? [undefined] extends [T]\n      ? false\n      : true\n    : false;\n\nexport type OmitNever<T extends Record<string, unknown>> = {\n  [K in keyof T as IsExactlyNeverOrNeverUndefined<T[K]> extends true ? never : K]: T[K];\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-nuxt/base-url-strict/core/utils.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-nuxt/base-url-strict/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type { _3eNum1Период, _400, AdditionalPropertiesIntegerIssue, AdditionalPropertiesUnknownIssue, AdditionalPropertiesUnknownIssue2, AdditionalPropertiesUnknownIssue3, AdditionalPropertiesUnknownIssueWritable, AnyOfAnyAndNull, AnyOfArrays, ApiVVersionODataControllerCountData, ApiVVersionODataControllerCountResponse, ApiVVersionODataControllerCountResponses, ArrayWithAnyOfProperties, ArrayWithArray, ArrayWithBooleans, ArrayWithNumbers, ArrayWithProperties, ArrayWithReferences, ArrayWithStrings, CallToTestOrderOfParamsData, CallWithDefaultOptionalParametersData, CallWithDefaultParametersData, CallWithDescriptionsData, CallWithDuplicateResponsesData, CallWithDuplicateResponsesError, CallWithDuplicateResponsesErrors, CallWithDuplicateResponsesResponse, CallWithDuplicateResponsesResponses, CallWithNoContentResponseData, CallWithNoContentResponseResponse, CallWithNoContentResponseResponses, CallWithParametersData, CallWithResponseAndNoContentResponseData, CallWithResponseAndNoContentResponseResponse, CallWithResponseAndNoContentResponseResponses, CallWithResponseData, CallWithResponseResponse, CallWithResponseResponses, CallWithResponsesData, CallWithResponsesError, CallWithResponsesErrors, CallWithResponsesResponse, CallWithResponsesResponses, CallWithResultFromHeaderData, CallWithResultFromHeaderErrors, CallWithResultFromHeaderResponses, CallWithWeirdParameterNamesData, CamelCaseCommentWithBreaks, CharactersInDescription, ClientOptions, CollectionFormatData, CommentWithBackticks, CommentWithBackticksAndQuotes, CommentWithBreaks, CommentWithExpressionPlaceholders, CommentWithQuotes, CommentWithReservedCharacters, CommentWithSlashes, ComplexParamsData, ComplexParamsResponse, ComplexParamsResponses, ComplexTypesData, ComplexTypesErrors, ComplexTypesResponse, ComplexTypesResponses, CompositionBaseModel, CompositionExtendedModel, CompositionWithAllOfAndNullable, CompositionWithAnyOf, CompositionWithAnyOfAndNullable, CompositionWithAnyOfAnonymous, CompositionWithNestedAnyAndTypeNull, CompositionWithNestedAnyOfAndNull, CompositionWithOneOf, CompositionWithOneOfAndComplexArrayDictionary, CompositionWithOneOfAndNullable, CompositionWithOneOfAndProperties, CompositionWithOneOfAndSimpleArrayDictionary, CompositionWithOneOfAndSimpleDictionary, CompositionWithOneOfAnonymous, CompositionWithOneOfDiscriminator, ConstValue, Default, DeleteCallWithoutParametersAndResponseData, DeleteFooData, DeleteFooData2, DeleteFooData3, DeprecatedCallData, DeprecatedModel, DictionaryWithArray, DictionaryWithDictionary, DictionaryWithProperties, DictionaryWithPropertiesAndAdditionalProperties, DictionaryWithReference, DictionaryWithString, DummyAData, DummyAResponse, DummyAResponses, DummyBData, DummyBResponse, DummyBResponses, DuplicateName2Data, DuplicateName3Data, DuplicateName4Data, DuplicateNameData, EnumFromDescription, EnumWithExtensions, EnumWithNumbers, EnumWithReplacedCharacters, EnumWithStrings, EnumWithXEnumNames, ExportData, ExternalRefA, ExternalRefB, ExternalSharedModel, File, FileResponseData, FileResponseResponse, FileResponseResponses, FileWritable, FooWowData, FooWowResponses, FreeFormObjectWithAdditionalPropertiesEqEmptyObject, FreeFormObjectWithAdditionalPropertiesEqTrue, FreeFormObjectWithoutAdditionalProperties, GenericSchemaDuplicateIssue1SystemBoolean, GenericSchemaDuplicateIssue1SystemBooleanWritable, GenericSchemaDuplicateIssue1SystemString, GenericSchemaDuplicateIssue1SystemStringWritable, GetApiVbyApiVersionSimpleOperationData, GetApiVbyApiVersionSimpleOperationError, GetApiVbyApiVersionSimpleOperationErrors, GetApiVbyApiVersionSimpleOperationResponse, GetApiVbyApiVersionSimpleOperationResponses, GetCallWithOptionalParamData, GetCallWithoutParametersAndResponseData, HeadCallWithoutParametersAndResponseData, Import, ImportData, ImportResponse, ImportResponses, IoK8sApimachineryPkgApisMetaV1DeleteOptions, IoK8sApimachineryPkgApisMetaV1Preconditions, ModelCircle, ModelFromZendesk, ModelSquare, ModelThatExtends, ModelThatExtendsExtends, ModelWithAdditionalPropertiesEqTrue, ModelWithAdditionalPropertiesRef, ModelWithAnyOfConstantSizeArray, ModelWithAnyOfConstantSizeArrayAndIntersect, ModelWithAnyOfConstantSizeArrayNullable, ModelWithAnyOfConstantSizeArrayWithNSizeAndOptions, ModelWithAnyOfConstantSizeArrayWithNSizeAndOptionsWritable, ModelWithArray, ModelWithArrayReadOnlyAndWriteOnly, ModelWithArrayReadOnlyAndWriteOnlyWritable, ModelWithBackticksInDescription, ModelWithBoolean, ModelWithCircularReference, ModelWithConst, ModelWithConstantSizeArray, ModelWithDictionary, ModelWithDuplicateImports, ModelWithDuplicateProperties, ModelWithEnum, ModelWithEnumFromDescription, ModelWithEnumWithHyphen, ModelWithInteger, ModelWithNestedArrayEnums, ModelWithNestedArrayEnumsData, ModelWithNestedArrayEnumsDataBar, ModelWithNestedArrayEnumsDataFoo, ModelWithNestedCompositionEnums, ModelWithNestedEnums, ModelWithNestedProperties, ModelWithNullableObject, ModelWithNullableString, ModelWithNumericEnumUnion, ModelWithOneOfAndProperties, ModelWithOneOfEnum, ModelWithOrderedProperties, ModelWithPattern, ModelWithPatternWritable, ModelWithPrefixItemsConstantSizeArray, ModelWithProperties, ModelWithPropertiesWritable, ModelWithReadOnlyAndWriteOnly, ModelWithReadOnlyAndWriteOnlyWritable, ModelWithReference, ModelWithReferenceWritable, ModelWithString, ModelWithStringError, MultipartRequestData, MultipartResponseData, MultipartResponseResponse, MultipartResponseResponses, NestedAnyOfArraysNullable, NonAsciiæøåÆøÅöôêÊ字符串Data, NonAsciiæøåÆøÅöôêÊ字符串Response, NonAsciiæøåÆøÅöôêÊ字符串Responses, NonAsciiStringæøåÆøÅöôêÊ字符串, NullableObject, OneOfAllOfIssue, OneOfAllOfIssueWritable, OptionsCallWithoutParametersAndResponseData, Pageable, ParameterSimpleParameterUnused, PatchApiVbyApiVersionNoTagData, PatchApiVbyApiVersionNoTagResponses, PatchCallWithoutParametersAndResponseData, PostApiVbyApiVersionFormDataData, PostApiVbyApiVersionRequestBodyData, PostCallWithOptionalParamData, PostCallWithOptionalParamResponse, PostCallWithOptionalParamResponses, PostCallWithoutParametersAndResponseData, PostServiceWithEmptyTagResponse, PostServiceWithEmptyTagResponse2, PutCallWithoutParametersAndResponseData, PutWithFormUrlEncodedData, SchemaWithFormRestrictedKeys, SimpleBoolean, SimpleFile, SimpleFormData, SimpleInteger, SimpleParameter, SimpleReference, SimpleRequestBody, SimpleString, SimpleStringWithPattern, TestErrorCodeData, TestErrorCodeErrors, TestErrorCodeResponses, TypesData, TypesResponse, TypesResponses, UploadFileData, UploadFileResponse, UploadFileResponses, XFooBar } from './types.gen';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-nuxt/base-url-strict/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type ClientOptions = {\n    baseURL: 'http://localhost:3000/base';\n};\n\n/**\n * Model with number-only name\n */\nexport type _400 = string;\n\n/**\n * External ref to shared model (A)\n */\nexport type ExternalRefA = ExternalSharedModel;\n\n/**\n * External ref to shared model (B)\n */\nexport type ExternalRefB = ExternalSharedModel;\n\n/**\n * Testing multiline comments in string: First line\n * Second line\n *\n * Fourth line\n */\nexport type CamelCaseCommentWithBreaks = number;\n\n/**\n * Testing multiline comments in string: First line\n * Second line\n *\n * Fourth line\n */\nexport type CommentWithBreaks = number;\n\n/**\n * Testing backticks in string: `backticks` and ```multiple backticks``` should work\n */\nexport type CommentWithBackticks = number;\n\n/**\n * Testing backticks and quotes in string: `backticks`, 'quotes', \"double quotes\" and ```multiple backticks``` should work\n */\nexport type CommentWithBackticksAndQuotes = number;\n\n/**\n * Testing slashes in string: \\backwards\\\\\\ and /forwards/// should work\n */\nexport type CommentWithSlashes = number;\n\n/**\n * Testing expression placeholders in string: ${expression} should work\n */\nexport type CommentWithExpressionPlaceholders = number;\n\n/**\n * Testing quotes in string: 'single quote''' and \"double quotes\"\"\" should work\n */\nexport type CommentWithQuotes = number;\n\n/**\n * Testing reserved characters in string: * inline * and ** inline ** should work\n */\nexport type CommentWithReservedCharacters = number;\n\n/**\n * This is a simple number\n */\nexport type SimpleInteger = number;\n\n/**\n * This is a simple boolean\n */\nexport type SimpleBoolean = boolean;\n\n/**\n * This is a simple string\n */\nexport type SimpleString = string;\n\n/**\n * A string with non-ascii (unicode) characters valid in typescript identifiers (æøåÆØÅöÔèÈ字符串)\n */\nexport type NonAsciiStringæøåÆøÅöôêÊ字符串 = string;\n\n/**\n * This is a simple file\n */\nexport type SimpleFile = Blob | File;\n\n/**\n * This is a simple reference\n */\nexport type SimpleReference = ModelWithString;\n\n/**\n * This is a simple string\n */\nexport type SimpleStringWithPattern = string | null;\n\n/**\n * This is a simple enum with strings\n */\nexport type EnumWithStrings = 'Success' | 'Warning' | 'Error' | '\\'Single Quote\\'' | '\"Double Quotes\"' | 'Non-ascii: øæåôöØÆÅÔÖ字符串';\n\nexport type EnumWithReplacedCharacters = '\\'Single Quote\\'' | '\"Double Quotes\"' | 'øæåôöØÆÅÔÖ字符串' | 3.1 | '';\n\n/**\n * This is a simple enum with numbers\n */\nexport type EnumWithNumbers = 1 | 2 | 3 | 1.1 | 1.2 | 1.3 | 100 | 200 | 300 | -100 | -200 | -300 | -1.1 | -1.2 | -1.3;\n\n/**\n * Success=1,Warning=2,Error=3\n */\nexport type EnumFromDescription = number;\n\n/**\n * This is a simple enum with numbers\n */\nexport type EnumWithExtensions = 200 | 400 | 500;\n\nexport type EnumWithXEnumNames = 0 | 1 | 2;\n\n/**\n * This is a simple array with numbers\n */\nexport type ArrayWithNumbers = Array<number>;\n\n/**\n * This is a simple array with booleans\n */\nexport type ArrayWithBooleans = Array<boolean>;\n\n/**\n * This is a simple array with strings\n */\nexport type ArrayWithStrings = Array<string>;\n\n/**\n * This is a simple array with references\n */\nexport type ArrayWithReferences = Array<ModelWithString>;\n\n/**\n * This is a simple array containing an array\n */\nexport type ArrayWithArray = Array<Array<ModelWithString>>;\n\n/**\n * This is a simple array with properties\n */\nexport type ArrayWithProperties = Array<{\n    '16x16'?: CamelCaseCommentWithBreaks;\n    bar?: string;\n}>;\n\n/**\n * This is a simple array with any of properties\n */\nexport type ArrayWithAnyOfProperties = Array<{\n    foo?: string;\n} | {\n    bar?: string;\n}>;\n\nexport type AnyOfAnyAndNull = {\n    data?: unknown | null;\n};\n\n/**\n * This is a simple array with any of properties\n */\nexport type AnyOfArrays = {\n    results?: Array<{\n        foo?: string;\n    } | {\n        bar?: string;\n    }>;\n};\n\n/**\n * This is a string dictionary\n */\nexport type DictionaryWithString = {\n    [key: string]: string;\n};\n\nexport type DictionaryWithPropertiesAndAdditionalProperties = {\n    foo?: number;\n    bar?: boolean;\n    [key: string]: string | number | boolean | undefined;\n};\n\n/**\n * This is a string reference\n */\nexport type DictionaryWithReference = {\n    [key: string]: ModelWithString;\n};\n\n/**\n * This is a complex dictionary\n */\nexport type DictionaryWithArray = {\n    [key: string]: Array<ModelWithString>;\n};\n\n/**\n * This is a string dictionary\n */\nexport type DictionaryWithDictionary = {\n    [key: string]: {\n        [key: string]: string;\n    };\n};\n\n/**\n * This is a complex dictionary\n */\nexport type DictionaryWithProperties = {\n    [key: string]: {\n        foo?: string;\n        bar?: string;\n    };\n};\n\n/**\n * This is a model with one number property\n */\nexport type ModelWithInteger = {\n    /**\n     * This is a simple number property\n     */\n    prop?: number;\n};\n\n/**\n * This is a model with one boolean property\n */\nexport type ModelWithBoolean = {\n    /**\n     * This is a simple boolean property\n     */\n    prop?: boolean;\n};\n\n/**\n * This is a model with one string property\n */\nexport type ModelWithString = {\n    /**\n     * This is a simple string property\n     */\n    prop?: string;\n};\n\n/**\n * This is a model with one string property\n */\nexport type ModelWithStringError = {\n    /**\n     * This is a simple string property\n     */\n    prop?: string;\n};\n\n/**\n * `Comment` or `VoiceComment`. The JSON object for adding voice comments to tickets is different. See [Adding voice comments to tickets](/documentation/ticketing/managing-tickets/adding-voice-comments-to-tickets)\n */\nexport type ModelFromZendesk = string;\n\n/**\n * This is a model with one string property\n */\nexport type ModelWithNullableString = {\n    /**\n     * This is a simple string property\n     */\n    nullableProp1?: string | null;\n    /**\n     * This is a simple string property\n     */\n    nullableRequiredProp1: string | null;\n    /**\n     * This is a simple string property\n     */\n    nullableProp2?: string | null;\n    /**\n     * This is a simple string property\n     */\n    nullableRequiredProp2: string | null;\n    /**\n     * This is a simple enum with strings\n     */\n    'foo_bar-enum'?: 'Success' | 'Warning' | 'Error' | 'ØÆÅ字符串';\n};\n\n/**\n * This is a model with one enum\n */\nexport type ModelWithEnum = {\n    /**\n     * This is a simple enum with strings\n     */\n    'foo_bar-enum'?: 'Success' | 'Warning' | 'Error' | 'ØÆÅ字符串';\n    /**\n     * These are the HTTP error code enums\n     */\n    statusCode?: '100' | '200 FOO' | '300 FOO_BAR' | '400 foo-bar' | '500 foo.bar' | '600 foo&bar';\n    /**\n     * Simple boolean enum\n     */\n    bool?: true;\n};\n\n/**\n * This is a model with one enum with escaped name\n */\nexport type ModelWithEnumWithHyphen = {\n    /**\n     * Foo-Bar-Baz-Qux\n     */\n    'foo-bar-baz-qux'?: '3.0';\n};\n\n/**\n * This is a model with one enum\n */\nexport type ModelWithEnumFromDescription = {\n    /**\n     * Success=1,Warning=2,Error=3\n     */\n    test?: number;\n};\n\n/**\n * This is a model with nested enums\n */\nexport type ModelWithNestedEnums = {\n    dictionaryWithEnum?: {\n        [key: string]: 'Success' | 'Warning' | 'Error';\n    };\n    dictionaryWithEnumFromDescription?: {\n        [key: string]: number;\n    };\n    arrayWithEnum?: Array<'Success' | 'Warning' | 'Error'>;\n    arrayWithDescription?: Array<number>;\n    /**\n     * This is a simple enum with strings\n     */\n    'foo_bar-enum'?: 'Success' | 'Warning' | 'Error' | 'ØÆÅ字符串';\n};\n\n/**\n * This is a model with one property containing a reference\n */\nexport type ModelWithReference = {\n    prop?: ModelWithProperties;\n};\n\n/**\n * This is a model with one property containing an array\n */\nexport type ModelWithArrayReadOnlyAndWriteOnly = {\n    prop?: Array<ModelWithReadOnlyAndWriteOnly>;\n    propWithFile?: Array<Blob | File>;\n    propWithNumber?: Array<number>;\n};\n\n/**\n * This is a model with one property containing an array\n */\nexport type ModelWithArray = {\n    prop?: Array<ModelWithString>;\n    propWithFile?: Array<Blob | File>;\n    propWithNumber?: Array<number>;\n};\n\n/**\n * This is a model with one property containing a dictionary\n */\nexport type ModelWithDictionary = {\n    prop?: {\n        [key: string]: string;\n    };\n};\n\n/**\n * This is a deprecated model with a deprecated property\n *\n * @deprecated\n */\nexport type DeprecatedModel = {\n    /**\n     * This is a deprecated property\n     *\n     * @deprecated\n     */\n    prop?: string;\n};\n\n/**\n * This is a model with one property containing a circular reference\n */\nexport type ModelWithCircularReference = {\n    prop?: ModelWithCircularReference;\n};\n\n/**\n * This is a model with one property with a 'one of' relationship\n */\nexport type CompositionWithOneOf = {\n    propA?: ModelWithString | ModelWithEnum | ModelWithArray | ModelWithDictionary;\n};\n\n/**\n * This is a model with one property with a 'one of' relationship where the options are not $ref\n */\nexport type CompositionWithOneOfAnonymous = {\n    propA?: {\n        propA?: string;\n    } | string | number;\n};\n\n/**\n * Circle\n */\nexport type ModelCircle = {\n    kind: string;\n    radius?: number;\n};\n\n/**\n * Square\n */\nexport type ModelSquare = {\n    kind: string;\n    sideLength?: number;\n};\n\n/**\n * This is a model with one property with a 'one of' relationship where the options are not $ref\n */\nexport type CompositionWithOneOfDiscriminator = ({\n    kind: 'circle';\n} & ModelCircle) | ({\n    kind: 'square';\n} & ModelSquare);\n\n/**\n * This is a model with one property with a 'any of' relationship\n */\nexport type CompositionWithAnyOf = {\n    propA?: ModelWithString | ModelWithEnum | ModelWithArray | ModelWithDictionary;\n};\n\n/**\n * This is a model with one property with a 'any of' relationship where the options are not $ref\n */\nexport type CompositionWithAnyOfAnonymous = {\n    propA?: {\n        propA?: string;\n    } | string | number;\n};\n\n/**\n * This is a model with nested 'any of' property with a type null\n */\nexport type CompositionWithNestedAnyAndTypeNull = {\n    propA?: Array<ModelWithDictionary | null> | Array<ModelWithArray | null>;\n};\n\nexport type _3eNum1Период = 'Bird' | 'Dog';\n\nexport type ConstValue = 'ConstValue';\n\n/**\n * This is a model with one property with a 'any of' relationship where the options are not $ref\n */\nexport type CompositionWithNestedAnyOfAndNull = {\n    /**\n     * Scopes\n     */\n    propA?: Array<_3eNum1Период | ConstValue> | null;\n};\n\n/**\n * This is a model with one property with a 'one of' relationship\n */\nexport type CompositionWithOneOfAndNullable = {\n    propA?: {\n        boolean?: boolean;\n    } | ModelWithEnum | ModelWithArray | ModelWithDictionary | null;\n};\n\n/**\n * This is a model that contains a simple dictionary within composition\n */\nexport type CompositionWithOneOfAndSimpleDictionary = {\n    propA?: boolean | {\n        [key: string]: number;\n    };\n};\n\n/**\n * This is a model that contains a dictionary of simple arrays within composition\n */\nexport type CompositionWithOneOfAndSimpleArrayDictionary = {\n    propA?: boolean | {\n        [key: string]: Array<boolean>;\n    };\n};\n\n/**\n * This is a model that contains a dictionary of complex arrays (composited) within composition\n */\nexport type CompositionWithOneOfAndComplexArrayDictionary = {\n    propA?: boolean | {\n        [key: string]: Array<number | string>;\n    };\n};\n\n/**\n * This is a model with one property with a 'all of' relationship\n */\nexport type CompositionWithAllOfAndNullable = {\n    propA?: ({\n        boolean?: boolean;\n    } & ModelWithEnum & ModelWithArray & ModelWithDictionary) | null;\n};\n\n/**\n * This is a model with one property with a 'any of' relationship\n */\nexport type CompositionWithAnyOfAndNullable = {\n    propA?: {\n        boolean?: boolean;\n    } | ModelWithEnum | ModelWithArray | ModelWithDictionary | null;\n};\n\n/**\n * This is a base model with two simple optional properties\n */\nexport type CompositionBaseModel = {\n    firstName?: string;\n    lastname?: string;\n};\n\n/**\n * This is a model that extends the base model\n */\nexport type CompositionExtendedModel = CompositionBaseModel & {\n    age: number;\n    firstName: string;\n    lastname: string;\n};\n\n/**\n * This is a model with one nested property\n */\nexport type ModelWithProperties = {\n    required: string;\n    readonly requiredAndReadOnly: string;\n    requiredAndNullable: string | null;\n    string?: string;\n    number?: number;\n    boolean?: boolean;\n    reference?: ModelWithString;\n    'property with space'?: string;\n    default?: string;\n    try?: string;\n    readonly '@namespace.string'?: string;\n    readonly '@namespace.integer'?: number;\n};\n\n/**\n * This is a model with one nested property\n */\nexport type ModelWithNestedProperties = {\n    readonly first: {\n        readonly second: {\n            readonly third: string | null;\n        } | null;\n    } | null;\n};\n\n/**\n * This is a model with duplicated properties\n */\nexport type ModelWithDuplicateProperties = {\n    prop?: ModelWithString;\n};\n\n/**\n * This is a model with ordered properties\n */\nexport type ModelWithOrderedProperties = {\n    zebra?: string;\n    apple?: string;\n    hawaii?: string;\n};\n\n/**\n * This is a model with duplicated imports\n */\nexport type ModelWithDuplicateImports = {\n    propA?: ModelWithString;\n    propB?: ModelWithString;\n    propC?: ModelWithString;\n};\n\n/**\n * This is a model that extends another model\n */\nexport type ModelThatExtends = ModelWithString & {\n    propExtendsA?: string;\n    propExtendsB?: ModelWithString;\n};\n\n/**\n * This is a model that extends another model\n */\nexport type ModelThatExtendsExtends = ModelWithString & ModelThatExtends & {\n    propExtendsC?: string;\n    propExtendsD?: ModelWithString;\n};\n\n/**\n * This is a model that contains a some patterns\n */\nexport type ModelWithPattern = {\n    key: string;\n    name: string;\n    readonly enabled?: boolean;\n    readonly modified?: string;\n    id?: string;\n    text?: string;\n    patternWithSingleQuotes?: string;\n    patternWithNewline?: string;\n    patternWithBacktick?: string;\n    patternWithUnicode?: string;\n};\n\nexport type File = {\n    /**\n     * Id\n     */\n    readonly id?: string;\n    /**\n     * Updated at\n     */\n    readonly updated_at?: string;\n    /**\n     * Created at\n     */\n    readonly created_at?: string;\n    /**\n     * Mime\n     */\n    mime: string;\n    /**\n     * File\n     */\n    readonly file?: string;\n};\n\nexport type Default = {\n    name?: string;\n};\n\nexport type Pageable = {\n    page?: number;\n    size?: number;\n    sort?: Array<string>;\n};\n\n/**\n * This is a free-form object without additionalProperties.\n */\nexport type FreeFormObjectWithoutAdditionalProperties = {\n    [key: string]: unknown;\n};\n\n/**\n * This is a free-form object with additionalProperties: true.\n */\nexport type FreeFormObjectWithAdditionalPropertiesEqTrue = {\n    [key: string]: unknown;\n};\n\n/**\n * This is a free-form object with additionalProperties: {}.\n */\nexport type FreeFormObjectWithAdditionalPropertiesEqEmptyObject = {\n    [key: string]: unknown;\n};\n\nexport type ModelWithConst = {\n    String?: 'String';\n    number?: 0;\n    null?: null;\n    withType?: 'Some string';\n};\n\n/**\n * This is a model with one property and additionalProperties: true\n */\nexport type ModelWithAdditionalPropertiesEqTrue = {\n    /**\n     * This is a simple string property\n     */\n    prop?: string;\n    [key: string]: unknown;\n};\n\nexport type NestedAnyOfArraysNullable = {\n    nullableArray?: Array<string | boolean> | null;\n};\n\nexport type CompositionWithOneOfAndProperties = ({\n    foo: SimpleParameter;\n} | {\n    bar: NonAsciiStringæøåÆøÅöôêÊ字符串;\n}) & {\n    baz: number | null;\n    qux: number;\n};\n\n/**\n * An object that can be null\n */\nexport type NullableObject = {\n    foo?: string;\n} | null;\n\n/**\n * Some % character\n */\nexport type CharactersInDescription = string;\n\nexport type ModelWithNullableObject = {\n    data?: NullableObject;\n};\n\n/**\n * An object with additional properties that can be null (anyOf ref + null)\n */\nexport type ModelWithAdditionalPropertiesRef = {\n    [key: string]: NullableObject | null;\n};\n\nexport type ModelWithOneOfEnum = {\n    foo: 'Bar';\n} | {\n    foo: 'Baz';\n} | {\n    foo: 'Qux';\n} | {\n    content: string;\n    foo: 'Quux';\n} | {\n    content: [\n        string,\n        string\n    ];\n    foo: 'Corge';\n};\n\nexport type ModelWithNestedArrayEnumsDataFoo = 'foo' | 'bar';\n\nexport type ModelWithNestedArrayEnumsDataBar = 'baz' | 'qux';\n\nexport type ModelWithNestedArrayEnumsData = {\n    foo?: Array<ModelWithNestedArrayEnumsDataFoo>;\n    bar?: Array<ModelWithNestedArrayEnumsDataBar>;\n};\n\nexport type ModelWithNestedArrayEnums = {\n    array_strings?: Array<string>;\n    data?: ModelWithNestedArrayEnumsData;\n};\n\nexport type ModelWithNestedCompositionEnums = {\n    foo?: ModelWithNestedArrayEnumsDataFoo;\n};\n\nexport type ModelWithReadOnlyAndWriteOnly = {\n    foo: string;\n    readonly bar: string;\n};\n\nexport type ModelWithConstantSizeArray = [\n    number,\n    number\n];\n\nexport type ModelWithAnyOfConstantSizeArray = [\n    number | string,\n    number | string,\n    number | string\n];\n\nexport type ModelWithPrefixItemsConstantSizeArray = [\n    ModelWithInteger,\n    number | string,\n    string\n];\n\nexport type ModelWithAnyOfConstantSizeArrayNullable = [\n    number | null | string,\n    number | null | string,\n    number | null | string\n];\n\nexport type ModelWithAnyOfConstantSizeArrayWithNSizeAndOptions = [\n    number | Import,\n    number | Import\n];\n\nexport type ModelWithAnyOfConstantSizeArrayAndIntersect = [\n    number & string,\n    number & string\n];\n\nexport type ModelWithNumericEnumUnion = {\n    /**\n     * Период\n     */\n    value?: -10 | -1 | 0 | 1 | 3 | 6 | 12;\n};\n\n/**\n * Some description with `back ticks`\n */\nexport type ModelWithBackticksInDescription = {\n    /**\n     * The template `that` should be used for parsing and importing the contents of the CSV file.\n     *\n     * <br/><p>There is one placeholder currently supported:<ul>     <li><b>${x}</b> - refers to the n-th column in the CSV file, e.g. ${1}, ${2}, ...)</li></ul><p>Example of a correct JSON template:</p>\n     * <pre>\n     * [\n     * {\n     * \"resourceType\": \"Asset\",\n     * \"identifier\": {\n     * \"name\": \"${1}\",\n     * \"domain\": {\n     * \"name\": \"${2}\",\n     * \"community\": {\n     * \"name\": \"Some Community\"\n     * }\n     * }\n     * },\n     * \"attributes\" : {\n     * \"00000000-0000-0000-0000-000000003115\" : [ {\n     * \"value\" : \"${3}\"\n     * } ],\n     * \"00000000-0000-0000-0000-000000000222\" : [ {\n     * \"value\" : \"${4}\"\n     * } ]\n     * }\n     * }\n     * ]\n     * </pre>\n     */\n    template?: string;\n};\n\nexport type ModelWithOneOfAndProperties = (SimpleParameter | NonAsciiStringæøåÆøÅöôêÊ字符串) & {\n    baz: number | null;\n    qux: number;\n};\n\n/**\n * Model used to test deduplication strategy (unused)\n */\nexport type ParameterSimpleParameterUnused = string;\n\n/**\n * Model used to test deduplication strategy\n */\nexport type PostServiceWithEmptyTagResponse = string;\n\n/**\n * Model used to test deduplication strategy\n */\nexport type PostServiceWithEmptyTagResponse2 = string;\n\n/**\n * Model used to test deduplication strategy\n */\nexport type DeleteFooData = string;\n\n/**\n * Model used to test deduplication strategy\n */\nexport type DeleteFooData2 = string;\n\n/**\n * Model with restricted keyword name\n */\nexport type Import = string;\n\nexport type SchemaWithFormRestrictedKeys = {\n    description?: string;\n    'x-enum-descriptions'?: string;\n    'x-enum-varnames'?: string;\n    'x-enumNames'?: string;\n    title?: string;\n    object?: {\n        description?: string;\n        'x-enum-descriptions'?: string;\n        'x-enum-varnames'?: string;\n        'x-enumNames'?: string;\n        title?: string;\n    };\n    array?: Array<{\n        description?: string;\n        'x-enum-descriptions'?: string;\n        'x-enum-varnames'?: string;\n        'x-enumNames'?: string;\n        title?: string;\n    }>;\n};\n\n/**\n * This schema was giving PascalCase transformations a hard time\n */\nexport type IoK8sApimachineryPkgApisMetaV1DeleteOptions = {\n    /**\n     * Must be fulfilled before a deletion is carried out. If not possible, a 409 Conflict status will be returned.\n     */\n    preconditions?: IoK8sApimachineryPkgApisMetaV1Preconditions;\n};\n\n/**\n * This schema was giving PascalCase transformations a hard time\n */\nexport type IoK8sApimachineryPkgApisMetaV1Preconditions = {\n    /**\n     * Specifies the target ResourceVersion\n     */\n    resourceVersion?: string;\n    /**\n     * Specifies the target UID.\n     */\n    uid?: string;\n};\n\nexport type AdditionalPropertiesUnknownIssue = {\n    [key: string]: string | number;\n};\n\nexport type AdditionalPropertiesUnknownIssue2 = {\n    [key: string]: string | number;\n};\n\nexport type AdditionalPropertiesUnknownIssue3 = string & {\n    entries: {\n        [key: string]: AdditionalPropertiesUnknownIssue;\n    };\n};\n\nexport type AdditionalPropertiesIntegerIssue = {\n    value: number;\n    [key: string]: number;\n};\n\nexport type OneOfAllOfIssue = ((ConstValue | GenericSchemaDuplicateIssue1SystemBoolean) & _3eNum1Период) | GenericSchemaDuplicateIssue1SystemString;\n\nexport type GenericSchemaDuplicateIssue1SystemBoolean = {\n    item?: boolean;\n    error?: string | null;\n    readonly hasError?: boolean;\n    data?: {\n        [key: string]: never;\n    };\n};\n\nexport type GenericSchemaDuplicateIssue1SystemString = {\n    item?: string | null;\n    error?: string | null;\n    readonly hasError?: boolean;\n};\n\nexport type ExternalSharedModel = {\n    id: string;\n    name?: string;\n};\n\n/**\n * This is a model with one property containing a reference\n */\nexport type ModelWithReferenceWritable = {\n    prop?: ModelWithPropertiesWritable;\n};\n\n/**\n * This is a model with one property containing an array\n */\nexport type ModelWithArrayReadOnlyAndWriteOnlyWritable = {\n    prop?: Array<ModelWithReadOnlyAndWriteOnlyWritable>;\n    propWithFile?: Array<Blob | File>;\n    propWithNumber?: Array<number>;\n};\n\n/**\n * This is a model with one nested property\n */\nexport type ModelWithPropertiesWritable = {\n    required: string;\n    requiredAndNullable: string | null;\n    string?: string;\n    number?: number;\n    boolean?: boolean;\n    reference?: ModelWithString;\n    'property with space'?: string;\n    default?: string;\n    try?: string;\n};\n\n/**\n * This is a model that contains a some patterns\n */\nexport type ModelWithPatternWritable = {\n    key: string;\n    name: string;\n    id?: string;\n    text?: string;\n    patternWithSingleQuotes?: string;\n    patternWithNewline?: string;\n    patternWithBacktick?: string;\n    patternWithUnicode?: string;\n};\n\nexport type FileWritable = {\n    /**\n     * Mime\n     */\n    mime: string;\n};\n\nexport type ModelWithReadOnlyAndWriteOnlyWritable = {\n    foo: string;\n    baz: string;\n};\n\nexport type ModelWithAnyOfConstantSizeArrayWithNSizeAndOptionsWritable = [\n    number | Import,\n    number | Import\n];\n\nexport type AdditionalPropertiesUnknownIssueWritable = {\n    [key: string]: string | number;\n};\n\nexport type OneOfAllOfIssueWritable = ((ConstValue | GenericSchemaDuplicateIssue1SystemBoolean) & _3eNum1Период) | GenericSchemaDuplicateIssue1SystemString;\n\nexport type GenericSchemaDuplicateIssue1SystemBooleanWritable = {\n    item?: boolean;\n    error?: string | null;\n    data?: {\n        [key: string]: never;\n    };\n};\n\nexport type GenericSchemaDuplicateIssue1SystemStringWritable = {\n    item?: string | null;\n    error?: string | null;\n};\n\n/**\n * This is a reusable parameter\n */\nexport type SimpleParameter = string;\n\n/**\n * Parameter with illegal characters\n */\nexport type XFooBar = ModelWithString;\n\n/**\n * A reusable request body\n */\nexport type SimpleRequestBody = ModelWithString;\n\n/**\n * A reusable request body\n */\nexport type SimpleFormData = ModelWithString;\n\nexport type ExportData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no+tag';\n};\n\nexport type PatchApiVbyApiVersionNoTagData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no+tag';\n};\n\nexport type PatchApiVbyApiVersionNoTagResponses = {\n    /**\n     * OK\n     */\n    default: unknown;\n};\n\nexport type ImportData = {\n    body: ModelWithReadOnlyAndWriteOnlyWritable | ModelWithArrayReadOnlyAndWriteOnlyWritable;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no+tag';\n};\n\nexport type ImportResponses = {\n    /**\n     * Success\n     */\n    200: ModelFromZendesk;\n    /**\n     * Default success response\n     */\n    default: ModelWithReadOnlyAndWriteOnly;\n};\n\nexport type ImportResponse = ImportResponses[keyof ImportResponses];\n\nexport type FooWowData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no+tag';\n};\n\nexport type FooWowResponses = {\n    /**\n     * OK\n     */\n    default: unknown;\n};\n\nexport type ApiVVersionODataControllerCountData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple/$count';\n};\n\nexport type ApiVVersionODataControllerCountResponses = {\n    /**\n     * Success\n     */\n    200: ModelFromZendesk;\n};\n\nexport type ApiVVersionODataControllerCountResponse = ApiVVersionODataControllerCountResponses[keyof ApiVVersionODataControllerCountResponses];\n\nexport type GetApiVbyApiVersionSimpleOperationData = {\n    body?: never;\n    path: {\n        /**\n         * foo in method\n         */\n        foo_param: string;\n    };\n    query?: never;\n    url: '/api/v{api-version}/simple:operation';\n};\n\nexport type GetApiVbyApiVersionSimpleOperationErrors = {\n    /**\n     * Default error response\n     */\n    default: ModelWithBoolean;\n};\n\nexport type GetApiVbyApiVersionSimpleOperationError = GetApiVbyApiVersionSimpleOperationErrors[keyof GetApiVbyApiVersionSimpleOperationErrors];\n\nexport type GetApiVbyApiVersionSimpleOperationResponses = {\n    /**\n     * Response is a simple number\n     */\n    200: number;\n};\n\nexport type GetApiVbyApiVersionSimpleOperationResponse = GetApiVbyApiVersionSimpleOperationResponses[keyof GetApiVbyApiVersionSimpleOperationResponses];\n\nexport type DeleteCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type GetCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type HeadCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type OptionsCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type PatchCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type PostCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type PutCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type DeleteFooData3 = {\n    body?: never;\n    headers: {\n        /**\n         * Parameter with illegal characters\n         */\n        'x-Foo-Bar': ModelWithString;\n    };\n    path: {\n        /**\n         * foo in method\n         */\n        foo_param: string;\n        /**\n         * bar in method\n         */\n        BarParam: string;\n    };\n    query?: never;\n    url: '/api/v{api-version}/foo/{foo_param}/bar/{BarParam}';\n};\n\nexport type CallWithDescriptionsData = {\n    body?: never;\n    path?: never;\n    query?: {\n        /**\n         * Testing multiline comments in string: First line\n         * Second line\n         *\n         * Fourth line\n         */\n        parameterWithBreaks?: string;\n        /**\n         * Testing backticks in string: `backticks` and ```multiple backticks``` should work\n         */\n        parameterWithBackticks?: string;\n        /**\n         * Testing slashes in string: \\backwards\\\\\\ and /forwards/// should work\n         */\n        parameterWithSlashes?: string;\n        /**\n         * Testing expression placeholders in string: ${expression} should work\n         */\n        parameterWithExpressionPlaceholders?: string;\n        /**\n         * Testing quotes in string: 'single quote''' and \"double quotes\"\"\" should work\n         */\n        parameterWithQuotes?: string;\n        /**\n         * Testing reserved characters in string: * inline * and ** inline ** should work\n         */\n        parameterWithReservedCharacters?: string;\n    };\n    url: '/api/v{api-version}/descriptions';\n};\n\nexport type DeprecatedCallData = {\n    body?: never;\n    headers: {\n        /**\n         * This parameter is deprecated\n         *\n         * @deprecated\n         */\n        parameter: DeprecatedModel | null;\n    };\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/parameters/deprecated';\n};\n\nexport type CallWithParametersData = {\n    /**\n     * This is the parameter that goes into the body\n     */\n    body: {\n        [key: string]: unknown;\n    } | null;\n    headers: {\n        /**\n         * This is the parameter that goes into the header\n         */\n        parameterHeader: string | null;\n    };\n    path: {\n        /**\n         * This is the parameter that goes into the path\n         */\n        parameterPath: string | null;\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string | null;\n    };\n    query: {\n        foo_ref_enum?: ModelWithNestedArrayEnumsDataFoo;\n        foo_all_of_enum: ModelWithNestedArrayEnumsDataFoo;\n        /**\n         * This is the parameter that goes into the query params\n         */\n        cursor: string | null;\n    };\n    url: '/api/v{api-version}/parameters/{parameterPath}';\n};\n\nexport type CallWithWeirdParameterNamesData = {\n    /**\n     * This is the parameter that goes into the body\n     */\n    body: ModelWithString | null;\n    headers: {\n        /**\n         * This is the parameter that goes into the request header\n         */\n        'parameter.header': string | null;\n    };\n    path: {\n        /**\n         * This is the parameter that goes into the path\n         */\n        'parameter.path.1'?: string;\n        /**\n         * This is the parameter that goes into the path\n         */\n        'parameter-path-2'?: string;\n        /**\n         * This is the parameter that goes into the path\n         */\n        'PARAMETER-PATH-3'?: string;\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string | null;\n    };\n    query: {\n        /**\n         * This is the parameter with a reserved keyword\n         */\n        default?: string;\n        /**\n         * This is the parameter that goes into the request query params\n         */\n        'parameter-query': string | null;\n    };\n    url: '/api/v{api-version}/parameters/{parameter.path.1}/{parameter-path-2}/{PARAMETER-PATH-3}';\n};\n\nexport type GetCallWithOptionalParamData = {\n    /**\n     * This is a required parameter\n     */\n    body: ModelWithOneOfEnum;\n    path?: never;\n    query?: {\n        /**\n         * This is an optional parameter\n         */\n        page?: number;\n    };\n    url: '/api/v{api-version}/parameters';\n};\n\nexport type PostCallWithOptionalParamData = {\n    /**\n     * This is an optional parameter\n     */\n    body?: {\n        offset?: number | null;\n    };\n    path?: never;\n    query: {\n        /**\n         * This is a required parameter\n         */\n        parameter: Pageable;\n    };\n    url: '/api/v{api-version}/parameters';\n};\n\nexport type PostCallWithOptionalParamResponses = {\n    /**\n     * Response is a simple number\n     */\n    200: number;\n    /**\n     * Success\n     */\n    204: void;\n};\n\nexport type PostCallWithOptionalParamResponse = PostCallWithOptionalParamResponses[keyof PostCallWithOptionalParamResponses];\n\nexport type PostApiVbyApiVersionRequestBodyData = {\n    /**\n     * A reusable request body\n     */\n    body?: SimpleRequestBody;\n    path?: never;\n    query?: {\n        /**\n         * This is a reusable parameter\n         */\n        parameter?: string;\n    };\n    url: '/api/v{api-version}/requestBody';\n};\n\nexport type PostApiVbyApiVersionFormDataData = {\n    /**\n     * A reusable request body\n     */\n    body?: SimpleFormData;\n    path?: never;\n    query?: {\n        /**\n         * This is a reusable parameter\n         */\n        parameter?: string;\n    };\n    url: '/api/v{api-version}/formData';\n};\n\nexport type CallWithDefaultParametersData = {\n    body?: never;\n    path?: never;\n    query?: {\n        /**\n         * This is a simple string with default value\n         */\n        parameterString?: string | null;\n        /**\n         * This is a simple number with default value\n         */\n        parameterNumber?: number | null;\n        /**\n         * This is a simple boolean with default value\n         */\n        parameterBoolean?: boolean | null;\n        /**\n         * This is a simple enum with default value\n         */\n        parameterEnum?: 'Success' | 'Warning' | 'Error';\n        /**\n         * This is a simple model with default value\n         */\n        parameterModel?: ModelWithString | null;\n    };\n    url: '/api/v{api-version}/defaults';\n};\n\nexport type CallWithDefaultOptionalParametersData = {\n    body?: never;\n    path?: never;\n    query?: {\n        /**\n         * This is a simple string that is optional with default value\n         */\n        parameterString?: string;\n        /**\n         * This is a simple number that is optional with default value\n         */\n        parameterNumber?: number;\n        /**\n         * This is a simple boolean that is optional with default value\n         */\n        parameterBoolean?: boolean;\n        /**\n         * This is a simple enum that is optional with default value\n         */\n        parameterEnum?: 'Success' | 'Warning' | 'Error';\n        /**\n         * This is a simple model that is optional with default value\n         */\n        parameterModel?: ModelWithString;\n    };\n    url: '/api/v{api-version}/defaults';\n};\n\nexport type CallToTestOrderOfParamsData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * This is a optional string with default\n         */\n        parameterOptionalStringWithDefault?: string;\n        /**\n         * This is a optional string with empty default\n         */\n        parameterOptionalStringWithEmptyDefault?: string;\n        /**\n         * This is a optional string with no default\n         */\n        parameterOptionalStringWithNoDefault?: string;\n        /**\n         * This is a string with default\n         */\n        parameterStringWithDefault: string;\n        /**\n         * This is a string with empty default\n         */\n        parameterStringWithEmptyDefault: string;\n        /**\n         * This is a string with no default\n         */\n        parameterStringWithNoDefault: string;\n        /**\n         * This is a string that can be null with no default\n         */\n        parameterStringNullableWithNoDefault?: string | null;\n        /**\n         * This is a string that can be null with default\n         */\n        parameterStringNullableWithDefault?: string | null;\n    };\n    url: '/api/v{api-version}/defaults';\n};\n\nexport type DuplicateNameData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/duplicate';\n};\n\nexport type DuplicateName2Data = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/duplicate';\n};\n\nexport type DuplicateName3Data = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/duplicate';\n};\n\nexport type DuplicateName4Data = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/duplicate';\n};\n\nexport type CallWithNoContentResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no-content';\n};\n\nexport type CallWithNoContentResponseResponses = {\n    /**\n     * Success\n     */\n    204: void;\n};\n\nexport type CallWithNoContentResponseResponse = CallWithNoContentResponseResponses[keyof CallWithNoContentResponseResponses];\n\nexport type CallWithResponseAndNoContentResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multiple-tags/response-and-no-content';\n};\n\nexport type CallWithResponseAndNoContentResponseResponses = {\n    /**\n     * Response is a simple number\n     */\n    200: number;\n    /**\n     * Success\n     */\n    204: void;\n};\n\nexport type CallWithResponseAndNoContentResponseResponse = CallWithResponseAndNoContentResponseResponses[keyof CallWithResponseAndNoContentResponseResponses];\n\nexport type DummyAData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multiple-tags/a';\n};\n\nexport type DummyAResponses = {\n    200: _400;\n};\n\nexport type DummyAResponse = DummyAResponses[keyof DummyAResponses];\n\nexport type DummyBData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multiple-tags/b';\n};\n\nexport type DummyBResponses = {\n    /**\n     * Success\n     */\n    204: void;\n};\n\nexport type DummyBResponse = DummyBResponses[keyof DummyBResponses];\n\nexport type CallWithResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/response';\n};\n\nexport type CallWithResponseResponses = {\n    default: Import;\n};\n\nexport type CallWithResponseResponse = CallWithResponseResponses[keyof CallWithResponseResponses];\n\nexport type CallWithDuplicateResponsesData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/response';\n};\n\nexport type CallWithDuplicateResponsesErrors = {\n    /**\n     * Message for 500 error\n     */\n    500: ModelWithStringError;\n    /**\n     * Message for 501 error\n     */\n    501: ModelWithStringError;\n    /**\n     * Message for 502 error\n     */\n    502: ModelWithStringError;\n    /**\n     * Message for 4XX errors\n     */\n    '4XX': DictionaryWithArray;\n    /**\n     * Default error response\n     */\n    default: ModelWithBoolean;\n};\n\nexport type CallWithDuplicateResponsesError = CallWithDuplicateResponsesErrors[keyof CallWithDuplicateResponsesErrors];\n\nexport type CallWithDuplicateResponsesResponses = {\n    /**\n     * Message for 200 response\n     */\n    200: ModelWithBoolean & ModelWithInteger;\n    /**\n     * Message for 201 response\n     */\n    201: ModelWithString;\n    /**\n     * Message for 202 response\n     */\n    202: ModelWithString;\n};\n\nexport type CallWithDuplicateResponsesResponse = CallWithDuplicateResponsesResponses[keyof CallWithDuplicateResponsesResponses];\n\nexport type CallWithResponsesData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/response';\n};\n\nexport type CallWithResponsesErrors = {\n    /**\n     * Message for 500 error\n     */\n    500: ModelWithStringError;\n    /**\n     * Message for 501 error\n     */\n    501: ModelWithStringError;\n    /**\n     * Message for 502 error\n     */\n    502: ModelWithStringError;\n    /**\n     * Message for default response\n     */\n    default: ModelWithStringError;\n};\n\nexport type CallWithResponsesError = CallWithResponsesErrors[keyof CallWithResponsesErrors];\n\nexport type CallWithResponsesResponses = {\n    /**\n     * Message for 200 response\n     */\n    200: {\n        readonly '@namespace.string'?: string;\n        readonly '@namespace.integer'?: number;\n        readonly value?: Array<ModelWithString>;\n    };\n    /**\n     * Message for 201 response\n     */\n    201: ModelThatExtends;\n    /**\n     * Message for 202 response\n     */\n    202: ModelThatExtendsExtends;\n};\n\nexport type CallWithResponsesResponse = CallWithResponsesResponses[keyof CallWithResponsesResponses];\n\nexport type CollectionFormatData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * This is an array parameter that is sent as csv format (comma-separated values)\n         */\n        parameterArrayCSV: Array<string> | null;\n        /**\n         * This is an array parameter that is sent as ssv format (space-separated values)\n         */\n        parameterArraySSV: Array<string> | null;\n        /**\n         * This is an array parameter that is sent as tsv format (tab-separated values)\n         */\n        parameterArrayTSV: Array<string> | null;\n        /**\n         * This is an array parameter that is sent as pipes format (pipe-separated values)\n         */\n        parameterArrayPipes: Array<string> | null;\n        /**\n         * This is an array parameter that is sent as multi format (multiple parameter instances)\n         */\n        parameterArrayMulti: Array<string> | null;\n    };\n    url: '/api/v{api-version}/collectionFormat';\n};\n\nexport type TypesData = {\n    body?: never;\n    path?: {\n        /**\n         * This is a number parameter\n         */\n        id?: number;\n    };\n    query: {\n        /**\n         * This is a number parameter\n         */\n        parameterNumber: number;\n        /**\n         * This is a string parameter\n         */\n        parameterString: string | null;\n        /**\n         * This is a boolean parameter\n         */\n        parameterBoolean: boolean | null;\n        /**\n         * This is an object parameter\n         */\n        parameterObject: {\n            [key: string]: unknown;\n        } | null;\n        /**\n         * This is an array parameter\n         */\n        parameterArray: Array<string> | null;\n        /**\n         * This is a dictionary parameter\n         */\n        parameterDictionary: {\n            [key: string]: unknown;\n        } | null;\n        /**\n         * This is an enum parameter\n         */\n        parameterEnum: 'Success' | 'Warning' | 'Error' | null;\n    };\n    url: '/api/v{api-version}/types';\n};\n\nexport type TypesResponses = {\n    /**\n     * Response is a simple number\n     */\n    200: number;\n    /**\n     * Response is a simple string\n     */\n    201: string;\n    /**\n     * Response is a simple boolean\n     */\n    202: boolean;\n    /**\n     * Response is a simple object\n     */\n    203: {\n        [key: string]: unknown;\n    };\n};\n\nexport type TypesResponse = TypesResponses[keyof TypesResponses];\n\nexport type UploadFileData = {\n    body: Blob | File;\n    path: {\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string | null;\n    };\n    query?: never;\n    url: '/api/v{api-version}/upload';\n};\n\nexport type UploadFileResponses = {\n    200: boolean;\n};\n\nexport type UploadFileResponse = UploadFileResponses[keyof UploadFileResponses];\n\nexport type FileResponseData = {\n    body?: never;\n    path: {\n        id: string;\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string;\n    };\n    query?: never;\n    url: '/api/v{api-version}/file/{id}';\n};\n\nexport type FileResponseResponses = {\n    /**\n     * Success\n     */\n    200: Blob | File;\n};\n\nexport type FileResponseResponse = FileResponseResponses[keyof FileResponseResponses];\n\nexport type ComplexTypesData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * Parameter containing object\n         */\n        parameterObject: {\n            first?: {\n                second?: {\n                    third?: string;\n                };\n            };\n        };\n        /**\n         * Parameter containing reference\n         */\n        parameterReference: ModelWithString;\n    };\n    url: '/api/v{api-version}/complex';\n};\n\nexport type ComplexTypesErrors = {\n    /**\n     * 400 `server` error\n     */\n    400: unknown;\n    /**\n     * 500 server error\n     */\n    500: unknown;\n};\n\nexport type ComplexTypesResponses = {\n    /**\n     * Successful response\n     */\n    200: Array<ModelWithString>;\n};\n\nexport type ComplexTypesResponse = ComplexTypesResponses[keyof ComplexTypesResponses];\n\nexport type MultipartResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multipart';\n};\n\nexport type MultipartResponseResponses = {\n    /**\n     * OK\n     */\n    200: {\n        file?: Blob | File;\n        metadata?: {\n            foo?: string;\n            bar?: string;\n        };\n    };\n};\n\nexport type MultipartResponseResponse = MultipartResponseResponses[keyof MultipartResponseResponses];\n\nexport type MultipartRequestData = {\n    body?: {\n        content?: Blob | File;\n        data?: ModelWithString | null;\n    };\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multipart';\n};\n\nexport type ComplexParamsData = {\n    body?: {\n        readonly key: string | null;\n        name: string | null;\n        enabled?: boolean;\n        type: 'Monkey' | 'Horse' | 'Bird';\n        listOfModels?: Array<ModelWithString> | null;\n        listOfStrings?: Array<string> | null;\n        parameters: ModelWithString | ModelWithEnum | ModelWithArray | ModelWithDictionary;\n        readonly user?: {\n            readonly id?: number;\n            readonly name?: string | null;\n        };\n    };\n    path: {\n        id: number;\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string;\n    };\n    query?: never;\n    url: '/api/v{api-version}/complex/{id}';\n};\n\nexport type ComplexParamsResponses = {\n    /**\n     * Success\n     */\n    200: ModelWithString;\n};\n\nexport type ComplexParamsResponse = ComplexParamsResponses[keyof ComplexParamsResponses];\n\nexport type CallWithResultFromHeaderData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/header';\n};\n\nexport type CallWithResultFromHeaderErrors = {\n    /**\n     * 400 server error\n     */\n    400: unknown;\n    /**\n     * 500 server error\n     */\n    500: unknown;\n};\n\nexport type CallWithResultFromHeaderResponses = {\n    /**\n     * Successful response\n     */\n    200: unknown;\n};\n\nexport type TestErrorCodeData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * Status code to return\n         */\n        status: number;\n    };\n    url: '/api/v{api-version}/error';\n};\n\nexport type TestErrorCodeErrors = {\n    /**\n     * Custom message: Internal Server Error\n     */\n    500: unknown;\n    /**\n     * Custom message: Not Implemented\n     */\n    501: unknown;\n    /**\n     * Custom message: Bad Gateway\n     */\n    502: unknown;\n    /**\n     * Custom message: Service Unavailable\n     */\n    503: unknown;\n};\n\nexport type TestErrorCodeResponses = {\n    /**\n     * Custom message: Successful response\n     */\n    200: unknown;\n};\n\nexport type NonAsciiæøåÆøÅöôêÊ字符串Data = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * Dummy input param\n         */\n        nonAsciiParamæøåÆØÅöôêÊ: number;\n    };\n    url: '/api/v{api-version}/non-ascii-æøåÆØÅöôêÊ字符串';\n};\n\nexport type NonAsciiæøåÆøÅöôêÊ字符串Responses = {\n    /**\n     * Successful response\n     */\n    200: Array<NonAsciiStringæøåÆøÅöôêÊ字符串>;\n};\n\nexport type NonAsciiæøåÆøÅöôêÊ字符串Response = NonAsciiæøåÆøÅöôêÊ字符串Responses[keyof NonAsciiæøåÆøÅöôêÊ字符串Responses];\n\nexport type PutWithFormUrlEncodedData = {\n    body: ArrayWithStrings;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/non-ascii-æøåÆØÅöôêÊ字符串';\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-nuxt/base-url-string/client/client.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport { useAsyncData, useFetch, useLazyAsyncData, useLazyFetch } from 'nuxt/app';\nimport { reactive, ref, toValue, watch } from 'vue';\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 } from './types.gen';\nimport {\n  buildUrl,\n  createConfig,\n  executeFetchFn,\n  mergeConfigs,\n  mergeHeaders,\n  mergeInterceptors,\n  serializeBody,\n  setAuthParams,\n  unwrapRefs,\n} from './utils.gen';\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 beforeRequest = async (options: RequestOptions) => {\n    const opts = {\n      ..._config,\n      ...options,\n      $fetch: options.$fetch ?? _config.$fetch ?? $fetch,\n      headers: mergeHeaders(_config.headers, options.headers),\n      onRequest: mergeInterceptors(_config.onRequest, options.onRequest),\n      onResponse: mergeInterceptors(_config.onResponse, options.onResponse),\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    const url = buildUrl(opts);\n\n    return { opts, url };\n  };\n\n  const request: Client['request'] = ({ asyncDataOptions, composable = '$fetch', ...options }) => {\n    const key = options.key;\n    const opts = {\n      ..._config,\n      ...options,\n      $fetch: options.$fetch ?? _config.$fetch ?? $fetch,\n      headers: mergeHeaders(_config.headers, options.headers),\n      onRequest: mergeInterceptors(_config.onRequest, options.onRequest),\n      onResponse: mergeInterceptors(_config.onResponse, options.onResponse),\n    };\n\n    const { requestValidator, responseTransformer, responseValidator, security } = opts;\n    if (requestValidator || security) {\n      // auth must happen in interceptors otherwise we'd need to require\n      // asyncContext enabled\n      // https://nuxt.com/docs/guide/going-further/experimental-features#asynccontext\n      opts.onRequest = [\n        async ({ options }) => {\n          if (security) {\n            await setAuthParams({\n              auth: opts.auth,\n              headers: options.headers,\n              query: options.query,\n              security,\n            });\n          }\n\n          if (requestValidator) {\n            await requestValidator({\n              ...options,\n              // @ts-expect-error\n              body: options.rawBody,\n            });\n          }\n        },\n        ...opts.onRequest,\n      ];\n    }\n\n    if (responseTransformer || responseValidator) {\n      opts.onResponse = [\n        ...opts.onResponse,\n        async ({ options, response }) => {\n          if (options.responseType && options.responseType !== 'json') {\n            return;\n          }\n\n          if (!response.ok) {\n            return;\n          }\n\n          if (responseValidator) {\n            await responseValidator(response._data);\n          }\n\n          if (responseTransformer) {\n            response._data = await responseTransformer(response._data);\n          }\n        },\n      ];\n    }\n\n    // remove Content-Type header if body is empty to avoid sending invalid requests\n    if (opts.body === undefined || opts.body === '') {\n      opts.headers.delete('Content-Type');\n    }\n\n    const fetchFn = opts.$fetch;\n\n    if (composable === '$fetch') {\n      return executeFetchFn(\n        // @ts-expect-error\n        opts,\n        fetchFn,\n      );\n    }\n\n    if (composable === 'useFetch' || composable === 'useLazyFetch') {\n      opts.rawBody = opts.body;\n      const bodyParams = reactive({\n        body: opts.body,\n        bodySerializer: opts.bodySerializer,\n      });\n      const body = ref(serializeBody({ ...opts, body: toValue(opts.body) }));\n      opts.body = body;\n      watch(bodyParams, (changed) => {\n        body.value = serializeBody(changed);\n      });\n      return composable === 'useLazyFetch'\n        ? useLazyFetch(() => buildUrl(opts), { ...opts, ...asyncDataOptions })\n        : useFetch(() => buildUrl(opts), { ...opts, ...asyncDataOptions });\n    }\n\n    const handler: any = () =>\n      executeFetchFn(\n        // @ts-expect-error\n        opts,\n        fetchFn,\n      );\n\n    if (composable === 'useAsyncData') {\n      return key\n        ? useAsyncData(key, handler, asyncDataOptions)\n        : useAsyncData(handler, asyncDataOptions);\n    }\n\n    if (composable === 'useLazyAsyncData') {\n      return key\n        ? useLazyAsyncData(key, handler, asyncDataOptions)\n        : useLazyAsyncData(handler, asyncDataOptions);\n    }\n\n    return undefined as any;\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      ...unwrapRefs(opts),\n      body: opts.body as BodyInit | null | undefined,\n      method,\n      onRequest: undefined,\n      serializedBody: getValidRequestBody(opts) as BodyInit | null | undefined,\n      signal: unwrapRefs(opts.signal) as AbortSignal,\n      url,\n    });\n  };\n\n  const _buildUrl: Client['buildUrl'] = (options) =>\n    buildUrl({ ..._config, ...options } as typeof 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    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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-nuxt/base-url-string/client/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type { Auth } from '../core/auth.gen';\nexport type { QuerySerializerOptions } from '../core/bodySerializer.gen';\nexport {\n  formDataBodySerializer,\n  jsonBodySerializer,\n  urlSearchParamsBodySerializer,\n} from '../core/bodySerializer.gen';\nexport { buildClientParams } from '../core/params.gen';\nexport { serializeQueryKeyValue } from '../core/queryKeySerializer.gen';\nexport { createClient } from './client.gen';\nexport type {\n  Client,\n  ClientOptions,\n  Composable,\n  Config,\n  CreateClientConfig,\n  Options,\n  RequestOptions,\n  RequestResult,\n  TDataShape,\n} from './types.gen';\nexport { createConfig } from './utils.gen';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-nuxt/base-url-string/client/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type {\n  AsyncDataOptions,\n  useAsyncData,\n  useFetch,\n  UseFetchOptions,\n  useLazyAsyncData,\n  useLazyFetch,\n} from 'nuxt/app';\nimport type { Ref } from 'vue';\n\nimport type { Auth } from '../core/auth.gen';\nimport type { QuerySerializerOptions } from '../core/bodySerializer.gen';\nimport type {\n  ServerSentEventsOptions,\n  ServerSentEventsResult,\n} from '../core/serverSentEvents.gen';\nimport type { Client as CoreClient, Config as CoreConfig } from '../core/types.gen';\n\nexport type ArraySeparatorStyle = ArrayStyle | MatrixStyle;\ntype ArrayStyle = 'form' | 'spaceDelimited' | 'pipeDelimited';\ntype MatrixStyle = 'label' | 'matrix' | 'simple';\nexport type ObjectSeparatorStyle = ObjectStyle | MatrixStyle;\ntype ObjectStyle = 'form' | 'deepObject';\n\nexport type QuerySerializer = (query: Parameters<Client['buildUrl']>[0]['query']) => string;\n\ntype WithRefs<TData> = {\n  [K in keyof TData]: NonNullable<TData[K]> extends object\n    ? WithRefs<NonNullable<TData[K]>> | Ref<NonNullable<TData[K]>> | Extract<TData[K], null>\n    : NonNullable<TData[K]> | Ref<NonNullable<TData[K]>> | Extract<TData[K], null>;\n};\n\n// copied from Nuxt\nexport type KeysOf<T> = Array<T extends T ? (keyof T extends string ? keyof T : never) : never>;\n\nexport interface Config<T extends ClientOptions = ClientOptions>\n  extends\n    Omit<FetchOptions<unknown>, 'baseURL' | 'body' | 'headers' | 'method' | 'query'>,\n    WithRefs<Pick<FetchOptions<unknown>, 'query'>>,\n    Omit<CoreConfig, 'querySerializer'> {\n  /**\n   * Base URL for all requests made by this client.\n   */\n  baseURL?: T['baseURL'];\n  /**\n   * A function for serializing request query parameters. By default, arrays\n   * will be exploded in form style, objects will be exploded in deepObject\n   * style, and reserved characters are percent-encoded.\n   *\n   * {@link https://swagger.io/docs/specification/serialization/#query View examples}\n   */\n  querySerializer?: QuerySerializer | QuerySerializerOptions;\n}\n\nexport interface RequestOptions<\n  TComposable extends Composable = '$fetch',\n  ResT = unknown,\n  DefaultT = undefined,\n  Url extends string = string,\n>\n  extends\n    Config,\n    WithRefs<{\n      path?: FetchOptions<unknown>['query'];\n      query?: FetchOptions<unknown>['query'];\n    }>,\n    Pick<\n      ServerSentEventsOptions<ResT>,\n      | 'onSseError'\n      | 'onSseEvent'\n      | 'sseDefaultRetryDelay'\n      | 'sseMaxRetryAttempts'\n      | 'sseMaxRetryDelay'\n    > {\n  asyncDataOptions?: AsyncDataOptions<ResT, ResT, KeysOf<ResT>, DefaultT>;\n  /**\n   * Any body that you want to add to your request.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/fetch#body}\n   */\n  body?: NonNullable<unknown> | Ref<NonNullable<unknown>> | null;\n  composable?: TComposable;\n  key?: string;\n  rawBody?: NonNullable<unknown> | Ref<NonNullable<unknown>> | null;\n  /**\n   * Security mechanism(s) to use for the request.\n   */\n  security?: ReadonlyArray<Auth>;\n  url: Url;\n}\n\nexport type RequestResult<\n  TComposable extends Composable,\n  ResT,\n  TError,\n> = TComposable extends '$fetch'\n  ? ReturnType<typeof $fetch<ResT>>\n  : TComposable extends 'useAsyncData'\n    ? ReturnType<typeof useAsyncData<ResT | null, TError>>\n    : TComposable extends 'useFetch'\n      ? ReturnType<typeof useFetch<ResT | null, TError>>\n      : TComposable extends 'useLazyAsyncData'\n        ? ReturnType<typeof useLazyAsyncData<ResT | null, TError>>\n        : TComposable extends 'useLazyFetch'\n          ? ReturnType<typeof useLazyFetch<ResT | null, TError>>\n          : never;\n\nexport interface ClientOptions {\n  baseURL?: string;\n}\n\ntype MethodFn = <\n  TComposable extends Composable = '$fetch',\n  ResT = unknown,\n  TError = unknown,\n  DefaultT = undefined,\n>(\n  options: Omit<RequestOptions<TComposable, ResT, DefaultT>, 'method'>,\n) => RequestResult<TComposable, ResT, TError>;\n\ntype SseFn = <\n  TComposable extends Composable = '$fetch',\n  ResT = unknown,\n  TError = unknown,\n  DefaultT = undefined,\n>(\n  options: Omit<RequestOptions<TComposable, ResT, DefaultT>, 'method'>,\n) => Promise<ServerSentEventsResult<RequestResult<TComposable, ResT, TError>>>;\n\ntype RequestFn = <\n  TComposable extends Composable = '$fetch',\n  ResT = unknown,\n  TError = unknown,\n  DefaultT = undefined,\n>(\n  options: Omit<RequestOptions<TComposable, ResT, DefaultT>, 'method'> &\n    Pick<Required<RequestOptions<TComposable, ResT, DefaultT>>, 'method'>,\n) => RequestResult<TComposable, ResT, TError>;\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 = ClientOptions> = (\n  override?: Config<ClientOptions & T>,\n) => Config<Required<ClientOptions> & T>;\n\nexport interface TDataShape {\n  body?: unknown;\n  headers?: unknown;\n  path?: FetchOptions<unknown>['query'];\n  query?: FetchOptions<unknown>['query'];\n  url: string;\n}\n\nexport type BuildUrlOptions<\n  TData extends Omit<TDataShape, 'headers'> = Omit<TDataShape, 'headers'>,\n> = Pick<WithRefs<TData>, 'path' | 'query'> &\n  Pick<TData, 'url'> &\n  Pick<Options<'$fetch', TData>, 'baseURL' | 'querySerializer'>;\n\ntype BuildUrlFn = <TData extends Omit<TDataShape, 'headers'>>(\n  options: BuildUrlOptions<TData>,\n) => string;\n\nexport type Client = CoreClient<RequestFn, Config, MethodFn, BuildUrlFn, SseFn>;\n\ntype OmitKeys<T, K> = Pick<T, Exclude<keyof T, K>>;\n\nexport type Options<\n  TComposable extends Composable = '$fetch',\n  TData extends TDataShape = TDataShape,\n  ResT = unknown,\n  DefaultT = undefined,\n> = OmitKeys<RequestOptions<TComposable, ResT, DefaultT>, 'body' | 'path' | 'query' | 'url'> &\n  ([TData] extends [never] ? unknown : WithRefs<Omit<TData, 'url'>>);\n\ntype FetchOptions<TData> = Omit<UseFetchOptions<TData, TData>, keyof AsyncDataOptions<TData>>;\n\nexport type Composable =\n  | '$fetch'\n  | 'useAsyncData'\n  | 'useFetch'\n  | 'useLazyAsyncData'\n  | 'useLazyFetch';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-nuxt/base-url-string/client/utils.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { ComputedRef, Ref } from 'vue';\nimport { isRef, toValue, unref } from 'vue';\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 type {\n  ArraySeparatorStyle,\n  BuildUrlOptions,\n  Client,\n  ClientOptions,\n  Config,\n  QuerySerializer,\n  RequestOptions,\n} from './types.gen';\n\ntype PathSerializer = Pick<Required<BuildUrlOptions>, 'path' | 'url'>;\n\nconst PATH_PARAM_RE = /\\{[^{}]+\\}/g;\n\ntype MaybeArray<T> = T | T[];\n\nconst 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 = toValue((toValue(path) as Record<string, unknown> | undefined)?.[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 createQuerySerializer = <T = unknown>({\n  parameters = {},\n  ...args\n}: QuerySerializerOptions = {}) => {\n  const querySerializer = (queryParams: T) => {\n    const search: string[] = [];\n    const qParams = toValue(queryParams);\n    if (qParams && typeof qParams === 'object') {\n      for (const name in qParams) {\n        const value = toValue(qParams[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\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    (toValue(options.query) as Record<string, unknown> | undefined)?.[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    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        const queryValue = toValue(options.query) as Record<string, unknown> | undefined;\n        if (queryValue) {\n          queryValue[name] = token;\n        }\n        break;\n      }\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  const url = 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  return url;\n};\n\nexport const getUrl = ({\n  baseUrl,\n  path,\n  query,\n  querySerializer,\n  url: _url,\n}: Pick<BuildUrlOptions, 'path' | 'query' | 'url'> & {\n  baseUrl?: string;\n  querySerializer: QuerySerializer;\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 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 || typeof header !== 'object') {\n      continue;\n    }\n\n    let h: unknown = header;\n    if (isRef(h)) {\n      h = unref(h);\n    }\n\n    const iterator =\n      h instanceof Headers ? headersEntries(h) : Object.entries(h as Record<string, unknown>);\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, unwrapRefs(v) as string);\n        }\n      } else if (value !== undefined) {\n        const v = unwrapRefs(value);\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(key, typeof v === 'object' ? JSON.stringify(v) : (v as string));\n      }\n    }\n  }\n  return mergedHeaders;\n};\n\nexport const mergeInterceptors = <T>(...args: Array<MaybeArray<T>>): Array<T> =>\n  args.reduce<Array<T>>((acc, item) => {\n    if (typeof item === 'function') {\n      acc.push(item);\n    } else if (Array.isArray(item)) {\n      return acc.concat(item);\n    }\n    return acc;\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  querySerializer: defaultQuerySerializer,\n  ...override,\n});\n\ntype UnwrapRefs<T> =\n  T extends Ref<infer V>\n    ? V\n    : T extends ComputedRef<infer V>\n      ? V\n      : T extends Record<string, unknown> // this doesn't handle functions well\n        ? { [K in keyof T]: UnwrapRefs<T[K]> }\n        : T;\n\nexport const unwrapRefs = <T>(value: T): UnwrapRefs<T> => {\n  if (value === null || typeof value !== 'object' || value instanceof Headers) {\n    return (isRef(value) ? unref(value) : value) as UnwrapRefs<T>;\n  }\n\n  if (\n    value instanceof Blob ||\n    value instanceof FormData ||\n    value instanceof ReadableStream ||\n    value instanceof AbortSignal\n  ) {\n    return value as UnwrapRefs<T>;\n  }\n\n  if (Array.isArray(value)) {\n    return value.map((item) => unwrapRefs(item)) as UnwrapRefs<T>;\n  }\n\n  if (isRef(value)) {\n    return unwrapRefs(unref(value) as T);\n  }\n\n  // unwrap into new object to avoid modifying the source\n  const result: Record<string, unknown> = {};\n  for (const key in value) {\n    result[key] = unwrapRefs(value[key] as T);\n  }\n  return result as UnwrapRefs<T>;\n};\n\nexport const serializeBody = (\n  opts: Pick<Parameters<Client['request']>[0], 'body' | 'bodySerializer'>,\n) => {\n  if (opts.body && opts.bodySerializer) {\n    return opts.bodySerializer(opts.body);\n  }\n  return opts.body;\n};\n\nexport const executeFetchFn = (\n  opts: Omit<Parameters<Client['request']>[0], 'composable'>,\n  fetchFn: Required<Config>['$fetch'],\n) => {\n  const unwrappedOpts = unwrapRefs(opts);\n  unwrappedOpts.rawBody = unwrappedOpts.body;\n  unwrappedOpts.body = serializeBody(unwrappedOpts);\n  return fetchFn(\n    buildUrl(opts),\n    // @ts-expect-error\n    unwrappedOpts,\n  );\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-nuxt/base-url-string/client.gen.ts",
    "content": "// 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://foo.com' }));\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-nuxt/base-url-string/core/auth.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-nuxt/base-url-string/core/bodySerializer.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-nuxt/base-url-string/core/params.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-nuxt/base-url-string/core/pathSerializer.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-nuxt/base-url-string/core/queryKeySerializer.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\n/**\n * JSON-friendly union that mirrors what Pinia Colada can hash.\n */\nexport type JsonValue =\n  | null\n  | string\n  | number\n  | boolean\n  | JsonValue[]\n  | { [key: string]: JsonValue };\n\n/**\n * Replacer that converts non-JSON values (bigint, Date, etc.) to safe substitutes.\n */\nexport const queryKeyJsonReplacer = (_key: string, value: unknown) => {\n  if (value === undefined || typeof value === 'function' || typeof value === 'symbol') {\n    return undefined;\n  }\n  if (typeof value === 'bigint') {\n    return value.toString();\n  }\n  if (value instanceof Date) {\n    return value.toISOString();\n  }\n  return value;\n};\n\n/**\n * Safely stringifies a value and parses it back into a JsonValue.\n */\nexport const stringifyToJsonValue = (input: unknown): JsonValue | undefined => {\n  try {\n    const json = JSON.stringify(input, queryKeyJsonReplacer);\n    if (json === undefined) {\n      return undefined;\n    }\n    return JSON.parse(json) as JsonValue;\n  } catch {\n    return undefined;\n  }\n};\n\n/**\n * Detects plain objects (including objects with a null prototype).\n */\nconst isPlainObject = (value: unknown): value is Record<string, unknown> => {\n  if (value === null || typeof value !== 'object') {\n    return false;\n  }\n  const prototype = Object.getPrototypeOf(value as object);\n  return prototype === Object.prototype || prototype === null;\n};\n\n/**\n * Turns URLSearchParams into a sorted JSON object for deterministic keys.\n */\nconst serializeSearchParams = (params: URLSearchParams): JsonValue => {\n  const entries = Array.from(params.entries()).sort(([a], [b]) => a.localeCompare(b));\n  const result: Record<string, JsonValue> = {};\n\n  for (const [key, value] of entries) {\n    const existing = result[key];\n    if (existing === undefined) {\n      result[key] = value;\n      continue;\n    }\n\n    if (Array.isArray(existing)) {\n      (existing as string[]).push(value);\n    } else {\n      result[key] = [existing, value];\n    }\n  }\n\n  return result;\n};\n\n/**\n * Normalizes any accepted value into a JSON-friendly shape for query keys.\n */\nexport const serializeQueryKeyValue = (value: unknown): JsonValue | undefined => {\n  if (value === null) {\n    return null;\n  }\n\n  if (typeof value === 'string' || typeof value === 'number' || typeof value === 'boolean') {\n    return value;\n  }\n\n  if (value === undefined || typeof value === 'function' || typeof value === 'symbol') {\n    return undefined;\n  }\n\n  if (typeof value === 'bigint') {\n    return value.toString();\n  }\n\n  if (value instanceof Date) {\n    return value.toISOString();\n  }\n\n  if (Array.isArray(value)) {\n    return stringifyToJsonValue(value);\n  }\n\n  if (typeof URLSearchParams !== 'undefined' && value instanceof URLSearchParams) {\n    return serializeSearchParams(value);\n  }\n\n  if (isPlainObject(value)) {\n    return stringifyToJsonValue(value);\n  }\n\n  return undefined;\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-nuxt/base-url-string/core/serverSentEvents.gen.ts",
    "content": "// 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 const 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            // Normalize line endings: CRLF -> LF, then CR -> LF\n            buffer = buffer.replace(/\\r\\n/g, '\\n').replace(/\\r/g, '\\n');\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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-nuxt/base-url-string/core/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { Auth, AuthToken } from './auth.gen';\nimport type { BodySerializer, QuerySerializer, QuerySerializerOptions } from './bodySerializer.gen';\n\nexport type HttpMethod =\n  | 'connect'\n  | 'delete'\n  | 'get'\n  | 'head'\n  | 'options'\n  | 'patch'\n  | 'post'\n  | 'put'\n  | 'trace';\n\nexport type Client<\n  RequestFn = never,\n  Config = unknown,\n  MethodFn = never,\n  BuildUrlFn = never,\n  SseFn = never,\n> = {\n  /**\n   * Returns the final request URL.\n   */\n  buildUrl: BuildUrlFn;\n  getConfig: () => Config;\n  request: RequestFn;\n  setConfig: (config: Config) => Config;\n} & {\n  [K in HttpMethod]: MethodFn;\n} & ([SseFn] extends [never] ? { sse?: never } : { sse: { [K in HttpMethod]: SseFn } });\n\nexport interface Config {\n  /**\n   * Auth token or a function returning auth token. The resolved value will be\n   * added to the request payload as defined by its `security` array.\n   */\n  auth?: ((auth: Auth) => Promise<AuthToken> | AuthToken) | AuthToken;\n  /**\n   * A function for serializing request body parameter. By default,\n   * {@link JSON.stringify()} will be used.\n   */\n  bodySerializer?: BodySerializer | null;\n  /**\n   * An object containing any HTTP headers that you want to pre-populate your\n   * `Headers` object with.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/Headers/Headers#init See more}\n   */\n  headers?:\n    | RequestInit['headers']\n    | Record<\n        string,\n        string | number | boolean | (string | number | boolean)[] | null | undefined | unknown\n      >;\n  /**\n   * The request method.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/fetch#method See more}\n   */\n  method?: Uppercase<HttpMethod>;\n  /**\n   * A function for serializing request query parameters. By default, arrays\n   * will be exploded in form style, objects will be exploded in deepObject\n   * style, and reserved characters are percent-encoded.\n   *\n   * This method will have no effect if the native `paramsSerializer()` Axios\n   * API function is used.\n   *\n   * {@link https://swagger.io/docs/specification/serialization/#query View examples}\n   */\n  querySerializer?: QuerySerializer | QuerySerializerOptions;\n  /**\n   * A function validating request data. This is useful if you want to ensure\n   * the request conforms to the desired shape, so it can be safely sent to\n   * the server.\n   */\n  requestValidator?: (data: unknown) => Promise<unknown>;\n  /**\n   * A function transforming response data before it's returned. This is useful\n   * for post-processing data, e.g. converting ISO strings into Date objects.\n   */\n  responseTransformer?: (data: unknown) => Promise<unknown>;\n  /**\n   * A function validating response data. This is useful if you want to ensure\n   * the response conforms to the desired shape, so it can be safely passed to\n   * the transformers and returned to the user.\n   */\n  responseValidator?: (data: unknown) => Promise<unknown>;\n}\n\ntype IsExactlyNeverOrNeverUndefined<T> = [T] extends [never]\n  ? true\n  : [T] extends [never | undefined]\n    ? [undefined] extends [T]\n      ? false\n      : true\n    : false;\n\nexport type OmitNever<T extends Record<string, unknown>> = {\n  [K in keyof T as IsExactlyNeverOrNeverUndefined<T[K]> extends true ? never : K]: T[K];\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-nuxt/base-url-string/core/utils.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-nuxt/base-url-string/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type { _3eNum1Период, _400, AdditionalPropertiesIntegerIssue, AdditionalPropertiesUnknownIssue, AdditionalPropertiesUnknownIssue2, AdditionalPropertiesUnknownIssue3, AdditionalPropertiesUnknownIssueWritable, AnyOfAnyAndNull, AnyOfArrays, ApiVVersionODataControllerCountData, ApiVVersionODataControllerCountResponse, ApiVVersionODataControllerCountResponses, ArrayWithAnyOfProperties, ArrayWithArray, ArrayWithBooleans, ArrayWithNumbers, ArrayWithProperties, ArrayWithReferences, ArrayWithStrings, CallToTestOrderOfParamsData, CallWithDefaultOptionalParametersData, CallWithDefaultParametersData, CallWithDescriptionsData, CallWithDuplicateResponsesData, CallWithDuplicateResponsesError, CallWithDuplicateResponsesErrors, CallWithDuplicateResponsesResponse, CallWithDuplicateResponsesResponses, CallWithNoContentResponseData, CallWithNoContentResponseResponse, CallWithNoContentResponseResponses, CallWithParametersData, CallWithResponseAndNoContentResponseData, CallWithResponseAndNoContentResponseResponse, CallWithResponseAndNoContentResponseResponses, CallWithResponseData, CallWithResponseResponse, CallWithResponseResponses, CallWithResponsesData, CallWithResponsesError, CallWithResponsesErrors, CallWithResponsesResponse, CallWithResponsesResponses, CallWithResultFromHeaderData, CallWithResultFromHeaderErrors, CallWithResultFromHeaderResponses, CallWithWeirdParameterNamesData, CamelCaseCommentWithBreaks, CharactersInDescription, ClientOptions, CollectionFormatData, CommentWithBackticks, CommentWithBackticksAndQuotes, CommentWithBreaks, CommentWithExpressionPlaceholders, CommentWithQuotes, CommentWithReservedCharacters, CommentWithSlashes, ComplexParamsData, ComplexParamsResponse, ComplexParamsResponses, ComplexTypesData, ComplexTypesErrors, ComplexTypesResponse, ComplexTypesResponses, CompositionBaseModel, CompositionExtendedModel, CompositionWithAllOfAndNullable, CompositionWithAnyOf, CompositionWithAnyOfAndNullable, CompositionWithAnyOfAnonymous, CompositionWithNestedAnyAndTypeNull, CompositionWithNestedAnyOfAndNull, CompositionWithOneOf, CompositionWithOneOfAndComplexArrayDictionary, CompositionWithOneOfAndNullable, CompositionWithOneOfAndProperties, CompositionWithOneOfAndSimpleArrayDictionary, CompositionWithOneOfAndSimpleDictionary, CompositionWithOneOfAnonymous, CompositionWithOneOfDiscriminator, ConstValue, Default, DeleteCallWithoutParametersAndResponseData, DeleteFooData, DeleteFooData2, DeleteFooData3, DeprecatedCallData, DeprecatedModel, DictionaryWithArray, DictionaryWithDictionary, DictionaryWithProperties, DictionaryWithPropertiesAndAdditionalProperties, DictionaryWithReference, DictionaryWithString, DummyAData, DummyAResponse, DummyAResponses, DummyBData, DummyBResponse, DummyBResponses, DuplicateName2Data, DuplicateName3Data, DuplicateName4Data, DuplicateNameData, EnumFromDescription, EnumWithExtensions, EnumWithNumbers, EnumWithReplacedCharacters, EnumWithStrings, EnumWithXEnumNames, ExportData, ExternalRefA, ExternalRefB, ExternalSharedModel, File, FileResponseData, FileResponseResponse, FileResponseResponses, FileWritable, FooWowData, FooWowResponses, FreeFormObjectWithAdditionalPropertiesEqEmptyObject, FreeFormObjectWithAdditionalPropertiesEqTrue, FreeFormObjectWithoutAdditionalProperties, GenericSchemaDuplicateIssue1SystemBoolean, GenericSchemaDuplicateIssue1SystemBooleanWritable, GenericSchemaDuplicateIssue1SystemString, GenericSchemaDuplicateIssue1SystemStringWritable, GetApiVbyApiVersionSimpleOperationData, GetApiVbyApiVersionSimpleOperationError, GetApiVbyApiVersionSimpleOperationErrors, GetApiVbyApiVersionSimpleOperationResponse, GetApiVbyApiVersionSimpleOperationResponses, GetCallWithOptionalParamData, GetCallWithoutParametersAndResponseData, HeadCallWithoutParametersAndResponseData, Import, ImportData, ImportResponse, ImportResponses, IoK8sApimachineryPkgApisMetaV1DeleteOptions, IoK8sApimachineryPkgApisMetaV1Preconditions, ModelCircle, ModelFromZendesk, ModelSquare, ModelThatExtends, ModelThatExtendsExtends, ModelWithAdditionalPropertiesEqTrue, ModelWithAdditionalPropertiesRef, ModelWithAnyOfConstantSizeArray, ModelWithAnyOfConstantSizeArrayAndIntersect, ModelWithAnyOfConstantSizeArrayNullable, ModelWithAnyOfConstantSizeArrayWithNSizeAndOptions, ModelWithAnyOfConstantSizeArrayWithNSizeAndOptionsWritable, ModelWithArray, ModelWithArrayReadOnlyAndWriteOnly, ModelWithArrayReadOnlyAndWriteOnlyWritable, ModelWithBackticksInDescription, ModelWithBoolean, ModelWithCircularReference, ModelWithConst, ModelWithConstantSizeArray, ModelWithDictionary, ModelWithDuplicateImports, ModelWithDuplicateProperties, ModelWithEnum, ModelWithEnumFromDescription, ModelWithEnumWithHyphen, ModelWithInteger, ModelWithNestedArrayEnums, ModelWithNestedArrayEnumsData, ModelWithNestedArrayEnumsDataBar, ModelWithNestedArrayEnumsDataFoo, ModelWithNestedCompositionEnums, ModelWithNestedEnums, ModelWithNestedProperties, ModelWithNullableObject, ModelWithNullableString, ModelWithNumericEnumUnion, ModelWithOneOfAndProperties, ModelWithOneOfEnum, ModelWithOrderedProperties, ModelWithPattern, ModelWithPatternWritable, ModelWithPrefixItemsConstantSizeArray, ModelWithProperties, ModelWithPropertiesWritable, ModelWithReadOnlyAndWriteOnly, ModelWithReadOnlyAndWriteOnlyWritable, ModelWithReference, ModelWithReferenceWritable, ModelWithString, ModelWithStringError, MultipartRequestData, MultipartResponseData, MultipartResponseResponse, MultipartResponseResponses, NestedAnyOfArraysNullable, NonAsciiæøåÆøÅöôêÊ字符串Data, NonAsciiæøåÆøÅöôêÊ字符串Response, NonAsciiæøåÆøÅöôêÊ字符串Responses, NonAsciiStringæøåÆøÅöôêÊ字符串, NullableObject, OneOfAllOfIssue, OneOfAllOfIssueWritable, OptionsCallWithoutParametersAndResponseData, Pageable, ParameterSimpleParameterUnused, PatchApiVbyApiVersionNoTagData, PatchApiVbyApiVersionNoTagResponses, PatchCallWithoutParametersAndResponseData, PostApiVbyApiVersionFormDataData, PostApiVbyApiVersionRequestBodyData, PostCallWithOptionalParamData, PostCallWithOptionalParamResponse, PostCallWithOptionalParamResponses, PostCallWithoutParametersAndResponseData, PostServiceWithEmptyTagResponse, PostServiceWithEmptyTagResponse2, PutCallWithoutParametersAndResponseData, PutWithFormUrlEncodedData, SchemaWithFormRestrictedKeys, SimpleBoolean, SimpleFile, SimpleFormData, SimpleInteger, SimpleParameter, SimpleReference, SimpleRequestBody, SimpleString, SimpleStringWithPattern, TestErrorCodeData, TestErrorCodeErrors, TestErrorCodeResponses, TypesData, TypesResponse, TypesResponses, UploadFileData, UploadFileResponse, UploadFileResponses, XFooBar } from './types.gen';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-nuxt/base-url-string/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type ClientOptions = {\n    baseURL: 'http://localhost:3000/base' | (string & {});\n};\n\n/**\n * Model with number-only name\n */\nexport type _400 = string;\n\n/**\n * External ref to shared model (A)\n */\nexport type ExternalRefA = ExternalSharedModel;\n\n/**\n * External ref to shared model (B)\n */\nexport type ExternalRefB = ExternalSharedModel;\n\n/**\n * Testing multiline comments in string: First line\n * Second line\n *\n * Fourth line\n */\nexport type CamelCaseCommentWithBreaks = number;\n\n/**\n * Testing multiline comments in string: First line\n * Second line\n *\n * Fourth line\n */\nexport type CommentWithBreaks = number;\n\n/**\n * Testing backticks in string: `backticks` and ```multiple backticks``` should work\n */\nexport type CommentWithBackticks = number;\n\n/**\n * Testing backticks and quotes in string: `backticks`, 'quotes', \"double quotes\" and ```multiple backticks``` should work\n */\nexport type CommentWithBackticksAndQuotes = number;\n\n/**\n * Testing slashes in string: \\backwards\\\\\\ and /forwards/// should work\n */\nexport type CommentWithSlashes = number;\n\n/**\n * Testing expression placeholders in string: ${expression} should work\n */\nexport type CommentWithExpressionPlaceholders = number;\n\n/**\n * Testing quotes in string: 'single quote''' and \"double quotes\"\"\" should work\n */\nexport type CommentWithQuotes = number;\n\n/**\n * Testing reserved characters in string: * inline * and ** inline ** should work\n */\nexport type CommentWithReservedCharacters = number;\n\n/**\n * This is a simple number\n */\nexport type SimpleInteger = number;\n\n/**\n * This is a simple boolean\n */\nexport type SimpleBoolean = boolean;\n\n/**\n * This is a simple string\n */\nexport type SimpleString = string;\n\n/**\n * A string with non-ascii (unicode) characters valid in typescript identifiers (æøåÆØÅöÔèÈ字符串)\n */\nexport type NonAsciiStringæøåÆøÅöôêÊ字符串 = string;\n\n/**\n * This is a simple file\n */\nexport type SimpleFile = Blob | File;\n\n/**\n * This is a simple reference\n */\nexport type SimpleReference = ModelWithString;\n\n/**\n * This is a simple string\n */\nexport type SimpleStringWithPattern = string | null;\n\n/**\n * This is a simple enum with strings\n */\nexport type EnumWithStrings = 'Success' | 'Warning' | 'Error' | '\\'Single Quote\\'' | '\"Double Quotes\"' | 'Non-ascii: øæåôöØÆÅÔÖ字符串';\n\nexport type EnumWithReplacedCharacters = '\\'Single Quote\\'' | '\"Double Quotes\"' | 'øæåôöØÆÅÔÖ字符串' | 3.1 | '';\n\n/**\n * This is a simple enum with numbers\n */\nexport type EnumWithNumbers = 1 | 2 | 3 | 1.1 | 1.2 | 1.3 | 100 | 200 | 300 | -100 | -200 | -300 | -1.1 | -1.2 | -1.3;\n\n/**\n * Success=1,Warning=2,Error=3\n */\nexport type EnumFromDescription = number;\n\n/**\n * This is a simple enum with numbers\n */\nexport type EnumWithExtensions = 200 | 400 | 500;\n\nexport type EnumWithXEnumNames = 0 | 1 | 2;\n\n/**\n * This is a simple array with numbers\n */\nexport type ArrayWithNumbers = Array<number>;\n\n/**\n * This is a simple array with booleans\n */\nexport type ArrayWithBooleans = Array<boolean>;\n\n/**\n * This is a simple array with strings\n */\nexport type ArrayWithStrings = Array<string>;\n\n/**\n * This is a simple array with references\n */\nexport type ArrayWithReferences = Array<ModelWithString>;\n\n/**\n * This is a simple array containing an array\n */\nexport type ArrayWithArray = Array<Array<ModelWithString>>;\n\n/**\n * This is a simple array with properties\n */\nexport type ArrayWithProperties = Array<{\n    '16x16'?: CamelCaseCommentWithBreaks;\n    bar?: string;\n}>;\n\n/**\n * This is a simple array with any of properties\n */\nexport type ArrayWithAnyOfProperties = Array<{\n    foo?: string;\n} | {\n    bar?: string;\n}>;\n\nexport type AnyOfAnyAndNull = {\n    data?: unknown | null;\n};\n\n/**\n * This is a simple array with any of properties\n */\nexport type AnyOfArrays = {\n    results?: Array<{\n        foo?: string;\n    } | {\n        bar?: string;\n    }>;\n};\n\n/**\n * This is a string dictionary\n */\nexport type DictionaryWithString = {\n    [key: string]: string;\n};\n\nexport type DictionaryWithPropertiesAndAdditionalProperties = {\n    foo?: number;\n    bar?: boolean;\n    [key: string]: string | number | boolean | undefined;\n};\n\n/**\n * This is a string reference\n */\nexport type DictionaryWithReference = {\n    [key: string]: ModelWithString;\n};\n\n/**\n * This is a complex dictionary\n */\nexport type DictionaryWithArray = {\n    [key: string]: Array<ModelWithString>;\n};\n\n/**\n * This is a string dictionary\n */\nexport type DictionaryWithDictionary = {\n    [key: string]: {\n        [key: string]: string;\n    };\n};\n\n/**\n * This is a complex dictionary\n */\nexport type DictionaryWithProperties = {\n    [key: string]: {\n        foo?: string;\n        bar?: string;\n    };\n};\n\n/**\n * This is a model with one number property\n */\nexport type ModelWithInteger = {\n    /**\n     * This is a simple number property\n     */\n    prop?: number;\n};\n\n/**\n * This is a model with one boolean property\n */\nexport type ModelWithBoolean = {\n    /**\n     * This is a simple boolean property\n     */\n    prop?: boolean;\n};\n\n/**\n * This is a model with one string property\n */\nexport type ModelWithString = {\n    /**\n     * This is a simple string property\n     */\n    prop?: string;\n};\n\n/**\n * This is a model with one string property\n */\nexport type ModelWithStringError = {\n    /**\n     * This is a simple string property\n     */\n    prop?: string;\n};\n\n/**\n * `Comment` or `VoiceComment`. The JSON object for adding voice comments to tickets is different. See [Adding voice comments to tickets](/documentation/ticketing/managing-tickets/adding-voice-comments-to-tickets)\n */\nexport type ModelFromZendesk = string;\n\n/**\n * This is a model with one string property\n */\nexport type ModelWithNullableString = {\n    /**\n     * This is a simple string property\n     */\n    nullableProp1?: string | null;\n    /**\n     * This is a simple string property\n     */\n    nullableRequiredProp1: string | null;\n    /**\n     * This is a simple string property\n     */\n    nullableProp2?: string | null;\n    /**\n     * This is a simple string property\n     */\n    nullableRequiredProp2: string | null;\n    /**\n     * This is a simple enum with strings\n     */\n    'foo_bar-enum'?: 'Success' | 'Warning' | 'Error' | 'ØÆÅ字符串';\n};\n\n/**\n * This is a model with one enum\n */\nexport type ModelWithEnum = {\n    /**\n     * This is a simple enum with strings\n     */\n    'foo_bar-enum'?: 'Success' | 'Warning' | 'Error' | 'ØÆÅ字符串';\n    /**\n     * These are the HTTP error code enums\n     */\n    statusCode?: '100' | '200 FOO' | '300 FOO_BAR' | '400 foo-bar' | '500 foo.bar' | '600 foo&bar';\n    /**\n     * Simple boolean enum\n     */\n    bool?: true;\n};\n\n/**\n * This is a model with one enum with escaped name\n */\nexport type ModelWithEnumWithHyphen = {\n    /**\n     * Foo-Bar-Baz-Qux\n     */\n    'foo-bar-baz-qux'?: '3.0';\n};\n\n/**\n * This is a model with one enum\n */\nexport type ModelWithEnumFromDescription = {\n    /**\n     * Success=1,Warning=2,Error=3\n     */\n    test?: number;\n};\n\n/**\n * This is a model with nested enums\n */\nexport type ModelWithNestedEnums = {\n    dictionaryWithEnum?: {\n        [key: string]: 'Success' | 'Warning' | 'Error';\n    };\n    dictionaryWithEnumFromDescription?: {\n        [key: string]: number;\n    };\n    arrayWithEnum?: Array<'Success' | 'Warning' | 'Error'>;\n    arrayWithDescription?: Array<number>;\n    /**\n     * This is a simple enum with strings\n     */\n    'foo_bar-enum'?: 'Success' | 'Warning' | 'Error' | 'ØÆÅ字符串';\n};\n\n/**\n * This is a model with one property containing a reference\n */\nexport type ModelWithReference = {\n    prop?: ModelWithProperties;\n};\n\n/**\n * This is a model with one property containing an array\n */\nexport type ModelWithArrayReadOnlyAndWriteOnly = {\n    prop?: Array<ModelWithReadOnlyAndWriteOnly>;\n    propWithFile?: Array<Blob | File>;\n    propWithNumber?: Array<number>;\n};\n\n/**\n * This is a model with one property containing an array\n */\nexport type ModelWithArray = {\n    prop?: Array<ModelWithString>;\n    propWithFile?: Array<Blob | File>;\n    propWithNumber?: Array<number>;\n};\n\n/**\n * This is a model with one property containing a dictionary\n */\nexport type ModelWithDictionary = {\n    prop?: {\n        [key: string]: string;\n    };\n};\n\n/**\n * This is a deprecated model with a deprecated property\n *\n * @deprecated\n */\nexport type DeprecatedModel = {\n    /**\n     * This is a deprecated property\n     *\n     * @deprecated\n     */\n    prop?: string;\n};\n\n/**\n * This is a model with one property containing a circular reference\n */\nexport type ModelWithCircularReference = {\n    prop?: ModelWithCircularReference;\n};\n\n/**\n * This is a model with one property with a 'one of' relationship\n */\nexport type CompositionWithOneOf = {\n    propA?: ModelWithString | ModelWithEnum | ModelWithArray | ModelWithDictionary;\n};\n\n/**\n * This is a model with one property with a 'one of' relationship where the options are not $ref\n */\nexport type CompositionWithOneOfAnonymous = {\n    propA?: {\n        propA?: string;\n    } | string | number;\n};\n\n/**\n * Circle\n */\nexport type ModelCircle = {\n    kind: string;\n    radius?: number;\n};\n\n/**\n * Square\n */\nexport type ModelSquare = {\n    kind: string;\n    sideLength?: number;\n};\n\n/**\n * This is a model with one property with a 'one of' relationship where the options are not $ref\n */\nexport type CompositionWithOneOfDiscriminator = ({\n    kind: 'circle';\n} & ModelCircle) | ({\n    kind: 'square';\n} & ModelSquare);\n\n/**\n * This is a model with one property with a 'any of' relationship\n */\nexport type CompositionWithAnyOf = {\n    propA?: ModelWithString | ModelWithEnum | ModelWithArray | ModelWithDictionary;\n};\n\n/**\n * This is a model with one property with a 'any of' relationship where the options are not $ref\n */\nexport type CompositionWithAnyOfAnonymous = {\n    propA?: {\n        propA?: string;\n    } | string | number;\n};\n\n/**\n * This is a model with nested 'any of' property with a type null\n */\nexport type CompositionWithNestedAnyAndTypeNull = {\n    propA?: Array<ModelWithDictionary | null> | Array<ModelWithArray | null>;\n};\n\nexport type _3eNum1Период = 'Bird' | 'Dog';\n\nexport type ConstValue = 'ConstValue';\n\n/**\n * This is a model with one property with a 'any of' relationship where the options are not $ref\n */\nexport type CompositionWithNestedAnyOfAndNull = {\n    /**\n     * Scopes\n     */\n    propA?: Array<_3eNum1Период | ConstValue> | null;\n};\n\n/**\n * This is a model with one property with a 'one of' relationship\n */\nexport type CompositionWithOneOfAndNullable = {\n    propA?: {\n        boolean?: boolean;\n    } | ModelWithEnum | ModelWithArray | ModelWithDictionary | null;\n};\n\n/**\n * This is a model that contains a simple dictionary within composition\n */\nexport type CompositionWithOneOfAndSimpleDictionary = {\n    propA?: boolean | {\n        [key: string]: number;\n    };\n};\n\n/**\n * This is a model that contains a dictionary of simple arrays within composition\n */\nexport type CompositionWithOneOfAndSimpleArrayDictionary = {\n    propA?: boolean | {\n        [key: string]: Array<boolean>;\n    };\n};\n\n/**\n * This is a model that contains a dictionary of complex arrays (composited) within composition\n */\nexport type CompositionWithOneOfAndComplexArrayDictionary = {\n    propA?: boolean | {\n        [key: string]: Array<number | string>;\n    };\n};\n\n/**\n * This is a model with one property with a 'all of' relationship\n */\nexport type CompositionWithAllOfAndNullable = {\n    propA?: ({\n        boolean?: boolean;\n    } & ModelWithEnum & ModelWithArray & ModelWithDictionary) | null;\n};\n\n/**\n * This is a model with one property with a 'any of' relationship\n */\nexport type CompositionWithAnyOfAndNullable = {\n    propA?: {\n        boolean?: boolean;\n    } | ModelWithEnum | ModelWithArray | ModelWithDictionary | null;\n};\n\n/**\n * This is a base model with two simple optional properties\n */\nexport type CompositionBaseModel = {\n    firstName?: string;\n    lastname?: string;\n};\n\n/**\n * This is a model that extends the base model\n */\nexport type CompositionExtendedModel = CompositionBaseModel & {\n    age: number;\n    firstName: string;\n    lastname: string;\n};\n\n/**\n * This is a model with one nested property\n */\nexport type ModelWithProperties = {\n    required: string;\n    readonly requiredAndReadOnly: string;\n    requiredAndNullable: string | null;\n    string?: string;\n    number?: number;\n    boolean?: boolean;\n    reference?: ModelWithString;\n    'property with space'?: string;\n    default?: string;\n    try?: string;\n    readonly '@namespace.string'?: string;\n    readonly '@namespace.integer'?: number;\n};\n\n/**\n * This is a model with one nested property\n */\nexport type ModelWithNestedProperties = {\n    readonly first: {\n        readonly second: {\n            readonly third: string | null;\n        } | null;\n    } | null;\n};\n\n/**\n * This is a model with duplicated properties\n */\nexport type ModelWithDuplicateProperties = {\n    prop?: ModelWithString;\n};\n\n/**\n * This is a model with ordered properties\n */\nexport type ModelWithOrderedProperties = {\n    zebra?: string;\n    apple?: string;\n    hawaii?: string;\n};\n\n/**\n * This is a model with duplicated imports\n */\nexport type ModelWithDuplicateImports = {\n    propA?: ModelWithString;\n    propB?: ModelWithString;\n    propC?: ModelWithString;\n};\n\n/**\n * This is a model that extends another model\n */\nexport type ModelThatExtends = ModelWithString & {\n    propExtendsA?: string;\n    propExtendsB?: ModelWithString;\n};\n\n/**\n * This is a model that extends another model\n */\nexport type ModelThatExtendsExtends = ModelWithString & ModelThatExtends & {\n    propExtendsC?: string;\n    propExtendsD?: ModelWithString;\n};\n\n/**\n * This is a model that contains a some patterns\n */\nexport type ModelWithPattern = {\n    key: string;\n    name: string;\n    readonly enabled?: boolean;\n    readonly modified?: string;\n    id?: string;\n    text?: string;\n    patternWithSingleQuotes?: string;\n    patternWithNewline?: string;\n    patternWithBacktick?: string;\n    patternWithUnicode?: string;\n};\n\nexport type File = {\n    /**\n     * Id\n     */\n    readonly id?: string;\n    /**\n     * Updated at\n     */\n    readonly updated_at?: string;\n    /**\n     * Created at\n     */\n    readonly created_at?: string;\n    /**\n     * Mime\n     */\n    mime: string;\n    /**\n     * File\n     */\n    readonly file?: string;\n};\n\nexport type Default = {\n    name?: string;\n};\n\nexport type Pageable = {\n    page?: number;\n    size?: number;\n    sort?: Array<string>;\n};\n\n/**\n * This is a free-form object without additionalProperties.\n */\nexport type FreeFormObjectWithoutAdditionalProperties = {\n    [key: string]: unknown;\n};\n\n/**\n * This is a free-form object with additionalProperties: true.\n */\nexport type FreeFormObjectWithAdditionalPropertiesEqTrue = {\n    [key: string]: unknown;\n};\n\n/**\n * This is a free-form object with additionalProperties: {}.\n */\nexport type FreeFormObjectWithAdditionalPropertiesEqEmptyObject = {\n    [key: string]: unknown;\n};\n\nexport type ModelWithConst = {\n    String?: 'String';\n    number?: 0;\n    null?: null;\n    withType?: 'Some string';\n};\n\n/**\n * This is a model with one property and additionalProperties: true\n */\nexport type ModelWithAdditionalPropertiesEqTrue = {\n    /**\n     * This is a simple string property\n     */\n    prop?: string;\n    [key: string]: unknown;\n};\n\nexport type NestedAnyOfArraysNullable = {\n    nullableArray?: Array<string | boolean> | null;\n};\n\nexport type CompositionWithOneOfAndProperties = ({\n    foo: SimpleParameter;\n} | {\n    bar: NonAsciiStringæøåÆøÅöôêÊ字符串;\n}) & {\n    baz: number | null;\n    qux: number;\n};\n\n/**\n * An object that can be null\n */\nexport type NullableObject = {\n    foo?: string;\n} | null;\n\n/**\n * Some % character\n */\nexport type CharactersInDescription = string;\n\nexport type ModelWithNullableObject = {\n    data?: NullableObject;\n};\n\n/**\n * An object with additional properties that can be null (anyOf ref + null)\n */\nexport type ModelWithAdditionalPropertiesRef = {\n    [key: string]: NullableObject | null;\n};\n\nexport type ModelWithOneOfEnum = {\n    foo: 'Bar';\n} | {\n    foo: 'Baz';\n} | {\n    foo: 'Qux';\n} | {\n    content: string;\n    foo: 'Quux';\n} | {\n    content: [\n        string,\n        string\n    ];\n    foo: 'Corge';\n};\n\nexport type ModelWithNestedArrayEnumsDataFoo = 'foo' | 'bar';\n\nexport type ModelWithNestedArrayEnumsDataBar = 'baz' | 'qux';\n\nexport type ModelWithNestedArrayEnumsData = {\n    foo?: Array<ModelWithNestedArrayEnumsDataFoo>;\n    bar?: Array<ModelWithNestedArrayEnumsDataBar>;\n};\n\nexport type ModelWithNestedArrayEnums = {\n    array_strings?: Array<string>;\n    data?: ModelWithNestedArrayEnumsData;\n};\n\nexport type ModelWithNestedCompositionEnums = {\n    foo?: ModelWithNestedArrayEnumsDataFoo;\n};\n\nexport type ModelWithReadOnlyAndWriteOnly = {\n    foo: string;\n    readonly bar: string;\n};\n\nexport type ModelWithConstantSizeArray = [\n    number,\n    number\n];\n\nexport type ModelWithAnyOfConstantSizeArray = [\n    number | string,\n    number | string,\n    number | string\n];\n\nexport type ModelWithPrefixItemsConstantSizeArray = [\n    ModelWithInteger,\n    number | string,\n    string\n];\n\nexport type ModelWithAnyOfConstantSizeArrayNullable = [\n    number | null | string,\n    number | null | string,\n    number | null | string\n];\n\nexport type ModelWithAnyOfConstantSizeArrayWithNSizeAndOptions = [\n    number | Import,\n    number | Import\n];\n\nexport type ModelWithAnyOfConstantSizeArrayAndIntersect = [\n    number & string,\n    number & string\n];\n\nexport type ModelWithNumericEnumUnion = {\n    /**\n     * Период\n     */\n    value?: -10 | -1 | 0 | 1 | 3 | 6 | 12;\n};\n\n/**\n * Some description with `back ticks`\n */\nexport type ModelWithBackticksInDescription = {\n    /**\n     * The template `that` should be used for parsing and importing the contents of the CSV file.\n     *\n     * <br/><p>There is one placeholder currently supported:<ul>     <li><b>${x}</b> - refers to the n-th column in the CSV file, e.g. ${1}, ${2}, ...)</li></ul><p>Example of a correct JSON template:</p>\n     * <pre>\n     * [\n     * {\n     * \"resourceType\": \"Asset\",\n     * \"identifier\": {\n     * \"name\": \"${1}\",\n     * \"domain\": {\n     * \"name\": \"${2}\",\n     * \"community\": {\n     * \"name\": \"Some Community\"\n     * }\n     * }\n     * },\n     * \"attributes\" : {\n     * \"00000000-0000-0000-0000-000000003115\" : [ {\n     * \"value\" : \"${3}\"\n     * } ],\n     * \"00000000-0000-0000-0000-000000000222\" : [ {\n     * \"value\" : \"${4}\"\n     * } ]\n     * }\n     * }\n     * ]\n     * </pre>\n     */\n    template?: string;\n};\n\nexport type ModelWithOneOfAndProperties = (SimpleParameter | NonAsciiStringæøåÆøÅöôêÊ字符串) & {\n    baz: number | null;\n    qux: number;\n};\n\n/**\n * Model used to test deduplication strategy (unused)\n */\nexport type ParameterSimpleParameterUnused = string;\n\n/**\n * Model used to test deduplication strategy\n */\nexport type PostServiceWithEmptyTagResponse = string;\n\n/**\n * Model used to test deduplication strategy\n */\nexport type PostServiceWithEmptyTagResponse2 = string;\n\n/**\n * Model used to test deduplication strategy\n */\nexport type DeleteFooData = string;\n\n/**\n * Model used to test deduplication strategy\n */\nexport type DeleteFooData2 = string;\n\n/**\n * Model with restricted keyword name\n */\nexport type Import = string;\n\nexport type SchemaWithFormRestrictedKeys = {\n    description?: string;\n    'x-enum-descriptions'?: string;\n    'x-enum-varnames'?: string;\n    'x-enumNames'?: string;\n    title?: string;\n    object?: {\n        description?: string;\n        'x-enum-descriptions'?: string;\n        'x-enum-varnames'?: string;\n        'x-enumNames'?: string;\n        title?: string;\n    };\n    array?: Array<{\n        description?: string;\n        'x-enum-descriptions'?: string;\n        'x-enum-varnames'?: string;\n        'x-enumNames'?: string;\n        title?: string;\n    }>;\n};\n\n/**\n * This schema was giving PascalCase transformations a hard time\n */\nexport type IoK8sApimachineryPkgApisMetaV1DeleteOptions = {\n    /**\n     * Must be fulfilled before a deletion is carried out. If not possible, a 409 Conflict status will be returned.\n     */\n    preconditions?: IoK8sApimachineryPkgApisMetaV1Preconditions;\n};\n\n/**\n * This schema was giving PascalCase transformations a hard time\n */\nexport type IoK8sApimachineryPkgApisMetaV1Preconditions = {\n    /**\n     * Specifies the target ResourceVersion\n     */\n    resourceVersion?: string;\n    /**\n     * Specifies the target UID.\n     */\n    uid?: string;\n};\n\nexport type AdditionalPropertiesUnknownIssue = {\n    [key: string]: string | number;\n};\n\nexport type AdditionalPropertiesUnknownIssue2 = {\n    [key: string]: string | number;\n};\n\nexport type AdditionalPropertiesUnknownIssue3 = string & {\n    entries: {\n        [key: string]: AdditionalPropertiesUnknownIssue;\n    };\n};\n\nexport type AdditionalPropertiesIntegerIssue = {\n    value: number;\n    [key: string]: number;\n};\n\nexport type OneOfAllOfIssue = ((ConstValue | GenericSchemaDuplicateIssue1SystemBoolean) & _3eNum1Период) | GenericSchemaDuplicateIssue1SystemString;\n\nexport type GenericSchemaDuplicateIssue1SystemBoolean = {\n    item?: boolean;\n    error?: string | null;\n    readonly hasError?: boolean;\n    data?: {\n        [key: string]: never;\n    };\n};\n\nexport type GenericSchemaDuplicateIssue1SystemString = {\n    item?: string | null;\n    error?: string | null;\n    readonly hasError?: boolean;\n};\n\nexport type ExternalSharedModel = {\n    id: string;\n    name?: string;\n};\n\n/**\n * This is a model with one property containing a reference\n */\nexport type ModelWithReferenceWritable = {\n    prop?: ModelWithPropertiesWritable;\n};\n\n/**\n * This is a model with one property containing an array\n */\nexport type ModelWithArrayReadOnlyAndWriteOnlyWritable = {\n    prop?: Array<ModelWithReadOnlyAndWriteOnlyWritable>;\n    propWithFile?: Array<Blob | File>;\n    propWithNumber?: Array<number>;\n};\n\n/**\n * This is a model with one nested property\n */\nexport type ModelWithPropertiesWritable = {\n    required: string;\n    requiredAndNullable: string | null;\n    string?: string;\n    number?: number;\n    boolean?: boolean;\n    reference?: ModelWithString;\n    'property with space'?: string;\n    default?: string;\n    try?: string;\n};\n\n/**\n * This is a model that contains a some patterns\n */\nexport type ModelWithPatternWritable = {\n    key: string;\n    name: string;\n    id?: string;\n    text?: string;\n    patternWithSingleQuotes?: string;\n    patternWithNewline?: string;\n    patternWithBacktick?: string;\n    patternWithUnicode?: string;\n};\n\nexport type FileWritable = {\n    /**\n     * Mime\n     */\n    mime: string;\n};\n\nexport type ModelWithReadOnlyAndWriteOnlyWritable = {\n    foo: string;\n    baz: string;\n};\n\nexport type ModelWithAnyOfConstantSizeArrayWithNSizeAndOptionsWritable = [\n    number | Import,\n    number | Import\n];\n\nexport type AdditionalPropertiesUnknownIssueWritable = {\n    [key: string]: string | number;\n};\n\nexport type OneOfAllOfIssueWritable = ((ConstValue | GenericSchemaDuplicateIssue1SystemBoolean) & _3eNum1Период) | GenericSchemaDuplicateIssue1SystemString;\n\nexport type GenericSchemaDuplicateIssue1SystemBooleanWritable = {\n    item?: boolean;\n    error?: string | null;\n    data?: {\n        [key: string]: never;\n    };\n};\n\nexport type GenericSchemaDuplicateIssue1SystemStringWritable = {\n    item?: string | null;\n    error?: string | null;\n};\n\n/**\n * This is a reusable parameter\n */\nexport type SimpleParameter = string;\n\n/**\n * Parameter with illegal characters\n */\nexport type XFooBar = ModelWithString;\n\n/**\n * A reusable request body\n */\nexport type SimpleRequestBody = ModelWithString;\n\n/**\n * A reusable request body\n */\nexport type SimpleFormData = ModelWithString;\n\nexport type ExportData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no+tag';\n};\n\nexport type PatchApiVbyApiVersionNoTagData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no+tag';\n};\n\nexport type PatchApiVbyApiVersionNoTagResponses = {\n    /**\n     * OK\n     */\n    default: unknown;\n};\n\nexport type ImportData = {\n    body: ModelWithReadOnlyAndWriteOnlyWritable | ModelWithArrayReadOnlyAndWriteOnlyWritable;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no+tag';\n};\n\nexport type ImportResponses = {\n    /**\n     * Success\n     */\n    200: ModelFromZendesk;\n    /**\n     * Default success response\n     */\n    default: ModelWithReadOnlyAndWriteOnly;\n};\n\nexport type ImportResponse = ImportResponses[keyof ImportResponses];\n\nexport type FooWowData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no+tag';\n};\n\nexport type FooWowResponses = {\n    /**\n     * OK\n     */\n    default: unknown;\n};\n\nexport type ApiVVersionODataControllerCountData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple/$count';\n};\n\nexport type ApiVVersionODataControllerCountResponses = {\n    /**\n     * Success\n     */\n    200: ModelFromZendesk;\n};\n\nexport type ApiVVersionODataControllerCountResponse = ApiVVersionODataControllerCountResponses[keyof ApiVVersionODataControllerCountResponses];\n\nexport type GetApiVbyApiVersionSimpleOperationData = {\n    body?: never;\n    path: {\n        /**\n         * foo in method\n         */\n        foo_param: string;\n    };\n    query?: never;\n    url: '/api/v{api-version}/simple:operation';\n};\n\nexport type GetApiVbyApiVersionSimpleOperationErrors = {\n    /**\n     * Default error response\n     */\n    default: ModelWithBoolean;\n};\n\nexport type GetApiVbyApiVersionSimpleOperationError = GetApiVbyApiVersionSimpleOperationErrors[keyof GetApiVbyApiVersionSimpleOperationErrors];\n\nexport type GetApiVbyApiVersionSimpleOperationResponses = {\n    /**\n     * Response is a simple number\n     */\n    200: number;\n};\n\nexport type GetApiVbyApiVersionSimpleOperationResponse = GetApiVbyApiVersionSimpleOperationResponses[keyof GetApiVbyApiVersionSimpleOperationResponses];\n\nexport type DeleteCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type GetCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type HeadCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type OptionsCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type PatchCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type PostCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type PutCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type DeleteFooData3 = {\n    body?: never;\n    headers: {\n        /**\n         * Parameter with illegal characters\n         */\n        'x-Foo-Bar': ModelWithString;\n    };\n    path: {\n        /**\n         * foo in method\n         */\n        foo_param: string;\n        /**\n         * bar in method\n         */\n        BarParam: string;\n    };\n    query?: never;\n    url: '/api/v{api-version}/foo/{foo_param}/bar/{BarParam}';\n};\n\nexport type CallWithDescriptionsData = {\n    body?: never;\n    path?: never;\n    query?: {\n        /**\n         * Testing multiline comments in string: First line\n         * Second line\n         *\n         * Fourth line\n         */\n        parameterWithBreaks?: string;\n        /**\n         * Testing backticks in string: `backticks` and ```multiple backticks``` should work\n         */\n        parameterWithBackticks?: string;\n        /**\n         * Testing slashes in string: \\backwards\\\\\\ and /forwards/// should work\n         */\n        parameterWithSlashes?: string;\n        /**\n         * Testing expression placeholders in string: ${expression} should work\n         */\n        parameterWithExpressionPlaceholders?: string;\n        /**\n         * Testing quotes in string: 'single quote''' and \"double quotes\"\"\" should work\n         */\n        parameterWithQuotes?: string;\n        /**\n         * Testing reserved characters in string: * inline * and ** inline ** should work\n         */\n        parameterWithReservedCharacters?: string;\n    };\n    url: '/api/v{api-version}/descriptions';\n};\n\nexport type DeprecatedCallData = {\n    body?: never;\n    headers: {\n        /**\n         * This parameter is deprecated\n         *\n         * @deprecated\n         */\n        parameter: DeprecatedModel | null;\n    };\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/parameters/deprecated';\n};\n\nexport type CallWithParametersData = {\n    /**\n     * This is the parameter that goes into the body\n     */\n    body: {\n        [key: string]: unknown;\n    } | null;\n    headers: {\n        /**\n         * This is the parameter that goes into the header\n         */\n        parameterHeader: string | null;\n    };\n    path: {\n        /**\n         * This is the parameter that goes into the path\n         */\n        parameterPath: string | null;\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string | null;\n    };\n    query: {\n        foo_ref_enum?: ModelWithNestedArrayEnumsDataFoo;\n        foo_all_of_enum: ModelWithNestedArrayEnumsDataFoo;\n        /**\n         * This is the parameter that goes into the query params\n         */\n        cursor: string | null;\n    };\n    url: '/api/v{api-version}/parameters/{parameterPath}';\n};\n\nexport type CallWithWeirdParameterNamesData = {\n    /**\n     * This is the parameter that goes into the body\n     */\n    body: ModelWithString | null;\n    headers: {\n        /**\n         * This is the parameter that goes into the request header\n         */\n        'parameter.header': string | null;\n    };\n    path: {\n        /**\n         * This is the parameter that goes into the path\n         */\n        'parameter.path.1'?: string;\n        /**\n         * This is the parameter that goes into the path\n         */\n        'parameter-path-2'?: string;\n        /**\n         * This is the parameter that goes into the path\n         */\n        'PARAMETER-PATH-3'?: string;\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string | null;\n    };\n    query: {\n        /**\n         * This is the parameter with a reserved keyword\n         */\n        default?: string;\n        /**\n         * This is the parameter that goes into the request query params\n         */\n        'parameter-query': string | null;\n    };\n    url: '/api/v{api-version}/parameters/{parameter.path.1}/{parameter-path-2}/{PARAMETER-PATH-3}';\n};\n\nexport type GetCallWithOptionalParamData = {\n    /**\n     * This is a required parameter\n     */\n    body: ModelWithOneOfEnum;\n    path?: never;\n    query?: {\n        /**\n         * This is an optional parameter\n         */\n        page?: number;\n    };\n    url: '/api/v{api-version}/parameters';\n};\n\nexport type PostCallWithOptionalParamData = {\n    /**\n     * This is an optional parameter\n     */\n    body?: {\n        offset?: number | null;\n    };\n    path?: never;\n    query: {\n        /**\n         * This is a required parameter\n         */\n        parameter: Pageable;\n    };\n    url: '/api/v{api-version}/parameters';\n};\n\nexport type PostCallWithOptionalParamResponses = {\n    /**\n     * Response is a simple number\n     */\n    200: number;\n    /**\n     * Success\n     */\n    204: void;\n};\n\nexport type PostCallWithOptionalParamResponse = PostCallWithOptionalParamResponses[keyof PostCallWithOptionalParamResponses];\n\nexport type PostApiVbyApiVersionRequestBodyData = {\n    /**\n     * A reusable request body\n     */\n    body?: SimpleRequestBody;\n    path?: never;\n    query?: {\n        /**\n         * This is a reusable parameter\n         */\n        parameter?: string;\n    };\n    url: '/api/v{api-version}/requestBody';\n};\n\nexport type PostApiVbyApiVersionFormDataData = {\n    /**\n     * A reusable request body\n     */\n    body?: SimpleFormData;\n    path?: never;\n    query?: {\n        /**\n         * This is a reusable parameter\n         */\n        parameter?: string;\n    };\n    url: '/api/v{api-version}/formData';\n};\n\nexport type CallWithDefaultParametersData = {\n    body?: never;\n    path?: never;\n    query?: {\n        /**\n         * This is a simple string with default value\n         */\n        parameterString?: string | null;\n        /**\n         * This is a simple number with default value\n         */\n        parameterNumber?: number | null;\n        /**\n         * This is a simple boolean with default value\n         */\n        parameterBoolean?: boolean | null;\n        /**\n         * This is a simple enum with default value\n         */\n        parameterEnum?: 'Success' | 'Warning' | 'Error';\n        /**\n         * This is a simple model with default value\n         */\n        parameterModel?: ModelWithString | null;\n    };\n    url: '/api/v{api-version}/defaults';\n};\n\nexport type CallWithDefaultOptionalParametersData = {\n    body?: never;\n    path?: never;\n    query?: {\n        /**\n         * This is a simple string that is optional with default value\n         */\n        parameterString?: string;\n        /**\n         * This is a simple number that is optional with default value\n         */\n        parameterNumber?: number;\n        /**\n         * This is a simple boolean that is optional with default value\n         */\n        parameterBoolean?: boolean;\n        /**\n         * This is a simple enum that is optional with default value\n         */\n        parameterEnum?: 'Success' | 'Warning' | 'Error';\n        /**\n         * This is a simple model that is optional with default value\n         */\n        parameterModel?: ModelWithString;\n    };\n    url: '/api/v{api-version}/defaults';\n};\n\nexport type CallToTestOrderOfParamsData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * This is a optional string with default\n         */\n        parameterOptionalStringWithDefault?: string;\n        /**\n         * This is a optional string with empty default\n         */\n        parameterOptionalStringWithEmptyDefault?: string;\n        /**\n         * This is a optional string with no default\n         */\n        parameterOptionalStringWithNoDefault?: string;\n        /**\n         * This is a string with default\n         */\n        parameterStringWithDefault: string;\n        /**\n         * This is a string with empty default\n         */\n        parameterStringWithEmptyDefault: string;\n        /**\n         * This is a string with no default\n         */\n        parameterStringWithNoDefault: string;\n        /**\n         * This is a string that can be null with no default\n         */\n        parameterStringNullableWithNoDefault?: string | null;\n        /**\n         * This is a string that can be null with default\n         */\n        parameterStringNullableWithDefault?: string | null;\n    };\n    url: '/api/v{api-version}/defaults';\n};\n\nexport type DuplicateNameData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/duplicate';\n};\n\nexport type DuplicateName2Data = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/duplicate';\n};\n\nexport type DuplicateName3Data = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/duplicate';\n};\n\nexport type DuplicateName4Data = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/duplicate';\n};\n\nexport type CallWithNoContentResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no-content';\n};\n\nexport type CallWithNoContentResponseResponses = {\n    /**\n     * Success\n     */\n    204: void;\n};\n\nexport type CallWithNoContentResponseResponse = CallWithNoContentResponseResponses[keyof CallWithNoContentResponseResponses];\n\nexport type CallWithResponseAndNoContentResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multiple-tags/response-and-no-content';\n};\n\nexport type CallWithResponseAndNoContentResponseResponses = {\n    /**\n     * Response is a simple number\n     */\n    200: number;\n    /**\n     * Success\n     */\n    204: void;\n};\n\nexport type CallWithResponseAndNoContentResponseResponse = CallWithResponseAndNoContentResponseResponses[keyof CallWithResponseAndNoContentResponseResponses];\n\nexport type DummyAData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multiple-tags/a';\n};\n\nexport type DummyAResponses = {\n    200: _400;\n};\n\nexport type DummyAResponse = DummyAResponses[keyof DummyAResponses];\n\nexport type DummyBData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multiple-tags/b';\n};\n\nexport type DummyBResponses = {\n    /**\n     * Success\n     */\n    204: void;\n};\n\nexport type DummyBResponse = DummyBResponses[keyof DummyBResponses];\n\nexport type CallWithResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/response';\n};\n\nexport type CallWithResponseResponses = {\n    default: Import;\n};\n\nexport type CallWithResponseResponse = CallWithResponseResponses[keyof CallWithResponseResponses];\n\nexport type CallWithDuplicateResponsesData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/response';\n};\n\nexport type CallWithDuplicateResponsesErrors = {\n    /**\n     * Message for 500 error\n     */\n    500: ModelWithStringError;\n    /**\n     * Message for 501 error\n     */\n    501: ModelWithStringError;\n    /**\n     * Message for 502 error\n     */\n    502: ModelWithStringError;\n    /**\n     * Message for 4XX errors\n     */\n    '4XX': DictionaryWithArray;\n    /**\n     * Default error response\n     */\n    default: ModelWithBoolean;\n};\n\nexport type CallWithDuplicateResponsesError = CallWithDuplicateResponsesErrors[keyof CallWithDuplicateResponsesErrors];\n\nexport type CallWithDuplicateResponsesResponses = {\n    /**\n     * Message for 200 response\n     */\n    200: ModelWithBoolean & ModelWithInteger;\n    /**\n     * Message for 201 response\n     */\n    201: ModelWithString;\n    /**\n     * Message for 202 response\n     */\n    202: ModelWithString;\n};\n\nexport type CallWithDuplicateResponsesResponse = CallWithDuplicateResponsesResponses[keyof CallWithDuplicateResponsesResponses];\n\nexport type CallWithResponsesData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/response';\n};\n\nexport type CallWithResponsesErrors = {\n    /**\n     * Message for 500 error\n     */\n    500: ModelWithStringError;\n    /**\n     * Message for 501 error\n     */\n    501: ModelWithStringError;\n    /**\n     * Message for 502 error\n     */\n    502: ModelWithStringError;\n    /**\n     * Message for default response\n     */\n    default: ModelWithStringError;\n};\n\nexport type CallWithResponsesError = CallWithResponsesErrors[keyof CallWithResponsesErrors];\n\nexport type CallWithResponsesResponses = {\n    /**\n     * Message for 200 response\n     */\n    200: {\n        readonly '@namespace.string'?: string;\n        readonly '@namespace.integer'?: number;\n        readonly value?: Array<ModelWithString>;\n    };\n    /**\n     * Message for 201 response\n     */\n    201: ModelThatExtends;\n    /**\n     * Message for 202 response\n     */\n    202: ModelThatExtendsExtends;\n};\n\nexport type CallWithResponsesResponse = CallWithResponsesResponses[keyof CallWithResponsesResponses];\n\nexport type CollectionFormatData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * This is an array parameter that is sent as csv format (comma-separated values)\n         */\n        parameterArrayCSV: Array<string> | null;\n        /**\n         * This is an array parameter that is sent as ssv format (space-separated values)\n         */\n        parameterArraySSV: Array<string> | null;\n        /**\n         * This is an array parameter that is sent as tsv format (tab-separated values)\n         */\n        parameterArrayTSV: Array<string> | null;\n        /**\n         * This is an array parameter that is sent as pipes format (pipe-separated values)\n         */\n        parameterArrayPipes: Array<string> | null;\n        /**\n         * This is an array parameter that is sent as multi format (multiple parameter instances)\n         */\n        parameterArrayMulti: Array<string> | null;\n    };\n    url: '/api/v{api-version}/collectionFormat';\n};\n\nexport type TypesData = {\n    body?: never;\n    path?: {\n        /**\n         * This is a number parameter\n         */\n        id?: number;\n    };\n    query: {\n        /**\n         * This is a number parameter\n         */\n        parameterNumber: number;\n        /**\n         * This is a string parameter\n         */\n        parameterString: string | null;\n        /**\n         * This is a boolean parameter\n         */\n        parameterBoolean: boolean | null;\n        /**\n         * This is an object parameter\n         */\n        parameterObject: {\n            [key: string]: unknown;\n        } | null;\n        /**\n         * This is an array parameter\n         */\n        parameterArray: Array<string> | null;\n        /**\n         * This is a dictionary parameter\n         */\n        parameterDictionary: {\n            [key: string]: unknown;\n        } | null;\n        /**\n         * This is an enum parameter\n         */\n        parameterEnum: 'Success' | 'Warning' | 'Error' | null;\n    };\n    url: '/api/v{api-version}/types';\n};\n\nexport type TypesResponses = {\n    /**\n     * Response is a simple number\n     */\n    200: number;\n    /**\n     * Response is a simple string\n     */\n    201: string;\n    /**\n     * Response is a simple boolean\n     */\n    202: boolean;\n    /**\n     * Response is a simple object\n     */\n    203: {\n        [key: string]: unknown;\n    };\n};\n\nexport type TypesResponse = TypesResponses[keyof TypesResponses];\n\nexport type UploadFileData = {\n    body: Blob | File;\n    path: {\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string | null;\n    };\n    query?: never;\n    url: '/api/v{api-version}/upload';\n};\n\nexport type UploadFileResponses = {\n    200: boolean;\n};\n\nexport type UploadFileResponse = UploadFileResponses[keyof UploadFileResponses];\n\nexport type FileResponseData = {\n    body?: never;\n    path: {\n        id: string;\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string;\n    };\n    query?: never;\n    url: '/api/v{api-version}/file/{id}';\n};\n\nexport type FileResponseResponses = {\n    /**\n     * Success\n     */\n    200: Blob | File;\n};\n\nexport type FileResponseResponse = FileResponseResponses[keyof FileResponseResponses];\n\nexport type ComplexTypesData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * Parameter containing object\n         */\n        parameterObject: {\n            first?: {\n                second?: {\n                    third?: string;\n                };\n            };\n        };\n        /**\n         * Parameter containing reference\n         */\n        parameterReference: ModelWithString;\n    };\n    url: '/api/v{api-version}/complex';\n};\n\nexport type ComplexTypesErrors = {\n    /**\n     * 400 `server` error\n     */\n    400: unknown;\n    /**\n     * 500 server error\n     */\n    500: unknown;\n};\n\nexport type ComplexTypesResponses = {\n    /**\n     * Successful response\n     */\n    200: Array<ModelWithString>;\n};\n\nexport type ComplexTypesResponse = ComplexTypesResponses[keyof ComplexTypesResponses];\n\nexport type MultipartResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multipart';\n};\n\nexport type MultipartResponseResponses = {\n    /**\n     * OK\n     */\n    200: {\n        file?: Blob | File;\n        metadata?: {\n            foo?: string;\n            bar?: string;\n        };\n    };\n};\n\nexport type MultipartResponseResponse = MultipartResponseResponses[keyof MultipartResponseResponses];\n\nexport type MultipartRequestData = {\n    body?: {\n        content?: Blob | File;\n        data?: ModelWithString | null;\n    };\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multipart';\n};\n\nexport type ComplexParamsData = {\n    body?: {\n        readonly key: string | null;\n        name: string | null;\n        enabled?: boolean;\n        type: 'Monkey' | 'Horse' | 'Bird';\n        listOfModels?: Array<ModelWithString> | null;\n        listOfStrings?: Array<string> | null;\n        parameters: ModelWithString | ModelWithEnum | ModelWithArray | ModelWithDictionary;\n        readonly user?: {\n            readonly id?: number;\n            readonly name?: string | null;\n        };\n    };\n    path: {\n        id: number;\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string;\n    };\n    query?: never;\n    url: '/api/v{api-version}/complex/{id}';\n};\n\nexport type ComplexParamsResponses = {\n    /**\n     * Success\n     */\n    200: ModelWithString;\n};\n\nexport type ComplexParamsResponse = ComplexParamsResponses[keyof ComplexParamsResponses];\n\nexport type CallWithResultFromHeaderData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/header';\n};\n\nexport type CallWithResultFromHeaderErrors = {\n    /**\n     * 400 server error\n     */\n    400: unknown;\n    /**\n     * 500 server error\n     */\n    500: unknown;\n};\n\nexport type CallWithResultFromHeaderResponses = {\n    /**\n     * Successful response\n     */\n    200: unknown;\n};\n\nexport type TestErrorCodeData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * Status code to return\n         */\n        status: number;\n    };\n    url: '/api/v{api-version}/error';\n};\n\nexport type TestErrorCodeErrors = {\n    /**\n     * Custom message: Internal Server Error\n     */\n    500: unknown;\n    /**\n     * Custom message: Not Implemented\n     */\n    501: unknown;\n    /**\n     * Custom message: Bad Gateway\n     */\n    502: unknown;\n    /**\n     * Custom message: Service Unavailable\n     */\n    503: unknown;\n};\n\nexport type TestErrorCodeResponses = {\n    /**\n     * Custom message: Successful response\n     */\n    200: unknown;\n};\n\nexport type NonAsciiæøåÆøÅöôêÊ字符串Data = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * Dummy input param\n         */\n        nonAsciiParamæøåÆØÅöôêÊ: number;\n    };\n    url: '/api/v{api-version}/non-ascii-æøåÆØÅöôêÊ字符串';\n};\n\nexport type NonAsciiæøåÆøÅöôêÊ字符串Responses = {\n    /**\n     * Successful response\n     */\n    200: Array<NonAsciiStringæøåÆøÅöôêÊ字符串>;\n};\n\nexport type NonAsciiæøåÆøÅöôêÊ字符串Response = NonAsciiæøåÆøÅöôêÊ字符串Responses[keyof NonAsciiæøåÆøÅöôêÊ字符串Responses];\n\nexport type PutWithFormUrlEncodedData = {\n    body: ArrayWithStrings;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/non-ascii-æøåÆØÅöôêÊ字符串';\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-nuxt/clean-false/client/client.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport { useAsyncData, useFetch, useLazyAsyncData, useLazyFetch } from 'nuxt/app';\nimport { reactive, ref, toValue, watch } from 'vue';\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 } from './types.gen';\nimport {\n  buildUrl,\n  createConfig,\n  executeFetchFn,\n  mergeConfigs,\n  mergeHeaders,\n  mergeInterceptors,\n  serializeBody,\n  setAuthParams,\n  unwrapRefs,\n} from './utils.gen';\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 beforeRequest = async (options: RequestOptions) => {\n    const opts = {\n      ..._config,\n      ...options,\n      $fetch: options.$fetch ?? _config.$fetch ?? $fetch,\n      headers: mergeHeaders(_config.headers, options.headers),\n      onRequest: mergeInterceptors(_config.onRequest, options.onRequest),\n      onResponse: mergeInterceptors(_config.onResponse, options.onResponse),\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    const url = buildUrl(opts);\n\n    return { opts, url };\n  };\n\n  const request: Client['request'] = ({ asyncDataOptions, composable = '$fetch', ...options }) => {\n    const key = options.key;\n    const opts = {\n      ..._config,\n      ...options,\n      $fetch: options.$fetch ?? _config.$fetch ?? $fetch,\n      headers: mergeHeaders(_config.headers, options.headers),\n      onRequest: mergeInterceptors(_config.onRequest, options.onRequest),\n      onResponse: mergeInterceptors(_config.onResponse, options.onResponse),\n    };\n\n    const { requestValidator, responseTransformer, responseValidator, security } = opts;\n    if (requestValidator || security) {\n      // auth must happen in interceptors otherwise we'd need to require\n      // asyncContext enabled\n      // https://nuxt.com/docs/guide/going-further/experimental-features#asynccontext\n      opts.onRequest = [\n        async ({ options }) => {\n          if (security) {\n            await setAuthParams({\n              auth: opts.auth,\n              headers: options.headers,\n              query: options.query,\n              security,\n            });\n          }\n\n          if (requestValidator) {\n            await requestValidator({\n              ...options,\n              // @ts-expect-error\n              body: options.rawBody,\n            });\n          }\n        },\n        ...opts.onRequest,\n      ];\n    }\n\n    if (responseTransformer || responseValidator) {\n      opts.onResponse = [\n        ...opts.onResponse,\n        async ({ options, response }) => {\n          if (options.responseType && options.responseType !== 'json') {\n            return;\n          }\n\n          if (!response.ok) {\n            return;\n          }\n\n          if (responseValidator) {\n            await responseValidator(response._data);\n          }\n\n          if (responseTransformer) {\n            response._data = await responseTransformer(response._data);\n          }\n        },\n      ];\n    }\n\n    // remove Content-Type header if body is empty to avoid sending invalid requests\n    if (opts.body === undefined || opts.body === '') {\n      opts.headers.delete('Content-Type');\n    }\n\n    const fetchFn = opts.$fetch;\n\n    if (composable === '$fetch') {\n      return executeFetchFn(\n        // @ts-expect-error\n        opts,\n        fetchFn,\n      );\n    }\n\n    if (composable === 'useFetch' || composable === 'useLazyFetch') {\n      opts.rawBody = opts.body;\n      const bodyParams = reactive({\n        body: opts.body,\n        bodySerializer: opts.bodySerializer,\n      });\n      const body = ref(serializeBody({ ...opts, body: toValue(opts.body) }));\n      opts.body = body;\n      watch(bodyParams, (changed) => {\n        body.value = serializeBody(changed);\n      });\n      return composable === 'useLazyFetch'\n        ? useLazyFetch(() => buildUrl(opts), { ...opts, ...asyncDataOptions })\n        : useFetch(() => buildUrl(opts), { ...opts, ...asyncDataOptions });\n    }\n\n    const handler: any = () =>\n      executeFetchFn(\n        // @ts-expect-error\n        opts,\n        fetchFn,\n      );\n\n    if (composable === 'useAsyncData') {\n      return key\n        ? useAsyncData(key, handler, asyncDataOptions)\n        : useAsyncData(handler, asyncDataOptions);\n    }\n\n    if (composable === 'useLazyAsyncData') {\n      return key\n        ? useLazyAsyncData(key, handler, asyncDataOptions)\n        : useLazyAsyncData(handler, asyncDataOptions);\n    }\n\n    return undefined as any;\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      ...unwrapRefs(opts),\n      body: opts.body as BodyInit | null | undefined,\n      method,\n      onRequest: undefined,\n      serializedBody: getValidRequestBody(opts) as BodyInit | null | undefined,\n      signal: unwrapRefs(opts.signal) as AbortSignal,\n      url,\n    });\n  };\n\n  const _buildUrl: Client['buildUrl'] = (options) =>\n    buildUrl({ ..._config, ...options } as typeof 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    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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-nuxt/clean-false/client/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type { Auth } from '../core/auth.gen';\nexport type { QuerySerializerOptions } from '../core/bodySerializer.gen';\nexport {\n  formDataBodySerializer,\n  jsonBodySerializer,\n  urlSearchParamsBodySerializer,\n} from '../core/bodySerializer.gen';\nexport { buildClientParams } from '../core/params.gen';\nexport { serializeQueryKeyValue } from '../core/queryKeySerializer.gen';\nexport { createClient } from './client.gen';\nexport type {\n  Client,\n  ClientOptions,\n  Composable,\n  Config,\n  CreateClientConfig,\n  Options,\n  RequestOptions,\n  RequestResult,\n  TDataShape,\n} from './types.gen';\nexport { createConfig } from './utils.gen';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-nuxt/clean-false/client/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type {\n  AsyncDataOptions,\n  useAsyncData,\n  useFetch,\n  UseFetchOptions,\n  useLazyAsyncData,\n  useLazyFetch,\n} from 'nuxt/app';\nimport type { Ref } from 'vue';\n\nimport type { Auth } from '../core/auth.gen';\nimport type { QuerySerializerOptions } from '../core/bodySerializer.gen';\nimport type {\n  ServerSentEventsOptions,\n  ServerSentEventsResult,\n} from '../core/serverSentEvents.gen';\nimport type { Client as CoreClient, Config as CoreConfig } from '../core/types.gen';\n\nexport type ArraySeparatorStyle = ArrayStyle | MatrixStyle;\ntype ArrayStyle = 'form' | 'spaceDelimited' | 'pipeDelimited';\ntype MatrixStyle = 'label' | 'matrix' | 'simple';\nexport type ObjectSeparatorStyle = ObjectStyle | MatrixStyle;\ntype ObjectStyle = 'form' | 'deepObject';\n\nexport type QuerySerializer = (query: Parameters<Client['buildUrl']>[0]['query']) => string;\n\ntype WithRefs<TData> = {\n  [K in keyof TData]: NonNullable<TData[K]> extends object\n    ? WithRefs<NonNullable<TData[K]>> | Ref<NonNullable<TData[K]>> | Extract<TData[K], null>\n    : NonNullable<TData[K]> | Ref<NonNullable<TData[K]>> | Extract<TData[K], null>;\n};\n\n// copied from Nuxt\nexport type KeysOf<T> = Array<T extends T ? (keyof T extends string ? keyof T : never) : never>;\n\nexport interface Config<T extends ClientOptions = ClientOptions>\n  extends\n    Omit<FetchOptions<unknown>, 'baseURL' | 'body' | 'headers' | 'method' | 'query'>,\n    WithRefs<Pick<FetchOptions<unknown>, 'query'>>,\n    Omit<CoreConfig, 'querySerializer'> {\n  /**\n   * Base URL for all requests made by this client.\n   */\n  baseURL?: T['baseURL'];\n  /**\n   * A function for serializing request query parameters. By default, arrays\n   * will be exploded in form style, objects will be exploded in deepObject\n   * style, and reserved characters are percent-encoded.\n   *\n   * {@link https://swagger.io/docs/specification/serialization/#query View examples}\n   */\n  querySerializer?: QuerySerializer | QuerySerializerOptions;\n}\n\nexport interface RequestOptions<\n  TComposable extends Composable = '$fetch',\n  ResT = unknown,\n  DefaultT = undefined,\n  Url extends string = string,\n>\n  extends\n    Config,\n    WithRefs<{\n      path?: FetchOptions<unknown>['query'];\n      query?: FetchOptions<unknown>['query'];\n    }>,\n    Pick<\n      ServerSentEventsOptions<ResT>,\n      | 'onSseError'\n      | 'onSseEvent'\n      | 'sseDefaultRetryDelay'\n      | 'sseMaxRetryAttempts'\n      | 'sseMaxRetryDelay'\n    > {\n  asyncDataOptions?: AsyncDataOptions<ResT, ResT, KeysOf<ResT>, DefaultT>;\n  /**\n   * Any body that you want to add to your request.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/fetch#body}\n   */\n  body?: NonNullable<unknown> | Ref<NonNullable<unknown>> | null;\n  composable?: TComposable;\n  key?: string;\n  rawBody?: NonNullable<unknown> | Ref<NonNullable<unknown>> | null;\n  /**\n   * Security mechanism(s) to use for the request.\n   */\n  security?: ReadonlyArray<Auth>;\n  url: Url;\n}\n\nexport type RequestResult<\n  TComposable extends Composable,\n  ResT,\n  TError,\n> = TComposable extends '$fetch'\n  ? ReturnType<typeof $fetch<ResT>>\n  : TComposable extends 'useAsyncData'\n    ? ReturnType<typeof useAsyncData<ResT | null, TError>>\n    : TComposable extends 'useFetch'\n      ? ReturnType<typeof useFetch<ResT | null, TError>>\n      : TComposable extends 'useLazyAsyncData'\n        ? ReturnType<typeof useLazyAsyncData<ResT | null, TError>>\n        : TComposable extends 'useLazyFetch'\n          ? ReturnType<typeof useLazyFetch<ResT | null, TError>>\n          : never;\n\nexport interface ClientOptions {\n  baseURL?: string;\n}\n\ntype MethodFn = <\n  TComposable extends Composable = '$fetch',\n  ResT = unknown,\n  TError = unknown,\n  DefaultT = undefined,\n>(\n  options: Omit<RequestOptions<TComposable, ResT, DefaultT>, 'method'>,\n) => RequestResult<TComposable, ResT, TError>;\n\ntype SseFn = <\n  TComposable extends Composable = '$fetch',\n  ResT = unknown,\n  TError = unknown,\n  DefaultT = undefined,\n>(\n  options: Omit<RequestOptions<TComposable, ResT, DefaultT>, 'method'>,\n) => Promise<ServerSentEventsResult<RequestResult<TComposable, ResT, TError>>>;\n\ntype RequestFn = <\n  TComposable extends Composable = '$fetch',\n  ResT = unknown,\n  TError = unknown,\n  DefaultT = undefined,\n>(\n  options: Omit<RequestOptions<TComposable, ResT, DefaultT>, 'method'> &\n    Pick<Required<RequestOptions<TComposable, ResT, DefaultT>>, 'method'>,\n) => RequestResult<TComposable, ResT, TError>;\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 = ClientOptions> = (\n  override?: Config<ClientOptions & T>,\n) => Config<Required<ClientOptions> & T>;\n\nexport interface TDataShape {\n  body?: unknown;\n  headers?: unknown;\n  path?: FetchOptions<unknown>['query'];\n  query?: FetchOptions<unknown>['query'];\n  url: string;\n}\n\nexport type BuildUrlOptions<\n  TData extends Omit<TDataShape, 'headers'> = Omit<TDataShape, 'headers'>,\n> = Pick<WithRefs<TData>, 'path' | 'query'> &\n  Pick<TData, 'url'> &\n  Pick<Options<'$fetch', TData>, 'baseURL' | 'querySerializer'>;\n\ntype BuildUrlFn = <TData extends Omit<TDataShape, 'headers'>>(\n  options: BuildUrlOptions<TData>,\n) => string;\n\nexport type Client = CoreClient<RequestFn, Config, MethodFn, BuildUrlFn, SseFn>;\n\ntype OmitKeys<T, K> = Pick<T, Exclude<keyof T, K>>;\n\nexport type Options<\n  TComposable extends Composable = '$fetch',\n  TData extends TDataShape = TDataShape,\n  ResT = unknown,\n  DefaultT = undefined,\n> = OmitKeys<RequestOptions<TComposable, ResT, DefaultT>, 'body' | 'path' | 'query' | 'url'> &\n  ([TData] extends [never] ? unknown : WithRefs<Omit<TData, 'url'>>);\n\ntype FetchOptions<TData> = Omit<UseFetchOptions<TData, TData>, keyof AsyncDataOptions<TData>>;\n\nexport type Composable =\n  | '$fetch'\n  | 'useAsyncData'\n  | 'useFetch'\n  | 'useLazyAsyncData'\n  | 'useLazyFetch';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-nuxt/clean-false/client/utils.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { ComputedRef, Ref } from 'vue';\nimport { isRef, toValue, unref } from 'vue';\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 type {\n  ArraySeparatorStyle,\n  BuildUrlOptions,\n  Client,\n  ClientOptions,\n  Config,\n  QuerySerializer,\n  RequestOptions,\n} from './types.gen';\n\ntype PathSerializer = Pick<Required<BuildUrlOptions>, 'path' | 'url'>;\n\nconst PATH_PARAM_RE = /\\{[^{}]+\\}/g;\n\ntype MaybeArray<T> = T | T[];\n\nconst 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 = toValue((toValue(path) as Record<string, unknown> | undefined)?.[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 createQuerySerializer = <T = unknown>({\n  parameters = {},\n  ...args\n}: QuerySerializerOptions = {}) => {\n  const querySerializer = (queryParams: T) => {\n    const search: string[] = [];\n    const qParams = toValue(queryParams);\n    if (qParams && typeof qParams === 'object') {\n      for (const name in qParams) {\n        const value = toValue(qParams[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\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    (toValue(options.query) as Record<string, unknown> | undefined)?.[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    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        const queryValue = toValue(options.query) as Record<string, unknown> | undefined;\n        if (queryValue) {\n          queryValue[name] = token;\n        }\n        break;\n      }\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  const url = 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  return url;\n};\n\nexport const getUrl = ({\n  baseUrl,\n  path,\n  query,\n  querySerializer,\n  url: _url,\n}: Pick<BuildUrlOptions, 'path' | 'query' | 'url'> & {\n  baseUrl?: string;\n  querySerializer: QuerySerializer;\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 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 || typeof header !== 'object') {\n      continue;\n    }\n\n    let h: unknown = header;\n    if (isRef(h)) {\n      h = unref(h);\n    }\n\n    const iterator =\n      h instanceof Headers ? headersEntries(h) : Object.entries(h as Record<string, unknown>);\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, unwrapRefs(v) as string);\n        }\n      } else if (value !== undefined) {\n        const v = unwrapRefs(value);\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(key, typeof v === 'object' ? JSON.stringify(v) : (v as string));\n      }\n    }\n  }\n  return mergedHeaders;\n};\n\nexport const mergeInterceptors = <T>(...args: Array<MaybeArray<T>>): Array<T> =>\n  args.reduce<Array<T>>((acc, item) => {\n    if (typeof item === 'function') {\n      acc.push(item);\n    } else if (Array.isArray(item)) {\n      return acc.concat(item);\n    }\n    return acc;\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  querySerializer: defaultQuerySerializer,\n  ...override,\n});\n\ntype UnwrapRefs<T> =\n  T extends Ref<infer V>\n    ? V\n    : T extends ComputedRef<infer V>\n      ? V\n      : T extends Record<string, unknown> // this doesn't handle functions well\n        ? { [K in keyof T]: UnwrapRefs<T[K]> }\n        : T;\n\nexport const unwrapRefs = <T>(value: T): UnwrapRefs<T> => {\n  if (value === null || typeof value !== 'object' || value instanceof Headers) {\n    return (isRef(value) ? unref(value) : value) as UnwrapRefs<T>;\n  }\n\n  if (\n    value instanceof Blob ||\n    value instanceof FormData ||\n    value instanceof ReadableStream ||\n    value instanceof AbortSignal\n  ) {\n    return value as UnwrapRefs<T>;\n  }\n\n  if (Array.isArray(value)) {\n    return value.map((item) => unwrapRefs(item)) as UnwrapRefs<T>;\n  }\n\n  if (isRef(value)) {\n    return unwrapRefs(unref(value) as T);\n  }\n\n  // unwrap into new object to avoid modifying the source\n  const result: Record<string, unknown> = {};\n  for (const key in value) {\n    result[key] = unwrapRefs(value[key] as T);\n  }\n  return result as UnwrapRefs<T>;\n};\n\nexport const serializeBody = (\n  opts: Pick<Parameters<Client['request']>[0], 'body' | 'bodySerializer'>,\n) => {\n  if (opts.body && opts.bodySerializer) {\n    return opts.bodySerializer(opts.body);\n  }\n  return opts.body;\n};\n\nexport const executeFetchFn = (\n  opts: Omit<Parameters<Client['request']>[0], 'composable'>,\n  fetchFn: Required<Config>['$fetch'],\n) => {\n  const unwrappedOpts = unwrapRefs(opts);\n  unwrappedOpts.rawBody = unwrappedOpts.body;\n  unwrappedOpts.body = serializeBody(unwrappedOpts);\n  return fetchFn(\n    buildUrl(opts),\n    // @ts-expect-error\n    unwrappedOpts,\n  );\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-nuxt/clean-false/client.gen.ts",
    "content": "// 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: 'http://localhost:3000/base' }));\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-nuxt/clean-false/core/auth.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-nuxt/clean-false/core/bodySerializer.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-nuxt/clean-false/core/params.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-nuxt/clean-false/core/pathSerializer.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-nuxt/clean-false/core/queryKeySerializer.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\n/**\n * JSON-friendly union that mirrors what Pinia Colada can hash.\n */\nexport type JsonValue =\n  | null\n  | string\n  | number\n  | boolean\n  | JsonValue[]\n  | { [key: string]: JsonValue };\n\n/**\n * Replacer that converts non-JSON values (bigint, Date, etc.) to safe substitutes.\n */\nexport const queryKeyJsonReplacer = (_key: string, value: unknown) => {\n  if (value === undefined || typeof value === 'function' || typeof value === 'symbol') {\n    return undefined;\n  }\n  if (typeof value === 'bigint') {\n    return value.toString();\n  }\n  if (value instanceof Date) {\n    return value.toISOString();\n  }\n  return value;\n};\n\n/**\n * Safely stringifies a value and parses it back into a JsonValue.\n */\nexport const stringifyToJsonValue = (input: unknown): JsonValue | undefined => {\n  try {\n    const json = JSON.stringify(input, queryKeyJsonReplacer);\n    if (json === undefined) {\n      return undefined;\n    }\n    return JSON.parse(json) as JsonValue;\n  } catch {\n    return undefined;\n  }\n};\n\n/**\n * Detects plain objects (including objects with a null prototype).\n */\nconst isPlainObject = (value: unknown): value is Record<string, unknown> => {\n  if (value === null || typeof value !== 'object') {\n    return false;\n  }\n  const prototype = Object.getPrototypeOf(value as object);\n  return prototype === Object.prototype || prototype === null;\n};\n\n/**\n * Turns URLSearchParams into a sorted JSON object for deterministic keys.\n */\nconst serializeSearchParams = (params: URLSearchParams): JsonValue => {\n  const entries = Array.from(params.entries()).sort(([a], [b]) => a.localeCompare(b));\n  const result: Record<string, JsonValue> = {};\n\n  for (const [key, value] of entries) {\n    const existing = result[key];\n    if (existing === undefined) {\n      result[key] = value;\n      continue;\n    }\n\n    if (Array.isArray(existing)) {\n      (existing as string[]).push(value);\n    } else {\n      result[key] = [existing, value];\n    }\n  }\n\n  return result;\n};\n\n/**\n * Normalizes any accepted value into a JSON-friendly shape for query keys.\n */\nexport const serializeQueryKeyValue = (value: unknown): JsonValue | undefined => {\n  if (value === null) {\n    return null;\n  }\n\n  if (typeof value === 'string' || typeof value === 'number' || typeof value === 'boolean') {\n    return value;\n  }\n\n  if (value === undefined || typeof value === 'function' || typeof value === 'symbol') {\n    return undefined;\n  }\n\n  if (typeof value === 'bigint') {\n    return value.toString();\n  }\n\n  if (value instanceof Date) {\n    return value.toISOString();\n  }\n\n  if (Array.isArray(value)) {\n    return stringifyToJsonValue(value);\n  }\n\n  if (typeof URLSearchParams !== 'undefined' && value instanceof URLSearchParams) {\n    return serializeSearchParams(value);\n  }\n\n  if (isPlainObject(value)) {\n    return stringifyToJsonValue(value);\n  }\n\n  return undefined;\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-nuxt/clean-false/core/serverSentEvents.gen.ts",
    "content": "// 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 const 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            // Normalize line endings: CRLF -> LF, then CR -> LF\n            buffer = buffer.replace(/\\r\\n/g, '\\n').replace(/\\r/g, '\\n');\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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-nuxt/clean-false/core/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { Auth, AuthToken } from './auth.gen';\nimport type { BodySerializer, QuerySerializer, QuerySerializerOptions } from './bodySerializer.gen';\n\nexport type HttpMethod =\n  | 'connect'\n  | 'delete'\n  | 'get'\n  | 'head'\n  | 'options'\n  | 'patch'\n  | 'post'\n  | 'put'\n  | 'trace';\n\nexport type Client<\n  RequestFn = never,\n  Config = unknown,\n  MethodFn = never,\n  BuildUrlFn = never,\n  SseFn = never,\n> = {\n  /**\n   * Returns the final request URL.\n   */\n  buildUrl: BuildUrlFn;\n  getConfig: () => Config;\n  request: RequestFn;\n  setConfig: (config: Config) => Config;\n} & {\n  [K in HttpMethod]: MethodFn;\n} & ([SseFn] extends [never] ? { sse?: never } : { sse: { [K in HttpMethod]: SseFn } });\n\nexport interface Config {\n  /**\n   * Auth token or a function returning auth token. The resolved value will be\n   * added to the request payload as defined by its `security` array.\n   */\n  auth?: ((auth: Auth) => Promise<AuthToken> | AuthToken) | AuthToken;\n  /**\n   * A function for serializing request body parameter. By default,\n   * {@link JSON.stringify()} will be used.\n   */\n  bodySerializer?: BodySerializer | null;\n  /**\n   * An object containing any HTTP headers that you want to pre-populate your\n   * `Headers` object with.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/Headers/Headers#init See more}\n   */\n  headers?:\n    | RequestInit['headers']\n    | Record<\n        string,\n        string | number | boolean | (string | number | boolean)[] | null | undefined | unknown\n      >;\n  /**\n   * The request method.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/fetch#method See more}\n   */\n  method?: Uppercase<HttpMethod>;\n  /**\n   * A function for serializing request query parameters. By default, arrays\n   * will be exploded in form style, objects will be exploded in deepObject\n   * style, and reserved characters are percent-encoded.\n   *\n   * This method will have no effect if the native `paramsSerializer()` Axios\n   * API function is used.\n   *\n   * {@link https://swagger.io/docs/specification/serialization/#query View examples}\n   */\n  querySerializer?: QuerySerializer | QuerySerializerOptions;\n  /**\n   * A function validating request data. This is useful if you want to ensure\n   * the request conforms to the desired shape, so it can be safely sent to\n   * the server.\n   */\n  requestValidator?: (data: unknown) => Promise<unknown>;\n  /**\n   * A function transforming response data before it's returned. This is useful\n   * for post-processing data, e.g. converting ISO strings into Date objects.\n   */\n  responseTransformer?: (data: unknown) => Promise<unknown>;\n  /**\n   * A function validating response data. This is useful if you want to ensure\n   * the response conforms to the desired shape, so it can be safely passed to\n   * the transformers and returned to the user.\n   */\n  responseValidator?: (data: unknown) => Promise<unknown>;\n}\n\ntype IsExactlyNeverOrNeverUndefined<T> = [T] extends [never]\n  ? true\n  : [T] extends [never | undefined]\n    ? [undefined] extends [T]\n      ? false\n      : true\n    : false;\n\nexport type OmitNever<T extends Record<string, unknown>> = {\n  [K in keyof T as IsExactlyNeverOrNeverUndefined<T[K]> extends true ? never : K]: T[K];\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-nuxt/clean-false/core/utils.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-nuxt/clean-false/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport { apiVVersionODataControllerCount, callToTestOrderOfParams, callWithDefaultOptionalParameters, callWithDefaultParameters, callWithDescriptions, callWithDuplicateResponses, callWithNoContentResponse, callWithParameters, callWithResponse, callWithResponseAndNoContentResponse, callWithResponses, callWithResultFromHeader, callWithWeirdParameterNames, collectionFormat, complexParams, complexTypes, deleteCallWithoutParametersAndResponse, deleteFoo, deprecatedCall, dummyA, dummyB, duplicateName, duplicateName2, duplicateName3, duplicateName4, export_, fileResponse, fooWow, getApiVbyApiVersionSimpleOperation, getCallWithOptionalParam, getCallWithoutParametersAndResponse, headCallWithoutParametersAndResponse, import_, multipartRequest, multipartResponse, nonAsciiæøåÆøÅöôêÊ字符串, type Options, optionsCallWithoutParametersAndResponse, patchApiVbyApiVersionNoTag, patchCallWithoutParametersAndResponse, postApiVbyApiVersionFormData, postApiVbyApiVersionRequestBody, postCallWithOptionalParam, postCallWithoutParametersAndResponse, putCallWithoutParametersAndResponse, putWithFormUrlEncoded, testErrorCode, types, uploadFile } from './sdk.gen';\nexport type { _3eNum1Период, _400, AdditionalPropertiesIntegerIssue, AdditionalPropertiesUnknownIssue, AdditionalPropertiesUnknownIssue2, AdditionalPropertiesUnknownIssue3, AdditionalPropertiesUnknownIssueWritable, AnyOfAnyAndNull, AnyOfArrays, ApiVVersionODataControllerCountData, ApiVVersionODataControllerCountResponse, ApiVVersionODataControllerCountResponses, ArrayWithAnyOfProperties, ArrayWithArray, ArrayWithBooleans, ArrayWithNumbers, ArrayWithProperties, ArrayWithReferences, ArrayWithStrings, CallToTestOrderOfParamsData, CallWithDefaultOptionalParametersData, CallWithDefaultParametersData, CallWithDescriptionsData, CallWithDuplicateResponsesData, CallWithDuplicateResponsesError, CallWithDuplicateResponsesErrors, CallWithDuplicateResponsesResponse, CallWithDuplicateResponsesResponses, CallWithNoContentResponseData, CallWithNoContentResponseResponse, CallWithNoContentResponseResponses, CallWithParametersData, CallWithResponseAndNoContentResponseData, CallWithResponseAndNoContentResponseResponse, CallWithResponseAndNoContentResponseResponses, CallWithResponseData, CallWithResponseResponse, CallWithResponseResponses, CallWithResponsesData, CallWithResponsesError, CallWithResponsesErrors, CallWithResponsesResponse, CallWithResponsesResponses, CallWithResultFromHeaderData, CallWithResultFromHeaderErrors, CallWithResultFromHeaderResponses, CallWithWeirdParameterNamesData, CamelCaseCommentWithBreaks, CharactersInDescription, ClientOptions, CollectionFormatData, CommentWithBackticks, CommentWithBackticksAndQuotes, CommentWithBreaks, CommentWithExpressionPlaceholders, CommentWithQuotes, CommentWithReservedCharacters, CommentWithSlashes, ComplexParamsData, ComplexParamsResponse, ComplexParamsResponses, ComplexTypesData, ComplexTypesErrors, ComplexTypesResponse, ComplexTypesResponses, CompositionBaseModel, CompositionExtendedModel, CompositionWithAllOfAndNullable, CompositionWithAnyOf, CompositionWithAnyOfAndNullable, CompositionWithAnyOfAnonymous, CompositionWithNestedAnyAndTypeNull, CompositionWithNestedAnyOfAndNull, CompositionWithOneOf, CompositionWithOneOfAndComplexArrayDictionary, CompositionWithOneOfAndNullable, CompositionWithOneOfAndProperties, CompositionWithOneOfAndSimpleArrayDictionary, CompositionWithOneOfAndSimpleDictionary, CompositionWithOneOfAnonymous, CompositionWithOneOfDiscriminator, ConstValue, Default, DeleteCallWithoutParametersAndResponseData, DeleteFooData, DeleteFooData2, DeleteFooData3, DeprecatedCallData, DeprecatedModel, DictionaryWithArray, DictionaryWithDictionary, DictionaryWithProperties, DictionaryWithPropertiesAndAdditionalProperties, DictionaryWithReference, DictionaryWithString, DummyAData, DummyAResponse, DummyAResponses, DummyBData, DummyBResponse, DummyBResponses, DuplicateName2Data, DuplicateName3Data, DuplicateName4Data, DuplicateNameData, EnumFromDescription, EnumWithExtensions, EnumWithNumbers, EnumWithReplacedCharacters, EnumWithStrings, EnumWithXEnumNames, ExportData, ExternalRefA, ExternalRefB, ExternalSharedModel, File, FileResponseData, FileResponseResponse, FileResponseResponses, FileWritable, FooWowData, FooWowResponses, FreeFormObjectWithAdditionalPropertiesEqEmptyObject, FreeFormObjectWithAdditionalPropertiesEqTrue, FreeFormObjectWithoutAdditionalProperties, GenericSchemaDuplicateIssue1SystemBoolean, GenericSchemaDuplicateIssue1SystemBooleanWritable, GenericSchemaDuplicateIssue1SystemString, GenericSchemaDuplicateIssue1SystemStringWritable, GetApiVbyApiVersionSimpleOperationData, GetApiVbyApiVersionSimpleOperationError, GetApiVbyApiVersionSimpleOperationErrors, GetApiVbyApiVersionSimpleOperationResponse, GetApiVbyApiVersionSimpleOperationResponses, GetCallWithOptionalParamData, GetCallWithoutParametersAndResponseData, HeadCallWithoutParametersAndResponseData, Import, ImportData, ImportResponse, ImportResponses, IoK8sApimachineryPkgApisMetaV1DeleteOptions, IoK8sApimachineryPkgApisMetaV1Preconditions, ModelCircle, ModelFromZendesk, ModelSquare, ModelThatExtends, ModelThatExtendsExtends, ModelWithAdditionalPropertiesEqTrue, ModelWithAdditionalPropertiesRef, ModelWithAnyOfConstantSizeArray, ModelWithAnyOfConstantSizeArrayAndIntersect, ModelWithAnyOfConstantSizeArrayNullable, ModelWithAnyOfConstantSizeArrayWithNSizeAndOptions, ModelWithAnyOfConstantSizeArrayWithNSizeAndOptionsWritable, ModelWithArray, ModelWithArrayReadOnlyAndWriteOnly, ModelWithArrayReadOnlyAndWriteOnlyWritable, ModelWithBackticksInDescription, ModelWithBoolean, ModelWithCircularReference, ModelWithConst, ModelWithConstantSizeArray, ModelWithDictionary, ModelWithDuplicateImports, ModelWithDuplicateProperties, ModelWithEnum, ModelWithEnumFromDescription, ModelWithEnumWithHyphen, ModelWithInteger, ModelWithNestedArrayEnums, ModelWithNestedArrayEnumsData, ModelWithNestedArrayEnumsDataBar, ModelWithNestedArrayEnumsDataFoo, ModelWithNestedCompositionEnums, ModelWithNestedEnums, ModelWithNestedProperties, ModelWithNullableObject, ModelWithNullableString, ModelWithNumericEnumUnion, ModelWithOneOfAndProperties, ModelWithOneOfEnum, ModelWithOrderedProperties, ModelWithPattern, ModelWithPatternWritable, ModelWithPrefixItemsConstantSizeArray, ModelWithProperties, ModelWithPropertiesWritable, ModelWithReadOnlyAndWriteOnly, ModelWithReadOnlyAndWriteOnlyWritable, ModelWithReference, ModelWithReferenceWritable, ModelWithString, ModelWithStringError, MultipartRequestData, MultipartResponseData, MultipartResponseResponse, MultipartResponseResponses, NestedAnyOfArraysNullable, NonAsciiæøåÆøÅöôêÊ字符串Data, NonAsciiæøåÆøÅöôêÊ字符串Response, NonAsciiæøåÆøÅöôêÊ字符串Responses, NonAsciiStringæøåÆøÅöôêÊ字符串, NullableObject, OneOfAllOfIssue, OneOfAllOfIssueWritable, OptionsCallWithoutParametersAndResponseData, Pageable, ParameterSimpleParameterUnused, PatchApiVbyApiVersionNoTagData, PatchApiVbyApiVersionNoTagResponses, PatchCallWithoutParametersAndResponseData, PostApiVbyApiVersionFormDataData, PostApiVbyApiVersionRequestBodyData, PostCallWithOptionalParamData, PostCallWithOptionalParamResponse, PostCallWithOptionalParamResponses, PostCallWithoutParametersAndResponseData, PostServiceWithEmptyTagResponse, PostServiceWithEmptyTagResponse2, PutCallWithoutParametersAndResponseData, PutWithFormUrlEncodedData, SchemaWithFormRestrictedKeys, SimpleBoolean, SimpleFile, SimpleFormData, SimpleInteger, SimpleParameter, SimpleReference, SimpleRequestBody, SimpleString, SimpleStringWithPattern, TestErrorCodeData, TestErrorCodeErrors, TestErrorCodeResponses, TypesData, TypesResponse, TypesResponses, UploadFileData, UploadFileResponse, UploadFileResponses, XFooBar } from './types.gen';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-nuxt/clean-false/sdk.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport { type Client, type Composable, formDataBodySerializer, type Options as Options2, type TDataShape, urlSearchParamsBodySerializer } from './client';\nimport { client } from './client.gen';\nimport type { ApiVVersionODataControllerCountData, ApiVVersionODataControllerCountResponse, CallToTestOrderOfParamsData, CallWithDefaultOptionalParametersData, CallWithDefaultParametersData, CallWithDescriptionsData, CallWithDuplicateResponsesData, CallWithDuplicateResponsesError, CallWithDuplicateResponsesResponse, CallWithNoContentResponseData, CallWithNoContentResponseResponse, CallWithParametersData, CallWithResponseAndNoContentResponseData, CallWithResponseAndNoContentResponseResponse, CallWithResponseData, CallWithResponseResponse, CallWithResponsesData, CallWithResponsesError, CallWithResponsesResponse, CallWithResultFromHeaderData, CallWithWeirdParameterNamesData, CollectionFormatData, ComplexParamsData, ComplexParamsResponse, ComplexTypesData, ComplexTypesResponse, DeleteCallWithoutParametersAndResponseData, DeleteFooData3, DeprecatedCallData, DummyAData, DummyAResponse, DummyBData, DummyBResponse, DuplicateName2Data, DuplicateName3Data, DuplicateName4Data, DuplicateNameData, ExportData, FileResponseData, FileResponseResponse, FooWowData, GetApiVbyApiVersionSimpleOperationData, GetApiVbyApiVersionSimpleOperationError, GetApiVbyApiVersionSimpleOperationResponse, GetCallWithOptionalParamData, GetCallWithoutParametersAndResponseData, HeadCallWithoutParametersAndResponseData, ImportData, ImportResponse, MultipartRequestData, MultipartResponseData, MultipartResponseResponse, NonAsciiæøåÆøÅöôêÊ字符串Data, NonAsciiæøåÆøÅöôêÊ字符串Response, OptionsCallWithoutParametersAndResponseData, PatchApiVbyApiVersionNoTagData, PatchCallWithoutParametersAndResponseData, PostApiVbyApiVersionFormDataData, PostApiVbyApiVersionRequestBodyData, PostCallWithOptionalParamData, PostCallWithOptionalParamResponse, PostCallWithoutParametersAndResponseData, PutCallWithoutParametersAndResponseData, PutWithFormUrlEncodedData, TestErrorCodeData, TypesData, TypesResponse, UploadFileData, UploadFileResponse } from './types.gen';\n\nexport type Options<TComposable extends Composable = '$fetch', TData extends TDataShape = TDataShape, ResT = unknown, DefaultT = undefined> = Options2<TComposable, TData, ResT, DefaultT> & {\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\nexport const export_ = <TComposable extends Composable = '$fetch', DefaultT = undefined>(options: Options<TComposable, ExportData, unknown, DefaultT>) => (options.client ?? client).get<TComposable, unknown | DefaultT, unknown, DefaultT>({ url: '/api/v{api-version}/no+tag', ...options });\n\nexport const patchApiVbyApiVersionNoTag = <TComposable extends Composable = '$fetch', DefaultT = undefined>(options: Options<TComposable, PatchApiVbyApiVersionNoTagData, unknown, DefaultT>) => (options.client ?? client).patch<TComposable, unknown | DefaultT, unknown, DefaultT>({ url: '/api/v{api-version}/no+tag', ...options });\n\nexport const import_ = <TComposable extends Composable = '$fetch', DefaultT extends ImportResponse = ImportResponse>(options: Options<TComposable, ImportData, ImportResponse, DefaultT>) => (options.client ?? client).post<TComposable, ImportResponse | DefaultT, unknown, DefaultT>({\n    url: '/api/v{api-version}/no+tag',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options.headers\n    }\n});\n\nexport const fooWow = <TComposable extends Composable = '$fetch', DefaultT = undefined>(options: Options<TComposable, FooWowData, unknown, DefaultT>) => (options.client ?? client).put<TComposable, unknown | DefaultT, unknown, DefaultT>({ url: '/api/v{api-version}/no+tag', ...options });\n\nexport const apiVVersionODataControllerCount = <TComposable extends Composable = '$fetch', DefaultT extends ApiVVersionODataControllerCountResponse = ApiVVersionODataControllerCountResponse>(options: Options<TComposable, ApiVVersionODataControllerCountData, ApiVVersionODataControllerCountResponse, DefaultT>) => (options.client ?? client).get<TComposable, ApiVVersionODataControllerCountResponse | DefaultT, unknown, DefaultT>({ url: '/api/v{api-version}/simple/$count', ...options });\n\nexport const getApiVbyApiVersionSimpleOperation = <TComposable extends Composable = '$fetch', DefaultT extends GetApiVbyApiVersionSimpleOperationResponse = GetApiVbyApiVersionSimpleOperationResponse>(options: Options<TComposable, GetApiVbyApiVersionSimpleOperationData, GetApiVbyApiVersionSimpleOperationResponse, DefaultT>) => (options.client ?? client).get<TComposable, GetApiVbyApiVersionSimpleOperationResponse | DefaultT, GetApiVbyApiVersionSimpleOperationError, DefaultT>({ url: '/api/v{api-version}/simple:operation', ...options });\n\nexport const deleteCallWithoutParametersAndResponse = <TComposable extends Composable = '$fetch', DefaultT = undefined>(options: Options<TComposable, DeleteCallWithoutParametersAndResponseData, unknown, DefaultT>) => (options.client ?? client).delete<TComposable, unknown | DefaultT, unknown, DefaultT>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const getCallWithoutParametersAndResponse = <TComposable extends Composable = '$fetch', DefaultT = undefined>(options: Options<TComposable, GetCallWithoutParametersAndResponseData, unknown, DefaultT>) => (options.client ?? client).get<TComposable, unknown | DefaultT, unknown, DefaultT>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const headCallWithoutParametersAndResponse = <TComposable extends Composable = '$fetch', DefaultT = undefined>(options: Options<TComposable, HeadCallWithoutParametersAndResponseData, unknown, DefaultT>) => (options.client ?? client).head<TComposable, unknown | DefaultT, unknown, DefaultT>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const optionsCallWithoutParametersAndResponse = <TComposable extends Composable = '$fetch', DefaultT = undefined>(options: Options<TComposable, OptionsCallWithoutParametersAndResponseData, unknown, DefaultT>) => (options.client ?? client).options<TComposable, unknown | DefaultT, unknown, DefaultT>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const patchCallWithoutParametersAndResponse = <TComposable extends Composable = '$fetch', DefaultT = undefined>(options: Options<TComposable, PatchCallWithoutParametersAndResponseData, unknown, DefaultT>) => (options.client ?? client).patch<TComposable, unknown | DefaultT, unknown, DefaultT>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const postCallWithoutParametersAndResponse = <TComposable extends Composable = '$fetch', DefaultT = undefined>(options: Options<TComposable, PostCallWithoutParametersAndResponseData, unknown, DefaultT>) => (options.client ?? client).post<TComposable, unknown | DefaultT, unknown, DefaultT>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const putCallWithoutParametersAndResponse = <TComposable extends Composable = '$fetch', DefaultT = undefined>(options: Options<TComposable, PutCallWithoutParametersAndResponseData, unknown, DefaultT>) => (options.client ?? client).put<TComposable, unknown | DefaultT, unknown, DefaultT>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const deleteFoo = <TComposable extends Composable = '$fetch', DefaultT = undefined>(options: Options<TComposable, DeleteFooData3, unknown, DefaultT>) => (options.client ?? client).delete<TComposable, unknown | DefaultT, unknown, DefaultT>({ url: '/api/v{api-version}/foo/{foo_param}/bar/{BarParam}', ...options });\n\nexport const callWithDescriptions = <TComposable extends Composable = '$fetch', DefaultT = undefined>(options: Options<TComposable, CallWithDescriptionsData, unknown, DefaultT>) => (options.client ?? client).post<TComposable, unknown | DefaultT, unknown, DefaultT>({ url: '/api/v{api-version}/descriptions', ...options });\n\n/**\n * @deprecated\n */\nexport const deprecatedCall = <TComposable extends Composable = '$fetch', DefaultT = undefined>(options: Options<TComposable, DeprecatedCallData, unknown, DefaultT>) => (options.client ?? client).post<TComposable, unknown | DefaultT, unknown, DefaultT>({ url: '/api/v{api-version}/parameters/deprecated', ...options });\n\nexport const callWithParameters = <TComposable extends Composable = '$fetch', DefaultT = undefined>(options: Options<TComposable, CallWithParametersData, unknown, DefaultT>) => (options.client ?? client).post<TComposable, unknown | DefaultT, unknown, DefaultT>({\n    url: '/api/v{api-version}/parameters/{parameterPath}',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options.headers\n    }\n});\n\nexport const callWithWeirdParameterNames = <TComposable extends Composable = '$fetch', DefaultT = undefined>(options: Options<TComposable, CallWithWeirdParameterNamesData, unknown, DefaultT>) => (options.client ?? client).post<TComposable, unknown | DefaultT, unknown, DefaultT>({\n    url: '/api/v{api-version}/parameters/{parameter.path.1}/{parameter-path-2}/{PARAMETER-PATH-3}',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options.headers\n    }\n});\n\nexport const getCallWithOptionalParam = <TComposable extends Composable = '$fetch', DefaultT = undefined>(options: Options<TComposable, GetCallWithOptionalParamData, unknown, DefaultT>) => (options.client ?? client).get<TComposable, unknown | DefaultT, unknown, DefaultT>({\n    url: '/api/v{api-version}/parameters',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options.headers\n    }\n});\n\nexport const postCallWithOptionalParam = <TComposable extends Composable = '$fetch', DefaultT extends PostCallWithOptionalParamResponse = PostCallWithOptionalParamResponse>(options: Options<TComposable, PostCallWithOptionalParamData, PostCallWithOptionalParamResponse, DefaultT>) => (options.client ?? client).post<TComposable, PostCallWithOptionalParamResponse | DefaultT, unknown, DefaultT>({\n    url: '/api/v{api-version}/parameters',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options.headers\n    }\n});\n\nexport const postApiVbyApiVersionRequestBody = <TComposable extends Composable = '$fetch', DefaultT = undefined>(options: Options<TComposable, PostApiVbyApiVersionRequestBodyData, unknown, DefaultT>) => (options.client ?? client).post<TComposable, unknown | DefaultT, unknown, DefaultT>({\n    url: '/api/v{api-version}/requestBody',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options.headers\n    }\n});\n\nexport const postApiVbyApiVersionFormData = <TComposable extends Composable = '$fetch', DefaultT = undefined>(options: Options<TComposable, PostApiVbyApiVersionFormDataData, unknown, DefaultT>) => (options.client ?? client).post<TComposable, unknown | DefaultT, unknown, DefaultT>({\n    ...formDataBodySerializer,\n    url: '/api/v{api-version}/formData',\n    ...options,\n    headers: {\n        'Content-Type': null,\n        ...options.headers\n    }\n});\n\nexport const callWithDefaultParameters = <TComposable extends Composable = '$fetch', DefaultT = undefined>(options: Options<TComposable, CallWithDefaultParametersData, unknown, DefaultT>) => (options.client ?? client).get<TComposable, unknown | DefaultT, unknown, DefaultT>({ url: '/api/v{api-version}/defaults', ...options });\n\nexport const callWithDefaultOptionalParameters = <TComposable extends Composable = '$fetch', DefaultT = undefined>(options: Options<TComposable, CallWithDefaultOptionalParametersData, unknown, DefaultT>) => (options.client ?? client).post<TComposable, unknown | DefaultT, unknown, DefaultT>({ url: '/api/v{api-version}/defaults', ...options });\n\nexport const callToTestOrderOfParams = <TComposable extends Composable = '$fetch', DefaultT = undefined>(options: Options<TComposable, CallToTestOrderOfParamsData, unknown, DefaultT>) => (options.client ?? client).put<TComposable, unknown | DefaultT, unknown, DefaultT>({ url: '/api/v{api-version}/defaults', ...options });\n\nexport const duplicateName = <TComposable extends Composable = '$fetch', DefaultT = undefined>(options: Options<TComposable, DuplicateNameData, unknown, DefaultT>) => (options.client ?? client).delete<TComposable, unknown | DefaultT, unknown, DefaultT>({ url: '/api/v{api-version}/duplicate', ...options });\n\nexport const duplicateName2 = <TComposable extends Composable = '$fetch', DefaultT = undefined>(options: Options<TComposable, DuplicateName2Data, unknown, DefaultT>) => (options.client ?? client).get<TComposable, unknown | DefaultT, unknown, DefaultT>({ url: '/api/v{api-version}/duplicate', ...options });\n\nexport const duplicateName3 = <TComposable extends Composable = '$fetch', DefaultT = undefined>(options: Options<TComposable, DuplicateName3Data, unknown, DefaultT>) => (options.client ?? client).post<TComposable, unknown | DefaultT, unknown, DefaultT>({ url: '/api/v{api-version}/duplicate', ...options });\n\nexport const duplicateName4 = <TComposable extends Composable = '$fetch', DefaultT = undefined>(options: Options<TComposable, DuplicateName4Data, unknown, DefaultT>) => (options.client ?? client).put<TComposable, unknown | DefaultT, unknown, DefaultT>({ url: '/api/v{api-version}/duplicate', ...options });\n\nexport const callWithNoContentResponse = <TComposable extends Composable = '$fetch', DefaultT extends CallWithNoContentResponseResponse = CallWithNoContentResponseResponse>(options: Options<TComposable, CallWithNoContentResponseData, CallWithNoContentResponseResponse, DefaultT>) => (options.client ?? client).get<TComposable, CallWithNoContentResponseResponse | DefaultT, unknown, DefaultT>({ url: '/api/v{api-version}/no-content', ...options });\n\nexport const callWithResponseAndNoContentResponse = <TComposable extends Composable = '$fetch', DefaultT extends CallWithResponseAndNoContentResponseResponse = CallWithResponseAndNoContentResponseResponse>(options: Options<TComposable, CallWithResponseAndNoContentResponseData, CallWithResponseAndNoContentResponseResponse, DefaultT>) => (options.client ?? client).get<TComposable, CallWithResponseAndNoContentResponseResponse | DefaultT, unknown, DefaultT>({ url: '/api/v{api-version}/multiple-tags/response-and-no-content', ...options });\n\nexport const dummyA = <TComposable extends Composable = '$fetch', DefaultT extends DummyAResponse = DummyAResponse>(options: Options<TComposable, DummyAData, DummyAResponse, DefaultT>) => (options.client ?? client).get<TComposable, DummyAResponse | DefaultT, unknown, DefaultT>({ url: '/api/v{api-version}/multiple-tags/a', ...options });\n\nexport const dummyB = <TComposable extends Composable = '$fetch', DefaultT extends DummyBResponse = DummyBResponse>(options: Options<TComposable, DummyBData, DummyBResponse, DefaultT>) => (options.client ?? client).get<TComposable, DummyBResponse | DefaultT, unknown, DefaultT>({ url: '/api/v{api-version}/multiple-tags/b', ...options });\n\nexport const callWithResponse = <TComposable extends Composable = '$fetch', DefaultT extends CallWithResponseResponse = CallWithResponseResponse>(options: Options<TComposable, CallWithResponseData, CallWithResponseResponse, DefaultT>) => (options.client ?? client).get<TComposable, CallWithResponseResponse | DefaultT, unknown, DefaultT>({ url: '/api/v{api-version}/response', ...options });\n\nexport const callWithDuplicateResponses = <TComposable extends Composable = '$fetch', DefaultT extends CallWithDuplicateResponsesResponse = CallWithDuplicateResponsesResponse>(options: Options<TComposable, CallWithDuplicateResponsesData, CallWithDuplicateResponsesResponse, DefaultT>) => (options.client ?? client).post<TComposable, CallWithDuplicateResponsesResponse | DefaultT, CallWithDuplicateResponsesError, DefaultT>({ url: '/api/v{api-version}/response', ...options });\n\nexport const callWithResponses = <TComposable extends Composable = '$fetch', DefaultT extends CallWithResponsesResponse = CallWithResponsesResponse>(options: Options<TComposable, CallWithResponsesData, CallWithResponsesResponse, DefaultT>) => (options.client ?? client).put<TComposable, CallWithResponsesResponse | DefaultT, CallWithResponsesError, DefaultT>({ url: '/api/v{api-version}/response', ...options });\n\nexport const collectionFormat = <TComposable extends Composable = '$fetch', DefaultT = undefined>(options: Options<TComposable, CollectionFormatData, unknown, DefaultT>) => (options.client ?? client).get<TComposable, unknown | DefaultT, unknown, DefaultT>({ url: '/api/v{api-version}/collectionFormat', ...options });\n\nexport const types = <TComposable extends Composable = '$fetch', DefaultT extends TypesResponse = TypesResponse>(options: Options<TComposable, TypesData, TypesResponse, DefaultT>) => (options.client ?? client).get<TComposable, TypesResponse | DefaultT, unknown, DefaultT>({ url: '/api/v{api-version}/types', ...options });\n\nexport const uploadFile = <TComposable extends Composable = '$fetch', DefaultT extends UploadFileResponse = UploadFileResponse>(options: Options<TComposable, UploadFileData, UploadFileResponse, DefaultT>) => (options.client ?? client).post<TComposable, UploadFileResponse | DefaultT, unknown, DefaultT>({\n    ...urlSearchParamsBodySerializer,\n    url: '/api/v{api-version}/upload',\n    ...options,\n    headers: {\n        'Content-Type': 'application/x-www-form-urlencoded',\n        ...options.headers\n    }\n});\n\nexport const fileResponse = <TComposable extends Composable = '$fetch', DefaultT extends FileResponseResponse = FileResponseResponse>(options: Options<TComposable, FileResponseData, FileResponseResponse, DefaultT>) => (options.client ?? client).get<TComposable, FileResponseResponse | DefaultT, unknown, DefaultT>({ url: '/api/v{api-version}/file/{id}', ...options });\n\nexport const complexTypes = <TComposable extends Composable = '$fetch', DefaultT extends ComplexTypesResponse = ComplexTypesResponse>(options: Options<TComposable, ComplexTypesData, ComplexTypesResponse, DefaultT>) => (options.client ?? client).get<TComposable, ComplexTypesResponse | DefaultT, unknown, DefaultT>({\n    querySerializer: { parameters: { parameterObject: { object: { style: 'form' } } } },\n    url: '/api/v{api-version}/complex',\n    ...options\n});\n\nexport const multipartResponse = <TComposable extends Composable = '$fetch', DefaultT extends MultipartResponseResponse = MultipartResponseResponse>(options: Options<TComposable, MultipartResponseData, MultipartResponseResponse, DefaultT>) => (options.client ?? client).get<TComposable, MultipartResponseResponse | DefaultT, unknown, DefaultT>({ url: '/api/v{api-version}/multipart', ...options });\n\nexport const multipartRequest = <TComposable extends Composable = '$fetch', DefaultT = undefined>(options: Options<TComposable, MultipartRequestData, unknown, DefaultT>) => (options.client ?? client).post<TComposable, unknown | DefaultT, unknown, DefaultT>({\n    ...formDataBodySerializer,\n    url: '/api/v{api-version}/multipart',\n    ...options,\n    headers: {\n        'Content-Type': null,\n        ...options.headers\n    }\n});\n\nexport const complexParams = <TComposable extends Composable = '$fetch', DefaultT extends ComplexParamsResponse = ComplexParamsResponse>(options: Options<TComposable, ComplexParamsData, ComplexParamsResponse, DefaultT>) => (options.client ?? client).put<TComposable, ComplexParamsResponse | DefaultT, unknown, DefaultT>({\n    url: '/api/v{api-version}/complex/{id}',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json-patch+json',\n        ...options.headers\n    }\n});\n\nexport const callWithResultFromHeader = <TComposable extends Composable = '$fetch', DefaultT = undefined>(options: Options<TComposable, CallWithResultFromHeaderData, unknown, DefaultT>) => (options.client ?? client).post<TComposable, unknown | DefaultT, unknown, DefaultT>({ url: '/api/v{api-version}/header', ...options });\n\nexport const testErrorCode = <TComposable extends Composable = '$fetch', DefaultT = undefined>(options: Options<TComposable, TestErrorCodeData, unknown, DefaultT>) => (options.client ?? client).post<TComposable, unknown | DefaultT, unknown, DefaultT>({ url: '/api/v{api-version}/error', ...options });\n\nexport const nonAsciiæøåÆøÅöôêÊ字符串 = <TComposable extends Composable = '$fetch', DefaultT extends NonAsciiæøåÆøÅöôêÊ字符串Response = NonAsciiæøåÆøÅöôêÊ字符串Response>(options: Options<TComposable, NonAsciiæøåÆøÅöôêÊ字符串Data, NonAsciiæøåÆøÅöôêÊ字符串Response, DefaultT>) => (options.client ?? client).post<TComposable, NonAsciiæøåÆøÅöôêÊ字符串Response | DefaultT, unknown, DefaultT>({ url: '/api/v{api-version}/non-ascii-æøåÆØÅöôêÊ字符串', ...options });\n\n/**\n * Login User\n */\nexport const putWithFormUrlEncoded = <TComposable extends Composable = '$fetch', DefaultT = undefined>(options: Options<TComposable, PutWithFormUrlEncodedData, unknown, DefaultT>) => (options.client ?? client).put<TComposable, unknown | DefaultT, unknown, DefaultT>({\n    ...urlSearchParamsBodySerializer,\n    url: '/api/v{api-version}/non-ascii-æøåÆØÅöôêÊ字符串',\n    ...options,\n    headers: {\n        'Content-Type': 'application/x-www-form-urlencoded',\n        ...options.headers\n    }\n});\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-nuxt/clean-false/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type ClientOptions = {\n    baseURL: 'http://localhost:3000/base' | (string & {});\n};\n\n/**\n * Model with number-only name\n */\nexport type _400 = string;\n\n/**\n * External ref to shared model (A)\n */\nexport type ExternalRefA = ExternalSharedModel;\n\n/**\n * External ref to shared model (B)\n */\nexport type ExternalRefB = ExternalSharedModel;\n\n/**\n * Testing multiline comments in string: First line\n * Second line\n *\n * Fourth line\n */\nexport type CamelCaseCommentWithBreaks = number;\n\n/**\n * Testing multiline comments in string: First line\n * Second line\n *\n * Fourth line\n */\nexport type CommentWithBreaks = number;\n\n/**\n * Testing backticks in string: `backticks` and ```multiple backticks``` should work\n */\nexport type CommentWithBackticks = number;\n\n/**\n * Testing backticks and quotes in string: `backticks`, 'quotes', \"double quotes\" and ```multiple backticks``` should work\n */\nexport type CommentWithBackticksAndQuotes = number;\n\n/**\n * Testing slashes in string: \\backwards\\\\\\ and /forwards/// should work\n */\nexport type CommentWithSlashes = number;\n\n/**\n * Testing expression placeholders in string: ${expression} should work\n */\nexport type CommentWithExpressionPlaceholders = number;\n\n/**\n * Testing quotes in string: 'single quote''' and \"double quotes\"\"\" should work\n */\nexport type CommentWithQuotes = number;\n\n/**\n * Testing reserved characters in string: * inline * and ** inline ** should work\n */\nexport type CommentWithReservedCharacters = number;\n\n/**\n * This is a simple number\n */\nexport type SimpleInteger = number;\n\n/**\n * This is a simple boolean\n */\nexport type SimpleBoolean = boolean;\n\n/**\n * This is a simple string\n */\nexport type SimpleString = string;\n\n/**\n * A string with non-ascii (unicode) characters valid in typescript identifiers (æøåÆØÅöÔèÈ字符串)\n */\nexport type NonAsciiStringæøåÆøÅöôêÊ字符串 = string;\n\n/**\n * This is a simple file\n */\nexport type SimpleFile = Blob | File;\n\n/**\n * This is a simple reference\n */\nexport type SimpleReference = ModelWithString;\n\n/**\n * This is a simple string\n */\nexport type SimpleStringWithPattern = string | null;\n\n/**\n * This is a simple enum with strings\n */\nexport type EnumWithStrings = 'Success' | 'Warning' | 'Error' | '\\'Single Quote\\'' | '\"Double Quotes\"' | 'Non-ascii: øæåôöØÆÅÔÖ字符串';\n\nexport type EnumWithReplacedCharacters = '\\'Single Quote\\'' | '\"Double Quotes\"' | 'øæåôöØÆÅÔÖ字符串' | 3.1 | '';\n\n/**\n * This is a simple enum with numbers\n */\nexport type EnumWithNumbers = 1 | 2 | 3 | 1.1 | 1.2 | 1.3 | 100 | 200 | 300 | -100 | -200 | -300 | -1.1 | -1.2 | -1.3;\n\n/**\n * Success=1,Warning=2,Error=3\n */\nexport type EnumFromDescription = number;\n\n/**\n * This is a simple enum with numbers\n */\nexport type EnumWithExtensions = 200 | 400 | 500;\n\nexport type EnumWithXEnumNames = 0 | 1 | 2;\n\n/**\n * This is a simple array with numbers\n */\nexport type ArrayWithNumbers = Array<number>;\n\n/**\n * This is a simple array with booleans\n */\nexport type ArrayWithBooleans = Array<boolean>;\n\n/**\n * This is a simple array with strings\n */\nexport type ArrayWithStrings = Array<string>;\n\n/**\n * This is a simple array with references\n */\nexport type ArrayWithReferences = Array<ModelWithString>;\n\n/**\n * This is a simple array containing an array\n */\nexport type ArrayWithArray = Array<Array<ModelWithString>>;\n\n/**\n * This is a simple array with properties\n */\nexport type ArrayWithProperties = Array<{\n    '16x16'?: CamelCaseCommentWithBreaks;\n    bar?: string;\n}>;\n\n/**\n * This is a simple array with any of properties\n */\nexport type ArrayWithAnyOfProperties = Array<{\n    foo?: string;\n} | {\n    bar?: string;\n}>;\n\nexport type AnyOfAnyAndNull = {\n    data?: unknown | null;\n};\n\n/**\n * This is a simple array with any of properties\n */\nexport type AnyOfArrays = {\n    results?: Array<{\n        foo?: string;\n    } | {\n        bar?: string;\n    }>;\n};\n\n/**\n * This is a string dictionary\n */\nexport type DictionaryWithString = {\n    [key: string]: string;\n};\n\nexport type DictionaryWithPropertiesAndAdditionalProperties = {\n    foo?: number;\n    bar?: boolean;\n    [key: string]: string | number | boolean | undefined;\n};\n\n/**\n * This is a string reference\n */\nexport type DictionaryWithReference = {\n    [key: string]: ModelWithString;\n};\n\n/**\n * This is a complex dictionary\n */\nexport type DictionaryWithArray = {\n    [key: string]: Array<ModelWithString>;\n};\n\n/**\n * This is a string dictionary\n */\nexport type DictionaryWithDictionary = {\n    [key: string]: {\n        [key: string]: string;\n    };\n};\n\n/**\n * This is a complex dictionary\n */\nexport type DictionaryWithProperties = {\n    [key: string]: {\n        foo?: string;\n        bar?: string;\n    };\n};\n\n/**\n * This is a model with one number property\n */\nexport type ModelWithInteger = {\n    /**\n     * This is a simple number property\n     */\n    prop?: number;\n};\n\n/**\n * This is a model with one boolean property\n */\nexport type ModelWithBoolean = {\n    /**\n     * This is a simple boolean property\n     */\n    prop?: boolean;\n};\n\n/**\n * This is a model with one string property\n */\nexport type ModelWithString = {\n    /**\n     * This is a simple string property\n     */\n    prop?: string;\n};\n\n/**\n * This is a model with one string property\n */\nexport type ModelWithStringError = {\n    /**\n     * This is a simple string property\n     */\n    prop?: string;\n};\n\n/**\n * `Comment` or `VoiceComment`. The JSON object for adding voice comments to tickets is different. See [Adding voice comments to tickets](/documentation/ticketing/managing-tickets/adding-voice-comments-to-tickets)\n */\nexport type ModelFromZendesk = string;\n\n/**\n * This is a model with one string property\n */\nexport type ModelWithNullableString = {\n    /**\n     * This is a simple string property\n     */\n    nullableProp1?: string | null;\n    /**\n     * This is a simple string property\n     */\n    nullableRequiredProp1: string | null;\n    /**\n     * This is a simple string property\n     */\n    nullableProp2?: string | null;\n    /**\n     * This is a simple string property\n     */\n    nullableRequiredProp2: string | null;\n    /**\n     * This is a simple enum with strings\n     */\n    'foo_bar-enum'?: 'Success' | 'Warning' | 'Error' | 'ØÆÅ字符串';\n};\n\n/**\n * This is a model with one enum\n */\nexport type ModelWithEnum = {\n    /**\n     * This is a simple enum with strings\n     */\n    'foo_bar-enum'?: 'Success' | 'Warning' | 'Error' | 'ØÆÅ字符串';\n    /**\n     * These are the HTTP error code enums\n     */\n    statusCode?: '100' | '200 FOO' | '300 FOO_BAR' | '400 foo-bar' | '500 foo.bar' | '600 foo&bar';\n    /**\n     * Simple boolean enum\n     */\n    bool?: true;\n};\n\n/**\n * This is a model with one enum with escaped name\n */\nexport type ModelWithEnumWithHyphen = {\n    /**\n     * Foo-Bar-Baz-Qux\n     */\n    'foo-bar-baz-qux'?: '3.0';\n};\n\n/**\n * This is a model with one enum\n */\nexport type ModelWithEnumFromDescription = {\n    /**\n     * Success=1,Warning=2,Error=3\n     */\n    test?: number;\n};\n\n/**\n * This is a model with nested enums\n */\nexport type ModelWithNestedEnums = {\n    dictionaryWithEnum?: {\n        [key: string]: 'Success' | 'Warning' | 'Error';\n    };\n    dictionaryWithEnumFromDescription?: {\n        [key: string]: number;\n    };\n    arrayWithEnum?: Array<'Success' | 'Warning' | 'Error'>;\n    arrayWithDescription?: Array<number>;\n    /**\n     * This is a simple enum with strings\n     */\n    'foo_bar-enum'?: 'Success' | 'Warning' | 'Error' | 'ØÆÅ字符串';\n};\n\n/**\n * This is a model with one property containing a reference\n */\nexport type ModelWithReference = {\n    prop?: ModelWithProperties;\n};\n\n/**\n * This is a model with one property containing an array\n */\nexport type ModelWithArrayReadOnlyAndWriteOnly = {\n    prop?: Array<ModelWithReadOnlyAndWriteOnly>;\n    propWithFile?: Array<Blob | File>;\n    propWithNumber?: Array<number>;\n};\n\n/**\n * This is a model with one property containing an array\n */\nexport type ModelWithArray = {\n    prop?: Array<ModelWithString>;\n    propWithFile?: Array<Blob | File>;\n    propWithNumber?: Array<number>;\n};\n\n/**\n * This is a model with one property containing a dictionary\n */\nexport type ModelWithDictionary = {\n    prop?: {\n        [key: string]: string;\n    };\n};\n\n/**\n * This is a deprecated model with a deprecated property\n *\n * @deprecated\n */\nexport type DeprecatedModel = {\n    /**\n     * This is a deprecated property\n     *\n     * @deprecated\n     */\n    prop?: string;\n};\n\n/**\n * This is a model with one property containing a circular reference\n */\nexport type ModelWithCircularReference = {\n    prop?: ModelWithCircularReference;\n};\n\n/**\n * This is a model with one property with a 'one of' relationship\n */\nexport type CompositionWithOneOf = {\n    propA?: ModelWithString | ModelWithEnum | ModelWithArray | ModelWithDictionary;\n};\n\n/**\n * This is a model with one property with a 'one of' relationship where the options are not $ref\n */\nexport type CompositionWithOneOfAnonymous = {\n    propA?: {\n        propA?: string;\n    } | string | number;\n};\n\n/**\n * Circle\n */\nexport type ModelCircle = {\n    kind: string;\n    radius?: number;\n};\n\n/**\n * Square\n */\nexport type ModelSquare = {\n    kind: string;\n    sideLength?: number;\n};\n\n/**\n * This is a model with one property with a 'one of' relationship where the options are not $ref\n */\nexport type CompositionWithOneOfDiscriminator = ({\n    kind: 'circle';\n} & ModelCircle) | ({\n    kind: 'square';\n} & ModelSquare);\n\n/**\n * This is a model with one property with a 'any of' relationship\n */\nexport type CompositionWithAnyOf = {\n    propA?: ModelWithString | ModelWithEnum | ModelWithArray | ModelWithDictionary;\n};\n\n/**\n * This is a model with one property with a 'any of' relationship where the options are not $ref\n */\nexport type CompositionWithAnyOfAnonymous = {\n    propA?: {\n        propA?: string;\n    } | string | number;\n};\n\n/**\n * This is a model with nested 'any of' property with a type null\n */\nexport type CompositionWithNestedAnyAndTypeNull = {\n    propA?: Array<ModelWithDictionary | null> | Array<ModelWithArray | null>;\n};\n\nexport type _3eNum1Период = 'Bird' | 'Dog';\n\nexport type ConstValue = 'ConstValue';\n\n/**\n * This is a model with one property with a 'any of' relationship where the options are not $ref\n */\nexport type CompositionWithNestedAnyOfAndNull = {\n    /**\n     * Scopes\n     */\n    propA?: Array<_3eNum1Период | ConstValue> | null;\n};\n\n/**\n * This is a model with one property with a 'one of' relationship\n */\nexport type CompositionWithOneOfAndNullable = {\n    propA?: {\n        boolean?: boolean;\n    } | ModelWithEnum | ModelWithArray | ModelWithDictionary | null;\n};\n\n/**\n * This is a model that contains a simple dictionary within composition\n */\nexport type CompositionWithOneOfAndSimpleDictionary = {\n    propA?: boolean | {\n        [key: string]: number;\n    };\n};\n\n/**\n * This is a model that contains a dictionary of simple arrays within composition\n */\nexport type CompositionWithOneOfAndSimpleArrayDictionary = {\n    propA?: boolean | {\n        [key: string]: Array<boolean>;\n    };\n};\n\n/**\n * This is a model that contains a dictionary of complex arrays (composited) within composition\n */\nexport type CompositionWithOneOfAndComplexArrayDictionary = {\n    propA?: boolean | {\n        [key: string]: Array<number | string>;\n    };\n};\n\n/**\n * This is a model with one property with a 'all of' relationship\n */\nexport type CompositionWithAllOfAndNullable = {\n    propA?: ({\n        boolean?: boolean;\n    } & ModelWithEnum & ModelWithArray & ModelWithDictionary) | null;\n};\n\n/**\n * This is a model with one property with a 'any of' relationship\n */\nexport type CompositionWithAnyOfAndNullable = {\n    propA?: {\n        boolean?: boolean;\n    } | ModelWithEnum | ModelWithArray | ModelWithDictionary | null;\n};\n\n/**\n * This is a base model with two simple optional properties\n */\nexport type CompositionBaseModel = {\n    firstName?: string;\n    lastname?: string;\n};\n\n/**\n * This is a model that extends the base model\n */\nexport type CompositionExtendedModel = CompositionBaseModel & {\n    age: number;\n    firstName: string;\n    lastname: string;\n};\n\n/**\n * This is a model with one nested property\n */\nexport type ModelWithProperties = {\n    required: string;\n    readonly requiredAndReadOnly: string;\n    requiredAndNullable: string | null;\n    string?: string;\n    number?: number;\n    boolean?: boolean;\n    reference?: ModelWithString;\n    'property with space'?: string;\n    default?: string;\n    try?: string;\n    readonly '@namespace.string'?: string;\n    readonly '@namespace.integer'?: number;\n};\n\n/**\n * This is a model with one nested property\n */\nexport type ModelWithNestedProperties = {\n    readonly first: {\n        readonly second: {\n            readonly third: string | null;\n        } | null;\n    } | null;\n};\n\n/**\n * This is a model with duplicated properties\n */\nexport type ModelWithDuplicateProperties = {\n    prop?: ModelWithString;\n};\n\n/**\n * This is a model with ordered properties\n */\nexport type ModelWithOrderedProperties = {\n    zebra?: string;\n    apple?: string;\n    hawaii?: string;\n};\n\n/**\n * This is a model with duplicated imports\n */\nexport type ModelWithDuplicateImports = {\n    propA?: ModelWithString;\n    propB?: ModelWithString;\n    propC?: ModelWithString;\n};\n\n/**\n * This is a model that extends another model\n */\nexport type ModelThatExtends = ModelWithString & {\n    propExtendsA?: string;\n    propExtendsB?: ModelWithString;\n};\n\n/**\n * This is a model that extends another model\n */\nexport type ModelThatExtendsExtends = ModelWithString & ModelThatExtends & {\n    propExtendsC?: string;\n    propExtendsD?: ModelWithString;\n};\n\n/**\n * This is a model that contains a some patterns\n */\nexport type ModelWithPattern = {\n    key: string;\n    name: string;\n    readonly enabled?: boolean;\n    readonly modified?: string;\n    id?: string;\n    text?: string;\n    patternWithSingleQuotes?: string;\n    patternWithNewline?: string;\n    patternWithBacktick?: string;\n    patternWithUnicode?: string;\n};\n\nexport type File = {\n    /**\n     * Id\n     */\n    readonly id?: string;\n    /**\n     * Updated at\n     */\n    readonly updated_at?: string;\n    /**\n     * Created at\n     */\n    readonly created_at?: string;\n    /**\n     * Mime\n     */\n    mime: string;\n    /**\n     * File\n     */\n    readonly file?: string;\n};\n\nexport type Default = {\n    name?: string;\n};\n\nexport type Pageable = {\n    page?: number;\n    size?: number;\n    sort?: Array<string>;\n};\n\n/**\n * This is a free-form object without additionalProperties.\n */\nexport type FreeFormObjectWithoutAdditionalProperties = {\n    [key: string]: unknown;\n};\n\n/**\n * This is a free-form object with additionalProperties: true.\n */\nexport type FreeFormObjectWithAdditionalPropertiesEqTrue = {\n    [key: string]: unknown;\n};\n\n/**\n * This is a free-form object with additionalProperties: {}.\n */\nexport type FreeFormObjectWithAdditionalPropertiesEqEmptyObject = {\n    [key: string]: unknown;\n};\n\nexport type ModelWithConst = {\n    String?: 'String';\n    number?: 0;\n    null?: null;\n    withType?: 'Some string';\n};\n\n/**\n * This is a model with one property and additionalProperties: true\n */\nexport type ModelWithAdditionalPropertiesEqTrue = {\n    /**\n     * This is a simple string property\n     */\n    prop?: string;\n    [key: string]: unknown;\n};\n\nexport type NestedAnyOfArraysNullable = {\n    nullableArray?: Array<string | boolean> | null;\n};\n\nexport type CompositionWithOneOfAndProperties = ({\n    foo: SimpleParameter;\n} | {\n    bar: NonAsciiStringæøåÆøÅöôêÊ字符串;\n}) & {\n    baz: number | null;\n    qux: number;\n};\n\n/**\n * An object that can be null\n */\nexport type NullableObject = {\n    foo?: string;\n} | null;\n\n/**\n * Some % character\n */\nexport type CharactersInDescription = string;\n\nexport type ModelWithNullableObject = {\n    data?: NullableObject;\n};\n\n/**\n * An object with additional properties that can be null (anyOf ref + null)\n */\nexport type ModelWithAdditionalPropertiesRef = {\n    [key: string]: NullableObject | null;\n};\n\nexport type ModelWithOneOfEnum = {\n    foo: 'Bar';\n} | {\n    foo: 'Baz';\n} | {\n    foo: 'Qux';\n} | {\n    content: string;\n    foo: 'Quux';\n} | {\n    content: [\n        string,\n        string\n    ];\n    foo: 'Corge';\n};\n\nexport type ModelWithNestedArrayEnumsDataFoo = 'foo' | 'bar';\n\nexport type ModelWithNestedArrayEnumsDataBar = 'baz' | 'qux';\n\nexport type ModelWithNestedArrayEnumsData = {\n    foo?: Array<ModelWithNestedArrayEnumsDataFoo>;\n    bar?: Array<ModelWithNestedArrayEnumsDataBar>;\n};\n\nexport type ModelWithNestedArrayEnums = {\n    array_strings?: Array<string>;\n    data?: ModelWithNestedArrayEnumsData;\n};\n\nexport type ModelWithNestedCompositionEnums = {\n    foo?: ModelWithNestedArrayEnumsDataFoo;\n};\n\nexport type ModelWithReadOnlyAndWriteOnly = {\n    foo: string;\n    readonly bar: string;\n};\n\nexport type ModelWithConstantSizeArray = [\n    number,\n    number\n];\n\nexport type ModelWithAnyOfConstantSizeArray = [\n    number | string,\n    number | string,\n    number | string\n];\n\nexport type ModelWithPrefixItemsConstantSizeArray = [\n    ModelWithInteger,\n    number | string,\n    string\n];\n\nexport type ModelWithAnyOfConstantSizeArrayNullable = [\n    number | null | string,\n    number | null | string,\n    number | null | string\n];\n\nexport type ModelWithAnyOfConstantSizeArrayWithNSizeAndOptions = [\n    number | Import,\n    number | Import\n];\n\nexport type ModelWithAnyOfConstantSizeArrayAndIntersect = [\n    number & string,\n    number & string\n];\n\nexport type ModelWithNumericEnumUnion = {\n    /**\n     * Период\n     */\n    value?: -10 | -1 | 0 | 1 | 3 | 6 | 12;\n};\n\n/**\n * Some description with `back ticks`\n */\nexport type ModelWithBackticksInDescription = {\n    /**\n     * The template `that` should be used for parsing and importing the contents of the CSV file.\n     *\n     * <br/><p>There is one placeholder currently supported:<ul>     <li><b>${x}</b> - refers to the n-th column in the CSV file, e.g. ${1}, ${2}, ...)</li></ul><p>Example of a correct JSON template:</p>\n     * <pre>\n     * [\n     * {\n     * \"resourceType\": \"Asset\",\n     * \"identifier\": {\n     * \"name\": \"${1}\",\n     * \"domain\": {\n     * \"name\": \"${2}\",\n     * \"community\": {\n     * \"name\": \"Some Community\"\n     * }\n     * }\n     * },\n     * \"attributes\" : {\n     * \"00000000-0000-0000-0000-000000003115\" : [ {\n     * \"value\" : \"${3}\"\n     * } ],\n     * \"00000000-0000-0000-0000-000000000222\" : [ {\n     * \"value\" : \"${4}\"\n     * } ]\n     * }\n     * }\n     * ]\n     * </pre>\n     */\n    template?: string;\n};\n\nexport type ModelWithOneOfAndProperties = (SimpleParameter | NonAsciiStringæøåÆøÅöôêÊ字符串) & {\n    baz: number | null;\n    qux: number;\n};\n\n/**\n * Model used to test deduplication strategy (unused)\n */\nexport type ParameterSimpleParameterUnused = string;\n\n/**\n * Model used to test deduplication strategy\n */\nexport type PostServiceWithEmptyTagResponse = string;\n\n/**\n * Model used to test deduplication strategy\n */\nexport type PostServiceWithEmptyTagResponse2 = string;\n\n/**\n * Model used to test deduplication strategy\n */\nexport type DeleteFooData = string;\n\n/**\n * Model used to test deduplication strategy\n */\nexport type DeleteFooData2 = string;\n\n/**\n * Model with restricted keyword name\n */\nexport type Import = string;\n\nexport type SchemaWithFormRestrictedKeys = {\n    description?: string;\n    'x-enum-descriptions'?: string;\n    'x-enum-varnames'?: string;\n    'x-enumNames'?: string;\n    title?: string;\n    object?: {\n        description?: string;\n        'x-enum-descriptions'?: string;\n        'x-enum-varnames'?: string;\n        'x-enumNames'?: string;\n        title?: string;\n    };\n    array?: Array<{\n        description?: string;\n        'x-enum-descriptions'?: string;\n        'x-enum-varnames'?: string;\n        'x-enumNames'?: string;\n        title?: string;\n    }>;\n};\n\n/**\n * This schema was giving PascalCase transformations a hard time\n */\nexport type IoK8sApimachineryPkgApisMetaV1DeleteOptions = {\n    /**\n     * Must be fulfilled before a deletion is carried out. If not possible, a 409 Conflict status will be returned.\n     */\n    preconditions?: IoK8sApimachineryPkgApisMetaV1Preconditions;\n};\n\n/**\n * This schema was giving PascalCase transformations a hard time\n */\nexport type IoK8sApimachineryPkgApisMetaV1Preconditions = {\n    /**\n     * Specifies the target ResourceVersion\n     */\n    resourceVersion?: string;\n    /**\n     * Specifies the target UID.\n     */\n    uid?: string;\n};\n\nexport type AdditionalPropertiesUnknownIssue = {\n    [key: string]: string | number;\n};\n\nexport type AdditionalPropertiesUnknownIssue2 = {\n    [key: string]: string | number;\n};\n\nexport type AdditionalPropertiesUnknownIssue3 = string & {\n    entries: {\n        [key: string]: AdditionalPropertiesUnknownIssue;\n    };\n};\n\nexport type AdditionalPropertiesIntegerIssue = {\n    value: number;\n    [key: string]: number;\n};\n\nexport type OneOfAllOfIssue = ((ConstValue | GenericSchemaDuplicateIssue1SystemBoolean) & _3eNum1Период) | GenericSchemaDuplicateIssue1SystemString;\n\nexport type GenericSchemaDuplicateIssue1SystemBoolean = {\n    item?: boolean;\n    error?: string | null;\n    readonly hasError?: boolean;\n    data?: {\n        [key: string]: never;\n    };\n};\n\nexport type GenericSchemaDuplicateIssue1SystemString = {\n    item?: string | null;\n    error?: string | null;\n    readonly hasError?: boolean;\n};\n\nexport type ExternalSharedModel = {\n    id: string;\n    name?: string;\n};\n\n/**\n * This is a model with one property containing a reference\n */\nexport type ModelWithReferenceWritable = {\n    prop?: ModelWithPropertiesWritable;\n};\n\n/**\n * This is a model with one property containing an array\n */\nexport type ModelWithArrayReadOnlyAndWriteOnlyWritable = {\n    prop?: Array<ModelWithReadOnlyAndWriteOnlyWritable>;\n    propWithFile?: Array<Blob | File>;\n    propWithNumber?: Array<number>;\n};\n\n/**\n * This is a model with one nested property\n */\nexport type ModelWithPropertiesWritable = {\n    required: string;\n    requiredAndNullable: string | null;\n    string?: string;\n    number?: number;\n    boolean?: boolean;\n    reference?: ModelWithString;\n    'property with space'?: string;\n    default?: string;\n    try?: string;\n};\n\n/**\n * This is a model that contains a some patterns\n */\nexport type ModelWithPatternWritable = {\n    key: string;\n    name: string;\n    id?: string;\n    text?: string;\n    patternWithSingleQuotes?: string;\n    patternWithNewline?: string;\n    patternWithBacktick?: string;\n    patternWithUnicode?: string;\n};\n\nexport type FileWritable = {\n    /**\n     * Mime\n     */\n    mime: string;\n};\n\nexport type ModelWithReadOnlyAndWriteOnlyWritable = {\n    foo: string;\n    baz: string;\n};\n\nexport type ModelWithAnyOfConstantSizeArrayWithNSizeAndOptionsWritable = [\n    number | Import,\n    number | Import\n];\n\nexport type AdditionalPropertiesUnknownIssueWritable = {\n    [key: string]: string | number;\n};\n\nexport type OneOfAllOfIssueWritable = ((ConstValue | GenericSchemaDuplicateIssue1SystemBoolean) & _3eNum1Период) | GenericSchemaDuplicateIssue1SystemString;\n\nexport type GenericSchemaDuplicateIssue1SystemBooleanWritable = {\n    item?: boolean;\n    error?: string | null;\n    data?: {\n        [key: string]: never;\n    };\n};\n\nexport type GenericSchemaDuplicateIssue1SystemStringWritable = {\n    item?: string | null;\n    error?: string | null;\n};\n\n/**\n * This is a reusable parameter\n */\nexport type SimpleParameter = string;\n\n/**\n * Parameter with illegal characters\n */\nexport type XFooBar = ModelWithString;\n\n/**\n * A reusable request body\n */\nexport type SimpleRequestBody = ModelWithString;\n\n/**\n * A reusable request body\n */\nexport type SimpleFormData = ModelWithString;\n\nexport type ExportData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no+tag';\n};\n\nexport type PatchApiVbyApiVersionNoTagData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no+tag';\n};\n\nexport type PatchApiVbyApiVersionNoTagResponses = {\n    /**\n     * OK\n     */\n    default: unknown;\n};\n\nexport type ImportData = {\n    body: ModelWithReadOnlyAndWriteOnlyWritable | ModelWithArrayReadOnlyAndWriteOnlyWritable;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no+tag';\n};\n\nexport type ImportResponses = {\n    /**\n     * Success\n     */\n    200: ModelFromZendesk;\n    /**\n     * Default success response\n     */\n    default: ModelWithReadOnlyAndWriteOnly;\n};\n\nexport type ImportResponse = ImportResponses[keyof ImportResponses];\n\nexport type FooWowData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no+tag';\n};\n\nexport type FooWowResponses = {\n    /**\n     * OK\n     */\n    default: unknown;\n};\n\nexport type ApiVVersionODataControllerCountData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple/$count';\n};\n\nexport type ApiVVersionODataControllerCountResponses = {\n    /**\n     * Success\n     */\n    200: ModelFromZendesk;\n};\n\nexport type ApiVVersionODataControllerCountResponse = ApiVVersionODataControllerCountResponses[keyof ApiVVersionODataControllerCountResponses];\n\nexport type GetApiVbyApiVersionSimpleOperationData = {\n    body?: never;\n    path: {\n        /**\n         * foo in method\n         */\n        foo_param: string;\n    };\n    query?: never;\n    url: '/api/v{api-version}/simple:operation';\n};\n\nexport type GetApiVbyApiVersionSimpleOperationErrors = {\n    /**\n     * Default error response\n     */\n    default: ModelWithBoolean;\n};\n\nexport type GetApiVbyApiVersionSimpleOperationError = GetApiVbyApiVersionSimpleOperationErrors[keyof GetApiVbyApiVersionSimpleOperationErrors];\n\nexport type GetApiVbyApiVersionSimpleOperationResponses = {\n    /**\n     * Response is a simple number\n     */\n    200: number;\n};\n\nexport type GetApiVbyApiVersionSimpleOperationResponse = GetApiVbyApiVersionSimpleOperationResponses[keyof GetApiVbyApiVersionSimpleOperationResponses];\n\nexport type DeleteCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type GetCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type HeadCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type OptionsCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type PatchCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type PostCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type PutCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type DeleteFooData3 = {\n    body?: never;\n    headers: {\n        /**\n         * Parameter with illegal characters\n         */\n        'x-Foo-Bar': ModelWithString;\n    };\n    path: {\n        /**\n         * foo in method\n         */\n        foo_param: string;\n        /**\n         * bar in method\n         */\n        BarParam: string;\n    };\n    query?: never;\n    url: '/api/v{api-version}/foo/{foo_param}/bar/{BarParam}';\n};\n\nexport type CallWithDescriptionsData = {\n    body?: never;\n    path?: never;\n    query?: {\n        /**\n         * Testing multiline comments in string: First line\n         * Second line\n         *\n         * Fourth line\n         */\n        parameterWithBreaks?: string;\n        /**\n         * Testing backticks in string: `backticks` and ```multiple backticks``` should work\n         */\n        parameterWithBackticks?: string;\n        /**\n         * Testing slashes in string: \\backwards\\\\\\ and /forwards/// should work\n         */\n        parameterWithSlashes?: string;\n        /**\n         * Testing expression placeholders in string: ${expression} should work\n         */\n        parameterWithExpressionPlaceholders?: string;\n        /**\n         * Testing quotes in string: 'single quote''' and \"double quotes\"\"\" should work\n         */\n        parameterWithQuotes?: string;\n        /**\n         * Testing reserved characters in string: * inline * and ** inline ** should work\n         */\n        parameterWithReservedCharacters?: string;\n    };\n    url: '/api/v{api-version}/descriptions';\n};\n\nexport type DeprecatedCallData = {\n    body?: never;\n    headers: {\n        /**\n         * This parameter is deprecated\n         *\n         * @deprecated\n         */\n        parameter: DeprecatedModel | null;\n    };\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/parameters/deprecated';\n};\n\nexport type CallWithParametersData = {\n    /**\n     * This is the parameter that goes into the body\n     */\n    body: {\n        [key: string]: unknown;\n    } | null;\n    headers: {\n        /**\n         * This is the parameter that goes into the header\n         */\n        parameterHeader: string | null;\n    };\n    path: {\n        /**\n         * This is the parameter that goes into the path\n         */\n        parameterPath: string | null;\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string | null;\n    };\n    query: {\n        foo_ref_enum?: ModelWithNestedArrayEnumsDataFoo;\n        foo_all_of_enum: ModelWithNestedArrayEnumsDataFoo;\n        /**\n         * This is the parameter that goes into the query params\n         */\n        cursor: string | null;\n    };\n    url: '/api/v{api-version}/parameters/{parameterPath}';\n};\n\nexport type CallWithWeirdParameterNamesData = {\n    /**\n     * This is the parameter that goes into the body\n     */\n    body: ModelWithString | null;\n    headers: {\n        /**\n         * This is the parameter that goes into the request header\n         */\n        'parameter.header': string | null;\n    };\n    path: {\n        /**\n         * This is the parameter that goes into the path\n         */\n        'parameter.path.1'?: string;\n        /**\n         * This is the parameter that goes into the path\n         */\n        'parameter-path-2'?: string;\n        /**\n         * This is the parameter that goes into the path\n         */\n        'PARAMETER-PATH-3'?: string;\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string | null;\n    };\n    query: {\n        /**\n         * This is the parameter with a reserved keyword\n         */\n        default?: string;\n        /**\n         * This is the parameter that goes into the request query params\n         */\n        'parameter-query': string | null;\n    };\n    url: '/api/v{api-version}/parameters/{parameter.path.1}/{parameter-path-2}/{PARAMETER-PATH-3}';\n};\n\nexport type GetCallWithOptionalParamData = {\n    /**\n     * This is a required parameter\n     */\n    body: ModelWithOneOfEnum;\n    path?: never;\n    query?: {\n        /**\n         * This is an optional parameter\n         */\n        page?: number;\n    };\n    url: '/api/v{api-version}/parameters';\n};\n\nexport type PostCallWithOptionalParamData = {\n    /**\n     * This is an optional parameter\n     */\n    body?: {\n        offset?: number | null;\n    };\n    path?: never;\n    query: {\n        /**\n         * This is a required parameter\n         */\n        parameter: Pageable;\n    };\n    url: '/api/v{api-version}/parameters';\n};\n\nexport type PostCallWithOptionalParamResponses = {\n    /**\n     * Response is a simple number\n     */\n    200: number;\n    /**\n     * Success\n     */\n    204: void;\n};\n\nexport type PostCallWithOptionalParamResponse = PostCallWithOptionalParamResponses[keyof PostCallWithOptionalParamResponses];\n\nexport type PostApiVbyApiVersionRequestBodyData = {\n    /**\n     * A reusable request body\n     */\n    body?: SimpleRequestBody;\n    path?: never;\n    query?: {\n        /**\n         * This is a reusable parameter\n         */\n        parameter?: string;\n    };\n    url: '/api/v{api-version}/requestBody';\n};\n\nexport type PostApiVbyApiVersionFormDataData = {\n    /**\n     * A reusable request body\n     */\n    body?: SimpleFormData;\n    path?: never;\n    query?: {\n        /**\n         * This is a reusable parameter\n         */\n        parameter?: string;\n    };\n    url: '/api/v{api-version}/formData';\n};\n\nexport type CallWithDefaultParametersData = {\n    body?: never;\n    path?: never;\n    query?: {\n        /**\n         * This is a simple string with default value\n         */\n        parameterString?: string | null;\n        /**\n         * This is a simple number with default value\n         */\n        parameterNumber?: number | null;\n        /**\n         * This is a simple boolean with default value\n         */\n        parameterBoolean?: boolean | null;\n        /**\n         * This is a simple enum with default value\n         */\n        parameterEnum?: 'Success' | 'Warning' | 'Error';\n        /**\n         * This is a simple model with default value\n         */\n        parameterModel?: ModelWithString | null;\n    };\n    url: '/api/v{api-version}/defaults';\n};\n\nexport type CallWithDefaultOptionalParametersData = {\n    body?: never;\n    path?: never;\n    query?: {\n        /**\n         * This is a simple string that is optional with default value\n         */\n        parameterString?: string;\n        /**\n         * This is a simple number that is optional with default value\n         */\n        parameterNumber?: number;\n        /**\n         * This is a simple boolean that is optional with default value\n         */\n        parameterBoolean?: boolean;\n        /**\n         * This is a simple enum that is optional with default value\n         */\n        parameterEnum?: 'Success' | 'Warning' | 'Error';\n        /**\n         * This is a simple model that is optional with default value\n         */\n        parameterModel?: ModelWithString;\n    };\n    url: '/api/v{api-version}/defaults';\n};\n\nexport type CallToTestOrderOfParamsData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * This is a optional string with default\n         */\n        parameterOptionalStringWithDefault?: string;\n        /**\n         * This is a optional string with empty default\n         */\n        parameterOptionalStringWithEmptyDefault?: string;\n        /**\n         * This is a optional string with no default\n         */\n        parameterOptionalStringWithNoDefault?: string;\n        /**\n         * This is a string with default\n         */\n        parameterStringWithDefault: string;\n        /**\n         * This is a string with empty default\n         */\n        parameterStringWithEmptyDefault: string;\n        /**\n         * This is a string with no default\n         */\n        parameterStringWithNoDefault: string;\n        /**\n         * This is a string that can be null with no default\n         */\n        parameterStringNullableWithNoDefault?: string | null;\n        /**\n         * This is a string that can be null with default\n         */\n        parameterStringNullableWithDefault?: string | null;\n    };\n    url: '/api/v{api-version}/defaults';\n};\n\nexport type DuplicateNameData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/duplicate';\n};\n\nexport type DuplicateName2Data = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/duplicate';\n};\n\nexport type DuplicateName3Data = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/duplicate';\n};\n\nexport type DuplicateName4Data = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/duplicate';\n};\n\nexport type CallWithNoContentResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no-content';\n};\n\nexport type CallWithNoContentResponseResponses = {\n    /**\n     * Success\n     */\n    204: void;\n};\n\nexport type CallWithNoContentResponseResponse = CallWithNoContentResponseResponses[keyof CallWithNoContentResponseResponses];\n\nexport type CallWithResponseAndNoContentResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multiple-tags/response-and-no-content';\n};\n\nexport type CallWithResponseAndNoContentResponseResponses = {\n    /**\n     * Response is a simple number\n     */\n    200: number;\n    /**\n     * Success\n     */\n    204: void;\n};\n\nexport type CallWithResponseAndNoContentResponseResponse = CallWithResponseAndNoContentResponseResponses[keyof CallWithResponseAndNoContentResponseResponses];\n\nexport type DummyAData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multiple-tags/a';\n};\n\nexport type DummyAResponses = {\n    200: _400;\n};\n\nexport type DummyAResponse = DummyAResponses[keyof DummyAResponses];\n\nexport type DummyBData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multiple-tags/b';\n};\n\nexport type DummyBResponses = {\n    /**\n     * Success\n     */\n    204: void;\n};\n\nexport type DummyBResponse = DummyBResponses[keyof DummyBResponses];\n\nexport type CallWithResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/response';\n};\n\nexport type CallWithResponseResponses = {\n    default: Import;\n};\n\nexport type CallWithResponseResponse = CallWithResponseResponses[keyof CallWithResponseResponses];\n\nexport type CallWithDuplicateResponsesData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/response';\n};\n\nexport type CallWithDuplicateResponsesErrors = {\n    /**\n     * Message for 500 error\n     */\n    500: ModelWithStringError;\n    /**\n     * Message for 501 error\n     */\n    501: ModelWithStringError;\n    /**\n     * Message for 502 error\n     */\n    502: ModelWithStringError;\n    /**\n     * Message for 4XX errors\n     */\n    '4XX': DictionaryWithArray;\n    /**\n     * Default error response\n     */\n    default: ModelWithBoolean;\n};\n\nexport type CallWithDuplicateResponsesError = CallWithDuplicateResponsesErrors[keyof CallWithDuplicateResponsesErrors];\n\nexport type CallWithDuplicateResponsesResponses = {\n    /**\n     * Message for 200 response\n     */\n    200: ModelWithBoolean & ModelWithInteger;\n    /**\n     * Message for 201 response\n     */\n    201: ModelWithString;\n    /**\n     * Message for 202 response\n     */\n    202: ModelWithString;\n};\n\nexport type CallWithDuplicateResponsesResponse = CallWithDuplicateResponsesResponses[keyof CallWithDuplicateResponsesResponses];\n\nexport type CallWithResponsesData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/response';\n};\n\nexport type CallWithResponsesErrors = {\n    /**\n     * Message for 500 error\n     */\n    500: ModelWithStringError;\n    /**\n     * Message for 501 error\n     */\n    501: ModelWithStringError;\n    /**\n     * Message for 502 error\n     */\n    502: ModelWithStringError;\n    /**\n     * Message for default response\n     */\n    default: ModelWithStringError;\n};\n\nexport type CallWithResponsesError = CallWithResponsesErrors[keyof CallWithResponsesErrors];\n\nexport type CallWithResponsesResponses = {\n    /**\n     * Message for 200 response\n     */\n    200: {\n        readonly '@namespace.string'?: string;\n        readonly '@namespace.integer'?: number;\n        readonly value?: Array<ModelWithString>;\n    };\n    /**\n     * Message for 201 response\n     */\n    201: ModelThatExtends;\n    /**\n     * Message for 202 response\n     */\n    202: ModelThatExtendsExtends;\n};\n\nexport type CallWithResponsesResponse = CallWithResponsesResponses[keyof CallWithResponsesResponses];\n\nexport type CollectionFormatData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * This is an array parameter that is sent as csv format (comma-separated values)\n         */\n        parameterArrayCSV: Array<string> | null;\n        /**\n         * This is an array parameter that is sent as ssv format (space-separated values)\n         */\n        parameterArraySSV: Array<string> | null;\n        /**\n         * This is an array parameter that is sent as tsv format (tab-separated values)\n         */\n        parameterArrayTSV: Array<string> | null;\n        /**\n         * This is an array parameter that is sent as pipes format (pipe-separated values)\n         */\n        parameterArrayPipes: Array<string> | null;\n        /**\n         * This is an array parameter that is sent as multi format (multiple parameter instances)\n         */\n        parameterArrayMulti: Array<string> | null;\n    };\n    url: '/api/v{api-version}/collectionFormat';\n};\n\nexport type TypesData = {\n    body?: never;\n    path?: {\n        /**\n         * This is a number parameter\n         */\n        id?: number;\n    };\n    query: {\n        /**\n         * This is a number parameter\n         */\n        parameterNumber: number;\n        /**\n         * This is a string parameter\n         */\n        parameterString: string | null;\n        /**\n         * This is a boolean parameter\n         */\n        parameterBoolean: boolean | null;\n        /**\n         * This is an object parameter\n         */\n        parameterObject: {\n            [key: string]: unknown;\n        } | null;\n        /**\n         * This is an array parameter\n         */\n        parameterArray: Array<string> | null;\n        /**\n         * This is a dictionary parameter\n         */\n        parameterDictionary: {\n            [key: string]: unknown;\n        } | null;\n        /**\n         * This is an enum parameter\n         */\n        parameterEnum: 'Success' | 'Warning' | 'Error' | null;\n    };\n    url: '/api/v{api-version}/types';\n};\n\nexport type TypesResponses = {\n    /**\n     * Response is a simple number\n     */\n    200: number;\n    /**\n     * Response is a simple string\n     */\n    201: string;\n    /**\n     * Response is a simple boolean\n     */\n    202: boolean;\n    /**\n     * Response is a simple object\n     */\n    203: {\n        [key: string]: unknown;\n    };\n};\n\nexport type TypesResponse = TypesResponses[keyof TypesResponses];\n\nexport type UploadFileData = {\n    body: Blob | File;\n    path: {\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string | null;\n    };\n    query?: never;\n    url: '/api/v{api-version}/upload';\n};\n\nexport type UploadFileResponses = {\n    200: boolean;\n};\n\nexport type UploadFileResponse = UploadFileResponses[keyof UploadFileResponses];\n\nexport type FileResponseData = {\n    body?: never;\n    path: {\n        id: string;\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string;\n    };\n    query?: never;\n    url: '/api/v{api-version}/file/{id}';\n};\n\nexport type FileResponseResponses = {\n    /**\n     * Success\n     */\n    200: Blob | File;\n};\n\nexport type FileResponseResponse = FileResponseResponses[keyof FileResponseResponses];\n\nexport type ComplexTypesData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * Parameter containing object\n         */\n        parameterObject: {\n            first?: {\n                second?: {\n                    third?: string;\n                };\n            };\n        };\n        /**\n         * Parameter containing reference\n         */\n        parameterReference: ModelWithString;\n    };\n    url: '/api/v{api-version}/complex';\n};\n\nexport type ComplexTypesErrors = {\n    /**\n     * 400 `server` error\n     */\n    400: unknown;\n    /**\n     * 500 server error\n     */\n    500: unknown;\n};\n\nexport type ComplexTypesResponses = {\n    /**\n     * Successful response\n     */\n    200: Array<ModelWithString>;\n};\n\nexport type ComplexTypesResponse = ComplexTypesResponses[keyof ComplexTypesResponses];\n\nexport type MultipartResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multipart';\n};\n\nexport type MultipartResponseResponses = {\n    /**\n     * OK\n     */\n    200: {\n        file?: Blob | File;\n        metadata?: {\n            foo?: string;\n            bar?: string;\n        };\n    };\n};\n\nexport type MultipartResponseResponse = MultipartResponseResponses[keyof MultipartResponseResponses];\n\nexport type MultipartRequestData = {\n    body?: {\n        content?: Blob | File;\n        data?: ModelWithString | null;\n    };\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multipart';\n};\n\nexport type ComplexParamsData = {\n    body?: {\n        readonly key: string | null;\n        name: string | null;\n        enabled?: boolean;\n        type: 'Monkey' | 'Horse' | 'Bird';\n        listOfModels?: Array<ModelWithString> | null;\n        listOfStrings?: Array<string> | null;\n        parameters: ModelWithString | ModelWithEnum | ModelWithArray | ModelWithDictionary;\n        readonly user?: {\n            readonly id?: number;\n            readonly name?: string | null;\n        };\n    };\n    path: {\n        id: number;\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string;\n    };\n    query?: never;\n    url: '/api/v{api-version}/complex/{id}';\n};\n\nexport type ComplexParamsResponses = {\n    /**\n     * Success\n     */\n    200: ModelWithString;\n};\n\nexport type ComplexParamsResponse = ComplexParamsResponses[keyof ComplexParamsResponses];\n\nexport type CallWithResultFromHeaderData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/header';\n};\n\nexport type CallWithResultFromHeaderErrors = {\n    /**\n     * 400 server error\n     */\n    400: unknown;\n    /**\n     * 500 server error\n     */\n    500: unknown;\n};\n\nexport type CallWithResultFromHeaderResponses = {\n    /**\n     * Successful response\n     */\n    200: unknown;\n};\n\nexport type TestErrorCodeData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * Status code to return\n         */\n        status: number;\n    };\n    url: '/api/v{api-version}/error';\n};\n\nexport type TestErrorCodeErrors = {\n    /**\n     * Custom message: Internal Server Error\n     */\n    500: unknown;\n    /**\n     * Custom message: Not Implemented\n     */\n    501: unknown;\n    /**\n     * Custom message: Bad Gateway\n     */\n    502: unknown;\n    /**\n     * Custom message: Service Unavailable\n     */\n    503: unknown;\n};\n\nexport type TestErrorCodeResponses = {\n    /**\n     * Custom message: Successful response\n     */\n    200: unknown;\n};\n\nexport type NonAsciiæøåÆøÅöôêÊ字符串Data = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * Dummy input param\n         */\n        nonAsciiParamæøåÆØÅöôêÊ: number;\n    };\n    url: '/api/v{api-version}/non-ascii-æøåÆØÅöôêÊ字符串';\n};\n\nexport type NonAsciiæøåÆøÅöôêÊ字符串Responses = {\n    /**\n     * Successful response\n     */\n    200: Array<NonAsciiStringæøåÆøÅöôêÊ字符串>;\n};\n\nexport type NonAsciiæøåÆøÅöôêÊ字符串Response = NonAsciiæøåÆøÅöôêÊ字符串Responses[keyof NonAsciiæøåÆøÅöôêÊ字符串Responses];\n\nexport type PutWithFormUrlEncodedData = {\n    body: ArrayWithStrings;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/non-ascii-æøåÆØÅöôêÊ字符串';\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-nuxt/default/client/client.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport { useAsyncData, useFetch, useLazyAsyncData, useLazyFetch } from 'nuxt/app';\nimport { reactive, ref, toValue, watch } from 'vue';\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 } from './types.gen';\nimport {\n  buildUrl,\n  createConfig,\n  executeFetchFn,\n  mergeConfigs,\n  mergeHeaders,\n  mergeInterceptors,\n  serializeBody,\n  setAuthParams,\n  unwrapRefs,\n} from './utils.gen';\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 beforeRequest = async (options: RequestOptions) => {\n    const opts = {\n      ..._config,\n      ...options,\n      $fetch: options.$fetch ?? _config.$fetch ?? $fetch,\n      headers: mergeHeaders(_config.headers, options.headers),\n      onRequest: mergeInterceptors(_config.onRequest, options.onRequest),\n      onResponse: mergeInterceptors(_config.onResponse, options.onResponse),\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    const url = buildUrl(opts);\n\n    return { opts, url };\n  };\n\n  const request: Client['request'] = ({ asyncDataOptions, composable = '$fetch', ...options }) => {\n    const key = options.key;\n    const opts = {\n      ..._config,\n      ...options,\n      $fetch: options.$fetch ?? _config.$fetch ?? $fetch,\n      headers: mergeHeaders(_config.headers, options.headers),\n      onRequest: mergeInterceptors(_config.onRequest, options.onRequest),\n      onResponse: mergeInterceptors(_config.onResponse, options.onResponse),\n    };\n\n    const { requestValidator, responseTransformer, responseValidator, security } = opts;\n    if (requestValidator || security) {\n      // auth must happen in interceptors otherwise we'd need to require\n      // asyncContext enabled\n      // https://nuxt.com/docs/guide/going-further/experimental-features#asynccontext\n      opts.onRequest = [\n        async ({ options }) => {\n          if (security) {\n            await setAuthParams({\n              auth: opts.auth,\n              headers: options.headers,\n              query: options.query,\n              security,\n            });\n          }\n\n          if (requestValidator) {\n            await requestValidator({\n              ...options,\n              // @ts-expect-error\n              body: options.rawBody,\n            });\n          }\n        },\n        ...opts.onRequest,\n      ];\n    }\n\n    if (responseTransformer || responseValidator) {\n      opts.onResponse = [\n        ...opts.onResponse,\n        async ({ options, response }) => {\n          if (options.responseType && options.responseType !== 'json') {\n            return;\n          }\n\n          if (!response.ok) {\n            return;\n          }\n\n          if (responseValidator) {\n            await responseValidator(response._data);\n          }\n\n          if (responseTransformer) {\n            response._data = await responseTransformer(response._data);\n          }\n        },\n      ];\n    }\n\n    // remove Content-Type header if body is empty to avoid sending invalid requests\n    if (opts.body === undefined || opts.body === '') {\n      opts.headers.delete('Content-Type');\n    }\n\n    const fetchFn = opts.$fetch;\n\n    if (composable === '$fetch') {\n      return executeFetchFn(\n        // @ts-expect-error\n        opts,\n        fetchFn,\n      );\n    }\n\n    if (composable === 'useFetch' || composable === 'useLazyFetch') {\n      opts.rawBody = opts.body;\n      const bodyParams = reactive({\n        body: opts.body,\n        bodySerializer: opts.bodySerializer,\n      });\n      const body = ref(serializeBody({ ...opts, body: toValue(opts.body) }));\n      opts.body = body;\n      watch(bodyParams, (changed) => {\n        body.value = serializeBody(changed);\n      });\n      return composable === 'useLazyFetch'\n        ? useLazyFetch(() => buildUrl(opts), { ...opts, ...asyncDataOptions })\n        : useFetch(() => buildUrl(opts), { ...opts, ...asyncDataOptions });\n    }\n\n    const handler: any = () =>\n      executeFetchFn(\n        // @ts-expect-error\n        opts,\n        fetchFn,\n      );\n\n    if (composable === 'useAsyncData') {\n      return key\n        ? useAsyncData(key, handler, asyncDataOptions)\n        : useAsyncData(handler, asyncDataOptions);\n    }\n\n    if (composable === 'useLazyAsyncData') {\n      return key\n        ? useLazyAsyncData(key, handler, asyncDataOptions)\n        : useLazyAsyncData(handler, asyncDataOptions);\n    }\n\n    return undefined as any;\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      ...unwrapRefs(opts),\n      body: opts.body as BodyInit | null | undefined,\n      method,\n      onRequest: undefined,\n      serializedBody: getValidRequestBody(opts) as BodyInit | null | undefined,\n      signal: unwrapRefs(opts.signal) as AbortSignal,\n      url,\n    });\n  };\n\n  const _buildUrl: Client['buildUrl'] = (options) =>\n    buildUrl({ ..._config, ...options } as typeof 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    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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-nuxt/default/client/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type { Auth } from '../core/auth.gen';\nexport type { QuerySerializerOptions } from '../core/bodySerializer.gen';\nexport {\n  formDataBodySerializer,\n  jsonBodySerializer,\n  urlSearchParamsBodySerializer,\n} from '../core/bodySerializer.gen';\nexport { buildClientParams } from '../core/params.gen';\nexport { serializeQueryKeyValue } from '../core/queryKeySerializer.gen';\nexport { createClient } from './client.gen';\nexport type {\n  Client,\n  ClientOptions,\n  Composable,\n  Config,\n  CreateClientConfig,\n  Options,\n  RequestOptions,\n  RequestResult,\n  TDataShape,\n} from './types.gen';\nexport { createConfig } from './utils.gen';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-nuxt/default/client/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type {\n  AsyncDataOptions,\n  useAsyncData,\n  useFetch,\n  UseFetchOptions,\n  useLazyAsyncData,\n  useLazyFetch,\n} from 'nuxt/app';\nimport type { Ref } from 'vue';\n\nimport type { Auth } from '../core/auth.gen';\nimport type { QuerySerializerOptions } from '../core/bodySerializer.gen';\nimport type {\n  ServerSentEventsOptions,\n  ServerSentEventsResult,\n} from '../core/serverSentEvents.gen';\nimport type { Client as CoreClient, Config as CoreConfig } from '../core/types.gen';\n\nexport type ArraySeparatorStyle = ArrayStyle | MatrixStyle;\ntype ArrayStyle = 'form' | 'spaceDelimited' | 'pipeDelimited';\ntype MatrixStyle = 'label' | 'matrix' | 'simple';\nexport type ObjectSeparatorStyle = ObjectStyle | MatrixStyle;\ntype ObjectStyle = 'form' | 'deepObject';\n\nexport type QuerySerializer = (query: Parameters<Client['buildUrl']>[0]['query']) => string;\n\ntype WithRefs<TData> = {\n  [K in keyof TData]: NonNullable<TData[K]> extends object\n    ? WithRefs<NonNullable<TData[K]>> | Ref<NonNullable<TData[K]>> | Extract<TData[K], null>\n    : NonNullable<TData[K]> | Ref<NonNullable<TData[K]>> | Extract<TData[K], null>;\n};\n\n// copied from Nuxt\nexport type KeysOf<T> = Array<T extends T ? (keyof T extends string ? keyof T : never) : never>;\n\nexport interface Config<T extends ClientOptions = ClientOptions>\n  extends\n    Omit<FetchOptions<unknown>, 'baseURL' | 'body' | 'headers' | 'method' | 'query'>,\n    WithRefs<Pick<FetchOptions<unknown>, 'query'>>,\n    Omit<CoreConfig, 'querySerializer'> {\n  /**\n   * Base URL for all requests made by this client.\n   */\n  baseURL?: T['baseURL'];\n  /**\n   * A function for serializing request query parameters. By default, arrays\n   * will be exploded in form style, objects will be exploded in deepObject\n   * style, and reserved characters are percent-encoded.\n   *\n   * {@link https://swagger.io/docs/specification/serialization/#query View examples}\n   */\n  querySerializer?: QuerySerializer | QuerySerializerOptions;\n}\n\nexport interface RequestOptions<\n  TComposable extends Composable = '$fetch',\n  ResT = unknown,\n  DefaultT = undefined,\n  Url extends string = string,\n>\n  extends\n    Config,\n    WithRefs<{\n      path?: FetchOptions<unknown>['query'];\n      query?: FetchOptions<unknown>['query'];\n    }>,\n    Pick<\n      ServerSentEventsOptions<ResT>,\n      | 'onSseError'\n      | 'onSseEvent'\n      | 'sseDefaultRetryDelay'\n      | 'sseMaxRetryAttempts'\n      | 'sseMaxRetryDelay'\n    > {\n  asyncDataOptions?: AsyncDataOptions<ResT, ResT, KeysOf<ResT>, DefaultT>;\n  /**\n   * Any body that you want to add to your request.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/fetch#body}\n   */\n  body?: NonNullable<unknown> | Ref<NonNullable<unknown>> | null;\n  composable?: TComposable;\n  key?: string;\n  rawBody?: NonNullable<unknown> | Ref<NonNullable<unknown>> | null;\n  /**\n   * Security mechanism(s) to use for the request.\n   */\n  security?: ReadonlyArray<Auth>;\n  url: Url;\n}\n\nexport type RequestResult<\n  TComposable extends Composable,\n  ResT,\n  TError,\n> = TComposable extends '$fetch'\n  ? ReturnType<typeof $fetch<ResT>>\n  : TComposable extends 'useAsyncData'\n    ? ReturnType<typeof useAsyncData<ResT | null, TError>>\n    : TComposable extends 'useFetch'\n      ? ReturnType<typeof useFetch<ResT | null, TError>>\n      : TComposable extends 'useLazyAsyncData'\n        ? ReturnType<typeof useLazyAsyncData<ResT | null, TError>>\n        : TComposable extends 'useLazyFetch'\n          ? ReturnType<typeof useLazyFetch<ResT | null, TError>>\n          : never;\n\nexport interface ClientOptions {\n  baseURL?: string;\n}\n\ntype MethodFn = <\n  TComposable extends Composable = '$fetch',\n  ResT = unknown,\n  TError = unknown,\n  DefaultT = undefined,\n>(\n  options: Omit<RequestOptions<TComposable, ResT, DefaultT>, 'method'>,\n) => RequestResult<TComposable, ResT, TError>;\n\ntype SseFn = <\n  TComposable extends Composable = '$fetch',\n  ResT = unknown,\n  TError = unknown,\n  DefaultT = undefined,\n>(\n  options: Omit<RequestOptions<TComposable, ResT, DefaultT>, 'method'>,\n) => Promise<ServerSentEventsResult<RequestResult<TComposable, ResT, TError>>>;\n\ntype RequestFn = <\n  TComposable extends Composable = '$fetch',\n  ResT = unknown,\n  TError = unknown,\n  DefaultT = undefined,\n>(\n  options: Omit<RequestOptions<TComposable, ResT, DefaultT>, 'method'> &\n    Pick<Required<RequestOptions<TComposable, ResT, DefaultT>>, 'method'>,\n) => RequestResult<TComposable, ResT, TError>;\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 = ClientOptions> = (\n  override?: Config<ClientOptions & T>,\n) => Config<Required<ClientOptions> & T>;\n\nexport interface TDataShape {\n  body?: unknown;\n  headers?: unknown;\n  path?: FetchOptions<unknown>['query'];\n  query?: FetchOptions<unknown>['query'];\n  url: string;\n}\n\nexport type BuildUrlOptions<\n  TData extends Omit<TDataShape, 'headers'> = Omit<TDataShape, 'headers'>,\n> = Pick<WithRefs<TData>, 'path' | 'query'> &\n  Pick<TData, 'url'> &\n  Pick<Options<'$fetch', TData>, 'baseURL' | 'querySerializer'>;\n\ntype BuildUrlFn = <TData extends Omit<TDataShape, 'headers'>>(\n  options: BuildUrlOptions<TData>,\n) => string;\n\nexport type Client = CoreClient<RequestFn, Config, MethodFn, BuildUrlFn, SseFn>;\n\ntype OmitKeys<T, K> = Pick<T, Exclude<keyof T, K>>;\n\nexport type Options<\n  TComposable extends Composable = '$fetch',\n  TData extends TDataShape = TDataShape,\n  ResT = unknown,\n  DefaultT = undefined,\n> = OmitKeys<RequestOptions<TComposable, ResT, DefaultT>, 'body' | 'path' | 'query' | 'url'> &\n  ([TData] extends [never] ? unknown : WithRefs<Omit<TData, 'url'>>);\n\ntype FetchOptions<TData> = Omit<UseFetchOptions<TData, TData>, keyof AsyncDataOptions<TData>>;\n\nexport type Composable =\n  | '$fetch'\n  | 'useAsyncData'\n  | 'useFetch'\n  | 'useLazyAsyncData'\n  | 'useLazyFetch';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-nuxt/default/client/utils.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { ComputedRef, Ref } from 'vue';\nimport { isRef, toValue, unref } from 'vue';\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 type {\n  ArraySeparatorStyle,\n  BuildUrlOptions,\n  Client,\n  ClientOptions,\n  Config,\n  QuerySerializer,\n  RequestOptions,\n} from './types.gen';\n\ntype PathSerializer = Pick<Required<BuildUrlOptions>, 'path' | 'url'>;\n\nconst PATH_PARAM_RE = /\\{[^{}]+\\}/g;\n\ntype MaybeArray<T> = T | T[];\n\nconst 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 = toValue((toValue(path) as Record<string, unknown> | undefined)?.[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 createQuerySerializer = <T = unknown>({\n  parameters = {},\n  ...args\n}: QuerySerializerOptions = {}) => {\n  const querySerializer = (queryParams: T) => {\n    const search: string[] = [];\n    const qParams = toValue(queryParams);\n    if (qParams && typeof qParams === 'object') {\n      for (const name in qParams) {\n        const value = toValue(qParams[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\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    (toValue(options.query) as Record<string, unknown> | undefined)?.[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    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        const queryValue = toValue(options.query) as Record<string, unknown> | undefined;\n        if (queryValue) {\n          queryValue[name] = token;\n        }\n        break;\n      }\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  const url = 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  return url;\n};\n\nexport const getUrl = ({\n  baseUrl,\n  path,\n  query,\n  querySerializer,\n  url: _url,\n}: Pick<BuildUrlOptions, 'path' | 'query' | 'url'> & {\n  baseUrl?: string;\n  querySerializer: QuerySerializer;\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 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 || typeof header !== 'object') {\n      continue;\n    }\n\n    let h: unknown = header;\n    if (isRef(h)) {\n      h = unref(h);\n    }\n\n    const iterator =\n      h instanceof Headers ? headersEntries(h) : Object.entries(h as Record<string, unknown>);\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, unwrapRefs(v) as string);\n        }\n      } else if (value !== undefined) {\n        const v = unwrapRefs(value);\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(key, typeof v === 'object' ? JSON.stringify(v) : (v as string));\n      }\n    }\n  }\n  return mergedHeaders;\n};\n\nexport const mergeInterceptors = <T>(...args: Array<MaybeArray<T>>): Array<T> =>\n  args.reduce<Array<T>>((acc, item) => {\n    if (typeof item === 'function') {\n      acc.push(item);\n    } else if (Array.isArray(item)) {\n      return acc.concat(item);\n    }\n    return acc;\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  querySerializer: defaultQuerySerializer,\n  ...override,\n});\n\ntype UnwrapRefs<T> =\n  T extends Ref<infer V>\n    ? V\n    : T extends ComputedRef<infer V>\n      ? V\n      : T extends Record<string, unknown> // this doesn't handle functions well\n        ? { [K in keyof T]: UnwrapRefs<T[K]> }\n        : T;\n\nexport const unwrapRefs = <T>(value: T): UnwrapRefs<T> => {\n  if (value === null || typeof value !== 'object' || value instanceof Headers) {\n    return (isRef(value) ? unref(value) : value) as UnwrapRefs<T>;\n  }\n\n  if (\n    value instanceof Blob ||\n    value instanceof FormData ||\n    value instanceof ReadableStream ||\n    value instanceof AbortSignal\n  ) {\n    return value as UnwrapRefs<T>;\n  }\n\n  if (Array.isArray(value)) {\n    return value.map((item) => unwrapRefs(item)) as UnwrapRefs<T>;\n  }\n\n  if (isRef(value)) {\n    return unwrapRefs(unref(value) as T);\n  }\n\n  // unwrap into new object to avoid modifying the source\n  const result: Record<string, unknown> = {};\n  for (const key in value) {\n    result[key] = unwrapRefs(value[key] as T);\n  }\n  return result as UnwrapRefs<T>;\n};\n\nexport const serializeBody = (\n  opts: Pick<Parameters<Client['request']>[0], 'body' | 'bodySerializer'>,\n) => {\n  if (opts.body && opts.bodySerializer) {\n    return opts.bodySerializer(opts.body);\n  }\n  return opts.body;\n};\n\nexport const executeFetchFn = (\n  opts: Omit<Parameters<Client['request']>[0], 'composable'>,\n  fetchFn: Required<Config>['$fetch'],\n) => {\n  const unwrappedOpts = unwrapRefs(opts);\n  unwrappedOpts.rawBody = unwrappedOpts.body;\n  unwrappedOpts.body = serializeBody(unwrappedOpts);\n  return fetchFn(\n    buildUrl(opts),\n    // @ts-expect-error\n    unwrappedOpts,\n  );\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-nuxt/default/client.gen.ts",
    "content": "// 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: 'http://localhost:3000/base' }));\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-nuxt/default/core/auth.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-nuxt/default/core/bodySerializer.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-nuxt/default/core/params.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-nuxt/default/core/pathSerializer.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-nuxt/default/core/queryKeySerializer.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\n/**\n * JSON-friendly union that mirrors what Pinia Colada can hash.\n */\nexport type JsonValue =\n  | null\n  | string\n  | number\n  | boolean\n  | JsonValue[]\n  | { [key: string]: JsonValue };\n\n/**\n * Replacer that converts non-JSON values (bigint, Date, etc.) to safe substitutes.\n */\nexport const queryKeyJsonReplacer = (_key: string, value: unknown) => {\n  if (value === undefined || typeof value === 'function' || typeof value === 'symbol') {\n    return undefined;\n  }\n  if (typeof value === 'bigint') {\n    return value.toString();\n  }\n  if (value instanceof Date) {\n    return value.toISOString();\n  }\n  return value;\n};\n\n/**\n * Safely stringifies a value and parses it back into a JsonValue.\n */\nexport const stringifyToJsonValue = (input: unknown): JsonValue | undefined => {\n  try {\n    const json = JSON.stringify(input, queryKeyJsonReplacer);\n    if (json === undefined) {\n      return undefined;\n    }\n    return JSON.parse(json) as JsonValue;\n  } catch {\n    return undefined;\n  }\n};\n\n/**\n * Detects plain objects (including objects with a null prototype).\n */\nconst isPlainObject = (value: unknown): value is Record<string, unknown> => {\n  if (value === null || typeof value !== 'object') {\n    return false;\n  }\n  const prototype = Object.getPrototypeOf(value as object);\n  return prototype === Object.prototype || prototype === null;\n};\n\n/**\n * Turns URLSearchParams into a sorted JSON object for deterministic keys.\n */\nconst serializeSearchParams = (params: URLSearchParams): JsonValue => {\n  const entries = Array.from(params.entries()).sort(([a], [b]) => a.localeCompare(b));\n  const result: Record<string, JsonValue> = {};\n\n  for (const [key, value] of entries) {\n    const existing = result[key];\n    if (existing === undefined) {\n      result[key] = value;\n      continue;\n    }\n\n    if (Array.isArray(existing)) {\n      (existing as string[]).push(value);\n    } else {\n      result[key] = [existing, value];\n    }\n  }\n\n  return result;\n};\n\n/**\n * Normalizes any accepted value into a JSON-friendly shape for query keys.\n */\nexport const serializeQueryKeyValue = (value: unknown): JsonValue | undefined => {\n  if (value === null) {\n    return null;\n  }\n\n  if (typeof value === 'string' || typeof value === 'number' || typeof value === 'boolean') {\n    return value;\n  }\n\n  if (value === undefined || typeof value === 'function' || typeof value === 'symbol') {\n    return undefined;\n  }\n\n  if (typeof value === 'bigint') {\n    return value.toString();\n  }\n\n  if (value instanceof Date) {\n    return value.toISOString();\n  }\n\n  if (Array.isArray(value)) {\n    return stringifyToJsonValue(value);\n  }\n\n  if (typeof URLSearchParams !== 'undefined' && value instanceof URLSearchParams) {\n    return serializeSearchParams(value);\n  }\n\n  if (isPlainObject(value)) {\n    return stringifyToJsonValue(value);\n  }\n\n  return undefined;\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-nuxt/default/core/serverSentEvents.gen.ts",
    "content": "// 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 const 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            // Normalize line endings: CRLF -> LF, then CR -> LF\n            buffer = buffer.replace(/\\r\\n/g, '\\n').replace(/\\r/g, '\\n');\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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-nuxt/default/core/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { Auth, AuthToken } from './auth.gen';\nimport type { BodySerializer, QuerySerializer, QuerySerializerOptions } from './bodySerializer.gen';\n\nexport type HttpMethod =\n  | 'connect'\n  | 'delete'\n  | 'get'\n  | 'head'\n  | 'options'\n  | 'patch'\n  | 'post'\n  | 'put'\n  | 'trace';\n\nexport type Client<\n  RequestFn = never,\n  Config = unknown,\n  MethodFn = never,\n  BuildUrlFn = never,\n  SseFn = never,\n> = {\n  /**\n   * Returns the final request URL.\n   */\n  buildUrl: BuildUrlFn;\n  getConfig: () => Config;\n  request: RequestFn;\n  setConfig: (config: Config) => Config;\n} & {\n  [K in HttpMethod]: MethodFn;\n} & ([SseFn] extends [never] ? { sse?: never } : { sse: { [K in HttpMethod]: SseFn } });\n\nexport interface Config {\n  /**\n   * Auth token or a function returning auth token. The resolved value will be\n   * added to the request payload as defined by its `security` array.\n   */\n  auth?: ((auth: Auth) => Promise<AuthToken> | AuthToken) | AuthToken;\n  /**\n   * A function for serializing request body parameter. By default,\n   * {@link JSON.stringify()} will be used.\n   */\n  bodySerializer?: BodySerializer | null;\n  /**\n   * An object containing any HTTP headers that you want to pre-populate your\n   * `Headers` object with.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/Headers/Headers#init See more}\n   */\n  headers?:\n    | RequestInit['headers']\n    | Record<\n        string,\n        string | number | boolean | (string | number | boolean)[] | null | undefined | unknown\n      >;\n  /**\n   * The request method.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/fetch#method See more}\n   */\n  method?: Uppercase<HttpMethod>;\n  /**\n   * A function for serializing request query parameters. By default, arrays\n   * will be exploded in form style, objects will be exploded in deepObject\n   * style, and reserved characters are percent-encoded.\n   *\n   * This method will have no effect if the native `paramsSerializer()` Axios\n   * API function is used.\n   *\n   * {@link https://swagger.io/docs/specification/serialization/#query View examples}\n   */\n  querySerializer?: QuerySerializer | QuerySerializerOptions;\n  /**\n   * A function validating request data. This is useful if you want to ensure\n   * the request conforms to the desired shape, so it can be safely sent to\n   * the server.\n   */\n  requestValidator?: (data: unknown) => Promise<unknown>;\n  /**\n   * A function transforming response data before it's returned. This is useful\n   * for post-processing data, e.g. converting ISO strings into Date objects.\n   */\n  responseTransformer?: (data: unknown) => Promise<unknown>;\n  /**\n   * A function validating response data. This is useful if you want to ensure\n   * the response conforms to the desired shape, so it can be safely passed to\n   * the transformers and returned to the user.\n   */\n  responseValidator?: (data: unknown) => Promise<unknown>;\n}\n\ntype IsExactlyNeverOrNeverUndefined<T> = [T] extends [never]\n  ? true\n  : [T] extends [never | undefined]\n    ? [undefined] extends [T]\n      ? false\n      : true\n    : false;\n\nexport type OmitNever<T extends Record<string, unknown>> = {\n  [K in keyof T as IsExactlyNeverOrNeverUndefined<T[K]> extends true ? never : K]: T[K];\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-nuxt/default/core/utils.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-nuxt/default/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport { apiVVersionODataControllerCount, callToTestOrderOfParams, callWithDefaultOptionalParameters, callWithDefaultParameters, callWithDescriptions, callWithDuplicateResponses, callWithNoContentResponse, callWithParameters, callWithResponse, callWithResponseAndNoContentResponse, callWithResponses, callWithResultFromHeader, callWithWeirdParameterNames, collectionFormat, complexParams, complexTypes, deleteCallWithoutParametersAndResponse, deleteFoo, deprecatedCall, dummyA, dummyB, duplicateName, duplicateName2, duplicateName3, duplicateName4, export_, fileResponse, fooWow, getApiVbyApiVersionSimpleOperation, getCallWithOptionalParam, getCallWithoutParametersAndResponse, headCallWithoutParametersAndResponse, import_, multipartRequest, multipartResponse, nonAsciiæøåÆøÅöôêÊ字符串, type Options, optionsCallWithoutParametersAndResponse, patchApiVbyApiVersionNoTag, patchCallWithoutParametersAndResponse, postApiVbyApiVersionFormData, postApiVbyApiVersionRequestBody, postCallWithOptionalParam, postCallWithoutParametersAndResponse, putCallWithoutParametersAndResponse, putWithFormUrlEncoded, testErrorCode, types, uploadFile } from './sdk.gen';\nexport type { _3eNum1Период, _400, AdditionalPropertiesIntegerIssue, AdditionalPropertiesUnknownIssue, AdditionalPropertiesUnknownIssue2, AdditionalPropertiesUnknownIssue3, AdditionalPropertiesUnknownIssueWritable, AnyOfAnyAndNull, AnyOfArrays, ApiVVersionODataControllerCountData, ApiVVersionODataControllerCountResponse, ApiVVersionODataControllerCountResponses, ArrayWithAnyOfProperties, ArrayWithArray, ArrayWithBooleans, ArrayWithNumbers, ArrayWithProperties, ArrayWithReferences, ArrayWithStrings, CallToTestOrderOfParamsData, CallWithDefaultOptionalParametersData, CallWithDefaultParametersData, CallWithDescriptionsData, CallWithDuplicateResponsesData, CallWithDuplicateResponsesError, CallWithDuplicateResponsesErrors, CallWithDuplicateResponsesResponse, CallWithDuplicateResponsesResponses, CallWithNoContentResponseData, CallWithNoContentResponseResponse, CallWithNoContentResponseResponses, CallWithParametersData, CallWithResponseAndNoContentResponseData, CallWithResponseAndNoContentResponseResponse, CallWithResponseAndNoContentResponseResponses, CallWithResponseData, CallWithResponseResponse, CallWithResponseResponses, CallWithResponsesData, CallWithResponsesError, CallWithResponsesErrors, CallWithResponsesResponse, CallWithResponsesResponses, CallWithResultFromHeaderData, CallWithResultFromHeaderErrors, CallWithResultFromHeaderResponses, CallWithWeirdParameterNamesData, CamelCaseCommentWithBreaks, CharactersInDescription, ClientOptions, CollectionFormatData, CommentWithBackticks, CommentWithBackticksAndQuotes, CommentWithBreaks, CommentWithExpressionPlaceholders, CommentWithQuotes, CommentWithReservedCharacters, CommentWithSlashes, ComplexParamsData, ComplexParamsResponse, ComplexParamsResponses, ComplexTypesData, ComplexTypesErrors, ComplexTypesResponse, ComplexTypesResponses, CompositionBaseModel, CompositionExtendedModel, CompositionWithAllOfAndNullable, CompositionWithAnyOf, CompositionWithAnyOfAndNullable, CompositionWithAnyOfAnonymous, CompositionWithNestedAnyAndTypeNull, CompositionWithNestedAnyOfAndNull, CompositionWithOneOf, CompositionWithOneOfAndComplexArrayDictionary, CompositionWithOneOfAndNullable, CompositionWithOneOfAndProperties, CompositionWithOneOfAndSimpleArrayDictionary, CompositionWithOneOfAndSimpleDictionary, CompositionWithOneOfAnonymous, CompositionWithOneOfDiscriminator, ConstValue, Default, DeleteCallWithoutParametersAndResponseData, DeleteFooData, DeleteFooData2, DeleteFooData3, DeprecatedCallData, DeprecatedModel, DictionaryWithArray, DictionaryWithDictionary, DictionaryWithProperties, DictionaryWithPropertiesAndAdditionalProperties, DictionaryWithReference, DictionaryWithString, DummyAData, DummyAResponse, DummyAResponses, DummyBData, DummyBResponse, DummyBResponses, DuplicateName2Data, DuplicateName3Data, DuplicateName4Data, DuplicateNameData, EnumFromDescription, EnumWithExtensions, EnumWithNumbers, EnumWithReplacedCharacters, EnumWithStrings, EnumWithXEnumNames, ExportData, ExternalRefA, ExternalRefB, ExternalSharedModel, File, FileResponseData, FileResponseResponse, FileResponseResponses, FileWritable, FooWowData, FooWowResponses, FreeFormObjectWithAdditionalPropertiesEqEmptyObject, FreeFormObjectWithAdditionalPropertiesEqTrue, FreeFormObjectWithoutAdditionalProperties, GenericSchemaDuplicateIssue1SystemBoolean, GenericSchemaDuplicateIssue1SystemBooleanWritable, GenericSchemaDuplicateIssue1SystemString, GenericSchemaDuplicateIssue1SystemStringWritable, GetApiVbyApiVersionSimpleOperationData, GetApiVbyApiVersionSimpleOperationError, GetApiVbyApiVersionSimpleOperationErrors, GetApiVbyApiVersionSimpleOperationResponse, GetApiVbyApiVersionSimpleOperationResponses, GetCallWithOptionalParamData, GetCallWithoutParametersAndResponseData, HeadCallWithoutParametersAndResponseData, Import, ImportData, ImportResponse, ImportResponses, IoK8sApimachineryPkgApisMetaV1DeleteOptions, IoK8sApimachineryPkgApisMetaV1Preconditions, ModelCircle, ModelFromZendesk, ModelSquare, ModelThatExtends, ModelThatExtendsExtends, ModelWithAdditionalPropertiesEqTrue, ModelWithAdditionalPropertiesRef, ModelWithAnyOfConstantSizeArray, ModelWithAnyOfConstantSizeArrayAndIntersect, ModelWithAnyOfConstantSizeArrayNullable, ModelWithAnyOfConstantSizeArrayWithNSizeAndOptions, ModelWithAnyOfConstantSizeArrayWithNSizeAndOptionsWritable, ModelWithArray, ModelWithArrayReadOnlyAndWriteOnly, ModelWithArrayReadOnlyAndWriteOnlyWritable, ModelWithBackticksInDescription, ModelWithBoolean, ModelWithCircularReference, ModelWithConst, ModelWithConstantSizeArray, ModelWithDictionary, ModelWithDuplicateImports, ModelWithDuplicateProperties, ModelWithEnum, ModelWithEnumFromDescription, ModelWithEnumWithHyphen, ModelWithInteger, ModelWithNestedArrayEnums, ModelWithNestedArrayEnumsData, ModelWithNestedArrayEnumsDataBar, ModelWithNestedArrayEnumsDataFoo, ModelWithNestedCompositionEnums, ModelWithNestedEnums, ModelWithNestedProperties, ModelWithNullableObject, ModelWithNullableString, ModelWithNumericEnumUnion, ModelWithOneOfAndProperties, ModelWithOneOfEnum, ModelWithOrderedProperties, ModelWithPattern, ModelWithPatternWritable, ModelWithPrefixItemsConstantSizeArray, ModelWithProperties, ModelWithPropertiesWritable, ModelWithReadOnlyAndWriteOnly, ModelWithReadOnlyAndWriteOnlyWritable, ModelWithReference, ModelWithReferenceWritable, ModelWithString, ModelWithStringError, MultipartRequestData, MultipartResponseData, MultipartResponseResponse, MultipartResponseResponses, NestedAnyOfArraysNullable, NonAsciiæøåÆøÅöôêÊ字符串Data, NonAsciiæøåÆøÅöôêÊ字符串Response, NonAsciiæøåÆøÅöôêÊ字符串Responses, NonAsciiStringæøåÆøÅöôêÊ字符串, NullableObject, OneOfAllOfIssue, OneOfAllOfIssueWritable, OptionsCallWithoutParametersAndResponseData, Pageable, ParameterSimpleParameterUnused, PatchApiVbyApiVersionNoTagData, PatchApiVbyApiVersionNoTagResponses, PatchCallWithoutParametersAndResponseData, PostApiVbyApiVersionFormDataData, PostApiVbyApiVersionRequestBodyData, PostCallWithOptionalParamData, PostCallWithOptionalParamResponse, PostCallWithOptionalParamResponses, PostCallWithoutParametersAndResponseData, PostServiceWithEmptyTagResponse, PostServiceWithEmptyTagResponse2, PutCallWithoutParametersAndResponseData, PutWithFormUrlEncodedData, SchemaWithFormRestrictedKeys, SimpleBoolean, SimpleFile, SimpleFormData, SimpleInteger, SimpleParameter, SimpleReference, SimpleRequestBody, SimpleString, SimpleStringWithPattern, TestErrorCodeData, TestErrorCodeErrors, TestErrorCodeResponses, TypesData, TypesResponse, TypesResponses, UploadFileData, UploadFileResponse, UploadFileResponses, XFooBar } from './types.gen';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-nuxt/default/sdk.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport { type Client, type Composable, formDataBodySerializer, type Options as Options2, type TDataShape, urlSearchParamsBodySerializer } from './client';\nimport { client } from './client.gen';\nimport type { ApiVVersionODataControllerCountData, ApiVVersionODataControllerCountResponse, CallToTestOrderOfParamsData, CallWithDefaultOptionalParametersData, CallWithDefaultParametersData, CallWithDescriptionsData, CallWithDuplicateResponsesData, CallWithDuplicateResponsesError, CallWithDuplicateResponsesResponse, CallWithNoContentResponseData, CallWithNoContentResponseResponse, CallWithParametersData, CallWithResponseAndNoContentResponseData, CallWithResponseAndNoContentResponseResponse, CallWithResponseData, CallWithResponseResponse, CallWithResponsesData, CallWithResponsesError, CallWithResponsesResponse, CallWithResultFromHeaderData, CallWithWeirdParameterNamesData, CollectionFormatData, ComplexParamsData, ComplexParamsResponse, ComplexTypesData, ComplexTypesResponse, DeleteCallWithoutParametersAndResponseData, DeleteFooData3, DeprecatedCallData, DummyAData, DummyAResponse, DummyBData, DummyBResponse, DuplicateName2Data, DuplicateName3Data, DuplicateName4Data, DuplicateNameData, ExportData, FileResponseData, FileResponseResponse, FooWowData, GetApiVbyApiVersionSimpleOperationData, GetApiVbyApiVersionSimpleOperationError, GetApiVbyApiVersionSimpleOperationResponse, GetCallWithOptionalParamData, GetCallWithoutParametersAndResponseData, HeadCallWithoutParametersAndResponseData, ImportData, ImportResponse, MultipartRequestData, MultipartResponseData, MultipartResponseResponse, NonAsciiæøåÆøÅöôêÊ字符串Data, NonAsciiæøåÆøÅöôêÊ字符串Response, OptionsCallWithoutParametersAndResponseData, PatchApiVbyApiVersionNoTagData, PatchCallWithoutParametersAndResponseData, PostApiVbyApiVersionFormDataData, PostApiVbyApiVersionRequestBodyData, PostCallWithOptionalParamData, PostCallWithOptionalParamResponse, PostCallWithoutParametersAndResponseData, PutCallWithoutParametersAndResponseData, PutWithFormUrlEncodedData, TestErrorCodeData, TypesData, TypesResponse, UploadFileData, UploadFileResponse } from './types.gen';\n\nexport type Options<TComposable extends Composable = '$fetch', TData extends TDataShape = TDataShape, ResT = unknown, DefaultT = undefined> = Options2<TComposable, TData, ResT, DefaultT> & {\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\nexport const export_ = <TComposable extends Composable = '$fetch', DefaultT = undefined>(options: Options<TComposable, ExportData, unknown, DefaultT>) => (options.client ?? client).get<TComposable, unknown | DefaultT, unknown, DefaultT>({ url: '/api/v{api-version}/no+tag', ...options });\n\nexport const patchApiVbyApiVersionNoTag = <TComposable extends Composable = '$fetch', DefaultT = undefined>(options: Options<TComposable, PatchApiVbyApiVersionNoTagData, unknown, DefaultT>) => (options.client ?? client).patch<TComposable, unknown | DefaultT, unknown, DefaultT>({ url: '/api/v{api-version}/no+tag', ...options });\n\nexport const import_ = <TComposable extends Composable = '$fetch', DefaultT extends ImportResponse = ImportResponse>(options: Options<TComposable, ImportData, ImportResponse, DefaultT>) => (options.client ?? client).post<TComposable, ImportResponse | DefaultT, unknown, DefaultT>({\n    url: '/api/v{api-version}/no+tag',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options.headers\n    }\n});\n\nexport const fooWow = <TComposable extends Composable = '$fetch', DefaultT = undefined>(options: Options<TComposable, FooWowData, unknown, DefaultT>) => (options.client ?? client).put<TComposable, unknown | DefaultT, unknown, DefaultT>({ url: '/api/v{api-version}/no+tag', ...options });\n\nexport const apiVVersionODataControllerCount = <TComposable extends Composable = '$fetch', DefaultT extends ApiVVersionODataControllerCountResponse = ApiVVersionODataControllerCountResponse>(options: Options<TComposable, ApiVVersionODataControllerCountData, ApiVVersionODataControllerCountResponse, DefaultT>) => (options.client ?? client).get<TComposable, ApiVVersionODataControllerCountResponse | DefaultT, unknown, DefaultT>({ url: '/api/v{api-version}/simple/$count', ...options });\n\nexport const getApiVbyApiVersionSimpleOperation = <TComposable extends Composable = '$fetch', DefaultT extends GetApiVbyApiVersionSimpleOperationResponse = GetApiVbyApiVersionSimpleOperationResponse>(options: Options<TComposable, GetApiVbyApiVersionSimpleOperationData, GetApiVbyApiVersionSimpleOperationResponse, DefaultT>) => (options.client ?? client).get<TComposable, GetApiVbyApiVersionSimpleOperationResponse | DefaultT, GetApiVbyApiVersionSimpleOperationError, DefaultT>({ url: '/api/v{api-version}/simple:operation', ...options });\n\nexport const deleteCallWithoutParametersAndResponse = <TComposable extends Composable = '$fetch', DefaultT = undefined>(options: Options<TComposable, DeleteCallWithoutParametersAndResponseData, unknown, DefaultT>) => (options.client ?? client).delete<TComposable, unknown | DefaultT, unknown, DefaultT>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const getCallWithoutParametersAndResponse = <TComposable extends Composable = '$fetch', DefaultT = undefined>(options: Options<TComposable, GetCallWithoutParametersAndResponseData, unknown, DefaultT>) => (options.client ?? client).get<TComposable, unknown | DefaultT, unknown, DefaultT>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const headCallWithoutParametersAndResponse = <TComposable extends Composable = '$fetch', DefaultT = undefined>(options: Options<TComposable, HeadCallWithoutParametersAndResponseData, unknown, DefaultT>) => (options.client ?? client).head<TComposable, unknown | DefaultT, unknown, DefaultT>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const optionsCallWithoutParametersAndResponse = <TComposable extends Composable = '$fetch', DefaultT = undefined>(options: Options<TComposable, OptionsCallWithoutParametersAndResponseData, unknown, DefaultT>) => (options.client ?? client).options<TComposable, unknown | DefaultT, unknown, DefaultT>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const patchCallWithoutParametersAndResponse = <TComposable extends Composable = '$fetch', DefaultT = undefined>(options: Options<TComposable, PatchCallWithoutParametersAndResponseData, unknown, DefaultT>) => (options.client ?? client).patch<TComposable, unknown | DefaultT, unknown, DefaultT>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const postCallWithoutParametersAndResponse = <TComposable extends Composable = '$fetch', DefaultT = undefined>(options: Options<TComposable, PostCallWithoutParametersAndResponseData, unknown, DefaultT>) => (options.client ?? client).post<TComposable, unknown | DefaultT, unknown, DefaultT>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const putCallWithoutParametersAndResponse = <TComposable extends Composable = '$fetch', DefaultT = undefined>(options: Options<TComposable, PutCallWithoutParametersAndResponseData, unknown, DefaultT>) => (options.client ?? client).put<TComposable, unknown | DefaultT, unknown, DefaultT>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const deleteFoo = <TComposable extends Composable = '$fetch', DefaultT = undefined>(options: Options<TComposable, DeleteFooData3, unknown, DefaultT>) => (options.client ?? client).delete<TComposable, unknown | DefaultT, unknown, DefaultT>({ url: '/api/v{api-version}/foo/{foo_param}/bar/{BarParam}', ...options });\n\nexport const callWithDescriptions = <TComposable extends Composable = '$fetch', DefaultT = undefined>(options: Options<TComposable, CallWithDescriptionsData, unknown, DefaultT>) => (options.client ?? client).post<TComposable, unknown | DefaultT, unknown, DefaultT>({ url: '/api/v{api-version}/descriptions', ...options });\n\n/**\n * @deprecated\n */\nexport const deprecatedCall = <TComposable extends Composable = '$fetch', DefaultT = undefined>(options: Options<TComposable, DeprecatedCallData, unknown, DefaultT>) => (options.client ?? client).post<TComposable, unknown | DefaultT, unknown, DefaultT>({ url: '/api/v{api-version}/parameters/deprecated', ...options });\n\nexport const callWithParameters = <TComposable extends Composable = '$fetch', DefaultT = undefined>(options: Options<TComposable, CallWithParametersData, unknown, DefaultT>) => (options.client ?? client).post<TComposable, unknown | DefaultT, unknown, DefaultT>({\n    url: '/api/v{api-version}/parameters/{parameterPath}',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options.headers\n    }\n});\n\nexport const callWithWeirdParameterNames = <TComposable extends Composable = '$fetch', DefaultT = undefined>(options: Options<TComposable, CallWithWeirdParameterNamesData, unknown, DefaultT>) => (options.client ?? client).post<TComposable, unknown | DefaultT, unknown, DefaultT>({\n    url: '/api/v{api-version}/parameters/{parameter.path.1}/{parameter-path-2}/{PARAMETER-PATH-3}',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options.headers\n    }\n});\n\nexport const getCallWithOptionalParam = <TComposable extends Composable = '$fetch', DefaultT = undefined>(options: Options<TComposable, GetCallWithOptionalParamData, unknown, DefaultT>) => (options.client ?? client).get<TComposable, unknown | DefaultT, unknown, DefaultT>({\n    url: '/api/v{api-version}/parameters',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options.headers\n    }\n});\n\nexport const postCallWithOptionalParam = <TComposable extends Composable = '$fetch', DefaultT extends PostCallWithOptionalParamResponse = PostCallWithOptionalParamResponse>(options: Options<TComposable, PostCallWithOptionalParamData, PostCallWithOptionalParamResponse, DefaultT>) => (options.client ?? client).post<TComposable, PostCallWithOptionalParamResponse | DefaultT, unknown, DefaultT>({\n    url: '/api/v{api-version}/parameters',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options.headers\n    }\n});\n\nexport const postApiVbyApiVersionRequestBody = <TComposable extends Composable = '$fetch', DefaultT = undefined>(options: Options<TComposable, PostApiVbyApiVersionRequestBodyData, unknown, DefaultT>) => (options.client ?? client).post<TComposable, unknown | DefaultT, unknown, DefaultT>({\n    url: '/api/v{api-version}/requestBody',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options.headers\n    }\n});\n\nexport const postApiVbyApiVersionFormData = <TComposable extends Composable = '$fetch', DefaultT = undefined>(options: Options<TComposable, PostApiVbyApiVersionFormDataData, unknown, DefaultT>) => (options.client ?? client).post<TComposable, unknown | DefaultT, unknown, DefaultT>({\n    ...formDataBodySerializer,\n    url: '/api/v{api-version}/formData',\n    ...options,\n    headers: {\n        'Content-Type': null,\n        ...options.headers\n    }\n});\n\nexport const callWithDefaultParameters = <TComposable extends Composable = '$fetch', DefaultT = undefined>(options: Options<TComposable, CallWithDefaultParametersData, unknown, DefaultT>) => (options.client ?? client).get<TComposable, unknown | DefaultT, unknown, DefaultT>({ url: '/api/v{api-version}/defaults', ...options });\n\nexport const callWithDefaultOptionalParameters = <TComposable extends Composable = '$fetch', DefaultT = undefined>(options: Options<TComposable, CallWithDefaultOptionalParametersData, unknown, DefaultT>) => (options.client ?? client).post<TComposable, unknown | DefaultT, unknown, DefaultT>({ url: '/api/v{api-version}/defaults', ...options });\n\nexport const callToTestOrderOfParams = <TComposable extends Composable = '$fetch', DefaultT = undefined>(options: Options<TComposable, CallToTestOrderOfParamsData, unknown, DefaultT>) => (options.client ?? client).put<TComposable, unknown | DefaultT, unknown, DefaultT>({ url: '/api/v{api-version}/defaults', ...options });\n\nexport const duplicateName = <TComposable extends Composable = '$fetch', DefaultT = undefined>(options: Options<TComposable, DuplicateNameData, unknown, DefaultT>) => (options.client ?? client).delete<TComposable, unknown | DefaultT, unknown, DefaultT>({ url: '/api/v{api-version}/duplicate', ...options });\n\nexport const duplicateName2 = <TComposable extends Composable = '$fetch', DefaultT = undefined>(options: Options<TComposable, DuplicateName2Data, unknown, DefaultT>) => (options.client ?? client).get<TComposable, unknown | DefaultT, unknown, DefaultT>({ url: '/api/v{api-version}/duplicate', ...options });\n\nexport const duplicateName3 = <TComposable extends Composable = '$fetch', DefaultT = undefined>(options: Options<TComposable, DuplicateName3Data, unknown, DefaultT>) => (options.client ?? client).post<TComposable, unknown | DefaultT, unknown, DefaultT>({ url: '/api/v{api-version}/duplicate', ...options });\n\nexport const duplicateName4 = <TComposable extends Composable = '$fetch', DefaultT = undefined>(options: Options<TComposable, DuplicateName4Data, unknown, DefaultT>) => (options.client ?? client).put<TComposable, unknown | DefaultT, unknown, DefaultT>({ url: '/api/v{api-version}/duplicate', ...options });\n\nexport const callWithNoContentResponse = <TComposable extends Composable = '$fetch', DefaultT extends CallWithNoContentResponseResponse = CallWithNoContentResponseResponse>(options: Options<TComposable, CallWithNoContentResponseData, CallWithNoContentResponseResponse, DefaultT>) => (options.client ?? client).get<TComposable, CallWithNoContentResponseResponse | DefaultT, unknown, DefaultT>({ url: '/api/v{api-version}/no-content', ...options });\n\nexport const callWithResponseAndNoContentResponse = <TComposable extends Composable = '$fetch', DefaultT extends CallWithResponseAndNoContentResponseResponse = CallWithResponseAndNoContentResponseResponse>(options: Options<TComposable, CallWithResponseAndNoContentResponseData, CallWithResponseAndNoContentResponseResponse, DefaultT>) => (options.client ?? client).get<TComposable, CallWithResponseAndNoContentResponseResponse | DefaultT, unknown, DefaultT>({ url: '/api/v{api-version}/multiple-tags/response-and-no-content', ...options });\n\nexport const dummyA = <TComposable extends Composable = '$fetch', DefaultT extends DummyAResponse = DummyAResponse>(options: Options<TComposable, DummyAData, DummyAResponse, DefaultT>) => (options.client ?? client).get<TComposable, DummyAResponse | DefaultT, unknown, DefaultT>({ url: '/api/v{api-version}/multiple-tags/a', ...options });\n\nexport const dummyB = <TComposable extends Composable = '$fetch', DefaultT extends DummyBResponse = DummyBResponse>(options: Options<TComposable, DummyBData, DummyBResponse, DefaultT>) => (options.client ?? client).get<TComposable, DummyBResponse | DefaultT, unknown, DefaultT>({ url: '/api/v{api-version}/multiple-tags/b', ...options });\n\nexport const callWithResponse = <TComposable extends Composable = '$fetch', DefaultT extends CallWithResponseResponse = CallWithResponseResponse>(options: Options<TComposable, CallWithResponseData, CallWithResponseResponse, DefaultT>) => (options.client ?? client).get<TComposable, CallWithResponseResponse | DefaultT, unknown, DefaultT>({ url: '/api/v{api-version}/response', ...options });\n\nexport const callWithDuplicateResponses = <TComposable extends Composable = '$fetch', DefaultT extends CallWithDuplicateResponsesResponse = CallWithDuplicateResponsesResponse>(options: Options<TComposable, CallWithDuplicateResponsesData, CallWithDuplicateResponsesResponse, DefaultT>) => (options.client ?? client).post<TComposable, CallWithDuplicateResponsesResponse | DefaultT, CallWithDuplicateResponsesError, DefaultT>({ url: '/api/v{api-version}/response', ...options });\n\nexport const callWithResponses = <TComposable extends Composable = '$fetch', DefaultT extends CallWithResponsesResponse = CallWithResponsesResponse>(options: Options<TComposable, CallWithResponsesData, CallWithResponsesResponse, DefaultT>) => (options.client ?? client).put<TComposable, CallWithResponsesResponse | DefaultT, CallWithResponsesError, DefaultT>({ url: '/api/v{api-version}/response', ...options });\n\nexport const collectionFormat = <TComposable extends Composable = '$fetch', DefaultT = undefined>(options: Options<TComposable, CollectionFormatData, unknown, DefaultT>) => (options.client ?? client).get<TComposable, unknown | DefaultT, unknown, DefaultT>({ url: '/api/v{api-version}/collectionFormat', ...options });\n\nexport const types = <TComposable extends Composable = '$fetch', DefaultT extends TypesResponse = TypesResponse>(options: Options<TComposable, TypesData, TypesResponse, DefaultT>) => (options.client ?? client).get<TComposable, TypesResponse | DefaultT, unknown, DefaultT>({ url: '/api/v{api-version}/types', ...options });\n\nexport const uploadFile = <TComposable extends Composable = '$fetch', DefaultT extends UploadFileResponse = UploadFileResponse>(options: Options<TComposable, UploadFileData, UploadFileResponse, DefaultT>) => (options.client ?? client).post<TComposable, UploadFileResponse | DefaultT, unknown, DefaultT>({\n    ...urlSearchParamsBodySerializer,\n    url: '/api/v{api-version}/upload',\n    ...options,\n    headers: {\n        'Content-Type': 'application/x-www-form-urlencoded',\n        ...options.headers\n    }\n});\n\nexport const fileResponse = <TComposable extends Composable = '$fetch', DefaultT extends FileResponseResponse = FileResponseResponse>(options: Options<TComposable, FileResponseData, FileResponseResponse, DefaultT>) => (options.client ?? client).get<TComposable, FileResponseResponse | DefaultT, unknown, DefaultT>({ url: '/api/v{api-version}/file/{id}', ...options });\n\nexport const complexTypes = <TComposable extends Composable = '$fetch', DefaultT extends ComplexTypesResponse = ComplexTypesResponse>(options: Options<TComposable, ComplexTypesData, ComplexTypesResponse, DefaultT>) => (options.client ?? client).get<TComposable, ComplexTypesResponse | DefaultT, unknown, DefaultT>({\n    querySerializer: { parameters: { parameterObject: { object: { style: 'form' } } } },\n    url: '/api/v{api-version}/complex',\n    ...options\n});\n\nexport const multipartResponse = <TComposable extends Composable = '$fetch', DefaultT extends MultipartResponseResponse = MultipartResponseResponse>(options: Options<TComposable, MultipartResponseData, MultipartResponseResponse, DefaultT>) => (options.client ?? client).get<TComposable, MultipartResponseResponse | DefaultT, unknown, DefaultT>({ url: '/api/v{api-version}/multipart', ...options });\n\nexport const multipartRequest = <TComposable extends Composable = '$fetch', DefaultT = undefined>(options: Options<TComposable, MultipartRequestData, unknown, DefaultT>) => (options.client ?? client).post<TComposable, unknown | DefaultT, unknown, DefaultT>({\n    ...formDataBodySerializer,\n    url: '/api/v{api-version}/multipart',\n    ...options,\n    headers: {\n        'Content-Type': null,\n        ...options.headers\n    }\n});\n\nexport const complexParams = <TComposable extends Composable = '$fetch', DefaultT extends ComplexParamsResponse = ComplexParamsResponse>(options: Options<TComposable, ComplexParamsData, ComplexParamsResponse, DefaultT>) => (options.client ?? client).put<TComposable, ComplexParamsResponse | DefaultT, unknown, DefaultT>({\n    url: '/api/v{api-version}/complex/{id}',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json-patch+json',\n        ...options.headers\n    }\n});\n\nexport const callWithResultFromHeader = <TComposable extends Composable = '$fetch', DefaultT = undefined>(options: Options<TComposable, CallWithResultFromHeaderData, unknown, DefaultT>) => (options.client ?? client).post<TComposable, unknown | DefaultT, unknown, DefaultT>({ url: '/api/v{api-version}/header', ...options });\n\nexport const testErrorCode = <TComposable extends Composable = '$fetch', DefaultT = undefined>(options: Options<TComposable, TestErrorCodeData, unknown, DefaultT>) => (options.client ?? client).post<TComposable, unknown | DefaultT, unknown, DefaultT>({ url: '/api/v{api-version}/error', ...options });\n\nexport const nonAsciiæøåÆøÅöôêÊ字符串 = <TComposable extends Composable = '$fetch', DefaultT extends NonAsciiæøåÆøÅöôêÊ字符串Response = NonAsciiæøåÆøÅöôêÊ字符串Response>(options: Options<TComposable, NonAsciiæøåÆøÅöôêÊ字符串Data, NonAsciiæøåÆøÅöôêÊ字符串Response, DefaultT>) => (options.client ?? client).post<TComposable, NonAsciiæøåÆøÅöôêÊ字符串Response | DefaultT, unknown, DefaultT>({ url: '/api/v{api-version}/non-ascii-æøåÆØÅöôêÊ字符串', ...options });\n\n/**\n * Login User\n */\nexport const putWithFormUrlEncoded = <TComposable extends Composable = '$fetch', DefaultT = undefined>(options: Options<TComposable, PutWithFormUrlEncodedData, unknown, DefaultT>) => (options.client ?? client).put<TComposable, unknown | DefaultT, unknown, DefaultT>({\n    ...urlSearchParamsBodySerializer,\n    url: '/api/v{api-version}/non-ascii-æøåÆØÅöôêÊ字符串',\n    ...options,\n    headers: {\n        'Content-Type': 'application/x-www-form-urlencoded',\n        ...options.headers\n    }\n});\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-nuxt/default/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type ClientOptions = {\n    baseURL: 'http://localhost:3000/base' | (string & {});\n};\n\n/**\n * Model with number-only name\n */\nexport type _400 = string;\n\n/**\n * External ref to shared model (A)\n */\nexport type ExternalRefA = ExternalSharedModel;\n\n/**\n * External ref to shared model (B)\n */\nexport type ExternalRefB = ExternalSharedModel;\n\n/**\n * Testing multiline comments in string: First line\n * Second line\n *\n * Fourth line\n */\nexport type CamelCaseCommentWithBreaks = number;\n\n/**\n * Testing multiline comments in string: First line\n * Second line\n *\n * Fourth line\n */\nexport type CommentWithBreaks = number;\n\n/**\n * Testing backticks in string: `backticks` and ```multiple backticks``` should work\n */\nexport type CommentWithBackticks = number;\n\n/**\n * Testing backticks and quotes in string: `backticks`, 'quotes', \"double quotes\" and ```multiple backticks``` should work\n */\nexport type CommentWithBackticksAndQuotes = number;\n\n/**\n * Testing slashes in string: \\backwards\\\\\\ and /forwards/// should work\n */\nexport type CommentWithSlashes = number;\n\n/**\n * Testing expression placeholders in string: ${expression} should work\n */\nexport type CommentWithExpressionPlaceholders = number;\n\n/**\n * Testing quotes in string: 'single quote''' and \"double quotes\"\"\" should work\n */\nexport type CommentWithQuotes = number;\n\n/**\n * Testing reserved characters in string: * inline * and ** inline ** should work\n */\nexport type CommentWithReservedCharacters = number;\n\n/**\n * This is a simple number\n */\nexport type SimpleInteger = number;\n\n/**\n * This is a simple boolean\n */\nexport type SimpleBoolean = boolean;\n\n/**\n * This is a simple string\n */\nexport type SimpleString = string;\n\n/**\n * A string with non-ascii (unicode) characters valid in typescript identifiers (æøåÆØÅöÔèÈ字符串)\n */\nexport type NonAsciiStringæøåÆøÅöôêÊ字符串 = string;\n\n/**\n * This is a simple file\n */\nexport type SimpleFile = Blob | File;\n\n/**\n * This is a simple reference\n */\nexport type SimpleReference = ModelWithString;\n\n/**\n * This is a simple string\n */\nexport type SimpleStringWithPattern = string | null;\n\n/**\n * This is a simple enum with strings\n */\nexport type EnumWithStrings = 'Success' | 'Warning' | 'Error' | '\\'Single Quote\\'' | '\"Double Quotes\"' | 'Non-ascii: øæåôöØÆÅÔÖ字符串';\n\nexport type EnumWithReplacedCharacters = '\\'Single Quote\\'' | '\"Double Quotes\"' | 'øæåôöØÆÅÔÖ字符串' | 3.1 | '';\n\n/**\n * This is a simple enum with numbers\n */\nexport type EnumWithNumbers = 1 | 2 | 3 | 1.1 | 1.2 | 1.3 | 100 | 200 | 300 | -100 | -200 | -300 | -1.1 | -1.2 | -1.3;\n\n/**\n * Success=1,Warning=2,Error=3\n */\nexport type EnumFromDescription = number;\n\n/**\n * This is a simple enum with numbers\n */\nexport type EnumWithExtensions = 200 | 400 | 500;\n\nexport type EnumWithXEnumNames = 0 | 1 | 2;\n\n/**\n * This is a simple array with numbers\n */\nexport type ArrayWithNumbers = Array<number>;\n\n/**\n * This is a simple array with booleans\n */\nexport type ArrayWithBooleans = Array<boolean>;\n\n/**\n * This is a simple array with strings\n */\nexport type ArrayWithStrings = Array<string>;\n\n/**\n * This is a simple array with references\n */\nexport type ArrayWithReferences = Array<ModelWithString>;\n\n/**\n * This is a simple array containing an array\n */\nexport type ArrayWithArray = Array<Array<ModelWithString>>;\n\n/**\n * This is a simple array with properties\n */\nexport type ArrayWithProperties = Array<{\n    '16x16'?: CamelCaseCommentWithBreaks;\n    bar?: string;\n}>;\n\n/**\n * This is a simple array with any of properties\n */\nexport type ArrayWithAnyOfProperties = Array<{\n    foo?: string;\n} | {\n    bar?: string;\n}>;\n\nexport type AnyOfAnyAndNull = {\n    data?: unknown | null;\n};\n\n/**\n * This is a simple array with any of properties\n */\nexport type AnyOfArrays = {\n    results?: Array<{\n        foo?: string;\n    } | {\n        bar?: string;\n    }>;\n};\n\n/**\n * This is a string dictionary\n */\nexport type DictionaryWithString = {\n    [key: string]: string;\n};\n\nexport type DictionaryWithPropertiesAndAdditionalProperties = {\n    foo?: number;\n    bar?: boolean;\n    [key: string]: string | number | boolean | undefined;\n};\n\n/**\n * This is a string reference\n */\nexport type DictionaryWithReference = {\n    [key: string]: ModelWithString;\n};\n\n/**\n * This is a complex dictionary\n */\nexport type DictionaryWithArray = {\n    [key: string]: Array<ModelWithString>;\n};\n\n/**\n * This is a string dictionary\n */\nexport type DictionaryWithDictionary = {\n    [key: string]: {\n        [key: string]: string;\n    };\n};\n\n/**\n * This is a complex dictionary\n */\nexport type DictionaryWithProperties = {\n    [key: string]: {\n        foo?: string;\n        bar?: string;\n    };\n};\n\n/**\n * This is a model with one number property\n */\nexport type ModelWithInteger = {\n    /**\n     * This is a simple number property\n     */\n    prop?: number;\n};\n\n/**\n * This is a model with one boolean property\n */\nexport type ModelWithBoolean = {\n    /**\n     * This is a simple boolean property\n     */\n    prop?: boolean;\n};\n\n/**\n * This is a model with one string property\n */\nexport type ModelWithString = {\n    /**\n     * This is a simple string property\n     */\n    prop?: string;\n};\n\n/**\n * This is a model with one string property\n */\nexport type ModelWithStringError = {\n    /**\n     * This is a simple string property\n     */\n    prop?: string;\n};\n\n/**\n * `Comment` or `VoiceComment`. The JSON object for adding voice comments to tickets is different. See [Adding voice comments to tickets](/documentation/ticketing/managing-tickets/adding-voice-comments-to-tickets)\n */\nexport type ModelFromZendesk = string;\n\n/**\n * This is a model with one string property\n */\nexport type ModelWithNullableString = {\n    /**\n     * This is a simple string property\n     */\n    nullableProp1?: string | null;\n    /**\n     * This is a simple string property\n     */\n    nullableRequiredProp1: string | null;\n    /**\n     * This is a simple string property\n     */\n    nullableProp2?: string | null;\n    /**\n     * This is a simple string property\n     */\n    nullableRequiredProp2: string | null;\n    /**\n     * This is a simple enum with strings\n     */\n    'foo_bar-enum'?: 'Success' | 'Warning' | 'Error' | 'ØÆÅ字符串';\n};\n\n/**\n * This is a model with one enum\n */\nexport type ModelWithEnum = {\n    /**\n     * This is a simple enum with strings\n     */\n    'foo_bar-enum'?: 'Success' | 'Warning' | 'Error' | 'ØÆÅ字符串';\n    /**\n     * These are the HTTP error code enums\n     */\n    statusCode?: '100' | '200 FOO' | '300 FOO_BAR' | '400 foo-bar' | '500 foo.bar' | '600 foo&bar';\n    /**\n     * Simple boolean enum\n     */\n    bool?: true;\n};\n\n/**\n * This is a model with one enum with escaped name\n */\nexport type ModelWithEnumWithHyphen = {\n    /**\n     * Foo-Bar-Baz-Qux\n     */\n    'foo-bar-baz-qux'?: '3.0';\n};\n\n/**\n * This is a model with one enum\n */\nexport type ModelWithEnumFromDescription = {\n    /**\n     * Success=1,Warning=2,Error=3\n     */\n    test?: number;\n};\n\n/**\n * This is a model with nested enums\n */\nexport type ModelWithNestedEnums = {\n    dictionaryWithEnum?: {\n        [key: string]: 'Success' | 'Warning' | 'Error';\n    };\n    dictionaryWithEnumFromDescription?: {\n        [key: string]: number;\n    };\n    arrayWithEnum?: Array<'Success' | 'Warning' | 'Error'>;\n    arrayWithDescription?: Array<number>;\n    /**\n     * This is a simple enum with strings\n     */\n    'foo_bar-enum'?: 'Success' | 'Warning' | 'Error' | 'ØÆÅ字符串';\n};\n\n/**\n * This is a model with one property containing a reference\n */\nexport type ModelWithReference = {\n    prop?: ModelWithProperties;\n};\n\n/**\n * This is a model with one property containing an array\n */\nexport type ModelWithArrayReadOnlyAndWriteOnly = {\n    prop?: Array<ModelWithReadOnlyAndWriteOnly>;\n    propWithFile?: Array<Blob | File>;\n    propWithNumber?: Array<number>;\n};\n\n/**\n * This is a model with one property containing an array\n */\nexport type ModelWithArray = {\n    prop?: Array<ModelWithString>;\n    propWithFile?: Array<Blob | File>;\n    propWithNumber?: Array<number>;\n};\n\n/**\n * This is a model with one property containing a dictionary\n */\nexport type ModelWithDictionary = {\n    prop?: {\n        [key: string]: string;\n    };\n};\n\n/**\n * This is a deprecated model with a deprecated property\n *\n * @deprecated\n */\nexport type DeprecatedModel = {\n    /**\n     * This is a deprecated property\n     *\n     * @deprecated\n     */\n    prop?: string;\n};\n\n/**\n * This is a model with one property containing a circular reference\n */\nexport type ModelWithCircularReference = {\n    prop?: ModelWithCircularReference;\n};\n\n/**\n * This is a model with one property with a 'one of' relationship\n */\nexport type CompositionWithOneOf = {\n    propA?: ModelWithString | ModelWithEnum | ModelWithArray | ModelWithDictionary;\n};\n\n/**\n * This is a model with one property with a 'one of' relationship where the options are not $ref\n */\nexport type CompositionWithOneOfAnonymous = {\n    propA?: {\n        propA?: string;\n    } | string | number;\n};\n\n/**\n * Circle\n */\nexport type ModelCircle = {\n    kind: string;\n    radius?: number;\n};\n\n/**\n * Square\n */\nexport type ModelSquare = {\n    kind: string;\n    sideLength?: number;\n};\n\n/**\n * This is a model with one property with a 'one of' relationship where the options are not $ref\n */\nexport type CompositionWithOneOfDiscriminator = ({\n    kind: 'circle';\n} & ModelCircle) | ({\n    kind: 'square';\n} & ModelSquare);\n\n/**\n * This is a model with one property with a 'any of' relationship\n */\nexport type CompositionWithAnyOf = {\n    propA?: ModelWithString | ModelWithEnum | ModelWithArray | ModelWithDictionary;\n};\n\n/**\n * This is a model with one property with a 'any of' relationship where the options are not $ref\n */\nexport type CompositionWithAnyOfAnonymous = {\n    propA?: {\n        propA?: string;\n    } | string | number;\n};\n\n/**\n * This is a model with nested 'any of' property with a type null\n */\nexport type CompositionWithNestedAnyAndTypeNull = {\n    propA?: Array<ModelWithDictionary | null> | Array<ModelWithArray | null>;\n};\n\nexport type _3eNum1Период = 'Bird' | 'Dog';\n\nexport type ConstValue = 'ConstValue';\n\n/**\n * This is a model with one property with a 'any of' relationship where the options are not $ref\n */\nexport type CompositionWithNestedAnyOfAndNull = {\n    /**\n     * Scopes\n     */\n    propA?: Array<_3eNum1Период | ConstValue> | null;\n};\n\n/**\n * This is a model with one property with a 'one of' relationship\n */\nexport type CompositionWithOneOfAndNullable = {\n    propA?: {\n        boolean?: boolean;\n    } | ModelWithEnum | ModelWithArray | ModelWithDictionary | null;\n};\n\n/**\n * This is a model that contains a simple dictionary within composition\n */\nexport type CompositionWithOneOfAndSimpleDictionary = {\n    propA?: boolean | {\n        [key: string]: number;\n    };\n};\n\n/**\n * This is a model that contains a dictionary of simple arrays within composition\n */\nexport type CompositionWithOneOfAndSimpleArrayDictionary = {\n    propA?: boolean | {\n        [key: string]: Array<boolean>;\n    };\n};\n\n/**\n * This is a model that contains a dictionary of complex arrays (composited) within composition\n */\nexport type CompositionWithOneOfAndComplexArrayDictionary = {\n    propA?: boolean | {\n        [key: string]: Array<number | string>;\n    };\n};\n\n/**\n * This is a model with one property with a 'all of' relationship\n */\nexport type CompositionWithAllOfAndNullable = {\n    propA?: ({\n        boolean?: boolean;\n    } & ModelWithEnum & ModelWithArray & ModelWithDictionary) | null;\n};\n\n/**\n * This is a model with one property with a 'any of' relationship\n */\nexport type CompositionWithAnyOfAndNullable = {\n    propA?: {\n        boolean?: boolean;\n    } | ModelWithEnum | ModelWithArray | ModelWithDictionary | null;\n};\n\n/**\n * This is a base model with two simple optional properties\n */\nexport type CompositionBaseModel = {\n    firstName?: string;\n    lastname?: string;\n};\n\n/**\n * This is a model that extends the base model\n */\nexport type CompositionExtendedModel = CompositionBaseModel & {\n    age: number;\n    firstName: string;\n    lastname: string;\n};\n\n/**\n * This is a model with one nested property\n */\nexport type ModelWithProperties = {\n    required: string;\n    readonly requiredAndReadOnly: string;\n    requiredAndNullable: string | null;\n    string?: string;\n    number?: number;\n    boolean?: boolean;\n    reference?: ModelWithString;\n    'property with space'?: string;\n    default?: string;\n    try?: string;\n    readonly '@namespace.string'?: string;\n    readonly '@namespace.integer'?: number;\n};\n\n/**\n * This is a model with one nested property\n */\nexport type ModelWithNestedProperties = {\n    readonly first: {\n        readonly second: {\n            readonly third: string | null;\n        } | null;\n    } | null;\n};\n\n/**\n * This is a model with duplicated properties\n */\nexport type ModelWithDuplicateProperties = {\n    prop?: ModelWithString;\n};\n\n/**\n * This is a model with ordered properties\n */\nexport type ModelWithOrderedProperties = {\n    zebra?: string;\n    apple?: string;\n    hawaii?: string;\n};\n\n/**\n * This is a model with duplicated imports\n */\nexport type ModelWithDuplicateImports = {\n    propA?: ModelWithString;\n    propB?: ModelWithString;\n    propC?: ModelWithString;\n};\n\n/**\n * This is a model that extends another model\n */\nexport type ModelThatExtends = ModelWithString & {\n    propExtendsA?: string;\n    propExtendsB?: ModelWithString;\n};\n\n/**\n * This is a model that extends another model\n */\nexport type ModelThatExtendsExtends = ModelWithString & ModelThatExtends & {\n    propExtendsC?: string;\n    propExtendsD?: ModelWithString;\n};\n\n/**\n * This is a model that contains a some patterns\n */\nexport type ModelWithPattern = {\n    key: string;\n    name: string;\n    readonly enabled?: boolean;\n    readonly modified?: string;\n    id?: string;\n    text?: string;\n    patternWithSingleQuotes?: string;\n    patternWithNewline?: string;\n    patternWithBacktick?: string;\n    patternWithUnicode?: string;\n};\n\nexport type File = {\n    /**\n     * Id\n     */\n    readonly id?: string;\n    /**\n     * Updated at\n     */\n    readonly updated_at?: string;\n    /**\n     * Created at\n     */\n    readonly created_at?: string;\n    /**\n     * Mime\n     */\n    mime: string;\n    /**\n     * File\n     */\n    readonly file?: string;\n};\n\nexport type Default = {\n    name?: string;\n};\n\nexport type Pageable = {\n    page?: number;\n    size?: number;\n    sort?: Array<string>;\n};\n\n/**\n * This is a free-form object without additionalProperties.\n */\nexport type FreeFormObjectWithoutAdditionalProperties = {\n    [key: string]: unknown;\n};\n\n/**\n * This is a free-form object with additionalProperties: true.\n */\nexport type FreeFormObjectWithAdditionalPropertiesEqTrue = {\n    [key: string]: unknown;\n};\n\n/**\n * This is a free-form object with additionalProperties: {}.\n */\nexport type FreeFormObjectWithAdditionalPropertiesEqEmptyObject = {\n    [key: string]: unknown;\n};\n\nexport type ModelWithConst = {\n    String?: 'String';\n    number?: 0;\n    null?: null;\n    withType?: 'Some string';\n};\n\n/**\n * This is a model with one property and additionalProperties: true\n */\nexport type ModelWithAdditionalPropertiesEqTrue = {\n    /**\n     * This is a simple string property\n     */\n    prop?: string;\n    [key: string]: unknown;\n};\n\nexport type NestedAnyOfArraysNullable = {\n    nullableArray?: Array<string | boolean> | null;\n};\n\nexport type CompositionWithOneOfAndProperties = ({\n    foo: SimpleParameter;\n} | {\n    bar: NonAsciiStringæøåÆøÅöôêÊ字符串;\n}) & {\n    baz: number | null;\n    qux: number;\n};\n\n/**\n * An object that can be null\n */\nexport type NullableObject = {\n    foo?: string;\n} | null;\n\n/**\n * Some % character\n */\nexport type CharactersInDescription = string;\n\nexport type ModelWithNullableObject = {\n    data?: NullableObject;\n};\n\n/**\n * An object with additional properties that can be null (anyOf ref + null)\n */\nexport type ModelWithAdditionalPropertiesRef = {\n    [key: string]: NullableObject | null;\n};\n\nexport type ModelWithOneOfEnum = {\n    foo: 'Bar';\n} | {\n    foo: 'Baz';\n} | {\n    foo: 'Qux';\n} | {\n    content: string;\n    foo: 'Quux';\n} | {\n    content: [\n        string,\n        string\n    ];\n    foo: 'Corge';\n};\n\nexport type ModelWithNestedArrayEnumsDataFoo = 'foo' | 'bar';\n\nexport type ModelWithNestedArrayEnumsDataBar = 'baz' | 'qux';\n\nexport type ModelWithNestedArrayEnumsData = {\n    foo?: Array<ModelWithNestedArrayEnumsDataFoo>;\n    bar?: Array<ModelWithNestedArrayEnumsDataBar>;\n};\n\nexport type ModelWithNestedArrayEnums = {\n    array_strings?: Array<string>;\n    data?: ModelWithNestedArrayEnumsData;\n};\n\nexport type ModelWithNestedCompositionEnums = {\n    foo?: ModelWithNestedArrayEnumsDataFoo;\n};\n\nexport type ModelWithReadOnlyAndWriteOnly = {\n    foo: string;\n    readonly bar: string;\n};\n\nexport type ModelWithConstantSizeArray = [\n    number,\n    number\n];\n\nexport type ModelWithAnyOfConstantSizeArray = [\n    number | string,\n    number | string,\n    number | string\n];\n\nexport type ModelWithPrefixItemsConstantSizeArray = [\n    ModelWithInteger,\n    number | string,\n    string\n];\n\nexport type ModelWithAnyOfConstantSizeArrayNullable = [\n    number | null | string,\n    number | null | string,\n    number | null | string\n];\n\nexport type ModelWithAnyOfConstantSizeArrayWithNSizeAndOptions = [\n    number | Import,\n    number | Import\n];\n\nexport type ModelWithAnyOfConstantSizeArrayAndIntersect = [\n    number & string,\n    number & string\n];\n\nexport type ModelWithNumericEnumUnion = {\n    /**\n     * Период\n     */\n    value?: -10 | -1 | 0 | 1 | 3 | 6 | 12;\n};\n\n/**\n * Some description with `back ticks`\n */\nexport type ModelWithBackticksInDescription = {\n    /**\n     * The template `that` should be used for parsing and importing the contents of the CSV file.\n     *\n     * <br/><p>There is one placeholder currently supported:<ul>     <li><b>${x}</b> - refers to the n-th column in the CSV file, e.g. ${1}, ${2}, ...)</li></ul><p>Example of a correct JSON template:</p>\n     * <pre>\n     * [\n     * {\n     * \"resourceType\": \"Asset\",\n     * \"identifier\": {\n     * \"name\": \"${1}\",\n     * \"domain\": {\n     * \"name\": \"${2}\",\n     * \"community\": {\n     * \"name\": \"Some Community\"\n     * }\n     * }\n     * },\n     * \"attributes\" : {\n     * \"00000000-0000-0000-0000-000000003115\" : [ {\n     * \"value\" : \"${3}\"\n     * } ],\n     * \"00000000-0000-0000-0000-000000000222\" : [ {\n     * \"value\" : \"${4}\"\n     * } ]\n     * }\n     * }\n     * ]\n     * </pre>\n     */\n    template?: string;\n};\n\nexport type ModelWithOneOfAndProperties = (SimpleParameter | NonAsciiStringæøåÆøÅöôêÊ字符串) & {\n    baz: number | null;\n    qux: number;\n};\n\n/**\n * Model used to test deduplication strategy (unused)\n */\nexport type ParameterSimpleParameterUnused = string;\n\n/**\n * Model used to test deduplication strategy\n */\nexport type PostServiceWithEmptyTagResponse = string;\n\n/**\n * Model used to test deduplication strategy\n */\nexport type PostServiceWithEmptyTagResponse2 = string;\n\n/**\n * Model used to test deduplication strategy\n */\nexport type DeleteFooData = string;\n\n/**\n * Model used to test deduplication strategy\n */\nexport type DeleteFooData2 = string;\n\n/**\n * Model with restricted keyword name\n */\nexport type Import = string;\n\nexport type SchemaWithFormRestrictedKeys = {\n    description?: string;\n    'x-enum-descriptions'?: string;\n    'x-enum-varnames'?: string;\n    'x-enumNames'?: string;\n    title?: string;\n    object?: {\n        description?: string;\n        'x-enum-descriptions'?: string;\n        'x-enum-varnames'?: string;\n        'x-enumNames'?: string;\n        title?: string;\n    };\n    array?: Array<{\n        description?: string;\n        'x-enum-descriptions'?: string;\n        'x-enum-varnames'?: string;\n        'x-enumNames'?: string;\n        title?: string;\n    }>;\n};\n\n/**\n * This schema was giving PascalCase transformations a hard time\n */\nexport type IoK8sApimachineryPkgApisMetaV1DeleteOptions = {\n    /**\n     * Must be fulfilled before a deletion is carried out. If not possible, a 409 Conflict status will be returned.\n     */\n    preconditions?: IoK8sApimachineryPkgApisMetaV1Preconditions;\n};\n\n/**\n * This schema was giving PascalCase transformations a hard time\n */\nexport type IoK8sApimachineryPkgApisMetaV1Preconditions = {\n    /**\n     * Specifies the target ResourceVersion\n     */\n    resourceVersion?: string;\n    /**\n     * Specifies the target UID.\n     */\n    uid?: string;\n};\n\nexport type AdditionalPropertiesUnknownIssue = {\n    [key: string]: string | number;\n};\n\nexport type AdditionalPropertiesUnknownIssue2 = {\n    [key: string]: string | number;\n};\n\nexport type AdditionalPropertiesUnknownIssue3 = string & {\n    entries: {\n        [key: string]: AdditionalPropertiesUnknownIssue;\n    };\n};\n\nexport type AdditionalPropertiesIntegerIssue = {\n    value: number;\n    [key: string]: number;\n};\n\nexport type OneOfAllOfIssue = ((ConstValue | GenericSchemaDuplicateIssue1SystemBoolean) & _3eNum1Период) | GenericSchemaDuplicateIssue1SystemString;\n\nexport type GenericSchemaDuplicateIssue1SystemBoolean = {\n    item?: boolean;\n    error?: string | null;\n    readonly hasError?: boolean;\n    data?: {\n        [key: string]: never;\n    };\n};\n\nexport type GenericSchemaDuplicateIssue1SystemString = {\n    item?: string | null;\n    error?: string | null;\n    readonly hasError?: boolean;\n};\n\nexport type ExternalSharedModel = {\n    id: string;\n    name?: string;\n};\n\n/**\n * This is a model with one property containing a reference\n */\nexport type ModelWithReferenceWritable = {\n    prop?: ModelWithPropertiesWritable;\n};\n\n/**\n * This is a model with one property containing an array\n */\nexport type ModelWithArrayReadOnlyAndWriteOnlyWritable = {\n    prop?: Array<ModelWithReadOnlyAndWriteOnlyWritable>;\n    propWithFile?: Array<Blob | File>;\n    propWithNumber?: Array<number>;\n};\n\n/**\n * This is a model with one nested property\n */\nexport type ModelWithPropertiesWritable = {\n    required: string;\n    requiredAndNullable: string | null;\n    string?: string;\n    number?: number;\n    boolean?: boolean;\n    reference?: ModelWithString;\n    'property with space'?: string;\n    default?: string;\n    try?: string;\n};\n\n/**\n * This is a model that contains a some patterns\n */\nexport type ModelWithPatternWritable = {\n    key: string;\n    name: string;\n    id?: string;\n    text?: string;\n    patternWithSingleQuotes?: string;\n    patternWithNewline?: string;\n    patternWithBacktick?: string;\n    patternWithUnicode?: string;\n};\n\nexport type FileWritable = {\n    /**\n     * Mime\n     */\n    mime: string;\n};\n\nexport type ModelWithReadOnlyAndWriteOnlyWritable = {\n    foo: string;\n    baz: string;\n};\n\nexport type ModelWithAnyOfConstantSizeArrayWithNSizeAndOptionsWritable = [\n    number | Import,\n    number | Import\n];\n\nexport type AdditionalPropertiesUnknownIssueWritable = {\n    [key: string]: string | number;\n};\n\nexport type OneOfAllOfIssueWritable = ((ConstValue | GenericSchemaDuplicateIssue1SystemBoolean) & _3eNum1Период) | GenericSchemaDuplicateIssue1SystemString;\n\nexport type GenericSchemaDuplicateIssue1SystemBooleanWritable = {\n    item?: boolean;\n    error?: string | null;\n    data?: {\n        [key: string]: never;\n    };\n};\n\nexport type GenericSchemaDuplicateIssue1SystemStringWritable = {\n    item?: string | null;\n    error?: string | null;\n};\n\n/**\n * This is a reusable parameter\n */\nexport type SimpleParameter = string;\n\n/**\n * Parameter with illegal characters\n */\nexport type XFooBar = ModelWithString;\n\n/**\n * A reusable request body\n */\nexport type SimpleRequestBody = ModelWithString;\n\n/**\n * A reusable request body\n */\nexport type SimpleFormData = ModelWithString;\n\nexport type ExportData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no+tag';\n};\n\nexport type PatchApiVbyApiVersionNoTagData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no+tag';\n};\n\nexport type PatchApiVbyApiVersionNoTagResponses = {\n    /**\n     * OK\n     */\n    default: unknown;\n};\n\nexport type ImportData = {\n    body: ModelWithReadOnlyAndWriteOnlyWritable | ModelWithArrayReadOnlyAndWriteOnlyWritable;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no+tag';\n};\n\nexport type ImportResponses = {\n    /**\n     * Success\n     */\n    200: ModelFromZendesk;\n    /**\n     * Default success response\n     */\n    default: ModelWithReadOnlyAndWriteOnly;\n};\n\nexport type ImportResponse = ImportResponses[keyof ImportResponses];\n\nexport type FooWowData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no+tag';\n};\n\nexport type FooWowResponses = {\n    /**\n     * OK\n     */\n    default: unknown;\n};\n\nexport type ApiVVersionODataControllerCountData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple/$count';\n};\n\nexport type ApiVVersionODataControllerCountResponses = {\n    /**\n     * Success\n     */\n    200: ModelFromZendesk;\n};\n\nexport type ApiVVersionODataControllerCountResponse = ApiVVersionODataControllerCountResponses[keyof ApiVVersionODataControllerCountResponses];\n\nexport type GetApiVbyApiVersionSimpleOperationData = {\n    body?: never;\n    path: {\n        /**\n         * foo in method\n         */\n        foo_param: string;\n    };\n    query?: never;\n    url: '/api/v{api-version}/simple:operation';\n};\n\nexport type GetApiVbyApiVersionSimpleOperationErrors = {\n    /**\n     * Default error response\n     */\n    default: ModelWithBoolean;\n};\n\nexport type GetApiVbyApiVersionSimpleOperationError = GetApiVbyApiVersionSimpleOperationErrors[keyof GetApiVbyApiVersionSimpleOperationErrors];\n\nexport type GetApiVbyApiVersionSimpleOperationResponses = {\n    /**\n     * Response is a simple number\n     */\n    200: number;\n};\n\nexport type GetApiVbyApiVersionSimpleOperationResponse = GetApiVbyApiVersionSimpleOperationResponses[keyof GetApiVbyApiVersionSimpleOperationResponses];\n\nexport type DeleteCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type GetCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type HeadCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type OptionsCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type PatchCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type PostCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type PutCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type DeleteFooData3 = {\n    body?: never;\n    headers: {\n        /**\n         * Parameter with illegal characters\n         */\n        'x-Foo-Bar': ModelWithString;\n    };\n    path: {\n        /**\n         * foo in method\n         */\n        foo_param: string;\n        /**\n         * bar in method\n         */\n        BarParam: string;\n    };\n    query?: never;\n    url: '/api/v{api-version}/foo/{foo_param}/bar/{BarParam}';\n};\n\nexport type CallWithDescriptionsData = {\n    body?: never;\n    path?: never;\n    query?: {\n        /**\n         * Testing multiline comments in string: First line\n         * Second line\n         *\n         * Fourth line\n         */\n        parameterWithBreaks?: string;\n        /**\n         * Testing backticks in string: `backticks` and ```multiple backticks``` should work\n         */\n        parameterWithBackticks?: string;\n        /**\n         * Testing slashes in string: \\backwards\\\\\\ and /forwards/// should work\n         */\n        parameterWithSlashes?: string;\n        /**\n         * Testing expression placeholders in string: ${expression} should work\n         */\n        parameterWithExpressionPlaceholders?: string;\n        /**\n         * Testing quotes in string: 'single quote''' and \"double quotes\"\"\" should work\n         */\n        parameterWithQuotes?: string;\n        /**\n         * Testing reserved characters in string: * inline * and ** inline ** should work\n         */\n        parameterWithReservedCharacters?: string;\n    };\n    url: '/api/v{api-version}/descriptions';\n};\n\nexport type DeprecatedCallData = {\n    body?: never;\n    headers: {\n        /**\n         * This parameter is deprecated\n         *\n         * @deprecated\n         */\n        parameter: DeprecatedModel | null;\n    };\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/parameters/deprecated';\n};\n\nexport type CallWithParametersData = {\n    /**\n     * This is the parameter that goes into the body\n     */\n    body: {\n        [key: string]: unknown;\n    } | null;\n    headers: {\n        /**\n         * This is the parameter that goes into the header\n         */\n        parameterHeader: string | null;\n    };\n    path: {\n        /**\n         * This is the parameter that goes into the path\n         */\n        parameterPath: string | null;\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string | null;\n    };\n    query: {\n        foo_ref_enum?: ModelWithNestedArrayEnumsDataFoo;\n        foo_all_of_enum: ModelWithNestedArrayEnumsDataFoo;\n        /**\n         * This is the parameter that goes into the query params\n         */\n        cursor: string | null;\n    };\n    url: '/api/v{api-version}/parameters/{parameterPath}';\n};\n\nexport type CallWithWeirdParameterNamesData = {\n    /**\n     * This is the parameter that goes into the body\n     */\n    body: ModelWithString | null;\n    headers: {\n        /**\n         * This is the parameter that goes into the request header\n         */\n        'parameter.header': string | null;\n    };\n    path: {\n        /**\n         * This is the parameter that goes into the path\n         */\n        'parameter.path.1'?: string;\n        /**\n         * This is the parameter that goes into the path\n         */\n        'parameter-path-2'?: string;\n        /**\n         * This is the parameter that goes into the path\n         */\n        'PARAMETER-PATH-3'?: string;\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string | null;\n    };\n    query: {\n        /**\n         * This is the parameter with a reserved keyword\n         */\n        default?: string;\n        /**\n         * This is the parameter that goes into the request query params\n         */\n        'parameter-query': string | null;\n    };\n    url: '/api/v{api-version}/parameters/{parameter.path.1}/{parameter-path-2}/{PARAMETER-PATH-3}';\n};\n\nexport type GetCallWithOptionalParamData = {\n    /**\n     * This is a required parameter\n     */\n    body: ModelWithOneOfEnum;\n    path?: never;\n    query?: {\n        /**\n         * This is an optional parameter\n         */\n        page?: number;\n    };\n    url: '/api/v{api-version}/parameters';\n};\n\nexport type PostCallWithOptionalParamData = {\n    /**\n     * This is an optional parameter\n     */\n    body?: {\n        offset?: number | null;\n    };\n    path?: never;\n    query: {\n        /**\n         * This is a required parameter\n         */\n        parameter: Pageable;\n    };\n    url: '/api/v{api-version}/parameters';\n};\n\nexport type PostCallWithOptionalParamResponses = {\n    /**\n     * Response is a simple number\n     */\n    200: number;\n    /**\n     * Success\n     */\n    204: void;\n};\n\nexport type PostCallWithOptionalParamResponse = PostCallWithOptionalParamResponses[keyof PostCallWithOptionalParamResponses];\n\nexport type PostApiVbyApiVersionRequestBodyData = {\n    /**\n     * A reusable request body\n     */\n    body?: SimpleRequestBody;\n    path?: never;\n    query?: {\n        /**\n         * This is a reusable parameter\n         */\n        parameter?: string;\n    };\n    url: '/api/v{api-version}/requestBody';\n};\n\nexport type PostApiVbyApiVersionFormDataData = {\n    /**\n     * A reusable request body\n     */\n    body?: SimpleFormData;\n    path?: never;\n    query?: {\n        /**\n         * This is a reusable parameter\n         */\n        parameter?: string;\n    };\n    url: '/api/v{api-version}/formData';\n};\n\nexport type CallWithDefaultParametersData = {\n    body?: never;\n    path?: never;\n    query?: {\n        /**\n         * This is a simple string with default value\n         */\n        parameterString?: string | null;\n        /**\n         * This is a simple number with default value\n         */\n        parameterNumber?: number | null;\n        /**\n         * This is a simple boolean with default value\n         */\n        parameterBoolean?: boolean | null;\n        /**\n         * This is a simple enum with default value\n         */\n        parameterEnum?: 'Success' | 'Warning' | 'Error';\n        /**\n         * This is a simple model with default value\n         */\n        parameterModel?: ModelWithString | null;\n    };\n    url: '/api/v{api-version}/defaults';\n};\n\nexport type CallWithDefaultOptionalParametersData = {\n    body?: never;\n    path?: never;\n    query?: {\n        /**\n         * This is a simple string that is optional with default value\n         */\n        parameterString?: string;\n        /**\n         * This is a simple number that is optional with default value\n         */\n        parameterNumber?: number;\n        /**\n         * This is a simple boolean that is optional with default value\n         */\n        parameterBoolean?: boolean;\n        /**\n         * This is a simple enum that is optional with default value\n         */\n        parameterEnum?: 'Success' | 'Warning' | 'Error';\n        /**\n         * This is a simple model that is optional with default value\n         */\n        parameterModel?: ModelWithString;\n    };\n    url: '/api/v{api-version}/defaults';\n};\n\nexport type CallToTestOrderOfParamsData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * This is a optional string with default\n         */\n        parameterOptionalStringWithDefault?: string;\n        /**\n         * This is a optional string with empty default\n         */\n        parameterOptionalStringWithEmptyDefault?: string;\n        /**\n         * This is a optional string with no default\n         */\n        parameterOptionalStringWithNoDefault?: string;\n        /**\n         * This is a string with default\n         */\n        parameterStringWithDefault: string;\n        /**\n         * This is a string with empty default\n         */\n        parameterStringWithEmptyDefault: string;\n        /**\n         * This is a string with no default\n         */\n        parameterStringWithNoDefault: string;\n        /**\n         * This is a string that can be null with no default\n         */\n        parameterStringNullableWithNoDefault?: string | null;\n        /**\n         * This is a string that can be null with default\n         */\n        parameterStringNullableWithDefault?: string | null;\n    };\n    url: '/api/v{api-version}/defaults';\n};\n\nexport type DuplicateNameData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/duplicate';\n};\n\nexport type DuplicateName2Data = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/duplicate';\n};\n\nexport type DuplicateName3Data = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/duplicate';\n};\n\nexport type DuplicateName4Data = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/duplicate';\n};\n\nexport type CallWithNoContentResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no-content';\n};\n\nexport type CallWithNoContentResponseResponses = {\n    /**\n     * Success\n     */\n    204: void;\n};\n\nexport type CallWithNoContentResponseResponse = CallWithNoContentResponseResponses[keyof CallWithNoContentResponseResponses];\n\nexport type CallWithResponseAndNoContentResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multiple-tags/response-and-no-content';\n};\n\nexport type CallWithResponseAndNoContentResponseResponses = {\n    /**\n     * Response is a simple number\n     */\n    200: number;\n    /**\n     * Success\n     */\n    204: void;\n};\n\nexport type CallWithResponseAndNoContentResponseResponse = CallWithResponseAndNoContentResponseResponses[keyof CallWithResponseAndNoContentResponseResponses];\n\nexport type DummyAData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multiple-tags/a';\n};\n\nexport type DummyAResponses = {\n    200: _400;\n};\n\nexport type DummyAResponse = DummyAResponses[keyof DummyAResponses];\n\nexport type DummyBData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multiple-tags/b';\n};\n\nexport type DummyBResponses = {\n    /**\n     * Success\n     */\n    204: void;\n};\n\nexport type DummyBResponse = DummyBResponses[keyof DummyBResponses];\n\nexport type CallWithResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/response';\n};\n\nexport type CallWithResponseResponses = {\n    default: Import;\n};\n\nexport type CallWithResponseResponse = CallWithResponseResponses[keyof CallWithResponseResponses];\n\nexport type CallWithDuplicateResponsesData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/response';\n};\n\nexport type CallWithDuplicateResponsesErrors = {\n    /**\n     * Message for 500 error\n     */\n    500: ModelWithStringError;\n    /**\n     * Message for 501 error\n     */\n    501: ModelWithStringError;\n    /**\n     * Message for 502 error\n     */\n    502: ModelWithStringError;\n    /**\n     * Message for 4XX errors\n     */\n    '4XX': DictionaryWithArray;\n    /**\n     * Default error response\n     */\n    default: ModelWithBoolean;\n};\n\nexport type CallWithDuplicateResponsesError = CallWithDuplicateResponsesErrors[keyof CallWithDuplicateResponsesErrors];\n\nexport type CallWithDuplicateResponsesResponses = {\n    /**\n     * Message for 200 response\n     */\n    200: ModelWithBoolean & ModelWithInteger;\n    /**\n     * Message for 201 response\n     */\n    201: ModelWithString;\n    /**\n     * Message for 202 response\n     */\n    202: ModelWithString;\n};\n\nexport type CallWithDuplicateResponsesResponse = CallWithDuplicateResponsesResponses[keyof CallWithDuplicateResponsesResponses];\n\nexport type CallWithResponsesData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/response';\n};\n\nexport type CallWithResponsesErrors = {\n    /**\n     * Message for 500 error\n     */\n    500: ModelWithStringError;\n    /**\n     * Message for 501 error\n     */\n    501: ModelWithStringError;\n    /**\n     * Message for 502 error\n     */\n    502: ModelWithStringError;\n    /**\n     * Message for default response\n     */\n    default: ModelWithStringError;\n};\n\nexport type CallWithResponsesError = CallWithResponsesErrors[keyof CallWithResponsesErrors];\n\nexport type CallWithResponsesResponses = {\n    /**\n     * Message for 200 response\n     */\n    200: {\n        readonly '@namespace.string'?: string;\n        readonly '@namespace.integer'?: number;\n        readonly value?: Array<ModelWithString>;\n    };\n    /**\n     * Message for 201 response\n     */\n    201: ModelThatExtends;\n    /**\n     * Message for 202 response\n     */\n    202: ModelThatExtendsExtends;\n};\n\nexport type CallWithResponsesResponse = CallWithResponsesResponses[keyof CallWithResponsesResponses];\n\nexport type CollectionFormatData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * This is an array parameter that is sent as csv format (comma-separated values)\n         */\n        parameterArrayCSV: Array<string> | null;\n        /**\n         * This is an array parameter that is sent as ssv format (space-separated values)\n         */\n        parameterArraySSV: Array<string> | null;\n        /**\n         * This is an array parameter that is sent as tsv format (tab-separated values)\n         */\n        parameterArrayTSV: Array<string> | null;\n        /**\n         * This is an array parameter that is sent as pipes format (pipe-separated values)\n         */\n        parameterArrayPipes: Array<string> | null;\n        /**\n         * This is an array parameter that is sent as multi format (multiple parameter instances)\n         */\n        parameterArrayMulti: Array<string> | null;\n    };\n    url: '/api/v{api-version}/collectionFormat';\n};\n\nexport type TypesData = {\n    body?: never;\n    path?: {\n        /**\n         * This is a number parameter\n         */\n        id?: number;\n    };\n    query: {\n        /**\n         * This is a number parameter\n         */\n        parameterNumber: number;\n        /**\n         * This is a string parameter\n         */\n        parameterString: string | null;\n        /**\n         * This is a boolean parameter\n         */\n        parameterBoolean: boolean | null;\n        /**\n         * This is an object parameter\n         */\n        parameterObject: {\n            [key: string]: unknown;\n        } | null;\n        /**\n         * This is an array parameter\n         */\n        parameterArray: Array<string> | null;\n        /**\n         * This is a dictionary parameter\n         */\n        parameterDictionary: {\n            [key: string]: unknown;\n        } | null;\n        /**\n         * This is an enum parameter\n         */\n        parameterEnum: 'Success' | 'Warning' | 'Error' | null;\n    };\n    url: '/api/v{api-version}/types';\n};\n\nexport type TypesResponses = {\n    /**\n     * Response is a simple number\n     */\n    200: number;\n    /**\n     * Response is a simple string\n     */\n    201: string;\n    /**\n     * Response is a simple boolean\n     */\n    202: boolean;\n    /**\n     * Response is a simple object\n     */\n    203: {\n        [key: string]: unknown;\n    };\n};\n\nexport type TypesResponse = TypesResponses[keyof TypesResponses];\n\nexport type UploadFileData = {\n    body: Blob | File;\n    path: {\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string | null;\n    };\n    query?: never;\n    url: '/api/v{api-version}/upload';\n};\n\nexport type UploadFileResponses = {\n    200: boolean;\n};\n\nexport type UploadFileResponse = UploadFileResponses[keyof UploadFileResponses];\n\nexport type FileResponseData = {\n    body?: never;\n    path: {\n        id: string;\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string;\n    };\n    query?: never;\n    url: '/api/v{api-version}/file/{id}';\n};\n\nexport type FileResponseResponses = {\n    /**\n     * Success\n     */\n    200: Blob | File;\n};\n\nexport type FileResponseResponse = FileResponseResponses[keyof FileResponseResponses];\n\nexport type ComplexTypesData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * Parameter containing object\n         */\n        parameterObject: {\n            first?: {\n                second?: {\n                    third?: string;\n                };\n            };\n        };\n        /**\n         * Parameter containing reference\n         */\n        parameterReference: ModelWithString;\n    };\n    url: '/api/v{api-version}/complex';\n};\n\nexport type ComplexTypesErrors = {\n    /**\n     * 400 `server` error\n     */\n    400: unknown;\n    /**\n     * 500 server error\n     */\n    500: unknown;\n};\n\nexport type ComplexTypesResponses = {\n    /**\n     * Successful response\n     */\n    200: Array<ModelWithString>;\n};\n\nexport type ComplexTypesResponse = ComplexTypesResponses[keyof ComplexTypesResponses];\n\nexport type MultipartResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multipart';\n};\n\nexport type MultipartResponseResponses = {\n    /**\n     * OK\n     */\n    200: {\n        file?: Blob | File;\n        metadata?: {\n            foo?: string;\n            bar?: string;\n        };\n    };\n};\n\nexport type MultipartResponseResponse = MultipartResponseResponses[keyof MultipartResponseResponses];\n\nexport type MultipartRequestData = {\n    body?: {\n        content?: Blob | File;\n        data?: ModelWithString | null;\n    };\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multipart';\n};\n\nexport type ComplexParamsData = {\n    body?: {\n        readonly key: string | null;\n        name: string | null;\n        enabled?: boolean;\n        type: 'Monkey' | 'Horse' | 'Bird';\n        listOfModels?: Array<ModelWithString> | null;\n        listOfStrings?: Array<string> | null;\n        parameters: ModelWithString | ModelWithEnum | ModelWithArray | ModelWithDictionary;\n        readonly user?: {\n            readonly id?: number;\n            readonly name?: string | null;\n        };\n    };\n    path: {\n        id: number;\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string;\n    };\n    query?: never;\n    url: '/api/v{api-version}/complex/{id}';\n};\n\nexport type ComplexParamsResponses = {\n    /**\n     * Success\n     */\n    200: ModelWithString;\n};\n\nexport type ComplexParamsResponse = ComplexParamsResponses[keyof ComplexParamsResponses];\n\nexport type CallWithResultFromHeaderData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/header';\n};\n\nexport type CallWithResultFromHeaderErrors = {\n    /**\n     * 400 server error\n     */\n    400: unknown;\n    /**\n     * 500 server error\n     */\n    500: unknown;\n};\n\nexport type CallWithResultFromHeaderResponses = {\n    /**\n     * Successful response\n     */\n    200: unknown;\n};\n\nexport type TestErrorCodeData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * Status code to return\n         */\n        status: number;\n    };\n    url: '/api/v{api-version}/error';\n};\n\nexport type TestErrorCodeErrors = {\n    /**\n     * Custom message: Internal Server Error\n     */\n    500: unknown;\n    /**\n     * Custom message: Not Implemented\n     */\n    501: unknown;\n    /**\n     * Custom message: Bad Gateway\n     */\n    502: unknown;\n    /**\n     * Custom message: Service Unavailable\n     */\n    503: unknown;\n};\n\nexport type TestErrorCodeResponses = {\n    /**\n     * Custom message: Successful response\n     */\n    200: unknown;\n};\n\nexport type NonAsciiæøåÆøÅöôêÊ字符串Data = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * Dummy input param\n         */\n        nonAsciiParamæøåÆØÅöôêÊ: number;\n    };\n    url: '/api/v{api-version}/non-ascii-æøåÆØÅöôêÊ字符串';\n};\n\nexport type NonAsciiæøåÆøÅöôêÊ字符串Responses = {\n    /**\n     * Successful response\n     */\n    200: Array<NonAsciiStringæøåÆøÅöôêÊ字符串>;\n};\n\nexport type NonAsciiæøåÆøÅöôêÊ字符串Response = NonAsciiæøåÆøÅöôêÊ字符串Responses[keyof NonAsciiæøåÆøÅöôêÊ字符串Responses];\n\nexport type PutWithFormUrlEncodedData = {\n    body: ArrayWithStrings;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/non-ascii-æøåÆØÅöôêÊ字符串';\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-nuxt/import-file-extension-ts/client/client.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport { useAsyncData, useFetch, useLazyAsyncData, useLazyFetch } from 'nuxt/app';\nimport { reactive, ref, toValue, watch } from 'vue';\n\nimport { createSseClient } from '../core/serverSentEvents.gen.ts';\nimport type { HttpMethod } from '../core/types.gen.ts';\nimport { getValidRequestBody } from '../core/utils.gen.ts';\nimport type { Client, Config, RequestOptions } from './types.gen.ts';\nimport {\n  buildUrl,\n  createConfig,\n  executeFetchFn,\n  mergeConfigs,\n  mergeHeaders,\n  mergeInterceptors,\n  serializeBody,\n  setAuthParams,\n  unwrapRefs,\n} from './utils.gen.ts';\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 beforeRequest = async (options: RequestOptions) => {\n    const opts = {\n      ..._config,\n      ...options,\n      $fetch: options.$fetch ?? _config.$fetch ?? $fetch,\n      headers: mergeHeaders(_config.headers, options.headers),\n      onRequest: mergeInterceptors(_config.onRequest, options.onRequest),\n      onResponse: mergeInterceptors(_config.onResponse, options.onResponse),\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    const url = buildUrl(opts);\n\n    return { opts, url };\n  };\n\n  const request: Client['request'] = ({ asyncDataOptions, composable = '$fetch', ...options }) => {\n    const key = options.key;\n    const opts = {\n      ..._config,\n      ...options,\n      $fetch: options.$fetch ?? _config.$fetch ?? $fetch,\n      headers: mergeHeaders(_config.headers, options.headers),\n      onRequest: mergeInterceptors(_config.onRequest, options.onRequest),\n      onResponse: mergeInterceptors(_config.onResponse, options.onResponse),\n    };\n\n    const { requestValidator, responseTransformer, responseValidator, security } = opts;\n    if (requestValidator || security) {\n      // auth must happen in interceptors otherwise we'd need to require\n      // asyncContext enabled\n      // https://nuxt.com/docs/guide/going-further/experimental-features#asynccontext\n      opts.onRequest = [\n        async ({ options }) => {\n          if (security) {\n            await setAuthParams({\n              auth: opts.auth,\n              headers: options.headers,\n              query: options.query,\n              security,\n            });\n          }\n\n          if (requestValidator) {\n            await requestValidator({\n              ...options,\n              // @ts-expect-error\n              body: options.rawBody,\n            });\n          }\n        },\n        ...opts.onRequest,\n      ];\n    }\n\n    if (responseTransformer || responseValidator) {\n      opts.onResponse = [\n        ...opts.onResponse,\n        async ({ options, response }) => {\n          if (options.responseType && options.responseType !== 'json') {\n            return;\n          }\n\n          if (!response.ok) {\n            return;\n          }\n\n          if (responseValidator) {\n            await responseValidator(response._data);\n          }\n\n          if (responseTransformer) {\n            response._data = await responseTransformer(response._data);\n          }\n        },\n      ];\n    }\n\n    // remove Content-Type header if body is empty to avoid sending invalid requests\n    if (opts.body === undefined || opts.body === '') {\n      opts.headers.delete('Content-Type');\n    }\n\n    const fetchFn = opts.$fetch;\n\n    if (composable === '$fetch') {\n      return executeFetchFn(\n        // @ts-expect-error\n        opts,\n        fetchFn,\n      );\n    }\n\n    if (composable === 'useFetch' || composable === 'useLazyFetch') {\n      opts.rawBody = opts.body;\n      const bodyParams = reactive({\n        body: opts.body,\n        bodySerializer: opts.bodySerializer,\n      });\n      const body = ref(serializeBody({ ...opts, body: toValue(opts.body) }));\n      opts.body = body;\n      watch(bodyParams, (changed) => {\n        body.value = serializeBody(changed);\n      });\n      return composable === 'useLazyFetch'\n        ? useLazyFetch(() => buildUrl(opts), { ...opts, ...asyncDataOptions })\n        : useFetch(() => buildUrl(opts), { ...opts, ...asyncDataOptions });\n    }\n\n    const handler: any = () =>\n      executeFetchFn(\n        // @ts-expect-error\n        opts,\n        fetchFn,\n      );\n\n    if (composable === 'useAsyncData') {\n      return key\n        ? useAsyncData(key, handler, asyncDataOptions)\n        : useAsyncData(handler, asyncDataOptions);\n    }\n\n    if (composable === 'useLazyAsyncData') {\n      return key\n        ? useLazyAsyncData(key, handler, asyncDataOptions)\n        : useLazyAsyncData(handler, asyncDataOptions);\n    }\n\n    return undefined as any;\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      ...unwrapRefs(opts),\n      body: opts.body as BodyInit | null | undefined,\n      method,\n      onRequest: undefined,\n      serializedBody: getValidRequestBody(opts) as BodyInit | null | undefined,\n      signal: unwrapRefs(opts.signal) as AbortSignal,\n      url,\n    });\n  };\n\n  const _buildUrl: Client['buildUrl'] = (options) =>\n    buildUrl({ ..._config, ...options } as typeof 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    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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-nuxt/import-file-extension-ts/client/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type { Auth } from '../core/auth.gen.ts';\nexport type { QuerySerializerOptions } from '../core/bodySerializer.gen.ts';\nexport {\n  formDataBodySerializer,\n  jsonBodySerializer,\n  urlSearchParamsBodySerializer,\n} from '../core/bodySerializer.gen.ts';\nexport { buildClientParams } from '../core/params.gen.ts';\nexport { serializeQueryKeyValue } from '../core/queryKeySerializer.gen.ts';\nexport { createClient } from './client.gen.ts';\nexport type {\n  Client,\n  ClientOptions,\n  Composable,\n  Config,\n  CreateClientConfig,\n  Options,\n  RequestOptions,\n  RequestResult,\n  TDataShape,\n} from './types.gen.ts';\nexport { createConfig } from './utils.gen.ts';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-nuxt/import-file-extension-ts/client/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type {\n  AsyncDataOptions,\n  useAsyncData,\n  useFetch,\n  UseFetchOptions,\n  useLazyAsyncData,\n  useLazyFetch,\n} from 'nuxt/app';\nimport type { Ref } from 'vue';\n\nimport type { Auth } from '../core/auth.gen.ts';\nimport type { QuerySerializerOptions } from '../core/bodySerializer.gen.ts';\nimport type {\n  ServerSentEventsOptions,\n  ServerSentEventsResult,\n} from '../core/serverSentEvents.gen.ts';\nimport type { Client as CoreClient, Config as CoreConfig } from '../core/types.gen.ts';\n\nexport type ArraySeparatorStyle = ArrayStyle | MatrixStyle;\ntype ArrayStyle = 'form' | 'spaceDelimited' | 'pipeDelimited';\ntype MatrixStyle = 'label' | 'matrix' | 'simple';\nexport type ObjectSeparatorStyle = ObjectStyle | MatrixStyle;\ntype ObjectStyle = 'form' | 'deepObject';\n\nexport type QuerySerializer = (query: Parameters<Client['buildUrl']>[0]['query']) => string;\n\ntype WithRefs<TData> = {\n  [K in keyof TData]: NonNullable<TData[K]> extends object\n    ? WithRefs<NonNullable<TData[K]>> | Ref<NonNullable<TData[K]>> | Extract<TData[K], null>\n    : NonNullable<TData[K]> | Ref<NonNullable<TData[K]>> | Extract<TData[K], null>;\n};\n\n// copied from Nuxt\nexport type KeysOf<T> = Array<T extends T ? (keyof T extends string ? keyof T : never) : never>;\n\nexport interface Config<T extends ClientOptions = ClientOptions>\n  extends\n    Omit<FetchOptions<unknown>, 'baseURL' | 'body' | 'headers' | 'method' | 'query'>,\n    WithRefs<Pick<FetchOptions<unknown>, 'query'>>,\n    Omit<CoreConfig, 'querySerializer'> {\n  /**\n   * Base URL for all requests made by this client.\n   */\n  baseURL?: T['baseURL'];\n  /**\n   * A function for serializing request query parameters. By default, arrays\n   * will be exploded in form style, objects will be exploded in deepObject\n   * style, and reserved characters are percent-encoded.\n   *\n   * {@link https://swagger.io/docs/specification/serialization/#query View examples}\n   */\n  querySerializer?: QuerySerializer | QuerySerializerOptions;\n}\n\nexport interface RequestOptions<\n  TComposable extends Composable = '$fetch',\n  ResT = unknown,\n  DefaultT = undefined,\n  Url extends string = string,\n>\n  extends\n    Config,\n    WithRefs<{\n      path?: FetchOptions<unknown>['query'];\n      query?: FetchOptions<unknown>['query'];\n    }>,\n    Pick<\n      ServerSentEventsOptions<ResT>,\n      | 'onSseError'\n      | 'onSseEvent'\n      | 'sseDefaultRetryDelay'\n      | 'sseMaxRetryAttempts'\n      | 'sseMaxRetryDelay'\n    > {\n  asyncDataOptions?: AsyncDataOptions<ResT, ResT, KeysOf<ResT>, DefaultT>;\n  /**\n   * Any body that you want to add to your request.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/fetch#body}\n   */\n  body?: NonNullable<unknown> | Ref<NonNullable<unknown>> | null;\n  composable?: TComposable;\n  key?: string;\n  rawBody?: NonNullable<unknown> | Ref<NonNullable<unknown>> | null;\n  /**\n   * Security mechanism(s) to use for the request.\n   */\n  security?: ReadonlyArray<Auth>;\n  url: Url;\n}\n\nexport type RequestResult<\n  TComposable extends Composable,\n  ResT,\n  TError,\n> = TComposable extends '$fetch'\n  ? ReturnType<typeof $fetch<ResT>>\n  : TComposable extends 'useAsyncData'\n    ? ReturnType<typeof useAsyncData<ResT | null, TError>>\n    : TComposable extends 'useFetch'\n      ? ReturnType<typeof useFetch<ResT | null, TError>>\n      : TComposable extends 'useLazyAsyncData'\n        ? ReturnType<typeof useLazyAsyncData<ResT | null, TError>>\n        : TComposable extends 'useLazyFetch'\n          ? ReturnType<typeof useLazyFetch<ResT | null, TError>>\n          : never;\n\nexport interface ClientOptions {\n  baseURL?: string;\n}\n\ntype MethodFn = <\n  TComposable extends Composable = '$fetch',\n  ResT = unknown,\n  TError = unknown,\n  DefaultT = undefined,\n>(\n  options: Omit<RequestOptions<TComposable, ResT, DefaultT>, 'method'>,\n) => RequestResult<TComposable, ResT, TError>;\n\ntype SseFn = <\n  TComposable extends Composable = '$fetch',\n  ResT = unknown,\n  TError = unknown,\n  DefaultT = undefined,\n>(\n  options: Omit<RequestOptions<TComposable, ResT, DefaultT>, 'method'>,\n) => Promise<ServerSentEventsResult<RequestResult<TComposable, ResT, TError>>>;\n\ntype RequestFn = <\n  TComposable extends Composable = '$fetch',\n  ResT = unknown,\n  TError = unknown,\n  DefaultT = undefined,\n>(\n  options: Omit<RequestOptions<TComposable, ResT, DefaultT>, 'method'> &\n    Pick<Required<RequestOptions<TComposable, ResT, DefaultT>>, 'method'>,\n) => RequestResult<TComposable, ResT, TError>;\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 = ClientOptions> = (\n  override?: Config<ClientOptions & T>,\n) => Config<Required<ClientOptions> & T>;\n\nexport interface TDataShape {\n  body?: unknown;\n  headers?: unknown;\n  path?: FetchOptions<unknown>['query'];\n  query?: FetchOptions<unknown>['query'];\n  url: string;\n}\n\nexport type BuildUrlOptions<\n  TData extends Omit<TDataShape, 'headers'> = Omit<TDataShape, 'headers'>,\n> = Pick<WithRefs<TData>, 'path' | 'query'> &\n  Pick<TData, 'url'> &\n  Pick<Options<'$fetch', TData>, 'baseURL' | 'querySerializer'>;\n\ntype BuildUrlFn = <TData extends Omit<TDataShape, 'headers'>>(\n  options: BuildUrlOptions<TData>,\n) => string;\n\nexport type Client = CoreClient<RequestFn, Config, MethodFn, BuildUrlFn, SseFn>;\n\ntype OmitKeys<T, K> = Pick<T, Exclude<keyof T, K>>;\n\nexport type Options<\n  TComposable extends Composable = '$fetch',\n  TData extends TDataShape = TDataShape,\n  ResT = unknown,\n  DefaultT = undefined,\n> = OmitKeys<RequestOptions<TComposable, ResT, DefaultT>, 'body' | 'path' | 'query' | 'url'> &\n  ([TData] extends [never] ? unknown : WithRefs<Omit<TData, 'url'>>);\n\ntype FetchOptions<TData> = Omit<UseFetchOptions<TData, TData>, keyof AsyncDataOptions<TData>>;\n\nexport type Composable =\n  | '$fetch'\n  | 'useAsyncData'\n  | 'useFetch'\n  | 'useLazyAsyncData'\n  | 'useLazyFetch';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-nuxt/import-file-extension-ts/client/utils.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { ComputedRef, Ref } from 'vue';\nimport { isRef, toValue, unref } from 'vue';\n\nimport { getAuthToken } from '../core/auth.gen.ts';\nimport type { QuerySerializerOptions } from '../core/bodySerializer.gen.ts';\nimport { jsonBodySerializer } from '../core/bodySerializer.gen.ts';\nimport {\n  serializeArrayParam,\n  serializeObjectParam,\n  serializePrimitiveParam,\n} from '../core/pathSerializer.gen.ts';\nimport type {\n  ArraySeparatorStyle,\n  BuildUrlOptions,\n  Client,\n  ClientOptions,\n  Config,\n  QuerySerializer,\n  RequestOptions,\n} from './types.gen.ts';\n\ntype PathSerializer = Pick<Required<BuildUrlOptions>, 'path' | 'url'>;\n\nconst PATH_PARAM_RE = /\\{[^{}]+\\}/g;\n\ntype MaybeArray<T> = T | T[];\n\nconst 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 = toValue((toValue(path) as Record<string, unknown> | undefined)?.[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 createQuerySerializer = <T = unknown>({\n  parameters = {},\n  ...args\n}: QuerySerializerOptions = {}) => {\n  const querySerializer = (queryParams: T) => {\n    const search: string[] = [];\n    const qParams = toValue(queryParams);\n    if (qParams && typeof qParams === 'object') {\n      for (const name in qParams) {\n        const value = toValue(qParams[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\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    (toValue(options.query) as Record<string, unknown> | undefined)?.[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    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        const queryValue = toValue(options.query) as Record<string, unknown> | undefined;\n        if (queryValue) {\n          queryValue[name] = token;\n        }\n        break;\n      }\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  const url = 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  return url;\n};\n\nexport const getUrl = ({\n  baseUrl,\n  path,\n  query,\n  querySerializer,\n  url: _url,\n}: Pick<BuildUrlOptions, 'path' | 'query' | 'url'> & {\n  baseUrl?: string;\n  querySerializer: QuerySerializer;\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 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 || typeof header !== 'object') {\n      continue;\n    }\n\n    let h: unknown = header;\n    if (isRef(h)) {\n      h = unref(h);\n    }\n\n    const iterator =\n      h instanceof Headers ? headersEntries(h) : Object.entries(h as Record<string, unknown>);\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, unwrapRefs(v) as string);\n        }\n      } else if (value !== undefined) {\n        const v = unwrapRefs(value);\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(key, typeof v === 'object' ? JSON.stringify(v) : (v as string));\n      }\n    }\n  }\n  return mergedHeaders;\n};\n\nexport const mergeInterceptors = <T>(...args: Array<MaybeArray<T>>): Array<T> =>\n  args.reduce<Array<T>>((acc, item) => {\n    if (typeof item === 'function') {\n      acc.push(item);\n    } else if (Array.isArray(item)) {\n      return acc.concat(item);\n    }\n    return acc;\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  querySerializer: defaultQuerySerializer,\n  ...override,\n});\n\ntype UnwrapRefs<T> =\n  T extends Ref<infer V>\n    ? V\n    : T extends ComputedRef<infer V>\n      ? V\n      : T extends Record<string, unknown> // this doesn't handle functions well\n        ? { [K in keyof T]: UnwrapRefs<T[K]> }\n        : T;\n\nexport const unwrapRefs = <T>(value: T): UnwrapRefs<T> => {\n  if (value === null || typeof value !== 'object' || value instanceof Headers) {\n    return (isRef(value) ? unref(value) : value) as UnwrapRefs<T>;\n  }\n\n  if (\n    value instanceof Blob ||\n    value instanceof FormData ||\n    value instanceof ReadableStream ||\n    value instanceof AbortSignal\n  ) {\n    return value as UnwrapRefs<T>;\n  }\n\n  if (Array.isArray(value)) {\n    return value.map((item) => unwrapRefs(item)) as UnwrapRefs<T>;\n  }\n\n  if (isRef(value)) {\n    return unwrapRefs(unref(value) as T);\n  }\n\n  // unwrap into new object to avoid modifying the source\n  const result: Record<string, unknown> = {};\n  for (const key in value) {\n    result[key] = unwrapRefs(value[key] as T);\n  }\n  return result as UnwrapRefs<T>;\n};\n\nexport const serializeBody = (\n  opts: Pick<Parameters<Client['request']>[0], 'body' | 'bodySerializer'>,\n) => {\n  if (opts.body && opts.bodySerializer) {\n    return opts.bodySerializer(opts.body);\n  }\n  return opts.body;\n};\n\nexport const executeFetchFn = (\n  opts: Omit<Parameters<Client['request']>[0], 'composable'>,\n  fetchFn: Required<Config>['$fetch'],\n) => {\n  const unwrappedOpts = unwrapRefs(opts);\n  unwrappedOpts.rawBody = unwrappedOpts.body;\n  unwrappedOpts.body = serializeBody(unwrappedOpts);\n  return fetchFn(\n    buildUrl(opts),\n    // @ts-expect-error\n    unwrappedOpts,\n  );\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-nuxt/import-file-extension-ts/client.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport { type ClientOptions, type Config, createClient, createConfig } from './client/index.ts';\nimport type { ClientOptions as ClientOptions2 } from './types.gen.ts';\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: 'http://localhost:3000/base' }));\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-nuxt/import-file-extension-ts/core/auth.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-nuxt/import-file-extension-ts/core/bodySerializer.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { ArrayStyle, ObjectStyle, SerializerOptions } from './pathSerializer.gen.ts';\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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-nuxt/import-file-extension-ts/core/params.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-nuxt/import-file-extension-ts/core/pathSerializer.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-nuxt/import-file-extension-ts/core/queryKeySerializer.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\n/**\n * JSON-friendly union that mirrors what Pinia Colada can hash.\n */\nexport type JsonValue =\n  | null\n  | string\n  | number\n  | boolean\n  | JsonValue[]\n  | { [key: string]: JsonValue };\n\n/**\n * Replacer that converts non-JSON values (bigint, Date, etc.) to safe substitutes.\n */\nexport const queryKeyJsonReplacer = (_key: string, value: unknown) => {\n  if (value === undefined || typeof value === 'function' || typeof value === 'symbol') {\n    return undefined;\n  }\n  if (typeof value === 'bigint') {\n    return value.toString();\n  }\n  if (value instanceof Date) {\n    return value.toISOString();\n  }\n  return value;\n};\n\n/**\n * Safely stringifies a value and parses it back into a JsonValue.\n */\nexport const stringifyToJsonValue = (input: unknown): JsonValue | undefined => {\n  try {\n    const json = JSON.stringify(input, queryKeyJsonReplacer);\n    if (json === undefined) {\n      return undefined;\n    }\n    return JSON.parse(json) as JsonValue;\n  } catch {\n    return undefined;\n  }\n};\n\n/**\n * Detects plain objects (including objects with a null prototype).\n */\nconst isPlainObject = (value: unknown): value is Record<string, unknown> => {\n  if (value === null || typeof value !== 'object') {\n    return false;\n  }\n  const prototype = Object.getPrototypeOf(value as object);\n  return prototype === Object.prototype || prototype === null;\n};\n\n/**\n * Turns URLSearchParams into a sorted JSON object for deterministic keys.\n */\nconst serializeSearchParams = (params: URLSearchParams): JsonValue => {\n  const entries = Array.from(params.entries()).sort(([a], [b]) => a.localeCompare(b));\n  const result: Record<string, JsonValue> = {};\n\n  for (const [key, value] of entries) {\n    const existing = result[key];\n    if (existing === undefined) {\n      result[key] = value;\n      continue;\n    }\n\n    if (Array.isArray(existing)) {\n      (existing as string[]).push(value);\n    } else {\n      result[key] = [existing, value];\n    }\n  }\n\n  return result;\n};\n\n/**\n * Normalizes any accepted value into a JSON-friendly shape for query keys.\n */\nexport const serializeQueryKeyValue = (value: unknown): JsonValue | undefined => {\n  if (value === null) {\n    return null;\n  }\n\n  if (typeof value === 'string' || typeof value === 'number' || typeof value === 'boolean') {\n    return value;\n  }\n\n  if (value === undefined || typeof value === 'function' || typeof value === 'symbol') {\n    return undefined;\n  }\n\n  if (typeof value === 'bigint') {\n    return value.toString();\n  }\n\n  if (value instanceof Date) {\n    return value.toISOString();\n  }\n\n  if (Array.isArray(value)) {\n    return stringifyToJsonValue(value);\n  }\n\n  if (typeof URLSearchParams !== 'undefined' && value instanceof URLSearchParams) {\n    return serializeSearchParams(value);\n  }\n\n  if (isPlainObject(value)) {\n    return stringifyToJsonValue(value);\n  }\n\n  return undefined;\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-nuxt/import-file-extension-ts/core/serverSentEvents.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { Config } from './types.gen.ts';\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 const 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            // Normalize line endings: CRLF -> LF, then CR -> LF\n            buffer = buffer.replace(/\\r\\n/g, '\\n').replace(/\\r/g, '\\n');\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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-nuxt/import-file-extension-ts/core/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { Auth, AuthToken } from './auth.gen.ts';\nimport type { BodySerializer, QuerySerializer, QuerySerializerOptions } from './bodySerializer.gen.ts';\n\nexport type HttpMethod =\n  | 'connect'\n  | 'delete'\n  | 'get'\n  | 'head'\n  | 'options'\n  | 'patch'\n  | 'post'\n  | 'put'\n  | 'trace';\n\nexport type Client<\n  RequestFn = never,\n  Config = unknown,\n  MethodFn = never,\n  BuildUrlFn = never,\n  SseFn = never,\n> = {\n  /**\n   * Returns the final request URL.\n   */\n  buildUrl: BuildUrlFn;\n  getConfig: () => Config;\n  request: RequestFn;\n  setConfig: (config: Config) => Config;\n} & {\n  [K in HttpMethod]: MethodFn;\n} & ([SseFn] extends [never] ? { sse?: never } : { sse: { [K in HttpMethod]: SseFn } });\n\nexport interface Config {\n  /**\n   * Auth token or a function returning auth token. The resolved value will be\n   * added to the request payload as defined by its `security` array.\n   */\n  auth?: ((auth: Auth) => Promise<AuthToken> | AuthToken) | AuthToken;\n  /**\n   * A function for serializing request body parameter. By default,\n   * {@link JSON.stringify()} will be used.\n   */\n  bodySerializer?: BodySerializer | null;\n  /**\n   * An object containing any HTTP headers that you want to pre-populate your\n   * `Headers` object with.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/Headers/Headers#init See more}\n   */\n  headers?:\n    | RequestInit['headers']\n    | Record<\n        string,\n        string | number | boolean | (string | number | boolean)[] | null | undefined | unknown\n      >;\n  /**\n   * The request method.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/fetch#method See more}\n   */\n  method?: Uppercase<HttpMethod>;\n  /**\n   * A function for serializing request query parameters. By default, arrays\n   * will be exploded in form style, objects will be exploded in deepObject\n   * style, and reserved characters are percent-encoded.\n   *\n   * This method will have no effect if the native `paramsSerializer()` Axios\n   * API function is used.\n   *\n   * {@link https://swagger.io/docs/specification/serialization/#query View examples}\n   */\n  querySerializer?: QuerySerializer | QuerySerializerOptions;\n  /**\n   * A function validating request data. This is useful if you want to ensure\n   * the request conforms to the desired shape, so it can be safely sent to\n   * the server.\n   */\n  requestValidator?: (data: unknown) => Promise<unknown>;\n  /**\n   * A function transforming response data before it's returned. This is useful\n   * for post-processing data, e.g. converting ISO strings into Date objects.\n   */\n  responseTransformer?: (data: unknown) => Promise<unknown>;\n  /**\n   * A function validating response data. This is useful if you want to ensure\n   * the response conforms to the desired shape, so it can be safely passed to\n   * the transformers and returned to the user.\n   */\n  responseValidator?: (data: unknown) => Promise<unknown>;\n}\n\ntype IsExactlyNeverOrNeverUndefined<T> = [T] extends [never]\n  ? true\n  : [T] extends [never | undefined]\n    ? [undefined] extends [T]\n      ? false\n      : true\n    : false;\n\nexport type OmitNever<T extends Record<string, unknown>> = {\n  [K in keyof T as IsExactlyNeverOrNeverUndefined<T[K]> extends true ? never : K]: T[K];\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-nuxt/import-file-extension-ts/core/utils.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { BodySerializer, QuerySerializer } from './bodySerializer.gen.ts';\nimport {\n  type ArraySeparatorStyle,\n  serializeArrayParam,\n  serializeObjectParam,\n  serializePrimitiveParam,\n} from './pathSerializer.gen.ts';\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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-nuxt/import-file-extension-ts/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport { apiVVersionODataControllerCount, callToTestOrderOfParams, callWithDefaultOptionalParameters, callWithDefaultParameters, callWithDescriptions, callWithDuplicateResponses, callWithNoContentResponse, callWithParameters, callWithResponse, callWithResponseAndNoContentResponse, callWithResponses, callWithResultFromHeader, callWithWeirdParameterNames, collectionFormat, complexParams, complexTypes, deleteCallWithoutParametersAndResponse, deleteFoo, deprecatedCall, dummyA, dummyB, duplicateName, duplicateName2, duplicateName3, duplicateName4, export_, fileResponse, fooWow, getApiVbyApiVersionSimpleOperation, getCallWithOptionalParam, getCallWithoutParametersAndResponse, headCallWithoutParametersAndResponse, import_, multipartRequest, multipartResponse, nonAsciiæøåÆøÅöôêÊ字符串, type Options, optionsCallWithoutParametersAndResponse, patchApiVbyApiVersionNoTag, patchCallWithoutParametersAndResponse, postApiVbyApiVersionFormData, postApiVbyApiVersionRequestBody, postCallWithOptionalParam, postCallWithoutParametersAndResponse, putCallWithoutParametersAndResponse, putWithFormUrlEncoded, testErrorCode, types, uploadFile } from './sdk.gen.ts';\nexport type { _3eNum1Период, _400, AdditionalPropertiesIntegerIssue, AdditionalPropertiesUnknownIssue, AdditionalPropertiesUnknownIssue2, AdditionalPropertiesUnknownIssue3, AdditionalPropertiesUnknownIssueWritable, AnyOfAnyAndNull, AnyOfArrays, ApiVVersionODataControllerCountData, ApiVVersionODataControllerCountResponse, ApiVVersionODataControllerCountResponses, ArrayWithAnyOfProperties, ArrayWithArray, ArrayWithBooleans, ArrayWithNumbers, ArrayWithProperties, ArrayWithReferences, ArrayWithStrings, CallToTestOrderOfParamsData, CallWithDefaultOptionalParametersData, CallWithDefaultParametersData, CallWithDescriptionsData, CallWithDuplicateResponsesData, CallWithDuplicateResponsesError, CallWithDuplicateResponsesErrors, CallWithDuplicateResponsesResponse, CallWithDuplicateResponsesResponses, CallWithNoContentResponseData, CallWithNoContentResponseResponse, CallWithNoContentResponseResponses, CallWithParametersData, CallWithResponseAndNoContentResponseData, CallWithResponseAndNoContentResponseResponse, CallWithResponseAndNoContentResponseResponses, CallWithResponseData, CallWithResponseResponse, CallWithResponseResponses, CallWithResponsesData, CallWithResponsesError, CallWithResponsesErrors, CallWithResponsesResponse, CallWithResponsesResponses, CallWithResultFromHeaderData, CallWithResultFromHeaderErrors, CallWithResultFromHeaderResponses, CallWithWeirdParameterNamesData, CamelCaseCommentWithBreaks, CharactersInDescription, ClientOptions, CollectionFormatData, CommentWithBackticks, CommentWithBackticksAndQuotes, CommentWithBreaks, CommentWithExpressionPlaceholders, CommentWithQuotes, CommentWithReservedCharacters, CommentWithSlashes, ComplexParamsData, ComplexParamsResponse, ComplexParamsResponses, ComplexTypesData, ComplexTypesErrors, ComplexTypesResponse, ComplexTypesResponses, CompositionBaseModel, CompositionExtendedModel, CompositionWithAllOfAndNullable, CompositionWithAnyOf, CompositionWithAnyOfAndNullable, CompositionWithAnyOfAnonymous, CompositionWithNestedAnyAndTypeNull, CompositionWithNestedAnyOfAndNull, CompositionWithOneOf, CompositionWithOneOfAndComplexArrayDictionary, CompositionWithOneOfAndNullable, CompositionWithOneOfAndProperties, CompositionWithOneOfAndSimpleArrayDictionary, CompositionWithOneOfAndSimpleDictionary, CompositionWithOneOfAnonymous, CompositionWithOneOfDiscriminator, ConstValue, Default, DeleteCallWithoutParametersAndResponseData, DeleteFooData, DeleteFooData2, DeleteFooData3, DeprecatedCallData, DeprecatedModel, DictionaryWithArray, DictionaryWithDictionary, DictionaryWithProperties, DictionaryWithPropertiesAndAdditionalProperties, DictionaryWithReference, DictionaryWithString, DummyAData, DummyAResponse, DummyAResponses, DummyBData, DummyBResponse, DummyBResponses, DuplicateName2Data, DuplicateName3Data, DuplicateName4Data, DuplicateNameData, EnumFromDescription, EnumWithExtensions, EnumWithNumbers, EnumWithReplacedCharacters, EnumWithStrings, EnumWithXEnumNames, ExportData, ExternalRefA, ExternalRefB, ExternalSharedModel, File, FileResponseData, FileResponseResponse, FileResponseResponses, FileWritable, FooWowData, FooWowResponses, FreeFormObjectWithAdditionalPropertiesEqEmptyObject, FreeFormObjectWithAdditionalPropertiesEqTrue, FreeFormObjectWithoutAdditionalProperties, GenericSchemaDuplicateIssue1SystemBoolean, GenericSchemaDuplicateIssue1SystemBooleanWritable, GenericSchemaDuplicateIssue1SystemString, GenericSchemaDuplicateIssue1SystemStringWritable, GetApiVbyApiVersionSimpleOperationData, GetApiVbyApiVersionSimpleOperationError, GetApiVbyApiVersionSimpleOperationErrors, GetApiVbyApiVersionSimpleOperationResponse, GetApiVbyApiVersionSimpleOperationResponses, GetCallWithOptionalParamData, GetCallWithoutParametersAndResponseData, HeadCallWithoutParametersAndResponseData, Import, ImportData, ImportResponse, ImportResponses, IoK8sApimachineryPkgApisMetaV1DeleteOptions, IoK8sApimachineryPkgApisMetaV1Preconditions, ModelCircle, ModelFromZendesk, ModelSquare, ModelThatExtends, ModelThatExtendsExtends, ModelWithAdditionalPropertiesEqTrue, ModelWithAdditionalPropertiesRef, ModelWithAnyOfConstantSizeArray, ModelWithAnyOfConstantSizeArrayAndIntersect, ModelWithAnyOfConstantSizeArrayNullable, ModelWithAnyOfConstantSizeArrayWithNSizeAndOptions, ModelWithAnyOfConstantSizeArrayWithNSizeAndOptionsWritable, ModelWithArray, ModelWithArrayReadOnlyAndWriteOnly, ModelWithArrayReadOnlyAndWriteOnlyWritable, ModelWithBackticksInDescription, ModelWithBoolean, ModelWithCircularReference, ModelWithConst, ModelWithConstantSizeArray, ModelWithDictionary, ModelWithDuplicateImports, ModelWithDuplicateProperties, ModelWithEnum, ModelWithEnumFromDescription, ModelWithEnumWithHyphen, ModelWithInteger, ModelWithNestedArrayEnums, ModelWithNestedArrayEnumsData, ModelWithNestedArrayEnumsDataBar, ModelWithNestedArrayEnumsDataFoo, ModelWithNestedCompositionEnums, ModelWithNestedEnums, ModelWithNestedProperties, ModelWithNullableObject, ModelWithNullableString, ModelWithNumericEnumUnion, ModelWithOneOfAndProperties, ModelWithOneOfEnum, ModelWithOrderedProperties, ModelWithPattern, ModelWithPatternWritable, ModelWithPrefixItemsConstantSizeArray, ModelWithProperties, ModelWithPropertiesWritable, ModelWithReadOnlyAndWriteOnly, ModelWithReadOnlyAndWriteOnlyWritable, ModelWithReference, ModelWithReferenceWritable, ModelWithString, ModelWithStringError, MultipartRequestData, MultipartResponseData, MultipartResponseResponse, MultipartResponseResponses, NestedAnyOfArraysNullable, NonAsciiæøåÆøÅöôêÊ字符串Data, NonAsciiæøåÆøÅöôêÊ字符串Response, NonAsciiæøåÆøÅöôêÊ字符串Responses, NonAsciiStringæøåÆøÅöôêÊ字符串, NullableObject, OneOfAllOfIssue, OneOfAllOfIssueWritable, OptionsCallWithoutParametersAndResponseData, Pageable, ParameterSimpleParameterUnused, PatchApiVbyApiVersionNoTagData, PatchApiVbyApiVersionNoTagResponses, PatchCallWithoutParametersAndResponseData, PostApiVbyApiVersionFormDataData, PostApiVbyApiVersionRequestBodyData, PostCallWithOptionalParamData, PostCallWithOptionalParamResponse, PostCallWithOptionalParamResponses, PostCallWithoutParametersAndResponseData, PostServiceWithEmptyTagResponse, PostServiceWithEmptyTagResponse2, PutCallWithoutParametersAndResponseData, PutWithFormUrlEncodedData, SchemaWithFormRestrictedKeys, SimpleBoolean, SimpleFile, SimpleFormData, SimpleInteger, SimpleParameter, SimpleReference, SimpleRequestBody, SimpleString, SimpleStringWithPattern, TestErrorCodeData, TestErrorCodeErrors, TestErrorCodeResponses, TypesData, TypesResponse, TypesResponses, UploadFileData, UploadFileResponse, UploadFileResponses, XFooBar } from './types.gen.ts';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-nuxt/import-file-extension-ts/sdk.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport { client } from './client.gen.ts';\nimport { type Client, type Composable, formDataBodySerializer, type Options as Options2, type TDataShape, urlSearchParamsBodySerializer } from './client/index.ts';\nimport type { ApiVVersionODataControllerCountData, ApiVVersionODataControllerCountResponse, CallToTestOrderOfParamsData, CallWithDefaultOptionalParametersData, CallWithDefaultParametersData, CallWithDescriptionsData, CallWithDuplicateResponsesData, CallWithDuplicateResponsesError, CallWithDuplicateResponsesResponse, CallWithNoContentResponseData, CallWithNoContentResponseResponse, CallWithParametersData, CallWithResponseAndNoContentResponseData, CallWithResponseAndNoContentResponseResponse, CallWithResponseData, CallWithResponseResponse, CallWithResponsesData, CallWithResponsesError, CallWithResponsesResponse, CallWithResultFromHeaderData, CallWithWeirdParameterNamesData, CollectionFormatData, ComplexParamsData, ComplexParamsResponse, ComplexTypesData, ComplexTypesResponse, DeleteCallWithoutParametersAndResponseData, DeleteFooData3, DeprecatedCallData, DummyAData, DummyAResponse, DummyBData, DummyBResponse, DuplicateName2Data, DuplicateName3Data, DuplicateName4Data, DuplicateNameData, ExportData, FileResponseData, FileResponseResponse, FooWowData, GetApiVbyApiVersionSimpleOperationData, GetApiVbyApiVersionSimpleOperationError, GetApiVbyApiVersionSimpleOperationResponse, GetCallWithOptionalParamData, GetCallWithoutParametersAndResponseData, HeadCallWithoutParametersAndResponseData, ImportData, ImportResponse, MultipartRequestData, MultipartResponseData, MultipartResponseResponse, NonAsciiæøåÆøÅöôêÊ字符串Data, NonAsciiæøåÆøÅöôêÊ字符串Response, OptionsCallWithoutParametersAndResponseData, PatchApiVbyApiVersionNoTagData, PatchCallWithoutParametersAndResponseData, PostApiVbyApiVersionFormDataData, PostApiVbyApiVersionRequestBodyData, PostCallWithOptionalParamData, PostCallWithOptionalParamResponse, PostCallWithoutParametersAndResponseData, PutCallWithoutParametersAndResponseData, PutWithFormUrlEncodedData, TestErrorCodeData, TypesData, TypesResponse, UploadFileData, UploadFileResponse } from './types.gen.ts';\n\nexport type Options<TComposable extends Composable = '$fetch', TData extends TDataShape = TDataShape, ResT = unknown, DefaultT = undefined> = Options2<TComposable, TData, ResT, DefaultT> & {\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\nexport const export_ = <TComposable extends Composable = '$fetch', DefaultT = undefined>(options: Options<TComposable, ExportData, unknown, DefaultT>) => (options.client ?? client).get<TComposable, unknown | DefaultT, unknown, DefaultT>({ url: '/api/v{api-version}/no+tag', ...options });\n\nexport const patchApiVbyApiVersionNoTag = <TComposable extends Composable = '$fetch', DefaultT = undefined>(options: Options<TComposable, PatchApiVbyApiVersionNoTagData, unknown, DefaultT>) => (options.client ?? client).patch<TComposable, unknown | DefaultT, unknown, DefaultT>({ url: '/api/v{api-version}/no+tag', ...options });\n\nexport const import_ = <TComposable extends Composable = '$fetch', DefaultT extends ImportResponse = ImportResponse>(options: Options<TComposable, ImportData, ImportResponse, DefaultT>) => (options.client ?? client).post<TComposable, ImportResponse | DefaultT, unknown, DefaultT>({\n    url: '/api/v{api-version}/no+tag',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options.headers\n    }\n});\n\nexport const fooWow = <TComposable extends Composable = '$fetch', DefaultT = undefined>(options: Options<TComposable, FooWowData, unknown, DefaultT>) => (options.client ?? client).put<TComposable, unknown | DefaultT, unknown, DefaultT>({ url: '/api/v{api-version}/no+tag', ...options });\n\nexport const apiVVersionODataControllerCount = <TComposable extends Composable = '$fetch', DefaultT extends ApiVVersionODataControllerCountResponse = ApiVVersionODataControllerCountResponse>(options: Options<TComposable, ApiVVersionODataControllerCountData, ApiVVersionODataControllerCountResponse, DefaultT>) => (options.client ?? client).get<TComposable, ApiVVersionODataControllerCountResponse | DefaultT, unknown, DefaultT>({ url: '/api/v{api-version}/simple/$count', ...options });\n\nexport const getApiVbyApiVersionSimpleOperation = <TComposable extends Composable = '$fetch', DefaultT extends GetApiVbyApiVersionSimpleOperationResponse = GetApiVbyApiVersionSimpleOperationResponse>(options: Options<TComposable, GetApiVbyApiVersionSimpleOperationData, GetApiVbyApiVersionSimpleOperationResponse, DefaultT>) => (options.client ?? client).get<TComposable, GetApiVbyApiVersionSimpleOperationResponse | DefaultT, GetApiVbyApiVersionSimpleOperationError, DefaultT>({ url: '/api/v{api-version}/simple:operation', ...options });\n\nexport const deleteCallWithoutParametersAndResponse = <TComposable extends Composable = '$fetch', DefaultT = undefined>(options: Options<TComposable, DeleteCallWithoutParametersAndResponseData, unknown, DefaultT>) => (options.client ?? client).delete<TComposable, unknown | DefaultT, unknown, DefaultT>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const getCallWithoutParametersAndResponse = <TComposable extends Composable = '$fetch', DefaultT = undefined>(options: Options<TComposable, GetCallWithoutParametersAndResponseData, unknown, DefaultT>) => (options.client ?? client).get<TComposable, unknown | DefaultT, unknown, DefaultT>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const headCallWithoutParametersAndResponse = <TComposable extends Composable = '$fetch', DefaultT = undefined>(options: Options<TComposable, HeadCallWithoutParametersAndResponseData, unknown, DefaultT>) => (options.client ?? client).head<TComposable, unknown | DefaultT, unknown, DefaultT>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const optionsCallWithoutParametersAndResponse = <TComposable extends Composable = '$fetch', DefaultT = undefined>(options: Options<TComposable, OptionsCallWithoutParametersAndResponseData, unknown, DefaultT>) => (options.client ?? client).options<TComposable, unknown | DefaultT, unknown, DefaultT>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const patchCallWithoutParametersAndResponse = <TComposable extends Composable = '$fetch', DefaultT = undefined>(options: Options<TComposable, PatchCallWithoutParametersAndResponseData, unknown, DefaultT>) => (options.client ?? client).patch<TComposable, unknown | DefaultT, unknown, DefaultT>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const postCallWithoutParametersAndResponse = <TComposable extends Composable = '$fetch', DefaultT = undefined>(options: Options<TComposable, PostCallWithoutParametersAndResponseData, unknown, DefaultT>) => (options.client ?? client).post<TComposable, unknown | DefaultT, unknown, DefaultT>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const putCallWithoutParametersAndResponse = <TComposable extends Composable = '$fetch', DefaultT = undefined>(options: Options<TComposable, PutCallWithoutParametersAndResponseData, unknown, DefaultT>) => (options.client ?? client).put<TComposable, unknown | DefaultT, unknown, DefaultT>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const deleteFoo = <TComposable extends Composable = '$fetch', DefaultT = undefined>(options: Options<TComposable, DeleteFooData3, unknown, DefaultT>) => (options.client ?? client).delete<TComposable, unknown | DefaultT, unknown, DefaultT>({ url: '/api/v{api-version}/foo/{foo_param}/bar/{BarParam}', ...options });\n\nexport const callWithDescriptions = <TComposable extends Composable = '$fetch', DefaultT = undefined>(options: Options<TComposable, CallWithDescriptionsData, unknown, DefaultT>) => (options.client ?? client).post<TComposable, unknown | DefaultT, unknown, DefaultT>({ url: '/api/v{api-version}/descriptions', ...options });\n\n/**\n * @deprecated\n */\nexport const deprecatedCall = <TComposable extends Composable = '$fetch', DefaultT = undefined>(options: Options<TComposable, DeprecatedCallData, unknown, DefaultT>) => (options.client ?? client).post<TComposable, unknown | DefaultT, unknown, DefaultT>({ url: '/api/v{api-version}/parameters/deprecated', ...options });\n\nexport const callWithParameters = <TComposable extends Composable = '$fetch', DefaultT = undefined>(options: Options<TComposable, CallWithParametersData, unknown, DefaultT>) => (options.client ?? client).post<TComposable, unknown | DefaultT, unknown, DefaultT>({\n    url: '/api/v{api-version}/parameters/{parameterPath}',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options.headers\n    }\n});\n\nexport const callWithWeirdParameterNames = <TComposable extends Composable = '$fetch', DefaultT = undefined>(options: Options<TComposable, CallWithWeirdParameterNamesData, unknown, DefaultT>) => (options.client ?? client).post<TComposable, unknown | DefaultT, unknown, DefaultT>({\n    url: '/api/v{api-version}/parameters/{parameter.path.1}/{parameter-path-2}/{PARAMETER-PATH-3}',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options.headers\n    }\n});\n\nexport const getCallWithOptionalParam = <TComposable extends Composable = '$fetch', DefaultT = undefined>(options: Options<TComposable, GetCallWithOptionalParamData, unknown, DefaultT>) => (options.client ?? client).get<TComposable, unknown | DefaultT, unknown, DefaultT>({\n    url: '/api/v{api-version}/parameters',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options.headers\n    }\n});\n\nexport const postCallWithOptionalParam = <TComposable extends Composable = '$fetch', DefaultT extends PostCallWithOptionalParamResponse = PostCallWithOptionalParamResponse>(options: Options<TComposable, PostCallWithOptionalParamData, PostCallWithOptionalParamResponse, DefaultT>) => (options.client ?? client).post<TComposable, PostCallWithOptionalParamResponse | DefaultT, unknown, DefaultT>({\n    url: '/api/v{api-version}/parameters',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options.headers\n    }\n});\n\nexport const postApiVbyApiVersionRequestBody = <TComposable extends Composable = '$fetch', DefaultT = undefined>(options: Options<TComposable, PostApiVbyApiVersionRequestBodyData, unknown, DefaultT>) => (options.client ?? client).post<TComposable, unknown | DefaultT, unknown, DefaultT>({\n    url: '/api/v{api-version}/requestBody',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options.headers\n    }\n});\n\nexport const postApiVbyApiVersionFormData = <TComposable extends Composable = '$fetch', DefaultT = undefined>(options: Options<TComposable, PostApiVbyApiVersionFormDataData, unknown, DefaultT>) => (options.client ?? client).post<TComposable, unknown | DefaultT, unknown, DefaultT>({\n    ...formDataBodySerializer,\n    url: '/api/v{api-version}/formData',\n    ...options,\n    headers: {\n        'Content-Type': null,\n        ...options.headers\n    }\n});\n\nexport const callWithDefaultParameters = <TComposable extends Composable = '$fetch', DefaultT = undefined>(options: Options<TComposable, CallWithDefaultParametersData, unknown, DefaultT>) => (options.client ?? client).get<TComposable, unknown | DefaultT, unknown, DefaultT>({ url: '/api/v{api-version}/defaults', ...options });\n\nexport const callWithDefaultOptionalParameters = <TComposable extends Composable = '$fetch', DefaultT = undefined>(options: Options<TComposable, CallWithDefaultOptionalParametersData, unknown, DefaultT>) => (options.client ?? client).post<TComposable, unknown | DefaultT, unknown, DefaultT>({ url: '/api/v{api-version}/defaults', ...options });\n\nexport const callToTestOrderOfParams = <TComposable extends Composable = '$fetch', DefaultT = undefined>(options: Options<TComposable, CallToTestOrderOfParamsData, unknown, DefaultT>) => (options.client ?? client).put<TComposable, unknown | DefaultT, unknown, DefaultT>({ url: '/api/v{api-version}/defaults', ...options });\n\nexport const duplicateName = <TComposable extends Composable = '$fetch', DefaultT = undefined>(options: Options<TComposable, DuplicateNameData, unknown, DefaultT>) => (options.client ?? client).delete<TComposable, unknown | DefaultT, unknown, DefaultT>({ url: '/api/v{api-version}/duplicate', ...options });\n\nexport const duplicateName2 = <TComposable extends Composable = '$fetch', DefaultT = undefined>(options: Options<TComposable, DuplicateName2Data, unknown, DefaultT>) => (options.client ?? client).get<TComposable, unknown | DefaultT, unknown, DefaultT>({ url: '/api/v{api-version}/duplicate', ...options });\n\nexport const duplicateName3 = <TComposable extends Composable = '$fetch', DefaultT = undefined>(options: Options<TComposable, DuplicateName3Data, unknown, DefaultT>) => (options.client ?? client).post<TComposable, unknown | DefaultT, unknown, DefaultT>({ url: '/api/v{api-version}/duplicate', ...options });\n\nexport const duplicateName4 = <TComposable extends Composable = '$fetch', DefaultT = undefined>(options: Options<TComposable, DuplicateName4Data, unknown, DefaultT>) => (options.client ?? client).put<TComposable, unknown | DefaultT, unknown, DefaultT>({ url: '/api/v{api-version}/duplicate', ...options });\n\nexport const callWithNoContentResponse = <TComposable extends Composable = '$fetch', DefaultT extends CallWithNoContentResponseResponse = CallWithNoContentResponseResponse>(options: Options<TComposable, CallWithNoContentResponseData, CallWithNoContentResponseResponse, DefaultT>) => (options.client ?? client).get<TComposable, CallWithNoContentResponseResponse | DefaultT, unknown, DefaultT>({ url: '/api/v{api-version}/no-content', ...options });\n\nexport const callWithResponseAndNoContentResponse = <TComposable extends Composable = '$fetch', DefaultT extends CallWithResponseAndNoContentResponseResponse = CallWithResponseAndNoContentResponseResponse>(options: Options<TComposable, CallWithResponseAndNoContentResponseData, CallWithResponseAndNoContentResponseResponse, DefaultT>) => (options.client ?? client).get<TComposable, CallWithResponseAndNoContentResponseResponse | DefaultT, unknown, DefaultT>({ url: '/api/v{api-version}/multiple-tags/response-and-no-content', ...options });\n\nexport const dummyA = <TComposable extends Composable = '$fetch', DefaultT extends DummyAResponse = DummyAResponse>(options: Options<TComposable, DummyAData, DummyAResponse, DefaultT>) => (options.client ?? client).get<TComposable, DummyAResponse | DefaultT, unknown, DefaultT>({ url: '/api/v{api-version}/multiple-tags/a', ...options });\n\nexport const dummyB = <TComposable extends Composable = '$fetch', DefaultT extends DummyBResponse = DummyBResponse>(options: Options<TComposable, DummyBData, DummyBResponse, DefaultT>) => (options.client ?? client).get<TComposable, DummyBResponse | DefaultT, unknown, DefaultT>({ url: '/api/v{api-version}/multiple-tags/b', ...options });\n\nexport const callWithResponse = <TComposable extends Composable = '$fetch', DefaultT extends CallWithResponseResponse = CallWithResponseResponse>(options: Options<TComposable, CallWithResponseData, CallWithResponseResponse, DefaultT>) => (options.client ?? client).get<TComposable, CallWithResponseResponse | DefaultT, unknown, DefaultT>({ url: '/api/v{api-version}/response', ...options });\n\nexport const callWithDuplicateResponses = <TComposable extends Composable = '$fetch', DefaultT extends CallWithDuplicateResponsesResponse = CallWithDuplicateResponsesResponse>(options: Options<TComposable, CallWithDuplicateResponsesData, CallWithDuplicateResponsesResponse, DefaultT>) => (options.client ?? client).post<TComposable, CallWithDuplicateResponsesResponse | DefaultT, CallWithDuplicateResponsesError, DefaultT>({ url: '/api/v{api-version}/response', ...options });\n\nexport const callWithResponses = <TComposable extends Composable = '$fetch', DefaultT extends CallWithResponsesResponse = CallWithResponsesResponse>(options: Options<TComposable, CallWithResponsesData, CallWithResponsesResponse, DefaultT>) => (options.client ?? client).put<TComposable, CallWithResponsesResponse | DefaultT, CallWithResponsesError, DefaultT>({ url: '/api/v{api-version}/response', ...options });\n\nexport const collectionFormat = <TComposable extends Composable = '$fetch', DefaultT = undefined>(options: Options<TComposable, CollectionFormatData, unknown, DefaultT>) => (options.client ?? client).get<TComposable, unknown | DefaultT, unknown, DefaultT>({ url: '/api/v{api-version}/collectionFormat', ...options });\n\nexport const types = <TComposable extends Composable = '$fetch', DefaultT extends TypesResponse = TypesResponse>(options: Options<TComposable, TypesData, TypesResponse, DefaultT>) => (options.client ?? client).get<TComposable, TypesResponse | DefaultT, unknown, DefaultT>({ url: '/api/v{api-version}/types', ...options });\n\nexport const uploadFile = <TComposable extends Composable = '$fetch', DefaultT extends UploadFileResponse = UploadFileResponse>(options: Options<TComposable, UploadFileData, UploadFileResponse, DefaultT>) => (options.client ?? client).post<TComposable, UploadFileResponse | DefaultT, unknown, DefaultT>({\n    ...urlSearchParamsBodySerializer,\n    url: '/api/v{api-version}/upload',\n    ...options,\n    headers: {\n        'Content-Type': 'application/x-www-form-urlencoded',\n        ...options.headers\n    }\n});\n\nexport const fileResponse = <TComposable extends Composable = '$fetch', DefaultT extends FileResponseResponse = FileResponseResponse>(options: Options<TComposable, FileResponseData, FileResponseResponse, DefaultT>) => (options.client ?? client).get<TComposable, FileResponseResponse | DefaultT, unknown, DefaultT>({ url: '/api/v{api-version}/file/{id}', ...options });\n\nexport const complexTypes = <TComposable extends Composable = '$fetch', DefaultT extends ComplexTypesResponse = ComplexTypesResponse>(options: Options<TComposable, ComplexTypesData, ComplexTypesResponse, DefaultT>) => (options.client ?? client).get<TComposable, ComplexTypesResponse | DefaultT, unknown, DefaultT>({\n    querySerializer: { parameters: { parameterObject: { object: { style: 'form' } } } },\n    url: '/api/v{api-version}/complex',\n    ...options\n});\n\nexport const multipartResponse = <TComposable extends Composable = '$fetch', DefaultT extends MultipartResponseResponse = MultipartResponseResponse>(options: Options<TComposable, MultipartResponseData, MultipartResponseResponse, DefaultT>) => (options.client ?? client).get<TComposable, MultipartResponseResponse | DefaultT, unknown, DefaultT>({ url: '/api/v{api-version}/multipart', ...options });\n\nexport const multipartRequest = <TComposable extends Composable = '$fetch', DefaultT = undefined>(options: Options<TComposable, MultipartRequestData, unknown, DefaultT>) => (options.client ?? client).post<TComposable, unknown | DefaultT, unknown, DefaultT>({\n    ...formDataBodySerializer,\n    url: '/api/v{api-version}/multipart',\n    ...options,\n    headers: {\n        'Content-Type': null,\n        ...options.headers\n    }\n});\n\nexport const complexParams = <TComposable extends Composable = '$fetch', DefaultT extends ComplexParamsResponse = ComplexParamsResponse>(options: Options<TComposable, ComplexParamsData, ComplexParamsResponse, DefaultT>) => (options.client ?? client).put<TComposable, ComplexParamsResponse | DefaultT, unknown, DefaultT>({\n    url: '/api/v{api-version}/complex/{id}',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json-patch+json',\n        ...options.headers\n    }\n});\n\nexport const callWithResultFromHeader = <TComposable extends Composable = '$fetch', DefaultT = undefined>(options: Options<TComposable, CallWithResultFromHeaderData, unknown, DefaultT>) => (options.client ?? client).post<TComposable, unknown | DefaultT, unknown, DefaultT>({ url: '/api/v{api-version}/header', ...options });\n\nexport const testErrorCode = <TComposable extends Composable = '$fetch', DefaultT = undefined>(options: Options<TComposable, TestErrorCodeData, unknown, DefaultT>) => (options.client ?? client).post<TComposable, unknown | DefaultT, unknown, DefaultT>({ url: '/api/v{api-version}/error', ...options });\n\nexport const nonAsciiæøåÆøÅöôêÊ字符串 = <TComposable extends Composable = '$fetch', DefaultT extends NonAsciiæøåÆøÅöôêÊ字符串Response = NonAsciiæøåÆøÅöôêÊ字符串Response>(options: Options<TComposable, NonAsciiæøåÆøÅöôêÊ字符串Data, NonAsciiæøåÆøÅöôêÊ字符串Response, DefaultT>) => (options.client ?? client).post<TComposable, NonAsciiæøåÆøÅöôêÊ字符串Response | DefaultT, unknown, DefaultT>({ url: '/api/v{api-version}/non-ascii-æøåÆØÅöôêÊ字符串', ...options });\n\n/**\n * Login User\n */\nexport const putWithFormUrlEncoded = <TComposable extends Composable = '$fetch', DefaultT = undefined>(options: Options<TComposable, PutWithFormUrlEncodedData, unknown, DefaultT>) => (options.client ?? client).put<TComposable, unknown | DefaultT, unknown, DefaultT>({\n    ...urlSearchParamsBodySerializer,\n    url: '/api/v{api-version}/non-ascii-æøåÆØÅöôêÊ字符串',\n    ...options,\n    headers: {\n        'Content-Type': 'application/x-www-form-urlencoded',\n        ...options.headers\n    }\n});\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-nuxt/import-file-extension-ts/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type ClientOptions = {\n    baseURL: 'http://localhost:3000/base' | (string & {});\n};\n\n/**\n * Model with number-only name\n */\nexport type _400 = string;\n\n/**\n * External ref to shared model (A)\n */\nexport type ExternalRefA = ExternalSharedModel;\n\n/**\n * External ref to shared model (B)\n */\nexport type ExternalRefB = ExternalSharedModel;\n\n/**\n * Testing multiline comments in string: First line\n * Second line\n *\n * Fourth line\n */\nexport type CamelCaseCommentWithBreaks = number;\n\n/**\n * Testing multiline comments in string: First line\n * Second line\n *\n * Fourth line\n */\nexport type CommentWithBreaks = number;\n\n/**\n * Testing backticks in string: `backticks` and ```multiple backticks``` should work\n */\nexport type CommentWithBackticks = number;\n\n/**\n * Testing backticks and quotes in string: `backticks`, 'quotes', \"double quotes\" and ```multiple backticks``` should work\n */\nexport type CommentWithBackticksAndQuotes = number;\n\n/**\n * Testing slashes in string: \\backwards\\\\\\ and /forwards/// should work\n */\nexport type CommentWithSlashes = number;\n\n/**\n * Testing expression placeholders in string: ${expression} should work\n */\nexport type CommentWithExpressionPlaceholders = number;\n\n/**\n * Testing quotes in string: 'single quote''' and \"double quotes\"\"\" should work\n */\nexport type CommentWithQuotes = number;\n\n/**\n * Testing reserved characters in string: * inline * and ** inline ** should work\n */\nexport type CommentWithReservedCharacters = number;\n\n/**\n * This is a simple number\n */\nexport type SimpleInteger = number;\n\n/**\n * This is a simple boolean\n */\nexport type SimpleBoolean = boolean;\n\n/**\n * This is a simple string\n */\nexport type SimpleString = string;\n\n/**\n * A string with non-ascii (unicode) characters valid in typescript identifiers (æøåÆØÅöÔèÈ字符串)\n */\nexport type NonAsciiStringæøåÆøÅöôêÊ字符串 = string;\n\n/**\n * This is a simple file\n */\nexport type SimpleFile = Blob | File;\n\n/**\n * This is a simple reference\n */\nexport type SimpleReference = ModelWithString;\n\n/**\n * This is a simple string\n */\nexport type SimpleStringWithPattern = string | null;\n\n/**\n * This is a simple enum with strings\n */\nexport type EnumWithStrings = 'Success' | 'Warning' | 'Error' | '\\'Single Quote\\'' | '\"Double Quotes\"' | 'Non-ascii: øæåôöØÆÅÔÖ字符串';\n\nexport type EnumWithReplacedCharacters = '\\'Single Quote\\'' | '\"Double Quotes\"' | 'øæåôöØÆÅÔÖ字符串' | 3.1 | '';\n\n/**\n * This is a simple enum with numbers\n */\nexport type EnumWithNumbers = 1 | 2 | 3 | 1.1 | 1.2 | 1.3 | 100 | 200 | 300 | -100 | -200 | -300 | -1.1 | -1.2 | -1.3;\n\n/**\n * Success=1,Warning=2,Error=3\n */\nexport type EnumFromDescription = number;\n\n/**\n * This is a simple enum with numbers\n */\nexport type EnumWithExtensions = 200 | 400 | 500;\n\nexport type EnumWithXEnumNames = 0 | 1 | 2;\n\n/**\n * This is a simple array with numbers\n */\nexport type ArrayWithNumbers = Array<number>;\n\n/**\n * This is a simple array with booleans\n */\nexport type ArrayWithBooleans = Array<boolean>;\n\n/**\n * This is a simple array with strings\n */\nexport type ArrayWithStrings = Array<string>;\n\n/**\n * This is a simple array with references\n */\nexport type ArrayWithReferences = Array<ModelWithString>;\n\n/**\n * This is a simple array containing an array\n */\nexport type ArrayWithArray = Array<Array<ModelWithString>>;\n\n/**\n * This is a simple array with properties\n */\nexport type ArrayWithProperties = Array<{\n    '16x16'?: CamelCaseCommentWithBreaks;\n    bar?: string;\n}>;\n\n/**\n * This is a simple array with any of properties\n */\nexport type ArrayWithAnyOfProperties = Array<{\n    foo?: string;\n} | {\n    bar?: string;\n}>;\n\nexport type AnyOfAnyAndNull = {\n    data?: unknown | null;\n};\n\n/**\n * This is a simple array with any of properties\n */\nexport type AnyOfArrays = {\n    results?: Array<{\n        foo?: string;\n    } | {\n        bar?: string;\n    }>;\n};\n\n/**\n * This is a string dictionary\n */\nexport type DictionaryWithString = {\n    [key: string]: string;\n};\n\nexport type DictionaryWithPropertiesAndAdditionalProperties = {\n    foo?: number;\n    bar?: boolean;\n    [key: string]: string | number | boolean | undefined;\n};\n\n/**\n * This is a string reference\n */\nexport type DictionaryWithReference = {\n    [key: string]: ModelWithString;\n};\n\n/**\n * This is a complex dictionary\n */\nexport type DictionaryWithArray = {\n    [key: string]: Array<ModelWithString>;\n};\n\n/**\n * This is a string dictionary\n */\nexport type DictionaryWithDictionary = {\n    [key: string]: {\n        [key: string]: string;\n    };\n};\n\n/**\n * This is a complex dictionary\n */\nexport type DictionaryWithProperties = {\n    [key: string]: {\n        foo?: string;\n        bar?: string;\n    };\n};\n\n/**\n * This is a model with one number property\n */\nexport type ModelWithInteger = {\n    /**\n     * This is a simple number property\n     */\n    prop?: number;\n};\n\n/**\n * This is a model with one boolean property\n */\nexport type ModelWithBoolean = {\n    /**\n     * This is a simple boolean property\n     */\n    prop?: boolean;\n};\n\n/**\n * This is a model with one string property\n */\nexport type ModelWithString = {\n    /**\n     * This is a simple string property\n     */\n    prop?: string;\n};\n\n/**\n * This is a model with one string property\n */\nexport type ModelWithStringError = {\n    /**\n     * This is a simple string property\n     */\n    prop?: string;\n};\n\n/**\n * `Comment` or `VoiceComment`. The JSON object for adding voice comments to tickets is different. See [Adding voice comments to tickets](/documentation/ticketing/managing-tickets/adding-voice-comments-to-tickets)\n */\nexport type ModelFromZendesk = string;\n\n/**\n * This is a model with one string property\n */\nexport type ModelWithNullableString = {\n    /**\n     * This is a simple string property\n     */\n    nullableProp1?: string | null;\n    /**\n     * This is a simple string property\n     */\n    nullableRequiredProp1: string | null;\n    /**\n     * This is a simple string property\n     */\n    nullableProp2?: string | null;\n    /**\n     * This is a simple string property\n     */\n    nullableRequiredProp2: string | null;\n    /**\n     * This is a simple enum with strings\n     */\n    'foo_bar-enum'?: 'Success' | 'Warning' | 'Error' | 'ØÆÅ字符串';\n};\n\n/**\n * This is a model with one enum\n */\nexport type ModelWithEnum = {\n    /**\n     * This is a simple enum with strings\n     */\n    'foo_bar-enum'?: 'Success' | 'Warning' | 'Error' | 'ØÆÅ字符串';\n    /**\n     * These are the HTTP error code enums\n     */\n    statusCode?: '100' | '200 FOO' | '300 FOO_BAR' | '400 foo-bar' | '500 foo.bar' | '600 foo&bar';\n    /**\n     * Simple boolean enum\n     */\n    bool?: true;\n};\n\n/**\n * This is a model with one enum with escaped name\n */\nexport type ModelWithEnumWithHyphen = {\n    /**\n     * Foo-Bar-Baz-Qux\n     */\n    'foo-bar-baz-qux'?: '3.0';\n};\n\n/**\n * This is a model with one enum\n */\nexport type ModelWithEnumFromDescription = {\n    /**\n     * Success=1,Warning=2,Error=3\n     */\n    test?: number;\n};\n\n/**\n * This is a model with nested enums\n */\nexport type ModelWithNestedEnums = {\n    dictionaryWithEnum?: {\n        [key: string]: 'Success' | 'Warning' | 'Error';\n    };\n    dictionaryWithEnumFromDescription?: {\n        [key: string]: number;\n    };\n    arrayWithEnum?: Array<'Success' | 'Warning' | 'Error'>;\n    arrayWithDescription?: Array<number>;\n    /**\n     * This is a simple enum with strings\n     */\n    'foo_bar-enum'?: 'Success' | 'Warning' | 'Error' | 'ØÆÅ字符串';\n};\n\n/**\n * This is a model with one property containing a reference\n */\nexport type ModelWithReference = {\n    prop?: ModelWithProperties;\n};\n\n/**\n * This is a model with one property containing an array\n */\nexport type ModelWithArrayReadOnlyAndWriteOnly = {\n    prop?: Array<ModelWithReadOnlyAndWriteOnly>;\n    propWithFile?: Array<Blob | File>;\n    propWithNumber?: Array<number>;\n};\n\n/**\n * This is a model with one property containing an array\n */\nexport type ModelWithArray = {\n    prop?: Array<ModelWithString>;\n    propWithFile?: Array<Blob | File>;\n    propWithNumber?: Array<number>;\n};\n\n/**\n * This is a model with one property containing a dictionary\n */\nexport type ModelWithDictionary = {\n    prop?: {\n        [key: string]: string;\n    };\n};\n\n/**\n * This is a deprecated model with a deprecated property\n *\n * @deprecated\n */\nexport type DeprecatedModel = {\n    /**\n     * This is a deprecated property\n     *\n     * @deprecated\n     */\n    prop?: string;\n};\n\n/**\n * This is a model with one property containing a circular reference\n */\nexport type ModelWithCircularReference = {\n    prop?: ModelWithCircularReference;\n};\n\n/**\n * This is a model with one property with a 'one of' relationship\n */\nexport type CompositionWithOneOf = {\n    propA?: ModelWithString | ModelWithEnum | ModelWithArray | ModelWithDictionary;\n};\n\n/**\n * This is a model with one property with a 'one of' relationship where the options are not $ref\n */\nexport type CompositionWithOneOfAnonymous = {\n    propA?: {\n        propA?: string;\n    } | string | number;\n};\n\n/**\n * Circle\n */\nexport type ModelCircle = {\n    kind: string;\n    radius?: number;\n};\n\n/**\n * Square\n */\nexport type ModelSquare = {\n    kind: string;\n    sideLength?: number;\n};\n\n/**\n * This is a model with one property with a 'one of' relationship where the options are not $ref\n */\nexport type CompositionWithOneOfDiscriminator = ({\n    kind: 'circle';\n} & ModelCircle) | ({\n    kind: 'square';\n} & ModelSquare);\n\n/**\n * This is a model with one property with a 'any of' relationship\n */\nexport type CompositionWithAnyOf = {\n    propA?: ModelWithString | ModelWithEnum | ModelWithArray | ModelWithDictionary;\n};\n\n/**\n * This is a model with one property with a 'any of' relationship where the options are not $ref\n */\nexport type CompositionWithAnyOfAnonymous = {\n    propA?: {\n        propA?: string;\n    } | string | number;\n};\n\n/**\n * This is a model with nested 'any of' property with a type null\n */\nexport type CompositionWithNestedAnyAndTypeNull = {\n    propA?: Array<ModelWithDictionary | null> | Array<ModelWithArray | null>;\n};\n\nexport type _3eNum1Период = 'Bird' | 'Dog';\n\nexport type ConstValue = 'ConstValue';\n\n/**\n * This is a model with one property with a 'any of' relationship where the options are not $ref\n */\nexport type CompositionWithNestedAnyOfAndNull = {\n    /**\n     * Scopes\n     */\n    propA?: Array<_3eNum1Период | ConstValue> | null;\n};\n\n/**\n * This is a model with one property with a 'one of' relationship\n */\nexport type CompositionWithOneOfAndNullable = {\n    propA?: {\n        boolean?: boolean;\n    } | ModelWithEnum | ModelWithArray | ModelWithDictionary | null;\n};\n\n/**\n * This is a model that contains a simple dictionary within composition\n */\nexport type CompositionWithOneOfAndSimpleDictionary = {\n    propA?: boolean | {\n        [key: string]: number;\n    };\n};\n\n/**\n * This is a model that contains a dictionary of simple arrays within composition\n */\nexport type CompositionWithOneOfAndSimpleArrayDictionary = {\n    propA?: boolean | {\n        [key: string]: Array<boolean>;\n    };\n};\n\n/**\n * This is a model that contains a dictionary of complex arrays (composited) within composition\n */\nexport type CompositionWithOneOfAndComplexArrayDictionary = {\n    propA?: boolean | {\n        [key: string]: Array<number | string>;\n    };\n};\n\n/**\n * This is a model with one property with a 'all of' relationship\n */\nexport type CompositionWithAllOfAndNullable = {\n    propA?: ({\n        boolean?: boolean;\n    } & ModelWithEnum & ModelWithArray & ModelWithDictionary) | null;\n};\n\n/**\n * This is a model with one property with a 'any of' relationship\n */\nexport type CompositionWithAnyOfAndNullable = {\n    propA?: {\n        boolean?: boolean;\n    } | ModelWithEnum | ModelWithArray | ModelWithDictionary | null;\n};\n\n/**\n * This is a base model with two simple optional properties\n */\nexport type CompositionBaseModel = {\n    firstName?: string;\n    lastname?: string;\n};\n\n/**\n * This is a model that extends the base model\n */\nexport type CompositionExtendedModel = CompositionBaseModel & {\n    age: number;\n    firstName: string;\n    lastname: string;\n};\n\n/**\n * This is a model with one nested property\n */\nexport type ModelWithProperties = {\n    required: string;\n    readonly requiredAndReadOnly: string;\n    requiredAndNullable: string | null;\n    string?: string;\n    number?: number;\n    boolean?: boolean;\n    reference?: ModelWithString;\n    'property with space'?: string;\n    default?: string;\n    try?: string;\n    readonly '@namespace.string'?: string;\n    readonly '@namespace.integer'?: number;\n};\n\n/**\n * This is a model with one nested property\n */\nexport type ModelWithNestedProperties = {\n    readonly first: {\n        readonly second: {\n            readonly third: string | null;\n        } | null;\n    } | null;\n};\n\n/**\n * This is a model with duplicated properties\n */\nexport type ModelWithDuplicateProperties = {\n    prop?: ModelWithString;\n};\n\n/**\n * This is a model with ordered properties\n */\nexport type ModelWithOrderedProperties = {\n    zebra?: string;\n    apple?: string;\n    hawaii?: string;\n};\n\n/**\n * This is a model with duplicated imports\n */\nexport type ModelWithDuplicateImports = {\n    propA?: ModelWithString;\n    propB?: ModelWithString;\n    propC?: ModelWithString;\n};\n\n/**\n * This is a model that extends another model\n */\nexport type ModelThatExtends = ModelWithString & {\n    propExtendsA?: string;\n    propExtendsB?: ModelWithString;\n};\n\n/**\n * This is a model that extends another model\n */\nexport type ModelThatExtendsExtends = ModelWithString & ModelThatExtends & {\n    propExtendsC?: string;\n    propExtendsD?: ModelWithString;\n};\n\n/**\n * This is a model that contains a some patterns\n */\nexport type ModelWithPattern = {\n    key: string;\n    name: string;\n    readonly enabled?: boolean;\n    readonly modified?: string;\n    id?: string;\n    text?: string;\n    patternWithSingleQuotes?: string;\n    patternWithNewline?: string;\n    patternWithBacktick?: string;\n    patternWithUnicode?: string;\n};\n\nexport type File = {\n    /**\n     * Id\n     */\n    readonly id?: string;\n    /**\n     * Updated at\n     */\n    readonly updated_at?: string;\n    /**\n     * Created at\n     */\n    readonly created_at?: string;\n    /**\n     * Mime\n     */\n    mime: string;\n    /**\n     * File\n     */\n    readonly file?: string;\n};\n\nexport type Default = {\n    name?: string;\n};\n\nexport type Pageable = {\n    page?: number;\n    size?: number;\n    sort?: Array<string>;\n};\n\n/**\n * This is a free-form object without additionalProperties.\n */\nexport type FreeFormObjectWithoutAdditionalProperties = {\n    [key: string]: unknown;\n};\n\n/**\n * This is a free-form object with additionalProperties: true.\n */\nexport type FreeFormObjectWithAdditionalPropertiesEqTrue = {\n    [key: string]: unknown;\n};\n\n/**\n * This is a free-form object with additionalProperties: {}.\n */\nexport type FreeFormObjectWithAdditionalPropertiesEqEmptyObject = {\n    [key: string]: unknown;\n};\n\nexport type ModelWithConst = {\n    String?: 'String';\n    number?: 0;\n    null?: null;\n    withType?: 'Some string';\n};\n\n/**\n * This is a model with one property and additionalProperties: true\n */\nexport type ModelWithAdditionalPropertiesEqTrue = {\n    /**\n     * This is a simple string property\n     */\n    prop?: string;\n    [key: string]: unknown;\n};\n\nexport type NestedAnyOfArraysNullable = {\n    nullableArray?: Array<string | boolean> | null;\n};\n\nexport type CompositionWithOneOfAndProperties = ({\n    foo: SimpleParameter;\n} | {\n    bar: NonAsciiStringæøåÆøÅöôêÊ字符串;\n}) & {\n    baz: number | null;\n    qux: number;\n};\n\n/**\n * An object that can be null\n */\nexport type NullableObject = {\n    foo?: string;\n} | null;\n\n/**\n * Some % character\n */\nexport type CharactersInDescription = string;\n\nexport type ModelWithNullableObject = {\n    data?: NullableObject;\n};\n\n/**\n * An object with additional properties that can be null (anyOf ref + null)\n */\nexport type ModelWithAdditionalPropertiesRef = {\n    [key: string]: NullableObject | null;\n};\n\nexport type ModelWithOneOfEnum = {\n    foo: 'Bar';\n} | {\n    foo: 'Baz';\n} | {\n    foo: 'Qux';\n} | {\n    content: string;\n    foo: 'Quux';\n} | {\n    content: [\n        string,\n        string\n    ];\n    foo: 'Corge';\n};\n\nexport type ModelWithNestedArrayEnumsDataFoo = 'foo' | 'bar';\n\nexport type ModelWithNestedArrayEnumsDataBar = 'baz' | 'qux';\n\nexport type ModelWithNestedArrayEnumsData = {\n    foo?: Array<ModelWithNestedArrayEnumsDataFoo>;\n    bar?: Array<ModelWithNestedArrayEnumsDataBar>;\n};\n\nexport type ModelWithNestedArrayEnums = {\n    array_strings?: Array<string>;\n    data?: ModelWithNestedArrayEnumsData;\n};\n\nexport type ModelWithNestedCompositionEnums = {\n    foo?: ModelWithNestedArrayEnumsDataFoo;\n};\n\nexport type ModelWithReadOnlyAndWriteOnly = {\n    foo: string;\n    readonly bar: string;\n};\n\nexport type ModelWithConstantSizeArray = [\n    number,\n    number\n];\n\nexport type ModelWithAnyOfConstantSizeArray = [\n    number | string,\n    number | string,\n    number | string\n];\n\nexport type ModelWithPrefixItemsConstantSizeArray = [\n    ModelWithInteger,\n    number | string,\n    string\n];\n\nexport type ModelWithAnyOfConstantSizeArrayNullable = [\n    number | null | string,\n    number | null | string,\n    number | null | string\n];\n\nexport type ModelWithAnyOfConstantSizeArrayWithNSizeAndOptions = [\n    number | Import,\n    number | Import\n];\n\nexport type ModelWithAnyOfConstantSizeArrayAndIntersect = [\n    number & string,\n    number & string\n];\n\nexport type ModelWithNumericEnumUnion = {\n    /**\n     * Период\n     */\n    value?: -10 | -1 | 0 | 1 | 3 | 6 | 12;\n};\n\n/**\n * Some description with `back ticks`\n */\nexport type ModelWithBackticksInDescription = {\n    /**\n     * The template `that` should be used for parsing and importing the contents of the CSV file.\n     *\n     * <br/><p>There is one placeholder currently supported:<ul>     <li><b>${x}</b> - refers to the n-th column in the CSV file, e.g. ${1}, ${2}, ...)</li></ul><p>Example of a correct JSON template:</p>\n     * <pre>\n     * [\n     * {\n     * \"resourceType\": \"Asset\",\n     * \"identifier\": {\n     * \"name\": \"${1}\",\n     * \"domain\": {\n     * \"name\": \"${2}\",\n     * \"community\": {\n     * \"name\": \"Some Community\"\n     * }\n     * }\n     * },\n     * \"attributes\" : {\n     * \"00000000-0000-0000-0000-000000003115\" : [ {\n     * \"value\" : \"${3}\"\n     * } ],\n     * \"00000000-0000-0000-0000-000000000222\" : [ {\n     * \"value\" : \"${4}\"\n     * } ]\n     * }\n     * }\n     * ]\n     * </pre>\n     */\n    template?: string;\n};\n\nexport type ModelWithOneOfAndProperties = (SimpleParameter | NonAsciiStringæøåÆøÅöôêÊ字符串) & {\n    baz: number | null;\n    qux: number;\n};\n\n/**\n * Model used to test deduplication strategy (unused)\n */\nexport type ParameterSimpleParameterUnused = string;\n\n/**\n * Model used to test deduplication strategy\n */\nexport type PostServiceWithEmptyTagResponse = string;\n\n/**\n * Model used to test deduplication strategy\n */\nexport type PostServiceWithEmptyTagResponse2 = string;\n\n/**\n * Model used to test deduplication strategy\n */\nexport type DeleteFooData = string;\n\n/**\n * Model used to test deduplication strategy\n */\nexport type DeleteFooData2 = string;\n\n/**\n * Model with restricted keyword name\n */\nexport type Import = string;\n\nexport type SchemaWithFormRestrictedKeys = {\n    description?: string;\n    'x-enum-descriptions'?: string;\n    'x-enum-varnames'?: string;\n    'x-enumNames'?: string;\n    title?: string;\n    object?: {\n        description?: string;\n        'x-enum-descriptions'?: string;\n        'x-enum-varnames'?: string;\n        'x-enumNames'?: string;\n        title?: string;\n    };\n    array?: Array<{\n        description?: string;\n        'x-enum-descriptions'?: string;\n        'x-enum-varnames'?: string;\n        'x-enumNames'?: string;\n        title?: string;\n    }>;\n};\n\n/**\n * This schema was giving PascalCase transformations a hard time\n */\nexport type IoK8sApimachineryPkgApisMetaV1DeleteOptions = {\n    /**\n     * Must be fulfilled before a deletion is carried out. If not possible, a 409 Conflict status will be returned.\n     */\n    preconditions?: IoK8sApimachineryPkgApisMetaV1Preconditions;\n};\n\n/**\n * This schema was giving PascalCase transformations a hard time\n */\nexport type IoK8sApimachineryPkgApisMetaV1Preconditions = {\n    /**\n     * Specifies the target ResourceVersion\n     */\n    resourceVersion?: string;\n    /**\n     * Specifies the target UID.\n     */\n    uid?: string;\n};\n\nexport type AdditionalPropertiesUnknownIssue = {\n    [key: string]: string | number;\n};\n\nexport type AdditionalPropertiesUnknownIssue2 = {\n    [key: string]: string | number;\n};\n\nexport type AdditionalPropertiesUnknownIssue3 = string & {\n    entries: {\n        [key: string]: AdditionalPropertiesUnknownIssue;\n    };\n};\n\nexport type AdditionalPropertiesIntegerIssue = {\n    value: number;\n    [key: string]: number;\n};\n\nexport type OneOfAllOfIssue = ((ConstValue | GenericSchemaDuplicateIssue1SystemBoolean) & _3eNum1Период) | GenericSchemaDuplicateIssue1SystemString;\n\nexport type GenericSchemaDuplicateIssue1SystemBoolean = {\n    item?: boolean;\n    error?: string | null;\n    readonly hasError?: boolean;\n    data?: {\n        [key: string]: never;\n    };\n};\n\nexport type GenericSchemaDuplicateIssue1SystemString = {\n    item?: string | null;\n    error?: string | null;\n    readonly hasError?: boolean;\n};\n\nexport type ExternalSharedModel = {\n    id: string;\n    name?: string;\n};\n\n/**\n * This is a model with one property containing a reference\n */\nexport type ModelWithReferenceWritable = {\n    prop?: ModelWithPropertiesWritable;\n};\n\n/**\n * This is a model with one property containing an array\n */\nexport type ModelWithArrayReadOnlyAndWriteOnlyWritable = {\n    prop?: Array<ModelWithReadOnlyAndWriteOnlyWritable>;\n    propWithFile?: Array<Blob | File>;\n    propWithNumber?: Array<number>;\n};\n\n/**\n * This is a model with one nested property\n */\nexport type ModelWithPropertiesWritable = {\n    required: string;\n    requiredAndNullable: string | null;\n    string?: string;\n    number?: number;\n    boolean?: boolean;\n    reference?: ModelWithString;\n    'property with space'?: string;\n    default?: string;\n    try?: string;\n};\n\n/**\n * This is a model that contains a some patterns\n */\nexport type ModelWithPatternWritable = {\n    key: string;\n    name: string;\n    id?: string;\n    text?: string;\n    patternWithSingleQuotes?: string;\n    patternWithNewline?: string;\n    patternWithBacktick?: string;\n    patternWithUnicode?: string;\n};\n\nexport type FileWritable = {\n    /**\n     * Mime\n     */\n    mime: string;\n};\n\nexport type ModelWithReadOnlyAndWriteOnlyWritable = {\n    foo: string;\n    baz: string;\n};\n\nexport type ModelWithAnyOfConstantSizeArrayWithNSizeAndOptionsWritable = [\n    number | Import,\n    number | Import\n];\n\nexport type AdditionalPropertiesUnknownIssueWritable = {\n    [key: string]: string | number;\n};\n\nexport type OneOfAllOfIssueWritable = ((ConstValue | GenericSchemaDuplicateIssue1SystemBoolean) & _3eNum1Период) | GenericSchemaDuplicateIssue1SystemString;\n\nexport type GenericSchemaDuplicateIssue1SystemBooleanWritable = {\n    item?: boolean;\n    error?: string | null;\n    data?: {\n        [key: string]: never;\n    };\n};\n\nexport type GenericSchemaDuplicateIssue1SystemStringWritable = {\n    item?: string | null;\n    error?: string | null;\n};\n\n/**\n * This is a reusable parameter\n */\nexport type SimpleParameter = string;\n\n/**\n * Parameter with illegal characters\n */\nexport type XFooBar = ModelWithString;\n\n/**\n * A reusable request body\n */\nexport type SimpleRequestBody = ModelWithString;\n\n/**\n * A reusable request body\n */\nexport type SimpleFormData = ModelWithString;\n\nexport type ExportData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no+tag';\n};\n\nexport type PatchApiVbyApiVersionNoTagData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no+tag';\n};\n\nexport type PatchApiVbyApiVersionNoTagResponses = {\n    /**\n     * OK\n     */\n    default: unknown;\n};\n\nexport type ImportData = {\n    body: ModelWithReadOnlyAndWriteOnlyWritable | ModelWithArrayReadOnlyAndWriteOnlyWritable;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no+tag';\n};\n\nexport type ImportResponses = {\n    /**\n     * Success\n     */\n    200: ModelFromZendesk;\n    /**\n     * Default success response\n     */\n    default: ModelWithReadOnlyAndWriteOnly;\n};\n\nexport type ImportResponse = ImportResponses[keyof ImportResponses];\n\nexport type FooWowData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no+tag';\n};\n\nexport type FooWowResponses = {\n    /**\n     * OK\n     */\n    default: unknown;\n};\n\nexport type ApiVVersionODataControllerCountData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple/$count';\n};\n\nexport type ApiVVersionODataControllerCountResponses = {\n    /**\n     * Success\n     */\n    200: ModelFromZendesk;\n};\n\nexport type ApiVVersionODataControllerCountResponse = ApiVVersionODataControllerCountResponses[keyof ApiVVersionODataControllerCountResponses];\n\nexport type GetApiVbyApiVersionSimpleOperationData = {\n    body?: never;\n    path: {\n        /**\n         * foo in method\n         */\n        foo_param: string;\n    };\n    query?: never;\n    url: '/api/v{api-version}/simple:operation';\n};\n\nexport type GetApiVbyApiVersionSimpleOperationErrors = {\n    /**\n     * Default error response\n     */\n    default: ModelWithBoolean;\n};\n\nexport type GetApiVbyApiVersionSimpleOperationError = GetApiVbyApiVersionSimpleOperationErrors[keyof GetApiVbyApiVersionSimpleOperationErrors];\n\nexport type GetApiVbyApiVersionSimpleOperationResponses = {\n    /**\n     * Response is a simple number\n     */\n    200: number;\n};\n\nexport type GetApiVbyApiVersionSimpleOperationResponse = GetApiVbyApiVersionSimpleOperationResponses[keyof GetApiVbyApiVersionSimpleOperationResponses];\n\nexport type DeleteCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type GetCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type HeadCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type OptionsCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type PatchCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type PostCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type PutCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type DeleteFooData3 = {\n    body?: never;\n    headers: {\n        /**\n         * Parameter with illegal characters\n         */\n        'x-Foo-Bar': ModelWithString;\n    };\n    path: {\n        /**\n         * foo in method\n         */\n        foo_param: string;\n        /**\n         * bar in method\n         */\n        BarParam: string;\n    };\n    query?: never;\n    url: '/api/v{api-version}/foo/{foo_param}/bar/{BarParam}';\n};\n\nexport type CallWithDescriptionsData = {\n    body?: never;\n    path?: never;\n    query?: {\n        /**\n         * Testing multiline comments in string: First line\n         * Second line\n         *\n         * Fourth line\n         */\n        parameterWithBreaks?: string;\n        /**\n         * Testing backticks in string: `backticks` and ```multiple backticks``` should work\n         */\n        parameterWithBackticks?: string;\n        /**\n         * Testing slashes in string: \\backwards\\\\\\ and /forwards/// should work\n         */\n        parameterWithSlashes?: string;\n        /**\n         * Testing expression placeholders in string: ${expression} should work\n         */\n        parameterWithExpressionPlaceholders?: string;\n        /**\n         * Testing quotes in string: 'single quote''' and \"double quotes\"\"\" should work\n         */\n        parameterWithQuotes?: string;\n        /**\n         * Testing reserved characters in string: * inline * and ** inline ** should work\n         */\n        parameterWithReservedCharacters?: string;\n    };\n    url: '/api/v{api-version}/descriptions';\n};\n\nexport type DeprecatedCallData = {\n    body?: never;\n    headers: {\n        /**\n         * This parameter is deprecated\n         *\n         * @deprecated\n         */\n        parameter: DeprecatedModel | null;\n    };\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/parameters/deprecated';\n};\n\nexport type CallWithParametersData = {\n    /**\n     * This is the parameter that goes into the body\n     */\n    body: {\n        [key: string]: unknown;\n    } | null;\n    headers: {\n        /**\n         * This is the parameter that goes into the header\n         */\n        parameterHeader: string | null;\n    };\n    path: {\n        /**\n         * This is the parameter that goes into the path\n         */\n        parameterPath: string | null;\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string | null;\n    };\n    query: {\n        foo_ref_enum?: ModelWithNestedArrayEnumsDataFoo;\n        foo_all_of_enum: ModelWithNestedArrayEnumsDataFoo;\n        /**\n         * This is the parameter that goes into the query params\n         */\n        cursor: string | null;\n    };\n    url: '/api/v{api-version}/parameters/{parameterPath}';\n};\n\nexport type CallWithWeirdParameterNamesData = {\n    /**\n     * This is the parameter that goes into the body\n     */\n    body: ModelWithString | null;\n    headers: {\n        /**\n         * This is the parameter that goes into the request header\n         */\n        'parameter.header': string | null;\n    };\n    path: {\n        /**\n         * This is the parameter that goes into the path\n         */\n        'parameter.path.1'?: string;\n        /**\n         * This is the parameter that goes into the path\n         */\n        'parameter-path-2'?: string;\n        /**\n         * This is the parameter that goes into the path\n         */\n        'PARAMETER-PATH-3'?: string;\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string | null;\n    };\n    query: {\n        /**\n         * This is the parameter with a reserved keyword\n         */\n        default?: string;\n        /**\n         * This is the parameter that goes into the request query params\n         */\n        'parameter-query': string | null;\n    };\n    url: '/api/v{api-version}/parameters/{parameter.path.1}/{parameter-path-2}/{PARAMETER-PATH-3}';\n};\n\nexport type GetCallWithOptionalParamData = {\n    /**\n     * This is a required parameter\n     */\n    body: ModelWithOneOfEnum;\n    path?: never;\n    query?: {\n        /**\n         * This is an optional parameter\n         */\n        page?: number;\n    };\n    url: '/api/v{api-version}/parameters';\n};\n\nexport type PostCallWithOptionalParamData = {\n    /**\n     * This is an optional parameter\n     */\n    body?: {\n        offset?: number | null;\n    };\n    path?: never;\n    query: {\n        /**\n         * This is a required parameter\n         */\n        parameter: Pageable;\n    };\n    url: '/api/v{api-version}/parameters';\n};\n\nexport type PostCallWithOptionalParamResponses = {\n    /**\n     * Response is a simple number\n     */\n    200: number;\n    /**\n     * Success\n     */\n    204: void;\n};\n\nexport type PostCallWithOptionalParamResponse = PostCallWithOptionalParamResponses[keyof PostCallWithOptionalParamResponses];\n\nexport type PostApiVbyApiVersionRequestBodyData = {\n    /**\n     * A reusable request body\n     */\n    body?: SimpleRequestBody;\n    path?: never;\n    query?: {\n        /**\n         * This is a reusable parameter\n         */\n        parameter?: string;\n    };\n    url: '/api/v{api-version}/requestBody';\n};\n\nexport type PostApiVbyApiVersionFormDataData = {\n    /**\n     * A reusable request body\n     */\n    body?: SimpleFormData;\n    path?: never;\n    query?: {\n        /**\n         * This is a reusable parameter\n         */\n        parameter?: string;\n    };\n    url: '/api/v{api-version}/formData';\n};\n\nexport type CallWithDefaultParametersData = {\n    body?: never;\n    path?: never;\n    query?: {\n        /**\n         * This is a simple string with default value\n         */\n        parameterString?: string | null;\n        /**\n         * This is a simple number with default value\n         */\n        parameterNumber?: number | null;\n        /**\n         * This is a simple boolean with default value\n         */\n        parameterBoolean?: boolean | null;\n        /**\n         * This is a simple enum with default value\n         */\n        parameterEnum?: 'Success' | 'Warning' | 'Error';\n        /**\n         * This is a simple model with default value\n         */\n        parameterModel?: ModelWithString | null;\n    };\n    url: '/api/v{api-version}/defaults';\n};\n\nexport type CallWithDefaultOptionalParametersData = {\n    body?: never;\n    path?: never;\n    query?: {\n        /**\n         * This is a simple string that is optional with default value\n         */\n        parameterString?: string;\n        /**\n         * This is a simple number that is optional with default value\n         */\n        parameterNumber?: number;\n        /**\n         * This is a simple boolean that is optional with default value\n         */\n        parameterBoolean?: boolean;\n        /**\n         * This is a simple enum that is optional with default value\n         */\n        parameterEnum?: 'Success' | 'Warning' | 'Error';\n        /**\n         * This is a simple model that is optional with default value\n         */\n        parameterModel?: ModelWithString;\n    };\n    url: '/api/v{api-version}/defaults';\n};\n\nexport type CallToTestOrderOfParamsData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * This is a optional string with default\n         */\n        parameterOptionalStringWithDefault?: string;\n        /**\n         * This is a optional string with empty default\n         */\n        parameterOptionalStringWithEmptyDefault?: string;\n        /**\n         * This is a optional string with no default\n         */\n        parameterOptionalStringWithNoDefault?: string;\n        /**\n         * This is a string with default\n         */\n        parameterStringWithDefault: string;\n        /**\n         * This is a string with empty default\n         */\n        parameterStringWithEmptyDefault: string;\n        /**\n         * This is a string with no default\n         */\n        parameterStringWithNoDefault: string;\n        /**\n         * This is a string that can be null with no default\n         */\n        parameterStringNullableWithNoDefault?: string | null;\n        /**\n         * This is a string that can be null with default\n         */\n        parameterStringNullableWithDefault?: string | null;\n    };\n    url: '/api/v{api-version}/defaults';\n};\n\nexport type DuplicateNameData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/duplicate';\n};\n\nexport type DuplicateName2Data = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/duplicate';\n};\n\nexport type DuplicateName3Data = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/duplicate';\n};\n\nexport type DuplicateName4Data = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/duplicate';\n};\n\nexport type CallWithNoContentResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no-content';\n};\n\nexport type CallWithNoContentResponseResponses = {\n    /**\n     * Success\n     */\n    204: void;\n};\n\nexport type CallWithNoContentResponseResponse = CallWithNoContentResponseResponses[keyof CallWithNoContentResponseResponses];\n\nexport type CallWithResponseAndNoContentResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multiple-tags/response-and-no-content';\n};\n\nexport type CallWithResponseAndNoContentResponseResponses = {\n    /**\n     * Response is a simple number\n     */\n    200: number;\n    /**\n     * Success\n     */\n    204: void;\n};\n\nexport type CallWithResponseAndNoContentResponseResponse = CallWithResponseAndNoContentResponseResponses[keyof CallWithResponseAndNoContentResponseResponses];\n\nexport type DummyAData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multiple-tags/a';\n};\n\nexport type DummyAResponses = {\n    200: _400;\n};\n\nexport type DummyAResponse = DummyAResponses[keyof DummyAResponses];\n\nexport type DummyBData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multiple-tags/b';\n};\n\nexport type DummyBResponses = {\n    /**\n     * Success\n     */\n    204: void;\n};\n\nexport type DummyBResponse = DummyBResponses[keyof DummyBResponses];\n\nexport type CallWithResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/response';\n};\n\nexport type CallWithResponseResponses = {\n    default: Import;\n};\n\nexport type CallWithResponseResponse = CallWithResponseResponses[keyof CallWithResponseResponses];\n\nexport type CallWithDuplicateResponsesData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/response';\n};\n\nexport type CallWithDuplicateResponsesErrors = {\n    /**\n     * Message for 500 error\n     */\n    500: ModelWithStringError;\n    /**\n     * Message for 501 error\n     */\n    501: ModelWithStringError;\n    /**\n     * Message for 502 error\n     */\n    502: ModelWithStringError;\n    /**\n     * Message for 4XX errors\n     */\n    '4XX': DictionaryWithArray;\n    /**\n     * Default error response\n     */\n    default: ModelWithBoolean;\n};\n\nexport type CallWithDuplicateResponsesError = CallWithDuplicateResponsesErrors[keyof CallWithDuplicateResponsesErrors];\n\nexport type CallWithDuplicateResponsesResponses = {\n    /**\n     * Message for 200 response\n     */\n    200: ModelWithBoolean & ModelWithInteger;\n    /**\n     * Message for 201 response\n     */\n    201: ModelWithString;\n    /**\n     * Message for 202 response\n     */\n    202: ModelWithString;\n};\n\nexport type CallWithDuplicateResponsesResponse = CallWithDuplicateResponsesResponses[keyof CallWithDuplicateResponsesResponses];\n\nexport type CallWithResponsesData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/response';\n};\n\nexport type CallWithResponsesErrors = {\n    /**\n     * Message for 500 error\n     */\n    500: ModelWithStringError;\n    /**\n     * Message for 501 error\n     */\n    501: ModelWithStringError;\n    /**\n     * Message for 502 error\n     */\n    502: ModelWithStringError;\n    /**\n     * Message for default response\n     */\n    default: ModelWithStringError;\n};\n\nexport type CallWithResponsesError = CallWithResponsesErrors[keyof CallWithResponsesErrors];\n\nexport type CallWithResponsesResponses = {\n    /**\n     * Message for 200 response\n     */\n    200: {\n        readonly '@namespace.string'?: string;\n        readonly '@namespace.integer'?: number;\n        readonly value?: Array<ModelWithString>;\n    };\n    /**\n     * Message for 201 response\n     */\n    201: ModelThatExtends;\n    /**\n     * Message for 202 response\n     */\n    202: ModelThatExtendsExtends;\n};\n\nexport type CallWithResponsesResponse = CallWithResponsesResponses[keyof CallWithResponsesResponses];\n\nexport type CollectionFormatData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * This is an array parameter that is sent as csv format (comma-separated values)\n         */\n        parameterArrayCSV: Array<string> | null;\n        /**\n         * This is an array parameter that is sent as ssv format (space-separated values)\n         */\n        parameterArraySSV: Array<string> | null;\n        /**\n         * This is an array parameter that is sent as tsv format (tab-separated values)\n         */\n        parameterArrayTSV: Array<string> | null;\n        /**\n         * This is an array parameter that is sent as pipes format (pipe-separated values)\n         */\n        parameterArrayPipes: Array<string> | null;\n        /**\n         * This is an array parameter that is sent as multi format (multiple parameter instances)\n         */\n        parameterArrayMulti: Array<string> | null;\n    };\n    url: '/api/v{api-version}/collectionFormat';\n};\n\nexport type TypesData = {\n    body?: never;\n    path?: {\n        /**\n         * This is a number parameter\n         */\n        id?: number;\n    };\n    query: {\n        /**\n         * This is a number parameter\n         */\n        parameterNumber: number;\n        /**\n         * This is a string parameter\n         */\n        parameterString: string | null;\n        /**\n         * This is a boolean parameter\n         */\n        parameterBoolean: boolean | null;\n        /**\n         * This is an object parameter\n         */\n        parameterObject: {\n            [key: string]: unknown;\n        } | null;\n        /**\n         * This is an array parameter\n         */\n        parameterArray: Array<string> | null;\n        /**\n         * This is a dictionary parameter\n         */\n        parameterDictionary: {\n            [key: string]: unknown;\n        } | null;\n        /**\n         * This is an enum parameter\n         */\n        parameterEnum: 'Success' | 'Warning' | 'Error' | null;\n    };\n    url: '/api/v{api-version}/types';\n};\n\nexport type TypesResponses = {\n    /**\n     * Response is a simple number\n     */\n    200: number;\n    /**\n     * Response is a simple string\n     */\n    201: string;\n    /**\n     * Response is a simple boolean\n     */\n    202: boolean;\n    /**\n     * Response is a simple object\n     */\n    203: {\n        [key: string]: unknown;\n    };\n};\n\nexport type TypesResponse = TypesResponses[keyof TypesResponses];\n\nexport type UploadFileData = {\n    body: Blob | File;\n    path: {\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string | null;\n    };\n    query?: never;\n    url: '/api/v{api-version}/upload';\n};\n\nexport type UploadFileResponses = {\n    200: boolean;\n};\n\nexport type UploadFileResponse = UploadFileResponses[keyof UploadFileResponses];\n\nexport type FileResponseData = {\n    body?: never;\n    path: {\n        id: string;\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string;\n    };\n    query?: never;\n    url: '/api/v{api-version}/file/{id}';\n};\n\nexport type FileResponseResponses = {\n    /**\n     * Success\n     */\n    200: Blob | File;\n};\n\nexport type FileResponseResponse = FileResponseResponses[keyof FileResponseResponses];\n\nexport type ComplexTypesData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * Parameter containing object\n         */\n        parameterObject: {\n            first?: {\n                second?: {\n                    third?: string;\n                };\n            };\n        };\n        /**\n         * Parameter containing reference\n         */\n        parameterReference: ModelWithString;\n    };\n    url: '/api/v{api-version}/complex';\n};\n\nexport type ComplexTypesErrors = {\n    /**\n     * 400 `server` error\n     */\n    400: unknown;\n    /**\n     * 500 server error\n     */\n    500: unknown;\n};\n\nexport type ComplexTypesResponses = {\n    /**\n     * Successful response\n     */\n    200: Array<ModelWithString>;\n};\n\nexport type ComplexTypesResponse = ComplexTypesResponses[keyof ComplexTypesResponses];\n\nexport type MultipartResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multipart';\n};\n\nexport type MultipartResponseResponses = {\n    /**\n     * OK\n     */\n    200: {\n        file?: Blob | File;\n        metadata?: {\n            foo?: string;\n            bar?: string;\n        };\n    };\n};\n\nexport type MultipartResponseResponse = MultipartResponseResponses[keyof MultipartResponseResponses];\n\nexport type MultipartRequestData = {\n    body?: {\n        content?: Blob | File;\n        data?: ModelWithString | null;\n    };\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multipart';\n};\n\nexport type ComplexParamsData = {\n    body?: {\n        readonly key: string | null;\n        name: string | null;\n        enabled?: boolean;\n        type: 'Monkey' | 'Horse' | 'Bird';\n        listOfModels?: Array<ModelWithString> | null;\n        listOfStrings?: Array<string> | null;\n        parameters: ModelWithString | ModelWithEnum | ModelWithArray | ModelWithDictionary;\n        readonly user?: {\n            readonly id?: number;\n            readonly name?: string | null;\n        };\n    };\n    path: {\n        id: number;\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string;\n    };\n    query?: never;\n    url: '/api/v{api-version}/complex/{id}';\n};\n\nexport type ComplexParamsResponses = {\n    /**\n     * Success\n     */\n    200: ModelWithString;\n};\n\nexport type ComplexParamsResponse = ComplexParamsResponses[keyof ComplexParamsResponses];\n\nexport type CallWithResultFromHeaderData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/header';\n};\n\nexport type CallWithResultFromHeaderErrors = {\n    /**\n     * 400 server error\n     */\n    400: unknown;\n    /**\n     * 500 server error\n     */\n    500: unknown;\n};\n\nexport type CallWithResultFromHeaderResponses = {\n    /**\n     * Successful response\n     */\n    200: unknown;\n};\n\nexport type TestErrorCodeData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * Status code to return\n         */\n        status: number;\n    };\n    url: '/api/v{api-version}/error';\n};\n\nexport type TestErrorCodeErrors = {\n    /**\n     * Custom message: Internal Server Error\n     */\n    500: unknown;\n    /**\n     * Custom message: Not Implemented\n     */\n    501: unknown;\n    /**\n     * Custom message: Bad Gateway\n     */\n    502: unknown;\n    /**\n     * Custom message: Service Unavailable\n     */\n    503: unknown;\n};\n\nexport type TestErrorCodeResponses = {\n    /**\n     * Custom message: Successful response\n     */\n    200: unknown;\n};\n\nexport type NonAsciiæøåÆøÅöôêÊ字符串Data = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * Dummy input param\n         */\n        nonAsciiParamæøåÆØÅöôêÊ: number;\n    };\n    url: '/api/v{api-version}/non-ascii-æøåÆØÅöôêÊ字符串';\n};\n\nexport type NonAsciiæøåÆøÅöôêÊ字符串Responses = {\n    /**\n     * Successful response\n     */\n    200: Array<NonAsciiStringæøåÆøÅöôêÊ字符串>;\n};\n\nexport type NonAsciiæøåÆøÅöôêÊ字符串Response = NonAsciiæøåÆøÅöôêÊ字符串Responses[keyof NonAsciiæøåÆøÅöôêÊ字符串Responses];\n\nexport type PutWithFormUrlEncodedData = {\n    body: ArrayWithStrings;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/non-ascii-æøåÆØÅöôêÊ字符串';\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-nuxt/sdk-client-optional/client/client.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport { useAsyncData, useFetch, useLazyAsyncData, useLazyFetch } from 'nuxt/app';\nimport { reactive, ref, toValue, watch } from 'vue';\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 } from './types.gen';\nimport {\n  buildUrl,\n  createConfig,\n  executeFetchFn,\n  mergeConfigs,\n  mergeHeaders,\n  mergeInterceptors,\n  serializeBody,\n  setAuthParams,\n  unwrapRefs,\n} from './utils.gen';\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 beforeRequest = async (options: RequestOptions) => {\n    const opts = {\n      ..._config,\n      ...options,\n      $fetch: options.$fetch ?? _config.$fetch ?? $fetch,\n      headers: mergeHeaders(_config.headers, options.headers),\n      onRequest: mergeInterceptors(_config.onRequest, options.onRequest),\n      onResponse: mergeInterceptors(_config.onResponse, options.onResponse),\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    const url = buildUrl(opts);\n\n    return { opts, url };\n  };\n\n  const request: Client['request'] = ({ asyncDataOptions, composable = '$fetch', ...options }) => {\n    const key = options.key;\n    const opts = {\n      ..._config,\n      ...options,\n      $fetch: options.$fetch ?? _config.$fetch ?? $fetch,\n      headers: mergeHeaders(_config.headers, options.headers),\n      onRequest: mergeInterceptors(_config.onRequest, options.onRequest),\n      onResponse: mergeInterceptors(_config.onResponse, options.onResponse),\n    };\n\n    const { requestValidator, responseTransformer, responseValidator, security } = opts;\n    if (requestValidator || security) {\n      // auth must happen in interceptors otherwise we'd need to require\n      // asyncContext enabled\n      // https://nuxt.com/docs/guide/going-further/experimental-features#asynccontext\n      opts.onRequest = [\n        async ({ options }) => {\n          if (security) {\n            await setAuthParams({\n              auth: opts.auth,\n              headers: options.headers,\n              query: options.query,\n              security,\n            });\n          }\n\n          if (requestValidator) {\n            await requestValidator({\n              ...options,\n              // @ts-expect-error\n              body: options.rawBody,\n            });\n          }\n        },\n        ...opts.onRequest,\n      ];\n    }\n\n    if (responseTransformer || responseValidator) {\n      opts.onResponse = [\n        ...opts.onResponse,\n        async ({ options, response }) => {\n          if (options.responseType && options.responseType !== 'json') {\n            return;\n          }\n\n          if (!response.ok) {\n            return;\n          }\n\n          if (responseValidator) {\n            await responseValidator(response._data);\n          }\n\n          if (responseTransformer) {\n            response._data = await responseTransformer(response._data);\n          }\n        },\n      ];\n    }\n\n    // remove Content-Type header if body is empty to avoid sending invalid requests\n    if (opts.body === undefined || opts.body === '') {\n      opts.headers.delete('Content-Type');\n    }\n\n    const fetchFn = opts.$fetch;\n\n    if (composable === '$fetch') {\n      return executeFetchFn(\n        // @ts-expect-error\n        opts,\n        fetchFn,\n      );\n    }\n\n    if (composable === 'useFetch' || composable === 'useLazyFetch') {\n      opts.rawBody = opts.body;\n      const bodyParams = reactive({\n        body: opts.body,\n        bodySerializer: opts.bodySerializer,\n      });\n      const body = ref(serializeBody({ ...opts, body: toValue(opts.body) }));\n      opts.body = body;\n      watch(bodyParams, (changed) => {\n        body.value = serializeBody(changed);\n      });\n      return composable === 'useLazyFetch'\n        ? useLazyFetch(() => buildUrl(opts), { ...opts, ...asyncDataOptions })\n        : useFetch(() => buildUrl(opts), { ...opts, ...asyncDataOptions });\n    }\n\n    const handler: any = () =>\n      executeFetchFn(\n        // @ts-expect-error\n        opts,\n        fetchFn,\n      );\n\n    if (composable === 'useAsyncData') {\n      return key\n        ? useAsyncData(key, handler, asyncDataOptions)\n        : useAsyncData(handler, asyncDataOptions);\n    }\n\n    if (composable === 'useLazyAsyncData') {\n      return key\n        ? useLazyAsyncData(key, handler, asyncDataOptions)\n        : useLazyAsyncData(handler, asyncDataOptions);\n    }\n\n    return undefined as any;\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      ...unwrapRefs(opts),\n      body: opts.body as BodyInit | null | undefined,\n      method,\n      onRequest: undefined,\n      serializedBody: getValidRequestBody(opts) as BodyInit | null | undefined,\n      signal: unwrapRefs(opts.signal) as AbortSignal,\n      url,\n    });\n  };\n\n  const _buildUrl: Client['buildUrl'] = (options) =>\n    buildUrl({ ..._config, ...options } as typeof 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    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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-nuxt/sdk-client-optional/client/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type { Auth } from '../core/auth.gen';\nexport type { QuerySerializerOptions } from '../core/bodySerializer.gen';\nexport {\n  formDataBodySerializer,\n  jsonBodySerializer,\n  urlSearchParamsBodySerializer,\n} from '../core/bodySerializer.gen';\nexport { buildClientParams } from '../core/params.gen';\nexport { serializeQueryKeyValue } from '../core/queryKeySerializer.gen';\nexport { createClient } from './client.gen';\nexport type {\n  Client,\n  ClientOptions,\n  Composable,\n  Config,\n  CreateClientConfig,\n  Options,\n  RequestOptions,\n  RequestResult,\n  TDataShape,\n} from './types.gen';\nexport { createConfig } from './utils.gen';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-nuxt/sdk-client-optional/client/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type {\n  AsyncDataOptions,\n  useAsyncData,\n  useFetch,\n  UseFetchOptions,\n  useLazyAsyncData,\n  useLazyFetch,\n} from 'nuxt/app';\nimport type { Ref } from 'vue';\n\nimport type { Auth } from '../core/auth.gen';\nimport type { QuerySerializerOptions } from '../core/bodySerializer.gen';\nimport type {\n  ServerSentEventsOptions,\n  ServerSentEventsResult,\n} from '../core/serverSentEvents.gen';\nimport type { Client as CoreClient, Config as CoreConfig } from '../core/types.gen';\n\nexport type ArraySeparatorStyle = ArrayStyle | MatrixStyle;\ntype ArrayStyle = 'form' | 'spaceDelimited' | 'pipeDelimited';\ntype MatrixStyle = 'label' | 'matrix' | 'simple';\nexport type ObjectSeparatorStyle = ObjectStyle | MatrixStyle;\ntype ObjectStyle = 'form' | 'deepObject';\n\nexport type QuerySerializer = (query: Parameters<Client['buildUrl']>[0]['query']) => string;\n\ntype WithRefs<TData> = {\n  [K in keyof TData]: NonNullable<TData[K]> extends object\n    ? WithRefs<NonNullable<TData[K]>> | Ref<NonNullable<TData[K]>> | Extract<TData[K], null>\n    : NonNullable<TData[K]> | Ref<NonNullable<TData[K]>> | Extract<TData[K], null>;\n};\n\n// copied from Nuxt\nexport type KeysOf<T> = Array<T extends T ? (keyof T extends string ? keyof T : never) : never>;\n\nexport interface Config<T extends ClientOptions = ClientOptions>\n  extends\n    Omit<FetchOptions<unknown>, 'baseURL' | 'body' | 'headers' | 'method' | 'query'>,\n    WithRefs<Pick<FetchOptions<unknown>, 'query'>>,\n    Omit<CoreConfig, 'querySerializer'> {\n  /**\n   * Base URL for all requests made by this client.\n   */\n  baseURL?: T['baseURL'];\n  /**\n   * A function for serializing request query parameters. By default, arrays\n   * will be exploded in form style, objects will be exploded in deepObject\n   * style, and reserved characters are percent-encoded.\n   *\n   * {@link https://swagger.io/docs/specification/serialization/#query View examples}\n   */\n  querySerializer?: QuerySerializer | QuerySerializerOptions;\n}\n\nexport interface RequestOptions<\n  TComposable extends Composable = '$fetch',\n  ResT = unknown,\n  DefaultT = undefined,\n  Url extends string = string,\n>\n  extends\n    Config,\n    WithRefs<{\n      path?: FetchOptions<unknown>['query'];\n      query?: FetchOptions<unknown>['query'];\n    }>,\n    Pick<\n      ServerSentEventsOptions<ResT>,\n      | 'onSseError'\n      | 'onSseEvent'\n      | 'sseDefaultRetryDelay'\n      | 'sseMaxRetryAttempts'\n      | 'sseMaxRetryDelay'\n    > {\n  asyncDataOptions?: AsyncDataOptions<ResT, ResT, KeysOf<ResT>, DefaultT>;\n  /**\n   * Any body that you want to add to your request.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/fetch#body}\n   */\n  body?: NonNullable<unknown> | Ref<NonNullable<unknown>> | null;\n  composable?: TComposable;\n  key?: string;\n  rawBody?: NonNullable<unknown> | Ref<NonNullable<unknown>> | null;\n  /**\n   * Security mechanism(s) to use for the request.\n   */\n  security?: ReadonlyArray<Auth>;\n  url: Url;\n}\n\nexport type RequestResult<\n  TComposable extends Composable,\n  ResT,\n  TError,\n> = TComposable extends '$fetch'\n  ? ReturnType<typeof $fetch<ResT>>\n  : TComposable extends 'useAsyncData'\n    ? ReturnType<typeof useAsyncData<ResT | null, TError>>\n    : TComposable extends 'useFetch'\n      ? ReturnType<typeof useFetch<ResT | null, TError>>\n      : TComposable extends 'useLazyAsyncData'\n        ? ReturnType<typeof useLazyAsyncData<ResT | null, TError>>\n        : TComposable extends 'useLazyFetch'\n          ? ReturnType<typeof useLazyFetch<ResT | null, TError>>\n          : never;\n\nexport interface ClientOptions {\n  baseURL?: string;\n}\n\ntype MethodFn = <\n  TComposable extends Composable = '$fetch',\n  ResT = unknown,\n  TError = unknown,\n  DefaultT = undefined,\n>(\n  options: Omit<RequestOptions<TComposable, ResT, DefaultT>, 'method'>,\n) => RequestResult<TComposable, ResT, TError>;\n\ntype SseFn = <\n  TComposable extends Composable = '$fetch',\n  ResT = unknown,\n  TError = unknown,\n  DefaultT = undefined,\n>(\n  options: Omit<RequestOptions<TComposable, ResT, DefaultT>, 'method'>,\n) => Promise<ServerSentEventsResult<RequestResult<TComposable, ResT, TError>>>;\n\ntype RequestFn = <\n  TComposable extends Composable = '$fetch',\n  ResT = unknown,\n  TError = unknown,\n  DefaultT = undefined,\n>(\n  options: Omit<RequestOptions<TComposable, ResT, DefaultT>, 'method'> &\n    Pick<Required<RequestOptions<TComposable, ResT, DefaultT>>, 'method'>,\n) => RequestResult<TComposable, ResT, TError>;\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 = ClientOptions> = (\n  override?: Config<ClientOptions & T>,\n) => Config<Required<ClientOptions> & T>;\n\nexport interface TDataShape {\n  body?: unknown;\n  headers?: unknown;\n  path?: FetchOptions<unknown>['query'];\n  query?: FetchOptions<unknown>['query'];\n  url: string;\n}\n\nexport type BuildUrlOptions<\n  TData extends Omit<TDataShape, 'headers'> = Omit<TDataShape, 'headers'>,\n> = Pick<WithRefs<TData>, 'path' | 'query'> &\n  Pick<TData, 'url'> &\n  Pick<Options<'$fetch', TData>, 'baseURL' | 'querySerializer'>;\n\ntype BuildUrlFn = <TData extends Omit<TDataShape, 'headers'>>(\n  options: BuildUrlOptions<TData>,\n) => string;\n\nexport type Client = CoreClient<RequestFn, Config, MethodFn, BuildUrlFn, SseFn>;\n\ntype OmitKeys<T, K> = Pick<T, Exclude<keyof T, K>>;\n\nexport type Options<\n  TComposable extends Composable = '$fetch',\n  TData extends TDataShape = TDataShape,\n  ResT = unknown,\n  DefaultT = undefined,\n> = OmitKeys<RequestOptions<TComposable, ResT, DefaultT>, 'body' | 'path' | 'query' | 'url'> &\n  ([TData] extends [never] ? unknown : WithRefs<Omit<TData, 'url'>>);\n\ntype FetchOptions<TData> = Omit<UseFetchOptions<TData, TData>, keyof AsyncDataOptions<TData>>;\n\nexport type Composable =\n  | '$fetch'\n  | 'useAsyncData'\n  | 'useFetch'\n  | 'useLazyAsyncData'\n  | 'useLazyFetch';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-nuxt/sdk-client-optional/client/utils.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { ComputedRef, Ref } from 'vue';\nimport { isRef, toValue, unref } from 'vue';\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 type {\n  ArraySeparatorStyle,\n  BuildUrlOptions,\n  Client,\n  ClientOptions,\n  Config,\n  QuerySerializer,\n  RequestOptions,\n} from './types.gen';\n\ntype PathSerializer = Pick<Required<BuildUrlOptions>, 'path' | 'url'>;\n\nconst PATH_PARAM_RE = /\\{[^{}]+\\}/g;\n\ntype MaybeArray<T> = T | T[];\n\nconst 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 = toValue((toValue(path) as Record<string, unknown> | undefined)?.[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 createQuerySerializer = <T = unknown>({\n  parameters = {},\n  ...args\n}: QuerySerializerOptions = {}) => {\n  const querySerializer = (queryParams: T) => {\n    const search: string[] = [];\n    const qParams = toValue(queryParams);\n    if (qParams && typeof qParams === 'object') {\n      for (const name in qParams) {\n        const value = toValue(qParams[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\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    (toValue(options.query) as Record<string, unknown> | undefined)?.[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    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        const queryValue = toValue(options.query) as Record<string, unknown> | undefined;\n        if (queryValue) {\n          queryValue[name] = token;\n        }\n        break;\n      }\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  const url = 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  return url;\n};\n\nexport const getUrl = ({\n  baseUrl,\n  path,\n  query,\n  querySerializer,\n  url: _url,\n}: Pick<BuildUrlOptions, 'path' | 'query' | 'url'> & {\n  baseUrl?: string;\n  querySerializer: QuerySerializer;\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 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 || typeof header !== 'object') {\n      continue;\n    }\n\n    let h: unknown = header;\n    if (isRef(h)) {\n      h = unref(h);\n    }\n\n    const iterator =\n      h instanceof Headers ? headersEntries(h) : Object.entries(h as Record<string, unknown>);\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, unwrapRefs(v) as string);\n        }\n      } else if (value !== undefined) {\n        const v = unwrapRefs(value);\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(key, typeof v === 'object' ? JSON.stringify(v) : (v as string));\n      }\n    }\n  }\n  return mergedHeaders;\n};\n\nexport const mergeInterceptors = <T>(...args: Array<MaybeArray<T>>): Array<T> =>\n  args.reduce<Array<T>>((acc, item) => {\n    if (typeof item === 'function') {\n      acc.push(item);\n    } else if (Array.isArray(item)) {\n      return acc.concat(item);\n    }\n    return acc;\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  querySerializer: defaultQuerySerializer,\n  ...override,\n});\n\ntype UnwrapRefs<T> =\n  T extends Ref<infer V>\n    ? V\n    : T extends ComputedRef<infer V>\n      ? V\n      : T extends Record<string, unknown> // this doesn't handle functions well\n        ? { [K in keyof T]: UnwrapRefs<T[K]> }\n        : T;\n\nexport const unwrapRefs = <T>(value: T): UnwrapRefs<T> => {\n  if (value === null || typeof value !== 'object' || value instanceof Headers) {\n    return (isRef(value) ? unref(value) : value) as UnwrapRefs<T>;\n  }\n\n  if (\n    value instanceof Blob ||\n    value instanceof FormData ||\n    value instanceof ReadableStream ||\n    value instanceof AbortSignal\n  ) {\n    return value as UnwrapRefs<T>;\n  }\n\n  if (Array.isArray(value)) {\n    return value.map((item) => unwrapRefs(item)) as UnwrapRefs<T>;\n  }\n\n  if (isRef(value)) {\n    return unwrapRefs(unref(value) as T);\n  }\n\n  // unwrap into new object to avoid modifying the source\n  const result: Record<string, unknown> = {};\n  for (const key in value) {\n    result[key] = unwrapRefs(value[key] as T);\n  }\n  return result as UnwrapRefs<T>;\n};\n\nexport const serializeBody = (\n  opts: Pick<Parameters<Client['request']>[0], 'body' | 'bodySerializer'>,\n) => {\n  if (opts.body && opts.bodySerializer) {\n    return opts.bodySerializer(opts.body);\n  }\n  return opts.body;\n};\n\nexport const executeFetchFn = (\n  opts: Omit<Parameters<Client['request']>[0], 'composable'>,\n  fetchFn: Required<Config>['$fetch'],\n) => {\n  const unwrappedOpts = unwrapRefs(opts);\n  unwrappedOpts.rawBody = unwrappedOpts.body;\n  unwrappedOpts.body = serializeBody(unwrappedOpts);\n  return fetchFn(\n    buildUrl(opts),\n    // @ts-expect-error\n    unwrappedOpts,\n  );\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-nuxt/sdk-client-optional/client.gen.ts",
    "content": "// 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: 'http://localhost:3000/base' }));\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-nuxt/sdk-client-optional/core/auth.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-nuxt/sdk-client-optional/core/bodySerializer.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-nuxt/sdk-client-optional/core/params.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-nuxt/sdk-client-optional/core/pathSerializer.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-nuxt/sdk-client-optional/core/queryKeySerializer.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\n/**\n * JSON-friendly union that mirrors what Pinia Colada can hash.\n */\nexport type JsonValue =\n  | null\n  | string\n  | number\n  | boolean\n  | JsonValue[]\n  | { [key: string]: JsonValue };\n\n/**\n * Replacer that converts non-JSON values (bigint, Date, etc.) to safe substitutes.\n */\nexport const queryKeyJsonReplacer = (_key: string, value: unknown) => {\n  if (value === undefined || typeof value === 'function' || typeof value === 'symbol') {\n    return undefined;\n  }\n  if (typeof value === 'bigint') {\n    return value.toString();\n  }\n  if (value instanceof Date) {\n    return value.toISOString();\n  }\n  return value;\n};\n\n/**\n * Safely stringifies a value and parses it back into a JsonValue.\n */\nexport const stringifyToJsonValue = (input: unknown): JsonValue | undefined => {\n  try {\n    const json = JSON.stringify(input, queryKeyJsonReplacer);\n    if (json === undefined) {\n      return undefined;\n    }\n    return JSON.parse(json) as JsonValue;\n  } catch {\n    return undefined;\n  }\n};\n\n/**\n * Detects plain objects (including objects with a null prototype).\n */\nconst isPlainObject = (value: unknown): value is Record<string, unknown> => {\n  if (value === null || typeof value !== 'object') {\n    return false;\n  }\n  const prototype = Object.getPrototypeOf(value as object);\n  return prototype === Object.prototype || prototype === null;\n};\n\n/**\n * Turns URLSearchParams into a sorted JSON object for deterministic keys.\n */\nconst serializeSearchParams = (params: URLSearchParams): JsonValue => {\n  const entries = Array.from(params.entries()).sort(([a], [b]) => a.localeCompare(b));\n  const result: Record<string, JsonValue> = {};\n\n  for (const [key, value] of entries) {\n    const existing = result[key];\n    if (existing === undefined) {\n      result[key] = value;\n      continue;\n    }\n\n    if (Array.isArray(existing)) {\n      (existing as string[]).push(value);\n    } else {\n      result[key] = [existing, value];\n    }\n  }\n\n  return result;\n};\n\n/**\n * Normalizes any accepted value into a JSON-friendly shape for query keys.\n */\nexport const serializeQueryKeyValue = (value: unknown): JsonValue | undefined => {\n  if (value === null) {\n    return null;\n  }\n\n  if (typeof value === 'string' || typeof value === 'number' || typeof value === 'boolean') {\n    return value;\n  }\n\n  if (value === undefined || typeof value === 'function' || typeof value === 'symbol') {\n    return undefined;\n  }\n\n  if (typeof value === 'bigint') {\n    return value.toString();\n  }\n\n  if (value instanceof Date) {\n    return value.toISOString();\n  }\n\n  if (Array.isArray(value)) {\n    return stringifyToJsonValue(value);\n  }\n\n  if (typeof URLSearchParams !== 'undefined' && value instanceof URLSearchParams) {\n    return serializeSearchParams(value);\n  }\n\n  if (isPlainObject(value)) {\n    return stringifyToJsonValue(value);\n  }\n\n  return undefined;\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-nuxt/sdk-client-optional/core/serverSentEvents.gen.ts",
    "content": "// 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 const 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            // Normalize line endings: CRLF -> LF, then CR -> LF\n            buffer = buffer.replace(/\\r\\n/g, '\\n').replace(/\\r/g, '\\n');\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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-nuxt/sdk-client-optional/core/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { Auth, AuthToken } from './auth.gen';\nimport type { BodySerializer, QuerySerializer, QuerySerializerOptions } from './bodySerializer.gen';\n\nexport type HttpMethod =\n  | 'connect'\n  | 'delete'\n  | 'get'\n  | 'head'\n  | 'options'\n  | 'patch'\n  | 'post'\n  | 'put'\n  | 'trace';\n\nexport type Client<\n  RequestFn = never,\n  Config = unknown,\n  MethodFn = never,\n  BuildUrlFn = never,\n  SseFn = never,\n> = {\n  /**\n   * Returns the final request URL.\n   */\n  buildUrl: BuildUrlFn;\n  getConfig: () => Config;\n  request: RequestFn;\n  setConfig: (config: Config) => Config;\n} & {\n  [K in HttpMethod]: MethodFn;\n} & ([SseFn] extends [never] ? { sse?: never } : { sse: { [K in HttpMethod]: SseFn } });\n\nexport interface Config {\n  /**\n   * Auth token or a function returning auth token. The resolved value will be\n   * added to the request payload as defined by its `security` array.\n   */\n  auth?: ((auth: Auth) => Promise<AuthToken> | AuthToken) | AuthToken;\n  /**\n   * A function for serializing request body parameter. By default,\n   * {@link JSON.stringify()} will be used.\n   */\n  bodySerializer?: BodySerializer | null;\n  /**\n   * An object containing any HTTP headers that you want to pre-populate your\n   * `Headers` object with.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/Headers/Headers#init See more}\n   */\n  headers?:\n    | RequestInit['headers']\n    | Record<\n        string,\n        string | number | boolean | (string | number | boolean)[] | null | undefined | unknown\n      >;\n  /**\n   * The request method.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/fetch#method See more}\n   */\n  method?: Uppercase<HttpMethod>;\n  /**\n   * A function for serializing request query parameters. By default, arrays\n   * will be exploded in form style, objects will be exploded in deepObject\n   * style, and reserved characters are percent-encoded.\n   *\n   * This method will have no effect if the native `paramsSerializer()` Axios\n   * API function is used.\n   *\n   * {@link https://swagger.io/docs/specification/serialization/#query View examples}\n   */\n  querySerializer?: QuerySerializer | QuerySerializerOptions;\n  /**\n   * A function validating request data. This is useful if you want to ensure\n   * the request conforms to the desired shape, so it can be safely sent to\n   * the server.\n   */\n  requestValidator?: (data: unknown) => Promise<unknown>;\n  /**\n   * A function transforming response data before it's returned. This is useful\n   * for post-processing data, e.g. converting ISO strings into Date objects.\n   */\n  responseTransformer?: (data: unknown) => Promise<unknown>;\n  /**\n   * A function validating response data. This is useful if you want to ensure\n   * the response conforms to the desired shape, so it can be safely passed to\n   * the transformers and returned to the user.\n   */\n  responseValidator?: (data: unknown) => Promise<unknown>;\n}\n\ntype IsExactlyNeverOrNeverUndefined<T> = [T] extends [never]\n  ? true\n  : [T] extends [never | undefined]\n    ? [undefined] extends [T]\n      ? false\n      : true\n    : false;\n\nexport type OmitNever<T extends Record<string, unknown>> = {\n  [K in keyof T as IsExactlyNeverOrNeverUndefined<T[K]> extends true ? never : K]: T[K];\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-nuxt/sdk-client-optional/core/utils.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-nuxt/sdk-client-optional/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport { apiVVersionODataControllerCount, callToTestOrderOfParams, callWithDefaultOptionalParameters, callWithDefaultParameters, callWithDescriptions, callWithDuplicateResponses, callWithNoContentResponse, callWithParameters, callWithResponse, callWithResponseAndNoContentResponse, callWithResponses, callWithResultFromHeader, callWithWeirdParameterNames, collectionFormat, complexParams, complexTypes, deleteCallWithoutParametersAndResponse, deleteFoo, deprecatedCall, dummyA, dummyB, duplicateName, duplicateName2, duplicateName3, duplicateName4, export_, fileResponse, fooWow, getApiVbyApiVersionSimpleOperation, getCallWithOptionalParam, getCallWithoutParametersAndResponse, headCallWithoutParametersAndResponse, import_, multipartRequest, multipartResponse, nonAsciiæøåÆøÅöôêÊ字符串, type Options, optionsCallWithoutParametersAndResponse, patchApiVbyApiVersionNoTag, patchCallWithoutParametersAndResponse, postApiVbyApiVersionFormData, postApiVbyApiVersionRequestBody, postCallWithOptionalParam, postCallWithoutParametersAndResponse, putCallWithoutParametersAndResponse, putWithFormUrlEncoded, testErrorCode, types, uploadFile } from './sdk.gen';\nexport type { _3eNum1Период, _400, AdditionalPropertiesIntegerIssue, AdditionalPropertiesUnknownIssue, AdditionalPropertiesUnknownIssue2, AdditionalPropertiesUnknownIssue3, AdditionalPropertiesUnknownIssueWritable, AnyOfAnyAndNull, AnyOfArrays, ApiVVersionODataControllerCountData, ApiVVersionODataControllerCountResponse, ApiVVersionODataControllerCountResponses, ArrayWithAnyOfProperties, ArrayWithArray, ArrayWithBooleans, ArrayWithNumbers, ArrayWithProperties, ArrayWithReferences, ArrayWithStrings, CallToTestOrderOfParamsData, CallWithDefaultOptionalParametersData, CallWithDefaultParametersData, CallWithDescriptionsData, CallWithDuplicateResponsesData, CallWithDuplicateResponsesError, CallWithDuplicateResponsesErrors, CallWithDuplicateResponsesResponse, CallWithDuplicateResponsesResponses, CallWithNoContentResponseData, CallWithNoContentResponseResponse, CallWithNoContentResponseResponses, CallWithParametersData, CallWithResponseAndNoContentResponseData, CallWithResponseAndNoContentResponseResponse, CallWithResponseAndNoContentResponseResponses, CallWithResponseData, CallWithResponseResponse, CallWithResponseResponses, CallWithResponsesData, CallWithResponsesError, CallWithResponsesErrors, CallWithResponsesResponse, CallWithResponsesResponses, CallWithResultFromHeaderData, CallWithResultFromHeaderErrors, CallWithResultFromHeaderResponses, CallWithWeirdParameterNamesData, CamelCaseCommentWithBreaks, CharactersInDescription, ClientOptions, CollectionFormatData, CommentWithBackticks, CommentWithBackticksAndQuotes, CommentWithBreaks, CommentWithExpressionPlaceholders, CommentWithQuotes, CommentWithReservedCharacters, CommentWithSlashes, ComplexParamsData, ComplexParamsResponse, ComplexParamsResponses, ComplexTypesData, ComplexTypesErrors, ComplexTypesResponse, ComplexTypesResponses, CompositionBaseModel, CompositionExtendedModel, CompositionWithAllOfAndNullable, CompositionWithAnyOf, CompositionWithAnyOfAndNullable, CompositionWithAnyOfAnonymous, CompositionWithNestedAnyAndTypeNull, CompositionWithNestedAnyOfAndNull, CompositionWithOneOf, CompositionWithOneOfAndComplexArrayDictionary, CompositionWithOneOfAndNullable, CompositionWithOneOfAndProperties, CompositionWithOneOfAndSimpleArrayDictionary, CompositionWithOneOfAndSimpleDictionary, CompositionWithOneOfAnonymous, CompositionWithOneOfDiscriminator, ConstValue, Default, DeleteCallWithoutParametersAndResponseData, DeleteFooData, DeleteFooData2, DeleteFooData3, DeprecatedCallData, DeprecatedModel, DictionaryWithArray, DictionaryWithDictionary, DictionaryWithProperties, DictionaryWithPropertiesAndAdditionalProperties, DictionaryWithReference, DictionaryWithString, DummyAData, DummyAResponse, DummyAResponses, DummyBData, DummyBResponse, DummyBResponses, DuplicateName2Data, DuplicateName3Data, DuplicateName4Data, DuplicateNameData, EnumFromDescription, EnumWithExtensions, EnumWithNumbers, EnumWithReplacedCharacters, EnumWithStrings, EnumWithXEnumNames, ExportData, ExternalRefA, ExternalRefB, ExternalSharedModel, File, FileResponseData, FileResponseResponse, FileResponseResponses, FileWritable, FooWowData, FooWowResponses, FreeFormObjectWithAdditionalPropertiesEqEmptyObject, FreeFormObjectWithAdditionalPropertiesEqTrue, FreeFormObjectWithoutAdditionalProperties, GenericSchemaDuplicateIssue1SystemBoolean, GenericSchemaDuplicateIssue1SystemBooleanWritable, GenericSchemaDuplicateIssue1SystemString, GenericSchemaDuplicateIssue1SystemStringWritable, GetApiVbyApiVersionSimpleOperationData, GetApiVbyApiVersionSimpleOperationError, GetApiVbyApiVersionSimpleOperationErrors, GetApiVbyApiVersionSimpleOperationResponse, GetApiVbyApiVersionSimpleOperationResponses, GetCallWithOptionalParamData, GetCallWithoutParametersAndResponseData, HeadCallWithoutParametersAndResponseData, Import, ImportData, ImportResponse, ImportResponses, IoK8sApimachineryPkgApisMetaV1DeleteOptions, IoK8sApimachineryPkgApisMetaV1Preconditions, ModelCircle, ModelFromZendesk, ModelSquare, ModelThatExtends, ModelThatExtendsExtends, ModelWithAdditionalPropertiesEqTrue, ModelWithAdditionalPropertiesRef, ModelWithAnyOfConstantSizeArray, ModelWithAnyOfConstantSizeArrayAndIntersect, ModelWithAnyOfConstantSizeArrayNullable, ModelWithAnyOfConstantSizeArrayWithNSizeAndOptions, ModelWithAnyOfConstantSizeArrayWithNSizeAndOptionsWritable, ModelWithArray, ModelWithArrayReadOnlyAndWriteOnly, ModelWithArrayReadOnlyAndWriteOnlyWritable, ModelWithBackticksInDescription, ModelWithBoolean, ModelWithCircularReference, ModelWithConst, ModelWithConstantSizeArray, ModelWithDictionary, ModelWithDuplicateImports, ModelWithDuplicateProperties, ModelWithEnum, ModelWithEnumFromDescription, ModelWithEnumWithHyphen, ModelWithInteger, ModelWithNestedArrayEnums, ModelWithNestedArrayEnumsData, ModelWithNestedArrayEnumsDataBar, ModelWithNestedArrayEnumsDataFoo, ModelWithNestedCompositionEnums, ModelWithNestedEnums, ModelWithNestedProperties, ModelWithNullableObject, ModelWithNullableString, ModelWithNumericEnumUnion, ModelWithOneOfAndProperties, ModelWithOneOfEnum, ModelWithOrderedProperties, ModelWithPattern, ModelWithPatternWritable, ModelWithPrefixItemsConstantSizeArray, ModelWithProperties, ModelWithPropertiesWritable, ModelWithReadOnlyAndWriteOnly, ModelWithReadOnlyAndWriteOnlyWritable, ModelWithReference, ModelWithReferenceWritable, ModelWithString, ModelWithStringError, MultipartRequestData, MultipartResponseData, MultipartResponseResponse, MultipartResponseResponses, NestedAnyOfArraysNullable, NonAsciiæøåÆøÅöôêÊ字符串Data, NonAsciiæøåÆøÅöôêÊ字符串Response, NonAsciiæøåÆøÅöôêÊ字符串Responses, NonAsciiStringæøåÆøÅöôêÊ字符串, NullableObject, OneOfAllOfIssue, OneOfAllOfIssueWritable, OptionsCallWithoutParametersAndResponseData, Pageable, ParameterSimpleParameterUnused, PatchApiVbyApiVersionNoTagData, PatchApiVbyApiVersionNoTagResponses, PatchCallWithoutParametersAndResponseData, PostApiVbyApiVersionFormDataData, PostApiVbyApiVersionRequestBodyData, PostCallWithOptionalParamData, PostCallWithOptionalParamResponse, PostCallWithOptionalParamResponses, PostCallWithoutParametersAndResponseData, PostServiceWithEmptyTagResponse, PostServiceWithEmptyTagResponse2, PutCallWithoutParametersAndResponseData, PutWithFormUrlEncodedData, SchemaWithFormRestrictedKeys, SimpleBoolean, SimpleFile, SimpleFormData, SimpleInteger, SimpleParameter, SimpleReference, SimpleRequestBody, SimpleString, SimpleStringWithPattern, TestErrorCodeData, TestErrorCodeErrors, TestErrorCodeResponses, TypesData, TypesResponse, TypesResponses, UploadFileData, UploadFileResponse, UploadFileResponses, XFooBar } from './types.gen';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-nuxt/sdk-client-optional/sdk.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport { type Client, type Composable, formDataBodySerializer, type Options as Options2, type TDataShape, urlSearchParamsBodySerializer } from './client';\nimport { client } from './client.gen';\nimport type { ApiVVersionODataControllerCountData, ApiVVersionODataControllerCountResponse, CallToTestOrderOfParamsData, CallWithDefaultOptionalParametersData, CallWithDefaultParametersData, CallWithDescriptionsData, CallWithDuplicateResponsesData, CallWithDuplicateResponsesError, CallWithDuplicateResponsesResponse, CallWithNoContentResponseData, CallWithNoContentResponseResponse, CallWithParametersData, CallWithResponseAndNoContentResponseData, CallWithResponseAndNoContentResponseResponse, CallWithResponseData, CallWithResponseResponse, CallWithResponsesData, CallWithResponsesError, CallWithResponsesResponse, CallWithResultFromHeaderData, CallWithWeirdParameterNamesData, CollectionFormatData, ComplexParamsData, ComplexParamsResponse, ComplexTypesData, ComplexTypesResponse, DeleteCallWithoutParametersAndResponseData, DeleteFooData3, DeprecatedCallData, DummyAData, DummyAResponse, DummyBData, DummyBResponse, DuplicateName2Data, DuplicateName3Data, DuplicateName4Data, DuplicateNameData, ExportData, FileResponseData, FileResponseResponse, FooWowData, GetApiVbyApiVersionSimpleOperationData, GetApiVbyApiVersionSimpleOperationError, GetApiVbyApiVersionSimpleOperationResponse, GetCallWithOptionalParamData, GetCallWithoutParametersAndResponseData, HeadCallWithoutParametersAndResponseData, ImportData, ImportResponse, MultipartRequestData, MultipartResponseData, MultipartResponseResponse, NonAsciiæøåÆøÅöôêÊ字符串Data, NonAsciiæøåÆøÅöôêÊ字符串Response, OptionsCallWithoutParametersAndResponseData, PatchApiVbyApiVersionNoTagData, PatchCallWithoutParametersAndResponseData, PostApiVbyApiVersionFormDataData, PostApiVbyApiVersionRequestBodyData, PostCallWithOptionalParamData, PostCallWithOptionalParamResponse, PostCallWithoutParametersAndResponseData, PutCallWithoutParametersAndResponseData, PutWithFormUrlEncodedData, TestErrorCodeData, TypesData, TypesResponse, UploadFileData, UploadFileResponse } from './types.gen';\n\nexport type Options<TComposable extends Composable = '$fetch', TData extends TDataShape = TDataShape, ResT = unknown, DefaultT = undefined> = Options2<TComposable, TData, ResT, DefaultT> & {\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\nexport const export_ = <TComposable extends Composable = '$fetch', DefaultT = undefined>(options: Options<TComposable, ExportData, unknown, DefaultT>) => (options.client ?? client).get<TComposable, unknown | DefaultT, unknown, DefaultT>({ url: '/api/v{api-version}/no+tag', ...options });\n\nexport const patchApiVbyApiVersionNoTag = <TComposable extends Composable = '$fetch', DefaultT = undefined>(options: Options<TComposable, PatchApiVbyApiVersionNoTagData, unknown, DefaultT>) => (options.client ?? client).patch<TComposable, unknown | DefaultT, unknown, DefaultT>({ url: '/api/v{api-version}/no+tag', ...options });\n\nexport const import_ = <TComposable extends Composable = '$fetch', DefaultT extends ImportResponse = ImportResponse>(options: Options<TComposable, ImportData, ImportResponse, DefaultT>) => (options.client ?? client).post<TComposable, ImportResponse | DefaultT, unknown, DefaultT>({\n    url: '/api/v{api-version}/no+tag',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options.headers\n    }\n});\n\nexport const fooWow = <TComposable extends Composable = '$fetch', DefaultT = undefined>(options: Options<TComposable, FooWowData, unknown, DefaultT>) => (options.client ?? client).put<TComposable, unknown | DefaultT, unknown, DefaultT>({ url: '/api/v{api-version}/no+tag', ...options });\n\nexport const apiVVersionODataControllerCount = <TComposable extends Composable = '$fetch', DefaultT extends ApiVVersionODataControllerCountResponse = ApiVVersionODataControllerCountResponse>(options: Options<TComposable, ApiVVersionODataControllerCountData, ApiVVersionODataControllerCountResponse, DefaultT>) => (options.client ?? client).get<TComposable, ApiVVersionODataControllerCountResponse | DefaultT, unknown, DefaultT>({ url: '/api/v{api-version}/simple/$count', ...options });\n\nexport const getApiVbyApiVersionSimpleOperation = <TComposable extends Composable = '$fetch', DefaultT extends GetApiVbyApiVersionSimpleOperationResponse = GetApiVbyApiVersionSimpleOperationResponse>(options: Options<TComposable, GetApiVbyApiVersionSimpleOperationData, GetApiVbyApiVersionSimpleOperationResponse, DefaultT>) => (options.client ?? client).get<TComposable, GetApiVbyApiVersionSimpleOperationResponse | DefaultT, GetApiVbyApiVersionSimpleOperationError, DefaultT>({ url: '/api/v{api-version}/simple:operation', ...options });\n\nexport const deleteCallWithoutParametersAndResponse = <TComposable extends Composable = '$fetch', DefaultT = undefined>(options: Options<TComposable, DeleteCallWithoutParametersAndResponseData, unknown, DefaultT>) => (options.client ?? client).delete<TComposable, unknown | DefaultT, unknown, DefaultT>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const getCallWithoutParametersAndResponse = <TComposable extends Composable = '$fetch', DefaultT = undefined>(options: Options<TComposable, GetCallWithoutParametersAndResponseData, unknown, DefaultT>) => (options.client ?? client).get<TComposable, unknown | DefaultT, unknown, DefaultT>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const headCallWithoutParametersAndResponse = <TComposable extends Composable = '$fetch', DefaultT = undefined>(options: Options<TComposable, HeadCallWithoutParametersAndResponseData, unknown, DefaultT>) => (options.client ?? client).head<TComposable, unknown | DefaultT, unknown, DefaultT>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const optionsCallWithoutParametersAndResponse = <TComposable extends Composable = '$fetch', DefaultT = undefined>(options: Options<TComposable, OptionsCallWithoutParametersAndResponseData, unknown, DefaultT>) => (options.client ?? client).options<TComposable, unknown | DefaultT, unknown, DefaultT>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const patchCallWithoutParametersAndResponse = <TComposable extends Composable = '$fetch', DefaultT = undefined>(options: Options<TComposable, PatchCallWithoutParametersAndResponseData, unknown, DefaultT>) => (options.client ?? client).patch<TComposable, unknown | DefaultT, unknown, DefaultT>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const postCallWithoutParametersAndResponse = <TComposable extends Composable = '$fetch', DefaultT = undefined>(options: Options<TComposable, PostCallWithoutParametersAndResponseData, unknown, DefaultT>) => (options.client ?? client).post<TComposable, unknown | DefaultT, unknown, DefaultT>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const putCallWithoutParametersAndResponse = <TComposable extends Composable = '$fetch', DefaultT = undefined>(options: Options<TComposable, PutCallWithoutParametersAndResponseData, unknown, DefaultT>) => (options.client ?? client).put<TComposable, unknown | DefaultT, unknown, DefaultT>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const deleteFoo = <TComposable extends Composable = '$fetch', DefaultT = undefined>(options: Options<TComposable, DeleteFooData3, unknown, DefaultT>) => (options.client ?? client).delete<TComposable, unknown | DefaultT, unknown, DefaultT>({ url: '/api/v{api-version}/foo/{foo_param}/bar/{BarParam}', ...options });\n\nexport const callWithDescriptions = <TComposable extends Composable = '$fetch', DefaultT = undefined>(options: Options<TComposable, CallWithDescriptionsData, unknown, DefaultT>) => (options.client ?? client).post<TComposable, unknown | DefaultT, unknown, DefaultT>({ url: '/api/v{api-version}/descriptions', ...options });\n\n/**\n * @deprecated\n */\nexport const deprecatedCall = <TComposable extends Composable = '$fetch', DefaultT = undefined>(options: Options<TComposable, DeprecatedCallData, unknown, DefaultT>) => (options.client ?? client).post<TComposable, unknown | DefaultT, unknown, DefaultT>({ url: '/api/v{api-version}/parameters/deprecated', ...options });\n\nexport const callWithParameters = <TComposable extends Composable = '$fetch', DefaultT = undefined>(options: Options<TComposable, CallWithParametersData, unknown, DefaultT>) => (options.client ?? client).post<TComposable, unknown | DefaultT, unknown, DefaultT>({\n    url: '/api/v{api-version}/parameters/{parameterPath}',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options.headers\n    }\n});\n\nexport const callWithWeirdParameterNames = <TComposable extends Composable = '$fetch', DefaultT = undefined>(options: Options<TComposable, CallWithWeirdParameterNamesData, unknown, DefaultT>) => (options.client ?? client).post<TComposable, unknown | DefaultT, unknown, DefaultT>({\n    url: '/api/v{api-version}/parameters/{parameter.path.1}/{parameter-path-2}/{PARAMETER-PATH-3}',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options.headers\n    }\n});\n\nexport const getCallWithOptionalParam = <TComposable extends Composable = '$fetch', DefaultT = undefined>(options: Options<TComposable, GetCallWithOptionalParamData, unknown, DefaultT>) => (options.client ?? client).get<TComposable, unknown | DefaultT, unknown, DefaultT>({\n    url: '/api/v{api-version}/parameters',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options.headers\n    }\n});\n\nexport const postCallWithOptionalParam = <TComposable extends Composable = '$fetch', DefaultT extends PostCallWithOptionalParamResponse = PostCallWithOptionalParamResponse>(options: Options<TComposable, PostCallWithOptionalParamData, PostCallWithOptionalParamResponse, DefaultT>) => (options.client ?? client).post<TComposable, PostCallWithOptionalParamResponse | DefaultT, unknown, DefaultT>({\n    url: '/api/v{api-version}/parameters',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options.headers\n    }\n});\n\nexport const postApiVbyApiVersionRequestBody = <TComposable extends Composable = '$fetch', DefaultT = undefined>(options: Options<TComposable, PostApiVbyApiVersionRequestBodyData, unknown, DefaultT>) => (options.client ?? client).post<TComposable, unknown | DefaultT, unknown, DefaultT>({\n    url: '/api/v{api-version}/requestBody',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options.headers\n    }\n});\n\nexport const postApiVbyApiVersionFormData = <TComposable extends Composable = '$fetch', DefaultT = undefined>(options: Options<TComposable, PostApiVbyApiVersionFormDataData, unknown, DefaultT>) => (options.client ?? client).post<TComposable, unknown | DefaultT, unknown, DefaultT>({\n    ...formDataBodySerializer,\n    url: '/api/v{api-version}/formData',\n    ...options,\n    headers: {\n        'Content-Type': null,\n        ...options.headers\n    }\n});\n\nexport const callWithDefaultParameters = <TComposable extends Composable = '$fetch', DefaultT = undefined>(options: Options<TComposable, CallWithDefaultParametersData, unknown, DefaultT>) => (options.client ?? client).get<TComposable, unknown | DefaultT, unknown, DefaultT>({ url: '/api/v{api-version}/defaults', ...options });\n\nexport const callWithDefaultOptionalParameters = <TComposable extends Composable = '$fetch', DefaultT = undefined>(options: Options<TComposable, CallWithDefaultOptionalParametersData, unknown, DefaultT>) => (options.client ?? client).post<TComposable, unknown | DefaultT, unknown, DefaultT>({ url: '/api/v{api-version}/defaults', ...options });\n\nexport const callToTestOrderOfParams = <TComposable extends Composable = '$fetch', DefaultT = undefined>(options: Options<TComposable, CallToTestOrderOfParamsData, unknown, DefaultT>) => (options.client ?? client).put<TComposable, unknown | DefaultT, unknown, DefaultT>({ url: '/api/v{api-version}/defaults', ...options });\n\nexport const duplicateName = <TComposable extends Composable = '$fetch', DefaultT = undefined>(options: Options<TComposable, DuplicateNameData, unknown, DefaultT>) => (options.client ?? client).delete<TComposable, unknown | DefaultT, unknown, DefaultT>({ url: '/api/v{api-version}/duplicate', ...options });\n\nexport const duplicateName2 = <TComposable extends Composable = '$fetch', DefaultT = undefined>(options: Options<TComposable, DuplicateName2Data, unknown, DefaultT>) => (options.client ?? client).get<TComposable, unknown | DefaultT, unknown, DefaultT>({ url: '/api/v{api-version}/duplicate', ...options });\n\nexport const duplicateName3 = <TComposable extends Composable = '$fetch', DefaultT = undefined>(options: Options<TComposable, DuplicateName3Data, unknown, DefaultT>) => (options.client ?? client).post<TComposable, unknown | DefaultT, unknown, DefaultT>({ url: '/api/v{api-version}/duplicate', ...options });\n\nexport const duplicateName4 = <TComposable extends Composable = '$fetch', DefaultT = undefined>(options: Options<TComposable, DuplicateName4Data, unknown, DefaultT>) => (options.client ?? client).put<TComposable, unknown | DefaultT, unknown, DefaultT>({ url: '/api/v{api-version}/duplicate', ...options });\n\nexport const callWithNoContentResponse = <TComposable extends Composable = '$fetch', DefaultT extends CallWithNoContentResponseResponse = CallWithNoContentResponseResponse>(options: Options<TComposable, CallWithNoContentResponseData, CallWithNoContentResponseResponse, DefaultT>) => (options.client ?? client).get<TComposable, CallWithNoContentResponseResponse | DefaultT, unknown, DefaultT>({ url: '/api/v{api-version}/no-content', ...options });\n\nexport const callWithResponseAndNoContentResponse = <TComposable extends Composable = '$fetch', DefaultT extends CallWithResponseAndNoContentResponseResponse = CallWithResponseAndNoContentResponseResponse>(options: Options<TComposable, CallWithResponseAndNoContentResponseData, CallWithResponseAndNoContentResponseResponse, DefaultT>) => (options.client ?? client).get<TComposable, CallWithResponseAndNoContentResponseResponse | DefaultT, unknown, DefaultT>({ url: '/api/v{api-version}/multiple-tags/response-and-no-content', ...options });\n\nexport const dummyA = <TComposable extends Composable = '$fetch', DefaultT extends DummyAResponse = DummyAResponse>(options: Options<TComposable, DummyAData, DummyAResponse, DefaultT>) => (options.client ?? client).get<TComposable, DummyAResponse | DefaultT, unknown, DefaultT>({ url: '/api/v{api-version}/multiple-tags/a', ...options });\n\nexport const dummyB = <TComposable extends Composable = '$fetch', DefaultT extends DummyBResponse = DummyBResponse>(options: Options<TComposable, DummyBData, DummyBResponse, DefaultT>) => (options.client ?? client).get<TComposable, DummyBResponse | DefaultT, unknown, DefaultT>({ url: '/api/v{api-version}/multiple-tags/b', ...options });\n\nexport const callWithResponse = <TComposable extends Composable = '$fetch', DefaultT extends CallWithResponseResponse = CallWithResponseResponse>(options: Options<TComposable, CallWithResponseData, CallWithResponseResponse, DefaultT>) => (options.client ?? client).get<TComposable, CallWithResponseResponse | DefaultT, unknown, DefaultT>({ url: '/api/v{api-version}/response', ...options });\n\nexport const callWithDuplicateResponses = <TComposable extends Composable = '$fetch', DefaultT extends CallWithDuplicateResponsesResponse = CallWithDuplicateResponsesResponse>(options: Options<TComposable, CallWithDuplicateResponsesData, CallWithDuplicateResponsesResponse, DefaultT>) => (options.client ?? client).post<TComposable, CallWithDuplicateResponsesResponse | DefaultT, CallWithDuplicateResponsesError, DefaultT>({ url: '/api/v{api-version}/response', ...options });\n\nexport const callWithResponses = <TComposable extends Composable = '$fetch', DefaultT extends CallWithResponsesResponse = CallWithResponsesResponse>(options: Options<TComposable, CallWithResponsesData, CallWithResponsesResponse, DefaultT>) => (options.client ?? client).put<TComposable, CallWithResponsesResponse | DefaultT, CallWithResponsesError, DefaultT>({ url: '/api/v{api-version}/response', ...options });\n\nexport const collectionFormat = <TComposable extends Composable = '$fetch', DefaultT = undefined>(options: Options<TComposable, CollectionFormatData, unknown, DefaultT>) => (options.client ?? client).get<TComposable, unknown | DefaultT, unknown, DefaultT>({ url: '/api/v{api-version}/collectionFormat', ...options });\n\nexport const types = <TComposable extends Composable = '$fetch', DefaultT extends TypesResponse = TypesResponse>(options: Options<TComposable, TypesData, TypesResponse, DefaultT>) => (options.client ?? client).get<TComposable, TypesResponse | DefaultT, unknown, DefaultT>({ url: '/api/v{api-version}/types', ...options });\n\nexport const uploadFile = <TComposable extends Composable = '$fetch', DefaultT extends UploadFileResponse = UploadFileResponse>(options: Options<TComposable, UploadFileData, UploadFileResponse, DefaultT>) => (options.client ?? client).post<TComposable, UploadFileResponse | DefaultT, unknown, DefaultT>({\n    ...urlSearchParamsBodySerializer,\n    url: '/api/v{api-version}/upload',\n    ...options,\n    headers: {\n        'Content-Type': 'application/x-www-form-urlencoded',\n        ...options.headers\n    }\n});\n\nexport const fileResponse = <TComposable extends Composable = '$fetch', DefaultT extends FileResponseResponse = FileResponseResponse>(options: Options<TComposable, FileResponseData, FileResponseResponse, DefaultT>) => (options.client ?? client).get<TComposable, FileResponseResponse | DefaultT, unknown, DefaultT>({ url: '/api/v{api-version}/file/{id}', ...options });\n\nexport const complexTypes = <TComposable extends Composable = '$fetch', DefaultT extends ComplexTypesResponse = ComplexTypesResponse>(options: Options<TComposable, ComplexTypesData, ComplexTypesResponse, DefaultT>) => (options.client ?? client).get<TComposable, ComplexTypesResponse | DefaultT, unknown, DefaultT>({\n    querySerializer: { parameters: { parameterObject: { object: { style: 'form' } } } },\n    url: '/api/v{api-version}/complex',\n    ...options\n});\n\nexport const multipartResponse = <TComposable extends Composable = '$fetch', DefaultT extends MultipartResponseResponse = MultipartResponseResponse>(options: Options<TComposable, MultipartResponseData, MultipartResponseResponse, DefaultT>) => (options.client ?? client).get<TComposable, MultipartResponseResponse | DefaultT, unknown, DefaultT>({ url: '/api/v{api-version}/multipart', ...options });\n\nexport const multipartRequest = <TComposable extends Composable = '$fetch', DefaultT = undefined>(options: Options<TComposable, MultipartRequestData, unknown, DefaultT>) => (options.client ?? client).post<TComposable, unknown | DefaultT, unknown, DefaultT>({\n    ...formDataBodySerializer,\n    url: '/api/v{api-version}/multipart',\n    ...options,\n    headers: {\n        'Content-Type': null,\n        ...options.headers\n    }\n});\n\nexport const complexParams = <TComposable extends Composable = '$fetch', DefaultT extends ComplexParamsResponse = ComplexParamsResponse>(options: Options<TComposable, ComplexParamsData, ComplexParamsResponse, DefaultT>) => (options.client ?? client).put<TComposable, ComplexParamsResponse | DefaultT, unknown, DefaultT>({\n    url: '/api/v{api-version}/complex/{id}',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json-patch+json',\n        ...options.headers\n    }\n});\n\nexport const callWithResultFromHeader = <TComposable extends Composable = '$fetch', DefaultT = undefined>(options: Options<TComposable, CallWithResultFromHeaderData, unknown, DefaultT>) => (options.client ?? client).post<TComposable, unknown | DefaultT, unknown, DefaultT>({ url: '/api/v{api-version}/header', ...options });\n\nexport const testErrorCode = <TComposable extends Composable = '$fetch', DefaultT = undefined>(options: Options<TComposable, TestErrorCodeData, unknown, DefaultT>) => (options.client ?? client).post<TComposable, unknown | DefaultT, unknown, DefaultT>({ url: '/api/v{api-version}/error', ...options });\n\nexport const nonAsciiæøåÆøÅöôêÊ字符串 = <TComposable extends Composable = '$fetch', DefaultT extends NonAsciiæøåÆøÅöôêÊ字符串Response = NonAsciiæøåÆøÅöôêÊ字符串Response>(options: Options<TComposable, NonAsciiæøåÆøÅöôêÊ字符串Data, NonAsciiæøåÆøÅöôêÊ字符串Response, DefaultT>) => (options.client ?? client).post<TComposable, NonAsciiæøåÆøÅöôêÊ字符串Response | DefaultT, unknown, DefaultT>({ url: '/api/v{api-version}/non-ascii-æøåÆØÅöôêÊ字符串', ...options });\n\n/**\n * Login User\n */\nexport const putWithFormUrlEncoded = <TComposable extends Composable = '$fetch', DefaultT = undefined>(options: Options<TComposable, PutWithFormUrlEncodedData, unknown, DefaultT>) => (options.client ?? client).put<TComposable, unknown | DefaultT, unknown, DefaultT>({\n    ...urlSearchParamsBodySerializer,\n    url: '/api/v{api-version}/non-ascii-æøåÆØÅöôêÊ字符串',\n    ...options,\n    headers: {\n        'Content-Type': 'application/x-www-form-urlencoded',\n        ...options.headers\n    }\n});\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-nuxt/sdk-client-optional/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type ClientOptions = {\n    baseURL: 'http://localhost:3000/base' | (string & {});\n};\n\n/**\n * Model with number-only name\n */\nexport type _400 = string;\n\n/**\n * External ref to shared model (A)\n */\nexport type ExternalRefA = ExternalSharedModel;\n\n/**\n * External ref to shared model (B)\n */\nexport type ExternalRefB = ExternalSharedModel;\n\n/**\n * Testing multiline comments in string: First line\n * Second line\n *\n * Fourth line\n */\nexport type CamelCaseCommentWithBreaks = number;\n\n/**\n * Testing multiline comments in string: First line\n * Second line\n *\n * Fourth line\n */\nexport type CommentWithBreaks = number;\n\n/**\n * Testing backticks in string: `backticks` and ```multiple backticks``` should work\n */\nexport type CommentWithBackticks = number;\n\n/**\n * Testing backticks and quotes in string: `backticks`, 'quotes', \"double quotes\" and ```multiple backticks``` should work\n */\nexport type CommentWithBackticksAndQuotes = number;\n\n/**\n * Testing slashes in string: \\backwards\\\\\\ and /forwards/// should work\n */\nexport type CommentWithSlashes = number;\n\n/**\n * Testing expression placeholders in string: ${expression} should work\n */\nexport type CommentWithExpressionPlaceholders = number;\n\n/**\n * Testing quotes in string: 'single quote''' and \"double quotes\"\"\" should work\n */\nexport type CommentWithQuotes = number;\n\n/**\n * Testing reserved characters in string: * inline * and ** inline ** should work\n */\nexport type CommentWithReservedCharacters = number;\n\n/**\n * This is a simple number\n */\nexport type SimpleInteger = number;\n\n/**\n * This is a simple boolean\n */\nexport type SimpleBoolean = boolean;\n\n/**\n * This is a simple string\n */\nexport type SimpleString = string;\n\n/**\n * A string with non-ascii (unicode) characters valid in typescript identifiers (æøåÆØÅöÔèÈ字符串)\n */\nexport type NonAsciiStringæøåÆøÅöôêÊ字符串 = string;\n\n/**\n * This is a simple file\n */\nexport type SimpleFile = Blob | File;\n\n/**\n * This is a simple reference\n */\nexport type SimpleReference = ModelWithString;\n\n/**\n * This is a simple string\n */\nexport type SimpleStringWithPattern = string | null;\n\n/**\n * This is a simple enum with strings\n */\nexport type EnumWithStrings = 'Success' | 'Warning' | 'Error' | '\\'Single Quote\\'' | '\"Double Quotes\"' | 'Non-ascii: øæåôöØÆÅÔÖ字符串';\n\nexport type EnumWithReplacedCharacters = '\\'Single Quote\\'' | '\"Double Quotes\"' | 'øæåôöØÆÅÔÖ字符串' | 3.1 | '';\n\n/**\n * This is a simple enum with numbers\n */\nexport type EnumWithNumbers = 1 | 2 | 3 | 1.1 | 1.2 | 1.3 | 100 | 200 | 300 | -100 | -200 | -300 | -1.1 | -1.2 | -1.3;\n\n/**\n * Success=1,Warning=2,Error=3\n */\nexport type EnumFromDescription = number;\n\n/**\n * This is a simple enum with numbers\n */\nexport type EnumWithExtensions = 200 | 400 | 500;\n\nexport type EnumWithXEnumNames = 0 | 1 | 2;\n\n/**\n * This is a simple array with numbers\n */\nexport type ArrayWithNumbers = Array<number>;\n\n/**\n * This is a simple array with booleans\n */\nexport type ArrayWithBooleans = Array<boolean>;\n\n/**\n * This is a simple array with strings\n */\nexport type ArrayWithStrings = Array<string>;\n\n/**\n * This is a simple array with references\n */\nexport type ArrayWithReferences = Array<ModelWithString>;\n\n/**\n * This is a simple array containing an array\n */\nexport type ArrayWithArray = Array<Array<ModelWithString>>;\n\n/**\n * This is a simple array with properties\n */\nexport type ArrayWithProperties = Array<{\n    '16x16'?: CamelCaseCommentWithBreaks;\n    bar?: string;\n}>;\n\n/**\n * This is a simple array with any of properties\n */\nexport type ArrayWithAnyOfProperties = Array<{\n    foo?: string;\n} | {\n    bar?: string;\n}>;\n\nexport type AnyOfAnyAndNull = {\n    data?: unknown | null;\n};\n\n/**\n * This is a simple array with any of properties\n */\nexport type AnyOfArrays = {\n    results?: Array<{\n        foo?: string;\n    } | {\n        bar?: string;\n    }>;\n};\n\n/**\n * This is a string dictionary\n */\nexport type DictionaryWithString = {\n    [key: string]: string;\n};\n\nexport type DictionaryWithPropertiesAndAdditionalProperties = {\n    foo?: number;\n    bar?: boolean;\n    [key: string]: string | number | boolean | undefined;\n};\n\n/**\n * This is a string reference\n */\nexport type DictionaryWithReference = {\n    [key: string]: ModelWithString;\n};\n\n/**\n * This is a complex dictionary\n */\nexport type DictionaryWithArray = {\n    [key: string]: Array<ModelWithString>;\n};\n\n/**\n * This is a string dictionary\n */\nexport type DictionaryWithDictionary = {\n    [key: string]: {\n        [key: string]: string;\n    };\n};\n\n/**\n * This is a complex dictionary\n */\nexport type DictionaryWithProperties = {\n    [key: string]: {\n        foo?: string;\n        bar?: string;\n    };\n};\n\n/**\n * This is a model with one number property\n */\nexport type ModelWithInteger = {\n    /**\n     * This is a simple number property\n     */\n    prop?: number;\n};\n\n/**\n * This is a model with one boolean property\n */\nexport type ModelWithBoolean = {\n    /**\n     * This is a simple boolean property\n     */\n    prop?: boolean;\n};\n\n/**\n * This is a model with one string property\n */\nexport type ModelWithString = {\n    /**\n     * This is a simple string property\n     */\n    prop?: string;\n};\n\n/**\n * This is a model with one string property\n */\nexport type ModelWithStringError = {\n    /**\n     * This is a simple string property\n     */\n    prop?: string;\n};\n\n/**\n * `Comment` or `VoiceComment`. The JSON object for adding voice comments to tickets is different. See [Adding voice comments to tickets](/documentation/ticketing/managing-tickets/adding-voice-comments-to-tickets)\n */\nexport type ModelFromZendesk = string;\n\n/**\n * This is a model with one string property\n */\nexport type ModelWithNullableString = {\n    /**\n     * This is a simple string property\n     */\n    nullableProp1?: string | null;\n    /**\n     * This is a simple string property\n     */\n    nullableRequiredProp1: string | null;\n    /**\n     * This is a simple string property\n     */\n    nullableProp2?: string | null;\n    /**\n     * This is a simple string property\n     */\n    nullableRequiredProp2: string | null;\n    /**\n     * This is a simple enum with strings\n     */\n    'foo_bar-enum'?: 'Success' | 'Warning' | 'Error' | 'ØÆÅ字符串';\n};\n\n/**\n * This is a model with one enum\n */\nexport type ModelWithEnum = {\n    /**\n     * This is a simple enum with strings\n     */\n    'foo_bar-enum'?: 'Success' | 'Warning' | 'Error' | 'ØÆÅ字符串';\n    /**\n     * These are the HTTP error code enums\n     */\n    statusCode?: '100' | '200 FOO' | '300 FOO_BAR' | '400 foo-bar' | '500 foo.bar' | '600 foo&bar';\n    /**\n     * Simple boolean enum\n     */\n    bool?: true;\n};\n\n/**\n * This is a model with one enum with escaped name\n */\nexport type ModelWithEnumWithHyphen = {\n    /**\n     * Foo-Bar-Baz-Qux\n     */\n    'foo-bar-baz-qux'?: '3.0';\n};\n\n/**\n * This is a model with one enum\n */\nexport type ModelWithEnumFromDescription = {\n    /**\n     * Success=1,Warning=2,Error=3\n     */\n    test?: number;\n};\n\n/**\n * This is a model with nested enums\n */\nexport type ModelWithNestedEnums = {\n    dictionaryWithEnum?: {\n        [key: string]: 'Success' | 'Warning' | 'Error';\n    };\n    dictionaryWithEnumFromDescription?: {\n        [key: string]: number;\n    };\n    arrayWithEnum?: Array<'Success' | 'Warning' | 'Error'>;\n    arrayWithDescription?: Array<number>;\n    /**\n     * This is a simple enum with strings\n     */\n    'foo_bar-enum'?: 'Success' | 'Warning' | 'Error' | 'ØÆÅ字符串';\n};\n\n/**\n * This is a model with one property containing a reference\n */\nexport type ModelWithReference = {\n    prop?: ModelWithProperties;\n};\n\n/**\n * This is a model with one property containing an array\n */\nexport type ModelWithArrayReadOnlyAndWriteOnly = {\n    prop?: Array<ModelWithReadOnlyAndWriteOnly>;\n    propWithFile?: Array<Blob | File>;\n    propWithNumber?: Array<number>;\n};\n\n/**\n * This is a model with one property containing an array\n */\nexport type ModelWithArray = {\n    prop?: Array<ModelWithString>;\n    propWithFile?: Array<Blob | File>;\n    propWithNumber?: Array<number>;\n};\n\n/**\n * This is a model with one property containing a dictionary\n */\nexport type ModelWithDictionary = {\n    prop?: {\n        [key: string]: string;\n    };\n};\n\n/**\n * This is a deprecated model with a deprecated property\n *\n * @deprecated\n */\nexport type DeprecatedModel = {\n    /**\n     * This is a deprecated property\n     *\n     * @deprecated\n     */\n    prop?: string;\n};\n\n/**\n * This is a model with one property containing a circular reference\n */\nexport type ModelWithCircularReference = {\n    prop?: ModelWithCircularReference;\n};\n\n/**\n * This is a model with one property with a 'one of' relationship\n */\nexport type CompositionWithOneOf = {\n    propA?: ModelWithString | ModelWithEnum | ModelWithArray | ModelWithDictionary;\n};\n\n/**\n * This is a model with one property with a 'one of' relationship where the options are not $ref\n */\nexport type CompositionWithOneOfAnonymous = {\n    propA?: {\n        propA?: string;\n    } | string | number;\n};\n\n/**\n * Circle\n */\nexport type ModelCircle = {\n    kind: string;\n    radius?: number;\n};\n\n/**\n * Square\n */\nexport type ModelSquare = {\n    kind: string;\n    sideLength?: number;\n};\n\n/**\n * This is a model with one property with a 'one of' relationship where the options are not $ref\n */\nexport type CompositionWithOneOfDiscriminator = ({\n    kind: 'circle';\n} & ModelCircle) | ({\n    kind: 'square';\n} & ModelSquare);\n\n/**\n * This is a model with one property with a 'any of' relationship\n */\nexport type CompositionWithAnyOf = {\n    propA?: ModelWithString | ModelWithEnum | ModelWithArray | ModelWithDictionary;\n};\n\n/**\n * This is a model with one property with a 'any of' relationship where the options are not $ref\n */\nexport type CompositionWithAnyOfAnonymous = {\n    propA?: {\n        propA?: string;\n    } | string | number;\n};\n\n/**\n * This is a model with nested 'any of' property with a type null\n */\nexport type CompositionWithNestedAnyAndTypeNull = {\n    propA?: Array<ModelWithDictionary | null> | Array<ModelWithArray | null>;\n};\n\nexport type _3eNum1Период = 'Bird' | 'Dog';\n\nexport type ConstValue = 'ConstValue';\n\n/**\n * This is a model with one property with a 'any of' relationship where the options are not $ref\n */\nexport type CompositionWithNestedAnyOfAndNull = {\n    /**\n     * Scopes\n     */\n    propA?: Array<_3eNum1Период | ConstValue> | null;\n};\n\n/**\n * This is a model with one property with a 'one of' relationship\n */\nexport type CompositionWithOneOfAndNullable = {\n    propA?: {\n        boolean?: boolean;\n    } | ModelWithEnum | ModelWithArray | ModelWithDictionary | null;\n};\n\n/**\n * This is a model that contains a simple dictionary within composition\n */\nexport type CompositionWithOneOfAndSimpleDictionary = {\n    propA?: boolean | {\n        [key: string]: number;\n    };\n};\n\n/**\n * This is a model that contains a dictionary of simple arrays within composition\n */\nexport type CompositionWithOneOfAndSimpleArrayDictionary = {\n    propA?: boolean | {\n        [key: string]: Array<boolean>;\n    };\n};\n\n/**\n * This is a model that contains a dictionary of complex arrays (composited) within composition\n */\nexport type CompositionWithOneOfAndComplexArrayDictionary = {\n    propA?: boolean | {\n        [key: string]: Array<number | string>;\n    };\n};\n\n/**\n * This is a model with one property with a 'all of' relationship\n */\nexport type CompositionWithAllOfAndNullable = {\n    propA?: ({\n        boolean?: boolean;\n    } & ModelWithEnum & ModelWithArray & ModelWithDictionary) | null;\n};\n\n/**\n * This is a model with one property with a 'any of' relationship\n */\nexport type CompositionWithAnyOfAndNullable = {\n    propA?: {\n        boolean?: boolean;\n    } | ModelWithEnum | ModelWithArray | ModelWithDictionary | null;\n};\n\n/**\n * This is a base model with two simple optional properties\n */\nexport type CompositionBaseModel = {\n    firstName?: string;\n    lastname?: string;\n};\n\n/**\n * This is a model that extends the base model\n */\nexport type CompositionExtendedModel = CompositionBaseModel & {\n    age: number;\n    firstName: string;\n    lastname: string;\n};\n\n/**\n * This is a model with one nested property\n */\nexport type ModelWithProperties = {\n    required: string;\n    readonly requiredAndReadOnly: string;\n    requiredAndNullable: string | null;\n    string?: string;\n    number?: number;\n    boolean?: boolean;\n    reference?: ModelWithString;\n    'property with space'?: string;\n    default?: string;\n    try?: string;\n    readonly '@namespace.string'?: string;\n    readonly '@namespace.integer'?: number;\n};\n\n/**\n * This is a model with one nested property\n */\nexport type ModelWithNestedProperties = {\n    readonly first: {\n        readonly second: {\n            readonly third: string | null;\n        } | null;\n    } | null;\n};\n\n/**\n * This is a model with duplicated properties\n */\nexport type ModelWithDuplicateProperties = {\n    prop?: ModelWithString;\n};\n\n/**\n * This is a model with ordered properties\n */\nexport type ModelWithOrderedProperties = {\n    zebra?: string;\n    apple?: string;\n    hawaii?: string;\n};\n\n/**\n * This is a model with duplicated imports\n */\nexport type ModelWithDuplicateImports = {\n    propA?: ModelWithString;\n    propB?: ModelWithString;\n    propC?: ModelWithString;\n};\n\n/**\n * This is a model that extends another model\n */\nexport type ModelThatExtends = ModelWithString & {\n    propExtendsA?: string;\n    propExtendsB?: ModelWithString;\n};\n\n/**\n * This is a model that extends another model\n */\nexport type ModelThatExtendsExtends = ModelWithString & ModelThatExtends & {\n    propExtendsC?: string;\n    propExtendsD?: ModelWithString;\n};\n\n/**\n * This is a model that contains a some patterns\n */\nexport type ModelWithPattern = {\n    key: string;\n    name: string;\n    readonly enabled?: boolean;\n    readonly modified?: string;\n    id?: string;\n    text?: string;\n    patternWithSingleQuotes?: string;\n    patternWithNewline?: string;\n    patternWithBacktick?: string;\n    patternWithUnicode?: string;\n};\n\nexport type File = {\n    /**\n     * Id\n     */\n    readonly id?: string;\n    /**\n     * Updated at\n     */\n    readonly updated_at?: string;\n    /**\n     * Created at\n     */\n    readonly created_at?: string;\n    /**\n     * Mime\n     */\n    mime: string;\n    /**\n     * File\n     */\n    readonly file?: string;\n};\n\nexport type Default = {\n    name?: string;\n};\n\nexport type Pageable = {\n    page?: number;\n    size?: number;\n    sort?: Array<string>;\n};\n\n/**\n * This is a free-form object without additionalProperties.\n */\nexport type FreeFormObjectWithoutAdditionalProperties = {\n    [key: string]: unknown;\n};\n\n/**\n * This is a free-form object with additionalProperties: true.\n */\nexport type FreeFormObjectWithAdditionalPropertiesEqTrue = {\n    [key: string]: unknown;\n};\n\n/**\n * This is a free-form object with additionalProperties: {}.\n */\nexport type FreeFormObjectWithAdditionalPropertiesEqEmptyObject = {\n    [key: string]: unknown;\n};\n\nexport type ModelWithConst = {\n    String?: 'String';\n    number?: 0;\n    null?: null;\n    withType?: 'Some string';\n};\n\n/**\n * This is a model with one property and additionalProperties: true\n */\nexport type ModelWithAdditionalPropertiesEqTrue = {\n    /**\n     * This is a simple string property\n     */\n    prop?: string;\n    [key: string]: unknown;\n};\n\nexport type NestedAnyOfArraysNullable = {\n    nullableArray?: Array<string | boolean> | null;\n};\n\nexport type CompositionWithOneOfAndProperties = ({\n    foo: SimpleParameter;\n} | {\n    bar: NonAsciiStringæøåÆøÅöôêÊ字符串;\n}) & {\n    baz: number | null;\n    qux: number;\n};\n\n/**\n * An object that can be null\n */\nexport type NullableObject = {\n    foo?: string;\n} | null;\n\n/**\n * Some % character\n */\nexport type CharactersInDescription = string;\n\nexport type ModelWithNullableObject = {\n    data?: NullableObject;\n};\n\n/**\n * An object with additional properties that can be null (anyOf ref + null)\n */\nexport type ModelWithAdditionalPropertiesRef = {\n    [key: string]: NullableObject | null;\n};\n\nexport type ModelWithOneOfEnum = {\n    foo: 'Bar';\n} | {\n    foo: 'Baz';\n} | {\n    foo: 'Qux';\n} | {\n    content: string;\n    foo: 'Quux';\n} | {\n    content: [\n        string,\n        string\n    ];\n    foo: 'Corge';\n};\n\nexport type ModelWithNestedArrayEnumsDataFoo = 'foo' | 'bar';\n\nexport type ModelWithNestedArrayEnumsDataBar = 'baz' | 'qux';\n\nexport type ModelWithNestedArrayEnumsData = {\n    foo?: Array<ModelWithNestedArrayEnumsDataFoo>;\n    bar?: Array<ModelWithNestedArrayEnumsDataBar>;\n};\n\nexport type ModelWithNestedArrayEnums = {\n    array_strings?: Array<string>;\n    data?: ModelWithNestedArrayEnumsData;\n};\n\nexport type ModelWithNestedCompositionEnums = {\n    foo?: ModelWithNestedArrayEnumsDataFoo;\n};\n\nexport type ModelWithReadOnlyAndWriteOnly = {\n    foo: string;\n    readonly bar: string;\n};\n\nexport type ModelWithConstantSizeArray = [\n    number,\n    number\n];\n\nexport type ModelWithAnyOfConstantSizeArray = [\n    number | string,\n    number | string,\n    number | string\n];\n\nexport type ModelWithPrefixItemsConstantSizeArray = [\n    ModelWithInteger,\n    number | string,\n    string\n];\n\nexport type ModelWithAnyOfConstantSizeArrayNullable = [\n    number | null | string,\n    number | null | string,\n    number | null | string\n];\n\nexport type ModelWithAnyOfConstantSizeArrayWithNSizeAndOptions = [\n    number | Import,\n    number | Import\n];\n\nexport type ModelWithAnyOfConstantSizeArrayAndIntersect = [\n    number & string,\n    number & string\n];\n\nexport type ModelWithNumericEnumUnion = {\n    /**\n     * Период\n     */\n    value?: -10 | -1 | 0 | 1 | 3 | 6 | 12;\n};\n\n/**\n * Some description with `back ticks`\n */\nexport type ModelWithBackticksInDescription = {\n    /**\n     * The template `that` should be used for parsing and importing the contents of the CSV file.\n     *\n     * <br/><p>There is one placeholder currently supported:<ul>     <li><b>${x}</b> - refers to the n-th column in the CSV file, e.g. ${1}, ${2}, ...)</li></ul><p>Example of a correct JSON template:</p>\n     * <pre>\n     * [\n     * {\n     * \"resourceType\": \"Asset\",\n     * \"identifier\": {\n     * \"name\": \"${1}\",\n     * \"domain\": {\n     * \"name\": \"${2}\",\n     * \"community\": {\n     * \"name\": \"Some Community\"\n     * }\n     * }\n     * },\n     * \"attributes\" : {\n     * \"00000000-0000-0000-0000-000000003115\" : [ {\n     * \"value\" : \"${3}\"\n     * } ],\n     * \"00000000-0000-0000-0000-000000000222\" : [ {\n     * \"value\" : \"${4}\"\n     * } ]\n     * }\n     * }\n     * ]\n     * </pre>\n     */\n    template?: string;\n};\n\nexport type ModelWithOneOfAndProperties = (SimpleParameter | NonAsciiStringæøåÆøÅöôêÊ字符串) & {\n    baz: number | null;\n    qux: number;\n};\n\n/**\n * Model used to test deduplication strategy (unused)\n */\nexport type ParameterSimpleParameterUnused = string;\n\n/**\n * Model used to test deduplication strategy\n */\nexport type PostServiceWithEmptyTagResponse = string;\n\n/**\n * Model used to test deduplication strategy\n */\nexport type PostServiceWithEmptyTagResponse2 = string;\n\n/**\n * Model used to test deduplication strategy\n */\nexport type DeleteFooData = string;\n\n/**\n * Model used to test deduplication strategy\n */\nexport type DeleteFooData2 = string;\n\n/**\n * Model with restricted keyword name\n */\nexport type Import = string;\n\nexport type SchemaWithFormRestrictedKeys = {\n    description?: string;\n    'x-enum-descriptions'?: string;\n    'x-enum-varnames'?: string;\n    'x-enumNames'?: string;\n    title?: string;\n    object?: {\n        description?: string;\n        'x-enum-descriptions'?: string;\n        'x-enum-varnames'?: string;\n        'x-enumNames'?: string;\n        title?: string;\n    };\n    array?: Array<{\n        description?: string;\n        'x-enum-descriptions'?: string;\n        'x-enum-varnames'?: string;\n        'x-enumNames'?: string;\n        title?: string;\n    }>;\n};\n\n/**\n * This schema was giving PascalCase transformations a hard time\n */\nexport type IoK8sApimachineryPkgApisMetaV1DeleteOptions = {\n    /**\n     * Must be fulfilled before a deletion is carried out. If not possible, a 409 Conflict status will be returned.\n     */\n    preconditions?: IoK8sApimachineryPkgApisMetaV1Preconditions;\n};\n\n/**\n * This schema was giving PascalCase transformations a hard time\n */\nexport type IoK8sApimachineryPkgApisMetaV1Preconditions = {\n    /**\n     * Specifies the target ResourceVersion\n     */\n    resourceVersion?: string;\n    /**\n     * Specifies the target UID.\n     */\n    uid?: string;\n};\n\nexport type AdditionalPropertiesUnknownIssue = {\n    [key: string]: string | number;\n};\n\nexport type AdditionalPropertiesUnknownIssue2 = {\n    [key: string]: string | number;\n};\n\nexport type AdditionalPropertiesUnknownIssue3 = string & {\n    entries: {\n        [key: string]: AdditionalPropertiesUnknownIssue;\n    };\n};\n\nexport type AdditionalPropertiesIntegerIssue = {\n    value: number;\n    [key: string]: number;\n};\n\nexport type OneOfAllOfIssue = ((ConstValue | GenericSchemaDuplicateIssue1SystemBoolean) & _3eNum1Период) | GenericSchemaDuplicateIssue1SystemString;\n\nexport type GenericSchemaDuplicateIssue1SystemBoolean = {\n    item?: boolean;\n    error?: string | null;\n    readonly hasError?: boolean;\n    data?: {\n        [key: string]: never;\n    };\n};\n\nexport type GenericSchemaDuplicateIssue1SystemString = {\n    item?: string | null;\n    error?: string | null;\n    readonly hasError?: boolean;\n};\n\nexport type ExternalSharedModel = {\n    id: string;\n    name?: string;\n};\n\n/**\n * This is a model with one property containing a reference\n */\nexport type ModelWithReferenceWritable = {\n    prop?: ModelWithPropertiesWritable;\n};\n\n/**\n * This is a model with one property containing an array\n */\nexport type ModelWithArrayReadOnlyAndWriteOnlyWritable = {\n    prop?: Array<ModelWithReadOnlyAndWriteOnlyWritable>;\n    propWithFile?: Array<Blob | File>;\n    propWithNumber?: Array<number>;\n};\n\n/**\n * This is a model with one nested property\n */\nexport type ModelWithPropertiesWritable = {\n    required: string;\n    requiredAndNullable: string | null;\n    string?: string;\n    number?: number;\n    boolean?: boolean;\n    reference?: ModelWithString;\n    'property with space'?: string;\n    default?: string;\n    try?: string;\n};\n\n/**\n * This is a model that contains a some patterns\n */\nexport type ModelWithPatternWritable = {\n    key: string;\n    name: string;\n    id?: string;\n    text?: string;\n    patternWithSingleQuotes?: string;\n    patternWithNewline?: string;\n    patternWithBacktick?: string;\n    patternWithUnicode?: string;\n};\n\nexport type FileWritable = {\n    /**\n     * Mime\n     */\n    mime: string;\n};\n\nexport type ModelWithReadOnlyAndWriteOnlyWritable = {\n    foo: string;\n    baz: string;\n};\n\nexport type ModelWithAnyOfConstantSizeArrayWithNSizeAndOptionsWritable = [\n    number | Import,\n    number | Import\n];\n\nexport type AdditionalPropertiesUnknownIssueWritable = {\n    [key: string]: string | number;\n};\n\nexport type OneOfAllOfIssueWritable = ((ConstValue | GenericSchemaDuplicateIssue1SystemBoolean) & _3eNum1Период) | GenericSchemaDuplicateIssue1SystemString;\n\nexport type GenericSchemaDuplicateIssue1SystemBooleanWritable = {\n    item?: boolean;\n    error?: string | null;\n    data?: {\n        [key: string]: never;\n    };\n};\n\nexport type GenericSchemaDuplicateIssue1SystemStringWritable = {\n    item?: string | null;\n    error?: string | null;\n};\n\n/**\n * This is a reusable parameter\n */\nexport type SimpleParameter = string;\n\n/**\n * Parameter with illegal characters\n */\nexport type XFooBar = ModelWithString;\n\n/**\n * A reusable request body\n */\nexport type SimpleRequestBody = ModelWithString;\n\n/**\n * A reusable request body\n */\nexport type SimpleFormData = ModelWithString;\n\nexport type ExportData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no+tag';\n};\n\nexport type PatchApiVbyApiVersionNoTagData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no+tag';\n};\n\nexport type PatchApiVbyApiVersionNoTagResponses = {\n    /**\n     * OK\n     */\n    default: unknown;\n};\n\nexport type ImportData = {\n    body: ModelWithReadOnlyAndWriteOnlyWritable | ModelWithArrayReadOnlyAndWriteOnlyWritable;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no+tag';\n};\n\nexport type ImportResponses = {\n    /**\n     * Success\n     */\n    200: ModelFromZendesk;\n    /**\n     * Default success response\n     */\n    default: ModelWithReadOnlyAndWriteOnly;\n};\n\nexport type ImportResponse = ImportResponses[keyof ImportResponses];\n\nexport type FooWowData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no+tag';\n};\n\nexport type FooWowResponses = {\n    /**\n     * OK\n     */\n    default: unknown;\n};\n\nexport type ApiVVersionODataControllerCountData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple/$count';\n};\n\nexport type ApiVVersionODataControllerCountResponses = {\n    /**\n     * Success\n     */\n    200: ModelFromZendesk;\n};\n\nexport type ApiVVersionODataControllerCountResponse = ApiVVersionODataControllerCountResponses[keyof ApiVVersionODataControllerCountResponses];\n\nexport type GetApiVbyApiVersionSimpleOperationData = {\n    body?: never;\n    path: {\n        /**\n         * foo in method\n         */\n        foo_param: string;\n    };\n    query?: never;\n    url: '/api/v{api-version}/simple:operation';\n};\n\nexport type GetApiVbyApiVersionSimpleOperationErrors = {\n    /**\n     * Default error response\n     */\n    default: ModelWithBoolean;\n};\n\nexport type GetApiVbyApiVersionSimpleOperationError = GetApiVbyApiVersionSimpleOperationErrors[keyof GetApiVbyApiVersionSimpleOperationErrors];\n\nexport type GetApiVbyApiVersionSimpleOperationResponses = {\n    /**\n     * Response is a simple number\n     */\n    200: number;\n};\n\nexport type GetApiVbyApiVersionSimpleOperationResponse = GetApiVbyApiVersionSimpleOperationResponses[keyof GetApiVbyApiVersionSimpleOperationResponses];\n\nexport type DeleteCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type GetCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type HeadCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type OptionsCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type PatchCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type PostCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type PutCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type DeleteFooData3 = {\n    body?: never;\n    headers: {\n        /**\n         * Parameter with illegal characters\n         */\n        'x-Foo-Bar': ModelWithString;\n    };\n    path: {\n        /**\n         * foo in method\n         */\n        foo_param: string;\n        /**\n         * bar in method\n         */\n        BarParam: string;\n    };\n    query?: never;\n    url: '/api/v{api-version}/foo/{foo_param}/bar/{BarParam}';\n};\n\nexport type CallWithDescriptionsData = {\n    body?: never;\n    path?: never;\n    query?: {\n        /**\n         * Testing multiline comments in string: First line\n         * Second line\n         *\n         * Fourth line\n         */\n        parameterWithBreaks?: string;\n        /**\n         * Testing backticks in string: `backticks` and ```multiple backticks``` should work\n         */\n        parameterWithBackticks?: string;\n        /**\n         * Testing slashes in string: \\backwards\\\\\\ and /forwards/// should work\n         */\n        parameterWithSlashes?: string;\n        /**\n         * Testing expression placeholders in string: ${expression} should work\n         */\n        parameterWithExpressionPlaceholders?: string;\n        /**\n         * Testing quotes in string: 'single quote''' and \"double quotes\"\"\" should work\n         */\n        parameterWithQuotes?: string;\n        /**\n         * Testing reserved characters in string: * inline * and ** inline ** should work\n         */\n        parameterWithReservedCharacters?: string;\n    };\n    url: '/api/v{api-version}/descriptions';\n};\n\nexport type DeprecatedCallData = {\n    body?: never;\n    headers: {\n        /**\n         * This parameter is deprecated\n         *\n         * @deprecated\n         */\n        parameter: DeprecatedModel | null;\n    };\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/parameters/deprecated';\n};\n\nexport type CallWithParametersData = {\n    /**\n     * This is the parameter that goes into the body\n     */\n    body: {\n        [key: string]: unknown;\n    } | null;\n    headers: {\n        /**\n         * This is the parameter that goes into the header\n         */\n        parameterHeader: string | null;\n    };\n    path: {\n        /**\n         * This is the parameter that goes into the path\n         */\n        parameterPath: string | null;\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string | null;\n    };\n    query: {\n        foo_ref_enum?: ModelWithNestedArrayEnumsDataFoo;\n        foo_all_of_enum: ModelWithNestedArrayEnumsDataFoo;\n        /**\n         * This is the parameter that goes into the query params\n         */\n        cursor: string | null;\n    };\n    url: '/api/v{api-version}/parameters/{parameterPath}';\n};\n\nexport type CallWithWeirdParameterNamesData = {\n    /**\n     * This is the parameter that goes into the body\n     */\n    body: ModelWithString | null;\n    headers: {\n        /**\n         * This is the parameter that goes into the request header\n         */\n        'parameter.header': string | null;\n    };\n    path: {\n        /**\n         * This is the parameter that goes into the path\n         */\n        'parameter.path.1'?: string;\n        /**\n         * This is the parameter that goes into the path\n         */\n        'parameter-path-2'?: string;\n        /**\n         * This is the parameter that goes into the path\n         */\n        'PARAMETER-PATH-3'?: string;\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string | null;\n    };\n    query: {\n        /**\n         * This is the parameter with a reserved keyword\n         */\n        default?: string;\n        /**\n         * This is the parameter that goes into the request query params\n         */\n        'parameter-query': string | null;\n    };\n    url: '/api/v{api-version}/parameters/{parameter.path.1}/{parameter-path-2}/{PARAMETER-PATH-3}';\n};\n\nexport type GetCallWithOptionalParamData = {\n    /**\n     * This is a required parameter\n     */\n    body: ModelWithOneOfEnum;\n    path?: never;\n    query?: {\n        /**\n         * This is an optional parameter\n         */\n        page?: number;\n    };\n    url: '/api/v{api-version}/parameters';\n};\n\nexport type PostCallWithOptionalParamData = {\n    /**\n     * This is an optional parameter\n     */\n    body?: {\n        offset?: number | null;\n    };\n    path?: never;\n    query: {\n        /**\n         * This is a required parameter\n         */\n        parameter: Pageable;\n    };\n    url: '/api/v{api-version}/parameters';\n};\n\nexport type PostCallWithOptionalParamResponses = {\n    /**\n     * Response is a simple number\n     */\n    200: number;\n    /**\n     * Success\n     */\n    204: void;\n};\n\nexport type PostCallWithOptionalParamResponse = PostCallWithOptionalParamResponses[keyof PostCallWithOptionalParamResponses];\n\nexport type PostApiVbyApiVersionRequestBodyData = {\n    /**\n     * A reusable request body\n     */\n    body?: SimpleRequestBody;\n    path?: never;\n    query?: {\n        /**\n         * This is a reusable parameter\n         */\n        parameter?: string;\n    };\n    url: '/api/v{api-version}/requestBody';\n};\n\nexport type PostApiVbyApiVersionFormDataData = {\n    /**\n     * A reusable request body\n     */\n    body?: SimpleFormData;\n    path?: never;\n    query?: {\n        /**\n         * This is a reusable parameter\n         */\n        parameter?: string;\n    };\n    url: '/api/v{api-version}/formData';\n};\n\nexport type CallWithDefaultParametersData = {\n    body?: never;\n    path?: never;\n    query?: {\n        /**\n         * This is a simple string with default value\n         */\n        parameterString?: string | null;\n        /**\n         * This is a simple number with default value\n         */\n        parameterNumber?: number | null;\n        /**\n         * This is a simple boolean with default value\n         */\n        parameterBoolean?: boolean | null;\n        /**\n         * This is a simple enum with default value\n         */\n        parameterEnum?: 'Success' | 'Warning' | 'Error';\n        /**\n         * This is a simple model with default value\n         */\n        parameterModel?: ModelWithString | null;\n    };\n    url: '/api/v{api-version}/defaults';\n};\n\nexport type CallWithDefaultOptionalParametersData = {\n    body?: never;\n    path?: never;\n    query?: {\n        /**\n         * This is a simple string that is optional with default value\n         */\n        parameterString?: string;\n        /**\n         * This is a simple number that is optional with default value\n         */\n        parameterNumber?: number;\n        /**\n         * This is a simple boolean that is optional with default value\n         */\n        parameterBoolean?: boolean;\n        /**\n         * This is a simple enum that is optional with default value\n         */\n        parameterEnum?: 'Success' | 'Warning' | 'Error';\n        /**\n         * This is a simple model that is optional with default value\n         */\n        parameterModel?: ModelWithString;\n    };\n    url: '/api/v{api-version}/defaults';\n};\n\nexport type CallToTestOrderOfParamsData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * This is a optional string with default\n         */\n        parameterOptionalStringWithDefault?: string;\n        /**\n         * This is a optional string with empty default\n         */\n        parameterOptionalStringWithEmptyDefault?: string;\n        /**\n         * This is a optional string with no default\n         */\n        parameterOptionalStringWithNoDefault?: string;\n        /**\n         * This is a string with default\n         */\n        parameterStringWithDefault: string;\n        /**\n         * This is a string with empty default\n         */\n        parameterStringWithEmptyDefault: string;\n        /**\n         * This is a string with no default\n         */\n        parameterStringWithNoDefault: string;\n        /**\n         * This is a string that can be null with no default\n         */\n        parameterStringNullableWithNoDefault?: string | null;\n        /**\n         * This is a string that can be null with default\n         */\n        parameterStringNullableWithDefault?: string | null;\n    };\n    url: '/api/v{api-version}/defaults';\n};\n\nexport type DuplicateNameData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/duplicate';\n};\n\nexport type DuplicateName2Data = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/duplicate';\n};\n\nexport type DuplicateName3Data = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/duplicate';\n};\n\nexport type DuplicateName4Data = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/duplicate';\n};\n\nexport type CallWithNoContentResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no-content';\n};\n\nexport type CallWithNoContentResponseResponses = {\n    /**\n     * Success\n     */\n    204: void;\n};\n\nexport type CallWithNoContentResponseResponse = CallWithNoContentResponseResponses[keyof CallWithNoContentResponseResponses];\n\nexport type CallWithResponseAndNoContentResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multiple-tags/response-and-no-content';\n};\n\nexport type CallWithResponseAndNoContentResponseResponses = {\n    /**\n     * Response is a simple number\n     */\n    200: number;\n    /**\n     * Success\n     */\n    204: void;\n};\n\nexport type CallWithResponseAndNoContentResponseResponse = CallWithResponseAndNoContentResponseResponses[keyof CallWithResponseAndNoContentResponseResponses];\n\nexport type DummyAData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multiple-tags/a';\n};\n\nexport type DummyAResponses = {\n    200: _400;\n};\n\nexport type DummyAResponse = DummyAResponses[keyof DummyAResponses];\n\nexport type DummyBData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multiple-tags/b';\n};\n\nexport type DummyBResponses = {\n    /**\n     * Success\n     */\n    204: void;\n};\n\nexport type DummyBResponse = DummyBResponses[keyof DummyBResponses];\n\nexport type CallWithResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/response';\n};\n\nexport type CallWithResponseResponses = {\n    default: Import;\n};\n\nexport type CallWithResponseResponse = CallWithResponseResponses[keyof CallWithResponseResponses];\n\nexport type CallWithDuplicateResponsesData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/response';\n};\n\nexport type CallWithDuplicateResponsesErrors = {\n    /**\n     * Message for 500 error\n     */\n    500: ModelWithStringError;\n    /**\n     * Message for 501 error\n     */\n    501: ModelWithStringError;\n    /**\n     * Message for 502 error\n     */\n    502: ModelWithStringError;\n    /**\n     * Message for 4XX errors\n     */\n    '4XX': DictionaryWithArray;\n    /**\n     * Default error response\n     */\n    default: ModelWithBoolean;\n};\n\nexport type CallWithDuplicateResponsesError = CallWithDuplicateResponsesErrors[keyof CallWithDuplicateResponsesErrors];\n\nexport type CallWithDuplicateResponsesResponses = {\n    /**\n     * Message for 200 response\n     */\n    200: ModelWithBoolean & ModelWithInteger;\n    /**\n     * Message for 201 response\n     */\n    201: ModelWithString;\n    /**\n     * Message for 202 response\n     */\n    202: ModelWithString;\n};\n\nexport type CallWithDuplicateResponsesResponse = CallWithDuplicateResponsesResponses[keyof CallWithDuplicateResponsesResponses];\n\nexport type CallWithResponsesData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/response';\n};\n\nexport type CallWithResponsesErrors = {\n    /**\n     * Message for 500 error\n     */\n    500: ModelWithStringError;\n    /**\n     * Message for 501 error\n     */\n    501: ModelWithStringError;\n    /**\n     * Message for 502 error\n     */\n    502: ModelWithStringError;\n    /**\n     * Message for default response\n     */\n    default: ModelWithStringError;\n};\n\nexport type CallWithResponsesError = CallWithResponsesErrors[keyof CallWithResponsesErrors];\n\nexport type CallWithResponsesResponses = {\n    /**\n     * Message for 200 response\n     */\n    200: {\n        readonly '@namespace.string'?: string;\n        readonly '@namespace.integer'?: number;\n        readonly value?: Array<ModelWithString>;\n    };\n    /**\n     * Message for 201 response\n     */\n    201: ModelThatExtends;\n    /**\n     * Message for 202 response\n     */\n    202: ModelThatExtendsExtends;\n};\n\nexport type CallWithResponsesResponse = CallWithResponsesResponses[keyof CallWithResponsesResponses];\n\nexport type CollectionFormatData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * This is an array parameter that is sent as csv format (comma-separated values)\n         */\n        parameterArrayCSV: Array<string> | null;\n        /**\n         * This is an array parameter that is sent as ssv format (space-separated values)\n         */\n        parameterArraySSV: Array<string> | null;\n        /**\n         * This is an array parameter that is sent as tsv format (tab-separated values)\n         */\n        parameterArrayTSV: Array<string> | null;\n        /**\n         * This is an array parameter that is sent as pipes format (pipe-separated values)\n         */\n        parameterArrayPipes: Array<string> | null;\n        /**\n         * This is an array parameter that is sent as multi format (multiple parameter instances)\n         */\n        parameterArrayMulti: Array<string> | null;\n    };\n    url: '/api/v{api-version}/collectionFormat';\n};\n\nexport type TypesData = {\n    body?: never;\n    path?: {\n        /**\n         * This is a number parameter\n         */\n        id?: number;\n    };\n    query: {\n        /**\n         * This is a number parameter\n         */\n        parameterNumber: number;\n        /**\n         * This is a string parameter\n         */\n        parameterString: string | null;\n        /**\n         * This is a boolean parameter\n         */\n        parameterBoolean: boolean | null;\n        /**\n         * This is an object parameter\n         */\n        parameterObject: {\n            [key: string]: unknown;\n        } | null;\n        /**\n         * This is an array parameter\n         */\n        parameterArray: Array<string> | null;\n        /**\n         * This is a dictionary parameter\n         */\n        parameterDictionary: {\n            [key: string]: unknown;\n        } | null;\n        /**\n         * This is an enum parameter\n         */\n        parameterEnum: 'Success' | 'Warning' | 'Error' | null;\n    };\n    url: '/api/v{api-version}/types';\n};\n\nexport type TypesResponses = {\n    /**\n     * Response is a simple number\n     */\n    200: number;\n    /**\n     * Response is a simple string\n     */\n    201: string;\n    /**\n     * Response is a simple boolean\n     */\n    202: boolean;\n    /**\n     * Response is a simple object\n     */\n    203: {\n        [key: string]: unknown;\n    };\n};\n\nexport type TypesResponse = TypesResponses[keyof TypesResponses];\n\nexport type UploadFileData = {\n    body: Blob | File;\n    path: {\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string | null;\n    };\n    query?: never;\n    url: '/api/v{api-version}/upload';\n};\n\nexport type UploadFileResponses = {\n    200: boolean;\n};\n\nexport type UploadFileResponse = UploadFileResponses[keyof UploadFileResponses];\n\nexport type FileResponseData = {\n    body?: never;\n    path: {\n        id: string;\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string;\n    };\n    query?: never;\n    url: '/api/v{api-version}/file/{id}';\n};\n\nexport type FileResponseResponses = {\n    /**\n     * Success\n     */\n    200: Blob | File;\n};\n\nexport type FileResponseResponse = FileResponseResponses[keyof FileResponseResponses];\n\nexport type ComplexTypesData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * Parameter containing object\n         */\n        parameterObject: {\n            first?: {\n                second?: {\n                    third?: string;\n                };\n            };\n        };\n        /**\n         * Parameter containing reference\n         */\n        parameterReference: ModelWithString;\n    };\n    url: '/api/v{api-version}/complex';\n};\n\nexport type ComplexTypesErrors = {\n    /**\n     * 400 `server` error\n     */\n    400: unknown;\n    /**\n     * 500 server error\n     */\n    500: unknown;\n};\n\nexport type ComplexTypesResponses = {\n    /**\n     * Successful response\n     */\n    200: Array<ModelWithString>;\n};\n\nexport type ComplexTypesResponse = ComplexTypesResponses[keyof ComplexTypesResponses];\n\nexport type MultipartResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multipart';\n};\n\nexport type MultipartResponseResponses = {\n    /**\n     * OK\n     */\n    200: {\n        file?: Blob | File;\n        metadata?: {\n            foo?: string;\n            bar?: string;\n        };\n    };\n};\n\nexport type MultipartResponseResponse = MultipartResponseResponses[keyof MultipartResponseResponses];\n\nexport type MultipartRequestData = {\n    body?: {\n        content?: Blob | File;\n        data?: ModelWithString | null;\n    };\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multipart';\n};\n\nexport type ComplexParamsData = {\n    body?: {\n        readonly key: string | null;\n        name: string | null;\n        enabled?: boolean;\n        type: 'Monkey' | 'Horse' | 'Bird';\n        listOfModels?: Array<ModelWithString> | null;\n        listOfStrings?: Array<string> | null;\n        parameters: ModelWithString | ModelWithEnum | ModelWithArray | ModelWithDictionary;\n        readonly user?: {\n            readonly id?: number;\n            readonly name?: string | null;\n        };\n    };\n    path: {\n        id: number;\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string;\n    };\n    query?: never;\n    url: '/api/v{api-version}/complex/{id}';\n};\n\nexport type ComplexParamsResponses = {\n    /**\n     * Success\n     */\n    200: ModelWithString;\n};\n\nexport type ComplexParamsResponse = ComplexParamsResponses[keyof ComplexParamsResponses];\n\nexport type CallWithResultFromHeaderData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/header';\n};\n\nexport type CallWithResultFromHeaderErrors = {\n    /**\n     * 400 server error\n     */\n    400: unknown;\n    /**\n     * 500 server error\n     */\n    500: unknown;\n};\n\nexport type CallWithResultFromHeaderResponses = {\n    /**\n     * Successful response\n     */\n    200: unknown;\n};\n\nexport type TestErrorCodeData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * Status code to return\n         */\n        status: number;\n    };\n    url: '/api/v{api-version}/error';\n};\n\nexport type TestErrorCodeErrors = {\n    /**\n     * Custom message: Internal Server Error\n     */\n    500: unknown;\n    /**\n     * Custom message: Not Implemented\n     */\n    501: unknown;\n    /**\n     * Custom message: Bad Gateway\n     */\n    502: unknown;\n    /**\n     * Custom message: Service Unavailable\n     */\n    503: unknown;\n};\n\nexport type TestErrorCodeResponses = {\n    /**\n     * Custom message: Successful response\n     */\n    200: unknown;\n};\n\nexport type NonAsciiæøåÆøÅöôêÊ字符串Data = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * Dummy input param\n         */\n        nonAsciiParamæøåÆØÅöôêÊ: number;\n    };\n    url: '/api/v{api-version}/non-ascii-æøåÆØÅöôêÊ字符串';\n};\n\nexport type NonAsciiæøåÆøÅöôêÊ字符串Responses = {\n    /**\n     * Successful response\n     */\n    200: Array<NonAsciiStringæøåÆøÅöôêÊ字符串>;\n};\n\nexport type NonAsciiæøåÆøÅöôêÊ字符串Response = NonAsciiæøåÆøÅöôêÊ字符串Responses[keyof NonAsciiæøåÆøÅöôêÊ字符串Responses];\n\nexport type PutWithFormUrlEncodedData = {\n    body: ArrayWithStrings;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/non-ascii-æøåÆØÅöôêÊ字符串';\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-nuxt/sdk-client-required/client/client.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport { useAsyncData, useFetch, useLazyAsyncData, useLazyFetch } from 'nuxt/app';\nimport { reactive, ref, toValue, watch } from 'vue';\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 } from './types.gen';\nimport {\n  buildUrl,\n  createConfig,\n  executeFetchFn,\n  mergeConfigs,\n  mergeHeaders,\n  mergeInterceptors,\n  serializeBody,\n  setAuthParams,\n  unwrapRefs,\n} from './utils.gen';\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 beforeRequest = async (options: RequestOptions) => {\n    const opts = {\n      ..._config,\n      ...options,\n      $fetch: options.$fetch ?? _config.$fetch ?? $fetch,\n      headers: mergeHeaders(_config.headers, options.headers),\n      onRequest: mergeInterceptors(_config.onRequest, options.onRequest),\n      onResponse: mergeInterceptors(_config.onResponse, options.onResponse),\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    const url = buildUrl(opts);\n\n    return { opts, url };\n  };\n\n  const request: Client['request'] = ({ asyncDataOptions, composable = '$fetch', ...options }) => {\n    const key = options.key;\n    const opts = {\n      ..._config,\n      ...options,\n      $fetch: options.$fetch ?? _config.$fetch ?? $fetch,\n      headers: mergeHeaders(_config.headers, options.headers),\n      onRequest: mergeInterceptors(_config.onRequest, options.onRequest),\n      onResponse: mergeInterceptors(_config.onResponse, options.onResponse),\n    };\n\n    const { requestValidator, responseTransformer, responseValidator, security } = opts;\n    if (requestValidator || security) {\n      // auth must happen in interceptors otherwise we'd need to require\n      // asyncContext enabled\n      // https://nuxt.com/docs/guide/going-further/experimental-features#asynccontext\n      opts.onRequest = [\n        async ({ options }) => {\n          if (security) {\n            await setAuthParams({\n              auth: opts.auth,\n              headers: options.headers,\n              query: options.query,\n              security,\n            });\n          }\n\n          if (requestValidator) {\n            await requestValidator({\n              ...options,\n              // @ts-expect-error\n              body: options.rawBody,\n            });\n          }\n        },\n        ...opts.onRequest,\n      ];\n    }\n\n    if (responseTransformer || responseValidator) {\n      opts.onResponse = [\n        ...opts.onResponse,\n        async ({ options, response }) => {\n          if (options.responseType && options.responseType !== 'json') {\n            return;\n          }\n\n          if (!response.ok) {\n            return;\n          }\n\n          if (responseValidator) {\n            await responseValidator(response._data);\n          }\n\n          if (responseTransformer) {\n            response._data = await responseTransformer(response._data);\n          }\n        },\n      ];\n    }\n\n    // remove Content-Type header if body is empty to avoid sending invalid requests\n    if (opts.body === undefined || opts.body === '') {\n      opts.headers.delete('Content-Type');\n    }\n\n    const fetchFn = opts.$fetch;\n\n    if (composable === '$fetch') {\n      return executeFetchFn(\n        // @ts-expect-error\n        opts,\n        fetchFn,\n      );\n    }\n\n    if (composable === 'useFetch' || composable === 'useLazyFetch') {\n      opts.rawBody = opts.body;\n      const bodyParams = reactive({\n        body: opts.body,\n        bodySerializer: opts.bodySerializer,\n      });\n      const body = ref(serializeBody({ ...opts, body: toValue(opts.body) }));\n      opts.body = body;\n      watch(bodyParams, (changed) => {\n        body.value = serializeBody(changed);\n      });\n      return composable === 'useLazyFetch'\n        ? useLazyFetch(() => buildUrl(opts), { ...opts, ...asyncDataOptions })\n        : useFetch(() => buildUrl(opts), { ...opts, ...asyncDataOptions });\n    }\n\n    const handler: any = () =>\n      executeFetchFn(\n        // @ts-expect-error\n        opts,\n        fetchFn,\n      );\n\n    if (composable === 'useAsyncData') {\n      return key\n        ? useAsyncData(key, handler, asyncDataOptions)\n        : useAsyncData(handler, asyncDataOptions);\n    }\n\n    if (composable === 'useLazyAsyncData') {\n      return key\n        ? useLazyAsyncData(key, handler, asyncDataOptions)\n        : useLazyAsyncData(handler, asyncDataOptions);\n    }\n\n    return undefined as any;\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      ...unwrapRefs(opts),\n      body: opts.body as BodyInit | null | undefined,\n      method,\n      onRequest: undefined,\n      serializedBody: getValidRequestBody(opts) as BodyInit | null | undefined,\n      signal: unwrapRefs(opts.signal) as AbortSignal,\n      url,\n    });\n  };\n\n  const _buildUrl: Client['buildUrl'] = (options) =>\n    buildUrl({ ..._config, ...options } as typeof 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    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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-nuxt/sdk-client-required/client/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type { Auth } from '../core/auth.gen';\nexport type { QuerySerializerOptions } from '../core/bodySerializer.gen';\nexport {\n  formDataBodySerializer,\n  jsonBodySerializer,\n  urlSearchParamsBodySerializer,\n} from '../core/bodySerializer.gen';\nexport { buildClientParams } from '../core/params.gen';\nexport { serializeQueryKeyValue } from '../core/queryKeySerializer.gen';\nexport { createClient } from './client.gen';\nexport type {\n  Client,\n  ClientOptions,\n  Composable,\n  Config,\n  CreateClientConfig,\n  Options,\n  RequestOptions,\n  RequestResult,\n  TDataShape,\n} from './types.gen';\nexport { createConfig } from './utils.gen';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-nuxt/sdk-client-required/client/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type {\n  AsyncDataOptions,\n  useAsyncData,\n  useFetch,\n  UseFetchOptions,\n  useLazyAsyncData,\n  useLazyFetch,\n} from 'nuxt/app';\nimport type { Ref } from 'vue';\n\nimport type { Auth } from '../core/auth.gen';\nimport type { QuerySerializerOptions } from '../core/bodySerializer.gen';\nimport type {\n  ServerSentEventsOptions,\n  ServerSentEventsResult,\n} from '../core/serverSentEvents.gen';\nimport type { Client as CoreClient, Config as CoreConfig } from '../core/types.gen';\n\nexport type ArraySeparatorStyle = ArrayStyle | MatrixStyle;\ntype ArrayStyle = 'form' | 'spaceDelimited' | 'pipeDelimited';\ntype MatrixStyle = 'label' | 'matrix' | 'simple';\nexport type ObjectSeparatorStyle = ObjectStyle | MatrixStyle;\ntype ObjectStyle = 'form' | 'deepObject';\n\nexport type QuerySerializer = (query: Parameters<Client['buildUrl']>[0]['query']) => string;\n\ntype WithRefs<TData> = {\n  [K in keyof TData]: NonNullable<TData[K]> extends object\n    ? WithRefs<NonNullable<TData[K]>> | Ref<NonNullable<TData[K]>> | Extract<TData[K], null>\n    : NonNullable<TData[K]> | Ref<NonNullable<TData[K]>> | Extract<TData[K], null>;\n};\n\n// copied from Nuxt\nexport type KeysOf<T> = Array<T extends T ? (keyof T extends string ? keyof T : never) : never>;\n\nexport interface Config<T extends ClientOptions = ClientOptions>\n  extends\n    Omit<FetchOptions<unknown>, 'baseURL' | 'body' | 'headers' | 'method' | 'query'>,\n    WithRefs<Pick<FetchOptions<unknown>, 'query'>>,\n    Omit<CoreConfig, 'querySerializer'> {\n  /**\n   * Base URL for all requests made by this client.\n   */\n  baseURL?: T['baseURL'];\n  /**\n   * A function for serializing request query parameters. By default, arrays\n   * will be exploded in form style, objects will be exploded in deepObject\n   * style, and reserved characters are percent-encoded.\n   *\n   * {@link https://swagger.io/docs/specification/serialization/#query View examples}\n   */\n  querySerializer?: QuerySerializer | QuerySerializerOptions;\n}\n\nexport interface RequestOptions<\n  TComposable extends Composable = '$fetch',\n  ResT = unknown,\n  DefaultT = undefined,\n  Url extends string = string,\n>\n  extends\n    Config,\n    WithRefs<{\n      path?: FetchOptions<unknown>['query'];\n      query?: FetchOptions<unknown>['query'];\n    }>,\n    Pick<\n      ServerSentEventsOptions<ResT>,\n      | 'onSseError'\n      | 'onSseEvent'\n      | 'sseDefaultRetryDelay'\n      | 'sseMaxRetryAttempts'\n      | 'sseMaxRetryDelay'\n    > {\n  asyncDataOptions?: AsyncDataOptions<ResT, ResT, KeysOf<ResT>, DefaultT>;\n  /**\n   * Any body that you want to add to your request.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/fetch#body}\n   */\n  body?: NonNullable<unknown> | Ref<NonNullable<unknown>> | null;\n  composable?: TComposable;\n  key?: string;\n  rawBody?: NonNullable<unknown> | Ref<NonNullable<unknown>> | null;\n  /**\n   * Security mechanism(s) to use for the request.\n   */\n  security?: ReadonlyArray<Auth>;\n  url: Url;\n}\n\nexport type RequestResult<\n  TComposable extends Composable,\n  ResT,\n  TError,\n> = TComposable extends '$fetch'\n  ? ReturnType<typeof $fetch<ResT>>\n  : TComposable extends 'useAsyncData'\n    ? ReturnType<typeof useAsyncData<ResT | null, TError>>\n    : TComposable extends 'useFetch'\n      ? ReturnType<typeof useFetch<ResT | null, TError>>\n      : TComposable extends 'useLazyAsyncData'\n        ? ReturnType<typeof useLazyAsyncData<ResT | null, TError>>\n        : TComposable extends 'useLazyFetch'\n          ? ReturnType<typeof useLazyFetch<ResT | null, TError>>\n          : never;\n\nexport interface ClientOptions {\n  baseURL?: string;\n}\n\ntype MethodFn = <\n  TComposable extends Composable = '$fetch',\n  ResT = unknown,\n  TError = unknown,\n  DefaultT = undefined,\n>(\n  options: Omit<RequestOptions<TComposable, ResT, DefaultT>, 'method'>,\n) => RequestResult<TComposable, ResT, TError>;\n\ntype SseFn = <\n  TComposable extends Composable = '$fetch',\n  ResT = unknown,\n  TError = unknown,\n  DefaultT = undefined,\n>(\n  options: Omit<RequestOptions<TComposable, ResT, DefaultT>, 'method'>,\n) => Promise<ServerSentEventsResult<RequestResult<TComposable, ResT, TError>>>;\n\ntype RequestFn = <\n  TComposable extends Composable = '$fetch',\n  ResT = unknown,\n  TError = unknown,\n  DefaultT = undefined,\n>(\n  options: Omit<RequestOptions<TComposable, ResT, DefaultT>, 'method'> &\n    Pick<Required<RequestOptions<TComposable, ResT, DefaultT>>, 'method'>,\n) => RequestResult<TComposable, ResT, TError>;\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 = ClientOptions> = (\n  override?: Config<ClientOptions & T>,\n) => Config<Required<ClientOptions> & T>;\n\nexport interface TDataShape {\n  body?: unknown;\n  headers?: unknown;\n  path?: FetchOptions<unknown>['query'];\n  query?: FetchOptions<unknown>['query'];\n  url: string;\n}\n\nexport type BuildUrlOptions<\n  TData extends Omit<TDataShape, 'headers'> = Omit<TDataShape, 'headers'>,\n> = Pick<WithRefs<TData>, 'path' | 'query'> &\n  Pick<TData, 'url'> &\n  Pick<Options<'$fetch', TData>, 'baseURL' | 'querySerializer'>;\n\ntype BuildUrlFn = <TData extends Omit<TDataShape, 'headers'>>(\n  options: BuildUrlOptions<TData>,\n) => string;\n\nexport type Client = CoreClient<RequestFn, Config, MethodFn, BuildUrlFn, SseFn>;\n\ntype OmitKeys<T, K> = Pick<T, Exclude<keyof T, K>>;\n\nexport type Options<\n  TComposable extends Composable = '$fetch',\n  TData extends TDataShape = TDataShape,\n  ResT = unknown,\n  DefaultT = undefined,\n> = OmitKeys<RequestOptions<TComposable, ResT, DefaultT>, 'body' | 'path' | 'query' | 'url'> &\n  ([TData] extends [never] ? unknown : WithRefs<Omit<TData, 'url'>>);\n\ntype FetchOptions<TData> = Omit<UseFetchOptions<TData, TData>, keyof AsyncDataOptions<TData>>;\n\nexport type Composable =\n  | '$fetch'\n  | 'useAsyncData'\n  | 'useFetch'\n  | 'useLazyAsyncData'\n  | 'useLazyFetch';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-nuxt/sdk-client-required/client/utils.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { ComputedRef, Ref } from 'vue';\nimport { isRef, toValue, unref } from 'vue';\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 type {\n  ArraySeparatorStyle,\n  BuildUrlOptions,\n  Client,\n  ClientOptions,\n  Config,\n  QuerySerializer,\n  RequestOptions,\n} from './types.gen';\n\ntype PathSerializer = Pick<Required<BuildUrlOptions>, 'path' | 'url'>;\n\nconst PATH_PARAM_RE = /\\{[^{}]+\\}/g;\n\ntype MaybeArray<T> = T | T[];\n\nconst 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 = toValue((toValue(path) as Record<string, unknown> | undefined)?.[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 createQuerySerializer = <T = unknown>({\n  parameters = {},\n  ...args\n}: QuerySerializerOptions = {}) => {\n  const querySerializer = (queryParams: T) => {\n    const search: string[] = [];\n    const qParams = toValue(queryParams);\n    if (qParams && typeof qParams === 'object') {\n      for (const name in qParams) {\n        const value = toValue(qParams[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\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    (toValue(options.query) as Record<string, unknown> | undefined)?.[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    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        const queryValue = toValue(options.query) as Record<string, unknown> | undefined;\n        if (queryValue) {\n          queryValue[name] = token;\n        }\n        break;\n      }\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  const url = 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  return url;\n};\n\nexport const getUrl = ({\n  baseUrl,\n  path,\n  query,\n  querySerializer,\n  url: _url,\n}: Pick<BuildUrlOptions, 'path' | 'query' | 'url'> & {\n  baseUrl?: string;\n  querySerializer: QuerySerializer;\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 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 || typeof header !== 'object') {\n      continue;\n    }\n\n    let h: unknown = header;\n    if (isRef(h)) {\n      h = unref(h);\n    }\n\n    const iterator =\n      h instanceof Headers ? headersEntries(h) : Object.entries(h as Record<string, unknown>);\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, unwrapRefs(v) as string);\n        }\n      } else if (value !== undefined) {\n        const v = unwrapRefs(value);\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(key, typeof v === 'object' ? JSON.stringify(v) : (v as string));\n      }\n    }\n  }\n  return mergedHeaders;\n};\n\nexport const mergeInterceptors = <T>(...args: Array<MaybeArray<T>>): Array<T> =>\n  args.reduce<Array<T>>((acc, item) => {\n    if (typeof item === 'function') {\n      acc.push(item);\n    } else if (Array.isArray(item)) {\n      return acc.concat(item);\n    }\n    return acc;\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  querySerializer: defaultQuerySerializer,\n  ...override,\n});\n\ntype UnwrapRefs<T> =\n  T extends Ref<infer V>\n    ? V\n    : T extends ComputedRef<infer V>\n      ? V\n      : T extends Record<string, unknown> // this doesn't handle functions well\n        ? { [K in keyof T]: UnwrapRefs<T[K]> }\n        : T;\n\nexport const unwrapRefs = <T>(value: T): UnwrapRefs<T> => {\n  if (value === null || typeof value !== 'object' || value instanceof Headers) {\n    return (isRef(value) ? unref(value) : value) as UnwrapRefs<T>;\n  }\n\n  if (\n    value instanceof Blob ||\n    value instanceof FormData ||\n    value instanceof ReadableStream ||\n    value instanceof AbortSignal\n  ) {\n    return value as UnwrapRefs<T>;\n  }\n\n  if (Array.isArray(value)) {\n    return value.map((item) => unwrapRefs(item)) as UnwrapRefs<T>;\n  }\n\n  if (isRef(value)) {\n    return unwrapRefs(unref(value) as T);\n  }\n\n  // unwrap into new object to avoid modifying the source\n  const result: Record<string, unknown> = {};\n  for (const key in value) {\n    result[key] = unwrapRefs(value[key] as T);\n  }\n  return result as UnwrapRefs<T>;\n};\n\nexport const serializeBody = (\n  opts: Pick<Parameters<Client['request']>[0], 'body' | 'bodySerializer'>,\n) => {\n  if (opts.body && opts.bodySerializer) {\n    return opts.bodySerializer(opts.body);\n  }\n  return opts.body;\n};\n\nexport const executeFetchFn = (\n  opts: Omit<Parameters<Client['request']>[0], 'composable'>,\n  fetchFn: Required<Config>['$fetch'],\n) => {\n  const unwrappedOpts = unwrapRefs(opts);\n  unwrappedOpts.rawBody = unwrappedOpts.body;\n  unwrappedOpts.body = serializeBody(unwrappedOpts);\n  return fetchFn(\n    buildUrl(opts),\n    // @ts-expect-error\n    unwrappedOpts,\n  );\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-nuxt/sdk-client-required/client.gen.ts",
    "content": "// 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: 'http://localhost:3000/base' }));\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-nuxt/sdk-client-required/core/auth.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-nuxt/sdk-client-required/core/bodySerializer.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-nuxt/sdk-client-required/core/params.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-nuxt/sdk-client-required/core/pathSerializer.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-nuxt/sdk-client-required/core/queryKeySerializer.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\n/**\n * JSON-friendly union that mirrors what Pinia Colada can hash.\n */\nexport type JsonValue =\n  | null\n  | string\n  | number\n  | boolean\n  | JsonValue[]\n  | { [key: string]: JsonValue };\n\n/**\n * Replacer that converts non-JSON values (bigint, Date, etc.) to safe substitutes.\n */\nexport const queryKeyJsonReplacer = (_key: string, value: unknown) => {\n  if (value === undefined || typeof value === 'function' || typeof value === 'symbol') {\n    return undefined;\n  }\n  if (typeof value === 'bigint') {\n    return value.toString();\n  }\n  if (value instanceof Date) {\n    return value.toISOString();\n  }\n  return value;\n};\n\n/**\n * Safely stringifies a value and parses it back into a JsonValue.\n */\nexport const stringifyToJsonValue = (input: unknown): JsonValue | undefined => {\n  try {\n    const json = JSON.stringify(input, queryKeyJsonReplacer);\n    if (json === undefined) {\n      return undefined;\n    }\n    return JSON.parse(json) as JsonValue;\n  } catch {\n    return undefined;\n  }\n};\n\n/**\n * Detects plain objects (including objects with a null prototype).\n */\nconst isPlainObject = (value: unknown): value is Record<string, unknown> => {\n  if (value === null || typeof value !== 'object') {\n    return false;\n  }\n  const prototype = Object.getPrototypeOf(value as object);\n  return prototype === Object.prototype || prototype === null;\n};\n\n/**\n * Turns URLSearchParams into a sorted JSON object for deterministic keys.\n */\nconst serializeSearchParams = (params: URLSearchParams): JsonValue => {\n  const entries = Array.from(params.entries()).sort(([a], [b]) => a.localeCompare(b));\n  const result: Record<string, JsonValue> = {};\n\n  for (const [key, value] of entries) {\n    const existing = result[key];\n    if (existing === undefined) {\n      result[key] = value;\n      continue;\n    }\n\n    if (Array.isArray(existing)) {\n      (existing as string[]).push(value);\n    } else {\n      result[key] = [existing, value];\n    }\n  }\n\n  return result;\n};\n\n/**\n * Normalizes any accepted value into a JSON-friendly shape for query keys.\n */\nexport const serializeQueryKeyValue = (value: unknown): JsonValue | undefined => {\n  if (value === null) {\n    return null;\n  }\n\n  if (typeof value === 'string' || typeof value === 'number' || typeof value === 'boolean') {\n    return value;\n  }\n\n  if (value === undefined || typeof value === 'function' || typeof value === 'symbol') {\n    return undefined;\n  }\n\n  if (typeof value === 'bigint') {\n    return value.toString();\n  }\n\n  if (value instanceof Date) {\n    return value.toISOString();\n  }\n\n  if (Array.isArray(value)) {\n    return stringifyToJsonValue(value);\n  }\n\n  if (typeof URLSearchParams !== 'undefined' && value instanceof URLSearchParams) {\n    return serializeSearchParams(value);\n  }\n\n  if (isPlainObject(value)) {\n    return stringifyToJsonValue(value);\n  }\n\n  return undefined;\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-nuxt/sdk-client-required/core/serverSentEvents.gen.ts",
    "content": "// 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 const 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            // Normalize line endings: CRLF -> LF, then CR -> LF\n            buffer = buffer.replace(/\\r\\n/g, '\\n').replace(/\\r/g, '\\n');\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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-nuxt/sdk-client-required/core/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { Auth, AuthToken } from './auth.gen';\nimport type { BodySerializer, QuerySerializer, QuerySerializerOptions } from './bodySerializer.gen';\n\nexport type HttpMethod =\n  | 'connect'\n  | 'delete'\n  | 'get'\n  | 'head'\n  | 'options'\n  | 'patch'\n  | 'post'\n  | 'put'\n  | 'trace';\n\nexport type Client<\n  RequestFn = never,\n  Config = unknown,\n  MethodFn = never,\n  BuildUrlFn = never,\n  SseFn = never,\n> = {\n  /**\n   * Returns the final request URL.\n   */\n  buildUrl: BuildUrlFn;\n  getConfig: () => Config;\n  request: RequestFn;\n  setConfig: (config: Config) => Config;\n} & {\n  [K in HttpMethod]: MethodFn;\n} & ([SseFn] extends [never] ? { sse?: never } : { sse: { [K in HttpMethod]: SseFn } });\n\nexport interface Config {\n  /**\n   * Auth token or a function returning auth token. The resolved value will be\n   * added to the request payload as defined by its `security` array.\n   */\n  auth?: ((auth: Auth) => Promise<AuthToken> | AuthToken) | AuthToken;\n  /**\n   * A function for serializing request body parameter. By default,\n   * {@link JSON.stringify()} will be used.\n   */\n  bodySerializer?: BodySerializer | null;\n  /**\n   * An object containing any HTTP headers that you want to pre-populate your\n   * `Headers` object with.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/Headers/Headers#init See more}\n   */\n  headers?:\n    | RequestInit['headers']\n    | Record<\n        string,\n        string | number | boolean | (string | number | boolean)[] | null | undefined | unknown\n      >;\n  /**\n   * The request method.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/fetch#method See more}\n   */\n  method?: Uppercase<HttpMethod>;\n  /**\n   * A function for serializing request query parameters. By default, arrays\n   * will be exploded in form style, objects will be exploded in deepObject\n   * style, and reserved characters are percent-encoded.\n   *\n   * This method will have no effect if the native `paramsSerializer()` Axios\n   * API function is used.\n   *\n   * {@link https://swagger.io/docs/specification/serialization/#query View examples}\n   */\n  querySerializer?: QuerySerializer | QuerySerializerOptions;\n  /**\n   * A function validating request data. This is useful if you want to ensure\n   * the request conforms to the desired shape, so it can be safely sent to\n   * the server.\n   */\n  requestValidator?: (data: unknown) => Promise<unknown>;\n  /**\n   * A function transforming response data before it's returned. This is useful\n   * for post-processing data, e.g. converting ISO strings into Date objects.\n   */\n  responseTransformer?: (data: unknown) => Promise<unknown>;\n  /**\n   * A function validating response data. This is useful if you want to ensure\n   * the response conforms to the desired shape, so it can be safely passed to\n   * the transformers and returned to the user.\n   */\n  responseValidator?: (data: unknown) => Promise<unknown>;\n}\n\ntype IsExactlyNeverOrNeverUndefined<T> = [T] extends [never]\n  ? true\n  : [T] extends [never | undefined]\n    ? [undefined] extends [T]\n      ? false\n      : true\n    : false;\n\nexport type OmitNever<T extends Record<string, unknown>> = {\n  [K in keyof T as IsExactlyNeverOrNeverUndefined<T[K]> extends true ? never : K]: T[K];\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-nuxt/sdk-client-required/core/utils.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-nuxt/sdk-client-required/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport { apiVVersionODataControllerCount, callToTestOrderOfParams, callWithDefaultOptionalParameters, callWithDefaultParameters, callWithDescriptions, callWithDuplicateResponses, callWithNoContentResponse, callWithParameters, callWithResponse, callWithResponseAndNoContentResponse, callWithResponses, callWithResultFromHeader, callWithWeirdParameterNames, collectionFormat, complexParams, complexTypes, deleteCallWithoutParametersAndResponse, deleteFoo, deprecatedCall, dummyA, dummyB, duplicateName, duplicateName2, duplicateName3, duplicateName4, export_, fileResponse, fooWow, getApiVbyApiVersionSimpleOperation, getCallWithOptionalParam, getCallWithoutParametersAndResponse, headCallWithoutParametersAndResponse, import_, multipartRequest, multipartResponse, nonAsciiæøåÆøÅöôêÊ字符串, type Options, optionsCallWithoutParametersAndResponse, patchApiVbyApiVersionNoTag, patchCallWithoutParametersAndResponse, postApiVbyApiVersionFormData, postApiVbyApiVersionRequestBody, postCallWithOptionalParam, postCallWithoutParametersAndResponse, putCallWithoutParametersAndResponse, putWithFormUrlEncoded, testErrorCode, types, uploadFile } from './sdk.gen';\nexport type { _3eNum1Период, _400, AdditionalPropertiesIntegerIssue, AdditionalPropertiesUnknownIssue, AdditionalPropertiesUnknownIssue2, AdditionalPropertiesUnknownIssue3, AdditionalPropertiesUnknownIssueWritable, AnyOfAnyAndNull, AnyOfArrays, ApiVVersionODataControllerCountData, ApiVVersionODataControllerCountResponse, ApiVVersionODataControllerCountResponses, ArrayWithAnyOfProperties, ArrayWithArray, ArrayWithBooleans, ArrayWithNumbers, ArrayWithProperties, ArrayWithReferences, ArrayWithStrings, CallToTestOrderOfParamsData, CallWithDefaultOptionalParametersData, CallWithDefaultParametersData, CallWithDescriptionsData, CallWithDuplicateResponsesData, CallWithDuplicateResponsesError, CallWithDuplicateResponsesErrors, CallWithDuplicateResponsesResponse, CallWithDuplicateResponsesResponses, CallWithNoContentResponseData, CallWithNoContentResponseResponse, CallWithNoContentResponseResponses, CallWithParametersData, CallWithResponseAndNoContentResponseData, CallWithResponseAndNoContentResponseResponse, CallWithResponseAndNoContentResponseResponses, CallWithResponseData, CallWithResponseResponse, CallWithResponseResponses, CallWithResponsesData, CallWithResponsesError, CallWithResponsesErrors, CallWithResponsesResponse, CallWithResponsesResponses, CallWithResultFromHeaderData, CallWithResultFromHeaderErrors, CallWithResultFromHeaderResponses, CallWithWeirdParameterNamesData, CamelCaseCommentWithBreaks, CharactersInDescription, ClientOptions, CollectionFormatData, CommentWithBackticks, CommentWithBackticksAndQuotes, CommentWithBreaks, CommentWithExpressionPlaceholders, CommentWithQuotes, CommentWithReservedCharacters, CommentWithSlashes, ComplexParamsData, ComplexParamsResponse, ComplexParamsResponses, ComplexTypesData, ComplexTypesErrors, ComplexTypesResponse, ComplexTypesResponses, CompositionBaseModel, CompositionExtendedModel, CompositionWithAllOfAndNullable, CompositionWithAnyOf, CompositionWithAnyOfAndNullable, CompositionWithAnyOfAnonymous, CompositionWithNestedAnyAndTypeNull, CompositionWithNestedAnyOfAndNull, CompositionWithOneOf, CompositionWithOneOfAndComplexArrayDictionary, CompositionWithOneOfAndNullable, CompositionWithOneOfAndProperties, CompositionWithOneOfAndSimpleArrayDictionary, CompositionWithOneOfAndSimpleDictionary, CompositionWithOneOfAnonymous, CompositionWithOneOfDiscriminator, ConstValue, Default, DeleteCallWithoutParametersAndResponseData, DeleteFooData, DeleteFooData2, DeleteFooData3, DeprecatedCallData, DeprecatedModel, DictionaryWithArray, DictionaryWithDictionary, DictionaryWithProperties, DictionaryWithPropertiesAndAdditionalProperties, DictionaryWithReference, DictionaryWithString, DummyAData, DummyAResponse, DummyAResponses, DummyBData, DummyBResponse, DummyBResponses, DuplicateName2Data, DuplicateName3Data, DuplicateName4Data, DuplicateNameData, EnumFromDescription, EnumWithExtensions, EnumWithNumbers, EnumWithReplacedCharacters, EnumWithStrings, EnumWithXEnumNames, ExportData, ExternalRefA, ExternalRefB, ExternalSharedModel, File, FileResponseData, FileResponseResponse, FileResponseResponses, FileWritable, FooWowData, FooWowResponses, FreeFormObjectWithAdditionalPropertiesEqEmptyObject, FreeFormObjectWithAdditionalPropertiesEqTrue, FreeFormObjectWithoutAdditionalProperties, GenericSchemaDuplicateIssue1SystemBoolean, GenericSchemaDuplicateIssue1SystemBooleanWritable, GenericSchemaDuplicateIssue1SystemString, GenericSchemaDuplicateIssue1SystemStringWritable, GetApiVbyApiVersionSimpleOperationData, GetApiVbyApiVersionSimpleOperationError, GetApiVbyApiVersionSimpleOperationErrors, GetApiVbyApiVersionSimpleOperationResponse, GetApiVbyApiVersionSimpleOperationResponses, GetCallWithOptionalParamData, GetCallWithoutParametersAndResponseData, HeadCallWithoutParametersAndResponseData, Import, ImportData, ImportResponse, ImportResponses, IoK8sApimachineryPkgApisMetaV1DeleteOptions, IoK8sApimachineryPkgApisMetaV1Preconditions, ModelCircle, ModelFromZendesk, ModelSquare, ModelThatExtends, ModelThatExtendsExtends, ModelWithAdditionalPropertiesEqTrue, ModelWithAdditionalPropertiesRef, ModelWithAnyOfConstantSizeArray, ModelWithAnyOfConstantSizeArrayAndIntersect, ModelWithAnyOfConstantSizeArrayNullable, ModelWithAnyOfConstantSizeArrayWithNSizeAndOptions, ModelWithAnyOfConstantSizeArrayWithNSizeAndOptionsWritable, ModelWithArray, ModelWithArrayReadOnlyAndWriteOnly, ModelWithArrayReadOnlyAndWriteOnlyWritable, ModelWithBackticksInDescription, ModelWithBoolean, ModelWithCircularReference, ModelWithConst, ModelWithConstantSizeArray, ModelWithDictionary, ModelWithDuplicateImports, ModelWithDuplicateProperties, ModelWithEnum, ModelWithEnumFromDescription, ModelWithEnumWithHyphen, ModelWithInteger, ModelWithNestedArrayEnums, ModelWithNestedArrayEnumsData, ModelWithNestedArrayEnumsDataBar, ModelWithNestedArrayEnumsDataFoo, ModelWithNestedCompositionEnums, ModelWithNestedEnums, ModelWithNestedProperties, ModelWithNullableObject, ModelWithNullableString, ModelWithNumericEnumUnion, ModelWithOneOfAndProperties, ModelWithOneOfEnum, ModelWithOrderedProperties, ModelWithPattern, ModelWithPatternWritable, ModelWithPrefixItemsConstantSizeArray, ModelWithProperties, ModelWithPropertiesWritable, ModelWithReadOnlyAndWriteOnly, ModelWithReadOnlyAndWriteOnlyWritable, ModelWithReference, ModelWithReferenceWritable, ModelWithString, ModelWithStringError, MultipartRequestData, MultipartResponseData, MultipartResponseResponse, MultipartResponseResponses, NestedAnyOfArraysNullable, NonAsciiæøåÆøÅöôêÊ字符串Data, NonAsciiæøåÆøÅöôêÊ字符串Response, NonAsciiæøåÆøÅöôêÊ字符串Responses, NonAsciiStringæøåÆøÅöôêÊ字符串, NullableObject, OneOfAllOfIssue, OneOfAllOfIssueWritable, OptionsCallWithoutParametersAndResponseData, Pageable, ParameterSimpleParameterUnused, PatchApiVbyApiVersionNoTagData, PatchApiVbyApiVersionNoTagResponses, PatchCallWithoutParametersAndResponseData, PostApiVbyApiVersionFormDataData, PostApiVbyApiVersionRequestBodyData, PostCallWithOptionalParamData, PostCallWithOptionalParamResponse, PostCallWithOptionalParamResponses, PostCallWithoutParametersAndResponseData, PostServiceWithEmptyTagResponse, PostServiceWithEmptyTagResponse2, PutCallWithoutParametersAndResponseData, PutWithFormUrlEncodedData, SchemaWithFormRestrictedKeys, SimpleBoolean, SimpleFile, SimpleFormData, SimpleInteger, SimpleParameter, SimpleReference, SimpleRequestBody, SimpleString, SimpleStringWithPattern, TestErrorCodeData, TestErrorCodeErrors, TestErrorCodeResponses, TypesData, TypesResponse, TypesResponses, UploadFileData, UploadFileResponse, UploadFileResponses, XFooBar } from './types.gen';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-nuxt/sdk-client-required/sdk.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport { type Client, type Composable, formDataBodySerializer, type Options as Options2, type TDataShape, urlSearchParamsBodySerializer } from './client';\nimport type { ApiVVersionODataControllerCountData, ApiVVersionODataControllerCountResponse, CallToTestOrderOfParamsData, CallWithDefaultOptionalParametersData, CallWithDefaultParametersData, CallWithDescriptionsData, CallWithDuplicateResponsesData, CallWithDuplicateResponsesError, CallWithDuplicateResponsesResponse, CallWithNoContentResponseData, CallWithNoContentResponseResponse, CallWithParametersData, CallWithResponseAndNoContentResponseData, CallWithResponseAndNoContentResponseResponse, CallWithResponseData, CallWithResponseResponse, CallWithResponsesData, CallWithResponsesError, CallWithResponsesResponse, CallWithResultFromHeaderData, CallWithWeirdParameterNamesData, CollectionFormatData, ComplexParamsData, ComplexParamsResponse, ComplexTypesData, ComplexTypesResponse, DeleteCallWithoutParametersAndResponseData, DeleteFooData3, DeprecatedCallData, DummyAData, DummyAResponse, DummyBData, DummyBResponse, DuplicateName2Data, DuplicateName3Data, DuplicateName4Data, DuplicateNameData, ExportData, FileResponseData, FileResponseResponse, FooWowData, GetApiVbyApiVersionSimpleOperationData, GetApiVbyApiVersionSimpleOperationError, GetApiVbyApiVersionSimpleOperationResponse, GetCallWithOptionalParamData, GetCallWithoutParametersAndResponseData, HeadCallWithoutParametersAndResponseData, ImportData, ImportResponse, MultipartRequestData, MultipartResponseData, MultipartResponseResponse, NonAsciiæøåÆøÅöôêÊ字符串Data, NonAsciiæøåÆøÅöôêÊ字符串Response, OptionsCallWithoutParametersAndResponseData, PatchApiVbyApiVersionNoTagData, PatchCallWithoutParametersAndResponseData, PostApiVbyApiVersionFormDataData, PostApiVbyApiVersionRequestBodyData, PostCallWithOptionalParamData, PostCallWithOptionalParamResponse, PostCallWithoutParametersAndResponseData, PutCallWithoutParametersAndResponseData, PutWithFormUrlEncodedData, TestErrorCodeData, TypesData, TypesResponse, UploadFileData, UploadFileResponse } from './types.gen';\n\nexport type Options<TComposable extends Composable = '$fetch', TData extends TDataShape = TDataShape, ResT = unknown, DefaultT = undefined> = Options2<TComposable, TData, ResT, DefaultT> & {\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\nexport const export_ = <TComposable extends Composable = '$fetch', DefaultT = undefined>(options: Options<TComposable, ExportData, unknown, DefaultT>) => options.client.get<TComposable, unknown | DefaultT, unknown, DefaultT>({ url: '/api/v{api-version}/no+tag', ...options });\n\nexport const patchApiVbyApiVersionNoTag = <TComposable extends Composable = '$fetch', DefaultT = undefined>(options: Options<TComposable, PatchApiVbyApiVersionNoTagData, unknown, DefaultT>) => options.client.patch<TComposable, unknown | DefaultT, unknown, DefaultT>({ url: '/api/v{api-version}/no+tag', ...options });\n\nexport const import_ = <TComposable extends Composable = '$fetch', DefaultT extends ImportResponse = ImportResponse>(options: Options<TComposable, ImportData, ImportResponse, DefaultT>) => options.client.post<TComposable, ImportResponse | DefaultT, unknown, DefaultT>({\n    url: '/api/v{api-version}/no+tag',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options.headers\n    }\n});\n\nexport const fooWow = <TComposable extends Composable = '$fetch', DefaultT = undefined>(options: Options<TComposable, FooWowData, unknown, DefaultT>) => options.client.put<TComposable, unknown | DefaultT, unknown, DefaultT>({ url: '/api/v{api-version}/no+tag', ...options });\n\nexport const apiVVersionODataControllerCount = <TComposable extends Composable = '$fetch', DefaultT extends ApiVVersionODataControllerCountResponse = ApiVVersionODataControllerCountResponse>(options: Options<TComposable, ApiVVersionODataControllerCountData, ApiVVersionODataControllerCountResponse, DefaultT>) => options.client.get<TComposable, ApiVVersionODataControllerCountResponse | DefaultT, unknown, DefaultT>({ url: '/api/v{api-version}/simple/$count', ...options });\n\nexport const getApiVbyApiVersionSimpleOperation = <TComposable extends Composable = '$fetch', DefaultT extends GetApiVbyApiVersionSimpleOperationResponse = GetApiVbyApiVersionSimpleOperationResponse>(options: Options<TComposable, GetApiVbyApiVersionSimpleOperationData, GetApiVbyApiVersionSimpleOperationResponse, DefaultT>) => options.client.get<TComposable, GetApiVbyApiVersionSimpleOperationResponse | DefaultT, GetApiVbyApiVersionSimpleOperationError, DefaultT>({ url: '/api/v{api-version}/simple:operation', ...options });\n\nexport const deleteCallWithoutParametersAndResponse = <TComposable extends Composable = '$fetch', DefaultT = undefined>(options: Options<TComposable, DeleteCallWithoutParametersAndResponseData, unknown, DefaultT>) => options.client.delete<TComposable, unknown | DefaultT, unknown, DefaultT>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const getCallWithoutParametersAndResponse = <TComposable extends Composable = '$fetch', DefaultT = undefined>(options: Options<TComposable, GetCallWithoutParametersAndResponseData, unknown, DefaultT>) => options.client.get<TComposable, unknown | DefaultT, unknown, DefaultT>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const headCallWithoutParametersAndResponse = <TComposable extends Composable = '$fetch', DefaultT = undefined>(options: Options<TComposable, HeadCallWithoutParametersAndResponseData, unknown, DefaultT>) => options.client.head<TComposable, unknown | DefaultT, unknown, DefaultT>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const optionsCallWithoutParametersAndResponse = <TComposable extends Composable = '$fetch', DefaultT = undefined>(options: Options<TComposable, OptionsCallWithoutParametersAndResponseData, unknown, DefaultT>) => options.client.options<TComposable, unknown | DefaultT, unknown, DefaultT>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const patchCallWithoutParametersAndResponse = <TComposable extends Composable = '$fetch', DefaultT = undefined>(options: Options<TComposable, PatchCallWithoutParametersAndResponseData, unknown, DefaultT>) => options.client.patch<TComposable, unknown | DefaultT, unknown, DefaultT>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const postCallWithoutParametersAndResponse = <TComposable extends Composable = '$fetch', DefaultT = undefined>(options: Options<TComposable, PostCallWithoutParametersAndResponseData, unknown, DefaultT>) => options.client.post<TComposable, unknown | DefaultT, unknown, DefaultT>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const putCallWithoutParametersAndResponse = <TComposable extends Composable = '$fetch', DefaultT = undefined>(options: Options<TComposable, PutCallWithoutParametersAndResponseData, unknown, DefaultT>) => options.client.put<TComposable, unknown | DefaultT, unknown, DefaultT>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const deleteFoo = <TComposable extends Composable = '$fetch', DefaultT = undefined>(options: Options<TComposable, DeleteFooData3, unknown, DefaultT>) => options.client.delete<TComposable, unknown | DefaultT, unknown, DefaultT>({ url: '/api/v{api-version}/foo/{foo_param}/bar/{BarParam}', ...options });\n\nexport const callWithDescriptions = <TComposable extends Composable = '$fetch', DefaultT = undefined>(options: Options<TComposable, CallWithDescriptionsData, unknown, DefaultT>) => options.client.post<TComposable, unknown | DefaultT, unknown, DefaultT>({ url: '/api/v{api-version}/descriptions', ...options });\n\n/**\n * @deprecated\n */\nexport const deprecatedCall = <TComposable extends Composable = '$fetch', DefaultT = undefined>(options: Options<TComposable, DeprecatedCallData, unknown, DefaultT>) => options.client.post<TComposable, unknown | DefaultT, unknown, DefaultT>({ url: '/api/v{api-version}/parameters/deprecated', ...options });\n\nexport const callWithParameters = <TComposable extends Composable = '$fetch', DefaultT = undefined>(options: Options<TComposable, CallWithParametersData, unknown, DefaultT>) => options.client.post<TComposable, unknown | DefaultT, unknown, DefaultT>({\n    url: '/api/v{api-version}/parameters/{parameterPath}',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options.headers\n    }\n});\n\nexport const callWithWeirdParameterNames = <TComposable extends Composable = '$fetch', DefaultT = undefined>(options: Options<TComposable, CallWithWeirdParameterNamesData, unknown, DefaultT>) => options.client.post<TComposable, unknown | DefaultT, unknown, DefaultT>({\n    url: '/api/v{api-version}/parameters/{parameter.path.1}/{parameter-path-2}/{PARAMETER-PATH-3}',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options.headers\n    }\n});\n\nexport const getCallWithOptionalParam = <TComposable extends Composable = '$fetch', DefaultT = undefined>(options: Options<TComposable, GetCallWithOptionalParamData, unknown, DefaultT>) => options.client.get<TComposable, unknown | DefaultT, unknown, DefaultT>({\n    url: '/api/v{api-version}/parameters',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options.headers\n    }\n});\n\nexport const postCallWithOptionalParam = <TComposable extends Composable = '$fetch', DefaultT extends PostCallWithOptionalParamResponse = PostCallWithOptionalParamResponse>(options: Options<TComposable, PostCallWithOptionalParamData, PostCallWithOptionalParamResponse, DefaultT>) => options.client.post<TComposable, PostCallWithOptionalParamResponse | DefaultT, unknown, DefaultT>({\n    url: '/api/v{api-version}/parameters',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options.headers\n    }\n});\n\nexport const postApiVbyApiVersionRequestBody = <TComposable extends Composable = '$fetch', DefaultT = undefined>(options: Options<TComposable, PostApiVbyApiVersionRequestBodyData, unknown, DefaultT>) => options.client.post<TComposable, unknown | DefaultT, unknown, DefaultT>({\n    url: '/api/v{api-version}/requestBody',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options.headers\n    }\n});\n\nexport const postApiVbyApiVersionFormData = <TComposable extends Composable = '$fetch', DefaultT = undefined>(options: Options<TComposable, PostApiVbyApiVersionFormDataData, unknown, DefaultT>) => options.client.post<TComposable, unknown | DefaultT, unknown, DefaultT>({\n    ...formDataBodySerializer,\n    url: '/api/v{api-version}/formData',\n    ...options,\n    headers: {\n        'Content-Type': null,\n        ...options.headers\n    }\n});\n\nexport const callWithDefaultParameters = <TComposable extends Composable = '$fetch', DefaultT = undefined>(options: Options<TComposable, CallWithDefaultParametersData, unknown, DefaultT>) => options.client.get<TComposable, unknown | DefaultT, unknown, DefaultT>({ url: '/api/v{api-version}/defaults', ...options });\n\nexport const callWithDefaultOptionalParameters = <TComposable extends Composable = '$fetch', DefaultT = undefined>(options: Options<TComposable, CallWithDefaultOptionalParametersData, unknown, DefaultT>) => options.client.post<TComposable, unknown | DefaultT, unknown, DefaultT>({ url: '/api/v{api-version}/defaults', ...options });\n\nexport const callToTestOrderOfParams = <TComposable extends Composable = '$fetch', DefaultT = undefined>(options: Options<TComposable, CallToTestOrderOfParamsData, unknown, DefaultT>) => options.client.put<TComposable, unknown | DefaultT, unknown, DefaultT>({ url: '/api/v{api-version}/defaults', ...options });\n\nexport const duplicateName = <TComposable extends Composable = '$fetch', DefaultT = undefined>(options: Options<TComposable, DuplicateNameData, unknown, DefaultT>) => options.client.delete<TComposable, unknown | DefaultT, unknown, DefaultT>({ url: '/api/v{api-version}/duplicate', ...options });\n\nexport const duplicateName2 = <TComposable extends Composable = '$fetch', DefaultT = undefined>(options: Options<TComposable, DuplicateName2Data, unknown, DefaultT>) => options.client.get<TComposable, unknown | DefaultT, unknown, DefaultT>({ url: '/api/v{api-version}/duplicate', ...options });\n\nexport const duplicateName3 = <TComposable extends Composable = '$fetch', DefaultT = undefined>(options: Options<TComposable, DuplicateName3Data, unknown, DefaultT>) => options.client.post<TComposable, unknown | DefaultT, unknown, DefaultT>({ url: '/api/v{api-version}/duplicate', ...options });\n\nexport const duplicateName4 = <TComposable extends Composable = '$fetch', DefaultT = undefined>(options: Options<TComposable, DuplicateName4Data, unknown, DefaultT>) => options.client.put<TComposable, unknown | DefaultT, unknown, DefaultT>({ url: '/api/v{api-version}/duplicate', ...options });\n\nexport const callWithNoContentResponse = <TComposable extends Composable = '$fetch', DefaultT extends CallWithNoContentResponseResponse = CallWithNoContentResponseResponse>(options: Options<TComposable, CallWithNoContentResponseData, CallWithNoContentResponseResponse, DefaultT>) => options.client.get<TComposable, CallWithNoContentResponseResponse | DefaultT, unknown, DefaultT>({ url: '/api/v{api-version}/no-content', ...options });\n\nexport const callWithResponseAndNoContentResponse = <TComposable extends Composable = '$fetch', DefaultT extends CallWithResponseAndNoContentResponseResponse = CallWithResponseAndNoContentResponseResponse>(options: Options<TComposable, CallWithResponseAndNoContentResponseData, CallWithResponseAndNoContentResponseResponse, DefaultT>) => options.client.get<TComposable, CallWithResponseAndNoContentResponseResponse | DefaultT, unknown, DefaultT>({ url: '/api/v{api-version}/multiple-tags/response-and-no-content', ...options });\n\nexport const dummyA = <TComposable extends Composable = '$fetch', DefaultT extends DummyAResponse = DummyAResponse>(options: Options<TComposable, DummyAData, DummyAResponse, DefaultT>) => options.client.get<TComposable, DummyAResponse | DefaultT, unknown, DefaultT>({ url: '/api/v{api-version}/multiple-tags/a', ...options });\n\nexport const dummyB = <TComposable extends Composable = '$fetch', DefaultT extends DummyBResponse = DummyBResponse>(options: Options<TComposable, DummyBData, DummyBResponse, DefaultT>) => options.client.get<TComposable, DummyBResponse | DefaultT, unknown, DefaultT>({ url: '/api/v{api-version}/multiple-tags/b', ...options });\n\nexport const callWithResponse = <TComposable extends Composable = '$fetch', DefaultT extends CallWithResponseResponse = CallWithResponseResponse>(options: Options<TComposable, CallWithResponseData, CallWithResponseResponse, DefaultT>) => options.client.get<TComposable, CallWithResponseResponse | DefaultT, unknown, DefaultT>({ url: '/api/v{api-version}/response', ...options });\n\nexport const callWithDuplicateResponses = <TComposable extends Composable = '$fetch', DefaultT extends CallWithDuplicateResponsesResponse = CallWithDuplicateResponsesResponse>(options: Options<TComposable, CallWithDuplicateResponsesData, CallWithDuplicateResponsesResponse, DefaultT>) => options.client.post<TComposable, CallWithDuplicateResponsesResponse | DefaultT, CallWithDuplicateResponsesError, DefaultT>({ url: '/api/v{api-version}/response', ...options });\n\nexport const callWithResponses = <TComposable extends Composable = '$fetch', DefaultT extends CallWithResponsesResponse = CallWithResponsesResponse>(options: Options<TComposable, CallWithResponsesData, CallWithResponsesResponse, DefaultT>) => options.client.put<TComposable, CallWithResponsesResponse | DefaultT, CallWithResponsesError, DefaultT>({ url: '/api/v{api-version}/response', ...options });\n\nexport const collectionFormat = <TComposable extends Composable = '$fetch', DefaultT = undefined>(options: Options<TComposable, CollectionFormatData, unknown, DefaultT>) => options.client.get<TComposable, unknown | DefaultT, unknown, DefaultT>({ url: '/api/v{api-version}/collectionFormat', ...options });\n\nexport const types = <TComposable extends Composable = '$fetch', DefaultT extends TypesResponse = TypesResponse>(options: Options<TComposable, TypesData, TypesResponse, DefaultT>) => options.client.get<TComposable, TypesResponse | DefaultT, unknown, DefaultT>({ url: '/api/v{api-version}/types', ...options });\n\nexport const uploadFile = <TComposable extends Composable = '$fetch', DefaultT extends UploadFileResponse = UploadFileResponse>(options: Options<TComposable, UploadFileData, UploadFileResponse, DefaultT>) => options.client.post<TComposable, UploadFileResponse | DefaultT, unknown, DefaultT>({\n    ...urlSearchParamsBodySerializer,\n    url: '/api/v{api-version}/upload',\n    ...options,\n    headers: {\n        'Content-Type': 'application/x-www-form-urlencoded',\n        ...options.headers\n    }\n});\n\nexport const fileResponse = <TComposable extends Composable = '$fetch', DefaultT extends FileResponseResponse = FileResponseResponse>(options: Options<TComposable, FileResponseData, FileResponseResponse, DefaultT>) => options.client.get<TComposable, FileResponseResponse | DefaultT, unknown, DefaultT>({ url: '/api/v{api-version}/file/{id}', ...options });\n\nexport const complexTypes = <TComposable extends Composable = '$fetch', DefaultT extends ComplexTypesResponse = ComplexTypesResponse>(options: Options<TComposable, ComplexTypesData, ComplexTypesResponse, DefaultT>) => options.client.get<TComposable, ComplexTypesResponse | DefaultT, unknown, DefaultT>({\n    querySerializer: { parameters: { parameterObject: { object: { style: 'form' } } } },\n    url: '/api/v{api-version}/complex',\n    ...options\n});\n\nexport const multipartResponse = <TComposable extends Composable = '$fetch', DefaultT extends MultipartResponseResponse = MultipartResponseResponse>(options: Options<TComposable, MultipartResponseData, MultipartResponseResponse, DefaultT>) => options.client.get<TComposable, MultipartResponseResponse | DefaultT, unknown, DefaultT>({ url: '/api/v{api-version}/multipart', ...options });\n\nexport const multipartRequest = <TComposable extends Composable = '$fetch', DefaultT = undefined>(options: Options<TComposable, MultipartRequestData, unknown, DefaultT>) => options.client.post<TComposable, unknown | DefaultT, unknown, DefaultT>({\n    ...formDataBodySerializer,\n    url: '/api/v{api-version}/multipart',\n    ...options,\n    headers: {\n        'Content-Type': null,\n        ...options.headers\n    }\n});\n\nexport const complexParams = <TComposable extends Composable = '$fetch', DefaultT extends ComplexParamsResponse = ComplexParamsResponse>(options: Options<TComposable, ComplexParamsData, ComplexParamsResponse, DefaultT>) => options.client.put<TComposable, ComplexParamsResponse | DefaultT, unknown, DefaultT>({\n    url: '/api/v{api-version}/complex/{id}',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json-patch+json',\n        ...options.headers\n    }\n});\n\nexport const callWithResultFromHeader = <TComposable extends Composable = '$fetch', DefaultT = undefined>(options: Options<TComposable, CallWithResultFromHeaderData, unknown, DefaultT>) => options.client.post<TComposable, unknown | DefaultT, unknown, DefaultT>({ url: '/api/v{api-version}/header', ...options });\n\nexport const testErrorCode = <TComposable extends Composable = '$fetch', DefaultT = undefined>(options: Options<TComposable, TestErrorCodeData, unknown, DefaultT>) => options.client.post<TComposable, unknown | DefaultT, unknown, DefaultT>({ url: '/api/v{api-version}/error', ...options });\n\nexport const nonAsciiæøåÆøÅöôêÊ字符串 = <TComposable extends Composable = '$fetch', DefaultT extends NonAsciiæøåÆøÅöôêÊ字符串Response = NonAsciiæøåÆøÅöôêÊ字符串Response>(options: Options<TComposable, NonAsciiæøåÆøÅöôêÊ字符串Data, NonAsciiæøåÆøÅöôêÊ字符串Response, DefaultT>) => options.client.post<TComposable, NonAsciiæøåÆøÅöôêÊ字符串Response | DefaultT, unknown, DefaultT>({ url: '/api/v{api-version}/non-ascii-æøåÆØÅöôêÊ字符串', ...options });\n\n/**\n * Login User\n */\nexport const putWithFormUrlEncoded = <TComposable extends Composable = '$fetch', DefaultT = undefined>(options: Options<TComposable, PutWithFormUrlEncodedData, unknown, DefaultT>) => options.client.put<TComposable, unknown | DefaultT, unknown, DefaultT>({\n    ...urlSearchParamsBodySerializer,\n    url: '/api/v{api-version}/non-ascii-æøåÆØÅöôêÊ字符串',\n    ...options,\n    headers: {\n        'Content-Type': 'application/x-www-form-urlencoded',\n        ...options.headers\n    }\n});\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-nuxt/sdk-client-required/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type ClientOptions = {\n    baseURL: 'http://localhost:3000/base' | (string & {});\n};\n\n/**\n * Model with number-only name\n */\nexport type _400 = string;\n\n/**\n * External ref to shared model (A)\n */\nexport type ExternalRefA = ExternalSharedModel;\n\n/**\n * External ref to shared model (B)\n */\nexport type ExternalRefB = ExternalSharedModel;\n\n/**\n * Testing multiline comments in string: First line\n * Second line\n *\n * Fourth line\n */\nexport type CamelCaseCommentWithBreaks = number;\n\n/**\n * Testing multiline comments in string: First line\n * Second line\n *\n * Fourth line\n */\nexport type CommentWithBreaks = number;\n\n/**\n * Testing backticks in string: `backticks` and ```multiple backticks``` should work\n */\nexport type CommentWithBackticks = number;\n\n/**\n * Testing backticks and quotes in string: `backticks`, 'quotes', \"double quotes\" and ```multiple backticks``` should work\n */\nexport type CommentWithBackticksAndQuotes = number;\n\n/**\n * Testing slashes in string: \\backwards\\\\\\ and /forwards/// should work\n */\nexport type CommentWithSlashes = number;\n\n/**\n * Testing expression placeholders in string: ${expression} should work\n */\nexport type CommentWithExpressionPlaceholders = number;\n\n/**\n * Testing quotes in string: 'single quote''' and \"double quotes\"\"\" should work\n */\nexport type CommentWithQuotes = number;\n\n/**\n * Testing reserved characters in string: * inline * and ** inline ** should work\n */\nexport type CommentWithReservedCharacters = number;\n\n/**\n * This is a simple number\n */\nexport type SimpleInteger = number;\n\n/**\n * This is a simple boolean\n */\nexport type SimpleBoolean = boolean;\n\n/**\n * This is a simple string\n */\nexport type SimpleString = string;\n\n/**\n * A string with non-ascii (unicode) characters valid in typescript identifiers (æøåÆØÅöÔèÈ字符串)\n */\nexport type NonAsciiStringæøåÆøÅöôêÊ字符串 = string;\n\n/**\n * This is a simple file\n */\nexport type SimpleFile = Blob | File;\n\n/**\n * This is a simple reference\n */\nexport type SimpleReference = ModelWithString;\n\n/**\n * This is a simple string\n */\nexport type SimpleStringWithPattern = string | null;\n\n/**\n * This is a simple enum with strings\n */\nexport type EnumWithStrings = 'Success' | 'Warning' | 'Error' | '\\'Single Quote\\'' | '\"Double Quotes\"' | 'Non-ascii: øæåôöØÆÅÔÖ字符串';\n\nexport type EnumWithReplacedCharacters = '\\'Single Quote\\'' | '\"Double Quotes\"' | 'øæåôöØÆÅÔÖ字符串' | 3.1 | '';\n\n/**\n * This is a simple enum with numbers\n */\nexport type EnumWithNumbers = 1 | 2 | 3 | 1.1 | 1.2 | 1.3 | 100 | 200 | 300 | -100 | -200 | -300 | -1.1 | -1.2 | -1.3;\n\n/**\n * Success=1,Warning=2,Error=3\n */\nexport type EnumFromDescription = number;\n\n/**\n * This is a simple enum with numbers\n */\nexport type EnumWithExtensions = 200 | 400 | 500;\n\nexport type EnumWithXEnumNames = 0 | 1 | 2;\n\n/**\n * This is a simple array with numbers\n */\nexport type ArrayWithNumbers = Array<number>;\n\n/**\n * This is a simple array with booleans\n */\nexport type ArrayWithBooleans = Array<boolean>;\n\n/**\n * This is a simple array with strings\n */\nexport type ArrayWithStrings = Array<string>;\n\n/**\n * This is a simple array with references\n */\nexport type ArrayWithReferences = Array<ModelWithString>;\n\n/**\n * This is a simple array containing an array\n */\nexport type ArrayWithArray = Array<Array<ModelWithString>>;\n\n/**\n * This is a simple array with properties\n */\nexport type ArrayWithProperties = Array<{\n    '16x16'?: CamelCaseCommentWithBreaks;\n    bar?: string;\n}>;\n\n/**\n * This is a simple array with any of properties\n */\nexport type ArrayWithAnyOfProperties = Array<{\n    foo?: string;\n} | {\n    bar?: string;\n}>;\n\nexport type AnyOfAnyAndNull = {\n    data?: unknown | null;\n};\n\n/**\n * This is a simple array with any of properties\n */\nexport type AnyOfArrays = {\n    results?: Array<{\n        foo?: string;\n    } | {\n        bar?: string;\n    }>;\n};\n\n/**\n * This is a string dictionary\n */\nexport type DictionaryWithString = {\n    [key: string]: string;\n};\n\nexport type DictionaryWithPropertiesAndAdditionalProperties = {\n    foo?: number;\n    bar?: boolean;\n    [key: string]: string | number | boolean | undefined;\n};\n\n/**\n * This is a string reference\n */\nexport type DictionaryWithReference = {\n    [key: string]: ModelWithString;\n};\n\n/**\n * This is a complex dictionary\n */\nexport type DictionaryWithArray = {\n    [key: string]: Array<ModelWithString>;\n};\n\n/**\n * This is a string dictionary\n */\nexport type DictionaryWithDictionary = {\n    [key: string]: {\n        [key: string]: string;\n    };\n};\n\n/**\n * This is a complex dictionary\n */\nexport type DictionaryWithProperties = {\n    [key: string]: {\n        foo?: string;\n        bar?: string;\n    };\n};\n\n/**\n * This is a model with one number property\n */\nexport type ModelWithInteger = {\n    /**\n     * This is a simple number property\n     */\n    prop?: number;\n};\n\n/**\n * This is a model with one boolean property\n */\nexport type ModelWithBoolean = {\n    /**\n     * This is a simple boolean property\n     */\n    prop?: boolean;\n};\n\n/**\n * This is a model with one string property\n */\nexport type ModelWithString = {\n    /**\n     * This is a simple string property\n     */\n    prop?: string;\n};\n\n/**\n * This is a model with one string property\n */\nexport type ModelWithStringError = {\n    /**\n     * This is a simple string property\n     */\n    prop?: string;\n};\n\n/**\n * `Comment` or `VoiceComment`. The JSON object for adding voice comments to tickets is different. See [Adding voice comments to tickets](/documentation/ticketing/managing-tickets/adding-voice-comments-to-tickets)\n */\nexport type ModelFromZendesk = string;\n\n/**\n * This is a model with one string property\n */\nexport type ModelWithNullableString = {\n    /**\n     * This is a simple string property\n     */\n    nullableProp1?: string | null;\n    /**\n     * This is a simple string property\n     */\n    nullableRequiredProp1: string | null;\n    /**\n     * This is a simple string property\n     */\n    nullableProp2?: string | null;\n    /**\n     * This is a simple string property\n     */\n    nullableRequiredProp2: string | null;\n    /**\n     * This is a simple enum with strings\n     */\n    'foo_bar-enum'?: 'Success' | 'Warning' | 'Error' | 'ØÆÅ字符串';\n};\n\n/**\n * This is a model with one enum\n */\nexport type ModelWithEnum = {\n    /**\n     * This is a simple enum with strings\n     */\n    'foo_bar-enum'?: 'Success' | 'Warning' | 'Error' | 'ØÆÅ字符串';\n    /**\n     * These are the HTTP error code enums\n     */\n    statusCode?: '100' | '200 FOO' | '300 FOO_BAR' | '400 foo-bar' | '500 foo.bar' | '600 foo&bar';\n    /**\n     * Simple boolean enum\n     */\n    bool?: true;\n};\n\n/**\n * This is a model with one enum with escaped name\n */\nexport type ModelWithEnumWithHyphen = {\n    /**\n     * Foo-Bar-Baz-Qux\n     */\n    'foo-bar-baz-qux'?: '3.0';\n};\n\n/**\n * This is a model with one enum\n */\nexport type ModelWithEnumFromDescription = {\n    /**\n     * Success=1,Warning=2,Error=3\n     */\n    test?: number;\n};\n\n/**\n * This is a model with nested enums\n */\nexport type ModelWithNestedEnums = {\n    dictionaryWithEnum?: {\n        [key: string]: 'Success' | 'Warning' | 'Error';\n    };\n    dictionaryWithEnumFromDescription?: {\n        [key: string]: number;\n    };\n    arrayWithEnum?: Array<'Success' | 'Warning' | 'Error'>;\n    arrayWithDescription?: Array<number>;\n    /**\n     * This is a simple enum with strings\n     */\n    'foo_bar-enum'?: 'Success' | 'Warning' | 'Error' | 'ØÆÅ字符串';\n};\n\n/**\n * This is a model with one property containing a reference\n */\nexport type ModelWithReference = {\n    prop?: ModelWithProperties;\n};\n\n/**\n * This is a model with one property containing an array\n */\nexport type ModelWithArrayReadOnlyAndWriteOnly = {\n    prop?: Array<ModelWithReadOnlyAndWriteOnly>;\n    propWithFile?: Array<Blob | File>;\n    propWithNumber?: Array<number>;\n};\n\n/**\n * This is a model with one property containing an array\n */\nexport type ModelWithArray = {\n    prop?: Array<ModelWithString>;\n    propWithFile?: Array<Blob | File>;\n    propWithNumber?: Array<number>;\n};\n\n/**\n * This is a model with one property containing a dictionary\n */\nexport type ModelWithDictionary = {\n    prop?: {\n        [key: string]: string;\n    };\n};\n\n/**\n * This is a deprecated model with a deprecated property\n *\n * @deprecated\n */\nexport type DeprecatedModel = {\n    /**\n     * This is a deprecated property\n     *\n     * @deprecated\n     */\n    prop?: string;\n};\n\n/**\n * This is a model with one property containing a circular reference\n */\nexport type ModelWithCircularReference = {\n    prop?: ModelWithCircularReference;\n};\n\n/**\n * This is a model with one property with a 'one of' relationship\n */\nexport type CompositionWithOneOf = {\n    propA?: ModelWithString | ModelWithEnum | ModelWithArray | ModelWithDictionary;\n};\n\n/**\n * This is a model with one property with a 'one of' relationship where the options are not $ref\n */\nexport type CompositionWithOneOfAnonymous = {\n    propA?: {\n        propA?: string;\n    } | string | number;\n};\n\n/**\n * Circle\n */\nexport type ModelCircle = {\n    kind: string;\n    radius?: number;\n};\n\n/**\n * Square\n */\nexport type ModelSquare = {\n    kind: string;\n    sideLength?: number;\n};\n\n/**\n * This is a model with one property with a 'one of' relationship where the options are not $ref\n */\nexport type CompositionWithOneOfDiscriminator = ({\n    kind: 'circle';\n} & ModelCircle) | ({\n    kind: 'square';\n} & ModelSquare);\n\n/**\n * This is a model with one property with a 'any of' relationship\n */\nexport type CompositionWithAnyOf = {\n    propA?: ModelWithString | ModelWithEnum | ModelWithArray | ModelWithDictionary;\n};\n\n/**\n * This is a model with one property with a 'any of' relationship where the options are not $ref\n */\nexport type CompositionWithAnyOfAnonymous = {\n    propA?: {\n        propA?: string;\n    } | string | number;\n};\n\n/**\n * This is a model with nested 'any of' property with a type null\n */\nexport type CompositionWithNestedAnyAndTypeNull = {\n    propA?: Array<ModelWithDictionary | null> | Array<ModelWithArray | null>;\n};\n\nexport type _3eNum1Период = 'Bird' | 'Dog';\n\nexport type ConstValue = 'ConstValue';\n\n/**\n * This is a model with one property with a 'any of' relationship where the options are not $ref\n */\nexport type CompositionWithNestedAnyOfAndNull = {\n    /**\n     * Scopes\n     */\n    propA?: Array<_3eNum1Период | ConstValue> | null;\n};\n\n/**\n * This is a model with one property with a 'one of' relationship\n */\nexport type CompositionWithOneOfAndNullable = {\n    propA?: {\n        boolean?: boolean;\n    } | ModelWithEnum | ModelWithArray | ModelWithDictionary | null;\n};\n\n/**\n * This is a model that contains a simple dictionary within composition\n */\nexport type CompositionWithOneOfAndSimpleDictionary = {\n    propA?: boolean | {\n        [key: string]: number;\n    };\n};\n\n/**\n * This is a model that contains a dictionary of simple arrays within composition\n */\nexport type CompositionWithOneOfAndSimpleArrayDictionary = {\n    propA?: boolean | {\n        [key: string]: Array<boolean>;\n    };\n};\n\n/**\n * This is a model that contains a dictionary of complex arrays (composited) within composition\n */\nexport type CompositionWithOneOfAndComplexArrayDictionary = {\n    propA?: boolean | {\n        [key: string]: Array<number | string>;\n    };\n};\n\n/**\n * This is a model with one property with a 'all of' relationship\n */\nexport type CompositionWithAllOfAndNullable = {\n    propA?: ({\n        boolean?: boolean;\n    } & ModelWithEnum & ModelWithArray & ModelWithDictionary) | null;\n};\n\n/**\n * This is a model with one property with a 'any of' relationship\n */\nexport type CompositionWithAnyOfAndNullable = {\n    propA?: {\n        boolean?: boolean;\n    } | ModelWithEnum | ModelWithArray | ModelWithDictionary | null;\n};\n\n/**\n * This is a base model with two simple optional properties\n */\nexport type CompositionBaseModel = {\n    firstName?: string;\n    lastname?: string;\n};\n\n/**\n * This is a model that extends the base model\n */\nexport type CompositionExtendedModel = CompositionBaseModel & {\n    age: number;\n    firstName: string;\n    lastname: string;\n};\n\n/**\n * This is a model with one nested property\n */\nexport type ModelWithProperties = {\n    required: string;\n    readonly requiredAndReadOnly: string;\n    requiredAndNullable: string | null;\n    string?: string;\n    number?: number;\n    boolean?: boolean;\n    reference?: ModelWithString;\n    'property with space'?: string;\n    default?: string;\n    try?: string;\n    readonly '@namespace.string'?: string;\n    readonly '@namespace.integer'?: number;\n};\n\n/**\n * This is a model with one nested property\n */\nexport type ModelWithNestedProperties = {\n    readonly first: {\n        readonly second: {\n            readonly third: string | null;\n        } | null;\n    } | null;\n};\n\n/**\n * This is a model with duplicated properties\n */\nexport type ModelWithDuplicateProperties = {\n    prop?: ModelWithString;\n};\n\n/**\n * This is a model with ordered properties\n */\nexport type ModelWithOrderedProperties = {\n    zebra?: string;\n    apple?: string;\n    hawaii?: string;\n};\n\n/**\n * This is a model with duplicated imports\n */\nexport type ModelWithDuplicateImports = {\n    propA?: ModelWithString;\n    propB?: ModelWithString;\n    propC?: ModelWithString;\n};\n\n/**\n * This is a model that extends another model\n */\nexport type ModelThatExtends = ModelWithString & {\n    propExtendsA?: string;\n    propExtendsB?: ModelWithString;\n};\n\n/**\n * This is a model that extends another model\n */\nexport type ModelThatExtendsExtends = ModelWithString & ModelThatExtends & {\n    propExtendsC?: string;\n    propExtendsD?: ModelWithString;\n};\n\n/**\n * This is a model that contains a some patterns\n */\nexport type ModelWithPattern = {\n    key: string;\n    name: string;\n    readonly enabled?: boolean;\n    readonly modified?: string;\n    id?: string;\n    text?: string;\n    patternWithSingleQuotes?: string;\n    patternWithNewline?: string;\n    patternWithBacktick?: string;\n    patternWithUnicode?: string;\n};\n\nexport type File = {\n    /**\n     * Id\n     */\n    readonly id?: string;\n    /**\n     * Updated at\n     */\n    readonly updated_at?: string;\n    /**\n     * Created at\n     */\n    readonly created_at?: string;\n    /**\n     * Mime\n     */\n    mime: string;\n    /**\n     * File\n     */\n    readonly file?: string;\n};\n\nexport type Default = {\n    name?: string;\n};\n\nexport type Pageable = {\n    page?: number;\n    size?: number;\n    sort?: Array<string>;\n};\n\n/**\n * This is a free-form object without additionalProperties.\n */\nexport type FreeFormObjectWithoutAdditionalProperties = {\n    [key: string]: unknown;\n};\n\n/**\n * This is a free-form object with additionalProperties: true.\n */\nexport type FreeFormObjectWithAdditionalPropertiesEqTrue = {\n    [key: string]: unknown;\n};\n\n/**\n * This is a free-form object with additionalProperties: {}.\n */\nexport type FreeFormObjectWithAdditionalPropertiesEqEmptyObject = {\n    [key: string]: unknown;\n};\n\nexport type ModelWithConst = {\n    String?: 'String';\n    number?: 0;\n    null?: null;\n    withType?: 'Some string';\n};\n\n/**\n * This is a model with one property and additionalProperties: true\n */\nexport type ModelWithAdditionalPropertiesEqTrue = {\n    /**\n     * This is a simple string property\n     */\n    prop?: string;\n    [key: string]: unknown;\n};\n\nexport type NestedAnyOfArraysNullable = {\n    nullableArray?: Array<string | boolean> | null;\n};\n\nexport type CompositionWithOneOfAndProperties = ({\n    foo: SimpleParameter;\n} | {\n    bar: NonAsciiStringæøåÆøÅöôêÊ字符串;\n}) & {\n    baz: number | null;\n    qux: number;\n};\n\n/**\n * An object that can be null\n */\nexport type NullableObject = {\n    foo?: string;\n} | null;\n\n/**\n * Some % character\n */\nexport type CharactersInDescription = string;\n\nexport type ModelWithNullableObject = {\n    data?: NullableObject;\n};\n\n/**\n * An object with additional properties that can be null (anyOf ref + null)\n */\nexport type ModelWithAdditionalPropertiesRef = {\n    [key: string]: NullableObject | null;\n};\n\nexport type ModelWithOneOfEnum = {\n    foo: 'Bar';\n} | {\n    foo: 'Baz';\n} | {\n    foo: 'Qux';\n} | {\n    content: string;\n    foo: 'Quux';\n} | {\n    content: [\n        string,\n        string\n    ];\n    foo: 'Corge';\n};\n\nexport type ModelWithNestedArrayEnumsDataFoo = 'foo' | 'bar';\n\nexport type ModelWithNestedArrayEnumsDataBar = 'baz' | 'qux';\n\nexport type ModelWithNestedArrayEnumsData = {\n    foo?: Array<ModelWithNestedArrayEnumsDataFoo>;\n    bar?: Array<ModelWithNestedArrayEnumsDataBar>;\n};\n\nexport type ModelWithNestedArrayEnums = {\n    array_strings?: Array<string>;\n    data?: ModelWithNestedArrayEnumsData;\n};\n\nexport type ModelWithNestedCompositionEnums = {\n    foo?: ModelWithNestedArrayEnumsDataFoo;\n};\n\nexport type ModelWithReadOnlyAndWriteOnly = {\n    foo: string;\n    readonly bar: string;\n};\n\nexport type ModelWithConstantSizeArray = [\n    number,\n    number\n];\n\nexport type ModelWithAnyOfConstantSizeArray = [\n    number | string,\n    number | string,\n    number | string\n];\n\nexport type ModelWithPrefixItemsConstantSizeArray = [\n    ModelWithInteger,\n    number | string,\n    string\n];\n\nexport type ModelWithAnyOfConstantSizeArrayNullable = [\n    number | null | string,\n    number | null | string,\n    number | null | string\n];\n\nexport type ModelWithAnyOfConstantSizeArrayWithNSizeAndOptions = [\n    number | Import,\n    number | Import\n];\n\nexport type ModelWithAnyOfConstantSizeArrayAndIntersect = [\n    number & string,\n    number & string\n];\n\nexport type ModelWithNumericEnumUnion = {\n    /**\n     * Период\n     */\n    value?: -10 | -1 | 0 | 1 | 3 | 6 | 12;\n};\n\n/**\n * Some description with `back ticks`\n */\nexport type ModelWithBackticksInDescription = {\n    /**\n     * The template `that` should be used for parsing and importing the contents of the CSV file.\n     *\n     * <br/><p>There is one placeholder currently supported:<ul>     <li><b>${x}</b> - refers to the n-th column in the CSV file, e.g. ${1}, ${2}, ...)</li></ul><p>Example of a correct JSON template:</p>\n     * <pre>\n     * [\n     * {\n     * \"resourceType\": \"Asset\",\n     * \"identifier\": {\n     * \"name\": \"${1}\",\n     * \"domain\": {\n     * \"name\": \"${2}\",\n     * \"community\": {\n     * \"name\": \"Some Community\"\n     * }\n     * }\n     * },\n     * \"attributes\" : {\n     * \"00000000-0000-0000-0000-000000003115\" : [ {\n     * \"value\" : \"${3}\"\n     * } ],\n     * \"00000000-0000-0000-0000-000000000222\" : [ {\n     * \"value\" : \"${4}\"\n     * } ]\n     * }\n     * }\n     * ]\n     * </pre>\n     */\n    template?: string;\n};\n\nexport type ModelWithOneOfAndProperties = (SimpleParameter | NonAsciiStringæøåÆøÅöôêÊ字符串) & {\n    baz: number | null;\n    qux: number;\n};\n\n/**\n * Model used to test deduplication strategy (unused)\n */\nexport type ParameterSimpleParameterUnused = string;\n\n/**\n * Model used to test deduplication strategy\n */\nexport type PostServiceWithEmptyTagResponse = string;\n\n/**\n * Model used to test deduplication strategy\n */\nexport type PostServiceWithEmptyTagResponse2 = string;\n\n/**\n * Model used to test deduplication strategy\n */\nexport type DeleteFooData = string;\n\n/**\n * Model used to test deduplication strategy\n */\nexport type DeleteFooData2 = string;\n\n/**\n * Model with restricted keyword name\n */\nexport type Import = string;\n\nexport type SchemaWithFormRestrictedKeys = {\n    description?: string;\n    'x-enum-descriptions'?: string;\n    'x-enum-varnames'?: string;\n    'x-enumNames'?: string;\n    title?: string;\n    object?: {\n        description?: string;\n        'x-enum-descriptions'?: string;\n        'x-enum-varnames'?: string;\n        'x-enumNames'?: string;\n        title?: string;\n    };\n    array?: Array<{\n        description?: string;\n        'x-enum-descriptions'?: string;\n        'x-enum-varnames'?: string;\n        'x-enumNames'?: string;\n        title?: string;\n    }>;\n};\n\n/**\n * This schema was giving PascalCase transformations a hard time\n */\nexport type IoK8sApimachineryPkgApisMetaV1DeleteOptions = {\n    /**\n     * Must be fulfilled before a deletion is carried out. If not possible, a 409 Conflict status will be returned.\n     */\n    preconditions?: IoK8sApimachineryPkgApisMetaV1Preconditions;\n};\n\n/**\n * This schema was giving PascalCase transformations a hard time\n */\nexport type IoK8sApimachineryPkgApisMetaV1Preconditions = {\n    /**\n     * Specifies the target ResourceVersion\n     */\n    resourceVersion?: string;\n    /**\n     * Specifies the target UID.\n     */\n    uid?: string;\n};\n\nexport type AdditionalPropertiesUnknownIssue = {\n    [key: string]: string | number;\n};\n\nexport type AdditionalPropertiesUnknownIssue2 = {\n    [key: string]: string | number;\n};\n\nexport type AdditionalPropertiesUnknownIssue3 = string & {\n    entries: {\n        [key: string]: AdditionalPropertiesUnknownIssue;\n    };\n};\n\nexport type AdditionalPropertiesIntegerIssue = {\n    value: number;\n    [key: string]: number;\n};\n\nexport type OneOfAllOfIssue = ((ConstValue | GenericSchemaDuplicateIssue1SystemBoolean) & _3eNum1Период) | GenericSchemaDuplicateIssue1SystemString;\n\nexport type GenericSchemaDuplicateIssue1SystemBoolean = {\n    item?: boolean;\n    error?: string | null;\n    readonly hasError?: boolean;\n    data?: {\n        [key: string]: never;\n    };\n};\n\nexport type GenericSchemaDuplicateIssue1SystemString = {\n    item?: string | null;\n    error?: string | null;\n    readonly hasError?: boolean;\n};\n\nexport type ExternalSharedModel = {\n    id: string;\n    name?: string;\n};\n\n/**\n * This is a model with one property containing a reference\n */\nexport type ModelWithReferenceWritable = {\n    prop?: ModelWithPropertiesWritable;\n};\n\n/**\n * This is a model with one property containing an array\n */\nexport type ModelWithArrayReadOnlyAndWriteOnlyWritable = {\n    prop?: Array<ModelWithReadOnlyAndWriteOnlyWritable>;\n    propWithFile?: Array<Blob | File>;\n    propWithNumber?: Array<number>;\n};\n\n/**\n * This is a model with one nested property\n */\nexport type ModelWithPropertiesWritable = {\n    required: string;\n    requiredAndNullable: string | null;\n    string?: string;\n    number?: number;\n    boolean?: boolean;\n    reference?: ModelWithString;\n    'property with space'?: string;\n    default?: string;\n    try?: string;\n};\n\n/**\n * This is a model that contains a some patterns\n */\nexport type ModelWithPatternWritable = {\n    key: string;\n    name: string;\n    id?: string;\n    text?: string;\n    patternWithSingleQuotes?: string;\n    patternWithNewline?: string;\n    patternWithBacktick?: string;\n    patternWithUnicode?: string;\n};\n\nexport type FileWritable = {\n    /**\n     * Mime\n     */\n    mime: string;\n};\n\nexport type ModelWithReadOnlyAndWriteOnlyWritable = {\n    foo: string;\n    baz: string;\n};\n\nexport type ModelWithAnyOfConstantSizeArrayWithNSizeAndOptionsWritable = [\n    number | Import,\n    number | Import\n];\n\nexport type AdditionalPropertiesUnknownIssueWritable = {\n    [key: string]: string | number;\n};\n\nexport type OneOfAllOfIssueWritable = ((ConstValue | GenericSchemaDuplicateIssue1SystemBoolean) & _3eNum1Период) | GenericSchemaDuplicateIssue1SystemString;\n\nexport type GenericSchemaDuplicateIssue1SystemBooleanWritable = {\n    item?: boolean;\n    error?: string | null;\n    data?: {\n        [key: string]: never;\n    };\n};\n\nexport type GenericSchemaDuplicateIssue1SystemStringWritable = {\n    item?: string | null;\n    error?: string | null;\n};\n\n/**\n * This is a reusable parameter\n */\nexport type SimpleParameter = string;\n\n/**\n * Parameter with illegal characters\n */\nexport type XFooBar = ModelWithString;\n\n/**\n * A reusable request body\n */\nexport type SimpleRequestBody = ModelWithString;\n\n/**\n * A reusable request body\n */\nexport type SimpleFormData = ModelWithString;\n\nexport type ExportData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no+tag';\n};\n\nexport type PatchApiVbyApiVersionNoTagData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no+tag';\n};\n\nexport type PatchApiVbyApiVersionNoTagResponses = {\n    /**\n     * OK\n     */\n    default: unknown;\n};\n\nexport type ImportData = {\n    body: ModelWithReadOnlyAndWriteOnlyWritable | ModelWithArrayReadOnlyAndWriteOnlyWritable;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no+tag';\n};\n\nexport type ImportResponses = {\n    /**\n     * Success\n     */\n    200: ModelFromZendesk;\n    /**\n     * Default success response\n     */\n    default: ModelWithReadOnlyAndWriteOnly;\n};\n\nexport type ImportResponse = ImportResponses[keyof ImportResponses];\n\nexport type FooWowData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no+tag';\n};\n\nexport type FooWowResponses = {\n    /**\n     * OK\n     */\n    default: unknown;\n};\n\nexport type ApiVVersionODataControllerCountData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple/$count';\n};\n\nexport type ApiVVersionODataControllerCountResponses = {\n    /**\n     * Success\n     */\n    200: ModelFromZendesk;\n};\n\nexport type ApiVVersionODataControllerCountResponse = ApiVVersionODataControllerCountResponses[keyof ApiVVersionODataControllerCountResponses];\n\nexport type GetApiVbyApiVersionSimpleOperationData = {\n    body?: never;\n    path: {\n        /**\n         * foo in method\n         */\n        foo_param: string;\n    };\n    query?: never;\n    url: '/api/v{api-version}/simple:operation';\n};\n\nexport type GetApiVbyApiVersionSimpleOperationErrors = {\n    /**\n     * Default error response\n     */\n    default: ModelWithBoolean;\n};\n\nexport type GetApiVbyApiVersionSimpleOperationError = GetApiVbyApiVersionSimpleOperationErrors[keyof GetApiVbyApiVersionSimpleOperationErrors];\n\nexport type GetApiVbyApiVersionSimpleOperationResponses = {\n    /**\n     * Response is a simple number\n     */\n    200: number;\n};\n\nexport type GetApiVbyApiVersionSimpleOperationResponse = GetApiVbyApiVersionSimpleOperationResponses[keyof GetApiVbyApiVersionSimpleOperationResponses];\n\nexport type DeleteCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type GetCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type HeadCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type OptionsCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type PatchCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type PostCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type PutCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type DeleteFooData3 = {\n    body?: never;\n    headers: {\n        /**\n         * Parameter with illegal characters\n         */\n        'x-Foo-Bar': ModelWithString;\n    };\n    path: {\n        /**\n         * foo in method\n         */\n        foo_param: string;\n        /**\n         * bar in method\n         */\n        BarParam: string;\n    };\n    query?: never;\n    url: '/api/v{api-version}/foo/{foo_param}/bar/{BarParam}';\n};\n\nexport type CallWithDescriptionsData = {\n    body?: never;\n    path?: never;\n    query?: {\n        /**\n         * Testing multiline comments in string: First line\n         * Second line\n         *\n         * Fourth line\n         */\n        parameterWithBreaks?: string;\n        /**\n         * Testing backticks in string: `backticks` and ```multiple backticks``` should work\n         */\n        parameterWithBackticks?: string;\n        /**\n         * Testing slashes in string: \\backwards\\\\\\ and /forwards/// should work\n         */\n        parameterWithSlashes?: string;\n        /**\n         * Testing expression placeholders in string: ${expression} should work\n         */\n        parameterWithExpressionPlaceholders?: string;\n        /**\n         * Testing quotes in string: 'single quote''' and \"double quotes\"\"\" should work\n         */\n        parameterWithQuotes?: string;\n        /**\n         * Testing reserved characters in string: * inline * and ** inline ** should work\n         */\n        parameterWithReservedCharacters?: string;\n    };\n    url: '/api/v{api-version}/descriptions';\n};\n\nexport type DeprecatedCallData = {\n    body?: never;\n    headers: {\n        /**\n         * This parameter is deprecated\n         *\n         * @deprecated\n         */\n        parameter: DeprecatedModel | null;\n    };\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/parameters/deprecated';\n};\n\nexport type CallWithParametersData = {\n    /**\n     * This is the parameter that goes into the body\n     */\n    body: {\n        [key: string]: unknown;\n    } | null;\n    headers: {\n        /**\n         * This is the parameter that goes into the header\n         */\n        parameterHeader: string | null;\n    };\n    path: {\n        /**\n         * This is the parameter that goes into the path\n         */\n        parameterPath: string | null;\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string | null;\n    };\n    query: {\n        foo_ref_enum?: ModelWithNestedArrayEnumsDataFoo;\n        foo_all_of_enum: ModelWithNestedArrayEnumsDataFoo;\n        /**\n         * This is the parameter that goes into the query params\n         */\n        cursor: string | null;\n    };\n    url: '/api/v{api-version}/parameters/{parameterPath}';\n};\n\nexport type CallWithWeirdParameterNamesData = {\n    /**\n     * This is the parameter that goes into the body\n     */\n    body: ModelWithString | null;\n    headers: {\n        /**\n         * This is the parameter that goes into the request header\n         */\n        'parameter.header': string | null;\n    };\n    path: {\n        /**\n         * This is the parameter that goes into the path\n         */\n        'parameter.path.1'?: string;\n        /**\n         * This is the parameter that goes into the path\n         */\n        'parameter-path-2'?: string;\n        /**\n         * This is the parameter that goes into the path\n         */\n        'PARAMETER-PATH-3'?: string;\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string | null;\n    };\n    query: {\n        /**\n         * This is the parameter with a reserved keyword\n         */\n        default?: string;\n        /**\n         * This is the parameter that goes into the request query params\n         */\n        'parameter-query': string | null;\n    };\n    url: '/api/v{api-version}/parameters/{parameter.path.1}/{parameter-path-2}/{PARAMETER-PATH-3}';\n};\n\nexport type GetCallWithOptionalParamData = {\n    /**\n     * This is a required parameter\n     */\n    body: ModelWithOneOfEnum;\n    path?: never;\n    query?: {\n        /**\n         * This is an optional parameter\n         */\n        page?: number;\n    };\n    url: '/api/v{api-version}/parameters';\n};\n\nexport type PostCallWithOptionalParamData = {\n    /**\n     * This is an optional parameter\n     */\n    body?: {\n        offset?: number | null;\n    };\n    path?: never;\n    query: {\n        /**\n         * This is a required parameter\n         */\n        parameter: Pageable;\n    };\n    url: '/api/v{api-version}/parameters';\n};\n\nexport type PostCallWithOptionalParamResponses = {\n    /**\n     * Response is a simple number\n     */\n    200: number;\n    /**\n     * Success\n     */\n    204: void;\n};\n\nexport type PostCallWithOptionalParamResponse = PostCallWithOptionalParamResponses[keyof PostCallWithOptionalParamResponses];\n\nexport type PostApiVbyApiVersionRequestBodyData = {\n    /**\n     * A reusable request body\n     */\n    body?: SimpleRequestBody;\n    path?: never;\n    query?: {\n        /**\n         * This is a reusable parameter\n         */\n        parameter?: string;\n    };\n    url: '/api/v{api-version}/requestBody';\n};\n\nexport type PostApiVbyApiVersionFormDataData = {\n    /**\n     * A reusable request body\n     */\n    body?: SimpleFormData;\n    path?: never;\n    query?: {\n        /**\n         * This is a reusable parameter\n         */\n        parameter?: string;\n    };\n    url: '/api/v{api-version}/formData';\n};\n\nexport type CallWithDefaultParametersData = {\n    body?: never;\n    path?: never;\n    query?: {\n        /**\n         * This is a simple string with default value\n         */\n        parameterString?: string | null;\n        /**\n         * This is a simple number with default value\n         */\n        parameterNumber?: number | null;\n        /**\n         * This is a simple boolean with default value\n         */\n        parameterBoolean?: boolean | null;\n        /**\n         * This is a simple enum with default value\n         */\n        parameterEnum?: 'Success' | 'Warning' | 'Error';\n        /**\n         * This is a simple model with default value\n         */\n        parameterModel?: ModelWithString | null;\n    };\n    url: '/api/v{api-version}/defaults';\n};\n\nexport type CallWithDefaultOptionalParametersData = {\n    body?: never;\n    path?: never;\n    query?: {\n        /**\n         * This is a simple string that is optional with default value\n         */\n        parameterString?: string;\n        /**\n         * This is a simple number that is optional with default value\n         */\n        parameterNumber?: number;\n        /**\n         * This is a simple boolean that is optional with default value\n         */\n        parameterBoolean?: boolean;\n        /**\n         * This is a simple enum that is optional with default value\n         */\n        parameterEnum?: 'Success' | 'Warning' | 'Error';\n        /**\n         * This is a simple model that is optional with default value\n         */\n        parameterModel?: ModelWithString;\n    };\n    url: '/api/v{api-version}/defaults';\n};\n\nexport type CallToTestOrderOfParamsData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * This is a optional string with default\n         */\n        parameterOptionalStringWithDefault?: string;\n        /**\n         * This is a optional string with empty default\n         */\n        parameterOptionalStringWithEmptyDefault?: string;\n        /**\n         * This is a optional string with no default\n         */\n        parameterOptionalStringWithNoDefault?: string;\n        /**\n         * This is a string with default\n         */\n        parameterStringWithDefault: string;\n        /**\n         * This is a string with empty default\n         */\n        parameterStringWithEmptyDefault: string;\n        /**\n         * This is a string with no default\n         */\n        parameterStringWithNoDefault: string;\n        /**\n         * This is a string that can be null with no default\n         */\n        parameterStringNullableWithNoDefault?: string | null;\n        /**\n         * This is a string that can be null with default\n         */\n        parameterStringNullableWithDefault?: string | null;\n    };\n    url: '/api/v{api-version}/defaults';\n};\n\nexport type DuplicateNameData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/duplicate';\n};\n\nexport type DuplicateName2Data = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/duplicate';\n};\n\nexport type DuplicateName3Data = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/duplicate';\n};\n\nexport type DuplicateName4Data = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/duplicate';\n};\n\nexport type CallWithNoContentResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no-content';\n};\n\nexport type CallWithNoContentResponseResponses = {\n    /**\n     * Success\n     */\n    204: void;\n};\n\nexport type CallWithNoContentResponseResponse = CallWithNoContentResponseResponses[keyof CallWithNoContentResponseResponses];\n\nexport type CallWithResponseAndNoContentResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multiple-tags/response-and-no-content';\n};\n\nexport type CallWithResponseAndNoContentResponseResponses = {\n    /**\n     * Response is a simple number\n     */\n    200: number;\n    /**\n     * Success\n     */\n    204: void;\n};\n\nexport type CallWithResponseAndNoContentResponseResponse = CallWithResponseAndNoContentResponseResponses[keyof CallWithResponseAndNoContentResponseResponses];\n\nexport type DummyAData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multiple-tags/a';\n};\n\nexport type DummyAResponses = {\n    200: _400;\n};\n\nexport type DummyAResponse = DummyAResponses[keyof DummyAResponses];\n\nexport type DummyBData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multiple-tags/b';\n};\n\nexport type DummyBResponses = {\n    /**\n     * Success\n     */\n    204: void;\n};\n\nexport type DummyBResponse = DummyBResponses[keyof DummyBResponses];\n\nexport type CallWithResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/response';\n};\n\nexport type CallWithResponseResponses = {\n    default: Import;\n};\n\nexport type CallWithResponseResponse = CallWithResponseResponses[keyof CallWithResponseResponses];\n\nexport type CallWithDuplicateResponsesData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/response';\n};\n\nexport type CallWithDuplicateResponsesErrors = {\n    /**\n     * Message for 500 error\n     */\n    500: ModelWithStringError;\n    /**\n     * Message for 501 error\n     */\n    501: ModelWithStringError;\n    /**\n     * Message for 502 error\n     */\n    502: ModelWithStringError;\n    /**\n     * Message for 4XX errors\n     */\n    '4XX': DictionaryWithArray;\n    /**\n     * Default error response\n     */\n    default: ModelWithBoolean;\n};\n\nexport type CallWithDuplicateResponsesError = CallWithDuplicateResponsesErrors[keyof CallWithDuplicateResponsesErrors];\n\nexport type CallWithDuplicateResponsesResponses = {\n    /**\n     * Message for 200 response\n     */\n    200: ModelWithBoolean & ModelWithInteger;\n    /**\n     * Message for 201 response\n     */\n    201: ModelWithString;\n    /**\n     * Message for 202 response\n     */\n    202: ModelWithString;\n};\n\nexport type CallWithDuplicateResponsesResponse = CallWithDuplicateResponsesResponses[keyof CallWithDuplicateResponsesResponses];\n\nexport type CallWithResponsesData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/response';\n};\n\nexport type CallWithResponsesErrors = {\n    /**\n     * Message for 500 error\n     */\n    500: ModelWithStringError;\n    /**\n     * Message for 501 error\n     */\n    501: ModelWithStringError;\n    /**\n     * Message for 502 error\n     */\n    502: ModelWithStringError;\n    /**\n     * Message for default response\n     */\n    default: ModelWithStringError;\n};\n\nexport type CallWithResponsesError = CallWithResponsesErrors[keyof CallWithResponsesErrors];\n\nexport type CallWithResponsesResponses = {\n    /**\n     * Message for 200 response\n     */\n    200: {\n        readonly '@namespace.string'?: string;\n        readonly '@namespace.integer'?: number;\n        readonly value?: Array<ModelWithString>;\n    };\n    /**\n     * Message for 201 response\n     */\n    201: ModelThatExtends;\n    /**\n     * Message for 202 response\n     */\n    202: ModelThatExtendsExtends;\n};\n\nexport type CallWithResponsesResponse = CallWithResponsesResponses[keyof CallWithResponsesResponses];\n\nexport type CollectionFormatData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * This is an array parameter that is sent as csv format (comma-separated values)\n         */\n        parameterArrayCSV: Array<string> | null;\n        /**\n         * This is an array parameter that is sent as ssv format (space-separated values)\n         */\n        parameterArraySSV: Array<string> | null;\n        /**\n         * This is an array parameter that is sent as tsv format (tab-separated values)\n         */\n        parameterArrayTSV: Array<string> | null;\n        /**\n         * This is an array parameter that is sent as pipes format (pipe-separated values)\n         */\n        parameterArrayPipes: Array<string> | null;\n        /**\n         * This is an array parameter that is sent as multi format (multiple parameter instances)\n         */\n        parameterArrayMulti: Array<string> | null;\n    };\n    url: '/api/v{api-version}/collectionFormat';\n};\n\nexport type TypesData = {\n    body?: never;\n    path?: {\n        /**\n         * This is a number parameter\n         */\n        id?: number;\n    };\n    query: {\n        /**\n         * This is a number parameter\n         */\n        parameterNumber: number;\n        /**\n         * This is a string parameter\n         */\n        parameterString: string | null;\n        /**\n         * This is a boolean parameter\n         */\n        parameterBoolean: boolean | null;\n        /**\n         * This is an object parameter\n         */\n        parameterObject: {\n            [key: string]: unknown;\n        } | null;\n        /**\n         * This is an array parameter\n         */\n        parameterArray: Array<string> | null;\n        /**\n         * This is a dictionary parameter\n         */\n        parameterDictionary: {\n            [key: string]: unknown;\n        } | null;\n        /**\n         * This is an enum parameter\n         */\n        parameterEnum: 'Success' | 'Warning' | 'Error' | null;\n    };\n    url: '/api/v{api-version}/types';\n};\n\nexport type TypesResponses = {\n    /**\n     * Response is a simple number\n     */\n    200: number;\n    /**\n     * Response is a simple string\n     */\n    201: string;\n    /**\n     * Response is a simple boolean\n     */\n    202: boolean;\n    /**\n     * Response is a simple object\n     */\n    203: {\n        [key: string]: unknown;\n    };\n};\n\nexport type TypesResponse = TypesResponses[keyof TypesResponses];\n\nexport type UploadFileData = {\n    body: Blob | File;\n    path: {\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string | null;\n    };\n    query?: never;\n    url: '/api/v{api-version}/upload';\n};\n\nexport type UploadFileResponses = {\n    200: boolean;\n};\n\nexport type UploadFileResponse = UploadFileResponses[keyof UploadFileResponses];\n\nexport type FileResponseData = {\n    body?: never;\n    path: {\n        id: string;\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string;\n    };\n    query?: never;\n    url: '/api/v{api-version}/file/{id}';\n};\n\nexport type FileResponseResponses = {\n    /**\n     * Success\n     */\n    200: Blob | File;\n};\n\nexport type FileResponseResponse = FileResponseResponses[keyof FileResponseResponses];\n\nexport type ComplexTypesData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * Parameter containing object\n         */\n        parameterObject: {\n            first?: {\n                second?: {\n                    third?: string;\n                };\n            };\n        };\n        /**\n         * Parameter containing reference\n         */\n        parameterReference: ModelWithString;\n    };\n    url: '/api/v{api-version}/complex';\n};\n\nexport type ComplexTypesErrors = {\n    /**\n     * 400 `server` error\n     */\n    400: unknown;\n    /**\n     * 500 server error\n     */\n    500: unknown;\n};\n\nexport type ComplexTypesResponses = {\n    /**\n     * Successful response\n     */\n    200: Array<ModelWithString>;\n};\n\nexport type ComplexTypesResponse = ComplexTypesResponses[keyof ComplexTypesResponses];\n\nexport type MultipartResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multipart';\n};\n\nexport type MultipartResponseResponses = {\n    /**\n     * OK\n     */\n    200: {\n        file?: Blob | File;\n        metadata?: {\n            foo?: string;\n            bar?: string;\n        };\n    };\n};\n\nexport type MultipartResponseResponse = MultipartResponseResponses[keyof MultipartResponseResponses];\n\nexport type MultipartRequestData = {\n    body?: {\n        content?: Blob | File;\n        data?: ModelWithString | null;\n    };\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multipart';\n};\n\nexport type ComplexParamsData = {\n    body?: {\n        readonly key: string | null;\n        name: string | null;\n        enabled?: boolean;\n        type: 'Monkey' | 'Horse' | 'Bird';\n        listOfModels?: Array<ModelWithString> | null;\n        listOfStrings?: Array<string> | null;\n        parameters: ModelWithString | ModelWithEnum | ModelWithArray | ModelWithDictionary;\n        readonly user?: {\n            readonly id?: number;\n            readonly name?: string | null;\n        };\n    };\n    path: {\n        id: number;\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string;\n    };\n    query?: never;\n    url: '/api/v{api-version}/complex/{id}';\n};\n\nexport type ComplexParamsResponses = {\n    /**\n     * Success\n     */\n    200: ModelWithString;\n};\n\nexport type ComplexParamsResponse = ComplexParamsResponses[keyof ComplexParamsResponses];\n\nexport type CallWithResultFromHeaderData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/header';\n};\n\nexport type CallWithResultFromHeaderErrors = {\n    /**\n     * 400 server error\n     */\n    400: unknown;\n    /**\n     * 500 server error\n     */\n    500: unknown;\n};\n\nexport type CallWithResultFromHeaderResponses = {\n    /**\n     * Successful response\n     */\n    200: unknown;\n};\n\nexport type TestErrorCodeData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * Status code to return\n         */\n        status: number;\n    };\n    url: '/api/v{api-version}/error';\n};\n\nexport type TestErrorCodeErrors = {\n    /**\n     * Custom message: Internal Server Error\n     */\n    500: unknown;\n    /**\n     * Custom message: Not Implemented\n     */\n    501: unknown;\n    /**\n     * Custom message: Bad Gateway\n     */\n    502: unknown;\n    /**\n     * Custom message: Service Unavailable\n     */\n    503: unknown;\n};\n\nexport type TestErrorCodeResponses = {\n    /**\n     * Custom message: Successful response\n     */\n    200: unknown;\n};\n\nexport type NonAsciiæøåÆøÅöôêÊ字符串Data = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * Dummy input param\n         */\n        nonAsciiParamæøåÆØÅöôêÊ: number;\n    };\n    url: '/api/v{api-version}/non-ascii-æøåÆØÅöôêÊ字符串';\n};\n\nexport type NonAsciiæøåÆøÅöôêÊ字符串Responses = {\n    /**\n     * Successful response\n     */\n    200: Array<NonAsciiStringæøåÆøÅöôêÊ字符串>;\n};\n\nexport type NonAsciiæøåÆøÅöôêÊ字符串Response = NonAsciiæøåÆøÅöôêÊ字符串Responses[keyof NonAsciiæøåÆøÅöôêÊ字符串Responses];\n\nexport type PutWithFormUrlEncodedData = {\n    body: ArrayWithStrings;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/non-ascii-æøåÆØÅöôêÊ字符串';\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-nuxt/tsconfig-node16-sdk/client/client.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport { useAsyncData, useFetch, useLazyAsyncData, useLazyFetch } from 'nuxt/app';\nimport { reactive, ref, toValue, watch } from 'vue';\n\nimport { createSseClient } from '../core/serverSentEvents.gen.js';\nimport type { HttpMethod } from '../core/types.gen.js';\nimport { getValidRequestBody } from '../core/utils.gen.js';\nimport type { Client, Config, RequestOptions } from './types.gen.js';\nimport {\n  buildUrl,\n  createConfig,\n  executeFetchFn,\n  mergeConfigs,\n  mergeHeaders,\n  mergeInterceptors,\n  serializeBody,\n  setAuthParams,\n  unwrapRefs,\n} from './utils.gen.js';\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 beforeRequest = async (options: RequestOptions) => {\n    const opts = {\n      ..._config,\n      ...options,\n      $fetch: options.$fetch ?? _config.$fetch ?? $fetch,\n      headers: mergeHeaders(_config.headers, options.headers),\n      onRequest: mergeInterceptors(_config.onRequest, options.onRequest),\n      onResponse: mergeInterceptors(_config.onResponse, options.onResponse),\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    const url = buildUrl(opts);\n\n    return { opts, url };\n  };\n\n  const request: Client['request'] = ({ asyncDataOptions, composable = '$fetch', ...options }) => {\n    const key = options.key;\n    const opts = {\n      ..._config,\n      ...options,\n      $fetch: options.$fetch ?? _config.$fetch ?? $fetch,\n      headers: mergeHeaders(_config.headers, options.headers),\n      onRequest: mergeInterceptors(_config.onRequest, options.onRequest),\n      onResponse: mergeInterceptors(_config.onResponse, options.onResponse),\n    };\n\n    const { requestValidator, responseTransformer, responseValidator, security } = opts;\n    if (requestValidator || security) {\n      // auth must happen in interceptors otherwise we'd need to require\n      // asyncContext enabled\n      // https://nuxt.com/docs/guide/going-further/experimental-features#asynccontext\n      opts.onRequest = [\n        async ({ options }) => {\n          if (security) {\n            await setAuthParams({\n              auth: opts.auth,\n              headers: options.headers,\n              query: options.query,\n              security,\n            });\n          }\n\n          if (requestValidator) {\n            await requestValidator({\n              ...options,\n              // @ts-expect-error\n              body: options.rawBody,\n            });\n          }\n        },\n        ...opts.onRequest,\n      ];\n    }\n\n    if (responseTransformer || responseValidator) {\n      opts.onResponse = [\n        ...opts.onResponse,\n        async ({ options, response }) => {\n          if (options.responseType && options.responseType !== 'json') {\n            return;\n          }\n\n          if (!response.ok) {\n            return;\n          }\n\n          if (responseValidator) {\n            await responseValidator(response._data);\n          }\n\n          if (responseTransformer) {\n            response._data = await responseTransformer(response._data);\n          }\n        },\n      ];\n    }\n\n    // remove Content-Type header if body is empty to avoid sending invalid requests\n    if (opts.body === undefined || opts.body === '') {\n      opts.headers.delete('Content-Type');\n    }\n\n    const fetchFn = opts.$fetch;\n\n    if (composable === '$fetch') {\n      return executeFetchFn(\n        // @ts-expect-error\n        opts,\n        fetchFn,\n      );\n    }\n\n    if (composable === 'useFetch' || composable === 'useLazyFetch') {\n      opts.rawBody = opts.body;\n      const bodyParams = reactive({\n        body: opts.body,\n        bodySerializer: opts.bodySerializer,\n      });\n      const body = ref(serializeBody({ ...opts, body: toValue(opts.body) }));\n      opts.body = body;\n      watch(bodyParams, (changed) => {\n        body.value = serializeBody(changed);\n      });\n      return composable === 'useLazyFetch'\n        ? useLazyFetch(() => buildUrl(opts), { ...opts, ...asyncDataOptions })\n        : useFetch(() => buildUrl(opts), { ...opts, ...asyncDataOptions });\n    }\n\n    const handler: any = () =>\n      executeFetchFn(\n        // @ts-expect-error\n        opts,\n        fetchFn,\n      );\n\n    if (composable === 'useAsyncData') {\n      return key\n        ? useAsyncData(key, handler, asyncDataOptions)\n        : useAsyncData(handler, asyncDataOptions);\n    }\n\n    if (composable === 'useLazyAsyncData') {\n      return key\n        ? useLazyAsyncData(key, handler, asyncDataOptions)\n        : useLazyAsyncData(handler, asyncDataOptions);\n    }\n\n    return undefined as any;\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      ...unwrapRefs(opts),\n      body: opts.body as BodyInit | null | undefined,\n      method,\n      onRequest: undefined,\n      serializedBody: getValidRequestBody(opts) as BodyInit | null | undefined,\n      signal: unwrapRefs(opts.signal) as AbortSignal,\n      url,\n    });\n  };\n\n  const _buildUrl: Client['buildUrl'] = (options) =>\n    buildUrl({ ..._config, ...options } as typeof 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    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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-nuxt/tsconfig-node16-sdk/client/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type { Auth } from '../core/auth.gen.js';\nexport type { QuerySerializerOptions } from '../core/bodySerializer.gen.js';\nexport {\n  formDataBodySerializer,\n  jsonBodySerializer,\n  urlSearchParamsBodySerializer,\n} from '../core/bodySerializer.gen.js';\nexport { buildClientParams } from '../core/params.gen.js';\nexport { serializeQueryKeyValue } from '../core/queryKeySerializer.gen.js';\nexport { createClient } from './client.gen.js';\nexport type {\n  Client,\n  ClientOptions,\n  Composable,\n  Config,\n  CreateClientConfig,\n  Options,\n  RequestOptions,\n  RequestResult,\n  TDataShape,\n} from './types.gen.js';\nexport { createConfig } from './utils.gen.js';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-nuxt/tsconfig-node16-sdk/client/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type {\n  AsyncDataOptions,\n  useAsyncData,\n  useFetch,\n  UseFetchOptions,\n  useLazyAsyncData,\n  useLazyFetch,\n} from 'nuxt/app';\nimport type { Ref } from 'vue';\n\nimport type { Auth } from '../core/auth.gen.js';\nimport type { QuerySerializerOptions } from '../core/bodySerializer.gen.js';\nimport type {\n  ServerSentEventsOptions,\n  ServerSentEventsResult,\n} from '../core/serverSentEvents.gen.js';\nimport type { Client as CoreClient, Config as CoreConfig } from '../core/types.gen.js';\n\nexport type ArraySeparatorStyle = ArrayStyle | MatrixStyle;\ntype ArrayStyle = 'form' | 'spaceDelimited' | 'pipeDelimited';\ntype MatrixStyle = 'label' | 'matrix' | 'simple';\nexport type ObjectSeparatorStyle = ObjectStyle | MatrixStyle;\ntype ObjectStyle = 'form' | 'deepObject';\n\nexport type QuerySerializer = (query: Parameters<Client['buildUrl']>[0]['query']) => string;\n\ntype WithRefs<TData> = {\n  [K in keyof TData]: NonNullable<TData[K]> extends object\n    ? WithRefs<NonNullable<TData[K]>> | Ref<NonNullable<TData[K]>> | Extract<TData[K], null>\n    : NonNullable<TData[K]> | Ref<NonNullable<TData[K]>> | Extract<TData[K], null>;\n};\n\n// copied from Nuxt\nexport type KeysOf<T> = Array<T extends T ? (keyof T extends string ? keyof T : never) : never>;\n\nexport interface Config<T extends ClientOptions = ClientOptions>\n  extends\n    Omit<FetchOptions<unknown>, 'baseURL' | 'body' | 'headers' | 'method' | 'query'>,\n    WithRefs<Pick<FetchOptions<unknown>, 'query'>>,\n    Omit<CoreConfig, 'querySerializer'> {\n  /**\n   * Base URL for all requests made by this client.\n   */\n  baseURL?: T['baseURL'];\n  /**\n   * A function for serializing request query parameters. By default, arrays\n   * will be exploded in form style, objects will be exploded in deepObject\n   * style, and reserved characters are percent-encoded.\n   *\n   * {@link https://swagger.io/docs/specification/serialization/#query View examples}\n   */\n  querySerializer?: QuerySerializer | QuerySerializerOptions;\n}\n\nexport interface RequestOptions<\n  TComposable extends Composable = '$fetch',\n  ResT = unknown,\n  DefaultT = undefined,\n  Url extends string = string,\n>\n  extends\n    Config,\n    WithRefs<{\n      path?: FetchOptions<unknown>['query'];\n      query?: FetchOptions<unknown>['query'];\n    }>,\n    Pick<\n      ServerSentEventsOptions<ResT>,\n      | 'onSseError'\n      | 'onSseEvent'\n      | 'sseDefaultRetryDelay'\n      | 'sseMaxRetryAttempts'\n      | 'sseMaxRetryDelay'\n    > {\n  asyncDataOptions?: AsyncDataOptions<ResT, ResT, KeysOf<ResT>, DefaultT>;\n  /**\n   * Any body that you want to add to your request.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/fetch#body}\n   */\n  body?: NonNullable<unknown> | Ref<NonNullable<unknown>> | null;\n  composable?: TComposable;\n  key?: string;\n  rawBody?: NonNullable<unknown> | Ref<NonNullable<unknown>> | null;\n  /**\n   * Security mechanism(s) to use for the request.\n   */\n  security?: ReadonlyArray<Auth>;\n  url: Url;\n}\n\nexport type RequestResult<\n  TComposable extends Composable,\n  ResT,\n  TError,\n> = TComposable extends '$fetch'\n  ? ReturnType<typeof $fetch<ResT>>\n  : TComposable extends 'useAsyncData'\n    ? ReturnType<typeof useAsyncData<ResT | null, TError>>\n    : TComposable extends 'useFetch'\n      ? ReturnType<typeof useFetch<ResT | null, TError>>\n      : TComposable extends 'useLazyAsyncData'\n        ? ReturnType<typeof useLazyAsyncData<ResT | null, TError>>\n        : TComposable extends 'useLazyFetch'\n          ? ReturnType<typeof useLazyFetch<ResT | null, TError>>\n          : never;\n\nexport interface ClientOptions {\n  baseURL?: string;\n}\n\ntype MethodFn = <\n  TComposable extends Composable = '$fetch',\n  ResT = unknown,\n  TError = unknown,\n  DefaultT = undefined,\n>(\n  options: Omit<RequestOptions<TComposable, ResT, DefaultT>, 'method'>,\n) => RequestResult<TComposable, ResT, TError>;\n\ntype SseFn = <\n  TComposable extends Composable = '$fetch',\n  ResT = unknown,\n  TError = unknown,\n  DefaultT = undefined,\n>(\n  options: Omit<RequestOptions<TComposable, ResT, DefaultT>, 'method'>,\n) => Promise<ServerSentEventsResult<RequestResult<TComposable, ResT, TError>>>;\n\ntype RequestFn = <\n  TComposable extends Composable = '$fetch',\n  ResT = unknown,\n  TError = unknown,\n  DefaultT = undefined,\n>(\n  options: Omit<RequestOptions<TComposable, ResT, DefaultT>, 'method'> &\n    Pick<Required<RequestOptions<TComposable, ResT, DefaultT>>, 'method'>,\n) => RequestResult<TComposable, ResT, TError>;\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 = ClientOptions> = (\n  override?: Config<ClientOptions & T>,\n) => Config<Required<ClientOptions> & T>;\n\nexport interface TDataShape {\n  body?: unknown;\n  headers?: unknown;\n  path?: FetchOptions<unknown>['query'];\n  query?: FetchOptions<unknown>['query'];\n  url: string;\n}\n\nexport type BuildUrlOptions<\n  TData extends Omit<TDataShape, 'headers'> = Omit<TDataShape, 'headers'>,\n> = Pick<WithRefs<TData>, 'path' | 'query'> &\n  Pick<TData, 'url'> &\n  Pick<Options<'$fetch', TData>, 'baseURL' | 'querySerializer'>;\n\ntype BuildUrlFn = <TData extends Omit<TDataShape, 'headers'>>(\n  options: BuildUrlOptions<TData>,\n) => string;\n\nexport type Client = CoreClient<RequestFn, Config, MethodFn, BuildUrlFn, SseFn>;\n\ntype OmitKeys<T, K> = Pick<T, Exclude<keyof T, K>>;\n\nexport type Options<\n  TComposable extends Composable = '$fetch',\n  TData extends TDataShape = TDataShape,\n  ResT = unknown,\n  DefaultT = undefined,\n> = OmitKeys<RequestOptions<TComposable, ResT, DefaultT>, 'body' | 'path' | 'query' | 'url'> &\n  ([TData] extends [never] ? unknown : WithRefs<Omit<TData, 'url'>>);\n\ntype FetchOptions<TData> = Omit<UseFetchOptions<TData, TData>, keyof AsyncDataOptions<TData>>;\n\nexport type Composable =\n  | '$fetch'\n  | 'useAsyncData'\n  | 'useFetch'\n  | 'useLazyAsyncData'\n  | 'useLazyFetch';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-nuxt/tsconfig-node16-sdk/client/utils.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { ComputedRef, Ref } from 'vue';\nimport { isRef, toValue, unref } from 'vue';\n\nimport { getAuthToken } from '../core/auth.gen.js';\nimport type { QuerySerializerOptions } from '../core/bodySerializer.gen.js';\nimport { jsonBodySerializer } from '../core/bodySerializer.gen.js';\nimport {\n  serializeArrayParam,\n  serializeObjectParam,\n  serializePrimitiveParam,\n} from '../core/pathSerializer.gen.js';\nimport type {\n  ArraySeparatorStyle,\n  BuildUrlOptions,\n  Client,\n  ClientOptions,\n  Config,\n  QuerySerializer,\n  RequestOptions,\n} from './types.gen.js';\n\ntype PathSerializer = Pick<Required<BuildUrlOptions>, 'path' | 'url'>;\n\nconst PATH_PARAM_RE = /\\{[^{}]+\\}/g;\n\ntype MaybeArray<T> = T | T[];\n\nconst 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 = toValue((toValue(path) as Record<string, unknown> | undefined)?.[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 createQuerySerializer = <T = unknown>({\n  parameters = {},\n  ...args\n}: QuerySerializerOptions = {}) => {\n  const querySerializer = (queryParams: T) => {\n    const search: string[] = [];\n    const qParams = toValue(queryParams);\n    if (qParams && typeof qParams === 'object') {\n      for (const name in qParams) {\n        const value = toValue(qParams[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\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    (toValue(options.query) as Record<string, unknown> | undefined)?.[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    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        const queryValue = toValue(options.query) as Record<string, unknown> | undefined;\n        if (queryValue) {\n          queryValue[name] = token;\n        }\n        break;\n      }\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  const url = 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  return url;\n};\n\nexport const getUrl = ({\n  baseUrl,\n  path,\n  query,\n  querySerializer,\n  url: _url,\n}: Pick<BuildUrlOptions, 'path' | 'query' | 'url'> & {\n  baseUrl?: string;\n  querySerializer: QuerySerializer;\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 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 || typeof header !== 'object') {\n      continue;\n    }\n\n    let h: unknown = header;\n    if (isRef(h)) {\n      h = unref(h);\n    }\n\n    const iterator =\n      h instanceof Headers ? headersEntries(h) : Object.entries(h as Record<string, unknown>);\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, unwrapRefs(v) as string);\n        }\n      } else if (value !== undefined) {\n        const v = unwrapRefs(value);\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(key, typeof v === 'object' ? JSON.stringify(v) : (v as string));\n      }\n    }\n  }\n  return mergedHeaders;\n};\n\nexport const mergeInterceptors = <T>(...args: Array<MaybeArray<T>>): Array<T> =>\n  args.reduce<Array<T>>((acc, item) => {\n    if (typeof item === 'function') {\n      acc.push(item);\n    } else if (Array.isArray(item)) {\n      return acc.concat(item);\n    }\n    return acc;\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  querySerializer: defaultQuerySerializer,\n  ...override,\n});\n\ntype UnwrapRefs<T> =\n  T extends Ref<infer V>\n    ? V\n    : T extends ComputedRef<infer V>\n      ? V\n      : T extends Record<string, unknown> // this doesn't handle functions well\n        ? { [K in keyof T]: UnwrapRefs<T[K]> }\n        : T;\n\nexport const unwrapRefs = <T>(value: T): UnwrapRefs<T> => {\n  if (value === null || typeof value !== 'object' || value instanceof Headers) {\n    return (isRef(value) ? unref(value) : value) as UnwrapRefs<T>;\n  }\n\n  if (\n    value instanceof Blob ||\n    value instanceof FormData ||\n    value instanceof ReadableStream ||\n    value instanceof AbortSignal\n  ) {\n    return value as UnwrapRefs<T>;\n  }\n\n  if (Array.isArray(value)) {\n    return value.map((item) => unwrapRefs(item)) as UnwrapRefs<T>;\n  }\n\n  if (isRef(value)) {\n    return unwrapRefs(unref(value) as T);\n  }\n\n  // unwrap into new object to avoid modifying the source\n  const result: Record<string, unknown> = {};\n  for (const key in value) {\n    result[key] = unwrapRefs(value[key] as T);\n  }\n  return result as UnwrapRefs<T>;\n};\n\nexport const serializeBody = (\n  opts: Pick<Parameters<Client['request']>[0], 'body' | 'bodySerializer'>,\n) => {\n  if (opts.body && opts.bodySerializer) {\n    return opts.bodySerializer(opts.body);\n  }\n  return opts.body;\n};\n\nexport const executeFetchFn = (\n  opts: Omit<Parameters<Client['request']>[0], 'composable'>,\n  fetchFn: Required<Config>['$fetch'],\n) => {\n  const unwrappedOpts = unwrapRefs(opts);\n  unwrappedOpts.rawBody = unwrappedOpts.body;\n  unwrappedOpts.body = serializeBody(unwrappedOpts);\n  return fetchFn(\n    buildUrl(opts),\n    // @ts-expect-error\n    unwrappedOpts,\n  );\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-nuxt/tsconfig-node16-sdk/client.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport { type ClientOptions, type Config, createClient, createConfig } from './client/index.js';\nimport type { ClientOptions as ClientOptions2 } from './types.gen.js';\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: 'http://localhost:3000/base' }));\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-nuxt/tsconfig-node16-sdk/core/auth.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-nuxt/tsconfig-node16-sdk/core/bodySerializer.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { ArrayStyle, ObjectStyle, SerializerOptions } from './pathSerializer.gen.js';\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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-nuxt/tsconfig-node16-sdk/core/params.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-nuxt/tsconfig-node16-sdk/core/pathSerializer.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-nuxt/tsconfig-node16-sdk/core/queryKeySerializer.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\n/**\n * JSON-friendly union that mirrors what Pinia Colada can hash.\n */\nexport type JsonValue =\n  | null\n  | string\n  | number\n  | boolean\n  | JsonValue[]\n  | { [key: string]: JsonValue };\n\n/**\n * Replacer that converts non-JSON values (bigint, Date, etc.) to safe substitutes.\n */\nexport const queryKeyJsonReplacer = (_key: string, value: unknown) => {\n  if (value === undefined || typeof value === 'function' || typeof value === 'symbol') {\n    return undefined;\n  }\n  if (typeof value === 'bigint') {\n    return value.toString();\n  }\n  if (value instanceof Date) {\n    return value.toISOString();\n  }\n  return value;\n};\n\n/**\n * Safely stringifies a value and parses it back into a JsonValue.\n */\nexport const stringifyToJsonValue = (input: unknown): JsonValue | undefined => {\n  try {\n    const json = JSON.stringify(input, queryKeyJsonReplacer);\n    if (json === undefined) {\n      return undefined;\n    }\n    return JSON.parse(json) as JsonValue;\n  } catch {\n    return undefined;\n  }\n};\n\n/**\n * Detects plain objects (including objects with a null prototype).\n */\nconst isPlainObject = (value: unknown): value is Record<string, unknown> => {\n  if (value === null || typeof value !== 'object') {\n    return false;\n  }\n  const prototype = Object.getPrototypeOf(value as object);\n  return prototype === Object.prototype || prototype === null;\n};\n\n/**\n * Turns URLSearchParams into a sorted JSON object for deterministic keys.\n */\nconst serializeSearchParams = (params: URLSearchParams): JsonValue => {\n  const entries = Array.from(params.entries()).sort(([a], [b]) => a.localeCompare(b));\n  const result: Record<string, JsonValue> = {};\n\n  for (const [key, value] of entries) {\n    const existing = result[key];\n    if (existing === undefined) {\n      result[key] = value;\n      continue;\n    }\n\n    if (Array.isArray(existing)) {\n      (existing as string[]).push(value);\n    } else {\n      result[key] = [existing, value];\n    }\n  }\n\n  return result;\n};\n\n/**\n * Normalizes any accepted value into a JSON-friendly shape for query keys.\n */\nexport const serializeQueryKeyValue = (value: unknown): JsonValue | undefined => {\n  if (value === null) {\n    return null;\n  }\n\n  if (typeof value === 'string' || typeof value === 'number' || typeof value === 'boolean') {\n    return value;\n  }\n\n  if (value === undefined || typeof value === 'function' || typeof value === 'symbol') {\n    return undefined;\n  }\n\n  if (typeof value === 'bigint') {\n    return value.toString();\n  }\n\n  if (value instanceof Date) {\n    return value.toISOString();\n  }\n\n  if (Array.isArray(value)) {\n    return stringifyToJsonValue(value);\n  }\n\n  if (typeof URLSearchParams !== 'undefined' && value instanceof URLSearchParams) {\n    return serializeSearchParams(value);\n  }\n\n  if (isPlainObject(value)) {\n    return stringifyToJsonValue(value);\n  }\n\n  return undefined;\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-nuxt/tsconfig-node16-sdk/core/serverSentEvents.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { Config } from './types.gen.js';\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 const 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            // Normalize line endings: CRLF -> LF, then CR -> LF\n            buffer = buffer.replace(/\\r\\n/g, '\\n').replace(/\\r/g, '\\n');\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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-nuxt/tsconfig-node16-sdk/core/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { Auth, AuthToken } from './auth.gen.js';\nimport type { BodySerializer, QuerySerializer, QuerySerializerOptions } from './bodySerializer.gen.js';\n\nexport type HttpMethod =\n  | 'connect'\n  | 'delete'\n  | 'get'\n  | 'head'\n  | 'options'\n  | 'patch'\n  | 'post'\n  | 'put'\n  | 'trace';\n\nexport type Client<\n  RequestFn = never,\n  Config = unknown,\n  MethodFn = never,\n  BuildUrlFn = never,\n  SseFn = never,\n> = {\n  /**\n   * Returns the final request URL.\n   */\n  buildUrl: BuildUrlFn;\n  getConfig: () => Config;\n  request: RequestFn;\n  setConfig: (config: Config) => Config;\n} & {\n  [K in HttpMethod]: MethodFn;\n} & ([SseFn] extends [never] ? { sse?: never } : { sse: { [K in HttpMethod]: SseFn } });\n\nexport interface Config {\n  /**\n   * Auth token or a function returning auth token. The resolved value will be\n   * added to the request payload as defined by its `security` array.\n   */\n  auth?: ((auth: Auth) => Promise<AuthToken> | AuthToken) | AuthToken;\n  /**\n   * A function for serializing request body parameter. By default,\n   * {@link JSON.stringify()} will be used.\n   */\n  bodySerializer?: BodySerializer | null;\n  /**\n   * An object containing any HTTP headers that you want to pre-populate your\n   * `Headers` object with.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/Headers/Headers#init See more}\n   */\n  headers?:\n    | RequestInit['headers']\n    | Record<\n        string,\n        string | number | boolean | (string | number | boolean)[] | null | undefined | unknown\n      >;\n  /**\n   * The request method.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/fetch#method See more}\n   */\n  method?: Uppercase<HttpMethod>;\n  /**\n   * A function for serializing request query parameters. By default, arrays\n   * will be exploded in form style, objects will be exploded in deepObject\n   * style, and reserved characters are percent-encoded.\n   *\n   * This method will have no effect if the native `paramsSerializer()` Axios\n   * API function is used.\n   *\n   * {@link https://swagger.io/docs/specification/serialization/#query View examples}\n   */\n  querySerializer?: QuerySerializer | QuerySerializerOptions;\n  /**\n   * A function validating request data. This is useful if you want to ensure\n   * the request conforms to the desired shape, so it can be safely sent to\n   * the server.\n   */\n  requestValidator?: (data: unknown) => Promise<unknown>;\n  /**\n   * A function transforming response data before it's returned. This is useful\n   * for post-processing data, e.g. converting ISO strings into Date objects.\n   */\n  responseTransformer?: (data: unknown) => Promise<unknown>;\n  /**\n   * A function validating response data. This is useful if you want to ensure\n   * the response conforms to the desired shape, so it can be safely passed to\n   * the transformers and returned to the user.\n   */\n  responseValidator?: (data: unknown) => Promise<unknown>;\n}\n\ntype IsExactlyNeverOrNeverUndefined<T> = [T] extends [never]\n  ? true\n  : [T] extends [never | undefined]\n    ? [undefined] extends [T]\n      ? false\n      : true\n    : false;\n\nexport type OmitNever<T extends Record<string, unknown>> = {\n  [K in keyof T as IsExactlyNeverOrNeverUndefined<T[K]> extends true ? never : K]: T[K];\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-nuxt/tsconfig-node16-sdk/core/utils.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { BodySerializer, QuerySerializer } from './bodySerializer.gen.js';\nimport {\n  type ArraySeparatorStyle,\n  serializeArrayParam,\n  serializeObjectParam,\n  serializePrimitiveParam,\n} from './pathSerializer.gen.js';\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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-nuxt/tsconfig-node16-sdk/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport { apiVVersionODataControllerCount, callToTestOrderOfParams, callWithDefaultOptionalParameters, callWithDefaultParameters, callWithDescriptions, callWithDuplicateResponses, callWithNoContentResponse, callWithParameters, callWithResponse, callWithResponseAndNoContentResponse, callWithResponses, callWithResultFromHeader, callWithWeirdParameterNames, collectionFormat, complexParams, complexTypes, deleteCallWithoutParametersAndResponse, deleteFoo, deprecatedCall, dummyA, dummyB, duplicateName, duplicateName2, duplicateName3, duplicateName4, export_, fileResponse, fooWow, getApiVbyApiVersionSimpleOperation, getCallWithOptionalParam, getCallWithoutParametersAndResponse, headCallWithoutParametersAndResponse, import_, multipartRequest, multipartResponse, nonAsciiæøåÆøÅöôêÊ字符串, type Options, optionsCallWithoutParametersAndResponse, patchApiVbyApiVersionNoTag, patchCallWithoutParametersAndResponse, postApiVbyApiVersionFormData, postApiVbyApiVersionRequestBody, postCallWithOptionalParam, postCallWithoutParametersAndResponse, putCallWithoutParametersAndResponse, putWithFormUrlEncoded, testErrorCode, types, uploadFile } from './sdk.gen.js';\nexport type { _3eNum1Период, _400, AdditionalPropertiesIntegerIssue, AdditionalPropertiesUnknownIssue, AdditionalPropertiesUnknownIssue2, AdditionalPropertiesUnknownIssue3, AdditionalPropertiesUnknownIssueWritable, AnyOfAnyAndNull, AnyOfArrays, ApiVVersionODataControllerCountData, ApiVVersionODataControllerCountResponse, ApiVVersionODataControllerCountResponses, ArrayWithAnyOfProperties, ArrayWithArray, ArrayWithBooleans, ArrayWithNumbers, ArrayWithProperties, ArrayWithReferences, ArrayWithStrings, CallToTestOrderOfParamsData, CallWithDefaultOptionalParametersData, CallWithDefaultParametersData, CallWithDescriptionsData, CallWithDuplicateResponsesData, CallWithDuplicateResponsesError, CallWithDuplicateResponsesErrors, CallWithDuplicateResponsesResponse, CallWithDuplicateResponsesResponses, CallWithNoContentResponseData, CallWithNoContentResponseResponse, CallWithNoContentResponseResponses, CallWithParametersData, CallWithResponseAndNoContentResponseData, CallWithResponseAndNoContentResponseResponse, CallWithResponseAndNoContentResponseResponses, CallWithResponseData, CallWithResponseResponse, CallWithResponseResponses, CallWithResponsesData, CallWithResponsesError, CallWithResponsesErrors, CallWithResponsesResponse, CallWithResponsesResponses, CallWithResultFromHeaderData, CallWithResultFromHeaderErrors, CallWithResultFromHeaderResponses, CallWithWeirdParameterNamesData, CamelCaseCommentWithBreaks, CharactersInDescription, ClientOptions, CollectionFormatData, CommentWithBackticks, CommentWithBackticksAndQuotes, CommentWithBreaks, CommentWithExpressionPlaceholders, CommentWithQuotes, CommentWithReservedCharacters, CommentWithSlashes, ComplexParamsData, ComplexParamsResponse, ComplexParamsResponses, ComplexTypesData, ComplexTypesErrors, ComplexTypesResponse, ComplexTypesResponses, CompositionBaseModel, CompositionExtendedModel, CompositionWithAllOfAndNullable, CompositionWithAnyOf, CompositionWithAnyOfAndNullable, CompositionWithAnyOfAnonymous, CompositionWithNestedAnyAndTypeNull, CompositionWithNestedAnyOfAndNull, CompositionWithOneOf, CompositionWithOneOfAndComplexArrayDictionary, CompositionWithOneOfAndNullable, CompositionWithOneOfAndProperties, CompositionWithOneOfAndSimpleArrayDictionary, CompositionWithOneOfAndSimpleDictionary, CompositionWithOneOfAnonymous, CompositionWithOneOfDiscriminator, ConstValue, Default, DeleteCallWithoutParametersAndResponseData, DeleteFooData, DeleteFooData2, DeleteFooData3, DeprecatedCallData, DeprecatedModel, DictionaryWithArray, DictionaryWithDictionary, DictionaryWithProperties, DictionaryWithPropertiesAndAdditionalProperties, DictionaryWithReference, DictionaryWithString, DummyAData, DummyAResponse, DummyAResponses, DummyBData, DummyBResponse, DummyBResponses, DuplicateName2Data, DuplicateName3Data, DuplicateName4Data, DuplicateNameData, EnumFromDescription, EnumWithExtensions, EnumWithNumbers, EnumWithReplacedCharacters, EnumWithStrings, EnumWithXEnumNames, ExportData, ExternalRefA, ExternalRefB, ExternalSharedModel, File, FileResponseData, FileResponseResponse, FileResponseResponses, FileWritable, FooWowData, FooWowResponses, FreeFormObjectWithAdditionalPropertiesEqEmptyObject, FreeFormObjectWithAdditionalPropertiesEqTrue, FreeFormObjectWithoutAdditionalProperties, GenericSchemaDuplicateIssue1SystemBoolean, GenericSchemaDuplicateIssue1SystemBooleanWritable, GenericSchemaDuplicateIssue1SystemString, GenericSchemaDuplicateIssue1SystemStringWritable, GetApiVbyApiVersionSimpleOperationData, GetApiVbyApiVersionSimpleOperationError, GetApiVbyApiVersionSimpleOperationErrors, GetApiVbyApiVersionSimpleOperationResponse, GetApiVbyApiVersionSimpleOperationResponses, GetCallWithOptionalParamData, GetCallWithoutParametersAndResponseData, HeadCallWithoutParametersAndResponseData, Import, ImportData, ImportResponse, ImportResponses, IoK8sApimachineryPkgApisMetaV1DeleteOptions, IoK8sApimachineryPkgApisMetaV1Preconditions, ModelCircle, ModelFromZendesk, ModelSquare, ModelThatExtends, ModelThatExtendsExtends, ModelWithAdditionalPropertiesEqTrue, ModelWithAdditionalPropertiesRef, ModelWithAnyOfConstantSizeArray, ModelWithAnyOfConstantSizeArrayAndIntersect, ModelWithAnyOfConstantSizeArrayNullable, ModelWithAnyOfConstantSizeArrayWithNSizeAndOptions, ModelWithAnyOfConstantSizeArrayWithNSizeAndOptionsWritable, ModelWithArray, ModelWithArrayReadOnlyAndWriteOnly, ModelWithArrayReadOnlyAndWriteOnlyWritable, ModelWithBackticksInDescription, ModelWithBoolean, ModelWithCircularReference, ModelWithConst, ModelWithConstantSizeArray, ModelWithDictionary, ModelWithDuplicateImports, ModelWithDuplicateProperties, ModelWithEnum, ModelWithEnumFromDescription, ModelWithEnumWithHyphen, ModelWithInteger, ModelWithNestedArrayEnums, ModelWithNestedArrayEnumsData, ModelWithNestedArrayEnumsDataBar, ModelWithNestedArrayEnumsDataFoo, ModelWithNestedCompositionEnums, ModelWithNestedEnums, ModelWithNestedProperties, ModelWithNullableObject, ModelWithNullableString, ModelWithNumericEnumUnion, ModelWithOneOfAndProperties, ModelWithOneOfEnum, ModelWithOrderedProperties, ModelWithPattern, ModelWithPatternWritable, ModelWithPrefixItemsConstantSizeArray, ModelWithProperties, ModelWithPropertiesWritable, ModelWithReadOnlyAndWriteOnly, ModelWithReadOnlyAndWriteOnlyWritable, ModelWithReference, ModelWithReferenceWritable, ModelWithString, ModelWithStringError, MultipartRequestData, MultipartResponseData, MultipartResponseResponse, MultipartResponseResponses, NestedAnyOfArraysNullable, NonAsciiæøåÆøÅöôêÊ字符串Data, NonAsciiæøåÆøÅöôêÊ字符串Response, NonAsciiæøåÆøÅöôêÊ字符串Responses, NonAsciiStringæøåÆøÅöôêÊ字符串, NullableObject, OneOfAllOfIssue, OneOfAllOfIssueWritable, OptionsCallWithoutParametersAndResponseData, Pageable, ParameterSimpleParameterUnused, PatchApiVbyApiVersionNoTagData, PatchApiVbyApiVersionNoTagResponses, PatchCallWithoutParametersAndResponseData, PostApiVbyApiVersionFormDataData, PostApiVbyApiVersionRequestBodyData, PostCallWithOptionalParamData, PostCallWithOptionalParamResponse, PostCallWithOptionalParamResponses, PostCallWithoutParametersAndResponseData, PostServiceWithEmptyTagResponse, PostServiceWithEmptyTagResponse2, PutCallWithoutParametersAndResponseData, PutWithFormUrlEncodedData, SchemaWithFormRestrictedKeys, SimpleBoolean, SimpleFile, SimpleFormData, SimpleInteger, SimpleParameter, SimpleReference, SimpleRequestBody, SimpleString, SimpleStringWithPattern, TestErrorCodeData, TestErrorCodeErrors, TestErrorCodeResponses, TypesData, TypesResponse, TypesResponses, UploadFileData, UploadFileResponse, UploadFileResponses, XFooBar } from './types.gen.js';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-nuxt/tsconfig-node16-sdk/sdk.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport { client } from './client.gen.js';\nimport { type Client, type Composable, formDataBodySerializer, type Options as Options2, type TDataShape, urlSearchParamsBodySerializer } from './client/index.js';\nimport type { ApiVVersionODataControllerCountData, ApiVVersionODataControllerCountResponse, CallToTestOrderOfParamsData, CallWithDefaultOptionalParametersData, CallWithDefaultParametersData, CallWithDescriptionsData, CallWithDuplicateResponsesData, CallWithDuplicateResponsesError, CallWithDuplicateResponsesResponse, CallWithNoContentResponseData, CallWithNoContentResponseResponse, CallWithParametersData, CallWithResponseAndNoContentResponseData, CallWithResponseAndNoContentResponseResponse, CallWithResponseData, CallWithResponseResponse, CallWithResponsesData, CallWithResponsesError, CallWithResponsesResponse, CallWithResultFromHeaderData, CallWithWeirdParameterNamesData, CollectionFormatData, ComplexParamsData, ComplexParamsResponse, ComplexTypesData, ComplexTypesResponse, DeleteCallWithoutParametersAndResponseData, DeleteFooData3, DeprecatedCallData, DummyAData, DummyAResponse, DummyBData, DummyBResponse, DuplicateName2Data, DuplicateName3Data, DuplicateName4Data, DuplicateNameData, ExportData, FileResponseData, FileResponseResponse, FooWowData, GetApiVbyApiVersionSimpleOperationData, GetApiVbyApiVersionSimpleOperationError, GetApiVbyApiVersionSimpleOperationResponse, GetCallWithOptionalParamData, GetCallWithoutParametersAndResponseData, HeadCallWithoutParametersAndResponseData, ImportData, ImportResponse, MultipartRequestData, MultipartResponseData, MultipartResponseResponse, NonAsciiæøåÆøÅöôêÊ字符串Data, NonAsciiæøåÆøÅöôêÊ字符串Response, OptionsCallWithoutParametersAndResponseData, PatchApiVbyApiVersionNoTagData, PatchCallWithoutParametersAndResponseData, PostApiVbyApiVersionFormDataData, PostApiVbyApiVersionRequestBodyData, PostCallWithOptionalParamData, PostCallWithOptionalParamResponse, PostCallWithoutParametersAndResponseData, PutCallWithoutParametersAndResponseData, PutWithFormUrlEncodedData, TestErrorCodeData, TypesData, TypesResponse, UploadFileData, UploadFileResponse } from './types.gen.js';\n\nexport type Options<TComposable extends Composable = '$fetch', TData extends TDataShape = TDataShape, ResT = unknown, DefaultT = undefined> = Options2<TComposable, TData, ResT, DefaultT> & {\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\nexport const export_ = <TComposable extends Composable = '$fetch', DefaultT = undefined>(options: Options<TComposable, ExportData, unknown, DefaultT>) => (options.client ?? client).get<TComposable, unknown | DefaultT, unknown, DefaultT>({ url: '/api/v{api-version}/no+tag', ...options });\n\nexport const patchApiVbyApiVersionNoTag = <TComposable extends Composable = '$fetch', DefaultT = undefined>(options: Options<TComposable, PatchApiVbyApiVersionNoTagData, unknown, DefaultT>) => (options.client ?? client).patch<TComposable, unknown | DefaultT, unknown, DefaultT>({ url: '/api/v{api-version}/no+tag', ...options });\n\nexport const import_ = <TComposable extends Composable = '$fetch', DefaultT extends ImportResponse = ImportResponse>(options: Options<TComposable, ImportData, ImportResponse, DefaultT>) => (options.client ?? client).post<TComposable, ImportResponse | DefaultT, unknown, DefaultT>({\n    url: '/api/v{api-version}/no+tag',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options.headers\n    }\n});\n\nexport const fooWow = <TComposable extends Composable = '$fetch', DefaultT = undefined>(options: Options<TComposable, FooWowData, unknown, DefaultT>) => (options.client ?? client).put<TComposable, unknown | DefaultT, unknown, DefaultT>({ url: '/api/v{api-version}/no+tag', ...options });\n\nexport const apiVVersionODataControllerCount = <TComposable extends Composable = '$fetch', DefaultT extends ApiVVersionODataControllerCountResponse = ApiVVersionODataControllerCountResponse>(options: Options<TComposable, ApiVVersionODataControllerCountData, ApiVVersionODataControllerCountResponse, DefaultT>) => (options.client ?? client).get<TComposable, ApiVVersionODataControllerCountResponse | DefaultT, unknown, DefaultT>({ url: '/api/v{api-version}/simple/$count', ...options });\n\nexport const getApiVbyApiVersionSimpleOperation = <TComposable extends Composable = '$fetch', DefaultT extends GetApiVbyApiVersionSimpleOperationResponse = GetApiVbyApiVersionSimpleOperationResponse>(options: Options<TComposable, GetApiVbyApiVersionSimpleOperationData, GetApiVbyApiVersionSimpleOperationResponse, DefaultT>) => (options.client ?? client).get<TComposable, GetApiVbyApiVersionSimpleOperationResponse | DefaultT, GetApiVbyApiVersionSimpleOperationError, DefaultT>({ url: '/api/v{api-version}/simple:operation', ...options });\n\nexport const deleteCallWithoutParametersAndResponse = <TComposable extends Composable = '$fetch', DefaultT = undefined>(options: Options<TComposable, DeleteCallWithoutParametersAndResponseData, unknown, DefaultT>) => (options.client ?? client).delete<TComposable, unknown | DefaultT, unknown, DefaultT>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const getCallWithoutParametersAndResponse = <TComposable extends Composable = '$fetch', DefaultT = undefined>(options: Options<TComposable, GetCallWithoutParametersAndResponseData, unknown, DefaultT>) => (options.client ?? client).get<TComposable, unknown | DefaultT, unknown, DefaultT>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const headCallWithoutParametersAndResponse = <TComposable extends Composable = '$fetch', DefaultT = undefined>(options: Options<TComposable, HeadCallWithoutParametersAndResponseData, unknown, DefaultT>) => (options.client ?? client).head<TComposable, unknown | DefaultT, unknown, DefaultT>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const optionsCallWithoutParametersAndResponse = <TComposable extends Composable = '$fetch', DefaultT = undefined>(options: Options<TComposable, OptionsCallWithoutParametersAndResponseData, unknown, DefaultT>) => (options.client ?? client).options<TComposable, unknown | DefaultT, unknown, DefaultT>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const patchCallWithoutParametersAndResponse = <TComposable extends Composable = '$fetch', DefaultT = undefined>(options: Options<TComposable, PatchCallWithoutParametersAndResponseData, unknown, DefaultT>) => (options.client ?? client).patch<TComposable, unknown | DefaultT, unknown, DefaultT>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const postCallWithoutParametersAndResponse = <TComposable extends Composable = '$fetch', DefaultT = undefined>(options: Options<TComposable, PostCallWithoutParametersAndResponseData, unknown, DefaultT>) => (options.client ?? client).post<TComposable, unknown | DefaultT, unknown, DefaultT>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const putCallWithoutParametersAndResponse = <TComposable extends Composable = '$fetch', DefaultT = undefined>(options: Options<TComposable, PutCallWithoutParametersAndResponseData, unknown, DefaultT>) => (options.client ?? client).put<TComposable, unknown | DefaultT, unknown, DefaultT>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const deleteFoo = <TComposable extends Composable = '$fetch', DefaultT = undefined>(options: Options<TComposable, DeleteFooData3, unknown, DefaultT>) => (options.client ?? client).delete<TComposable, unknown | DefaultT, unknown, DefaultT>({ url: '/api/v{api-version}/foo/{foo_param}/bar/{BarParam}', ...options });\n\nexport const callWithDescriptions = <TComposable extends Composable = '$fetch', DefaultT = undefined>(options: Options<TComposable, CallWithDescriptionsData, unknown, DefaultT>) => (options.client ?? client).post<TComposable, unknown | DefaultT, unknown, DefaultT>({ url: '/api/v{api-version}/descriptions', ...options });\n\n/**\n * @deprecated\n */\nexport const deprecatedCall = <TComposable extends Composable = '$fetch', DefaultT = undefined>(options: Options<TComposable, DeprecatedCallData, unknown, DefaultT>) => (options.client ?? client).post<TComposable, unknown | DefaultT, unknown, DefaultT>({ url: '/api/v{api-version}/parameters/deprecated', ...options });\n\nexport const callWithParameters = <TComposable extends Composable = '$fetch', DefaultT = undefined>(options: Options<TComposable, CallWithParametersData, unknown, DefaultT>) => (options.client ?? client).post<TComposable, unknown | DefaultT, unknown, DefaultT>({\n    url: '/api/v{api-version}/parameters/{parameterPath}',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options.headers\n    }\n});\n\nexport const callWithWeirdParameterNames = <TComposable extends Composable = '$fetch', DefaultT = undefined>(options: Options<TComposable, CallWithWeirdParameterNamesData, unknown, DefaultT>) => (options.client ?? client).post<TComposable, unknown | DefaultT, unknown, DefaultT>({\n    url: '/api/v{api-version}/parameters/{parameter.path.1}/{parameter-path-2}/{PARAMETER-PATH-3}',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options.headers\n    }\n});\n\nexport const getCallWithOptionalParam = <TComposable extends Composable = '$fetch', DefaultT = undefined>(options: Options<TComposable, GetCallWithOptionalParamData, unknown, DefaultT>) => (options.client ?? client).get<TComposable, unknown | DefaultT, unknown, DefaultT>({\n    url: '/api/v{api-version}/parameters',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options.headers\n    }\n});\n\nexport const postCallWithOptionalParam = <TComposable extends Composable = '$fetch', DefaultT extends PostCallWithOptionalParamResponse = PostCallWithOptionalParamResponse>(options: Options<TComposable, PostCallWithOptionalParamData, PostCallWithOptionalParamResponse, DefaultT>) => (options.client ?? client).post<TComposable, PostCallWithOptionalParamResponse | DefaultT, unknown, DefaultT>({\n    url: '/api/v{api-version}/parameters',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options.headers\n    }\n});\n\nexport const postApiVbyApiVersionRequestBody = <TComposable extends Composable = '$fetch', DefaultT = undefined>(options: Options<TComposable, PostApiVbyApiVersionRequestBodyData, unknown, DefaultT>) => (options.client ?? client).post<TComposable, unknown | DefaultT, unknown, DefaultT>({\n    url: '/api/v{api-version}/requestBody',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options.headers\n    }\n});\n\nexport const postApiVbyApiVersionFormData = <TComposable extends Composable = '$fetch', DefaultT = undefined>(options: Options<TComposable, PostApiVbyApiVersionFormDataData, unknown, DefaultT>) => (options.client ?? client).post<TComposable, unknown | DefaultT, unknown, DefaultT>({\n    ...formDataBodySerializer,\n    url: '/api/v{api-version}/formData',\n    ...options,\n    headers: {\n        'Content-Type': null,\n        ...options.headers\n    }\n});\n\nexport const callWithDefaultParameters = <TComposable extends Composable = '$fetch', DefaultT = undefined>(options: Options<TComposable, CallWithDefaultParametersData, unknown, DefaultT>) => (options.client ?? client).get<TComposable, unknown | DefaultT, unknown, DefaultT>({ url: '/api/v{api-version}/defaults', ...options });\n\nexport const callWithDefaultOptionalParameters = <TComposable extends Composable = '$fetch', DefaultT = undefined>(options: Options<TComposable, CallWithDefaultOptionalParametersData, unknown, DefaultT>) => (options.client ?? client).post<TComposable, unknown | DefaultT, unknown, DefaultT>({ url: '/api/v{api-version}/defaults', ...options });\n\nexport const callToTestOrderOfParams = <TComposable extends Composable = '$fetch', DefaultT = undefined>(options: Options<TComposable, CallToTestOrderOfParamsData, unknown, DefaultT>) => (options.client ?? client).put<TComposable, unknown | DefaultT, unknown, DefaultT>({ url: '/api/v{api-version}/defaults', ...options });\n\nexport const duplicateName = <TComposable extends Composable = '$fetch', DefaultT = undefined>(options: Options<TComposable, DuplicateNameData, unknown, DefaultT>) => (options.client ?? client).delete<TComposable, unknown | DefaultT, unknown, DefaultT>({ url: '/api/v{api-version}/duplicate', ...options });\n\nexport const duplicateName2 = <TComposable extends Composable = '$fetch', DefaultT = undefined>(options: Options<TComposable, DuplicateName2Data, unknown, DefaultT>) => (options.client ?? client).get<TComposable, unknown | DefaultT, unknown, DefaultT>({ url: '/api/v{api-version}/duplicate', ...options });\n\nexport const duplicateName3 = <TComposable extends Composable = '$fetch', DefaultT = undefined>(options: Options<TComposable, DuplicateName3Data, unknown, DefaultT>) => (options.client ?? client).post<TComposable, unknown | DefaultT, unknown, DefaultT>({ url: '/api/v{api-version}/duplicate', ...options });\n\nexport const duplicateName4 = <TComposable extends Composable = '$fetch', DefaultT = undefined>(options: Options<TComposable, DuplicateName4Data, unknown, DefaultT>) => (options.client ?? client).put<TComposable, unknown | DefaultT, unknown, DefaultT>({ url: '/api/v{api-version}/duplicate', ...options });\n\nexport const callWithNoContentResponse = <TComposable extends Composable = '$fetch', DefaultT extends CallWithNoContentResponseResponse = CallWithNoContentResponseResponse>(options: Options<TComposable, CallWithNoContentResponseData, CallWithNoContentResponseResponse, DefaultT>) => (options.client ?? client).get<TComposable, CallWithNoContentResponseResponse | DefaultT, unknown, DefaultT>({ url: '/api/v{api-version}/no-content', ...options });\n\nexport const callWithResponseAndNoContentResponse = <TComposable extends Composable = '$fetch', DefaultT extends CallWithResponseAndNoContentResponseResponse = CallWithResponseAndNoContentResponseResponse>(options: Options<TComposable, CallWithResponseAndNoContentResponseData, CallWithResponseAndNoContentResponseResponse, DefaultT>) => (options.client ?? client).get<TComposable, CallWithResponseAndNoContentResponseResponse | DefaultT, unknown, DefaultT>({ url: '/api/v{api-version}/multiple-tags/response-and-no-content', ...options });\n\nexport const dummyA = <TComposable extends Composable = '$fetch', DefaultT extends DummyAResponse = DummyAResponse>(options: Options<TComposable, DummyAData, DummyAResponse, DefaultT>) => (options.client ?? client).get<TComposable, DummyAResponse | DefaultT, unknown, DefaultT>({ url: '/api/v{api-version}/multiple-tags/a', ...options });\n\nexport const dummyB = <TComposable extends Composable = '$fetch', DefaultT extends DummyBResponse = DummyBResponse>(options: Options<TComposable, DummyBData, DummyBResponse, DefaultT>) => (options.client ?? client).get<TComposable, DummyBResponse | DefaultT, unknown, DefaultT>({ url: '/api/v{api-version}/multiple-tags/b', ...options });\n\nexport const callWithResponse = <TComposable extends Composable = '$fetch', DefaultT extends CallWithResponseResponse = CallWithResponseResponse>(options: Options<TComposable, CallWithResponseData, CallWithResponseResponse, DefaultT>) => (options.client ?? client).get<TComposable, CallWithResponseResponse | DefaultT, unknown, DefaultT>({ url: '/api/v{api-version}/response', ...options });\n\nexport const callWithDuplicateResponses = <TComposable extends Composable = '$fetch', DefaultT extends CallWithDuplicateResponsesResponse = CallWithDuplicateResponsesResponse>(options: Options<TComposable, CallWithDuplicateResponsesData, CallWithDuplicateResponsesResponse, DefaultT>) => (options.client ?? client).post<TComposable, CallWithDuplicateResponsesResponse | DefaultT, CallWithDuplicateResponsesError, DefaultT>({ url: '/api/v{api-version}/response', ...options });\n\nexport const callWithResponses = <TComposable extends Composable = '$fetch', DefaultT extends CallWithResponsesResponse = CallWithResponsesResponse>(options: Options<TComposable, CallWithResponsesData, CallWithResponsesResponse, DefaultT>) => (options.client ?? client).put<TComposable, CallWithResponsesResponse | DefaultT, CallWithResponsesError, DefaultT>({ url: '/api/v{api-version}/response', ...options });\n\nexport const collectionFormat = <TComposable extends Composable = '$fetch', DefaultT = undefined>(options: Options<TComposable, CollectionFormatData, unknown, DefaultT>) => (options.client ?? client).get<TComposable, unknown | DefaultT, unknown, DefaultT>({ url: '/api/v{api-version}/collectionFormat', ...options });\n\nexport const types = <TComposable extends Composable = '$fetch', DefaultT extends TypesResponse = TypesResponse>(options: Options<TComposable, TypesData, TypesResponse, DefaultT>) => (options.client ?? client).get<TComposable, TypesResponse | DefaultT, unknown, DefaultT>({ url: '/api/v{api-version}/types', ...options });\n\nexport const uploadFile = <TComposable extends Composable = '$fetch', DefaultT extends UploadFileResponse = UploadFileResponse>(options: Options<TComposable, UploadFileData, UploadFileResponse, DefaultT>) => (options.client ?? client).post<TComposable, UploadFileResponse | DefaultT, unknown, DefaultT>({\n    ...urlSearchParamsBodySerializer,\n    url: '/api/v{api-version}/upload',\n    ...options,\n    headers: {\n        'Content-Type': 'application/x-www-form-urlencoded',\n        ...options.headers\n    }\n});\n\nexport const fileResponse = <TComposable extends Composable = '$fetch', DefaultT extends FileResponseResponse = FileResponseResponse>(options: Options<TComposable, FileResponseData, FileResponseResponse, DefaultT>) => (options.client ?? client).get<TComposable, FileResponseResponse | DefaultT, unknown, DefaultT>({ url: '/api/v{api-version}/file/{id}', ...options });\n\nexport const complexTypes = <TComposable extends Composable = '$fetch', DefaultT extends ComplexTypesResponse = ComplexTypesResponse>(options: Options<TComposable, ComplexTypesData, ComplexTypesResponse, DefaultT>) => (options.client ?? client).get<TComposable, ComplexTypesResponse | DefaultT, unknown, DefaultT>({\n    querySerializer: { parameters: { parameterObject: { object: { style: 'form' } } } },\n    url: '/api/v{api-version}/complex',\n    ...options\n});\n\nexport const multipartResponse = <TComposable extends Composable = '$fetch', DefaultT extends MultipartResponseResponse = MultipartResponseResponse>(options: Options<TComposable, MultipartResponseData, MultipartResponseResponse, DefaultT>) => (options.client ?? client).get<TComposable, MultipartResponseResponse | DefaultT, unknown, DefaultT>({ url: '/api/v{api-version}/multipart', ...options });\n\nexport const multipartRequest = <TComposable extends Composable = '$fetch', DefaultT = undefined>(options: Options<TComposable, MultipartRequestData, unknown, DefaultT>) => (options.client ?? client).post<TComposable, unknown | DefaultT, unknown, DefaultT>({\n    ...formDataBodySerializer,\n    url: '/api/v{api-version}/multipart',\n    ...options,\n    headers: {\n        'Content-Type': null,\n        ...options.headers\n    }\n});\n\nexport const complexParams = <TComposable extends Composable = '$fetch', DefaultT extends ComplexParamsResponse = ComplexParamsResponse>(options: Options<TComposable, ComplexParamsData, ComplexParamsResponse, DefaultT>) => (options.client ?? client).put<TComposable, ComplexParamsResponse | DefaultT, unknown, DefaultT>({\n    url: '/api/v{api-version}/complex/{id}',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json-patch+json',\n        ...options.headers\n    }\n});\n\nexport const callWithResultFromHeader = <TComposable extends Composable = '$fetch', DefaultT = undefined>(options: Options<TComposable, CallWithResultFromHeaderData, unknown, DefaultT>) => (options.client ?? client).post<TComposable, unknown | DefaultT, unknown, DefaultT>({ url: '/api/v{api-version}/header', ...options });\n\nexport const testErrorCode = <TComposable extends Composable = '$fetch', DefaultT = undefined>(options: Options<TComposable, TestErrorCodeData, unknown, DefaultT>) => (options.client ?? client).post<TComposable, unknown | DefaultT, unknown, DefaultT>({ url: '/api/v{api-version}/error', ...options });\n\nexport const nonAsciiæøåÆøÅöôêÊ字符串 = <TComposable extends Composable = '$fetch', DefaultT extends NonAsciiæøåÆøÅöôêÊ字符串Response = NonAsciiæøåÆøÅöôêÊ字符串Response>(options: Options<TComposable, NonAsciiæøåÆøÅöôêÊ字符串Data, NonAsciiæøåÆøÅöôêÊ字符串Response, DefaultT>) => (options.client ?? client).post<TComposable, NonAsciiæøåÆøÅöôêÊ字符串Response | DefaultT, unknown, DefaultT>({ url: '/api/v{api-version}/non-ascii-æøåÆØÅöôêÊ字符串', ...options });\n\n/**\n * Login User\n */\nexport const putWithFormUrlEncoded = <TComposable extends Composable = '$fetch', DefaultT = undefined>(options: Options<TComposable, PutWithFormUrlEncodedData, unknown, DefaultT>) => (options.client ?? client).put<TComposable, unknown | DefaultT, unknown, DefaultT>({\n    ...urlSearchParamsBodySerializer,\n    url: '/api/v{api-version}/non-ascii-æøåÆØÅöôêÊ字符串',\n    ...options,\n    headers: {\n        'Content-Type': 'application/x-www-form-urlencoded',\n        ...options.headers\n    }\n});\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-nuxt/tsconfig-node16-sdk/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type ClientOptions = {\n    baseURL: 'http://localhost:3000/base' | (string & {});\n};\n\n/**\n * Model with number-only name\n */\nexport type _400 = string;\n\n/**\n * External ref to shared model (A)\n */\nexport type ExternalRefA = ExternalSharedModel;\n\n/**\n * External ref to shared model (B)\n */\nexport type ExternalRefB = ExternalSharedModel;\n\n/**\n * Testing multiline comments in string: First line\n * Second line\n *\n * Fourth line\n */\nexport type CamelCaseCommentWithBreaks = number;\n\n/**\n * Testing multiline comments in string: First line\n * Second line\n *\n * Fourth line\n */\nexport type CommentWithBreaks = number;\n\n/**\n * Testing backticks in string: `backticks` and ```multiple backticks``` should work\n */\nexport type CommentWithBackticks = number;\n\n/**\n * Testing backticks and quotes in string: `backticks`, 'quotes', \"double quotes\" and ```multiple backticks``` should work\n */\nexport type CommentWithBackticksAndQuotes = number;\n\n/**\n * Testing slashes in string: \\backwards\\\\\\ and /forwards/// should work\n */\nexport type CommentWithSlashes = number;\n\n/**\n * Testing expression placeholders in string: ${expression} should work\n */\nexport type CommentWithExpressionPlaceholders = number;\n\n/**\n * Testing quotes in string: 'single quote''' and \"double quotes\"\"\" should work\n */\nexport type CommentWithQuotes = number;\n\n/**\n * Testing reserved characters in string: * inline * and ** inline ** should work\n */\nexport type CommentWithReservedCharacters = number;\n\n/**\n * This is a simple number\n */\nexport type SimpleInteger = number;\n\n/**\n * This is a simple boolean\n */\nexport type SimpleBoolean = boolean;\n\n/**\n * This is a simple string\n */\nexport type SimpleString = string;\n\n/**\n * A string with non-ascii (unicode) characters valid in typescript identifiers (æøåÆØÅöÔèÈ字符串)\n */\nexport type NonAsciiStringæøåÆøÅöôêÊ字符串 = string;\n\n/**\n * This is a simple file\n */\nexport type SimpleFile = Blob | File;\n\n/**\n * This is a simple reference\n */\nexport type SimpleReference = ModelWithString;\n\n/**\n * This is a simple string\n */\nexport type SimpleStringWithPattern = string | null;\n\n/**\n * This is a simple enum with strings\n */\nexport type EnumWithStrings = 'Success' | 'Warning' | 'Error' | '\\'Single Quote\\'' | '\"Double Quotes\"' | 'Non-ascii: øæåôöØÆÅÔÖ字符串';\n\nexport type EnumWithReplacedCharacters = '\\'Single Quote\\'' | '\"Double Quotes\"' | 'øæåôöØÆÅÔÖ字符串' | 3.1 | '';\n\n/**\n * This is a simple enum with numbers\n */\nexport type EnumWithNumbers = 1 | 2 | 3 | 1.1 | 1.2 | 1.3 | 100 | 200 | 300 | -100 | -200 | -300 | -1.1 | -1.2 | -1.3;\n\n/**\n * Success=1,Warning=2,Error=3\n */\nexport type EnumFromDescription = number;\n\n/**\n * This is a simple enum with numbers\n */\nexport type EnumWithExtensions = 200 | 400 | 500;\n\nexport type EnumWithXEnumNames = 0 | 1 | 2;\n\n/**\n * This is a simple array with numbers\n */\nexport type ArrayWithNumbers = Array<number>;\n\n/**\n * This is a simple array with booleans\n */\nexport type ArrayWithBooleans = Array<boolean>;\n\n/**\n * This is a simple array with strings\n */\nexport type ArrayWithStrings = Array<string>;\n\n/**\n * This is a simple array with references\n */\nexport type ArrayWithReferences = Array<ModelWithString>;\n\n/**\n * This is a simple array containing an array\n */\nexport type ArrayWithArray = Array<Array<ModelWithString>>;\n\n/**\n * This is a simple array with properties\n */\nexport type ArrayWithProperties = Array<{\n    '16x16'?: CamelCaseCommentWithBreaks;\n    bar?: string;\n}>;\n\n/**\n * This is a simple array with any of properties\n */\nexport type ArrayWithAnyOfProperties = Array<{\n    foo?: string;\n} | {\n    bar?: string;\n}>;\n\nexport type AnyOfAnyAndNull = {\n    data?: unknown | null;\n};\n\n/**\n * This is a simple array with any of properties\n */\nexport type AnyOfArrays = {\n    results?: Array<{\n        foo?: string;\n    } | {\n        bar?: string;\n    }>;\n};\n\n/**\n * This is a string dictionary\n */\nexport type DictionaryWithString = {\n    [key: string]: string;\n};\n\nexport type DictionaryWithPropertiesAndAdditionalProperties = {\n    foo?: number;\n    bar?: boolean;\n    [key: string]: string | number | boolean | undefined;\n};\n\n/**\n * This is a string reference\n */\nexport type DictionaryWithReference = {\n    [key: string]: ModelWithString;\n};\n\n/**\n * This is a complex dictionary\n */\nexport type DictionaryWithArray = {\n    [key: string]: Array<ModelWithString>;\n};\n\n/**\n * This is a string dictionary\n */\nexport type DictionaryWithDictionary = {\n    [key: string]: {\n        [key: string]: string;\n    };\n};\n\n/**\n * This is a complex dictionary\n */\nexport type DictionaryWithProperties = {\n    [key: string]: {\n        foo?: string;\n        bar?: string;\n    };\n};\n\n/**\n * This is a model with one number property\n */\nexport type ModelWithInteger = {\n    /**\n     * This is a simple number property\n     */\n    prop?: number;\n};\n\n/**\n * This is a model with one boolean property\n */\nexport type ModelWithBoolean = {\n    /**\n     * This is a simple boolean property\n     */\n    prop?: boolean;\n};\n\n/**\n * This is a model with one string property\n */\nexport type ModelWithString = {\n    /**\n     * This is a simple string property\n     */\n    prop?: string;\n};\n\n/**\n * This is a model with one string property\n */\nexport type ModelWithStringError = {\n    /**\n     * This is a simple string property\n     */\n    prop?: string;\n};\n\n/**\n * `Comment` or `VoiceComment`. The JSON object for adding voice comments to tickets is different. See [Adding voice comments to tickets](/documentation/ticketing/managing-tickets/adding-voice-comments-to-tickets)\n */\nexport type ModelFromZendesk = string;\n\n/**\n * This is a model with one string property\n */\nexport type ModelWithNullableString = {\n    /**\n     * This is a simple string property\n     */\n    nullableProp1?: string | null;\n    /**\n     * This is a simple string property\n     */\n    nullableRequiredProp1: string | null;\n    /**\n     * This is a simple string property\n     */\n    nullableProp2?: string | null;\n    /**\n     * This is a simple string property\n     */\n    nullableRequiredProp2: string | null;\n    /**\n     * This is a simple enum with strings\n     */\n    'foo_bar-enum'?: 'Success' | 'Warning' | 'Error' | 'ØÆÅ字符串';\n};\n\n/**\n * This is a model with one enum\n */\nexport type ModelWithEnum = {\n    /**\n     * This is a simple enum with strings\n     */\n    'foo_bar-enum'?: 'Success' | 'Warning' | 'Error' | 'ØÆÅ字符串';\n    /**\n     * These are the HTTP error code enums\n     */\n    statusCode?: '100' | '200 FOO' | '300 FOO_BAR' | '400 foo-bar' | '500 foo.bar' | '600 foo&bar';\n    /**\n     * Simple boolean enum\n     */\n    bool?: true;\n};\n\n/**\n * This is a model with one enum with escaped name\n */\nexport type ModelWithEnumWithHyphen = {\n    /**\n     * Foo-Bar-Baz-Qux\n     */\n    'foo-bar-baz-qux'?: '3.0';\n};\n\n/**\n * This is a model with one enum\n */\nexport type ModelWithEnumFromDescription = {\n    /**\n     * Success=1,Warning=2,Error=3\n     */\n    test?: number;\n};\n\n/**\n * This is a model with nested enums\n */\nexport type ModelWithNestedEnums = {\n    dictionaryWithEnum?: {\n        [key: string]: 'Success' | 'Warning' | 'Error';\n    };\n    dictionaryWithEnumFromDescription?: {\n        [key: string]: number;\n    };\n    arrayWithEnum?: Array<'Success' | 'Warning' | 'Error'>;\n    arrayWithDescription?: Array<number>;\n    /**\n     * This is a simple enum with strings\n     */\n    'foo_bar-enum'?: 'Success' | 'Warning' | 'Error' | 'ØÆÅ字符串';\n};\n\n/**\n * This is a model with one property containing a reference\n */\nexport type ModelWithReference = {\n    prop?: ModelWithProperties;\n};\n\n/**\n * This is a model with one property containing an array\n */\nexport type ModelWithArrayReadOnlyAndWriteOnly = {\n    prop?: Array<ModelWithReadOnlyAndWriteOnly>;\n    propWithFile?: Array<Blob | File>;\n    propWithNumber?: Array<number>;\n};\n\n/**\n * This is a model with one property containing an array\n */\nexport type ModelWithArray = {\n    prop?: Array<ModelWithString>;\n    propWithFile?: Array<Blob | File>;\n    propWithNumber?: Array<number>;\n};\n\n/**\n * This is a model with one property containing a dictionary\n */\nexport type ModelWithDictionary = {\n    prop?: {\n        [key: string]: string;\n    };\n};\n\n/**\n * This is a deprecated model with a deprecated property\n *\n * @deprecated\n */\nexport type DeprecatedModel = {\n    /**\n     * This is a deprecated property\n     *\n     * @deprecated\n     */\n    prop?: string;\n};\n\n/**\n * This is a model with one property containing a circular reference\n */\nexport type ModelWithCircularReference = {\n    prop?: ModelWithCircularReference;\n};\n\n/**\n * This is a model with one property with a 'one of' relationship\n */\nexport type CompositionWithOneOf = {\n    propA?: ModelWithString | ModelWithEnum | ModelWithArray | ModelWithDictionary;\n};\n\n/**\n * This is a model with one property with a 'one of' relationship where the options are not $ref\n */\nexport type CompositionWithOneOfAnonymous = {\n    propA?: {\n        propA?: string;\n    } | string | number;\n};\n\n/**\n * Circle\n */\nexport type ModelCircle = {\n    kind: string;\n    radius?: number;\n};\n\n/**\n * Square\n */\nexport type ModelSquare = {\n    kind: string;\n    sideLength?: number;\n};\n\n/**\n * This is a model with one property with a 'one of' relationship where the options are not $ref\n */\nexport type CompositionWithOneOfDiscriminator = ({\n    kind: 'circle';\n} & ModelCircle) | ({\n    kind: 'square';\n} & ModelSquare);\n\n/**\n * This is a model with one property with a 'any of' relationship\n */\nexport type CompositionWithAnyOf = {\n    propA?: ModelWithString | ModelWithEnum | ModelWithArray | ModelWithDictionary;\n};\n\n/**\n * This is a model with one property with a 'any of' relationship where the options are not $ref\n */\nexport type CompositionWithAnyOfAnonymous = {\n    propA?: {\n        propA?: string;\n    } | string | number;\n};\n\n/**\n * This is a model with nested 'any of' property with a type null\n */\nexport type CompositionWithNestedAnyAndTypeNull = {\n    propA?: Array<ModelWithDictionary | null> | Array<ModelWithArray | null>;\n};\n\nexport type _3eNum1Период = 'Bird' | 'Dog';\n\nexport type ConstValue = 'ConstValue';\n\n/**\n * This is a model with one property with a 'any of' relationship where the options are not $ref\n */\nexport type CompositionWithNestedAnyOfAndNull = {\n    /**\n     * Scopes\n     */\n    propA?: Array<_3eNum1Период | ConstValue> | null;\n};\n\n/**\n * This is a model with one property with a 'one of' relationship\n */\nexport type CompositionWithOneOfAndNullable = {\n    propA?: {\n        boolean?: boolean;\n    } | ModelWithEnum | ModelWithArray | ModelWithDictionary | null;\n};\n\n/**\n * This is a model that contains a simple dictionary within composition\n */\nexport type CompositionWithOneOfAndSimpleDictionary = {\n    propA?: boolean | {\n        [key: string]: number;\n    };\n};\n\n/**\n * This is a model that contains a dictionary of simple arrays within composition\n */\nexport type CompositionWithOneOfAndSimpleArrayDictionary = {\n    propA?: boolean | {\n        [key: string]: Array<boolean>;\n    };\n};\n\n/**\n * This is a model that contains a dictionary of complex arrays (composited) within composition\n */\nexport type CompositionWithOneOfAndComplexArrayDictionary = {\n    propA?: boolean | {\n        [key: string]: Array<number | string>;\n    };\n};\n\n/**\n * This is a model with one property with a 'all of' relationship\n */\nexport type CompositionWithAllOfAndNullable = {\n    propA?: ({\n        boolean?: boolean;\n    } & ModelWithEnum & ModelWithArray & ModelWithDictionary) | null;\n};\n\n/**\n * This is a model with one property with a 'any of' relationship\n */\nexport type CompositionWithAnyOfAndNullable = {\n    propA?: {\n        boolean?: boolean;\n    } | ModelWithEnum | ModelWithArray | ModelWithDictionary | null;\n};\n\n/**\n * This is a base model with two simple optional properties\n */\nexport type CompositionBaseModel = {\n    firstName?: string;\n    lastname?: string;\n};\n\n/**\n * This is a model that extends the base model\n */\nexport type CompositionExtendedModel = CompositionBaseModel & {\n    age: number;\n    firstName: string;\n    lastname: string;\n};\n\n/**\n * This is a model with one nested property\n */\nexport type ModelWithProperties = {\n    required: string;\n    readonly requiredAndReadOnly: string;\n    requiredAndNullable: string | null;\n    string?: string;\n    number?: number;\n    boolean?: boolean;\n    reference?: ModelWithString;\n    'property with space'?: string;\n    default?: string;\n    try?: string;\n    readonly '@namespace.string'?: string;\n    readonly '@namespace.integer'?: number;\n};\n\n/**\n * This is a model with one nested property\n */\nexport type ModelWithNestedProperties = {\n    readonly first: {\n        readonly second: {\n            readonly third: string | null;\n        } | null;\n    } | null;\n};\n\n/**\n * This is a model with duplicated properties\n */\nexport type ModelWithDuplicateProperties = {\n    prop?: ModelWithString;\n};\n\n/**\n * This is a model with ordered properties\n */\nexport type ModelWithOrderedProperties = {\n    zebra?: string;\n    apple?: string;\n    hawaii?: string;\n};\n\n/**\n * This is a model with duplicated imports\n */\nexport type ModelWithDuplicateImports = {\n    propA?: ModelWithString;\n    propB?: ModelWithString;\n    propC?: ModelWithString;\n};\n\n/**\n * This is a model that extends another model\n */\nexport type ModelThatExtends = ModelWithString & {\n    propExtendsA?: string;\n    propExtendsB?: ModelWithString;\n};\n\n/**\n * This is a model that extends another model\n */\nexport type ModelThatExtendsExtends = ModelWithString & ModelThatExtends & {\n    propExtendsC?: string;\n    propExtendsD?: ModelWithString;\n};\n\n/**\n * This is a model that contains a some patterns\n */\nexport type ModelWithPattern = {\n    key: string;\n    name: string;\n    readonly enabled?: boolean;\n    readonly modified?: string;\n    id?: string;\n    text?: string;\n    patternWithSingleQuotes?: string;\n    patternWithNewline?: string;\n    patternWithBacktick?: string;\n    patternWithUnicode?: string;\n};\n\nexport type File = {\n    /**\n     * Id\n     */\n    readonly id?: string;\n    /**\n     * Updated at\n     */\n    readonly updated_at?: string;\n    /**\n     * Created at\n     */\n    readonly created_at?: string;\n    /**\n     * Mime\n     */\n    mime: string;\n    /**\n     * File\n     */\n    readonly file?: string;\n};\n\nexport type Default = {\n    name?: string;\n};\n\nexport type Pageable = {\n    page?: number;\n    size?: number;\n    sort?: Array<string>;\n};\n\n/**\n * This is a free-form object without additionalProperties.\n */\nexport type FreeFormObjectWithoutAdditionalProperties = {\n    [key: string]: unknown;\n};\n\n/**\n * This is a free-form object with additionalProperties: true.\n */\nexport type FreeFormObjectWithAdditionalPropertiesEqTrue = {\n    [key: string]: unknown;\n};\n\n/**\n * This is a free-form object with additionalProperties: {}.\n */\nexport type FreeFormObjectWithAdditionalPropertiesEqEmptyObject = {\n    [key: string]: unknown;\n};\n\nexport type ModelWithConst = {\n    String?: 'String';\n    number?: 0;\n    null?: null;\n    withType?: 'Some string';\n};\n\n/**\n * This is a model with one property and additionalProperties: true\n */\nexport type ModelWithAdditionalPropertiesEqTrue = {\n    /**\n     * This is a simple string property\n     */\n    prop?: string;\n    [key: string]: unknown;\n};\n\nexport type NestedAnyOfArraysNullable = {\n    nullableArray?: Array<string | boolean> | null;\n};\n\nexport type CompositionWithOneOfAndProperties = ({\n    foo: SimpleParameter;\n} | {\n    bar: NonAsciiStringæøåÆøÅöôêÊ字符串;\n}) & {\n    baz: number | null;\n    qux: number;\n};\n\n/**\n * An object that can be null\n */\nexport type NullableObject = {\n    foo?: string;\n} | null;\n\n/**\n * Some % character\n */\nexport type CharactersInDescription = string;\n\nexport type ModelWithNullableObject = {\n    data?: NullableObject;\n};\n\n/**\n * An object with additional properties that can be null (anyOf ref + null)\n */\nexport type ModelWithAdditionalPropertiesRef = {\n    [key: string]: NullableObject | null;\n};\n\nexport type ModelWithOneOfEnum = {\n    foo: 'Bar';\n} | {\n    foo: 'Baz';\n} | {\n    foo: 'Qux';\n} | {\n    content: string;\n    foo: 'Quux';\n} | {\n    content: [\n        string,\n        string\n    ];\n    foo: 'Corge';\n};\n\nexport type ModelWithNestedArrayEnumsDataFoo = 'foo' | 'bar';\n\nexport type ModelWithNestedArrayEnumsDataBar = 'baz' | 'qux';\n\nexport type ModelWithNestedArrayEnumsData = {\n    foo?: Array<ModelWithNestedArrayEnumsDataFoo>;\n    bar?: Array<ModelWithNestedArrayEnumsDataBar>;\n};\n\nexport type ModelWithNestedArrayEnums = {\n    array_strings?: Array<string>;\n    data?: ModelWithNestedArrayEnumsData;\n};\n\nexport type ModelWithNestedCompositionEnums = {\n    foo?: ModelWithNestedArrayEnumsDataFoo;\n};\n\nexport type ModelWithReadOnlyAndWriteOnly = {\n    foo: string;\n    readonly bar: string;\n};\n\nexport type ModelWithConstantSizeArray = [\n    number,\n    number\n];\n\nexport type ModelWithAnyOfConstantSizeArray = [\n    number | string,\n    number | string,\n    number | string\n];\n\nexport type ModelWithPrefixItemsConstantSizeArray = [\n    ModelWithInteger,\n    number | string,\n    string\n];\n\nexport type ModelWithAnyOfConstantSizeArrayNullable = [\n    number | null | string,\n    number | null | string,\n    number | null | string\n];\n\nexport type ModelWithAnyOfConstantSizeArrayWithNSizeAndOptions = [\n    number | Import,\n    number | Import\n];\n\nexport type ModelWithAnyOfConstantSizeArrayAndIntersect = [\n    number & string,\n    number & string\n];\n\nexport type ModelWithNumericEnumUnion = {\n    /**\n     * Период\n     */\n    value?: -10 | -1 | 0 | 1 | 3 | 6 | 12;\n};\n\n/**\n * Some description with `back ticks`\n */\nexport type ModelWithBackticksInDescription = {\n    /**\n     * The template `that` should be used for parsing and importing the contents of the CSV file.\n     *\n     * <br/><p>There is one placeholder currently supported:<ul>     <li><b>${x}</b> - refers to the n-th column in the CSV file, e.g. ${1}, ${2}, ...)</li></ul><p>Example of a correct JSON template:</p>\n     * <pre>\n     * [\n     * {\n     * \"resourceType\": \"Asset\",\n     * \"identifier\": {\n     * \"name\": \"${1}\",\n     * \"domain\": {\n     * \"name\": \"${2}\",\n     * \"community\": {\n     * \"name\": \"Some Community\"\n     * }\n     * }\n     * },\n     * \"attributes\" : {\n     * \"00000000-0000-0000-0000-000000003115\" : [ {\n     * \"value\" : \"${3}\"\n     * } ],\n     * \"00000000-0000-0000-0000-000000000222\" : [ {\n     * \"value\" : \"${4}\"\n     * } ]\n     * }\n     * }\n     * ]\n     * </pre>\n     */\n    template?: string;\n};\n\nexport type ModelWithOneOfAndProperties = (SimpleParameter | NonAsciiStringæøåÆøÅöôêÊ字符串) & {\n    baz: number | null;\n    qux: number;\n};\n\n/**\n * Model used to test deduplication strategy (unused)\n */\nexport type ParameterSimpleParameterUnused = string;\n\n/**\n * Model used to test deduplication strategy\n */\nexport type PostServiceWithEmptyTagResponse = string;\n\n/**\n * Model used to test deduplication strategy\n */\nexport type PostServiceWithEmptyTagResponse2 = string;\n\n/**\n * Model used to test deduplication strategy\n */\nexport type DeleteFooData = string;\n\n/**\n * Model used to test deduplication strategy\n */\nexport type DeleteFooData2 = string;\n\n/**\n * Model with restricted keyword name\n */\nexport type Import = string;\n\nexport type SchemaWithFormRestrictedKeys = {\n    description?: string;\n    'x-enum-descriptions'?: string;\n    'x-enum-varnames'?: string;\n    'x-enumNames'?: string;\n    title?: string;\n    object?: {\n        description?: string;\n        'x-enum-descriptions'?: string;\n        'x-enum-varnames'?: string;\n        'x-enumNames'?: string;\n        title?: string;\n    };\n    array?: Array<{\n        description?: string;\n        'x-enum-descriptions'?: string;\n        'x-enum-varnames'?: string;\n        'x-enumNames'?: string;\n        title?: string;\n    }>;\n};\n\n/**\n * This schema was giving PascalCase transformations a hard time\n */\nexport type IoK8sApimachineryPkgApisMetaV1DeleteOptions = {\n    /**\n     * Must be fulfilled before a deletion is carried out. If not possible, a 409 Conflict status will be returned.\n     */\n    preconditions?: IoK8sApimachineryPkgApisMetaV1Preconditions;\n};\n\n/**\n * This schema was giving PascalCase transformations a hard time\n */\nexport type IoK8sApimachineryPkgApisMetaV1Preconditions = {\n    /**\n     * Specifies the target ResourceVersion\n     */\n    resourceVersion?: string;\n    /**\n     * Specifies the target UID.\n     */\n    uid?: string;\n};\n\nexport type AdditionalPropertiesUnknownIssue = {\n    [key: string]: string | number;\n};\n\nexport type AdditionalPropertiesUnknownIssue2 = {\n    [key: string]: string | number;\n};\n\nexport type AdditionalPropertiesUnknownIssue3 = string & {\n    entries: {\n        [key: string]: AdditionalPropertiesUnknownIssue;\n    };\n};\n\nexport type AdditionalPropertiesIntegerIssue = {\n    value: number;\n    [key: string]: number;\n};\n\nexport type OneOfAllOfIssue = ((ConstValue | GenericSchemaDuplicateIssue1SystemBoolean) & _3eNum1Период) | GenericSchemaDuplicateIssue1SystemString;\n\nexport type GenericSchemaDuplicateIssue1SystemBoolean = {\n    item?: boolean;\n    error?: string | null;\n    readonly hasError?: boolean;\n    data?: {\n        [key: string]: never;\n    };\n};\n\nexport type GenericSchemaDuplicateIssue1SystemString = {\n    item?: string | null;\n    error?: string | null;\n    readonly hasError?: boolean;\n};\n\nexport type ExternalSharedModel = {\n    id: string;\n    name?: string;\n};\n\n/**\n * This is a model with one property containing a reference\n */\nexport type ModelWithReferenceWritable = {\n    prop?: ModelWithPropertiesWritable;\n};\n\n/**\n * This is a model with one property containing an array\n */\nexport type ModelWithArrayReadOnlyAndWriteOnlyWritable = {\n    prop?: Array<ModelWithReadOnlyAndWriteOnlyWritable>;\n    propWithFile?: Array<Blob | File>;\n    propWithNumber?: Array<number>;\n};\n\n/**\n * This is a model with one nested property\n */\nexport type ModelWithPropertiesWritable = {\n    required: string;\n    requiredAndNullable: string | null;\n    string?: string;\n    number?: number;\n    boolean?: boolean;\n    reference?: ModelWithString;\n    'property with space'?: string;\n    default?: string;\n    try?: string;\n};\n\n/**\n * This is a model that contains a some patterns\n */\nexport type ModelWithPatternWritable = {\n    key: string;\n    name: string;\n    id?: string;\n    text?: string;\n    patternWithSingleQuotes?: string;\n    patternWithNewline?: string;\n    patternWithBacktick?: string;\n    patternWithUnicode?: string;\n};\n\nexport type FileWritable = {\n    /**\n     * Mime\n     */\n    mime: string;\n};\n\nexport type ModelWithReadOnlyAndWriteOnlyWritable = {\n    foo: string;\n    baz: string;\n};\n\nexport type ModelWithAnyOfConstantSizeArrayWithNSizeAndOptionsWritable = [\n    number | Import,\n    number | Import\n];\n\nexport type AdditionalPropertiesUnknownIssueWritable = {\n    [key: string]: string | number;\n};\n\nexport type OneOfAllOfIssueWritable = ((ConstValue | GenericSchemaDuplicateIssue1SystemBoolean) & _3eNum1Период) | GenericSchemaDuplicateIssue1SystemString;\n\nexport type GenericSchemaDuplicateIssue1SystemBooleanWritable = {\n    item?: boolean;\n    error?: string | null;\n    data?: {\n        [key: string]: never;\n    };\n};\n\nexport type GenericSchemaDuplicateIssue1SystemStringWritable = {\n    item?: string | null;\n    error?: string | null;\n};\n\n/**\n * This is a reusable parameter\n */\nexport type SimpleParameter = string;\n\n/**\n * Parameter with illegal characters\n */\nexport type XFooBar = ModelWithString;\n\n/**\n * A reusable request body\n */\nexport type SimpleRequestBody = ModelWithString;\n\n/**\n * A reusable request body\n */\nexport type SimpleFormData = ModelWithString;\n\nexport type ExportData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no+tag';\n};\n\nexport type PatchApiVbyApiVersionNoTagData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no+tag';\n};\n\nexport type PatchApiVbyApiVersionNoTagResponses = {\n    /**\n     * OK\n     */\n    default: unknown;\n};\n\nexport type ImportData = {\n    body: ModelWithReadOnlyAndWriteOnlyWritable | ModelWithArrayReadOnlyAndWriteOnlyWritable;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no+tag';\n};\n\nexport type ImportResponses = {\n    /**\n     * Success\n     */\n    200: ModelFromZendesk;\n    /**\n     * Default success response\n     */\n    default: ModelWithReadOnlyAndWriteOnly;\n};\n\nexport type ImportResponse = ImportResponses[keyof ImportResponses];\n\nexport type FooWowData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no+tag';\n};\n\nexport type FooWowResponses = {\n    /**\n     * OK\n     */\n    default: unknown;\n};\n\nexport type ApiVVersionODataControllerCountData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple/$count';\n};\n\nexport type ApiVVersionODataControllerCountResponses = {\n    /**\n     * Success\n     */\n    200: ModelFromZendesk;\n};\n\nexport type ApiVVersionODataControllerCountResponse = ApiVVersionODataControllerCountResponses[keyof ApiVVersionODataControllerCountResponses];\n\nexport type GetApiVbyApiVersionSimpleOperationData = {\n    body?: never;\n    path: {\n        /**\n         * foo in method\n         */\n        foo_param: string;\n    };\n    query?: never;\n    url: '/api/v{api-version}/simple:operation';\n};\n\nexport type GetApiVbyApiVersionSimpleOperationErrors = {\n    /**\n     * Default error response\n     */\n    default: ModelWithBoolean;\n};\n\nexport type GetApiVbyApiVersionSimpleOperationError = GetApiVbyApiVersionSimpleOperationErrors[keyof GetApiVbyApiVersionSimpleOperationErrors];\n\nexport type GetApiVbyApiVersionSimpleOperationResponses = {\n    /**\n     * Response is a simple number\n     */\n    200: number;\n};\n\nexport type GetApiVbyApiVersionSimpleOperationResponse = GetApiVbyApiVersionSimpleOperationResponses[keyof GetApiVbyApiVersionSimpleOperationResponses];\n\nexport type DeleteCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type GetCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type HeadCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type OptionsCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type PatchCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type PostCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type PutCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type DeleteFooData3 = {\n    body?: never;\n    headers: {\n        /**\n         * Parameter with illegal characters\n         */\n        'x-Foo-Bar': ModelWithString;\n    };\n    path: {\n        /**\n         * foo in method\n         */\n        foo_param: string;\n        /**\n         * bar in method\n         */\n        BarParam: string;\n    };\n    query?: never;\n    url: '/api/v{api-version}/foo/{foo_param}/bar/{BarParam}';\n};\n\nexport type CallWithDescriptionsData = {\n    body?: never;\n    path?: never;\n    query?: {\n        /**\n         * Testing multiline comments in string: First line\n         * Second line\n         *\n         * Fourth line\n         */\n        parameterWithBreaks?: string;\n        /**\n         * Testing backticks in string: `backticks` and ```multiple backticks``` should work\n         */\n        parameterWithBackticks?: string;\n        /**\n         * Testing slashes in string: \\backwards\\\\\\ and /forwards/// should work\n         */\n        parameterWithSlashes?: string;\n        /**\n         * Testing expression placeholders in string: ${expression} should work\n         */\n        parameterWithExpressionPlaceholders?: string;\n        /**\n         * Testing quotes in string: 'single quote''' and \"double quotes\"\"\" should work\n         */\n        parameterWithQuotes?: string;\n        /**\n         * Testing reserved characters in string: * inline * and ** inline ** should work\n         */\n        parameterWithReservedCharacters?: string;\n    };\n    url: '/api/v{api-version}/descriptions';\n};\n\nexport type DeprecatedCallData = {\n    body?: never;\n    headers: {\n        /**\n         * This parameter is deprecated\n         *\n         * @deprecated\n         */\n        parameter: DeprecatedModel | null;\n    };\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/parameters/deprecated';\n};\n\nexport type CallWithParametersData = {\n    /**\n     * This is the parameter that goes into the body\n     */\n    body: {\n        [key: string]: unknown;\n    } | null;\n    headers: {\n        /**\n         * This is the parameter that goes into the header\n         */\n        parameterHeader: string | null;\n    };\n    path: {\n        /**\n         * This is the parameter that goes into the path\n         */\n        parameterPath: string | null;\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string | null;\n    };\n    query: {\n        foo_ref_enum?: ModelWithNestedArrayEnumsDataFoo;\n        foo_all_of_enum: ModelWithNestedArrayEnumsDataFoo;\n        /**\n         * This is the parameter that goes into the query params\n         */\n        cursor: string | null;\n    };\n    url: '/api/v{api-version}/parameters/{parameterPath}';\n};\n\nexport type CallWithWeirdParameterNamesData = {\n    /**\n     * This is the parameter that goes into the body\n     */\n    body: ModelWithString | null;\n    headers: {\n        /**\n         * This is the parameter that goes into the request header\n         */\n        'parameter.header': string | null;\n    };\n    path: {\n        /**\n         * This is the parameter that goes into the path\n         */\n        'parameter.path.1'?: string;\n        /**\n         * This is the parameter that goes into the path\n         */\n        'parameter-path-2'?: string;\n        /**\n         * This is the parameter that goes into the path\n         */\n        'PARAMETER-PATH-3'?: string;\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string | null;\n    };\n    query: {\n        /**\n         * This is the parameter with a reserved keyword\n         */\n        default?: string;\n        /**\n         * This is the parameter that goes into the request query params\n         */\n        'parameter-query': string | null;\n    };\n    url: '/api/v{api-version}/parameters/{parameter.path.1}/{parameter-path-2}/{PARAMETER-PATH-3}';\n};\n\nexport type GetCallWithOptionalParamData = {\n    /**\n     * This is a required parameter\n     */\n    body: ModelWithOneOfEnum;\n    path?: never;\n    query?: {\n        /**\n         * This is an optional parameter\n         */\n        page?: number;\n    };\n    url: '/api/v{api-version}/parameters';\n};\n\nexport type PostCallWithOptionalParamData = {\n    /**\n     * This is an optional parameter\n     */\n    body?: {\n        offset?: number | null;\n    };\n    path?: never;\n    query: {\n        /**\n         * This is a required parameter\n         */\n        parameter: Pageable;\n    };\n    url: '/api/v{api-version}/parameters';\n};\n\nexport type PostCallWithOptionalParamResponses = {\n    /**\n     * Response is a simple number\n     */\n    200: number;\n    /**\n     * Success\n     */\n    204: void;\n};\n\nexport type PostCallWithOptionalParamResponse = PostCallWithOptionalParamResponses[keyof PostCallWithOptionalParamResponses];\n\nexport type PostApiVbyApiVersionRequestBodyData = {\n    /**\n     * A reusable request body\n     */\n    body?: SimpleRequestBody;\n    path?: never;\n    query?: {\n        /**\n         * This is a reusable parameter\n         */\n        parameter?: string;\n    };\n    url: '/api/v{api-version}/requestBody';\n};\n\nexport type PostApiVbyApiVersionFormDataData = {\n    /**\n     * A reusable request body\n     */\n    body?: SimpleFormData;\n    path?: never;\n    query?: {\n        /**\n         * This is a reusable parameter\n         */\n        parameter?: string;\n    };\n    url: '/api/v{api-version}/formData';\n};\n\nexport type CallWithDefaultParametersData = {\n    body?: never;\n    path?: never;\n    query?: {\n        /**\n         * This is a simple string with default value\n         */\n        parameterString?: string | null;\n        /**\n         * This is a simple number with default value\n         */\n        parameterNumber?: number | null;\n        /**\n         * This is a simple boolean with default value\n         */\n        parameterBoolean?: boolean | null;\n        /**\n         * This is a simple enum with default value\n         */\n        parameterEnum?: 'Success' | 'Warning' | 'Error';\n        /**\n         * This is a simple model with default value\n         */\n        parameterModel?: ModelWithString | null;\n    };\n    url: '/api/v{api-version}/defaults';\n};\n\nexport type CallWithDefaultOptionalParametersData = {\n    body?: never;\n    path?: never;\n    query?: {\n        /**\n         * This is a simple string that is optional with default value\n         */\n        parameterString?: string;\n        /**\n         * This is a simple number that is optional with default value\n         */\n        parameterNumber?: number;\n        /**\n         * This is a simple boolean that is optional with default value\n         */\n        parameterBoolean?: boolean;\n        /**\n         * This is a simple enum that is optional with default value\n         */\n        parameterEnum?: 'Success' | 'Warning' | 'Error';\n        /**\n         * This is a simple model that is optional with default value\n         */\n        parameterModel?: ModelWithString;\n    };\n    url: '/api/v{api-version}/defaults';\n};\n\nexport type CallToTestOrderOfParamsData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * This is a optional string with default\n         */\n        parameterOptionalStringWithDefault?: string;\n        /**\n         * This is a optional string with empty default\n         */\n        parameterOptionalStringWithEmptyDefault?: string;\n        /**\n         * This is a optional string with no default\n         */\n        parameterOptionalStringWithNoDefault?: string;\n        /**\n         * This is a string with default\n         */\n        parameterStringWithDefault: string;\n        /**\n         * This is a string with empty default\n         */\n        parameterStringWithEmptyDefault: string;\n        /**\n         * This is a string with no default\n         */\n        parameterStringWithNoDefault: string;\n        /**\n         * This is a string that can be null with no default\n         */\n        parameterStringNullableWithNoDefault?: string | null;\n        /**\n         * This is a string that can be null with default\n         */\n        parameterStringNullableWithDefault?: string | null;\n    };\n    url: '/api/v{api-version}/defaults';\n};\n\nexport type DuplicateNameData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/duplicate';\n};\n\nexport type DuplicateName2Data = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/duplicate';\n};\n\nexport type DuplicateName3Data = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/duplicate';\n};\n\nexport type DuplicateName4Data = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/duplicate';\n};\n\nexport type CallWithNoContentResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no-content';\n};\n\nexport type CallWithNoContentResponseResponses = {\n    /**\n     * Success\n     */\n    204: void;\n};\n\nexport type CallWithNoContentResponseResponse = CallWithNoContentResponseResponses[keyof CallWithNoContentResponseResponses];\n\nexport type CallWithResponseAndNoContentResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multiple-tags/response-and-no-content';\n};\n\nexport type CallWithResponseAndNoContentResponseResponses = {\n    /**\n     * Response is a simple number\n     */\n    200: number;\n    /**\n     * Success\n     */\n    204: void;\n};\n\nexport type CallWithResponseAndNoContentResponseResponse = CallWithResponseAndNoContentResponseResponses[keyof CallWithResponseAndNoContentResponseResponses];\n\nexport type DummyAData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multiple-tags/a';\n};\n\nexport type DummyAResponses = {\n    200: _400;\n};\n\nexport type DummyAResponse = DummyAResponses[keyof DummyAResponses];\n\nexport type DummyBData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multiple-tags/b';\n};\n\nexport type DummyBResponses = {\n    /**\n     * Success\n     */\n    204: void;\n};\n\nexport type DummyBResponse = DummyBResponses[keyof DummyBResponses];\n\nexport type CallWithResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/response';\n};\n\nexport type CallWithResponseResponses = {\n    default: Import;\n};\n\nexport type CallWithResponseResponse = CallWithResponseResponses[keyof CallWithResponseResponses];\n\nexport type CallWithDuplicateResponsesData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/response';\n};\n\nexport type CallWithDuplicateResponsesErrors = {\n    /**\n     * Message for 500 error\n     */\n    500: ModelWithStringError;\n    /**\n     * Message for 501 error\n     */\n    501: ModelWithStringError;\n    /**\n     * Message for 502 error\n     */\n    502: ModelWithStringError;\n    /**\n     * Message for 4XX errors\n     */\n    '4XX': DictionaryWithArray;\n    /**\n     * Default error response\n     */\n    default: ModelWithBoolean;\n};\n\nexport type CallWithDuplicateResponsesError = CallWithDuplicateResponsesErrors[keyof CallWithDuplicateResponsesErrors];\n\nexport type CallWithDuplicateResponsesResponses = {\n    /**\n     * Message for 200 response\n     */\n    200: ModelWithBoolean & ModelWithInteger;\n    /**\n     * Message for 201 response\n     */\n    201: ModelWithString;\n    /**\n     * Message for 202 response\n     */\n    202: ModelWithString;\n};\n\nexport type CallWithDuplicateResponsesResponse = CallWithDuplicateResponsesResponses[keyof CallWithDuplicateResponsesResponses];\n\nexport type CallWithResponsesData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/response';\n};\n\nexport type CallWithResponsesErrors = {\n    /**\n     * Message for 500 error\n     */\n    500: ModelWithStringError;\n    /**\n     * Message for 501 error\n     */\n    501: ModelWithStringError;\n    /**\n     * Message for 502 error\n     */\n    502: ModelWithStringError;\n    /**\n     * Message for default response\n     */\n    default: ModelWithStringError;\n};\n\nexport type CallWithResponsesError = CallWithResponsesErrors[keyof CallWithResponsesErrors];\n\nexport type CallWithResponsesResponses = {\n    /**\n     * Message for 200 response\n     */\n    200: {\n        readonly '@namespace.string'?: string;\n        readonly '@namespace.integer'?: number;\n        readonly value?: Array<ModelWithString>;\n    };\n    /**\n     * Message for 201 response\n     */\n    201: ModelThatExtends;\n    /**\n     * Message for 202 response\n     */\n    202: ModelThatExtendsExtends;\n};\n\nexport type CallWithResponsesResponse = CallWithResponsesResponses[keyof CallWithResponsesResponses];\n\nexport type CollectionFormatData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * This is an array parameter that is sent as csv format (comma-separated values)\n         */\n        parameterArrayCSV: Array<string> | null;\n        /**\n         * This is an array parameter that is sent as ssv format (space-separated values)\n         */\n        parameterArraySSV: Array<string> | null;\n        /**\n         * This is an array parameter that is sent as tsv format (tab-separated values)\n         */\n        parameterArrayTSV: Array<string> | null;\n        /**\n         * This is an array parameter that is sent as pipes format (pipe-separated values)\n         */\n        parameterArrayPipes: Array<string> | null;\n        /**\n         * This is an array parameter that is sent as multi format (multiple parameter instances)\n         */\n        parameterArrayMulti: Array<string> | null;\n    };\n    url: '/api/v{api-version}/collectionFormat';\n};\n\nexport type TypesData = {\n    body?: never;\n    path?: {\n        /**\n         * This is a number parameter\n         */\n        id?: number;\n    };\n    query: {\n        /**\n         * This is a number parameter\n         */\n        parameterNumber: number;\n        /**\n         * This is a string parameter\n         */\n        parameterString: string | null;\n        /**\n         * This is a boolean parameter\n         */\n        parameterBoolean: boolean | null;\n        /**\n         * This is an object parameter\n         */\n        parameterObject: {\n            [key: string]: unknown;\n        } | null;\n        /**\n         * This is an array parameter\n         */\n        parameterArray: Array<string> | null;\n        /**\n         * This is a dictionary parameter\n         */\n        parameterDictionary: {\n            [key: string]: unknown;\n        } | null;\n        /**\n         * This is an enum parameter\n         */\n        parameterEnum: 'Success' | 'Warning' | 'Error' | null;\n    };\n    url: '/api/v{api-version}/types';\n};\n\nexport type TypesResponses = {\n    /**\n     * Response is a simple number\n     */\n    200: number;\n    /**\n     * Response is a simple string\n     */\n    201: string;\n    /**\n     * Response is a simple boolean\n     */\n    202: boolean;\n    /**\n     * Response is a simple object\n     */\n    203: {\n        [key: string]: unknown;\n    };\n};\n\nexport type TypesResponse = TypesResponses[keyof TypesResponses];\n\nexport type UploadFileData = {\n    body: Blob | File;\n    path: {\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string | null;\n    };\n    query?: never;\n    url: '/api/v{api-version}/upload';\n};\n\nexport type UploadFileResponses = {\n    200: boolean;\n};\n\nexport type UploadFileResponse = UploadFileResponses[keyof UploadFileResponses];\n\nexport type FileResponseData = {\n    body?: never;\n    path: {\n        id: string;\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string;\n    };\n    query?: never;\n    url: '/api/v{api-version}/file/{id}';\n};\n\nexport type FileResponseResponses = {\n    /**\n     * Success\n     */\n    200: Blob | File;\n};\n\nexport type FileResponseResponse = FileResponseResponses[keyof FileResponseResponses];\n\nexport type ComplexTypesData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * Parameter containing object\n         */\n        parameterObject: {\n            first?: {\n                second?: {\n                    third?: string;\n                };\n            };\n        };\n        /**\n         * Parameter containing reference\n         */\n        parameterReference: ModelWithString;\n    };\n    url: '/api/v{api-version}/complex';\n};\n\nexport type ComplexTypesErrors = {\n    /**\n     * 400 `server` error\n     */\n    400: unknown;\n    /**\n     * 500 server error\n     */\n    500: unknown;\n};\n\nexport type ComplexTypesResponses = {\n    /**\n     * Successful response\n     */\n    200: Array<ModelWithString>;\n};\n\nexport type ComplexTypesResponse = ComplexTypesResponses[keyof ComplexTypesResponses];\n\nexport type MultipartResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multipart';\n};\n\nexport type MultipartResponseResponses = {\n    /**\n     * OK\n     */\n    200: {\n        file?: Blob | File;\n        metadata?: {\n            foo?: string;\n            bar?: string;\n        };\n    };\n};\n\nexport type MultipartResponseResponse = MultipartResponseResponses[keyof MultipartResponseResponses];\n\nexport type MultipartRequestData = {\n    body?: {\n        content?: Blob | File;\n        data?: ModelWithString | null;\n    };\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multipart';\n};\n\nexport type ComplexParamsData = {\n    body?: {\n        readonly key: string | null;\n        name: string | null;\n        enabled?: boolean;\n        type: 'Monkey' | 'Horse' | 'Bird';\n        listOfModels?: Array<ModelWithString> | null;\n        listOfStrings?: Array<string> | null;\n        parameters: ModelWithString | ModelWithEnum | ModelWithArray | ModelWithDictionary;\n        readonly user?: {\n            readonly id?: number;\n            readonly name?: string | null;\n        };\n    };\n    path: {\n        id: number;\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string;\n    };\n    query?: never;\n    url: '/api/v{api-version}/complex/{id}';\n};\n\nexport type ComplexParamsResponses = {\n    /**\n     * Success\n     */\n    200: ModelWithString;\n};\n\nexport type ComplexParamsResponse = ComplexParamsResponses[keyof ComplexParamsResponses];\n\nexport type CallWithResultFromHeaderData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/header';\n};\n\nexport type CallWithResultFromHeaderErrors = {\n    /**\n     * 400 server error\n     */\n    400: unknown;\n    /**\n     * 500 server error\n     */\n    500: unknown;\n};\n\nexport type CallWithResultFromHeaderResponses = {\n    /**\n     * Successful response\n     */\n    200: unknown;\n};\n\nexport type TestErrorCodeData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * Status code to return\n         */\n        status: number;\n    };\n    url: '/api/v{api-version}/error';\n};\n\nexport type TestErrorCodeErrors = {\n    /**\n     * Custom message: Internal Server Error\n     */\n    500: unknown;\n    /**\n     * Custom message: Not Implemented\n     */\n    501: unknown;\n    /**\n     * Custom message: Bad Gateway\n     */\n    502: unknown;\n    /**\n     * Custom message: Service Unavailable\n     */\n    503: unknown;\n};\n\nexport type TestErrorCodeResponses = {\n    /**\n     * Custom message: Successful response\n     */\n    200: unknown;\n};\n\nexport type NonAsciiæøåÆøÅöôêÊ字符串Data = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * Dummy input param\n         */\n        nonAsciiParamæøåÆØÅöôêÊ: number;\n    };\n    url: '/api/v{api-version}/non-ascii-æøåÆØÅöôêÊ字符串';\n};\n\nexport type NonAsciiæøåÆøÅöôêÊ字符串Responses = {\n    /**\n     * Successful response\n     */\n    200: Array<NonAsciiStringæøåÆøÅöôêÊ字符串>;\n};\n\nexport type NonAsciiæøåÆøÅöôêÊ字符串Response = NonAsciiæøåÆøÅöôêÊ字符串Responses[keyof NonAsciiæøåÆøÅöôêÊ字符串Responses];\n\nexport type PutWithFormUrlEncodedData = {\n    body: ArrayWithStrings;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/non-ascii-æøåÆØÅöôêÊ字符串';\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-nuxt/tsconfig-nodenext-sdk/client/client.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport { useAsyncData, useFetch, useLazyAsyncData, useLazyFetch } from 'nuxt/app';\nimport { reactive, ref, toValue, watch } from 'vue';\n\nimport { createSseClient } from '../core/serverSentEvents.gen.js';\nimport type { HttpMethod } from '../core/types.gen.js';\nimport { getValidRequestBody } from '../core/utils.gen.js';\nimport type { Client, Config, RequestOptions } from './types.gen.js';\nimport {\n  buildUrl,\n  createConfig,\n  executeFetchFn,\n  mergeConfigs,\n  mergeHeaders,\n  mergeInterceptors,\n  serializeBody,\n  setAuthParams,\n  unwrapRefs,\n} from './utils.gen.js';\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 beforeRequest = async (options: RequestOptions) => {\n    const opts = {\n      ..._config,\n      ...options,\n      $fetch: options.$fetch ?? _config.$fetch ?? $fetch,\n      headers: mergeHeaders(_config.headers, options.headers),\n      onRequest: mergeInterceptors(_config.onRequest, options.onRequest),\n      onResponse: mergeInterceptors(_config.onResponse, options.onResponse),\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    const url = buildUrl(opts);\n\n    return { opts, url };\n  };\n\n  const request: Client['request'] = ({ asyncDataOptions, composable = '$fetch', ...options }) => {\n    const key = options.key;\n    const opts = {\n      ..._config,\n      ...options,\n      $fetch: options.$fetch ?? _config.$fetch ?? $fetch,\n      headers: mergeHeaders(_config.headers, options.headers),\n      onRequest: mergeInterceptors(_config.onRequest, options.onRequest),\n      onResponse: mergeInterceptors(_config.onResponse, options.onResponse),\n    };\n\n    const { requestValidator, responseTransformer, responseValidator, security } = opts;\n    if (requestValidator || security) {\n      // auth must happen in interceptors otherwise we'd need to require\n      // asyncContext enabled\n      // https://nuxt.com/docs/guide/going-further/experimental-features#asynccontext\n      opts.onRequest = [\n        async ({ options }) => {\n          if (security) {\n            await setAuthParams({\n              auth: opts.auth,\n              headers: options.headers,\n              query: options.query,\n              security,\n            });\n          }\n\n          if (requestValidator) {\n            await requestValidator({\n              ...options,\n              // @ts-expect-error\n              body: options.rawBody,\n            });\n          }\n        },\n        ...opts.onRequest,\n      ];\n    }\n\n    if (responseTransformer || responseValidator) {\n      opts.onResponse = [\n        ...opts.onResponse,\n        async ({ options, response }) => {\n          if (options.responseType && options.responseType !== 'json') {\n            return;\n          }\n\n          if (!response.ok) {\n            return;\n          }\n\n          if (responseValidator) {\n            await responseValidator(response._data);\n          }\n\n          if (responseTransformer) {\n            response._data = await responseTransformer(response._data);\n          }\n        },\n      ];\n    }\n\n    // remove Content-Type header if body is empty to avoid sending invalid requests\n    if (opts.body === undefined || opts.body === '') {\n      opts.headers.delete('Content-Type');\n    }\n\n    const fetchFn = opts.$fetch;\n\n    if (composable === '$fetch') {\n      return executeFetchFn(\n        // @ts-expect-error\n        opts,\n        fetchFn,\n      );\n    }\n\n    if (composable === 'useFetch' || composable === 'useLazyFetch') {\n      opts.rawBody = opts.body;\n      const bodyParams = reactive({\n        body: opts.body,\n        bodySerializer: opts.bodySerializer,\n      });\n      const body = ref(serializeBody({ ...opts, body: toValue(opts.body) }));\n      opts.body = body;\n      watch(bodyParams, (changed) => {\n        body.value = serializeBody(changed);\n      });\n      return composable === 'useLazyFetch'\n        ? useLazyFetch(() => buildUrl(opts), { ...opts, ...asyncDataOptions })\n        : useFetch(() => buildUrl(opts), { ...opts, ...asyncDataOptions });\n    }\n\n    const handler: any = () =>\n      executeFetchFn(\n        // @ts-expect-error\n        opts,\n        fetchFn,\n      );\n\n    if (composable === 'useAsyncData') {\n      return key\n        ? useAsyncData(key, handler, asyncDataOptions)\n        : useAsyncData(handler, asyncDataOptions);\n    }\n\n    if (composable === 'useLazyAsyncData') {\n      return key\n        ? useLazyAsyncData(key, handler, asyncDataOptions)\n        : useLazyAsyncData(handler, asyncDataOptions);\n    }\n\n    return undefined as any;\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      ...unwrapRefs(opts),\n      body: opts.body as BodyInit | null | undefined,\n      method,\n      onRequest: undefined,\n      serializedBody: getValidRequestBody(opts) as BodyInit | null | undefined,\n      signal: unwrapRefs(opts.signal) as AbortSignal,\n      url,\n    });\n  };\n\n  const _buildUrl: Client['buildUrl'] = (options) =>\n    buildUrl({ ..._config, ...options } as typeof 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    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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-nuxt/tsconfig-nodenext-sdk/client/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type { Auth } from '../core/auth.gen.js';\nexport type { QuerySerializerOptions } from '../core/bodySerializer.gen.js';\nexport {\n  formDataBodySerializer,\n  jsonBodySerializer,\n  urlSearchParamsBodySerializer,\n} from '../core/bodySerializer.gen.js';\nexport { buildClientParams } from '../core/params.gen.js';\nexport { serializeQueryKeyValue } from '../core/queryKeySerializer.gen.js';\nexport { createClient } from './client.gen.js';\nexport type {\n  Client,\n  ClientOptions,\n  Composable,\n  Config,\n  CreateClientConfig,\n  Options,\n  RequestOptions,\n  RequestResult,\n  TDataShape,\n} from './types.gen.js';\nexport { createConfig } from './utils.gen.js';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-nuxt/tsconfig-nodenext-sdk/client/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type {\n  AsyncDataOptions,\n  useAsyncData,\n  useFetch,\n  UseFetchOptions,\n  useLazyAsyncData,\n  useLazyFetch,\n} from 'nuxt/app';\nimport type { Ref } from 'vue';\n\nimport type { Auth } from '../core/auth.gen.js';\nimport type { QuerySerializerOptions } from '../core/bodySerializer.gen.js';\nimport type {\n  ServerSentEventsOptions,\n  ServerSentEventsResult,\n} from '../core/serverSentEvents.gen.js';\nimport type { Client as CoreClient, Config as CoreConfig } from '../core/types.gen.js';\n\nexport type ArraySeparatorStyle = ArrayStyle | MatrixStyle;\ntype ArrayStyle = 'form' | 'spaceDelimited' | 'pipeDelimited';\ntype MatrixStyle = 'label' | 'matrix' | 'simple';\nexport type ObjectSeparatorStyle = ObjectStyle | MatrixStyle;\ntype ObjectStyle = 'form' | 'deepObject';\n\nexport type QuerySerializer = (query: Parameters<Client['buildUrl']>[0]['query']) => string;\n\ntype WithRefs<TData> = {\n  [K in keyof TData]: NonNullable<TData[K]> extends object\n    ? WithRefs<NonNullable<TData[K]>> | Ref<NonNullable<TData[K]>> | Extract<TData[K], null>\n    : NonNullable<TData[K]> | Ref<NonNullable<TData[K]>> | Extract<TData[K], null>;\n};\n\n// copied from Nuxt\nexport type KeysOf<T> = Array<T extends T ? (keyof T extends string ? keyof T : never) : never>;\n\nexport interface Config<T extends ClientOptions = ClientOptions>\n  extends\n    Omit<FetchOptions<unknown>, 'baseURL' | 'body' | 'headers' | 'method' | 'query'>,\n    WithRefs<Pick<FetchOptions<unknown>, 'query'>>,\n    Omit<CoreConfig, 'querySerializer'> {\n  /**\n   * Base URL for all requests made by this client.\n   */\n  baseURL?: T['baseURL'];\n  /**\n   * A function for serializing request query parameters. By default, arrays\n   * will be exploded in form style, objects will be exploded in deepObject\n   * style, and reserved characters are percent-encoded.\n   *\n   * {@link https://swagger.io/docs/specification/serialization/#query View examples}\n   */\n  querySerializer?: QuerySerializer | QuerySerializerOptions;\n}\n\nexport interface RequestOptions<\n  TComposable extends Composable = '$fetch',\n  ResT = unknown,\n  DefaultT = undefined,\n  Url extends string = string,\n>\n  extends\n    Config,\n    WithRefs<{\n      path?: FetchOptions<unknown>['query'];\n      query?: FetchOptions<unknown>['query'];\n    }>,\n    Pick<\n      ServerSentEventsOptions<ResT>,\n      | 'onSseError'\n      | 'onSseEvent'\n      | 'sseDefaultRetryDelay'\n      | 'sseMaxRetryAttempts'\n      | 'sseMaxRetryDelay'\n    > {\n  asyncDataOptions?: AsyncDataOptions<ResT, ResT, KeysOf<ResT>, DefaultT>;\n  /**\n   * Any body that you want to add to your request.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/fetch#body}\n   */\n  body?: NonNullable<unknown> | Ref<NonNullable<unknown>> | null;\n  composable?: TComposable;\n  key?: string;\n  rawBody?: NonNullable<unknown> | Ref<NonNullable<unknown>> | null;\n  /**\n   * Security mechanism(s) to use for the request.\n   */\n  security?: ReadonlyArray<Auth>;\n  url: Url;\n}\n\nexport type RequestResult<\n  TComposable extends Composable,\n  ResT,\n  TError,\n> = TComposable extends '$fetch'\n  ? ReturnType<typeof $fetch<ResT>>\n  : TComposable extends 'useAsyncData'\n    ? ReturnType<typeof useAsyncData<ResT | null, TError>>\n    : TComposable extends 'useFetch'\n      ? ReturnType<typeof useFetch<ResT | null, TError>>\n      : TComposable extends 'useLazyAsyncData'\n        ? ReturnType<typeof useLazyAsyncData<ResT | null, TError>>\n        : TComposable extends 'useLazyFetch'\n          ? ReturnType<typeof useLazyFetch<ResT | null, TError>>\n          : never;\n\nexport interface ClientOptions {\n  baseURL?: string;\n}\n\ntype MethodFn = <\n  TComposable extends Composable = '$fetch',\n  ResT = unknown,\n  TError = unknown,\n  DefaultT = undefined,\n>(\n  options: Omit<RequestOptions<TComposable, ResT, DefaultT>, 'method'>,\n) => RequestResult<TComposable, ResT, TError>;\n\ntype SseFn = <\n  TComposable extends Composable = '$fetch',\n  ResT = unknown,\n  TError = unknown,\n  DefaultT = undefined,\n>(\n  options: Omit<RequestOptions<TComposable, ResT, DefaultT>, 'method'>,\n) => Promise<ServerSentEventsResult<RequestResult<TComposable, ResT, TError>>>;\n\ntype RequestFn = <\n  TComposable extends Composable = '$fetch',\n  ResT = unknown,\n  TError = unknown,\n  DefaultT = undefined,\n>(\n  options: Omit<RequestOptions<TComposable, ResT, DefaultT>, 'method'> &\n    Pick<Required<RequestOptions<TComposable, ResT, DefaultT>>, 'method'>,\n) => RequestResult<TComposable, ResT, TError>;\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 = ClientOptions> = (\n  override?: Config<ClientOptions & T>,\n) => Config<Required<ClientOptions> & T>;\n\nexport interface TDataShape {\n  body?: unknown;\n  headers?: unknown;\n  path?: FetchOptions<unknown>['query'];\n  query?: FetchOptions<unknown>['query'];\n  url: string;\n}\n\nexport type BuildUrlOptions<\n  TData extends Omit<TDataShape, 'headers'> = Omit<TDataShape, 'headers'>,\n> = Pick<WithRefs<TData>, 'path' | 'query'> &\n  Pick<TData, 'url'> &\n  Pick<Options<'$fetch', TData>, 'baseURL' | 'querySerializer'>;\n\ntype BuildUrlFn = <TData extends Omit<TDataShape, 'headers'>>(\n  options: BuildUrlOptions<TData>,\n) => string;\n\nexport type Client = CoreClient<RequestFn, Config, MethodFn, BuildUrlFn, SseFn>;\n\ntype OmitKeys<T, K> = Pick<T, Exclude<keyof T, K>>;\n\nexport type Options<\n  TComposable extends Composable = '$fetch',\n  TData extends TDataShape = TDataShape,\n  ResT = unknown,\n  DefaultT = undefined,\n> = OmitKeys<RequestOptions<TComposable, ResT, DefaultT>, 'body' | 'path' | 'query' | 'url'> &\n  ([TData] extends [never] ? unknown : WithRefs<Omit<TData, 'url'>>);\n\ntype FetchOptions<TData> = Omit<UseFetchOptions<TData, TData>, keyof AsyncDataOptions<TData>>;\n\nexport type Composable =\n  | '$fetch'\n  | 'useAsyncData'\n  | 'useFetch'\n  | 'useLazyAsyncData'\n  | 'useLazyFetch';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-nuxt/tsconfig-nodenext-sdk/client/utils.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { ComputedRef, Ref } from 'vue';\nimport { isRef, toValue, unref } from 'vue';\n\nimport { getAuthToken } from '../core/auth.gen.js';\nimport type { QuerySerializerOptions } from '../core/bodySerializer.gen.js';\nimport { jsonBodySerializer } from '../core/bodySerializer.gen.js';\nimport {\n  serializeArrayParam,\n  serializeObjectParam,\n  serializePrimitiveParam,\n} from '../core/pathSerializer.gen.js';\nimport type {\n  ArraySeparatorStyle,\n  BuildUrlOptions,\n  Client,\n  ClientOptions,\n  Config,\n  QuerySerializer,\n  RequestOptions,\n} from './types.gen.js';\n\ntype PathSerializer = Pick<Required<BuildUrlOptions>, 'path' | 'url'>;\n\nconst PATH_PARAM_RE = /\\{[^{}]+\\}/g;\n\ntype MaybeArray<T> = T | T[];\n\nconst 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 = toValue((toValue(path) as Record<string, unknown> | undefined)?.[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 createQuerySerializer = <T = unknown>({\n  parameters = {},\n  ...args\n}: QuerySerializerOptions = {}) => {\n  const querySerializer = (queryParams: T) => {\n    const search: string[] = [];\n    const qParams = toValue(queryParams);\n    if (qParams && typeof qParams === 'object') {\n      for (const name in qParams) {\n        const value = toValue(qParams[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\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    (toValue(options.query) as Record<string, unknown> | undefined)?.[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    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        const queryValue = toValue(options.query) as Record<string, unknown> | undefined;\n        if (queryValue) {\n          queryValue[name] = token;\n        }\n        break;\n      }\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  const url = 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  return url;\n};\n\nexport const getUrl = ({\n  baseUrl,\n  path,\n  query,\n  querySerializer,\n  url: _url,\n}: Pick<BuildUrlOptions, 'path' | 'query' | 'url'> & {\n  baseUrl?: string;\n  querySerializer: QuerySerializer;\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 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 || typeof header !== 'object') {\n      continue;\n    }\n\n    let h: unknown = header;\n    if (isRef(h)) {\n      h = unref(h);\n    }\n\n    const iterator =\n      h instanceof Headers ? headersEntries(h) : Object.entries(h as Record<string, unknown>);\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, unwrapRefs(v) as string);\n        }\n      } else if (value !== undefined) {\n        const v = unwrapRefs(value);\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(key, typeof v === 'object' ? JSON.stringify(v) : (v as string));\n      }\n    }\n  }\n  return mergedHeaders;\n};\n\nexport const mergeInterceptors = <T>(...args: Array<MaybeArray<T>>): Array<T> =>\n  args.reduce<Array<T>>((acc, item) => {\n    if (typeof item === 'function') {\n      acc.push(item);\n    } else if (Array.isArray(item)) {\n      return acc.concat(item);\n    }\n    return acc;\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  querySerializer: defaultQuerySerializer,\n  ...override,\n});\n\ntype UnwrapRefs<T> =\n  T extends Ref<infer V>\n    ? V\n    : T extends ComputedRef<infer V>\n      ? V\n      : T extends Record<string, unknown> // this doesn't handle functions well\n        ? { [K in keyof T]: UnwrapRefs<T[K]> }\n        : T;\n\nexport const unwrapRefs = <T>(value: T): UnwrapRefs<T> => {\n  if (value === null || typeof value !== 'object' || value instanceof Headers) {\n    return (isRef(value) ? unref(value) : value) as UnwrapRefs<T>;\n  }\n\n  if (\n    value instanceof Blob ||\n    value instanceof FormData ||\n    value instanceof ReadableStream ||\n    value instanceof AbortSignal\n  ) {\n    return value as UnwrapRefs<T>;\n  }\n\n  if (Array.isArray(value)) {\n    return value.map((item) => unwrapRefs(item)) as UnwrapRefs<T>;\n  }\n\n  if (isRef(value)) {\n    return unwrapRefs(unref(value) as T);\n  }\n\n  // unwrap into new object to avoid modifying the source\n  const result: Record<string, unknown> = {};\n  for (const key in value) {\n    result[key] = unwrapRefs(value[key] as T);\n  }\n  return result as UnwrapRefs<T>;\n};\n\nexport const serializeBody = (\n  opts: Pick<Parameters<Client['request']>[0], 'body' | 'bodySerializer'>,\n) => {\n  if (opts.body && opts.bodySerializer) {\n    return opts.bodySerializer(opts.body);\n  }\n  return opts.body;\n};\n\nexport const executeFetchFn = (\n  opts: Omit<Parameters<Client['request']>[0], 'composable'>,\n  fetchFn: Required<Config>['$fetch'],\n) => {\n  const unwrappedOpts = unwrapRefs(opts);\n  unwrappedOpts.rawBody = unwrappedOpts.body;\n  unwrappedOpts.body = serializeBody(unwrappedOpts);\n  return fetchFn(\n    buildUrl(opts),\n    // @ts-expect-error\n    unwrappedOpts,\n  );\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-nuxt/tsconfig-nodenext-sdk/client.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport { type ClientOptions, type Config, createClient, createConfig } from './client/index.js';\nimport type { ClientOptions as ClientOptions2 } from './types.gen.js';\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: 'http://localhost:3000/base' }));\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-nuxt/tsconfig-nodenext-sdk/core/auth.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-nuxt/tsconfig-nodenext-sdk/core/bodySerializer.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { ArrayStyle, ObjectStyle, SerializerOptions } from './pathSerializer.gen.js';\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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-nuxt/tsconfig-nodenext-sdk/core/params.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-nuxt/tsconfig-nodenext-sdk/core/pathSerializer.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-nuxt/tsconfig-nodenext-sdk/core/queryKeySerializer.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\n/**\n * JSON-friendly union that mirrors what Pinia Colada can hash.\n */\nexport type JsonValue =\n  | null\n  | string\n  | number\n  | boolean\n  | JsonValue[]\n  | { [key: string]: JsonValue };\n\n/**\n * Replacer that converts non-JSON values (bigint, Date, etc.) to safe substitutes.\n */\nexport const queryKeyJsonReplacer = (_key: string, value: unknown) => {\n  if (value === undefined || typeof value === 'function' || typeof value === 'symbol') {\n    return undefined;\n  }\n  if (typeof value === 'bigint') {\n    return value.toString();\n  }\n  if (value instanceof Date) {\n    return value.toISOString();\n  }\n  return value;\n};\n\n/**\n * Safely stringifies a value and parses it back into a JsonValue.\n */\nexport const stringifyToJsonValue = (input: unknown): JsonValue | undefined => {\n  try {\n    const json = JSON.stringify(input, queryKeyJsonReplacer);\n    if (json === undefined) {\n      return undefined;\n    }\n    return JSON.parse(json) as JsonValue;\n  } catch {\n    return undefined;\n  }\n};\n\n/**\n * Detects plain objects (including objects with a null prototype).\n */\nconst isPlainObject = (value: unknown): value is Record<string, unknown> => {\n  if (value === null || typeof value !== 'object') {\n    return false;\n  }\n  const prototype = Object.getPrototypeOf(value as object);\n  return prototype === Object.prototype || prototype === null;\n};\n\n/**\n * Turns URLSearchParams into a sorted JSON object for deterministic keys.\n */\nconst serializeSearchParams = (params: URLSearchParams): JsonValue => {\n  const entries = Array.from(params.entries()).sort(([a], [b]) => a.localeCompare(b));\n  const result: Record<string, JsonValue> = {};\n\n  for (const [key, value] of entries) {\n    const existing = result[key];\n    if (existing === undefined) {\n      result[key] = value;\n      continue;\n    }\n\n    if (Array.isArray(existing)) {\n      (existing as string[]).push(value);\n    } else {\n      result[key] = [existing, value];\n    }\n  }\n\n  return result;\n};\n\n/**\n * Normalizes any accepted value into a JSON-friendly shape for query keys.\n */\nexport const serializeQueryKeyValue = (value: unknown): JsonValue | undefined => {\n  if (value === null) {\n    return null;\n  }\n\n  if (typeof value === 'string' || typeof value === 'number' || typeof value === 'boolean') {\n    return value;\n  }\n\n  if (value === undefined || typeof value === 'function' || typeof value === 'symbol') {\n    return undefined;\n  }\n\n  if (typeof value === 'bigint') {\n    return value.toString();\n  }\n\n  if (value instanceof Date) {\n    return value.toISOString();\n  }\n\n  if (Array.isArray(value)) {\n    return stringifyToJsonValue(value);\n  }\n\n  if (typeof URLSearchParams !== 'undefined' && value instanceof URLSearchParams) {\n    return serializeSearchParams(value);\n  }\n\n  if (isPlainObject(value)) {\n    return stringifyToJsonValue(value);\n  }\n\n  return undefined;\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-nuxt/tsconfig-nodenext-sdk/core/serverSentEvents.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { Config } from './types.gen.js';\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 const 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            // Normalize line endings: CRLF -> LF, then CR -> LF\n            buffer = buffer.replace(/\\r\\n/g, '\\n').replace(/\\r/g, '\\n');\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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-nuxt/tsconfig-nodenext-sdk/core/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { Auth, AuthToken } from './auth.gen.js';\nimport type { BodySerializer, QuerySerializer, QuerySerializerOptions } from './bodySerializer.gen.js';\n\nexport type HttpMethod =\n  | 'connect'\n  | 'delete'\n  | 'get'\n  | 'head'\n  | 'options'\n  | 'patch'\n  | 'post'\n  | 'put'\n  | 'trace';\n\nexport type Client<\n  RequestFn = never,\n  Config = unknown,\n  MethodFn = never,\n  BuildUrlFn = never,\n  SseFn = never,\n> = {\n  /**\n   * Returns the final request URL.\n   */\n  buildUrl: BuildUrlFn;\n  getConfig: () => Config;\n  request: RequestFn;\n  setConfig: (config: Config) => Config;\n} & {\n  [K in HttpMethod]: MethodFn;\n} & ([SseFn] extends [never] ? { sse?: never } : { sse: { [K in HttpMethod]: SseFn } });\n\nexport interface Config {\n  /**\n   * Auth token or a function returning auth token. The resolved value will be\n   * added to the request payload as defined by its `security` array.\n   */\n  auth?: ((auth: Auth) => Promise<AuthToken> | AuthToken) | AuthToken;\n  /**\n   * A function for serializing request body parameter. By default,\n   * {@link JSON.stringify()} will be used.\n   */\n  bodySerializer?: BodySerializer | null;\n  /**\n   * An object containing any HTTP headers that you want to pre-populate your\n   * `Headers` object with.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/Headers/Headers#init See more}\n   */\n  headers?:\n    | RequestInit['headers']\n    | Record<\n        string,\n        string | number | boolean | (string | number | boolean)[] | null | undefined | unknown\n      >;\n  /**\n   * The request method.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/fetch#method See more}\n   */\n  method?: Uppercase<HttpMethod>;\n  /**\n   * A function for serializing request query parameters. By default, arrays\n   * will be exploded in form style, objects will be exploded in deepObject\n   * style, and reserved characters are percent-encoded.\n   *\n   * This method will have no effect if the native `paramsSerializer()` Axios\n   * API function is used.\n   *\n   * {@link https://swagger.io/docs/specification/serialization/#query View examples}\n   */\n  querySerializer?: QuerySerializer | QuerySerializerOptions;\n  /**\n   * A function validating request data. This is useful if you want to ensure\n   * the request conforms to the desired shape, so it can be safely sent to\n   * the server.\n   */\n  requestValidator?: (data: unknown) => Promise<unknown>;\n  /**\n   * A function transforming response data before it's returned. This is useful\n   * for post-processing data, e.g. converting ISO strings into Date objects.\n   */\n  responseTransformer?: (data: unknown) => Promise<unknown>;\n  /**\n   * A function validating response data. This is useful if you want to ensure\n   * the response conforms to the desired shape, so it can be safely passed to\n   * the transformers and returned to the user.\n   */\n  responseValidator?: (data: unknown) => Promise<unknown>;\n}\n\ntype IsExactlyNeverOrNeverUndefined<T> = [T] extends [never]\n  ? true\n  : [T] extends [never | undefined]\n    ? [undefined] extends [T]\n      ? false\n      : true\n    : false;\n\nexport type OmitNever<T extends Record<string, unknown>> = {\n  [K in keyof T as IsExactlyNeverOrNeverUndefined<T[K]> extends true ? never : K]: T[K];\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-nuxt/tsconfig-nodenext-sdk/core/utils.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { BodySerializer, QuerySerializer } from './bodySerializer.gen.js';\nimport {\n  type ArraySeparatorStyle,\n  serializeArrayParam,\n  serializeObjectParam,\n  serializePrimitiveParam,\n} from './pathSerializer.gen.js';\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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-nuxt/tsconfig-nodenext-sdk/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport { apiVVersionODataControllerCount, callToTestOrderOfParams, callWithDefaultOptionalParameters, callWithDefaultParameters, callWithDescriptions, callWithDuplicateResponses, callWithNoContentResponse, callWithParameters, callWithResponse, callWithResponseAndNoContentResponse, callWithResponses, callWithResultFromHeader, callWithWeirdParameterNames, collectionFormat, complexParams, complexTypes, deleteCallWithoutParametersAndResponse, deleteFoo, deprecatedCall, dummyA, dummyB, duplicateName, duplicateName2, duplicateName3, duplicateName4, export_, fileResponse, fooWow, getApiVbyApiVersionSimpleOperation, getCallWithOptionalParam, getCallWithoutParametersAndResponse, headCallWithoutParametersAndResponse, import_, multipartRequest, multipartResponse, nonAsciiæøåÆøÅöôêÊ字符串, type Options, optionsCallWithoutParametersAndResponse, patchApiVbyApiVersionNoTag, patchCallWithoutParametersAndResponse, postApiVbyApiVersionFormData, postApiVbyApiVersionRequestBody, postCallWithOptionalParam, postCallWithoutParametersAndResponse, putCallWithoutParametersAndResponse, putWithFormUrlEncoded, testErrorCode, types, uploadFile } from './sdk.gen.js';\nexport type { _3eNum1Период, _400, AdditionalPropertiesIntegerIssue, AdditionalPropertiesUnknownIssue, AdditionalPropertiesUnknownIssue2, AdditionalPropertiesUnknownIssue3, AdditionalPropertiesUnknownIssueWritable, AnyOfAnyAndNull, AnyOfArrays, ApiVVersionODataControllerCountData, ApiVVersionODataControllerCountResponse, ApiVVersionODataControllerCountResponses, ArrayWithAnyOfProperties, ArrayWithArray, ArrayWithBooleans, ArrayWithNumbers, ArrayWithProperties, ArrayWithReferences, ArrayWithStrings, CallToTestOrderOfParamsData, CallWithDefaultOptionalParametersData, CallWithDefaultParametersData, CallWithDescriptionsData, CallWithDuplicateResponsesData, CallWithDuplicateResponsesError, CallWithDuplicateResponsesErrors, CallWithDuplicateResponsesResponse, CallWithDuplicateResponsesResponses, CallWithNoContentResponseData, CallWithNoContentResponseResponse, CallWithNoContentResponseResponses, CallWithParametersData, CallWithResponseAndNoContentResponseData, CallWithResponseAndNoContentResponseResponse, CallWithResponseAndNoContentResponseResponses, CallWithResponseData, CallWithResponseResponse, CallWithResponseResponses, CallWithResponsesData, CallWithResponsesError, CallWithResponsesErrors, CallWithResponsesResponse, CallWithResponsesResponses, CallWithResultFromHeaderData, CallWithResultFromHeaderErrors, CallWithResultFromHeaderResponses, CallWithWeirdParameterNamesData, CamelCaseCommentWithBreaks, CharactersInDescription, ClientOptions, CollectionFormatData, CommentWithBackticks, CommentWithBackticksAndQuotes, CommentWithBreaks, CommentWithExpressionPlaceholders, CommentWithQuotes, CommentWithReservedCharacters, CommentWithSlashes, ComplexParamsData, ComplexParamsResponse, ComplexParamsResponses, ComplexTypesData, ComplexTypesErrors, ComplexTypesResponse, ComplexTypesResponses, CompositionBaseModel, CompositionExtendedModel, CompositionWithAllOfAndNullable, CompositionWithAnyOf, CompositionWithAnyOfAndNullable, CompositionWithAnyOfAnonymous, CompositionWithNestedAnyAndTypeNull, CompositionWithNestedAnyOfAndNull, CompositionWithOneOf, CompositionWithOneOfAndComplexArrayDictionary, CompositionWithOneOfAndNullable, CompositionWithOneOfAndProperties, CompositionWithOneOfAndSimpleArrayDictionary, CompositionWithOneOfAndSimpleDictionary, CompositionWithOneOfAnonymous, CompositionWithOneOfDiscriminator, ConstValue, Default, DeleteCallWithoutParametersAndResponseData, DeleteFooData, DeleteFooData2, DeleteFooData3, DeprecatedCallData, DeprecatedModel, DictionaryWithArray, DictionaryWithDictionary, DictionaryWithProperties, DictionaryWithPropertiesAndAdditionalProperties, DictionaryWithReference, DictionaryWithString, DummyAData, DummyAResponse, DummyAResponses, DummyBData, DummyBResponse, DummyBResponses, DuplicateName2Data, DuplicateName3Data, DuplicateName4Data, DuplicateNameData, EnumFromDescription, EnumWithExtensions, EnumWithNumbers, EnumWithReplacedCharacters, EnumWithStrings, EnumWithXEnumNames, ExportData, ExternalRefA, ExternalRefB, ExternalSharedModel, File, FileResponseData, FileResponseResponse, FileResponseResponses, FileWritable, FooWowData, FooWowResponses, FreeFormObjectWithAdditionalPropertiesEqEmptyObject, FreeFormObjectWithAdditionalPropertiesEqTrue, FreeFormObjectWithoutAdditionalProperties, GenericSchemaDuplicateIssue1SystemBoolean, GenericSchemaDuplicateIssue1SystemBooleanWritable, GenericSchemaDuplicateIssue1SystemString, GenericSchemaDuplicateIssue1SystemStringWritable, GetApiVbyApiVersionSimpleOperationData, GetApiVbyApiVersionSimpleOperationError, GetApiVbyApiVersionSimpleOperationErrors, GetApiVbyApiVersionSimpleOperationResponse, GetApiVbyApiVersionSimpleOperationResponses, GetCallWithOptionalParamData, GetCallWithoutParametersAndResponseData, HeadCallWithoutParametersAndResponseData, Import, ImportData, ImportResponse, ImportResponses, IoK8sApimachineryPkgApisMetaV1DeleteOptions, IoK8sApimachineryPkgApisMetaV1Preconditions, ModelCircle, ModelFromZendesk, ModelSquare, ModelThatExtends, ModelThatExtendsExtends, ModelWithAdditionalPropertiesEqTrue, ModelWithAdditionalPropertiesRef, ModelWithAnyOfConstantSizeArray, ModelWithAnyOfConstantSizeArrayAndIntersect, ModelWithAnyOfConstantSizeArrayNullable, ModelWithAnyOfConstantSizeArrayWithNSizeAndOptions, ModelWithAnyOfConstantSizeArrayWithNSizeAndOptionsWritable, ModelWithArray, ModelWithArrayReadOnlyAndWriteOnly, ModelWithArrayReadOnlyAndWriteOnlyWritable, ModelWithBackticksInDescription, ModelWithBoolean, ModelWithCircularReference, ModelWithConst, ModelWithConstantSizeArray, ModelWithDictionary, ModelWithDuplicateImports, ModelWithDuplicateProperties, ModelWithEnum, ModelWithEnumFromDescription, ModelWithEnumWithHyphen, ModelWithInteger, ModelWithNestedArrayEnums, ModelWithNestedArrayEnumsData, ModelWithNestedArrayEnumsDataBar, ModelWithNestedArrayEnumsDataFoo, ModelWithNestedCompositionEnums, ModelWithNestedEnums, ModelWithNestedProperties, ModelWithNullableObject, ModelWithNullableString, ModelWithNumericEnumUnion, ModelWithOneOfAndProperties, ModelWithOneOfEnum, ModelWithOrderedProperties, ModelWithPattern, ModelWithPatternWritable, ModelWithPrefixItemsConstantSizeArray, ModelWithProperties, ModelWithPropertiesWritable, ModelWithReadOnlyAndWriteOnly, ModelWithReadOnlyAndWriteOnlyWritable, ModelWithReference, ModelWithReferenceWritable, ModelWithString, ModelWithStringError, MultipartRequestData, MultipartResponseData, MultipartResponseResponse, MultipartResponseResponses, NestedAnyOfArraysNullable, NonAsciiæøåÆøÅöôêÊ字符串Data, NonAsciiæøåÆøÅöôêÊ字符串Response, NonAsciiæøåÆøÅöôêÊ字符串Responses, NonAsciiStringæøåÆøÅöôêÊ字符串, NullableObject, OneOfAllOfIssue, OneOfAllOfIssueWritable, OptionsCallWithoutParametersAndResponseData, Pageable, ParameterSimpleParameterUnused, PatchApiVbyApiVersionNoTagData, PatchApiVbyApiVersionNoTagResponses, PatchCallWithoutParametersAndResponseData, PostApiVbyApiVersionFormDataData, PostApiVbyApiVersionRequestBodyData, PostCallWithOptionalParamData, PostCallWithOptionalParamResponse, PostCallWithOptionalParamResponses, PostCallWithoutParametersAndResponseData, PostServiceWithEmptyTagResponse, PostServiceWithEmptyTagResponse2, PutCallWithoutParametersAndResponseData, PutWithFormUrlEncodedData, SchemaWithFormRestrictedKeys, SimpleBoolean, SimpleFile, SimpleFormData, SimpleInteger, SimpleParameter, SimpleReference, SimpleRequestBody, SimpleString, SimpleStringWithPattern, TestErrorCodeData, TestErrorCodeErrors, TestErrorCodeResponses, TypesData, TypesResponse, TypesResponses, UploadFileData, UploadFileResponse, UploadFileResponses, XFooBar } from './types.gen.js';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-nuxt/tsconfig-nodenext-sdk/sdk.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport { client } from './client.gen.js';\nimport { type Client, type Composable, formDataBodySerializer, type Options as Options2, type TDataShape, urlSearchParamsBodySerializer } from './client/index.js';\nimport type { ApiVVersionODataControllerCountData, ApiVVersionODataControllerCountResponse, CallToTestOrderOfParamsData, CallWithDefaultOptionalParametersData, CallWithDefaultParametersData, CallWithDescriptionsData, CallWithDuplicateResponsesData, CallWithDuplicateResponsesError, CallWithDuplicateResponsesResponse, CallWithNoContentResponseData, CallWithNoContentResponseResponse, CallWithParametersData, CallWithResponseAndNoContentResponseData, CallWithResponseAndNoContentResponseResponse, CallWithResponseData, CallWithResponseResponse, CallWithResponsesData, CallWithResponsesError, CallWithResponsesResponse, CallWithResultFromHeaderData, CallWithWeirdParameterNamesData, CollectionFormatData, ComplexParamsData, ComplexParamsResponse, ComplexTypesData, ComplexTypesResponse, DeleteCallWithoutParametersAndResponseData, DeleteFooData3, DeprecatedCallData, DummyAData, DummyAResponse, DummyBData, DummyBResponse, DuplicateName2Data, DuplicateName3Data, DuplicateName4Data, DuplicateNameData, ExportData, FileResponseData, FileResponseResponse, FooWowData, GetApiVbyApiVersionSimpleOperationData, GetApiVbyApiVersionSimpleOperationError, GetApiVbyApiVersionSimpleOperationResponse, GetCallWithOptionalParamData, GetCallWithoutParametersAndResponseData, HeadCallWithoutParametersAndResponseData, ImportData, ImportResponse, MultipartRequestData, MultipartResponseData, MultipartResponseResponse, NonAsciiæøåÆøÅöôêÊ字符串Data, NonAsciiæøåÆøÅöôêÊ字符串Response, OptionsCallWithoutParametersAndResponseData, PatchApiVbyApiVersionNoTagData, PatchCallWithoutParametersAndResponseData, PostApiVbyApiVersionFormDataData, PostApiVbyApiVersionRequestBodyData, PostCallWithOptionalParamData, PostCallWithOptionalParamResponse, PostCallWithoutParametersAndResponseData, PutCallWithoutParametersAndResponseData, PutWithFormUrlEncodedData, TestErrorCodeData, TypesData, TypesResponse, UploadFileData, UploadFileResponse } from './types.gen.js';\n\nexport type Options<TComposable extends Composable = '$fetch', TData extends TDataShape = TDataShape, ResT = unknown, DefaultT = undefined> = Options2<TComposable, TData, ResT, DefaultT> & {\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\nexport const export_ = <TComposable extends Composable = '$fetch', DefaultT = undefined>(options: Options<TComposable, ExportData, unknown, DefaultT>) => (options.client ?? client).get<TComposable, unknown | DefaultT, unknown, DefaultT>({ url: '/api/v{api-version}/no+tag', ...options });\n\nexport const patchApiVbyApiVersionNoTag = <TComposable extends Composable = '$fetch', DefaultT = undefined>(options: Options<TComposable, PatchApiVbyApiVersionNoTagData, unknown, DefaultT>) => (options.client ?? client).patch<TComposable, unknown | DefaultT, unknown, DefaultT>({ url: '/api/v{api-version}/no+tag', ...options });\n\nexport const import_ = <TComposable extends Composable = '$fetch', DefaultT extends ImportResponse = ImportResponse>(options: Options<TComposable, ImportData, ImportResponse, DefaultT>) => (options.client ?? client).post<TComposable, ImportResponse | DefaultT, unknown, DefaultT>({\n    url: '/api/v{api-version}/no+tag',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options.headers\n    }\n});\n\nexport const fooWow = <TComposable extends Composable = '$fetch', DefaultT = undefined>(options: Options<TComposable, FooWowData, unknown, DefaultT>) => (options.client ?? client).put<TComposable, unknown | DefaultT, unknown, DefaultT>({ url: '/api/v{api-version}/no+tag', ...options });\n\nexport const apiVVersionODataControllerCount = <TComposable extends Composable = '$fetch', DefaultT extends ApiVVersionODataControllerCountResponse = ApiVVersionODataControllerCountResponse>(options: Options<TComposable, ApiVVersionODataControllerCountData, ApiVVersionODataControllerCountResponse, DefaultT>) => (options.client ?? client).get<TComposable, ApiVVersionODataControllerCountResponse | DefaultT, unknown, DefaultT>({ url: '/api/v{api-version}/simple/$count', ...options });\n\nexport const getApiVbyApiVersionSimpleOperation = <TComposable extends Composable = '$fetch', DefaultT extends GetApiVbyApiVersionSimpleOperationResponse = GetApiVbyApiVersionSimpleOperationResponse>(options: Options<TComposable, GetApiVbyApiVersionSimpleOperationData, GetApiVbyApiVersionSimpleOperationResponse, DefaultT>) => (options.client ?? client).get<TComposable, GetApiVbyApiVersionSimpleOperationResponse | DefaultT, GetApiVbyApiVersionSimpleOperationError, DefaultT>({ url: '/api/v{api-version}/simple:operation', ...options });\n\nexport const deleteCallWithoutParametersAndResponse = <TComposable extends Composable = '$fetch', DefaultT = undefined>(options: Options<TComposable, DeleteCallWithoutParametersAndResponseData, unknown, DefaultT>) => (options.client ?? client).delete<TComposable, unknown | DefaultT, unknown, DefaultT>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const getCallWithoutParametersAndResponse = <TComposable extends Composable = '$fetch', DefaultT = undefined>(options: Options<TComposable, GetCallWithoutParametersAndResponseData, unknown, DefaultT>) => (options.client ?? client).get<TComposable, unknown | DefaultT, unknown, DefaultT>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const headCallWithoutParametersAndResponse = <TComposable extends Composable = '$fetch', DefaultT = undefined>(options: Options<TComposable, HeadCallWithoutParametersAndResponseData, unknown, DefaultT>) => (options.client ?? client).head<TComposable, unknown | DefaultT, unknown, DefaultT>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const optionsCallWithoutParametersAndResponse = <TComposable extends Composable = '$fetch', DefaultT = undefined>(options: Options<TComposable, OptionsCallWithoutParametersAndResponseData, unknown, DefaultT>) => (options.client ?? client).options<TComposable, unknown | DefaultT, unknown, DefaultT>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const patchCallWithoutParametersAndResponse = <TComposable extends Composable = '$fetch', DefaultT = undefined>(options: Options<TComposable, PatchCallWithoutParametersAndResponseData, unknown, DefaultT>) => (options.client ?? client).patch<TComposable, unknown | DefaultT, unknown, DefaultT>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const postCallWithoutParametersAndResponse = <TComposable extends Composable = '$fetch', DefaultT = undefined>(options: Options<TComposable, PostCallWithoutParametersAndResponseData, unknown, DefaultT>) => (options.client ?? client).post<TComposable, unknown | DefaultT, unknown, DefaultT>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const putCallWithoutParametersAndResponse = <TComposable extends Composable = '$fetch', DefaultT = undefined>(options: Options<TComposable, PutCallWithoutParametersAndResponseData, unknown, DefaultT>) => (options.client ?? client).put<TComposable, unknown | DefaultT, unknown, DefaultT>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const deleteFoo = <TComposable extends Composable = '$fetch', DefaultT = undefined>(options: Options<TComposable, DeleteFooData3, unknown, DefaultT>) => (options.client ?? client).delete<TComposable, unknown | DefaultT, unknown, DefaultT>({ url: '/api/v{api-version}/foo/{foo_param}/bar/{BarParam}', ...options });\n\nexport const callWithDescriptions = <TComposable extends Composable = '$fetch', DefaultT = undefined>(options: Options<TComposable, CallWithDescriptionsData, unknown, DefaultT>) => (options.client ?? client).post<TComposable, unknown | DefaultT, unknown, DefaultT>({ url: '/api/v{api-version}/descriptions', ...options });\n\n/**\n * @deprecated\n */\nexport const deprecatedCall = <TComposable extends Composable = '$fetch', DefaultT = undefined>(options: Options<TComposable, DeprecatedCallData, unknown, DefaultT>) => (options.client ?? client).post<TComposable, unknown | DefaultT, unknown, DefaultT>({ url: '/api/v{api-version}/parameters/deprecated', ...options });\n\nexport const callWithParameters = <TComposable extends Composable = '$fetch', DefaultT = undefined>(options: Options<TComposable, CallWithParametersData, unknown, DefaultT>) => (options.client ?? client).post<TComposable, unknown | DefaultT, unknown, DefaultT>({\n    url: '/api/v{api-version}/parameters/{parameterPath}',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options.headers\n    }\n});\n\nexport const callWithWeirdParameterNames = <TComposable extends Composable = '$fetch', DefaultT = undefined>(options: Options<TComposable, CallWithWeirdParameterNamesData, unknown, DefaultT>) => (options.client ?? client).post<TComposable, unknown | DefaultT, unknown, DefaultT>({\n    url: '/api/v{api-version}/parameters/{parameter.path.1}/{parameter-path-2}/{PARAMETER-PATH-3}',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options.headers\n    }\n});\n\nexport const getCallWithOptionalParam = <TComposable extends Composable = '$fetch', DefaultT = undefined>(options: Options<TComposable, GetCallWithOptionalParamData, unknown, DefaultT>) => (options.client ?? client).get<TComposable, unknown | DefaultT, unknown, DefaultT>({\n    url: '/api/v{api-version}/parameters',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options.headers\n    }\n});\n\nexport const postCallWithOptionalParam = <TComposable extends Composable = '$fetch', DefaultT extends PostCallWithOptionalParamResponse = PostCallWithOptionalParamResponse>(options: Options<TComposable, PostCallWithOptionalParamData, PostCallWithOptionalParamResponse, DefaultT>) => (options.client ?? client).post<TComposable, PostCallWithOptionalParamResponse | DefaultT, unknown, DefaultT>({\n    url: '/api/v{api-version}/parameters',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options.headers\n    }\n});\n\nexport const postApiVbyApiVersionRequestBody = <TComposable extends Composable = '$fetch', DefaultT = undefined>(options: Options<TComposable, PostApiVbyApiVersionRequestBodyData, unknown, DefaultT>) => (options.client ?? client).post<TComposable, unknown | DefaultT, unknown, DefaultT>({\n    url: '/api/v{api-version}/requestBody',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options.headers\n    }\n});\n\nexport const postApiVbyApiVersionFormData = <TComposable extends Composable = '$fetch', DefaultT = undefined>(options: Options<TComposable, PostApiVbyApiVersionFormDataData, unknown, DefaultT>) => (options.client ?? client).post<TComposable, unknown | DefaultT, unknown, DefaultT>({\n    ...formDataBodySerializer,\n    url: '/api/v{api-version}/formData',\n    ...options,\n    headers: {\n        'Content-Type': null,\n        ...options.headers\n    }\n});\n\nexport const callWithDefaultParameters = <TComposable extends Composable = '$fetch', DefaultT = undefined>(options: Options<TComposable, CallWithDefaultParametersData, unknown, DefaultT>) => (options.client ?? client).get<TComposable, unknown | DefaultT, unknown, DefaultT>({ url: '/api/v{api-version}/defaults', ...options });\n\nexport const callWithDefaultOptionalParameters = <TComposable extends Composable = '$fetch', DefaultT = undefined>(options: Options<TComposable, CallWithDefaultOptionalParametersData, unknown, DefaultT>) => (options.client ?? client).post<TComposable, unknown | DefaultT, unknown, DefaultT>({ url: '/api/v{api-version}/defaults', ...options });\n\nexport const callToTestOrderOfParams = <TComposable extends Composable = '$fetch', DefaultT = undefined>(options: Options<TComposable, CallToTestOrderOfParamsData, unknown, DefaultT>) => (options.client ?? client).put<TComposable, unknown | DefaultT, unknown, DefaultT>({ url: '/api/v{api-version}/defaults', ...options });\n\nexport const duplicateName = <TComposable extends Composable = '$fetch', DefaultT = undefined>(options: Options<TComposable, DuplicateNameData, unknown, DefaultT>) => (options.client ?? client).delete<TComposable, unknown | DefaultT, unknown, DefaultT>({ url: '/api/v{api-version}/duplicate', ...options });\n\nexport const duplicateName2 = <TComposable extends Composable = '$fetch', DefaultT = undefined>(options: Options<TComposable, DuplicateName2Data, unknown, DefaultT>) => (options.client ?? client).get<TComposable, unknown | DefaultT, unknown, DefaultT>({ url: '/api/v{api-version}/duplicate', ...options });\n\nexport const duplicateName3 = <TComposable extends Composable = '$fetch', DefaultT = undefined>(options: Options<TComposable, DuplicateName3Data, unknown, DefaultT>) => (options.client ?? client).post<TComposable, unknown | DefaultT, unknown, DefaultT>({ url: '/api/v{api-version}/duplicate', ...options });\n\nexport const duplicateName4 = <TComposable extends Composable = '$fetch', DefaultT = undefined>(options: Options<TComposable, DuplicateName4Data, unknown, DefaultT>) => (options.client ?? client).put<TComposable, unknown | DefaultT, unknown, DefaultT>({ url: '/api/v{api-version}/duplicate', ...options });\n\nexport const callWithNoContentResponse = <TComposable extends Composable = '$fetch', DefaultT extends CallWithNoContentResponseResponse = CallWithNoContentResponseResponse>(options: Options<TComposable, CallWithNoContentResponseData, CallWithNoContentResponseResponse, DefaultT>) => (options.client ?? client).get<TComposable, CallWithNoContentResponseResponse | DefaultT, unknown, DefaultT>({ url: '/api/v{api-version}/no-content', ...options });\n\nexport const callWithResponseAndNoContentResponse = <TComposable extends Composable = '$fetch', DefaultT extends CallWithResponseAndNoContentResponseResponse = CallWithResponseAndNoContentResponseResponse>(options: Options<TComposable, CallWithResponseAndNoContentResponseData, CallWithResponseAndNoContentResponseResponse, DefaultT>) => (options.client ?? client).get<TComposable, CallWithResponseAndNoContentResponseResponse | DefaultT, unknown, DefaultT>({ url: '/api/v{api-version}/multiple-tags/response-and-no-content', ...options });\n\nexport const dummyA = <TComposable extends Composable = '$fetch', DefaultT extends DummyAResponse = DummyAResponse>(options: Options<TComposable, DummyAData, DummyAResponse, DefaultT>) => (options.client ?? client).get<TComposable, DummyAResponse | DefaultT, unknown, DefaultT>({ url: '/api/v{api-version}/multiple-tags/a', ...options });\n\nexport const dummyB = <TComposable extends Composable = '$fetch', DefaultT extends DummyBResponse = DummyBResponse>(options: Options<TComposable, DummyBData, DummyBResponse, DefaultT>) => (options.client ?? client).get<TComposable, DummyBResponse | DefaultT, unknown, DefaultT>({ url: '/api/v{api-version}/multiple-tags/b', ...options });\n\nexport const callWithResponse = <TComposable extends Composable = '$fetch', DefaultT extends CallWithResponseResponse = CallWithResponseResponse>(options: Options<TComposable, CallWithResponseData, CallWithResponseResponse, DefaultT>) => (options.client ?? client).get<TComposable, CallWithResponseResponse | DefaultT, unknown, DefaultT>({ url: '/api/v{api-version}/response', ...options });\n\nexport const callWithDuplicateResponses = <TComposable extends Composable = '$fetch', DefaultT extends CallWithDuplicateResponsesResponse = CallWithDuplicateResponsesResponse>(options: Options<TComposable, CallWithDuplicateResponsesData, CallWithDuplicateResponsesResponse, DefaultT>) => (options.client ?? client).post<TComposable, CallWithDuplicateResponsesResponse | DefaultT, CallWithDuplicateResponsesError, DefaultT>({ url: '/api/v{api-version}/response', ...options });\n\nexport const callWithResponses = <TComposable extends Composable = '$fetch', DefaultT extends CallWithResponsesResponse = CallWithResponsesResponse>(options: Options<TComposable, CallWithResponsesData, CallWithResponsesResponse, DefaultT>) => (options.client ?? client).put<TComposable, CallWithResponsesResponse | DefaultT, CallWithResponsesError, DefaultT>({ url: '/api/v{api-version}/response', ...options });\n\nexport const collectionFormat = <TComposable extends Composable = '$fetch', DefaultT = undefined>(options: Options<TComposable, CollectionFormatData, unknown, DefaultT>) => (options.client ?? client).get<TComposable, unknown | DefaultT, unknown, DefaultT>({ url: '/api/v{api-version}/collectionFormat', ...options });\n\nexport const types = <TComposable extends Composable = '$fetch', DefaultT extends TypesResponse = TypesResponse>(options: Options<TComposable, TypesData, TypesResponse, DefaultT>) => (options.client ?? client).get<TComposable, TypesResponse | DefaultT, unknown, DefaultT>({ url: '/api/v{api-version}/types', ...options });\n\nexport const uploadFile = <TComposable extends Composable = '$fetch', DefaultT extends UploadFileResponse = UploadFileResponse>(options: Options<TComposable, UploadFileData, UploadFileResponse, DefaultT>) => (options.client ?? client).post<TComposable, UploadFileResponse | DefaultT, unknown, DefaultT>({\n    ...urlSearchParamsBodySerializer,\n    url: '/api/v{api-version}/upload',\n    ...options,\n    headers: {\n        'Content-Type': 'application/x-www-form-urlencoded',\n        ...options.headers\n    }\n});\n\nexport const fileResponse = <TComposable extends Composable = '$fetch', DefaultT extends FileResponseResponse = FileResponseResponse>(options: Options<TComposable, FileResponseData, FileResponseResponse, DefaultT>) => (options.client ?? client).get<TComposable, FileResponseResponse | DefaultT, unknown, DefaultT>({ url: '/api/v{api-version}/file/{id}', ...options });\n\nexport const complexTypes = <TComposable extends Composable = '$fetch', DefaultT extends ComplexTypesResponse = ComplexTypesResponse>(options: Options<TComposable, ComplexTypesData, ComplexTypesResponse, DefaultT>) => (options.client ?? client).get<TComposable, ComplexTypesResponse | DefaultT, unknown, DefaultT>({\n    querySerializer: { parameters: { parameterObject: { object: { style: 'form' } } } },\n    url: '/api/v{api-version}/complex',\n    ...options\n});\n\nexport const multipartResponse = <TComposable extends Composable = '$fetch', DefaultT extends MultipartResponseResponse = MultipartResponseResponse>(options: Options<TComposable, MultipartResponseData, MultipartResponseResponse, DefaultT>) => (options.client ?? client).get<TComposable, MultipartResponseResponse | DefaultT, unknown, DefaultT>({ url: '/api/v{api-version}/multipart', ...options });\n\nexport const multipartRequest = <TComposable extends Composable = '$fetch', DefaultT = undefined>(options: Options<TComposable, MultipartRequestData, unknown, DefaultT>) => (options.client ?? client).post<TComposable, unknown | DefaultT, unknown, DefaultT>({\n    ...formDataBodySerializer,\n    url: '/api/v{api-version}/multipart',\n    ...options,\n    headers: {\n        'Content-Type': null,\n        ...options.headers\n    }\n});\n\nexport const complexParams = <TComposable extends Composable = '$fetch', DefaultT extends ComplexParamsResponse = ComplexParamsResponse>(options: Options<TComposable, ComplexParamsData, ComplexParamsResponse, DefaultT>) => (options.client ?? client).put<TComposable, ComplexParamsResponse | DefaultT, unknown, DefaultT>({\n    url: '/api/v{api-version}/complex/{id}',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json-patch+json',\n        ...options.headers\n    }\n});\n\nexport const callWithResultFromHeader = <TComposable extends Composable = '$fetch', DefaultT = undefined>(options: Options<TComposable, CallWithResultFromHeaderData, unknown, DefaultT>) => (options.client ?? client).post<TComposable, unknown | DefaultT, unknown, DefaultT>({ url: '/api/v{api-version}/header', ...options });\n\nexport const testErrorCode = <TComposable extends Composable = '$fetch', DefaultT = undefined>(options: Options<TComposable, TestErrorCodeData, unknown, DefaultT>) => (options.client ?? client).post<TComposable, unknown | DefaultT, unknown, DefaultT>({ url: '/api/v{api-version}/error', ...options });\n\nexport const nonAsciiæøåÆøÅöôêÊ字符串 = <TComposable extends Composable = '$fetch', DefaultT extends NonAsciiæøåÆøÅöôêÊ字符串Response = NonAsciiæøåÆøÅöôêÊ字符串Response>(options: Options<TComposable, NonAsciiæøåÆøÅöôêÊ字符串Data, NonAsciiæøåÆøÅöôêÊ字符串Response, DefaultT>) => (options.client ?? client).post<TComposable, NonAsciiæøåÆøÅöôêÊ字符串Response | DefaultT, unknown, DefaultT>({ url: '/api/v{api-version}/non-ascii-æøåÆØÅöôêÊ字符串', ...options });\n\n/**\n * Login User\n */\nexport const putWithFormUrlEncoded = <TComposable extends Composable = '$fetch', DefaultT = undefined>(options: Options<TComposable, PutWithFormUrlEncodedData, unknown, DefaultT>) => (options.client ?? client).put<TComposable, unknown | DefaultT, unknown, DefaultT>({\n    ...urlSearchParamsBodySerializer,\n    url: '/api/v{api-version}/non-ascii-æøåÆØÅöôêÊ字符串',\n    ...options,\n    headers: {\n        'Content-Type': 'application/x-www-form-urlencoded',\n        ...options.headers\n    }\n});\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-nuxt/tsconfig-nodenext-sdk/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type ClientOptions = {\n    baseURL: 'http://localhost:3000/base' | (string & {});\n};\n\n/**\n * Model with number-only name\n */\nexport type _400 = string;\n\n/**\n * External ref to shared model (A)\n */\nexport type ExternalRefA = ExternalSharedModel;\n\n/**\n * External ref to shared model (B)\n */\nexport type ExternalRefB = ExternalSharedModel;\n\n/**\n * Testing multiline comments in string: First line\n * Second line\n *\n * Fourth line\n */\nexport type CamelCaseCommentWithBreaks = number;\n\n/**\n * Testing multiline comments in string: First line\n * Second line\n *\n * Fourth line\n */\nexport type CommentWithBreaks = number;\n\n/**\n * Testing backticks in string: `backticks` and ```multiple backticks``` should work\n */\nexport type CommentWithBackticks = number;\n\n/**\n * Testing backticks and quotes in string: `backticks`, 'quotes', \"double quotes\" and ```multiple backticks``` should work\n */\nexport type CommentWithBackticksAndQuotes = number;\n\n/**\n * Testing slashes in string: \\backwards\\\\\\ and /forwards/// should work\n */\nexport type CommentWithSlashes = number;\n\n/**\n * Testing expression placeholders in string: ${expression} should work\n */\nexport type CommentWithExpressionPlaceholders = number;\n\n/**\n * Testing quotes in string: 'single quote''' and \"double quotes\"\"\" should work\n */\nexport type CommentWithQuotes = number;\n\n/**\n * Testing reserved characters in string: * inline * and ** inline ** should work\n */\nexport type CommentWithReservedCharacters = number;\n\n/**\n * This is a simple number\n */\nexport type SimpleInteger = number;\n\n/**\n * This is a simple boolean\n */\nexport type SimpleBoolean = boolean;\n\n/**\n * This is a simple string\n */\nexport type SimpleString = string;\n\n/**\n * A string with non-ascii (unicode) characters valid in typescript identifiers (æøåÆØÅöÔèÈ字符串)\n */\nexport type NonAsciiStringæøåÆøÅöôêÊ字符串 = string;\n\n/**\n * This is a simple file\n */\nexport type SimpleFile = Blob | File;\n\n/**\n * This is a simple reference\n */\nexport type SimpleReference = ModelWithString;\n\n/**\n * This is a simple string\n */\nexport type SimpleStringWithPattern = string | null;\n\n/**\n * This is a simple enum with strings\n */\nexport type EnumWithStrings = 'Success' | 'Warning' | 'Error' | '\\'Single Quote\\'' | '\"Double Quotes\"' | 'Non-ascii: øæåôöØÆÅÔÖ字符串';\n\nexport type EnumWithReplacedCharacters = '\\'Single Quote\\'' | '\"Double Quotes\"' | 'øæåôöØÆÅÔÖ字符串' | 3.1 | '';\n\n/**\n * This is a simple enum with numbers\n */\nexport type EnumWithNumbers = 1 | 2 | 3 | 1.1 | 1.2 | 1.3 | 100 | 200 | 300 | -100 | -200 | -300 | -1.1 | -1.2 | -1.3;\n\n/**\n * Success=1,Warning=2,Error=3\n */\nexport type EnumFromDescription = number;\n\n/**\n * This is a simple enum with numbers\n */\nexport type EnumWithExtensions = 200 | 400 | 500;\n\nexport type EnumWithXEnumNames = 0 | 1 | 2;\n\n/**\n * This is a simple array with numbers\n */\nexport type ArrayWithNumbers = Array<number>;\n\n/**\n * This is a simple array with booleans\n */\nexport type ArrayWithBooleans = Array<boolean>;\n\n/**\n * This is a simple array with strings\n */\nexport type ArrayWithStrings = Array<string>;\n\n/**\n * This is a simple array with references\n */\nexport type ArrayWithReferences = Array<ModelWithString>;\n\n/**\n * This is a simple array containing an array\n */\nexport type ArrayWithArray = Array<Array<ModelWithString>>;\n\n/**\n * This is a simple array with properties\n */\nexport type ArrayWithProperties = Array<{\n    '16x16'?: CamelCaseCommentWithBreaks;\n    bar?: string;\n}>;\n\n/**\n * This is a simple array with any of properties\n */\nexport type ArrayWithAnyOfProperties = Array<{\n    foo?: string;\n} | {\n    bar?: string;\n}>;\n\nexport type AnyOfAnyAndNull = {\n    data?: unknown | null;\n};\n\n/**\n * This is a simple array with any of properties\n */\nexport type AnyOfArrays = {\n    results?: Array<{\n        foo?: string;\n    } | {\n        bar?: string;\n    }>;\n};\n\n/**\n * This is a string dictionary\n */\nexport type DictionaryWithString = {\n    [key: string]: string;\n};\n\nexport type DictionaryWithPropertiesAndAdditionalProperties = {\n    foo?: number;\n    bar?: boolean;\n    [key: string]: string | number | boolean | undefined;\n};\n\n/**\n * This is a string reference\n */\nexport type DictionaryWithReference = {\n    [key: string]: ModelWithString;\n};\n\n/**\n * This is a complex dictionary\n */\nexport type DictionaryWithArray = {\n    [key: string]: Array<ModelWithString>;\n};\n\n/**\n * This is a string dictionary\n */\nexport type DictionaryWithDictionary = {\n    [key: string]: {\n        [key: string]: string;\n    };\n};\n\n/**\n * This is a complex dictionary\n */\nexport type DictionaryWithProperties = {\n    [key: string]: {\n        foo?: string;\n        bar?: string;\n    };\n};\n\n/**\n * This is a model with one number property\n */\nexport type ModelWithInteger = {\n    /**\n     * This is a simple number property\n     */\n    prop?: number;\n};\n\n/**\n * This is a model with one boolean property\n */\nexport type ModelWithBoolean = {\n    /**\n     * This is a simple boolean property\n     */\n    prop?: boolean;\n};\n\n/**\n * This is a model with one string property\n */\nexport type ModelWithString = {\n    /**\n     * This is a simple string property\n     */\n    prop?: string;\n};\n\n/**\n * This is a model with one string property\n */\nexport type ModelWithStringError = {\n    /**\n     * This is a simple string property\n     */\n    prop?: string;\n};\n\n/**\n * `Comment` or `VoiceComment`. The JSON object for adding voice comments to tickets is different. See [Adding voice comments to tickets](/documentation/ticketing/managing-tickets/adding-voice-comments-to-tickets)\n */\nexport type ModelFromZendesk = string;\n\n/**\n * This is a model with one string property\n */\nexport type ModelWithNullableString = {\n    /**\n     * This is a simple string property\n     */\n    nullableProp1?: string | null;\n    /**\n     * This is a simple string property\n     */\n    nullableRequiredProp1: string | null;\n    /**\n     * This is a simple string property\n     */\n    nullableProp2?: string | null;\n    /**\n     * This is a simple string property\n     */\n    nullableRequiredProp2: string | null;\n    /**\n     * This is a simple enum with strings\n     */\n    'foo_bar-enum'?: 'Success' | 'Warning' | 'Error' | 'ØÆÅ字符串';\n};\n\n/**\n * This is a model with one enum\n */\nexport type ModelWithEnum = {\n    /**\n     * This is a simple enum with strings\n     */\n    'foo_bar-enum'?: 'Success' | 'Warning' | 'Error' | 'ØÆÅ字符串';\n    /**\n     * These are the HTTP error code enums\n     */\n    statusCode?: '100' | '200 FOO' | '300 FOO_BAR' | '400 foo-bar' | '500 foo.bar' | '600 foo&bar';\n    /**\n     * Simple boolean enum\n     */\n    bool?: true;\n};\n\n/**\n * This is a model with one enum with escaped name\n */\nexport type ModelWithEnumWithHyphen = {\n    /**\n     * Foo-Bar-Baz-Qux\n     */\n    'foo-bar-baz-qux'?: '3.0';\n};\n\n/**\n * This is a model with one enum\n */\nexport type ModelWithEnumFromDescription = {\n    /**\n     * Success=1,Warning=2,Error=3\n     */\n    test?: number;\n};\n\n/**\n * This is a model with nested enums\n */\nexport type ModelWithNestedEnums = {\n    dictionaryWithEnum?: {\n        [key: string]: 'Success' | 'Warning' | 'Error';\n    };\n    dictionaryWithEnumFromDescription?: {\n        [key: string]: number;\n    };\n    arrayWithEnum?: Array<'Success' | 'Warning' | 'Error'>;\n    arrayWithDescription?: Array<number>;\n    /**\n     * This is a simple enum with strings\n     */\n    'foo_bar-enum'?: 'Success' | 'Warning' | 'Error' | 'ØÆÅ字符串';\n};\n\n/**\n * This is a model with one property containing a reference\n */\nexport type ModelWithReference = {\n    prop?: ModelWithProperties;\n};\n\n/**\n * This is a model with one property containing an array\n */\nexport type ModelWithArrayReadOnlyAndWriteOnly = {\n    prop?: Array<ModelWithReadOnlyAndWriteOnly>;\n    propWithFile?: Array<Blob | File>;\n    propWithNumber?: Array<number>;\n};\n\n/**\n * This is a model with one property containing an array\n */\nexport type ModelWithArray = {\n    prop?: Array<ModelWithString>;\n    propWithFile?: Array<Blob | File>;\n    propWithNumber?: Array<number>;\n};\n\n/**\n * This is a model with one property containing a dictionary\n */\nexport type ModelWithDictionary = {\n    prop?: {\n        [key: string]: string;\n    };\n};\n\n/**\n * This is a deprecated model with a deprecated property\n *\n * @deprecated\n */\nexport type DeprecatedModel = {\n    /**\n     * This is a deprecated property\n     *\n     * @deprecated\n     */\n    prop?: string;\n};\n\n/**\n * This is a model with one property containing a circular reference\n */\nexport type ModelWithCircularReference = {\n    prop?: ModelWithCircularReference;\n};\n\n/**\n * This is a model with one property with a 'one of' relationship\n */\nexport type CompositionWithOneOf = {\n    propA?: ModelWithString | ModelWithEnum | ModelWithArray | ModelWithDictionary;\n};\n\n/**\n * This is a model with one property with a 'one of' relationship where the options are not $ref\n */\nexport type CompositionWithOneOfAnonymous = {\n    propA?: {\n        propA?: string;\n    } | string | number;\n};\n\n/**\n * Circle\n */\nexport type ModelCircle = {\n    kind: string;\n    radius?: number;\n};\n\n/**\n * Square\n */\nexport type ModelSquare = {\n    kind: string;\n    sideLength?: number;\n};\n\n/**\n * This is a model with one property with a 'one of' relationship where the options are not $ref\n */\nexport type CompositionWithOneOfDiscriminator = ({\n    kind: 'circle';\n} & ModelCircle) | ({\n    kind: 'square';\n} & ModelSquare);\n\n/**\n * This is a model with one property with a 'any of' relationship\n */\nexport type CompositionWithAnyOf = {\n    propA?: ModelWithString | ModelWithEnum | ModelWithArray | ModelWithDictionary;\n};\n\n/**\n * This is a model with one property with a 'any of' relationship where the options are not $ref\n */\nexport type CompositionWithAnyOfAnonymous = {\n    propA?: {\n        propA?: string;\n    } | string | number;\n};\n\n/**\n * This is a model with nested 'any of' property with a type null\n */\nexport type CompositionWithNestedAnyAndTypeNull = {\n    propA?: Array<ModelWithDictionary | null> | Array<ModelWithArray | null>;\n};\n\nexport type _3eNum1Период = 'Bird' | 'Dog';\n\nexport type ConstValue = 'ConstValue';\n\n/**\n * This is a model with one property with a 'any of' relationship where the options are not $ref\n */\nexport type CompositionWithNestedAnyOfAndNull = {\n    /**\n     * Scopes\n     */\n    propA?: Array<_3eNum1Период | ConstValue> | null;\n};\n\n/**\n * This is a model with one property with a 'one of' relationship\n */\nexport type CompositionWithOneOfAndNullable = {\n    propA?: {\n        boolean?: boolean;\n    } | ModelWithEnum | ModelWithArray | ModelWithDictionary | null;\n};\n\n/**\n * This is a model that contains a simple dictionary within composition\n */\nexport type CompositionWithOneOfAndSimpleDictionary = {\n    propA?: boolean | {\n        [key: string]: number;\n    };\n};\n\n/**\n * This is a model that contains a dictionary of simple arrays within composition\n */\nexport type CompositionWithOneOfAndSimpleArrayDictionary = {\n    propA?: boolean | {\n        [key: string]: Array<boolean>;\n    };\n};\n\n/**\n * This is a model that contains a dictionary of complex arrays (composited) within composition\n */\nexport type CompositionWithOneOfAndComplexArrayDictionary = {\n    propA?: boolean | {\n        [key: string]: Array<number | string>;\n    };\n};\n\n/**\n * This is a model with one property with a 'all of' relationship\n */\nexport type CompositionWithAllOfAndNullable = {\n    propA?: ({\n        boolean?: boolean;\n    } & ModelWithEnum & ModelWithArray & ModelWithDictionary) | null;\n};\n\n/**\n * This is a model with one property with a 'any of' relationship\n */\nexport type CompositionWithAnyOfAndNullable = {\n    propA?: {\n        boolean?: boolean;\n    } | ModelWithEnum | ModelWithArray | ModelWithDictionary | null;\n};\n\n/**\n * This is a base model with two simple optional properties\n */\nexport type CompositionBaseModel = {\n    firstName?: string;\n    lastname?: string;\n};\n\n/**\n * This is a model that extends the base model\n */\nexport type CompositionExtendedModel = CompositionBaseModel & {\n    age: number;\n    firstName: string;\n    lastname: string;\n};\n\n/**\n * This is a model with one nested property\n */\nexport type ModelWithProperties = {\n    required: string;\n    readonly requiredAndReadOnly: string;\n    requiredAndNullable: string | null;\n    string?: string;\n    number?: number;\n    boolean?: boolean;\n    reference?: ModelWithString;\n    'property with space'?: string;\n    default?: string;\n    try?: string;\n    readonly '@namespace.string'?: string;\n    readonly '@namespace.integer'?: number;\n};\n\n/**\n * This is a model with one nested property\n */\nexport type ModelWithNestedProperties = {\n    readonly first: {\n        readonly second: {\n            readonly third: string | null;\n        } | null;\n    } | null;\n};\n\n/**\n * This is a model with duplicated properties\n */\nexport type ModelWithDuplicateProperties = {\n    prop?: ModelWithString;\n};\n\n/**\n * This is a model with ordered properties\n */\nexport type ModelWithOrderedProperties = {\n    zebra?: string;\n    apple?: string;\n    hawaii?: string;\n};\n\n/**\n * This is a model with duplicated imports\n */\nexport type ModelWithDuplicateImports = {\n    propA?: ModelWithString;\n    propB?: ModelWithString;\n    propC?: ModelWithString;\n};\n\n/**\n * This is a model that extends another model\n */\nexport type ModelThatExtends = ModelWithString & {\n    propExtendsA?: string;\n    propExtendsB?: ModelWithString;\n};\n\n/**\n * This is a model that extends another model\n */\nexport type ModelThatExtendsExtends = ModelWithString & ModelThatExtends & {\n    propExtendsC?: string;\n    propExtendsD?: ModelWithString;\n};\n\n/**\n * This is a model that contains a some patterns\n */\nexport type ModelWithPattern = {\n    key: string;\n    name: string;\n    readonly enabled?: boolean;\n    readonly modified?: string;\n    id?: string;\n    text?: string;\n    patternWithSingleQuotes?: string;\n    patternWithNewline?: string;\n    patternWithBacktick?: string;\n    patternWithUnicode?: string;\n};\n\nexport type File = {\n    /**\n     * Id\n     */\n    readonly id?: string;\n    /**\n     * Updated at\n     */\n    readonly updated_at?: string;\n    /**\n     * Created at\n     */\n    readonly created_at?: string;\n    /**\n     * Mime\n     */\n    mime: string;\n    /**\n     * File\n     */\n    readonly file?: string;\n};\n\nexport type Default = {\n    name?: string;\n};\n\nexport type Pageable = {\n    page?: number;\n    size?: number;\n    sort?: Array<string>;\n};\n\n/**\n * This is a free-form object without additionalProperties.\n */\nexport type FreeFormObjectWithoutAdditionalProperties = {\n    [key: string]: unknown;\n};\n\n/**\n * This is a free-form object with additionalProperties: true.\n */\nexport type FreeFormObjectWithAdditionalPropertiesEqTrue = {\n    [key: string]: unknown;\n};\n\n/**\n * This is a free-form object with additionalProperties: {}.\n */\nexport type FreeFormObjectWithAdditionalPropertiesEqEmptyObject = {\n    [key: string]: unknown;\n};\n\nexport type ModelWithConst = {\n    String?: 'String';\n    number?: 0;\n    null?: null;\n    withType?: 'Some string';\n};\n\n/**\n * This is a model with one property and additionalProperties: true\n */\nexport type ModelWithAdditionalPropertiesEqTrue = {\n    /**\n     * This is a simple string property\n     */\n    prop?: string;\n    [key: string]: unknown;\n};\n\nexport type NestedAnyOfArraysNullable = {\n    nullableArray?: Array<string | boolean> | null;\n};\n\nexport type CompositionWithOneOfAndProperties = ({\n    foo: SimpleParameter;\n} | {\n    bar: NonAsciiStringæøåÆøÅöôêÊ字符串;\n}) & {\n    baz: number | null;\n    qux: number;\n};\n\n/**\n * An object that can be null\n */\nexport type NullableObject = {\n    foo?: string;\n} | null;\n\n/**\n * Some % character\n */\nexport type CharactersInDescription = string;\n\nexport type ModelWithNullableObject = {\n    data?: NullableObject;\n};\n\n/**\n * An object with additional properties that can be null (anyOf ref + null)\n */\nexport type ModelWithAdditionalPropertiesRef = {\n    [key: string]: NullableObject | null;\n};\n\nexport type ModelWithOneOfEnum = {\n    foo: 'Bar';\n} | {\n    foo: 'Baz';\n} | {\n    foo: 'Qux';\n} | {\n    content: string;\n    foo: 'Quux';\n} | {\n    content: [\n        string,\n        string\n    ];\n    foo: 'Corge';\n};\n\nexport type ModelWithNestedArrayEnumsDataFoo = 'foo' | 'bar';\n\nexport type ModelWithNestedArrayEnumsDataBar = 'baz' | 'qux';\n\nexport type ModelWithNestedArrayEnumsData = {\n    foo?: Array<ModelWithNestedArrayEnumsDataFoo>;\n    bar?: Array<ModelWithNestedArrayEnumsDataBar>;\n};\n\nexport type ModelWithNestedArrayEnums = {\n    array_strings?: Array<string>;\n    data?: ModelWithNestedArrayEnumsData;\n};\n\nexport type ModelWithNestedCompositionEnums = {\n    foo?: ModelWithNestedArrayEnumsDataFoo;\n};\n\nexport type ModelWithReadOnlyAndWriteOnly = {\n    foo: string;\n    readonly bar: string;\n};\n\nexport type ModelWithConstantSizeArray = [\n    number,\n    number\n];\n\nexport type ModelWithAnyOfConstantSizeArray = [\n    number | string,\n    number | string,\n    number | string\n];\n\nexport type ModelWithPrefixItemsConstantSizeArray = [\n    ModelWithInteger,\n    number | string,\n    string\n];\n\nexport type ModelWithAnyOfConstantSizeArrayNullable = [\n    number | null | string,\n    number | null | string,\n    number | null | string\n];\n\nexport type ModelWithAnyOfConstantSizeArrayWithNSizeAndOptions = [\n    number | Import,\n    number | Import\n];\n\nexport type ModelWithAnyOfConstantSizeArrayAndIntersect = [\n    number & string,\n    number & string\n];\n\nexport type ModelWithNumericEnumUnion = {\n    /**\n     * Период\n     */\n    value?: -10 | -1 | 0 | 1 | 3 | 6 | 12;\n};\n\n/**\n * Some description with `back ticks`\n */\nexport type ModelWithBackticksInDescription = {\n    /**\n     * The template `that` should be used for parsing and importing the contents of the CSV file.\n     *\n     * <br/><p>There is one placeholder currently supported:<ul>     <li><b>${x}</b> - refers to the n-th column in the CSV file, e.g. ${1}, ${2}, ...)</li></ul><p>Example of a correct JSON template:</p>\n     * <pre>\n     * [\n     * {\n     * \"resourceType\": \"Asset\",\n     * \"identifier\": {\n     * \"name\": \"${1}\",\n     * \"domain\": {\n     * \"name\": \"${2}\",\n     * \"community\": {\n     * \"name\": \"Some Community\"\n     * }\n     * }\n     * },\n     * \"attributes\" : {\n     * \"00000000-0000-0000-0000-000000003115\" : [ {\n     * \"value\" : \"${3}\"\n     * } ],\n     * \"00000000-0000-0000-0000-000000000222\" : [ {\n     * \"value\" : \"${4}\"\n     * } ]\n     * }\n     * }\n     * ]\n     * </pre>\n     */\n    template?: string;\n};\n\nexport type ModelWithOneOfAndProperties = (SimpleParameter | NonAsciiStringæøåÆøÅöôêÊ字符串) & {\n    baz: number | null;\n    qux: number;\n};\n\n/**\n * Model used to test deduplication strategy (unused)\n */\nexport type ParameterSimpleParameterUnused = string;\n\n/**\n * Model used to test deduplication strategy\n */\nexport type PostServiceWithEmptyTagResponse = string;\n\n/**\n * Model used to test deduplication strategy\n */\nexport type PostServiceWithEmptyTagResponse2 = string;\n\n/**\n * Model used to test deduplication strategy\n */\nexport type DeleteFooData = string;\n\n/**\n * Model used to test deduplication strategy\n */\nexport type DeleteFooData2 = string;\n\n/**\n * Model with restricted keyword name\n */\nexport type Import = string;\n\nexport type SchemaWithFormRestrictedKeys = {\n    description?: string;\n    'x-enum-descriptions'?: string;\n    'x-enum-varnames'?: string;\n    'x-enumNames'?: string;\n    title?: string;\n    object?: {\n        description?: string;\n        'x-enum-descriptions'?: string;\n        'x-enum-varnames'?: string;\n        'x-enumNames'?: string;\n        title?: string;\n    };\n    array?: Array<{\n        description?: string;\n        'x-enum-descriptions'?: string;\n        'x-enum-varnames'?: string;\n        'x-enumNames'?: string;\n        title?: string;\n    }>;\n};\n\n/**\n * This schema was giving PascalCase transformations a hard time\n */\nexport type IoK8sApimachineryPkgApisMetaV1DeleteOptions = {\n    /**\n     * Must be fulfilled before a deletion is carried out. If not possible, a 409 Conflict status will be returned.\n     */\n    preconditions?: IoK8sApimachineryPkgApisMetaV1Preconditions;\n};\n\n/**\n * This schema was giving PascalCase transformations a hard time\n */\nexport type IoK8sApimachineryPkgApisMetaV1Preconditions = {\n    /**\n     * Specifies the target ResourceVersion\n     */\n    resourceVersion?: string;\n    /**\n     * Specifies the target UID.\n     */\n    uid?: string;\n};\n\nexport type AdditionalPropertiesUnknownIssue = {\n    [key: string]: string | number;\n};\n\nexport type AdditionalPropertiesUnknownIssue2 = {\n    [key: string]: string | number;\n};\n\nexport type AdditionalPropertiesUnknownIssue3 = string & {\n    entries: {\n        [key: string]: AdditionalPropertiesUnknownIssue;\n    };\n};\n\nexport type AdditionalPropertiesIntegerIssue = {\n    value: number;\n    [key: string]: number;\n};\n\nexport type OneOfAllOfIssue = ((ConstValue | GenericSchemaDuplicateIssue1SystemBoolean) & _3eNum1Период) | GenericSchemaDuplicateIssue1SystemString;\n\nexport type GenericSchemaDuplicateIssue1SystemBoolean = {\n    item?: boolean;\n    error?: string | null;\n    readonly hasError?: boolean;\n    data?: {\n        [key: string]: never;\n    };\n};\n\nexport type GenericSchemaDuplicateIssue1SystemString = {\n    item?: string | null;\n    error?: string | null;\n    readonly hasError?: boolean;\n};\n\nexport type ExternalSharedModel = {\n    id: string;\n    name?: string;\n};\n\n/**\n * This is a model with one property containing a reference\n */\nexport type ModelWithReferenceWritable = {\n    prop?: ModelWithPropertiesWritable;\n};\n\n/**\n * This is a model with one property containing an array\n */\nexport type ModelWithArrayReadOnlyAndWriteOnlyWritable = {\n    prop?: Array<ModelWithReadOnlyAndWriteOnlyWritable>;\n    propWithFile?: Array<Blob | File>;\n    propWithNumber?: Array<number>;\n};\n\n/**\n * This is a model with one nested property\n */\nexport type ModelWithPropertiesWritable = {\n    required: string;\n    requiredAndNullable: string | null;\n    string?: string;\n    number?: number;\n    boolean?: boolean;\n    reference?: ModelWithString;\n    'property with space'?: string;\n    default?: string;\n    try?: string;\n};\n\n/**\n * This is a model that contains a some patterns\n */\nexport type ModelWithPatternWritable = {\n    key: string;\n    name: string;\n    id?: string;\n    text?: string;\n    patternWithSingleQuotes?: string;\n    patternWithNewline?: string;\n    patternWithBacktick?: string;\n    patternWithUnicode?: string;\n};\n\nexport type FileWritable = {\n    /**\n     * Mime\n     */\n    mime: string;\n};\n\nexport type ModelWithReadOnlyAndWriteOnlyWritable = {\n    foo: string;\n    baz: string;\n};\n\nexport type ModelWithAnyOfConstantSizeArrayWithNSizeAndOptionsWritable = [\n    number | Import,\n    number | Import\n];\n\nexport type AdditionalPropertiesUnknownIssueWritable = {\n    [key: string]: string | number;\n};\n\nexport type OneOfAllOfIssueWritable = ((ConstValue | GenericSchemaDuplicateIssue1SystemBoolean) & _3eNum1Период) | GenericSchemaDuplicateIssue1SystemString;\n\nexport type GenericSchemaDuplicateIssue1SystemBooleanWritable = {\n    item?: boolean;\n    error?: string | null;\n    data?: {\n        [key: string]: never;\n    };\n};\n\nexport type GenericSchemaDuplicateIssue1SystemStringWritable = {\n    item?: string | null;\n    error?: string | null;\n};\n\n/**\n * This is a reusable parameter\n */\nexport type SimpleParameter = string;\n\n/**\n * Parameter with illegal characters\n */\nexport type XFooBar = ModelWithString;\n\n/**\n * A reusable request body\n */\nexport type SimpleRequestBody = ModelWithString;\n\n/**\n * A reusable request body\n */\nexport type SimpleFormData = ModelWithString;\n\nexport type ExportData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no+tag';\n};\n\nexport type PatchApiVbyApiVersionNoTagData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no+tag';\n};\n\nexport type PatchApiVbyApiVersionNoTagResponses = {\n    /**\n     * OK\n     */\n    default: unknown;\n};\n\nexport type ImportData = {\n    body: ModelWithReadOnlyAndWriteOnlyWritable | ModelWithArrayReadOnlyAndWriteOnlyWritable;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no+tag';\n};\n\nexport type ImportResponses = {\n    /**\n     * Success\n     */\n    200: ModelFromZendesk;\n    /**\n     * Default success response\n     */\n    default: ModelWithReadOnlyAndWriteOnly;\n};\n\nexport type ImportResponse = ImportResponses[keyof ImportResponses];\n\nexport type FooWowData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no+tag';\n};\n\nexport type FooWowResponses = {\n    /**\n     * OK\n     */\n    default: unknown;\n};\n\nexport type ApiVVersionODataControllerCountData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple/$count';\n};\n\nexport type ApiVVersionODataControllerCountResponses = {\n    /**\n     * Success\n     */\n    200: ModelFromZendesk;\n};\n\nexport type ApiVVersionODataControllerCountResponse = ApiVVersionODataControllerCountResponses[keyof ApiVVersionODataControllerCountResponses];\n\nexport type GetApiVbyApiVersionSimpleOperationData = {\n    body?: never;\n    path: {\n        /**\n         * foo in method\n         */\n        foo_param: string;\n    };\n    query?: never;\n    url: '/api/v{api-version}/simple:operation';\n};\n\nexport type GetApiVbyApiVersionSimpleOperationErrors = {\n    /**\n     * Default error response\n     */\n    default: ModelWithBoolean;\n};\n\nexport type GetApiVbyApiVersionSimpleOperationError = GetApiVbyApiVersionSimpleOperationErrors[keyof GetApiVbyApiVersionSimpleOperationErrors];\n\nexport type GetApiVbyApiVersionSimpleOperationResponses = {\n    /**\n     * Response is a simple number\n     */\n    200: number;\n};\n\nexport type GetApiVbyApiVersionSimpleOperationResponse = GetApiVbyApiVersionSimpleOperationResponses[keyof GetApiVbyApiVersionSimpleOperationResponses];\n\nexport type DeleteCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type GetCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type HeadCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type OptionsCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type PatchCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type PostCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type PutCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type DeleteFooData3 = {\n    body?: never;\n    headers: {\n        /**\n         * Parameter with illegal characters\n         */\n        'x-Foo-Bar': ModelWithString;\n    };\n    path: {\n        /**\n         * foo in method\n         */\n        foo_param: string;\n        /**\n         * bar in method\n         */\n        BarParam: string;\n    };\n    query?: never;\n    url: '/api/v{api-version}/foo/{foo_param}/bar/{BarParam}';\n};\n\nexport type CallWithDescriptionsData = {\n    body?: never;\n    path?: never;\n    query?: {\n        /**\n         * Testing multiline comments in string: First line\n         * Second line\n         *\n         * Fourth line\n         */\n        parameterWithBreaks?: string;\n        /**\n         * Testing backticks in string: `backticks` and ```multiple backticks``` should work\n         */\n        parameterWithBackticks?: string;\n        /**\n         * Testing slashes in string: \\backwards\\\\\\ and /forwards/// should work\n         */\n        parameterWithSlashes?: string;\n        /**\n         * Testing expression placeholders in string: ${expression} should work\n         */\n        parameterWithExpressionPlaceholders?: string;\n        /**\n         * Testing quotes in string: 'single quote''' and \"double quotes\"\"\" should work\n         */\n        parameterWithQuotes?: string;\n        /**\n         * Testing reserved characters in string: * inline * and ** inline ** should work\n         */\n        parameterWithReservedCharacters?: string;\n    };\n    url: '/api/v{api-version}/descriptions';\n};\n\nexport type DeprecatedCallData = {\n    body?: never;\n    headers: {\n        /**\n         * This parameter is deprecated\n         *\n         * @deprecated\n         */\n        parameter: DeprecatedModel | null;\n    };\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/parameters/deprecated';\n};\n\nexport type CallWithParametersData = {\n    /**\n     * This is the parameter that goes into the body\n     */\n    body: {\n        [key: string]: unknown;\n    } | null;\n    headers: {\n        /**\n         * This is the parameter that goes into the header\n         */\n        parameterHeader: string | null;\n    };\n    path: {\n        /**\n         * This is the parameter that goes into the path\n         */\n        parameterPath: string | null;\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string | null;\n    };\n    query: {\n        foo_ref_enum?: ModelWithNestedArrayEnumsDataFoo;\n        foo_all_of_enum: ModelWithNestedArrayEnumsDataFoo;\n        /**\n         * This is the parameter that goes into the query params\n         */\n        cursor: string | null;\n    };\n    url: '/api/v{api-version}/parameters/{parameterPath}';\n};\n\nexport type CallWithWeirdParameterNamesData = {\n    /**\n     * This is the parameter that goes into the body\n     */\n    body: ModelWithString | null;\n    headers: {\n        /**\n         * This is the parameter that goes into the request header\n         */\n        'parameter.header': string | null;\n    };\n    path: {\n        /**\n         * This is the parameter that goes into the path\n         */\n        'parameter.path.1'?: string;\n        /**\n         * This is the parameter that goes into the path\n         */\n        'parameter-path-2'?: string;\n        /**\n         * This is the parameter that goes into the path\n         */\n        'PARAMETER-PATH-3'?: string;\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string | null;\n    };\n    query: {\n        /**\n         * This is the parameter with a reserved keyword\n         */\n        default?: string;\n        /**\n         * This is the parameter that goes into the request query params\n         */\n        'parameter-query': string | null;\n    };\n    url: '/api/v{api-version}/parameters/{parameter.path.1}/{parameter-path-2}/{PARAMETER-PATH-3}';\n};\n\nexport type GetCallWithOptionalParamData = {\n    /**\n     * This is a required parameter\n     */\n    body: ModelWithOneOfEnum;\n    path?: never;\n    query?: {\n        /**\n         * This is an optional parameter\n         */\n        page?: number;\n    };\n    url: '/api/v{api-version}/parameters';\n};\n\nexport type PostCallWithOptionalParamData = {\n    /**\n     * This is an optional parameter\n     */\n    body?: {\n        offset?: number | null;\n    };\n    path?: never;\n    query: {\n        /**\n         * This is a required parameter\n         */\n        parameter: Pageable;\n    };\n    url: '/api/v{api-version}/parameters';\n};\n\nexport type PostCallWithOptionalParamResponses = {\n    /**\n     * Response is a simple number\n     */\n    200: number;\n    /**\n     * Success\n     */\n    204: void;\n};\n\nexport type PostCallWithOptionalParamResponse = PostCallWithOptionalParamResponses[keyof PostCallWithOptionalParamResponses];\n\nexport type PostApiVbyApiVersionRequestBodyData = {\n    /**\n     * A reusable request body\n     */\n    body?: SimpleRequestBody;\n    path?: never;\n    query?: {\n        /**\n         * This is a reusable parameter\n         */\n        parameter?: string;\n    };\n    url: '/api/v{api-version}/requestBody';\n};\n\nexport type PostApiVbyApiVersionFormDataData = {\n    /**\n     * A reusable request body\n     */\n    body?: SimpleFormData;\n    path?: never;\n    query?: {\n        /**\n         * This is a reusable parameter\n         */\n        parameter?: string;\n    };\n    url: '/api/v{api-version}/formData';\n};\n\nexport type CallWithDefaultParametersData = {\n    body?: never;\n    path?: never;\n    query?: {\n        /**\n         * This is a simple string with default value\n         */\n        parameterString?: string | null;\n        /**\n         * This is a simple number with default value\n         */\n        parameterNumber?: number | null;\n        /**\n         * This is a simple boolean with default value\n         */\n        parameterBoolean?: boolean | null;\n        /**\n         * This is a simple enum with default value\n         */\n        parameterEnum?: 'Success' | 'Warning' | 'Error';\n        /**\n         * This is a simple model with default value\n         */\n        parameterModel?: ModelWithString | null;\n    };\n    url: '/api/v{api-version}/defaults';\n};\n\nexport type CallWithDefaultOptionalParametersData = {\n    body?: never;\n    path?: never;\n    query?: {\n        /**\n         * This is a simple string that is optional with default value\n         */\n        parameterString?: string;\n        /**\n         * This is a simple number that is optional with default value\n         */\n        parameterNumber?: number;\n        /**\n         * This is a simple boolean that is optional with default value\n         */\n        parameterBoolean?: boolean;\n        /**\n         * This is a simple enum that is optional with default value\n         */\n        parameterEnum?: 'Success' | 'Warning' | 'Error';\n        /**\n         * This is a simple model that is optional with default value\n         */\n        parameterModel?: ModelWithString;\n    };\n    url: '/api/v{api-version}/defaults';\n};\n\nexport type CallToTestOrderOfParamsData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * This is a optional string with default\n         */\n        parameterOptionalStringWithDefault?: string;\n        /**\n         * This is a optional string with empty default\n         */\n        parameterOptionalStringWithEmptyDefault?: string;\n        /**\n         * This is a optional string with no default\n         */\n        parameterOptionalStringWithNoDefault?: string;\n        /**\n         * This is a string with default\n         */\n        parameterStringWithDefault: string;\n        /**\n         * This is a string with empty default\n         */\n        parameterStringWithEmptyDefault: string;\n        /**\n         * This is a string with no default\n         */\n        parameterStringWithNoDefault: string;\n        /**\n         * This is a string that can be null with no default\n         */\n        parameterStringNullableWithNoDefault?: string | null;\n        /**\n         * This is a string that can be null with default\n         */\n        parameterStringNullableWithDefault?: string | null;\n    };\n    url: '/api/v{api-version}/defaults';\n};\n\nexport type DuplicateNameData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/duplicate';\n};\n\nexport type DuplicateName2Data = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/duplicate';\n};\n\nexport type DuplicateName3Data = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/duplicate';\n};\n\nexport type DuplicateName4Data = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/duplicate';\n};\n\nexport type CallWithNoContentResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no-content';\n};\n\nexport type CallWithNoContentResponseResponses = {\n    /**\n     * Success\n     */\n    204: void;\n};\n\nexport type CallWithNoContentResponseResponse = CallWithNoContentResponseResponses[keyof CallWithNoContentResponseResponses];\n\nexport type CallWithResponseAndNoContentResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multiple-tags/response-and-no-content';\n};\n\nexport type CallWithResponseAndNoContentResponseResponses = {\n    /**\n     * Response is a simple number\n     */\n    200: number;\n    /**\n     * Success\n     */\n    204: void;\n};\n\nexport type CallWithResponseAndNoContentResponseResponse = CallWithResponseAndNoContentResponseResponses[keyof CallWithResponseAndNoContentResponseResponses];\n\nexport type DummyAData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multiple-tags/a';\n};\n\nexport type DummyAResponses = {\n    200: _400;\n};\n\nexport type DummyAResponse = DummyAResponses[keyof DummyAResponses];\n\nexport type DummyBData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multiple-tags/b';\n};\n\nexport type DummyBResponses = {\n    /**\n     * Success\n     */\n    204: void;\n};\n\nexport type DummyBResponse = DummyBResponses[keyof DummyBResponses];\n\nexport type CallWithResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/response';\n};\n\nexport type CallWithResponseResponses = {\n    default: Import;\n};\n\nexport type CallWithResponseResponse = CallWithResponseResponses[keyof CallWithResponseResponses];\n\nexport type CallWithDuplicateResponsesData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/response';\n};\n\nexport type CallWithDuplicateResponsesErrors = {\n    /**\n     * Message for 500 error\n     */\n    500: ModelWithStringError;\n    /**\n     * Message for 501 error\n     */\n    501: ModelWithStringError;\n    /**\n     * Message for 502 error\n     */\n    502: ModelWithStringError;\n    /**\n     * Message for 4XX errors\n     */\n    '4XX': DictionaryWithArray;\n    /**\n     * Default error response\n     */\n    default: ModelWithBoolean;\n};\n\nexport type CallWithDuplicateResponsesError = CallWithDuplicateResponsesErrors[keyof CallWithDuplicateResponsesErrors];\n\nexport type CallWithDuplicateResponsesResponses = {\n    /**\n     * Message for 200 response\n     */\n    200: ModelWithBoolean & ModelWithInteger;\n    /**\n     * Message for 201 response\n     */\n    201: ModelWithString;\n    /**\n     * Message for 202 response\n     */\n    202: ModelWithString;\n};\n\nexport type CallWithDuplicateResponsesResponse = CallWithDuplicateResponsesResponses[keyof CallWithDuplicateResponsesResponses];\n\nexport type CallWithResponsesData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/response';\n};\n\nexport type CallWithResponsesErrors = {\n    /**\n     * Message for 500 error\n     */\n    500: ModelWithStringError;\n    /**\n     * Message for 501 error\n     */\n    501: ModelWithStringError;\n    /**\n     * Message for 502 error\n     */\n    502: ModelWithStringError;\n    /**\n     * Message for default response\n     */\n    default: ModelWithStringError;\n};\n\nexport type CallWithResponsesError = CallWithResponsesErrors[keyof CallWithResponsesErrors];\n\nexport type CallWithResponsesResponses = {\n    /**\n     * Message for 200 response\n     */\n    200: {\n        readonly '@namespace.string'?: string;\n        readonly '@namespace.integer'?: number;\n        readonly value?: Array<ModelWithString>;\n    };\n    /**\n     * Message for 201 response\n     */\n    201: ModelThatExtends;\n    /**\n     * Message for 202 response\n     */\n    202: ModelThatExtendsExtends;\n};\n\nexport type CallWithResponsesResponse = CallWithResponsesResponses[keyof CallWithResponsesResponses];\n\nexport type CollectionFormatData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * This is an array parameter that is sent as csv format (comma-separated values)\n         */\n        parameterArrayCSV: Array<string> | null;\n        /**\n         * This is an array parameter that is sent as ssv format (space-separated values)\n         */\n        parameterArraySSV: Array<string> | null;\n        /**\n         * This is an array parameter that is sent as tsv format (tab-separated values)\n         */\n        parameterArrayTSV: Array<string> | null;\n        /**\n         * This is an array parameter that is sent as pipes format (pipe-separated values)\n         */\n        parameterArrayPipes: Array<string> | null;\n        /**\n         * This is an array parameter that is sent as multi format (multiple parameter instances)\n         */\n        parameterArrayMulti: Array<string> | null;\n    };\n    url: '/api/v{api-version}/collectionFormat';\n};\n\nexport type TypesData = {\n    body?: never;\n    path?: {\n        /**\n         * This is a number parameter\n         */\n        id?: number;\n    };\n    query: {\n        /**\n         * This is a number parameter\n         */\n        parameterNumber: number;\n        /**\n         * This is a string parameter\n         */\n        parameterString: string | null;\n        /**\n         * This is a boolean parameter\n         */\n        parameterBoolean: boolean | null;\n        /**\n         * This is an object parameter\n         */\n        parameterObject: {\n            [key: string]: unknown;\n        } | null;\n        /**\n         * This is an array parameter\n         */\n        parameterArray: Array<string> | null;\n        /**\n         * This is a dictionary parameter\n         */\n        parameterDictionary: {\n            [key: string]: unknown;\n        } | null;\n        /**\n         * This is an enum parameter\n         */\n        parameterEnum: 'Success' | 'Warning' | 'Error' | null;\n    };\n    url: '/api/v{api-version}/types';\n};\n\nexport type TypesResponses = {\n    /**\n     * Response is a simple number\n     */\n    200: number;\n    /**\n     * Response is a simple string\n     */\n    201: string;\n    /**\n     * Response is a simple boolean\n     */\n    202: boolean;\n    /**\n     * Response is a simple object\n     */\n    203: {\n        [key: string]: unknown;\n    };\n};\n\nexport type TypesResponse = TypesResponses[keyof TypesResponses];\n\nexport type UploadFileData = {\n    body: Blob | File;\n    path: {\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string | null;\n    };\n    query?: never;\n    url: '/api/v{api-version}/upload';\n};\n\nexport type UploadFileResponses = {\n    200: boolean;\n};\n\nexport type UploadFileResponse = UploadFileResponses[keyof UploadFileResponses];\n\nexport type FileResponseData = {\n    body?: never;\n    path: {\n        id: string;\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string;\n    };\n    query?: never;\n    url: '/api/v{api-version}/file/{id}';\n};\n\nexport type FileResponseResponses = {\n    /**\n     * Success\n     */\n    200: Blob | File;\n};\n\nexport type FileResponseResponse = FileResponseResponses[keyof FileResponseResponses];\n\nexport type ComplexTypesData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * Parameter containing object\n         */\n        parameterObject: {\n            first?: {\n                second?: {\n                    third?: string;\n                };\n            };\n        };\n        /**\n         * Parameter containing reference\n         */\n        parameterReference: ModelWithString;\n    };\n    url: '/api/v{api-version}/complex';\n};\n\nexport type ComplexTypesErrors = {\n    /**\n     * 400 `server` error\n     */\n    400: unknown;\n    /**\n     * 500 server error\n     */\n    500: unknown;\n};\n\nexport type ComplexTypesResponses = {\n    /**\n     * Successful response\n     */\n    200: Array<ModelWithString>;\n};\n\nexport type ComplexTypesResponse = ComplexTypesResponses[keyof ComplexTypesResponses];\n\nexport type MultipartResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multipart';\n};\n\nexport type MultipartResponseResponses = {\n    /**\n     * OK\n     */\n    200: {\n        file?: Blob | File;\n        metadata?: {\n            foo?: string;\n            bar?: string;\n        };\n    };\n};\n\nexport type MultipartResponseResponse = MultipartResponseResponses[keyof MultipartResponseResponses];\n\nexport type MultipartRequestData = {\n    body?: {\n        content?: Blob | File;\n        data?: ModelWithString | null;\n    };\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multipart';\n};\n\nexport type ComplexParamsData = {\n    body?: {\n        readonly key: string | null;\n        name: string | null;\n        enabled?: boolean;\n        type: 'Monkey' | 'Horse' | 'Bird';\n        listOfModels?: Array<ModelWithString> | null;\n        listOfStrings?: Array<string> | null;\n        parameters: ModelWithString | ModelWithEnum | ModelWithArray | ModelWithDictionary;\n        readonly user?: {\n            readonly id?: number;\n            readonly name?: string | null;\n        };\n    };\n    path: {\n        id: number;\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string;\n    };\n    query?: never;\n    url: '/api/v{api-version}/complex/{id}';\n};\n\nexport type ComplexParamsResponses = {\n    /**\n     * Success\n     */\n    200: ModelWithString;\n};\n\nexport type ComplexParamsResponse = ComplexParamsResponses[keyof ComplexParamsResponses];\n\nexport type CallWithResultFromHeaderData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/header';\n};\n\nexport type CallWithResultFromHeaderErrors = {\n    /**\n     * 400 server error\n     */\n    400: unknown;\n    /**\n     * 500 server error\n     */\n    500: unknown;\n};\n\nexport type CallWithResultFromHeaderResponses = {\n    /**\n     * Successful response\n     */\n    200: unknown;\n};\n\nexport type TestErrorCodeData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * Status code to return\n         */\n        status: number;\n    };\n    url: '/api/v{api-version}/error';\n};\n\nexport type TestErrorCodeErrors = {\n    /**\n     * Custom message: Internal Server Error\n     */\n    500: unknown;\n    /**\n     * Custom message: Not Implemented\n     */\n    501: unknown;\n    /**\n     * Custom message: Bad Gateway\n     */\n    502: unknown;\n    /**\n     * Custom message: Service Unavailable\n     */\n    503: unknown;\n};\n\nexport type TestErrorCodeResponses = {\n    /**\n     * Custom message: Successful response\n     */\n    200: unknown;\n};\n\nexport type NonAsciiæøåÆøÅöôêÊ字符串Data = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * Dummy input param\n         */\n        nonAsciiParamæøåÆØÅöôêÊ: number;\n    };\n    url: '/api/v{api-version}/non-ascii-æøåÆØÅöôêÊ字符串';\n};\n\nexport type NonAsciiæøåÆøÅöôêÊ字符串Responses = {\n    /**\n     * Successful response\n     */\n    200: Array<NonAsciiStringæøåÆøÅöôêÊ字符串>;\n};\n\nexport type NonAsciiæøåÆøÅöôêÊ字符串Response = NonAsciiæøåÆøÅöôêÊ字符串Responses[keyof NonAsciiæøåÆøÅöôêÊ字符串Responses];\n\nexport type PutWithFormUrlEncodedData = {\n    body: ArrayWithStrings;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/non-ascii-æøåÆØÅöôêÊ字符串';\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-ofetch/base-url-false/client/client.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport { ofetch, type ResponseType as OfetchResponseType } from 'ofetch';\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  buildOfetchOptions,\n  buildUrl,\n  createConfig,\n  createInterceptors,\n  isRepeatableBody,\n  mapParseAsToResponseType,\n  mergeConfigs,\n  mergeHeaders,\n  parseError,\n  parseSuccess,\n  setAuthParams,\n  wrapDataReturn,\n  wrapErrorReturn,\n} from './utils.gen';\n\ntype ReqInit = Omit<RequestInit, 'body' | 'headers'> & {\n  body?: BodyInit | null | undefined;\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  // precompute serialized / network body\n  const resolveOptions = async (options: RequestOptions) => {\n    const opts = {\n      ..._config,\n      ...options,\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 if body is empty to avoid invalid requests\n    if (opts.body === undefined || opts.serializedBody === '') {\n      opts.headers.delete('Content-Type');\n    }\n\n    // if a raw body is provided (no serializer), adjust Content-Type only when it\n    // equals the default JSON value to better match the concrete body type\n    if (\n      opts.body !== undefined &&\n      opts.bodySerializer === null &&\n      (opts.headers.get('Content-Type') || '').toLowerCase() === 'application/json'\n    ) {\n      const b: unknown = opts.body;\n      if (typeof FormData !== 'undefined' && b instanceof FormData) {\n        // let the runtime set the multipart boundary\n        opts.headers.delete('Content-Type');\n      } else if (typeof URLSearchParams !== 'undefined' && b instanceof URLSearchParams) {\n        // standard urlencoded content type (+ charset)\n        opts.headers.set('Content-Type', 'application/x-www-form-urlencoded;charset=UTF-8');\n      } else if (typeof Blob !== 'undefined' && b instanceof Blob) {\n        const t = b.type?.trim();\n        if (t) {\n          opts.headers.set('Content-Type', t);\n        } else {\n          // unknown blob type: avoid sending a misleading JSON header\n          opts.headers.delete('Content-Type');\n        }\n      }\n    }\n\n    // precompute network body (stability for retries and interceptors)\n    const networkBody = getValidRequestBody(opts) as RequestInit['body'] | null | undefined;\n\n    const url = buildUrl(opts);\n\n    return { networkBody, opts, url };\n  };\n\n  // apply request interceptors and mirror header/method/signal back to opts\n  const applyRequestInterceptors = async (\n    request: Request,\n    opts: ResolvedRequestOptions,\n    body: BodyInit | null | undefined,\n  ) => {\n    for (const fn of interceptors.request.fns) {\n      if (fn) {\n        request = await fn(request, opts);\n      }\n    }\n    // reflect interceptor changes into opts used by the network layer\n    opts.headers = request.headers;\n    opts.method = request.method as Uppercase<HttpMethod>;\n    // ignore request.body changes to avoid turning serialized bodies into streams\n    // body comes only from getValidRequestBody(options)\n    // reflect signal if present\n    opts.signal = (request as any).signal as AbortSignal | undefined;\n\n    // When body is FormData, remove Content-Type header to avoid boundary mismatch.\n    // Note: We already delete Content-Type in resolveOptions for FormData, but the\n    // Request constructor (line 175) re-adds it with an auto-generated boundary.\n    // Since we pass the original FormData (not the Request's body) to ofetch, and\n    // ofetch will generate its own boundary, we must remove the Request's Content-Type\n    // to let ofetch set the correct one. Otherwise the boundary in the header won't\n    // match the boundary in the actual multipart body sent by ofetch.\n    if (typeof FormData !== 'undefined' && body instanceof FormData) {\n      opts.headers.delete('Content-Type');\n    }\n\n    return request;\n  };\n\n  // build ofetch options with stable retry logic based on body repeatability\n  const buildNetworkOptions = (\n    opts: ResolvedRequestOptions,\n    body: BodyInit | null | undefined,\n    responseType: OfetchResponseType | undefined,\n  ) => {\n    const effectiveRetry = isRepeatableBody(body) ? (opts.retry as any) : (0 as any);\n    return buildOfetchOptions(opts, body, responseType, effectiveRetry);\n  };\n\n  const request: Client['request'] = async (options) => {\n    const { networkBody: initialNetworkBody, opts, url } = await resolveOptions(options as any);\n    // map parseAs -> ofetch responseType once per request\n    const ofetchResponseType: OfetchResponseType | undefined = mapParseAsToResponseType(\n      opts.parseAs,\n      opts.responseType,\n    );\n\n    const $ofetch = opts.ofetch ?? ofetch;\n\n    // create Request before network to run middleware consistently\n    const networkBody = initialNetworkBody;\n    const requestInit: ReqInit = {\n      body: networkBody,\n      headers: opts.headers as Headers,\n      method: opts.method,\n      redirect: 'follow',\n      signal: opts.signal,\n    };\n    let request = new Request(url, requestInit);\n\n    request = await applyRequestInterceptors(request, opts, networkBody);\n    const finalUrl = request.url;\n\n    // build ofetch options and perform the request (.raw keeps the Response)\n    const responseOptions = buildNetworkOptions(\n      opts as ResolvedRequestOptions,\n      networkBody,\n      ofetchResponseType,\n    );\n\n    let response = await $ofetch.raw(finalUrl, responseOptions);\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 = { request, response };\n\n    if (response.ok) {\n      const data = await parseSuccess(response, opts, ofetchResponseType);\n      return wrapDataReturn(data, result, opts.responseStyle);\n    }\n\n    let finalError = await parseError(response);\n\n    for (const fn of interceptors.error.fns) {\n      if (fn) {\n        finalError = await fn(finalError, response, request, opts);\n      }\n    }\n\n    // ensure error is never undefined after interceptors\n    finalError = (finalError as any) || ({} as string);\n\n    if (opts.throwOnError) {\n      throw finalError;\n    }\n\n    return wrapErrorReturn(finalError, result, opts.responseStyle) as any;\n  };\n\n  const makeMethodFn = (method: Uppercase<HttpMethod>) => (options: RequestOptions) =>\n    request({ ...options, method } as any);\n\n  const makeSseFn = (method: Uppercase<HttpMethod>) => async (options: RequestOptions) => {\n    const { networkBody, opts, url } = await resolveOptions(options);\n    const optsForSse: any = { ...opts };\n    delete optsForSse.body; // body is provided via serializedBody below\n    return createSseClient({\n      ...optsForSse,\n      fetch: opts.fetch,\n      headers: opts.headers as Headers,\n      method,\n      onRequest: async (url, init) => {\n        let request = new Request(url, init);\n        request = await applyRequestInterceptors(request, opts, networkBody);\n        return request;\n      },\n      serializedBody: networkBody as BodyInit | null | undefined,\n      signal: opts.signal,\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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-ofetch/base-url-false/client/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type { Auth } from '../core/auth.gen';\nexport type { QuerySerializerOptions } from '../core/bodySerializer.gen';\nexport {\n  formDataBodySerializer,\n  jsonBodySerializer,\n  urlSearchParamsBodySerializer,\n} from '../core/bodySerializer.gen';\nexport { buildClientParams } from '../core/params.gen';\nexport { serializeQueryKeyValue } from '../core/queryKeySerializer.gen';\nexport { createClient } from './client.gen';\nexport type {\n  Client,\n  ClientOptions,\n  Config,\n  CreateClientConfig,\n  Options,\n  RequestOptions,\n  RequestResult,\n  ResolvedRequestOptions,\n  ResponseStyle,\n  TDataShape,\n} from './types.gen';\nexport { createConfig, mergeHeaders } from './utils.gen';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-ofetch/base-url-false/client/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { FetchOptions as OfetchOptions, ResponseType as OfetchResponseType } from 'ofetch';\nimport type { ofetch } from 'ofetch';\n\nimport type { Auth } from '../core/auth.gen';\nimport type {\n  ServerSentEventsOptions,\n  ServerSentEventsResult,\n} from '../core/serverSentEvents.gen';\nimport type { Client as CoreClient, Config as CoreConfig } from '../core/types.gen';\nimport type { Middleware } from './utils.gen';\n\nexport type ResponseStyle = 'data' | 'fields';\n\nexport interface Config<T extends ClientOptions = ClientOptions>\n  extends Omit<RequestInit, 'body' | 'headers' | 'method'>, CoreConfig {\n  /**\n   * HTTP(S) agent configuration (Node.js only). Passed through to ofetch.\n   */\n  agent?: OfetchOptions['agent'];\n  /**\n   * Base URL for all requests made by this client.\n   */\n  baseUrl?: T['baseUrl'];\n  /**\n   * Node-only proxy/agent options.\n   */\n  dispatcher?: OfetchOptions['dispatcher'];\n  /**\n   * Fetch API implementation. Used for SSE streaming. You can use this option\n   * to provide a custom fetch instance.\n   *\n   * @default globalThis.fetch\n   */\n  fetch?: typeof fetch;\n  /**\n   * Controls the native ofetch behaviour that throws `FetchError` when\n   * `response.ok === false`. We default to suppressing it to match the fetch\n   * client semantics and let `throwOnError` drive the outcome.\n   */\n  ignoreResponseError?: OfetchOptions['ignoreResponseError'];\n  // No custom fetch option: provide custom instance via `ofetch` instead\n  /**\n   * Please don't use the Fetch client for Next.js applications. The `next`\n   * options won't have any effect.\n   *\n   * Install {@link https://www.npmjs.com/package/@hey-api/client-next `@hey-api/client-next`} instead.\n   */\n  next?: never;\n  /**\n   * Custom ofetch instance created via `ofetch.create()`. If provided, it will\n   * be used for requests instead of the default `ofetch` export.\n   */\n  ofetch?: typeof ofetch;\n  /**\n   * ofetch hook called before a request is sent.\n   */\n  onRequest?: OfetchOptions['onRequest'];\n  /**\n   * ofetch hook called when a request fails before receiving a response\n   * (e.g., network errors or aborted requests).\n   */\n  onRequestError?: OfetchOptions['onRequestError'];\n  /**\n   * ofetch hook called after a successful response is received and parsed.\n   */\n  onResponse?: OfetchOptions['onResponse'];\n  /**\n   * ofetch hook called when the response indicates an error (non-ok status)\n   * or when response parsing fails.\n   */\n  onResponseError?: OfetchOptions['onResponseError'];\n  /**\n   * Return the response data parsed in a specified format. By default, `auto`\n   * will infer the appropriate method from the `Content-Type` response header.\n   * You can override this behavior with any of the {@link Body} methods.\n   * Select `stream` if you don't want to parse response data at all.\n   *\n   * @default 'auto'\n   */\n  parseAs?: 'arrayBuffer' | 'auto' | 'blob' | 'formData' | 'json' | 'stream' | 'text';\n  /** Custom response parser (ofetch). */\n  parseResponse?: OfetchOptions['parseResponse'];\n  /**\n   * Should we return only data or multiple fields (data, error, response, etc.)?\n   *\n   * @default 'fields'\n   */\n  responseStyle?: ResponseStyle;\n  /**\n   * ofetch responseType override. If provided, it will be passed directly to\n   * ofetch and take precedence over `parseAs`.\n   */\n  responseType?: OfetchResponseType;\n  /**\n   * Automatically retry failed requests.\n   */\n  retry?: OfetchOptions['retry'];\n  /**\n   * Delay (in ms) between retry attempts.\n   */\n  retryDelay?: OfetchOptions['retryDelay'];\n  /**\n   * HTTP status codes that should trigger a retry.\n   */\n  retryStatusCodes?: OfetchOptions['retryStatusCodes'];\n  /**\n   * Throw an error instead of returning it in the response?\n   *\n   * @default false\n   */\n  throwOnError?: T['throwOnError'];\n  /**\n   * Abort the request after the given milliseconds.\n   */\n  timeout?: number;\n}\n\nexport interface RequestOptions<\n  TData = unknown,\n  TResponseStyle extends ResponseStyle = 'fields',\n  ThrowOnError extends boolean = boolean,\n  Url extends string = string,\n>\n  extends\n    Config<{\n      responseStyle: TResponseStyle;\n      throwOnError: ThrowOnError;\n    }>,\n    Pick<\n      ServerSentEventsOptions<TData>,\n      | 'onSseError'\n      | 'onSseEvent'\n      | 'sseDefaultRetryDelay'\n      | 'sseMaxRetryAttempts'\n      | 'sseMaxRetryDelay'\n    > {\n  /**\n   * Any body that you want to add to your request.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/fetch#body}\n   */\n  body?: unknown;\n  path?: Record<string, unknown>;\n  query?: Record<string, unknown>;\n  /**\n   * Security mechanism(s) to use for the request.\n   */\n  security?: ReadonlyArray<Auth>;\n  url: Url;\n}\n\nexport interface ResolvedRequestOptions<\n  TResponseStyle extends ResponseStyle = 'fields',\n  ThrowOnError extends boolean = boolean,\n  Url extends string = string,\n> extends RequestOptions<unknown, TResponseStyle, ThrowOnError, Url> {\n  serializedBody?: string;\n}\n\nexport type RequestResult<\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = boolean,\n  TResponseStyle extends ResponseStyle = 'fields',\n> = ThrowOnError extends true\n  ? Promise<\n      TResponseStyle extends 'data'\n        ? TData extends Record<string, unknown>\n          ? TData[keyof TData]\n          : TData\n        : {\n            data: TData extends Record<string, unknown> ? TData[keyof TData] : TData;\n            request: Request;\n            response: Response;\n          }\n    >\n  : Promise<\n      TResponseStyle extends 'data'\n        ? (TData extends Record<string, unknown> ? TData[keyof TData] : TData) | undefined\n        : (\n            | {\n                data: TData extends Record<string, unknown> ? TData[keyof TData] : TData;\n                error: undefined;\n              }\n            | {\n                data: undefined;\n                error: TError extends Record<string, unknown> ? TError[keyof TError] : TError;\n              }\n          ) & {\n            request: Request;\n            response: Response;\n          }\n    >;\n\nexport interface ClientOptions {\n  baseUrl?: string;\n  responseStyle?: ResponseStyle;\n  throwOnError?: boolean;\n}\n\ntype MethodFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'>,\n) => RequestResult<TData, TError, ThrowOnError, TResponseStyle>;\n\ntype SseFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'>,\n) => Promise<ServerSentEventsResult<TData, TError>>;\n\ntype RequestFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'> &\n    Pick<Required<RequestOptions<TData, TResponseStyle, ThrowOnError>>, 'method'>,\n) => RequestResult<TData, TError, ThrowOnError, TResponseStyle>;\n\ntype BuildUrlFn = <\n  TData extends {\n    body?: unknown;\n    path?: Record<string, unknown>;\n    query?: Record<string, unknown>;\n    url: string;\n  },\n>(\n  options: TData & Options<TData>,\n) => string;\n\nexport type Client = CoreClient<RequestFn, Config, MethodFn, BuildUrlFn, SseFn> & {\n  interceptors: Middleware<Request, Response, unknown, ResolvedRequestOptions>;\n};\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 = ClientOptions> = (\n  override?: Config<ClientOptions & T>,\n) => Config<Required<ClientOptions> & T>;\n\nexport interface TDataShape {\n  body?: unknown;\n  headers?: unknown;\n  path?: unknown;\n  query?: unknown;\n  url: string;\n}\n\ntype OmitKeys<T, K> = Pick<T, Exclude<keyof T, K>>;\n\nexport type Options<\n  TData extends TDataShape = TDataShape,\n  ThrowOnError extends boolean = boolean,\n  TResponse = unknown,\n  TResponseStyle extends ResponseStyle = 'fields',\n> = OmitKeys<\n  RequestOptions<TResponse, TResponseStyle, ThrowOnError>,\n  'body' | 'path' | 'query' | 'url'\n> &\n  ([TData] extends [never] ? unknown : Omit<TData, 'url'>);\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-ofetch/base-url-false/client/utils.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { FetchOptions as OfetchOptions, ResponseType as OfetchResponseType } from 'ofetch';\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 {\n  Client,\n  ClientOptions,\n  Config,\n  RequestOptions,\n  ResolvedRequestOptions,\n  ResponseStyle,\n} 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\n/**\n * Map our parseAs value to ofetch responseType when not explicitly provided.\n */\nexport const mapParseAsToResponseType = (\n  parseAs: Config['parseAs'] | undefined,\n  explicit?: OfetchResponseType,\n): OfetchResponseType | undefined => {\n  if (explicit) return explicit;\n  switch (parseAs) {\n    case 'arrayBuffer':\n    case 'blob':\n    case 'json':\n    case 'text':\n    case 'stream':\n      return parseAs;\n    case 'formData':\n    case 'auto':\n    default:\n      return undefined; // let ofetch auto-detect\n  }\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\n/**\n * Heuristic to detect whether a request body can be safely retried.\n */\nexport const isRepeatableBody = (body: unknown): boolean => {\n  if (body == null) return true; // undefined/null treated as no-body\n  if (typeof body === 'string') return true;\n  if (typeof URLSearchParams !== 'undefined' && body instanceof URLSearchParams) return true;\n  if (typeof Uint8Array !== 'undefined' && body instanceof Uint8Array) return true;\n  if (typeof ArrayBuffer !== 'undefined' && body instanceof ArrayBuffer) return true;\n  if (typeof Blob !== 'undefined' && body instanceof Blob) return true;\n  if (typeof FormData !== 'undefined' && body instanceof FormData) return true;\n  // Streams are not repeatable\n  if (typeof ReadableStream !== 'undefined' && body instanceof ReadableStream) return false;\n  // Default: assume non-repeatable for unknown structured bodies\n  return false;\n};\n\n/**\n * Small helper to unify data vs fields return style.\n */\nexport const wrapDataReturn = <T>(\n  data: T,\n  result: { request: Request; response: Response },\n  responseStyle: ResponseStyle | undefined,\n): T | ((T extends Record<string, unknown> ? { data: T } : { data: T }) & typeof result) =>\n  (responseStyle ?? 'fields') === 'data' ? (data as any) : ({ data, ...result } as any);\n\n/**\n * Small helper to unify error vs fields return style.\n */\nexport const wrapErrorReturn = <E>(\n  error: E,\n  result: { request: Request; response: Response },\n  responseStyle: ResponseStyle | undefined,\n):\n  | undefined\n  | ((E extends Record<string, unknown> ? { error: E } : { error: E }) & typeof result) =>\n  (responseStyle ?? 'fields') === 'data' ? undefined : ({ error, ...result } as any);\n\n/**\n * Build options for $ofetch.raw from our resolved opts and body.\n */\nexport const buildOfetchOptions = (\n  opts: ResolvedRequestOptions,\n  body: BodyInit | null | undefined,\n  responseType: OfetchResponseType | undefined,\n  retryOverride?: OfetchOptions['retry'],\n): OfetchOptions =>\n  ({\n    agent: opts.agent as OfetchOptions['agent'],\n    body,\n    credentials: opts.credentials as OfetchOptions['credentials'],\n    dispatcher: opts.dispatcher as OfetchOptions['dispatcher'],\n    headers: opts.headers as Headers,\n    ignoreResponseError: (opts.ignoreResponseError as OfetchOptions['ignoreResponseError']) ?? true,\n    method: opts.method,\n    onRequest: opts.onRequest as OfetchOptions['onRequest'],\n    onRequestError: opts.onRequestError as OfetchOptions['onRequestError'],\n    onResponse: opts.onResponse as OfetchOptions['onResponse'],\n    onResponseError: opts.onResponseError as OfetchOptions['onResponseError'],\n    parseResponse: opts.parseResponse as OfetchOptions['parseResponse'],\n    // URL already includes query\n    query: undefined,\n    responseType,\n    retry: retryOverride ?? (opts.retry as OfetchOptions['retry']),\n    retryDelay: opts.retryDelay as OfetchOptions['retryDelay'],\n    retryStatusCodes: opts.retryStatusCodes as OfetchOptions['retryStatusCodes'],\n    signal: opts.signal,\n    timeout: opts.timeout as number | undefined,\n  }) as OfetchOptions;\n\n/**\n * Parse a successful response, handling empty bodies and stream cases.\n */\nexport const parseSuccess = async (\n  response: Response,\n  opts: ResolvedRequestOptions,\n  ofetchResponseType?: OfetchResponseType,\n): Promise<unknown> => {\n  // Stream requested: return stream body\n  if (ofetchResponseType === 'stream') {\n    return response.body;\n  }\n\n  const inferredParseAs =\n    (opts.parseAs === 'auto' ? getParseAs(response.headers.get('Content-Type')) : opts.parseAs) ??\n    'json';\n\n  // Handle empty responses\n  if (response.status === 204 || response.headers.get('Content-Length') === '0') {\n    switch (inferredParseAs) {\n      case 'arrayBuffer':\n      case 'blob':\n      case 'text':\n        return await (response as any)[inferredParseAs]();\n      case 'formData':\n        return new FormData();\n      case 'stream':\n        return response.body;\n      default:\n        return {};\n    }\n  }\n\n  // Prefer ofetch-populated data unless we explicitly need raw `formData`\n  let data: unknown = (response as any)._data;\n  if (inferredParseAs === 'formData' || typeof data === 'undefined') {\n    switch (inferredParseAs) {\n      case 'arrayBuffer':\n      case 'blob':\n      case 'formData':\n      case 'text':\n        data = await (response as any)[inferredParseAs]();\n        break;\n      case 'json': {\n        // Some servers return 200 with no Content-Length and empty body.\n        // response.json() would throw; detect empty via clone().text() first.\n        const txt = await response.clone().text();\n        if (!txt) {\n          data = {};\n        } else {\n          data = await (response as any).json();\n        }\n        break;\n      }\n      case 'stream':\n        return response.body;\n    }\n  }\n\n  if (inferredParseAs === 'json') {\n    if (opts.responseValidator) {\n      await opts.responseValidator(data);\n    }\n    if (opts.responseTransformer) {\n      data = await opts.responseTransformer(data);\n    }\n  }\n\n  return data;\n};\n\n/**\n * Parse an error response payload.\n */\nexport const parseError = async (response: Response): Promise<unknown> => {\n  let error: unknown = (response as any)._data;\n  if (typeof error === 'undefined') {\n    const textError = await response.text();\n    try {\n      error = JSON.parse(textError);\n    } catch {\n      error = textError;\n    }\n  }\n  return error ?? ({} as string);\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  ignoreResponseError: true,\n  parseAs: 'auto',\n  querySerializer: defaultQuerySerializer,\n  ...override,\n});\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-ofetch/base-url-false/client.gen.ts",
    "content": "// 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>());\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-ofetch/base-url-false/core/auth.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-ofetch/base-url-false/core/bodySerializer.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-ofetch/base-url-false/core/params.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-ofetch/base-url-false/core/pathSerializer.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-ofetch/base-url-false/core/queryKeySerializer.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\n/**\n * JSON-friendly union that mirrors what Pinia Colada can hash.\n */\nexport type JsonValue =\n  | null\n  | string\n  | number\n  | boolean\n  | JsonValue[]\n  | { [key: string]: JsonValue };\n\n/**\n * Replacer that converts non-JSON values (bigint, Date, etc.) to safe substitutes.\n */\nexport const queryKeyJsonReplacer = (_key: string, value: unknown) => {\n  if (value === undefined || typeof value === 'function' || typeof value === 'symbol') {\n    return undefined;\n  }\n  if (typeof value === 'bigint') {\n    return value.toString();\n  }\n  if (value instanceof Date) {\n    return value.toISOString();\n  }\n  return value;\n};\n\n/**\n * Safely stringifies a value and parses it back into a JsonValue.\n */\nexport const stringifyToJsonValue = (input: unknown): JsonValue | undefined => {\n  try {\n    const json = JSON.stringify(input, queryKeyJsonReplacer);\n    if (json === undefined) {\n      return undefined;\n    }\n    return JSON.parse(json) as JsonValue;\n  } catch {\n    return undefined;\n  }\n};\n\n/**\n * Detects plain objects (including objects with a null prototype).\n */\nconst isPlainObject = (value: unknown): value is Record<string, unknown> => {\n  if (value === null || typeof value !== 'object') {\n    return false;\n  }\n  const prototype = Object.getPrototypeOf(value as object);\n  return prototype === Object.prototype || prototype === null;\n};\n\n/**\n * Turns URLSearchParams into a sorted JSON object for deterministic keys.\n */\nconst serializeSearchParams = (params: URLSearchParams): JsonValue => {\n  const entries = Array.from(params.entries()).sort(([a], [b]) => a.localeCompare(b));\n  const result: Record<string, JsonValue> = {};\n\n  for (const [key, value] of entries) {\n    const existing = result[key];\n    if (existing === undefined) {\n      result[key] = value;\n      continue;\n    }\n\n    if (Array.isArray(existing)) {\n      (existing as string[]).push(value);\n    } else {\n      result[key] = [existing, value];\n    }\n  }\n\n  return result;\n};\n\n/**\n * Normalizes any accepted value into a JSON-friendly shape for query keys.\n */\nexport const serializeQueryKeyValue = (value: unknown): JsonValue | undefined => {\n  if (value === null) {\n    return null;\n  }\n\n  if (typeof value === 'string' || typeof value === 'number' || typeof value === 'boolean') {\n    return value;\n  }\n\n  if (value === undefined || typeof value === 'function' || typeof value === 'symbol') {\n    return undefined;\n  }\n\n  if (typeof value === 'bigint') {\n    return value.toString();\n  }\n\n  if (value instanceof Date) {\n    return value.toISOString();\n  }\n\n  if (Array.isArray(value)) {\n    return stringifyToJsonValue(value);\n  }\n\n  if (typeof URLSearchParams !== 'undefined' && value instanceof URLSearchParams) {\n    return serializeSearchParams(value);\n  }\n\n  if (isPlainObject(value)) {\n    return stringifyToJsonValue(value);\n  }\n\n  return undefined;\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-ofetch/base-url-false/core/serverSentEvents.gen.ts",
    "content": "// 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 const 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            // Normalize line endings: CRLF -> LF, then CR -> LF\n            buffer = buffer.replace(/\\r\\n/g, '\\n').replace(/\\r/g, '\\n');\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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-ofetch/base-url-false/core/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { Auth, AuthToken } from './auth.gen';\nimport type { BodySerializer, QuerySerializer, QuerySerializerOptions } from './bodySerializer.gen';\n\nexport type HttpMethod =\n  | 'connect'\n  | 'delete'\n  | 'get'\n  | 'head'\n  | 'options'\n  | 'patch'\n  | 'post'\n  | 'put'\n  | 'trace';\n\nexport type Client<\n  RequestFn = never,\n  Config = unknown,\n  MethodFn = never,\n  BuildUrlFn = never,\n  SseFn = never,\n> = {\n  /**\n   * Returns the final request URL.\n   */\n  buildUrl: BuildUrlFn;\n  getConfig: () => Config;\n  request: RequestFn;\n  setConfig: (config: Config) => Config;\n} & {\n  [K in HttpMethod]: MethodFn;\n} & ([SseFn] extends [never] ? { sse?: never } : { sse: { [K in HttpMethod]: SseFn } });\n\nexport interface Config {\n  /**\n   * Auth token or a function returning auth token. The resolved value will be\n   * added to the request payload as defined by its `security` array.\n   */\n  auth?: ((auth: Auth) => Promise<AuthToken> | AuthToken) | AuthToken;\n  /**\n   * A function for serializing request body parameter. By default,\n   * {@link JSON.stringify()} will be used.\n   */\n  bodySerializer?: BodySerializer | null;\n  /**\n   * An object containing any HTTP headers that you want to pre-populate your\n   * `Headers` object with.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/Headers/Headers#init See more}\n   */\n  headers?:\n    | RequestInit['headers']\n    | Record<\n        string,\n        string | number | boolean | (string | number | boolean)[] | null | undefined | unknown\n      >;\n  /**\n   * The request method.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/fetch#method See more}\n   */\n  method?: Uppercase<HttpMethod>;\n  /**\n   * A function for serializing request query parameters. By default, arrays\n   * will be exploded in form style, objects will be exploded in deepObject\n   * style, and reserved characters are percent-encoded.\n   *\n   * This method will have no effect if the native `paramsSerializer()` Axios\n   * API function is used.\n   *\n   * {@link https://swagger.io/docs/specification/serialization/#query View examples}\n   */\n  querySerializer?: QuerySerializer | QuerySerializerOptions;\n  /**\n   * A function validating request data. This is useful if you want to ensure\n   * the request conforms to the desired shape, so it can be safely sent to\n   * the server.\n   */\n  requestValidator?: (data: unknown) => Promise<unknown>;\n  /**\n   * A function transforming response data before it's returned. This is useful\n   * for post-processing data, e.g. converting ISO strings into Date objects.\n   */\n  responseTransformer?: (data: unknown) => Promise<unknown>;\n  /**\n   * A function validating response data. This is useful if you want to ensure\n   * the response conforms to the desired shape, so it can be safely passed to\n   * the transformers and returned to the user.\n   */\n  responseValidator?: (data: unknown) => Promise<unknown>;\n}\n\ntype IsExactlyNeverOrNeverUndefined<T> = [T] extends [never]\n  ? true\n  : [T] extends [never | undefined]\n    ? [undefined] extends [T]\n      ? false\n      : true\n    : false;\n\nexport type OmitNever<T extends Record<string, unknown>> = {\n  [K in keyof T as IsExactlyNeverOrNeverUndefined<T[K]> extends true ? never : K]: T[K];\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-ofetch/base-url-false/core/utils.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-ofetch/base-url-false/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type { _3eNum1Период, _400, AdditionalPropertiesIntegerIssue, AdditionalPropertiesUnknownIssue, AdditionalPropertiesUnknownIssue2, AdditionalPropertiesUnknownIssue3, AdditionalPropertiesUnknownIssueWritable, AnyOfAnyAndNull, AnyOfArrays, ApiVVersionODataControllerCountData, ApiVVersionODataControllerCountResponse, ApiVVersionODataControllerCountResponses, ArrayWithAnyOfProperties, ArrayWithArray, ArrayWithBooleans, ArrayWithNumbers, ArrayWithProperties, ArrayWithReferences, ArrayWithStrings, CallToTestOrderOfParamsData, CallWithDefaultOptionalParametersData, CallWithDefaultParametersData, CallWithDescriptionsData, CallWithDuplicateResponsesData, CallWithDuplicateResponsesError, CallWithDuplicateResponsesErrors, CallWithDuplicateResponsesResponse, CallWithDuplicateResponsesResponses, CallWithNoContentResponseData, CallWithNoContentResponseResponse, CallWithNoContentResponseResponses, CallWithParametersData, CallWithResponseAndNoContentResponseData, CallWithResponseAndNoContentResponseResponse, CallWithResponseAndNoContentResponseResponses, CallWithResponseData, CallWithResponseResponse, CallWithResponseResponses, CallWithResponsesData, CallWithResponsesError, CallWithResponsesErrors, CallWithResponsesResponse, CallWithResponsesResponses, CallWithResultFromHeaderData, CallWithResultFromHeaderErrors, CallWithResultFromHeaderResponses, CallWithWeirdParameterNamesData, CamelCaseCommentWithBreaks, CharactersInDescription, ClientOptions, CollectionFormatData, CommentWithBackticks, CommentWithBackticksAndQuotes, CommentWithBreaks, CommentWithExpressionPlaceholders, CommentWithQuotes, CommentWithReservedCharacters, CommentWithSlashes, ComplexParamsData, ComplexParamsResponse, ComplexParamsResponses, ComplexTypesData, ComplexTypesErrors, ComplexTypesResponse, ComplexTypesResponses, CompositionBaseModel, CompositionExtendedModel, CompositionWithAllOfAndNullable, CompositionWithAnyOf, CompositionWithAnyOfAndNullable, CompositionWithAnyOfAnonymous, CompositionWithNestedAnyAndTypeNull, CompositionWithNestedAnyOfAndNull, CompositionWithOneOf, CompositionWithOneOfAndComplexArrayDictionary, CompositionWithOneOfAndNullable, CompositionWithOneOfAndProperties, CompositionWithOneOfAndSimpleArrayDictionary, CompositionWithOneOfAndSimpleDictionary, CompositionWithOneOfAnonymous, CompositionWithOneOfDiscriminator, ConstValue, Default, DeleteCallWithoutParametersAndResponseData, DeleteFooData, DeleteFooData2, DeleteFooData3, DeprecatedCallData, DeprecatedModel, DictionaryWithArray, DictionaryWithDictionary, DictionaryWithProperties, DictionaryWithPropertiesAndAdditionalProperties, DictionaryWithReference, DictionaryWithString, DummyAData, DummyAResponse, DummyAResponses, DummyBData, DummyBResponse, DummyBResponses, DuplicateName2Data, DuplicateName3Data, DuplicateName4Data, DuplicateNameData, EnumFromDescription, EnumWithExtensions, EnumWithNumbers, EnumWithReplacedCharacters, EnumWithStrings, EnumWithXEnumNames, ExportData, ExternalRefA, ExternalRefB, ExternalSharedModel, File, FileResponseData, FileResponseResponse, FileResponseResponses, FileWritable, FooWowData, FooWowResponses, FreeFormObjectWithAdditionalPropertiesEqEmptyObject, FreeFormObjectWithAdditionalPropertiesEqTrue, FreeFormObjectWithoutAdditionalProperties, GenericSchemaDuplicateIssue1SystemBoolean, GenericSchemaDuplicateIssue1SystemBooleanWritable, GenericSchemaDuplicateIssue1SystemString, GenericSchemaDuplicateIssue1SystemStringWritable, GetApiVbyApiVersionSimpleOperationData, GetApiVbyApiVersionSimpleOperationError, GetApiVbyApiVersionSimpleOperationErrors, GetApiVbyApiVersionSimpleOperationResponse, GetApiVbyApiVersionSimpleOperationResponses, GetCallWithOptionalParamData, GetCallWithoutParametersAndResponseData, HeadCallWithoutParametersAndResponseData, Import, ImportData, ImportResponse, ImportResponses, IoK8sApimachineryPkgApisMetaV1DeleteOptions, IoK8sApimachineryPkgApisMetaV1Preconditions, ModelCircle, ModelFromZendesk, ModelSquare, ModelThatExtends, ModelThatExtendsExtends, ModelWithAdditionalPropertiesEqTrue, ModelWithAdditionalPropertiesRef, ModelWithAnyOfConstantSizeArray, ModelWithAnyOfConstantSizeArrayAndIntersect, ModelWithAnyOfConstantSizeArrayNullable, ModelWithAnyOfConstantSizeArrayWithNSizeAndOptions, ModelWithAnyOfConstantSizeArrayWithNSizeAndOptionsWritable, ModelWithArray, ModelWithArrayReadOnlyAndWriteOnly, ModelWithArrayReadOnlyAndWriteOnlyWritable, ModelWithBackticksInDescription, ModelWithBoolean, ModelWithCircularReference, ModelWithConst, ModelWithConstantSizeArray, ModelWithDictionary, ModelWithDuplicateImports, ModelWithDuplicateProperties, ModelWithEnum, ModelWithEnumFromDescription, ModelWithEnumWithHyphen, ModelWithInteger, ModelWithNestedArrayEnums, ModelWithNestedArrayEnumsData, ModelWithNestedArrayEnumsDataBar, ModelWithNestedArrayEnumsDataFoo, ModelWithNestedCompositionEnums, ModelWithNestedEnums, ModelWithNestedProperties, ModelWithNullableObject, ModelWithNullableString, ModelWithNumericEnumUnion, ModelWithOneOfAndProperties, ModelWithOneOfEnum, ModelWithOrderedProperties, ModelWithPattern, ModelWithPatternWritable, ModelWithPrefixItemsConstantSizeArray, ModelWithProperties, ModelWithPropertiesWritable, ModelWithReadOnlyAndWriteOnly, ModelWithReadOnlyAndWriteOnlyWritable, ModelWithReference, ModelWithReferenceWritable, ModelWithString, ModelWithStringError, MultipartRequestData, MultipartResponseData, MultipartResponseResponse, MultipartResponseResponses, NestedAnyOfArraysNullable, NonAsciiæøåÆøÅöôêÊ字符串Data, NonAsciiæøåÆøÅöôêÊ字符串Response, NonAsciiæøåÆøÅöôêÊ字符串Responses, NonAsciiStringæøåÆøÅöôêÊ字符串, NullableObject, OneOfAllOfIssue, OneOfAllOfIssueWritable, OptionsCallWithoutParametersAndResponseData, Pageable, ParameterSimpleParameterUnused, PatchApiVbyApiVersionNoTagData, PatchApiVbyApiVersionNoTagResponses, PatchCallWithoutParametersAndResponseData, PostApiVbyApiVersionFormDataData, PostApiVbyApiVersionRequestBodyData, PostCallWithOptionalParamData, PostCallWithOptionalParamResponse, PostCallWithOptionalParamResponses, PostCallWithoutParametersAndResponseData, PostServiceWithEmptyTagResponse, PostServiceWithEmptyTagResponse2, PutCallWithoutParametersAndResponseData, PutWithFormUrlEncodedData, SchemaWithFormRestrictedKeys, SimpleBoolean, SimpleFile, SimpleFormData, SimpleInteger, SimpleParameter, SimpleReference, SimpleRequestBody, SimpleString, SimpleStringWithPattern, TestErrorCodeData, TestErrorCodeErrors, TestErrorCodeResponses, TypesData, TypesResponse, TypesResponses, UploadFileData, UploadFileResponse, UploadFileResponses, XFooBar } from './types.gen';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-ofetch/base-url-false/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type ClientOptions = {\n    baseUrl: 'http://localhost:3000/base' | (string & {});\n};\n\n/**\n * Model with number-only name\n */\nexport type _400 = string;\n\n/**\n * External ref to shared model (A)\n */\nexport type ExternalRefA = ExternalSharedModel;\n\n/**\n * External ref to shared model (B)\n */\nexport type ExternalRefB = ExternalSharedModel;\n\n/**\n * Testing multiline comments in string: First line\n * Second line\n *\n * Fourth line\n */\nexport type CamelCaseCommentWithBreaks = number;\n\n/**\n * Testing multiline comments in string: First line\n * Second line\n *\n * Fourth line\n */\nexport type CommentWithBreaks = number;\n\n/**\n * Testing backticks in string: `backticks` and ```multiple backticks``` should work\n */\nexport type CommentWithBackticks = number;\n\n/**\n * Testing backticks and quotes in string: `backticks`, 'quotes', \"double quotes\" and ```multiple backticks``` should work\n */\nexport type CommentWithBackticksAndQuotes = number;\n\n/**\n * Testing slashes in string: \\backwards\\\\\\ and /forwards/// should work\n */\nexport type CommentWithSlashes = number;\n\n/**\n * Testing expression placeholders in string: ${expression} should work\n */\nexport type CommentWithExpressionPlaceholders = number;\n\n/**\n * Testing quotes in string: 'single quote''' and \"double quotes\"\"\" should work\n */\nexport type CommentWithQuotes = number;\n\n/**\n * Testing reserved characters in string: * inline * and ** inline ** should work\n */\nexport type CommentWithReservedCharacters = number;\n\n/**\n * This is a simple number\n */\nexport type SimpleInteger = number;\n\n/**\n * This is a simple boolean\n */\nexport type SimpleBoolean = boolean;\n\n/**\n * This is a simple string\n */\nexport type SimpleString = string;\n\n/**\n * A string with non-ascii (unicode) characters valid in typescript identifiers (æøåÆØÅöÔèÈ字符串)\n */\nexport type NonAsciiStringæøåÆøÅöôêÊ字符串 = string;\n\n/**\n * This is a simple file\n */\nexport type SimpleFile = Blob | File;\n\n/**\n * This is a simple reference\n */\nexport type SimpleReference = ModelWithString;\n\n/**\n * This is a simple string\n */\nexport type SimpleStringWithPattern = string | null;\n\n/**\n * This is a simple enum with strings\n */\nexport type EnumWithStrings = 'Success' | 'Warning' | 'Error' | '\\'Single Quote\\'' | '\"Double Quotes\"' | 'Non-ascii: øæåôöØÆÅÔÖ字符串';\n\nexport type EnumWithReplacedCharacters = '\\'Single Quote\\'' | '\"Double Quotes\"' | 'øæåôöØÆÅÔÖ字符串' | 3.1 | '';\n\n/**\n * This is a simple enum with numbers\n */\nexport type EnumWithNumbers = 1 | 2 | 3 | 1.1 | 1.2 | 1.3 | 100 | 200 | 300 | -100 | -200 | -300 | -1.1 | -1.2 | -1.3;\n\n/**\n * Success=1,Warning=2,Error=3\n */\nexport type EnumFromDescription = number;\n\n/**\n * This is a simple enum with numbers\n */\nexport type EnumWithExtensions = 200 | 400 | 500;\n\nexport type EnumWithXEnumNames = 0 | 1 | 2;\n\n/**\n * This is a simple array with numbers\n */\nexport type ArrayWithNumbers = Array<number>;\n\n/**\n * This is a simple array with booleans\n */\nexport type ArrayWithBooleans = Array<boolean>;\n\n/**\n * This is a simple array with strings\n */\nexport type ArrayWithStrings = Array<string>;\n\n/**\n * This is a simple array with references\n */\nexport type ArrayWithReferences = Array<ModelWithString>;\n\n/**\n * This is a simple array containing an array\n */\nexport type ArrayWithArray = Array<Array<ModelWithString>>;\n\n/**\n * This is a simple array with properties\n */\nexport type ArrayWithProperties = Array<{\n    '16x16'?: CamelCaseCommentWithBreaks;\n    bar?: string;\n}>;\n\n/**\n * This is a simple array with any of properties\n */\nexport type ArrayWithAnyOfProperties = Array<{\n    foo?: string;\n} | {\n    bar?: string;\n}>;\n\nexport type AnyOfAnyAndNull = {\n    data?: unknown | null;\n};\n\n/**\n * This is a simple array with any of properties\n */\nexport type AnyOfArrays = {\n    results?: Array<{\n        foo?: string;\n    } | {\n        bar?: string;\n    }>;\n};\n\n/**\n * This is a string dictionary\n */\nexport type DictionaryWithString = {\n    [key: string]: string;\n};\n\nexport type DictionaryWithPropertiesAndAdditionalProperties = {\n    foo?: number;\n    bar?: boolean;\n    [key: string]: string | number | boolean | undefined;\n};\n\n/**\n * This is a string reference\n */\nexport type DictionaryWithReference = {\n    [key: string]: ModelWithString;\n};\n\n/**\n * This is a complex dictionary\n */\nexport type DictionaryWithArray = {\n    [key: string]: Array<ModelWithString>;\n};\n\n/**\n * This is a string dictionary\n */\nexport type DictionaryWithDictionary = {\n    [key: string]: {\n        [key: string]: string;\n    };\n};\n\n/**\n * This is a complex dictionary\n */\nexport type DictionaryWithProperties = {\n    [key: string]: {\n        foo?: string;\n        bar?: string;\n    };\n};\n\n/**\n * This is a model with one number property\n */\nexport type ModelWithInteger = {\n    /**\n     * This is a simple number property\n     */\n    prop?: number;\n};\n\n/**\n * This is a model with one boolean property\n */\nexport type ModelWithBoolean = {\n    /**\n     * This is a simple boolean property\n     */\n    prop?: boolean;\n};\n\n/**\n * This is a model with one string property\n */\nexport type ModelWithString = {\n    /**\n     * This is a simple string property\n     */\n    prop?: string;\n};\n\n/**\n * This is a model with one string property\n */\nexport type ModelWithStringError = {\n    /**\n     * This is a simple string property\n     */\n    prop?: string;\n};\n\n/**\n * `Comment` or `VoiceComment`. The JSON object for adding voice comments to tickets is different. See [Adding voice comments to tickets](/documentation/ticketing/managing-tickets/adding-voice-comments-to-tickets)\n */\nexport type ModelFromZendesk = string;\n\n/**\n * This is a model with one string property\n */\nexport type ModelWithNullableString = {\n    /**\n     * This is a simple string property\n     */\n    nullableProp1?: string | null;\n    /**\n     * This is a simple string property\n     */\n    nullableRequiredProp1: string | null;\n    /**\n     * This is a simple string property\n     */\n    nullableProp2?: string | null;\n    /**\n     * This is a simple string property\n     */\n    nullableRequiredProp2: string | null;\n    /**\n     * This is a simple enum with strings\n     */\n    'foo_bar-enum'?: 'Success' | 'Warning' | 'Error' | 'ØÆÅ字符串';\n};\n\n/**\n * This is a model with one enum\n */\nexport type ModelWithEnum = {\n    /**\n     * This is a simple enum with strings\n     */\n    'foo_bar-enum'?: 'Success' | 'Warning' | 'Error' | 'ØÆÅ字符串';\n    /**\n     * These are the HTTP error code enums\n     */\n    statusCode?: '100' | '200 FOO' | '300 FOO_BAR' | '400 foo-bar' | '500 foo.bar' | '600 foo&bar';\n    /**\n     * Simple boolean enum\n     */\n    bool?: true;\n};\n\n/**\n * This is a model with one enum with escaped name\n */\nexport type ModelWithEnumWithHyphen = {\n    /**\n     * Foo-Bar-Baz-Qux\n     */\n    'foo-bar-baz-qux'?: '3.0';\n};\n\n/**\n * This is a model with one enum\n */\nexport type ModelWithEnumFromDescription = {\n    /**\n     * Success=1,Warning=2,Error=3\n     */\n    test?: number;\n};\n\n/**\n * This is a model with nested enums\n */\nexport type ModelWithNestedEnums = {\n    dictionaryWithEnum?: {\n        [key: string]: 'Success' | 'Warning' | 'Error';\n    };\n    dictionaryWithEnumFromDescription?: {\n        [key: string]: number;\n    };\n    arrayWithEnum?: Array<'Success' | 'Warning' | 'Error'>;\n    arrayWithDescription?: Array<number>;\n    /**\n     * This is a simple enum with strings\n     */\n    'foo_bar-enum'?: 'Success' | 'Warning' | 'Error' | 'ØÆÅ字符串';\n};\n\n/**\n * This is a model with one property containing a reference\n */\nexport type ModelWithReference = {\n    prop?: ModelWithProperties;\n};\n\n/**\n * This is a model with one property containing an array\n */\nexport type ModelWithArrayReadOnlyAndWriteOnly = {\n    prop?: Array<ModelWithReadOnlyAndWriteOnly>;\n    propWithFile?: Array<Blob | File>;\n    propWithNumber?: Array<number>;\n};\n\n/**\n * This is a model with one property containing an array\n */\nexport type ModelWithArray = {\n    prop?: Array<ModelWithString>;\n    propWithFile?: Array<Blob | File>;\n    propWithNumber?: Array<number>;\n};\n\n/**\n * This is a model with one property containing a dictionary\n */\nexport type ModelWithDictionary = {\n    prop?: {\n        [key: string]: string;\n    };\n};\n\n/**\n * This is a deprecated model with a deprecated property\n *\n * @deprecated\n */\nexport type DeprecatedModel = {\n    /**\n     * This is a deprecated property\n     *\n     * @deprecated\n     */\n    prop?: string;\n};\n\n/**\n * This is a model with one property containing a circular reference\n */\nexport type ModelWithCircularReference = {\n    prop?: ModelWithCircularReference;\n};\n\n/**\n * This is a model with one property with a 'one of' relationship\n */\nexport type CompositionWithOneOf = {\n    propA?: ModelWithString | ModelWithEnum | ModelWithArray | ModelWithDictionary;\n};\n\n/**\n * This is a model with one property with a 'one of' relationship where the options are not $ref\n */\nexport type CompositionWithOneOfAnonymous = {\n    propA?: {\n        propA?: string;\n    } | string | number;\n};\n\n/**\n * Circle\n */\nexport type ModelCircle = {\n    kind: string;\n    radius?: number;\n};\n\n/**\n * Square\n */\nexport type ModelSquare = {\n    kind: string;\n    sideLength?: number;\n};\n\n/**\n * This is a model with one property with a 'one of' relationship where the options are not $ref\n */\nexport type CompositionWithOneOfDiscriminator = ({\n    kind: 'circle';\n} & ModelCircle) | ({\n    kind: 'square';\n} & ModelSquare);\n\n/**\n * This is a model with one property with a 'any of' relationship\n */\nexport type CompositionWithAnyOf = {\n    propA?: ModelWithString | ModelWithEnum | ModelWithArray | ModelWithDictionary;\n};\n\n/**\n * This is a model with one property with a 'any of' relationship where the options are not $ref\n */\nexport type CompositionWithAnyOfAnonymous = {\n    propA?: {\n        propA?: string;\n    } | string | number;\n};\n\n/**\n * This is a model with nested 'any of' property with a type null\n */\nexport type CompositionWithNestedAnyAndTypeNull = {\n    propA?: Array<ModelWithDictionary | null> | Array<ModelWithArray | null>;\n};\n\nexport type _3eNum1Период = 'Bird' | 'Dog';\n\nexport type ConstValue = 'ConstValue';\n\n/**\n * This is a model with one property with a 'any of' relationship where the options are not $ref\n */\nexport type CompositionWithNestedAnyOfAndNull = {\n    /**\n     * Scopes\n     */\n    propA?: Array<_3eNum1Период | ConstValue> | null;\n};\n\n/**\n * This is a model with one property with a 'one of' relationship\n */\nexport type CompositionWithOneOfAndNullable = {\n    propA?: {\n        boolean?: boolean;\n    } | ModelWithEnum | ModelWithArray | ModelWithDictionary | null;\n};\n\n/**\n * This is a model that contains a simple dictionary within composition\n */\nexport type CompositionWithOneOfAndSimpleDictionary = {\n    propA?: boolean | {\n        [key: string]: number;\n    };\n};\n\n/**\n * This is a model that contains a dictionary of simple arrays within composition\n */\nexport type CompositionWithOneOfAndSimpleArrayDictionary = {\n    propA?: boolean | {\n        [key: string]: Array<boolean>;\n    };\n};\n\n/**\n * This is a model that contains a dictionary of complex arrays (composited) within composition\n */\nexport type CompositionWithOneOfAndComplexArrayDictionary = {\n    propA?: boolean | {\n        [key: string]: Array<number | string>;\n    };\n};\n\n/**\n * This is a model with one property with a 'all of' relationship\n */\nexport type CompositionWithAllOfAndNullable = {\n    propA?: ({\n        boolean?: boolean;\n    } & ModelWithEnum & ModelWithArray & ModelWithDictionary) | null;\n};\n\n/**\n * This is a model with one property with a 'any of' relationship\n */\nexport type CompositionWithAnyOfAndNullable = {\n    propA?: {\n        boolean?: boolean;\n    } | ModelWithEnum | ModelWithArray | ModelWithDictionary | null;\n};\n\n/**\n * This is a base model with two simple optional properties\n */\nexport type CompositionBaseModel = {\n    firstName?: string;\n    lastname?: string;\n};\n\n/**\n * This is a model that extends the base model\n */\nexport type CompositionExtendedModel = CompositionBaseModel & {\n    age: number;\n    firstName: string;\n    lastname: string;\n};\n\n/**\n * This is a model with one nested property\n */\nexport type ModelWithProperties = {\n    required: string;\n    readonly requiredAndReadOnly: string;\n    requiredAndNullable: string | null;\n    string?: string;\n    number?: number;\n    boolean?: boolean;\n    reference?: ModelWithString;\n    'property with space'?: string;\n    default?: string;\n    try?: string;\n    readonly '@namespace.string'?: string;\n    readonly '@namespace.integer'?: number;\n};\n\n/**\n * This is a model with one nested property\n */\nexport type ModelWithNestedProperties = {\n    readonly first: {\n        readonly second: {\n            readonly third: string | null;\n        } | null;\n    } | null;\n};\n\n/**\n * This is a model with duplicated properties\n */\nexport type ModelWithDuplicateProperties = {\n    prop?: ModelWithString;\n};\n\n/**\n * This is a model with ordered properties\n */\nexport type ModelWithOrderedProperties = {\n    zebra?: string;\n    apple?: string;\n    hawaii?: string;\n};\n\n/**\n * This is a model with duplicated imports\n */\nexport type ModelWithDuplicateImports = {\n    propA?: ModelWithString;\n    propB?: ModelWithString;\n    propC?: ModelWithString;\n};\n\n/**\n * This is a model that extends another model\n */\nexport type ModelThatExtends = ModelWithString & {\n    propExtendsA?: string;\n    propExtendsB?: ModelWithString;\n};\n\n/**\n * This is a model that extends another model\n */\nexport type ModelThatExtendsExtends = ModelWithString & ModelThatExtends & {\n    propExtendsC?: string;\n    propExtendsD?: ModelWithString;\n};\n\n/**\n * This is a model that contains a some patterns\n */\nexport type ModelWithPattern = {\n    key: string;\n    name: string;\n    readonly enabled?: boolean;\n    readonly modified?: string;\n    id?: string;\n    text?: string;\n    patternWithSingleQuotes?: string;\n    patternWithNewline?: string;\n    patternWithBacktick?: string;\n    patternWithUnicode?: string;\n};\n\nexport type File = {\n    /**\n     * Id\n     */\n    readonly id?: string;\n    /**\n     * Updated at\n     */\n    readonly updated_at?: string;\n    /**\n     * Created at\n     */\n    readonly created_at?: string;\n    /**\n     * Mime\n     */\n    mime: string;\n    /**\n     * File\n     */\n    readonly file?: string;\n};\n\nexport type Default = {\n    name?: string;\n};\n\nexport type Pageable = {\n    page?: number;\n    size?: number;\n    sort?: Array<string>;\n};\n\n/**\n * This is a free-form object without additionalProperties.\n */\nexport type FreeFormObjectWithoutAdditionalProperties = {\n    [key: string]: unknown;\n};\n\n/**\n * This is a free-form object with additionalProperties: true.\n */\nexport type FreeFormObjectWithAdditionalPropertiesEqTrue = {\n    [key: string]: unknown;\n};\n\n/**\n * This is a free-form object with additionalProperties: {}.\n */\nexport type FreeFormObjectWithAdditionalPropertiesEqEmptyObject = {\n    [key: string]: unknown;\n};\n\nexport type ModelWithConst = {\n    String?: 'String';\n    number?: 0;\n    null?: null;\n    withType?: 'Some string';\n};\n\n/**\n * This is a model with one property and additionalProperties: true\n */\nexport type ModelWithAdditionalPropertiesEqTrue = {\n    /**\n     * This is a simple string property\n     */\n    prop?: string;\n    [key: string]: unknown;\n};\n\nexport type NestedAnyOfArraysNullable = {\n    nullableArray?: Array<string | boolean> | null;\n};\n\nexport type CompositionWithOneOfAndProperties = ({\n    foo: SimpleParameter;\n} | {\n    bar: NonAsciiStringæøåÆøÅöôêÊ字符串;\n}) & {\n    baz: number | null;\n    qux: number;\n};\n\n/**\n * An object that can be null\n */\nexport type NullableObject = {\n    foo?: string;\n} | null;\n\n/**\n * Some % character\n */\nexport type CharactersInDescription = string;\n\nexport type ModelWithNullableObject = {\n    data?: NullableObject;\n};\n\n/**\n * An object with additional properties that can be null (anyOf ref + null)\n */\nexport type ModelWithAdditionalPropertiesRef = {\n    [key: string]: NullableObject | null;\n};\n\nexport type ModelWithOneOfEnum = {\n    foo: 'Bar';\n} | {\n    foo: 'Baz';\n} | {\n    foo: 'Qux';\n} | {\n    content: string;\n    foo: 'Quux';\n} | {\n    content: [\n        string,\n        string\n    ];\n    foo: 'Corge';\n};\n\nexport type ModelWithNestedArrayEnumsDataFoo = 'foo' | 'bar';\n\nexport type ModelWithNestedArrayEnumsDataBar = 'baz' | 'qux';\n\nexport type ModelWithNestedArrayEnumsData = {\n    foo?: Array<ModelWithNestedArrayEnumsDataFoo>;\n    bar?: Array<ModelWithNestedArrayEnumsDataBar>;\n};\n\nexport type ModelWithNestedArrayEnums = {\n    array_strings?: Array<string>;\n    data?: ModelWithNestedArrayEnumsData;\n};\n\nexport type ModelWithNestedCompositionEnums = {\n    foo?: ModelWithNestedArrayEnumsDataFoo;\n};\n\nexport type ModelWithReadOnlyAndWriteOnly = {\n    foo: string;\n    readonly bar: string;\n};\n\nexport type ModelWithConstantSizeArray = [\n    number,\n    number\n];\n\nexport type ModelWithAnyOfConstantSizeArray = [\n    number | string,\n    number | string,\n    number | string\n];\n\nexport type ModelWithPrefixItemsConstantSizeArray = [\n    ModelWithInteger,\n    number | string,\n    string\n];\n\nexport type ModelWithAnyOfConstantSizeArrayNullable = [\n    number | null | string,\n    number | null | string,\n    number | null | string\n];\n\nexport type ModelWithAnyOfConstantSizeArrayWithNSizeAndOptions = [\n    number | Import,\n    number | Import\n];\n\nexport type ModelWithAnyOfConstantSizeArrayAndIntersect = [\n    number & string,\n    number & string\n];\n\nexport type ModelWithNumericEnumUnion = {\n    /**\n     * Период\n     */\n    value?: -10 | -1 | 0 | 1 | 3 | 6 | 12;\n};\n\n/**\n * Some description with `back ticks`\n */\nexport type ModelWithBackticksInDescription = {\n    /**\n     * The template `that` should be used for parsing and importing the contents of the CSV file.\n     *\n     * <br/><p>There is one placeholder currently supported:<ul>     <li><b>${x}</b> - refers to the n-th column in the CSV file, e.g. ${1}, ${2}, ...)</li></ul><p>Example of a correct JSON template:</p>\n     * <pre>\n     * [\n     * {\n     * \"resourceType\": \"Asset\",\n     * \"identifier\": {\n     * \"name\": \"${1}\",\n     * \"domain\": {\n     * \"name\": \"${2}\",\n     * \"community\": {\n     * \"name\": \"Some Community\"\n     * }\n     * }\n     * },\n     * \"attributes\" : {\n     * \"00000000-0000-0000-0000-000000003115\" : [ {\n     * \"value\" : \"${3}\"\n     * } ],\n     * \"00000000-0000-0000-0000-000000000222\" : [ {\n     * \"value\" : \"${4}\"\n     * } ]\n     * }\n     * }\n     * ]\n     * </pre>\n     */\n    template?: string;\n};\n\nexport type ModelWithOneOfAndProperties = (SimpleParameter | NonAsciiStringæøåÆøÅöôêÊ字符串) & {\n    baz: number | null;\n    qux: number;\n};\n\n/**\n * Model used to test deduplication strategy (unused)\n */\nexport type ParameterSimpleParameterUnused = string;\n\n/**\n * Model used to test deduplication strategy\n */\nexport type PostServiceWithEmptyTagResponse = string;\n\n/**\n * Model used to test deduplication strategy\n */\nexport type PostServiceWithEmptyTagResponse2 = string;\n\n/**\n * Model used to test deduplication strategy\n */\nexport type DeleteFooData = string;\n\n/**\n * Model used to test deduplication strategy\n */\nexport type DeleteFooData2 = string;\n\n/**\n * Model with restricted keyword name\n */\nexport type Import = string;\n\nexport type SchemaWithFormRestrictedKeys = {\n    description?: string;\n    'x-enum-descriptions'?: string;\n    'x-enum-varnames'?: string;\n    'x-enumNames'?: string;\n    title?: string;\n    object?: {\n        description?: string;\n        'x-enum-descriptions'?: string;\n        'x-enum-varnames'?: string;\n        'x-enumNames'?: string;\n        title?: string;\n    };\n    array?: Array<{\n        description?: string;\n        'x-enum-descriptions'?: string;\n        'x-enum-varnames'?: string;\n        'x-enumNames'?: string;\n        title?: string;\n    }>;\n};\n\n/**\n * This schema was giving PascalCase transformations a hard time\n */\nexport type IoK8sApimachineryPkgApisMetaV1DeleteOptions = {\n    /**\n     * Must be fulfilled before a deletion is carried out. If not possible, a 409 Conflict status will be returned.\n     */\n    preconditions?: IoK8sApimachineryPkgApisMetaV1Preconditions;\n};\n\n/**\n * This schema was giving PascalCase transformations a hard time\n */\nexport type IoK8sApimachineryPkgApisMetaV1Preconditions = {\n    /**\n     * Specifies the target ResourceVersion\n     */\n    resourceVersion?: string;\n    /**\n     * Specifies the target UID.\n     */\n    uid?: string;\n};\n\nexport type AdditionalPropertiesUnknownIssue = {\n    [key: string]: string | number;\n};\n\nexport type AdditionalPropertiesUnknownIssue2 = {\n    [key: string]: string | number;\n};\n\nexport type AdditionalPropertiesUnknownIssue3 = string & {\n    entries: {\n        [key: string]: AdditionalPropertiesUnknownIssue;\n    };\n};\n\nexport type AdditionalPropertiesIntegerIssue = {\n    value: number;\n    [key: string]: number;\n};\n\nexport type OneOfAllOfIssue = ((ConstValue | GenericSchemaDuplicateIssue1SystemBoolean) & _3eNum1Период) | GenericSchemaDuplicateIssue1SystemString;\n\nexport type GenericSchemaDuplicateIssue1SystemBoolean = {\n    item?: boolean;\n    error?: string | null;\n    readonly hasError?: boolean;\n    data?: {\n        [key: string]: never;\n    };\n};\n\nexport type GenericSchemaDuplicateIssue1SystemString = {\n    item?: string | null;\n    error?: string | null;\n    readonly hasError?: boolean;\n};\n\nexport type ExternalSharedModel = {\n    id: string;\n    name?: string;\n};\n\n/**\n * This is a model with one property containing a reference\n */\nexport type ModelWithReferenceWritable = {\n    prop?: ModelWithPropertiesWritable;\n};\n\n/**\n * This is a model with one property containing an array\n */\nexport type ModelWithArrayReadOnlyAndWriteOnlyWritable = {\n    prop?: Array<ModelWithReadOnlyAndWriteOnlyWritable>;\n    propWithFile?: Array<Blob | File>;\n    propWithNumber?: Array<number>;\n};\n\n/**\n * This is a model with one nested property\n */\nexport type ModelWithPropertiesWritable = {\n    required: string;\n    requiredAndNullable: string | null;\n    string?: string;\n    number?: number;\n    boolean?: boolean;\n    reference?: ModelWithString;\n    'property with space'?: string;\n    default?: string;\n    try?: string;\n};\n\n/**\n * This is a model that contains a some patterns\n */\nexport type ModelWithPatternWritable = {\n    key: string;\n    name: string;\n    id?: string;\n    text?: string;\n    patternWithSingleQuotes?: string;\n    patternWithNewline?: string;\n    patternWithBacktick?: string;\n    patternWithUnicode?: string;\n};\n\nexport type FileWritable = {\n    /**\n     * Mime\n     */\n    mime: string;\n};\n\nexport type ModelWithReadOnlyAndWriteOnlyWritable = {\n    foo: string;\n    baz: string;\n};\n\nexport type ModelWithAnyOfConstantSizeArrayWithNSizeAndOptionsWritable = [\n    number | Import,\n    number | Import\n];\n\nexport type AdditionalPropertiesUnknownIssueWritable = {\n    [key: string]: string | number;\n};\n\nexport type OneOfAllOfIssueWritable = ((ConstValue | GenericSchemaDuplicateIssue1SystemBoolean) & _3eNum1Период) | GenericSchemaDuplicateIssue1SystemString;\n\nexport type GenericSchemaDuplicateIssue1SystemBooleanWritable = {\n    item?: boolean;\n    error?: string | null;\n    data?: {\n        [key: string]: never;\n    };\n};\n\nexport type GenericSchemaDuplicateIssue1SystemStringWritable = {\n    item?: string | null;\n    error?: string | null;\n};\n\n/**\n * This is a reusable parameter\n */\nexport type SimpleParameter = string;\n\n/**\n * Parameter with illegal characters\n */\nexport type XFooBar = ModelWithString;\n\n/**\n * A reusable request body\n */\nexport type SimpleRequestBody = ModelWithString;\n\n/**\n * A reusable request body\n */\nexport type SimpleFormData = ModelWithString;\n\nexport type ExportData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no+tag';\n};\n\nexport type PatchApiVbyApiVersionNoTagData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no+tag';\n};\n\nexport type PatchApiVbyApiVersionNoTagResponses = {\n    /**\n     * OK\n     */\n    default: unknown;\n};\n\nexport type ImportData = {\n    body: ModelWithReadOnlyAndWriteOnlyWritable | ModelWithArrayReadOnlyAndWriteOnlyWritable;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no+tag';\n};\n\nexport type ImportResponses = {\n    /**\n     * Success\n     */\n    200: ModelFromZendesk;\n    /**\n     * Default success response\n     */\n    default: ModelWithReadOnlyAndWriteOnly;\n};\n\nexport type ImportResponse = ImportResponses[keyof ImportResponses];\n\nexport type FooWowData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no+tag';\n};\n\nexport type FooWowResponses = {\n    /**\n     * OK\n     */\n    default: unknown;\n};\n\nexport type ApiVVersionODataControllerCountData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple/$count';\n};\n\nexport type ApiVVersionODataControllerCountResponses = {\n    /**\n     * Success\n     */\n    200: ModelFromZendesk;\n};\n\nexport type ApiVVersionODataControllerCountResponse = ApiVVersionODataControllerCountResponses[keyof ApiVVersionODataControllerCountResponses];\n\nexport type GetApiVbyApiVersionSimpleOperationData = {\n    body?: never;\n    path: {\n        /**\n         * foo in method\n         */\n        foo_param: string;\n    };\n    query?: never;\n    url: '/api/v{api-version}/simple:operation';\n};\n\nexport type GetApiVbyApiVersionSimpleOperationErrors = {\n    /**\n     * Default error response\n     */\n    default: ModelWithBoolean;\n};\n\nexport type GetApiVbyApiVersionSimpleOperationError = GetApiVbyApiVersionSimpleOperationErrors[keyof GetApiVbyApiVersionSimpleOperationErrors];\n\nexport type GetApiVbyApiVersionSimpleOperationResponses = {\n    /**\n     * Response is a simple number\n     */\n    200: number;\n};\n\nexport type GetApiVbyApiVersionSimpleOperationResponse = GetApiVbyApiVersionSimpleOperationResponses[keyof GetApiVbyApiVersionSimpleOperationResponses];\n\nexport type DeleteCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type GetCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type HeadCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type OptionsCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type PatchCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type PostCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type PutCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type DeleteFooData3 = {\n    body?: never;\n    headers: {\n        /**\n         * Parameter with illegal characters\n         */\n        'x-Foo-Bar': ModelWithString;\n    };\n    path: {\n        /**\n         * foo in method\n         */\n        foo_param: string;\n        /**\n         * bar in method\n         */\n        BarParam: string;\n    };\n    query?: never;\n    url: '/api/v{api-version}/foo/{foo_param}/bar/{BarParam}';\n};\n\nexport type CallWithDescriptionsData = {\n    body?: never;\n    path?: never;\n    query?: {\n        /**\n         * Testing multiline comments in string: First line\n         * Second line\n         *\n         * Fourth line\n         */\n        parameterWithBreaks?: string;\n        /**\n         * Testing backticks in string: `backticks` and ```multiple backticks``` should work\n         */\n        parameterWithBackticks?: string;\n        /**\n         * Testing slashes in string: \\backwards\\\\\\ and /forwards/// should work\n         */\n        parameterWithSlashes?: string;\n        /**\n         * Testing expression placeholders in string: ${expression} should work\n         */\n        parameterWithExpressionPlaceholders?: string;\n        /**\n         * Testing quotes in string: 'single quote''' and \"double quotes\"\"\" should work\n         */\n        parameterWithQuotes?: string;\n        /**\n         * Testing reserved characters in string: * inline * and ** inline ** should work\n         */\n        parameterWithReservedCharacters?: string;\n    };\n    url: '/api/v{api-version}/descriptions';\n};\n\nexport type DeprecatedCallData = {\n    body?: never;\n    headers: {\n        /**\n         * This parameter is deprecated\n         *\n         * @deprecated\n         */\n        parameter: DeprecatedModel | null;\n    };\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/parameters/deprecated';\n};\n\nexport type CallWithParametersData = {\n    /**\n     * This is the parameter that goes into the body\n     */\n    body: {\n        [key: string]: unknown;\n    } | null;\n    headers: {\n        /**\n         * This is the parameter that goes into the header\n         */\n        parameterHeader: string | null;\n    };\n    path: {\n        /**\n         * This is the parameter that goes into the path\n         */\n        parameterPath: string | null;\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string | null;\n    };\n    query: {\n        foo_ref_enum?: ModelWithNestedArrayEnumsDataFoo;\n        foo_all_of_enum: ModelWithNestedArrayEnumsDataFoo;\n        /**\n         * This is the parameter that goes into the query params\n         */\n        cursor: string | null;\n    };\n    url: '/api/v{api-version}/parameters/{parameterPath}';\n};\n\nexport type CallWithWeirdParameterNamesData = {\n    /**\n     * This is the parameter that goes into the body\n     */\n    body: ModelWithString | null;\n    headers: {\n        /**\n         * This is the parameter that goes into the request header\n         */\n        'parameter.header': string | null;\n    };\n    path: {\n        /**\n         * This is the parameter that goes into the path\n         */\n        'parameter.path.1'?: string;\n        /**\n         * This is the parameter that goes into the path\n         */\n        'parameter-path-2'?: string;\n        /**\n         * This is the parameter that goes into the path\n         */\n        'PARAMETER-PATH-3'?: string;\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string | null;\n    };\n    query: {\n        /**\n         * This is the parameter with a reserved keyword\n         */\n        default?: string;\n        /**\n         * This is the parameter that goes into the request query params\n         */\n        'parameter-query': string | null;\n    };\n    url: '/api/v{api-version}/parameters/{parameter.path.1}/{parameter-path-2}/{PARAMETER-PATH-3}';\n};\n\nexport type GetCallWithOptionalParamData = {\n    /**\n     * This is a required parameter\n     */\n    body: ModelWithOneOfEnum;\n    path?: never;\n    query?: {\n        /**\n         * This is an optional parameter\n         */\n        page?: number;\n    };\n    url: '/api/v{api-version}/parameters';\n};\n\nexport type PostCallWithOptionalParamData = {\n    /**\n     * This is an optional parameter\n     */\n    body?: {\n        offset?: number | null;\n    };\n    path?: never;\n    query: {\n        /**\n         * This is a required parameter\n         */\n        parameter: Pageable;\n    };\n    url: '/api/v{api-version}/parameters';\n};\n\nexport type PostCallWithOptionalParamResponses = {\n    /**\n     * Response is a simple number\n     */\n    200: number;\n    /**\n     * Success\n     */\n    204: void;\n};\n\nexport type PostCallWithOptionalParamResponse = PostCallWithOptionalParamResponses[keyof PostCallWithOptionalParamResponses];\n\nexport type PostApiVbyApiVersionRequestBodyData = {\n    /**\n     * A reusable request body\n     */\n    body?: SimpleRequestBody;\n    path?: never;\n    query?: {\n        /**\n         * This is a reusable parameter\n         */\n        parameter?: string;\n    };\n    url: '/api/v{api-version}/requestBody';\n};\n\nexport type PostApiVbyApiVersionFormDataData = {\n    /**\n     * A reusable request body\n     */\n    body?: SimpleFormData;\n    path?: never;\n    query?: {\n        /**\n         * This is a reusable parameter\n         */\n        parameter?: string;\n    };\n    url: '/api/v{api-version}/formData';\n};\n\nexport type CallWithDefaultParametersData = {\n    body?: never;\n    path?: never;\n    query?: {\n        /**\n         * This is a simple string with default value\n         */\n        parameterString?: string | null;\n        /**\n         * This is a simple number with default value\n         */\n        parameterNumber?: number | null;\n        /**\n         * This is a simple boolean with default value\n         */\n        parameterBoolean?: boolean | null;\n        /**\n         * This is a simple enum with default value\n         */\n        parameterEnum?: 'Success' | 'Warning' | 'Error';\n        /**\n         * This is a simple model with default value\n         */\n        parameterModel?: ModelWithString | null;\n    };\n    url: '/api/v{api-version}/defaults';\n};\n\nexport type CallWithDefaultOptionalParametersData = {\n    body?: never;\n    path?: never;\n    query?: {\n        /**\n         * This is a simple string that is optional with default value\n         */\n        parameterString?: string;\n        /**\n         * This is a simple number that is optional with default value\n         */\n        parameterNumber?: number;\n        /**\n         * This is a simple boolean that is optional with default value\n         */\n        parameterBoolean?: boolean;\n        /**\n         * This is a simple enum that is optional with default value\n         */\n        parameterEnum?: 'Success' | 'Warning' | 'Error';\n        /**\n         * This is a simple model that is optional with default value\n         */\n        parameterModel?: ModelWithString;\n    };\n    url: '/api/v{api-version}/defaults';\n};\n\nexport type CallToTestOrderOfParamsData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * This is a optional string with default\n         */\n        parameterOptionalStringWithDefault?: string;\n        /**\n         * This is a optional string with empty default\n         */\n        parameterOptionalStringWithEmptyDefault?: string;\n        /**\n         * This is a optional string with no default\n         */\n        parameterOptionalStringWithNoDefault?: string;\n        /**\n         * This is a string with default\n         */\n        parameterStringWithDefault: string;\n        /**\n         * This is a string with empty default\n         */\n        parameterStringWithEmptyDefault: string;\n        /**\n         * This is a string with no default\n         */\n        parameterStringWithNoDefault: string;\n        /**\n         * This is a string that can be null with no default\n         */\n        parameterStringNullableWithNoDefault?: string | null;\n        /**\n         * This is a string that can be null with default\n         */\n        parameterStringNullableWithDefault?: string | null;\n    };\n    url: '/api/v{api-version}/defaults';\n};\n\nexport type DuplicateNameData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/duplicate';\n};\n\nexport type DuplicateName2Data = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/duplicate';\n};\n\nexport type DuplicateName3Data = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/duplicate';\n};\n\nexport type DuplicateName4Data = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/duplicate';\n};\n\nexport type CallWithNoContentResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no-content';\n};\n\nexport type CallWithNoContentResponseResponses = {\n    /**\n     * Success\n     */\n    204: void;\n};\n\nexport type CallWithNoContentResponseResponse = CallWithNoContentResponseResponses[keyof CallWithNoContentResponseResponses];\n\nexport type CallWithResponseAndNoContentResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multiple-tags/response-and-no-content';\n};\n\nexport type CallWithResponseAndNoContentResponseResponses = {\n    /**\n     * Response is a simple number\n     */\n    200: number;\n    /**\n     * Success\n     */\n    204: void;\n};\n\nexport type CallWithResponseAndNoContentResponseResponse = CallWithResponseAndNoContentResponseResponses[keyof CallWithResponseAndNoContentResponseResponses];\n\nexport type DummyAData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multiple-tags/a';\n};\n\nexport type DummyAResponses = {\n    200: _400;\n};\n\nexport type DummyAResponse = DummyAResponses[keyof DummyAResponses];\n\nexport type DummyBData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multiple-tags/b';\n};\n\nexport type DummyBResponses = {\n    /**\n     * Success\n     */\n    204: void;\n};\n\nexport type DummyBResponse = DummyBResponses[keyof DummyBResponses];\n\nexport type CallWithResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/response';\n};\n\nexport type CallWithResponseResponses = {\n    default: Import;\n};\n\nexport type CallWithResponseResponse = CallWithResponseResponses[keyof CallWithResponseResponses];\n\nexport type CallWithDuplicateResponsesData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/response';\n};\n\nexport type CallWithDuplicateResponsesErrors = {\n    /**\n     * Message for 500 error\n     */\n    500: ModelWithStringError;\n    /**\n     * Message for 501 error\n     */\n    501: ModelWithStringError;\n    /**\n     * Message for 502 error\n     */\n    502: ModelWithStringError;\n    /**\n     * Message for 4XX errors\n     */\n    '4XX': DictionaryWithArray;\n    /**\n     * Default error response\n     */\n    default: ModelWithBoolean;\n};\n\nexport type CallWithDuplicateResponsesError = CallWithDuplicateResponsesErrors[keyof CallWithDuplicateResponsesErrors];\n\nexport type CallWithDuplicateResponsesResponses = {\n    /**\n     * Message for 200 response\n     */\n    200: ModelWithBoolean & ModelWithInteger;\n    /**\n     * Message for 201 response\n     */\n    201: ModelWithString;\n    /**\n     * Message for 202 response\n     */\n    202: ModelWithString;\n};\n\nexport type CallWithDuplicateResponsesResponse = CallWithDuplicateResponsesResponses[keyof CallWithDuplicateResponsesResponses];\n\nexport type CallWithResponsesData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/response';\n};\n\nexport type CallWithResponsesErrors = {\n    /**\n     * Message for 500 error\n     */\n    500: ModelWithStringError;\n    /**\n     * Message for 501 error\n     */\n    501: ModelWithStringError;\n    /**\n     * Message for 502 error\n     */\n    502: ModelWithStringError;\n    /**\n     * Message for default response\n     */\n    default: ModelWithStringError;\n};\n\nexport type CallWithResponsesError = CallWithResponsesErrors[keyof CallWithResponsesErrors];\n\nexport type CallWithResponsesResponses = {\n    /**\n     * Message for 200 response\n     */\n    200: {\n        readonly '@namespace.string'?: string;\n        readonly '@namespace.integer'?: number;\n        readonly value?: Array<ModelWithString>;\n    };\n    /**\n     * Message for 201 response\n     */\n    201: ModelThatExtends;\n    /**\n     * Message for 202 response\n     */\n    202: ModelThatExtendsExtends;\n};\n\nexport type CallWithResponsesResponse = CallWithResponsesResponses[keyof CallWithResponsesResponses];\n\nexport type CollectionFormatData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * This is an array parameter that is sent as csv format (comma-separated values)\n         */\n        parameterArrayCSV: Array<string> | null;\n        /**\n         * This is an array parameter that is sent as ssv format (space-separated values)\n         */\n        parameterArraySSV: Array<string> | null;\n        /**\n         * This is an array parameter that is sent as tsv format (tab-separated values)\n         */\n        parameterArrayTSV: Array<string> | null;\n        /**\n         * This is an array parameter that is sent as pipes format (pipe-separated values)\n         */\n        parameterArrayPipes: Array<string> | null;\n        /**\n         * This is an array parameter that is sent as multi format (multiple parameter instances)\n         */\n        parameterArrayMulti: Array<string> | null;\n    };\n    url: '/api/v{api-version}/collectionFormat';\n};\n\nexport type TypesData = {\n    body?: never;\n    path?: {\n        /**\n         * This is a number parameter\n         */\n        id?: number;\n    };\n    query: {\n        /**\n         * This is a number parameter\n         */\n        parameterNumber: number;\n        /**\n         * This is a string parameter\n         */\n        parameterString: string | null;\n        /**\n         * This is a boolean parameter\n         */\n        parameterBoolean: boolean | null;\n        /**\n         * This is an object parameter\n         */\n        parameterObject: {\n            [key: string]: unknown;\n        } | null;\n        /**\n         * This is an array parameter\n         */\n        parameterArray: Array<string> | null;\n        /**\n         * This is a dictionary parameter\n         */\n        parameterDictionary: {\n            [key: string]: unknown;\n        } | null;\n        /**\n         * This is an enum parameter\n         */\n        parameterEnum: 'Success' | 'Warning' | 'Error' | null;\n    };\n    url: '/api/v{api-version}/types';\n};\n\nexport type TypesResponses = {\n    /**\n     * Response is a simple number\n     */\n    200: number;\n    /**\n     * Response is a simple string\n     */\n    201: string;\n    /**\n     * Response is a simple boolean\n     */\n    202: boolean;\n    /**\n     * Response is a simple object\n     */\n    203: {\n        [key: string]: unknown;\n    };\n};\n\nexport type TypesResponse = TypesResponses[keyof TypesResponses];\n\nexport type UploadFileData = {\n    body: Blob | File;\n    path: {\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string | null;\n    };\n    query?: never;\n    url: '/api/v{api-version}/upload';\n};\n\nexport type UploadFileResponses = {\n    200: boolean;\n};\n\nexport type UploadFileResponse = UploadFileResponses[keyof UploadFileResponses];\n\nexport type FileResponseData = {\n    body?: never;\n    path: {\n        id: string;\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string;\n    };\n    query?: never;\n    url: '/api/v{api-version}/file/{id}';\n};\n\nexport type FileResponseResponses = {\n    /**\n     * Success\n     */\n    200: Blob | File;\n};\n\nexport type FileResponseResponse = FileResponseResponses[keyof FileResponseResponses];\n\nexport type ComplexTypesData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * Parameter containing object\n         */\n        parameterObject: {\n            first?: {\n                second?: {\n                    third?: string;\n                };\n            };\n        };\n        /**\n         * Parameter containing reference\n         */\n        parameterReference: ModelWithString;\n    };\n    url: '/api/v{api-version}/complex';\n};\n\nexport type ComplexTypesErrors = {\n    /**\n     * 400 `server` error\n     */\n    400: unknown;\n    /**\n     * 500 server error\n     */\n    500: unknown;\n};\n\nexport type ComplexTypesResponses = {\n    /**\n     * Successful response\n     */\n    200: Array<ModelWithString>;\n};\n\nexport type ComplexTypesResponse = ComplexTypesResponses[keyof ComplexTypesResponses];\n\nexport type MultipartResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multipart';\n};\n\nexport type MultipartResponseResponses = {\n    /**\n     * OK\n     */\n    200: {\n        file?: Blob | File;\n        metadata?: {\n            foo?: string;\n            bar?: string;\n        };\n    };\n};\n\nexport type MultipartResponseResponse = MultipartResponseResponses[keyof MultipartResponseResponses];\n\nexport type MultipartRequestData = {\n    body?: {\n        content?: Blob | File;\n        data?: ModelWithString | null;\n    };\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multipart';\n};\n\nexport type ComplexParamsData = {\n    body?: {\n        readonly key: string | null;\n        name: string | null;\n        enabled?: boolean;\n        type: 'Monkey' | 'Horse' | 'Bird';\n        listOfModels?: Array<ModelWithString> | null;\n        listOfStrings?: Array<string> | null;\n        parameters: ModelWithString | ModelWithEnum | ModelWithArray | ModelWithDictionary;\n        readonly user?: {\n            readonly id?: number;\n            readonly name?: string | null;\n        };\n    };\n    path: {\n        id: number;\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string;\n    };\n    query?: never;\n    url: '/api/v{api-version}/complex/{id}';\n};\n\nexport type ComplexParamsResponses = {\n    /**\n     * Success\n     */\n    200: ModelWithString;\n};\n\nexport type ComplexParamsResponse = ComplexParamsResponses[keyof ComplexParamsResponses];\n\nexport type CallWithResultFromHeaderData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/header';\n};\n\nexport type CallWithResultFromHeaderErrors = {\n    /**\n     * 400 server error\n     */\n    400: unknown;\n    /**\n     * 500 server error\n     */\n    500: unknown;\n};\n\nexport type CallWithResultFromHeaderResponses = {\n    /**\n     * Successful response\n     */\n    200: unknown;\n};\n\nexport type TestErrorCodeData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * Status code to return\n         */\n        status: number;\n    };\n    url: '/api/v{api-version}/error';\n};\n\nexport type TestErrorCodeErrors = {\n    /**\n     * Custom message: Internal Server Error\n     */\n    500: unknown;\n    /**\n     * Custom message: Not Implemented\n     */\n    501: unknown;\n    /**\n     * Custom message: Bad Gateway\n     */\n    502: unknown;\n    /**\n     * Custom message: Service Unavailable\n     */\n    503: unknown;\n};\n\nexport type TestErrorCodeResponses = {\n    /**\n     * Custom message: Successful response\n     */\n    200: unknown;\n};\n\nexport type NonAsciiæøåÆøÅöôêÊ字符串Data = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * Dummy input param\n         */\n        nonAsciiParamæøåÆØÅöôêÊ: number;\n    };\n    url: '/api/v{api-version}/non-ascii-æøåÆØÅöôêÊ字符串';\n};\n\nexport type NonAsciiæøåÆøÅöôêÊ字符串Responses = {\n    /**\n     * Successful response\n     */\n    200: Array<NonAsciiStringæøåÆøÅöôêÊ字符串>;\n};\n\nexport type NonAsciiæøåÆøÅöôêÊ字符串Response = NonAsciiæøåÆøÅöôêÊ字符串Responses[keyof NonAsciiæøåÆøÅöôêÊ字符串Responses];\n\nexport type PutWithFormUrlEncodedData = {\n    body: ArrayWithStrings;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/non-ascii-æøåÆØÅöôêÊ字符串';\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-ofetch/base-url-number/client/client.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport { ofetch, type ResponseType as OfetchResponseType } from 'ofetch';\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  buildOfetchOptions,\n  buildUrl,\n  createConfig,\n  createInterceptors,\n  isRepeatableBody,\n  mapParseAsToResponseType,\n  mergeConfigs,\n  mergeHeaders,\n  parseError,\n  parseSuccess,\n  setAuthParams,\n  wrapDataReturn,\n  wrapErrorReturn,\n} from './utils.gen';\n\ntype ReqInit = Omit<RequestInit, 'body' | 'headers'> & {\n  body?: BodyInit | null | undefined;\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  // precompute serialized / network body\n  const resolveOptions = async (options: RequestOptions) => {\n    const opts = {\n      ..._config,\n      ...options,\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 if body is empty to avoid invalid requests\n    if (opts.body === undefined || opts.serializedBody === '') {\n      opts.headers.delete('Content-Type');\n    }\n\n    // if a raw body is provided (no serializer), adjust Content-Type only when it\n    // equals the default JSON value to better match the concrete body type\n    if (\n      opts.body !== undefined &&\n      opts.bodySerializer === null &&\n      (opts.headers.get('Content-Type') || '').toLowerCase() === 'application/json'\n    ) {\n      const b: unknown = opts.body;\n      if (typeof FormData !== 'undefined' && b instanceof FormData) {\n        // let the runtime set the multipart boundary\n        opts.headers.delete('Content-Type');\n      } else if (typeof URLSearchParams !== 'undefined' && b instanceof URLSearchParams) {\n        // standard urlencoded content type (+ charset)\n        opts.headers.set('Content-Type', 'application/x-www-form-urlencoded;charset=UTF-8');\n      } else if (typeof Blob !== 'undefined' && b instanceof Blob) {\n        const t = b.type?.trim();\n        if (t) {\n          opts.headers.set('Content-Type', t);\n        } else {\n          // unknown blob type: avoid sending a misleading JSON header\n          opts.headers.delete('Content-Type');\n        }\n      }\n    }\n\n    // precompute network body (stability for retries and interceptors)\n    const networkBody = getValidRequestBody(opts) as RequestInit['body'] | null | undefined;\n\n    const url = buildUrl(opts);\n\n    return { networkBody, opts, url };\n  };\n\n  // apply request interceptors and mirror header/method/signal back to opts\n  const applyRequestInterceptors = async (\n    request: Request,\n    opts: ResolvedRequestOptions,\n    body: BodyInit | null | undefined,\n  ) => {\n    for (const fn of interceptors.request.fns) {\n      if (fn) {\n        request = await fn(request, opts);\n      }\n    }\n    // reflect interceptor changes into opts used by the network layer\n    opts.headers = request.headers;\n    opts.method = request.method as Uppercase<HttpMethod>;\n    // ignore request.body changes to avoid turning serialized bodies into streams\n    // body comes only from getValidRequestBody(options)\n    // reflect signal if present\n    opts.signal = (request as any).signal as AbortSignal | undefined;\n\n    // When body is FormData, remove Content-Type header to avoid boundary mismatch.\n    // Note: We already delete Content-Type in resolveOptions for FormData, but the\n    // Request constructor (line 175) re-adds it with an auto-generated boundary.\n    // Since we pass the original FormData (not the Request's body) to ofetch, and\n    // ofetch will generate its own boundary, we must remove the Request's Content-Type\n    // to let ofetch set the correct one. Otherwise the boundary in the header won't\n    // match the boundary in the actual multipart body sent by ofetch.\n    if (typeof FormData !== 'undefined' && body instanceof FormData) {\n      opts.headers.delete('Content-Type');\n    }\n\n    return request;\n  };\n\n  // build ofetch options with stable retry logic based on body repeatability\n  const buildNetworkOptions = (\n    opts: ResolvedRequestOptions,\n    body: BodyInit | null | undefined,\n    responseType: OfetchResponseType | undefined,\n  ) => {\n    const effectiveRetry = isRepeatableBody(body) ? (opts.retry as any) : (0 as any);\n    return buildOfetchOptions(opts, body, responseType, effectiveRetry);\n  };\n\n  const request: Client['request'] = async (options) => {\n    const { networkBody: initialNetworkBody, opts, url } = await resolveOptions(options as any);\n    // map parseAs -> ofetch responseType once per request\n    const ofetchResponseType: OfetchResponseType | undefined = mapParseAsToResponseType(\n      opts.parseAs,\n      opts.responseType,\n    );\n\n    const $ofetch = opts.ofetch ?? ofetch;\n\n    // create Request before network to run middleware consistently\n    const networkBody = initialNetworkBody;\n    const requestInit: ReqInit = {\n      body: networkBody,\n      headers: opts.headers as Headers,\n      method: opts.method,\n      redirect: 'follow',\n      signal: opts.signal,\n    };\n    let request = new Request(url, requestInit);\n\n    request = await applyRequestInterceptors(request, opts, networkBody);\n    const finalUrl = request.url;\n\n    // build ofetch options and perform the request (.raw keeps the Response)\n    const responseOptions = buildNetworkOptions(\n      opts as ResolvedRequestOptions,\n      networkBody,\n      ofetchResponseType,\n    );\n\n    let response = await $ofetch.raw(finalUrl, responseOptions);\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 = { request, response };\n\n    if (response.ok) {\n      const data = await parseSuccess(response, opts, ofetchResponseType);\n      return wrapDataReturn(data, result, opts.responseStyle);\n    }\n\n    let finalError = await parseError(response);\n\n    for (const fn of interceptors.error.fns) {\n      if (fn) {\n        finalError = await fn(finalError, response, request, opts);\n      }\n    }\n\n    // ensure error is never undefined after interceptors\n    finalError = (finalError as any) || ({} as string);\n\n    if (opts.throwOnError) {\n      throw finalError;\n    }\n\n    return wrapErrorReturn(finalError, result, opts.responseStyle) as any;\n  };\n\n  const makeMethodFn = (method: Uppercase<HttpMethod>) => (options: RequestOptions) =>\n    request({ ...options, method } as any);\n\n  const makeSseFn = (method: Uppercase<HttpMethod>) => async (options: RequestOptions) => {\n    const { networkBody, opts, url } = await resolveOptions(options);\n    const optsForSse: any = { ...opts };\n    delete optsForSse.body; // body is provided via serializedBody below\n    return createSseClient({\n      ...optsForSse,\n      fetch: opts.fetch,\n      headers: opts.headers as Headers,\n      method,\n      onRequest: async (url, init) => {\n        let request = new Request(url, init);\n        request = await applyRequestInterceptors(request, opts, networkBody);\n        return request;\n      },\n      serializedBody: networkBody as BodyInit | null | undefined,\n      signal: opts.signal,\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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-ofetch/base-url-number/client/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type { Auth } from '../core/auth.gen';\nexport type { QuerySerializerOptions } from '../core/bodySerializer.gen';\nexport {\n  formDataBodySerializer,\n  jsonBodySerializer,\n  urlSearchParamsBodySerializer,\n} from '../core/bodySerializer.gen';\nexport { buildClientParams } from '../core/params.gen';\nexport { serializeQueryKeyValue } from '../core/queryKeySerializer.gen';\nexport { createClient } from './client.gen';\nexport type {\n  Client,\n  ClientOptions,\n  Config,\n  CreateClientConfig,\n  Options,\n  RequestOptions,\n  RequestResult,\n  ResolvedRequestOptions,\n  ResponseStyle,\n  TDataShape,\n} from './types.gen';\nexport { createConfig, mergeHeaders } from './utils.gen';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-ofetch/base-url-number/client/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { FetchOptions as OfetchOptions, ResponseType as OfetchResponseType } from 'ofetch';\nimport type { ofetch } from 'ofetch';\n\nimport type { Auth } from '../core/auth.gen';\nimport type {\n  ServerSentEventsOptions,\n  ServerSentEventsResult,\n} from '../core/serverSentEvents.gen';\nimport type { Client as CoreClient, Config as CoreConfig } from '../core/types.gen';\nimport type { Middleware } from './utils.gen';\n\nexport type ResponseStyle = 'data' | 'fields';\n\nexport interface Config<T extends ClientOptions = ClientOptions>\n  extends Omit<RequestInit, 'body' | 'headers' | 'method'>, CoreConfig {\n  /**\n   * HTTP(S) agent configuration (Node.js only). Passed through to ofetch.\n   */\n  agent?: OfetchOptions['agent'];\n  /**\n   * Base URL for all requests made by this client.\n   */\n  baseUrl?: T['baseUrl'];\n  /**\n   * Node-only proxy/agent options.\n   */\n  dispatcher?: OfetchOptions['dispatcher'];\n  /**\n   * Fetch API implementation. Used for SSE streaming. You can use this option\n   * to provide a custom fetch instance.\n   *\n   * @default globalThis.fetch\n   */\n  fetch?: typeof fetch;\n  /**\n   * Controls the native ofetch behaviour that throws `FetchError` when\n   * `response.ok === false`. We default to suppressing it to match the fetch\n   * client semantics and let `throwOnError` drive the outcome.\n   */\n  ignoreResponseError?: OfetchOptions['ignoreResponseError'];\n  // No custom fetch option: provide custom instance via `ofetch` instead\n  /**\n   * Please don't use the Fetch client for Next.js applications. The `next`\n   * options won't have any effect.\n   *\n   * Install {@link https://www.npmjs.com/package/@hey-api/client-next `@hey-api/client-next`} instead.\n   */\n  next?: never;\n  /**\n   * Custom ofetch instance created via `ofetch.create()`. If provided, it will\n   * be used for requests instead of the default `ofetch` export.\n   */\n  ofetch?: typeof ofetch;\n  /**\n   * ofetch hook called before a request is sent.\n   */\n  onRequest?: OfetchOptions['onRequest'];\n  /**\n   * ofetch hook called when a request fails before receiving a response\n   * (e.g., network errors or aborted requests).\n   */\n  onRequestError?: OfetchOptions['onRequestError'];\n  /**\n   * ofetch hook called after a successful response is received and parsed.\n   */\n  onResponse?: OfetchOptions['onResponse'];\n  /**\n   * ofetch hook called when the response indicates an error (non-ok status)\n   * or when response parsing fails.\n   */\n  onResponseError?: OfetchOptions['onResponseError'];\n  /**\n   * Return the response data parsed in a specified format. By default, `auto`\n   * will infer the appropriate method from the `Content-Type` response header.\n   * You can override this behavior with any of the {@link Body} methods.\n   * Select `stream` if you don't want to parse response data at all.\n   *\n   * @default 'auto'\n   */\n  parseAs?: 'arrayBuffer' | 'auto' | 'blob' | 'formData' | 'json' | 'stream' | 'text';\n  /** Custom response parser (ofetch). */\n  parseResponse?: OfetchOptions['parseResponse'];\n  /**\n   * Should we return only data or multiple fields (data, error, response, etc.)?\n   *\n   * @default 'fields'\n   */\n  responseStyle?: ResponseStyle;\n  /**\n   * ofetch responseType override. If provided, it will be passed directly to\n   * ofetch and take precedence over `parseAs`.\n   */\n  responseType?: OfetchResponseType;\n  /**\n   * Automatically retry failed requests.\n   */\n  retry?: OfetchOptions['retry'];\n  /**\n   * Delay (in ms) between retry attempts.\n   */\n  retryDelay?: OfetchOptions['retryDelay'];\n  /**\n   * HTTP status codes that should trigger a retry.\n   */\n  retryStatusCodes?: OfetchOptions['retryStatusCodes'];\n  /**\n   * Throw an error instead of returning it in the response?\n   *\n   * @default false\n   */\n  throwOnError?: T['throwOnError'];\n  /**\n   * Abort the request after the given milliseconds.\n   */\n  timeout?: number;\n}\n\nexport interface RequestOptions<\n  TData = unknown,\n  TResponseStyle extends ResponseStyle = 'fields',\n  ThrowOnError extends boolean = boolean,\n  Url extends string = string,\n>\n  extends\n    Config<{\n      responseStyle: TResponseStyle;\n      throwOnError: ThrowOnError;\n    }>,\n    Pick<\n      ServerSentEventsOptions<TData>,\n      | 'onSseError'\n      | 'onSseEvent'\n      | 'sseDefaultRetryDelay'\n      | 'sseMaxRetryAttempts'\n      | 'sseMaxRetryDelay'\n    > {\n  /**\n   * Any body that you want to add to your request.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/fetch#body}\n   */\n  body?: unknown;\n  path?: Record<string, unknown>;\n  query?: Record<string, unknown>;\n  /**\n   * Security mechanism(s) to use for the request.\n   */\n  security?: ReadonlyArray<Auth>;\n  url: Url;\n}\n\nexport interface ResolvedRequestOptions<\n  TResponseStyle extends ResponseStyle = 'fields',\n  ThrowOnError extends boolean = boolean,\n  Url extends string = string,\n> extends RequestOptions<unknown, TResponseStyle, ThrowOnError, Url> {\n  serializedBody?: string;\n}\n\nexport type RequestResult<\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = boolean,\n  TResponseStyle extends ResponseStyle = 'fields',\n> = ThrowOnError extends true\n  ? Promise<\n      TResponseStyle extends 'data'\n        ? TData extends Record<string, unknown>\n          ? TData[keyof TData]\n          : TData\n        : {\n            data: TData extends Record<string, unknown> ? TData[keyof TData] : TData;\n            request: Request;\n            response: Response;\n          }\n    >\n  : Promise<\n      TResponseStyle extends 'data'\n        ? (TData extends Record<string, unknown> ? TData[keyof TData] : TData) | undefined\n        : (\n            | {\n                data: TData extends Record<string, unknown> ? TData[keyof TData] : TData;\n                error: undefined;\n              }\n            | {\n                data: undefined;\n                error: TError extends Record<string, unknown> ? TError[keyof TError] : TError;\n              }\n          ) & {\n            request: Request;\n            response: Response;\n          }\n    >;\n\nexport interface ClientOptions {\n  baseUrl?: string;\n  responseStyle?: ResponseStyle;\n  throwOnError?: boolean;\n}\n\ntype MethodFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'>,\n) => RequestResult<TData, TError, ThrowOnError, TResponseStyle>;\n\ntype SseFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'>,\n) => Promise<ServerSentEventsResult<TData, TError>>;\n\ntype RequestFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'> &\n    Pick<Required<RequestOptions<TData, TResponseStyle, ThrowOnError>>, 'method'>,\n) => RequestResult<TData, TError, ThrowOnError, TResponseStyle>;\n\ntype BuildUrlFn = <\n  TData extends {\n    body?: unknown;\n    path?: Record<string, unknown>;\n    query?: Record<string, unknown>;\n    url: string;\n  },\n>(\n  options: TData & Options<TData>,\n) => string;\n\nexport type Client = CoreClient<RequestFn, Config, MethodFn, BuildUrlFn, SseFn> & {\n  interceptors: Middleware<Request, Response, unknown, ResolvedRequestOptions>;\n};\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 = ClientOptions> = (\n  override?: Config<ClientOptions & T>,\n) => Config<Required<ClientOptions> & T>;\n\nexport interface TDataShape {\n  body?: unknown;\n  headers?: unknown;\n  path?: unknown;\n  query?: unknown;\n  url: string;\n}\n\ntype OmitKeys<T, K> = Pick<T, Exclude<keyof T, K>>;\n\nexport type Options<\n  TData extends TDataShape = TDataShape,\n  ThrowOnError extends boolean = boolean,\n  TResponse = unknown,\n  TResponseStyle extends ResponseStyle = 'fields',\n> = OmitKeys<\n  RequestOptions<TResponse, TResponseStyle, ThrowOnError>,\n  'body' | 'path' | 'query' | 'url'\n> &\n  ([TData] extends [never] ? unknown : Omit<TData, 'url'>);\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-ofetch/base-url-number/client/utils.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { FetchOptions as OfetchOptions, ResponseType as OfetchResponseType } from 'ofetch';\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 {\n  Client,\n  ClientOptions,\n  Config,\n  RequestOptions,\n  ResolvedRequestOptions,\n  ResponseStyle,\n} 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\n/**\n * Map our parseAs value to ofetch responseType when not explicitly provided.\n */\nexport const mapParseAsToResponseType = (\n  parseAs: Config['parseAs'] | undefined,\n  explicit?: OfetchResponseType,\n): OfetchResponseType | undefined => {\n  if (explicit) return explicit;\n  switch (parseAs) {\n    case 'arrayBuffer':\n    case 'blob':\n    case 'json':\n    case 'text':\n    case 'stream':\n      return parseAs;\n    case 'formData':\n    case 'auto':\n    default:\n      return undefined; // let ofetch auto-detect\n  }\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\n/**\n * Heuristic to detect whether a request body can be safely retried.\n */\nexport const isRepeatableBody = (body: unknown): boolean => {\n  if (body == null) return true; // undefined/null treated as no-body\n  if (typeof body === 'string') return true;\n  if (typeof URLSearchParams !== 'undefined' && body instanceof URLSearchParams) return true;\n  if (typeof Uint8Array !== 'undefined' && body instanceof Uint8Array) return true;\n  if (typeof ArrayBuffer !== 'undefined' && body instanceof ArrayBuffer) return true;\n  if (typeof Blob !== 'undefined' && body instanceof Blob) return true;\n  if (typeof FormData !== 'undefined' && body instanceof FormData) return true;\n  // Streams are not repeatable\n  if (typeof ReadableStream !== 'undefined' && body instanceof ReadableStream) return false;\n  // Default: assume non-repeatable for unknown structured bodies\n  return false;\n};\n\n/**\n * Small helper to unify data vs fields return style.\n */\nexport const wrapDataReturn = <T>(\n  data: T,\n  result: { request: Request; response: Response },\n  responseStyle: ResponseStyle | undefined,\n): T | ((T extends Record<string, unknown> ? { data: T } : { data: T }) & typeof result) =>\n  (responseStyle ?? 'fields') === 'data' ? (data as any) : ({ data, ...result } as any);\n\n/**\n * Small helper to unify error vs fields return style.\n */\nexport const wrapErrorReturn = <E>(\n  error: E,\n  result: { request: Request; response: Response },\n  responseStyle: ResponseStyle | undefined,\n):\n  | undefined\n  | ((E extends Record<string, unknown> ? { error: E } : { error: E }) & typeof result) =>\n  (responseStyle ?? 'fields') === 'data' ? undefined : ({ error, ...result } as any);\n\n/**\n * Build options for $ofetch.raw from our resolved opts and body.\n */\nexport const buildOfetchOptions = (\n  opts: ResolvedRequestOptions,\n  body: BodyInit | null | undefined,\n  responseType: OfetchResponseType | undefined,\n  retryOverride?: OfetchOptions['retry'],\n): OfetchOptions =>\n  ({\n    agent: opts.agent as OfetchOptions['agent'],\n    body,\n    credentials: opts.credentials as OfetchOptions['credentials'],\n    dispatcher: opts.dispatcher as OfetchOptions['dispatcher'],\n    headers: opts.headers as Headers,\n    ignoreResponseError: (opts.ignoreResponseError as OfetchOptions['ignoreResponseError']) ?? true,\n    method: opts.method,\n    onRequest: opts.onRequest as OfetchOptions['onRequest'],\n    onRequestError: opts.onRequestError as OfetchOptions['onRequestError'],\n    onResponse: opts.onResponse as OfetchOptions['onResponse'],\n    onResponseError: opts.onResponseError as OfetchOptions['onResponseError'],\n    parseResponse: opts.parseResponse as OfetchOptions['parseResponse'],\n    // URL already includes query\n    query: undefined,\n    responseType,\n    retry: retryOverride ?? (opts.retry as OfetchOptions['retry']),\n    retryDelay: opts.retryDelay as OfetchOptions['retryDelay'],\n    retryStatusCodes: opts.retryStatusCodes as OfetchOptions['retryStatusCodes'],\n    signal: opts.signal,\n    timeout: opts.timeout as number | undefined,\n  }) as OfetchOptions;\n\n/**\n * Parse a successful response, handling empty bodies and stream cases.\n */\nexport const parseSuccess = async (\n  response: Response,\n  opts: ResolvedRequestOptions,\n  ofetchResponseType?: OfetchResponseType,\n): Promise<unknown> => {\n  // Stream requested: return stream body\n  if (ofetchResponseType === 'stream') {\n    return response.body;\n  }\n\n  const inferredParseAs =\n    (opts.parseAs === 'auto' ? getParseAs(response.headers.get('Content-Type')) : opts.parseAs) ??\n    'json';\n\n  // Handle empty responses\n  if (response.status === 204 || response.headers.get('Content-Length') === '0') {\n    switch (inferredParseAs) {\n      case 'arrayBuffer':\n      case 'blob':\n      case 'text':\n        return await (response as any)[inferredParseAs]();\n      case 'formData':\n        return new FormData();\n      case 'stream':\n        return response.body;\n      default:\n        return {};\n    }\n  }\n\n  // Prefer ofetch-populated data unless we explicitly need raw `formData`\n  let data: unknown = (response as any)._data;\n  if (inferredParseAs === 'formData' || typeof data === 'undefined') {\n    switch (inferredParseAs) {\n      case 'arrayBuffer':\n      case 'blob':\n      case 'formData':\n      case 'text':\n        data = await (response as any)[inferredParseAs]();\n        break;\n      case 'json': {\n        // Some servers return 200 with no Content-Length and empty body.\n        // response.json() would throw; detect empty via clone().text() first.\n        const txt = await response.clone().text();\n        if (!txt) {\n          data = {};\n        } else {\n          data = await (response as any).json();\n        }\n        break;\n      }\n      case 'stream':\n        return response.body;\n    }\n  }\n\n  if (inferredParseAs === 'json') {\n    if (opts.responseValidator) {\n      await opts.responseValidator(data);\n    }\n    if (opts.responseTransformer) {\n      data = await opts.responseTransformer(data);\n    }\n  }\n\n  return data;\n};\n\n/**\n * Parse an error response payload.\n */\nexport const parseError = async (response: Response): Promise<unknown> => {\n  let error: unknown = (response as any)._data;\n  if (typeof error === 'undefined') {\n    const textError = await response.text();\n    try {\n      error = JSON.parse(textError);\n    } catch {\n      error = textError;\n    }\n  }\n  return error ?? ({} as string);\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  ignoreResponseError: true,\n  parseAs: 'auto',\n  querySerializer: defaultQuerySerializer,\n  ...override,\n});\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-ofetch/base-url-number/client.gen.ts",
    "content": "// 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: 'http://localhost:3000/base' }));\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-ofetch/base-url-number/core/auth.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-ofetch/base-url-number/core/bodySerializer.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-ofetch/base-url-number/core/params.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-ofetch/base-url-number/core/pathSerializer.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-ofetch/base-url-number/core/queryKeySerializer.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\n/**\n * JSON-friendly union that mirrors what Pinia Colada can hash.\n */\nexport type JsonValue =\n  | null\n  | string\n  | number\n  | boolean\n  | JsonValue[]\n  | { [key: string]: JsonValue };\n\n/**\n * Replacer that converts non-JSON values (bigint, Date, etc.) to safe substitutes.\n */\nexport const queryKeyJsonReplacer = (_key: string, value: unknown) => {\n  if (value === undefined || typeof value === 'function' || typeof value === 'symbol') {\n    return undefined;\n  }\n  if (typeof value === 'bigint') {\n    return value.toString();\n  }\n  if (value instanceof Date) {\n    return value.toISOString();\n  }\n  return value;\n};\n\n/**\n * Safely stringifies a value and parses it back into a JsonValue.\n */\nexport const stringifyToJsonValue = (input: unknown): JsonValue | undefined => {\n  try {\n    const json = JSON.stringify(input, queryKeyJsonReplacer);\n    if (json === undefined) {\n      return undefined;\n    }\n    return JSON.parse(json) as JsonValue;\n  } catch {\n    return undefined;\n  }\n};\n\n/**\n * Detects plain objects (including objects with a null prototype).\n */\nconst isPlainObject = (value: unknown): value is Record<string, unknown> => {\n  if (value === null || typeof value !== 'object') {\n    return false;\n  }\n  const prototype = Object.getPrototypeOf(value as object);\n  return prototype === Object.prototype || prototype === null;\n};\n\n/**\n * Turns URLSearchParams into a sorted JSON object for deterministic keys.\n */\nconst serializeSearchParams = (params: URLSearchParams): JsonValue => {\n  const entries = Array.from(params.entries()).sort(([a], [b]) => a.localeCompare(b));\n  const result: Record<string, JsonValue> = {};\n\n  for (const [key, value] of entries) {\n    const existing = result[key];\n    if (existing === undefined) {\n      result[key] = value;\n      continue;\n    }\n\n    if (Array.isArray(existing)) {\n      (existing as string[]).push(value);\n    } else {\n      result[key] = [existing, value];\n    }\n  }\n\n  return result;\n};\n\n/**\n * Normalizes any accepted value into a JSON-friendly shape for query keys.\n */\nexport const serializeQueryKeyValue = (value: unknown): JsonValue | undefined => {\n  if (value === null) {\n    return null;\n  }\n\n  if (typeof value === 'string' || typeof value === 'number' || typeof value === 'boolean') {\n    return value;\n  }\n\n  if (value === undefined || typeof value === 'function' || typeof value === 'symbol') {\n    return undefined;\n  }\n\n  if (typeof value === 'bigint') {\n    return value.toString();\n  }\n\n  if (value instanceof Date) {\n    return value.toISOString();\n  }\n\n  if (Array.isArray(value)) {\n    return stringifyToJsonValue(value);\n  }\n\n  if (typeof URLSearchParams !== 'undefined' && value instanceof URLSearchParams) {\n    return serializeSearchParams(value);\n  }\n\n  if (isPlainObject(value)) {\n    return stringifyToJsonValue(value);\n  }\n\n  return undefined;\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-ofetch/base-url-number/core/serverSentEvents.gen.ts",
    "content": "// 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 const 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            // Normalize line endings: CRLF -> LF, then CR -> LF\n            buffer = buffer.replace(/\\r\\n/g, '\\n').replace(/\\r/g, '\\n');\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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-ofetch/base-url-number/core/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { Auth, AuthToken } from './auth.gen';\nimport type { BodySerializer, QuerySerializer, QuerySerializerOptions } from './bodySerializer.gen';\n\nexport type HttpMethod =\n  | 'connect'\n  | 'delete'\n  | 'get'\n  | 'head'\n  | 'options'\n  | 'patch'\n  | 'post'\n  | 'put'\n  | 'trace';\n\nexport type Client<\n  RequestFn = never,\n  Config = unknown,\n  MethodFn = never,\n  BuildUrlFn = never,\n  SseFn = never,\n> = {\n  /**\n   * Returns the final request URL.\n   */\n  buildUrl: BuildUrlFn;\n  getConfig: () => Config;\n  request: RequestFn;\n  setConfig: (config: Config) => Config;\n} & {\n  [K in HttpMethod]: MethodFn;\n} & ([SseFn] extends [never] ? { sse?: never } : { sse: { [K in HttpMethod]: SseFn } });\n\nexport interface Config {\n  /**\n   * Auth token or a function returning auth token. The resolved value will be\n   * added to the request payload as defined by its `security` array.\n   */\n  auth?: ((auth: Auth) => Promise<AuthToken> | AuthToken) | AuthToken;\n  /**\n   * A function for serializing request body parameter. By default,\n   * {@link JSON.stringify()} will be used.\n   */\n  bodySerializer?: BodySerializer | null;\n  /**\n   * An object containing any HTTP headers that you want to pre-populate your\n   * `Headers` object with.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/Headers/Headers#init See more}\n   */\n  headers?:\n    | RequestInit['headers']\n    | Record<\n        string,\n        string | number | boolean | (string | number | boolean)[] | null | undefined | unknown\n      >;\n  /**\n   * The request method.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/fetch#method See more}\n   */\n  method?: Uppercase<HttpMethod>;\n  /**\n   * A function for serializing request query parameters. By default, arrays\n   * will be exploded in form style, objects will be exploded in deepObject\n   * style, and reserved characters are percent-encoded.\n   *\n   * This method will have no effect if the native `paramsSerializer()` Axios\n   * API function is used.\n   *\n   * {@link https://swagger.io/docs/specification/serialization/#query View examples}\n   */\n  querySerializer?: QuerySerializer | QuerySerializerOptions;\n  /**\n   * A function validating request data. This is useful if you want to ensure\n   * the request conforms to the desired shape, so it can be safely sent to\n   * the server.\n   */\n  requestValidator?: (data: unknown) => Promise<unknown>;\n  /**\n   * A function transforming response data before it's returned. This is useful\n   * for post-processing data, e.g. converting ISO strings into Date objects.\n   */\n  responseTransformer?: (data: unknown) => Promise<unknown>;\n  /**\n   * A function validating response data. This is useful if you want to ensure\n   * the response conforms to the desired shape, so it can be safely passed to\n   * the transformers and returned to the user.\n   */\n  responseValidator?: (data: unknown) => Promise<unknown>;\n}\n\ntype IsExactlyNeverOrNeverUndefined<T> = [T] extends [never]\n  ? true\n  : [T] extends [never | undefined]\n    ? [undefined] extends [T]\n      ? false\n      : true\n    : false;\n\nexport type OmitNever<T extends Record<string, unknown>> = {\n  [K in keyof T as IsExactlyNeverOrNeverUndefined<T[K]> extends true ? never : K]: T[K];\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-ofetch/base-url-number/core/utils.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-ofetch/base-url-number/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type { _3eNum1Период, _400, AdditionalPropertiesIntegerIssue, AdditionalPropertiesUnknownIssue, AdditionalPropertiesUnknownIssue2, AdditionalPropertiesUnknownIssue3, AdditionalPropertiesUnknownIssueWritable, AnyOfAnyAndNull, AnyOfArrays, ApiVVersionODataControllerCountData, ApiVVersionODataControllerCountResponse, ApiVVersionODataControllerCountResponses, ArrayWithAnyOfProperties, ArrayWithArray, ArrayWithBooleans, ArrayWithNumbers, ArrayWithProperties, ArrayWithReferences, ArrayWithStrings, CallToTestOrderOfParamsData, CallWithDefaultOptionalParametersData, CallWithDefaultParametersData, CallWithDescriptionsData, CallWithDuplicateResponsesData, CallWithDuplicateResponsesError, CallWithDuplicateResponsesErrors, CallWithDuplicateResponsesResponse, CallWithDuplicateResponsesResponses, CallWithNoContentResponseData, CallWithNoContentResponseResponse, CallWithNoContentResponseResponses, CallWithParametersData, CallWithResponseAndNoContentResponseData, CallWithResponseAndNoContentResponseResponse, CallWithResponseAndNoContentResponseResponses, CallWithResponseData, CallWithResponseResponse, CallWithResponseResponses, CallWithResponsesData, CallWithResponsesError, CallWithResponsesErrors, CallWithResponsesResponse, CallWithResponsesResponses, CallWithResultFromHeaderData, CallWithResultFromHeaderErrors, CallWithResultFromHeaderResponses, CallWithWeirdParameterNamesData, CamelCaseCommentWithBreaks, CharactersInDescription, ClientOptions, CollectionFormatData, CommentWithBackticks, CommentWithBackticksAndQuotes, CommentWithBreaks, CommentWithExpressionPlaceholders, CommentWithQuotes, CommentWithReservedCharacters, CommentWithSlashes, ComplexParamsData, ComplexParamsResponse, ComplexParamsResponses, ComplexTypesData, ComplexTypesErrors, ComplexTypesResponse, ComplexTypesResponses, CompositionBaseModel, CompositionExtendedModel, CompositionWithAllOfAndNullable, CompositionWithAnyOf, CompositionWithAnyOfAndNullable, CompositionWithAnyOfAnonymous, CompositionWithNestedAnyAndTypeNull, CompositionWithNestedAnyOfAndNull, CompositionWithOneOf, CompositionWithOneOfAndComplexArrayDictionary, CompositionWithOneOfAndNullable, CompositionWithOneOfAndProperties, CompositionWithOneOfAndSimpleArrayDictionary, CompositionWithOneOfAndSimpleDictionary, CompositionWithOneOfAnonymous, CompositionWithOneOfDiscriminator, ConstValue, Default, DeleteCallWithoutParametersAndResponseData, DeleteFooData, DeleteFooData2, DeleteFooData3, DeprecatedCallData, DeprecatedModel, DictionaryWithArray, DictionaryWithDictionary, DictionaryWithProperties, DictionaryWithPropertiesAndAdditionalProperties, DictionaryWithReference, DictionaryWithString, DummyAData, DummyAResponse, DummyAResponses, DummyBData, DummyBResponse, DummyBResponses, DuplicateName2Data, DuplicateName3Data, DuplicateName4Data, DuplicateNameData, EnumFromDescription, EnumWithExtensions, EnumWithNumbers, EnumWithReplacedCharacters, EnumWithStrings, EnumWithXEnumNames, ExportData, ExternalRefA, ExternalRefB, ExternalSharedModel, File, FileResponseData, FileResponseResponse, FileResponseResponses, FileWritable, FooWowData, FooWowResponses, FreeFormObjectWithAdditionalPropertiesEqEmptyObject, FreeFormObjectWithAdditionalPropertiesEqTrue, FreeFormObjectWithoutAdditionalProperties, GenericSchemaDuplicateIssue1SystemBoolean, GenericSchemaDuplicateIssue1SystemBooleanWritable, GenericSchemaDuplicateIssue1SystemString, GenericSchemaDuplicateIssue1SystemStringWritable, GetApiVbyApiVersionSimpleOperationData, GetApiVbyApiVersionSimpleOperationError, GetApiVbyApiVersionSimpleOperationErrors, GetApiVbyApiVersionSimpleOperationResponse, GetApiVbyApiVersionSimpleOperationResponses, GetCallWithOptionalParamData, GetCallWithoutParametersAndResponseData, HeadCallWithoutParametersAndResponseData, Import, ImportData, ImportResponse, ImportResponses, IoK8sApimachineryPkgApisMetaV1DeleteOptions, IoK8sApimachineryPkgApisMetaV1Preconditions, ModelCircle, ModelFromZendesk, ModelSquare, ModelThatExtends, ModelThatExtendsExtends, ModelWithAdditionalPropertiesEqTrue, ModelWithAdditionalPropertiesRef, ModelWithAnyOfConstantSizeArray, ModelWithAnyOfConstantSizeArrayAndIntersect, ModelWithAnyOfConstantSizeArrayNullable, ModelWithAnyOfConstantSizeArrayWithNSizeAndOptions, ModelWithAnyOfConstantSizeArrayWithNSizeAndOptionsWritable, ModelWithArray, ModelWithArrayReadOnlyAndWriteOnly, ModelWithArrayReadOnlyAndWriteOnlyWritable, ModelWithBackticksInDescription, ModelWithBoolean, ModelWithCircularReference, ModelWithConst, ModelWithConstantSizeArray, ModelWithDictionary, ModelWithDuplicateImports, ModelWithDuplicateProperties, ModelWithEnum, ModelWithEnumFromDescription, ModelWithEnumWithHyphen, ModelWithInteger, ModelWithNestedArrayEnums, ModelWithNestedArrayEnumsData, ModelWithNestedArrayEnumsDataBar, ModelWithNestedArrayEnumsDataFoo, ModelWithNestedCompositionEnums, ModelWithNestedEnums, ModelWithNestedProperties, ModelWithNullableObject, ModelWithNullableString, ModelWithNumericEnumUnion, ModelWithOneOfAndProperties, ModelWithOneOfEnum, ModelWithOrderedProperties, ModelWithPattern, ModelWithPatternWritable, ModelWithPrefixItemsConstantSizeArray, ModelWithProperties, ModelWithPropertiesWritable, ModelWithReadOnlyAndWriteOnly, ModelWithReadOnlyAndWriteOnlyWritable, ModelWithReference, ModelWithReferenceWritable, ModelWithString, ModelWithStringError, MultipartRequestData, MultipartResponseData, MultipartResponseResponse, MultipartResponseResponses, NestedAnyOfArraysNullable, NonAsciiæøåÆøÅöôêÊ字符串Data, NonAsciiæøåÆøÅöôêÊ字符串Response, NonAsciiæøåÆøÅöôêÊ字符串Responses, NonAsciiStringæøåÆøÅöôêÊ字符串, NullableObject, OneOfAllOfIssue, OneOfAllOfIssueWritable, OptionsCallWithoutParametersAndResponseData, Pageable, ParameterSimpleParameterUnused, PatchApiVbyApiVersionNoTagData, PatchApiVbyApiVersionNoTagResponses, PatchCallWithoutParametersAndResponseData, PostApiVbyApiVersionFormDataData, PostApiVbyApiVersionRequestBodyData, PostCallWithOptionalParamData, PostCallWithOptionalParamResponse, PostCallWithOptionalParamResponses, PostCallWithoutParametersAndResponseData, PostServiceWithEmptyTagResponse, PostServiceWithEmptyTagResponse2, PutCallWithoutParametersAndResponseData, PutWithFormUrlEncodedData, SchemaWithFormRestrictedKeys, SimpleBoolean, SimpleFile, SimpleFormData, SimpleInteger, SimpleParameter, SimpleReference, SimpleRequestBody, SimpleString, SimpleStringWithPattern, TestErrorCodeData, TestErrorCodeErrors, TestErrorCodeResponses, TypesData, TypesResponse, TypesResponses, UploadFileData, UploadFileResponse, UploadFileResponses, XFooBar } from './types.gen';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-ofetch/base-url-number/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type ClientOptions = {\n    baseUrl: 'http://localhost:3000/base' | (string & {});\n};\n\n/**\n * Model with number-only name\n */\nexport type _400 = string;\n\n/**\n * External ref to shared model (A)\n */\nexport type ExternalRefA = ExternalSharedModel;\n\n/**\n * External ref to shared model (B)\n */\nexport type ExternalRefB = ExternalSharedModel;\n\n/**\n * Testing multiline comments in string: First line\n * Second line\n *\n * Fourth line\n */\nexport type CamelCaseCommentWithBreaks = number;\n\n/**\n * Testing multiline comments in string: First line\n * Second line\n *\n * Fourth line\n */\nexport type CommentWithBreaks = number;\n\n/**\n * Testing backticks in string: `backticks` and ```multiple backticks``` should work\n */\nexport type CommentWithBackticks = number;\n\n/**\n * Testing backticks and quotes in string: `backticks`, 'quotes', \"double quotes\" and ```multiple backticks``` should work\n */\nexport type CommentWithBackticksAndQuotes = number;\n\n/**\n * Testing slashes in string: \\backwards\\\\\\ and /forwards/// should work\n */\nexport type CommentWithSlashes = number;\n\n/**\n * Testing expression placeholders in string: ${expression} should work\n */\nexport type CommentWithExpressionPlaceholders = number;\n\n/**\n * Testing quotes in string: 'single quote''' and \"double quotes\"\"\" should work\n */\nexport type CommentWithQuotes = number;\n\n/**\n * Testing reserved characters in string: * inline * and ** inline ** should work\n */\nexport type CommentWithReservedCharacters = number;\n\n/**\n * This is a simple number\n */\nexport type SimpleInteger = number;\n\n/**\n * This is a simple boolean\n */\nexport type SimpleBoolean = boolean;\n\n/**\n * This is a simple string\n */\nexport type SimpleString = string;\n\n/**\n * A string with non-ascii (unicode) characters valid in typescript identifiers (æøåÆØÅöÔèÈ字符串)\n */\nexport type NonAsciiStringæøåÆøÅöôêÊ字符串 = string;\n\n/**\n * This is a simple file\n */\nexport type SimpleFile = Blob | File;\n\n/**\n * This is a simple reference\n */\nexport type SimpleReference = ModelWithString;\n\n/**\n * This is a simple string\n */\nexport type SimpleStringWithPattern = string | null;\n\n/**\n * This is a simple enum with strings\n */\nexport type EnumWithStrings = 'Success' | 'Warning' | 'Error' | '\\'Single Quote\\'' | '\"Double Quotes\"' | 'Non-ascii: øæåôöØÆÅÔÖ字符串';\n\nexport type EnumWithReplacedCharacters = '\\'Single Quote\\'' | '\"Double Quotes\"' | 'øæåôöØÆÅÔÖ字符串' | 3.1 | '';\n\n/**\n * This is a simple enum with numbers\n */\nexport type EnumWithNumbers = 1 | 2 | 3 | 1.1 | 1.2 | 1.3 | 100 | 200 | 300 | -100 | -200 | -300 | -1.1 | -1.2 | -1.3;\n\n/**\n * Success=1,Warning=2,Error=3\n */\nexport type EnumFromDescription = number;\n\n/**\n * This is a simple enum with numbers\n */\nexport type EnumWithExtensions = 200 | 400 | 500;\n\nexport type EnumWithXEnumNames = 0 | 1 | 2;\n\n/**\n * This is a simple array with numbers\n */\nexport type ArrayWithNumbers = Array<number>;\n\n/**\n * This is a simple array with booleans\n */\nexport type ArrayWithBooleans = Array<boolean>;\n\n/**\n * This is a simple array with strings\n */\nexport type ArrayWithStrings = Array<string>;\n\n/**\n * This is a simple array with references\n */\nexport type ArrayWithReferences = Array<ModelWithString>;\n\n/**\n * This is a simple array containing an array\n */\nexport type ArrayWithArray = Array<Array<ModelWithString>>;\n\n/**\n * This is a simple array with properties\n */\nexport type ArrayWithProperties = Array<{\n    '16x16'?: CamelCaseCommentWithBreaks;\n    bar?: string;\n}>;\n\n/**\n * This is a simple array with any of properties\n */\nexport type ArrayWithAnyOfProperties = Array<{\n    foo?: string;\n} | {\n    bar?: string;\n}>;\n\nexport type AnyOfAnyAndNull = {\n    data?: unknown | null;\n};\n\n/**\n * This is a simple array with any of properties\n */\nexport type AnyOfArrays = {\n    results?: Array<{\n        foo?: string;\n    } | {\n        bar?: string;\n    }>;\n};\n\n/**\n * This is a string dictionary\n */\nexport type DictionaryWithString = {\n    [key: string]: string;\n};\n\nexport type DictionaryWithPropertiesAndAdditionalProperties = {\n    foo?: number;\n    bar?: boolean;\n    [key: string]: string | number | boolean | undefined;\n};\n\n/**\n * This is a string reference\n */\nexport type DictionaryWithReference = {\n    [key: string]: ModelWithString;\n};\n\n/**\n * This is a complex dictionary\n */\nexport type DictionaryWithArray = {\n    [key: string]: Array<ModelWithString>;\n};\n\n/**\n * This is a string dictionary\n */\nexport type DictionaryWithDictionary = {\n    [key: string]: {\n        [key: string]: string;\n    };\n};\n\n/**\n * This is a complex dictionary\n */\nexport type DictionaryWithProperties = {\n    [key: string]: {\n        foo?: string;\n        bar?: string;\n    };\n};\n\n/**\n * This is a model with one number property\n */\nexport type ModelWithInteger = {\n    /**\n     * This is a simple number property\n     */\n    prop?: number;\n};\n\n/**\n * This is a model with one boolean property\n */\nexport type ModelWithBoolean = {\n    /**\n     * This is a simple boolean property\n     */\n    prop?: boolean;\n};\n\n/**\n * This is a model with one string property\n */\nexport type ModelWithString = {\n    /**\n     * This is a simple string property\n     */\n    prop?: string;\n};\n\n/**\n * This is a model with one string property\n */\nexport type ModelWithStringError = {\n    /**\n     * This is a simple string property\n     */\n    prop?: string;\n};\n\n/**\n * `Comment` or `VoiceComment`. The JSON object for adding voice comments to tickets is different. See [Adding voice comments to tickets](/documentation/ticketing/managing-tickets/adding-voice-comments-to-tickets)\n */\nexport type ModelFromZendesk = string;\n\n/**\n * This is a model with one string property\n */\nexport type ModelWithNullableString = {\n    /**\n     * This is a simple string property\n     */\n    nullableProp1?: string | null;\n    /**\n     * This is a simple string property\n     */\n    nullableRequiredProp1: string | null;\n    /**\n     * This is a simple string property\n     */\n    nullableProp2?: string | null;\n    /**\n     * This is a simple string property\n     */\n    nullableRequiredProp2: string | null;\n    /**\n     * This is a simple enum with strings\n     */\n    'foo_bar-enum'?: 'Success' | 'Warning' | 'Error' | 'ØÆÅ字符串';\n};\n\n/**\n * This is a model with one enum\n */\nexport type ModelWithEnum = {\n    /**\n     * This is a simple enum with strings\n     */\n    'foo_bar-enum'?: 'Success' | 'Warning' | 'Error' | 'ØÆÅ字符串';\n    /**\n     * These are the HTTP error code enums\n     */\n    statusCode?: '100' | '200 FOO' | '300 FOO_BAR' | '400 foo-bar' | '500 foo.bar' | '600 foo&bar';\n    /**\n     * Simple boolean enum\n     */\n    bool?: true;\n};\n\n/**\n * This is a model with one enum with escaped name\n */\nexport type ModelWithEnumWithHyphen = {\n    /**\n     * Foo-Bar-Baz-Qux\n     */\n    'foo-bar-baz-qux'?: '3.0';\n};\n\n/**\n * This is a model with one enum\n */\nexport type ModelWithEnumFromDescription = {\n    /**\n     * Success=1,Warning=2,Error=3\n     */\n    test?: number;\n};\n\n/**\n * This is a model with nested enums\n */\nexport type ModelWithNestedEnums = {\n    dictionaryWithEnum?: {\n        [key: string]: 'Success' | 'Warning' | 'Error';\n    };\n    dictionaryWithEnumFromDescription?: {\n        [key: string]: number;\n    };\n    arrayWithEnum?: Array<'Success' | 'Warning' | 'Error'>;\n    arrayWithDescription?: Array<number>;\n    /**\n     * This is a simple enum with strings\n     */\n    'foo_bar-enum'?: 'Success' | 'Warning' | 'Error' | 'ØÆÅ字符串';\n};\n\n/**\n * This is a model with one property containing a reference\n */\nexport type ModelWithReference = {\n    prop?: ModelWithProperties;\n};\n\n/**\n * This is a model with one property containing an array\n */\nexport type ModelWithArrayReadOnlyAndWriteOnly = {\n    prop?: Array<ModelWithReadOnlyAndWriteOnly>;\n    propWithFile?: Array<Blob | File>;\n    propWithNumber?: Array<number>;\n};\n\n/**\n * This is a model with one property containing an array\n */\nexport type ModelWithArray = {\n    prop?: Array<ModelWithString>;\n    propWithFile?: Array<Blob | File>;\n    propWithNumber?: Array<number>;\n};\n\n/**\n * This is a model with one property containing a dictionary\n */\nexport type ModelWithDictionary = {\n    prop?: {\n        [key: string]: string;\n    };\n};\n\n/**\n * This is a deprecated model with a deprecated property\n *\n * @deprecated\n */\nexport type DeprecatedModel = {\n    /**\n     * This is a deprecated property\n     *\n     * @deprecated\n     */\n    prop?: string;\n};\n\n/**\n * This is a model with one property containing a circular reference\n */\nexport type ModelWithCircularReference = {\n    prop?: ModelWithCircularReference;\n};\n\n/**\n * This is a model with one property with a 'one of' relationship\n */\nexport type CompositionWithOneOf = {\n    propA?: ModelWithString | ModelWithEnum | ModelWithArray | ModelWithDictionary;\n};\n\n/**\n * This is a model with one property with a 'one of' relationship where the options are not $ref\n */\nexport type CompositionWithOneOfAnonymous = {\n    propA?: {\n        propA?: string;\n    } | string | number;\n};\n\n/**\n * Circle\n */\nexport type ModelCircle = {\n    kind: string;\n    radius?: number;\n};\n\n/**\n * Square\n */\nexport type ModelSquare = {\n    kind: string;\n    sideLength?: number;\n};\n\n/**\n * This is a model with one property with a 'one of' relationship where the options are not $ref\n */\nexport type CompositionWithOneOfDiscriminator = ({\n    kind: 'circle';\n} & ModelCircle) | ({\n    kind: 'square';\n} & ModelSquare);\n\n/**\n * This is a model with one property with a 'any of' relationship\n */\nexport type CompositionWithAnyOf = {\n    propA?: ModelWithString | ModelWithEnum | ModelWithArray | ModelWithDictionary;\n};\n\n/**\n * This is a model with one property with a 'any of' relationship where the options are not $ref\n */\nexport type CompositionWithAnyOfAnonymous = {\n    propA?: {\n        propA?: string;\n    } | string | number;\n};\n\n/**\n * This is a model with nested 'any of' property with a type null\n */\nexport type CompositionWithNestedAnyAndTypeNull = {\n    propA?: Array<ModelWithDictionary | null> | Array<ModelWithArray | null>;\n};\n\nexport type _3eNum1Период = 'Bird' | 'Dog';\n\nexport type ConstValue = 'ConstValue';\n\n/**\n * This is a model with one property with a 'any of' relationship where the options are not $ref\n */\nexport type CompositionWithNestedAnyOfAndNull = {\n    /**\n     * Scopes\n     */\n    propA?: Array<_3eNum1Период | ConstValue> | null;\n};\n\n/**\n * This is a model with one property with a 'one of' relationship\n */\nexport type CompositionWithOneOfAndNullable = {\n    propA?: {\n        boolean?: boolean;\n    } | ModelWithEnum | ModelWithArray | ModelWithDictionary | null;\n};\n\n/**\n * This is a model that contains a simple dictionary within composition\n */\nexport type CompositionWithOneOfAndSimpleDictionary = {\n    propA?: boolean | {\n        [key: string]: number;\n    };\n};\n\n/**\n * This is a model that contains a dictionary of simple arrays within composition\n */\nexport type CompositionWithOneOfAndSimpleArrayDictionary = {\n    propA?: boolean | {\n        [key: string]: Array<boolean>;\n    };\n};\n\n/**\n * This is a model that contains a dictionary of complex arrays (composited) within composition\n */\nexport type CompositionWithOneOfAndComplexArrayDictionary = {\n    propA?: boolean | {\n        [key: string]: Array<number | string>;\n    };\n};\n\n/**\n * This is a model with one property with a 'all of' relationship\n */\nexport type CompositionWithAllOfAndNullable = {\n    propA?: ({\n        boolean?: boolean;\n    } & ModelWithEnum & ModelWithArray & ModelWithDictionary) | null;\n};\n\n/**\n * This is a model with one property with a 'any of' relationship\n */\nexport type CompositionWithAnyOfAndNullable = {\n    propA?: {\n        boolean?: boolean;\n    } | ModelWithEnum | ModelWithArray | ModelWithDictionary | null;\n};\n\n/**\n * This is a base model with two simple optional properties\n */\nexport type CompositionBaseModel = {\n    firstName?: string;\n    lastname?: string;\n};\n\n/**\n * This is a model that extends the base model\n */\nexport type CompositionExtendedModel = CompositionBaseModel & {\n    age: number;\n    firstName: string;\n    lastname: string;\n};\n\n/**\n * This is a model with one nested property\n */\nexport type ModelWithProperties = {\n    required: string;\n    readonly requiredAndReadOnly: string;\n    requiredAndNullable: string | null;\n    string?: string;\n    number?: number;\n    boolean?: boolean;\n    reference?: ModelWithString;\n    'property with space'?: string;\n    default?: string;\n    try?: string;\n    readonly '@namespace.string'?: string;\n    readonly '@namespace.integer'?: number;\n};\n\n/**\n * This is a model with one nested property\n */\nexport type ModelWithNestedProperties = {\n    readonly first: {\n        readonly second: {\n            readonly third: string | null;\n        } | null;\n    } | null;\n};\n\n/**\n * This is a model with duplicated properties\n */\nexport type ModelWithDuplicateProperties = {\n    prop?: ModelWithString;\n};\n\n/**\n * This is a model with ordered properties\n */\nexport type ModelWithOrderedProperties = {\n    zebra?: string;\n    apple?: string;\n    hawaii?: string;\n};\n\n/**\n * This is a model with duplicated imports\n */\nexport type ModelWithDuplicateImports = {\n    propA?: ModelWithString;\n    propB?: ModelWithString;\n    propC?: ModelWithString;\n};\n\n/**\n * This is a model that extends another model\n */\nexport type ModelThatExtends = ModelWithString & {\n    propExtendsA?: string;\n    propExtendsB?: ModelWithString;\n};\n\n/**\n * This is a model that extends another model\n */\nexport type ModelThatExtendsExtends = ModelWithString & ModelThatExtends & {\n    propExtendsC?: string;\n    propExtendsD?: ModelWithString;\n};\n\n/**\n * This is a model that contains a some patterns\n */\nexport type ModelWithPattern = {\n    key: string;\n    name: string;\n    readonly enabled?: boolean;\n    readonly modified?: string;\n    id?: string;\n    text?: string;\n    patternWithSingleQuotes?: string;\n    patternWithNewline?: string;\n    patternWithBacktick?: string;\n    patternWithUnicode?: string;\n};\n\nexport type File = {\n    /**\n     * Id\n     */\n    readonly id?: string;\n    /**\n     * Updated at\n     */\n    readonly updated_at?: string;\n    /**\n     * Created at\n     */\n    readonly created_at?: string;\n    /**\n     * Mime\n     */\n    mime: string;\n    /**\n     * File\n     */\n    readonly file?: string;\n};\n\nexport type Default = {\n    name?: string;\n};\n\nexport type Pageable = {\n    page?: number;\n    size?: number;\n    sort?: Array<string>;\n};\n\n/**\n * This is a free-form object without additionalProperties.\n */\nexport type FreeFormObjectWithoutAdditionalProperties = {\n    [key: string]: unknown;\n};\n\n/**\n * This is a free-form object with additionalProperties: true.\n */\nexport type FreeFormObjectWithAdditionalPropertiesEqTrue = {\n    [key: string]: unknown;\n};\n\n/**\n * This is a free-form object with additionalProperties: {}.\n */\nexport type FreeFormObjectWithAdditionalPropertiesEqEmptyObject = {\n    [key: string]: unknown;\n};\n\nexport type ModelWithConst = {\n    String?: 'String';\n    number?: 0;\n    null?: null;\n    withType?: 'Some string';\n};\n\n/**\n * This is a model with one property and additionalProperties: true\n */\nexport type ModelWithAdditionalPropertiesEqTrue = {\n    /**\n     * This is a simple string property\n     */\n    prop?: string;\n    [key: string]: unknown;\n};\n\nexport type NestedAnyOfArraysNullable = {\n    nullableArray?: Array<string | boolean> | null;\n};\n\nexport type CompositionWithOneOfAndProperties = ({\n    foo: SimpleParameter;\n} | {\n    bar: NonAsciiStringæøåÆøÅöôêÊ字符串;\n}) & {\n    baz: number | null;\n    qux: number;\n};\n\n/**\n * An object that can be null\n */\nexport type NullableObject = {\n    foo?: string;\n} | null;\n\n/**\n * Some % character\n */\nexport type CharactersInDescription = string;\n\nexport type ModelWithNullableObject = {\n    data?: NullableObject;\n};\n\n/**\n * An object with additional properties that can be null (anyOf ref + null)\n */\nexport type ModelWithAdditionalPropertiesRef = {\n    [key: string]: NullableObject | null;\n};\n\nexport type ModelWithOneOfEnum = {\n    foo: 'Bar';\n} | {\n    foo: 'Baz';\n} | {\n    foo: 'Qux';\n} | {\n    content: string;\n    foo: 'Quux';\n} | {\n    content: [\n        string,\n        string\n    ];\n    foo: 'Corge';\n};\n\nexport type ModelWithNestedArrayEnumsDataFoo = 'foo' | 'bar';\n\nexport type ModelWithNestedArrayEnumsDataBar = 'baz' | 'qux';\n\nexport type ModelWithNestedArrayEnumsData = {\n    foo?: Array<ModelWithNestedArrayEnumsDataFoo>;\n    bar?: Array<ModelWithNestedArrayEnumsDataBar>;\n};\n\nexport type ModelWithNestedArrayEnums = {\n    array_strings?: Array<string>;\n    data?: ModelWithNestedArrayEnumsData;\n};\n\nexport type ModelWithNestedCompositionEnums = {\n    foo?: ModelWithNestedArrayEnumsDataFoo;\n};\n\nexport type ModelWithReadOnlyAndWriteOnly = {\n    foo: string;\n    readonly bar: string;\n};\n\nexport type ModelWithConstantSizeArray = [\n    number,\n    number\n];\n\nexport type ModelWithAnyOfConstantSizeArray = [\n    number | string,\n    number | string,\n    number | string\n];\n\nexport type ModelWithPrefixItemsConstantSizeArray = [\n    ModelWithInteger,\n    number | string,\n    string\n];\n\nexport type ModelWithAnyOfConstantSizeArrayNullable = [\n    number | null | string,\n    number | null | string,\n    number | null | string\n];\n\nexport type ModelWithAnyOfConstantSizeArrayWithNSizeAndOptions = [\n    number | Import,\n    number | Import\n];\n\nexport type ModelWithAnyOfConstantSizeArrayAndIntersect = [\n    number & string,\n    number & string\n];\n\nexport type ModelWithNumericEnumUnion = {\n    /**\n     * Период\n     */\n    value?: -10 | -1 | 0 | 1 | 3 | 6 | 12;\n};\n\n/**\n * Some description with `back ticks`\n */\nexport type ModelWithBackticksInDescription = {\n    /**\n     * The template `that` should be used for parsing and importing the contents of the CSV file.\n     *\n     * <br/><p>There is one placeholder currently supported:<ul>     <li><b>${x}</b> - refers to the n-th column in the CSV file, e.g. ${1}, ${2}, ...)</li></ul><p>Example of a correct JSON template:</p>\n     * <pre>\n     * [\n     * {\n     * \"resourceType\": \"Asset\",\n     * \"identifier\": {\n     * \"name\": \"${1}\",\n     * \"domain\": {\n     * \"name\": \"${2}\",\n     * \"community\": {\n     * \"name\": \"Some Community\"\n     * }\n     * }\n     * },\n     * \"attributes\" : {\n     * \"00000000-0000-0000-0000-000000003115\" : [ {\n     * \"value\" : \"${3}\"\n     * } ],\n     * \"00000000-0000-0000-0000-000000000222\" : [ {\n     * \"value\" : \"${4}\"\n     * } ]\n     * }\n     * }\n     * ]\n     * </pre>\n     */\n    template?: string;\n};\n\nexport type ModelWithOneOfAndProperties = (SimpleParameter | NonAsciiStringæøåÆøÅöôêÊ字符串) & {\n    baz: number | null;\n    qux: number;\n};\n\n/**\n * Model used to test deduplication strategy (unused)\n */\nexport type ParameterSimpleParameterUnused = string;\n\n/**\n * Model used to test deduplication strategy\n */\nexport type PostServiceWithEmptyTagResponse = string;\n\n/**\n * Model used to test deduplication strategy\n */\nexport type PostServiceWithEmptyTagResponse2 = string;\n\n/**\n * Model used to test deduplication strategy\n */\nexport type DeleteFooData = string;\n\n/**\n * Model used to test deduplication strategy\n */\nexport type DeleteFooData2 = string;\n\n/**\n * Model with restricted keyword name\n */\nexport type Import = string;\n\nexport type SchemaWithFormRestrictedKeys = {\n    description?: string;\n    'x-enum-descriptions'?: string;\n    'x-enum-varnames'?: string;\n    'x-enumNames'?: string;\n    title?: string;\n    object?: {\n        description?: string;\n        'x-enum-descriptions'?: string;\n        'x-enum-varnames'?: string;\n        'x-enumNames'?: string;\n        title?: string;\n    };\n    array?: Array<{\n        description?: string;\n        'x-enum-descriptions'?: string;\n        'x-enum-varnames'?: string;\n        'x-enumNames'?: string;\n        title?: string;\n    }>;\n};\n\n/**\n * This schema was giving PascalCase transformations a hard time\n */\nexport type IoK8sApimachineryPkgApisMetaV1DeleteOptions = {\n    /**\n     * Must be fulfilled before a deletion is carried out. If not possible, a 409 Conflict status will be returned.\n     */\n    preconditions?: IoK8sApimachineryPkgApisMetaV1Preconditions;\n};\n\n/**\n * This schema was giving PascalCase transformations a hard time\n */\nexport type IoK8sApimachineryPkgApisMetaV1Preconditions = {\n    /**\n     * Specifies the target ResourceVersion\n     */\n    resourceVersion?: string;\n    /**\n     * Specifies the target UID.\n     */\n    uid?: string;\n};\n\nexport type AdditionalPropertiesUnknownIssue = {\n    [key: string]: string | number;\n};\n\nexport type AdditionalPropertiesUnknownIssue2 = {\n    [key: string]: string | number;\n};\n\nexport type AdditionalPropertiesUnknownIssue3 = string & {\n    entries: {\n        [key: string]: AdditionalPropertiesUnknownIssue;\n    };\n};\n\nexport type AdditionalPropertiesIntegerIssue = {\n    value: number;\n    [key: string]: number;\n};\n\nexport type OneOfAllOfIssue = ((ConstValue | GenericSchemaDuplicateIssue1SystemBoolean) & _3eNum1Период) | GenericSchemaDuplicateIssue1SystemString;\n\nexport type GenericSchemaDuplicateIssue1SystemBoolean = {\n    item?: boolean;\n    error?: string | null;\n    readonly hasError?: boolean;\n    data?: {\n        [key: string]: never;\n    };\n};\n\nexport type GenericSchemaDuplicateIssue1SystemString = {\n    item?: string | null;\n    error?: string | null;\n    readonly hasError?: boolean;\n};\n\nexport type ExternalSharedModel = {\n    id: string;\n    name?: string;\n};\n\n/**\n * This is a model with one property containing a reference\n */\nexport type ModelWithReferenceWritable = {\n    prop?: ModelWithPropertiesWritable;\n};\n\n/**\n * This is a model with one property containing an array\n */\nexport type ModelWithArrayReadOnlyAndWriteOnlyWritable = {\n    prop?: Array<ModelWithReadOnlyAndWriteOnlyWritable>;\n    propWithFile?: Array<Blob | File>;\n    propWithNumber?: Array<number>;\n};\n\n/**\n * This is a model with one nested property\n */\nexport type ModelWithPropertiesWritable = {\n    required: string;\n    requiredAndNullable: string | null;\n    string?: string;\n    number?: number;\n    boolean?: boolean;\n    reference?: ModelWithString;\n    'property with space'?: string;\n    default?: string;\n    try?: string;\n};\n\n/**\n * This is a model that contains a some patterns\n */\nexport type ModelWithPatternWritable = {\n    key: string;\n    name: string;\n    id?: string;\n    text?: string;\n    patternWithSingleQuotes?: string;\n    patternWithNewline?: string;\n    patternWithBacktick?: string;\n    patternWithUnicode?: string;\n};\n\nexport type FileWritable = {\n    /**\n     * Mime\n     */\n    mime: string;\n};\n\nexport type ModelWithReadOnlyAndWriteOnlyWritable = {\n    foo: string;\n    baz: string;\n};\n\nexport type ModelWithAnyOfConstantSizeArrayWithNSizeAndOptionsWritable = [\n    number | Import,\n    number | Import\n];\n\nexport type AdditionalPropertiesUnknownIssueWritable = {\n    [key: string]: string | number;\n};\n\nexport type OneOfAllOfIssueWritable = ((ConstValue | GenericSchemaDuplicateIssue1SystemBoolean) & _3eNum1Период) | GenericSchemaDuplicateIssue1SystemString;\n\nexport type GenericSchemaDuplicateIssue1SystemBooleanWritable = {\n    item?: boolean;\n    error?: string | null;\n    data?: {\n        [key: string]: never;\n    };\n};\n\nexport type GenericSchemaDuplicateIssue1SystemStringWritable = {\n    item?: string | null;\n    error?: string | null;\n};\n\n/**\n * This is a reusable parameter\n */\nexport type SimpleParameter = string;\n\n/**\n * Parameter with illegal characters\n */\nexport type XFooBar = ModelWithString;\n\n/**\n * A reusable request body\n */\nexport type SimpleRequestBody = ModelWithString;\n\n/**\n * A reusable request body\n */\nexport type SimpleFormData = ModelWithString;\n\nexport type ExportData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no+tag';\n};\n\nexport type PatchApiVbyApiVersionNoTagData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no+tag';\n};\n\nexport type PatchApiVbyApiVersionNoTagResponses = {\n    /**\n     * OK\n     */\n    default: unknown;\n};\n\nexport type ImportData = {\n    body: ModelWithReadOnlyAndWriteOnlyWritable | ModelWithArrayReadOnlyAndWriteOnlyWritable;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no+tag';\n};\n\nexport type ImportResponses = {\n    /**\n     * Success\n     */\n    200: ModelFromZendesk;\n    /**\n     * Default success response\n     */\n    default: ModelWithReadOnlyAndWriteOnly;\n};\n\nexport type ImportResponse = ImportResponses[keyof ImportResponses];\n\nexport type FooWowData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no+tag';\n};\n\nexport type FooWowResponses = {\n    /**\n     * OK\n     */\n    default: unknown;\n};\n\nexport type ApiVVersionODataControllerCountData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple/$count';\n};\n\nexport type ApiVVersionODataControllerCountResponses = {\n    /**\n     * Success\n     */\n    200: ModelFromZendesk;\n};\n\nexport type ApiVVersionODataControllerCountResponse = ApiVVersionODataControllerCountResponses[keyof ApiVVersionODataControllerCountResponses];\n\nexport type GetApiVbyApiVersionSimpleOperationData = {\n    body?: never;\n    path: {\n        /**\n         * foo in method\n         */\n        foo_param: string;\n    };\n    query?: never;\n    url: '/api/v{api-version}/simple:operation';\n};\n\nexport type GetApiVbyApiVersionSimpleOperationErrors = {\n    /**\n     * Default error response\n     */\n    default: ModelWithBoolean;\n};\n\nexport type GetApiVbyApiVersionSimpleOperationError = GetApiVbyApiVersionSimpleOperationErrors[keyof GetApiVbyApiVersionSimpleOperationErrors];\n\nexport type GetApiVbyApiVersionSimpleOperationResponses = {\n    /**\n     * Response is a simple number\n     */\n    200: number;\n};\n\nexport type GetApiVbyApiVersionSimpleOperationResponse = GetApiVbyApiVersionSimpleOperationResponses[keyof GetApiVbyApiVersionSimpleOperationResponses];\n\nexport type DeleteCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type GetCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type HeadCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type OptionsCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type PatchCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type PostCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type PutCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type DeleteFooData3 = {\n    body?: never;\n    headers: {\n        /**\n         * Parameter with illegal characters\n         */\n        'x-Foo-Bar': ModelWithString;\n    };\n    path: {\n        /**\n         * foo in method\n         */\n        foo_param: string;\n        /**\n         * bar in method\n         */\n        BarParam: string;\n    };\n    query?: never;\n    url: '/api/v{api-version}/foo/{foo_param}/bar/{BarParam}';\n};\n\nexport type CallWithDescriptionsData = {\n    body?: never;\n    path?: never;\n    query?: {\n        /**\n         * Testing multiline comments in string: First line\n         * Second line\n         *\n         * Fourth line\n         */\n        parameterWithBreaks?: string;\n        /**\n         * Testing backticks in string: `backticks` and ```multiple backticks``` should work\n         */\n        parameterWithBackticks?: string;\n        /**\n         * Testing slashes in string: \\backwards\\\\\\ and /forwards/// should work\n         */\n        parameterWithSlashes?: string;\n        /**\n         * Testing expression placeholders in string: ${expression} should work\n         */\n        parameterWithExpressionPlaceholders?: string;\n        /**\n         * Testing quotes in string: 'single quote''' and \"double quotes\"\"\" should work\n         */\n        parameterWithQuotes?: string;\n        /**\n         * Testing reserved characters in string: * inline * and ** inline ** should work\n         */\n        parameterWithReservedCharacters?: string;\n    };\n    url: '/api/v{api-version}/descriptions';\n};\n\nexport type DeprecatedCallData = {\n    body?: never;\n    headers: {\n        /**\n         * This parameter is deprecated\n         *\n         * @deprecated\n         */\n        parameter: DeprecatedModel | null;\n    };\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/parameters/deprecated';\n};\n\nexport type CallWithParametersData = {\n    /**\n     * This is the parameter that goes into the body\n     */\n    body: {\n        [key: string]: unknown;\n    } | null;\n    headers: {\n        /**\n         * This is the parameter that goes into the header\n         */\n        parameterHeader: string | null;\n    };\n    path: {\n        /**\n         * This is the parameter that goes into the path\n         */\n        parameterPath: string | null;\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string | null;\n    };\n    query: {\n        foo_ref_enum?: ModelWithNestedArrayEnumsDataFoo;\n        foo_all_of_enum: ModelWithNestedArrayEnumsDataFoo;\n        /**\n         * This is the parameter that goes into the query params\n         */\n        cursor: string | null;\n    };\n    url: '/api/v{api-version}/parameters/{parameterPath}';\n};\n\nexport type CallWithWeirdParameterNamesData = {\n    /**\n     * This is the parameter that goes into the body\n     */\n    body: ModelWithString | null;\n    headers: {\n        /**\n         * This is the parameter that goes into the request header\n         */\n        'parameter.header': string | null;\n    };\n    path: {\n        /**\n         * This is the parameter that goes into the path\n         */\n        'parameter.path.1'?: string;\n        /**\n         * This is the parameter that goes into the path\n         */\n        'parameter-path-2'?: string;\n        /**\n         * This is the parameter that goes into the path\n         */\n        'PARAMETER-PATH-3'?: string;\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string | null;\n    };\n    query: {\n        /**\n         * This is the parameter with a reserved keyword\n         */\n        default?: string;\n        /**\n         * This is the parameter that goes into the request query params\n         */\n        'parameter-query': string | null;\n    };\n    url: '/api/v{api-version}/parameters/{parameter.path.1}/{parameter-path-2}/{PARAMETER-PATH-3}';\n};\n\nexport type GetCallWithOptionalParamData = {\n    /**\n     * This is a required parameter\n     */\n    body: ModelWithOneOfEnum;\n    path?: never;\n    query?: {\n        /**\n         * This is an optional parameter\n         */\n        page?: number;\n    };\n    url: '/api/v{api-version}/parameters';\n};\n\nexport type PostCallWithOptionalParamData = {\n    /**\n     * This is an optional parameter\n     */\n    body?: {\n        offset?: number | null;\n    };\n    path?: never;\n    query: {\n        /**\n         * This is a required parameter\n         */\n        parameter: Pageable;\n    };\n    url: '/api/v{api-version}/parameters';\n};\n\nexport type PostCallWithOptionalParamResponses = {\n    /**\n     * Response is a simple number\n     */\n    200: number;\n    /**\n     * Success\n     */\n    204: void;\n};\n\nexport type PostCallWithOptionalParamResponse = PostCallWithOptionalParamResponses[keyof PostCallWithOptionalParamResponses];\n\nexport type PostApiVbyApiVersionRequestBodyData = {\n    /**\n     * A reusable request body\n     */\n    body?: SimpleRequestBody;\n    path?: never;\n    query?: {\n        /**\n         * This is a reusable parameter\n         */\n        parameter?: string;\n    };\n    url: '/api/v{api-version}/requestBody';\n};\n\nexport type PostApiVbyApiVersionFormDataData = {\n    /**\n     * A reusable request body\n     */\n    body?: SimpleFormData;\n    path?: never;\n    query?: {\n        /**\n         * This is a reusable parameter\n         */\n        parameter?: string;\n    };\n    url: '/api/v{api-version}/formData';\n};\n\nexport type CallWithDefaultParametersData = {\n    body?: never;\n    path?: never;\n    query?: {\n        /**\n         * This is a simple string with default value\n         */\n        parameterString?: string | null;\n        /**\n         * This is a simple number with default value\n         */\n        parameterNumber?: number | null;\n        /**\n         * This is a simple boolean with default value\n         */\n        parameterBoolean?: boolean | null;\n        /**\n         * This is a simple enum with default value\n         */\n        parameterEnum?: 'Success' | 'Warning' | 'Error';\n        /**\n         * This is a simple model with default value\n         */\n        parameterModel?: ModelWithString | null;\n    };\n    url: '/api/v{api-version}/defaults';\n};\n\nexport type CallWithDefaultOptionalParametersData = {\n    body?: never;\n    path?: never;\n    query?: {\n        /**\n         * This is a simple string that is optional with default value\n         */\n        parameterString?: string;\n        /**\n         * This is a simple number that is optional with default value\n         */\n        parameterNumber?: number;\n        /**\n         * This is a simple boolean that is optional with default value\n         */\n        parameterBoolean?: boolean;\n        /**\n         * This is a simple enum that is optional with default value\n         */\n        parameterEnum?: 'Success' | 'Warning' | 'Error';\n        /**\n         * This is a simple model that is optional with default value\n         */\n        parameterModel?: ModelWithString;\n    };\n    url: '/api/v{api-version}/defaults';\n};\n\nexport type CallToTestOrderOfParamsData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * This is a optional string with default\n         */\n        parameterOptionalStringWithDefault?: string;\n        /**\n         * This is a optional string with empty default\n         */\n        parameterOptionalStringWithEmptyDefault?: string;\n        /**\n         * This is a optional string with no default\n         */\n        parameterOptionalStringWithNoDefault?: string;\n        /**\n         * This is a string with default\n         */\n        parameterStringWithDefault: string;\n        /**\n         * This is a string with empty default\n         */\n        parameterStringWithEmptyDefault: string;\n        /**\n         * This is a string with no default\n         */\n        parameterStringWithNoDefault: string;\n        /**\n         * This is a string that can be null with no default\n         */\n        parameterStringNullableWithNoDefault?: string | null;\n        /**\n         * This is a string that can be null with default\n         */\n        parameterStringNullableWithDefault?: string | null;\n    };\n    url: '/api/v{api-version}/defaults';\n};\n\nexport type DuplicateNameData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/duplicate';\n};\n\nexport type DuplicateName2Data = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/duplicate';\n};\n\nexport type DuplicateName3Data = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/duplicate';\n};\n\nexport type DuplicateName4Data = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/duplicate';\n};\n\nexport type CallWithNoContentResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no-content';\n};\n\nexport type CallWithNoContentResponseResponses = {\n    /**\n     * Success\n     */\n    204: void;\n};\n\nexport type CallWithNoContentResponseResponse = CallWithNoContentResponseResponses[keyof CallWithNoContentResponseResponses];\n\nexport type CallWithResponseAndNoContentResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multiple-tags/response-and-no-content';\n};\n\nexport type CallWithResponseAndNoContentResponseResponses = {\n    /**\n     * Response is a simple number\n     */\n    200: number;\n    /**\n     * Success\n     */\n    204: void;\n};\n\nexport type CallWithResponseAndNoContentResponseResponse = CallWithResponseAndNoContentResponseResponses[keyof CallWithResponseAndNoContentResponseResponses];\n\nexport type DummyAData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multiple-tags/a';\n};\n\nexport type DummyAResponses = {\n    200: _400;\n};\n\nexport type DummyAResponse = DummyAResponses[keyof DummyAResponses];\n\nexport type DummyBData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multiple-tags/b';\n};\n\nexport type DummyBResponses = {\n    /**\n     * Success\n     */\n    204: void;\n};\n\nexport type DummyBResponse = DummyBResponses[keyof DummyBResponses];\n\nexport type CallWithResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/response';\n};\n\nexport type CallWithResponseResponses = {\n    default: Import;\n};\n\nexport type CallWithResponseResponse = CallWithResponseResponses[keyof CallWithResponseResponses];\n\nexport type CallWithDuplicateResponsesData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/response';\n};\n\nexport type CallWithDuplicateResponsesErrors = {\n    /**\n     * Message for 500 error\n     */\n    500: ModelWithStringError;\n    /**\n     * Message for 501 error\n     */\n    501: ModelWithStringError;\n    /**\n     * Message for 502 error\n     */\n    502: ModelWithStringError;\n    /**\n     * Message for 4XX errors\n     */\n    '4XX': DictionaryWithArray;\n    /**\n     * Default error response\n     */\n    default: ModelWithBoolean;\n};\n\nexport type CallWithDuplicateResponsesError = CallWithDuplicateResponsesErrors[keyof CallWithDuplicateResponsesErrors];\n\nexport type CallWithDuplicateResponsesResponses = {\n    /**\n     * Message for 200 response\n     */\n    200: ModelWithBoolean & ModelWithInteger;\n    /**\n     * Message for 201 response\n     */\n    201: ModelWithString;\n    /**\n     * Message for 202 response\n     */\n    202: ModelWithString;\n};\n\nexport type CallWithDuplicateResponsesResponse = CallWithDuplicateResponsesResponses[keyof CallWithDuplicateResponsesResponses];\n\nexport type CallWithResponsesData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/response';\n};\n\nexport type CallWithResponsesErrors = {\n    /**\n     * Message for 500 error\n     */\n    500: ModelWithStringError;\n    /**\n     * Message for 501 error\n     */\n    501: ModelWithStringError;\n    /**\n     * Message for 502 error\n     */\n    502: ModelWithStringError;\n    /**\n     * Message for default response\n     */\n    default: ModelWithStringError;\n};\n\nexport type CallWithResponsesError = CallWithResponsesErrors[keyof CallWithResponsesErrors];\n\nexport type CallWithResponsesResponses = {\n    /**\n     * Message for 200 response\n     */\n    200: {\n        readonly '@namespace.string'?: string;\n        readonly '@namespace.integer'?: number;\n        readonly value?: Array<ModelWithString>;\n    };\n    /**\n     * Message for 201 response\n     */\n    201: ModelThatExtends;\n    /**\n     * Message for 202 response\n     */\n    202: ModelThatExtendsExtends;\n};\n\nexport type CallWithResponsesResponse = CallWithResponsesResponses[keyof CallWithResponsesResponses];\n\nexport type CollectionFormatData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * This is an array parameter that is sent as csv format (comma-separated values)\n         */\n        parameterArrayCSV: Array<string> | null;\n        /**\n         * This is an array parameter that is sent as ssv format (space-separated values)\n         */\n        parameterArraySSV: Array<string> | null;\n        /**\n         * This is an array parameter that is sent as tsv format (tab-separated values)\n         */\n        parameterArrayTSV: Array<string> | null;\n        /**\n         * This is an array parameter that is sent as pipes format (pipe-separated values)\n         */\n        parameterArrayPipes: Array<string> | null;\n        /**\n         * This is an array parameter that is sent as multi format (multiple parameter instances)\n         */\n        parameterArrayMulti: Array<string> | null;\n    };\n    url: '/api/v{api-version}/collectionFormat';\n};\n\nexport type TypesData = {\n    body?: never;\n    path?: {\n        /**\n         * This is a number parameter\n         */\n        id?: number;\n    };\n    query: {\n        /**\n         * This is a number parameter\n         */\n        parameterNumber: number;\n        /**\n         * This is a string parameter\n         */\n        parameterString: string | null;\n        /**\n         * This is a boolean parameter\n         */\n        parameterBoolean: boolean | null;\n        /**\n         * This is an object parameter\n         */\n        parameterObject: {\n            [key: string]: unknown;\n        } | null;\n        /**\n         * This is an array parameter\n         */\n        parameterArray: Array<string> | null;\n        /**\n         * This is a dictionary parameter\n         */\n        parameterDictionary: {\n            [key: string]: unknown;\n        } | null;\n        /**\n         * This is an enum parameter\n         */\n        parameterEnum: 'Success' | 'Warning' | 'Error' | null;\n    };\n    url: '/api/v{api-version}/types';\n};\n\nexport type TypesResponses = {\n    /**\n     * Response is a simple number\n     */\n    200: number;\n    /**\n     * Response is a simple string\n     */\n    201: string;\n    /**\n     * Response is a simple boolean\n     */\n    202: boolean;\n    /**\n     * Response is a simple object\n     */\n    203: {\n        [key: string]: unknown;\n    };\n};\n\nexport type TypesResponse = TypesResponses[keyof TypesResponses];\n\nexport type UploadFileData = {\n    body: Blob | File;\n    path: {\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string | null;\n    };\n    query?: never;\n    url: '/api/v{api-version}/upload';\n};\n\nexport type UploadFileResponses = {\n    200: boolean;\n};\n\nexport type UploadFileResponse = UploadFileResponses[keyof UploadFileResponses];\n\nexport type FileResponseData = {\n    body?: never;\n    path: {\n        id: string;\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string;\n    };\n    query?: never;\n    url: '/api/v{api-version}/file/{id}';\n};\n\nexport type FileResponseResponses = {\n    /**\n     * Success\n     */\n    200: Blob | File;\n};\n\nexport type FileResponseResponse = FileResponseResponses[keyof FileResponseResponses];\n\nexport type ComplexTypesData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * Parameter containing object\n         */\n        parameterObject: {\n            first?: {\n                second?: {\n                    third?: string;\n                };\n            };\n        };\n        /**\n         * Parameter containing reference\n         */\n        parameterReference: ModelWithString;\n    };\n    url: '/api/v{api-version}/complex';\n};\n\nexport type ComplexTypesErrors = {\n    /**\n     * 400 `server` error\n     */\n    400: unknown;\n    /**\n     * 500 server error\n     */\n    500: unknown;\n};\n\nexport type ComplexTypesResponses = {\n    /**\n     * Successful response\n     */\n    200: Array<ModelWithString>;\n};\n\nexport type ComplexTypesResponse = ComplexTypesResponses[keyof ComplexTypesResponses];\n\nexport type MultipartResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multipart';\n};\n\nexport type MultipartResponseResponses = {\n    /**\n     * OK\n     */\n    200: {\n        file?: Blob | File;\n        metadata?: {\n            foo?: string;\n            bar?: string;\n        };\n    };\n};\n\nexport type MultipartResponseResponse = MultipartResponseResponses[keyof MultipartResponseResponses];\n\nexport type MultipartRequestData = {\n    body?: {\n        content?: Blob | File;\n        data?: ModelWithString | null;\n    };\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multipart';\n};\n\nexport type ComplexParamsData = {\n    body?: {\n        readonly key: string | null;\n        name: string | null;\n        enabled?: boolean;\n        type: 'Monkey' | 'Horse' | 'Bird';\n        listOfModels?: Array<ModelWithString> | null;\n        listOfStrings?: Array<string> | null;\n        parameters: ModelWithString | ModelWithEnum | ModelWithArray | ModelWithDictionary;\n        readonly user?: {\n            readonly id?: number;\n            readonly name?: string | null;\n        };\n    };\n    path: {\n        id: number;\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string;\n    };\n    query?: never;\n    url: '/api/v{api-version}/complex/{id}';\n};\n\nexport type ComplexParamsResponses = {\n    /**\n     * Success\n     */\n    200: ModelWithString;\n};\n\nexport type ComplexParamsResponse = ComplexParamsResponses[keyof ComplexParamsResponses];\n\nexport type CallWithResultFromHeaderData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/header';\n};\n\nexport type CallWithResultFromHeaderErrors = {\n    /**\n     * 400 server error\n     */\n    400: unknown;\n    /**\n     * 500 server error\n     */\n    500: unknown;\n};\n\nexport type CallWithResultFromHeaderResponses = {\n    /**\n     * Successful response\n     */\n    200: unknown;\n};\n\nexport type TestErrorCodeData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * Status code to return\n         */\n        status: number;\n    };\n    url: '/api/v{api-version}/error';\n};\n\nexport type TestErrorCodeErrors = {\n    /**\n     * Custom message: Internal Server Error\n     */\n    500: unknown;\n    /**\n     * Custom message: Not Implemented\n     */\n    501: unknown;\n    /**\n     * Custom message: Bad Gateway\n     */\n    502: unknown;\n    /**\n     * Custom message: Service Unavailable\n     */\n    503: unknown;\n};\n\nexport type TestErrorCodeResponses = {\n    /**\n     * Custom message: Successful response\n     */\n    200: unknown;\n};\n\nexport type NonAsciiæøåÆøÅöôêÊ字符串Data = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * Dummy input param\n         */\n        nonAsciiParamæøåÆØÅöôêÊ: number;\n    };\n    url: '/api/v{api-version}/non-ascii-æøåÆØÅöôêÊ字符串';\n};\n\nexport type NonAsciiæøåÆøÅöôêÊ字符串Responses = {\n    /**\n     * Successful response\n     */\n    200: Array<NonAsciiStringæøåÆøÅöôêÊ字符串>;\n};\n\nexport type NonAsciiæøåÆøÅöôêÊ字符串Response = NonAsciiæøåÆøÅöôêÊ字符串Responses[keyof NonAsciiæøåÆøÅöôêÊ字符串Responses];\n\nexport type PutWithFormUrlEncodedData = {\n    body: ArrayWithStrings;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/non-ascii-æøåÆØÅöôêÊ字符串';\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-ofetch/base-url-strict/client/client.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport { ofetch, type ResponseType as OfetchResponseType } from 'ofetch';\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  buildOfetchOptions,\n  buildUrl,\n  createConfig,\n  createInterceptors,\n  isRepeatableBody,\n  mapParseAsToResponseType,\n  mergeConfigs,\n  mergeHeaders,\n  parseError,\n  parseSuccess,\n  setAuthParams,\n  wrapDataReturn,\n  wrapErrorReturn,\n} from './utils.gen';\n\ntype ReqInit = Omit<RequestInit, 'body' | 'headers'> & {\n  body?: BodyInit | null | undefined;\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  // precompute serialized / network body\n  const resolveOptions = async (options: RequestOptions) => {\n    const opts = {\n      ..._config,\n      ...options,\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 if body is empty to avoid invalid requests\n    if (opts.body === undefined || opts.serializedBody === '') {\n      opts.headers.delete('Content-Type');\n    }\n\n    // if a raw body is provided (no serializer), adjust Content-Type only when it\n    // equals the default JSON value to better match the concrete body type\n    if (\n      opts.body !== undefined &&\n      opts.bodySerializer === null &&\n      (opts.headers.get('Content-Type') || '').toLowerCase() === 'application/json'\n    ) {\n      const b: unknown = opts.body;\n      if (typeof FormData !== 'undefined' && b instanceof FormData) {\n        // let the runtime set the multipart boundary\n        opts.headers.delete('Content-Type');\n      } else if (typeof URLSearchParams !== 'undefined' && b instanceof URLSearchParams) {\n        // standard urlencoded content type (+ charset)\n        opts.headers.set('Content-Type', 'application/x-www-form-urlencoded;charset=UTF-8');\n      } else if (typeof Blob !== 'undefined' && b instanceof Blob) {\n        const t = b.type?.trim();\n        if (t) {\n          opts.headers.set('Content-Type', t);\n        } else {\n          // unknown blob type: avoid sending a misleading JSON header\n          opts.headers.delete('Content-Type');\n        }\n      }\n    }\n\n    // precompute network body (stability for retries and interceptors)\n    const networkBody = getValidRequestBody(opts) as RequestInit['body'] | null | undefined;\n\n    const url = buildUrl(opts);\n\n    return { networkBody, opts, url };\n  };\n\n  // apply request interceptors and mirror header/method/signal back to opts\n  const applyRequestInterceptors = async (\n    request: Request,\n    opts: ResolvedRequestOptions,\n    body: BodyInit | null | undefined,\n  ) => {\n    for (const fn of interceptors.request.fns) {\n      if (fn) {\n        request = await fn(request, opts);\n      }\n    }\n    // reflect interceptor changes into opts used by the network layer\n    opts.headers = request.headers;\n    opts.method = request.method as Uppercase<HttpMethod>;\n    // ignore request.body changes to avoid turning serialized bodies into streams\n    // body comes only from getValidRequestBody(options)\n    // reflect signal if present\n    opts.signal = (request as any).signal as AbortSignal | undefined;\n\n    // When body is FormData, remove Content-Type header to avoid boundary mismatch.\n    // Note: We already delete Content-Type in resolveOptions for FormData, but the\n    // Request constructor (line 175) re-adds it with an auto-generated boundary.\n    // Since we pass the original FormData (not the Request's body) to ofetch, and\n    // ofetch will generate its own boundary, we must remove the Request's Content-Type\n    // to let ofetch set the correct one. Otherwise the boundary in the header won't\n    // match the boundary in the actual multipart body sent by ofetch.\n    if (typeof FormData !== 'undefined' && body instanceof FormData) {\n      opts.headers.delete('Content-Type');\n    }\n\n    return request;\n  };\n\n  // build ofetch options with stable retry logic based on body repeatability\n  const buildNetworkOptions = (\n    opts: ResolvedRequestOptions,\n    body: BodyInit | null | undefined,\n    responseType: OfetchResponseType | undefined,\n  ) => {\n    const effectiveRetry = isRepeatableBody(body) ? (opts.retry as any) : (0 as any);\n    return buildOfetchOptions(opts, body, responseType, effectiveRetry);\n  };\n\n  const request: Client['request'] = async (options) => {\n    const { networkBody: initialNetworkBody, opts, url } = await resolveOptions(options as any);\n    // map parseAs -> ofetch responseType once per request\n    const ofetchResponseType: OfetchResponseType | undefined = mapParseAsToResponseType(\n      opts.parseAs,\n      opts.responseType,\n    );\n\n    const $ofetch = opts.ofetch ?? ofetch;\n\n    // create Request before network to run middleware consistently\n    const networkBody = initialNetworkBody;\n    const requestInit: ReqInit = {\n      body: networkBody,\n      headers: opts.headers as Headers,\n      method: opts.method,\n      redirect: 'follow',\n      signal: opts.signal,\n    };\n    let request = new Request(url, requestInit);\n\n    request = await applyRequestInterceptors(request, opts, networkBody);\n    const finalUrl = request.url;\n\n    // build ofetch options and perform the request (.raw keeps the Response)\n    const responseOptions = buildNetworkOptions(\n      opts as ResolvedRequestOptions,\n      networkBody,\n      ofetchResponseType,\n    );\n\n    let response = await $ofetch.raw(finalUrl, responseOptions);\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 = { request, response };\n\n    if (response.ok) {\n      const data = await parseSuccess(response, opts, ofetchResponseType);\n      return wrapDataReturn(data, result, opts.responseStyle);\n    }\n\n    let finalError = await parseError(response);\n\n    for (const fn of interceptors.error.fns) {\n      if (fn) {\n        finalError = await fn(finalError, response, request, opts);\n      }\n    }\n\n    // ensure error is never undefined after interceptors\n    finalError = (finalError as any) || ({} as string);\n\n    if (opts.throwOnError) {\n      throw finalError;\n    }\n\n    return wrapErrorReturn(finalError, result, opts.responseStyle) as any;\n  };\n\n  const makeMethodFn = (method: Uppercase<HttpMethod>) => (options: RequestOptions) =>\n    request({ ...options, method } as any);\n\n  const makeSseFn = (method: Uppercase<HttpMethod>) => async (options: RequestOptions) => {\n    const { networkBody, opts, url } = await resolveOptions(options);\n    const optsForSse: any = { ...opts };\n    delete optsForSse.body; // body is provided via serializedBody below\n    return createSseClient({\n      ...optsForSse,\n      fetch: opts.fetch,\n      headers: opts.headers as Headers,\n      method,\n      onRequest: async (url, init) => {\n        let request = new Request(url, init);\n        request = await applyRequestInterceptors(request, opts, networkBody);\n        return request;\n      },\n      serializedBody: networkBody as BodyInit | null | undefined,\n      signal: opts.signal,\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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-ofetch/base-url-strict/client/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type { Auth } from '../core/auth.gen';\nexport type { QuerySerializerOptions } from '../core/bodySerializer.gen';\nexport {\n  formDataBodySerializer,\n  jsonBodySerializer,\n  urlSearchParamsBodySerializer,\n} from '../core/bodySerializer.gen';\nexport { buildClientParams } from '../core/params.gen';\nexport { serializeQueryKeyValue } from '../core/queryKeySerializer.gen';\nexport { createClient } from './client.gen';\nexport type {\n  Client,\n  ClientOptions,\n  Config,\n  CreateClientConfig,\n  Options,\n  RequestOptions,\n  RequestResult,\n  ResolvedRequestOptions,\n  ResponseStyle,\n  TDataShape,\n} from './types.gen';\nexport { createConfig, mergeHeaders } from './utils.gen';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-ofetch/base-url-strict/client/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { FetchOptions as OfetchOptions, ResponseType as OfetchResponseType } from 'ofetch';\nimport type { ofetch } from 'ofetch';\n\nimport type { Auth } from '../core/auth.gen';\nimport type {\n  ServerSentEventsOptions,\n  ServerSentEventsResult,\n} from '../core/serverSentEvents.gen';\nimport type { Client as CoreClient, Config as CoreConfig } from '../core/types.gen';\nimport type { Middleware } from './utils.gen';\n\nexport type ResponseStyle = 'data' | 'fields';\n\nexport interface Config<T extends ClientOptions = ClientOptions>\n  extends Omit<RequestInit, 'body' | 'headers' | 'method'>, CoreConfig {\n  /**\n   * HTTP(S) agent configuration (Node.js only). Passed through to ofetch.\n   */\n  agent?: OfetchOptions['agent'];\n  /**\n   * Base URL for all requests made by this client.\n   */\n  baseUrl?: T['baseUrl'];\n  /**\n   * Node-only proxy/agent options.\n   */\n  dispatcher?: OfetchOptions['dispatcher'];\n  /**\n   * Fetch API implementation. Used for SSE streaming. You can use this option\n   * to provide a custom fetch instance.\n   *\n   * @default globalThis.fetch\n   */\n  fetch?: typeof fetch;\n  /**\n   * Controls the native ofetch behaviour that throws `FetchError` when\n   * `response.ok === false`. We default to suppressing it to match the fetch\n   * client semantics and let `throwOnError` drive the outcome.\n   */\n  ignoreResponseError?: OfetchOptions['ignoreResponseError'];\n  // No custom fetch option: provide custom instance via `ofetch` instead\n  /**\n   * Please don't use the Fetch client for Next.js applications. The `next`\n   * options won't have any effect.\n   *\n   * Install {@link https://www.npmjs.com/package/@hey-api/client-next `@hey-api/client-next`} instead.\n   */\n  next?: never;\n  /**\n   * Custom ofetch instance created via `ofetch.create()`. If provided, it will\n   * be used for requests instead of the default `ofetch` export.\n   */\n  ofetch?: typeof ofetch;\n  /**\n   * ofetch hook called before a request is sent.\n   */\n  onRequest?: OfetchOptions['onRequest'];\n  /**\n   * ofetch hook called when a request fails before receiving a response\n   * (e.g., network errors or aborted requests).\n   */\n  onRequestError?: OfetchOptions['onRequestError'];\n  /**\n   * ofetch hook called after a successful response is received and parsed.\n   */\n  onResponse?: OfetchOptions['onResponse'];\n  /**\n   * ofetch hook called when the response indicates an error (non-ok status)\n   * or when response parsing fails.\n   */\n  onResponseError?: OfetchOptions['onResponseError'];\n  /**\n   * Return the response data parsed in a specified format. By default, `auto`\n   * will infer the appropriate method from the `Content-Type` response header.\n   * You can override this behavior with any of the {@link Body} methods.\n   * Select `stream` if you don't want to parse response data at all.\n   *\n   * @default 'auto'\n   */\n  parseAs?: 'arrayBuffer' | 'auto' | 'blob' | 'formData' | 'json' | 'stream' | 'text';\n  /** Custom response parser (ofetch). */\n  parseResponse?: OfetchOptions['parseResponse'];\n  /**\n   * Should we return only data or multiple fields (data, error, response, etc.)?\n   *\n   * @default 'fields'\n   */\n  responseStyle?: ResponseStyle;\n  /**\n   * ofetch responseType override. If provided, it will be passed directly to\n   * ofetch and take precedence over `parseAs`.\n   */\n  responseType?: OfetchResponseType;\n  /**\n   * Automatically retry failed requests.\n   */\n  retry?: OfetchOptions['retry'];\n  /**\n   * Delay (in ms) between retry attempts.\n   */\n  retryDelay?: OfetchOptions['retryDelay'];\n  /**\n   * HTTP status codes that should trigger a retry.\n   */\n  retryStatusCodes?: OfetchOptions['retryStatusCodes'];\n  /**\n   * Throw an error instead of returning it in the response?\n   *\n   * @default false\n   */\n  throwOnError?: T['throwOnError'];\n  /**\n   * Abort the request after the given milliseconds.\n   */\n  timeout?: number;\n}\n\nexport interface RequestOptions<\n  TData = unknown,\n  TResponseStyle extends ResponseStyle = 'fields',\n  ThrowOnError extends boolean = boolean,\n  Url extends string = string,\n>\n  extends\n    Config<{\n      responseStyle: TResponseStyle;\n      throwOnError: ThrowOnError;\n    }>,\n    Pick<\n      ServerSentEventsOptions<TData>,\n      | 'onSseError'\n      | 'onSseEvent'\n      | 'sseDefaultRetryDelay'\n      | 'sseMaxRetryAttempts'\n      | 'sseMaxRetryDelay'\n    > {\n  /**\n   * Any body that you want to add to your request.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/fetch#body}\n   */\n  body?: unknown;\n  path?: Record<string, unknown>;\n  query?: Record<string, unknown>;\n  /**\n   * Security mechanism(s) to use for the request.\n   */\n  security?: ReadonlyArray<Auth>;\n  url: Url;\n}\n\nexport interface ResolvedRequestOptions<\n  TResponseStyle extends ResponseStyle = 'fields',\n  ThrowOnError extends boolean = boolean,\n  Url extends string = string,\n> extends RequestOptions<unknown, TResponseStyle, ThrowOnError, Url> {\n  serializedBody?: string;\n}\n\nexport type RequestResult<\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = boolean,\n  TResponseStyle extends ResponseStyle = 'fields',\n> = ThrowOnError extends true\n  ? Promise<\n      TResponseStyle extends 'data'\n        ? TData extends Record<string, unknown>\n          ? TData[keyof TData]\n          : TData\n        : {\n            data: TData extends Record<string, unknown> ? TData[keyof TData] : TData;\n            request: Request;\n            response: Response;\n          }\n    >\n  : Promise<\n      TResponseStyle extends 'data'\n        ? (TData extends Record<string, unknown> ? TData[keyof TData] : TData) | undefined\n        : (\n            | {\n                data: TData extends Record<string, unknown> ? TData[keyof TData] : TData;\n                error: undefined;\n              }\n            | {\n                data: undefined;\n                error: TError extends Record<string, unknown> ? TError[keyof TError] : TError;\n              }\n          ) & {\n            request: Request;\n            response: Response;\n          }\n    >;\n\nexport interface ClientOptions {\n  baseUrl?: string;\n  responseStyle?: ResponseStyle;\n  throwOnError?: boolean;\n}\n\ntype MethodFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'>,\n) => RequestResult<TData, TError, ThrowOnError, TResponseStyle>;\n\ntype SseFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'>,\n) => Promise<ServerSentEventsResult<TData, TError>>;\n\ntype RequestFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'> &\n    Pick<Required<RequestOptions<TData, TResponseStyle, ThrowOnError>>, 'method'>,\n) => RequestResult<TData, TError, ThrowOnError, TResponseStyle>;\n\ntype BuildUrlFn = <\n  TData extends {\n    body?: unknown;\n    path?: Record<string, unknown>;\n    query?: Record<string, unknown>;\n    url: string;\n  },\n>(\n  options: TData & Options<TData>,\n) => string;\n\nexport type Client = CoreClient<RequestFn, Config, MethodFn, BuildUrlFn, SseFn> & {\n  interceptors: Middleware<Request, Response, unknown, ResolvedRequestOptions>;\n};\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 = ClientOptions> = (\n  override?: Config<ClientOptions & T>,\n) => Config<Required<ClientOptions> & T>;\n\nexport interface TDataShape {\n  body?: unknown;\n  headers?: unknown;\n  path?: unknown;\n  query?: unknown;\n  url: string;\n}\n\ntype OmitKeys<T, K> = Pick<T, Exclude<keyof T, K>>;\n\nexport type Options<\n  TData extends TDataShape = TDataShape,\n  ThrowOnError extends boolean = boolean,\n  TResponse = unknown,\n  TResponseStyle extends ResponseStyle = 'fields',\n> = OmitKeys<\n  RequestOptions<TResponse, TResponseStyle, ThrowOnError>,\n  'body' | 'path' | 'query' | 'url'\n> &\n  ([TData] extends [never] ? unknown : Omit<TData, 'url'>);\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-ofetch/base-url-strict/client/utils.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { FetchOptions as OfetchOptions, ResponseType as OfetchResponseType } from 'ofetch';\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 {\n  Client,\n  ClientOptions,\n  Config,\n  RequestOptions,\n  ResolvedRequestOptions,\n  ResponseStyle,\n} 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\n/**\n * Map our parseAs value to ofetch responseType when not explicitly provided.\n */\nexport const mapParseAsToResponseType = (\n  parseAs: Config['parseAs'] | undefined,\n  explicit?: OfetchResponseType,\n): OfetchResponseType | undefined => {\n  if (explicit) return explicit;\n  switch (parseAs) {\n    case 'arrayBuffer':\n    case 'blob':\n    case 'json':\n    case 'text':\n    case 'stream':\n      return parseAs;\n    case 'formData':\n    case 'auto':\n    default:\n      return undefined; // let ofetch auto-detect\n  }\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\n/**\n * Heuristic to detect whether a request body can be safely retried.\n */\nexport const isRepeatableBody = (body: unknown): boolean => {\n  if (body == null) return true; // undefined/null treated as no-body\n  if (typeof body === 'string') return true;\n  if (typeof URLSearchParams !== 'undefined' && body instanceof URLSearchParams) return true;\n  if (typeof Uint8Array !== 'undefined' && body instanceof Uint8Array) return true;\n  if (typeof ArrayBuffer !== 'undefined' && body instanceof ArrayBuffer) return true;\n  if (typeof Blob !== 'undefined' && body instanceof Blob) return true;\n  if (typeof FormData !== 'undefined' && body instanceof FormData) return true;\n  // Streams are not repeatable\n  if (typeof ReadableStream !== 'undefined' && body instanceof ReadableStream) return false;\n  // Default: assume non-repeatable for unknown structured bodies\n  return false;\n};\n\n/**\n * Small helper to unify data vs fields return style.\n */\nexport const wrapDataReturn = <T>(\n  data: T,\n  result: { request: Request; response: Response },\n  responseStyle: ResponseStyle | undefined,\n): T | ((T extends Record<string, unknown> ? { data: T } : { data: T }) & typeof result) =>\n  (responseStyle ?? 'fields') === 'data' ? (data as any) : ({ data, ...result } as any);\n\n/**\n * Small helper to unify error vs fields return style.\n */\nexport const wrapErrorReturn = <E>(\n  error: E,\n  result: { request: Request; response: Response },\n  responseStyle: ResponseStyle | undefined,\n):\n  | undefined\n  | ((E extends Record<string, unknown> ? { error: E } : { error: E }) & typeof result) =>\n  (responseStyle ?? 'fields') === 'data' ? undefined : ({ error, ...result } as any);\n\n/**\n * Build options for $ofetch.raw from our resolved opts and body.\n */\nexport const buildOfetchOptions = (\n  opts: ResolvedRequestOptions,\n  body: BodyInit | null | undefined,\n  responseType: OfetchResponseType | undefined,\n  retryOverride?: OfetchOptions['retry'],\n): OfetchOptions =>\n  ({\n    agent: opts.agent as OfetchOptions['agent'],\n    body,\n    credentials: opts.credentials as OfetchOptions['credentials'],\n    dispatcher: opts.dispatcher as OfetchOptions['dispatcher'],\n    headers: opts.headers as Headers,\n    ignoreResponseError: (opts.ignoreResponseError as OfetchOptions['ignoreResponseError']) ?? true,\n    method: opts.method,\n    onRequest: opts.onRequest as OfetchOptions['onRequest'],\n    onRequestError: opts.onRequestError as OfetchOptions['onRequestError'],\n    onResponse: opts.onResponse as OfetchOptions['onResponse'],\n    onResponseError: opts.onResponseError as OfetchOptions['onResponseError'],\n    parseResponse: opts.parseResponse as OfetchOptions['parseResponse'],\n    // URL already includes query\n    query: undefined,\n    responseType,\n    retry: retryOverride ?? (opts.retry as OfetchOptions['retry']),\n    retryDelay: opts.retryDelay as OfetchOptions['retryDelay'],\n    retryStatusCodes: opts.retryStatusCodes as OfetchOptions['retryStatusCodes'],\n    signal: opts.signal,\n    timeout: opts.timeout as number | undefined,\n  }) as OfetchOptions;\n\n/**\n * Parse a successful response, handling empty bodies and stream cases.\n */\nexport const parseSuccess = async (\n  response: Response,\n  opts: ResolvedRequestOptions,\n  ofetchResponseType?: OfetchResponseType,\n): Promise<unknown> => {\n  // Stream requested: return stream body\n  if (ofetchResponseType === 'stream') {\n    return response.body;\n  }\n\n  const inferredParseAs =\n    (opts.parseAs === 'auto' ? getParseAs(response.headers.get('Content-Type')) : opts.parseAs) ??\n    'json';\n\n  // Handle empty responses\n  if (response.status === 204 || response.headers.get('Content-Length') === '0') {\n    switch (inferredParseAs) {\n      case 'arrayBuffer':\n      case 'blob':\n      case 'text':\n        return await (response as any)[inferredParseAs]();\n      case 'formData':\n        return new FormData();\n      case 'stream':\n        return response.body;\n      default:\n        return {};\n    }\n  }\n\n  // Prefer ofetch-populated data unless we explicitly need raw `formData`\n  let data: unknown = (response as any)._data;\n  if (inferredParseAs === 'formData' || typeof data === 'undefined') {\n    switch (inferredParseAs) {\n      case 'arrayBuffer':\n      case 'blob':\n      case 'formData':\n      case 'text':\n        data = await (response as any)[inferredParseAs]();\n        break;\n      case 'json': {\n        // Some servers return 200 with no Content-Length and empty body.\n        // response.json() would throw; detect empty via clone().text() first.\n        const txt = await response.clone().text();\n        if (!txt) {\n          data = {};\n        } else {\n          data = await (response as any).json();\n        }\n        break;\n      }\n      case 'stream':\n        return response.body;\n    }\n  }\n\n  if (inferredParseAs === 'json') {\n    if (opts.responseValidator) {\n      await opts.responseValidator(data);\n    }\n    if (opts.responseTransformer) {\n      data = await opts.responseTransformer(data);\n    }\n  }\n\n  return data;\n};\n\n/**\n * Parse an error response payload.\n */\nexport const parseError = async (response: Response): Promise<unknown> => {\n  let error: unknown = (response as any)._data;\n  if (typeof error === 'undefined') {\n    const textError = await response.text();\n    try {\n      error = JSON.parse(textError);\n    } catch {\n      error = textError;\n    }\n  }\n  return error ?? ({} as string);\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  ignoreResponseError: true,\n  parseAs: 'auto',\n  querySerializer: defaultQuerySerializer,\n  ...override,\n});\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-ofetch/base-url-strict/client.gen.ts",
    "content": "// 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: 'http://localhost:3000/base' }));\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-ofetch/base-url-strict/core/auth.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-ofetch/base-url-strict/core/bodySerializer.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-ofetch/base-url-strict/core/params.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-ofetch/base-url-strict/core/pathSerializer.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-ofetch/base-url-strict/core/queryKeySerializer.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\n/**\n * JSON-friendly union that mirrors what Pinia Colada can hash.\n */\nexport type JsonValue =\n  | null\n  | string\n  | number\n  | boolean\n  | JsonValue[]\n  | { [key: string]: JsonValue };\n\n/**\n * Replacer that converts non-JSON values (bigint, Date, etc.) to safe substitutes.\n */\nexport const queryKeyJsonReplacer = (_key: string, value: unknown) => {\n  if (value === undefined || typeof value === 'function' || typeof value === 'symbol') {\n    return undefined;\n  }\n  if (typeof value === 'bigint') {\n    return value.toString();\n  }\n  if (value instanceof Date) {\n    return value.toISOString();\n  }\n  return value;\n};\n\n/**\n * Safely stringifies a value and parses it back into a JsonValue.\n */\nexport const stringifyToJsonValue = (input: unknown): JsonValue | undefined => {\n  try {\n    const json = JSON.stringify(input, queryKeyJsonReplacer);\n    if (json === undefined) {\n      return undefined;\n    }\n    return JSON.parse(json) as JsonValue;\n  } catch {\n    return undefined;\n  }\n};\n\n/**\n * Detects plain objects (including objects with a null prototype).\n */\nconst isPlainObject = (value: unknown): value is Record<string, unknown> => {\n  if (value === null || typeof value !== 'object') {\n    return false;\n  }\n  const prototype = Object.getPrototypeOf(value as object);\n  return prototype === Object.prototype || prototype === null;\n};\n\n/**\n * Turns URLSearchParams into a sorted JSON object for deterministic keys.\n */\nconst serializeSearchParams = (params: URLSearchParams): JsonValue => {\n  const entries = Array.from(params.entries()).sort(([a], [b]) => a.localeCompare(b));\n  const result: Record<string, JsonValue> = {};\n\n  for (const [key, value] of entries) {\n    const existing = result[key];\n    if (existing === undefined) {\n      result[key] = value;\n      continue;\n    }\n\n    if (Array.isArray(existing)) {\n      (existing as string[]).push(value);\n    } else {\n      result[key] = [existing, value];\n    }\n  }\n\n  return result;\n};\n\n/**\n * Normalizes any accepted value into a JSON-friendly shape for query keys.\n */\nexport const serializeQueryKeyValue = (value: unknown): JsonValue | undefined => {\n  if (value === null) {\n    return null;\n  }\n\n  if (typeof value === 'string' || typeof value === 'number' || typeof value === 'boolean') {\n    return value;\n  }\n\n  if (value === undefined || typeof value === 'function' || typeof value === 'symbol') {\n    return undefined;\n  }\n\n  if (typeof value === 'bigint') {\n    return value.toString();\n  }\n\n  if (value instanceof Date) {\n    return value.toISOString();\n  }\n\n  if (Array.isArray(value)) {\n    return stringifyToJsonValue(value);\n  }\n\n  if (typeof URLSearchParams !== 'undefined' && value instanceof URLSearchParams) {\n    return serializeSearchParams(value);\n  }\n\n  if (isPlainObject(value)) {\n    return stringifyToJsonValue(value);\n  }\n\n  return undefined;\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-ofetch/base-url-strict/core/serverSentEvents.gen.ts",
    "content": "// 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 const 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            // Normalize line endings: CRLF -> LF, then CR -> LF\n            buffer = buffer.replace(/\\r\\n/g, '\\n').replace(/\\r/g, '\\n');\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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-ofetch/base-url-strict/core/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { Auth, AuthToken } from './auth.gen';\nimport type { BodySerializer, QuerySerializer, QuerySerializerOptions } from './bodySerializer.gen';\n\nexport type HttpMethod =\n  | 'connect'\n  | 'delete'\n  | 'get'\n  | 'head'\n  | 'options'\n  | 'patch'\n  | 'post'\n  | 'put'\n  | 'trace';\n\nexport type Client<\n  RequestFn = never,\n  Config = unknown,\n  MethodFn = never,\n  BuildUrlFn = never,\n  SseFn = never,\n> = {\n  /**\n   * Returns the final request URL.\n   */\n  buildUrl: BuildUrlFn;\n  getConfig: () => Config;\n  request: RequestFn;\n  setConfig: (config: Config) => Config;\n} & {\n  [K in HttpMethod]: MethodFn;\n} & ([SseFn] extends [never] ? { sse?: never } : { sse: { [K in HttpMethod]: SseFn } });\n\nexport interface Config {\n  /**\n   * Auth token or a function returning auth token. The resolved value will be\n   * added to the request payload as defined by its `security` array.\n   */\n  auth?: ((auth: Auth) => Promise<AuthToken> | AuthToken) | AuthToken;\n  /**\n   * A function for serializing request body parameter. By default,\n   * {@link JSON.stringify()} will be used.\n   */\n  bodySerializer?: BodySerializer | null;\n  /**\n   * An object containing any HTTP headers that you want to pre-populate your\n   * `Headers` object with.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/Headers/Headers#init See more}\n   */\n  headers?:\n    | RequestInit['headers']\n    | Record<\n        string,\n        string | number | boolean | (string | number | boolean)[] | null | undefined | unknown\n      >;\n  /**\n   * The request method.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/fetch#method See more}\n   */\n  method?: Uppercase<HttpMethod>;\n  /**\n   * A function for serializing request query parameters. By default, arrays\n   * will be exploded in form style, objects will be exploded in deepObject\n   * style, and reserved characters are percent-encoded.\n   *\n   * This method will have no effect if the native `paramsSerializer()` Axios\n   * API function is used.\n   *\n   * {@link https://swagger.io/docs/specification/serialization/#query View examples}\n   */\n  querySerializer?: QuerySerializer | QuerySerializerOptions;\n  /**\n   * A function validating request data. This is useful if you want to ensure\n   * the request conforms to the desired shape, so it can be safely sent to\n   * the server.\n   */\n  requestValidator?: (data: unknown) => Promise<unknown>;\n  /**\n   * A function transforming response data before it's returned. This is useful\n   * for post-processing data, e.g. converting ISO strings into Date objects.\n   */\n  responseTransformer?: (data: unknown) => Promise<unknown>;\n  /**\n   * A function validating response data. This is useful if you want to ensure\n   * the response conforms to the desired shape, so it can be safely passed to\n   * the transformers and returned to the user.\n   */\n  responseValidator?: (data: unknown) => Promise<unknown>;\n}\n\ntype IsExactlyNeverOrNeverUndefined<T> = [T] extends [never]\n  ? true\n  : [T] extends [never | undefined]\n    ? [undefined] extends [T]\n      ? false\n      : true\n    : false;\n\nexport type OmitNever<T extends Record<string, unknown>> = {\n  [K in keyof T as IsExactlyNeverOrNeverUndefined<T[K]> extends true ? never : K]: T[K];\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-ofetch/base-url-strict/core/utils.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-ofetch/base-url-strict/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type { _3eNum1Период, _400, AdditionalPropertiesIntegerIssue, AdditionalPropertiesUnknownIssue, AdditionalPropertiesUnknownIssue2, AdditionalPropertiesUnknownIssue3, AdditionalPropertiesUnknownIssueWritable, AnyOfAnyAndNull, AnyOfArrays, ApiVVersionODataControllerCountData, ApiVVersionODataControllerCountResponse, ApiVVersionODataControllerCountResponses, ArrayWithAnyOfProperties, ArrayWithArray, ArrayWithBooleans, ArrayWithNumbers, ArrayWithProperties, ArrayWithReferences, ArrayWithStrings, CallToTestOrderOfParamsData, CallWithDefaultOptionalParametersData, CallWithDefaultParametersData, CallWithDescriptionsData, CallWithDuplicateResponsesData, CallWithDuplicateResponsesError, CallWithDuplicateResponsesErrors, CallWithDuplicateResponsesResponse, CallWithDuplicateResponsesResponses, CallWithNoContentResponseData, CallWithNoContentResponseResponse, CallWithNoContentResponseResponses, CallWithParametersData, CallWithResponseAndNoContentResponseData, CallWithResponseAndNoContentResponseResponse, CallWithResponseAndNoContentResponseResponses, CallWithResponseData, CallWithResponseResponse, CallWithResponseResponses, CallWithResponsesData, CallWithResponsesError, CallWithResponsesErrors, CallWithResponsesResponse, CallWithResponsesResponses, CallWithResultFromHeaderData, CallWithResultFromHeaderErrors, CallWithResultFromHeaderResponses, CallWithWeirdParameterNamesData, CamelCaseCommentWithBreaks, CharactersInDescription, ClientOptions, CollectionFormatData, CommentWithBackticks, CommentWithBackticksAndQuotes, CommentWithBreaks, CommentWithExpressionPlaceholders, CommentWithQuotes, CommentWithReservedCharacters, CommentWithSlashes, ComplexParamsData, ComplexParamsResponse, ComplexParamsResponses, ComplexTypesData, ComplexTypesErrors, ComplexTypesResponse, ComplexTypesResponses, CompositionBaseModel, CompositionExtendedModel, CompositionWithAllOfAndNullable, CompositionWithAnyOf, CompositionWithAnyOfAndNullable, CompositionWithAnyOfAnonymous, CompositionWithNestedAnyAndTypeNull, CompositionWithNestedAnyOfAndNull, CompositionWithOneOf, CompositionWithOneOfAndComplexArrayDictionary, CompositionWithOneOfAndNullable, CompositionWithOneOfAndProperties, CompositionWithOneOfAndSimpleArrayDictionary, CompositionWithOneOfAndSimpleDictionary, CompositionWithOneOfAnonymous, CompositionWithOneOfDiscriminator, ConstValue, Default, DeleteCallWithoutParametersAndResponseData, DeleteFooData, DeleteFooData2, DeleteFooData3, DeprecatedCallData, DeprecatedModel, DictionaryWithArray, DictionaryWithDictionary, DictionaryWithProperties, DictionaryWithPropertiesAndAdditionalProperties, DictionaryWithReference, DictionaryWithString, DummyAData, DummyAResponse, DummyAResponses, DummyBData, DummyBResponse, DummyBResponses, DuplicateName2Data, DuplicateName3Data, DuplicateName4Data, DuplicateNameData, EnumFromDescription, EnumWithExtensions, EnumWithNumbers, EnumWithReplacedCharacters, EnumWithStrings, EnumWithXEnumNames, ExportData, ExternalRefA, ExternalRefB, ExternalSharedModel, File, FileResponseData, FileResponseResponse, FileResponseResponses, FileWritable, FooWowData, FooWowResponses, FreeFormObjectWithAdditionalPropertiesEqEmptyObject, FreeFormObjectWithAdditionalPropertiesEqTrue, FreeFormObjectWithoutAdditionalProperties, GenericSchemaDuplicateIssue1SystemBoolean, GenericSchemaDuplicateIssue1SystemBooleanWritable, GenericSchemaDuplicateIssue1SystemString, GenericSchemaDuplicateIssue1SystemStringWritable, GetApiVbyApiVersionSimpleOperationData, GetApiVbyApiVersionSimpleOperationError, GetApiVbyApiVersionSimpleOperationErrors, GetApiVbyApiVersionSimpleOperationResponse, GetApiVbyApiVersionSimpleOperationResponses, GetCallWithOptionalParamData, GetCallWithoutParametersAndResponseData, HeadCallWithoutParametersAndResponseData, Import, ImportData, ImportResponse, ImportResponses, IoK8sApimachineryPkgApisMetaV1DeleteOptions, IoK8sApimachineryPkgApisMetaV1Preconditions, ModelCircle, ModelFromZendesk, ModelSquare, ModelThatExtends, ModelThatExtendsExtends, ModelWithAdditionalPropertiesEqTrue, ModelWithAdditionalPropertiesRef, ModelWithAnyOfConstantSizeArray, ModelWithAnyOfConstantSizeArrayAndIntersect, ModelWithAnyOfConstantSizeArrayNullable, ModelWithAnyOfConstantSizeArrayWithNSizeAndOptions, ModelWithAnyOfConstantSizeArrayWithNSizeAndOptionsWritable, ModelWithArray, ModelWithArrayReadOnlyAndWriteOnly, ModelWithArrayReadOnlyAndWriteOnlyWritable, ModelWithBackticksInDescription, ModelWithBoolean, ModelWithCircularReference, ModelWithConst, ModelWithConstantSizeArray, ModelWithDictionary, ModelWithDuplicateImports, ModelWithDuplicateProperties, ModelWithEnum, ModelWithEnumFromDescription, ModelWithEnumWithHyphen, ModelWithInteger, ModelWithNestedArrayEnums, ModelWithNestedArrayEnumsData, ModelWithNestedArrayEnumsDataBar, ModelWithNestedArrayEnumsDataFoo, ModelWithNestedCompositionEnums, ModelWithNestedEnums, ModelWithNestedProperties, ModelWithNullableObject, ModelWithNullableString, ModelWithNumericEnumUnion, ModelWithOneOfAndProperties, ModelWithOneOfEnum, ModelWithOrderedProperties, ModelWithPattern, ModelWithPatternWritable, ModelWithPrefixItemsConstantSizeArray, ModelWithProperties, ModelWithPropertiesWritable, ModelWithReadOnlyAndWriteOnly, ModelWithReadOnlyAndWriteOnlyWritable, ModelWithReference, ModelWithReferenceWritable, ModelWithString, ModelWithStringError, MultipartRequestData, MultipartResponseData, MultipartResponseResponse, MultipartResponseResponses, NestedAnyOfArraysNullable, NonAsciiæøåÆøÅöôêÊ字符串Data, NonAsciiæøåÆøÅöôêÊ字符串Response, NonAsciiæøåÆøÅöôêÊ字符串Responses, NonAsciiStringæøåÆøÅöôêÊ字符串, NullableObject, OneOfAllOfIssue, OneOfAllOfIssueWritable, OptionsCallWithoutParametersAndResponseData, Pageable, ParameterSimpleParameterUnused, PatchApiVbyApiVersionNoTagData, PatchApiVbyApiVersionNoTagResponses, PatchCallWithoutParametersAndResponseData, PostApiVbyApiVersionFormDataData, PostApiVbyApiVersionRequestBodyData, PostCallWithOptionalParamData, PostCallWithOptionalParamResponse, PostCallWithOptionalParamResponses, PostCallWithoutParametersAndResponseData, PostServiceWithEmptyTagResponse, PostServiceWithEmptyTagResponse2, PutCallWithoutParametersAndResponseData, PutWithFormUrlEncodedData, SchemaWithFormRestrictedKeys, SimpleBoolean, SimpleFile, SimpleFormData, SimpleInteger, SimpleParameter, SimpleReference, SimpleRequestBody, SimpleString, SimpleStringWithPattern, TestErrorCodeData, TestErrorCodeErrors, TestErrorCodeResponses, TypesData, TypesResponse, TypesResponses, UploadFileData, UploadFileResponse, UploadFileResponses, XFooBar } from './types.gen';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-ofetch/base-url-strict/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type ClientOptions = {\n    baseUrl: 'http://localhost:3000/base';\n};\n\n/**\n * Model with number-only name\n */\nexport type _400 = string;\n\n/**\n * External ref to shared model (A)\n */\nexport type ExternalRefA = ExternalSharedModel;\n\n/**\n * External ref to shared model (B)\n */\nexport type ExternalRefB = ExternalSharedModel;\n\n/**\n * Testing multiline comments in string: First line\n * Second line\n *\n * Fourth line\n */\nexport type CamelCaseCommentWithBreaks = number;\n\n/**\n * Testing multiline comments in string: First line\n * Second line\n *\n * Fourth line\n */\nexport type CommentWithBreaks = number;\n\n/**\n * Testing backticks in string: `backticks` and ```multiple backticks``` should work\n */\nexport type CommentWithBackticks = number;\n\n/**\n * Testing backticks and quotes in string: `backticks`, 'quotes', \"double quotes\" and ```multiple backticks``` should work\n */\nexport type CommentWithBackticksAndQuotes = number;\n\n/**\n * Testing slashes in string: \\backwards\\\\\\ and /forwards/// should work\n */\nexport type CommentWithSlashes = number;\n\n/**\n * Testing expression placeholders in string: ${expression} should work\n */\nexport type CommentWithExpressionPlaceholders = number;\n\n/**\n * Testing quotes in string: 'single quote''' and \"double quotes\"\"\" should work\n */\nexport type CommentWithQuotes = number;\n\n/**\n * Testing reserved characters in string: * inline * and ** inline ** should work\n */\nexport type CommentWithReservedCharacters = number;\n\n/**\n * This is a simple number\n */\nexport type SimpleInteger = number;\n\n/**\n * This is a simple boolean\n */\nexport type SimpleBoolean = boolean;\n\n/**\n * This is a simple string\n */\nexport type SimpleString = string;\n\n/**\n * A string with non-ascii (unicode) characters valid in typescript identifiers (æøåÆØÅöÔèÈ字符串)\n */\nexport type NonAsciiStringæøåÆøÅöôêÊ字符串 = string;\n\n/**\n * This is a simple file\n */\nexport type SimpleFile = Blob | File;\n\n/**\n * This is a simple reference\n */\nexport type SimpleReference = ModelWithString;\n\n/**\n * This is a simple string\n */\nexport type SimpleStringWithPattern = string | null;\n\n/**\n * This is a simple enum with strings\n */\nexport type EnumWithStrings = 'Success' | 'Warning' | 'Error' | '\\'Single Quote\\'' | '\"Double Quotes\"' | 'Non-ascii: øæåôöØÆÅÔÖ字符串';\n\nexport type EnumWithReplacedCharacters = '\\'Single Quote\\'' | '\"Double Quotes\"' | 'øæåôöØÆÅÔÖ字符串' | 3.1 | '';\n\n/**\n * This is a simple enum with numbers\n */\nexport type EnumWithNumbers = 1 | 2 | 3 | 1.1 | 1.2 | 1.3 | 100 | 200 | 300 | -100 | -200 | -300 | -1.1 | -1.2 | -1.3;\n\n/**\n * Success=1,Warning=2,Error=3\n */\nexport type EnumFromDescription = number;\n\n/**\n * This is a simple enum with numbers\n */\nexport type EnumWithExtensions = 200 | 400 | 500;\n\nexport type EnumWithXEnumNames = 0 | 1 | 2;\n\n/**\n * This is a simple array with numbers\n */\nexport type ArrayWithNumbers = Array<number>;\n\n/**\n * This is a simple array with booleans\n */\nexport type ArrayWithBooleans = Array<boolean>;\n\n/**\n * This is a simple array with strings\n */\nexport type ArrayWithStrings = Array<string>;\n\n/**\n * This is a simple array with references\n */\nexport type ArrayWithReferences = Array<ModelWithString>;\n\n/**\n * This is a simple array containing an array\n */\nexport type ArrayWithArray = Array<Array<ModelWithString>>;\n\n/**\n * This is a simple array with properties\n */\nexport type ArrayWithProperties = Array<{\n    '16x16'?: CamelCaseCommentWithBreaks;\n    bar?: string;\n}>;\n\n/**\n * This is a simple array with any of properties\n */\nexport type ArrayWithAnyOfProperties = Array<{\n    foo?: string;\n} | {\n    bar?: string;\n}>;\n\nexport type AnyOfAnyAndNull = {\n    data?: unknown | null;\n};\n\n/**\n * This is a simple array with any of properties\n */\nexport type AnyOfArrays = {\n    results?: Array<{\n        foo?: string;\n    } | {\n        bar?: string;\n    }>;\n};\n\n/**\n * This is a string dictionary\n */\nexport type DictionaryWithString = {\n    [key: string]: string;\n};\n\nexport type DictionaryWithPropertiesAndAdditionalProperties = {\n    foo?: number;\n    bar?: boolean;\n    [key: string]: string | number | boolean | undefined;\n};\n\n/**\n * This is a string reference\n */\nexport type DictionaryWithReference = {\n    [key: string]: ModelWithString;\n};\n\n/**\n * This is a complex dictionary\n */\nexport type DictionaryWithArray = {\n    [key: string]: Array<ModelWithString>;\n};\n\n/**\n * This is a string dictionary\n */\nexport type DictionaryWithDictionary = {\n    [key: string]: {\n        [key: string]: string;\n    };\n};\n\n/**\n * This is a complex dictionary\n */\nexport type DictionaryWithProperties = {\n    [key: string]: {\n        foo?: string;\n        bar?: string;\n    };\n};\n\n/**\n * This is a model with one number property\n */\nexport type ModelWithInteger = {\n    /**\n     * This is a simple number property\n     */\n    prop?: number;\n};\n\n/**\n * This is a model with one boolean property\n */\nexport type ModelWithBoolean = {\n    /**\n     * This is a simple boolean property\n     */\n    prop?: boolean;\n};\n\n/**\n * This is a model with one string property\n */\nexport type ModelWithString = {\n    /**\n     * This is a simple string property\n     */\n    prop?: string;\n};\n\n/**\n * This is a model with one string property\n */\nexport type ModelWithStringError = {\n    /**\n     * This is a simple string property\n     */\n    prop?: string;\n};\n\n/**\n * `Comment` or `VoiceComment`. The JSON object for adding voice comments to tickets is different. See [Adding voice comments to tickets](/documentation/ticketing/managing-tickets/adding-voice-comments-to-tickets)\n */\nexport type ModelFromZendesk = string;\n\n/**\n * This is a model with one string property\n */\nexport type ModelWithNullableString = {\n    /**\n     * This is a simple string property\n     */\n    nullableProp1?: string | null;\n    /**\n     * This is a simple string property\n     */\n    nullableRequiredProp1: string | null;\n    /**\n     * This is a simple string property\n     */\n    nullableProp2?: string | null;\n    /**\n     * This is a simple string property\n     */\n    nullableRequiredProp2: string | null;\n    /**\n     * This is a simple enum with strings\n     */\n    'foo_bar-enum'?: 'Success' | 'Warning' | 'Error' | 'ØÆÅ字符串';\n};\n\n/**\n * This is a model with one enum\n */\nexport type ModelWithEnum = {\n    /**\n     * This is a simple enum with strings\n     */\n    'foo_bar-enum'?: 'Success' | 'Warning' | 'Error' | 'ØÆÅ字符串';\n    /**\n     * These are the HTTP error code enums\n     */\n    statusCode?: '100' | '200 FOO' | '300 FOO_BAR' | '400 foo-bar' | '500 foo.bar' | '600 foo&bar';\n    /**\n     * Simple boolean enum\n     */\n    bool?: true;\n};\n\n/**\n * This is a model with one enum with escaped name\n */\nexport type ModelWithEnumWithHyphen = {\n    /**\n     * Foo-Bar-Baz-Qux\n     */\n    'foo-bar-baz-qux'?: '3.0';\n};\n\n/**\n * This is a model with one enum\n */\nexport type ModelWithEnumFromDescription = {\n    /**\n     * Success=1,Warning=2,Error=3\n     */\n    test?: number;\n};\n\n/**\n * This is a model with nested enums\n */\nexport type ModelWithNestedEnums = {\n    dictionaryWithEnum?: {\n        [key: string]: 'Success' | 'Warning' | 'Error';\n    };\n    dictionaryWithEnumFromDescription?: {\n        [key: string]: number;\n    };\n    arrayWithEnum?: Array<'Success' | 'Warning' | 'Error'>;\n    arrayWithDescription?: Array<number>;\n    /**\n     * This is a simple enum with strings\n     */\n    'foo_bar-enum'?: 'Success' | 'Warning' | 'Error' | 'ØÆÅ字符串';\n};\n\n/**\n * This is a model with one property containing a reference\n */\nexport type ModelWithReference = {\n    prop?: ModelWithProperties;\n};\n\n/**\n * This is a model with one property containing an array\n */\nexport type ModelWithArrayReadOnlyAndWriteOnly = {\n    prop?: Array<ModelWithReadOnlyAndWriteOnly>;\n    propWithFile?: Array<Blob | File>;\n    propWithNumber?: Array<number>;\n};\n\n/**\n * This is a model with one property containing an array\n */\nexport type ModelWithArray = {\n    prop?: Array<ModelWithString>;\n    propWithFile?: Array<Blob | File>;\n    propWithNumber?: Array<number>;\n};\n\n/**\n * This is a model with one property containing a dictionary\n */\nexport type ModelWithDictionary = {\n    prop?: {\n        [key: string]: string;\n    };\n};\n\n/**\n * This is a deprecated model with a deprecated property\n *\n * @deprecated\n */\nexport type DeprecatedModel = {\n    /**\n     * This is a deprecated property\n     *\n     * @deprecated\n     */\n    prop?: string;\n};\n\n/**\n * This is a model with one property containing a circular reference\n */\nexport type ModelWithCircularReference = {\n    prop?: ModelWithCircularReference;\n};\n\n/**\n * This is a model with one property with a 'one of' relationship\n */\nexport type CompositionWithOneOf = {\n    propA?: ModelWithString | ModelWithEnum | ModelWithArray | ModelWithDictionary;\n};\n\n/**\n * This is a model with one property with a 'one of' relationship where the options are not $ref\n */\nexport type CompositionWithOneOfAnonymous = {\n    propA?: {\n        propA?: string;\n    } | string | number;\n};\n\n/**\n * Circle\n */\nexport type ModelCircle = {\n    kind: string;\n    radius?: number;\n};\n\n/**\n * Square\n */\nexport type ModelSquare = {\n    kind: string;\n    sideLength?: number;\n};\n\n/**\n * This is a model with one property with a 'one of' relationship where the options are not $ref\n */\nexport type CompositionWithOneOfDiscriminator = ({\n    kind: 'circle';\n} & ModelCircle) | ({\n    kind: 'square';\n} & ModelSquare);\n\n/**\n * This is a model with one property with a 'any of' relationship\n */\nexport type CompositionWithAnyOf = {\n    propA?: ModelWithString | ModelWithEnum | ModelWithArray | ModelWithDictionary;\n};\n\n/**\n * This is a model with one property with a 'any of' relationship where the options are not $ref\n */\nexport type CompositionWithAnyOfAnonymous = {\n    propA?: {\n        propA?: string;\n    } | string | number;\n};\n\n/**\n * This is a model with nested 'any of' property with a type null\n */\nexport type CompositionWithNestedAnyAndTypeNull = {\n    propA?: Array<ModelWithDictionary | null> | Array<ModelWithArray | null>;\n};\n\nexport type _3eNum1Период = 'Bird' | 'Dog';\n\nexport type ConstValue = 'ConstValue';\n\n/**\n * This is a model with one property with a 'any of' relationship where the options are not $ref\n */\nexport type CompositionWithNestedAnyOfAndNull = {\n    /**\n     * Scopes\n     */\n    propA?: Array<_3eNum1Период | ConstValue> | null;\n};\n\n/**\n * This is a model with one property with a 'one of' relationship\n */\nexport type CompositionWithOneOfAndNullable = {\n    propA?: {\n        boolean?: boolean;\n    } | ModelWithEnum | ModelWithArray | ModelWithDictionary | null;\n};\n\n/**\n * This is a model that contains a simple dictionary within composition\n */\nexport type CompositionWithOneOfAndSimpleDictionary = {\n    propA?: boolean | {\n        [key: string]: number;\n    };\n};\n\n/**\n * This is a model that contains a dictionary of simple arrays within composition\n */\nexport type CompositionWithOneOfAndSimpleArrayDictionary = {\n    propA?: boolean | {\n        [key: string]: Array<boolean>;\n    };\n};\n\n/**\n * This is a model that contains a dictionary of complex arrays (composited) within composition\n */\nexport type CompositionWithOneOfAndComplexArrayDictionary = {\n    propA?: boolean | {\n        [key: string]: Array<number | string>;\n    };\n};\n\n/**\n * This is a model with one property with a 'all of' relationship\n */\nexport type CompositionWithAllOfAndNullable = {\n    propA?: ({\n        boolean?: boolean;\n    } & ModelWithEnum & ModelWithArray & ModelWithDictionary) | null;\n};\n\n/**\n * This is a model with one property with a 'any of' relationship\n */\nexport type CompositionWithAnyOfAndNullable = {\n    propA?: {\n        boolean?: boolean;\n    } | ModelWithEnum | ModelWithArray | ModelWithDictionary | null;\n};\n\n/**\n * This is a base model with two simple optional properties\n */\nexport type CompositionBaseModel = {\n    firstName?: string;\n    lastname?: string;\n};\n\n/**\n * This is a model that extends the base model\n */\nexport type CompositionExtendedModel = CompositionBaseModel & {\n    age: number;\n    firstName: string;\n    lastname: string;\n};\n\n/**\n * This is a model with one nested property\n */\nexport type ModelWithProperties = {\n    required: string;\n    readonly requiredAndReadOnly: string;\n    requiredAndNullable: string | null;\n    string?: string;\n    number?: number;\n    boolean?: boolean;\n    reference?: ModelWithString;\n    'property with space'?: string;\n    default?: string;\n    try?: string;\n    readonly '@namespace.string'?: string;\n    readonly '@namespace.integer'?: number;\n};\n\n/**\n * This is a model with one nested property\n */\nexport type ModelWithNestedProperties = {\n    readonly first: {\n        readonly second: {\n            readonly third: string | null;\n        } | null;\n    } | null;\n};\n\n/**\n * This is a model with duplicated properties\n */\nexport type ModelWithDuplicateProperties = {\n    prop?: ModelWithString;\n};\n\n/**\n * This is a model with ordered properties\n */\nexport type ModelWithOrderedProperties = {\n    zebra?: string;\n    apple?: string;\n    hawaii?: string;\n};\n\n/**\n * This is a model with duplicated imports\n */\nexport type ModelWithDuplicateImports = {\n    propA?: ModelWithString;\n    propB?: ModelWithString;\n    propC?: ModelWithString;\n};\n\n/**\n * This is a model that extends another model\n */\nexport type ModelThatExtends = ModelWithString & {\n    propExtendsA?: string;\n    propExtendsB?: ModelWithString;\n};\n\n/**\n * This is a model that extends another model\n */\nexport type ModelThatExtendsExtends = ModelWithString & ModelThatExtends & {\n    propExtendsC?: string;\n    propExtendsD?: ModelWithString;\n};\n\n/**\n * This is a model that contains a some patterns\n */\nexport type ModelWithPattern = {\n    key: string;\n    name: string;\n    readonly enabled?: boolean;\n    readonly modified?: string;\n    id?: string;\n    text?: string;\n    patternWithSingleQuotes?: string;\n    patternWithNewline?: string;\n    patternWithBacktick?: string;\n    patternWithUnicode?: string;\n};\n\nexport type File = {\n    /**\n     * Id\n     */\n    readonly id?: string;\n    /**\n     * Updated at\n     */\n    readonly updated_at?: string;\n    /**\n     * Created at\n     */\n    readonly created_at?: string;\n    /**\n     * Mime\n     */\n    mime: string;\n    /**\n     * File\n     */\n    readonly file?: string;\n};\n\nexport type Default = {\n    name?: string;\n};\n\nexport type Pageable = {\n    page?: number;\n    size?: number;\n    sort?: Array<string>;\n};\n\n/**\n * This is a free-form object without additionalProperties.\n */\nexport type FreeFormObjectWithoutAdditionalProperties = {\n    [key: string]: unknown;\n};\n\n/**\n * This is a free-form object with additionalProperties: true.\n */\nexport type FreeFormObjectWithAdditionalPropertiesEqTrue = {\n    [key: string]: unknown;\n};\n\n/**\n * This is a free-form object with additionalProperties: {}.\n */\nexport type FreeFormObjectWithAdditionalPropertiesEqEmptyObject = {\n    [key: string]: unknown;\n};\n\nexport type ModelWithConst = {\n    String?: 'String';\n    number?: 0;\n    null?: null;\n    withType?: 'Some string';\n};\n\n/**\n * This is a model with one property and additionalProperties: true\n */\nexport type ModelWithAdditionalPropertiesEqTrue = {\n    /**\n     * This is a simple string property\n     */\n    prop?: string;\n    [key: string]: unknown;\n};\n\nexport type NestedAnyOfArraysNullable = {\n    nullableArray?: Array<string | boolean> | null;\n};\n\nexport type CompositionWithOneOfAndProperties = ({\n    foo: SimpleParameter;\n} | {\n    bar: NonAsciiStringæøåÆøÅöôêÊ字符串;\n}) & {\n    baz: number | null;\n    qux: number;\n};\n\n/**\n * An object that can be null\n */\nexport type NullableObject = {\n    foo?: string;\n} | null;\n\n/**\n * Some % character\n */\nexport type CharactersInDescription = string;\n\nexport type ModelWithNullableObject = {\n    data?: NullableObject;\n};\n\n/**\n * An object with additional properties that can be null (anyOf ref + null)\n */\nexport type ModelWithAdditionalPropertiesRef = {\n    [key: string]: NullableObject | null;\n};\n\nexport type ModelWithOneOfEnum = {\n    foo: 'Bar';\n} | {\n    foo: 'Baz';\n} | {\n    foo: 'Qux';\n} | {\n    content: string;\n    foo: 'Quux';\n} | {\n    content: [\n        string,\n        string\n    ];\n    foo: 'Corge';\n};\n\nexport type ModelWithNestedArrayEnumsDataFoo = 'foo' | 'bar';\n\nexport type ModelWithNestedArrayEnumsDataBar = 'baz' | 'qux';\n\nexport type ModelWithNestedArrayEnumsData = {\n    foo?: Array<ModelWithNestedArrayEnumsDataFoo>;\n    bar?: Array<ModelWithNestedArrayEnumsDataBar>;\n};\n\nexport type ModelWithNestedArrayEnums = {\n    array_strings?: Array<string>;\n    data?: ModelWithNestedArrayEnumsData;\n};\n\nexport type ModelWithNestedCompositionEnums = {\n    foo?: ModelWithNestedArrayEnumsDataFoo;\n};\n\nexport type ModelWithReadOnlyAndWriteOnly = {\n    foo: string;\n    readonly bar: string;\n};\n\nexport type ModelWithConstantSizeArray = [\n    number,\n    number\n];\n\nexport type ModelWithAnyOfConstantSizeArray = [\n    number | string,\n    number | string,\n    number | string\n];\n\nexport type ModelWithPrefixItemsConstantSizeArray = [\n    ModelWithInteger,\n    number | string,\n    string\n];\n\nexport type ModelWithAnyOfConstantSizeArrayNullable = [\n    number | null | string,\n    number | null | string,\n    number | null | string\n];\n\nexport type ModelWithAnyOfConstantSizeArrayWithNSizeAndOptions = [\n    number | Import,\n    number | Import\n];\n\nexport type ModelWithAnyOfConstantSizeArrayAndIntersect = [\n    number & string,\n    number & string\n];\n\nexport type ModelWithNumericEnumUnion = {\n    /**\n     * Период\n     */\n    value?: -10 | -1 | 0 | 1 | 3 | 6 | 12;\n};\n\n/**\n * Some description with `back ticks`\n */\nexport type ModelWithBackticksInDescription = {\n    /**\n     * The template `that` should be used for parsing and importing the contents of the CSV file.\n     *\n     * <br/><p>There is one placeholder currently supported:<ul>     <li><b>${x}</b> - refers to the n-th column in the CSV file, e.g. ${1}, ${2}, ...)</li></ul><p>Example of a correct JSON template:</p>\n     * <pre>\n     * [\n     * {\n     * \"resourceType\": \"Asset\",\n     * \"identifier\": {\n     * \"name\": \"${1}\",\n     * \"domain\": {\n     * \"name\": \"${2}\",\n     * \"community\": {\n     * \"name\": \"Some Community\"\n     * }\n     * }\n     * },\n     * \"attributes\" : {\n     * \"00000000-0000-0000-0000-000000003115\" : [ {\n     * \"value\" : \"${3}\"\n     * } ],\n     * \"00000000-0000-0000-0000-000000000222\" : [ {\n     * \"value\" : \"${4}\"\n     * } ]\n     * }\n     * }\n     * ]\n     * </pre>\n     */\n    template?: string;\n};\n\nexport type ModelWithOneOfAndProperties = (SimpleParameter | NonAsciiStringæøåÆøÅöôêÊ字符串) & {\n    baz: number | null;\n    qux: number;\n};\n\n/**\n * Model used to test deduplication strategy (unused)\n */\nexport type ParameterSimpleParameterUnused = string;\n\n/**\n * Model used to test deduplication strategy\n */\nexport type PostServiceWithEmptyTagResponse = string;\n\n/**\n * Model used to test deduplication strategy\n */\nexport type PostServiceWithEmptyTagResponse2 = string;\n\n/**\n * Model used to test deduplication strategy\n */\nexport type DeleteFooData = string;\n\n/**\n * Model used to test deduplication strategy\n */\nexport type DeleteFooData2 = string;\n\n/**\n * Model with restricted keyword name\n */\nexport type Import = string;\n\nexport type SchemaWithFormRestrictedKeys = {\n    description?: string;\n    'x-enum-descriptions'?: string;\n    'x-enum-varnames'?: string;\n    'x-enumNames'?: string;\n    title?: string;\n    object?: {\n        description?: string;\n        'x-enum-descriptions'?: string;\n        'x-enum-varnames'?: string;\n        'x-enumNames'?: string;\n        title?: string;\n    };\n    array?: Array<{\n        description?: string;\n        'x-enum-descriptions'?: string;\n        'x-enum-varnames'?: string;\n        'x-enumNames'?: string;\n        title?: string;\n    }>;\n};\n\n/**\n * This schema was giving PascalCase transformations a hard time\n */\nexport type IoK8sApimachineryPkgApisMetaV1DeleteOptions = {\n    /**\n     * Must be fulfilled before a deletion is carried out. If not possible, a 409 Conflict status will be returned.\n     */\n    preconditions?: IoK8sApimachineryPkgApisMetaV1Preconditions;\n};\n\n/**\n * This schema was giving PascalCase transformations a hard time\n */\nexport type IoK8sApimachineryPkgApisMetaV1Preconditions = {\n    /**\n     * Specifies the target ResourceVersion\n     */\n    resourceVersion?: string;\n    /**\n     * Specifies the target UID.\n     */\n    uid?: string;\n};\n\nexport type AdditionalPropertiesUnknownIssue = {\n    [key: string]: string | number;\n};\n\nexport type AdditionalPropertiesUnknownIssue2 = {\n    [key: string]: string | number;\n};\n\nexport type AdditionalPropertiesUnknownIssue3 = string & {\n    entries: {\n        [key: string]: AdditionalPropertiesUnknownIssue;\n    };\n};\n\nexport type AdditionalPropertiesIntegerIssue = {\n    value: number;\n    [key: string]: number;\n};\n\nexport type OneOfAllOfIssue = ((ConstValue | GenericSchemaDuplicateIssue1SystemBoolean) & _3eNum1Период) | GenericSchemaDuplicateIssue1SystemString;\n\nexport type GenericSchemaDuplicateIssue1SystemBoolean = {\n    item?: boolean;\n    error?: string | null;\n    readonly hasError?: boolean;\n    data?: {\n        [key: string]: never;\n    };\n};\n\nexport type GenericSchemaDuplicateIssue1SystemString = {\n    item?: string | null;\n    error?: string | null;\n    readonly hasError?: boolean;\n};\n\nexport type ExternalSharedModel = {\n    id: string;\n    name?: string;\n};\n\n/**\n * This is a model with one property containing a reference\n */\nexport type ModelWithReferenceWritable = {\n    prop?: ModelWithPropertiesWritable;\n};\n\n/**\n * This is a model with one property containing an array\n */\nexport type ModelWithArrayReadOnlyAndWriteOnlyWritable = {\n    prop?: Array<ModelWithReadOnlyAndWriteOnlyWritable>;\n    propWithFile?: Array<Blob | File>;\n    propWithNumber?: Array<number>;\n};\n\n/**\n * This is a model with one nested property\n */\nexport type ModelWithPropertiesWritable = {\n    required: string;\n    requiredAndNullable: string | null;\n    string?: string;\n    number?: number;\n    boolean?: boolean;\n    reference?: ModelWithString;\n    'property with space'?: string;\n    default?: string;\n    try?: string;\n};\n\n/**\n * This is a model that contains a some patterns\n */\nexport type ModelWithPatternWritable = {\n    key: string;\n    name: string;\n    id?: string;\n    text?: string;\n    patternWithSingleQuotes?: string;\n    patternWithNewline?: string;\n    patternWithBacktick?: string;\n    patternWithUnicode?: string;\n};\n\nexport type FileWritable = {\n    /**\n     * Mime\n     */\n    mime: string;\n};\n\nexport type ModelWithReadOnlyAndWriteOnlyWritable = {\n    foo: string;\n    baz: string;\n};\n\nexport type ModelWithAnyOfConstantSizeArrayWithNSizeAndOptionsWritable = [\n    number | Import,\n    number | Import\n];\n\nexport type AdditionalPropertiesUnknownIssueWritable = {\n    [key: string]: string | number;\n};\n\nexport type OneOfAllOfIssueWritable = ((ConstValue | GenericSchemaDuplicateIssue1SystemBoolean) & _3eNum1Период) | GenericSchemaDuplicateIssue1SystemString;\n\nexport type GenericSchemaDuplicateIssue1SystemBooleanWritable = {\n    item?: boolean;\n    error?: string | null;\n    data?: {\n        [key: string]: never;\n    };\n};\n\nexport type GenericSchemaDuplicateIssue1SystemStringWritable = {\n    item?: string | null;\n    error?: string | null;\n};\n\n/**\n * This is a reusable parameter\n */\nexport type SimpleParameter = string;\n\n/**\n * Parameter with illegal characters\n */\nexport type XFooBar = ModelWithString;\n\n/**\n * A reusable request body\n */\nexport type SimpleRequestBody = ModelWithString;\n\n/**\n * A reusable request body\n */\nexport type SimpleFormData = ModelWithString;\n\nexport type ExportData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no+tag';\n};\n\nexport type PatchApiVbyApiVersionNoTagData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no+tag';\n};\n\nexport type PatchApiVbyApiVersionNoTagResponses = {\n    /**\n     * OK\n     */\n    default: unknown;\n};\n\nexport type ImportData = {\n    body: ModelWithReadOnlyAndWriteOnlyWritable | ModelWithArrayReadOnlyAndWriteOnlyWritable;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no+tag';\n};\n\nexport type ImportResponses = {\n    /**\n     * Success\n     */\n    200: ModelFromZendesk;\n    /**\n     * Default success response\n     */\n    default: ModelWithReadOnlyAndWriteOnly;\n};\n\nexport type ImportResponse = ImportResponses[keyof ImportResponses];\n\nexport type FooWowData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no+tag';\n};\n\nexport type FooWowResponses = {\n    /**\n     * OK\n     */\n    default: unknown;\n};\n\nexport type ApiVVersionODataControllerCountData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple/$count';\n};\n\nexport type ApiVVersionODataControllerCountResponses = {\n    /**\n     * Success\n     */\n    200: ModelFromZendesk;\n};\n\nexport type ApiVVersionODataControllerCountResponse = ApiVVersionODataControllerCountResponses[keyof ApiVVersionODataControllerCountResponses];\n\nexport type GetApiVbyApiVersionSimpleOperationData = {\n    body?: never;\n    path: {\n        /**\n         * foo in method\n         */\n        foo_param: string;\n    };\n    query?: never;\n    url: '/api/v{api-version}/simple:operation';\n};\n\nexport type GetApiVbyApiVersionSimpleOperationErrors = {\n    /**\n     * Default error response\n     */\n    default: ModelWithBoolean;\n};\n\nexport type GetApiVbyApiVersionSimpleOperationError = GetApiVbyApiVersionSimpleOperationErrors[keyof GetApiVbyApiVersionSimpleOperationErrors];\n\nexport type GetApiVbyApiVersionSimpleOperationResponses = {\n    /**\n     * Response is a simple number\n     */\n    200: number;\n};\n\nexport type GetApiVbyApiVersionSimpleOperationResponse = GetApiVbyApiVersionSimpleOperationResponses[keyof GetApiVbyApiVersionSimpleOperationResponses];\n\nexport type DeleteCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type GetCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type HeadCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type OptionsCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type PatchCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type PostCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type PutCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type DeleteFooData3 = {\n    body?: never;\n    headers: {\n        /**\n         * Parameter with illegal characters\n         */\n        'x-Foo-Bar': ModelWithString;\n    };\n    path: {\n        /**\n         * foo in method\n         */\n        foo_param: string;\n        /**\n         * bar in method\n         */\n        BarParam: string;\n    };\n    query?: never;\n    url: '/api/v{api-version}/foo/{foo_param}/bar/{BarParam}';\n};\n\nexport type CallWithDescriptionsData = {\n    body?: never;\n    path?: never;\n    query?: {\n        /**\n         * Testing multiline comments in string: First line\n         * Second line\n         *\n         * Fourth line\n         */\n        parameterWithBreaks?: string;\n        /**\n         * Testing backticks in string: `backticks` and ```multiple backticks``` should work\n         */\n        parameterWithBackticks?: string;\n        /**\n         * Testing slashes in string: \\backwards\\\\\\ and /forwards/// should work\n         */\n        parameterWithSlashes?: string;\n        /**\n         * Testing expression placeholders in string: ${expression} should work\n         */\n        parameterWithExpressionPlaceholders?: string;\n        /**\n         * Testing quotes in string: 'single quote''' and \"double quotes\"\"\" should work\n         */\n        parameterWithQuotes?: string;\n        /**\n         * Testing reserved characters in string: * inline * and ** inline ** should work\n         */\n        parameterWithReservedCharacters?: string;\n    };\n    url: '/api/v{api-version}/descriptions';\n};\n\nexport type DeprecatedCallData = {\n    body?: never;\n    headers: {\n        /**\n         * This parameter is deprecated\n         *\n         * @deprecated\n         */\n        parameter: DeprecatedModel | null;\n    };\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/parameters/deprecated';\n};\n\nexport type CallWithParametersData = {\n    /**\n     * This is the parameter that goes into the body\n     */\n    body: {\n        [key: string]: unknown;\n    } | null;\n    headers: {\n        /**\n         * This is the parameter that goes into the header\n         */\n        parameterHeader: string | null;\n    };\n    path: {\n        /**\n         * This is the parameter that goes into the path\n         */\n        parameterPath: string | null;\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string | null;\n    };\n    query: {\n        foo_ref_enum?: ModelWithNestedArrayEnumsDataFoo;\n        foo_all_of_enum: ModelWithNestedArrayEnumsDataFoo;\n        /**\n         * This is the parameter that goes into the query params\n         */\n        cursor: string | null;\n    };\n    url: '/api/v{api-version}/parameters/{parameterPath}';\n};\n\nexport type CallWithWeirdParameterNamesData = {\n    /**\n     * This is the parameter that goes into the body\n     */\n    body: ModelWithString | null;\n    headers: {\n        /**\n         * This is the parameter that goes into the request header\n         */\n        'parameter.header': string | null;\n    };\n    path: {\n        /**\n         * This is the parameter that goes into the path\n         */\n        'parameter.path.1'?: string;\n        /**\n         * This is the parameter that goes into the path\n         */\n        'parameter-path-2'?: string;\n        /**\n         * This is the parameter that goes into the path\n         */\n        'PARAMETER-PATH-3'?: string;\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string | null;\n    };\n    query: {\n        /**\n         * This is the parameter with a reserved keyword\n         */\n        default?: string;\n        /**\n         * This is the parameter that goes into the request query params\n         */\n        'parameter-query': string | null;\n    };\n    url: '/api/v{api-version}/parameters/{parameter.path.1}/{parameter-path-2}/{PARAMETER-PATH-3}';\n};\n\nexport type GetCallWithOptionalParamData = {\n    /**\n     * This is a required parameter\n     */\n    body: ModelWithOneOfEnum;\n    path?: never;\n    query?: {\n        /**\n         * This is an optional parameter\n         */\n        page?: number;\n    };\n    url: '/api/v{api-version}/parameters';\n};\n\nexport type PostCallWithOptionalParamData = {\n    /**\n     * This is an optional parameter\n     */\n    body?: {\n        offset?: number | null;\n    };\n    path?: never;\n    query: {\n        /**\n         * This is a required parameter\n         */\n        parameter: Pageable;\n    };\n    url: '/api/v{api-version}/parameters';\n};\n\nexport type PostCallWithOptionalParamResponses = {\n    /**\n     * Response is a simple number\n     */\n    200: number;\n    /**\n     * Success\n     */\n    204: void;\n};\n\nexport type PostCallWithOptionalParamResponse = PostCallWithOptionalParamResponses[keyof PostCallWithOptionalParamResponses];\n\nexport type PostApiVbyApiVersionRequestBodyData = {\n    /**\n     * A reusable request body\n     */\n    body?: SimpleRequestBody;\n    path?: never;\n    query?: {\n        /**\n         * This is a reusable parameter\n         */\n        parameter?: string;\n    };\n    url: '/api/v{api-version}/requestBody';\n};\n\nexport type PostApiVbyApiVersionFormDataData = {\n    /**\n     * A reusable request body\n     */\n    body?: SimpleFormData;\n    path?: never;\n    query?: {\n        /**\n         * This is a reusable parameter\n         */\n        parameter?: string;\n    };\n    url: '/api/v{api-version}/formData';\n};\n\nexport type CallWithDefaultParametersData = {\n    body?: never;\n    path?: never;\n    query?: {\n        /**\n         * This is a simple string with default value\n         */\n        parameterString?: string | null;\n        /**\n         * This is a simple number with default value\n         */\n        parameterNumber?: number | null;\n        /**\n         * This is a simple boolean with default value\n         */\n        parameterBoolean?: boolean | null;\n        /**\n         * This is a simple enum with default value\n         */\n        parameterEnum?: 'Success' | 'Warning' | 'Error';\n        /**\n         * This is a simple model with default value\n         */\n        parameterModel?: ModelWithString | null;\n    };\n    url: '/api/v{api-version}/defaults';\n};\n\nexport type CallWithDefaultOptionalParametersData = {\n    body?: never;\n    path?: never;\n    query?: {\n        /**\n         * This is a simple string that is optional with default value\n         */\n        parameterString?: string;\n        /**\n         * This is a simple number that is optional with default value\n         */\n        parameterNumber?: number;\n        /**\n         * This is a simple boolean that is optional with default value\n         */\n        parameterBoolean?: boolean;\n        /**\n         * This is a simple enum that is optional with default value\n         */\n        parameterEnum?: 'Success' | 'Warning' | 'Error';\n        /**\n         * This is a simple model that is optional with default value\n         */\n        parameterModel?: ModelWithString;\n    };\n    url: '/api/v{api-version}/defaults';\n};\n\nexport type CallToTestOrderOfParamsData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * This is a optional string with default\n         */\n        parameterOptionalStringWithDefault?: string;\n        /**\n         * This is a optional string with empty default\n         */\n        parameterOptionalStringWithEmptyDefault?: string;\n        /**\n         * This is a optional string with no default\n         */\n        parameterOptionalStringWithNoDefault?: string;\n        /**\n         * This is a string with default\n         */\n        parameterStringWithDefault: string;\n        /**\n         * This is a string with empty default\n         */\n        parameterStringWithEmptyDefault: string;\n        /**\n         * This is a string with no default\n         */\n        parameterStringWithNoDefault: string;\n        /**\n         * This is a string that can be null with no default\n         */\n        parameterStringNullableWithNoDefault?: string | null;\n        /**\n         * This is a string that can be null with default\n         */\n        parameterStringNullableWithDefault?: string | null;\n    };\n    url: '/api/v{api-version}/defaults';\n};\n\nexport type DuplicateNameData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/duplicate';\n};\n\nexport type DuplicateName2Data = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/duplicate';\n};\n\nexport type DuplicateName3Data = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/duplicate';\n};\n\nexport type DuplicateName4Data = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/duplicate';\n};\n\nexport type CallWithNoContentResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no-content';\n};\n\nexport type CallWithNoContentResponseResponses = {\n    /**\n     * Success\n     */\n    204: void;\n};\n\nexport type CallWithNoContentResponseResponse = CallWithNoContentResponseResponses[keyof CallWithNoContentResponseResponses];\n\nexport type CallWithResponseAndNoContentResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multiple-tags/response-and-no-content';\n};\n\nexport type CallWithResponseAndNoContentResponseResponses = {\n    /**\n     * Response is a simple number\n     */\n    200: number;\n    /**\n     * Success\n     */\n    204: void;\n};\n\nexport type CallWithResponseAndNoContentResponseResponse = CallWithResponseAndNoContentResponseResponses[keyof CallWithResponseAndNoContentResponseResponses];\n\nexport type DummyAData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multiple-tags/a';\n};\n\nexport type DummyAResponses = {\n    200: _400;\n};\n\nexport type DummyAResponse = DummyAResponses[keyof DummyAResponses];\n\nexport type DummyBData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multiple-tags/b';\n};\n\nexport type DummyBResponses = {\n    /**\n     * Success\n     */\n    204: void;\n};\n\nexport type DummyBResponse = DummyBResponses[keyof DummyBResponses];\n\nexport type CallWithResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/response';\n};\n\nexport type CallWithResponseResponses = {\n    default: Import;\n};\n\nexport type CallWithResponseResponse = CallWithResponseResponses[keyof CallWithResponseResponses];\n\nexport type CallWithDuplicateResponsesData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/response';\n};\n\nexport type CallWithDuplicateResponsesErrors = {\n    /**\n     * Message for 500 error\n     */\n    500: ModelWithStringError;\n    /**\n     * Message for 501 error\n     */\n    501: ModelWithStringError;\n    /**\n     * Message for 502 error\n     */\n    502: ModelWithStringError;\n    /**\n     * Message for 4XX errors\n     */\n    '4XX': DictionaryWithArray;\n    /**\n     * Default error response\n     */\n    default: ModelWithBoolean;\n};\n\nexport type CallWithDuplicateResponsesError = CallWithDuplicateResponsesErrors[keyof CallWithDuplicateResponsesErrors];\n\nexport type CallWithDuplicateResponsesResponses = {\n    /**\n     * Message for 200 response\n     */\n    200: ModelWithBoolean & ModelWithInteger;\n    /**\n     * Message for 201 response\n     */\n    201: ModelWithString;\n    /**\n     * Message for 202 response\n     */\n    202: ModelWithString;\n};\n\nexport type CallWithDuplicateResponsesResponse = CallWithDuplicateResponsesResponses[keyof CallWithDuplicateResponsesResponses];\n\nexport type CallWithResponsesData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/response';\n};\n\nexport type CallWithResponsesErrors = {\n    /**\n     * Message for 500 error\n     */\n    500: ModelWithStringError;\n    /**\n     * Message for 501 error\n     */\n    501: ModelWithStringError;\n    /**\n     * Message for 502 error\n     */\n    502: ModelWithStringError;\n    /**\n     * Message for default response\n     */\n    default: ModelWithStringError;\n};\n\nexport type CallWithResponsesError = CallWithResponsesErrors[keyof CallWithResponsesErrors];\n\nexport type CallWithResponsesResponses = {\n    /**\n     * Message for 200 response\n     */\n    200: {\n        readonly '@namespace.string'?: string;\n        readonly '@namespace.integer'?: number;\n        readonly value?: Array<ModelWithString>;\n    };\n    /**\n     * Message for 201 response\n     */\n    201: ModelThatExtends;\n    /**\n     * Message for 202 response\n     */\n    202: ModelThatExtendsExtends;\n};\n\nexport type CallWithResponsesResponse = CallWithResponsesResponses[keyof CallWithResponsesResponses];\n\nexport type CollectionFormatData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * This is an array parameter that is sent as csv format (comma-separated values)\n         */\n        parameterArrayCSV: Array<string> | null;\n        /**\n         * This is an array parameter that is sent as ssv format (space-separated values)\n         */\n        parameterArraySSV: Array<string> | null;\n        /**\n         * This is an array parameter that is sent as tsv format (tab-separated values)\n         */\n        parameterArrayTSV: Array<string> | null;\n        /**\n         * This is an array parameter that is sent as pipes format (pipe-separated values)\n         */\n        parameterArrayPipes: Array<string> | null;\n        /**\n         * This is an array parameter that is sent as multi format (multiple parameter instances)\n         */\n        parameterArrayMulti: Array<string> | null;\n    };\n    url: '/api/v{api-version}/collectionFormat';\n};\n\nexport type TypesData = {\n    body?: never;\n    path?: {\n        /**\n         * This is a number parameter\n         */\n        id?: number;\n    };\n    query: {\n        /**\n         * This is a number parameter\n         */\n        parameterNumber: number;\n        /**\n         * This is a string parameter\n         */\n        parameterString: string | null;\n        /**\n         * This is a boolean parameter\n         */\n        parameterBoolean: boolean | null;\n        /**\n         * This is an object parameter\n         */\n        parameterObject: {\n            [key: string]: unknown;\n        } | null;\n        /**\n         * This is an array parameter\n         */\n        parameterArray: Array<string> | null;\n        /**\n         * This is a dictionary parameter\n         */\n        parameterDictionary: {\n            [key: string]: unknown;\n        } | null;\n        /**\n         * This is an enum parameter\n         */\n        parameterEnum: 'Success' | 'Warning' | 'Error' | null;\n    };\n    url: '/api/v{api-version}/types';\n};\n\nexport type TypesResponses = {\n    /**\n     * Response is a simple number\n     */\n    200: number;\n    /**\n     * Response is a simple string\n     */\n    201: string;\n    /**\n     * Response is a simple boolean\n     */\n    202: boolean;\n    /**\n     * Response is a simple object\n     */\n    203: {\n        [key: string]: unknown;\n    };\n};\n\nexport type TypesResponse = TypesResponses[keyof TypesResponses];\n\nexport type UploadFileData = {\n    body: Blob | File;\n    path: {\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string | null;\n    };\n    query?: never;\n    url: '/api/v{api-version}/upload';\n};\n\nexport type UploadFileResponses = {\n    200: boolean;\n};\n\nexport type UploadFileResponse = UploadFileResponses[keyof UploadFileResponses];\n\nexport type FileResponseData = {\n    body?: never;\n    path: {\n        id: string;\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string;\n    };\n    query?: never;\n    url: '/api/v{api-version}/file/{id}';\n};\n\nexport type FileResponseResponses = {\n    /**\n     * Success\n     */\n    200: Blob | File;\n};\n\nexport type FileResponseResponse = FileResponseResponses[keyof FileResponseResponses];\n\nexport type ComplexTypesData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * Parameter containing object\n         */\n        parameterObject: {\n            first?: {\n                second?: {\n                    third?: string;\n                };\n            };\n        };\n        /**\n         * Parameter containing reference\n         */\n        parameterReference: ModelWithString;\n    };\n    url: '/api/v{api-version}/complex';\n};\n\nexport type ComplexTypesErrors = {\n    /**\n     * 400 `server` error\n     */\n    400: unknown;\n    /**\n     * 500 server error\n     */\n    500: unknown;\n};\n\nexport type ComplexTypesResponses = {\n    /**\n     * Successful response\n     */\n    200: Array<ModelWithString>;\n};\n\nexport type ComplexTypesResponse = ComplexTypesResponses[keyof ComplexTypesResponses];\n\nexport type MultipartResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multipart';\n};\n\nexport type MultipartResponseResponses = {\n    /**\n     * OK\n     */\n    200: {\n        file?: Blob | File;\n        metadata?: {\n            foo?: string;\n            bar?: string;\n        };\n    };\n};\n\nexport type MultipartResponseResponse = MultipartResponseResponses[keyof MultipartResponseResponses];\n\nexport type MultipartRequestData = {\n    body?: {\n        content?: Blob | File;\n        data?: ModelWithString | null;\n    };\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multipart';\n};\n\nexport type ComplexParamsData = {\n    body?: {\n        readonly key: string | null;\n        name: string | null;\n        enabled?: boolean;\n        type: 'Monkey' | 'Horse' | 'Bird';\n        listOfModels?: Array<ModelWithString> | null;\n        listOfStrings?: Array<string> | null;\n        parameters: ModelWithString | ModelWithEnum | ModelWithArray | ModelWithDictionary;\n        readonly user?: {\n            readonly id?: number;\n            readonly name?: string | null;\n        };\n    };\n    path: {\n        id: number;\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string;\n    };\n    query?: never;\n    url: '/api/v{api-version}/complex/{id}';\n};\n\nexport type ComplexParamsResponses = {\n    /**\n     * Success\n     */\n    200: ModelWithString;\n};\n\nexport type ComplexParamsResponse = ComplexParamsResponses[keyof ComplexParamsResponses];\n\nexport type CallWithResultFromHeaderData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/header';\n};\n\nexport type CallWithResultFromHeaderErrors = {\n    /**\n     * 400 server error\n     */\n    400: unknown;\n    /**\n     * 500 server error\n     */\n    500: unknown;\n};\n\nexport type CallWithResultFromHeaderResponses = {\n    /**\n     * Successful response\n     */\n    200: unknown;\n};\n\nexport type TestErrorCodeData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * Status code to return\n         */\n        status: number;\n    };\n    url: '/api/v{api-version}/error';\n};\n\nexport type TestErrorCodeErrors = {\n    /**\n     * Custom message: Internal Server Error\n     */\n    500: unknown;\n    /**\n     * Custom message: Not Implemented\n     */\n    501: unknown;\n    /**\n     * Custom message: Bad Gateway\n     */\n    502: unknown;\n    /**\n     * Custom message: Service Unavailable\n     */\n    503: unknown;\n};\n\nexport type TestErrorCodeResponses = {\n    /**\n     * Custom message: Successful response\n     */\n    200: unknown;\n};\n\nexport type NonAsciiæøåÆøÅöôêÊ字符串Data = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * Dummy input param\n         */\n        nonAsciiParamæøåÆØÅöôêÊ: number;\n    };\n    url: '/api/v{api-version}/non-ascii-æøåÆØÅöôêÊ字符串';\n};\n\nexport type NonAsciiæøåÆøÅöôêÊ字符串Responses = {\n    /**\n     * Successful response\n     */\n    200: Array<NonAsciiStringæøåÆøÅöôêÊ字符串>;\n};\n\nexport type NonAsciiæøåÆøÅöôêÊ字符串Response = NonAsciiæøåÆøÅöôêÊ字符串Responses[keyof NonAsciiæøåÆøÅöôêÊ字符串Responses];\n\nexport type PutWithFormUrlEncodedData = {\n    body: ArrayWithStrings;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/non-ascii-æøåÆØÅöôêÊ字符串';\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-ofetch/base-url-string/client/client.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport { ofetch, type ResponseType as OfetchResponseType } from 'ofetch';\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  buildOfetchOptions,\n  buildUrl,\n  createConfig,\n  createInterceptors,\n  isRepeatableBody,\n  mapParseAsToResponseType,\n  mergeConfigs,\n  mergeHeaders,\n  parseError,\n  parseSuccess,\n  setAuthParams,\n  wrapDataReturn,\n  wrapErrorReturn,\n} from './utils.gen';\n\ntype ReqInit = Omit<RequestInit, 'body' | 'headers'> & {\n  body?: BodyInit | null | undefined;\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  // precompute serialized / network body\n  const resolveOptions = async (options: RequestOptions) => {\n    const opts = {\n      ..._config,\n      ...options,\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 if body is empty to avoid invalid requests\n    if (opts.body === undefined || opts.serializedBody === '') {\n      opts.headers.delete('Content-Type');\n    }\n\n    // if a raw body is provided (no serializer), adjust Content-Type only when it\n    // equals the default JSON value to better match the concrete body type\n    if (\n      opts.body !== undefined &&\n      opts.bodySerializer === null &&\n      (opts.headers.get('Content-Type') || '').toLowerCase() === 'application/json'\n    ) {\n      const b: unknown = opts.body;\n      if (typeof FormData !== 'undefined' && b instanceof FormData) {\n        // let the runtime set the multipart boundary\n        opts.headers.delete('Content-Type');\n      } else if (typeof URLSearchParams !== 'undefined' && b instanceof URLSearchParams) {\n        // standard urlencoded content type (+ charset)\n        opts.headers.set('Content-Type', 'application/x-www-form-urlencoded;charset=UTF-8');\n      } else if (typeof Blob !== 'undefined' && b instanceof Blob) {\n        const t = b.type?.trim();\n        if (t) {\n          opts.headers.set('Content-Type', t);\n        } else {\n          // unknown blob type: avoid sending a misleading JSON header\n          opts.headers.delete('Content-Type');\n        }\n      }\n    }\n\n    // precompute network body (stability for retries and interceptors)\n    const networkBody = getValidRequestBody(opts) as RequestInit['body'] | null | undefined;\n\n    const url = buildUrl(opts);\n\n    return { networkBody, opts, url };\n  };\n\n  // apply request interceptors and mirror header/method/signal back to opts\n  const applyRequestInterceptors = async (\n    request: Request,\n    opts: ResolvedRequestOptions,\n    body: BodyInit | null | undefined,\n  ) => {\n    for (const fn of interceptors.request.fns) {\n      if (fn) {\n        request = await fn(request, opts);\n      }\n    }\n    // reflect interceptor changes into opts used by the network layer\n    opts.headers = request.headers;\n    opts.method = request.method as Uppercase<HttpMethod>;\n    // ignore request.body changes to avoid turning serialized bodies into streams\n    // body comes only from getValidRequestBody(options)\n    // reflect signal if present\n    opts.signal = (request as any).signal as AbortSignal | undefined;\n\n    // When body is FormData, remove Content-Type header to avoid boundary mismatch.\n    // Note: We already delete Content-Type in resolveOptions for FormData, but the\n    // Request constructor (line 175) re-adds it with an auto-generated boundary.\n    // Since we pass the original FormData (not the Request's body) to ofetch, and\n    // ofetch will generate its own boundary, we must remove the Request's Content-Type\n    // to let ofetch set the correct one. Otherwise the boundary in the header won't\n    // match the boundary in the actual multipart body sent by ofetch.\n    if (typeof FormData !== 'undefined' && body instanceof FormData) {\n      opts.headers.delete('Content-Type');\n    }\n\n    return request;\n  };\n\n  // build ofetch options with stable retry logic based on body repeatability\n  const buildNetworkOptions = (\n    opts: ResolvedRequestOptions,\n    body: BodyInit | null | undefined,\n    responseType: OfetchResponseType | undefined,\n  ) => {\n    const effectiveRetry = isRepeatableBody(body) ? (opts.retry as any) : (0 as any);\n    return buildOfetchOptions(opts, body, responseType, effectiveRetry);\n  };\n\n  const request: Client['request'] = async (options) => {\n    const { networkBody: initialNetworkBody, opts, url } = await resolveOptions(options as any);\n    // map parseAs -> ofetch responseType once per request\n    const ofetchResponseType: OfetchResponseType | undefined = mapParseAsToResponseType(\n      opts.parseAs,\n      opts.responseType,\n    );\n\n    const $ofetch = opts.ofetch ?? ofetch;\n\n    // create Request before network to run middleware consistently\n    const networkBody = initialNetworkBody;\n    const requestInit: ReqInit = {\n      body: networkBody,\n      headers: opts.headers as Headers,\n      method: opts.method,\n      redirect: 'follow',\n      signal: opts.signal,\n    };\n    let request = new Request(url, requestInit);\n\n    request = await applyRequestInterceptors(request, opts, networkBody);\n    const finalUrl = request.url;\n\n    // build ofetch options and perform the request (.raw keeps the Response)\n    const responseOptions = buildNetworkOptions(\n      opts as ResolvedRequestOptions,\n      networkBody,\n      ofetchResponseType,\n    );\n\n    let response = await $ofetch.raw(finalUrl, responseOptions);\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 = { request, response };\n\n    if (response.ok) {\n      const data = await parseSuccess(response, opts, ofetchResponseType);\n      return wrapDataReturn(data, result, opts.responseStyle);\n    }\n\n    let finalError = await parseError(response);\n\n    for (const fn of interceptors.error.fns) {\n      if (fn) {\n        finalError = await fn(finalError, response, request, opts);\n      }\n    }\n\n    // ensure error is never undefined after interceptors\n    finalError = (finalError as any) || ({} as string);\n\n    if (opts.throwOnError) {\n      throw finalError;\n    }\n\n    return wrapErrorReturn(finalError, result, opts.responseStyle) as any;\n  };\n\n  const makeMethodFn = (method: Uppercase<HttpMethod>) => (options: RequestOptions) =>\n    request({ ...options, method } as any);\n\n  const makeSseFn = (method: Uppercase<HttpMethod>) => async (options: RequestOptions) => {\n    const { networkBody, opts, url } = await resolveOptions(options);\n    const optsForSse: any = { ...opts };\n    delete optsForSse.body; // body is provided via serializedBody below\n    return createSseClient({\n      ...optsForSse,\n      fetch: opts.fetch,\n      headers: opts.headers as Headers,\n      method,\n      onRequest: async (url, init) => {\n        let request = new Request(url, init);\n        request = await applyRequestInterceptors(request, opts, networkBody);\n        return request;\n      },\n      serializedBody: networkBody as BodyInit | null | undefined,\n      signal: opts.signal,\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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-ofetch/base-url-string/client/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type { Auth } from '../core/auth.gen';\nexport type { QuerySerializerOptions } from '../core/bodySerializer.gen';\nexport {\n  formDataBodySerializer,\n  jsonBodySerializer,\n  urlSearchParamsBodySerializer,\n} from '../core/bodySerializer.gen';\nexport { buildClientParams } from '../core/params.gen';\nexport { serializeQueryKeyValue } from '../core/queryKeySerializer.gen';\nexport { createClient } from './client.gen';\nexport type {\n  Client,\n  ClientOptions,\n  Config,\n  CreateClientConfig,\n  Options,\n  RequestOptions,\n  RequestResult,\n  ResolvedRequestOptions,\n  ResponseStyle,\n  TDataShape,\n} from './types.gen';\nexport { createConfig, mergeHeaders } from './utils.gen';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-ofetch/base-url-string/client/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { FetchOptions as OfetchOptions, ResponseType as OfetchResponseType } from 'ofetch';\nimport type { ofetch } from 'ofetch';\n\nimport type { Auth } from '../core/auth.gen';\nimport type {\n  ServerSentEventsOptions,\n  ServerSentEventsResult,\n} from '../core/serverSentEvents.gen';\nimport type { Client as CoreClient, Config as CoreConfig } from '../core/types.gen';\nimport type { Middleware } from './utils.gen';\n\nexport type ResponseStyle = 'data' | 'fields';\n\nexport interface Config<T extends ClientOptions = ClientOptions>\n  extends Omit<RequestInit, 'body' | 'headers' | 'method'>, CoreConfig {\n  /**\n   * HTTP(S) agent configuration (Node.js only). Passed through to ofetch.\n   */\n  agent?: OfetchOptions['agent'];\n  /**\n   * Base URL for all requests made by this client.\n   */\n  baseUrl?: T['baseUrl'];\n  /**\n   * Node-only proxy/agent options.\n   */\n  dispatcher?: OfetchOptions['dispatcher'];\n  /**\n   * Fetch API implementation. Used for SSE streaming. You can use this option\n   * to provide a custom fetch instance.\n   *\n   * @default globalThis.fetch\n   */\n  fetch?: typeof fetch;\n  /**\n   * Controls the native ofetch behaviour that throws `FetchError` when\n   * `response.ok === false`. We default to suppressing it to match the fetch\n   * client semantics and let `throwOnError` drive the outcome.\n   */\n  ignoreResponseError?: OfetchOptions['ignoreResponseError'];\n  // No custom fetch option: provide custom instance via `ofetch` instead\n  /**\n   * Please don't use the Fetch client for Next.js applications. The `next`\n   * options won't have any effect.\n   *\n   * Install {@link https://www.npmjs.com/package/@hey-api/client-next `@hey-api/client-next`} instead.\n   */\n  next?: never;\n  /**\n   * Custom ofetch instance created via `ofetch.create()`. If provided, it will\n   * be used for requests instead of the default `ofetch` export.\n   */\n  ofetch?: typeof ofetch;\n  /**\n   * ofetch hook called before a request is sent.\n   */\n  onRequest?: OfetchOptions['onRequest'];\n  /**\n   * ofetch hook called when a request fails before receiving a response\n   * (e.g., network errors or aborted requests).\n   */\n  onRequestError?: OfetchOptions['onRequestError'];\n  /**\n   * ofetch hook called after a successful response is received and parsed.\n   */\n  onResponse?: OfetchOptions['onResponse'];\n  /**\n   * ofetch hook called when the response indicates an error (non-ok status)\n   * or when response parsing fails.\n   */\n  onResponseError?: OfetchOptions['onResponseError'];\n  /**\n   * Return the response data parsed in a specified format. By default, `auto`\n   * will infer the appropriate method from the `Content-Type` response header.\n   * You can override this behavior with any of the {@link Body} methods.\n   * Select `stream` if you don't want to parse response data at all.\n   *\n   * @default 'auto'\n   */\n  parseAs?: 'arrayBuffer' | 'auto' | 'blob' | 'formData' | 'json' | 'stream' | 'text';\n  /** Custom response parser (ofetch). */\n  parseResponse?: OfetchOptions['parseResponse'];\n  /**\n   * Should we return only data or multiple fields (data, error, response, etc.)?\n   *\n   * @default 'fields'\n   */\n  responseStyle?: ResponseStyle;\n  /**\n   * ofetch responseType override. If provided, it will be passed directly to\n   * ofetch and take precedence over `parseAs`.\n   */\n  responseType?: OfetchResponseType;\n  /**\n   * Automatically retry failed requests.\n   */\n  retry?: OfetchOptions['retry'];\n  /**\n   * Delay (in ms) between retry attempts.\n   */\n  retryDelay?: OfetchOptions['retryDelay'];\n  /**\n   * HTTP status codes that should trigger a retry.\n   */\n  retryStatusCodes?: OfetchOptions['retryStatusCodes'];\n  /**\n   * Throw an error instead of returning it in the response?\n   *\n   * @default false\n   */\n  throwOnError?: T['throwOnError'];\n  /**\n   * Abort the request after the given milliseconds.\n   */\n  timeout?: number;\n}\n\nexport interface RequestOptions<\n  TData = unknown,\n  TResponseStyle extends ResponseStyle = 'fields',\n  ThrowOnError extends boolean = boolean,\n  Url extends string = string,\n>\n  extends\n    Config<{\n      responseStyle: TResponseStyle;\n      throwOnError: ThrowOnError;\n    }>,\n    Pick<\n      ServerSentEventsOptions<TData>,\n      | 'onSseError'\n      | 'onSseEvent'\n      | 'sseDefaultRetryDelay'\n      | 'sseMaxRetryAttempts'\n      | 'sseMaxRetryDelay'\n    > {\n  /**\n   * Any body that you want to add to your request.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/fetch#body}\n   */\n  body?: unknown;\n  path?: Record<string, unknown>;\n  query?: Record<string, unknown>;\n  /**\n   * Security mechanism(s) to use for the request.\n   */\n  security?: ReadonlyArray<Auth>;\n  url: Url;\n}\n\nexport interface ResolvedRequestOptions<\n  TResponseStyle extends ResponseStyle = 'fields',\n  ThrowOnError extends boolean = boolean,\n  Url extends string = string,\n> extends RequestOptions<unknown, TResponseStyle, ThrowOnError, Url> {\n  serializedBody?: string;\n}\n\nexport type RequestResult<\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = boolean,\n  TResponseStyle extends ResponseStyle = 'fields',\n> = ThrowOnError extends true\n  ? Promise<\n      TResponseStyle extends 'data'\n        ? TData extends Record<string, unknown>\n          ? TData[keyof TData]\n          : TData\n        : {\n            data: TData extends Record<string, unknown> ? TData[keyof TData] : TData;\n            request: Request;\n            response: Response;\n          }\n    >\n  : Promise<\n      TResponseStyle extends 'data'\n        ? (TData extends Record<string, unknown> ? TData[keyof TData] : TData) | undefined\n        : (\n            | {\n                data: TData extends Record<string, unknown> ? TData[keyof TData] : TData;\n                error: undefined;\n              }\n            | {\n                data: undefined;\n                error: TError extends Record<string, unknown> ? TError[keyof TError] : TError;\n              }\n          ) & {\n            request: Request;\n            response: Response;\n          }\n    >;\n\nexport interface ClientOptions {\n  baseUrl?: string;\n  responseStyle?: ResponseStyle;\n  throwOnError?: boolean;\n}\n\ntype MethodFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'>,\n) => RequestResult<TData, TError, ThrowOnError, TResponseStyle>;\n\ntype SseFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'>,\n) => Promise<ServerSentEventsResult<TData, TError>>;\n\ntype RequestFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'> &\n    Pick<Required<RequestOptions<TData, TResponseStyle, ThrowOnError>>, 'method'>,\n) => RequestResult<TData, TError, ThrowOnError, TResponseStyle>;\n\ntype BuildUrlFn = <\n  TData extends {\n    body?: unknown;\n    path?: Record<string, unknown>;\n    query?: Record<string, unknown>;\n    url: string;\n  },\n>(\n  options: TData & Options<TData>,\n) => string;\n\nexport type Client = CoreClient<RequestFn, Config, MethodFn, BuildUrlFn, SseFn> & {\n  interceptors: Middleware<Request, Response, unknown, ResolvedRequestOptions>;\n};\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 = ClientOptions> = (\n  override?: Config<ClientOptions & T>,\n) => Config<Required<ClientOptions> & T>;\n\nexport interface TDataShape {\n  body?: unknown;\n  headers?: unknown;\n  path?: unknown;\n  query?: unknown;\n  url: string;\n}\n\ntype OmitKeys<T, K> = Pick<T, Exclude<keyof T, K>>;\n\nexport type Options<\n  TData extends TDataShape = TDataShape,\n  ThrowOnError extends boolean = boolean,\n  TResponse = unknown,\n  TResponseStyle extends ResponseStyle = 'fields',\n> = OmitKeys<\n  RequestOptions<TResponse, TResponseStyle, ThrowOnError>,\n  'body' | 'path' | 'query' | 'url'\n> &\n  ([TData] extends [never] ? unknown : Omit<TData, 'url'>);\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-ofetch/base-url-string/client/utils.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { FetchOptions as OfetchOptions, ResponseType as OfetchResponseType } from 'ofetch';\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 {\n  Client,\n  ClientOptions,\n  Config,\n  RequestOptions,\n  ResolvedRequestOptions,\n  ResponseStyle,\n} 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\n/**\n * Map our parseAs value to ofetch responseType when not explicitly provided.\n */\nexport const mapParseAsToResponseType = (\n  parseAs: Config['parseAs'] | undefined,\n  explicit?: OfetchResponseType,\n): OfetchResponseType | undefined => {\n  if (explicit) return explicit;\n  switch (parseAs) {\n    case 'arrayBuffer':\n    case 'blob':\n    case 'json':\n    case 'text':\n    case 'stream':\n      return parseAs;\n    case 'formData':\n    case 'auto':\n    default:\n      return undefined; // let ofetch auto-detect\n  }\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\n/**\n * Heuristic to detect whether a request body can be safely retried.\n */\nexport const isRepeatableBody = (body: unknown): boolean => {\n  if (body == null) return true; // undefined/null treated as no-body\n  if (typeof body === 'string') return true;\n  if (typeof URLSearchParams !== 'undefined' && body instanceof URLSearchParams) return true;\n  if (typeof Uint8Array !== 'undefined' && body instanceof Uint8Array) return true;\n  if (typeof ArrayBuffer !== 'undefined' && body instanceof ArrayBuffer) return true;\n  if (typeof Blob !== 'undefined' && body instanceof Blob) return true;\n  if (typeof FormData !== 'undefined' && body instanceof FormData) return true;\n  // Streams are not repeatable\n  if (typeof ReadableStream !== 'undefined' && body instanceof ReadableStream) return false;\n  // Default: assume non-repeatable for unknown structured bodies\n  return false;\n};\n\n/**\n * Small helper to unify data vs fields return style.\n */\nexport const wrapDataReturn = <T>(\n  data: T,\n  result: { request: Request; response: Response },\n  responseStyle: ResponseStyle | undefined,\n): T | ((T extends Record<string, unknown> ? { data: T } : { data: T }) & typeof result) =>\n  (responseStyle ?? 'fields') === 'data' ? (data as any) : ({ data, ...result } as any);\n\n/**\n * Small helper to unify error vs fields return style.\n */\nexport const wrapErrorReturn = <E>(\n  error: E,\n  result: { request: Request; response: Response },\n  responseStyle: ResponseStyle | undefined,\n):\n  | undefined\n  | ((E extends Record<string, unknown> ? { error: E } : { error: E }) & typeof result) =>\n  (responseStyle ?? 'fields') === 'data' ? undefined : ({ error, ...result } as any);\n\n/**\n * Build options for $ofetch.raw from our resolved opts and body.\n */\nexport const buildOfetchOptions = (\n  opts: ResolvedRequestOptions,\n  body: BodyInit | null | undefined,\n  responseType: OfetchResponseType | undefined,\n  retryOverride?: OfetchOptions['retry'],\n): OfetchOptions =>\n  ({\n    agent: opts.agent as OfetchOptions['agent'],\n    body,\n    credentials: opts.credentials as OfetchOptions['credentials'],\n    dispatcher: opts.dispatcher as OfetchOptions['dispatcher'],\n    headers: opts.headers as Headers,\n    ignoreResponseError: (opts.ignoreResponseError as OfetchOptions['ignoreResponseError']) ?? true,\n    method: opts.method,\n    onRequest: opts.onRequest as OfetchOptions['onRequest'],\n    onRequestError: opts.onRequestError as OfetchOptions['onRequestError'],\n    onResponse: opts.onResponse as OfetchOptions['onResponse'],\n    onResponseError: opts.onResponseError as OfetchOptions['onResponseError'],\n    parseResponse: opts.parseResponse as OfetchOptions['parseResponse'],\n    // URL already includes query\n    query: undefined,\n    responseType,\n    retry: retryOverride ?? (opts.retry as OfetchOptions['retry']),\n    retryDelay: opts.retryDelay as OfetchOptions['retryDelay'],\n    retryStatusCodes: opts.retryStatusCodes as OfetchOptions['retryStatusCodes'],\n    signal: opts.signal,\n    timeout: opts.timeout as number | undefined,\n  }) as OfetchOptions;\n\n/**\n * Parse a successful response, handling empty bodies and stream cases.\n */\nexport const parseSuccess = async (\n  response: Response,\n  opts: ResolvedRequestOptions,\n  ofetchResponseType?: OfetchResponseType,\n): Promise<unknown> => {\n  // Stream requested: return stream body\n  if (ofetchResponseType === 'stream') {\n    return response.body;\n  }\n\n  const inferredParseAs =\n    (opts.parseAs === 'auto' ? getParseAs(response.headers.get('Content-Type')) : opts.parseAs) ??\n    'json';\n\n  // Handle empty responses\n  if (response.status === 204 || response.headers.get('Content-Length') === '0') {\n    switch (inferredParseAs) {\n      case 'arrayBuffer':\n      case 'blob':\n      case 'text':\n        return await (response as any)[inferredParseAs]();\n      case 'formData':\n        return new FormData();\n      case 'stream':\n        return response.body;\n      default:\n        return {};\n    }\n  }\n\n  // Prefer ofetch-populated data unless we explicitly need raw `formData`\n  let data: unknown = (response as any)._data;\n  if (inferredParseAs === 'formData' || typeof data === 'undefined') {\n    switch (inferredParseAs) {\n      case 'arrayBuffer':\n      case 'blob':\n      case 'formData':\n      case 'text':\n        data = await (response as any)[inferredParseAs]();\n        break;\n      case 'json': {\n        // Some servers return 200 with no Content-Length and empty body.\n        // response.json() would throw; detect empty via clone().text() first.\n        const txt = await response.clone().text();\n        if (!txt) {\n          data = {};\n        } else {\n          data = await (response as any).json();\n        }\n        break;\n      }\n      case 'stream':\n        return response.body;\n    }\n  }\n\n  if (inferredParseAs === 'json') {\n    if (opts.responseValidator) {\n      await opts.responseValidator(data);\n    }\n    if (opts.responseTransformer) {\n      data = await opts.responseTransformer(data);\n    }\n  }\n\n  return data;\n};\n\n/**\n * Parse an error response payload.\n */\nexport const parseError = async (response: Response): Promise<unknown> => {\n  let error: unknown = (response as any)._data;\n  if (typeof error === 'undefined') {\n    const textError = await response.text();\n    try {\n      error = JSON.parse(textError);\n    } catch {\n      error = textError;\n    }\n  }\n  return error ?? ({} as string);\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  ignoreResponseError: true,\n  parseAs: 'auto',\n  querySerializer: defaultQuerySerializer,\n  ...override,\n});\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-ofetch/base-url-string/client.gen.ts",
    "content": "// 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://foo.com' }));\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-ofetch/base-url-string/core/auth.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-ofetch/base-url-string/core/bodySerializer.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-ofetch/base-url-string/core/params.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-ofetch/base-url-string/core/pathSerializer.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-ofetch/base-url-string/core/queryKeySerializer.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\n/**\n * JSON-friendly union that mirrors what Pinia Colada can hash.\n */\nexport type JsonValue =\n  | null\n  | string\n  | number\n  | boolean\n  | JsonValue[]\n  | { [key: string]: JsonValue };\n\n/**\n * Replacer that converts non-JSON values (bigint, Date, etc.) to safe substitutes.\n */\nexport const queryKeyJsonReplacer = (_key: string, value: unknown) => {\n  if (value === undefined || typeof value === 'function' || typeof value === 'symbol') {\n    return undefined;\n  }\n  if (typeof value === 'bigint') {\n    return value.toString();\n  }\n  if (value instanceof Date) {\n    return value.toISOString();\n  }\n  return value;\n};\n\n/**\n * Safely stringifies a value and parses it back into a JsonValue.\n */\nexport const stringifyToJsonValue = (input: unknown): JsonValue | undefined => {\n  try {\n    const json = JSON.stringify(input, queryKeyJsonReplacer);\n    if (json === undefined) {\n      return undefined;\n    }\n    return JSON.parse(json) as JsonValue;\n  } catch {\n    return undefined;\n  }\n};\n\n/**\n * Detects plain objects (including objects with a null prototype).\n */\nconst isPlainObject = (value: unknown): value is Record<string, unknown> => {\n  if (value === null || typeof value !== 'object') {\n    return false;\n  }\n  const prototype = Object.getPrototypeOf(value as object);\n  return prototype === Object.prototype || prototype === null;\n};\n\n/**\n * Turns URLSearchParams into a sorted JSON object for deterministic keys.\n */\nconst serializeSearchParams = (params: URLSearchParams): JsonValue => {\n  const entries = Array.from(params.entries()).sort(([a], [b]) => a.localeCompare(b));\n  const result: Record<string, JsonValue> = {};\n\n  for (const [key, value] of entries) {\n    const existing = result[key];\n    if (existing === undefined) {\n      result[key] = value;\n      continue;\n    }\n\n    if (Array.isArray(existing)) {\n      (existing as string[]).push(value);\n    } else {\n      result[key] = [existing, value];\n    }\n  }\n\n  return result;\n};\n\n/**\n * Normalizes any accepted value into a JSON-friendly shape for query keys.\n */\nexport const serializeQueryKeyValue = (value: unknown): JsonValue | undefined => {\n  if (value === null) {\n    return null;\n  }\n\n  if (typeof value === 'string' || typeof value === 'number' || typeof value === 'boolean') {\n    return value;\n  }\n\n  if (value === undefined || typeof value === 'function' || typeof value === 'symbol') {\n    return undefined;\n  }\n\n  if (typeof value === 'bigint') {\n    return value.toString();\n  }\n\n  if (value instanceof Date) {\n    return value.toISOString();\n  }\n\n  if (Array.isArray(value)) {\n    return stringifyToJsonValue(value);\n  }\n\n  if (typeof URLSearchParams !== 'undefined' && value instanceof URLSearchParams) {\n    return serializeSearchParams(value);\n  }\n\n  if (isPlainObject(value)) {\n    return stringifyToJsonValue(value);\n  }\n\n  return undefined;\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-ofetch/base-url-string/core/serverSentEvents.gen.ts",
    "content": "// 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 const 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            // Normalize line endings: CRLF -> LF, then CR -> LF\n            buffer = buffer.replace(/\\r\\n/g, '\\n').replace(/\\r/g, '\\n');\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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-ofetch/base-url-string/core/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { Auth, AuthToken } from './auth.gen';\nimport type { BodySerializer, QuerySerializer, QuerySerializerOptions } from './bodySerializer.gen';\n\nexport type HttpMethod =\n  | 'connect'\n  | 'delete'\n  | 'get'\n  | 'head'\n  | 'options'\n  | 'patch'\n  | 'post'\n  | 'put'\n  | 'trace';\n\nexport type Client<\n  RequestFn = never,\n  Config = unknown,\n  MethodFn = never,\n  BuildUrlFn = never,\n  SseFn = never,\n> = {\n  /**\n   * Returns the final request URL.\n   */\n  buildUrl: BuildUrlFn;\n  getConfig: () => Config;\n  request: RequestFn;\n  setConfig: (config: Config) => Config;\n} & {\n  [K in HttpMethod]: MethodFn;\n} & ([SseFn] extends [never] ? { sse?: never } : { sse: { [K in HttpMethod]: SseFn } });\n\nexport interface Config {\n  /**\n   * Auth token or a function returning auth token. The resolved value will be\n   * added to the request payload as defined by its `security` array.\n   */\n  auth?: ((auth: Auth) => Promise<AuthToken> | AuthToken) | AuthToken;\n  /**\n   * A function for serializing request body parameter. By default,\n   * {@link JSON.stringify()} will be used.\n   */\n  bodySerializer?: BodySerializer | null;\n  /**\n   * An object containing any HTTP headers that you want to pre-populate your\n   * `Headers` object with.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/Headers/Headers#init See more}\n   */\n  headers?:\n    | RequestInit['headers']\n    | Record<\n        string,\n        string | number | boolean | (string | number | boolean)[] | null | undefined | unknown\n      >;\n  /**\n   * The request method.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/fetch#method See more}\n   */\n  method?: Uppercase<HttpMethod>;\n  /**\n   * A function for serializing request query parameters. By default, arrays\n   * will be exploded in form style, objects will be exploded in deepObject\n   * style, and reserved characters are percent-encoded.\n   *\n   * This method will have no effect if the native `paramsSerializer()` Axios\n   * API function is used.\n   *\n   * {@link https://swagger.io/docs/specification/serialization/#query View examples}\n   */\n  querySerializer?: QuerySerializer | QuerySerializerOptions;\n  /**\n   * A function validating request data. This is useful if you want to ensure\n   * the request conforms to the desired shape, so it can be safely sent to\n   * the server.\n   */\n  requestValidator?: (data: unknown) => Promise<unknown>;\n  /**\n   * A function transforming response data before it's returned. This is useful\n   * for post-processing data, e.g. converting ISO strings into Date objects.\n   */\n  responseTransformer?: (data: unknown) => Promise<unknown>;\n  /**\n   * A function validating response data. This is useful if you want to ensure\n   * the response conforms to the desired shape, so it can be safely passed to\n   * the transformers and returned to the user.\n   */\n  responseValidator?: (data: unknown) => Promise<unknown>;\n}\n\ntype IsExactlyNeverOrNeverUndefined<T> = [T] extends [never]\n  ? true\n  : [T] extends [never | undefined]\n    ? [undefined] extends [T]\n      ? false\n      : true\n    : false;\n\nexport type OmitNever<T extends Record<string, unknown>> = {\n  [K in keyof T as IsExactlyNeverOrNeverUndefined<T[K]> extends true ? never : K]: T[K];\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-ofetch/base-url-string/core/utils.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-ofetch/base-url-string/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type { _3eNum1Период, _400, AdditionalPropertiesIntegerIssue, AdditionalPropertiesUnknownIssue, AdditionalPropertiesUnknownIssue2, AdditionalPropertiesUnknownIssue3, AdditionalPropertiesUnknownIssueWritable, AnyOfAnyAndNull, AnyOfArrays, ApiVVersionODataControllerCountData, ApiVVersionODataControllerCountResponse, ApiVVersionODataControllerCountResponses, ArrayWithAnyOfProperties, ArrayWithArray, ArrayWithBooleans, ArrayWithNumbers, ArrayWithProperties, ArrayWithReferences, ArrayWithStrings, CallToTestOrderOfParamsData, CallWithDefaultOptionalParametersData, CallWithDefaultParametersData, CallWithDescriptionsData, CallWithDuplicateResponsesData, CallWithDuplicateResponsesError, CallWithDuplicateResponsesErrors, CallWithDuplicateResponsesResponse, CallWithDuplicateResponsesResponses, CallWithNoContentResponseData, CallWithNoContentResponseResponse, CallWithNoContentResponseResponses, CallWithParametersData, CallWithResponseAndNoContentResponseData, CallWithResponseAndNoContentResponseResponse, CallWithResponseAndNoContentResponseResponses, CallWithResponseData, CallWithResponseResponse, CallWithResponseResponses, CallWithResponsesData, CallWithResponsesError, CallWithResponsesErrors, CallWithResponsesResponse, CallWithResponsesResponses, CallWithResultFromHeaderData, CallWithResultFromHeaderErrors, CallWithResultFromHeaderResponses, CallWithWeirdParameterNamesData, CamelCaseCommentWithBreaks, CharactersInDescription, ClientOptions, CollectionFormatData, CommentWithBackticks, CommentWithBackticksAndQuotes, CommentWithBreaks, CommentWithExpressionPlaceholders, CommentWithQuotes, CommentWithReservedCharacters, CommentWithSlashes, ComplexParamsData, ComplexParamsResponse, ComplexParamsResponses, ComplexTypesData, ComplexTypesErrors, ComplexTypesResponse, ComplexTypesResponses, CompositionBaseModel, CompositionExtendedModel, CompositionWithAllOfAndNullable, CompositionWithAnyOf, CompositionWithAnyOfAndNullable, CompositionWithAnyOfAnonymous, CompositionWithNestedAnyAndTypeNull, CompositionWithNestedAnyOfAndNull, CompositionWithOneOf, CompositionWithOneOfAndComplexArrayDictionary, CompositionWithOneOfAndNullable, CompositionWithOneOfAndProperties, CompositionWithOneOfAndSimpleArrayDictionary, CompositionWithOneOfAndSimpleDictionary, CompositionWithOneOfAnonymous, CompositionWithOneOfDiscriminator, ConstValue, Default, DeleteCallWithoutParametersAndResponseData, DeleteFooData, DeleteFooData2, DeleteFooData3, DeprecatedCallData, DeprecatedModel, DictionaryWithArray, DictionaryWithDictionary, DictionaryWithProperties, DictionaryWithPropertiesAndAdditionalProperties, DictionaryWithReference, DictionaryWithString, DummyAData, DummyAResponse, DummyAResponses, DummyBData, DummyBResponse, DummyBResponses, DuplicateName2Data, DuplicateName3Data, DuplicateName4Data, DuplicateNameData, EnumFromDescription, EnumWithExtensions, EnumWithNumbers, EnumWithReplacedCharacters, EnumWithStrings, EnumWithXEnumNames, ExportData, ExternalRefA, ExternalRefB, ExternalSharedModel, File, FileResponseData, FileResponseResponse, FileResponseResponses, FileWritable, FooWowData, FooWowResponses, FreeFormObjectWithAdditionalPropertiesEqEmptyObject, FreeFormObjectWithAdditionalPropertiesEqTrue, FreeFormObjectWithoutAdditionalProperties, GenericSchemaDuplicateIssue1SystemBoolean, GenericSchemaDuplicateIssue1SystemBooleanWritable, GenericSchemaDuplicateIssue1SystemString, GenericSchemaDuplicateIssue1SystemStringWritable, GetApiVbyApiVersionSimpleOperationData, GetApiVbyApiVersionSimpleOperationError, GetApiVbyApiVersionSimpleOperationErrors, GetApiVbyApiVersionSimpleOperationResponse, GetApiVbyApiVersionSimpleOperationResponses, GetCallWithOptionalParamData, GetCallWithoutParametersAndResponseData, HeadCallWithoutParametersAndResponseData, Import, ImportData, ImportResponse, ImportResponses, IoK8sApimachineryPkgApisMetaV1DeleteOptions, IoK8sApimachineryPkgApisMetaV1Preconditions, ModelCircle, ModelFromZendesk, ModelSquare, ModelThatExtends, ModelThatExtendsExtends, ModelWithAdditionalPropertiesEqTrue, ModelWithAdditionalPropertiesRef, ModelWithAnyOfConstantSizeArray, ModelWithAnyOfConstantSizeArrayAndIntersect, ModelWithAnyOfConstantSizeArrayNullable, ModelWithAnyOfConstantSizeArrayWithNSizeAndOptions, ModelWithAnyOfConstantSizeArrayWithNSizeAndOptionsWritable, ModelWithArray, ModelWithArrayReadOnlyAndWriteOnly, ModelWithArrayReadOnlyAndWriteOnlyWritable, ModelWithBackticksInDescription, ModelWithBoolean, ModelWithCircularReference, ModelWithConst, ModelWithConstantSizeArray, ModelWithDictionary, ModelWithDuplicateImports, ModelWithDuplicateProperties, ModelWithEnum, ModelWithEnumFromDescription, ModelWithEnumWithHyphen, ModelWithInteger, ModelWithNestedArrayEnums, ModelWithNestedArrayEnumsData, ModelWithNestedArrayEnumsDataBar, ModelWithNestedArrayEnumsDataFoo, ModelWithNestedCompositionEnums, ModelWithNestedEnums, ModelWithNestedProperties, ModelWithNullableObject, ModelWithNullableString, ModelWithNumericEnumUnion, ModelWithOneOfAndProperties, ModelWithOneOfEnum, ModelWithOrderedProperties, ModelWithPattern, ModelWithPatternWritable, ModelWithPrefixItemsConstantSizeArray, ModelWithProperties, ModelWithPropertiesWritable, ModelWithReadOnlyAndWriteOnly, ModelWithReadOnlyAndWriteOnlyWritable, ModelWithReference, ModelWithReferenceWritable, ModelWithString, ModelWithStringError, MultipartRequestData, MultipartResponseData, MultipartResponseResponse, MultipartResponseResponses, NestedAnyOfArraysNullable, NonAsciiæøåÆøÅöôêÊ字符串Data, NonAsciiæøåÆøÅöôêÊ字符串Response, NonAsciiæøåÆøÅöôêÊ字符串Responses, NonAsciiStringæøåÆøÅöôêÊ字符串, NullableObject, OneOfAllOfIssue, OneOfAllOfIssueWritable, OptionsCallWithoutParametersAndResponseData, Pageable, ParameterSimpleParameterUnused, PatchApiVbyApiVersionNoTagData, PatchApiVbyApiVersionNoTagResponses, PatchCallWithoutParametersAndResponseData, PostApiVbyApiVersionFormDataData, PostApiVbyApiVersionRequestBodyData, PostCallWithOptionalParamData, PostCallWithOptionalParamResponse, PostCallWithOptionalParamResponses, PostCallWithoutParametersAndResponseData, PostServiceWithEmptyTagResponse, PostServiceWithEmptyTagResponse2, PutCallWithoutParametersAndResponseData, PutWithFormUrlEncodedData, SchemaWithFormRestrictedKeys, SimpleBoolean, SimpleFile, SimpleFormData, SimpleInteger, SimpleParameter, SimpleReference, SimpleRequestBody, SimpleString, SimpleStringWithPattern, TestErrorCodeData, TestErrorCodeErrors, TestErrorCodeResponses, TypesData, TypesResponse, TypesResponses, UploadFileData, UploadFileResponse, UploadFileResponses, XFooBar } from './types.gen';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-ofetch/base-url-string/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type ClientOptions = {\n    baseUrl: 'http://localhost:3000/base' | (string & {});\n};\n\n/**\n * Model with number-only name\n */\nexport type _400 = string;\n\n/**\n * External ref to shared model (A)\n */\nexport type ExternalRefA = ExternalSharedModel;\n\n/**\n * External ref to shared model (B)\n */\nexport type ExternalRefB = ExternalSharedModel;\n\n/**\n * Testing multiline comments in string: First line\n * Second line\n *\n * Fourth line\n */\nexport type CamelCaseCommentWithBreaks = number;\n\n/**\n * Testing multiline comments in string: First line\n * Second line\n *\n * Fourth line\n */\nexport type CommentWithBreaks = number;\n\n/**\n * Testing backticks in string: `backticks` and ```multiple backticks``` should work\n */\nexport type CommentWithBackticks = number;\n\n/**\n * Testing backticks and quotes in string: `backticks`, 'quotes', \"double quotes\" and ```multiple backticks``` should work\n */\nexport type CommentWithBackticksAndQuotes = number;\n\n/**\n * Testing slashes in string: \\backwards\\\\\\ and /forwards/// should work\n */\nexport type CommentWithSlashes = number;\n\n/**\n * Testing expression placeholders in string: ${expression} should work\n */\nexport type CommentWithExpressionPlaceholders = number;\n\n/**\n * Testing quotes in string: 'single quote''' and \"double quotes\"\"\" should work\n */\nexport type CommentWithQuotes = number;\n\n/**\n * Testing reserved characters in string: * inline * and ** inline ** should work\n */\nexport type CommentWithReservedCharacters = number;\n\n/**\n * This is a simple number\n */\nexport type SimpleInteger = number;\n\n/**\n * This is a simple boolean\n */\nexport type SimpleBoolean = boolean;\n\n/**\n * This is a simple string\n */\nexport type SimpleString = string;\n\n/**\n * A string with non-ascii (unicode) characters valid in typescript identifiers (æøåÆØÅöÔèÈ字符串)\n */\nexport type NonAsciiStringæøåÆøÅöôêÊ字符串 = string;\n\n/**\n * This is a simple file\n */\nexport type SimpleFile = Blob | File;\n\n/**\n * This is a simple reference\n */\nexport type SimpleReference = ModelWithString;\n\n/**\n * This is a simple string\n */\nexport type SimpleStringWithPattern = string | null;\n\n/**\n * This is a simple enum with strings\n */\nexport type EnumWithStrings = 'Success' | 'Warning' | 'Error' | '\\'Single Quote\\'' | '\"Double Quotes\"' | 'Non-ascii: øæåôöØÆÅÔÖ字符串';\n\nexport type EnumWithReplacedCharacters = '\\'Single Quote\\'' | '\"Double Quotes\"' | 'øæåôöØÆÅÔÖ字符串' | 3.1 | '';\n\n/**\n * This is a simple enum with numbers\n */\nexport type EnumWithNumbers = 1 | 2 | 3 | 1.1 | 1.2 | 1.3 | 100 | 200 | 300 | -100 | -200 | -300 | -1.1 | -1.2 | -1.3;\n\n/**\n * Success=1,Warning=2,Error=3\n */\nexport type EnumFromDescription = number;\n\n/**\n * This is a simple enum with numbers\n */\nexport type EnumWithExtensions = 200 | 400 | 500;\n\nexport type EnumWithXEnumNames = 0 | 1 | 2;\n\n/**\n * This is a simple array with numbers\n */\nexport type ArrayWithNumbers = Array<number>;\n\n/**\n * This is a simple array with booleans\n */\nexport type ArrayWithBooleans = Array<boolean>;\n\n/**\n * This is a simple array with strings\n */\nexport type ArrayWithStrings = Array<string>;\n\n/**\n * This is a simple array with references\n */\nexport type ArrayWithReferences = Array<ModelWithString>;\n\n/**\n * This is a simple array containing an array\n */\nexport type ArrayWithArray = Array<Array<ModelWithString>>;\n\n/**\n * This is a simple array with properties\n */\nexport type ArrayWithProperties = Array<{\n    '16x16'?: CamelCaseCommentWithBreaks;\n    bar?: string;\n}>;\n\n/**\n * This is a simple array with any of properties\n */\nexport type ArrayWithAnyOfProperties = Array<{\n    foo?: string;\n} | {\n    bar?: string;\n}>;\n\nexport type AnyOfAnyAndNull = {\n    data?: unknown | null;\n};\n\n/**\n * This is a simple array with any of properties\n */\nexport type AnyOfArrays = {\n    results?: Array<{\n        foo?: string;\n    } | {\n        bar?: string;\n    }>;\n};\n\n/**\n * This is a string dictionary\n */\nexport type DictionaryWithString = {\n    [key: string]: string;\n};\n\nexport type DictionaryWithPropertiesAndAdditionalProperties = {\n    foo?: number;\n    bar?: boolean;\n    [key: string]: string | number | boolean | undefined;\n};\n\n/**\n * This is a string reference\n */\nexport type DictionaryWithReference = {\n    [key: string]: ModelWithString;\n};\n\n/**\n * This is a complex dictionary\n */\nexport type DictionaryWithArray = {\n    [key: string]: Array<ModelWithString>;\n};\n\n/**\n * This is a string dictionary\n */\nexport type DictionaryWithDictionary = {\n    [key: string]: {\n        [key: string]: string;\n    };\n};\n\n/**\n * This is a complex dictionary\n */\nexport type DictionaryWithProperties = {\n    [key: string]: {\n        foo?: string;\n        bar?: string;\n    };\n};\n\n/**\n * This is a model with one number property\n */\nexport type ModelWithInteger = {\n    /**\n     * This is a simple number property\n     */\n    prop?: number;\n};\n\n/**\n * This is a model with one boolean property\n */\nexport type ModelWithBoolean = {\n    /**\n     * This is a simple boolean property\n     */\n    prop?: boolean;\n};\n\n/**\n * This is a model with one string property\n */\nexport type ModelWithString = {\n    /**\n     * This is a simple string property\n     */\n    prop?: string;\n};\n\n/**\n * This is a model with one string property\n */\nexport type ModelWithStringError = {\n    /**\n     * This is a simple string property\n     */\n    prop?: string;\n};\n\n/**\n * `Comment` or `VoiceComment`. The JSON object for adding voice comments to tickets is different. See [Adding voice comments to tickets](/documentation/ticketing/managing-tickets/adding-voice-comments-to-tickets)\n */\nexport type ModelFromZendesk = string;\n\n/**\n * This is a model with one string property\n */\nexport type ModelWithNullableString = {\n    /**\n     * This is a simple string property\n     */\n    nullableProp1?: string | null;\n    /**\n     * This is a simple string property\n     */\n    nullableRequiredProp1: string | null;\n    /**\n     * This is a simple string property\n     */\n    nullableProp2?: string | null;\n    /**\n     * This is a simple string property\n     */\n    nullableRequiredProp2: string | null;\n    /**\n     * This is a simple enum with strings\n     */\n    'foo_bar-enum'?: 'Success' | 'Warning' | 'Error' | 'ØÆÅ字符串';\n};\n\n/**\n * This is a model with one enum\n */\nexport type ModelWithEnum = {\n    /**\n     * This is a simple enum with strings\n     */\n    'foo_bar-enum'?: 'Success' | 'Warning' | 'Error' | 'ØÆÅ字符串';\n    /**\n     * These are the HTTP error code enums\n     */\n    statusCode?: '100' | '200 FOO' | '300 FOO_BAR' | '400 foo-bar' | '500 foo.bar' | '600 foo&bar';\n    /**\n     * Simple boolean enum\n     */\n    bool?: true;\n};\n\n/**\n * This is a model with one enum with escaped name\n */\nexport type ModelWithEnumWithHyphen = {\n    /**\n     * Foo-Bar-Baz-Qux\n     */\n    'foo-bar-baz-qux'?: '3.0';\n};\n\n/**\n * This is a model with one enum\n */\nexport type ModelWithEnumFromDescription = {\n    /**\n     * Success=1,Warning=2,Error=3\n     */\n    test?: number;\n};\n\n/**\n * This is a model with nested enums\n */\nexport type ModelWithNestedEnums = {\n    dictionaryWithEnum?: {\n        [key: string]: 'Success' | 'Warning' | 'Error';\n    };\n    dictionaryWithEnumFromDescription?: {\n        [key: string]: number;\n    };\n    arrayWithEnum?: Array<'Success' | 'Warning' | 'Error'>;\n    arrayWithDescription?: Array<number>;\n    /**\n     * This is a simple enum with strings\n     */\n    'foo_bar-enum'?: 'Success' | 'Warning' | 'Error' | 'ØÆÅ字符串';\n};\n\n/**\n * This is a model with one property containing a reference\n */\nexport type ModelWithReference = {\n    prop?: ModelWithProperties;\n};\n\n/**\n * This is a model with one property containing an array\n */\nexport type ModelWithArrayReadOnlyAndWriteOnly = {\n    prop?: Array<ModelWithReadOnlyAndWriteOnly>;\n    propWithFile?: Array<Blob | File>;\n    propWithNumber?: Array<number>;\n};\n\n/**\n * This is a model with one property containing an array\n */\nexport type ModelWithArray = {\n    prop?: Array<ModelWithString>;\n    propWithFile?: Array<Blob | File>;\n    propWithNumber?: Array<number>;\n};\n\n/**\n * This is a model with one property containing a dictionary\n */\nexport type ModelWithDictionary = {\n    prop?: {\n        [key: string]: string;\n    };\n};\n\n/**\n * This is a deprecated model with a deprecated property\n *\n * @deprecated\n */\nexport type DeprecatedModel = {\n    /**\n     * This is a deprecated property\n     *\n     * @deprecated\n     */\n    prop?: string;\n};\n\n/**\n * This is a model with one property containing a circular reference\n */\nexport type ModelWithCircularReference = {\n    prop?: ModelWithCircularReference;\n};\n\n/**\n * This is a model with one property with a 'one of' relationship\n */\nexport type CompositionWithOneOf = {\n    propA?: ModelWithString | ModelWithEnum | ModelWithArray | ModelWithDictionary;\n};\n\n/**\n * This is a model with one property with a 'one of' relationship where the options are not $ref\n */\nexport type CompositionWithOneOfAnonymous = {\n    propA?: {\n        propA?: string;\n    } | string | number;\n};\n\n/**\n * Circle\n */\nexport type ModelCircle = {\n    kind: string;\n    radius?: number;\n};\n\n/**\n * Square\n */\nexport type ModelSquare = {\n    kind: string;\n    sideLength?: number;\n};\n\n/**\n * This is a model with one property with a 'one of' relationship where the options are not $ref\n */\nexport type CompositionWithOneOfDiscriminator = ({\n    kind: 'circle';\n} & ModelCircle) | ({\n    kind: 'square';\n} & ModelSquare);\n\n/**\n * This is a model with one property with a 'any of' relationship\n */\nexport type CompositionWithAnyOf = {\n    propA?: ModelWithString | ModelWithEnum | ModelWithArray | ModelWithDictionary;\n};\n\n/**\n * This is a model with one property with a 'any of' relationship where the options are not $ref\n */\nexport type CompositionWithAnyOfAnonymous = {\n    propA?: {\n        propA?: string;\n    } | string | number;\n};\n\n/**\n * This is a model with nested 'any of' property with a type null\n */\nexport type CompositionWithNestedAnyAndTypeNull = {\n    propA?: Array<ModelWithDictionary | null> | Array<ModelWithArray | null>;\n};\n\nexport type _3eNum1Период = 'Bird' | 'Dog';\n\nexport type ConstValue = 'ConstValue';\n\n/**\n * This is a model with one property with a 'any of' relationship where the options are not $ref\n */\nexport type CompositionWithNestedAnyOfAndNull = {\n    /**\n     * Scopes\n     */\n    propA?: Array<_3eNum1Период | ConstValue> | null;\n};\n\n/**\n * This is a model with one property with a 'one of' relationship\n */\nexport type CompositionWithOneOfAndNullable = {\n    propA?: {\n        boolean?: boolean;\n    } | ModelWithEnum | ModelWithArray | ModelWithDictionary | null;\n};\n\n/**\n * This is a model that contains a simple dictionary within composition\n */\nexport type CompositionWithOneOfAndSimpleDictionary = {\n    propA?: boolean | {\n        [key: string]: number;\n    };\n};\n\n/**\n * This is a model that contains a dictionary of simple arrays within composition\n */\nexport type CompositionWithOneOfAndSimpleArrayDictionary = {\n    propA?: boolean | {\n        [key: string]: Array<boolean>;\n    };\n};\n\n/**\n * This is a model that contains a dictionary of complex arrays (composited) within composition\n */\nexport type CompositionWithOneOfAndComplexArrayDictionary = {\n    propA?: boolean | {\n        [key: string]: Array<number | string>;\n    };\n};\n\n/**\n * This is a model with one property with a 'all of' relationship\n */\nexport type CompositionWithAllOfAndNullable = {\n    propA?: ({\n        boolean?: boolean;\n    } & ModelWithEnum & ModelWithArray & ModelWithDictionary) | null;\n};\n\n/**\n * This is a model with one property with a 'any of' relationship\n */\nexport type CompositionWithAnyOfAndNullable = {\n    propA?: {\n        boolean?: boolean;\n    } | ModelWithEnum | ModelWithArray | ModelWithDictionary | null;\n};\n\n/**\n * This is a base model with two simple optional properties\n */\nexport type CompositionBaseModel = {\n    firstName?: string;\n    lastname?: string;\n};\n\n/**\n * This is a model that extends the base model\n */\nexport type CompositionExtendedModel = CompositionBaseModel & {\n    age: number;\n    firstName: string;\n    lastname: string;\n};\n\n/**\n * This is a model with one nested property\n */\nexport type ModelWithProperties = {\n    required: string;\n    readonly requiredAndReadOnly: string;\n    requiredAndNullable: string | null;\n    string?: string;\n    number?: number;\n    boolean?: boolean;\n    reference?: ModelWithString;\n    'property with space'?: string;\n    default?: string;\n    try?: string;\n    readonly '@namespace.string'?: string;\n    readonly '@namespace.integer'?: number;\n};\n\n/**\n * This is a model with one nested property\n */\nexport type ModelWithNestedProperties = {\n    readonly first: {\n        readonly second: {\n            readonly third: string | null;\n        } | null;\n    } | null;\n};\n\n/**\n * This is a model with duplicated properties\n */\nexport type ModelWithDuplicateProperties = {\n    prop?: ModelWithString;\n};\n\n/**\n * This is a model with ordered properties\n */\nexport type ModelWithOrderedProperties = {\n    zebra?: string;\n    apple?: string;\n    hawaii?: string;\n};\n\n/**\n * This is a model with duplicated imports\n */\nexport type ModelWithDuplicateImports = {\n    propA?: ModelWithString;\n    propB?: ModelWithString;\n    propC?: ModelWithString;\n};\n\n/**\n * This is a model that extends another model\n */\nexport type ModelThatExtends = ModelWithString & {\n    propExtendsA?: string;\n    propExtendsB?: ModelWithString;\n};\n\n/**\n * This is a model that extends another model\n */\nexport type ModelThatExtendsExtends = ModelWithString & ModelThatExtends & {\n    propExtendsC?: string;\n    propExtendsD?: ModelWithString;\n};\n\n/**\n * This is a model that contains a some patterns\n */\nexport type ModelWithPattern = {\n    key: string;\n    name: string;\n    readonly enabled?: boolean;\n    readonly modified?: string;\n    id?: string;\n    text?: string;\n    patternWithSingleQuotes?: string;\n    patternWithNewline?: string;\n    patternWithBacktick?: string;\n    patternWithUnicode?: string;\n};\n\nexport type File = {\n    /**\n     * Id\n     */\n    readonly id?: string;\n    /**\n     * Updated at\n     */\n    readonly updated_at?: string;\n    /**\n     * Created at\n     */\n    readonly created_at?: string;\n    /**\n     * Mime\n     */\n    mime: string;\n    /**\n     * File\n     */\n    readonly file?: string;\n};\n\nexport type Default = {\n    name?: string;\n};\n\nexport type Pageable = {\n    page?: number;\n    size?: number;\n    sort?: Array<string>;\n};\n\n/**\n * This is a free-form object without additionalProperties.\n */\nexport type FreeFormObjectWithoutAdditionalProperties = {\n    [key: string]: unknown;\n};\n\n/**\n * This is a free-form object with additionalProperties: true.\n */\nexport type FreeFormObjectWithAdditionalPropertiesEqTrue = {\n    [key: string]: unknown;\n};\n\n/**\n * This is a free-form object with additionalProperties: {}.\n */\nexport type FreeFormObjectWithAdditionalPropertiesEqEmptyObject = {\n    [key: string]: unknown;\n};\n\nexport type ModelWithConst = {\n    String?: 'String';\n    number?: 0;\n    null?: null;\n    withType?: 'Some string';\n};\n\n/**\n * This is a model with one property and additionalProperties: true\n */\nexport type ModelWithAdditionalPropertiesEqTrue = {\n    /**\n     * This is a simple string property\n     */\n    prop?: string;\n    [key: string]: unknown;\n};\n\nexport type NestedAnyOfArraysNullable = {\n    nullableArray?: Array<string | boolean> | null;\n};\n\nexport type CompositionWithOneOfAndProperties = ({\n    foo: SimpleParameter;\n} | {\n    bar: NonAsciiStringæøåÆøÅöôêÊ字符串;\n}) & {\n    baz: number | null;\n    qux: number;\n};\n\n/**\n * An object that can be null\n */\nexport type NullableObject = {\n    foo?: string;\n} | null;\n\n/**\n * Some % character\n */\nexport type CharactersInDescription = string;\n\nexport type ModelWithNullableObject = {\n    data?: NullableObject;\n};\n\n/**\n * An object with additional properties that can be null (anyOf ref + null)\n */\nexport type ModelWithAdditionalPropertiesRef = {\n    [key: string]: NullableObject | null;\n};\n\nexport type ModelWithOneOfEnum = {\n    foo: 'Bar';\n} | {\n    foo: 'Baz';\n} | {\n    foo: 'Qux';\n} | {\n    content: string;\n    foo: 'Quux';\n} | {\n    content: [\n        string,\n        string\n    ];\n    foo: 'Corge';\n};\n\nexport type ModelWithNestedArrayEnumsDataFoo = 'foo' | 'bar';\n\nexport type ModelWithNestedArrayEnumsDataBar = 'baz' | 'qux';\n\nexport type ModelWithNestedArrayEnumsData = {\n    foo?: Array<ModelWithNestedArrayEnumsDataFoo>;\n    bar?: Array<ModelWithNestedArrayEnumsDataBar>;\n};\n\nexport type ModelWithNestedArrayEnums = {\n    array_strings?: Array<string>;\n    data?: ModelWithNestedArrayEnumsData;\n};\n\nexport type ModelWithNestedCompositionEnums = {\n    foo?: ModelWithNestedArrayEnumsDataFoo;\n};\n\nexport type ModelWithReadOnlyAndWriteOnly = {\n    foo: string;\n    readonly bar: string;\n};\n\nexport type ModelWithConstantSizeArray = [\n    number,\n    number\n];\n\nexport type ModelWithAnyOfConstantSizeArray = [\n    number | string,\n    number | string,\n    number | string\n];\n\nexport type ModelWithPrefixItemsConstantSizeArray = [\n    ModelWithInteger,\n    number | string,\n    string\n];\n\nexport type ModelWithAnyOfConstantSizeArrayNullable = [\n    number | null | string,\n    number | null | string,\n    number | null | string\n];\n\nexport type ModelWithAnyOfConstantSizeArrayWithNSizeAndOptions = [\n    number | Import,\n    number | Import\n];\n\nexport type ModelWithAnyOfConstantSizeArrayAndIntersect = [\n    number & string,\n    number & string\n];\n\nexport type ModelWithNumericEnumUnion = {\n    /**\n     * Период\n     */\n    value?: -10 | -1 | 0 | 1 | 3 | 6 | 12;\n};\n\n/**\n * Some description with `back ticks`\n */\nexport type ModelWithBackticksInDescription = {\n    /**\n     * The template `that` should be used for parsing and importing the contents of the CSV file.\n     *\n     * <br/><p>There is one placeholder currently supported:<ul>     <li><b>${x}</b> - refers to the n-th column in the CSV file, e.g. ${1}, ${2}, ...)</li></ul><p>Example of a correct JSON template:</p>\n     * <pre>\n     * [\n     * {\n     * \"resourceType\": \"Asset\",\n     * \"identifier\": {\n     * \"name\": \"${1}\",\n     * \"domain\": {\n     * \"name\": \"${2}\",\n     * \"community\": {\n     * \"name\": \"Some Community\"\n     * }\n     * }\n     * },\n     * \"attributes\" : {\n     * \"00000000-0000-0000-0000-000000003115\" : [ {\n     * \"value\" : \"${3}\"\n     * } ],\n     * \"00000000-0000-0000-0000-000000000222\" : [ {\n     * \"value\" : \"${4}\"\n     * } ]\n     * }\n     * }\n     * ]\n     * </pre>\n     */\n    template?: string;\n};\n\nexport type ModelWithOneOfAndProperties = (SimpleParameter | NonAsciiStringæøåÆøÅöôêÊ字符串) & {\n    baz: number | null;\n    qux: number;\n};\n\n/**\n * Model used to test deduplication strategy (unused)\n */\nexport type ParameterSimpleParameterUnused = string;\n\n/**\n * Model used to test deduplication strategy\n */\nexport type PostServiceWithEmptyTagResponse = string;\n\n/**\n * Model used to test deduplication strategy\n */\nexport type PostServiceWithEmptyTagResponse2 = string;\n\n/**\n * Model used to test deduplication strategy\n */\nexport type DeleteFooData = string;\n\n/**\n * Model used to test deduplication strategy\n */\nexport type DeleteFooData2 = string;\n\n/**\n * Model with restricted keyword name\n */\nexport type Import = string;\n\nexport type SchemaWithFormRestrictedKeys = {\n    description?: string;\n    'x-enum-descriptions'?: string;\n    'x-enum-varnames'?: string;\n    'x-enumNames'?: string;\n    title?: string;\n    object?: {\n        description?: string;\n        'x-enum-descriptions'?: string;\n        'x-enum-varnames'?: string;\n        'x-enumNames'?: string;\n        title?: string;\n    };\n    array?: Array<{\n        description?: string;\n        'x-enum-descriptions'?: string;\n        'x-enum-varnames'?: string;\n        'x-enumNames'?: string;\n        title?: string;\n    }>;\n};\n\n/**\n * This schema was giving PascalCase transformations a hard time\n */\nexport type IoK8sApimachineryPkgApisMetaV1DeleteOptions = {\n    /**\n     * Must be fulfilled before a deletion is carried out. If not possible, a 409 Conflict status will be returned.\n     */\n    preconditions?: IoK8sApimachineryPkgApisMetaV1Preconditions;\n};\n\n/**\n * This schema was giving PascalCase transformations a hard time\n */\nexport type IoK8sApimachineryPkgApisMetaV1Preconditions = {\n    /**\n     * Specifies the target ResourceVersion\n     */\n    resourceVersion?: string;\n    /**\n     * Specifies the target UID.\n     */\n    uid?: string;\n};\n\nexport type AdditionalPropertiesUnknownIssue = {\n    [key: string]: string | number;\n};\n\nexport type AdditionalPropertiesUnknownIssue2 = {\n    [key: string]: string | number;\n};\n\nexport type AdditionalPropertiesUnknownIssue3 = string & {\n    entries: {\n        [key: string]: AdditionalPropertiesUnknownIssue;\n    };\n};\n\nexport type AdditionalPropertiesIntegerIssue = {\n    value: number;\n    [key: string]: number;\n};\n\nexport type OneOfAllOfIssue = ((ConstValue | GenericSchemaDuplicateIssue1SystemBoolean) & _3eNum1Период) | GenericSchemaDuplicateIssue1SystemString;\n\nexport type GenericSchemaDuplicateIssue1SystemBoolean = {\n    item?: boolean;\n    error?: string | null;\n    readonly hasError?: boolean;\n    data?: {\n        [key: string]: never;\n    };\n};\n\nexport type GenericSchemaDuplicateIssue1SystemString = {\n    item?: string | null;\n    error?: string | null;\n    readonly hasError?: boolean;\n};\n\nexport type ExternalSharedModel = {\n    id: string;\n    name?: string;\n};\n\n/**\n * This is a model with one property containing a reference\n */\nexport type ModelWithReferenceWritable = {\n    prop?: ModelWithPropertiesWritable;\n};\n\n/**\n * This is a model with one property containing an array\n */\nexport type ModelWithArrayReadOnlyAndWriteOnlyWritable = {\n    prop?: Array<ModelWithReadOnlyAndWriteOnlyWritable>;\n    propWithFile?: Array<Blob | File>;\n    propWithNumber?: Array<number>;\n};\n\n/**\n * This is a model with one nested property\n */\nexport type ModelWithPropertiesWritable = {\n    required: string;\n    requiredAndNullable: string | null;\n    string?: string;\n    number?: number;\n    boolean?: boolean;\n    reference?: ModelWithString;\n    'property with space'?: string;\n    default?: string;\n    try?: string;\n};\n\n/**\n * This is a model that contains a some patterns\n */\nexport type ModelWithPatternWritable = {\n    key: string;\n    name: string;\n    id?: string;\n    text?: string;\n    patternWithSingleQuotes?: string;\n    patternWithNewline?: string;\n    patternWithBacktick?: string;\n    patternWithUnicode?: string;\n};\n\nexport type FileWritable = {\n    /**\n     * Mime\n     */\n    mime: string;\n};\n\nexport type ModelWithReadOnlyAndWriteOnlyWritable = {\n    foo: string;\n    baz: string;\n};\n\nexport type ModelWithAnyOfConstantSizeArrayWithNSizeAndOptionsWritable = [\n    number | Import,\n    number | Import\n];\n\nexport type AdditionalPropertiesUnknownIssueWritable = {\n    [key: string]: string | number;\n};\n\nexport type OneOfAllOfIssueWritable = ((ConstValue | GenericSchemaDuplicateIssue1SystemBoolean) & _3eNum1Период) | GenericSchemaDuplicateIssue1SystemString;\n\nexport type GenericSchemaDuplicateIssue1SystemBooleanWritable = {\n    item?: boolean;\n    error?: string | null;\n    data?: {\n        [key: string]: never;\n    };\n};\n\nexport type GenericSchemaDuplicateIssue1SystemStringWritable = {\n    item?: string | null;\n    error?: string | null;\n};\n\n/**\n * This is a reusable parameter\n */\nexport type SimpleParameter = string;\n\n/**\n * Parameter with illegal characters\n */\nexport type XFooBar = ModelWithString;\n\n/**\n * A reusable request body\n */\nexport type SimpleRequestBody = ModelWithString;\n\n/**\n * A reusable request body\n */\nexport type SimpleFormData = ModelWithString;\n\nexport type ExportData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no+tag';\n};\n\nexport type PatchApiVbyApiVersionNoTagData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no+tag';\n};\n\nexport type PatchApiVbyApiVersionNoTagResponses = {\n    /**\n     * OK\n     */\n    default: unknown;\n};\n\nexport type ImportData = {\n    body: ModelWithReadOnlyAndWriteOnlyWritable | ModelWithArrayReadOnlyAndWriteOnlyWritable;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no+tag';\n};\n\nexport type ImportResponses = {\n    /**\n     * Success\n     */\n    200: ModelFromZendesk;\n    /**\n     * Default success response\n     */\n    default: ModelWithReadOnlyAndWriteOnly;\n};\n\nexport type ImportResponse = ImportResponses[keyof ImportResponses];\n\nexport type FooWowData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no+tag';\n};\n\nexport type FooWowResponses = {\n    /**\n     * OK\n     */\n    default: unknown;\n};\n\nexport type ApiVVersionODataControllerCountData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple/$count';\n};\n\nexport type ApiVVersionODataControllerCountResponses = {\n    /**\n     * Success\n     */\n    200: ModelFromZendesk;\n};\n\nexport type ApiVVersionODataControllerCountResponse = ApiVVersionODataControllerCountResponses[keyof ApiVVersionODataControllerCountResponses];\n\nexport type GetApiVbyApiVersionSimpleOperationData = {\n    body?: never;\n    path: {\n        /**\n         * foo in method\n         */\n        foo_param: string;\n    };\n    query?: never;\n    url: '/api/v{api-version}/simple:operation';\n};\n\nexport type GetApiVbyApiVersionSimpleOperationErrors = {\n    /**\n     * Default error response\n     */\n    default: ModelWithBoolean;\n};\n\nexport type GetApiVbyApiVersionSimpleOperationError = GetApiVbyApiVersionSimpleOperationErrors[keyof GetApiVbyApiVersionSimpleOperationErrors];\n\nexport type GetApiVbyApiVersionSimpleOperationResponses = {\n    /**\n     * Response is a simple number\n     */\n    200: number;\n};\n\nexport type GetApiVbyApiVersionSimpleOperationResponse = GetApiVbyApiVersionSimpleOperationResponses[keyof GetApiVbyApiVersionSimpleOperationResponses];\n\nexport type DeleteCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type GetCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type HeadCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type OptionsCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type PatchCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type PostCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type PutCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type DeleteFooData3 = {\n    body?: never;\n    headers: {\n        /**\n         * Parameter with illegal characters\n         */\n        'x-Foo-Bar': ModelWithString;\n    };\n    path: {\n        /**\n         * foo in method\n         */\n        foo_param: string;\n        /**\n         * bar in method\n         */\n        BarParam: string;\n    };\n    query?: never;\n    url: '/api/v{api-version}/foo/{foo_param}/bar/{BarParam}';\n};\n\nexport type CallWithDescriptionsData = {\n    body?: never;\n    path?: never;\n    query?: {\n        /**\n         * Testing multiline comments in string: First line\n         * Second line\n         *\n         * Fourth line\n         */\n        parameterWithBreaks?: string;\n        /**\n         * Testing backticks in string: `backticks` and ```multiple backticks``` should work\n         */\n        parameterWithBackticks?: string;\n        /**\n         * Testing slashes in string: \\backwards\\\\\\ and /forwards/// should work\n         */\n        parameterWithSlashes?: string;\n        /**\n         * Testing expression placeholders in string: ${expression} should work\n         */\n        parameterWithExpressionPlaceholders?: string;\n        /**\n         * Testing quotes in string: 'single quote''' and \"double quotes\"\"\" should work\n         */\n        parameterWithQuotes?: string;\n        /**\n         * Testing reserved characters in string: * inline * and ** inline ** should work\n         */\n        parameterWithReservedCharacters?: string;\n    };\n    url: '/api/v{api-version}/descriptions';\n};\n\nexport type DeprecatedCallData = {\n    body?: never;\n    headers: {\n        /**\n         * This parameter is deprecated\n         *\n         * @deprecated\n         */\n        parameter: DeprecatedModel | null;\n    };\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/parameters/deprecated';\n};\n\nexport type CallWithParametersData = {\n    /**\n     * This is the parameter that goes into the body\n     */\n    body: {\n        [key: string]: unknown;\n    } | null;\n    headers: {\n        /**\n         * This is the parameter that goes into the header\n         */\n        parameterHeader: string | null;\n    };\n    path: {\n        /**\n         * This is the parameter that goes into the path\n         */\n        parameterPath: string | null;\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string | null;\n    };\n    query: {\n        foo_ref_enum?: ModelWithNestedArrayEnumsDataFoo;\n        foo_all_of_enum: ModelWithNestedArrayEnumsDataFoo;\n        /**\n         * This is the parameter that goes into the query params\n         */\n        cursor: string | null;\n    };\n    url: '/api/v{api-version}/parameters/{parameterPath}';\n};\n\nexport type CallWithWeirdParameterNamesData = {\n    /**\n     * This is the parameter that goes into the body\n     */\n    body: ModelWithString | null;\n    headers: {\n        /**\n         * This is the parameter that goes into the request header\n         */\n        'parameter.header': string | null;\n    };\n    path: {\n        /**\n         * This is the parameter that goes into the path\n         */\n        'parameter.path.1'?: string;\n        /**\n         * This is the parameter that goes into the path\n         */\n        'parameter-path-2'?: string;\n        /**\n         * This is the parameter that goes into the path\n         */\n        'PARAMETER-PATH-3'?: string;\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string | null;\n    };\n    query: {\n        /**\n         * This is the parameter with a reserved keyword\n         */\n        default?: string;\n        /**\n         * This is the parameter that goes into the request query params\n         */\n        'parameter-query': string | null;\n    };\n    url: '/api/v{api-version}/parameters/{parameter.path.1}/{parameter-path-2}/{PARAMETER-PATH-3}';\n};\n\nexport type GetCallWithOptionalParamData = {\n    /**\n     * This is a required parameter\n     */\n    body: ModelWithOneOfEnum;\n    path?: never;\n    query?: {\n        /**\n         * This is an optional parameter\n         */\n        page?: number;\n    };\n    url: '/api/v{api-version}/parameters';\n};\n\nexport type PostCallWithOptionalParamData = {\n    /**\n     * This is an optional parameter\n     */\n    body?: {\n        offset?: number | null;\n    };\n    path?: never;\n    query: {\n        /**\n         * This is a required parameter\n         */\n        parameter: Pageable;\n    };\n    url: '/api/v{api-version}/parameters';\n};\n\nexport type PostCallWithOptionalParamResponses = {\n    /**\n     * Response is a simple number\n     */\n    200: number;\n    /**\n     * Success\n     */\n    204: void;\n};\n\nexport type PostCallWithOptionalParamResponse = PostCallWithOptionalParamResponses[keyof PostCallWithOptionalParamResponses];\n\nexport type PostApiVbyApiVersionRequestBodyData = {\n    /**\n     * A reusable request body\n     */\n    body?: SimpleRequestBody;\n    path?: never;\n    query?: {\n        /**\n         * This is a reusable parameter\n         */\n        parameter?: string;\n    };\n    url: '/api/v{api-version}/requestBody';\n};\n\nexport type PostApiVbyApiVersionFormDataData = {\n    /**\n     * A reusable request body\n     */\n    body?: SimpleFormData;\n    path?: never;\n    query?: {\n        /**\n         * This is a reusable parameter\n         */\n        parameter?: string;\n    };\n    url: '/api/v{api-version}/formData';\n};\n\nexport type CallWithDefaultParametersData = {\n    body?: never;\n    path?: never;\n    query?: {\n        /**\n         * This is a simple string with default value\n         */\n        parameterString?: string | null;\n        /**\n         * This is a simple number with default value\n         */\n        parameterNumber?: number | null;\n        /**\n         * This is a simple boolean with default value\n         */\n        parameterBoolean?: boolean | null;\n        /**\n         * This is a simple enum with default value\n         */\n        parameterEnum?: 'Success' | 'Warning' | 'Error';\n        /**\n         * This is a simple model with default value\n         */\n        parameterModel?: ModelWithString | null;\n    };\n    url: '/api/v{api-version}/defaults';\n};\n\nexport type CallWithDefaultOptionalParametersData = {\n    body?: never;\n    path?: never;\n    query?: {\n        /**\n         * This is a simple string that is optional with default value\n         */\n        parameterString?: string;\n        /**\n         * This is a simple number that is optional with default value\n         */\n        parameterNumber?: number;\n        /**\n         * This is a simple boolean that is optional with default value\n         */\n        parameterBoolean?: boolean;\n        /**\n         * This is a simple enum that is optional with default value\n         */\n        parameterEnum?: 'Success' | 'Warning' | 'Error';\n        /**\n         * This is a simple model that is optional with default value\n         */\n        parameterModel?: ModelWithString;\n    };\n    url: '/api/v{api-version}/defaults';\n};\n\nexport type CallToTestOrderOfParamsData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * This is a optional string with default\n         */\n        parameterOptionalStringWithDefault?: string;\n        /**\n         * This is a optional string with empty default\n         */\n        parameterOptionalStringWithEmptyDefault?: string;\n        /**\n         * This is a optional string with no default\n         */\n        parameterOptionalStringWithNoDefault?: string;\n        /**\n         * This is a string with default\n         */\n        parameterStringWithDefault: string;\n        /**\n         * This is a string with empty default\n         */\n        parameterStringWithEmptyDefault: string;\n        /**\n         * This is a string with no default\n         */\n        parameterStringWithNoDefault: string;\n        /**\n         * This is a string that can be null with no default\n         */\n        parameterStringNullableWithNoDefault?: string | null;\n        /**\n         * This is a string that can be null with default\n         */\n        parameterStringNullableWithDefault?: string | null;\n    };\n    url: '/api/v{api-version}/defaults';\n};\n\nexport type DuplicateNameData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/duplicate';\n};\n\nexport type DuplicateName2Data = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/duplicate';\n};\n\nexport type DuplicateName3Data = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/duplicate';\n};\n\nexport type DuplicateName4Data = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/duplicate';\n};\n\nexport type CallWithNoContentResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no-content';\n};\n\nexport type CallWithNoContentResponseResponses = {\n    /**\n     * Success\n     */\n    204: void;\n};\n\nexport type CallWithNoContentResponseResponse = CallWithNoContentResponseResponses[keyof CallWithNoContentResponseResponses];\n\nexport type CallWithResponseAndNoContentResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multiple-tags/response-and-no-content';\n};\n\nexport type CallWithResponseAndNoContentResponseResponses = {\n    /**\n     * Response is a simple number\n     */\n    200: number;\n    /**\n     * Success\n     */\n    204: void;\n};\n\nexport type CallWithResponseAndNoContentResponseResponse = CallWithResponseAndNoContentResponseResponses[keyof CallWithResponseAndNoContentResponseResponses];\n\nexport type DummyAData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multiple-tags/a';\n};\n\nexport type DummyAResponses = {\n    200: _400;\n};\n\nexport type DummyAResponse = DummyAResponses[keyof DummyAResponses];\n\nexport type DummyBData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multiple-tags/b';\n};\n\nexport type DummyBResponses = {\n    /**\n     * Success\n     */\n    204: void;\n};\n\nexport type DummyBResponse = DummyBResponses[keyof DummyBResponses];\n\nexport type CallWithResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/response';\n};\n\nexport type CallWithResponseResponses = {\n    default: Import;\n};\n\nexport type CallWithResponseResponse = CallWithResponseResponses[keyof CallWithResponseResponses];\n\nexport type CallWithDuplicateResponsesData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/response';\n};\n\nexport type CallWithDuplicateResponsesErrors = {\n    /**\n     * Message for 500 error\n     */\n    500: ModelWithStringError;\n    /**\n     * Message for 501 error\n     */\n    501: ModelWithStringError;\n    /**\n     * Message for 502 error\n     */\n    502: ModelWithStringError;\n    /**\n     * Message for 4XX errors\n     */\n    '4XX': DictionaryWithArray;\n    /**\n     * Default error response\n     */\n    default: ModelWithBoolean;\n};\n\nexport type CallWithDuplicateResponsesError = CallWithDuplicateResponsesErrors[keyof CallWithDuplicateResponsesErrors];\n\nexport type CallWithDuplicateResponsesResponses = {\n    /**\n     * Message for 200 response\n     */\n    200: ModelWithBoolean & ModelWithInteger;\n    /**\n     * Message for 201 response\n     */\n    201: ModelWithString;\n    /**\n     * Message for 202 response\n     */\n    202: ModelWithString;\n};\n\nexport type CallWithDuplicateResponsesResponse = CallWithDuplicateResponsesResponses[keyof CallWithDuplicateResponsesResponses];\n\nexport type CallWithResponsesData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/response';\n};\n\nexport type CallWithResponsesErrors = {\n    /**\n     * Message for 500 error\n     */\n    500: ModelWithStringError;\n    /**\n     * Message for 501 error\n     */\n    501: ModelWithStringError;\n    /**\n     * Message for 502 error\n     */\n    502: ModelWithStringError;\n    /**\n     * Message for default response\n     */\n    default: ModelWithStringError;\n};\n\nexport type CallWithResponsesError = CallWithResponsesErrors[keyof CallWithResponsesErrors];\n\nexport type CallWithResponsesResponses = {\n    /**\n     * Message for 200 response\n     */\n    200: {\n        readonly '@namespace.string'?: string;\n        readonly '@namespace.integer'?: number;\n        readonly value?: Array<ModelWithString>;\n    };\n    /**\n     * Message for 201 response\n     */\n    201: ModelThatExtends;\n    /**\n     * Message for 202 response\n     */\n    202: ModelThatExtendsExtends;\n};\n\nexport type CallWithResponsesResponse = CallWithResponsesResponses[keyof CallWithResponsesResponses];\n\nexport type CollectionFormatData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * This is an array parameter that is sent as csv format (comma-separated values)\n         */\n        parameterArrayCSV: Array<string> | null;\n        /**\n         * This is an array parameter that is sent as ssv format (space-separated values)\n         */\n        parameterArraySSV: Array<string> | null;\n        /**\n         * This is an array parameter that is sent as tsv format (tab-separated values)\n         */\n        parameterArrayTSV: Array<string> | null;\n        /**\n         * This is an array parameter that is sent as pipes format (pipe-separated values)\n         */\n        parameterArrayPipes: Array<string> | null;\n        /**\n         * This is an array parameter that is sent as multi format (multiple parameter instances)\n         */\n        parameterArrayMulti: Array<string> | null;\n    };\n    url: '/api/v{api-version}/collectionFormat';\n};\n\nexport type TypesData = {\n    body?: never;\n    path?: {\n        /**\n         * This is a number parameter\n         */\n        id?: number;\n    };\n    query: {\n        /**\n         * This is a number parameter\n         */\n        parameterNumber: number;\n        /**\n         * This is a string parameter\n         */\n        parameterString: string | null;\n        /**\n         * This is a boolean parameter\n         */\n        parameterBoolean: boolean | null;\n        /**\n         * This is an object parameter\n         */\n        parameterObject: {\n            [key: string]: unknown;\n        } | null;\n        /**\n         * This is an array parameter\n         */\n        parameterArray: Array<string> | null;\n        /**\n         * This is a dictionary parameter\n         */\n        parameterDictionary: {\n            [key: string]: unknown;\n        } | null;\n        /**\n         * This is an enum parameter\n         */\n        parameterEnum: 'Success' | 'Warning' | 'Error' | null;\n    };\n    url: '/api/v{api-version}/types';\n};\n\nexport type TypesResponses = {\n    /**\n     * Response is a simple number\n     */\n    200: number;\n    /**\n     * Response is a simple string\n     */\n    201: string;\n    /**\n     * Response is a simple boolean\n     */\n    202: boolean;\n    /**\n     * Response is a simple object\n     */\n    203: {\n        [key: string]: unknown;\n    };\n};\n\nexport type TypesResponse = TypesResponses[keyof TypesResponses];\n\nexport type UploadFileData = {\n    body: Blob | File;\n    path: {\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string | null;\n    };\n    query?: never;\n    url: '/api/v{api-version}/upload';\n};\n\nexport type UploadFileResponses = {\n    200: boolean;\n};\n\nexport type UploadFileResponse = UploadFileResponses[keyof UploadFileResponses];\n\nexport type FileResponseData = {\n    body?: never;\n    path: {\n        id: string;\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string;\n    };\n    query?: never;\n    url: '/api/v{api-version}/file/{id}';\n};\n\nexport type FileResponseResponses = {\n    /**\n     * Success\n     */\n    200: Blob | File;\n};\n\nexport type FileResponseResponse = FileResponseResponses[keyof FileResponseResponses];\n\nexport type ComplexTypesData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * Parameter containing object\n         */\n        parameterObject: {\n            first?: {\n                second?: {\n                    third?: string;\n                };\n            };\n        };\n        /**\n         * Parameter containing reference\n         */\n        parameterReference: ModelWithString;\n    };\n    url: '/api/v{api-version}/complex';\n};\n\nexport type ComplexTypesErrors = {\n    /**\n     * 400 `server` error\n     */\n    400: unknown;\n    /**\n     * 500 server error\n     */\n    500: unknown;\n};\n\nexport type ComplexTypesResponses = {\n    /**\n     * Successful response\n     */\n    200: Array<ModelWithString>;\n};\n\nexport type ComplexTypesResponse = ComplexTypesResponses[keyof ComplexTypesResponses];\n\nexport type MultipartResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multipart';\n};\n\nexport type MultipartResponseResponses = {\n    /**\n     * OK\n     */\n    200: {\n        file?: Blob | File;\n        metadata?: {\n            foo?: string;\n            bar?: string;\n        };\n    };\n};\n\nexport type MultipartResponseResponse = MultipartResponseResponses[keyof MultipartResponseResponses];\n\nexport type MultipartRequestData = {\n    body?: {\n        content?: Blob | File;\n        data?: ModelWithString | null;\n    };\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multipart';\n};\n\nexport type ComplexParamsData = {\n    body?: {\n        readonly key: string | null;\n        name: string | null;\n        enabled?: boolean;\n        type: 'Monkey' | 'Horse' | 'Bird';\n        listOfModels?: Array<ModelWithString> | null;\n        listOfStrings?: Array<string> | null;\n        parameters: ModelWithString | ModelWithEnum | ModelWithArray | ModelWithDictionary;\n        readonly user?: {\n            readonly id?: number;\n            readonly name?: string | null;\n        };\n    };\n    path: {\n        id: number;\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string;\n    };\n    query?: never;\n    url: '/api/v{api-version}/complex/{id}';\n};\n\nexport type ComplexParamsResponses = {\n    /**\n     * Success\n     */\n    200: ModelWithString;\n};\n\nexport type ComplexParamsResponse = ComplexParamsResponses[keyof ComplexParamsResponses];\n\nexport type CallWithResultFromHeaderData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/header';\n};\n\nexport type CallWithResultFromHeaderErrors = {\n    /**\n     * 400 server error\n     */\n    400: unknown;\n    /**\n     * 500 server error\n     */\n    500: unknown;\n};\n\nexport type CallWithResultFromHeaderResponses = {\n    /**\n     * Successful response\n     */\n    200: unknown;\n};\n\nexport type TestErrorCodeData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * Status code to return\n         */\n        status: number;\n    };\n    url: '/api/v{api-version}/error';\n};\n\nexport type TestErrorCodeErrors = {\n    /**\n     * Custom message: Internal Server Error\n     */\n    500: unknown;\n    /**\n     * Custom message: Not Implemented\n     */\n    501: unknown;\n    /**\n     * Custom message: Bad Gateway\n     */\n    502: unknown;\n    /**\n     * Custom message: Service Unavailable\n     */\n    503: unknown;\n};\n\nexport type TestErrorCodeResponses = {\n    /**\n     * Custom message: Successful response\n     */\n    200: unknown;\n};\n\nexport type NonAsciiæøåÆøÅöôêÊ字符串Data = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * Dummy input param\n         */\n        nonAsciiParamæøåÆØÅöôêÊ: number;\n    };\n    url: '/api/v{api-version}/non-ascii-æøåÆØÅöôêÊ字符串';\n};\n\nexport type NonAsciiæøåÆøÅöôêÊ字符串Responses = {\n    /**\n     * Successful response\n     */\n    200: Array<NonAsciiStringæøåÆøÅöôêÊ字符串>;\n};\n\nexport type NonAsciiæøåÆøÅöôêÊ字符串Response = NonAsciiæøåÆøÅöôêÊ字符串Responses[keyof NonAsciiæøåÆøÅöôêÊ字符串Responses];\n\nexport type PutWithFormUrlEncodedData = {\n    body: ArrayWithStrings;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/non-ascii-æøåÆØÅöôêÊ字符串';\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-ofetch/clean-false/client/client.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport { ofetch, type ResponseType as OfetchResponseType } from 'ofetch';\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  buildOfetchOptions,\n  buildUrl,\n  createConfig,\n  createInterceptors,\n  isRepeatableBody,\n  mapParseAsToResponseType,\n  mergeConfigs,\n  mergeHeaders,\n  parseError,\n  parseSuccess,\n  setAuthParams,\n  wrapDataReturn,\n  wrapErrorReturn,\n} from './utils.gen';\n\ntype ReqInit = Omit<RequestInit, 'body' | 'headers'> & {\n  body?: BodyInit | null | undefined;\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  // precompute serialized / network body\n  const resolveOptions = async (options: RequestOptions) => {\n    const opts = {\n      ..._config,\n      ...options,\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 if body is empty to avoid invalid requests\n    if (opts.body === undefined || opts.serializedBody === '') {\n      opts.headers.delete('Content-Type');\n    }\n\n    // if a raw body is provided (no serializer), adjust Content-Type only when it\n    // equals the default JSON value to better match the concrete body type\n    if (\n      opts.body !== undefined &&\n      opts.bodySerializer === null &&\n      (opts.headers.get('Content-Type') || '').toLowerCase() === 'application/json'\n    ) {\n      const b: unknown = opts.body;\n      if (typeof FormData !== 'undefined' && b instanceof FormData) {\n        // let the runtime set the multipart boundary\n        opts.headers.delete('Content-Type');\n      } else if (typeof URLSearchParams !== 'undefined' && b instanceof URLSearchParams) {\n        // standard urlencoded content type (+ charset)\n        opts.headers.set('Content-Type', 'application/x-www-form-urlencoded;charset=UTF-8');\n      } else if (typeof Blob !== 'undefined' && b instanceof Blob) {\n        const t = b.type?.trim();\n        if (t) {\n          opts.headers.set('Content-Type', t);\n        } else {\n          // unknown blob type: avoid sending a misleading JSON header\n          opts.headers.delete('Content-Type');\n        }\n      }\n    }\n\n    // precompute network body (stability for retries and interceptors)\n    const networkBody = getValidRequestBody(opts) as RequestInit['body'] | null | undefined;\n\n    const url = buildUrl(opts);\n\n    return { networkBody, opts, url };\n  };\n\n  // apply request interceptors and mirror header/method/signal back to opts\n  const applyRequestInterceptors = async (\n    request: Request,\n    opts: ResolvedRequestOptions,\n    body: BodyInit | null | undefined,\n  ) => {\n    for (const fn of interceptors.request.fns) {\n      if (fn) {\n        request = await fn(request, opts);\n      }\n    }\n    // reflect interceptor changes into opts used by the network layer\n    opts.headers = request.headers;\n    opts.method = request.method as Uppercase<HttpMethod>;\n    // ignore request.body changes to avoid turning serialized bodies into streams\n    // body comes only from getValidRequestBody(options)\n    // reflect signal if present\n    opts.signal = (request as any).signal as AbortSignal | undefined;\n\n    // When body is FormData, remove Content-Type header to avoid boundary mismatch.\n    // Note: We already delete Content-Type in resolveOptions for FormData, but the\n    // Request constructor (line 175) re-adds it with an auto-generated boundary.\n    // Since we pass the original FormData (not the Request's body) to ofetch, and\n    // ofetch will generate its own boundary, we must remove the Request's Content-Type\n    // to let ofetch set the correct one. Otherwise the boundary in the header won't\n    // match the boundary in the actual multipart body sent by ofetch.\n    if (typeof FormData !== 'undefined' && body instanceof FormData) {\n      opts.headers.delete('Content-Type');\n    }\n\n    return request;\n  };\n\n  // build ofetch options with stable retry logic based on body repeatability\n  const buildNetworkOptions = (\n    opts: ResolvedRequestOptions,\n    body: BodyInit | null | undefined,\n    responseType: OfetchResponseType | undefined,\n  ) => {\n    const effectiveRetry = isRepeatableBody(body) ? (opts.retry as any) : (0 as any);\n    return buildOfetchOptions(opts, body, responseType, effectiveRetry);\n  };\n\n  const request: Client['request'] = async (options) => {\n    const { networkBody: initialNetworkBody, opts, url } = await resolveOptions(options as any);\n    // map parseAs -> ofetch responseType once per request\n    const ofetchResponseType: OfetchResponseType | undefined = mapParseAsToResponseType(\n      opts.parseAs,\n      opts.responseType,\n    );\n\n    const $ofetch = opts.ofetch ?? ofetch;\n\n    // create Request before network to run middleware consistently\n    const networkBody = initialNetworkBody;\n    const requestInit: ReqInit = {\n      body: networkBody,\n      headers: opts.headers as Headers,\n      method: opts.method,\n      redirect: 'follow',\n      signal: opts.signal,\n    };\n    let request = new Request(url, requestInit);\n\n    request = await applyRequestInterceptors(request, opts, networkBody);\n    const finalUrl = request.url;\n\n    // build ofetch options and perform the request (.raw keeps the Response)\n    const responseOptions = buildNetworkOptions(\n      opts as ResolvedRequestOptions,\n      networkBody,\n      ofetchResponseType,\n    );\n\n    let response = await $ofetch.raw(finalUrl, responseOptions);\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 = { request, response };\n\n    if (response.ok) {\n      const data = await parseSuccess(response, opts, ofetchResponseType);\n      return wrapDataReturn(data, result, opts.responseStyle);\n    }\n\n    let finalError = await parseError(response);\n\n    for (const fn of interceptors.error.fns) {\n      if (fn) {\n        finalError = await fn(finalError, response, request, opts);\n      }\n    }\n\n    // ensure error is never undefined after interceptors\n    finalError = (finalError as any) || ({} as string);\n\n    if (opts.throwOnError) {\n      throw finalError;\n    }\n\n    return wrapErrorReturn(finalError, result, opts.responseStyle) as any;\n  };\n\n  const makeMethodFn = (method: Uppercase<HttpMethod>) => (options: RequestOptions) =>\n    request({ ...options, method } as any);\n\n  const makeSseFn = (method: Uppercase<HttpMethod>) => async (options: RequestOptions) => {\n    const { networkBody, opts, url } = await resolveOptions(options);\n    const optsForSse: any = { ...opts };\n    delete optsForSse.body; // body is provided via serializedBody below\n    return createSseClient({\n      ...optsForSse,\n      fetch: opts.fetch,\n      headers: opts.headers as Headers,\n      method,\n      onRequest: async (url, init) => {\n        let request = new Request(url, init);\n        request = await applyRequestInterceptors(request, opts, networkBody);\n        return request;\n      },\n      serializedBody: networkBody as BodyInit | null | undefined,\n      signal: opts.signal,\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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-ofetch/clean-false/client/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type { Auth } from '../core/auth.gen';\nexport type { QuerySerializerOptions } from '../core/bodySerializer.gen';\nexport {\n  formDataBodySerializer,\n  jsonBodySerializer,\n  urlSearchParamsBodySerializer,\n} from '../core/bodySerializer.gen';\nexport { buildClientParams } from '../core/params.gen';\nexport { serializeQueryKeyValue } from '../core/queryKeySerializer.gen';\nexport { createClient } from './client.gen';\nexport type {\n  Client,\n  ClientOptions,\n  Config,\n  CreateClientConfig,\n  Options,\n  RequestOptions,\n  RequestResult,\n  ResolvedRequestOptions,\n  ResponseStyle,\n  TDataShape,\n} from './types.gen';\nexport { createConfig, mergeHeaders } from './utils.gen';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-ofetch/clean-false/client/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { FetchOptions as OfetchOptions, ResponseType as OfetchResponseType } from 'ofetch';\nimport type { ofetch } from 'ofetch';\n\nimport type { Auth } from '../core/auth.gen';\nimport type {\n  ServerSentEventsOptions,\n  ServerSentEventsResult,\n} from '../core/serverSentEvents.gen';\nimport type { Client as CoreClient, Config as CoreConfig } from '../core/types.gen';\nimport type { Middleware } from './utils.gen';\n\nexport type ResponseStyle = 'data' | 'fields';\n\nexport interface Config<T extends ClientOptions = ClientOptions>\n  extends Omit<RequestInit, 'body' | 'headers' | 'method'>, CoreConfig {\n  /**\n   * HTTP(S) agent configuration (Node.js only). Passed through to ofetch.\n   */\n  agent?: OfetchOptions['agent'];\n  /**\n   * Base URL for all requests made by this client.\n   */\n  baseUrl?: T['baseUrl'];\n  /**\n   * Node-only proxy/agent options.\n   */\n  dispatcher?: OfetchOptions['dispatcher'];\n  /**\n   * Fetch API implementation. Used for SSE streaming. You can use this option\n   * to provide a custom fetch instance.\n   *\n   * @default globalThis.fetch\n   */\n  fetch?: typeof fetch;\n  /**\n   * Controls the native ofetch behaviour that throws `FetchError` when\n   * `response.ok === false`. We default to suppressing it to match the fetch\n   * client semantics and let `throwOnError` drive the outcome.\n   */\n  ignoreResponseError?: OfetchOptions['ignoreResponseError'];\n  // No custom fetch option: provide custom instance via `ofetch` instead\n  /**\n   * Please don't use the Fetch client for Next.js applications. The `next`\n   * options won't have any effect.\n   *\n   * Install {@link https://www.npmjs.com/package/@hey-api/client-next `@hey-api/client-next`} instead.\n   */\n  next?: never;\n  /**\n   * Custom ofetch instance created via `ofetch.create()`. If provided, it will\n   * be used for requests instead of the default `ofetch` export.\n   */\n  ofetch?: typeof ofetch;\n  /**\n   * ofetch hook called before a request is sent.\n   */\n  onRequest?: OfetchOptions['onRequest'];\n  /**\n   * ofetch hook called when a request fails before receiving a response\n   * (e.g., network errors or aborted requests).\n   */\n  onRequestError?: OfetchOptions['onRequestError'];\n  /**\n   * ofetch hook called after a successful response is received and parsed.\n   */\n  onResponse?: OfetchOptions['onResponse'];\n  /**\n   * ofetch hook called when the response indicates an error (non-ok status)\n   * or when response parsing fails.\n   */\n  onResponseError?: OfetchOptions['onResponseError'];\n  /**\n   * Return the response data parsed in a specified format. By default, `auto`\n   * will infer the appropriate method from the `Content-Type` response header.\n   * You can override this behavior with any of the {@link Body} methods.\n   * Select `stream` if you don't want to parse response data at all.\n   *\n   * @default 'auto'\n   */\n  parseAs?: 'arrayBuffer' | 'auto' | 'blob' | 'formData' | 'json' | 'stream' | 'text';\n  /** Custom response parser (ofetch). */\n  parseResponse?: OfetchOptions['parseResponse'];\n  /**\n   * Should we return only data or multiple fields (data, error, response, etc.)?\n   *\n   * @default 'fields'\n   */\n  responseStyle?: ResponseStyle;\n  /**\n   * ofetch responseType override. If provided, it will be passed directly to\n   * ofetch and take precedence over `parseAs`.\n   */\n  responseType?: OfetchResponseType;\n  /**\n   * Automatically retry failed requests.\n   */\n  retry?: OfetchOptions['retry'];\n  /**\n   * Delay (in ms) between retry attempts.\n   */\n  retryDelay?: OfetchOptions['retryDelay'];\n  /**\n   * HTTP status codes that should trigger a retry.\n   */\n  retryStatusCodes?: OfetchOptions['retryStatusCodes'];\n  /**\n   * Throw an error instead of returning it in the response?\n   *\n   * @default false\n   */\n  throwOnError?: T['throwOnError'];\n  /**\n   * Abort the request after the given milliseconds.\n   */\n  timeout?: number;\n}\n\nexport interface RequestOptions<\n  TData = unknown,\n  TResponseStyle extends ResponseStyle = 'fields',\n  ThrowOnError extends boolean = boolean,\n  Url extends string = string,\n>\n  extends\n    Config<{\n      responseStyle: TResponseStyle;\n      throwOnError: ThrowOnError;\n    }>,\n    Pick<\n      ServerSentEventsOptions<TData>,\n      | 'onSseError'\n      | 'onSseEvent'\n      | 'sseDefaultRetryDelay'\n      | 'sseMaxRetryAttempts'\n      | 'sseMaxRetryDelay'\n    > {\n  /**\n   * Any body that you want to add to your request.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/fetch#body}\n   */\n  body?: unknown;\n  path?: Record<string, unknown>;\n  query?: Record<string, unknown>;\n  /**\n   * Security mechanism(s) to use for the request.\n   */\n  security?: ReadonlyArray<Auth>;\n  url: Url;\n}\n\nexport interface ResolvedRequestOptions<\n  TResponseStyle extends ResponseStyle = 'fields',\n  ThrowOnError extends boolean = boolean,\n  Url extends string = string,\n> extends RequestOptions<unknown, TResponseStyle, ThrowOnError, Url> {\n  serializedBody?: string;\n}\n\nexport type RequestResult<\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = boolean,\n  TResponseStyle extends ResponseStyle = 'fields',\n> = ThrowOnError extends true\n  ? Promise<\n      TResponseStyle extends 'data'\n        ? TData extends Record<string, unknown>\n          ? TData[keyof TData]\n          : TData\n        : {\n            data: TData extends Record<string, unknown> ? TData[keyof TData] : TData;\n            request: Request;\n            response: Response;\n          }\n    >\n  : Promise<\n      TResponseStyle extends 'data'\n        ? (TData extends Record<string, unknown> ? TData[keyof TData] : TData) | undefined\n        : (\n            | {\n                data: TData extends Record<string, unknown> ? TData[keyof TData] : TData;\n                error: undefined;\n              }\n            | {\n                data: undefined;\n                error: TError extends Record<string, unknown> ? TError[keyof TError] : TError;\n              }\n          ) & {\n            request: Request;\n            response: Response;\n          }\n    >;\n\nexport interface ClientOptions {\n  baseUrl?: string;\n  responseStyle?: ResponseStyle;\n  throwOnError?: boolean;\n}\n\ntype MethodFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'>,\n) => RequestResult<TData, TError, ThrowOnError, TResponseStyle>;\n\ntype SseFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'>,\n) => Promise<ServerSentEventsResult<TData, TError>>;\n\ntype RequestFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'> &\n    Pick<Required<RequestOptions<TData, TResponseStyle, ThrowOnError>>, 'method'>,\n) => RequestResult<TData, TError, ThrowOnError, TResponseStyle>;\n\ntype BuildUrlFn = <\n  TData extends {\n    body?: unknown;\n    path?: Record<string, unknown>;\n    query?: Record<string, unknown>;\n    url: string;\n  },\n>(\n  options: TData & Options<TData>,\n) => string;\n\nexport type Client = CoreClient<RequestFn, Config, MethodFn, BuildUrlFn, SseFn> & {\n  interceptors: Middleware<Request, Response, unknown, ResolvedRequestOptions>;\n};\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 = ClientOptions> = (\n  override?: Config<ClientOptions & T>,\n) => Config<Required<ClientOptions> & T>;\n\nexport interface TDataShape {\n  body?: unknown;\n  headers?: unknown;\n  path?: unknown;\n  query?: unknown;\n  url: string;\n}\n\ntype OmitKeys<T, K> = Pick<T, Exclude<keyof T, K>>;\n\nexport type Options<\n  TData extends TDataShape = TDataShape,\n  ThrowOnError extends boolean = boolean,\n  TResponse = unknown,\n  TResponseStyle extends ResponseStyle = 'fields',\n> = OmitKeys<\n  RequestOptions<TResponse, TResponseStyle, ThrowOnError>,\n  'body' | 'path' | 'query' | 'url'\n> &\n  ([TData] extends [never] ? unknown : Omit<TData, 'url'>);\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-ofetch/clean-false/client/utils.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { FetchOptions as OfetchOptions, ResponseType as OfetchResponseType } from 'ofetch';\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 {\n  Client,\n  ClientOptions,\n  Config,\n  RequestOptions,\n  ResolvedRequestOptions,\n  ResponseStyle,\n} 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\n/**\n * Map our parseAs value to ofetch responseType when not explicitly provided.\n */\nexport const mapParseAsToResponseType = (\n  parseAs: Config['parseAs'] | undefined,\n  explicit?: OfetchResponseType,\n): OfetchResponseType | undefined => {\n  if (explicit) return explicit;\n  switch (parseAs) {\n    case 'arrayBuffer':\n    case 'blob':\n    case 'json':\n    case 'text':\n    case 'stream':\n      return parseAs;\n    case 'formData':\n    case 'auto':\n    default:\n      return undefined; // let ofetch auto-detect\n  }\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\n/**\n * Heuristic to detect whether a request body can be safely retried.\n */\nexport const isRepeatableBody = (body: unknown): boolean => {\n  if (body == null) return true; // undefined/null treated as no-body\n  if (typeof body === 'string') return true;\n  if (typeof URLSearchParams !== 'undefined' && body instanceof URLSearchParams) return true;\n  if (typeof Uint8Array !== 'undefined' && body instanceof Uint8Array) return true;\n  if (typeof ArrayBuffer !== 'undefined' && body instanceof ArrayBuffer) return true;\n  if (typeof Blob !== 'undefined' && body instanceof Blob) return true;\n  if (typeof FormData !== 'undefined' && body instanceof FormData) return true;\n  // Streams are not repeatable\n  if (typeof ReadableStream !== 'undefined' && body instanceof ReadableStream) return false;\n  // Default: assume non-repeatable for unknown structured bodies\n  return false;\n};\n\n/**\n * Small helper to unify data vs fields return style.\n */\nexport const wrapDataReturn = <T>(\n  data: T,\n  result: { request: Request; response: Response },\n  responseStyle: ResponseStyle | undefined,\n): T | ((T extends Record<string, unknown> ? { data: T } : { data: T }) & typeof result) =>\n  (responseStyle ?? 'fields') === 'data' ? (data as any) : ({ data, ...result } as any);\n\n/**\n * Small helper to unify error vs fields return style.\n */\nexport const wrapErrorReturn = <E>(\n  error: E,\n  result: { request: Request; response: Response },\n  responseStyle: ResponseStyle | undefined,\n):\n  | undefined\n  | ((E extends Record<string, unknown> ? { error: E } : { error: E }) & typeof result) =>\n  (responseStyle ?? 'fields') === 'data' ? undefined : ({ error, ...result } as any);\n\n/**\n * Build options for $ofetch.raw from our resolved opts and body.\n */\nexport const buildOfetchOptions = (\n  opts: ResolvedRequestOptions,\n  body: BodyInit | null | undefined,\n  responseType: OfetchResponseType | undefined,\n  retryOverride?: OfetchOptions['retry'],\n): OfetchOptions =>\n  ({\n    agent: opts.agent as OfetchOptions['agent'],\n    body,\n    credentials: opts.credentials as OfetchOptions['credentials'],\n    dispatcher: opts.dispatcher as OfetchOptions['dispatcher'],\n    headers: opts.headers as Headers,\n    ignoreResponseError: (opts.ignoreResponseError as OfetchOptions['ignoreResponseError']) ?? true,\n    method: opts.method,\n    onRequest: opts.onRequest as OfetchOptions['onRequest'],\n    onRequestError: opts.onRequestError as OfetchOptions['onRequestError'],\n    onResponse: opts.onResponse as OfetchOptions['onResponse'],\n    onResponseError: opts.onResponseError as OfetchOptions['onResponseError'],\n    parseResponse: opts.parseResponse as OfetchOptions['parseResponse'],\n    // URL already includes query\n    query: undefined,\n    responseType,\n    retry: retryOverride ?? (opts.retry as OfetchOptions['retry']),\n    retryDelay: opts.retryDelay as OfetchOptions['retryDelay'],\n    retryStatusCodes: opts.retryStatusCodes as OfetchOptions['retryStatusCodes'],\n    signal: opts.signal,\n    timeout: opts.timeout as number | undefined,\n  }) as OfetchOptions;\n\n/**\n * Parse a successful response, handling empty bodies and stream cases.\n */\nexport const parseSuccess = async (\n  response: Response,\n  opts: ResolvedRequestOptions,\n  ofetchResponseType?: OfetchResponseType,\n): Promise<unknown> => {\n  // Stream requested: return stream body\n  if (ofetchResponseType === 'stream') {\n    return response.body;\n  }\n\n  const inferredParseAs =\n    (opts.parseAs === 'auto' ? getParseAs(response.headers.get('Content-Type')) : opts.parseAs) ??\n    'json';\n\n  // Handle empty responses\n  if (response.status === 204 || response.headers.get('Content-Length') === '0') {\n    switch (inferredParseAs) {\n      case 'arrayBuffer':\n      case 'blob':\n      case 'text':\n        return await (response as any)[inferredParseAs]();\n      case 'formData':\n        return new FormData();\n      case 'stream':\n        return response.body;\n      default:\n        return {};\n    }\n  }\n\n  // Prefer ofetch-populated data unless we explicitly need raw `formData`\n  let data: unknown = (response as any)._data;\n  if (inferredParseAs === 'formData' || typeof data === 'undefined') {\n    switch (inferredParseAs) {\n      case 'arrayBuffer':\n      case 'blob':\n      case 'formData':\n      case 'text':\n        data = await (response as any)[inferredParseAs]();\n        break;\n      case 'json': {\n        // Some servers return 200 with no Content-Length and empty body.\n        // response.json() would throw; detect empty via clone().text() first.\n        const txt = await response.clone().text();\n        if (!txt) {\n          data = {};\n        } else {\n          data = await (response as any).json();\n        }\n        break;\n      }\n      case 'stream':\n        return response.body;\n    }\n  }\n\n  if (inferredParseAs === 'json') {\n    if (opts.responseValidator) {\n      await opts.responseValidator(data);\n    }\n    if (opts.responseTransformer) {\n      data = await opts.responseTransformer(data);\n    }\n  }\n\n  return data;\n};\n\n/**\n * Parse an error response payload.\n */\nexport const parseError = async (response: Response): Promise<unknown> => {\n  let error: unknown = (response as any)._data;\n  if (typeof error === 'undefined') {\n    const textError = await response.text();\n    try {\n      error = JSON.parse(textError);\n    } catch {\n      error = textError;\n    }\n  }\n  return error ?? ({} as string);\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  ignoreResponseError: true,\n  parseAs: 'auto',\n  querySerializer: defaultQuerySerializer,\n  ...override,\n});\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-ofetch/clean-false/client.gen.ts",
    "content": "// 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: 'http://localhost:3000/base' }));\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-ofetch/clean-false/core/auth.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-ofetch/clean-false/core/bodySerializer.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-ofetch/clean-false/core/params.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-ofetch/clean-false/core/pathSerializer.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-ofetch/clean-false/core/queryKeySerializer.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\n/**\n * JSON-friendly union that mirrors what Pinia Colada can hash.\n */\nexport type JsonValue =\n  | null\n  | string\n  | number\n  | boolean\n  | JsonValue[]\n  | { [key: string]: JsonValue };\n\n/**\n * Replacer that converts non-JSON values (bigint, Date, etc.) to safe substitutes.\n */\nexport const queryKeyJsonReplacer = (_key: string, value: unknown) => {\n  if (value === undefined || typeof value === 'function' || typeof value === 'symbol') {\n    return undefined;\n  }\n  if (typeof value === 'bigint') {\n    return value.toString();\n  }\n  if (value instanceof Date) {\n    return value.toISOString();\n  }\n  return value;\n};\n\n/**\n * Safely stringifies a value and parses it back into a JsonValue.\n */\nexport const stringifyToJsonValue = (input: unknown): JsonValue | undefined => {\n  try {\n    const json = JSON.stringify(input, queryKeyJsonReplacer);\n    if (json === undefined) {\n      return undefined;\n    }\n    return JSON.parse(json) as JsonValue;\n  } catch {\n    return undefined;\n  }\n};\n\n/**\n * Detects plain objects (including objects with a null prototype).\n */\nconst isPlainObject = (value: unknown): value is Record<string, unknown> => {\n  if (value === null || typeof value !== 'object') {\n    return false;\n  }\n  const prototype = Object.getPrototypeOf(value as object);\n  return prototype === Object.prototype || prototype === null;\n};\n\n/**\n * Turns URLSearchParams into a sorted JSON object for deterministic keys.\n */\nconst serializeSearchParams = (params: URLSearchParams): JsonValue => {\n  const entries = Array.from(params.entries()).sort(([a], [b]) => a.localeCompare(b));\n  const result: Record<string, JsonValue> = {};\n\n  for (const [key, value] of entries) {\n    const existing = result[key];\n    if (existing === undefined) {\n      result[key] = value;\n      continue;\n    }\n\n    if (Array.isArray(existing)) {\n      (existing as string[]).push(value);\n    } else {\n      result[key] = [existing, value];\n    }\n  }\n\n  return result;\n};\n\n/**\n * Normalizes any accepted value into a JSON-friendly shape for query keys.\n */\nexport const serializeQueryKeyValue = (value: unknown): JsonValue | undefined => {\n  if (value === null) {\n    return null;\n  }\n\n  if (typeof value === 'string' || typeof value === 'number' || typeof value === 'boolean') {\n    return value;\n  }\n\n  if (value === undefined || typeof value === 'function' || typeof value === 'symbol') {\n    return undefined;\n  }\n\n  if (typeof value === 'bigint') {\n    return value.toString();\n  }\n\n  if (value instanceof Date) {\n    return value.toISOString();\n  }\n\n  if (Array.isArray(value)) {\n    return stringifyToJsonValue(value);\n  }\n\n  if (typeof URLSearchParams !== 'undefined' && value instanceof URLSearchParams) {\n    return serializeSearchParams(value);\n  }\n\n  if (isPlainObject(value)) {\n    return stringifyToJsonValue(value);\n  }\n\n  return undefined;\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-ofetch/clean-false/core/serverSentEvents.gen.ts",
    "content": "// 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 const 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            // Normalize line endings: CRLF -> LF, then CR -> LF\n            buffer = buffer.replace(/\\r\\n/g, '\\n').replace(/\\r/g, '\\n');\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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-ofetch/clean-false/core/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { Auth, AuthToken } from './auth.gen';\nimport type { BodySerializer, QuerySerializer, QuerySerializerOptions } from './bodySerializer.gen';\n\nexport type HttpMethod =\n  | 'connect'\n  | 'delete'\n  | 'get'\n  | 'head'\n  | 'options'\n  | 'patch'\n  | 'post'\n  | 'put'\n  | 'trace';\n\nexport type Client<\n  RequestFn = never,\n  Config = unknown,\n  MethodFn = never,\n  BuildUrlFn = never,\n  SseFn = never,\n> = {\n  /**\n   * Returns the final request URL.\n   */\n  buildUrl: BuildUrlFn;\n  getConfig: () => Config;\n  request: RequestFn;\n  setConfig: (config: Config) => Config;\n} & {\n  [K in HttpMethod]: MethodFn;\n} & ([SseFn] extends [never] ? { sse?: never } : { sse: { [K in HttpMethod]: SseFn } });\n\nexport interface Config {\n  /**\n   * Auth token or a function returning auth token. The resolved value will be\n   * added to the request payload as defined by its `security` array.\n   */\n  auth?: ((auth: Auth) => Promise<AuthToken> | AuthToken) | AuthToken;\n  /**\n   * A function for serializing request body parameter. By default,\n   * {@link JSON.stringify()} will be used.\n   */\n  bodySerializer?: BodySerializer | null;\n  /**\n   * An object containing any HTTP headers that you want to pre-populate your\n   * `Headers` object with.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/Headers/Headers#init See more}\n   */\n  headers?:\n    | RequestInit['headers']\n    | Record<\n        string,\n        string | number | boolean | (string | number | boolean)[] | null | undefined | unknown\n      >;\n  /**\n   * The request method.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/fetch#method See more}\n   */\n  method?: Uppercase<HttpMethod>;\n  /**\n   * A function for serializing request query parameters. By default, arrays\n   * will be exploded in form style, objects will be exploded in deepObject\n   * style, and reserved characters are percent-encoded.\n   *\n   * This method will have no effect if the native `paramsSerializer()` Axios\n   * API function is used.\n   *\n   * {@link https://swagger.io/docs/specification/serialization/#query View examples}\n   */\n  querySerializer?: QuerySerializer | QuerySerializerOptions;\n  /**\n   * A function validating request data. This is useful if you want to ensure\n   * the request conforms to the desired shape, so it can be safely sent to\n   * the server.\n   */\n  requestValidator?: (data: unknown) => Promise<unknown>;\n  /**\n   * A function transforming response data before it's returned. This is useful\n   * for post-processing data, e.g. converting ISO strings into Date objects.\n   */\n  responseTransformer?: (data: unknown) => Promise<unknown>;\n  /**\n   * A function validating response data. This is useful if you want to ensure\n   * the response conforms to the desired shape, so it can be safely passed to\n   * the transformers and returned to the user.\n   */\n  responseValidator?: (data: unknown) => Promise<unknown>;\n}\n\ntype IsExactlyNeverOrNeverUndefined<T> = [T] extends [never]\n  ? true\n  : [T] extends [never | undefined]\n    ? [undefined] extends [T]\n      ? false\n      : true\n    : false;\n\nexport type OmitNever<T extends Record<string, unknown>> = {\n  [K in keyof T as IsExactlyNeverOrNeverUndefined<T[K]> extends true ? never : K]: T[K];\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-ofetch/clean-false/core/utils.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-ofetch/clean-false/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport { apiVVersionODataControllerCount, callToTestOrderOfParams, callWithDefaultOptionalParameters, callWithDefaultParameters, callWithDescriptions, callWithDuplicateResponses, callWithNoContentResponse, callWithParameters, callWithResponse, callWithResponseAndNoContentResponse, callWithResponses, callWithResultFromHeader, callWithWeirdParameterNames, collectionFormat, complexParams, complexTypes, deleteCallWithoutParametersAndResponse, deleteFoo, deprecatedCall, dummyA, dummyB, duplicateName, duplicateName2, duplicateName3, duplicateName4, export_, fileResponse, fooWow, getApiVbyApiVersionSimpleOperation, getCallWithOptionalParam, getCallWithoutParametersAndResponse, headCallWithoutParametersAndResponse, import_, multipartRequest, multipartResponse, nonAsciiæøåÆøÅöôêÊ字符串, type Options, optionsCallWithoutParametersAndResponse, patchApiVbyApiVersionNoTag, patchCallWithoutParametersAndResponse, postApiVbyApiVersionFormData, postApiVbyApiVersionRequestBody, postCallWithOptionalParam, postCallWithoutParametersAndResponse, putCallWithoutParametersAndResponse, putWithFormUrlEncoded, testErrorCode, types, uploadFile } from './sdk.gen';\nexport type { _3eNum1Период, _400, AdditionalPropertiesIntegerIssue, AdditionalPropertiesUnknownIssue, AdditionalPropertiesUnknownIssue2, AdditionalPropertiesUnknownIssue3, AdditionalPropertiesUnknownIssueWritable, AnyOfAnyAndNull, AnyOfArrays, ApiVVersionODataControllerCountData, ApiVVersionODataControllerCountResponse, ApiVVersionODataControllerCountResponses, ArrayWithAnyOfProperties, ArrayWithArray, ArrayWithBooleans, ArrayWithNumbers, ArrayWithProperties, ArrayWithReferences, ArrayWithStrings, CallToTestOrderOfParamsData, CallWithDefaultOptionalParametersData, CallWithDefaultParametersData, CallWithDescriptionsData, CallWithDuplicateResponsesData, CallWithDuplicateResponsesError, CallWithDuplicateResponsesErrors, CallWithDuplicateResponsesResponse, CallWithDuplicateResponsesResponses, CallWithNoContentResponseData, CallWithNoContentResponseResponse, CallWithNoContentResponseResponses, CallWithParametersData, CallWithResponseAndNoContentResponseData, CallWithResponseAndNoContentResponseResponse, CallWithResponseAndNoContentResponseResponses, CallWithResponseData, CallWithResponseResponse, CallWithResponseResponses, CallWithResponsesData, CallWithResponsesError, CallWithResponsesErrors, CallWithResponsesResponse, CallWithResponsesResponses, CallWithResultFromHeaderData, CallWithResultFromHeaderErrors, CallWithResultFromHeaderResponses, CallWithWeirdParameterNamesData, CamelCaseCommentWithBreaks, CharactersInDescription, ClientOptions, CollectionFormatData, CommentWithBackticks, CommentWithBackticksAndQuotes, CommentWithBreaks, CommentWithExpressionPlaceholders, CommentWithQuotes, CommentWithReservedCharacters, CommentWithSlashes, ComplexParamsData, ComplexParamsResponse, ComplexParamsResponses, ComplexTypesData, ComplexTypesErrors, ComplexTypesResponse, ComplexTypesResponses, CompositionBaseModel, CompositionExtendedModel, CompositionWithAllOfAndNullable, CompositionWithAnyOf, CompositionWithAnyOfAndNullable, CompositionWithAnyOfAnonymous, CompositionWithNestedAnyAndTypeNull, CompositionWithNestedAnyOfAndNull, CompositionWithOneOf, CompositionWithOneOfAndComplexArrayDictionary, CompositionWithOneOfAndNullable, CompositionWithOneOfAndProperties, CompositionWithOneOfAndSimpleArrayDictionary, CompositionWithOneOfAndSimpleDictionary, CompositionWithOneOfAnonymous, CompositionWithOneOfDiscriminator, ConstValue, Default, DeleteCallWithoutParametersAndResponseData, DeleteFooData, DeleteFooData2, DeleteFooData3, DeprecatedCallData, DeprecatedModel, DictionaryWithArray, DictionaryWithDictionary, DictionaryWithProperties, DictionaryWithPropertiesAndAdditionalProperties, DictionaryWithReference, DictionaryWithString, DummyAData, DummyAResponse, DummyAResponses, DummyBData, DummyBResponse, DummyBResponses, DuplicateName2Data, DuplicateName3Data, DuplicateName4Data, DuplicateNameData, EnumFromDescription, EnumWithExtensions, EnumWithNumbers, EnumWithReplacedCharacters, EnumWithStrings, EnumWithXEnumNames, ExportData, ExternalRefA, ExternalRefB, ExternalSharedModel, File, FileResponseData, FileResponseResponse, FileResponseResponses, FileWritable, FooWowData, FooWowResponses, FreeFormObjectWithAdditionalPropertiesEqEmptyObject, FreeFormObjectWithAdditionalPropertiesEqTrue, FreeFormObjectWithoutAdditionalProperties, GenericSchemaDuplicateIssue1SystemBoolean, GenericSchemaDuplicateIssue1SystemBooleanWritable, GenericSchemaDuplicateIssue1SystemString, GenericSchemaDuplicateIssue1SystemStringWritable, GetApiVbyApiVersionSimpleOperationData, GetApiVbyApiVersionSimpleOperationError, GetApiVbyApiVersionSimpleOperationErrors, GetApiVbyApiVersionSimpleOperationResponse, GetApiVbyApiVersionSimpleOperationResponses, GetCallWithOptionalParamData, GetCallWithoutParametersAndResponseData, HeadCallWithoutParametersAndResponseData, Import, ImportData, ImportResponse, ImportResponses, IoK8sApimachineryPkgApisMetaV1DeleteOptions, IoK8sApimachineryPkgApisMetaV1Preconditions, ModelCircle, ModelFromZendesk, ModelSquare, ModelThatExtends, ModelThatExtendsExtends, ModelWithAdditionalPropertiesEqTrue, ModelWithAdditionalPropertiesRef, ModelWithAnyOfConstantSizeArray, ModelWithAnyOfConstantSizeArrayAndIntersect, ModelWithAnyOfConstantSizeArrayNullable, ModelWithAnyOfConstantSizeArrayWithNSizeAndOptions, ModelWithAnyOfConstantSizeArrayWithNSizeAndOptionsWritable, ModelWithArray, ModelWithArrayReadOnlyAndWriteOnly, ModelWithArrayReadOnlyAndWriteOnlyWritable, ModelWithBackticksInDescription, ModelWithBoolean, ModelWithCircularReference, ModelWithConst, ModelWithConstantSizeArray, ModelWithDictionary, ModelWithDuplicateImports, ModelWithDuplicateProperties, ModelWithEnum, ModelWithEnumFromDescription, ModelWithEnumWithHyphen, ModelWithInteger, ModelWithNestedArrayEnums, ModelWithNestedArrayEnumsData, ModelWithNestedArrayEnumsDataBar, ModelWithNestedArrayEnumsDataFoo, ModelWithNestedCompositionEnums, ModelWithNestedEnums, ModelWithNestedProperties, ModelWithNullableObject, ModelWithNullableString, ModelWithNumericEnumUnion, ModelWithOneOfAndProperties, ModelWithOneOfEnum, ModelWithOrderedProperties, ModelWithPattern, ModelWithPatternWritable, ModelWithPrefixItemsConstantSizeArray, ModelWithProperties, ModelWithPropertiesWritable, ModelWithReadOnlyAndWriteOnly, ModelWithReadOnlyAndWriteOnlyWritable, ModelWithReference, ModelWithReferenceWritable, ModelWithString, ModelWithStringError, MultipartRequestData, MultipartResponseData, MultipartResponseResponse, MultipartResponseResponses, NestedAnyOfArraysNullable, NonAsciiæøåÆøÅöôêÊ字符串Data, NonAsciiæøåÆøÅöôêÊ字符串Response, NonAsciiæøåÆøÅöôêÊ字符串Responses, NonAsciiStringæøåÆøÅöôêÊ字符串, NullableObject, OneOfAllOfIssue, OneOfAllOfIssueWritable, OptionsCallWithoutParametersAndResponseData, Pageable, ParameterSimpleParameterUnused, PatchApiVbyApiVersionNoTagData, PatchApiVbyApiVersionNoTagResponses, PatchCallWithoutParametersAndResponseData, PostApiVbyApiVersionFormDataData, PostApiVbyApiVersionRequestBodyData, PostCallWithOptionalParamData, PostCallWithOptionalParamResponse, PostCallWithOptionalParamResponses, PostCallWithoutParametersAndResponseData, PostServiceWithEmptyTagResponse, PostServiceWithEmptyTagResponse2, PutCallWithoutParametersAndResponseData, PutWithFormUrlEncodedData, SchemaWithFormRestrictedKeys, SimpleBoolean, SimpleFile, SimpleFormData, SimpleInteger, SimpleParameter, SimpleReference, SimpleRequestBody, SimpleString, SimpleStringWithPattern, TestErrorCodeData, TestErrorCodeErrors, TestErrorCodeResponses, TypesData, TypesResponse, TypesResponses, UploadFileData, UploadFileResponse, UploadFileResponses, XFooBar } from './types.gen';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-ofetch/clean-false/sdk.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport { type Client, formDataBodySerializer, type Options as Options2, type TDataShape, urlSearchParamsBodySerializer } from './client';\nimport { client } from './client.gen';\nimport type { ApiVVersionODataControllerCountData, ApiVVersionODataControllerCountResponses, CallToTestOrderOfParamsData, CallWithDefaultOptionalParametersData, CallWithDefaultParametersData, CallWithDescriptionsData, CallWithDuplicateResponsesData, CallWithDuplicateResponsesErrors, CallWithDuplicateResponsesResponses, CallWithNoContentResponseData, CallWithNoContentResponseResponses, CallWithParametersData, CallWithResponseAndNoContentResponseData, CallWithResponseAndNoContentResponseResponses, CallWithResponseData, CallWithResponseResponses, CallWithResponsesData, CallWithResponsesErrors, CallWithResponsesResponses, CallWithResultFromHeaderData, CallWithResultFromHeaderErrors, CallWithResultFromHeaderResponses, CallWithWeirdParameterNamesData, CollectionFormatData, ComplexParamsData, ComplexParamsResponses, ComplexTypesData, ComplexTypesErrors, ComplexTypesResponses, DeleteCallWithoutParametersAndResponseData, DeleteFooData3, DeprecatedCallData, DummyAData, DummyAResponses, DummyBData, DummyBResponses, DuplicateName2Data, DuplicateName3Data, DuplicateName4Data, DuplicateNameData, ExportData, FileResponseData, FileResponseResponses, FooWowData, FooWowResponses, GetApiVbyApiVersionSimpleOperationData, GetApiVbyApiVersionSimpleOperationErrors, GetApiVbyApiVersionSimpleOperationResponses, GetCallWithOptionalParamData, GetCallWithoutParametersAndResponseData, HeadCallWithoutParametersAndResponseData, ImportData, ImportResponses, MultipartRequestData, MultipartResponseData, MultipartResponseResponses, NonAsciiæøåÆøÅöôêÊ字符串Data, NonAsciiæøåÆøÅöôêÊ字符串Responses, OptionsCallWithoutParametersAndResponseData, PatchApiVbyApiVersionNoTagData, PatchApiVbyApiVersionNoTagResponses, PatchCallWithoutParametersAndResponseData, PostApiVbyApiVersionFormDataData, PostApiVbyApiVersionRequestBodyData, PostCallWithOptionalParamData, PostCallWithOptionalParamResponses, PostCallWithoutParametersAndResponseData, PutCallWithoutParametersAndResponseData, PutWithFormUrlEncodedData, TestErrorCodeData, TestErrorCodeErrors, TestErrorCodeResponses, TypesData, TypesResponses, UploadFileData, UploadFileResponses } from './types.gen';\n\nexport type Options<TData extends TDataShape = TDataShape, ThrowOnError extends boolean = boolean> = Options2<TData, ThrowOnError> & {\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\nexport const export_ = <ThrowOnError extends boolean = false>(options?: Options<ExportData, ThrowOnError>) => (options?.client ?? client).get<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/no+tag', ...options });\n\nexport const patchApiVbyApiVersionNoTag = <ThrowOnError extends boolean = false>(options?: Options<PatchApiVbyApiVersionNoTagData, ThrowOnError>) => (options?.client ?? client).patch<PatchApiVbyApiVersionNoTagResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/no+tag', ...options });\n\nexport const import_ = <ThrowOnError extends boolean = false>(options: Options<ImportData, ThrowOnError>) => (options.client ?? client).post<ImportResponses, unknown, ThrowOnError>({\n    url: '/api/v{api-version}/no+tag',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options.headers\n    }\n});\n\nexport const fooWow = <ThrowOnError extends boolean = false>(options?: Options<FooWowData, ThrowOnError>) => (options?.client ?? client).put<FooWowResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/no+tag', ...options });\n\nexport const apiVVersionODataControllerCount = <ThrowOnError extends boolean = false>(options?: Options<ApiVVersionODataControllerCountData, ThrowOnError>) => (options?.client ?? client).get<ApiVVersionODataControllerCountResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple/$count', ...options });\n\nexport const getApiVbyApiVersionSimpleOperation = <ThrowOnError extends boolean = false>(options: Options<GetApiVbyApiVersionSimpleOperationData, ThrowOnError>) => (options.client ?? client).get<GetApiVbyApiVersionSimpleOperationResponses, GetApiVbyApiVersionSimpleOperationErrors, ThrowOnError>({ url: '/api/v{api-version}/simple:operation', ...options });\n\nexport const deleteCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<DeleteCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).delete<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const getCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<GetCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).get<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const headCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<HeadCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).head<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const optionsCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<OptionsCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).options<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const patchCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<PatchCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).patch<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const postCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<PostCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).post<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const putCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<PutCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).put<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const deleteFoo = <ThrowOnError extends boolean = false>(options: Options<DeleteFooData3, ThrowOnError>) => (options.client ?? client).delete<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/foo/{foo_param}/bar/{BarParam}', ...options });\n\nexport const callWithDescriptions = <ThrowOnError extends boolean = false>(options?: Options<CallWithDescriptionsData, ThrowOnError>) => (options?.client ?? client).post<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/descriptions', ...options });\n\n/**\n * @deprecated\n */\nexport const deprecatedCall = <ThrowOnError extends boolean = false>(options: Options<DeprecatedCallData, ThrowOnError>) => (options.client ?? client).post<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/parameters/deprecated', ...options });\n\nexport const callWithParameters = <ThrowOnError extends boolean = false>(options: Options<CallWithParametersData, ThrowOnError>) => (options.client ?? client).post<unknown, unknown, ThrowOnError>({\n    url: '/api/v{api-version}/parameters/{parameterPath}',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options.headers\n    }\n});\n\nexport const callWithWeirdParameterNames = <ThrowOnError extends boolean = false>(options: Options<CallWithWeirdParameterNamesData, ThrowOnError>) => (options.client ?? client).post<unknown, unknown, ThrowOnError>({\n    url: '/api/v{api-version}/parameters/{parameter.path.1}/{parameter-path-2}/{PARAMETER-PATH-3}',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options.headers\n    }\n});\n\nexport const getCallWithOptionalParam = <ThrowOnError extends boolean = false>(options: Options<GetCallWithOptionalParamData, ThrowOnError>) => (options.client ?? client).get<unknown, unknown, ThrowOnError>({\n    url: '/api/v{api-version}/parameters',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options.headers\n    }\n});\n\nexport const postCallWithOptionalParam = <ThrowOnError extends boolean = false>(options: Options<PostCallWithOptionalParamData, ThrowOnError>) => (options.client ?? client).post<PostCallWithOptionalParamResponses, unknown, ThrowOnError>({\n    url: '/api/v{api-version}/parameters',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options.headers\n    }\n});\n\nexport const postApiVbyApiVersionRequestBody = <ThrowOnError extends boolean = false>(options?: Options<PostApiVbyApiVersionRequestBodyData, ThrowOnError>) => (options?.client ?? client).post<unknown, unknown, ThrowOnError>({\n    url: '/api/v{api-version}/requestBody',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options?.headers\n    }\n});\n\nexport const postApiVbyApiVersionFormData = <ThrowOnError extends boolean = false>(options?: Options<PostApiVbyApiVersionFormDataData, ThrowOnError>) => (options?.client ?? client).post<unknown, unknown, ThrowOnError>({\n    ...formDataBodySerializer,\n    url: '/api/v{api-version}/formData',\n    ...options,\n    headers: {\n        'Content-Type': null,\n        ...options?.headers\n    }\n});\n\nexport const callWithDefaultParameters = <ThrowOnError extends boolean = false>(options?: Options<CallWithDefaultParametersData, ThrowOnError>) => (options?.client ?? client).get<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/defaults', ...options });\n\nexport const callWithDefaultOptionalParameters = <ThrowOnError extends boolean = false>(options?: Options<CallWithDefaultOptionalParametersData, ThrowOnError>) => (options?.client ?? client).post<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/defaults', ...options });\n\nexport const callToTestOrderOfParams = <ThrowOnError extends boolean = false>(options: Options<CallToTestOrderOfParamsData, ThrowOnError>) => (options.client ?? client).put<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/defaults', ...options });\n\nexport const duplicateName = <ThrowOnError extends boolean = false>(options?: Options<DuplicateNameData, ThrowOnError>) => (options?.client ?? client).delete<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/duplicate', ...options });\n\nexport const duplicateName2 = <ThrowOnError extends boolean = false>(options?: Options<DuplicateName2Data, ThrowOnError>) => (options?.client ?? client).get<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/duplicate', ...options });\n\nexport const duplicateName3 = <ThrowOnError extends boolean = false>(options?: Options<DuplicateName3Data, ThrowOnError>) => (options?.client ?? client).post<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/duplicate', ...options });\n\nexport const duplicateName4 = <ThrowOnError extends boolean = false>(options?: Options<DuplicateName4Data, ThrowOnError>) => (options?.client ?? client).put<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/duplicate', ...options });\n\nexport const callWithNoContentResponse = <ThrowOnError extends boolean = false>(options?: Options<CallWithNoContentResponseData, ThrowOnError>) => (options?.client ?? client).get<CallWithNoContentResponseResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/no-content', ...options });\n\nexport const callWithResponseAndNoContentResponse = <ThrowOnError extends boolean = false>(options?: Options<CallWithResponseAndNoContentResponseData, ThrowOnError>) => (options?.client ?? client).get<CallWithResponseAndNoContentResponseResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/multiple-tags/response-and-no-content', ...options });\n\nexport const dummyA = <ThrowOnError extends boolean = false>(options?: Options<DummyAData, ThrowOnError>) => (options?.client ?? client).get<DummyAResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/multiple-tags/a', ...options });\n\nexport const dummyB = <ThrowOnError extends boolean = false>(options?: Options<DummyBData, ThrowOnError>) => (options?.client ?? client).get<DummyBResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/multiple-tags/b', ...options });\n\nexport const callWithResponse = <ThrowOnError extends boolean = false>(options?: Options<CallWithResponseData, ThrowOnError>) => (options?.client ?? client).get<CallWithResponseResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/response', ...options });\n\nexport const callWithDuplicateResponses = <ThrowOnError extends boolean = false>(options?: Options<CallWithDuplicateResponsesData, ThrowOnError>) => (options?.client ?? client).post<CallWithDuplicateResponsesResponses, CallWithDuplicateResponsesErrors, ThrowOnError>({ url: '/api/v{api-version}/response', ...options });\n\nexport const callWithResponses = <ThrowOnError extends boolean = false>(options?: Options<CallWithResponsesData, ThrowOnError>) => (options?.client ?? client).put<CallWithResponsesResponses, CallWithResponsesErrors, ThrowOnError>({ url: '/api/v{api-version}/response', ...options });\n\nexport const collectionFormat = <ThrowOnError extends boolean = false>(options: Options<CollectionFormatData, ThrowOnError>) => (options.client ?? client).get<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/collectionFormat', ...options });\n\nexport const types = <ThrowOnError extends boolean = false>(options: Options<TypesData, ThrowOnError>) => (options.client ?? client).get<TypesResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/types', ...options });\n\nexport const uploadFile = <ThrowOnError extends boolean = false>(options: Options<UploadFileData, ThrowOnError>) => (options.client ?? client).post<UploadFileResponses, unknown, ThrowOnError>({\n    ...urlSearchParamsBodySerializer,\n    url: '/api/v{api-version}/upload',\n    ...options,\n    headers: {\n        'Content-Type': 'application/x-www-form-urlencoded',\n        ...options.headers\n    }\n});\n\nexport const fileResponse = <ThrowOnError extends boolean = false>(options: Options<FileResponseData, ThrowOnError>) => (options.client ?? client).get<FileResponseResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/file/{id}', ...options });\n\nexport const complexTypes = <ThrowOnError extends boolean = false>(options: Options<ComplexTypesData, ThrowOnError>) => (options.client ?? client).get<ComplexTypesResponses, ComplexTypesErrors, ThrowOnError>({\n    querySerializer: { parameters: { parameterObject: { object: { style: 'form' } } } },\n    url: '/api/v{api-version}/complex',\n    ...options\n});\n\nexport const multipartResponse = <ThrowOnError extends boolean = false>(options?: Options<MultipartResponseData, ThrowOnError>) => (options?.client ?? client).get<MultipartResponseResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/multipart', ...options });\n\nexport const multipartRequest = <ThrowOnError extends boolean = false>(options?: Options<MultipartRequestData, ThrowOnError>) => (options?.client ?? client).post<unknown, unknown, ThrowOnError>({\n    ...formDataBodySerializer,\n    url: '/api/v{api-version}/multipart',\n    ...options,\n    headers: {\n        'Content-Type': null,\n        ...options?.headers\n    }\n});\n\nexport const complexParams = <ThrowOnError extends boolean = false>(options: Options<ComplexParamsData, ThrowOnError>) => (options.client ?? client).put<ComplexParamsResponses, unknown, ThrowOnError>({\n    url: '/api/v{api-version}/complex/{id}',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json-patch+json',\n        ...options.headers\n    }\n});\n\nexport const callWithResultFromHeader = <ThrowOnError extends boolean = false>(options?: Options<CallWithResultFromHeaderData, ThrowOnError>) => (options?.client ?? client).post<CallWithResultFromHeaderResponses, CallWithResultFromHeaderErrors, ThrowOnError>({ url: '/api/v{api-version}/header', ...options });\n\nexport const testErrorCode = <ThrowOnError extends boolean = false>(options: Options<TestErrorCodeData, ThrowOnError>) => (options.client ?? client).post<TestErrorCodeResponses, TestErrorCodeErrors, ThrowOnError>({ url: '/api/v{api-version}/error', ...options });\n\nexport const nonAsciiæøåÆøÅöôêÊ字符串 = <ThrowOnError extends boolean = false>(options: Options<NonAsciiæøåÆøÅöôêÊ字符串Data, ThrowOnError>) => (options.client ?? client).post<NonAsciiæøåÆøÅöôêÊ字符串Responses, unknown, ThrowOnError>({ url: '/api/v{api-version}/non-ascii-æøåÆØÅöôêÊ字符串', ...options });\n\n/**\n * Login User\n */\nexport const putWithFormUrlEncoded = <ThrowOnError extends boolean = false>(options: Options<PutWithFormUrlEncodedData, ThrowOnError>) => (options.client ?? client).put<unknown, unknown, ThrowOnError>({\n    ...urlSearchParamsBodySerializer,\n    url: '/api/v{api-version}/non-ascii-æøåÆØÅöôêÊ字符串',\n    ...options,\n    headers: {\n        'Content-Type': 'application/x-www-form-urlencoded',\n        ...options.headers\n    }\n});\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-ofetch/clean-false/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type ClientOptions = {\n    baseUrl: 'http://localhost:3000/base' | (string & {});\n};\n\n/**\n * Model with number-only name\n */\nexport type _400 = string;\n\n/**\n * External ref to shared model (A)\n */\nexport type ExternalRefA = ExternalSharedModel;\n\n/**\n * External ref to shared model (B)\n */\nexport type ExternalRefB = ExternalSharedModel;\n\n/**\n * Testing multiline comments in string: First line\n * Second line\n *\n * Fourth line\n */\nexport type CamelCaseCommentWithBreaks = number;\n\n/**\n * Testing multiline comments in string: First line\n * Second line\n *\n * Fourth line\n */\nexport type CommentWithBreaks = number;\n\n/**\n * Testing backticks in string: `backticks` and ```multiple backticks``` should work\n */\nexport type CommentWithBackticks = number;\n\n/**\n * Testing backticks and quotes in string: `backticks`, 'quotes', \"double quotes\" and ```multiple backticks``` should work\n */\nexport type CommentWithBackticksAndQuotes = number;\n\n/**\n * Testing slashes in string: \\backwards\\\\\\ and /forwards/// should work\n */\nexport type CommentWithSlashes = number;\n\n/**\n * Testing expression placeholders in string: ${expression} should work\n */\nexport type CommentWithExpressionPlaceholders = number;\n\n/**\n * Testing quotes in string: 'single quote''' and \"double quotes\"\"\" should work\n */\nexport type CommentWithQuotes = number;\n\n/**\n * Testing reserved characters in string: * inline * and ** inline ** should work\n */\nexport type CommentWithReservedCharacters = number;\n\n/**\n * This is a simple number\n */\nexport type SimpleInteger = number;\n\n/**\n * This is a simple boolean\n */\nexport type SimpleBoolean = boolean;\n\n/**\n * This is a simple string\n */\nexport type SimpleString = string;\n\n/**\n * A string with non-ascii (unicode) characters valid in typescript identifiers (æøåÆØÅöÔèÈ字符串)\n */\nexport type NonAsciiStringæøåÆøÅöôêÊ字符串 = string;\n\n/**\n * This is a simple file\n */\nexport type SimpleFile = Blob | File;\n\n/**\n * This is a simple reference\n */\nexport type SimpleReference = ModelWithString;\n\n/**\n * This is a simple string\n */\nexport type SimpleStringWithPattern = string | null;\n\n/**\n * This is a simple enum with strings\n */\nexport type EnumWithStrings = 'Success' | 'Warning' | 'Error' | '\\'Single Quote\\'' | '\"Double Quotes\"' | 'Non-ascii: øæåôöØÆÅÔÖ字符串';\n\nexport type EnumWithReplacedCharacters = '\\'Single Quote\\'' | '\"Double Quotes\"' | 'øæåôöØÆÅÔÖ字符串' | 3.1 | '';\n\n/**\n * This is a simple enum with numbers\n */\nexport type EnumWithNumbers = 1 | 2 | 3 | 1.1 | 1.2 | 1.3 | 100 | 200 | 300 | -100 | -200 | -300 | -1.1 | -1.2 | -1.3;\n\n/**\n * Success=1,Warning=2,Error=3\n */\nexport type EnumFromDescription = number;\n\n/**\n * This is a simple enum with numbers\n */\nexport type EnumWithExtensions = 200 | 400 | 500;\n\nexport type EnumWithXEnumNames = 0 | 1 | 2;\n\n/**\n * This is a simple array with numbers\n */\nexport type ArrayWithNumbers = Array<number>;\n\n/**\n * This is a simple array with booleans\n */\nexport type ArrayWithBooleans = Array<boolean>;\n\n/**\n * This is a simple array with strings\n */\nexport type ArrayWithStrings = Array<string>;\n\n/**\n * This is a simple array with references\n */\nexport type ArrayWithReferences = Array<ModelWithString>;\n\n/**\n * This is a simple array containing an array\n */\nexport type ArrayWithArray = Array<Array<ModelWithString>>;\n\n/**\n * This is a simple array with properties\n */\nexport type ArrayWithProperties = Array<{\n    '16x16'?: CamelCaseCommentWithBreaks;\n    bar?: string;\n}>;\n\n/**\n * This is a simple array with any of properties\n */\nexport type ArrayWithAnyOfProperties = Array<{\n    foo?: string;\n} | {\n    bar?: string;\n}>;\n\nexport type AnyOfAnyAndNull = {\n    data?: unknown | null;\n};\n\n/**\n * This is a simple array with any of properties\n */\nexport type AnyOfArrays = {\n    results?: Array<{\n        foo?: string;\n    } | {\n        bar?: string;\n    }>;\n};\n\n/**\n * This is a string dictionary\n */\nexport type DictionaryWithString = {\n    [key: string]: string;\n};\n\nexport type DictionaryWithPropertiesAndAdditionalProperties = {\n    foo?: number;\n    bar?: boolean;\n    [key: string]: string | number | boolean | undefined;\n};\n\n/**\n * This is a string reference\n */\nexport type DictionaryWithReference = {\n    [key: string]: ModelWithString;\n};\n\n/**\n * This is a complex dictionary\n */\nexport type DictionaryWithArray = {\n    [key: string]: Array<ModelWithString>;\n};\n\n/**\n * This is a string dictionary\n */\nexport type DictionaryWithDictionary = {\n    [key: string]: {\n        [key: string]: string;\n    };\n};\n\n/**\n * This is a complex dictionary\n */\nexport type DictionaryWithProperties = {\n    [key: string]: {\n        foo?: string;\n        bar?: string;\n    };\n};\n\n/**\n * This is a model with one number property\n */\nexport type ModelWithInteger = {\n    /**\n     * This is a simple number property\n     */\n    prop?: number;\n};\n\n/**\n * This is a model with one boolean property\n */\nexport type ModelWithBoolean = {\n    /**\n     * This is a simple boolean property\n     */\n    prop?: boolean;\n};\n\n/**\n * This is a model with one string property\n */\nexport type ModelWithString = {\n    /**\n     * This is a simple string property\n     */\n    prop?: string;\n};\n\n/**\n * This is a model with one string property\n */\nexport type ModelWithStringError = {\n    /**\n     * This is a simple string property\n     */\n    prop?: string;\n};\n\n/**\n * `Comment` or `VoiceComment`. The JSON object for adding voice comments to tickets is different. See [Adding voice comments to tickets](/documentation/ticketing/managing-tickets/adding-voice-comments-to-tickets)\n */\nexport type ModelFromZendesk = string;\n\n/**\n * This is a model with one string property\n */\nexport type ModelWithNullableString = {\n    /**\n     * This is a simple string property\n     */\n    nullableProp1?: string | null;\n    /**\n     * This is a simple string property\n     */\n    nullableRequiredProp1: string | null;\n    /**\n     * This is a simple string property\n     */\n    nullableProp2?: string | null;\n    /**\n     * This is a simple string property\n     */\n    nullableRequiredProp2: string | null;\n    /**\n     * This is a simple enum with strings\n     */\n    'foo_bar-enum'?: 'Success' | 'Warning' | 'Error' | 'ØÆÅ字符串';\n};\n\n/**\n * This is a model with one enum\n */\nexport type ModelWithEnum = {\n    /**\n     * This is a simple enum with strings\n     */\n    'foo_bar-enum'?: 'Success' | 'Warning' | 'Error' | 'ØÆÅ字符串';\n    /**\n     * These are the HTTP error code enums\n     */\n    statusCode?: '100' | '200 FOO' | '300 FOO_BAR' | '400 foo-bar' | '500 foo.bar' | '600 foo&bar';\n    /**\n     * Simple boolean enum\n     */\n    bool?: true;\n};\n\n/**\n * This is a model with one enum with escaped name\n */\nexport type ModelWithEnumWithHyphen = {\n    /**\n     * Foo-Bar-Baz-Qux\n     */\n    'foo-bar-baz-qux'?: '3.0';\n};\n\n/**\n * This is a model with one enum\n */\nexport type ModelWithEnumFromDescription = {\n    /**\n     * Success=1,Warning=2,Error=3\n     */\n    test?: number;\n};\n\n/**\n * This is a model with nested enums\n */\nexport type ModelWithNestedEnums = {\n    dictionaryWithEnum?: {\n        [key: string]: 'Success' | 'Warning' | 'Error';\n    };\n    dictionaryWithEnumFromDescription?: {\n        [key: string]: number;\n    };\n    arrayWithEnum?: Array<'Success' | 'Warning' | 'Error'>;\n    arrayWithDescription?: Array<number>;\n    /**\n     * This is a simple enum with strings\n     */\n    'foo_bar-enum'?: 'Success' | 'Warning' | 'Error' | 'ØÆÅ字符串';\n};\n\n/**\n * This is a model with one property containing a reference\n */\nexport type ModelWithReference = {\n    prop?: ModelWithProperties;\n};\n\n/**\n * This is a model with one property containing an array\n */\nexport type ModelWithArrayReadOnlyAndWriteOnly = {\n    prop?: Array<ModelWithReadOnlyAndWriteOnly>;\n    propWithFile?: Array<Blob | File>;\n    propWithNumber?: Array<number>;\n};\n\n/**\n * This is a model with one property containing an array\n */\nexport type ModelWithArray = {\n    prop?: Array<ModelWithString>;\n    propWithFile?: Array<Blob | File>;\n    propWithNumber?: Array<number>;\n};\n\n/**\n * This is a model with one property containing a dictionary\n */\nexport type ModelWithDictionary = {\n    prop?: {\n        [key: string]: string;\n    };\n};\n\n/**\n * This is a deprecated model with a deprecated property\n *\n * @deprecated\n */\nexport type DeprecatedModel = {\n    /**\n     * This is a deprecated property\n     *\n     * @deprecated\n     */\n    prop?: string;\n};\n\n/**\n * This is a model with one property containing a circular reference\n */\nexport type ModelWithCircularReference = {\n    prop?: ModelWithCircularReference;\n};\n\n/**\n * This is a model with one property with a 'one of' relationship\n */\nexport type CompositionWithOneOf = {\n    propA?: ModelWithString | ModelWithEnum | ModelWithArray | ModelWithDictionary;\n};\n\n/**\n * This is a model with one property with a 'one of' relationship where the options are not $ref\n */\nexport type CompositionWithOneOfAnonymous = {\n    propA?: {\n        propA?: string;\n    } | string | number;\n};\n\n/**\n * Circle\n */\nexport type ModelCircle = {\n    kind: string;\n    radius?: number;\n};\n\n/**\n * Square\n */\nexport type ModelSquare = {\n    kind: string;\n    sideLength?: number;\n};\n\n/**\n * This is a model with one property with a 'one of' relationship where the options are not $ref\n */\nexport type CompositionWithOneOfDiscriminator = ({\n    kind: 'circle';\n} & ModelCircle) | ({\n    kind: 'square';\n} & ModelSquare);\n\n/**\n * This is a model with one property with a 'any of' relationship\n */\nexport type CompositionWithAnyOf = {\n    propA?: ModelWithString | ModelWithEnum | ModelWithArray | ModelWithDictionary;\n};\n\n/**\n * This is a model with one property with a 'any of' relationship where the options are not $ref\n */\nexport type CompositionWithAnyOfAnonymous = {\n    propA?: {\n        propA?: string;\n    } | string | number;\n};\n\n/**\n * This is a model with nested 'any of' property with a type null\n */\nexport type CompositionWithNestedAnyAndTypeNull = {\n    propA?: Array<ModelWithDictionary | null> | Array<ModelWithArray | null>;\n};\n\nexport type _3eNum1Период = 'Bird' | 'Dog';\n\nexport type ConstValue = 'ConstValue';\n\n/**\n * This is a model with one property with a 'any of' relationship where the options are not $ref\n */\nexport type CompositionWithNestedAnyOfAndNull = {\n    /**\n     * Scopes\n     */\n    propA?: Array<_3eNum1Период | ConstValue> | null;\n};\n\n/**\n * This is a model with one property with a 'one of' relationship\n */\nexport type CompositionWithOneOfAndNullable = {\n    propA?: {\n        boolean?: boolean;\n    } | ModelWithEnum | ModelWithArray | ModelWithDictionary | null;\n};\n\n/**\n * This is a model that contains a simple dictionary within composition\n */\nexport type CompositionWithOneOfAndSimpleDictionary = {\n    propA?: boolean | {\n        [key: string]: number;\n    };\n};\n\n/**\n * This is a model that contains a dictionary of simple arrays within composition\n */\nexport type CompositionWithOneOfAndSimpleArrayDictionary = {\n    propA?: boolean | {\n        [key: string]: Array<boolean>;\n    };\n};\n\n/**\n * This is a model that contains a dictionary of complex arrays (composited) within composition\n */\nexport type CompositionWithOneOfAndComplexArrayDictionary = {\n    propA?: boolean | {\n        [key: string]: Array<number | string>;\n    };\n};\n\n/**\n * This is a model with one property with a 'all of' relationship\n */\nexport type CompositionWithAllOfAndNullable = {\n    propA?: ({\n        boolean?: boolean;\n    } & ModelWithEnum & ModelWithArray & ModelWithDictionary) | null;\n};\n\n/**\n * This is a model with one property with a 'any of' relationship\n */\nexport type CompositionWithAnyOfAndNullable = {\n    propA?: {\n        boolean?: boolean;\n    } | ModelWithEnum | ModelWithArray | ModelWithDictionary | null;\n};\n\n/**\n * This is a base model with two simple optional properties\n */\nexport type CompositionBaseModel = {\n    firstName?: string;\n    lastname?: string;\n};\n\n/**\n * This is a model that extends the base model\n */\nexport type CompositionExtendedModel = CompositionBaseModel & {\n    age: number;\n    firstName: string;\n    lastname: string;\n};\n\n/**\n * This is a model with one nested property\n */\nexport type ModelWithProperties = {\n    required: string;\n    readonly requiredAndReadOnly: string;\n    requiredAndNullable: string | null;\n    string?: string;\n    number?: number;\n    boolean?: boolean;\n    reference?: ModelWithString;\n    'property with space'?: string;\n    default?: string;\n    try?: string;\n    readonly '@namespace.string'?: string;\n    readonly '@namespace.integer'?: number;\n};\n\n/**\n * This is a model with one nested property\n */\nexport type ModelWithNestedProperties = {\n    readonly first: {\n        readonly second: {\n            readonly third: string | null;\n        } | null;\n    } | null;\n};\n\n/**\n * This is a model with duplicated properties\n */\nexport type ModelWithDuplicateProperties = {\n    prop?: ModelWithString;\n};\n\n/**\n * This is a model with ordered properties\n */\nexport type ModelWithOrderedProperties = {\n    zebra?: string;\n    apple?: string;\n    hawaii?: string;\n};\n\n/**\n * This is a model with duplicated imports\n */\nexport type ModelWithDuplicateImports = {\n    propA?: ModelWithString;\n    propB?: ModelWithString;\n    propC?: ModelWithString;\n};\n\n/**\n * This is a model that extends another model\n */\nexport type ModelThatExtends = ModelWithString & {\n    propExtendsA?: string;\n    propExtendsB?: ModelWithString;\n};\n\n/**\n * This is a model that extends another model\n */\nexport type ModelThatExtendsExtends = ModelWithString & ModelThatExtends & {\n    propExtendsC?: string;\n    propExtendsD?: ModelWithString;\n};\n\n/**\n * This is a model that contains a some patterns\n */\nexport type ModelWithPattern = {\n    key: string;\n    name: string;\n    readonly enabled?: boolean;\n    readonly modified?: string;\n    id?: string;\n    text?: string;\n    patternWithSingleQuotes?: string;\n    patternWithNewline?: string;\n    patternWithBacktick?: string;\n    patternWithUnicode?: string;\n};\n\nexport type File = {\n    /**\n     * Id\n     */\n    readonly id?: string;\n    /**\n     * Updated at\n     */\n    readonly updated_at?: string;\n    /**\n     * Created at\n     */\n    readonly created_at?: string;\n    /**\n     * Mime\n     */\n    mime: string;\n    /**\n     * File\n     */\n    readonly file?: string;\n};\n\nexport type Default = {\n    name?: string;\n};\n\nexport type Pageable = {\n    page?: number;\n    size?: number;\n    sort?: Array<string>;\n};\n\n/**\n * This is a free-form object without additionalProperties.\n */\nexport type FreeFormObjectWithoutAdditionalProperties = {\n    [key: string]: unknown;\n};\n\n/**\n * This is a free-form object with additionalProperties: true.\n */\nexport type FreeFormObjectWithAdditionalPropertiesEqTrue = {\n    [key: string]: unknown;\n};\n\n/**\n * This is a free-form object with additionalProperties: {}.\n */\nexport type FreeFormObjectWithAdditionalPropertiesEqEmptyObject = {\n    [key: string]: unknown;\n};\n\nexport type ModelWithConst = {\n    String?: 'String';\n    number?: 0;\n    null?: null;\n    withType?: 'Some string';\n};\n\n/**\n * This is a model with one property and additionalProperties: true\n */\nexport type ModelWithAdditionalPropertiesEqTrue = {\n    /**\n     * This is a simple string property\n     */\n    prop?: string;\n    [key: string]: unknown;\n};\n\nexport type NestedAnyOfArraysNullable = {\n    nullableArray?: Array<string | boolean> | null;\n};\n\nexport type CompositionWithOneOfAndProperties = ({\n    foo: SimpleParameter;\n} | {\n    bar: NonAsciiStringæøåÆøÅöôêÊ字符串;\n}) & {\n    baz: number | null;\n    qux: number;\n};\n\n/**\n * An object that can be null\n */\nexport type NullableObject = {\n    foo?: string;\n} | null;\n\n/**\n * Some % character\n */\nexport type CharactersInDescription = string;\n\nexport type ModelWithNullableObject = {\n    data?: NullableObject;\n};\n\n/**\n * An object with additional properties that can be null (anyOf ref + null)\n */\nexport type ModelWithAdditionalPropertiesRef = {\n    [key: string]: NullableObject | null;\n};\n\nexport type ModelWithOneOfEnum = {\n    foo: 'Bar';\n} | {\n    foo: 'Baz';\n} | {\n    foo: 'Qux';\n} | {\n    content: string;\n    foo: 'Quux';\n} | {\n    content: [\n        string,\n        string\n    ];\n    foo: 'Corge';\n};\n\nexport type ModelWithNestedArrayEnumsDataFoo = 'foo' | 'bar';\n\nexport type ModelWithNestedArrayEnumsDataBar = 'baz' | 'qux';\n\nexport type ModelWithNestedArrayEnumsData = {\n    foo?: Array<ModelWithNestedArrayEnumsDataFoo>;\n    bar?: Array<ModelWithNestedArrayEnumsDataBar>;\n};\n\nexport type ModelWithNestedArrayEnums = {\n    array_strings?: Array<string>;\n    data?: ModelWithNestedArrayEnumsData;\n};\n\nexport type ModelWithNestedCompositionEnums = {\n    foo?: ModelWithNestedArrayEnumsDataFoo;\n};\n\nexport type ModelWithReadOnlyAndWriteOnly = {\n    foo: string;\n    readonly bar: string;\n};\n\nexport type ModelWithConstantSizeArray = [\n    number,\n    number\n];\n\nexport type ModelWithAnyOfConstantSizeArray = [\n    number | string,\n    number | string,\n    number | string\n];\n\nexport type ModelWithPrefixItemsConstantSizeArray = [\n    ModelWithInteger,\n    number | string,\n    string\n];\n\nexport type ModelWithAnyOfConstantSizeArrayNullable = [\n    number | null | string,\n    number | null | string,\n    number | null | string\n];\n\nexport type ModelWithAnyOfConstantSizeArrayWithNSizeAndOptions = [\n    number | Import,\n    number | Import\n];\n\nexport type ModelWithAnyOfConstantSizeArrayAndIntersect = [\n    number & string,\n    number & string\n];\n\nexport type ModelWithNumericEnumUnion = {\n    /**\n     * Период\n     */\n    value?: -10 | -1 | 0 | 1 | 3 | 6 | 12;\n};\n\n/**\n * Some description with `back ticks`\n */\nexport type ModelWithBackticksInDescription = {\n    /**\n     * The template `that` should be used for parsing and importing the contents of the CSV file.\n     *\n     * <br/><p>There is one placeholder currently supported:<ul>     <li><b>${x}</b> - refers to the n-th column in the CSV file, e.g. ${1}, ${2}, ...)</li></ul><p>Example of a correct JSON template:</p>\n     * <pre>\n     * [\n     * {\n     * \"resourceType\": \"Asset\",\n     * \"identifier\": {\n     * \"name\": \"${1}\",\n     * \"domain\": {\n     * \"name\": \"${2}\",\n     * \"community\": {\n     * \"name\": \"Some Community\"\n     * }\n     * }\n     * },\n     * \"attributes\" : {\n     * \"00000000-0000-0000-0000-000000003115\" : [ {\n     * \"value\" : \"${3}\"\n     * } ],\n     * \"00000000-0000-0000-0000-000000000222\" : [ {\n     * \"value\" : \"${4}\"\n     * } ]\n     * }\n     * }\n     * ]\n     * </pre>\n     */\n    template?: string;\n};\n\nexport type ModelWithOneOfAndProperties = (SimpleParameter | NonAsciiStringæøåÆøÅöôêÊ字符串) & {\n    baz: number | null;\n    qux: number;\n};\n\n/**\n * Model used to test deduplication strategy (unused)\n */\nexport type ParameterSimpleParameterUnused = string;\n\n/**\n * Model used to test deduplication strategy\n */\nexport type PostServiceWithEmptyTagResponse = string;\n\n/**\n * Model used to test deduplication strategy\n */\nexport type PostServiceWithEmptyTagResponse2 = string;\n\n/**\n * Model used to test deduplication strategy\n */\nexport type DeleteFooData = string;\n\n/**\n * Model used to test deduplication strategy\n */\nexport type DeleteFooData2 = string;\n\n/**\n * Model with restricted keyword name\n */\nexport type Import = string;\n\nexport type SchemaWithFormRestrictedKeys = {\n    description?: string;\n    'x-enum-descriptions'?: string;\n    'x-enum-varnames'?: string;\n    'x-enumNames'?: string;\n    title?: string;\n    object?: {\n        description?: string;\n        'x-enum-descriptions'?: string;\n        'x-enum-varnames'?: string;\n        'x-enumNames'?: string;\n        title?: string;\n    };\n    array?: Array<{\n        description?: string;\n        'x-enum-descriptions'?: string;\n        'x-enum-varnames'?: string;\n        'x-enumNames'?: string;\n        title?: string;\n    }>;\n};\n\n/**\n * This schema was giving PascalCase transformations a hard time\n */\nexport type IoK8sApimachineryPkgApisMetaV1DeleteOptions = {\n    /**\n     * Must be fulfilled before a deletion is carried out. If not possible, a 409 Conflict status will be returned.\n     */\n    preconditions?: IoK8sApimachineryPkgApisMetaV1Preconditions;\n};\n\n/**\n * This schema was giving PascalCase transformations a hard time\n */\nexport type IoK8sApimachineryPkgApisMetaV1Preconditions = {\n    /**\n     * Specifies the target ResourceVersion\n     */\n    resourceVersion?: string;\n    /**\n     * Specifies the target UID.\n     */\n    uid?: string;\n};\n\nexport type AdditionalPropertiesUnknownIssue = {\n    [key: string]: string | number;\n};\n\nexport type AdditionalPropertiesUnknownIssue2 = {\n    [key: string]: string | number;\n};\n\nexport type AdditionalPropertiesUnknownIssue3 = string & {\n    entries: {\n        [key: string]: AdditionalPropertiesUnknownIssue;\n    };\n};\n\nexport type AdditionalPropertiesIntegerIssue = {\n    value: number;\n    [key: string]: number;\n};\n\nexport type OneOfAllOfIssue = ((ConstValue | GenericSchemaDuplicateIssue1SystemBoolean) & _3eNum1Период) | GenericSchemaDuplicateIssue1SystemString;\n\nexport type GenericSchemaDuplicateIssue1SystemBoolean = {\n    item?: boolean;\n    error?: string | null;\n    readonly hasError?: boolean;\n    data?: {\n        [key: string]: never;\n    };\n};\n\nexport type GenericSchemaDuplicateIssue1SystemString = {\n    item?: string | null;\n    error?: string | null;\n    readonly hasError?: boolean;\n};\n\nexport type ExternalSharedModel = {\n    id: string;\n    name?: string;\n};\n\n/**\n * This is a model with one property containing a reference\n */\nexport type ModelWithReferenceWritable = {\n    prop?: ModelWithPropertiesWritable;\n};\n\n/**\n * This is a model with one property containing an array\n */\nexport type ModelWithArrayReadOnlyAndWriteOnlyWritable = {\n    prop?: Array<ModelWithReadOnlyAndWriteOnlyWritable>;\n    propWithFile?: Array<Blob | File>;\n    propWithNumber?: Array<number>;\n};\n\n/**\n * This is a model with one nested property\n */\nexport type ModelWithPropertiesWritable = {\n    required: string;\n    requiredAndNullable: string | null;\n    string?: string;\n    number?: number;\n    boolean?: boolean;\n    reference?: ModelWithString;\n    'property with space'?: string;\n    default?: string;\n    try?: string;\n};\n\n/**\n * This is a model that contains a some patterns\n */\nexport type ModelWithPatternWritable = {\n    key: string;\n    name: string;\n    id?: string;\n    text?: string;\n    patternWithSingleQuotes?: string;\n    patternWithNewline?: string;\n    patternWithBacktick?: string;\n    patternWithUnicode?: string;\n};\n\nexport type FileWritable = {\n    /**\n     * Mime\n     */\n    mime: string;\n};\n\nexport type ModelWithReadOnlyAndWriteOnlyWritable = {\n    foo: string;\n    baz: string;\n};\n\nexport type ModelWithAnyOfConstantSizeArrayWithNSizeAndOptionsWritable = [\n    number | Import,\n    number | Import\n];\n\nexport type AdditionalPropertiesUnknownIssueWritable = {\n    [key: string]: string | number;\n};\n\nexport type OneOfAllOfIssueWritable = ((ConstValue | GenericSchemaDuplicateIssue1SystemBoolean) & _3eNum1Период) | GenericSchemaDuplicateIssue1SystemString;\n\nexport type GenericSchemaDuplicateIssue1SystemBooleanWritable = {\n    item?: boolean;\n    error?: string | null;\n    data?: {\n        [key: string]: never;\n    };\n};\n\nexport type GenericSchemaDuplicateIssue1SystemStringWritable = {\n    item?: string | null;\n    error?: string | null;\n};\n\n/**\n * This is a reusable parameter\n */\nexport type SimpleParameter = string;\n\n/**\n * Parameter with illegal characters\n */\nexport type XFooBar = ModelWithString;\n\n/**\n * A reusable request body\n */\nexport type SimpleRequestBody = ModelWithString;\n\n/**\n * A reusable request body\n */\nexport type SimpleFormData = ModelWithString;\n\nexport type ExportData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no+tag';\n};\n\nexport type PatchApiVbyApiVersionNoTagData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no+tag';\n};\n\nexport type PatchApiVbyApiVersionNoTagResponses = {\n    /**\n     * OK\n     */\n    default: unknown;\n};\n\nexport type ImportData = {\n    body: ModelWithReadOnlyAndWriteOnlyWritable | ModelWithArrayReadOnlyAndWriteOnlyWritable;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no+tag';\n};\n\nexport type ImportResponses = {\n    /**\n     * Success\n     */\n    200: ModelFromZendesk;\n    /**\n     * Default success response\n     */\n    default: ModelWithReadOnlyAndWriteOnly;\n};\n\nexport type ImportResponse = ImportResponses[keyof ImportResponses];\n\nexport type FooWowData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no+tag';\n};\n\nexport type FooWowResponses = {\n    /**\n     * OK\n     */\n    default: unknown;\n};\n\nexport type ApiVVersionODataControllerCountData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple/$count';\n};\n\nexport type ApiVVersionODataControllerCountResponses = {\n    /**\n     * Success\n     */\n    200: ModelFromZendesk;\n};\n\nexport type ApiVVersionODataControllerCountResponse = ApiVVersionODataControllerCountResponses[keyof ApiVVersionODataControllerCountResponses];\n\nexport type GetApiVbyApiVersionSimpleOperationData = {\n    body?: never;\n    path: {\n        /**\n         * foo in method\n         */\n        foo_param: string;\n    };\n    query?: never;\n    url: '/api/v{api-version}/simple:operation';\n};\n\nexport type GetApiVbyApiVersionSimpleOperationErrors = {\n    /**\n     * Default error response\n     */\n    default: ModelWithBoolean;\n};\n\nexport type GetApiVbyApiVersionSimpleOperationError = GetApiVbyApiVersionSimpleOperationErrors[keyof GetApiVbyApiVersionSimpleOperationErrors];\n\nexport type GetApiVbyApiVersionSimpleOperationResponses = {\n    /**\n     * Response is a simple number\n     */\n    200: number;\n};\n\nexport type GetApiVbyApiVersionSimpleOperationResponse = GetApiVbyApiVersionSimpleOperationResponses[keyof GetApiVbyApiVersionSimpleOperationResponses];\n\nexport type DeleteCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type GetCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type HeadCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type OptionsCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type PatchCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type PostCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type PutCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type DeleteFooData3 = {\n    body?: never;\n    headers: {\n        /**\n         * Parameter with illegal characters\n         */\n        'x-Foo-Bar': ModelWithString;\n    };\n    path: {\n        /**\n         * foo in method\n         */\n        foo_param: string;\n        /**\n         * bar in method\n         */\n        BarParam: string;\n    };\n    query?: never;\n    url: '/api/v{api-version}/foo/{foo_param}/bar/{BarParam}';\n};\n\nexport type CallWithDescriptionsData = {\n    body?: never;\n    path?: never;\n    query?: {\n        /**\n         * Testing multiline comments in string: First line\n         * Second line\n         *\n         * Fourth line\n         */\n        parameterWithBreaks?: string;\n        /**\n         * Testing backticks in string: `backticks` and ```multiple backticks``` should work\n         */\n        parameterWithBackticks?: string;\n        /**\n         * Testing slashes in string: \\backwards\\\\\\ and /forwards/// should work\n         */\n        parameterWithSlashes?: string;\n        /**\n         * Testing expression placeholders in string: ${expression} should work\n         */\n        parameterWithExpressionPlaceholders?: string;\n        /**\n         * Testing quotes in string: 'single quote''' and \"double quotes\"\"\" should work\n         */\n        parameterWithQuotes?: string;\n        /**\n         * Testing reserved characters in string: * inline * and ** inline ** should work\n         */\n        parameterWithReservedCharacters?: string;\n    };\n    url: '/api/v{api-version}/descriptions';\n};\n\nexport type DeprecatedCallData = {\n    body?: never;\n    headers: {\n        /**\n         * This parameter is deprecated\n         *\n         * @deprecated\n         */\n        parameter: DeprecatedModel | null;\n    };\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/parameters/deprecated';\n};\n\nexport type CallWithParametersData = {\n    /**\n     * This is the parameter that goes into the body\n     */\n    body: {\n        [key: string]: unknown;\n    } | null;\n    headers: {\n        /**\n         * This is the parameter that goes into the header\n         */\n        parameterHeader: string | null;\n    };\n    path: {\n        /**\n         * This is the parameter that goes into the path\n         */\n        parameterPath: string | null;\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string | null;\n    };\n    query: {\n        foo_ref_enum?: ModelWithNestedArrayEnumsDataFoo;\n        foo_all_of_enum: ModelWithNestedArrayEnumsDataFoo;\n        /**\n         * This is the parameter that goes into the query params\n         */\n        cursor: string | null;\n    };\n    url: '/api/v{api-version}/parameters/{parameterPath}';\n};\n\nexport type CallWithWeirdParameterNamesData = {\n    /**\n     * This is the parameter that goes into the body\n     */\n    body: ModelWithString | null;\n    headers: {\n        /**\n         * This is the parameter that goes into the request header\n         */\n        'parameter.header': string | null;\n    };\n    path: {\n        /**\n         * This is the parameter that goes into the path\n         */\n        'parameter.path.1'?: string;\n        /**\n         * This is the parameter that goes into the path\n         */\n        'parameter-path-2'?: string;\n        /**\n         * This is the parameter that goes into the path\n         */\n        'PARAMETER-PATH-3'?: string;\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string | null;\n    };\n    query: {\n        /**\n         * This is the parameter with a reserved keyword\n         */\n        default?: string;\n        /**\n         * This is the parameter that goes into the request query params\n         */\n        'parameter-query': string | null;\n    };\n    url: '/api/v{api-version}/parameters/{parameter.path.1}/{parameter-path-2}/{PARAMETER-PATH-3}';\n};\n\nexport type GetCallWithOptionalParamData = {\n    /**\n     * This is a required parameter\n     */\n    body: ModelWithOneOfEnum;\n    path?: never;\n    query?: {\n        /**\n         * This is an optional parameter\n         */\n        page?: number;\n    };\n    url: '/api/v{api-version}/parameters';\n};\n\nexport type PostCallWithOptionalParamData = {\n    /**\n     * This is an optional parameter\n     */\n    body?: {\n        offset?: number | null;\n    };\n    path?: never;\n    query: {\n        /**\n         * This is a required parameter\n         */\n        parameter: Pageable;\n    };\n    url: '/api/v{api-version}/parameters';\n};\n\nexport type PostCallWithOptionalParamResponses = {\n    /**\n     * Response is a simple number\n     */\n    200: number;\n    /**\n     * Success\n     */\n    204: void;\n};\n\nexport type PostCallWithOptionalParamResponse = PostCallWithOptionalParamResponses[keyof PostCallWithOptionalParamResponses];\n\nexport type PostApiVbyApiVersionRequestBodyData = {\n    /**\n     * A reusable request body\n     */\n    body?: SimpleRequestBody;\n    path?: never;\n    query?: {\n        /**\n         * This is a reusable parameter\n         */\n        parameter?: string;\n    };\n    url: '/api/v{api-version}/requestBody';\n};\n\nexport type PostApiVbyApiVersionFormDataData = {\n    /**\n     * A reusable request body\n     */\n    body?: SimpleFormData;\n    path?: never;\n    query?: {\n        /**\n         * This is a reusable parameter\n         */\n        parameter?: string;\n    };\n    url: '/api/v{api-version}/formData';\n};\n\nexport type CallWithDefaultParametersData = {\n    body?: never;\n    path?: never;\n    query?: {\n        /**\n         * This is a simple string with default value\n         */\n        parameterString?: string | null;\n        /**\n         * This is a simple number with default value\n         */\n        parameterNumber?: number | null;\n        /**\n         * This is a simple boolean with default value\n         */\n        parameterBoolean?: boolean | null;\n        /**\n         * This is a simple enum with default value\n         */\n        parameterEnum?: 'Success' | 'Warning' | 'Error';\n        /**\n         * This is a simple model with default value\n         */\n        parameterModel?: ModelWithString | null;\n    };\n    url: '/api/v{api-version}/defaults';\n};\n\nexport type CallWithDefaultOptionalParametersData = {\n    body?: never;\n    path?: never;\n    query?: {\n        /**\n         * This is a simple string that is optional with default value\n         */\n        parameterString?: string;\n        /**\n         * This is a simple number that is optional with default value\n         */\n        parameterNumber?: number;\n        /**\n         * This is a simple boolean that is optional with default value\n         */\n        parameterBoolean?: boolean;\n        /**\n         * This is a simple enum that is optional with default value\n         */\n        parameterEnum?: 'Success' | 'Warning' | 'Error';\n        /**\n         * This is a simple model that is optional with default value\n         */\n        parameterModel?: ModelWithString;\n    };\n    url: '/api/v{api-version}/defaults';\n};\n\nexport type CallToTestOrderOfParamsData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * This is a optional string with default\n         */\n        parameterOptionalStringWithDefault?: string;\n        /**\n         * This is a optional string with empty default\n         */\n        parameterOptionalStringWithEmptyDefault?: string;\n        /**\n         * This is a optional string with no default\n         */\n        parameterOptionalStringWithNoDefault?: string;\n        /**\n         * This is a string with default\n         */\n        parameterStringWithDefault: string;\n        /**\n         * This is a string with empty default\n         */\n        parameterStringWithEmptyDefault: string;\n        /**\n         * This is a string with no default\n         */\n        parameterStringWithNoDefault: string;\n        /**\n         * This is a string that can be null with no default\n         */\n        parameterStringNullableWithNoDefault?: string | null;\n        /**\n         * This is a string that can be null with default\n         */\n        parameterStringNullableWithDefault?: string | null;\n    };\n    url: '/api/v{api-version}/defaults';\n};\n\nexport type DuplicateNameData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/duplicate';\n};\n\nexport type DuplicateName2Data = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/duplicate';\n};\n\nexport type DuplicateName3Data = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/duplicate';\n};\n\nexport type DuplicateName4Data = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/duplicate';\n};\n\nexport type CallWithNoContentResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no-content';\n};\n\nexport type CallWithNoContentResponseResponses = {\n    /**\n     * Success\n     */\n    204: void;\n};\n\nexport type CallWithNoContentResponseResponse = CallWithNoContentResponseResponses[keyof CallWithNoContentResponseResponses];\n\nexport type CallWithResponseAndNoContentResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multiple-tags/response-and-no-content';\n};\n\nexport type CallWithResponseAndNoContentResponseResponses = {\n    /**\n     * Response is a simple number\n     */\n    200: number;\n    /**\n     * Success\n     */\n    204: void;\n};\n\nexport type CallWithResponseAndNoContentResponseResponse = CallWithResponseAndNoContentResponseResponses[keyof CallWithResponseAndNoContentResponseResponses];\n\nexport type DummyAData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multiple-tags/a';\n};\n\nexport type DummyAResponses = {\n    200: _400;\n};\n\nexport type DummyAResponse = DummyAResponses[keyof DummyAResponses];\n\nexport type DummyBData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multiple-tags/b';\n};\n\nexport type DummyBResponses = {\n    /**\n     * Success\n     */\n    204: void;\n};\n\nexport type DummyBResponse = DummyBResponses[keyof DummyBResponses];\n\nexport type CallWithResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/response';\n};\n\nexport type CallWithResponseResponses = {\n    default: Import;\n};\n\nexport type CallWithResponseResponse = CallWithResponseResponses[keyof CallWithResponseResponses];\n\nexport type CallWithDuplicateResponsesData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/response';\n};\n\nexport type CallWithDuplicateResponsesErrors = {\n    /**\n     * Message for 500 error\n     */\n    500: ModelWithStringError;\n    /**\n     * Message for 501 error\n     */\n    501: ModelWithStringError;\n    /**\n     * Message for 502 error\n     */\n    502: ModelWithStringError;\n    /**\n     * Message for 4XX errors\n     */\n    '4XX': DictionaryWithArray;\n    /**\n     * Default error response\n     */\n    default: ModelWithBoolean;\n};\n\nexport type CallWithDuplicateResponsesError = CallWithDuplicateResponsesErrors[keyof CallWithDuplicateResponsesErrors];\n\nexport type CallWithDuplicateResponsesResponses = {\n    /**\n     * Message for 200 response\n     */\n    200: ModelWithBoolean & ModelWithInteger;\n    /**\n     * Message for 201 response\n     */\n    201: ModelWithString;\n    /**\n     * Message for 202 response\n     */\n    202: ModelWithString;\n};\n\nexport type CallWithDuplicateResponsesResponse = CallWithDuplicateResponsesResponses[keyof CallWithDuplicateResponsesResponses];\n\nexport type CallWithResponsesData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/response';\n};\n\nexport type CallWithResponsesErrors = {\n    /**\n     * Message for 500 error\n     */\n    500: ModelWithStringError;\n    /**\n     * Message for 501 error\n     */\n    501: ModelWithStringError;\n    /**\n     * Message for 502 error\n     */\n    502: ModelWithStringError;\n    /**\n     * Message for default response\n     */\n    default: ModelWithStringError;\n};\n\nexport type CallWithResponsesError = CallWithResponsesErrors[keyof CallWithResponsesErrors];\n\nexport type CallWithResponsesResponses = {\n    /**\n     * Message for 200 response\n     */\n    200: {\n        readonly '@namespace.string'?: string;\n        readonly '@namespace.integer'?: number;\n        readonly value?: Array<ModelWithString>;\n    };\n    /**\n     * Message for 201 response\n     */\n    201: ModelThatExtends;\n    /**\n     * Message for 202 response\n     */\n    202: ModelThatExtendsExtends;\n};\n\nexport type CallWithResponsesResponse = CallWithResponsesResponses[keyof CallWithResponsesResponses];\n\nexport type CollectionFormatData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * This is an array parameter that is sent as csv format (comma-separated values)\n         */\n        parameterArrayCSV: Array<string> | null;\n        /**\n         * This is an array parameter that is sent as ssv format (space-separated values)\n         */\n        parameterArraySSV: Array<string> | null;\n        /**\n         * This is an array parameter that is sent as tsv format (tab-separated values)\n         */\n        parameterArrayTSV: Array<string> | null;\n        /**\n         * This is an array parameter that is sent as pipes format (pipe-separated values)\n         */\n        parameterArrayPipes: Array<string> | null;\n        /**\n         * This is an array parameter that is sent as multi format (multiple parameter instances)\n         */\n        parameterArrayMulti: Array<string> | null;\n    };\n    url: '/api/v{api-version}/collectionFormat';\n};\n\nexport type TypesData = {\n    body?: never;\n    path?: {\n        /**\n         * This is a number parameter\n         */\n        id?: number;\n    };\n    query: {\n        /**\n         * This is a number parameter\n         */\n        parameterNumber: number;\n        /**\n         * This is a string parameter\n         */\n        parameterString: string | null;\n        /**\n         * This is a boolean parameter\n         */\n        parameterBoolean: boolean | null;\n        /**\n         * This is an object parameter\n         */\n        parameterObject: {\n            [key: string]: unknown;\n        } | null;\n        /**\n         * This is an array parameter\n         */\n        parameterArray: Array<string> | null;\n        /**\n         * This is a dictionary parameter\n         */\n        parameterDictionary: {\n            [key: string]: unknown;\n        } | null;\n        /**\n         * This is an enum parameter\n         */\n        parameterEnum: 'Success' | 'Warning' | 'Error' | null;\n    };\n    url: '/api/v{api-version}/types';\n};\n\nexport type TypesResponses = {\n    /**\n     * Response is a simple number\n     */\n    200: number;\n    /**\n     * Response is a simple string\n     */\n    201: string;\n    /**\n     * Response is a simple boolean\n     */\n    202: boolean;\n    /**\n     * Response is a simple object\n     */\n    203: {\n        [key: string]: unknown;\n    };\n};\n\nexport type TypesResponse = TypesResponses[keyof TypesResponses];\n\nexport type UploadFileData = {\n    body: Blob | File;\n    path: {\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string | null;\n    };\n    query?: never;\n    url: '/api/v{api-version}/upload';\n};\n\nexport type UploadFileResponses = {\n    200: boolean;\n};\n\nexport type UploadFileResponse = UploadFileResponses[keyof UploadFileResponses];\n\nexport type FileResponseData = {\n    body?: never;\n    path: {\n        id: string;\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string;\n    };\n    query?: never;\n    url: '/api/v{api-version}/file/{id}';\n};\n\nexport type FileResponseResponses = {\n    /**\n     * Success\n     */\n    200: Blob | File;\n};\n\nexport type FileResponseResponse = FileResponseResponses[keyof FileResponseResponses];\n\nexport type ComplexTypesData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * Parameter containing object\n         */\n        parameterObject: {\n            first?: {\n                second?: {\n                    third?: string;\n                };\n            };\n        };\n        /**\n         * Parameter containing reference\n         */\n        parameterReference: ModelWithString;\n    };\n    url: '/api/v{api-version}/complex';\n};\n\nexport type ComplexTypesErrors = {\n    /**\n     * 400 `server` error\n     */\n    400: unknown;\n    /**\n     * 500 server error\n     */\n    500: unknown;\n};\n\nexport type ComplexTypesResponses = {\n    /**\n     * Successful response\n     */\n    200: Array<ModelWithString>;\n};\n\nexport type ComplexTypesResponse = ComplexTypesResponses[keyof ComplexTypesResponses];\n\nexport type MultipartResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multipart';\n};\n\nexport type MultipartResponseResponses = {\n    /**\n     * OK\n     */\n    200: {\n        file?: Blob | File;\n        metadata?: {\n            foo?: string;\n            bar?: string;\n        };\n    };\n};\n\nexport type MultipartResponseResponse = MultipartResponseResponses[keyof MultipartResponseResponses];\n\nexport type MultipartRequestData = {\n    body?: {\n        content?: Blob | File;\n        data?: ModelWithString | null;\n    };\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multipart';\n};\n\nexport type ComplexParamsData = {\n    body?: {\n        readonly key: string | null;\n        name: string | null;\n        enabled?: boolean;\n        type: 'Monkey' | 'Horse' | 'Bird';\n        listOfModels?: Array<ModelWithString> | null;\n        listOfStrings?: Array<string> | null;\n        parameters: ModelWithString | ModelWithEnum | ModelWithArray | ModelWithDictionary;\n        readonly user?: {\n            readonly id?: number;\n            readonly name?: string | null;\n        };\n    };\n    path: {\n        id: number;\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string;\n    };\n    query?: never;\n    url: '/api/v{api-version}/complex/{id}';\n};\n\nexport type ComplexParamsResponses = {\n    /**\n     * Success\n     */\n    200: ModelWithString;\n};\n\nexport type ComplexParamsResponse = ComplexParamsResponses[keyof ComplexParamsResponses];\n\nexport type CallWithResultFromHeaderData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/header';\n};\n\nexport type CallWithResultFromHeaderErrors = {\n    /**\n     * 400 server error\n     */\n    400: unknown;\n    /**\n     * 500 server error\n     */\n    500: unknown;\n};\n\nexport type CallWithResultFromHeaderResponses = {\n    /**\n     * Successful response\n     */\n    200: unknown;\n};\n\nexport type TestErrorCodeData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * Status code to return\n         */\n        status: number;\n    };\n    url: '/api/v{api-version}/error';\n};\n\nexport type TestErrorCodeErrors = {\n    /**\n     * Custom message: Internal Server Error\n     */\n    500: unknown;\n    /**\n     * Custom message: Not Implemented\n     */\n    501: unknown;\n    /**\n     * Custom message: Bad Gateway\n     */\n    502: unknown;\n    /**\n     * Custom message: Service Unavailable\n     */\n    503: unknown;\n};\n\nexport type TestErrorCodeResponses = {\n    /**\n     * Custom message: Successful response\n     */\n    200: unknown;\n};\n\nexport type NonAsciiæøåÆøÅöôêÊ字符串Data = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * Dummy input param\n         */\n        nonAsciiParamæøåÆØÅöôêÊ: number;\n    };\n    url: '/api/v{api-version}/non-ascii-æøåÆØÅöôêÊ字符串';\n};\n\nexport type NonAsciiæøåÆøÅöôêÊ字符串Responses = {\n    /**\n     * Successful response\n     */\n    200: Array<NonAsciiStringæøåÆøÅöôêÊ字符串>;\n};\n\nexport type NonAsciiæøåÆøÅöôêÊ字符串Response = NonAsciiæøåÆøÅöôêÊ字符串Responses[keyof NonAsciiæøåÆøÅöôêÊ字符串Responses];\n\nexport type PutWithFormUrlEncodedData = {\n    body: ArrayWithStrings;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/non-ascii-æøåÆØÅöôêÊ字符串';\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-ofetch/default/client/client.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport { ofetch, type ResponseType as OfetchResponseType } from 'ofetch';\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  buildOfetchOptions,\n  buildUrl,\n  createConfig,\n  createInterceptors,\n  isRepeatableBody,\n  mapParseAsToResponseType,\n  mergeConfigs,\n  mergeHeaders,\n  parseError,\n  parseSuccess,\n  setAuthParams,\n  wrapDataReturn,\n  wrapErrorReturn,\n} from './utils.gen';\n\ntype ReqInit = Omit<RequestInit, 'body' | 'headers'> & {\n  body?: BodyInit | null | undefined;\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  // precompute serialized / network body\n  const resolveOptions = async (options: RequestOptions) => {\n    const opts = {\n      ..._config,\n      ...options,\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 if body is empty to avoid invalid requests\n    if (opts.body === undefined || opts.serializedBody === '') {\n      opts.headers.delete('Content-Type');\n    }\n\n    // if a raw body is provided (no serializer), adjust Content-Type only when it\n    // equals the default JSON value to better match the concrete body type\n    if (\n      opts.body !== undefined &&\n      opts.bodySerializer === null &&\n      (opts.headers.get('Content-Type') || '').toLowerCase() === 'application/json'\n    ) {\n      const b: unknown = opts.body;\n      if (typeof FormData !== 'undefined' && b instanceof FormData) {\n        // let the runtime set the multipart boundary\n        opts.headers.delete('Content-Type');\n      } else if (typeof URLSearchParams !== 'undefined' && b instanceof URLSearchParams) {\n        // standard urlencoded content type (+ charset)\n        opts.headers.set('Content-Type', 'application/x-www-form-urlencoded;charset=UTF-8');\n      } else if (typeof Blob !== 'undefined' && b instanceof Blob) {\n        const t = b.type?.trim();\n        if (t) {\n          opts.headers.set('Content-Type', t);\n        } else {\n          // unknown blob type: avoid sending a misleading JSON header\n          opts.headers.delete('Content-Type');\n        }\n      }\n    }\n\n    // precompute network body (stability for retries and interceptors)\n    const networkBody = getValidRequestBody(opts) as RequestInit['body'] | null | undefined;\n\n    const url = buildUrl(opts);\n\n    return { networkBody, opts, url };\n  };\n\n  // apply request interceptors and mirror header/method/signal back to opts\n  const applyRequestInterceptors = async (\n    request: Request,\n    opts: ResolvedRequestOptions,\n    body: BodyInit | null | undefined,\n  ) => {\n    for (const fn of interceptors.request.fns) {\n      if (fn) {\n        request = await fn(request, opts);\n      }\n    }\n    // reflect interceptor changes into opts used by the network layer\n    opts.headers = request.headers;\n    opts.method = request.method as Uppercase<HttpMethod>;\n    // ignore request.body changes to avoid turning serialized bodies into streams\n    // body comes only from getValidRequestBody(options)\n    // reflect signal if present\n    opts.signal = (request as any).signal as AbortSignal | undefined;\n\n    // When body is FormData, remove Content-Type header to avoid boundary mismatch.\n    // Note: We already delete Content-Type in resolveOptions for FormData, but the\n    // Request constructor (line 175) re-adds it with an auto-generated boundary.\n    // Since we pass the original FormData (not the Request's body) to ofetch, and\n    // ofetch will generate its own boundary, we must remove the Request's Content-Type\n    // to let ofetch set the correct one. Otherwise the boundary in the header won't\n    // match the boundary in the actual multipart body sent by ofetch.\n    if (typeof FormData !== 'undefined' && body instanceof FormData) {\n      opts.headers.delete('Content-Type');\n    }\n\n    return request;\n  };\n\n  // build ofetch options with stable retry logic based on body repeatability\n  const buildNetworkOptions = (\n    opts: ResolvedRequestOptions,\n    body: BodyInit | null | undefined,\n    responseType: OfetchResponseType | undefined,\n  ) => {\n    const effectiveRetry = isRepeatableBody(body) ? (opts.retry as any) : (0 as any);\n    return buildOfetchOptions(opts, body, responseType, effectiveRetry);\n  };\n\n  const request: Client['request'] = async (options) => {\n    const { networkBody: initialNetworkBody, opts, url } = await resolveOptions(options as any);\n    // map parseAs -> ofetch responseType once per request\n    const ofetchResponseType: OfetchResponseType | undefined = mapParseAsToResponseType(\n      opts.parseAs,\n      opts.responseType,\n    );\n\n    const $ofetch = opts.ofetch ?? ofetch;\n\n    // create Request before network to run middleware consistently\n    const networkBody = initialNetworkBody;\n    const requestInit: ReqInit = {\n      body: networkBody,\n      headers: opts.headers as Headers,\n      method: opts.method,\n      redirect: 'follow',\n      signal: opts.signal,\n    };\n    let request = new Request(url, requestInit);\n\n    request = await applyRequestInterceptors(request, opts, networkBody);\n    const finalUrl = request.url;\n\n    // build ofetch options and perform the request (.raw keeps the Response)\n    const responseOptions = buildNetworkOptions(\n      opts as ResolvedRequestOptions,\n      networkBody,\n      ofetchResponseType,\n    );\n\n    let response = await $ofetch.raw(finalUrl, responseOptions);\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 = { request, response };\n\n    if (response.ok) {\n      const data = await parseSuccess(response, opts, ofetchResponseType);\n      return wrapDataReturn(data, result, opts.responseStyle);\n    }\n\n    let finalError = await parseError(response);\n\n    for (const fn of interceptors.error.fns) {\n      if (fn) {\n        finalError = await fn(finalError, response, request, opts);\n      }\n    }\n\n    // ensure error is never undefined after interceptors\n    finalError = (finalError as any) || ({} as string);\n\n    if (opts.throwOnError) {\n      throw finalError;\n    }\n\n    return wrapErrorReturn(finalError, result, opts.responseStyle) as any;\n  };\n\n  const makeMethodFn = (method: Uppercase<HttpMethod>) => (options: RequestOptions) =>\n    request({ ...options, method } as any);\n\n  const makeSseFn = (method: Uppercase<HttpMethod>) => async (options: RequestOptions) => {\n    const { networkBody, opts, url } = await resolveOptions(options);\n    const optsForSse: any = { ...opts };\n    delete optsForSse.body; // body is provided via serializedBody below\n    return createSseClient({\n      ...optsForSse,\n      fetch: opts.fetch,\n      headers: opts.headers as Headers,\n      method,\n      onRequest: async (url, init) => {\n        let request = new Request(url, init);\n        request = await applyRequestInterceptors(request, opts, networkBody);\n        return request;\n      },\n      serializedBody: networkBody as BodyInit | null | undefined,\n      signal: opts.signal,\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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-ofetch/default/client/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type { Auth } from '../core/auth.gen';\nexport type { QuerySerializerOptions } from '../core/bodySerializer.gen';\nexport {\n  formDataBodySerializer,\n  jsonBodySerializer,\n  urlSearchParamsBodySerializer,\n} from '../core/bodySerializer.gen';\nexport { buildClientParams } from '../core/params.gen';\nexport { serializeQueryKeyValue } from '../core/queryKeySerializer.gen';\nexport { createClient } from './client.gen';\nexport type {\n  Client,\n  ClientOptions,\n  Config,\n  CreateClientConfig,\n  Options,\n  RequestOptions,\n  RequestResult,\n  ResolvedRequestOptions,\n  ResponseStyle,\n  TDataShape,\n} from './types.gen';\nexport { createConfig, mergeHeaders } from './utils.gen';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-ofetch/default/client/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { FetchOptions as OfetchOptions, ResponseType as OfetchResponseType } from 'ofetch';\nimport type { ofetch } from 'ofetch';\n\nimport type { Auth } from '../core/auth.gen';\nimport type {\n  ServerSentEventsOptions,\n  ServerSentEventsResult,\n} from '../core/serverSentEvents.gen';\nimport type { Client as CoreClient, Config as CoreConfig } from '../core/types.gen';\nimport type { Middleware } from './utils.gen';\n\nexport type ResponseStyle = 'data' | 'fields';\n\nexport interface Config<T extends ClientOptions = ClientOptions>\n  extends Omit<RequestInit, 'body' | 'headers' | 'method'>, CoreConfig {\n  /**\n   * HTTP(S) agent configuration (Node.js only). Passed through to ofetch.\n   */\n  agent?: OfetchOptions['agent'];\n  /**\n   * Base URL for all requests made by this client.\n   */\n  baseUrl?: T['baseUrl'];\n  /**\n   * Node-only proxy/agent options.\n   */\n  dispatcher?: OfetchOptions['dispatcher'];\n  /**\n   * Fetch API implementation. Used for SSE streaming. You can use this option\n   * to provide a custom fetch instance.\n   *\n   * @default globalThis.fetch\n   */\n  fetch?: typeof fetch;\n  /**\n   * Controls the native ofetch behaviour that throws `FetchError` when\n   * `response.ok === false`. We default to suppressing it to match the fetch\n   * client semantics and let `throwOnError` drive the outcome.\n   */\n  ignoreResponseError?: OfetchOptions['ignoreResponseError'];\n  // No custom fetch option: provide custom instance via `ofetch` instead\n  /**\n   * Please don't use the Fetch client for Next.js applications. The `next`\n   * options won't have any effect.\n   *\n   * Install {@link https://www.npmjs.com/package/@hey-api/client-next `@hey-api/client-next`} instead.\n   */\n  next?: never;\n  /**\n   * Custom ofetch instance created via `ofetch.create()`. If provided, it will\n   * be used for requests instead of the default `ofetch` export.\n   */\n  ofetch?: typeof ofetch;\n  /**\n   * ofetch hook called before a request is sent.\n   */\n  onRequest?: OfetchOptions['onRequest'];\n  /**\n   * ofetch hook called when a request fails before receiving a response\n   * (e.g., network errors or aborted requests).\n   */\n  onRequestError?: OfetchOptions['onRequestError'];\n  /**\n   * ofetch hook called after a successful response is received and parsed.\n   */\n  onResponse?: OfetchOptions['onResponse'];\n  /**\n   * ofetch hook called when the response indicates an error (non-ok status)\n   * or when response parsing fails.\n   */\n  onResponseError?: OfetchOptions['onResponseError'];\n  /**\n   * Return the response data parsed in a specified format. By default, `auto`\n   * will infer the appropriate method from the `Content-Type` response header.\n   * You can override this behavior with any of the {@link Body} methods.\n   * Select `stream` if you don't want to parse response data at all.\n   *\n   * @default 'auto'\n   */\n  parseAs?: 'arrayBuffer' | 'auto' | 'blob' | 'formData' | 'json' | 'stream' | 'text';\n  /** Custom response parser (ofetch). */\n  parseResponse?: OfetchOptions['parseResponse'];\n  /**\n   * Should we return only data or multiple fields (data, error, response, etc.)?\n   *\n   * @default 'fields'\n   */\n  responseStyle?: ResponseStyle;\n  /**\n   * ofetch responseType override. If provided, it will be passed directly to\n   * ofetch and take precedence over `parseAs`.\n   */\n  responseType?: OfetchResponseType;\n  /**\n   * Automatically retry failed requests.\n   */\n  retry?: OfetchOptions['retry'];\n  /**\n   * Delay (in ms) between retry attempts.\n   */\n  retryDelay?: OfetchOptions['retryDelay'];\n  /**\n   * HTTP status codes that should trigger a retry.\n   */\n  retryStatusCodes?: OfetchOptions['retryStatusCodes'];\n  /**\n   * Throw an error instead of returning it in the response?\n   *\n   * @default false\n   */\n  throwOnError?: T['throwOnError'];\n  /**\n   * Abort the request after the given milliseconds.\n   */\n  timeout?: number;\n}\n\nexport interface RequestOptions<\n  TData = unknown,\n  TResponseStyle extends ResponseStyle = 'fields',\n  ThrowOnError extends boolean = boolean,\n  Url extends string = string,\n>\n  extends\n    Config<{\n      responseStyle: TResponseStyle;\n      throwOnError: ThrowOnError;\n    }>,\n    Pick<\n      ServerSentEventsOptions<TData>,\n      | 'onSseError'\n      | 'onSseEvent'\n      | 'sseDefaultRetryDelay'\n      | 'sseMaxRetryAttempts'\n      | 'sseMaxRetryDelay'\n    > {\n  /**\n   * Any body that you want to add to your request.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/fetch#body}\n   */\n  body?: unknown;\n  path?: Record<string, unknown>;\n  query?: Record<string, unknown>;\n  /**\n   * Security mechanism(s) to use for the request.\n   */\n  security?: ReadonlyArray<Auth>;\n  url: Url;\n}\n\nexport interface ResolvedRequestOptions<\n  TResponseStyle extends ResponseStyle = 'fields',\n  ThrowOnError extends boolean = boolean,\n  Url extends string = string,\n> extends RequestOptions<unknown, TResponseStyle, ThrowOnError, Url> {\n  serializedBody?: string;\n}\n\nexport type RequestResult<\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = boolean,\n  TResponseStyle extends ResponseStyle = 'fields',\n> = ThrowOnError extends true\n  ? Promise<\n      TResponseStyle extends 'data'\n        ? TData extends Record<string, unknown>\n          ? TData[keyof TData]\n          : TData\n        : {\n            data: TData extends Record<string, unknown> ? TData[keyof TData] : TData;\n            request: Request;\n            response: Response;\n          }\n    >\n  : Promise<\n      TResponseStyle extends 'data'\n        ? (TData extends Record<string, unknown> ? TData[keyof TData] : TData) | undefined\n        : (\n            | {\n                data: TData extends Record<string, unknown> ? TData[keyof TData] : TData;\n                error: undefined;\n              }\n            | {\n                data: undefined;\n                error: TError extends Record<string, unknown> ? TError[keyof TError] : TError;\n              }\n          ) & {\n            request: Request;\n            response: Response;\n          }\n    >;\n\nexport interface ClientOptions {\n  baseUrl?: string;\n  responseStyle?: ResponseStyle;\n  throwOnError?: boolean;\n}\n\ntype MethodFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'>,\n) => RequestResult<TData, TError, ThrowOnError, TResponseStyle>;\n\ntype SseFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'>,\n) => Promise<ServerSentEventsResult<TData, TError>>;\n\ntype RequestFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'> &\n    Pick<Required<RequestOptions<TData, TResponseStyle, ThrowOnError>>, 'method'>,\n) => RequestResult<TData, TError, ThrowOnError, TResponseStyle>;\n\ntype BuildUrlFn = <\n  TData extends {\n    body?: unknown;\n    path?: Record<string, unknown>;\n    query?: Record<string, unknown>;\n    url: string;\n  },\n>(\n  options: TData & Options<TData>,\n) => string;\n\nexport type Client = CoreClient<RequestFn, Config, MethodFn, BuildUrlFn, SseFn> & {\n  interceptors: Middleware<Request, Response, unknown, ResolvedRequestOptions>;\n};\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 = ClientOptions> = (\n  override?: Config<ClientOptions & T>,\n) => Config<Required<ClientOptions> & T>;\n\nexport interface TDataShape {\n  body?: unknown;\n  headers?: unknown;\n  path?: unknown;\n  query?: unknown;\n  url: string;\n}\n\ntype OmitKeys<T, K> = Pick<T, Exclude<keyof T, K>>;\n\nexport type Options<\n  TData extends TDataShape = TDataShape,\n  ThrowOnError extends boolean = boolean,\n  TResponse = unknown,\n  TResponseStyle extends ResponseStyle = 'fields',\n> = OmitKeys<\n  RequestOptions<TResponse, TResponseStyle, ThrowOnError>,\n  'body' | 'path' | 'query' | 'url'\n> &\n  ([TData] extends [never] ? unknown : Omit<TData, 'url'>);\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-ofetch/default/client/utils.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { FetchOptions as OfetchOptions, ResponseType as OfetchResponseType } from 'ofetch';\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 {\n  Client,\n  ClientOptions,\n  Config,\n  RequestOptions,\n  ResolvedRequestOptions,\n  ResponseStyle,\n} 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\n/**\n * Map our parseAs value to ofetch responseType when not explicitly provided.\n */\nexport const mapParseAsToResponseType = (\n  parseAs: Config['parseAs'] | undefined,\n  explicit?: OfetchResponseType,\n): OfetchResponseType | undefined => {\n  if (explicit) return explicit;\n  switch (parseAs) {\n    case 'arrayBuffer':\n    case 'blob':\n    case 'json':\n    case 'text':\n    case 'stream':\n      return parseAs;\n    case 'formData':\n    case 'auto':\n    default:\n      return undefined; // let ofetch auto-detect\n  }\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\n/**\n * Heuristic to detect whether a request body can be safely retried.\n */\nexport const isRepeatableBody = (body: unknown): boolean => {\n  if (body == null) return true; // undefined/null treated as no-body\n  if (typeof body === 'string') return true;\n  if (typeof URLSearchParams !== 'undefined' && body instanceof URLSearchParams) return true;\n  if (typeof Uint8Array !== 'undefined' && body instanceof Uint8Array) return true;\n  if (typeof ArrayBuffer !== 'undefined' && body instanceof ArrayBuffer) return true;\n  if (typeof Blob !== 'undefined' && body instanceof Blob) return true;\n  if (typeof FormData !== 'undefined' && body instanceof FormData) return true;\n  // Streams are not repeatable\n  if (typeof ReadableStream !== 'undefined' && body instanceof ReadableStream) return false;\n  // Default: assume non-repeatable for unknown structured bodies\n  return false;\n};\n\n/**\n * Small helper to unify data vs fields return style.\n */\nexport const wrapDataReturn = <T>(\n  data: T,\n  result: { request: Request; response: Response },\n  responseStyle: ResponseStyle | undefined,\n): T | ((T extends Record<string, unknown> ? { data: T } : { data: T }) & typeof result) =>\n  (responseStyle ?? 'fields') === 'data' ? (data as any) : ({ data, ...result } as any);\n\n/**\n * Small helper to unify error vs fields return style.\n */\nexport const wrapErrorReturn = <E>(\n  error: E,\n  result: { request: Request; response: Response },\n  responseStyle: ResponseStyle | undefined,\n):\n  | undefined\n  | ((E extends Record<string, unknown> ? { error: E } : { error: E }) & typeof result) =>\n  (responseStyle ?? 'fields') === 'data' ? undefined : ({ error, ...result } as any);\n\n/**\n * Build options for $ofetch.raw from our resolved opts and body.\n */\nexport const buildOfetchOptions = (\n  opts: ResolvedRequestOptions,\n  body: BodyInit | null | undefined,\n  responseType: OfetchResponseType | undefined,\n  retryOverride?: OfetchOptions['retry'],\n): OfetchOptions =>\n  ({\n    agent: opts.agent as OfetchOptions['agent'],\n    body,\n    credentials: opts.credentials as OfetchOptions['credentials'],\n    dispatcher: opts.dispatcher as OfetchOptions['dispatcher'],\n    headers: opts.headers as Headers,\n    ignoreResponseError: (opts.ignoreResponseError as OfetchOptions['ignoreResponseError']) ?? true,\n    method: opts.method,\n    onRequest: opts.onRequest as OfetchOptions['onRequest'],\n    onRequestError: opts.onRequestError as OfetchOptions['onRequestError'],\n    onResponse: opts.onResponse as OfetchOptions['onResponse'],\n    onResponseError: opts.onResponseError as OfetchOptions['onResponseError'],\n    parseResponse: opts.parseResponse as OfetchOptions['parseResponse'],\n    // URL already includes query\n    query: undefined,\n    responseType,\n    retry: retryOverride ?? (opts.retry as OfetchOptions['retry']),\n    retryDelay: opts.retryDelay as OfetchOptions['retryDelay'],\n    retryStatusCodes: opts.retryStatusCodes as OfetchOptions['retryStatusCodes'],\n    signal: opts.signal,\n    timeout: opts.timeout as number | undefined,\n  }) as OfetchOptions;\n\n/**\n * Parse a successful response, handling empty bodies and stream cases.\n */\nexport const parseSuccess = async (\n  response: Response,\n  opts: ResolvedRequestOptions,\n  ofetchResponseType?: OfetchResponseType,\n): Promise<unknown> => {\n  // Stream requested: return stream body\n  if (ofetchResponseType === 'stream') {\n    return response.body;\n  }\n\n  const inferredParseAs =\n    (opts.parseAs === 'auto' ? getParseAs(response.headers.get('Content-Type')) : opts.parseAs) ??\n    'json';\n\n  // Handle empty responses\n  if (response.status === 204 || response.headers.get('Content-Length') === '0') {\n    switch (inferredParseAs) {\n      case 'arrayBuffer':\n      case 'blob':\n      case 'text':\n        return await (response as any)[inferredParseAs]();\n      case 'formData':\n        return new FormData();\n      case 'stream':\n        return response.body;\n      default:\n        return {};\n    }\n  }\n\n  // Prefer ofetch-populated data unless we explicitly need raw `formData`\n  let data: unknown = (response as any)._data;\n  if (inferredParseAs === 'formData' || typeof data === 'undefined') {\n    switch (inferredParseAs) {\n      case 'arrayBuffer':\n      case 'blob':\n      case 'formData':\n      case 'text':\n        data = await (response as any)[inferredParseAs]();\n        break;\n      case 'json': {\n        // Some servers return 200 with no Content-Length and empty body.\n        // response.json() would throw; detect empty via clone().text() first.\n        const txt = await response.clone().text();\n        if (!txt) {\n          data = {};\n        } else {\n          data = await (response as any).json();\n        }\n        break;\n      }\n      case 'stream':\n        return response.body;\n    }\n  }\n\n  if (inferredParseAs === 'json') {\n    if (opts.responseValidator) {\n      await opts.responseValidator(data);\n    }\n    if (opts.responseTransformer) {\n      data = await opts.responseTransformer(data);\n    }\n  }\n\n  return data;\n};\n\n/**\n * Parse an error response payload.\n */\nexport const parseError = async (response: Response): Promise<unknown> => {\n  let error: unknown = (response as any)._data;\n  if (typeof error === 'undefined') {\n    const textError = await response.text();\n    try {\n      error = JSON.parse(textError);\n    } catch {\n      error = textError;\n    }\n  }\n  return error ?? ({} as string);\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  ignoreResponseError: true,\n  parseAs: 'auto',\n  querySerializer: defaultQuerySerializer,\n  ...override,\n});\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-ofetch/default/client.gen.ts",
    "content": "// 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: 'http://localhost:3000/base' }));\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-ofetch/default/core/auth.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-ofetch/default/core/bodySerializer.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-ofetch/default/core/params.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-ofetch/default/core/pathSerializer.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-ofetch/default/core/queryKeySerializer.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\n/**\n * JSON-friendly union that mirrors what Pinia Colada can hash.\n */\nexport type JsonValue =\n  | null\n  | string\n  | number\n  | boolean\n  | JsonValue[]\n  | { [key: string]: JsonValue };\n\n/**\n * Replacer that converts non-JSON values (bigint, Date, etc.) to safe substitutes.\n */\nexport const queryKeyJsonReplacer = (_key: string, value: unknown) => {\n  if (value === undefined || typeof value === 'function' || typeof value === 'symbol') {\n    return undefined;\n  }\n  if (typeof value === 'bigint') {\n    return value.toString();\n  }\n  if (value instanceof Date) {\n    return value.toISOString();\n  }\n  return value;\n};\n\n/**\n * Safely stringifies a value and parses it back into a JsonValue.\n */\nexport const stringifyToJsonValue = (input: unknown): JsonValue | undefined => {\n  try {\n    const json = JSON.stringify(input, queryKeyJsonReplacer);\n    if (json === undefined) {\n      return undefined;\n    }\n    return JSON.parse(json) as JsonValue;\n  } catch {\n    return undefined;\n  }\n};\n\n/**\n * Detects plain objects (including objects with a null prototype).\n */\nconst isPlainObject = (value: unknown): value is Record<string, unknown> => {\n  if (value === null || typeof value !== 'object') {\n    return false;\n  }\n  const prototype = Object.getPrototypeOf(value as object);\n  return prototype === Object.prototype || prototype === null;\n};\n\n/**\n * Turns URLSearchParams into a sorted JSON object for deterministic keys.\n */\nconst serializeSearchParams = (params: URLSearchParams): JsonValue => {\n  const entries = Array.from(params.entries()).sort(([a], [b]) => a.localeCompare(b));\n  const result: Record<string, JsonValue> = {};\n\n  for (const [key, value] of entries) {\n    const existing = result[key];\n    if (existing === undefined) {\n      result[key] = value;\n      continue;\n    }\n\n    if (Array.isArray(existing)) {\n      (existing as string[]).push(value);\n    } else {\n      result[key] = [existing, value];\n    }\n  }\n\n  return result;\n};\n\n/**\n * Normalizes any accepted value into a JSON-friendly shape for query keys.\n */\nexport const serializeQueryKeyValue = (value: unknown): JsonValue | undefined => {\n  if (value === null) {\n    return null;\n  }\n\n  if (typeof value === 'string' || typeof value === 'number' || typeof value === 'boolean') {\n    return value;\n  }\n\n  if (value === undefined || typeof value === 'function' || typeof value === 'symbol') {\n    return undefined;\n  }\n\n  if (typeof value === 'bigint') {\n    return value.toString();\n  }\n\n  if (value instanceof Date) {\n    return value.toISOString();\n  }\n\n  if (Array.isArray(value)) {\n    return stringifyToJsonValue(value);\n  }\n\n  if (typeof URLSearchParams !== 'undefined' && value instanceof URLSearchParams) {\n    return serializeSearchParams(value);\n  }\n\n  if (isPlainObject(value)) {\n    return stringifyToJsonValue(value);\n  }\n\n  return undefined;\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-ofetch/default/core/serverSentEvents.gen.ts",
    "content": "// 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 const 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            // Normalize line endings: CRLF -> LF, then CR -> LF\n            buffer = buffer.replace(/\\r\\n/g, '\\n').replace(/\\r/g, '\\n');\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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-ofetch/default/core/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { Auth, AuthToken } from './auth.gen';\nimport type { BodySerializer, QuerySerializer, QuerySerializerOptions } from './bodySerializer.gen';\n\nexport type HttpMethod =\n  | 'connect'\n  | 'delete'\n  | 'get'\n  | 'head'\n  | 'options'\n  | 'patch'\n  | 'post'\n  | 'put'\n  | 'trace';\n\nexport type Client<\n  RequestFn = never,\n  Config = unknown,\n  MethodFn = never,\n  BuildUrlFn = never,\n  SseFn = never,\n> = {\n  /**\n   * Returns the final request URL.\n   */\n  buildUrl: BuildUrlFn;\n  getConfig: () => Config;\n  request: RequestFn;\n  setConfig: (config: Config) => Config;\n} & {\n  [K in HttpMethod]: MethodFn;\n} & ([SseFn] extends [never] ? { sse?: never } : { sse: { [K in HttpMethod]: SseFn } });\n\nexport interface Config {\n  /**\n   * Auth token or a function returning auth token. The resolved value will be\n   * added to the request payload as defined by its `security` array.\n   */\n  auth?: ((auth: Auth) => Promise<AuthToken> | AuthToken) | AuthToken;\n  /**\n   * A function for serializing request body parameter. By default,\n   * {@link JSON.stringify()} will be used.\n   */\n  bodySerializer?: BodySerializer | null;\n  /**\n   * An object containing any HTTP headers that you want to pre-populate your\n   * `Headers` object with.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/Headers/Headers#init See more}\n   */\n  headers?:\n    | RequestInit['headers']\n    | Record<\n        string,\n        string | number | boolean | (string | number | boolean)[] | null | undefined | unknown\n      >;\n  /**\n   * The request method.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/fetch#method See more}\n   */\n  method?: Uppercase<HttpMethod>;\n  /**\n   * A function for serializing request query parameters. By default, arrays\n   * will be exploded in form style, objects will be exploded in deepObject\n   * style, and reserved characters are percent-encoded.\n   *\n   * This method will have no effect if the native `paramsSerializer()` Axios\n   * API function is used.\n   *\n   * {@link https://swagger.io/docs/specification/serialization/#query View examples}\n   */\n  querySerializer?: QuerySerializer | QuerySerializerOptions;\n  /**\n   * A function validating request data. This is useful if you want to ensure\n   * the request conforms to the desired shape, so it can be safely sent to\n   * the server.\n   */\n  requestValidator?: (data: unknown) => Promise<unknown>;\n  /**\n   * A function transforming response data before it's returned. This is useful\n   * for post-processing data, e.g. converting ISO strings into Date objects.\n   */\n  responseTransformer?: (data: unknown) => Promise<unknown>;\n  /**\n   * A function validating response data. This is useful if you want to ensure\n   * the response conforms to the desired shape, so it can be safely passed to\n   * the transformers and returned to the user.\n   */\n  responseValidator?: (data: unknown) => Promise<unknown>;\n}\n\ntype IsExactlyNeverOrNeverUndefined<T> = [T] extends [never]\n  ? true\n  : [T] extends [never | undefined]\n    ? [undefined] extends [T]\n      ? false\n      : true\n    : false;\n\nexport type OmitNever<T extends Record<string, unknown>> = {\n  [K in keyof T as IsExactlyNeverOrNeverUndefined<T[K]> extends true ? never : K]: T[K];\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-ofetch/default/core/utils.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-ofetch/default/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport { apiVVersionODataControllerCount, callToTestOrderOfParams, callWithDefaultOptionalParameters, callWithDefaultParameters, callWithDescriptions, callWithDuplicateResponses, callWithNoContentResponse, callWithParameters, callWithResponse, callWithResponseAndNoContentResponse, callWithResponses, callWithResultFromHeader, callWithWeirdParameterNames, collectionFormat, complexParams, complexTypes, deleteCallWithoutParametersAndResponse, deleteFoo, deprecatedCall, dummyA, dummyB, duplicateName, duplicateName2, duplicateName3, duplicateName4, export_, fileResponse, fooWow, getApiVbyApiVersionSimpleOperation, getCallWithOptionalParam, getCallWithoutParametersAndResponse, headCallWithoutParametersAndResponse, import_, multipartRequest, multipartResponse, nonAsciiæøåÆøÅöôêÊ字符串, type Options, optionsCallWithoutParametersAndResponse, patchApiVbyApiVersionNoTag, patchCallWithoutParametersAndResponse, postApiVbyApiVersionFormData, postApiVbyApiVersionRequestBody, postCallWithOptionalParam, postCallWithoutParametersAndResponse, putCallWithoutParametersAndResponse, putWithFormUrlEncoded, testErrorCode, types, uploadFile } from './sdk.gen';\nexport type { _3eNum1Период, _400, AdditionalPropertiesIntegerIssue, AdditionalPropertiesUnknownIssue, AdditionalPropertiesUnknownIssue2, AdditionalPropertiesUnknownIssue3, AdditionalPropertiesUnknownIssueWritable, AnyOfAnyAndNull, AnyOfArrays, ApiVVersionODataControllerCountData, ApiVVersionODataControllerCountResponse, ApiVVersionODataControllerCountResponses, ArrayWithAnyOfProperties, ArrayWithArray, ArrayWithBooleans, ArrayWithNumbers, ArrayWithProperties, ArrayWithReferences, ArrayWithStrings, CallToTestOrderOfParamsData, CallWithDefaultOptionalParametersData, CallWithDefaultParametersData, CallWithDescriptionsData, CallWithDuplicateResponsesData, CallWithDuplicateResponsesError, CallWithDuplicateResponsesErrors, CallWithDuplicateResponsesResponse, CallWithDuplicateResponsesResponses, CallWithNoContentResponseData, CallWithNoContentResponseResponse, CallWithNoContentResponseResponses, CallWithParametersData, CallWithResponseAndNoContentResponseData, CallWithResponseAndNoContentResponseResponse, CallWithResponseAndNoContentResponseResponses, CallWithResponseData, CallWithResponseResponse, CallWithResponseResponses, CallWithResponsesData, CallWithResponsesError, CallWithResponsesErrors, CallWithResponsesResponse, CallWithResponsesResponses, CallWithResultFromHeaderData, CallWithResultFromHeaderErrors, CallWithResultFromHeaderResponses, CallWithWeirdParameterNamesData, CamelCaseCommentWithBreaks, CharactersInDescription, ClientOptions, CollectionFormatData, CommentWithBackticks, CommentWithBackticksAndQuotes, CommentWithBreaks, CommentWithExpressionPlaceholders, CommentWithQuotes, CommentWithReservedCharacters, CommentWithSlashes, ComplexParamsData, ComplexParamsResponse, ComplexParamsResponses, ComplexTypesData, ComplexTypesErrors, ComplexTypesResponse, ComplexTypesResponses, CompositionBaseModel, CompositionExtendedModel, CompositionWithAllOfAndNullable, CompositionWithAnyOf, CompositionWithAnyOfAndNullable, CompositionWithAnyOfAnonymous, CompositionWithNestedAnyAndTypeNull, CompositionWithNestedAnyOfAndNull, CompositionWithOneOf, CompositionWithOneOfAndComplexArrayDictionary, CompositionWithOneOfAndNullable, CompositionWithOneOfAndProperties, CompositionWithOneOfAndSimpleArrayDictionary, CompositionWithOneOfAndSimpleDictionary, CompositionWithOneOfAnonymous, CompositionWithOneOfDiscriminator, ConstValue, Default, DeleteCallWithoutParametersAndResponseData, DeleteFooData, DeleteFooData2, DeleteFooData3, DeprecatedCallData, DeprecatedModel, DictionaryWithArray, DictionaryWithDictionary, DictionaryWithProperties, DictionaryWithPropertiesAndAdditionalProperties, DictionaryWithReference, DictionaryWithString, DummyAData, DummyAResponse, DummyAResponses, DummyBData, DummyBResponse, DummyBResponses, DuplicateName2Data, DuplicateName3Data, DuplicateName4Data, DuplicateNameData, EnumFromDescription, EnumWithExtensions, EnumWithNumbers, EnumWithReplacedCharacters, EnumWithStrings, EnumWithXEnumNames, ExportData, ExternalRefA, ExternalRefB, ExternalSharedModel, File, FileResponseData, FileResponseResponse, FileResponseResponses, FileWritable, FooWowData, FooWowResponses, FreeFormObjectWithAdditionalPropertiesEqEmptyObject, FreeFormObjectWithAdditionalPropertiesEqTrue, FreeFormObjectWithoutAdditionalProperties, GenericSchemaDuplicateIssue1SystemBoolean, GenericSchemaDuplicateIssue1SystemBooleanWritable, GenericSchemaDuplicateIssue1SystemString, GenericSchemaDuplicateIssue1SystemStringWritable, GetApiVbyApiVersionSimpleOperationData, GetApiVbyApiVersionSimpleOperationError, GetApiVbyApiVersionSimpleOperationErrors, GetApiVbyApiVersionSimpleOperationResponse, GetApiVbyApiVersionSimpleOperationResponses, GetCallWithOptionalParamData, GetCallWithoutParametersAndResponseData, HeadCallWithoutParametersAndResponseData, Import, ImportData, ImportResponse, ImportResponses, IoK8sApimachineryPkgApisMetaV1DeleteOptions, IoK8sApimachineryPkgApisMetaV1Preconditions, ModelCircle, ModelFromZendesk, ModelSquare, ModelThatExtends, ModelThatExtendsExtends, ModelWithAdditionalPropertiesEqTrue, ModelWithAdditionalPropertiesRef, ModelWithAnyOfConstantSizeArray, ModelWithAnyOfConstantSizeArrayAndIntersect, ModelWithAnyOfConstantSizeArrayNullable, ModelWithAnyOfConstantSizeArrayWithNSizeAndOptions, ModelWithAnyOfConstantSizeArrayWithNSizeAndOptionsWritable, ModelWithArray, ModelWithArrayReadOnlyAndWriteOnly, ModelWithArrayReadOnlyAndWriteOnlyWritable, ModelWithBackticksInDescription, ModelWithBoolean, ModelWithCircularReference, ModelWithConst, ModelWithConstantSizeArray, ModelWithDictionary, ModelWithDuplicateImports, ModelWithDuplicateProperties, ModelWithEnum, ModelWithEnumFromDescription, ModelWithEnumWithHyphen, ModelWithInteger, ModelWithNestedArrayEnums, ModelWithNestedArrayEnumsData, ModelWithNestedArrayEnumsDataBar, ModelWithNestedArrayEnumsDataFoo, ModelWithNestedCompositionEnums, ModelWithNestedEnums, ModelWithNestedProperties, ModelWithNullableObject, ModelWithNullableString, ModelWithNumericEnumUnion, ModelWithOneOfAndProperties, ModelWithOneOfEnum, ModelWithOrderedProperties, ModelWithPattern, ModelWithPatternWritable, ModelWithPrefixItemsConstantSizeArray, ModelWithProperties, ModelWithPropertiesWritable, ModelWithReadOnlyAndWriteOnly, ModelWithReadOnlyAndWriteOnlyWritable, ModelWithReference, ModelWithReferenceWritable, ModelWithString, ModelWithStringError, MultipartRequestData, MultipartResponseData, MultipartResponseResponse, MultipartResponseResponses, NestedAnyOfArraysNullable, NonAsciiæøåÆøÅöôêÊ字符串Data, NonAsciiæøåÆøÅöôêÊ字符串Response, NonAsciiæøåÆøÅöôêÊ字符串Responses, NonAsciiStringæøåÆøÅöôêÊ字符串, NullableObject, OneOfAllOfIssue, OneOfAllOfIssueWritable, OptionsCallWithoutParametersAndResponseData, Pageable, ParameterSimpleParameterUnused, PatchApiVbyApiVersionNoTagData, PatchApiVbyApiVersionNoTagResponses, PatchCallWithoutParametersAndResponseData, PostApiVbyApiVersionFormDataData, PostApiVbyApiVersionRequestBodyData, PostCallWithOptionalParamData, PostCallWithOptionalParamResponse, PostCallWithOptionalParamResponses, PostCallWithoutParametersAndResponseData, PostServiceWithEmptyTagResponse, PostServiceWithEmptyTagResponse2, PutCallWithoutParametersAndResponseData, PutWithFormUrlEncodedData, SchemaWithFormRestrictedKeys, SimpleBoolean, SimpleFile, SimpleFormData, SimpleInteger, SimpleParameter, SimpleReference, SimpleRequestBody, SimpleString, SimpleStringWithPattern, TestErrorCodeData, TestErrorCodeErrors, TestErrorCodeResponses, TypesData, TypesResponse, TypesResponses, UploadFileData, UploadFileResponse, UploadFileResponses, XFooBar } from './types.gen';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-ofetch/default/sdk.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport { type Client, formDataBodySerializer, type Options as Options2, type TDataShape, urlSearchParamsBodySerializer } from './client';\nimport { client } from './client.gen';\nimport type { ApiVVersionODataControllerCountData, ApiVVersionODataControllerCountResponses, CallToTestOrderOfParamsData, CallWithDefaultOptionalParametersData, CallWithDefaultParametersData, CallWithDescriptionsData, CallWithDuplicateResponsesData, CallWithDuplicateResponsesErrors, CallWithDuplicateResponsesResponses, CallWithNoContentResponseData, CallWithNoContentResponseResponses, CallWithParametersData, CallWithResponseAndNoContentResponseData, CallWithResponseAndNoContentResponseResponses, CallWithResponseData, CallWithResponseResponses, CallWithResponsesData, CallWithResponsesErrors, CallWithResponsesResponses, CallWithResultFromHeaderData, CallWithResultFromHeaderErrors, CallWithResultFromHeaderResponses, CallWithWeirdParameterNamesData, CollectionFormatData, ComplexParamsData, ComplexParamsResponses, ComplexTypesData, ComplexTypesErrors, ComplexTypesResponses, DeleteCallWithoutParametersAndResponseData, DeleteFooData3, DeprecatedCallData, DummyAData, DummyAResponses, DummyBData, DummyBResponses, DuplicateName2Data, DuplicateName3Data, DuplicateName4Data, DuplicateNameData, ExportData, FileResponseData, FileResponseResponses, FooWowData, FooWowResponses, GetApiVbyApiVersionSimpleOperationData, GetApiVbyApiVersionSimpleOperationErrors, GetApiVbyApiVersionSimpleOperationResponses, GetCallWithOptionalParamData, GetCallWithoutParametersAndResponseData, HeadCallWithoutParametersAndResponseData, ImportData, ImportResponses, MultipartRequestData, MultipartResponseData, MultipartResponseResponses, NonAsciiæøåÆøÅöôêÊ字符串Data, NonAsciiæøåÆøÅöôêÊ字符串Responses, OptionsCallWithoutParametersAndResponseData, PatchApiVbyApiVersionNoTagData, PatchApiVbyApiVersionNoTagResponses, PatchCallWithoutParametersAndResponseData, PostApiVbyApiVersionFormDataData, PostApiVbyApiVersionRequestBodyData, PostCallWithOptionalParamData, PostCallWithOptionalParamResponses, PostCallWithoutParametersAndResponseData, PutCallWithoutParametersAndResponseData, PutWithFormUrlEncodedData, TestErrorCodeData, TestErrorCodeErrors, TestErrorCodeResponses, TypesData, TypesResponses, UploadFileData, UploadFileResponses } from './types.gen';\n\nexport type Options<TData extends TDataShape = TDataShape, ThrowOnError extends boolean = boolean> = Options2<TData, ThrowOnError> & {\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\nexport const export_ = <ThrowOnError extends boolean = false>(options?: Options<ExportData, ThrowOnError>) => (options?.client ?? client).get<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/no+tag', ...options });\n\nexport const patchApiVbyApiVersionNoTag = <ThrowOnError extends boolean = false>(options?: Options<PatchApiVbyApiVersionNoTagData, ThrowOnError>) => (options?.client ?? client).patch<PatchApiVbyApiVersionNoTagResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/no+tag', ...options });\n\nexport const import_ = <ThrowOnError extends boolean = false>(options: Options<ImportData, ThrowOnError>) => (options.client ?? client).post<ImportResponses, unknown, ThrowOnError>({\n    url: '/api/v{api-version}/no+tag',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options.headers\n    }\n});\n\nexport const fooWow = <ThrowOnError extends boolean = false>(options?: Options<FooWowData, ThrowOnError>) => (options?.client ?? client).put<FooWowResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/no+tag', ...options });\n\nexport const apiVVersionODataControllerCount = <ThrowOnError extends boolean = false>(options?: Options<ApiVVersionODataControllerCountData, ThrowOnError>) => (options?.client ?? client).get<ApiVVersionODataControllerCountResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple/$count', ...options });\n\nexport const getApiVbyApiVersionSimpleOperation = <ThrowOnError extends boolean = false>(options: Options<GetApiVbyApiVersionSimpleOperationData, ThrowOnError>) => (options.client ?? client).get<GetApiVbyApiVersionSimpleOperationResponses, GetApiVbyApiVersionSimpleOperationErrors, ThrowOnError>({ url: '/api/v{api-version}/simple:operation', ...options });\n\nexport const deleteCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<DeleteCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).delete<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const getCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<GetCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).get<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const headCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<HeadCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).head<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const optionsCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<OptionsCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).options<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const patchCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<PatchCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).patch<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const postCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<PostCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).post<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const putCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<PutCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).put<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const deleteFoo = <ThrowOnError extends boolean = false>(options: Options<DeleteFooData3, ThrowOnError>) => (options.client ?? client).delete<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/foo/{foo_param}/bar/{BarParam}', ...options });\n\nexport const callWithDescriptions = <ThrowOnError extends boolean = false>(options?: Options<CallWithDescriptionsData, ThrowOnError>) => (options?.client ?? client).post<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/descriptions', ...options });\n\n/**\n * @deprecated\n */\nexport const deprecatedCall = <ThrowOnError extends boolean = false>(options: Options<DeprecatedCallData, ThrowOnError>) => (options.client ?? client).post<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/parameters/deprecated', ...options });\n\nexport const callWithParameters = <ThrowOnError extends boolean = false>(options: Options<CallWithParametersData, ThrowOnError>) => (options.client ?? client).post<unknown, unknown, ThrowOnError>({\n    url: '/api/v{api-version}/parameters/{parameterPath}',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options.headers\n    }\n});\n\nexport const callWithWeirdParameterNames = <ThrowOnError extends boolean = false>(options: Options<CallWithWeirdParameterNamesData, ThrowOnError>) => (options.client ?? client).post<unknown, unknown, ThrowOnError>({\n    url: '/api/v{api-version}/parameters/{parameter.path.1}/{parameter-path-2}/{PARAMETER-PATH-3}',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options.headers\n    }\n});\n\nexport const getCallWithOptionalParam = <ThrowOnError extends boolean = false>(options: Options<GetCallWithOptionalParamData, ThrowOnError>) => (options.client ?? client).get<unknown, unknown, ThrowOnError>({\n    url: '/api/v{api-version}/parameters',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options.headers\n    }\n});\n\nexport const postCallWithOptionalParam = <ThrowOnError extends boolean = false>(options: Options<PostCallWithOptionalParamData, ThrowOnError>) => (options.client ?? client).post<PostCallWithOptionalParamResponses, unknown, ThrowOnError>({\n    url: '/api/v{api-version}/parameters',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options.headers\n    }\n});\n\nexport const postApiVbyApiVersionRequestBody = <ThrowOnError extends boolean = false>(options?: Options<PostApiVbyApiVersionRequestBodyData, ThrowOnError>) => (options?.client ?? client).post<unknown, unknown, ThrowOnError>({\n    url: '/api/v{api-version}/requestBody',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options?.headers\n    }\n});\n\nexport const postApiVbyApiVersionFormData = <ThrowOnError extends boolean = false>(options?: Options<PostApiVbyApiVersionFormDataData, ThrowOnError>) => (options?.client ?? client).post<unknown, unknown, ThrowOnError>({\n    ...formDataBodySerializer,\n    url: '/api/v{api-version}/formData',\n    ...options,\n    headers: {\n        'Content-Type': null,\n        ...options?.headers\n    }\n});\n\nexport const callWithDefaultParameters = <ThrowOnError extends boolean = false>(options?: Options<CallWithDefaultParametersData, ThrowOnError>) => (options?.client ?? client).get<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/defaults', ...options });\n\nexport const callWithDefaultOptionalParameters = <ThrowOnError extends boolean = false>(options?: Options<CallWithDefaultOptionalParametersData, ThrowOnError>) => (options?.client ?? client).post<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/defaults', ...options });\n\nexport const callToTestOrderOfParams = <ThrowOnError extends boolean = false>(options: Options<CallToTestOrderOfParamsData, ThrowOnError>) => (options.client ?? client).put<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/defaults', ...options });\n\nexport const duplicateName = <ThrowOnError extends boolean = false>(options?: Options<DuplicateNameData, ThrowOnError>) => (options?.client ?? client).delete<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/duplicate', ...options });\n\nexport const duplicateName2 = <ThrowOnError extends boolean = false>(options?: Options<DuplicateName2Data, ThrowOnError>) => (options?.client ?? client).get<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/duplicate', ...options });\n\nexport const duplicateName3 = <ThrowOnError extends boolean = false>(options?: Options<DuplicateName3Data, ThrowOnError>) => (options?.client ?? client).post<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/duplicate', ...options });\n\nexport const duplicateName4 = <ThrowOnError extends boolean = false>(options?: Options<DuplicateName4Data, ThrowOnError>) => (options?.client ?? client).put<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/duplicate', ...options });\n\nexport const callWithNoContentResponse = <ThrowOnError extends boolean = false>(options?: Options<CallWithNoContentResponseData, ThrowOnError>) => (options?.client ?? client).get<CallWithNoContentResponseResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/no-content', ...options });\n\nexport const callWithResponseAndNoContentResponse = <ThrowOnError extends boolean = false>(options?: Options<CallWithResponseAndNoContentResponseData, ThrowOnError>) => (options?.client ?? client).get<CallWithResponseAndNoContentResponseResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/multiple-tags/response-and-no-content', ...options });\n\nexport const dummyA = <ThrowOnError extends boolean = false>(options?: Options<DummyAData, ThrowOnError>) => (options?.client ?? client).get<DummyAResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/multiple-tags/a', ...options });\n\nexport const dummyB = <ThrowOnError extends boolean = false>(options?: Options<DummyBData, ThrowOnError>) => (options?.client ?? client).get<DummyBResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/multiple-tags/b', ...options });\n\nexport const callWithResponse = <ThrowOnError extends boolean = false>(options?: Options<CallWithResponseData, ThrowOnError>) => (options?.client ?? client).get<CallWithResponseResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/response', ...options });\n\nexport const callWithDuplicateResponses = <ThrowOnError extends boolean = false>(options?: Options<CallWithDuplicateResponsesData, ThrowOnError>) => (options?.client ?? client).post<CallWithDuplicateResponsesResponses, CallWithDuplicateResponsesErrors, ThrowOnError>({ url: '/api/v{api-version}/response', ...options });\n\nexport const callWithResponses = <ThrowOnError extends boolean = false>(options?: Options<CallWithResponsesData, ThrowOnError>) => (options?.client ?? client).put<CallWithResponsesResponses, CallWithResponsesErrors, ThrowOnError>({ url: '/api/v{api-version}/response', ...options });\n\nexport const collectionFormat = <ThrowOnError extends boolean = false>(options: Options<CollectionFormatData, ThrowOnError>) => (options.client ?? client).get<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/collectionFormat', ...options });\n\nexport const types = <ThrowOnError extends boolean = false>(options: Options<TypesData, ThrowOnError>) => (options.client ?? client).get<TypesResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/types', ...options });\n\nexport const uploadFile = <ThrowOnError extends boolean = false>(options: Options<UploadFileData, ThrowOnError>) => (options.client ?? client).post<UploadFileResponses, unknown, ThrowOnError>({\n    ...urlSearchParamsBodySerializer,\n    url: '/api/v{api-version}/upload',\n    ...options,\n    headers: {\n        'Content-Type': 'application/x-www-form-urlencoded',\n        ...options.headers\n    }\n});\n\nexport const fileResponse = <ThrowOnError extends boolean = false>(options: Options<FileResponseData, ThrowOnError>) => (options.client ?? client).get<FileResponseResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/file/{id}', ...options });\n\nexport const complexTypes = <ThrowOnError extends boolean = false>(options: Options<ComplexTypesData, ThrowOnError>) => (options.client ?? client).get<ComplexTypesResponses, ComplexTypesErrors, ThrowOnError>({\n    querySerializer: { parameters: { parameterObject: { object: { style: 'form' } } } },\n    url: '/api/v{api-version}/complex',\n    ...options\n});\n\nexport const multipartResponse = <ThrowOnError extends boolean = false>(options?: Options<MultipartResponseData, ThrowOnError>) => (options?.client ?? client).get<MultipartResponseResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/multipart', ...options });\n\nexport const multipartRequest = <ThrowOnError extends boolean = false>(options?: Options<MultipartRequestData, ThrowOnError>) => (options?.client ?? client).post<unknown, unknown, ThrowOnError>({\n    ...formDataBodySerializer,\n    url: '/api/v{api-version}/multipart',\n    ...options,\n    headers: {\n        'Content-Type': null,\n        ...options?.headers\n    }\n});\n\nexport const complexParams = <ThrowOnError extends boolean = false>(options: Options<ComplexParamsData, ThrowOnError>) => (options.client ?? client).put<ComplexParamsResponses, unknown, ThrowOnError>({\n    url: '/api/v{api-version}/complex/{id}',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json-patch+json',\n        ...options.headers\n    }\n});\n\nexport const callWithResultFromHeader = <ThrowOnError extends boolean = false>(options?: Options<CallWithResultFromHeaderData, ThrowOnError>) => (options?.client ?? client).post<CallWithResultFromHeaderResponses, CallWithResultFromHeaderErrors, ThrowOnError>({ url: '/api/v{api-version}/header', ...options });\n\nexport const testErrorCode = <ThrowOnError extends boolean = false>(options: Options<TestErrorCodeData, ThrowOnError>) => (options.client ?? client).post<TestErrorCodeResponses, TestErrorCodeErrors, ThrowOnError>({ url: '/api/v{api-version}/error', ...options });\n\nexport const nonAsciiæøåÆøÅöôêÊ字符串 = <ThrowOnError extends boolean = false>(options: Options<NonAsciiæøåÆøÅöôêÊ字符串Data, ThrowOnError>) => (options.client ?? client).post<NonAsciiæøåÆøÅöôêÊ字符串Responses, unknown, ThrowOnError>({ url: '/api/v{api-version}/non-ascii-æøåÆØÅöôêÊ字符串', ...options });\n\n/**\n * Login User\n */\nexport const putWithFormUrlEncoded = <ThrowOnError extends boolean = false>(options: Options<PutWithFormUrlEncodedData, ThrowOnError>) => (options.client ?? client).put<unknown, unknown, ThrowOnError>({\n    ...urlSearchParamsBodySerializer,\n    url: '/api/v{api-version}/non-ascii-æøåÆØÅöôêÊ字符串',\n    ...options,\n    headers: {\n        'Content-Type': 'application/x-www-form-urlencoded',\n        ...options.headers\n    }\n});\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-ofetch/default/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type ClientOptions = {\n    baseUrl: 'http://localhost:3000/base' | (string & {});\n};\n\n/**\n * Model with number-only name\n */\nexport type _400 = string;\n\n/**\n * External ref to shared model (A)\n */\nexport type ExternalRefA = ExternalSharedModel;\n\n/**\n * External ref to shared model (B)\n */\nexport type ExternalRefB = ExternalSharedModel;\n\n/**\n * Testing multiline comments in string: First line\n * Second line\n *\n * Fourth line\n */\nexport type CamelCaseCommentWithBreaks = number;\n\n/**\n * Testing multiline comments in string: First line\n * Second line\n *\n * Fourth line\n */\nexport type CommentWithBreaks = number;\n\n/**\n * Testing backticks in string: `backticks` and ```multiple backticks``` should work\n */\nexport type CommentWithBackticks = number;\n\n/**\n * Testing backticks and quotes in string: `backticks`, 'quotes', \"double quotes\" and ```multiple backticks``` should work\n */\nexport type CommentWithBackticksAndQuotes = number;\n\n/**\n * Testing slashes in string: \\backwards\\\\\\ and /forwards/// should work\n */\nexport type CommentWithSlashes = number;\n\n/**\n * Testing expression placeholders in string: ${expression} should work\n */\nexport type CommentWithExpressionPlaceholders = number;\n\n/**\n * Testing quotes in string: 'single quote''' and \"double quotes\"\"\" should work\n */\nexport type CommentWithQuotes = number;\n\n/**\n * Testing reserved characters in string: * inline * and ** inline ** should work\n */\nexport type CommentWithReservedCharacters = number;\n\n/**\n * This is a simple number\n */\nexport type SimpleInteger = number;\n\n/**\n * This is a simple boolean\n */\nexport type SimpleBoolean = boolean;\n\n/**\n * This is a simple string\n */\nexport type SimpleString = string;\n\n/**\n * A string with non-ascii (unicode) characters valid in typescript identifiers (æøåÆØÅöÔèÈ字符串)\n */\nexport type NonAsciiStringæøåÆøÅöôêÊ字符串 = string;\n\n/**\n * This is a simple file\n */\nexport type SimpleFile = Blob | File;\n\n/**\n * This is a simple reference\n */\nexport type SimpleReference = ModelWithString;\n\n/**\n * This is a simple string\n */\nexport type SimpleStringWithPattern = string | null;\n\n/**\n * This is a simple enum with strings\n */\nexport type EnumWithStrings = 'Success' | 'Warning' | 'Error' | '\\'Single Quote\\'' | '\"Double Quotes\"' | 'Non-ascii: øæåôöØÆÅÔÖ字符串';\n\nexport type EnumWithReplacedCharacters = '\\'Single Quote\\'' | '\"Double Quotes\"' | 'øæåôöØÆÅÔÖ字符串' | 3.1 | '';\n\n/**\n * This is a simple enum with numbers\n */\nexport type EnumWithNumbers = 1 | 2 | 3 | 1.1 | 1.2 | 1.3 | 100 | 200 | 300 | -100 | -200 | -300 | -1.1 | -1.2 | -1.3;\n\n/**\n * Success=1,Warning=2,Error=3\n */\nexport type EnumFromDescription = number;\n\n/**\n * This is a simple enum with numbers\n */\nexport type EnumWithExtensions = 200 | 400 | 500;\n\nexport type EnumWithXEnumNames = 0 | 1 | 2;\n\n/**\n * This is a simple array with numbers\n */\nexport type ArrayWithNumbers = Array<number>;\n\n/**\n * This is a simple array with booleans\n */\nexport type ArrayWithBooleans = Array<boolean>;\n\n/**\n * This is a simple array with strings\n */\nexport type ArrayWithStrings = Array<string>;\n\n/**\n * This is a simple array with references\n */\nexport type ArrayWithReferences = Array<ModelWithString>;\n\n/**\n * This is a simple array containing an array\n */\nexport type ArrayWithArray = Array<Array<ModelWithString>>;\n\n/**\n * This is a simple array with properties\n */\nexport type ArrayWithProperties = Array<{\n    '16x16'?: CamelCaseCommentWithBreaks;\n    bar?: string;\n}>;\n\n/**\n * This is a simple array with any of properties\n */\nexport type ArrayWithAnyOfProperties = Array<{\n    foo?: string;\n} | {\n    bar?: string;\n}>;\n\nexport type AnyOfAnyAndNull = {\n    data?: unknown | null;\n};\n\n/**\n * This is a simple array with any of properties\n */\nexport type AnyOfArrays = {\n    results?: Array<{\n        foo?: string;\n    } | {\n        bar?: string;\n    }>;\n};\n\n/**\n * This is a string dictionary\n */\nexport type DictionaryWithString = {\n    [key: string]: string;\n};\n\nexport type DictionaryWithPropertiesAndAdditionalProperties = {\n    foo?: number;\n    bar?: boolean;\n    [key: string]: string | number | boolean | undefined;\n};\n\n/**\n * This is a string reference\n */\nexport type DictionaryWithReference = {\n    [key: string]: ModelWithString;\n};\n\n/**\n * This is a complex dictionary\n */\nexport type DictionaryWithArray = {\n    [key: string]: Array<ModelWithString>;\n};\n\n/**\n * This is a string dictionary\n */\nexport type DictionaryWithDictionary = {\n    [key: string]: {\n        [key: string]: string;\n    };\n};\n\n/**\n * This is a complex dictionary\n */\nexport type DictionaryWithProperties = {\n    [key: string]: {\n        foo?: string;\n        bar?: string;\n    };\n};\n\n/**\n * This is a model with one number property\n */\nexport type ModelWithInteger = {\n    /**\n     * This is a simple number property\n     */\n    prop?: number;\n};\n\n/**\n * This is a model with one boolean property\n */\nexport type ModelWithBoolean = {\n    /**\n     * This is a simple boolean property\n     */\n    prop?: boolean;\n};\n\n/**\n * This is a model with one string property\n */\nexport type ModelWithString = {\n    /**\n     * This is a simple string property\n     */\n    prop?: string;\n};\n\n/**\n * This is a model with one string property\n */\nexport type ModelWithStringError = {\n    /**\n     * This is a simple string property\n     */\n    prop?: string;\n};\n\n/**\n * `Comment` or `VoiceComment`. The JSON object for adding voice comments to tickets is different. See [Adding voice comments to tickets](/documentation/ticketing/managing-tickets/adding-voice-comments-to-tickets)\n */\nexport type ModelFromZendesk = string;\n\n/**\n * This is a model with one string property\n */\nexport type ModelWithNullableString = {\n    /**\n     * This is a simple string property\n     */\n    nullableProp1?: string | null;\n    /**\n     * This is a simple string property\n     */\n    nullableRequiredProp1: string | null;\n    /**\n     * This is a simple string property\n     */\n    nullableProp2?: string | null;\n    /**\n     * This is a simple string property\n     */\n    nullableRequiredProp2: string | null;\n    /**\n     * This is a simple enum with strings\n     */\n    'foo_bar-enum'?: 'Success' | 'Warning' | 'Error' | 'ØÆÅ字符串';\n};\n\n/**\n * This is a model with one enum\n */\nexport type ModelWithEnum = {\n    /**\n     * This is a simple enum with strings\n     */\n    'foo_bar-enum'?: 'Success' | 'Warning' | 'Error' | 'ØÆÅ字符串';\n    /**\n     * These are the HTTP error code enums\n     */\n    statusCode?: '100' | '200 FOO' | '300 FOO_BAR' | '400 foo-bar' | '500 foo.bar' | '600 foo&bar';\n    /**\n     * Simple boolean enum\n     */\n    bool?: true;\n};\n\n/**\n * This is a model with one enum with escaped name\n */\nexport type ModelWithEnumWithHyphen = {\n    /**\n     * Foo-Bar-Baz-Qux\n     */\n    'foo-bar-baz-qux'?: '3.0';\n};\n\n/**\n * This is a model with one enum\n */\nexport type ModelWithEnumFromDescription = {\n    /**\n     * Success=1,Warning=2,Error=3\n     */\n    test?: number;\n};\n\n/**\n * This is a model with nested enums\n */\nexport type ModelWithNestedEnums = {\n    dictionaryWithEnum?: {\n        [key: string]: 'Success' | 'Warning' | 'Error';\n    };\n    dictionaryWithEnumFromDescription?: {\n        [key: string]: number;\n    };\n    arrayWithEnum?: Array<'Success' | 'Warning' | 'Error'>;\n    arrayWithDescription?: Array<number>;\n    /**\n     * This is a simple enum with strings\n     */\n    'foo_bar-enum'?: 'Success' | 'Warning' | 'Error' | 'ØÆÅ字符串';\n};\n\n/**\n * This is a model with one property containing a reference\n */\nexport type ModelWithReference = {\n    prop?: ModelWithProperties;\n};\n\n/**\n * This is a model with one property containing an array\n */\nexport type ModelWithArrayReadOnlyAndWriteOnly = {\n    prop?: Array<ModelWithReadOnlyAndWriteOnly>;\n    propWithFile?: Array<Blob | File>;\n    propWithNumber?: Array<number>;\n};\n\n/**\n * This is a model with one property containing an array\n */\nexport type ModelWithArray = {\n    prop?: Array<ModelWithString>;\n    propWithFile?: Array<Blob | File>;\n    propWithNumber?: Array<number>;\n};\n\n/**\n * This is a model with one property containing a dictionary\n */\nexport type ModelWithDictionary = {\n    prop?: {\n        [key: string]: string;\n    };\n};\n\n/**\n * This is a deprecated model with a deprecated property\n *\n * @deprecated\n */\nexport type DeprecatedModel = {\n    /**\n     * This is a deprecated property\n     *\n     * @deprecated\n     */\n    prop?: string;\n};\n\n/**\n * This is a model with one property containing a circular reference\n */\nexport type ModelWithCircularReference = {\n    prop?: ModelWithCircularReference;\n};\n\n/**\n * This is a model with one property with a 'one of' relationship\n */\nexport type CompositionWithOneOf = {\n    propA?: ModelWithString | ModelWithEnum | ModelWithArray | ModelWithDictionary;\n};\n\n/**\n * This is a model with one property with a 'one of' relationship where the options are not $ref\n */\nexport type CompositionWithOneOfAnonymous = {\n    propA?: {\n        propA?: string;\n    } | string | number;\n};\n\n/**\n * Circle\n */\nexport type ModelCircle = {\n    kind: string;\n    radius?: number;\n};\n\n/**\n * Square\n */\nexport type ModelSquare = {\n    kind: string;\n    sideLength?: number;\n};\n\n/**\n * This is a model with one property with a 'one of' relationship where the options are not $ref\n */\nexport type CompositionWithOneOfDiscriminator = ({\n    kind: 'circle';\n} & ModelCircle) | ({\n    kind: 'square';\n} & ModelSquare);\n\n/**\n * This is a model with one property with a 'any of' relationship\n */\nexport type CompositionWithAnyOf = {\n    propA?: ModelWithString | ModelWithEnum | ModelWithArray | ModelWithDictionary;\n};\n\n/**\n * This is a model with one property with a 'any of' relationship where the options are not $ref\n */\nexport type CompositionWithAnyOfAnonymous = {\n    propA?: {\n        propA?: string;\n    } | string | number;\n};\n\n/**\n * This is a model with nested 'any of' property with a type null\n */\nexport type CompositionWithNestedAnyAndTypeNull = {\n    propA?: Array<ModelWithDictionary | null> | Array<ModelWithArray | null>;\n};\n\nexport type _3eNum1Период = 'Bird' | 'Dog';\n\nexport type ConstValue = 'ConstValue';\n\n/**\n * This is a model with one property with a 'any of' relationship where the options are not $ref\n */\nexport type CompositionWithNestedAnyOfAndNull = {\n    /**\n     * Scopes\n     */\n    propA?: Array<_3eNum1Период | ConstValue> | null;\n};\n\n/**\n * This is a model with one property with a 'one of' relationship\n */\nexport type CompositionWithOneOfAndNullable = {\n    propA?: {\n        boolean?: boolean;\n    } | ModelWithEnum | ModelWithArray | ModelWithDictionary | null;\n};\n\n/**\n * This is a model that contains a simple dictionary within composition\n */\nexport type CompositionWithOneOfAndSimpleDictionary = {\n    propA?: boolean | {\n        [key: string]: number;\n    };\n};\n\n/**\n * This is a model that contains a dictionary of simple arrays within composition\n */\nexport type CompositionWithOneOfAndSimpleArrayDictionary = {\n    propA?: boolean | {\n        [key: string]: Array<boolean>;\n    };\n};\n\n/**\n * This is a model that contains a dictionary of complex arrays (composited) within composition\n */\nexport type CompositionWithOneOfAndComplexArrayDictionary = {\n    propA?: boolean | {\n        [key: string]: Array<number | string>;\n    };\n};\n\n/**\n * This is a model with one property with a 'all of' relationship\n */\nexport type CompositionWithAllOfAndNullable = {\n    propA?: ({\n        boolean?: boolean;\n    } & ModelWithEnum & ModelWithArray & ModelWithDictionary) | null;\n};\n\n/**\n * This is a model with one property with a 'any of' relationship\n */\nexport type CompositionWithAnyOfAndNullable = {\n    propA?: {\n        boolean?: boolean;\n    } | ModelWithEnum | ModelWithArray | ModelWithDictionary | null;\n};\n\n/**\n * This is a base model with two simple optional properties\n */\nexport type CompositionBaseModel = {\n    firstName?: string;\n    lastname?: string;\n};\n\n/**\n * This is a model that extends the base model\n */\nexport type CompositionExtendedModel = CompositionBaseModel & {\n    age: number;\n    firstName: string;\n    lastname: string;\n};\n\n/**\n * This is a model with one nested property\n */\nexport type ModelWithProperties = {\n    required: string;\n    readonly requiredAndReadOnly: string;\n    requiredAndNullable: string | null;\n    string?: string;\n    number?: number;\n    boolean?: boolean;\n    reference?: ModelWithString;\n    'property with space'?: string;\n    default?: string;\n    try?: string;\n    readonly '@namespace.string'?: string;\n    readonly '@namespace.integer'?: number;\n};\n\n/**\n * This is a model with one nested property\n */\nexport type ModelWithNestedProperties = {\n    readonly first: {\n        readonly second: {\n            readonly third: string | null;\n        } | null;\n    } | null;\n};\n\n/**\n * This is a model with duplicated properties\n */\nexport type ModelWithDuplicateProperties = {\n    prop?: ModelWithString;\n};\n\n/**\n * This is a model with ordered properties\n */\nexport type ModelWithOrderedProperties = {\n    zebra?: string;\n    apple?: string;\n    hawaii?: string;\n};\n\n/**\n * This is a model with duplicated imports\n */\nexport type ModelWithDuplicateImports = {\n    propA?: ModelWithString;\n    propB?: ModelWithString;\n    propC?: ModelWithString;\n};\n\n/**\n * This is a model that extends another model\n */\nexport type ModelThatExtends = ModelWithString & {\n    propExtendsA?: string;\n    propExtendsB?: ModelWithString;\n};\n\n/**\n * This is a model that extends another model\n */\nexport type ModelThatExtendsExtends = ModelWithString & ModelThatExtends & {\n    propExtendsC?: string;\n    propExtendsD?: ModelWithString;\n};\n\n/**\n * This is a model that contains a some patterns\n */\nexport type ModelWithPattern = {\n    key: string;\n    name: string;\n    readonly enabled?: boolean;\n    readonly modified?: string;\n    id?: string;\n    text?: string;\n    patternWithSingleQuotes?: string;\n    patternWithNewline?: string;\n    patternWithBacktick?: string;\n    patternWithUnicode?: string;\n};\n\nexport type File = {\n    /**\n     * Id\n     */\n    readonly id?: string;\n    /**\n     * Updated at\n     */\n    readonly updated_at?: string;\n    /**\n     * Created at\n     */\n    readonly created_at?: string;\n    /**\n     * Mime\n     */\n    mime: string;\n    /**\n     * File\n     */\n    readonly file?: string;\n};\n\nexport type Default = {\n    name?: string;\n};\n\nexport type Pageable = {\n    page?: number;\n    size?: number;\n    sort?: Array<string>;\n};\n\n/**\n * This is a free-form object without additionalProperties.\n */\nexport type FreeFormObjectWithoutAdditionalProperties = {\n    [key: string]: unknown;\n};\n\n/**\n * This is a free-form object with additionalProperties: true.\n */\nexport type FreeFormObjectWithAdditionalPropertiesEqTrue = {\n    [key: string]: unknown;\n};\n\n/**\n * This is a free-form object with additionalProperties: {}.\n */\nexport type FreeFormObjectWithAdditionalPropertiesEqEmptyObject = {\n    [key: string]: unknown;\n};\n\nexport type ModelWithConst = {\n    String?: 'String';\n    number?: 0;\n    null?: null;\n    withType?: 'Some string';\n};\n\n/**\n * This is a model with one property and additionalProperties: true\n */\nexport type ModelWithAdditionalPropertiesEqTrue = {\n    /**\n     * This is a simple string property\n     */\n    prop?: string;\n    [key: string]: unknown;\n};\n\nexport type NestedAnyOfArraysNullable = {\n    nullableArray?: Array<string | boolean> | null;\n};\n\nexport type CompositionWithOneOfAndProperties = ({\n    foo: SimpleParameter;\n} | {\n    bar: NonAsciiStringæøåÆøÅöôêÊ字符串;\n}) & {\n    baz: number | null;\n    qux: number;\n};\n\n/**\n * An object that can be null\n */\nexport type NullableObject = {\n    foo?: string;\n} | null;\n\n/**\n * Some % character\n */\nexport type CharactersInDescription = string;\n\nexport type ModelWithNullableObject = {\n    data?: NullableObject;\n};\n\n/**\n * An object with additional properties that can be null (anyOf ref + null)\n */\nexport type ModelWithAdditionalPropertiesRef = {\n    [key: string]: NullableObject | null;\n};\n\nexport type ModelWithOneOfEnum = {\n    foo: 'Bar';\n} | {\n    foo: 'Baz';\n} | {\n    foo: 'Qux';\n} | {\n    content: string;\n    foo: 'Quux';\n} | {\n    content: [\n        string,\n        string\n    ];\n    foo: 'Corge';\n};\n\nexport type ModelWithNestedArrayEnumsDataFoo = 'foo' | 'bar';\n\nexport type ModelWithNestedArrayEnumsDataBar = 'baz' | 'qux';\n\nexport type ModelWithNestedArrayEnumsData = {\n    foo?: Array<ModelWithNestedArrayEnumsDataFoo>;\n    bar?: Array<ModelWithNestedArrayEnumsDataBar>;\n};\n\nexport type ModelWithNestedArrayEnums = {\n    array_strings?: Array<string>;\n    data?: ModelWithNestedArrayEnumsData;\n};\n\nexport type ModelWithNestedCompositionEnums = {\n    foo?: ModelWithNestedArrayEnumsDataFoo;\n};\n\nexport type ModelWithReadOnlyAndWriteOnly = {\n    foo: string;\n    readonly bar: string;\n};\n\nexport type ModelWithConstantSizeArray = [\n    number,\n    number\n];\n\nexport type ModelWithAnyOfConstantSizeArray = [\n    number | string,\n    number | string,\n    number | string\n];\n\nexport type ModelWithPrefixItemsConstantSizeArray = [\n    ModelWithInteger,\n    number | string,\n    string\n];\n\nexport type ModelWithAnyOfConstantSizeArrayNullable = [\n    number | null | string,\n    number | null | string,\n    number | null | string\n];\n\nexport type ModelWithAnyOfConstantSizeArrayWithNSizeAndOptions = [\n    number | Import,\n    number | Import\n];\n\nexport type ModelWithAnyOfConstantSizeArrayAndIntersect = [\n    number & string,\n    number & string\n];\n\nexport type ModelWithNumericEnumUnion = {\n    /**\n     * Период\n     */\n    value?: -10 | -1 | 0 | 1 | 3 | 6 | 12;\n};\n\n/**\n * Some description with `back ticks`\n */\nexport type ModelWithBackticksInDescription = {\n    /**\n     * The template `that` should be used for parsing and importing the contents of the CSV file.\n     *\n     * <br/><p>There is one placeholder currently supported:<ul>     <li><b>${x}</b> - refers to the n-th column in the CSV file, e.g. ${1}, ${2}, ...)</li></ul><p>Example of a correct JSON template:</p>\n     * <pre>\n     * [\n     * {\n     * \"resourceType\": \"Asset\",\n     * \"identifier\": {\n     * \"name\": \"${1}\",\n     * \"domain\": {\n     * \"name\": \"${2}\",\n     * \"community\": {\n     * \"name\": \"Some Community\"\n     * }\n     * }\n     * },\n     * \"attributes\" : {\n     * \"00000000-0000-0000-0000-000000003115\" : [ {\n     * \"value\" : \"${3}\"\n     * } ],\n     * \"00000000-0000-0000-0000-000000000222\" : [ {\n     * \"value\" : \"${4}\"\n     * } ]\n     * }\n     * }\n     * ]\n     * </pre>\n     */\n    template?: string;\n};\n\nexport type ModelWithOneOfAndProperties = (SimpleParameter | NonAsciiStringæøåÆøÅöôêÊ字符串) & {\n    baz: number | null;\n    qux: number;\n};\n\n/**\n * Model used to test deduplication strategy (unused)\n */\nexport type ParameterSimpleParameterUnused = string;\n\n/**\n * Model used to test deduplication strategy\n */\nexport type PostServiceWithEmptyTagResponse = string;\n\n/**\n * Model used to test deduplication strategy\n */\nexport type PostServiceWithEmptyTagResponse2 = string;\n\n/**\n * Model used to test deduplication strategy\n */\nexport type DeleteFooData = string;\n\n/**\n * Model used to test deduplication strategy\n */\nexport type DeleteFooData2 = string;\n\n/**\n * Model with restricted keyword name\n */\nexport type Import = string;\n\nexport type SchemaWithFormRestrictedKeys = {\n    description?: string;\n    'x-enum-descriptions'?: string;\n    'x-enum-varnames'?: string;\n    'x-enumNames'?: string;\n    title?: string;\n    object?: {\n        description?: string;\n        'x-enum-descriptions'?: string;\n        'x-enum-varnames'?: string;\n        'x-enumNames'?: string;\n        title?: string;\n    };\n    array?: Array<{\n        description?: string;\n        'x-enum-descriptions'?: string;\n        'x-enum-varnames'?: string;\n        'x-enumNames'?: string;\n        title?: string;\n    }>;\n};\n\n/**\n * This schema was giving PascalCase transformations a hard time\n */\nexport type IoK8sApimachineryPkgApisMetaV1DeleteOptions = {\n    /**\n     * Must be fulfilled before a deletion is carried out. If not possible, a 409 Conflict status will be returned.\n     */\n    preconditions?: IoK8sApimachineryPkgApisMetaV1Preconditions;\n};\n\n/**\n * This schema was giving PascalCase transformations a hard time\n */\nexport type IoK8sApimachineryPkgApisMetaV1Preconditions = {\n    /**\n     * Specifies the target ResourceVersion\n     */\n    resourceVersion?: string;\n    /**\n     * Specifies the target UID.\n     */\n    uid?: string;\n};\n\nexport type AdditionalPropertiesUnknownIssue = {\n    [key: string]: string | number;\n};\n\nexport type AdditionalPropertiesUnknownIssue2 = {\n    [key: string]: string | number;\n};\n\nexport type AdditionalPropertiesUnknownIssue3 = string & {\n    entries: {\n        [key: string]: AdditionalPropertiesUnknownIssue;\n    };\n};\n\nexport type AdditionalPropertiesIntegerIssue = {\n    value: number;\n    [key: string]: number;\n};\n\nexport type OneOfAllOfIssue = ((ConstValue | GenericSchemaDuplicateIssue1SystemBoolean) & _3eNum1Период) | GenericSchemaDuplicateIssue1SystemString;\n\nexport type GenericSchemaDuplicateIssue1SystemBoolean = {\n    item?: boolean;\n    error?: string | null;\n    readonly hasError?: boolean;\n    data?: {\n        [key: string]: never;\n    };\n};\n\nexport type GenericSchemaDuplicateIssue1SystemString = {\n    item?: string | null;\n    error?: string | null;\n    readonly hasError?: boolean;\n};\n\nexport type ExternalSharedModel = {\n    id: string;\n    name?: string;\n};\n\n/**\n * This is a model with one property containing a reference\n */\nexport type ModelWithReferenceWritable = {\n    prop?: ModelWithPropertiesWritable;\n};\n\n/**\n * This is a model with one property containing an array\n */\nexport type ModelWithArrayReadOnlyAndWriteOnlyWritable = {\n    prop?: Array<ModelWithReadOnlyAndWriteOnlyWritable>;\n    propWithFile?: Array<Blob | File>;\n    propWithNumber?: Array<number>;\n};\n\n/**\n * This is a model with one nested property\n */\nexport type ModelWithPropertiesWritable = {\n    required: string;\n    requiredAndNullable: string | null;\n    string?: string;\n    number?: number;\n    boolean?: boolean;\n    reference?: ModelWithString;\n    'property with space'?: string;\n    default?: string;\n    try?: string;\n};\n\n/**\n * This is a model that contains a some patterns\n */\nexport type ModelWithPatternWritable = {\n    key: string;\n    name: string;\n    id?: string;\n    text?: string;\n    patternWithSingleQuotes?: string;\n    patternWithNewline?: string;\n    patternWithBacktick?: string;\n    patternWithUnicode?: string;\n};\n\nexport type FileWritable = {\n    /**\n     * Mime\n     */\n    mime: string;\n};\n\nexport type ModelWithReadOnlyAndWriteOnlyWritable = {\n    foo: string;\n    baz: string;\n};\n\nexport type ModelWithAnyOfConstantSizeArrayWithNSizeAndOptionsWritable = [\n    number | Import,\n    number | Import\n];\n\nexport type AdditionalPropertiesUnknownIssueWritable = {\n    [key: string]: string | number;\n};\n\nexport type OneOfAllOfIssueWritable = ((ConstValue | GenericSchemaDuplicateIssue1SystemBoolean) & _3eNum1Период) | GenericSchemaDuplicateIssue1SystemString;\n\nexport type GenericSchemaDuplicateIssue1SystemBooleanWritable = {\n    item?: boolean;\n    error?: string | null;\n    data?: {\n        [key: string]: never;\n    };\n};\n\nexport type GenericSchemaDuplicateIssue1SystemStringWritable = {\n    item?: string | null;\n    error?: string | null;\n};\n\n/**\n * This is a reusable parameter\n */\nexport type SimpleParameter = string;\n\n/**\n * Parameter with illegal characters\n */\nexport type XFooBar = ModelWithString;\n\n/**\n * A reusable request body\n */\nexport type SimpleRequestBody = ModelWithString;\n\n/**\n * A reusable request body\n */\nexport type SimpleFormData = ModelWithString;\n\nexport type ExportData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no+tag';\n};\n\nexport type PatchApiVbyApiVersionNoTagData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no+tag';\n};\n\nexport type PatchApiVbyApiVersionNoTagResponses = {\n    /**\n     * OK\n     */\n    default: unknown;\n};\n\nexport type ImportData = {\n    body: ModelWithReadOnlyAndWriteOnlyWritable | ModelWithArrayReadOnlyAndWriteOnlyWritable;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no+tag';\n};\n\nexport type ImportResponses = {\n    /**\n     * Success\n     */\n    200: ModelFromZendesk;\n    /**\n     * Default success response\n     */\n    default: ModelWithReadOnlyAndWriteOnly;\n};\n\nexport type ImportResponse = ImportResponses[keyof ImportResponses];\n\nexport type FooWowData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no+tag';\n};\n\nexport type FooWowResponses = {\n    /**\n     * OK\n     */\n    default: unknown;\n};\n\nexport type ApiVVersionODataControllerCountData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple/$count';\n};\n\nexport type ApiVVersionODataControllerCountResponses = {\n    /**\n     * Success\n     */\n    200: ModelFromZendesk;\n};\n\nexport type ApiVVersionODataControllerCountResponse = ApiVVersionODataControllerCountResponses[keyof ApiVVersionODataControllerCountResponses];\n\nexport type GetApiVbyApiVersionSimpleOperationData = {\n    body?: never;\n    path: {\n        /**\n         * foo in method\n         */\n        foo_param: string;\n    };\n    query?: never;\n    url: '/api/v{api-version}/simple:operation';\n};\n\nexport type GetApiVbyApiVersionSimpleOperationErrors = {\n    /**\n     * Default error response\n     */\n    default: ModelWithBoolean;\n};\n\nexport type GetApiVbyApiVersionSimpleOperationError = GetApiVbyApiVersionSimpleOperationErrors[keyof GetApiVbyApiVersionSimpleOperationErrors];\n\nexport type GetApiVbyApiVersionSimpleOperationResponses = {\n    /**\n     * Response is a simple number\n     */\n    200: number;\n};\n\nexport type GetApiVbyApiVersionSimpleOperationResponse = GetApiVbyApiVersionSimpleOperationResponses[keyof GetApiVbyApiVersionSimpleOperationResponses];\n\nexport type DeleteCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type GetCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type HeadCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type OptionsCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type PatchCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type PostCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type PutCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type DeleteFooData3 = {\n    body?: never;\n    headers: {\n        /**\n         * Parameter with illegal characters\n         */\n        'x-Foo-Bar': ModelWithString;\n    };\n    path: {\n        /**\n         * foo in method\n         */\n        foo_param: string;\n        /**\n         * bar in method\n         */\n        BarParam: string;\n    };\n    query?: never;\n    url: '/api/v{api-version}/foo/{foo_param}/bar/{BarParam}';\n};\n\nexport type CallWithDescriptionsData = {\n    body?: never;\n    path?: never;\n    query?: {\n        /**\n         * Testing multiline comments in string: First line\n         * Second line\n         *\n         * Fourth line\n         */\n        parameterWithBreaks?: string;\n        /**\n         * Testing backticks in string: `backticks` and ```multiple backticks``` should work\n         */\n        parameterWithBackticks?: string;\n        /**\n         * Testing slashes in string: \\backwards\\\\\\ and /forwards/// should work\n         */\n        parameterWithSlashes?: string;\n        /**\n         * Testing expression placeholders in string: ${expression} should work\n         */\n        parameterWithExpressionPlaceholders?: string;\n        /**\n         * Testing quotes in string: 'single quote''' and \"double quotes\"\"\" should work\n         */\n        parameterWithQuotes?: string;\n        /**\n         * Testing reserved characters in string: * inline * and ** inline ** should work\n         */\n        parameterWithReservedCharacters?: string;\n    };\n    url: '/api/v{api-version}/descriptions';\n};\n\nexport type DeprecatedCallData = {\n    body?: never;\n    headers: {\n        /**\n         * This parameter is deprecated\n         *\n         * @deprecated\n         */\n        parameter: DeprecatedModel | null;\n    };\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/parameters/deprecated';\n};\n\nexport type CallWithParametersData = {\n    /**\n     * This is the parameter that goes into the body\n     */\n    body: {\n        [key: string]: unknown;\n    } | null;\n    headers: {\n        /**\n         * This is the parameter that goes into the header\n         */\n        parameterHeader: string | null;\n    };\n    path: {\n        /**\n         * This is the parameter that goes into the path\n         */\n        parameterPath: string | null;\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string | null;\n    };\n    query: {\n        foo_ref_enum?: ModelWithNestedArrayEnumsDataFoo;\n        foo_all_of_enum: ModelWithNestedArrayEnumsDataFoo;\n        /**\n         * This is the parameter that goes into the query params\n         */\n        cursor: string | null;\n    };\n    url: '/api/v{api-version}/parameters/{parameterPath}';\n};\n\nexport type CallWithWeirdParameterNamesData = {\n    /**\n     * This is the parameter that goes into the body\n     */\n    body: ModelWithString | null;\n    headers: {\n        /**\n         * This is the parameter that goes into the request header\n         */\n        'parameter.header': string | null;\n    };\n    path: {\n        /**\n         * This is the parameter that goes into the path\n         */\n        'parameter.path.1'?: string;\n        /**\n         * This is the parameter that goes into the path\n         */\n        'parameter-path-2'?: string;\n        /**\n         * This is the parameter that goes into the path\n         */\n        'PARAMETER-PATH-3'?: string;\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string | null;\n    };\n    query: {\n        /**\n         * This is the parameter with a reserved keyword\n         */\n        default?: string;\n        /**\n         * This is the parameter that goes into the request query params\n         */\n        'parameter-query': string | null;\n    };\n    url: '/api/v{api-version}/parameters/{parameter.path.1}/{parameter-path-2}/{PARAMETER-PATH-3}';\n};\n\nexport type GetCallWithOptionalParamData = {\n    /**\n     * This is a required parameter\n     */\n    body: ModelWithOneOfEnum;\n    path?: never;\n    query?: {\n        /**\n         * This is an optional parameter\n         */\n        page?: number;\n    };\n    url: '/api/v{api-version}/parameters';\n};\n\nexport type PostCallWithOptionalParamData = {\n    /**\n     * This is an optional parameter\n     */\n    body?: {\n        offset?: number | null;\n    };\n    path?: never;\n    query: {\n        /**\n         * This is a required parameter\n         */\n        parameter: Pageable;\n    };\n    url: '/api/v{api-version}/parameters';\n};\n\nexport type PostCallWithOptionalParamResponses = {\n    /**\n     * Response is a simple number\n     */\n    200: number;\n    /**\n     * Success\n     */\n    204: void;\n};\n\nexport type PostCallWithOptionalParamResponse = PostCallWithOptionalParamResponses[keyof PostCallWithOptionalParamResponses];\n\nexport type PostApiVbyApiVersionRequestBodyData = {\n    /**\n     * A reusable request body\n     */\n    body?: SimpleRequestBody;\n    path?: never;\n    query?: {\n        /**\n         * This is a reusable parameter\n         */\n        parameter?: string;\n    };\n    url: '/api/v{api-version}/requestBody';\n};\n\nexport type PostApiVbyApiVersionFormDataData = {\n    /**\n     * A reusable request body\n     */\n    body?: SimpleFormData;\n    path?: never;\n    query?: {\n        /**\n         * This is a reusable parameter\n         */\n        parameter?: string;\n    };\n    url: '/api/v{api-version}/formData';\n};\n\nexport type CallWithDefaultParametersData = {\n    body?: never;\n    path?: never;\n    query?: {\n        /**\n         * This is a simple string with default value\n         */\n        parameterString?: string | null;\n        /**\n         * This is a simple number with default value\n         */\n        parameterNumber?: number | null;\n        /**\n         * This is a simple boolean with default value\n         */\n        parameterBoolean?: boolean | null;\n        /**\n         * This is a simple enum with default value\n         */\n        parameterEnum?: 'Success' | 'Warning' | 'Error';\n        /**\n         * This is a simple model with default value\n         */\n        parameterModel?: ModelWithString | null;\n    };\n    url: '/api/v{api-version}/defaults';\n};\n\nexport type CallWithDefaultOptionalParametersData = {\n    body?: never;\n    path?: never;\n    query?: {\n        /**\n         * This is a simple string that is optional with default value\n         */\n        parameterString?: string;\n        /**\n         * This is a simple number that is optional with default value\n         */\n        parameterNumber?: number;\n        /**\n         * This is a simple boolean that is optional with default value\n         */\n        parameterBoolean?: boolean;\n        /**\n         * This is a simple enum that is optional with default value\n         */\n        parameterEnum?: 'Success' | 'Warning' | 'Error';\n        /**\n         * This is a simple model that is optional with default value\n         */\n        parameterModel?: ModelWithString;\n    };\n    url: '/api/v{api-version}/defaults';\n};\n\nexport type CallToTestOrderOfParamsData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * This is a optional string with default\n         */\n        parameterOptionalStringWithDefault?: string;\n        /**\n         * This is a optional string with empty default\n         */\n        parameterOptionalStringWithEmptyDefault?: string;\n        /**\n         * This is a optional string with no default\n         */\n        parameterOptionalStringWithNoDefault?: string;\n        /**\n         * This is a string with default\n         */\n        parameterStringWithDefault: string;\n        /**\n         * This is a string with empty default\n         */\n        parameterStringWithEmptyDefault: string;\n        /**\n         * This is a string with no default\n         */\n        parameterStringWithNoDefault: string;\n        /**\n         * This is a string that can be null with no default\n         */\n        parameterStringNullableWithNoDefault?: string | null;\n        /**\n         * This is a string that can be null with default\n         */\n        parameterStringNullableWithDefault?: string | null;\n    };\n    url: '/api/v{api-version}/defaults';\n};\n\nexport type DuplicateNameData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/duplicate';\n};\n\nexport type DuplicateName2Data = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/duplicate';\n};\n\nexport type DuplicateName3Data = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/duplicate';\n};\n\nexport type DuplicateName4Data = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/duplicate';\n};\n\nexport type CallWithNoContentResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no-content';\n};\n\nexport type CallWithNoContentResponseResponses = {\n    /**\n     * Success\n     */\n    204: void;\n};\n\nexport type CallWithNoContentResponseResponse = CallWithNoContentResponseResponses[keyof CallWithNoContentResponseResponses];\n\nexport type CallWithResponseAndNoContentResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multiple-tags/response-and-no-content';\n};\n\nexport type CallWithResponseAndNoContentResponseResponses = {\n    /**\n     * Response is a simple number\n     */\n    200: number;\n    /**\n     * Success\n     */\n    204: void;\n};\n\nexport type CallWithResponseAndNoContentResponseResponse = CallWithResponseAndNoContentResponseResponses[keyof CallWithResponseAndNoContentResponseResponses];\n\nexport type DummyAData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multiple-tags/a';\n};\n\nexport type DummyAResponses = {\n    200: _400;\n};\n\nexport type DummyAResponse = DummyAResponses[keyof DummyAResponses];\n\nexport type DummyBData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multiple-tags/b';\n};\n\nexport type DummyBResponses = {\n    /**\n     * Success\n     */\n    204: void;\n};\n\nexport type DummyBResponse = DummyBResponses[keyof DummyBResponses];\n\nexport type CallWithResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/response';\n};\n\nexport type CallWithResponseResponses = {\n    default: Import;\n};\n\nexport type CallWithResponseResponse = CallWithResponseResponses[keyof CallWithResponseResponses];\n\nexport type CallWithDuplicateResponsesData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/response';\n};\n\nexport type CallWithDuplicateResponsesErrors = {\n    /**\n     * Message for 500 error\n     */\n    500: ModelWithStringError;\n    /**\n     * Message for 501 error\n     */\n    501: ModelWithStringError;\n    /**\n     * Message for 502 error\n     */\n    502: ModelWithStringError;\n    /**\n     * Message for 4XX errors\n     */\n    '4XX': DictionaryWithArray;\n    /**\n     * Default error response\n     */\n    default: ModelWithBoolean;\n};\n\nexport type CallWithDuplicateResponsesError = CallWithDuplicateResponsesErrors[keyof CallWithDuplicateResponsesErrors];\n\nexport type CallWithDuplicateResponsesResponses = {\n    /**\n     * Message for 200 response\n     */\n    200: ModelWithBoolean & ModelWithInteger;\n    /**\n     * Message for 201 response\n     */\n    201: ModelWithString;\n    /**\n     * Message for 202 response\n     */\n    202: ModelWithString;\n};\n\nexport type CallWithDuplicateResponsesResponse = CallWithDuplicateResponsesResponses[keyof CallWithDuplicateResponsesResponses];\n\nexport type CallWithResponsesData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/response';\n};\n\nexport type CallWithResponsesErrors = {\n    /**\n     * Message for 500 error\n     */\n    500: ModelWithStringError;\n    /**\n     * Message for 501 error\n     */\n    501: ModelWithStringError;\n    /**\n     * Message for 502 error\n     */\n    502: ModelWithStringError;\n    /**\n     * Message for default response\n     */\n    default: ModelWithStringError;\n};\n\nexport type CallWithResponsesError = CallWithResponsesErrors[keyof CallWithResponsesErrors];\n\nexport type CallWithResponsesResponses = {\n    /**\n     * Message for 200 response\n     */\n    200: {\n        readonly '@namespace.string'?: string;\n        readonly '@namespace.integer'?: number;\n        readonly value?: Array<ModelWithString>;\n    };\n    /**\n     * Message for 201 response\n     */\n    201: ModelThatExtends;\n    /**\n     * Message for 202 response\n     */\n    202: ModelThatExtendsExtends;\n};\n\nexport type CallWithResponsesResponse = CallWithResponsesResponses[keyof CallWithResponsesResponses];\n\nexport type CollectionFormatData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * This is an array parameter that is sent as csv format (comma-separated values)\n         */\n        parameterArrayCSV: Array<string> | null;\n        /**\n         * This is an array parameter that is sent as ssv format (space-separated values)\n         */\n        parameterArraySSV: Array<string> | null;\n        /**\n         * This is an array parameter that is sent as tsv format (tab-separated values)\n         */\n        parameterArrayTSV: Array<string> | null;\n        /**\n         * This is an array parameter that is sent as pipes format (pipe-separated values)\n         */\n        parameterArrayPipes: Array<string> | null;\n        /**\n         * This is an array parameter that is sent as multi format (multiple parameter instances)\n         */\n        parameterArrayMulti: Array<string> | null;\n    };\n    url: '/api/v{api-version}/collectionFormat';\n};\n\nexport type TypesData = {\n    body?: never;\n    path?: {\n        /**\n         * This is a number parameter\n         */\n        id?: number;\n    };\n    query: {\n        /**\n         * This is a number parameter\n         */\n        parameterNumber: number;\n        /**\n         * This is a string parameter\n         */\n        parameterString: string | null;\n        /**\n         * This is a boolean parameter\n         */\n        parameterBoolean: boolean | null;\n        /**\n         * This is an object parameter\n         */\n        parameterObject: {\n            [key: string]: unknown;\n        } | null;\n        /**\n         * This is an array parameter\n         */\n        parameterArray: Array<string> | null;\n        /**\n         * This is a dictionary parameter\n         */\n        parameterDictionary: {\n            [key: string]: unknown;\n        } | null;\n        /**\n         * This is an enum parameter\n         */\n        parameterEnum: 'Success' | 'Warning' | 'Error' | null;\n    };\n    url: '/api/v{api-version}/types';\n};\n\nexport type TypesResponses = {\n    /**\n     * Response is a simple number\n     */\n    200: number;\n    /**\n     * Response is a simple string\n     */\n    201: string;\n    /**\n     * Response is a simple boolean\n     */\n    202: boolean;\n    /**\n     * Response is a simple object\n     */\n    203: {\n        [key: string]: unknown;\n    };\n};\n\nexport type TypesResponse = TypesResponses[keyof TypesResponses];\n\nexport type UploadFileData = {\n    body: Blob | File;\n    path: {\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string | null;\n    };\n    query?: never;\n    url: '/api/v{api-version}/upload';\n};\n\nexport type UploadFileResponses = {\n    200: boolean;\n};\n\nexport type UploadFileResponse = UploadFileResponses[keyof UploadFileResponses];\n\nexport type FileResponseData = {\n    body?: never;\n    path: {\n        id: string;\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string;\n    };\n    query?: never;\n    url: '/api/v{api-version}/file/{id}';\n};\n\nexport type FileResponseResponses = {\n    /**\n     * Success\n     */\n    200: Blob | File;\n};\n\nexport type FileResponseResponse = FileResponseResponses[keyof FileResponseResponses];\n\nexport type ComplexTypesData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * Parameter containing object\n         */\n        parameterObject: {\n            first?: {\n                second?: {\n                    third?: string;\n                };\n            };\n        };\n        /**\n         * Parameter containing reference\n         */\n        parameterReference: ModelWithString;\n    };\n    url: '/api/v{api-version}/complex';\n};\n\nexport type ComplexTypesErrors = {\n    /**\n     * 400 `server` error\n     */\n    400: unknown;\n    /**\n     * 500 server error\n     */\n    500: unknown;\n};\n\nexport type ComplexTypesResponses = {\n    /**\n     * Successful response\n     */\n    200: Array<ModelWithString>;\n};\n\nexport type ComplexTypesResponse = ComplexTypesResponses[keyof ComplexTypesResponses];\n\nexport type MultipartResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multipart';\n};\n\nexport type MultipartResponseResponses = {\n    /**\n     * OK\n     */\n    200: {\n        file?: Blob | File;\n        metadata?: {\n            foo?: string;\n            bar?: string;\n        };\n    };\n};\n\nexport type MultipartResponseResponse = MultipartResponseResponses[keyof MultipartResponseResponses];\n\nexport type MultipartRequestData = {\n    body?: {\n        content?: Blob | File;\n        data?: ModelWithString | null;\n    };\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multipart';\n};\n\nexport type ComplexParamsData = {\n    body?: {\n        readonly key: string | null;\n        name: string | null;\n        enabled?: boolean;\n        type: 'Monkey' | 'Horse' | 'Bird';\n        listOfModels?: Array<ModelWithString> | null;\n        listOfStrings?: Array<string> | null;\n        parameters: ModelWithString | ModelWithEnum | ModelWithArray | ModelWithDictionary;\n        readonly user?: {\n            readonly id?: number;\n            readonly name?: string | null;\n        };\n    };\n    path: {\n        id: number;\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string;\n    };\n    query?: never;\n    url: '/api/v{api-version}/complex/{id}';\n};\n\nexport type ComplexParamsResponses = {\n    /**\n     * Success\n     */\n    200: ModelWithString;\n};\n\nexport type ComplexParamsResponse = ComplexParamsResponses[keyof ComplexParamsResponses];\n\nexport type CallWithResultFromHeaderData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/header';\n};\n\nexport type CallWithResultFromHeaderErrors = {\n    /**\n     * 400 server error\n     */\n    400: unknown;\n    /**\n     * 500 server error\n     */\n    500: unknown;\n};\n\nexport type CallWithResultFromHeaderResponses = {\n    /**\n     * Successful response\n     */\n    200: unknown;\n};\n\nexport type TestErrorCodeData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * Status code to return\n         */\n        status: number;\n    };\n    url: '/api/v{api-version}/error';\n};\n\nexport type TestErrorCodeErrors = {\n    /**\n     * Custom message: Internal Server Error\n     */\n    500: unknown;\n    /**\n     * Custom message: Not Implemented\n     */\n    501: unknown;\n    /**\n     * Custom message: Bad Gateway\n     */\n    502: unknown;\n    /**\n     * Custom message: Service Unavailable\n     */\n    503: unknown;\n};\n\nexport type TestErrorCodeResponses = {\n    /**\n     * Custom message: Successful response\n     */\n    200: unknown;\n};\n\nexport type NonAsciiæøåÆøÅöôêÊ字符串Data = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * Dummy input param\n         */\n        nonAsciiParamæøåÆØÅöôêÊ: number;\n    };\n    url: '/api/v{api-version}/non-ascii-æøåÆØÅöôêÊ字符串';\n};\n\nexport type NonAsciiæøåÆøÅöôêÊ字符串Responses = {\n    /**\n     * Successful response\n     */\n    200: Array<NonAsciiStringæøåÆøÅöôêÊ字符串>;\n};\n\nexport type NonAsciiæøåÆøÅöôêÊ字符串Response = NonAsciiæøåÆøÅöôêÊ字符串Responses[keyof NonAsciiæøåÆøÅöôêÊ字符串Responses];\n\nexport type PutWithFormUrlEncodedData = {\n    body: ArrayWithStrings;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/non-ascii-æøåÆØÅöôêÊ字符串';\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-ofetch/import-file-extension-ts/client/client.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport { ofetch, type ResponseType as OfetchResponseType } from 'ofetch';\n\nimport { createSseClient } from '../core/serverSentEvents.gen.ts';\nimport type { HttpMethod } from '../core/types.gen.ts';\nimport { getValidRequestBody } from '../core/utils.gen.ts';\nimport type { Client, Config, RequestOptions, ResolvedRequestOptions } from './types.gen.ts';\nimport {\n  buildOfetchOptions,\n  buildUrl,\n  createConfig,\n  createInterceptors,\n  isRepeatableBody,\n  mapParseAsToResponseType,\n  mergeConfigs,\n  mergeHeaders,\n  parseError,\n  parseSuccess,\n  setAuthParams,\n  wrapDataReturn,\n  wrapErrorReturn,\n} from './utils.gen.ts';\n\ntype ReqInit = Omit<RequestInit, 'body' | 'headers'> & {\n  body?: BodyInit | null | undefined;\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  // precompute serialized / network body\n  const resolveOptions = async (options: RequestOptions) => {\n    const opts = {\n      ..._config,\n      ...options,\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 if body is empty to avoid invalid requests\n    if (opts.body === undefined || opts.serializedBody === '') {\n      opts.headers.delete('Content-Type');\n    }\n\n    // if a raw body is provided (no serializer), adjust Content-Type only when it\n    // equals the default JSON value to better match the concrete body type\n    if (\n      opts.body !== undefined &&\n      opts.bodySerializer === null &&\n      (opts.headers.get('Content-Type') || '').toLowerCase() === 'application/json'\n    ) {\n      const b: unknown = opts.body;\n      if (typeof FormData !== 'undefined' && b instanceof FormData) {\n        // let the runtime set the multipart boundary\n        opts.headers.delete('Content-Type');\n      } else if (typeof URLSearchParams !== 'undefined' && b instanceof URLSearchParams) {\n        // standard urlencoded content type (+ charset)\n        opts.headers.set('Content-Type', 'application/x-www-form-urlencoded;charset=UTF-8');\n      } else if (typeof Blob !== 'undefined' && b instanceof Blob) {\n        const t = b.type?.trim();\n        if (t) {\n          opts.headers.set('Content-Type', t);\n        } else {\n          // unknown blob type: avoid sending a misleading JSON header\n          opts.headers.delete('Content-Type');\n        }\n      }\n    }\n\n    // precompute network body (stability for retries and interceptors)\n    const networkBody = getValidRequestBody(opts) as RequestInit['body'] | null | undefined;\n\n    const url = buildUrl(opts);\n\n    return { networkBody, opts, url };\n  };\n\n  // apply request interceptors and mirror header/method/signal back to opts\n  const applyRequestInterceptors = async (\n    request: Request,\n    opts: ResolvedRequestOptions,\n    body: BodyInit | null | undefined,\n  ) => {\n    for (const fn of interceptors.request.fns) {\n      if (fn) {\n        request = await fn(request, opts);\n      }\n    }\n    // reflect interceptor changes into opts used by the network layer\n    opts.headers = request.headers;\n    opts.method = request.method as Uppercase<HttpMethod>;\n    // ignore request.body changes to avoid turning serialized bodies into streams\n    // body comes only from getValidRequestBody(options)\n    // reflect signal if present\n    opts.signal = (request as any).signal as AbortSignal | undefined;\n\n    // When body is FormData, remove Content-Type header to avoid boundary mismatch.\n    // Note: We already delete Content-Type in resolveOptions for FormData, but the\n    // Request constructor (line 175) re-adds it with an auto-generated boundary.\n    // Since we pass the original FormData (not the Request's body) to ofetch, and\n    // ofetch will generate its own boundary, we must remove the Request's Content-Type\n    // to let ofetch set the correct one. Otherwise the boundary in the header won't\n    // match the boundary in the actual multipart body sent by ofetch.\n    if (typeof FormData !== 'undefined' && body instanceof FormData) {\n      opts.headers.delete('Content-Type');\n    }\n\n    return request;\n  };\n\n  // build ofetch options with stable retry logic based on body repeatability\n  const buildNetworkOptions = (\n    opts: ResolvedRequestOptions,\n    body: BodyInit | null | undefined,\n    responseType: OfetchResponseType | undefined,\n  ) => {\n    const effectiveRetry = isRepeatableBody(body) ? (opts.retry as any) : (0 as any);\n    return buildOfetchOptions(opts, body, responseType, effectiveRetry);\n  };\n\n  const request: Client['request'] = async (options) => {\n    const { networkBody: initialNetworkBody, opts, url } = await resolveOptions(options as any);\n    // map parseAs -> ofetch responseType once per request\n    const ofetchResponseType: OfetchResponseType | undefined = mapParseAsToResponseType(\n      opts.parseAs,\n      opts.responseType,\n    );\n\n    const $ofetch = opts.ofetch ?? ofetch;\n\n    // create Request before network to run middleware consistently\n    const networkBody = initialNetworkBody;\n    const requestInit: ReqInit = {\n      body: networkBody,\n      headers: opts.headers as Headers,\n      method: opts.method,\n      redirect: 'follow',\n      signal: opts.signal,\n    };\n    let request = new Request(url, requestInit);\n\n    request = await applyRequestInterceptors(request, opts, networkBody);\n    const finalUrl = request.url;\n\n    // build ofetch options and perform the request (.raw keeps the Response)\n    const responseOptions = buildNetworkOptions(\n      opts as ResolvedRequestOptions,\n      networkBody,\n      ofetchResponseType,\n    );\n\n    let response = await $ofetch.raw(finalUrl, responseOptions);\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 = { request, response };\n\n    if (response.ok) {\n      const data = await parseSuccess(response, opts, ofetchResponseType);\n      return wrapDataReturn(data, result, opts.responseStyle);\n    }\n\n    let finalError = await parseError(response);\n\n    for (const fn of interceptors.error.fns) {\n      if (fn) {\n        finalError = await fn(finalError, response, request, opts);\n      }\n    }\n\n    // ensure error is never undefined after interceptors\n    finalError = (finalError as any) || ({} as string);\n\n    if (opts.throwOnError) {\n      throw finalError;\n    }\n\n    return wrapErrorReturn(finalError, result, opts.responseStyle) as any;\n  };\n\n  const makeMethodFn = (method: Uppercase<HttpMethod>) => (options: RequestOptions) =>\n    request({ ...options, method } as any);\n\n  const makeSseFn = (method: Uppercase<HttpMethod>) => async (options: RequestOptions) => {\n    const { networkBody, opts, url } = await resolveOptions(options);\n    const optsForSse: any = { ...opts };\n    delete optsForSse.body; // body is provided via serializedBody below\n    return createSseClient({\n      ...optsForSse,\n      fetch: opts.fetch,\n      headers: opts.headers as Headers,\n      method,\n      onRequest: async (url, init) => {\n        let request = new Request(url, init);\n        request = await applyRequestInterceptors(request, opts, networkBody);\n        return request;\n      },\n      serializedBody: networkBody as BodyInit | null | undefined,\n      signal: opts.signal,\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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-ofetch/import-file-extension-ts/client/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type { Auth } from '../core/auth.gen.ts';\nexport type { QuerySerializerOptions } from '../core/bodySerializer.gen.ts';\nexport {\n  formDataBodySerializer,\n  jsonBodySerializer,\n  urlSearchParamsBodySerializer,\n} from '../core/bodySerializer.gen.ts';\nexport { buildClientParams } from '../core/params.gen.ts';\nexport { serializeQueryKeyValue } from '../core/queryKeySerializer.gen.ts';\nexport { createClient } from './client.gen.ts';\nexport type {\n  Client,\n  ClientOptions,\n  Config,\n  CreateClientConfig,\n  Options,\n  RequestOptions,\n  RequestResult,\n  ResolvedRequestOptions,\n  ResponseStyle,\n  TDataShape,\n} from './types.gen.ts';\nexport { createConfig, mergeHeaders } from './utils.gen.ts';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-ofetch/import-file-extension-ts/client/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { FetchOptions as OfetchOptions, ResponseType as OfetchResponseType } from 'ofetch';\nimport type { ofetch } from 'ofetch';\n\nimport type { Auth } from '../core/auth.gen.ts';\nimport type {\n  ServerSentEventsOptions,\n  ServerSentEventsResult,\n} from '../core/serverSentEvents.gen.ts';\nimport type { Client as CoreClient, Config as CoreConfig } from '../core/types.gen.ts';\nimport type { Middleware } from './utils.gen.ts';\n\nexport type ResponseStyle = 'data' | 'fields';\n\nexport interface Config<T extends ClientOptions = ClientOptions>\n  extends Omit<RequestInit, 'body' | 'headers' | 'method'>, CoreConfig {\n  /**\n   * HTTP(S) agent configuration (Node.js only). Passed through to ofetch.\n   */\n  agent?: OfetchOptions['agent'];\n  /**\n   * Base URL for all requests made by this client.\n   */\n  baseUrl?: T['baseUrl'];\n  /**\n   * Node-only proxy/agent options.\n   */\n  dispatcher?: OfetchOptions['dispatcher'];\n  /**\n   * Fetch API implementation. Used for SSE streaming. You can use this option\n   * to provide a custom fetch instance.\n   *\n   * @default globalThis.fetch\n   */\n  fetch?: typeof fetch;\n  /**\n   * Controls the native ofetch behaviour that throws `FetchError` when\n   * `response.ok === false`. We default to suppressing it to match the fetch\n   * client semantics and let `throwOnError` drive the outcome.\n   */\n  ignoreResponseError?: OfetchOptions['ignoreResponseError'];\n  // No custom fetch option: provide custom instance via `ofetch` instead\n  /**\n   * Please don't use the Fetch client for Next.js applications. The `next`\n   * options won't have any effect.\n   *\n   * Install {@link https://www.npmjs.com/package/@hey-api/client-next `@hey-api/client-next`} instead.\n   */\n  next?: never;\n  /**\n   * Custom ofetch instance created via `ofetch.create()`. If provided, it will\n   * be used for requests instead of the default `ofetch` export.\n   */\n  ofetch?: typeof ofetch;\n  /**\n   * ofetch hook called before a request is sent.\n   */\n  onRequest?: OfetchOptions['onRequest'];\n  /**\n   * ofetch hook called when a request fails before receiving a response\n   * (e.g., network errors or aborted requests).\n   */\n  onRequestError?: OfetchOptions['onRequestError'];\n  /**\n   * ofetch hook called after a successful response is received and parsed.\n   */\n  onResponse?: OfetchOptions['onResponse'];\n  /**\n   * ofetch hook called when the response indicates an error (non-ok status)\n   * or when response parsing fails.\n   */\n  onResponseError?: OfetchOptions['onResponseError'];\n  /**\n   * Return the response data parsed in a specified format. By default, `auto`\n   * will infer the appropriate method from the `Content-Type` response header.\n   * You can override this behavior with any of the {@link Body} methods.\n   * Select `stream` if you don't want to parse response data at all.\n   *\n   * @default 'auto'\n   */\n  parseAs?: 'arrayBuffer' | 'auto' | 'blob' | 'formData' | 'json' | 'stream' | 'text';\n  /** Custom response parser (ofetch). */\n  parseResponse?: OfetchOptions['parseResponse'];\n  /**\n   * Should we return only data or multiple fields (data, error, response, etc.)?\n   *\n   * @default 'fields'\n   */\n  responseStyle?: ResponseStyle;\n  /**\n   * ofetch responseType override. If provided, it will be passed directly to\n   * ofetch and take precedence over `parseAs`.\n   */\n  responseType?: OfetchResponseType;\n  /**\n   * Automatically retry failed requests.\n   */\n  retry?: OfetchOptions['retry'];\n  /**\n   * Delay (in ms) between retry attempts.\n   */\n  retryDelay?: OfetchOptions['retryDelay'];\n  /**\n   * HTTP status codes that should trigger a retry.\n   */\n  retryStatusCodes?: OfetchOptions['retryStatusCodes'];\n  /**\n   * Throw an error instead of returning it in the response?\n   *\n   * @default false\n   */\n  throwOnError?: T['throwOnError'];\n  /**\n   * Abort the request after the given milliseconds.\n   */\n  timeout?: number;\n}\n\nexport interface RequestOptions<\n  TData = unknown,\n  TResponseStyle extends ResponseStyle = 'fields',\n  ThrowOnError extends boolean = boolean,\n  Url extends string = string,\n>\n  extends\n    Config<{\n      responseStyle: TResponseStyle;\n      throwOnError: ThrowOnError;\n    }>,\n    Pick<\n      ServerSentEventsOptions<TData>,\n      | 'onSseError'\n      | 'onSseEvent'\n      | 'sseDefaultRetryDelay'\n      | 'sseMaxRetryAttempts'\n      | 'sseMaxRetryDelay'\n    > {\n  /**\n   * Any body that you want to add to your request.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/fetch#body}\n   */\n  body?: unknown;\n  path?: Record<string, unknown>;\n  query?: Record<string, unknown>;\n  /**\n   * Security mechanism(s) to use for the request.\n   */\n  security?: ReadonlyArray<Auth>;\n  url: Url;\n}\n\nexport interface ResolvedRequestOptions<\n  TResponseStyle extends ResponseStyle = 'fields',\n  ThrowOnError extends boolean = boolean,\n  Url extends string = string,\n> extends RequestOptions<unknown, TResponseStyle, ThrowOnError, Url> {\n  serializedBody?: string;\n}\n\nexport type RequestResult<\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = boolean,\n  TResponseStyle extends ResponseStyle = 'fields',\n> = ThrowOnError extends true\n  ? Promise<\n      TResponseStyle extends 'data'\n        ? TData extends Record<string, unknown>\n          ? TData[keyof TData]\n          : TData\n        : {\n            data: TData extends Record<string, unknown> ? TData[keyof TData] : TData;\n            request: Request;\n            response: Response;\n          }\n    >\n  : Promise<\n      TResponseStyle extends 'data'\n        ? (TData extends Record<string, unknown> ? TData[keyof TData] : TData) | undefined\n        : (\n            | {\n                data: TData extends Record<string, unknown> ? TData[keyof TData] : TData;\n                error: undefined;\n              }\n            | {\n                data: undefined;\n                error: TError extends Record<string, unknown> ? TError[keyof TError] : TError;\n              }\n          ) & {\n            request: Request;\n            response: Response;\n          }\n    >;\n\nexport interface ClientOptions {\n  baseUrl?: string;\n  responseStyle?: ResponseStyle;\n  throwOnError?: boolean;\n}\n\ntype MethodFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'>,\n) => RequestResult<TData, TError, ThrowOnError, TResponseStyle>;\n\ntype SseFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'>,\n) => Promise<ServerSentEventsResult<TData, TError>>;\n\ntype RequestFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'> &\n    Pick<Required<RequestOptions<TData, TResponseStyle, ThrowOnError>>, 'method'>,\n) => RequestResult<TData, TError, ThrowOnError, TResponseStyle>;\n\ntype BuildUrlFn = <\n  TData extends {\n    body?: unknown;\n    path?: Record<string, unknown>;\n    query?: Record<string, unknown>;\n    url: string;\n  },\n>(\n  options: TData & Options<TData>,\n) => string;\n\nexport type Client = CoreClient<RequestFn, Config, MethodFn, BuildUrlFn, SseFn> & {\n  interceptors: Middleware<Request, Response, unknown, ResolvedRequestOptions>;\n};\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 = ClientOptions> = (\n  override?: Config<ClientOptions & T>,\n) => Config<Required<ClientOptions> & T>;\n\nexport interface TDataShape {\n  body?: unknown;\n  headers?: unknown;\n  path?: unknown;\n  query?: unknown;\n  url: string;\n}\n\ntype OmitKeys<T, K> = Pick<T, Exclude<keyof T, K>>;\n\nexport type Options<\n  TData extends TDataShape = TDataShape,\n  ThrowOnError extends boolean = boolean,\n  TResponse = unknown,\n  TResponseStyle extends ResponseStyle = 'fields',\n> = OmitKeys<\n  RequestOptions<TResponse, TResponseStyle, ThrowOnError>,\n  'body' | 'path' | 'query' | 'url'\n> &\n  ([TData] extends [never] ? unknown : Omit<TData, 'url'>);\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-ofetch/import-file-extension-ts/client/utils.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { FetchOptions as OfetchOptions, ResponseType as OfetchResponseType } from 'ofetch';\n\nimport { getAuthToken } from '../core/auth.gen.ts';\nimport type { QuerySerializerOptions } from '../core/bodySerializer.gen.ts';\nimport { jsonBodySerializer } from '../core/bodySerializer.gen.ts';\nimport {\n  serializeArrayParam,\n  serializeObjectParam,\n  serializePrimitiveParam,\n} from '../core/pathSerializer.gen.ts';\nimport { getUrl } from '../core/utils.gen.ts';\nimport type {\n  Client,\n  ClientOptions,\n  Config,\n  RequestOptions,\n  ResolvedRequestOptions,\n  ResponseStyle,\n} from './types.gen.ts';\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\n/**\n * Map our parseAs value to ofetch responseType when not explicitly provided.\n */\nexport const mapParseAsToResponseType = (\n  parseAs: Config['parseAs'] | undefined,\n  explicit?: OfetchResponseType,\n): OfetchResponseType | undefined => {\n  if (explicit) return explicit;\n  switch (parseAs) {\n    case 'arrayBuffer':\n    case 'blob':\n    case 'json':\n    case 'text':\n    case 'stream':\n      return parseAs;\n    case 'formData':\n    case 'auto':\n    default:\n      return undefined; // let ofetch auto-detect\n  }\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\n/**\n * Heuristic to detect whether a request body can be safely retried.\n */\nexport const isRepeatableBody = (body: unknown): boolean => {\n  if (body == null) return true; // undefined/null treated as no-body\n  if (typeof body === 'string') return true;\n  if (typeof URLSearchParams !== 'undefined' && body instanceof URLSearchParams) return true;\n  if (typeof Uint8Array !== 'undefined' && body instanceof Uint8Array) return true;\n  if (typeof ArrayBuffer !== 'undefined' && body instanceof ArrayBuffer) return true;\n  if (typeof Blob !== 'undefined' && body instanceof Blob) return true;\n  if (typeof FormData !== 'undefined' && body instanceof FormData) return true;\n  // Streams are not repeatable\n  if (typeof ReadableStream !== 'undefined' && body instanceof ReadableStream) return false;\n  // Default: assume non-repeatable for unknown structured bodies\n  return false;\n};\n\n/**\n * Small helper to unify data vs fields return style.\n */\nexport const wrapDataReturn = <T>(\n  data: T,\n  result: { request: Request; response: Response },\n  responseStyle: ResponseStyle | undefined,\n): T | ((T extends Record<string, unknown> ? { data: T } : { data: T }) & typeof result) =>\n  (responseStyle ?? 'fields') === 'data' ? (data as any) : ({ data, ...result } as any);\n\n/**\n * Small helper to unify error vs fields return style.\n */\nexport const wrapErrorReturn = <E>(\n  error: E,\n  result: { request: Request; response: Response },\n  responseStyle: ResponseStyle | undefined,\n):\n  | undefined\n  | ((E extends Record<string, unknown> ? { error: E } : { error: E }) & typeof result) =>\n  (responseStyle ?? 'fields') === 'data' ? undefined : ({ error, ...result } as any);\n\n/**\n * Build options for $ofetch.raw from our resolved opts and body.\n */\nexport const buildOfetchOptions = (\n  opts: ResolvedRequestOptions,\n  body: BodyInit | null | undefined,\n  responseType: OfetchResponseType | undefined,\n  retryOverride?: OfetchOptions['retry'],\n): OfetchOptions =>\n  ({\n    agent: opts.agent as OfetchOptions['agent'],\n    body,\n    credentials: opts.credentials as OfetchOptions['credentials'],\n    dispatcher: opts.dispatcher as OfetchOptions['dispatcher'],\n    headers: opts.headers as Headers,\n    ignoreResponseError: (opts.ignoreResponseError as OfetchOptions['ignoreResponseError']) ?? true,\n    method: opts.method,\n    onRequest: opts.onRequest as OfetchOptions['onRequest'],\n    onRequestError: opts.onRequestError as OfetchOptions['onRequestError'],\n    onResponse: opts.onResponse as OfetchOptions['onResponse'],\n    onResponseError: opts.onResponseError as OfetchOptions['onResponseError'],\n    parseResponse: opts.parseResponse as OfetchOptions['parseResponse'],\n    // URL already includes query\n    query: undefined,\n    responseType,\n    retry: retryOverride ?? (opts.retry as OfetchOptions['retry']),\n    retryDelay: opts.retryDelay as OfetchOptions['retryDelay'],\n    retryStatusCodes: opts.retryStatusCodes as OfetchOptions['retryStatusCodes'],\n    signal: opts.signal,\n    timeout: opts.timeout as number | undefined,\n  }) as OfetchOptions;\n\n/**\n * Parse a successful response, handling empty bodies and stream cases.\n */\nexport const parseSuccess = async (\n  response: Response,\n  opts: ResolvedRequestOptions,\n  ofetchResponseType?: OfetchResponseType,\n): Promise<unknown> => {\n  // Stream requested: return stream body\n  if (ofetchResponseType === 'stream') {\n    return response.body;\n  }\n\n  const inferredParseAs =\n    (opts.parseAs === 'auto' ? getParseAs(response.headers.get('Content-Type')) : opts.parseAs) ??\n    'json';\n\n  // Handle empty responses\n  if (response.status === 204 || response.headers.get('Content-Length') === '0') {\n    switch (inferredParseAs) {\n      case 'arrayBuffer':\n      case 'blob':\n      case 'text':\n        return await (response as any)[inferredParseAs]();\n      case 'formData':\n        return new FormData();\n      case 'stream':\n        return response.body;\n      default:\n        return {};\n    }\n  }\n\n  // Prefer ofetch-populated data unless we explicitly need raw `formData`\n  let data: unknown = (response as any)._data;\n  if (inferredParseAs === 'formData' || typeof data === 'undefined') {\n    switch (inferredParseAs) {\n      case 'arrayBuffer':\n      case 'blob':\n      case 'formData':\n      case 'text':\n        data = await (response as any)[inferredParseAs]();\n        break;\n      case 'json': {\n        // Some servers return 200 with no Content-Length and empty body.\n        // response.json() would throw; detect empty via clone().text() first.\n        const txt = await response.clone().text();\n        if (!txt) {\n          data = {};\n        } else {\n          data = await (response as any).json();\n        }\n        break;\n      }\n      case 'stream':\n        return response.body;\n    }\n  }\n\n  if (inferredParseAs === 'json') {\n    if (opts.responseValidator) {\n      await opts.responseValidator(data);\n    }\n    if (opts.responseTransformer) {\n      data = await opts.responseTransformer(data);\n    }\n  }\n\n  return data;\n};\n\n/**\n * Parse an error response payload.\n */\nexport const parseError = async (response: Response): Promise<unknown> => {\n  let error: unknown = (response as any)._data;\n  if (typeof error === 'undefined') {\n    const textError = await response.text();\n    try {\n      error = JSON.parse(textError);\n    } catch {\n      error = textError;\n    }\n  }\n  return error ?? ({} as string);\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  ignoreResponseError: true,\n  parseAs: 'auto',\n  querySerializer: defaultQuerySerializer,\n  ...override,\n});\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-ofetch/import-file-extension-ts/client.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport { type ClientOptions, type Config, createClient, createConfig } from './client/index.ts';\nimport type { ClientOptions as ClientOptions2 } from './types.gen.ts';\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: 'http://localhost:3000/base' }));\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-ofetch/import-file-extension-ts/core/auth.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-ofetch/import-file-extension-ts/core/bodySerializer.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { ArrayStyle, ObjectStyle, SerializerOptions } from './pathSerializer.gen.ts';\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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-ofetch/import-file-extension-ts/core/params.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-ofetch/import-file-extension-ts/core/pathSerializer.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-ofetch/import-file-extension-ts/core/queryKeySerializer.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\n/**\n * JSON-friendly union that mirrors what Pinia Colada can hash.\n */\nexport type JsonValue =\n  | null\n  | string\n  | number\n  | boolean\n  | JsonValue[]\n  | { [key: string]: JsonValue };\n\n/**\n * Replacer that converts non-JSON values (bigint, Date, etc.) to safe substitutes.\n */\nexport const queryKeyJsonReplacer = (_key: string, value: unknown) => {\n  if (value === undefined || typeof value === 'function' || typeof value === 'symbol') {\n    return undefined;\n  }\n  if (typeof value === 'bigint') {\n    return value.toString();\n  }\n  if (value instanceof Date) {\n    return value.toISOString();\n  }\n  return value;\n};\n\n/**\n * Safely stringifies a value and parses it back into a JsonValue.\n */\nexport const stringifyToJsonValue = (input: unknown): JsonValue | undefined => {\n  try {\n    const json = JSON.stringify(input, queryKeyJsonReplacer);\n    if (json === undefined) {\n      return undefined;\n    }\n    return JSON.parse(json) as JsonValue;\n  } catch {\n    return undefined;\n  }\n};\n\n/**\n * Detects plain objects (including objects with a null prototype).\n */\nconst isPlainObject = (value: unknown): value is Record<string, unknown> => {\n  if (value === null || typeof value !== 'object') {\n    return false;\n  }\n  const prototype = Object.getPrototypeOf(value as object);\n  return prototype === Object.prototype || prototype === null;\n};\n\n/**\n * Turns URLSearchParams into a sorted JSON object for deterministic keys.\n */\nconst serializeSearchParams = (params: URLSearchParams): JsonValue => {\n  const entries = Array.from(params.entries()).sort(([a], [b]) => a.localeCompare(b));\n  const result: Record<string, JsonValue> = {};\n\n  for (const [key, value] of entries) {\n    const existing = result[key];\n    if (existing === undefined) {\n      result[key] = value;\n      continue;\n    }\n\n    if (Array.isArray(existing)) {\n      (existing as string[]).push(value);\n    } else {\n      result[key] = [existing, value];\n    }\n  }\n\n  return result;\n};\n\n/**\n * Normalizes any accepted value into a JSON-friendly shape for query keys.\n */\nexport const serializeQueryKeyValue = (value: unknown): JsonValue | undefined => {\n  if (value === null) {\n    return null;\n  }\n\n  if (typeof value === 'string' || typeof value === 'number' || typeof value === 'boolean') {\n    return value;\n  }\n\n  if (value === undefined || typeof value === 'function' || typeof value === 'symbol') {\n    return undefined;\n  }\n\n  if (typeof value === 'bigint') {\n    return value.toString();\n  }\n\n  if (value instanceof Date) {\n    return value.toISOString();\n  }\n\n  if (Array.isArray(value)) {\n    return stringifyToJsonValue(value);\n  }\n\n  if (typeof URLSearchParams !== 'undefined' && value instanceof URLSearchParams) {\n    return serializeSearchParams(value);\n  }\n\n  if (isPlainObject(value)) {\n    return stringifyToJsonValue(value);\n  }\n\n  return undefined;\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-ofetch/import-file-extension-ts/core/serverSentEvents.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { Config } from './types.gen.ts';\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 const 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            // Normalize line endings: CRLF -> LF, then CR -> LF\n            buffer = buffer.replace(/\\r\\n/g, '\\n').replace(/\\r/g, '\\n');\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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-ofetch/import-file-extension-ts/core/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { Auth, AuthToken } from './auth.gen.ts';\nimport type { BodySerializer, QuerySerializer, QuerySerializerOptions } from './bodySerializer.gen.ts';\n\nexport type HttpMethod =\n  | 'connect'\n  | 'delete'\n  | 'get'\n  | 'head'\n  | 'options'\n  | 'patch'\n  | 'post'\n  | 'put'\n  | 'trace';\n\nexport type Client<\n  RequestFn = never,\n  Config = unknown,\n  MethodFn = never,\n  BuildUrlFn = never,\n  SseFn = never,\n> = {\n  /**\n   * Returns the final request URL.\n   */\n  buildUrl: BuildUrlFn;\n  getConfig: () => Config;\n  request: RequestFn;\n  setConfig: (config: Config) => Config;\n} & {\n  [K in HttpMethod]: MethodFn;\n} & ([SseFn] extends [never] ? { sse?: never } : { sse: { [K in HttpMethod]: SseFn } });\n\nexport interface Config {\n  /**\n   * Auth token or a function returning auth token. The resolved value will be\n   * added to the request payload as defined by its `security` array.\n   */\n  auth?: ((auth: Auth) => Promise<AuthToken> | AuthToken) | AuthToken;\n  /**\n   * A function for serializing request body parameter. By default,\n   * {@link JSON.stringify()} will be used.\n   */\n  bodySerializer?: BodySerializer | null;\n  /**\n   * An object containing any HTTP headers that you want to pre-populate your\n   * `Headers` object with.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/Headers/Headers#init See more}\n   */\n  headers?:\n    | RequestInit['headers']\n    | Record<\n        string,\n        string | number | boolean | (string | number | boolean)[] | null | undefined | unknown\n      >;\n  /**\n   * The request method.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/fetch#method See more}\n   */\n  method?: Uppercase<HttpMethod>;\n  /**\n   * A function for serializing request query parameters. By default, arrays\n   * will be exploded in form style, objects will be exploded in deepObject\n   * style, and reserved characters are percent-encoded.\n   *\n   * This method will have no effect if the native `paramsSerializer()` Axios\n   * API function is used.\n   *\n   * {@link https://swagger.io/docs/specification/serialization/#query View examples}\n   */\n  querySerializer?: QuerySerializer | QuerySerializerOptions;\n  /**\n   * A function validating request data. This is useful if you want to ensure\n   * the request conforms to the desired shape, so it can be safely sent to\n   * the server.\n   */\n  requestValidator?: (data: unknown) => Promise<unknown>;\n  /**\n   * A function transforming response data before it's returned. This is useful\n   * for post-processing data, e.g. converting ISO strings into Date objects.\n   */\n  responseTransformer?: (data: unknown) => Promise<unknown>;\n  /**\n   * A function validating response data. This is useful if you want to ensure\n   * the response conforms to the desired shape, so it can be safely passed to\n   * the transformers and returned to the user.\n   */\n  responseValidator?: (data: unknown) => Promise<unknown>;\n}\n\ntype IsExactlyNeverOrNeverUndefined<T> = [T] extends [never]\n  ? true\n  : [T] extends [never | undefined]\n    ? [undefined] extends [T]\n      ? false\n      : true\n    : false;\n\nexport type OmitNever<T extends Record<string, unknown>> = {\n  [K in keyof T as IsExactlyNeverOrNeverUndefined<T[K]> extends true ? never : K]: T[K];\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-ofetch/import-file-extension-ts/core/utils.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { BodySerializer, QuerySerializer } from './bodySerializer.gen.ts';\nimport {\n  type ArraySeparatorStyle,\n  serializeArrayParam,\n  serializeObjectParam,\n  serializePrimitiveParam,\n} from './pathSerializer.gen.ts';\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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-ofetch/import-file-extension-ts/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport { apiVVersionODataControllerCount, callToTestOrderOfParams, callWithDefaultOptionalParameters, callWithDefaultParameters, callWithDescriptions, callWithDuplicateResponses, callWithNoContentResponse, callWithParameters, callWithResponse, callWithResponseAndNoContentResponse, callWithResponses, callWithResultFromHeader, callWithWeirdParameterNames, collectionFormat, complexParams, complexTypes, deleteCallWithoutParametersAndResponse, deleteFoo, deprecatedCall, dummyA, dummyB, duplicateName, duplicateName2, duplicateName3, duplicateName4, export_, fileResponse, fooWow, getApiVbyApiVersionSimpleOperation, getCallWithOptionalParam, getCallWithoutParametersAndResponse, headCallWithoutParametersAndResponse, import_, multipartRequest, multipartResponse, nonAsciiæøåÆøÅöôêÊ字符串, type Options, optionsCallWithoutParametersAndResponse, patchApiVbyApiVersionNoTag, patchCallWithoutParametersAndResponse, postApiVbyApiVersionFormData, postApiVbyApiVersionRequestBody, postCallWithOptionalParam, postCallWithoutParametersAndResponse, putCallWithoutParametersAndResponse, putWithFormUrlEncoded, testErrorCode, types, uploadFile } from './sdk.gen.ts';\nexport type { _3eNum1Период, _400, AdditionalPropertiesIntegerIssue, AdditionalPropertiesUnknownIssue, AdditionalPropertiesUnknownIssue2, AdditionalPropertiesUnknownIssue3, AdditionalPropertiesUnknownIssueWritable, AnyOfAnyAndNull, AnyOfArrays, ApiVVersionODataControllerCountData, ApiVVersionODataControllerCountResponse, ApiVVersionODataControllerCountResponses, ArrayWithAnyOfProperties, ArrayWithArray, ArrayWithBooleans, ArrayWithNumbers, ArrayWithProperties, ArrayWithReferences, ArrayWithStrings, CallToTestOrderOfParamsData, CallWithDefaultOptionalParametersData, CallWithDefaultParametersData, CallWithDescriptionsData, CallWithDuplicateResponsesData, CallWithDuplicateResponsesError, CallWithDuplicateResponsesErrors, CallWithDuplicateResponsesResponse, CallWithDuplicateResponsesResponses, CallWithNoContentResponseData, CallWithNoContentResponseResponse, CallWithNoContentResponseResponses, CallWithParametersData, CallWithResponseAndNoContentResponseData, CallWithResponseAndNoContentResponseResponse, CallWithResponseAndNoContentResponseResponses, CallWithResponseData, CallWithResponseResponse, CallWithResponseResponses, CallWithResponsesData, CallWithResponsesError, CallWithResponsesErrors, CallWithResponsesResponse, CallWithResponsesResponses, CallWithResultFromHeaderData, CallWithResultFromHeaderErrors, CallWithResultFromHeaderResponses, CallWithWeirdParameterNamesData, CamelCaseCommentWithBreaks, CharactersInDescription, ClientOptions, CollectionFormatData, CommentWithBackticks, CommentWithBackticksAndQuotes, CommentWithBreaks, CommentWithExpressionPlaceholders, CommentWithQuotes, CommentWithReservedCharacters, CommentWithSlashes, ComplexParamsData, ComplexParamsResponse, ComplexParamsResponses, ComplexTypesData, ComplexTypesErrors, ComplexTypesResponse, ComplexTypesResponses, CompositionBaseModel, CompositionExtendedModel, CompositionWithAllOfAndNullable, CompositionWithAnyOf, CompositionWithAnyOfAndNullable, CompositionWithAnyOfAnonymous, CompositionWithNestedAnyAndTypeNull, CompositionWithNestedAnyOfAndNull, CompositionWithOneOf, CompositionWithOneOfAndComplexArrayDictionary, CompositionWithOneOfAndNullable, CompositionWithOneOfAndProperties, CompositionWithOneOfAndSimpleArrayDictionary, CompositionWithOneOfAndSimpleDictionary, CompositionWithOneOfAnonymous, CompositionWithOneOfDiscriminator, ConstValue, Default, DeleteCallWithoutParametersAndResponseData, DeleteFooData, DeleteFooData2, DeleteFooData3, DeprecatedCallData, DeprecatedModel, DictionaryWithArray, DictionaryWithDictionary, DictionaryWithProperties, DictionaryWithPropertiesAndAdditionalProperties, DictionaryWithReference, DictionaryWithString, DummyAData, DummyAResponse, DummyAResponses, DummyBData, DummyBResponse, DummyBResponses, DuplicateName2Data, DuplicateName3Data, DuplicateName4Data, DuplicateNameData, EnumFromDescription, EnumWithExtensions, EnumWithNumbers, EnumWithReplacedCharacters, EnumWithStrings, EnumWithXEnumNames, ExportData, ExternalRefA, ExternalRefB, ExternalSharedModel, File, FileResponseData, FileResponseResponse, FileResponseResponses, FileWritable, FooWowData, FooWowResponses, FreeFormObjectWithAdditionalPropertiesEqEmptyObject, FreeFormObjectWithAdditionalPropertiesEqTrue, FreeFormObjectWithoutAdditionalProperties, GenericSchemaDuplicateIssue1SystemBoolean, GenericSchemaDuplicateIssue1SystemBooleanWritable, GenericSchemaDuplicateIssue1SystemString, GenericSchemaDuplicateIssue1SystemStringWritable, GetApiVbyApiVersionSimpleOperationData, GetApiVbyApiVersionSimpleOperationError, GetApiVbyApiVersionSimpleOperationErrors, GetApiVbyApiVersionSimpleOperationResponse, GetApiVbyApiVersionSimpleOperationResponses, GetCallWithOptionalParamData, GetCallWithoutParametersAndResponseData, HeadCallWithoutParametersAndResponseData, Import, ImportData, ImportResponse, ImportResponses, IoK8sApimachineryPkgApisMetaV1DeleteOptions, IoK8sApimachineryPkgApisMetaV1Preconditions, ModelCircle, ModelFromZendesk, ModelSquare, ModelThatExtends, ModelThatExtendsExtends, ModelWithAdditionalPropertiesEqTrue, ModelWithAdditionalPropertiesRef, ModelWithAnyOfConstantSizeArray, ModelWithAnyOfConstantSizeArrayAndIntersect, ModelWithAnyOfConstantSizeArrayNullable, ModelWithAnyOfConstantSizeArrayWithNSizeAndOptions, ModelWithAnyOfConstantSizeArrayWithNSizeAndOptionsWritable, ModelWithArray, ModelWithArrayReadOnlyAndWriteOnly, ModelWithArrayReadOnlyAndWriteOnlyWritable, ModelWithBackticksInDescription, ModelWithBoolean, ModelWithCircularReference, ModelWithConst, ModelWithConstantSizeArray, ModelWithDictionary, ModelWithDuplicateImports, ModelWithDuplicateProperties, ModelWithEnum, ModelWithEnumFromDescription, ModelWithEnumWithHyphen, ModelWithInteger, ModelWithNestedArrayEnums, ModelWithNestedArrayEnumsData, ModelWithNestedArrayEnumsDataBar, ModelWithNestedArrayEnumsDataFoo, ModelWithNestedCompositionEnums, ModelWithNestedEnums, ModelWithNestedProperties, ModelWithNullableObject, ModelWithNullableString, ModelWithNumericEnumUnion, ModelWithOneOfAndProperties, ModelWithOneOfEnum, ModelWithOrderedProperties, ModelWithPattern, ModelWithPatternWritable, ModelWithPrefixItemsConstantSizeArray, ModelWithProperties, ModelWithPropertiesWritable, ModelWithReadOnlyAndWriteOnly, ModelWithReadOnlyAndWriteOnlyWritable, ModelWithReference, ModelWithReferenceWritable, ModelWithString, ModelWithStringError, MultipartRequestData, MultipartResponseData, MultipartResponseResponse, MultipartResponseResponses, NestedAnyOfArraysNullable, NonAsciiæøåÆøÅöôêÊ字符串Data, NonAsciiæøåÆøÅöôêÊ字符串Response, NonAsciiæøåÆøÅöôêÊ字符串Responses, NonAsciiStringæøåÆøÅöôêÊ字符串, NullableObject, OneOfAllOfIssue, OneOfAllOfIssueWritable, OptionsCallWithoutParametersAndResponseData, Pageable, ParameterSimpleParameterUnused, PatchApiVbyApiVersionNoTagData, PatchApiVbyApiVersionNoTagResponses, PatchCallWithoutParametersAndResponseData, PostApiVbyApiVersionFormDataData, PostApiVbyApiVersionRequestBodyData, PostCallWithOptionalParamData, PostCallWithOptionalParamResponse, PostCallWithOptionalParamResponses, PostCallWithoutParametersAndResponseData, PostServiceWithEmptyTagResponse, PostServiceWithEmptyTagResponse2, PutCallWithoutParametersAndResponseData, PutWithFormUrlEncodedData, SchemaWithFormRestrictedKeys, SimpleBoolean, SimpleFile, SimpleFormData, SimpleInteger, SimpleParameter, SimpleReference, SimpleRequestBody, SimpleString, SimpleStringWithPattern, TestErrorCodeData, TestErrorCodeErrors, TestErrorCodeResponses, TypesData, TypesResponse, TypesResponses, UploadFileData, UploadFileResponse, UploadFileResponses, XFooBar } from './types.gen.ts';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-ofetch/import-file-extension-ts/sdk.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport { client } from './client.gen.ts';\nimport { type Client, formDataBodySerializer, type Options as Options2, type TDataShape, urlSearchParamsBodySerializer } from './client/index.ts';\nimport type { ApiVVersionODataControllerCountData, ApiVVersionODataControllerCountResponses, CallToTestOrderOfParamsData, CallWithDefaultOptionalParametersData, CallWithDefaultParametersData, CallWithDescriptionsData, CallWithDuplicateResponsesData, CallWithDuplicateResponsesErrors, CallWithDuplicateResponsesResponses, CallWithNoContentResponseData, CallWithNoContentResponseResponses, CallWithParametersData, CallWithResponseAndNoContentResponseData, CallWithResponseAndNoContentResponseResponses, CallWithResponseData, CallWithResponseResponses, CallWithResponsesData, CallWithResponsesErrors, CallWithResponsesResponses, CallWithResultFromHeaderData, CallWithResultFromHeaderErrors, CallWithResultFromHeaderResponses, CallWithWeirdParameterNamesData, CollectionFormatData, ComplexParamsData, ComplexParamsResponses, ComplexTypesData, ComplexTypesErrors, ComplexTypesResponses, DeleteCallWithoutParametersAndResponseData, DeleteFooData3, DeprecatedCallData, DummyAData, DummyAResponses, DummyBData, DummyBResponses, DuplicateName2Data, DuplicateName3Data, DuplicateName4Data, DuplicateNameData, ExportData, FileResponseData, FileResponseResponses, FooWowData, FooWowResponses, GetApiVbyApiVersionSimpleOperationData, GetApiVbyApiVersionSimpleOperationErrors, GetApiVbyApiVersionSimpleOperationResponses, GetCallWithOptionalParamData, GetCallWithoutParametersAndResponseData, HeadCallWithoutParametersAndResponseData, ImportData, ImportResponses, MultipartRequestData, MultipartResponseData, MultipartResponseResponses, NonAsciiæøåÆøÅöôêÊ字符串Data, NonAsciiæøåÆøÅöôêÊ字符串Responses, OptionsCallWithoutParametersAndResponseData, PatchApiVbyApiVersionNoTagData, PatchApiVbyApiVersionNoTagResponses, PatchCallWithoutParametersAndResponseData, PostApiVbyApiVersionFormDataData, PostApiVbyApiVersionRequestBodyData, PostCallWithOptionalParamData, PostCallWithOptionalParamResponses, PostCallWithoutParametersAndResponseData, PutCallWithoutParametersAndResponseData, PutWithFormUrlEncodedData, TestErrorCodeData, TestErrorCodeErrors, TestErrorCodeResponses, TypesData, TypesResponses, UploadFileData, UploadFileResponses } from './types.gen.ts';\n\nexport type Options<TData extends TDataShape = TDataShape, ThrowOnError extends boolean = boolean> = Options2<TData, ThrowOnError> & {\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\nexport const export_ = <ThrowOnError extends boolean = false>(options?: Options<ExportData, ThrowOnError>) => (options?.client ?? client).get<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/no+tag', ...options });\n\nexport const patchApiVbyApiVersionNoTag = <ThrowOnError extends boolean = false>(options?: Options<PatchApiVbyApiVersionNoTagData, ThrowOnError>) => (options?.client ?? client).patch<PatchApiVbyApiVersionNoTagResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/no+tag', ...options });\n\nexport const import_ = <ThrowOnError extends boolean = false>(options: Options<ImportData, ThrowOnError>) => (options.client ?? client).post<ImportResponses, unknown, ThrowOnError>({\n    url: '/api/v{api-version}/no+tag',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options.headers\n    }\n});\n\nexport const fooWow = <ThrowOnError extends boolean = false>(options?: Options<FooWowData, ThrowOnError>) => (options?.client ?? client).put<FooWowResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/no+tag', ...options });\n\nexport const apiVVersionODataControllerCount = <ThrowOnError extends boolean = false>(options?: Options<ApiVVersionODataControllerCountData, ThrowOnError>) => (options?.client ?? client).get<ApiVVersionODataControllerCountResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple/$count', ...options });\n\nexport const getApiVbyApiVersionSimpleOperation = <ThrowOnError extends boolean = false>(options: Options<GetApiVbyApiVersionSimpleOperationData, ThrowOnError>) => (options.client ?? client).get<GetApiVbyApiVersionSimpleOperationResponses, GetApiVbyApiVersionSimpleOperationErrors, ThrowOnError>({ url: '/api/v{api-version}/simple:operation', ...options });\n\nexport const deleteCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<DeleteCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).delete<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const getCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<GetCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).get<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const headCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<HeadCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).head<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const optionsCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<OptionsCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).options<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const patchCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<PatchCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).patch<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const postCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<PostCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).post<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const putCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<PutCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).put<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const deleteFoo = <ThrowOnError extends boolean = false>(options: Options<DeleteFooData3, ThrowOnError>) => (options.client ?? client).delete<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/foo/{foo_param}/bar/{BarParam}', ...options });\n\nexport const callWithDescriptions = <ThrowOnError extends boolean = false>(options?: Options<CallWithDescriptionsData, ThrowOnError>) => (options?.client ?? client).post<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/descriptions', ...options });\n\n/**\n * @deprecated\n */\nexport const deprecatedCall = <ThrowOnError extends boolean = false>(options: Options<DeprecatedCallData, ThrowOnError>) => (options.client ?? client).post<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/parameters/deprecated', ...options });\n\nexport const callWithParameters = <ThrowOnError extends boolean = false>(options: Options<CallWithParametersData, ThrowOnError>) => (options.client ?? client).post<unknown, unknown, ThrowOnError>({\n    url: '/api/v{api-version}/parameters/{parameterPath}',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options.headers\n    }\n});\n\nexport const callWithWeirdParameterNames = <ThrowOnError extends boolean = false>(options: Options<CallWithWeirdParameterNamesData, ThrowOnError>) => (options.client ?? client).post<unknown, unknown, ThrowOnError>({\n    url: '/api/v{api-version}/parameters/{parameter.path.1}/{parameter-path-2}/{PARAMETER-PATH-3}',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options.headers\n    }\n});\n\nexport const getCallWithOptionalParam = <ThrowOnError extends boolean = false>(options: Options<GetCallWithOptionalParamData, ThrowOnError>) => (options.client ?? client).get<unknown, unknown, ThrowOnError>({\n    url: '/api/v{api-version}/parameters',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options.headers\n    }\n});\n\nexport const postCallWithOptionalParam = <ThrowOnError extends boolean = false>(options: Options<PostCallWithOptionalParamData, ThrowOnError>) => (options.client ?? client).post<PostCallWithOptionalParamResponses, unknown, ThrowOnError>({\n    url: '/api/v{api-version}/parameters',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options.headers\n    }\n});\n\nexport const postApiVbyApiVersionRequestBody = <ThrowOnError extends boolean = false>(options?: Options<PostApiVbyApiVersionRequestBodyData, ThrowOnError>) => (options?.client ?? client).post<unknown, unknown, ThrowOnError>({\n    url: '/api/v{api-version}/requestBody',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options?.headers\n    }\n});\n\nexport const postApiVbyApiVersionFormData = <ThrowOnError extends boolean = false>(options?: Options<PostApiVbyApiVersionFormDataData, ThrowOnError>) => (options?.client ?? client).post<unknown, unknown, ThrowOnError>({\n    ...formDataBodySerializer,\n    url: '/api/v{api-version}/formData',\n    ...options,\n    headers: {\n        'Content-Type': null,\n        ...options?.headers\n    }\n});\n\nexport const callWithDefaultParameters = <ThrowOnError extends boolean = false>(options?: Options<CallWithDefaultParametersData, ThrowOnError>) => (options?.client ?? client).get<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/defaults', ...options });\n\nexport const callWithDefaultOptionalParameters = <ThrowOnError extends boolean = false>(options?: Options<CallWithDefaultOptionalParametersData, ThrowOnError>) => (options?.client ?? client).post<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/defaults', ...options });\n\nexport const callToTestOrderOfParams = <ThrowOnError extends boolean = false>(options: Options<CallToTestOrderOfParamsData, ThrowOnError>) => (options.client ?? client).put<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/defaults', ...options });\n\nexport const duplicateName = <ThrowOnError extends boolean = false>(options?: Options<DuplicateNameData, ThrowOnError>) => (options?.client ?? client).delete<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/duplicate', ...options });\n\nexport const duplicateName2 = <ThrowOnError extends boolean = false>(options?: Options<DuplicateName2Data, ThrowOnError>) => (options?.client ?? client).get<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/duplicate', ...options });\n\nexport const duplicateName3 = <ThrowOnError extends boolean = false>(options?: Options<DuplicateName3Data, ThrowOnError>) => (options?.client ?? client).post<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/duplicate', ...options });\n\nexport const duplicateName4 = <ThrowOnError extends boolean = false>(options?: Options<DuplicateName4Data, ThrowOnError>) => (options?.client ?? client).put<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/duplicate', ...options });\n\nexport const callWithNoContentResponse = <ThrowOnError extends boolean = false>(options?: Options<CallWithNoContentResponseData, ThrowOnError>) => (options?.client ?? client).get<CallWithNoContentResponseResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/no-content', ...options });\n\nexport const callWithResponseAndNoContentResponse = <ThrowOnError extends boolean = false>(options?: Options<CallWithResponseAndNoContentResponseData, ThrowOnError>) => (options?.client ?? client).get<CallWithResponseAndNoContentResponseResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/multiple-tags/response-and-no-content', ...options });\n\nexport const dummyA = <ThrowOnError extends boolean = false>(options?: Options<DummyAData, ThrowOnError>) => (options?.client ?? client).get<DummyAResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/multiple-tags/a', ...options });\n\nexport const dummyB = <ThrowOnError extends boolean = false>(options?: Options<DummyBData, ThrowOnError>) => (options?.client ?? client).get<DummyBResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/multiple-tags/b', ...options });\n\nexport const callWithResponse = <ThrowOnError extends boolean = false>(options?: Options<CallWithResponseData, ThrowOnError>) => (options?.client ?? client).get<CallWithResponseResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/response', ...options });\n\nexport const callWithDuplicateResponses = <ThrowOnError extends boolean = false>(options?: Options<CallWithDuplicateResponsesData, ThrowOnError>) => (options?.client ?? client).post<CallWithDuplicateResponsesResponses, CallWithDuplicateResponsesErrors, ThrowOnError>({ url: '/api/v{api-version}/response', ...options });\n\nexport const callWithResponses = <ThrowOnError extends boolean = false>(options?: Options<CallWithResponsesData, ThrowOnError>) => (options?.client ?? client).put<CallWithResponsesResponses, CallWithResponsesErrors, ThrowOnError>({ url: '/api/v{api-version}/response', ...options });\n\nexport const collectionFormat = <ThrowOnError extends boolean = false>(options: Options<CollectionFormatData, ThrowOnError>) => (options.client ?? client).get<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/collectionFormat', ...options });\n\nexport const types = <ThrowOnError extends boolean = false>(options: Options<TypesData, ThrowOnError>) => (options.client ?? client).get<TypesResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/types', ...options });\n\nexport const uploadFile = <ThrowOnError extends boolean = false>(options: Options<UploadFileData, ThrowOnError>) => (options.client ?? client).post<UploadFileResponses, unknown, ThrowOnError>({\n    ...urlSearchParamsBodySerializer,\n    url: '/api/v{api-version}/upload',\n    ...options,\n    headers: {\n        'Content-Type': 'application/x-www-form-urlencoded',\n        ...options.headers\n    }\n});\n\nexport const fileResponse = <ThrowOnError extends boolean = false>(options: Options<FileResponseData, ThrowOnError>) => (options.client ?? client).get<FileResponseResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/file/{id}', ...options });\n\nexport const complexTypes = <ThrowOnError extends boolean = false>(options: Options<ComplexTypesData, ThrowOnError>) => (options.client ?? client).get<ComplexTypesResponses, ComplexTypesErrors, ThrowOnError>({\n    querySerializer: { parameters: { parameterObject: { object: { style: 'form' } } } },\n    url: '/api/v{api-version}/complex',\n    ...options\n});\n\nexport const multipartResponse = <ThrowOnError extends boolean = false>(options?: Options<MultipartResponseData, ThrowOnError>) => (options?.client ?? client).get<MultipartResponseResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/multipart', ...options });\n\nexport const multipartRequest = <ThrowOnError extends boolean = false>(options?: Options<MultipartRequestData, ThrowOnError>) => (options?.client ?? client).post<unknown, unknown, ThrowOnError>({\n    ...formDataBodySerializer,\n    url: '/api/v{api-version}/multipart',\n    ...options,\n    headers: {\n        'Content-Type': null,\n        ...options?.headers\n    }\n});\n\nexport const complexParams = <ThrowOnError extends boolean = false>(options: Options<ComplexParamsData, ThrowOnError>) => (options.client ?? client).put<ComplexParamsResponses, unknown, ThrowOnError>({\n    url: '/api/v{api-version}/complex/{id}',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json-patch+json',\n        ...options.headers\n    }\n});\n\nexport const callWithResultFromHeader = <ThrowOnError extends boolean = false>(options?: Options<CallWithResultFromHeaderData, ThrowOnError>) => (options?.client ?? client).post<CallWithResultFromHeaderResponses, CallWithResultFromHeaderErrors, ThrowOnError>({ url: '/api/v{api-version}/header', ...options });\n\nexport const testErrorCode = <ThrowOnError extends boolean = false>(options: Options<TestErrorCodeData, ThrowOnError>) => (options.client ?? client).post<TestErrorCodeResponses, TestErrorCodeErrors, ThrowOnError>({ url: '/api/v{api-version}/error', ...options });\n\nexport const nonAsciiæøåÆøÅöôêÊ字符串 = <ThrowOnError extends boolean = false>(options: Options<NonAsciiæøåÆøÅöôêÊ字符串Data, ThrowOnError>) => (options.client ?? client).post<NonAsciiæøåÆøÅöôêÊ字符串Responses, unknown, ThrowOnError>({ url: '/api/v{api-version}/non-ascii-æøåÆØÅöôêÊ字符串', ...options });\n\n/**\n * Login User\n */\nexport const putWithFormUrlEncoded = <ThrowOnError extends boolean = false>(options: Options<PutWithFormUrlEncodedData, ThrowOnError>) => (options.client ?? client).put<unknown, unknown, ThrowOnError>({\n    ...urlSearchParamsBodySerializer,\n    url: '/api/v{api-version}/non-ascii-æøåÆØÅöôêÊ字符串',\n    ...options,\n    headers: {\n        'Content-Type': 'application/x-www-form-urlencoded',\n        ...options.headers\n    }\n});\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-ofetch/import-file-extension-ts/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type ClientOptions = {\n    baseUrl: 'http://localhost:3000/base' | (string & {});\n};\n\n/**\n * Model with number-only name\n */\nexport type _400 = string;\n\n/**\n * External ref to shared model (A)\n */\nexport type ExternalRefA = ExternalSharedModel;\n\n/**\n * External ref to shared model (B)\n */\nexport type ExternalRefB = ExternalSharedModel;\n\n/**\n * Testing multiline comments in string: First line\n * Second line\n *\n * Fourth line\n */\nexport type CamelCaseCommentWithBreaks = number;\n\n/**\n * Testing multiline comments in string: First line\n * Second line\n *\n * Fourth line\n */\nexport type CommentWithBreaks = number;\n\n/**\n * Testing backticks in string: `backticks` and ```multiple backticks``` should work\n */\nexport type CommentWithBackticks = number;\n\n/**\n * Testing backticks and quotes in string: `backticks`, 'quotes', \"double quotes\" and ```multiple backticks``` should work\n */\nexport type CommentWithBackticksAndQuotes = number;\n\n/**\n * Testing slashes in string: \\backwards\\\\\\ and /forwards/// should work\n */\nexport type CommentWithSlashes = number;\n\n/**\n * Testing expression placeholders in string: ${expression} should work\n */\nexport type CommentWithExpressionPlaceholders = number;\n\n/**\n * Testing quotes in string: 'single quote''' and \"double quotes\"\"\" should work\n */\nexport type CommentWithQuotes = number;\n\n/**\n * Testing reserved characters in string: * inline * and ** inline ** should work\n */\nexport type CommentWithReservedCharacters = number;\n\n/**\n * This is a simple number\n */\nexport type SimpleInteger = number;\n\n/**\n * This is a simple boolean\n */\nexport type SimpleBoolean = boolean;\n\n/**\n * This is a simple string\n */\nexport type SimpleString = string;\n\n/**\n * A string with non-ascii (unicode) characters valid in typescript identifiers (æøåÆØÅöÔèÈ字符串)\n */\nexport type NonAsciiStringæøåÆøÅöôêÊ字符串 = string;\n\n/**\n * This is a simple file\n */\nexport type SimpleFile = Blob | File;\n\n/**\n * This is a simple reference\n */\nexport type SimpleReference = ModelWithString;\n\n/**\n * This is a simple string\n */\nexport type SimpleStringWithPattern = string | null;\n\n/**\n * This is a simple enum with strings\n */\nexport type EnumWithStrings = 'Success' | 'Warning' | 'Error' | '\\'Single Quote\\'' | '\"Double Quotes\"' | 'Non-ascii: øæåôöØÆÅÔÖ字符串';\n\nexport type EnumWithReplacedCharacters = '\\'Single Quote\\'' | '\"Double Quotes\"' | 'øæåôöØÆÅÔÖ字符串' | 3.1 | '';\n\n/**\n * This is a simple enum with numbers\n */\nexport type EnumWithNumbers = 1 | 2 | 3 | 1.1 | 1.2 | 1.3 | 100 | 200 | 300 | -100 | -200 | -300 | -1.1 | -1.2 | -1.3;\n\n/**\n * Success=1,Warning=2,Error=3\n */\nexport type EnumFromDescription = number;\n\n/**\n * This is a simple enum with numbers\n */\nexport type EnumWithExtensions = 200 | 400 | 500;\n\nexport type EnumWithXEnumNames = 0 | 1 | 2;\n\n/**\n * This is a simple array with numbers\n */\nexport type ArrayWithNumbers = Array<number>;\n\n/**\n * This is a simple array with booleans\n */\nexport type ArrayWithBooleans = Array<boolean>;\n\n/**\n * This is a simple array with strings\n */\nexport type ArrayWithStrings = Array<string>;\n\n/**\n * This is a simple array with references\n */\nexport type ArrayWithReferences = Array<ModelWithString>;\n\n/**\n * This is a simple array containing an array\n */\nexport type ArrayWithArray = Array<Array<ModelWithString>>;\n\n/**\n * This is a simple array with properties\n */\nexport type ArrayWithProperties = Array<{\n    '16x16'?: CamelCaseCommentWithBreaks;\n    bar?: string;\n}>;\n\n/**\n * This is a simple array with any of properties\n */\nexport type ArrayWithAnyOfProperties = Array<{\n    foo?: string;\n} | {\n    bar?: string;\n}>;\n\nexport type AnyOfAnyAndNull = {\n    data?: unknown | null;\n};\n\n/**\n * This is a simple array with any of properties\n */\nexport type AnyOfArrays = {\n    results?: Array<{\n        foo?: string;\n    } | {\n        bar?: string;\n    }>;\n};\n\n/**\n * This is a string dictionary\n */\nexport type DictionaryWithString = {\n    [key: string]: string;\n};\n\nexport type DictionaryWithPropertiesAndAdditionalProperties = {\n    foo?: number;\n    bar?: boolean;\n    [key: string]: string | number | boolean | undefined;\n};\n\n/**\n * This is a string reference\n */\nexport type DictionaryWithReference = {\n    [key: string]: ModelWithString;\n};\n\n/**\n * This is a complex dictionary\n */\nexport type DictionaryWithArray = {\n    [key: string]: Array<ModelWithString>;\n};\n\n/**\n * This is a string dictionary\n */\nexport type DictionaryWithDictionary = {\n    [key: string]: {\n        [key: string]: string;\n    };\n};\n\n/**\n * This is a complex dictionary\n */\nexport type DictionaryWithProperties = {\n    [key: string]: {\n        foo?: string;\n        bar?: string;\n    };\n};\n\n/**\n * This is a model with one number property\n */\nexport type ModelWithInteger = {\n    /**\n     * This is a simple number property\n     */\n    prop?: number;\n};\n\n/**\n * This is a model with one boolean property\n */\nexport type ModelWithBoolean = {\n    /**\n     * This is a simple boolean property\n     */\n    prop?: boolean;\n};\n\n/**\n * This is a model with one string property\n */\nexport type ModelWithString = {\n    /**\n     * This is a simple string property\n     */\n    prop?: string;\n};\n\n/**\n * This is a model with one string property\n */\nexport type ModelWithStringError = {\n    /**\n     * This is a simple string property\n     */\n    prop?: string;\n};\n\n/**\n * `Comment` or `VoiceComment`. The JSON object for adding voice comments to tickets is different. See [Adding voice comments to tickets](/documentation/ticketing/managing-tickets/adding-voice-comments-to-tickets)\n */\nexport type ModelFromZendesk = string;\n\n/**\n * This is a model with one string property\n */\nexport type ModelWithNullableString = {\n    /**\n     * This is a simple string property\n     */\n    nullableProp1?: string | null;\n    /**\n     * This is a simple string property\n     */\n    nullableRequiredProp1: string | null;\n    /**\n     * This is a simple string property\n     */\n    nullableProp2?: string | null;\n    /**\n     * This is a simple string property\n     */\n    nullableRequiredProp2: string | null;\n    /**\n     * This is a simple enum with strings\n     */\n    'foo_bar-enum'?: 'Success' | 'Warning' | 'Error' | 'ØÆÅ字符串';\n};\n\n/**\n * This is a model with one enum\n */\nexport type ModelWithEnum = {\n    /**\n     * This is a simple enum with strings\n     */\n    'foo_bar-enum'?: 'Success' | 'Warning' | 'Error' | 'ØÆÅ字符串';\n    /**\n     * These are the HTTP error code enums\n     */\n    statusCode?: '100' | '200 FOO' | '300 FOO_BAR' | '400 foo-bar' | '500 foo.bar' | '600 foo&bar';\n    /**\n     * Simple boolean enum\n     */\n    bool?: true;\n};\n\n/**\n * This is a model with one enum with escaped name\n */\nexport type ModelWithEnumWithHyphen = {\n    /**\n     * Foo-Bar-Baz-Qux\n     */\n    'foo-bar-baz-qux'?: '3.0';\n};\n\n/**\n * This is a model with one enum\n */\nexport type ModelWithEnumFromDescription = {\n    /**\n     * Success=1,Warning=2,Error=3\n     */\n    test?: number;\n};\n\n/**\n * This is a model with nested enums\n */\nexport type ModelWithNestedEnums = {\n    dictionaryWithEnum?: {\n        [key: string]: 'Success' | 'Warning' | 'Error';\n    };\n    dictionaryWithEnumFromDescription?: {\n        [key: string]: number;\n    };\n    arrayWithEnum?: Array<'Success' | 'Warning' | 'Error'>;\n    arrayWithDescription?: Array<number>;\n    /**\n     * This is a simple enum with strings\n     */\n    'foo_bar-enum'?: 'Success' | 'Warning' | 'Error' | 'ØÆÅ字符串';\n};\n\n/**\n * This is a model with one property containing a reference\n */\nexport type ModelWithReference = {\n    prop?: ModelWithProperties;\n};\n\n/**\n * This is a model with one property containing an array\n */\nexport type ModelWithArrayReadOnlyAndWriteOnly = {\n    prop?: Array<ModelWithReadOnlyAndWriteOnly>;\n    propWithFile?: Array<Blob | File>;\n    propWithNumber?: Array<number>;\n};\n\n/**\n * This is a model with one property containing an array\n */\nexport type ModelWithArray = {\n    prop?: Array<ModelWithString>;\n    propWithFile?: Array<Blob | File>;\n    propWithNumber?: Array<number>;\n};\n\n/**\n * This is a model with one property containing a dictionary\n */\nexport type ModelWithDictionary = {\n    prop?: {\n        [key: string]: string;\n    };\n};\n\n/**\n * This is a deprecated model with a deprecated property\n *\n * @deprecated\n */\nexport type DeprecatedModel = {\n    /**\n     * This is a deprecated property\n     *\n     * @deprecated\n     */\n    prop?: string;\n};\n\n/**\n * This is a model with one property containing a circular reference\n */\nexport type ModelWithCircularReference = {\n    prop?: ModelWithCircularReference;\n};\n\n/**\n * This is a model with one property with a 'one of' relationship\n */\nexport type CompositionWithOneOf = {\n    propA?: ModelWithString | ModelWithEnum | ModelWithArray | ModelWithDictionary;\n};\n\n/**\n * This is a model with one property with a 'one of' relationship where the options are not $ref\n */\nexport type CompositionWithOneOfAnonymous = {\n    propA?: {\n        propA?: string;\n    } | string | number;\n};\n\n/**\n * Circle\n */\nexport type ModelCircle = {\n    kind: string;\n    radius?: number;\n};\n\n/**\n * Square\n */\nexport type ModelSquare = {\n    kind: string;\n    sideLength?: number;\n};\n\n/**\n * This is a model with one property with a 'one of' relationship where the options are not $ref\n */\nexport type CompositionWithOneOfDiscriminator = ({\n    kind: 'circle';\n} & ModelCircle) | ({\n    kind: 'square';\n} & ModelSquare);\n\n/**\n * This is a model with one property with a 'any of' relationship\n */\nexport type CompositionWithAnyOf = {\n    propA?: ModelWithString | ModelWithEnum | ModelWithArray | ModelWithDictionary;\n};\n\n/**\n * This is a model with one property with a 'any of' relationship where the options are not $ref\n */\nexport type CompositionWithAnyOfAnonymous = {\n    propA?: {\n        propA?: string;\n    } | string | number;\n};\n\n/**\n * This is a model with nested 'any of' property with a type null\n */\nexport type CompositionWithNestedAnyAndTypeNull = {\n    propA?: Array<ModelWithDictionary | null> | Array<ModelWithArray | null>;\n};\n\nexport type _3eNum1Период = 'Bird' | 'Dog';\n\nexport type ConstValue = 'ConstValue';\n\n/**\n * This is a model with one property with a 'any of' relationship where the options are not $ref\n */\nexport type CompositionWithNestedAnyOfAndNull = {\n    /**\n     * Scopes\n     */\n    propA?: Array<_3eNum1Период | ConstValue> | null;\n};\n\n/**\n * This is a model with one property with a 'one of' relationship\n */\nexport type CompositionWithOneOfAndNullable = {\n    propA?: {\n        boolean?: boolean;\n    } | ModelWithEnum | ModelWithArray | ModelWithDictionary | null;\n};\n\n/**\n * This is a model that contains a simple dictionary within composition\n */\nexport type CompositionWithOneOfAndSimpleDictionary = {\n    propA?: boolean | {\n        [key: string]: number;\n    };\n};\n\n/**\n * This is a model that contains a dictionary of simple arrays within composition\n */\nexport type CompositionWithOneOfAndSimpleArrayDictionary = {\n    propA?: boolean | {\n        [key: string]: Array<boolean>;\n    };\n};\n\n/**\n * This is a model that contains a dictionary of complex arrays (composited) within composition\n */\nexport type CompositionWithOneOfAndComplexArrayDictionary = {\n    propA?: boolean | {\n        [key: string]: Array<number | string>;\n    };\n};\n\n/**\n * This is a model with one property with a 'all of' relationship\n */\nexport type CompositionWithAllOfAndNullable = {\n    propA?: ({\n        boolean?: boolean;\n    } & ModelWithEnum & ModelWithArray & ModelWithDictionary) | null;\n};\n\n/**\n * This is a model with one property with a 'any of' relationship\n */\nexport type CompositionWithAnyOfAndNullable = {\n    propA?: {\n        boolean?: boolean;\n    } | ModelWithEnum | ModelWithArray | ModelWithDictionary | null;\n};\n\n/**\n * This is a base model with two simple optional properties\n */\nexport type CompositionBaseModel = {\n    firstName?: string;\n    lastname?: string;\n};\n\n/**\n * This is a model that extends the base model\n */\nexport type CompositionExtendedModel = CompositionBaseModel & {\n    age: number;\n    firstName: string;\n    lastname: string;\n};\n\n/**\n * This is a model with one nested property\n */\nexport type ModelWithProperties = {\n    required: string;\n    readonly requiredAndReadOnly: string;\n    requiredAndNullable: string | null;\n    string?: string;\n    number?: number;\n    boolean?: boolean;\n    reference?: ModelWithString;\n    'property with space'?: string;\n    default?: string;\n    try?: string;\n    readonly '@namespace.string'?: string;\n    readonly '@namespace.integer'?: number;\n};\n\n/**\n * This is a model with one nested property\n */\nexport type ModelWithNestedProperties = {\n    readonly first: {\n        readonly second: {\n            readonly third: string | null;\n        } | null;\n    } | null;\n};\n\n/**\n * This is a model with duplicated properties\n */\nexport type ModelWithDuplicateProperties = {\n    prop?: ModelWithString;\n};\n\n/**\n * This is a model with ordered properties\n */\nexport type ModelWithOrderedProperties = {\n    zebra?: string;\n    apple?: string;\n    hawaii?: string;\n};\n\n/**\n * This is a model with duplicated imports\n */\nexport type ModelWithDuplicateImports = {\n    propA?: ModelWithString;\n    propB?: ModelWithString;\n    propC?: ModelWithString;\n};\n\n/**\n * This is a model that extends another model\n */\nexport type ModelThatExtends = ModelWithString & {\n    propExtendsA?: string;\n    propExtendsB?: ModelWithString;\n};\n\n/**\n * This is a model that extends another model\n */\nexport type ModelThatExtendsExtends = ModelWithString & ModelThatExtends & {\n    propExtendsC?: string;\n    propExtendsD?: ModelWithString;\n};\n\n/**\n * This is a model that contains a some patterns\n */\nexport type ModelWithPattern = {\n    key: string;\n    name: string;\n    readonly enabled?: boolean;\n    readonly modified?: string;\n    id?: string;\n    text?: string;\n    patternWithSingleQuotes?: string;\n    patternWithNewline?: string;\n    patternWithBacktick?: string;\n    patternWithUnicode?: string;\n};\n\nexport type File = {\n    /**\n     * Id\n     */\n    readonly id?: string;\n    /**\n     * Updated at\n     */\n    readonly updated_at?: string;\n    /**\n     * Created at\n     */\n    readonly created_at?: string;\n    /**\n     * Mime\n     */\n    mime: string;\n    /**\n     * File\n     */\n    readonly file?: string;\n};\n\nexport type Default = {\n    name?: string;\n};\n\nexport type Pageable = {\n    page?: number;\n    size?: number;\n    sort?: Array<string>;\n};\n\n/**\n * This is a free-form object without additionalProperties.\n */\nexport type FreeFormObjectWithoutAdditionalProperties = {\n    [key: string]: unknown;\n};\n\n/**\n * This is a free-form object with additionalProperties: true.\n */\nexport type FreeFormObjectWithAdditionalPropertiesEqTrue = {\n    [key: string]: unknown;\n};\n\n/**\n * This is a free-form object with additionalProperties: {}.\n */\nexport type FreeFormObjectWithAdditionalPropertiesEqEmptyObject = {\n    [key: string]: unknown;\n};\n\nexport type ModelWithConst = {\n    String?: 'String';\n    number?: 0;\n    null?: null;\n    withType?: 'Some string';\n};\n\n/**\n * This is a model with one property and additionalProperties: true\n */\nexport type ModelWithAdditionalPropertiesEqTrue = {\n    /**\n     * This is a simple string property\n     */\n    prop?: string;\n    [key: string]: unknown;\n};\n\nexport type NestedAnyOfArraysNullable = {\n    nullableArray?: Array<string | boolean> | null;\n};\n\nexport type CompositionWithOneOfAndProperties = ({\n    foo: SimpleParameter;\n} | {\n    bar: NonAsciiStringæøåÆøÅöôêÊ字符串;\n}) & {\n    baz: number | null;\n    qux: number;\n};\n\n/**\n * An object that can be null\n */\nexport type NullableObject = {\n    foo?: string;\n} | null;\n\n/**\n * Some % character\n */\nexport type CharactersInDescription = string;\n\nexport type ModelWithNullableObject = {\n    data?: NullableObject;\n};\n\n/**\n * An object with additional properties that can be null (anyOf ref + null)\n */\nexport type ModelWithAdditionalPropertiesRef = {\n    [key: string]: NullableObject | null;\n};\n\nexport type ModelWithOneOfEnum = {\n    foo: 'Bar';\n} | {\n    foo: 'Baz';\n} | {\n    foo: 'Qux';\n} | {\n    content: string;\n    foo: 'Quux';\n} | {\n    content: [\n        string,\n        string\n    ];\n    foo: 'Corge';\n};\n\nexport type ModelWithNestedArrayEnumsDataFoo = 'foo' | 'bar';\n\nexport type ModelWithNestedArrayEnumsDataBar = 'baz' | 'qux';\n\nexport type ModelWithNestedArrayEnumsData = {\n    foo?: Array<ModelWithNestedArrayEnumsDataFoo>;\n    bar?: Array<ModelWithNestedArrayEnumsDataBar>;\n};\n\nexport type ModelWithNestedArrayEnums = {\n    array_strings?: Array<string>;\n    data?: ModelWithNestedArrayEnumsData;\n};\n\nexport type ModelWithNestedCompositionEnums = {\n    foo?: ModelWithNestedArrayEnumsDataFoo;\n};\n\nexport type ModelWithReadOnlyAndWriteOnly = {\n    foo: string;\n    readonly bar: string;\n};\n\nexport type ModelWithConstantSizeArray = [\n    number,\n    number\n];\n\nexport type ModelWithAnyOfConstantSizeArray = [\n    number | string,\n    number | string,\n    number | string\n];\n\nexport type ModelWithPrefixItemsConstantSizeArray = [\n    ModelWithInteger,\n    number | string,\n    string\n];\n\nexport type ModelWithAnyOfConstantSizeArrayNullable = [\n    number | null | string,\n    number | null | string,\n    number | null | string\n];\n\nexport type ModelWithAnyOfConstantSizeArrayWithNSizeAndOptions = [\n    number | Import,\n    number | Import\n];\n\nexport type ModelWithAnyOfConstantSizeArrayAndIntersect = [\n    number & string,\n    number & string\n];\n\nexport type ModelWithNumericEnumUnion = {\n    /**\n     * Период\n     */\n    value?: -10 | -1 | 0 | 1 | 3 | 6 | 12;\n};\n\n/**\n * Some description with `back ticks`\n */\nexport type ModelWithBackticksInDescription = {\n    /**\n     * The template `that` should be used for parsing and importing the contents of the CSV file.\n     *\n     * <br/><p>There is one placeholder currently supported:<ul>     <li><b>${x}</b> - refers to the n-th column in the CSV file, e.g. ${1}, ${2}, ...)</li></ul><p>Example of a correct JSON template:</p>\n     * <pre>\n     * [\n     * {\n     * \"resourceType\": \"Asset\",\n     * \"identifier\": {\n     * \"name\": \"${1}\",\n     * \"domain\": {\n     * \"name\": \"${2}\",\n     * \"community\": {\n     * \"name\": \"Some Community\"\n     * }\n     * }\n     * },\n     * \"attributes\" : {\n     * \"00000000-0000-0000-0000-000000003115\" : [ {\n     * \"value\" : \"${3}\"\n     * } ],\n     * \"00000000-0000-0000-0000-000000000222\" : [ {\n     * \"value\" : \"${4}\"\n     * } ]\n     * }\n     * }\n     * ]\n     * </pre>\n     */\n    template?: string;\n};\n\nexport type ModelWithOneOfAndProperties = (SimpleParameter | NonAsciiStringæøåÆøÅöôêÊ字符串) & {\n    baz: number | null;\n    qux: number;\n};\n\n/**\n * Model used to test deduplication strategy (unused)\n */\nexport type ParameterSimpleParameterUnused = string;\n\n/**\n * Model used to test deduplication strategy\n */\nexport type PostServiceWithEmptyTagResponse = string;\n\n/**\n * Model used to test deduplication strategy\n */\nexport type PostServiceWithEmptyTagResponse2 = string;\n\n/**\n * Model used to test deduplication strategy\n */\nexport type DeleteFooData = string;\n\n/**\n * Model used to test deduplication strategy\n */\nexport type DeleteFooData2 = string;\n\n/**\n * Model with restricted keyword name\n */\nexport type Import = string;\n\nexport type SchemaWithFormRestrictedKeys = {\n    description?: string;\n    'x-enum-descriptions'?: string;\n    'x-enum-varnames'?: string;\n    'x-enumNames'?: string;\n    title?: string;\n    object?: {\n        description?: string;\n        'x-enum-descriptions'?: string;\n        'x-enum-varnames'?: string;\n        'x-enumNames'?: string;\n        title?: string;\n    };\n    array?: Array<{\n        description?: string;\n        'x-enum-descriptions'?: string;\n        'x-enum-varnames'?: string;\n        'x-enumNames'?: string;\n        title?: string;\n    }>;\n};\n\n/**\n * This schema was giving PascalCase transformations a hard time\n */\nexport type IoK8sApimachineryPkgApisMetaV1DeleteOptions = {\n    /**\n     * Must be fulfilled before a deletion is carried out. If not possible, a 409 Conflict status will be returned.\n     */\n    preconditions?: IoK8sApimachineryPkgApisMetaV1Preconditions;\n};\n\n/**\n * This schema was giving PascalCase transformations a hard time\n */\nexport type IoK8sApimachineryPkgApisMetaV1Preconditions = {\n    /**\n     * Specifies the target ResourceVersion\n     */\n    resourceVersion?: string;\n    /**\n     * Specifies the target UID.\n     */\n    uid?: string;\n};\n\nexport type AdditionalPropertiesUnknownIssue = {\n    [key: string]: string | number;\n};\n\nexport type AdditionalPropertiesUnknownIssue2 = {\n    [key: string]: string | number;\n};\n\nexport type AdditionalPropertiesUnknownIssue3 = string & {\n    entries: {\n        [key: string]: AdditionalPropertiesUnknownIssue;\n    };\n};\n\nexport type AdditionalPropertiesIntegerIssue = {\n    value: number;\n    [key: string]: number;\n};\n\nexport type OneOfAllOfIssue = ((ConstValue | GenericSchemaDuplicateIssue1SystemBoolean) & _3eNum1Период) | GenericSchemaDuplicateIssue1SystemString;\n\nexport type GenericSchemaDuplicateIssue1SystemBoolean = {\n    item?: boolean;\n    error?: string | null;\n    readonly hasError?: boolean;\n    data?: {\n        [key: string]: never;\n    };\n};\n\nexport type GenericSchemaDuplicateIssue1SystemString = {\n    item?: string | null;\n    error?: string | null;\n    readonly hasError?: boolean;\n};\n\nexport type ExternalSharedModel = {\n    id: string;\n    name?: string;\n};\n\n/**\n * This is a model with one property containing a reference\n */\nexport type ModelWithReferenceWritable = {\n    prop?: ModelWithPropertiesWritable;\n};\n\n/**\n * This is a model with one property containing an array\n */\nexport type ModelWithArrayReadOnlyAndWriteOnlyWritable = {\n    prop?: Array<ModelWithReadOnlyAndWriteOnlyWritable>;\n    propWithFile?: Array<Blob | File>;\n    propWithNumber?: Array<number>;\n};\n\n/**\n * This is a model with one nested property\n */\nexport type ModelWithPropertiesWritable = {\n    required: string;\n    requiredAndNullable: string | null;\n    string?: string;\n    number?: number;\n    boolean?: boolean;\n    reference?: ModelWithString;\n    'property with space'?: string;\n    default?: string;\n    try?: string;\n};\n\n/**\n * This is a model that contains a some patterns\n */\nexport type ModelWithPatternWritable = {\n    key: string;\n    name: string;\n    id?: string;\n    text?: string;\n    patternWithSingleQuotes?: string;\n    patternWithNewline?: string;\n    patternWithBacktick?: string;\n    patternWithUnicode?: string;\n};\n\nexport type FileWritable = {\n    /**\n     * Mime\n     */\n    mime: string;\n};\n\nexport type ModelWithReadOnlyAndWriteOnlyWritable = {\n    foo: string;\n    baz: string;\n};\n\nexport type ModelWithAnyOfConstantSizeArrayWithNSizeAndOptionsWritable = [\n    number | Import,\n    number | Import\n];\n\nexport type AdditionalPropertiesUnknownIssueWritable = {\n    [key: string]: string | number;\n};\n\nexport type OneOfAllOfIssueWritable = ((ConstValue | GenericSchemaDuplicateIssue1SystemBoolean) & _3eNum1Период) | GenericSchemaDuplicateIssue1SystemString;\n\nexport type GenericSchemaDuplicateIssue1SystemBooleanWritable = {\n    item?: boolean;\n    error?: string | null;\n    data?: {\n        [key: string]: never;\n    };\n};\n\nexport type GenericSchemaDuplicateIssue1SystemStringWritable = {\n    item?: string | null;\n    error?: string | null;\n};\n\n/**\n * This is a reusable parameter\n */\nexport type SimpleParameter = string;\n\n/**\n * Parameter with illegal characters\n */\nexport type XFooBar = ModelWithString;\n\n/**\n * A reusable request body\n */\nexport type SimpleRequestBody = ModelWithString;\n\n/**\n * A reusable request body\n */\nexport type SimpleFormData = ModelWithString;\n\nexport type ExportData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no+tag';\n};\n\nexport type PatchApiVbyApiVersionNoTagData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no+tag';\n};\n\nexport type PatchApiVbyApiVersionNoTagResponses = {\n    /**\n     * OK\n     */\n    default: unknown;\n};\n\nexport type ImportData = {\n    body: ModelWithReadOnlyAndWriteOnlyWritable | ModelWithArrayReadOnlyAndWriteOnlyWritable;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no+tag';\n};\n\nexport type ImportResponses = {\n    /**\n     * Success\n     */\n    200: ModelFromZendesk;\n    /**\n     * Default success response\n     */\n    default: ModelWithReadOnlyAndWriteOnly;\n};\n\nexport type ImportResponse = ImportResponses[keyof ImportResponses];\n\nexport type FooWowData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no+tag';\n};\n\nexport type FooWowResponses = {\n    /**\n     * OK\n     */\n    default: unknown;\n};\n\nexport type ApiVVersionODataControllerCountData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple/$count';\n};\n\nexport type ApiVVersionODataControllerCountResponses = {\n    /**\n     * Success\n     */\n    200: ModelFromZendesk;\n};\n\nexport type ApiVVersionODataControllerCountResponse = ApiVVersionODataControllerCountResponses[keyof ApiVVersionODataControllerCountResponses];\n\nexport type GetApiVbyApiVersionSimpleOperationData = {\n    body?: never;\n    path: {\n        /**\n         * foo in method\n         */\n        foo_param: string;\n    };\n    query?: never;\n    url: '/api/v{api-version}/simple:operation';\n};\n\nexport type GetApiVbyApiVersionSimpleOperationErrors = {\n    /**\n     * Default error response\n     */\n    default: ModelWithBoolean;\n};\n\nexport type GetApiVbyApiVersionSimpleOperationError = GetApiVbyApiVersionSimpleOperationErrors[keyof GetApiVbyApiVersionSimpleOperationErrors];\n\nexport type GetApiVbyApiVersionSimpleOperationResponses = {\n    /**\n     * Response is a simple number\n     */\n    200: number;\n};\n\nexport type GetApiVbyApiVersionSimpleOperationResponse = GetApiVbyApiVersionSimpleOperationResponses[keyof GetApiVbyApiVersionSimpleOperationResponses];\n\nexport type DeleteCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type GetCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type HeadCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type OptionsCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type PatchCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type PostCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type PutCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type DeleteFooData3 = {\n    body?: never;\n    headers: {\n        /**\n         * Parameter with illegal characters\n         */\n        'x-Foo-Bar': ModelWithString;\n    };\n    path: {\n        /**\n         * foo in method\n         */\n        foo_param: string;\n        /**\n         * bar in method\n         */\n        BarParam: string;\n    };\n    query?: never;\n    url: '/api/v{api-version}/foo/{foo_param}/bar/{BarParam}';\n};\n\nexport type CallWithDescriptionsData = {\n    body?: never;\n    path?: never;\n    query?: {\n        /**\n         * Testing multiline comments in string: First line\n         * Second line\n         *\n         * Fourth line\n         */\n        parameterWithBreaks?: string;\n        /**\n         * Testing backticks in string: `backticks` and ```multiple backticks``` should work\n         */\n        parameterWithBackticks?: string;\n        /**\n         * Testing slashes in string: \\backwards\\\\\\ and /forwards/// should work\n         */\n        parameterWithSlashes?: string;\n        /**\n         * Testing expression placeholders in string: ${expression} should work\n         */\n        parameterWithExpressionPlaceholders?: string;\n        /**\n         * Testing quotes in string: 'single quote''' and \"double quotes\"\"\" should work\n         */\n        parameterWithQuotes?: string;\n        /**\n         * Testing reserved characters in string: * inline * and ** inline ** should work\n         */\n        parameterWithReservedCharacters?: string;\n    };\n    url: '/api/v{api-version}/descriptions';\n};\n\nexport type DeprecatedCallData = {\n    body?: never;\n    headers: {\n        /**\n         * This parameter is deprecated\n         *\n         * @deprecated\n         */\n        parameter: DeprecatedModel | null;\n    };\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/parameters/deprecated';\n};\n\nexport type CallWithParametersData = {\n    /**\n     * This is the parameter that goes into the body\n     */\n    body: {\n        [key: string]: unknown;\n    } | null;\n    headers: {\n        /**\n         * This is the parameter that goes into the header\n         */\n        parameterHeader: string | null;\n    };\n    path: {\n        /**\n         * This is the parameter that goes into the path\n         */\n        parameterPath: string | null;\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string | null;\n    };\n    query: {\n        foo_ref_enum?: ModelWithNestedArrayEnumsDataFoo;\n        foo_all_of_enum: ModelWithNestedArrayEnumsDataFoo;\n        /**\n         * This is the parameter that goes into the query params\n         */\n        cursor: string | null;\n    };\n    url: '/api/v{api-version}/parameters/{parameterPath}';\n};\n\nexport type CallWithWeirdParameterNamesData = {\n    /**\n     * This is the parameter that goes into the body\n     */\n    body: ModelWithString | null;\n    headers: {\n        /**\n         * This is the parameter that goes into the request header\n         */\n        'parameter.header': string | null;\n    };\n    path: {\n        /**\n         * This is the parameter that goes into the path\n         */\n        'parameter.path.1'?: string;\n        /**\n         * This is the parameter that goes into the path\n         */\n        'parameter-path-2'?: string;\n        /**\n         * This is the parameter that goes into the path\n         */\n        'PARAMETER-PATH-3'?: string;\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string | null;\n    };\n    query: {\n        /**\n         * This is the parameter with a reserved keyword\n         */\n        default?: string;\n        /**\n         * This is the parameter that goes into the request query params\n         */\n        'parameter-query': string | null;\n    };\n    url: '/api/v{api-version}/parameters/{parameter.path.1}/{parameter-path-2}/{PARAMETER-PATH-3}';\n};\n\nexport type GetCallWithOptionalParamData = {\n    /**\n     * This is a required parameter\n     */\n    body: ModelWithOneOfEnum;\n    path?: never;\n    query?: {\n        /**\n         * This is an optional parameter\n         */\n        page?: number;\n    };\n    url: '/api/v{api-version}/parameters';\n};\n\nexport type PostCallWithOptionalParamData = {\n    /**\n     * This is an optional parameter\n     */\n    body?: {\n        offset?: number | null;\n    };\n    path?: never;\n    query: {\n        /**\n         * This is a required parameter\n         */\n        parameter: Pageable;\n    };\n    url: '/api/v{api-version}/parameters';\n};\n\nexport type PostCallWithOptionalParamResponses = {\n    /**\n     * Response is a simple number\n     */\n    200: number;\n    /**\n     * Success\n     */\n    204: void;\n};\n\nexport type PostCallWithOptionalParamResponse = PostCallWithOptionalParamResponses[keyof PostCallWithOptionalParamResponses];\n\nexport type PostApiVbyApiVersionRequestBodyData = {\n    /**\n     * A reusable request body\n     */\n    body?: SimpleRequestBody;\n    path?: never;\n    query?: {\n        /**\n         * This is a reusable parameter\n         */\n        parameter?: string;\n    };\n    url: '/api/v{api-version}/requestBody';\n};\n\nexport type PostApiVbyApiVersionFormDataData = {\n    /**\n     * A reusable request body\n     */\n    body?: SimpleFormData;\n    path?: never;\n    query?: {\n        /**\n         * This is a reusable parameter\n         */\n        parameter?: string;\n    };\n    url: '/api/v{api-version}/formData';\n};\n\nexport type CallWithDefaultParametersData = {\n    body?: never;\n    path?: never;\n    query?: {\n        /**\n         * This is a simple string with default value\n         */\n        parameterString?: string | null;\n        /**\n         * This is a simple number with default value\n         */\n        parameterNumber?: number | null;\n        /**\n         * This is a simple boolean with default value\n         */\n        parameterBoolean?: boolean | null;\n        /**\n         * This is a simple enum with default value\n         */\n        parameterEnum?: 'Success' | 'Warning' | 'Error';\n        /**\n         * This is a simple model with default value\n         */\n        parameterModel?: ModelWithString | null;\n    };\n    url: '/api/v{api-version}/defaults';\n};\n\nexport type CallWithDefaultOptionalParametersData = {\n    body?: never;\n    path?: never;\n    query?: {\n        /**\n         * This is a simple string that is optional with default value\n         */\n        parameterString?: string;\n        /**\n         * This is a simple number that is optional with default value\n         */\n        parameterNumber?: number;\n        /**\n         * This is a simple boolean that is optional with default value\n         */\n        parameterBoolean?: boolean;\n        /**\n         * This is a simple enum that is optional with default value\n         */\n        parameterEnum?: 'Success' | 'Warning' | 'Error';\n        /**\n         * This is a simple model that is optional with default value\n         */\n        parameterModel?: ModelWithString;\n    };\n    url: '/api/v{api-version}/defaults';\n};\n\nexport type CallToTestOrderOfParamsData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * This is a optional string with default\n         */\n        parameterOptionalStringWithDefault?: string;\n        /**\n         * This is a optional string with empty default\n         */\n        parameterOptionalStringWithEmptyDefault?: string;\n        /**\n         * This is a optional string with no default\n         */\n        parameterOptionalStringWithNoDefault?: string;\n        /**\n         * This is a string with default\n         */\n        parameterStringWithDefault: string;\n        /**\n         * This is a string with empty default\n         */\n        parameterStringWithEmptyDefault: string;\n        /**\n         * This is a string with no default\n         */\n        parameterStringWithNoDefault: string;\n        /**\n         * This is a string that can be null with no default\n         */\n        parameterStringNullableWithNoDefault?: string | null;\n        /**\n         * This is a string that can be null with default\n         */\n        parameterStringNullableWithDefault?: string | null;\n    };\n    url: '/api/v{api-version}/defaults';\n};\n\nexport type DuplicateNameData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/duplicate';\n};\n\nexport type DuplicateName2Data = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/duplicate';\n};\n\nexport type DuplicateName3Data = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/duplicate';\n};\n\nexport type DuplicateName4Data = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/duplicate';\n};\n\nexport type CallWithNoContentResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no-content';\n};\n\nexport type CallWithNoContentResponseResponses = {\n    /**\n     * Success\n     */\n    204: void;\n};\n\nexport type CallWithNoContentResponseResponse = CallWithNoContentResponseResponses[keyof CallWithNoContentResponseResponses];\n\nexport type CallWithResponseAndNoContentResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multiple-tags/response-and-no-content';\n};\n\nexport type CallWithResponseAndNoContentResponseResponses = {\n    /**\n     * Response is a simple number\n     */\n    200: number;\n    /**\n     * Success\n     */\n    204: void;\n};\n\nexport type CallWithResponseAndNoContentResponseResponse = CallWithResponseAndNoContentResponseResponses[keyof CallWithResponseAndNoContentResponseResponses];\n\nexport type DummyAData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multiple-tags/a';\n};\n\nexport type DummyAResponses = {\n    200: _400;\n};\n\nexport type DummyAResponse = DummyAResponses[keyof DummyAResponses];\n\nexport type DummyBData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multiple-tags/b';\n};\n\nexport type DummyBResponses = {\n    /**\n     * Success\n     */\n    204: void;\n};\n\nexport type DummyBResponse = DummyBResponses[keyof DummyBResponses];\n\nexport type CallWithResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/response';\n};\n\nexport type CallWithResponseResponses = {\n    default: Import;\n};\n\nexport type CallWithResponseResponse = CallWithResponseResponses[keyof CallWithResponseResponses];\n\nexport type CallWithDuplicateResponsesData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/response';\n};\n\nexport type CallWithDuplicateResponsesErrors = {\n    /**\n     * Message for 500 error\n     */\n    500: ModelWithStringError;\n    /**\n     * Message for 501 error\n     */\n    501: ModelWithStringError;\n    /**\n     * Message for 502 error\n     */\n    502: ModelWithStringError;\n    /**\n     * Message for 4XX errors\n     */\n    '4XX': DictionaryWithArray;\n    /**\n     * Default error response\n     */\n    default: ModelWithBoolean;\n};\n\nexport type CallWithDuplicateResponsesError = CallWithDuplicateResponsesErrors[keyof CallWithDuplicateResponsesErrors];\n\nexport type CallWithDuplicateResponsesResponses = {\n    /**\n     * Message for 200 response\n     */\n    200: ModelWithBoolean & ModelWithInteger;\n    /**\n     * Message for 201 response\n     */\n    201: ModelWithString;\n    /**\n     * Message for 202 response\n     */\n    202: ModelWithString;\n};\n\nexport type CallWithDuplicateResponsesResponse = CallWithDuplicateResponsesResponses[keyof CallWithDuplicateResponsesResponses];\n\nexport type CallWithResponsesData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/response';\n};\n\nexport type CallWithResponsesErrors = {\n    /**\n     * Message for 500 error\n     */\n    500: ModelWithStringError;\n    /**\n     * Message for 501 error\n     */\n    501: ModelWithStringError;\n    /**\n     * Message for 502 error\n     */\n    502: ModelWithStringError;\n    /**\n     * Message for default response\n     */\n    default: ModelWithStringError;\n};\n\nexport type CallWithResponsesError = CallWithResponsesErrors[keyof CallWithResponsesErrors];\n\nexport type CallWithResponsesResponses = {\n    /**\n     * Message for 200 response\n     */\n    200: {\n        readonly '@namespace.string'?: string;\n        readonly '@namespace.integer'?: number;\n        readonly value?: Array<ModelWithString>;\n    };\n    /**\n     * Message for 201 response\n     */\n    201: ModelThatExtends;\n    /**\n     * Message for 202 response\n     */\n    202: ModelThatExtendsExtends;\n};\n\nexport type CallWithResponsesResponse = CallWithResponsesResponses[keyof CallWithResponsesResponses];\n\nexport type CollectionFormatData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * This is an array parameter that is sent as csv format (comma-separated values)\n         */\n        parameterArrayCSV: Array<string> | null;\n        /**\n         * This is an array parameter that is sent as ssv format (space-separated values)\n         */\n        parameterArraySSV: Array<string> | null;\n        /**\n         * This is an array parameter that is sent as tsv format (tab-separated values)\n         */\n        parameterArrayTSV: Array<string> | null;\n        /**\n         * This is an array parameter that is sent as pipes format (pipe-separated values)\n         */\n        parameterArrayPipes: Array<string> | null;\n        /**\n         * This is an array parameter that is sent as multi format (multiple parameter instances)\n         */\n        parameterArrayMulti: Array<string> | null;\n    };\n    url: '/api/v{api-version}/collectionFormat';\n};\n\nexport type TypesData = {\n    body?: never;\n    path?: {\n        /**\n         * This is a number parameter\n         */\n        id?: number;\n    };\n    query: {\n        /**\n         * This is a number parameter\n         */\n        parameterNumber: number;\n        /**\n         * This is a string parameter\n         */\n        parameterString: string | null;\n        /**\n         * This is a boolean parameter\n         */\n        parameterBoolean: boolean | null;\n        /**\n         * This is an object parameter\n         */\n        parameterObject: {\n            [key: string]: unknown;\n        } | null;\n        /**\n         * This is an array parameter\n         */\n        parameterArray: Array<string> | null;\n        /**\n         * This is a dictionary parameter\n         */\n        parameterDictionary: {\n            [key: string]: unknown;\n        } | null;\n        /**\n         * This is an enum parameter\n         */\n        parameterEnum: 'Success' | 'Warning' | 'Error' | null;\n    };\n    url: '/api/v{api-version}/types';\n};\n\nexport type TypesResponses = {\n    /**\n     * Response is a simple number\n     */\n    200: number;\n    /**\n     * Response is a simple string\n     */\n    201: string;\n    /**\n     * Response is a simple boolean\n     */\n    202: boolean;\n    /**\n     * Response is a simple object\n     */\n    203: {\n        [key: string]: unknown;\n    };\n};\n\nexport type TypesResponse = TypesResponses[keyof TypesResponses];\n\nexport type UploadFileData = {\n    body: Blob | File;\n    path: {\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string | null;\n    };\n    query?: never;\n    url: '/api/v{api-version}/upload';\n};\n\nexport type UploadFileResponses = {\n    200: boolean;\n};\n\nexport type UploadFileResponse = UploadFileResponses[keyof UploadFileResponses];\n\nexport type FileResponseData = {\n    body?: never;\n    path: {\n        id: string;\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string;\n    };\n    query?: never;\n    url: '/api/v{api-version}/file/{id}';\n};\n\nexport type FileResponseResponses = {\n    /**\n     * Success\n     */\n    200: Blob | File;\n};\n\nexport type FileResponseResponse = FileResponseResponses[keyof FileResponseResponses];\n\nexport type ComplexTypesData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * Parameter containing object\n         */\n        parameterObject: {\n            first?: {\n                second?: {\n                    third?: string;\n                };\n            };\n        };\n        /**\n         * Parameter containing reference\n         */\n        parameterReference: ModelWithString;\n    };\n    url: '/api/v{api-version}/complex';\n};\n\nexport type ComplexTypesErrors = {\n    /**\n     * 400 `server` error\n     */\n    400: unknown;\n    /**\n     * 500 server error\n     */\n    500: unknown;\n};\n\nexport type ComplexTypesResponses = {\n    /**\n     * Successful response\n     */\n    200: Array<ModelWithString>;\n};\n\nexport type ComplexTypesResponse = ComplexTypesResponses[keyof ComplexTypesResponses];\n\nexport type MultipartResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multipart';\n};\n\nexport type MultipartResponseResponses = {\n    /**\n     * OK\n     */\n    200: {\n        file?: Blob | File;\n        metadata?: {\n            foo?: string;\n            bar?: string;\n        };\n    };\n};\n\nexport type MultipartResponseResponse = MultipartResponseResponses[keyof MultipartResponseResponses];\n\nexport type MultipartRequestData = {\n    body?: {\n        content?: Blob | File;\n        data?: ModelWithString | null;\n    };\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multipart';\n};\n\nexport type ComplexParamsData = {\n    body?: {\n        readonly key: string | null;\n        name: string | null;\n        enabled?: boolean;\n        type: 'Monkey' | 'Horse' | 'Bird';\n        listOfModels?: Array<ModelWithString> | null;\n        listOfStrings?: Array<string> | null;\n        parameters: ModelWithString | ModelWithEnum | ModelWithArray | ModelWithDictionary;\n        readonly user?: {\n            readonly id?: number;\n            readonly name?: string | null;\n        };\n    };\n    path: {\n        id: number;\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string;\n    };\n    query?: never;\n    url: '/api/v{api-version}/complex/{id}';\n};\n\nexport type ComplexParamsResponses = {\n    /**\n     * Success\n     */\n    200: ModelWithString;\n};\n\nexport type ComplexParamsResponse = ComplexParamsResponses[keyof ComplexParamsResponses];\n\nexport type CallWithResultFromHeaderData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/header';\n};\n\nexport type CallWithResultFromHeaderErrors = {\n    /**\n     * 400 server error\n     */\n    400: unknown;\n    /**\n     * 500 server error\n     */\n    500: unknown;\n};\n\nexport type CallWithResultFromHeaderResponses = {\n    /**\n     * Successful response\n     */\n    200: unknown;\n};\n\nexport type TestErrorCodeData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * Status code to return\n         */\n        status: number;\n    };\n    url: '/api/v{api-version}/error';\n};\n\nexport type TestErrorCodeErrors = {\n    /**\n     * Custom message: Internal Server Error\n     */\n    500: unknown;\n    /**\n     * Custom message: Not Implemented\n     */\n    501: unknown;\n    /**\n     * Custom message: Bad Gateway\n     */\n    502: unknown;\n    /**\n     * Custom message: Service Unavailable\n     */\n    503: unknown;\n};\n\nexport type TestErrorCodeResponses = {\n    /**\n     * Custom message: Successful response\n     */\n    200: unknown;\n};\n\nexport type NonAsciiæøåÆøÅöôêÊ字符串Data = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * Dummy input param\n         */\n        nonAsciiParamæøåÆØÅöôêÊ: number;\n    };\n    url: '/api/v{api-version}/non-ascii-æøåÆØÅöôêÊ字符串';\n};\n\nexport type NonAsciiæøåÆøÅöôêÊ字符串Responses = {\n    /**\n     * Successful response\n     */\n    200: Array<NonAsciiStringæøåÆøÅöôêÊ字符串>;\n};\n\nexport type NonAsciiæøåÆøÅöôêÊ字符串Response = NonAsciiæøåÆøÅöôêÊ字符串Responses[keyof NonAsciiæøåÆøÅöôêÊ字符串Responses];\n\nexport type PutWithFormUrlEncodedData = {\n    body: ArrayWithStrings;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/non-ascii-æøåÆØÅöôêÊ字符串';\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-ofetch/sdk-client-optional/client/client.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport { ofetch, type ResponseType as OfetchResponseType } from 'ofetch';\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  buildOfetchOptions,\n  buildUrl,\n  createConfig,\n  createInterceptors,\n  isRepeatableBody,\n  mapParseAsToResponseType,\n  mergeConfigs,\n  mergeHeaders,\n  parseError,\n  parseSuccess,\n  setAuthParams,\n  wrapDataReturn,\n  wrapErrorReturn,\n} from './utils.gen';\n\ntype ReqInit = Omit<RequestInit, 'body' | 'headers'> & {\n  body?: BodyInit | null | undefined;\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  // precompute serialized / network body\n  const resolveOptions = async (options: RequestOptions) => {\n    const opts = {\n      ..._config,\n      ...options,\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 if body is empty to avoid invalid requests\n    if (opts.body === undefined || opts.serializedBody === '') {\n      opts.headers.delete('Content-Type');\n    }\n\n    // if a raw body is provided (no serializer), adjust Content-Type only when it\n    // equals the default JSON value to better match the concrete body type\n    if (\n      opts.body !== undefined &&\n      opts.bodySerializer === null &&\n      (opts.headers.get('Content-Type') || '').toLowerCase() === 'application/json'\n    ) {\n      const b: unknown = opts.body;\n      if (typeof FormData !== 'undefined' && b instanceof FormData) {\n        // let the runtime set the multipart boundary\n        opts.headers.delete('Content-Type');\n      } else if (typeof URLSearchParams !== 'undefined' && b instanceof URLSearchParams) {\n        // standard urlencoded content type (+ charset)\n        opts.headers.set('Content-Type', 'application/x-www-form-urlencoded;charset=UTF-8');\n      } else if (typeof Blob !== 'undefined' && b instanceof Blob) {\n        const t = b.type?.trim();\n        if (t) {\n          opts.headers.set('Content-Type', t);\n        } else {\n          // unknown blob type: avoid sending a misleading JSON header\n          opts.headers.delete('Content-Type');\n        }\n      }\n    }\n\n    // precompute network body (stability for retries and interceptors)\n    const networkBody = getValidRequestBody(opts) as RequestInit['body'] | null | undefined;\n\n    const url = buildUrl(opts);\n\n    return { networkBody, opts, url };\n  };\n\n  // apply request interceptors and mirror header/method/signal back to opts\n  const applyRequestInterceptors = async (\n    request: Request,\n    opts: ResolvedRequestOptions,\n    body: BodyInit | null | undefined,\n  ) => {\n    for (const fn of interceptors.request.fns) {\n      if (fn) {\n        request = await fn(request, opts);\n      }\n    }\n    // reflect interceptor changes into opts used by the network layer\n    opts.headers = request.headers;\n    opts.method = request.method as Uppercase<HttpMethod>;\n    // ignore request.body changes to avoid turning serialized bodies into streams\n    // body comes only from getValidRequestBody(options)\n    // reflect signal if present\n    opts.signal = (request as any).signal as AbortSignal | undefined;\n\n    // When body is FormData, remove Content-Type header to avoid boundary mismatch.\n    // Note: We already delete Content-Type in resolveOptions for FormData, but the\n    // Request constructor (line 175) re-adds it with an auto-generated boundary.\n    // Since we pass the original FormData (not the Request's body) to ofetch, and\n    // ofetch will generate its own boundary, we must remove the Request's Content-Type\n    // to let ofetch set the correct one. Otherwise the boundary in the header won't\n    // match the boundary in the actual multipart body sent by ofetch.\n    if (typeof FormData !== 'undefined' && body instanceof FormData) {\n      opts.headers.delete('Content-Type');\n    }\n\n    return request;\n  };\n\n  // build ofetch options with stable retry logic based on body repeatability\n  const buildNetworkOptions = (\n    opts: ResolvedRequestOptions,\n    body: BodyInit | null | undefined,\n    responseType: OfetchResponseType | undefined,\n  ) => {\n    const effectiveRetry = isRepeatableBody(body) ? (opts.retry as any) : (0 as any);\n    return buildOfetchOptions(opts, body, responseType, effectiveRetry);\n  };\n\n  const request: Client['request'] = async (options) => {\n    const { networkBody: initialNetworkBody, opts, url } = await resolveOptions(options as any);\n    // map parseAs -> ofetch responseType once per request\n    const ofetchResponseType: OfetchResponseType | undefined = mapParseAsToResponseType(\n      opts.parseAs,\n      opts.responseType,\n    );\n\n    const $ofetch = opts.ofetch ?? ofetch;\n\n    // create Request before network to run middleware consistently\n    const networkBody = initialNetworkBody;\n    const requestInit: ReqInit = {\n      body: networkBody,\n      headers: opts.headers as Headers,\n      method: opts.method,\n      redirect: 'follow',\n      signal: opts.signal,\n    };\n    let request = new Request(url, requestInit);\n\n    request = await applyRequestInterceptors(request, opts, networkBody);\n    const finalUrl = request.url;\n\n    // build ofetch options and perform the request (.raw keeps the Response)\n    const responseOptions = buildNetworkOptions(\n      opts as ResolvedRequestOptions,\n      networkBody,\n      ofetchResponseType,\n    );\n\n    let response = await $ofetch.raw(finalUrl, responseOptions);\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 = { request, response };\n\n    if (response.ok) {\n      const data = await parseSuccess(response, opts, ofetchResponseType);\n      return wrapDataReturn(data, result, opts.responseStyle);\n    }\n\n    let finalError = await parseError(response);\n\n    for (const fn of interceptors.error.fns) {\n      if (fn) {\n        finalError = await fn(finalError, response, request, opts);\n      }\n    }\n\n    // ensure error is never undefined after interceptors\n    finalError = (finalError as any) || ({} as string);\n\n    if (opts.throwOnError) {\n      throw finalError;\n    }\n\n    return wrapErrorReturn(finalError, result, opts.responseStyle) as any;\n  };\n\n  const makeMethodFn = (method: Uppercase<HttpMethod>) => (options: RequestOptions) =>\n    request({ ...options, method } as any);\n\n  const makeSseFn = (method: Uppercase<HttpMethod>) => async (options: RequestOptions) => {\n    const { networkBody, opts, url } = await resolveOptions(options);\n    const optsForSse: any = { ...opts };\n    delete optsForSse.body; // body is provided via serializedBody below\n    return createSseClient({\n      ...optsForSse,\n      fetch: opts.fetch,\n      headers: opts.headers as Headers,\n      method,\n      onRequest: async (url, init) => {\n        let request = new Request(url, init);\n        request = await applyRequestInterceptors(request, opts, networkBody);\n        return request;\n      },\n      serializedBody: networkBody as BodyInit | null | undefined,\n      signal: opts.signal,\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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-ofetch/sdk-client-optional/client/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type { Auth } from '../core/auth.gen';\nexport type { QuerySerializerOptions } from '../core/bodySerializer.gen';\nexport {\n  formDataBodySerializer,\n  jsonBodySerializer,\n  urlSearchParamsBodySerializer,\n} from '../core/bodySerializer.gen';\nexport { buildClientParams } from '../core/params.gen';\nexport { serializeQueryKeyValue } from '../core/queryKeySerializer.gen';\nexport { createClient } from './client.gen';\nexport type {\n  Client,\n  ClientOptions,\n  Config,\n  CreateClientConfig,\n  Options,\n  RequestOptions,\n  RequestResult,\n  ResolvedRequestOptions,\n  ResponseStyle,\n  TDataShape,\n} from './types.gen';\nexport { createConfig, mergeHeaders } from './utils.gen';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-ofetch/sdk-client-optional/client/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { FetchOptions as OfetchOptions, ResponseType as OfetchResponseType } from 'ofetch';\nimport type { ofetch } from 'ofetch';\n\nimport type { Auth } from '../core/auth.gen';\nimport type {\n  ServerSentEventsOptions,\n  ServerSentEventsResult,\n} from '../core/serverSentEvents.gen';\nimport type { Client as CoreClient, Config as CoreConfig } from '../core/types.gen';\nimport type { Middleware } from './utils.gen';\n\nexport type ResponseStyle = 'data' | 'fields';\n\nexport interface Config<T extends ClientOptions = ClientOptions>\n  extends Omit<RequestInit, 'body' | 'headers' | 'method'>, CoreConfig {\n  /**\n   * HTTP(S) agent configuration (Node.js only). Passed through to ofetch.\n   */\n  agent?: OfetchOptions['agent'];\n  /**\n   * Base URL for all requests made by this client.\n   */\n  baseUrl?: T['baseUrl'];\n  /**\n   * Node-only proxy/agent options.\n   */\n  dispatcher?: OfetchOptions['dispatcher'];\n  /**\n   * Fetch API implementation. Used for SSE streaming. You can use this option\n   * to provide a custom fetch instance.\n   *\n   * @default globalThis.fetch\n   */\n  fetch?: typeof fetch;\n  /**\n   * Controls the native ofetch behaviour that throws `FetchError` when\n   * `response.ok === false`. We default to suppressing it to match the fetch\n   * client semantics and let `throwOnError` drive the outcome.\n   */\n  ignoreResponseError?: OfetchOptions['ignoreResponseError'];\n  // No custom fetch option: provide custom instance via `ofetch` instead\n  /**\n   * Please don't use the Fetch client for Next.js applications. The `next`\n   * options won't have any effect.\n   *\n   * Install {@link https://www.npmjs.com/package/@hey-api/client-next `@hey-api/client-next`} instead.\n   */\n  next?: never;\n  /**\n   * Custom ofetch instance created via `ofetch.create()`. If provided, it will\n   * be used for requests instead of the default `ofetch` export.\n   */\n  ofetch?: typeof ofetch;\n  /**\n   * ofetch hook called before a request is sent.\n   */\n  onRequest?: OfetchOptions['onRequest'];\n  /**\n   * ofetch hook called when a request fails before receiving a response\n   * (e.g., network errors or aborted requests).\n   */\n  onRequestError?: OfetchOptions['onRequestError'];\n  /**\n   * ofetch hook called after a successful response is received and parsed.\n   */\n  onResponse?: OfetchOptions['onResponse'];\n  /**\n   * ofetch hook called when the response indicates an error (non-ok status)\n   * or when response parsing fails.\n   */\n  onResponseError?: OfetchOptions['onResponseError'];\n  /**\n   * Return the response data parsed in a specified format. By default, `auto`\n   * will infer the appropriate method from the `Content-Type` response header.\n   * You can override this behavior with any of the {@link Body} methods.\n   * Select `stream` if you don't want to parse response data at all.\n   *\n   * @default 'auto'\n   */\n  parseAs?: 'arrayBuffer' | 'auto' | 'blob' | 'formData' | 'json' | 'stream' | 'text';\n  /** Custom response parser (ofetch). */\n  parseResponse?: OfetchOptions['parseResponse'];\n  /**\n   * Should we return only data or multiple fields (data, error, response, etc.)?\n   *\n   * @default 'fields'\n   */\n  responseStyle?: ResponseStyle;\n  /**\n   * ofetch responseType override. If provided, it will be passed directly to\n   * ofetch and take precedence over `parseAs`.\n   */\n  responseType?: OfetchResponseType;\n  /**\n   * Automatically retry failed requests.\n   */\n  retry?: OfetchOptions['retry'];\n  /**\n   * Delay (in ms) between retry attempts.\n   */\n  retryDelay?: OfetchOptions['retryDelay'];\n  /**\n   * HTTP status codes that should trigger a retry.\n   */\n  retryStatusCodes?: OfetchOptions['retryStatusCodes'];\n  /**\n   * Throw an error instead of returning it in the response?\n   *\n   * @default false\n   */\n  throwOnError?: T['throwOnError'];\n  /**\n   * Abort the request after the given milliseconds.\n   */\n  timeout?: number;\n}\n\nexport interface RequestOptions<\n  TData = unknown,\n  TResponseStyle extends ResponseStyle = 'fields',\n  ThrowOnError extends boolean = boolean,\n  Url extends string = string,\n>\n  extends\n    Config<{\n      responseStyle: TResponseStyle;\n      throwOnError: ThrowOnError;\n    }>,\n    Pick<\n      ServerSentEventsOptions<TData>,\n      | 'onSseError'\n      | 'onSseEvent'\n      | 'sseDefaultRetryDelay'\n      | 'sseMaxRetryAttempts'\n      | 'sseMaxRetryDelay'\n    > {\n  /**\n   * Any body that you want to add to your request.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/fetch#body}\n   */\n  body?: unknown;\n  path?: Record<string, unknown>;\n  query?: Record<string, unknown>;\n  /**\n   * Security mechanism(s) to use for the request.\n   */\n  security?: ReadonlyArray<Auth>;\n  url: Url;\n}\n\nexport interface ResolvedRequestOptions<\n  TResponseStyle extends ResponseStyle = 'fields',\n  ThrowOnError extends boolean = boolean,\n  Url extends string = string,\n> extends RequestOptions<unknown, TResponseStyle, ThrowOnError, Url> {\n  serializedBody?: string;\n}\n\nexport type RequestResult<\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = boolean,\n  TResponseStyle extends ResponseStyle = 'fields',\n> = ThrowOnError extends true\n  ? Promise<\n      TResponseStyle extends 'data'\n        ? TData extends Record<string, unknown>\n          ? TData[keyof TData]\n          : TData\n        : {\n            data: TData extends Record<string, unknown> ? TData[keyof TData] : TData;\n            request: Request;\n            response: Response;\n          }\n    >\n  : Promise<\n      TResponseStyle extends 'data'\n        ? (TData extends Record<string, unknown> ? TData[keyof TData] : TData) | undefined\n        : (\n            | {\n                data: TData extends Record<string, unknown> ? TData[keyof TData] : TData;\n                error: undefined;\n              }\n            | {\n                data: undefined;\n                error: TError extends Record<string, unknown> ? TError[keyof TError] : TError;\n              }\n          ) & {\n            request: Request;\n            response: Response;\n          }\n    >;\n\nexport interface ClientOptions {\n  baseUrl?: string;\n  responseStyle?: ResponseStyle;\n  throwOnError?: boolean;\n}\n\ntype MethodFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'>,\n) => RequestResult<TData, TError, ThrowOnError, TResponseStyle>;\n\ntype SseFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'>,\n) => Promise<ServerSentEventsResult<TData, TError>>;\n\ntype RequestFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'> &\n    Pick<Required<RequestOptions<TData, TResponseStyle, ThrowOnError>>, 'method'>,\n) => RequestResult<TData, TError, ThrowOnError, TResponseStyle>;\n\ntype BuildUrlFn = <\n  TData extends {\n    body?: unknown;\n    path?: Record<string, unknown>;\n    query?: Record<string, unknown>;\n    url: string;\n  },\n>(\n  options: TData & Options<TData>,\n) => string;\n\nexport type Client = CoreClient<RequestFn, Config, MethodFn, BuildUrlFn, SseFn> & {\n  interceptors: Middleware<Request, Response, unknown, ResolvedRequestOptions>;\n};\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 = ClientOptions> = (\n  override?: Config<ClientOptions & T>,\n) => Config<Required<ClientOptions> & T>;\n\nexport interface TDataShape {\n  body?: unknown;\n  headers?: unknown;\n  path?: unknown;\n  query?: unknown;\n  url: string;\n}\n\ntype OmitKeys<T, K> = Pick<T, Exclude<keyof T, K>>;\n\nexport type Options<\n  TData extends TDataShape = TDataShape,\n  ThrowOnError extends boolean = boolean,\n  TResponse = unknown,\n  TResponseStyle extends ResponseStyle = 'fields',\n> = OmitKeys<\n  RequestOptions<TResponse, TResponseStyle, ThrowOnError>,\n  'body' | 'path' | 'query' | 'url'\n> &\n  ([TData] extends [never] ? unknown : Omit<TData, 'url'>);\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-ofetch/sdk-client-optional/client/utils.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { FetchOptions as OfetchOptions, ResponseType as OfetchResponseType } from 'ofetch';\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 {\n  Client,\n  ClientOptions,\n  Config,\n  RequestOptions,\n  ResolvedRequestOptions,\n  ResponseStyle,\n} 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\n/**\n * Map our parseAs value to ofetch responseType when not explicitly provided.\n */\nexport const mapParseAsToResponseType = (\n  parseAs: Config['parseAs'] | undefined,\n  explicit?: OfetchResponseType,\n): OfetchResponseType | undefined => {\n  if (explicit) return explicit;\n  switch (parseAs) {\n    case 'arrayBuffer':\n    case 'blob':\n    case 'json':\n    case 'text':\n    case 'stream':\n      return parseAs;\n    case 'formData':\n    case 'auto':\n    default:\n      return undefined; // let ofetch auto-detect\n  }\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\n/**\n * Heuristic to detect whether a request body can be safely retried.\n */\nexport const isRepeatableBody = (body: unknown): boolean => {\n  if (body == null) return true; // undefined/null treated as no-body\n  if (typeof body === 'string') return true;\n  if (typeof URLSearchParams !== 'undefined' && body instanceof URLSearchParams) return true;\n  if (typeof Uint8Array !== 'undefined' && body instanceof Uint8Array) return true;\n  if (typeof ArrayBuffer !== 'undefined' && body instanceof ArrayBuffer) return true;\n  if (typeof Blob !== 'undefined' && body instanceof Blob) return true;\n  if (typeof FormData !== 'undefined' && body instanceof FormData) return true;\n  // Streams are not repeatable\n  if (typeof ReadableStream !== 'undefined' && body instanceof ReadableStream) return false;\n  // Default: assume non-repeatable for unknown structured bodies\n  return false;\n};\n\n/**\n * Small helper to unify data vs fields return style.\n */\nexport const wrapDataReturn = <T>(\n  data: T,\n  result: { request: Request; response: Response },\n  responseStyle: ResponseStyle | undefined,\n): T | ((T extends Record<string, unknown> ? { data: T } : { data: T }) & typeof result) =>\n  (responseStyle ?? 'fields') === 'data' ? (data as any) : ({ data, ...result } as any);\n\n/**\n * Small helper to unify error vs fields return style.\n */\nexport const wrapErrorReturn = <E>(\n  error: E,\n  result: { request: Request; response: Response },\n  responseStyle: ResponseStyle | undefined,\n):\n  | undefined\n  | ((E extends Record<string, unknown> ? { error: E } : { error: E }) & typeof result) =>\n  (responseStyle ?? 'fields') === 'data' ? undefined : ({ error, ...result } as any);\n\n/**\n * Build options for $ofetch.raw from our resolved opts and body.\n */\nexport const buildOfetchOptions = (\n  opts: ResolvedRequestOptions,\n  body: BodyInit | null | undefined,\n  responseType: OfetchResponseType | undefined,\n  retryOverride?: OfetchOptions['retry'],\n): OfetchOptions =>\n  ({\n    agent: opts.agent as OfetchOptions['agent'],\n    body,\n    credentials: opts.credentials as OfetchOptions['credentials'],\n    dispatcher: opts.dispatcher as OfetchOptions['dispatcher'],\n    headers: opts.headers as Headers,\n    ignoreResponseError: (opts.ignoreResponseError as OfetchOptions['ignoreResponseError']) ?? true,\n    method: opts.method,\n    onRequest: opts.onRequest as OfetchOptions['onRequest'],\n    onRequestError: opts.onRequestError as OfetchOptions['onRequestError'],\n    onResponse: opts.onResponse as OfetchOptions['onResponse'],\n    onResponseError: opts.onResponseError as OfetchOptions['onResponseError'],\n    parseResponse: opts.parseResponse as OfetchOptions['parseResponse'],\n    // URL already includes query\n    query: undefined,\n    responseType,\n    retry: retryOverride ?? (opts.retry as OfetchOptions['retry']),\n    retryDelay: opts.retryDelay as OfetchOptions['retryDelay'],\n    retryStatusCodes: opts.retryStatusCodes as OfetchOptions['retryStatusCodes'],\n    signal: opts.signal,\n    timeout: opts.timeout as number | undefined,\n  }) as OfetchOptions;\n\n/**\n * Parse a successful response, handling empty bodies and stream cases.\n */\nexport const parseSuccess = async (\n  response: Response,\n  opts: ResolvedRequestOptions,\n  ofetchResponseType?: OfetchResponseType,\n): Promise<unknown> => {\n  // Stream requested: return stream body\n  if (ofetchResponseType === 'stream') {\n    return response.body;\n  }\n\n  const inferredParseAs =\n    (opts.parseAs === 'auto' ? getParseAs(response.headers.get('Content-Type')) : opts.parseAs) ??\n    'json';\n\n  // Handle empty responses\n  if (response.status === 204 || response.headers.get('Content-Length') === '0') {\n    switch (inferredParseAs) {\n      case 'arrayBuffer':\n      case 'blob':\n      case 'text':\n        return await (response as any)[inferredParseAs]();\n      case 'formData':\n        return new FormData();\n      case 'stream':\n        return response.body;\n      default:\n        return {};\n    }\n  }\n\n  // Prefer ofetch-populated data unless we explicitly need raw `formData`\n  let data: unknown = (response as any)._data;\n  if (inferredParseAs === 'formData' || typeof data === 'undefined') {\n    switch (inferredParseAs) {\n      case 'arrayBuffer':\n      case 'blob':\n      case 'formData':\n      case 'text':\n        data = await (response as any)[inferredParseAs]();\n        break;\n      case 'json': {\n        // Some servers return 200 with no Content-Length and empty body.\n        // response.json() would throw; detect empty via clone().text() first.\n        const txt = await response.clone().text();\n        if (!txt) {\n          data = {};\n        } else {\n          data = await (response as any).json();\n        }\n        break;\n      }\n      case 'stream':\n        return response.body;\n    }\n  }\n\n  if (inferredParseAs === 'json') {\n    if (opts.responseValidator) {\n      await opts.responseValidator(data);\n    }\n    if (opts.responseTransformer) {\n      data = await opts.responseTransformer(data);\n    }\n  }\n\n  return data;\n};\n\n/**\n * Parse an error response payload.\n */\nexport const parseError = async (response: Response): Promise<unknown> => {\n  let error: unknown = (response as any)._data;\n  if (typeof error === 'undefined') {\n    const textError = await response.text();\n    try {\n      error = JSON.parse(textError);\n    } catch {\n      error = textError;\n    }\n  }\n  return error ?? ({} as string);\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  ignoreResponseError: true,\n  parseAs: 'auto',\n  querySerializer: defaultQuerySerializer,\n  ...override,\n});\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-ofetch/sdk-client-optional/client.gen.ts",
    "content": "// 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: 'http://localhost:3000/base' }));\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-ofetch/sdk-client-optional/core/auth.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-ofetch/sdk-client-optional/core/bodySerializer.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-ofetch/sdk-client-optional/core/params.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-ofetch/sdk-client-optional/core/pathSerializer.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-ofetch/sdk-client-optional/core/queryKeySerializer.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\n/**\n * JSON-friendly union that mirrors what Pinia Colada can hash.\n */\nexport type JsonValue =\n  | null\n  | string\n  | number\n  | boolean\n  | JsonValue[]\n  | { [key: string]: JsonValue };\n\n/**\n * Replacer that converts non-JSON values (bigint, Date, etc.) to safe substitutes.\n */\nexport const queryKeyJsonReplacer = (_key: string, value: unknown) => {\n  if (value === undefined || typeof value === 'function' || typeof value === 'symbol') {\n    return undefined;\n  }\n  if (typeof value === 'bigint') {\n    return value.toString();\n  }\n  if (value instanceof Date) {\n    return value.toISOString();\n  }\n  return value;\n};\n\n/**\n * Safely stringifies a value and parses it back into a JsonValue.\n */\nexport const stringifyToJsonValue = (input: unknown): JsonValue | undefined => {\n  try {\n    const json = JSON.stringify(input, queryKeyJsonReplacer);\n    if (json === undefined) {\n      return undefined;\n    }\n    return JSON.parse(json) as JsonValue;\n  } catch {\n    return undefined;\n  }\n};\n\n/**\n * Detects plain objects (including objects with a null prototype).\n */\nconst isPlainObject = (value: unknown): value is Record<string, unknown> => {\n  if (value === null || typeof value !== 'object') {\n    return false;\n  }\n  const prototype = Object.getPrototypeOf(value as object);\n  return prototype === Object.prototype || prototype === null;\n};\n\n/**\n * Turns URLSearchParams into a sorted JSON object for deterministic keys.\n */\nconst serializeSearchParams = (params: URLSearchParams): JsonValue => {\n  const entries = Array.from(params.entries()).sort(([a], [b]) => a.localeCompare(b));\n  const result: Record<string, JsonValue> = {};\n\n  for (const [key, value] of entries) {\n    const existing = result[key];\n    if (existing === undefined) {\n      result[key] = value;\n      continue;\n    }\n\n    if (Array.isArray(existing)) {\n      (existing as string[]).push(value);\n    } else {\n      result[key] = [existing, value];\n    }\n  }\n\n  return result;\n};\n\n/**\n * Normalizes any accepted value into a JSON-friendly shape for query keys.\n */\nexport const serializeQueryKeyValue = (value: unknown): JsonValue | undefined => {\n  if (value === null) {\n    return null;\n  }\n\n  if (typeof value === 'string' || typeof value === 'number' || typeof value === 'boolean') {\n    return value;\n  }\n\n  if (value === undefined || typeof value === 'function' || typeof value === 'symbol') {\n    return undefined;\n  }\n\n  if (typeof value === 'bigint') {\n    return value.toString();\n  }\n\n  if (value instanceof Date) {\n    return value.toISOString();\n  }\n\n  if (Array.isArray(value)) {\n    return stringifyToJsonValue(value);\n  }\n\n  if (typeof URLSearchParams !== 'undefined' && value instanceof URLSearchParams) {\n    return serializeSearchParams(value);\n  }\n\n  if (isPlainObject(value)) {\n    return stringifyToJsonValue(value);\n  }\n\n  return undefined;\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-ofetch/sdk-client-optional/core/serverSentEvents.gen.ts",
    "content": "// 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 const 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            // Normalize line endings: CRLF -> LF, then CR -> LF\n            buffer = buffer.replace(/\\r\\n/g, '\\n').replace(/\\r/g, '\\n');\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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-ofetch/sdk-client-optional/core/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { Auth, AuthToken } from './auth.gen';\nimport type { BodySerializer, QuerySerializer, QuerySerializerOptions } from './bodySerializer.gen';\n\nexport type HttpMethod =\n  | 'connect'\n  | 'delete'\n  | 'get'\n  | 'head'\n  | 'options'\n  | 'patch'\n  | 'post'\n  | 'put'\n  | 'trace';\n\nexport type Client<\n  RequestFn = never,\n  Config = unknown,\n  MethodFn = never,\n  BuildUrlFn = never,\n  SseFn = never,\n> = {\n  /**\n   * Returns the final request URL.\n   */\n  buildUrl: BuildUrlFn;\n  getConfig: () => Config;\n  request: RequestFn;\n  setConfig: (config: Config) => Config;\n} & {\n  [K in HttpMethod]: MethodFn;\n} & ([SseFn] extends [never] ? { sse?: never } : { sse: { [K in HttpMethod]: SseFn } });\n\nexport interface Config {\n  /**\n   * Auth token or a function returning auth token. The resolved value will be\n   * added to the request payload as defined by its `security` array.\n   */\n  auth?: ((auth: Auth) => Promise<AuthToken> | AuthToken) | AuthToken;\n  /**\n   * A function for serializing request body parameter. By default,\n   * {@link JSON.stringify()} will be used.\n   */\n  bodySerializer?: BodySerializer | null;\n  /**\n   * An object containing any HTTP headers that you want to pre-populate your\n   * `Headers` object with.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/Headers/Headers#init See more}\n   */\n  headers?:\n    | RequestInit['headers']\n    | Record<\n        string,\n        string | number | boolean | (string | number | boolean)[] | null | undefined | unknown\n      >;\n  /**\n   * The request method.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/fetch#method See more}\n   */\n  method?: Uppercase<HttpMethod>;\n  /**\n   * A function for serializing request query parameters. By default, arrays\n   * will be exploded in form style, objects will be exploded in deepObject\n   * style, and reserved characters are percent-encoded.\n   *\n   * This method will have no effect if the native `paramsSerializer()` Axios\n   * API function is used.\n   *\n   * {@link https://swagger.io/docs/specification/serialization/#query View examples}\n   */\n  querySerializer?: QuerySerializer | QuerySerializerOptions;\n  /**\n   * A function validating request data. This is useful if you want to ensure\n   * the request conforms to the desired shape, so it can be safely sent to\n   * the server.\n   */\n  requestValidator?: (data: unknown) => Promise<unknown>;\n  /**\n   * A function transforming response data before it's returned. This is useful\n   * for post-processing data, e.g. converting ISO strings into Date objects.\n   */\n  responseTransformer?: (data: unknown) => Promise<unknown>;\n  /**\n   * A function validating response data. This is useful if you want to ensure\n   * the response conforms to the desired shape, so it can be safely passed to\n   * the transformers and returned to the user.\n   */\n  responseValidator?: (data: unknown) => Promise<unknown>;\n}\n\ntype IsExactlyNeverOrNeverUndefined<T> = [T] extends [never]\n  ? true\n  : [T] extends [never | undefined]\n    ? [undefined] extends [T]\n      ? false\n      : true\n    : false;\n\nexport type OmitNever<T extends Record<string, unknown>> = {\n  [K in keyof T as IsExactlyNeverOrNeverUndefined<T[K]> extends true ? never : K]: T[K];\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-ofetch/sdk-client-optional/core/utils.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-ofetch/sdk-client-optional/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport { apiVVersionODataControllerCount, callToTestOrderOfParams, callWithDefaultOptionalParameters, callWithDefaultParameters, callWithDescriptions, callWithDuplicateResponses, callWithNoContentResponse, callWithParameters, callWithResponse, callWithResponseAndNoContentResponse, callWithResponses, callWithResultFromHeader, callWithWeirdParameterNames, collectionFormat, complexParams, complexTypes, deleteCallWithoutParametersAndResponse, deleteFoo, deprecatedCall, dummyA, dummyB, duplicateName, duplicateName2, duplicateName3, duplicateName4, export_, fileResponse, fooWow, getApiVbyApiVersionSimpleOperation, getCallWithOptionalParam, getCallWithoutParametersAndResponse, headCallWithoutParametersAndResponse, import_, multipartRequest, multipartResponse, nonAsciiæøåÆøÅöôêÊ字符串, type Options, optionsCallWithoutParametersAndResponse, patchApiVbyApiVersionNoTag, patchCallWithoutParametersAndResponse, postApiVbyApiVersionFormData, postApiVbyApiVersionRequestBody, postCallWithOptionalParam, postCallWithoutParametersAndResponse, putCallWithoutParametersAndResponse, putWithFormUrlEncoded, testErrorCode, types, uploadFile } from './sdk.gen';\nexport type { _3eNum1Период, _400, AdditionalPropertiesIntegerIssue, AdditionalPropertiesUnknownIssue, AdditionalPropertiesUnknownIssue2, AdditionalPropertiesUnknownIssue3, AdditionalPropertiesUnknownIssueWritable, AnyOfAnyAndNull, AnyOfArrays, ApiVVersionODataControllerCountData, ApiVVersionODataControllerCountResponse, ApiVVersionODataControllerCountResponses, ArrayWithAnyOfProperties, ArrayWithArray, ArrayWithBooleans, ArrayWithNumbers, ArrayWithProperties, ArrayWithReferences, ArrayWithStrings, CallToTestOrderOfParamsData, CallWithDefaultOptionalParametersData, CallWithDefaultParametersData, CallWithDescriptionsData, CallWithDuplicateResponsesData, CallWithDuplicateResponsesError, CallWithDuplicateResponsesErrors, CallWithDuplicateResponsesResponse, CallWithDuplicateResponsesResponses, CallWithNoContentResponseData, CallWithNoContentResponseResponse, CallWithNoContentResponseResponses, CallWithParametersData, CallWithResponseAndNoContentResponseData, CallWithResponseAndNoContentResponseResponse, CallWithResponseAndNoContentResponseResponses, CallWithResponseData, CallWithResponseResponse, CallWithResponseResponses, CallWithResponsesData, CallWithResponsesError, CallWithResponsesErrors, CallWithResponsesResponse, CallWithResponsesResponses, CallWithResultFromHeaderData, CallWithResultFromHeaderErrors, CallWithResultFromHeaderResponses, CallWithWeirdParameterNamesData, CamelCaseCommentWithBreaks, CharactersInDescription, ClientOptions, CollectionFormatData, CommentWithBackticks, CommentWithBackticksAndQuotes, CommentWithBreaks, CommentWithExpressionPlaceholders, CommentWithQuotes, CommentWithReservedCharacters, CommentWithSlashes, ComplexParamsData, ComplexParamsResponse, ComplexParamsResponses, ComplexTypesData, ComplexTypesErrors, ComplexTypesResponse, ComplexTypesResponses, CompositionBaseModel, CompositionExtendedModel, CompositionWithAllOfAndNullable, CompositionWithAnyOf, CompositionWithAnyOfAndNullable, CompositionWithAnyOfAnonymous, CompositionWithNestedAnyAndTypeNull, CompositionWithNestedAnyOfAndNull, CompositionWithOneOf, CompositionWithOneOfAndComplexArrayDictionary, CompositionWithOneOfAndNullable, CompositionWithOneOfAndProperties, CompositionWithOneOfAndSimpleArrayDictionary, CompositionWithOneOfAndSimpleDictionary, CompositionWithOneOfAnonymous, CompositionWithOneOfDiscriminator, ConstValue, Default, DeleteCallWithoutParametersAndResponseData, DeleteFooData, DeleteFooData2, DeleteFooData3, DeprecatedCallData, DeprecatedModel, DictionaryWithArray, DictionaryWithDictionary, DictionaryWithProperties, DictionaryWithPropertiesAndAdditionalProperties, DictionaryWithReference, DictionaryWithString, DummyAData, DummyAResponse, DummyAResponses, DummyBData, DummyBResponse, DummyBResponses, DuplicateName2Data, DuplicateName3Data, DuplicateName4Data, DuplicateNameData, EnumFromDescription, EnumWithExtensions, EnumWithNumbers, EnumWithReplacedCharacters, EnumWithStrings, EnumWithXEnumNames, ExportData, ExternalRefA, ExternalRefB, ExternalSharedModel, File, FileResponseData, FileResponseResponse, FileResponseResponses, FileWritable, FooWowData, FooWowResponses, FreeFormObjectWithAdditionalPropertiesEqEmptyObject, FreeFormObjectWithAdditionalPropertiesEqTrue, FreeFormObjectWithoutAdditionalProperties, GenericSchemaDuplicateIssue1SystemBoolean, GenericSchemaDuplicateIssue1SystemBooleanWritable, GenericSchemaDuplicateIssue1SystemString, GenericSchemaDuplicateIssue1SystemStringWritable, GetApiVbyApiVersionSimpleOperationData, GetApiVbyApiVersionSimpleOperationError, GetApiVbyApiVersionSimpleOperationErrors, GetApiVbyApiVersionSimpleOperationResponse, GetApiVbyApiVersionSimpleOperationResponses, GetCallWithOptionalParamData, GetCallWithoutParametersAndResponseData, HeadCallWithoutParametersAndResponseData, Import, ImportData, ImportResponse, ImportResponses, IoK8sApimachineryPkgApisMetaV1DeleteOptions, IoK8sApimachineryPkgApisMetaV1Preconditions, ModelCircle, ModelFromZendesk, ModelSquare, ModelThatExtends, ModelThatExtendsExtends, ModelWithAdditionalPropertiesEqTrue, ModelWithAdditionalPropertiesRef, ModelWithAnyOfConstantSizeArray, ModelWithAnyOfConstantSizeArrayAndIntersect, ModelWithAnyOfConstantSizeArrayNullable, ModelWithAnyOfConstantSizeArrayWithNSizeAndOptions, ModelWithAnyOfConstantSizeArrayWithNSizeAndOptionsWritable, ModelWithArray, ModelWithArrayReadOnlyAndWriteOnly, ModelWithArrayReadOnlyAndWriteOnlyWritable, ModelWithBackticksInDescription, ModelWithBoolean, ModelWithCircularReference, ModelWithConst, ModelWithConstantSizeArray, ModelWithDictionary, ModelWithDuplicateImports, ModelWithDuplicateProperties, ModelWithEnum, ModelWithEnumFromDescription, ModelWithEnumWithHyphen, ModelWithInteger, ModelWithNestedArrayEnums, ModelWithNestedArrayEnumsData, ModelWithNestedArrayEnumsDataBar, ModelWithNestedArrayEnumsDataFoo, ModelWithNestedCompositionEnums, ModelWithNestedEnums, ModelWithNestedProperties, ModelWithNullableObject, ModelWithNullableString, ModelWithNumericEnumUnion, ModelWithOneOfAndProperties, ModelWithOneOfEnum, ModelWithOrderedProperties, ModelWithPattern, ModelWithPatternWritable, ModelWithPrefixItemsConstantSizeArray, ModelWithProperties, ModelWithPropertiesWritable, ModelWithReadOnlyAndWriteOnly, ModelWithReadOnlyAndWriteOnlyWritable, ModelWithReference, ModelWithReferenceWritable, ModelWithString, ModelWithStringError, MultipartRequestData, MultipartResponseData, MultipartResponseResponse, MultipartResponseResponses, NestedAnyOfArraysNullable, NonAsciiæøåÆøÅöôêÊ字符串Data, NonAsciiæøåÆøÅöôêÊ字符串Response, NonAsciiæøåÆøÅöôêÊ字符串Responses, NonAsciiStringæøåÆøÅöôêÊ字符串, NullableObject, OneOfAllOfIssue, OneOfAllOfIssueWritable, OptionsCallWithoutParametersAndResponseData, Pageable, ParameterSimpleParameterUnused, PatchApiVbyApiVersionNoTagData, PatchApiVbyApiVersionNoTagResponses, PatchCallWithoutParametersAndResponseData, PostApiVbyApiVersionFormDataData, PostApiVbyApiVersionRequestBodyData, PostCallWithOptionalParamData, PostCallWithOptionalParamResponse, PostCallWithOptionalParamResponses, PostCallWithoutParametersAndResponseData, PostServiceWithEmptyTagResponse, PostServiceWithEmptyTagResponse2, PutCallWithoutParametersAndResponseData, PutWithFormUrlEncodedData, SchemaWithFormRestrictedKeys, SimpleBoolean, SimpleFile, SimpleFormData, SimpleInteger, SimpleParameter, SimpleReference, SimpleRequestBody, SimpleString, SimpleStringWithPattern, TestErrorCodeData, TestErrorCodeErrors, TestErrorCodeResponses, TypesData, TypesResponse, TypesResponses, UploadFileData, UploadFileResponse, UploadFileResponses, XFooBar } from './types.gen';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-ofetch/sdk-client-optional/sdk.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport { type Client, formDataBodySerializer, type Options as Options2, type TDataShape, urlSearchParamsBodySerializer } from './client';\nimport { client } from './client.gen';\nimport type { ApiVVersionODataControllerCountData, ApiVVersionODataControllerCountResponses, CallToTestOrderOfParamsData, CallWithDefaultOptionalParametersData, CallWithDefaultParametersData, CallWithDescriptionsData, CallWithDuplicateResponsesData, CallWithDuplicateResponsesErrors, CallWithDuplicateResponsesResponses, CallWithNoContentResponseData, CallWithNoContentResponseResponses, CallWithParametersData, CallWithResponseAndNoContentResponseData, CallWithResponseAndNoContentResponseResponses, CallWithResponseData, CallWithResponseResponses, CallWithResponsesData, CallWithResponsesErrors, CallWithResponsesResponses, CallWithResultFromHeaderData, CallWithResultFromHeaderErrors, CallWithResultFromHeaderResponses, CallWithWeirdParameterNamesData, CollectionFormatData, ComplexParamsData, ComplexParamsResponses, ComplexTypesData, ComplexTypesErrors, ComplexTypesResponses, DeleteCallWithoutParametersAndResponseData, DeleteFooData3, DeprecatedCallData, DummyAData, DummyAResponses, DummyBData, DummyBResponses, DuplicateName2Data, DuplicateName3Data, DuplicateName4Data, DuplicateNameData, ExportData, FileResponseData, FileResponseResponses, FooWowData, FooWowResponses, GetApiVbyApiVersionSimpleOperationData, GetApiVbyApiVersionSimpleOperationErrors, GetApiVbyApiVersionSimpleOperationResponses, GetCallWithOptionalParamData, GetCallWithoutParametersAndResponseData, HeadCallWithoutParametersAndResponseData, ImportData, ImportResponses, MultipartRequestData, MultipartResponseData, MultipartResponseResponses, NonAsciiæøåÆøÅöôêÊ字符串Data, NonAsciiæøåÆøÅöôêÊ字符串Responses, OptionsCallWithoutParametersAndResponseData, PatchApiVbyApiVersionNoTagData, PatchApiVbyApiVersionNoTagResponses, PatchCallWithoutParametersAndResponseData, PostApiVbyApiVersionFormDataData, PostApiVbyApiVersionRequestBodyData, PostCallWithOptionalParamData, PostCallWithOptionalParamResponses, PostCallWithoutParametersAndResponseData, PutCallWithoutParametersAndResponseData, PutWithFormUrlEncodedData, TestErrorCodeData, TestErrorCodeErrors, TestErrorCodeResponses, TypesData, TypesResponses, UploadFileData, UploadFileResponses } from './types.gen';\n\nexport type Options<TData extends TDataShape = TDataShape, ThrowOnError extends boolean = boolean> = Options2<TData, ThrowOnError> & {\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\nexport const export_ = <ThrowOnError extends boolean = false>(options?: Options<ExportData, ThrowOnError>) => (options?.client ?? client).get<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/no+tag', ...options });\n\nexport const patchApiVbyApiVersionNoTag = <ThrowOnError extends boolean = false>(options?: Options<PatchApiVbyApiVersionNoTagData, ThrowOnError>) => (options?.client ?? client).patch<PatchApiVbyApiVersionNoTagResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/no+tag', ...options });\n\nexport const import_ = <ThrowOnError extends boolean = false>(options: Options<ImportData, ThrowOnError>) => (options.client ?? client).post<ImportResponses, unknown, ThrowOnError>({\n    url: '/api/v{api-version}/no+tag',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options.headers\n    }\n});\n\nexport const fooWow = <ThrowOnError extends boolean = false>(options?: Options<FooWowData, ThrowOnError>) => (options?.client ?? client).put<FooWowResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/no+tag', ...options });\n\nexport const apiVVersionODataControllerCount = <ThrowOnError extends boolean = false>(options?: Options<ApiVVersionODataControllerCountData, ThrowOnError>) => (options?.client ?? client).get<ApiVVersionODataControllerCountResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple/$count', ...options });\n\nexport const getApiVbyApiVersionSimpleOperation = <ThrowOnError extends boolean = false>(options: Options<GetApiVbyApiVersionSimpleOperationData, ThrowOnError>) => (options.client ?? client).get<GetApiVbyApiVersionSimpleOperationResponses, GetApiVbyApiVersionSimpleOperationErrors, ThrowOnError>({ url: '/api/v{api-version}/simple:operation', ...options });\n\nexport const deleteCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<DeleteCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).delete<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const getCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<GetCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).get<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const headCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<HeadCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).head<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const optionsCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<OptionsCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).options<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const patchCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<PatchCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).patch<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const postCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<PostCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).post<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const putCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<PutCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).put<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const deleteFoo = <ThrowOnError extends boolean = false>(options: Options<DeleteFooData3, ThrowOnError>) => (options.client ?? client).delete<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/foo/{foo_param}/bar/{BarParam}', ...options });\n\nexport const callWithDescriptions = <ThrowOnError extends boolean = false>(options?: Options<CallWithDescriptionsData, ThrowOnError>) => (options?.client ?? client).post<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/descriptions', ...options });\n\n/**\n * @deprecated\n */\nexport const deprecatedCall = <ThrowOnError extends boolean = false>(options: Options<DeprecatedCallData, ThrowOnError>) => (options.client ?? client).post<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/parameters/deprecated', ...options });\n\nexport const callWithParameters = <ThrowOnError extends boolean = false>(options: Options<CallWithParametersData, ThrowOnError>) => (options.client ?? client).post<unknown, unknown, ThrowOnError>({\n    url: '/api/v{api-version}/parameters/{parameterPath}',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options.headers\n    }\n});\n\nexport const callWithWeirdParameterNames = <ThrowOnError extends boolean = false>(options: Options<CallWithWeirdParameterNamesData, ThrowOnError>) => (options.client ?? client).post<unknown, unknown, ThrowOnError>({\n    url: '/api/v{api-version}/parameters/{parameter.path.1}/{parameter-path-2}/{PARAMETER-PATH-3}',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options.headers\n    }\n});\n\nexport const getCallWithOptionalParam = <ThrowOnError extends boolean = false>(options: Options<GetCallWithOptionalParamData, ThrowOnError>) => (options.client ?? client).get<unknown, unknown, ThrowOnError>({\n    url: '/api/v{api-version}/parameters',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options.headers\n    }\n});\n\nexport const postCallWithOptionalParam = <ThrowOnError extends boolean = false>(options: Options<PostCallWithOptionalParamData, ThrowOnError>) => (options.client ?? client).post<PostCallWithOptionalParamResponses, unknown, ThrowOnError>({\n    url: '/api/v{api-version}/parameters',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options.headers\n    }\n});\n\nexport const postApiVbyApiVersionRequestBody = <ThrowOnError extends boolean = false>(options?: Options<PostApiVbyApiVersionRequestBodyData, ThrowOnError>) => (options?.client ?? client).post<unknown, unknown, ThrowOnError>({\n    url: '/api/v{api-version}/requestBody',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options?.headers\n    }\n});\n\nexport const postApiVbyApiVersionFormData = <ThrowOnError extends boolean = false>(options?: Options<PostApiVbyApiVersionFormDataData, ThrowOnError>) => (options?.client ?? client).post<unknown, unknown, ThrowOnError>({\n    ...formDataBodySerializer,\n    url: '/api/v{api-version}/formData',\n    ...options,\n    headers: {\n        'Content-Type': null,\n        ...options?.headers\n    }\n});\n\nexport const callWithDefaultParameters = <ThrowOnError extends boolean = false>(options?: Options<CallWithDefaultParametersData, ThrowOnError>) => (options?.client ?? client).get<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/defaults', ...options });\n\nexport const callWithDefaultOptionalParameters = <ThrowOnError extends boolean = false>(options?: Options<CallWithDefaultOptionalParametersData, ThrowOnError>) => (options?.client ?? client).post<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/defaults', ...options });\n\nexport const callToTestOrderOfParams = <ThrowOnError extends boolean = false>(options: Options<CallToTestOrderOfParamsData, ThrowOnError>) => (options.client ?? client).put<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/defaults', ...options });\n\nexport const duplicateName = <ThrowOnError extends boolean = false>(options?: Options<DuplicateNameData, ThrowOnError>) => (options?.client ?? client).delete<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/duplicate', ...options });\n\nexport const duplicateName2 = <ThrowOnError extends boolean = false>(options?: Options<DuplicateName2Data, ThrowOnError>) => (options?.client ?? client).get<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/duplicate', ...options });\n\nexport const duplicateName3 = <ThrowOnError extends boolean = false>(options?: Options<DuplicateName3Data, ThrowOnError>) => (options?.client ?? client).post<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/duplicate', ...options });\n\nexport const duplicateName4 = <ThrowOnError extends boolean = false>(options?: Options<DuplicateName4Data, ThrowOnError>) => (options?.client ?? client).put<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/duplicate', ...options });\n\nexport const callWithNoContentResponse = <ThrowOnError extends boolean = false>(options?: Options<CallWithNoContentResponseData, ThrowOnError>) => (options?.client ?? client).get<CallWithNoContentResponseResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/no-content', ...options });\n\nexport const callWithResponseAndNoContentResponse = <ThrowOnError extends boolean = false>(options?: Options<CallWithResponseAndNoContentResponseData, ThrowOnError>) => (options?.client ?? client).get<CallWithResponseAndNoContentResponseResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/multiple-tags/response-and-no-content', ...options });\n\nexport const dummyA = <ThrowOnError extends boolean = false>(options?: Options<DummyAData, ThrowOnError>) => (options?.client ?? client).get<DummyAResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/multiple-tags/a', ...options });\n\nexport const dummyB = <ThrowOnError extends boolean = false>(options?: Options<DummyBData, ThrowOnError>) => (options?.client ?? client).get<DummyBResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/multiple-tags/b', ...options });\n\nexport const callWithResponse = <ThrowOnError extends boolean = false>(options?: Options<CallWithResponseData, ThrowOnError>) => (options?.client ?? client).get<CallWithResponseResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/response', ...options });\n\nexport const callWithDuplicateResponses = <ThrowOnError extends boolean = false>(options?: Options<CallWithDuplicateResponsesData, ThrowOnError>) => (options?.client ?? client).post<CallWithDuplicateResponsesResponses, CallWithDuplicateResponsesErrors, ThrowOnError>({ url: '/api/v{api-version}/response', ...options });\n\nexport const callWithResponses = <ThrowOnError extends boolean = false>(options?: Options<CallWithResponsesData, ThrowOnError>) => (options?.client ?? client).put<CallWithResponsesResponses, CallWithResponsesErrors, ThrowOnError>({ url: '/api/v{api-version}/response', ...options });\n\nexport const collectionFormat = <ThrowOnError extends boolean = false>(options: Options<CollectionFormatData, ThrowOnError>) => (options.client ?? client).get<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/collectionFormat', ...options });\n\nexport const types = <ThrowOnError extends boolean = false>(options: Options<TypesData, ThrowOnError>) => (options.client ?? client).get<TypesResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/types', ...options });\n\nexport const uploadFile = <ThrowOnError extends boolean = false>(options: Options<UploadFileData, ThrowOnError>) => (options.client ?? client).post<UploadFileResponses, unknown, ThrowOnError>({\n    ...urlSearchParamsBodySerializer,\n    url: '/api/v{api-version}/upload',\n    ...options,\n    headers: {\n        'Content-Type': 'application/x-www-form-urlencoded',\n        ...options.headers\n    }\n});\n\nexport const fileResponse = <ThrowOnError extends boolean = false>(options: Options<FileResponseData, ThrowOnError>) => (options.client ?? client).get<FileResponseResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/file/{id}', ...options });\n\nexport const complexTypes = <ThrowOnError extends boolean = false>(options: Options<ComplexTypesData, ThrowOnError>) => (options.client ?? client).get<ComplexTypesResponses, ComplexTypesErrors, ThrowOnError>({\n    querySerializer: { parameters: { parameterObject: { object: { style: 'form' } } } },\n    url: '/api/v{api-version}/complex',\n    ...options\n});\n\nexport const multipartResponse = <ThrowOnError extends boolean = false>(options?: Options<MultipartResponseData, ThrowOnError>) => (options?.client ?? client).get<MultipartResponseResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/multipart', ...options });\n\nexport const multipartRequest = <ThrowOnError extends boolean = false>(options?: Options<MultipartRequestData, ThrowOnError>) => (options?.client ?? client).post<unknown, unknown, ThrowOnError>({\n    ...formDataBodySerializer,\n    url: '/api/v{api-version}/multipart',\n    ...options,\n    headers: {\n        'Content-Type': null,\n        ...options?.headers\n    }\n});\n\nexport const complexParams = <ThrowOnError extends boolean = false>(options: Options<ComplexParamsData, ThrowOnError>) => (options.client ?? client).put<ComplexParamsResponses, unknown, ThrowOnError>({\n    url: '/api/v{api-version}/complex/{id}',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json-patch+json',\n        ...options.headers\n    }\n});\n\nexport const callWithResultFromHeader = <ThrowOnError extends boolean = false>(options?: Options<CallWithResultFromHeaderData, ThrowOnError>) => (options?.client ?? client).post<CallWithResultFromHeaderResponses, CallWithResultFromHeaderErrors, ThrowOnError>({ url: '/api/v{api-version}/header', ...options });\n\nexport const testErrorCode = <ThrowOnError extends boolean = false>(options: Options<TestErrorCodeData, ThrowOnError>) => (options.client ?? client).post<TestErrorCodeResponses, TestErrorCodeErrors, ThrowOnError>({ url: '/api/v{api-version}/error', ...options });\n\nexport const nonAsciiæøåÆøÅöôêÊ字符串 = <ThrowOnError extends boolean = false>(options: Options<NonAsciiæøåÆøÅöôêÊ字符串Data, ThrowOnError>) => (options.client ?? client).post<NonAsciiæøåÆøÅöôêÊ字符串Responses, unknown, ThrowOnError>({ url: '/api/v{api-version}/non-ascii-æøåÆØÅöôêÊ字符串', ...options });\n\n/**\n * Login User\n */\nexport const putWithFormUrlEncoded = <ThrowOnError extends boolean = false>(options: Options<PutWithFormUrlEncodedData, ThrowOnError>) => (options.client ?? client).put<unknown, unknown, ThrowOnError>({\n    ...urlSearchParamsBodySerializer,\n    url: '/api/v{api-version}/non-ascii-æøåÆØÅöôêÊ字符串',\n    ...options,\n    headers: {\n        'Content-Type': 'application/x-www-form-urlencoded',\n        ...options.headers\n    }\n});\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-ofetch/sdk-client-optional/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type ClientOptions = {\n    baseUrl: 'http://localhost:3000/base' | (string & {});\n};\n\n/**\n * Model with number-only name\n */\nexport type _400 = string;\n\n/**\n * External ref to shared model (A)\n */\nexport type ExternalRefA = ExternalSharedModel;\n\n/**\n * External ref to shared model (B)\n */\nexport type ExternalRefB = ExternalSharedModel;\n\n/**\n * Testing multiline comments in string: First line\n * Second line\n *\n * Fourth line\n */\nexport type CamelCaseCommentWithBreaks = number;\n\n/**\n * Testing multiline comments in string: First line\n * Second line\n *\n * Fourth line\n */\nexport type CommentWithBreaks = number;\n\n/**\n * Testing backticks in string: `backticks` and ```multiple backticks``` should work\n */\nexport type CommentWithBackticks = number;\n\n/**\n * Testing backticks and quotes in string: `backticks`, 'quotes', \"double quotes\" and ```multiple backticks``` should work\n */\nexport type CommentWithBackticksAndQuotes = number;\n\n/**\n * Testing slashes in string: \\backwards\\\\\\ and /forwards/// should work\n */\nexport type CommentWithSlashes = number;\n\n/**\n * Testing expression placeholders in string: ${expression} should work\n */\nexport type CommentWithExpressionPlaceholders = number;\n\n/**\n * Testing quotes in string: 'single quote''' and \"double quotes\"\"\" should work\n */\nexport type CommentWithQuotes = number;\n\n/**\n * Testing reserved characters in string: * inline * and ** inline ** should work\n */\nexport type CommentWithReservedCharacters = number;\n\n/**\n * This is a simple number\n */\nexport type SimpleInteger = number;\n\n/**\n * This is a simple boolean\n */\nexport type SimpleBoolean = boolean;\n\n/**\n * This is a simple string\n */\nexport type SimpleString = string;\n\n/**\n * A string with non-ascii (unicode) characters valid in typescript identifiers (æøåÆØÅöÔèÈ字符串)\n */\nexport type NonAsciiStringæøåÆøÅöôêÊ字符串 = string;\n\n/**\n * This is a simple file\n */\nexport type SimpleFile = Blob | File;\n\n/**\n * This is a simple reference\n */\nexport type SimpleReference = ModelWithString;\n\n/**\n * This is a simple string\n */\nexport type SimpleStringWithPattern = string | null;\n\n/**\n * This is a simple enum with strings\n */\nexport type EnumWithStrings = 'Success' | 'Warning' | 'Error' | '\\'Single Quote\\'' | '\"Double Quotes\"' | 'Non-ascii: øæåôöØÆÅÔÖ字符串';\n\nexport type EnumWithReplacedCharacters = '\\'Single Quote\\'' | '\"Double Quotes\"' | 'øæåôöØÆÅÔÖ字符串' | 3.1 | '';\n\n/**\n * This is a simple enum with numbers\n */\nexport type EnumWithNumbers = 1 | 2 | 3 | 1.1 | 1.2 | 1.3 | 100 | 200 | 300 | -100 | -200 | -300 | -1.1 | -1.2 | -1.3;\n\n/**\n * Success=1,Warning=2,Error=3\n */\nexport type EnumFromDescription = number;\n\n/**\n * This is a simple enum with numbers\n */\nexport type EnumWithExtensions = 200 | 400 | 500;\n\nexport type EnumWithXEnumNames = 0 | 1 | 2;\n\n/**\n * This is a simple array with numbers\n */\nexport type ArrayWithNumbers = Array<number>;\n\n/**\n * This is a simple array with booleans\n */\nexport type ArrayWithBooleans = Array<boolean>;\n\n/**\n * This is a simple array with strings\n */\nexport type ArrayWithStrings = Array<string>;\n\n/**\n * This is a simple array with references\n */\nexport type ArrayWithReferences = Array<ModelWithString>;\n\n/**\n * This is a simple array containing an array\n */\nexport type ArrayWithArray = Array<Array<ModelWithString>>;\n\n/**\n * This is a simple array with properties\n */\nexport type ArrayWithProperties = Array<{\n    '16x16'?: CamelCaseCommentWithBreaks;\n    bar?: string;\n}>;\n\n/**\n * This is a simple array with any of properties\n */\nexport type ArrayWithAnyOfProperties = Array<{\n    foo?: string;\n} | {\n    bar?: string;\n}>;\n\nexport type AnyOfAnyAndNull = {\n    data?: unknown | null;\n};\n\n/**\n * This is a simple array with any of properties\n */\nexport type AnyOfArrays = {\n    results?: Array<{\n        foo?: string;\n    } | {\n        bar?: string;\n    }>;\n};\n\n/**\n * This is a string dictionary\n */\nexport type DictionaryWithString = {\n    [key: string]: string;\n};\n\nexport type DictionaryWithPropertiesAndAdditionalProperties = {\n    foo?: number;\n    bar?: boolean;\n    [key: string]: string | number | boolean | undefined;\n};\n\n/**\n * This is a string reference\n */\nexport type DictionaryWithReference = {\n    [key: string]: ModelWithString;\n};\n\n/**\n * This is a complex dictionary\n */\nexport type DictionaryWithArray = {\n    [key: string]: Array<ModelWithString>;\n};\n\n/**\n * This is a string dictionary\n */\nexport type DictionaryWithDictionary = {\n    [key: string]: {\n        [key: string]: string;\n    };\n};\n\n/**\n * This is a complex dictionary\n */\nexport type DictionaryWithProperties = {\n    [key: string]: {\n        foo?: string;\n        bar?: string;\n    };\n};\n\n/**\n * This is a model with one number property\n */\nexport type ModelWithInteger = {\n    /**\n     * This is a simple number property\n     */\n    prop?: number;\n};\n\n/**\n * This is a model with one boolean property\n */\nexport type ModelWithBoolean = {\n    /**\n     * This is a simple boolean property\n     */\n    prop?: boolean;\n};\n\n/**\n * This is a model with one string property\n */\nexport type ModelWithString = {\n    /**\n     * This is a simple string property\n     */\n    prop?: string;\n};\n\n/**\n * This is a model with one string property\n */\nexport type ModelWithStringError = {\n    /**\n     * This is a simple string property\n     */\n    prop?: string;\n};\n\n/**\n * `Comment` or `VoiceComment`. The JSON object for adding voice comments to tickets is different. See [Adding voice comments to tickets](/documentation/ticketing/managing-tickets/adding-voice-comments-to-tickets)\n */\nexport type ModelFromZendesk = string;\n\n/**\n * This is a model with one string property\n */\nexport type ModelWithNullableString = {\n    /**\n     * This is a simple string property\n     */\n    nullableProp1?: string | null;\n    /**\n     * This is a simple string property\n     */\n    nullableRequiredProp1: string | null;\n    /**\n     * This is a simple string property\n     */\n    nullableProp2?: string | null;\n    /**\n     * This is a simple string property\n     */\n    nullableRequiredProp2: string | null;\n    /**\n     * This is a simple enum with strings\n     */\n    'foo_bar-enum'?: 'Success' | 'Warning' | 'Error' | 'ØÆÅ字符串';\n};\n\n/**\n * This is a model with one enum\n */\nexport type ModelWithEnum = {\n    /**\n     * This is a simple enum with strings\n     */\n    'foo_bar-enum'?: 'Success' | 'Warning' | 'Error' | 'ØÆÅ字符串';\n    /**\n     * These are the HTTP error code enums\n     */\n    statusCode?: '100' | '200 FOO' | '300 FOO_BAR' | '400 foo-bar' | '500 foo.bar' | '600 foo&bar';\n    /**\n     * Simple boolean enum\n     */\n    bool?: true;\n};\n\n/**\n * This is a model with one enum with escaped name\n */\nexport type ModelWithEnumWithHyphen = {\n    /**\n     * Foo-Bar-Baz-Qux\n     */\n    'foo-bar-baz-qux'?: '3.0';\n};\n\n/**\n * This is a model with one enum\n */\nexport type ModelWithEnumFromDescription = {\n    /**\n     * Success=1,Warning=2,Error=3\n     */\n    test?: number;\n};\n\n/**\n * This is a model with nested enums\n */\nexport type ModelWithNestedEnums = {\n    dictionaryWithEnum?: {\n        [key: string]: 'Success' | 'Warning' | 'Error';\n    };\n    dictionaryWithEnumFromDescription?: {\n        [key: string]: number;\n    };\n    arrayWithEnum?: Array<'Success' | 'Warning' | 'Error'>;\n    arrayWithDescription?: Array<number>;\n    /**\n     * This is a simple enum with strings\n     */\n    'foo_bar-enum'?: 'Success' | 'Warning' | 'Error' | 'ØÆÅ字符串';\n};\n\n/**\n * This is a model with one property containing a reference\n */\nexport type ModelWithReference = {\n    prop?: ModelWithProperties;\n};\n\n/**\n * This is a model with one property containing an array\n */\nexport type ModelWithArrayReadOnlyAndWriteOnly = {\n    prop?: Array<ModelWithReadOnlyAndWriteOnly>;\n    propWithFile?: Array<Blob | File>;\n    propWithNumber?: Array<number>;\n};\n\n/**\n * This is a model with one property containing an array\n */\nexport type ModelWithArray = {\n    prop?: Array<ModelWithString>;\n    propWithFile?: Array<Blob | File>;\n    propWithNumber?: Array<number>;\n};\n\n/**\n * This is a model with one property containing a dictionary\n */\nexport type ModelWithDictionary = {\n    prop?: {\n        [key: string]: string;\n    };\n};\n\n/**\n * This is a deprecated model with a deprecated property\n *\n * @deprecated\n */\nexport type DeprecatedModel = {\n    /**\n     * This is a deprecated property\n     *\n     * @deprecated\n     */\n    prop?: string;\n};\n\n/**\n * This is a model with one property containing a circular reference\n */\nexport type ModelWithCircularReference = {\n    prop?: ModelWithCircularReference;\n};\n\n/**\n * This is a model with one property with a 'one of' relationship\n */\nexport type CompositionWithOneOf = {\n    propA?: ModelWithString | ModelWithEnum | ModelWithArray | ModelWithDictionary;\n};\n\n/**\n * This is a model with one property with a 'one of' relationship where the options are not $ref\n */\nexport type CompositionWithOneOfAnonymous = {\n    propA?: {\n        propA?: string;\n    } | string | number;\n};\n\n/**\n * Circle\n */\nexport type ModelCircle = {\n    kind: string;\n    radius?: number;\n};\n\n/**\n * Square\n */\nexport type ModelSquare = {\n    kind: string;\n    sideLength?: number;\n};\n\n/**\n * This is a model with one property with a 'one of' relationship where the options are not $ref\n */\nexport type CompositionWithOneOfDiscriminator = ({\n    kind: 'circle';\n} & ModelCircle) | ({\n    kind: 'square';\n} & ModelSquare);\n\n/**\n * This is a model with one property with a 'any of' relationship\n */\nexport type CompositionWithAnyOf = {\n    propA?: ModelWithString | ModelWithEnum | ModelWithArray | ModelWithDictionary;\n};\n\n/**\n * This is a model with one property with a 'any of' relationship where the options are not $ref\n */\nexport type CompositionWithAnyOfAnonymous = {\n    propA?: {\n        propA?: string;\n    } | string | number;\n};\n\n/**\n * This is a model with nested 'any of' property with a type null\n */\nexport type CompositionWithNestedAnyAndTypeNull = {\n    propA?: Array<ModelWithDictionary | null> | Array<ModelWithArray | null>;\n};\n\nexport type _3eNum1Период = 'Bird' | 'Dog';\n\nexport type ConstValue = 'ConstValue';\n\n/**\n * This is a model with one property with a 'any of' relationship where the options are not $ref\n */\nexport type CompositionWithNestedAnyOfAndNull = {\n    /**\n     * Scopes\n     */\n    propA?: Array<_3eNum1Период | ConstValue> | null;\n};\n\n/**\n * This is a model with one property with a 'one of' relationship\n */\nexport type CompositionWithOneOfAndNullable = {\n    propA?: {\n        boolean?: boolean;\n    } | ModelWithEnum | ModelWithArray | ModelWithDictionary | null;\n};\n\n/**\n * This is a model that contains a simple dictionary within composition\n */\nexport type CompositionWithOneOfAndSimpleDictionary = {\n    propA?: boolean | {\n        [key: string]: number;\n    };\n};\n\n/**\n * This is a model that contains a dictionary of simple arrays within composition\n */\nexport type CompositionWithOneOfAndSimpleArrayDictionary = {\n    propA?: boolean | {\n        [key: string]: Array<boolean>;\n    };\n};\n\n/**\n * This is a model that contains a dictionary of complex arrays (composited) within composition\n */\nexport type CompositionWithOneOfAndComplexArrayDictionary = {\n    propA?: boolean | {\n        [key: string]: Array<number | string>;\n    };\n};\n\n/**\n * This is a model with one property with a 'all of' relationship\n */\nexport type CompositionWithAllOfAndNullable = {\n    propA?: ({\n        boolean?: boolean;\n    } & ModelWithEnum & ModelWithArray & ModelWithDictionary) | null;\n};\n\n/**\n * This is a model with one property with a 'any of' relationship\n */\nexport type CompositionWithAnyOfAndNullable = {\n    propA?: {\n        boolean?: boolean;\n    } | ModelWithEnum | ModelWithArray | ModelWithDictionary | null;\n};\n\n/**\n * This is a base model with two simple optional properties\n */\nexport type CompositionBaseModel = {\n    firstName?: string;\n    lastname?: string;\n};\n\n/**\n * This is a model that extends the base model\n */\nexport type CompositionExtendedModel = CompositionBaseModel & {\n    age: number;\n    firstName: string;\n    lastname: string;\n};\n\n/**\n * This is a model with one nested property\n */\nexport type ModelWithProperties = {\n    required: string;\n    readonly requiredAndReadOnly: string;\n    requiredAndNullable: string | null;\n    string?: string;\n    number?: number;\n    boolean?: boolean;\n    reference?: ModelWithString;\n    'property with space'?: string;\n    default?: string;\n    try?: string;\n    readonly '@namespace.string'?: string;\n    readonly '@namespace.integer'?: number;\n};\n\n/**\n * This is a model with one nested property\n */\nexport type ModelWithNestedProperties = {\n    readonly first: {\n        readonly second: {\n            readonly third: string | null;\n        } | null;\n    } | null;\n};\n\n/**\n * This is a model with duplicated properties\n */\nexport type ModelWithDuplicateProperties = {\n    prop?: ModelWithString;\n};\n\n/**\n * This is a model with ordered properties\n */\nexport type ModelWithOrderedProperties = {\n    zebra?: string;\n    apple?: string;\n    hawaii?: string;\n};\n\n/**\n * This is a model with duplicated imports\n */\nexport type ModelWithDuplicateImports = {\n    propA?: ModelWithString;\n    propB?: ModelWithString;\n    propC?: ModelWithString;\n};\n\n/**\n * This is a model that extends another model\n */\nexport type ModelThatExtends = ModelWithString & {\n    propExtendsA?: string;\n    propExtendsB?: ModelWithString;\n};\n\n/**\n * This is a model that extends another model\n */\nexport type ModelThatExtendsExtends = ModelWithString & ModelThatExtends & {\n    propExtendsC?: string;\n    propExtendsD?: ModelWithString;\n};\n\n/**\n * This is a model that contains a some patterns\n */\nexport type ModelWithPattern = {\n    key: string;\n    name: string;\n    readonly enabled?: boolean;\n    readonly modified?: string;\n    id?: string;\n    text?: string;\n    patternWithSingleQuotes?: string;\n    patternWithNewline?: string;\n    patternWithBacktick?: string;\n    patternWithUnicode?: string;\n};\n\nexport type File = {\n    /**\n     * Id\n     */\n    readonly id?: string;\n    /**\n     * Updated at\n     */\n    readonly updated_at?: string;\n    /**\n     * Created at\n     */\n    readonly created_at?: string;\n    /**\n     * Mime\n     */\n    mime: string;\n    /**\n     * File\n     */\n    readonly file?: string;\n};\n\nexport type Default = {\n    name?: string;\n};\n\nexport type Pageable = {\n    page?: number;\n    size?: number;\n    sort?: Array<string>;\n};\n\n/**\n * This is a free-form object without additionalProperties.\n */\nexport type FreeFormObjectWithoutAdditionalProperties = {\n    [key: string]: unknown;\n};\n\n/**\n * This is a free-form object with additionalProperties: true.\n */\nexport type FreeFormObjectWithAdditionalPropertiesEqTrue = {\n    [key: string]: unknown;\n};\n\n/**\n * This is a free-form object with additionalProperties: {}.\n */\nexport type FreeFormObjectWithAdditionalPropertiesEqEmptyObject = {\n    [key: string]: unknown;\n};\n\nexport type ModelWithConst = {\n    String?: 'String';\n    number?: 0;\n    null?: null;\n    withType?: 'Some string';\n};\n\n/**\n * This is a model with one property and additionalProperties: true\n */\nexport type ModelWithAdditionalPropertiesEqTrue = {\n    /**\n     * This is a simple string property\n     */\n    prop?: string;\n    [key: string]: unknown;\n};\n\nexport type NestedAnyOfArraysNullable = {\n    nullableArray?: Array<string | boolean> | null;\n};\n\nexport type CompositionWithOneOfAndProperties = ({\n    foo: SimpleParameter;\n} | {\n    bar: NonAsciiStringæøåÆøÅöôêÊ字符串;\n}) & {\n    baz: number | null;\n    qux: number;\n};\n\n/**\n * An object that can be null\n */\nexport type NullableObject = {\n    foo?: string;\n} | null;\n\n/**\n * Some % character\n */\nexport type CharactersInDescription = string;\n\nexport type ModelWithNullableObject = {\n    data?: NullableObject;\n};\n\n/**\n * An object with additional properties that can be null (anyOf ref + null)\n */\nexport type ModelWithAdditionalPropertiesRef = {\n    [key: string]: NullableObject | null;\n};\n\nexport type ModelWithOneOfEnum = {\n    foo: 'Bar';\n} | {\n    foo: 'Baz';\n} | {\n    foo: 'Qux';\n} | {\n    content: string;\n    foo: 'Quux';\n} | {\n    content: [\n        string,\n        string\n    ];\n    foo: 'Corge';\n};\n\nexport type ModelWithNestedArrayEnumsDataFoo = 'foo' | 'bar';\n\nexport type ModelWithNestedArrayEnumsDataBar = 'baz' | 'qux';\n\nexport type ModelWithNestedArrayEnumsData = {\n    foo?: Array<ModelWithNestedArrayEnumsDataFoo>;\n    bar?: Array<ModelWithNestedArrayEnumsDataBar>;\n};\n\nexport type ModelWithNestedArrayEnums = {\n    array_strings?: Array<string>;\n    data?: ModelWithNestedArrayEnumsData;\n};\n\nexport type ModelWithNestedCompositionEnums = {\n    foo?: ModelWithNestedArrayEnumsDataFoo;\n};\n\nexport type ModelWithReadOnlyAndWriteOnly = {\n    foo: string;\n    readonly bar: string;\n};\n\nexport type ModelWithConstantSizeArray = [\n    number,\n    number\n];\n\nexport type ModelWithAnyOfConstantSizeArray = [\n    number | string,\n    number | string,\n    number | string\n];\n\nexport type ModelWithPrefixItemsConstantSizeArray = [\n    ModelWithInteger,\n    number | string,\n    string\n];\n\nexport type ModelWithAnyOfConstantSizeArrayNullable = [\n    number | null | string,\n    number | null | string,\n    number | null | string\n];\n\nexport type ModelWithAnyOfConstantSizeArrayWithNSizeAndOptions = [\n    number | Import,\n    number | Import\n];\n\nexport type ModelWithAnyOfConstantSizeArrayAndIntersect = [\n    number & string,\n    number & string\n];\n\nexport type ModelWithNumericEnumUnion = {\n    /**\n     * Период\n     */\n    value?: -10 | -1 | 0 | 1 | 3 | 6 | 12;\n};\n\n/**\n * Some description with `back ticks`\n */\nexport type ModelWithBackticksInDescription = {\n    /**\n     * The template `that` should be used for parsing and importing the contents of the CSV file.\n     *\n     * <br/><p>There is one placeholder currently supported:<ul>     <li><b>${x}</b> - refers to the n-th column in the CSV file, e.g. ${1}, ${2}, ...)</li></ul><p>Example of a correct JSON template:</p>\n     * <pre>\n     * [\n     * {\n     * \"resourceType\": \"Asset\",\n     * \"identifier\": {\n     * \"name\": \"${1}\",\n     * \"domain\": {\n     * \"name\": \"${2}\",\n     * \"community\": {\n     * \"name\": \"Some Community\"\n     * }\n     * }\n     * },\n     * \"attributes\" : {\n     * \"00000000-0000-0000-0000-000000003115\" : [ {\n     * \"value\" : \"${3}\"\n     * } ],\n     * \"00000000-0000-0000-0000-000000000222\" : [ {\n     * \"value\" : \"${4}\"\n     * } ]\n     * }\n     * }\n     * ]\n     * </pre>\n     */\n    template?: string;\n};\n\nexport type ModelWithOneOfAndProperties = (SimpleParameter | NonAsciiStringæøåÆøÅöôêÊ字符串) & {\n    baz: number | null;\n    qux: number;\n};\n\n/**\n * Model used to test deduplication strategy (unused)\n */\nexport type ParameterSimpleParameterUnused = string;\n\n/**\n * Model used to test deduplication strategy\n */\nexport type PostServiceWithEmptyTagResponse = string;\n\n/**\n * Model used to test deduplication strategy\n */\nexport type PostServiceWithEmptyTagResponse2 = string;\n\n/**\n * Model used to test deduplication strategy\n */\nexport type DeleteFooData = string;\n\n/**\n * Model used to test deduplication strategy\n */\nexport type DeleteFooData2 = string;\n\n/**\n * Model with restricted keyword name\n */\nexport type Import = string;\n\nexport type SchemaWithFormRestrictedKeys = {\n    description?: string;\n    'x-enum-descriptions'?: string;\n    'x-enum-varnames'?: string;\n    'x-enumNames'?: string;\n    title?: string;\n    object?: {\n        description?: string;\n        'x-enum-descriptions'?: string;\n        'x-enum-varnames'?: string;\n        'x-enumNames'?: string;\n        title?: string;\n    };\n    array?: Array<{\n        description?: string;\n        'x-enum-descriptions'?: string;\n        'x-enum-varnames'?: string;\n        'x-enumNames'?: string;\n        title?: string;\n    }>;\n};\n\n/**\n * This schema was giving PascalCase transformations a hard time\n */\nexport type IoK8sApimachineryPkgApisMetaV1DeleteOptions = {\n    /**\n     * Must be fulfilled before a deletion is carried out. If not possible, a 409 Conflict status will be returned.\n     */\n    preconditions?: IoK8sApimachineryPkgApisMetaV1Preconditions;\n};\n\n/**\n * This schema was giving PascalCase transformations a hard time\n */\nexport type IoK8sApimachineryPkgApisMetaV1Preconditions = {\n    /**\n     * Specifies the target ResourceVersion\n     */\n    resourceVersion?: string;\n    /**\n     * Specifies the target UID.\n     */\n    uid?: string;\n};\n\nexport type AdditionalPropertiesUnknownIssue = {\n    [key: string]: string | number;\n};\n\nexport type AdditionalPropertiesUnknownIssue2 = {\n    [key: string]: string | number;\n};\n\nexport type AdditionalPropertiesUnknownIssue3 = string & {\n    entries: {\n        [key: string]: AdditionalPropertiesUnknownIssue;\n    };\n};\n\nexport type AdditionalPropertiesIntegerIssue = {\n    value: number;\n    [key: string]: number;\n};\n\nexport type OneOfAllOfIssue = ((ConstValue | GenericSchemaDuplicateIssue1SystemBoolean) & _3eNum1Период) | GenericSchemaDuplicateIssue1SystemString;\n\nexport type GenericSchemaDuplicateIssue1SystemBoolean = {\n    item?: boolean;\n    error?: string | null;\n    readonly hasError?: boolean;\n    data?: {\n        [key: string]: never;\n    };\n};\n\nexport type GenericSchemaDuplicateIssue1SystemString = {\n    item?: string | null;\n    error?: string | null;\n    readonly hasError?: boolean;\n};\n\nexport type ExternalSharedModel = {\n    id: string;\n    name?: string;\n};\n\n/**\n * This is a model with one property containing a reference\n */\nexport type ModelWithReferenceWritable = {\n    prop?: ModelWithPropertiesWritable;\n};\n\n/**\n * This is a model with one property containing an array\n */\nexport type ModelWithArrayReadOnlyAndWriteOnlyWritable = {\n    prop?: Array<ModelWithReadOnlyAndWriteOnlyWritable>;\n    propWithFile?: Array<Blob | File>;\n    propWithNumber?: Array<number>;\n};\n\n/**\n * This is a model with one nested property\n */\nexport type ModelWithPropertiesWritable = {\n    required: string;\n    requiredAndNullable: string | null;\n    string?: string;\n    number?: number;\n    boolean?: boolean;\n    reference?: ModelWithString;\n    'property with space'?: string;\n    default?: string;\n    try?: string;\n};\n\n/**\n * This is a model that contains a some patterns\n */\nexport type ModelWithPatternWritable = {\n    key: string;\n    name: string;\n    id?: string;\n    text?: string;\n    patternWithSingleQuotes?: string;\n    patternWithNewline?: string;\n    patternWithBacktick?: string;\n    patternWithUnicode?: string;\n};\n\nexport type FileWritable = {\n    /**\n     * Mime\n     */\n    mime: string;\n};\n\nexport type ModelWithReadOnlyAndWriteOnlyWritable = {\n    foo: string;\n    baz: string;\n};\n\nexport type ModelWithAnyOfConstantSizeArrayWithNSizeAndOptionsWritable = [\n    number | Import,\n    number | Import\n];\n\nexport type AdditionalPropertiesUnknownIssueWritable = {\n    [key: string]: string | number;\n};\n\nexport type OneOfAllOfIssueWritable = ((ConstValue | GenericSchemaDuplicateIssue1SystemBoolean) & _3eNum1Период) | GenericSchemaDuplicateIssue1SystemString;\n\nexport type GenericSchemaDuplicateIssue1SystemBooleanWritable = {\n    item?: boolean;\n    error?: string | null;\n    data?: {\n        [key: string]: never;\n    };\n};\n\nexport type GenericSchemaDuplicateIssue1SystemStringWritable = {\n    item?: string | null;\n    error?: string | null;\n};\n\n/**\n * This is a reusable parameter\n */\nexport type SimpleParameter = string;\n\n/**\n * Parameter with illegal characters\n */\nexport type XFooBar = ModelWithString;\n\n/**\n * A reusable request body\n */\nexport type SimpleRequestBody = ModelWithString;\n\n/**\n * A reusable request body\n */\nexport type SimpleFormData = ModelWithString;\n\nexport type ExportData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no+tag';\n};\n\nexport type PatchApiVbyApiVersionNoTagData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no+tag';\n};\n\nexport type PatchApiVbyApiVersionNoTagResponses = {\n    /**\n     * OK\n     */\n    default: unknown;\n};\n\nexport type ImportData = {\n    body: ModelWithReadOnlyAndWriteOnlyWritable | ModelWithArrayReadOnlyAndWriteOnlyWritable;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no+tag';\n};\n\nexport type ImportResponses = {\n    /**\n     * Success\n     */\n    200: ModelFromZendesk;\n    /**\n     * Default success response\n     */\n    default: ModelWithReadOnlyAndWriteOnly;\n};\n\nexport type ImportResponse = ImportResponses[keyof ImportResponses];\n\nexport type FooWowData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no+tag';\n};\n\nexport type FooWowResponses = {\n    /**\n     * OK\n     */\n    default: unknown;\n};\n\nexport type ApiVVersionODataControllerCountData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple/$count';\n};\n\nexport type ApiVVersionODataControllerCountResponses = {\n    /**\n     * Success\n     */\n    200: ModelFromZendesk;\n};\n\nexport type ApiVVersionODataControllerCountResponse = ApiVVersionODataControllerCountResponses[keyof ApiVVersionODataControllerCountResponses];\n\nexport type GetApiVbyApiVersionSimpleOperationData = {\n    body?: never;\n    path: {\n        /**\n         * foo in method\n         */\n        foo_param: string;\n    };\n    query?: never;\n    url: '/api/v{api-version}/simple:operation';\n};\n\nexport type GetApiVbyApiVersionSimpleOperationErrors = {\n    /**\n     * Default error response\n     */\n    default: ModelWithBoolean;\n};\n\nexport type GetApiVbyApiVersionSimpleOperationError = GetApiVbyApiVersionSimpleOperationErrors[keyof GetApiVbyApiVersionSimpleOperationErrors];\n\nexport type GetApiVbyApiVersionSimpleOperationResponses = {\n    /**\n     * Response is a simple number\n     */\n    200: number;\n};\n\nexport type GetApiVbyApiVersionSimpleOperationResponse = GetApiVbyApiVersionSimpleOperationResponses[keyof GetApiVbyApiVersionSimpleOperationResponses];\n\nexport type DeleteCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type GetCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type HeadCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type OptionsCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type PatchCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type PostCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type PutCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type DeleteFooData3 = {\n    body?: never;\n    headers: {\n        /**\n         * Parameter with illegal characters\n         */\n        'x-Foo-Bar': ModelWithString;\n    };\n    path: {\n        /**\n         * foo in method\n         */\n        foo_param: string;\n        /**\n         * bar in method\n         */\n        BarParam: string;\n    };\n    query?: never;\n    url: '/api/v{api-version}/foo/{foo_param}/bar/{BarParam}';\n};\n\nexport type CallWithDescriptionsData = {\n    body?: never;\n    path?: never;\n    query?: {\n        /**\n         * Testing multiline comments in string: First line\n         * Second line\n         *\n         * Fourth line\n         */\n        parameterWithBreaks?: string;\n        /**\n         * Testing backticks in string: `backticks` and ```multiple backticks``` should work\n         */\n        parameterWithBackticks?: string;\n        /**\n         * Testing slashes in string: \\backwards\\\\\\ and /forwards/// should work\n         */\n        parameterWithSlashes?: string;\n        /**\n         * Testing expression placeholders in string: ${expression} should work\n         */\n        parameterWithExpressionPlaceholders?: string;\n        /**\n         * Testing quotes in string: 'single quote''' and \"double quotes\"\"\" should work\n         */\n        parameterWithQuotes?: string;\n        /**\n         * Testing reserved characters in string: * inline * and ** inline ** should work\n         */\n        parameterWithReservedCharacters?: string;\n    };\n    url: '/api/v{api-version}/descriptions';\n};\n\nexport type DeprecatedCallData = {\n    body?: never;\n    headers: {\n        /**\n         * This parameter is deprecated\n         *\n         * @deprecated\n         */\n        parameter: DeprecatedModel | null;\n    };\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/parameters/deprecated';\n};\n\nexport type CallWithParametersData = {\n    /**\n     * This is the parameter that goes into the body\n     */\n    body: {\n        [key: string]: unknown;\n    } | null;\n    headers: {\n        /**\n         * This is the parameter that goes into the header\n         */\n        parameterHeader: string | null;\n    };\n    path: {\n        /**\n         * This is the parameter that goes into the path\n         */\n        parameterPath: string | null;\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string | null;\n    };\n    query: {\n        foo_ref_enum?: ModelWithNestedArrayEnumsDataFoo;\n        foo_all_of_enum: ModelWithNestedArrayEnumsDataFoo;\n        /**\n         * This is the parameter that goes into the query params\n         */\n        cursor: string | null;\n    };\n    url: '/api/v{api-version}/parameters/{parameterPath}';\n};\n\nexport type CallWithWeirdParameterNamesData = {\n    /**\n     * This is the parameter that goes into the body\n     */\n    body: ModelWithString | null;\n    headers: {\n        /**\n         * This is the parameter that goes into the request header\n         */\n        'parameter.header': string | null;\n    };\n    path: {\n        /**\n         * This is the parameter that goes into the path\n         */\n        'parameter.path.1'?: string;\n        /**\n         * This is the parameter that goes into the path\n         */\n        'parameter-path-2'?: string;\n        /**\n         * This is the parameter that goes into the path\n         */\n        'PARAMETER-PATH-3'?: string;\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string | null;\n    };\n    query: {\n        /**\n         * This is the parameter with a reserved keyword\n         */\n        default?: string;\n        /**\n         * This is the parameter that goes into the request query params\n         */\n        'parameter-query': string | null;\n    };\n    url: '/api/v{api-version}/parameters/{parameter.path.1}/{parameter-path-2}/{PARAMETER-PATH-3}';\n};\n\nexport type GetCallWithOptionalParamData = {\n    /**\n     * This is a required parameter\n     */\n    body: ModelWithOneOfEnum;\n    path?: never;\n    query?: {\n        /**\n         * This is an optional parameter\n         */\n        page?: number;\n    };\n    url: '/api/v{api-version}/parameters';\n};\n\nexport type PostCallWithOptionalParamData = {\n    /**\n     * This is an optional parameter\n     */\n    body?: {\n        offset?: number | null;\n    };\n    path?: never;\n    query: {\n        /**\n         * This is a required parameter\n         */\n        parameter: Pageable;\n    };\n    url: '/api/v{api-version}/parameters';\n};\n\nexport type PostCallWithOptionalParamResponses = {\n    /**\n     * Response is a simple number\n     */\n    200: number;\n    /**\n     * Success\n     */\n    204: void;\n};\n\nexport type PostCallWithOptionalParamResponse = PostCallWithOptionalParamResponses[keyof PostCallWithOptionalParamResponses];\n\nexport type PostApiVbyApiVersionRequestBodyData = {\n    /**\n     * A reusable request body\n     */\n    body?: SimpleRequestBody;\n    path?: never;\n    query?: {\n        /**\n         * This is a reusable parameter\n         */\n        parameter?: string;\n    };\n    url: '/api/v{api-version}/requestBody';\n};\n\nexport type PostApiVbyApiVersionFormDataData = {\n    /**\n     * A reusable request body\n     */\n    body?: SimpleFormData;\n    path?: never;\n    query?: {\n        /**\n         * This is a reusable parameter\n         */\n        parameter?: string;\n    };\n    url: '/api/v{api-version}/formData';\n};\n\nexport type CallWithDefaultParametersData = {\n    body?: never;\n    path?: never;\n    query?: {\n        /**\n         * This is a simple string with default value\n         */\n        parameterString?: string | null;\n        /**\n         * This is a simple number with default value\n         */\n        parameterNumber?: number | null;\n        /**\n         * This is a simple boolean with default value\n         */\n        parameterBoolean?: boolean | null;\n        /**\n         * This is a simple enum with default value\n         */\n        parameterEnum?: 'Success' | 'Warning' | 'Error';\n        /**\n         * This is a simple model with default value\n         */\n        parameterModel?: ModelWithString | null;\n    };\n    url: '/api/v{api-version}/defaults';\n};\n\nexport type CallWithDefaultOptionalParametersData = {\n    body?: never;\n    path?: never;\n    query?: {\n        /**\n         * This is a simple string that is optional with default value\n         */\n        parameterString?: string;\n        /**\n         * This is a simple number that is optional with default value\n         */\n        parameterNumber?: number;\n        /**\n         * This is a simple boolean that is optional with default value\n         */\n        parameterBoolean?: boolean;\n        /**\n         * This is a simple enum that is optional with default value\n         */\n        parameterEnum?: 'Success' | 'Warning' | 'Error';\n        /**\n         * This is a simple model that is optional with default value\n         */\n        parameterModel?: ModelWithString;\n    };\n    url: '/api/v{api-version}/defaults';\n};\n\nexport type CallToTestOrderOfParamsData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * This is a optional string with default\n         */\n        parameterOptionalStringWithDefault?: string;\n        /**\n         * This is a optional string with empty default\n         */\n        parameterOptionalStringWithEmptyDefault?: string;\n        /**\n         * This is a optional string with no default\n         */\n        parameterOptionalStringWithNoDefault?: string;\n        /**\n         * This is a string with default\n         */\n        parameterStringWithDefault: string;\n        /**\n         * This is a string with empty default\n         */\n        parameterStringWithEmptyDefault: string;\n        /**\n         * This is a string with no default\n         */\n        parameterStringWithNoDefault: string;\n        /**\n         * This is a string that can be null with no default\n         */\n        parameterStringNullableWithNoDefault?: string | null;\n        /**\n         * This is a string that can be null with default\n         */\n        parameterStringNullableWithDefault?: string | null;\n    };\n    url: '/api/v{api-version}/defaults';\n};\n\nexport type DuplicateNameData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/duplicate';\n};\n\nexport type DuplicateName2Data = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/duplicate';\n};\n\nexport type DuplicateName3Data = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/duplicate';\n};\n\nexport type DuplicateName4Data = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/duplicate';\n};\n\nexport type CallWithNoContentResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no-content';\n};\n\nexport type CallWithNoContentResponseResponses = {\n    /**\n     * Success\n     */\n    204: void;\n};\n\nexport type CallWithNoContentResponseResponse = CallWithNoContentResponseResponses[keyof CallWithNoContentResponseResponses];\n\nexport type CallWithResponseAndNoContentResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multiple-tags/response-and-no-content';\n};\n\nexport type CallWithResponseAndNoContentResponseResponses = {\n    /**\n     * Response is a simple number\n     */\n    200: number;\n    /**\n     * Success\n     */\n    204: void;\n};\n\nexport type CallWithResponseAndNoContentResponseResponse = CallWithResponseAndNoContentResponseResponses[keyof CallWithResponseAndNoContentResponseResponses];\n\nexport type DummyAData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multiple-tags/a';\n};\n\nexport type DummyAResponses = {\n    200: _400;\n};\n\nexport type DummyAResponse = DummyAResponses[keyof DummyAResponses];\n\nexport type DummyBData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multiple-tags/b';\n};\n\nexport type DummyBResponses = {\n    /**\n     * Success\n     */\n    204: void;\n};\n\nexport type DummyBResponse = DummyBResponses[keyof DummyBResponses];\n\nexport type CallWithResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/response';\n};\n\nexport type CallWithResponseResponses = {\n    default: Import;\n};\n\nexport type CallWithResponseResponse = CallWithResponseResponses[keyof CallWithResponseResponses];\n\nexport type CallWithDuplicateResponsesData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/response';\n};\n\nexport type CallWithDuplicateResponsesErrors = {\n    /**\n     * Message for 500 error\n     */\n    500: ModelWithStringError;\n    /**\n     * Message for 501 error\n     */\n    501: ModelWithStringError;\n    /**\n     * Message for 502 error\n     */\n    502: ModelWithStringError;\n    /**\n     * Message for 4XX errors\n     */\n    '4XX': DictionaryWithArray;\n    /**\n     * Default error response\n     */\n    default: ModelWithBoolean;\n};\n\nexport type CallWithDuplicateResponsesError = CallWithDuplicateResponsesErrors[keyof CallWithDuplicateResponsesErrors];\n\nexport type CallWithDuplicateResponsesResponses = {\n    /**\n     * Message for 200 response\n     */\n    200: ModelWithBoolean & ModelWithInteger;\n    /**\n     * Message for 201 response\n     */\n    201: ModelWithString;\n    /**\n     * Message for 202 response\n     */\n    202: ModelWithString;\n};\n\nexport type CallWithDuplicateResponsesResponse = CallWithDuplicateResponsesResponses[keyof CallWithDuplicateResponsesResponses];\n\nexport type CallWithResponsesData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/response';\n};\n\nexport type CallWithResponsesErrors = {\n    /**\n     * Message for 500 error\n     */\n    500: ModelWithStringError;\n    /**\n     * Message for 501 error\n     */\n    501: ModelWithStringError;\n    /**\n     * Message for 502 error\n     */\n    502: ModelWithStringError;\n    /**\n     * Message for default response\n     */\n    default: ModelWithStringError;\n};\n\nexport type CallWithResponsesError = CallWithResponsesErrors[keyof CallWithResponsesErrors];\n\nexport type CallWithResponsesResponses = {\n    /**\n     * Message for 200 response\n     */\n    200: {\n        readonly '@namespace.string'?: string;\n        readonly '@namespace.integer'?: number;\n        readonly value?: Array<ModelWithString>;\n    };\n    /**\n     * Message for 201 response\n     */\n    201: ModelThatExtends;\n    /**\n     * Message for 202 response\n     */\n    202: ModelThatExtendsExtends;\n};\n\nexport type CallWithResponsesResponse = CallWithResponsesResponses[keyof CallWithResponsesResponses];\n\nexport type CollectionFormatData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * This is an array parameter that is sent as csv format (comma-separated values)\n         */\n        parameterArrayCSV: Array<string> | null;\n        /**\n         * This is an array parameter that is sent as ssv format (space-separated values)\n         */\n        parameterArraySSV: Array<string> | null;\n        /**\n         * This is an array parameter that is sent as tsv format (tab-separated values)\n         */\n        parameterArrayTSV: Array<string> | null;\n        /**\n         * This is an array parameter that is sent as pipes format (pipe-separated values)\n         */\n        parameterArrayPipes: Array<string> | null;\n        /**\n         * This is an array parameter that is sent as multi format (multiple parameter instances)\n         */\n        parameterArrayMulti: Array<string> | null;\n    };\n    url: '/api/v{api-version}/collectionFormat';\n};\n\nexport type TypesData = {\n    body?: never;\n    path?: {\n        /**\n         * This is a number parameter\n         */\n        id?: number;\n    };\n    query: {\n        /**\n         * This is a number parameter\n         */\n        parameterNumber: number;\n        /**\n         * This is a string parameter\n         */\n        parameterString: string | null;\n        /**\n         * This is a boolean parameter\n         */\n        parameterBoolean: boolean | null;\n        /**\n         * This is an object parameter\n         */\n        parameterObject: {\n            [key: string]: unknown;\n        } | null;\n        /**\n         * This is an array parameter\n         */\n        parameterArray: Array<string> | null;\n        /**\n         * This is a dictionary parameter\n         */\n        parameterDictionary: {\n            [key: string]: unknown;\n        } | null;\n        /**\n         * This is an enum parameter\n         */\n        parameterEnum: 'Success' | 'Warning' | 'Error' | null;\n    };\n    url: '/api/v{api-version}/types';\n};\n\nexport type TypesResponses = {\n    /**\n     * Response is a simple number\n     */\n    200: number;\n    /**\n     * Response is a simple string\n     */\n    201: string;\n    /**\n     * Response is a simple boolean\n     */\n    202: boolean;\n    /**\n     * Response is a simple object\n     */\n    203: {\n        [key: string]: unknown;\n    };\n};\n\nexport type TypesResponse = TypesResponses[keyof TypesResponses];\n\nexport type UploadFileData = {\n    body: Blob | File;\n    path: {\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string | null;\n    };\n    query?: never;\n    url: '/api/v{api-version}/upload';\n};\n\nexport type UploadFileResponses = {\n    200: boolean;\n};\n\nexport type UploadFileResponse = UploadFileResponses[keyof UploadFileResponses];\n\nexport type FileResponseData = {\n    body?: never;\n    path: {\n        id: string;\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string;\n    };\n    query?: never;\n    url: '/api/v{api-version}/file/{id}';\n};\n\nexport type FileResponseResponses = {\n    /**\n     * Success\n     */\n    200: Blob | File;\n};\n\nexport type FileResponseResponse = FileResponseResponses[keyof FileResponseResponses];\n\nexport type ComplexTypesData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * Parameter containing object\n         */\n        parameterObject: {\n            first?: {\n                second?: {\n                    third?: string;\n                };\n            };\n        };\n        /**\n         * Parameter containing reference\n         */\n        parameterReference: ModelWithString;\n    };\n    url: '/api/v{api-version}/complex';\n};\n\nexport type ComplexTypesErrors = {\n    /**\n     * 400 `server` error\n     */\n    400: unknown;\n    /**\n     * 500 server error\n     */\n    500: unknown;\n};\n\nexport type ComplexTypesResponses = {\n    /**\n     * Successful response\n     */\n    200: Array<ModelWithString>;\n};\n\nexport type ComplexTypesResponse = ComplexTypesResponses[keyof ComplexTypesResponses];\n\nexport type MultipartResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multipart';\n};\n\nexport type MultipartResponseResponses = {\n    /**\n     * OK\n     */\n    200: {\n        file?: Blob | File;\n        metadata?: {\n            foo?: string;\n            bar?: string;\n        };\n    };\n};\n\nexport type MultipartResponseResponse = MultipartResponseResponses[keyof MultipartResponseResponses];\n\nexport type MultipartRequestData = {\n    body?: {\n        content?: Blob | File;\n        data?: ModelWithString | null;\n    };\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multipart';\n};\n\nexport type ComplexParamsData = {\n    body?: {\n        readonly key: string | null;\n        name: string | null;\n        enabled?: boolean;\n        type: 'Monkey' | 'Horse' | 'Bird';\n        listOfModels?: Array<ModelWithString> | null;\n        listOfStrings?: Array<string> | null;\n        parameters: ModelWithString | ModelWithEnum | ModelWithArray | ModelWithDictionary;\n        readonly user?: {\n            readonly id?: number;\n            readonly name?: string | null;\n        };\n    };\n    path: {\n        id: number;\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string;\n    };\n    query?: never;\n    url: '/api/v{api-version}/complex/{id}';\n};\n\nexport type ComplexParamsResponses = {\n    /**\n     * Success\n     */\n    200: ModelWithString;\n};\n\nexport type ComplexParamsResponse = ComplexParamsResponses[keyof ComplexParamsResponses];\n\nexport type CallWithResultFromHeaderData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/header';\n};\n\nexport type CallWithResultFromHeaderErrors = {\n    /**\n     * 400 server error\n     */\n    400: unknown;\n    /**\n     * 500 server error\n     */\n    500: unknown;\n};\n\nexport type CallWithResultFromHeaderResponses = {\n    /**\n     * Successful response\n     */\n    200: unknown;\n};\n\nexport type TestErrorCodeData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * Status code to return\n         */\n        status: number;\n    };\n    url: '/api/v{api-version}/error';\n};\n\nexport type TestErrorCodeErrors = {\n    /**\n     * Custom message: Internal Server Error\n     */\n    500: unknown;\n    /**\n     * Custom message: Not Implemented\n     */\n    501: unknown;\n    /**\n     * Custom message: Bad Gateway\n     */\n    502: unknown;\n    /**\n     * Custom message: Service Unavailable\n     */\n    503: unknown;\n};\n\nexport type TestErrorCodeResponses = {\n    /**\n     * Custom message: Successful response\n     */\n    200: unknown;\n};\n\nexport type NonAsciiæøåÆøÅöôêÊ字符串Data = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * Dummy input param\n         */\n        nonAsciiParamæøåÆØÅöôêÊ: number;\n    };\n    url: '/api/v{api-version}/non-ascii-æøåÆØÅöôêÊ字符串';\n};\n\nexport type NonAsciiæøåÆøÅöôêÊ字符串Responses = {\n    /**\n     * Successful response\n     */\n    200: Array<NonAsciiStringæøåÆøÅöôêÊ字符串>;\n};\n\nexport type NonAsciiæøåÆøÅöôêÊ字符串Response = NonAsciiæøåÆøÅöôêÊ字符串Responses[keyof NonAsciiæøåÆøÅöôêÊ字符串Responses];\n\nexport type PutWithFormUrlEncodedData = {\n    body: ArrayWithStrings;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/non-ascii-æøåÆØÅöôêÊ字符串';\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-ofetch/sdk-client-required/client/client.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport { ofetch, type ResponseType as OfetchResponseType } from 'ofetch';\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  buildOfetchOptions,\n  buildUrl,\n  createConfig,\n  createInterceptors,\n  isRepeatableBody,\n  mapParseAsToResponseType,\n  mergeConfigs,\n  mergeHeaders,\n  parseError,\n  parseSuccess,\n  setAuthParams,\n  wrapDataReturn,\n  wrapErrorReturn,\n} from './utils.gen';\n\ntype ReqInit = Omit<RequestInit, 'body' | 'headers'> & {\n  body?: BodyInit | null | undefined;\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  // precompute serialized / network body\n  const resolveOptions = async (options: RequestOptions) => {\n    const opts = {\n      ..._config,\n      ...options,\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 if body is empty to avoid invalid requests\n    if (opts.body === undefined || opts.serializedBody === '') {\n      opts.headers.delete('Content-Type');\n    }\n\n    // if a raw body is provided (no serializer), adjust Content-Type only when it\n    // equals the default JSON value to better match the concrete body type\n    if (\n      opts.body !== undefined &&\n      opts.bodySerializer === null &&\n      (opts.headers.get('Content-Type') || '').toLowerCase() === 'application/json'\n    ) {\n      const b: unknown = opts.body;\n      if (typeof FormData !== 'undefined' && b instanceof FormData) {\n        // let the runtime set the multipart boundary\n        opts.headers.delete('Content-Type');\n      } else if (typeof URLSearchParams !== 'undefined' && b instanceof URLSearchParams) {\n        // standard urlencoded content type (+ charset)\n        opts.headers.set('Content-Type', 'application/x-www-form-urlencoded;charset=UTF-8');\n      } else if (typeof Blob !== 'undefined' && b instanceof Blob) {\n        const t = b.type?.trim();\n        if (t) {\n          opts.headers.set('Content-Type', t);\n        } else {\n          // unknown blob type: avoid sending a misleading JSON header\n          opts.headers.delete('Content-Type');\n        }\n      }\n    }\n\n    // precompute network body (stability for retries and interceptors)\n    const networkBody = getValidRequestBody(opts) as RequestInit['body'] | null | undefined;\n\n    const url = buildUrl(opts);\n\n    return { networkBody, opts, url };\n  };\n\n  // apply request interceptors and mirror header/method/signal back to opts\n  const applyRequestInterceptors = async (\n    request: Request,\n    opts: ResolvedRequestOptions,\n    body: BodyInit | null | undefined,\n  ) => {\n    for (const fn of interceptors.request.fns) {\n      if (fn) {\n        request = await fn(request, opts);\n      }\n    }\n    // reflect interceptor changes into opts used by the network layer\n    opts.headers = request.headers;\n    opts.method = request.method as Uppercase<HttpMethod>;\n    // ignore request.body changes to avoid turning serialized bodies into streams\n    // body comes only from getValidRequestBody(options)\n    // reflect signal if present\n    opts.signal = (request as any).signal as AbortSignal | undefined;\n\n    // When body is FormData, remove Content-Type header to avoid boundary mismatch.\n    // Note: We already delete Content-Type in resolveOptions for FormData, but the\n    // Request constructor (line 175) re-adds it with an auto-generated boundary.\n    // Since we pass the original FormData (not the Request's body) to ofetch, and\n    // ofetch will generate its own boundary, we must remove the Request's Content-Type\n    // to let ofetch set the correct one. Otherwise the boundary in the header won't\n    // match the boundary in the actual multipart body sent by ofetch.\n    if (typeof FormData !== 'undefined' && body instanceof FormData) {\n      opts.headers.delete('Content-Type');\n    }\n\n    return request;\n  };\n\n  // build ofetch options with stable retry logic based on body repeatability\n  const buildNetworkOptions = (\n    opts: ResolvedRequestOptions,\n    body: BodyInit | null | undefined,\n    responseType: OfetchResponseType | undefined,\n  ) => {\n    const effectiveRetry = isRepeatableBody(body) ? (opts.retry as any) : (0 as any);\n    return buildOfetchOptions(opts, body, responseType, effectiveRetry);\n  };\n\n  const request: Client['request'] = async (options) => {\n    const { networkBody: initialNetworkBody, opts, url } = await resolveOptions(options as any);\n    // map parseAs -> ofetch responseType once per request\n    const ofetchResponseType: OfetchResponseType | undefined = mapParseAsToResponseType(\n      opts.parseAs,\n      opts.responseType,\n    );\n\n    const $ofetch = opts.ofetch ?? ofetch;\n\n    // create Request before network to run middleware consistently\n    const networkBody = initialNetworkBody;\n    const requestInit: ReqInit = {\n      body: networkBody,\n      headers: opts.headers as Headers,\n      method: opts.method,\n      redirect: 'follow',\n      signal: opts.signal,\n    };\n    let request = new Request(url, requestInit);\n\n    request = await applyRequestInterceptors(request, opts, networkBody);\n    const finalUrl = request.url;\n\n    // build ofetch options and perform the request (.raw keeps the Response)\n    const responseOptions = buildNetworkOptions(\n      opts as ResolvedRequestOptions,\n      networkBody,\n      ofetchResponseType,\n    );\n\n    let response = await $ofetch.raw(finalUrl, responseOptions);\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 = { request, response };\n\n    if (response.ok) {\n      const data = await parseSuccess(response, opts, ofetchResponseType);\n      return wrapDataReturn(data, result, opts.responseStyle);\n    }\n\n    let finalError = await parseError(response);\n\n    for (const fn of interceptors.error.fns) {\n      if (fn) {\n        finalError = await fn(finalError, response, request, opts);\n      }\n    }\n\n    // ensure error is never undefined after interceptors\n    finalError = (finalError as any) || ({} as string);\n\n    if (opts.throwOnError) {\n      throw finalError;\n    }\n\n    return wrapErrorReturn(finalError, result, opts.responseStyle) as any;\n  };\n\n  const makeMethodFn = (method: Uppercase<HttpMethod>) => (options: RequestOptions) =>\n    request({ ...options, method } as any);\n\n  const makeSseFn = (method: Uppercase<HttpMethod>) => async (options: RequestOptions) => {\n    const { networkBody, opts, url } = await resolveOptions(options);\n    const optsForSse: any = { ...opts };\n    delete optsForSse.body; // body is provided via serializedBody below\n    return createSseClient({\n      ...optsForSse,\n      fetch: opts.fetch,\n      headers: opts.headers as Headers,\n      method,\n      onRequest: async (url, init) => {\n        let request = new Request(url, init);\n        request = await applyRequestInterceptors(request, opts, networkBody);\n        return request;\n      },\n      serializedBody: networkBody as BodyInit | null | undefined,\n      signal: opts.signal,\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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-ofetch/sdk-client-required/client/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type { Auth } from '../core/auth.gen';\nexport type { QuerySerializerOptions } from '../core/bodySerializer.gen';\nexport {\n  formDataBodySerializer,\n  jsonBodySerializer,\n  urlSearchParamsBodySerializer,\n} from '../core/bodySerializer.gen';\nexport { buildClientParams } from '../core/params.gen';\nexport { serializeQueryKeyValue } from '../core/queryKeySerializer.gen';\nexport { createClient } from './client.gen';\nexport type {\n  Client,\n  ClientOptions,\n  Config,\n  CreateClientConfig,\n  Options,\n  RequestOptions,\n  RequestResult,\n  ResolvedRequestOptions,\n  ResponseStyle,\n  TDataShape,\n} from './types.gen';\nexport { createConfig, mergeHeaders } from './utils.gen';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-ofetch/sdk-client-required/client/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { FetchOptions as OfetchOptions, ResponseType as OfetchResponseType } from 'ofetch';\nimport type { ofetch } from 'ofetch';\n\nimport type { Auth } from '../core/auth.gen';\nimport type {\n  ServerSentEventsOptions,\n  ServerSentEventsResult,\n} from '../core/serverSentEvents.gen';\nimport type { Client as CoreClient, Config as CoreConfig } from '../core/types.gen';\nimport type { Middleware } from './utils.gen';\n\nexport type ResponseStyle = 'data' | 'fields';\n\nexport interface Config<T extends ClientOptions = ClientOptions>\n  extends Omit<RequestInit, 'body' | 'headers' | 'method'>, CoreConfig {\n  /**\n   * HTTP(S) agent configuration (Node.js only). Passed through to ofetch.\n   */\n  agent?: OfetchOptions['agent'];\n  /**\n   * Base URL for all requests made by this client.\n   */\n  baseUrl?: T['baseUrl'];\n  /**\n   * Node-only proxy/agent options.\n   */\n  dispatcher?: OfetchOptions['dispatcher'];\n  /**\n   * Fetch API implementation. Used for SSE streaming. You can use this option\n   * to provide a custom fetch instance.\n   *\n   * @default globalThis.fetch\n   */\n  fetch?: typeof fetch;\n  /**\n   * Controls the native ofetch behaviour that throws `FetchError` when\n   * `response.ok === false`. We default to suppressing it to match the fetch\n   * client semantics and let `throwOnError` drive the outcome.\n   */\n  ignoreResponseError?: OfetchOptions['ignoreResponseError'];\n  // No custom fetch option: provide custom instance via `ofetch` instead\n  /**\n   * Please don't use the Fetch client for Next.js applications. The `next`\n   * options won't have any effect.\n   *\n   * Install {@link https://www.npmjs.com/package/@hey-api/client-next `@hey-api/client-next`} instead.\n   */\n  next?: never;\n  /**\n   * Custom ofetch instance created via `ofetch.create()`. If provided, it will\n   * be used for requests instead of the default `ofetch` export.\n   */\n  ofetch?: typeof ofetch;\n  /**\n   * ofetch hook called before a request is sent.\n   */\n  onRequest?: OfetchOptions['onRequest'];\n  /**\n   * ofetch hook called when a request fails before receiving a response\n   * (e.g., network errors or aborted requests).\n   */\n  onRequestError?: OfetchOptions['onRequestError'];\n  /**\n   * ofetch hook called after a successful response is received and parsed.\n   */\n  onResponse?: OfetchOptions['onResponse'];\n  /**\n   * ofetch hook called when the response indicates an error (non-ok status)\n   * or when response parsing fails.\n   */\n  onResponseError?: OfetchOptions['onResponseError'];\n  /**\n   * Return the response data parsed in a specified format. By default, `auto`\n   * will infer the appropriate method from the `Content-Type` response header.\n   * You can override this behavior with any of the {@link Body} methods.\n   * Select `stream` if you don't want to parse response data at all.\n   *\n   * @default 'auto'\n   */\n  parseAs?: 'arrayBuffer' | 'auto' | 'blob' | 'formData' | 'json' | 'stream' | 'text';\n  /** Custom response parser (ofetch). */\n  parseResponse?: OfetchOptions['parseResponse'];\n  /**\n   * Should we return only data or multiple fields (data, error, response, etc.)?\n   *\n   * @default 'fields'\n   */\n  responseStyle?: ResponseStyle;\n  /**\n   * ofetch responseType override. If provided, it will be passed directly to\n   * ofetch and take precedence over `parseAs`.\n   */\n  responseType?: OfetchResponseType;\n  /**\n   * Automatically retry failed requests.\n   */\n  retry?: OfetchOptions['retry'];\n  /**\n   * Delay (in ms) between retry attempts.\n   */\n  retryDelay?: OfetchOptions['retryDelay'];\n  /**\n   * HTTP status codes that should trigger a retry.\n   */\n  retryStatusCodes?: OfetchOptions['retryStatusCodes'];\n  /**\n   * Throw an error instead of returning it in the response?\n   *\n   * @default false\n   */\n  throwOnError?: T['throwOnError'];\n  /**\n   * Abort the request after the given milliseconds.\n   */\n  timeout?: number;\n}\n\nexport interface RequestOptions<\n  TData = unknown,\n  TResponseStyle extends ResponseStyle = 'fields',\n  ThrowOnError extends boolean = boolean,\n  Url extends string = string,\n>\n  extends\n    Config<{\n      responseStyle: TResponseStyle;\n      throwOnError: ThrowOnError;\n    }>,\n    Pick<\n      ServerSentEventsOptions<TData>,\n      | 'onSseError'\n      | 'onSseEvent'\n      | 'sseDefaultRetryDelay'\n      | 'sseMaxRetryAttempts'\n      | 'sseMaxRetryDelay'\n    > {\n  /**\n   * Any body that you want to add to your request.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/fetch#body}\n   */\n  body?: unknown;\n  path?: Record<string, unknown>;\n  query?: Record<string, unknown>;\n  /**\n   * Security mechanism(s) to use for the request.\n   */\n  security?: ReadonlyArray<Auth>;\n  url: Url;\n}\n\nexport interface ResolvedRequestOptions<\n  TResponseStyle extends ResponseStyle = 'fields',\n  ThrowOnError extends boolean = boolean,\n  Url extends string = string,\n> extends RequestOptions<unknown, TResponseStyle, ThrowOnError, Url> {\n  serializedBody?: string;\n}\n\nexport type RequestResult<\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = boolean,\n  TResponseStyle extends ResponseStyle = 'fields',\n> = ThrowOnError extends true\n  ? Promise<\n      TResponseStyle extends 'data'\n        ? TData extends Record<string, unknown>\n          ? TData[keyof TData]\n          : TData\n        : {\n            data: TData extends Record<string, unknown> ? TData[keyof TData] : TData;\n            request: Request;\n            response: Response;\n          }\n    >\n  : Promise<\n      TResponseStyle extends 'data'\n        ? (TData extends Record<string, unknown> ? TData[keyof TData] : TData) | undefined\n        : (\n            | {\n                data: TData extends Record<string, unknown> ? TData[keyof TData] : TData;\n                error: undefined;\n              }\n            | {\n                data: undefined;\n                error: TError extends Record<string, unknown> ? TError[keyof TError] : TError;\n              }\n          ) & {\n            request: Request;\n            response: Response;\n          }\n    >;\n\nexport interface ClientOptions {\n  baseUrl?: string;\n  responseStyle?: ResponseStyle;\n  throwOnError?: boolean;\n}\n\ntype MethodFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'>,\n) => RequestResult<TData, TError, ThrowOnError, TResponseStyle>;\n\ntype SseFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'>,\n) => Promise<ServerSentEventsResult<TData, TError>>;\n\ntype RequestFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'> &\n    Pick<Required<RequestOptions<TData, TResponseStyle, ThrowOnError>>, 'method'>,\n) => RequestResult<TData, TError, ThrowOnError, TResponseStyle>;\n\ntype BuildUrlFn = <\n  TData extends {\n    body?: unknown;\n    path?: Record<string, unknown>;\n    query?: Record<string, unknown>;\n    url: string;\n  },\n>(\n  options: TData & Options<TData>,\n) => string;\n\nexport type Client = CoreClient<RequestFn, Config, MethodFn, BuildUrlFn, SseFn> & {\n  interceptors: Middleware<Request, Response, unknown, ResolvedRequestOptions>;\n};\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 = ClientOptions> = (\n  override?: Config<ClientOptions & T>,\n) => Config<Required<ClientOptions> & T>;\n\nexport interface TDataShape {\n  body?: unknown;\n  headers?: unknown;\n  path?: unknown;\n  query?: unknown;\n  url: string;\n}\n\ntype OmitKeys<T, K> = Pick<T, Exclude<keyof T, K>>;\n\nexport type Options<\n  TData extends TDataShape = TDataShape,\n  ThrowOnError extends boolean = boolean,\n  TResponse = unknown,\n  TResponseStyle extends ResponseStyle = 'fields',\n> = OmitKeys<\n  RequestOptions<TResponse, TResponseStyle, ThrowOnError>,\n  'body' | 'path' | 'query' | 'url'\n> &\n  ([TData] extends [never] ? unknown : Omit<TData, 'url'>);\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-ofetch/sdk-client-required/client/utils.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { FetchOptions as OfetchOptions, ResponseType as OfetchResponseType } from 'ofetch';\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 {\n  Client,\n  ClientOptions,\n  Config,\n  RequestOptions,\n  ResolvedRequestOptions,\n  ResponseStyle,\n} 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\n/**\n * Map our parseAs value to ofetch responseType when not explicitly provided.\n */\nexport const mapParseAsToResponseType = (\n  parseAs: Config['parseAs'] | undefined,\n  explicit?: OfetchResponseType,\n): OfetchResponseType | undefined => {\n  if (explicit) return explicit;\n  switch (parseAs) {\n    case 'arrayBuffer':\n    case 'blob':\n    case 'json':\n    case 'text':\n    case 'stream':\n      return parseAs;\n    case 'formData':\n    case 'auto':\n    default:\n      return undefined; // let ofetch auto-detect\n  }\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\n/**\n * Heuristic to detect whether a request body can be safely retried.\n */\nexport const isRepeatableBody = (body: unknown): boolean => {\n  if (body == null) return true; // undefined/null treated as no-body\n  if (typeof body === 'string') return true;\n  if (typeof URLSearchParams !== 'undefined' && body instanceof URLSearchParams) return true;\n  if (typeof Uint8Array !== 'undefined' && body instanceof Uint8Array) return true;\n  if (typeof ArrayBuffer !== 'undefined' && body instanceof ArrayBuffer) return true;\n  if (typeof Blob !== 'undefined' && body instanceof Blob) return true;\n  if (typeof FormData !== 'undefined' && body instanceof FormData) return true;\n  // Streams are not repeatable\n  if (typeof ReadableStream !== 'undefined' && body instanceof ReadableStream) return false;\n  // Default: assume non-repeatable for unknown structured bodies\n  return false;\n};\n\n/**\n * Small helper to unify data vs fields return style.\n */\nexport const wrapDataReturn = <T>(\n  data: T,\n  result: { request: Request; response: Response },\n  responseStyle: ResponseStyle | undefined,\n): T | ((T extends Record<string, unknown> ? { data: T } : { data: T }) & typeof result) =>\n  (responseStyle ?? 'fields') === 'data' ? (data as any) : ({ data, ...result } as any);\n\n/**\n * Small helper to unify error vs fields return style.\n */\nexport const wrapErrorReturn = <E>(\n  error: E,\n  result: { request: Request; response: Response },\n  responseStyle: ResponseStyle | undefined,\n):\n  | undefined\n  | ((E extends Record<string, unknown> ? { error: E } : { error: E }) & typeof result) =>\n  (responseStyle ?? 'fields') === 'data' ? undefined : ({ error, ...result } as any);\n\n/**\n * Build options for $ofetch.raw from our resolved opts and body.\n */\nexport const buildOfetchOptions = (\n  opts: ResolvedRequestOptions,\n  body: BodyInit | null | undefined,\n  responseType: OfetchResponseType | undefined,\n  retryOverride?: OfetchOptions['retry'],\n): OfetchOptions =>\n  ({\n    agent: opts.agent as OfetchOptions['agent'],\n    body,\n    credentials: opts.credentials as OfetchOptions['credentials'],\n    dispatcher: opts.dispatcher as OfetchOptions['dispatcher'],\n    headers: opts.headers as Headers,\n    ignoreResponseError: (opts.ignoreResponseError as OfetchOptions['ignoreResponseError']) ?? true,\n    method: opts.method,\n    onRequest: opts.onRequest as OfetchOptions['onRequest'],\n    onRequestError: opts.onRequestError as OfetchOptions['onRequestError'],\n    onResponse: opts.onResponse as OfetchOptions['onResponse'],\n    onResponseError: opts.onResponseError as OfetchOptions['onResponseError'],\n    parseResponse: opts.parseResponse as OfetchOptions['parseResponse'],\n    // URL already includes query\n    query: undefined,\n    responseType,\n    retry: retryOverride ?? (opts.retry as OfetchOptions['retry']),\n    retryDelay: opts.retryDelay as OfetchOptions['retryDelay'],\n    retryStatusCodes: opts.retryStatusCodes as OfetchOptions['retryStatusCodes'],\n    signal: opts.signal,\n    timeout: opts.timeout as number | undefined,\n  }) as OfetchOptions;\n\n/**\n * Parse a successful response, handling empty bodies and stream cases.\n */\nexport const parseSuccess = async (\n  response: Response,\n  opts: ResolvedRequestOptions,\n  ofetchResponseType?: OfetchResponseType,\n): Promise<unknown> => {\n  // Stream requested: return stream body\n  if (ofetchResponseType === 'stream') {\n    return response.body;\n  }\n\n  const inferredParseAs =\n    (opts.parseAs === 'auto' ? getParseAs(response.headers.get('Content-Type')) : opts.parseAs) ??\n    'json';\n\n  // Handle empty responses\n  if (response.status === 204 || response.headers.get('Content-Length') === '0') {\n    switch (inferredParseAs) {\n      case 'arrayBuffer':\n      case 'blob':\n      case 'text':\n        return await (response as any)[inferredParseAs]();\n      case 'formData':\n        return new FormData();\n      case 'stream':\n        return response.body;\n      default:\n        return {};\n    }\n  }\n\n  // Prefer ofetch-populated data unless we explicitly need raw `formData`\n  let data: unknown = (response as any)._data;\n  if (inferredParseAs === 'formData' || typeof data === 'undefined') {\n    switch (inferredParseAs) {\n      case 'arrayBuffer':\n      case 'blob':\n      case 'formData':\n      case 'text':\n        data = await (response as any)[inferredParseAs]();\n        break;\n      case 'json': {\n        // Some servers return 200 with no Content-Length and empty body.\n        // response.json() would throw; detect empty via clone().text() first.\n        const txt = await response.clone().text();\n        if (!txt) {\n          data = {};\n        } else {\n          data = await (response as any).json();\n        }\n        break;\n      }\n      case 'stream':\n        return response.body;\n    }\n  }\n\n  if (inferredParseAs === 'json') {\n    if (opts.responseValidator) {\n      await opts.responseValidator(data);\n    }\n    if (opts.responseTransformer) {\n      data = await opts.responseTransformer(data);\n    }\n  }\n\n  return data;\n};\n\n/**\n * Parse an error response payload.\n */\nexport const parseError = async (response: Response): Promise<unknown> => {\n  let error: unknown = (response as any)._data;\n  if (typeof error === 'undefined') {\n    const textError = await response.text();\n    try {\n      error = JSON.parse(textError);\n    } catch {\n      error = textError;\n    }\n  }\n  return error ?? ({} as string);\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  ignoreResponseError: true,\n  parseAs: 'auto',\n  querySerializer: defaultQuerySerializer,\n  ...override,\n});\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-ofetch/sdk-client-required/client.gen.ts",
    "content": "// 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: 'http://localhost:3000/base' }));\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-ofetch/sdk-client-required/core/auth.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-ofetch/sdk-client-required/core/bodySerializer.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-ofetch/sdk-client-required/core/params.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-ofetch/sdk-client-required/core/pathSerializer.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-ofetch/sdk-client-required/core/queryKeySerializer.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\n/**\n * JSON-friendly union that mirrors what Pinia Colada can hash.\n */\nexport type JsonValue =\n  | null\n  | string\n  | number\n  | boolean\n  | JsonValue[]\n  | { [key: string]: JsonValue };\n\n/**\n * Replacer that converts non-JSON values (bigint, Date, etc.) to safe substitutes.\n */\nexport const queryKeyJsonReplacer = (_key: string, value: unknown) => {\n  if (value === undefined || typeof value === 'function' || typeof value === 'symbol') {\n    return undefined;\n  }\n  if (typeof value === 'bigint') {\n    return value.toString();\n  }\n  if (value instanceof Date) {\n    return value.toISOString();\n  }\n  return value;\n};\n\n/**\n * Safely stringifies a value and parses it back into a JsonValue.\n */\nexport const stringifyToJsonValue = (input: unknown): JsonValue | undefined => {\n  try {\n    const json = JSON.stringify(input, queryKeyJsonReplacer);\n    if (json === undefined) {\n      return undefined;\n    }\n    return JSON.parse(json) as JsonValue;\n  } catch {\n    return undefined;\n  }\n};\n\n/**\n * Detects plain objects (including objects with a null prototype).\n */\nconst isPlainObject = (value: unknown): value is Record<string, unknown> => {\n  if (value === null || typeof value !== 'object') {\n    return false;\n  }\n  const prototype = Object.getPrototypeOf(value as object);\n  return prototype === Object.prototype || prototype === null;\n};\n\n/**\n * Turns URLSearchParams into a sorted JSON object for deterministic keys.\n */\nconst serializeSearchParams = (params: URLSearchParams): JsonValue => {\n  const entries = Array.from(params.entries()).sort(([a], [b]) => a.localeCompare(b));\n  const result: Record<string, JsonValue> = {};\n\n  for (const [key, value] of entries) {\n    const existing = result[key];\n    if (existing === undefined) {\n      result[key] = value;\n      continue;\n    }\n\n    if (Array.isArray(existing)) {\n      (existing as string[]).push(value);\n    } else {\n      result[key] = [existing, value];\n    }\n  }\n\n  return result;\n};\n\n/**\n * Normalizes any accepted value into a JSON-friendly shape for query keys.\n */\nexport const serializeQueryKeyValue = (value: unknown): JsonValue | undefined => {\n  if (value === null) {\n    return null;\n  }\n\n  if (typeof value === 'string' || typeof value === 'number' || typeof value === 'boolean') {\n    return value;\n  }\n\n  if (value === undefined || typeof value === 'function' || typeof value === 'symbol') {\n    return undefined;\n  }\n\n  if (typeof value === 'bigint') {\n    return value.toString();\n  }\n\n  if (value instanceof Date) {\n    return value.toISOString();\n  }\n\n  if (Array.isArray(value)) {\n    return stringifyToJsonValue(value);\n  }\n\n  if (typeof URLSearchParams !== 'undefined' && value instanceof URLSearchParams) {\n    return serializeSearchParams(value);\n  }\n\n  if (isPlainObject(value)) {\n    return stringifyToJsonValue(value);\n  }\n\n  return undefined;\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-ofetch/sdk-client-required/core/serverSentEvents.gen.ts",
    "content": "// 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 const 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            // Normalize line endings: CRLF -> LF, then CR -> LF\n            buffer = buffer.replace(/\\r\\n/g, '\\n').replace(/\\r/g, '\\n');\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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-ofetch/sdk-client-required/core/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { Auth, AuthToken } from './auth.gen';\nimport type { BodySerializer, QuerySerializer, QuerySerializerOptions } from './bodySerializer.gen';\n\nexport type HttpMethod =\n  | 'connect'\n  | 'delete'\n  | 'get'\n  | 'head'\n  | 'options'\n  | 'patch'\n  | 'post'\n  | 'put'\n  | 'trace';\n\nexport type Client<\n  RequestFn = never,\n  Config = unknown,\n  MethodFn = never,\n  BuildUrlFn = never,\n  SseFn = never,\n> = {\n  /**\n   * Returns the final request URL.\n   */\n  buildUrl: BuildUrlFn;\n  getConfig: () => Config;\n  request: RequestFn;\n  setConfig: (config: Config) => Config;\n} & {\n  [K in HttpMethod]: MethodFn;\n} & ([SseFn] extends [never] ? { sse?: never } : { sse: { [K in HttpMethod]: SseFn } });\n\nexport interface Config {\n  /**\n   * Auth token or a function returning auth token. The resolved value will be\n   * added to the request payload as defined by its `security` array.\n   */\n  auth?: ((auth: Auth) => Promise<AuthToken> | AuthToken) | AuthToken;\n  /**\n   * A function for serializing request body parameter. By default,\n   * {@link JSON.stringify()} will be used.\n   */\n  bodySerializer?: BodySerializer | null;\n  /**\n   * An object containing any HTTP headers that you want to pre-populate your\n   * `Headers` object with.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/Headers/Headers#init See more}\n   */\n  headers?:\n    | RequestInit['headers']\n    | Record<\n        string,\n        string | number | boolean | (string | number | boolean)[] | null | undefined | unknown\n      >;\n  /**\n   * The request method.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/fetch#method See more}\n   */\n  method?: Uppercase<HttpMethod>;\n  /**\n   * A function for serializing request query parameters. By default, arrays\n   * will be exploded in form style, objects will be exploded in deepObject\n   * style, and reserved characters are percent-encoded.\n   *\n   * This method will have no effect if the native `paramsSerializer()` Axios\n   * API function is used.\n   *\n   * {@link https://swagger.io/docs/specification/serialization/#query View examples}\n   */\n  querySerializer?: QuerySerializer | QuerySerializerOptions;\n  /**\n   * A function validating request data. This is useful if you want to ensure\n   * the request conforms to the desired shape, so it can be safely sent to\n   * the server.\n   */\n  requestValidator?: (data: unknown) => Promise<unknown>;\n  /**\n   * A function transforming response data before it's returned. This is useful\n   * for post-processing data, e.g. converting ISO strings into Date objects.\n   */\n  responseTransformer?: (data: unknown) => Promise<unknown>;\n  /**\n   * A function validating response data. This is useful if you want to ensure\n   * the response conforms to the desired shape, so it can be safely passed to\n   * the transformers and returned to the user.\n   */\n  responseValidator?: (data: unknown) => Promise<unknown>;\n}\n\ntype IsExactlyNeverOrNeverUndefined<T> = [T] extends [never]\n  ? true\n  : [T] extends [never | undefined]\n    ? [undefined] extends [T]\n      ? false\n      : true\n    : false;\n\nexport type OmitNever<T extends Record<string, unknown>> = {\n  [K in keyof T as IsExactlyNeverOrNeverUndefined<T[K]> extends true ? never : K]: T[K];\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-ofetch/sdk-client-required/core/utils.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-ofetch/sdk-client-required/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport { apiVVersionODataControllerCount, callToTestOrderOfParams, callWithDefaultOptionalParameters, callWithDefaultParameters, callWithDescriptions, callWithDuplicateResponses, callWithNoContentResponse, callWithParameters, callWithResponse, callWithResponseAndNoContentResponse, callWithResponses, callWithResultFromHeader, callWithWeirdParameterNames, collectionFormat, complexParams, complexTypes, deleteCallWithoutParametersAndResponse, deleteFoo, deprecatedCall, dummyA, dummyB, duplicateName, duplicateName2, duplicateName3, duplicateName4, export_, fileResponse, fooWow, getApiVbyApiVersionSimpleOperation, getCallWithOptionalParam, getCallWithoutParametersAndResponse, headCallWithoutParametersAndResponse, import_, multipartRequest, multipartResponse, nonAsciiæøåÆøÅöôêÊ字符串, type Options, optionsCallWithoutParametersAndResponse, patchApiVbyApiVersionNoTag, patchCallWithoutParametersAndResponse, postApiVbyApiVersionFormData, postApiVbyApiVersionRequestBody, postCallWithOptionalParam, postCallWithoutParametersAndResponse, putCallWithoutParametersAndResponse, putWithFormUrlEncoded, testErrorCode, types, uploadFile } from './sdk.gen';\nexport type { _3eNum1Период, _400, AdditionalPropertiesIntegerIssue, AdditionalPropertiesUnknownIssue, AdditionalPropertiesUnknownIssue2, AdditionalPropertiesUnknownIssue3, AdditionalPropertiesUnknownIssueWritable, AnyOfAnyAndNull, AnyOfArrays, ApiVVersionODataControllerCountData, ApiVVersionODataControllerCountResponse, ApiVVersionODataControllerCountResponses, ArrayWithAnyOfProperties, ArrayWithArray, ArrayWithBooleans, ArrayWithNumbers, ArrayWithProperties, ArrayWithReferences, ArrayWithStrings, CallToTestOrderOfParamsData, CallWithDefaultOptionalParametersData, CallWithDefaultParametersData, CallWithDescriptionsData, CallWithDuplicateResponsesData, CallWithDuplicateResponsesError, CallWithDuplicateResponsesErrors, CallWithDuplicateResponsesResponse, CallWithDuplicateResponsesResponses, CallWithNoContentResponseData, CallWithNoContentResponseResponse, CallWithNoContentResponseResponses, CallWithParametersData, CallWithResponseAndNoContentResponseData, CallWithResponseAndNoContentResponseResponse, CallWithResponseAndNoContentResponseResponses, CallWithResponseData, CallWithResponseResponse, CallWithResponseResponses, CallWithResponsesData, CallWithResponsesError, CallWithResponsesErrors, CallWithResponsesResponse, CallWithResponsesResponses, CallWithResultFromHeaderData, CallWithResultFromHeaderErrors, CallWithResultFromHeaderResponses, CallWithWeirdParameterNamesData, CamelCaseCommentWithBreaks, CharactersInDescription, ClientOptions, CollectionFormatData, CommentWithBackticks, CommentWithBackticksAndQuotes, CommentWithBreaks, CommentWithExpressionPlaceholders, CommentWithQuotes, CommentWithReservedCharacters, CommentWithSlashes, ComplexParamsData, ComplexParamsResponse, ComplexParamsResponses, ComplexTypesData, ComplexTypesErrors, ComplexTypesResponse, ComplexTypesResponses, CompositionBaseModel, CompositionExtendedModel, CompositionWithAllOfAndNullable, CompositionWithAnyOf, CompositionWithAnyOfAndNullable, CompositionWithAnyOfAnonymous, CompositionWithNestedAnyAndTypeNull, CompositionWithNestedAnyOfAndNull, CompositionWithOneOf, CompositionWithOneOfAndComplexArrayDictionary, CompositionWithOneOfAndNullable, CompositionWithOneOfAndProperties, CompositionWithOneOfAndSimpleArrayDictionary, CompositionWithOneOfAndSimpleDictionary, CompositionWithOneOfAnonymous, CompositionWithOneOfDiscriminator, ConstValue, Default, DeleteCallWithoutParametersAndResponseData, DeleteFooData, DeleteFooData2, DeleteFooData3, DeprecatedCallData, DeprecatedModel, DictionaryWithArray, DictionaryWithDictionary, DictionaryWithProperties, DictionaryWithPropertiesAndAdditionalProperties, DictionaryWithReference, DictionaryWithString, DummyAData, DummyAResponse, DummyAResponses, DummyBData, DummyBResponse, DummyBResponses, DuplicateName2Data, DuplicateName3Data, DuplicateName4Data, DuplicateNameData, EnumFromDescription, EnumWithExtensions, EnumWithNumbers, EnumWithReplacedCharacters, EnumWithStrings, EnumWithXEnumNames, ExportData, ExternalRefA, ExternalRefB, ExternalSharedModel, File, FileResponseData, FileResponseResponse, FileResponseResponses, FileWritable, FooWowData, FooWowResponses, FreeFormObjectWithAdditionalPropertiesEqEmptyObject, FreeFormObjectWithAdditionalPropertiesEqTrue, FreeFormObjectWithoutAdditionalProperties, GenericSchemaDuplicateIssue1SystemBoolean, GenericSchemaDuplicateIssue1SystemBooleanWritable, GenericSchemaDuplicateIssue1SystemString, GenericSchemaDuplicateIssue1SystemStringWritable, GetApiVbyApiVersionSimpleOperationData, GetApiVbyApiVersionSimpleOperationError, GetApiVbyApiVersionSimpleOperationErrors, GetApiVbyApiVersionSimpleOperationResponse, GetApiVbyApiVersionSimpleOperationResponses, GetCallWithOptionalParamData, GetCallWithoutParametersAndResponseData, HeadCallWithoutParametersAndResponseData, Import, ImportData, ImportResponse, ImportResponses, IoK8sApimachineryPkgApisMetaV1DeleteOptions, IoK8sApimachineryPkgApisMetaV1Preconditions, ModelCircle, ModelFromZendesk, ModelSquare, ModelThatExtends, ModelThatExtendsExtends, ModelWithAdditionalPropertiesEqTrue, ModelWithAdditionalPropertiesRef, ModelWithAnyOfConstantSizeArray, ModelWithAnyOfConstantSizeArrayAndIntersect, ModelWithAnyOfConstantSizeArrayNullable, ModelWithAnyOfConstantSizeArrayWithNSizeAndOptions, ModelWithAnyOfConstantSizeArrayWithNSizeAndOptionsWritable, ModelWithArray, ModelWithArrayReadOnlyAndWriteOnly, ModelWithArrayReadOnlyAndWriteOnlyWritable, ModelWithBackticksInDescription, ModelWithBoolean, ModelWithCircularReference, ModelWithConst, ModelWithConstantSizeArray, ModelWithDictionary, ModelWithDuplicateImports, ModelWithDuplicateProperties, ModelWithEnum, ModelWithEnumFromDescription, ModelWithEnumWithHyphen, ModelWithInteger, ModelWithNestedArrayEnums, ModelWithNestedArrayEnumsData, ModelWithNestedArrayEnumsDataBar, ModelWithNestedArrayEnumsDataFoo, ModelWithNestedCompositionEnums, ModelWithNestedEnums, ModelWithNestedProperties, ModelWithNullableObject, ModelWithNullableString, ModelWithNumericEnumUnion, ModelWithOneOfAndProperties, ModelWithOneOfEnum, ModelWithOrderedProperties, ModelWithPattern, ModelWithPatternWritable, ModelWithPrefixItemsConstantSizeArray, ModelWithProperties, ModelWithPropertiesWritable, ModelWithReadOnlyAndWriteOnly, ModelWithReadOnlyAndWriteOnlyWritable, ModelWithReference, ModelWithReferenceWritable, ModelWithString, ModelWithStringError, MultipartRequestData, MultipartResponseData, MultipartResponseResponse, MultipartResponseResponses, NestedAnyOfArraysNullable, NonAsciiæøåÆøÅöôêÊ字符串Data, NonAsciiæøåÆøÅöôêÊ字符串Response, NonAsciiæøåÆøÅöôêÊ字符串Responses, NonAsciiStringæøåÆøÅöôêÊ字符串, NullableObject, OneOfAllOfIssue, OneOfAllOfIssueWritable, OptionsCallWithoutParametersAndResponseData, Pageable, ParameterSimpleParameterUnused, PatchApiVbyApiVersionNoTagData, PatchApiVbyApiVersionNoTagResponses, PatchCallWithoutParametersAndResponseData, PostApiVbyApiVersionFormDataData, PostApiVbyApiVersionRequestBodyData, PostCallWithOptionalParamData, PostCallWithOptionalParamResponse, PostCallWithOptionalParamResponses, PostCallWithoutParametersAndResponseData, PostServiceWithEmptyTagResponse, PostServiceWithEmptyTagResponse2, PutCallWithoutParametersAndResponseData, PutWithFormUrlEncodedData, SchemaWithFormRestrictedKeys, SimpleBoolean, SimpleFile, SimpleFormData, SimpleInteger, SimpleParameter, SimpleReference, SimpleRequestBody, SimpleString, SimpleStringWithPattern, TestErrorCodeData, TestErrorCodeErrors, TestErrorCodeResponses, TypesData, TypesResponse, TypesResponses, UploadFileData, UploadFileResponse, UploadFileResponses, XFooBar } from './types.gen';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-ofetch/sdk-client-required/sdk.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport { type Client, formDataBodySerializer, type Options as Options2, type TDataShape, urlSearchParamsBodySerializer } from './client';\nimport type { ApiVVersionODataControllerCountData, ApiVVersionODataControllerCountResponses, CallToTestOrderOfParamsData, CallWithDefaultOptionalParametersData, CallWithDefaultParametersData, CallWithDescriptionsData, CallWithDuplicateResponsesData, CallWithDuplicateResponsesErrors, CallWithDuplicateResponsesResponses, CallWithNoContentResponseData, CallWithNoContentResponseResponses, CallWithParametersData, CallWithResponseAndNoContentResponseData, CallWithResponseAndNoContentResponseResponses, CallWithResponseData, CallWithResponseResponses, CallWithResponsesData, CallWithResponsesErrors, CallWithResponsesResponses, CallWithResultFromHeaderData, CallWithResultFromHeaderErrors, CallWithResultFromHeaderResponses, CallWithWeirdParameterNamesData, CollectionFormatData, ComplexParamsData, ComplexParamsResponses, ComplexTypesData, ComplexTypesErrors, ComplexTypesResponses, DeleteCallWithoutParametersAndResponseData, DeleteFooData3, DeprecatedCallData, DummyAData, DummyAResponses, DummyBData, DummyBResponses, DuplicateName2Data, DuplicateName3Data, DuplicateName4Data, DuplicateNameData, ExportData, FileResponseData, FileResponseResponses, FooWowData, FooWowResponses, GetApiVbyApiVersionSimpleOperationData, GetApiVbyApiVersionSimpleOperationErrors, GetApiVbyApiVersionSimpleOperationResponses, GetCallWithOptionalParamData, GetCallWithoutParametersAndResponseData, HeadCallWithoutParametersAndResponseData, ImportData, ImportResponses, MultipartRequestData, MultipartResponseData, MultipartResponseResponses, NonAsciiæøåÆøÅöôêÊ字符串Data, NonAsciiæøåÆøÅöôêÊ字符串Responses, OptionsCallWithoutParametersAndResponseData, PatchApiVbyApiVersionNoTagData, PatchApiVbyApiVersionNoTagResponses, PatchCallWithoutParametersAndResponseData, PostApiVbyApiVersionFormDataData, PostApiVbyApiVersionRequestBodyData, PostCallWithOptionalParamData, PostCallWithOptionalParamResponses, PostCallWithoutParametersAndResponseData, PutCallWithoutParametersAndResponseData, PutWithFormUrlEncodedData, TestErrorCodeData, TestErrorCodeErrors, TestErrorCodeResponses, TypesData, TypesResponses, UploadFileData, UploadFileResponses } from './types.gen';\n\nexport type Options<TData extends TDataShape = TDataShape, ThrowOnError extends boolean = boolean> = Options2<TData, ThrowOnError> & {\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\nexport const export_ = <ThrowOnError extends boolean = false>(options: Options<ExportData, ThrowOnError>) => options.client.get<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/no+tag', ...options });\n\nexport const patchApiVbyApiVersionNoTag = <ThrowOnError extends boolean = false>(options: Options<PatchApiVbyApiVersionNoTagData, ThrowOnError>) => options.client.patch<PatchApiVbyApiVersionNoTagResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/no+tag', ...options });\n\nexport const import_ = <ThrowOnError extends boolean = false>(options: Options<ImportData, ThrowOnError>) => options.client.post<ImportResponses, unknown, ThrowOnError>({\n    url: '/api/v{api-version}/no+tag',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options.headers\n    }\n});\n\nexport const fooWow = <ThrowOnError extends boolean = false>(options: Options<FooWowData, ThrowOnError>) => options.client.put<FooWowResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/no+tag', ...options });\n\nexport const apiVVersionODataControllerCount = <ThrowOnError extends boolean = false>(options: Options<ApiVVersionODataControllerCountData, ThrowOnError>) => options.client.get<ApiVVersionODataControllerCountResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple/$count', ...options });\n\nexport const getApiVbyApiVersionSimpleOperation = <ThrowOnError extends boolean = false>(options: Options<GetApiVbyApiVersionSimpleOperationData, ThrowOnError>) => options.client.get<GetApiVbyApiVersionSimpleOperationResponses, GetApiVbyApiVersionSimpleOperationErrors, ThrowOnError>({ url: '/api/v{api-version}/simple:operation', ...options });\n\nexport const deleteCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options: Options<DeleteCallWithoutParametersAndResponseData, ThrowOnError>) => options.client.delete<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const getCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options: Options<GetCallWithoutParametersAndResponseData, ThrowOnError>) => options.client.get<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const headCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options: Options<HeadCallWithoutParametersAndResponseData, ThrowOnError>) => options.client.head<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const optionsCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options: Options<OptionsCallWithoutParametersAndResponseData, ThrowOnError>) => options.client.options<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const patchCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options: Options<PatchCallWithoutParametersAndResponseData, ThrowOnError>) => options.client.patch<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const postCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options: Options<PostCallWithoutParametersAndResponseData, ThrowOnError>) => options.client.post<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const putCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options: Options<PutCallWithoutParametersAndResponseData, ThrowOnError>) => options.client.put<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const deleteFoo = <ThrowOnError extends boolean = false>(options: Options<DeleteFooData3, ThrowOnError>) => options.client.delete<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/foo/{foo_param}/bar/{BarParam}', ...options });\n\nexport const callWithDescriptions = <ThrowOnError extends boolean = false>(options: Options<CallWithDescriptionsData, ThrowOnError>) => options.client.post<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/descriptions', ...options });\n\n/**\n * @deprecated\n */\nexport const deprecatedCall = <ThrowOnError extends boolean = false>(options: Options<DeprecatedCallData, ThrowOnError>) => options.client.post<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/parameters/deprecated', ...options });\n\nexport const callWithParameters = <ThrowOnError extends boolean = false>(options: Options<CallWithParametersData, ThrowOnError>) => options.client.post<unknown, unknown, ThrowOnError>({\n    url: '/api/v{api-version}/parameters/{parameterPath}',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options.headers\n    }\n});\n\nexport const callWithWeirdParameterNames = <ThrowOnError extends boolean = false>(options: Options<CallWithWeirdParameterNamesData, ThrowOnError>) => options.client.post<unknown, unknown, ThrowOnError>({\n    url: '/api/v{api-version}/parameters/{parameter.path.1}/{parameter-path-2}/{PARAMETER-PATH-3}',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options.headers\n    }\n});\n\nexport const getCallWithOptionalParam = <ThrowOnError extends boolean = false>(options: Options<GetCallWithOptionalParamData, ThrowOnError>) => options.client.get<unknown, unknown, ThrowOnError>({\n    url: '/api/v{api-version}/parameters',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options.headers\n    }\n});\n\nexport const postCallWithOptionalParam = <ThrowOnError extends boolean = false>(options: Options<PostCallWithOptionalParamData, ThrowOnError>) => options.client.post<PostCallWithOptionalParamResponses, unknown, ThrowOnError>({\n    url: '/api/v{api-version}/parameters',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options.headers\n    }\n});\n\nexport const postApiVbyApiVersionRequestBody = <ThrowOnError extends boolean = false>(options: Options<PostApiVbyApiVersionRequestBodyData, ThrowOnError>) => options.client.post<unknown, unknown, ThrowOnError>({\n    url: '/api/v{api-version}/requestBody',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options.headers\n    }\n});\n\nexport const postApiVbyApiVersionFormData = <ThrowOnError extends boolean = false>(options: Options<PostApiVbyApiVersionFormDataData, ThrowOnError>) => options.client.post<unknown, unknown, ThrowOnError>({\n    ...formDataBodySerializer,\n    url: '/api/v{api-version}/formData',\n    ...options,\n    headers: {\n        'Content-Type': null,\n        ...options.headers\n    }\n});\n\nexport const callWithDefaultParameters = <ThrowOnError extends boolean = false>(options: Options<CallWithDefaultParametersData, ThrowOnError>) => options.client.get<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/defaults', ...options });\n\nexport const callWithDefaultOptionalParameters = <ThrowOnError extends boolean = false>(options: Options<CallWithDefaultOptionalParametersData, ThrowOnError>) => options.client.post<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/defaults', ...options });\n\nexport const callToTestOrderOfParams = <ThrowOnError extends boolean = false>(options: Options<CallToTestOrderOfParamsData, ThrowOnError>) => options.client.put<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/defaults', ...options });\n\nexport const duplicateName = <ThrowOnError extends boolean = false>(options: Options<DuplicateNameData, ThrowOnError>) => options.client.delete<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/duplicate', ...options });\n\nexport const duplicateName2 = <ThrowOnError extends boolean = false>(options: Options<DuplicateName2Data, ThrowOnError>) => options.client.get<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/duplicate', ...options });\n\nexport const duplicateName3 = <ThrowOnError extends boolean = false>(options: Options<DuplicateName3Data, ThrowOnError>) => options.client.post<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/duplicate', ...options });\n\nexport const duplicateName4 = <ThrowOnError extends boolean = false>(options: Options<DuplicateName4Data, ThrowOnError>) => options.client.put<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/duplicate', ...options });\n\nexport const callWithNoContentResponse = <ThrowOnError extends boolean = false>(options: Options<CallWithNoContentResponseData, ThrowOnError>) => options.client.get<CallWithNoContentResponseResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/no-content', ...options });\n\nexport const callWithResponseAndNoContentResponse = <ThrowOnError extends boolean = false>(options: Options<CallWithResponseAndNoContentResponseData, ThrowOnError>) => options.client.get<CallWithResponseAndNoContentResponseResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/multiple-tags/response-and-no-content', ...options });\n\nexport const dummyA = <ThrowOnError extends boolean = false>(options: Options<DummyAData, ThrowOnError>) => options.client.get<DummyAResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/multiple-tags/a', ...options });\n\nexport const dummyB = <ThrowOnError extends boolean = false>(options: Options<DummyBData, ThrowOnError>) => options.client.get<DummyBResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/multiple-tags/b', ...options });\n\nexport const callWithResponse = <ThrowOnError extends boolean = false>(options: Options<CallWithResponseData, ThrowOnError>) => options.client.get<CallWithResponseResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/response', ...options });\n\nexport const callWithDuplicateResponses = <ThrowOnError extends boolean = false>(options: Options<CallWithDuplicateResponsesData, ThrowOnError>) => options.client.post<CallWithDuplicateResponsesResponses, CallWithDuplicateResponsesErrors, ThrowOnError>({ url: '/api/v{api-version}/response', ...options });\n\nexport const callWithResponses = <ThrowOnError extends boolean = false>(options: Options<CallWithResponsesData, ThrowOnError>) => options.client.put<CallWithResponsesResponses, CallWithResponsesErrors, ThrowOnError>({ url: '/api/v{api-version}/response', ...options });\n\nexport const collectionFormat = <ThrowOnError extends boolean = false>(options: Options<CollectionFormatData, ThrowOnError>) => options.client.get<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/collectionFormat', ...options });\n\nexport const types = <ThrowOnError extends boolean = false>(options: Options<TypesData, ThrowOnError>) => options.client.get<TypesResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/types', ...options });\n\nexport const uploadFile = <ThrowOnError extends boolean = false>(options: Options<UploadFileData, ThrowOnError>) => options.client.post<UploadFileResponses, unknown, ThrowOnError>({\n    ...urlSearchParamsBodySerializer,\n    url: '/api/v{api-version}/upload',\n    ...options,\n    headers: {\n        'Content-Type': 'application/x-www-form-urlencoded',\n        ...options.headers\n    }\n});\n\nexport const fileResponse = <ThrowOnError extends boolean = false>(options: Options<FileResponseData, ThrowOnError>) => options.client.get<FileResponseResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/file/{id}', ...options });\n\nexport const complexTypes = <ThrowOnError extends boolean = false>(options: Options<ComplexTypesData, ThrowOnError>) => options.client.get<ComplexTypesResponses, ComplexTypesErrors, ThrowOnError>({\n    querySerializer: { parameters: { parameterObject: { object: { style: 'form' } } } },\n    url: '/api/v{api-version}/complex',\n    ...options\n});\n\nexport const multipartResponse = <ThrowOnError extends boolean = false>(options: Options<MultipartResponseData, ThrowOnError>) => options.client.get<MultipartResponseResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/multipart', ...options });\n\nexport const multipartRequest = <ThrowOnError extends boolean = false>(options: Options<MultipartRequestData, ThrowOnError>) => options.client.post<unknown, unknown, ThrowOnError>({\n    ...formDataBodySerializer,\n    url: '/api/v{api-version}/multipart',\n    ...options,\n    headers: {\n        'Content-Type': null,\n        ...options.headers\n    }\n});\n\nexport const complexParams = <ThrowOnError extends boolean = false>(options: Options<ComplexParamsData, ThrowOnError>) => options.client.put<ComplexParamsResponses, unknown, ThrowOnError>({\n    url: '/api/v{api-version}/complex/{id}',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json-patch+json',\n        ...options.headers\n    }\n});\n\nexport const callWithResultFromHeader = <ThrowOnError extends boolean = false>(options: Options<CallWithResultFromHeaderData, ThrowOnError>) => options.client.post<CallWithResultFromHeaderResponses, CallWithResultFromHeaderErrors, ThrowOnError>({ url: '/api/v{api-version}/header', ...options });\n\nexport const testErrorCode = <ThrowOnError extends boolean = false>(options: Options<TestErrorCodeData, ThrowOnError>) => options.client.post<TestErrorCodeResponses, TestErrorCodeErrors, ThrowOnError>({ url: '/api/v{api-version}/error', ...options });\n\nexport const nonAsciiæøåÆøÅöôêÊ字符串 = <ThrowOnError extends boolean = false>(options: Options<NonAsciiæøåÆøÅöôêÊ字符串Data, ThrowOnError>) => options.client.post<NonAsciiæøåÆøÅöôêÊ字符串Responses, unknown, ThrowOnError>({ url: '/api/v{api-version}/non-ascii-æøåÆØÅöôêÊ字符串', ...options });\n\n/**\n * Login User\n */\nexport const putWithFormUrlEncoded = <ThrowOnError extends boolean = false>(options: Options<PutWithFormUrlEncodedData, ThrowOnError>) => options.client.put<unknown, unknown, ThrowOnError>({\n    ...urlSearchParamsBodySerializer,\n    url: '/api/v{api-version}/non-ascii-æøåÆØÅöôêÊ字符串',\n    ...options,\n    headers: {\n        'Content-Type': 'application/x-www-form-urlencoded',\n        ...options.headers\n    }\n});\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-ofetch/sdk-client-required/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type ClientOptions = {\n    baseUrl: 'http://localhost:3000/base' | (string & {});\n};\n\n/**\n * Model with number-only name\n */\nexport type _400 = string;\n\n/**\n * External ref to shared model (A)\n */\nexport type ExternalRefA = ExternalSharedModel;\n\n/**\n * External ref to shared model (B)\n */\nexport type ExternalRefB = ExternalSharedModel;\n\n/**\n * Testing multiline comments in string: First line\n * Second line\n *\n * Fourth line\n */\nexport type CamelCaseCommentWithBreaks = number;\n\n/**\n * Testing multiline comments in string: First line\n * Second line\n *\n * Fourth line\n */\nexport type CommentWithBreaks = number;\n\n/**\n * Testing backticks in string: `backticks` and ```multiple backticks``` should work\n */\nexport type CommentWithBackticks = number;\n\n/**\n * Testing backticks and quotes in string: `backticks`, 'quotes', \"double quotes\" and ```multiple backticks``` should work\n */\nexport type CommentWithBackticksAndQuotes = number;\n\n/**\n * Testing slashes in string: \\backwards\\\\\\ and /forwards/// should work\n */\nexport type CommentWithSlashes = number;\n\n/**\n * Testing expression placeholders in string: ${expression} should work\n */\nexport type CommentWithExpressionPlaceholders = number;\n\n/**\n * Testing quotes in string: 'single quote''' and \"double quotes\"\"\" should work\n */\nexport type CommentWithQuotes = number;\n\n/**\n * Testing reserved characters in string: * inline * and ** inline ** should work\n */\nexport type CommentWithReservedCharacters = number;\n\n/**\n * This is a simple number\n */\nexport type SimpleInteger = number;\n\n/**\n * This is a simple boolean\n */\nexport type SimpleBoolean = boolean;\n\n/**\n * This is a simple string\n */\nexport type SimpleString = string;\n\n/**\n * A string with non-ascii (unicode) characters valid in typescript identifiers (æøåÆØÅöÔèÈ字符串)\n */\nexport type NonAsciiStringæøåÆøÅöôêÊ字符串 = string;\n\n/**\n * This is a simple file\n */\nexport type SimpleFile = Blob | File;\n\n/**\n * This is a simple reference\n */\nexport type SimpleReference = ModelWithString;\n\n/**\n * This is a simple string\n */\nexport type SimpleStringWithPattern = string | null;\n\n/**\n * This is a simple enum with strings\n */\nexport type EnumWithStrings = 'Success' | 'Warning' | 'Error' | '\\'Single Quote\\'' | '\"Double Quotes\"' | 'Non-ascii: øæåôöØÆÅÔÖ字符串';\n\nexport type EnumWithReplacedCharacters = '\\'Single Quote\\'' | '\"Double Quotes\"' | 'øæåôöØÆÅÔÖ字符串' | 3.1 | '';\n\n/**\n * This is a simple enum with numbers\n */\nexport type EnumWithNumbers = 1 | 2 | 3 | 1.1 | 1.2 | 1.3 | 100 | 200 | 300 | -100 | -200 | -300 | -1.1 | -1.2 | -1.3;\n\n/**\n * Success=1,Warning=2,Error=3\n */\nexport type EnumFromDescription = number;\n\n/**\n * This is a simple enum with numbers\n */\nexport type EnumWithExtensions = 200 | 400 | 500;\n\nexport type EnumWithXEnumNames = 0 | 1 | 2;\n\n/**\n * This is a simple array with numbers\n */\nexport type ArrayWithNumbers = Array<number>;\n\n/**\n * This is a simple array with booleans\n */\nexport type ArrayWithBooleans = Array<boolean>;\n\n/**\n * This is a simple array with strings\n */\nexport type ArrayWithStrings = Array<string>;\n\n/**\n * This is a simple array with references\n */\nexport type ArrayWithReferences = Array<ModelWithString>;\n\n/**\n * This is a simple array containing an array\n */\nexport type ArrayWithArray = Array<Array<ModelWithString>>;\n\n/**\n * This is a simple array with properties\n */\nexport type ArrayWithProperties = Array<{\n    '16x16'?: CamelCaseCommentWithBreaks;\n    bar?: string;\n}>;\n\n/**\n * This is a simple array with any of properties\n */\nexport type ArrayWithAnyOfProperties = Array<{\n    foo?: string;\n} | {\n    bar?: string;\n}>;\n\nexport type AnyOfAnyAndNull = {\n    data?: unknown | null;\n};\n\n/**\n * This is a simple array with any of properties\n */\nexport type AnyOfArrays = {\n    results?: Array<{\n        foo?: string;\n    } | {\n        bar?: string;\n    }>;\n};\n\n/**\n * This is a string dictionary\n */\nexport type DictionaryWithString = {\n    [key: string]: string;\n};\n\nexport type DictionaryWithPropertiesAndAdditionalProperties = {\n    foo?: number;\n    bar?: boolean;\n    [key: string]: string | number | boolean | undefined;\n};\n\n/**\n * This is a string reference\n */\nexport type DictionaryWithReference = {\n    [key: string]: ModelWithString;\n};\n\n/**\n * This is a complex dictionary\n */\nexport type DictionaryWithArray = {\n    [key: string]: Array<ModelWithString>;\n};\n\n/**\n * This is a string dictionary\n */\nexport type DictionaryWithDictionary = {\n    [key: string]: {\n        [key: string]: string;\n    };\n};\n\n/**\n * This is a complex dictionary\n */\nexport type DictionaryWithProperties = {\n    [key: string]: {\n        foo?: string;\n        bar?: string;\n    };\n};\n\n/**\n * This is a model with one number property\n */\nexport type ModelWithInteger = {\n    /**\n     * This is a simple number property\n     */\n    prop?: number;\n};\n\n/**\n * This is a model with one boolean property\n */\nexport type ModelWithBoolean = {\n    /**\n     * This is a simple boolean property\n     */\n    prop?: boolean;\n};\n\n/**\n * This is a model with one string property\n */\nexport type ModelWithString = {\n    /**\n     * This is a simple string property\n     */\n    prop?: string;\n};\n\n/**\n * This is a model with one string property\n */\nexport type ModelWithStringError = {\n    /**\n     * This is a simple string property\n     */\n    prop?: string;\n};\n\n/**\n * `Comment` or `VoiceComment`. The JSON object for adding voice comments to tickets is different. See [Adding voice comments to tickets](/documentation/ticketing/managing-tickets/adding-voice-comments-to-tickets)\n */\nexport type ModelFromZendesk = string;\n\n/**\n * This is a model with one string property\n */\nexport type ModelWithNullableString = {\n    /**\n     * This is a simple string property\n     */\n    nullableProp1?: string | null;\n    /**\n     * This is a simple string property\n     */\n    nullableRequiredProp1: string | null;\n    /**\n     * This is a simple string property\n     */\n    nullableProp2?: string | null;\n    /**\n     * This is a simple string property\n     */\n    nullableRequiredProp2: string | null;\n    /**\n     * This is a simple enum with strings\n     */\n    'foo_bar-enum'?: 'Success' | 'Warning' | 'Error' | 'ØÆÅ字符串';\n};\n\n/**\n * This is a model with one enum\n */\nexport type ModelWithEnum = {\n    /**\n     * This is a simple enum with strings\n     */\n    'foo_bar-enum'?: 'Success' | 'Warning' | 'Error' | 'ØÆÅ字符串';\n    /**\n     * These are the HTTP error code enums\n     */\n    statusCode?: '100' | '200 FOO' | '300 FOO_BAR' | '400 foo-bar' | '500 foo.bar' | '600 foo&bar';\n    /**\n     * Simple boolean enum\n     */\n    bool?: true;\n};\n\n/**\n * This is a model with one enum with escaped name\n */\nexport type ModelWithEnumWithHyphen = {\n    /**\n     * Foo-Bar-Baz-Qux\n     */\n    'foo-bar-baz-qux'?: '3.0';\n};\n\n/**\n * This is a model with one enum\n */\nexport type ModelWithEnumFromDescription = {\n    /**\n     * Success=1,Warning=2,Error=3\n     */\n    test?: number;\n};\n\n/**\n * This is a model with nested enums\n */\nexport type ModelWithNestedEnums = {\n    dictionaryWithEnum?: {\n        [key: string]: 'Success' | 'Warning' | 'Error';\n    };\n    dictionaryWithEnumFromDescription?: {\n        [key: string]: number;\n    };\n    arrayWithEnum?: Array<'Success' | 'Warning' | 'Error'>;\n    arrayWithDescription?: Array<number>;\n    /**\n     * This is a simple enum with strings\n     */\n    'foo_bar-enum'?: 'Success' | 'Warning' | 'Error' | 'ØÆÅ字符串';\n};\n\n/**\n * This is a model with one property containing a reference\n */\nexport type ModelWithReference = {\n    prop?: ModelWithProperties;\n};\n\n/**\n * This is a model with one property containing an array\n */\nexport type ModelWithArrayReadOnlyAndWriteOnly = {\n    prop?: Array<ModelWithReadOnlyAndWriteOnly>;\n    propWithFile?: Array<Blob | File>;\n    propWithNumber?: Array<number>;\n};\n\n/**\n * This is a model with one property containing an array\n */\nexport type ModelWithArray = {\n    prop?: Array<ModelWithString>;\n    propWithFile?: Array<Blob | File>;\n    propWithNumber?: Array<number>;\n};\n\n/**\n * This is a model with one property containing a dictionary\n */\nexport type ModelWithDictionary = {\n    prop?: {\n        [key: string]: string;\n    };\n};\n\n/**\n * This is a deprecated model with a deprecated property\n *\n * @deprecated\n */\nexport type DeprecatedModel = {\n    /**\n     * This is a deprecated property\n     *\n     * @deprecated\n     */\n    prop?: string;\n};\n\n/**\n * This is a model with one property containing a circular reference\n */\nexport type ModelWithCircularReference = {\n    prop?: ModelWithCircularReference;\n};\n\n/**\n * This is a model with one property with a 'one of' relationship\n */\nexport type CompositionWithOneOf = {\n    propA?: ModelWithString | ModelWithEnum | ModelWithArray | ModelWithDictionary;\n};\n\n/**\n * This is a model with one property with a 'one of' relationship where the options are not $ref\n */\nexport type CompositionWithOneOfAnonymous = {\n    propA?: {\n        propA?: string;\n    } | string | number;\n};\n\n/**\n * Circle\n */\nexport type ModelCircle = {\n    kind: string;\n    radius?: number;\n};\n\n/**\n * Square\n */\nexport type ModelSquare = {\n    kind: string;\n    sideLength?: number;\n};\n\n/**\n * This is a model with one property with a 'one of' relationship where the options are not $ref\n */\nexport type CompositionWithOneOfDiscriminator = ({\n    kind: 'circle';\n} & ModelCircle) | ({\n    kind: 'square';\n} & ModelSquare);\n\n/**\n * This is a model with one property with a 'any of' relationship\n */\nexport type CompositionWithAnyOf = {\n    propA?: ModelWithString | ModelWithEnum | ModelWithArray | ModelWithDictionary;\n};\n\n/**\n * This is a model with one property with a 'any of' relationship where the options are not $ref\n */\nexport type CompositionWithAnyOfAnonymous = {\n    propA?: {\n        propA?: string;\n    } | string | number;\n};\n\n/**\n * This is a model with nested 'any of' property with a type null\n */\nexport type CompositionWithNestedAnyAndTypeNull = {\n    propA?: Array<ModelWithDictionary | null> | Array<ModelWithArray | null>;\n};\n\nexport type _3eNum1Период = 'Bird' | 'Dog';\n\nexport type ConstValue = 'ConstValue';\n\n/**\n * This is a model with one property with a 'any of' relationship where the options are not $ref\n */\nexport type CompositionWithNestedAnyOfAndNull = {\n    /**\n     * Scopes\n     */\n    propA?: Array<_3eNum1Период | ConstValue> | null;\n};\n\n/**\n * This is a model with one property with a 'one of' relationship\n */\nexport type CompositionWithOneOfAndNullable = {\n    propA?: {\n        boolean?: boolean;\n    } | ModelWithEnum | ModelWithArray | ModelWithDictionary | null;\n};\n\n/**\n * This is a model that contains a simple dictionary within composition\n */\nexport type CompositionWithOneOfAndSimpleDictionary = {\n    propA?: boolean | {\n        [key: string]: number;\n    };\n};\n\n/**\n * This is a model that contains a dictionary of simple arrays within composition\n */\nexport type CompositionWithOneOfAndSimpleArrayDictionary = {\n    propA?: boolean | {\n        [key: string]: Array<boolean>;\n    };\n};\n\n/**\n * This is a model that contains a dictionary of complex arrays (composited) within composition\n */\nexport type CompositionWithOneOfAndComplexArrayDictionary = {\n    propA?: boolean | {\n        [key: string]: Array<number | string>;\n    };\n};\n\n/**\n * This is a model with one property with a 'all of' relationship\n */\nexport type CompositionWithAllOfAndNullable = {\n    propA?: ({\n        boolean?: boolean;\n    } & ModelWithEnum & ModelWithArray & ModelWithDictionary) | null;\n};\n\n/**\n * This is a model with one property with a 'any of' relationship\n */\nexport type CompositionWithAnyOfAndNullable = {\n    propA?: {\n        boolean?: boolean;\n    } | ModelWithEnum | ModelWithArray | ModelWithDictionary | null;\n};\n\n/**\n * This is a base model with two simple optional properties\n */\nexport type CompositionBaseModel = {\n    firstName?: string;\n    lastname?: string;\n};\n\n/**\n * This is a model that extends the base model\n */\nexport type CompositionExtendedModel = CompositionBaseModel & {\n    age: number;\n    firstName: string;\n    lastname: string;\n};\n\n/**\n * This is a model with one nested property\n */\nexport type ModelWithProperties = {\n    required: string;\n    readonly requiredAndReadOnly: string;\n    requiredAndNullable: string | null;\n    string?: string;\n    number?: number;\n    boolean?: boolean;\n    reference?: ModelWithString;\n    'property with space'?: string;\n    default?: string;\n    try?: string;\n    readonly '@namespace.string'?: string;\n    readonly '@namespace.integer'?: number;\n};\n\n/**\n * This is a model with one nested property\n */\nexport type ModelWithNestedProperties = {\n    readonly first: {\n        readonly second: {\n            readonly third: string | null;\n        } | null;\n    } | null;\n};\n\n/**\n * This is a model with duplicated properties\n */\nexport type ModelWithDuplicateProperties = {\n    prop?: ModelWithString;\n};\n\n/**\n * This is a model with ordered properties\n */\nexport type ModelWithOrderedProperties = {\n    zebra?: string;\n    apple?: string;\n    hawaii?: string;\n};\n\n/**\n * This is a model with duplicated imports\n */\nexport type ModelWithDuplicateImports = {\n    propA?: ModelWithString;\n    propB?: ModelWithString;\n    propC?: ModelWithString;\n};\n\n/**\n * This is a model that extends another model\n */\nexport type ModelThatExtends = ModelWithString & {\n    propExtendsA?: string;\n    propExtendsB?: ModelWithString;\n};\n\n/**\n * This is a model that extends another model\n */\nexport type ModelThatExtendsExtends = ModelWithString & ModelThatExtends & {\n    propExtendsC?: string;\n    propExtendsD?: ModelWithString;\n};\n\n/**\n * This is a model that contains a some patterns\n */\nexport type ModelWithPattern = {\n    key: string;\n    name: string;\n    readonly enabled?: boolean;\n    readonly modified?: string;\n    id?: string;\n    text?: string;\n    patternWithSingleQuotes?: string;\n    patternWithNewline?: string;\n    patternWithBacktick?: string;\n    patternWithUnicode?: string;\n};\n\nexport type File = {\n    /**\n     * Id\n     */\n    readonly id?: string;\n    /**\n     * Updated at\n     */\n    readonly updated_at?: string;\n    /**\n     * Created at\n     */\n    readonly created_at?: string;\n    /**\n     * Mime\n     */\n    mime: string;\n    /**\n     * File\n     */\n    readonly file?: string;\n};\n\nexport type Default = {\n    name?: string;\n};\n\nexport type Pageable = {\n    page?: number;\n    size?: number;\n    sort?: Array<string>;\n};\n\n/**\n * This is a free-form object without additionalProperties.\n */\nexport type FreeFormObjectWithoutAdditionalProperties = {\n    [key: string]: unknown;\n};\n\n/**\n * This is a free-form object with additionalProperties: true.\n */\nexport type FreeFormObjectWithAdditionalPropertiesEqTrue = {\n    [key: string]: unknown;\n};\n\n/**\n * This is a free-form object with additionalProperties: {}.\n */\nexport type FreeFormObjectWithAdditionalPropertiesEqEmptyObject = {\n    [key: string]: unknown;\n};\n\nexport type ModelWithConst = {\n    String?: 'String';\n    number?: 0;\n    null?: null;\n    withType?: 'Some string';\n};\n\n/**\n * This is a model with one property and additionalProperties: true\n */\nexport type ModelWithAdditionalPropertiesEqTrue = {\n    /**\n     * This is a simple string property\n     */\n    prop?: string;\n    [key: string]: unknown;\n};\n\nexport type NestedAnyOfArraysNullable = {\n    nullableArray?: Array<string | boolean> | null;\n};\n\nexport type CompositionWithOneOfAndProperties = ({\n    foo: SimpleParameter;\n} | {\n    bar: NonAsciiStringæøåÆøÅöôêÊ字符串;\n}) & {\n    baz: number | null;\n    qux: number;\n};\n\n/**\n * An object that can be null\n */\nexport type NullableObject = {\n    foo?: string;\n} | null;\n\n/**\n * Some % character\n */\nexport type CharactersInDescription = string;\n\nexport type ModelWithNullableObject = {\n    data?: NullableObject;\n};\n\n/**\n * An object with additional properties that can be null (anyOf ref + null)\n */\nexport type ModelWithAdditionalPropertiesRef = {\n    [key: string]: NullableObject | null;\n};\n\nexport type ModelWithOneOfEnum = {\n    foo: 'Bar';\n} | {\n    foo: 'Baz';\n} | {\n    foo: 'Qux';\n} | {\n    content: string;\n    foo: 'Quux';\n} | {\n    content: [\n        string,\n        string\n    ];\n    foo: 'Corge';\n};\n\nexport type ModelWithNestedArrayEnumsDataFoo = 'foo' | 'bar';\n\nexport type ModelWithNestedArrayEnumsDataBar = 'baz' | 'qux';\n\nexport type ModelWithNestedArrayEnumsData = {\n    foo?: Array<ModelWithNestedArrayEnumsDataFoo>;\n    bar?: Array<ModelWithNestedArrayEnumsDataBar>;\n};\n\nexport type ModelWithNestedArrayEnums = {\n    array_strings?: Array<string>;\n    data?: ModelWithNestedArrayEnumsData;\n};\n\nexport type ModelWithNestedCompositionEnums = {\n    foo?: ModelWithNestedArrayEnumsDataFoo;\n};\n\nexport type ModelWithReadOnlyAndWriteOnly = {\n    foo: string;\n    readonly bar: string;\n};\n\nexport type ModelWithConstantSizeArray = [\n    number,\n    number\n];\n\nexport type ModelWithAnyOfConstantSizeArray = [\n    number | string,\n    number | string,\n    number | string\n];\n\nexport type ModelWithPrefixItemsConstantSizeArray = [\n    ModelWithInteger,\n    number | string,\n    string\n];\n\nexport type ModelWithAnyOfConstantSizeArrayNullable = [\n    number | null | string,\n    number | null | string,\n    number | null | string\n];\n\nexport type ModelWithAnyOfConstantSizeArrayWithNSizeAndOptions = [\n    number | Import,\n    number | Import\n];\n\nexport type ModelWithAnyOfConstantSizeArrayAndIntersect = [\n    number & string,\n    number & string\n];\n\nexport type ModelWithNumericEnumUnion = {\n    /**\n     * Период\n     */\n    value?: -10 | -1 | 0 | 1 | 3 | 6 | 12;\n};\n\n/**\n * Some description with `back ticks`\n */\nexport type ModelWithBackticksInDescription = {\n    /**\n     * The template `that` should be used for parsing and importing the contents of the CSV file.\n     *\n     * <br/><p>There is one placeholder currently supported:<ul>     <li><b>${x}</b> - refers to the n-th column in the CSV file, e.g. ${1}, ${2}, ...)</li></ul><p>Example of a correct JSON template:</p>\n     * <pre>\n     * [\n     * {\n     * \"resourceType\": \"Asset\",\n     * \"identifier\": {\n     * \"name\": \"${1}\",\n     * \"domain\": {\n     * \"name\": \"${2}\",\n     * \"community\": {\n     * \"name\": \"Some Community\"\n     * }\n     * }\n     * },\n     * \"attributes\" : {\n     * \"00000000-0000-0000-0000-000000003115\" : [ {\n     * \"value\" : \"${3}\"\n     * } ],\n     * \"00000000-0000-0000-0000-000000000222\" : [ {\n     * \"value\" : \"${4}\"\n     * } ]\n     * }\n     * }\n     * ]\n     * </pre>\n     */\n    template?: string;\n};\n\nexport type ModelWithOneOfAndProperties = (SimpleParameter | NonAsciiStringæøåÆøÅöôêÊ字符串) & {\n    baz: number | null;\n    qux: number;\n};\n\n/**\n * Model used to test deduplication strategy (unused)\n */\nexport type ParameterSimpleParameterUnused = string;\n\n/**\n * Model used to test deduplication strategy\n */\nexport type PostServiceWithEmptyTagResponse = string;\n\n/**\n * Model used to test deduplication strategy\n */\nexport type PostServiceWithEmptyTagResponse2 = string;\n\n/**\n * Model used to test deduplication strategy\n */\nexport type DeleteFooData = string;\n\n/**\n * Model used to test deduplication strategy\n */\nexport type DeleteFooData2 = string;\n\n/**\n * Model with restricted keyword name\n */\nexport type Import = string;\n\nexport type SchemaWithFormRestrictedKeys = {\n    description?: string;\n    'x-enum-descriptions'?: string;\n    'x-enum-varnames'?: string;\n    'x-enumNames'?: string;\n    title?: string;\n    object?: {\n        description?: string;\n        'x-enum-descriptions'?: string;\n        'x-enum-varnames'?: string;\n        'x-enumNames'?: string;\n        title?: string;\n    };\n    array?: Array<{\n        description?: string;\n        'x-enum-descriptions'?: string;\n        'x-enum-varnames'?: string;\n        'x-enumNames'?: string;\n        title?: string;\n    }>;\n};\n\n/**\n * This schema was giving PascalCase transformations a hard time\n */\nexport type IoK8sApimachineryPkgApisMetaV1DeleteOptions = {\n    /**\n     * Must be fulfilled before a deletion is carried out. If not possible, a 409 Conflict status will be returned.\n     */\n    preconditions?: IoK8sApimachineryPkgApisMetaV1Preconditions;\n};\n\n/**\n * This schema was giving PascalCase transformations a hard time\n */\nexport type IoK8sApimachineryPkgApisMetaV1Preconditions = {\n    /**\n     * Specifies the target ResourceVersion\n     */\n    resourceVersion?: string;\n    /**\n     * Specifies the target UID.\n     */\n    uid?: string;\n};\n\nexport type AdditionalPropertiesUnknownIssue = {\n    [key: string]: string | number;\n};\n\nexport type AdditionalPropertiesUnknownIssue2 = {\n    [key: string]: string | number;\n};\n\nexport type AdditionalPropertiesUnknownIssue3 = string & {\n    entries: {\n        [key: string]: AdditionalPropertiesUnknownIssue;\n    };\n};\n\nexport type AdditionalPropertiesIntegerIssue = {\n    value: number;\n    [key: string]: number;\n};\n\nexport type OneOfAllOfIssue = ((ConstValue | GenericSchemaDuplicateIssue1SystemBoolean) & _3eNum1Период) | GenericSchemaDuplicateIssue1SystemString;\n\nexport type GenericSchemaDuplicateIssue1SystemBoolean = {\n    item?: boolean;\n    error?: string | null;\n    readonly hasError?: boolean;\n    data?: {\n        [key: string]: never;\n    };\n};\n\nexport type GenericSchemaDuplicateIssue1SystemString = {\n    item?: string | null;\n    error?: string | null;\n    readonly hasError?: boolean;\n};\n\nexport type ExternalSharedModel = {\n    id: string;\n    name?: string;\n};\n\n/**\n * This is a model with one property containing a reference\n */\nexport type ModelWithReferenceWritable = {\n    prop?: ModelWithPropertiesWritable;\n};\n\n/**\n * This is a model with one property containing an array\n */\nexport type ModelWithArrayReadOnlyAndWriteOnlyWritable = {\n    prop?: Array<ModelWithReadOnlyAndWriteOnlyWritable>;\n    propWithFile?: Array<Blob | File>;\n    propWithNumber?: Array<number>;\n};\n\n/**\n * This is a model with one nested property\n */\nexport type ModelWithPropertiesWritable = {\n    required: string;\n    requiredAndNullable: string | null;\n    string?: string;\n    number?: number;\n    boolean?: boolean;\n    reference?: ModelWithString;\n    'property with space'?: string;\n    default?: string;\n    try?: string;\n};\n\n/**\n * This is a model that contains a some patterns\n */\nexport type ModelWithPatternWritable = {\n    key: string;\n    name: string;\n    id?: string;\n    text?: string;\n    patternWithSingleQuotes?: string;\n    patternWithNewline?: string;\n    patternWithBacktick?: string;\n    patternWithUnicode?: string;\n};\n\nexport type FileWritable = {\n    /**\n     * Mime\n     */\n    mime: string;\n};\n\nexport type ModelWithReadOnlyAndWriteOnlyWritable = {\n    foo: string;\n    baz: string;\n};\n\nexport type ModelWithAnyOfConstantSizeArrayWithNSizeAndOptionsWritable = [\n    number | Import,\n    number | Import\n];\n\nexport type AdditionalPropertiesUnknownIssueWritable = {\n    [key: string]: string | number;\n};\n\nexport type OneOfAllOfIssueWritable = ((ConstValue | GenericSchemaDuplicateIssue1SystemBoolean) & _3eNum1Период) | GenericSchemaDuplicateIssue1SystemString;\n\nexport type GenericSchemaDuplicateIssue1SystemBooleanWritable = {\n    item?: boolean;\n    error?: string | null;\n    data?: {\n        [key: string]: never;\n    };\n};\n\nexport type GenericSchemaDuplicateIssue1SystemStringWritable = {\n    item?: string | null;\n    error?: string | null;\n};\n\n/**\n * This is a reusable parameter\n */\nexport type SimpleParameter = string;\n\n/**\n * Parameter with illegal characters\n */\nexport type XFooBar = ModelWithString;\n\n/**\n * A reusable request body\n */\nexport type SimpleRequestBody = ModelWithString;\n\n/**\n * A reusable request body\n */\nexport type SimpleFormData = ModelWithString;\n\nexport type ExportData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no+tag';\n};\n\nexport type PatchApiVbyApiVersionNoTagData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no+tag';\n};\n\nexport type PatchApiVbyApiVersionNoTagResponses = {\n    /**\n     * OK\n     */\n    default: unknown;\n};\n\nexport type ImportData = {\n    body: ModelWithReadOnlyAndWriteOnlyWritable | ModelWithArrayReadOnlyAndWriteOnlyWritable;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no+tag';\n};\n\nexport type ImportResponses = {\n    /**\n     * Success\n     */\n    200: ModelFromZendesk;\n    /**\n     * Default success response\n     */\n    default: ModelWithReadOnlyAndWriteOnly;\n};\n\nexport type ImportResponse = ImportResponses[keyof ImportResponses];\n\nexport type FooWowData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no+tag';\n};\n\nexport type FooWowResponses = {\n    /**\n     * OK\n     */\n    default: unknown;\n};\n\nexport type ApiVVersionODataControllerCountData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple/$count';\n};\n\nexport type ApiVVersionODataControllerCountResponses = {\n    /**\n     * Success\n     */\n    200: ModelFromZendesk;\n};\n\nexport type ApiVVersionODataControllerCountResponse = ApiVVersionODataControllerCountResponses[keyof ApiVVersionODataControllerCountResponses];\n\nexport type GetApiVbyApiVersionSimpleOperationData = {\n    body?: never;\n    path: {\n        /**\n         * foo in method\n         */\n        foo_param: string;\n    };\n    query?: never;\n    url: '/api/v{api-version}/simple:operation';\n};\n\nexport type GetApiVbyApiVersionSimpleOperationErrors = {\n    /**\n     * Default error response\n     */\n    default: ModelWithBoolean;\n};\n\nexport type GetApiVbyApiVersionSimpleOperationError = GetApiVbyApiVersionSimpleOperationErrors[keyof GetApiVbyApiVersionSimpleOperationErrors];\n\nexport type GetApiVbyApiVersionSimpleOperationResponses = {\n    /**\n     * Response is a simple number\n     */\n    200: number;\n};\n\nexport type GetApiVbyApiVersionSimpleOperationResponse = GetApiVbyApiVersionSimpleOperationResponses[keyof GetApiVbyApiVersionSimpleOperationResponses];\n\nexport type DeleteCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type GetCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type HeadCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type OptionsCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type PatchCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type PostCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type PutCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type DeleteFooData3 = {\n    body?: never;\n    headers: {\n        /**\n         * Parameter with illegal characters\n         */\n        'x-Foo-Bar': ModelWithString;\n    };\n    path: {\n        /**\n         * foo in method\n         */\n        foo_param: string;\n        /**\n         * bar in method\n         */\n        BarParam: string;\n    };\n    query?: never;\n    url: '/api/v{api-version}/foo/{foo_param}/bar/{BarParam}';\n};\n\nexport type CallWithDescriptionsData = {\n    body?: never;\n    path?: never;\n    query?: {\n        /**\n         * Testing multiline comments in string: First line\n         * Second line\n         *\n         * Fourth line\n         */\n        parameterWithBreaks?: string;\n        /**\n         * Testing backticks in string: `backticks` and ```multiple backticks``` should work\n         */\n        parameterWithBackticks?: string;\n        /**\n         * Testing slashes in string: \\backwards\\\\\\ and /forwards/// should work\n         */\n        parameterWithSlashes?: string;\n        /**\n         * Testing expression placeholders in string: ${expression} should work\n         */\n        parameterWithExpressionPlaceholders?: string;\n        /**\n         * Testing quotes in string: 'single quote''' and \"double quotes\"\"\" should work\n         */\n        parameterWithQuotes?: string;\n        /**\n         * Testing reserved characters in string: * inline * and ** inline ** should work\n         */\n        parameterWithReservedCharacters?: string;\n    };\n    url: '/api/v{api-version}/descriptions';\n};\n\nexport type DeprecatedCallData = {\n    body?: never;\n    headers: {\n        /**\n         * This parameter is deprecated\n         *\n         * @deprecated\n         */\n        parameter: DeprecatedModel | null;\n    };\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/parameters/deprecated';\n};\n\nexport type CallWithParametersData = {\n    /**\n     * This is the parameter that goes into the body\n     */\n    body: {\n        [key: string]: unknown;\n    } | null;\n    headers: {\n        /**\n         * This is the parameter that goes into the header\n         */\n        parameterHeader: string | null;\n    };\n    path: {\n        /**\n         * This is the parameter that goes into the path\n         */\n        parameterPath: string | null;\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string | null;\n    };\n    query: {\n        foo_ref_enum?: ModelWithNestedArrayEnumsDataFoo;\n        foo_all_of_enum: ModelWithNestedArrayEnumsDataFoo;\n        /**\n         * This is the parameter that goes into the query params\n         */\n        cursor: string | null;\n    };\n    url: '/api/v{api-version}/parameters/{parameterPath}';\n};\n\nexport type CallWithWeirdParameterNamesData = {\n    /**\n     * This is the parameter that goes into the body\n     */\n    body: ModelWithString | null;\n    headers: {\n        /**\n         * This is the parameter that goes into the request header\n         */\n        'parameter.header': string | null;\n    };\n    path: {\n        /**\n         * This is the parameter that goes into the path\n         */\n        'parameter.path.1'?: string;\n        /**\n         * This is the parameter that goes into the path\n         */\n        'parameter-path-2'?: string;\n        /**\n         * This is the parameter that goes into the path\n         */\n        'PARAMETER-PATH-3'?: string;\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string | null;\n    };\n    query: {\n        /**\n         * This is the parameter with a reserved keyword\n         */\n        default?: string;\n        /**\n         * This is the parameter that goes into the request query params\n         */\n        'parameter-query': string | null;\n    };\n    url: '/api/v{api-version}/parameters/{parameter.path.1}/{parameter-path-2}/{PARAMETER-PATH-3}';\n};\n\nexport type GetCallWithOptionalParamData = {\n    /**\n     * This is a required parameter\n     */\n    body: ModelWithOneOfEnum;\n    path?: never;\n    query?: {\n        /**\n         * This is an optional parameter\n         */\n        page?: number;\n    };\n    url: '/api/v{api-version}/parameters';\n};\n\nexport type PostCallWithOptionalParamData = {\n    /**\n     * This is an optional parameter\n     */\n    body?: {\n        offset?: number | null;\n    };\n    path?: never;\n    query: {\n        /**\n         * This is a required parameter\n         */\n        parameter: Pageable;\n    };\n    url: '/api/v{api-version}/parameters';\n};\n\nexport type PostCallWithOptionalParamResponses = {\n    /**\n     * Response is a simple number\n     */\n    200: number;\n    /**\n     * Success\n     */\n    204: void;\n};\n\nexport type PostCallWithOptionalParamResponse = PostCallWithOptionalParamResponses[keyof PostCallWithOptionalParamResponses];\n\nexport type PostApiVbyApiVersionRequestBodyData = {\n    /**\n     * A reusable request body\n     */\n    body?: SimpleRequestBody;\n    path?: never;\n    query?: {\n        /**\n         * This is a reusable parameter\n         */\n        parameter?: string;\n    };\n    url: '/api/v{api-version}/requestBody';\n};\n\nexport type PostApiVbyApiVersionFormDataData = {\n    /**\n     * A reusable request body\n     */\n    body?: SimpleFormData;\n    path?: never;\n    query?: {\n        /**\n         * This is a reusable parameter\n         */\n        parameter?: string;\n    };\n    url: '/api/v{api-version}/formData';\n};\n\nexport type CallWithDefaultParametersData = {\n    body?: never;\n    path?: never;\n    query?: {\n        /**\n         * This is a simple string with default value\n         */\n        parameterString?: string | null;\n        /**\n         * This is a simple number with default value\n         */\n        parameterNumber?: number | null;\n        /**\n         * This is a simple boolean with default value\n         */\n        parameterBoolean?: boolean | null;\n        /**\n         * This is a simple enum with default value\n         */\n        parameterEnum?: 'Success' | 'Warning' | 'Error';\n        /**\n         * This is a simple model with default value\n         */\n        parameterModel?: ModelWithString | null;\n    };\n    url: '/api/v{api-version}/defaults';\n};\n\nexport type CallWithDefaultOptionalParametersData = {\n    body?: never;\n    path?: never;\n    query?: {\n        /**\n         * This is a simple string that is optional with default value\n         */\n        parameterString?: string;\n        /**\n         * This is a simple number that is optional with default value\n         */\n        parameterNumber?: number;\n        /**\n         * This is a simple boolean that is optional with default value\n         */\n        parameterBoolean?: boolean;\n        /**\n         * This is a simple enum that is optional with default value\n         */\n        parameterEnum?: 'Success' | 'Warning' | 'Error';\n        /**\n         * This is a simple model that is optional with default value\n         */\n        parameterModel?: ModelWithString;\n    };\n    url: '/api/v{api-version}/defaults';\n};\n\nexport type CallToTestOrderOfParamsData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * This is a optional string with default\n         */\n        parameterOptionalStringWithDefault?: string;\n        /**\n         * This is a optional string with empty default\n         */\n        parameterOptionalStringWithEmptyDefault?: string;\n        /**\n         * This is a optional string with no default\n         */\n        parameterOptionalStringWithNoDefault?: string;\n        /**\n         * This is a string with default\n         */\n        parameterStringWithDefault: string;\n        /**\n         * This is a string with empty default\n         */\n        parameterStringWithEmptyDefault: string;\n        /**\n         * This is a string with no default\n         */\n        parameterStringWithNoDefault: string;\n        /**\n         * This is a string that can be null with no default\n         */\n        parameterStringNullableWithNoDefault?: string | null;\n        /**\n         * This is a string that can be null with default\n         */\n        parameterStringNullableWithDefault?: string | null;\n    };\n    url: '/api/v{api-version}/defaults';\n};\n\nexport type DuplicateNameData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/duplicate';\n};\n\nexport type DuplicateName2Data = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/duplicate';\n};\n\nexport type DuplicateName3Data = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/duplicate';\n};\n\nexport type DuplicateName4Data = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/duplicate';\n};\n\nexport type CallWithNoContentResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no-content';\n};\n\nexport type CallWithNoContentResponseResponses = {\n    /**\n     * Success\n     */\n    204: void;\n};\n\nexport type CallWithNoContentResponseResponse = CallWithNoContentResponseResponses[keyof CallWithNoContentResponseResponses];\n\nexport type CallWithResponseAndNoContentResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multiple-tags/response-and-no-content';\n};\n\nexport type CallWithResponseAndNoContentResponseResponses = {\n    /**\n     * Response is a simple number\n     */\n    200: number;\n    /**\n     * Success\n     */\n    204: void;\n};\n\nexport type CallWithResponseAndNoContentResponseResponse = CallWithResponseAndNoContentResponseResponses[keyof CallWithResponseAndNoContentResponseResponses];\n\nexport type DummyAData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multiple-tags/a';\n};\n\nexport type DummyAResponses = {\n    200: _400;\n};\n\nexport type DummyAResponse = DummyAResponses[keyof DummyAResponses];\n\nexport type DummyBData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multiple-tags/b';\n};\n\nexport type DummyBResponses = {\n    /**\n     * Success\n     */\n    204: void;\n};\n\nexport type DummyBResponse = DummyBResponses[keyof DummyBResponses];\n\nexport type CallWithResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/response';\n};\n\nexport type CallWithResponseResponses = {\n    default: Import;\n};\n\nexport type CallWithResponseResponse = CallWithResponseResponses[keyof CallWithResponseResponses];\n\nexport type CallWithDuplicateResponsesData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/response';\n};\n\nexport type CallWithDuplicateResponsesErrors = {\n    /**\n     * Message for 500 error\n     */\n    500: ModelWithStringError;\n    /**\n     * Message for 501 error\n     */\n    501: ModelWithStringError;\n    /**\n     * Message for 502 error\n     */\n    502: ModelWithStringError;\n    /**\n     * Message for 4XX errors\n     */\n    '4XX': DictionaryWithArray;\n    /**\n     * Default error response\n     */\n    default: ModelWithBoolean;\n};\n\nexport type CallWithDuplicateResponsesError = CallWithDuplicateResponsesErrors[keyof CallWithDuplicateResponsesErrors];\n\nexport type CallWithDuplicateResponsesResponses = {\n    /**\n     * Message for 200 response\n     */\n    200: ModelWithBoolean & ModelWithInteger;\n    /**\n     * Message for 201 response\n     */\n    201: ModelWithString;\n    /**\n     * Message for 202 response\n     */\n    202: ModelWithString;\n};\n\nexport type CallWithDuplicateResponsesResponse = CallWithDuplicateResponsesResponses[keyof CallWithDuplicateResponsesResponses];\n\nexport type CallWithResponsesData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/response';\n};\n\nexport type CallWithResponsesErrors = {\n    /**\n     * Message for 500 error\n     */\n    500: ModelWithStringError;\n    /**\n     * Message for 501 error\n     */\n    501: ModelWithStringError;\n    /**\n     * Message for 502 error\n     */\n    502: ModelWithStringError;\n    /**\n     * Message for default response\n     */\n    default: ModelWithStringError;\n};\n\nexport type CallWithResponsesError = CallWithResponsesErrors[keyof CallWithResponsesErrors];\n\nexport type CallWithResponsesResponses = {\n    /**\n     * Message for 200 response\n     */\n    200: {\n        readonly '@namespace.string'?: string;\n        readonly '@namespace.integer'?: number;\n        readonly value?: Array<ModelWithString>;\n    };\n    /**\n     * Message for 201 response\n     */\n    201: ModelThatExtends;\n    /**\n     * Message for 202 response\n     */\n    202: ModelThatExtendsExtends;\n};\n\nexport type CallWithResponsesResponse = CallWithResponsesResponses[keyof CallWithResponsesResponses];\n\nexport type CollectionFormatData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * This is an array parameter that is sent as csv format (comma-separated values)\n         */\n        parameterArrayCSV: Array<string> | null;\n        /**\n         * This is an array parameter that is sent as ssv format (space-separated values)\n         */\n        parameterArraySSV: Array<string> | null;\n        /**\n         * This is an array parameter that is sent as tsv format (tab-separated values)\n         */\n        parameterArrayTSV: Array<string> | null;\n        /**\n         * This is an array parameter that is sent as pipes format (pipe-separated values)\n         */\n        parameterArrayPipes: Array<string> | null;\n        /**\n         * This is an array parameter that is sent as multi format (multiple parameter instances)\n         */\n        parameterArrayMulti: Array<string> | null;\n    };\n    url: '/api/v{api-version}/collectionFormat';\n};\n\nexport type TypesData = {\n    body?: never;\n    path?: {\n        /**\n         * This is a number parameter\n         */\n        id?: number;\n    };\n    query: {\n        /**\n         * This is a number parameter\n         */\n        parameterNumber: number;\n        /**\n         * This is a string parameter\n         */\n        parameterString: string | null;\n        /**\n         * This is a boolean parameter\n         */\n        parameterBoolean: boolean | null;\n        /**\n         * This is an object parameter\n         */\n        parameterObject: {\n            [key: string]: unknown;\n        } | null;\n        /**\n         * This is an array parameter\n         */\n        parameterArray: Array<string> | null;\n        /**\n         * This is a dictionary parameter\n         */\n        parameterDictionary: {\n            [key: string]: unknown;\n        } | null;\n        /**\n         * This is an enum parameter\n         */\n        parameterEnum: 'Success' | 'Warning' | 'Error' | null;\n    };\n    url: '/api/v{api-version}/types';\n};\n\nexport type TypesResponses = {\n    /**\n     * Response is a simple number\n     */\n    200: number;\n    /**\n     * Response is a simple string\n     */\n    201: string;\n    /**\n     * Response is a simple boolean\n     */\n    202: boolean;\n    /**\n     * Response is a simple object\n     */\n    203: {\n        [key: string]: unknown;\n    };\n};\n\nexport type TypesResponse = TypesResponses[keyof TypesResponses];\n\nexport type UploadFileData = {\n    body: Blob | File;\n    path: {\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string | null;\n    };\n    query?: never;\n    url: '/api/v{api-version}/upload';\n};\n\nexport type UploadFileResponses = {\n    200: boolean;\n};\n\nexport type UploadFileResponse = UploadFileResponses[keyof UploadFileResponses];\n\nexport type FileResponseData = {\n    body?: never;\n    path: {\n        id: string;\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string;\n    };\n    query?: never;\n    url: '/api/v{api-version}/file/{id}';\n};\n\nexport type FileResponseResponses = {\n    /**\n     * Success\n     */\n    200: Blob | File;\n};\n\nexport type FileResponseResponse = FileResponseResponses[keyof FileResponseResponses];\n\nexport type ComplexTypesData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * Parameter containing object\n         */\n        parameterObject: {\n            first?: {\n                second?: {\n                    third?: string;\n                };\n            };\n        };\n        /**\n         * Parameter containing reference\n         */\n        parameterReference: ModelWithString;\n    };\n    url: '/api/v{api-version}/complex';\n};\n\nexport type ComplexTypesErrors = {\n    /**\n     * 400 `server` error\n     */\n    400: unknown;\n    /**\n     * 500 server error\n     */\n    500: unknown;\n};\n\nexport type ComplexTypesResponses = {\n    /**\n     * Successful response\n     */\n    200: Array<ModelWithString>;\n};\n\nexport type ComplexTypesResponse = ComplexTypesResponses[keyof ComplexTypesResponses];\n\nexport type MultipartResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multipart';\n};\n\nexport type MultipartResponseResponses = {\n    /**\n     * OK\n     */\n    200: {\n        file?: Blob | File;\n        metadata?: {\n            foo?: string;\n            bar?: string;\n        };\n    };\n};\n\nexport type MultipartResponseResponse = MultipartResponseResponses[keyof MultipartResponseResponses];\n\nexport type MultipartRequestData = {\n    body?: {\n        content?: Blob | File;\n        data?: ModelWithString | null;\n    };\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multipart';\n};\n\nexport type ComplexParamsData = {\n    body?: {\n        readonly key: string | null;\n        name: string | null;\n        enabled?: boolean;\n        type: 'Monkey' | 'Horse' | 'Bird';\n        listOfModels?: Array<ModelWithString> | null;\n        listOfStrings?: Array<string> | null;\n        parameters: ModelWithString | ModelWithEnum | ModelWithArray | ModelWithDictionary;\n        readonly user?: {\n            readonly id?: number;\n            readonly name?: string | null;\n        };\n    };\n    path: {\n        id: number;\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string;\n    };\n    query?: never;\n    url: '/api/v{api-version}/complex/{id}';\n};\n\nexport type ComplexParamsResponses = {\n    /**\n     * Success\n     */\n    200: ModelWithString;\n};\n\nexport type ComplexParamsResponse = ComplexParamsResponses[keyof ComplexParamsResponses];\n\nexport type CallWithResultFromHeaderData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/header';\n};\n\nexport type CallWithResultFromHeaderErrors = {\n    /**\n     * 400 server error\n     */\n    400: unknown;\n    /**\n     * 500 server error\n     */\n    500: unknown;\n};\n\nexport type CallWithResultFromHeaderResponses = {\n    /**\n     * Successful response\n     */\n    200: unknown;\n};\n\nexport type TestErrorCodeData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * Status code to return\n         */\n        status: number;\n    };\n    url: '/api/v{api-version}/error';\n};\n\nexport type TestErrorCodeErrors = {\n    /**\n     * Custom message: Internal Server Error\n     */\n    500: unknown;\n    /**\n     * Custom message: Not Implemented\n     */\n    501: unknown;\n    /**\n     * Custom message: Bad Gateway\n     */\n    502: unknown;\n    /**\n     * Custom message: Service Unavailable\n     */\n    503: unknown;\n};\n\nexport type TestErrorCodeResponses = {\n    /**\n     * Custom message: Successful response\n     */\n    200: unknown;\n};\n\nexport type NonAsciiæøåÆøÅöôêÊ字符串Data = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * Dummy input param\n         */\n        nonAsciiParamæøåÆØÅöôêÊ: number;\n    };\n    url: '/api/v{api-version}/non-ascii-æøåÆØÅöôêÊ字符串';\n};\n\nexport type NonAsciiæøåÆøÅöôêÊ字符串Responses = {\n    /**\n     * Successful response\n     */\n    200: Array<NonAsciiStringæøåÆøÅöôêÊ字符串>;\n};\n\nexport type NonAsciiæøåÆøÅöôêÊ字符串Response = NonAsciiæøåÆøÅöôêÊ字符串Responses[keyof NonAsciiæøåÆøÅöôêÊ字符串Responses];\n\nexport type PutWithFormUrlEncodedData = {\n    body: ArrayWithStrings;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/non-ascii-æøåÆØÅöôêÊ字符串';\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-ofetch/tsconfig-node16-sdk/client/client.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport { ofetch, type ResponseType as OfetchResponseType } from 'ofetch';\n\nimport { createSseClient } from '../core/serverSentEvents.gen.js';\nimport type { HttpMethod } from '../core/types.gen.js';\nimport { getValidRequestBody } from '../core/utils.gen.js';\nimport type { Client, Config, RequestOptions, ResolvedRequestOptions } from './types.gen.js';\nimport {\n  buildOfetchOptions,\n  buildUrl,\n  createConfig,\n  createInterceptors,\n  isRepeatableBody,\n  mapParseAsToResponseType,\n  mergeConfigs,\n  mergeHeaders,\n  parseError,\n  parseSuccess,\n  setAuthParams,\n  wrapDataReturn,\n  wrapErrorReturn,\n} from './utils.gen.js';\n\ntype ReqInit = Omit<RequestInit, 'body' | 'headers'> & {\n  body?: BodyInit | null | undefined;\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  // precompute serialized / network body\n  const resolveOptions = async (options: RequestOptions) => {\n    const opts = {\n      ..._config,\n      ...options,\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 if body is empty to avoid invalid requests\n    if (opts.body === undefined || opts.serializedBody === '') {\n      opts.headers.delete('Content-Type');\n    }\n\n    // if a raw body is provided (no serializer), adjust Content-Type only when it\n    // equals the default JSON value to better match the concrete body type\n    if (\n      opts.body !== undefined &&\n      opts.bodySerializer === null &&\n      (opts.headers.get('Content-Type') || '').toLowerCase() === 'application/json'\n    ) {\n      const b: unknown = opts.body;\n      if (typeof FormData !== 'undefined' && b instanceof FormData) {\n        // let the runtime set the multipart boundary\n        opts.headers.delete('Content-Type');\n      } else if (typeof URLSearchParams !== 'undefined' && b instanceof URLSearchParams) {\n        // standard urlencoded content type (+ charset)\n        opts.headers.set('Content-Type', 'application/x-www-form-urlencoded;charset=UTF-8');\n      } else if (typeof Blob !== 'undefined' && b instanceof Blob) {\n        const t = b.type?.trim();\n        if (t) {\n          opts.headers.set('Content-Type', t);\n        } else {\n          // unknown blob type: avoid sending a misleading JSON header\n          opts.headers.delete('Content-Type');\n        }\n      }\n    }\n\n    // precompute network body (stability for retries and interceptors)\n    const networkBody = getValidRequestBody(opts) as RequestInit['body'] | null | undefined;\n\n    const url = buildUrl(opts);\n\n    return { networkBody, opts, url };\n  };\n\n  // apply request interceptors and mirror header/method/signal back to opts\n  const applyRequestInterceptors = async (\n    request: Request,\n    opts: ResolvedRequestOptions,\n    body: BodyInit | null | undefined,\n  ) => {\n    for (const fn of interceptors.request.fns) {\n      if (fn) {\n        request = await fn(request, opts);\n      }\n    }\n    // reflect interceptor changes into opts used by the network layer\n    opts.headers = request.headers;\n    opts.method = request.method as Uppercase<HttpMethod>;\n    // ignore request.body changes to avoid turning serialized bodies into streams\n    // body comes only from getValidRequestBody(options)\n    // reflect signal if present\n    opts.signal = (request as any).signal as AbortSignal | undefined;\n\n    // When body is FormData, remove Content-Type header to avoid boundary mismatch.\n    // Note: We already delete Content-Type in resolveOptions for FormData, but the\n    // Request constructor (line 175) re-adds it with an auto-generated boundary.\n    // Since we pass the original FormData (not the Request's body) to ofetch, and\n    // ofetch will generate its own boundary, we must remove the Request's Content-Type\n    // to let ofetch set the correct one. Otherwise the boundary in the header won't\n    // match the boundary in the actual multipart body sent by ofetch.\n    if (typeof FormData !== 'undefined' && body instanceof FormData) {\n      opts.headers.delete('Content-Type');\n    }\n\n    return request;\n  };\n\n  // build ofetch options with stable retry logic based on body repeatability\n  const buildNetworkOptions = (\n    opts: ResolvedRequestOptions,\n    body: BodyInit | null | undefined,\n    responseType: OfetchResponseType | undefined,\n  ) => {\n    const effectiveRetry = isRepeatableBody(body) ? (opts.retry as any) : (0 as any);\n    return buildOfetchOptions(opts, body, responseType, effectiveRetry);\n  };\n\n  const request: Client['request'] = async (options) => {\n    const { networkBody: initialNetworkBody, opts, url } = await resolveOptions(options as any);\n    // map parseAs -> ofetch responseType once per request\n    const ofetchResponseType: OfetchResponseType | undefined = mapParseAsToResponseType(\n      opts.parseAs,\n      opts.responseType,\n    );\n\n    const $ofetch = opts.ofetch ?? ofetch;\n\n    // create Request before network to run middleware consistently\n    const networkBody = initialNetworkBody;\n    const requestInit: ReqInit = {\n      body: networkBody,\n      headers: opts.headers as Headers,\n      method: opts.method,\n      redirect: 'follow',\n      signal: opts.signal,\n    };\n    let request = new Request(url, requestInit);\n\n    request = await applyRequestInterceptors(request, opts, networkBody);\n    const finalUrl = request.url;\n\n    // build ofetch options and perform the request (.raw keeps the Response)\n    const responseOptions = buildNetworkOptions(\n      opts as ResolvedRequestOptions,\n      networkBody,\n      ofetchResponseType,\n    );\n\n    let response = await $ofetch.raw(finalUrl, responseOptions);\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 = { request, response };\n\n    if (response.ok) {\n      const data = await parseSuccess(response, opts, ofetchResponseType);\n      return wrapDataReturn(data, result, opts.responseStyle);\n    }\n\n    let finalError = await parseError(response);\n\n    for (const fn of interceptors.error.fns) {\n      if (fn) {\n        finalError = await fn(finalError, response, request, opts);\n      }\n    }\n\n    // ensure error is never undefined after interceptors\n    finalError = (finalError as any) || ({} as string);\n\n    if (opts.throwOnError) {\n      throw finalError;\n    }\n\n    return wrapErrorReturn(finalError, result, opts.responseStyle) as any;\n  };\n\n  const makeMethodFn = (method: Uppercase<HttpMethod>) => (options: RequestOptions) =>\n    request({ ...options, method } as any);\n\n  const makeSseFn = (method: Uppercase<HttpMethod>) => async (options: RequestOptions) => {\n    const { networkBody, opts, url } = await resolveOptions(options);\n    const optsForSse: any = { ...opts };\n    delete optsForSse.body; // body is provided via serializedBody below\n    return createSseClient({\n      ...optsForSse,\n      fetch: opts.fetch,\n      headers: opts.headers as Headers,\n      method,\n      onRequest: async (url, init) => {\n        let request = new Request(url, init);\n        request = await applyRequestInterceptors(request, opts, networkBody);\n        return request;\n      },\n      serializedBody: networkBody as BodyInit | null | undefined,\n      signal: opts.signal,\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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-ofetch/tsconfig-node16-sdk/client/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type { Auth } from '../core/auth.gen.js';\nexport type { QuerySerializerOptions } from '../core/bodySerializer.gen.js';\nexport {\n  formDataBodySerializer,\n  jsonBodySerializer,\n  urlSearchParamsBodySerializer,\n} from '../core/bodySerializer.gen.js';\nexport { buildClientParams } from '../core/params.gen.js';\nexport { serializeQueryKeyValue } from '../core/queryKeySerializer.gen.js';\nexport { createClient } from './client.gen.js';\nexport type {\n  Client,\n  ClientOptions,\n  Config,\n  CreateClientConfig,\n  Options,\n  RequestOptions,\n  RequestResult,\n  ResolvedRequestOptions,\n  ResponseStyle,\n  TDataShape,\n} from './types.gen.js';\nexport { createConfig, mergeHeaders } from './utils.gen.js';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-ofetch/tsconfig-node16-sdk/client/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { FetchOptions as OfetchOptions, ResponseType as OfetchResponseType } from 'ofetch';\nimport type { ofetch } from 'ofetch';\n\nimport type { Auth } from '../core/auth.gen.js';\nimport type {\n  ServerSentEventsOptions,\n  ServerSentEventsResult,\n} from '../core/serverSentEvents.gen.js';\nimport type { Client as CoreClient, Config as CoreConfig } from '../core/types.gen.js';\nimport type { Middleware } from './utils.gen.js';\n\nexport type ResponseStyle = 'data' | 'fields';\n\nexport interface Config<T extends ClientOptions = ClientOptions>\n  extends Omit<RequestInit, 'body' | 'headers' | 'method'>, CoreConfig {\n  /**\n   * HTTP(S) agent configuration (Node.js only). Passed through to ofetch.\n   */\n  agent?: OfetchOptions['agent'];\n  /**\n   * Base URL for all requests made by this client.\n   */\n  baseUrl?: T['baseUrl'];\n  /**\n   * Node-only proxy/agent options.\n   */\n  dispatcher?: OfetchOptions['dispatcher'];\n  /**\n   * Fetch API implementation. Used for SSE streaming. You can use this option\n   * to provide a custom fetch instance.\n   *\n   * @default globalThis.fetch\n   */\n  fetch?: typeof fetch;\n  /**\n   * Controls the native ofetch behaviour that throws `FetchError` when\n   * `response.ok === false`. We default to suppressing it to match the fetch\n   * client semantics and let `throwOnError` drive the outcome.\n   */\n  ignoreResponseError?: OfetchOptions['ignoreResponseError'];\n  // No custom fetch option: provide custom instance via `ofetch` instead\n  /**\n   * Please don't use the Fetch client for Next.js applications. The `next`\n   * options won't have any effect.\n   *\n   * Install {@link https://www.npmjs.com/package/@hey-api/client-next `@hey-api/client-next`} instead.\n   */\n  next?: never;\n  /**\n   * Custom ofetch instance created via `ofetch.create()`. If provided, it will\n   * be used for requests instead of the default `ofetch` export.\n   */\n  ofetch?: typeof ofetch;\n  /**\n   * ofetch hook called before a request is sent.\n   */\n  onRequest?: OfetchOptions['onRequest'];\n  /**\n   * ofetch hook called when a request fails before receiving a response\n   * (e.g., network errors or aborted requests).\n   */\n  onRequestError?: OfetchOptions['onRequestError'];\n  /**\n   * ofetch hook called after a successful response is received and parsed.\n   */\n  onResponse?: OfetchOptions['onResponse'];\n  /**\n   * ofetch hook called when the response indicates an error (non-ok status)\n   * or when response parsing fails.\n   */\n  onResponseError?: OfetchOptions['onResponseError'];\n  /**\n   * Return the response data parsed in a specified format. By default, `auto`\n   * will infer the appropriate method from the `Content-Type` response header.\n   * You can override this behavior with any of the {@link Body} methods.\n   * Select `stream` if you don't want to parse response data at all.\n   *\n   * @default 'auto'\n   */\n  parseAs?: 'arrayBuffer' | 'auto' | 'blob' | 'formData' | 'json' | 'stream' | 'text';\n  /** Custom response parser (ofetch). */\n  parseResponse?: OfetchOptions['parseResponse'];\n  /**\n   * Should we return only data or multiple fields (data, error, response, etc.)?\n   *\n   * @default 'fields'\n   */\n  responseStyle?: ResponseStyle;\n  /**\n   * ofetch responseType override. If provided, it will be passed directly to\n   * ofetch and take precedence over `parseAs`.\n   */\n  responseType?: OfetchResponseType;\n  /**\n   * Automatically retry failed requests.\n   */\n  retry?: OfetchOptions['retry'];\n  /**\n   * Delay (in ms) between retry attempts.\n   */\n  retryDelay?: OfetchOptions['retryDelay'];\n  /**\n   * HTTP status codes that should trigger a retry.\n   */\n  retryStatusCodes?: OfetchOptions['retryStatusCodes'];\n  /**\n   * Throw an error instead of returning it in the response?\n   *\n   * @default false\n   */\n  throwOnError?: T['throwOnError'];\n  /**\n   * Abort the request after the given milliseconds.\n   */\n  timeout?: number;\n}\n\nexport interface RequestOptions<\n  TData = unknown,\n  TResponseStyle extends ResponseStyle = 'fields',\n  ThrowOnError extends boolean = boolean,\n  Url extends string = string,\n>\n  extends\n    Config<{\n      responseStyle: TResponseStyle;\n      throwOnError: ThrowOnError;\n    }>,\n    Pick<\n      ServerSentEventsOptions<TData>,\n      | 'onSseError'\n      | 'onSseEvent'\n      | 'sseDefaultRetryDelay'\n      | 'sseMaxRetryAttempts'\n      | 'sseMaxRetryDelay'\n    > {\n  /**\n   * Any body that you want to add to your request.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/fetch#body}\n   */\n  body?: unknown;\n  path?: Record<string, unknown>;\n  query?: Record<string, unknown>;\n  /**\n   * Security mechanism(s) to use for the request.\n   */\n  security?: ReadonlyArray<Auth>;\n  url: Url;\n}\n\nexport interface ResolvedRequestOptions<\n  TResponseStyle extends ResponseStyle = 'fields',\n  ThrowOnError extends boolean = boolean,\n  Url extends string = string,\n> extends RequestOptions<unknown, TResponseStyle, ThrowOnError, Url> {\n  serializedBody?: string;\n}\n\nexport type RequestResult<\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = boolean,\n  TResponseStyle extends ResponseStyle = 'fields',\n> = ThrowOnError extends true\n  ? Promise<\n      TResponseStyle extends 'data'\n        ? TData extends Record<string, unknown>\n          ? TData[keyof TData]\n          : TData\n        : {\n            data: TData extends Record<string, unknown> ? TData[keyof TData] : TData;\n            request: Request;\n            response: Response;\n          }\n    >\n  : Promise<\n      TResponseStyle extends 'data'\n        ? (TData extends Record<string, unknown> ? TData[keyof TData] : TData) | undefined\n        : (\n            | {\n                data: TData extends Record<string, unknown> ? TData[keyof TData] : TData;\n                error: undefined;\n              }\n            | {\n                data: undefined;\n                error: TError extends Record<string, unknown> ? TError[keyof TError] : TError;\n              }\n          ) & {\n            request: Request;\n            response: Response;\n          }\n    >;\n\nexport interface ClientOptions {\n  baseUrl?: string;\n  responseStyle?: ResponseStyle;\n  throwOnError?: boolean;\n}\n\ntype MethodFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'>,\n) => RequestResult<TData, TError, ThrowOnError, TResponseStyle>;\n\ntype SseFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'>,\n) => Promise<ServerSentEventsResult<TData, TError>>;\n\ntype RequestFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'> &\n    Pick<Required<RequestOptions<TData, TResponseStyle, ThrowOnError>>, 'method'>,\n) => RequestResult<TData, TError, ThrowOnError, TResponseStyle>;\n\ntype BuildUrlFn = <\n  TData extends {\n    body?: unknown;\n    path?: Record<string, unknown>;\n    query?: Record<string, unknown>;\n    url: string;\n  },\n>(\n  options: TData & Options<TData>,\n) => string;\n\nexport type Client = CoreClient<RequestFn, Config, MethodFn, BuildUrlFn, SseFn> & {\n  interceptors: Middleware<Request, Response, unknown, ResolvedRequestOptions>;\n};\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 = ClientOptions> = (\n  override?: Config<ClientOptions & T>,\n) => Config<Required<ClientOptions> & T>;\n\nexport interface TDataShape {\n  body?: unknown;\n  headers?: unknown;\n  path?: unknown;\n  query?: unknown;\n  url: string;\n}\n\ntype OmitKeys<T, K> = Pick<T, Exclude<keyof T, K>>;\n\nexport type Options<\n  TData extends TDataShape = TDataShape,\n  ThrowOnError extends boolean = boolean,\n  TResponse = unknown,\n  TResponseStyle extends ResponseStyle = 'fields',\n> = OmitKeys<\n  RequestOptions<TResponse, TResponseStyle, ThrowOnError>,\n  'body' | 'path' | 'query' | 'url'\n> &\n  ([TData] extends [never] ? unknown : Omit<TData, 'url'>);\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-ofetch/tsconfig-node16-sdk/client/utils.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { FetchOptions as OfetchOptions, ResponseType as OfetchResponseType } from 'ofetch';\n\nimport { getAuthToken } from '../core/auth.gen.js';\nimport type { QuerySerializerOptions } from '../core/bodySerializer.gen.js';\nimport { jsonBodySerializer } from '../core/bodySerializer.gen.js';\nimport {\n  serializeArrayParam,\n  serializeObjectParam,\n  serializePrimitiveParam,\n} from '../core/pathSerializer.gen.js';\nimport { getUrl } from '../core/utils.gen.js';\nimport type {\n  Client,\n  ClientOptions,\n  Config,\n  RequestOptions,\n  ResolvedRequestOptions,\n  ResponseStyle,\n} from './types.gen.js';\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\n/**\n * Map our parseAs value to ofetch responseType when not explicitly provided.\n */\nexport const mapParseAsToResponseType = (\n  parseAs: Config['parseAs'] | undefined,\n  explicit?: OfetchResponseType,\n): OfetchResponseType | undefined => {\n  if (explicit) return explicit;\n  switch (parseAs) {\n    case 'arrayBuffer':\n    case 'blob':\n    case 'json':\n    case 'text':\n    case 'stream':\n      return parseAs;\n    case 'formData':\n    case 'auto':\n    default:\n      return undefined; // let ofetch auto-detect\n  }\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\n/**\n * Heuristic to detect whether a request body can be safely retried.\n */\nexport const isRepeatableBody = (body: unknown): boolean => {\n  if (body == null) return true; // undefined/null treated as no-body\n  if (typeof body === 'string') return true;\n  if (typeof URLSearchParams !== 'undefined' && body instanceof URLSearchParams) return true;\n  if (typeof Uint8Array !== 'undefined' && body instanceof Uint8Array) return true;\n  if (typeof ArrayBuffer !== 'undefined' && body instanceof ArrayBuffer) return true;\n  if (typeof Blob !== 'undefined' && body instanceof Blob) return true;\n  if (typeof FormData !== 'undefined' && body instanceof FormData) return true;\n  // Streams are not repeatable\n  if (typeof ReadableStream !== 'undefined' && body instanceof ReadableStream) return false;\n  // Default: assume non-repeatable for unknown structured bodies\n  return false;\n};\n\n/**\n * Small helper to unify data vs fields return style.\n */\nexport const wrapDataReturn = <T>(\n  data: T,\n  result: { request: Request; response: Response },\n  responseStyle: ResponseStyle | undefined,\n): T | ((T extends Record<string, unknown> ? { data: T } : { data: T }) & typeof result) =>\n  (responseStyle ?? 'fields') === 'data' ? (data as any) : ({ data, ...result } as any);\n\n/**\n * Small helper to unify error vs fields return style.\n */\nexport const wrapErrorReturn = <E>(\n  error: E,\n  result: { request: Request; response: Response },\n  responseStyle: ResponseStyle | undefined,\n):\n  | undefined\n  | ((E extends Record<string, unknown> ? { error: E } : { error: E }) & typeof result) =>\n  (responseStyle ?? 'fields') === 'data' ? undefined : ({ error, ...result } as any);\n\n/**\n * Build options for $ofetch.raw from our resolved opts and body.\n */\nexport const buildOfetchOptions = (\n  opts: ResolvedRequestOptions,\n  body: BodyInit | null | undefined,\n  responseType: OfetchResponseType | undefined,\n  retryOverride?: OfetchOptions['retry'],\n): OfetchOptions =>\n  ({\n    agent: opts.agent as OfetchOptions['agent'],\n    body,\n    credentials: opts.credentials as OfetchOptions['credentials'],\n    dispatcher: opts.dispatcher as OfetchOptions['dispatcher'],\n    headers: opts.headers as Headers,\n    ignoreResponseError: (opts.ignoreResponseError as OfetchOptions['ignoreResponseError']) ?? true,\n    method: opts.method,\n    onRequest: opts.onRequest as OfetchOptions['onRequest'],\n    onRequestError: opts.onRequestError as OfetchOptions['onRequestError'],\n    onResponse: opts.onResponse as OfetchOptions['onResponse'],\n    onResponseError: opts.onResponseError as OfetchOptions['onResponseError'],\n    parseResponse: opts.parseResponse as OfetchOptions['parseResponse'],\n    // URL already includes query\n    query: undefined,\n    responseType,\n    retry: retryOverride ?? (opts.retry as OfetchOptions['retry']),\n    retryDelay: opts.retryDelay as OfetchOptions['retryDelay'],\n    retryStatusCodes: opts.retryStatusCodes as OfetchOptions['retryStatusCodes'],\n    signal: opts.signal,\n    timeout: opts.timeout as number | undefined,\n  }) as OfetchOptions;\n\n/**\n * Parse a successful response, handling empty bodies and stream cases.\n */\nexport const parseSuccess = async (\n  response: Response,\n  opts: ResolvedRequestOptions,\n  ofetchResponseType?: OfetchResponseType,\n): Promise<unknown> => {\n  // Stream requested: return stream body\n  if (ofetchResponseType === 'stream') {\n    return response.body;\n  }\n\n  const inferredParseAs =\n    (opts.parseAs === 'auto' ? getParseAs(response.headers.get('Content-Type')) : opts.parseAs) ??\n    'json';\n\n  // Handle empty responses\n  if (response.status === 204 || response.headers.get('Content-Length') === '0') {\n    switch (inferredParseAs) {\n      case 'arrayBuffer':\n      case 'blob':\n      case 'text':\n        return await (response as any)[inferredParseAs]();\n      case 'formData':\n        return new FormData();\n      case 'stream':\n        return response.body;\n      default:\n        return {};\n    }\n  }\n\n  // Prefer ofetch-populated data unless we explicitly need raw `formData`\n  let data: unknown = (response as any)._data;\n  if (inferredParseAs === 'formData' || typeof data === 'undefined') {\n    switch (inferredParseAs) {\n      case 'arrayBuffer':\n      case 'blob':\n      case 'formData':\n      case 'text':\n        data = await (response as any)[inferredParseAs]();\n        break;\n      case 'json': {\n        // Some servers return 200 with no Content-Length and empty body.\n        // response.json() would throw; detect empty via clone().text() first.\n        const txt = await response.clone().text();\n        if (!txt) {\n          data = {};\n        } else {\n          data = await (response as any).json();\n        }\n        break;\n      }\n      case 'stream':\n        return response.body;\n    }\n  }\n\n  if (inferredParseAs === 'json') {\n    if (opts.responseValidator) {\n      await opts.responseValidator(data);\n    }\n    if (opts.responseTransformer) {\n      data = await opts.responseTransformer(data);\n    }\n  }\n\n  return data;\n};\n\n/**\n * Parse an error response payload.\n */\nexport const parseError = async (response: Response): Promise<unknown> => {\n  let error: unknown = (response as any)._data;\n  if (typeof error === 'undefined') {\n    const textError = await response.text();\n    try {\n      error = JSON.parse(textError);\n    } catch {\n      error = textError;\n    }\n  }\n  return error ?? ({} as string);\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  ignoreResponseError: true,\n  parseAs: 'auto',\n  querySerializer: defaultQuerySerializer,\n  ...override,\n});\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-ofetch/tsconfig-node16-sdk/client.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport { type ClientOptions, type Config, createClient, createConfig } from './client/index.js';\nimport type { ClientOptions as ClientOptions2 } from './types.gen.js';\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: 'http://localhost:3000/base' }));\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-ofetch/tsconfig-node16-sdk/core/auth.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-ofetch/tsconfig-node16-sdk/core/bodySerializer.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { ArrayStyle, ObjectStyle, SerializerOptions } from './pathSerializer.gen.js';\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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-ofetch/tsconfig-node16-sdk/core/params.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-ofetch/tsconfig-node16-sdk/core/pathSerializer.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-ofetch/tsconfig-node16-sdk/core/queryKeySerializer.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\n/**\n * JSON-friendly union that mirrors what Pinia Colada can hash.\n */\nexport type JsonValue =\n  | null\n  | string\n  | number\n  | boolean\n  | JsonValue[]\n  | { [key: string]: JsonValue };\n\n/**\n * Replacer that converts non-JSON values (bigint, Date, etc.) to safe substitutes.\n */\nexport const queryKeyJsonReplacer = (_key: string, value: unknown) => {\n  if (value === undefined || typeof value === 'function' || typeof value === 'symbol') {\n    return undefined;\n  }\n  if (typeof value === 'bigint') {\n    return value.toString();\n  }\n  if (value instanceof Date) {\n    return value.toISOString();\n  }\n  return value;\n};\n\n/**\n * Safely stringifies a value and parses it back into a JsonValue.\n */\nexport const stringifyToJsonValue = (input: unknown): JsonValue | undefined => {\n  try {\n    const json = JSON.stringify(input, queryKeyJsonReplacer);\n    if (json === undefined) {\n      return undefined;\n    }\n    return JSON.parse(json) as JsonValue;\n  } catch {\n    return undefined;\n  }\n};\n\n/**\n * Detects plain objects (including objects with a null prototype).\n */\nconst isPlainObject = (value: unknown): value is Record<string, unknown> => {\n  if (value === null || typeof value !== 'object') {\n    return false;\n  }\n  const prototype = Object.getPrototypeOf(value as object);\n  return prototype === Object.prototype || prototype === null;\n};\n\n/**\n * Turns URLSearchParams into a sorted JSON object for deterministic keys.\n */\nconst serializeSearchParams = (params: URLSearchParams): JsonValue => {\n  const entries = Array.from(params.entries()).sort(([a], [b]) => a.localeCompare(b));\n  const result: Record<string, JsonValue> = {};\n\n  for (const [key, value] of entries) {\n    const existing = result[key];\n    if (existing === undefined) {\n      result[key] = value;\n      continue;\n    }\n\n    if (Array.isArray(existing)) {\n      (existing as string[]).push(value);\n    } else {\n      result[key] = [existing, value];\n    }\n  }\n\n  return result;\n};\n\n/**\n * Normalizes any accepted value into a JSON-friendly shape for query keys.\n */\nexport const serializeQueryKeyValue = (value: unknown): JsonValue | undefined => {\n  if (value === null) {\n    return null;\n  }\n\n  if (typeof value === 'string' || typeof value === 'number' || typeof value === 'boolean') {\n    return value;\n  }\n\n  if (value === undefined || typeof value === 'function' || typeof value === 'symbol') {\n    return undefined;\n  }\n\n  if (typeof value === 'bigint') {\n    return value.toString();\n  }\n\n  if (value instanceof Date) {\n    return value.toISOString();\n  }\n\n  if (Array.isArray(value)) {\n    return stringifyToJsonValue(value);\n  }\n\n  if (typeof URLSearchParams !== 'undefined' && value instanceof URLSearchParams) {\n    return serializeSearchParams(value);\n  }\n\n  if (isPlainObject(value)) {\n    return stringifyToJsonValue(value);\n  }\n\n  return undefined;\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-ofetch/tsconfig-node16-sdk/core/serverSentEvents.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { Config } from './types.gen.js';\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 const 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            // Normalize line endings: CRLF -> LF, then CR -> LF\n            buffer = buffer.replace(/\\r\\n/g, '\\n').replace(/\\r/g, '\\n');\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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-ofetch/tsconfig-node16-sdk/core/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { Auth, AuthToken } from './auth.gen.js';\nimport type { BodySerializer, QuerySerializer, QuerySerializerOptions } from './bodySerializer.gen.js';\n\nexport type HttpMethod =\n  | 'connect'\n  | 'delete'\n  | 'get'\n  | 'head'\n  | 'options'\n  | 'patch'\n  | 'post'\n  | 'put'\n  | 'trace';\n\nexport type Client<\n  RequestFn = never,\n  Config = unknown,\n  MethodFn = never,\n  BuildUrlFn = never,\n  SseFn = never,\n> = {\n  /**\n   * Returns the final request URL.\n   */\n  buildUrl: BuildUrlFn;\n  getConfig: () => Config;\n  request: RequestFn;\n  setConfig: (config: Config) => Config;\n} & {\n  [K in HttpMethod]: MethodFn;\n} & ([SseFn] extends [never] ? { sse?: never } : { sse: { [K in HttpMethod]: SseFn } });\n\nexport interface Config {\n  /**\n   * Auth token or a function returning auth token. The resolved value will be\n   * added to the request payload as defined by its `security` array.\n   */\n  auth?: ((auth: Auth) => Promise<AuthToken> | AuthToken) | AuthToken;\n  /**\n   * A function for serializing request body parameter. By default,\n   * {@link JSON.stringify()} will be used.\n   */\n  bodySerializer?: BodySerializer | null;\n  /**\n   * An object containing any HTTP headers that you want to pre-populate your\n   * `Headers` object with.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/Headers/Headers#init See more}\n   */\n  headers?:\n    | RequestInit['headers']\n    | Record<\n        string,\n        string | number | boolean | (string | number | boolean)[] | null | undefined | unknown\n      >;\n  /**\n   * The request method.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/fetch#method See more}\n   */\n  method?: Uppercase<HttpMethod>;\n  /**\n   * A function for serializing request query parameters. By default, arrays\n   * will be exploded in form style, objects will be exploded in deepObject\n   * style, and reserved characters are percent-encoded.\n   *\n   * This method will have no effect if the native `paramsSerializer()` Axios\n   * API function is used.\n   *\n   * {@link https://swagger.io/docs/specification/serialization/#query View examples}\n   */\n  querySerializer?: QuerySerializer | QuerySerializerOptions;\n  /**\n   * A function validating request data. This is useful if you want to ensure\n   * the request conforms to the desired shape, so it can be safely sent to\n   * the server.\n   */\n  requestValidator?: (data: unknown) => Promise<unknown>;\n  /**\n   * A function transforming response data before it's returned. This is useful\n   * for post-processing data, e.g. converting ISO strings into Date objects.\n   */\n  responseTransformer?: (data: unknown) => Promise<unknown>;\n  /**\n   * A function validating response data. This is useful if you want to ensure\n   * the response conforms to the desired shape, so it can be safely passed to\n   * the transformers and returned to the user.\n   */\n  responseValidator?: (data: unknown) => Promise<unknown>;\n}\n\ntype IsExactlyNeverOrNeverUndefined<T> = [T] extends [never]\n  ? true\n  : [T] extends [never | undefined]\n    ? [undefined] extends [T]\n      ? false\n      : true\n    : false;\n\nexport type OmitNever<T extends Record<string, unknown>> = {\n  [K in keyof T as IsExactlyNeverOrNeverUndefined<T[K]> extends true ? never : K]: T[K];\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-ofetch/tsconfig-node16-sdk/core/utils.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { BodySerializer, QuerySerializer } from './bodySerializer.gen.js';\nimport {\n  type ArraySeparatorStyle,\n  serializeArrayParam,\n  serializeObjectParam,\n  serializePrimitiveParam,\n} from './pathSerializer.gen.js';\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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-ofetch/tsconfig-node16-sdk/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport { apiVVersionODataControllerCount, callToTestOrderOfParams, callWithDefaultOptionalParameters, callWithDefaultParameters, callWithDescriptions, callWithDuplicateResponses, callWithNoContentResponse, callWithParameters, callWithResponse, callWithResponseAndNoContentResponse, callWithResponses, callWithResultFromHeader, callWithWeirdParameterNames, collectionFormat, complexParams, complexTypes, deleteCallWithoutParametersAndResponse, deleteFoo, deprecatedCall, dummyA, dummyB, duplicateName, duplicateName2, duplicateName3, duplicateName4, export_, fileResponse, fooWow, getApiVbyApiVersionSimpleOperation, getCallWithOptionalParam, getCallWithoutParametersAndResponse, headCallWithoutParametersAndResponse, import_, multipartRequest, multipartResponse, nonAsciiæøåÆøÅöôêÊ字符串, type Options, optionsCallWithoutParametersAndResponse, patchApiVbyApiVersionNoTag, patchCallWithoutParametersAndResponse, postApiVbyApiVersionFormData, postApiVbyApiVersionRequestBody, postCallWithOptionalParam, postCallWithoutParametersAndResponse, putCallWithoutParametersAndResponse, putWithFormUrlEncoded, testErrorCode, types, uploadFile } from './sdk.gen.js';\nexport type { _3eNum1Период, _400, AdditionalPropertiesIntegerIssue, AdditionalPropertiesUnknownIssue, AdditionalPropertiesUnknownIssue2, AdditionalPropertiesUnknownIssue3, AdditionalPropertiesUnknownIssueWritable, AnyOfAnyAndNull, AnyOfArrays, ApiVVersionODataControllerCountData, ApiVVersionODataControllerCountResponse, ApiVVersionODataControllerCountResponses, ArrayWithAnyOfProperties, ArrayWithArray, ArrayWithBooleans, ArrayWithNumbers, ArrayWithProperties, ArrayWithReferences, ArrayWithStrings, CallToTestOrderOfParamsData, CallWithDefaultOptionalParametersData, CallWithDefaultParametersData, CallWithDescriptionsData, CallWithDuplicateResponsesData, CallWithDuplicateResponsesError, CallWithDuplicateResponsesErrors, CallWithDuplicateResponsesResponse, CallWithDuplicateResponsesResponses, CallWithNoContentResponseData, CallWithNoContentResponseResponse, CallWithNoContentResponseResponses, CallWithParametersData, CallWithResponseAndNoContentResponseData, CallWithResponseAndNoContentResponseResponse, CallWithResponseAndNoContentResponseResponses, CallWithResponseData, CallWithResponseResponse, CallWithResponseResponses, CallWithResponsesData, CallWithResponsesError, CallWithResponsesErrors, CallWithResponsesResponse, CallWithResponsesResponses, CallWithResultFromHeaderData, CallWithResultFromHeaderErrors, CallWithResultFromHeaderResponses, CallWithWeirdParameterNamesData, CamelCaseCommentWithBreaks, CharactersInDescription, ClientOptions, CollectionFormatData, CommentWithBackticks, CommentWithBackticksAndQuotes, CommentWithBreaks, CommentWithExpressionPlaceholders, CommentWithQuotes, CommentWithReservedCharacters, CommentWithSlashes, ComplexParamsData, ComplexParamsResponse, ComplexParamsResponses, ComplexTypesData, ComplexTypesErrors, ComplexTypesResponse, ComplexTypesResponses, CompositionBaseModel, CompositionExtendedModel, CompositionWithAllOfAndNullable, CompositionWithAnyOf, CompositionWithAnyOfAndNullable, CompositionWithAnyOfAnonymous, CompositionWithNestedAnyAndTypeNull, CompositionWithNestedAnyOfAndNull, CompositionWithOneOf, CompositionWithOneOfAndComplexArrayDictionary, CompositionWithOneOfAndNullable, CompositionWithOneOfAndProperties, CompositionWithOneOfAndSimpleArrayDictionary, CompositionWithOneOfAndSimpleDictionary, CompositionWithOneOfAnonymous, CompositionWithOneOfDiscriminator, ConstValue, Default, DeleteCallWithoutParametersAndResponseData, DeleteFooData, DeleteFooData2, DeleteFooData3, DeprecatedCallData, DeprecatedModel, DictionaryWithArray, DictionaryWithDictionary, DictionaryWithProperties, DictionaryWithPropertiesAndAdditionalProperties, DictionaryWithReference, DictionaryWithString, DummyAData, DummyAResponse, DummyAResponses, DummyBData, DummyBResponse, DummyBResponses, DuplicateName2Data, DuplicateName3Data, DuplicateName4Data, DuplicateNameData, EnumFromDescription, EnumWithExtensions, EnumWithNumbers, EnumWithReplacedCharacters, EnumWithStrings, EnumWithXEnumNames, ExportData, ExternalRefA, ExternalRefB, ExternalSharedModel, File, FileResponseData, FileResponseResponse, FileResponseResponses, FileWritable, FooWowData, FooWowResponses, FreeFormObjectWithAdditionalPropertiesEqEmptyObject, FreeFormObjectWithAdditionalPropertiesEqTrue, FreeFormObjectWithoutAdditionalProperties, GenericSchemaDuplicateIssue1SystemBoolean, GenericSchemaDuplicateIssue1SystemBooleanWritable, GenericSchemaDuplicateIssue1SystemString, GenericSchemaDuplicateIssue1SystemStringWritable, GetApiVbyApiVersionSimpleOperationData, GetApiVbyApiVersionSimpleOperationError, GetApiVbyApiVersionSimpleOperationErrors, GetApiVbyApiVersionSimpleOperationResponse, GetApiVbyApiVersionSimpleOperationResponses, GetCallWithOptionalParamData, GetCallWithoutParametersAndResponseData, HeadCallWithoutParametersAndResponseData, Import, ImportData, ImportResponse, ImportResponses, IoK8sApimachineryPkgApisMetaV1DeleteOptions, IoK8sApimachineryPkgApisMetaV1Preconditions, ModelCircle, ModelFromZendesk, ModelSquare, ModelThatExtends, ModelThatExtendsExtends, ModelWithAdditionalPropertiesEqTrue, ModelWithAdditionalPropertiesRef, ModelWithAnyOfConstantSizeArray, ModelWithAnyOfConstantSizeArrayAndIntersect, ModelWithAnyOfConstantSizeArrayNullable, ModelWithAnyOfConstantSizeArrayWithNSizeAndOptions, ModelWithAnyOfConstantSizeArrayWithNSizeAndOptionsWritable, ModelWithArray, ModelWithArrayReadOnlyAndWriteOnly, ModelWithArrayReadOnlyAndWriteOnlyWritable, ModelWithBackticksInDescription, ModelWithBoolean, ModelWithCircularReference, ModelWithConst, ModelWithConstantSizeArray, ModelWithDictionary, ModelWithDuplicateImports, ModelWithDuplicateProperties, ModelWithEnum, ModelWithEnumFromDescription, ModelWithEnumWithHyphen, ModelWithInteger, ModelWithNestedArrayEnums, ModelWithNestedArrayEnumsData, ModelWithNestedArrayEnumsDataBar, ModelWithNestedArrayEnumsDataFoo, ModelWithNestedCompositionEnums, ModelWithNestedEnums, ModelWithNestedProperties, ModelWithNullableObject, ModelWithNullableString, ModelWithNumericEnumUnion, ModelWithOneOfAndProperties, ModelWithOneOfEnum, ModelWithOrderedProperties, ModelWithPattern, ModelWithPatternWritable, ModelWithPrefixItemsConstantSizeArray, ModelWithProperties, ModelWithPropertiesWritable, ModelWithReadOnlyAndWriteOnly, ModelWithReadOnlyAndWriteOnlyWritable, ModelWithReference, ModelWithReferenceWritable, ModelWithString, ModelWithStringError, MultipartRequestData, MultipartResponseData, MultipartResponseResponse, MultipartResponseResponses, NestedAnyOfArraysNullable, NonAsciiæøåÆøÅöôêÊ字符串Data, NonAsciiæøåÆøÅöôêÊ字符串Response, NonAsciiæøåÆøÅöôêÊ字符串Responses, NonAsciiStringæøåÆøÅöôêÊ字符串, NullableObject, OneOfAllOfIssue, OneOfAllOfIssueWritable, OptionsCallWithoutParametersAndResponseData, Pageable, ParameterSimpleParameterUnused, PatchApiVbyApiVersionNoTagData, PatchApiVbyApiVersionNoTagResponses, PatchCallWithoutParametersAndResponseData, PostApiVbyApiVersionFormDataData, PostApiVbyApiVersionRequestBodyData, PostCallWithOptionalParamData, PostCallWithOptionalParamResponse, PostCallWithOptionalParamResponses, PostCallWithoutParametersAndResponseData, PostServiceWithEmptyTagResponse, PostServiceWithEmptyTagResponse2, PutCallWithoutParametersAndResponseData, PutWithFormUrlEncodedData, SchemaWithFormRestrictedKeys, SimpleBoolean, SimpleFile, SimpleFormData, SimpleInteger, SimpleParameter, SimpleReference, SimpleRequestBody, SimpleString, SimpleStringWithPattern, TestErrorCodeData, TestErrorCodeErrors, TestErrorCodeResponses, TypesData, TypesResponse, TypesResponses, UploadFileData, UploadFileResponse, UploadFileResponses, XFooBar } from './types.gen.js';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-ofetch/tsconfig-node16-sdk/sdk.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport { client } from './client.gen.js';\nimport { type Client, formDataBodySerializer, type Options as Options2, type TDataShape, urlSearchParamsBodySerializer } from './client/index.js';\nimport type { ApiVVersionODataControllerCountData, ApiVVersionODataControllerCountResponses, CallToTestOrderOfParamsData, CallWithDefaultOptionalParametersData, CallWithDefaultParametersData, CallWithDescriptionsData, CallWithDuplicateResponsesData, CallWithDuplicateResponsesErrors, CallWithDuplicateResponsesResponses, CallWithNoContentResponseData, CallWithNoContentResponseResponses, CallWithParametersData, CallWithResponseAndNoContentResponseData, CallWithResponseAndNoContentResponseResponses, CallWithResponseData, CallWithResponseResponses, CallWithResponsesData, CallWithResponsesErrors, CallWithResponsesResponses, CallWithResultFromHeaderData, CallWithResultFromHeaderErrors, CallWithResultFromHeaderResponses, CallWithWeirdParameterNamesData, CollectionFormatData, ComplexParamsData, ComplexParamsResponses, ComplexTypesData, ComplexTypesErrors, ComplexTypesResponses, DeleteCallWithoutParametersAndResponseData, DeleteFooData3, DeprecatedCallData, DummyAData, DummyAResponses, DummyBData, DummyBResponses, DuplicateName2Data, DuplicateName3Data, DuplicateName4Data, DuplicateNameData, ExportData, FileResponseData, FileResponseResponses, FooWowData, FooWowResponses, GetApiVbyApiVersionSimpleOperationData, GetApiVbyApiVersionSimpleOperationErrors, GetApiVbyApiVersionSimpleOperationResponses, GetCallWithOptionalParamData, GetCallWithoutParametersAndResponseData, HeadCallWithoutParametersAndResponseData, ImportData, ImportResponses, MultipartRequestData, MultipartResponseData, MultipartResponseResponses, NonAsciiæøåÆøÅöôêÊ字符串Data, NonAsciiæøåÆøÅöôêÊ字符串Responses, OptionsCallWithoutParametersAndResponseData, PatchApiVbyApiVersionNoTagData, PatchApiVbyApiVersionNoTagResponses, PatchCallWithoutParametersAndResponseData, PostApiVbyApiVersionFormDataData, PostApiVbyApiVersionRequestBodyData, PostCallWithOptionalParamData, PostCallWithOptionalParamResponses, PostCallWithoutParametersAndResponseData, PutCallWithoutParametersAndResponseData, PutWithFormUrlEncodedData, TestErrorCodeData, TestErrorCodeErrors, TestErrorCodeResponses, TypesData, TypesResponses, UploadFileData, UploadFileResponses } from './types.gen.js';\n\nexport type Options<TData extends TDataShape = TDataShape, ThrowOnError extends boolean = boolean> = Options2<TData, ThrowOnError> & {\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\nexport const export_ = <ThrowOnError extends boolean = false>(options?: Options<ExportData, ThrowOnError>) => (options?.client ?? client).get<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/no+tag', ...options });\n\nexport const patchApiVbyApiVersionNoTag = <ThrowOnError extends boolean = false>(options?: Options<PatchApiVbyApiVersionNoTagData, ThrowOnError>) => (options?.client ?? client).patch<PatchApiVbyApiVersionNoTagResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/no+tag', ...options });\n\nexport const import_ = <ThrowOnError extends boolean = false>(options: Options<ImportData, ThrowOnError>) => (options.client ?? client).post<ImportResponses, unknown, ThrowOnError>({\n    url: '/api/v{api-version}/no+tag',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options.headers\n    }\n});\n\nexport const fooWow = <ThrowOnError extends boolean = false>(options?: Options<FooWowData, ThrowOnError>) => (options?.client ?? client).put<FooWowResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/no+tag', ...options });\n\nexport const apiVVersionODataControllerCount = <ThrowOnError extends boolean = false>(options?: Options<ApiVVersionODataControllerCountData, ThrowOnError>) => (options?.client ?? client).get<ApiVVersionODataControllerCountResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple/$count', ...options });\n\nexport const getApiVbyApiVersionSimpleOperation = <ThrowOnError extends boolean = false>(options: Options<GetApiVbyApiVersionSimpleOperationData, ThrowOnError>) => (options.client ?? client).get<GetApiVbyApiVersionSimpleOperationResponses, GetApiVbyApiVersionSimpleOperationErrors, ThrowOnError>({ url: '/api/v{api-version}/simple:operation', ...options });\n\nexport const deleteCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<DeleteCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).delete<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const getCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<GetCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).get<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const headCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<HeadCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).head<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const optionsCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<OptionsCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).options<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const patchCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<PatchCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).patch<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const postCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<PostCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).post<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const putCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<PutCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).put<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const deleteFoo = <ThrowOnError extends boolean = false>(options: Options<DeleteFooData3, ThrowOnError>) => (options.client ?? client).delete<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/foo/{foo_param}/bar/{BarParam}', ...options });\n\nexport const callWithDescriptions = <ThrowOnError extends boolean = false>(options?: Options<CallWithDescriptionsData, ThrowOnError>) => (options?.client ?? client).post<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/descriptions', ...options });\n\n/**\n * @deprecated\n */\nexport const deprecatedCall = <ThrowOnError extends boolean = false>(options: Options<DeprecatedCallData, ThrowOnError>) => (options.client ?? client).post<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/parameters/deprecated', ...options });\n\nexport const callWithParameters = <ThrowOnError extends boolean = false>(options: Options<CallWithParametersData, ThrowOnError>) => (options.client ?? client).post<unknown, unknown, ThrowOnError>({\n    url: '/api/v{api-version}/parameters/{parameterPath}',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options.headers\n    }\n});\n\nexport const callWithWeirdParameterNames = <ThrowOnError extends boolean = false>(options: Options<CallWithWeirdParameterNamesData, ThrowOnError>) => (options.client ?? client).post<unknown, unknown, ThrowOnError>({\n    url: '/api/v{api-version}/parameters/{parameter.path.1}/{parameter-path-2}/{PARAMETER-PATH-3}',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options.headers\n    }\n});\n\nexport const getCallWithOptionalParam = <ThrowOnError extends boolean = false>(options: Options<GetCallWithOptionalParamData, ThrowOnError>) => (options.client ?? client).get<unknown, unknown, ThrowOnError>({\n    url: '/api/v{api-version}/parameters',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options.headers\n    }\n});\n\nexport const postCallWithOptionalParam = <ThrowOnError extends boolean = false>(options: Options<PostCallWithOptionalParamData, ThrowOnError>) => (options.client ?? client).post<PostCallWithOptionalParamResponses, unknown, ThrowOnError>({\n    url: '/api/v{api-version}/parameters',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options.headers\n    }\n});\n\nexport const postApiVbyApiVersionRequestBody = <ThrowOnError extends boolean = false>(options?: Options<PostApiVbyApiVersionRequestBodyData, ThrowOnError>) => (options?.client ?? client).post<unknown, unknown, ThrowOnError>({\n    url: '/api/v{api-version}/requestBody',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options?.headers\n    }\n});\n\nexport const postApiVbyApiVersionFormData = <ThrowOnError extends boolean = false>(options?: Options<PostApiVbyApiVersionFormDataData, ThrowOnError>) => (options?.client ?? client).post<unknown, unknown, ThrowOnError>({\n    ...formDataBodySerializer,\n    url: '/api/v{api-version}/formData',\n    ...options,\n    headers: {\n        'Content-Type': null,\n        ...options?.headers\n    }\n});\n\nexport const callWithDefaultParameters = <ThrowOnError extends boolean = false>(options?: Options<CallWithDefaultParametersData, ThrowOnError>) => (options?.client ?? client).get<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/defaults', ...options });\n\nexport const callWithDefaultOptionalParameters = <ThrowOnError extends boolean = false>(options?: Options<CallWithDefaultOptionalParametersData, ThrowOnError>) => (options?.client ?? client).post<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/defaults', ...options });\n\nexport const callToTestOrderOfParams = <ThrowOnError extends boolean = false>(options: Options<CallToTestOrderOfParamsData, ThrowOnError>) => (options.client ?? client).put<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/defaults', ...options });\n\nexport const duplicateName = <ThrowOnError extends boolean = false>(options?: Options<DuplicateNameData, ThrowOnError>) => (options?.client ?? client).delete<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/duplicate', ...options });\n\nexport const duplicateName2 = <ThrowOnError extends boolean = false>(options?: Options<DuplicateName2Data, ThrowOnError>) => (options?.client ?? client).get<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/duplicate', ...options });\n\nexport const duplicateName3 = <ThrowOnError extends boolean = false>(options?: Options<DuplicateName3Data, ThrowOnError>) => (options?.client ?? client).post<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/duplicate', ...options });\n\nexport const duplicateName4 = <ThrowOnError extends boolean = false>(options?: Options<DuplicateName4Data, ThrowOnError>) => (options?.client ?? client).put<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/duplicate', ...options });\n\nexport const callWithNoContentResponse = <ThrowOnError extends boolean = false>(options?: Options<CallWithNoContentResponseData, ThrowOnError>) => (options?.client ?? client).get<CallWithNoContentResponseResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/no-content', ...options });\n\nexport const callWithResponseAndNoContentResponse = <ThrowOnError extends boolean = false>(options?: Options<CallWithResponseAndNoContentResponseData, ThrowOnError>) => (options?.client ?? client).get<CallWithResponseAndNoContentResponseResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/multiple-tags/response-and-no-content', ...options });\n\nexport const dummyA = <ThrowOnError extends boolean = false>(options?: Options<DummyAData, ThrowOnError>) => (options?.client ?? client).get<DummyAResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/multiple-tags/a', ...options });\n\nexport const dummyB = <ThrowOnError extends boolean = false>(options?: Options<DummyBData, ThrowOnError>) => (options?.client ?? client).get<DummyBResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/multiple-tags/b', ...options });\n\nexport const callWithResponse = <ThrowOnError extends boolean = false>(options?: Options<CallWithResponseData, ThrowOnError>) => (options?.client ?? client).get<CallWithResponseResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/response', ...options });\n\nexport const callWithDuplicateResponses = <ThrowOnError extends boolean = false>(options?: Options<CallWithDuplicateResponsesData, ThrowOnError>) => (options?.client ?? client).post<CallWithDuplicateResponsesResponses, CallWithDuplicateResponsesErrors, ThrowOnError>({ url: '/api/v{api-version}/response', ...options });\n\nexport const callWithResponses = <ThrowOnError extends boolean = false>(options?: Options<CallWithResponsesData, ThrowOnError>) => (options?.client ?? client).put<CallWithResponsesResponses, CallWithResponsesErrors, ThrowOnError>({ url: '/api/v{api-version}/response', ...options });\n\nexport const collectionFormat = <ThrowOnError extends boolean = false>(options: Options<CollectionFormatData, ThrowOnError>) => (options.client ?? client).get<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/collectionFormat', ...options });\n\nexport const types = <ThrowOnError extends boolean = false>(options: Options<TypesData, ThrowOnError>) => (options.client ?? client).get<TypesResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/types', ...options });\n\nexport const uploadFile = <ThrowOnError extends boolean = false>(options: Options<UploadFileData, ThrowOnError>) => (options.client ?? client).post<UploadFileResponses, unknown, ThrowOnError>({\n    ...urlSearchParamsBodySerializer,\n    url: '/api/v{api-version}/upload',\n    ...options,\n    headers: {\n        'Content-Type': 'application/x-www-form-urlencoded',\n        ...options.headers\n    }\n});\n\nexport const fileResponse = <ThrowOnError extends boolean = false>(options: Options<FileResponseData, ThrowOnError>) => (options.client ?? client).get<FileResponseResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/file/{id}', ...options });\n\nexport const complexTypes = <ThrowOnError extends boolean = false>(options: Options<ComplexTypesData, ThrowOnError>) => (options.client ?? client).get<ComplexTypesResponses, ComplexTypesErrors, ThrowOnError>({\n    querySerializer: { parameters: { parameterObject: { object: { style: 'form' } } } },\n    url: '/api/v{api-version}/complex',\n    ...options\n});\n\nexport const multipartResponse = <ThrowOnError extends boolean = false>(options?: Options<MultipartResponseData, ThrowOnError>) => (options?.client ?? client).get<MultipartResponseResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/multipart', ...options });\n\nexport const multipartRequest = <ThrowOnError extends boolean = false>(options?: Options<MultipartRequestData, ThrowOnError>) => (options?.client ?? client).post<unknown, unknown, ThrowOnError>({\n    ...formDataBodySerializer,\n    url: '/api/v{api-version}/multipart',\n    ...options,\n    headers: {\n        'Content-Type': null,\n        ...options?.headers\n    }\n});\n\nexport const complexParams = <ThrowOnError extends boolean = false>(options: Options<ComplexParamsData, ThrowOnError>) => (options.client ?? client).put<ComplexParamsResponses, unknown, ThrowOnError>({\n    url: '/api/v{api-version}/complex/{id}',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json-patch+json',\n        ...options.headers\n    }\n});\n\nexport const callWithResultFromHeader = <ThrowOnError extends boolean = false>(options?: Options<CallWithResultFromHeaderData, ThrowOnError>) => (options?.client ?? client).post<CallWithResultFromHeaderResponses, CallWithResultFromHeaderErrors, ThrowOnError>({ url: '/api/v{api-version}/header', ...options });\n\nexport const testErrorCode = <ThrowOnError extends boolean = false>(options: Options<TestErrorCodeData, ThrowOnError>) => (options.client ?? client).post<TestErrorCodeResponses, TestErrorCodeErrors, ThrowOnError>({ url: '/api/v{api-version}/error', ...options });\n\nexport const nonAsciiæøåÆøÅöôêÊ字符串 = <ThrowOnError extends boolean = false>(options: Options<NonAsciiæøåÆøÅöôêÊ字符串Data, ThrowOnError>) => (options.client ?? client).post<NonAsciiæøåÆøÅöôêÊ字符串Responses, unknown, ThrowOnError>({ url: '/api/v{api-version}/non-ascii-æøåÆØÅöôêÊ字符串', ...options });\n\n/**\n * Login User\n */\nexport const putWithFormUrlEncoded = <ThrowOnError extends boolean = false>(options: Options<PutWithFormUrlEncodedData, ThrowOnError>) => (options.client ?? client).put<unknown, unknown, ThrowOnError>({\n    ...urlSearchParamsBodySerializer,\n    url: '/api/v{api-version}/non-ascii-æøåÆØÅöôêÊ字符串',\n    ...options,\n    headers: {\n        'Content-Type': 'application/x-www-form-urlencoded',\n        ...options.headers\n    }\n});\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-ofetch/tsconfig-node16-sdk/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type ClientOptions = {\n    baseUrl: 'http://localhost:3000/base' | (string & {});\n};\n\n/**\n * Model with number-only name\n */\nexport type _400 = string;\n\n/**\n * External ref to shared model (A)\n */\nexport type ExternalRefA = ExternalSharedModel;\n\n/**\n * External ref to shared model (B)\n */\nexport type ExternalRefB = ExternalSharedModel;\n\n/**\n * Testing multiline comments in string: First line\n * Second line\n *\n * Fourth line\n */\nexport type CamelCaseCommentWithBreaks = number;\n\n/**\n * Testing multiline comments in string: First line\n * Second line\n *\n * Fourth line\n */\nexport type CommentWithBreaks = number;\n\n/**\n * Testing backticks in string: `backticks` and ```multiple backticks``` should work\n */\nexport type CommentWithBackticks = number;\n\n/**\n * Testing backticks and quotes in string: `backticks`, 'quotes', \"double quotes\" and ```multiple backticks``` should work\n */\nexport type CommentWithBackticksAndQuotes = number;\n\n/**\n * Testing slashes in string: \\backwards\\\\\\ and /forwards/// should work\n */\nexport type CommentWithSlashes = number;\n\n/**\n * Testing expression placeholders in string: ${expression} should work\n */\nexport type CommentWithExpressionPlaceholders = number;\n\n/**\n * Testing quotes in string: 'single quote''' and \"double quotes\"\"\" should work\n */\nexport type CommentWithQuotes = number;\n\n/**\n * Testing reserved characters in string: * inline * and ** inline ** should work\n */\nexport type CommentWithReservedCharacters = number;\n\n/**\n * This is a simple number\n */\nexport type SimpleInteger = number;\n\n/**\n * This is a simple boolean\n */\nexport type SimpleBoolean = boolean;\n\n/**\n * This is a simple string\n */\nexport type SimpleString = string;\n\n/**\n * A string with non-ascii (unicode) characters valid in typescript identifiers (æøåÆØÅöÔèÈ字符串)\n */\nexport type NonAsciiStringæøåÆøÅöôêÊ字符串 = string;\n\n/**\n * This is a simple file\n */\nexport type SimpleFile = Blob | File;\n\n/**\n * This is a simple reference\n */\nexport type SimpleReference = ModelWithString;\n\n/**\n * This is a simple string\n */\nexport type SimpleStringWithPattern = string | null;\n\n/**\n * This is a simple enum with strings\n */\nexport type EnumWithStrings = 'Success' | 'Warning' | 'Error' | '\\'Single Quote\\'' | '\"Double Quotes\"' | 'Non-ascii: øæåôöØÆÅÔÖ字符串';\n\nexport type EnumWithReplacedCharacters = '\\'Single Quote\\'' | '\"Double Quotes\"' | 'øæåôöØÆÅÔÖ字符串' | 3.1 | '';\n\n/**\n * This is a simple enum with numbers\n */\nexport type EnumWithNumbers = 1 | 2 | 3 | 1.1 | 1.2 | 1.3 | 100 | 200 | 300 | -100 | -200 | -300 | -1.1 | -1.2 | -1.3;\n\n/**\n * Success=1,Warning=2,Error=3\n */\nexport type EnumFromDescription = number;\n\n/**\n * This is a simple enum with numbers\n */\nexport type EnumWithExtensions = 200 | 400 | 500;\n\nexport type EnumWithXEnumNames = 0 | 1 | 2;\n\n/**\n * This is a simple array with numbers\n */\nexport type ArrayWithNumbers = Array<number>;\n\n/**\n * This is a simple array with booleans\n */\nexport type ArrayWithBooleans = Array<boolean>;\n\n/**\n * This is a simple array with strings\n */\nexport type ArrayWithStrings = Array<string>;\n\n/**\n * This is a simple array with references\n */\nexport type ArrayWithReferences = Array<ModelWithString>;\n\n/**\n * This is a simple array containing an array\n */\nexport type ArrayWithArray = Array<Array<ModelWithString>>;\n\n/**\n * This is a simple array with properties\n */\nexport type ArrayWithProperties = Array<{\n    '16x16'?: CamelCaseCommentWithBreaks;\n    bar?: string;\n}>;\n\n/**\n * This is a simple array with any of properties\n */\nexport type ArrayWithAnyOfProperties = Array<{\n    foo?: string;\n} | {\n    bar?: string;\n}>;\n\nexport type AnyOfAnyAndNull = {\n    data?: unknown | null;\n};\n\n/**\n * This is a simple array with any of properties\n */\nexport type AnyOfArrays = {\n    results?: Array<{\n        foo?: string;\n    } | {\n        bar?: string;\n    }>;\n};\n\n/**\n * This is a string dictionary\n */\nexport type DictionaryWithString = {\n    [key: string]: string;\n};\n\nexport type DictionaryWithPropertiesAndAdditionalProperties = {\n    foo?: number;\n    bar?: boolean;\n    [key: string]: string | number | boolean | undefined;\n};\n\n/**\n * This is a string reference\n */\nexport type DictionaryWithReference = {\n    [key: string]: ModelWithString;\n};\n\n/**\n * This is a complex dictionary\n */\nexport type DictionaryWithArray = {\n    [key: string]: Array<ModelWithString>;\n};\n\n/**\n * This is a string dictionary\n */\nexport type DictionaryWithDictionary = {\n    [key: string]: {\n        [key: string]: string;\n    };\n};\n\n/**\n * This is a complex dictionary\n */\nexport type DictionaryWithProperties = {\n    [key: string]: {\n        foo?: string;\n        bar?: string;\n    };\n};\n\n/**\n * This is a model with one number property\n */\nexport type ModelWithInteger = {\n    /**\n     * This is a simple number property\n     */\n    prop?: number;\n};\n\n/**\n * This is a model with one boolean property\n */\nexport type ModelWithBoolean = {\n    /**\n     * This is a simple boolean property\n     */\n    prop?: boolean;\n};\n\n/**\n * This is a model with one string property\n */\nexport type ModelWithString = {\n    /**\n     * This is a simple string property\n     */\n    prop?: string;\n};\n\n/**\n * This is a model with one string property\n */\nexport type ModelWithStringError = {\n    /**\n     * This is a simple string property\n     */\n    prop?: string;\n};\n\n/**\n * `Comment` or `VoiceComment`. The JSON object for adding voice comments to tickets is different. See [Adding voice comments to tickets](/documentation/ticketing/managing-tickets/adding-voice-comments-to-tickets)\n */\nexport type ModelFromZendesk = string;\n\n/**\n * This is a model with one string property\n */\nexport type ModelWithNullableString = {\n    /**\n     * This is a simple string property\n     */\n    nullableProp1?: string | null;\n    /**\n     * This is a simple string property\n     */\n    nullableRequiredProp1: string | null;\n    /**\n     * This is a simple string property\n     */\n    nullableProp2?: string | null;\n    /**\n     * This is a simple string property\n     */\n    nullableRequiredProp2: string | null;\n    /**\n     * This is a simple enum with strings\n     */\n    'foo_bar-enum'?: 'Success' | 'Warning' | 'Error' | 'ØÆÅ字符串';\n};\n\n/**\n * This is a model with one enum\n */\nexport type ModelWithEnum = {\n    /**\n     * This is a simple enum with strings\n     */\n    'foo_bar-enum'?: 'Success' | 'Warning' | 'Error' | 'ØÆÅ字符串';\n    /**\n     * These are the HTTP error code enums\n     */\n    statusCode?: '100' | '200 FOO' | '300 FOO_BAR' | '400 foo-bar' | '500 foo.bar' | '600 foo&bar';\n    /**\n     * Simple boolean enum\n     */\n    bool?: true;\n};\n\n/**\n * This is a model with one enum with escaped name\n */\nexport type ModelWithEnumWithHyphen = {\n    /**\n     * Foo-Bar-Baz-Qux\n     */\n    'foo-bar-baz-qux'?: '3.0';\n};\n\n/**\n * This is a model with one enum\n */\nexport type ModelWithEnumFromDescription = {\n    /**\n     * Success=1,Warning=2,Error=3\n     */\n    test?: number;\n};\n\n/**\n * This is a model with nested enums\n */\nexport type ModelWithNestedEnums = {\n    dictionaryWithEnum?: {\n        [key: string]: 'Success' | 'Warning' | 'Error';\n    };\n    dictionaryWithEnumFromDescription?: {\n        [key: string]: number;\n    };\n    arrayWithEnum?: Array<'Success' | 'Warning' | 'Error'>;\n    arrayWithDescription?: Array<number>;\n    /**\n     * This is a simple enum with strings\n     */\n    'foo_bar-enum'?: 'Success' | 'Warning' | 'Error' | 'ØÆÅ字符串';\n};\n\n/**\n * This is a model with one property containing a reference\n */\nexport type ModelWithReference = {\n    prop?: ModelWithProperties;\n};\n\n/**\n * This is a model with one property containing an array\n */\nexport type ModelWithArrayReadOnlyAndWriteOnly = {\n    prop?: Array<ModelWithReadOnlyAndWriteOnly>;\n    propWithFile?: Array<Blob | File>;\n    propWithNumber?: Array<number>;\n};\n\n/**\n * This is a model with one property containing an array\n */\nexport type ModelWithArray = {\n    prop?: Array<ModelWithString>;\n    propWithFile?: Array<Blob | File>;\n    propWithNumber?: Array<number>;\n};\n\n/**\n * This is a model with one property containing a dictionary\n */\nexport type ModelWithDictionary = {\n    prop?: {\n        [key: string]: string;\n    };\n};\n\n/**\n * This is a deprecated model with a deprecated property\n *\n * @deprecated\n */\nexport type DeprecatedModel = {\n    /**\n     * This is a deprecated property\n     *\n     * @deprecated\n     */\n    prop?: string;\n};\n\n/**\n * This is a model with one property containing a circular reference\n */\nexport type ModelWithCircularReference = {\n    prop?: ModelWithCircularReference;\n};\n\n/**\n * This is a model with one property with a 'one of' relationship\n */\nexport type CompositionWithOneOf = {\n    propA?: ModelWithString | ModelWithEnum | ModelWithArray | ModelWithDictionary;\n};\n\n/**\n * This is a model with one property with a 'one of' relationship where the options are not $ref\n */\nexport type CompositionWithOneOfAnonymous = {\n    propA?: {\n        propA?: string;\n    } | string | number;\n};\n\n/**\n * Circle\n */\nexport type ModelCircle = {\n    kind: string;\n    radius?: number;\n};\n\n/**\n * Square\n */\nexport type ModelSquare = {\n    kind: string;\n    sideLength?: number;\n};\n\n/**\n * This is a model with one property with a 'one of' relationship where the options are not $ref\n */\nexport type CompositionWithOneOfDiscriminator = ({\n    kind: 'circle';\n} & ModelCircle) | ({\n    kind: 'square';\n} & ModelSquare);\n\n/**\n * This is a model with one property with a 'any of' relationship\n */\nexport type CompositionWithAnyOf = {\n    propA?: ModelWithString | ModelWithEnum | ModelWithArray | ModelWithDictionary;\n};\n\n/**\n * This is a model with one property with a 'any of' relationship where the options are not $ref\n */\nexport type CompositionWithAnyOfAnonymous = {\n    propA?: {\n        propA?: string;\n    } | string | number;\n};\n\n/**\n * This is a model with nested 'any of' property with a type null\n */\nexport type CompositionWithNestedAnyAndTypeNull = {\n    propA?: Array<ModelWithDictionary | null> | Array<ModelWithArray | null>;\n};\n\nexport type _3eNum1Период = 'Bird' | 'Dog';\n\nexport type ConstValue = 'ConstValue';\n\n/**\n * This is a model with one property with a 'any of' relationship where the options are not $ref\n */\nexport type CompositionWithNestedAnyOfAndNull = {\n    /**\n     * Scopes\n     */\n    propA?: Array<_3eNum1Период | ConstValue> | null;\n};\n\n/**\n * This is a model with one property with a 'one of' relationship\n */\nexport type CompositionWithOneOfAndNullable = {\n    propA?: {\n        boolean?: boolean;\n    } | ModelWithEnum | ModelWithArray | ModelWithDictionary | null;\n};\n\n/**\n * This is a model that contains a simple dictionary within composition\n */\nexport type CompositionWithOneOfAndSimpleDictionary = {\n    propA?: boolean | {\n        [key: string]: number;\n    };\n};\n\n/**\n * This is a model that contains a dictionary of simple arrays within composition\n */\nexport type CompositionWithOneOfAndSimpleArrayDictionary = {\n    propA?: boolean | {\n        [key: string]: Array<boolean>;\n    };\n};\n\n/**\n * This is a model that contains a dictionary of complex arrays (composited) within composition\n */\nexport type CompositionWithOneOfAndComplexArrayDictionary = {\n    propA?: boolean | {\n        [key: string]: Array<number | string>;\n    };\n};\n\n/**\n * This is a model with one property with a 'all of' relationship\n */\nexport type CompositionWithAllOfAndNullable = {\n    propA?: ({\n        boolean?: boolean;\n    } & ModelWithEnum & ModelWithArray & ModelWithDictionary) | null;\n};\n\n/**\n * This is a model with one property with a 'any of' relationship\n */\nexport type CompositionWithAnyOfAndNullable = {\n    propA?: {\n        boolean?: boolean;\n    } | ModelWithEnum | ModelWithArray | ModelWithDictionary | null;\n};\n\n/**\n * This is a base model with two simple optional properties\n */\nexport type CompositionBaseModel = {\n    firstName?: string;\n    lastname?: string;\n};\n\n/**\n * This is a model that extends the base model\n */\nexport type CompositionExtendedModel = CompositionBaseModel & {\n    age: number;\n    firstName: string;\n    lastname: string;\n};\n\n/**\n * This is a model with one nested property\n */\nexport type ModelWithProperties = {\n    required: string;\n    readonly requiredAndReadOnly: string;\n    requiredAndNullable: string | null;\n    string?: string;\n    number?: number;\n    boolean?: boolean;\n    reference?: ModelWithString;\n    'property with space'?: string;\n    default?: string;\n    try?: string;\n    readonly '@namespace.string'?: string;\n    readonly '@namespace.integer'?: number;\n};\n\n/**\n * This is a model with one nested property\n */\nexport type ModelWithNestedProperties = {\n    readonly first: {\n        readonly second: {\n            readonly third: string | null;\n        } | null;\n    } | null;\n};\n\n/**\n * This is a model with duplicated properties\n */\nexport type ModelWithDuplicateProperties = {\n    prop?: ModelWithString;\n};\n\n/**\n * This is a model with ordered properties\n */\nexport type ModelWithOrderedProperties = {\n    zebra?: string;\n    apple?: string;\n    hawaii?: string;\n};\n\n/**\n * This is a model with duplicated imports\n */\nexport type ModelWithDuplicateImports = {\n    propA?: ModelWithString;\n    propB?: ModelWithString;\n    propC?: ModelWithString;\n};\n\n/**\n * This is a model that extends another model\n */\nexport type ModelThatExtends = ModelWithString & {\n    propExtendsA?: string;\n    propExtendsB?: ModelWithString;\n};\n\n/**\n * This is a model that extends another model\n */\nexport type ModelThatExtendsExtends = ModelWithString & ModelThatExtends & {\n    propExtendsC?: string;\n    propExtendsD?: ModelWithString;\n};\n\n/**\n * This is a model that contains a some patterns\n */\nexport type ModelWithPattern = {\n    key: string;\n    name: string;\n    readonly enabled?: boolean;\n    readonly modified?: string;\n    id?: string;\n    text?: string;\n    patternWithSingleQuotes?: string;\n    patternWithNewline?: string;\n    patternWithBacktick?: string;\n    patternWithUnicode?: string;\n};\n\nexport type File = {\n    /**\n     * Id\n     */\n    readonly id?: string;\n    /**\n     * Updated at\n     */\n    readonly updated_at?: string;\n    /**\n     * Created at\n     */\n    readonly created_at?: string;\n    /**\n     * Mime\n     */\n    mime: string;\n    /**\n     * File\n     */\n    readonly file?: string;\n};\n\nexport type Default = {\n    name?: string;\n};\n\nexport type Pageable = {\n    page?: number;\n    size?: number;\n    sort?: Array<string>;\n};\n\n/**\n * This is a free-form object without additionalProperties.\n */\nexport type FreeFormObjectWithoutAdditionalProperties = {\n    [key: string]: unknown;\n};\n\n/**\n * This is a free-form object with additionalProperties: true.\n */\nexport type FreeFormObjectWithAdditionalPropertiesEqTrue = {\n    [key: string]: unknown;\n};\n\n/**\n * This is a free-form object with additionalProperties: {}.\n */\nexport type FreeFormObjectWithAdditionalPropertiesEqEmptyObject = {\n    [key: string]: unknown;\n};\n\nexport type ModelWithConst = {\n    String?: 'String';\n    number?: 0;\n    null?: null;\n    withType?: 'Some string';\n};\n\n/**\n * This is a model with one property and additionalProperties: true\n */\nexport type ModelWithAdditionalPropertiesEqTrue = {\n    /**\n     * This is a simple string property\n     */\n    prop?: string;\n    [key: string]: unknown;\n};\n\nexport type NestedAnyOfArraysNullable = {\n    nullableArray?: Array<string | boolean> | null;\n};\n\nexport type CompositionWithOneOfAndProperties = ({\n    foo: SimpleParameter;\n} | {\n    bar: NonAsciiStringæøåÆøÅöôêÊ字符串;\n}) & {\n    baz: number | null;\n    qux: number;\n};\n\n/**\n * An object that can be null\n */\nexport type NullableObject = {\n    foo?: string;\n} | null;\n\n/**\n * Some % character\n */\nexport type CharactersInDescription = string;\n\nexport type ModelWithNullableObject = {\n    data?: NullableObject;\n};\n\n/**\n * An object with additional properties that can be null (anyOf ref + null)\n */\nexport type ModelWithAdditionalPropertiesRef = {\n    [key: string]: NullableObject | null;\n};\n\nexport type ModelWithOneOfEnum = {\n    foo: 'Bar';\n} | {\n    foo: 'Baz';\n} | {\n    foo: 'Qux';\n} | {\n    content: string;\n    foo: 'Quux';\n} | {\n    content: [\n        string,\n        string\n    ];\n    foo: 'Corge';\n};\n\nexport type ModelWithNestedArrayEnumsDataFoo = 'foo' | 'bar';\n\nexport type ModelWithNestedArrayEnumsDataBar = 'baz' | 'qux';\n\nexport type ModelWithNestedArrayEnumsData = {\n    foo?: Array<ModelWithNestedArrayEnumsDataFoo>;\n    bar?: Array<ModelWithNestedArrayEnumsDataBar>;\n};\n\nexport type ModelWithNestedArrayEnums = {\n    array_strings?: Array<string>;\n    data?: ModelWithNestedArrayEnumsData;\n};\n\nexport type ModelWithNestedCompositionEnums = {\n    foo?: ModelWithNestedArrayEnumsDataFoo;\n};\n\nexport type ModelWithReadOnlyAndWriteOnly = {\n    foo: string;\n    readonly bar: string;\n};\n\nexport type ModelWithConstantSizeArray = [\n    number,\n    number\n];\n\nexport type ModelWithAnyOfConstantSizeArray = [\n    number | string,\n    number | string,\n    number | string\n];\n\nexport type ModelWithPrefixItemsConstantSizeArray = [\n    ModelWithInteger,\n    number | string,\n    string\n];\n\nexport type ModelWithAnyOfConstantSizeArrayNullable = [\n    number | null | string,\n    number | null | string,\n    number | null | string\n];\n\nexport type ModelWithAnyOfConstantSizeArrayWithNSizeAndOptions = [\n    number | Import,\n    number | Import\n];\n\nexport type ModelWithAnyOfConstantSizeArrayAndIntersect = [\n    number & string,\n    number & string\n];\n\nexport type ModelWithNumericEnumUnion = {\n    /**\n     * Период\n     */\n    value?: -10 | -1 | 0 | 1 | 3 | 6 | 12;\n};\n\n/**\n * Some description with `back ticks`\n */\nexport type ModelWithBackticksInDescription = {\n    /**\n     * The template `that` should be used for parsing and importing the contents of the CSV file.\n     *\n     * <br/><p>There is one placeholder currently supported:<ul>     <li><b>${x}</b> - refers to the n-th column in the CSV file, e.g. ${1}, ${2}, ...)</li></ul><p>Example of a correct JSON template:</p>\n     * <pre>\n     * [\n     * {\n     * \"resourceType\": \"Asset\",\n     * \"identifier\": {\n     * \"name\": \"${1}\",\n     * \"domain\": {\n     * \"name\": \"${2}\",\n     * \"community\": {\n     * \"name\": \"Some Community\"\n     * }\n     * }\n     * },\n     * \"attributes\" : {\n     * \"00000000-0000-0000-0000-000000003115\" : [ {\n     * \"value\" : \"${3}\"\n     * } ],\n     * \"00000000-0000-0000-0000-000000000222\" : [ {\n     * \"value\" : \"${4}\"\n     * } ]\n     * }\n     * }\n     * ]\n     * </pre>\n     */\n    template?: string;\n};\n\nexport type ModelWithOneOfAndProperties = (SimpleParameter | NonAsciiStringæøåÆøÅöôêÊ字符串) & {\n    baz: number | null;\n    qux: number;\n};\n\n/**\n * Model used to test deduplication strategy (unused)\n */\nexport type ParameterSimpleParameterUnused = string;\n\n/**\n * Model used to test deduplication strategy\n */\nexport type PostServiceWithEmptyTagResponse = string;\n\n/**\n * Model used to test deduplication strategy\n */\nexport type PostServiceWithEmptyTagResponse2 = string;\n\n/**\n * Model used to test deduplication strategy\n */\nexport type DeleteFooData = string;\n\n/**\n * Model used to test deduplication strategy\n */\nexport type DeleteFooData2 = string;\n\n/**\n * Model with restricted keyword name\n */\nexport type Import = string;\n\nexport type SchemaWithFormRestrictedKeys = {\n    description?: string;\n    'x-enum-descriptions'?: string;\n    'x-enum-varnames'?: string;\n    'x-enumNames'?: string;\n    title?: string;\n    object?: {\n        description?: string;\n        'x-enum-descriptions'?: string;\n        'x-enum-varnames'?: string;\n        'x-enumNames'?: string;\n        title?: string;\n    };\n    array?: Array<{\n        description?: string;\n        'x-enum-descriptions'?: string;\n        'x-enum-varnames'?: string;\n        'x-enumNames'?: string;\n        title?: string;\n    }>;\n};\n\n/**\n * This schema was giving PascalCase transformations a hard time\n */\nexport type IoK8sApimachineryPkgApisMetaV1DeleteOptions = {\n    /**\n     * Must be fulfilled before a deletion is carried out. If not possible, a 409 Conflict status will be returned.\n     */\n    preconditions?: IoK8sApimachineryPkgApisMetaV1Preconditions;\n};\n\n/**\n * This schema was giving PascalCase transformations a hard time\n */\nexport type IoK8sApimachineryPkgApisMetaV1Preconditions = {\n    /**\n     * Specifies the target ResourceVersion\n     */\n    resourceVersion?: string;\n    /**\n     * Specifies the target UID.\n     */\n    uid?: string;\n};\n\nexport type AdditionalPropertiesUnknownIssue = {\n    [key: string]: string | number;\n};\n\nexport type AdditionalPropertiesUnknownIssue2 = {\n    [key: string]: string | number;\n};\n\nexport type AdditionalPropertiesUnknownIssue3 = string & {\n    entries: {\n        [key: string]: AdditionalPropertiesUnknownIssue;\n    };\n};\n\nexport type AdditionalPropertiesIntegerIssue = {\n    value: number;\n    [key: string]: number;\n};\n\nexport type OneOfAllOfIssue = ((ConstValue | GenericSchemaDuplicateIssue1SystemBoolean) & _3eNum1Период) | GenericSchemaDuplicateIssue1SystemString;\n\nexport type GenericSchemaDuplicateIssue1SystemBoolean = {\n    item?: boolean;\n    error?: string | null;\n    readonly hasError?: boolean;\n    data?: {\n        [key: string]: never;\n    };\n};\n\nexport type GenericSchemaDuplicateIssue1SystemString = {\n    item?: string | null;\n    error?: string | null;\n    readonly hasError?: boolean;\n};\n\nexport type ExternalSharedModel = {\n    id: string;\n    name?: string;\n};\n\n/**\n * This is a model with one property containing a reference\n */\nexport type ModelWithReferenceWritable = {\n    prop?: ModelWithPropertiesWritable;\n};\n\n/**\n * This is a model with one property containing an array\n */\nexport type ModelWithArrayReadOnlyAndWriteOnlyWritable = {\n    prop?: Array<ModelWithReadOnlyAndWriteOnlyWritable>;\n    propWithFile?: Array<Blob | File>;\n    propWithNumber?: Array<number>;\n};\n\n/**\n * This is a model with one nested property\n */\nexport type ModelWithPropertiesWritable = {\n    required: string;\n    requiredAndNullable: string | null;\n    string?: string;\n    number?: number;\n    boolean?: boolean;\n    reference?: ModelWithString;\n    'property with space'?: string;\n    default?: string;\n    try?: string;\n};\n\n/**\n * This is a model that contains a some patterns\n */\nexport type ModelWithPatternWritable = {\n    key: string;\n    name: string;\n    id?: string;\n    text?: string;\n    patternWithSingleQuotes?: string;\n    patternWithNewline?: string;\n    patternWithBacktick?: string;\n    patternWithUnicode?: string;\n};\n\nexport type FileWritable = {\n    /**\n     * Mime\n     */\n    mime: string;\n};\n\nexport type ModelWithReadOnlyAndWriteOnlyWritable = {\n    foo: string;\n    baz: string;\n};\n\nexport type ModelWithAnyOfConstantSizeArrayWithNSizeAndOptionsWritable = [\n    number | Import,\n    number | Import\n];\n\nexport type AdditionalPropertiesUnknownIssueWritable = {\n    [key: string]: string | number;\n};\n\nexport type OneOfAllOfIssueWritable = ((ConstValue | GenericSchemaDuplicateIssue1SystemBoolean) & _3eNum1Период) | GenericSchemaDuplicateIssue1SystemString;\n\nexport type GenericSchemaDuplicateIssue1SystemBooleanWritable = {\n    item?: boolean;\n    error?: string | null;\n    data?: {\n        [key: string]: never;\n    };\n};\n\nexport type GenericSchemaDuplicateIssue1SystemStringWritable = {\n    item?: string | null;\n    error?: string | null;\n};\n\n/**\n * This is a reusable parameter\n */\nexport type SimpleParameter = string;\n\n/**\n * Parameter with illegal characters\n */\nexport type XFooBar = ModelWithString;\n\n/**\n * A reusable request body\n */\nexport type SimpleRequestBody = ModelWithString;\n\n/**\n * A reusable request body\n */\nexport type SimpleFormData = ModelWithString;\n\nexport type ExportData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no+tag';\n};\n\nexport type PatchApiVbyApiVersionNoTagData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no+tag';\n};\n\nexport type PatchApiVbyApiVersionNoTagResponses = {\n    /**\n     * OK\n     */\n    default: unknown;\n};\n\nexport type ImportData = {\n    body: ModelWithReadOnlyAndWriteOnlyWritable | ModelWithArrayReadOnlyAndWriteOnlyWritable;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no+tag';\n};\n\nexport type ImportResponses = {\n    /**\n     * Success\n     */\n    200: ModelFromZendesk;\n    /**\n     * Default success response\n     */\n    default: ModelWithReadOnlyAndWriteOnly;\n};\n\nexport type ImportResponse = ImportResponses[keyof ImportResponses];\n\nexport type FooWowData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no+tag';\n};\n\nexport type FooWowResponses = {\n    /**\n     * OK\n     */\n    default: unknown;\n};\n\nexport type ApiVVersionODataControllerCountData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple/$count';\n};\n\nexport type ApiVVersionODataControllerCountResponses = {\n    /**\n     * Success\n     */\n    200: ModelFromZendesk;\n};\n\nexport type ApiVVersionODataControllerCountResponse = ApiVVersionODataControllerCountResponses[keyof ApiVVersionODataControllerCountResponses];\n\nexport type GetApiVbyApiVersionSimpleOperationData = {\n    body?: never;\n    path: {\n        /**\n         * foo in method\n         */\n        foo_param: string;\n    };\n    query?: never;\n    url: '/api/v{api-version}/simple:operation';\n};\n\nexport type GetApiVbyApiVersionSimpleOperationErrors = {\n    /**\n     * Default error response\n     */\n    default: ModelWithBoolean;\n};\n\nexport type GetApiVbyApiVersionSimpleOperationError = GetApiVbyApiVersionSimpleOperationErrors[keyof GetApiVbyApiVersionSimpleOperationErrors];\n\nexport type GetApiVbyApiVersionSimpleOperationResponses = {\n    /**\n     * Response is a simple number\n     */\n    200: number;\n};\n\nexport type GetApiVbyApiVersionSimpleOperationResponse = GetApiVbyApiVersionSimpleOperationResponses[keyof GetApiVbyApiVersionSimpleOperationResponses];\n\nexport type DeleteCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type GetCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type HeadCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type OptionsCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type PatchCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type PostCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type PutCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type DeleteFooData3 = {\n    body?: never;\n    headers: {\n        /**\n         * Parameter with illegal characters\n         */\n        'x-Foo-Bar': ModelWithString;\n    };\n    path: {\n        /**\n         * foo in method\n         */\n        foo_param: string;\n        /**\n         * bar in method\n         */\n        BarParam: string;\n    };\n    query?: never;\n    url: '/api/v{api-version}/foo/{foo_param}/bar/{BarParam}';\n};\n\nexport type CallWithDescriptionsData = {\n    body?: never;\n    path?: never;\n    query?: {\n        /**\n         * Testing multiline comments in string: First line\n         * Second line\n         *\n         * Fourth line\n         */\n        parameterWithBreaks?: string;\n        /**\n         * Testing backticks in string: `backticks` and ```multiple backticks``` should work\n         */\n        parameterWithBackticks?: string;\n        /**\n         * Testing slashes in string: \\backwards\\\\\\ and /forwards/// should work\n         */\n        parameterWithSlashes?: string;\n        /**\n         * Testing expression placeholders in string: ${expression} should work\n         */\n        parameterWithExpressionPlaceholders?: string;\n        /**\n         * Testing quotes in string: 'single quote''' and \"double quotes\"\"\" should work\n         */\n        parameterWithQuotes?: string;\n        /**\n         * Testing reserved characters in string: * inline * and ** inline ** should work\n         */\n        parameterWithReservedCharacters?: string;\n    };\n    url: '/api/v{api-version}/descriptions';\n};\n\nexport type DeprecatedCallData = {\n    body?: never;\n    headers: {\n        /**\n         * This parameter is deprecated\n         *\n         * @deprecated\n         */\n        parameter: DeprecatedModel | null;\n    };\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/parameters/deprecated';\n};\n\nexport type CallWithParametersData = {\n    /**\n     * This is the parameter that goes into the body\n     */\n    body: {\n        [key: string]: unknown;\n    } | null;\n    headers: {\n        /**\n         * This is the parameter that goes into the header\n         */\n        parameterHeader: string | null;\n    };\n    path: {\n        /**\n         * This is the parameter that goes into the path\n         */\n        parameterPath: string | null;\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string | null;\n    };\n    query: {\n        foo_ref_enum?: ModelWithNestedArrayEnumsDataFoo;\n        foo_all_of_enum: ModelWithNestedArrayEnumsDataFoo;\n        /**\n         * This is the parameter that goes into the query params\n         */\n        cursor: string | null;\n    };\n    url: '/api/v{api-version}/parameters/{parameterPath}';\n};\n\nexport type CallWithWeirdParameterNamesData = {\n    /**\n     * This is the parameter that goes into the body\n     */\n    body: ModelWithString | null;\n    headers: {\n        /**\n         * This is the parameter that goes into the request header\n         */\n        'parameter.header': string | null;\n    };\n    path: {\n        /**\n         * This is the parameter that goes into the path\n         */\n        'parameter.path.1'?: string;\n        /**\n         * This is the parameter that goes into the path\n         */\n        'parameter-path-2'?: string;\n        /**\n         * This is the parameter that goes into the path\n         */\n        'PARAMETER-PATH-3'?: string;\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string | null;\n    };\n    query: {\n        /**\n         * This is the parameter with a reserved keyword\n         */\n        default?: string;\n        /**\n         * This is the parameter that goes into the request query params\n         */\n        'parameter-query': string | null;\n    };\n    url: '/api/v{api-version}/parameters/{parameter.path.1}/{parameter-path-2}/{PARAMETER-PATH-3}';\n};\n\nexport type GetCallWithOptionalParamData = {\n    /**\n     * This is a required parameter\n     */\n    body: ModelWithOneOfEnum;\n    path?: never;\n    query?: {\n        /**\n         * This is an optional parameter\n         */\n        page?: number;\n    };\n    url: '/api/v{api-version}/parameters';\n};\n\nexport type PostCallWithOptionalParamData = {\n    /**\n     * This is an optional parameter\n     */\n    body?: {\n        offset?: number | null;\n    };\n    path?: never;\n    query: {\n        /**\n         * This is a required parameter\n         */\n        parameter: Pageable;\n    };\n    url: '/api/v{api-version}/parameters';\n};\n\nexport type PostCallWithOptionalParamResponses = {\n    /**\n     * Response is a simple number\n     */\n    200: number;\n    /**\n     * Success\n     */\n    204: void;\n};\n\nexport type PostCallWithOptionalParamResponse = PostCallWithOptionalParamResponses[keyof PostCallWithOptionalParamResponses];\n\nexport type PostApiVbyApiVersionRequestBodyData = {\n    /**\n     * A reusable request body\n     */\n    body?: SimpleRequestBody;\n    path?: never;\n    query?: {\n        /**\n         * This is a reusable parameter\n         */\n        parameter?: string;\n    };\n    url: '/api/v{api-version}/requestBody';\n};\n\nexport type PostApiVbyApiVersionFormDataData = {\n    /**\n     * A reusable request body\n     */\n    body?: SimpleFormData;\n    path?: never;\n    query?: {\n        /**\n         * This is a reusable parameter\n         */\n        parameter?: string;\n    };\n    url: '/api/v{api-version}/formData';\n};\n\nexport type CallWithDefaultParametersData = {\n    body?: never;\n    path?: never;\n    query?: {\n        /**\n         * This is a simple string with default value\n         */\n        parameterString?: string | null;\n        /**\n         * This is a simple number with default value\n         */\n        parameterNumber?: number | null;\n        /**\n         * This is a simple boolean with default value\n         */\n        parameterBoolean?: boolean | null;\n        /**\n         * This is a simple enum with default value\n         */\n        parameterEnum?: 'Success' | 'Warning' | 'Error';\n        /**\n         * This is a simple model with default value\n         */\n        parameterModel?: ModelWithString | null;\n    };\n    url: '/api/v{api-version}/defaults';\n};\n\nexport type CallWithDefaultOptionalParametersData = {\n    body?: never;\n    path?: never;\n    query?: {\n        /**\n         * This is a simple string that is optional with default value\n         */\n        parameterString?: string;\n        /**\n         * This is a simple number that is optional with default value\n         */\n        parameterNumber?: number;\n        /**\n         * This is a simple boolean that is optional with default value\n         */\n        parameterBoolean?: boolean;\n        /**\n         * This is a simple enum that is optional with default value\n         */\n        parameterEnum?: 'Success' | 'Warning' | 'Error';\n        /**\n         * This is a simple model that is optional with default value\n         */\n        parameterModel?: ModelWithString;\n    };\n    url: '/api/v{api-version}/defaults';\n};\n\nexport type CallToTestOrderOfParamsData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * This is a optional string with default\n         */\n        parameterOptionalStringWithDefault?: string;\n        /**\n         * This is a optional string with empty default\n         */\n        parameterOptionalStringWithEmptyDefault?: string;\n        /**\n         * This is a optional string with no default\n         */\n        parameterOptionalStringWithNoDefault?: string;\n        /**\n         * This is a string with default\n         */\n        parameterStringWithDefault: string;\n        /**\n         * This is a string with empty default\n         */\n        parameterStringWithEmptyDefault: string;\n        /**\n         * This is a string with no default\n         */\n        parameterStringWithNoDefault: string;\n        /**\n         * This is a string that can be null with no default\n         */\n        parameterStringNullableWithNoDefault?: string | null;\n        /**\n         * This is a string that can be null with default\n         */\n        parameterStringNullableWithDefault?: string | null;\n    };\n    url: '/api/v{api-version}/defaults';\n};\n\nexport type DuplicateNameData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/duplicate';\n};\n\nexport type DuplicateName2Data = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/duplicate';\n};\n\nexport type DuplicateName3Data = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/duplicate';\n};\n\nexport type DuplicateName4Data = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/duplicate';\n};\n\nexport type CallWithNoContentResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no-content';\n};\n\nexport type CallWithNoContentResponseResponses = {\n    /**\n     * Success\n     */\n    204: void;\n};\n\nexport type CallWithNoContentResponseResponse = CallWithNoContentResponseResponses[keyof CallWithNoContentResponseResponses];\n\nexport type CallWithResponseAndNoContentResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multiple-tags/response-and-no-content';\n};\n\nexport type CallWithResponseAndNoContentResponseResponses = {\n    /**\n     * Response is a simple number\n     */\n    200: number;\n    /**\n     * Success\n     */\n    204: void;\n};\n\nexport type CallWithResponseAndNoContentResponseResponse = CallWithResponseAndNoContentResponseResponses[keyof CallWithResponseAndNoContentResponseResponses];\n\nexport type DummyAData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multiple-tags/a';\n};\n\nexport type DummyAResponses = {\n    200: _400;\n};\n\nexport type DummyAResponse = DummyAResponses[keyof DummyAResponses];\n\nexport type DummyBData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multiple-tags/b';\n};\n\nexport type DummyBResponses = {\n    /**\n     * Success\n     */\n    204: void;\n};\n\nexport type DummyBResponse = DummyBResponses[keyof DummyBResponses];\n\nexport type CallWithResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/response';\n};\n\nexport type CallWithResponseResponses = {\n    default: Import;\n};\n\nexport type CallWithResponseResponse = CallWithResponseResponses[keyof CallWithResponseResponses];\n\nexport type CallWithDuplicateResponsesData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/response';\n};\n\nexport type CallWithDuplicateResponsesErrors = {\n    /**\n     * Message for 500 error\n     */\n    500: ModelWithStringError;\n    /**\n     * Message for 501 error\n     */\n    501: ModelWithStringError;\n    /**\n     * Message for 502 error\n     */\n    502: ModelWithStringError;\n    /**\n     * Message for 4XX errors\n     */\n    '4XX': DictionaryWithArray;\n    /**\n     * Default error response\n     */\n    default: ModelWithBoolean;\n};\n\nexport type CallWithDuplicateResponsesError = CallWithDuplicateResponsesErrors[keyof CallWithDuplicateResponsesErrors];\n\nexport type CallWithDuplicateResponsesResponses = {\n    /**\n     * Message for 200 response\n     */\n    200: ModelWithBoolean & ModelWithInteger;\n    /**\n     * Message for 201 response\n     */\n    201: ModelWithString;\n    /**\n     * Message for 202 response\n     */\n    202: ModelWithString;\n};\n\nexport type CallWithDuplicateResponsesResponse = CallWithDuplicateResponsesResponses[keyof CallWithDuplicateResponsesResponses];\n\nexport type CallWithResponsesData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/response';\n};\n\nexport type CallWithResponsesErrors = {\n    /**\n     * Message for 500 error\n     */\n    500: ModelWithStringError;\n    /**\n     * Message for 501 error\n     */\n    501: ModelWithStringError;\n    /**\n     * Message for 502 error\n     */\n    502: ModelWithStringError;\n    /**\n     * Message for default response\n     */\n    default: ModelWithStringError;\n};\n\nexport type CallWithResponsesError = CallWithResponsesErrors[keyof CallWithResponsesErrors];\n\nexport type CallWithResponsesResponses = {\n    /**\n     * Message for 200 response\n     */\n    200: {\n        readonly '@namespace.string'?: string;\n        readonly '@namespace.integer'?: number;\n        readonly value?: Array<ModelWithString>;\n    };\n    /**\n     * Message for 201 response\n     */\n    201: ModelThatExtends;\n    /**\n     * Message for 202 response\n     */\n    202: ModelThatExtendsExtends;\n};\n\nexport type CallWithResponsesResponse = CallWithResponsesResponses[keyof CallWithResponsesResponses];\n\nexport type CollectionFormatData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * This is an array parameter that is sent as csv format (comma-separated values)\n         */\n        parameterArrayCSV: Array<string> | null;\n        /**\n         * This is an array parameter that is sent as ssv format (space-separated values)\n         */\n        parameterArraySSV: Array<string> | null;\n        /**\n         * This is an array parameter that is sent as tsv format (tab-separated values)\n         */\n        parameterArrayTSV: Array<string> | null;\n        /**\n         * This is an array parameter that is sent as pipes format (pipe-separated values)\n         */\n        parameterArrayPipes: Array<string> | null;\n        /**\n         * This is an array parameter that is sent as multi format (multiple parameter instances)\n         */\n        parameterArrayMulti: Array<string> | null;\n    };\n    url: '/api/v{api-version}/collectionFormat';\n};\n\nexport type TypesData = {\n    body?: never;\n    path?: {\n        /**\n         * This is a number parameter\n         */\n        id?: number;\n    };\n    query: {\n        /**\n         * This is a number parameter\n         */\n        parameterNumber: number;\n        /**\n         * This is a string parameter\n         */\n        parameterString: string | null;\n        /**\n         * This is a boolean parameter\n         */\n        parameterBoolean: boolean | null;\n        /**\n         * This is an object parameter\n         */\n        parameterObject: {\n            [key: string]: unknown;\n        } | null;\n        /**\n         * This is an array parameter\n         */\n        parameterArray: Array<string> | null;\n        /**\n         * This is a dictionary parameter\n         */\n        parameterDictionary: {\n            [key: string]: unknown;\n        } | null;\n        /**\n         * This is an enum parameter\n         */\n        parameterEnum: 'Success' | 'Warning' | 'Error' | null;\n    };\n    url: '/api/v{api-version}/types';\n};\n\nexport type TypesResponses = {\n    /**\n     * Response is a simple number\n     */\n    200: number;\n    /**\n     * Response is a simple string\n     */\n    201: string;\n    /**\n     * Response is a simple boolean\n     */\n    202: boolean;\n    /**\n     * Response is a simple object\n     */\n    203: {\n        [key: string]: unknown;\n    };\n};\n\nexport type TypesResponse = TypesResponses[keyof TypesResponses];\n\nexport type UploadFileData = {\n    body: Blob | File;\n    path: {\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string | null;\n    };\n    query?: never;\n    url: '/api/v{api-version}/upload';\n};\n\nexport type UploadFileResponses = {\n    200: boolean;\n};\n\nexport type UploadFileResponse = UploadFileResponses[keyof UploadFileResponses];\n\nexport type FileResponseData = {\n    body?: never;\n    path: {\n        id: string;\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string;\n    };\n    query?: never;\n    url: '/api/v{api-version}/file/{id}';\n};\n\nexport type FileResponseResponses = {\n    /**\n     * Success\n     */\n    200: Blob | File;\n};\n\nexport type FileResponseResponse = FileResponseResponses[keyof FileResponseResponses];\n\nexport type ComplexTypesData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * Parameter containing object\n         */\n        parameterObject: {\n            first?: {\n                second?: {\n                    third?: string;\n                };\n            };\n        };\n        /**\n         * Parameter containing reference\n         */\n        parameterReference: ModelWithString;\n    };\n    url: '/api/v{api-version}/complex';\n};\n\nexport type ComplexTypesErrors = {\n    /**\n     * 400 `server` error\n     */\n    400: unknown;\n    /**\n     * 500 server error\n     */\n    500: unknown;\n};\n\nexport type ComplexTypesResponses = {\n    /**\n     * Successful response\n     */\n    200: Array<ModelWithString>;\n};\n\nexport type ComplexTypesResponse = ComplexTypesResponses[keyof ComplexTypesResponses];\n\nexport type MultipartResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multipart';\n};\n\nexport type MultipartResponseResponses = {\n    /**\n     * OK\n     */\n    200: {\n        file?: Blob | File;\n        metadata?: {\n            foo?: string;\n            bar?: string;\n        };\n    };\n};\n\nexport type MultipartResponseResponse = MultipartResponseResponses[keyof MultipartResponseResponses];\n\nexport type MultipartRequestData = {\n    body?: {\n        content?: Blob | File;\n        data?: ModelWithString | null;\n    };\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multipart';\n};\n\nexport type ComplexParamsData = {\n    body?: {\n        readonly key: string | null;\n        name: string | null;\n        enabled?: boolean;\n        type: 'Monkey' | 'Horse' | 'Bird';\n        listOfModels?: Array<ModelWithString> | null;\n        listOfStrings?: Array<string> | null;\n        parameters: ModelWithString | ModelWithEnum | ModelWithArray | ModelWithDictionary;\n        readonly user?: {\n            readonly id?: number;\n            readonly name?: string | null;\n        };\n    };\n    path: {\n        id: number;\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string;\n    };\n    query?: never;\n    url: '/api/v{api-version}/complex/{id}';\n};\n\nexport type ComplexParamsResponses = {\n    /**\n     * Success\n     */\n    200: ModelWithString;\n};\n\nexport type ComplexParamsResponse = ComplexParamsResponses[keyof ComplexParamsResponses];\n\nexport type CallWithResultFromHeaderData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/header';\n};\n\nexport type CallWithResultFromHeaderErrors = {\n    /**\n     * 400 server error\n     */\n    400: unknown;\n    /**\n     * 500 server error\n     */\n    500: unknown;\n};\n\nexport type CallWithResultFromHeaderResponses = {\n    /**\n     * Successful response\n     */\n    200: unknown;\n};\n\nexport type TestErrorCodeData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * Status code to return\n         */\n        status: number;\n    };\n    url: '/api/v{api-version}/error';\n};\n\nexport type TestErrorCodeErrors = {\n    /**\n     * Custom message: Internal Server Error\n     */\n    500: unknown;\n    /**\n     * Custom message: Not Implemented\n     */\n    501: unknown;\n    /**\n     * Custom message: Bad Gateway\n     */\n    502: unknown;\n    /**\n     * Custom message: Service Unavailable\n     */\n    503: unknown;\n};\n\nexport type TestErrorCodeResponses = {\n    /**\n     * Custom message: Successful response\n     */\n    200: unknown;\n};\n\nexport type NonAsciiæøåÆøÅöôêÊ字符串Data = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * Dummy input param\n         */\n        nonAsciiParamæøåÆØÅöôêÊ: number;\n    };\n    url: '/api/v{api-version}/non-ascii-æøåÆØÅöôêÊ字符串';\n};\n\nexport type NonAsciiæøåÆøÅöôêÊ字符串Responses = {\n    /**\n     * Successful response\n     */\n    200: Array<NonAsciiStringæøåÆøÅöôêÊ字符串>;\n};\n\nexport type NonAsciiæøåÆøÅöôêÊ字符串Response = NonAsciiæøåÆøÅöôêÊ字符串Responses[keyof NonAsciiæøåÆøÅöôêÊ字符串Responses];\n\nexport type PutWithFormUrlEncodedData = {\n    body: ArrayWithStrings;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/non-ascii-æøåÆØÅöôêÊ字符串';\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-ofetch/tsconfig-nodenext-sdk/client/client.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport { ofetch, type ResponseType as OfetchResponseType } from 'ofetch';\n\nimport { createSseClient } from '../core/serverSentEvents.gen.js';\nimport type { HttpMethod } from '../core/types.gen.js';\nimport { getValidRequestBody } from '../core/utils.gen.js';\nimport type { Client, Config, RequestOptions, ResolvedRequestOptions } from './types.gen.js';\nimport {\n  buildOfetchOptions,\n  buildUrl,\n  createConfig,\n  createInterceptors,\n  isRepeatableBody,\n  mapParseAsToResponseType,\n  mergeConfigs,\n  mergeHeaders,\n  parseError,\n  parseSuccess,\n  setAuthParams,\n  wrapDataReturn,\n  wrapErrorReturn,\n} from './utils.gen.js';\n\ntype ReqInit = Omit<RequestInit, 'body' | 'headers'> & {\n  body?: BodyInit | null | undefined;\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  // precompute serialized / network body\n  const resolveOptions = async (options: RequestOptions) => {\n    const opts = {\n      ..._config,\n      ...options,\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 if body is empty to avoid invalid requests\n    if (opts.body === undefined || opts.serializedBody === '') {\n      opts.headers.delete('Content-Type');\n    }\n\n    // if a raw body is provided (no serializer), adjust Content-Type only when it\n    // equals the default JSON value to better match the concrete body type\n    if (\n      opts.body !== undefined &&\n      opts.bodySerializer === null &&\n      (opts.headers.get('Content-Type') || '').toLowerCase() === 'application/json'\n    ) {\n      const b: unknown = opts.body;\n      if (typeof FormData !== 'undefined' && b instanceof FormData) {\n        // let the runtime set the multipart boundary\n        opts.headers.delete('Content-Type');\n      } else if (typeof URLSearchParams !== 'undefined' && b instanceof URLSearchParams) {\n        // standard urlencoded content type (+ charset)\n        opts.headers.set('Content-Type', 'application/x-www-form-urlencoded;charset=UTF-8');\n      } else if (typeof Blob !== 'undefined' && b instanceof Blob) {\n        const t = b.type?.trim();\n        if (t) {\n          opts.headers.set('Content-Type', t);\n        } else {\n          // unknown blob type: avoid sending a misleading JSON header\n          opts.headers.delete('Content-Type');\n        }\n      }\n    }\n\n    // precompute network body (stability for retries and interceptors)\n    const networkBody = getValidRequestBody(opts) as RequestInit['body'] | null | undefined;\n\n    const url = buildUrl(opts);\n\n    return { networkBody, opts, url };\n  };\n\n  // apply request interceptors and mirror header/method/signal back to opts\n  const applyRequestInterceptors = async (\n    request: Request,\n    opts: ResolvedRequestOptions,\n    body: BodyInit | null | undefined,\n  ) => {\n    for (const fn of interceptors.request.fns) {\n      if (fn) {\n        request = await fn(request, opts);\n      }\n    }\n    // reflect interceptor changes into opts used by the network layer\n    opts.headers = request.headers;\n    opts.method = request.method as Uppercase<HttpMethod>;\n    // ignore request.body changes to avoid turning serialized bodies into streams\n    // body comes only from getValidRequestBody(options)\n    // reflect signal if present\n    opts.signal = (request as any).signal as AbortSignal | undefined;\n\n    // When body is FormData, remove Content-Type header to avoid boundary mismatch.\n    // Note: We already delete Content-Type in resolveOptions for FormData, but the\n    // Request constructor (line 175) re-adds it with an auto-generated boundary.\n    // Since we pass the original FormData (not the Request's body) to ofetch, and\n    // ofetch will generate its own boundary, we must remove the Request's Content-Type\n    // to let ofetch set the correct one. Otherwise the boundary in the header won't\n    // match the boundary in the actual multipart body sent by ofetch.\n    if (typeof FormData !== 'undefined' && body instanceof FormData) {\n      opts.headers.delete('Content-Type');\n    }\n\n    return request;\n  };\n\n  // build ofetch options with stable retry logic based on body repeatability\n  const buildNetworkOptions = (\n    opts: ResolvedRequestOptions,\n    body: BodyInit | null | undefined,\n    responseType: OfetchResponseType | undefined,\n  ) => {\n    const effectiveRetry = isRepeatableBody(body) ? (opts.retry as any) : (0 as any);\n    return buildOfetchOptions(opts, body, responseType, effectiveRetry);\n  };\n\n  const request: Client['request'] = async (options) => {\n    const { networkBody: initialNetworkBody, opts, url } = await resolveOptions(options as any);\n    // map parseAs -> ofetch responseType once per request\n    const ofetchResponseType: OfetchResponseType | undefined = mapParseAsToResponseType(\n      opts.parseAs,\n      opts.responseType,\n    );\n\n    const $ofetch = opts.ofetch ?? ofetch;\n\n    // create Request before network to run middleware consistently\n    const networkBody = initialNetworkBody;\n    const requestInit: ReqInit = {\n      body: networkBody,\n      headers: opts.headers as Headers,\n      method: opts.method,\n      redirect: 'follow',\n      signal: opts.signal,\n    };\n    let request = new Request(url, requestInit);\n\n    request = await applyRequestInterceptors(request, opts, networkBody);\n    const finalUrl = request.url;\n\n    // build ofetch options and perform the request (.raw keeps the Response)\n    const responseOptions = buildNetworkOptions(\n      opts as ResolvedRequestOptions,\n      networkBody,\n      ofetchResponseType,\n    );\n\n    let response = await $ofetch.raw(finalUrl, responseOptions);\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 = { request, response };\n\n    if (response.ok) {\n      const data = await parseSuccess(response, opts, ofetchResponseType);\n      return wrapDataReturn(data, result, opts.responseStyle);\n    }\n\n    let finalError = await parseError(response);\n\n    for (const fn of interceptors.error.fns) {\n      if (fn) {\n        finalError = await fn(finalError, response, request, opts);\n      }\n    }\n\n    // ensure error is never undefined after interceptors\n    finalError = (finalError as any) || ({} as string);\n\n    if (opts.throwOnError) {\n      throw finalError;\n    }\n\n    return wrapErrorReturn(finalError, result, opts.responseStyle) as any;\n  };\n\n  const makeMethodFn = (method: Uppercase<HttpMethod>) => (options: RequestOptions) =>\n    request({ ...options, method } as any);\n\n  const makeSseFn = (method: Uppercase<HttpMethod>) => async (options: RequestOptions) => {\n    const { networkBody, opts, url } = await resolveOptions(options);\n    const optsForSse: any = { ...opts };\n    delete optsForSse.body; // body is provided via serializedBody below\n    return createSseClient({\n      ...optsForSse,\n      fetch: opts.fetch,\n      headers: opts.headers as Headers,\n      method,\n      onRequest: async (url, init) => {\n        let request = new Request(url, init);\n        request = await applyRequestInterceptors(request, opts, networkBody);\n        return request;\n      },\n      serializedBody: networkBody as BodyInit | null | undefined,\n      signal: opts.signal,\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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-ofetch/tsconfig-nodenext-sdk/client/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type { Auth } from '../core/auth.gen.js';\nexport type { QuerySerializerOptions } from '../core/bodySerializer.gen.js';\nexport {\n  formDataBodySerializer,\n  jsonBodySerializer,\n  urlSearchParamsBodySerializer,\n} from '../core/bodySerializer.gen.js';\nexport { buildClientParams } from '../core/params.gen.js';\nexport { serializeQueryKeyValue } from '../core/queryKeySerializer.gen.js';\nexport { createClient } from './client.gen.js';\nexport type {\n  Client,\n  ClientOptions,\n  Config,\n  CreateClientConfig,\n  Options,\n  RequestOptions,\n  RequestResult,\n  ResolvedRequestOptions,\n  ResponseStyle,\n  TDataShape,\n} from './types.gen.js';\nexport { createConfig, mergeHeaders } from './utils.gen.js';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-ofetch/tsconfig-nodenext-sdk/client/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { FetchOptions as OfetchOptions, ResponseType as OfetchResponseType } from 'ofetch';\nimport type { ofetch } from 'ofetch';\n\nimport type { Auth } from '../core/auth.gen.js';\nimport type {\n  ServerSentEventsOptions,\n  ServerSentEventsResult,\n} from '../core/serverSentEvents.gen.js';\nimport type { Client as CoreClient, Config as CoreConfig } from '../core/types.gen.js';\nimport type { Middleware } from './utils.gen.js';\n\nexport type ResponseStyle = 'data' | 'fields';\n\nexport interface Config<T extends ClientOptions = ClientOptions>\n  extends Omit<RequestInit, 'body' | 'headers' | 'method'>, CoreConfig {\n  /**\n   * HTTP(S) agent configuration (Node.js only). Passed through to ofetch.\n   */\n  agent?: OfetchOptions['agent'];\n  /**\n   * Base URL for all requests made by this client.\n   */\n  baseUrl?: T['baseUrl'];\n  /**\n   * Node-only proxy/agent options.\n   */\n  dispatcher?: OfetchOptions['dispatcher'];\n  /**\n   * Fetch API implementation. Used for SSE streaming. You can use this option\n   * to provide a custom fetch instance.\n   *\n   * @default globalThis.fetch\n   */\n  fetch?: typeof fetch;\n  /**\n   * Controls the native ofetch behaviour that throws `FetchError` when\n   * `response.ok === false`. We default to suppressing it to match the fetch\n   * client semantics and let `throwOnError` drive the outcome.\n   */\n  ignoreResponseError?: OfetchOptions['ignoreResponseError'];\n  // No custom fetch option: provide custom instance via `ofetch` instead\n  /**\n   * Please don't use the Fetch client for Next.js applications. The `next`\n   * options won't have any effect.\n   *\n   * Install {@link https://www.npmjs.com/package/@hey-api/client-next `@hey-api/client-next`} instead.\n   */\n  next?: never;\n  /**\n   * Custom ofetch instance created via `ofetch.create()`. If provided, it will\n   * be used for requests instead of the default `ofetch` export.\n   */\n  ofetch?: typeof ofetch;\n  /**\n   * ofetch hook called before a request is sent.\n   */\n  onRequest?: OfetchOptions['onRequest'];\n  /**\n   * ofetch hook called when a request fails before receiving a response\n   * (e.g., network errors or aborted requests).\n   */\n  onRequestError?: OfetchOptions['onRequestError'];\n  /**\n   * ofetch hook called after a successful response is received and parsed.\n   */\n  onResponse?: OfetchOptions['onResponse'];\n  /**\n   * ofetch hook called when the response indicates an error (non-ok status)\n   * or when response parsing fails.\n   */\n  onResponseError?: OfetchOptions['onResponseError'];\n  /**\n   * Return the response data parsed in a specified format. By default, `auto`\n   * will infer the appropriate method from the `Content-Type` response header.\n   * You can override this behavior with any of the {@link Body} methods.\n   * Select `stream` if you don't want to parse response data at all.\n   *\n   * @default 'auto'\n   */\n  parseAs?: 'arrayBuffer' | 'auto' | 'blob' | 'formData' | 'json' | 'stream' | 'text';\n  /** Custom response parser (ofetch). */\n  parseResponse?: OfetchOptions['parseResponse'];\n  /**\n   * Should we return only data or multiple fields (data, error, response, etc.)?\n   *\n   * @default 'fields'\n   */\n  responseStyle?: ResponseStyle;\n  /**\n   * ofetch responseType override. If provided, it will be passed directly to\n   * ofetch and take precedence over `parseAs`.\n   */\n  responseType?: OfetchResponseType;\n  /**\n   * Automatically retry failed requests.\n   */\n  retry?: OfetchOptions['retry'];\n  /**\n   * Delay (in ms) between retry attempts.\n   */\n  retryDelay?: OfetchOptions['retryDelay'];\n  /**\n   * HTTP status codes that should trigger a retry.\n   */\n  retryStatusCodes?: OfetchOptions['retryStatusCodes'];\n  /**\n   * Throw an error instead of returning it in the response?\n   *\n   * @default false\n   */\n  throwOnError?: T['throwOnError'];\n  /**\n   * Abort the request after the given milliseconds.\n   */\n  timeout?: number;\n}\n\nexport interface RequestOptions<\n  TData = unknown,\n  TResponseStyle extends ResponseStyle = 'fields',\n  ThrowOnError extends boolean = boolean,\n  Url extends string = string,\n>\n  extends\n    Config<{\n      responseStyle: TResponseStyle;\n      throwOnError: ThrowOnError;\n    }>,\n    Pick<\n      ServerSentEventsOptions<TData>,\n      | 'onSseError'\n      | 'onSseEvent'\n      | 'sseDefaultRetryDelay'\n      | 'sseMaxRetryAttempts'\n      | 'sseMaxRetryDelay'\n    > {\n  /**\n   * Any body that you want to add to your request.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/fetch#body}\n   */\n  body?: unknown;\n  path?: Record<string, unknown>;\n  query?: Record<string, unknown>;\n  /**\n   * Security mechanism(s) to use for the request.\n   */\n  security?: ReadonlyArray<Auth>;\n  url: Url;\n}\n\nexport interface ResolvedRequestOptions<\n  TResponseStyle extends ResponseStyle = 'fields',\n  ThrowOnError extends boolean = boolean,\n  Url extends string = string,\n> extends RequestOptions<unknown, TResponseStyle, ThrowOnError, Url> {\n  serializedBody?: string;\n}\n\nexport type RequestResult<\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = boolean,\n  TResponseStyle extends ResponseStyle = 'fields',\n> = ThrowOnError extends true\n  ? Promise<\n      TResponseStyle extends 'data'\n        ? TData extends Record<string, unknown>\n          ? TData[keyof TData]\n          : TData\n        : {\n            data: TData extends Record<string, unknown> ? TData[keyof TData] : TData;\n            request: Request;\n            response: Response;\n          }\n    >\n  : Promise<\n      TResponseStyle extends 'data'\n        ? (TData extends Record<string, unknown> ? TData[keyof TData] : TData) | undefined\n        : (\n            | {\n                data: TData extends Record<string, unknown> ? TData[keyof TData] : TData;\n                error: undefined;\n              }\n            | {\n                data: undefined;\n                error: TError extends Record<string, unknown> ? TError[keyof TError] : TError;\n              }\n          ) & {\n            request: Request;\n            response: Response;\n          }\n    >;\n\nexport interface ClientOptions {\n  baseUrl?: string;\n  responseStyle?: ResponseStyle;\n  throwOnError?: boolean;\n}\n\ntype MethodFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'>,\n) => RequestResult<TData, TError, ThrowOnError, TResponseStyle>;\n\ntype SseFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'>,\n) => Promise<ServerSentEventsResult<TData, TError>>;\n\ntype RequestFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'> &\n    Pick<Required<RequestOptions<TData, TResponseStyle, ThrowOnError>>, 'method'>,\n) => RequestResult<TData, TError, ThrowOnError, TResponseStyle>;\n\ntype BuildUrlFn = <\n  TData extends {\n    body?: unknown;\n    path?: Record<string, unknown>;\n    query?: Record<string, unknown>;\n    url: string;\n  },\n>(\n  options: TData & Options<TData>,\n) => string;\n\nexport type Client = CoreClient<RequestFn, Config, MethodFn, BuildUrlFn, SseFn> & {\n  interceptors: Middleware<Request, Response, unknown, ResolvedRequestOptions>;\n};\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 = ClientOptions> = (\n  override?: Config<ClientOptions & T>,\n) => Config<Required<ClientOptions> & T>;\n\nexport interface TDataShape {\n  body?: unknown;\n  headers?: unknown;\n  path?: unknown;\n  query?: unknown;\n  url: string;\n}\n\ntype OmitKeys<T, K> = Pick<T, Exclude<keyof T, K>>;\n\nexport type Options<\n  TData extends TDataShape = TDataShape,\n  ThrowOnError extends boolean = boolean,\n  TResponse = unknown,\n  TResponseStyle extends ResponseStyle = 'fields',\n> = OmitKeys<\n  RequestOptions<TResponse, TResponseStyle, ThrowOnError>,\n  'body' | 'path' | 'query' | 'url'\n> &\n  ([TData] extends [never] ? unknown : Omit<TData, 'url'>);\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-ofetch/tsconfig-nodenext-sdk/client/utils.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { FetchOptions as OfetchOptions, ResponseType as OfetchResponseType } from 'ofetch';\n\nimport { getAuthToken } from '../core/auth.gen.js';\nimport type { QuerySerializerOptions } from '../core/bodySerializer.gen.js';\nimport { jsonBodySerializer } from '../core/bodySerializer.gen.js';\nimport {\n  serializeArrayParam,\n  serializeObjectParam,\n  serializePrimitiveParam,\n} from '../core/pathSerializer.gen.js';\nimport { getUrl } from '../core/utils.gen.js';\nimport type {\n  Client,\n  ClientOptions,\n  Config,\n  RequestOptions,\n  ResolvedRequestOptions,\n  ResponseStyle,\n} from './types.gen.js';\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\n/**\n * Map our parseAs value to ofetch responseType when not explicitly provided.\n */\nexport const mapParseAsToResponseType = (\n  parseAs: Config['parseAs'] | undefined,\n  explicit?: OfetchResponseType,\n): OfetchResponseType | undefined => {\n  if (explicit) return explicit;\n  switch (parseAs) {\n    case 'arrayBuffer':\n    case 'blob':\n    case 'json':\n    case 'text':\n    case 'stream':\n      return parseAs;\n    case 'formData':\n    case 'auto':\n    default:\n      return undefined; // let ofetch auto-detect\n  }\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\n/**\n * Heuristic to detect whether a request body can be safely retried.\n */\nexport const isRepeatableBody = (body: unknown): boolean => {\n  if (body == null) return true; // undefined/null treated as no-body\n  if (typeof body === 'string') return true;\n  if (typeof URLSearchParams !== 'undefined' && body instanceof URLSearchParams) return true;\n  if (typeof Uint8Array !== 'undefined' && body instanceof Uint8Array) return true;\n  if (typeof ArrayBuffer !== 'undefined' && body instanceof ArrayBuffer) return true;\n  if (typeof Blob !== 'undefined' && body instanceof Blob) return true;\n  if (typeof FormData !== 'undefined' && body instanceof FormData) return true;\n  // Streams are not repeatable\n  if (typeof ReadableStream !== 'undefined' && body instanceof ReadableStream) return false;\n  // Default: assume non-repeatable for unknown structured bodies\n  return false;\n};\n\n/**\n * Small helper to unify data vs fields return style.\n */\nexport const wrapDataReturn = <T>(\n  data: T,\n  result: { request: Request; response: Response },\n  responseStyle: ResponseStyle | undefined,\n): T | ((T extends Record<string, unknown> ? { data: T } : { data: T }) & typeof result) =>\n  (responseStyle ?? 'fields') === 'data' ? (data as any) : ({ data, ...result } as any);\n\n/**\n * Small helper to unify error vs fields return style.\n */\nexport const wrapErrorReturn = <E>(\n  error: E,\n  result: { request: Request; response: Response },\n  responseStyle: ResponseStyle | undefined,\n):\n  | undefined\n  | ((E extends Record<string, unknown> ? { error: E } : { error: E }) & typeof result) =>\n  (responseStyle ?? 'fields') === 'data' ? undefined : ({ error, ...result } as any);\n\n/**\n * Build options for $ofetch.raw from our resolved opts and body.\n */\nexport const buildOfetchOptions = (\n  opts: ResolvedRequestOptions,\n  body: BodyInit | null | undefined,\n  responseType: OfetchResponseType | undefined,\n  retryOverride?: OfetchOptions['retry'],\n): OfetchOptions =>\n  ({\n    agent: opts.agent as OfetchOptions['agent'],\n    body,\n    credentials: opts.credentials as OfetchOptions['credentials'],\n    dispatcher: opts.dispatcher as OfetchOptions['dispatcher'],\n    headers: opts.headers as Headers,\n    ignoreResponseError: (opts.ignoreResponseError as OfetchOptions['ignoreResponseError']) ?? true,\n    method: opts.method,\n    onRequest: opts.onRequest as OfetchOptions['onRequest'],\n    onRequestError: opts.onRequestError as OfetchOptions['onRequestError'],\n    onResponse: opts.onResponse as OfetchOptions['onResponse'],\n    onResponseError: opts.onResponseError as OfetchOptions['onResponseError'],\n    parseResponse: opts.parseResponse as OfetchOptions['parseResponse'],\n    // URL already includes query\n    query: undefined,\n    responseType,\n    retry: retryOverride ?? (opts.retry as OfetchOptions['retry']),\n    retryDelay: opts.retryDelay as OfetchOptions['retryDelay'],\n    retryStatusCodes: opts.retryStatusCodes as OfetchOptions['retryStatusCodes'],\n    signal: opts.signal,\n    timeout: opts.timeout as number | undefined,\n  }) as OfetchOptions;\n\n/**\n * Parse a successful response, handling empty bodies and stream cases.\n */\nexport const parseSuccess = async (\n  response: Response,\n  opts: ResolvedRequestOptions,\n  ofetchResponseType?: OfetchResponseType,\n): Promise<unknown> => {\n  // Stream requested: return stream body\n  if (ofetchResponseType === 'stream') {\n    return response.body;\n  }\n\n  const inferredParseAs =\n    (opts.parseAs === 'auto' ? getParseAs(response.headers.get('Content-Type')) : opts.parseAs) ??\n    'json';\n\n  // Handle empty responses\n  if (response.status === 204 || response.headers.get('Content-Length') === '0') {\n    switch (inferredParseAs) {\n      case 'arrayBuffer':\n      case 'blob':\n      case 'text':\n        return await (response as any)[inferredParseAs]();\n      case 'formData':\n        return new FormData();\n      case 'stream':\n        return response.body;\n      default:\n        return {};\n    }\n  }\n\n  // Prefer ofetch-populated data unless we explicitly need raw `formData`\n  let data: unknown = (response as any)._data;\n  if (inferredParseAs === 'formData' || typeof data === 'undefined') {\n    switch (inferredParseAs) {\n      case 'arrayBuffer':\n      case 'blob':\n      case 'formData':\n      case 'text':\n        data = await (response as any)[inferredParseAs]();\n        break;\n      case 'json': {\n        // Some servers return 200 with no Content-Length and empty body.\n        // response.json() would throw; detect empty via clone().text() first.\n        const txt = await response.clone().text();\n        if (!txt) {\n          data = {};\n        } else {\n          data = await (response as any).json();\n        }\n        break;\n      }\n      case 'stream':\n        return response.body;\n    }\n  }\n\n  if (inferredParseAs === 'json') {\n    if (opts.responseValidator) {\n      await opts.responseValidator(data);\n    }\n    if (opts.responseTransformer) {\n      data = await opts.responseTransformer(data);\n    }\n  }\n\n  return data;\n};\n\n/**\n * Parse an error response payload.\n */\nexport const parseError = async (response: Response): Promise<unknown> => {\n  let error: unknown = (response as any)._data;\n  if (typeof error === 'undefined') {\n    const textError = await response.text();\n    try {\n      error = JSON.parse(textError);\n    } catch {\n      error = textError;\n    }\n  }\n  return error ?? ({} as string);\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  ignoreResponseError: true,\n  parseAs: 'auto',\n  querySerializer: defaultQuerySerializer,\n  ...override,\n});\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-ofetch/tsconfig-nodenext-sdk/client.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport { type ClientOptions, type Config, createClient, createConfig } from './client/index.js';\nimport type { ClientOptions as ClientOptions2 } from './types.gen.js';\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: 'http://localhost:3000/base' }));\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-ofetch/tsconfig-nodenext-sdk/core/auth.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-ofetch/tsconfig-nodenext-sdk/core/bodySerializer.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { ArrayStyle, ObjectStyle, SerializerOptions } from './pathSerializer.gen.js';\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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-ofetch/tsconfig-nodenext-sdk/core/params.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-ofetch/tsconfig-nodenext-sdk/core/pathSerializer.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-ofetch/tsconfig-nodenext-sdk/core/queryKeySerializer.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\n/**\n * JSON-friendly union that mirrors what Pinia Colada can hash.\n */\nexport type JsonValue =\n  | null\n  | string\n  | number\n  | boolean\n  | JsonValue[]\n  | { [key: string]: JsonValue };\n\n/**\n * Replacer that converts non-JSON values (bigint, Date, etc.) to safe substitutes.\n */\nexport const queryKeyJsonReplacer = (_key: string, value: unknown) => {\n  if (value === undefined || typeof value === 'function' || typeof value === 'symbol') {\n    return undefined;\n  }\n  if (typeof value === 'bigint') {\n    return value.toString();\n  }\n  if (value instanceof Date) {\n    return value.toISOString();\n  }\n  return value;\n};\n\n/**\n * Safely stringifies a value and parses it back into a JsonValue.\n */\nexport const stringifyToJsonValue = (input: unknown): JsonValue | undefined => {\n  try {\n    const json = JSON.stringify(input, queryKeyJsonReplacer);\n    if (json === undefined) {\n      return undefined;\n    }\n    return JSON.parse(json) as JsonValue;\n  } catch {\n    return undefined;\n  }\n};\n\n/**\n * Detects plain objects (including objects with a null prototype).\n */\nconst isPlainObject = (value: unknown): value is Record<string, unknown> => {\n  if (value === null || typeof value !== 'object') {\n    return false;\n  }\n  const prototype = Object.getPrototypeOf(value as object);\n  return prototype === Object.prototype || prototype === null;\n};\n\n/**\n * Turns URLSearchParams into a sorted JSON object for deterministic keys.\n */\nconst serializeSearchParams = (params: URLSearchParams): JsonValue => {\n  const entries = Array.from(params.entries()).sort(([a], [b]) => a.localeCompare(b));\n  const result: Record<string, JsonValue> = {};\n\n  for (const [key, value] of entries) {\n    const existing = result[key];\n    if (existing === undefined) {\n      result[key] = value;\n      continue;\n    }\n\n    if (Array.isArray(existing)) {\n      (existing as string[]).push(value);\n    } else {\n      result[key] = [existing, value];\n    }\n  }\n\n  return result;\n};\n\n/**\n * Normalizes any accepted value into a JSON-friendly shape for query keys.\n */\nexport const serializeQueryKeyValue = (value: unknown): JsonValue | undefined => {\n  if (value === null) {\n    return null;\n  }\n\n  if (typeof value === 'string' || typeof value === 'number' || typeof value === 'boolean') {\n    return value;\n  }\n\n  if (value === undefined || typeof value === 'function' || typeof value === 'symbol') {\n    return undefined;\n  }\n\n  if (typeof value === 'bigint') {\n    return value.toString();\n  }\n\n  if (value instanceof Date) {\n    return value.toISOString();\n  }\n\n  if (Array.isArray(value)) {\n    return stringifyToJsonValue(value);\n  }\n\n  if (typeof URLSearchParams !== 'undefined' && value instanceof URLSearchParams) {\n    return serializeSearchParams(value);\n  }\n\n  if (isPlainObject(value)) {\n    return stringifyToJsonValue(value);\n  }\n\n  return undefined;\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-ofetch/tsconfig-nodenext-sdk/core/serverSentEvents.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { Config } from './types.gen.js';\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 const 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            // Normalize line endings: CRLF -> LF, then CR -> LF\n            buffer = buffer.replace(/\\r\\n/g, '\\n').replace(/\\r/g, '\\n');\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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-ofetch/tsconfig-nodenext-sdk/core/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { Auth, AuthToken } from './auth.gen.js';\nimport type { BodySerializer, QuerySerializer, QuerySerializerOptions } from './bodySerializer.gen.js';\n\nexport type HttpMethod =\n  | 'connect'\n  | 'delete'\n  | 'get'\n  | 'head'\n  | 'options'\n  | 'patch'\n  | 'post'\n  | 'put'\n  | 'trace';\n\nexport type Client<\n  RequestFn = never,\n  Config = unknown,\n  MethodFn = never,\n  BuildUrlFn = never,\n  SseFn = never,\n> = {\n  /**\n   * Returns the final request URL.\n   */\n  buildUrl: BuildUrlFn;\n  getConfig: () => Config;\n  request: RequestFn;\n  setConfig: (config: Config) => Config;\n} & {\n  [K in HttpMethod]: MethodFn;\n} & ([SseFn] extends [never] ? { sse?: never } : { sse: { [K in HttpMethod]: SseFn } });\n\nexport interface Config {\n  /**\n   * Auth token or a function returning auth token. The resolved value will be\n   * added to the request payload as defined by its `security` array.\n   */\n  auth?: ((auth: Auth) => Promise<AuthToken> | AuthToken) | AuthToken;\n  /**\n   * A function for serializing request body parameter. By default,\n   * {@link JSON.stringify()} will be used.\n   */\n  bodySerializer?: BodySerializer | null;\n  /**\n   * An object containing any HTTP headers that you want to pre-populate your\n   * `Headers` object with.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/Headers/Headers#init See more}\n   */\n  headers?:\n    | RequestInit['headers']\n    | Record<\n        string,\n        string | number | boolean | (string | number | boolean)[] | null | undefined | unknown\n      >;\n  /**\n   * The request method.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/fetch#method See more}\n   */\n  method?: Uppercase<HttpMethod>;\n  /**\n   * A function for serializing request query parameters. By default, arrays\n   * will be exploded in form style, objects will be exploded in deepObject\n   * style, and reserved characters are percent-encoded.\n   *\n   * This method will have no effect if the native `paramsSerializer()` Axios\n   * API function is used.\n   *\n   * {@link https://swagger.io/docs/specification/serialization/#query View examples}\n   */\n  querySerializer?: QuerySerializer | QuerySerializerOptions;\n  /**\n   * A function validating request data. This is useful if you want to ensure\n   * the request conforms to the desired shape, so it can be safely sent to\n   * the server.\n   */\n  requestValidator?: (data: unknown) => Promise<unknown>;\n  /**\n   * A function transforming response data before it's returned. This is useful\n   * for post-processing data, e.g. converting ISO strings into Date objects.\n   */\n  responseTransformer?: (data: unknown) => Promise<unknown>;\n  /**\n   * A function validating response data. This is useful if you want to ensure\n   * the response conforms to the desired shape, so it can be safely passed to\n   * the transformers and returned to the user.\n   */\n  responseValidator?: (data: unknown) => Promise<unknown>;\n}\n\ntype IsExactlyNeverOrNeverUndefined<T> = [T] extends [never]\n  ? true\n  : [T] extends [never | undefined]\n    ? [undefined] extends [T]\n      ? false\n      : true\n    : false;\n\nexport type OmitNever<T extends Record<string, unknown>> = {\n  [K in keyof T as IsExactlyNeverOrNeverUndefined<T[K]> extends true ? never : K]: T[K];\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-ofetch/tsconfig-nodenext-sdk/core/utils.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { BodySerializer, QuerySerializer } from './bodySerializer.gen.js';\nimport {\n  type ArraySeparatorStyle,\n  serializeArrayParam,\n  serializeObjectParam,\n  serializePrimitiveParam,\n} from './pathSerializer.gen.js';\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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-ofetch/tsconfig-nodenext-sdk/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport { apiVVersionODataControllerCount, callToTestOrderOfParams, callWithDefaultOptionalParameters, callWithDefaultParameters, callWithDescriptions, callWithDuplicateResponses, callWithNoContentResponse, callWithParameters, callWithResponse, callWithResponseAndNoContentResponse, callWithResponses, callWithResultFromHeader, callWithWeirdParameterNames, collectionFormat, complexParams, complexTypes, deleteCallWithoutParametersAndResponse, deleteFoo, deprecatedCall, dummyA, dummyB, duplicateName, duplicateName2, duplicateName3, duplicateName4, export_, fileResponse, fooWow, getApiVbyApiVersionSimpleOperation, getCallWithOptionalParam, getCallWithoutParametersAndResponse, headCallWithoutParametersAndResponse, import_, multipartRequest, multipartResponse, nonAsciiæøåÆøÅöôêÊ字符串, type Options, optionsCallWithoutParametersAndResponse, patchApiVbyApiVersionNoTag, patchCallWithoutParametersAndResponse, postApiVbyApiVersionFormData, postApiVbyApiVersionRequestBody, postCallWithOptionalParam, postCallWithoutParametersAndResponse, putCallWithoutParametersAndResponse, putWithFormUrlEncoded, testErrorCode, types, uploadFile } from './sdk.gen.js';\nexport type { _3eNum1Период, _400, AdditionalPropertiesIntegerIssue, AdditionalPropertiesUnknownIssue, AdditionalPropertiesUnknownIssue2, AdditionalPropertiesUnknownIssue3, AdditionalPropertiesUnknownIssueWritable, AnyOfAnyAndNull, AnyOfArrays, ApiVVersionODataControllerCountData, ApiVVersionODataControllerCountResponse, ApiVVersionODataControllerCountResponses, ArrayWithAnyOfProperties, ArrayWithArray, ArrayWithBooleans, ArrayWithNumbers, ArrayWithProperties, ArrayWithReferences, ArrayWithStrings, CallToTestOrderOfParamsData, CallWithDefaultOptionalParametersData, CallWithDefaultParametersData, CallWithDescriptionsData, CallWithDuplicateResponsesData, CallWithDuplicateResponsesError, CallWithDuplicateResponsesErrors, CallWithDuplicateResponsesResponse, CallWithDuplicateResponsesResponses, CallWithNoContentResponseData, CallWithNoContentResponseResponse, CallWithNoContentResponseResponses, CallWithParametersData, CallWithResponseAndNoContentResponseData, CallWithResponseAndNoContentResponseResponse, CallWithResponseAndNoContentResponseResponses, CallWithResponseData, CallWithResponseResponse, CallWithResponseResponses, CallWithResponsesData, CallWithResponsesError, CallWithResponsesErrors, CallWithResponsesResponse, CallWithResponsesResponses, CallWithResultFromHeaderData, CallWithResultFromHeaderErrors, CallWithResultFromHeaderResponses, CallWithWeirdParameterNamesData, CamelCaseCommentWithBreaks, CharactersInDescription, ClientOptions, CollectionFormatData, CommentWithBackticks, CommentWithBackticksAndQuotes, CommentWithBreaks, CommentWithExpressionPlaceholders, CommentWithQuotes, CommentWithReservedCharacters, CommentWithSlashes, ComplexParamsData, ComplexParamsResponse, ComplexParamsResponses, ComplexTypesData, ComplexTypesErrors, ComplexTypesResponse, ComplexTypesResponses, CompositionBaseModel, CompositionExtendedModel, CompositionWithAllOfAndNullable, CompositionWithAnyOf, CompositionWithAnyOfAndNullable, CompositionWithAnyOfAnonymous, CompositionWithNestedAnyAndTypeNull, CompositionWithNestedAnyOfAndNull, CompositionWithOneOf, CompositionWithOneOfAndComplexArrayDictionary, CompositionWithOneOfAndNullable, CompositionWithOneOfAndProperties, CompositionWithOneOfAndSimpleArrayDictionary, CompositionWithOneOfAndSimpleDictionary, CompositionWithOneOfAnonymous, CompositionWithOneOfDiscriminator, ConstValue, Default, DeleteCallWithoutParametersAndResponseData, DeleteFooData, DeleteFooData2, DeleteFooData3, DeprecatedCallData, DeprecatedModel, DictionaryWithArray, DictionaryWithDictionary, DictionaryWithProperties, DictionaryWithPropertiesAndAdditionalProperties, DictionaryWithReference, DictionaryWithString, DummyAData, DummyAResponse, DummyAResponses, DummyBData, DummyBResponse, DummyBResponses, DuplicateName2Data, DuplicateName3Data, DuplicateName4Data, DuplicateNameData, EnumFromDescription, EnumWithExtensions, EnumWithNumbers, EnumWithReplacedCharacters, EnumWithStrings, EnumWithXEnumNames, ExportData, ExternalRefA, ExternalRefB, ExternalSharedModel, File, FileResponseData, FileResponseResponse, FileResponseResponses, FileWritable, FooWowData, FooWowResponses, FreeFormObjectWithAdditionalPropertiesEqEmptyObject, FreeFormObjectWithAdditionalPropertiesEqTrue, FreeFormObjectWithoutAdditionalProperties, GenericSchemaDuplicateIssue1SystemBoolean, GenericSchemaDuplicateIssue1SystemBooleanWritable, GenericSchemaDuplicateIssue1SystemString, GenericSchemaDuplicateIssue1SystemStringWritable, GetApiVbyApiVersionSimpleOperationData, GetApiVbyApiVersionSimpleOperationError, GetApiVbyApiVersionSimpleOperationErrors, GetApiVbyApiVersionSimpleOperationResponse, GetApiVbyApiVersionSimpleOperationResponses, GetCallWithOptionalParamData, GetCallWithoutParametersAndResponseData, HeadCallWithoutParametersAndResponseData, Import, ImportData, ImportResponse, ImportResponses, IoK8sApimachineryPkgApisMetaV1DeleteOptions, IoK8sApimachineryPkgApisMetaV1Preconditions, ModelCircle, ModelFromZendesk, ModelSquare, ModelThatExtends, ModelThatExtendsExtends, ModelWithAdditionalPropertiesEqTrue, ModelWithAdditionalPropertiesRef, ModelWithAnyOfConstantSizeArray, ModelWithAnyOfConstantSizeArrayAndIntersect, ModelWithAnyOfConstantSizeArrayNullable, ModelWithAnyOfConstantSizeArrayWithNSizeAndOptions, ModelWithAnyOfConstantSizeArrayWithNSizeAndOptionsWritable, ModelWithArray, ModelWithArrayReadOnlyAndWriteOnly, ModelWithArrayReadOnlyAndWriteOnlyWritable, ModelWithBackticksInDescription, ModelWithBoolean, ModelWithCircularReference, ModelWithConst, ModelWithConstantSizeArray, ModelWithDictionary, ModelWithDuplicateImports, ModelWithDuplicateProperties, ModelWithEnum, ModelWithEnumFromDescription, ModelWithEnumWithHyphen, ModelWithInteger, ModelWithNestedArrayEnums, ModelWithNestedArrayEnumsData, ModelWithNestedArrayEnumsDataBar, ModelWithNestedArrayEnumsDataFoo, ModelWithNestedCompositionEnums, ModelWithNestedEnums, ModelWithNestedProperties, ModelWithNullableObject, ModelWithNullableString, ModelWithNumericEnumUnion, ModelWithOneOfAndProperties, ModelWithOneOfEnum, ModelWithOrderedProperties, ModelWithPattern, ModelWithPatternWritable, ModelWithPrefixItemsConstantSizeArray, ModelWithProperties, ModelWithPropertiesWritable, ModelWithReadOnlyAndWriteOnly, ModelWithReadOnlyAndWriteOnlyWritable, ModelWithReference, ModelWithReferenceWritable, ModelWithString, ModelWithStringError, MultipartRequestData, MultipartResponseData, MultipartResponseResponse, MultipartResponseResponses, NestedAnyOfArraysNullable, NonAsciiæøåÆøÅöôêÊ字符串Data, NonAsciiæøåÆøÅöôêÊ字符串Response, NonAsciiæøåÆøÅöôêÊ字符串Responses, NonAsciiStringæøåÆøÅöôêÊ字符串, NullableObject, OneOfAllOfIssue, OneOfAllOfIssueWritable, OptionsCallWithoutParametersAndResponseData, Pageable, ParameterSimpleParameterUnused, PatchApiVbyApiVersionNoTagData, PatchApiVbyApiVersionNoTagResponses, PatchCallWithoutParametersAndResponseData, PostApiVbyApiVersionFormDataData, PostApiVbyApiVersionRequestBodyData, PostCallWithOptionalParamData, PostCallWithOptionalParamResponse, PostCallWithOptionalParamResponses, PostCallWithoutParametersAndResponseData, PostServiceWithEmptyTagResponse, PostServiceWithEmptyTagResponse2, PutCallWithoutParametersAndResponseData, PutWithFormUrlEncodedData, SchemaWithFormRestrictedKeys, SimpleBoolean, SimpleFile, SimpleFormData, SimpleInteger, SimpleParameter, SimpleReference, SimpleRequestBody, SimpleString, SimpleStringWithPattern, TestErrorCodeData, TestErrorCodeErrors, TestErrorCodeResponses, TypesData, TypesResponse, TypesResponses, UploadFileData, UploadFileResponse, UploadFileResponses, XFooBar } from './types.gen.js';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-ofetch/tsconfig-nodenext-sdk/sdk.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport { client } from './client.gen.js';\nimport { type Client, formDataBodySerializer, type Options as Options2, type TDataShape, urlSearchParamsBodySerializer } from './client/index.js';\nimport type { ApiVVersionODataControllerCountData, ApiVVersionODataControllerCountResponses, CallToTestOrderOfParamsData, CallWithDefaultOptionalParametersData, CallWithDefaultParametersData, CallWithDescriptionsData, CallWithDuplicateResponsesData, CallWithDuplicateResponsesErrors, CallWithDuplicateResponsesResponses, CallWithNoContentResponseData, CallWithNoContentResponseResponses, CallWithParametersData, CallWithResponseAndNoContentResponseData, CallWithResponseAndNoContentResponseResponses, CallWithResponseData, CallWithResponseResponses, CallWithResponsesData, CallWithResponsesErrors, CallWithResponsesResponses, CallWithResultFromHeaderData, CallWithResultFromHeaderErrors, CallWithResultFromHeaderResponses, CallWithWeirdParameterNamesData, CollectionFormatData, ComplexParamsData, ComplexParamsResponses, ComplexTypesData, ComplexTypesErrors, ComplexTypesResponses, DeleteCallWithoutParametersAndResponseData, DeleteFooData3, DeprecatedCallData, DummyAData, DummyAResponses, DummyBData, DummyBResponses, DuplicateName2Data, DuplicateName3Data, DuplicateName4Data, DuplicateNameData, ExportData, FileResponseData, FileResponseResponses, FooWowData, FooWowResponses, GetApiVbyApiVersionSimpleOperationData, GetApiVbyApiVersionSimpleOperationErrors, GetApiVbyApiVersionSimpleOperationResponses, GetCallWithOptionalParamData, GetCallWithoutParametersAndResponseData, HeadCallWithoutParametersAndResponseData, ImportData, ImportResponses, MultipartRequestData, MultipartResponseData, MultipartResponseResponses, NonAsciiæøåÆøÅöôêÊ字符串Data, NonAsciiæøåÆøÅöôêÊ字符串Responses, OptionsCallWithoutParametersAndResponseData, PatchApiVbyApiVersionNoTagData, PatchApiVbyApiVersionNoTagResponses, PatchCallWithoutParametersAndResponseData, PostApiVbyApiVersionFormDataData, PostApiVbyApiVersionRequestBodyData, PostCallWithOptionalParamData, PostCallWithOptionalParamResponses, PostCallWithoutParametersAndResponseData, PutCallWithoutParametersAndResponseData, PutWithFormUrlEncodedData, TestErrorCodeData, TestErrorCodeErrors, TestErrorCodeResponses, TypesData, TypesResponses, UploadFileData, UploadFileResponses } from './types.gen.js';\n\nexport type Options<TData extends TDataShape = TDataShape, ThrowOnError extends boolean = boolean> = Options2<TData, ThrowOnError> & {\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\nexport const export_ = <ThrowOnError extends boolean = false>(options?: Options<ExportData, ThrowOnError>) => (options?.client ?? client).get<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/no+tag', ...options });\n\nexport const patchApiVbyApiVersionNoTag = <ThrowOnError extends boolean = false>(options?: Options<PatchApiVbyApiVersionNoTagData, ThrowOnError>) => (options?.client ?? client).patch<PatchApiVbyApiVersionNoTagResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/no+tag', ...options });\n\nexport const import_ = <ThrowOnError extends boolean = false>(options: Options<ImportData, ThrowOnError>) => (options.client ?? client).post<ImportResponses, unknown, ThrowOnError>({\n    url: '/api/v{api-version}/no+tag',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options.headers\n    }\n});\n\nexport const fooWow = <ThrowOnError extends boolean = false>(options?: Options<FooWowData, ThrowOnError>) => (options?.client ?? client).put<FooWowResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/no+tag', ...options });\n\nexport const apiVVersionODataControllerCount = <ThrowOnError extends boolean = false>(options?: Options<ApiVVersionODataControllerCountData, ThrowOnError>) => (options?.client ?? client).get<ApiVVersionODataControllerCountResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple/$count', ...options });\n\nexport const getApiVbyApiVersionSimpleOperation = <ThrowOnError extends boolean = false>(options: Options<GetApiVbyApiVersionSimpleOperationData, ThrowOnError>) => (options.client ?? client).get<GetApiVbyApiVersionSimpleOperationResponses, GetApiVbyApiVersionSimpleOperationErrors, ThrowOnError>({ url: '/api/v{api-version}/simple:operation', ...options });\n\nexport const deleteCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<DeleteCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).delete<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const getCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<GetCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).get<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const headCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<HeadCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).head<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const optionsCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<OptionsCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).options<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const patchCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<PatchCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).patch<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const postCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<PostCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).post<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const putCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<PutCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).put<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const deleteFoo = <ThrowOnError extends boolean = false>(options: Options<DeleteFooData3, ThrowOnError>) => (options.client ?? client).delete<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/foo/{foo_param}/bar/{BarParam}', ...options });\n\nexport const callWithDescriptions = <ThrowOnError extends boolean = false>(options?: Options<CallWithDescriptionsData, ThrowOnError>) => (options?.client ?? client).post<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/descriptions', ...options });\n\n/**\n * @deprecated\n */\nexport const deprecatedCall = <ThrowOnError extends boolean = false>(options: Options<DeprecatedCallData, ThrowOnError>) => (options.client ?? client).post<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/parameters/deprecated', ...options });\n\nexport const callWithParameters = <ThrowOnError extends boolean = false>(options: Options<CallWithParametersData, ThrowOnError>) => (options.client ?? client).post<unknown, unknown, ThrowOnError>({\n    url: '/api/v{api-version}/parameters/{parameterPath}',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options.headers\n    }\n});\n\nexport const callWithWeirdParameterNames = <ThrowOnError extends boolean = false>(options: Options<CallWithWeirdParameterNamesData, ThrowOnError>) => (options.client ?? client).post<unknown, unknown, ThrowOnError>({\n    url: '/api/v{api-version}/parameters/{parameter.path.1}/{parameter-path-2}/{PARAMETER-PATH-3}',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options.headers\n    }\n});\n\nexport const getCallWithOptionalParam = <ThrowOnError extends boolean = false>(options: Options<GetCallWithOptionalParamData, ThrowOnError>) => (options.client ?? client).get<unknown, unknown, ThrowOnError>({\n    url: '/api/v{api-version}/parameters',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options.headers\n    }\n});\n\nexport const postCallWithOptionalParam = <ThrowOnError extends boolean = false>(options: Options<PostCallWithOptionalParamData, ThrowOnError>) => (options.client ?? client).post<PostCallWithOptionalParamResponses, unknown, ThrowOnError>({\n    url: '/api/v{api-version}/parameters',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options.headers\n    }\n});\n\nexport const postApiVbyApiVersionRequestBody = <ThrowOnError extends boolean = false>(options?: Options<PostApiVbyApiVersionRequestBodyData, ThrowOnError>) => (options?.client ?? client).post<unknown, unknown, ThrowOnError>({\n    url: '/api/v{api-version}/requestBody',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options?.headers\n    }\n});\n\nexport const postApiVbyApiVersionFormData = <ThrowOnError extends boolean = false>(options?: Options<PostApiVbyApiVersionFormDataData, ThrowOnError>) => (options?.client ?? client).post<unknown, unknown, ThrowOnError>({\n    ...formDataBodySerializer,\n    url: '/api/v{api-version}/formData',\n    ...options,\n    headers: {\n        'Content-Type': null,\n        ...options?.headers\n    }\n});\n\nexport const callWithDefaultParameters = <ThrowOnError extends boolean = false>(options?: Options<CallWithDefaultParametersData, ThrowOnError>) => (options?.client ?? client).get<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/defaults', ...options });\n\nexport const callWithDefaultOptionalParameters = <ThrowOnError extends boolean = false>(options?: Options<CallWithDefaultOptionalParametersData, ThrowOnError>) => (options?.client ?? client).post<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/defaults', ...options });\n\nexport const callToTestOrderOfParams = <ThrowOnError extends boolean = false>(options: Options<CallToTestOrderOfParamsData, ThrowOnError>) => (options.client ?? client).put<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/defaults', ...options });\n\nexport const duplicateName = <ThrowOnError extends boolean = false>(options?: Options<DuplicateNameData, ThrowOnError>) => (options?.client ?? client).delete<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/duplicate', ...options });\n\nexport const duplicateName2 = <ThrowOnError extends boolean = false>(options?: Options<DuplicateName2Data, ThrowOnError>) => (options?.client ?? client).get<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/duplicate', ...options });\n\nexport const duplicateName3 = <ThrowOnError extends boolean = false>(options?: Options<DuplicateName3Data, ThrowOnError>) => (options?.client ?? client).post<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/duplicate', ...options });\n\nexport const duplicateName4 = <ThrowOnError extends boolean = false>(options?: Options<DuplicateName4Data, ThrowOnError>) => (options?.client ?? client).put<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/duplicate', ...options });\n\nexport const callWithNoContentResponse = <ThrowOnError extends boolean = false>(options?: Options<CallWithNoContentResponseData, ThrowOnError>) => (options?.client ?? client).get<CallWithNoContentResponseResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/no-content', ...options });\n\nexport const callWithResponseAndNoContentResponse = <ThrowOnError extends boolean = false>(options?: Options<CallWithResponseAndNoContentResponseData, ThrowOnError>) => (options?.client ?? client).get<CallWithResponseAndNoContentResponseResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/multiple-tags/response-and-no-content', ...options });\n\nexport const dummyA = <ThrowOnError extends boolean = false>(options?: Options<DummyAData, ThrowOnError>) => (options?.client ?? client).get<DummyAResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/multiple-tags/a', ...options });\n\nexport const dummyB = <ThrowOnError extends boolean = false>(options?: Options<DummyBData, ThrowOnError>) => (options?.client ?? client).get<DummyBResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/multiple-tags/b', ...options });\n\nexport const callWithResponse = <ThrowOnError extends boolean = false>(options?: Options<CallWithResponseData, ThrowOnError>) => (options?.client ?? client).get<CallWithResponseResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/response', ...options });\n\nexport const callWithDuplicateResponses = <ThrowOnError extends boolean = false>(options?: Options<CallWithDuplicateResponsesData, ThrowOnError>) => (options?.client ?? client).post<CallWithDuplicateResponsesResponses, CallWithDuplicateResponsesErrors, ThrowOnError>({ url: '/api/v{api-version}/response', ...options });\n\nexport const callWithResponses = <ThrowOnError extends boolean = false>(options?: Options<CallWithResponsesData, ThrowOnError>) => (options?.client ?? client).put<CallWithResponsesResponses, CallWithResponsesErrors, ThrowOnError>({ url: '/api/v{api-version}/response', ...options });\n\nexport const collectionFormat = <ThrowOnError extends boolean = false>(options: Options<CollectionFormatData, ThrowOnError>) => (options.client ?? client).get<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/collectionFormat', ...options });\n\nexport const types = <ThrowOnError extends boolean = false>(options: Options<TypesData, ThrowOnError>) => (options.client ?? client).get<TypesResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/types', ...options });\n\nexport const uploadFile = <ThrowOnError extends boolean = false>(options: Options<UploadFileData, ThrowOnError>) => (options.client ?? client).post<UploadFileResponses, unknown, ThrowOnError>({\n    ...urlSearchParamsBodySerializer,\n    url: '/api/v{api-version}/upload',\n    ...options,\n    headers: {\n        'Content-Type': 'application/x-www-form-urlencoded',\n        ...options.headers\n    }\n});\n\nexport const fileResponse = <ThrowOnError extends boolean = false>(options: Options<FileResponseData, ThrowOnError>) => (options.client ?? client).get<FileResponseResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/file/{id}', ...options });\n\nexport const complexTypes = <ThrowOnError extends boolean = false>(options: Options<ComplexTypesData, ThrowOnError>) => (options.client ?? client).get<ComplexTypesResponses, ComplexTypesErrors, ThrowOnError>({\n    querySerializer: { parameters: { parameterObject: { object: { style: 'form' } } } },\n    url: '/api/v{api-version}/complex',\n    ...options\n});\n\nexport const multipartResponse = <ThrowOnError extends boolean = false>(options?: Options<MultipartResponseData, ThrowOnError>) => (options?.client ?? client).get<MultipartResponseResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/multipart', ...options });\n\nexport const multipartRequest = <ThrowOnError extends boolean = false>(options?: Options<MultipartRequestData, ThrowOnError>) => (options?.client ?? client).post<unknown, unknown, ThrowOnError>({\n    ...formDataBodySerializer,\n    url: '/api/v{api-version}/multipart',\n    ...options,\n    headers: {\n        'Content-Type': null,\n        ...options?.headers\n    }\n});\n\nexport const complexParams = <ThrowOnError extends boolean = false>(options: Options<ComplexParamsData, ThrowOnError>) => (options.client ?? client).put<ComplexParamsResponses, unknown, ThrowOnError>({\n    url: '/api/v{api-version}/complex/{id}',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json-patch+json',\n        ...options.headers\n    }\n});\n\nexport const callWithResultFromHeader = <ThrowOnError extends boolean = false>(options?: Options<CallWithResultFromHeaderData, ThrowOnError>) => (options?.client ?? client).post<CallWithResultFromHeaderResponses, CallWithResultFromHeaderErrors, ThrowOnError>({ url: '/api/v{api-version}/header', ...options });\n\nexport const testErrorCode = <ThrowOnError extends boolean = false>(options: Options<TestErrorCodeData, ThrowOnError>) => (options.client ?? client).post<TestErrorCodeResponses, TestErrorCodeErrors, ThrowOnError>({ url: '/api/v{api-version}/error', ...options });\n\nexport const nonAsciiæøåÆøÅöôêÊ字符串 = <ThrowOnError extends boolean = false>(options: Options<NonAsciiæøåÆøÅöôêÊ字符串Data, ThrowOnError>) => (options.client ?? client).post<NonAsciiæøåÆøÅöôêÊ字符串Responses, unknown, ThrowOnError>({ url: '/api/v{api-version}/non-ascii-æøåÆØÅöôêÊ字符串', ...options });\n\n/**\n * Login User\n */\nexport const putWithFormUrlEncoded = <ThrowOnError extends boolean = false>(options: Options<PutWithFormUrlEncodedData, ThrowOnError>) => (options.client ?? client).put<unknown, unknown, ThrowOnError>({\n    ...urlSearchParamsBodySerializer,\n    url: '/api/v{api-version}/non-ascii-æøåÆØÅöôêÊ字符串',\n    ...options,\n    headers: {\n        'Content-Type': 'application/x-www-form-urlencoded',\n        ...options.headers\n    }\n});\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-ofetch/tsconfig-nodenext-sdk/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type ClientOptions = {\n    baseUrl: 'http://localhost:3000/base' | (string & {});\n};\n\n/**\n * Model with number-only name\n */\nexport type _400 = string;\n\n/**\n * External ref to shared model (A)\n */\nexport type ExternalRefA = ExternalSharedModel;\n\n/**\n * External ref to shared model (B)\n */\nexport type ExternalRefB = ExternalSharedModel;\n\n/**\n * Testing multiline comments in string: First line\n * Second line\n *\n * Fourth line\n */\nexport type CamelCaseCommentWithBreaks = number;\n\n/**\n * Testing multiline comments in string: First line\n * Second line\n *\n * Fourth line\n */\nexport type CommentWithBreaks = number;\n\n/**\n * Testing backticks in string: `backticks` and ```multiple backticks``` should work\n */\nexport type CommentWithBackticks = number;\n\n/**\n * Testing backticks and quotes in string: `backticks`, 'quotes', \"double quotes\" and ```multiple backticks``` should work\n */\nexport type CommentWithBackticksAndQuotes = number;\n\n/**\n * Testing slashes in string: \\backwards\\\\\\ and /forwards/// should work\n */\nexport type CommentWithSlashes = number;\n\n/**\n * Testing expression placeholders in string: ${expression} should work\n */\nexport type CommentWithExpressionPlaceholders = number;\n\n/**\n * Testing quotes in string: 'single quote''' and \"double quotes\"\"\" should work\n */\nexport type CommentWithQuotes = number;\n\n/**\n * Testing reserved characters in string: * inline * and ** inline ** should work\n */\nexport type CommentWithReservedCharacters = number;\n\n/**\n * This is a simple number\n */\nexport type SimpleInteger = number;\n\n/**\n * This is a simple boolean\n */\nexport type SimpleBoolean = boolean;\n\n/**\n * This is a simple string\n */\nexport type SimpleString = string;\n\n/**\n * A string with non-ascii (unicode) characters valid in typescript identifiers (æøåÆØÅöÔèÈ字符串)\n */\nexport type NonAsciiStringæøåÆøÅöôêÊ字符串 = string;\n\n/**\n * This is a simple file\n */\nexport type SimpleFile = Blob | File;\n\n/**\n * This is a simple reference\n */\nexport type SimpleReference = ModelWithString;\n\n/**\n * This is a simple string\n */\nexport type SimpleStringWithPattern = string | null;\n\n/**\n * This is a simple enum with strings\n */\nexport type EnumWithStrings = 'Success' | 'Warning' | 'Error' | '\\'Single Quote\\'' | '\"Double Quotes\"' | 'Non-ascii: øæåôöØÆÅÔÖ字符串';\n\nexport type EnumWithReplacedCharacters = '\\'Single Quote\\'' | '\"Double Quotes\"' | 'øæåôöØÆÅÔÖ字符串' | 3.1 | '';\n\n/**\n * This is a simple enum with numbers\n */\nexport type EnumWithNumbers = 1 | 2 | 3 | 1.1 | 1.2 | 1.3 | 100 | 200 | 300 | -100 | -200 | -300 | -1.1 | -1.2 | -1.3;\n\n/**\n * Success=1,Warning=2,Error=3\n */\nexport type EnumFromDescription = number;\n\n/**\n * This is a simple enum with numbers\n */\nexport type EnumWithExtensions = 200 | 400 | 500;\n\nexport type EnumWithXEnumNames = 0 | 1 | 2;\n\n/**\n * This is a simple array with numbers\n */\nexport type ArrayWithNumbers = Array<number>;\n\n/**\n * This is a simple array with booleans\n */\nexport type ArrayWithBooleans = Array<boolean>;\n\n/**\n * This is a simple array with strings\n */\nexport type ArrayWithStrings = Array<string>;\n\n/**\n * This is a simple array with references\n */\nexport type ArrayWithReferences = Array<ModelWithString>;\n\n/**\n * This is a simple array containing an array\n */\nexport type ArrayWithArray = Array<Array<ModelWithString>>;\n\n/**\n * This is a simple array with properties\n */\nexport type ArrayWithProperties = Array<{\n    '16x16'?: CamelCaseCommentWithBreaks;\n    bar?: string;\n}>;\n\n/**\n * This is a simple array with any of properties\n */\nexport type ArrayWithAnyOfProperties = Array<{\n    foo?: string;\n} | {\n    bar?: string;\n}>;\n\nexport type AnyOfAnyAndNull = {\n    data?: unknown | null;\n};\n\n/**\n * This is a simple array with any of properties\n */\nexport type AnyOfArrays = {\n    results?: Array<{\n        foo?: string;\n    } | {\n        bar?: string;\n    }>;\n};\n\n/**\n * This is a string dictionary\n */\nexport type DictionaryWithString = {\n    [key: string]: string;\n};\n\nexport type DictionaryWithPropertiesAndAdditionalProperties = {\n    foo?: number;\n    bar?: boolean;\n    [key: string]: string | number | boolean | undefined;\n};\n\n/**\n * This is a string reference\n */\nexport type DictionaryWithReference = {\n    [key: string]: ModelWithString;\n};\n\n/**\n * This is a complex dictionary\n */\nexport type DictionaryWithArray = {\n    [key: string]: Array<ModelWithString>;\n};\n\n/**\n * This is a string dictionary\n */\nexport type DictionaryWithDictionary = {\n    [key: string]: {\n        [key: string]: string;\n    };\n};\n\n/**\n * This is a complex dictionary\n */\nexport type DictionaryWithProperties = {\n    [key: string]: {\n        foo?: string;\n        bar?: string;\n    };\n};\n\n/**\n * This is a model with one number property\n */\nexport type ModelWithInteger = {\n    /**\n     * This is a simple number property\n     */\n    prop?: number;\n};\n\n/**\n * This is a model with one boolean property\n */\nexport type ModelWithBoolean = {\n    /**\n     * This is a simple boolean property\n     */\n    prop?: boolean;\n};\n\n/**\n * This is a model with one string property\n */\nexport type ModelWithString = {\n    /**\n     * This is a simple string property\n     */\n    prop?: string;\n};\n\n/**\n * This is a model with one string property\n */\nexport type ModelWithStringError = {\n    /**\n     * This is a simple string property\n     */\n    prop?: string;\n};\n\n/**\n * `Comment` or `VoiceComment`. The JSON object for adding voice comments to tickets is different. See [Adding voice comments to tickets](/documentation/ticketing/managing-tickets/adding-voice-comments-to-tickets)\n */\nexport type ModelFromZendesk = string;\n\n/**\n * This is a model with one string property\n */\nexport type ModelWithNullableString = {\n    /**\n     * This is a simple string property\n     */\n    nullableProp1?: string | null;\n    /**\n     * This is a simple string property\n     */\n    nullableRequiredProp1: string | null;\n    /**\n     * This is a simple string property\n     */\n    nullableProp2?: string | null;\n    /**\n     * This is a simple string property\n     */\n    nullableRequiredProp2: string | null;\n    /**\n     * This is a simple enum with strings\n     */\n    'foo_bar-enum'?: 'Success' | 'Warning' | 'Error' | 'ØÆÅ字符串';\n};\n\n/**\n * This is a model with one enum\n */\nexport type ModelWithEnum = {\n    /**\n     * This is a simple enum with strings\n     */\n    'foo_bar-enum'?: 'Success' | 'Warning' | 'Error' | 'ØÆÅ字符串';\n    /**\n     * These are the HTTP error code enums\n     */\n    statusCode?: '100' | '200 FOO' | '300 FOO_BAR' | '400 foo-bar' | '500 foo.bar' | '600 foo&bar';\n    /**\n     * Simple boolean enum\n     */\n    bool?: true;\n};\n\n/**\n * This is a model with one enum with escaped name\n */\nexport type ModelWithEnumWithHyphen = {\n    /**\n     * Foo-Bar-Baz-Qux\n     */\n    'foo-bar-baz-qux'?: '3.0';\n};\n\n/**\n * This is a model with one enum\n */\nexport type ModelWithEnumFromDescription = {\n    /**\n     * Success=1,Warning=2,Error=3\n     */\n    test?: number;\n};\n\n/**\n * This is a model with nested enums\n */\nexport type ModelWithNestedEnums = {\n    dictionaryWithEnum?: {\n        [key: string]: 'Success' | 'Warning' | 'Error';\n    };\n    dictionaryWithEnumFromDescription?: {\n        [key: string]: number;\n    };\n    arrayWithEnum?: Array<'Success' | 'Warning' | 'Error'>;\n    arrayWithDescription?: Array<number>;\n    /**\n     * This is a simple enum with strings\n     */\n    'foo_bar-enum'?: 'Success' | 'Warning' | 'Error' | 'ØÆÅ字符串';\n};\n\n/**\n * This is a model with one property containing a reference\n */\nexport type ModelWithReference = {\n    prop?: ModelWithProperties;\n};\n\n/**\n * This is a model with one property containing an array\n */\nexport type ModelWithArrayReadOnlyAndWriteOnly = {\n    prop?: Array<ModelWithReadOnlyAndWriteOnly>;\n    propWithFile?: Array<Blob | File>;\n    propWithNumber?: Array<number>;\n};\n\n/**\n * This is a model with one property containing an array\n */\nexport type ModelWithArray = {\n    prop?: Array<ModelWithString>;\n    propWithFile?: Array<Blob | File>;\n    propWithNumber?: Array<number>;\n};\n\n/**\n * This is a model with one property containing a dictionary\n */\nexport type ModelWithDictionary = {\n    prop?: {\n        [key: string]: string;\n    };\n};\n\n/**\n * This is a deprecated model with a deprecated property\n *\n * @deprecated\n */\nexport type DeprecatedModel = {\n    /**\n     * This is a deprecated property\n     *\n     * @deprecated\n     */\n    prop?: string;\n};\n\n/**\n * This is a model with one property containing a circular reference\n */\nexport type ModelWithCircularReference = {\n    prop?: ModelWithCircularReference;\n};\n\n/**\n * This is a model with one property with a 'one of' relationship\n */\nexport type CompositionWithOneOf = {\n    propA?: ModelWithString | ModelWithEnum | ModelWithArray | ModelWithDictionary;\n};\n\n/**\n * This is a model with one property with a 'one of' relationship where the options are not $ref\n */\nexport type CompositionWithOneOfAnonymous = {\n    propA?: {\n        propA?: string;\n    } | string | number;\n};\n\n/**\n * Circle\n */\nexport type ModelCircle = {\n    kind: string;\n    radius?: number;\n};\n\n/**\n * Square\n */\nexport type ModelSquare = {\n    kind: string;\n    sideLength?: number;\n};\n\n/**\n * This is a model with one property with a 'one of' relationship where the options are not $ref\n */\nexport type CompositionWithOneOfDiscriminator = ({\n    kind: 'circle';\n} & ModelCircle) | ({\n    kind: 'square';\n} & ModelSquare);\n\n/**\n * This is a model with one property with a 'any of' relationship\n */\nexport type CompositionWithAnyOf = {\n    propA?: ModelWithString | ModelWithEnum | ModelWithArray | ModelWithDictionary;\n};\n\n/**\n * This is a model with one property with a 'any of' relationship where the options are not $ref\n */\nexport type CompositionWithAnyOfAnonymous = {\n    propA?: {\n        propA?: string;\n    } | string | number;\n};\n\n/**\n * This is a model with nested 'any of' property with a type null\n */\nexport type CompositionWithNestedAnyAndTypeNull = {\n    propA?: Array<ModelWithDictionary | null> | Array<ModelWithArray | null>;\n};\n\nexport type _3eNum1Период = 'Bird' | 'Dog';\n\nexport type ConstValue = 'ConstValue';\n\n/**\n * This is a model with one property with a 'any of' relationship where the options are not $ref\n */\nexport type CompositionWithNestedAnyOfAndNull = {\n    /**\n     * Scopes\n     */\n    propA?: Array<_3eNum1Период | ConstValue> | null;\n};\n\n/**\n * This is a model with one property with a 'one of' relationship\n */\nexport type CompositionWithOneOfAndNullable = {\n    propA?: {\n        boolean?: boolean;\n    } | ModelWithEnum | ModelWithArray | ModelWithDictionary | null;\n};\n\n/**\n * This is a model that contains a simple dictionary within composition\n */\nexport type CompositionWithOneOfAndSimpleDictionary = {\n    propA?: boolean | {\n        [key: string]: number;\n    };\n};\n\n/**\n * This is a model that contains a dictionary of simple arrays within composition\n */\nexport type CompositionWithOneOfAndSimpleArrayDictionary = {\n    propA?: boolean | {\n        [key: string]: Array<boolean>;\n    };\n};\n\n/**\n * This is a model that contains a dictionary of complex arrays (composited) within composition\n */\nexport type CompositionWithOneOfAndComplexArrayDictionary = {\n    propA?: boolean | {\n        [key: string]: Array<number | string>;\n    };\n};\n\n/**\n * This is a model with one property with a 'all of' relationship\n */\nexport type CompositionWithAllOfAndNullable = {\n    propA?: ({\n        boolean?: boolean;\n    } & ModelWithEnum & ModelWithArray & ModelWithDictionary) | null;\n};\n\n/**\n * This is a model with one property with a 'any of' relationship\n */\nexport type CompositionWithAnyOfAndNullable = {\n    propA?: {\n        boolean?: boolean;\n    } | ModelWithEnum | ModelWithArray | ModelWithDictionary | null;\n};\n\n/**\n * This is a base model with two simple optional properties\n */\nexport type CompositionBaseModel = {\n    firstName?: string;\n    lastname?: string;\n};\n\n/**\n * This is a model that extends the base model\n */\nexport type CompositionExtendedModel = CompositionBaseModel & {\n    age: number;\n    firstName: string;\n    lastname: string;\n};\n\n/**\n * This is a model with one nested property\n */\nexport type ModelWithProperties = {\n    required: string;\n    readonly requiredAndReadOnly: string;\n    requiredAndNullable: string | null;\n    string?: string;\n    number?: number;\n    boolean?: boolean;\n    reference?: ModelWithString;\n    'property with space'?: string;\n    default?: string;\n    try?: string;\n    readonly '@namespace.string'?: string;\n    readonly '@namespace.integer'?: number;\n};\n\n/**\n * This is a model with one nested property\n */\nexport type ModelWithNestedProperties = {\n    readonly first: {\n        readonly second: {\n            readonly third: string | null;\n        } | null;\n    } | null;\n};\n\n/**\n * This is a model with duplicated properties\n */\nexport type ModelWithDuplicateProperties = {\n    prop?: ModelWithString;\n};\n\n/**\n * This is a model with ordered properties\n */\nexport type ModelWithOrderedProperties = {\n    zebra?: string;\n    apple?: string;\n    hawaii?: string;\n};\n\n/**\n * This is a model with duplicated imports\n */\nexport type ModelWithDuplicateImports = {\n    propA?: ModelWithString;\n    propB?: ModelWithString;\n    propC?: ModelWithString;\n};\n\n/**\n * This is a model that extends another model\n */\nexport type ModelThatExtends = ModelWithString & {\n    propExtendsA?: string;\n    propExtendsB?: ModelWithString;\n};\n\n/**\n * This is a model that extends another model\n */\nexport type ModelThatExtendsExtends = ModelWithString & ModelThatExtends & {\n    propExtendsC?: string;\n    propExtendsD?: ModelWithString;\n};\n\n/**\n * This is a model that contains a some patterns\n */\nexport type ModelWithPattern = {\n    key: string;\n    name: string;\n    readonly enabled?: boolean;\n    readonly modified?: string;\n    id?: string;\n    text?: string;\n    patternWithSingleQuotes?: string;\n    patternWithNewline?: string;\n    patternWithBacktick?: string;\n    patternWithUnicode?: string;\n};\n\nexport type File = {\n    /**\n     * Id\n     */\n    readonly id?: string;\n    /**\n     * Updated at\n     */\n    readonly updated_at?: string;\n    /**\n     * Created at\n     */\n    readonly created_at?: string;\n    /**\n     * Mime\n     */\n    mime: string;\n    /**\n     * File\n     */\n    readonly file?: string;\n};\n\nexport type Default = {\n    name?: string;\n};\n\nexport type Pageable = {\n    page?: number;\n    size?: number;\n    sort?: Array<string>;\n};\n\n/**\n * This is a free-form object without additionalProperties.\n */\nexport type FreeFormObjectWithoutAdditionalProperties = {\n    [key: string]: unknown;\n};\n\n/**\n * This is a free-form object with additionalProperties: true.\n */\nexport type FreeFormObjectWithAdditionalPropertiesEqTrue = {\n    [key: string]: unknown;\n};\n\n/**\n * This is a free-form object with additionalProperties: {}.\n */\nexport type FreeFormObjectWithAdditionalPropertiesEqEmptyObject = {\n    [key: string]: unknown;\n};\n\nexport type ModelWithConst = {\n    String?: 'String';\n    number?: 0;\n    null?: null;\n    withType?: 'Some string';\n};\n\n/**\n * This is a model with one property and additionalProperties: true\n */\nexport type ModelWithAdditionalPropertiesEqTrue = {\n    /**\n     * This is a simple string property\n     */\n    prop?: string;\n    [key: string]: unknown;\n};\n\nexport type NestedAnyOfArraysNullable = {\n    nullableArray?: Array<string | boolean> | null;\n};\n\nexport type CompositionWithOneOfAndProperties = ({\n    foo: SimpleParameter;\n} | {\n    bar: NonAsciiStringæøåÆøÅöôêÊ字符串;\n}) & {\n    baz: number | null;\n    qux: number;\n};\n\n/**\n * An object that can be null\n */\nexport type NullableObject = {\n    foo?: string;\n} | null;\n\n/**\n * Some % character\n */\nexport type CharactersInDescription = string;\n\nexport type ModelWithNullableObject = {\n    data?: NullableObject;\n};\n\n/**\n * An object with additional properties that can be null (anyOf ref + null)\n */\nexport type ModelWithAdditionalPropertiesRef = {\n    [key: string]: NullableObject | null;\n};\n\nexport type ModelWithOneOfEnum = {\n    foo: 'Bar';\n} | {\n    foo: 'Baz';\n} | {\n    foo: 'Qux';\n} | {\n    content: string;\n    foo: 'Quux';\n} | {\n    content: [\n        string,\n        string\n    ];\n    foo: 'Corge';\n};\n\nexport type ModelWithNestedArrayEnumsDataFoo = 'foo' | 'bar';\n\nexport type ModelWithNestedArrayEnumsDataBar = 'baz' | 'qux';\n\nexport type ModelWithNestedArrayEnumsData = {\n    foo?: Array<ModelWithNestedArrayEnumsDataFoo>;\n    bar?: Array<ModelWithNestedArrayEnumsDataBar>;\n};\n\nexport type ModelWithNestedArrayEnums = {\n    array_strings?: Array<string>;\n    data?: ModelWithNestedArrayEnumsData;\n};\n\nexport type ModelWithNestedCompositionEnums = {\n    foo?: ModelWithNestedArrayEnumsDataFoo;\n};\n\nexport type ModelWithReadOnlyAndWriteOnly = {\n    foo: string;\n    readonly bar: string;\n};\n\nexport type ModelWithConstantSizeArray = [\n    number,\n    number\n];\n\nexport type ModelWithAnyOfConstantSizeArray = [\n    number | string,\n    number | string,\n    number | string\n];\n\nexport type ModelWithPrefixItemsConstantSizeArray = [\n    ModelWithInteger,\n    number | string,\n    string\n];\n\nexport type ModelWithAnyOfConstantSizeArrayNullable = [\n    number | null | string,\n    number | null | string,\n    number | null | string\n];\n\nexport type ModelWithAnyOfConstantSizeArrayWithNSizeAndOptions = [\n    number | Import,\n    number | Import\n];\n\nexport type ModelWithAnyOfConstantSizeArrayAndIntersect = [\n    number & string,\n    number & string\n];\n\nexport type ModelWithNumericEnumUnion = {\n    /**\n     * Период\n     */\n    value?: -10 | -1 | 0 | 1 | 3 | 6 | 12;\n};\n\n/**\n * Some description with `back ticks`\n */\nexport type ModelWithBackticksInDescription = {\n    /**\n     * The template `that` should be used for parsing and importing the contents of the CSV file.\n     *\n     * <br/><p>There is one placeholder currently supported:<ul>     <li><b>${x}</b> - refers to the n-th column in the CSV file, e.g. ${1}, ${2}, ...)</li></ul><p>Example of a correct JSON template:</p>\n     * <pre>\n     * [\n     * {\n     * \"resourceType\": \"Asset\",\n     * \"identifier\": {\n     * \"name\": \"${1}\",\n     * \"domain\": {\n     * \"name\": \"${2}\",\n     * \"community\": {\n     * \"name\": \"Some Community\"\n     * }\n     * }\n     * },\n     * \"attributes\" : {\n     * \"00000000-0000-0000-0000-000000003115\" : [ {\n     * \"value\" : \"${3}\"\n     * } ],\n     * \"00000000-0000-0000-0000-000000000222\" : [ {\n     * \"value\" : \"${4}\"\n     * } ]\n     * }\n     * }\n     * ]\n     * </pre>\n     */\n    template?: string;\n};\n\nexport type ModelWithOneOfAndProperties = (SimpleParameter | NonAsciiStringæøåÆøÅöôêÊ字符串) & {\n    baz: number | null;\n    qux: number;\n};\n\n/**\n * Model used to test deduplication strategy (unused)\n */\nexport type ParameterSimpleParameterUnused = string;\n\n/**\n * Model used to test deduplication strategy\n */\nexport type PostServiceWithEmptyTagResponse = string;\n\n/**\n * Model used to test deduplication strategy\n */\nexport type PostServiceWithEmptyTagResponse2 = string;\n\n/**\n * Model used to test deduplication strategy\n */\nexport type DeleteFooData = string;\n\n/**\n * Model used to test deduplication strategy\n */\nexport type DeleteFooData2 = string;\n\n/**\n * Model with restricted keyword name\n */\nexport type Import = string;\n\nexport type SchemaWithFormRestrictedKeys = {\n    description?: string;\n    'x-enum-descriptions'?: string;\n    'x-enum-varnames'?: string;\n    'x-enumNames'?: string;\n    title?: string;\n    object?: {\n        description?: string;\n        'x-enum-descriptions'?: string;\n        'x-enum-varnames'?: string;\n        'x-enumNames'?: string;\n        title?: string;\n    };\n    array?: Array<{\n        description?: string;\n        'x-enum-descriptions'?: string;\n        'x-enum-varnames'?: string;\n        'x-enumNames'?: string;\n        title?: string;\n    }>;\n};\n\n/**\n * This schema was giving PascalCase transformations a hard time\n */\nexport type IoK8sApimachineryPkgApisMetaV1DeleteOptions = {\n    /**\n     * Must be fulfilled before a deletion is carried out. If not possible, a 409 Conflict status will be returned.\n     */\n    preconditions?: IoK8sApimachineryPkgApisMetaV1Preconditions;\n};\n\n/**\n * This schema was giving PascalCase transformations a hard time\n */\nexport type IoK8sApimachineryPkgApisMetaV1Preconditions = {\n    /**\n     * Specifies the target ResourceVersion\n     */\n    resourceVersion?: string;\n    /**\n     * Specifies the target UID.\n     */\n    uid?: string;\n};\n\nexport type AdditionalPropertiesUnknownIssue = {\n    [key: string]: string | number;\n};\n\nexport type AdditionalPropertiesUnknownIssue2 = {\n    [key: string]: string | number;\n};\n\nexport type AdditionalPropertiesUnknownIssue3 = string & {\n    entries: {\n        [key: string]: AdditionalPropertiesUnknownIssue;\n    };\n};\n\nexport type AdditionalPropertiesIntegerIssue = {\n    value: number;\n    [key: string]: number;\n};\n\nexport type OneOfAllOfIssue = ((ConstValue | GenericSchemaDuplicateIssue1SystemBoolean) & _3eNum1Период) | GenericSchemaDuplicateIssue1SystemString;\n\nexport type GenericSchemaDuplicateIssue1SystemBoolean = {\n    item?: boolean;\n    error?: string | null;\n    readonly hasError?: boolean;\n    data?: {\n        [key: string]: never;\n    };\n};\n\nexport type GenericSchemaDuplicateIssue1SystemString = {\n    item?: string | null;\n    error?: string | null;\n    readonly hasError?: boolean;\n};\n\nexport type ExternalSharedModel = {\n    id: string;\n    name?: string;\n};\n\n/**\n * This is a model with one property containing a reference\n */\nexport type ModelWithReferenceWritable = {\n    prop?: ModelWithPropertiesWritable;\n};\n\n/**\n * This is a model with one property containing an array\n */\nexport type ModelWithArrayReadOnlyAndWriteOnlyWritable = {\n    prop?: Array<ModelWithReadOnlyAndWriteOnlyWritable>;\n    propWithFile?: Array<Blob | File>;\n    propWithNumber?: Array<number>;\n};\n\n/**\n * This is a model with one nested property\n */\nexport type ModelWithPropertiesWritable = {\n    required: string;\n    requiredAndNullable: string | null;\n    string?: string;\n    number?: number;\n    boolean?: boolean;\n    reference?: ModelWithString;\n    'property with space'?: string;\n    default?: string;\n    try?: string;\n};\n\n/**\n * This is a model that contains a some patterns\n */\nexport type ModelWithPatternWritable = {\n    key: string;\n    name: string;\n    id?: string;\n    text?: string;\n    patternWithSingleQuotes?: string;\n    patternWithNewline?: string;\n    patternWithBacktick?: string;\n    patternWithUnicode?: string;\n};\n\nexport type FileWritable = {\n    /**\n     * Mime\n     */\n    mime: string;\n};\n\nexport type ModelWithReadOnlyAndWriteOnlyWritable = {\n    foo: string;\n    baz: string;\n};\n\nexport type ModelWithAnyOfConstantSizeArrayWithNSizeAndOptionsWritable = [\n    number | Import,\n    number | Import\n];\n\nexport type AdditionalPropertiesUnknownIssueWritable = {\n    [key: string]: string | number;\n};\n\nexport type OneOfAllOfIssueWritable = ((ConstValue | GenericSchemaDuplicateIssue1SystemBoolean) & _3eNum1Период) | GenericSchemaDuplicateIssue1SystemString;\n\nexport type GenericSchemaDuplicateIssue1SystemBooleanWritable = {\n    item?: boolean;\n    error?: string | null;\n    data?: {\n        [key: string]: never;\n    };\n};\n\nexport type GenericSchemaDuplicateIssue1SystemStringWritable = {\n    item?: string | null;\n    error?: string | null;\n};\n\n/**\n * This is a reusable parameter\n */\nexport type SimpleParameter = string;\n\n/**\n * Parameter with illegal characters\n */\nexport type XFooBar = ModelWithString;\n\n/**\n * A reusable request body\n */\nexport type SimpleRequestBody = ModelWithString;\n\n/**\n * A reusable request body\n */\nexport type SimpleFormData = ModelWithString;\n\nexport type ExportData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no+tag';\n};\n\nexport type PatchApiVbyApiVersionNoTagData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no+tag';\n};\n\nexport type PatchApiVbyApiVersionNoTagResponses = {\n    /**\n     * OK\n     */\n    default: unknown;\n};\n\nexport type ImportData = {\n    body: ModelWithReadOnlyAndWriteOnlyWritable | ModelWithArrayReadOnlyAndWriteOnlyWritable;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no+tag';\n};\n\nexport type ImportResponses = {\n    /**\n     * Success\n     */\n    200: ModelFromZendesk;\n    /**\n     * Default success response\n     */\n    default: ModelWithReadOnlyAndWriteOnly;\n};\n\nexport type ImportResponse = ImportResponses[keyof ImportResponses];\n\nexport type FooWowData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no+tag';\n};\n\nexport type FooWowResponses = {\n    /**\n     * OK\n     */\n    default: unknown;\n};\n\nexport type ApiVVersionODataControllerCountData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple/$count';\n};\n\nexport type ApiVVersionODataControllerCountResponses = {\n    /**\n     * Success\n     */\n    200: ModelFromZendesk;\n};\n\nexport type ApiVVersionODataControllerCountResponse = ApiVVersionODataControllerCountResponses[keyof ApiVVersionODataControllerCountResponses];\n\nexport type GetApiVbyApiVersionSimpleOperationData = {\n    body?: never;\n    path: {\n        /**\n         * foo in method\n         */\n        foo_param: string;\n    };\n    query?: never;\n    url: '/api/v{api-version}/simple:operation';\n};\n\nexport type GetApiVbyApiVersionSimpleOperationErrors = {\n    /**\n     * Default error response\n     */\n    default: ModelWithBoolean;\n};\n\nexport type GetApiVbyApiVersionSimpleOperationError = GetApiVbyApiVersionSimpleOperationErrors[keyof GetApiVbyApiVersionSimpleOperationErrors];\n\nexport type GetApiVbyApiVersionSimpleOperationResponses = {\n    /**\n     * Response is a simple number\n     */\n    200: number;\n};\n\nexport type GetApiVbyApiVersionSimpleOperationResponse = GetApiVbyApiVersionSimpleOperationResponses[keyof GetApiVbyApiVersionSimpleOperationResponses];\n\nexport type DeleteCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type GetCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type HeadCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type OptionsCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type PatchCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type PostCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type PutCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type DeleteFooData3 = {\n    body?: never;\n    headers: {\n        /**\n         * Parameter with illegal characters\n         */\n        'x-Foo-Bar': ModelWithString;\n    };\n    path: {\n        /**\n         * foo in method\n         */\n        foo_param: string;\n        /**\n         * bar in method\n         */\n        BarParam: string;\n    };\n    query?: never;\n    url: '/api/v{api-version}/foo/{foo_param}/bar/{BarParam}';\n};\n\nexport type CallWithDescriptionsData = {\n    body?: never;\n    path?: never;\n    query?: {\n        /**\n         * Testing multiline comments in string: First line\n         * Second line\n         *\n         * Fourth line\n         */\n        parameterWithBreaks?: string;\n        /**\n         * Testing backticks in string: `backticks` and ```multiple backticks``` should work\n         */\n        parameterWithBackticks?: string;\n        /**\n         * Testing slashes in string: \\backwards\\\\\\ and /forwards/// should work\n         */\n        parameterWithSlashes?: string;\n        /**\n         * Testing expression placeholders in string: ${expression} should work\n         */\n        parameterWithExpressionPlaceholders?: string;\n        /**\n         * Testing quotes in string: 'single quote''' and \"double quotes\"\"\" should work\n         */\n        parameterWithQuotes?: string;\n        /**\n         * Testing reserved characters in string: * inline * and ** inline ** should work\n         */\n        parameterWithReservedCharacters?: string;\n    };\n    url: '/api/v{api-version}/descriptions';\n};\n\nexport type DeprecatedCallData = {\n    body?: never;\n    headers: {\n        /**\n         * This parameter is deprecated\n         *\n         * @deprecated\n         */\n        parameter: DeprecatedModel | null;\n    };\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/parameters/deprecated';\n};\n\nexport type CallWithParametersData = {\n    /**\n     * This is the parameter that goes into the body\n     */\n    body: {\n        [key: string]: unknown;\n    } | null;\n    headers: {\n        /**\n         * This is the parameter that goes into the header\n         */\n        parameterHeader: string | null;\n    };\n    path: {\n        /**\n         * This is the parameter that goes into the path\n         */\n        parameterPath: string | null;\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string | null;\n    };\n    query: {\n        foo_ref_enum?: ModelWithNestedArrayEnumsDataFoo;\n        foo_all_of_enum: ModelWithNestedArrayEnumsDataFoo;\n        /**\n         * This is the parameter that goes into the query params\n         */\n        cursor: string | null;\n    };\n    url: '/api/v{api-version}/parameters/{parameterPath}';\n};\n\nexport type CallWithWeirdParameterNamesData = {\n    /**\n     * This is the parameter that goes into the body\n     */\n    body: ModelWithString | null;\n    headers: {\n        /**\n         * This is the parameter that goes into the request header\n         */\n        'parameter.header': string | null;\n    };\n    path: {\n        /**\n         * This is the parameter that goes into the path\n         */\n        'parameter.path.1'?: string;\n        /**\n         * This is the parameter that goes into the path\n         */\n        'parameter-path-2'?: string;\n        /**\n         * This is the parameter that goes into the path\n         */\n        'PARAMETER-PATH-3'?: string;\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string | null;\n    };\n    query: {\n        /**\n         * This is the parameter with a reserved keyword\n         */\n        default?: string;\n        /**\n         * This is the parameter that goes into the request query params\n         */\n        'parameter-query': string | null;\n    };\n    url: '/api/v{api-version}/parameters/{parameter.path.1}/{parameter-path-2}/{PARAMETER-PATH-3}';\n};\n\nexport type GetCallWithOptionalParamData = {\n    /**\n     * This is a required parameter\n     */\n    body: ModelWithOneOfEnum;\n    path?: never;\n    query?: {\n        /**\n         * This is an optional parameter\n         */\n        page?: number;\n    };\n    url: '/api/v{api-version}/parameters';\n};\n\nexport type PostCallWithOptionalParamData = {\n    /**\n     * This is an optional parameter\n     */\n    body?: {\n        offset?: number | null;\n    };\n    path?: never;\n    query: {\n        /**\n         * This is a required parameter\n         */\n        parameter: Pageable;\n    };\n    url: '/api/v{api-version}/parameters';\n};\n\nexport type PostCallWithOptionalParamResponses = {\n    /**\n     * Response is a simple number\n     */\n    200: number;\n    /**\n     * Success\n     */\n    204: void;\n};\n\nexport type PostCallWithOptionalParamResponse = PostCallWithOptionalParamResponses[keyof PostCallWithOptionalParamResponses];\n\nexport type PostApiVbyApiVersionRequestBodyData = {\n    /**\n     * A reusable request body\n     */\n    body?: SimpleRequestBody;\n    path?: never;\n    query?: {\n        /**\n         * This is a reusable parameter\n         */\n        parameter?: string;\n    };\n    url: '/api/v{api-version}/requestBody';\n};\n\nexport type PostApiVbyApiVersionFormDataData = {\n    /**\n     * A reusable request body\n     */\n    body?: SimpleFormData;\n    path?: never;\n    query?: {\n        /**\n         * This is a reusable parameter\n         */\n        parameter?: string;\n    };\n    url: '/api/v{api-version}/formData';\n};\n\nexport type CallWithDefaultParametersData = {\n    body?: never;\n    path?: never;\n    query?: {\n        /**\n         * This is a simple string with default value\n         */\n        parameterString?: string | null;\n        /**\n         * This is a simple number with default value\n         */\n        parameterNumber?: number | null;\n        /**\n         * This is a simple boolean with default value\n         */\n        parameterBoolean?: boolean | null;\n        /**\n         * This is a simple enum with default value\n         */\n        parameterEnum?: 'Success' | 'Warning' | 'Error';\n        /**\n         * This is a simple model with default value\n         */\n        parameterModel?: ModelWithString | null;\n    };\n    url: '/api/v{api-version}/defaults';\n};\n\nexport type CallWithDefaultOptionalParametersData = {\n    body?: never;\n    path?: never;\n    query?: {\n        /**\n         * This is a simple string that is optional with default value\n         */\n        parameterString?: string;\n        /**\n         * This is a simple number that is optional with default value\n         */\n        parameterNumber?: number;\n        /**\n         * This is a simple boolean that is optional with default value\n         */\n        parameterBoolean?: boolean;\n        /**\n         * This is a simple enum that is optional with default value\n         */\n        parameterEnum?: 'Success' | 'Warning' | 'Error';\n        /**\n         * This is a simple model that is optional with default value\n         */\n        parameterModel?: ModelWithString;\n    };\n    url: '/api/v{api-version}/defaults';\n};\n\nexport type CallToTestOrderOfParamsData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * This is a optional string with default\n         */\n        parameterOptionalStringWithDefault?: string;\n        /**\n         * This is a optional string with empty default\n         */\n        parameterOptionalStringWithEmptyDefault?: string;\n        /**\n         * This is a optional string with no default\n         */\n        parameterOptionalStringWithNoDefault?: string;\n        /**\n         * This is a string with default\n         */\n        parameterStringWithDefault: string;\n        /**\n         * This is a string with empty default\n         */\n        parameterStringWithEmptyDefault: string;\n        /**\n         * This is a string with no default\n         */\n        parameterStringWithNoDefault: string;\n        /**\n         * This is a string that can be null with no default\n         */\n        parameterStringNullableWithNoDefault?: string | null;\n        /**\n         * This is a string that can be null with default\n         */\n        parameterStringNullableWithDefault?: string | null;\n    };\n    url: '/api/v{api-version}/defaults';\n};\n\nexport type DuplicateNameData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/duplicate';\n};\n\nexport type DuplicateName2Data = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/duplicate';\n};\n\nexport type DuplicateName3Data = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/duplicate';\n};\n\nexport type DuplicateName4Data = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/duplicate';\n};\n\nexport type CallWithNoContentResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no-content';\n};\n\nexport type CallWithNoContentResponseResponses = {\n    /**\n     * Success\n     */\n    204: void;\n};\n\nexport type CallWithNoContentResponseResponse = CallWithNoContentResponseResponses[keyof CallWithNoContentResponseResponses];\n\nexport type CallWithResponseAndNoContentResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multiple-tags/response-and-no-content';\n};\n\nexport type CallWithResponseAndNoContentResponseResponses = {\n    /**\n     * Response is a simple number\n     */\n    200: number;\n    /**\n     * Success\n     */\n    204: void;\n};\n\nexport type CallWithResponseAndNoContentResponseResponse = CallWithResponseAndNoContentResponseResponses[keyof CallWithResponseAndNoContentResponseResponses];\n\nexport type DummyAData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multiple-tags/a';\n};\n\nexport type DummyAResponses = {\n    200: _400;\n};\n\nexport type DummyAResponse = DummyAResponses[keyof DummyAResponses];\n\nexport type DummyBData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multiple-tags/b';\n};\n\nexport type DummyBResponses = {\n    /**\n     * Success\n     */\n    204: void;\n};\n\nexport type DummyBResponse = DummyBResponses[keyof DummyBResponses];\n\nexport type CallWithResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/response';\n};\n\nexport type CallWithResponseResponses = {\n    default: Import;\n};\n\nexport type CallWithResponseResponse = CallWithResponseResponses[keyof CallWithResponseResponses];\n\nexport type CallWithDuplicateResponsesData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/response';\n};\n\nexport type CallWithDuplicateResponsesErrors = {\n    /**\n     * Message for 500 error\n     */\n    500: ModelWithStringError;\n    /**\n     * Message for 501 error\n     */\n    501: ModelWithStringError;\n    /**\n     * Message for 502 error\n     */\n    502: ModelWithStringError;\n    /**\n     * Message for 4XX errors\n     */\n    '4XX': DictionaryWithArray;\n    /**\n     * Default error response\n     */\n    default: ModelWithBoolean;\n};\n\nexport type CallWithDuplicateResponsesError = CallWithDuplicateResponsesErrors[keyof CallWithDuplicateResponsesErrors];\n\nexport type CallWithDuplicateResponsesResponses = {\n    /**\n     * Message for 200 response\n     */\n    200: ModelWithBoolean & ModelWithInteger;\n    /**\n     * Message for 201 response\n     */\n    201: ModelWithString;\n    /**\n     * Message for 202 response\n     */\n    202: ModelWithString;\n};\n\nexport type CallWithDuplicateResponsesResponse = CallWithDuplicateResponsesResponses[keyof CallWithDuplicateResponsesResponses];\n\nexport type CallWithResponsesData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/response';\n};\n\nexport type CallWithResponsesErrors = {\n    /**\n     * Message for 500 error\n     */\n    500: ModelWithStringError;\n    /**\n     * Message for 501 error\n     */\n    501: ModelWithStringError;\n    /**\n     * Message for 502 error\n     */\n    502: ModelWithStringError;\n    /**\n     * Message for default response\n     */\n    default: ModelWithStringError;\n};\n\nexport type CallWithResponsesError = CallWithResponsesErrors[keyof CallWithResponsesErrors];\n\nexport type CallWithResponsesResponses = {\n    /**\n     * Message for 200 response\n     */\n    200: {\n        readonly '@namespace.string'?: string;\n        readonly '@namespace.integer'?: number;\n        readonly value?: Array<ModelWithString>;\n    };\n    /**\n     * Message for 201 response\n     */\n    201: ModelThatExtends;\n    /**\n     * Message for 202 response\n     */\n    202: ModelThatExtendsExtends;\n};\n\nexport type CallWithResponsesResponse = CallWithResponsesResponses[keyof CallWithResponsesResponses];\n\nexport type CollectionFormatData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * This is an array parameter that is sent as csv format (comma-separated values)\n         */\n        parameterArrayCSV: Array<string> | null;\n        /**\n         * This is an array parameter that is sent as ssv format (space-separated values)\n         */\n        parameterArraySSV: Array<string> | null;\n        /**\n         * This is an array parameter that is sent as tsv format (tab-separated values)\n         */\n        parameterArrayTSV: Array<string> | null;\n        /**\n         * This is an array parameter that is sent as pipes format (pipe-separated values)\n         */\n        parameterArrayPipes: Array<string> | null;\n        /**\n         * This is an array parameter that is sent as multi format (multiple parameter instances)\n         */\n        parameterArrayMulti: Array<string> | null;\n    };\n    url: '/api/v{api-version}/collectionFormat';\n};\n\nexport type TypesData = {\n    body?: never;\n    path?: {\n        /**\n         * This is a number parameter\n         */\n        id?: number;\n    };\n    query: {\n        /**\n         * This is a number parameter\n         */\n        parameterNumber: number;\n        /**\n         * This is a string parameter\n         */\n        parameterString: string | null;\n        /**\n         * This is a boolean parameter\n         */\n        parameterBoolean: boolean | null;\n        /**\n         * This is an object parameter\n         */\n        parameterObject: {\n            [key: string]: unknown;\n        } | null;\n        /**\n         * This is an array parameter\n         */\n        parameterArray: Array<string> | null;\n        /**\n         * This is a dictionary parameter\n         */\n        parameterDictionary: {\n            [key: string]: unknown;\n        } | null;\n        /**\n         * This is an enum parameter\n         */\n        parameterEnum: 'Success' | 'Warning' | 'Error' | null;\n    };\n    url: '/api/v{api-version}/types';\n};\n\nexport type TypesResponses = {\n    /**\n     * Response is a simple number\n     */\n    200: number;\n    /**\n     * Response is a simple string\n     */\n    201: string;\n    /**\n     * Response is a simple boolean\n     */\n    202: boolean;\n    /**\n     * Response is a simple object\n     */\n    203: {\n        [key: string]: unknown;\n    };\n};\n\nexport type TypesResponse = TypesResponses[keyof TypesResponses];\n\nexport type UploadFileData = {\n    body: Blob | File;\n    path: {\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string | null;\n    };\n    query?: never;\n    url: '/api/v{api-version}/upload';\n};\n\nexport type UploadFileResponses = {\n    200: boolean;\n};\n\nexport type UploadFileResponse = UploadFileResponses[keyof UploadFileResponses];\n\nexport type FileResponseData = {\n    body?: never;\n    path: {\n        id: string;\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string;\n    };\n    query?: never;\n    url: '/api/v{api-version}/file/{id}';\n};\n\nexport type FileResponseResponses = {\n    /**\n     * Success\n     */\n    200: Blob | File;\n};\n\nexport type FileResponseResponse = FileResponseResponses[keyof FileResponseResponses];\n\nexport type ComplexTypesData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * Parameter containing object\n         */\n        parameterObject: {\n            first?: {\n                second?: {\n                    third?: string;\n                };\n            };\n        };\n        /**\n         * Parameter containing reference\n         */\n        parameterReference: ModelWithString;\n    };\n    url: '/api/v{api-version}/complex';\n};\n\nexport type ComplexTypesErrors = {\n    /**\n     * 400 `server` error\n     */\n    400: unknown;\n    /**\n     * 500 server error\n     */\n    500: unknown;\n};\n\nexport type ComplexTypesResponses = {\n    /**\n     * Successful response\n     */\n    200: Array<ModelWithString>;\n};\n\nexport type ComplexTypesResponse = ComplexTypesResponses[keyof ComplexTypesResponses];\n\nexport type MultipartResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multipart';\n};\n\nexport type MultipartResponseResponses = {\n    /**\n     * OK\n     */\n    200: {\n        file?: Blob | File;\n        metadata?: {\n            foo?: string;\n            bar?: string;\n        };\n    };\n};\n\nexport type MultipartResponseResponse = MultipartResponseResponses[keyof MultipartResponseResponses];\n\nexport type MultipartRequestData = {\n    body?: {\n        content?: Blob | File;\n        data?: ModelWithString | null;\n    };\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multipart';\n};\n\nexport type ComplexParamsData = {\n    body?: {\n        readonly key: string | null;\n        name: string | null;\n        enabled?: boolean;\n        type: 'Monkey' | 'Horse' | 'Bird';\n        listOfModels?: Array<ModelWithString> | null;\n        listOfStrings?: Array<string> | null;\n        parameters: ModelWithString | ModelWithEnum | ModelWithArray | ModelWithDictionary;\n        readonly user?: {\n            readonly id?: number;\n            readonly name?: string | null;\n        };\n    };\n    path: {\n        id: number;\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string;\n    };\n    query?: never;\n    url: '/api/v{api-version}/complex/{id}';\n};\n\nexport type ComplexParamsResponses = {\n    /**\n     * Success\n     */\n    200: ModelWithString;\n};\n\nexport type ComplexParamsResponse = ComplexParamsResponses[keyof ComplexParamsResponses];\n\nexport type CallWithResultFromHeaderData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/header';\n};\n\nexport type CallWithResultFromHeaderErrors = {\n    /**\n     * 400 server error\n     */\n    400: unknown;\n    /**\n     * 500 server error\n     */\n    500: unknown;\n};\n\nexport type CallWithResultFromHeaderResponses = {\n    /**\n     * Successful response\n     */\n    200: unknown;\n};\n\nexport type TestErrorCodeData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * Status code to return\n         */\n        status: number;\n    };\n    url: '/api/v{api-version}/error';\n};\n\nexport type TestErrorCodeErrors = {\n    /**\n     * Custom message: Internal Server Error\n     */\n    500: unknown;\n    /**\n     * Custom message: Not Implemented\n     */\n    501: unknown;\n    /**\n     * Custom message: Bad Gateway\n     */\n    502: unknown;\n    /**\n     * Custom message: Service Unavailable\n     */\n    503: unknown;\n};\n\nexport type TestErrorCodeResponses = {\n    /**\n     * Custom message: Successful response\n     */\n    200: unknown;\n};\n\nexport type NonAsciiæøåÆøÅöôêÊ字符串Data = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * Dummy input param\n         */\n        nonAsciiParamæøåÆØÅöôêÊ: number;\n    };\n    url: '/api/v{api-version}/non-ascii-æøåÆØÅöôêÊ字符串';\n};\n\nexport type NonAsciiæøåÆøÅöôêÊ字符串Responses = {\n    /**\n     * Successful response\n     */\n    200: Array<NonAsciiStringæøåÆøÅöôêÊ字符串>;\n};\n\nexport type NonAsciiæøåÆøÅöôêÊ字符串Response = NonAsciiæøåÆøÅöôêÊ字符串Responses[keyof NonAsciiæøåÆøÅöôêÊ字符串Responses];\n\nexport type PutWithFormUrlEncodedData = {\n    body: ArrayWithStrings;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/non-ascii-æøåÆØÅöôêÊ字符串';\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/client-custom/base-url-false/custom-client.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport { type ClientOptions, type Config, createClient, createConfig } from '@hey-api/custom-client';\n\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>());\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/client-custom/base-url-false/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type { _3eNum1Период, _400, AdditionalPropertiesIntegerIssue, AdditionalPropertiesUnknownIssue, AdditionalPropertiesUnknownIssue2, AdditionalPropertiesUnknownIssue3, AdditionalPropertiesUnknownIssueWritable, AnyOfAnyAndNull, AnyOfArrays, ApiVVersionODataControllerCountData, ApiVVersionODataControllerCountResponse, ApiVVersionODataControllerCountResponses, ArrayWithAnyOfProperties, ArrayWithArray, ArrayWithBooleans, ArrayWithNumbers, ArrayWithProperties, ArrayWithReferences, ArrayWithStrings, CallToTestOrderOfParamsData, CallWithDefaultOptionalParametersData, CallWithDefaultParametersData, CallWithDescriptionsData, CallWithDuplicateResponsesData, CallWithDuplicateResponsesError, CallWithDuplicateResponsesErrors, CallWithDuplicateResponsesResponse, CallWithDuplicateResponsesResponses, CallWithNoContentResponseData, CallWithNoContentResponseResponse, CallWithNoContentResponseResponses, CallWithParametersData, CallWithResponseAndNoContentResponseData, CallWithResponseAndNoContentResponseResponse, CallWithResponseAndNoContentResponseResponses, CallWithResponseData, CallWithResponseResponse, CallWithResponseResponses, CallWithResponsesData, CallWithResponsesError, CallWithResponsesErrors, CallWithResponsesResponse, CallWithResponsesResponses, CallWithResultFromHeaderData, CallWithResultFromHeaderErrors, CallWithResultFromHeaderResponses, CallWithWeirdParameterNamesData, CamelCaseCommentWithBreaks, CharactersInDescription, ClientOptions, CollectionFormatData, CommentWithBackticks, CommentWithBackticksAndQuotes, CommentWithBreaks, CommentWithExpressionPlaceholders, CommentWithQuotes, CommentWithReservedCharacters, CommentWithSlashes, ComplexParamsData, ComplexParamsResponse, ComplexParamsResponses, ComplexTypesData, ComplexTypesErrors, ComplexTypesResponse, ComplexTypesResponses, CompositionBaseModel, CompositionExtendedModel, CompositionWithAllOfAndNullable, CompositionWithAnyOf, CompositionWithAnyOfAndNullable, CompositionWithAnyOfAnonymous, CompositionWithNestedAnyAndTypeNull, CompositionWithNestedAnyOfAndNull, CompositionWithOneOf, CompositionWithOneOfAndComplexArrayDictionary, CompositionWithOneOfAndNullable, CompositionWithOneOfAndProperties, CompositionWithOneOfAndSimpleArrayDictionary, CompositionWithOneOfAndSimpleDictionary, CompositionWithOneOfAnonymous, CompositionWithOneOfDiscriminator, ConstValue, Default, DeleteCallWithoutParametersAndResponseData, DeleteFooData, DeleteFooData2, DeleteFooData3, DeprecatedCallData, DeprecatedModel, DictionaryWithArray, DictionaryWithDictionary, DictionaryWithProperties, DictionaryWithPropertiesAndAdditionalProperties, DictionaryWithReference, DictionaryWithString, DummyAData, DummyAResponse, DummyAResponses, DummyBData, DummyBResponse, DummyBResponses, DuplicateName2Data, DuplicateName3Data, DuplicateName4Data, DuplicateNameData, EnumFromDescription, EnumWithExtensions, EnumWithNumbers, EnumWithReplacedCharacters, EnumWithStrings, EnumWithXEnumNames, ExportData, ExternalRefA, ExternalRefB, ExternalSharedModel, File, FileResponseData, FileResponseResponse, FileResponseResponses, FileWritable, FooWowData, FooWowResponses, FreeFormObjectWithAdditionalPropertiesEqEmptyObject, FreeFormObjectWithAdditionalPropertiesEqTrue, FreeFormObjectWithoutAdditionalProperties, GenericSchemaDuplicateIssue1SystemBoolean, GenericSchemaDuplicateIssue1SystemBooleanWritable, GenericSchemaDuplicateIssue1SystemString, GenericSchemaDuplicateIssue1SystemStringWritable, GetApiVbyApiVersionSimpleOperationData, GetApiVbyApiVersionSimpleOperationError, GetApiVbyApiVersionSimpleOperationErrors, GetApiVbyApiVersionSimpleOperationResponse, GetApiVbyApiVersionSimpleOperationResponses, GetCallWithOptionalParamData, GetCallWithoutParametersAndResponseData, HeadCallWithoutParametersAndResponseData, Import, ImportData, ImportResponse, ImportResponses, IoK8sApimachineryPkgApisMetaV1DeleteOptions, IoK8sApimachineryPkgApisMetaV1Preconditions, ModelCircle, ModelFromZendesk, ModelSquare, ModelThatExtends, ModelThatExtendsExtends, ModelWithAdditionalPropertiesEqTrue, ModelWithAdditionalPropertiesRef, ModelWithAnyOfConstantSizeArray, ModelWithAnyOfConstantSizeArrayAndIntersect, ModelWithAnyOfConstantSizeArrayNullable, ModelWithAnyOfConstantSizeArrayWithNSizeAndOptions, ModelWithAnyOfConstantSizeArrayWithNSizeAndOptionsWritable, ModelWithArray, ModelWithArrayReadOnlyAndWriteOnly, ModelWithArrayReadOnlyAndWriteOnlyWritable, ModelWithBackticksInDescription, ModelWithBoolean, ModelWithCircularReference, ModelWithConst, ModelWithConstantSizeArray, ModelWithDictionary, ModelWithDuplicateImports, ModelWithDuplicateProperties, ModelWithEnum, ModelWithEnumFromDescription, ModelWithEnumWithHyphen, ModelWithInteger, ModelWithNestedArrayEnums, ModelWithNestedArrayEnumsData, ModelWithNestedArrayEnumsDataBar, ModelWithNestedArrayEnumsDataFoo, ModelWithNestedCompositionEnums, ModelWithNestedEnums, ModelWithNestedProperties, ModelWithNullableObject, ModelWithNullableString, ModelWithNumericEnumUnion, ModelWithOneOfAndProperties, ModelWithOneOfEnum, ModelWithOrderedProperties, ModelWithPattern, ModelWithPatternWritable, ModelWithPrefixItemsConstantSizeArray, ModelWithProperties, ModelWithPropertiesWritable, ModelWithReadOnlyAndWriteOnly, ModelWithReadOnlyAndWriteOnlyWritable, ModelWithReference, ModelWithReferenceWritable, ModelWithString, ModelWithStringError, MultipartRequestData, MultipartResponseData, MultipartResponseResponse, MultipartResponseResponses, NestedAnyOfArraysNullable, NonAsciiæøåÆøÅöôêÊ字符串Data, NonAsciiæøåÆøÅöôêÊ字符串Response, NonAsciiæøåÆøÅöôêÊ字符串Responses, NonAsciiStringæøåÆøÅöôêÊ字符串, NullableObject, OneOfAllOfIssue, OneOfAllOfIssueWritable, OptionsCallWithoutParametersAndResponseData, Pageable, ParameterSimpleParameterUnused, PatchApiVbyApiVersionNoTagData, PatchApiVbyApiVersionNoTagResponses, PatchCallWithoutParametersAndResponseData, PostApiVbyApiVersionFormDataData, PostApiVbyApiVersionRequestBodyData, PostCallWithOptionalParamData, PostCallWithOptionalParamResponse, PostCallWithOptionalParamResponses, PostCallWithoutParametersAndResponseData, PostServiceWithEmptyTagResponse, PostServiceWithEmptyTagResponse2, PutCallWithoutParametersAndResponseData, PutWithFormUrlEncodedData, SchemaWithFormRestrictedKeys, SimpleBoolean, SimpleFile, SimpleFormData, SimpleInteger, SimpleParameter, SimpleReference, SimpleRequestBody, SimpleString, SimpleStringWithPattern, TestErrorCodeData, TestErrorCodeErrors, TestErrorCodeResponses, TypesData, TypesResponse, TypesResponses, UploadFileData, UploadFileResponse, UploadFileResponses, XFooBar } from './types.gen';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/client-custom/base-url-false/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type ClientOptions = {\n    baseUrl: 'http://localhost:3000/base' | (string & {});\n};\n\n/**\n * Model with number-only name\n */\nexport type _400 = string;\n\n/**\n * External ref to shared model (A)\n */\nexport type ExternalRefA = ExternalSharedModel;\n\n/**\n * External ref to shared model (B)\n */\nexport type ExternalRefB = ExternalSharedModel;\n\n/**\n * Testing multiline comments in string: First line\n * Second line\n *\n * Fourth line\n */\nexport type CamelCaseCommentWithBreaks = number;\n\n/**\n * Testing multiline comments in string: First line\n * Second line\n *\n * Fourth line\n */\nexport type CommentWithBreaks = number;\n\n/**\n * Testing backticks in string: `backticks` and ```multiple backticks``` should work\n */\nexport type CommentWithBackticks = number;\n\n/**\n * Testing backticks and quotes in string: `backticks`, 'quotes', \"double quotes\" and ```multiple backticks``` should work\n */\nexport type CommentWithBackticksAndQuotes = number;\n\n/**\n * Testing slashes in string: \\backwards\\\\\\ and /forwards/// should work\n */\nexport type CommentWithSlashes = number;\n\n/**\n * Testing expression placeholders in string: ${expression} should work\n */\nexport type CommentWithExpressionPlaceholders = number;\n\n/**\n * Testing quotes in string: 'single quote''' and \"double quotes\"\"\" should work\n */\nexport type CommentWithQuotes = number;\n\n/**\n * Testing reserved characters in string: * inline * and ** inline ** should work\n */\nexport type CommentWithReservedCharacters = number;\n\n/**\n * This is a simple number\n */\nexport type SimpleInteger = number;\n\n/**\n * This is a simple boolean\n */\nexport type SimpleBoolean = boolean;\n\n/**\n * This is a simple string\n */\nexport type SimpleString = string;\n\n/**\n * A string with non-ascii (unicode) characters valid in typescript identifiers (æøåÆØÅöÔèÈ字符串)\n */\nexport type NonAsciiStringæøåÆøÅöôêÊ字符串 = string;\n\n/**\n * This is a simple file\n */\nexport type SimpleFile = Blob | File;\n\n/**\n * This is a simple reference\n */\nexport type SimpleReference = ModelWithString;\n\n/**\n * This is a simple string\n */\nexport type SimpleStringWithPattern = string | null;\n\n/**\n * This is a simple enum with strings\n */\nexport type EnumWithStrings = 'Success' | 'Warning' | 'Error' | '\\'Single Quote\\'' | '\"Double Quotes\"' | 'Non-ascii: øæåôöØÆÅÔÖ字符串';\n\nexport type EnumWithReplacedCharacters = '\\'Single Quote\\'' | '\"Double Quotes\"' | 'øæåôöØÆÅÔÖ字符串' | 3.1 | '';\n\n/**\n * This is a simple enum with numbers\n */\nexport type EnumWithNumbers = 1 | 2 | 3 | 1.1 | 1.2 | 1.3 | 100 | 200 | 300 | -100 | -200 | -300 | -1.1 | -1.2 | -1.3;\n\n/**\n * Success=1,Warning=2,Error=3\n */\nexport type EnumFromDescription = number;\n\n/**\n * This is a simple enum with numbers\n */\nexport type EnumWithExtensions = 200 | 400 | 500;\n\nexport type EnumWithXEnumNames = 0 | 1 | 2;\n\n/**\n * This is a simple array with numbers\n */\nexport type ArrayWithNumbers = Array<number>;\n\n/**\n * This is a simple array with booleans\n */\nexport type ArrayWithBooleans = Array<boolean>;\n\n/**\n * This is a simple array with strings\n */\nexport type ArrayWithStrings = Array<string>;\n\n/**\n * This is a simple array with references\n */\nexport type ArrayWithReferences = Array<ModelWithString>;\n\n/**\n * This is a simple array containing an array\n */\nexport type ArrayWithArray = Array<Array<ModelWithString>>;\n\n/**\n * This is a simple array with properties\n */\nexport type ArrayWithProperties = Array<{\n    '16x16'?: CamelCaseCommentWithBreaks;\n    bar?: string;\n}>;\n\n/**\n * This is a simple array with any of properties\n */\nexport type ArrayWithAnyOfProperties = Array<{\n    foo?: string;\n} | {\n    bar?: string;\n}>;\n\nexport type AnyOfAnyAndNull = {\n    data?: unknown | null;\n};\n\n/**\n * This is a simple array with any of properties\n */\nexport type AnyOfArrays = {\n    results?: Array<{\n        foo?: string;\n    } | {\n        bar?: string;\n    }>;\n};\n\n/**\n * This is a string dictionary\n */\nexport type DictionaryWithString = {\n    [key: string]: string;\n};\n\nexport type DictionaryWithPropertiesAndAdditionalProperties = {\n    foo?: number;\n    bar?: boolean;\n    [key: string]: string | number | boolean | undefined;\n};\n\n/**\n * This is a string reference\n */\nexport type DictionaryWithReference = {\n    [key: string]: ModelWithString;\n};\n\n/**\n * This is a complex dictionary\n */\nexport type DictionaryWithArray = {\n    [key: string]: Array<ModelWithString>;\n};\n\n/**\n * This is a string dictionary\n */\nexport type DictionaryWithDictionary = {\n    [key: string]: {\n        [key: string]: string;\n    };\n};\n\n/**\n * This is a complex dictionary\n */\nexport type DictionaryWithProperties = {\n    [key: string]: {\n        foo?: string;\n        bar?: string;\n    };\n};\n\n/**\n * This is a model with one number property\n */\nexport type ModelWithInteger = {\n    /**\n     * This is a simple number property\n     */\n    prop?: number;\n};\n\n/**\n * This is a model with one boolean property\n */\nexport type ModelWithBoolean = {\n    /**\n     * This is a simple boolean property\n     */\n    prop?: boolean;\n};\n\n/**\n * This is a model with one string property\n */\nexport type ModelWithString = {\n    /**\n     * This is a simple string property\n     */\n    prop?: string;\n};\n\n/**\n * This is a model with one string property\n */\nexport type ModelWithStringError = {\n    /**\n     * This is a simple string property\n     */\n    prop?: string;\n};\n\n/**\n * `Comment` or `VoiceComment`. The JSON object for adding voice comments to tickets is different. See [Adding voice comments to tickets](/documentation/ticketing/managing-tickets/adding-voice-comments-to-tickets)\n */\nexport type ModelFromZendesk = string;\n\n/**\n * This is a model with one string property\n */\nexport type ModelWithNullableString = {\n    /**\n     * This is a simple string property\n     */\n    nullableProp1?: string | null;\n    /**\n     * This is a simple string property\n     */\n    nullableRequiredProp1: string | null;\n    /**\n     * This is a simple string property\n     */\n    nullableProp2?: string | null;\n    /**\n     * This is a simple string property\n     */\n    nullableRequiredProp2: string | null;\n    /**\n     * This is a simple enum with strings\n     */\n    'foo_bar-enum'?: 'Success' | 'Warning' | 'Error' | 'ØÆÅ字符串';\n};\n\n/**\n * This is a model with one enum\n */\nexport type ModelWithEnum = {\n    /**\n     * This is a simple enum with strings\n     */\n    'foo_bar-enum'?: 'Success' | 'Warning' | 'Error' | 'ØÆÅ字符串';\n    /**\n     * These are the HTTP error code enums\n     */\n    statusCode?: '100' | '200 FOO' | '300 FOO_BAR' | '400 foo-bar' | '500 foo.bar' | '600 foo&bar';\n    /**\n     * Simple boolean enum\n     */\n    bool?: true;\n};\n\n/**\n * This is a model with one enum with escaped name\n */\nexport type ModelWithEnumWithHyphen = {\n    /**\n     * Foo-Bar-Baz-Qux\n     */\n    'foo-bar-baz-qux'?: '3.0';\n};\n\n/**\n * This is a model with one enum\n */\nexport type ModelWithEnumFromDescription = {\n    /**\n     * Success=1,Warning=2,Error=3\n     */\n    test?: number;\n};\n\n/**\n * This is a model with nested enums\n */\nexport type ModelWithNestedEnums = {\n    dictionaryWithEnum?: {\n        [key: string]: 'Success' | 'Warning' | 'Error';\n    };\n    dictionaryWithEnumFromDescription?: {\n        [key: string]: number;\n    };\n    arrayWithEnum?: Array<'Success' | 'Warning' | 'Error'>;\n    arrayWithDescription?: Array<number>;\n    /**\n     * This is a simple enum with strings\n     */\n    'foo_bar-enum'?: 'Success' | 'Warning' | 'Error' | 'ØÆÅ字符串';\n};\n\n/**\n * This is a model with one property containing a reference\n */\nexport type ModelWithReference = {\n    prop?: ModelWithProperties;\n};\n\n/**\n * This is a model with one property containing an array\n */\nexport type ModelWithArrayReadOnlyAndWriteOnly = {\n    prop?: Array<ModelWithReadOnlyAndWriteOnly>;\n    propWithFile?: Array<Blob | File>;\n    propWithNumber?: Array<number>;\n};\n\n/**\n * This is a model with one property containing an array\n */\nexport type ModelWithArray = {\n    prop?: Array<ModelWithString>;\n    propWithFile?: Array<Blob | File>;\n    propWithNumber?: Array<number>;\n};\n\n/**\n * This is a model with one property containing a dictionary\n */\nexport type ModelWithDictionary = {\n    prop?: {\n        [key: string]: string;\n    };\n};\n\n/**\n * This is a deprecated model with a deprecated property\n *\n * @deprecated\n */\nexport type DeprecatedModel = {\n    /**\n     * This is a deprecated property\n     *\n     * @deprecated\n     */\n    prop?: string;\n};\n\n/**\n * This is a model with one property containing a circular reference\n */\nexport type ModelWithCircularReference = {\n    prop?: ModelWithCircularReference;\n};\n\n/**\n * This is a model with one property with a 'one of' relationship\n */\nexport type CompositionWithOneOf = {\n    propA?: ModelWithString | ModelWithEnum | ModelWithArray | ModelWithDictionary;\n};\n\n/**\n * This is a model with one property with a 'one of' relationship where the options are not $ref\n */\nexport type CompositionWithOneOfAnonymous = {\n    propA?: {\n        propA?: string;\n    } | string | number;\n};\n\n/**\n * Circle\n */\nexport type ModelCircle = {\n    kind: string;\n    radius?: number;\n};\n\n/**\n * Square\n */\nexport type ModelSquare = {\n    kind: string;\n    sideLength?: number;\n};\n\n/**\n * This is a model with one property with a 'one of' relationship where the options are not $ref\n */\nexport type CompositionWithOneOfDiscriminator = ({\n    kind: 'circle';\n} & ModelCircle) | ({\n    kind: 'square';\n} & ModelSquare);\n\n/**\n * This is a model with one property with a 'any of' relationship\n */\nexport type CompositionWithAnyOf = {\n    propA?: ModelWithString | ModelWithEnum | ModelWithArray | ModelWithDictionary;\n};\n\n/**\n * This is a model with one property with a 'any of' relationship where the options are not $ref\n */\nexport type CompositionWithAnyOfAnonymous = {\n    propA?: {\n        propA?: string;\n    } | string | number;\n};\n\n/**\n * This is a model with nested 'any of' property with a type null\n */\nexport type CompositionWithNestedAnyAndTypeNull = {\n    propA?: Array<ModelWithDictionary | null> | Array<ModelWithArray | null>;\n};\n\nexport type _3eNum1Период = 'Bird' | 'Dog';\n\nexport type ConstValue = 'ConstValue';\n\n/**\n * This is a model with one property with a 'any of' relationship where the options are not $ref\n */\nexport type CompositionWithNestedAnyOfAndNull = {\n    /**\n     * Scopes\n     */\n    propA?: Array<_3eNum1Период | ConstValue> | null;\n};\n\n/**\n * This is a model with one property with a 'one of' relationship\n */\nexport type CompositionWithOneOfAndNullable = {\n    propA?: {\n        boolean?: boolean;\n    } | ModelWithEnum | ModelWithArray | ModelWithDictionary | null;\n};\n\n/**\n * This is a model that contains a simple dictionary within composition\n */\nexport type CompositionWithOneOfAndSimpleDictionary = {\n    propA?: boolean | {\n        [key: string]: number;\n    };\n};\n\n/**\n * This is a model that contains a dictionary of simple arrays within composition\n */\nexport type CompositionWithOneOfAndSimpleArrayDictionary = {\n    propA?: boolean | {\n        [key: string]: Array<boolean>;\n    };\n};\n\n/**\n * This is a model that contains a dictionary of complex arrays (composited) within composition\n */\nexport type CompositionWithOneOfAndComplexArrayDictionary = {\n    propA?: boolean | {\n        [key: string]: Array<number | string>;\n    };\n};\n\n/**\n * This is a model with one property with a 'all of' relationship\n */\nexport type CompositionWithAllOfAndNullable = {\n    propA?: ({\n        boolean?: boolean;\n    } & ModelWithEnum & ModelWithArray & ModelWithDictionary) | null;\n};\n\n/**\n * This is a model with one property with a 'any of' relationship\n */\nexport type CompositionWithAnyOfAndNullable = {\n    propA?: {\n        boolean?: boolean;\n    } | ModelWithEnum | ModelWithArray | ModelWithDictionary | null;\n};\n\n/**\n * This is a base model with two simple optional properties\n */\nexport type CompositionBaseModel = {\n    firstName?: string;\n    lastname?: string;\n};\n\n/**\n * This is a model that extends the base model\n */\nexport type CompositionExtendedModel = CompositionBaseModel & {\n    age: number;\n    firstName: string;\n    lastname: string;\n};\n\n/**\n * This is a model with one nested property\n */\nexport type ModelWithProperties = {\n    required: string;\n    readonly requiredAndReadOnly: string;\n    requiredAndNullable: string | null;\n    string?: string;\n    number?: number;\n    boolean?: boolean;\n    reference?: ModelWithString;\n    'property with space'?: string;\n    default?: string;\n    try?: string;\n    readonly '@namespace.string'?: string;\n    readonly '@namespace.integer'?: number;\n};\n\n/**\n * This is a model with one nested property\n */\nexport type ModelWithNestedProperties = {\n    readonly first: {\n        readonly second: {\n            readonly third: string | null;\n        } | null;\n    } | null;\n};\n\n/**\n * This is a model with duplicated properties\n */\nexport type ModelWithDuplicateProperties = {\n    prop?: ModelWithString;\n};\n\n/**\n * This is a model with ordered properties\n */\nexport type ModelWithOrderedProperties = {\n    zebra?: string;\n    apple?: string;\n    hawaii?: string;\n};\n\n/**\n * This is a model with duplicated imports\n */\nexport type ModelWithDuplicateImports = {\n    propA?: ModelWithString;\n    propB?: ModelWithString;\n    propC?: ModelWithString;\n};\n\n/**\n * This is a model that extends another model\n */\nexport type ModelThatExtends = ModelWithString & {\n    propExtendsA?: string;\n    propExtendsB?: ModelWithString;\n};\n\n/**\n * This is a model that extends another model\n */\nexport type ModelThatExtendsExtends = ModelWithString & ModelThatExtends & {\n    propExtendsC?: string;\n    propExtendsD?: ModelWithString;\n};\n\n/**\n * This is a model that contains a some patterns\n */\nexport type ModelWithPattern = {\n    key: string;\n    name: string;\n    readonly enabled?: boolean;\n    readonly modified?: string;\n    id?: string;\n    text?: string;\n    patternWithSingleQuotes?: string;\n    patternWithNewline?: string;\n    patternWithBacktick?: string;\n    patternWithUnicode?: string;\n};\n\nexport type File = {\n    /**\n     * Id\n     */\n    readonly id?: string;\n    /**\n     * Updated at\n     */\n    readonly updated_at?: string;\n    /**\n     * Created at\n     */\n    readonly created_at?: string;\n    /**\n     * Mime\n     */\n    mime: string;\n    /**\n     * File\n     */\n    readonly file?: string;\n};\n\nexport type Default = {\n    name?: string;\n};\n\nexport type Pageable = {\n    page?: number;\n    size?: number;\n    sort?: Array<string>;\n};\n\n/**\n * This is a free-form object without additionalProperties.\n */\nexport type FreeFormObjectWithoutAdditionalProperties = {\n    [key: string]: unknown;\n};\n\n/**\n * This is a free-form object with additionalProperties: true.\n */\nexport type FreeFormObjectWithAdditionalPropertiesEqTrue = {\n    [key: string]: unknown;\n};\n\n/**\n * This is a free-form object with additionalProperties: {}.\n */\nexport type FreeFormObjectWithAdditionalPropertiesEqEmptyObject = {\n    [key: string]: unknown;\n};\n\nexport type ModelWithConst = {\n    String?: 'String';\n    number?: 0;\n    null?: null;\n    withType?: 'Some string';\n};\n\n/**\n * This is a model with one property and additionalProperties: true\n */\nexport type ModelWithAdditionalPropertiesEqTrue = {\n    /**\n     * This is a simple string property\n     */\n    prop?: string;\n    [key: string]: unknown;\n};\n\nexport type NestedAnyOfArraysNullable = {\n    nullableArray?: Array<string | boolean> | null;\n};\n\nexport type CompositionWithOneOfAndProperties = ({\n    foo: SimpleParameter;\n} | {\n    bar: NonAsciiStringæøåÆøÅöôêÊ字符串;\n}) & {\n    baz: number | null;\n    qux: number;\n};\n\n/**\n * An object that can be null\n */\nexport type NullableObject = {\n    foo?: string;\n} | null;\n\n/**\n * Some % character\n */\nexport type CharactersInDescription = string;\n\nexport type ModelWithNullableObject = {\n    data?: NullableObject;\n};\n\n/**\n * An object with additional properties that can be null (anyOf ref + null)\n */\nexport type ModelWithAdditionalPropertiesRef = {\n    [key: string]: NullableObject | null;\n};\n\nexport type ModelWithOneOfEnum = {\n    foo: 'Bar';\n} | {\n    foo: 'Baz';\n} | {\n    foo: 'Qux';\n} | {\n    content: string;\n    foo: 'Quux';\n} | {\n    content: [\n        string,\n        string\n    ];\n    foo: 'Corge';\n};\n\nexport type ModelWithNestedArrayEnumsDataFoo = 'foo' | 'bar';\n\nexport type ModelWithNestedArrayEnumsDataBar = 'baz' | 'qux';\n\nexport type ModelWithNestedArrayEnumsData = {\n    foo?: Array<ModelWithNestedArrayEnumsDataFoo>;\n    bar?: Array<ModelWithNestedArrayEnumsDataBar>;\n};\n\nexport type ModelWithNestedArrayEnums = {\n    array_strings?: Array<string>;\n    data?: ModelWithNestedArrayEnumsData;\n};\n\nexport type ModelWithNestedCompositionEnums = {\n    foo?: ModelWithNestedArrayEnumsDataFoo;\n};\n\nexport type ModelWithReadOnlyAndWriteOnly = {\n    foo: string;\n    readonly bar: string;\n};\n\nexport type ModelWithConstantSizeArray = [\n    number,\n    number\n];\n\nexport type ModelWithAnyOfConstantSizeArray = [\n    number | string,\n    number | string,\n    number | string\n];\n\nexport type ModelWithPrefixItemsConstantSizeArray = [\n    ModelWithInteger,\n    number | string,\n    string\n];\n\nexport type ModelWithAnyOfConstantSizeArrayNullable = [\n    number | null | string,\n    number | null | string,\n    number | null | string\n];\n\nexport type ModelWithAnyOfConstantSizeArrayWithNSizeAndOptions = [\n    number | Import,\n    number | Import\n];\n\nexport type ModelWithAnyOfConstantSizeArrayAndIntersect = [\n    number & string,\n    number & string\n];\n\nexport type ModelWithNumericEnumUnion = {\n    /**\n     * Период\n     */\n    value?: -10 | -1 | 0 | 1 | 3 | 6 | 12;\n};\n\n/**\n * Some description with `back ticks`\n */\nexport type ModelWithBackticksInDescription = {\n    /**\n     * The template `that` should be used for parsing and importing the contents of the CSV file.\n     *\n     * <br/><p>There is one placeholder currently supported:<ul>     <li><b>${x}</b> - refers to the n-th column in the CSV file, e.g. ${1}, ${2}, ...)</li></ul><p>Example of a correct JSON template:</p>\n     * <pre>\n     * [\n     * {\n     * \"resourceType\": \"Asset\",\n     * \"identifier\": {\n     * \"name\": \"${1}\",\n     * \"domain\": {\n     * \"name\": \"${2}\",\n     * \"community\": {\n     * \"name\": \"Some Community\"\n     * }\n     * }\n     * },\n     * \"attributes\" : {\n     * \"00000000-0000-0000-0000-000000003115\" : [ {\n     * \"value\" : \"${3}\"\n     * } ],\n     * \"00000000-0000-0000-0000-000000000222\" : [ {\n     * \"value\" : \"${4}\"\n     * } ]\n     * }\n     * }\n     * ]\n     * </pre>\n     */\n    template?: string;\n};\n\nexport type ModelWithOneOfAndProperties = (SimpleParameter | NonAsciiStringæøåÆøÅöôêÊ字符串) & {\n    baz: number | null;\n    qux: number;\n};\n\n/**\n * Model used to test deduplication strategy (unused)\n */\nexport type ParameterSimpleParameterUnused = string;\n\n/**\n * Model used to test deduplication strategy\n */\nexport type PostServiceWithEmptyTagResponse = string;\n\n/**\n * Model used to test deduplication strategy\n */\nexport type PostServiceWithEmptyTagResponse2 = string;\n\n/**\n * Model used to test deduplication strategy\n */\nexport type DeleteFooData = string;\n\n/**\n * Model used to test deduplication strategy\n */\nexport type DeleteFooData2 = string;\n\n/**\n * Model with restricted keyword name\n */\nexport type Import = string;\n\nexport type SchemaWithFormRestrictedKeys = {\n    description?: string;\n    'x-enum-descriptions'?: string;\n    'x-enum-varnames'?: string;\n    'x-enumNames'?: string;\n    title?: string;\n    object?: {\n        description?: string;\n        'x-enum-descriptions'?: string;\n        'x-enum-varnames'?: string;\n        'x-enumNames'?: string;\n        title?: string;\n    };\n    array?: Array<{\n        description?: string;\n        'x-enum-descriptions'?: string;\n        'x-enum-varnames'?: string;\n        'x-enumNames'?: string;\n        title?: string;\n    }>;\n};\n\n/**\n * This schema was giving PascalCase transformations a hard time\n */\nexport type IoK8sApimachineryPkgApisMetaV1DeleteOptions = {\n    /**\n     * Must be fulfilled before a deletion is carried out. If not possible, a 409 Conflict status will be returned.\n     */\n    preconditions?: IoK8sApimachineryPkgApisMetaV1Preconditions;\n};\n\n/**\n * This schema was giving PascalCase transformations a hard time\n */\nexport type IoK8sApimachineryPkgApisMetaV1Preconditions = {\n    /**\n     * Specifies the target ResourceVersion\n     */\n    resourceVersion?: string;\n    /**\n     * Specifies the target UID.\n     */\n    uid?: string;\n};\n\nexport type AdditionalPropertiesUnknownIssue = {\n    [key: string]: string | number;\n};\n\nexport type AdditionalPropertiesUnknownIssue2 = {\n    [key: string]: string | number;\n};\n\nexport type AdditionalPropertiesUnknownIssue3 = string & {\n    entries: {\n        [key: string]: AdditionalPropertiesUnknownIssue;\n    };\n};\n\nexport type AdditionalPropertiesIntegerIssue = {\n    value: number;\n    [key: string]: number;\n};\n\nexport type OneOfAllOfIssue = ((ConstValue | GenericSchemaDuplicateIssue1SystemBoolean) & _3eNum1Период) | GenericSchemaDuplicateIssue1SystemString;\n\nexport type GenericSchemaDuplicateIssue1SystemBoolean = {\n    item?: boolean;\n    error?: string | null;\n    readonly hasError?: boolean;\n    data?: {\n        [key: string]: never;\n    };\n};\n\nexport type GenericSchemaDuplicateIssue1SystemString = {\n    item?: string | null;\n    error?: string | null;\n    readonly hasError?: boolean;\n};\n\nexport type ExternalSharedModel = {\n    id: string;\n    name?: string;\n};\n\n/**\n * This is a model with one property containing a reference\n */\nexport type ModelWithReferenceWritable = {\n    prop?: ModelWithPropertiesWritable;\n};\n\n/**\n * This is a model with one property containing an array\n */\nexport type ModelWithArrayReadOnlyAndWriteOnlyWritable = {\n    prop?: Array<ModelWithReadOnlyAndWriteOnlyWritable>;\n    propWithFile?: Array<Blob | File>;\n    propWithNumber?: Array<number>;\n};\n\n/**\n * This is a model with one nested property\n */\nexport type ModelWithPropertiesWritable = {\n    required: string;\n    requiredAndNullable: string | null;\n    string?: string;\n    number?: number;\n    boolean?: boolean;\n    reference?: ModelWithString;\n    'property with space'?: string;\n    default?: string;\n    try?: string;\n};\n\n/**\n * This is a model that contains a some patterns\n */\nexport type ModelWithPatternWritable = {\n    key: string;\n    name: string;\n    id?: string;\n    text?: string;\n    patternWithSingleQuotes?: string;\n    patternWithNewline?: string;\n    patternWithBacktick?: string;\n    patternWithUnicode?: string;\n};\n\nexport type FileWritable = {\n    /**\n     * Mime\n     */\n    mime: string;\n};\n\nexport type ModelWithReadOnlyAndWriteOnlyWritable = {\n    foo: string;\n    baz: string;\n};\n\nexport type ModelWithAnyOfConstantSizeArrayWithNSizeAndOptionsWritable = [\n    number | Import,\n    number | Import\n];\n\nexport type AdditionalPropertiesUnknownIssueWritable = {\n    [key: string]: string | number;\n};\n\nexport type OneOfAllOfIssueWritable = ((ConstValue | GenericSchemaDuplicateIssue1SystemBoolean) & _3eNum1Период) | GenericSchemaDuplicateIssue1SystemString;\n\nexport type GenericSchemaDuplicateIssue1SystemBooleanWritable = {\n    item?: boolean;\n    error?: string | null;\n    data?: {\n        [key: string]: never;\n    };\n};\n\nexport type GenericSchemaDuplicateIssue1SystemStringWritable = {\n    item?: string | null;\n    error?: string | null;\n};\n\n/**\n * This is a reusable parameter\n */\nexport type SimpleParameter = string;\n\n/**\n * Parameter with illegal characters\n */\nexport type XFooBar = ModelWithString;\n\n/**\n * A reusable request body\n */\nexport type SimpleRequestBody = ModelWithString;\n\n/**\n * A reusable request body\n */\nexport type SimpleFormData = ModelWithString;\n\nexport type ExportData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no+tag';\n};\n\nexport type PatchApiVbyApiVersionNoTagData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no+tag';\n};\n\nexport type PatchApiVbyApiVersionNoTagResponses = {\n    /**\n     * OK\n     */\n    default: unknown;\n};\n\nexport type ImportData = {\n    body: ModelWithReadOnlyAndWriteOnlyWritable | ModelWithArrayReadOnlyAndWriteOnlyWritable;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no+tag';\n};\n\nexport type ImportResponses = {\n    /**\n     * Success\n     */\n    200: ModelFromZendesk;\n    /**\n     * Default success response\n     */\n    default: ModelWithReadOnlyAndWriteOnly;\n};\n\nexport type ImportResponse = ImportResponses[keyof ImportResponses];\n\nexport type FooWowData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no+tag';\n};\n\nexport type FooWowResponses = {\n    /**\n     * OK\n     */\n    default: unknown;\n};\n\nexport type ApiVVersionODataControllerCountData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple/$count';\n};\n\nexport type ApiVVersionODataControllerCountResponses = {\n    /**\n     * Success\n     */\n    200: ModelFromZendesk;\n};\n\nexport type ApiVVersionODataControllerCountResponse = ApiVVersionODataControllerCountResponses[keyof ApiVVersionODataControllerCountResponses];\n\nexport type GetApiVbyApiVersionSimpleOperationData = {\n    body?: never;\n    path: {\n        /**\n         * foo in method\n         */\n        foo_param: string;\n    };\n    query?: never;\n    url: '/api/v{api-version}/simple:operation';\n};\n\nexport type GetApiVbyApiVersionSimpleOperationErrors = {\n    /**\n     * Default error response\n     */\n    default: ModelWithBoolean;\n};\n\nexport type GetApiVbyApiVersionSimpleOperationError = GetApiVbyApiVersionSimpleOperationErrors[keyof GetApiVbyApiVersionSimpleOperationErrors];\n\nexport type GetApiVbyApiVersionSimpleOperationResponses = {\n    /**\n     * Response is a simple number\n     */\n    200: number;\n};\n\nexport type GetApiVbyApiVersionSimpleOperationResponse = GetApiVbyApiVersionSimpleOperationResponses[keyof GetApiVbyApiVersionSimpleOperationResponses];\n\nexport type DeleteCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type GetCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type HeadCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type OptionsCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type PatchCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type PostCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type PutCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type DeleteFooData3 = {\n    body?: never;\n    headers: {\n        /**\n         * Parameter with illegal characters\n         */\n        'x-Foo-Bar': ModelWithString;\n    };\n    path: {\n        /**\n         * foo in method\n         */\n        foo_param: string;\n        /**\n         * bar in method\n         */\n        BarParam: string;\n    };\n    query?: never;\n    url: '/api/v{api-version}/foo/{foo_param}/bar/{BarParam}';\n};\n\nexport type CallWithDescriptionsData = {\n    body?: never;\n    path?: never;\n    query?: {\n        /**\n         * Testing multiline comments in string: First line\n         * Second line\n         *\n         * Fourth line\n         */\n        parameterWithBreaks?: string;\n        /**\n         * Testing backticks in string: `backticks` and ```multiple backticks``` should work\n         */\n        parameterWithBackticks?: string;\n        /**\n         * Testing slashes in string: \\backwards\\\\\\ and /forwards/// should work\n         */\n        parameterWithSlashes?: string;\n        /**\n         * Testing expression placeholders in string: ${expression} should work\n         */\n        parameterWithExpressionPlaceholders?: string;\n        /**\n         * Testing quotes in string: 'single quote''' and \"double quotes\"\"\" should work\n         */\n        parameterWithQuotes?: string;\n        /**\n         * Testing reserved characters in string: * inline * and ** inline ** should work\n         */\n        parameterWithReservedCharacters?: string;\n    };\n    url: '/api/v{api-version}/descriptions';\n};\n\nexport type DeprecatedCallData = {\n    body?: never;\n    headers: {\n        /**\n         * This parameter is deprecated\n         *\n         * @deprecated\n         */\n        parameter: DeprecatedModel | null;\n    };\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/parameters/deprecated';\n};\n\nexport type CallWithParametersData = {\n    /**\n     * This is the parameter that goes into the body\n     */\n    body: {\n        [key: string]: unknown;\n    } | null;\n    headers: {\n        /**\n         * This is the parameter that goes into the header\n         */\n        parameterHeader: string | null;\n    };\n    path: {\n        /**\n         * This is the parameter that goes into the path\n         */\n        parameterPath: string | null;\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string | null;\n    };\n    query: {\n        foo_ref_enum?: ModelWithNestedArrayEnumsDataFoo;\n        foo_all_of_enum: ModelWithNestedArrayEnumsDataFoo;\n        /**\n         * This is the parameter that goes into the query params\n         */\n        cursor: string | null;\n    };\n    url: '/api/v{api-version}/parameters/{parameterPath}';\n};\n\nexport type CallWithWeirdParameterNamesData = {\n    /**\n     * This is the parameter that goes into the body\n     */\n    body: ModelWithString | null;\n    headers: {\n        /**\n         * This is the parameter that goes into the request header\n         */\n        'parameter.header': string | null;\n    };\n    path: {\n        /**\n         * This is the parameter that goes into the path\n         */\n        'parameter.path.1'?: string;\n        /**\n         * This is the parameter that goes into the path\n         */\n        'parameter-path-2'?: string;\n        /**\n         * This is the parameter that goes into the path\n         */\n        'PARAMETER-PATH-3'?: string;\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string | null;\n    };\n    query: {\n        /**\n         * This is the parameter with a reserved keyword\n         */\n        default?: string;\n        /**\n         * This is the parameter that goes into the request query params\n         */\n        'parameter-query': string | null;\n    };\n    url: '/api/v{api-version}/parameters/{parameter.path.1}/{parameter-path-2}/{PARAMETER-PATH-3}';\n};\n\nexport type GetCallWithOptionalParamData = {\n    /**\n     * This is a required parameter\n     */\n    body: ModelWithOneOfEnum;\n    path?: never;\n    query?: {\n        /**\n         * This is an optional parameter\n         */\n        page?: number;\n    };\n    url: '/api/v{api-version}/parameters';\n};\n\nexport type PostCallWithOptionalParamData = {\n    /**\n     * This is an optional parameter\n     */\n    body?: {\n        offset?: number | null;\n    };\n    path?: never;\n    query: {\n        /**\n         * This is a required parameter\n         */\n        parameter: Pageable;\n    };\n    url: '/api/v{api-version}/parameters';\n};\n\nexport type PostCallWithOptionalParamResponses = {\n    /**\n     * Response is a simple number\n     */\n    200: number;\n    /**\n     * Success\n     */\n    204: void;\n};\n\nexport type PostCallWithOptionalParamResponse = PostCallWithOptionalParamResponses[keyof PostCallWithOptionalParamResponses];\n\nexport type PostApiVbyApiVersionRequestBodyData = {\n    /**\n     * A reusable request body\n     */\n    body?: SimpleRequestBody;\n    path?: never;\n    query?: {\n        /**\n         * This is a reusable parameter\n         */\n        parameter?: string;\n    };\n    url: '/api/v{api-version}/requestBody';\n};\n\nexport type PostApiVbyApiVersionFormDataData = {\n    /**\n     * A reusable request body\n     */\n    body?: SimpleFormData;\n    path?: never;\n    query?: {\n        /**\n         * This is a reusable parameter\n         */\n        parameter?: string;\n    };\n    url: '/api/v{api-version}/formData';\n};\n\nexport type CallWithDefaultParametersData = {\n    body?: never;\n    path?: never;\n    query?: {\n        /**\n         * This is a simple string with default value\n         */\n        parameterString?: string | null;\n        /**\n         * This is a simple number with default value\n         */\n        parameterNumber?: number | null;\n        /**\n         * This is a simple boolean with default value\n         */\n        parameterBoolean?: boolean | null;\n        /**\n         * This is a simple enum with default value\n         */\n        parameterEnum?: 'Success' | 'Warning' | 'Error';\n        /**\n         * This is a simple model with default value\n         */\n        parameterModel?: ModelWithString | null;\n    };\n    url: '/api/v{api-version}/defaults';\n};\n\nexport type CallWithDefaultOptionalParametersData = {\n    body?: never;\n    path?: never;\n    query?: {\n        /**\n         * This is a simple string that is optional with default value\n         */\n        parameterString?: string;\n        /**\n         * This is a simple number that is optional with default value\n         */\n        parameterNumber?: number;\n        /**\n         * This is a simple boolean that is optional with default value\n         */\n        parameterBoolean?: boolean;\n        /**\n         * This is a simple enum that is optional with default value\n         */\n        parameterEnum?: 'Success' | 'Warning' | 'Error';\n        /**\n         * This is a simple model that is optional with default value\n         */\n        parameterModel?: ModelWithString;\n    };\n    url: '/api/v{api-version}/defaults';\n};\n\nexport type CallToTestOrderOfParamsData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * This is a optional string with default\n         */\n        parameterOptionalStringWithDefault?: string;\n        /**\n         * This is a optional string with empty default\n         */\n        parameterOptionalStringWithEmptyDefault?: string;\n        /**\n         * This is a optional string with no default\n         */\n        parameterOptionalStringWithNoDefault?: string;\n        /**\n         * This is a string with default\n         */\n        parameterStringWithDefault: string;\n        /**\n         * This is a string with empty default\n         */\n        parameterStringWithEmptyDefault: string;\n        /**\n         * This is a string with no default\n         */\n        parameterStringWithNoDefault: string;\n        /**\n         * This is a string that can be null with no default\n         */\n        parameterStringNullableWithNoDefault?: string | null;\n        /**\n         * This is a string that can be null with default\n         */\n        parameterStringNullableWithDefault?: string | null;\n    };\n    url: '/api/v{api-version}/defaults';\n};\n\nexport type DuplicateNameData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/duplicate';\n};\n\nexport type DuplicateName2Data = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/duplicate';\n};\n\nexport type DuplicateName3Data = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/duplicate';\n};\n\nexport type DuplicateName4Data = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/duplicate';\n};\n\nexport type CallWithNoContentResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no-content';\n};\n\nexport type CallWithNoContentResponseResponses = {\n    /**\n     * Success\n     */\n    204: void;\n};\n\nexport type CallWithNoContentResponseResponse = CallWithNoContentResponseResponses[keyof CallWithNoContentResponseResponses];\n\nexport type CallWithResponseAndNoContentResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multiple-tags/response-and-no-content';\n};\n\nexport type CallWithResponseAndNoContentResponseResponses = {\n    /**\n     * Response is a simple number\n     */\n    200: number;\n    /**\n     * Success\n     */\n    204: void;\n};\n\nexport type CallWithResponseAndNoContentResponseResponse = CallWithResponseAndNoContentResponseResponses[keyof CallWithResponseAndNoContentResponseResponses];\n\nexport type DummyAData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multiple-tags/a';\n};\n\nexport type DummyAResponses = {\n    200: _400;\n};\n\nexport type DummyAResponse = DummyAResponses[keyof DummyAResponses];\n\nexport type DummyBData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multiple-tags/b';\n};\n\nexport type DummyBResponses = {\n    /**\n     * Success\n     */\n    204: void;\n};\n\nexport type DummyBResponse = DummyBResponses[keyof DummyBResponses];\n\nexport type CallWithResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/response';\n};\n\nexport type CallWithResponseResponses = {\n    default: Import;\n};\n\nexport type CallWithResponseResponse = CallWithResponseResponses[keyof CallWithResponseResponses];\n\nexport type CallWithDuplicateResponsesData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/response';\n};\n\nexport type CallWithDuplicateResponsesErrors = {\n    /**\n     * Message for 500 error\n     */\n    500: ModelWithStringError;\n    /**\n     * Message for 501 error\n     */\n    501: ModelWithStringError;\n    /**\n     * Message for 502 error\n     */\n    502: ModelWithStringError;\n    /**\n     * Message for 4XX errors\n     */\n    '4XX': DictionaryWithArray;\n    /**\n     * Default error response\n     */\n    default: ModelWithBoolean;\n};\n\nexport type CallWithDuplicateResponsesError = CallWithDuplicateResponsesErrors[keyof CallWithDuplicateResponsesErrors];\n\nexport type CallWithDuplicateResponsesResponses = {\n    /**\n     * Message for 200 response\n     */\n    200: ModelWithBoolean & ModelWithInteger;\n    /**\n     * Message for 201 response\n     */\n    201: ModelWithString;\n    /**\n     * Message for 202 response\n     */\n    202: ModelWithString;\n};\n\nexport type CallWithDuplicateResponsesResponse = CallWithDuplicateResponsesResponses[keyof CallWithDuplicateResponsesResponses];\n\nexport type CallWithResponsesData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/response';\n};\n\nexport type CallWithResponsesErrors = {\n    /**\n     * Message for 500 error\n     */\n    500: ModelWithStringError;\n    /**\n     * Message for 501 error\n     */\n    501: ModelWithStringError;\n    /**\n     * Message for 502 error\n     */\n    502: ModelWithStringError;\n    /**\n     * Message for default response\n     */\n    default: ModelWithStringError;\n};\n\nexport type CallWithResponsesError = CallWithResponsesErrors[keyof CallWithResponsesErrors];\n\nexport type CallWithResponsesResponses = {\n    /**\n     * Message for 200 response\n     */\n    200: {\n        readonly '@namespace.string'?: string;\n        readonly '@namespace.integer'?: number;\n        readonly value?: Array<ModelWithString>;\n    };\n    /**\n     * Message for 201 response\n     */\n    201: ModelThatExtends;\n    /**\n     * Message for 202 response\n     */\n    202: ModelThatExtendsExtends;\n};\n\nexport type CallWithResponsesResponse = CallWithResponsesResponses[keyof CallWithResponsesResponses];\n\nexport type CollectionFormatData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * This is an array parameter that is sent as csv format (comma-separated values)\n         */\n        parameterArrayCSV: Array<string> | null;\n        /**\n         * This is an array parameter that is sent as ssv format (space-separated values)\n         */\n        parameterArraySSV: Array<string> | null;\n        /**\n         * This is an array parameter that is sent as tsv format (tab-separated values)\n         */\n        parameterArrayTSV: Array<string> | null;\n        /**\n         * This is an array parameter that is sent as pipes format (pipe-separated values)\n         */\n        parameterArrayPipes: Array<string> | null;\n        /**\n         * This is an array parameter that is sent as multi format (multiple parameter instances)\n         */\n        parameterArrayMulti: Array<string> | null;\n    };\n    url: '/api/v{api-version}/collectionFormat';\n};\n\nexport type TypesData = {\n    body?: never;\n    path?: {\n        /**\n         * This is a number parameter\n         */\n        id?: number;\n    };\n    query: {\n        /**\n         * This is a number parameter\n         */\n        parameterNumber: number;\n        /**\n         * This is a string parameter\n         */\n        parameterString: string | null;\n        /**\n         * This is a boolean parameter\n         */\n        parameterBoolean: boolean | null;\n        /**\n         * This is an object parameter\n         */\n        parameterObject: {\n            [key: string]: unknown;\n        } | null;\n        /**\n         * This is an array parameter\n         */\n        parameterArray: Array<string> | null;\n        /**\n         * This is a dictionary parameter\n         */\n        parameterDictionary: {\n            [key: string]: unknown;\n        } | null;\n        /**\n         * This is an enum parameter\n         */\n        parameterEnum: 'Success' | 'Warning' | 'Error' | null;\n    };\n    url: '/api/v{api-version}/types';\n};\n\nexport type TypesResponses = {\n    /**\n     * Response is a simple number\n     */\n    200: number;\n    /**\n     * Response is a simple string\n     */\n    201: string;\n    /**\n     * Response is a simple boolean\n     */\n    202: boolean;\n    /**\n     * Response is a simple object\n     */\n    203: {\n        [key: string]: unknown;\n    };\n};\n\nexport type TypesResponse = TypesResponses[keyof TypesResponses];\n\nexport type UploadFileData = {\n    body: Blob | File;\n    path: {\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string | null;\n    };\n    query?: never;\n    url: '/api/v{api-version}/upload';\n};\n\nexport type UploadFileResponses = {\n    200: boolean;\n};\n\nexport type UploadFileResponse = UploadFileResponses[keyof UploadFileResponses];\n\nexport type FileResponseData = {\n    body?: never;\n    path: {\n        id: string;\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string;\n    };\n    query?: never;\n    url: '/api/v{api-version}/file/{id}';\n};\n\nexport type FileResponseResponses = {\n    /**\n     * Success\n     */\n    200: Blob | File;\n};\n\nexport type FileResponseResponse = FileResponseResponses[keyof FileResponseResponses];\n\nexport type ComplexTypesData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * Parameter containing object\n         */\n        parameterObject: {\n            first?: {\n                second?: {\n                    third?: string;\n                };\n            };\n        };\n        /**\n         * Parameter containing reference\n         */\n        parameterReference: ModelWithString;\n    };\n    url: '/api/v{api-version}/complex';\n};\n\nexport type ComplexTypesErrors = {\n    /**\n     * 400 `server` error\n     */\n    400: unknown;\n    /**\n     * 500 server error\n     */\n    500: unknown;\n};\n\nexport type ComplexTypesResponses = {\n    /**\n     * Successful response\n     */\n    200: Array<ModelWithString>;\n};\n\nexport type ComplexTypesResponse = ComplexTypesResponses[keyof ComplexTypesResponses];\n\nexport type MultipartResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multipart';\n};\n\nexport type MultipartResponseResponses = {\n    /**\n     * OK\n     */\n    200: {\n        file?: Blob | File;\n        metadata?: {\n            foo?: string;\n            bar?: string;\n        };\n    };\n};\n\nexport type MultipartResponseResponse = MultipartResponseResponses[keyof MultipartResponseResponses];\n\nexport type MultipartRequestData = {\n    body?: {\n        content?: Blob | File;\n        data?: ModelWithString | null;\n    };\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multipart';\n};\n\nexport type ComplexParamsData = {\n    body?: {\n        readonly key: string | null;\n        name: string | null;\n        enabled?: boolean;\n        type: 'Monkey' | 'Horse' | 'Bird';\n        listOfModels?: Array<ModelWithString> | null;\n        listOfStrings?: Array<string> | null;\n        parameters: ModelWithString | ModelWithEnum | ModelWithArray | ModelWithDictionary;\n        readonly user?: {\n            readonly id?: number;\n            readonly name?: string | null;\n        };\n    };\n    path: {\n        id: number;\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string;\n    };\n    query?: never;\n    url: '/api/v{api-version}/complex/{id}';\n};\n\nexport type ComplexParamsResponses = {\n    /**\n     * Success\n     */\n    200: ModelWithString;\n};\n\nexport type ComplexParamsResponse = ComplexParamsResponses[keyof ComplexParamsResponses];\n\nexport type CallWithResultFromHeaderData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/header';\n};\n\nexport type CallWithResultFromHeaderErrors = {\n    /**\n     * 400 server error\n     */\n    400: unknown;\n    /**\n     * 500 server error\n     */\n    500: unknown;\n};\n\nexport type CallWithResultFromHeaderResponses = {\n    /**\n     * Successful response\n     */\n    200: unknown;\n};\n\nexport type TestErrorCodeData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * Status code to return\n         */\n        status: number;\n    };\n    url: '/api/v{api-version}/error';\n};\n\nexport type TestErrorCodeErrors = {\n    /**\n     * Custom message: Internal Server Error\n     */\n    500: unknown;\n    /**\n     * Custom message: Not Implemented\n     */\n    501: unknown;\n    /**\n     * Custom message: Bad Gateway\n     */\n    502: unknown;\n    /**\n     * Custom message: Service Unavailable\n     */\n    503: unknown;\n};\n\nexport type TestErrorCodeResponses = {\n    /**\n     * Custom message: Successful response\n     */\n    200: unknown;\n};\n\nexport type NonAsciiæøåÆøÅöôêÊ字符串Data = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * Dummy input param\n         */\n        nonAsciiParamæøåÆØÅöôêÊ: number;\n    };\n    url: '/api/v{api-version}/non-ascii-æøåÆØÅöôêÊ字符串';\n};\n\nexport type NonAsciiæøåÆøÅöôêÊ字符串Responses = {\n    /**\n     * Successful response\n     */\n    200: Array<NonAsciiStringæøåÆøÅöôêÊ字符串>;\n};\n\nexport type NonAsciiæøåÆøÅöôêÊ字符串Response = NonAsciiæøåÆøÅöôêÊ字符串Responses[keyof NonAsciiæøåÆøÅöôêÊ字符串Responses];\n\nexport type PutWithFormUrlEncodedData = {\n    body: ArrayWithStrings;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/non-ascii-æøåÆØÅöôêÊ字符串';\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/client-custom/base-url-number/custom-client.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport { type ClientOptions, type Config, createClient, createConfig } from '@hey-api/custom-client';\n\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: 'http://localhost:3000/base' }));\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/client-custom/base-url-number/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type { _3eNum1Период, _400, AdditionalPropertiesIntegerIssue, AdditionalPropertiesUnknownIssue, AdditionalPropertiesUnknownIssue2, AdditionalPropertiesUnknownIssue3, AdditionalPropertiesUnknownIssueWritable, AnyOfAnyAndNull, AnyOfArrays, ApiVVersionODataControllerCountData, ApiVVersionODataControllerCountResponse, ApiVVersionODataControllerCountResponses, ArrayWithAnyOfProperties, ArrayWithArray, ArrayWithBooleans, ArrayWithNumbers, ArrayWithProperties, ArrayWithReferences, ArrayWithStrings, CallToTestOrderOfParamsData, CallWithDefaultOptionalParametersData, CallWithDefaultParametersData, CallWithDescriptionsData, CallWithDuplicateResponsesData, CallWithDuplicateResponsesError, CallWithDuplicateResponsesErrors, CallWithDuplicateResponsesResponse, CallWithDuplicateResponsesResponses, CallWithNoContentResponseData, CallWithNoContentResponseResponse, CallWithNoContentResponseResponses, CallWithParametersData, CallWithResponseAndNoContentResponseData, CallWithResponseAndNoContentResponseResponse, CallWithResponseAndNoContentResponseResponses, CallWithResponseData, CallWithResponseResponse, CallWithResponseResponses, CallWithResponsesData, CallWithResponsesError, CallWithResponsesErrors, CallWithResponsesResponse, CallWithResponsesResponses, CallWithResultFromHeaderData, CallWithResultFromHeaderErrors, CallWithResultFromHeaderResponses, CallWithWeirdParameterNamesData, CamelCaseCommentWithBreaks, CharactersInDescription, ClientOptions, CollectionFormatData, CommentWithBackticks, CommentWithBackticksAndQuotes, CommentWithBreaks, CommentWithExpressionPlaceholders, CommentWithQuotes, CommentWithReservedCharacters, CommentWithSlashes, ComplexParamsData, ComplexParamsResponse, ComplexParamsResponses, ComplexTypesData, ComplexTypesErrors, ComplexTypesResponse, ComplexTypesResponses, CompositionBaseModel, CompositionExtendedModel, CompositionWithAllOfAndNullable, CompositionWithAnyOf, CompositionWithAnyOfAndNullable, CompositionWithAnyOfAnonymous, CompositionWithNestedAnyAndTypeNull, CompositionWithNestedAnyOfAndNull, CompositionWithOneOf, CompositionWithOneOfAndComplexArrayDictionary, CompositionWithOneOfAndNullable, CompositionWithOneOfAndProperties, CompositionWithOneOfAndSimpleArrayDictionary, CompositionWithOneOfAndSimpleDictionary, CompositionWithOneOfAnonymous, CompositionWithOneOfDiscriminator, ConstValue, Default, DeleteCallWithoutParametersAndResponseData, DeleteFooData, DeleteFooData2, DeleteFooData3, DeprecatedCallData, DeprecatedModel, DictionaryWithArray, DictionaryWithDictionary, DictionaryWithProperties, DictionaryWithPropertiesAndAdditionalProperties, DictionaryWithReference, DictionaryWithString, DummyAData, DummyAResponse, DummyAResponses, DummyBData, DummyBResponse, DummyBResponses, DuplicateName2Data, DuplicateName3Data, DuplicateName4Data, DuplicateNameData, EnumFromDescription, EnumWithExtensions, EnumWithNumbers, EnumWithReplacedCharacters, EnumWithStrings, EnumWithXEnumNames, ExportData, ExternalRefA, ExternalRefB, ExternalSharedModel, File, FileResponseData, FileResponseResponse, FileResponseResponses, FileWritable, FooWowData, FooWowResponses, FreeFormObjectWithAdditionalPropertiesEqEmptyObject, FreeFormObjectWithAdditionalPropertiesEqTrue, FreeFormObjectWithoutAdditionalProperties, GenericSchemaDuplicateIssue1SystemBoolean, GenericSchemaDuplicateIssue1SystemBooleanWritable, GenericSchemaDuplicateIssue1SystemString, GenericSchemaDuplicateIssue1SystemStringWritable, GetApiVbyApiVersionSimpleOperationData, GetApiVbyApiVersionSimpleOperationError, GetApiVbyApiVersionSimpleOperationErrors, GetApiVbyApiVersionSimpleOperationResponse, GetApiVbyApiVersionSimpleOperationResponses, GetCallWithOptionalParamData, GetCallWithoutParametersAndResponseData, HeadCallWithoutParametersAndResponseData, Import, ImportData, ImportResponse, ImportResponses, IoK8sApimachineryPkgApisMetaV1DeleteOptions, IoK8sApimachineryPkgApisMetaV1Preconditions, ModelCircle, ModelFromZendesk, ModelSquare, ModelThatExtends, ModelThatExtendsExtends, ModelWithAdditionalPropertiesEqTrue, ModelWithAdditionalPropertiesRef, ModelWithAnyOfConstantSizeArray, ModelWithAnyOfConstantSizeArrayAndIntersect, ModelWithAnyOfConstantSizeArrayNullable, ModelWithAnyOfConstantSizeArrayWithNSizeAndOptions, ModelWithAnyOfConstantSizeArrayWithNSizeAndOptionsWritable, ModelWithArray, ModelWithArrayReadOnlyAndWriteOnly, ModelWithArrayReadOnlyAndWriteOnlyWritable, ModelWithBackticksInDescription, ModelWithBoolean, ModelWithCircularReference, ModelWithConst, ModelWithConstantSizeArray, ModelWithDictionary, ModelWithDuplicateImports, ModelWithDuplicateProperties, ModelWithEnum, ModelWithEnumFromDescription, ModelWithEnumWithHyphen, ModelWithInteger, ModelWithNestedArrayEnums, ModelWithNestedArrayEnumsData, ModelWithNestedArrayEnumsDataBar, ModelWithNestedArrayEnumsDataFoo, ModelWithNestedCompositionEnums, ModelWithNestedEnums, ModelWithNestedProperties, ModelWithNullableObject, ModelWithNullableString, ModelWithNumericEnumUnion, ModelWithOneOfAndProperties, ModelWithOneOfEnum, ModelWithOrderedProperties, ModelWithPattern, ModelWithPatternWritable, ModelWithPrefixItemsConstantSizeArray, ModelWithProperties, ModelWithPropertiesWritable, ModelWithReadOnlyAndWriteOnly, ModelWithReadOnlyAndWriteOnlyWritable, ModelWithReference, ModelWithReferenceWritable, ModelWithString, ModelWithStringError, MultipartRequestData, MultipartResponseData, MultipartResponseResponse, MultipartResponseResponses, NestedAnyOfArraysNullable, NonAsciiæøåÆøÅöôêÊ字符串Data, NonAsciiæøåÆøÅöôêÊ字符串Response, NonAsciiæøåÆøÅöôêÊ字符串Responses, NonAsciiStringæøåÆøÅöôêÊ字符串, NullableObject, OneOfAllOfIssue, OneOfAllOfIssueWritable, OptionsCallWithoutParametersAndResponseData, Pageable, ParameterSimpleParameterUnused, PatchApiVbyApiVersionNoTagData, PatchApiVbyApiVersionNoTagResponses, PatchCallWithoutParametersAndResponseData, PostApiVbyApiVersionFormDataData, PostApiVbyApiVersionRequestBodyData, PostCallWithOptionalParamData, PostCallWithOptionalParamResponse, PostCallWithOptionalParamResponses, PostCallWithoutParametersAndResponseData, PostServiceWithEmptyTagResponse, PostServiceWithEmptyTagResponse2, PutCallWithoutParametersAndResponseData, PutWithFormUrlEncodedData, SchemaWithFormRestrictedKeys, SimpleBoolean, SimpleFile, SimpleFormData, SimpleInteger, SimpleParameter, SimpleReference, SimpleRequestBody, SimpleString, SimpleStringWithPattern, TestErrorCodeData, TestErrorCodeErrors, TestErrorCodeResponses, TypesData, TypesResponse, TypesResponses, UploadFileData, UploadFileResponse, UploadFileResponses, XFooBar } from './types.gen';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/client-custom/base-url-number/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type ClientOptions = {\n    baseUrl: 'http://localhost:3000/base' | (string & {});\n};\n\n/**\n * Model with number-only name\n */\nexport type _400 = string;\n\n/**\n * External ref to shared model (A)\n */\nexport type ExternalRefA = ExternalSharedModel;\n\n/**\n * External ref to shared model (B)\n */\nexport type ExternalRefB = ExternalSharedModel;\n\n/**\n * Testing multiline comments in string: First line\n * Second line\n *\n * Fourth line\n */\nexport type CamelCaseCommentWithBreaks = number;\n\n/**\n * Testing multiline comments in string: First line\n * Second line\n *\n * Fourth line\n */\nexport type CommentWithBreaks = number;\n\n/**\n * Testing backticks in string: `backticks` and ```multiple backticks``` should work\n */\nexport type CommentWithBackticks = number;\n\n/**\n * Testing backticks and quotes in string: `backticks`, 'quotes', \"double quotes\" and ```multiple backticks``` should work\n */\nexport type CommentWithBackticksAndQuotes = number;\n\n/**\n * Testing slashes in string: \\backwards\\\\\\ and /forwards/// should work\n */\nexport type CommentWithSlashes = number;\n\n/**\n * Testing expression placeholders in string: ${expression} should work\n */\nexport type CommentWithExpressionPlaceholders = number;\n\n/**\n * Testing quotes in string: 'single quote''' and \"double quotes\"\"\" should work\n */\nexport type CommentWithQuotes = number;\n\n/**\n * Testing reserved characters in string: * inline * and ** inline ** should work\n */\nexport type CommentWithReservedCharacters = number;\n\n/**\n * This is a simple number\n */\nexport type SimpleInteger = number;\n\n/**\n * This is a simple boolean\n */\nexport type SimpleBoolean = boolean;\n\n/**\n * This is a simple string\n */\nexport type SimpleString = string;\n\n/**\n * A string with non-ascii (unicode) characters valid in typescript identifiers (æøåÆØÅöÔèÈ字符串)\n */\nexport type NonAsciiStringæøåÆøÅöôêÊ字符串 = string;\n\n/**\n * This is a simple file\n */\nexport type SimpleFile = Blob | File;\n\n/**\n * This is a simple reference\n */\nexport type SimpleReference = ModelWithString;\n\n/**\n * This is a simple string\n */\nexport type SimpleStringWithPattern = string | null;\n\n/**\n * This is a simple enum with strings\n */\nexport type EnumWithStrings = 'Success' | 'Warning' | 'Error' | '\\'Single Quote\\'' | '\"Double Quotes\"' | 'Non-ascii: øæåôöØÆÅÔÖ字符串';\n\nexport type EnumWithReplacedCharacters = '\\'Single Quote\\'' | '\"Double Quotes\"' | 'øæåôöØÆÅÔÖ字符串' | 3.1 | '';\n\n/**\n * This is a simple enum with numbers\n */\nexport type EnumWithNumbers = 1 | 2 | 3 | 1.1 | 1.2 | 1.3 | 100 | 200 | 300 | -100 | -200 | -300 | -1.1 | -1.2 | -1.3;\n\n/**\n * Success=1,Warning=2,Error=3\n */\nexport type EnumFromDescription = number;\n\n/**\n * This is a simple enum with numbers\n */\nexport type EnumWithExtensions = 200 | 400 | 500;\n\nexport type EnumWithXEnumNames = 0 | 1 | 2;\n\n/**\n * This is a simple array with numbers\n */\nexport type ArrayWithNumbers = Array<number>;\n\n/**\n * This is a simple array with booleans\n */\nexport type ArrayWithBooleans = Array<boolean>;\n\n/**\n * This is a simple array with strings\n */\nexport type ArrayWithStrings = Array<string>;\n\n/**\n * This is a simple array with references\n */\nexport type ArrayWithReferences = Array<ModelWithString>;\n\n/**\n * This is a simple array containing an array\n */\nexport type ArrayWithArray = Array<Array<ModelWithString>>;\n\n/**\n * This is a simple array with properties\n */\nexport type ArrayWithProperties = Array<{\n    '16x16'?: CamelCaseCommentWithBreaks;\n    bar?: string;\n}>;\n\n/**\n * This is a simple array with any of properties\n */\nexport type ArrayWithAnyOfProperties = Array<{\n    foo?: string;\n} | {\n    bar?: string;\n}>;\n\nexport type AnyOfAnyAndNull = {\n    data?: unknown | null;\n};\n\n/**\n * This is a simple array with any of properties\n */\nexport type AnyOfArrays = {\n    results?: Array<{\n        foo?: string;\n    } | {\n        bar?: string;\n    }>;\n};\n\n/**\n * This is a string dictionary\n */\nexport type DictionaryWithString = {\n    [key: string]: string;\n};\n\nexport type DictionaryWithPropertiesAndAdditionalProperties = {\n    foo?: number;\n    bar?: boolean;\n    [key: string]: string | number | boolean | undefined;\n};\n\n/**\n * This is a string reference\n */\nexport type DictionaryWithReference = {\n    [key: string]: ModelWithString;\n};\n\n/**\n * This is a complex dictionary\n */\nexport type DictionaryWithArray = {\n    [key: string]: Array<ModelWithString>;\n};\n\n/**\n * This is a string dictionary\n */\nexport type DictionaryWithDictionary = {\n    [key: string]: {\n        [key: string]: string;\n    };\n};\n\n/**\n * This is a complex dictionary\n */\nexport type DictionaryWithProperties = {\n    [key: string]: {\n        foo?: string;\n        bar?: string;\n    };\n};\n\n/**\n * This is a model with one number property\n */\nexport type ModelWithInteger = {\n    /**\n     * This is a simple number property\n     */\n    prop?: number;\n};\n\n/**\n * This is a model with one boolean property\n */\nexport type ModelWithBoolean = {\n    /**\n     * This is a simple boolean property\n     */\n    prop?: boolean;\n};\n\n/**\n * This is a model with one string property\n */\nexport type ModelWithString = {\n    /**\n     * This is a simple string property\n     */\n    prop?: string;\n};\n\n/**\n * This is a model with one string property\n */\nexport type ModelWithStringError = {\n    /**\n     * This is a simple string property\n     */\n    prop?: string;\n};\n\n/**\n * `Comment` or `VoiceComment`. The JSON object for adding voice comments to tickets is different. See [Adding voice comments to tickets](/documentation/ticketing/managing-tickets/adding-voice-comments-to-tickets)\n */\nexport type ModelFromZendesk = string;\n\n/**\n * This is a model with one string property\n */\nexport type ModelWithNullableString = {\n    /**\n     * This is a simple string property\n     */\n    nullableProp1?: string | null;\n    /**\n     * This is a simple string property\n     */\n    nullableRequiredProp1: string | null;\n    /**\n     * This is a simple string property\n     */\n    nullableProp2?: string | null;\n    /**\n     * This is a simple string property\n     */\n    nullableRequiredProp2: string | null;\n    /**\n     * This is a simple enum with strings\n     */\n    'foo_bar-enum'?: 'Success' | 'Warning' | 'Error' | 'ØÆÅ字符串';\n};\n\n/**\n * This is a model with one enum\n */\nexport type ModelWithEnum = {\n    /**\n     * This is a simple enum with strings\n     */\n    'foo_bar-enum'?: 'Success' | 'Warning' | 'Error' | 'ØÆÅ字符串';\n    /**\n     * These are the HTTP error code enums\n     */\n    statusCode?: '100' | '200 FOO' | '300 FOO_BAR' | '400 foo-bar' | '500 foo.bar' | '600 foo&bar';\n    /**\n     * Simple boolean enum\n     */\n    bool?: true;\n};\n\n/**\n * This is a model with one enum with escaped name\n */\nexport type ModelWithEnumWithHyphen = {\n    /**\n     * Foo-Bar-Baz-Qux\n     */\n    'foo-bar-baz-qux'?: '3.0';\n};\n\n/**\n * This is a model with one enum\n */\nexport type ModelWithEnumFromDescription = {\n    /**\n     * Success=1,Warning=2,Error=3\n     */\n    test?: number;\n};\n\n/**\n * This is a model with nested enums\n */\nexport type ModelWithNestedEnums = {\n    dictionaryWithEnum?: {\n        [key: string]: 'Success' | 'Warning' | 'Error';\n    };\n    dictionaryWithEnumFromDescription?: {\n        [key: string]: number;\n    };\n    arrayWithEnum?: Array<'Success' | 'Warning' | 'Error'>;\n    arrayWithDescription?: Array<number>;\n    /**\n     * This is a simple enum with strings\n     */\n    'foo_bar-enum'?: 'Success' | 'Warning' | 'Error' | 'ØÆÅ字符串';\n};\n\n/**\n * This is a model with one property containing a reference\n */\nexport type ModelWithReference = {\n    prop?: ModelWithProperties;\n};\n\n/**\n * This is a model with one property containing an array\n */\nexport type ModelWithArrayReadOnlyAndWriteOnly = {\n    prop?: Array<ModelWithReadOnlyAndWriteOnly>;\n    propWithFile?: Array<Blob | File>;\n    propWithNumber?: Array<number>;\n};\n\n/**\n * This is a model with one property containing an array\n */\nexport type ModelWithArray = {\n    prop?: Array<ModelWithString>;\n    propWithFile?: Array<Blob | File>;\n    propWithNumber?: Array<number>;\n};\n\n/**\n * This is a model with one property containing a dictionary\n */\nexport type ModelWithDictionary = {\n    prop?: {\n        [key: string]: string;\n    };\n};\n\n/**\n * This is a deprecated model with a deprecated property\n *\n * @deprecated\n */\nexport type DeprecatedModel = {\n    /**\n     * This is a deprecated property\n     *\n     * @deprecated\n     */\n    prop?: string;\n};\n\n/**\n * This is a model with one property containing a circular reference\n */\nexport type ModelWithCircularReference = {\n    prop?: ModelWithCircularReference;\n};\n\n/**\n * This is a model with one property with a 'one of' relationship\n */\nexport type CompositionWithOneOf = {\n    propA?: ModelWithString | ModelWithEnum | ModelWithArray | ModelWithDictionary;\n};\n\n/**\n * This is a model with one property with a 'one of' relationship where the options are not $ref\n */\nexport type CompositionWithOneOfAnonymous = {\n    propA?: {\n        propA?: string;\n    } | string | number;\n};\n\n/**\n * Circle\n */\nexport type ModelCircle = {\n    kind: string;\n    radius?: number;\n};\n\n/**\n * Square\n */\nexport type ModelSquare = {\n    kind: string;\n    sideLength?: number;\n};\n\n/**\n * This is a model with one property with a 'one of' relationship where the options are not $ref\n */\nexport type CompositionWithOneOfDiscriminator = ({\n    kind: 'circle';\n} & ModelCircle) | ({\n    kind: 'square';\n} & ModelSquare);\n\n/**\n * This is a model with one property with a 'any of' relationship\n */\nexport type CompositionWithAnyOf = {\n    propA?: ModelWithString | ModelWithEnum | ModelWithArray | ModelWithDictionary;\n};\n\n/**\n * This is a model with one property with a 'any of' relationship where the options are not $ref\n */\nexport type CompositionWithAnyOfAnonymous = {\n    propA?: {\n        propA?: string;\n    } | string | number;\n};\n\n/**\n * This is a model with nested 'any of' property with a type null\n */\nexport type CompositionWithNestedAnyAndTypeNull = {\n    propA?: Array<ModelWithDictionary | null> | Array<ModelWithArray | null>;\n};\n\nexport type _3eNum1Период = 'Bird' | 'Dog';\n\nexport type ConstValue = 'ConstValue';\n\n/**\n * This is a model with one property with a 'any of' relationship where the options are not $ref\n */\nexport type CompositionWithNestedAnyOfAndNull = {\n    /**\n     * Scopes\n     */\n    propA?: Array<_3eNum1Период | ConstValue> | null;\n};\n\n/**\n * This is a model with one property with a 'one of' relationship\n */\nexport type CompositionWithOneOfAndNullable = {\n    propA?: {\n        boolean?: boolean;\n    } | ModelWithEnum | ModelWithArray | ModelWithDictionary | null;\n};\n\n/**\n * This is a model that contains a simple dictionary within composition\n */\nexport type CompositionWithOneOfAndSimpleDictionary = {\n    propA?: boolean | {\n        [key: string]: number;\n    };\n};\n\n/**\n * This is a model that contains a dictionary of simple arrays within composition\n */\nexport type CompositionWithOneOfAndSimpleArrayDictionary = {\n    propA?: boolean | {\n        [key: string]: Array<boolean>;\n    };\n};\n\n/**\n * This is a model that contains a dictionary of complex arrays (composited) within composition\n */\nexport type CompositionWithOneOfAndComplexArrayDictionary = {\n    propA?: boolean | {\n        [key: string]: Array<number | string>;\n    };\n};\n\n/**\n * This is a model with one property with a 'all of' relationship\n */\nexport type CompositionWithAllOfAndNullable = {\n    propA?: ({\n        boolean?: boolean;\n    } & ModelWithEnum & ModelWithArray & ModelWithDictionary) | null;\n};\n\n/**\n * This is a model with one property with a 'any of' relationship\n */\nexport type CompositionWithAnyOfAndNullable = {\n    propA?: {\n        boolean?: boolean;\n    } | ModelWithEnum | ModelWithArray | ModelWithDictionary | null;\n};\n\n/**\n * This is a base model with two simple optional properties\n */\nexport type CompositionBaseModel = {\n    firstName?: string;\n    lastname?: string;\n};\n\n/**\n * This is a model that extends the base model\n */\nexport type CompositionExtendedModel = CompositionBaseModel & {\n    age: number;\n    firstName: string;\n    lastname: string;\n};\n\n/**\n * This is a model with one nested property\n */\nexport type ModelWithProperties = {\n    required: string;\n    readonly requiredAndReadOnly: string;\n    requiredAndNullable: string | null;\n    string?: string;\n    number?: number;\n    boolean?: boolean;\n    reference?: ModelWithString;\n    'property with space'?: string;\n    default?: string;\n    try?: string;\n    readonly '@namespace.string'?: string;\n    readonly '@namespace.integer'?: number;\n};\n\n/**\n * This is a model with one nested property\n */\nexport type ModelWithNestedProperties = {\n    readonly first: {\n        readonly second: {\n            readonly third: string | null;\n        } | null;\n    } | null;\n};\n\n/**\n * This is a model with duplicated properties\n */\nexport type ModelWithDuplicateProperties = {\n    prop?: ModelWithString;\n};\n\n/**\n * This is a model with ordered properties\n */\nexport type ModelWithOrderedProperties = {\n    zebra?: string;\n    apple?: string;\n    hawaii?: string;\n};\n\n/**\n * This is a model with duplicated imports\n */\nexport type ModelWithDuplicateImports = {\n    propA?: ModelWithString;\n    propB?: ModelWithString;\n    propC?: ModelWithString;\n};\n\n/**\n * This is a model that extends another model\n */\nexport type ModelThatExtends = ModelWithString & {\n    propExtendsA?: string;\n    propExtendsB?: ModelWithString;\n};\n\n/**\n * This is a model that extends another model\n */\nexport type ModelThatExtendsExtends = ModelWithString & ModelThatExtends & {\n    propExtendsC?: string;\n    propExtendsD?: ModelWithString;\n};\n\n/**\n * This is a model that contains a some patterns\n */\nexport type ModelWithPattern = {\n    key: string;\n    name: string;\n    readonly enabled?: boolean;\n    readonly modified?: string;\n    id?: string;\n    text?: string;\n    patternWithSingleQuotes?: string;\n    patternWithNewline?: string;\n    patternWithBacktick?: string;\n    patternWithUnicode?: string;\n};\n\nexport type File = {\n    /**\n     * Id\n     */\n    readonly id?: string;\n    /**\n     * Updated at\n     */\n    readonly updated_at?: string;\n    /**\n     * Created at\n     */\n    readonly created_at?: string;\n    /**\n     * Mime\n     */\n    mime: string;\n    /**\n     * File\n     */\n    readonly file?: string;\n};\n\nexport type Default = {\n    name?: string;\n};\n\nexport type Pageable = {\n    page?: number;\n    size?: number;\n    sort?: Array<string>;\n};\n\n/**\n * This is a free-form object without additionalProperties.\n */\nexport type FreeFormObjectWithoutAdditionalProperties = {\n    [key: string]: unknown;\n};\n\n/**\n * This is a free-form object with additionalProperties: true.\n */\nexport type FreeFormObjectWithAdditionalPropertiesEqTrue = {\n    [key: string]: unknown;\n};\n\n/**\n * This is a free-form object with additionalProperties: {}.\n */\nexport type FreeFormObjectWithAdditionalPropertiesEqEmptyObject = {\n    [key: string]: unknown;\n};\n\nexport type ModelWithConst = {\n    String?: 'String';\n    number?: 0;\n    null?: null;\n    withType?: 'Some string';\n};\n\n/**\n * This is a model with one property and additionalProperties: true\n */\nexport type ModelWithAdditionalPropertiesEqTrue = {\n    /**\n     * This is a simple string property\n     */\n    prop?: string;\n    [key: string]: unknown;\n};\n\nexport type NestedAnyOfArraysNullable = {\n    nullableArray?: Array<string | boolean> | null;\n};\n\nexport type CompositionWithOneOfAndProperties = ({\n    foo: SimpleParameter;\n} | {\n    bar: NonAsciiStringæøåÆøÅöôêÊ字符串;\n}) & {\n    baz: number | null;\n    qux: number;\n};\n\n/**\n * An object that can be null\n */\nexport type NullableObject = {\n    foo?: string;\n} | null;\n\n/**\n * Some % character\n */\nexport type CharactersInDescription = string;\n\nexport type ModelWithNullableObject = {\n    data?: NullableObject;\n};\n\n/**\n * An object with additional properties that can be null (anyOf ref + null)\n */\nexport type ModelWithAdditionalPropertiesRef = {\n    [key: string]: NullableObject | null;\n};\n\nexport type ModelWithOneOfEnum = {\n    foo: 'Bar';\n} | {\n    foo: 'Baz';\n} | {\n    foo: 'Qux';\n} | {\n    content: string;\n    foo: 'Quux';\n} | {\n    content: [\n        string,\n        string\n    ];\n    foo: 'Corge';\n};\n\nexport type ModelWithNestedArrayEnumsDataFoo = 'foo' | 'bar';\n\nexport type ModelWithNestedArrayEnumsDataBar = 'baz' | 'qux';\n\nexport type ModelWithNestedArrayEnumsData = {\n    foo?: Array<ModelWithNestedArrayEnumsDataFoo>;\n    bar?: Array<ModelWithNestedArrayEnumsDataBar>;\n};\n\nexport type ModelWithNestedArrayEnums = {\n    array_strings?: Array<string>;\n    data?: ModelWithNestedArrayEnumsData;\n};\n\nexport type ModelWithNestedCompositionEnums = {\n    foo?: ModelWithNestedArrayEnumsDataFoo;\n};\n\nexport type ModelWithReadOnlyAndWriteOnly = {\n    foo: string;\n    readonly bar: string;\n};\n\nexport type ModelWithConstantSizeArray = [\n    number,\n    number\n];\n\nexport type ModelWithAnyOfConstantSizeArray = [\n    number | string,\n    number | string,\n    number | string\n];\n\nexport type ModelWithPrefixItemsConstantSizeArray = [\n    ModelWithInteger,\n    number | string,\n    string\n];\n\nexport type ModelWithAnyOfConstantSizeArrayNullable = [\n    number | null | string,\n    number | null | string,\n    number | null | string\n];\n\nexport type ModelWithAnyOfConstantSizeArrayWithNSizeAndOptions = [\n    number | Import,\n    number | Import\n];\n\nexport type ModelWithAnyOfConstantSizeArrayAndIntersect = [\n    number & string,\n    number & string\n];\n\nexport type ModelWithNumericEnumUnion = {\n    /**\n     * Период\n     */\n    value?: -10 | -1 | 0 | 1 | 3 | 6 | 12;\n};\n\n/**\n * Some description with `back ticks`\n */\nexport type ModelWithBackticksInDescription = {\n    /**\n     * The template `that` should be used for parsing and importing the contents of the CSV file.\n     *\n     * <br/><p>There is one placeholder currently supported:<ul>     <li><b>${x}</b> - refers to the n-th column in the CSV file, e.g. ${1}, ${2}, ...)</li></ul><p>Example of a correct JSON template:</p>\n     * <pre>\n     * [\n     * {\n     * \"resourceType\": \"Asset\",\n     * \"identifier\": {\n     * \"name\": \"${1}\",\n     * \"domain\": {\n     * \"name\": \"${2}\",\n     * \"community\": {\n     * \"name\": \"Some Community\"\n     * }\n     * }\n     * },\n     * \"attributes\" : {\n     * \"00000000-0000-0000-0000-000000003115\" : [ {\n     * \"value\" : \"${3}\"\n     * } ],\n     * \"00000000-0000-0000-0000-000000000222\" : [ {\n     * \"value\" : \"${4}\"\n     * } ]\n     * }\n     * }\n     * ]\n     * </pre>\n     */\n    template?: string;\n};\n\nexport type ModelWithOneOfAndProperties = (SimpleParameter | NonAsciiStringæøåÆøÅöôêÊ字符串) & {\n    baz: number | null;\n    qux: number;\n};\n\n/**\n * Model used to test deduplication strategy (unused)\n */\nexport type ParameterSimpleParameterUnused = string;\n\n/**\n * Model used to test deduplication strategy\n */\nexport type PostServiceWithEmptyTagResponse = string;\n\n/**\n * Model used to test deduplication strategy\n */\nexport type PostServiceWithEmptyTagResponse2 = string;\n\n/**\n * Model used to test deduplication strategy\n */\nexport type DeleteFooData = string;\n\n/**\n * Model used to test deduplication strategy\n */\nexport type DeleteFooData2 = string;\n\n/**\n * Model with restricted keyword name\n */\nexport type Import = string;\n\nexport type SchemaWithFormRestrictedKeys = {\n    description?: string;\n    'x-enum-descriptions'?: string;\n    'x-enum-varnames'?: string;\n    'x-enumNames'?: string;\n    title?: string;\n    object?: {\n        description?: string;\n        'x-enum-descriptions'?: string;\n        'x-enum-varnames'?: string;\n        'x-enumNames'?: string;\n        title?: string;\n    };\n    array?: Array<{\n        description?: string;\n        'x-enum-descriptions'?: string;\n        'x-enum-varnames'?: string;\n        'x-enumNames'?: string;\n        title?: string;\n    }>;\n};\n\n/**\n * This schema was giving PascalCase transformations a hard time\n */\nexport type IoK8sApimachineryPkgApisMetaV1DeleteOptions = {\n    /**\n     * Must be fulfilled before a deletion is carried out. If not possible, a 409 Conflict status will be returned.\n     */\n    preconditions?: IoK8sApimachineryPkgApisMetaV1Preconditions;\n};\n\n/**\n * This schema was giving PascalCase transformations a hard time\n */\nexport type IoK8sApimachineryPkgApisMetaV1Preconditions = {\n    /**\n     * Specifies the target ResourceVersion\n     */\n    resourceVersion?: string;\n    /**\n     * Specifies the target UID.\n     */\n    uid?: string;\n};\n\nexport type AdditionalPropertiesUnknownIssue = {\n    [key: string]: string | number;\n};\n\nexport type AdditionalPropertiesUnknownIssue2 = {\n    [key: string]: string | number;\n};\n\nexport type AdditionalPropertiesUnknownIssue3 = string & {\n    entries: {\n        [key: string]: AdditionalPropertiesUnknownIssue;\n    };\n};\n\nexport type AdditionalPropertiesIntegerIssue = {\n    value: number;\n    [key: string]: number;\n};\n\nexport type OneOfAllOfIssue = ((ConstValue | GenericSchemaDuplicateIssue1SystemBoolean) & _3eNum1Период) | GenericSchemaDuplicateIssue1SystemString;\n\nexport type GenericSchemaDuplicateIssue1SystemBoolean = {\n    item?: boolean;\n    error?: string | null;\n    readonly hasError?: boolean;\n    data?: {\n        [key: string]: never;\n    };\n};\n\nexport type GenericSchemaDuplicateIssue1SystemString = {\n    item?: string | null;\n    error?: string | null;\n    readonly hasError?: boolean;\n};\n\nexport type ExternalSharedModel = {\n    id: string;\n    name?: string;\n};\n\n/**\n * This is a model with one property containing a reference\n */\nexport type ModelWithReferenceWritable = {\n    prop?: ModelWithPropertiesWritable;\n};\n\n/**\n * This is a model with one property containing an array\n */\nexport type ModelWithArrayReadOnlyAndWriteOnlyWritable = {\n    prop?: Array<ModelWithReadOnlyAndWriteOnlyWritable>;\n    propWithFile?: Array<Blob | File>;\n    propWithNumber?: Array<number>;\n};\n\n/**\n * This is a model with one nested property\n */\nexport type ModelWithPropertiesWritable = {\n    required: string;\n    requiredAndNullable: string | null;\n    string?: string;\n    number?: number;\n    boolean?: boolean;\n    reference?: ModelWithString;\n    'property with space'?: string;\n    default?: string;\n    try?: string;\n};\n\n/**\n * This is a model that contains a some patterns\n */\nexport type ModelWithPatternWritable = {\n    key: string;\n    name: string;\n    id?: string;\n    text?: string;\n    patternWithSingleQuotes?: string;\n    patternWithNewline?: string;\n    patternWithBacktick?: string;\n    patternWithUnicode?: string;\n};\n\nexport type FileWritable = {\n    /**\n     * Mime\n     */\n    mime: string;\n};\n\nexport type ModelWithReadOnlyAndWriteOnlyWritable = {\n    foo: string;\n    baz: string;\n};\n\nexport type ModelWithAnyOfConstantSizeArrayWithNSizeAndOptionsWritable = [\n    number | Import,\n    number | Import\n];\n\nexport type AdditionalPropertiesUnknownIssueWritable = {\n    [key: string]: string | number;\n};\n\nexport type OneOfAllOfIssueWritable = ((ConstValue | GenericSchemaDuplicateIssue1SystemBoolean) & _3eNum1Период) | GenericSchemaDuplicateIssue1SystemString;\n\nexport type GenericSchemaDuplicateIssue1SystemBooleanWritable = {\n    item?: boolean;\n    error?: string | null;\n    data?: {\n        [key: string]: never;\n    };\n};\n\nexport type GenericSchemaDuplicateIssue1SystemStringWritable = {\n    item?: string | null;\n    error?: string | null;\n};\n\n/**\n * This is a reusable parameter\n */\nexport type SimpleParameter = string;\n\n/**\n * Parameter with illegal characters\n */\nexport type XFooBar = ModelWithString;\n\n/**\n * A reusable request body\n */\nexport type SimpleRequestBody = ModelWithString;\n\n/**\n * A reusable request body\n */\nexport type SimpleFormData = ModelWithString;\n\nexport type ExportData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no+tag';\n};\n\nexport type PatchApiVbyApiVersionNoTagData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no+tag';\n};\n\nexport type PatchApiVbyApiVersionNoTagResponses = {\n    /**\n     * OK\n     */\n    default: unknown;\n};\n\nexport type ImportData = {\n    body: ModelWithReadOnlyAndWriteOnlyWritable | ModelWithArrayReadOnlyAndWriteOnlyWritable;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no+tag';\n};\n\nexport type ImportResponses = {\n    /**\n     * Success\n     */\n    200: ModelFromZendesk;\n    /**\n     * Default success response\n     */\n    default: ModelWithReadOnlyAndWriteOnly;\n};\n\nexport type ImportResponse = ImportResponses[keyof ImportResponses];\n\nexport type FooWowData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no+tag';\n};\n\nexport type FooWowResponses = {\n    /**\n     * OK\n     */\n    default: unknown;\n};\n\nexport type ApiVVersionODataControllerCountData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple/$count';\n};\n\nexport type ApiVVersionODataControllerCountResponses = {\n    /**\n     * Success\n     */\n    200: ModelFromZendesk;\n};\n\nexport type ApiVVersionODataControllerCountResponse = ApiVVersionODataControllerCountResponses[keyof ApiVVersionODataControllerCountResponses];\n\nexport type GetApiVbyApiVersionSimpleOperationData = {\n    body?: never;\n    path: {\n        /**\n         * foo in method\n         */\n        foo_param: string;\n    };\n    query?: never;\n    url: '/api/v{api-version}/simple:operation';\n};\n\nexport type GetApiVbyApiVersionSimpleOperationErrors = {\n    /**\n     * Default error response\n     */\n    default: ModelWithBoolean;\n};\n\nexport type GetApiVbyApiVersionSimpleOperationError = GetApiVbyApiVersionSimpleOperationErrors[keyof GetApiVbyApiVersionSimpleOperationErrors];\n\nexport type GetApiVbyApiVersionSimpleOperationResponses = {\n    /**\n     * Response is a simple number\n     */\n    200: number;\n};\n\nexport type GetApiVbyApiVersionSimpleOperationResponse = GetApiVbyApiVersionSimpleOperationResponses[keyof GetApiVbyApiVersionSimpleOperationResponses];\n\nexport type DeleteCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type GetCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type HeadCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type OptionsCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type PatchCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type PostCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type PutCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type DeleteFooData3 = {\n    body?: never;\n    headers: {\n        /**\n         * Parameter with illegal characters\n         */\n        'x-Foo-Bar': ModelWithString;\n    };\n    path: {\n        /**\n         * foo in method\n         */\n        foo_param: string;\n        /**\n         * bar in method\n         */\n        BarParam: string;\n    };\n    query?: never;\n    url: '/api/v{api-version}/foo/{foo_param}/bar/{BarParam}';\n};\n\nexport type CallWithDescriptionsData = {\n    body?: never;\n    path?: never;\n    query?: {\n        /**\n         * Testing multiline comments in string: First line\n         * Second line\n         *\n         * Fourth line\n         */\n        parameterWithBreaks?: string;\n        /**\n         * Testing backticks in string: `backticks` and ```multiple backticks``` should work\n         */\n        parameterWithBackticks?: string;\n        /**\n         * Testing slashes in string: \\backwards\\\\\\ and /forwards/// should work\n         */\n        parameterWithSlashes?: string;\n        /**\n         * Testing expression placeholders in string: ${expression} should work\n         */\n        parameterWithExpressionPlaceholders?: string;\n        /**\n         * Testing quotes in string: 'single quote''' and \"double quotes\"\"\" should work\n         */\n        parameterWithQuotes?: string;\n        /**\n         * Testing reserved characters in string: * inline * and ** inline ** should work\n         */\n        parameterWithReservedCharacters?: string;\n    };\n    url: '/api/v{api-version}/descriptions';\n};\n\nexport type DeprecatedCallData = {\n    body?: never;\n    headers: {\n        /**\n         * This parameter is deprecated\n         *\n         * @deprecated\n         */\n        parameter: DeprecatedModel | null;\n    };\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/parameters/deprecated';\n};\n\nexport type CallWithParametersData = {\n    /**\n     * This is the parameter that goes into the body\n     */\n    body: {\n        [key: string]: unknown;\n    } | null;\n    headers: {\n        /**\n         * This is the parameter that goes into the header\n         */\n        parameterHeader: string | null;\n    };\n    path: {\n        /**\n         * This is the parameter that goes into the path\n         */\n        parameterPath: string | null;\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string | null;\n    };\n    query: {\n        foo_ref_enum?: ModelWithNestedArrayEnumsDataFoo;\n        foo_all_of_enum: ModelWithNestedArrayEnumsDataFoo;\n        /**\n         * This is the parameter that goes into the query params\n         */\n        cursor: string | null;\n    };\n    url: '/api/v{api-version}/parameters/{parameterPath}';\n};\n\nexport type CallWithWeirdParameterNamesData = {\n    /**\n     * This is the parameter that goes into the body\n     */\n    body: ModelWithString | null;\n    headers: {\n        /**\n         * This is the parameter that goes into the request header\n         */\n        'parameter.header': string | null;\n    };\n    path: {\n        /**\n         * This is the parameter that goes into the path\n         */\n        'parameter.path.1'?: string;\n        /**\n         * This is the parameter that goes into the path\n         */\n        'parameter-path-2'?: string;\n        /**\n         * This is the parameter that goes into the path\n         */\n        'PARAMETER-PATH-3'?: string;\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string | null;\n    };\n    query: {\n        /**\n         * This is the parameter with a reserved keyword\n         */\n        default?: string;\n        /**\n         * This is the parameter that goes into the request query params\n         */\n        'parameter-query': string | null;\n    };\n    url: '/api/v{api-version}/parameters/{parameter.path.1}/{parameter-path-2}/{PARAMETER-PATH-3}';\n};\n\nexport type GetCallWithOptionalParamData = {\n    /**\n     * This is a required parameter\n     */\n    body: ModelWithOneOfEnum;\n    path?: never;\n    query?: {\n        /**\n         * This is an optional parameter\n         */\n        page?: number;\n    };\n    url: '/api/v{api-version}/parameters';\n};\n\nexport type PostCallWithOptionalParamData = {\n    /**\n     * This is an optional parameter\n     */\n    body?: {\n        offset?: number | null;\n    };\n    path?: never;\n    query: {\n        /**\n         * This is a required parameter\n         */\n        parameter: Pageable;\n    };\n    url: '/api/v{api-version}/parameters';\n};\n\nexport type PostCallWithOptionalParamResponses = {\n    /**\n     * Response is a simple number\n     */\n    200: number;\n    /**\n     * Success\n     */\n    204: void;\n};\n\nexport type PostCallWithOptionalParamResponse = PostCallWithOptionalParamResponses[keyof PostCallWithOptionalParamResponses];\n\nexport type PostApiVbyApiVersionRequestBodyData = {\n    /**\n     * A reusable request body\n     */\n    body?: SimpleRequestBody;\n    path?: never;\n    query?: {\n        /**\n         * This is a reusable parameter\n         */\n        parameter?: string;\n    };\n    url: '/api/v{api-version}/requestBody';\n};\n\nexport type PostApiVbyApiVersionFormDataData = {\n    /**\n     * A reusable request body\n     */\n    body?: SimpleFormData;\n    path?: never;\n    query?: {\n        /**\n         * This is a reusable parameter\n         */\n        parameter?: string;\n    };\n    url: '/api/v{api-version}/formData';\n};\n\nexport type CallWithDefaultParametersData = {\n    body?: never;\n    path?: never;\n    query?: {\n        /**\n         * This is a simple string with default value\n         */\n        parameterString?: string | null;\n        /**\n         * This is a simple number with default value\n         */\n        parameterNumber?: number | null;\n        /**\n         * This is a simple boolean with default value\n         */\n        parameterBoolean?: boolean | null;\n        /**\n         * This is a simple enum with default value\n         */\n        parameterEnum?: 'Success' | 'Warning' | 'Error';\n        /**\n         * This is a simple model with default value\n         */\n        parameterModel?: ModelWithString | null;\n    };\n    url: '/api/v{api-version}/defaults';\n};\n\nexport type CallWithDefaultOptionalParametersData = {\n    body?: never;\n    path?: never;\n    query?: {\n        /**\n         * This is a simple string that is optional with default value\n         */\n        parameterString?: string;\n        /**\n         * This is a simple number that is optional with default value\n         */\n        parameterNumber?: number;\n        /**\n         * This is a simple boolean that is optional with default value\n         */\n        parameterBoolean?: boolean;\n        /**\n         * This is a simple enum that is optional with default value\n         */\n        parameterEnum?: 'Success' | 'Warning' | 'Error';\n        /**\n         * This is a simple model that is optional with default value\n         */\n        parameterModel?: ModelWithString;\n    };\n    url: '/api/v{api-version}/defaults';\n};\n\nexport type CallToTestOrderOfParamsData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * This is a optional string with default\n         */\n        parameterOptionalStringWithDefault?: string;\n        /**\n         * This is a optional string with empty default\n         */\n        parameterOptionalStringWithEmptyDefault?: string;\n        /**\n         * This is a optional string with no default\n         */\n        parameterOptionalStringWithNoDefault?: string;\n        /**\n         * This is a string with default\n         */\n        parameterStringWithDefault: string;\n        /**\n         * This is a string with empty default\n         */\n        parameterStringWithEmptyDefault: string;\n        /**\n         * This is a string with no default\n         */\n        parameterStringWithNoDefault: string;\n        /**\n         * This is a string that can be null with no default\n         */\n        parameterStringNullableWithNoDefault?: string | null;\n        /**\n         * This is a string that can be null with default\n         */\n        parameterStringNullableWithDefault?: string | null;\n    };\n    url: '/api/v{api-version}/defaults';\n};\n\nexport type DuplicateNameData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/duplicate';\n};\n\nexport type DuplicateName2Data = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/duplicate';\n};\n\nexport type DuplicateName3Data = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/duplicate';\n};\n\nexport type DuplicateName4Data = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/duplicate';\n};\n\nexport type CallWithNoContentResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no-content';\n};\n\nexport type CallWithNoContentResponseResponses = {\n    /**\n     * Success\n     */\n    204: void;\n};\n\nexport type CallWithNoContentResponseResponse = CallWithNoContentResponseResponses[keyof CallWithNoContentResponseResponses];\n\nexport type CallWithResponseAndNoContentResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multiple-tags/response-and-no-content';\n};\n\nexport type CallWithResponseAndNoContentResponseResponses = {\n    /**\n     * Response is a simple number\n     */\n    200: number;\n    /**\n     * Success\n     */\n    204: void;\n};\n\nexport type CallWithResponseAndNoContentResponseResponse = CallWithResponseAndNoContentResponseResponses[keyof CallWithResponseAndNoContentResponseResponses];\n\nexport type DummyAData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multiple-tags/a';\n};\n\nexport type DummyAResponses = {\n    200: _400;\n};\n\nexport type DummyAResponse = DummyAResponses[keyof DummyAResponses];\n\nexport type DummyBData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multiple-tags/b';\n};\n\nexport type DummyBResponses = {\n    /**\n     * Success\n     */\n    204: void;\n};\n\nexport type DummyBResponse = DummyBResponses[keyof DummyBResponses];\n\nexport type CallWithResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/response';\n};\n\nexport type CallWithResponseResponses = {\n    default: Import;\n};\n\nexport type CallWithResponseResponse = CallWithResponseResponses[keyof CallWithResponseResponses];\n\nexport type CallWithDuplicateResponsesData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/response';\n};\n\nexport type CallWithDuplicateResponsesErrors = {\n    /**\n     * Message for 500 error\n     */\n    500: ModelWithStringError;\n    /**\n     * Message for 501 error\n     */\n    501: ModelWithStringError;\n    /**\n     * Message for 502 error\n     */\n    502: ModelWithStringError;\n    /**\n     * Message for 4XX errors\n     */\n    '4XX': DictionaryWithArray;\n    /**\n     * Default error response\n     */\n    default: ModelWithBoolean;\n};\n\nexport type CallWithDuplicateResponsesError = CallWithDuplicateResponsesErrors[keyof CallWithDuplicateResponsesErrors];\n\nexport type CallWithDuplicateResponsesResponses = {\n    /**\n     * Message for 200 response\n     */\n    200: ModelWithBoolean & ModelWithInteger;\n    /**\n     * Message for 201 response\n     */\n    201: ModelWithString;\n    /**\n     * Message for 202 response\n     */\n    202: ModelWithString;\n};\n\nexport type CallWithDuplicateResponsesResponse = CallWithDuplicateResponsesResponses[keyof CallWithDuplicateResponsesResponses];\n\nexport type CallWithResponsesData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/response';\n};\n\nexport type CallWithResponsesErrors = {\n    /**\n     * Message for 500 error\n     */\n    500: ModelWithStringError;\n    /**\n     * Message for 501 error\n     */\n    501: ModelWithStringError;\n    /**\n     * Message for 502 error\n     */\n    502: ModelWithStringError;\n    /**\n     * Message for default response\n     */\n    default: ModelWithStringError;\n};\n\nexport type CallWithResponsesError = CallWithResponsesErrors[keyof CallWithResponsesErrors];\n\nexport type CallWithResponsesResponses = {\n    /**\n     * Message for 200 response\n     */\n    200: {\n        readonly '@namespace.string'?: string;\n        readonly '@namespace.integer'?: number;\n        readonly value?: Array<ModelWithString>;\n    };\n    /**\n     * Message for 201 response\n     */\n    201: ModelThatExtends;\n    /**\n     * Message for 202 response\n     */\n    202: ModelThatExtendsExtends;\n};\n\nexport type CallWithResponsesResponse = CallWithResponsesResponses[keyof CallWithResponsesResponses];\n\nexport type CollectionFormatData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * This is an array parameter that is sent as csv format (comma-separated values)\n         */\n        parameterArrayCSV: Array<string> | null;\n        /**\n         * This is an array parameter that is sent as ssv format (space-separated values)\n         */\n        parameterArraySSV: Array<string> | null;\n        /**\n         * This is an array parameter that is sent as tsv format (tab-separated values)\n         */\n        parameterArrayTSV: Array<string> | null;\n        /**\n         * This is an array parameter that is sent as pipes format (pipe-separated values)\n         */\n        parameterArrayPipes: Array<string> | null;\n        /**\n         * This is an array parameter that is sent as multi format (multiple parameter instances)\n         */\n        parameterArrayMulti: Array<string> | null;\n    };\n    url: '/api/v{api-version}/collectionFormat';\n};\n\nexport type TypesData = {\n    body?: never;\n    path?: {\n        /**\n         * This is a number parameter\n         */\n        id?: number;\n    };\n    query: {\n        /**\n         * This is a number parameter\n         */\n        parameterNumber: number;\n        /**\n         * This is a string parameter\n         */\n        parameterString: string | null;\n        /**\n         * This is a boolean parameter\n         */\n        parameterBoolean: boolean | null;\n        /**\n         * This is an object parameter\n         */\n        parameterObject: {\n            [key: string]: unknown;\n        } | null;\n        /**\n         * This is an array parameter\n         */\n        parameterArray: Array<string> | null;\n        /**\n         * This is a dictionary parameter\n         */\n        parameterDictionary: {\n            [key: string]: unknown;\n        } | null;\n        /**\n         * This is an enum parameter\n         */\n        parameterEnum: 'Success' | 'Warning' | 'Error' | null;\n    };\n    url: '/api/v{api-version}/types';\n};\n\nexport type TypesResponses = {\n    /**\n     * Response is a simple number\n     */\n    200: number;\n    /**\n     * Response is a simple string\n     */\n    201: string;\n    /**\n     * Response is a simple boolean\n     */\n    202: boolean;\n    /**\n     * Response is a simple object\n     */\n    203: {\n        [key: string]: unknown;\n    };\n};\n\nexport type TypesResponse = TypesResponses[keyof TypesResponses];\n\nexport type UploadFileData = {\n    body: Blob | File;\n    path: {\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string | null;\n    };\n    query?: never;\n    url: '/api/v{api-version}/upload';\n};\n\nexport type UploadFileResponses = {\n    200: boolean;\n};\n\nexport type UploadFileResponse = UploadFileResponses[keyof UploadFileResponses];\n\nexport type FileResponseData = {\n    body?: never;\n    path: {\n        id: string;\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string;\n    };\n    query?: never;\n    url: '/api/v{api-version}/file/{id}';\n};\n\nexport type FileResponseResponses = {\n    /**\n     * Success\n     */\n    200: Blob | File;\n};\n\nexport type FileResponseResponse = FileResponseResponses[keyof FileResponseResponses];\n\nexport type ComplexTypesData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * Parameter containing object\n         */\n        parameterObject: {\n            first?: {\n                second?: {\n                    third?: string;\n                };\n            };\n        };\n        /**\n         * Parameter containing reference\n         */\n        parameterReference: ModelWithString;\n    };\n    url: '/api/v{api-version}/complex';\n};\n\nexport type ComplexTypesErrors = {\n    /**\n     * 400 `server` error\n     */\n    400: unknown;\n    /**\n     * 500 server error\n     */\n    500: unknown;\n};\n\nexport type ComplexTypesResponses = {\n    /**\n     * Successful response\n     */\n    200: Array<ModelWithString>;\n};\n\nexport type ComplexTypesResponse = ComplexTypesResponses[keyof ComplexTypesResponses];\n\nexport type MultipartResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multipart';\n};\n\nexport type MultipartResponseResponses = {\n    /**\n     * OK\n     */\n    200: {\n        file?: Blob | File;\n        metadata?: {\n            foo?: string;\n            bar?: string;\n        };\n    };\n};\n\nexport type MultipartResponseResponse = MultipartResponseResponses[keyof MultipartResponseResponses];\n\nexport type MultipartRequestData = {\n    body?: {\n        content?: Blob | File;\n        data?: ModelWithString | null;\n    };\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multipart';\n};\n\nexport type ComplexParamsData = {\n    body?: {\n        readonly key: string | null;\n        name: string | null;\n        enabled?: boolean;\n        type: 'Monkey' | 'Horse' | 'Bird';\n        listOfModels?: Array<ModelWithString> | null;\n        listOfStrings?: Array<string> | null;\n        parameters: ModelWithString | ModelWithEnum | ModelWithArray | ModelWithDictionary;\n        readonly user?: {\n            readonly id?: number;\n            readonly name?: string | null;\n        };\n    };\n    path: {\n        id: number;\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string;\n    };\n    query?: never;\n    url: '/api/v{api-version}/complex/{id}';\n};\n\nexport type ComplexParamsResponses = {\n    /**\n     * Success\n     */\n    200: ModelWithString;\n};\n\nexport type ComplexParamsResponse = ComplexParamsResponses[keyof ComplexParamsResponses];\n\nexport type CallWithResultFromHeaderData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/header';\n};\n\nexport type CallWithResultFromHeaderErrors = {\n    /**\n     * 400 server error\n     */\n    400: unknown;\n    /**\n     * 500 server error\n     */\n    500: unknown;\n};\n\nexport type CallWithResultFromHeaderResponses = {\n    /**\n     * Successful response\n     */\n    200: unknown;\n};\n\nexport type TestErrorCodeData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * Status code to return\n         */\n        status: number;\n    };\n    url: '/api/v{api-version}/error';\n};\n\nexport type TestErrorCodeErrors = {\n    /**\n     * Custom message: Internal Server Error\n     */\n    500: unknown;\n    /**\n     * Custom message: Not Implemented\n     */\n    501: unknown;\n    /**\n     * Custom message: Bad Gateway\n     */\n    502: unknown;\n    /**\n     * Custom message: Service Unavailable\n     */\n    503: unknown;\n};\n\nexport type TestErrorCodeResponses = {\n    /**\n     * Custom message: Successful response\n     */\n    200: unknown;\n};\n\nexport type NonAsciiæøåÆøÅöôêÊ字符串Data = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * Dummy input param\n         */\n        nonAsciiParamæøåÆØÅöôêÊ: number;\n    };\n    url: '/api/v{api-version}/non-ascii-æøåÆØÅöôêÊ字符串';\n};\n\nexport type NonAsciiæøåÆøÅöôêÊ字符串Responses = {\n    /**\n     * Successful response\n     */\n    200: Array<NonAsciiStringæøåÆøÅöôêÊ字符串>;\n};\n\nexport type NonAsciiæøåÆøÅöôêÊ字符串Response = NonAsciiæøåÆøÅöôêÊ字符串Responses[keyof NonAsciiæøåÆøÅöôêÊ字符串Responses];\n\nexport type PutWithFormUrlEncodedData = {\n    body: ArrayWithStrings;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/non-ascii-æøåÆØÅöôêÊ字符串';\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/client-custom/base-url-strict/custom-client.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport { type ClientOptions, type Config, createClient, createConfig } from '@hey-api/custom-client';\n\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: 'http://localhost:3000/base' }));\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/client-custom/base-url-strict/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type { _3eNum1Период, _400, AdditionalPropertiesIntegerIssue, AdditionalPropertiesUnknownIssue, AdditionalPropertiesUnknownIssue2, AdditionalPropertiesUnknownIssue3, AdditionalPropertiesUnknownIssueWritable, AnyOfAnyAndNull, AnyOfArrays, ApiVVersionODataControllerCountData, ApiVVersionODataControllerCountResponse, ApiVVersionODataControllerCountResponses, ArrayWithAnyOfProperties, ArrayWithArray, ArrayWithBooleans, ArrayWithNumbers, ArrayWithProperties, ArrayWithReferences, ArrayWithStrings, CallToTestOrderOfParamsData, CallWithDefaultOptionalParametersData, CallWithDefaultParametersData, CallWithDescriptionsData, CallWithDuplicateResponsesData, CallWithDuplicateResponsesError, CallWithDuplicateResponsesErrors, CallWithDuplicateResponsesResponse, CallWithDuplicateResponsesResponses, CallWithNoContentResponseData, CallWithNoContentResponseResponse, CallWithNoContentResponseResponses, CallWithParametersData, CallWithResponseAndNoContentResponseData, CallWithResponseAndNoContentResponseResponse, CallWithResponseAndNoContentResponseResponses, CallWithResponseData, CallWithResponseResponse, CallWithResponseResponses, CallWithResponsesData, CallWithResponsesError, CallWithResponsesErrors, CallWithResponsesResponse, CallWithResponsesResponses, CallWithResultFromHeaderData, CallWithResultFromHeaderErrors, CallWithResultFromHeaderResponses, CallWithWeirdParameterNamesData, CamelCaseCommentWithBreaks, CharactersInDescription, ClientOptions, CollectionFormatData, CommentWithBackticks, CommentWithBackticksAndQuotes, CommentWithBreaks, CommentWithExpressionPlaceholders, CommentWithQuotes, CommentWithReservedCharacters, CommentWithSlashes, ComplexParamsData, ComplexParamsResponse, ComplexParamsResponses, ComplexTypesData, ComplexTypesErrors, ComplexTypesResponse, ComplexTypesResponses, CompositionBaseModel, CompositionExtendedModel, CompositionWithAllOfAndNullable, CompositionWithAnyOf, CompositionWithAnyOfAndNullable, CompositionWithAnyOfAnonymous, CompositionWithNestedAnyAndTypeNull, CompositionWithNestedAnyOfAndNull, CompositionWithOneOf, CompositionWithOneOfAndComplexArrayDictionary, CompositionWithOneOfAndNullable, CompositionWithOneOfAndProperties, CompositionWithOneOfAndSimpleArrayDictionary, CompositionWithOneOfAndSimpleDictionary, CompositionWithOneOfAnonymous, CompositionWithOneOfDiscriminator, ConstValue, Default, DeleteCallWithoutParametersAndResponseData, DeleteFooData, DeleteFooData2, DeleteFooData3, DeprecatedCallData, DeprecatedModel, DictionaryWithArray, DictionaryWithDictionary, DictionaryWithProperties, DictionaryWithPropertiesAndAdditionalProperties, DictionaryWithReference, DictionaryWithString, DummyAData, DummyAResponse, DummyAResponses, DummyBData, DummyBResponse, DummyBResponses, DuplicateName2Data, DuplicateName3Data, DuplicateName4Data, DuplicateNameData, EnumFromDescription, EnumWithExtensions, EnumWithNumbers, EnumWithReplacedCharacters, EnumWithStrings, EnumWithXEnumNames, ExportData, ExternalRefA, ExternalRefB, ExternalSharedModel, File, FileResponseData, FileResponseResponse, FileResponseResponses, FileWritable, FooWowData, FooWowResponses, FreeFormObjectWithAdditionalPropertiesEqEmptyObject, FreeFormObjectWithAdditionalPropertiesEqTrue, FreeFormObjectWithoutAdditionalProperties, GenericSchemaDuplicateIssue1SystemBoolean, GenericSchemaDuplicateIssue1SystemBooleanWritable, GenericSchemaDuplicateIssue1SystemString, GenericSchemaDuplicateIssue1SystemStringWritable, GetApiVbyApiVersionSimpleOperationData, GetApiVbyApiVersionSimpleOperationError, GetApiVbyApiVersionSimpleOperationErrors, GetApiVbyApiVersionSimpleOperationResponse, GetApiVbyApiVersionSimpleOperationResponses, GetCallWithOptionalParamData, GetCallWithoutParametersAndResponseData, HeadCallWithoutParametersAndResponseData, Import, ImportData, ImportResponse, ImportResponses, IoK8sApimachineryPkgApisMetaV1DeleteOptions, IoK8sApimachineryPkgApisMetaV1Preconditions, ModelCircle, ModelFromZendesk, ModelSquare, ModelThatExtends, ModelThatExtendsExtends, ModelWithAdditionalPropertiesEqTrue, ModelWithAdditionalPropertiesRef, ModelWithAnyOfConstantSizeArray, ModelWithAnyOfConstantSizeArrayAndIntersect, ModelWithAnyOfConstantSizeArrayNullable, ModelWithAnyOfConstantSizeArrayWithNSizeAndOptions, ModelWithAnyOfConstantSizeArrayWithNSizeAndOptionsWritable, ModelWithArray, ModelWithArrayReadOnlyAndWriteOnly, ModelWithArrayReadOnlyAndWriteOnlyWritable, ModelWithBackticksInDescription, ModelWithBoolean, ModelWithCircularReference, ModelWithConst, ModelWithConstantSizeArray, ModelWithDictionary, ModelWithDuplicateImports, ModelWithDuplicateProperties, ModelWithEnum, ModelWithEnumFromDescription, ModelWithEnumWithHyphen, ModelWithInteger, ModelWithNestedArrayEnums, ModelWithNestedArrayEnumsData, ModelWithNestedArrayEnumsDataBar, ModelWithNestedArrayEnumsDataFoo, ModelWithNestedCompositionEnums, ModelWithNestedEnums, ModelWithNestedProperties, ModelWithNullableObject, ModelWithNullableString, ModelWithNumericEnumUnion, ModelWithOneOfAndProperties, ModelWithOneOfEnum, ModelWithOrderedProperties, ModelWithPattern, ModelWithPatternWritable, ModelWithPrefixItemsConstantSizeArray, ModelWithProperties, ModelWithPropertiesWritable, ModelWithReadOnlyAndWriteOnly, ModelWithReadOnlyAndWriteOnlyWritable, ModelWithReference, ModelWithReferenceWritable, ModelWithString, ModelWithStringError, MultipartRequestData, MultipartResponseData, MultipartResponseResponse, MultipartResponseResponses, NestedAnyOfArraysNullable, NonAsciiæøåÆøÅöôêÊ字符串Data, NonAsciiæøåÆøÅöôêÊ字符串Response, NonAsciiæøåÆøÅöôêÊ字符串Responses, NonAsciiStringæøåÆøÅöôêÊ字符串, NullableObject, OneOfAllOfIssue, OneOfAllOfIssueWritable, OptionsCallWithoutParametersAndResponseData, Pageable, ParameterSimpleParameterUnused, PatchApiVbyApiVersionNoTagData, PatchApiVbyApiVersionNoTagResponses, PatchCallWithoutParametersAndResponseData, PostApiVbyApiVersionFormDataData, PostApiVbyApiVersionRequestBodyData, PostCallWithOptionalParamData, PostCallWithOptionalParamResponse, PostCallWithOptionalParamResponses, PostCallWithoutParametersAndResponseData, PostServiceWithEmptyTagResponse, PostServiceWithEmptyTagResponse2, PutCallWithoutParametersAndResponseData, PutWithFormUrlEncodedData, SchemaWithFormRestrictedKeys, SimpleBoolean, SimpleFile, SimpleFormData, SimpleInteger, SimpleParameter, SimpleReference, SimpleRequestBody, SimpleString, SimpleStringWithPattern, TestErrorCodeData, TestErrorCodeErrors, TestErrorCodeResponses, TypesData, TypesResponse, TypesResponses, UploadFileData, UploadFileResponse, UploadFileResponses, XFooBar } from './types.gen';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/client-custom/base-url-strict/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type ClientOptions = {\n    baseUrl: 'http://localhost:3000/base';\n};\n\n/**\n * Model with number-only name\n */\nexport type _400 = string;\n\n/**\n * External ref to shared model (A)\n */\nexport type ExternalRefA = ExternalSharedModel;\n\n/**\n * External ref to shared model (B)\n */\nexport type ExternalRefB = ExternalSharedModel;\n\n/**\n * Testing multiline comments in string: First line\n * Second line\n *\n * Fourth line\n */\nexport type CamelCaseCommentWithBreaks = number;\n\n/**\n * Testing multiline comments in string: First line\n * Second line\n *\n * Fourth line\n */\nexport type CommentWithBreaks = number;\n\n/**\n * Testing backticks in string: `backticks` and ```multiple backticks``` should work\n */\nexport type CommentWithBackticks = number;\n\n/**\n * Testing backticks and quotes in string: `backticks`, 'quotes', \"double quotes\" and ```multiple backticks``` should work\n */\nexport type CommentWithBackticksAndQuotes = number;\n\n/**\n * Testing slashes in string: \\backwards\\\\\\ and /forwards/// should work\n */\nexport type CommentWithSlashes = number;\n\n/**\n * Testing expression placeholders in string: ${expression} should work\n */\nexport type CommentWithExpressionPlaceholders = number;\n\n/**\n * Testing quotes in string: 'single quote''' and \"double quotes\"\"\" should work\n */\nexport type CommentWithQuotes = number;\n\n/**\n * Testing reserved characters in string: * inline * and ** inline ** should work\n */\nexport type CommentWithReservedCharacters = number;\n\n/**\n * This is a simple number\n */\nexport type SimpleInteger = number;\n\n/**\n * This is a simple boolean\n */\nexport type SimpleBoolean = boolean;\n\n/**\n * This is a simple string\n */\nexport type SimpleString = string;\n\n/**\n * A string with non-ascii (unicode) characters valid in typescript identifiers (æøåÆØÅöÔèÈ字符串)\n */\nexport type NonAsciiStringæøåÆøÅöôêÊ字符串 = string;\n\n/**\n * This is a simple file\n */\nexport type SimpleFile = Blob | File;\n\n/**\n * This is a simple reference\n */\nexport type SimpleReference = ModelWithString;\n\n/**\n * This is a simple string\n */\nexport type SimpleStringWithPattern = string | null;\n\n/**\n * This is a simple enum with strings\n */\nexport type EnumWithStrings = 'Success' | 'Warning' | 'Error' | '\\'Single Quote\\'' | '\"Double Quotes\"' | 'Non-ascii: øæåôöØÆÅÔÖ字符串';\n\nexport type EnumWithReplacedCharacters = '\\'Single Quote\\'' | '\"Double Quotes\"' | 'øæåôöØÆÅÔÖ字符串' | 3.1 | '';\n\n/**\n * This is a simple enum with numbers\n */\nexport type EnumWithNumbers = 1 | 2 | 3 | 1.1 | 1.2 | 1.3 | 100 | 200 | 300 | -100 | -200 | -300 | -1.1 | -1.2 | -1.3;\n\n/**\n * Success=1,Warning=2,Error=3\n */\nexport type EnumFromDescription = number;\n\n/**\n * This is a simple enum with numbers\n */\nexport type EnumWithExtensions = 200 | 400 | 500;\n\nexport type EnumWithXEnumNames = 0 | 1 | 2;\n\n/**\n * This is a simple array with numbers\n */\nexport type ArrayWithNumbers = Array<number>;\n\n/**\n * This is a simple array with booleans\n */\nexport type ArrayWithBooleans = Array<boolean>;\n\n/**\n * This is a simple array with strings\n */\nexport type ArrayWithStrings = Array<string>;\n\n/**\n * This is a simple array with references\n */\nexport type ArrayWithReferences = Array<ModelWithString>;\n\n/**\n * This is a simple array containing an array\n */\nexport type ArrayWithArray = Array<Array<ModelWithString>>;\n\n/**\n * This is a simple array with properties\n */\nexport type ArrayWithProperties = Array<{\n    '16x16'?: CamelCaseCommentWithBreaks;\n    bar?: string;\n}>;\n\n/**\n * This is a simple array with any of properties\n */\nexport type ArrayWithAnyOfProperties = Array<{\n    foo?: string;\n} | {\n    bar?: string;\n}>;\n\nexport type AnyOfAnyAndNull = {\n    data?: unknown | null;\n};\n\n/**\n * This is a simple array with any of properties\n */\nexport type AnyOfArrays = {\n    results?: Array<{\n        foo?: string;\n    } | {\n        bar?: string;\n    }>;\n};\n\n/**\n * This is a string dictionary\n */\nexport type DictionaryWithString = {\n    [key: string]: string;\n};\n\nexport type DictionaryWithPropertiesAndAdditionalProperties = {\n    foo?: number;\n    bar?: boolean;\n    [key: string]: string | number | boolean | undefined;\n};\n\n/**\n * This is a string reference\n */\nexport type DictionaryWithReference = {\n    [key: string]: ModelWithString;\n};\n\n/**\n * This is a complex dictionary\n */\nexport type DictionaryWithArray = {\n    [key: string]: Array<ModelWithString>;\n};\n\n/**\n * This is a string dictionary\n */\nexport type DictionaryWithDictionary = {\n    [key: string]: {\n        [key: string]: string;\n    };\n};\n\n/**\n * This is a complex dictionary\n */\nexport type DictionaryWithProperties = {\n    [key: string]: {\n        foo?: string;\n        bar?: string;\n    };\n};\n\n/**\n * This is a model with one number property\n */\nexport type ModelWithInteger = {\n    /**\n     * This is a simple number property\n     */\n    prop?: number;\n};\n\n/**\n * This is a model with one boolean property\n */\nexport type ModelWithBoolean = {\n    /**\n     * This is a simple boolean property\n     */\n    prop?: boolean;\n};\n\n/**\n * This is a model with one string property\n */\nexport type ModelWithString = {\n    /**\n     * This is a simple string property\n     */\n    prop?: string;\n};\n\n/**\n * This is a model with one string property\n */\nexport type ModelWithStringError = {\n    /**\n     * This is a simple string property\n     */\n    prop?: string;\n};\n\n/**\n * `Comment` or `VoiceComment`. The JSON object for adding voice comments to tickets is different. See [Adding voice comments to tickets](/documentation/ticketing/managing-tickets/adding-voice-comments-to-tickets)\n */\nexport type ModelFromZendesk = string;\n\n/**\n * This is a model with one string property\n */\nexport type ModelWithNullableString = {\n    /**\n     * This is a simple string property\n     */\n    nullableProp1?: string | null;\n    /**\n     * This is a simple string property\n     */\n    nullableRequiredProp1: string | null;\n    /**\n     * This is a simple string property\n     */\n    nullableProp2?: string | null;\n    /**\n     * This is a simple string property\n     */\n    nullableRequiredProp2: string | null;\n    /**\n     * This is a simple enum with strings\n     */\n    'foo_bar-enum'?: 'Success' | 'Warning' | 'Error' | 'ØÆÅ字符串';\n};\n\n/**\n * This is a model with one enum\n */\nexport type ModelWithEnum = {\n    /**\n     * This is a simple enum with strings\n     */\n    'foo_bar-enum'?: 'Success' | 'Warning' | 'Error' | 'ØÆÅ字符串';\n    /**\n     * These are the HTTP error code enums\n     */\n    statusCode?: '100' | '200 FOO' | '300 FOO_BAR' | '400 foo-bar' | '500 foo.bar' | '600 foo&bar';\n    /**\n     * Simple boolean enum\n     */\n    bool?: true;\n};\n\n/**\n * This is a model with one enum with escaped name\n */\nexport type ModelWithEnumWithHyphen = {\n    /**\n     * Foo-Bar-Baz-Qux\n     */\n    'foo-bar-baz-qux'?: '3.0';\n};\n\n/**\n * This is a model with one enum\n */\nexport type ModelWithEnumFromDescription = {\n    /**\n     * Success=1,Warning=2,Error=3\n     */\n    test?: number;\n};\n\n/**\n * This is a model with nested enums\n */\nexport type ModelWithNestedEnums = {\n    dictionaryWithEnum?: {\n        [key: string]: 'Success' | 'Warning' | 'Error';\n    };\n    dictionaryWithEnumFromDescription?: {\n        [key: string]: number;\n    };\n    arrayWithEnum?: Array<'Success' | 'Warning' | 'Error'>;\n    arrayWithDescription?: Array<number>;\n    /**\n     * This is a simple enum with strings\n     */\n    'foo_bar-enum'?: 'Success' | 'Warning' | 'Error' | 'ØÆÅ字符串';\n};\n\n/**\n * This is a model with one property containing a reference\n */\nexport type ModelWithReference = {\n    prop?: ModelWithProperties;\n};\n\n/**\n * This is a model with one property containing an array\n */\nexport type ModelWithArrayReadOnlyAndWriteOnly = {\n    prop?: Array<ModelWithReadOnlyAndWriteOnly>;\n    propWithFile?: Array<Blob | File>;\n    propWithNumber?: Array<number>;\n};\n\n/**\n * This is a model with one property containing an array\n */\nexport type ModelWithArray = {\n    prop?: Array<ModelWithString>;\n    propWithFile?: Array<Blob | File>;\n    propWithNumber?: Array<number>;\n};\n\n/**\n * This is a model with one property containing a dictionary\n */\nexport type ModelWithDictionary = {\n    prop?: {\n        [key: string]: string;\n    };\n};\n\n/**\n * This is a deprecated model with a deprecated property\n *\n * @deprecated\n */\nexport type DeprecatedModel = {\n    /**\n     * This is a deprecated property\n     *\n     * @deprecated\n     */\n    prop?: string;\n};\n\n/**\n * This is a model with one property containing a circular reference\n */\nexport type ModelWithCircularReference = {\n    prop?: ModelWithCircularReference;\n};\n\n/**\n * This is a model with one property with a 'one of' relationship\n */\nexport type CompositionWithOneOf = {\n    propA?: ModelWithString | ModelWithEnum | ModelWithArray | ModelWithDictionary;\n};\n\n/**\n * This is a model with one property with a 'one of' relationship where the options are not $ref\n */\nexport type CompositionWithOneOfAnonymous = {\n    propA?: {\n        propA?: string;\n    } | string | number;\n};\n\n/**\n * Circle\n */\nexport type ModelCircle = {\n    kind: string;\n    radius?: number;\n};\n\n/**\n * Square\n */\nexport type ModelSquare = {\n    kind: string;\n    sideLength?: number;\n};\n\n/**\n * This is a model with one property with a 'one of' relationship where the options are not $ref\n */\nexport type CompositionWithOneOfDiscriminator = ({\n    kind: 'circle';\n} & ModelCircle) | ({\n    kind: 'square';\n} & ModelSquare);\n\n/**\n * This is a model with one property with a 'any of' relationship\n */\nexport type CompositionWithAnyOf = {\n    propA?: ModelWithString | ModelWithEnum | ModelWithArray | ModelWithDictionary;\n};\n\n/**\n * This is a model with one property with a 'any of' relationship where the options are not $ref\n */\nexport type CompositionWithAnyOfAnonymous = {\n    propA?: {\n        propA?: string;\n    } | string | number;\n};\n\n/**\n * This is a model with nested 'any of' property with a type null\n */\nexport type CompositionWithNestedAnyAndTypeNull = {\n    propA?: Array<ModelWithDictionary | null> | Array<ModelWithArray | null>;\n};\n\nexport type _3eNum1Период = 'Bird' | 'Dog';\n\nexport type ConstValue = 'ConstValue';\n\n/**\n * This is a model with one property with a 'any of' relationship where the options are not $ref\n */\nexport type CompositionWithNestedAnyOfAndNull = {\n    /**\n     * Scopes\n     */\n    propA?: Array<_3eNum1Период | ConstValue> | null;\n};\n\n/**\n * This is a model with one property with a 'one of' relationship\n */\nexport type CompositionWithOneOfAndNullable = {\n    propA?: {\n        boolean?: boolean;\n    } | ModelWithEnum | ModelWithArray | ModelWithDictionary | null;\n};\n\n/**\n * This is a model that contains a simple dictionary within composition\n */\nexport type CompositionWithOneOfAndSimpleDictionary = {\n    propA?: boolean | {\n        [key: string]: number;\n    };\n};\n\n/**\n * This is a model that contains a dictionary of simple arrays within composition\n */\nexport type CompositionWithOneOfAndSimpleArrayDictionary = {\n    propA?: boolean | {\n        [key: string]: Array<boolean>;\n    };\n};\n\n/**\n * This is a model that contains a dictionary of complex arrays (composited) within composition\n */\nexport type CompositionWithOneOfAndComplexArrayDictionary = {\n    propA?: boolean | {\n        [key: string]: Array<number | string>;\n    };\n};\n\n/**\n * This is a model with one property with a 'all of' relationship\n */\nexport type CompositionWithAllOfAndNullable = {\n    propA?: ({\n        boolean?: boolean;\n    } & ModelWithEnum & ModelWithArray & ModelWithDictionary) | null;\n};\n\n/**\n * This is a model with one property with a 'any of' relationship\n */\nexport type CompositionWithAnyOfAndNullable = {\n    propA?: {\n        boolean?: boolean;\n    } | ModelWithEnum | ModelWithArray | ModelWithDictionary | null;\n};\n\n/**\n * This is a base model with two simple optional properties\n */\nexport type CompositionBaseModel = {\n    firstName?: string;\n    lastname?: string;\n};\n\n/**\n * This is a model that extends the base model\n */\nexport type CompositionExtendedModel = CompositionBaseModel & {\n    age: number;\n    firstName: string;\n    lastname: string;\n};\n\n/**\n * This is a model with one nested property\n */\nexport type ModelWithProperties = {\n    required: string;\n    readonly requiredAndReadOnly: string;\n    requiredAndNullable: string | null;\n    string?: string;\n    number?: number;\n    boolean?: boolean;\n    reference?: ModelWithString;\n    'property with space'?: string;\n    default?: string;\n    try?: string;\n    readonly '@namespace.string'?: string;\n    readonly '@namespace.integer'?: number;\n};\n\n/**\n * This is a model with one nested property\n */\nexport type ModelWithNestedProperties = {\n    readonly first: {\n        readonly second: {\n            readonly third: string | null;\n        } | null;\n    } | null;\n};\n\n/**\n * This is a model with duplicated properties\n */\nexport type ModelWithDuplicateProperties = {\n    prop?: ModelWithString;\n};\n\n/**\n * This is a model with ordered properties\n */\nexport type ModelWithOrderedProperties = {\n    zebra?: string;\n    apple?: string;\n    hawaii?: string;\n};\n\n/**\n * This is a model with duplicated imports\n */\nexport type ModelWithDuplicateImports = {\n    propA?: ModelWithString;\n    propB?: ModelWithString;\n    propC?: ModelWithString;\n};\n\n/**\n * This is a model that extends another model\n */\nexport type ModelThatExtends = ModelWithString & {\n    propExtendsA?: string;\n    propExtendsB?: ModelWithString;\n};\n\n/**\n * This is a model that extends another model\n */\nexport type ModelThatExtendsExtends = ModelWithString & ModelThatExtends & {\n    propExtendsC?: string;\n    propExtendsD?: ModelWithString;\n};\n\n/**\n * This is a model that contains a some patterns\n */\nexport type ModelWithPattern = {\n    key: string;\n    name: string;\n    readonly enabled?: boolean;\n    readonly modified?: string;\n    id?: string;\n    text?: string;\n    patternWithSingleQuotes?: string;\n    patternWithNewline?: string;\n    patternWithBacktick?: string;\n    patternWithUnicode?: string;\n};\n\nexport type File = {\n    /**\n     * Id\n     */\n    readonly id?: string;\n    /**\n     * Updated at\n     */\n    readonly updated_at?: string;\n    /**\n     * Created at\n     */\n    readonly created_at?: string;\n    /**\n     * Mime\n     */\n    mime: string;\n    /**\n     * File\n     */\n    readonly file?: string;\n};\n\nexport type Default = {\n    name?: string;\n};\n\nexport type Pageable = {\n    page?: number;\n    size?: number;\n    sort?: Array<string>;\n};\n\n/**\n * This is a free-form object without additionalProperties.\n */\nexport type FreeFormObjectWithoutAdditionalProperties = {\n    [key: string]: unknown;\n};\n\n/**\n * This is a free-form object with additionalProperties: true.\n */\nexport type FreeFormObjectWithAdditionalPropertiesEqTrue = {\n    [key: string]: unknown;\n};\n\n/**\n * This is a free-form object with additionalProperties: {}.\n */\nexport type FreeFormObjectWithAdditionalPropertiesEqEmptyObject = {\n    [key: string]: unknown;\n};\n\nexport type ModelWithConst = {\n    String?: 'String';\n    number?: 0;\n    null?: null;\n    withType?: 'Some string';\n};\n\n/**\n * This is a model with one property and additionalProperties: true\n */\nexport type ModelWithAdditionalPropertiesEqTrue = {\n    /**\n     * This is a simple string property\n     */\n    prop?: string;\n    [key: string]: unknown;\n};\n\nexport type NestedAnyOfArraysNullable = {\n    nullableArray?: Array<string | boolean> | null;\n};\n\nexport type CompositionWithOneOfAndProperties = ({\n    foo: SimpleParameter;\n} | {\n    bar: NonAsciiStringæøåÆøÅöôêÊ字符串;\n}) & {\n    baz: number | null;\n    qux: number;\n};\n\n/**\n * An object that can be null\n */\nexport type NullableObject = {\n    foo?: string;\n} | null;\n\n/**\n * Some % character\n */\nexport type CharactersInDescription = string;\n\nexport type ModelWithNullableObject = {\n    data?: NullableObject;\n};\n\n/**\n * An object with additional properties that can be null (anyOf ref + null)\n */\nexport type ModelWithAdditionalPropertiesRef = {\n    [key: string]: NullableObject | null;\n};\n\nexport type ModelWithOneOfEnum = {\n    foo: 'Bar';\n} | {\n    foo: 'Baz';\n} | {\n    foo: 'Qux';\n} | {\n    content: string;\n    foo: 'Quux';\n} | {\n    content: [\n        string,\n        string\n    ];\n    foo: 'Corge';\n};\n\nexport type ModelWithNestedArrayEnumsDataFoo = 'foo' | 'bar';\n\nexport type ModelWithNestedArrayEnumsDataBar = 'baz' | 'qux';\n\nexport type ModelWithNestedArrayEnumsData = {\n    foo?: Array<ModelWithNestedArrayEnumsDataFoo>;\n    bar?: Array<ModelWithNestedArrayEnumsDataBar>;\n};\n\nexport type ModelWithNestedArrayEnums = {\n    array_strings?: Array<string>;\n    data?: ModelWithNestedArrayEnumsData;\n};\n\nexport type ModelWithNestedCompositionEnums = {\n    foo?: ModelWithNestedArrayEnumsDataFoo;\n};\n\nexport type ModelWithReadOnlyAndWriteOnly = {\n    foo: string;\n    readonly bar: string;\n};\n\nexport type ModelWithConstantSizeArray = [\n    number,\n    number\n];\n\nexport type ModelWithAnyOfConstantSizeArray = [\n    number | string,\n    number | string,\n    number | string\n];\n\nexport type ModelWithPrefixItemsConstantSizeArray = [\n    ModelWithInteger,\n    number | string,\n    string\n];\n\nexport type ModelWithAnyOfConstantSizeArrayNullable = [\n    number | null | string,\n    number | null | string,\n    number | null | string\n];\n\nexport type ModelWithAnyOfConstantSizeArrayWithNSizeAndOptions = [\n    number | Import,\n    number | Import\n];\n\nexport type ModelWithAnyOfConstantSizeArrayAndIntersect = [\n    number & string,\n    number & string\n];\n\nexport type ModelWithNumericEnumUnion = {\n    /**\n     * Период\n     */\n    value?: -10 | -1 | 0 | 1 | 3 | 6 | 12;\n};\n\n/**\n * Some description with `back ticks`\n */\nexport type ModelWithBackticksInDescription = {\n    /**\n     * The template `that` should be used for parsing and importing the contents of the CSV file.\n     *\n     * <br/><p>There is one placeholder currently supported:<ul>     <li><b>${x}</b> - refers to the n-th column in the CSV file, e.g. ${1}, ${2}, ...)</li></ul><p>Example of a correct JSON template:</p>\n     * <pre>\n     * [\n     * {\n     * \"resourceType\": \"Asset\",\n     * \"identifier\": {\n     * \"name\": \"${1}\",\n     * \"domain\": {\n     * \"name\": \"${2}\",\n     * \"community\": {\n     * \"name\": \"Some Community\"\n     * }\n     * }\n     * },\n     * \"attributes\" : {\n     * \"00000000-0000-0000-0000-000000003115\" : [ {\n     * \"value\" : \"${3}\"\n     * } ],\n     * \"00000000-0000-0000-0000-000000000222\" : [ {\n     * \"value\" : \"${4}\"\n     * } ]\n     * }\n     * }\n     * ]\n     * </pre>\n     */\n    template?: string;\n};\n\nexport type ModelWithOneOfAndProperties = (SimpleParameter | NonAsciiStringæøåÆøÅöôêÊ字符串) & {\n    baz: number | null;\n    qux: number;\n};\n\n/**\n * Model used to test deduplication strategy (unused)\n */\nexport type ParameterSimpleParameterUnused = string;\n\n/**\n * Model used to test deduplication strategy\n */\nexport type PostServiceWithEmptyTagResponse = string;\n\n/**\n * Model used to test deduplication strategy\n */\nexport type PostServiceWithEmptyTagResponse2 = string;\n\n/**\n * Model used to test deduplication strategy\n */\nexport type DeleteFooData = string;\n\n/**\n * Model used to test deduplication strategy\n */\nexport type DeleteFooData2 = string;\n\n/**\n * Model with restricted keyword name\n */\nexport type Import = string;\n\nexport type SchemaWithFormRestrictedKeys = {\n    description?: string;\n    'x-enum-descriptions'?: string;\n    'x-enum-varnames'?: string;\n    'x-enumNames'?: string;\n    title?: string;\n    object?: {\n        description?: string;\n        'x-enum-descriptions'?: string;\n        'x-enum-varnames'?: string;\n        'x-enumNames'?: string;\n        title?: string;\n    };\n    array?: Array<{\n        description?: string;\n        'x-enum-descriptions'?: string;\n        'x-enum-varnames'?: string;\n        'x-enumNames'?: string;\n        title?: string;\n    }>;\n};\n\n/**\n * This schema was giving PascalCase transformations a hard time\n */\nexport type IoK8sApimachineryPkgApisMetaV1DeleteOptions = {\n    /**\n     * Must be fulfilled before a deletion is carried out. If not possible, a 409 Conflict status will be returned.\n     */\n    preconditions?: IoK8sApimachineryPkgApisMetaV1Preconditions;\n};\n\n/**\n * This schema was giving PascalCase transformations a hard time\n */\nexport type IoK8sApimachineryPkgApisMetaV1Preconditions = {\n    /**\n     * Specifies the target ResourceVersion\n     */\n    resourceVersion?: string;\n    /**\n     * Specifies the target UID.\n     */\n    uid?: string;\n};\n\nexport type AdditionalPropertiesUnknownIssue = {\n    [key: string]: string | number;\n};\n\nexport type AdditionalPropertiesUnknownIssue2 = {\n    [key: string]: string | number;\n};\n\nexport type AdditionalPropertiesUnknownIssue3 = string & {\n    entries: {\n        [key: string]: AdditionalPropertiesUnknownIssue;\n    };\n};\n\nexport type AdditionalPropertiesIntegerIssue = {\n    value: number;\n    [key: string]: number;\n};\n\nexport type OneOfAllOfIssue = ((ConstValue | GenericSchemaDuplicateIssue1SystemBoolean) & _3eNum1Период) | GenericSchemaDuplicateIssue1SystemString;\n\nexport type GenericSchemaDuplicateIssue1SystemBoolean = {\n    item?: boolean;\n    error?: string | null;\n    readonly hasError?: boolean;\n    data?: {\n        [key: string]: never;\n    };\n};\n\nexport type GenericSchemaDuplicateIssue1SystemString = {\n    item?: string | null;\n    error?: string | null;\n    readonly hasError?: boolean;\n};\n\nexport type ExternalSharedModel = {\n    id: string;\n    name?: string;\n};\n\n/**\n * This is a model with one property containing a reference\n */\nexport type ModelWithReferenceWritable = {\n    prop?: ModelWithPropertiesWritable;\n};\n\n/**\n * This is a model with one property containing an array\n */\nexport type ModelWithArrayReadOnlyAndWriteOnlyWritable = {\n    prop?: Array<ModelWithReadOnlyAndWriteOnlyWritable>;\n    propWithFile?: Array<Blob | File>;\n    propWithNumber?: Array<number>;\n};\n\n/**\n * This is a model with one nested property\n */\nexport type ModelWithPropertiesWritable = {\n    required: string;\n    requiredAndNullable: string | null;\n    string?: string;\n    number?: number;\n    boolean?: boolean;\n    reference?: ModelWithString;\n    'property with space'?: string;\n    default?: string;\n    try?: string;\n};\n\n/**\n * This is a model that contains a some patterns\n */\nexport type ModelWithPatternWritable = {\n    key: string;\n    name: string;\n    id?: string;\n    text?: string;\n    patternWithSingleQuotes?: string;\n    patternWithNewline?: string;\n    patternWithBacktick?: string;\n    patternWithUnicode?: string;\n};\n\nexport type FileWritable = {\n    /**\n     * Mime\n     */\n    mime: string;\n};\n\nexport type ModelWithReadOnlyAndWriteOnlyWritable = {\n    foo: string;\n    baz: string;\n};\n\nexport type ModelWithAnyOfConstantSizeArrayWithNSizeAndOptionsWritable = [\n    number | Import,\n    number | Import\n];\n\nexport type AdditionalPropertiesUnknownIssueWritable = {\n    [key: string]: string | number;\n};\n\nexport type OneOfAllOfIssueWritable = ((ConstValue | GenericSchemaDuplicateIssue1SystemBoolean) & _3eNum1Период) | GenericSchemaDuplicateIssue1SystemString;\n\nexport type GenericSchemaDuplicateIssue1SystemBooleanWritable = {\n    item?: boolean;\n    error?: string | null;\n    data?: {\n        [key: string]: never;\n    };\n};\n\nexport type GenericSchemaDuplicateIssue1SystemStringWritable = {\n    item?: string | null;\n    error?: string | null;\n};\n\n/**\n * This is a reusable parameter\n */\nexport type SimpleParameter = string;\n\n/**\n * Parameter with illegal characters\n */\nexport type XFooBar = ModelWithString;\n\n/**\n * A reusable request body\n */\nexport type SimpleRequestBody = ModelWithString;\n\n/**\n * A reusable request body\n */\nexport type SimpleFormData = ModelWithString;\n\nexport type ExportData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no+tag';\n};\n\nexport type PatchApiVbyApiVersionNoTagData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no+tag';\n};\n\nexport type PatchApiVbyApiVersionNoTagResponses = {\n    /**\n     * OK\n     */\n    default: unknown;\n};\n\nexport type ImportData = {\n    body: ModelWithReadOnlyAndWriteOnlyWritable | ModelWithArrayReadOnlyAndWriteOnlyWritable;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no+tag';\n};\n\nexport type ImportResponses = {\n    /**\n     * Success\n     */\n    200: ModelFromZendesk;\n    /**\n     * Default success response\n     */\n    default: ModelWithReadOnlyAndWriteOnly;\n};\n\nexport type ImportResponse = ImportResponses[keyof ImportResponses];\n\nexport type FooWowData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no+tag';\n};\n\nexport type FooWowResponses = {\n    /**\n     * OK\n     */\n    default: unknown;\n};\n\nexport type ApiVVersionODataControllerCountData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple/$count';\n};\n\nexport type ApiVVersionODataControllerCountResponses = {\n    /**\n     * Success\n     */\n    200: ModelFromZendesk;\n};\n\nexport type ApiVVersionODataControllerCountResponse = ApiVVersionODataControllerCountResponses[keyof ApiVVersionODataControllerCountResponses];\n\nexport type GetApiVbyApiVersionSimpleOperationData = {\n    body?: never;\n    path: {\n        /**\n         * foo in method\n         */\n        foo_param: string;\n    };\n    query?: never;\n    url: '/api/v{api-version}/simple:operation';\n};\n\nexport type GetApiVbyApiVersionSimpleOperationErrors = {\n    /**\n     * Default error response\n     */\n    default: ModelWithBoolean;\n};\n\nexport type GetApiVbyApiVersionSimpleOperationError = GetApiVbyApiVersionSimpleOperationErrors[keyof GetApiVbyApiVersionSimpleOperationErrors];\n\nexport type GetApiVbyApiVersionSimpleOperationResponses = {\n    /**\n     * Response is a simple number\n     */\n    200: number;\n};\n\nexport type GetApiVbyApiVersionSimpleOperationResponse = GetApiVbyApiVersionSimpleOperationResponses[keyof GetApiVbyApiVersionSimpleOperationResponses];\n\nexport type DeleteCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type GetCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type HeadCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type OptionsCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type PatchCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type PostCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type PutCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type DeleteFooData3 = {\n    body?: never;\n    headers: {\n        /**\n         * Parameter with illegal characters\n         */\n        'x-Foo-Bar': ModelWithString;\n    };\n    path: {\n        /**\n         * foo in method\n         */\n        foo_param: string;\n        /**\n         * bar in method\n         */\n        BarParam: string;\n    };\n    query?: never;\n    url: '/api/v{api-version}/foo/{foo_param}/bar/{BarParam}';\n};\n\nexport type CallWithDescriptionsData = {\n    body?: never;\n    path?: never;\n    query?: {\n        /**\n         * Testing multiline comments in string: First line\n         * Second line\n         *\n         * Fourth line\n         */\n        parameterWithBreaks?: string;\n        /**\n         * Testing backticks in string: `backticks` and ```multiple backticks``` should work\n         */\n        parameterWithBackticks?: string;\n        /**\n         * Testing slashes in string: \\backwards\\\\\\ and /forwards/// should work\n         */\n        parameterWithSlashes?: string;\n        /**\n         * Testing expression placeholders in string: ${expression} should work\n         */\n        parameterWithExpressionPlaceholders?: string;\n        /**\n         * Testing quotes in string: 'single quote''' and \"double quotes\"\"\" should work\n         */\n        parameterWithQuotes?: string;\n        /**\n         * Testing reserved characters in string: * inline * and ** inline ** should work\n         */\n        parameterWithReservedCharacters?: string;\n    };\n    url: '/api/v{api-version}/descriptions';\n};\n\nexport type DeprecatedCallData = {\n    body?: never;\n    headers: {\n        /**\n         * This parameter is deprecated\n         *\n         * @deprecated\n         */\n        parameter: DeprecatedModel | null;\n    };\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/parameters/deprecated';\n};\n\nexport type CallWithParametersData = {\n    /**\n     * This is the parameter that goes into the body\n     */\n    body: {\n        [key: string]: unknown;\n    } | null;\n    headers: {\n        /**\n         * This is the parameter that goes into the header\n         */\n        parameterHeader: string | null;\n    };\n    path: {\n        /**\n         * This is the parameter that goes into the path\n         */\n        parameterPath: string | null;\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string | null;\n    };\n    query: {\n        foo_ref_enum?: ModelWithNestedArrayEnumsDataFoo;\n        foo_all_of_enum: ModelWithNestedArrayEnumsDataFoo;\n        /**\n         * This is the parameter that goes into the query params\n         */\n        cursor: string | null;\n    };\n    url: '/api/v{api-version}/parameters/{parameterPath}';\n};\n\nexport type CallWithWeirdParameterNamesData = {\n    /**\n     * This is the parameter that goes into the body\n     */\n    body: ModelWithString | null;\n    headers: {\n        /**\n         * This is the parameter that goes into the request header\n         */\n        'parameter.header': string | null;\n    };\n    path: {\n        /**\n         * This is the parameter that goes into the path\n         */\n        'parameter.path.1'?: string;\n        /**\n         * This is the parameter that goes into the path\n         */\n        'parameter-path-2'?: string;\n        /**\n         * This is the parameter that goes into the path\n         */\n        'PARAMETER-PATH-3'?: string;\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string | null;\n    };\n    query: {\n        /**\n         * This is the parameter with a reserved keyword\n         */\n        default?: string;\n        /**\n         * This is the parameter that goes into the request query params\n         */\n        'parameter-query': string | null;\n    };\n    url: '/api/v{api-version}/parameters/{parameter.path.1}/{parameter-path-2}/{PARAMETER-PATH-3}';\n};\n\nexport type GetCallWithOptionalParamData = {\n    /**\n     * This is a required parameter\n     */\n    body: ModelWithOneOfEnum;\n    path?: never;\n    query?: {\n        /**\n         * This is an optional parameter\n         */\n        page?: number;\n    };\n    url: '/api/v{api-version}/parameters';\n};\n\nexport type PostCallWithOptionalParamData = {\n    /**\n     * This is an optional parameter\n     */\n    body?: {\n        offset?: number | null;\n    };\n    path?: never;\n    query: {\n        /**\n         * This is a required parameter\n         */\n        parameter: Pageable;\n    };\n    url: '/api/v{api-version}/parameters';\n};\n\nexport type PostCallWithOptionalParamResponses = {\n    /**\n     * Response is a simple number\n     */\n    200: number;\n    /**\n     * Success\n     */\n    204: void;\n};\n\nexport type PostCallWithOptionalParamResponse = PostCallWithOptionalParamResponses[keyof PostCallWithOptionalParamResponses];\n\nexport type PostApiVbyApiVersionRequestBodyData = {\n    /**\n     * A reusable request body\n     */\n    body?: SimpleRequestBody;\n    path?: never;\n    query?: {\n        /**\n         * This is a reusable parameter\n         */\n        parameter?: string;\n    };\n    url: '/api/v{api-version}/requestBody';\n};\n\nexport type PostApiVbyApiVersionFormDataData = {\n    /**\n     * A reusable request body\n     */\n    body?: SimpleFormData;\n    path?: never;\n    query?: {\n        /**\n         * This is a reusable parameter\n         */\n        parameter?: string;\n    };\n    url: '/api/v{api-version}/formData';\n};\n\nexport type CallWithDefaultParametersData = {\n    body?: never;\n    path?: never;\n    query?: {\n        /**\n         * This is a simple string with default value\n         */\n        parameterString?: string | null;\n        /**\n         * This is a simple number with default value\n         */\n        parameterNumber?: number | null;\n        /**\n         * This is a simple boolean with default value\n         */\n        parameterBoolean?: boolean | null;\n        /**\n         * This is a simple enum with default value\n         */\n        parameterEnum?: 'Success' | 'Warning' | 'Error';\n        /**\n         * This is a simple model with default value\n         */\n        parameterModel?: ModelWithString | null;\n    };\n    url: '/api/v{api-version}/defaults';\n};\n\nexport type CallWithDefaultOptionalParametersData = {\n    body?: never;\n    path?: never;\n    query?: {\n        /**\n         * This is a simple string that is optional with default value\n         */\n        parameterString?: string;\n        /**\n         * This is a simple number that is optional with default value\n         */\n        parameterNumber?: number;\n        /**\n         * This is a simple boolean that is optional with default value\n         */\n        parameterBoolean?: boolean;\n        /**\n         * This is a simple enum that is optional with default value\n         */\n        parameterEnum?: 'Success' | 'Warning' | 'Error';\n        /**\n         * This is a simple model that is optional with default value\n         */\n        parameterModel?: ModelWithString;\n    };\n    url: '/api/v{api-version}/defaults';\n};\n\nexport type CallToTestOrderOfParamsData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * This is a optional string with default\n         */\n        parameterOptionalStringWithDefault?: string;\n        /**\n         * This is a optional string with empty default\n         */\n        parameterOptionalStringWithEmptyDefault?: string;\n        /**\n         * This is a optional string with no default\n         */\n        parameterOptionalStringWithNoDefault?: string;\n        /**\n         * This is a string with default\n         */\n        parameterStringWithDefault: string;\n        /**\n         * This is a string with empty default\n         */\n        parameterStringWithEmptyDefault: string;\n        /**\n         * This is a string with no default\n         */\n        parameterStringWithNoDefault: string;\n        /**\n         * This is a string that can be null with no default\n         */\n        parameterStringNullableWithNoDefault?: string | null;\n        /**\n         * This is a string that can be null with default\n         */\n        parameterStringNullableWithDefault?: string | null;\n    };\n    url: '/api/v{api-version}/defaults';\n};\n\nexport type DuplicateNameData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/duplicate';\n};\n\nexport type DuplicateName2Data = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/duplicate';\n};\n\nexport type DuplicateName3Data = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/duplicate';\n};\n\nexport type DuplicateName4Data = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/duplicate';\n};\n\nexport type CallWithNoContentResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no-content';\n};\n\nexport type CallWithNoContentResponseResponses = {\n    /**\n     * Success\n     */\n    204: void;\n};\n\nexport type CallWithNoContentResponseResponse = CallWithNoContentResponseResponses[keyof CallWithNoContentResponseResponses];\n\nexport type CallWithResponseAndNoContentResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multiple-tags/response-and-no-content';\n};\n\nexport type CallWithResponseAndNoContentResponseResponses = {\n    /**\n     * Response is a simple number\n     */\n    200: number;\n    /**\n     * Success\n     */\n    204: void;\n};\n\nexport type CallWithResponseAndNoContentResponseResponse = CallWithResponseAndNoContentResponseResponses[keyof CallWithResponseAndNoContentResponseResponses];\n\nexport type DummyAData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multiple-tags/a';\n};\n\nexport type DummyAResponses = {\n    200: _400;\n};\n\nexport type DummyAResponse = DummyAResponses[keyof DummyAResponses];\n\nexport type DummyBData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multiple-tags/b';\n};\n\nexport type DummyBResponses = {\n    /**\n     * Success\n     */\n    204: void;\n};\n\nexport type DummyBResponse = DummyBResponses[keyof DummyBResponses];\n\nexport type CallWithResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/response';\n};\n\nexport type CallWithResponseResponses = {\n    default: Import;\n};\n\nexport type CallWithResponseResponse = CallWithResponseResponses[keyof CallWithResponseResponses];\n\nexport type CallWithDuplicateResponsesData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/response';\n};\n\nexport type CallWithDuplicateResponsesErrors = {\n    /**\n     * Message for 500 error\n     */\n    500: ModelWithStringError;\n    /**\n     * Message for 501 error\n     */\n    501: ModelWithStringError;\n    /**\n     * Message for 502 error\n     */\n    502: ModelWithStringError;\n    /**\n     * Message for 4XX errors\n     */\n    '4XX': DictionaryWithArray;\n    /**\n     * Default error response\n     */\n    default: ModelWithBoolean;\n};\n\nexport type CallWithDuplicateResponsesError = CallWithDuplicateResponsesErrors[keyof CallWithDuplicateResponsesErrors];\n\nexport type CallWithDuplicateResponsesResponses = {\n    /**\n     * Message for 200 response\n     */\n    200: ModelWithBoolean & ModelWithInteger;\n    /**\n     * Message for 201 response\n     */\n    201: ModelWithString;\n    /**\n     * Message for 202 response\n     */\n    202: ModelWithString;\n};\n\nexport type CallWithDuplicateResponsesResponse = CallWithDuplicateResponsesResponses[keyof CallWithDuplicateResponsesResponses];\n\nexport type CallWithResponsesData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/response';\n};\n\nexport type CallWithResponsesErrors = {\n    /**\n     * Message for 500 error\n     */\n    500: ModelWithStringError;\n    /**\n     * Message for 501 error\n     */\n    501: ModelWithStringError;\n    /**\n     * Message for 502 error\n     */\n    502: ModelWithStringError;\n    /**\n     * Message for default response\n     */\n    default: ModelWithStringError;\n};\n\nexport type CallWithResponsesError = CallWithResponsesErrors[keyof CallWithResponsesErrors];\n\nexport type CallWithResponsesResponses = {\n    /**\n     * Message for 200 response\n     */\n    200: {\n        readonly '@namespace.string'?: string;\n        readonly '@namespace.integer'?: number;\n        readonly value?: Array<ModelWithString>;\n    };\n    /**\n     * Message for 201 response\n     */\n    201: ModelThatExtends;\n    /**\n     * Message for 202 response\n     */\n    202: ModelThatExtendsExtends;\n};\n\nexport type CallWithResponsesResponse = CallWithResponsesResponses[keyof CallWithResponsesResponses];\n\nexport type CollectionFormatData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * This is an array parameter that is sent as csv format (comma-separated values)\n         */\n        parameterArrayCSV: Array<string> | null;\n        /**\n         * This is an array parameter that is sent as ssv format (space-separated values)\n         */\n        parameterArraySSV: Array<string> | null;\n        /**\n         * This is an array parameter that is sent as tsv format (tab-separated values)\n         */\n        parameterArrayTSV: Array<string> | null;\n        /**\n         * This is an array parameter that is sent as pipes format (pipe-separated values)\n         */\n        parameterArrayPipes: Array<string> | null;\n        /**\n         * This is an array parameter that is sent as multi format (multiple parameter instances)\n         */\n        parameterArrayMulti: Array<string> | null;\n    };\n    url: '/api/v{api-version}/collectionFormat';\n};\n\nexport type TypesData = {\n    body?: never;\n    path?: {\n        /**\n         * This is a number parameter\n         */\n        id?: number;\n    };\n    query: {\n        /**\n         * This is a number parameter\n         */\n        parameterNumber: number;\n        /**\n         * This is a string parameter\n         */\n        parameterString: string | null;\n        /**\n         * This is a boolean parameter\n         */\n        parameterBoolean: boolean | null;\n        /**\n         * This is an object parameter\n         */\n        parameterObject: {\n            [key: string]: unknown;\n        } | null;\n        /**\n         * This is an array parameter\n         */\n        parameterArray: Array<string> | null;\n        /**\n         * This is a dictionary parameter\n         */\n        parameterDictionary: {\n            [key: string]: unknown;\n        } | null;\n        /**\n         * This is an enum parameter\n         */\n        parameterEnum: 'Success' | 'Warning' | 'Error' | null;\n    };\n    url: '/api/v{api-version}/types';\n};\n\nexport type TypesResponses = {\n    /**\n     * Response is a simple number\n     */\n    200: number;\n    /**\n     * Response is a simple string\n     */\n    201: string;\n    /**\n     * Response is a simple boolean\n     */\n    202: boolean;\n    /**\n     * Response is a simple object\n     */\n    203: {\n        [key: string]: unknown;\n    };\n};\n\nexport type TypesResponse = TypesResponses[keyof TypesResponses];\n\nexport type UploadFileData = {\n    body: Blob | File;\n    path: {\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string | null;\n    };\n    query?: never;\n    url: '/api/v{api-version}/upload';\n};\n\nexport type UploadFileResponses = {\n    200: boolean;\n};\n\nexport type UploadFileResponse = UploadFileResponses[keyof UploadFileResponses];\n\nexport type FileResponseData = {\n    body?: never;\n    path: {\n        id: string;\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string;\n    };\n    query?: never;\n    url: '/api/v{api-version}/file/{id}';\n};\n\nexport type FileResponseResponses = {\n    /**\n     * Success\n     */\n    200: Blob | File;\n};\n\nexport type FileResponseResponse = FileResponseResponses[keyof FileResponseResponses];\n\nexport type ComplexTypesData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * Parameter containing object\n         */\n        parameterObject: {\n            first?: {\n                second?: {\n                    third?: string;\n                };\n            };\n        };\n        /**\n         * Parameter containing reference\n         */\n        parameterReference: ModelWithString;\n    };\n    url: '/api/v{api-version}/complex';\n};\n\nexport type ComplexTypesErrors = {\n    /**\n     * 400 `server` error\n     */\n    400: unknown;\n    /**\n     * 500 server error\n     */\n    500: unknown;\n};\n\nexport type ComplexTypesResponses = {\n    /**\n     * Successful response\n     */\n    200: Array<ModelWithString>;\n};\n\nexport type ComplexTypesResponse = ComplexTypesResponses[keyof ComplexTypesResponses];\n\nexport type MultipartResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multipart';\n};\n\nexport type MultipartResponseResponses = {\n    /**\n     * OK\n     */\n    200: {\n        file?: Blob | File;\n        metadata?: {\n            foo?: string;\n            bar?: string;\n        };\n    };\n};\n\nexport type MultipartResponseResponse = MultipartResponseResponses[keyof MultipartResponseResponses];\n\nexport type MultipartRequestData = {\n    body?: {\n        content?: Blob | File;\n        data?: ModelWithString | null;\n    };\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multipart';\n};\n\nexport type ComplexParamsData = {\n    body?: {\n        readonly key: string | null;\n        name: string | null;\n        enabled?: boolean;\n        type: 'Monkey' | 'Horse' | 'Bird';\n        listOfModels?: Array<ModelWithString> | null;\n        listOfStrings?: Array<string> | null;\n        parameters: ModelWithString | ModelWithEnum | ModelWithArray | ModelWithDictionary;\n        readonly user?: {\n            readonly id?: number;\n            readonly name?: string | null;\n        };\n    };\n    path: {\n        id: number;\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string;\n    };\n    query?: never;\n    url: '/api/v{api-version}/complex/{id}';\n};\n\nexport type ComplexParamsResponses = {\n    /**\n     * Success\n     */\n    200: ModelWithString;\n};\n\nexport type ComplexParamsResponse = ComplexParamsResponses[keyof ComplexParamsResponses];\n\nexport type CallWithResultFromHeaderData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/header';\n};\n\nexport type CallWithResultFromHeaderErrors = {\n    /**\n     * 400 server error\n     */\n    400: unknown;\n    /**\n     * 500 server error\n     */\n    500: unknown;\n};\n\nexport type CallWithResultFromHeaderResponses = {\n    /**\n     * Successful response\n     */\n    200: unknown;\n};\n\nexport type TestErrorCodeData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * Status code to return\n         */\n        status: number;\n    };\n    url: '/api/v{api-version}/error';\n};\n\nexport type TestErrorCodeErrors = {\n    /**\n     * Custom message: Internal Server Error\n     */\n    500: unknown;\n    /**\n     * Custom message: Not Implemented\n     */\n    501: unknown;\n    /**\n     * Custom message: Bad Gateway\n     */\n    502: unknown;\n    /**\n     * Custom message: Service Unavailable\n     */\n    503: unknown;\n};\n\nexport type TestErrorCodeResponses = {\n    /**\n     * Custom message: Successful response\n     */\n    200: unknown;\n};\n\nexport type NonAsciiæøåÆøÅöôêÊ字符串Data = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * Dummy input param\n         */\n        nonAsciiParamæøåÆØÅöôêÊ: number;\n    };\n    url: '/api/v{api-version}/non-ascii-æøåÆØÅöôêÊ字符串';\n};\n\nexport type NonAsciiæøåÆøÅöôêÊ字符串Responses = {\n    /**\n     * Successful response\n     */\n    200: Array<NonAsciiStringæøåÆøÅöôêÊ字符串>;\n};\n\nexport type NonAsciiæøåÆøÅöôêÊ字符串Response = NonAsciiæøåÆøÅöôêÊ字符串Responses[keyof NonAsciiæøåÆøÅöôêÊ字符串Responses];\n\nexport type PutWithFormUrlEncodedData = {\n    body: ArrayWithStrings;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/non-ascii-æøåÆØÅöôêÊ字符串';\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/client-custom/base-url-string/custom-client.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport { type ClientOptions, type Config, createClient, createConfig } from '@hey-api/custom-client';\n\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://foo.com' }));\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/client-custom/base-url-string/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type { _3eNum1Период, _400, AdditionalPropertiesIntegerIssue, AdditionalPropertiesUnknownIssue, AdditionalPropertiesUnknownIssue2, AdditionalPropertiesUnknownIssue3, AdditionalPropertiesUnknownIssueWritable, AnyOfAnyAndNull, AnyOfArrays, ApiVVersionODataControllerCountData, ApiVVersionODataControllerCountResponse, ApiVVersionODataControllerCountResponses, ArrayWithAnyOfProperties, ArrayWithArray, ArrayWithBooleans, ArrayWithNumbers, ArrayWithProperties, ArrayWithReferences, ArrayWithStrings, CallToTestOrderOfParamsData, CallWithDefaultOptionalParametersData, CallWithDefaultParametersData, CallWithDescriptionsData, CallWithDuplicateResponsesData, CallWithDuplicateResponsesError, CallWithDuplicateResponsesErrors, CallWithDuplicateResponsesResponse, CallWithDuplicateResponsesResponses, CallWithNoContentResponseData, CallWithNoContentResponseResponse, CallWithNoContentResponseResponses, CallWithParametersData, CallWithResponseAndNoContentResponseData, CallWithResponseAndNoContentResponseResponse, CallWithResponseAndNoContentResponseResponses, CallWithResponseData, CallWithResponseResponse, CallWithResponseResponses, CallWithResponsesData, CallWithResponsesError, CallWithResponsesErrors, CallWithResponsesResponse, CallWithResponsesResponses, CallWithResultFromHeaderData, CallWithResultFromHeaderErrors, CallWithResultFromHeaderResponses, CallWithWeirdParameterNamesData, CamelCaseCommentWithBreaks, CharactersInDescription, ClientOptions, CollectionFormatData, CommentWithBackticks, CommentWithBackticksAndQuotes, CommentWithBreaks, CommentWithExpressionPlaceholders, CommentWithQuotes, CommentWithReservedCharacters, CommentWithSlashes, ComplexParamsData, ComplexParamsResponse, ComplexParamsResponses, ComplexTypesData, ComplexTypesErrors, ComplexTypesResponse, ComplexTypesResponses, CompositionBaseModel, CompositionExtendedModel, CompositionWithAllOfAndNullable, CompositionWithAnyOf, CompositionWithAnyOfAndNullable, CompositionWithAnyOfAnonymous, CompositionWithNestedAnyAndTypeNull, CompositionWithNestedAnyOfAndNull, CompositionWithOneOf, CompositionWithOneOfAndComplexArrayDictionary, CompositionWithOneOfAndNullable, CompositionWithOneOfAndProperties, CompositionWithOneOfAndSimpleArrayDictionary, CompositionWithOneOfAndSimpleDictionary, CompositionWithOneOfAnonymous, CompositionWithOneOfDiscriminator, ConstValue, Default, DeleteCallWithoutParametersAndResponseData, DeleteFooData, DeleteFooData2, DeleteFooData3, DeprecatedCallData, DeprecatedModel, DictionaryWithArray, DictionaryWithDictionary, DictionaryWithProperties, DictionaryWithPropertiesAndAdditionalProperties, DictionaryWithReference, DictionaryWithString, DummyAData, DummyAResponse, DummyAResponses, DummyBData, DummyBResponse, DummyBResponses, DuplicateName2Data, DuplicateName3Data, DuplicateName4Data, DuplicateNameData, EnumFromDescription, EnumWithExtensions, EnumWithNumbers, EnumWithReplacedCharacters, EnumWithStrings, EnumWithXEnumNames, ExportData, ExternalRefA, ExternalRefB, ExternalSharedModel, File, FileResponseData, FileResponseResponse, FileResponseResponses, FileWritable, FooWowData, FooWowResponses, FreeFormObjectWithAdditionalPropertiesEqEmptyObject, FreeFormObjectWithAdditionalPropertiesEqTrue, FreeFormObjectWithoutAdditionalProperties, GenericSchemaDuplicateIssue1SystemBoolean, GenericSchemaDuplicateIssue1SystemBooleanWritable, GenericSchemaDuplicateIssue1SystemString, GenericSchemaDuplicateIssue1SystemStringWritable, GetApiVbyApiVersionSimpleOperationData, GetApiVbyApiVersionSimpleOperationError, GetApiVbyApiVersionSimpleOperationErrors, GetApiVbyApiVersionSimpleOperationResponse, GetApiVbyApiVersionSimpleOperationResponses, GetCallWithOptionalParamData, GetCallWithoutParametersAndResponseData, HeadCallWithoutParametersAndResponseData, Import, ImportData, ImportResponse, ImportResponses, IoK8sApimachineryPkgApisMetaV1DeleteOptions, IoK8sApimachineryPkgApisMetaV1Preconditions, ModelCircle, ModelFromZendesk, ModelSquare, ModelThatExtends, ModelThatExtendsExtends, ModelWithAdditionalPropertiesEqTrue, ModelWithAdditionalPropertiesRef, ModelWithAnyOfConstantSizeArray, ModelWithAnyOfConstantSizeArrayAndIntersect, ModelWithAnyOfConstantSizeArrayNullable, ModelWithAnyOfConstantSizeArrayWithNSizeAndOptions, ModelWithAnyOfConstantSizeArrayWithNSizeAndOptionsWritable, ModelWithArray, ModelWithArrayReadOnlyAndWriteOnly, ModelWithArrayReadOnlyAndWriteOnlyWritable, ModelWithBackticksInDescription, ModelWithBoolean, ModelWithCircularReference, ModelWithConst, ModelWithConstantSizeArray, ModelWithDictionary, ModelWithDuplicateImports, ModelWithDuplicateProperties, ModelWithEnum, ModelWithEnumFromDescription, ModelWithEnumWithHyphen, ModelWithInteger, ModelWithNestedArrayEnums, ModelWithNestedArrayEnumsData, ModelWithNestedArrayEnumsDataBar, ModelWithNestedArrayEnumsDataFoo, ModelWithNestedCompositionEnums, ModelWithNestedEnums, ModelWithNestedProperties, ModelWithNullableObject, ModelWithNullableString, ModelWithNumericEnumUnion, ModelWithOneOfAndProperties, ModelWithOneOfEnum, ModelWithOrderedProperties, ModelWithPattern, ModelWithPatternWritable, ModelWithPrefixItemsConstantSizeArray, ModelWithProperties, ModelWithPropertiesWritable, ModelWithReadOnlyAndWriteOnly, ModelWithReadOnlyAndWriteOnlyWritable, ModelWithReference, ModelWithReferenceWritable, ModelWithString, ModelWithStringError, MultipartRequestData, MultipartResponseData, MultipartResponseResponse, MultipartResponseResponses, NestedAnyOfArraysNullable, NonAsciiæøåÆøÅöôêÊ字符串Data, NonAsciiæøåÆøÅöôêÊ字符串Response, NonAsciiæøåÆøÅöôêÊ字符串Responses, NonAsciiStringæøåÆøÅöôêÊ字符串, NullableObject, OneOfAllOfIssue, OneOfAllOfIssueWritable, OptionsCallWithoutParametersAndResponseData, Pageable, ParameterSimpleParameterUnused, PatchApiVbyApiVersionNoTagData, PatchApiVbyApiVersionNoTagResponses, PatchCallWithoutParametersAndResponseData, PostApiVbyApiVersionFormDataData, PostApiVbyApiVersionRequestBodyData, PostCallWithOptionalParamData, PostCallWithOptionalParamResponse, PostCallWithOptionalParamResponses, PostCallWithoutParametersAndResponseData, PostServiceWithEmptyTagResponse, PostServiceWithEmptyTagResponse2, PutCallWithoutParametersAndResponseData, PutWithFormUrlEncodedData, SchemaWithFormRestrictedKeys, SimpleBoolean, SimpleFile, SimpleFormData, SimpleInteger, SimpleParameter, SimpleReference, SimpleRequestBody, SimpleString, SimpleStringWithPattern, TestErrorCodeData, TestErrorCodeErrors, TestErrorCodeResponses, TypesData, TypesResponse, TypesResponses, UploadFileData, UploadFileResponse, UploadFileResponses, XFooBar } from './types.gen';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/client-custom/base-url-string/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type ClientOptions = {\n    baseUrl: 'http://localhost:3000/base' | (string & {});\n};\n\n/**\n * Model with number-only name\n */\nexport type _400 = string;\n\n/**\n * External ref to shared model (A)\n */\nexport type ExternalRefA = ExternalSharedModel;\n\n/**\n * External ref to shared model (B)\n */\nexport type ExternalRefB = ExternalSharedModel;\n\n/**\n * Testing multiline comments in string: First line\n * Second line\n *\n * Fourth line\n */\nexport type CamelCaseCommentWithBreaks = number;\n\n/**\n * Testing multiline comments in string: First line\n * Second line\n *\n * Fourth line\n */\nexport type CommentWithBreaks = number;\n\n/**\n * Testing backticks in string: `backticks` and ```multiple backticks``` should work\n */\nexport type CommentWithBackticks = number;\n\n/**\n * Testing backticks and quotes in string: `backticks`, 'quotes', \"double quotes\" and ```multiple backticks``` should work\n */\nexport type CommentWithBackticksAndQuotes = number;\n\n/**\n * Testing slashes in string: \\backwards\\\\\\ and /forwards/// should work\n */\nexport type CommentWithSlashes = number;\n\n/**\n * Testing expression placeholders in string: ${expression} should work\n */\nexport type CommentWithExpressionPlaceholders = number;\n\n/**\n * Testing quotes in string: 'single quote''' and \"double quotes\"\"\" should work\n */\nexport type CommentWithQuotes = number;\n\n/**\n * Testing reserved characters in string: * inline * and ** inline ** should work\n */\nexport type CommentWithReservedCharacters = number;\n\n/**\n * This is a simple number\n */\nexport type SimpleInteger = number;\n\n/**\n * This is a simple boolean\n */\nexport type SimpleBoolean = boolean;\n\n/**\n * This is a simple string\n */\nexport type SimpleString = string;\n\n/**\n * A string with non-ascii (unicode) characters valid in typescript identifiers (æøåÆØÅöÔèÈ字符串)\n */\nexport type NonAsciiStringæøåÆøÅöôêÊ字符串 = string;\n\n/**\n * This is a simple file\n */\nexport type SimpleFile = Blob | File;\n\n/**\n * This is a simple reference\n */\nexport type SimpleReference = ModelWithString;\n\n/**\n * This is a simple string\n */\nexport type SimpleStringWithPattern = string | null;\n\n/**\n * This is a simple enum with strings\n */\nexport type EnumWithStrings = 'Success' | 'Warning' | 'Error' | '\\'Single Quote\\'' | '\"Double Quotes\"' | 'Non-ascii: øæåôöØÆÅÔÖ字符串';\n\nexport type EnumWithReplacedCharacters = '\\'Single Quote\\'' | '\"Double Quotes\"' | 'øæåôöØÆÅÔÖ字符串' | 3.1 | '';\n\n/**\n * This is a simple enum with numbers\n */\nexport type EnumWithNumbers = 1 | 2 | 3 | 1.1 | 1.2 | 1.3 | 100 | 200 | 300 | -100 | -200 | -300 | -1.1 | -1.2 | -1.3;\n\n/**\n * Success=1,Warning=2,Error=3\n */\nexport type EnumFromDescription = number;\n\n/**\n * This is a simple enum with numbers\n */\nexport type EnumWithExtensions = 200 | 400 | 500;\n\nexport type EnumWithXEnumNames = 0 | 1 | 2;\n\n/**\n * This is a simple array with numbers\n */\nexport type ArrayWithNumbers = Array<number>;\n\n/**\n * This is a simple array with booleans\n */\nexport type ArrayWithBooleans = Array<boolean>;\n\n/**\n * This is a simple array with strings\n */\nexport type ArrayWithStrings = Array<string>;\n\n/**\n * This is a simple array with references\n */\nexport type ArrayWithReferences = Array<ModelWithString>;\n\n/**\n * This is a simple array containing an array\n */\nexport type ArrayWithArray = Array<Array<ModelWithString>>;\n\n/**\n * This is a simple array with properties\n */\nexport type ArrayWithProperties = Array<{\n    '16x16'?: CamelCaseCommentWithBreaks;\n    bar?: string;\n}>;\n\n/**\n * This is a simple array with any of properties\n */\nexport type ArrayWithAnyOfProperties = Array<{\n    foo?: string;\n} | {\n    bar?: string;\n}>;\n\nexport type AnyOfAnyAndNull = {\n    data?: unknown | null;\n};\n\n/**\n * This is a simple array with any of properties\n */\nexport type AnyOfArrays = {\n    results?: Array<{\n        foo?: string;\n    } | {\n        bar?: string;\n    }>;\n};\n\n/**\n * This is a string dictionary\n */\nexport type DictionaryWithString = {\n    [key: string]: string;\n};\n\nexport type DictionaryWithPropertiesAndAdditionalProperties = {\n    foo?: number;\n    bar?: boolean;\n    [key: string]: string | number | boolean | undefined;\n};\n\n/**\n * This is a string reference\n */\nexport type DictionaryWithReference = {\n    [key: string]: ModelWithString;\n};\n\n/**\n * This is a complex dictionary\n */\nexport type DictionaryWithArray = {\n    [key: string]: Array<ModelWithString>;\n};\n\n/**\n * This is a string dictionary\n */\nexport type DictionaryWithDictionary = {\n    [key: string]: {\n        [key: string]: string;\n    };\n};\n\n/**\n * This is a complex dictionary\n */\nexport type DictionaryWithProperties = {\n    [key: string]: {\n        foo?: string;\n        bar?: string;\n    };\n};\n\n/**\n * This is a model with one number property\n */\nexport type ModelWithInteger = {\n    /**\n     * This is a simple number property\n     */\n    prop?: number;\n};\n\n/**\n * This is a model with one boolean property\n */\nexport type ModelWithBoolean = {\n    /**\n     * This is a simple boolean property\n     */\n    prop?: boolean;\n};\n\n/**\n * This is a model with one string property\n */\nexport type ModelWithString = {\n    /**\n     * This is a simple string property\n     */\n    prop?: string;\n};\n\n/**\n * This is a model with one string property\n */\nexport type ModelWithStringError = {\n    /**\n     * This is a simple string property\n     */\n    prop?: string;\n};\n\n/**\n * `Comment` or `VoiceComment`. The JSON object for adding voice comments to tickets is different. See [Adding voice comments to tickets](/documentation/ticketing/managing-tickets/adding-voice-comments-to-tickets)\n */\nexport type ModelFromZendesk = string;\n\n/**\n * This is a model with one string property\n */\nexport type ModelWithNullableString = {\n    /**\n     * This is a simple string property\n     */\n    nullableProp1?: string | null;\n    /**\n     * This is a simple string property\n     */\n    nullableRequiredProp1: string | null;\n    /**\n     * This is a simple string property\n     */\n    nullableProp2?: string | null;\n    /**\n     * This is a simple string property\n     */\n    nullableRequiredProp2: string | null;\n    /**\n     * This is a simple enum with strings\n     */\n    'foo_bar-enum'?: 'Success' | 'Warning' | 'Error' | 'ØÆÅ字符串';\n};\n\n/**\n * This is a model with one enum\n */\nexport type ModelWithEnum = {\n    /**\n     * This is a simple enum with strings\n     */\n    'foo_bar-enum'?: 'Success' | 'Warning' | 'Error' | 'ØÆÅ字符串';\n    /**\n     * These are the HTTP error code enums\n     */\n    statusCode?: '100' | '200 FOO' | '300 FOO_BAR' | '400 foo-bar' | '500 foo.bar' | '600 foo&bar';\n    /**\n     * Simple boolean enum\n     */\n    bool?: true;\n};\n\n/**\n * This is a model with one enum with escaped name\n */\nexport type ModelWithEnumWithHyphen = {\n    /**\n     * Foo-Bar-Baz-Qux\n     */\n    'foo-bar-baz-qux'?: '3.0';\n};\n\n/**\n * This is a model with one enum\n */\nexport type ModelWithEnumFromDescription = {\n    /**\n     * Success=1,Warning=2,Error=3\n     */\n    test?: number;\n};\n\n/**\n * This is a model with nested enums\n */\nexport type ModelWithNestedEnums = {\n    dictionaryWithEnum?: {\n        [key: string]: 'Success' | 'Warning' | 'Error';\n    };\n    dictionaryWithEnumFromDescription?: {\n        [key: string]: number;\n    };\n    arrayWithEnum?: Array<'Success' | 'Warning' | 'Error'>;\n    arrayWithDescription?: Array<number>;\n    /**\n     * This is a simple enum with strings\n     */\n    'foo_bar-enum'?: 'Success' | 'Warning' | 'Error' | 'ØÆÅ字符串';\n};\n\n/**\n * This is a model with one property containing a reference\n */\nexport type ModelWithReference = {\n    prop?: ModelWithProperties;\n};\n\n/**\n * This is a model with one property containing an array\n */\nexport type ModelWithArrayReadOnlyAndWriteOnly = {\n    prop?: Array<ModelWithReadOnlyAndWriteOnly>;\n    propWithFile?: Array<Blob | File>;\n    propWithNumber?: Array<number>;\n};\n\n/**\n * This is a model with one property containing an array\n */\nexport type ModelWithArray = {\n    prop?: Array<ModelWithString>;\n    propWithFile?: Array<Blob | File>;\n    propWithNumber?: Array<number>;\n};\n\n/**\n * This is a model with one property containing a dictionary\n */\nexport type ModelWithDictionary = {\n    prop?: {\n        [key: string]: string;\n    };\n};\n\n/**\n * This is a deprecated model with a deprecated property\n *\n * @deprecated\n */\nexport type DeprecatedModel = {\n    /**\n     * This is a deprecated property\n     *\n     * @deprecated\n     */\n    prop?: string;\n};\n\n/**\n * This is a model with one property containing a circular reference\n */\nexport type ModelWithCircularReference = {\n    prop?: ModelWithCircularReference;\n};\n\n/**\n * This is a model with one property with a 'one of' relationship\n */\nexport type CompositionWithOneOf = {\n    propA?: ModelWithString | ModelWithEnum | ModelWithArray | ModelWithDictionary;\n};\n\n/**\n * This is a model with one property with a 'one of' relationship where the options are not $ref\n */\nexport type CompositionWithOneOfAnonymous = {\n    propA?: {\n        propA?: string;\n    } | string | number;\n};\n\n/**\n * Circle\n */\nexport type ModelCircle = {\n    kind: string;\n    radius?: number;\n};\n\n/**\n * Square\n */\nexport type ModelSquare = {\n    kind: string;\n    sideLength?: number;\n};\n\n/**\n * This is a model with one property with a 'one of' relationship where the options are not $ref\n */\nexport type CompositionWithOneOfDiscriminator = ({\n    kind: 'circle';\n} & ModelCircle) | ({\n    kind: 'square';\n} & ModelSquare);\n\n/**\n * This is a model with one property with a 'any of' relationship\n */\nexport type CompositionWithAnyOf = {\n    propA?: ModelWithString | ModelWithEnum | ModelWithArray | ModelWithDictionary;\n};\n\n/**\n * This is a model with one property with a 'any of' relationship where the options are not $ref\n */\nexport type CompositionWithAnyOfAnonymous = {\n    propA?: {\n        propA?: string;\n    } | string | number;\n};\n\n/**\n * This is a model with nested 'any of' property with a type null\n */\nexport type CompositionWithNestedAnyAndTypeNull = {\n    propA?: Array<ModelWithDictionary | null> | Array<ModelWithArray | null>;\n};\n\nexport type _3eNum1Период = 'Bird' | 'Dog';\n\nexport type ConstValue = 'ConstValue';\n\n/**\n * This is a model with one property with a 'any of' relationship where the options are not $ref\n */\nexport type CompositionWithNestedAnyOfAndNull = {\n    /**\n     * Scopes\n     */\n    propA?: Array<_3eNum1Период | ConstValue> | null;\n};\n\n/**\n * This is a model with one property with a 'one of' relationship\n */\nexport type CompositionWithOneOfAndNullable = {\n    propA?: {\n        boolean?: boolean;\n    } | ModelWithEnum | ModelWithArray | ModelWithDictionary | null;\n};\n\n/**\n * This is a model that contains a simple dictionary within composition\n */\nexport type CompositionWithOneOfAndSimpleDictionary = {\n    propA?: boolean | {\n        [key: string]: number;\n    };\n};\n\n/**\n * This is a model that contains a dictionary of simple arrays within composition\n */\nexport type CompositionWithOneOfAndSimpleArrayDictionary = {\n    propA?: boolean | {\n        [key: string]: Array<boolean>;\n    };\n};\n\n/**\n * This is a model that contains a dictionary of complex arrays (composited) within composition\n */\nexport type CompositionWithOneOfAndComplexArrayDictionary = {\n    propA?: boolean | {\n        [key: string]: Array<number | string>;\n    };\n};\n\n/**\n * This is a model with one property with a 'all of' relationship\n */\nexport type CompositionWithAllOfAndNullable = {\n    propA?: ({\n        boolean?: boolean;\n    } & ModelWithEnum & ModelWithArray & ModelWithDictionary) | null;\n};\n\n/**\n * This is a model with one property with a 'any of' relationship\n */\nexport type CompositionWithAnyOfAndNullable = {\n    propA?: {\n        boolean?: boolean;\n    } | ModelWithEnum | ModelWithArray | ModelWithDictionary | null;\n};\n\n/**\n * This is a base model with two simple optional properties\n */\nexport type CompositionBaseModel = {\n    firstName?: string;\n    lastname?: string;\n};\n\n/**\n * This is a model that extends the base model\n */\nexport type CompositionExtendedModel = CompositionBaseModel & {\n    age: number;\n    firstName: string;\n    lastname: string;\n};\n\n/**\n * This is a model with one nested property\n */\nexport type ModelWithProperties = {\n    required: string;\n    readonly requiredAndReadOnly: string;\n    requiredAndNullable: string | null;\n    string?: string;\n    number?: number;\n    boolean?: boolean;\n    reference?: ModelWithString;\n    'property with space'?: string;\n    default?: string;\n    try?: string;\n    readonly '@namespace.string'?: string;\n    readonly '@namespace.integer'?: number;\n};\n\n/**\n * This is a model with one nested property\n */\nexport type ModelWithNestedProperties = {\n    readonly first: {\n        readonly second: {\n            readonly third: string | null;\n        } | null;\n    } | null;\n};\n\n/**\n * This is a model with duplicated properties\n */\nexport type ModelWithDuplicateProperties = {\n    prop?: ModelWithString;\n};\n\n/**\n * This is a model with ordered properties\n */\nexport type ModelWithOrderedProperties = {\n    zebra?: string;\n    apple?: string;\n    hawaii?: string;\n};\n\n/**\n * This is a model with duplicated imports\n */\nexport type ModelWithDuplicateImports = {\n    propA?: ModelWithString;\n    propB?: ModelWithString;\n    propC?: ModelWithString;\n};\n\n/**\n * This is a model that extends another model\n */\nexport type ModelThatExtends = ModelWithString & {\n    propExtendsA?: string;\n    propExtendsB?: ModelWithString;\n};\n\n/**\n * This is a model that extends another model\n */\nexport type ModelThatExtendsExtends = ModelWithString & ModelThatExtends & {\n    propExtendsC?: string;\n    propExtendsD?: ModelWithString;\n};\n\n/**\n * This is a model that contains a some patterns\n */\nexport type ModelWithPattern = {\n    key: string;\n    name: string;\n    readonly enabled?: boolean;\n    readonly modified?: string;\n    id?: string;\n    text?: string;\n    patternWithSingleQuotes?: string;\n    patternWithNewline?: string;\n    patternWithBacktick?: string;\n    patternWithUnicode?: string;\n};\n\nexport type File = {\n    /**\n     * Id\n     */\n    readonly id?: string;\n    /**\n     * Updated at\n     */\n    readonly updated_at?: string;\n    /**\n     * Created at\n     */\n    readonly created_at?: string;\n    /**\n     * Mime\n     */\n    mime: string;\n    /**\n     * File\n     */\n    readonly file?: string;\n};\n\nexport type Default = {\n    name?: string;\n};\n\nexport type Pageable = {\n    page?: number;\n    size?: number;\n    sort?: Array<string>;\n};\n\n/**\n * This is a free-form object without additionalProperties.\n */\nexport type FreeFormObjectWithoutAdditionalProperties = {\n    [key: string]: unknown;\n};\n\n/**\n * This is a free-form object with additionalProperties: true.\n */\nexport type FreeFormObjectWithAdditionalPropertiesEqTrue = {\n    [key: string]: unknown;\n};\n\n/**\n * This is a free-form object with additionalProperties: {}.\n */\nexport type FreeFormObjectWithAdditionalPropertiesEqEmptyObject = {\n    [key: string]: unknown;\n};\n\nexport type ModelWithConst = {\n    String?: 'String';\n    number?: 0;\n    null?: null;\n    withType?: 'Some string';\n};\n\n/**\n * This is a model with one property and additionalProperties: true\n */\nexport type ModelWithAdditionalPropertiesEqTrue = {\n    /**\n     * This is a simple string property\n     */\n    prop?: string;\n    [key: string]: unknown;\n};\n\nexport type NestedAnyOfArraysNullable = {\n    nullableArray?: Array<string | boolean> | null;\n};\n\nexport type CompositionWithOneOfAndProperties = ({\n    foo: SimpleParameter;\n} | {\n    bar: NonAsciiStringæøåÆøÅöôêÊ字符串;\n}) & {\n    baz: number | null;\n    qux: number;\n};\n\n/**\n * An object that can be null\n */\nexport type NullableObject = {\n    foo?: string;\n} | null;\n\n/**\n * Some % character\n */\nexport type CharactersInDescription = string;\n\nexport type ModelWithNullableObject = {\n    data?: NullableObject;\n};\n\n/**\n * An object with additional properties that can be null (anyOf ref + null)\n */\nexport type ModelWithAdditionalPropertiesRef = {\n    [key: string]: NullableObject | null;\n};\n\nexport type ModelWithOneOfEnum = {\n    foo: 'Bar';\n} | {\n    foo: 'Baz';\n} | {\n    foo: 'Qux';\n} | {\n    content: string;\n    foo: 'Quux';\n} | {\n    content: [\n        string,\n        string\n    ];\n    foo: 'Corge';\n};\n\nexport type ModelWithNestedArrayEnumsDataFoo = 'foo' | 'bar';\n\nexport type ModelWithNestedArrayEnumsDataBar = 'baz' | 'qux';\n\nexport type ModelWithNestedArrayEnumsData = {\n    foo?: Array<ModelWithNestedArrayEnumsDataFoo>;\n    bar?: Array<ModelWithNestedArrayEnumsDataBar>;\n};\n\nexport type ModelWithNestedArrayEnums = {\n    array_strings?: Array<string>;\n    data?: ModelWithNestedArrayEnumsData;\n};\n\nexport type ModelWithNestedCompositionEnums = {\n    foo?: ModelWithNestedArrayEnumsDataFoo;\n};\n\nexport type ModelWithReadOnlyAndWriteOnly = {\n    foo: string;\n    readonly bar: string;\n};\n\nexport type ModelWithConstantSizeArray = [\n    number,\n    number\n];\n\nexport type ModelWithAnyOfConstantSizeArray = [\n    number | string,\n    number | string,\n    number | string\n];\n\nexport type ModelWithPrefixItemsConstantSizeArray = [\n    ModelWithInteger,\n    number | string,\n    string\n];\n\nexport type ModelWithAnyOfConstantSizeArrayNullable = [\n    number | null | string,\n    number | null | string,\n    number | null | string\n];\n\nexport type ModelWithAnyOfConstantSizeArrayWithNSizeAndOptions = [\n    number | Import,\n    number | Import\n];\n\nexport type ModelWithAnyOfConstantSizeArrayAndIntersect = [\n    number & string,\n    number & string\n];\n\nexport type ModelWithNumericEnumUnion = {\n    /**\n     * Период\n     */\n    value?: -10 | -1 | 0 | 1 | 3 | 6 | 12;\n};\n\n/**\n * Some description with `back ticks`\n */\nexport type ModelWithBackticksInDescription = {\n    /**\n     * The template `that` should be used for parsing and importing the contents of the CSV file.\n     *\n     * <br/><p>There is one placeholder currently supported:<ul>     <li><b>${x}</b> - refers to the n-th column in the CSV file, e.g. ${1}, ${2}, ...)</li></ul><p>Example of a correct JSON template:</p>\n     * <pre>\n     * [\n     * {\n     * \"resourceType\": \"Asset\",\n     * \"identifier\": {\n     * \"name\": \"${1}\",\n     * \"domain\": {\n     * \"name\": \"${2}\",\n     * \"community\": {\n     * \"name\": \"Some Community\"\n     * }\n     * }\n     * },\n     * \"attributes\" : {\n     * \"00000000-0000-0000-0000-000000003115\" : [ {\n     * \"value\" : \"${3}\"\n     * } ],\n     * \"00000000-0000-0000-0000-000000000222\" : [ {\n     * \"value\" : \"${4}\"\n     * } ]\n     * }\n     * }\n     * ]\n     * </pre>\n     */\n    template?: string;\n};\n\nexport type ModelWithOneOfAndProperties = (SimpleParameter | NonAsciiStringæøåÆøÅöôêÊ字符串) & {\n    baz: number | null;\n    qux: number;\n};\n\n/**\n * Model used to test deduplication strategy (unused)\n */\nexport type ParameterSimpleParameterUnused = string;\n\n/**\n * Model used to test deduplication strategy\n */\nexport type PostServiceWithEmptyTagResponse = string;\n\n/**\n * Model used to test deduplication strategy\n */\nexport type PostServiceWithEmptyTagResponse2 = string;\n\n/**\n * Model used to test deduplication strategy\n */\nexport type DeleteFooData = string;\n\n/**\n * Model used to test deduplication strategy\n */\nexport type DeleteFooData2 = string;\n\n/**\n * Model with restricted keyword name\n */\nexport type Import = string;\n\nexport type SchemaWithFormRestrictedKeys = {\n    description?: string;\n    'x-enum-descriptions'?: string;\n    'x-enum-varnames'?: string;\n    'x-enumNames'?: string;\n    title?: string;\n    object?: {\n        description?: string;\n        'x-enum-descriptions'?: string;\n        'x-enum-varnames'?: string;\n        'x-enumNames'?: string;\n        title?: string;\n    };\n    array?: Array<{\n        description?: string;\n        'x-enum-descriptions'?: string;\n        'x-enum-varnames'?: string;\n        'x-enumNames'?: string;\n        title?: string;\n    }>;\n};\n\n/**\n * This schema was giving PascalCase transformations a hard time\n */\nexport type IoK8sApimachineryPkgApisMetaV1DeleteOptions = {\n    /**\n     * Must be fulfilled before a deletion is carried out. If not possible, a 409 Conflict status will be returned.\n     */\n    preconditions?: IoK8sApimachineryPkgApisMetaV1Preconditions;\n};\n\n/**\n * This schema was giving PascalCase transformations a hard time\n */\nexport type IoK8sApimachineryPkgApisMetaV1Preconditions = {\n    /**\n     * Specifies the target ResourceVersion\n     */\n    resourceVersion?: string;\n    /**\n     * Specifies the target UID.\n     */\n    uid?: string;\n};\n\nexport type AdditionalPropertiesUnknownIssue = {\n    [key: string]: string | number;\n};\n\nexport type AdditionalPropertiesUnknownIssue2 = {\n    [key: string]: string | number;\n};\n\nexport type AdditionalPropertiesUnknownIssue3 = string & {\n    entries: {\n        [key: string]: AdditionalPropertiesUnknownIssue;\n    };\n};\n\nexport type AdditionalPropertiesIntegerIssue = {\n    value: number;\n    [key: string]: number;\n};\n\nexport type OneOfAllOfIssue = ((ConstValue | GenericSchemaDuplicateIssue1SystemBoolean) & _3eNum1Период) | GenericSchemaDuplicateIssue1SystemString;\n\nexport type GenericSchemaDuplicateIssue1SystemBoolean = {\n    item?: boolean;\n    error?: string | null;\n    readonly hasError?: boolean;\n    data?: {\n        [key: string]: never;\n    };\n};\n\nexport type GenericSchemaDuplicateIssue1SystemString = {\n    item?: string | null;\n    error?: string | null;\n    readonly hasError?: boolean;\n};\n\nexport type ExternalSharedModel = {\n    id: string;\n    name?: string;\n};\n\n/**\n * This is a model with one property containing a reference\n */\nexport type ModelWithReferenceWritable = {\n    prop?: ModelWithPropertiesWritable;\n};\n\n/**\n * This is a model with one property containing an array\n */\nexport type ModelWithArrayReadOnlyAndWriteOnlyWritable = {\n    prop?: Array<ModelWithReadOnlyAndWriteOnlyWritable>;\n    propWithFile?: Array<Blob | File>;\n    propWithNumber?: Array<number>;\n};\n\n/**\n * This is a model with one nested property\n */\nexport type ModelWithPropertiesWritable = {\n    required: string;\n    requiredAndNullable: string | null;\n    string?: string;\n    number?: number;\n    boolean?: boolean;\n    reference?: ModelWithString;\n    'property with space'?: string;\n    default?: string;\n    try?: string;\n};\n\n/**\n * This is a model that contains a some patterns\n */\nexport type ModelWithPatternWritable = {\n    key: string;\n    name: string;\n    id?: string;\n    text?: string;\n    patternWithSingleQuotes?: string;\n    patternWithNewline?: string;\n    patternWithBacktick?: string;\n    patternWithUnicode?: string;\n};\n\nexport type FileWritable = {\n    /**\n     * Mime\n     */\n    mime: string;\n};\n\nexport type ModelWithReadOnlyAndWriteOnlyWritable = {\n    foo: string;\n    baz: string;\n};\n\nexport type ModelWithAnyOfConstantSizeArrayWithNSizeAndOptionsWritable = [\n    number | Import,\n    number | Import\n];\n\nexport type AdditionalPropertiesUnknownIssueWritable = {\n    [key: string]: string | number;\n};\n\nexport type OneOfAllOfIssueWritable = ((ConstValue | GenericSchemaDuplicateIssue1SystemBoolean) & _3eNum1Период) | GenericSchemaDuplicateIssue1SystemString;\n\nexport type GenericSchemaDuplicateIssue1SystemBooleanWritable = {\n    item?: boolean;\n    error?: string | null;\n    data?: {\n        [key: string]: never;\n    };\n};\n\nexport type GenericSchemaDuplicateIssue1SystemStringWritable = {\n    item?: string | null;\n    error?: string | null;\n};\n\n/**\n * This is a reusable parameter\n */\nexport type SimpleParameter = string;\n\n/**\n * Parameter with illegal characters\n */\nexport type XFooBar = ModelWithString;\n\n/**\n * A reusable request body\n */\nexport type SimpleRequestBody = ModelWithString;\n\n/**\n * A reusable request body\n */\nexport type SimpleFormData = ModelWithString;\n\nexport type ExportData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no+tag';\n};\n\nexport type PatchApiVbyApiVersionNoTagData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no+tag';\n};\n\nexport type PatchApiVbyApiVersionNoTagResponses = {\n    /**\n     * OK\n     */\n    default: unknown;\n};\n\nexport type ImportData = {\n    body: ModelWithReadOnlyAndWriteOnlyWritable | ModelWithArrayReadOnlyAndWriteOnlyWritable;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no+tag';\n};\n\nexport type ImportResponses = {\n    /**\n     * Success\n     */\n    200: ModelFromZendesk;\n    /**\n     * Default success response\n     */\n    default: ModelWithReadOnlyAndWriteOnly;\n};\n\nexport type ImportResponse = ImportResponses[keyof ImportResponses];\n\nexport type FooWowData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no+tag';\n};\n\nexport type FooWowResponses = {\n    /**\n     * OK\n     */\n    default: unknown;\n};\n\nexport type ApiVVersionODataControllerCountData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple/$count';\n};\n\nexport type ApiVVersionODataControllerCountResponses = {\n    /**\n     * Success\n     */\n    200: ModelFromZendesk;\n};\n\nexport type ApiVVersionODataControllerCountResponse = ApiVVersionODataControllerCountResponses[keyof ApiVVersionODataControllerCountResponses];\n\nexport type GetApiVbyApiVersionSimpleOperationData = {\n    body?: never;\n    path: {\n        /**\n         * foo in method\n         */\n        foo_param: string;\n    };\n    query?: never;\n    url: '/api/v{api-version}/simple:operation';\n};\n\nexport type GetApiVbyApiVersionSimpleOperationErrors = {\n    /**\n     * Default error response\n     */\n    default: ModelWithBoolean;\n};\n\nexport type GetApiVbyApiVersionSimpleOperationError = GetApiVbyApiVersionSimpleOperationErrors[keyof GetApiVbyApiVersionSimpleOperationErrors];\n\nexport type GetApiVbyApiVersionSimpleOperationResponses = {\n    /**\n     * Response is a simple number\n     */\n    200: number;\n};\n\nexport type GetApiVbyApiVersionSimpleOperationResponse = GetApiVbyApiVersionSimpleOperationResponses[keyof GetApiVbyApiVersionSimpleOperationResponses];\n\nexport type DeleteCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type GetCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type HeadCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type OptionsCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type PatchCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type PostCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type PutCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type DeleteFooData3 = {\n    body?: never;\n    headers: {\n        /**\n         * Parameter with illegal characters\n         */\n        'x-Foo-Bar': ModelWithString;\n    };\n    path: {\n        /**\n         * foo in method\n         */\n        foo_param: string;\n        /**\n         * bar in method\n         */\n        BarParam: string;\n    };\n    query?: never;\n    url: '/api/v{api-version}/foo/{foo_param}/bar/{BarParam}';\n};\n\nexport type CallWithDescriptionsData = {\n    body?: never;\n    path?: never;\n    query?: {\n        /**\n         * Testing multiline comments in string: First line\n         * Second line\n         *\n         * Fourth line\n         */\n        parameterWithBreaks?: string;\n        /**\n         * Testing backticks in string: `backticks` and ```multiple backticks``` should work\n         */\n        parameterWithBackticks?: string;\n        /**\n         * Testing slashes in string: \\backwards\\\\\\ and /forwards/// should work\n         */\n        parameterWithSlashes?: string;\n        /**\n         * Testing expression placeholders in string: ${expression} should work\n         */\n        parameterWithExpressionPlaceholders?: string;\n        /**\n         * Testing quotes in string: 'single quote''' and \"double quotes\"\"\" should work\n         */\n        parameterWithQuotes?: string;\n        /**\n         * Testing reserved characters in string: * inline * and ** inline ** should work\n         */\n        parameterWithReservedCharacters?: string;\n    };\n    url: '/api/v{api-version}/descriptions';\n};\n\nexport type DeprecatedCallData = {\n    body?: never;\n    headers: {\n        /**\n         * This parameter is deprecated\n         *\n         * @deprecated\n         */\n        parameter: DeprecatedModel | null;\n    };\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/parameters/deprecated';\n};\n\nexport type CallWithParametersData = {\n    /**\n     * This is the parameter that goes into the body\n     */\n    body: {\n        [key: string]: unknown;\n    } | null;\n    headers: {\n        /**\n         * This is the parameter that goes into the header\n         */\n        parameterHeader: string | null;\n    };\n    path: {\n        /**\n         * This is the parameter that goes into the path\n         */\n        parameterPath: string | null;\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string | null;\n    };\n    query: {\n        foo_ref_enum?: ModelWithNestedArrayEnumsDataFoo;\n        foo_all_of_enum: ModelWithNestedArrayEnumsDataFoo;\n        /**\n         * This is the parameter that goes into the query params\n         */\n        cursor: string | null;\n    };\n    url: '/api/v{api-version}/parameters/{parameterPath}';\n};\n\nexport type CallWithWeirdParameterNamesData = {\n    /**\n     * This is the parameter that goes into the body\n     */\n    body: ModelWithString | null;\n    headers: {\n        /**\n         * This is the parameter that goes into the request header\n         */\n        'parameter.header': string | null;\n    };\n    path: {\n        /**\n         * This is the parameter that goes into the path\n         */\n        'parameter.path.1'?: string;\n        /**\n         * This is the parameter that goes into the path\n         */\n        'parameter-path-2'?: string;\n        /**\n         * This is the parameter that goes into the path\n         */\n        'PARAMETER-PATH-3'?: string;\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string | null;\n    };\n    query: {\n        /**\n         * This is the parameter with a reserved keyword\n         */\n        default?: string;\n        /**\n         * This is the parameter that goes into the request query params\n         */\n        'parameter-query': string | null;\n    };\n    url: '/api/v{api-version}/parameters/{parameter.path.1}/{parameter-path-2}/{PARAMETER-PATH-3}';\n};\n\nexport type GetCallWithOptionalParamData = {\n    /**\n     * This is a required parameter\n     */\n    body: ModelWithOneOfEnum;\n    path?: never;\n    query?: {\n        /**\n         * This is an optional parameter\n         */\n        page?: number;\n    };\n    url: '/api/v{api-version}/parameters';\n};\n\nexport type PostCallWithOptionalParamData = {\n    /**\n     * This is an optional parameter\n     */\n    body?: {\n        offset?: number | null;\n    };\n    path?: never;\n    query: {\n        /**\n         * This is a required parameter\n         */\n        parameter: Pageable;\n    };\n    url: '/api/v{api-version}/parameters';\n};\n\nexport type PostCallWithOptionalParamResponses = {\n    /**\n     * Response is a simple number\n     */\n    200: number;\n    /**\n     * Success\n     */\n    204: void;\n};\n\nexport type PostCallWithOptionalParamResponse = PostCallWithOptionalParamResponses[keyof PostCallWithOptionalParamResponses];\n\nexport type PostApiVbyApiVersionRequestBodyData = {\n    /**\n     * A reusable request body\n     */\n    body?: SimpleRequestBody;\n    path?: never;\n    query?: {\n        /**\n         * This is a reusable parameter\n         */\n        parameter?: string;\n    };\n    url: '/api/v{api-version}/requestBody';\n};\n\nexport type PostApiVbyApiVersionFormDataData = {\n    /**\n     * A reusable request body\n     */\n    body?: SimpleFormData;\n    path?: never;\n    query?: {\n        /**\n         * This is a reusable parameter\n         */\n        parameter?: string;\n    };\n    url: '/api/v{api-version}/formData';\n};\n\nexport type CallWithDefaultParametersData = {\n    body?: never;\n    path?: never;\n    query?: {\n        /**\n         * This is a simple string with default value\n         */\n        parameterString?: string | null;\n        /**\n         * This is a simple number with default value\n         */\n        parameterNumber?: number | null;\n        /**\n         * This is a simple boolean with default value\n         */\n        parameterBoolean?: boolean | null;\n        /**\n         * This is a simple enum with default value\n         */\n        parameterEnum?: 'Success' | 'Warning' | 'Error';\n        /**\n         * This is a simple model with default value\n         */\n        parameterModel?: ModelWithString | null;\n    };\n    url: '/api/v{api-version}/defaults';\n};\n\nexport type CallWithDefaultOptionalParametersData = {\n    body?: never;\n    path?: never;\n    query?: {\n        /**\n         * This is a simple string that is optional with default value\n         */\n        parameterString?: string;\n        /**\n         * This is a simple number that is optional with default value\n         */\n        parameterNumber?: number;\n        /**\n         * This is a simple boolean that is optional with default value\n         */\n        parameterBoolean?: boolean;\n        /**\n         * This is a simple enum that is optional with default value\n         */\n        parameterEnum?: 'Success' | 'Warning' | 'Error';\n        /**\n         * This is a simple model that is optional with default value\n         */\n        parameterModel?: ModelWithString;\n    };\n    url: '/api/v{api-version}/defaults';\n};\n\nexport type CallToTestOrderOfParamsData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * This is a optional string with default\n         */\n        parameterOptionalStringWithDefault?: string;\n        /**\n         * This is a optional string with empty default\n         */\n        parameterOptionalStringWithEmptyDefault?: string;\n        /**\n         * This is a optional string with no default\n         */\n        parameterOptionalStringWithNoDefault?: string;\n        /**\n         * This is a string with default\n         */\n        parameterStringWithDefault: string;\n        /**\n         * This is a string with empty default\n         */\n        parameterStringWithEmptyDefault: string;\n        /**\n         * This is a string with no default\n         */\n        parameterStringWithNoDefault: string;\n        /**\n         * This is a string that can be null with no default\n         */\n        parameterStringNullableWithNoDefault?: string | null;\n        /**\n         * This is a string that can be null with default\n         */\n        parameterStringNullableWithDefault?: string | null;\n    };\n    url: '/api/v{api-version}/defaults';\n};\n\nexport type DuplicateNameData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/duplicate';\n};\n\nexport type DuplicateName2Data = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/duplicate';\n};\n\nexport type DuplicateName3Data = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/duplicate';\n};\n\nexport type DuplicateName4Data = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/duplicate';\n};\n\nexport type CallWithNoContentResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no-content';\n};\n\nexport type CallWithNoContentResponseResponses = {\n    /**\n     * Success\n     */\n    204: void;\n};\n\nexport type CallWithNoContentResponseResponse = CallWithNoContentResponseResponses[keyof CallWithNoContentResponseResponses];\n\nexport type CallWithResponseAndNoContentResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multiple-tags/response-and-no-content';\n};\n\nexport type CallWithResponseAndNoContentResponseResponses = {\n    /**\n     * Response is a simple number\n     */\n    200: number;\n    /**\n     * Success\n     */\n    204: void;\n};\n\nexport type CallWithResponseAndNoContentResponseResponse = CallWithResponseAndNoContentResponseResponses[keyof CallWithResponseAndNoContentResponseResponses];\n\nexport type DummyAData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multiple-tags/a';\n};\n\nexport type DummyAResponses = {\n    200: _400;\n};\n\nexport type DummyAResponse = DummyAResponses[keyof DummyAResponses];\n\nexport type DummyBData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multiple-tags/b';\n};\n\nexport type DummyBResponses = {\n    /**\n     * Success\n     */\n    204: void;\n};\n\nexport type DummyBResponse = DummyBResponses[keyof DummyBResponses];\n\nexport type CallWithResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/response';\n};\n\nexport type CallWithResponseResponses = {\n    default: Import;\n};\n\nexport type CallWithResponseResponse = CallWithResponseResponses[keyof CallWithResponseResponses];\n\nexport type CallWithDuplicateResponsesData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/response';\n};\n\nexport type CallWithDuplicateResponsesErrors = {\n    /**\n     * Message for 500 error\n     */\n    500: ModelWithStringError;\n    /**\n     * Message for 501 error\n     */\n    501: ModelWithStringError;\n    /**\n     * Message for 502 error\n     */\n    502: ModelWithStringError;\n    /**\n     * Message for 4XX errors\n     */\n    '4XX': DictionaryWithArray;\n    /**\n     * Default error response\n     */\n    default: ModelWithBoolean;\n};\n\nexport type CallWithDuplicateResponsesError = CallWithDuplicateResponsesErrors[keyof CallWithDuplicateResponsesErrors];\n\nexport type CallWithDuplicateResponsesResponses = {\n    /**\n     * Message for 200 response\n     */\n    200: ModelWithBoolean & ModelWithInteger;\n    /**\n     * Message for 201 response\n     */\n    201: ModelWithString;\n    /**\n     * Message for 202 response\n     */\n    202: ModelWithString;\n};\n\nexport type CallWithDuplicateResponsesResponse = CallWithDuplicateResponsesResponses[keyof CallWithDuplicateResponsesResponses];\n\nexport type CallWithResponsesData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/response';\n};\n\nexport type CallWithResponsesErrors = {\n    /**\n     * Message for 500 error\n     */\n    500: ModelWithStringError;\n    /**\n     * Message for 501 error\n     */\n    501: ModelWithStringError;\n    /**\n     * Message for 502 error\n     */\n    502: ModelWithStringError;\n    /**\n     * Message for default response\n     */\n    default: ModelWithStringError;\n};\n\nexport type CallWithResponsesError = CallWithResponsesErrors[keyof CallWithResponsesErrors];\n\nexport type CallWithResponsesResponses = {\n    /**\n     * Message for 200 response\n     */\n    200: {\n        readonly '@namespace.string'?: string;\n        readonly '@namespace.integer'?: number;\n        readonly value?: Array<ModelWithString>;\n    };\n    /**\n     * Message for 201 response\n     */\n    201: ModelThatExtends;\n    /**\n     * Message for 202 response\n     */\n    202: ModelThatExtendsExtends;\n};\n\nexport type CallWithResponsesResponse = CallWithResponsesResponses[keyof CallWithResponsesResponses];\n\nexport type CollectionFormatData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * This is an array parameter that is sent as csv format (comma-separated values)\n         */\n        parameterArrayCSV: Array<string> | null;\n        /**\n         * This is an array parameter that is sent as ssv format (space-separated values)\n         */\n        parameterArraySSV: Array<string> | null;\n        /**\n         * This is an array parameter that is sent as tsv format (tab-separated values)\n         */\n        parameterArrayTSV: Array<string> | null;\n        /**\n         * This is an array parameter that is sent as pipes format (pipe-separated values)\n         */\n        parameterArrayPipes: Array<string> | null;\n        /**\n         * This is an array parameter that is sent as multi format (multiple parameter instances)\n         */\n        parameterArrayMulti: Array<string> | null;\n    };\n    url: '/api/v{api-version}/collectionFormat';\n};\n\nexport type TypesData = {\n    body?: never;\n    path?: {\n        /**\n         * This is a number parameter\n         */\n        id?: number;\n    };\n    query: {\n        /**\n         * This is a number parameter\n         */\n        parameterNumber: number;\n        /**\n         * This is a string parameter\n         */\n        parameterString: string | null;\n        /**\n         * This is a boolean parameter\n         */\n        parameterBoolean: boolean | null;\n        /**\n         * This is an object parameter\n         */\n        parameterObject: {\n            [key: string]: unknown;\n        } | null;\n        /**\n         * This is an array parameter\n         */\n        parameterArray: Array<string> | null;\n        /**\n         * This is a dictionary parameter\n         */\n        parameterDictionary: {\n            [key: string]: unknown;\n        } | null;\n        /**\n         * This is an enum parameter\n         */\n        parameterEnum: 'Success' | 'Warning' | 'Error' | null;\n    };\n    url: '/api/v{api-version}/types';\n};\n\nexport type TypesResponses = {\n    /**\n     * Response is a simple number\n     */\n    200: number;\n    /**\n     * Response is a simple string\n     */\n    201: string;\n    /**\n     * Response is a simple boolean\n     */\n    202: boolean;\n    /**\n     * Response is a simple object\n     */\n    203: {\n        [key: string]: unknown;\n    };\n};\n\nexport type TypesResponse = TypesResponses[keyof TypesResponses];\n\nexport type UploadFileData = {\n    body: Blob | File;\n    path: {\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string | null;\n    };\n    query?: never;\n    url: '/api/v{api-version}/upload';\n};\n\nexport type UploadFileResponses = {\n    200: boolean;\n};\n\nexport type UploadFileResponse = UploadFileResponses[keyof UploadFileResponses];\n\nexport type FileResponseData = {\n    body?: never;\n    path: {\n        id: string;\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string;\n    };\n    query?: never;\n    url: '/api/v{api-version}/file/{id}';\n};\n\nexport type FileResponseResponses = {\n    /**\n     * Success\n     */\n    200: Blob | File;\n};\n\nexport type FileResponseResponse = FileResponseResponses[keyof FileResponseResponses];\n\nexport type ComplexTypesData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * Parameter containing object\n         */\n        parameterObject: {\n            first?: {\n                second?: {\n                    third?: string;\n                };\n            };\n        };\n        /**\n         * Parameter containing reference\n         */\n        parameterReference: ModelWithString;\n    };\n    url: '/api/v{api-version}/complex';\n};\n\nexport type ComplexTypesErrors = {\n    /**\n     * 400 `server` error\n     */\n    400: unknown;\n    /**\n     * 500 server error\n     */\n    500: unknown;\n};\n\nexport type ComplexTypesResponses = {\n    /**\n     * Successful response\n     */\n    200: Array<ModelWithString>;\n};\n\nexport type ComplexTypesResponse = ComplexTypesResponses[keyof ComplexTypesResponses];\n\nexport type MultipartResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multipart';\n};\n\nexport type MultipartResponseResponses = {\n    /**\n     * OK\n     */\n    200: {\n        file?: Blob | File;\n        metadata?: {\n            foo?: string;\n            bar?: string;\n        };\n    };\n};\n\nexport type MultipartResponseResponse = MultipartResponseResponses[keyof MultipartResponseResponses];\n\nexport type MultipartRequestData = {\n    body?: {\n        content?: Blob | File;\n        data?: ModelWithString | null;\n    };\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multipart';\n};\n\nexport type ComplexParamsData = {\n    body?: {\n        readonly key: string | null;\n        name: string | null;\n        enabled?: boolean;\n        type: 'Monkey' | 'Horse' | 'Bird';\n        listOfModels?: Array<ModelWithString> | null;\n        listOfStrings?: Array<string> | null;\n        parameters: ModelWithString | ModelWithEnum | ModelWithArray | ModelWithDictionary;\n        readonly user?: {\n            readonly id?: number;\n            readonly name?: string | null;\n        };\n    };\n    path: {\n        id: number;\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string;\n    };\n    query?: never;\n    url: '/api/v{api-version}/complex/{id}';\n};\n\nexport type ComplexParamsResponses = {\n    /**\n     * Success\n     */\n    200: ModelWithString;\n};\n\nexport type ComplexParamsResponse = ComplexParamsResponses[keyof ComplexParamsResponses];\n\nexport type CallWithResultFromHeaderData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/header';\n};\n\nexport type CallWithResultFromHeaderErrors = {\n    /**\n     * 400 server error\n     */\n    400: unknown;\n    /**\n     * 500 server error\n     */\n    500: unknown;\n};\n\nexport type CallWithResultFromHeaderResponses = {\n    /**\n     * Successful response\n     */\n    200: unknown;\n};\n\nexport type TestErrorCodeData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * Status code to return\n         */\n        status: number;\n    };\n    url: '/api/v{api-version}/error';\n};\n\nexport type TestErrorCodeErrors = {\n    /**\n     * Custom message: Internal Server Error\n     */\n    500: unknown;\n    /**\n     * Custom message: Not Implemented\n     */\n    501: unknown;\n    /**\n     * Custom message: Bad Gateway\n     */\n    502: unknown;\n    /**\n     * Custom message: Service Unavailable\n     */\n    503: unknown;\n};\n\nexport type TestErrorCodeResponses = {\n    /**\n     * Custom message: Successful response\n     */\n    200: unknown;\n};\n\nexport type NonAsciiæøåÆøÅöôêÊ字符串Data = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * Dummy input param\n         */\n        nonAsciiParamæøåÆØÅöôêÊ: number;\n    };\n    url: '/api/v{api-version}/non-ascii-æøåÆØÅöôêÊ字符串';\n};\n\nexport type NonAsciiæøåÆøÅöôêÊ字符串Responses = {\n    /**\n     * Successful response\n     */\n    200: Array<NonAsciiStringæøåÆøÅöôêÊ字符串>;\n};\n\nexport type NonAsciiæøåÆøÅöôêÊ字符串Response = NonAsciiæøåÆøÅöôêÊ字符串Responses[keyof NonAsciiæøåÆøÅöôêÊ字符串Responses];\n\nexport type PutWithFormUrlEncodedData = {\n    body: ArrayWithStrings;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/non-ascii-æøåÆØÅöôêÊ字符串';\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/client-custom/default/custom-client.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport { type ClientOptions, type Config, createClient, createConfig } from '@hey-api/custom-client';\n\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: 'http://localhost:3000/base' }));\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/client-custom/default/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport { apiVVersionODataControllerCount, callToTestOrderOfParams, callWithDefaultOptionalParameters, callWithDefaultParameters, callWithDescriptions, callWithDuplicateResponses, callWithNoContentResponse, callWithParameters, callWithResponse, callWithResponseAndNoContentResponse, callWithResponses, callWithResultFromHeader, callWithWeirdParameterNames, collectionFormat, complexParams, complexTypes, deleteCallWithoutParametersAndResponse, deleteFoo, deprecatedCall, dummyA, dummyB, duplicateName, duplicateName2, duplicateName3, duplicateName4, export_, fileResponse, fooWow, getApiVbyApiVersionSimpleOperation, getCallWithOptionalParam, getCallWithoutParametersAndResponse, headCallWithoutParametersAndResponse, import_, multipartRequest, multipartResponse, nonAsciiæøåÆøÅöôêÊ字符串, type Options, optionsCallWithoutParametersAndResponse, patchApiVbyApiVersionNoTag, patchCallWithoutParametersAndResponse, postApiVbyApiVersionFormData, postApiVbyApiVersionRequestBody, postCallWithOptionalParam, postCallWithoutParametersAndResponse, putCallWithoutParametersAndResponse, putWithFormUrlEncoded, testErrorCode, types, uploadFile } from './sdk.gen';\nexport type { _3eNum1Период, _400, AdditionalPropertiesIntegerIssue, AdditionalPropertiesUnknownIssue, AdditionalPropertiesUnknownIssue2, AdditionalPropertiesUnknownIssue3, AdditionalPropertiesUnknownIssueWritable, AnyOfAnyAndNull, AnyOfArrays, ApiVVersionODataControllerCountData, ApiVVersionODataControllerCountResponse, ApiVVersionODataControllerCountResponses, ArrayWithAnyOfProperties, ArrayWithArray, ArrayWithBooleans, ArrayWithNumbers, ArrayWithProperties, ArrayWithReferences, ArrayWithStrings, CallToTestOrderOfParamsData, CallWithDefaultOptionalParametersData, CallWithDefaultParametersData, CallWithDescriptionsData, CallWithDuplicateResponsesData, CallWithDuplicateResponsesError, CallWithDuplicateResponsesErrors, CallWithDuplicateResponsesResponse, CallWithDuplicateResponsesResponses, CallWithNoContentResponseData, CallWithNoContentResponseResponse, CallWithNoContentResponseResponses, CallWithParametersData, CallWithResponseAndNoContentResponseData, CallWithResponseAndNoContentResponseResponse, CallWithResponseAndNoContentResponseResponses, CallWithResponseData, CallWithResponseResponse, CallWithResponseResponses, CallWithResponsesData, CallWithResponsesError, CallWithResponsesErrors, CallWithResponsesResponse, CallWithResponsesResponses, CallWithResultFromHeaderData, CallWithResultFromHeaderErrors, CallWithResultFromHeaderResponses, CallWithWeirdParameterNamesData, CamelCaseCommentWithBreaks, CharactersInDescription, ClientOptions, CollectionFormatData, CommentWithBackticks, CommentWithBackticksAndQuotes, CommentWithBreaks, CommentWithExpressionPlaceholders, CommentWithQuotes, CommentWithReservedCharacters, CommentWithSlashes, ComplexParamsData, ComplexParamsResponse, ComplexParamsResponses, ComplexTypesData, ComplexTypesErrors, ComplexTypesResponse, ComplexTypesResponses, CompositionBaseModel, CompositionExtendedModel, CompositionWithAllOfAndNullable, CompositionWithAnyOf, CompositionWithAnyOfAndNullable, CompositionWithAnyOfAnonymous, CompositionWithNestedAnyAndTypeNull, CompositionWithNestedAnyOfAndNull, CompositionWithOneOf, CompositionWithOneOfAndComplexArrayDictionary, CompositionWithOneOfAndNullable, CompositionWithOneOfAndProperties, CompositionWithOneOfAndSimpleArrayDictionary, CompositionWithOneOfAndSimpleDictionary, CompositionWithOneOfAnonymous, CompositionWithOneOfDiscriminator, ConstValue, Default, DeleteCallWithoutParametersAndResponseData, DeleteFooData, DeleteFooData2, DeleteFooData3, DeprecatedCallData, DeprecatedModel, DictionaryWithArray, DictionaryWithDictionary, DictionaryWithProperties, DictionaryWithPropertiesAndAdditionalProperties, DictionaryWithReference, DictionaryWithString, DummyAData, DummyAResponse, DummyAResponses, DummyBData, DummyBResponse, DummyBResponses, DuplicateName2Data, DuplicateName3Data, DuplicateName4Data, DuplicateNameData, EnumFromDescription, EnumWithExtensions, EnumWithNumbers, EnumWithReplacedCharacters, EnumWithStrings, EnumWithXEnumNames, ExportData, ExternalRefA, ExternalRefB, ExternalSharedModel, File, FileResponseData, FileResponseResponse, FileResponseResponses, FileWritable, FooWowData, FooWowResponses, FreeFormObjectWithAdditionalPropertiesEqEmptyObject, FreeFormObjectWithAdditionalPropertiesEqTrue, FreeFormObjectWithoutAdditionalProperties, GenericSchemaDuplicateIssue1SystemBoolean, GenericSchemaDuplicateIssue1SystemBooleanWritable, GenericSchemaDuplicateIssue1SystemString, GenericSchemaDuplicateIssue1SystemStringWritable, GetApiVbyApiVersionSimpleOperationData, GetApiVbyApiVersionSimpleOperationError, GetApiVbyApiVersionSimpleOperationErrors, GetApiVbyApiVersionSimpleOperationResponse, GetApiVbyApiVersionSimpleOperationResponses, GetCallWithOptionalParamData, GetCallWithoutParametersAndResponseData, HeadCallWithoutParametersAndResponseData, Import, ImportData, ImportResponse, ImportResponses, IoK8sApimachineryPkgApisMetaV1DeleteOptions, IoK8sApimachineryPkgApisMetaV1Preconditions, ModelCircle, ModelFromZendesk, ModelSquare, ModelThatExtends, ModelThatExtendsExtends, ModelWithAdditionalPropertiesEqTrue, ModelWithAdditionalPropertiesRef, ModelWithAnyOfConstantSizeArray, ModelWithAnyOfConstantSizeArrayAndIntersect, ModelWithAnyOfConstantSizeArrayNullable, ModelWithAnyOfConstantSizeArrayWithNSizeAndOptions, ModelWithAnyOfConstantSizeArrayWithNSizeAndOptionsWritable, ModelWithArray, ModelWithArrayReadOnlyAndWriteOnly, ModelWithArrayReadOnlyAndWriteOnlyWritable, ModelWithBackticksInDescription, ModelWithBoolean, ModelWithCircularReference, ModelWithConst, ModelWithConstantSizeArray, ModelWithDictionary, ModelWithDuplicateImports, ModelWithDuplicateProperties, ModelWithEnum, ModelWithEnumFromDescription, ModelWithEnumWithHyphen, ModelWithInteger, ModelWithNestedArrayEnums, ModelWithNestedArrayEnumsData, ModelWithNestedArrayEnumsDataBar, ModelWithNestedArrayEnumsDataFoo, ModelWithNestedCompositionEnums, ModelWithNestedEnums, ModelWithNestedProperties, ModelWithNullableObject, ModelWithNullableString, ModelWithNumericEnumUnion, ModelWithOneOfAndProperties, ModelWithOneOfEnum, ModelWithOrderedProperties, ModelWithPattern, ModelWithPatternWritable, ModelWithPrefixItemsConstantSizeArray, ModelWithProperties, ModelWithPropertiesWritable, ModelWithReadOnlyAndWriteOnly, ModelWithReadOnlyAndWriteOnlyWritable, ModelWithReference, ModelWithReferenceWritable, ModelWithString, ModelWithStringError, MultipartRequestData, MultipartResponseData, MultipartResponseResponse, MultipartResponseResponses, NestedAnyOfArraysNullable, NonAsciiæøåÆøÅöôêÊ字符串Data, NonAsciiæøåÆøÅöôêÊ字符串Response, NonAsciiæøåÆøÅöôêÊ字符串Responses, NonAsciiStringæøåÆøÅöôêÊ字符串, NullableObject, OneOfAllOfIssue, OneOfAllOfIssueWritable, OptionsCallWithoutParametersAndResponseData, Pageable, ParameterSimpleParameterUnused, PatchApiVbyApiVersionNoTagData, PatchApiVbyApiVersionNoTagResponses, PatchCallWithoutParametersAndResponseData, PostApiVbyApiVersionFormDataData, PostApiVbyApiVersionRequestBodyData, PostCallWithOptionalParamData, PostCallWithOptionalParamResponse, PostCallWithOptionalParamResponses, PostCallWithoutParametersAndResponseData, PostServiceWithEmptyTagResponse, PostServiceWithEmptyTagResponse2, PutCallWithoutParametersAndResponseData, PutWithFormUrlEncodedData, SchemaWithFormRestrictedKeys, SimpleBoolean, SimpleFile, SimpleFormData, SimpleInteger, SimpleParameter, SimpleReference, SimpleRequestBody, SimpleString, SimpleStringWithPattern, TestErrorCodeData, TestErrorCodeErrors, TestErrorCodeResponses, TypesData, TypesResponse, TypesResponses, UploadFileData, UploadFileResponse, UploadFileResponses, XFooBar } from './types.gen';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/client-custom/default/sdk.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport { type Client, formDataBodySerializer, type Options as Options2, type TDataShape, urlSearchParamsBodySerializer } from '@hey-api/custom-client';\n\nimport { client } from './custom-client.gen';\nimport type { ApiVVersionODataControllerCountData, ApiVVersionODataControllerCountResponses, CallToTestOrderOfParamsData, CallWithDefaultOptionalParametersData, CallWithDefaultParametersData, CallWithDescriptionsData, CallWithDuplicateResponsesData, CallWithDuplicateResponsesErrors, CallWithDuplicateResponsesResponses, CallWithNoContentResponseData, CallWithNoContentResponseResponses, CallWithParametersData, CallWithResponseAndNoContentResponseData, CallWithResponseAndNoContentResponseResponses, CallWithResponseData, CallWithResponseResponses, CallWithResponsesData, CallWithResponsesErrors, CallWithResponsesResponses, CallWithResultFromHeaderData, CallWithResultFromHeaderErrors, CallWithResultFromHeaderResponses, CallWithWeirdParameterNamesData, CollectionFormatData, ComplexParamsData, ComplexParamsResponses, ComplexTypesData, ComplexTypesErrors, ComplexTypesResponses, DeleteCallWithoutParametersAndResponseData, DeleteFooData3, DeprecatedCallData, DummyAData, DummyAResponses, DummyBData, DummyBResponses, DuplicateName2Data, DuplicateName3Data, DuplicateName4Data, DuplicateNameData, ExportData, FileResponseData, FileResponseResponses, FooWowData, FooWowResponses, GetApiVbyApiVersionSimpleOperationData, GetApiVbyApiVersionSimpleOperationErrors, GetApiVbyApiVersionSimpleOperationResponses, GetCallWithOptionalParamData, GetCallWithoutParametersAndResponseData, HeadCallWithoutParametersAndResponseData, ImportData, ImportResponses, MultipartRequestData, MultipartResponseData, MultipartResponseResponses, NonAsciiæøåÆøÅöôêÊ字符串Data, NonAsciiæøåÆøÅöôêÊ字符串Responses, OptionsCallWithoutParametersAndResponseData, PatchApiVbyApiVersionNoTagData, PatchApiVbyApiVersionNoTagResponses, PatchCallWithoutParametersAndResponseData, PostApiVbyApiVersionFormDataData, PostApiVbyApiVersionRequestBodyData, PostCallWithOptionalParamData, PostCallWithOptionalParamResponses, PostCallWithoutParametersAndResponseData, PutCallWithoutParametersAndResponseData, PutWithFormUrlEncodedData, TestErrorCodeData, TestErrorCodeErrors, TestErrorCodeResponses, TypesData, TypesResponses, UploadFileData, UploadFileResponses } from './types.gen';\n\nexport type Options<TData extends TDataShape = TDataShape, ThrowOnError extends boolean = boolean> = Options2<TData, ThrowOnError> & {\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\nexport const export_ = <ThrowOnError extends boolean = false>(options?: Options<ExportData, ThrowOnError>) => (options?.client ?? client).get<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/no+tag', ...options });\n\nexport const patchApiVbyApiVersionNoTag = <ThrowOnError extends boolean = false>(options?: Options<PatchApiVbyApiVersionNoTagData, ThrowOnError>) => (options?.client ?? client).patch<PatchApiVbyApiVersionNoTagResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/no+tag', ...options });\n\nexport const import_ = <ThrowOnError extends boolean = false>(options: Options<ImportData, ThrowOnError>) => (options.client ?? client).post<ImportResponses, unknown, ThrowOnError>({\n    url: '/api/v{api-version}/no+tag',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options.headers\n    }\n});\n\nexport const fooWow = <ThrowOnError extends boolean = false>(options?: Options<FooWowData, ThrowOnError>) => (options?.client ?? client).put<FooWowResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/no+tag', ...options });\n\nexport const apiVVersionODataControllerCount = <ThrowOnError extends boolean = false>(options?: Options<ApiVVersionODataControllerCountData, ThrowOnError>) => (options?.client ?? client).get<ApiVVersionODataControllerCountResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple/$count', ...options });\n\nexport const getApiVbyApiVersionSimpleOperation = <ThrowOnError extends boolean = false>(options: Options<GetApiVbyApiVersionSimpleOperationData, ThrowOnError>) => (options.client ?? client).get<GetApiVbyApiVersionSimpleOperationResponses, GetApiVbyApiVersionSimpleOperationErrors, ThrowOnError>({ url: '/api/v{api-version}/simple:operation', ...options });\n\nexport const deleteCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<DeleteCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).delete<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const getCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<GetCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).get<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const headCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<HeadCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).head<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const optionsCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<OptionsCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).options<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const patchCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<PatchCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).patch<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const postCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<PostCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).post<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const putCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<PutCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).put<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const deleteFoo = <ThrowOnError extends boolean = false>(options: Options<DeleteFooData3, ThrowOnError>) => (options.client ?? client).delete<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/foo/{foo_param}/bar/{BarParam}', ...options });\n\nexport const callWithDescriptions = <ThrowOnError extends boolean = false>(options?: Options<CallWithDescriptionsData, ThrowOnError>) => (options?.client ?? client).post<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/descriptions', ...options });\n\n/**\n * @deprecated\n */\nexport const deprecatedCall = <ThrowOnError extends boolean = false>(options: Options<DeprecatedCallData, ThrowOnError>) => (options.client ?? client).post<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/parameters/deprecated', ...options });\n\nexport const callWithParameters = <ThrowOnError extends boolean = false>(options: Options<CallWithParametersData, ThrowOnError>) => (options.client ?? client).post<unknown, unknown, ThrowOnError>({\n    url: '/api/v{api-version}/parameters/{parameterPath}',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options.headers\n    }\n});\n\nexport const callWithWeirdParameterNames = <ThrowOnError extends boolean = false>(options: Options<CallWithWeirdParameterNamesData, ThrowOnError>) => (options.client ?? client).post<unknown, unknown, ThrowOnError>({\n    url: '/api/v{api-version}/parameters/{parameter.path.1}/{parameter-path-2}/{PARAMETER-PATH-3}',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options.headers\n    }\n});\n\nexport const getCallWithOptionalParam = <ThrowOnError extends boolean = false>(options: Options<GetCallWithOptionalParamData, ThrowOnError>) => (options.client ?? client).get<unknown, unknown, ThrowOnError>({\n    url: '/api/v{api-version}/parameters',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options.headers\n    }\n});\n\nexport const postCallWithOptionalParam = <ThrowOnError extends boolean = false>(options: Options<PostCallWithOptionalParamData, ThrowOnError>) => (options.client ?? client).post<PostCallWithOptionalParamResponses, unknown, ThrowOnError>({\n    url: '/api/v{api-version}/parameters',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options.headers\n    }\n});\n\nexport const postApiVbyApiVersionRequestBody = <ThrowOnError extends boolean = false>(options?: Options<PostApiVbyApiVersionRequestBodyData, ThrowOnError>) => (options?.client ?? client).post<unknown, unknown, ThrowOnError>({\n    url: '/api/v{api-version}/requestBody',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options?.headers\n    }\n});\n\nexport const postApiVbyApiVersionFormData = <ThrowOnError extends boolean = false>(options?: Options<PostApiVbyApiVersionFormDataData, ThrowOnError>) => (options?.client ?? client).post<unknown, unknown, ThrowOnError>({\n    ...formDataBodySerializer,\n    url: '/api/v{api-version}/formData',\n    ...options,\n    headers: {\n        'Content-Type': null,\n        ...options?.headers\n    }\n});\n\nexport const callWithDefaultParameters = <ThrowOnError extends boolean = false>(options?: Options<CallWithDefaultParametersData, ThrowOnError>) => (options?.client ?? client).get<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/defaults', ...options });\n\nexport const callWithDefaultOptionalParameters = <ThrowOnError extends boolean = false>(options?: Options<CallWithDefaultOptionalParametersData, ThrowOnError>) => (options?.client ?? client).post<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/defaults', ...options });\n\nexport const callToTestOrderOfParams = <ThrowOnError extends boolean = false>(options: Options<CallToTestOrderOfParamsData, ThrowOnError>) => (options.client ?? client).put<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/defaults', ...options });\n\nexport const duplicateName = <ThrowOnError extends boolean = false>(options?: Options<DuplicateNameData, ThrowOnError>) => (options?.client ?? client).delete<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/duplicate', ...options });\n\nexport const duplicateName2 = <ThrowOnError extends boolean = false>(options?: Options<DuplicateName2Data, ThrowOnError>) => (options?.client ?? client).get<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/duplicate', ...options });\n\nexport const duplicateName3 = <ThrowOnError extends boolean = false>(options?: Options<DuplicateName3Data, ThrowOnError>) => (options?.client ?? client).post<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/duplicate', ...options });\n\nexport const duplicateName4 = <ThrowOnError extends boolean = false>(options?: Options<DuplicateName4Data, ThrowOnError>) => (options?.client ?? client).put<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/duplicate', ...options });\n\nexport const callWithNoContentResponse = <ThrowOnError extends boolean = false>(options?: Options<CallWithNoContentResponseData, ThrowOnError>) => (options?.client ?? client).get<CallWithNoContentResponseResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/no-content', ...options });\n\nexport const callWithResponseAndNoContentResponse = <ThrowOnError extends boolean = false>(options?: Options<CallWithResponseAndNoContentResponseData, ThrowOnError>) => (options?.client ?? client).get<CallWithResponseAndNoContentResponseResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/multiple-tags/response-and-no-content', ...options });\n\nexport const dummyA = <ThrowOnError extends boolean = false>(options?: Options<DummyAData, ThrowOnError>) => (options?.client ?? client).get<DummyAResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/multiple-tags/a', ...options });\n\nexport const dummyB = <ThrowOnError extends boolean = false>(options?: Options<DummyBData, ThrowOnError>) => (options?.client ?? client).get<DummyBResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/multiple-tags/b', ...options });\n\nexport const callWithResponse = <ThrowOnError extends boolean = false>(options?: Options<CallWithResponseData, ThrowOnError>) => (options?.client ?? client).get<CallWithResponseResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/response', ...options });\n\nexport const callWithDuplicateResponses = <ThrowOnError extends boolean = false>(options?: Options<CallWithDuplicateResponsesData, ThrowOnError>) => (options?.client ?? client).post<CallWithDuplicateResponsesResponses, CallWithDuplicateResponsesErrors, ThrowOnError>({ url: '/api/v{api-version}/response', ...options });\n\nexport const callWithResponses = <ThrowOnError extends boolean = false>(options?: Options<CallWithResponsesData, ThrowOnError>) => (options?.client ?? client).put<CallWithResponsesResponses, CallWithResponsesErrors, ThrowOnError>({ url: '/api/v{api-version}/response', ...options });\n\nexport const collectionFormat = <ThrowOnError extends boolean = false>(options: Options<CollectionFormatData, ThrowOnError>) => (options.client ?? client).get<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/collectionFormat', ...options });\n\nexport const types = <ThrowOnError extends boolean = false>(options: Options<TypesData, ThrowOnError>) => (options.client ?? client).get<TypesResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/types', ...options });\n\nexport const uploadFile = <ThrowOnError extends boolean = false>(options: Options<UploadFileData, ThrowOnError>) => (options.client ?? client).post<UploadFileResponses, unknown, ThrowOnError>({\n    ...urlSearchParamsBodySerializer,\n    url: '/api/v{api-version}/upload',\n    ...options,\n    headers: {\n        'Content-Type': 'application/x-www-form-urlencoded',\n        ...options.headers\n    }\n});\n\nexport const fileResponse = <ThrowOnError extends boolean = false>(options: Options<FileResponseData, ThrowOnError>) => (options.client ?? client).get<FileResponseResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/file/{id}', ...options });\n\nexport const complexTypes = <ThrowOnError extends boolean = false>(options: Options<ComplexTypesData, ThrowOnError>) => (options.client ?? client).get<ComplexTypesResponses, ComplexTypesErrors, ThrowOnError>({\n    querySerializer: { parameters: { parameterObject: { object: { style: 'form' } } } },\n    url: '/api/v{api-version}/complex',\n    ...options\n});\n\nexport const multipartResponse = <ThrowOnError extends boolean = false>(options?: Options<MultipartResponseData, ThrowOnError>) => (options?.client ?? client).get<MultipartResponseResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/multipart', ...options });\n\nexport const multipartRequest = <ThrowOnError extends boolean = false>(options?: Options<MultipartRequestData, ThrowOnError>) => (options?.client ?? client).post<unknown, unknown, ThrowOnError>({\n    ...formDataBodySerializer,\n    url: '/api/v{api-version}/multipart',\n    ...options,\n    headers: {\n        'Content-Type': null,\n        ...options?.headers\n    }\n});\n\nexport const complexParams = <ThrowOnError extends boolean = false>(options: Options<ComplexParamsData, ThrowOnError>) => (options.client ?? client).put<ComplexParamsResponses, unknown, ThrowOnError>({\n    url: '/api/v{api-version}/complex/{id}',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json-patch+json',\n        ...options.headers\n    }\n});\n\nexport const callWithResultFromHeader = <ThrowOnError extends boolean = false>(options?: Options<CallWithResultFromHeaderData, ThrowOnError>) => (options?.client ?? client).post<CallWithResultFromHeaderResponses, CallWithResultFromHeaderErrors, ThrowOnError>({ url: '/api/v{api-version}/header', ...options });\n\nexport const testErrorCode = <ThrowOnError extends boolean = false>(options: Options<TestErrorCodeData, ThrowOnError>) => (options.client ?? client).post<TestErrorCodeResponses, TestErrorCodeErrors, ThrowOnError>({ url: '/api/v{api-version}/error', ...options });\n\nexport const nonAsciiæøåÆøÅöôêÊ字符串 = <ThrowOnError extends boolean = false>(options: Options<NonAsciiæøåÆøÅöôêÊ字符串Data, ThrowOnError>) => (options.client ?? client).post<NonAsciiæøåÆøÅöôêÊ字符串Responses, unknown, ThrowOnError>({ url: '/api/v{api-version}/non-ascii-æøåÆØÅöôêÊ字符串', ...options });\n\n/**\n * Login User\n */\nexport const putWithFormUrlEncoded = <ThrowOnError extends boolean = false>(options: Options<PutWithFormUrlEncodedData, ThrowOnError>) => (options.client ?? client).put<unknown, unknown, ThrowOnError>({\n    ...urlSearchParamsBodySerializer,\n    url: '/api/v{api-version}/non-ascii-æøåÆØÅöôêÊ字符串',\n    ...options,\n    headers: {\n        'Content-Type': 'application/x-www-form-urlencoded',\n        ...options.headers\n    }\n});\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/client-custom/default/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type ClientOptions = {\n    baseUrl: 'http://localhost:3000/base' | (string & {});\n};\n\n/**\n * Model with number-only name\n */\nexport type _400 = string;\n\n/**\n * External ref to shared model (A)\n */\nexport type ExternalRefA = ExternalSharedModel;\n\n/**\n * External ref to shared model (B)\n */\nexport type ExternalRefB = ExternalSharedModel;\n\n/**\n * Testing multiline comments in string: First line\n * Second line\n *\n * Fourth line\n */\nexport type CamelCaseCommentWithBreaks = number;\n\n/**\n * Testing multiline comments in string: First line\n * Second line\n *\n * Fourth line\n */\nexport type CommentWithBreaks = number;\n\n/**\n * Testing backticks in string: `backticks` and ```multiple backticks``` should work\n */\nexport type CommentWithBackticks = number;\n\n/**\n * Testing backticks and quotes in string: `backticks`, 'quotes', \"double quotes\" and ```multiple backticks``` should work\n */\nexport type CommentWithBackticksAndQuotes = number;\n\n/**\n * Testing slashes in string: \\backwards\\\\\\ and /forwards/// should work\n */\nexport type CommentWithSlashes = number;\n\n/**\n * Testing expression placeholders in string: ${expression} should work\n */\nexport type CommentWithExpressionPlaceholders = number;\n\n/**\n * Testing quotes in string: 'single quote''' and \"double quotes\"\"\" should work\n */\nexport type CommentWithQuotes = number;\n\n/**\n * Testing reserved characters in string: * inline * and ** inline ** should work\n */\nexport type CommentWithReservedCharacters = number;\n\n/**\n * This is a simple number\n */\nexport type SimpleInteger = number;\n\n/**\n * This is a simple boolean\n */\nexport type SimpleBoolean = boolean;\n\n/**\n * This is a simple string\n */\nexport type SimpleString = string;\n\n/**\n * A string with non-ascii (unicode) characters valid in typescript identifiers (æøåÆØÅöÔèÈ字符串)\n */\nexport type NonAsciiStringæøåÆøÅöôêÊ字符串 = string;\n\n/**\n * This is a simple file\n */\nexport type SimpleFile = Blob | File;\n\n/**\n * This is a simple reference\n */\nexport type SimpleReference = ModelWithString;\n\n/**\n * This is a simple string\n */\nexport type SimpleStringWithPattern = string | null;\n\n/**\n * This is a simple enum with strings\n */\nexport type EnumWithStrings = 'Success' | 'Warning' | 'Error' | '\\'Single Quote\\'' | '\"Double Quotes\"' | 'Non-ascii: øæåôöØÆÅÔÖ字符串';\n\nexport type EnumWithReplacedCharacters = '\\'Single Quote\\'' | '\"Double Quotes\"' | 'øæåôöØÆÅÔÖ字符串' | 3.1 | '';\n\n/**\n * This is a simple enum with numbers\n */\nexport type EnumWithNumbers = 1 | 2 | 3 | 1.1 | 1.2 | 1.3 | 100 | 200 | 300 | -100 | -200 | -300 | -1.1 | -1.2 | -1.3;\n\n/**\n * Success=1,Warning=2,Error=3\n */\nexport type EnumFromDescription = number;\n\n/**\n * This is a simple enum with numbers\n */\nexport type EnumWithExtensions = 200 | 400 | 500;\n\nexport type EnumWithXEnumNames = 0 | 1 | 2;\n\n/**\n * This is a simple array with numbers\n */\nexport type ArrayWithNumbers = Array<number>;\n\n/**\n * This is a simple array with booleans\n */\nexport type ArrayWithBooleans = Array<boolean>;\n\n/**\n * This is a simple array with strings\n */\nexport type ArrayWithStrings = Array<string>;\n\n/**\n * This is a simple array with references\n */\nexport type ArrayWithReferences = Array<ModelWithString>;\n\n/**\n * This is a simple array containing an array\n */\nexport type ArrayWithArray = Array<Array<ModelWithString>>;\n\n/**\n * This is a simple array with properties\n */\nexport type ArrayWithProperties = Array<{\n    '16x16'?: CamelCaseCommentWithBreaks;\n    bar?: string;\n}>;\n\n/**\n * This is a simple array with any of properties\n */\nexport type ArrayWithAnyOfProperties = Array<{\n    foo?: string;\n} | {\n    bar?: string;\n}>;\n\nexport type AnyOfAnyAndNull = {\n    data?: unknown | null;\n};\n\n/**\n * This is a simple array with any of properties\n */\nexport type AnyOfArrays = {\n    results?: Array<{\n        foo?: string;\n    } | {\n        bar?: string;\n    }>;\n};\n\n/**\n * This is a string dictionary\n */\nexport type DictionaryWithString = {\n    [key: string]: string;\n};\n\nexport type DictionaryWithPropertiesAndAdditionalProperties = {\n    foo?: number;\n    bar?: boolean;\n    [key: string]: string | number | boolean | undefined;\n};\n\n/**\n * This is a string reference\n */\nexport type DictionaryWithReference = {\n    [key: string]: ModelWithString;\n};\n\n/**\n * This is a complex dictionary\n */\nexport type DictionaryWithArray = {\n    [key: string]: Array<ModelWithString>;\n};\n\n/**\n * This is a string dictionary\n */\nexport type DictionaryWithDictionary = {\n    [key: string]: {\n        [key: string]: string;\n    };\n};\n\n/**\n * This is a complex dictionary\n */\nexport type DictionaryWithProperties = {\n    [key: string]: {\n        foo?: string;\n        bar?: string;\n    };\n};\n\n/**\n * This is a model with one number property\n */\nexport type ModelWithInteger = {\n    /**\n     * This is a simple number property\n     */\n    prop?: number;\n};\n\n/**\n * This is a model with one boolean property\n */\nexport type ModelWithBoolean = {\n    /**\n     * This is a simple boolean property\n     */\n    prop?: boolean;\n};\n\n/**\n * This is a model with one string property\n */\nexport type ModelWithString = {\n    /**\n     * This is a simple string property\n     */\n    prop?: string;\n};\n\n/**\n * This is a model with one string property\n */\nexport type ModelWithStringError = {\n    /**\n     * This is a simple string property\n     */\n    prop?: string;\n};\n\n/**\n * `Comment` or `VoiceComment`. The JSON object for adding voice comments to tickets is different. See [Adding voice comments to tickets](/documentation/ticketing/managing-tickets/adding-voice-comments-to-tickets)\n */\nexport type ModelFromZendesk = string;\n\n/**\n * This is a model with one string property\n */\nexport type ModelWithNullableString = {\n    /**\n     * This is a simple string property\n     */\n    nullableProp1?: string | null;\n    /**\n     * This is a simple string property\n     */\n    nullableRequiredProp1: string | null;\n    /**\n     * This is a simple string property\n     */\n    nullableProp2?: string | null;\n    /**\n     * This is a simple string property\n     */\n    nullableRequiredProp2: string | null;\n    /**\n     * This is a simple enum with strings\n     */\n    'foo_bar-enum'?: 'Success' | 'Warning' | 'Error' | 'ØÆÅ字符串';\n};\n\n/**\n * This is a model with one enum\n */\nexport type ModelWithEnum = {\n    /**\n     * This is a simple enum with strings\n     */\n    'foo_bar-enum'?: 'Success' | 'Warning' | 'Error' | 'ØÆÅ字符串';\n    /**\n     * These are the HTTP error code enums\n     */\n    statusCode?: '100' | '200 FOO' | '300 FOO_BAR' | '400 foo-bar' | '500 foo.bar' | '600 foo&bar';\n    /**\n     * Simple boolean enum\n     */\n    bool?: true;\n};\n\n/**\n * This is a model with one enum with escaped name\n */\nexport type ModelWithEnumWithHyphen = {\n    /**\n     * Foo-Bar-Baz-Qux\n     */\n    'foo-bar-baz-qux'?: '3.0';\n};\n\n/**\n * This is a model with one enum\n */\nexport type ModelWithEnumFromDescription = {\n    /**\n     * Success=1,Warning=2,Error=3\n     */\n    test?: number;\n};\n\n/**\n * This is a model with nested enums\n */\nexport type ModelWithNestedEnums = {\n    dictionaryWithEnum?: {\n        [key: string]: 'Success' | 'Warning' | 'Error';\n    };\n    dictionaryWithEnumFromDescription?: {\n        [key: string]: number;\n    };\n    arrayWithEnum?: Array<'Success' | 'Warning' | 'Error'>;\n    arrayWithDescription?: Array<number>;\n    /**\n     * This is a simple enum with strings\n     */\n    'foo_bar-enum'?: 'Success' | 'Warning' | 'Error' | 'ØÆÅ字符串';\n};\n\n/**\n * This is a model with one property containing a reference\n */\nexport type ModelWithReference = {\n    prop?: ModelWithProperties;\n};\n\n/**\n * This is a model with one property containing an array\n */\nexport type ModelWithArrayReadOnlyAndWriteOnly = {\n    prop?: Array<ModelWithReadOnlyAndWriteOnly>;\n    propWithFile?: Array<Blob | File>;\n    propWithNumber?: Array<number>;\n};\n\n/**\n * This is a model with one property containing an array\n */\nexport type ModelWithArray = {\n    prop?: Array<ModelWithString>;\n    propWithFile?: Array<Blob | File>;\n    propWithNumber?: Array<number>;\n};\n\n/**\n * This is a model with one property containing a dictionary\n */\nexport type ModelWithDictionary = {\n    prop?: {\n        [key: string]: string;\n    };\n};\n\n/**\n * This is a deprecated model with a deprecated property\n *\n * @deprecated\n */\nexport type DeprecatedModel = {\n    /**\n     * This is a deprecated property\n     *\n     * @deprecated\n     */\n    prop?: string;\n};\n\n/**\n * This is a model with one property containing a circular reference\n */\nexport type ModelWithCircularReference = {\n    prop?: ModelWithCircularReference;\n};\n\n/**\n * This is a model with one property with a 'one of' relationship\n */\nexport type CompositionWithOneOf = {\n    propA?: ModelWithString | ModelWithEnum | ModelWithArray | ModelWithDictionary;\n};\n\n/**\n * This is a model with one property with a 'one of' relationship where the options are not $ref\n */\nexport type CompositionWithOneOfAnonymous = {\n    propA?: {\n        propA?: string;\n    } | string | number;\n};\n\n/**\n * Circle\n */\nexport type ModelCircle = {\n    kind: string;\n    radius?: number;\n};\n\n/**\n * Square\n */\nexport type ModelSquare = {\n    kind: string;\n    sideLength?: number;\n};\n\n/**\n * This is a model with one property with a 'one of' relationship where the options are not $ref\n */\nexport type CompositionWithOneOfDiscriminator = ({\n    kind: 'circle';\n} & ModelCircle) | ({\n    kind: 'square';\n} & ModelSquare);\n\n/**\n * This is a model with one property with a 'any of' relationship\n */\nexport type CompositionWithAnyOf = {\n    propA?: ModelWithString | ModelWithEnum | ModelWithArray | ModelWithDictionary;\n};\n\n/**\n * This is a model with one property with a 'any of' relationship where the options are not $ref\n */\nexport type CompositionWithAnyOfAnonymous = {\n    propA?: {\n        propA?: string;\n    } | string | number;\n};\n\n/**\n * This is a model with nested 'any of' property with a type null\n */\nexport type CompositionWithNestedAnyAndTypeNull = {\n    propA?: Array<ModelWithDictionary | null> | Array<ModelWithArray | null>;\n};\n\nexport type _3eNum1Период = 'Bird' | 'Dog';\n\nexport type ConstValue = 'ConstValue';\n\n/**\n * This is a model with one property with a 'any of' relationship where the options are not $ref\n */\nexport type CompositionWithNestedAnyOfAndNull = {\n    /**\n     * Scopes\n     */\n    propA?: Array<_3eNum1Период | ConstValue> | null;\n};\n\n/**\n * This is a model with one property with a 'one of' relationship\n */\nexport type CompositionWithOneOfAndNullable = {\n    propA?: {\n        boolean?: boolean;\n    } | ModelWithEnum | ModelWithArray | ModelWithDictionary | null;\n};\n\n/**\n * This is a model that contains a simple dictionary within composition\n */\nexport type CompositionWithOneOfAndSimpleDictionary = {\n    propA?: boolean | {\n        [key: string]: number;\n    };\n};\n\n/**\n * This is a model that contains a dictionary of simple arrays within composition\n */\nexport type CompositionWithOneOfAndSimpleArrayDictionary = {\n    propA?: boolean | {\n        [key: string]: Array<boolean>;\n    };\n};\n\n/**\n * This is a model that contains a dictionary of complex arrays (composited) within composition\n */\nexport type CompositionWithOneOfAndComplexArrayDictionary = {\n    propA?: boolean | {\n        [key: string]: Array<number | string>;\n    };\n};\n\n/**\n * This is a model with one property with a 'all of' relationship\n */\nexport type CompositionWithAllOfAndNullable = {\n    propA?: ({\n        boolean?: boolean;\n    } & ModelWithEnum & ModelWithArray & ModelWithDictionary) | null;\n};\n\n/**\n * This is a model with one property with a 'any of' relationship\n */\nexport type CompositionWithAnyOfAndNullable = {\n    propA?: {\n        boolean?: boolean;\n    } | ModelWithEnum | ModelWithArray | ModelWithDictionary | null;\n};\n\n/**\n * This is a base model with two simple optional properties\n */\nexport type CompositionBaseModel = {\n    firstName?: string;\n    lastname?: string;\n};\n\n/**\n * This is a model that extends the base model\n */\nexport type CompositionExtendedModel = CompositionBaseModel & {\n    age: number;\n    firstName: string;\n    lastname: string;\n};\n\n/**\n * This is a model with one nested property\n */\nexport type ModelWithProperties = {\n    required: string;\n    readonly requiredAndReadOnly: string;\n    requiredAndNullable: string | null;\n    string?: string;\n    number?: number;\n    boolean?: boolean;\n    reference?: ModelWithString;\n    'property with space'?: string;\n    default?: string;\n    try?: string;\n    readonly '@namespace.string'?: string;\n    readonly '@namespace.integer'?: number;\n};\n\n/**\n * This is a model with one nested property\n */\nexport type ModelWithNestedProperties = {\n    readonly first: {\n        readonly second: {\n            readonly third: string | null;\n        } | null;\n    } | null;\n};\n\n/**\n * This is a model with duplicated properties\n */\nexport type ModelWithDuplicateProperties = {\n    prop?: ModelWithString;\n};\n\n/**\n * This is a model with ordered properties\n */\nexport type ModelWithOrderedProperties = {\n    zebra?: string;\n    apple?: string;\n    hawaii?: string;\n};\n\n/**\n * This is a model with duplicated imports\n */\nexport type ModelWithDuplicateImports = {\n    propA?: ModelWithString;\n    propB?: ModelWithString;\n    propC?: ModelWithString;\n};\n\n/**\n * This is a model that extends another model\n */\nexport type ModelThatExtends = ModelWithString & {\n    propExtendsA?: string;\n    propExtendsB?: ModelWithString;\n};\n\n/**\n * This is a model that extends another model\n */\nexport type ModelThatExtendsExtends = ModelWithString & ModelThatExtends & {\n    propExtendsC?: string;\n    propExtendsD?: ModelWithString;\n};\n\n/**\n * This is a model that contains a some patterns\n */\nexport type ModelWithPattern = {\n    key: string;\n    name: string;\n    readonly enabled?: boolean;\n    readonly modified?: string;\n    id?: string;\n    text?: string;\n    patternWithSingleQuotes?: string;\n    patternWithNewline?: string;\n    patternWithBacktick?: string;\n    patternWithUnicode?: string;\n};\n\nexport type File = {\n    /**\n     * Id\n     */\n    readonly id?: string;\n    /**\n     * Updated at\n     */\n    readonly updated_at?: string;\n    /**\n     * Created at\n     */\n    readonly created_at?: string;\n    /**\n     * Mime\n     */\n    mime: string;\n    /**\n     * File\n     */\n    readonly file?: string;\n};\n\nexport type Default = {\n    name?: string;\n};\n\nexport type Pageable = {\n    page?: number;\n    size?: number;\n    sort?: Array<string>;\n};\n\n/**\n * This is a free-form object without additionalProperties.\n */\nexport type FreeFormObjectWithoutAdditionalProperties = {\n    [key: string]: unknown;\n};\n\n/**\n * This is a free-form object with additionalProperties: true.\n */\nexport type FreeFormObjectWithAdditionalPropertiesEqTrue = {\n    [key: string]: unknown;\n};\n\n/**\n * This is a free-form object with additionalProperties: {}.\n */\nexport type FreeFormObjectWithAdditionalPropertiesEqEmptyObject = {\n    [key: string]: unknown;\n};\n\nexport type ModelWithConst = {\n    String?: 'String';\n    number?: 0;\n    null?: null;\n    withType?: 'Some string';\n};\n\n/**\n * This is a model with one property and additionalProperties: true\n */\nexport type ModelWithAdditionalPropertiesEqTrue = {\n    /**\n     * This is a simple string property\n     */\n    prop?: string;\n    [key: string]: unknown;\n};\n\nexport type NestedAnyOfArraysNullable = {\n    nullableArray?: Array<string | boolean> | null;\n};\n\nexport type CompositionWithOneOfAndProperties = ({\n    foo: SimpleParameter;\n} | {\n    bar: NonAsciiStringæøåÆøÅöôêÊ字符串;\n}) & {\n    baz: number | null;\n    qux: number;\n};\n\n/**\n * An object that can be null\n */\nexport type NullableObject = {\n    foo?: string;\n} | null;\n\n/**\n * Some % character\n */\nexport type CharactersInDescription = string;\n\nexport type ModelWithNullableObject = {\n    data?: NullableObject;\n};\n\n/**\n * An object with additional properties that can be null (anyOf ref + null)\n */\nexport type ModelWithAdditionalPropertiesRef = {\n    [key: string]: NullableObject | null;\n};\n\nexport type ModelWithOneOfEnum = {\n    foo: 'Bar';\n} | {\n    foo: 'Baz';\n} | {\n    foo: 'Qux';\n} | {\n    content: string;\n    foo: 'Quux';\n} | {\n    content: [\n        string,\n        string\n    ];\n    foo: 'Corge';\n};\n\nexport type ModelWithNestedArrayEnumsDataFoo = 'foo' | 'bar';\n\nexport type ModelWithNestedArrayEnumsDataBar = 'baz' | 'qux';\n\nexport type ModelWithNestedArrayEnumsData = {\n    foo?: Array<ModelWithNestedArrayEnumsDataFoo>;\n    bar?: Array<ModelWithNestedArrayEnumsDataBar>;\n};\n\nexport type ModelWithNestedArrayEnums = {\n    array_strings?: Array<string>;\n    data?: ModelWithNestedArrayEnumsData;\n};\n\nexport type ModelWithNestedCompositionEnums = {\n    foo?: ModelWithNestedArrayEnumsDataFoo;\n};\n\nexport type ModelWithReadOnlyAndWriteOnly = {\n    foo: string;\n    readonly bar: string;\n};\n\nexport type ModelWithConstantSizeArray = [\n    number,\n    number\n];\n\nexport type ModelWithAnyOfConstantSizeArray = [\n    number | string,\n    number | string,\n    number | string\n];\n\nexport type ModelWithPrefixItemsConstantSizeArray = [\n    ModelWithInteger,\n    number | string,\n    string\n];\n\nexport type ModelWithAnyOfConstantSizeArrayNullable = [\n    number | null | string,\n    number | null | string,\n    number | null | string\n];\n\nexport type ModelWithAnyOfConstantSizeArrayWithNSizeAndOptions = [\n    number | Import,\n    number | Import\n];\n\nexport type ModelWithAnyOfConstantSizeArrayAndIntersect = [\n    number & string,\n    number & string\n];\n\nexport type ModelWithNumericEnumUnion = {\n    /**\n     * Период\n     */\n    value?: -10 | -1 | 0 | 1 | 3 | 6 | 12;\n};\n\n/**\n * Some description with `back ticks`\n */\nexport type ModelWithBackticksInDescription = {\n    /**\n     * The template `that` should be used for parsing and importing the contents of the CSV file.\n     *\n     * <br/><p>There is one placeholder currently supported:<ul>     <li><b>${x}</b> - refers to the n-th column in the CSV file, e.g. ${1}, ${2}, ...)</li></ul><p>Example of a correct JSON template:</p>\n     * <pre>\n     * [\n     * {\n     * \"resourceType\": \"Asset\",\n     * \"identifier\": {\n     * \"name\": \"${1}\",\n     * \"domain\": {\n     * \"name\": \"${2}\",\n     * \"community\": {\n     * \"name\": \"Some Community\"\n     * }\n     * }\n     * },\n     * \"attributes\" : {\n     * \"00000000-0000-0000-0000-000000003115\" : [ {\n     * \"value\" : \"${3}\"\n     * } ],\n     * \"00000000-0000-0000-0000-000000000222\" : [ {\n     * \"value\" : \"${4}\"\n     * } ]\n     * }\n     * }\n     * ]\n     * </pre>\n     */\n    template?: string;\n};\n\nexport type ModelWithOneOfAndProperties = (SimpleParameter | NonAsciiStringæøåÆøÅöôêÊ字符串) & {\n    baz: number | null;\n    qux: number;\n};\n\n/**\n * Model used to test deduplication strategy (unused)\n */\nexport type ParameterSimpleParameterUnused = string;\n\n/**\n * Model used to test deduplication strategy\n */\nexport type PostServiceWithEmptyTagResponse = string;\n\n/**\n * Model used to test deduplication strategy\n */\nexport type PostServiceWithEmptyTagResponse2 = string;\n\n/**\n * Model used to test deduplication strategy\n */\nexport type DeleteFooData = string;\n\n/**\n * Model used to test deduplication strategy\n */\nexport type DeleteFooData2 = string;\n\n/**\n * Model with restricted keyword name\n */\nexport type Import = string;\n\nexport type SchemaWithFormRestrictedKeys = {\n    description?: string;\n    'x-enum-descriptions'?: string;\n    'x-enum-varnames'?: string;\n    'x-enumNames'?: string;\n    title?: string;\n    object?: {\n        description?: string;\n        'x-enum-descriptions'?: string;\n        'x-enum-varnames'?: string;\n        'x-enumNames'?: string;\n        title?: string;\n    };\n    array?: Array<{\n        description?: string;\n        'x-enum-descriptions'?: string;\n        'x-enum-varnames'?: string;\n        'x-enumNames'?: string;\n        title?: string;\n    }>;\n};\n\n/**\n * This schema was giving PascalCase transformations a hard time\n */\nexport type IoK8sApimachineryPkgApisMetaV1DeleteOptions = {\n    /**\n     * Must be fulfilled before a deletion is carried out. If not possible, a 409 Conflict status will be returned.\n     */\n    preconditions?: IoK8sApimachineryPkgApisMetaV1Preconditions;\n};\n\n/**\n * This schema was giving PascalCase transformations a hard time\n */\nexport type IoK8sApimachineryPkgApisMetaV1Preconditions = {\n    /**\n     * Specifies the target ResourceVersion\n     */\n    resourceVersion?: string;\n    /**\n     * Specifies the target UID.\n     */\n    uid?: string;\n};\n\nexport type AdditionalPropertiesUnknownIssue = {\n    [key: string]: string | number;\n};\n\nexport type AdditionalPropertiesUnknownIssue2 = {\n    [key: string]: string | number;\n};\n\nexport type AdditionalPropertiesUnknownIssue3 = string & {\n    entries: {\n        [key: string]: AdditionalPropertiesUnknownIssue;\n    };\n};\n\nexport type AdditionalPropertiesIntegerIssue = {\n    value: number;\n    [key: string]: number;\n};\n\nexport type OneOfAllOfIssue = ((ConstValue | GenericSchemaDuplicateIssue1SystemBoolean) & _3eNum1Период) | GenericSchemaDuplicateIssue1SystemString;\n\nexport type GenericSchemaDuplicateIssue1SystemBoolean = {\n    item?: boolean;\n    error?: string | null;\n    readonly hasError?: boolean;\n    data?: {\n        [key: string]: never;\n    };\n};\n\nexport type GenericSchemaDuplicateIssue1SystemString = {\n    item?: string | null;\n    error?: string | null;\n    readonly hasError?: boolean;\n};\n\nexport type ExternalSharedModel = {\n    id: string;\n    name?: string;\n};\n\n/**\n * This is a model with one property containing a reference\n */\nexport type ModelWithReferenceWritable = {\n    prop?: ModelWithPropertiesWritable;\n};\n\n/**\n * This is a model with one property containing an array\n */\nexport type ModelWithArrayReadOnlyAndWriteOnlyWritable = {\n    prop?: Array<ModelWithReadOnlyAndWriteOnlyWritable>;\n    propWithFile?: Array<Blob | File>;\n    propWithNumber?: Array<number>;\n};\n\n/**\n * This is a model with one nested property\n */\nexport type ModelWithPropertiesWritable = {\n    required: string;\n    requiredAndNullable: string | null;\n    string?: string;\n    number?: number;\n    boolean?: boolean;\n    reference?: ModelWithString;\n    'property with space'?: string;\n    default?: string;\n    try?: string;\n};\n\n/**\n * This is a model that contains a some patterns\n */\nexport type ModelWithPatternWritable = {\n    key: string;\n    name: string;\n    id?: string;\n    text?: string;\n    patternWithSingleQuotes?: string;\n    patternWithNewline?: string;\n    patternWithBacktick?: string;\n    patternWithUnicode?: string;\n};\n\nexport type FileWritable = {\n    /**\n     * Mime\n     */\n    mime: string;\n};\n\nexport type ModelWithReadOnlyAndWriteOnlyWritable = {\n    foo: string;\n    baz: string;\n};\n\nexport type ModelWithAnyOfConstantSizeArrayWithNSizeAndOptionsWritable = [\n    number | Import,\n    number | Import\n];\n\nexport type AdditionalPropertiesUnknownIssueWritable = {\n    [key: string]: string | number;\n};\n\nexport type OneOfAllOfIssueWritable = ((ConstValue | GenericSchemaDuplicateIssue1SystemBoolean) & _3eNum1Период) | GenericSchemaDuplicateIssue1SystemString;\n\nexport type GenericSchemaDuplicateIssue1SystemBooleanWritable = {\n    item?: boolean;\n    error?: string | null;\n    data?: {\n        [key: string]: never;\n    };\n};\n\nexport type GenericSchemaDuplicateIssue1SystemStringWritable = {\n    item?: string | null;\n    error?: string | null;\n};\n\n/**\n * This is a reusable parameter\n */\nexport type SimpleParameter = string;\n\n/**\n * Parameter with illegal characters\n */\nexport type XFooBar = ModelWithString;\n\n/**\n * A reusable request body\n */\nexport type SimpleRequestBody = ModelWithString;\n\n/**\n * A reusable request body\n */\nexport type SimpleFormData = ModelWithString;\n\nexport type ExportData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no+tag';\n};\n\nexport type PatchApiVbyApiVersionNoTagData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no+tag';\n};\n\nexport type PatchApiVbyApiVersionNoTagResponses = {\n    /**\n     * OK\n     */\n    default: unknown;\n};\n\nexport type ImportData = {\n    body: ModelWithReadOnlyAndWriteOnlyWritable | ModelWithArrayReadOnlyAndWriteOnlyWritable;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no+tag';\n};\n\nexport type ImportResponses = {\n    /**\n     * Success\n     */\n    200: ModelFromZendesk;\n    /**\n     * Default success response\n     */\n    default: ModelWithReadOnlyAndWriteOnly;\n};\n\nexport type ImportResponse = ImportResponses[keyof ImportResponses];\n\nexport type FooWowData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no+tag';\n};\n\nexport type FooWowResponses = {\n    /**\n     * OK\n     */\n    default: unknown;\n};\n\nexport type ApiVVersionODataControllerCountData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple/$count';\n};\n\nexport type ApiVVersionODataControllerCountResponses = {\n    /**\n     * Success\n     */\n    200: ModelFromZendesk;\n};\n\nexport type ApiVVersionODataControllerCountResponse = ApiVVersionODataControllerCountResponses[keyof ApiVVersionODataControllerCountResponses];\n\nexport type GetApiVbyApiVersionSimpleOperationData = {\n    body?: never;\n    path: {\n        /**\n         * foo in method\n         */\n        foo_param: string;\n    };\n    query?: never;\n    url: '/api/v{api-version}/simple:operation';\n};\n\nexport type GetApiVbyApiVersionSimpleOperationErrors = {\n    /**\n     * Default error response\n     */\n    default: ModelWithBoolean;\n};\n\nexport type GetApiVbyApiVersionSimpleOperationError = GetApiVbyApiVersionSimpleOperationErrors[keyof GetApiVbyApiVersionSimpleOperationErrors];\n\nexport type GetApiVbyApiVersionSimpleOperationResponses = {\n    /**\n     * Response is a simple number\n     */\n    200: number;\n};\n\nexport type GetApiVbyApiVersionSimpleOperationResponse = GetApiVbyApiVersionSimpleOperationResponses[keyof GetApiVbyApiVersionSimpleOperationResponses];\n\nexport type DeleteCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type GetCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type HeadCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type OptionsCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type PatchCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type PostCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type PutCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type DeleteFooData3 = {\n    body?: never;\n    headers: {\n        /**\n         * Parameter with illegal characters\n         */\n        'x-Foo-Bar': ModelWithString;\n    };\n    path: {\n        /**\n         * foo in method\n         */\n        foo_param: string;\n        /**\n         * bar in method\n         */\n        BarParam: string;\n    };\n    query?: never;\n    url: '/api/v{api-version}/foo/{foo_param}/bar/{BarParam}';\n};\n\nexport type CallWithDescriptionsData = {\n    body?: never;\n    path?: never;\n    query?: {\n        /**\n         * Testing multiline comments in string: First line\n         * Second line\n         *\n         * Fourth line\n         */\n        parameterWithBreaks?: string;\n        /**\n         * Testing backticks in string: `backticks` and ```multiple backticks``` should work\n         */\n        parameterWithBackticks?: string;\n        /**\n         * Testing slashes in string: \\backwards\\\\\\ and /forwards/// should work\n         */\n        parameterWithSlashes?: string;\n        /**\n         * Testing expression placeholders in string: ${expression} should work\n         */\n        parameterWithExpressionPlaceholders?: string;\n        /**\n         * Testing quotes in string: 'single quote''' and \"double quotes\"\"\" should work\n         */\n        parameterWithQuotes?: string;\n        /**\n         * Testing reserved characters in string: * inline * and ** inline ** should work\n         */\n        parameterWithReservedCharacters?: string;\n    };\n    url: '/api/v{api-version}/descriptions';\n};\n\nexport type DeprecatedCallData = {\n    body?: never;\n    headers: {\n        /**\n         * This parameter is deprecated\n         *\n         * @deprecated\n         */\n        parameter: DeprecatedModel | null;\n    };\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/parameters/deprecated';\n};\n\nexport type CallWithParametersData = {\n    /**\n     * This is the parameter that goes into the body\n     */\n    body: {\n        [key: string]: unknown;\n    } | null;\n    headers: {\n        /**\n         * This is the parameter that goes into the header\n         */\n        parameterHeader: string | null;\n    };\n    path: {\n        /**\n         * This is the parameter that goes into the path\n         */\n        parameterPath: string | null;\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string | null;\n    };\n    query: {\n        foo_ref_enum?: ModelWithNestedArrayEnumsDataFoo;\n        foo_all_of_enum: ModelWithNestedArrayEnumsDataFoo;\n        /**\n         * This is the parameter that goes into the query params\n         */\n        cursor: string | null;\n    };\n    url: '/api/v{api-version}/parameters/{parameterPath}';\n};\n\nexport type CallWithWeirdParameterNamesData = {\n    /**\n     * This is the parameter that goes into the body\n     */\n    body: ModelWithString | null;\n    headers: {\n        /**\n         * This is the parameter that goes into the request header\n         */\n        'parameter.header': string | null;\n    };\n    path: {\n        /**\n         * This is the parameter that goes into the path\n         */\n        'parameter.path.1'?: string;\n        /**\n         * This is the parameter that goes into the path\n         */\n        'parameter-path-2'?: string;\n        /**\n         * This is the parameter that goes into the path\n         */\n        'PARAMETER-PATH-3'?: string;\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string | null;\n    };\n    query: {\n        /**\n         * This is the parameter with a reserved keyword\n         */\n        default?: string;\n        /**\n         * This is the parameter that goes into the request query params\n         */\n        'parameter-query': string | null;\n    };\n    url: '/api/v{api-version}/parameters/{parameter.path.1}/{parameter-path-2}/{PARAMETER-PATH-3}';\n};\n\nexport type GetCallWithOptionalParamData = {\n    /**\n     * This is a required parameter\n     */\n    body: ModelWithOneOfEnum;\n    path?: never;\n    query?: {\n        /**\n         * This is an optional parameter\n         */\n        page?: number;\n    };\n    url: '/api/v{api-version}/parameters';\n};\n\nexport type PostCallWithOptionalParamData = {\n    /**\n     * This is an optional parameter\n     */\n    body?: {\n        offset?: number | null;\n    };\n    path?: never;\n    query: {\n        /**\n         * This is a required parameter\n         */\n        parameter: Pageable;\n    };\n    url: '/api/v{api-version}/parameters';\n};\n\nexport type PostCallWithOptionalParamResponses = {\n    /**\n     * Response is a simple number\n     */\n    200: number;\n    /**\n     * Success\n     */\n    204: void;\n};\n\nexport type PostCallWithOptionalParamResponse = PostCallWithOptionalParamResponses[keyof PostCallWithOptionalParamResponses];\n\nexport type PostApiVbyApiVersionRequestBodyData = {\n    /**\n     * A reusable request body\n     */\n    body?: SimpleRequestBody;\n    path?: never;\n    query?: {\n        /**\n         * This is a reusable parameter\n         */\n        parameter?: string;\n    };\n    url: '/api/v{api-version}/requestBody';\n};\n\nexport type PostApiVbyApiVersionFormDataData = {\n    /**\n     * A reusable request body\n     */\n    body?: SimpleFormData;\n    path?: never;\n    query?: {\n        /**\n         * This is a reusable parameter\n         */\n        parameter?: string;\n    };\n    url: '/api/v{api-version}/formData';\n};\n\nexport type CallWithDefaultParametersData = {\n    body?: never;\n    path?: never;\n    query?: {\n        /**\n         * This is a simple string with default value\n         */\n        parameterString?: string | null;\n        /**\n         * This is a simple number with default value\n         */\n        parameterNumber?: number | null;\n        /**\n         * This is a simple boolean with default value\n         */\n        parameterBoolean?: boolean | null;\n        /**\n         * This is a simple enum with default value\n         */\n        parameterEnum?: 'Success' | 'Warning' | 'Error';\n        /**\n         * This is a simple model with default value\n         */\n        parameterModel?: ModelWithString | null;\n    };\n    url: '/api/v{api-version}/defaults';\n};\n\nexport type CallWithDefaultOptionalParametersData = {\n    body?: never;\n    path?: never;\n    query?: {\n        /**\n         * This is a simple string that is optional with default value\n         */\n        parameterString?: string;\n        /**\n         * This is a simple number that is optional with default value\n         */\n        parameterNumber?: number;\n        /**\n         * This is a simple boolean that is optional with default value\n         */\n        parameterBoolean?: boolean;\n        /**\n         * This is a simple enum that is optional with default value\n         */\n        parameterEnum?: 'Success' | 'Warning' | 'Error';\n        /**\n         * This is a simple model that is optional with default value\n         */\n        parameterModel?: ModelWithString;\n    };\n    url: '/api/v{api-version}/defaults';\n};\n\nexport type CallToTestOrderOfParamsData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * This is a optional string with default\n         */\n        parameterOptionalStringWithDefault?: string;\n        /**\n         * This is a optional string with empty default\n         */\n        parameterOptionalStringWithEmptyDefault?: string;\n        /**\n         * This is a optional string with no default\n         */\n        parameterOptionalStringWithNoDefault?: string;\n        /**\n         * This is a string with default\n         */\n        parameterStringWithDefault: string;\n        /**\n         * This is a string with empty default\n         */\n        parameterStringWithEmptyDefault: string;\n        /**\n         * This is a string with no default\n         */\n        parameterStringWithNoDefault: string;\n        /**\n         * This is a string that can be null with no default\n         */\n        parameterStringNullableWithNoDefault?: string | null;\n        /**\n         * This is a string that can be null with default\n         */\n        parameterStringNullableWithDefault?: string | null;\n    };\n    url: '/api/v{api-version}/defaults';\n};\n\nexport type DuplicateNameData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/duplicate';\n};\n\nexport type DuplicateName2Data = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/duplicate';\n};\n\nexport type DuplicateName3Data = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/duplicate';\n};\n\nexport type DuplicateName4Data = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/duplicate';\n};\n\nexport type CallWithNoContentResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no-content';\n};\n\nexport type CallWithNoContentResponseResponses = {\n    /**\n     * Success\n     */\n    204: void;\n};\n\nexport type CallWithNoContentResponseResponse = CallWithNoContentResponseResponses[keyof CallWithNoContentResponseResponses];\n\nexport type CallWithResponseAndNoContentResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multiple-tags/response-and-no-content';\n};\n\nexport type CallWithResponseAndNoContentResponseResponses = {\n    /**\n     * Response is a simple number\n     */\n    200: number;\n    /**\n     * Success\n     */\n    204: void;\n};\n\nexport type CallWithResponseAndNoContentResponseResponse = CallWithResponseAndNoContentResponseResponses[keyof CallWithResponseAndNoContentResponseResponses];\n\nexport type DummyAData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multiple-tags/a';\n};\n\nexport type DummyAResponses = {\n    200: _400;\n};\n\nexport type DummyAResponse = DummyAResponses[keyof DummyAResponses];\n\nexport type DummyBData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multiple-tags/b';\n};\n\nexport type DummyBResponses = {\n    /**\n     * Success\n     */\n    204: void;\n};\n\nexport type DummyBResponse = DummyBResponses[keyof DummyBResponses];\n\nexport type CallWithResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/response';\n};\n\nexport type CallWithResponseResponses = {\n    default: Import;\n};\n\nexport type CallWithResponseResponse = CallWithResponseResponses[keyof CallWithResponseResponses];\n\nexport type CallWithDuplicateResponsesData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/response';\n};\n\nexport type CallWithDuplicateResponsesErrors = {\n    /**\n     * Message for 500 error\n     */\n    500: ModelWithStringError;\n    /**\n     * Message for 501 error\n     */\n    501: ModelWithStringError;\n    /**\n     * Message for 502 error\n     */\n    502: ModelWithStringError;\n    /**\n     * Message for 4XX errors\n     */\n    '4XX': DictionaryWithArray;\n    /**\n     * Default error response\n     */\n    default: ModelWithBoolean;\n};\n\nexport type CallWithDuplicateResponsesError = CallWithDuplicateResponsesErrors[keyof CallWithDuplicateResponsesErrors];\n\nexport type CallWithDuplicateResponsesResponses = {\n    /**\n     * Message for 200 response\n     */\n    200: ModelWithBoolean & ModelWithInteger;\n    /**\n     * Message for 201 response\n     */\n    201: ModelWithString;\n    /**\n     * Message for 202 response\n     */\n    202: ModelWithString;\n};\n\nexport type CallWithDuplicateResponsesResponse = CallWithDuplicateResponsesResponses[keyof CallWithDuplicateResponsesResponses];\n\nexport type CallWithResponsesData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/response';\n};\n\nexport type CallWithResponsesErrors = {\n    /**\n     * Message for 500 error\n     */\n    500: ModelWithStringError;\n    /**\n     * Message for 501 error\n     */\n    501: ModelWithStringError;\n    /**\n     * Message for 502 error\n     */\n    502: ModelWithStringError;\n    /**\n     * Message for default response\n     */\n    default: ModelWithStringError;\n};\n\nexport type CallWithResponsesError = CallWithResponsesErrors[keyof CallWithResponsesErrors];\n\nexport type CallWithResponsesResponses = {\n    /**\n     * Message for 200 response\n     */\n    200: {\n        readonly '@namespace.string'?: string;\n        readonly '@namespace.integer'?: number;\n        readonly value?: Array<ModelWithString>;\n    };\n    /**\n     * Message for 201 response\n     */\n    201: ModelThatExtends;\n    /**\n     * Message for 202 response\n     */\n    202: ModelThatExtendsExtends;\n};\n\nexport type CallWithResponsesResponse = CallWithResponsesResponses[keyof CallWithResponsesResponses];\n\nexport type CollectionFormatData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * This is an array parameter that is sent as csv format (comma-separated values)\n         */\n        parameterArrayCSV: Array<string> | null;\n        /**\n         * This is an array parameter that is sent as ssv format (space-separated values)\n         */\n        parameterArraySSV: Array<string> | null;\n        /**\n         * This is an array parameter that is sent as tsv format (tab-separated values)\n         */\n        parameterArrayTSV: Array<string> | null;\n        /**\n         * This is an array parameter that is sent as pipes format (pipe-separated values)\n         */\n        parameterArrayPipes: Array<string> | null;\n        /**\n         * This is an array parameter that is sent as multi format (multiple parameter instances)\n         */\n        parameterArrayMulti: Array<string> | null;\n    };\n    url: '/api/v{api-version}/collectionFormat';\n};\n\nexport type TypesData = {\n    body?: never;\n    path?: {\n        /**\n         * This is a number parameter\n         */\n        id?: number;\n    };\n    query: {\n        /**\n         * This is a number parameter\n         */\n        parameterNumber: number;\n        /**\n         * This is a string parameter\n         */\n        parameterString: string | null;\n        /**\n         * This is a boolean parameter\n         */\n        parameterBoolean: boolean | null;\n        /**\n         * This is an object parameter\n         */\n        parameterObject: {\n            [key: string]: unknown;\n        } | null;\n        /**\n         * This is an array parameter\n         */\n        parameterArray: Array<string> | null;\n        /**\n         * This is a dictionary parameter\n         */\n        parameterDictionary: {\n            [key: string]: unknown;\n        } | null;\n        /**\n         * This is an enum parameter\n         */\n        parameterEnum: 'Success' | 'Warning' | 'Error' | null;\n    };\n    url: '/api/v{api-version}/types';\n};\n\nexport type TypesResponses = {\n    /**\n     * Response is a simple number\n     */\n    200: number;\n    /**\n     * Response is a simple string\n     */\n    201: string;\n    /**\n     * Response is a simple boolean\n     */\n    202: boolean;\n    /**\n     * Response is a simple object\n     */\n    203: {\n        [key: string]: unknown;\n    };\n};\n\nexport type TypesResponse = TypesResponses[keyof TypesResponses];\n\nexport type UploadFileData = {\n    body: Blob | File;\n    path: {\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string | null;\n    };\n    query?: never;\n    url: '/api/v{api-version}/upload';\n};\n\nexport type UploadFileResponses = {\n    200: boolean;\n};\n\nexport type UploadFileResponse = UploadFileResponses[keyof UploadFileResponses];\n\nexport type FileResponseData = {\n    body?: never;\n    path: {\n        id: string;\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string;\n    };\n    query?: never;\n    url: '/api/v{api-version}/file/{id}';\n};\n\nexport type FileResponseResponses = {\n    /**\n     * Success\n     */\n    200: Blob | File;\n};\n\nexport type FileResponseResponse = FileResponseResponses[keyof FileResponseResponses];\n\nexport type ComplexTypesData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * Parameter containing object\n         */\n        parameterObject: {\n            first?: {\n                second?: {\n                    third?: string;\n                };\n            };\n        };\n        /**\n         * Parameter containing reference\n         */\n        parameterReference: ModelWithString;\n    };\n    url: '/api/v{api-version}/complex';\n};\n\nexport type ComplexTypesErrors = {\n    /**\n     * 400 `server` error\n     */\n    400: unknown;\n    /**\n     * 500 server error\n     */\n    500: unknown;\n};\n\nexport type ComplexTypesResponses = {\n    /**\n     * Successful response\n     */\n    200: Array<ModelWithString>;\n};\n\nexport type ComplexTypesResponse = ComplexTypesResponses[keyof ComplexTypesResponses];\n\nexport type MultipartResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multipart';\n};\n\nexport type MultipartResponseResponses = {\n    /**\n     * OK\n     */\n    200: {\n        file?: Blob | File;\n        metadata?: {\n            foo?: string;\n            bar?: string;\n        };\n    };\n};\n\nexport type MultipartResponseResponse = MultipartResponseResponses[keyof MultipartResponseResponses];\n\nexport type MultipartRequestData = {\n    body?: {\n        content?: Blob | File;\n        data?: ModelWithString | null;\n    };\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multipart';\n};\n\nexport type ComplexParamsData = {\n    body?: {\n        readonly key: string | null;\n        name: string | null;\n        enabled?: boolean;\n        type: 'Monkey' | 'Horse' | 'Bird';\n        listOfModels?: Array<ModelWithString> | null;\n        listOfStrings?: Array<string> | null;\n        parameters: ModelWithString | ModelWithEnum | ModelWithArray | ModelWithDictionary;\n        readonly user?: {\n            readonly id?: number;\n            readonly name?: string | null;\n        };\n    };\n    path: {\n        id: number;\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string;\n    };\n    query?: never;\n    url: '/api/v{api-version}/complex/{id}';\n};\n\nexport type ComplexParamsResponses = {\n    /**\n     * Success\n     */\n    200: ModelWithString;\n};\n\nexport type ComplexParamsResponse = ComplexParamsResponses[keyof ComplexParamsResponses];\n\nexport type CallWithResultFromHeaderData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/header';\n};\n\nexport type CallWithResultFromHeaderErrors = {\n    /**\n     * 400 server error\n     */\n    400: unknown;\n    /**\n     * 500 server error\n     */\n    500: unknown;\n};\n\nexport type CallWithResultFromHeaderResponses = {\n    /**\n     * Successful response\n     */\n    200: unknown;\n};\n\nexport type TestErrorCodeData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * Status code to return\n         */\n        status: number;\n    };\n    url: '/api/v{api-version}/error';\n};\n\nexport type TestErrorCodeErrors = {\n    /**\n     * Custom message: Internal Server Error\n     */\n    500: unknown;\n    /**\n     * Custom message: Not Implemented\n     */\n    501: unknown;\n    /**\n     * Custom message: Bad Gateway\n     */\n    502: unknown;\n    /**\n     * Custom message: Service Unavailable\n     */\n    503: unknown;\n};\n\nexport type TestErrorCodeResponses = {\n    /**\n     * Custom message: Successful response\n     */\n    200: unknown;\n};\n\nexport type NonAsciiæøåÆøÅöôêÊ字符串Data = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * Dummy input param\n         */\n        nonAsciiParamæøåÆØÅöôêÊ: number;\n    };\n    url: '/api/v{api-version}/non-ascii-æøåÆØÅöôêÊ字符串';\n};\n\nexport type NonAsciiæøåÆøÅöôêÊ字符串Responses = {\n    /**\n     * Successful response\n     */\n    200: Array<NonAsciiStringæøåÆøÅöôêÊ字符串>;\n};\n\nexport type NonAsciiæøåÆøÅöôêÊ字符串Response = NonAsciiæøåÆøÅöôêÊ字符串Responses[keyof NonAsciiæøåÆøÅöôêÊ字符串Responses];\n\nexport type PutWithFormUrlEncodedData = {\n    body: ArrayWithStrings;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/non-ascii-æøåÆØÅöôêÊ字符串';\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/client-custom/sdk-client-optional/custom-client.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport { type ClientOptions, type Config, createClient, createConfig } from '@hey-api/custom-client';\n\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: 'http://localhost:3000/base' }));\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/client-custom/sdk-client-optional/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport { apiVVersionODataControllerCount, callToTestOrderOfParams, callWithDefaultOptionalParameters, callWithDefaultParameters, callWithDescriptions, callWithDuplicateResponses, callWithNoContentResponse, callWithParameters, callWithResponse, callWithResponseAndNoContentResponse, callWithResponses, callWithResultFromHeader, callWithWeirdParameterNames, collectionFormat, complexParams, complexTypes, deleteCallWithoutParametersAndResponse, deleteFoo, deprecatedCall, dummyA, dummyB, duplicateName, duplicateName2, duplicateName3, duplicateName4, export_, fileResponse, fooWow, getApiVbyApiVersionSimpleOperation, getCallWithOptionalParam, getCallWithoutParametersAndResponse, headCallWithoutParametersAndResponse, import_, multipartRequest, multipartResponse, nonAsciiæøåÆøÅöôêÊ字符串, type Options, optionsCallWithoutParametersAndResponse, patchApiVbyApiVersionNoTag, patchCallWithoutParametersAndResponse, postApiVbyApiVersionFormData, postApiVbyApiVersionRequestBody, postCallWithOptionalParam, postCallWithoutParametersAndResponse, putCallWithoutParametersAndResponse, putWithFormUrlEncoded, testErrorCode, types, uploadFile } from './sdk.gen';\nexport type { _3eNum1Период, _400, AdditionalPropertiesIntegerIssue, AdditionalPropertiesUnknownIssue, AdditionalPropertiesUnknownIssue2, AdditionalPropertiesUnknownIssue3, AdditionalPropertiesUnknownIssueWritable, AnyOfAnyAndNull, AnyOfArrays, ApiVVersionODataControllerCountData, ApiVVersionODataControllerCountResponse, ApiVVersionODataControllerCountResponses, ArrayWithAnyOfProperties, ArrayWithArray, ArrayWithBooleans, ArrayWithNumbers, ArrayWithProperties, ArrayWithReferences, ArrayWithStrings, CallToTestOrderOfParamsData, CallWithDefaultOptionalParametersData, CallWithDefaultParametersData, CallWithDescriptionsData, CallWithDuplicateResponsesData, CallWithDuplicateResponsesError, CallWithDuplicateResponsesErrors, CallWithDuplicateResponsesResponse, CallWithDuplicateResponsesResponses, CallWithNoContentResponseData, CallWithNoContentResponseResponse, CallWithNoContentResponseResponses, CallWithParametersData, CallWithResponseAndNoContentResponseData, CallWithResponseAndNoContentResponseResponse, CallWithResponseAndNoContentResponseResponses, CallWithResponseData, CallWithResponseResponse, CallWithResponseResponses, CallWithResponsesData, CallWithResponsesError, CallWithResponsesErrors, CallWithResponsesResponse, CallWithResponsesResponses, CallWithResultFromHeaderData, CallWithResultFromHeaderErrors, CallWithResultFromHeaderResponses, CallWithWeirdParameterNamesData, CamelCaseCommentWithBreaks, CharactersInDescription, ClientOptions, CollectionFormatData, CommentWithBackticks, CommentWithBackticksAndQuotes, CommentWithBreaks, CommentWithExpressionPlaceholders, CommentWithQuotes, CommentWithReservedCharacters, CommentWithSlashes, ComplexParamsData, ComplexParamsResponse, ComplexParamsResponses, ComplexTypesData, ComplexTypesErrors, ComplexTypesResponse, ComplexTypesResponses, CompositionBaseModel, CompositionExtendedModel, CompositionWithAllOfAndNullable, CompositionWithAnyOf, CompositionWithAnyOfAndNullable, CompositionWithAnyOfAnonymous, CompositionWithNestedAnyAndTypeNull, CompositionWithNestedAnyOfAndNull, CompositionWithOneOf, CompositionWithOneOfAndComplexArrayDictionary, CompositionWithOneOfAndNullable, CompositionWithOneOfAndProperties, CompositionWithOneOfAndSimpleArrayDictionary, CompositionWithOneOfAndSimpleDictionary, CompositionWithOneOfAnonymous, CompositionWithOneOfDiscriminator, ConstValue, Default, DeleteCallWithoutParametersAndResponseData, DeleteFooData, DeleteFooData2, DeleteFooData3, DeprecatedCallData, DeprecatedModel, DictionaryWithArray, DictionaryWithDictionary, DictionaryWithProperties, DictionaryWithPropertiesAndAdditionalProperties, DictionaryWithReference, DictionaryWithString, DummyAData, DummyAResponse, DummyAResponses, DummyBData, DummyBResponse, DummyBResponses, DuplicateName2Data, DuplicateName3Data, DuplicateName4Data, DuplicateNameData, EnumFromDescription, EnumWithExtensions, EnumWithNumbers, EnumWithReplacedCharacters, EnumWithStrings, EnumWithXEnumNames, ExportData, ExternalRefA, ExternalRefB, ExternalSharedModel, File, FileResponseData, FileResponseResponse, FileResponseResponses, FileWritable, FooWowData, FooWowResponses, FreeFormObjectWithAdditionalPropertiesEqEmptyObject, FreeFormObjectWithAdditionalPropertiesEqTrue, FreeFormObjectWithoutAdditionalProperties, GenericSchemaDuplicateIssue1SystemBoolean, GenericSchemaDuplicateIssue1SystemBooleanWritable, GenericSchemaDuplicateIssue1SystemString, GenericSchemaDuplicateIssue1SystemStringWritable, GetApiVbyApiVersionSimpleOperationData, GetApiVbyApiVersionSimpleOperationError, GetApiVbyApiVersionSimpleOperationErrors, GetApiVbyApiVersionSimpleOperationResponse, GetApiVbyApiVersionSimpleOperationResponses, GetCallWithOptionalParamData, GetCallWithoutParametersAndResponseData, HeadCallWithoutParametersAndResponseData, Import, ImportData, ImportResponse, ImportResponses, IoK8sApimachineryPkgApisMetaV1DeleteOptions, IoK8sApimachineryPkgApisMetaV1Preconditions, ModelCircle, ModelFromZendesk, ModelSquare, ModelThatExtends, ModelThatExtendsExtends, ModelWithAdditionalPropertiesEqTrue, ModelWithAdditionalPropertiesRef, ModelWithAnyOfConstantSizeArray, ModelWithAnyOfConstantSizeArrayAndIntersect, ModelWithAnyOfConstantSizeArrayNullable, ModelWithAnyOfConstantSizeArrayWithNSizeAndOptions, ModelWithAnyOfConstantSizeArrayWithNSizeAndOptionsWritable, ModelWithArray, ModelWithArrayReadOnlyAndWriteOnly, ModelWithArrayReadOnlyAndWriteOnlyWritable, ModelWithBackticksInDescription, ModelWithBoolean, ModelWithCircularReference, ModelWithConst, ModelWithConstantSizeArray, ModelWithDictionary, ModelWithDuplicateImports, ModelWithDuplicateProperties, ModelWithEnum, ModelWithEnumFromDescription, ModelWithEnumWithHyphen, ModelWithInteger, ModelWithNestedArrayEnums, ModelWithNestedArrayEnumsData, ModelWithNestedArrayEnumsDataBar, ModelWithNestedArrayEnumsDataFoo, ModelWithNestedCompositionEnums, ModelWithNestedEnums, ModelWithNestedProperties, ModelWithNullableObject, ModelWithNullableString, ModelWithNumericEnumUnion, ModelWithOneOfAndProperties, ModelWithOneOfEnum, ModelWithOrderedProperties, ModelWithPattern, ModelWithPatternWritable, ModelWithPrefixItemsConstantSizeArray, ModelWithProperties, ModelWithPropertiesWritable, ModelWithReadOnlyAndWriteOnly, ModelWithReadOnlyAndWriteOnlyWritable, ModelWithReference, ModelWithReferenceWritable, ModelWithString, ModelWithStringError, MultipartRequestData, MultipartResponseData, MultipartResponseResponse, MultipartResponseResponses, NestedAnyOfArraysNullable, NonAsciiæøåÆøÅöôêÊ字符串Data, NonAsciiæøåÆøÅöôêÊ字符串Response, NonAsciiæøåÆøÅöôêÊ字符串Responses, NonAsciiStringæøåÆøÅöôêÊ字符串, NullableObject, OneOfAllOfIssue, OneOfAllOfIssueWritable, OptionsCallWithoutParametersAndResponseData, Pageable, ParameterSimpleParameterUnused, PatchApiVbyApiVersionNoTagData, PatchApiVbyApiVersionNoTagResponses, PatchCallWithoutParametersAndResponseData, PostApiVbyApiVersionFormDataData, PostApiVbyApiVersionRequestBodyData, PostCallWithOptionalParamData, PostCallWithOptionalParamResponse, PostCallWithOptionalParamResponses, PostCallWithoutParametersAndResponseData, PostServiceWithEmptyTagResponse, PostServiceWithEmptyTagResponse2, PutCallWithoutParametersAndResponseData, PutWithFormUrlEncodedData, SchemaWithFormRestrictedKeys, SimpleBoolean, SimpleFile, SimpleFormData, SimpleInteger, SimpleParameter, SimpleReference, SimpleRequestBody, SimpleString, SimpleStringWithPattern, TestErrorCodeData, TestErrorCodeErrors, TestErrorCodeResponses, TypesData, TypesResponse, TypesResponses, UploadFileData, UploadFileResponse, UploadFileResponses, XFooBar } from './types.gen';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/client-custom/sdk-client-optional/sdk.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport { type Client, formDataBodySerializer, type Options as Options2, type TDataShape, urlSearchParamsBodySerializer } from '@hey-api/custom-client';\n\nimport { client } from './custom-client.gen';\nimport type { ApiVVersionODataControllerCountData, ApiVVersionODataControllerCountResponses, CallToTestOrderOfParamsData, CallWithDefaultOptionalParametersData, CallWithDefaultParametersData, CallWithDescriptionsData, CallWithDuplicateResponsesData, CallWithDuplicateResponsesErrors, CallWithDuplicateResponsesResponses, CallWithNoContentResponseData, CallWithNoContentResponseResponses, CallWithParametersData, CallWithResponseAndNoContentResponseData, CallWithResponseAndNoContentResponseResponses, CallWithResponseData, CallWithResponseResponses, CallWithResponsesData, CallWithResponsesErrors, CallWithResponsesResponses, CallWithResultFromHeaderData, CallWithResultFromHeaderErrors, CallWithResultFromHeaderResponses, CallWithWeirdParameterNamesData, CollectionFormatData, ComplexParamsData, ComplexParamsResponses, ComplexTypesData, ComplexTypesErrors, ComplexTypesResponses, DeleteCallWithoutParametersAndResponseData, DeleteFooData3, DeprecatedCallData, DummyAData, DummyAResponses, DummyBData, DummyBResponses, DuplicateName2Data, DuplicateName3Data, DuplicateName4Data, DuplicateNameData, ExportData, FileResponseData, FileResponseResponses, FooWowData, FooWowResponses, GetApiVbyApiVersionSimpleOperationData, GetApiVbyApiVersionSimpleOperationErrors, GetApiVbyApiVersionSimpleOperationResponses, GetCallWithOptionalParamData, GetCallWithoutParametersAndResponseData, HeadCallWithoutParametersAndResponseData, ImportData, ImportResponses, MultipartRequestData, MultipartResponseData, MultipartResponseResponses, NonAsciiæøåÆøÅöôêÊ字符串Data, NonAsciiæøåÆøÅöôêÊ字符串Responses, OptionsCallWithoutParametersAndResponseData, PatchApiVbyApiVersionNoTagData, PatchApiVbyApiVersionNoTagResponses, PatchCallWithoutParametersAndResponseData, PostApiVbyApiVersionFormDataData, PostApiVbyApiVersionRequestBodyData, PostCallWithOptionalParamData, PostCallWithOptionalParamResponses, PostCallWithoutParametersAndResponseData, PutCallWithoutParametersAndResponseData, PutWithFormUrlEncodedData, TestErrorCodeData, TestErrorCodeErrors, TestErrorCodeResponses, TypesData, TypesResponses, UploadFileData, UploadFileResponses } from './types.gen';\n\nexport type Options<TData extends TDataShape = TDataShape, ThrowOnError extends boolean = boolean> = Options2<TData, ThrowOnError> & {\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\nexport const export_ = <ThrowOnError extends boolean = false>(options?: Options<ExportData, ThrowOnError>) => (options?.client ?? client).get<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/no+tag', ...options });\n\nexport const patchApiVbyApiVersionNoTag = <ThrowOnError extends boolean = false>(options?: Options<PatchApiVbyApiVersionNoTagData, ThrowOnError>) => (options?.client ?? client).patch<PatchApiVbyApiVersionNoTagResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/no+tag', ...options });\n\nexport const import_ = <ThrowOnError extends boolean = false>(options: Options<ImportData, ThrowOnError>) => (options.client ?? client).post<ImportResponses, unknown, ThrowOnError>({\n    url: '/api/v{api-version}/no+tag',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options.headers\n    }\n});\n\nexport const fooWow = <ThrowOnError extends boolean = false>(options?: Options<FooWowData, ThrowOnError>) => (options?.client ?? client).put<FooWowResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/no+tag', ...options });\n\nexport const apiVVersionODataControllerCount = <ThrowOnError extends boolean = false>(options?: Options<ApiVVersionODataControllerCountData, ThrowOnError>) => (options?.client ?? client).get<ApiVVersionODataControllerCountResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple/$count', ...options });\n\nexport const getApiVbyApiVersionSimpleOperation = <ThrowOnError extends boolean = false>(options: Options<GetApiVbyApiVersionSimpleOperationData, ThrowOnError>) => (options.client ?? client).get<GetApiVbyApiVersionSimpleOperationResponses, GetApiVbyApiVersionSimpleOperationErrors, ThrowOnError>({ url: '/api/v{api-version}/simple:operation', ...options });\n\nexport const deleteCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<DeleteCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).delete<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const getCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<GetCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).get<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const headCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<HeadCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).head<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const optionsCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<OptionsCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).options<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const patchCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<PatchCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).patch<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const postCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<PostCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).post<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const putCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<PutCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).put<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const deleteFoo = <ThrowOnError extends boolean = false>(options: Options<DeleteFooData3, ThrowOnError>) => (options.client ?? client).delete<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/foo/{foo_param}/bar/{BarParam}', ...options });\n\nexport const callWithDescriptions = <ThrowOnError extends boolean = false>(options?: Options<CallWithDescriptionsData, ThrowOnError>) => (options?.client ?? client).post<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/descriptions', ...options });\n\n/**\n * @deprecated\n */\nexport const deprecatedCall = <ThrowOnError extends boolean = false>(options: Options<DeprecatedCallData, ThrowOnError>) => (options.client ?? client).post<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/parameters/deprecated', ...options });\n\nexport const callWithParameters = <ThrowOnError extends boolean = false>(options: Options<CallWithParametersData, ThrowOnError>) => (options.client ?? client).post<unknown, unknown, ThrowOnError>({\n    url: '/api/v{api-version}/parameters/{parameterPath}',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options.headers\n    }\n});\n\nexport const callWithWeirdParameterNames = <ThrowOnError extends boolean = false>(options: Options<CallWithWeirdParameterNamesData, ThrowOnError>) => (options.client ?? client).post<unknown, unknown, ThrowOnError>({\n    url: '/api/v{api-version}/parameters/{parameter.path.1}/{parameter-path-2}/{PARAMETER-PATH-3}',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options.headers\n    }\n});\n\nexport const getCallWithOptionalParam = <ThrowOnError extends boolean = false>(options: Options<GetCallWithOptionalParamData, ThrowOnError>) => (options.client ?? client).get<unknown, unknown, ThrowOnError>({\n    url: '/api/v{api-version}/parameters',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options.headers\n    }\n});\n\nexport const postCallWithOptionalParam = <ThrowOnError extends boolean = false>(options: Options<PostCallWithOptionalParamData, ThrowOnError>) => (options.client ?? client).post<PostCallWithOptionalParamResponses, unknown, ThrowOnError>({\n    url: '/api/v{api-version}/parameters',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options.headers\n    }\n});\n\nexport const postApiVbyApiVersionRequestBody = <ThrowOnError extends boolean = false>(options?: Options<PostApiVbyApiVersionRequestBodyData, ThrowOnError>) => (options?.client ?? client).post<unknown, unknown, ThrowOnError>({\n    url: '/api/v{api-version}/requestBody',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options?.headers\n    }\n});\n\nexport const postApiVbyApiVersionFormData = <ThrowOnError extends boolean = false>(options?: Options<PostApiVbyApiVersionFormDataData, ThrowOnError>) => (options?.client ?? client).post<unknown, unknown, ThrowOnError>({\n    ...formDataBodySerializer,\n    url: '/api/v{api-version}/formData',\n    ...options,\n    headers: {\n        'Content-Type': null,\n        ...options?.headers\n    }\n});\n\nexport const callWithDefaultParameters = <ThrowOnError extends boolean = false>(options?: Options<CallWithDefaultParametersData, ThrowOnError>) => (options?.client ?? client).get<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/defaults', ...options });\n\nexport const callWithDefaultOptionalParameters = <ThrowOnError extends boolean = false>(options?: Options<CallWithDefaultOptionalParametersData, ThrowOnError>) => (options?.client ?? client).post<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/defaults', ...options });\n\nexport const callToTestOrderOfParams = <ThrowOnError extends boolean = false>(options: Options<CallToTestOrderOfParamsData, ThrowOnError>) => (options.client ?? client).put<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/defaults', ...options });\n\nexport const duplicateName = <ThrowOnError extends boolean = false>(options?: Options<DuplicateNameData, ThrowOnError>) => (options?.client ?? client).delete<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/duplicate', ...options });\n\nexport const duplicateName2 = <ThrowOnError extends boolean = false>(options?: Options<DuplicateName2Data, ThrowOnError>) => (options?.client ?? client).get<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/duplicate', ...options });\n\nexport const duplicateName3 = <ThrowOnError extends boolean = false>(options?: Options<DuplicateName3Data, ThrowOnError>) => (options?.client ?? client).post<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/duplicate', ...options });\n\nexport const duplicateName4 = <ThrowOnError extends boolean = false>(options?: Options<DuplicateName4Data, ThrowOnError>) => (options?.client ?? client).put<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/duplicate', ...options });\n\nexport const callWithNoContentResponse = <ThrowOnError extends boolean = false>(options?: Options<CallWithNoContentResponseData, ThrowOnError>) => (options?.client ?? client).get<CallWithNoContentResponseResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/no-content', ...options });\n\nexport const callWithResponseAndNoContentResponse = <ThrowOnError extends boolean = false>(options?: Options<CallWithResponseAndNoContentResponseData, ThrowOnError>) => (options?.client ?? client).get<CallWithResponseAndNoContentResponseResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/multiple-tags/response-and-no-content', ...options });\n\nexport const dummyA = <ThrowOnError extends boolean = false>(options?: Options<DummyAData, ThrowOnError>) => (options?.client ?? client).get<DummyAResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/multiple-tags/a', ...options });\n\nexport const dummyB = <ThrowOnError extends boolean = false>(options?: Options<DummyBData, ThrowOnError>) => (options?.client ?? client).get<DummyBResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/multiple-tags/b', ...options });\n\nexport const callWithResponse = <ThrowOnError extends boolean = false>(options?: Options<CallWithResponseData, ThrowOnError>) => (options?.client ?? client).get<CallWithResponseResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/response', ...options });\n\nexport const callWithDuplicateResponses = <ThrowOnError extends boolean = false>(options?: Options<CallWithDuplicateResponsesData, ThrowOnError>) => (options?.client ?? client).post<CallWithDuplicateResponsesResponses, CallWithDuplicateResponsesErrors, ThrowOnError>({ url: '/api/v{api-version}/response', ...options });\n\nexport const callWithResponses = <ThrowOnError extends boolean = false>(options?: Options<CallWithResponsesData, ThrowOnError>) => (options?.client ?? client).put<CallWithResponsesResponses, CallWithResponsesErrors, ThrowOnError>({ url: '/api/v{api-version}/response', ...options });\n\nexport const collectionFormat = <ThrowOnError extends boolean = false>(options: Options<CollectionFormatData, ThrowOnError>) => (options.client ?? client).get<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/collectionFormat', ...options });\n\nexport const types = <ThrowOnError extends boolean = false>(options: Options<TypesData, ThrowOnError>) => (options.client ?? client).get<TypesResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/types', ...options });\n\nexport const uploadFile = <ThrowOnError extends boolean = false>(options: Options<UploadFileData, ThrowOnError>) => (options.client ?? client).post<UploadFileResponses, unknown, ThrowOnError>({\n    ...urlSearchParamsBodySerializer,\n    url: '/api/v{api-version}/upload',\n    ...options,\n    headers: {\n        'Content-Type': 'application/x-www-form-urlencoded',\n        ...options.headers\n    }\n});\n\nexport const fileResponse = <ThrowOnError extends boolean = false>(options: Options<FileResponseData, ThrowOnError>) => (options.client ?? client).get<FileResponseResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/file/{id}', ...options });\n\nexport const complexTypes = <ThrowOnError extends boolean = false>(options: Options<ComplexTypesData, ThrowOnError>) => (options.client ?? client).get<ComplexTypesResponses, ComplexTypesErrors, ThrowOnError>({\n    querySerializer: { parameters: { parameterObject: { object: { style: 'form' } } } },\n    url: '/api/v{api-version}/complex',\n    ...options\n});\n\nexport const multipartResponse = <ThrowOnError extends boolean = false>(options?: Options<MultipartResponseData, ThrowOnError>) => (options?.client ?? client).get<MultipartResponseResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/multipart', ...options });\n\nexport const multipartRequest = <ThrowOnError extends boolean = false>(options?: Options<MultipartRequestData, ThrowOnError>) => (options?.client ?? client).post<unknown, unknown, ThrowOnError>({\n    ...formDataBodySerializer,\n    url: '/api/v{api-version}/multipart',\n    ...options,\n    headers: {\n        'Content-Type': null,\n        ...options?.headers\n    }\n});\n\nexport const complexParams = <ThrowOnError extends boolean = false>(options: Options<ComplexParamsData, ThrowOnError>) => (options.client ?? client).put<ComplexParamsResponses, unknown, ThrowOnError>({\n    url: '/api/v{api-version}/complex/{id}',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json-patch+json',\n        ...options.headers\n    }\n});\n\nexport const callWithResultFromHeader = <ThrowOnError extends boolean = false>(options?: Options<CallWithResultFromHeaderData, ThrowOnError>) => (options?.client ?? client).post<CallWithResultFromHeaderResponses, CallWithResultFromHeaderErrors, ThrowOnError>({ url: '/api/v{api-version}/header', ...options });\n\nexport const testErrorCode = <ThrowOnError extends boolean = false>(options: Options<TestErrorCodeData, ThrowOnError>) => (options.client ?? client).post<TestErrorCodeResponses, TestErrorCodeErrors, ThrowOnError>({ url: '/api/v{api-version}/error', ...options });\n\nexport const nonAsciiæøåÆøÅöôêÊ字符串 = <ThrowOnError extends boolean = false>(options: Options<NonAsciiæøåÆøÅöôêÊ字符串Data, ThrowOnError>) => (options.client ?? client).post<NonAsciiæøåÆøÅöôêÊ字符串Responses, unknown, ThrowOnError>({ url: '/api/v{api-version}/non-ascii-æøåÆØÅöôêÊ字符串', ...options });\n\n/**\n * Login User\n */\nexport const putWithFormUrlEncoded = <ThrowOnError extends boolean = false>(options: Options<PutWithFormUrlEncodedData, ThrowOnError>) => (options.client ?? client).put<unknown, unknown, ThrowOnError>({\n    ...urlSearchParamsBodySerializer,\n    url: '/api/v{api-version}/non-ascii-æøåÆØÅöôêÊ字符串',\n    ...options,\n    headers: {\n        'Content-Type': 'application/x-www-form-urlencoded',\n        ...options.headers\n    }\n});\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/client-custom/sdk-client-optional/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type ClientOptions = {\n    baseUrl: 'http://localhost:3000/base' | (string & {});\n};\n\n/**\n * Model with number-only name\n */\nexport type _400 = string;\n\n/**\n * External ref to shared model (A)\n */\nexport type ExternalRefA = ExternalSharedModel;\n\n/**\n * External ref to shared model (B)\n */\nexport type ExternalRefB = ExternalSharedModel;\n\n/**\n * Testing multiline comments in string: First line\n * Second line\n *\n * Fourth line\n */\nexport type CamelCaseCommentWithBreaks = number;\n\n/**\n * Testing multiline comments in string: First line\n * Second line\n *\n * Fourth line\n */\nexport type CommentWithBreaks = number;\n\n/**\n * Testing backticks in string: `backticks` and ```multiple backticks``` should work\n */\nexport type CommentWithBackticks = number;\n\n/**\n * Testing backticks and quotes in string: `backticks`, 'quotes', \"double quotes\" and ```multiple backticks``` should work\n */\nexport type CommentWithBackticksAndQuotes = number;\n\n/**\n * Testing slashes in string: \\backwards\\\\\\ and /forwards/// should work\n */\nexport type CommentWithSlashes = number;\n\n/**\n * Testing expression placeholders in string: ${expression} should work\n */\nexport type CommentWithExpressionPlaceholders = number;\n\n/**\n * Testing quotes in string: 'single quote''' and \"double quotes\"\"\" should work\n */\nexport type CommentWithQuotes = number;\n\n/**\n * Testing reserved characters in string: * inline * and ** inline ** should work\n */\nexport type CommentWithReservedCharacters = number;\n\n/**\n * This is a simple number\n */\nexport type SimpleInteger = number;\n\n/**\n * This is a simple boolean\n */\nexport type SimpleBoolean = boolean;\n\n/**\n * This is a simple string\n */\nexport type SimpleString = string;\n\n/**\n * A string with non-ascii (unicode) characters valid in typescript identifiers (æøåÆØÅöÔèÈ字符串)\n */\nexport type NonAsciiStringæøåÆøÅöôêÊ字符串 = string;\n\n/**\n * This is a simple file\n */\nexport type SimpleFile = Blob | File;\n\n/**\n * This is a simple reference\n */\nexport type SimpleReference = ModelWithString;\n\n/**\n * This is a simple string\n */\nexport type SimpleStringWithPattern = string | null;\n\n/**\n * This is a simple enum with strings\n */\nexport type EnumWithStrings = 'Success' | 'Warning' | 'Error' | '\\'Single Quote\\'' | '\"Double Quotes\"' | 'Non-ascii: øæåôöØÆÅÔÖ字符串';\n\nexport type EnumWithReplacedCharacters = '\\'Single Quote\\'' | '\"Double Quotes\"' | 'øæåôöØÆÅÔÖ字符串' | 3.1 | '';\n\n/**\n * This is a simple enum with numbers\n */\nexport type EnumWithNumbers = 1 | 2 | 3 | 1.1 | 1.2 | 1.3 | 100 | 200 | 300 | -100 | -200 | -300 | -1.1 | -1.2 | -1.3;\n\n/**\n * Success=1,Warning=2,Error=3\n */\nexport type EnumFromDescription = number;\n\n/**\n * This is a simple enum with numbers\n */\nexport type EnumWithExtensions = 200 | 400 | 500;\n\nexport type EnumWithXEnumNames = 0 | 1 | 2;\n\n/**\n * This is a simple array with numbers\n */\nexport type ArrayWithNumbers = Array<number>;\n\n/**\n * This is a simple array with booleans\n */\nexport type ArrayWithBooleans = Array<boolean>;\n\n/**\n * This is a simple array with strings\n */\nexport type ArrayWithStrings = Array<string>;\n\n/**\n * This is a simple array with references\n */\nexport type ArrayWithReferences = Array<ModelWithString>;\n\n/**\n * This is a simple array containing an array\n */\nexport type ArrayWithArray = Array<Array<ModelWithString>>;\n\n/**\n * This is a simple array with properties\n */\nexport type ArrayWithProperties = Array<{\n    '16x16'?: CamelCaseCommentWithBreaks;\n    bar?: string;\n}>;\n\n/**\n * This is a simple array with any of properties\n */\nexport type ArrayWithAnyOfProperties = Array<{\n    foo?: string;\n} | {\n    bar?: string;\n}>;\n\nexport type AnyOfAnyAndNull = {\n    data?: unknown | null;\n};\n\n/**\n * This is a simple array with any of properties\n */\nexport type AnyOfArrays = {\n    results?: Array<{\n        foo?: string;\n    } | {\n        bar?: string;\n    }>;\n};\n\n/**\n * This is a string dictionary\n */\nexport type DictionaryWithString = {\n    [key: string]: string;\n};\n\nexport type DictionaryWithPropertiesAndAdditionalProperties = {\n    foo?: number;\n    bar?: boolean;\n    [key: string]: string | number | boolean | undefined;\n};\n\n/**\n * This is a string reference\n */\nexport type DictionaryWithReference = {\n    [key: string]: ModelWithString;\n};\n\n/**\n * This is a complex dictionary\n */\nexport type DictionaryWithArray = {\n    [key: string]: Array<ModelWithString>;\n};\n\n/**\n * This is a string dictionary\n */\nexport type DictionaryWithDictionary = {\n    [key: string]: {\n        [key: string]: string;\n    };\n};\n\n/**\n * This is a complex dictionary\n */\nexport type DictionaryWithProperties = {\n    [key: string]: {\n        foo?: string;\n        bar?: string;\n    };\n};\n\n/**\n * This is a model with one number property\n */\nexport type ModelWithInteger = {\n    /**\n     * This is a simple number property\n     */\n    prop?: number;\n};\n\n/**\n * This is a model with one boolean property\n */\nexport type ModelWithBoolean = {\n    /**\n     * This is a simple boolean property\n     */\n    prop?: boolean;\n};\n\n/**\n * This is a model with one string property\n */\nexport type ModelWithString = {\n    /**\n     * This is a simple string property\n     */\n    prop?: string;\n};\n\n/**\n * This is a model with one string property\n */\nexport type ModelWithStringError = {\n    /**\n     * This is a simple string property\n     */\n    prop?: string;\n};\n\n/**\n * `Comment` or `VoiceComment`. The JSON object for adding voice comments to tickets is different. See [Adding voice comments to tickets](/documentation/ticketing/managing-tickets/adding-voice-comments-to-tickets)\n */\nexport type ModelFromZendesk = string;\n\n/**\n * This is a model with one string property\n */\nexport type ModelWithNullableString = {\n    /**\n     * This is a simple string property\n     */\n    nullableProp1?: string | null;\n    /**\n     * This is a simple string property\n     */\n    nullableRequiredProp1: string | null;\n    /**\n     * This is a simple string property\n     */\n    nullableProp2?: string | null;\n    /**\n     * This is a simple string property\n     */\n    nullableRequiredProp2: string | null;\n    /**\n     * This is a simple enum with strings\n     */\n    'foo_bar-enum'?: 'Success' | 'Warning' | 'Error' | 'ØÆÅ字符串';\n};\n\n/**\n * This is a model with one enum\n */\nexport type ModelWithEnum = {\n    /**\n     * This is a simple enum with strings\n     */\n    'foo_bar-enum'?: 'Success' | 'Warning' | 'Error' | 'ØÆÅ字符串';\n    /**\n     * These are the HTTP error code enums\n     */\n    statusCode?: '100' | '200 FOO' | '300 FOO_BAR' | '400 foo-bar' | '500 foo.bar' | '600 foo&bar';\n    /**\n     * Simple boolean enum\n     */\n    bool?: true;\n};\n\n/**\n * This is a model with one enum with escaped name\n */\nexport type ModelWithEnumWithHyphen = {\n    /**\n     * Foo-Bar-Baz-Qux\n     */\n    'foo-bar-baz-qux'?: '3.0';\n};\n\n/**\n * This is a model with one enum\n */\nexport type ModelWithEnumFromDescription = {\n    /**\n     * Success=1,Warning=2,Error=3\n     */\n    test?: number;\n};\n\n/**\n * This is a model with nested enums\n */\nexport type ModelWithNestedEnums = {\n    dictionaryWithEnum?: {\n        [key: string]: 'Success' | 'Warning' | 'Error';\n    };\n    dictionaryWithEnumFromDescription?: {\n        [key: string]: number;\n    };\n    arrayWithEnum?: Array<'Success' | 'Warning' | 'Error'>;\n    arrayWithDescription?: Array<number>;\n    /**\n     * This is a simple enum with strings\n     */\n    'foo_bar-enum'?: 'Success' | 'Warning' | 'Error' | 'ØÆÅ字符串';\n};\n\n/**\n * This is a model with one property containing a reference\n */\nexport type ModelWithReference = {\n    prop?: ModelWithProperties;\n};\n\n/**\n * This is a model with one property containing an array\n */\nexport type ModelWithArrayReadOnlyAndWriteOnly = {\n    prop?: Array<ModelWithReadOnlyAndWriteOnly>;\n    propWithFile?: Array<Blob | File>;\n    propWithNumber?: Array<number>;\n};\n\n/**\n * This is a model with one property containing an array\n */\nexport type ModelWithArray = {\n    prop?: Array<ModelWithString>;\n    propWithFile?: Array<Blob | File>;\n    propWithNumber?: Array<number>;\n};\n\n/**\n * This is a model with one property containing a dictionary\n */\nexport type ModelWithDictionary = {\n    prop?: {\n        [key: string]: string;\n    };\n};\n\n/**\n * This is a deprecated model with a deprecated property\n *\n * @deprecated\n */\nexport type DeprecatedModel = {\n    /**\n     * This is a deprecated property\n     *\n     * @deprecated\n     */\n    prop?: string;\n};\n\n/**\n * This is a model with one property containing a circular reference\n */\nexport type ModelWithCircularReference = {\n    prop?: ModelWithCircularReference;\n};\n\n/**\n * This is a model with one property with a 'one of' relationship\n */\nexport type CompositionWithOneOf = {\n    propA?: ModelWithString | ModelWithEnum | ModelWithArray | ModelWithDictionary;\n};\n\n/**\n * This is a model with one property with a 'one of' relationship where the options are not $ref\n */\nexport type CompositionWithOneOfAnonymous = {\n    propA?: {\n        propA?: string;\n    } | string | number;\n};\n\n/**\n * Circle\n */\nexport type ModelCircle = {\n    kind: string;\n    radius?: number;\n};\n\n/**\n * Square\n */\nexport type ModelSquare = {\n    kind: string;\n    sideLength?: number;\n};\n\n/**\n * This is a model with one property with a 'one of' relationship where the options are not $ref\n */\nexport type CompositionWithOneOfDiscriminator = ({\n    kind: 'circle';\n} & ModelCircle) | ({\n    kind: 'square';\n} & ModelSquare);\n\n/**\n * This is a model with one property with a 'any of' relationship\n */\nexport type CompositionWithAnyOf = {\n    propA?: ModelWithString | ModelWithEnum | ModelWithArray | ModelWithDictionary;\n};\n\n/**\n * This is a model with one property with a 'any of' relationship where the options are not $ref\n */\nexport type CompositionWithAnyOfAnonymous = {\n    propA?: {\n        propA?: string;\n    } | string | number;\n};\n\n/**\n * This is a model with nested 'any of' property with a type null\n */\nexport type CompositionWithNestedAnyAndTypeNull = {\n    propA?: Array<ModelWithDictionary | null> | Array<ModelWithArray | null>;\n};\n\nexport type _3eNum1Период = 'Bird' | 'Dog';\n\nexport type ConstValue = 'ConstValue';\n\n/**\n * This is a model with one property with a 'any of' relationship where the options are not $ref\n */\nexport type CompositionWithNestedAnyOfAndNull = {\n    /**\n     * Scopes\n     */\n    propA?: Array<_3eNum1Период | ConstValue> | null;\n};\n\n/**\n * This is a model with one property with a 'one of' relationship\n */\nexport type CompositionWithOneOfAndNullable = {\n    propA?: {\n        boolean?: boolean;\n    } | ModelWithEnum | ModelWithArray | ModelWithDictionary | null;\n};\n\n/**\n * This is a model that contains a simple dictionary within composition\n */\nexport type CompositionWithOneOfAndSimpleDictionary = {\n    propA?: boolean | {\n        [key: string]: number;\n    };\n};\n\n/**\n * This is a model that contains a dictionary of simple arrays within composition\n */\nexport type CompositionWithOneOfAndSimpleArrayDictionary = {\n    propA?: boolean | {\n        [key: string]: Array<boolean>;\n    };\n};\n\n/**\n * This is a model that contains a dictionary of complex arrays (composited) within composition\n */\nexport type CompositionWithOneOfAndComplexArrayDictionary = {\n    propA?: boolean | {\n        [key: string]: Array<number | string>;\n    };\n};\n\n/**\n * This is a model with one property with a 'all of' relationship\n */\nexport type CompositionWithAllOfAndNullable = {\n    propA?: ({\n        boolean?: boolean;\n    } & ModelWithEnum & ModelWithArray & ModelWithDictionary) | null;\n};\n\n/**\n * This is a model with one property with a 'any of' relationship\n */\nexport type CompositionWithAnyOfAndNullable = {\n    propA?: {\n        boolean?: boolean;\n    } | ModelWithEnum | ModelWithArray | ModelWithDictionary | null;\n};\n\n/**\n * This is a base model with two simple optional properties\n */\nexport type CompositionBaseModel = {\n    firstName?: string;\n    lastname?: string;\n};\n\n/**\n * This is a model that extends the base model\n */\nexport type CompositionExtendedModel = CompositionBaseModel & {\n    age: number;\n    firstName: string;\n    lastname: string;\n};\n\n/**\n * This is a model with one nested property\n */\nexport type ModelWithProperties = {\n    required: string;\n    readonly requiredAndReadOnly: string;\n    requiredAndNullable: string | null;\n    string?: string;\n    number?: number;\n    boolean?: boolean;\n    reference?: ModelWithString;\n    'property with space'?: string;\n    default?: string;\n    try?: string;\n    readonly '@namespace.string'?: string;\n    readonly '@namespace.integer'?: number;\n};\n\n/**\n * This is a model with one nested property\n */\nexport type ModelWithNestedProperties = {\n    readonly first: {\n        readonly second: {\n            readonly third: string | null;\n        } | null;\n    } | null;\n};\n\n/**\n * This is a model with duplicated properties\n */\nexport type ModelWithDuplicateProperties = {\n    prop?: ModelWithString;\n};\n\n/**\n * This is a model with ordered properties\n */\nexport type ModelWithOrderedProperties = {\n    zebra?: string;\n    apple?: string;\n    hawaii?: string;\n};\n\n/**\n * This is a model with duplicated imports\n */\nexport type ModelWithDuplicateImports = {\n    propA?: ModelWithString;\n    propB?: ModelWithString;\n    propC?: ModelWithString;\n};\n\n/**\n * This is a model that extends another model\n */\nexport type ModelThatExtends = ModelWithString & {\n    propExtendsA?: string;\n    propExtendsB?: ModelWithString;\n};\n\n/**\n * This is a model that extends another model\n */\nexport type ModelThatExtendsExtends = ModelWithString & ModelThatExtends & {\n    propExtendsC?: string;\n    propExtendsD?: ModelWithString;\n};\n\n/**\n * This is a model that contains a some patterns\n */\nexport type ModelWithPattern = {\n    key: string;\n    name: string;\n    readonly enabled?: boolean;\n    readonly modified?: string;\n    id?: string;\n    text?: string;\n    patternWithSingleQuotes?: string;\n    patternWithNewline?: string;\n    patternWithBacktick?: string;\n    patternWithUnicode?: string;\n};\n\nexport type File = {\n    /**\n     * Id\n     */\n    readonly id?: string;\n    /**\n     * Updated at\n     */\n    readonly updated_at?: string;\n    /**\n     * Created at\n     */\n    readonly created_at?: string;\n    /**\n     * Mime\n     */\n    mime: string;\n    /**\n     * File\n     */\n    readonly file?: string;\n};\n\nexport type Default = {\n    name?: string;\n};\n\nexport type Pageable = {\n    page?: number;\n    size?: number;\n    sort?: Array<string>;\n};\n\n/**\n * This is a free-form object without additionalProperties.\n */\nexport type FreeFormObjectWithoutAdditionalProperties = {\n    [key: string]: unknown;\n};\n\n/**\n * This is a free-form object with additionalProperties: true.\n */\nexport type FreeFormObjectWithAdditionalPropertiesEqTrue = {\n    [key: string]: unknown;\n};\n\n/**\n * This is a free-form object with additionalProperties: {}.\n */\nexport type FreeFormObjectWithAdditionalPropertiesEqEmptyObject = {\n    [key: string]: unknown;\n};\n\nexport type ModelWithConst = {\n    String?: 'String';\n    number?: 0;\n    null?: null;\n    withType?: 'Some string';\n};\n\n/**\n * This is a model with one property and additionalProperties: true\n */\nexport type ModelWithAdditionalPropertiesEqTrue = {\n    /**\n     * This is a simple string property\n     */\n    prop?: string;\n    [key: string]: unknown;\n};\n\nexport type NestedAnyOfArraysNullable = {\n    nullableArray?: Array<string | boolean> | null;\n};\n\nexport type CompositionWithOneOfAndProperties = ({\n    foo: SimpleParameter;\n} | {\n    bar: NonAsciiStringæøåÆøÅöôêÊ字符串;\n}) & {\n    baz: number | null;\n    qux: number;\n};\n\n/**\n * An object that can be null\n */\nexport type NullableObject = {\n    foo?: string;\n} | null;\n\n/**\n * Some % character\n */\nexport type CharactersInDescription = string;\n\nexport type ModelWithNullableObject = {\n    data?: NullableObject;\n};\n\n/**\n * An object with additional properties that can be null (anyOf ref + null)\n */\nexport type ModelWithAdditionalPropertiesRef = {\n    [key: string]: NullableObject | null;\n};\n\nexport type ModelWithOneOfEnum = {\n    foo: 'Bar';\n} | {\n    foo: 'Baz';\n} | {\n    foo: 'Qux';\n} | {\n    content: string;\n    foo: 'Quux';\n} | {\n    content: [\n        string,\n        string\n    ];\n    foo: 'Corge';\n};\n\nexport type ModelWithNestedArrayEnumsDataFoo = 'foo' | 'bar';\n\nexport type ModelWithNestedArrayEnumsDataBar = 'baz' | 'qux';\n\nexport type ModelWithNestedArrayEnumsData = {\n    foo?: Array<ModelWithNestedArrayEnumsDataFoo>;\n    bar?: Array<ModelWithNestedArrayEnumsDataBar>;\n};\n\nexport type ModelWithNestedArrayEnums = {\n    array_strings?: Array<string>;\n    data?: ModelWithNestedArrayEnumsData;\n};\n\nexport type ModelWithNestedCompositionEnums = {\n    foo?: ModelWithNestedArrayEnumsDataFoo;\n};\n\nexport type ModelWithReadOnlyAndWriteOnly = {\n    foo: string;\n    readonly bar: string;\n};\n\nexport type ModelWithConstantSizeArray = [\n    number,\n    number\n];\n\nexport type ModelWithAnyOfConstantSizeArray = [\n    number | string,\n    number | string,\n    number | string\n];\n\nexport type ModelWithPrefixItemsConstantSizeArray = [\n    ModelWithInteger,\n    number | string,\n    string\n];\n\nexport type ModelWithAnyOfConstantSizeArrayNullable = [\n    number | null | string,\n    number | null | string,\n    number | null | string\n];\n\nexport type ModelWithAnyOfConstantSizeArrayWithNSizeAndOptions = [\n    number | Import,\n    number | Import\n];\n\nexport type ModelWithAnyOfConstantSizeArrayAndIntersect = [\n    number & string,\n    number & string\n];\n\nexport type ModelWithNumericEnumUnion = {\n    /**\n     * Период\n     */\n    value?: -10 | -1 | 0 | 1 | 3 | 6 | 12;\n};\n\n/**\n * Some description with `back ticks`\n */\nexport type ModelWithBackticksInDescription = {\n    /**\n     * The template `that` should be used for parsing and importing the contents of the CSV file.\n     *\n     * <br/><p>There is one placeholder currently supported:<ul>     <li><b>${x}</b> - refers to the n-th column in the CSV file, e.g. ${1}, ${2}, ...)</li></ul><p>Example of a correct JSON template:</p>\n     * <pre>\n     * [\n     * {\n     * \"resourceType\": \"Asset\",\n     * \"identifier\": {\n     * \"name\": \"${1}\",\n     * \"domain\": {\n     * \"name\": \"${2}\",\n     * \"community\": {\n     * \"name\": \"Some Community\"\n     * }\n     * }\n     * },\n     * \"attributes\" : {\n     * \"00000000-0000-0000-0000-000000003115\" : [ {\n     * \"value\" : \"${3}\"\n     * } ],\n     * \"00000000-0000-0000-0000-000000000222\" : [ {\n     * \"value\" : \"${4}\"\n     * } ]\n     * }\n     * }\n     * ]\n     * </pre>\n     */\n    template?: string;\n};\n\nexport type ModelWithOneOfAndProperties = (SimpleParameter | NonAsciiStringæøåÆøÅöôêÊ字符串) & {\n    baz: number | null;\n    qux: number;\n};\n\n/**\n * Model used to test deduplication strategy (unused)\n */\nexport type ParameterSimpleParameterUnused = string;\n\n/**\n * Model used to test deduplication strategy\n */\nexport type PostServiceWithEmptyTagResponse = string;\n\n/**\n * Model used to test deduplication strategy\n */\nexport type PostServiceWithEmptyTagResponse2 = string;\n\n/**\n * Model used to test deduplication strategy\n */\nexport type DeleteFooData = string;\n\n/**\n * Model used to test deduplication strategy\n */\nexport type DeleteFooData2 = string;\n\n/**\n * Model with restricted keyword name\n */\nexport type Import = string;\n\nexport type SchemaWithFormRestrictedKeys = {\n    description?: string;\n    'x-enum-descriptions'?: string;\n    'x-enum-varnames'?: string;\n    'x-enumNames'?: string;\n    title?: string;\n    object?: {\n        description?: string;\n        'x-enum-descriptions'?: string;\n        'x-enum-varnames'?: string;\n        'x-enumNames'?: string;\n        title?: string;\n    };\n    array?: Array<{\n        description?: string;\n        'x-enum-descriptions'?: string;\n        'x-enum-varnames'?: string;\n        'x-enumNames'?: string;\n        title?: string;\n    }>;\n};\n\n/**\n * This schema was giving PascalCase transformations a hard time\n */\nexport type IoK8sApimachineryPkgApisMetaV1DeleteOptions = {\n    /**\n     * Must be fulfilled before a deletion is carried out. If not possible, a 409 Conflict status will be returned.\n     */\n    preconditions?: IoK8sApimachineryPkgApisMetaV1Preconditions;\n};\n\n/**\n * This schema was giving PascalCase transformations a hard time\n */\nexport type IoK8sApimachineryPkgApisMetaV1Preconditions = {\n    /**\n     * Specifies the target ResourceVersion\n     */\n    resourceVersion?: string;\n    /**\n     * Specifies the target UID.\n     */\n    uid?: string;\n};\n\nexport type AdditionalPropertiesUnknownIssue = {\n    [key: string]: string | number;\n};\n\nexport type AdditionalPropertiesUnknownIssue2 = {\n    [key: string]: string | number;\n};\n\nexport type AdditionalPropertiesUnknownIssue3 = string & {\n    entries: {\n        [key: string]: AdditionalPropertiesUnknownIssue;\n    };\n};\n\nexport type AdditionalPropertiesIntegerIssue = {\n    value: number;\n    [key: string]: number;\n};\n\nexport type OneOfAllOfIssue = ((ConstValue | GenericSchemaDuplicateIssue1SystemBoolean) & _3eNum1Период) | GenericSchemaDuplicateIssue1SystemString;\n\nexport type GenericSchemaDuplicateIssue1SystemBoolean = {\n    item?: boolean;\n    error?: string | null;\n    readonly hasError?: boolean;\n    data?: {\n        [key: string]: never;\n    };\n};\n\nexport type GenericSchemaDuplicateIssue1SystemString = {\n    item?: string | null;\n    error?: string | null;\n    readonly hasError?: boolean;\n};\n\nexport type ExternalSharedModel = {\n    id: string;\n    name?: string;\n};\n\n/**\n * This is a model with one property containing a reference\n */\nexport type ModelWithReferenceWritable = {\n    prop?: ModelWithPropertiesWritable;\n};\n\n/**\n * This is a model with one property containing an array\n */\nexport type ModelWithArrayReadOnlyAndWriteOnlyWritable = {\n    prop?: Array<ModelWithReadOnlyAndWriteOnlyWritable>;\n    propWithFile?: Array<Blob | File>;\n    propWithNumber?: Array<number>;\n};\n\n/**\n * This is a model with one nested property\n */\nexport type ModelWithPropertiesWritable = {\n    required: string;\n    requiredAndNullable: string | null;\n    string?: string;\n    number?: number;\n    boolean?: boolean;\n    reference?: ModelWithString;\n    'property with space'?: string;\n    default?: string;\n    try?: string;\n};\n\n/**\n * This is a model that contains a some patterns\n */\nexport type ModelWithPatternWritable = {\n    key: string;\n    name: string;\n    id?: string;\n    text?: string;\n    patternWithSingleQuotes?: string;\n    patternWithNewline?: string;\n    patternWithBacktick?: string;\n    patternWithUnicode?: string;\n};\n\nexport type FileWritable = {\n    /**\n     * Mime\n     */\n    mime: string;\n};\n\nexport type ModelWithReadOnlyAndWriteOnlyWritable = {\n    foo: string;\n    baz: string;\n};\n\nexport type ModelWithAnyOfConstantSizeArrayWithNSizeAndOptionsWritable = [\n    number | Import,\n    number | Import\n];\n\nexport type AdditionalPropertiesUnknownIssueWritable = {\n    [key: string]: string | number;\n};\n\nexport type OneOfAllOfIssueWritable = ((ConstValue | GenericSchemaDuplicateIssue1SystemBoolean) & _3eNum1Период) | GenericSchemaDuplicateIssue1SystemString;\n\nexport type GenericSchemaDuplicateIssue1SystemBooleanWritable = {\n    item?: boolean;\n    error?: string | null;\n    data?: {\n        [key: string]: never;\n    };\n};\n\nexport type GenericSchemaDuplicateIssue1SystemStringWritable = {\n    item?: string | null;\n    error?: string | null;\n};\n\n/**\n * This is a reusable parameter\n */\nexport type SimpleParameter = string;\n\n/**\n * Parameter with illegal characters\n */\nexport type XFooBar = ModelWithString;\n\n/**\n * A reusable request body\n */\nexport type SimpleRequestBody = ModelWithString;\n\n/**\n * A reusable request body\n */\nexport type SimpleFormData = ModelWithString;\n\nexport type ExportData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no+tag';\n};\n\nexport type PatchApiVbyApiVersionNoTagData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no+tag';\n};\n\nexport type PatchApiVbyApiVersionNoTagResponses = {\n    /**\n     * OK\n     */\n    default: unknown;\n};\n\nexport type ImportData = {\n    body: ModelWithReadOnlyAndWriteOnlyWritable | ModelWithArrayReadOnlyAndWriteOnlyWritable;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no+tag';\n};\n\nexport type ImportResponses = {\n    /**\n     * Success\n     */\n    200: ModelFromZendesk;\n    /**\n     * Default success response\n     */\n    default: ModelWithReadOnlyAndWriteOnly;\n};\n\nexport type ImportResponse = ImportResponses[keyof ImportResponses];\n\nexport type FooWowData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no+tag';\n};\n\nexport type FooWowResponses = {\n    /**\n     * OK\n     */\n    default: unknown;\n};\n\nexport type ApiVVersionODataControllerCountData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple/$count';\n};\n\nexport type ApiVVersionODataControllerCountResponses = {\n    /**\n     * Success\n     */\n    200: ModelFromZendesk;\n};\n\nexport type ApiVVersionODataControllerCountResponse = ApiVVersionODataControllerCountResponses[keyof ApiVVersionODataControllerCountResponses];\n\nexport type GetApiVbyApiVersionSimpleOperationData = {\n    body?: never;\n    path: {\n        /**\n         * foo in method\n         */\n        foo_param: string;\n    };\n    query?: never;\n    url: '/api/v{api-version}/simple:operation';\n};\n\nexport type GetApiVbyApiVersionSimpleOperationErrors = {\n    /**\n     * Default error response\n     */\n    default: ModelWithBoolean;\n};\n\nexport type GetApiVbyApiVersionSimpleOperationError = GetApiVbyApiVersionSimpleOperationErrors[keyof GetApiVbyApiVersionSimpleOperationErrors];\n\nexport type GetApiVbyApiVersionSimpleOperationResponses = {\n    /**\n     * Response is a simple number\n     */\n    200: number;\n};\n\nexport type GetApiVbyApiVersionSimpleOperationResponse = GetApiVbyApiVersionSimpleOperationResponses[keyof GetApiVbyApiVersionSimpleOperationResponses];\n\nexport type DeleteCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type GetCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type HeadCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type OptionsCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type PatchCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type PostCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type PutCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type DeleteFooData3 = {\n    body?: never;\n    headers: {\n        /**\n         * Parameter with illegal characters\n         */\n        'x-Foo-Bar': ModelWithString;\n    };\n    path: {\n        /**\n         * foo in method\n         */\n        foo_param: string;\n        /**\n         * bar in method\n         */\n        BarParam: string;\n    };\n    query?: never;\n    url: '/api/v{api-version}/foo/{foo_param}/bar/{BarParam}';\n};\n\nexport type CallWithDescriptionsData = {\n    body?: never;\n    path?: never;\n    query?: {\n        /**\n         * Testing multiline comments in string: First line\n         * Second line\n         *\n         * Fourth line\n         */\n        parameterWithBreaks?: string;\n        /**\n         * Testing backticks in string: `backticks` and ```multiple backticks``` should work\n         */\n        parameterWithBackticks?: string;\n        /**\n         * Testing slashes in string: \\backwards\\\\\\ and /forwards/// should work\n         */\n        parameterWithSlashes?: string;\n        /**\n         * Testing expression placeholders in string: ${expression} should work\n         */\n        parameterWithExpressionPlaceholders?: string;\n        /**\n         * Testing quotes in string: 'single quote''' and \"double quotes\"\"\" should work\n         */\n        parameterWithQuotes?: string;\n        /**\n         * Testing reserved characters in string: * inline * and ** inline ** should work\n         */\n        parameterWithReservedCharacters?: string;\n    };\n    url: '/api/v{api-version}/descriptions';\n};\n\nexport type DeprecatedCallData = {\n    body?: never;\n    headers: {\n        /**\n         * This parameter is deprecated\n         *\n         * @deprecated\n         */\n        parameter: DeprecatedModel | null;\n    };\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/parameters/deprecated';\n};\n\nexport type CallWithParametersData = {\n    /**\n     * This is the parameter that goes into the body\n     */\n    body: {\n        [key: string]: unknown;\n    } | null;\n    headers: {\n        /**\n         * This is the parameter that goes into the header\n         */\n        parameterHeader: string | null;\n    };\n    path: {\n        /**\n         * This is the parameter that goes into the path\n         */\n        parameterPath: string | null;\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string | null;\n    };\n    query: {\n        foo_ref_enum?: ModelWithNestedArrayEnumsDataFoo;\n        foo_all_of_enum: ModelWithNestedArrayEnumsDataFoo;\n        /**\n         * This is the parameter that goes into the query params\n         */\n        cursor: string | null;\n    };\n    url: '/api/v{api-version}/parameters/{parameterPath}';\n};\n\nexport type CallWithWeirdParameterNamesData = {\n    /**\n     * This is the parameter that goes into the body\n     */\n    body: ModelWithString | null;\n    headers: {\n        /**\n         * This is the parameter that goes into the request header\n         */\n        'parameter.header': string | null;\n    };\n    path: {\n        /**\n         * This is the parameter that goes into the path\n         */\n        'parameter.path.1'?: string;\n        /**\n         * This is the parameter that goes into the path\n         */\n        'parameter-path-2'?: string;\n        /**\n         * This is the parameter that goes into the path\n         */\n        'PARAMETER-PATH-3'?: string;\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string | null;\n    };\n    query: {\n        /**\n         * This is the parameter with a reserved keyword\n         */\n        default?: string;\n        /**\n         * This is the parameter that goes into the request query params\n         */\n        'parameter-query': string | null;\n    };\n    url: '/api/v{api-version}/parameters/{parameter.path.1}/{parameter-path-2}/{PARAMETER-PATH-3}';\n};\n\nexport type GetCallWithOptionalParamData = {\n    /**\n     * This is a required parameter\n     */\n    body: ModelWithOneOfEnum;\n    path?: never;\n    query?: {\n        /**\n         * This is an optional parameter\n         */\n        page?: number;\n    };\n    url: '/api/v{api-version}/parameters';\n};\n\nexport type PostCallWithOptionalParamData = {\n    /**\n     * This is an optional parameter\n     */\n    body?: {\n        offset?: number | null;\n    };\n    path?: never;\n    query: {\n        /**\n         * This is a required parameter\n         */\n        parameter: Pageable;\n    };\n    url: '/api/v{api-version}/parameters';\n};\n\nexport type PostCallWithOptionalParamResponses = {\n    /**\n     * Response is a simple number\n     */\n    200: number;\n    /**\n     * Success\n     */\n    204: void;\n};\n\nexport type PostCallWithOptionalParamResponse = PostCallWithOptionalParamResponses[keyof PostCallWithOptionalParamResponses];\n\nexport type PostApiVbyApiVersionRequestBodyData = {\n    /**\n     * A reusable request body\n     */\n    body?: SimpleRequestBody;\n    path?: never;\n    query?: {\n        /**\n         * This is a reusable parameter\n         */\n        parameter?: string;\n    };\n    url: '/api/v{api-version}/requestBody';\n};\n\nexport type PostApiVbyApiVersionFormDataData = {\n    /**\n     * A reusable request body\n     */\n    body?: SimpleFormData;\n    path?: never;\n    query?: {\n        /**\n         * This is a reusable parameter\n         */\n        parameter?: string;\n    };\n    url: '/api/v{api-version}/formData';\n};\n\nexport type CallWithDefaultParametersData = {\n    body?: never;\n    path?: never;\n    query?: {\n        /**\n         * This is a simple string with default value\n         */\n        parameterString?: string | null;\n        /**\n         * This is a simple number with default value\n         */\n        parameterNumber?: number | null;\n        /**\n         * This is a simple boolean with default value\n         */\n        parameterBoolean?: boolean | null;\n        /**\n         * This is a simple enum with default value\n         */\n        parameterEnum?: 'Success' | 'Warning' | 'Error';\n        /**\n         * This is a simple model with default value\n         */\n        parameterModel?: ModelWithString | null;\n    };\n    url: '/api/v{api-version}/defaults';\n};\n\nexport type CallWithDefaultOptionalParametersData = {\n    body?: never;\n    path?: never;\n    query?: {\n        /**\n         * This is a simple string that is optional with default value\n         */\n        parameterString?: string;\n        /**\n         * This is a simple number that is optional with default value\n         */\n        parameterNumber?: number;\n        /**\n         * This is a simple boolean that is optional with default value\n         */\n        parameterBoolean?: boolean;\n        /**\n         * This is a simple enum that is optional with default value\n         */\n        parameterEnum?: 'Success' | 'Warning' | 'Error';\n        /**\n         * This is a simple model that is optional with default value\n         */\n        parameterModel?: ModelWithString;\n    };\n    url: '/api/v{api-version}/defaults';\n};\n\nexport type CallToTestOrderOfParamsData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * This is a optional string with default\n         */\n        parameterOptionalStringWithDefault?: string;\n        /**\n         * This is a optional string with empty default\n         */\n        parameterOptionalStringWithEmptyDefault?: string;\n        /**\n         * This is a optional string with no default\n         */\n        parameterOptionalStringWithNoDefault?: string;\n        /**\n         * This is a string with default\n         */\n        parameterStringWithDefault: string;\n        /**\n         * This is a string with empty default\n         */\n        parameterStringWithEmptyDefault: string;\n        /**\n         * This is a string with no default\n         */\n        parameterStringWithNoDefault: string;\n        /**\n         * This is a string that can be null with no default\n         */\n        parameterStringNullableWithNoDefault?: string | null;\n        /**\n         * This is a string that can be null with default\n         */\n        parameterStringNullableWithDefault?: string | null;\n    };\n    url: '/api/v{api-version}/defaults';\n};\n\nexport type DuplicateNameData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/duplicate';\n};\n\nexport type DuplicateName2Data = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/duplicate';\n};\n\nexport type DuplicateName3Data = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/duplicate';\n};\n\nexport type DuplicateName4Data = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/duplicate';\n};\n\nexport type CallWithNoContentResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no-content';\n};\n\nexport type CallWithNoContentResponseResponses = {\n    /**\n     * Success\n     */\n    204: void;\n};\n\nexport type CallWithNoContentResponseResponse = CallWithNoContentResponseResponses[keyof CallWithNoContentResponseResponses];\n\nexport type CallWithResponseAndNoContentResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multiple-tags/response-and-no-content';\n};\n\nexport type CallWithResponseAndNoContentResponseResponses = {\n    /**\n     * Response is a simple number\n     */\n    200: number;\n    /**\n     * Success\n     */\n    204: void;\n};\n\nexport type CallWithResponseAndNoContentResponseResponse = CallWithResponseAndNoContentResponseResponses[keyof CallWithResponseAndNoContentResponseResponses];\n\nexport type DummyAData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multiple-tags/a';\n};\n\nexport type DummyAResponses = {\n    200: _400;\n};\n\nexport type DummyAResponse = DummyAResponses[keyof DummyAResponses];\n\nexport type DummyBData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multiple-tags/b';\n};\n\nexport type DummyBResponses = {\n    /**\n     * Success\n     */\n    204: void;\n};\n\nexport type DummyBResponse = DummyBResponses[keyof DummyBResponses];\n\nexport type CallWithResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/response';\n};\n\nexport type CallWithResponseResponses = {\n    default: Import;\n};\n\nexport type CallWithResponseResponse = CallWithResponseResponses[keyof CallWithResponseResponses];\n\nexport type CallWithDuplicateResponsesData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/response';\n};\n\nexport type CallWithDuplicateResponsesErrors = {\n    /**\n     * Message for 500 error\n     */\n    500: ModelWithStringError;\n    /**\n     * Message for 501 error\n     */\n    501: ModelWithStringError;\n    /**\n     * Message for 502 error\n     */\n    502: ModelWithStringError;\n    /**\n     * Message for 4XX errors\n     */\n    '4XX': DictionaryWithArray;\n    /**\n     * Default error response\n     */\n    default: ModelWithBoolean;\n};\n\nexport type CallWithDuplicateResponsesError = CallWithDuplicateResponsesErrors[keyof CallWithDuplicateResponsesErrors];\n\nexport type CallWithDuplicateResponsesResponses = {\n    /**\n     * Message for 200 response\n     */\n    200: ModelWithBoolean & ModelWithInteger;\n    /**\n     * Message for 201 response\n     */\n    201: ModelWithString;\n    /**\n     * Message for 202 response\n     */\n    202: ModelWithString;\n};\n\nexport type CallWithDuplicateResponsesResponse = CallWithDuplicateResponsesResponses[keyof CallWithDuplicateResponsesResponses];\n\nexport type CallWithResponsesData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/response';\n};\n\nexport type CallWithResponsesErrors = {\n    /**\n     * Message for 500 error\n     */\n    500: ModelWithStringError;\n    /**\n     * Message for 501 error\n     */\n    501: ModelWithStringError;\n    /**\n     * Message for 502 error\n     */\n    502: ModelWithStringError;\n    /**\n     * Message for default response\n     */\n    default: ModelWithStringError;\n};\n\nexport type CallWithResponsesError = CallWithResponsesErrors[keyof CallWithResponsesErrors];\n\nexport type CallWithResponsesResponses = {\n    /**\n     * Message for 200 response\n     */\n    200: {\n        readonly '@namespace.string'?: string;\n        readonly '@namespace.integer'?: number;\n        readonly value?: Array<ModelWithString>;\n    };\n    /**\n     * Message for 201 response\n     */\n    201: ModelThatExtends;\n    /**\n     * Message for 202 response\n     */\n    202: ModelThatExtendsExtends;\n};\n\nexport type CallWithResponsesResponse = CallWithResponsesResponses[keyof CallWithResponsesResponses];\n\nexport type CollectionFormatData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * This is an array parameter that is sent as csv format (comma-separated values)\n         */\n        parameterArrayCSV: Array<string> | null;\n        /**\n         * This is an array parameter that is sent as ssv format (space-separated values)\n         */\n        parameterArraySSV: Array<string> | null;\n        /**\n         * This is an array parameter that is sent as tsv format (tab-separated values)\n         */\n        parameterArrayTSV: Array<string> | null;\n        /**\n         * This is an array parameter that is sent as pipes format (pipe-separated values)\n         */\n        parameterArrayPipes: Array<string> | null;\n        /**\n         * This is an array parameter that is sent as multi format (multiple parameter instances)\n         */\n        parameterArrayMulti: Array<string> | null;\n    };\n    url: '/api/v{api-version}/collectionFormat';\n};\n\nexport type TypesData = {\n    body?: never;\n    path?: {\n        /**\n         * This is a number parameter\n         */\n        id?: number;\n    };\n    query: {\n        /**\n         * This is a number parameter\n         */\n        parameterNumber: number;\n        /**\n         * This is a string parameter\n         */\n        parameterString: string | null;\n        /**\n         * This is a boolean parameter\n         */\n        parameterBoolean: boolean | null;\n        /**\n         * This is an object parameter\n         */\n        parameterObject: {\n            [key: string]: unknown;\n        } | null;\n        /**\n         * This is an array parameter\n         */\n        parameterArray: Array<string> | null;\n        /**\n         * This is a dictionary parameter\n         */\n        parameterDictionary: {\n            [key: string]: unknown;\n        } | null;\n        /**\n         * This is an enum parameter\n         */\n        parameterEnum: 'Success' | 'Warning' | 'Error' | null;\n    };\n    url: '/api/v{api-version}/types';\n};\n\nexport type TypesResponses = {\n    /**\n     * Response is a simple number\n     */\n    200: number;\n    /**\n     * Response is a simple string\n     */\n    201: string;\n    /**\n     * Response is a simple boolean\n     */\n    202: boolean;\n    /**\n     * Response is a simple object\n     */\n    203: {\n        [key: string]: unknown;\n    };\n};\n\nexport type TypesResponse = TypesResponses[keyof TypesResponses];\n\nexport type UploadFileData = {\n    body: Blob | File;\n    path: {\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string | null;\n    };\n    query?: never;\n    url: '/api/v{api-version}/upload';\n};\n\nexport type UploadFileResponses = {\n    200: boolean;\n};\n\nexport type UploadFileResponse = UploadFileResponses[keyof UploadFileResponses];\n\nexport type FileResponseData = {\n    body?: never;\n    path: {\n        id: string;\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string;\n    };\n    query?: never;\n    url: '/api/v{api-version}/file/{id}';\n};\n\nexport type FileResponseResponses = {\n    /**\n     * Success\n     */\n    200: Blob | File;\n};\n\nexport type FileResponseResponse = FileResponseResponses[keyof FileResponseResponses];\n\nexport type ComplexTypesData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * Parameter containing object\n         */\n        parameterObject: {\n            first?: {\n                second?: {\n                    third?: string;\n                };\n            };\n        };\n        /**\n         * Parameter containing reference\n         */\n        parameterReference: ModelWithString;\n    };\n    url: '/api/v{api-version}/complex';\n};\n\nexport type ComplexTypesErrors = {\n    /**\n     * 400 `server` error\n     */\n    400: unknown;\n    /**\n     * 500 server error\n     */\n    500: unknown;\n};\n\nexport type ComplexTypesResponses = {\n    /**\n     * Successful response\n     */\n    200: Array<ModelWithString>;\n};\n\nexport type ComplexTypesResponse = ComplexTypesResponses[keyof ComplexTypesResponses];\n\nexport type MultipartResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multipart';\n};\n\nexport type MultipartResponseResponses = {\n    /**\n     * OK\n     */\n    200: {\n        file?: Blob | File;\n        metadata?: {\n            foo?: string;\n            bar?: string;\n        };\n    };\n};\n\nexport type MultipartResponseResponse = MultipartResponseResponses[keyof MultipartResponseResponses];\n\nexport type MultipartRequestData = {\n    body?: {\n        content?: Blob | File;\n        data?: ModelWithString | null;\n    };\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multipart';\n};\n\nexport type ComplexParamsData = {\n    body?: {\n        readonly key: string | null;\n        name: string | null;\n        enabled?: boolean;\n        type: 'Monkey' | 'Horse' | 'Bird';\n        listOfModels?: Array<ModelWithString> | null;\n        listOfStrings?: Array<string> | null;\n        parameters: ModelWithString | ModelWithEnum | ModelWithArray | ModelWithDictionary;\n        readonly user?: {\n            readonly id?: number;\n            readonly name?: string | null;\n        };\n    };\n    path: {\n        id: number;\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string;\n    };\n    query?: never;\n    url: '/api/v{api-version}/complex/{id}';\n};\n\nexport type ComplexParamsResponses = {\n    /**\n     * Success\n     */\n    200: ModelWithString;\n};\n\nexport type ComplexParamsResponse = ComplexParamsResponses[keyof ComplexParamsResponses];\n\nexport type CallWithResultFromHeaderData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/header';\n};\n\nexport type CallWithResultFromHeaderErrors = {\n    /**\n     * 400 server error\n     */\n    400: unknown;\n    /**\n     * 500 server error\n     */\n    500: unknown;\n};\n\nexport type CallWithResultFromHeaderResponses = {\n    /**\n     * Successful response\n     */\n    200: unknown;\n};\n\nexport type TestErrorCodeData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * Status code to return\n         */\n        status: number;\n    };\n    url: '/api/v{api-version}/error';\n};\n\nexport type TestErrorCodeErrors = {\n    /**\n     * Custom message: Internal Server Error\n     */\n    500: unknown;\n    /**\n     * Custom message: Not Implemented\n     */\n    501: unknown;\n    /**\n     * Custom message: Bad Gateway\n     */\n    502: unknown;\n    /**\n     * Custom message: Service Unavailable\n     */\n    503: unknown;\n};\n\nexport type TestErrorCodeResponses = {\n    /**\n     * Custom message: Successful response\n     */\n    200: unknown;\n};\n\nexport type NonAsciiæøåÆøÅöôêÊ字符串Data = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * Dummy input param\n         */\n        nonAsciiParamæøåÆØÅöôêÊ: number;\n    };\n    url: '/api/v{api-version}/non-ascii-æøåÆØÅöôêÊ字符串';\n};\n\nexport type NonAsciiæøåÆøÅöôêÊ字符串Responses = {\n    /**\n     * Successful response\n     */\n    200: Array<NonAsciiStringæøåÆøÅöôêÊ字符串>;\n};\n\nexport type NonAsciiæøåÆøÅöôêÊ字符串Response = NonAsciiæøåÆøÅöôêÊ字符串Responses[keyof NonAsciiæøåÆøÅöôêÊ字符串Responses];\n\nexport type PutWithFormUrlEncodedData = {\n    body: ArrayWithStrings;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/non-ascii-æøåÆØÅöôêÊ字符串';\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/client-custom/sdk-client-required/custom-client.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport { type ClientOptions, type Config, createClient, createConfig } from '@hey-api/custom-client';\n\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: 'http://localhost:3000/base' }));\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/client-custom/sdk-client-required/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport { apiVVersionODataControllerCount, callToTestOrderOfParams, callWithDefaultOptionalParameters, callWithDefaultParameters, callWithDescriptions, callWithDuplicateResponses, callWithNoContentResponse, callWithParameters, callWithResponse, callWithResponseAndNoContentResponse, callWithResponses, callWithResultFromHeader, callWithWeirdParameterNames, collectionFormat, complexParams, complexTypes, deleteCallWithoutParametersAndResponse, deleteFoo, deprecatedCall, dummyA, dummyB, duplicateName, duplicateName2, duplicateName3, duplicateName4, export_, fileResponse, fooWow, getApiVbyApiVersionSimpleOperation, getCallWithOptionalParam, getCallWithoutParametersAndResponse, headCallWithoutParametersAndResponse, import_, multipartRequest, multipartResponse, nonAsciiæøåÆøÅöôêÊ字符串, type Options, optionsCallWithoutParametersAndResponse, patchApiVbyApiVersionNoTag, patchCallWithoutParametersAndResponse, postApiVbyApiVersionFormData, postApiVbyApiVersionRequestBody, postCallWithOptionalParam, postCallWithoutParametersAndResponse, putCallWithoutParametersAndResponse, putWithFormUrlEncoded, testErrorCode, types, uploadFile } from './sdk.gen';\nexport type { _3eNum1Период, _400, AdditionalPropertiesIntegerIssue, AdditionalPropertiesUnknownIssue, AdditionalPropertiesUnknownIssue2, AdditionalPropertiesUnknownIssue3, AdditionalPropertiesUnknownIssueWritable, AnyOfAnyAndNull, AnyOfArrays, ApiVVersionODataControllerCountData, ApiVVersionODataControllerCountResponse, ApiVVersionODataControllerCountResponses, ArrayWithAnyOfProperties, ArrayWithArray, ArrayWithBooleans, ArrayWithNumbers, ArrayWithProperties, ArrayWithReferences, ArrayWithStrings, CallToTestOrderOfParamsData, CallWithDefaultOptionalParametersData, CallWithDefaultParametersData, CallWithDescriptionsData, CallWithDuplicateResponsesData, CallWithDuplicateResponsesError, CallWithDuplicateResponsesErrors, CallWithDuplicateResponsesResponse, CallWithDuplicateResponsesResponses, CallWithNoContentResponseData, CallWithNoContentResponseResponse, CallWithNoContentResponseResponses, CallWithParametersData, CallWithResponseAndNoContentResponseData, CallWithResponseAndNoContentResponseResponse, CallWithResponseAndNoContentResponseResponses, CallWithResponseData, CallWithResponseResponse, CallWithResponseResponses, CallWithResponsesData, CallWithResponsesError, CallWithResponsesErrors, CallWithResponsesResponse, CallWithResponsesResponses, CallWithResultFromHeaderData, CallWithResultFromHeaderErrors, CallWithResultFromHeaderResponses, CallWithWeirdParameterNamesData, CamelCaseCommentWithBreaks, CharactersInDescription, ClientOptions, CollectionFormatData, CommentWithBackticks, CommentWithBackticksAndQuotes, CommentWithBreaks, CommentWithExpressionPlaceholders, CommentWithQuotes, CommentWithReservedCharacters, CommentWithSlashes, ComplexParamsData, ComplexParamsResponse, ComplexParamsResponses, ComplexTypesData, ComplexTypesErrors, ComplexTypesResponse, ComplexTypesResponses, CompositionBaseModel, CompositionExtendedModel, CompositionWithAllOfAndNullable, CompositionWithAnyOf, CompositionWithAnyOfAndNullable, CompositionWithAnyOfAnonymous, CompositionWithNestedAnyAndTypeNull, CompositionWithNestedAnyOfAndNull, CompositionWithOneOf, CompositionWithOneOfAndComplexArrayDictionary, CompositionWithOneOfAndNullable, CompositionWithOneOfAndProperties, CompositionWithOneOfAndSimpleArrayDictionary, CompositionWithOneOfAndSimpleDictionary, CompositionWithOneOfAnonymous, CompositionWithOneOfDiscriminator, ConstValue, Default, DeleteCallWithoutParametersAndResponseData, DeleteFooData, DeleteFooData2, DeleteFooData3, DeprecatedCallData, DeprecatedModel, DictionaryWithArray, DictionaryWithDictionary, DictionaryWithProperties, DictionaryWithPropertiesAndAdditionalProperties, DictionaryWithReference, DictionaryWithString, DummyAData, DummyAResponse, DummyAResponses, DummyBData, DummyBResponse, DummyBResponses, DuplicateName2Data, DuplicateName3Data, DuplicateName4Data, DuplicateNameData, EnumFromDescription, EnumWithExtensions, EnumWithNumbers, EnumWithReplacedCharacters, EnumWithStrings, EnumWithXEnumNames, ExportData, ExternalRefA, ExternalRefB, ExternalSharedModel, File, FileResponseData, FileResponseResponse, FileResponseResponses, FileWritable, FooWowData, FooWowResponses, FreeFormObjectWithAdditionalPropertiesEqEmptyObject, FreeFormObjectWithAdditionalPropertiesEqTrue, FreeFormObjectWithoutAdditionalProperties, GenericSchemaDuplicateIssue1SystemBoolean, GenericSchemaDuplicateIssue1SystemBooleanWritable, GenericSchemaDuplicateIssue1SystemString, GenericSchemaDuplicateIssue1SystemStringWritable, GetApiVbyApiVersionSimpleOperationData, GetApiVbyApiVersionSimpleOperationError, GetApiVbyApiVersionSimpleOperationErrors, GetApiVbyApiVersionSimpleOperationResponse, GetApiVbyApiVersionSimpleOperationResponses, GetCallWithOptionalParamData, GetCallWithoutParametersAndResponseData, HeadCallWithoutParametersAndResponseData, Import, ImportData, ImportResponse, ImportResponses, IoK8sApimachineryPkgApisMetaV1DeleteOptions, IoK8sApimachineryPkgApisMetaV1Preconditions, ModelCircle, ModelFromZendesk, ModelSquare, ModelThatExtends, ModelThatExtendsExtends, ModelWithAdditionalPropertiesEqTrue, ModelWithAdditionalPropertiesRef, ModelWithAnyOfConstantSizeArray, ModelWithAnyOfConstantSizeArrayAndIntersect, ModelWithAnyOfConstantSizeArrayNullable, ModelWithAnyOfConstantSizeArrayWithNSizeAndOptions, ModelWithAnyOfConstantSizeArrayWithNSizeAndOptionsWritable, ModelWithArray, ModelWithArrayReadOnlyAndWriteOnly, ModelWithArrayReadOnlyAndWriteOnlyWritable, ModelWithBackticksInDescription, ModelWithBoolean, ModelWithCircularReference, ModelWithConst, ModelWithConstantSizeArray, ModelWithDictionary, ModelWithDuplicateImports, ModelWithDuplicateProperties, ModelWithEnum, ModelWithEnumFromDescription, ModelWithEnumWithHyphen, ModelWithInteger, ModelWithNestedArrayEnums, ModelWithNestedArrayEnumsData, ModelWithNestedArrayEnumsDataBar, ModelWithNestedArrayEnumsDataFoo, ModelWithNestedCompositionEnums, ModelWithNestedEnums, ModelWithNestedProperties, ModelWithNullableObject, ModelWithNullableString, ModelWithNumericEnumUnion, ModelWithOneOfAndProperties, ModelWithOneOfEnum, ModelWithOrderedProperties, ModelWithPattern, ModelWithPatternWritable, ModelWithPrefixItemsConstantSizeArray, ModelWithProperties, ModelWithPropertiesWritable, ModelWithReadOnlyAndWriteOnly, ModelWithReadOnlyAndWriteOnlyWritable, ModelWithReference, ModelWithReferenceWritable, ModelWithString, ModelWithStringError, MultipartRequestData, MultipartResponseData, MultipartResponseResponse, MultipartResponseResponses, NestedAnyOfArraysNullable, NonAsciiæøåÆøÅöôêÊ字符串Data, NonAsciiæøåÆøÅöôêÊ字符串Response, NonAsciiæøåÆøÅöôêÊ字符串Responses, NonAsciiStringæøåÆøÅöôêÊ字符串, NullableObject, OneOfAllOfIssue, OneOfAllOfIssueWritable, OptionsCallWithoutParametersAndResponseData, Pageable, ParameterSimpleParameterUnused, PatchApiVbyApiVersionNoTagData, PatchApiVbyApiVersionNoTagResponses, PatchCallWithoutParametersAndResponseData, PostApiVbyApiVersionFormDataData, PostApiVbyApiVersionRequestBodyData, PostCallWithOptionalParamData, PostCallWithOptionalParamResponse, PostCallWithOptionalParamResponses, PostCallWithoutParametersAndResponseData, PostServiceWithEmptyTagResponse, PostServiceWithEmptyTagResponse2, PutCallWithoutParametersAndResponseData, PutWithFormUrlEncodedData, SchemaWithFormRestrictedKeys, SimpleBoolean, SimpleFile, SimpleFormData, SimpleInteger, SimpleParameter, SimpleReference, SimpleRequestBody, SimpleString, SimpleStringWithPattern, TestErrorCodeData, TestErrorCodeErrors, TestErrorCodeResponses, TypesData, TypesResponse, TypesResponses, UploadFileData, UploadFileResponse, UploadFileResponses, XFooBar } from './types.gen';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/client-custom/sdk-client-required/sdk.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport { type Client, formDataBodySerializer, type Options as Options2, type TDataShape, urlSearchParamsBodySerializer } from '@hey-api/custom-client';\n\nimport type { ApiVVersionODataControllerCountData, ApiVVersionODataControllerCountResponses, CallToTestOrderOfParamsData, CallWithDefaultOptionalParametersData, CallWithDefaultParametersData, CallWithDescriptionsData, CallWithDuplicateResponsesData, CallWithDuplicateResponsesErrors, CallWithDuplicateResponsesResponses, CallWithNoContentResponseData, CallWithNoContentResponseResponses, CallWithParametersData, CallWithResponseAndNoContentResponseData, CallWithResponseAndNoContentResponseResponses, CallWithResponseData, CallWithResponseResponses, CallWithResponsesData, CallWithResponsesErrors, CallWithResponsesResponses, CallWithResultFromHeaderData, CallWithResultFromHeaderErrors, CallWithResultFromHeaderResponses, CallWithWeirdParameterNamesData, CollectionFormatData, ComplexParamsData, ComplexParamsResponses, ComplexTypesData, ComplexTypesErrors, ComplexTypesResponses, DeleteCallWithoutParametersAndResponseData, DeleteFooData3, DeprecatedCallData, DummyAData, DummyAResponses, DummyBData, DummyBResponses, DuplicateName2Data, DuplicateName3Data, DuplicateName4Data, DuplicateNameData, ExportData, FileResponseData, FileResponseResponses, FooWowData, FooWowResponses, GetApiVbyApiVersionSimpleOperationData, GetApiVbyApiVersionSimpleOperationErrors, GetApiVbyApiVersionSimpleOperationResponses, GetCallWithOptionalParamData, GetCallWithoutParametersAndResponseData, HeadCallWithoutParametersAndResponseData, ImportData, ImportResponses, MultipartRequestData, MultipartResponseData, MultipartResponseResponses, NonAsciiæøåÆøÅöôêÊ字符串Data, NonAsciiæøåÆøÅöôêÊ字符串Responses, OptionsCallWithoutParametersAndResponseData, PatchApiVbyApiVersionNoTagData, PatchApiVbyApiVersionNoTagResponses, PatchCallWithoutParametersAndResponseData, PostApiVbyApiVersionFormDataData, PostApiVbyApiVersionRequestBodyData, PostCallWithOptionalParamData, PostCallWithOptionalParamResponses, PostCallWithoutParametersAndResponseData, PutCallWithoutParametersAndResponseData, PutWithFormUrlEncodedData, TestErrorCodeData, TestErrorCodeErrors, TestErrorCodeResponses, TypesData, TypesResponses, UploadFileData, UploadFileResponses } from './types.gen';\n\nexport type Options<TData extends TDataShape = TDataShape, ThrowOnError extends boolean = boolean> = Options2<TData, ThrowOnError> & {\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\nexport const export_ = <ThrowOnError extends boolean = false>(options: Options<ExportData, ThrowOnError>) => options.client.get<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/no+tag', ...options });\n\nexport const patchApiVbyApiVersionNoTag = <ThrowOnError extends boolean = false>(options: Options<PatchApiVbyApiVersionNoTagData, ThrowOnError>) => options.client.patch<PatchApiVbyApiVersionNoTagResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/no+tag', ...options });\n\nexport const import_ = <ThrowOnError extends boolean = false>(options: Options<ImportData, ThrowOnError>) => options.client.post<ImportResponses, unknown, ThrowOnError>({\n    url: '/api/v{api-version}/no+tag',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options.headers\n    }\n});\n\nexport const fooWow = <ThrowOnError extends boolean = false>(options: Options<FooWowData, ThrowOnError>) => options.client.put<FooWowResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/no+tag', ...options });\n\nexport const apiVVersionODataControllerCount = <ThrowOnError extends boolean = false>(options: Options<ApiVVersionODataControllerCountData, ThrowOnError>) => options.client.get<ApiVVersionODataControllerCountResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple/$count', ...options });\n\nexport const getApiVbyApiVersionSimpleOperation = <ThrowOnError extends boolean = false>(options: Options<GetApiVbyApiVersionSimpleOperationData, ThrowOnError>) => options.client.get<GetApiVbyApiVersionSimpleOperationResponses, GetApiVbyApiVersionSimpleOperationErrors, ThrowOnError>({ url: '/api/v{api-version}/simple:operation', ...options });\n\nexport const deleteCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options: Options<DeleteCallWithoutParametersAndResponseData, ThrowOnError>) => options.client.delete<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const getCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options: Options<GetCallWithoutParametersAndResponseData, ThrowOnError>) => options.client.get<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const headCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options: Options<HeadCallWithoutParametersAndResponseData, ThrowOnError>) => options.client.head<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const optionsCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options: Options<OptionsCallWithoutParametersAndResponseData, ThrowOnError>) => options.client.options<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const patchCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options: Options<PatchCallWithoutParametersAndResponseData, ThrowOnError>) => options.client.patch<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const postCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options: Options<PostCallWithoutParametersAndResponseData, ThrowOnError>) => options.client.post<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const putCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options: Options<PutCallWithoutParametersAndResponseData, ThrowOnError>) => options.client.put<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const deleteFoo = <ThrowOnError extends boolean = false>(options: Options<DeleteFooData3, ThrowOnError>) => options.client.delete<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/foo/{foo_param}/bar/{BarParam}', ...options });\n\nexport const callWithDescriptions = <ThrowOnError extends boolean = false>(options: Options<CallWithDescriptionsData, ThrowOnError>) => options.client.post<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/descriptions', ...options });\n\n/**\n * @deprecated\n */\nexport const deprecatedCall = <ThrowOnError extends boolean = false>(options: Options<DeprecatedCallData, ThrowOnError>) => options.client.post<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/parameters/deprecated', ...options });\n\nexport const callWithParameters = <ThrowOnError extends boolean = false>(options: Options<CallWithParametersData, ThrowOnError>) => options.client.post<unknown, unknown, ThrowOnError>({\n    url: '/api/v{api-version}/parameters/{parameterPath}',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options.headers\n    }\n});\n\nexport const callWithWeirdParameterNames = <ThrowOnError extends boolean = false>(options: Options<CallWithWeirdParameterNamesData, ThrowOnError>) => options.client.post<unknown, unknown, ThrowOnError>({\n    url: '/api/v{api-version}/parameters/{parameter.path.1}/{parameter-path-2}/{PARAMETER-PATH-3}',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options.headers\n    }\n});\n\nexport const getCallWithOptionalParam = <ThrowOnError extends boolean = false>(options: Options<GetCallWithOptionalParamData, ThrowOnError>) => options.client.get<unknown, unknown, ThrowOnError>({\n    url: '/api/v{api-version}/parameters',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options.headers\n    }\n});\n\nexport const postCallWithOptionalParam = <ThrowOnError extends boolean = false>(options: Options<PostCallWithOptionalParamData, ThrowOnError>) => options.client.post<PostCallWithOptionalParamResponses, unknown, ThrowOnError>({\n    url: '/api/v{api-version}/parameters',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options.headers\n    }\n});\n\nexport const postApiVbyApiVersionRequestBody = <ThrowOnError extends boolean = false>(options: Options<PostApiVbyApiVersionRequestBodyData, ThrowOnError>) => options.client.post<unknown, unknown, ThrowOnError>({\n    url: '/api/v{api-version}/requestBody',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options.headers\n    }\n});\n\nexport const postApiVbyApiVersionFormData = <ThrowOnError extends boolean = false>(options: Options<PostApiVbyApiVersionFormDataData, ThrowOnError>) => options.client.post<unknown, unknown, ThrowOnError>({\n    ...formDataBodySerializer,\n    url: '/api/v{api-version}/formData',\n    ...options,\n    headers: {\n        'Content-Type': null,\n        ...options.headers\n    }\n});\n\nexport const callWithDefaultParameters = <ThrowOnError extends boolean = false>(options: Options<CallWithDefaultParametersData, ThrowOnError>) => options.client.get<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/defaults', ...options });\n\nexport const callWithDefaultOptionalParameters = <ThrowOnError extends boolean = false>(options: Options<CallWithDefaultOptionalParametersData, ThrowOnError>) => options.client.post<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/defaults', ...options });\n\nexport const callToTestOrderOfParams = <ThrowOnError extends boolean = false>(options: Options<CallToTestOrderOfParamsData, ThrowOnError>) => options.client.put<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/defaults', ...options });\n\nexport const duplicateName = <ThrowOnError extends boolean = false>(options: Options<DuplicateNameData, ThrowOnError>) => options.client.delete<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/duplicate', ...options });\n\nexport const duplicateName2 = <ThrowOnError extends boolean = false>(options: Options<DuplicateName2Data, ThrowOnError>) => options.client.get<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/duplicate', ...options });\n\nexport const duplicateName3 = <ThrowOnError extends boolean = false>(options: Options<DuplicateName3Data, ThrowOnError>) => options.client.post<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/duplicate', ...options });\n\nexport const duplicateName4 = <ThrowOnError extends boolean = false>(options: Options<DuplicateName4Data, ThrowOnError>) => options.client.put<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/duplicate', ...options });\n\nexport const callWithNoContentResponse = <ThrowOnError extends boolean = false>(options: Options<CallWithNoContentResponseData, ThrowOnError>) => options.client.get<CallWithNoContentResponseResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/no-content', ...options });\n\nexport const callWithResponseAndNoContentResponse = <ThrowOnError extends boolean = false>(options: Options<CallWithResponseAndNoContentResponseData, ThrowOnError>) => options.client.get<CallWithResponseAndNoContentResponseResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/multiple-tags/response-and-no-content', ...options });\n\nexport const dummyA = <ThrowOnError extends boolean = false>(options: Options<DummyAData, ThrowOnError>) => options.client.get<DummyAResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/multiple-tags/a', ...options });\n\nexport const dummyB = <ThrowOnError extends boolean = false>(options: Options<DummyBData, ThrowOnError>) => options.client.get<DummyBResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/multiple-tags/b', ...options });\n\nexport const callWithResponse = <ThrowOnError extends boolean = false>(options: Options<CallWithResponseData, ThrowOnError>) => options.client.get<CallWithResponseResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/response', ...options });\n\nexport const callWithDuplicateResponses = <ThrowOnError extends boolean = false>(options: Options<CallWithDuplicateResponsesData, ThrowOnError>) => options.client.post<CallWithDuplicateResponsesResponses, CallWithDuplicateResponsesErrors, ThrowOnError>({ url: '/api/v{api-version}/response', ...options });\n\nexport const callWithResponses = <ThrowOnError extends boolean = false>(options: Options<CallWithResponsesData, ThrowOnError>) => options.client.put<CallWithResponsesResponses, CallWithResponsesErrors, ThrowOnError>({ url: '/api/v{api-version}/response', ...options });\n\nexport const collectionFormat = <ThrowOnError extends boolean = false>(options: Options<CollectionFormatData, ThrowOnError>) => options.client.get<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/collectionFormat', ...options });\n\nexport const types = <ThrowOnError extends boolean = false>(options: Options<TypesData, ThrowOnError>) => options.client.get<TypesResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/types', ...options });\n\nexport const uploadFile = <ThrowOnError extends boolean = false>(options: Options<UploadFileData, ThrowOnError>) => options.client.post<UploadFileResponses, unknown, ThrowOnError>({\n    ...urlSearchParamsBodySerializer,\n    url: '/api/v{api-version}/upload',\n    ...options,\n    headers: {\n        'Content-Type': 'application/x-www-form-urlencoded',\n        ...options.headers\n    }\n});\n\nexport const fileResponse = <ThrowOnError extends boolean = false>(options: Options<FileResponseData, ThrowOnError>) => options.client.get<FileResponseResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/file/{id}', ...options });\n\nexport const complexTypes = <ThrowOnError extends boolean = false>(options: Options<ComplexTypesData, ThrowOnError>) => options.client.get<ComplexTypesResponses, ComplexTypesErrors, ThrowOnError>({\n    querySerializer: { parameters: { parameterObject: { object: { style: 'form' } } } },\n    url: '/api/v{api-version}/complex',\n    ...options\n});\n\nexport const multipartResponse = <ThrowOnError extends boolean = false>(options: Options<MultipartResponseData, ThrowOnError>) => options.client.get<MultipartResponseResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/multipart', ...options });\n\nexport const multipartRequest = <ThrowOnError extends boolean = false>(options: Options<MultipartRequestData, ThrowOnError>) => options.client.post<unknown, unknown, ThrowOnError>({\n    ...formDataBodySerializer,\n    url: '/api/v{api-version}/multipart',\n    ...options,\n    headers: {\n        'Content-Type': null,\n        ...options.headers\n    }\n});\n\nexport const complexParams = <ThrowOnError extends boolean = false>(options: Options<ComplexParamsData, ThrowOnError>) => options.client.put<ComplexParamsResponses, unknown, ThrowOnError>({\n    url: '/api/v{api-version}/complex/{id}',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json-patch+json',\n        ...options.headers\n    }\n});\n\nexport const callWithResultFromHeader = <ThrowOnError extends boolean = false>(options: Options<CallWithResultFromHeaderData, ThrowOnError>) => options.client.post<CallWithResultFromHeaderResponses, CallWithResultFromHeaderErrors, ThrowOnError>({ url: '/api/v{api-version}/header', ...options });\n\nexport const testErrorCode = <ThrowOnError extends boolean = false>(options: Options<TestErrorCodeData, ThrowOnError>) => options.client.post<TestErrorCodeResponses, TestErrorCodeErrors, ThrowOnError>({ url: '/api/v{api-version}/error', ...options });\n\nexport const nonAsciiæøåÆøÅöôêÊ字符串 = <ThrowOnError extends boolean = false>(options: Options<NonAsciiæøåÆøÅöôêÊ字符串Data, ThrowOnError>) => options.client.post<NonAsciiæøåÆøÅöôêÊ字符串Responses, unknown, ThrowOnError>({ url: '/api/v{api-version}/non-ascii-æøåÆØÅöôêÊ字符串', ...options });\n\n/**\n * Login User\n */\nexport const putWithFormUrlEncoded = <ThrowOnError extends boolean = false>(options: Options<PutWithFormUrlEncodedData, ThrowOnError>) => options.client.put<unknown, unknown, ThrowOnError>({\n    ...urlSearchParamsBodySerializer,\n    url: '/api/v{api-version}/non-ascii-æøåÆØÅöôêÊ字符串',\n    ...options,\n    headers: {\n        'Content-Type': 'application/x-www-form-urlencoded',\n        ...options.headers\n    }\n});\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/client-custom/sdk-client-required/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type ClientOptions = {\n    baseUrl: 'http://localhost:3000/base' | (string & {});\n};\n\n/**\n * Model with number-only name\n */\nexport type _400 = string;\n\n/**\n * External ref to shared model (A)\n */\nexport type ExternalRefA = ExternalSharedModel;\n\n/**\n * External ref to shared model (B)\n */\nexport type ExternalRefB = ExternalSharedModel;\n\n/**\n * Testing multiline comments in string: First line\n * Second line\n *\n * Fourth line\n */\nexport type CamelCaseCommentWithBreaks = number;\n\n/**\n * Testing multiline comments in string: First line\n * Second line\n *\n * Fourth line\n */\nexport type CommentWithBreaks = number;\n\n/**\n * Testing backticks in string: `backticks` and ```multiple backticks``` should work\n */\nexport type CommentWithBackticks = number;\n\n/**\n * Testing backticks and quotes in string: `backticks`, 'quotes', \"double quotes\" and ```multiple backticks``` should work\n */\nexport type CommentWithBackticksAndQuotes = number;\n\n/**\n * Testing slashes in string: \\backwards\\\\\\ and /forwards/// should work\n */\nexport type CommentWithSlashes = number;\n\n/**\n * Testing expression placeholders in string: ${expression} should work\n */\nexport type CommentWithExpressionPlaceholders = number;\n\n/**\n * Testing quotes in string: 'single quote''' and \"double quotes\"\"\" should work\n */\nexport type CommentWithQuotes = number;\n\n/**\n * Testing reserved characters in string: * inline * and ** inline ** should work\n */\nexport type CommentWithReservedCharacters = number;\n\n/**\n * This is a simple number\n */\nexport type SimpleInteger = number;\n\n/**\n * This is a simple boolean\n */\nexport type SimpleBoolean = boolean;\n\n/**\n * This is a simple string\n */\nexport type SimpleString = string;\n\n/**\n * A string with non-ascii (unicode) characters valid in typescript identifiers (æøåÆØÅöÔèÈ字符串)\n */\nexport type NonAsciiStringæøåÆøÅöôêÊ字符串 = string;\n\n/**\n * This is a simple file\n */\nexport type SimpleFile = Blob | File;\n\n/**\n * This is a simple reference\n */\nexport type SimpleReference = ModelWithString;\n\n/**\n * This is a simple string\n */\nexport type SimpleStringWithPattern = string | null;\n\n/**\n * This is a simple enum with strings\n */\nexport type EnumWithStrings = 'Success' | 'Warning' | 'Error' | '\\'Single Quote\\'' | '\"Double Quotes\"' | 'Non-ascii: øæåôöØÆÅÔÖ字符串';\n\nexport type EnumWithReplacedCharacters = '\\'Single Quote\\'' | '\"Double Quotes\"' | 'øæåôöØÆÅÔÖ字符串' | 3.1 | '';\n\n/**\n * This is a simple enum with numbers\n */\nexport type EnumWithNumbers = 1 | 2 | 3 | 1.1 | 1.2 | 1.3 | 100 | 200 | 300 | -100 | -200 | -300 | -1.1 | -1.2 | -1.3;\n\n/**\n * Success=1,Warning=2,Error=3\n */\nexport type EnumFromDescription = number;\n\n/**\n * This is a simple enum with numbers\n */\nexport type EnumWithExtensions = 200 | 400 | 500;\n\nexport type EnumWithXEnumNames = 0 | 1 | 2;\n\n/**\n * This is a simple array with numbers\n */\nexport type ArrayWithNumbers = Array<number>;\n\n/**\n * This is a simple array with booleans\n */\nexport type ArrayWithBooleans = Array<boolean>;\n\n/**\n * This is a simple array with strings\n */\nexport type ArrayWithStrings = Array<string>;\n\n/**\n * This is a simple array with references\n */\nexport type ArrayWithReferences = Array<ModelWithString>;\n\n/**\n * This is a simple array containing an array\n */\nexport type ArrayWithArray = Array<Array<ModelWithString>>;\n\n/**\n * This is a simple array with properties\n */\nexport type ArrayWithProperties = Array<{\n    '16x16'?: CamelCaseCommentWithBreaks;\n    bar?: string;\n}>;\n\n/**\n * This is a simple array with any of properties\n */\nexport type ArrayWithAnyOfProperties = Array<{\n    foo?: string;\n} | {\n    bar?: string;\n}>;\n\nexport type AnyOfAnyAndNull = {\n    data?: unknown | null;\n};\n\n/**\n * This is a simple array with any of properties\n */\nexport type AnyOfArrays = {\n    results?: Array<{\n        foo?: string;\n    } | {\n        bar?: string;\n    }>;\n};\n\n/**\n * This is a string dictionary\n */\nexport type DictionaryWithString = {\n    [key: string]: string;\n};\n\nexport type DictionaryWithPropertiesAndAdditionalProperties = {\n    foo?: number;\n    bar?: boolean;\n    [key: string]: string | number | boolean | undefined;\n};\n\n/**\n * This is a string reference\n */\nexport type DictionaryWithReference = {\n    [key: string]: ModelWithString;\n};\n\n/**\n * This is a complex dictionary\n */\nexport type DictionaryWithArray = {\n    [key: string]: Array<ModelWithString>;\n};\n\n/**\n * This is a string dictionary\n */\nexport type DictionaryWithDictionary = {\n    [key: string]: {\n        [key: string]: string;\n    };\n};\n\n/**\n * This is a complex dictionary\n */\nexport type DictionaryWithProperties = {\n    [key: string]: {\n        foo?: string;\n        bar?: string;\n    };\n};\n\n/**\n * This is a model with one number property\n */\nexport type ModelWithInteger = {\n    /**\n     * This is a simple number property\n     */\n    prop?: number;\n};\n\n/**\n * This is a model with one boolean property\n */\nexport type ModelWithBoolean = {\n    /**\n     * This is a simple boolean property\n     */\n    prop?: boolean;\n};\n\n/**\n * This is a model with one string property\n */\nexport type ModelWithString = {\n    /**\n     * This is a simple string property\n     */\n    prop?: string;\n};\n\n/**\n * This is a model with one string property\n */\nexport type ModelWithStringError = {\n    /**\n     * This is a simple string property\n     */\n    prop?: string;\n};\n\n/**\n * `Comment` or `VoiceComment`. The JSON object for adding voice comments to tickets is different. See [Adding voice comments to tickets](/documentation/ticketing/managing-tickets/adding-voice-comments-to-tickets)\n */\nexport type ModelFromZendesk = string;\n\n/**\n * This is a model with one string property\n */\nexport type ModelWithNullableString = {\n    /**\n     * This is a simple string property\n     */\n    nullableProp1?: string | null;\n    /**\n     * This is a simple string property\n     */\n    nullableRequiredProp1: string | null;\n    /**\n     * This is a simple string property\n     */\n    nullableProp2?: string | null;\n    /**\n     * This is a simple string property\n     */\n    nullableRequiredProp2: string | null;\n    /**\n     * This is a simple enum with strings\n     */\n    'foo_bar-enum'?: 'Success' | 'Warning' | 'Error' | 'ØÆÅ字符串';\n};\n\n/**\n * This is a model with one enum\n */\nexport type ModelWithEnum = {\n    /**\n     * This is a simple enum with strings\n     */\n    'foo_bar-enum'?: 'Success' | 'Warning' | 'Error' | 'ØÆÅ字符串';\n    /**\n     * These are the HTTP error code enums\n     */\n    statusCode?: '100' | '200 FOO' | '300 FOO_BAR' | '400 foo-bar' | '500 foo.bar' | '600 foo&bar';\n    /**\n     * Simple boolean enum\n     */\n    bool?: true;\n};\n\n/**\n * This is a model with one enum with escaped name\n */\nexport type ModelWithEnumWithHyphen = {\n    /**\n     * Foo-Bar-Baz-Qux\n     */\n    'foo-bar-baz-qux'?: '3.0';\n};\n\n/**\n * This is a model with one enum\n */\nexport type ModelWithEnumFromDescription = {\n    /**\n     * Success=1,Warning=2,Error=3\n     */\n    test?: number;\n};\n\n/**\n * This is a model with nested enums\n */\nexport type ModelWithNestedEnums = {\n    dictionaryWithEnum?: {\n        [key: string]: 'Success' | 'Warning' | 'Error';\n    };\n    dictionaryWithEnumFromDescription?: {\n        [key: string]: number;\n    };\n    arrayWithEnum?: Array<'Success' | 'Warning' | 'Error'>;\n    arrayWithDescription?: Array<number>;\n    /**\n     * This is a simple enum with strings\n     */\n    'foo_bar-enum'?: 'Success' | 'Warning' | 'Error' | 'ØÆÅ字符串';\n};\n\n/**\n * This is a model with one property containing a reference\n */\nexport type ModelWithReference = {\n    prop?: ModelWithProperties;\n};\n\n/**\n * This is a model with one property containing an array\n */\nexport type ModelWithArrayReadOnlyAndWriteOnly = {\n    prop?: Array<ModelWithReadOnlyAndWriteOnly>;\n    propWithFile?: Array<Blob | File>;\n    propWithNumber?: Array<number>;\n};\n\n/**\n * This is a model with one property containing an array\n */\nexport type ModelWithArray = {\n    prop?: Array<ModelWithString>;\n    propWithFile?: Array<Blob | File>;\n    propWithNumber?: Array<number>;\n};\n\n/**\n * This is a model with one property containing a dictionary\n */\nexport type ModelWithDictionary = {\n    prop?: {\n        [key: string]: string;\n    };\n};\n\n/**\n * This is a deprecated model with a deprecated property\n *\n * @deprecated\n */\nexport type DeprecatedModel = {\n    /**\n     * This is a deprecated property\n     *\n     * @deprecated\n     */\n    prop?: string;\n};\n\n/**\n * This is a model with one property containing a circular reference\n */\nexport type ModelWithCircularReference = {\n    prop?: ModelWithCircularReference;\n};\n\n/**\n * This is a model with one property with a 'one of' relationship\n */\nexport type CompositionWithOneOf = {\n    propA?: ModelWithString | ModelWithEnum | ModelWithArray | ModelWithDictionary;\n};\n\n/**\n * This is a model with one property with a 'one of' relationship where the options are not $ref\n */\nexport type CompositionWithOneOfAnonymous = {\n    propA?: {\n        propA?: string;\n    } | string | number;\n};\n\n/**\n * Circle\n */\nexport type ModelCircle = {\n    kind: string;\n    radius?: number;\n};\n\n/**\n * Square\n */\nexport type ModelSquare = {\n    kind: string;\n    sideLength?: number;\n};\n\n/**\n * This is a model with one property with a 'one of' relationship where the options are not $ref\n */\nexport type CompositionWithOneOfDiscriminator = ({\n    kind: 'circle';\n} & ModelCircle) | ({\n    kind: 'square';\n} & ModelSquare);\n\n/**\n * This is a model with one property with a 'any of' relationship\n */\nexport type CompositionWithAnyOf = {\n    propA?: ModelWithString | ModelWithEnum | ModelWithArray | ModelWithDictionary;\n};\n\n/**\n * This is a model with one property with a 'any of' relationship where the options are not $ref\n */\nexport type CompositionWithAnyOfAnonymous = {\n    propA?: {\n        propA?: string;\n    } | string | number;\n};\n\n/**\n * This is a model with nested 'any of' property with a type null\n */\nexport type CompositionWithNestedAnyAndTypeNull = {\n    propA?: Array<ModelWithDictionary | null> | Array<ModelWithArray | null>;\n};\n\nexport type _3eNum1Период = 'Bird' | 'Dog';\n\nexport type ConstValue = 'ConstValue';\n\n/**\n * This is a model with one property with a 'any of' relationship where the options are not $ref\n */\nexport type CompositionWithNestedAnyOfAndNull = {\n    /**\n     * Scopes\n     */\n    propA?: Array<_3eNum1Период | ConstValue> | null;\n};\n\n/**\n * This is a model with one property with a 'one of' relationship\n */\nexport type CompositionWithOneOfAndNullable = {\n    propA?: {\n        boolean?: boolean;\n    } | ModelWithEnum | ModelWithArray | ModelWithDictionary | null;\n};\n\n/**\n * This is a model that contains a simple dictionary within composition\n */\nexport type CompositionWithOneOfAndSimpleDictionary = {\n    propA?: boolean | {\n        [key: string]: number;\n    };\n};\n\n/**\n * This is a model that contains a dictionary of simple arrays within composition\n */\nexport type CompositionWithOneOfAndSimpleArrayDictionary = {\n    propA?: boolean | {\n        [key: string]: Array<boolean>;\n    };\n};\n\n/**\n * This is a model that contains a dictionary of complex arrays (composited) within composition\n */\nexport type CompositionWithOneOfAndComplexArrayDictionary = {\n    propA?: boolean | {\n        [key: string]: Array<number | string>;\n    };\n};\n\n/**\n * This is a model with one property with a 'all of' relationship\n */\nexport type CompositionWithAllOfAndNullable = {\n    propA?: ({\n        boolean?: boolean;\n    } & ModelWithEnum & ModelWithArray & ModelWithDictionary) | null;\n};\n\n/**\n * This is a model with one property with a 'any of' relationship\n */\nexport type CompositionWithAnyOfAndNullable = {\n    propA?: {\n        boolean?: boolean;\n    } | ModelWithEnum | ModelWithArray | ModelWithDictionary | null;\n};\n\n/**\n * This is a base model with two simple optional properties\n */\nexport type CompositionBaseModel = {\n    firstName?: string;\n    lastname?: string;\n};\n\n/**\n * This is a model that extends the base model\n */\nexport type CompositionExtendedModel = CompositionBaseModel & {\n    age: number;\n    firstName: string;\n    lastname: string;\n};\n\n/**\n * This is a model with one nested property\n */\nexport type ModelWithProperties = {\n    required: string;\n    readonly requiredAndReadOnly: string;\n    requiredAndNullable: string | null;\n    string?: string;\n    number?: number;\n    boolean?: boolean;\n    reference?: ModelWithString;\n    'property with space'?: string;\n    default?: string;\n    try?: string;\n    readonly '@namespace.string'?: string;\n    readonly '@namespace.integer'?: number;\n};\n\n/**\n * This is a model with one nested property\n */\nexport type ModelWithNestedProperties = {\n    readonly first: {\n        readonly second: {\n            readonly third: string | null;\n        } | null;\n    } | null;\n};\n\n/**\n * This is a model with duplicated properties\n */\nexport type ModelWithDuplicateProperties = {\n    prop?: ModelWithString;\n};\n\n/**\n * This is a model with ordered properties\n */\nexport type ModelWithOrderedProperties = {\n    zebra?: string;\n    apple?: string;\n    hawaii?: string;\n};\n\n/**\n * This is a model with duplicated imports\n */\nexport type ModelWithDuplicateImports = {\n    propA?: ModelWithString;\n    propB?: ModelWithString;\n    propC?: ModelWithString;\n};\n\n/**\n * This is a model that extends another model\n */\nexport type ModelThatExtends = ModelWithString & {\n    propExtendsA?: string;\n    propExtendsB?: ModelWithString;\n};\n\n/**\n * This is a model that extends another model\n */\nexport type ModelThatExtendsExtends = ModelWithString & ModelThatExtends & {\n    propExtendsC?: string;\n    propExtendsD?: ModelWithString;\n};\n\n/**\n * This is a model that contains a some patterns\n */\nexport type ModelWithPattern = {\n    key: string;\n    name: string;\n    readonly enabled?: boolean;\n    readonly modified?: string;\n    id?: string;\n    text?: string;\n    patternWithSingleQuotes?: string;\n    patternWithNewline?: string;\n    patternWithBacktick?: string;\n    patternWithUnicode?: string;\n};\n\nexport type File = {\n    /**\n     * Id\n     */\n    readonly id?: string;\n    /**\n     * Updated at\n     */\n    readonly updated_at?: string;\n    /**\n     * Created at\n     */\n    readonly created_at?: string;\n    /**\n     * Mime\n     */\n    mime: string;\n    /**\n     * File\n     */\n    readonly file?: string;\n};\n\nexport type Default = {\n    name?: string;\n};\n\nexport type Pageable = {\n    page?: number;\n    size?: number;\n    sort?: Array<string>;\n};\n\n/**\n * This is a free-form object without additionalProperties.\n */\nexport type FreeFormObjectWithoutAdditionalProperties = {\n    [key: string]: unknown;\n};\n\n/**\n * This is a free-form object with additionalProperties: true.\n */\nexport type FreeFormObjectWithAdditionalPropertiesEqTrue = {\n    [key: string]: unknown;\n};\n\n/**\n * This is a free-form object with additionalProperties: {}.\n */\nexport type FreeFormObjectWithAdditionalPropertiesEqEmptyObject = {\n    [key: string]: unknown;\n};\n\nexport type ModelWithConst = {\n    String?: 'String';\n    number?: 0;\n    null?: null;\n    withType?: 'Some string';\n};\n\n/**\n * This is a model with one property and additionalProperties: true\n */\nexport type ModelWithAdditionalPropertiesEqTrue = {\n    /**\n     * This is a simple string property\n     */\n    prop?: string;\n    [key: string]: unknown;\n};\n\nexport type NestedAnyOfArraysNullable = {\n    nullableArray?: Array<string | boolean> | null;\n};\n\nexport type CompositionWithOneOfAndProperties = ({\n    foo: SimpleParameter;\n} | {\n    bar: NonAsciiStringæøåÆøÅöôêÊ字符串;\n}) & {\n    baz: number | null;\n    qux: number;\n};\n\n/**\n * An object that can be null\n */\nexport type NullableObject = {\n    foo?: string;\n} | null;\n\n/**\n * Some % character\n */\nexport type CharactersInDescription = string;\n\nexport type ModelWithNullableObject = {\n    data?: NullableObject;\n};\n\n/**\n * An object with additional properties that can be null (anyOf ref + null)\n */\nexport type ModelWithAdditionalPropertiesRef = {\n    [key: string]: NullableObject | null;\n};\n\nexport type ModelWithOneOfEnum = {\n    foo: 'Bar';\n} | {\n    foo: 'Baz';\n} | {\n    foo: 'Qux';\n} | {\n    content: string;\n    foo: 'Quux';\n} | {\n    content: [\n        string,\n        string\n    ];\n    foo: 'Corge';\n};\n\nexport type ModelWithNestedArrayEnumsDataFoo = 'foo' | 'bar';\n\nexport type ModelWithNestedArrayEnumsDataBar = 'baz' | 'qux';\n\nexport type ModelWithNestedArrayEnumsData = {\n    foo?: Array<ModelWithNestedArrayEnumsDataFoo>;\n    bar?: Array<ModelWithNestedArrayEnumsDataBar>;\n};\n\nexport type ModelWithNestedArrayEnums = {\n    array_strings?: Array<string>;\n    data?: ModelWithNestedArrayEnumsData;\n};\n\nexport type ModelWithNestedCompositionEnums = {\n    foo?: ModelWithNestedArrayEnumsDataFoo;\n};\n\nexport type ModelWithReadOnlyAndWriteOnly = {\n    foo: string;\n    readonly bar: string;\n};\n\nexport type ModelWithConstantSizeArray = [\n    number,\n    number\n];\n\nexport type ModelWithAnyOfConstantSizeArray = [\n    number | string,\n    number | string,\n    number | string\n];\n\nexport type ModelWithPrefixItemsConstantSizeArray = [\n    ModelWithInteger,\n    number | string,\n    string\n];\n\nexport type ModelWithAnyOfConstantSizeArrayNullable = [\n    number | null | string,\n    number | null | string,\n    number | null | string\n];\n\nexport type ModelWithAnyOfConstantSizeArrayWithNSizeAndOptions = [\n    number | Import,\n    number | Import\n];\n\nexport type ModelWithAnyOfConstantSizeArrayAndIntersect = [\n    number & string,\n    number & string\n];\n\nexport type ModelWithNumericEnumUnion = {\n    /**\n     * Период\n     */\n    value?: -10 | -1 | 0 | 1 | 3 | 6 | 12;\n};\n\n/**\n * Some description with `back ticks`\n */\nexport type ModelWithBackticksInDescription = {\n    /**\n     * The template `that` should be used for parsing and importing the contents of the CSV file.\n     *\n     * <br/><p>There is one placeholder currently supported:<ul>     <li><b>${x}</b> - refers to the n-th column in the CSV file, e.g. ${1}, ${2}, ...)</li></ul><p>Example of a correct JSON template:</p>\n     * <pre>\n     * [\n     * {\n     * \"resourceType\": \"Asset\",\n     * \"identifier\": {\n     * \"name\": \"${1}\",\n     * \"domain\": {\n     * \"name\": \"${2}\",\n     * \"community\": {\n     * \"name\": \"Some Community\"\n     * }\n     * }\n     * },\n     * \"attributes\" : {\n     * \"00000000-0000-0000-0000-000000003115\" : [ {\n     * \"value\" : \"${3}\"\n     * } ],\n     * \"00000000-0000-0000-0000-000000000222\" : [ {\n     * \"value\" : \"${4}\"\n     * } ]\n     * }\n     * }\n     * ]\n     * </pre>\n     */\n    template?: string;\n};\n\nexport type ModelWithOneOfAndProperties = (SimpleParameter | NonAsciiStringæøåÆøÅöôêÊ字符串) & {\n    baz: number | null;\n    qux: number;\n};\n\n/**\n * Model used to test deduplication strategy (unused)\n */\nexport type ParameterSimpleParameterUnused = string;\n\n/**\n * Model used to test deduplication strategy\n */\nexport type PostServiceWithEmptyTagResponse = string;\n\n/**\n * Model used to test deduplication strategy\n */\nexport type PostServiceWithEmptyTagResponse2 = string;\n\n/**\n * Model used to test deduplication strategy\n */\nexport type DeleteFooData = string;\n\n/**\n * Model used to test deduplication strategy\n */\nexport type DeleteFooData2 = string;\n\n/**\n * Model with restricted keyword name\n */\nexport type Import = string;\n\nexport type SchemaWithFormRestrictedKeys = {\n    description?: string;\n    'x-enum-descriptions'?: string;\n    'x-enum-varnames'?: string;\n    'x-enumNames'?: string;\n    title?: string;\n    object?: {\n        description?: string;\n        'x-enum-descriptions'?: string;\n        'x-enum-varnames'?: string;\n        'x-enumNames'?: string;\n        title?: string;\n    };\n    array?: Array<{\n        description?: string;\n        'x-enum-descriptions'?: string;\n        'x-enum-varnames'?: string;\n        'x-enumNames'?: string;\n        title?: string;\n    }>;\n};\n\n/**\n * This schema was giving PascalCase transformations a hard time\n */\nexport type IoK8sApimachineryPkgApisMetaV1DeleteOptions = {\n    /**\n     * Must be fulfilled before a deletion is carried out. If not possible, a 409 Conflict status will be returned.\n     */\n    preconditions?: IoK8sApimachineryPkgApisMetaV1Preconditions;\n};\n\n/**\n * This schema was giving PascalCase transformations a hard time\n */\nexport type IoK8sApimachineryPkgApisMetaV1Preconditions = {\n    /**\n     * Specifies the target ResourceVersion\n     */\n    resourceVersion?: string;\n    /**\n     * Specifies the target UID.\n     */\n    uid?: string;\n};\n\nexport type AdditionalPropertiesUnknownIssue = {\n    [key: string]: string | number;\n};\n\nexport type AdditionalPropertiesUnknownIssue2 = {\n    [key: string]: string | number;\n};\n\nexport type AdditionalPropertiesUnknownIssue3 = string & {\n    entries: {\n        [key: string]: AdditionalPropertiesUnknownIssue;\n    };\n};\n\nexport type AdditionalPropertiesIntegerIssue = {\n    value: number;\n    [key: string]: number;\n};\n\nexport type OneOfAllOfIssue = ((ConstValue | GenericSchemaDuplicateIssue1SystemBoolean) & _3eNum1Период) | GenericSchemaDuplicateIssue1SystemString;\n\nexport type GenericSchemaDuplicateIssue1SystemBoolean = {\n    item?: boolean;\n    error?: string | null;\n    readonly hasError?: boolean;\n    data?: {\n        [key: string]: never;\n    };\n};\n\nexport type GenericSchemaDuplicateIssue1SystemString = {\n    item?: string | null;\n    error?: string | null;\n    readonly hasError?: boolean;\n};\n\nexport type ExternalSharedModel = {\n    id: string;\n    name?: string;\n};\n\n/**\n * This is a model with one property containing a reference\n */\nexport type ModelWithReferenceWritable = {\n    prop?: ModelWithPropertiesWritable;\n};\n\n/**\n * This is a model with one property containing an array\n */\nexport type ModelWithArrayReadOnlyAndWriteOnlyWritable = {\n    prop?: Array<ModelWithReadOnlyAndWriteOnlyWritable>;\n    propWithFile?: Array<Blob | File>;\n    propWithNumber?: Array<number>;\n};\n\n/**\n * This is a model with one nested property\n */\nexport type ModelWithPropertiesWritable = {\n    required: string;\n    requiredAndNullable: string | null;\n    string?: string;\n    number?: number;\n    boolean?: boolean;\n    reference?: ModelWithString;\n    'property with space'?: string;\n    default?: string;\n    try?: string;\n};\n\n/**\n * This is a model that contains a some patterns\n */\nexport type ModelWithPatternWritable = {\n    key: string;\n    name: string;\n    id?: string;\n    text?: string;\n    patternWithSingleQuotes?: string;\n    patternWithNewline?: string;\n    patternWithBacktick?: string;\n    patternWithUnicode?: string;\n};\n\nexport type FileWritable = {\n    /**\n     * Mime\n     */\n    mime: string;\n};\n\nexport type ModelWithReadOnlyAndWriteOnlyWritable = {\n    foo: string;\n    baz: string;\n};\n\nexport type ModelWithAnyOfConstantSizeArrayWithNSizeAndOptionsWritable = [\n    number | Import,\n    number | Import\n];\n\nexport type AdditionalPropertiesUnknownIssueWritable = {\n    [key: string]: string | number;\n};\n\nexport type OneOfAllOfIssueWritable = ((ConstValue | GenericSchemaDuplicateIssue1SystemBoolean) & _3eNum1Период) | GenericSchemaDuplicateIssue1SystemString;\n\nexport type GenericSchemaDuplicateIssue1SystemBooleanWritable = {\n    item?: boolean;\n    error?: string | null;\n    data?: {\n        [key: string]: never;\n    };\n};\n\nexport type GenericSchemaDuplicateIssue1SystemStringWritable = {\n    item?: string | null;\n    error?: string | null;\n};\n\n/**\n * This is a reusable parameter\n */\nexport type SimpleParameter = string;\n\n/**\n * Parameter with illegal characters\n */\nexport type XFooBar = ModelWithString;\n\n/**\n * A reusable request body\n */\nexport type SimpleRequestBody = ModelWithString;\n\n/**\n * A reusable request body\n */\nexport type SimpleFormData = ModelWithString;\n\nexport type ExportData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no+tag';\n};\n\nexport type PatchApiVbyApiVersionNoTagData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no+tag';\n};\n\nexport type PatchApiVbyApiVersionNoTagResponses = {\n    /**\n     * OK\n     */\n    default: unknown;\n};\n\nexport type ImportData = {\n    body: ModelWithReadOnlyAndWriteOnlyWritable | ModelWithArrayReadOnlyAndWriteOnlyWritable;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no+tag';\n};\n\nexport type ImportResponses = {\n    /**\n     * Success\n     */\n    200: ModelFromZendesk;\n    /**\n     * Default success response\n     */\n    default: ModelWithReadOnlyAndWriteOnly;\n};\n\nexport type ImportResponse = ImportResponses[keyof ImportResponses];\n\nexport type FooWowData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no+tag';\n};\n\nexport type FooWowResponses = {\n    /**\n     * OK\n     */\n    default: unknown;\n};\n\nexport type ApiVVersionODataControllerCountData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple/$count';\n};\n\nexport type ApiVVersionODataControllerCountResponses = {\n    /**\n     * Success\n     */\n    200: ModelFromZendesk;\n};\n\nexport type ApiVVersionODataControllerCountResponse = ApiVVersionODataControllerCountResponses[keyof ApiVVersionODataControllerCountResponses];\n\nexport type GetApiVbyApiVersionSimpleOperationData = {\n    body?: never;\n    path: {\n        /**\n         * foo in method\n         */\n        foo_param: string;\n    };\n    query?: never;\n    url: '/api/v{api-version}/simple:operation';\n};\n\nexport type GetApiVbyApiVersionSimpleOperationErrors = {\n    /**\n     * Default error response\n     */\n    default: ModelWithBoolean;\n};\n\nexport type GetApiVbyApiVersionSimpleOperationError = GetApiVbyApiVersionSimpleOperationErrors[keyof GetApiVbyApiVersionSimpleOperationErrors];\n\nexport type GetApiVbyApiVersionSimpleOperationResponses = {\n    /**\n     * Response is a simple number\n     */\n    200: number;\n};\n\nexport type GetApiVbyApiVersionSimpleOperationResponse = GetApiVbyApiVersionSimpleOperationResponses[keyof GetApiVbyApiVersionSimpleOperationResponses];\n\nexport type DeleteCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type GetCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type HeadCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type OptionsCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type PatchCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type PostCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type PutCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type DeleteFooData3 = {\n    body?: never;\n    headers: {\n        /**\n         * Parameter with illegal characters\n         */\n        'x-Foo-Bar': ModelWithString;\n    };\n    path: {\n        /**\n         * foo in method\n         */\n        foo_param: string;\n        /**\n         * bar in method\n         */\n        BarParam: string;\n    };\n    query?: never;\n    url: '/api/v{api-version}/foo/{foo_param}/bar/{BarParam}';\n};\n\nexport type CallWithDescriptionsData = {\n    body?: never;\n    path?: never;\n    query?: {\n        /**\n         * Testing multiline comments in string: First line\n         * Second line\n         *\n         * Fourth line\n         */\n        parameterWithBreaks?: string;\n        /**\n         * Testing backticks in string: `backticks` and ```multiple backticks``` should work\n         */\n        parameterWithBackticks?: string;\n        /**\n         * Testing slashes in string: \\backwards\\\\\\ and /forwards/// should work\n         */\n        parameterWithSlashes?: string;\n        /**\n         * Testing expression placeholders in string: ${expression} should work\n         */\n        parameterWithExpressionPlaceholders?: string;\n        /**\n         * Testing quotes in string: 'single quote''' and \"double quotes\"\"\" should work\n         */\n        parameterWithQuotes?: string;\n        /**\n         * Testing reserved characters in string: * inline * and ** inline ** should work\n         */\n        parameterWithReservedCharacters?: string;\n    };\n    url: '/api/v{api-version}/descriptions';\n};\n\nexport type DeprecatedCallData = {\n    body?: never;\n    headers: {\n        /**\n         * This parameter is deprecated\n         *\n         * @deprecated\n         */\n        parameter: DeprecatedModel | null;\n    };\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/parameters/deprecated';\n};\n\nexport type CallWithParametersData = {\n    /**\n     * This is the parameter that goes into the body\n     */\n    body: {\n        [key: string]: unknown;\n    } | null;\n    headers: {\n        /**\n         * This is the parameter that goes into the header\n         */\n        parameterHeader: string | null;\n    };\n    path: {\n        /**\n         * This is the parameter that goes into the path\n         */\n        parameterPath: string | null;\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string | null;\n    };\n    query: {\n        foo_ref_enum?: ModelWithNestedArrayEnumsDataFoo;\n        foo_all_of_enum: ModelWithNestedArrayEnumsDataFoo;\n        /**\n         * This is the parameter that goes into the query params\n         */\n        cursor: string | null;\n    };\n    url: '/api/v{api-version}/parameters/{parameterPath}';\n};\n\nexport type CallWithWeirdParameterNamesData = {\n    /**\n     * This is the parameter that goes into the body\n     */\n    body: ModelWithString | null;\n    headers: {\n        /**\n         * This is the parameter that goes into the request header\n         */\n        'parameter.header': string | null;\n    };\n    path: {\n        /**\n         * This is the parameter that goes into the path\n         */\n        'parameter.path.1'?: string;\n        /**\n         * This is the parameter that goes into the path\n         */\n        'parameter-path-2'?: string;\n        /**\n         * This is the parameter that goes into the path\n         */\n        'PARAMETER-PATH-3'?: string;\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string | null;\n    };\n    query: {\n        /**\n         * This is the parameter with a reserved keyword\n         */\n        default?: string;\n        /**\n         * This is the parameter that goes into the request query params\n         */\n        'parameter-query': string | null;\n    };\n    url: '/api/v{api-version}/parameters/{parameter.path.1}/{parameter-path-2}/{PARAMETER-PATH-3}';\n};\n\nexport type GetCallWithOptionalParamData = {\n    /**\n     * This is a required parameter\n     */\n    body: ModelWithOneOfEnum;\n    path?: never;\n    query?: {\n        /**\n         * This is an optional parameter\n         */\n        page?: number;\n    };\n    url: '/api/v{api-version}/parameters';\n};\n\nexport type PostCallWithOptionalParamData = {\n    /**\n     * This is an optional parameter\n     */\n    body?: {\n        offset?: number | null;\n    };\n    path?: never;\n    query: {\n        /**\n         * This is a required parameter\n         */\n        parameter: Pageable;\n    };\n    url: '/api/v{api-version}/parameters';\n};\n\nexport type PostCallWithOptionalParamResponses = {\n    /**\n     * Response is a simple number\n     */\n    200: number;\n    /**\n     * Success\n     */\n    204: void;\n};\n\nexport type PostCallWithOptionalParamResponse = PostCallWithOptionalParamResponses[keyof PostCallWithOptionalParamResponses];\n\nexport type PostApiVbyApiVersionRequestBodyData = {\n    /**\n     * A reusable request body\n     */\n    body?: SimpleRequestBody;\n    path?: never;\n    query?: {\n        /**\n         * This is a reusable parameter\n         */\n        parameter?: string;\n    };\n    url: '/api/v{api-version}/requestBody';\n};\n\nexport type PostApiVbyApiVersionFormDataData = {\n    /**\n     * A reusable request body\n     */\n    body?: SimpleFormData;\n    path?: never;\n    query?: {\n        /**\n         * This is a reusable parameter\n         */\n        parameter?: string;\n    };\n    url: '/api/v{api-version}/formData';\n};\n\nexport type CallWithDefaultParametersData = {\n    body?: never;\n    path?: never;\n    query?: {\n        /**\n         * This is a simple string with default value\n         */\n        parameterString?: string | null;\n        /**\n         * This is a simple number with default value\n         */\n        parameterNumber?: number | null;\n        /**\n         * This is a simple boolean with default value\n         */\n        parameterBoolean?: boolean | null;\n        /**\n         * This is a simple enum with default value\n         */\n        parameterEnum?: 'Success' | 'Warning' | 'Error';\n        /**\n         * This is a simple model with default value\n         */\n        parameterModel?: ModelWithString | null;\n    };\n    url: '/api/v{api-version}/defaults';\n};\n\nexport type CallWithDefaultOptionalParametersData = {\n    body?: never;\n    path?: never;\n    query?: {\n        /**\n         * This is a simple string that is optional with default value\n         */\n        parameterString?: string;\n        /**\n         * This is a simple number that is optional with default value\n         */\n        parameterNumber?: number;\n        /**\n         * This is a simple boolean that is optional with default value\n         */\n        parameterBoolean?: boolean;\n        /**\n         * This is a simple enum that is optional with default value\n         */\n        parameterEnum?: 'Success' | 'Warning' | 'Error';\n        /**\n         * This is a simple model that is optional with default value\n         */\n        parameterModel?: ModelWithString;\n    };\n    url: '/api/v{api-version}/defaults';\n};\n\nexport type CallToTestOrderOfParamsData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * This is a optional string with default\n         */\n        parameterOptionalStringWithDefault?: string;\n        /**\n         * This is a optional string with empty default\n         */\n        parameterOptionalStringWithEmptyDefault?: string;\n        /**\n         * This is a optional string with no default\n         */\n        parameterOptionalStringWithNoDefault?: string;\n        /**\n         * This is a string with default\n         */\n        parameterStringWithDefault: string;\n        /**\n         * This is a string with empty default\n         */\n        parameterStringWithEmptyDefault: string;\n        /**\n         * This is a string with no default\n         */\n        parameterStringWithNoDefault: string;\n        /**\n         * This is a string that can be null with no default\n         */\n        parameterStringNullableWithNoDefault?: string | null;\n        /**\n         * This is a string that can be null with default\n         */\n        parameterStringNullableWithDefault?: string | null;\n    };\n    url: '/api/v{api-version}/defaults';\n};\n\nexport type DuplicateNameData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/duplicate';\n};\n\nexport type DuplicateName2Data = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/duplicate';\n};\n\nexport type DuplicateName3Data = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/duplicate';\n};\n\nexport type DuplicateName4Data = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/duplicate';\n};\n\nexport type CallWithNoContentResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no-content';\n};\n\nexport type CallWithNoContentResponseResponses = {\n    /**\n     * Success\n     */\n    204: void;\n};\n\nexport type CallWithNoContentResponseResponse = CallWithNoContentResponseResponses[keyof CallWithNoContentResponseResponses];\n\nexport type CallWithResponseAndNoContentResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multiple-tags/response-and-no-content';\n};\n\nexport type CallWithResponseAndNoContentResponseResponses = {\n    /**\n     * Response is a simple number\n     */\n    200: number;\n    /**\n     * Success\n     */\n    204: void;\n};\n\nexport type CallWithResponseAndNoContentResponseResponse = CallWithResponseAndNoContentResponseResponses[keyof CallWithResponseAndNoContentResponseResponses];\n\nexport type DummyAData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multiple-tags/a';\n};\n\nexport type DummyAResponses = {\n    200: _400;\n};\n\nexport type DummyAResponse = DummyAResponses[keyof DummyAResponses];\n\nexport type DummyBData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multiple-tags/b';\n};\n\nexport type DummyBResponses = {\n    /**\n     * Success\n     */\n    204: void;\n};\n\nexport type DummyBResponse = DummyBResponses[keyof DummyBResponses];\n\nexport type CallWithResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/response';\n};\n\nexport type CallWithResponseResponses = {\n    default: Import;\n};\n\nexport type CallWithResponseResponse = CallWithResponseResponses[keyof CallWithResponseResponses];\n\nexport type CallWithDuplicateResponsesData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/response';\n};\n\nexport type CallWithDuplicateResponsesErrors = {\n    /**\n     * Message for 500 error\n     */\n    500: ModelWithStringError;\n    /**\n     * Message for 501 error\n     */\n    501: ModelWithStringError;\n    /**\n     * Message for 502 error\n     */\n    502: ModelWithStringError;\n    /**\n     * Message for 4XX errors\n     */\n    '4XX': DictionaryWithArray;\n    /**\n     * Default error response\n     */\n    default: ModelWithBoolean;\n};\n\nexport type CallWithDuplicateResponsesError = CallWithDuplicateResponsesErrors[keyof CallWithDuplicateResponsesErrors];\n\nexport type CallWithDuplicateResponsesResponses = {\n    /**\n     * Message for 200 response\n     */\n    200: ModelWithBoolean & ModelWithInteger;\n    /**\n     * Message for 201 response\n     */\n    201: ModelWithString;\n    /**\n     * Message for 202 response\n     */\n    202: ModelWithString;\n};\n\nexport type CallWithDuplicateResponsesResponse = CallWithDuplicateResponsesResponses[keyof CallWithDuplicateResponsesResponses];\n\nexport type CallWithResponsesData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/response';\n};\n\nexport type CallWithResponsesErrors = {\n    /**\n     * Message for 500 error\n     */\n    500: ModelWithStringError;\n    /**\n     * Message for 501 error\n     */\n    501: ModelWithStringError;\n    /**\n     * Message for 502 error\n     */\n    502: ModelWithStringError;\n    /**\n     * Message for default response\n     */\n    default: ModelWithStringError;\n};\n\nexport type CallWithResponsesError = CallWithResponsesErrors[keyof CallWithResponsesErrors];\n\nexport type CallWithResponsesResponses = {\n    /**\n     * Message for 200 response\n     */\n    200: {\n        readonly '@namespace.string'?: string;\n        readonly '@namespace.integer'?: number;\n        readonly value?: Array<ModelWithString>;\n    };\n    /**\n     * Message for 201 response\n     */\n    201: ModelThatExtends;\n    /**\n     * Message for 202 response\n     */\n    202: ModelThatExtendsExtends;\n};\n\nexport type CallWithResponsesResponse = CallWithResponsesResponses[keyof CallWithResponsesResponses];\n\nexport type CollectionFormatData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * This is an array parameter that is sent as csv format (comma-separated values)\n         */\n        parameterArrayCSV: Array<string> | null;\n        /**\n         * This is an array parameter that is sent as ssv format (space-separated values)\n         */\n        parameterArraySSV: Array<string> | null;\n        /**\n         * This is an array parameter that is sent as tsv format (tab-separated values)\n         */\n        parameterArrayTSV: Array<string> | null;\n        /**\n         * This is an array parameter that is sent as pipes format (pipe-separated values)\n         */\n        parameterArrayPipes: Array<string> | null;\n        /**\n         * This is an array parameter that is sent as multi format (multiple parameter instances)\n         */\n        parameterArrayMulti: Array<string> | null;\n    };\n    url: '/api/v{api-version}/collectionFormat';\n};\n\nexport type TypesData = {\n    body?: never;\n    path?: {\n        /**\n         * This is a number parameter\n         */\n        id?: number;\n    };\n    query: {\n        /**\n         * This is a number parameter\n         */\n        parameterNumber: number;\n        /**\n         * This is a string parameter\n         */\n        parameterString: string | null;\n        /**\n         * This is a boolean parameter\n         */\n        parameterBoolean: boolean | null;\n        /**\n         * This is an object parameter\n         */\n        parameterObject: {\n            [key: string]: unknown;\n        } | null;\n        /**\n         * This is an array parameter\n         */\n        parameterArray: Array<string> | null;\n        /**\n         * This is a dictionary parameter\n         */\n        parameterDictionary: {\n            [key: string]: unknown;\n        } | null;\n        /**\n         * This is an enum parameter\n         */\n        parameterEnum: 'Success' | 'Warning' | 'Error' | null;\n    };\n    url: '/api/v{api-version}/types';\n};\n\nexport type TypesResponses = {\n    /**\n     * Response is a simple number\n     */\n    200: number;\n    /**\n     * Response is a simple string\n     */\n    201: string;\n    /**\n     * Response is a simple boolean\n     */\n    202: boolean;\n    /**\n     * Response is a simple object\n     */\n    203: {\n        [key: string]: unknown;\n    };\n};\n\nexport type TypesResponse = TypesResponses[keyof TypesResponses];\n\nexport type UploadFileData = {\n    body: Blob | File;\n    path: {\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string | null;\n    };\n    query?: never;\n    url: '/api/v{api-version}/upload';\n};\n\nexport type UploadFileResponses = {\n    200: boolean;\n};\n\nexport type UploadFileResponse = UploadFileResponses[keyof UploadFileResponses];\n\nexport type FileResponseData = {\n    body?: never;\n    path: {\n        id: string;\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string;\n    };\n    query?: never;\n    url: '/api/v{api-version}/file/{id}';\n};\n\nexport type FileResponseResponses = {\n    /**\n     * Success\n     */\n    200: Blob | File;\n};\n\nexport type FileResponseResponse = FileResponseResponses[keyof FileResponseResponses];\n\nexport type ComplexTypesData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * Parameter containing object\n         */\n        parameterObject: {\n            first?: {\n                second?: {\n                    third?: string;\n                };\n            };\n        };\n        /**\n         * Parameter containing reference\n         */\n        parameterReference: ModelWithString;\n    };\n    url: '/api/v{api-version}/complex';\n};\n\nexport type ComplexTypesErrors = {\n    /**\n     * 400 `server` error\n     */\n    400: unknown;\n    /**\n     * 500 server error\n     */\n    500: unknown;\n};\n\nexport type ComplexTypesResponses = {\n    /**\n     * Successful response\n     */\n    200: Array<ModelWithString>;\n};\n\nexport type ComplexTypesResponse = ComplexTypesResponses[keyof ComplexTypesResponses];\n\nexport type MultipartResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multipart';\n};\n\nexport type MultipartResponseResponses = {\n    /**\n     * OK\n     */\n    200: {\n        file?: Blob | File;\n        metadata?: {\n            foo?: string;\n            bar?: string;\n        };\n    };\n};\n\nexport type MultipartResponseResponse = MultipartResponseResponses[keyof MultipartResponseResponses];\n\nexport type MultipartRequestData = {\n    body?: {\n        content?: Blob | File;\n        data?: ModelWithString | null;\n    };\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multipart';\n};\n\nexport type ComplexParamsData = {\n    body?: {\n        readonly key: string | null;\n        name: string | null;\n        enabled?: boolean;\n        type: 'Monkey' | 'Horse' | 'Bird';\n        listOfModels?: Array<ModelWithString> | null;\n        listOfStrings?: Array<string> | null;\n        parameters: ModelWithString | ModelWithEnum | ModelWithArray | ModelWithDictionary;\n        readonly user?: {\n            readonly id?: number;\n            readonly name?: string | null;\n        };\n    };\n    path: {\n        id: number;\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string;\n    };\n    query?: never;\n    url: '/api/v{api-version}/complex/{id}';\n};\n\nexport type ComplexParamsResponses = {\n    /**\n     * Success\n     */\n    200: ModelWithString;\n};\n\nexport type ComplexParamsResponse = ComplexParamsResponses[keyof ComplexParamsResponses];\n\nexport type CallWithResultFromHeaderData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/header';\n};\n\nexport type CallWithResultFromHeaderErrors = {\n    /**\n     * 400 server error\n     */\n    400: unknown;\n    /**\n     * 500 server error\n     */\n    500: unknown;\n};\n\nexport type CallWithResultFromHeaderResponses = {\n    /**\n     * Successful response\n     */\n    200: unknown;\n};\n\nexport type TestErrorCodeData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * Status code to return\n         */\n        status: number;\n    };\n    url: '/api/v{api-version}/error';\n};\n\nexport type TestErrorCodeErrors = {\n    /**\n     * Custom message: Internal Server Error\n     */\n    500: unknown;\n    /**\n     * Custom message: Not Implemented\n     */\n    501: unknown;\n    /**\n     * Custom message: Bad Gateway\n     */\n    502: unknown;\n    /**\n     * Custom message: Service Unavailable\n     */\n    503: unknown;\n};\n\nexport type TestErrorCodeResponses = {\n    /**\n     * Custom message: Successful response\n     */\n    200: unknown;\n};\n\nexport type NonAsciiæøåÆøÅöôêÊ字符串Data = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * Dummy input param\n         */\n        nonAsciiParamæøåÆØÅöôêÊ: number;\n    };\n    url: '/api/v{api-version}/non-ascii-æøåÆØÅöôêÊ字符串';\n};\n\nexport type NonAsciiæøåÆøÅöôêÊ字符串Responses = {\n    /**\n     * Successful response\n     */\n    200: Array<NonAsciiStringæøåÆøÅöôêÊ字符串>;\n};\n\nexport type NonAsciiæøåÆøÅöôêÊ字符串Response = NonAsciiæøåÆøÅöôêÊ字符串Responses[keyof NonAsciiæøåÆøÅöôêÊ字符串Responses];\n\nexport type PutWithFormUrlEncodedData = {\n    body: ArrayWithStrings;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/non-ascii-æøåÆØÅöôêÊ字符串';\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/my-client/base-url-false/client/client.ts",
    "content": "import type { Client, Config, RequestOptions } from './types';\nimport {\n  buildUrl,\n  createConfig,\n  createInterceptors,\n  getParseAs,\n  mergeConfigs,\n  mergeHeaders,\n  setAuthParams,\n} from './utils';\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, RequestOptions>();\n\n  // @ts-expect-error\n  const request: Client['request'] = async (options) => {\n    const opts = {\n      ..._config,\n      ...options,\n      fetch: options.fetch ?? _config.fetch ?? globalThis.fetch,\n      headers: mergeHeaders(_config.headers, options.headers),\n    };\n\n    if (opts.security) {\n      await setAuthParams({\n        ...opts,\n        security: opts.security,\n      });\n    }\n\n    if (opts.body && opts.bodySerializer) {\n      opts.body = opts.bodySerializer(opts.body);\n    }\n\n    // remove Content-Type header if body is empty to avoid sending invalid requests\n    if (opts.body === undefined || opts.body === '') {\n      opts.headers.delete('Content-Type');\n    }\n\n    const url = buildUrl(opts);\n    const requestInit: ReqInit = {\n      redirect: 'follow',\n      ...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 = await _fetch(request);\n\n    for (const fn of interceptors.response.fns) {\n      if (fn) {\n        response = await fn(response, request, opts);\n      }\n    }\n\n    const result = {\n      request,\n      response,\n    };\n\n    if (response.ok) {\n      if (response.status === 204 || response.headers.get('Content-Length') === '0') {\n        return {\n          data: {},\n          ...result,\n        };\n      }\n\n      const parseAs =\n        (opts.parseAs === 'auto'\n          ? getParseAs(response.headers.get('Content-Type'))\n          : opts.parseAs) ?? 'json';\n\n      if (parseAs === 'stream') {\n        return {\n          data: response.body,\n          ...result,\n        };\n      }\n\n      let data = await response[parseAs]();\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 {\n        data,\n        ...result,\n      };\n    }\n\n    let error = await response.text();\n\n    try {\n      error = JSON.parse(error);\n    } catch {\n      // noop\n    }\n\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    return {\n      error: finalError,\n      ...result,\n    };\n  };\n\n  return {\n    buildUrl,\n    connect: (options) => request({ ...options, method: 'CONNECT' }),\n    delete: (options) => request({ ...options, method: 'DELETE' }),\n    get: (options) => request({ ...options, method: 'GET' }),\n    getConfig,\n    head: (options) => request({ ...options, method: 'HEAD' }),\n    interceptors,\n    options: (options) => request({ ...options, method: 'OPTIONS' }),\n    patch: (options) => request({ ...options, method: 'PATCH' }),\n    post: (options) => request({ ...options, method: 'POST' }),\n    put: (options) => request({ ...options, method: 'PUT' }),\n    request,\n    setConfig,\n    trace: (options) => request({ ...options, method: 'TRACE' }),\n  };\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/my-client/base-url-false/client/core/auth.ts",
    "content": "export 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/my-client/base-url-false/client/core/bodySerializer.ts",
    "content": "import type { ArrayStyle, ObjectStyle, SerializerOptions } from './pathSerializer';\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) => {\n  if (typeof value === 'string' || value instanceof Blob) {\n    data.append(key, value);\n  } else {\n    data.append(key, JSON.stringify(value));\n  }\n};\n\nconst serializeUrlSearchParamsPair = (data: URLSearchParams, key: string, value: unknown) => {\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) => {\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) =>\n    JSON.stringify(body, (_key, value) => (typeof value === 'bigint' ? value.toString() : value)),\n};\n\nexport const urlSearchParamsBodySerializer = {\n  bodySerializer: (body: unknown) => {\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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/my-client/base-url-false/client/core/params.ts",
    "content": "type Slot = 'body' | 'headers' | 'path' | 'query';\n\nexport type Field =\n  | {\n      in: Exclude<Slot, 'body'>;\n      key: string;\n      map?: string;\n    }\n  | {\n      in: Extract<Slot, 'body'>;\n      key?: string;\n      map?: string;\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\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 (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' && !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        (params[field.in] as Record<string, unknown>)[name] = arg;\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          const name = field.map || key;\n          (params[field.in] as Record<string, unknown>)[name] = value;\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 {\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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/my-client/base-url-false/client/core/pathSerializer.ts",
    "content": "interface 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/my-client/base-url-false/client/core/types.ts",
    "content": "import type { Auth, AuthToken } from './auth';\nimport type { BodySerializer, QuerySerializer, QuerySerializerOptions } from './bodySerializer';\n\nexport interface Client<RequestFn = never, Config = unknown, MethodFn = never, BuildUrlFn = never> {\n  /**\n   * Returns the final request URL.\n   */\n  buildUrl: BuildUrlFn;\n  connect: MethodFn;\n  delete: MethodFn;\n  get: MethodFn;\n  getConfig: () => Config;\n  head: MethodFn;\n  options: MethodFn;\n  patch: MethodFn;\n  post: MethodFn;\n  put: MethodFn;\n  request: RequestFn;\n  setConfig: (config: Config) => Config;\n  trace: MethodFn;\n}\n\nexport interface Config {\n  /**\n   * Auth token or a function returning auth token. The resolved value will be\n   * added to the request payload as defined by its `security` array.\n   */\n  auth?: ((auth: Auth) => Promise<AuthToken> | AuthToken) | AuthToken;\n  /**\n   * A function for serializing request body parameter. By default,\n   * {@link JSON.stringify()} will be used.\n   */\n  bodySerializer?: BodySerializer | null;\n  /**\n   * An object containing any HTTP headers that you want to pre-populate your\n   * `Headers` object with.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/Headers/Headers#init See more}\n   */\n  headers?:\n    | RequestInit['headers']\n    | Record<\n        string,\n        string | number | boolean | (string | number | boolean)[] | null | undefined | unknown\n      >;\n  /**\n   * The request method.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/fetch#method See more}\n   */\n  method?: 'CONNECT' | 'DELETE' | 'GET' | 'HEAD' | 'OPTIONS' | 'PATCH' | 'POST' | 'PUT' | 'TRACE';\n  /**\n   * A function for serializing request query parameters. By default, arrays\n   * will be exploded in form style, objects will be exploded in deepObject\n   * style, and reserved characters are percent-encoded.\n   *\n   * This method will have no effect if the native `paramsSerializer()` Axios\n   * API function is used.\n   *\n   * {@link https://swagger.io/docs/specification/serialization/#query View examples}\n   */\n  querySerializer?: QuerySerializer | QuerySerializerOptions;\n  /**\n   * A function transforming response data before it's returned. This is useful\n   * for post-processing data, e.g. converting ISO strings into Date objects.\n   */\n  responseTransformer?: (data: unknown) => Promise<unknown>;\n  /**\n   * A function validating response data. This is useful if you want to ensure\n   * the response conforms to the desired shape, so it can be safely passed to\n   * the transformers and returned to the user.\n   */\n  responseValidator?: (data: unknown) => Promise<unknown>;\n}\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/my-client/base-url-false/client/index.ts",
    "content": "export { createClient } from './client';\nexport type { Auth } from './core/auth';\nexport type { QuerySerializerOptions } from './core/bodySerializer';\nexport {\n  formDataBodySerializer,\n  jsonBodySerializer,\n  urlSearchParamsBodySerializer,\n} from './core/bodySerializer';\nexport type {\n  Client,\n  ClientOptions,\n  Config,\n  CreateClientConfig,\n  Options,\n  RequestOptions,\n  RequestResult,\n  TDataShape,\n} from './types';\nexport { createConfig } from './utils';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/my-client/base-url-false/client/plugin.ts",
    "content": "import {\n  type Client,\n  clientDefaultConfig,\n  clientDefaultMeta,\n  clientPluginHandler,\n  type DefinePlugin,\n  definePluginConfig,\n} from '@hey-api/openapi-ts';\n\nexport type Config = Client.Config & {\n  /**\n   * Plugin name. Must be unique.\n   */\n  name: string;\n};\n\nexport type MyClientPlugin = DefinePlugin<Config, Config>;\n\nexport const defaultConfig: MyClientPlugin['Config'] = {\n  ...clientDefaultMeta,\n  config: clientDefaultConfig,\n  handler: clientPluginHandler as MyClientPlugin['Handler'],\n  name: __filename,\n};\n\n/**\n * Type helper for `my-client` plugin, returns {@link Plugin.Config} object\n */\nexport const myClientPlugin = definePluginConfig(defaultConfig);\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/my-client/base-url-false/client/types.ts",
    "content": "import type { Auth } from './core/auth';\nimport type { Client as CoreClient, Config as CoreConfig } from './core/types';\nimport type { Middleware } from './utils';\n\nexport interface Config<T extends ClientOptions = ClientOptions>\n  extends Omit<RequestInit, 'body' | 'headers' | 'method'>, CoreConfig {\n  /**\n   * Base URL for all requests made by this client.\n   */\n  baseUrl?: T['baseUrl'];\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?: (request: Request) => ReturnType<typeof fetch>;\n  /**\n   * Return the response data parsed in a specified format. By default, `auto`\n   * will infer the appropriate method from the `Content-Type` response header.\n   * You can override this behavior with any of the {@link Body} methods.\n   * Select `stream` if you don't want to parse response data at all.\n   *\n   * @default 'auto'\n   */\n  parseAs?: 'arrayBuffer' | 'auto' | 'blob' | 'formData' | 'json' | 'stream' | 'text';\n  /**\n   * Throw an error instead of returning it in the response?\n   *\n   * @default false\n   */\n  throwOnError?: T['throwOnError'];\n}\n\nexport interface RequestOptions<\n  ThrowOnError extends boolean = boolean,\n  Url extends string = string,\n> extends Config<{\n  throwOnError: ThrowOnError;\n}> {\n  /**\n   * Any body that you want to add to your request.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/fetch#body}\n   */\n  body?: unknown;\n  path?: Record<string, unknown>;\n  query?: Record<string, unknown>;\n  /**\n   * Security mechanism(s) to use for the request.\n   */\n  security?: ReadonlyArray<Auth>;\n  url: Url;\n}\n\nexport type RequestResult<\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = boolean,\n> = ThrowOnError extends true\n  ? Promise<{\n      data: TData;\n      request: Request;\n      response: Response;\n    }>\n  : Promise<\n      ({ data: TData; error: undefined } | { data: undefined; error: TError }) & {\n        request: Request;\n        response: Response;\n      }\n    >;\n\nexport interface ClientOptions {\n  baseUrl?: string;\n  throwOnError?: boolean;\n}\n\ntype MethodFn = <TData = unknown, TError = unknown, ThrowOnError extends boolean = false>(\n  options: Omit<RequestOptions<ThrowOnError>, 'method'>,\n) => RequestResult<TData, TError, ThrowOnError>;\n\ntype RequestFn = <TData = unknown, TError = unknown, ThrowOnError extends boolean = false>(\n  options: Omit<RequestOptions<ThrowOnError>, 'method'> &\n    Pick<Required<RequestOptions<ThrowOnError>>, 'method'>,\n) => RequestResult<TData, TError, ThrowOnError>;\n\ntype BuildUrlFn = <\n  TData extends {\n    body?: unknown;\n    path?: Record<string, unknown>;\n    query?: Record<string, unknown>;\n    url: string;\n  },\n>(\n  options: TData & Options<TData>,\n) => string;\n\nexport type Client = CoreClient<RequestFn, Config, MethodFn, BuildUrlFn> & {\n  interceptors: Middleware<Request, Response, unknown, RequestOptions>;\n};\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 = ClientOptions> = (\n  override?: Config<ClientOptions & T>,\n) => Config<Required<ClientOptions> & T>;\n\nexport interface TDataShape {\n  body?: unknown;\n  headers?: unknown;\n  path?: unknown;\n  query?: unknown;\n  url: string;\n}\n\ntype OmitKeys<T, K> = Pick<T, Exclude<keyof T, K>>;\n\nexport type Options<\n  TData extends TDataShape = TDataShape,\n  ThrowOnError extends boolean = boolean,\n> = OmitKeys<RequestOptions<ThrowOnError>, 'body' | 'path' | 'query' | 'url'> & Omit<TData, 'url'>;\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/my-client/base-url-false/client/utils.ts",
    "content": "import { getAuthToken } from './core/auth';\nimport type { QuerySerializer, QuerySerializerOptions } from './core/bodySerializer';\nimport { jsonBodySerializer } from './core/bodySerializer';\nimport {\n  serializeArrayParam,\n  serializeObjectParam,\n  serializePrimitiveParam,\n} from './core/pathSerializer';\nimport type { Client, ClientOptions, Config, RequestOptions } from './types';\n\ninterface PathSerializer {\n  path: Record<string, unknown>;\n  url: string;\n}\n\nconst PATH_PARAM_RE = /\\{[^{}]+\\}/g;\n\ntype ArrayStyle = 'form' | 'spaceDelimited' | 'pipeDelimited';\ntype MatrixStyle = 'label' | 'matrix' | 'simple';\ntype ArraySeparatorStyle = ArrayStyle | MatrixStyle;\n\nconst 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 createQuerySerializer = <T = unknown>({\n  allowReserved,\n  array,\n  object,\n}: QuerySerializerOptions = {}) => {\n  const querySerializer = (queryParams: T) => {\n    let 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        if (Array.isArray(value)) {\n          search = [\n            ...search,\n            serializeArrayParam({\n              allowReserved,\n              explode: true,\n              name,\n              style: 'form',\n              value,\n              ...array,\n            }),\n          ];\n          continue;\n        }\n\n        if (typeof value === 'object') {\n          search = [\n            ...search,\n            serializeObjectParam({\n              allowReserved,\n              explode: true,\n              name,\n              style: 'deepObject',\n              value: value as Record<string, unknown>,\n              ...object,\n            }),\n          ];\n          continue;\n        }\n\n        search = [\n          ...search,\n          serializePrimitiveParam({\n            allowReserved,\n            name,\n            value: value as string,\n          }),\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\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    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    return;\n  }\n};\n\nexport const buildUrl: Client['buildUrl'] = (options) => {\n  const url = 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  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 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\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 || typeof header !== 'object') {\n      continue;\n    }\n\n    const iterator = header instanceof Headers ? header.entries() : 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/my-client/base-url-false/custom.gen.ts",
    "content": "// 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>());\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/my-client/base-url-false/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type { _3eNum1Период, _400, AdditionalPropertiesIntegerIssue, AdditionalPropertiesUnknownIssue, AdditionalPropertiesUnknownIssue2, AdditionalPropertiesUnknownIssue3, AdditionalPropertiesUnknownIssueWritable, AnyOfAnyAndNull, AnyOfArrays, ApiVVersionODataControllerCountData, ApiVVersionODataControllerCountResponse, ApiVVersionODataControllerCountResponses, ArrayWithAnyOfProperties, ArrayWithArray, ArrayWithBooleans, ArrayWithNumbers, ArrayWithProperties, ArrayWithReferences, ArrayWithStrings, CallToTestOrderOfParamsData, CallWithDefaultOptionalParametersData, CallWithDefaultParametersData, CallWithDescriptionsData, CallWithDuplicateResponsesData, CallWithDuplicateResponsesError, CallWithDuplicateResponsesErrors, CallWithDuplicateResponsesResponse, CallWithDuplicateResponsesResponses, CallWithNoContentResponseData, CallWithNoContentResponseResponse, CallWithNoContentResponseResponses, CallWithParametersData, CallWithResponseAndNoContentResponseData, CallWithResponseAndNoContentResponseResponse, CallWithResponseAndNoContentResponseResponses, CallWithResponseData, CallWithResponseResponse, CallWithResponseResponses, CallWithResponsesData, CallWithResponsesError, CallWithResponsesErrors, CallWithResponsesResponse, CallWithResponsesResponses, CallWithResultFromHeaderData, CallWithResultFromHeaderErrors, CallWithResultFromHeaderResponses, CallWithWeirdParameterNamesData, CamelCaseCommentWithBreaks, CharactersInDescription, ClientOptions, CollectionFormatData, CommentWithBackticks, CommentWithBackticksAndQuotes, CommentWithBreaks, CommentWithExpressionPlaceholders, CommentWithQuotes, CommentWithReservedCharacters, CommentWithSlashes, ComplexParamsData, ComplexParamsResponse, ComplexParamsResponses, ComplexTypesData, ComplexTypesErrors, ComplexTypesResponse, ComplexTypesResponses, CompositionBaseModel, CompositionExtendedModel, CompositionWithAllOfAndNullable, CompositionWithAnyOf, CompositionWithAnyOfAndNullable, CompositionWithAnyOfAnonymous, CompositionWithNestedAnyAndTypeNull, CompositionWithNestedAnyOfAndNull, CompositionWithOneOf, CompositionWithOneOfAndComplexArrayDictionary, CompositionWithOneOfAndNullable, CompositionWithOneOfAndProperties, CompositionWithOneOfAndSimpleArrayDictionary, CompositionWithOneOfAndSimpleDictionary, CompositionWithOneOfAnonymous, CompositionWithOneOfDiscriminator, ConstValue, Default, DeleteCallWithoutParametersAndResponseData, DeleteFooData, DeleteFooData2, DeleteFooData3, DeprecatedCallData, DeprecatedModel, DictionaryWithArray, DictionaryWithDictionary, DictionaryWithProperties, DictionaryWithPropertiesAndAdditionalProperties, DictionaryWithReference, DictionaryWithString, DummyAData, DummyAResponse, DummyAResponses, DummyBData, DummyBResponse, DummyBResponses, DuplicateName2Data, DuplicateName3Data, DuplicateName4Data, DuplicateNameData, EnumFromDescription, EnumWithExtensions, EnumWithNumbers, EnumWithReplacedCharacters, EnumWithStrings, EnumWithXEnumNames, ExportData, ExternalRefA, ExternalRefB, ExternalSharedModel, File, FileResponseData, FileResponseResponse, FileResponseResponses, FileWritable, FooWowData, FooWowResponses, FreeFormObjectWithAdditionalPropertiesEqEmptyObject, FreeFormObjectWithAdditionalPropertiesEqTrue, FreeFormObjectWithoutAdditionalProperties, GenericSchemaDuplicateIssue1SystemBoolean, GenericSchemaDuplicateIssue1SystemBooleanWritable, GenericSchemaDuplicateIssue1SystemString, GenericSchemaDuplicateIssue1SystemStringWritable, GetApiVbyApiVersionSimpleOperationData, GetApiVbyApiVersionSimpleOperationError, GetApiVbyApiVersionSimpleOperationErrors, GetApiVbyApiVersionSimpleOperationResponse, GetApiVbyApiVersionSimpleOperationResponses, GetCallWithOptionalParamData, GetCallWithoutParametersAndResponseData, HeadCallWithoutParametersAndResponseData, Import, ImportData, ImportResponse, ImportResponses, IoK8sApimachineryPkgApisMetaV1DeleteOptions, IoK8sApimachineryPkgApisMetaV1Preconditions, ModelCircle, ModelFromZendesk, ModelSquare, ModelThatExtends, ModelThatExtendsExtends, ModelWithAdditionalPropertiesEqTrue, ModelWithAdditionalPropertiesRef, ModelWithAnyOfConstantSizeArray, ModelWithAnyOfConstantSizeArrayAndIntersect, ModelWithAnyOfConstantSizeArrayNullable, ModelWithAnyOfConstantSizeArrayWithNSizeAndOptions, ModelWithAnyOfConstantSizeArrayWithNSizeAndOptionsWritable, ModelWithArray, ModelWithArrayReadOnlyAndWriteOnly, ModelWithArrayReadOnlyAndWriteOnlyWritable, ModelWithBackticksInDescription, ModelWithBoolean, ModelWithCircularReference, ModelWithConst, ModelWithConstantSizeArray, ModelWithDictionary, ModelWithDuplicateImports, ModelWithDuplicateProperties, ModelWithEnum, ModelWithEnumFromDescription, ModelWithEnumWithHyphen, ModelWithInteger, ModelWithNestedArrayEnums, ModelWithNestedArrayEnumsData, ModelWithNestedArrayEnumsDataBar, ModelWithNestedArrayEnumsDataFoo, ModelWithNestedCompositionEnums, ModelWithNestedEnums, ModelWithNestedProperties, ModelWithNullableObject, ModelWithNullableString, ModelWithNumericEnumUnion, ModelWithOneOfAndProperties, ModelWithOneOfEnum, ModelWithOrderedProperties, ModelWithPattern, ModelWithPatternWritable, ModelWithPrefixItemsConstantSizeArray, ModelWithProperties, ModelWithPropertiesWritable, ModelWithReadOnlyAndWriteOnly, ModelWithReadOnlyAndWriteOnlyWritable, ModelWithReference, ModelWithReferenceWritable, ModelWithString, ModelWithStringError, MultipartRequestData, MultipartResponseData, MultipartResponseResponse, MultipartResponseResponses, NestedAnyOfArraysNullable, NonAsciiæøåÆøÅöôêÊ字符串Data, NonAsciiæøåÆøÅöôêÊ字符串Response, NonAsciiæøåÆøÅöôêÊ字符串Responses, NonAsciiStringæøåÆøÅöôêÊ字符串, NullableObject, OneOfAllOfIssue, OneOfAllOfIssueWritable, OptionsCallWithoutParametersAndResponseData, Pageable, ParameterSimpleParameterUnused, PatchApiVbyApiVersionNoTagData, PatchApiVbyApiVersionNoTagResponses, PatchCallWithoutParametersAndResponseData, PostApiVbyApiVersionFormDataData, PostApiVbyApiVersionRequestBodyData, PostCallWithOptionalParamData, PostCallWithOptionalParamResponse, PostCallWithOptionalParamResponses, PostCallWithoutParametersAndResponseData, PostServiceWithEmptyTagResponse, PostServiceWithEmptyTagResponse2, PutCallWithoutParametersAndResponseData, PutWithFormUrlEncodedData, SchemaWithFormRestrictedKeys, SimpleBoolean, SimpleFile, SimpleFormData, SimpleInteger, SimpleParameter, SimpleReference, SimpleRequestBody, SimpleString, SimpleStringWithPattern, TestErrorCodeData, TestErrorCodeErrors, TestErrorCodeResponses, TypesData, TypesResponse, TypesResponses, UploadFileData, UploadFileResponse, UploadFileResponses, XFooBar } from './types.gen';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/my-client/base-url-false/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type ClientOptions = {\n    baseUrl: 'http://localhost:3000/base' | (string & {});\n};\n\n/**\n * Model with number-only name\n */\nexport type _400 = string;\n\n/**\n * External ref to shared model (A)\n */\nexport type ExternalRefA = ExternalSharedModel;\n\n/**\n * External ref to shared model (B)\n */\nexport type ExternalRefB = ExternalSharedModel;\n\n/**\n * Testing multiline comments in string: First line\n * Second line\n *\n * Fourth line\n */\nexport type CamelCaseCommentWithBreaks = number;\n\n/**\n * Testing multiline comments in string: First line\n * Second line\n *\n * Fourth line\n */\nexport type CommentWithBreaks = number;\n\n/**\n * Testing backticks in string: `backticks` and ```multiple backticks``` should work\n */\nexport type CommentWithBackticks = number;\n\n/**\n * Testing backticks and quotes in string: `backticks`, 'quotes', \"double quotes\" and ```multiple backticks``` should work\n */\nexport type CommentWithBackticksAndQuotes = number;\n\n/**\n * Testing slashes in string: \\backwards\\\\\\ and /forwards/// should work\n */\nexport type CommentWithSlashes = number;\n\n/**\n * Testing expression placeholders in string: ${expression} should work\n */\nexport type CommentWithExpressionPlaceholders = number;\n\n/**\n * Testing quotes in string: 'single quote''' and \"double quotes\"\"\" should work\n */\nexport type CommentWithQuotes = number;\n\n/**\n * Testing reserved characters in string: * inline * and ** inline ** should work\n */\nexport type CommentWithReservedCharacters = number;\n\n/**\n * This is a simple number\n */\nexport type SimpleInteger = number;\n\n/**\n * This is a simple boolean\n */\nexport type SimpleBoolean = boolean;\n\n/**\n * This is a simple string\n */\nexport type SimpleString = string;\n\n/**\n * A string with non-ascii (unicode) characters valid in typescript identifiers (æøåÆØÅöÔèÈ字符串)\n */\nexport type NonAsciiStringæøåÆøÅöôêÊ字符串 = string;\n\n/**\n * This is a simple file\n */\nexport type SimpleFile = Blob | File;\n\n/**\n * This is a simple reference\n */\nexport type SimpleReference = ModelWithString;\n\n/**\n * This is a simple string\n */\nexport type SimpleStringWithPattern = string | null;\n\n/**\n * This is a simple enum with strings\n */\nexport type EnumWithStrings = 'Success' | 'Warning' | 'Error' | '\\'Single Quote\\'' | '\"Double Quotes\"' | 'Non-ascii: øæåôöØÆÅÔÖ字符串';\n\nexport type EnumWithReplacedCharacters = '\\'Single Quote\\'' | '\"Double Quotes\"' | 'øæåôöØÆÅÔÖ字符串' | 3.1 | '';\n\n/**\n * This is a simple enum with numbers\n */\nexport type EnumWithNumbers = 1 | 2 | 3 | 1.1 | 1.2 | 1.3 | 100 | 200 | 300 | -100 | -200 | -300 | -1.1 | -1.2 | -1.3;\n\n/**\n * Success=1,Warning=2,Error=3\n */\nexport type EnumFromDescription = number;\n\n/**\n * This is a simple enum with numbers\n */\nexport type EnumWithExtensions = 200 | 400 | 500;\n\nexport type EnumWithXEnumNames = 0 | 1 | 2;\n\n/**\n * This is a simple array with numbers\n */\nexport type ArrayWithNumbers = Array<number>;\n\n/**\n * This is a simple array with booleans\n */\nexport type ArrayWithBooleans = Array<boolean>;\n\n/**\n * This is a simple array with strings\n */\nexport type ArrayWithStrings = Array<string>;\n\n/**\n * This is a simple array with references\n */\nexport type ArrayWithReferences = Array<ModelWithString>;\n\n/**\n * This is a simple array containing an array\n */\nexport type ArrayWithArray = Array<Array<ModelWithString>>;\n\n/**\n * This is a simple array with properties\n */\nexport type ArrayWithProperties = Array<{\n    '16x16'?: CamelCaseCommentWithBreaks;\n    bar?: string;\n}>;\n\n/**\n * This is a simple array with any of properties\n */\nexport type ArrayWithAnyOfProperties = Array<{\n    foo?: string;\n} | {\n    bar?: string;\n}>;\n\nexport type AnyOfAnyAndNull = {\n    data?: unknown | null;\n};\n\n/**\n * This is a simple array with any of properties\n */\nexport type AnyOfArrays = {\n    results?: Array<{\n        foo?: string;\n    } | {\n        bar?: string;\n    }>;\n};\n\n/**\n * This is a string dictionary\n */\nexport type DictionaryWithString = {\n    [key: string]: string;\n};\n\nexport type DictionaryWithPropertiesAndAdditionalProperties = {\n    foo?: number;\n    bar?: boolean;\n    [key: string]: string | number | boolean | undefined;\n};\n\n/**\n * This is a string reference\n */\nexport type DictionaryWithReference = {\n    [key: string]: ModelWithString;\n};\n\n/**\n * This is a complex dictionary\n */\nexport type DictionaryWithArray = {\n    [key: string]: Array<ModelWithString>;\n};\n\n/**\n * This is a string dictionary\n */\nexport type DictionaryWithDictionary = {\n    [key: string]: {\n        [key: string]: string;\n    };\n};\n\n/**\n * This is a complex dictionary\n */\nexport type DictionaryWithProperties = {\n    [key: string]: {\n        foo?: string;\n        bar?: string;\n    };\n};\n\n/**\n * This is a model with one number property\n */\nexport type ModelWithInteger = {\n    /**\n     * This is a simple number property\n     */\n    prop?: number;\n};\n\n/**\n * This is a model with one boolean property\n */\nexport type ModelWithBoolean = {\n    /**\n     * This is a simple boolean property\n     */\n    prop?: boolean;\n};\n\n/**\n * This is a model with one string property\n */\nexport type ModelWithString = {\n    /**\n     * This is a simple string property\n     */\n    prop?: string;\n};\n\n/**\n * This is a model with one string property\n */\nexport type ModelWithStringError = {\n    /**\n     * This is a simple string property\n     */\n    prop?: string;\n};\n\n/**\n * `Comment` or `VoiceComment`. The JSON object for adding voice comments to tickets is different. See [Adding voice comments to tickets](/documentation/ticketing/managing-tickets/adding-voice-comments-to-tickets)\n */\nexport type ModelFromZendesk = string;\n\n/**\n * This is a model with one string property\n */\nexport type ModelWithNullableString = {\n    /**\n     * This is a simple string property\n     */\n    nullableProp1?: string | null;\n    /**\n     * This is a simple string property\n     */\n    nullableRequiredProp1: string | null;\n    /**\n     * This is a simple string property\n     */\n    nullableProp2?: string | null;\n    /**\n     * This is a simple string property\n     */\n    nullableRequiredProp2: string | null;\n    /**\n     * This is a simple enum with strings\n     */\n    'foo_bar-enum'?: 'Success' | 'Warning' | 'Error' | 'ØÆÅ字符串';\n};\n\n/**\n * This is a model with one enum\n */\nexport type ModelWithEnum = {\n    /**\n     * This is a simple enum with strings\n     */\n    'foo_bar-enum'?: 'Success' | 'Warning' | 'Error' | 'ØÆÅ字符串';\n    /**\n     * These are the HTTP error code enums\n     */\n    statusCode?: '100' | '200 FOO' | '300 FOO_BAR' | '400 foo-bar' | '500 foo.bar' | '600 foo&bar';\n    /**\n     * Simple boolean enum\n     */\n    bool?: true;\n};\n\n/**\n * This is a model with one enum with escaped name\n */\nexport type ModelWithEnumWithHyphen = {\n    /**\n     * Foo-Bar-Baz-Qux\n     */\n    'foo-bar-baz-qux'?: '3.0';\n};\n\n/**\n * This is a model with one enum\n */\nexport type ModelWithEnumFromDescription = {\n    /**\n     * Success=1,Warning=2,Error=3\n     */\n    test?: number;\n};\n\n/**\n * This is a model with nested enums\n */\nexport type ModelWithNestedEnums = {\n    dictionaryWithEnum?: {\n        [key: string]: 'Success' | 'Warning' | 'Error';\n    };\n    dictionaryWithEnumFromDescription?: {\n        [key: string]: number;\n    };\n    arrayWithEnum?: Array<'Success' | 'Warning' | 'Error'>;\n    arrayWithDescription?: Array<number>;\n    /**\n     * This is a simple enum with strings\n     */\n    'foo_bar-enum'?: 'Success' | 'Warning' | 'Error' | 'ØÆÅ字符串';\n};\n\n/**\n * This is a model with one property containing a reference\n */\nexport type ModelWithReference = {\n    prop?: ModelWithProperties;\n};\n\n/**\n * This is a model with one property containing an array\n */\nexport type ModelWithArrayReadOnlyAndWriteOnly = {\n    prop?: Array<ModelWithReadOnlyAndWriteOnly>;\n    propWithFile?: Array<Blob | File>;\n    propWithNumber?: Array<number>;\n};\n\n/**\n * This is a model with one property containing an array\n */\nexport type ModelWithArray = {\n    prop?: Array<ModelWithString>;\n    propWithFile?: Array<Blob | File>;\n    propWithNumber?: Array<number>;\n};\n\n/**\n * This is a model with one property containing a dictionary\n */\nexport type ModelWithDictionary = {\n    prop?: {\n        [key: string]: string;\n    };\n};\n\n/**\n * This is a deprecated model with a deprecated property\n *\n * @deprecated\n */\nexport type DeprecatedModel = {\n    /**\n     * This is a deprecated property\n     *\n     * @deprecated\n     */\n    prop?: string;\n};\n\n/**\n * This is a model with one property containing a circular reference\n */\nexport type ModelWithCircularReference = {\n    prop?: ModelWithCircularReference;\n};\n\n/**\n * This is a model with one property with a 'one of' relationship\n */\nexport type CompositionWithOneOf = {\n    propA?: ModelWithString | ModelWithEnum | ModelWithArray | ModelWithDictionary;\n};\n\n/**\n * This is a model with one property with a 'one of' relationship where the options are not $ref\n */\nexport type CompositionWithOneOfAnonymous = {\n    propA?: {\n        propA?: string;\n    } | string | number;\n};\n\n/**\n * Circle\n */\nexport type ModelCircle = {\n    kind: string;\n    radius?: number;\n};\n\n/**\n * Square\n */\nexport type ModelSquare = {\n    kind: string;\n    sideLength?: number;\n};\n\n/**\n * This is a model with one property with a 'one of' relationship where the options are not $ref\n */\nexport type CompositionWithOneOfDiscriminator = ({\n    kind: 'circle';\n} & ModelCircle) | ({\n    kind: 'square';\n} & ModelSquare);\n\n/**\n * This is a model with one property with a 'any of' relationship\n */\nexport type CompositionWithAnyOf = {\n    propA?: ModelWithString | ModelWithEnum | ModelWithArray | ModelWithDictionary;\n};\n\n/**\n * This is a model with one property with a 'any of' relationship where the options are not $ref\n */\nexport type CompositionWithAnyOfAnonymous = {\n    propA?: {\n        propA?: string;\n    } | string | number;\n};\n\n/**\n * This is a model with nested 'any of' property with a type null\n */\nexport type CompositionWithNestedAnyAndTypeNull = {\n    propA?: Array<ModelWithDictionary | null> | Array<ModelWithArray | null>;\n};\n\nexport type _3eNum1Период = 'Bird' | 'Dog';\n\nexport type ConstValue = 'ConstValue';\n\n/**\n * This is a model with one property with a 'any of' relationship where the options are not $ref\n */\nexport type CompositionWithNestedAnyOfAndNull = {\n    /**\n     * Scopes\n     */\n    propA?: Array<_3eNum1Период | ConstValue> | null;\n};\n\n/**\n * This is a model with one property with a 'one of' relationship\n */\nexport type CompositionWithOneOfAndNullable = {\n    propA?: {\n        boolean?: boolean;\n    } | ModelWithEnum | ModelWithArray | ModelWithDictionary | null;\n};\n\n/**\n * This is a model that contains a simple dictionary within composition\n */\nexport type CompositionWithOneOfAndSimpleDictionary = {\n    propA?: boolean | {\n        [key: string]: number;\n    };\n};\n\n/**\n * This is a model that contains a dictionary of simple arrays within composition\n */\nexport type CompositionWithOneOfAndSimpleArrayDictionary = {\n    propA?: boolean | {\n        [key: string]: Array<boolean>;\n    };\n};\n\n/**\n * This is a model that contains a dictionary of complex arrays (composited) within composition\n */\nexport type CompositionWithOneOfAndComplexArrayDictionary = {\n    propA?: boolean | {\n        [key: string]: Array<number | string>;\n    };\n};\n\n/**\n * This is a model with one property with a 'all of' relationship\n */\nexport type CompositionWithAllOfAndNullable = {\n    propA?: ({\n        boolean?: boolean;\n    } & ModelWithEnum & ModelWithArray & ModelWithDictionary) | null;\n};\n\n/**\n * This is a model with one property with a 'any of' relationship\n */\nexport type CompositionWithAnyOfAndNullable = {\n    propA?: {\n        boolean?: boolean;\n    } | ModelWithEnum | ModelWithArray | ModelWithDictionary | null;\n};\n\n/**\n * This is a base model with two simple optional properties\n */\nexport type CompositionBaseModel = {\n    firstName?: string;\n    lastname?: string;\n};\n\n/**\n * This is a model that extends the base model\n */\nexport type CompositionExtendedModel = CompositionBaseModel & {\n    age: number;\n    firstName: string;\n    lastname: string;\n};\n\n/**\n * This is a model with one nested property\n */\nexport type ModelWithProperties = {\n    required: string;\n    readonly requiredAndReadOnly: string;\n    requiredAndNullable: string | null;\n    string?: string;\n    number?: number;\n    boolean?: boolean;\n    reference?: ModelWithString;\n    'property with space'?: string;\n    default?: string;\n    try?: string;\n    readonly '@namespace.string'?: string;\n    readonly '@namespace.integer'?: number;\n};\n\n/**\n * This is a model with one nested property\n */\nexport type ModelWithNestedProperties = {\n    readonly first: {\n        readonly second: {\n            readonly third: string | null;\n        } | null;\n    } | null;\n};\n\n/**\n * This is a model with duplicated properties\n */\nexport type ModelWithDuplicateProperties = {\n    prop?: ModelWithString;\n};\n\n/**\n * This is a model with ordered properties\n */\nexport type ModelWithOrderedProperties = {\n    zebra?: string;\n    apple?: string;\n    hawaii?: string;\n};\n\n/**\n * This is a model with duplicated imports\n */\nexport type ModelWithDuplicateImports = {\n    propA?: ModelWithString;\n    propB?: ModelWithString;\n    propC?: ModelWithString;\n};\n\n/**\n * This is a model that extends another model\n */\nexport type ModelThatExtends = ModelWithString & {\n    propExtendsA?: string;\n    propExtendsB?: ModelWithString;\n};\n\n/**\n * This is a model that extends another model\n */\nexport type ModelThatExtendsExtends = ModelWithString & ModelThatExtends & {\n    propExtendsC?: string;\n    propExtendsD?: ModelWithString;\n};\n\n/**\n * This is a model that contains a some patterns\n */\nexport type ModelWithPattern = {\n    key: string;\n    name: string;\n    readonly enabled?: boolean;\n    readonly modified?: string;\n    id?: string;\n    text?: string;\n    patternWithSingleQuotes?: string;\n    patternWithNewline?: string;\n    patternWithBacktick?: string;\n    patternWithUnicode?: string;\n};\n\nexport type File = {\n    /**\n     * Id\n     */\n    readonly id?: string;\n    /**\n     * Updated at\n     */\n    readonly updated_at?: string;\n    /**\n     * Created at\n     */\n    readonly created_at?: string;\n    /**\n     * Mime\n     */\n    mime: string;\n    /**\n     * File\n     */\n    readonly file?: string;\n};\n\nexport type Default = {\n    name?: string;\n};\n\nexport type Pageable = {\n    page?: number;\n    size?: number;\n    sort?: Array<string>;\n};\n\n/**\n * This is a free-form object without additionalProperties.\n */\nexport type FreeFormObjectWithoutAdditionalProperties = {\n    [key: string]: unknown;\n};\n\n/**\n * This is a free-form object with additionalProperties: true.\n */\nexport type FreeFormObjectWithAdditionalPropertiesEqTrue = {\n    [key: string]: unknown;\n};\n\n/**\n * This is a free-form object with additionalProperties: {}.\n */\nexport type FreeFormObjectWithAdditionalPropertiesEqEmptyObject = {\n    [key: string]: unknown;\n};\n\nexport type ModelWithConst = {\n    String?: 'String';\n    number?: 0;\n    null?: null;\n    withType?: 'Some string';\n};\n\n/**\n * This is a model with one property and additionalProperties: true\n */\nexport type ModelWithAdditionalPropertiesEqTrue = {\n    /**\n     * This is a simple string property\n     */\n    prop?: string;\n    [key: string]: unknown;\n};\n\nexport type NestedAnyOfArraysNullable = {\n    nullableArray?: Array<string | boolean> | null;\n};\n\nexport type CompositionWithOneOfAndProperties = ({\n    foo: SimpleParameter;\n} | {\n    bar: NonAsciiStringæøåÆøÅöôêÊ字符串;\n}) & {\n    baz: number | null;\n    qux: number;\n};\n\n/**\n * An object that can be null\n */\nexport type NullableObject = {\n    foo?: string;\n} | null;\n\n/**\n * Some % character\n */\nexport type CharactersInDescription = string;\n\nexport type ModelWithNullableObject = {\n    data?: NullableObject;\n};\n\n/**\n * An object with additional properties that can be null (anyOf ref + null)\n */\nexport type ModelWithAdditionalPropertiesRef = {\n    [key: string]: NullableObject | null;\n};\n\nexport type ModelWithOneOfEnum = {\n    foo: 'Bar';\n} | {\n    foo: 'Baz';\n} | {\n    foo: 'Qux';\n} | {\n    content: string;\n    foo: 'Quux';\n} | {\n    content: [\n        string,\n        string\n    ];\n    foo: 'Corge';\n};\n\nexport type ModelWithNestedArrayEnumsDataFoo = 'foo' | 'bar';\n\nexport type ModelWithNestedArrayEnumsDataBar = 'baz' | 'qux';\n\nexport type ModelWithNestedArrayEnumsData = {\n    foo?: Array<ModelWithNestedArrayEnumsDataFoo>;\n    bar?: Array<ModelWithNestedArrayEnumsDataBar>;\n};\n\nexport type ModelWithNestedArrayEnums = {\n    array_strings?: Array<string>;\n    data?: ModelWithNestedArrayEnumsData;\n};\n\nexport type ModelWithNestedCompositionEnums = {\n    foo?: ModelWithNestedArrayEnumsDataFoo;\n};\n\nexport type ModelWithReadOnlyAndWriteOnly = {\n    foo: string;\n    readonly bar: string;\n};\n\nexport type ModelWithConstantSizeArray = [\n    number,\n    number\n];\n\nexport type ModelWithAnyOfConstantSizeArray = [\n    number | string,\n    number | string,\n    number | string\n];\n\nexport type ModelWithPrefixItemsConstantSizeArray = [\n    ModelWithInteger,\n    number | string,\n    string\n];\n\nexport type ModelWithAnyOfConstantSizeArrayNullable = [\n    number | null | string,\n    number | null | string,\n    number | null | string\n];\n\nexport type ModelWithAnyOfConstantSizeArrayWithNSizeAndOptions = [\n    number | Import,\n    number | Import\n];\n\nexport type ModelWithAnyOfConstantSizeArrayAndIntersect = [\n    number & string,\n    number & string\n];\n\nexport type ModelWithNumericEnumUnion = {\n    /**\n     * Период\n     */\n    value?: -10 | -1 | 0 | 1 | 3 | 6 | 12;\n};\n\n/**\n * Some description with `back ticks`\n */\nexport type ModelWithBackticksInDescription = {\n    /**\n     * The template `that` should be used for parsing and importing the contents of the CSV file.\n     *\n     * <br/><p>There is one placeholder currently supported:<ul>     <li><b>${x}</b> - refers to the n-th column in the CSV file, e.g. ${1}, ${2}, ...)</li></ul><p>Example of a correct JSON template:</p>\n     * <pre>\n     * [\n     * {\n     * \"resourceType\": \"Asset\",\n     * \"identifier\": {\n     * \"name\": \"${1}\",\n     * \"domain\": {\n     * \"name\": \"${2}\",\n     * \"community\": {\n     * \"name\": \"Some Community\"\n     * }\n     * }\n     * },\n     * \"attributes\" : {\n     * \"00000000-0000-0000-0000-000000003115\" : [ {\n     * \"value\" : \"${3}\"\n     * } ],\n     * \"00000000-0000-0000-0000-000000000222\" : [ {\n     * \"value\" : \"${4}\"\n     * } ]\n     * }\n     * }\n     * ]\n     * </pre>\n     */\n    template?: string;\n};\n\nexport type ModelWithOneOfAndProperties = (SimpleParameter | NonAsciiStringæøåÆøÅöôêÊ字符串) & {\n    baz: number | null;\n    qux: number;\n};\n\n/**\n * Model used to test deduplication strategy (unused)\n */\nexport type ParameterSimpleParameterUnused = string;\n\n/**\n * Model used to test deduplication strategy\n */\nexport type PostServiceWithEmptyTagResponse = string;\n\n/**\n * Model used to test deduplication strategy\n */\nexport type PostServiceWithEmptyTagResponse2 = string;\n\n/**\n * Model used to test deduplication strategy\n */\nexport type DeleteFooData = string;\n\n/**\n * Model used to test deduplication strategy\n */\nexport type DeleteFooData2 = string;\n\n/**\n * Model with restricted keyword name\n */\nexport type Import = string;\n\nexport type SchemaWithFormRestrictedKeys = {\n    description?: string;\n    'x-enum-descriptions'?: string;\n    'x-enum-varnames'?: string;\n    'x-enumNames'?: string;\n    title?: string;\n    object?: {\n        description?: string;\n        'x-enum-descriptions'?: string;\n        'x-enum-varnames'?: string;\n        'x-enumNames'?: string;\n        title?: string;\n    };\n    array?: Array<{\n        description?: string;\n        'x-enum-descriptions'?: string;\n        'x-enum-varnames'?: string;\n        'x-enumNames'?: string;\n        title?: string;\n    }>;\n};\n\n/**\n * This schema was giving PascalCase transformations a hard time\n */\nexport type IoK8sApimachineryPkgApisMetaV1DeleteOptions = {\n    /**\n     * Must be fulfilled before a deletion is carried out. If not possible, a 409 Conflict status will be returned.\n     */\n    preconditions?: IoK8sApimachineryPkgApisMetaV1Preconditions;\n};\n\n/**\n * This schema was giving PascalCase transformations a hard time\n */\nexport type IoK8sApimachineryPkgApisMetaV1Preconditions = {\n    /**\n     * Specifies the target ResourceVersion\n     */\n    resourceVersion?: string;\n    /**\n     * Specifies the target UID.\n     */\n    uid?: string;\n};\n\nexport type AdditionalPropertiesUnknownIssue = {\n    [key: string]: string | number;\n};\n\nexport type AdditionalPropertiesUnknownIssue2 = {\n    [key: string]: string | number;\n};\n\nexport type AdditionalPropertiesUnknownIssue3 = string & {\n    entries: {\n        [key: string]: AdditionalPropertiesUnknownIssue;\n    };\n};\n\nexport type AdditionalPropertiesIntegerIssue = {\n    value: number;\n    [key: string]: number;\n};\n\nexport type OneOfAllOfIssue = ((ConstValue | GenericSchemaDuplicateIssue1SystemBoolean) & _3eNum1Период) | GenericSchemaDuplicateIssue1SystemString;\n\nexport type GenericSchemaDuplicateIssue1SystemBoolean = {\n    item?: boolean;\n    error?: string | null;\n    readonly hasError?: boolean;\n    data?: {\n        [key: string]: never;\n    };\n};\n\nexport type GenericSchemaDuplicateIssue1SystemString = {\n    item?: string | null;\n    error?: string | null;\n    readonly hasError?: boolean;\n};\n\nexport type ExternalSharedModel = {\n    id: string;\n    name?: string;\n};\n\n/**\n * This is a model with one property containing a reference\n */\nexport type ModelWithReferenceWritable = {\n    prop?: ModelWithPropertiesWritable;\n};\n\n/**\n * This is a model with one property containing an array\n */\nexport type ModelWithArrayReadOnlyAndWriteOnlyWritable = {\n    prop?: Array<ModelWithReadOnlyAndWriteOnlyWritable>;\n    propWithFile?: Array<Blob | File>;\n    propWithNumber?: Array<number>;\n};\n\n/**\n * This is a model with one nested property\n */\nexport type ModelWithPropertiesWritable = {\n    required: string;\n    requiredAndNullable: string | null;\n    string?: string;\n    number?: number;\n    boolean?: boolean;\n    reference?: ModelWithString;\n    'property with space'?: string;\n    default?: string;\n    try?: string;\n};\n\n/**\n * This is a model that contains a some patterns\n */\nexport type ModelWithPatternWritable = {\n    key: string;\n    name: string;\n    id?: string;\n    text?: string;\n    patternWithSingleQuotes?: string;\n    patternWithNewline?: string;\n    patternWithBacktick?: string;\n    patternWithUnicode?: string;\n};\n\nexport type FileWritable = {\n    /**\n     * Mime\n     */\n    mime: string;\n};\n\nexport type ModelWithReadOnlyAndWriteOnlyWritable = {\n    foo: string;\n    baz: string;\n};\n\nexport type ModelWithAnyOfConstantSizeArrayWithNSizeAndOptionsWritable = [\n    number | Import,\n    number | Import\n];\n\nexport type AdditionalPropertiesUnknownIssueWritable = {\n    [key: string]: string | number;\n};\n\nexport type OneOfAllOfIssueWritable = ((ConstValue | GenericSchemaDuplicateIssue1SystemBoolean) & _3eNum1Период) | GenericSchemaDuplicateIssue1SystemString;\n\nexport type GenericSchemaDuplicateIssue1SystemBooleanWritable = {\n    item?: boolean;\n    error?: string | null;\n    data?: {\n        [key: string]: never;\n    };\n};\n\nexport type GenericSchemaDuplicateIssue1SystemStringWritable = {\n    item?: string | null;\n    error?: string | null;\n};\n\n/**\n * This is a reusable parameter\n */\nexport type SimpleParameter = string;\n\n/**\n * Parameter with illegal characters\n */\nexport type XFooBar = ModelWithString;\n\n/**\n * A reusable request body\n */\nexport type SimpleRequestBody = ModelWithString;\n\n/**\n * A reusable request body\n */\nexport type SimpleFormData = ModelWithString;\n\nexport type ExportData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no+tag';\n};\n\nexport type PatchApiVbyApiVersionNoTagData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no+tag';\n};\n\nexport type PatchApiVbyApiVersionNoTagResponses = {\n    /**\n     * OK\n     */\n    default: unknown;\n};\n\nexport type ImportData = {\n    body: ModelWithReadOnlyAndWriteOnlyWritable | ModelWithArrayReadOnlyAndWriteOnlyWritable;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no+tag';\n};\n\nexport type ImportResponses = {\n    /**\n     * Success\n     */\n    200: ModelFromZendesk;\n    /**\n     * Default success response\n     */\n    default: ModelWithReadOnlyAndWriteOnly;\n};\n\nexport type ImportResponse = ImportResponses[keyof ImportResponses];\n\nexport type FooWowData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no+tag';\n};\n\nexport type FooWowResponses = {\n    /**\n     * OK\n     */\n    default: unknown;\n};\n\nexport type ApiVVersionODataControllerCountData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple/$count';\n};\n\nexport type ApiVVersionODataControllerCountResponses = {\n    /**\n     * Success\n     */\n    200: ModelFromZendesk;\n};\n\nexport type ApiVVersionODataControllerCountResponse = ApiVVersionODataControllerCountResponses[keyof ApiVVersionODataControllerCountResponses];\n\nexport type GetApiVbyApiVersionSimpleOperationData = {\n    body?: never;\n    path: {\n        /**\n         * foo in method\n         */\n        foo_param: string;\n    };\n    query?: never;\n    url: '/api/v{api-version}/simple:operation';\n};\n\nexport type GetApiVbyApiVersionSimpleOperationErrors = {\n    /**\n     * Default error response\n     */\n    default: ModelWithBoolean;\n};\n\nexport type GetApiVbyApiVersionSimpleOperationError = GetApiVbyApiVersionSimpleOperationErrors[keyof GetApiVbyApiVersionSimpleOperationErrors];\n\nexport type GetApiVbyApiVersionSimpleOperationResponses = {\n    /**\n     * Response is a simple number\n     */\n    200: number;\n};\n\nexport type GetApiVbyApiVersionSimpleOperationResponse = GetApiVbyApiVersionSimpleOperationResponses[keyof GetApiVbyApiVersionSimpleOperationResponses];\n\nexport type DeleteCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type GetCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type HeadCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type OptionsCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type PatchCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type PostCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type PutCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type DeleteFooData3 = {\n    body?: never;\n    headers: {\n        /**\n         * Parameter with illegal characters\n         */\n        'x-Foo-Bar': ModelWithString;\n    };\n    path: {\n        /**\n         * foo in method\n         */\n        foo_param: string;\n        /**\n         * bar in method\n         */\n        BarParam: string;\n    };\n    query?: never;\n    url: '/api/v{api-version}/foo/{foo_param}/bar/{BarParam}';\n};\n\nexport type CallWithDescriptionsData = {\n    body?: never;\n    path?: never;\n    query?: {\n        /**\n         * Testing multiline comments in string: First line\n         * Second line\n         *\n         * Fourth line\n         */\n        parameterWithBreaks?: string;\n        /**\n         * Testing backticks in string: `backticks` and ```multiple backticks``` should work\n         */\n        parameterWithBackticks?: string;\n        /**\n         * Testing slashes in string: \\backwards\\\\\\ and /forwards/// should work\n         */\n        parameterWithSlashes?: string;\n        /**\n         * Testing expression placeholders in string: ${expression} should work\n         */\n        parameterWithExpressionPlaceholders?: string;\n        /**\n         * Testing quotes in string: 'single quote''' and \"double quotes\"\"\" should work\n         */\n        parameterWithQuotes?: string;\n        /**\n         * Testing reserved characters in string: * inline * and ** inline ** should work\n         */\n        parameterWithReservedCharacters?: string;\n    };\n    url: '/api/v{api-version}/descriptions';\n};\n\nexport type DeprecatedCallData = {\n    body?: never;\n    headers: {\n        /**\n         * This parameter is deprecated\n         *\n         * @deprecated\n         */\n        parameter: DeprecatedModel | null;\n    };\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/parameters/deprecated';\n};\n\nexport type CallWithParametersData = {\n    /**\n     * This is the parameter that goes into the body\n     */\n    body: {\n        [key: string]: unknown;\n    } | null;\n    headers: {\n        /**\n         * This is the parameter that goes into the header\n         */\n        parameterHeader: string | null;\n    };\n    path: {\n        /**\n         * This is the parameter that goes into the path\n         */\n        parameterPath: string | null;\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string | null;\n    };\n    query: {\n        foo_ref_enum?: ModelWithNestedArrayEnumsDataFoo;\n        foo_all_of_enum: ModelWithNestedArrayEnumsDataFoo;\n        /**\n         * This is the parameter that goes into the query params\n         */\n        cursor: string | null;\n    };\n    url: '/api/v{api-version}/parameters/{parameterPath}';\n};\n\nexport type CallWithWeirdParameterNamesData = {\n    /**\n     * This is the parameter that goes into the body\n     */\n    body: ModelWithString | null;\n    headers: {\n        /**\n         * This is the parameter that goes into the request header\n         */\n        'parameter.header': string | null;\n    };\n    path: {\n        /**\n         * This is the parameter that goes into the path\n         */\n        'parameter.path.1'?: string;\n        /**\n         * This is the parameter that goes into the path\n         */\n        'parameter-path-2'?: string;\n        /**\n         * This is the parameter that goes into the path\n         */\n        'PARAMETER-PATH-3'?: string;\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string | null;\n    };\n    query: {\n        /**\n         * This is the parameter with a reserved keyword\n         */\n        default?: string;\n        /**\n         * This is the parameter that goes into the request query params\n         */\n        'parameter-query': string | null;\n    };\n    url: '/api/v{api-version}/parameters/{parameter.path.1}/{parameter-path-2}/{PARAMETER-PATH-3}';\n};\n\nexport type GetCallWithOptionalParamData = {\n    /**\n     * This is a required parameter\n     */\n    body: ModelWithOneOfEnum;\n    path?: never;\n    query?: {\n        /**\n         * This is an optional parameter\n         */\n        page?: number;\n    };\n    url: '/api/v{api-version}/parameters';\n};\n\nexport type PostCallWithOptionalParamData = {\n    /**\n     * This is an optional parameter\n     */\n    body?: {\n        offset?: number | null;\n    };\n    path?: never;\n    query: {\n        /**\n         * This is a required parameter\n         */\n        parameter: Pageable;\n    };\n    url: '/api/v{api-version}/parameters';\n};\n\nexport type PostCallWithOptionalParamResponses = {\n    /**\n     * Response is a simple number\n     */\n    200: number;\n    /**\n     * Success\n     */\n    204: void;\n};\n\nexport type PostCallWithOptionalParamResponse = PostCallWithOptionalParamResponses[keyof PostCallWithOptionalParamResponses];\n\nexport type PostApiVbyApiVersionRequestBodyData = {\n    /**\n     * A reusable request body\n     */\n    body?: SimpleRequestBody;\n    path?: never;\n    query?: {\n        /**\n         * This is a reusable parameter\n         */\n        parameter?: string;\n    };\n    url: '/api/v{api-version}/requestBody';\n};\n\nexport type PostApiVbyApiVersionFormDataData = {\n    /**\n     * A reusable request body\n     */\n    body?: SimpleFormData;\n    path?: never;\n    query?: {\n        /**\n         * This is a reusable parameter\n         */\n        parameter?: string;\n    };\n    url: '/api/v{api-version}/formData';\n};\n\nexport type CallWithDefaultParametersData = {\n    body?: never;\n    path?: never;\n    query?: {\n        /**\n         * This is a simple string with default value\n         */\n        parameterString?: string | null;\n        /**\n         * This is a simple number with default value\n         */\n        parameterNumber?: number | null;\n        /**\n         * This is a simple boolean with default value\n         */\n        parameterBoolean?: boolean | null;\n        /**\n         * This is a simple enum with default value\n         */\n        parameterEnum?: 'Success' | 'Warning' | 'Error';\n        /**\n         * This is a simple model with default value\n         */\n        parameterModel?: ModelWithString | null;\n    };\n    url: '/api/v{api-version}/defaults';\n};\n\nexport type CallWithDefaultOptionalParametersData = {\n    body?: never;\n    path?: never;\n    query?: {\n        /**\n         * This is a simple string that is optional with default value\n         */\n        parameterString?: string;\n        /**\n         * This is a simple number that is optional with default value\n         */\n        parameterNumber?: number;\n        /**\n         * This is a simple boolean that is optional with default value\n         */\n        parameterBoolean?: boolean;\n        /**\n         * This is a simple enum that is optional with default value\n         */\n        parameterEnum?: 'Success' | 'Warning' | 'Error';\n        /**\n         * This is a simple model that is optional with default value\n         */\n        parameterModel?: ModelWithString;\n    };\n    url: '/api/v{api-version}/defaults';\n};\n\nexport type CallToTestOrderOfParamsData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * This is a optional string with default\n         */\n        parameterOptionalStringWithDefault?: string;\n        /**\n         * This is a optional string with empty default\n         */\n        parameterOptionalStringWithEmptyDefault?: string;\n        /**\n         * This is a optional string with no default\n         */\n        parameterOptionalStringWithNoDefault?: string;\n        /**\n         * This is a string with default\n         */\n        parameterStringWithDefault: string;\n        /**\n         * This is a string with empty default\n         */\n        parameterStringWithEmptyDefault: string;\n        /**\n         * This is a string with no default\n         */\n        parameterStringWithNoDefault: string;\n        /**\n         * This is a string that can be null with no default\n         */\n        parameterStringNullableWithNoDefault?: string | null;\n        /**\n         * This is a string that can be null with default\n         */\n        parameterStringNullableWithDefault?: string | null;\n    };\n    url: '/api/v{api-version}/defaults';\n};\n\nexport type DuplicateNameData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/duplicate';\n};\n\nexport type DuplicateName2Data = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/duplicate';\n};\n\nexport type DuplicateName3Data = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/duplicate';\n};\n\nexport type DuplicateName4Data = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/duplicate';\n};\n\nexport type CallWithNoContentResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no-content';\n};\n\nexport type CallWithNoContentResponseResponses = {\n    /**\n     * Success\n     */\n    204: void;\n};\n\nexport type CallWithNoContentResponseResponse = CallWithNoContentResponseResponses[keyof CallWithNoContentResponseResponses];\n\nexport type CallWithResponseAndNoContentResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multiple-tags/response-and-no-content';\n};\n\nexport type CallWithResponseAndNoContentResponseResponses = {\n    /**\n     * Response is a simple number\n     */\n    200: number;\n    /**\n     * Success\n     */\n    204: void;\n};\n\nexport type CallWithResponseAndNoContentResponseResponse = CallWithResponseAndNoContentResponseResponses[keyof CallWithResponseAndNoContentResponseResponses];\n\nexport type DummyAData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multiple-tags/a';\n};\n\nexport type DummyAResponses = {\n    200: _400;\n};\n\nexport type DummyAResponse = DummyAResponses[keyof DummyAResponses];\n\nexport type DummyBData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multiple-tags/b';\n};\n\nexport type DummyBResponses = {\n    /**\n     * Success\n     */\n    204: void;\n};\n\nexport type DummyBResponse = DummyBResponses[keyof DummyBResponses];\n\nexport type CallWithResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/response';\n};\n\nexport type CallWithResponseResponses = {\n    default: Import;\n};\n\nexport type CallWithResponseResponse = CallWithResponseResponses[keyof CallWithResponseResponses];\n\nexport type CallWithDuplicateResponsesData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/response';\n};\n\nexport type CallWithDuplicateResponsesErrors = {\n    /**\n     * Message for 500 error\n     */\n    500: ModelWithStringError;\n    /**\n     * Message for 501 error\n     */\n    501: ModelWithStringError;\n    /**\n     * Message for 502 error\n     */\n    502: ModelWithStringError;\n    /**\n     * Message for 4XX errors\n     */\n    '4XX': DictionaryWithArray;\n    /**\n     * Default error response\n     */\n    default: ModelWithBoolean;\n};\n\nexport type CallWithDuplicateResponsesError = CallWithDuplicateResponsesErrors[keyof CallWithDuplicateResponsesErrors];\n\nexport type CallWithDuplicateResponsesResponses = {\n    /**\n     * Message for 200 response\n     */\n    200: ModelWithBoolean & ModelWithInteger;\n    /**\n     * Message for 201 response\n     */\n    201: ModelWithString;\n    /**\n     * Message for 202 response\n     */\n    202: ModelWithString;\n};\n\nexport type CallWithDuplicateResponsesResponse = CallWithDuplicateResponsesResponses[keyof CallWithDuplicateResponsesResponses];\n\nexport type CallWithResponsesData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/response';\n};\n\nexport type CallWithResponsesErrors = {\n    /**\n     * Message for 500 error\n     */\n    500: ModelWithStringError;\n    /**\n     * Message for 501 error\n     */\n    501: ModelWithStringError;\n    /**\n     * Message for 502 error\n     */\n    502: ModelWithStringError;\n    /**\n     * Message for default response\n     */\n    default: ModelWithStringError;\n};\n\nexport type CallWithResponsesError = CallWithResponsesErrors[keyof CallWithResponsesErrors];\n\nexport type CallWithResponsesResponses = {\n    /**\n     * Message for 200 response\n     */\n    200: {\n        readonly '@namespace.string'?: string;\n        readonly '@namespace.integer'?: number;\n        readonly value?: Array<ModelWithString>;\n    };\n    /**\n     * Message for 201 response\n     */\n    201: ModelThatExtends;\n    /**\n     * Message for 202 response\n     */\n    202: ModelThatExtendsExtends;\n};\n\nexport type CallWithResponsesResponse = CallWithResponsesResponses[keyof CallWithResponsesResponses];\n\nexport type CollectionFormatData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * This is an array parameter that is sent as csv format (comma-separated values)\n         */\n        parameterArrayCSV: Array<string> | null;\n        /**\n         * This is an array parameter that is sent as ssv format (space-separated values)\n         */\n        parameterArraySSV: Array<string> | null;\n        /**\n         * This is an array parameter that is sent as tsv format (tab-separated values)\n         */\n        parameterArrayTSV: Array<string> | null;\n        /**\n         * This is an array parameter that is sent as pipes format (pipe-separated values)\n         */\n        parameterArrayPipes: Array<string> | null;\n        /**\n         * This is an array parameter that is sent as multi format (multiple parameter instances)\n         */\n        parameterArrayMulti: Array<string> | null;\n    };\n    url: '/api/v{api-version}/collectionFormat';\n};\n\nexport type TypesData = {\n    body?: never;\n    path?: {\n        /**\n         * This is a number parameter\n         */\n        id?: number;\n    };\n    query: {\n        /**\n         * This is a number parameter\n         */\n        parameterNumber: number;\n        /**\n         * This is a string parameter\n         */\n        parameterString: string | null;\n        /**\n         * This is a boolean parameter\n         */\n        parameterBoolean: boolean | null;\n        /**\n         * This is an object parameter\n         */\n        parameterObject: {\n            [key: string]: unknown;\n        } | null;\n        /**\n         * This is an array parameter\n         */\n        parameterArray: Array<string> | null;\n        /**\n         * This is a dictionary parameter\n         */\n        parameterDictionary: {\n            [key: string]: unknown;\n        } | null;\n        /**\n         * This is an enum parameter\n         */\n        parameterEnum: 'Success' | 'Warning' | 'Error' | null;\n    };\n    url: '/api/v{api-version}/types';\n};\n\nexport type TypesResponses = {\n    /**\n     * Response is a simple number\n     */\n    200: number;\n    /**\n     * Response is a simple string\n     */\n    201: string;\n    /**\n     * Response is a simple boolean\n     */\n    202: boolean;\n    /**\n     * Response is a simple object\n     */\n    203: {\n        [key: string]: unknown;\n    };\n};\n\nexport type TypesResponse = TypesResponses[keyof TypesResponses];\n\nexport type UploadFileData = {\n    body: Blob | File;\n    path: {\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string | null;\n    };\n    query?: never;\n    url: '/api/v{api-version}/upload';\n};\n\nexport type UploadFileResponses = {\n    200: boolean;\n};\n\nexport type UploadFileResponse = UploadFileResponses[keyof UploadFileResponses];\n\nexport type FileResponseData = {\n    body?: never;\n    path: {\n        id: string;\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string;\n    };\n    query?: never;\n    url: '/api/v{api-version}/file/{id}';\n};\n\nexport type FileResponseResponses = {\n    /**\n     * Success\n     */\n    200: Blob | File;\n};\n\nexport type FileResponseResponse = FileResponseResponses[keyof FileResponseResponses];\n\nexport type ComplexTypesData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * Parameter containing object\n         */\n        parameterObject: {\n            first?: {\n                second?: {\n                    third?: string;\n                };\n            };\n        };\n        /**\n         * Parameter containing reference\n         */\n        parameterReference: ModelWithString;\n    };\n    url: '/api/v{api-version}/complex';\n};\n\nexport type ComplexTypesErrors = {\n    /**\n     * 400 `server` error\n     */\n    400: unknown;\n    /**\n     * 500 server error\n     */\n    500: unknown;\n};\n\nexport type ComplexTypesResponses = {\n    /**\n     * Successful response\n     */\n    200: Array<ModelWithString>;\n};\n\nexport type ComplexTypesResponse = ComplexTypesResponses[keyof ComplexTypesResponses];\n\nexport type MultipartResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multipart';\n};\n\nexport type MultipartResponseResponses = {\n    /**\n     * OK\n     */\n    200: {\n        file?: Blob | File;\n        metadata?: {\n            foo?: string;\n            bar?: string;\n        };\n    };\n};\n\nexport type MultipartResponseResponse = MultipartResponseResponses[keyof MultipartResponseResponses];\n\nexport type MultipartRequestData = {\n    body?: {\n        content?: Blob | File;\n        data?: ModelWithString | null;\n    };\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multipart';\n};\n\nexport type ComplexParamsData = {\n    body?: {\n        readonly key: string | null;\n        name: string | null;\n        enabled?: boolean;\n        type: 'Monkey' | 'Horse' | 'Bird';\n        listOfModels?: Array<ModelWithString> | null;\n        listOfStrings?: Array<string> | null;\n        parameters: ModelWithString | ModelWithEnum | ModelWithArray | ModelWithDictionary;\n        readonly user?: {\n            readonly id?: number;\n            readonly name?: string | null;\n        };\n    };\n    path: {\n        id: number;\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string;\n    };\n    query?: never;\n    url: '/api/v{api-version}/complex/{id}';\n};\n\nexport type ComplexParamsResponses = {\n    /**\n     * Success\n     */\n    200: ModelWithString;\n};\n\nexport type ComplexParamsResponse = ComplexParamsResponses[keyof ComplexParamsResponses];\n\nexport type CallWithResultFromHeaderData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/header';\n};\n\nexport type CallWithResultFromHeaderErrors = {\n    /**\n     * 400 server error\n     */\n    400: unknown;\n    /**\n     * 500 server error\n     */\n    500: unknown;\n};\n\nexport type CallWithResultFromHeaderResponses = {\n    /**\n     * Successful response\n     */\n    200: unknown;\n};\n\nexport type TestErrorCodeData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * Status code to return\n         */\n        status: number;\n    };\n    url: '/api/v{api-version}/error';\n};\n\nexport type TestErrorCodeErrors = {\n    /**\n     * Custom message: Internal Server Error\n     */\n    500: unknown;\n    /**\n     * Custom message: Not Implemented\n     */\n    501: unknown;\n    /**\n     * Custom message: Bad Gateway\n     */\n    502: unknown;\n    /**\n     * Custom message: Service Unavailable\n     */\n    503: unknown;\n};\n\nexport type TestErrorCodeResponses = {\n    /**\n     * Custom message: Successful response\n     */\n    200: unknown;\n};\n\nexport type NonAsciiæøåÆøÅöôêÊ字符串Data = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * Dummy input param\n         */\n        nonAsciiParamæøåÆØÅöôêÊ: number;\n    };\n    url: '/api/v{api-version}/non-ascii-æøåÆØÅöôêÊ字符串';\n};\n\nexport type NonAsciiæøåÆøÅöôêÊ字符串Responses = {\n    /**\n     * Successful response\n     */\n    200: Array<NonAsciiStringæøåÆøÅöôêÊ字符串>;\n};\n\nexport type NonAsciiæøåÆøÅöôêÊ字符串Response = NonAsciiæøåÆøÅöôêÊ字符串Responses[keyof NonAsciiæøåÆøÅöôêÊ字符串Responses];\n\nexport type PutWithFormUrlEncodedData = {\n    body: ArrayWithStrings;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/non-ascii-æøåÆØÅöôêÊ字符串';\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/my-client/base-url-number/client/client.ts",
    "content": "import type { Client, Config, RequestOptions } from './types';\nimport {\n  buildUrl,\n  createConfig,\n  createInterceptors,\n  getParseAs,\n  mergeConfigs,\n  mergeHeaders,\n  setAuthParams,\n} from './utils';\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, RequestOptions>();\n\n  // @ts-expect-error\n  const request: Client['request'] = async (options) => {\n    const opts = {\n      ..._config,\n      ...options,\n      fetch: options.fetch ?? _config.fetch ?? globalThis.fetch,\n      headers: mergeHeaders(_config.headers, options.headers),\n    };\n\n    if (opts.security) {\n      await setAuthParams({\n        ...opts,\n        security: opts.security,\n      });\n    }\n\n    if (opts.body && opts.bodySerializer) {\n      opts.body = opts.bodySerializer(opts.body);\n    }\n\n    // remove Content-Type header if body is empty to avoid sending invalid requests\n    if (opts.body === undefined || opts.body === '') {\n      opts.headers.delete('Content-Type');\n    }\n\n    const url = buildUrl(opts);\n    const requestInit: ReqInit = {\n      redirect: 'follow',\n      ...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 = await _fetch(request);\n\n    for (const fn of interceptors.response.fns) {\n      if (fn) {\n        response = await fn(response, request, opts);\n      }\n    }\n\n    const result = {\n      request,\n      response,\n    };\n\n    if (response.ok) {\n      if (response.status === 204 || response.headers.get('Content-Length') === '0') {\n        return {\n          data: {},\n          ...result,\n        };\n      }\n\n      const parseAs =\n        (opts.parseAs === 'auto'\n          ? getParseAs(response.headers.get('Content-Type'))\n          : opts.parseAs) ?? 'json';\n\n      if (parseAs === 'stream') {\n        return {\n          data: response.body,\n          ...result,\n        };\n      }\n\n      let data = await response[parseAs]();\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 {\n        data,\n        ...result,\n      };\n    }\n\n    let error = await response.text();\n\n    try {\n      error = JSON.parse(error);\n    } catch {\n      // noop\n    }\n\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    return {\n      error: finalError,\n      ...result,\n    };\n  };\n\n  return {\n    buildUrl,\n    connect: (options) => request({ ...options, method: 'CONNECT' }),\n    delete: (options) => request({ ...options, method: 'DELETE' }),\n    get: (options) => request({ ...options, method: 'GET' }),\n    getConfig,\n    head: (options) => request({ ...options, method: 'HEAD' }),\n    interceptors,\n    options: (options) => request({ ...options, method: 'OPTIONS' }),\n    patch: (options) => request({ ...options, method: 'PATCH' }),\n    post: (options) => request({ ...options, method: 'POST' }),\n    put: (options) => request({ ...options, method: 'PUT' }),\n    request,\n    setConfig,\n    trace: (options) => request({ ...options, method: 'TRACE' }),\n  };\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/my-client/base-url-number/client/core/auth.ts",
    "content": "export 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/my-client/base-url-number/client/core/bodySerializer.ts",
    "content": "import type { ArrayStyle, ObjectStyle, SerializerOptions } from './pathSerializer';\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) => {\n  if (typeof value === 'string' || value instanceof Blob) {\n    data.append(key, value);\n  } else {\n    data.append(key, JSON.stringify(value));\n  }\n};\n\nconst serializeUrlSearchParamsPair = (data: URLSearchParams, key: string, value: unknown) => {\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) => {\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) =>\n    JSON.stringify(body, (_key, value) => (typeof value === 'bigint' ? value.toString() : value)),\n};\n\nexport const urlSearchParamsBodySerializer = {\n  bodySerializer: (body: unknown) => {\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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/my-client/base-url-number/client/core/params.ts",
    "content": "type Slot = 'body' | 'headers' | 'path' | 'query';\n\nexport type Field =\n  | {\n      in: Exclude<Slot, 'body'>;\n      key: string;\n      map?: string;\n    }\n  | {\n      in: Extract<Slot, 'body'>;\n      key?: string;\n      map?: string;\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\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 (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' && !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        (params[field.in] as Record<string, unknown>)[name] = arg;\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          const name = field.map || key;\n          (params[field.in] as Record<string, unknown>)[name] = value;\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 {\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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/my-client/base-url-number/client/core/pathSerializer.ts",
    "content": "interface 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/my-client/base-url-number/client/core/types.ts",
    "content": "import type { Auth, AuthToken } from './auth';\nimport type { BodySerializer, QuerySerializer, QuerySerializerOptions } from './bodySerializer';\n\nexport interface Client<RequestFn = never, Config = unknown, MethodFn = never, BuildUrlFn = never> {\n  /**\n   * Returns the final request URL.\n   */\n  buildUrl: BuildUrlFn;\n  connect: MethodFn;\n  delete: MethodFn;\n  get: MethodFn;\n  getConfig: () => Config;\n  head: MethodFn;\n  options: MethodFn;\n  patch: MethodFn;\n  post: MethodFn;\n  put: MethodFn;\n  request: RequestFn;\n  setConfig: (config: Config) => Config;\n  trace: MethodFn;\n}\n\nexport interface Config {\n  /**\n   * Auth token or a function returning auth token. The resolved value will be\n   * added to the request payload as defined by its `security` array.\n   */\n  auth?: ((auth: Auth) => Promise<AuthToken> | AuthToken) | AuthToken;\n  /**\n   * A function for serializing request body parameter. By default,\n   * {@link JSON.stringify()} will be used.\n   */\n  bodySerializer?: BodySerializer | null;\n  /**\n   * An object containing any HTTP headers that you want to pre-populate your\n   * `Headers` object with.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/Headers/Headers#init See more}\n   */\n  headers?:\n    | RequestInit['headers']\n    | Record<\n        string,\n        string | number | boolean | (string | number | boolean)[] | null | undefined | unknown\n      >;\n  /**\n   * The request method.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/fetch#method See more}\n   */\n  method?: 'CONNECT' | 'DELETE' | 'GET' | 'HEAD' | 'OPTIONS' | 'PATCH' | 'POST' | 'PUT' | 'TRACE';\n  /**\n   * A function for serializing request query parameters. By default, arrays\n   * will be exploded in form style, objects will be exploded in deepObject\n   * style, and reserved characters are percent-encoded.\n   *\n   * This method will have no effect if the native `paramsSerializer()` Axios\n   * API function is used.\n   *\n   * {@link https://swagger.io/docs/specification/serialization/#query View examples}\n   */\n  querySerializer?: QuerySerializer | QuerySerializerOptions;\n  /**\n   * A function transforming response data before it's returned. This is useful\n   * for post-processing data, e.g. converting ISO strings into Date objects.\n   */\n  responseTransformer?: (data: unknown) => Promise<unknown>;\n  /**\n   * A function validating response data. This is useful if you want to ensure\n   * the response conforms to the desired shape, so it can be safely passed to\n   * the transformers and returned to the user.\n   */\n  responseValidator?: (data: unknown) => Promise<unknown>;\n}\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/my-client/base-url-number/client/index.ts",
    "content": "export { createClient } from './client';\nexport type { Auth } from './core/auth';\nexport type { QuerySerializerOptions } from './core/bodySerializer';\nexport {\n  formDataBodySerializer,\n  jsonBodySerializer,\n  urlSearchParamsBodySerializer,\n} from './core/bodySerializer';\nexport type {\n  Client,\n  ClientOptions,\n  Config,\n  CreateClientConfig,\n  Options,\n  RequestOptions,\n  RequestResult,\n  TDataShape,\n} from './types';\nexport { createConfig } from './utils';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/my-client/base-url-number/client/plugin.ts",
    "content": "import {\n  type Client,\n  clientDefaultConfig,\n  clientDefaultMeta,\n  clientPluginHandler,\n  type DefinePlugin,\n  definePluginConfig,\n} from '@hey-api/openapi-ts';\n\nexport type Config = Client.Config & {\n  /**\n   * Plugin name. Must be unique.\n   */\n  name: string;\n};\n\nexport type MyClientPlugin = DefinePlugin<Config, Config>;\n\nexport const defaultConfig: MyClientPlugin['Config'] = {\n  ...clientDefaultMeta,\n  config: clientDefaultConfig,\n  handler: clientPluginHandler as MyClientPlugin['Handler'],\n  name: __filename,\n};\n\n/**\n * Type helper for `my-client` plugin, returns {@link Plugin.Config} object\n */\nexport const myClientPlugin = definePluginConfig(defaultConfig);\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/my-client/base-url-number/client/types.ts",
    "content": "import type { Auth } from './core/auth';\nimport type { Client as CoreClient, Config as CoreConfig } from './core/types';\nimport type { Middleware } from './utils';\n\nexport interface Config<T extends ClientOptions = ClientOptions>\n  extends Omit<RequestInit, 'body' | 'headers' | 'method'>, CoreConfig {\n  /**\n   * Base URL for all requests made by this client.\n   */\n  baseUrl?: T['baseUrl'];\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?: (request: Request) => ReturnType<typeof fetch>;\n  /**\n   * Return the response data parsed in a specified format. By default, `auto`\n   * will infer the appropriate method from the `Content-Type` response header.\n   * You can override this behavior with any of the {@link Body} methods.\n   * Select `stream` if you don't want to parse response data at all.\n   *\n   * @default 'auto'\n   */\n  parseAs?: 'arrayBuffer' | 'auto' | 'blob' | 'formData' | 'json' | 'stream' | 'text';\n  /**\n   * Throw an error instead of returning it in the response?\n   *\n   * @default false\n   */\n  throwOnError?: T['throwOnError'];\n}\n\nexport interface RequestOptions<\n  ThrowOnError extends boolean = boolean,\n  Url extends string = string,\n> extends Config<{\n  throwOnError: ThrowOnError;\n}> {\n  /**\n   * Any body that you want to add to your request.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/fetch#body}\n   */\n  body?: unknown;\n  path?: Record<string, unknown>;\n  query?: Record<string, unknown>;\n  /**\n   * Security mechanism(s) to use for the request.\n   */\n  security?: ReadonlyArray<Auth>;\n  url: Url;\n}\n\nexport type RequestResult<\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = boolean,\n> = ThrowOnError extends true\n  ? Promise<{\n      data: TData;\n      request: Request;\n      response: Response;\n    }>\n  : Promise<\n      ({ data: TData; error: undefined } | { data: undefined; error: TError }) & {\n        request: Request;\n        response: Response;\n      }\n    >;\n\nexport interface ClientOptions {\n  baseUrl?: string;\n  throwOnError?: boolean;\n}\n\ntype MethodFn = <TData = unknown, TError = unknown, ThrowOnError extends boolean = false>(\n  options: Omit<RequestOptions<ThrowOnError>, 'method'>,\n) => RequestResult<TData, TError, ThrowOnError>;\n\ntype RequestFn = <TData = unknown, TError = unknown, ThrowOnError extends boolean = false>(\n  options: Omit<RequestOptions<ThrowOnError>, 'method'> &\n    Pick<Required<RequestOptions<ThrowOnError>>, 'method'>,\n) => RequestResult<TData, TError, ThrowOnError>;\n\ntype BuildUrlFn = <\n  TData extends {\n    body?: unknown;\n    path?: Record<string, unknown>;\n    query?: Record<string, unknown>;\n    url: string;\n  },\n>(\n  options: TData & Options<TData>,\n) => string;\n\nexport type Client = CoreClient<RequestFn, Config, MethodFn, BuildUrlFn> & {\n  interceptors: Middleware<Request, Response, unknown, RequestOptions>;\n};\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 = ClientOptions> = (\n  override?: Config<ClientOptions & T>,\n) => Config<Required<ClientOptions> & T>;\n\nexport interface TDataShape {\n  body?: unknown;\n  headers?: unknown;\n  path?: unknown;\n  query?: unknown;\n  url: string;\n}\n\ntype OmitKeys<T, K> = Pick<T, Exclude<keyof T, K>>;\n\nexport type Options<\n  TData extends TDataShape = TDataShape,\n  ThrowOnError extends boolean = boolean,\n> = OmitKeys<RequestOptions<ThrowOnError>, 'body' | 'path' | 'query' | 'url'> & Omit<TData, 'url'>;\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/my-client/base-url-number/client/utils.ts",
    "content": "import { getAuthToken } from './core/auth';\nimport type { QuerySerializer, QuerySerializerOptions } from './core/bodySerializer';\nimport { jsonBodySerializer } from './core/bodySerializer';\nimport {\n  serializeArrayParam,\n  serializeObjectParam,\n  serializePrimitiveParam,\n} from './core/pathSerializer';\nimport type { Client, ClientOptions, Config, RequestOptions } from './types';\n\ninterface PathSerializer {\n  path: Record<string, unknown>;\n  url: string;\n}\n\nconst PATH_PARAM_RE = /\\{[^{}]+\\}/g;\n\ntype ArrayStyle = 'form' | 'spaceDelimited' | 'pipeDelimited';\ntype MatrixStyle = 'label' | 'matrix' | 'simple';\ntype ArraySeparatorStyle = ArrayStyle | MatrixStyle;\n\nconst 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 createQuerySerializer = <T = unknown>({\n  allowReserved,\n  array,\n  object,\n}: QuerySerializerOptions = {}) => {\n  const querySerializer = (queryParams: T) => {\n    let 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        if (Array.isArray(value)) {\n          search = [\n            ...search,\n            serializeArrayParam({\n              allowReserved,\n              explode: true,\n              name,\n              style: 'form',\n              value,\n              ...array,\n            }),\n          ];\n          continue;\n        }\n\n        if (typeof value === 'object') {\n          search = [\n            ...search,\n            serializeObjectParam({\n              allowReserved,\n              explode: true,\n              name,\n              style: 'deepObject',\n              value: value as Record<string, unknown>,\n              ...object,\n            }),\n          ];\n          continue;\n        }\n\n        search = [\n          ...search,\n          serializePrimitiveParam({\n            allowReserved,\n            name,\n            value: value as string,\n          }),\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\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    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    return;\n  }\n};\n\nexport const buildUrl: Client['buildUrl'] = (options) => {\n  const url = 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  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 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\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 || typeof header !== 'object') {\n      continue;\n    }\n\n    const iterator = header instanceof Headers ? header.entries() : 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/my-client/base-url-number/custom.gen.ts",
    "content": "// 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: 'http://localhost:3000/base' }));\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/my-client/base-url-number/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type { _3eNum1Период, _400, AdditionalPropertiesIntegerIssue, AdditionalPropertiesUnknownIssue, AdditionalPropertiesUnknownIssue2, AdditionalPropertiesUnknownIssue3, AdditionalPropertiesUnknownIssueWritable, AnyOfAnyAndNull, AnyOfArrays, ApiVVersionODataControllerCountData, ApiVVersionODataControllerCountResponse, ApiVVersionODataControllerCountResponses, ArrayWithAnyOfProperties, ArrayWithArray, ArrayWithBooleans, ArrayWithNumbers, ArrayWithProperties, ArrayWithReferences, ArrayWithStrings, CallToTestOrderOfParamsData, CallWithDefaultOptionalParametersData, CallWithDefaultParametersData, CallWithDescriptionsData, CallWithDuplicateResponsesData, CallWithDuplicateResponsesError, CallWithDuplicateResponsesErrors, CallWithDuplicateResponsesResponse, CallWithDuplicateResponsesResponses, CallWithNoContentResponseData, CallWithNoContentResponseResponse, CallWithNoContentResponseResponses, CallWithParametersData, CallWithResponseAndNoContentResponseData, CallWithResponseAndNoContentResponseResponse, CallWithResponseAndNoContentResponseResponses, CallWithResponseData, CallWithResponseResponse, CallWithResponseResponses, CallWithResponsesData, CallWithResponsesError, CallWithResponsesErrors, CallWithResponsesResponse, CallWithResponsesResponses, CallWithResultFromHeaderData, CallWithResultFromHeaderErrors, CallWithResultFromHeaderResponses, CallWithWeirdParameterNamesData, CamelCaseCommentWithBreaks, CharactersInDescription, ClientOptions, CollectionFormatData, CommentWithBackticks, CommentWithBackticksAndQuotes, CommentWithBreaks, CommentWithExpressionPlaceholders, CommentWithQuotes, CommentWithReservedCharacters, CommentWithSlashes, ComplexParamsData, ComplexParamsResponse, ComplexParamsResponses, ComplexTypesData, ComplexTypesErrors, ComplexTypesResponse, ComplexTypesResponses, CompositionBaseModel, CompositionExtendedModel, CompositionWithAllOfAndNullable, CompositionWithAnyOf, CompositionWithAnyOfAndNullable, CompositionWithAnyOfAnonymous, CompositionWithNestedAnyAndTypeNull, CompositionWithNestedAnyOfAndNull, CompositionWithOneOf, CompositionWithOneOfAndComplexArrayDictionary, CompositionWithOneOfAndNullable, CompositionWithOneOfAndProperties, CompositionWithOneOfAndSimpleArrayDictionary, CompositionWithOneOfAndSimpleDictionary, CompositionWithOneOfAnonymous, CompositionWithOneOfDiscriminator, ConstValue, Default, DeleteCallWithoutParametersAndResponseData, DeleteFooData, DeleteFooData2, DeleteFooData3, DeprecatedCallData, DeprecatedModel, DictionaryWithArray, DictionaryWithDictionary, DictionaryWithProperties, DictionaryWithPropertiesAndAdditionalProperties, DictionaryWithReference, DictionaryWithString, DummyAData, DummyAResponse, DummyAResponses, DummyBData, DummyBResponse, DummyBResponses, DuplicateName2Data, DuplicateName3Data, DuplicateName4Data, DuplicateNameData, EnumFromDescription, EnumWithExtensions, EnumWithNumbers, EnumWithReplacedCharacters, EnumWithStrings, EnumWithXEnumNames, ExportData, ExternalRefA, ExternalRefB, ExternalSharedModel, File, FileResponseData, FileResponseResponse, FileResponseResponses, FileWritable, FooWowData, FooWowResponses, FreeFormObjectWithAdditionalPropertiesEqEmptyObject, FreeFormObjectWithAdditionalPropertiesEqTrue, FreeFormObjectWithoutAdditionalProperties, GenericSchemaDuplicateIssue1SystemBoolean, GenericSchemaDuplicateIssue1SystemBooleanWritable, GenericSchemaDuplicateIssue1SystemString, GenericSchemaDuplicateIssue1SystemStringWritable, GetApiVbyApiVersionSimpleOperationData, GetApiVbyApiVersionSimpleOperationError, GetApiVbyApiVersionSimpleOperationErrors, GetApiVbyApiVersionSimpleOperationResponse, GetApiVbyApiVersionSimpleOperationResponses, GetCallWithOptionalParamData, GetCallWithoutParametersAndResponseData, HeadCallWithoutParametersAndResponseData, Import, ImportData, ImportResponse, ImportResponses, IoK8sApimachineryPkgApisMetaV1DeleteOptions, IoK8sApimachineryPkgApisMetaV1Preconditions, ModelCircle, ModelFromZendesk, ModelSquare, ModelThatExtends, ModelThatExtendsExtends, ModelWithAdditionalPropertiesEqTrue, ModelWithAdditionalPropertiesRef, ModelWithAnyOfConstantSizeArray, ModelWithAnyOfConstantSizeArrayAndIntersect, ModelWithAnyOfConstantSizeArrayNullable, ModelWithAnyOfConstantSizeArrayWithNSizeAndOptions, ModelWithAnyOfConstantSizeArrayWithNSizeAndOptionsWritable, ModelWithArray, ModelWithArrayReadOnlyAndWriteOnly, ModelWithArrayReadOnlyAndWriteOnlyWritable, ModelWithBackticksInDescription, ModelWithBoolean, ModelWithCircularReference, ModelWithConst, ModelWithConstantSizeArray, ModelWithDictionary, ModelWithDuplicateImports, ModelWithDuplicateProperties, ModelWithEnum, ModelWithEnumFromDescription, ModelWithEnumWithHyphen, ModelWithInteger, ModelWithNestedArrayEnums, ModelWithNestedArrayEnumsData, ModelWithNestedArrayEnumsDataBar, ModelWithNestedArrayEnumsDataFoo, ModelWithNestedCompositionEnums, ModelWithNestedEnums, ModelWithNestedProperties, ModelWithNullableObject, ModelWithNullableString, ModelWithNumericEnumUnion, ModelWithOneOfAndProperties, ModelWithOneOfEnum, ModelWithOrderedProperties, ModelWithPattern, ModelWithPatternWritable, ModelWithPrefixItemsConstantSizeArray, ModelWithProperties, ModelWithPropertiesWritable, ModelWithReadOnlyAndWriteOnly, ModelWithReadOnlyAndWriteOnlyWritable, ModelWithReference, ModelWithReferenceWritable, ModelWithString, ModelWithStringError, MultipartRequestData, MultipartResponseData, MultipartResponseResponse, MultipartResponseResponses, NestedAnyOfArraysNullable, NonAsciiæøåÆøÅöôêÊ字符串Data, NonAsciiæøåÆøÅöôêÊ字符串Response, NonAsciiæøåÆøÅöôêÊ字符串Responses, NonAsciiStringæøåÆøÅöôêÊ字符串, NullableObject, OneOfAllOfIssue, OneOfAllOfIssueWritable, OptionsCallWithoutParametersAndResponseData, Pageable, ParameterSimpleParameterUnused, PatchApiVbyApiVersionNoTagData, PatchApiVbyApiVersionNoTagResponses, PatchCallWithoutParametersAndResponseData, PostApiVbyApiVersionFormDataData, PostApiVbyApiVersionRequestBodyData, PostCallWithOptionalParamData, PostCallWithOptionalParamResponse, PostCallWithOptionalParamResponses, PostCallWithoutParametersAndResponseData, PostServiceWithEmptyTagResponse, PostServiceWithEmptyTagResponse2, PutCallWithoutParametersAndResponseData, PutWithFormUrlEncodedData, SchemaWithFormRestrictedKeys, SimpleBoolean, SimpleFile, SimpleFormData, SimpleInteger, SimpleParameter, SimpleReference, SimpleRequestBody, SimpleString, SimpleStringWithPattern, TestErrorCodeData, TestErrorCodeErrors, TestErrorCodeResponses, TypesData, TypesResponse, TypesResponses, UploadFileData, UploadFileResponse, UploadFileResponses, XFooBar } from './types.gen';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/my-client/base-url-number/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type ClientOptions = {\n    baseUrl: 'http://localhost:3000/base' | (string & {});\n};\n\n/**\n * Model with number-only name\n */\nexport type _400 = string;\n\n/**\n * External ref to shared model (A)\n */\nexport type ExternalRefA = ExternalSharedModel;\n\n/**\n * External ref to shared model (B)\n */\nexport type ExternalRefB = ExternalSharedModel;\n\n/**\n * Testing multiline comments in string: First line\n * Second line\n *\n * Fourth line\n */\nexport type CamelCaseCommentWithBreaks = number;\n\n/**\n * Testing multiline comments in string: First line\n * Second line\n *\n * Fourth line\n */\nexport type CommentWithBreaks = number;\n\n/**\n * Testing backticks in string: `backticks` and ```multiple backticks``` should work\n */\nexport type CommentWithBackticks = number;\n\n/**\n * Testing backticks and quotes in string: `backticks`, 'quotes', \"double quotes\" and ```multiple backticks``` should work\n */\nexport type CommentWithBackticksAndQuotes = number;\n\n/**\n * Testing slashes in string: \\backwards\\\\\\ and /forwards/// should work\n */\nexport type CommentWithSlashes = number;\n\n/**\n * Testing expression placeholders in string: ${expression} should work\n */\nexport type CommentWithExpressionPlaceholders = number;\n\n/**\n * Testing quotes in string: 'single quote''' and \"double quotes\"\"\" should work\n */\nexport type CommentWithQuotes = number;\n\n/**\n * Testing reserved characters in string: * inline * and ** inline ** should work\n */\nexport type CommentWithReservedCharacters = number;\n\n/**\n * This is a simple number\n */\nexport type SimpleInteger = number;\n\n/**\n * This is a simple boolean\n */\nexport type SimpleBoolean = boolean;\n\n/**\n * This is a simple string\n */\nexport type SimpleString = string;\n\n/**\n * A string with non-ascii (unicode) characters valid in typescript identifiers (æøåÆØÅöÔèÈ字符串)\n */\nexport type NonAsciiStringæøåÆøÅöôêÊ字符串 = string;\n\n/**\n * This is a simple file\n */\nexport type SimpleFile = Blob | File;\n\n/**\n * This is a simple reference\n */\nexport type SimpleReference = ModelWithString;\n\n/**\n * This is a simple string\n */\nexport type SimpleStringWithPattern = string | null;\n\n/**\n * This is a simple enum with strings\n */\nexport type EnumWithStrings = 'Success' | 'Warning' | 'Error' | '\\'Single Quote\\'' | '\"Double Quotes\"' | 'Non-ascii: øæåôöØÆÅÔÖ字符串';\n\nexport type EnumWithReplacedCharacters = '\\'Single Quote\\'' | '\"Double Quotes\"' | 'øæåôöØÆÅÔÖ字符串' | 3.1 | '';\n\n/**\n * This is a simple enum with numbers\n */\nexport type EnumWithNumbers = 1 | 2 | 3 | 1.1 | 1.2 | 1.3 | 100 | 200 | 300 | -100 | -200 | -300 | -1.1 | -1.2 | -1.3;\n\n/**\n * Success=1,Warning=2,Error=3\n */\nexport type EnumFromDescription = number;\n\n/**\n * This is a simple enum with numbers\n */\nexport type EnumWithExtensions = 200 | 400 | 500;\n\nexport type EnumWithXEnumNames = 0 | 1 | 2;\n\n/**\n * This is a simple array with numbers\n */\nexport type ArrayWithNumbers = Array<number>;\n\n/**\n * This is a simple array with booleans\n */\nexport type ArrayWithBooleans = Array<boolean>;\n\n/**\n * This is a simple array with strings\n */\nexport type ArrayWithStrings = Array<string>;\n\n/**\n * This is a simple array with references\n */\nexport type ArrayWithReferences = Array<ModelWithString>;\n\n/**\n * This is a simple array containing an array\n */\nexport type ArrayWithArray = Array<Array<ModelWithString>>;\n\n/**\n * This is a simple array with properties\n */\nexport type ArrayWithProperties = Array<{\n    '16x16'?: CamelCaseCommentWithBreaks;\n    bar?: string;\n}>;\n\n/**\n * This is a simple array with any of properties\n */\nexport type ArrayWithAnyOfProperties = Array<{\n    foo?: string;\n} | {\n    bar?: string;\n}>;\n\nexport type AnyOfAnyAndNull = {\n    data?: unknown | null;\n};\n\n/**\n * This is a simple array with any of properties\n */\nexport type AnyOfArrays = {\n    results?: Array<{\n        foo?: string;\n    } | {\n        bar?: string;\n    }>;\n};\n\n/**\n * This is a string dictionary\n */\nexport type DictionaryWithString = {\n    [key: string]: string;\n};\n\nexport type DictionaryWithPropertiesAndAdditionalProperties = {\n    foo?: number;\n    bar?: boolean;\n    [key: string]: string | number | boolean | undefined;\n};\n\n/**\n * This is a string reference\n */\nexport type DictionaryWithReference = {\n    [key: string]: ModelWithString;\n};\n\n/**\n * This is a complex dictionary\n */\nexport type DictionaryWithArray = {\n    [key: string]: Array<ModelWithString>;\n};\n\n/**\n * This is a string dictionary\n */\nexport type DictionaryWithDictionary = {\n    [key: string]: {\n        [key: string]: string;\n    };\n};\n\n/**\n * This is a complex dictionary\n */\nexport type DictionaryWithProperties = {\n    [key: string]: {\n        foo?: string;\n        bar?: string;\n    };\n};\n\n/**\n * This is a model with one number property\n */\nexport type ModelWithInteger = {\n    /**\n     * This is a simple number property\n     */\n    prop?: number;\n};\n\n/**\n * This is a model with one boolean property\n */\nexport type ModelWithBoolean = {\n    /**\n     * This is a simple boolean property\n     */\n    prop?: boolean;\n};\n\n/**\n * This is a model with one string property\n */\nexport type ModelWithString = {\n    /**\n     * This is a simple string property\n     */\n    prop?: string;\n};\n\n/**\n * This is a model with one string property\n */\nexport type ModelWithStringError = {\n    /**\n     * This is a simple string property\n     */\n    prop?: string;\n};\n\n/**\n * `Comment` or `VoiceComment`. The JSON object for adding voice comments to tickets is different. See [Adding voice comments to tickets](/documentation/ticketing/managing-tickets/adding-voice-comments-to-tickets)\n */\nexport type ModelFromZendesk = string;\n\n/**\n * This is a model with one string property\n */\nexport type ModelWithNullableString = {\n    /**\n     * This is a simple string property\n     */\n    nullableProp1?: string | null;\n    /**\n     * This is a simple string property\n     */\n    nullableRequiredProp1: string | null;\n    /**\n     * This is a simple string property\n     */\n    nullableProp2?: string | null;\n    /**\n     * This is a simple string property\n     */\n    nullableRequiredProp2: string | null;\n    /**\n     * This is a simple enum with strings\n     */\n    'foo_bar-enum'?: 'Success' | 'Warning' | 'Error' | 'ØÆÅ字符串';\n};\n\n/**\n * This is a model with one enum\n */\nexport type ModelWithEnum = {\n    /**\n     * This is a simple enum with strings\n     */\n    'foo_bar-enum'?: 'Success' | 'Warning' | 'Error' | 'ØÆÅ字符串';\n    /**\n     * These are the HTTP error code enums\n     */\n    statusCode?: '100' | '200 FOO' | '300 FOO_BAR' | '400 foo-bar' | '500 foo.bar' | '600 foo&bar';\n    /**\n     * Simple boolean enum\n     */\n    bool?: true;\n};\n\n/**\n * This is a model with one enum with escaped name\n */\nexport type ModelWithEnumWithHyphen = {\n    /**\n     * Foo-Bar-Baz-Qux\n     */\n    'foo-bar-baz-qux'?: '3.0';\n};\n\n/**\n * This is a model with one enum\n */\nexport type ModelWithEnumFromDescription = {\n    /**\n     * Success=1,Warning=2,Error=3\n     */\n    test?: number;\n};\n\n/**\n * This is a model with nested enums\n */\nexport type ModelWithNestedEnums = {\n    dictionaryWithEnum?: {\n        [key: string]: 'Success' | 'Warning' | 'Error';\n    };\n    dictionaryWithEnumFromDescription?: {\n        [key: string]: number;\n    };\n    arrayWithEnum?: Array<'Success' | 'Warning' | 'Error'>;\n    arrayWithDescription?: Array<number>;\n    /**\n     * This is a simple enum with strings\n     */\n    'foo_bar-enum'?: 'Success' | 'Warning' | 'Error' | 'ØÆÅ字符串';\n};\n\n/**\n * This is a model with one property containing a reference\n */\nexport type ModelWithReference = {\n    prop?: ModelWithProperties;\n};\n\n/**\n * This is a model with one property containing an array\n */\nexport type ModelWithArrayReadOnlyAndWriteOnly = {\n    prop?: Array<ModelWithReadOnlyAndWriteOnly>;\n    propWithFile?: Array<Blob | File>;\n    propWithNumber?: Array<number>;\n};\n\n/**\n * This is a model with one property containing an array\n */\nexport type ModelWithArray = {\n    prop?: Array<ModelWithString>;\n    propWithFile?: Array<Blob | File>;\n    propWithNumber?: Array<number>;\n};\n\n/**\n * This is a model with one property containing a dictionary\n */\nexport type ModelWithDictionary = {\n    prop?: {\n        [key: string]: string;\n    };\n};\n\n/**\n * This is a deprecated model with a deprecated property\n *\n * @deprecated\n */\nexport type DeprecatedModel = {\n    /**\n     * This is a deprecated property\n     *\n     * @deprecated\n     */\n    prop?: string;\n};\n\n/**\n * This is a model with one property containing a circular reference\n */\nexport type ModelWithCircularReference = {\n    prop?: ModelWithCircularReference;\n};\n\n/**\n * This is a model with one property with a 'one of' relationship\n */\nexport type CompositionWithOneOf = {\n    propA?: ModelWithString | ModelWithEnum | ModelWithArray | ModelWithDictionary;\n};\n\n/**\n * This is a model with one property with a 'one of' relationship where the options are not $ref\n */\nexport type CompositionWithOneOfAnonymous = {\n    propA?: {\n        propA?: string;\n    } | string | number;\n};\n\n/**\n * Circle\n */\nexport type ModelCircle = {\n    kind: string;\n    radius?: number;\n};\n\n/**\n * Square\n */\nexport type ModelSquare = {\n    kind: string;\n    sideLength?: number;\n};\n\n/**\n * This is a model with one property with a 'one of' relationship where the options are not $ref\n */\nexport type CompositionWithOneOfDiscriminator = ({\n    kind: 'circle';\n} & ModelCircle) | ({\n    kind: 'square';\n} & ModelSquare);\n\n/**\n * This is a model with one property with a 'any of' relationship\n */\nexport type CompositionWithAnyOf = {\n    propA?: ModelWithString | ModelWithEnum | ModelWithArray | ModelWithDictionary;\n};\n\n/**\n * This is a model with one property with a 'any of' relationship where the options are not $ref\n */\nexport type CompositionWithAnyOfAnonymous = {\n    propA?: {\n        propA?: string;\n    } | string | number;\n};\n\n/**\n * This is a model with nested 'any of' property with a type null\n */\nexport type CompositionWithNestedAnyAndTypeNull = {\n    propA?: Array<ModelWithDictionary | null> | Array<ModelWithArray | null>;\n};\n\nexport type _3eNum1Период = 'Bird' | 'Dog';\n\nexport type ConstValue = 'ConstValue';\n\n/**\n * This is a model with one property with a 'any of' relationship where the options are not $ref\n */\nexport type CompositionWithNestedAnyOfAndNull = {\n    /**\n     * Scopes\n     */\n    propA?: Array<_3eNum1Период | ConstValue> | null;\n};\n\n/**\n * This is a model with one property with a 'one of' relationship\n */\nexport type CompositionWithOneOfAndNullable = {\n    propA?: {\n        boolean?: boolean;\n    } | ModelWithEnum | ModelWithArray | ModelWithDictionary | null;\n};\n\n/**\n * This is a model that contains a simple dictionary within composition\n */\nexport type CompositionWithOneOfAndSimpleDictionary = {\n    propA?: boolean | {\n        [key: string]: number;\n    };\n};\n\n/**\n * This is a model that contains a dictionary of simple arrays within composition\n */\nexport type CompositionWithOneOfAndSimpleArrayDictionary = {\n    propA?: boolean | {\n        [key: string]: Array<boolean>;\n    };\n};\n\n/**\n * This is a model that contains a dictionary of complex arrays (composited) within composition\n */\nexport type CompositionWithOneOfAndComplexArrayDictionary = {\n    propA?: boolean | {\n        [key: string]: Array<number | string>;\n    };\n};\n\n/**\n * This is a model with one property with a 'all of' relationship\n */\nexport type CompositionWithAllOfAndNullable = {\n    propA?: ({\n        boolean?: boolean;\n    } & ModelWithEnum & ModelWithArray & ModelWithDictionary) | null;\n};\n\n/**\n * This is a model with one property with a 'any of' relationship\n */\nexport type CompositionWithAnyOfAndNullable = {\n    propA?: {\n        boolean?: boolean;\n    } | ModelWithEnum | ModelWithArray | ModelWithDictionary | null;\n};\n\n/**\n * This is a base model with two simple optional properties\n */\nexport type CompositionBaseModel = {\n    firstName?: string;\n    lastname?: string;\n};\n\n/**\n * This is a model that extends the base model\n */\nexport type CompositionExtendedModel = CompositionBaseModel & {\n    age: number;\n    firstName: string;\n    lastname: string;\n};\n\n/**\n * This is a model with one nested property\n */\nexport type ModelWithProperties = {\n    required: string;\n    readonly requiredAndReadOnly: string;\n    requiredAndNullable: string | null;\n    string?: string;\n    number?: number;\n    boolean?: boolean;\n    reference?: ModelWithString;\n    'property with space'?: string;\n    default?: string;\n    try?: string;\n    readonly '@namespace.string'?: string;\n    readonly '@namespace.integer'?: number;\n};\n\n/**\n * This is a model with one nested property\n */\nexport type ModelWithNestedProperties = {\n    readonly first: {\n        readonly second: {\n            readonly third: string | null;\n        } | null;\n    } | null;\n};\n\n/**\n * This is a model with duplicated properties\n */\nexport type ModelWithDuplicateProperties = {\n    prop?: ModelWithString;\n};\n\n/**\n * This is a model with ordered properties\n */\nexport type ModelWithOrderedProperties = {\n    zebra?: string;\n    apple?: string;\n    hawaii?: string;\n};\n\n/**\n * This is a model with duplicated imports\n */\nexport type ModelWithDuplicateImports = {\n    propA?: ModelWithString;\n    propB?: ModelWithString;\n    propC?: ModelWithString;\n};\n\n/**\n * This is a model that extends another model\n */\nexport type ModelThatExtends = ModelWithString & {\n    propExtendsA?: string;\n    propExtendsB?: ModelWithString;\n};\n\n/**\n * This is a model that extends another model\n */\nexport type ModelThatExtendsExtends = ModelWithString & ModelThatExtends & {\n    propExtendsC?: string;\n    propExtendsD?: ModelWithString;\n};\n\n/**\n * This is a model that contains a some patterns\n */\nexport type ModelWithPattern = {\n    key: string;\n    name: string;\n    readonly enabled?: boolean;\n    readonly modified?: string;\n    id?: string;\n    text?: string;\n    patternWithSingleQuotes?: string;\n    patternWithNewline?: string;\n    patternWithBacktick?: string;\n    patternWithUnicode?: string;\n};\n\nexport type File = {\n    /**\n     * Id\n     */\n    readonly id?: string;\n    /**\n     * Updated at\n     */\n    readonly updated_at?: string;\n    /**\n     * Created at\n     */\n    readonly created_at?: string;\n    /**\n     * Mime\n     */\n    mime: string;\n    /**\n     * File\n     */\n    readonly file?: string;\n};\n\nexport type Default = {\n    name?: string;\n};\n\nexport type Pageable = {\n    page?: number;\n    size?: number;\n    sort?: Array<string>;\n};\n\n/**\n * This is a free-form object without additionalProperties.\n */\nexport type FreeFormObjectWithoutAdditionalProperties = {\n    [key: string]: unknown;\n};\n\n/**\n * This is a free-form object with additionalProperties: true.\n */\nexport type FreeFormObjectWithAdditionalPropertiesEqTrue = {\n    [key: string]: unknown;\n};\n\n/**\n * This is a free-form object with additionalProperties: {}.\n */\nexport type FreeFormObjectWithAdditionalPropertiesEqEmptyObject = {\n    [key: string]: unknown;\n};\n\nexport type ModelWithConst = {\n    String?: 'String';\n    number?: 0;\n    null?: null;\n    withType?: 'Some string';\n};\n\n/**\n * This is a model with one property and additionalProperties: true\n */\nexport type ModelWithAdditionalPropertiesEqTrue = {\n    /**\n     * This is a simple string property\n     */\n    prop?: string;\n    [key: string]: unknown;\n};\n\nexport type NestedAnyOfArraysNullable = {\n    nullableArray?: Array<string | boolean> | null;\n};\n\nexport type CompositionWithOneOfAndProperties = ({\n    foo: SimpleParameter;\n} | {\n    bar: NonAsciiStringæøåÆøÅöôêÊ字符串;\n}) & {\n    baz: number | null;\n    qux: number;\n};\n\n/**\n * An object that can be null\n */\nexport type NullableObject = {\n    foo?: string;\n} | null;\n\n/**\n * Some % character\n */\nexport type CharactersInDescription = string;\n\nexport type ModelWithNullableObject = {\n    data?: NullableObject;\n};\n\n/**\n * An object with additional properties that can be null (anyOf ref + null)\n */\nexport type ModelWithAdditionalPropertiesRef = {\n    [key: string]: NullableObject | null;\n};\n\nexport type ModelWithOneOfEnum = {\n    foo: 'Bar';\n} | {\n    foo: 'Baz';\n} | {\n    foo: 'Qux';\n} | {\n    content: string;\n    foo: 'Quux';\n} | {\n    content: [\n        string,\n        string\n    ];\n    foo: 'Corge';\n};\n\nexport type ModelWithNestedArrayEnumsDataFoo = 'foo' | 'bar';\n\nexport type ModelWithNestedArrayEnumsDataBar = 'baz' | 'qux';\n\nexport type ModelWithNestedArrayEnumsData = {\n    foo?: Array<ModelWithNestedArrayEnumsDataFoo>;\n    bar?: Array<ModelWithNestedArrayEnumsDataBar>;\n};\n\nexport type ModelWithNestedArrayEnums = {\n    array_strings?: Array<string>;\n    data?: ModelWithNestedArrayEnumsData;\n};\n\nexport type ModelWithNestedCompositionEnums = {\n    foo?: ModelWithNestedArrayEnumsDataFoo;\n};\n\nexport type ModelWithReadOnlyAndWriteOnly = {\n    foo: string;\n    readonly bar: string;\n};\n\nexport type ModelWithConstantSizeArray = [\n    number,\n    number\n];\n\nexport type ModelWithAnyOfConstantSizeArray = [\n    number | string,\n    number | string,\n    number | string\n];\n\nexport type ModelWithPrefixItemsConstantSizeArray = [\n    ModelWithInteger,\n    number | string,\n    string\n];\n\nexport type ModelWithAnyOfConstantSizeArrayNullable = [\n    number | null | string,\n    number | null | string,\n    number | null | string\n];\n\nexport type ModelWithAnyOfConstantSizeArrayWithNSizeAndOptions = [\n    number | Import,\n    number | Import\n];\n\nexport type ModelWithAnyOfConstantSizeArrayAndIntersect = [\n    number & string,\n    number & string\n];\n\nexport type ModelWithNumericEnumUnion = {\n    /**\n     * Период\n     */\n    value?: -10 | -1 | 0 | 1 | 3 | 6 | 12;\n};\n\n/**\n * Some description with `back ticks`\n */\nexport type ModelWithBackticksInDescription = {\n    /**\n     * The template `that` should be used for parsing and importing the contents of the CSV file.\n     *\n     * <br/><p>There is one placeholder currently supported:<ul>     <li><b>${x}</b> - refers to the n-th column in the CSV file, e.g. ${1}, ${2}, ...)</li></ul><p>Example of a correct JSON template:</p>\n     * <pre>\n     * [\n     * {\n     * \"resourceType\": \"Asset\",\n     * \"identifier\": {\n     * \"name\": \"${1}\",\n     * \"domain\": {\n     * \"name\": \"${2}\",\n     * \"community\": {\n     * \"name\": \"Some Community\"\n     * }\n     * }\n     * },\n     * \"attributes\" : {\n     * \"00000000-0000-0000-0000-000000003115\" : [ {\n     * \"value\" : \"${3}\"\n     * } ],\n     * \"00000000-0000-0000-0000-000000000222\" : [ {\n     * \"value\" : \"${4}\"\n     * } ]\n     * }\n     * }\n     * ]\n     * </pre>\n     */\n    template?: string;\n};\n\nexport type ModelWithOneOfAndProperties = (SimpleParameter | NonAsciiStringæøåÆøÅöôêÊ字符串) & {\n    baz: number | null;\n    qux: number;\n};\n\n/**\n * Model used to test deduplication strategy (unused)\n */\nexport type ParameterSimpleParameterUnused = string;\n\n/**\n * Model used to test deduplication strategy\n */\nexport type PostServiceWithEmptyTagResponse = string;\n\n/**\n * Model used to test deduplication strategy\n */\nexport type PostServiceWithEmptyTagResponse2 = string;\n\n/**\n * Model used to test deduplication strategy\n */\nexport type DeleteFooData = string;\n\n/**\n * Model used to test deduplication strategy\n */\nexport type DeleteFooData2 = string;\n\n/**\n * Model with restricted keyword name\n */\nexport type Import = string;\n\nexport type SchemaWithFormRestrictedKeys = {\n    description?: string;\n    'x-enum-descriptions'?: string;\n    'x-enum-varnames'?: string;\n    'x-enumNames'?: string;\n    title?: string;\n    object?: {\n        description?: string;\n        'x-enum-descriptions'?: string;\n        'x-enum-varnames'?: string;\n        'x-enumNames'?: string;\n        title?: string;\n    };\n    array?: Array<{\n        description?: string;\n        'x-enum-descriptions'?: string;\n        'x-enum-varnames'?: string;\n        'x-enumNames'?: string;\n        title?: string;\n    }>;\n};\n\n/**\n * This schema was giving PascalCase transformations a hard time\n */\nexport type IoK8sApimachineryPkgApisMetaV1DeleteOptions = {\n    /**\n     * Must be fulfilled before a deletion is carried out. If not possible, a 409 Conflict status will be returned.\n     */\n    preconditions?: IoK8sApimachineryPkgApisMetaV1Preconditions;\n};\n\n/**\n * This schema was giving PascalCase transformations a hard time\n */\nexport type IoK8sApimachineryPkgApisMetaV1Preconditions = {\n    /**\n     * Specifies the target ResourceVersion\n     */\n    resourceVersion?: string;\n    /**\n     * Specifies the target UID.\n     */\n    uid?: string;\n};\n\nexport type AdditionalPropertiesUnknownIssue = {\n    [key: string]: string | number;\n};\n\nexport type AdditionalPropertiesUnknownIssue2 = {\n    [key: string]: string | number;\n};\n\nexport type AdditionalPropertiesUnknownIssue3 = string & {\n    entries: {\n        [key: string]: AdditionalPropertiesUnknownIssue;\n    };\n};\n\nexport type AdditionalPropertiesIntegerIssue = {\n    value: number;\n    [key: string]: number;\n};\n\nexport type OneOfAllOfIssue = ((ConstValue | GenericSchemaDuplicateIssue1SystemBoolean) & _3eNum1Период) | GenericSchemaDuplicateIssue1SystemString;\n\nexport type GenericSchemaDuplicateIssue1SystemBoolean = {\n    item?: boolean;\n    error?: string | null;\n    readonly hasError?: boolean;\n    data?: {\n        [key: string]: never;\n    };\n};\n\nexport type GenericSchemaDuplicateIssue1SystemString = {\n    item?: string | null;\n    error?: string | null;\n    readonly hasError?: boolean;\n};\n\nexport type ExternalSharedModel = {\n    id: string;\n    name?: string;\n};\n\n/**\n * This is a model with one property containing a reference\n */\nexport type ModelWithReferenceWritable = {\n    prop?: ModelWithPropertiesWritable;\n};\n\n/**\n * This is a model with one property containing an array\n */\nexport type ModelWithArrayReadOnlyAndWriteOnlyWritable = {\n    prop?: Array<ModelWithReadOnlyAndWriteOnlyWritable>;\n    propWithFile?: Array<Blob | File>;\n    propWithNumber?: Array<number>;\n};\n\n/**\n * This is a model with one nested property\n */\nexport type ModelWithPropertiesWritable = {\n    required: string;\n    requiredAndNullable: string | null;\n    string?: string;\n    number?: number;\n    boolean?: boolean;\n    reference?: ModelWithString;\n    'property with space'?: string;\n    default?: string;\n    try?: string;\n};\n\n/**\n * This is a model that contains a some patterns\n */\nexport type ModelWithPatternWritable = {\n    key: string;\n    name: string;\n    id?: string;\n    text?: string;\n    patternWithSingleQuotes?: string;\n    patternWithNewline?: string;\n    patternWithBacktick?: string;\n    patternWithUnicode?: string;\n};\n\nexport type FileWritable = {\n    /**\n     * Mime\n     */\n    mime: string;\n};\n\nexport type ModelWithReadOnlyAndWriteOnlyWritable = {\n    foo: string;\n    baz: string;\n};\n\nexport type ModelWithAnyOfConstantSizeArrayWithNSizeAndOptionsWritable = [\n    number | Import,\n    number | Import\n];\n\nexport type AdditionalPropertiesUnknownIssueWritable = {\n    [key: string]: string | number;\n};\n\nexport type OneOfAllOfIssueWritable = ((ConstValue | GenericSchemaDuplicateIssue1SystemBoolean) & _3eNum1Период) | GenericSchemaDuplicateIssue1SystemString;\n\nexport type GenericSchemaDuplicateIssue1SystemBooleanWritable = {\n    item?: boolean;\n    error?: string | null;\n    data?: {\n        [key: string]: never;\n    };\n};\n\nexport type GenericSchemaDuplicateIssue1SystemStringWritable = {\n    item?: string | null;\n    error?: string | null;\n};\n\n/**\n * This is a reusable parameter\n */\nexport type SimpleParameter = string;\n\n/**\n * Parameter with illegal characters\n */\nexport type XFooBar = ModelWithString;\n\n/**\n * A reusable request body\n */\nexport type SimpleRequestBody = ModelWithString;\n\n/**\n * A reusable request body\n */\nexport type SimpleFormData = ModelWithString;\n\nexport type ExportData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no+tag';\n};\n\nexport type PatchApiVbyApiVersionNoTagData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no+tag';\n};\n\nexport type PatchApiVbyApiVersionNoTagResponses = {\n    /**\n     * OK\n     */\n    default: unknown;\n};\n\nexport type ImportData = {\n    body: ModelWithReadOnlyAndWriteOnlyWritable | ModelWithArrayReadOnlyAndWriteOnlyWritable;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no+tag';\n};\n\nexport type ImportResponses = {\n    /**\n     * Success\n     */\n    200: ModelFromZendesk;\n    /**\n     * Default success response\n     */\n    default: ModelWithReadOnlyAndWriteOnly;\n};\n\nexport type ImportResponse = ImportResponses[keyof ImportResponses];\n\nexport type FooWowData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no+tag';\n};\n\nexport type FooWowResponses = {\n    /**\n     * OK\n     */\n    default: unknown;\n};\n\nexport type ApiVVersionODataControllerCountData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple/$count';\n};\n\nexport type ApiVVersionODataControllerCountResponses = {\n    /**\n     * Success\n     */\n    200: ModelFromZendesk;\n};\n\nexport type ApiVVersionODataControllerCountResponse = ApiVVersionODataControllerCountResponses[keyof ApiVVersionODataControllerCountResponses];\n\nexport type GetApiVbyApiVersionSimpleOperationData = {\n    body?: never;\n    path: {\n        /**\n         * foo in method\n         */\n        foo_param: string;\n    };\n    query?: never;\n    url: '/api/v{api-version}/simple:operation';\n};\n\nexport type GetApiVbyApiVersionSimpleOperationErrors = {\n    /**\n     * Default error response\n     */\n    default: ModelWithBoolean;\n};\n\nexport type GetApiVbyApiVersionSimpleOperationError = GetApiVbyApiVersionSimpleOperationErrors[keyof GetApiVbyApiVersionSimpleOperationErrors];\n\nexport type GetApiVbyApiVersionSimpleOperationResponses = {\n    /**\n     * Response is a simple number\n     */\n    200: number;\n};\n\nexport type GetApiVbyApiVersionSimpleOperationResponse = GetApiVbyApiVersionSimpleOperationResponses[keyof GetApiVbyApiVersionSimpleOperationResponses];\n\nexport type DeleteCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type GetCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type HeadCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type OptionsCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type PatchCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type PostCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type PutCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type DeleteFooData3 = {\n    body?: never;\n    headers: {\n        /**\n         * Parameter with illegal characters\n         */\n        'x-Foo-Bar': ModelWithString;\n    };\n    path: {\n        /**\n         * foo in method\n         */\n        foo_param: string;\n        /**\n         * bar in method\n         */\n        BarParam: string;\n    };\n    query?: never;\n    url: '/api/v{api-version}/foo/{foo_param}/bar/{BarParam}';\n};\n\nexport type CallWithDescriptionsData = {\n    body?: never;\n    path?: never;\n    query?: {\n        /**\n         * Testing multiline comments in string: First line\n         * Second line\n         *\n         * Fourth line\n         */\n        parameterWithBreaks?: string;\n        /**\n         * Testing backticks in string: `backticks` and ```multiple backticks``` should work\n         */\n        parameterWithBackticks?: string;\n        /**\n         * Testing slashes in string: \\backwards\\\\\\ and /forwards/// should work\n         */\n        parameterWithSlashes?: string;\n        /**\n         * Testing expression placeholders in string: ${expression} should work\n         */\n        parameterWithExpressionPlaceholders?: string;\n        /**\n         * Testing quotes in string: 'single quote''' and \"double quotes\"\"\" should work\n         */\n        parameterWithQuotes?: string;\n        /**\n         * Testing reserved characters in string: * inline * and ** inline ** should work\n         */\n        parameterWithReservedCharacters?: string;\n    };\n    url: '/api/v{api-version}/descriptions';\n};\n\nexport type DeprecatedCallData = {\n    body?: never;\n    headers: {\n        /**\n         * This parameter is deprecated\n         *\n         * @deprecated\n         */\n        parameter: DeprecatedModel | null;\n    };\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/parameters/deprecated';\n};\n\nexport type CallWithParametersData = {\n    /**\n     * This is the parameter that goes into the body\n     */\n    body: {\n        [key: string]: unknown;\n    } | null;\n    headers: {\n        /**\n         * This is the parameter that goes into the header\n         */\n        parameterHeader: string | null;\n    };\n    path: {\n        /**\n         * This is the parameter that goes into the path\n         */\n        parameterPath: string | null;\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string | null;\n    };\n    query: {\n        foo_ref_enum?: ModelWithNestedArrayEnumsDataFoo;\n        foo_all_of_enum: ModelWithNestedArrayEnumsDataFoo;\n        /**\n         * This is the parameter that goes into the query params\n         */\n        cursor: string | null;\n    };\n    url: '/api/v{api-version}/parameters/{parameterPath}';\n};\n\nexport type CallWithWeirdParameterNamesData = {\n    /**\n     * This is the parameter that goes into the body\n     */\n    body: ModelWithString | null;\n    headers: {\n        /**\n         * This is the parameter that goes into the request header\n         */\n        'parameter.header': string | null;\n    };\n    path: {\n        /**\n         * This is the parameter that goes into the path\n         */\n        'parameter.path.1'?: string;\n        /**\n         * This is the parameter that goes into the path\n         */\n        'parameter-path-2'?: string;\n        /**\n         * This is the parameter that goes into the path\n         */\n        'PARAMETER-PATH-3'?: string;\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string | null;\n    };\n    query: {\n        /**\n         * This is the parameter with a reserved keyword\n         */\n        default?: string;\n        /**\n         * This is the parameter that goes into the request query params\n         */\n        'parameter-query': string | null;\n    };\n    url: '/api/v{api-version}/parameters/{parameter.path.1}/{parameter-path-2}/{PARAMETER-PATH-3}';\n};\n\nexport type GetCallWithOptionalParamData = {\n    /**\n     * This is a required parameter\n     */\n    body: ModelWithOneOfEnum;\n    path?: never;\n    query?: {\n        /**\n         * This is an optional parameter\n         */\n        page?: number;\n    };\n    url: '/api/v{api-version}/parameters';\n};\n\nexport type PostCallWithOptionalParamData = {\n    /**\n     * This is an optional parameter\n     */\n    body?: {\n        offset?: number | null;\n    };\n    path?: never;\n    query: {\n        /**\n         * This is a required parameter\n         */\n        parameter: Pageable;\n    };\n    url: '/api/v{api-version}/parameters';\n};\n\nexport type PostCallWithOptionalParamResponses = {\n    /**\n     * Response is a simple number\n     */\n    200: number;\n    /**\n     * Success\n     */\n    204: void;\n};\n\nexport type PostCallWithOptionalParamResponse = PostCallWithOptionalParamResponses[keyof PostCallWithOptionalParamResponses];\n\nexport type PostApiVbyApiVersionRequestBodyData = {\n    /**\n     * A reusable request body\n     */\n    body?: SimpleRequestBody;\n    path?: never;\n    query?: {\n        /**\n         * This is a reusable parameter\n         */\n        parameter?: string;\n    };\n    url: '/api/v{api-version}/requestBody';\n};\n\nexport type PostApiVbyApiVersionFormDataData = {\n    /**\n     * A reusable request body\n     */\n    body?: SimpleFormData;\n    path?: never;\n    query?: {\n        /**\n         * This is a reusable parameter\n         */\n        parameter?: string;\n    };\n    url: '/api/v{api-version}/formData';\n};\n\nexport type CallWithDefaultParametersData = {\n    body?: never;\n    path?: never;\n    query?: {\n        /**\n         * This is a simple string with default value\n         */\n        parameterString?: string | null;\n        /**\n         * This is a simple number with default value\n         */\n        parameterNumber?: number | null;\n        /**\n         * This is a simple boolean with default value\n         */\n        parameterBoolean?: boolean | null;\n        /**\n         * This is a simple enum with default value\n         */\n        parameterEnum?: 'Success' | 'Warning' | 'Error';\n        /**\n         * This is a simple model with default value\n         */\n        parameterModel?: ModelWithString | null;\n    };\n    url: '/api/v{api-version}/defaults';\n};\n\nexport type CallWithDefaultOptionalParametersData = {\n    body?: never;\n    path?: never;\n    query?: {\n        /**\n         * This is a simple string that is optional with default value\n         */\n        parameterString?: string;\n        /**\n         * This is a simple number that is optional with default value\n         */\n        parameterNumber?: number;\n        /**\n         * This is a simple boolean that is optional with default value\n         */\n        parameterBoolean?: boolean;\n        /**\n         * This is a simple enum that is optional with default value\n         */\n        parameterEnum?: 'Success' | 'Warning' | 'Error';\n        /**\n         * This is a simple model that is optional with default value\n         */\n        parameterModel?: ModelWithString;\n    };\n    url: '/api/v{api-version}/defaults';\n};\n\nexport type CallToTestOrderOfParamsData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * This is a optional string with default\n         */\n        parameterOptionalStringWithDefault?: string;\n        /**\n         * This is a optional string with empty default\n         */\n        parameterOptionalStringWithEmptyDefault?: string;\n        /**\n         * This is a optional string with no default\n         */\n        parameterOptionalStringWithNoDefault?: string;\n        /**\n         * This is a string with default\n         */\n        parameterStringWithDefault: string;\n        /**\n         * This is a string with empty default\n         */\n        parameterStringWithEmptyDefault: string;\n        /**\n         * This is a string with no default\n         */\n        parameterStringWithNoDefault: string;\n        /**\n         * This is a string that can be null with no default\n         */\n        parameterStringNullableWithNoDefault?: string | null;\n        /**\n         * This is a string that can be null with default\n         */\n        parameterStringNullableWithDefault?: string | null;\n    };\n    url: '/api/v{api-version}/defaults';\n};\n\nexport type DuplicateNameData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/duplicate';\n};\n\nexport type DuplicateName2Data = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/duplicate';\n};\n\nexport type DuplicateName3Data = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/duplicate';\n};\n\nexport type DuplicateName4Data = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/duplicate';\n};\n\nexport type CallWithNoContentResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no-content';\n};\n\nexport type CallWithNoContentResponseResponses = {\n    /**\n     * Success\n     */\n    204: void;\n};\n\nexport type CallWithNoContentResponseResponse = CallWithNoContentResponseResponses[keyof CallWithNoContentResponseResponses];\n\nexport type CallWithResponseAndNoContentResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multiple-tags/response-and-no-content';\n};\n\nexport type CallWithResponseAndNoContentResponseResponses = {\n    /**\n     * Response is a simple number\n     */\n    200: number;\n    /**\n     * Success\n     */\n    204: void;\n};\n\nexport type CallWithResponseAndNoContentResponseResponse = CallWithResponseAndNoContentResponseResponses[keyof CallWithResponseAndNoContentResponseResponses];\n\nexport type DummyAData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multiple-tags/a';\n};\n\nexport type DummyAResponses = {\n    200: _400;\n};\n\nexport type DummyAResponse = DummyAResponses[keyof DummyAResponses];\n\nexport type DummyBData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multiple-tags/b';\n};\n\nexport type DummyBResponses = {\n    /**\n     * Success\n     */\n    204: void;\n};\n\nexport type DummyBResponse = DummyBResponses[keyof DummyBResponses];\n\nexport type CallWithResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/response';\n};\n\nexport type CallWithResponseResponses = {\n    default: Import;\n};\n\nexport type CallWithResponseResponse = CallWithResponseResponses[keyof CallWithResponseResponses];\n\nexport type CallWithDuplicateResponsesData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/response';\n};\n\nexport type CallWithDuplicateResponsesErrors = {\n    /**\n     * Message for 500 error\n     */\n    500: ModelWithStringError;\n    /**\n     * Message for 501 error\n     */\n    501: ModelWithStringError;\n    /**\n     * Message for 502 error\n     */\n    502: ModelWithStringError;\n    /**\n     * Message for 4XX errors\n     */\n    '4XX': DictionaryWithArray;\n    /**\n     * Default error response\n     */\n    default: ModelWithBoolean;\n};\n\nexport type CallWithDuplicateResponsesError = CallWithDuplicateResponsesErrors[keyof CallWithDuplicateResponsesErrors];\n\nexport type CallWithDuplicateResponsesResponses = {\n    /**\n     * Message for 200 response\n     */\n    200: ModelWithBoolean & ModelWithInteger;\n    /**\n     * Message for 201 response\n     */\n    201: ModelWithString;\n    /**\n     * Message for 202 response\n     */\n    202: ModelWithString;\n};\n\nexport type CallWithDuplicateResponsesResponse = CallWithDuplicateResponsesResponses[keyof CallWithDuplicateResponsesResponses];\n\nexport type CallWithResponsesData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/response';\n};\n\nexport type CallWithResponsesErrors = {\n    /**\n     * Message for 500 error\n     */\n    500: ModelWithStringError;\n    /**\n     * Message for 501 error\n     */\n    501: ModelWithStringError;\n    /**\n     * Message for 502 error\n     */\n    502: ModelWithStringError;\n    /**\n     * Message for default response\n     */\n    default: ModelWithStringError;\n};\n\nexport type CallWithResponsesError = CallWithResponsesErrors[keyof CallWithResponsesErrors];\n\nexport type CallWithResponsesResponses = {\n    /**\n     * Message for 200 response\n     */\n    200: {\n        readonly '@namespace.string'?: string;\n        readonly '@namespace.integer'?: number;\n        readonly value?: Array<ModelWithString>;\n    };\n    /**\n     * Message for 201 response\n     */\n    201: ModelThatExtends;\n    /**\n     * Message for 202 response\n     */\n    202: ModelThatExtendsExtends;\n};\n\nexport type CallWithResponsesResponse = CallWithResponsesResponses[keyof CallWithResponsesResponses];\n\nexport type CollectionFormatData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * This is an array parameter that is sent as csv format (comma-separated values)\n         */\n        parameterArrayCSV: Array<string> | null;\n        /**\n         * This is an array parameter that is sent as ssv format (space-separated values)\n         */\n        parameterArraySSV: Array<string> | null;\n        /**\n         * This is an array parameter that is sent as tsv format (tab-separated values)\n         */\n        parameterArrayTSV: Array<string> | null;\n        /**\n         * This is an array parameter that is sent as pipes format (pipe-separated values)\n         */\n        parameterArrayPipes: Array<string> | null;\n        /**\n         * This is an array parameter that is sent as multi format (multiple parameter instances)\n         */\n        parameterArrayMulti: Array<string> | null;\n    };\n    url: '/api/v{api-version}/collectionFormat';\n};\n\nexport type TypesData = {\n    body?: never;\n    path?: {\n        /**\n         * This is a number parameter\n         */\n        id?: number;\n    };\n    query: {\n        /**\n         * This is a number parameter\n         */\n        parameterNumber: number;\n        /**\n         * This is a string parameter\n         */\n        parameterString: string | null;\n        /**\n         * This is a boolean parameter\n         */\n        parameterBoolean: boolean | null;\n        /**\n         * This is an object parameter\n         */\n        parameterObject: {\n            [key: string]: unknown;\n        } | null;\n        /**\n         * This is an array parameter\n         */\n        parameterArray: Array<string> | null;\n        /**\n         * This is a dictionary parameter\n         */\n        parameterDictionary: {\n            [key: string]: unknown;\n        } | null;\n        /**\n         * This is an enum parameter\n         */\n        parameterEnum: 'Success' | 'Warning' | 'Error' | null;\n    };\n    url: '/api/v{api-version}/types';\n};\n\nexport type TypesResponses = {\n    /**\n     * Response is a simple number\n     */\n    200: number;\n    /**\n     * Response is a simple string\n     */\n    201: string;\n    /**\n     * Response is a simple boolean\n     */\n    202: boolean;\n    /**\n     * Response is a simple object\n     */\n    203: {\n        [key: string]: unknown;\n    };\n};\n\nexport type TypesResponse = TypesResponses[keyof TypesResponses];\n\nexport type UploadFileData = {\n    body: Blob | File;\n    path: {\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string | null;\n    };\n    query?: never;\n    url: '/api/v{api-version}/upload';\n};\n\nexport type UploadFileResponses = {\n    200: boolean;\n};\n\nexport type UploadFileResponse = UploadFileResponses[keyof UploadFileResponses];\n\nexport type FileResponseData = {\n    body?: never;\n    path: {\n        id: string;\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string;\n    };\n    query?: never;\n    url: '/api/v{api-version}/file/{id}';\n};\n\nexport type FileResponseResponses = {\n    /**\n     * Success\n     */\n    200: Blob | File;\n};\n\nexport type FileResponseResponse = FileResponseResponses[keyof FileResponseResponses];\n\nexport type ComplexTypesData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * Parameter containing object\n         */\n        parameterObject: {\n            first?: {\n                second?: {\n                    third?: string;\n                };\n            };\n        };\n        /**\n         * Parameter containing reference\n         */\n        parameterReference: ModelWithString;\n    };\n    url: '/api/v{api-version}/complex';\n};\n\nexport type ComplexTypesErrors = {\n    /**\n     * 400 `server` error\n     */\n    400: unknown;\n    /**\n     * 500 server error\n     */\n    500: unknown;\n};\n\nexport type ComplexTypesResponses = {\n    /**\n     * Successful response\n     */\n    200: Array<ModelWithString>;\n};\n\nexport type ComplexTypesResponse = ComplexTypesResponses[keyof ComplexTypesResponses];\n\nexport type MultipartResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multipart';\n};\n\nexport type MultipartResponseResponses = {\n    /**\n     * OK\n     */\n    200: {\n        file?: Blob | File;\n        metadata?: {\n            foo?: string;\n            bar?: string;\n        };\n    };\n};\n\nexport type MultipartResponseResponse = MultipartResponseResponses[keyof MultipartResponseResponses];\n\nexport type MultipartRequestData = {\n    body?: {\n        content?: Blob | File;\n        data?: ModelWithString | null;\n    };\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multipart';\n};\n\nexport type ComplexParamsData = {\n    body?: {\n        readonly key: string | null;\n        name: string | null;\n        enabled?: boolean;\n        type: 'Monkey' | 'Horse' | 'Bird';\n        listOfModels?: Array<ModelWithString> | null;\n        listOfStrings?: Array<string> | null;\n        parameters: ModelWithString | ModelWithEnum | ModelWithArray | ModelWithDictionary;\n        readonly user?: {\n            readonly id?: number;\n            readonly name?: string | null;\n        };\n    };\n    path: {\n        id: number;\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string;\n    };\n    query?: never;\n    url: '/api/v{api-version}/complex/{id}';\n};\n\nexport type ComplexParamsResponses = {\n    /**\n     * Success\n     */\n    200: ModelWithString;\n};\n\nexport type ComplexParamsResponse = ComplexParamsResponses[keyof ComplexParamsResponses];\n\nexport type CallWithResultFromHeaderData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/header';\n};\n\nexport type CallWithResultFromHeaderErrors = {\n    /**\n     * 400 server error\n     */\n    400: unknown;\n    /**\n     * 500 server error\n     */\n    500: unknown;\n};\n\nexport type CallWithResultFromHeaderResponses = {\n    /**\n     * Successful response\n     */\n    200: unknown;\n};\n\nexport type TestErrorCodeData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * Status code to return\n         */\n        status: number;\n    };\n    url: '/api/v{api-version}/error';\n};\n\nexport type TestErrorCodeErrors = {\n    /**\n     * Custom message: Internal Server Error\n     */\n    500: unknown;\n    /**\n     * Custom message: Not Implemented\n     */\n    501: unknown;\n    /**\n     * Custom message: Bad Gateway\n     */\n    502: unknown;\n    /**\n     * Custom message: Service Unavailable\n     */\n    503: unknown;\n};\n\nexport type TestErrorCodeResponses = {\n    /**\n     * Custom message: Successful response\n     */\n    200: unknown;\n};\n\nexport type NonAsciiæøåÆøÅöôêÊ字符串Data = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * Dummy input param\n         */\n        nonAsciiParamæøåÆØÅöôêÊ: number;\n    };\n    url: '/api/v{api-version}/non-ascii-æøåÆØÅöôêÊ字符串';\n};\n\nexport type NonAsciiæøåÆøÅöôêÊ字符串Responses = {\n    /**\n     * Successful response\n     */\n    200: Array<NonAsciiStringæøåÆøÅöôêÊ字符串>;\n};\n\nexport type NonAsciiæøåÆøÅöôêÊ字符串Response = NonAsciiæøåÆøÅöôêÊ字符串Responses[keyof NonAsciiæøåÆøÅöôêÊ字符串Responses];\n\nexport type PutWithFormUrlEncodedData = {\n    body: ArrayWithStrings;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/non-ascii-æøåÆØÅöôêÊ字符串';\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/my-client/base-url-strict/client/client.ts",
    "content": "import type { Client, Config, RequestOptions } from './types';\nimport {\n  buildUrl,\n  createConfig,\n  createInterceptors,\n  getParseAs,\n  mergeConfigs,\n  mergeHeaders,\n  setAuthParams,\n} from './utils';\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, RequestOptions>();\n\n  // @ts-expect-error\n  const request: Client['request'] = async (options) => {\n    const opts = {\n      ..._config,\n      ...options,\n      fetch: options.fetch ?? _config.fetch ?? globalThis.fetch,\n      headers: mergeHeaders(_config.headers, options.headers),\n    };\n\n    if (opts.security) {\n      await setAuthParams({\n        ...opts,\n        security: opts.security,\n      });\n    }\n\n    if (opts.body && opts.bodySerializer) {\n      opts.body = opts.bodySerializer(opts.body);\n    }\n\n    // remove Content-Type header if body is empty to avoid sending invalid requests\n    if (opts.body === undefined || opts.body === '') {\n      opts.headers.delete('Content-Type');\n    }\n\n    const url = buildUrl(opts);\n    const requestInit: ReqInit = {\n      redirect: 'follow',\n      ...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 = await _fetch(request);\n\n    for (const fn of interceptors.response.fns) {\n      if (fn) {\n        response = await fn(response, request, opts);\n      }\n    }\n\n    const result = {\n      request,\n      response,\n    };\n\n    if (response.ok) {\n      if (response.status === 204 || response.headers.get('Content-Length') === '0') {\n        return {\n          data: {},\n          ...result,\n        };\n      }\n\n      const parseAs =\n        (opts.parseAs === 'auto'\n          ? getParseAs(response.headers.get('Content-Type'))\n          : opts.parseAs) ?? 'json';\n\n      if (parseAs === 'stream') {\n        return {\n          data: response.body,\n          ...result,\n        };\n      }\n\n      let data = await response[parseAs]();\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 {\n        data,\n        ...result,\n      };\n    }\n\n    let error = await response.text();\n\n    try {\n      error = JSON.parse(error);\n    } catch {\n      // noop\n    }\n\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    return {\n      error: finalError,\n      ...result,\n    };\n  };\n\n  return {\n    buildUrl,\n    connect: (options) => request({ ...options, method: 'CONNECT' }),\n    delete: (options) => request({ ...options, method: 'DELETE' }),\n    get: (options) => request({ ...options, method: 'GET' }),\n    getConfig,\n    head: (options) => request({ ...options, method: 'HEAD' }),\n    interceptors,\n    options: (options) => request({ ...options, method: 'OPTIONS' }),\n    patch: (options) => request({ ...options, method: 'PATCH' }),\n    post: (options) => request({ ...options, method: 'POST' }),\n    put: (options) => request({ ...options, method: 'PUT' }),\n    request,\n    setConfig,\n    trace: (options) => request({ ...options, method: 'TRACE' }),\n  };\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/my-client/base-url-strict/client/core/auth.ts",
    "content": "export 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/my-client/base-url-strict/client/core/bodySerializer.ts",
    "content": "import type { ArrayStyle, ObjectStyle, SerializerOptions } from './pathSerializer';\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) => {\n  if (typeof value === 'string' || value instanceof Blob) {\n    data.append(key, value);\n  } else {\n    data.append(key, JSON.stringify(value));\n  }\n};\n\nconst serializeUrlSearchParamsPair = (data: URLSearchParams, key: string, value: unknown) => {\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) => {\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) =>\n    JSON.stringify(body, (_key, value) => (typeof value === 'bigint' ? value.toString() : value)),\n};\n\nexport const urlSearchParamsBodySerializer = {\n  bodySerializer: (body: unknown) => {\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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/my-client/base-url-strict/client/core/params.ts",
    "content": "type Slot = 'body' | 'headers' | 'path' | 'query';\n\nexport type Field =\n  | {\n      in: Exclude<Slot, 'body'>;\n      key: string;\n      map?: string;\n    }\n  | {\n      in: Extract<Slot, 'body'>;\n      key?: string;\n      map?: string;\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\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 (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' && !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        (params[field.in] as Record<string, unknown>)[name] = arg;\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          const name = field.map || key;\n          (params[field.in] as Record<string, unknown>)[name] = value;\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 {\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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/my-client/base-url-strict/client/core/pathSerializer.ts",
    "content": "interface 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/my-client/base-url-strict/client/core/types.ts",
    "content": "import type { Auth, AuthToken } from './auth';\nimport type { BodySerializer, QuerySerializer, QuerySerializerOptions } from './bodySerializer';\n\nexport interface Client<RequestFn = never, Config = unknown, MethodFn = never, BuildUrlFn = never> {\n  /**\n   * Returns the final request URL.\n   */\n  buildUrl: BuildUrlFn;\n  connect: MethodFn;\n  delete: MethodFn;\n  get: MethodFn;\n  getConfig: () => Config;\n  head: MethodFn;\n  options: MethodFn;\n  patch: MethodFn;\n  post: MethodFn;\n  put: MethodFn;\n  request: RequestFn;\n  setConfig: (config: Config) => Config;\n  trace: MethodFn;\n}\n\nexport interface Config {\n  /**\n   * Auth token or a function returning auth token. The resolved value will be\n   * added to the request payload as defined by its `security` array.\n   */\n  auth?: ((auth: Auth) => Promise<AuthToken> | AuthToken) | AuthToken;\n  /**\n   * A function for serializing request body parameter. By default,\n   * {@link JSON.stringify()} will be used.\n   */\n  bodySerializer?: BodySerializer | null;\n  /**\n   * An object containing any HTTP headers that you want to pre-populate your\n   * `Headers` object with.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/Headers/Headers#init See more}\n   */\n  headers?:\n    | RequestInit['headers']\n    | Record<\n        string,\n        string | number | boolean | (string | number | boolean)[] | null | undefined | unknown\n      >;\n  /**\n   * The request method.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/fetch#method See more}\n   */\n  method?: 'CONNECT' | 'DELETE' | 'GET' | 'HEAD' | 'OPTIONS' | 'PATCH' | 'POST' | 'PUT' | 'TRACE';\n  /**\n   * A function for serializing request query parameters. By default, arrays\n   * will be exploded in form style, objects will be exploded in deepObject\n   * style, and reserved characters are percent-encoded.\n   *\n   * This method will have no effect if the native `paramsSerializer()` Axios\n   * API function is used.\n   *\n   * {@link https://swagger.io/docs/specification/serialization/#query View examples}\n   */\n  querySerializer?: QuerySerializer | QuerySerializerOptions;\n  /**\n   * A function transforming response data before it's returned. This is useful\n   * for post-processing data, e.g. converting ISO strings into Date objects.\n   */\n  responseTransformer?: (data: unknown) => Promise<unknown>;\n  /**\n   * A function validating response data. This is useful if you want to ensure\n   * the response conforms to the desired shape, so it can be safely passed to\n   * the transformers and returned to the user.\n   */\n  responseValidator?: (data: unknown) => Promise<unknown>;\n}\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/my-client/base-url-strict/client/index.ts",
    "content": "export { createClient } from './client';\nexport type { Auth } from './core/auth';\nexport type { QuerySerializerOptions } from './core/bodySerializer';\nexport {\n  formDataBodySerializer,\n  jsonBodySerializer,\n  urlSearchParamsBodySerializer,\n} from './core/bodySerializer';\nexport type {\n  Client,\n  ClientOptions,\n  Config,\n  CreateClientConfig,\n  Options,\n  RequestOptions,\n  RequestResult,\n  TDataShape,\n} from './types';\nexport { createConfig } from './utils';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/my-client/base-url-strict/client/plugin.ts",
    "content": "import {\n  type Client,\n  clientDefaultConfig,\n  clientDefaultMeta,\n  clientPluginHandler,\n  type DefinePlugin,\n  definePluginConfig,\n} from '@hey-api/openapi-ts';\n\nexport type Config = Client.Config & {\n  /**\n   * Plugin name. Must be unique.\n   */\n  name: string;\n};\n\nexport type MyClientPlugin = DefinePlugin<Config, Config>;\n\nexport const defaultConfig: MyClientPlugin['Config'] = {\n  ...clientDefaultMeta,\n  config: clientDefaultConfig,\n  handler: clientPluginHandler as MyClientPlugin['Handler'],\n  name: __filename,\n};\n\n/**\n * Type helper for `my-client` plugin, returns {@link Plugin.Config} object\n */\nexport const myClientPlugin = definePluginConfig(defaultConfig);\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/my-client/base-url-strict/client/types.ts",
    "content": "import type { Auth } from './core/auth';\nimport type { Client as CoreClient, Config as CoreConfig } from './core/types';\nimport type { Middleware } from './utils';\n\nexport interface Config<T extends ClientOptions = ClientOptions>\n  extends Omit<RequestInit, 'body' | 'headers' | 'method'>, CoreConfig {\n  /**\n   * Base URL for all requests made by this client.\n   */\n  baseUrl?: T['baseUrl'];\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?: (request: Request) => ReturnType<typeof fetch>;\n  /**\n   * Return the response data parsed in a specified format. By default, `auto`\n   * will infer the appropriate method from the `Content-Type` response header.\n   * You can override this behavior with any of the {@link Body} methods.\n   * Select `stream` if you don't want to parse response data at all.\n   *\n   * @default 'auto'\n   */\n  parseAs?: 'arrayBuffer' | 'auto' | 'blob' | 'formData' | 'json' | 'stream' | 'text';\n  /**\n   * Throw an error instead of returning it in the response?\n   *\n   * @default false\n   */\n  throwOnError?: T['throwOnError'];\n}\n\nexport interface RequestOptions<\n  ThrowOnError extends boolean = boolean,\n  Url extends string = string,\n> extends Config<{\n  throwOnError: ThrowOnError;\n}> {\n  /**\n   * Any body that you want to add to your request.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/fetch#body}\n   */\n  body?: unknown;\n  path?: Record<string, unknown>;\n  query?: Record<string, unknown>;\n  /**\n   * Security mechanism(s) to use for the request.\n   */\n  security?: ReadonlyArray<Auth>;\n  url: Url;\n}\n\nexport type RequestResult<\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = boolean,\n> = ThrowOnError extends true\n  ? Promise<{\n      data: TData;\n      request: Request;\n      response: Response;\n    }>\n  : Promise<\n      ({ data: TData; error: undefined } | { data: undefined; error: TError }) & {\n        request: Request;\n        response: Response;\n      }\n    >;\n\nexport interface ClientOptions {\n  baseUrl?: string;\n  throwOnError?: boolean;\n}\n\ntype MethodFn = <TData = unknown, TError = unknown, ThrowOnError extends boolean = false>(\n  options: Omit<RequestOptions<ThrowOnError>, 'method'>,\n) => RequestResult<TData, TError, ThrowOnError>;\n\ntype RequestFn = <TData = unknown, TError = unknown, ThrowOnError extends boolean = false>(\n  options: Omit<RequestOptions<ThrowOnError>, 'method'> &\n    Pick<Required<RequestOptions<ThrowOnError>>, 'method'>,\n) => RequestResult<TData, TError, ThrowOnError>;\n\ntype BuildUrlFn = <\n  TData extends {\n    body?: unknown;\n    path?: Record<string, unknown>;\n    query?: Record<string, unknown>;\n    url: string;\n  },\n>(\n  options: TData & Options<TData>,\n) => string;\n\nexport type Client = CoreClient<RequestFn, Config, MethodFn, BuildUrlFn> & {\n  interceptors: Middleware<Request, Response, unknown, RequestOptions>;\n};\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 = ClientOptions> = (\n  override?: Config<ClientOptions & T>,\n) => Config<Required<ClientOptions> & T>;\n\nexport interface TDataShape {\n  body?: unknown;\n  headers?: unknown;\n  path?: unknown;\n  query?: unknown;\n  url: string;\n}\n\ntype OmitKeys<T, K> = Pick<T, Exclude<keyof T, K>>;\n\nexport type Options<\n  TData extends TDataShape = TDataShape,\n  ThrowOnError extends boolean = boolean,\n> = OmitKeys<RequestOptions<ThrowOnError>, 'body' | 'path' | 'query' | 'url'> & Omit<TData, 'url'>;\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/my-client/base-url-strict/client/utils.ts",
    "content": "import { getAuthToken } from './core/auth';\nimport type { QuerySerializer, QuerySerializerOptions } from './core/bodySerializer';\nimport { jsonBodySerializer } from './core/bodySerializer';\nimport {\n  serializeArrayParam,\n  serializeObjectParam,\n  serializePrimitiveParam,\n} from './core/pathSerializer';\nimport type { Client, ClientOptions, Config, RequestOptions } from './types';\n\ninterface PathSerializer {\n  path: Record<string, unknown>;\n  url: string;\n}\n\nconst PATH_PARAM_RE = /\\{[^{}]+\\}/g;\n\ntype ArrayStyle = 'form' | 'spaceDelimited' | 'pipeDelimited';\ntype MatrixStyle = 'label' | 'matrix' | 'simple';\ntype ArraySeparatorStyle = ArrayStyle | MatrixStyle;\n\nconst 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 createQuerySerializer = <T = unknown>({\n  allowReserved,\n  array,\n  object,\n}: QuerySerializerOptions = {}) => {\n  const querySerializer = (queryParams: T) => {\n    let 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        if (Array.isArray(value)) {\n          search = [\n            ...search,\n            serializeArrayParam({\n              allowReserved,\n              explode: true,\n              name,\n              style: 'form',\n              value,\n              ...array,\n            }),\n          ];\n          continue;\n        }\n\n        if (typeof value === 'object') {\n          search = [\n            ...search,\n            serializeObjectParam({\n              allowReserved,\n              explode: true,\n              name,\n              style: 'deepObject',\n              value: value as Record<string, unknown>,\n              ...object,\n            }),\n          ];\n          continue;\n        }\n\n        search = [\n          ...search,\n          serializePrimitiveParam({\n            allowReserved,\n            name,\n            value: value as string,\n          }),\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\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    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    return;\n  }\n};\n\nexport const buildUrl: Client['buildUrl'] = (options) => {\n  const url = 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  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 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\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 || typeof header !== 'object') {\n      continue;\n    }\n\n    const iterator = header instanceof Headers ? header.entries() : 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/my-client/base-url-strict/custom.gen.ts",
    "content": "// 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: 'http://localhost:3000/base' }));\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/my-client/base-url-strict/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type { _3eNum1Период, _400, AdditionalPropertiesIntegerIssue, AdditionalPropertiesUnknownIssue, AdditionalPropertiesUnknownIssue2, AdditionalPropertiesUnknownIssue3, AdditionalPropertiesUnknownIssueWritable, AnyOfAnyAndNull, AnyOfArrays, ApiVVersionODataControllerCountData, ApiVVersionODataControllerCountResponse, ApiVVersionODataControllerCountResponses, ArrayWithAnyOfProperties, ArrayWithArray, ArrayWithBooleans, ArrayWithNumbers, ArrayWithProperties, ArrayWithReferences, ArrayWithStrings, CallToTestOrderOfParamsData, CallWithDefaultOptionalParametersData, CallWithDefaultParametersData, CallWithDescriptionsData, CallWithDuplicateResponsesData, CallWithDuplicateResponsesError, CallWithDuplicateResponsesErrors, CallWithDuplicateResponsesResponse, CallWithDuplicateResponsesResponses, CallWithNoContentResponseData, CallWithNoContentResponseResponse, CallWithNoContentResponseResponses, CallWithParametersData, CallWithResponseAndNoContentResponseData, CallWithResponseAndNoContentResponseResponse, CallWithResponseAndNoContentResponseResponses, CallWithResponseData, CallWithResponseResponse, CallWithResponseResponses, CallWithResponsesData, CallWithResponsesError, CallWithResponsesErrors, CallWithResponsesResponse, CallWithResponsesResponses, CallWithResultFromHeaderData, CallWithResultFromHeaderErrors, CallWithResultFromHeaderResponses, CallWithWeirdParameterNamesData, CamelCaseCommentWithBreaks, CharactersInDescription, ClientOptions, CollectionFormatData, CommentWithBackticks, CommentWithBackticksAndQuotes, CommentWithBreaks, CommentWithExpressionPlaceholders, CommentWithQuotes, CommentWithReservedCharacters, CommentWithSlashes, ComplexParamsData, ComplexParamsResponse, ComplexParamsResponses, ComplexTypesData, ComplexTypesErrors, ComplexTypesResponse, ComplexTypesResponses, CompositionBaseModel, CompositionExtendedModel, CompositionWithAllOfAndNullable, CompositionWithAnyOf, CompositionWithAnyOfAndNullable, CompositionWithAnyOfAnonymous, CompositionWithNestedAnyAndTypeNull, CompositionWithNestedAnyOfAndNull, CompositionWithOneOf, CompositionWithOneOfAndComplexArrayDictionary, CompositionWithOneOfAndNullable, CompositionWithOneOfAndProperties, CompositionWithOneOfAndSimpleArrayDictionary, CompositionWithOneOfAndSimpleDictionary, CompositionWithOneOfAnonymous, CompositionWithOneOfDiscriminator, ConstValue, Default, DeleteCallWithoutParametersAndResponseData, DeleteFooData, DeleteFooData2, DeleteFooData3, DeprecatedCallData, DeprecatedModel, DictionaryWithArray, DictionaryWithDictionary, DictionaryWithProperties, DictionaryWithPropertiesAndAdditionalProperties, DictionaryWithReference, DictionaryWithString, DummyAData, DummyAResponse, DummyAResponses, DummyBData, DummyBResponse, DummyBResponses, DuplicateName2Data, DuplicateName3Data, DuplicateName4Data, DuplicateNameData, EnumFromDescription, EnumWithExtensions, EnumWithNumbers, EnumWithReplacedCharacters, EnumWithStrings, EnumWithXEnumNames, ExportData, ExternalRefA, ExternalRefB, ExternalSharedModel, File, FileResponseData, FileResponseResponse, FileResponseResponses, FileWritable, FooWowData, FooWowResponses, FreeFormObjectWithAdditionalPropertiesEqEmptyObject, FreeFormObjectWithAdditionalPropertiesEqTrue, FreeFormObjectWithoutAdditionalProperties, GenericSchemaDuplicateIssue1SystemBoolean, GenericSchemaDuplicateIssue1SystemBooleanWritable, GenericSchemaDuplicateIssue1SystemString, GenericSchemaDuplicateIssue1SystemStringWritable, GetApiVbyApiVersionSimpleOperationData, GetApiVbyApiVersionSimpleOperationError, GetApiVbyApiVersionSimpleOperationErrors, GetApiVbyApiVersionSimpleOperationResponse, GetApiVbyApiVersionSimpleOperationResponses, GetCallWithOptionalParamData, GetCallWithoutParametersAndResponseData, HeadCallWithoutParametersAndResponseData, Import, ImportData, ImportResponse, ImportResponses, IoK8sApimachineryPkgApisMetaV1DeleteOptions, IoK8sApimachineryPkgApisMetaV1Preconditions, ModelCircle, ModelFromZendesk, ModelSquare, ModelThatExtends, ModelThatExtendsExtends, ModelWithAdditionalPropertiesEqTrue, ModelWithAdditionalPropertiesRef, ModelWithAnyOfConstantSizeArray, ModelWithAnyOfConstantSizeArrayAndIntersect, ModelWithAnyOfConstantSizeArrayNullable, ModelWithAnyOfConstantSizeArrayWithNSizeAndOptions, ModelWithAnyOfConstantSizeArrayWithNSizeAndOptionsWritable, ModelWithArray, ModelWithArrayReadOnlyAndWriteOnly, ModelWithArrayReadOnlyAndWriteOnlyWritable, ModelWithBackticksInDescription, ModelWithBoolean, ModelWithCircularReference, ModelWithConst, ModelWithConstantSizeArray, ModelWithDictionary, ModelWithDuplicateImports, ModelWithDuplicateProperties, ModelWithEnum, ModelWithEnumFromDescription, ModelWithEnumWithHyphen, ModelWithInteger, ModelWithNestedArrayEnums, ModelWithNestedArrayEnumsData, ModelWithNestedArrayEnumsDataBar, ModelWithNestedArrayEnumsDataFoo, ModelWithNestedCompositionEnums, ModelWithNestedEnums, ModelWithNestedProperties, ModelWithNullableObject, ModelWithNullableString, ModelWithNumericEnumUnion, ModelWithOneOfAndProperties, ModelWithOneOfEnum, ModelWithOrderedProperties, ModelWithPattern, ModelWithPatternWritable, ModelWithPrefixItemsConstantSizeArray, ModelWithProperties, ModelWithPropertiesWritable, ModelWithReadOnlyAndWriteOnly, ModelWithReadOnlyAndWriteOnlyWritable, ModelWithReference, ModelWithReferenceWritable, ModelWithString, ModelWithStringError, MultipartRequestData, MultipartResponseData, MultipartResponseResponse, MultipartResponseResponses, NestedAnyOfArraysNullable, NonAsciiæøåÆøÅöôêÊ字符串Data, NonAsciiæøåÆøÅöôêÊ字符串Response, NonAsciiæøåÆøÅöôêÊ字符串Responses, NonAsciiStringæøåÆøÅöôêÊ字符串, NullableObject, OneOfAllOfIssue, OneOfAllOfIssueWritable, OptionsCallWithoutParametersAndResponseData, Pageable, ParameterSimpleParameterUnused, PatchApiVbyApiVersionNoTagData, PatchApiVbyApiVersionNoTagResponses, PatchCallWithoutParametersAndResponseData, PostApiVbyApiVersionFormDataData, PostApiVbyApiVersionRequestBodyData, PostCallWithOptionalParamData, PostCallWithOptionalParamResponse, PostCallWithOptionalParamResponses, PostCallWithoutParametersAndResponseData, PostServiceWithEmptyTagResponse, PostServiceWithEmptyTagResponse2, PutCallWithoutParametersAndResponseData, PutWithFormUrlEncodedData, SchemaWithFormRestrictedKeys, SimpleBoolean, SimpleFile, SimpleFormData, SimpleInteger, SimpleParameter, SimpleReference, SimpleRequestBody, SimpleString, SimpleStringWithPattern, TestErrorCodeData, TestErrorCodeErrors, TestErrorCodeResponses, TypesData, TypesResponse, TypesResponses, UploadFileData, UploadFileResponse, UploadFileResponses, XFooBar } from './types.gen';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/my-client/base-url-strict/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type ClientOptions = {\n    baseUrl: 'http://localhost:3000/base';\n};\n\n/**\n * Model with number-only name\n */\nexport type _400 = string;\n\n/**\n * External ref to shared model (A)\n */\nexport type ExternalRefA = ExternalSharedModel;\n\n/**\n * External ref to shared model (B)\n */\nexport type ExternalRefB = ExternalSharedModel;\n\n/**\n * Testing multiline comments in string: First line\n * Second line\n *\n * Fourth line\n */\nexport type CamelCaseCommentWithBreaks = number;\n\n/**\n * Testing multiline comments in string: First line\n * Second line\n *\n * Fourth line\n */\nexport type CommentWithBreaks = number;\n\n/**\n * Testing backticks in string: `backticks` and ```multiple backticks``` should work\n */\nexport type CommentWithBackticks = number;\n\n/**\n * Testing backticks and quotes in string: `backticks`, 'quotes', \"double quotes\" and ```multiple backticks``` should work\n */\nexport type CommentWithBackticksAndQuotes = number;\n\n/**\n * Testing slashes in string: \\backwards\\\\\\ and /forwards/// should work\n */\nexport type CommentWithSlashes = number;\n\n/**\n * Testing expression placeholders in string: ${expression} should work\n */\nexport type CommentWithExpressionPlaceholders = number;\n\n/**\n * Testing quotes in string: 'single quote''' and \"double quotes\"\"\" should work\n */\nexport type CommentWithQuotes = number;\n\n/**\n * Testing reserved characters in string: * inline * and ** inline ** should work\n */\nexport type CommentWithReservedCharacters = number;\n\n/**\n * This is a simple number\n */\nexport type SimpleInteger = number;\n\n/**\n * This is a simple boolean\n */\nexport type SimpleBoolean = boolean;\n\n/**\n * This is a simple string\n */\nexport type SimpleString = string;\n\n/**\n * A string with non-ascii (unicode) characters valid in typescript identifiers (æøåÆØÅöÔèÈ字符串)\n */\nexport type NonAsciiStringæøåÆøÅöôêÊ字符串 = string;\n\n/**\n * This is a simple file\n */\nexport type SimpleFile = Blob | File;\n\n/**\n * This is a simple reference\n */\nexport type SimpleReference = ModelWithString;\n\n/**\n * This is a simple string\n */\nexport type SimpleStringWithPattern = string | null;\n\n/**\n * This is a simple enum with strings\n */\nexport type EnumWithStrings = 'Success' | 'Warning' | 'Error' | '\\'Single Quote\\'' | '\"Double Quotes\"' | 'Non-ascii: øæåôöØÆÅÔÖ字符串';\n\nexport type EnumWithReplacedCharacters = '\\'Single Quote\\'' | '\"Double Quotes\"' | 'øæåôöØÆÅÔÖ字符串' | 3.1 | '';\n\n/**\n * This is a simple enum with numbers\n */\nexport type EnumWithNumbers = 1 | 2 | 3 | 1.1 | 1.2 | 1.3 | 100 | 200 | 300 | -100 | -200 | -300 | -1.1 | -1.2 | -1.3;\n\n/**\n * Success=1,Warning=2,Error=3\n */\nexport type EnumFromDescription = number;\n\n/**\n * This is a simple enum with numbers\n */\nexport type EnumWithExtensions = 200 | 400 | 500;\n\nexport type EnumWithXEnumNames = 0 | 1 | 2;\n\n/**\n * This is a simple array with numbers\n */\nexport type ArrayWithNumbers = Array<number>;\n\n/**\n * This is a simple array with booleans\n */\nexport type ArrayWithBooleans = Array<boolean>;\n\n/**\n * This is a simple array with strings\n */\nexport type ArrayWithStrings = Array<string>;\n\n/**\n * This is a simple array with references\n */\nexport type ArrayWithReferences = Array<ModelWithString>;\n\n/**\n * This is a simple array containing an array\n */\nexport type ArrayWithArray = Array<Array<ModelWithString>>;\n\n/**\n * This is a simple array with properties\n */\nexport type ArrayWithProperties = Array<{\n    '16x16'?: CamelCaseCommentWithBreaks;\n    bar?: string;\n}>;\n\n/**\n * This is a simple array with any of properties\n */\nexport type ArrayWithAnyOfProperties = Array<{\n    foo?: string;\n} | {\n    bar?: string;\n}>;\n\nexport type AnyOfAnyAndNull = {\n    data?: unknown | null;\n};\n\n/**\n * This is a simple array with any of properties\n */\nexport type AnyOfArrays = {\n    results?: Array<{\n        foo?: string;\n    } | {\n        bar?: string;\n    }>;\n};\n\n/**\n * This is a string dictionary\n */\nexport type DictionaryWithString = {\n    [key: string]: string;\n};\n\nexport type DictionaryWithPropertiesAndAdditionalProperties = {\n    foo?: number;\n    bar?: boolean;\n    [key: string]: string | number | boolean | undefined;\n};\n\n/**\n * This is a string reference\n */\nexport type DictionaryWithReference = {\n    [key: string]: ModelWithString;\n};\n\n/**\n * This is a complex dictionary\n */\nexport type DictionaryWithArray = {\n    [key: string]: Array<ModelWithString>;\n};\n\n/**\n * This is a string dictionary\n */\nexport type DictionaryWithDictionary = {\n    [key: string]: {\n        [key: string]: string;\n    };\n};\n\n/**\n * This is a complex dictionary\n */\nexport type DictionaryWithProperties = {\n    [key: string]: {\n        foo?: string;\n        bar?: string;\n    };\n};\n\n/**\n * This is a model with one number property\n */\nexport type ModelWithInteger = {\n    /**\n     * This is a simple number property\n     */\n    prop?: number;\n};\n\n/**\n * This is a model with one boolean property\n */\nexport type ModelWithBoolean = {\n    /**\n     * This is a simple boolean property\n     */\n    prop?: boolean;\n};\n\n/**\n * This is a model with one string property\n */\nexport type ModelWithString = {\n    /**\n     * This is a simple string property\n     */\n    prop?: string;\n};\n\n/**\n * This is a model with one string property\n */\nexport type ModelWithStringError = {\n    /**\n     * This is a simple string property\n     */\n    prop?: string;\n};\n\n/**\n * `Comment` or `VoiceComment`. The JSON object for adding voice comments to tickets is different. See [Adding voice comments to tickets](/documentation/ticketing/managing-tickets/adding-voice-comments-to-tickets)\n */\nexport type ModelFromZendesk = string;\n\n/**\n * This is a model with one string property\n */\nexport type ModelWithNullableString = {\n    /**\n     * This is a simple string property\n     */\n    nullableProp1?: string | null;\n    /**\n     * This is a simple string property\n     */\n    nullableRequiredProp1: string | null;\n    /**\n     * This is a simple string property\n     */\n    nullableProp2?: string | null;\n    /**\n     * This is a simple string property\n     */\n    nullableRequiredProp2: string | null;\n    /**\n     * This is a simple enum with strings\n     */\n    'foo_bar-enum'?: 'Success' | 'Warning' | 'Error' | 'ØÆÅ字符串';\n};\n\n/**\n * This is a model with one enum\n */\nexport type ModelWithEnum = {\n    /**\n     * This is a simple enum with strings\n     */\n    'foo_bar-enum'?: 'Success' | 'Warning' | 'Error' | 'ØÆÅ字符串';\n    /**\n     * These are the HTTP error code enums\n     */\n    statusCode?: '100' | '200 FOO' | '300 FOO_BAR' | '400 foo-bar' | '500 foo.bar' | '600 foo&bar';\n    /**\n     * Simple boolean enum\n     */\n    bool?: true;\n};\n\n/**\n * This is a model with one enum with escaped name\n */\nexport type ModelWithEnumWithHyphen = {\n    /**\n     * Foo-Bar-Baz-Qux\n     */\n    'foo-bar-baz-qux'?: '3.0';\n};\n\n/**\n * This is a model with one enum\n */\nexport type ModelWithEnumFromDescription = {\n    /**\n     * Success=1,Warning=2,Error=3\n     */\n    test?: number;\n};\n\n/**\n * This is a model with nested enums\n */\nexport type ModelWithNestedEnums = {\n    dictionaryWithEnum?: {\n        [key: string]: 'Success' | 'Warning' | 'Error';\n    };\n    dictionaryWithEnumFromDescription?: {\n        [key: string]: number;\n    };\n    arrayWithEnum?: Array<'Success' | 'Warning' | 'Error'>;\n    arrayWithDescription?: Array<number>;\n    /**\n     * This is a simple enum with strings\n     */\n    'foo_bar-enum'?: 'Success' | 'Warning' | 'Error' | 'ØÆÅ字符串';\n};\n\n/**\n * This is a model with one property containing a reference\n */\nexport type ModelWithReference = {\n    prop?: ModelWithProperties;\n};\n\n/**\n * This is a model with one property containing an array\n */\nexport type ModelWithArrayReadOnlyAndWriteOnly = {\n    prop?: Array<ModelWithReadOnlyAndWriteOnly>;\n    propWithFile?: Array<Blob | File>;\n    propWithNumber?: Array<number>;\n};\n\n/**\n * This is a model with one property containing an array\n */\nexport type ModelWithArray = {\n    prop?: Array<ModelWithString>;\n    propWithFile?: Array<Blob | File>;\n    propWithNumber?: Array<number>;\n};\n\n/**\n * This is a model with one property containing a dictionary\n */\nexport type ModelWithDictionary = {\n    prop?: {\n        [key: string]: string;\n    };\n};\n\n/**\n * This is a deprecated model with a deprecated property\n *\n * @deprecated\n */\nexport type DeprecatedModel = {\n    /**\n     * This is a deprecated property\n     *\n     * @deprecated\n     */\n    prop?: string;\n};\n\n/**\n * This is a model with one property containing a circular reference\n */\nexport type ModelWithCircularReference = {\n    prop?: ModelWithCircularReference;\n};\n\n/**\n * This is a model with one property with a 'one of' relationship\n */\nexport type CompositionWithOneOf = {\n    propA?: ModelWithString | ModelWithEnum | ModelWithArray | ModelWithDictionary;\n};\n\n/**\n * This is a model with one property with a 'one of' relationship where the options are not $ref\n */\nexport type CompositionWithOneOfAnonymous = {\n    propA?: {\n        propA?: string;\n    } | string | number;\n};\n\n/**\n * Circle\n */\nexport type ModelCircle = {\n    kind: string;\n    radius?: number;\n};\n\n/**\n * Square\n */\nexport type ModelSquare = {\n    kind: string;\n    sideLength?: number;\n};\n\n/**\n * This is a model with one property with a 'one of' relationship where the options are not $ref\n */\nexport type CompositionWithOneOfDiscriminator = ({\n    kind: 'circle';\n} & ModelCircle) | ({\n    kind: 'square';\n} & ModelSquare);\n\n/**\n * This is a model with one property with a 'any of' relationship\n */\nexport type CompositionWithAnyOf = {\n    propA?: ModelWithString | ModelWithEnum | ModelWithArray | ModelWithDictionary;\n};\n\n/**\n * This is a model with one property with a 'any of' relationship where the options are not $ref\n */\nexport type CompositionWithAnyOfAnonymous = {\n    propA?: {\n        propA?: string;\n    } | string | number;\n};\n\n/**\n * This is a model with nested 'any of' property with a type null\n */\nexport type CompositionWithNestedAnyAndTypeNull = {\n    propA?: Array<ModelWithDictionary | null> | Array<ModelWithArray | null>;\n};\n\nexport type _3eNum1Период = 'Bird' | 'Dog';\n\nexport type ConstValue = 'ConstValue';\n\n/**\n * This is a model with one property with a 'any of' relationship where the options are not $ref\n */\nexport type CompositionWithNestedAnyOfAndNull = {\n    /**\n     * Scopes\n     */\n    propA?: Array<_3eNum1Период | ConstValue> | null;\n};\n\n/**\n * This is a model with one property with a 'one of' relationship\n */\nexport type CompositionWithOneOfAndNullable = {\n    propA?: {\n        boolean?: boolean;\n    } | ModelWithEnum | ModelWithArray | ModelWithDictionary | null;\n};\n\n/**\n * This is a model that contains a simple dictionary within composition\n */\nexport type CompositionWithOneOfAndSimpleDictionary = {\n    propA?: boolean | {\n        [key: string]: number;\n    };\n};\n\n/**\n * This is a model that contains a dictionary of simple arrays within composition\n */\nexport type CompositionWithOneOfAndSimpleArrayDictionary = {\n    propA?: boolean | {\n        [key: string]: Array<boolean>;\n    };\n};\n\n/**\n * This is a model that contains a dictionary of complex arrays (composited) within composition\n */\nexport type CompositionWithOneOfAndComplexArrayDictionary = {\n    propA?: boolean | {\n        [key: string]: Array<number | string>;\n    };\n};\n\n/**\n * This is a model with one property with a 'all of' relationship\n */\nexport type CompositionWithAllOfAndNullable = {\n    propA?: ({\n        boolean?: boolean;\n    } & ModelWithEnum & ModelWithArray & ModelWithDictionary) | null;\n};\n\n/**\n * This is a model with one property with a 'any of' relationship\n */\nexport type CompositionWithAnyOfAndNullable = {\n    propA?: {\n        boolean?: boolean;\n    } | ModelWithEnum | ModelWithArray | ModelWithDictionary | null;\n};\n\n/**\n * This is a base model with two simple optional properties\n */\nexport type CompositionBaseModel = {\n    firstName?: string;\n    lastname?: string;\n};\n\n/**\n * This is a model that extends the base model\n */\nexport type CompositionExtendedModel = CompositionBaseModel & {\n    age: number;\n    firstName: string;\n    lastname: string;\n};\n\n/**\n * This is a model with one nested property\n */\nexport type ModelWithProperties = {\n    required: string;\n    readonly requiredAndReadOnly: string;\n    requiredAndNullable: string | null;\n    string?: string;\n    number?: number;\n    boolean?: boolean;\n    reference?: ModelWithString;\n    'property with space'?: string;\n    default?: string;\n    try?: string;\n    readonly '@namespace.string'?: string;\n    readonly '@namespace.integer'?: number;\n};\n\n/**\n * This is a model with one nested property\n */\nexport type ModelWithNestedProperties = {\n    readonly first: {\n        readonly second: {\n            readonly third: string | null;\n        } | null;\n    } | null;\n};\n\n/**\n * This is a model with duplicated properties\n */\nexport type ModelWithDuplicateProperties = {\n    prop?: ModelWithString;\n};\n\n/**\n * This is a model with ordered properties\n */\nexport type ModelWithOrderedProperties = {\n    zebra?: string;\n    apple?: string;\n    hawaii?: string;\n};\n\n/**\n * This is a model with duplicated imports\n */\nexport type ModelWithDuplicateImports = {\n    propA?: ModelWithString;\n    propB?: ModelWithString;\n    propC?: ModelWithString;\n};\n\n/**\n * This is a model that extends another model\n */\nexport type ModelThatExtends = ModelWithString & {\n    propExtendsA?: string;\n    propExtendsB?: ModelWithString;\n};\n\n/**\n * This is a model that extends another model\n */\nexport type ModelThatExtendsExtends = ModelWithString & ModelThatExtends & {\n    propExtendsC?: string;\n    propExtendsD?: ModelWithString;\n};\n\n/**\n * This is a model that contains a some patterns\n */\nexport type ModelWithPattern = {\n    key: string;\n    name: string;\n    readonly enabled?: boolean;\n    readonly modified?: string;\n    id?: string;\n    text?: string;\n    patternWithSingleQuotes?: string;\n    patternWithNewline?: string;\n    patternWithBacktick?: string;\n    patternWithUnicode?: string;\n};\n\nexport type File = {\n    /**\n     * Id\n     */\n    readonly id?: string;\n    /**\n     * Updated at\n     */\n    readonly updated_at?: string;\n    /**\n     * Created at\n     */\n    readonly created_at?: string;\n    /**\n     * Mime\n     */\n    mime: string;\n    /**\n     * File\n     */\n    readonly file?: string;\n};\n\nexport type Default = {\n    name?: string;\n};\n\nexport type Pageable = {\n    page?: number;\n    size?: number;\n    sort?: Array<string>;\n};\n\n/**\n * This is a free-form object without additionalProperties.\n */\nexport type FreeFormObjectWithoutAdditionalProperties = {\n    [key: string]: unknown;\n};\n\n/**\n * This is a free-form object with additionalProperties: true.\n */\nexport type FreeFormObjectWithAdditionalPropertiesEqTrue = {\n    [key: string]: unknown;\n};\n\n/**\n * This is a free-form object with additionalProperties: {}.\n */\nexport type FreeFormObjectWithAdditionalPropertiesEqEmptyObject = {\n    [key: string]: unknown;\n};\n\nexport type ModelWithConst = {\n    String?: 'String';\n    number?: 0;\n    null?: null;\n    withType?: 'Some string';\n};\n\n/**\n * This is a model with one property and additionalProperties: true\n */\nexport type ModelWithAdditionalPropertiesEqTrue = {\n    /**\n     * This is a simple string property\n     */\n    prop?: string;\n    [key: string]: unknown;\n};\n\nexport type NestedAnyOfArraysNullable = {\n    nullableArray?: Array<string | boolean> | null;\n};\n\nexport type CompositionWithOneOfAndProperties = ({\n    foo: SimpleParameter;\n} | {\n    bar: NonAsciiStringæøåÆøÅöôêÊ字符串;\n}) & {\n    baz: number | null;\n    qux: number;\n};\n\n/**\n * An object that can be null\n */\nexport type NullableObject = {\n    foo?: string;\n} | null;\n\n/**\n * Some % character\n */\nexport type CharactersInDescription = string;\n\nexport type ModelWithNullableObject = {\n    data?: NullableObject;\n};\n\n/**\n * An object with additional properties that can be null (anyOf ref + null)\n */\nexport type ModelWithAdditionalPropertiesRef = {\n    [key: string]: NullableObject | null;\n};\n\nexport type ModelWithOneOfEnum = {\n    foo: 'Bar';\n} | {\n    foo: 'Baz';\n} | {\n    foo: 'Qux';\n} | {\n    content: string;\n    foo: 'Quux';\n} | {\n    content: [\n        string,\n        string\n    ];\n    foo: 'Corge';\n};\n\nexport type ModelWithNestedArrayEnumsDataFoo = 'foo' | 'bar';\n\nexport type ModelWithNestedArrayEnumsDataBar = 'baz' | 'qux';\n\nexport type ModelWithNestedArrayEnumsData = {\n    foo?: Array<ModelWithNestedArrayEnumsDataFoo>;\n    bar?: Array<ModelWithNestedArrayEnumsDataBar>;\n};\n\nexport type ModelWithNestedArrayEnums = {\n    array_strings?: Array<string>;\n    data?: ModelWithNestedArrayEnumsData;\n};\n\nexport type ModelWithNestedCompositionEnums = {\n    foo?: ModelWithNestedArrayEnumsDataFoo;\n};\n\nexport type ModelWithReadOnlyAndWriteOnly = {\n    foo: string;\n    readonly bar: string;\n};\n\nexport type ModelWithConstantSizeArray = [\n    number,\n    number\n];\n\nexport type ModelWithAnyOfConstantSizeArray = [\n    number | string,\n    number | string,\n    number | string\n];\n\nexport type ModelWithPrefixItemsConstantSizeArray = [\n    ModelWithInteger,\n    number | string,\n    string\n];\n\nexport type ModelWithAnyOfConstantSizeArrayNullable = [\n    number | null | string,\n    number | null | string,\n    number | null | string\n];\n\nexport type ModelWithAnyOfConstantSizeArrayWithNSizeAndOptions = [\n    number | Import,\n    number | Import\n];\n\nexport type ModelWithAnyOfConstantSizeArrayAndIntersect = [\n    number & string,\n    number & string\n];\n\nexport type ModelWithNumericEnumUnion = {\n    /**\n     * Период\n     */\n    value?: -10 | -1 | 0 | 1 | 3 | 6 | 12;\n};\n\n/**\n * Some description with `back ticks`\n */\nexport type ModelWithBackticksInDescription = {\n    /**\n     * The template `that` should be used for parsing and importing the contents of the CSV file.\n     *\n     * <br/><p>There is one placeholder currently supported:<ul>     <li><b>${x}</b> - refers to the n-th column in the CSV file, e.g. ${1}, ${2}, ...)</li></ul><p>Example of a correct JSON template:</p>\n     * <pre>\n     * [\n     * {\n     * \"resourceType\": \"Asset\",\n     * \"identifier\": {\n     * \"name\": \"${1}\",\n     * \"domain\": {\n     * \"name\": \"${2}\",\n     * \"community\": {\n     * \"name\": \"Some Community\"\n     * }\n     * }\n     * },\n     * \"attributes\" : {\n     * \"00000000-0000-0000-0000-000000003115\" : [ {\n     * \"value\" : \"${3}\"\n     * } ],\n     * \"00000000-0000-0000-0000-000000000222\" : [ {\n     * \"value\" : \"${4}\"\n     * } ]\n     * }\n     * }\n     * ]\n     * </pre>\n     */\n    template?: string;\n};\n\nexport type ModelWithOneOfAndProperties = (SimpleParameter | NonAsciiStringæøåÆøÅöôêÊ字符串) & {\n    baz: number | null;\n    qux: number;\n};\n\n/**\n * Model used to test deduplication strategy (unused)\n */\nexport type ParameterSimpleParameterUnused = string;\n\n/**\n * Model used to test deduplication strategy\n */\nexport type PostServiceWithEmptyTagResponse = string;\n\n/**\n * Model used to test deduplication strategy\n */\nexport type PostServiceWithEmptyTagResponse2 = string;\n\n/**\n * Model used to test deduplication strategy\n */\nexport type DeleteFooData = string;\n\n/**\n * Model used to test deduplication strategy\n */\nexport type DeleteFooData2 = string;\n\n/**\n * Model with restricted keyword name\n */\nexport type Import = string;\n\nexport type SchemaWithFormRestrictedKeys = {\n    description?: string;\n    'x-enum-descriptions'?: string;\n    'x-enum-varnames'?: string;\n    'x-enumNames'?: string;\n    title?: string;\n    object?: {\n        description?: string;\n        'x-enum-descriptions'?: string;\n        'x-enum-varnames'?: string;\n        'x-enumNames'?: string;\n        title?: string;\n    };\n    array?: Array<{\n        description?: string;\n        'x-enum-descriptions'?: string;\n        'x-enum-varnames'?: string;\n        'x-enumNames'?: string;\n        title?: string;\n    }>;\n};\n\n/**\n * This schema was giving PascalCase transformations a hard time\n */\nexport type IoK8sApimachineryPkgApisMetaV1DeleteOptions = {\n    /**\n     * Must be fulfilled before a deletion is carried out. If not possible, a 409 Conflict status will be returned.\n     */\n    preconditions?: IoK8sApimachineryPkgApisMetaV1Preconditions;\n};\n\n/**\n * This schema was giving PascalCase transformations a hard time\n */\nexport type IoK8sApimachineryPkgApisMetaV1Preconditions = {\n    /**\n     * Specifies the target ResourceVersion\n     */\n    resourceVersion?: string;\n    /**\n     * Specifies the target UID.\n     */\n    uid?: string;\n};\n\nexport type AdditionalPropertiesUnknownIssue = {\n    [key: string]: string | number;\n};\n\nexport type AdditionalPropertiesUnknownIssue2 = {\n    [key: string]: string | number;\n};\n\nexport type AdditionalPropertiesUnknownIssue3 = string & {\n    entries: {\n        [key: string]: AdditionalPropertiesUnknownIssue;\n    };\n};\n\nexport type AdditionalPropertiesIntegerIssue = {\n    value: number;\n    [key: string]: number;\n};\n\nexport type OneOfAllOfIssue = ((ConstValue | GenericSchemaDuplicateIssue1SystemBoolean) & _3eNum1Период) | GenericSchemaDuplicateIssue1SystemString;\n\nexport type GenericSchemaDuplicateIssue1SystemBoolean = {\n    item?: boolean;\n    error?: string | null;\n    readonly hasError?: boolean;\n    data?: {\n        [key: string]: never;\n    };\n};\n\nexport type GenericSchemaDuplicateIssue1SystemString = {\n    item?: string | null;\n    error?: string | null;\n    readonly hasError?: boolean;\n};\n\nexport type ExternalSharedModel = {\n    id: string;\n    name?: string;\n};\n\n/**\n * This is a model with one property containing a reference\n */\nexport type ModelWithReferenceWritable = {\n    prop?: ModelWithPropertiesWritable;\n};\n\n/**\n * This is a model with one property containing an array\n */\nexport type ModelWithArrayReadOnlyAndWriteOnlyWritable = {\n    prop?: Array<ModelWithReadOnlyAndWriteOnlyWritable>;\n    propWithFile?: Array<Blob | File>;\n    propWithNumber?: Array<number>;\n};\n\n/**\n * This is a model with one nested property\n */\nexport type ModelWithPropertiesWritable = {\n    required: string;\n    requiredAndNullable: string | null;\n    string?: string;\n    number?: number;\n    boolean?: boolean;\n    reference?: ModelWithString;\n    'property with space'?: string;\n    default?: string;\n    try?: string;\n};\n\n/**\n * This is a model that contains a some patterns\n */\nexport type ModelWithPatternWritable = {\n    key: string;\n    name: string;\n    id?: string;\n    text?: string;\n    patternWithSingleQuotes?: string;\n    patternWithNewline?: string;\n    patternWithBacktick?: string;\n    patternWithUnicode?: string;\n};\n\nexport type FileWritable = {\n    /**\n     * Mime\n     */\n    mime: string;\n};\n\nexport type ModelWithReadOnlyAndWriteOnlyWritable = {\n    foo: string;\n    baz: string;\n};\n\nexport type ModelWithAnyOfConstantSizeArrayWithNSizeAndOptionsWritable = [\n    number | Import,\n    number | Import\n];\n\nexport type AdditionalPropertiesUnknownIssueWritable = {\n    [key: string]: string | number;\n};\n\nexport type OneOfAllOfIssueWritable = ((ConstValue | GenericSchemaDuplicateIssue1SystemBoolean) & _3eNum1Период) | GenericSchemaDuplicateIssue1SystemString;\n\nexport type GenericSchemaDuplicateIssue1SystemBooleanWritable = {\n    item?: boolean;\n    error?: string | null;\n    data?: {\n        [key: string]: never;\n    };\n};\n\nexport type GenericSchemaDuplicateIssue1SystemStringWritable = {\n    item?: string | null;\n    error?: string | null;\n};\n\n/**\n * This is a reusable parameter\n */\nexport type SimpleParameter = string;\n\n/**\n * Parameter with illegal characters\n */\nexport type XFooBar = ModelWithString;\n\n/**\n * A reusable request body\n */\nexport type SimpleRequestBody = ModelWithString;\n\n/**\n * A reusable request body\n */\nexport type SimpleFormData = ModelWithString;\n\nexport type ExportData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no+tag';\n};\n\nexport type PatchApiVbyApiVersionNoTagData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no+tag';\n};\n\nexport type PatchApiVbyApiVersionNoTagResponses = {\n    /**\n     * OK\n     */\n    default: unknown;\n};\n\nexport type ImportData = {\n    body: ModelWithReadOnlyAndWriteOnlyWritable | ModelWithArrayReadOnlyAndWriteOnlyWritable;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no+tag';\n};\n\nexport type ImportResponses = {\n    /**\n     * Success\n     */\n    200: ModelFromZendesk;\n    /**\n     * Default success response\n     */\n    default: ModelWithReadOnlyAndWriteOnly;\n};\n\nexport type ImportResponse = ImportResponses[keyof ImportResponses];\n\nexport type FooWowData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no+tag';\n};\n\nexport type FooWowResponses = {\n    /**\n     * OK\n     */\n    default: unknown;\n};\n\nexport type ApiVVersionODataControllerCountData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple/$count';\n};\n\nexport type ApiVVersionODataControllerCountResponses = {\n    /**\n     * Success\n     */\n    200: ModelFromZendesk;\n};\n\nexport type ApiVVersionODataControllerCountResponse = ApiVVersionODataControllerCountResponses[keyof ApiVVersionODataControllerCountResponses];\n\nexport type GetApiVbyApiVersionSimpleOperationData = {\n    body?: never;\n    path: {\n        /**\n         * foo in method\n         */\n        foo_param: string;\n    };\n    query?: never;\n    url: '/api/v{api-version}/simple:operation';\n};\n\nexport type GetApiVbyApiVersionSimpleOperationErrors = {\n    /**\n     * Default error response\n     */\n    default: ModelWithBoolean;\n};\n\nexport type GetApiVbyApiVersionSimpleOperationError = GetApiVbyApiVersionSimpleOperationErrors[keyof GetApiVbyApiVersionSimpleOperationErrors];\n\nexport type GetApiVbyApiVersionSimpleOperationResponses = {\n    /**\n     * Response is a simple number\n     */\n    200: number;\n};\n\nexport type GetApiVbyApiVersionSimpleOperationResponse = GetApiVbyApiVersionSimpleOperationResponses[keyof GetApiVbyApiVersionSimpleOperationResponses];\n\nexport type DeleteCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type GetCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type HeadCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type OptionsCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type PatchCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type PostCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type PutCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type DeleteFooData3 = {\n    body?: never;\n    headers: {\n        /**\n         * Parameter with illegal characters\n         */\n        'x-Foo-Bar': ModelWithString;\n    };\n    path: {\n        /**\n         * foo in method\n         */\n        foo_param: string;\n        /**\n         * bar in method\n         */\n        BarParam: string;\n    };\n    query?: never;\n    url: '/api/v{api-version}/foo/{foo_param}/bar/{BarParam}';\n};\n\nexport type CallWithDescriptionsData = {\n    body?: never;\n    path?: never;\n    query?: {\n        /**\n         * Testing multiline comments in string: First line\n         * Second line\n         *\n         * Fourth line\n         */\n        parameterWithBreaks?: string;\n        /**\n         * Testing backticks in string: `backticks` and ```multiple backticks``` should work\n         */\n        parameterWithBackticks?: string;\n        /**\n         * Testing slashes in string: \\backwards\\\\\\ and /forwards/// should work\n         */\n        parameterWithSlashes?: string;\n        /**\n         * Testing expression placeholders in string: ${expression} should work\n         */\n        parameterWithExpressionPlaceholders?: string;\n        /**\n         * Testing quotes in string: 'single quote''' and \"double quotes\"\"\" should work\n         */\n        parameterWithQuotes?: string;\n        /**\n         * Testing reserved characters in string: * inline * and ** inline ** should work\n         */\n        parameterWithReservedCharacters?: string;\n    };\n    url: '/api/v{api-version}/descriptions';\n};\n\nexport type DeprecatedCallData = {\n    body?: never;\n    headers: {\n        /**\n         * This parameter is deprecated\n         *\n         * @deprecated\n         */\n        parameter: DeprecatedModel | null;\n    };\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/parameters/deprecated';\n};\n\nexport type CallWithParametersData = {\n    /**\n     * This is the parameter that goes into the body\n     */\n    body: {\n        [key: string]: unknown;\n    } | null;\n    headers: {\n        /**\n         * This is the parameter that goes into the header\n         */\n        parameterHeader: string | null;\n    };\n    path: {\n        /**\n         * This is the parameter that goes into the path\n         */\n        parameterPath: string | null;\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string | null;\n    };\n    query: {\n        foo_ref_enum?: ModelWithNestedArrayEnumsDataFoo;\n        foo_all_of_enum: ModelWithNestedArrayEnumsDataFoo;\n        /**\n         * This is the parameter that goes into the query params\n         */\n        cursor: string | null;\n    };\n    url: '/api/v{api-version}/parameters/{parameterPath}';\n};\n\nexport type CallWithWeirdParameterNamesData = {\n    /**\n     * This is the parameter that goes into the body\n     */\n    body: ModelWithString | null;\n    headers: {\n        /**\n         * This is the parameter that goes into the request header\n         */\n        'parameter.header': string | null;\n    };\n    path: {\n        /**\n         * This is the parameter that goes into the path\n         */\n        'parameter.path.1'?: string;\n        /**\n         * This is the parameter that goes into the path\n         */\n        'parameter-path-2'?: string;\n        /**\n         * This is the parameter that goes into the path\n         */\n        'PARAMETER-PATH-3'?: string;\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string | null;\n    };\n    query: {\n        /**\n         * This is the parameter with a reserved keyword\n         */\n        default?: string;\n        /**\n         * This is the parameter that goes into the request query params\n         */\n        'parameter-query': string | null;\n    };\n    url: '/api/v{api-version}/parameters/{parameter.path.1}/{parameter-path-2}/{PARAMETER-PATH-3}';\n};\n\nexport type GetCallWithOptionalParamData = {\n    /**\n     * This is a required parameter\n     */\n    body: ModelWithOneOfEnum;\n    path?: never;\n    query?: {\n        /**\n         * This is an optional parameter\n         */\n        page?: number;\n    };\n    url: '/api/v{api-version}/parameters';\n};\n\nexport type PostCallWithOptionalParamData = {\n    /**\n     * This is an optional parameter\n     */\n    body?: {\n        offset?: number | null;\n    };\n    path?: never;\n    query: {\n        /**\n         * This is a required parameter\n         */\n        parameter: Pageable;\n    };\n    url: '/api/v{api-version}/parameters';\n};\n\nexport type PostCallWithOptionalParamResponses = {\n    /**\n     * Response is a simple number\n     */\n    200: number;\n    /**\n     * Success\n     */\n    204: void;\n};\n\nexport type PostCallWithOptionalParamResponse = PostCallWithOptionalParamResponses[keyof PostCallWithOptionalParamResponses];\n\nexport type PostApiVbyApiVersionRequestBodyData = {\n    /**\n     * A reusable request body\n     */\n    body?: SimpleRequestBody;\n    path?: never;\n    query?: {\n        /**\n         * This is a reusable parameter\n         */\n        parameter?: string;\n    };\n    url: '/api/v{api-version}/requestBody';\n};\n\nexport type PostApiVbyApiVersionFormDataData = {\n    /**\n     * A reusable request body\n     */\n    body?: SimpleFormData;\n    path?: never;\n    query?: {\n        /**\n         * This is a reusable parameter\n         */\n        parameter?: string;\n    };\n    url: '/api/v{api-version}/formData';\n};\n\nexport type CallWithDefaultParametersData = {\n    body?: never;\n    path?: never;\n    query?: {\n        /**\n         * This is a simple string with default value\n         */\n        parameterString?: string | null;\n        /**\n         * This is a simple number with default value\n         */\n        parameterNumber?: number | null;\n        /**\n         * This is a simple boolean with default value\n         */\n        parameterBoolean?: boolean | null;\n        /**\n         * This is a simple enum with default value\n         */\n        parameterEnum?: 'Success' | 'Warning' | 'Error';\n        /**\n         * This is a simple model with default value\n         */\n        parameterModel?: ModelWithString | null;\n    };\n    url: '/api/v{api-version}/defaults';\n};\n\nexport type CallWithDefaultOptionalParametersData = {\n    body?: never;\n    path?: never;\n    query?: {\n        /**\n         * This is a simple string that is optional with default value\n         */\n        parameterString?: string;\n        /**\n         * This is a simple number that is optional with default value\n         */\n        parameterNumber?: number;\n        /**\n         * This is a simple boolean that is optional with default value\n         */\n        parameterBoolean?: boolean;\n        /**\n         * This is a simple enum that is optional with default value\n         */\n        parameterEnum?: 'Success' | 'Warning' | 'Error';\n        /**\n         * This is a simple model that is optional with default value\n         */\n        parameterModel?: ModelWithString;\n    };\n    url: '/api/v{api-version}/defaults';\n};\n\nexport type CallToTestOrderOfParamsData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * This is a optional string with default\n         */\n        parameterOptionalStringWithDefault?: string;\n        /**\n         * This is a optional string with empty default\n         */\n        parameterOptionalStringWithEmptyDefault?: string;\n        /**\n         * This is a optional string with no default\n         */\n        parameterOptionalStringWithNoDefault?: string;\n        /**\n         * This is a string with default\n         */\n        parameterStringWithDefault: string;\n        /**\n         * This is a string with empty default\n         */\n        parameterStringWithEmptyDefault: string;\n        /**\n         * This is a string with no default\n         */\n        parameterStringWithNoDefault: string;\n        /**\n         * This is a string that can be null with no default\n         */\n        parameterStringNullableWithNoDefault?: string | null;\n        /**\n         * This is a string that can be null with default\n         */\n        parameterStringNullableWithDefault?: string | null;\n    };\n    url: '/api/v{api-version}/defaults';\n};\n\nexport type DuplicateNameData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/duplicate';\n};\n\nexport type DuplicateName2Data = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/duplicate';\n};\n\nexport type DuplicateName3Data = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/duplicate';\n};\n\nexport type DuplicateName4Data = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/duplicate';\n};\n\nexport type CallWithNoContentResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no-content';\n};\n\nexport type CallWithNoContentResponseResponses = {\n    /**\n     * Success\n     */\n    204: void;\n};\n\nexport type CallWithNoContentResponseResponse = CallWithNoContentResponseResponses[keyof CallWithNoContentResponseResponses];\n\nexport type CallWithResponseAndNoContentResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multiple-tags/response-and-no-content';\n};\n\nexport type CallWithResponseAndNoContentResponseResponses = {\n    /**\n     * Response is a simple number\n     */\n    200: number;\n    /**\n     * Success\n     */\n    204: void;\n};\n\nexport type CallWithResponseAndNoContentResponseResponse = CallWithResponseAndNoContentResponseResponses[keyof CallWithResponseAndNoContentResponseResponses];\n\nexport type DummyAData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multiple-tags/a';\n};\n\nexport type DummyAResponses = {\n    200: _400;\n};\n\nexport type DummyAResponse = DummyAResponses[keyof DummyAResponses];\n\nexport type DummyBData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multiple-tags/b';\n};\n\nexport type DummyBResponses = {\n    /**\n     * Success\n     */\n    204: void;\n};\n\nexport type DummyBResponse = DummyBResponses[keyof DummyBResponses];\n\nexport type CallWithResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/response';\n};\n\nexport type CallWithResponseResponses = {\n    default: Import;\n};\n\nexport type CallWithResponseResponse = CallWithResponseResponses[keyof CallWithResponseResponses];\n\nexport type CallWithDuplicateResponsesData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/response';\n};\n\nexport type CallWithDuplicateResponsesErrors = {\n    /**\n     * Message for 500 error\n     */\n    500: ModelWithStringError;\n    /**\n     * Message for 501 error\n     */\n    501: ModelWithStringError;\n    /**\n     * Message for 502 error\n     */\n    502: ModelWithStringError;\n    /**\n     * Message for 4XX errors\n     */\n    '4XX': DictionaryWithArray;\n    /**\n     * Default error response\n     */\n    default: ModelWithBoolean;\n};\n\nexport type CallWithDuplicateResponsesError = CallWithDuplicateResponsesErrors[keyof CallWithDuplicateResponsesErrors];\n\nexport type CallWithDuplicateResponsesResponses = {\n    /**\n     * Message for 200 response\n     */\n    200: ModelWithBoolean & ModelWithInteger;\n    /**\n     * Message for 201 response\n     */\n    201: ModelWithString;\n    /**\n     * Message for 202 response\n     */\n    202: ModelWithString;\n};\n\nexport type CallWithDuplicateResponsesResponse = CallWithDuplicateResponsesResponses[keyof CallWithDuplicateResponsesResponses];\n\nexport type CallWithResponsesData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/response';\n};\n\nexport type CallWithResponsesErrors = {\n    /**\n     * Message for 500 error\n     */\n    500: ModelWithStringError;\n    /**\n     * Message for 501 error\n     */\n    501: ModelWithStringError;\n    /**\n     * Message for 502 error\n     */\n    502: ModelWithStringError;\n    /**\n     * Message for default response\n     */\n    default: ModelWithStringError;\n};\n\nexport type CallWithResponsesError = CallWithResponsesErrors[keyof CallWithResponsesErrors];\n\nexport type CallWithResponsesResponses = {\n    /**\n     * Message for 200 response\n     */\n    200: {\n        readonly '@namespace.string'?: string;\n        readonly '@namespace.integer'?: number;\n        readonly value?: Array<ModelWithString>;\n    };\n    /**\n     * Message for 201 response\n     */\n    201: ModelThatExtends;\n    /**\n     * Message for 202 response\n     */\n    202: ModelThatExtendsExtends;\n};\n\nexport type CallWithResponsesResponse = CallWithResponsesResponses[keyof CallWithResponsesResponses];\n\nexport type CollectionFormatData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * This is an array parameter that is sent as csv format (comma-separated values)\n         */\n        parameterArrayCSV: Array<string> | null;\n        /**\n         * This is an array parameter that is sent as ssv format (space-separated values)\n         */\n        parameterArraySSV: Array<string> | null;\n        /**\n         * This is an array parameter that is sent as tsv format (tab-separated values)\n         */\n        parameterArrayTSV: Array<string> | null;\n        /**\n         * This is an array parameter that is sent as pipes format (pipe-separated values)\n         */\n        parameterArrayPipes: Array<string> | null;\n        /**\n         * This is an array parameter that is sent as multi format (multiple parameter instances)\n         */\n        parameterArrayMulti: Array<string> | null;\n    };\n    url: '/api/v{api-version}/collectionFormat';\n};\n\nexport type TypesData = {\n    body?: never;\n    path?: {\n        /**\n         * This is a number parameter\n         */\n        id?: number;\n    };\n    query: {\n        /**\n         * This is a number parameter\n         */\n        parameterNumber: number;\n        /**\n         * This is a string parameter\n         */\n        parameterString: string | null;\n        /**\n         * This is a boolean parameter\n         */\n        parameterBoolean: boolean | null;\n        /**\n         * This is an object parameter\n         */\n        parameterObject: {\n            [key: string]: unknown;\n        } | null;\n        /**\n         * This is an array parameter\n         */\n        parameterArray: Array<string> | null;\n        /**\n         * This is a dictionary parameter\n         */\n        parameterDictionary: {\n            [key: string]: unknown;\n        } | null;\n        /**\n         * This is an enum parameter\n         */\n        parameterEnum: 'Success' | 'Warning' | 'Error' | null;\n    };\n    url: '/api/v{api-version}/types';\n};\n\nexport type TypesResponses = {\n    /**\n     * Response is a simple number\n     */\n    200: number;\n    /**\n     * Response is a simple string\n     */\n    201: string;\n    /**\n     * Response is a simple boolean\n     */\n    202: boolean;\n    /**\n     * Response is a simple object\n     */\n    203: {\n        [key: string]: unknown;\n    };\n};\n\nexport type TypesResponse = TypesResponses[keyof TypesResponses];\n\nexport type UploadFileData = {\n    body: Blob | File;\n    path: {\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string | null;\n    };\n    query?: never;\n    url: '/api/v{api-version}/upload';\n};\n\nexport type UploadFileResponses = {\n    200: boolean;\n};\n\nexport type UploadFileResponse = UploadFileResponses[keyof UploadFileResponses];\n\nexport type FileResponseData = {\n    body?: never;\n    path: {\n        id: string;\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string;\n    };\n    query?: never;\n    url: '/api/v{api-version}/file/{id}';\n};\n\nexport type FileResponseResponses = {\n    /**\n     * Success\n     */\n    200: Blob | File;\n};\n\nexport type FileResponseResponse = FileResponseResponses[keyof FileResponseResponses];\n\nexport type ComplexTypesData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * Parameter containing object\n         */\n        parameterObject: {\n            first?: {\n                second?: {\n                    third?: string;\n                };\n            };\n        };\n        /**\n         * Parameter containing reference\n         */\n        parameterReference: ModelWithString;\n    };\n    url: '/api/v{api-version}/complex';\n};\n\nexport type ComplexTypesErrors = {\n    /**\n     * 400 `server` error\n     */\n    400: unknown;\n    /**\n     * 500 server error\n     */\n    500: unknown;\n};\n\nexport type ComplexTypesResponses = {\n    /**\n     * Successful response\n     */\n    200: Array<ModelWithString>;\n};\n\nexport type ComplexTypesResponse = ComplexTypesResponses[keyof ComplexTypesResponses];\n\nexport type MultipartResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multipart';\n};\n\nexport type MultipartResponseResponses = {\n    /**\n     * OK\n     */\n    200: {\n        file?: Blob | File;\n        metadata?: {\n            foo?: string;\n            bar?: string;\n        };\n    };\n};\n\nexport type MultipartResponseResponse = MultipartResponseResponses[keyof MultipartResponseResponses];\n\nexport type MultipartRequestData = {\n    body?: {\n        content?: Blob | File;\n        data?: ModelWithString | null;\n    };\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multipart';\n};\n\nexport type ComplexParamsData = {\n    body?: {\n        readonly key: string | null;\n        name: string | null;\n        enabled?: boolean;\n        type: 'Monkey' | 'Horse' | 'Bird';\n        listOfModels?: Array<ModelWithString> | null;\n        listOfStrings?: Array<string> | null;\n        parameters: ModelWithString | ModelWithEnum | ModelWithArray | ModelWithDictionary;\n        readonly user?: {\n            readonly id?: number;\n            readonly name?: string | null;\n        };\n    };\n    path: {\n        id: number;\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string;\n    };\n    query?: never;\n    url: '/api/v{api-version}/complex/{id}';\n};\n\nexport type ComplexParamsResponses = {\n    /**\n     * Success\n     */\n    200: ModelWithString;\n};\n\nexport type ComplexParamsResponse = ComplexParamsResponses[keyof ComplexParamsResponses];\n\nexport type CallWithResultFromHeaderData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/header';\n};\n\nexport type CallWithResultFromHeaderErrors = {\n    /**\n     * 400 server error\n     */\n    400: unknown;\n    /**\n     * 500 server error\n     */\n    500: unknown;\n};\n\nexport type CallWithResultFromHeaderResponses = {\n    /**\n     * Successful response\n     */\n    200: unknown;\n};\n\nexport type TestErrorCodeData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * Status code to return\n         */\n        status: number;\n    };\n    url: '/api/v{api-version}/error';\n};\n\nexport type TestErrorCodeErrors = {\n    /**\n     * Custom message: Internal Server Error\n     */\n    500: unknown;\n    /**\n     * Custom message: Not Implemented\n     */\n    501: unknown;\n    /**\n     * Custom message: Bad Gateway\n     */\n    502: unknown;\n    /**\n     * Custom message: Service Unavailable\n     */\n    503: unknown;\n};\n\nexport type TestErrorCodeResponses = {\n    /**\n     * Custom message: Successful response\n     */\n    200: unknown;\n};\n\nexport type NonAsciiæøåÆøÅöôêÊ字符串Data = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * Dummy input param\n         */\n        nonAsciiParamæøåÆØÅöôêÊ: number;\n    };\n    url: '/api/v{api-version}/non-ascii-æøåÆØÅöôêÊ字符串';\n};\n\nexport type NonAsciiæøåÆøÅöôêÊ字符串Responses = {\n    /**\n     * Successful response\n     */\n    200: Array<NonAsciiStringæøåÆøÅöôêÊ字符串>;\n};\n\nexport type NonAsciiæøåÆøÅöôêÊ字符串Response = NonAsciiæøåÆøÅöôêÊ字符串Responses[keyof NonAsciiæøåÆøÅöôêÊ字符串Responses];\n\nexport type PutWithFormUrlEncodedData = {\n    body: ArrayWithStrings;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/non-ascii-æøåÆØÅöôêÊ字符串';\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/my-client/base-url-string/client/client.ts",
    "content": "import type { Client, Config, RequestOptions } from './types';\nimport {\n  buildUrl,\n  createConfig,\n  createInterceptors,\n  getParseAs,\n  mergeConfigs,\n  mergeHeaders,\n  setAuthParams,\n} from './utils';\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, RequestOptions>();\n\n  // @ts-expect-error\n  const request: Client['request'] = async (options) => {\n    const opts = {\n      ..._config,\n      ...options,\n      fetch: options.fetch ?? _config.fetch ?? globalThis.fetch,\n      headers: mergeHeaders(_config.headers, options.headers),\n    };\n\n    if (opts.security) {\n      await setAuthParams({\n        ...opts,\n        security: opts.security,\n      });\n    }\n\n    if (opts.body && opts.bodySerializer) {\n      opts.body = opts.bodySerializer(opts.body);\n    }\n\n    // remove Content-Type header if body is empty to avoid sending invalid requests\n    if (opts.body === undefined || opts.body === '') {\n      opts.headers.delete('Content-Type');\n    }\n\n    const url = buildUrl(opts);\n    const requestInit: ReqInit = {\n      redirect: 'follow',\n      ...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 = await _fetch(request);\n\n    for (const fn of interceptors.response.fns) {\n      if (fn) {\n        response = await fn(response, request, opts);\n      }\n    }\n\n    const result = {\n      request,\n      response,\n    };\n\n    if (response.ok) {\n      if (response.status === 204 || response.headers.get('Content-Length') === '0') {\n        return {\n          data: {},\n          ...result,\n        };\n      }\n\n      const parseAs =\n        (opts.parseAs === 'auto'\n          ? getParseAs(response.headers.get('Content-Type'))\n          : opts.parseAs) ?? 'json';\n\n      if (parseAs === 'stream') {\n        return {\n          data: response.body,\n          ...result,\n        };\n      }\n\n      let data = await response[parseAs]();\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 {\n        data,\n        ...result,\n      };\n    }\n\n    let error = await response.text();\n\n    try {\n      error = JSON.parse(error);\n    } catch {\n      // noop\n    }\n\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    return {\n      error: finalError,\n      ...result,\n    };\n  };\n\n  return {\n    buildUrl,\n    connect: (options) => request({ ...options, method: 'CONNECT' }),\n    delete: (options) => request({ ...options, method: 'DELETE' }),\n    get: (options) => request({ ...options, method: 'GET' }),\n    getConfig,\n    head: (options) => request({ ...options, method: 'HEAD' }),\n    interceptors,\n    options: (options) => request({ ...options, method: 'OPTIONS' }),\n    patch: (options) => request({ ...options, method: 'PATCH' }),\n    post: (options) => request({ ...options, method: 'POST' }),\n    put: (options) => request({ ...options, method: 'PUT' }),\n    request,\n    setConfig,\n    trace: (options) => request({ ...options, method: 'TRACE' }),\n  };\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/my-client/base-url-string/client/core/auth.ts",
    "content": "export 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/my-client/base-url-string/client/core/bodySerializer.ts",
    "content": "import type { ArrayStyle, ObjectStyle, SerializerOptions } from './pathSerializer';\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) => {\n  if (typeof value === 'string' || value instanceof Blob) {\n    data.append(key, value);\n  } else {\n    data.append(key, JSON.stringify(value));\n  }\n};\n\nconst serializeUrlSearchParamsPair = (data: URLSearchParams, key: string, value: unknown) => {\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) => {\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) =>\n    JSON.stringify(body, (_key, value) => (typeof value === 'bigint' ? value.toString() : value)),\n};\n\nexport const urlSearchParamsBodySerializer = {\n  bodySerializer: (body: unknown) => {\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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/my-client/base-url-string/client/core/params.ts",
    "content": "type Slot = 'body' | 'headers' | 'path' | 'query';\n\nexport type Field =\n  | {\n      in: Exclude<Slot, 'body'>;\n      key: string;\n      map?: string;\n    }\n  | {\n      in: Extract<Slot, 'body'>;\n      key?: string;\n      map?: string;\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\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 (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' && !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        (params[field.in] as Record<string, unknown>)[name] = arg;\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          const name = field.map || key;\n          (params[field.in] as Record<string, unknown>)[name] = value;\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 {\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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/my-client/base-url-string/client/core/pathSerializer.ts",
    "content": "interface 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/my-client/base-url-string/client/core/types.ts",
    "content": "import type { Auth, AuthToken } from './auth';\nimport type { BodySerializer, QuerySerializer, QuerySerializerOptions } from './bodySerializer';\n\nexport interface Client<RequestFn = never, Config = unknown, MethodFn = never, BuildUrlFn = never> {\n  /**\n   * Returns the final request URL.\n   */\n  buildUrl: BuildUrlFn;\n  connect: MethodFn;\n  delete: MethodFn;\n  get: MethodFn;\n  getConfig: () => Config;\n  head: MethodFn;\n  options: MethodFn;\n  patch: MethodFn;\n  post: MethodFn;\n  put: MethodFn;\n  request: RequestFn;\n  setConfig: (config: Config) => Config;\n  trace: MethodFn;\n}\n\nexport interface Config {\n  /**\n   * Auth token or a function returning auth token. The resolved value will be\n   * added to the request payload as defined by its `security` array.\n   */\n  auth?: ((auth: Auth) => Promise<AuthToken> | AuthToken) | AuthToken;\n  /**\n   * A function for serializing request body parameter. By default,\n   * {@link JSON.stringify()} will be used.\n   */\n  bodySerializer?: BodySerializer | null;\n  /**\n   * An object containing any HTTP headers that you want to pre-populate your\n   * `Headers` object with.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/Headers/Headers#init See more}\n   */\n  headers?:\n    | RequestInit['headers']\n    | Record<\n        string,\n        string | number | boolean | (string | number | boolean)[] | null | undefined | unknown\n      >;\n  /**\n   * The request method.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/fetch#method See more}\n   */\n  method?: 'CONNECT' | 'DELETE' | 'GET' | 'HEAD' | 'OPTIONS' | 'PATCH' | 'POST' | 'PUT' | 'TRACE';\n  /**\n   * A function for serializing request query parameters. By default, arrays\n   * will be exploded in form style, objects will be exploded in deepObject\n   * style, and reserved characters are percent-encoded.\n   *\n   * This method will have no effect if the native `paramsSerializer()` Axios\n   * API function is used.\n   *\n   * {@link https://swagger.io/docs/specification/serialization/#query View examples}\n   */\n  querySerializer?: QuerySerializer | QuerySerializerOptions;\n  /**\n   * A function transforming response data before it's returned. This is useful\n   * for post-processing data, e.g. converting ISO strings into Date objects.\n   */\n  responseTransformer?: (data: unknown) => Promise<unknown>;\n  /**\n   * A function validating response data. This is useful if you want to ensure\n   * the response conforms to the desired shape, so it can be safely passed to\n   * the transformers and returned to the user.\n   */\n  responseValidator?: (data: unknown) => Promise<unknown>;\n}\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/my-client/base-url-string/client/index.ts",
    "content": "export { createClient } from './client';\nexport type { Auth } from './core/auth';\nexport type { QuerySerializerOptions } from './core/bodySerializer';\nexport {\n  formDataBodySerializer,\n  jsonBodySerializer,\n  urlSearchParamsBodySerializer,\n} from './core/bodySerializer';\nexport type {\n  Client,\n  ClientOptions,\n  Config,\n  CreateClientConfig,\n  Options,\n  RequestOptions,\n  RequestResult,\n  TDataShape,\n} from './types';\nexport { createConfig } from './utils';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/my-client/base-url-string/client/plugin.ts",
    "content": "import {\n  type Client,\n  clientDefaultConfig,\n  clientDefaultMeta,\n  clientPluginHandler,\n  type DefinePlugin,\n  definePluginConfig,\n} from '@hey-api/openapi-ts';\n\nexport type Config = Client.Config & {\n  /**\n   * Plugin name. Must be unique.\n   */\n  name: string;\n};\n\nexport type MyClientPlugin = DefinePlugin<Config, Config>;\n\nexport const defaultConfig: MyClientPlugin['Config'] = {\n  ...clientDefaultMeta,\n  config: clientDefaultConfig,\n  handler: clientPluginHandler as MyClientPlugin['Handler'],\n  name: __filename,\n};\n\n/**\n * Type helper for `my-client` plugin, returns {@link Plugin.Config} object\n */\nexport const myClientPlugin = definePluginConfig(defaultConfig);\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/my-client/base-url-string/client/types.ts",
    "content": "import type { Auth } from './core/auth';\nimport type { Client as CoreClient, Config as CoreConfig } from './core/types';\nimport type { Middleware } from './utils';\n\nexport interface Config<T extends ClientOptions = ClientOptions>\n  extends Omit<RequestInit, 'body' | 'headers' | 'method'>, CoreConfig {\n  /**\n   * Base URL for all requests made by this client.\n   */\n  baseUrl?: T['baseUrl'];\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?: (request: Request) => ReturnType<typeof fetch>;\n  /**\n   * Return the response data parsed in a specified format. By default, `auto`\n   * will infer the appropriate method from the `Content-Type` response header.\n   * You can override this behavior with any of the {@link Body} methods.\n   * Select `stream` if you don't want to parse response data at all.\n   *\n   * @default 'auto'\n   */\n  parseAs?: 'arrayBuffer' | 'auto' | 'blob' | 'formData' | 'json' | 'stream' | 'text';\n  /**\n   * Throw an error instead of returning it in the response?\n   *\n   * @default false\n   */\n  throwOnError?: T['throwOnError'];\n}\n\nexport interface RequestOptions<\n  ThrowOnError extends boolean = boolean,\n  Url extends string = string,\n> extends Config<{\n  throwOnError: ThrowOnError;\n}> {\n  /**\n   * Any body that you want to add to your request.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/fetch#body}\n   */\n  body?: unknown;\n  path?: Record<string, unknown>;\n  query?: Record<string, unknown>;\n  /**\n   * Security mechanism(s) to use for the request.\n   */\n  security?: ReadonlyArray<Auth>;\n  url: Url;\n}\n\nexport type RequestResult<\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = boolean,\n> = ThrowOnError extends true\n  ? Promise<{\n      data: TData;\n      request: Request;\n      response: Response;\n    }>\n  : Promise<\n      ({ data: TData; error: undefined } | { data: undefined; error: TError }) & {\n        request: Request;\n        response: Response;\n      }\n    >;\n\nexport interface ClientOptions {\n  baseUrl?: string;\n  throwOnError?: boolean;\n}\n\ntype MethodFn = <TData = unknown, TError = unknown, ThrowOnError extends boolean = false>(\n  options: Omit<RequestOptions<ThrowOnError>, 'method'>,\n) => RequestResult<TData, TError, ThrowOnError>;\n\ntype RequestFn = <TData = unknown, TError = unknown, ThrowOnError extends boolean = false>(\n  options: Omit<RequestOptions<ThrowOnError>, 'method'> &\n    Pick<Required<RequestOptions<ThrowOnError>>, 'method'>,\n) => RequestResult<TData, TError, ThrowOnError>;\n\ntype BuildUrlFn = <\n  TData extends {\n    body?: unknown;\n    path?: Record<string, unknown>;\n    query?: Record<string, unknown>;\n    url: string;\n  },\n>(\n  options: TData & Options<TData>,\n) => string;\n\nexport type Client = CoreClient<RequestFn, Config, MethodFn, BuildUrlFn> & {\n  interceptors: Middleware<Request, Response, unknown, RequestOptions>;\n};\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 = ClientOptions> = (\n  override?: Config<ClientOptions & T>,\n) => Config<Required<ClientOptions> & T>;\n\nexport interface TDataShape {\n  body?: unknown;\n  headers?: unknown;\n  path?: unknown;\n  query?: unknown;\n  url: string;\n}\n\ntype OmitKeys<T, K> = Pick<T, Exclude<keyof T, K>>;\n\nexport type Options<\n  TData extends TDataShape = TDataShape,\n  ThrowOnError extends boolean = boolean,\n> = OmitKeys<RequestOptions<ThrowOnError>, 'body' | 'path' | 'query' | 'url'> & Omit<TData, 'url'>;\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/my-client/base-url-string/client/utils.ts",
    "content": "import { getAuthToken } from './core/auth';\nimport type { QuerySerializer, QuerySerializerOptions } from './core/bodySerializer';\nimport { jsonBodySerializer } from './core/bodySerializer';\nimport {\n  serializeArrayParam,\n  serializeObjectParam,\n  serializePrimitiveParam,\n} from './core/pathSerializer';\nimport type { Client, ClientOptions, Config, RequestOptions } from './types';\n\ninterface PathSerializer {\n  path: Record<string, unknown>;\n  url: string;\n}\n\nconst PATH_PARAM_RE = /\\{[^{}]+\\}/g;\n\ntype ArrayStyle = 'form' | 'spaceDelimited' | 'pipeDelimited';\ntype MatrixStyle = 'label' | 'matrix' | 'simple';\ntype ArraySeparatorStyle = ArrayStyle | MatrixStyle;\n\nconst 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 createQuerySerializer = <T = unknown>({\n  allowReserved,\n  array,\n  object,\n}: QuerySerializerOptions = {}) => {\n  const querySerializer = (queryParams: T) => {\n    let 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        if (Array.isArray(value)) {\n          search = [\n            ...search,\n            serializeArrayParam({\n              allowReserved,\n              explode: true,\n              name,\n              style: 'form',\n              value,\n              ...array,\n            }),\n          ];\n          continue;\n        }\n\n        if (typeof value === 'object') {\n          search = [\n            ...search,\n            serializeObjectParam({\n              allowReserved,\n              explode: true,\n              name,\n              style: 'deepObject',\n              value: value as Record<string, unknown>,\n              ...object,\n            }),\n          ];\n          continue;\n        }\n\n        search = [\n          ...search,\n          serializePrimitiveParam({\n            allowReserved,\n            name,\n            value: value as string,\n          }),\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\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    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    return;\n  }\n};\n\nexport const buildUrl: Client['buildUrl'] = (options) => {\n  const url = 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  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 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\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 || typeof header !== 'object') {\n      continue;\n    }\n\n    const iterator = header instanceof Headers ? header.entries() : 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/my-client/base-url-string/custom.gen.ts",
    "content": "// 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://foo.com' }));\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/my-client/base-url-string/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type { _3eNum1Период, _400, AdditionalPropertiesIntegerIssue, AdditionalPropertiesUnknownIssue, AdditionalPropertiesUnknownIssue2, AdditionalPropertiesUnknownIssue3, AdditionalPropertiesUnknownIssueWritable, AnyOfAnyAndNull, AnyOfArrays, ApiVVersionODataControllerCountData, ApiVVersionODataControllerCountResponse, ApiVVersionODataControllerCountResponses, ArrayWithAnyOfProperties, ArrayWithArray, ArrayWithBooleans, ArrayWithNumbers, ArrayWithProperties, ArrayWithReferences, ArrayWithStrings, CallToTestOrderOfParamsData, CallWithDefaultOptionalParametersData, CallWithDefaultParametersData, CallWithDescriptionsData, CallWithDuplicateResponsesData, CallWithDuplicateResponsesError, CallWithDuplicateResponsesErrors, CallWithDuplicateResponsesResponse, CallWithDuplicateResponsesResponses, CallWithNoContentResponseData, CallWithNoContentResponseResponse, CallWithNoContentResponseResponses, CallWithParametersData, CallWithResponseAndNoContentResponseData, CallWithResponseAndNoContentResponseResponse, CallWithResponseAndNoContentResponseResponses, CallWithResponseData, CallWithResponseResponse, CallWithResponseResponses, CallWithResponsesData, CallWithResponsesError, CallWithResponsesErrors, CallWithResponsesResponse, CallWithResponsesResponses, CallWithResultFromHeaderData, CallWithResultFromHeaderErrors, CallWithResultFromHeaderResponses, CallWithWeirdParameterNamesData, CamelCaseCommentWithBreaks, CharactersInDescription, ClientOptions, CollectionFormatData, CommentWithBackticks, CommentWithBackticksAndQuotes, CommentWithBreaks, CommentWithExpressionPlaceholders, CommentWithQuotes, CommentWithReservedCharacters, CommentWithSlashes, ComplexParamsData, ComplexParamsResponse, ComplexParamsResponses, ComplexTypesData, ComplexTypesErrors, ComplexTypesResponse, ComplexTypesResponses, CompositionBaseModel, CompositionExtendedModel, CompositionWithAllOfAndNullable, CompositionWithAnyOf, CompositionWithAnyOfAndNullable, CompositionWithAnyOfAnonymous, CompositionWithNestedAnyAndTypeNull, CompositionWithNestedAnyOfAndNull, CompositionWithOneOf, CompositionWithOneOfAndComplexArrayDictionary, CompositionWithOneOfAndNullable, CompositionWithOneOfAndProperties, CompositionWithOneOfAndSimpleArrayDictionary, CompositionWithOneOfAndSimpleDictionary, CompositionWithOneOfAnonymous, CompositionWithOneOfDiscriminator, ConstValue, Default, DeleteCallWithoutParametersAndResponseData, DeleteFooData, DeleteFooData2, DeleteFooData3, DeprecatedCallData, DeprecatedModel, DictionaryWithArray, DictionaryWithDictionary, DictionaryWithProperties, DictionaryWithPropertiesAndAdditionalProperties, DictionaryWithReference, DictionaryWithString, DummyAData, DummyAResponse, DummyAResponses, DummyBData, DummyBResponse, DummyBResponses, DuplicateName2Data, DuplicateName3Data, DuplicateName4Data, DuplicateNameData, EnumFromDescription, EnumWithExtensions, EnumWithNumbers, EnumWithReplacedCharacters, EnumWithStrings, EnumWithXEnumNames, ExportData, ExternalRefA, ExternalRefB, ExternalSharedModel, File, FileResponseData, FileResponseResponse, FileResponseResponses, FileWritable, FooWowData, FooWowResponses, FreeFormObjectWithAdditionalPropertiesEqEmptyObject, FreeFormObjectWithAdditionalPropertiesEqTrue, FreeFormObjectWithoutAdditionalProperties, GenericSchemaDuplicateIssue1SystemBoolean, GenericSchemaDuplicateIssue1SystemBooleanWritable, GenericSchemaDuplicateIssue1SystemString, GenericSchemaDuplicateIssue1SystemStringWritable, GetApiVbyApiVersionSimpleOperationData, GetApiVbyApiVersionSimpleOperationError, GetApiVbyApiVersionSimpleOperationErrors, GetApiVbyApiVersionSimpleOperationResponse, GetApiVbyApiVersionSimpleOperationResponses, GetCallWithOptionalParamData, GetCallWithoutParametersAndResponseData, HeadCallWithoutParametersAndResponseData, Import, ImportData, ImportResponse, ImportResponses, IoK8sApimachineryPkgApisMetaV1DeleteOptions, IoK8sApimachineryPkgApisMetaV1Preconditions, ModelCircle, ModelFromZendesk, ModelSquare, ModelThatExtends, ModelThatExtendsExtends, ModelWithAdditionalPropertiesEqTrue, ModelWithAdditionalPropertiesRef, ModelWithAnyOfConstantSizeArray, ModelWithAnyOfConstantSizeArrayAndIntersect, ModelWithAnyOfConstantSizeArrayNullable, ModelWithAnyOfConstantSizeArrayWithNSizeAndOptions, ModelWithAnyOfConstantSizeArrayWithNSizeAndOptionsWritable, ModelWithArray, ModelWithArrayReadOnlyAndWriteOnly, ModelWithArrayReadOnlyAndWriteOnlyWritable, ModelWithBackticksInDescription, ModelWithBoolean, ModelWithCircularReference, ModelWithConst, ModelWithConstantSizeArray, ModelWithDictionary, ModelWithDuplicateImports, ModelWithDuplicateProperties, ModelWithEnum, ModelWithEnumFromDescription, ModelWithEnumWithHyphen, ModelWithInteger, ModelWithNestedArrayEnums, ModelWithNestedArrayEnumsData, ModelWithNestedArrayEnumsDataBar, ModelWithNestedArrayEnumsDataFoo, ModelWithNestedCompositionEnums, ModelWithNestedEnums, ModelWithNestedProperties, ModelWithNullableObject, ModelWithNullableString, ModelWithNumericEnumUnion, ModelWithOneOfAndProperties, ModelWithOneOfEnum, ModelWithOrderedProperties, ModelWithPattern, ModelWithPatternWritable, ModelWithPrefixItemsConstantSizeArray, ModelWithProperties, ModelWithPropertiesWritable, ModelWithReadOnlyAndWriteOnly, ModelWithReadOnlyAndWriteOnlyWritable, ModelWithReference, ModelWithReferenceWritable, ModelWithString, ModelWithStringError, MultipartRequestData, MultipartResponseData, MultipartResponseResponse, MultipartResponseResponses, NestedAnyOfArraysNullable, NonAsciiæøåÆøÅöôêÊ字符串Data, NonAsciiæøåÆøÅöôêÊ字符串Response, NonAsciiæøåÆøÅöôêÊ字符串Responses, NonAsciiStringæøåÆøÅöôêÊ字符串, NullableObject, OneOfAllOfIssue, OneOfAllOfIssueWritable, OptionsCallWithoutParametersAndResponseData, Pageable, ParameterSimpleParameterUnused, PatchApiVbyApiVersionNoTagData, PatchApiVbyApiVersionNoTagResponses, PatchCallWithoutParametersAndResponseData, PostApiVbyApiVersionFormDataData, PostApiVbyApiVersionRequestBodyData, PostCallWithOptionalParamData, PostCallWithOptionalParamResponse, PostCallWithOptionalParamResponses, PostCallWithoutParametersAndResponseData, PostServiceWithEmptyTagResponse, PostServiceWithEmptyTagResponse2, PutCallWithoutParametersAndResponseData, PutWithFormUrlEncodedData, SchemaWithFormRestrictedKeys, SimpleBoolean, SimpleFile, SimpleFormData, SimpleInteger, SimpleParameter, SimpleReference, SimpleRequestBody, SimpleString, SimpleStringWithPattern, TestErrorCodeData, TestErrorCodeErrors, TestErrorCodeResponses, TypesData, TypesResponse, TypesResponses, UploadFileData, UploadFileResponse, UploadFileResponses, XFooBar } from './types.gen';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/my-client/base-url-string/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type ClientOptions = {\n    baseUrl: 'http://localhost:3000/base' | (string & {});\n};\n\n/**\n * Model with number-only name\n */\nexport type _400 = string;\n\n/**\n * External ref to shared model (A)\n */\nexport type ExternalRefA = ExternalSharedModel;\n\n/**\n * External ref to shared model (B)\n */\nexport type ExternalRefB = ExternalSharedModel;\n\n/**\n * Testing multiline comments in string: First line\n * Second line\n *\n * Fourth line\n */\nexport type CamelCaseCommentWithBreaks = number;\n\n/**\n * Testing multiline comments in string: First line\n * Second line\n *\n * Fourth line\n */\nexport type CommentWithBreaks = number;\n\n/**\n * Testing backticks in string: `backticks` and ```multiple backticks``` should work\n */\nexport type CommentWithBackticks = number;\n\n/**\n * Testing backticks and quotes in string: `backticks`, 'quotes', \"double quotes\" and ```multiple backticks``` should work\n */\nexport type CommentWithBackticksAndQuotes = number;\n\n/**\n * Testing slashes in string: \\backwards\\\\\\ and /forwards/// should work\n */\nexport type CommentWithSlashes = number;\n\n/**\n * Testing expression placeholders in string: ${expression} should work\n */\nexport type CommentWithExpressionPlaceholders = number;\n\n/**\n * Testing quotes in string: 'single quote''' and \"double quotes\"\"\" should work\n */\nexport type CommentWithQuotes = number;\n\n/**\n * Testing reserved characters in string: * inline * and ** inline ** should work\n */\nexport type CommentWithReservedCharacters = number;\n\n/**\n * This is a simple number\n */\nexport type SimpleInteger = number;\n\n/**\n * This is a simple boolean\n */\nexport type SimpleBoolean = boolean;\n\n/**\n * This is a simple string\n */\nexport type SimpleString = string;\n\n/**\n * A string with non-ascii (unicode) characters valid in typescript identifiers (æøåÆØÅöÔèÈ字符串)\n */\nexport type NonAsciiStringæøåÆøÅöôêÊ字符串 = string;\n\n/**\n * This is a simple file\n */\nexport type SimpleFile = Blob | File;\n\n/**\n * This is a simple reference\n */\nexport type SimpleReference = ModelWithString;\n\n/**\n * This is a simple string\n */\nexport type SimpleStringWithPattern = string | null;\n\n/**\n * This is a simple enum with strings\n */\nexport type EnumWithStrings = 'Success' | 'Warning' | 'Error' | '\\'Single Quote\\'' | '\"Double Quotes\"' | 'Non-ascii: øæåôöØÆÅÔÖ字符串';\n\nexport type EnumWithReplacedCharacters = '\\'Single Quote\\'' | '\"Double Quotes\"' | 'øæåôöØÆÅÔÖ字符串' | 3.1 | '';\n\n/**\n * This is a simple enum with numbers\n */\nexport type EnumWithNumbers = 1 | 2 | 3 | 1.1 | 1.2 | 1.3 | 100 | 200 | 300 | -100 | -200 | -300 | -1.1 | -1.2 | -1.3;\n\n/**\n * Success=1,Warning=2,Error=3\n */\nexport type EnumFromDescription = number;\n\n/**\n * This is a simple enum with numbers\n */\nexport type EnumWithExtensions = 200 | 400 | 500;\n\nexport type EnumWithXEnumNames = 0 | 1 | 2;\n\n/**\n * This is a simple array with numbers\n */\nexport type ArrayWithNumbers = Array<number>;\n\n/**\n * This is a simple array with booleans\n */\nexport type ArrayWithBooleans = Array<boolean>;\n\n/**\n * This is a simple array with strings\n */\nexport type ArrayWithStrings = Array<string>;\n\n/**\n * This is a simple array with references\n */\nexport type ArrayWithReferences = Array<ModelWithString>;\n\n/**\n * This is a simple array containing an array\n */\nexport type ArrayWithArray = Array<Array<ModelWithString>>;\n\n/**\n * This is a simple array with properties\n */\nexport type ArrayWithProperties = Array<{\n    '16x16'?: CamelCaseCommentWithBreaks;\n    bar?: string;\n}>;\n\n/**\n * This is a simple array with any of properties\n */\nexport type ArrayWithAnyOfProperties = Array<{\n    foo?: string;\n} | {\n    bar?: string;\n}>;\n\nexport type AnyOfAnyAndNull = {\n    data?: unknown | null;\n};\n\n/**\n * This is a simple array with any of properties\n */\nexport type AnyOfArrays = {\n    results?: Array<{\n        foo?: string;\n    } | {\n        bar?: string;\n    }>;\n};\n\n/**\n * This is a string dictionary\n */\nexport type DictionaryWithString = {\n    [key: string]: string;\n};\n\nexport type DictionaryWithPropertiesAndAdditionalProperties = {\n    foo?: number;\n    bar?: boolean;\n    [key: string]: string | number | boolean | undefined;\n};\n\n/**\n * This is a string reference\n */\nexport type DictionaryWithReference = {\n    [key: string]: ModelWithString;\n};\n\n/**\n * This is a complex dictionary\n */\nexport type DictionaryWithArray = {\n    [key: string]: Array<ModelWithString>;\n};\n\n/**\n * This is a string dictionary\n */\nexport type DictionaryWithDictionary = {\n    [key: string]: {\n        [key: string]: string;\n    };\n};\n\n/**\n * This is a complex dictionary\n */\nexport type DictionaryWithProperties = {\n    [key: string]: {\n        foo?: string;\n        bar?: string;\n    };\n};\n\n/**\n * This is a model with one number property\n */\nexport type ModelWithInteger = {\n    /**\n     * This is a simple number property\n     */\n    prop?: number;\n};\n\n/**\n * This is a model with one boolean property\n */\nexport type ModelWithBoolean = {\n    /**\n     * This is a simple boolean property\n     */\n    prop?: boolean;\n};\n\n/**\n * This is a model with one string property\n */\nexport type ModelWithString = {\n    /**\n     * This is a simple string property\n     */\n    prop?: string;\n};\n\n/**\n * This is a model with one string property\n */\nexport type ModelWithStringError = {\n    /**\n     * This is a simple string property\n     */\n    prop?: string;\n};\n\n/**\n * `Comment` or `VoiceComment`. The JSON object for adding voice comments to tickets is different. See [Adding voice comments to tickets](/documentation/ticketing/managing-tickets/adding-voice-comments-to-tickets)\n */\nexport type ModelFromZendesk = string;\n\n/**\n * This is a model with one string property\n */\nexport type ModelWithNullableString = {\n    /**\n     * This is a simple string property\n     */\n    nullableProp1?: string | null;\n    /**\n     * This is a simple string property\n     */\n    nullableRequiredProp1: string | null;\n    /**\n     * This is a simple string property\n     */\n    nullableProp2?: string | null;\n    /**\n     * This is a simple string property\n     */\n    nullableRequiredProp2: string | null;\n    /**\n     * This is a simple enum with strings\n     */\n    'foo_bar-enum'?: 'Success' | 'Warning' | 'Error' | 'ØÆÅ字符串';\n};\n\n/**\n * This is a model with one enum\n */\nexport type ModelWithEnum = {\n    /**\n     * This is a simple enum with strings\n     */\n    'foo_bar-enum'?: 'Success' | 'Warning' | 'Error' | 'ØÆÅ字符串';\n    /**\n     * These are the HTTP error code enums\n     */\n    statusCode?: '100' | '200 FOO' | '300 FOO_BAR' | '400 foo-bar' | '500 foo.bar' | '600 foo&bar';\n    /**\n     * Simple boolean enum\n     */\n    bool?: true;\n};\n\n/**\n * This is a model with one enum with escaped name\n */\nexport type ModelWithEnumWithHyphen = {\n    /**\n     * Foo-Bar-Baz-Qux\n     */\n    'foo-bar-baz-qux'?: '3.0';\n};\n\n/**\n * This is a model with one enum\n */\nexport type ModelWithEnumFromDescription = {\n    /**\n     * Success=1,Warning=2,Error=3\n     */\n    test?: number;\n};\n\n/**\n * This is a model with nested enums\n */\nexport type ModelWithNestedEnums = {\n    dictionaryWithEnum?: {\n        [key: string]: 'Success' | 'Warning' | 'Error';\n    };\n    dictionaryWithEnumFromDescription?: {\n        [key: string]: number;\n    };\n    arrayWithEnum?: Array<'Success' | 'Warning' | 'Error'>;\n    arrayWithDescription?: Array<number>;\n    /**\n     * This is a simple enum with strings\n     */\n    'foo_bar-enum'?: 'Success' | 'Warning' | 'Error' | 'ØÆÅ字符串';\n};\n\n/**\n * This is a model with one property containing a reference\n */\nexport type ModelWithReference = {\n    prop?: ModelWithProperties;\n};\n\n/**\n * This is a model with one property containing an array\n */\nexport type ModelWithArrayReadOnlyAndWriteOnly = {\n    prop?: Array<ModelWithReadOnlyAndWriteOnly>;\n    propWithFile?: Array<Blob | File>;\n    propWithNumber?: Array<number>;\n};\n\n/**\n * This is a model with one property containing an array\n */\nexport type ModelWithArray = {\n    prop?: Array<ModelWithString>;\n    propWithFile?: Array<Blob | File>;\n    propWithNumber?: Array<number>;\n};\n\n/**\n * This is a model with one property containing a dictionary\n */\nexport type ModelWithDictionary = {\n    prop?: {\n        [key: string]: string;\n    };\n};\n\n/**\n * This is a deprecated model with a deprecated property\n *\n * @deprecated\n */\nexport type DeprecatedModel = {\n    /**\n     * This is a deprecated property\n     *\n     * @deprecated\n     */\n    prop?: string;\n};\n\n/**\n * This is a model with one property containing a circular reference\n */\nexport type ModelWithCircularReference = {\n    prop?: ModelWithCircularReference;\n};\n\n/**\n * This is a model with one property with a 'one of' relationship\n */\nexport type CompositionWithOneOf = {\n    propA?: ModelWithString | ModelWithEnum | ModelWithArray | ModelWithDictionary;\n};\n\n/**\n * This is a model with one property with a 'one of' relationship where the options are not $ref\n */\nexport type CompositionWithOneOfAnonymous = {\n    propA?: {\n        propA?: string;\n    } | string | number;\n};\n\n/**\n * Circle\n */\nexport type ModelCircle = {\n    kind: string;\n    radius?: number;\n};\n\n/**\n * Square\n */\nexport type ModelSquare = {\n    kind: string;\n    sideLength?: number;\n};\n\n/**\n * This is a model with one property with a 'one of' relationship where the options are not $ref\n */\nexport type CompositionWithOneOfDiscriminator = ({\n    kind: 'circle';\n} & ModelCircle) | ({\n    kind: 'square';\n} & ModelSquare);\n\n/**\n * This is a model with one property with a 'any of' relationship\n */\nexport type CompositionWithAnyOf = {\n    propA?: ModelWithString | ModelWithEnum | ModelWithArray | ModelWithDictionary;\n};\n\n/**\n * This is a model with one property with a 'any of' relationship where the options are not $ref\n */\nexport type CompositionWithAnyOfAnonymous = {\n    propA?: {\n        propA?: string;\n    } | string | number;\n};\n\n/**\n * This is a model with nested 'any of' property with a type null\n */\nexport type CompositionWithNestedAnyAndTypeNull = {\n    propA?: Array<ModelWithDictionary | null> | Array<ModelWithArray | null>;\n};\n\nexport type _3eNum1Период = 'Bird' | 'Dog';\n\nexport type ConstValue = 'ConstValue';\n\n/**\n * This is a model with one property with a 'any of' relationship where the options are not $ref\n */\nexport type CompositionWithNestedAnyOfAndNull = {\n    /**\n     * Scopes\n     */\n    propA?: Array<_3eNum1Период | ConstValue> | null;\n};\n\n/**\n * This is a model with one property with a 'one of' relationship\n */\nexport type CompositionWithOneOfAndNullable = {\n    propA?: {\n        boolean?: boolean;\n    } | ModelWithEnum | ModelWithArray | ModelWithDictionary | null;\n};\n\n/**\n * This is a model that contains a simple dictionary within composition\n */\nexport type CompositionWithOneOfAndSimpleDictionary = {\n    propA?: boolean | {\n        [key: string]: number;\n    };\n};\n\n/**\n * This is a model that contains a dictionary of simple arrays within composition\n */\nexport type CompositionWithOneOfAndSimpleArrayDictionary = {\n    propA?: boolean | {\n        [key: string]: Array<boolean>;\n    };\n};\n\n/**\n * This is a model that contains a dictionary of complex arrays (composited) within composition\n */\nexport type CompositionWithOneOfAndComplexArrayDictionary = {\n    propA?: boolean | {\n        [key: string]: Array<number | string>;\n    };\n};\n\n/**\n * This is a model with one property with a 'all of' relationship\n */\nexport type CompositionWithAllOfAndNullable = {\n    propA?: ({\n        boolean?: boolean;\n    } & ModelWithEnum & ModelWithArray & ModelWithDictionary) | null;\n};\n\n/**\n * This is a model with one property with a 'any of' relationship\n */\nexport type CompositionWithAnyOfAndNullable = {\n    propA?: {\n        boolean?: boolean;\n    } | ModelWithEnum | ModelWithArray | ModelWithDictionary | null;\n};\n\n/**\n * This is a base model with two simple optional properties\n */\nexport type CompositionBaseModel = {\n    firstName?: string;\n    lastname?: string;\n};\n\n/**\n * This is a model that extends the base model\n */\nexport type CompositionExtendedModel = CompositionBaseModel & {\n    age: number;\n    firstName: string;\n    lastname: string;\n};\n\n/**\n * This is a model with one nested property\n */\nexport type ModelWithProperties = {\n    required: string;\n    readonly requiredAndReadOnly: string;\n    requiredAndNullable: string | null;\n    string?: string;\n    number?: number;\n    boolean?: boolean;\n    reference?: ModelWithString;\n    'property with space'?: string;\n    default?: string;\n    try?: string;\n    readonly '@namespace.string'?: string;\n    readonly '@namespace.integer'?: number;\n};\n\n/**\n * This is a model with one nested property\n */\nexport type ModelWithNestedProperties = {\n    readonly first: {\n        readonly second: {\n            readonly third: string | null;\n        } | null;\n    } | null;\n};\n\n/**\n * This is a model with duplicated properties\n */\nexport type ModelWithDuplicateProperties = {\n    prop?: ModelWithString;\n};\n\n/**\n * This is a model with ordered properties\n */\nexport type ModelWithOrderedProperties = {\n    zebra?: string;\n    apple?: string;\n    hawaii?: string;\n};\n\n/**\n * This is a model with duplicated imports\n */\nexport type ModelWithDuplicateImports = {\n    propA?: ModelWithString;\n    propB?: ModelWithString;\n    propC?: ModelWithString;\n};\n\n/**\n * This is a model that extends another model\n */\nexport type ModelThatExtends = ModelWithString & {\n    propExtendsA?: string;\n    propExtendsB?: ModelWithString;\n};\n\n/**\n * This is a model that extends another model\n */\nexport type ModelThatExtendsExtends = ModelWithString & ModelThatExtends & {\n    propExtendsC?: string;\n    propExtendsD?: ModelWithString;\n};\n\n/**\n * This is a model that contains a some patterns\n */\nexport type ModelWithPattern = {\n    key: string;\n    name: string;\n    readonly enabled?: boolean;\n    readonly modified?: string;\n    id?: string;\n    text?: string;\n    patternWithSingleQuotes?: string;\n    patternWithNewline?: string;\n    patternWithBacktick?: string;\n    patternWithUnicode?: string;\n};\n\nexport type File = {\n    /**\n     * Id\n     */\n    readonly id?: string;\n    /**\n     * Updated at\n     */\n    readonly updated_at?: string;\n    /**\n     * Created at\n     */\n    readonly created_at?: string;\n    /**\n     * Mime\n     */\n    mime: string;\n    /**\n     * File\n     */\n    readonly file?: string;\n};\n\nexport type Default = {\n    name?: string;\n};\n\nexport type Pageable = {\n    page?: number;\n    size?: number;\n    sort?: Array<string>;\n};\n\n/**\n * This is a free-form object without additionalProperties.\n */\nexport type FreeFormObjectWithoutAdditionalProperties = {\n    [key: string]: unknown;\n};\n\n/**\n * This is a free-form object with additionalProperties: true.\n */\nexport type FreeFormObjectWithAdditionalPropertiesEqTrue = {\n    [key: string]: unknown;\n};\n\n/**\n * This is a free-form object with additionalProperties: {}.\n */\nexport type FreeFormObjectWithAdditionalPropertiesEqEmptyObject = {\n    [key: string]: unknown;\n};\n\nexport type ModelWithConst = {\n    String?: 'String';\n    number?: 0;\n    null?: null;\n    withType?: 'Some string';\n};\n\n/**\n * This is a model with one property and additionalProperties: true\n */\nexport type ModelWithAdditionalPropertiesEqTrue = {\n    /**\n     * This is a simple string property\n     */\n    prop?: string;\n    [key: string]: unknown;\n};\n\nexport type NestedAnyOfArraysNullable = {\n    nullableArray?: Array<string | boolean> | null;\n};\n\nexport type CompositionWithOneOfAndProperties = ({\n    foo: SimpleParameter;\n} | {\n    bar: NonAsciiStringæøåÆøÅöôêÊ字符串;\n}) & {\n    baz: number | null;\n    qux: number;\n};\n\n/**\n * An object that can be null\n */\nexport type NullableObject = {\n    foo?: string;\n} | null;\n\n/**\n * Some % character\n */\nexport type CharactersInDescription = string;\n\nexport type ModelWithNullableObject = {\n    data?: NullableObject;\n};\n\n/**\n * An object with additional properties that can be null (anyOf ref + null)\n */\nexport type ModelWithAdditionalPropertiesRef = {\n    [key: string]: NullableObject | null;\n};\n\nexport type ModelWithOneOfEnum = {\n    foo: 'Bar';\n} | {\n    foo: 'Baz';\n} | {\n    foo: 'Qux';\n} | {\n    content: string;\n    foo: 'Quux';\n} | {\n    content: [\n        string,\n        string\n    ];\n    foo: 'Corge';\n};\n\nexport type ModelWithNestedArrayEnumsDataFoo = 'foo' | 'bar';\n\nexport type ModelWithNestedArrayEnumsDataBar = 'baz' | 'qux';\n\nexport type ModelWithNestedArrayEnumsData = {\n    foo?: Array<ModelWithNestedArrayEnumsDataFoo>;\n    bar?: Array<ModelWithNestedArrayEnumsDataBar>;\n};\n\nexport type ModelWithNestedArrayEnums = {\n    array_strings?: Array<string>;\n    data?: ModelWithNestedArrayEnumsData;\n};\n\nexport type ModelWithNestedCompositionEnums = {\n    foo?: ModelWithNestedArrayEnumsDataFoo;\n};\n\nexport type ModelWithReadOnlyAndWriteOnly = {\n    foo: string;\n    readonly bar: string;\n};\n\nexport type ModelWithConstantSizeArray = [\n    number,\n    number\n];\n\nexport type ModelWithAnyOfConstantSizeArray = [\n    number | string,\n    number | string,\n    number | string\n];\n\nexport type ModelWithPrefixItemsConstantSizeArray = [\n    ModelWithInteger,\n    number | string,\n    string\n];\n\nexport type ModelWithAnyOfConstantSizeArrayNullable = [\n    number | null | string,\n    number | null | string,\n    number | null | string\n];\n\nexport type ModelWithAnyOfConstantSizeArrayWithNSizeAndOptions = [\n    number | Import,\n    number | Import\n];\n\nexport type ModelWithAnyOfConstantSizeArrayAndIntersect = [\n    number & string,\n    number & string\n];\n\nexport type ModelWithNumericEnumUnion = {\n    /**\n     * Период\n     */\n    value?: -10 | -1 | 0 | 1 | 3 | 6 | 12;\n};\n\n/**\n * Some description with `back ticks`\n */\nexport type ModelWithBackticksInDescription = {\n    /**\n     * The template `that` should be used for parsing and importing the contents of the CSV file.\n     *\n     * <br/><p>There is one placeholder currently supported:<ul>     <li><b>${x}</b> - refers to the n-th column in the CSV file, e.g. ${1}, ${2}, ...)</li></ul><p>Example of a correct JSON template:</p>\n     * <pre>\n     * [\n     * {\n     * \"resourceType\": \"Asset\",\n     * \"identifier\": {\n     * \"name\": \"${1}\",\n     * \"domain\": {\n     * \"name\": \"${2}\",\n     * \"community\": {\n     * \"name\": \"Some Community\"\n     * }\n     * }\n     * },\n     * \"attributes\" : {\n     * \"00000000-0000-0000-0000-000000003115\" : [ {\n     * \"value\" : \"${3}\"\n     * } ],\n     * \"00000000-0000-0000-0000-000000000222\" : [ {\n     * \"value\" : \"${4}\"\n     * } ]\n     * }\n     * }\n     * ]\n     * </pre>\n     */\n    template?: string;\n};\n\nexport type ModelWithOneOfAndProperties = (SimpleParameter | NonAsciiStringæøåÆøÅöôêÊ字符串) & {\n    baz: number | null;\n    qux: number;\n};\n\n/**\n * Model used to test deduplication strategy (unused)\n */\nexport type ParameterSimpleParameterUnused = string;\n\n/**\n * Model used to test deduplication strategy\n */\nexport type PostServiceWithEmptyTagResponse = string;\n\n/**\n * Model used to test deduplication strategy\n */\nexport type PostServiceWithEmptyTagResponse2 = string;\n\n/**\n * Model used to test deduplication strategy\n */\nexport type DeleteFooData = string;\n\n/**\n * Model used to test deduplication strategy\n */\nexport type DeleteFooData2 = string;\n\n/**\n * Model with restricted keyword name\n */\nexport type Import = string;\n\nexport type SchemaWithFormRestrictedKeys = {\n    description?: string;\n    'x-enum-descriptions'?: string;\n    'x-enum-varnames'?: string;\n    'x-enumNames'?: string;\n    title?: string;\n    object?: {\n        description?: string;\n        'x-enum-descriptions'?: string;\n        'x-enum-varnames'?: string;\n        'x-enumNames'?: string;\n        title?: string;\n    };\n    array?: Array<{\n        description?: string;\n        'x-enum-descriptions'?: string;\n        'x-enum-varnames'?: string;\n        'x-enumNames'?: string;\n        title?: string;\n    }>;\n};\n\n/**\n * This schema was giving PascalCase transformations a hard time\n */\nexport type IoK8sApimachineryPkgApisMetaV1DeleteOptions = {\n    /**\n     * Must be fulfilled before a deletion is carried out. If not possible, a 409 Conflict status will be returned.\n     */\n    preconditions?: IoK8sApimachineryPkgApisMetaV1Preconditions;\n};\n\n/**\n * This schema was giving PascalCase transformations a hard time\n */\nexport type IoK8sApimachineryPkgApisMetaV1Preconditions = {\n    /**\n     * Specifies the target ResourceVersion\n     */\n    resourceVersion?: string;\n    /**\n     * Specifies the target UID.\n     */\n    uid?: string;\n};\n\nexport type AdditionalPropertiesUnknownIssue = {\n    [key: string]: string | number;\n};\n\nexport type AdditionalPropertiesUnknownIssue2 = {\n    [key: string]: string | number;\n};\n\nexport type AdditionalPropertiesUnknownIssue3 = string & {\n    entries: {\n        [key: string]: AdditionalPropertiesUnknownIssue;\n    };\n};\n\nexport type AdditionalPropertiesIntegerIssue = {\n    value: number;\n    [key: string]: number;\n};\n\nexport type OneOfAllOfIssue = ((ConstValue | GenericSchemaDuplicateIssue1SystemBoolean) & _3eNum1Период) | GenericSchemaDuplicateIssue1SystemString;\n\nexport type GenericSchemaDuplicateIssue1SystemBoolean = {\n    item?: boolean;\n    error?: string | null;\n    readonly hasError?: boolean;\n    data?: {\n        [key: string]: never;\n    };\n};\n\nexport type GenericSchemaDuplicateIssue1SystemString = {\n    item?: string | null;\n    error?: string | null;\n    readonly hasError?: boolean;\n};\n\nexport type ExternalSharedModel = {\n    id: string;\n    name?: string;\n};\n\n/**\n * This is a model with one property containing a reference\n */\nexport type ModelWithReferenceWritable = {\n    prop?: ModelWithPropertiesWritable;\n};\n\n/**\n * This is a model with one property containing an array\n */\nexport type ModelWithArrayReadOnlyAndWriteOnlyWritable = {\n    prop?: Array<ModelWithReadOnlyAndWriteOnlyWritable>;\n    propWithFile?: Array<Blob | File>;\n    propWithNumber?: Array<number>;\n};\n\n/**\n * This is a model with one nested property\n */\nexport type ModelWithPropertiesWritable = {\n    required: string;\n    requiredAndNullable: string | null;\n    string?: string;\n    number?: number;\n    boolean?: boolean;\n    reference?: ModelWithString;\n    'property with space'?: string;\n    default?: string;\n    try?: string;\n};\n\n/**\n * This is a model that contains a some patterns\n */\nexport type ModelWithPatternWritable = {\n    key: string;\n    name: string;\n    id?: string;\n    text?: string;\n    patternWithSingleQuotes?: string;\n    patternWithNewline?: string;\n    patternWithBacktick?: string;\n    patternWithUnicode?: string;\n};\n\nexport type FileWritable = {\n    /**\n     * Mime\n     */\n    mime: string;\n};\n\nexport type ModelWithReadOnlyAndWriteOnlyWritable = {\n    foo: string;\n    baz: string;\n};\n\nexport type ModelWithAnyOfConstantSizeArrayWithNSizeAndOptionsWritable = [\n    number | Import,\n    number | Import\n];\n\nexport type AdditionalPropertiesUnknownIssueWritable = {\n    [key: string]: string | number;\n};\n\nexport type OneOfAllOfIssueWritable = ((ConstValue | GenericSchemaDuplicateIssue1SystemBoolean) & _3eNum1Период) | GenericSchemaDuplicateIssue1SystemString;\n\nexport type GenericSchemaDuplicateIssue1SystemBooleanWritable = {\n    item?: boolean;\n    error?: string | null;\n    data?: {\n        [key: string]: never;\n    };\n};\n\nexport type GenericSchemaDuplicateIssue1SystemStringWritable = {\n    item?: string | null;\n    error?: string | null;\n};\n\n/**\n * This is a reusable parameter\n */\nexport type SimpleParameter = string;\n\n/**\n * Parameter with illegal characters\n */\nexport type XFooBar = ModelWithString;\n\n/**\n * A reusable request body\n */\nexport type SimpleRequestBody = ModelWithString;\n\n/**\n * A reusable request body\n */\nexport type SimpleFormData = ModelWithString;\n\nexport type ExportData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no+tag';\n};\n\nexport type PatchApiVbyApiVersionNoTagData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no+tag';\n};\n\nexport type PatchApiVbyApiVersionNoTagResponses = {\n    /**\n     * OK\n     */\n    default: unknown;\n};\n\nexport type ImportData = {\n    body: ModelWithReadOnlyAndWriteOnlyWritable | ModelWithArrayReadOnlyAndWriteOnlyWritable;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no+tag';\n};\n\nexport type ImportResponses = {\n    /**\n     * Success\n     */\n    200: ModelFromZendesk;\n    /**\n     * Default success response\n     */\n    default: ModelWithReadOnlyAndWriteOnly;\n};\n\nexport type ImportResponse = ImportResponses[keyof ImportResponses];\n\nexport type FooWowData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no+tag';\n};\n\nexport type FooWowResponses = {\n    /**\n     * OK\n     */\n    default: unknown;\n};\n\nexport type ApiVVersionODataControllerCountData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple/$count';\n};\n\nexport type ApiVVersionODataControllerCountResponses = {\n    /**\n     * Success\n     */\n    200: ModelFromZendesk;\n};\n\nexport type ApiVVersionODataControllerCountResponse = ApiVVersionODataControllerCountResponses[keyof ApiVVersionODataControllerCountResponses];\n\nexport type GetApiVbyApiVersionSimpleOperationData = {\n    body?: never;\n    path: {\n        /**\n         * foo in method\n         */\n        foo_param: string;\n    };\n    query?: never;\n    url: '/api/v{api-version}/simple:operation';\n};\n\nexport type GetApiVbyApiVersionSimpleOperationErrors = {\n    /**\n     * Default error response\n     */\n    default: ModelWithBoolean;\n};\n\nexport type GetApiVbyApiVersionSimpleOperationError = GetApiVbyApiVersionSimpleOperationErrors[keyof GetApiVbyApiVersionSimpleOperationErrors];\n\nexport type GetApiVbyApiVersionSimpleOperationResponses = {\n    /**\n     * Response is a simple number\n     */\n    200: number;\n};\n\nexport type GetApiVbyApiVersionSimpleOperationResponse = GetApiVbyApiVersionSimpleOperationResponses[keyof GetApiVbyApiVersionSimpleOperationResponses];\n\nexport type DeleteCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type GetCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type HeadCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type OptionsCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type PatchCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type PostCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type PutCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type DeleteFooData3 = {\n    body?: never;\n    headers: {\n        /**\n         * Parameter with illegal characters\n         */\n        'x-Foo-Bar': ModelWithString;\n    };\n    path: {\n        /**\n         * foo in method\n         */\n        foo_param: string;\n        /**\n         * bar in method\n         */\n        BarParam: string;\n    };\n    query?: never;\n    url: '/api/v{api-version}/foo/{foo_param}/bar/{BarParam}';\n};\n\nexport type CallWithDescriptionsData = {\n    body?: never;\n    path?: never;\n    query?: {\n        /**\n         * Testing multiline comments in string: First line\n         * Second line\n         *\n         * Fourth line\n         */\n        parameterWithBreaks?: string;\n        /**\n         * Testing backticks in string: `backticks` and ```multiple backticks``` should work\n         */\n        parameterWithBackticks?: string;\n        /**\n         * Testing slashes in string: \\backwards\\\\\\ and /forwards/// should work\n         */\n        parameterWithSlashes?: string;\n        /**\n         * Testing expression placeholders in string: ${expression} should work\n         */\n        parameterWithExpressionPlaceholders?: string;\n        /**\n         * Testing quotes in string: 'single quote''' and \"double quotes\"\"\" should work\n         */\n        parameterWithQuotes?: string;\n        /**\n         * Testing reserved characters in string: * inline * and ** inline ** should work\n         */\n        parameterWithReservedCharacters?: string;\n    };\n    url: '/api/v{api-version}/descriptions';\n};\n\nexport type DeprecatedCallData = {\n    body?: never;\n    headers: {\n        /**\n         * This parameter is deprecated\n         *\n         * @deprecated\n         */\n        parameter: DeprecatedModel | null;\n    };\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/parameters/deprecated';\n};\n\nexport type CallWithParametersData = {\n    /**\n     * This is the parameter that goes into the body\n     */\n    body: {\n        [key: string]: unknown;\n    } | null;\n    headers: {\n        /**\n         * This is the parameter that goes into the header\n         */\n        parameterHeader: string | null;\n    };\n    path: {\n        /**\n         * This is the parameter that goes into the path\n         */\n        parameterPath: string | null;\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string | null;\n    };\n    query: {\n        foo_ref_enum?: ModelWithNestedArrayEnumsDataFoo;\n        foo_all_of_enum: ModelWithNestedArrayEnumsDataFoo;\n        /**\n         * This is the parameter that goes into the query params\n         */\n        cursor: string | null;\n    };\n    url: '/api/v{api-version}/parameters/{parameterPath}';\n};\n\nexport type CallWithWeirdParameterNamesData = {\n    /**\n     * This is the parameter that goes into the body\n     */\n    body: ModelWithString | null;\n    headers: {\n        /**\n         * This is the parameter that goes into the request header\n         */\n        'parameter.header': string | null;\n    };\n    path: {\n        /**\n         * This is the parameter that goes into the path\n         */\n        'parameter.path.1'?: string;\n        /**\n         * This is the parameter that goes into the path\n         */\n        'parameter-path-2'?: string;\n        /**\n         * This is the parameter that goes into the path\n         */\n        'PARAMETER-PATH-3'?: string;\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string | null;\n    };\n    query: {\n        /**\n         * This is the parameter with a reserved keyword\n         */\n        default?: string;\n        /**\n         * This is the parameter that goes into the request query params\n         */\n        'parameter-query': string | null;\n    };\n    url: '/api/v{api-version}/parameters/{parameter.path.1}/{parameter-path-2}/{PARAMETER-PATH-3}';\n};\n\nexport type GetCallWithOptionalParamData = {\n    /**\n     * This is a required parameter\n     */\n    body: ModelWithOneOfEnum;\n    path?: never;\n    query?: {\n        /**\n         * This is an optional parameter\n         */\n        page?: number;\n    };\n    url: '/api/v{api-version}/parameters';\n};\n\nexport type PostCallWithOptionalParamData = {\n    /**\n     * This is an optional parameter\n     */\n    body?: {\n        offset?: number | null;\n    };\n    path?: never;\n    query: {\n        /**\n         * This is a required parameter\n         */\n        parameter: Pageable;\n    };\n    url: '/api/v{api-version}/parameters';\n};\n\nexport type PostCallWithOptionalParamResponses = {\n    /**\n     * Response is a simple number\n     */\n    200: number;\n    /**\n     * Success\n     */\n    204: void;\n};\n\nexport type PostCallWithOptionalParamResponse = PostCallWithOptionalParamResponses[keyof PostCallWithOptionalParamResponses];\n\nexport type PostApiVbyApiVersionRequestBodyData = {\n    /**\n     * A reusable request body\n     */\n    body?: SimpleRequestBody;\n    path?: never;\n    query?: {\n        /**\n         * This is a reusable parameter\n         */\n        parameter?: string;\n    };\n    url: '/api/v{api-version}/requestBody';\n};\n\nexport type PostApiVbyApiVersionFormDataData = {\n    /**\n     * A reusable request body\n     */\n    body?: SimpleFormData;\n    path?: never;\n    query?: {\n        /**\n         * This is a reusable parameter\n         */\n        parameter?: string;\n    };\n    url: '/api/v{api-version}/formData';\n};\n\nexport type CallWithDefaultParametersData = {\n    body?: never;\n    path?: never;\n    query?: {\n        /**\n         * This is a simple string with default value\n         */\n        parameterString?: string | null;\n        /**\n         * This is a simple number with default value\n         */\n        parameterNumber?: number | null;\n        /**\n         * This is a simple boolean with default value\n         */\n        parameterBoolean?: boolean | null;\n        /**\n         * This is a simple enum with default value\n         */\n        parameterEnum?: 'Success' | 'Warning' | 'Error';\n        /**\n         * This is a simple model with default value\n         */\n        parameterModel?: ModelWithString | null;\n    };\n    url: '/api/v{api-version}/defaults';\n};\n\nexport type CallWithDefaultOptionalParametersData = {\n    body?: never;\n    path?: never;\n    query?: {\n        /**\n         * This is a simple string that is optional with default value\n         */\n        parameterString?: string;\n        /**\n         * This is a simple number that is optional with default value\n         */\n        parameterNumber?: number;\n        /**\n         * This is a simple boolean that is optional with default value\n         */\n        parameterBoolean?: boolean;\n        /**\n         * This is a simple enum that is optional with default value\n         */\n        parameterEnum?: 'Success' | 'Warning' | 'Error';\n        /**\n         * This is a simple model that is optional with default value\n         */\n        parameterModel?: ModelWithString;\n    };\n    url: '/api/v{api-version}/defaults';\n};\n\nexport type CallToTestOrderOfParamsData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * This is a optional string with default\n         */\n        parameterOptionalStringWithDefault?: string;\n        /**\n         * This is a optional string with empty default\n         */\n        parameterOptionalStringWithEmptyDefault?: string;\n        /**\n         * This is a optional string with no default\n         */\n        parameterOptionalStringWithNoDefault?: string;\n        /**\n         * This is a string with default\n         */\n        parameterStringWithDefault: string;\n        /**\n         * This is a string with empty default\n         */\n        parameterStringWithEmptyDefault: string;\n        /**\n         * This is a string with no default\n         */\n        parameterStringWithNoDefault: string;\n        /**\n         * This is a string that can be null with no default\n         */\n        parameterStringNullableWithNoDefault?: string | null;\n        /**\n         * This is a string that can be null with default\n         */\n        parameterStringNullableWithDefault?: string | null;\n    };\n    url: '/api/v{api-version}/defaults';\n};\n\nexport type DuplicateNameData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/duplicate';\n};\n\nexport type DuplicateName2Data = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/duplicate';\n};\n\nexport type DuplicateName3Data = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/duplicate';\n};\n\nexport type DuplicateName4Data = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/duplicate';\n};\n\nexport type CallWithNoContentResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no-content';\n};\n\nexport type CallWithNoContentResponseResponses = {\n    /**\n     * Success\n     */\n    204: void;\n};\n\nexport type CallWithNoContentResponseResponse = CallWithNoContentResponseResponses[keyof CallWithNoContentResponseResponses];\n\nexport type CallWithResponseAndNoContentResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multiple-tags/response-and-no-content';\n};\n\nexport type CallWithResponseAndNoContentResponseResponses = {\n    /**\n     * Response is a simple number\n     */\n    200: number;\n    /**\n     * Success\n     */\n    204: void;\n};\n\nexport type CallWithResponseAndNoContentResponseResponse = CallWithResponseAndNoContentResponseResponses[keyof CallWithResponseAndNoContentResponseResponses];\n\nexport type DummyAData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multiple-tags/a';\n};\n\nexport type DummyAResponses = {\n    200: _400;\n};\n\nexport type DummyAResponse = DummyAResponses[keyof DummyAResponses];\n\nexport type DummyBData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multiple-tags/b';\n};\n\nexport type DummyBResponses = {\n    /**\n     * Success\n     */\n    204: void;\n};\n\nexport type DummyBResponse = DummyBResponses[keyof DummyBResponses];\n\nexport type CallWithResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/response';\n};\n\nexport type CallWithResponseResponses = {\n    default: Import;\n};\n\nexport type CallWithResponseResponse = CallWithResponseResponses[keyof CallWithResponseResponses];\n\nexport type CallWithDuplicateResponsesData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/response';\n};\n\nexport type CallWithDuplicateResponsesErrors = {\n    /**\n     * Message for 500 error\n     */\n    500: ModelWithStringError;\n    /**\n     * Message for 501 error\n     */\n    501: ModelWithStringError;\n    /**\n     * Message for 502 error\n     */\n    502: ModelWithStringError;\n    /**\n     * Message for 4XX errors\n     */\n    '4XX': DictionaryWithArray;\n    /**\n     * Default error response\n     */\n    default: ModelWithBoolean;\n};\n\nexport type CallWithDuplicateResponsesError = CallWithDuplicateResponsesErrors[keyof CallWithDuplicateResponsesErrors];\n\nexport type CallWithDuplicateResponsesResponses = {\n    /**\n     * Message for 200 response\n     */\n    200: ModelWithBoolean & ModelWithInteger;\n    /**\n     * Message for 201 response\n     */\n    201: ModelWithString;\n    /**\n     * Message for 202 response\n     */\n    202: ModelWithString;\n};\n\nexport type CallWithDuplicateResponsesResponse = CallWithDuplicateResponsesResponses[keyof CallWithDuplicateResponsesResponses];\n\nexport type CallWithResponsesData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/response';\n};\n\nexport type CallWithResponsesErrors = {\n    /**\n     * Message for 500 error\n     */\n    500: ModelWithStringError;\n    /**\n     * Message for 501 error\n     */\n    501: ModelWithStringError;\n    /**\n     * Message for 502 error\n     */\n    502: ModelWithStringError;\n    /**\n     * Message for default response\n     */\n    default: ModelWithStringError;\n};\n\nexport type CallWithResponsesError = CallWithResponsesErrors[keyof CallWithResponsesErrors];\n\nexport type CallWithResponsesResponses = {\n    /**\n     * Message for 200 response\n     */\n    200: {\n        readonly '@namespace.string'?: string;\n        readonly '@namespace.integer'?: number;\n        readonly value?: Array<ModelWithString>;\n    };\n    /**\n     * Message for 201 response\n     */\n    201: ModelThatExtends;\n    /**\n     * Message for 202 response\n     */\n    202: ModelThatExtendsExtends;\n};\n\nexport type CallWithResponsesResponse = CallWithResponsesResponses[keyof CallWithResponsesResponses];\n\nexport type CollectionFormatData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * This is an array parameter that is sent as csv format (comma-separated values)\n         */\n        parameterArrayCSV: Array<string> | null;\n        /**\n         * This is an array parameter that is sent as ssv format (space-separated values)\n         */\n        parameterArraySSV: Array<string> | null;\n        /**\n         * This is an array parameter that is sent as tsv format (tab-separated values)\n         */\n        parameterArrayTSV: Array<string> | null;\n        /**\n         * This is an array parameter that is sent as pipes format (pipe-separated values)\n         */\n        parameterArrayPipes: Array<string> | null;\n        /**\n         * This is an array parameter that is sent as multi format (multiple parameter instances)\n         */\n        parameterArrayMulti: Array<string> | null;\n    };\n    url: '/api/v{api-version}/collectionFormat';\n};\n\nexport type TypesData = {\n    body?: never;\n    path?: {\n        /**\n         * This is a number parameter\n         */\n        id?: number;\n    };\n    query: {\n        /**\n         * This is a number parameter\n         */\n        parameterNumber: number;\n        /**\n         * This is a string parameter\n         */\n        parameterString: string | null;\n        /**\n         * This is a boolean parameter\n         */\n        parameterBoolean: boolean | null;\n        /**\n         * This is an object parameter\n         */\n        parameterObject: {\n            [key: string]: unknown;\n        } | null;\n        /**\n         * This is an array parameter\n         */\n        parameterArray: Array<string> | null;\n        /**\n         * This is a dictionary parameter\n         */\n        parameterDictionary: {\n            [key: string]: unknown;\n        } | null;\n        /**\n         * This is an enum parameter\n         */\n        parameterEnum: 'Success' | 'Warning' | 'Error' | null;\n    };\n    url: '/api/v{api-version}/types';\n};\n\nexport type TypesResponses = {\n    /**\n     * Response is a simple number\n     */\n    200: number;\n    /**\n     * Response is a simple string\n     */\n    201: string;\n    /**\n     * Response is a simple boolean\n     */\n    202: boolean;\n    /**\n     * Response is a simple object\n     */\n    203: {\n        [key: string]: unknown;\n    };\n};\n\nexport type TypesResponse = TypesResponses[keyof TypesResponses];\n\nexport type UploadFileData = {\n    body: Blob | File;\n    path: {\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string | null;\n    };\n    query?: never;\n    url: '/api/v{api-version}/upload';\n};\n\nexport type UploadFileResponses = {\n    200: boolean;\n};\n\nexport type UploadFileResponse = UploadFileResponses[keyof UploadFileResponses];\n\nexport type FileResponseData = {\n    body?: never;\n    path: {\n        id: string;\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string;\n    };\n    query?: never;\n    url: '/api/v{api-version}/file/{id}';\n};\n\nexport type FileResponseResponses = {\n    /**\n     * Success\n     */\n    200: Blob | File;\n};\n\nexport type FileResponseResponse = FileResponseResponses[keyof FileResponseResponses];\n\nexport type ComplexTypesData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * Parameter containing object\n         */\n        parameterObject: {\n            first?: {\n                second?: {\n                    third?: string;\n                };\n            };\n        };\n        /**\n         * Parameter containing reference\n         */\n        parameterReference: ModelWithString;\n    };\n    url: '/api/v{api-version}/complex';\n};\n\nexport type ComplexTypesErrors = {\n    /**\n     * 400 `server` error\n     */\n    400: unknown;\n    /**\n     * 500 server error\n     */\n    500: unknown;\n};\n\nexport type ComplexTypesResponses = {\n    /**\n     * Successful response\n     */\n    200: Array<ModelWithString>;\n};\n\nexport type ComplexTypesResponse = ComplexTypesResponses[keyof ComplexTypesResponses];\n\nexport type MultipartResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multipart';\n};\n\nexport type MultipartResponseResponses = {\n    /**\n     * OK\n     */\n    200: {\n        file?: Blob | File;\n        metadata?: {\n            foo?: string;\n            bar?: string;\n        };\n    };\n};\n\nexport type MultipartResponseResponse = MultipartResponseResponses[keyof MultipartResponseResponses];\n\nexport type MultipartRequestData = {\n    body?: {\n        content?: Blob | File;\n        data?: ModelWithString | null;\n    };\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multipart';\n};\n\nexport type ComplexParamsData = {\n    body?: {\n        readonly key: string | null;\n        name: string | null;\n        enabled?: boolean;\n        type: 'Monkey' | 'Horse' | 'Bird';\n        listOfModels?: Array<ModelWithString> | null;\n        listOfStrings?: Array<string> | null;\n        parameters: ModelWithString | ModelWithEnum | ModelWithArray | ModelWithDictionary;\n        readonly user?: {\n            readonly id?: number;\n            readonly name?: string | null;\n        };\n    };\n    path: {\n        id: number;\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string;\n    };\n    query?: never;\n    url: '/api/v{api-version}/complex/{id}';\n};\n\nexport type ComplexParamsResponses = {\n    /**\n     * Success\n     */\n    200: ModelWithString;\n};\n\nexport type ComplexParamsResponse = ComplexParamsResponses[keyof ComplexParamsResponses];\n\nexport type CallWithResultFromHeaderData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/header';\n};\n\nexport type CallWithResultFromHeaderErrors = {\n    /**\n     * 400 server error\n     */\n    400: unknown;\n    /**\n     * 500 server error\n     */\n    500: unknown;\n};\n\nexport type CallWithResultFromHeaderResponses = {\n    /**\n     * Successful response\n     */\n    200: unknown;\n};\n\nexport type TestErrorCodeData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * Status code to return\n         */\n        status: number;\n    };\n    url: '/api/v{api-version}/error';\n};\n\nexport type TestErrorCodeErrors = {\n    /**\n     * Custom message: Internal Server Error\n     */\n    500: unknown;\n    /**\n     * Custom message: Not Implemented\n     */\n    501: unknown;\n    /**\n     * Custom message: Bad Gateway\n     */\n    502: unknown;\n    /**\n     * Custom message: Service Unavailable\n     */\n    503: unknown;\n};\n\nexport type TestErrorCodeResponses = {\n    /**\n     * Custom message: Successful response\n     */\n    200: unknown;\n};\n\nexport type NonAsciiæøåÆøÅöôêÊ字符串Data = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * Dummy input param\n         */\n        nonAsciiParamæøåÆØÅöôêÊ: number;\n    };\n    url: '/api/v{api-version}/non-ascii-æøåÆØÅöôêÊ字符串';\n};\n\nexport type NonAsciiæøåÆøÅöôêÊ字符串Responses = {\n    /**\n     * Successful response\n     */\n    200: Array<NonAsciiStringæøåÆøÅöôêÊ字符串>;\n};\n\nexport type NonAsciiæøåÆøÅöôêÊ字符串Response = NonAsciiæøåÆøÅöôêÊ字符串Responses[keyof NonAsciiæøåÆøÅöôêÊ字符串Responses];\n\nexport type PutWithFormUrlEncodedData = {\n    body: ArrayWithStrings;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/non-ascii-æøåÆØÅöôêÊ字符串';\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/my-client/bundle/client/client.ts",
    "content": "import type { Client, Config, RequestOptions } from './types';\nimport {\n  buildUrl,\n  createConfig,\n  createInterceptors,\n  getParseAs,\n  mergeConfigs,\n  mergeHeaders,\n  setAuthParams,\n} from './utils';\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, RequestOptions>();\n\n  // @ts-expect-error\n  const request: Client['request'] = async (options) => {\n    const opts = {\n      ..._config,\n      ...options,\n      fetch: options.fetch ?? _config.fetch ?? globalThis.fetch,\n      headers: mergeHeaders(_config.headers, options.headers),\n    };\n\n    if (opts.security) {\n      await setAuthParams({\n        ...opts,\n        security: opts.security,\n      });\n    }\n\n    if (opts.body && opts.bodySerializer) {\n      opts.body = opts.bodySerializer(opts.body);\n    }\n\n    // remove Content-Type header if body is empty to avoid sending invalid requests\n    if (opts.body === undefined || opts.body === '') {\n      opts.headers.delete('Content-Type');\n    }\n\n    const url = buildUrl(opts);\n    const requestInit: ReqInit = {\n      redirect: 'follow',\n      ...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 = await _fetch(request);\n\n    for (const fn of interceptors.response.fns) {\n      if (fn) {\n        response = await fn(response, request, opts);\n      }\n    }\n\n    const result = {\n      request,\n      response,\n    };\n\n    if (response.ok) {\n      if (response.status === 204 || response.headers.get('Content-Length') === '0') {\n        return {\n          data: {},\n          ...result,\n        };\n      }\n\n      const parseAs =\n        (opts.parseAs === 'auto'\n          ? getParseAs(response.headers.get('Content-Type'))\n          : opts.parseAs) ?? 'json';\n\n      if (parseAs === 'stream') {\n        return {\n          data: response.body,\n          ...result,\n        };\n      }\n\n      let data = await response[parseAs]();\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 {\n        data,\n        ...result,\n      };\n    }\n\n    let error = await response.text();\n\n    try {\n      error = JSON.parse(error);\n    } catch {\n      // noop\n    }\n\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    return {\n      error: finalError,\n      ...result,\n    };\n  };\n\n  return {\n    buildUrl,\n    connect: (options) => request({ ...options, method: 'CONNECT' }),\n    delete: (options) => request({ ...options, method: 'DELETE' }),\n    get: (options) => request({ ...options, method: 'GET' }),\n    getConfig,\n    head: (options) => request({ ...options, method: 'HEAD' }),\n    interceptors,\n    options: (options) => request({ ...options, method: 'OPTIONS' }),\n    patch: (options) => request({ ...options, method: 'PATCH' }),\n    post: (options) => request({ ...options, method: 'POST' }),\n    put: (options) => request({ ...options, method: 'PUT' }),\n    request,\n    setConfig,\n    trace: (options) => request({ ...options, method: 'TRACE' }),\n  };\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/my-client/bundle/client/core/auth.ts",
    "content": "export 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/my-client/bundle/client/core/bodySerializer.ts",
    "content": "import type { ArrayStyle, ObjectStyle, SerializerOptions } from './pathSerializer';\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) => {\n  if (typeof value === 'string' || value instanceof Blob) {\n    data.append(key, value);\n  } else {\n    data.append(key, JSON.stringify(value));\n  }\n};\n\nconst serializeUrlSearchParamsPair = (data: URLSearchParams, key: string, value: unknown) => {\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) => {\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) =>\n    JSON.stringify(body, (_key, value) => (typeof value === 'bigint' ? value.toString() : value)),\n};\n\nexport const urlSearchParamsBodySerializer = {\n  bodySerializer: (body: unknown) => {\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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/my-client/bundle/client/core/params.ts",
    "content": "type Slot = 'body' | 'headers' | 'path' | 'query';\n\nexport type Field =\n  | {\n      in: Exclude<Slot, 'body'>;\n      key: string;\n      map?: string;\n    }\n  | {\n      in: Extract<Slot, 'body'>;\n      key?: string;\n      map?: string;\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\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 (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' && !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        (params[field.in] as Record<string, unknown>)[name] = arg;\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          const name = field.map || key;\n          (params[field.in] as Record<string, unknown>)[name] = value;\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 {\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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/my-client/bundle/client/core/pathSerializer.ts",
    "content": "interface 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/my-client/bundle/client/core/types.ts",
    "content": "import type { Auth, AuthToken } from './auth';\nimport type { BodySerializer, QuerySerializer, QuerySerializerOptions } from './bodySerializer';\n\nexport interface Client<RequestFn = never, Config = unknown, MethodFn = never, BuildUrlFn = never> {\n  /**\n   * Returns the final request URL.\n   */\n  buildUrl: BuildUrlFn;\n  connect: MethodFn;\n  delete: MethodFn;\n  get: MethodFn;\n  getConfig: () => Config;\n  head: MethodFn;\n  options: MethodFn;\n  patch: MethodFn;\n  post: MethodFn;\n  put: MethodFn;\n  request: RequestFn;\n  setConfig: (config: Config) => Config;\n  trace: MethodFn;\n}\n\nexport interface Config {\n  /**\n   * Auth token or a function returning auth token. The resolved value will be\n   * added to the request payload as defined by its `security` array.\n   */\n  auth?: ((auth: Auth) => Promise<AuthToken> | AuthToken) | AuthToken;\n  /**\n   * A function for serializing request body parameter. By default,\n   * {@link JSON.stringify()} will be used.\n   */\n  bodySerializer?: BodySerializer | null;\n  /**\n   * An object containing any HTTP headers that you want to pre-populate your\n   * `Headers` object with.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/Headers/Headers#init See more}\n   */\n  headers?:\n    | RequestInit['headers']\n    | Record<\n        string,\n        string | number | boolean | (string | number | boolean)[] | null | undefined | unknown\n      >;\n  /**\n   * The request method.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/fetch#method See more}\n   */\n  method?: 'CONNECT' | 'DELETE' | 'GET' | 'HEAD' | 'OPTIONS' | 'PATCH' | 'POST' | 'PUT' | 'TRACE';\n  /**\n   * A function for serializing request query parameters. By default, arrays\n   * will be exploded in form style, objects will be exploded in deepObject\n   * style, and reserved characters are percent-encoded.\n   *\n   * This method will have no effect if the native `paramsSerializer()` Axios\n   * API function is used.\n   *\n   * {@link https://swagger.io/docs/specification/serialization/#query View examples}\n   */\n  querySerializer?: QuerySerializer | QuerySerializerOptions;\n  /**\n   * A function transforming response data before it's returned. This is useful\n   * for post-processing data, e.g. converting ISO strings into Date objects.\n   */\n  responseTransformer?: (data: unknown) => Promise<unknown>;\n  /**\n   * A function validating response data. This is useful if you want to ensure\n   * the response conforms to the desired shape, so it can be safely passed to\n   * the transformers and returned to the user.\n   */\n  responseValidator?: (data: unknown) => Promise<unknown>;\n}\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/my-client/bundle/client/index.ts",
    "content": "export { createClient } from './client';\nexport type { Auth } from './core/auth';\nexport type { QuerySerializerOptions } from './core/bodySerializer';\nexport {\n  formDataBodySerializer,\n  jsonBodySerializer,\n  urlSearchParamsBodySerializer,\n} from './core/bodySerializer';\nexport type {\n  Client,\n  ClientOptions,\n  Config,\n  CreateClientConfig,\n  Options,\n  RequestOptions,\n  RequestResult,\n  TDataShape,\n} from './types';\nexport { createConfig } from './utils';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/my-client/bundle/client/plugin.ts",
    "content": "import {\n  type Client,\n  clientDefaultConfig,\n  clientDefaultMeta,\n  clientPluginHandler,\n  type DefinePlugin,\n  definePluginConfig,\n} from '@hey-api/openapi-ts';\n\nexport type Config = Client.Config & {\n  /**\n   * Plugin name. Must be unique.\n   */\n  name: string;\n};\n\nexport type MyClientPlugin = DefinePlugin<Config, Config>;\n\nexport const defaultConfig: MyClientPlugin['Config'] = {\n  ...clientDefaultMeta,\n  config: clientDefaultConfig,\n  handler: clientPluginHandler as MyClientPlugin['Handler'],\n  name: __filename,\n};\n\n/**\n * Type helper for `my-client` plugin, returns {@link Plugin.Config} object\n */\nexport const myClientPlugin = definePluginConfig(defaultConfig);\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/my-client/bundle/client/types.ts",
    "content": "import type { Auth } from './core/auth';\nimport type { Client as CoreClient, Config as CoreConfig } from './core/types';\nimport type { Middleware } from './utils';\n\nexport interface Config<T extends ClientOptions = ClientOptions>\n  extends Omit<RequestInit, 'body' | 'headers' | 'method'>, CoreConfig {\n  /**\n   * Base URL for all requests made by this client.\n   */\n  baseUrl?: T['baseUrl'];\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?: (request: Request) => ReturnType<typeof fetch>;\n  /**\n   * Return the response data parsed in a specified format. By default, `auto`\n   * will infer the appropriate method from the `Content-Type` response header.\n   * You can override this behavior with any of the {@link Body} methods.\n   * Select `stream` if you don't want to parse response data at all.\n   *\n   * @default 'auto'\n   */\n  parseAs?: 'arrayBuffer' | 'auto' | 'blob' | 'formData' | 'json' | 'stream' | 'text';\n  /**\n   * Throw an error instead of returning it in the response?\n   *\n   * @default false\n   */\n  throwOnError?: T['throwOnError'];\n}\n\nexport interface RequestOptions<\n  ThrowOnError extends boolean = boolean,\n  Url extends string = string,\n> extends Config<{\n  throwOnError: ThrowOnError;\n}> {\n  /**\n   * Any body that you want to add to your request.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/fetch#body}\n   */\n  body?: unknown;\n  path?: Record<string, unknown>;\n  query?: Record<string, unknown>;\n  /**\n   * Security mechanism(s) to use for the request.\n   */\n  security?: ReadonlyArray<Auth>;\n  url: Url;\n}\n\nexport type RequestResult<\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = boolean,\n> = ThrowOnError extends true\n  ? Promise<{\n      data: TData;\n      request: Request;\n      response: Response;\n    }>\n  : Promise<\n      ({ data: TData; error: undefined } | { data: undefined; error: TError }) & {\n        request: Request;\n        response: Response;\n      }\n    >;\n\nexport interface ClientOptions {\n  baseUrl?: string;\n  throwOnError?: boolean;\n}\n\ntype MethodFn = <TData = unknown, TError = unknown, ThrowOnError extends boolean = false>(\n  options: Omit<RequestOptions<ThrowOnError>, 'method'>,\n) => RequestResult<TData, TError, ThrowOnError>;\n\ntype RequestFn = <TData = unknown, TError = unknown, ThrowOnError extends boolean = false>(\n  options: Omit<RequestOptions<ThrowOnError>, 'method'> &\n    Pick<Required<RequestOptions<ThrowOnError>>, 'method'>,\n) => RequestResult<TData, TError, ThrowOnError>;\n\ntype BuildUrlFn = <\n  TData extends {\n    body?: unknown;\n    path?: Record<string, unknown>;\n    query?: Record<string, unknown>;\n    url: string;\n  },\n>(\n  options: TData & Options<TData>,\n) => string;\n\nexport type Client = CoreClient<RequestFn, Config, MethodFn, BuildUrlFn> & {\n  interceptors: Middleware<Request, Response, unknown, RequestOptions>;\n};\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 = ClientOptions> = (\n  override?: Config<ClientOptions & T>,\n) => Config<Required<ClientOptions> & T>;\n\nexport interface TDataShape {\n  body?: unknown;\n  headers?: unknown;\n  path?: unknown;\n  query?: unknown;\n  url: string;\n}\n\ntype OmitKeys<T, K> = Pick<T, Exclude<keyof T, K>>;\n\nexport type Options<\n  TData extends TDataShape = TDataShape,\n  ThrowOnError extends boolean = boolean,\n> = OmitKeys<RequestOptions<ThrowOnError>, 'body' | 'path' | 'query' | 'url'> & Omit<TData, 'url'>;\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/my-client/bundle/client/utils.ts",
    "content": "import { getAuthToken } from './core/auth';\nimport type { QuerySerializer, QuerySerializerOptions } from './core/bodySerializer';\nimport { jsonBodySerializer } from './core/bodySerializer';\nimport {\n  serializeArrayParam,\n  serializeObjectParam,\n  serializePrimitiveParam,\n} from './core/pathSerializer';\nimport type { Client, ClientOptions, Config, RequestOptions } from './types';\n\ninterface PathSerializer {\n  path: Record<string, unknown>;\n  url: string;\n}\n\nconst PATH_PARAM_RE = /\\{[^{}]+\\}/g;\n\ntype ArrayStyle = 'form' | 'spaceDelimited' | 'pipeDelimited';\ntype MatrixStyle = 'label' | 'matrix' | 'simple';\ntype ArraySeparatorStyle = ArrayStyle | MatrixStyle;\n\nconst 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 createQuerySerializer = <T = unknown>({\n  allowReserved,\n  array,\n  object,\n}: QuerySerializerOptions = {}) => {\n  const querySerializer = (queryParams: T) => {\n    let 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        if (Array.isArray(value)) {\n          search = [\n            ...search,\n            serializeArrayParam({\n              allowReserved,\n              explode: true,\n              name,\n              style: 'form',\n              value,\n              ...array,\n            }),\n          ];\n          continue;\n        }\n\n        if (typeof value === 'object') {\n          search = [\n            ...search,\n            serializeObjectParam({\n              allowReserved,\n              explode: true,\n              name,\n              style: 'deepObject',\n              value: value as Record<string, unknown>,\n              ...object,\n            }),\n          ];\n          continue;\n        }\n\n        search = [\n          ...search,\n          serializePrimitiveParam({\n            allowReserved,\n            name,\n            value: value as string,\n          }),\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\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    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    return;\n  }\n};\n\nexport const buildUrl: Client['buildUrl'] = (options) => {\n  const url = 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  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 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\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 || typeof header !== 'object') {\n      continue;\n    }\n\n    const iterator = header instanceof Headers ? header.entries() : 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/my-client/bundle/custom.gen.ts",
    "content": "// 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: 'http://localhost:3000/base' }));\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/my-client/bundle/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport { apiVVersionODataControllerCount, callToTestOrderOfParams, callWithDefaultOptionalParameters, callWithDefaultParameters, callWithDescriptions, callWithDuplicateResponses, callWithNoContentResponse, callWithParameters, callWithResponse, callWithResponseAndNoContentResponse, callWithResponses, callWithResultFromHeader, callWithWeirdParameterNames, collectionFormat, complexParams, complexTypes, deleteCallWithoutParametersAndResponse, deleteFoo, deprecatedCall, dummyA, dummyB, duplicateName, duplicateName2, duplicateName3, duplicateName4, export_, fileResponse, fooWow, getApiVbyApiVersionSimpleOperation, getCallWithOptionalParam, getCallWithoutParametersAndResponse, headCallWithoutParametersAndResponse, import_, multipartRequest, multipartResponse, nonAsciiæøåÆøÅöôêÊ字符串, type Options, optionsCallWithoutParametersAndResponse, patchApiVbyApiVersionNoTag, patchCallWithoutParametersAndResponse, postApiVbyApiVersionFormData, postApiVbyApiVersionRequestBody, postCallWithOptionalParam, postCallWithoutParametersAndResponse, putCallWithoutParametersAndResponse, putWithFormUrlEncoded, testErrorCode, types, uploadFile } from './sdk.gen';\nexport type { _3eNum1Период, _400, AdditionalPropertiesIntegerIssue, AdditionalPropertiesUnknownIssue, AdditionalPropertiesUnknownIssue2, AdditionalPropertiesUnknownIssue3, AdditionalPropertiesUnknownIssueWritable, AnyOfAnyAndNull, AnyOfArrays, ApiVVersionODataControllerCountData, ApiVVersionODataControllerCountResponse, ApiVVersionODataControllerCountResponses, ArrayWithAnyOfProperties, ArrayWithArray, ArrayWithBooleans, ArrayWithNumbers, ArrayWithProperties, ArrayWithReferences, ArrayWithStrings, CallToTestOrderOfParamsData, CallWithDefaultOptionalParametersData, CallWithDefaultParametersData, CallWithDescriptionsData, CallWithDuplicateResponsesData, CallWithDuplicateResponsesError, CallWithDuplicateResponsesErrors, CallWithDuplicateResponsesResponse, CallWithDuplicateResponsesResponses, CallWithNoContentResponseData, CallWithNoContentResponseResponse, CallWithNoContentResponseResponses, CallWithParametersData, CallWithResponseAndNoContentResponseData, CallWithResponseAndNoContentResponseResponse, CallWithResponseAndNoContentResponseResponses, CallWithResponseData, CallWithResponseResponse, CallWithResponseResponses, CallWithResponsesData, CallWithResponsesError, CallWithResponsesErrors, CallWithResponsesResponse, CallWithResponsesResponses, CallWithResultFromHeaderData, CallWithResultFromHeaderErrors, CallWithResultFromHeaderResponses, CallWithWeirdParameterNamesData, CamelCaseCommentWithBreaks, CharactersInDescription, ClientOptions, CollectionFormatData, CommentWithBackticks, CommentWithBackticksAndQuotes, CommentWithBreaks, CommentWithExpressionPlaceholders, CommentWithQuotes, CommentWithReservedCharacters, CommentWithSlashes, ComplexParamsData, ComplexParamsResponse, ComplexParamsResponses, ComplexTypesData, ComplexTypesErrors, ComplexTypesResponse, ComplexTypesResponses, CompositionBaseModel, CompositionExtendedModel, CompositionWithAllOfAndNullable, CompositionWithAnyOf, CompositionWithAnyOfAndNullable, CompositionWithAnyOfAnonymous, CompositionWithNestedAnyAndTypeNull, CompositionWithNestedAnyOfAndNull, CompositionWithOneOf, CompositionWithOneOfAndComplexArrayDictionary, CompositionWithOneOfAndNullable, CompositionWithOneOfAndProperties, CompositionWithOneOfAndSimpleArrayDictionary, CompositionWithOneOfAndSimpleDictionary, CompositionWithOneOfAnonymous, CompositionWithOneOfDiscriminator, ConstValue, Default, DeleteCallWithoutParametersAndResponseData, DeleteFooData, DeleteFooData2, DeleteFooData3, DeprecatedCallData, DeprecatedModel, DictionaryWithArray, DictionaryWithDictionary, DictionaryWithProperties, DictionaryWithPropertiesAndAdditionalProperties, DictionaryWithReference, DictionaryWithString, DummyAData, DummyAResponse, DummyAResponses, DummyBData, DummyBResponse, DummyBResponses, DuplicateName2Data, DuplicateName3Data, DuplicateName4Data, DuplicateNameData, EnumFromDescription, EnumWithExtensions, EnumWithNumbers, EnumWithReplacedCharacters, EnumWithStrings, EnumWithXEnumNames, ExportData, ExternalRefA, ExternalRefB, ExternalSharedModel, File, FileResponseData, FileResponseResponse, FileResponseResponses, FileWritable, FooWowData, FooWowResponses, FreeFormObjectWithAdditionalPropertiesEqEmptyObject, FreeFormObjectWithAdditionalPropertiesEqTrue, FreeFormObjectWithoutAdditionalProperties, GenericSchemaDuplicateIssue1SystemBoolean, GenericSchemaDuplicateIssue1SystemBooleanWritable, GenericSchemaDuplicateIssue1SystemString, GenericSchemaDuplicateIssue1SystemStringWritable, GetApiVbyApiVersionSimpleOperationData, GetApiVbyApiVersionSimpleOperationError, GetApiVbyApiVersionSimpleOperationErrors, GetApiVbyApiVersionSimpleOperationResponse, GetApiVbyApiVersionSimpleOperationResponses, GetCallWithOptionalParamData, GetCallWithoutParametersAndResponseData, HeadCallWithoutParametersAndResponseData, Import, ImportData, ImportResponse, ImportResponses, IoK8sApimachineryPkgApisMetaV1DeleteOptions, IoK8sApimachineryPkgApisMetaV1Preconditions, ModelCircle, ModelFromZendesk, ModelSquare, ModelThatExtends, ModelThatExtendsExtends, ModelWithAdditionalPropertiesEqTrue, ModelWithAdditionalPropertiesRef, ModelWithAnyOfConstantSizeArray, ModelWithAnyOfConstantSizeArrayAndIntersect, ModelWithAnyOfConstantSizeArrayNullable, ModelWithAnyOfConstantSizeArrayWithNSizeAndOptions, ModelWithAnyOfConstantSizeArrayWithNSizeAndOptionsWritable, ModelWithArray, ModelWithArrayReadOnlyAndWriteOnly, ModelWithArrayReadOnlyAndWriteOnlyWritable, ModelWithBackticksInDescription, ModelWithBoolean, ModelWithCircularReference, ModelWithConst, ModelWithConstantSizeArray, ModelWithDictionary, ModelWithDuplicateImports, ModelWithDuplicateProperties, ModelWithEnum, ModelWithEnumFromDescription, ModelWithEnumWithHyphen, ModelWithInteger, ModelWithNestedArrayEnums, ModelWithNestedArrayEnumsData, ModelWithNestedArrayEnumsDataBar, ModelWithNestedArrayEnumsDataFoo, ModelWithNestedCompositionEnums, ModelWithNestedEnums, ModelWithNestedProperties, ModelWithNullableObject, ModelWithNullableString, ModelWithNumericEnumUnion, ModelWithOneOfAndProperties, ModelWithOneOfEnum, ModelWithOrderedProperties, ModelWithPattern, ModelWithPatternWritable, ModelWithPrefixItemsConstantSizeArray, ModelWithProperties, ModelWithPropertiesWritable, ModelWithReadOnlyAndWriteOnly, ModelWithReadOnlyAndWriteOnlyWritable, ModelWithReference, ModelWithReferenceWritable, ModelWithString, ModelWithStringError, MultipartRequestData, MultipartResponseData, MultipartResponseResponse, MultipartResponseResponses, NestedAnyOfArraysNullable, NonAsciiæøåÆøÅöôêÊ字符串Data, NonAsciiæøåÆøÅöôêÊ字符串Response, NonAsciiæøåÆøÅöôêÊ字符串Responses, NonAsciiStringæøåÆøÅöôêÊ字符串, NullableObject, OneOfAllOfIssue, OneOfAllOfIssueWritable, OptionsCallWithoutParametersAndResponseData, Pageable, ParameterSimpleParameterUnused, PatchApiVbyApiVersionNoTagData, PatchApiVbyApiVersionNoTagResponses, PatchCallWithoutParametersAndResponseData, PostApiVbyApiVersionFormDataData, PostApiVbyApiVersionRequestBodyData, PostCallWithOptionalParamData, PostCallWithOptionalParamResponse, PostCallWithOptionalParamResponses, PostCallWithoutParametersAndResponseData, PostServiceWithEmptyTagResponse, PostServiceWithEmptyTagResponse2, PutCallWithoutParametersAndResponseData, PutWithFormUrlEncodedData, SchemaWithFormRestrictedKeys, SimpleBoolean, SimpleFile, SimpleFormData, SimpleInteger, SimpleParameter, SimpleReference, SimpleRequestBody, SimpleString, SimpleStringWithPattern, TestErrorCodeData, TestErrorCodeErrors, TestErrorCodeResponses, TypesData, TypesResponse, TypesResponses, UploadFileData, UploadFileResponse, UploadFileResponses, XFooBar } from './types.gen';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/my-client/bundle/sdk.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport { type Client, formDataBodySerializer, type Options as Options2, type TDataShape, urlSearchParamsBodySerializer } from './client';\nimport { client } from './custom.gen';\nimport type { ApiVVersionODataControllerCountData, ApiVVersionODataControllerCountResponses, CallToTestOrderOfParamsData, CallWithDefaultOptionalParametersData, CallWithDefaultParametersData, CallWithDescriptionsData, CallWithDuplicateResponsesData, CallWithDuplicateResponsesErrors, CallWithDuplicateResponsesResponses, CallWithNoContentResponseData, CallWithNoContentResponseResponses, CallWithParametersData, CallWithResponseAndNoContentResponseData, CallWithResponseAndNoContentResponseResponses, CallWithResponseData, CallWithResponseResponses, CallWithResponsesData, CallWithResponsesErrors, CallWithResponsesResponses, CallWithResultFromHeaderData, CallWithResultFromHeaderErrors, CallWithResultFromHeaderResponses, CallWithWeirdParameterNamesData, CollectionFormatData, ComplexParamsData, ComplexParamsResponses, ComplexTypesData, ComplexTypesErrors, ComplexTypesResponses, DeleteCallWithoutParametersAndResponseData, DeleteFooData3, DeprecatedCallData, DummyAData, DummyAResponses, DummyBData, DummyBResponses, DuplicateName2Data, DuplicateName3Data, DuplicateName4Data, DuplicateNameData, ExportData, FileResponseData, FileResponseResponses, FooWowData, FooWowResponses, GetApiVbyApiVersionSimpleOperationData, GetApiVbyApiVersionSimpleOperationErrors, GetApiVbyApiVersionSimpleOperationResponses, GetCallWithOptionalParamData, GetCallWithoutParametersAndResponseData, HeadCallWithoutParametersAndResponseData, ImportData, ImportResponses, MultipartRequestData, MultipartResponseData, MultipartResponseResponses, NonAsciiæøåÆøÅöôêÊ字符串Data, NonAsciiæøåÆøÅöôêÊ字符串Responses, OptionsCallWithoutParametersAndResponseData, PatchApiVbyApiVersionNoTagData, PatchApiVbyApiVersionNoTagResponses, PatchCallWithoutParametersAndResponseData, PostApiVbyApiVersionFormDataData, PostApiVbyApiVersionRequestBodyData, PostCallWithOptionalParamData, PostCallWithOptionalParamResponses, PostCallWithoutParametersAndResponseData, PutCallWithoutParametersAndResponseData, PutWithFormUrlEncodedData, TestErrorCodeData, TestErrorCodeErrors, TestErrorCodeResponses, TypesData, TypesResponses, UploadFileData, UploadFileResponses } from './types.gen';\n\nexport type Options<TData extends TDataShape = TDataShape, ThrowOnError extends boolean = boolean> = Options2<TData, ThrowOnError> & {\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\nexport const export_ = <ThrowOnError extends boolean = false>(options?: Options<ExportData, ThrowOnError>) => (options?.client ?? client).get<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/no+tag', ...options });\n\nexport const patchApiVbyApiVersionNoTag = <ThrowOnError extends boolean = false>(options?: Options<PatchApiVbyApiVersionNoTagData, ThrowOnError>) => (options?.client ?? client).patch<PatchApiVbyApiVersionNoTagResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/no+tag', ...options });\n\nexport const import_ = <ThrowOnError extends boolean = false>(options: Options<ImportData, ThrowOnError>) => (options.client ?? client).post<ImportResponses, unknown, ThrowOnError>({\n    url: '/api/v{api-version}/no+tag',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options.headers\n    }\n});\n\nexport const fooWow = <ThrowOnError extends boolean = false>(options?: Options<FooWowData, ThrowOnError>) => (options?.client ?? client).put<FooWowResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/no+tag', ...options });\n\nexport const apiVVersionODataControllerCount = <ThrowOnError extends boolean = false>(options?: Options<ApiVVersionODataControllerCountData, ThrowOnError>) => (options?.client ?? client).get<ApiVVersionODataControllerCountResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple/$count', ...options });\n\nexport const getApiVbyApiVersionSimpleOperation = <ThrowOnError extends boolean = false>(options: Options<GetApiVbyApiVersionSimpleOperationData, ThrowOnError>) => (options.client ?? client).get<GetApiVbyApiVersionSimpleOperationResponses, GetApiVbyApiVersionSimpleOperationErrors, ThrowOnError>({ url: '/api/v{api-version}/simple:operation', ...options });\n\nexport const deleteCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<DeleteCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).delete<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const getCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<GetCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).get<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const headCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<HeadCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).head<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const optionsCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<OptionsCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).options<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const patchCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<PatchCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).patch<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const postCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<PostCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).post<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const putCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<PutCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).put<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const deleteFoo = <ThrowOnError extends boolean = false>(options: Options<DeleteFooData3, ThrowOnError>) => (options.client ?? client).delete<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/foo/{foo_param}/bar/{BarParam}', ...options });\n\nexport const callWithDescriptions = <ThrowOnError extends boolean = false>(options?: Options<CallWithDescriptionsData, ThrowOnError>) => (options?.client ?? client).post<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/descriptions', ...options });\n\n/**\n * @deprecated\n */\nexport const deprecatedCall = <ThrowOnError extends boolean = false>(options: Options<DeprecatedCallData, ThrowOnError>) => (options.client ?? client).post<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/parameters/deprecated', ...options });\n\nexport const callWithParameters = <ThrowOnError extends boolean = false>(options: Options<CallWithParametersData, ThrowOnError>) => (options.client ?? client).post<unknown, unknown, ThrowOnError>({\n    url: '/api/v{api-version}/parameters/{parameterPath}',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options.headers\n    }\n});\n\nexport const callWithWeirdParameterNames = <ThrowOnError extends boolean = false>(options: Options<CallWithWeirdParameterNamesData, ThrowOnError>) => (options.client ?? client).post<unknown, unknown, ThrowOnError>({\n    url: '/api/v{api-version}/parameters/{parameter.path.1}/{parameter-path-2}/{PARAMETER-PATH-3}',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options.headers\n    }\n});\n\nexport const getCallWithOptionalParam = <ThrowOnError extends boolean = false>(options: Options<GetCallWithOptionalParamData, ThrowOnError>) => (options.client ?? client).get<unknown, unknown, ThrowOnError>({\n    url: '/api/v{api-version}/parameters',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options.headers\n    }\n});\n\nexport const postCallWithOptionalParam = <ThrowOnError extends boolean = false>(options: Options<PostCallWithOptionalParamData, ThrowOnError>) => (options.client ?? client).post<PostCallWithOptionalParamResponses, unknown, ThrowOnError>({\n    url: '/api/v{api-version}/parameters',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options.headers\n    }\n});\n\nexport const postApiVbyApiVersionRequestBody = <ThrowOnError extends boolean = false>(options?: Options<PostApiVbyApiVersionRequestBodyData, ThrowOnError>) => (options?.client ?? client).post<unknown, unknown, ThrowOnError>({\n    url: '/api/v{api-version}/requestBody',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options?.headers\n    }\n});\n\nexport const postApiVbyApiVersionFormData = <ThrowOnError extends boolean = false>(options?: Options<PostApiVbyApiVersionFormDataData, ThrowOnError>) => (options?.client ?? client).post<unknown, unknown, ThrowOnError>({\n    ...formDataBodySerializer,\n    url: '/api/v{api-version}/formData',\n    ...options,\n    headers: {\n        'Content-Type': null,\n        ...options?.headers\n    }\n});\n\nexport const callWithDefaultParameters = <ThrowOnError extends boolean = false>(options?: Options<CallWithDefaultParametersData, ThrowOnError>) => (options?.client ?? client).get<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/defaults', ...options });\n\nexport const callWithDefaultOptionalParameters = <ThrowOnError extends boolean = false>(options?: Options<CallWithDefaultOptionalParametersData, ThrowOnError>) => (options?.client ?? client).post<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/defaults', ...options });\n\nexport const callToTestOrderOfParams = <ThrowOnError extends boolean = false>(options: Options<CallToTestOrderOfParamsData, ThrowOnError>) => (options.client ?? client).put<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/defaults', ...options });\n\nexport const duplicateName = <ThrowOnError extends boolean = false>(options?: Options<DuplicateNameData, ThrowOnError>) => (options?.client ?? client).delete<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/duplicate', ...options });\n\nexport const duplicateName2 = <ThrowOnError extends boolean = false>(options?: Options<DuplicateName2Data, ThrowOnError>) => (options?.client ?? client).get<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/duplicate', ...options });\n\nexport const duplicateName3 = <ThrowOnError extends boolean = false>(options?: Options<DuplicateName3Data, ThrowOnError>) => (options?.client ?? client).post<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/duplicate', ...options });\n\nexport const duplicateName4 = <ThrowOnError extends boolean = false>(options?: Options<DuplicateName4Data, ThrowOnError>) => (options?.client ?? client).put<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/duplicate', ...options });\n\nexport const callWithNoContentResponse = <ThrowOnError extends boolean = false>(options?: Options<CallWithNoContentResponseData, ThrowOnError>) => (options?.client ?? client).get<CallWithNoContentResponseResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/no-content', ...options });\n\nexport const callWithResponseAndNoContentResponse = <ThrowOnError extends boolean = false>(options?: Options<CallWithResponseAndNoContentResponseData, ThrowOnError>) => (options?.client ?? client).get<CallWithResponseAndNoContentResponseResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/multiple-tags/response-and-no-content', ...options });\n\nexport const dummyA = <ThrowOnError extends boolean = false>(options?: Options<DummyAData, ThrowOnError>) => (options?.client ?? client).get<DummyAResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/multiple-tags/a', ...options });\n\nexport const dummyB = <ThrowOnError extends boolean = false>(options?: Options<DummyBData, ThrowOnError>) => (options?.client ?? client).get<DummyBResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/multiple-tags/b', ...options });\n\nexport const callWithResponse = <ThrowOnError extends boolean = false>(options?: Options<CallWithResponseData, ThrowOnError>) => (options?.client ?? client).get<CallWithResponseResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/response', ...options });\n\nexport const callWithDuplicateResponses = <ThrowOnError extends boolean = false>(options?: Options<CallWithDuplicateResponsesData, ThrowOnError>) => (options?.client ?? client).post<CallWithDuplicateResponsesResponses, CallWithDuplicateResponsesErrors, ThrowOnError>({ url: '/api/v{api-version}/response', ...options });\n\nexport const callWithResponses = <ThrowOnError extends boolean = false>(options?: Options<CallWithResponsesData, ThrowOnError>) => (options?.client ?? client).put<CallWithResponsesResponses, CallWithResponsesErrors, ThrowOnError>({ url: '/api/v{api-version}/response', ...options });\n\nexport const collectionFormat = <ThrowOnError extends boolean = false>(options: Options<CollectionFormatData, ThrowOnError>) => (options.client ?? client).get<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/collectionFormat', ...options });\n\nexport const types = <ThrowOnError extends boolean = false>(options: Options<TypesData, ThrowOnError>) => (options.client ?? client).get<TypesResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/types', ...options });\n\nexport const uploadFile = <ThrowOnError extends boolean = false>(options: Options<UploadFileData, ThrowOnError>) => (options.client ?? client).post<UploadFileResponses, unknown, ThrowOnError>({\n    ...urlSearchParamsBodySerializer,\n    url: '/api/v{api-version}/upload',\n    ...options,\n    headers: {\n        'Content-Type': 'application/x-www-form-urlencoded',\n        ...options.headers\n    }\n});\n\nexport const fileResponse = <ThrowOnError extends boolean = false>(options: Options<FileResponseData, ThrowOnError>) => (options.client ?? client).get<FileResponseResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/file/{id}', ...options });\n\nexport const complexTypes = <ThrowOnError extends boolean = false>(options: Options<ComplexTypesData, ThrowOnError>) => (options.client ?? client).get<ComplexTypesResponses, ComplexTypesErrors, ThrowOnError>({\n    querySerializer: { parameters: { parameterObject: { object: { style: 'form' } } } },\n    url: '/api/v{api-version}/complex',\n    ...options\n});\n\nexport const multipartResponse = <ThrowOnError extends boolean = false>(options?: Options<MultipartResponseData, ThrowOnError>) => (options?.client ?? client).get<MultipartResponseResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/multipart', ...options });\n\nexport const multipartRequest = <ThrowOnError extends boolean = false>(options?: Options<MultipartRequestData, ThrowOnError>) => (options?.client ?? client).post<unknown, unknown, ThrowOnError>({\n    ...formDataBodySerializer,\n    url: '/api/v{api-version}/multipart',\n    ...options,\n    headers: {\n        'Content-Type': null,\n        ...options?.headers\n    }\n});\n\nexport const complexParams = <ThrowOnError extends boolean = false>(options: Options<ComplexParamsData, ThrowOnError>) => (options.client ?? client).put<ComplexParamsResponses, unknown, ThrowOnError>({\n    url: '/api/v{api-version}/complex/{id}',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json-patch+json',\n        ...options.headers\n    }\n});\n\nexport const callWithResultFromHeader = <ThrowOnError extends boolean = false>(options?: Options<CallWithResultFromHeaderData, ThrowOnError>) => (options?.client ?? client).post<CallWithResultFromHeaderResponses, CallWithResultFromHeaderErrors, ThrowOnError>({ url: '/api/v{api-version}/header', ...options });\n\nexport const testErrorCode = <ThrowOnError extends boolean = false>(options: Options<TestErrorCodeData, ThrowOnError>) => (options.client ?? client).post<TestErrorCodeResponses, TestErrorCodeErrors, ThrowOnError>({ url: '/api/v{api-version}/error', ...options });\n\nexport const nonAsciiæøåÆøÅöôêÊ字符串 = <ThrowOnError extends boolean = false>(options: Options<NonAsciiæøåÆøÅöôêÊ字符串Data, ThrowOnError>) => (options.client ?? client).post<NonAsciiæøåÆøÅöôêÊ字符串Responses, unknown, ThrowOnError>({ url: '/api/v{api-version}/non-ascii-æøåÆØÅöôêÊ字符串', ...options });\n\n/**\n * Login User\n */\nexport const putWithFormUrlEncoded = <ThrowOnError extends boolean = false>(options: Options<PutWithFormUrlEncodedData, ThrowOnError>) => (options.client ?? client).put<unknown, unknown, ThrowOnError>({\n    ...urlSearchParamsBodySerializer,\n    url: '/api/v{api-version}/non-ascii-æøåÆØÅöôêÊ字符串',\n    ...options,\n    headers: {\n        'Content-Type': 'application/x-www-form-urlencoded',\n        ...options.headers\n    }\n});\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/my-client/bundle/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type ClientOptions = {\n    baseUrl: 'http://localhost:3000/base' | (string & {});\n};\n\n/**\n * Model with number-only name\n */\nexport type _400 = string;\n\n/**\n * External ref to shared model (A)\n */\nexport type ExternalRefA = ExternalSharedModel;\n\n/**\n * External ref to shared model (B)\n */\nexport type ExternalRefB = ExternalSharedModel;\n\n/**\n * Testing multiline comments in string: First line\n * Second line\n *\n * Fourth line\n */\nexport type CamelCaseCommentWithBreaks = number;\n\n/**\n * Testing multiline comments in string: First line\n * Second line\n *\n * Fourth line\n */\nexport type CommentWithBreaks = number;\n\n/**\n * Testing backticks in string: `backticks` and ```multiple backticks``` should work\n */\nexport type CommentWithBackticks = number;\n\n/**\n * Testing backticks and quotes in string: `backticks`, 'quotes', \"double quotes\" and ```multiple backticks``` should work\n */\nexport type CommentWithBackticksAndQuotes = number;\n\n/**\n * Testing slashes in string: \\backwards\\\\\\ and /forwards/// should work\n */\nexport type CommentWithSlashes = number;\n\n/**\n * Testing expression placeholders in string: ${expression} should work\n */\nexport type CommentWithExpressionPlaceholders = number;\n\n/**\n * Testing quotes in string: 'single quote''' and \"double quotes\"\"\" should work\n */\nexport type CommentWithQuotes = number;\n\n/**\n * Testing reserved characters in string: * inline * and ** inline ** should work\n */\nexport type CommentWithReservedCharacters = number;\n\n/**\n * This is a simple number\n */\nexport type SimpleInteger = number;\n\n/**\n * This is a simple boolean\n */\nexport type SimpleBoolean = boolean;\n\n/**\n * This is a simple string\n */\nexport type SimpleString = string;\n\n/**\n * A string with non-ascii (unicode) characters valid in typescript identifiers (æøåÆØÅöÔèÈ字符串)\n */\nexport type NonAsciiStringæøåÆøÅöôêÊ字符串 = string;\n\n/**\n * This is a simple file\n */\nexport type SimpleFile = Blob | File;\n\n/**\n * This is a simple reference\n */\nexport type SimpleReference = ModelWithString;\n\n/**\n * This is a simple string\n */\nexport type SimpleStringWithPattern = string | null;\n\n/**\n * This is a simple enum with strings\n */\nexport type EnumWithStrings = 'Success' | 'Warning' | 'Error' | '\\'Single Quote\\'' | '\"Double Quotes\"' | 'Non-ascii: øæåôöØÆÅÔÖ字符串';\n\nexport type EnumWithReplacedCharacters = '\\'Single Quote\\'' | '\"Double Quotes\"' | 'øæåôöØÆÅÔÖ字符串' | 3.1 | '';\n\n/**\n * This is a simple enum with numbers\n */\nexport type EnumWithNumbers = 1 | 2 | 3 | 1.1 | 1.2 | 1.3 | 100 | 200 | 300 | -100 | -200 | -300 | -1.1 | -1.2 | -1.3;\n\n/**\n * Success=1,Warning=2,Error=3\n */\nexport type EnumFromDescription = number;\n\n/**\n * This is a simple enum with numbers\n */\nexport type EnumWithExtensions = 200 | 400 | 500;\n\nexport type EnumWithXEnumNames = 0 | 1 | 2;\n\n/**\n * This is a simple array with numbers\n */\nexport type ArrayWithNumbers = Array<number>;\n\n/**\n * This is a simple array with booleans\n */\nexport type ArrayWithBooleans = Array<boolean>;\n\n/**\n * This is a simple array with strings\n */\nexport type ArrayWithStrings = Array<string>;\n\n/**\n * This is a simple array with references\n */\nexport type ArrayWithReferences = Array<ModelWithString>;\n\n/**\n * This is a simple array containing an array\n */\nexport type ArrayWithArray = Array<Array<ModelWithString>>;\n\n/**\n * This is a simple array with properties\n */\nexport type ArrayWithProperties = Array<{\n    '16x16'?: CamelCaseCommentWithBreaks;\n    bar?: string;\n}>;\n\n/**\n * This is a simple array with any of properties\n */\nexport type ArrayWithAnyOfProperties = Array<{\n    foo?: string;\n} | {\n    bar?: string;\n}>;\n\nexport type AnyOfAnyAndNull = {\n    data?: unknown | null;\n};\n\n/**\n * This is a simple array with any of properties\n */\nexport type AnyOfArrays = {\n    results?: Array<{\n        foo?: string;\n    } | {\n        bar?: string;\n    }>;\n};\n\n/**\n * This is a string dictionary\n */\nexport type DictionaryWithString = {\n    [key: string]: string;\n};\n\nexport type DictionaryWithPropertiesAndAdditionalProperties = {\n    foo?: number;\n    bar?: boolean;\n    [key: string]: string | number | boolean | undefined;\n};\n\n/**\n * This is a string reference\n */\nexport type DictionaryWithReference = {\n    [key: string]: ModelWithString;\n};\n\n/**\n * This is a complex dictionary\n */\nexport type DictionaryWithArray = {\n    [key: string]: Array<ModelWithString>;\n};\n\n/**\n * This is a string dictionary\n */\nexport type DictionaryWithDictionary = {\n    [key: string]: {\n        [key: string]: string;\n    };\n};\n\n/**\n * This is a complex dictionary\n */\nexport type DictionaryWithProperties = {\n    [key: string]: {\n        foo?: string;\n        bar?: string;\n    };\n};\n\n/**\n * This is a model with one number property\n */\nexport type ModelWithInteger = {\n    /**\n     * This is a simple number property\n     */\n    prop?: number;\n};\n\n/**\n * This is a model with one boolean property\n */\nexport type ModelWithBoolean = {\n    /**\n     * This is a simple boolean property\n     */\n    prop?: boolean;\n};\n\n/**\n * This is a model with one string property\n */\nexport type ModelWithString = {\n    /**\n     * This is a simple string property\n     */\n    prop?: string;\n};\n\n/**\n * This is a model with one string property\n */\nexport type ModelWithStringError = {\n    /**\n     * This is a simple string property\n     */\n    prop?: string;\n};\n\n/**\n * `Comment` or `VoiceComment`. The JSON object for adding voice comments to tickets is different. See [Adding voice comments to tickets](/documentation/ticketing/managing-tickets/adding-voice-comments-to-tickets)\n */\nexport type ModelFromZendesk = string;\n\n/**\n * This is a model with one string property\n */\nexport type ModelWithNullableString = {\n    /**\n     * This is a simple string property\n     */\n    nullableProp1?: string | null;\n    /**\n     * This is a simple string property\n     */\n    nullableRequiredProp1: string | null;\n    /**\n     * This is a simple string property\n     */\n    nullableProp2?: string | null;\n    /**\n     * This is a simple string property\n     */\n    nullableRequiredProp2: string | null;\n    /**\n     * This is a simple enum with strings\n     */\n    'foo_bar-enum'?: 'Success' | 'Warning' | 'Error' | 'ØÆÅ字符串';\n};\n\n/**\n * This is a model with one enum\n */\nexport type ModelWithEnum = {\n    /**\n     * This is a simple enum with strings\n     */\n    'foo_bar-enum'?: 'Success' | 'Warning' | 'Error' | 'ØÆÅ字符串';\n    /**\n     * These are the HTTP error code enums\n     */\n    statusCode?: '100' | '200 FOO' | '300 FOO_BAR' | '400 foo-bar' | '500 foo.bar' | '600 foo&bar';\n    /**\n     * Simple boolean enum\n     */\n    bool?: true;\n};\n\n/**\n * This is a model with one enum with escaped name\n */\nexport type ModelWithEnumWithHyphen = {\n    /**\n     * Foo-Bar-Baz-Qux\n     */\n    'foo-bar-baz-qux'?: '3.0';\n};\n\n/**\n * This is a model with one enum\n */\nexport type ModelWithEnumFromDescription = {\n    /**\n     * Success=1,Warning=2,Error=3\n     */\n    test?: number;\n};\n\n/**\n * This is a model with nested enums\n */\nexport type ModelWithNestedEnums = {\n    dictionaryWithEnum?: {\n        [key: string]: 'Success' | 'Warning' | 'Error';\n    };\n    dictionaryWithEnumFromDescription?: {\n        [key: string]: number;\n    };\n    arrayWithEnum?: Array<'Success' | 'Warning' | 'Error'>;\n    arrayWithDescription?: Array<number>;\n    /**\n     * This is a simple enum with strings\n     */\n    'foo_bar-enum'?: 'Success' | 'Warning' | 'Error' | 'ØÆÅ字符串';\n};\n\n/**\n * This is a model with one property containing a reference\n */\nexport type ModelWithReference = {\n    prop?: ModelWithProperties;\n};\n\n/**\n * This is a model with one property containing an array\n */\nexport type ModelWithArrayReadOnlyAndWriteOnly = {\n    prop?: Array<ModelWithReadOnlyAndWriteOnly>;\n    propWithFile?: Array<Blob | File>;\n    propWithNumber?: Array<number>;\n};\n\n/**\n * This is a model with one property containing an array\n */\nexport type ModelWithArray = {\n    prop?: Array<ModelWithString>;\n    propWithFile?: Array<Blob | File>;\n    propWithNumber?: Array<number>;\n};\n\n/**\n * This is a model with one property containing a dictionary\n */\nexport type ModelWithDictionary = {\n    prop?: {\n        [key: string]: string;\n    };\n};\n\n/**\n * This is a deprecated model with a deprecated property\n *\n * @deprecated\n */\nexport type DeprecatedModel = {\n    /**\n     * This is a deprecated property\n     *\n     * @deprecated\n     */\n    prop?: string;\n};\n\n/**\n * This is a model with one property containing a circular reference\n */\nexport type ModelWithCircularReference = {\n    prop?: ModelWithCircularReference;\n};\n\n/**\n * This is a model with one property with a 'one of' relationship\n */\nexport type CompositionWithOneOf = {\n    propA?: ModelWithString | ModelWithEnum | ModelWithArray | ModelWithDictionary;\n};\n\n/**\n * This is a model with one property with a 'one of' relationship where the options are not $ref\n */\nexport type CompositionWithOneOfAnonymous = {\n    propA?: {\n        propA?: string;\n    } | string | number;\n};\n\n/**\n * Circle\n */\nexport type ModelCircle = {\n    kind: string;\n    radius?: number;\n};\n\n/**\n * Square\n */\nexport type ModelSquare = {\n    kind: string;\n    sideLength?: number;\n};\n\n/**\n * This is a model with one property with a 'one of' relationship where the options are not $ref\n */\nexport type CompositionWithOneOfDiscriminator = ({\n    kind: 'circle';\n} & ModelCircle) | ({\n    kind: 'square';\n} & ModelSquare);\n\n/**\n * This is a model with one property with a 'any of' relationship\n */\nexport type CompositionWithAnyOf = {\n    propA?: ModelWithString | ModelWithEnum | ModelWithArray | ModelWithDictionary;\n};\n\n/**\n * This is a model with one property with a 'any of' relationship where the options are not $ref\n */\nexport type CompositionWithAnyOfAnonymous = {\n    propA?: {\n        propA?: string;\n    } | string | number;\n};\n\n/**\n * This is a model with nested 'any of' property with a type null\n */\nexport type CompositionWithNestedAnyAndTypeNull = {\n    propA?: Array<ModelWithDictionary | null> | Array<ModelWithArray | null>;\n};\n\nexport type _3eNum1Период = 'Bird' | 'Dog';\n\nexport type ConstValue = 'ConstValue';\n\n/**\n * This is a model with one property with a 'any of' relationship where the options are not $ref\n */\nexport type CompositionWithNestedAnyOfAndNull = {\n    /**\n     * Scopes\n     */\n    propA?: Array<_3eNum1Период | ConstValue> | null;\n};\n\n/**\n * This is a model with one property with a 'one of' relationship\n */\nexport type CompositionWithOneOfAndNullable = {\n    propA?: {\n        boolean?: boolean;\n    } | ModelWithEnum | ModelWithArray | ModelWithDictionary | null;\n};\n\n/**\n * This is a model that contains a simple dictionary within composition\n */\nexport type CompositionWithOneOfAndSimpleDictionary = {\n    propA?: boolean | {\n        [key: string]: number;\n    };\n};\n\n/**\n * This is a model that contains a dictionary of simple arrays within composition\n */\nexport type CompositionWithOneOfAndSimpleArrayDictionary = {\n    propA?: boolean | {\n        [key: string]: Array<boolean>;\n    };\n};\n\n/**\n * This is a model that contains a dictionary of complex arrays (composited) within composition\n */\nexport type CompositionWithOneOfAndComplexArrayDictionary = {\n    propA?: boolean | {\n        [key: string]: Array<number | string>;\n    };\n};\n\n/**\n * This is a model with one property with a 'all of' relationship\n */\nexport type CompositionWithAllOfAndNullable = {\n    propA?: ({\n        boolean?: boolean;\n    } & ModelWithEnum & ModelWithArray & ModelWithDictionary) | null;\n};\n\n/**\n * This is a model with one property with a 'any of' relationship\n */\nexport type CompositionWithAnyOfAndNullable = {\n    propA?: {\n        boolean?: boolean;\n    } | ModelWithEnum | ModelWithArray | ModelWithDictionary | null;\n};\n\n/**\n * This is a base model with two simple optional properties\n */\nexport type CompositionBaseModel = {\n    firstName?: string;\n    lastname?: string;\n};\n\n/**\n * This is a model that extends the base model\n */\nexport type CompositionExtendedModel = CompositionBaseModel & {\n    age: number;\n    firstName: string;\n    lastname: string;\n};\n\n/**\n * This is a model with one nested property\n */\nexport type ModelWithProperties = {\n    required: string;\n    readonly requiredAndReadOnly: string;\n    requiredAndNullable: string | null;\n    string?: string;\n    number?: number;\n    boolean?: boolean;\n    reference?: ModelWithString;\n    'property with space'?: string;\n    default?: string;\n    try?: string;\n    readonly '@namespace.string'?: string;\n    readonly '@namespace.integer'?: number;\n};\n\n/**\n * This is a model with one nested property\n */\nexport type ModelWithNestedProperties = {\n    readonly first: {\n        readonly second: {\n            readonly third: string | null;\n        } | null;\n    } | null;\n};\n\n/**\n * This is a model with duplicated properties\n */\nexport type ModelWithDuplicateProperties = {\n    prop?: ModelWithString;\n};\n\n/**\n * This is a model with ordered properties\n */\nexport type ModelWithOrderedProperties = {\n    zebra?: string;\n    apple?: string;\n    hawaii?: string;\n};\n\n/**\n * This is a model with duplicated imports\n */\nexport type ModelWithDuplicateImports = {\n    propA?: ModelWithString;\n    propB?: ModelWithString;\n    propC?: ModelWithString;\n};\n\n/**\n * This is a model that extends another model\n */\nexport type ModelThatExtends = ModelWithString & {\n    propExtendsA?: string;\n    propExtendsB?: ModelWithString;\n};\n\n/**\n * This is a model that extends another model\n */\nexport type ModelThatExtendsExtends = ModelWithString & ModelThatExtends & {\n    propExtendsC?: string;\n    propExtendsD?: ModelWithString;\n};\n\n/**\n * This is a model that contains a some patterns\n */\nexport type ModelWithPattern = {\n    key: string;\n    name: string;\n    readonly enabled?: boolean;\n    readonly modified?: string;\n    id?: string;\n    text?: string;\n    patternWithSingleQuotes?: string;\n    patternWithNewline?: string;\n    patternWithBacktick?: string;\n    patternWithUnicode?: string;\n};\n\nexport type File = {\n    /**\n     * Id\n     */\n    readonly id?: string;\n    /**\n     * Updated at\n     */\n    readonly updated_at?: string;\n    /**\n     * Created at\n     */\n    readonly created_at?: string;\n    /**\n     * Mime\n     */\n    mime: string;\n    /**\n     * File\n     */\n    readonly file?: string;\n};\n\nexport type Default = {\n    name?: string;\n};\n\nexport type Pageable = {\n    page?: number;\n    size?: number;\n    sort?: Array<string>;\n};\n\n/**\n * This is a free-form object without additionalProperties.\n */\nexport type FreeFormObjectWithoutAdditionalProperties = {\n    [key: string]: unknown;\n};\n\n/**\n * This is a free-form object with additionalProperties: true.\n */\nexport type FreeFormObjectWithAdditionalPropertiesEqTrue = {\n    [key: string]: unknown;\n};\n\n/**\n * This is a free-form object with additionalProperties: {}.\n */\nexport type FreeFormObjectWithAdditionalPropertiesEqEmptyObject = {\n    [key: string]: unknown;\n};\n\nexport type ModelWithConst = {\n    String?: 'String';\n    number?: 0;\n    null?: null;\n    withType?: 'Some string';\n};\n\n/**\n * This is a model with one property and additionalProperties: true\n */\nexport type ModelWithAdditionalPropertiesEqTrue = {\n    /**\n     * This is a simple string property\n     */\n    prop?: string;\n    [key: string]: unknown;\n};\n\nexport type NestedAnyOfArraysNullable = {\n    nullableArray?: Array<string | boolean> | null;\n};\n\nexport type CompositionWithOneOfAndProperties = ({\n    foo: SimpleParameter;\n} | {\n    bar: NonAsciiStringæøåÆøÅöôêÊ字符串;\n}) & {\n    baz: number | null;\n    qux: number;\n};\n\n/**\n * An object that can be null\n */\nexport type NullableObject = {\n    foo?: string;\n} | null;\n\n/**\n * Some % character\n */\nexport type CharactersInDescription = string;\n\nexport type ModelWithNullableObject = {\n    data?: NullableObject;\n};\n\n/**\n * An object with additional properties that can be null (anyOf ref + null)\n */\nexport type ModelWithAdditionalPropertiesRef = {\n    [key: string]: NullableObject | null;\n};\n\nexport type ModelWithOneOfEnum = {\n    foo: 'Bar';\n} | {\n    foo: 'Baz';\n} | {\n    foo: 'Qux';\n} | {\n    content: string;\n    foo: 'Quux';\n} | {\n    content: [\n        string,\n        string\n    ];\n    foo: 'Corge';\n};\n\nexport type ModelWithNestedArrayEnumsDataFoo = 'foo' | 'bar';\n\nexport type ModelWithNestedArrayEnumsDataBar = 'baz' | 'qux';\n\nexport type ModelWithNestedArrayEnumsData = {\n    foo?: Array<ModelWithNestedArrayEnumsDataFoo>;\n    bar?: Array<ModelWithNestedArrayEnumsDataBar>;\n};\n\nexport type ModelWithNestedArrayEnums = {\n    array_strings?: Array<string>;\n    data?: ModelWithNestedArrayEnumsData;\n};\n\nexport type ModelWithNestedCompositionEnums = {\n    foo?: ModelWithNestedArrayEnumsDataFoo;\n};\n\nexport type ModelWithReadOnlyAndWriteOnly = {\n    foo: string;\n    readonly bar: string;\n};\n\nexport type ModelWithConstantSizeArray = [\n    number,\n    number\n];\n\nexport type ModelWithAnyOfConstantSizeArray = [\n    number | string,\n    number | string,\n    number | string\n];\n\nexport type ModelWithPrefixItemsConstantSizeArray = [\n    ModelWithInteger,\n    number | string,\n    string\n];\n\nexport type ModelWithAnyOfConstantSizeArrayNullable = [\n    number | null | string,\n    number | null | string,\n    number | null | string\n];\n\nexport type ModelWithAnyOfConstantSizeArrayWithNSizeAndOptions = [\n    number | Import,\n    number | Import\n];\n\nexport type ModelWithAnyOfConstantSizeArrayAndIntersect = [\n    number & string,\n    number & string\n];\n\nexport type ModelWithNumericEnumUnion = {\n    /**\n     * Период\n     */\n    value?: -10 | -1 | 0 | 1 | 3 | 6 | 12;\n};\n\n/**\n * Some description with `back ticks`\n */\nexport type ModelWithBackticksInDescription = {\n    /**\n     * The template `that` should be used for parsing and importing the contents of the CSV file.\n     *\n     * <br/><p>There is one placeholder currently supported:<ul>     <li><b>${x}</b> - refers to the n-th column in the CSV file, e.g. ${1}, ${2}, ...)</li></ul><p>Example of a correct JSON template:</p>\n     * <pre>\n     * [\n     * {\n     * \"resourceType\": \"Asset\",\n     * \"identifier\": {\n     * \"name\": \"${1}\",\n     * \"domain\": {\n     * \"name\": \"${2}\",\n     * \"community\": {\n     * \"name\": \"Some Community\"\n     * }\n     * }\n     * },\n     * \"attributes\" : {\n     * \"00000000-0000-0000-0000-000000003115\" : [ {\n     * \"value\" : \"${3}\"\n     * } ],\n     * \"00000000-0000-0000-0000-000000000222\" : [ {\n     * \"value\" : \"${4}\"\n     * } ]\n     * }\n     * }\n     * ]\n     * </pre>\n     */\n    template?: string;\n};\n\nexport type ModelWithOneOfAndProperties = (SimpleParameter | NonAsciiStringæøåÆøÅöôêÊ字符串) & {\n    baz: number | null;\n    qux: number;\n};\n\n/**\n * Model used to test deduplication strategy (unused)\n */\nexport type ParameterSimpleParameterUnused = string;\n\n/**\n * Model used to test deduplication strategy\n */\nexport type PostServiceWithEmptyTagResponse = string;\n\n/**\n * Model used to test deduplication strategy\n */\nexport type PostServiceWithEmptyTagResponse2 = string;\n\n/**\n * Model used to test deduplication strategy\n */\nexport type DeleteFooData = string;\n\n/**\n * Model used to test deduplication strategy\n */\nexport type DeleteFooData2 = string;\n\n/**\n * Model with restricted keyword name\n */\nexport type Import = string;\n\nexport type SchemaWithFormRestrictedKeys = {\n    description?: string;\n    'x-enum-descriptions'?: string;\n    'x-enum-varnames'?: string;\n    'x-enumNames'?: string;\n    title?: string;\n    object?: {\n        description?: string;\n        'x-enum-descriptions'?: string;\n        'x-enum-varnames'?: string;\n        'x-enumNames'?: string;\n        title?: string;\n    };\n    array?: Array<{\n        description?: string;\n        'x-enum-descriptions'?: string;\n        'x-enum-varnames'?: string;\n        'x-enumNames'?: string;\n        title?: string;\n    }>;\n};\n\n/**\n * This schema was giving PascalCase transformations a hard time\n */\nexport type IoK8sApimachineryPkgApisMetaV1DeleteOptions = {\n    /**\n     * Must be fulfilled before a deletion is carried out. If not possible, a 409 Conflict status will be returned.\n     */\n    preconditions?: IoK8sApimachineryPkgApisMetaV1Preconditions;\n};\n\n/**\n * This schema was giving PascalCase transformations a hard time\n */\nexport type IoK8sApimachineryPkgApisMetaV1Preconditions = {\n    /**\n     * Specifies the target ResourceVersion\n     */\n    resourceVersion?: string;\n    /**\n     * Specifies the target UID.\n     */\n    uid?: string;\n};\n\nexport type AdditionalPropertiesUnknownIssue = {\n    [key: string]: string | number;\n};\n\nexport type AdditionalPropertiesUnknownIssue2 = {\n    [key: string]: string | number;\n};\n\nexport type AdditionalPropertiesUnknownIssue3 = string & {\n    entries: {\n        [key: string]: AdditionalPropertiesUnknownIssue;\n    };\n};\n\nexport type AdditionalPropertiesIntegerIssue = {\n    value: number;\n    [key: string]: number;\n};\n\nexport type OneOfAllOfIssue = ((ConstValue | GenericSchemaDuplicateIssue1SystemBoolean) & _3eNum1Период) | GenericSchemaDuplicateIssue1SystemString;\n\nexport type GenericSchemaDuplicateIssue1SystemBoolean = {\n    item?: boolean;\n    error?: string | null;\n    readonly hasError?: boolean;\n    data?: {\n        [key: string]: never;\n    };\n};\n\nexport type GenericSchemaDuplicateIssue1SystemString = {\n    item?: string | null;\n    error?: string | null;\n    readonly hasError?: boolean;\n};\n\nexport type ExternalSharedModel = {\n    id: string;\n    name?: string;\n};\n\n/**\n * This is a model with one property containing a reference\n */\nexport type ModelWithReferenceWritable = {\n    prop?: ModelWithPropertiesWritable;\n};\n\n/**\n * This is a model with one property containing an array\n */\nexport type ModelWithArrayReadOnlyAndWriteOnlyWritable = {\n    prop?: Array<ModelWithReadOnlyAndWriteOnlyWritable>;\n    propWithFile?: Array<Blob | File>;\n    propWithNumber?: Array<number>;\n};\n\n/**\n * This is a model with one nested property\n */\nexport type ModelWithPropertiesWritable = {\n    required: string;\n    requiredAndNullable: string | null;\n    string?: string;\n    number?: number;\n    boolean?: boolean;\n    reference?: ModelWithString;\n    'property with space'?: string;\n    default?: string;\n    try?: string;\n};\n\n/**\n * This is a model that contains a some patterns\n */\nexport type ModelWithPatternWritable = {\n    key: string;\n    name: string;\n    id?: string;\n    text?: string;\n    patternWithSingleQuotes?: string;\n    patternWithNewline?: string;\n    patternWithBacktick?: string;\n    patternWithUnicode?: string;\n};\n\nexport type FileWritable = {\n    /**\n     * Mime\n     */\n    mime: string;\n};\n\nexport type ModelWithReadOnlyAndWriteOnlyWritable = {\n    foo: string;\n    baz: string;\n};\n\nexport type ModelWithAnyOfConstantSizeArrayWithNSizeAndOptionsWritable = [\n    number | Import,\n    number | Import\n];\n\nexport type AdditionalPropertiesUnknownIssueWritable = {\n    [key: string]: string | number;\n};\n\nexport type OneOfAllOfIssueWritable = ((ConstValue | GenericSchemaDuplicateIssue1SystemBoolean) & _3eNum1Период) | GenericSchemaDuplicateIssue1SystemString;\n\nexport type GenericSchemaDuplicateIssue1SystemBooleanWritable = {\n    item?: boolean;\n    error?: string | null;\n    data?: {\n        [key: string]: never;\n    };\n};\n\nexport type GenericSchemaDuplicateIssue1SystemStringWritable = {\n    item?: string | null;\n    error?: string | null;\n};\n\n/**\n * This is a reusable parameter\n */\nexport type SimpleParameter = string;\n\n/**\n * Parameter with illegal characters\n */\nexport type XFooBar = ModelWithString;\n\n/**\n * A reusable request body\n */\nexport type SimpleRequestBody = ModelWithString;\n\n/**\n * A reusable request body\n */\nexport type SimpleFormData = ModelWithString;\n\nexport type ExportData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no+tag';\n};\n\nexport type PatchApiVbyApiVersionNoTagData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no+tag';\n};\n\nexport type PatchApiVbyApiVersionNoTagResponses = {\n    /**\n     * OK\n     */\n    default: unknown;\n};\n\nexport type ImportData = {\n    body: ModelWithReadOnlyAndWriteOnlyWritable | ModelWithArrayReadOnlyAndWriteOnlyWritable;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no+tag';\n};\n\nexport type ImportResponses = {\n    /**\n     * Success\n     */\n    200: ModelFromZendesk;\n    /**\n     * Default success response\n     */\n    default: ModelWithReadOnlyAndWriteOnly;\n};\n\nexport type ImportResponse = ImportResponses[keyof ImportResponses];\n\nexport type FooWowData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no+tag';\n};\n\nexport type FooWowResponses = {\n    /**\n     * OK\n     */\n    default: unknown;\n};\n\nexport type ApiVVersionODataControllerCountData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple/$count';\n};\n\nexport type ApiVVersionODataControllerCountResponses = {\n    /**\n     * Success\n     */\n    200: ModelFromZendesk;\n};\n\nexport type ApiVVersionODataControllerCountResponse = ApiVVersionODataControllerCountResponses[keyof ApiVVersionODataControllerCountResponses];\n\nexport type GetApiVbyApiVersionSimpleOperationData = {\n    body?: never;\n    path: {\n        /**\n         * foo in method\n         */\n        foo_param: string;\n    };\n    query?: never;\n    url: '/api/v{api-version}/simple:operation';\n};\n\nexport type GetApiVbyApiVersionSimpleOperationErrors = {\n    /**\n     * Default error response\n     */\n    default: ModelWithBoolean;\n};\n\nexport type GetApiVbyApiVersionSimpleOperationError = GetApiVbyApiVersionSimpleOperationErrors[keyof GetApiVbyApiVersionSimpleOperationErrors];\n\nexport type GetApiVbyApiVersionSimpleOperationResponses = {\n    /**\n     * Response is a simple number\n     */\n    200: number;\n};\n\nexport type GetApiVbyApiVersionSimpleOperationResponse = GetApiVbyApiVersionSimpleOperationResponses[keyof GetApiVbyApiVersionSimpleOperationResponses];\n\nexport type DeleteCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type GetCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type HeadCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type OptionsCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type PatchCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type PostCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type PutCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type DeleteFooData3 = {\n    body?: never;\n    headers: {\n        /**\n         * Parameter with illegal characters\n         */\n        'x-Foo-Bar': ModelWithString;\n    };\n    path: {\n        /**\n         * foo in method\n         */\n        foo_param: string;\n        /**\n         * bar in method\n         */\n        BarParam: string;\n    };\n    query?: never;\n    url: '/api/v{api-version}/foo/{foo_param}/bar/{BarParam}';\n};\n\nexport type CallWithDescriptionsData = {\n    body?: never;\n    path?: never;\n    query?: {\n        /**\n         * Testing multiline comments in string: First line\n         * Second line\n         *\n         * Fourth line\n         */\n        parameterWithBreaks?: string;\n        /**\n         * Testing backticks in string: `backticks` and ```multiple backticks``` should work\n         */\n        parameterWithBackticks?: string;\n        /**\n         * Testing slashes in string: \\backwards\\\\\\ and /forwards/// should work\n         */\n        parameterWithSlashes?: string;\n        /**\n         * Testing expression placeholders in string: ${expression} should work\n         */\n        parameterWithExpressionPlaceholders?: string;\n        /**\n         * Testing quotes in string: 'single quote''' and \"double quotes\"\"\" should work\n         */\n        parameterWithQuotes?: string;\n        /**\n         * Testing reserved characters in string: * inline * and ** inline ** should work\n         */\n        parameterWithReservedCharacters?: string;\n    };\n    url: '/api/v{api-version}/descriptions';\n};\n\nexport type DeprecatedCallData = {\n    body?: never;\n    headers: {\n        /**\n         * This parameter is deprecated\n         *\n         * @deprecated\n         */\n        parameter: DeprecatedModel | null;\n    };\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/parameters/deprecated';\n};\n\nexport type CallWithParametersData = {\n    /**\n     * This is the parameter that goes into the body\n     */\n    body: {\n        [key: string]: unknown;\n    } | null;\n    headers: {\n        /**\n         * This is the parameter that goes into the header\n         */\n        parameterHeader: string | null;\n    };\n    path: {\n        /**\n         * This is the parameter that goes into the path\n         */\n        parameterPath: string | null;\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string | null;\n    };\n    query: {\n        foo_ref_enum?: ModelWithNestedArrayEnumsDataFoo;\n        foo_all_of_enum: ModelWithNestedArrayEnumsDataFoo;\n        /**\n         * This is the parameter that goes into the query params\n         */\n        cursor: string | null;\n    };\n    url: '/api/v{api-version}/parameters/{parameterPath}';\n};\n\nexport type CallWithWeirdParameterNamesData = {\n    /**\n     * This is the parameter that goes into the body\n     */\n    body: ModelWithString | null;\n    headers: {\n        /**\n         * This is the parameter that goes into the request header\n         */\n        'parameter.header': string | null;\n    };\n    path: {\n        /**\n         * This is the parameter that goes into the path\n         */\n        'parameter.path.1'?: string;\n        /**\n         * This is the parameter that goes into the path\n         */\n        'parameter-path-2'?: string;\n        /**\n         * This is the parameter that goes into the path\n         */\n        'PARAMETER-PATH-3'?: string;\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string | null;\n    };\n    query: {\n        /**\n         * This is the parameter with a reserved keyword\n         */\n        default?: string;\n        /**\n         * This is the parameter that goes into the request query params\n         */\n        'parameter-query': string | null;\n    };\n    url: '/api/v{api-version}/parameters/{parameter.path.1}/{parameter-path-2}/{PARAMETER-PATH-3}';\n};\n\nexport type GetCallWithOptionalParamData = {\n    /**\n     * This is a required parameter\n     */\n    body: ModelWithOneOfEnum;\n    path?: never;\n    query?: {\n        /**\n         * This is an optional parameter\n         */\n        page?: number;\n    };\n    url: '/api/v{api-version}/parameters';\n};\n\nexport type PostCallWithOptionalParamData = {\n    /**\n     * This is an optional parameter\n     */\n    body?: {\n        offset?: number | null;\n    };\n    path?: never;\n    query: {\n        /**\n         * This is a required parameter\n         */\n        parameter: Pageable;\n    };\n    url: '/api/v{api-version}/parameters';\n};\n\nexport type PostCallWithOptionalParamResponses = {\n    /**\n     * Response is a simple number\n     */\n    200: number;\n    /**\n     * Success\n     */\n    204: void;\n};\n\nexport type PostCallWithOptionalParamResponse = PostCallWithOptionalParamResponses[keyof PostCallWithOptionalParamResponses];\n\nexport type PostApiVbyApiVersionRequestBodyData = {\n    /**\n     * A reusable request body\n     */\n    body?: SimpleRequestBody;\n    path?: never;\n    query?: {\n        /**\n         * This is a reusable parameter\n         */\n        parameter?: string;\n    };\n    url: '/api/v{api-version}/requestBody';\n};\n\nexport type PostApiVbyApiVersionFormDataData = {\n    /**\n     * A reusable request body\n     */\n    body?: SimpleFormData;\n    path?: never;\n    query?: {\n        /**\n         * This is a reusable parameter\n         */\n        parameter?: string;\n    };\n    url: '/api/v{api-version}/formData';\n};\n\nexport type CallWithDefaultParametersData = {\n    body?: never;\n    path?: never;\n    query?: {\n        /**\n         * This is a simple string with default value\n         */\n        parameterString?: string | null;\n        /**\n         * This is a simple number with default value\n         */\n        parameterNumber?: number | null;\n        /**\n         * This is a simple boolean with default value\n         */\n        parameterBoolean?: boolean | null;\n        /**\n         * This is a simple enum with default value\n         */\n        parameterEnum?: 'Success' | 'Warning' | 'Error';\n        /**\n         * This is a simple model with default value\n         */\n        parameterModel?: ModelWithString | null;\n    };\n    url: '/api/v{api-version}/defaults';\n};\n\nexport type CallWithDefaultOptionalParametersData = {\n    body?: never;\n    path?: never;\n    query?: {\n        /**\n         * This is a simple string that is optional with default value\n         */\n        parameterString?: string;\n        /**\n         * This is a simple number that is optional with default value\n         */\n        parameterNumber?: number;\n        /**\n         * This is a simple boolean that is optional with default value\n         */\n        parameterBoolean?: boolean;\n        /**\n         * This is a simple enum that is optional with default value\n         */\n        parameterEnum?: 'Success' | 'Warning' | 'Error';\n        /**\n         * This is a simple model that is optional with default value\n         */\n        parameterModel?: ModelWithString;\n    };\n    url: '/api/v{api-version}/defaults';\n};\n\nexport type CallToTestOrderOfParamsData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * This is a optional string with default\n         */\n        parameterOptionalStringWithDefault?: string;\n        /**\n         * This is a optional string with empty default\n         */\n        parameterOptionalStringWithEmptyDefault?: string;\n        /**\n         * This is a optional string with no default\n         */\n        parameterOptionalStringWithNoDefault?: string;\n        /**\n         * This is a string with default\n         */\n        parameterStringWithDefault: string;\n        /**\n         * This is a string with empty default\n         */\n        parameterStringWithEmptyDefault: string;\n        /**\n         * This is a string with no default\n         */\n        parameterStringWithNoDefault: string;\n        /**\n         * This is a string that can be null with no default\n         */\n        parameterStringNullableWithNoDefault?: string | null;\n        /**\n         * This is a string that can be null with default\n         */\n        parameterStringNullableWithDefault?: string | null;\n    };\n    url: '/api/v{api-version}/defaults';\n};\n\nexport type DuplicateNameData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/duplicate';\n};\n\nexport type DuplicateName2Data = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/duplicate';\n};\n\nexport type DuplicateName3Data = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/duplicate';\n};\n\nexport type DuplicateName4Data = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/duplicate';\n};\n\nexport type CallWithNoContentResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no-content';\n};\n\nexport type CallWithNoContentResponseResponses = {\n    /**\n     * Success\n     */\n    204: void;\n};\n\nexport type CallWithNoContentResponseResponse = CallWithNoContentResponseResponses[keyof CallWithNoContentResponseResponses];\n\nexport type CallWithResponseAndNoContentResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multiple-tags/response-and-no-content';\n};\n\nexport type CallWithResponseAndNoContentResponseResponses = {\n    /**\n     * Response is a simple number\n     */\n    200: number;\n    /**\n     * Success\n     */\n    204: void;\n};\n\nexport type CallWithResponseAndNoContentResponseResponse = CallWithResponseAndNoContentResponseResponses[keyof CallWithResponseAndNoContentResponseResponses];\n\nexport type DummyAData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multiple-tags/a';\n};\n\nexport type DummyAResponses = {\n    200: _400;\n};\n\nexport type DummyAResponse = DummyAResponses[keyof DummyAResponses];\n\nexport type DummyBData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multiple-tags/b';\n};\n\nexport type DummyBResponses = {\n    /**\n     * Success\n     */\n    204: void;\n};\n\nexport type DummyBResponse = DummyBResponses[keyof DummyBResponses];\n\nexport type CallWithResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/response';\n};\n\nexport type CallWithResponseResponses = {\n    default: Import;\n};\n\nexport type CallWithResponseResponse = CallWithResponseResponses[keyof CallWithResponseResponses];\n\nexport type CallWithDuplicateResponsesData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/response';\n};\n\nexport type CallWithDuplicateResponsesErrors = {\n    /**\n     * Message for 500 error\n     */\n    500: ModelWithStringError;\n    /**\n     * Message for 501 error\n     */\n    501: ModelWithStringError;\n    /**\n     * Message for 502 error\n     */\n    502: ModelWithStringError;\n    /**\n     * Message for 4XX errors\n     */\n    '4XX': DictionaryWithArray;\n    /**\n     * Default error response\n     */\n    default: ModelWithBoolean;\n};\n\nexport type CallWithDuplicateResponsesError = CallWithDuplicateResponsesErrors[keyof CallWithDuplicateResponsesErrors];\n\nexport type CallWithDuplicateResponsesResponses = {\n    /**\n     * Message for 200 response\n     */\n    200: ModelWithBoolean & ModelWithInteger;\n    /**\n     * Message for 201 response\n     */\n    201: ModelWithString;\n    /**\n     * Message for 202 response\n     */\n    202: ModelWithString;\n};\n\nexport type CallWithDuplicateResponsesResponse = CallWithDuplicateResponsesResponses[keyof CallWithDuplicateResponsesResponses];\n\nexport type CallWithResponsesData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/response';\n};\n\nexport type CallWithResponsesErrors = {\n    /**\n     * Message for 500 error\n     */\n    500: ModelWithStringError;\n    /**\n     * Message for 501 error\n     */\n    501: ModelWithStringError;\n    /**\n     * Message for 502 error\n     */\n    502: ModelWithStringError;\n    /**\n     * Message for default response\n     */\n    default: ModelWithStringError;\n};\n\nexport type CallWithResponsesError = CallWithResponsesErrors[keyof CallWithResponsesErrors];\n\nexport type CallWithResponsesResponses = {\n    /**\n     * Message for 200 response\n     */\n    200: {\n        readonly '@namespace.string'?: string;\n        readonly '@namespace.integer'?: number;\n        readonly value?: Array<ModelWithString>;\n    };\n    /**\n     * Message for 201 response\n     */\n    201: ModelThatExtends;\n    /**\n     * Message for 202 response\n     */\n    202: ModelThatExtendsExtends;\n};\n\nexport type CallWithResponsesResponse = CallWithResponsesResponses[keyof CallWithResponsesResponses];\n\nexport type CollectionFormatData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * This is an array parameter that is sent as csv format (comma-separated values)\n         */\n        parameterArrayCSV: Array<string> | null;\n        /**\n         * This is an array parameter that is sent as ssv format (space-separated values)\n         */\n        parameterArraySSV: Array<string> | null;\n        /**\n         * This is an array parameter that is sent as tsv format (tab-separated values)\n         */\n        parameterArrayTSV: Array<string> | null;\n        /**\n         * This is an array parameter that is sent as pipes format (pipe-separated values)\n         */\n        parameterArrayPipes: Array<string> | null;\n        /**\n         * This is an array parameter that is sent as multi format (multiple parameter instances)\n         */\n        parameterArrayMulti: Array<string> | null;\n    };\n    url: '/api/v{api-version}/collectionFormat';\n};\n\nexport type TypesData = {\n    body?: never;\n    path?: {\n        /**\n         * This is a number parameter\n         */\n        id?: number;\n    };\n    query: {\n        /**\n         * This is a number parameter\n         */\n        parameterNumber: number;\n        /**\n         * This is a string parameter\n         */\n        parameterString: string | null;\n        /**\n         * This is a boolean parameter\n         */\n        parameterBoolean: boolean | null;\n        /**\n         * This is an object parameter\n         */\n        parameterObject: {\n            [key: string]: unknown;\n        } | null;\n        /**\n         * This is an array parameter\n         */\n        parameterArray: Array<string> | null;\n        /**\n         * This is a dictionary parameter\n         */\n        parameterDictionary: {\n            [key: string]: unknown;\n        } | null;\n        /**\n         * This is an enum parameter\n         */\n        parameterEnum: 'Success' | 'Warning' | 'Error' | null;\n    };\n    url: '/api/v{api-version}/types';\n};\n\nexport type TypesResponses = {\n    /**\n     * Response is a simple number\n     */\n    200: number;\n    /**\n     * Response is a simple string\n     */\n    201: string;\n    /**\n     * Response is a simple boolean\n     */\n    202: boolean;\n    /**\n     * Response is a simple object\n     */\n    203: {\n        [key: string]: unknown;\n    };\n};\n\nexport type TypesResponse = TypesResponses[keyof TypesResponses];\n\nexport type UploadFileData = {\n    body: Blob | File;\n    path: {\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string | null;\n    };\n    query?: never;\n    url: '/api/v{api-version}/upload';\n};\n\nexport type UploadFileResponses = {\n    200: boolean;\n};\n\nexport type UploadFileResponse = UploadFileResponses[keyof UploadFileResponses];\n\nexport type FileResponseData = {\n    body?: never;\n    path: {\n        id: string;\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string;\n    };\n    query?: never;\n    url: '/api/v{api-version}/file/{id}';\n};\n\nexport type FileResponseResponses = {\n    /**\n     * Success\n     */\n    200: Blob | File;\n};\n\nexport type FileResponseResponse = FileResponseResponses[keyof FileResponseResponses];\n\nexport type ComplexTypesData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * Parameter containing object\n         */\n        parameterObject: {\n            first?: {\n                second?: {\n                    third?: string;\n                };\n            };\n        };\n        /**\n         * Parameter containing reference\n         */\n        parameterReference: ModelWithString;\n    };\n    url: '/api/v{api-version}/complex';\n};\n\nexport type ComplexTypesErrors = {\n    /**\n     * 400 `server` error\n     */\n    400: unknown;\n    /**\n     * 500 server error\n     */\n    500: unknown;\n};\n\nexport type ComplexTypesResponses = {\n    /**\n     * Successful response\n     */\n    200: Array<ModelWithString>;\n};\n\nexport type ComplexTypesResponse = ComplexTypesResponses[keyof ComplexTypesResponses];\n\nexport type MultipartResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multipart';\n};\n\nexport type MultipartResponseResponses = {\n    /**\n     * OK\n     */\n    200: {\n        file?: Blob | File;\n        metadata?: {\n            foo?: string;\n            bar?: string;\n        };\n    };\n};\n\nexport type MultipartResponseResponse = MultipartResponseResponses[keyof MultipartResponseResponses];\n\nexport type MultipartRequestData = {\n    body?: {\n        content?: Blob | File;\n        data?: ModelWithString | null;\n    };\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multipart';\n};\n\nexport type ComplexParamsData = {\n    body?: {\n        readonly key: string | null;\n        name: string | null;\n        enabled?: boolean;\n        type: 'Monkey' | 'Horse' | 'Bird';\n        listOfModels?: Array<ModelWithString> | null;\n        listOfStrings?: Array<string> | null;\n        parameters: ModelWithString | ModelWithEnum | ModelWithArray | ModelWithDictionary;\n        readonly user?: {\n            readonly id?: number;\n            readonly name?: string | null;\n        };\n    };\n    path: {\n        id: number;\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string;\n    };\n    query?: never;\n    url: '/api/v{api-version}/complex/{id}';\n};\n\nexport type ComplexParamsResponses = {\n    /**\n     * Success\n     */\n    200: ModelWithString;\n};\n\nexport type ComplexParamsResponse = ComplexParamsResponses[keyof ComplexParamsResponses];\n\nexport type CallWithResultFromHeaderData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/header';\n};\n\nexport type CallWithResultFromHeaderErrors = {\n    /**\n     * 400 server error\n     */\n    400: unknown;\n    /**\n     * 500 server error\n     */\n    500: unknown;\n};\n\nexport type CallWithResultFromHeaderResponses = {\n    /**\n     * Successful response\n     */\n    200: unknown;\n};\n\nexport type TestErrorCodeData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * Status code to return\n         */\n        status: number;\n    };\n    url: '/api/v{api-version}/error';\n};\n\nexport type TestErrorCodeErrors = {\n    /**\n     * Custom message: Internal Server Error\n     */\n    500: unknown;\n    /**\n     * Custom message: Not Implemented\n     */\n    501: unknown;\n    /**\n     * Custom message: Bad Gateway\n     */\n    502: unknown;\n    /**\n     * Custom message: Service Unavailable\n     */\n    503: unknown;\n};\n\nexport type TestErrorCodeResponses = {\n    /**\n     * Custom message: Successful response\n     */\n    200: unknown;\n};\n\nexport type NonAsciiæøåÆøÅöôêÊ字符串Data = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * Dummy input param\n         */\n        nonAsciiParamæøåÆØÅöôêÊ: number;\n    };\n    url: '/api/v{api-version}/non-ascii-æøåÆØÅöôêÊ字符串';\n};\n\nexport type NonAsciiæøåÆøÅöôêÊ字符串Responses = {\n    /**\n     * Successful response\n     */\n    200: Array<NonAsciiStringæøåÆøÅöôêÊ字符串>;\n};\n\nexport type NonAsciiæøåÆøÅöôêÊ字符串Response = NonAsciiæøåÆøÅöôêÊ字符串Responses[keyof NonAsciiæøåÆøÅöôêÊ字符串Responses];\n\nexport type PutWithFormUrlEncodedData = {\n    body: ArrayWithStrings;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/non-ascii-æøåÆØÅöôêÊ字符串';\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/my-client/default/client/client.ts",
    "content": "import type { Client, Config, RequestOptions } from './types';\nimport {\n  buildUrl,\n  createConfig,\n  createInterceptors,\n  getParseAs,\n  mergeConfigs,\n  mergeHeaders,\n  setAuthParams,\n} from './utils';\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, RequestOptions>();\n\n  // @ts-expect-error\n  const request: Client['request'] = async (options) => {\n    const opts = {\n      ..._config,\n      ...options,\n      fetch: options.fetch ?? _config.fetch ?? globalThis.fetch,\n      headers: mergeHeaders(_config.headers, options.headers),\n    };\n\n    if (opts.security) {\n      await setAuthParams({\n        ...opts,\n        security: opts.security,\n      });\n    }\n\n    if (opts.body && opts.bodySerializer) {\n      opts.body = opts.bodySerializer(opts.body);\n    }\n\n    // remove Content-Type header if body is empty to avoid sending invalid requests\n    if (opts.body === undefined || opts.body === '') {\n      opts.headers.delete('Content-Type');\n    }\n\n    const url = buildUrl(opts);\n    const requestInit: ReqInit = {\n      redirect: 'follow',\n      ...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 = await _fetch(request);\n\n    for (const fn of interceptors.response.fns) {\n      if (fn) {\n        response = await fn(response, request, opts);\n      }\n    }\n\n    const result = {\n      request,\n      response,\n    };\n\n    if (response.ok) {\n      if (response.status === 204 || response.headers.get('Content-Length') === '0') {\n        return {\n          data: {},\n          ...result,\n        };\n      }\n\n      const parseAs =\n        (opts.parseAs === 'auto'\n          ? getParseAs(response.headers.get('Content-Type'))\n          : opts.parseAs) ?? 'json';\n\n      if (parseAs === 'stream') {\n        return {\n          data: response.body,\n          ...result,\n        };\n      }\n\n      let data = await response[parseAs]();\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 {\n        data,\n        ...result,\n      };\n    }\n\n    let error = await response.text();\n\n    try {\n      error = JSON.parse(error);\n    } catch {\n      // noop\n    }\n\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    return {\n      error: finalError,\n      ...result,\n    };\n  };\n\n  return {\n    buildUrl,\n    connect: (options) => request({ ...options, method: 'CONNECT' }),\n    delete: (options) => request({ ...options, method: 'DELETE' }),\n    get: (options) => request({ ...options, method: 'GET' }),\n    getConfig,\n    head: (options) => request({ ...options, method: 'HEAD' }),\n    interceptors,\n    options: (options) => request({ ...options, method: 'OPTIONS' }),\n    patch: (options) => request({ ...options, method: 'PATCH' }),\n    post: (options) => request({ ...options, method: 'POST' }),\n    put: (options) => request({ ...options, method: 'PUT' }),\n    request,\n    setConfig,\n    trace: (options) => request({ ...options, method: 'TRACE' }),\n  };\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/my-client/default/client/core/auth.ts",
    "content": "export 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/my-client/default/client/core/bodySerializer.ts",
    "content": "import type { ArrayStyle, ObjectStyle, SerializerOptions } from './pathSerializer';\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) => {\n  if (typeof value === 'string' || value instanceof Blob) {\n    data.append(key, value);\n  } else {\n    data.append(key, JSON.stringify(value));\n  }\n};\n\nconst serializeUrlSearchParamsPair = (data: URLSearchParams, key: string, value: unknown) => {\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) => {\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) =>\n    JSON.stringify(body, (_key, value) => (typeof value === 'bigint' ? value.toString() : value)),\n};\n\nexport const urlSearchParamsBodySerializer = {\n  bodySerializer: (body: unknown) => {\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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/my-client/default/client/core/params.ts",
    "content": "type Slot = 'body' | 'headers' | 'path' | 'query';\n\nexport type Field =\n  | {\n      in: Exclude<Slot, 'body'>;\n      key: string;\n      map?: string;\n    }\n  | {\n      in: Extract<Slot, 'body'>;\n      key?: string;\n      map?: string;\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\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 (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' && !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        (params[field.in] as Record<string, unknown>)[name] = arg;\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          const name = field.map || key;\n          (params[field.in] as Record<string, unknown>)[name] = value;\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 {\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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/my-client/default/client/core/pathSerializer.ts",
    "content": "interface 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/my-client/default/client/core/types.ts",
    "content": "import type { Auth, AuthToken } from './auth';\nimport type { BodySerializer, QuerySerializer, QuerySerializerOptions } from './bodySerializer';\n\nexport interface Client<RequestFn = never, Config = unknown, MethodFn = never, BuildUrlFn = never> {\n  /**\n   * Returns the final request URL.\n   */\n  buildUrl: BuildUrlFn;\n  connect: MethodFn;\n  delete: MethodFn;\n  get: MethodFn;\n  getConfig: () => Config;\n  head: MethodFn;\n  options: MethodFn;\n  patch: MethodFn;\n  post: MethodFn;\n  put: MethodFn;\n  request: RequestFn;\n  setConfig: (config: Config) => Config;\n  trace: MethodFn;\n}\n\nexport interface Config {\n  /**\n   * Auth token or a function returning auth token. The resolved value will be\n   * added to the request payload as defined by its `security` array.\n   */\n  auth?: ((auth: Auth) => Promise<AuthToken> | AuthToken) | AuthToken;\n  /**\n   * A function for serializing request body parameter. By default,\n   * {@link JSON.stringify()} will be used.\n   */\n  bodySerializer?: BodySerializer | null;\n  /**\n   * An object containing any HTTP headers that you want to pre-populate your\n   * `Headers` object with.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/Headers/Headers#init See more}\n   */\n  headers?:\n    | RequestInit['headers']\n    | Record<\n        string,\n        string | number | boolean | (string | number | boolean)[] | null | undefined | unknown\n      >;\n  /**\n   * The request method.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/fetch#method See more}\n   */\n  method?: 'CONNECT' | 'DELETE' | 'GET' | 'HEAD' | 'OPTIONS' | 'PATCH' | 'POST' | 'PUT' | 'TRACE';\n  /**\n   * A function for serializing request query parameters. By default, arrays\n   * will be exploded in form style, objects will be exploded in deepObject\n   * style, and reserved characters are percent-encoded.\n   *\n   * This method will have no effect if the native `paramsSerializer()` Axios\n   * API function is used.\n   *\n   * {@link https://swagger.io/docs/specification/serialization/#query View examples}\n   */\n  querySerializer?: QuerySerializer | QuerySerializerOptions;\n  /**\n   * A function transforming response data before it's returned. This is useful\n   * for post-processing data, e.g. converting ISO strings into Date objects.\n   */\n  responseTransformer?: (data: unknown) => Promise<unknown>;\n  /**\n   * A function validating response data. This is useful if you want to ensure\n   * the response conforms to the desired shape, so it can be safely passed to\n   * the transformers and returned to the user.\n   */\n  responseValidator?: (data: unknown) => Promise<unknown>;\n}\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/my-client/default/client/index.ts",
    "content": "export { createClient } from './client';\nexport type { Auth } from './core/auth';\nexport type { QuerySerializerOptions } from './core/bodySerializer';\nexport {\n  formDataBodySerializer,\n  jsonBodySerializer,\n  urlSearchParamsBodySerializer,\n} from './core/bodySerializer';\nexport type {\n  Client,\n  ClientOptions,\n  Config,\n  CreateClientConfig,\n  Options,\n  RequestOptions,\n  RequestResult,\n  TDataShape,\n} from './types';\nexport { createConfig } from './utils';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/my-client/default/client/plugin.ts",
    "content": "import {\n  type Client,\n  clientDefaultConfig,\n  clientDefaultMeta,\n  clientPluginHandler,\n  type DefinePlugin,\n  definePluginConfig,\n} from '@hey-api/openapi-ts';\n\nexport type Config = Client.Config & {\n  /**\n   * Plugin name. Must be unique.\n   */\n  name: string;\n};\n\nexport type MyClientPlugin = DefinePlugin<Config, Config>;\n\nexport const defaultConfig: MyClientPlugin['Config'] = {\n  ...clientDefaultMeta,\n  config: clientDefaultConfig,\n  handler: clientPluginHandler as MyClientPlugin['Handler'],\n  name: __filename,\n};\n\n/**\n * Type helper for `my-client` plugin, returns {@link Plugin.Config} object\n */\nexport const myClientPlugin = definePluginConfig(defaultConfig);\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/my-client/default/client/types.ts",
    "content": "import type { Auth } from './core/auth';\nimport type { Client as CoreClient, Config as CoreConfig } from './core/types';\nimport type { Middleware } from './utils';\n\nexport interface Config<T extends ClientOptions = ClientOptions>\n  extends Omit<RequestInit, 'body' | 'headers' | 'method'>, CoreConfig {\n  /**\n   * Base URL for all requests made by this client.\n   */\n  baseUrl?: T['baseUrl'];\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?: (request: Request) => ReturnType<typeof fetch>;\n  /**\n   * Return the response data parsed in a specified format. By default, `auto`\n   * will infer the appropriate method from the `Content-Type` response header.\n   * You can override this behavior with any of the {@link Body} methods.\n   * Select `stream` if you don't want to parse response data at all.\n   *\n   * @default 'auto'\n   */\n  parseAs?: 'arrayBuffer' | 'auto' | 'blob' | 'formData' | 'json' | 'stream' | 'text';\n  /**\n   * Throw an error instead of returning it in the response?\n   *\n   * @default false\n   */\n  throwOnError?: T['throwOnError'];\n}\n\nexport interface RequestOptions<\n  ThrowOnError extends boolean = boolean,\n  Url extends string = string,\n> extends Config<{\n  throwOnError: ThrowOnError;\n}> {\n  /**\n   * Any body that you want to add to your request.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/fetch#body}\n   */\n  body?: unknown;\n  path?: Record<string, unknown>;\n  query?: Record<string, unknown>;\n  /**\n   * Security mechanism(s) to use for the request.\n   */\n  security?: ReadonlyArray<Auth>;\n  url: Url;\n}\n\nexport type RequestResult<\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = boolean,\n> = ThrowOnError extends true\n  ? Promise<{\n      data: TData;\n      request: Request;\n      response: Response;\n    }>\n  : Promise<\n      ({ data: TData; error: undefined } | { data: undefined; error: TError }) & {\n        request: Request;\n        response: Response;\n      }\n    >;\n\nexport interface ClientOptions {\n  baseUrl?: string;\n  throwOnError?: boolean;\n}\n\ntype MethodFn = <TData = unknown, TError = unknown, ThrowOnError extends boolean = false>(\n  options: Omit<RequestOptions<ThrowOnError>, 'method'>,\n) => RequestResult<TData, TError, ThrowOnError>;\n\ntype RequestFn = <TData = unknown, TError = unknown, ThrowOnError extends boolean = false>(\n  options: Omit<RequestOptions<ThrowOnError>, 'method'> &\n    Pick<Required<RequestOptions<ThrowOnError>>, 'method'>,\n) => RequestResult<TData, TError, ThrowOnError>;\n\ntype BuildUrlFn = <\n  TData extends {\n    body?: unknown;\n    path?: Record<string, unknown>;\n    query?: Record<string, unknown>;\n    url: string;\n  },\n>(\n  options: TData & Options<TData>,\n) => string;\n\nexport type Client = CoreClient<RequestFn, Config, MethodFn, BuildUrlFn> & {\n  interceptors: Middleware<Request, Response, unknown, RequestOptions>;\n};\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 = ClientOptions> = (\n  override?: Config<ClientOptions & T>,\n) => Config<Required<ClientOptions> & T>;\n\nexport interface TDataShape {\n  body?: unknown;\n  headers?: unknown;\n  path?: unknown;\n  query?: unknown;\n  url: string;\n}\n\ntype OmitKeys<T, K> = Pick<T, Exclude<keyof T, K>>;\n\nexport type Options<\n  TData extends TDataShape = TDataShape,\n  ThrowOnError extends boolean = boolean,\n> = OmitKeys<RequestOptions<ThrowOnError>, 'body' | 'path' | 'query' | 'url'> & Omit<TData, 'url'>;\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/my-client/default/client/utils.ts",
    "content": "import { getAuthToken } from './core/auth';\nimport type { QuerySerializer, QuerySerializerOptions } from './core/bodySerializer';\nimport { jsonBodySerializer } from './core/bodySerializer';\nimport {\n  serializeArrayParam,\n  serializeObjectParam,\n  serializePrimitiveParam,\n} from './core/pathSerializer';\nimport type { Client, ClientOptions, Config, RequestOptions } from './types';\n\ninterface PathSerializer {\n  path: Record<string, unknown>;\n  url: string;\n}\n\nconst PATH_PARAM_RE = /\\{[^{}]+\\}/g;\n\ntype ArrayStyle = 'form' | 'spaceDelimited' | 'pipeDelimited';\ntype MatrixStyle = 'label' | 'matrix' | 'simple';\ntype ArraySeparatorStyle = ArrayStyle | MatrixStyle;\n\nconst 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 createQuerySerializer = <T = unknown>({\n  allowReserved,\n  array,\n  object,\n}: QuerySerializerOptions = {}) => {\n  const querySerializer = (queryParams: T) => {\n    let 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        if (Array.isArray(value)) {\n          search = [\n            ...search,\n            serializeArrayParam({\n              allowReserved,\n              explode: true,\n              name,\n              style: 'form',\n              value,\n              ...array,\n            }),\n          ];\n          continue;\n        }\n\n        if (typeof value === 'object') {\n          search = [\n            ...search,\n            serializeObjectParam({\n              allowReserved,\n              explode: true,\n              name,\n              style: 'deepObject',\n              value: value as Record<string, unknown>,\n              ...object,\n            }),\n          ];\n          continue;\n        }\n\n        search = [\n          ...search,\n          serializePrimitiveParam({\n            allowReserved,\n            name,\n            value: value as string,\n          }),\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\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    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    return;\n  }\n};\n\nexport const buildUrl: Client['buildUrl'] = (options) => {\n  const url = 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  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 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\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 || typeof header !== 'object') {\n      continue;\n    }\n\n    const iterator = header instanceof Headers ? header.entries() : 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/my-client/default/custom.gen.ts",
    "content": "// 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: 'http://localhost:3000/base' }));\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/my-client/default/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport { apiVVersionODataControllerCount, callToTestOrderOfParams, callWithDefaultOptionalParameters, callWithDefaultParameters, callWithDescriptions, callWithDuplicateResponses, callWithNoContentResponse, callWithParameters, callWithResponse, callWithResponseAndNoContentResponse, callWithResponses, callWithResultFromHeader, callWithWeirdParameterNames, collectionFormat, complexParams, complexTypes, deleteCallWithoutParametersAndResponse, deleteFoo, deprecatedCall, dummyA, dummyB, duplicateName, duplicateName2, duplicateName3, duplicateName4, export_, fileResponse, fooWow, getApiVbyApiVersionSimpleOperation, getCallWithOptionalParam, getCallWithoutParametersAndResponse, headCallWithoutParametersAndResponse, import_, multipartRequest, multipartResponse, nonAsciiæøåÆøÅöôêÊ字符串, type Options, optionsCallWithoutParametersAndResponse, patchApiVbyApiVersionNoTag, patchCallWithoutParametersAndResponse, postApiVbyApiVersionFormData, postApiVbyApiVersionRequestBody, postCallWithOptionalParam, postCallWithoutParametersAndResponse, putCallWithoutParametersAndResponse, putWithFormUrlEncoded, testErrorCode, types, uploadFile } from './sdk.gen';\nexport type { _3eNum1Период, _400, AdditionalPropertiesIntegerIssue, AdditionalPropertiesUnknownIssue, AdditionalPropertiesUnknownIssue2, AdditionalPropertiesUnknownIssue3, AdditionalPropertiesUnknownIssueWritable, AnyOfAnyAndNull, AnyOfArrays, ApiVVersionODataControllerCountData, ApiVVersionODataControllerCountResponse, ApiVVersionODataControllerCountResponses, ArrayWithAnyOfProperties, ArrayWithArray, ArrayWithBooleans, ArrayWithNumbers, ArrayWithProperties, ArrayWithReferences, ArrayWithStrings, CallToTestOrderOfParamsData, CallWithDefaultOptionalParametersData, CallWithDefaultParametersData, CallWithDescriptionsData, CallWithDuplicateResponsesData, CallWithDuplicateResponsesError, CallWithDuplicateResponsesErrors, CallWithDuplicateResponsesResponse, CallWithDuplicateResponsesResponses, CallWithNoContentResponseData, CallWithNoContentResponseResponse, CallWithNoContentResponseResponses, CallWithParametersData, CallWithResponseAndNoContentResponseData, CallWithResponseAndNoContentResponseResponse, CallWithResponseAndNoContentResponseResponses, CallWithResponseData, CallWithResponseResponse, CallWithResponseResponses, CallWithResponsesData, CallWithResponsesError, CallWithResponsesErrors, CallWithResponsesResponse, CallWithResponsesResponses, CallWithResultFromHeaderData, CallWithResultFromHeaderErrors, CallWithResultFromHeaderResponses, CallWithWeirdParameterNamesData, CamelCaseCommentWithBreaks, CharactersInDescription, ClientOptions, CollectionFormatData, CommentWithBackticks, CommentWithBackticksAndQuotes, CommentWithBreaks, CommentWithExpressionPlaceholders, CommentWithQuotes, CommentWithReservedCharacters, CommentWithSlashes, ComplexParamsData, ComplexParamsResponse, ComplexParamsResponses, ComplexTypesData, ComplexTypesErrors, ComplexTypesResponse, ComplexTypesResponses, CompositionBaseModel, CompositionExtendedModel, CompositionWithAllOfAndNullable, CompositionWithAnyOf, CompositionWithAnyOfAndNullable, CompositionWithAnyOfAnonymous, CompositionWithNestedAnyAndTypeNull, CompositionWithNestedAnyOfAndNull, CompositionWithOneOf, CompositionWithOneOfAndComplexArrayDictionary, CompositionWithOneOfAndNullable, CompositionWithOneOfAndProperties, CompositionWithOneOfAndSimpleArrayDictionary, CompositionWithOneOfAndSimpleDictionary, CompositionWithOneOfAnonymous, CompositionWithOneOfDiscriminator, ConstValue, Default, DeleteCallWithoutParametersAndResponseData, DeleteFooData, DeleteFooData2, DeleteFooData3, DeprecatedCallData, DeprecatedModel, DictionaryWithArray, DictionaryWithDictionary, DictionaryWithProperties, DictionaryWithPropertiesAndAdditionalProperties, DictionaryWithReference, DictionaryWithString, DummyAData, DummyAResponse, DummyAResponses, DummyBData, DummyBResponse, DummyBResponses, DuplicateName2Data, DuplicateName3Data, DuplicateName4Data, DuplicateNameData, EnumFromDescription, EnumWithExtensions, EnumWithNumbers, EnumWithReplacedCharacters, EnumWithStrings, EnumWithXEnumNames, ExportData, ExternalRefA, ExternalRefB, ExternalSharedModel, File, FileResponseData, FileResponseResponse, FileResponseResponses, FileWritable, FooWowData, FooWowResponses, FreeFormObjectWithAdditionalPropertiesEqEmptyObject, FreeFormObjectWithAdditionalPropertiesEqTrue, FreeFormObjectWithoutAdditionalProperties, GenericSchemaDuplicateIssue1SystemBoolean, GenericSchemaDuplicateIssue1SystemBooleanWritable, GenericSchemaDuplicateIssue1SystemString, GenericSchemaDuplicateIssue1SystemStringWritable, GetApiVbyApiVersionSimpleOperationData, GetApiVbyApiVersionSimpleOperationError, GetApiVbyApiVersionSimpleOperationErrors, GetApiVbyApiVersionSimpleOperationResponse, GetApiVbyApiVersionSimpleOperationResponses, GetCallWithOptionalParamData, GetCallWithoutParametersAndResponseData, HeadCallWithoutParametersAndResponseData, Import, ImportData, ImportResponse, ImportResponses, IoK8sApimachineryPkgApisMetaV1DeleteOptions, IoK8sApimachineryPkgApisMetaV1Preconditions, ModelCircle, ModelFromZendesk, ModelSquare, ModelThatExtends, ModelThatExtendsExtends, ModelWithAdditionalPropertiesEqTrue, ModelWithAdditionalPropertiesRef, ModelWithAnyOfConstantSizeArray, ModelWithAnyOfConstantSizeArrayAndIntersect, ModelWithAnyOfConstantSizeArrayNullable, ModelWithAnyOfConstantSizeArrayWithNSizeAndOptions, ModelWithAnyOfConstantSizeArrayWithNSizeAndOptionsWritable, ModelWithArray, ModelWithArrayReadOnlyAndWriteOnly, ModelWithArrayReadOnlyAndWriteOnlyWritable, ModelWithBackticksInDescription, ModelWithBoolean, ModelWithCircularReference, ModelWithConst, ModelWithConstantSizeArray, ModelWithDictionary, ModelWithDuplicateImports, ModelWithDuplicateProperties, ModelWithEnum, ModelWithEnumFromDescription, ModelWithEnumWithHyphen, ModelWithInteger, ModelWithNestedArrayEnums, ModelWithNestedArrayEnumsData, ModelWithNestedArrayEnumsDataBar, ModelWithNestedArrayEnumsDataFoo, ModelWithNestedCompositionEnums, ModelWithNestedEnums, ModelWithNestedProperties, ModelWithNullableObject, ModelWithNullableString, ModelWithNumericEnumUnion, ModelWithOneOfAndProperties, ModelWithOneOfEnum, ModelWithOrderedProperties, ModelWithPattern, ModelWithPatternWritable, ModelWithPrefixItemsConstantSizeArray, ModelWithProperties, ModelWithPropertiesWritable, ModelWithReadOnlyAndWriteOnly, ModelWithReadOnlyAndWriteOnlyWritable, ModelWithReference, ModelWithReferenceWritable, ModelWithString, ModelWithStringError, MultipartRequestData, MultipartResponseData, MultipartResponseResponse, MultipartResponseResponses, NestedAnyOfArraysNullable, NonAsciiæøåÆøÅöôêÊ字符串Data, NonAsciiæøåÆøÅöôêÊ字符串Response, NonAsciiæøåÆøÅöôêÊ字符串Responses, NonAsciiStringæøåÆøÅöôêÊ字符串, NullableObject, OneOfAllOfIssue, OneOfAllOfIssueWritable, OptionsCallWithoutParametersAndResponseData, Pageable, ParameterSimpleParameterUnused, PatchApiVbyApiVersionNoTagData, PatchApiVbyApiVersionNoTagResponses, PatchCallWithoutParametersAndResponseData, PostApiVbyApiVersionFormDataData, PostApiVbyApiVersionRequestBodyData, PostCallWithOptionalParamData, PostCallWithOptionalParamResponse, PostCallWithOptionalParamResponses, PostCallWithoutParametersAndResponseData, PostServiceWithEmptyTagResponse, PostServiceWithEmptyTagResponse2, PutCallWithoutParametersAndResponseData, PutWithFormUrlEncodedData, SchemaWithFormRestrictedKeys, SimpleBoolean, SimpleFile, SimpleFormData, SimpleInteger, SimpleParameter, SimpleReference, SimpleRequestBody, SimpleString, SimpleStringWithPattern, TestErrorCodeData, TestErrorCodeErrors, TestErrorCodeResponses, TypesData, TypesResponse, TypesResponses, UploadFileData, UploadFileResponse, UploadFileResponses, XFooBar } from './types.gen';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/my-client/default/sdk.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport { type Client, formDataBodySerializer, type Options as Options2, type TDataShape, urlSearchParamsBodySerializer } from './client';\nimport { client } from './custom.gen';\nimport type { ApiVVersionODataControllerCountData, ApiVVersionODataControllerCountResponses, CallToTestOrderOfParamsData, CallWithDefaultOptionalParametersData, CallWithDefaultParametersData, CallWithDescriptionsData, CallWithDuplicateResponsesData, CallWithDuplicateResponsesErrors, CallWithDuplicateResponsesResponses, CallWithNoContentResponseData, CallWithNoContentResponseResponses, CallWithParametersData, CallWithResponseAndNoContentResponseData, CallWithResponseAndNoContentResponseResponses, CallWithResponseData, CallWithResponseResponses, CallWithResponsesData, CallWithResponsesErrors, CallWithResponsesResponses, CallWithResultFromHeaderData, CallWithResultFromHeaderErrors, CallWithResultFromHeaderResponses, CallWithWeirdParameterNamesData, CollectionFormatData, ComplexParamsData, ComplexParamsResponses, ComplexTypesData, ComplexTypesErrors, ComplexTypesResponses, DeleteCallWithoutParametersAndResponseData, DeleteFooData3, DeprecatedCallData, DummyAData, DummyAResponses, DummyBData, DummyBResponses, DuplicateName2Data, DuplicateName3Data, DuplicateName4Data, DuplicateNameData, ExportData, FileResponseData, FileResponseResponses, FooWowData, FooWowResponses, GetApiVbyApiVersionSimpleOperationData, GetApiVbyApiVersionSimpleOperationErrors, GetApiVbyApiVersionSimpleOperationResponses, GetCallWithOptionalParamData, GetCallWithoutParametersAndResponseData, HeadCallWithoutParametersAndResponseData, ImportData, ImportResponses, MultipartRequestData, MultipartResponseData, MultipartResponseResponses, NonAsciiæøåÆøÅöôêÊ字符串Data, NonAsciiæøåÆøÅöôêÊ字符串Responses, OptionsCallWithoutParametersAndResponseData, PatchApiVbyApiVersionNoTagData, PatchApiVbyApiVersionNoTagResponses, PatchCallWithoutParametersAndResponseData, PostApiVbyApiVersionFormDataData, PostApiVbyApiVersionRequestBodyData, PostCallWithOptionalParamData, PostCallWithOptionalParamResponses, PostCallWithoutParametersAndResponseData, PutCallWithoutParametersAndResponseData, PutWithFormUrlEncodedData, TestErrorCodeData, TestErrorCodeErrors, TestErrorCodeResponses, TypesData, TypesResponses, UploadFileData, UploadFileResponses } from './types.gen';\n\nexport type Options<TData extends TDataShape = TDataShape, ThrowOnError extends boolean = boolean> = Options2<TData, ThrowOnError> & {\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\nexport const export_ = <ThrowOnError extends boolean = false>(options?: Options<ExportData, ThrowOnError>) => (options?.client ?? client).get<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/no+tag', ...options });\n\nexport const patchApiVbyApiVersionNoTag = <ThrowOnError extends boolean = false>(options?: Options<PatchApiVbyApiVersionNoTagData, ThrowOnError>) => (options?.client ?? client).patch<PatchApiVbyApiVersionNoTagResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/no+tag', ...options });\n\nexport const import_ = <ThrowOnError extends boolean = false>(options: Options<ImportData, ThrowOnError>) => (options.client ?? client).post<ImportResponses, unknown, ThrowOnError>({\n    url: '/api/v{api-version}/no+tag',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options.headers\n    }\n});\n\nexport const fooWow = <ThrowOnError extends boolean = false>(options?: Options<FooWowData, ThrowOnError>) => (options?.client ?? client).put<FooWowResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/no+tag', ...options });\n\nexport const apiVVersionODataControllerCount = <ThrowOnError extends boolean = false>(options?: Options<ApiVVersionODataControllerCountData, ThrowOnError>) => (options?.client ?? client).get<ApiVVersionODataControllerCountResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple/$count', ...options });\n\nexport const getApiVbyApiVersionSimpleOperation = <ThrowOnError extends boolean = false>(options: Options<GetApiVbyApiVersionSimpleOperationData, ThrowOnError>) => (options.client ?? client).get<GetApiVbyApiVersionSimpleOperationResponses, GetApiVbyApiVersionSimpleOperationErrors, ThrowOnError>({ url: '/api/v{api-version}/simple:operation', ...options });\n\nexport const deleteCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<DeleteCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).delete<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const getCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<GetCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).get<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const headCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<HeadCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).head<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const optionsCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<OptionsCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).options<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const patchCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<PatchCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).patch<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const postCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<PostCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).post<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const putCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<PutCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).put<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const deleteFoo = <ThrowOnError extends boolean = false>(options: Options<DeleteFooData3, ThrowOnError>) => (options.client ?? client).delete<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/foo/{foo_param}/bar/{BarParam}', ...options });\n\nexport const callWithDescriptions = <ThrowOnError extends boolean = false>(options?: Options<CallWithDescriptionsData, ThrowOnError>) => (options?.client ?? client).post<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/descriptions', ...options });\n\n/**\n * @deprecated\n */\nexport const deprecatedCall = <ThrowOnError extends boolean = false>(options: Options<DeprecatedCallData, ThrowOnError>) => (options.client ?? client).post<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/parameters/deprecated', ...options });\n\nexport const callWithParameters = <ThrowOnError extends boolean = false>(options: Options<CallWithParametersData, ThrowOnError>) => (options.client ?? client).post<unknown, unknown, ThrowOnError>({\n    url: '/api/v{api-version}/parameters/{parameterPath}',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options.headers\n    }\n});\n\nexport const callWithWeirdParameterNames = <ThrowOnError extends boolean = false>(options: Options<CallWithWeirdParameterNamesData, ThrowOnError>) => (options.client ?? client).post<unknown, unknown, ThrowOnError>({\n    url: '/api/v{api-version}/parameters/{parameter.path.1}/{parameter-path-2}/{PARAMETER-PATH-3}',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options.headers\n    }\n});\n\nexport const getCallWithOptionalParam = <ThrowOnError extends boolean = false>(options: Options<GetCallWithOptionalParamData, ThrowOnError>) => (options.client ?? client).get<unknown, unknown, ThrowOnError>({\n    url: '/api/v{api-version}/parameters',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options.headers\n    }\n});\n\nexport const postCallWithOptionalParam = <ThrowOnError extends boolean = false>(options: Options<PostCallWithOptionalParamData, ThrowOnError>) => (options.client ?? client).post<PostCallWithOptionalParamResponses, unknown, ThrowOnError>({\n    url: '/api/v{api-version}/parameters',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options.headers\n    }\n});\n\nexport const postApiVbyApiVersionRequestBody = <ThrowOnError extends boolean = false>(options?: Options<PostApiVbyApiVersionRequestBodyData, ThrowOnError>) => (options?.client ?? client).post<unknown, unknown, ThrowOnError>({\n    url: '/api/v{api-version}/requestBody',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options?.headers\n    }\n});\n\nexport const postApiVbyApiVersionFormData = <ThrowOnError extends boolean = false>(options?: Options<PostApiVbyApiVersionFormDataData, ThrowOnError>) => (options?.client ?? client).post<unknown, unknown, ThrowOnError>({\n    ...formDataBodySerializer,\n    url: '/api/v{api-version}/formData',\n    ...options,\n    headers: {\n        'Content-Type': null,\n        ...options?.headers\n    }\n});\n\nexport const callWithDefaultParameters = <ThrowOnError extends boolean = false>(options?: Options<CallWithDefaultParametersData, ThrowOnError>) => (options?.client ?? client).get<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/defaults', ...options });\n\nexport const callWithDefaultOptionalParameters = <ThrowOnError extends boolean = false>(options?: Options<CallWithDefaultOptionalParametersData, ThrowOnError>) => (options?.client ?? client).post<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/defaults', ...options });\n\nexport const callToTestOrderOfParams = <ThrowOnError extends boolean = false>(options: Options<CallToTestOrderOfParamsData, ThrowOnError>) => (options.client ?? client).put<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/defaults', ...options });\n\nexport const duplicateName = <ThrowOnError extends boolean = false>(options?: Options<DuplicateNameData, ThrowOnError>) => (options?.client ?? client).delete<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/duplicate', ...options });\n\nexport const duplicateName2 = <ThrowOnError extends boolean = false>(options?: Options<DuplicateName2Data, ThrowOnError>) => (options?.client ?? client).get<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/duplicate', ...options });\n\nexport const duplicateName3 = <ThrowOnError extends boolean = false>(options?: Options<DuplicateName3Data, ThrowOnError>) => (options?.client ?? client).post<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/duplicate', ...options });\n\nexport const duplicateName4 = <ThrowOnError extends boolean = false>(options?: Options<DuplicateName4Data, ThrowOnError>) => (options?.client ?? client).put<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/duplicate', ...options });\n\nexport const callWithNoContentResponse = <ThrowOnError extends boolean = false>(options?: Options<CallWithNoContentResponseData, ThrowOnError>) => (options?.client ?? client).get<CallWithNoContentResponseResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/no-content', ...options });\n\nexport const callWithResponseAndNoContentResponse = <ThrowOnError extends boolean = false>(options?: Options<CallWithResponseAndNoContentResponseData, ThrowOnError>) => (options?.client ?? client).get<CallWithResponseAndNoContentResponseResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/multiple-tags/response-and-no-content', ...options });\n\nexport const dummyA = <ThrowOnError extends boolean = false>(options?: Options<DummyAData, ThrowOnError>) => (options?.client ?? client).get<DummyAResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/multiple-tags/a', ...options });\n\nexport const dummyB = <ThrowOnError extends boolean = false>(options?: Options<DummyBData, ThrowOnError>) => (options?.client ?? client).get<DummyBResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/multiple-tags/b', ...options });\n\nexport const callWithResponse = <ThrowOnError extends boolean = false>(options?: Options<CallWithResponseData, ThrowOnError>) => (options?.client ?? client).get<CallWithResponseResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/response', ...options });\n\nexport const callWithDuplicateResponses = <ThrowOnError extends boolean = false>(options?: Options<CallWithDuplicateResponsesData, ThrowOnError>) => (options?.client ?? client).post<CallWithDuplicateResponsesResponses, CallWithDuplicateResponsesErrors, ThrowOnError>({ url: '/api/v{api-version}/response', ...options });\n\nexport const callWithResponses = <ThrowOnError extends boolean = false>(options?: Options<CallWithResponsesData, ThrowOnError>) => (options?.client ?? client).put<CallWithResponsesResponses, CallWithResponsesErrors, ThrowOnError>({ url: '/api/v{api-version}/response', ...options });\n\nexport const collectionFormat = <ThrowOnError extends boolean = false>(options: Options<CollectionFormatData, ThrowOnError>) => (options.client ?? client).get<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/collectionFormat', ...options });\n\nexport const types = <ThrowOnError extends boolean = false>(options: Options<TypesData, ThrowOnError>) => (options.client ?? client).get<TypesResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/types', ...options });\n\nexport const uploadFile = <ThrowOnError extends boolean = false>(options: Options<UploadFileData, ThrowOnError>) => (options.client ?? client).post<UploadFileResponses, unknown, ThrowOnError>({\n    ...urlSearchParamsBodySerializer,\n    url: '/api/v{api-version}/upload',\n    ...options,\n    headers: {\n        'Content-Type': 'application/x-www-form-urlencoded',\n        ...options.headers\n    }\n});\n\nexport const fileResponse = <ThrowOnError extends boolean = false>(options: Options<FileResponseData, ThrowOnError>) => (options.client ?? client).get<FileResponseResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/file/{id}', ...options });\n\nexport const complexTypes = <ThrowOnError extends boolean = false>(options: Options<ComplexTypesData, ThrowOnError>) => (options.client ?? client).get<ComplexTypesResponses, ComplexTypesErrors, ThrowOnError>({\n    querySerializer: { parameters: { parameterObject: { object: { style: 'form' } } } },\n    url: '/api/v{api-version}/complex',\n    ...options\n});\n\nexport const multipartResponse = <ThrowOnError extends boolean = false>(options?: Options<MultipartResponseData, ThrowOnError>) => (options?.client ?? client).get<MultipartResponseResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/multipart', ...options });\n\nexport const multipartRequest = <ThrowOnError extends boolean = false>(options?: Options<MultipartRequestData, ThrowOnError>) => (options?.client ?? client).post<unknown, unknown, ThrowOnError>({\n    ...formDataBodySerializer,\n    url: '/api/v{api-version}/multipart',\n    ...options,\n    headers: {\n        'Content-Type': null,\n        ...options?.headers\n    }\n});\n\nexport const complexParams = <ThrowOnError extends boolean = false>(options: Options<ComplexParamsData, ThrowOnError>) => (options.client ?? client).put<ComplexParamsResponses, unknown, ThrowOnError>({\n    url: '/api/v{api-version}/complex/{id}',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json-patch+json',\n        ...options.headers\n    }\n});\n\nexport const callWithResultFromHeader = <ThrowOnError extends boolean = false>(options?: Options<CallWithResultFromHeaderData, ThrowOnError>) => (options?.client ?? client).post<CallWithResultFromHeaderResponses, CallWithResultFromHeaderErrors, ThrowOnError>({ url: '/api/v{api-version}/header', ...options });\n\nexport const testErrorCode = <ThrowOnError extends boolean = false>(options: Options<TestErrorCodeData, ThrowOnError>) => (options.client ?? client).post<TestErrorCodeResponses, TestErrorCodeErrors, ThrowOnError>({ url: '/api/v{api-version}/error', ...options });\n\nexport const nonAsciiæøåÆøÅöôêÊ字符串 = <ThrowOnError extends boolean = false>(options: Options<NonAsciiæøåÆøÅöôêÊ字符串Data, ThrowOnError>) => (options.client ?? client).post<NonAsciiæøåÆøÅöôêÊ字符串Responses, unknown, ThrowOnError>({ url: '/api/v{api-version}/non-ascii-æøåÆØÅöôêÊ字符串', ...options });\n\n/**\n * Login User\n */\nexport const putWithFormUrlEncoded = <ThrowOnError extends boolean = false>(options: Options<PutWithFormUrlEncodedData, ThrowOnError>) => (options.client ?? client).put<unknown, unknown, ThrowOnError>({\n    ...urlSearchParamsBodySerializer,\n    url: '/api/v{api-version}/non-ascii-æøåÆØÅöôêÊ字符串',\n    ...options,\n    headers: {\n        'Content-Type': 'application/x-www-form-urlencoded',\n        ...options.headers\n    }\n});\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/my-client/default/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type ClientOptions = {\n    baseUrl: 'http://localhost:3000/base' | (string & {});\n};\n\n/**\n * Model with number-only name\n */\nexport type _400 = string;\n\n/**\n * External ref to shared model (A)\n */\nexport type ExternalRefA = ExternalSharedModel;\n\n/**\n * External ref to shared model (B)\n */\nexport type ExternalRefB = ExternalSharedModel;\n\n/**\n * Testing multiline comments in string: First line\n * Second line\n *\n * Fourth line\n */\nexport type CamelCaseCommentWithBreaks = number;\n\n/**\n * Testing multiline comments in string: First line\n * Second line\n *\n * Fourth line\n */\nexport type CommentWithBreaks = number;\n\n/**\n * Testing backticks in string: `backticks` and ```multiple backticks``` should work\n */\nexport type CommentWithBackticks = number;\n\n/**\n * Testing backticks and quotes in string: `backticks`, 'quotes', \"double quotes\" and ```multiple backticks``` should work\n */\nexport type CommentWithBackticksAndQuotes = number;\n\n/**\n * Testing slashes in string: \\backwards\\\\\\ and /forwards/// should work\n */\nexport type CommentWithSlashes = number;\n\n/**\n * Testing expression placeholders in string: ${expression} should work\n */\nexport type CommentWithExpressionPlaceholders = number;\n\n/**\n * Testing quotes in string: 'single quote''' and \"double quotes\"\"\" should work\n */\nexport type CommentWithQuotes = number;\n\n/**\n * Testing reserved characters in string: * inline * and ** inline ** should work\n */\nexport type CommentWithReservedCharacters = number;\n\n/**\n * This is a simple number\n */\nexport type SimpleInteger = number;\n\n/**\n * This is a simple boolean\n */\nexport type SimpleBoolean = boolean;\n\n/**\n * This is a simple string\n */\nexport type SimpleString = string;\n\n/**\n * A string with non-ascii (unicode) characters valid in typescript identifiers (æøåÆØÅöÔèÈ字符串)\n */\nexport type NonAsciiStringæøåÆøÅöôêÊ字符串 = string;\n\n/**\n * This is a simple file\n */\nexport type SimpleFile = Blob | File;\n\n/**\n * This is a simple reference\n */\nexport type SimpleReference = ModelWithString;\n\n/**\n * This is a simple string\n */\nexport type SimpleStringWithPattern = string | null;\n\n/**\n * This is a simple enum with strings\n */\nexport type EnumWithStrings = 'Success' | 'Warning' | 'Error' | '\\'Single Quote\\'' | '\"Double Quotes\"' | 'Non-ascii: øæåôöØÆÅÔÖ字符串';\n\nexport type EnumWithReplacedCharacters = '\\'Single Quote\\'' | '\"Double Quotes\"' | 'øæåôöØÆÅÔÖ字符串' | 3.1 | '';\n\n/**\n * This is a simple enum with numbers\n */\nexport type EnumWithNumbers = 1 | 2 | 3 | 1.1 | 1.2 | 1.3 | 100 | 200 | 300 | -100 | -200 | -300 | -1.1 | -1.2 | -1.3;\n\n/**\n * Success=1,Warning=2,Error=3\n */\nexport type EnumFromDescription = number;\n\n/**\n * This is a simple enum with numbers\n */\nexport type EnumWithExtensions = 200 | 400 | 500;\n\nexport type EnumWithXEnumNames = 0 | 1 | 2;\n\n/**\n * This is a simple array with numbers\n */\nexport type ArrayWithNumbers = Array<number>;\n\n/**\n * This is a simple array with booleans\n */\nexport type ArrayWithBooleans = Array<boolean>;\n\n/**\n * This is a simple array with strings\n */\nexport type ArrayWithStrings = Array<string>;\n\n/**\n * This is a simple array with references\n */\nexport type ArrayWithReferences = Array<ModelWithString>;\n\n/**\n * This is a simple array containing an array\n */\nexport type ArrayWithArray = Array<Array<ModelWithString>>;\n\n/**\n * This is a simple array with properties\n */\nexport type ArrayWithProperties = Array<{\n    '16x16'?: CamelCaseCommentWithBreaks;\n    bar?: string;\n}>;\n\n/**\n * This is a simple array with any of properties\n */\nexport type ArrayWithAnyOfProperties = Array<{\n    foo?: string;\n} | {\n    bar?: string;\n}>;\n\nexport type AnyOfAnyAndNull = {\n    data?: unknown | null;\n};\n\n/**\n * This is a simple array with any of properties\n */\nexport type AnyOfArrays = {\n    results?: Array<{\n        foo?: string;\n    } | {\n        bar?: string;\n    }>;\n};\n\n/**\n * This is a string dictionary\n */\nexport type DictionaryWithString = {\n    [key: string]: string;\n};\n\nexport type DictionaryWithPropertiesAndAdditionalProperties = {\n    foo?: number;\n    bar?: boolean;\n    [key: string]: string | number | boolean | undefined;\n};\n\n/**\n * This is a string reference\n */\nexport type DictionaryWithReference = {\n    [key: string]: ModelWithString;\n};\n\n/**\n * This is a complex dictionary\n */\nexport type DictionaryWithArray = {\n    [key: string]: Array<ModelWithString>;\n};\n\n/**\n * This is a string dictionary\n */\nexport type DictionaryWithDictionary = {\n    [key: string]: {\n        [key: string]: string;\n    };\n};\n\n/**\n * This is a complex dictionary\n */\nexport type DictionaryWithProperties = {\n    [key: string]: {\n        foo?: string;\n        bar?: string;\n    };\n};\n\n/**\n * This is a model with one number property\n */\nexport type ModelWithInteger = {\n    /**\n     * This is a simple number property\n     */\n    prop?: number;\n};\n\n/**\n * This is a model with one boolean property\n */\nexport type ModelWithBoolean = {\n    /**\n     * This is a simple boolean property\n     */\n    prop?: boolean;\n};\n\n/**\n * This is a model with one string property\n */\nexport type ModelWithString = {\n    /**\n     * This is a simple string property\n     */\n    prop?: string;\n};\n\n/**\n * This is a model with one string property\n */\nexport type ModelWithStringError = {\n    /**\n     * This is a simple string property\n     */\n    prop?: string;\n};\n\n/**\n * `Comment` or `VoiceComment`. The JSON object for adding voice comments to tickets is different. See [Adding voice comments to tickets](/documentation/ticketing/managing-tickets/adding-voice-comments-to-tickets)\n */\nexport type ModelFromZendesk = string;\n\n/**\n * This is a model with one string property\n */\nexport type ModelWithNullableString = {\n    /**\n     * This is a simple string property\n     */\n    nullableProp1?: string | null;\n    /**\n     * This is a simple string property\n     */\n    nullableRequiredProp1: string | null;\n    /**\n     * This is a simple string property\n     */\n    nullableProp2?: string | null;\n    /**\n     * This is a simple string property\n     */\n    nullableRequiredProp2: string | null;\n    /**\n     * This is a simple enum with strings\n     */\n    'foo_bar-enum'?: 'Success' | 'Warning' | 'Error' | 'ØÆÅ字符串';\n};\n\n/**\n * This is a model with one enum\n */\nexport type ModelWithEnum = {\n    /**\n     * This is a simple enum with strings\n     */\n    'foo_bar-enum'?: 'Success' | 'Warning' | 'Error' | 'ØÆÅ字符串';\n    /**\n     * These are the HTTP error code enums\n     */\n    statusCode?: '100' | '200 FOO' | '300 FOO_BAR' | '400 foo-bar' | '500 foo.bar' | '600 foo&bar';\n    /**\n     * Simple boolean enum\n     */\n    bool?: true;\n};\n\n/**\n * This is a model with one enum with escaped name\n */\nexport type ModelWithEnumWithHyphen = {\n    /**\n     * Foo-Bar-Baz-Qux\n     */\n    'foo-bar-baz-qux'?: '3.0';\n};\n\n/**\n * This is a model with one enum\n */\nexport type ModelWithEnumFromDescription = {\n    /**\n     * Success=1,Warning=2,Error=3\n     */\n    test?: number;\n};\n\n/**\n * This is a model with nested enums\n */\nexport type ModelWithNestedEnums = {\n    dictionaryWithEnum?: {\n        [key: string]: 'Success' | 'Warning' | 'Error';\n    };\n    dictionaryWithEnumFromDescription?: {\n        [key: string]: number;\n    };\n    arrayWithEnum?: Array<'Success' | 'Warning' | 'Error'>;\n    arrayWithDescription?: Array<number>;\n    /**\n     * This is a simple enum with strings\n     */\n    'foo_bar-enum'?: 'Success' | 'Warning' | 'Error' | 'ØÆÅ字符串';\n};\n\n/**\n * This is a model with one property containing a reference\n */\nexport type ModelWithReference = {\n    prop?: ModelWithProperties;\n};\n\n/**\n * This is a model with one property containing an array\n */\nexport type ModelWithArrayReadOnlyAndWriteOnly = {\n    prop?: Array<ModelWithReadOnlyAndWriteOnly>;\n    propWithFile?: Array<Blob | File>;\n    propWithNumber?: Array<number>;\n};\n\n/**\n * This is a model with one property containing an array\n */\nexport type ModelWithArray = {\n    prop?: Array<ModelWithString>;\n    propWithFile?: Array<Blob | File>;\n    propWithNumber?: Array<number>;\n};\n\n/**\n * This is a model with one property containing a dictionary\n */\nexport type ModelWithDictionary = {\n    prop?: {\n        [key: string]: string;\n    };\n};\n\n/**\n * This is a deprecated model with a deprecated property\n *\n * @deprecated\n */\nexport type DeprecatedModel = {\n    /**\n     * This is a deprecated property\n     *\n     * @deprecated\n     */\n    prop?: string;\n};\n\n/**\n * This is a model with one property containing a circular reference\n */\nexport type ModelWithCircularReference = {\n    prop?: ModelWithCircularReference;\n};\n\n/**\n * This is a model with one property with a 'one of' relationship\n */\nexport type CompositionWithOneOf = {\n    propA?: ModelWithString | ModelWithEnum | ModelWithArray | ModelWithDictionary;\n};\n\n/**\n * This is a model with one property with a 'one of' relationship where the options are not $ref\n */\nexport type CompositionWithOneOfAnonymous = {\n    propA?: {\n        propA?: string;\n    } | string | number;\n};\n\n/**\n * Circle\n */\nexport type ModelCircle = {\n    kind: string;\n    radius?: number;\n};\n\n/**\n * Square\n */\nexport type ModelSquare = {\n    kind: string;\n    sideLength?: number;\n};\n\n/**\n * This is a model with one property with a 'one of' relationship where the options are not $ref\n */\nexport type CompositionWithOneOfDiscriminator = ({\n    kind: 'circle';\n} & ModelCircle) | ({\n    kind: 'square';\n} & ModelSquare);\n\n/**\n * This is a model with one property with a 'any of' relationship\n */\nexport type CompositionWithAnyOf = {\n    propA?: ModelWithString | ModelWithEnum | ModelWithArray | ModelWithDictionary;\n};\n\n/**\n * This is a model with one property with a 'any of' relationship where the options are not $ref\n */\nexport type CompositionWithAnyOfAnonymous = {\n    propA?: {\n        propA?: string;\n    } | string | number;\n};\n\n/**\n * This is a model with nested 'any of' property with a type null\n */\nexport type CompositionWithNestedAnyAndTypeNull = {\n    propA?: Array<ModelWithDictionary | null> | Array<ModelWithArray | null>;\n};\n\nexport type _3eNum1Период = 'Bird' | 'Dog';\n\nexport type ConstValue = 'ConstValue';\n\n/**\n * This is a model with one property with a 'any of' relationship where the options are not $ref\n */\nexport type CompositionWithNestedAnyOfAndNull = {\n    /**\n     * Scopes\n     */\n    propA?: Array<_3eNum1Период | ConstValue> | null;\n};\n\n/**\n * This is a model with one property with a 'one of' relationship\n */\nexport type CompositionWithOneOfAndNullable = {\n    propA?: {\n        boolean?: boolean;\n    } | ModelWithEnum | ModelWithArray | ModelWithDictionary | null;\n};\n\n/**\n * This is a model that contains a simple dictionary within composition\n */\nexport type CompositionWithOneOfAndSimpleDictionary = {\n    propA?: boolean | {\n        [key: string]: number;\n    };\n};\n\n/**\n * This is a model that contains a dictionary of simple arrays within composition\n */\nexport type CompositionWithOneOfAndSimpleArrayDictionary = {\n    propA?: boolean | {\n        [key: string]: Array<boolean>;\n    };\n};\n\n/**\n * This is a model that contains a dictionary of complex arrays (composited) within composition\n */\nexport type CompositionWithOneOfAndComplexArrayDictionary = {\n    propA?: boolean | {\n        [key: string]: Array<number | string>;\n    };\n};\n\n/**\n * This is a model with one property with a 'all of' relationship\n */\nexport type CompositionWithAllOfAndNullable = {\n    propA?: ({\n        boolean?: boolean;\n    } & ModelWithEnum & ModelWithArray & ModelWithDictionary) | null;\n};\n\n/**\n * This is a model with one property with a 'any of' relationship\n */\nexport type CompositionWithAnyOfAndNullable = {\n    propA?: {\n        boolean?: boolean;\n    } | ModelWithEnum | ModelWithArray | ModelWithDictionary | null;\n};\n\n/**\n * This is a base model with two simple optional properties\n */\nexport type CompositionBaseModel = {\n    firstName?: string;\n    lastname?: string;\n};\n\n/**\n * This is a model that extends the base model\n */\nexport type CompositionExtendedModel = CompositionBaseModel & {\n    age: number;\n    firstName: string;\n    lastname: string;\n};\n\n/**\n * This is a model with one nested property\n */\nexport type ModelWithProperties = {\n    required: string;\n    readonly requiredAndReadOnly: string;\n    requiredAndNullable: string | null;\n    string?: string;\n    number?: number;\n    boolean?: boolean;\n    reference?: ModelWithString;\n    'property with space'?: string;\n    default?: string;\n    try?: string;\n    readonly '@namespace.string'?: string;\n    readonly '@namespace.integer'?: number;\n};\n\n/**\n * This is a model with one nested property\n */\nexport type ModelWithNestedProperties = {\n    readonly first: {\n        readonly second: {\n            readonly third: string | null;\n        } | null;\n    } | null;\n};\n\n/**\n * This is a model with duplicated properties\n */\nexport type ModelWithDuplicateProperties = {\n    prop?: ModelWithString;\n};\n\n/**\n * This is a model with ordered properties\n */\nexport type ModelWithOrderedProperties = {\n    zebra?: string;\n    apple?: string;\n    hawaii?: string;\n};\n\n/**\n * This is a model with duplicated imports\n */\nexport type ModelWithDuplicateImports = {\n    propA?: ModelWithString;\n    propB?: ModelWithString;\n    propC?: ModelWithString;\n};\n\n/**\n * This is a model that extends another model\n */\nexport type ModelThatExtends = ModelWithString & {\n    propExtendsA?: string;\n    propExtendsB?: ModelWithString;\n};\n\n/**\n * This is a model that extends another model\n */\nexport type ModelThatExtendsExtends = ModelWithString & ModelThatExtends & {\n    propExtendsC?: string;\n    propExtendsD?: ModelWithString;\n};\n\n/**\n * This is a model that contains a some patterns\n */\nexport type ModelWithPattern = {\n    key: string;\n    name: string;\n    readonly enabled?: boolean;\n    readonly modified?: string;\n    id?: string;\n    text?: string;\n    patternWithSingleQuotes?: string;\n    patternWithNewline?: string;\n    patternWithBacktick?: string;\n    patternWithUnicode?: string;\n};\n\nexport type File = {\n    /**\n     * Id\n     */\n    readonly id?: string;\n    /**\n     * Updated at\n     */\n    readonly updated_at?: string;\n    /**\n     * Created at\n     */\n    readonly created_at?: string;\n    /**\n     * Mime\n     */\n    mime: string;\n    /**\n     * File\n     */\n    readonly file?: string;\n};\n\nexport type Default = {\n    name?: string;\n};\n\nexport type Pageable = {\n    page?: number;\n    size?: number;\n    sort?: Array<string>;\n};\n\n/**\n * This is a free-form object without additionalProperties.\n */\nexport type FreeFormObjectWithoutAdditionalProperties = {\n    [key: string]: unknown;\n};\n\n/**\n * This is a free-form object with additionalProperties: true.\n */\nexport type FreeFormObjectWithAdditionalPropertiesEqTrue = {\n    [key: string]: unknown;\n};\n\n/**\n * This is a free-form object with additionalProperties: {}.\n */\nexport type FreeFormObjectWithAdditionalPropertiesEqEmptyObject = {\n    [key: string]: unknown;\n};\n\nexport type ModelWithConst = {\n    String?: 'String';\n    number?: 0;\n    null?: null;\n    withType?: 'Some string';\n};\n\n/**\n * This is a model with one property and additionalProperties: true\n */\nexport type ModelWithAdditionalPropertiesEqTrue = {\n    /**\n     * This is a simple string property\n     */\n    prop?: string;\n    [key: string]: unknown;\n};\n\nexport type NestedAnyOfArraysNullable = {\n    nullableArray?: Array<string | boolean> | null;\n};\n\nexport type CompositionWithOneOfAndProperties = ({\n    foo: SimpleParameter;\n} | {\n    bar: NonAsciiStringæøåÆøÅöôêÊ字符串;\n}) & {\n    baz: number | null;\n    qux: number;\n};\n\n/**\n * An object that can be null\n */\nexport type NullableObject = {\n    foo?: string;\n} | null;\n\n/**\n * Some % character\n */\nexport type CharactersInDescription = string;\n\nexport type ModelWithNullableObject = {\n    data?: NullableObject;\n};\n\n/**\n * An object with additional properties that can be null (anyOf ref + null)\n */\nexport type ModelWithAdditionalPropertiesRef = {\n    [key: string]: NullableObject | null;\n};\n\nexport type ModelWithOneOfEnum = {\n    foo: 'Bar';\n} | {\n    foo: 'Baz';\n} | {\n    foo: 'Qux';\n} | {\n    content: string;\n    foo: 'Quux';\n} | {\n    content: [\n        string,\n        string\n    ];\n    foo: 'Corge';\n};\n\nexport type ModelWithNestedArrayEnumsDataFoo = 'foo' | 'bar';\n\nexport type ModelWithNestedArrayEnumsDataBar = 'baz' | 'qux';\n\nexport type ModelWithNestedArrayEnumsData = {\n    foo?: Array<ModelWithNestedArrayEnumsDataFoo>;\n    bar?: Array<ModelWithNestedArrayEnumsDataBar>;\n};\n\nexport type ModelWithNestedArrayEnums = {\n    array_strings?: Array<string>;\n    data?: ModelWithNestedArrayEnumsData;\n};\n\nexport type ModelWithNestedCompositionEnums = {\n    foo?: ModelWithNestedArrayEnumsDataFoo;\n};\n\nexport type ModelWithReadOnlyAndWriteOnly = {\n    foo: string;\n    readonly bar: string;\n};\n\nexport type ModelWithConstantSizeArray = [\n    number,\n    number\n];\n\nexport type ModelWithAnyOfConstantSizeArray = [\n    number | string,\n    number | string,\n    number | string\n];\n\nexport type ModelWithPrefixItemsConstantSizeArray = [\n    ModelWithInteger,\n    number | string,\n    string\n];\n\nexport type ModelWithAnyOfConstantSizeArrayNullable = [\n    number | null | string,\n    number | null | string,\n    number | null | string\n];\n\nexport type ModelWithAnyOfConstantSizeArrayWithNSizeAndOptions = [\n    number | Import,\n    number | Import\n];\n\nexport type ModelWithAnyOfConstantSizeArrayAndIntersect = [\n    number & string,\n    number & string\n];\n\nexport type ModelWithNumericEnumUnion = {\n    /**\n     * Период\n     */\n    value?: -10 | -1 | 0 | 1 | 3 | 6 | 12;\n};\n\n/**\n * Some description with `back ticks`\n */\nexport type ModelWithBackticksInDescription = {\n    /**\n     * The template `that` should be used for parsing and importing the contents of the CSV file.\n     *\n     * <br/><p>There is one placeholder currently supported:<ul>     <li><b>${x}</b> - refers to the n-th column in the CSV file, e.g. ${1}, ${2}, ...)</li></ul><p>Example of a correct JSON template:</p>\n     * <pre>\n     * [\n     * {\n     * \"resourceType\": \"Asset\",\n     * \"identifier\": {\n     * \"name\": \"${1}\",\n     * \"domain\": {\n     * \"name\": \"${2}\",\n     * \"community\": {\n     * \"name\": \"Some Community\"\n     * }\n     * }\n     * },\n     * \"attributes\" : {\n     * \"00000000-0000-0000-0000-000000003115\" : [ {\n     * \"value\" : \"${3}\"\n     * } ],\n     * \"00000000-0000-0000-0000-000000000222\" : [ {\n     * \"value\" : \"${4}\"\n     * } ]\n     * }\n     * }\n     * ]\n     * </pre>\n     */\n    template?: string;\n};\n\nexport type ModelWithOneOfAndProperties = (SimpleParameter | NonAsciiStringæøåÆøÅöôêÊ字符串) & {\n    baz: number | null;\n    qux: number;\n};\n\n/**\n * Model used to test deduplication strategy (unused)\n */\nexport type ParameterSimpleParameterUnused = string;\n\n/**\n * Model used to test deduplication strategy\n */\nexport type PostServiceWithEmptyTagResponse = string;\n\n/**\n * Model used to test deduplication strategy\n */\nexport type PostServiceWithEmptyTagResponse2 = string;\n\n/**\n * Model used to test deduplication strategy\n */\nexport type DeleteFooData = string;\n\n/**\n * Model used to test deduplication strategy\n */\nexport type DeleteFooData2 = string;\n\n/**\n * Model with restricted keyword name\n */\nexport type Import = string;\n\nexport type SchemaWithFormRestrictedKeys = {\n    description?: string;\n    'x-enum-descriptions'?: string;\n    'x-enum-varnames'?: string;\n    'x-enumNames'?: string;\n    title?: string;\n    object?: {\n        description?: string;\n        'x-enum-descriptions'?: string;\n        'x-enum-varnames'?: string;\n        'x-enumNames'?: string;\n        title?: string;\n    };\n    array?: Array<{\n        description?: string;\n        'x-enum-descriptions'?: string;\n        'x-enum-varnames'?: string;\n        'x-enumNames'?: string;\n        title?: string;\n    }>;\n};\n\n/**\n * This schema was giving PascalCase transformations a hard time\n */\nexport type IoK8sApimachineryPkgApisMetaV1DeleteOptions = {\n    /**\n     * Must be fulfilled before a deletion is carried out. If not possible, a 409 Conflict status will be returned.\n     */\n    preconditions?: IoK8sApimachineryPkgApisMetaV1Preconditions;\n};\n\n/**\n * This schema was giving PascalCase transformations a hard time\n */\nexport type IoK8sApimachineryPkgApisMetaV1Preconditions = {\n    /**\n     * Specifies the target ResourceVersion\n     */\n    resourceVersion?: string;\n    /**\n     * Specifies the target UID.\n     */\n    uid?: string;\n};\n\nexport type AdditionalPropertiesUnknownIssue = {\n    [key: string]: string | number;\n};\n\nexport type AdditionalPropertiesUnknownIssue2 = {\n    [key: string]: string | number;\n};\n\nexport type AdditionalPropertiesUnknownIssue3 = string & {\n    entries: {\n        [key: string]: AdditionalPropertiesUnknownIssue;\n    };\n};\n\nexport type AdditionalPropertiesIntegerIssue = {\n    value: number;\n    [key: string]: number;\n};\n\nexport type OneOfAllOfIssue = ((ConstValue | GenericSchemaDuplicateIssue1SystemBoolean) & _3eNum1Период) | GenericSchemaDuplicateIssue1SystemString;\n\nexport type GenericSchemaDuplicateIssue1SystemBoolean = {\n    item?: boolean;\n    error?: string | null;\n    readonly hasError?: boolean;\n    data?: {\n        [key: string]: never;\n    };\n};\n\nexport type GenericSchemaDuplicateIssue1SystemString = {\n    item?: string | null;\n    error?: string | null;\n    readonly hasError?: boolean;\n};\n\nexport type ExternalSharedModel = {\n    id: string;\n    name?: string;\n};\n\n/**\n * This is a model with one property containing a reference\n */\nexport type ModelWithReferenceWritable = {\n    prop?: ModelWithPropertiesWritable;\n};\n\n/**\n * This is a model with one property containing an array\n */\nexport type ModelWithArrayReadOnlyAndWriteOnlyWritable = {\n    prop?: Array<ModelWithReadOnlyAndWriteOnlyWritable>;\n    propWithFile?: Array<Blob | File>;\n    propWithNumber?: Array<number>;\n};\n\n/**\n * This is a model with one nested property\n */\nexport type ModelWithPropertiesWritable = {\n    required: string;\n    requiredAndNullable: string | null;\n    string?: string;\n    number?: number;\n    boolean?: boolean;\n    reference?: ModelWithString;\n    'property with space'?: string;\n    default?: string;\n    try?: string;\n};\n\n/**\n * This is a model that contains a some patterns\n */\nexport type ModelWithPatternWritable = {\n    key: string;\n    name: string;\n    id?: string;\n    text?: string;\n    patternWithSingleQuotes?: string;\n    patternWithNewline?: string;\n    patternWithBacktick?: string;\n    patternWithUnicode?: string;\n};\n\nexport type FileWritable = {\n    /**\n     * Mime\n     */\n    mime: string;\n};\n\nexport type ModelWithReadOnlyAndWriteOnlyWritable = {\n    foo: string;\n    baz: string;\n};\n\nexport type ModelWithAnyOfConstantSizeArrayWithNSizeAndOptionsWritable = [\n    number | Import,\n    number | Import\n];\n\nexport type AdditionalPropertiesUnknownIssueWritable = {\n    [key: string]: string | number;\n};\n\nexport type OneOfAllOfIssueWritable = ((ConstValue | GenericSchemaDuplicateIssue1SystemBoolean) & _3eNum1Период) | GenericSchemaDuplicateIssue1SystemString;\n\nexport type GenericSchemaDuplicateIssue1SystemBooleanWritable = {\n    item?: boolean;\n    error?: string | null;\n    data?: {\n        [key: string]: never;\n    };\n};\n\nexport type GenericSchemaDuplicateIssue1SystemStringWritable = {\n    item?: string | null;\n    error?: string | null;\n};\n\n/**\n * This is a reusable parameter\n */\nexport type SimpleParameter = string;\n\n/**\n * Parameter with illegal characters\n */\nexport type XFooBar = ModelWithString;\n\n/**\n * A reusable request body\n */\nexport type SimpleRequestBody = ModelWithString;\n\n/**\n * A reusable request body\n */\nexport type SimpleFormData = ModelWithString;\n\nexport type ExportData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no+tag';\n};\n\nexport type PatchApiVbyApiVersionNoTagData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no+tag';\n};\n\nexport type PatchApiVbyApiVersionNoTagResponses = {\n    /**\n     * OK\n     */\n    default: unknown;\n};\n\nexport type ImportData = {\n    body: ModelWithReadOnlyAndWriteOnlyWritable | ModelWithArrayReadOnlyAndWriteOnlyWritable;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no+tag';\n};\n\nexport type ImportResponses = {\n    /**\n     * Success\n     */\n    200: ModelFromZendesk;\n    /**\n     * Default success response\n     */\n    default: ModelWithReadOnlyAndWriteOnly;\n};\n\nexport type ImportResponse = ImportResponses[keyof ImportResponses];\n\nexport type FooWowData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no+tag';\n};\n\nexport type FooWowResponses = {\n    /**\n     * OK\n     */\n    default: unknown;\n};\n\nexport type ApiVVersionODataControllerCountData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple/$count';\n};\n\nexport type ApiVVersionODataControllerCountResponses = {\n    /**\n     * Success\n     */\n    200: ModelFromZendesk;\n};\n\nexport type ApiVVersionODataControllerCountResponse = ApiVVersionODataControllerCountResponses[keyof ApiVVersionODataControllerCountResponses];\n\nexport type GetApiVbyApiVersionSimpleOperationData = {\n    body?: never;\n    path: {\n        /**\n         * foo in method\n         */\n        foo_param: string;\n    };\n    query?: never;\n    url: '/api/v{api-version}/simple:operation';\n};\n\nexport type GetApiVbyApiVersionSimpleOperationErrors = {\n    /**\n     * Default error response\n     */\n    default: ModelWithBoolean;\n};\n\nexport type GetApiVbyApiVersionSimpleOperationError = GetApiVbyApiVersionSimpleOperationErrors[keyof GetApiVbyApiVersionSimpleOperationErrors];\n\nexport type GetApiVbyApiVersionSimpleOperationResponses = {\n    /**\n     * Response is a simple number\n     */\n    200: number;\n};\n\nexport type GetApiVbyApiVersionSimpleOperationResponse = GetApiVbyApiVersionSimpleOperationResponses[keyof GetApiVbyApiVersionSimpleOperationResponses];\n\nexport type DeleteCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type GetCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type HeadCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type OptionsCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type PatchCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type PostCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type PutCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type DeleteFooData3 = {\n    body?: never;\n    headers: {\n        /**\n         * Parameter with illegal characters\n         */\n        'x-Foo-Bar': ModelWithString;\n    };\n    path: {\n        /**\n         * foo in method\n         */\n        foo_param: string;\n        /**\n         * bar in method\n         */\n        BarParam: string;\n    };\n    query?: never;\n    url: '/api/v{api-version}/foo/{foo_param}/bar/{BarParam}';\n};\n\nexport type CallWithDescriptionsData = {\n    body?: never;\n    path?: never;\n    query?: {\n        /**\n         * Testing multiline comments in string: First line\n         * Second line\n         *\n         * Fourth line\n         */\n        parameterWithBreaks?: string;\n        /**\n         * Testing backticks in string: `backticks` and ```multiple backticks``` should work\n         */\n        parameterWithBackticks?: string;\n        /**\n         * Testing slashes in string: \\backwards\\\\\\ and /forwards/// should work\n         */\n        parameterWithSlashes?: string;\n        /**\n         * Testing expression placeholders in string: ${expression} should work\n         */\n        parameterWithExpressionPlaceholders?: string;\n        /**\n         * Testing quotes in string: 'single quote''' and \"double quotes\"\"\" should work\n         */\n        parameterWithQuotes?: string;\n        /**\n         * Testing reserved characters in string: * inline * and ** inline ** should work\n         */\n        parameterWithReservedCharacters?: string;\n    };\n    url: '/api/v{api-version}/descriptions';\n};\n\nexport type DeprecatedCallData = {\n    body?: never;\n    headers: {\n        /**\n         * This parameter is deprecated\n         *\n         * @deprecated\n         */\n        parameter: DeprecatedModel | null;\n    };\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/parameters/deprecated';\n};\n\nexport type CallWithParametersData = {\n    /**\n     * This is the parameter that goes into the body\n     */\n    body: {\n        [key: string]: unknown;\n    } | null;\n    headers: {\n        /**\n         * This is the parameter that goes into the header\n         */\n        parameterHeader: string | null;\n    };\n    path: {\n        /**\n         * This is the parameter that goes into the path\n         */\n        parameterPath: string | null;\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string | null;\n    };\n    query: {\n        foo_ref_enum?: ModelWithNestedArrayEnumsDataFoo;\n        foo_all_of_enum: ModelWithNestedArrayEnumsDataFoo;\n        /**\n         * This is the parameter that goes into the query params\n         */\n        cursor: string | null;\n    };\n    url: '/api/v{api-version}/parameters/{parameterPath}';\n};\n\nexport type CallWithWeirdParameterNamesData = {\n    /**\n     * This is the parameter that goes into the body\n     */\n    body: ModelWithString | null;\n    headers: {\n        /**\n         * This is the parameter that goes into the request header\n         */\n        'parameter.header': string | null;\n    };\n    path: {\n        /**\n         * This is the parameter that goes into the path\n         */\n        'parameter.path.1'?: string;\n        /**\n         * This is the parameter that goes into the path\n         */\n        'parameter-path-2'?: string;\n        /**\n         * This is the parameter that goes into the path\n         */\n        'PARAMETER-PATH-3'?: string;\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string | null;\n    };\n    query: {\n        /**\n         * This is the parameter with a reserved keyword\n         */\n        default?: string;\n        /**\n         * This is the parameter that goes into the request query params\n         */\n        'parameter-query': string | null;\n    };\n    url: '/api/v{api-version}/parameters/{parameter.path.1}/{parameter-path-2}/{PARAMETER-PATH-3}';\n};\n\nexport type GetCallWithOptionalParamData = {\n    /**\n     * This is a required parameter\n     */\n    body: ModelWithOneOfEnum;\n    path?: never;\n    query?: {\n        /**\n         * This is an optional parameter\n         */\n        page?: number;\n    };\n    url: '/api/v{api-version}/parameters';\n};\n\nexport type PostCallWithOptionalParamData = {\n    /**\n     * This is an optional parameter\n     */\n    body?: {\n        offset?: number | null;\n    };\n    path?: never;\n    query: {\n        /**\n         * This is a required parameter\n         */\n        parameter: Pageable;\n    };\n    url: '/api/v{api-version}/parameters';\n};\n\nexport type PostCallWithOptionalParamResponses = {\n    /**\n     * Response is a simple number\n     */\n    200: number;\n    /**\n     * Success\n     */\n    204: void;\n};\n\nexport type PostCallWithOptionalParamResponse = PostCallWithOptionalParamResponses[keyof PostCallWithOptionalParamResponses];\n\nexport type PostApiVbyApiVersionRequestBodyData = {\n    /**\n     * A reusable request body\n     */\n    body?: SimpleRequestBody;\n    path?: never;\n    query?: {\n        /**\n         * This is a reusable parameter\n         */\n        parameter?: string;\n    };\n    url: '/api/v{api-version}/requestBody';\n};\n\nexport type PostApiVbyApiVersionFormDataData = {\n    /**\n     * A reusable request body\n     */\n    body?: SimpleFormData;\n    path?: never;\n    query?: {\n        /**\n         * This is a reusable parameter\n         */\n        parameter?: string;\n    };\n    url: '/api/v{api-version}/formData';\n};\n\nexport type CallWithDefaultParametersData = {\n    body?: never;\n    path?: never;\n    query?: {\n        /**\n         * This is a simple string with default value\n         */\n        parameterString?: string | null;\n        /**\n         * This is a simple number with default value\n         */\n        parameterNumber?: number | null;\n        /**\n         * This is a simple boolean with default value\n         */\n        parameterBoolean?: boolean | null;\n        /**\n         * This is a simple enum with default value\n         */\n        parameterEnum?: 'Success' | 'Warning' | 'Error';\n        /**\n         * This is a simple model with default value\n         */\n        parameterModel?: ModelWithString | null;\n    };\n    url: '/api/v{api-version}/defaults';\n};\n\nexport type CallWithDefaultOptionalParametersData = {\n    body?: never;\n    path?: never;\n    query?: {\n        /**\n         * This is a simple string that is optional with default value\n         */\n        parameterString?: string;\n        /**\n         * This is a simple number that is optional with default value\n         */\n        parameterNumber?: number;\n        /**\n         * This is a simple boolean that is optional with default value\n         */\n        parameterBoolean?: boolean;\n        /**\n         * This is a simple enum that is optional with default value\n         */\n        parameterEnum?: 'Success' | 'Warning' | 'Error';\n        /**\n         * This is a simple model that is optional with default value\n         */\n        parameterModel?: ModelWithString;\n    };\n    url: '/api/v{api-version}/defaults';\n};\n\nexport type CallToTestOrderOfParamsData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * This is a optional string with default\n         */\n        parameterOptionalStringWithDefault?: string;\n        /**\n         * This is a optional string with empty default\n         */\n        parameterOptionalStringWithEmptyDefault?: string;\n        /**\n         * This is a optional string with no default\n         */\n        parameterOptionalStringWithNoDefault?: string;\n        /**\n         * This is a string with default\n         */\n        parameterStringWithDefault: string;\n        /**\n         * This is a string with empty default\n         */\n        parameterStringWithEmptyDefault: string;\n        /**\n         * This is a string with no default\n         */\n        parameterStringWithNoDefault: string;\n        /**\n         * This is a string that can be null with no default\n         */\n        parameterStringNullableWithNoDefault?: string | null;\n        /**\n         * This is a string that can be null with default\n         */\n        parameterStringNullableWithDefault?: string | null;\n    };\n    url: '/api/v{api-version}/defaults';\n};\n\nexport type DuplicateNameData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/duplicate';\n};\n\nexport type DuplicateName2Data = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/duplicate';\n};\n\nexport type DuplicateName3Data = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/duplicate';\n};\n\nexport type DuplicateName4Data = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/duplicate';\n};\n\nexport type CallWithNoContentResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no-content';\n};\n\nexport type CallWithNoContentResponseResponses = {\n    /**\n     * Success\n     */\n    204: void;\n};\n\nexport type CallWithNoContentResponseResponse = CallWithNoContentResponseResponses[keyof CallWithNoContentResponseResponses];\n\nexport type CallWithResponseAndNoContentResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multiple-tags/response-and-no-content';\n};\n\nexport type CallWithResponseAndNoContentResponseResponses = {\n    /**\n     * Response is a simple number\n     */\n    200: number;\n    /**\n     * Success\n     */\n    204: void;\n};\n\nexport type CallWithResponseAndNoContentResponseResponse = CallWithResponseAndNoContentResponseResponses[keyof CallWithResponseAndNoContentResponseResponses];\n\nexport type DummyAData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multiple-tags/a';\n};\n\nexport type DummyAResponses = {\n    200: _400;\n};\n\nexport type DummyAResponse = DummyAResponses[keyof DummyAResponses];\n\nexport type DummyBData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multiple-tags/b';\n};\n\nexport type DummyBResponses = {\n    /**\n     * Success\n     */\n    204: void;\n};\n\nexport type DummyBResponse = DummyBResponses[keyof DummyBResponses];\n\nexport type CallWithResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/response';\n};\n\nexport type CallWithResponseResponses = {\n    default: Import;\n};\n\nexport type CallWithResponseResponse = CallWithResponseResponses[keyof CallWithResponseResponses];\n\nexport type CallWithDuplicateResponsesData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/response';\n};\n\nexport type CallWithDuplicateResponsesErrors = {\n    /**\n     * Message for 500 error\n     */\n    500: ModelWithStringError;\n    /**\n     * Message for 501 error\n     */\n    501: ModelWithStringError;\n    /**\n     * Message for 502 error\n     */\n    502: ModelWithStringError;\n    /**\n     * Message for 4XX errors\n     */\n    '4XX': DictionaryWithArray;\n    /**\n     * Default error response\n     */\n    default: ModelWithBoolean;\n};\n\nexport type CallWithDuplicateResponsesError = CallWithDuplicateResponsesErrors[keyof CallWithDuplicateResponsesErrors];\n\nexport type CallWithDuplicateResponsesResponses = {\n    /**\n     * Message for 200 response\n     */\n    200: ModelWithBoolean & ModelWithInteger;\n    /**\n     * Message for 201 response\n     */\n    201: ModelWithString;\n    /**\n     * Message for 202 response\n     */\n    202: ModelWithString;\n};\n\nexport type CallWithDuplicateResponsesResponse = CallWithDuplicateResponsesResponses[keyof CallWithDuplicateResponsesResponses];\n\nexport type CallWithResponsesData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/response';\n};\n\nexport type CallWithResponsesErrors = {\n    /**\n     * Message for 500 error\n     */\n    500: ModelWithStringError;\n    /**\n     * Message for 501 error\n     */\n    501: ModelWithStringError;\n    /**\n     * Message for 502 error\n     */\n    502: ModelWithStringError;\n    /**\n     * Message for default response\n     */\n    default: ModelWithStringError;\n};\n\nexport type CallWithResponsesError = CallWithResponsesErrors[keyof CallWithResponsesErrors];\n\nexport type CallWithResponsesResponses = {\n    /**\n     * Message for 200 response\n     */\n    200: {\n        readonly '@namespace.string'?: string;\n        readonly '@namespace.integer'?: number;\n        readonly value?: Array<ModelWithString>;\n    };\n    /**\n     * Message for 201 response\n     */\n    201: ModelThatExtends;\n    /**\n     * Message for 202 response\n     */\n    202: ModelThatExtendsExtends;\n};\n\nexport type CallWithResponsesResponse = CallWithResponsesResponses[keyof CallWithResponsesResponses];\n\nexport type CollectionFormatData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * This is an array parameter that is sent as csv format (comma-separated values)\n         */\n        parameterArrayCSV: Array<string> | null;\n        /**\n         * This is an array parameter that is sent as ssv format (space-separated values)\n         */\n        parameterArraySSV: Array<string> | null;\n        /**\n         * This is an array parameter that is sent as tsv format (tab-separated values)\n         */\n        parameterArrayTSV: Array<string> | null;\n        /**\n         * This is an array parameter that is sent as pipes format (pipe-separated values)\n         */\n        parameterArrayPipes: Array<string> | null;\n        /**\n         * This is an array parameter that is sent as multi format (multiple parameter instances)\n         */\n        parameterArrayMulti: Array<string> | null;\n    };\n    url: '/api/v{api-version}/collectionFormat';\n};\n\nexport type TypesData = {\n    body?: never;\n    path?: {\n        /**\n         * This is a number parameter\n         */\n        id?: number;\n    };\n    query: {\n        /**\n         * This is a number parameter\n         */\n        parameterNumber: number;\n        /**\n         * This is a string parameter\n         */\n        parameterString: string | null;\n        /**\n         * This is a boolean parameter\n         */\n        parameterBoolean: boolean | null;\n        /**\n         * This is an object parameter\n         */\n        parameterObject: {\n            [key: string]: unknown;\n        } | null;\n        /**\n         * This is an array parameter\n         */\n        parameterArray: Array<string> | null;\n        /**\n         * This is a dictionary parameter\n         */\n        parameterDictionary: {\n            [key: string]: unknown;\n        } | null;\n        /**\n         * This is an enum parameter\n         */\n        parameterEnum: 'Success' | 'Warning' | 'Error' | null;\n    };\n    url: '/api/v{api-version}/types';\n};\n\nexport type TypesResponses = {\n    /**\n     * Response is a simple number\n     */\n    200: number;\n    /**\n     * Response is a simple string\n     */\n    201: string;\n    /**\n     * Response is a simple boolean\n     */\n    202: boolean;\n    /**\n     * Response is a simple object\n     */\n    203: {\n        [key: string]: unknown;\n    };\n};\n\nexport type TypesResponse = TypesResponses[keyof TypesResponses];\n\nexport type UploadFileData = {\n    body: Blob | File;\n    path: {\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string | null;\n    };\n    query?: never;\n    url: '/api/v{api-version}/upload';\n};\n\nexport type UploadFileResponses = {\n    200: boolean;\n};\n\nexport type UploadFileResponse = UploadFileResponses[keyof UploadFileResponses];\n\nexport type FileResponseData = {\n    body?: never;\n    path: {\n        id: string;\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string;\n    };\n    query?: never;\n    url: '/api/v{api-version}/file/{id}';\n};\n\nexport type FileResponseResponses = {\n    /**\n     * Success\n     */\n    200: Blob | File;\n};\n\nexport type FileResponseResponse = FileResponseResponses[keyof FileResponseResponses];\n\nexport type ComplexTypesData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * Parameter containing object\n         */\n        parameterObject: {\n            first?: {\n                second?: {\n                    third?: string;\n                };\n            };\n        };\n        /**\n         * Parameter containing reference\n         */\n        parameterReference: ModelWithString;\n    };\n    url: '/api/v{api-version}/complex';\n};\n\nexport type ComplexTypesErrors = {\n    /**\n     * 400 `server` error\n     */\n    400: unknown;\n    /**\n     * 500 server error\n     */\n    500: unknown;\n};\n\nexport type ComplexTypesResponses = {\n    /**\n     * Successful response\n     */\n    200: Array<ModelWithString>;\n};\n\nexport type ComplexTypesResponse = ComplexTypesResponses[keyof ComplexTypesResponses];\n\nexport type MultipartResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multipart';\n};\n\nexport type MultipartResponseResponses = {\n    /**\n     * OK\n     */\n    200: {\n        file?: Blob | File;\n        metadata?: {\n            foo?: string;\n            bar?: string;\n        };\n    };\n};\n\nexport type MultipartResponseResponse = MultipartResponseResponses[keyof MultipartResponseResponses];\n\nexport type MultipartRequestData = {\n    body?: {\n        content?: Blob | File;\n        data?: ModelWithString | null;\n    };\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multipart';\n};\n\nexport type ComplexParamsData = {\n    body?: {\n        readonly key: string | null;\n        name: string | null;\n        enabled?: boolean;\n        type: 'Monkey' | 'Horse' | 'Bird';\n        listOfModels?: Array<ModelWithString> | null;\n        listOfStrings?: Array<string> | null;\n        parameters: ModelWithString | ModelWithEnum | ModelWithArray | ModelWithDictionary;\n        readonly user?: {\n            readonly id?: number;\n            readonly name?: string | null;\n        };\n    };\n    path: {\n        id: number;\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string;\n    };\n    query?: never;\n    url: '/api/v{api-version}/complex/{id}';\n};\n\nexport type ComplexParamsResponses = {\n    /**\n     * Success\n     */\n    200: ModelWithString;\n};\n\nexport type ComplexParamsResponse = ComplexParamsResponses[keyof ComplexParamsResponses];\n\nexport type CallWithResultFromHeaderData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/header';\n};\n\nexport type CallWithResultFromHeaderErrors = {\n    /**\n     * 400 server error\n     */\n    400: unknown;\n    /**\n     * 500 server error\n     */\n    500: unknown;\n};\n\nexport type CallWithResultFromHeaderResponses = {\n    /**\n     * Successful response\n     */\n    200: unknown;\n};\n\nexport type TestErrorCodeData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * Status code to return\n         */\n        status: number;\n    };\n    url: '/api/v{api-version}/error';\n};\n\nexport type TestErrorCodeErrors = {\n    /**\n     * Custom message: Internal Server Error\n     */\n    500: unknown;\n    /**\n     * Custom message: Not Implemented\n     */\n    501: unknown;\n    /**\n     * Custom message: Bad Gateway\n     */\n    502: unknown;\n    /**\n     * Custom message: Service Unavailable\n     */\n    503: unknown;\n};\n\nexport type TestErrorCodeResponses = {\n    /**\n     * Custom message: Successful response\n     */\n    200: unknown;\n};\n\nexport type NonAsciiæøåÆøÅöôêÊ字符串Data = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * Dummy input param\n         */\n        nonAsciiParamæøåÆØÅöôêÊ: number;\n    };\n    url: '/api/v{api-version}/non-ascii-æøåÆØÅöôêÊ字符串';\n};\n\nexport type NonAsciiæøåÆøÅöôêÊ字符串Responses = {\n    /**\n     * Successful response\n     */\n    200: Array<NonAsciiStringæøåÆøÅöôêÊ字符串>;\n};\n\nexport type NonAsciiæøåÆøÅöôêÊ字符串Response = NonAsciiæøåÆøÅöôêÊ字符串Responses[keyof NonAsciiæøåÆøÅöôêÊ字符串Responses];\n\nexport type PutWithFormUrlEncodedData = {\n    body: ArrayWithStrings;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/non-ascii-æøåÆØÅöôêÊ字符串';\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/my-client/sdk-client-optional/client/client.ts",
    "content": "import type { Client, Config, RequestOptions } from './types';\nimport {\n  buildUrl,\n  createConfig,\n  createInterceptors,\n  getParseAs,\n  mergeConfigs,\n  mergeHeaders,\n  setAuthParams,\n} from './utils';\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, RequestOptions>();\n\n  // @ts-expect-error\n  const request: Client['request'] = async (options) => {\n    const opts = {\n      ..._config,\n      ...options,\n      fetch: options.fetch ?? _config.fetch ?? globalThis.fetch,\n      headers: mergeHeaders(_config.headers, options.headers),\n    };\n\n    if (opts.security) {\n      await setAuthParams({\n        ...opts,\n        security: opts.security,\n      });\n    }\n\n    if (opts.body && opts.bodySerializer) {\n      opts.body = opts.bodySerializer(opts.body);\n    }\n\n    // remove Content-Type header if body is empty to avoid sending invalid requests\n    if (opts.body === undefined || opts.body === '') {\n      opts.headers.delete('Content-Type');\n    }\n\n    const url = buildUrl(opts);\n    const requestInit: ReqInit = {\n      redirect: 'follow',\n      ...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 = await _fetch(request);\n\n    for (const fn of interceptors.response.fns) {\n      if (fn) {\n        response = await fn(response, request, opts);\n      }\n    }\n\n    const result = {\n      request,\n      response,\n    };\n\n    if (response.ok) {\n      if (response.status === 204 || response.headers.get('Content-Length') === '0') {\n        return {\n          data: {},\n          ...result,\n        };\n      }\n\n      const parseAs =\n        (opts.parseAs === 'auto'\n          ? getParseAs(response.headers.get('Content-Type'))\n          : opts.parseAs) ?? 'json';\n\n      if (parseAs === 'stream') {\n        return {\n          data: response.body,\n          ...result,\n        };\n      }\n\n      let data = await response[parseAs]();\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 {\n        data,\n        ...result,\n      };\n    }\n\n    let error = await response.text();\n\n    try {\n      error = JSON.parse(error);\n    } catch {\n      // noop\n    }\n\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    return {\n      error: finalError,\n      ...result,\n    };\n  };\n\n  return {\n    buildUrl,\n    connect: (options) => request({ ...options, method: 'CONNECT' }),\n    delete: (options) => request({ ...options, method: 'DELETE' }),\n    get: (options) => request({ ...options, method: 'GET' }),\n    getConfig,\n    head: (options) => request({ ...options, method: 'HEAD' }),\n    interceptors,\n    options: (options) => request({ ...options, method: 'OPTIONS' }),\n    patch: (options) => request({ ...options, method: 'PATCH' }),\n    post: (options) => request({ ...options, method: 'POST' }),\n    put: (options) => request({ ...options, method: 'PUT' }),\n    request,\n    setConfig,\n    trace: (options) => request({ ...options, method: 'TRACE' }),\n  };\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/my-client/sdk-client-optional/client/core/auth.ts",
    "content": "export 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/my-client/sdk-client-optional/client/core/bodySerializer.ts",
    "content": "import type { ArrayStyle, ObjectStyle, SerializerOptions } from './pathSerializer';\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) => {\n  if (typeof value === 'string' || value instanceof Blob) {\n    data.append(key, value);\n  } else {\n    data.append(key, JSON.stringify(value));\n  }\n};\n\nconst serializeUrlSearchParamsPair = (data: URLSearchParams, key: string, value: unknown) => {\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) => {\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) =>\n    JSON.stringify(body, (_key, value) => (typeof value === 'bigint' ? value.toString() : value)),\n};\n\nexport const urlSearchParamsBodySerializer = {\n  bodySerializer: (body: unknown) => {\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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/my-client/sdk-client-optional/client/core/params.ts",
    "content": "type Slot = 'body' | 'headers' | 'path' | 'query';\n\nexport type Field =\n  | {\n      in: Exclude<Slot, 'body'>;\n      key: string;\n      map?: string;\n    }\n  | {\n      in: Extract<Slot, 'body'>;\n      key?: string;\n      map?: string;\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\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 (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' && !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        (params[field.in] as Record<string, unknown>)[name] = arg;\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          const name = field.map || key;\n          (params[field.in] as Record<string, unknown>)[name] = value;\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 {\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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/my-client/sdk-client-optional/client/core/pathSerializer.ts",
    "content": "interface 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/my-client/sdk-client-optional/client/core/types.ts",
    "content": "import type { Auth, AuthToken } from './auth';\nimport type { BodySerializer, QuerySerializer, QuerySerializerOptions } from './bodySerializer';\n\nexport interface Client<RequestFn = never, Config = unknown, MethodFn = never, BuildUrlFn = never> {\n  /**\n   * Returns the final request URL.\n   */\n  buildUrl: BuildUrlFn;\n  connect: MethodFn;\n  delete: MethodFn;\n  get: MethodFn;\n  getConfig: () => Config;\n  head: MethodFn;\n  options: MethodFn;\n  patch: MethodFn;\n  post: MethodFn;\n  put: MethodFn;\n  request: RequestFn;\n  setConfig: (config: Config) => Config;\n  trace: MethodFn;\n}\n\nexport interface Config {\n  /**\n   * Auth token or a function returning auth token. The resolved value will be\n   * added to the request payload as defined by its `security` array.\n   */\n  auth?: ((auth: Auth) => Promise<AuthToken> | AuthToken) | AuthToken;\n  /**\n   * A function for serializing request body parameter. By default,\n   * {@link JSON.stringify()} will be used.\n   */\n  bodySerializer?: BodySerializer | null;\n  /**\n   * An object containing any HTTP headers that you want to pre-populate your\n   * `Headers` object with.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/Headers/Headers#init See more}\n   */\n  headers?:\n    | RequestInit['headers']\n    | Record<\n        string,\n        string | number | boolean | (string | number | boolean)[] | null | undefined | unknown\n      >;\n  /**\n   * The request method.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/fetch#method See more}\n   */\n  method?: 'CONNECT' | 'DELETE' | 'GET' | 'HEAD' | 'OPTIONS' | 'PATCH' | 'POST' | 'PUT' | 'TRACE';\n  /**\n   * A function for serializing request query parameters. By default, arrays\n   * will be exploded in form style, objects will be exploded in deepObject\n   * style, and reserved characters are percent-encoded.\n   *\n   * This method will have no effect if the native `paramsSerializer()` Axios\n   * API function is used.\n   *\n   * {@link https://swagger.io/docs/specification/serialization/#query View examples}\n   */\n  querySerializer?: QuerySerializer | QuerySerializerOptions;\n  /**\n   * A function transforming response data before it's returned. This is useful\n   * for post-processing data, e.g. converting ISO strings into Date objects.\n   */\n  responseTransformer?: (data: unknown) => Promise<unknown>;\n  /**\n   * A function validating response data. This is useful if you want to ensure\n   * the response conforms to the desired shape, so it can be safely passed to\n   * the transformers and returned to the user.\n   */\n  responseValidator?: (data: unknown) => Promise<unknown>;\n}\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/my-client/sdk-client-optional/client/index.ts",
    "content": "export { createClient } from './client';\nexport type { Auth } from './core/auth';\nexport type { QuerySerializerOptions } from './core/bodySerializer';\nexport {\n  formDataBodySerializer,\n  jsonBodySerializer,\n  urlSearchParamsBodySerializer,\n} from './core/bodySerializer';\nexport type {\n  Client,\n  ClientOptions,\n  Config,\n  CreateClientConfig,\n  Options,\n  RequestOptions,\n  RequestResult,\n  TDataShape,\n} from './types';\nexport { createConfig } from './utils';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/my-client/sdk-client-optional/client/plugin.ts",
    "content": "import {\n  type Client,\n  clientDefaultConfig,\n  clientDefaultMeta,\n  clientPluginHandler,\n  type DefinePlugin,\n  definePluginConfig,\n} from '@hey-api/openapi-ts';\n\nexport type Config = Client.Config & {\n  /**\n   * Plugin name. Must be unique.\n   */\n  name: string;\n};\n\nexport type MyClientPlugin = DefinePlugin<Config, Config>;\n\nexport const defaultConfig: MyClientPlugin['Config'] = {\n  ...clientDefaultMeta,\n  config: clientDefaultConfig,\n  handler: clientPluginHandler as MyClientPlugin['Handler'],\n  name: __filename,\n};\n\n/**\n * Type helper for `my-client` plugin, returns {@link Plugin.Config} object\n */\nexport const myClientPlugin = definePluginConfig(defaultConfig);\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/my-client/sdk-client-optional/client/types.ts",
    "content": "import type { Auth } from './core/auth';\nimport type { Client as CoreClient, Config as CoreConfig } from './core/types';\nimport type { Middleware } from './utils';\n\nexport interface Config<T extends ClientOptions = ClientOptions>\n  extends Omit<RequestInit, 'body' | 'headers' | 'method'>, CoreConfig {\n  /**\n   * Base URL for all requests made by this client.\n   */\n  baseUrl?: T['baseUrl'];\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?: (request: Request) => ReturnType<typeof fetch>;\n  /**\n   * Return the response data parsed in a specified format. By default, `auto`\n   * will infer the appropriate method from the `Content-Type` response header.\n   * You can override this behavior with any of the {@link Body} methods.\n   * Select `stream` if you don't want to parse response data at all.\n   *\n   * @default 'auto'\n   */\n  parseAs?: 'arrayBuffer' | 'auto' | 'blob' | 'formData' | 'json' | 'stream' | 'text';\n  /**\n   * Throw an error instead of returning it in the response?\n   *\n   * @default false\n   */\n  throwOnError?: T['throwOnError'];\n}\n\nexport interface RequestOptions<\n  ThrowOnError extends boolean = boolean,\n  Url extends string = string,\n> extends Config<{\n  throwOnError: ThrowOnError;\n}> {\n  /**\n   * Any body that you want to add to your request.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/fetch#body}\n   */\n  body?: unknown;\n  path?: Record<string, unknown>;\n  query?: Record<string, unknown>;\n  /**\n   * Security mechanism(s) to use for the request.\n   */\n  security?: ReadonlyArray<Auth>;\n  url: Url;\n}\n\nexport type RequestResult<\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = boolean,\n> = ThrowOnError extends true\n  ? Promise<{\n      data: TData;\n      request: Request;\n      response: Response;\n    }>\n  : Promise<\n      ({ data: TData; error: undefined } | { data: undefined; error: TError }) & {\n        request: Request;\n        response: Response;\n      }\n    >;\n\nexport interface ClientOptions {\n  baseUrl?: string;\n  throwOnError?: boolean;\n}\n\ntype MethodFn = <TData = unknown, TError = unknown, ThrowOnError extends boolean = false>(\n  options: Omit<RequestOptions<ThrowOnError>, 'method'>,\n) => RequestResult<TData, TError, ThrowOnError>;\n\ntype RequestFn = <TData = unknown, TError = unknown, ThrowOnError extends boolean = false>(\n  options: Omit<RequestOptions<ThrowOnError>, 'method'> &\n    Pick<Required<RequestOptions<ThrowOnError>>, 'method'>,\n) => RequestResult<TData, TError, ThrowOnError>;\n\ntype BuildUrlFn = <\n  TData extends {\n    body?: unknown;\n    path?: Record<string, unknown>;\n    query?: Record<string, unknown>;\n    url: string;\n  },\n>(\n  options: TData & Options<TData>,\n) => string;\n\nexport type Client = CoreClient<RequestFn, Config, MethodFn, BuildUrlFn> & {\n  interceptors: Middleware<Request, Response, unknown, RequestOptions>;\n};\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 = ClientOptions> = (\n  override?: Config<ClientOptions & T>,\n) => Config<Required<ClientOptions> & T>;\n\nexport interface TDataShape {\n  body?: unknown;\n  headers?: unknown;\n  path?: unknown;\n  query?: unknown;\n  url: string;\n}\n\ntype OmitKeys<T, K> = Pick<T, Exclude<keyof T, K>>;\n\nexport type Options<\n  TData extends TDataShape = TDataShape,\n  ThrowOnError extends boolean = boolean,\n> = OmitKeys<RequestOptions<ThrowOnError>, 'body' | 'path' | 'query' | 'url'> & Omit<TData, 'url'>;\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/my-client/sdk-client-optional/client/utils.ts",
    "content": "import { getAuthToken } from './core/auth';\nimport type { QuerySerializer, QuerySerializerOptions } from './core/bodySerializer';\nimport { jsonBodySerializer } from './core/bodySerializer';\nimport {\n  serializeArrayParam,\n  serializeObjectParam,\n  serializePrimitiveParam,\n} from './core/pathSerializer';\nimport type { Client, ClientOptions, Config, RequestOptions } from './types';\n\ninterface PathSerializer {\n  path: Record<string, unknown>;\n  url: string;\n}\n\nconst PATH_PARAM_RE = /\\{[^{}]+\\}/g;\n\ntype ArrayStyle = 'form' | 'spaceDelimited' | 'pipeDelimited';\ntype MatrixStyle = 'label' | 'matrix' | 'simple';\ntype ArraySeparatorStyle = ArrayStyle | MatrixStyle;\n\nconst 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 createQuerySerializer = <T = unknown>({\n  allowReserved,\n  array,\n  object,\n}: QuerySerializerOptions = {}) => {\n  const querySerializer = (queryParams: T) => {\n    let 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        if (Array.isArray(value)) {\n          search = [\n            ...search,\n            serializeArrayParam({\n              allowReserved,\n              explode: true,\n              name,\n              style: 'form',\n              value,\n              ...array,\n            }),\n          ];\n          continue;\n        }\n\n        if (typeof value === 'object') {\n          search = [\n            ...search,\n            serializeObjectParam({\n              allowReserved,\n              explode: true,\n              name,\n              style: 'deepObject',\n              value: value as Record<string, unknown>,\n              ...object,\n            }),\n          ];\n          continue;\n        }\n\n        search = [\n          ...search,\n          serializePrimitiveParam({\n            allowReserved,\n            name,\n            value: value as string,\n          }),\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\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    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    return;\n  }\n};\n\nexport const buildUrl: Client['buildUrl'] = (options) => {\n  const url = 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  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 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\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 || typeof header !== 'object') {\n      continue;\n    }\n\n    const iterator = header instanceof Headers ? header.entries() : 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/my-client/sdk-client-optional/custom.gen.ts",
    "content": "// 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: 'http://localhost:3000/base' }));\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/my-client/sdk-client-optional/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport { apiVVersionODataControllerCount, callToTestOrderOfParams, callWithDefaultOptionalParameters, callWithDefaultParameters, callWithDescriptions, callWithDuplicateResponses, callWithNoContentResponse, callWithParameters, callWithResponse, callWithResponseAndNoContentResponse, callWithResponses, callWithResultFromHeader, callWithWeirdParameterNames, collectionFormat, complexParams, complexTypes, deleteCallWithoutParametersAndResponse, deleteFoo, deprecatedCall, dummyA, dummyB, duplicateName, duplicateName2, duplicateName3, duplicateName4, export_, fileResponse, fooWow, getApiVbyApiVersionSimpleOperation, getCallWithOptionalParam, getCallWithoutParametersAndResponse, headCallWithoutParametersAndResponse, import_, multipartRequest, multipartResponse, nonAsciiæøåÆøÅöôêÊ字符串, type Options, optionsCallWithoutParametersAndResponse, patchApiVbyApiVersionNoTag, patchCallWithoutParametersAndResponse, postApiVbyApiVersionFormData, postApiVbyApiVersionRequestBody, postCallWithOptionalParam, postCallWithoutParametersAndResponse, putCallWithoutParametersAndResponse, putWithFormUrlEncoded, testErrorCode, types, uploadFile } from './sdk.gen';\nexport type { _3eNum1Период, _400, AdditionalPropertiesIntegerIssue, AdditionalPropertiesUnknownIssue, AdditionalPropertiesUnknownIssue2, AdditionalPropertiesUnknownIssue3, AdditionalPropertiesUnknownIssueWritable, AnyOfAnyAndNull, AnyOfArrays, ApiVVersionODataControllerCountData, ApiVVersionODataControllerCountResponse, ApiVVersionODataControllerCountResponses, ArrayWithAnyOfProperties, ArrayWithArray, ArrayWithBooleans, ArrayWithNumbers, ArrayWithProperties, ArrayWithReferences, ArrayWithStrings, CallToTestOrderOfParamsData, CallWithDefaultOptionalParametersData, CallWithDefaultParametersData, CallWithDescriptionsData, CallWithDuplicateResponsesData, CallWithDuplicateResponsesError, CallWithDuplicateResponsesErrors, CallWithDuplicateResponsesResponse, CallWithDuplicateResponsesResponses, CallWithNoContentResponseData, CallWithNoContentResponseResponse, CallWithNoContentResponseResponses, CallWithParametersData, CallWithResponseAndNoContentResponseData, CallWithResponseAndNoContentResponseResponse, CallWithResponseAndNoContentResponseResponses, CallWithResponseData, CallWithResponseResponse, CallWithResponseResponses, CallWithResponsesData, CallWithResponsesError, CallWithResponsesErrors, CallWithResponsesResponse, CallWithResponsesResponses, CallWithResultFromHeaderData, CallWithResultFromHeaderErrors, CallWithResultFromHeaderResponses, CallWithWeirdParameterNamesData, CamelCaseCommentWithBreaks, CharactersInDescription, ClientOptions, CollectionFormatData, CommentWithBackticks, CommentWithBackticksAndQuotes, CommentWithBreaks, CommentWithExpressionPlaceholders, CommentWithQuotes, CommentWithReservedCharacters, CommentWithSlashes, ComplexParamsData, ComplexParamsResponse, ComplexParamsResponses, ComplexTypesData, ComplexTypesErrors, ComplexTypesResponse, ComplexTypesResponses, CompositionBaseModel, CompositionExtendedModel, CompositionWithAllOfAndNullable, CompositionWithAnyOf, CompositionWithAnyOfAndNullable, CompositionWithAnyOfAnonymous, CompositionWithNestedAnyAndTypeNull, CompositionWithNestedAnyOfAndNull, CompositionWithOneOf, CompositionWithOneOfAndComplexArrayDictionary, CompositionWithOneOfAndNullable, CompositionWithOneOfAndProperties, CompositionWithOneOfAndSimpleArrayDictionary, CompositionWithOneOfAndSimpleDictionary, CompositionWithOneOfAnonymous, CompositionWithOneOfDiscriminator, ConstValue, Default, DeleteCallWithoutParametersAndResponseData, DeleteFooData, DeleteFooData2, DeleteFooData3, DeprecatedCallData, DeprecatedModel, DictionaryWithArray, DictionaryWithDictionary, DictionaryWithProperties, DictionaryWithPropertiesAndAdditionalProperties, DictionaryWithReference, DictionaryWithString, DummyAData, DummyAResponse, DummyAResponses, DummyBData, DummyBResponse, DummyBResponses, DuplicateName2Data, DuplicateName3Data, DuplicateName4Data, DuplicateNameData, EnumFromDescription, EnumWithExtensions, EnumWithNumbers, EnumWithReplacedCharacters, EnumWithStrings, EnumWithXEnumNames, ExportData, ExternalRefA, ExternalRefB, ExternalSharedModel, File, FileResponseData, FileResponseResponse, FileResponseResponses, FileWritable, FooWowData, FooWowResponses, FreeFormObjectWithAdditionalPropertiesEqEmptyObject, FreeFormObjectWithAdditionalPropertiesEqTrue, FreeFormObjectWithoutAdditionalProperties, GenericSchemaDuplicateIssue1SystemBoolean, GenericSchemaDuplicateIssue1SystemBooleanWritable, GenericSchemaDuplicateIssue1SystemString, GenericSchemaDuplicateIssue1SystemStringWritable, GetApiVbyApiVersionSimpleOperationData, GetApiVbyApiVersionSimpleOperationError, GetApiVbyApiVersionSimpleOperationErrors, GetApiVbyApiVersionSimpleOperationResponse, GetApiVbyApiVersionSimpleOperationResponses, GetCallWithOptionalParamData, GetCallWithoutParametersAndResponseData, HeadCallWithoutParametersAndResponseData, Import, ImportData, ImportResponse, ImportResponses, IoK8sApimachineryPkgApisMetaV1DeleteOptions, IoK8sApimachineryPkgApisMetaV1Preconditions, ModelCircle, ModelFromZendesk, ModelSquare, ModelThatExtends, ModelThatExtendsExtends, ModelWithAdditionalPropertiesEqTrue, ModelWithAdditionalPropertiesRef, ModelWithAnyOfConstantSizeArray, ModelWithAnyOfConstantSizeArrayAndIntersect, ModelWithAnyOfConstantSizeArrayNullable, ModelWithAnyOfConstantSizeArrayWithNSizeAndOptions, ModelWithAnyOfConstantSizeArrayWithNSizeAndOptionsWritable, ModelWithArray, ModelWithArrayReadOnlyAndWriteOnly, ModelWithArrayReadOnlyAndWriteOnlyWritable, ModelWithBackticksInDescription, ModelWithBoolean, ModelWithCircularReference, ModelWithConst, ModelWithConstantSizeArray, ModelWithDictionary, ModelWithDuplicateImports, ModelWithDuplicateProperties, ModelWithEnum, ModelWithEnumFromDescription, ModelWithEnumWithHyphen, ModelWithInteger, ModelWithNestedArrayEnums, ModelWithNestedArrayEnumsData, ModelWithNestedArrayEnumsDataBar, ModelWithNestedArrayEnumsDataFoo, ModelWithNestedCompositionEnums, ModelWithNestedEnums, ModelWithNestedProperties, ModelWithNullableObject, ModelWithNullableString, ModelWithNumericEnumUnion, ModelWithOneOfAndProperties, ModelWithOneOfEnum, ModelWithOrderedProperties, ModelWithPattern, ModelWithPatternWritable, ModelWithPrefixItemsConstantSizeArray, ModelWithProperties, ModelWithPropertiesWritable, ModelWithReadOnlyAndWriteOnly, ModelWithReadOnlyAndWriteOnlyWritable, ModelWithReference, ModelWithReferenceWritable, ModelWithString, ModelWithStringError, MultipartRequestData, MultipartResponseData, MultipartResponseResponse, MultipartResponseResponses, NestedAnyOfArraysNullable, NonAsciiæøåÆøÅöôêÊ字符串Data, NonAsciiæøåÆøÅöôêÊ字符串Response, NonAsciiæøåÆøÅöôêÊ字符串Responses, NonAsciiStringæøåÆøÅöôêÊ字符串, NullableObject, OneOfAllOfIssue, OneOfAllOfIssueWritable, OptionsCallWithoutParametersAndResponseData, Pageable, ParameterSimpleParameterUnused, PatchApiVbyApiVersionNoTagData, PatchApiVbyApiVersionNoTagResponses, PatchCallWithoutParametersAndResponseData, PostApiVbyApiVersionFormDataData, PostApiVbyApiVersionRequestBodyData, PostCallWithOptionalParamData, PostCallWithOptionalParamResponse, PostCallWithOptionalParamResponses, PostCallWithoutParametersAndResponseData, PostServiceWithEmptyTagResponse, PostServiceWithEmptyTagResponse2, PutCallWithoutParametersAndResponseData, PutWithFormUrlEncodedData, SchemaWithFormRestrictedKeys, SimpleBoolean, SimpleFile, SimpleFormData, SimpleInteger, SimpleParameter, SimpleReference, SimpleRequestBody, SimpleString, SimpleStringWithPattern, TestErrorCodeData, TestErrorCodeErrors, TestErrorCodeResponses, TypesData, TypesResponse, TypesResponses, UploadFileData, UploadFileResponse, UploadFileResponses, XFooBar } from './types.gen';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/my-client/sdk-client-optional/sdk.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport { type Client, formDataBodySerializer, type Options as Options2, type TDataShape, urlSearchParamsBodySerializer } from './client';\nimport { client } from './custom.gen';\nimport type { ApiVVersionODataControllerCountData, ApiVVersionODataControllerCountResponses, CallToTestOrderOfParamsData, CallWithDefaultOptionalParametersData, CallWithDefaultParametersData, CallWithDescriptionsData, CallWithDuplicateResponsesData, CallWithDuplicateResponsesErrors, CallWithDuplicateResponsesResponses, CallWithNoContentResponseData, CallWithNoContentResponseResponses, CallWithParametersData, CallWithResponseAndNoContentResponseData, CallWithResponseAndNoContentResponseResponses, CallWithResponseData, CallWithResponseResponses, CallWithResponsesData, CallWithResponsesErrors, CallWithResponsesResponses, CallWithResultFromHeaderData, CallWithResultFromHeaderErrors, CallWithResultFromHeaderResponses, CallWithWeirdParameterNamesData, CollectionFormatData, ComplexParamsData, ComplexParamsResponses, ComplexTypesData, ComplexTypesErrors, ComplexTypesResponses, DeleteCallWithoutParametersAndResponseData, DeleteFooData3, DeprecatedCallData, DummyAData, DummyAResponses, DummyBData, DummyBResponses, DuplicateName2Data, DuplicateName3Data, DuplicateName4Data, DuplicateNameData, ExportData, FileResponseData, FileResponseResponses, FooWowData, FooWowResponses, GetApiVbyApiVersionSimpleOperationData, GetApiVbyApiVersionSimpleOperationErrors, GetApiVbyApiVersionSimpleOperationResponses, GetCallWithOptionalParamData, GetCallWithoutParametersAndResponseData, HeadCallWithoutParametersAndResponseData, ImportData, ImportResponses, MultipartRequestData, MultipartResponseData, MultipartResponseResponses, NonAsciiæøåÆøÅöôêÊ字符串Data, NonAsciiæøåÆøÅöôêÊ字符串Responses, OptionsCallWithoutParametersAndResponseData, PatchApiVbyApiVersionNoTagData, PatchApiVbyApiVersionNoTagResponses, PatchCallWithoutParametersAndResponseData, PostApiVbyApiVersionFormDataData, PostApiVbyApiVersionRequestBodyData, PostCallWithOptionalParamData, PostCallWithOptionalParamResponses, PostCallWithoutParametersAndResponseData, PutCallWithoutParametersAndResponseData, PutWithFormUrlEncodedData, TestErrorCodeData, TestErrorCodeErrors, TestErrorCodeResponses, TypesData, TypesResponses, UploadFileData, UploadFileResponses } from './types.gen';\n\nexport type Options<TData extends TDataShape = TDataShape, ThrowOnError extends boolean = boolean> = Options2<TData, ThrowOnError> & {\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\nexport const export_ = <ThrowOnError extends boolean = false>(options?: Options<ExportData, ThrowOnError>) => (options?.client ?? client).get<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/no+tag', ...options });\n\nexport const patchApiVbyApiVersionNoTag = <ThrowOnError extends boolean = false>(options?: Options<PatchApiVbyApiVersionNoTagData, ThrowOnError>) => (options?.client ?? client).patch<PatchApiVbyApiVersionNoTagResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/no+tag', ...options });\n\nexport const import_ = <ThrowOnError extends boolean = false>(options: Options<ImportData, ThrowOnError>) => (options.client ?? client).post<ImportResponses, unknown, ThrowOnError>({\n    url: '/api/v{api-version}/no+tag',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options.headers\n    }\n});\n\nexport const fooWow = <ThrowOnError extends boolean = false>(options?: Options<FooWowData, ThrowOnError>) => (options?.client ?? client).put<FooWowResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/no+tag', ...options });\n\nexport const apiVVersionODataControllerCount = <ThrowOnError extends boolean = false>(options?: Options<ApiVVersionODataControllerCountData, ThrowOnError>) => (options?.client ?? client).get<ApiVVersionODataControllerCountResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple/$count', ...options });\n\nexport const getApiVbyApiVersionSimpleOperation = <ThrowOnError extends boolean = false>(options: Options<GetApiVbyApiVersionSimpleOperationData, ThrowOnError>) => (options.client ?? client).get<GetApiVbyApiVersionSimpleOperationResponses, GetApiVbyApiVersionSimpleOperationErrors, ThrowOnError>({ url: '/api/v{api-version}/simple:operation', ...options });\n\nexport const deleteCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<DeleteCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).delete<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const getCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<GetCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).get<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const headCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<HeadCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).head<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const optionsCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<OptionsCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).options<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const patchCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<PatchCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).patch<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const postCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<PostCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).post<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const putCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<PutCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).put<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const deleteFoo = <ThrowOnError extends boolean = false>(options: Options<DeleteFooData3, ThrowOnError>) => (options.client ?? client).delete<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/foo/{foo_param}/bar/{BarParam}', ...options });\n\nexport const callWithDescriptions = <ThrowOnError extends boolean = false>(options?: Options<CallWithDescriptionsData, ThrowOnError>) => (options?.client ?? client).post<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/descriptions', ...options });\n\n/**\n * @deprecated\n */\nexport const deprecatedCall = <ThrowOnError extends boolean = false>(options: Options<DeprecatedCallData, ThrowOnError>) => (options.client ?? client).post<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/parameters/deprecated', ...options });\n\nexport const callWithParameters = <ThrowOnError extends boolean = false>(options: Options<CallWithParametersData, ThrowOnError>) => (options.client ?? client).post<unknown, unknown, ThrowOnError>({\n    url: '/api/v{api-version}/parameters/{parameterPath}',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options.headers\n    }\n});\n\nexport const callWithWeirdParameterNames = <ThrowOnError extends boolean = false>(options: Options<CallWithWeirdParameterNamesData, ThrowOnError>) => (options.client ?? client).post<unknown, unknown, ThrowOnError>({\n    url: '/api/v{api-version}/parameters/{parameter.path.1}/{parameter-path-2}/{PARAMETER-PATH-3}',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options.headers\n    }\n});\n\nexport const getCallWithOptionalParam = <ThrowOnError extends boolean = false>(options: Options<GetCallWithOptionalParamData, ThrowOnError>) => (options.client ?? client).get<unknown, unknown, ThrowOnError>({\n    url: '/api/v{api-version}/parameters',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options.headers\n    }\n});\n\nexport const postCallWithOptionalParam = <ThrowOnError extends boolean = false>(options: Options<PostCallWithOptionalParamData, ThrowOnError>) => (options.client ?? client).post<PostCallWithOptionalParamResponses, unknown, ThrowOnError>({\n    url: '/api/v{api-version}/parameters',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options.headers\n    }\n});\n\nexport const postApiVbyApiVersionRequestBody = <ThrowOnError extends boolean = false>(options?: Options<PostApiVbyApiVersionRequestBodyData, ThrowOnError>) => (options?.client ?? client).post<unknown, unknown, ThrowOnError>({\n    url: '/api/v{api-version}/requestBody',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options?.headers\n    }\n});\n\nexport const postApiVbyApiVersionFormData = <ThrowOnError extends boolean = false>(options?: Options<PostApiVbyApiVersionFormDataData, ThrowOnError>) => (options?.client ?? client).post<unknown, unknown, ThrowOnError>({\n    ...formDataBodySerializer,\n    url: '/api/v{api-version}/formData',\n    ...options,\n    headers: {\n        'Content-Type': null,\n        ...options?.headers\n    }\n});\n\nexport const callWithDefaultParameters = <ThrowOnError extends boolean = false>(options?: Options<CallWithDefaultParametersData, ThrowOnError>) => (options?.client ?? client).get<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/defaults', ...options });\n\nexport const callWithDefaultOptionalParameters = <ThrowOnError extends boolean = false>(options?: Options<CallWithDefaultOptionalParametersData, ThrowOnError>) => (options?.client ?? client).post<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/defaults', ...options });\n\nexport const callToTestOrderOfParams = <ThrowOnError extends boolean = false>(options: Options<CallToTestOrderOfParamsData, ThrowOnError>) => (options.client ?? client).put<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/defaults', ...options });\n\nexport const duplicateName = <ThrowOnError extends boolean = false>(options?: Options<DuplicateNameData, ThrowOnError>) => (options?.client ?? client).delete<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/duplicate', ...options });\n\nexport const duplicateName2 = <ThrowOnError extends boolean = false>(options?: Options<DuplicateName2Data, ThrowOnError>) => (options?.client ?? client).get<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/duplicate', ...options });\n\nexport const duplicateName3 = <ThrowOnError extends boolean = false>(options?: Options<DuplicateName3Data, ThrowOnError>) => (options?.client ?? client).post<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/duplicate', ...options });\n\nexport const duplicateName4 = <ThrowOnError extends boolean = false>(options?: Options<DuplicateName4Data, ThrowOnError>) => (options?.client ?? client).put<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/duplicate', ...options });\n\nexport const callWithNoContentResponse = <ThrowOnError extends boolean = false>(options?: Options<CallWithNoContentResponseData, ThrowOnError>) => (options?.client ?? client).get<CallWithNoContentResponseResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/no-content', ...options });\n\nexport const callWithResponseAndNoContentResponse = <ThrowOnError extends boolean = false>(options?: Options<CallWithResponseAndNoContentResponseData, ThrowOnError>) => (options?.client ?? client).get<CallWithResponseAndNoContentResponseResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/multiple-tags/response-and-no-content', ...options });\n\nexport const dummyA = <ThrowOnError extends boolean = false>(options?: Options<DummyAData, ThrowOnError>) => (options?.client ?? client).get<DummyAResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/multiple-tags/a', ...options });\n\nexport const dummyB = <ThrowOnError extends boolean = false>(options?: Options<DummyBData, ThrowOnError>) => (options?.client ?? client).get<DummyBResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/multiple-tags/b', ...options });\n\nexport const callWithResponse = <ThrowOnError extends boolean = false>(options?: Options<CallWithResponseData, ThrowOnError>) => (options?.client ?? client).get<CallWithResponseResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/response', ...options });\n\nexport const callWithDuplicateResponses = <ThrowOnError extends boolean = false>(options?: Options<CallWithDuplicateResponsesData, ThrowOnError>) => (options?.client ?? client).post<CallWithDuplicateResponsesResponses, CallWithDuplicateResponsesErrors, ThrowOnError>({ url: '/api/v{api-version}/response', ...options });\n\nexport const callWithResponses = <ThrowOnError extends boolean = false>(options?: Options<CallWithResponsesData, ThrowOnError>) => (options?.client ?? client).put<CallWithResponsesResponses, CallWithResponsesErrors, ThrowOnError>({ url: '/api/v{api-version}/response', ...options });\n\nexport const collectionFormat = <ThrowOnError extends boolean = false>(options: Options<CollectionFormatData, ThrowOnError>) => (options.client ?? client).get<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/collectionFormat', ...options });\n\nexport const types = <ThrowOnError extends boolean = false>(options: Options<TypesData, ThrowOnError>) => (options.client ?? client).get<TypesResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/types', ...options });\n\nexport const uploadFile = <ThrowOnError extends boolean = false>(options: Options<UploadFileData, ThrowOnError>) => (options.client ?? client).post<UploadFileResponses, unknown, ThrowOnError>({\n    ...urlSearchParamsBodySerializer,\n    url: '/api/v{api-version}/upload',\n    ...options,\n    headers: {\n        'Content-Type': 'application/x-www-form-urlencoded',\n        ...options.headers\n    }\n});\n\nexport const fileResponse = <ThrowOnError extends boolean = false>(options: Options<FileResponseData, ThrowOnError>) => (options.client ?? client).get<FileResponseResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/file/{id}', ...options });\n\nexport const complexTypes = <ThrowOnError extends boolean = false>(options: Options<ComplexTypesData, ThrowOnError>) => (options.client ?? client).get<ComplexTypesResponses, ComplexTypesErrors, ThrowOnError>({\n    querySerializer: { parameters: { parameterObject: { object: { style: 'form' } } } },\n    url: '/api/v{api-version}/complex',\n    ...options\n});\n\nexport const multipartResponse = <ThrowOnError extends boolean = false>(options?: Options<MultipartResponseData, ThrowOnError>) => (options?.client ?? client).get<MultipartResponseResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/multipart', ...options });\n\nexport const multipartRequest = <ThrowOnError extends boolean = false>(options?: Options<MultipartRequestData, ThrowOnError>) => (options?.client ?? client).post<unknown, unknown, ThrowOnError>({\n    ...formDataBodySerializer,\n    url: '/api/v{api-version}/multipart',\n    ...options,\n    headers: {\n        'Content-Type': null,\n        ...options?.headers\n    }\n});\n\nexport const complexParams = <ThrowOnError extends boolean = false>(options: Options<ComplexParamsData, ThrowOnError>) => (options.client ?? client).put<ComplexParamsResponses, unknown, ThrowOnError>({\n    url: '/api/v{api-version}/complex/{id}',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json-patch+json',\n        ...options.headers\n    }\n});\n\nexport const callWithResultFromHeader = <ThrowOnError extends boolean = false>(options?: Options<CallWithResultFromHeaderData, ThrowOnError>) => (options?.client ?? client).post<CallWithResultFromHeaderResponses, CallWithResultFromHeaderErrors, ThrowOnError>({ url: '/api/v{api-version}/header', ...options });\n\nexport const testErrorCode = <ThrowOnError extends boolean = false>(options: Options<TestErrorCodeData, ThrowOnError>) => (options.client ?? client).post<TestErrorCodeResponses, TestErrorCodeErrors, ThrowOnError>({ url: '/api/v{api-version}/error', ...options });\n\nexport const nonAsciiæøåÆøÅöôêÊ字符串 = <ThrowOnError extends boolean = false>(options: Options<NonAsciiæøåÆøÅöôêÊ字符串Data, ThrowOnError>) => (options.client ?? client).post<NonAsciiæøåÆøÅöôêÊ字符串Responses, unknown, ThrowOnError>({ url: '/api/v{api-version}/non-ascii-æøåÆØÅöôêÊ字符串', ...options });\n\n/**\n * Login User\n */\nexport const putWithFormUrlEncoded = <ThrowOnError extends boolean = false>(options: Options<PutWithFormUrlEncodedData, ThrowOnError>) => (options.client ?? client).put<unknown, unknown, ThrowOnError>({\n    ...urlSearchParamsBodySerializer,\n    url: '/api/v{api-version}/non-ascii-æøåÆØÅöôêÊ字符串',\n    ...options,\n    headers: {\n        'Content-Type': 'application/x-www-form-urlencoded',\n        ...options.headers\n    }\n});\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/my-client/sdk-client-optional/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type ClientOptions = {\n    baseUrl: 'http://localhost:3000/base' | (string & {});\n};\n\n/**\n * Model with number-only name\n */\nexport type _400 = string;\n\n/**\n * External ref to shared model (A)\n */\nexport type ExternalRefA = ExternalSharedModel;\n\n/**\n * External ref to shared model (B)\n */\nexport type ExternalRefB = ExternalSharedModel;\n\n/**\n * Testing multiline comments in string: First line\n * Second line\n *\n * Fourth line\n */\nexport type CamelCaseCommentWithBreaks = number;\n\n/**\n * Testing multiline comments in string: First line\n * Second line\n *\n * Fourth line\n */\nexport type CommentWithBreaks = number;\n\n/**\n * Testing backticks in string: `backticks` and ```multiple backticks``` should work\n */\nexport type CommentWithBackticks = number;\n\n/**\n * Testing backticks and quotes in string: `backticks`, 'quotes', \"double quotes\" and ```multiple backticks``` should work\n */\nexport type CommentWithBackticksAndQuotes = number;\n\n/**\n * Testing slashes in string: \\backwards\\\\\\ and /forwards/// should work\n */\nexport type CommentWithSlashes = number;\n\n/**\n * Testing expression placeholders in string: ${expression} should work\n */\nexport type CommentWithExpressionPlaceholders = number;\n\n/**\n * Testing quotes in string: 'single quote''' and \"double quotes\"\"\" should work\n */\nexport type CommentWithQuotes = number;\n\n/**\n * Testing reserved characters in string: * inline * and ** inline ** should work\n */\nexport type CommentWithReservedCharacters = number;\n\n/**\n * This is a simple number\n */\nexport type SimpleInteger = number;\n\n/**\n * This is a simple boolean\n */\nexport type SimpleBoolean = boolean;\n\n/**\n * This is a simple string\n */\nexport type SimpleString = string;\n\n/**\n * A string with non-ascii (unicode) characters valid in typescript identifiers (æøåÆØÅöÔèÈ字符串)\n */\nexport type NonAsciiStringæøåÆøÅöôêÊ字符串 = string;\n\n/**\n * This is a simple file\n */\nexport type SimpleFile = Blob | File;\n\n/**\n * This is a simple reference\n */\nexport type SimpleReference = ModelWithString;\n\n/**\n * This is a simple string\n */\nexport type SimpleStringWithPattern = string | null;\n\n/**\n * This is a simple enum with strings\n */\nexport type EnumWithStrings = 'Success' | 'Warning' | 'Error' | '\\'Single Quote\\'' | '\"Double Quotes\"' | 'Non-ascii: øæåôöØÆÅÔÖ字符串';\n\nexport type EnumWithReplacedCharacters = '\\'Single Quote\\'' | '\"Double Quotes\"' | 'øæåôöØÆÅÔÖ字符串' | 3.1 | '';\n\n/**\n * This is a simple enum with numbers\n */\nexport type EnumWithNumbers = 1 | 2 | 3 | 1.1 | 1.2 | 1.3 | 100 | 200 | 300 | -100 | -200 | -300 | -1.1 | -1.2 | -1.3;\n\n/**\n * Success=1,Warning=2,Error=3\n */\nexport type EnumFromDescription = number;\n\n/**\n * This is a simple enum with numbers\n */\nexport type EnumWithExtensions = 200 | 400 | 500;\n\nexport type EnumWithXEnumNames = 0 | 1 | 2;\n\n/**\n * This is a simple array with numbers\n */\nexport type ArrayWithNumbers = Array<number>;\n\n/**\n * This is a simple array with booleans\n */\nexport type ArrayWithBooleans = Array<boolean>;\n\n/**\n * This is a simple array with strings\n */\nexport type ArrayWithStrings = Array<string>;\n\n/**\n * This is a simple array with references\n */\nexport type ArrayWithReferences = Array<ModelWithString>;\n\n/**\n * This is a simple array containing an array\n */\nexport type ArrayWithArray = Array<Array<ModelWithString>>;\n\n/**\n * This is a simple array with properties\n */\nexport type ArrayWithProperties = Array<{\n    '16x16'?: CamelCaseCommentWithBreaks;\n    bar?: string;\n}>;\n\n/**\n * This is a simple array with any of properties\n */\nexport type ArrayWithAnyOfProperties = Array<{\n    foo?: string;\n} | {\n    bar?: string;\n}>;\n\nexport type AnyOfAnyAndNull = {\n    data?: unknown | null;\n};\n\n/**\n * This is a simple array with any of properties\n */\nexport type AnyOfArrays = {\n    results?: Array<{\n        foo?: string;\n    } | {\n        bar?: string;\n    }>;\n};\n\n/**\n * This is a string dictionary\n */\nexport type DictionaryWithString = {\n    [key: string]: string;\n};\n\nexport type DictionaryWithPropertiesAndAdditionalProperties = {\n    foo?: number;\n    bar?: boolean;\n    [key: string]: string | number | boolean | undefined;\n};\n\n/**\n * This is a string reference\n */\nexport type DictionaryWithReference = {\n    [key: string]: ModelWithString;\n};\n\n/**\n * This is a complex dictionary\n */\nexport type DictionaryWithArray = {\n    [key: string]: Array<ModelWithString>;\n};\n\n/**\n * This is a string dictionary\n */\nexport type DictionaryWithDictionary = {\n    [key: string]: {\n        [key: string]: string;\n    };\n};\n\n/**\n * This is a complex dictionary\n */\nexport type DictionaryWithProperties = {\n    [key: string]: {\n        foo?: string;\n        bar?: string;\n    };\n};\n\n/**\n * This is a model with one number property\n */\nexport type ModelWithInteger = {\n    /**\n     * This is a simple number property\n     */\n    prop?: number;\n};\n\n/**\n * This is a model with one boolean property\n */\nexport type ModelWithBoolean = {\n    /**\n     * This is a simple boolean property\n     */\n    prop?: boolean;\n};\n\n/**\n * This is a model with one string property\n */\nexport type ModelWithString = {\n    /**\n     * This is a simple string property\n     */\n    prop?: string;\n};\n\n/**\n * This is a model with one string property\n */\nexport type ModelWithStringError = {\n    /**\n     * This is a simple string property\n     */\n    prop?: string;\n};\n\n/**\n * `Comment` or `VoiceComment`. The JSON object for adding voice comments to tickets is different. See [Adding voice comments to tickets](/documentation/ticketing/managing-tickets/adding-voice-comments-to-tickets)\n */\nexport type ModelFromZendesk = string;\n\n/**\n * This is a model with one string property\n */\nexport type ModelWithNullableString = {\n    /**\n     * This is a simple string property\n     */\n    nullableProp1?: string | null;\n    /**\n     * This is a simple string property\n     */\n    nullableRequiredProp1: string | null;\n    /**\n     * This is a simple string property\n     */\n    nullableProp2?: string | null;\n    /**\n     * This is a simple string property\n     */\n    nullableRequiredProp2: string | null;\n    /**\n     * This is a simple enum with strings\n     */\n    'foo_bar-enum'?: 'Success' | 'Warning' | 'Error' | 'ØÆÅ字符串';\n};\n\n/**\n * This is a model with one enum\n */\nexport type ModelWithEnum = {\n    /**\n     * This is a simple enum with strings\n     */\n    'foo_bar-enum'?: 'Success' | 'Warning' | 'Error' | 'ØÆÅ字符串';\n    /**\n     * These are the HTTP error code enums\n     */\n    statusCode?: '100' | '200 FOO' | '300 FOO_BAR' | '400 foo-bar' | '500 foo.bar' | '600 foo&bar';\n    /**\n     * Simple boolean enum\n     */\n    bool?: true;\n};\n\n/**\n * This is a model with one enum with escaped name\n */\nexport type ModelWithEnumWithHyphen = {\n    /**\n     * Foo-Bar-Baz-Qux\n     */\n    'foo-bar-baz-qux'?: '3.0';\n};\n\n/**\n * This is a model with one enum\n */\nexport type ModelWithEnumFromDescription = {\n    /**\n     * Success=1,Warning=2,Error=3\n     */\n    test?: number;\n};\n\n/**\n * This is a model with nested enums\n */\nexport type ModelWithNestedEnums = {\n    dictionaryWithEnum?: {\n        [key: string]: 'Success' | 'Warning' | 'Error';\n    };\n    dictionaryWithEnumFromDescription?: {\n        [key: string]: number;\n    };\n    arrayWithEnum?: Array<'Success' | 'Warning' | 'Error'>;\n    arrayWithDescription?: Array<number>;\n    /**\n     * This is a simple enum with strings\n     */\n    'foo_bar-enum'?: 'Success' | 'Warning' | 'Error' | 'ØÆÅ字符串';\n};\n\n/**\n * This is a model with one property containing a reference\n */\nexport type ModelWithReference = {\n    prop?: ModelWithProperties;\n};\n\n/**\n * This is a model with one property containing an array\n */\nexport type ModelWithArrayReadOnlyAndWriteOnly = {\n    prop?: Array<ModelWithReadOnlyAndWriteOnly>;\n    propWithFile?: Array<Blob | File>;\n    propWithNumber?: Array<number>;\n};\n\n/**\n * This is a model with one property containing an array\n */\nexport type ModelWithArray = {\n    prop?: Array<ModelWithString>;\n    propWithFile?: Array<Blob | File>;\n    propWithNumber?: Array<number>;\n};\n\n/**\n * This is a model with one property containing a dictionary\n */\nexport type ModelWithDictionary = {\n    prop?: {\n        [key: string]: string;\n    };\n};\n\n/**\n * This is a deprecated model with a deprecated property\n *\n * @deprecated\n */\nexport type DeprecatedModel = {\n    /**\n     * This is a deprecated property\n     *\n     * @deprecated\n     */\n    prop?: string;\n};\n\n/**\n * This is a model with one property containing a circular reference\n */\nexport type ModelWithCircularReference = {\n    prop?: ModelWithCircularReference;\n};\n\n/**\n * This is a model with one property with a 'one of' relationship\n */\nexport type CompositionWithOneOf = {\n    propA?: ModelWithString | ModelWithEnum | ModelWithArray | ModelWithDictionary;\n};\n\n/**\n * This is a model with one property with a 'one of' relationship where the options are not $ref\n */\nexport type CompositionWithOneOfAnonymous = {\n    propA?: {\n        propA?: string;\n    } | string | number;\n};\n\n/**\n * Circle\n */\nexport type ModelCircle = {\n    kind: string;\n    radius?: number;\n};\n\n/**\n * Square\n */\nexport type ModelSquare = {\n    kind: string;\n    sideLength?: number;\n};\n\n/**\n * This is a model with one property with a 'one of' relationship where the options are not $ref\n */\nexport type CompositionWithOneOfDiscriminator = ({\n    kind: 'circle';\n} & ModelCircle) | ({\n    kind: 'square';\n} & ModelSquare);\n\n/**\n * This is a model with one property with a 'any of' relationship\n */\nexport type CompositionWithAnyOf = {\n    propA?: ModelWithString | ModelWithEnum | ModelWithArray | ModelWithDictionary;\n};\n\n/**\n * This is a model with one property with a 'any of' relationship where the options are not $ref\n */\nexport type CompositionWithAnyOfAnonymous = {\n    propA?: {\n        propA?: string;\n    } | string | number;\n};\n\n/**\n * This is a model with nested 'any of' property with a type null\n */\nexport type CompositionWithNestedAnyAndTypeNull = {\n    propA?: Array<ModelWithDictionary | null> | Array<ModelWithArray | null>;\n};\n\nexport type _3eNum1Период = 'Bird' | 'Dog';\n\nexport type ConstValue = 'ConstValue';\n\n/**\n * This is a model with one property with a 'any of' relationship where the options are not $ref\n */\nexport type CompositionWithNestedAnyOfAndNull = {\n    /**\n     * Scopes\n     */\n    propA?: Array<_3eNum1Период | ConstValue> | null;\n};\n\n/**\n * This is a model with one property with a 'one of' relationship\n */\nexport type CompositionWithOneOfAndNullable = {\n    propA?: {\n        boolean?: boolean;\n    } | ModelWithEnum | ModelWithArray | ModelWithDictionary | null;\n};\n\n/**\n * This is a model that contains a simple dictionary within composition\n */\nexport type CompositionWithOneOfAndSimpleDictionary = {\n    propA?: boolean | {\n        [key: string]: number;\n    };\n};\n\n/**\n * This is a model that contains a dictionary of simple arrays within composition\n */\nexport type CompositionWithOneOfAndSimpleArrayDictionary = {\n    propA?: boolean | {\n        [key: string]: Array<boolean>;\n    };\n};\n\n/**\n * This is a model that contains a dictionary of complex arrays (composited) within composition\n */\nexport type CompositionWithOneOfAndComplexArrayDictionary = {\n    propA?: boolean | {\n        [key: string]: Array<number | string>;\n    };\n};\n\n/**\n * This is a model with one property with a 'all of' relationship\n */\nexport type CompositionWithAllOfAndNullable = {\n    propA?: ({\n        boolean?: boolean;\n    } & ModelWithEnum & ModelWithArray & ModelWithDictionary) | null;\n};\n\n/**\n * This is a model with one property with a 'any of' relationship\n */\nexport type CompositionWithAnyOfAndNullable = {\n    propA?: {\n        boolean?: boolean;\n    } | ModelWithEnum | ModelWithArray | ModelWithDictionary | null;\n};\n\n/**\n * This is a base model with two simple optional properties\n */\nexport type CompositionBaseModel = {\n    firstName?: string;\n    lastname?: string;\n};\n\n/**\n * This is a model that extends the base model\n */\nexport type CompositionExtendedModel = CompositionBaseModel & {\n    age: number;\n    firstName: string;\n    lastname: string;\n};\n\n/**\n * This is a model with one nested property\n */\nexport type ModelWithProperties = {\n    required: string;\n    readonly requiredAndReadOnly: string;\n    requiredAndNullable: string | null;\n    string?: string;\n    number?: number;\n    boolean?: boolean;\n    reference?: ModelWithString;\n    'property with space'?: string;\n    default?: string;\n    try?: string;\n    readonly '@namespace.string'?: string;\n    readonly '@namespace.integer'?: number;\n};\n\n/**\n * This is a model with one nested property\n */\nexport type ModelWithNestedProperties = {\n    readonly first: {\n        readonly second: {\n            readonly third: string | null;\n        } | null;\n    } | null;\n};\n\n/**\n * This is a model with duplicated properties\n */\nexport type ModelWithDuplicateProperties = {\n    prop?: ModelWithString;\n};\n\n/**\n * This is a model with ordered properties\n */\nexport type ModelWithOrderedProperties = {\n    zebra?: string;\n    apple?: string;\n    hawaii?: string;\n};\n\n/**\n * This is a model with duplicated imports\n */\nexport type ModelWithDuplicateImports = {\n    propA?: ModelWithString;\n    propB?: ModelWithString;\n    propC?: ModelWithString;\n};\n\n/**\n * This is a model that extends another model\n */\nexport type ModelThatExtends = ModelWithString & {\n    propExtendsA?: string;\n    propExtendsB?: ModelWithString;\n};\n\n/**\n * This is a model that extends another model\n */\nexport type ModelThatExtendsExtends = ModelWithString & ModelThatExtends & {\n    propExtendsC?: string;\n    propExtendsD?: ModelWithString;\n};\n\n/**\n * This is a model that contains a some patterns\n */\nexport type ModelWithPattern = {\n    key: string;\n    name: string;\n    readonly enabled?: boolean;\n    readonly modified?: string;\n    id?: string;\n    text?: string;\n    patternWithSingleQuotes?: string;\n    patternWithNewline?: string;\n    patternWithBacktick?: string;\n    patternWithUnicode?: string;\n};\n\nexport type File = {\n    /**\n     * Id\n     */\n    readonly id?: string;\n    /**\n     * Updated at\n     */\n    readonly updated_at?: string;\n    /**\n     * Created at\n     */\n    readonly created_at?: string;\n    /**\n     * Mime\n     */\n    mime: string;\n    /**\n     * File\n     */\n    readonly file?: string;\n};\n\nexport type Default = {\n    name?: string;\n};\n\nexport type Pageable = {\n    page?: number;\n    size?: number;\n    sort?: Array<string>;\n};\n\n/**\n * This is a free-form object without additionalProperties.\n */\nexport type FreeFormObjectWithoutAdditionalProperties = {\n    [key: string]: unknown;\n};\n\n/**\n * This is a free-form object with additionalProperties: true.\n */\nexport type FreeFormObjectWithAdditionalPropertiesEqTrue = {\n    [key: string]: unknown;\n};\n\n/**\n * This is a free-form object with additionalProperties: {}.\n */\nexport type FreeFormObjectWithAdditionalPropertiesEqEmptyObject = {\n    [key: string]: unknown;\n};\n\nexport type ModelWithConst = {\n    String?: 'String';\n    number?: 0;\n    null?: null;\n    withType?: 'Some string';\n};\n\n/**\n * This is a model with one property and additionalProperties: true\n */\nexport type ModelWithAdditionalPropertiesEqTrue = {\n    /**\n     * This is a simple string property\n     */\n    prop?: string;\n    [key: string]: unknown;\n};\n\nexport type NestedAnyOfArraysNullable = {\n    nullableArray?: Array<string | boolean> | null;\n};\n\nexport type CompositionWithOneOfAndProperties = ({\n    foo: SimpleParameter;\n} | {\n    bar: NonAsciiStringæøåÆøÅöôêÊ字符串;\n}) & {\n    baz: number | null;\n    qux: number;\n};\n\n/**\n * An object that can be null\n */\nexport type NullableObject = {\n    foo?: string;\n} | null;\n\n/**\n * Some % character\n */\nexport type CharactersInDescription = string;\n\nexport type ModelWithNullableObject = {\n    data?: NullableObject;\n};\n\n/**\n * An object with additional properties that can be null (anyOf ref + null)\n */\nexport type ModelWithAdditionalPropertiesRef = {\n    [key: string]: NullableObject | null;\n};\n\nexport type ModelWithOneOfEnum = {\n    foo: 'Bar';\n} | {\n    foo: 'Baz';\n} | {\n    foo: 'Qux';\n} | {\n    content: string;\n    foo: 'Quux';\n} | {\n    content: [\n        string,\n        string\n    ];\n    foo: 'Corge';\n};\n\nexport type ModelWithNestedArrayEnumsDataFoo = 'foo' | 'bar';\n\nexport type ModelWithNestedArrayEnumsDataBar = 'baz' | 'qux';\n\nexport type ModelWithNestedArrayEnumsData = {\n    foo?: Array<ModelWithNestedArrayEnumsDataFoo>;\n    bar?: Array<ModelWithNestedArrayEnumsDataBar>;\n};\n\nexport type ModelWithNestedArrayEnums = {\n    array_strings?: Array<string>;\n    data?: ModelWithNestedArrayEnumsData;\n};\n\nexport type ModelWithNestedCompositionEnums = {\n    foo?: ModelWithNestedArrayEnumsDataFoo;\n};\n\nexport type ModelWithReadOnlyAndWriteOnly = {\n    foo: string;\n    readonly bar: string;\n};\n\nexport type ModelWithConstantSizeArray = [\n    number,\n    number\n];\n\nexport type ModelWithAnyOfConstantSizeArray = [\n    number | string,\n    number | string,\n    number | string\n];\n\nexport type ModelWithPrefixItemsConstantSizeArray = [\n    ModelWithInteger,\n    number | string,\n    string\n];\n\nexport type ModelWithAnyOfConstantSizeArrayNullable = [\n    number | null | string,\n    number | null | string,\n    number | null | string\n];\n\nexport type ModelWithAnyOfConstantSizeArrayWithNSizeAndOptions = [\n    number | Import,\n    number | Import\n];\n\nexport type ModelWithAnyOfConstantSizeArrayAndIntersect = [\n    number & string,\n    number & string\n];\n\nexport type ModelWithNumericEnumUnion = {\n    /**\n     * Период\n     */\n    value?: -10 | -1 | 0 | 1 | 3 | 6 | 12;\n};\n\n/**\n * Some description with `back ticks`\n */\nexport type ModelWithBackticksInDescription = {\n    /**\n     * The template `that` should be used for parsing and importing the contents of the CSV file.\n     *\n     * <br/><p>There is one placeholder currently supported:<ul>     <li><b>${x}</b> - refers to the n-th column in the CSV file, e.g. ${1}, ${2}, ...)</li></ul><p>Example of a correct JSON template:</p>\n     * <pre>\n     * [\n     * {\n     * \"resourceType\": \"Asset\",\n     * \"identifier\": {\n     * \"name\": \"${1}\",\n     * \"domain\": {\n     * \"name\": \"${2}\",\n     * \"community\": {\n     * \"name\": \"Some Community\"\n     * }\n     * }\n     * },\n     * \"attributes\" : {\n     * \"00000000-0000-0000-0000-000000003115\" : [ {\n     * \"value\" : \"${3}\"\n     * } ],\n     * \"00000000-0000-0000-0000-000000000222\" : [ {\n     * \"value\" : \"${4}\"\n     * } ]\n     * }\n     * }\n     * ]\n     * </pre>\n     */\n    template?: string;\n};\n\nexport type ModelWithOneOfAndProperties = (SimpleParameter | NonAsciiStringæøåÆøÅöôêÊ字符串) & {\n    baz: number | null;\n    qux: number;\n};\n\n/**\n * Model used to test deduplication strategy (unused)\n */\nexport type ParameterSimpleParameterUnused = string;\n\n/**\n * Model used to test deduplication strategy\n */\nexport type PostServiceWithEmptyTagResponse = string;\n\n/**\n * Model used to test deduplication strategy\n */\nexport type PostServiceWithEmptyTagResponse2 = string;\n\n/**\n * Model used to test deduplication strategy\n */\nexport type DeleteFooData = string;\n\n/**\n * Model used to test deduplication strategy\n */\nexport type DeleteFooData2 = string;\n\n/**\n * Model with restricted keyword name\n */\nexport type Import = string;\n\nexport type SchemaWithFormRestrictedKeys = {\n    description?: string;\n    'x-enum-descriptions'?: string;\n    'x-enum-varnames'?: string;\n    'x-enumNames'?: string;\n    title?: string;\n    object?: {\n        description?: string;\n        'x-enum-descriptions'?: string;\n        'x-enum-varnames'?: string;\n        'x-enumNames'?: string;\n        title?: string;\n    };\n    array?: Array<{\n        description?: string;\n        'x-enum-descriptions'?: string;\n        'x-enum-varnames'?: string;\n        'x-enumNames'?: string;\n        title?: string;\n    }>;\n};\n\n/**\n * This schema was giving PascalCase transformations a hard time\n */\nexport type IoK8sApimachineryPkgApisMetaV1DeleteOptions = {\n    /**\n     * Must be fulfilled before a deletion is carried out. If not possible, a 409 Conflict status will be returned.\n     */\n    preconditions?: IoK8sApimachineryPkgApisMetaV1Preconditions;\n};\n\n/**\n * This schema was giving PascalCase transformations a hard time\n */\nexport type IoK8sApimachineryPkgApisMetaV1Preconditions = {\n    /**\n     * Specifies the target ResourceVersion\n     */\n    resourceVersion?: string;\n    /**\n     * Specifies the target UID.\n     */\n    uid?: string;\n};\n\nexport type AdditionalPropertiesUnknownIssue = {\n    [key: string]: string | number;\n};\n\nexport type AdditionalPropertiesUnknownIssue2 = {\n    [key: string]: string | number;\n};\n\nexport type AdditionalPropertiesUnknownIssue3 = string & {\n    entries: {\n        [key: string]: AdditionalPropertiesUnknownIssue;\n    };\n};\n\nexport type AdditionalPropertiesIntegerIssue = {\n    value: number;\n    [key: string]: number;\n};\n\nexport type OneOfAllOfIssue = ((ConstValue | GenericSchemaDuplicateIssue1SystemBoolean) & _3eNum1Период) | GenericSchemaDuplicateIssue1SystemString;\n\nexport type GenericSchemaDuplicateIssue1SystemBoolean = {\n    item?: boolean;\n    error?: string | null;\n    readonly hasError?: boolean;\n    data?: {\n        [key: string]: never;\n    };\n};\n\nexport type GenericSchemaDuplicateIssue1SystemString = {\n    item?: string | null;\n    error?: string | null;\n    readonly hasError?: boolean;\n};\n\nexport type ExternalSharedModel = {\n    id: string;\n    name?: string;\n};\n\n/**\n * This is a model with one property containing a reference\n */\nexport type ModelWithReferenceWritable = {\n    prop?: ModelWithPropertiesWritable;\n};\n\n/**\n * This is a model with one property containing an array\n */\nexport type ModelWithArrayReadOnlyAndWriteOnlyWritable = {\n    prop?: Array<ModelWithReadOnlyAndWriteOnlyWritable>;\n    propWithFile?: Array<Blob | File>;\n    propWithNumber?: Array<number>;\n};\n\n/**\n * This is a model with one nested property\n */\nexport type ModelWithPropertiesWritable = {\n    required: string;\n    requiredAndNullable: string | null;\n    string?: string;\n    number?: number;\n    boolean?: boolean;\n    reference?: ModelWithString;\n    'property with space'?: string;\n    default?: string;\n    try?: string;\n};\n\n/**\n * This is a model that contains a some patterns\n */\nexport type ModelWithPatternWritable = {\n    key: string;\n    name: string;\n    id?: string;\n    text?: string;\n    patternWithSingleQuotes?: string;\n    patternWithNewline?: string;\n    patternWithBacktick?: string;\n    patternWithUnicode?: string;\n};\n\nexport type FileWritable = {\n    /**\n     * Mime\n     */\n    mime: string;\n};\n\nexport type ModelWithReadOnlyAndWriteOnlyWritable = {\n    foo: string;\n    baz: string;\n};\n\nexport type ModelWithAnyOfConstantSizeArrayWithNSizeAndOptionsWritable = [\n    number | Import,\n    number | Import\n];\n\nexport type AdditionalPropertiesUnknownIssueWritable = {\n    [key: string]: string | number;\n};\n\nexport type OneOfAllOfIssueWritable = ((ConstValue | GenericSchemaDuplicateIssue1SystemBoolean) & _3eNum1Период) | GenericSchemaDuplicateIssue1SystemString;\n\nexport type GenericSchemaDuplicateIssue1SystemBooleanWritable = {\n    item?: boolean;\n    error?: string | null;\n    data?: {\n        [key: string]: never;\n    };\n};\n\nexport type GenericSchemaDuplicateIssue1SystemStringWritable = {\n    item?: string | null;\n    error?: string | null;\n};\n\n/**\n * This is a reusable parameter\n */\nexport type SimpleParameter = string;\n\n/**\n * Parameter with illegal characters\n */\nexport type XFooBar = ModelWithString;\n\n/**\n * A reusable request body\n */\nexport type SimpleRequestBody = ModelWithString;\n\n/**\n * A reusable request body\n */\nexport type SimpleFormData = ModelWithString;\n\nexport type ExportData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no+tag';\n};\n\nexport type PatchApiVbyApiVersionNoTagData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no+tag';\n};\n\nexport type PatchApiVbyApiVersionNoTagResponses = {\n    /**\n     * OK\n     */\n    default: unknown;\n};\n\nexport type ImportData = {\n    body: ModelWithReadOnlyAndWriteOnlyWritable | ModelWithArrayReadOnlyAndWriteOnlyWritable;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no+tag';\n};\n\nexport type ImportResponses = {\n    /**\n     * Success\n     */\n    200: ModelFromZendesk;\n    /**\n     * Default success response\n     */\n    default: ModelWithReadOnlyAndWriteOnly;\n};\n\nexport type ImportResponse = ImportResponses[keyof ImportResponses];\n\nexport type FooWowData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no+tag';\n};\n\nexport type FooWowResponses = {\n    /**\n     * OK\n     */\n    default: unknown;\n};\n\nexport type ApiVVersionODataControllerCountData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple/$count';\n};\n\nexport type ApiVVersionODataControllerCountResponses = {\n    /**\n     * Success\n     */\n    200: ModelFromZendesk;\n};\n\nexport type ApiVVersionODataControllerCountResponse = ApiVVersionODataControllerCountResponses[keyof ApiVVersionODataControllerCountResponses];\n\nexport type GetApiVbyApiVersionSimpleOperationData = {\n    body?: never;\n    path: {\n        /**\n         * foo in method\n         */\n        foo_param: string;\n    };\n    query?: never;\n    url: '/api/v{api-version}/simple:operation';\n};\n\nexport type GetApiVbyApiVersionSimpleOperationErrors = {\n    /**\n     * Default error response\n     */\n    default: ModelWithBoolean;\n};\n\nexport type GetApiVbyApiVersionSimpleOperationError = GetApiVbyApiVersionSimpleOperationErrors[keyof GetApiVbyApiVersionSimpleOperationErrors];\n\nexport type GetApiVbyApiVersionSimpleOperationResponses = {\n    /**\n     * Response is a simple number\n     */\n    200: number;\n};\n\nexport type GetApiVbyApiVersionSimpleOperationResponse = GetApiVbyApiVersionSimpleOperationResponses[keyof GetApiVbyApiVersionSimpleOperationResponses];\n\nexport type DeleteCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type GetCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type HeadCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type OptionsCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type PatchCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type PostCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type PutCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type DeleteFooData3 = {\n    body?: never;\n    headers: {\n        /**\n         * Parameter with illegal characters\n         */\n        'x-Foo-Bar': ModelWithString;\n    };\n    path: {\n        /**\n         * foo in method\n         */\n        foo_param: string;\n        /**\n         * bar in method\n         */\n        BarParam: string;\n    };\n    query?: never;\n    url: '/api/v{api-version}/foo/{foo_param}/bar/{BarParam}';\n};\n\nexport type CallWithDescriptionsData = {\n    body?: never;\n    path?: never;\n    query?: {\n        /**\n         * Testing multiline comments in string: First line\n         * Second line\n         *\n         * Fourth line\n         */\n        parameterWithBreaks?: string;\n        /**\n         * Testing backticks in string: `backticks` and ```multiple backticks``` should work\n         */\n        parameterWithBackticks?: string;\n        /**\n         * Testing slashes in string: \\backwards\\\\\\ and /forwards/// should work\n         */\n        parameterWithSlashes?: string;\n        /**\n         * Testing expression placeholders in string: ${expression} should work\n         */\n        parameterWithExpressionPlaceholders?: string;\n        /**\n         * Testing quotes in string: 'single quote''' and \"double quotes\"\"\" should work\n         */\n        parameterWithQuotes?: string;\n        /**\n         * Testing reserved characters in string: * inline * and ** inline ** should work\n         */\n        parameterWithReservedCharacters?: string;\n    };\n    url: '/api/v{api-version}/descriptions';\n};\n\nexport type DeprecatedCallData = {\n    body?: never;\n    headers: {\n        /**\n         * This parameter is deprecated\n         *\n         * @deprecated\n         */\n        parameter: DeprecatedModel | null;\n    };\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/parameters/deprecated';\n};\n\nexport type CallWithParametersData = {\n    /**\n     * This is the parameter that goes into the body\n     */\n    body: {\n        [key: string]: unknown;\n    } | null;\n    headers: {\n        /**\n         * This is the parameter that goes into the header\n         */\n        parameterHeader: string | null;\n    };\n    path: {\n        /**\n         * This is the parameter that goes into the path\n         */\n        parameterPath: string | null;\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string | null;\n    };\n    query: {\n        foo_ref_enum?: ModelWithNestedArrayEnumsDataFoo;\n        foo_all_of_enum: ModelWithNestedArrayEnumsDataFoo;\n        /**\n         * This is the parameter that goes into the query params\n         */\n        cursor: string | null;\n    };\n    url: '/api/v{api-version}/parameters/{parameterPath}';\n};\n\nexport type CallWithWeirdParameterNamesData = {\n    /**\n     * This is the parameter that goes into the body\n     */\n    body: ModelWithString | null;\n    headers: {\n        /**\n         * This is the parameter that goes into the request header\n         */\n        'parameter.header': string | null;\n    };\n    path: {\n        /**\n         * This is the parameter that goes into the path\n         */\n        'parameter.path.1'?: string;\n        /**\n         * This is the parameter that goes into the path\n         */\n        'parameter-path-2'?: string;\n        /**\n         * This is the parameter that goes into the path\n         */\n        'PARAMETER-PATH-3'?: string;\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string | null;\n    };\n    query: {\n        /**\n         * This is the parameter with a reserved keyword\n         */\n        default?: string;\n        /**\n         * This is the parameter that goes into the request query params\n         */\n        'parameter-query': string | null;\n    };\n    url: '/api/v{api-version}/parameters/{parameter.path.1}/{parameter-path-2}/{PARAMETER-PATH-3}';\n};\n\nexport type GetCallWithOptionalParamData = {\n    /**\n     * This is a required parameter\n     */\n    body: ModelWithOneOfEnum;\n    path?: never;\n    query?: {\n        /**\n         * This is an optional parameter\n         */\n        page?: number;\n    };\n    url: '/api/v{api-version}/parameters';\n};\n\nexport type PostCallWithOptionalParamData = {\n    /**\n     * This is an optional parameter\n     */\n    body?: {\n        offset?: number | null;\n    };\n    path?: never;\n    query: {\n        /**\n         * This is a required parameter\n         */\n        parameter: Pageable;\n    };\n    url: '/api/v{api-version}/parameters';\n};\n\nexport type PostCallWithOptionalParamResponses = {\n    /**\n     * Response is a simple number\n     */\n    200: number;\n    /**\n     * Success\n     */\n    204: void;\n};\n\nexport type PostCallWithOptionalParamResponse = PostCallWithOptionalParamResponses[keyof PostCallWithOptionalParamResponses];\n\nexport type PostApiVbyApiVersionRequestBodyData = {\n    /**\n     * A reusable request body\n     */\n    body?: SimpleRequestBody;\n    path?: never;\n    query?: {\n        /**\n         * This is a reusable parameter\n         */\n        parameter?: string;\n    };\n    url: '/api/v{api-version}/requestBody';\n};\n\nexport type PostApiVbyApiVersionFormDataData = {\n    /**\n     * A reusable request body\n     */\n    body?: SimpleFormData;\n    path?: never;\n    query?: {\n        /**\n         * This is a reusable parameter\n         */\n        parameter?: string;\n    };\n    url: '/api/v{api-version}/formData';\n};\n\nexport type CallWithDefaultParametersData = {\n    body?: never;\n    path?: never;\n    query?: {\n        /**\n         * This is a simple string with default value\n         */\n        parameterString?: string | null;\n        /**\n         * This is a simple number with default value\n         */\n        parameterNumber?: number | null;\n        /**\n         * This is a simple boolean with default value\n         */\n        parameterBoolean?: boolean | null;\n        /**\n         * This is a simple enum with default value\n         */\n        parameterEnum?: 'Success' | 'Warning' | 'Error';\n        /**\n         * This is a simple model with default value\n         */\n        parameterModel?: ModelWithString | null;\n    };\n    url: '/api/v{api-version}/defaults';\n};\n\nexport type CallWithDefaultOptionalParametersData = {\n    body?: never;\n    path?: never;\n    query?: {\n        /**\n         * This is a simple string that is optional with default value\n         */\n        parameterString?: string;\n        /**\n         * This is a simple number that is optional with default value\n         */\n        parameterNumber?: number;\n        /**\n         * This is a simple boolean that is optional with default value\n         */\n        parameterBoolean?: boolean;\n        /**\n         * This is a simple enum that is optional with default value\n         */\n        parameterEnum?: 'Success' | 'Warning' | 'Error';\n        /**\n         * This is a simple model that is optional with default value\n         */\n        parameterModel?: ModelWithString;\n    };\n    url: '/api/v{api-version}/defaults';\n};\n\nexport type CallToTestOrderOfParamsData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * This is a optional string with default\n         */\n        parameterOptionalStringWithDefault?: string;\n        /**\n         * This is a optional string with empty default\n         */\n        parameterOptionalStringWithEmptyDefault?: string;\n        /**\n         * This is a optional string with no default\n         */\n        parameterOptionalStringWithNoDefault?: string;\n        /**\n         * This is a string with default\n         */\n        parameterStringWithDefault: string;\n        /**\n         * This is a string with empty default\n         */\n        parameterStringWithEmptyDefault: string;\n        /**\n         * This is a string with no default\n         */\n        parameterStringWithNoDefault: string;\n        /**\n         * This is a string that can be null with no default\n         */\n        parameterStringNullableWithNoDefault?: string | null;\n        /**\n         * This is a string that can be null with default\n         */\n        parameterStringNullableWithDefault?: string | null;\n    };\n    url: '/api/v{api-version}/defaults';\n};\n\nexport type DuplicateNameData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/duplicate';\n};\n\nexport type DuplicateName2Data = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/duplicate';\n};\n\nexport type DuplicateName3Data = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/duplicate';\n};\n\nexport type DuplicateName4Data = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/duplicate';\n};\n\nexport type CallWithNoContentResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no-content';\n};\n\nexport type CallWithNoContentResponseResponses = {\n    /**\n     * Success\n     */\n    204: void;\n};\n\nexport type CallWithNoContentResponseResponse = CallWithNoContentResponseResponses[keyof CallWithNoContentResponseResponses];\n\nexport type CallWithResponseAndNoContentResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multiple-tags/response-and-no-content';\n};\n\nexport type CallWithResponseAndNoContentResponseResponses = {\n    /**\n     * Response is a simple number\n     */\n    200: number;\n    /**\n     * Success\n     */\n    204: void;\n};\n\nexport type CallWithResponseAndNoContentResponseResponse = CallWithResponseAndNoContentResponseResponses[keyof CallWithResponseAndNoContentResponseResponses];\n\nexport type DummyAData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multiple-tags/a';\n};\n\nexport type DummyAResponses = {\n    200: _400;\n};\n\nexport type DummyAResponse = DummyAResponses[keyof DummyAResponses];\n\nexport type DummyBData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multiple-tags/b';\n};\n\nexport type DummyBResponses = {\n    /**\n     * Success\n     */\n    204: void;\n};\n\nexport type DummyBResponse = DummyBResponses[keyof DummyBResponses];\n\nexport type CallWithResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/response';\n};\n\nexport type CallWithResponseResponses = {\n    default: Import;\n};\n\nexport type CallWithResponseResponse = CallWithResponseResponses[keyof CallWithResponseResponses];\n\nexport type CallWithDuplicateResponsesData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/response';\n};\n\nexport type CallWithDuplicateResponsesErrors = {\n    /**\n     * Message for 500 error\n     */\n    500: ModelWithStringError;\n    /**\n     * Message for 501 error\n     */\n    501: ModelWithStringError;\n    /**\n     * Message for 502 error\n     */\n    502: ModelWithStringError;\n    /**\n     * Message for 4XX errors\n     */\n    '4XX': DictionaryWithArray;\n    /**\n     * Default error response\n     */\n    default: ModelWithBoolean;\n};\n\nexport type CallWithDuplicateResponsesError = CallWithDuplicateResponsesErrors[keyof CallWithDuplicateResponsesErrors];\n\nexport type CallWithDuplicateResponsesResponses = {\n    /**\n     * Message for 200 response\n     */\n    200: ModelWithBoolean & ModelWithInteger;\n    /**\n     * Message for 201 response\n     */\n    201: ModelWithString;\n    /**\n     * Message for 202 response\n     */\n    202: ModelWithString;\n};\n\nexport type CallWithDuplicateResponsesResponse = CallWithDuplicateResponsesResponses[keyof CallWithDuplicateResponsesResponses];\n\nexport type CallWithResponsesData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/response';\n};\n\nexport type CallWithResponsesErrors = {\n    /**\n     * Message for 500 error\n     */\n    500: ModelWithStringError;\n    /**\n     * Message for 501 error\n     */\n    501: ModelWithStringError;\n    /**\n     * Message for 502 error\n     */\n    502: ModelWithStringError;\n    /**\n     * Message for default response\n     */\n    default: ModelWithStringError;\n};\n\nexport type CallWithResponsesError = CallWithResponsesErrors[keyof CallWithResponsesErrors];\n\nexport type CallWithResponsesResponses = {\n    /**\n     * Message for 200 response\n     */\n    200: {\n        readonly '@namespace.string'?: string;\n        readonly '@namespace.integer'?: number;\n        readonly value?: Array<ModelWithString>;\n    };\n    /**\n     * Message for 201 response\n     */\n    201: ModelThatExtends;\n    /**\n     * Message for 202 response\n     */\n    202: ModelThatExtendsExtends;\n};\n\nexport type CallWithResponsesResponse = CallWithResponsesResponses[keyof CallWithResponsesResponses];\n\nexport type CollectionFormatData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * This is an array parameter that is sent as csv format (comma-separated values)\n         */\n        parameterArrayCSV: Array<string> | null;\n        /**\n         * This is an array parameter that is sent as ssv format (space-separated values)\n         */\n        parameterArraySSV: Array<string> | null;\n        /**\n         * This is an array parameter that is sent as tsv format (tab-separated values)\n         */\n        parameterArrayTSV: Array<string> | null;\n        /**\n         * This is an array parameter that is sent as pipes format (pipe-separated values)\n         */\n        parameterArrayPipes: Array<string> | null;\n        /**\n         * This is an array parameter that is sent as multi format (multiple parameter instances)\n         */\n        parameterArrayMulti: Array<string> | null;\n    };\n    url: '/api/v{api-version}/collectionFormat';\n};\n\nexport type TypesData = {\n    body?: never;\n    path?: {\n        /**\n         * This is a number parameter\n         */\n        id?: number;\n    };\n    query: {\n        /**\n         * This is a number parameter\n         */\n        parameterNumber: number;\n        /**\n         * This is a string parameter\n         */\n        parameterString: string | null;\n        /**\n         * This is a boolean parameter\n         */\n        parameterBoolean: boolean | null;\n        /**\n         * This is an object parameter\n         */\n        parameterObject: {\n            [key: string]: unknown;\n        } | null;\n        /**\n         * This is an array parameter\n         */\n        parameterArray: Array<string> | null;\n        /**\n         * This is a dictionary parameter\n         */\n        parameterDictionary: {\n            [key: string]: unknown;\n        } | null;\n        /**\n         * This is an enum parameter\n         */\n        parameterEnum: 'Success' | 'Warning' | 'Error' | null;\n    };\n    url: '/api/v{api-version}/types';\n};\n\nexport type TypesResponses = {\n    /**\n     * Response is a simple number\n     */\n    200: number;\n    /**\n     * Response is a simple string\n     */\n    201: string;\n    /**\n     * Response is a simple boolean\n     */\n    202: boolean;\n    /**\n     * Response is a simple object\n     */\n    203: {\n        [key: string]: unknown;\n    };\n};\n\nexport type TypesResponse = TypesResponses[keyof TypesResponses];\n\nexport type UploadFileData = {\n    body: Blob | File;\n    path: {\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string | null;\n    };\n    query?: never;\n    url: '/api/v{api-version}/upload';\n};\n\nexport type UploadFileResponses = {\n    200: boolean;\n};\n\nexport type UploadFileResponse = UploadFileResponses[keyof UploadFileResponses];\n\nexport type FileResponseData = {\n    body?: never;\n    path: {\n        id: string;\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string;\n    };\n    query?: never;\n    url: '/api/v{api-version}/file/{id}';\n};\n\nexport type FileResponseResponses = {\n    /**\n     * Success\n     */\n    200: Blob | File;\n};\n\nexport type FileResponseResponse = FileResponseResponses[keyof FileResponseResponses];\n\nexport type ComplexTypesData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * Parameter containing object\n         */\n        parameterObject: {\n            first?: {\n                second?: {\n                    third?: string;\n                };\n            };\n        };\n        /**\n         * Parameter containing reference\n         */\n        parameterReference: ModelWithString;\n    };\n    url: '/api/v{api-version}/complex';\n};\n\nexport type ComplexTypesErrors = {\n    /**\n     * 400 `server` error\n     */\n    400: unknown;\n    /**\n     * 500 server error\n     */\n    500: unknown;\n};\n\nexport type ComplexTypesResponses = {\n    /**\n     * Successful response\n     */\n    200: Array<ModelWithString>;\n};\n\nexport type ComplexTypesResponse = ComplexTypesResponses[keyof ComplexTypesResponses];\n\nexport type MultipartResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multipart';\n};\n\nexport type MultipartResponseResponses = {\n    /**\n     * OK\n     */\n    200: {\n        file?: Blob | File;\n        metadata?: {\n            foo?: string;\n            bar?: string;\n        };\n    };\n};\n\nexport type MultipartResponseResponse = MultipartResponseResponses[keyof MultipartResponseResponses];\n\nexport type MultipartRequestData = {\n    body?: {\n        content?: Blob | File;\n        data?: ModelWithString | null;\n    };\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multipart';\n};\n\nexport type ComplexParamsData = {\n    body?: {\n        readonly key: string | null;\n        name: string | null;\n        enabled?: boolean;\n        type: 'Monkey' | 'Horse' | 'Bird';\n        listOfModels?: Array<ModelWithString> | null;\n        listOfStrings?: Array<string> | null;\n        parameters: ModelWithString | ModelWithEnum | ModelWithArray | ModelWithDictionary;\n        readonly user?: {\n            readonly id?: number;\n            readonly name?: string | null;\n        };\n    };\n    path: {\n        id: number;\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string;\n    };\n    query?: never;\n    url: '/api/v{api-version}/complex/{id}';\n};\n\nexport type ComplexParamsResponses = {\n    /**\n     * Success\n     */\n    200: ModelWithString;\n};\n\nexport type ComplexParamsResponse = ComplexParamsResponses[keyof ComplexParamsResponses];\n\nexport type CallWithResultFromHeaderData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/header';\n};\n\nexport type CallWithResultFromHeaderErrors = {\n    /**\n     * 400 server error\n     */\n    400: unknown;\n    /**\n     * 500 server error\n     */\n    500: unknown;\n};\n\nexport type CallWithResultFromHeaderResponses = {\n    /**\n     * Successful response\n     */\n    200: unknown;\n};\n\nexport type TestErrorCodeData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * Status code to return\n         */\n        status: number;\n    };\n    url: '/api/v{api-version}/error';\n};\n\nexport type TestErrorCodeErrors = {\n    /**\n     * Custom message: Internal Server Error\n     */\n    500: unknown;\n    /**\n     * Custom message: Not Implemented\n     */\n    501: unknown;\n    /**\n     * Custom message: Bad Gateway\n     */\n    502: unknown;\n    /**\n     * Custom message: Service Unavailable\n     */\n    503: unknown;\n};\n\nexport type TestErrorCodeResponses = {\n    /**\n     * Custom message: Successful response\n     */\n    200: unknown;\n};\n\nexport type NonAsciiæøåÆøÅöôêÊ字符串Data = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * Dummy input param\n         */\n        nonAsciiParamæøåÆØÅöôêÊ: number;\n    };\n    url: '/api/v{api-version}/non-ascii-æøåÆØÅöôêÊ字符串';\n};\n\nexport type NonAsciiæøåÆøÅöôêÊ字符串Responses = {\n    /**\n     * Successful response\n     */\n    200: Array<NonAsciiStringæøåÆøÅöôêÊ字符串>;\n};\n\nexport type NonAsciiæøåÆøÅöôêÊ字符串Response = NonAsciiæøåÆøÅöôêÊ字符串Responses[keyof NonAsciiæøåÆøÅöôêÊ字符串Responses];\n\nexport type PutWithFormUrlEncodedData = {\n    body: ArrayWithStrings;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/non-ascii-æøåÆØÅöôêÊ字符串';\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/my-client/sdk-client-required/client/client.ts",
    "content": "import type { Client, Config, RequestOptions } from './types';\nimport {\n  buildUrl,\n  createConfig,\n  createInterceptors,\n  getParseAs,\n  mergeConfigs,\n  mergeHeaders,\n  setAuthParams,\n} from './utils';\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, RequestOptions>();\n\n  // @ts-expect-error\n  const request: Client['request'] = async (options) => {\n    const opts = {\n      ..._config,\n      ...options,\n      fetch: options.fetch ?? _config.fetch ?? globalThis.fetch,\n      headers: mergeHeaders(_config.headers, options.headers),\n    };\n\n    if (opts.security) {\n      await setAuthParams({\n        ...opts,\n        security: opts.security,\n      });\n    }\n\n    if (opts.body && opts.bodySerializer) {\n      opts.body = opts.bodySerializer(opts.body);\n    }\n\n    // remove Content-Type header if body is empty to avoid sending invalid requests\n    if (opts.body === undefined || opts.body === '') {\n      opts.headers.delete('Content-Type');\n    }\n\n    const url = buildUrl(opts);\n    const requestInit: ReqInit = {\n      redirect: 'follow',\n      ...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 = await _fetch(request);\n\n    for (const fn of interceptors.response.fns) {\n      if (fn) {\n        response = await fn(response, request, opts);\n      }\n    }\n\n    const result = {\n      request,\n      response,\n    };\n\n    if (response.ok) {\n      if (response.status === 204 || response.headers.get('Content-Length') === '0') {\n        return {\n          data: {},\n          ...result,\n        };\n      }\n\n      const parseAs =\n        (opts.parseAs === 'auto'\n          ? getParseAs(response.headers.get('Content-Type'))\n          : opts.parseAs) ?? 'json';\n\n      if (parseAs === 'stream') {\n        return {\n          data: response.body,\n          ...result,\n        };\n      }\n\n      let data = await response[parseAs]();\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 {\n        data,\n        ...result,\n      };\n    }\n\n    let error = await response.text();\n\n    try {\n      error = JSON.parse(error);\n    } catch {\n      // noop\n    }\n\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    return {\n      error: finalError,\n      ...result,\n    };\n  };\n\n  return {\n    buildUrl,\n    connect: (options) => request({ ...options, method: 'CONNECT' }),\n    delete: (options) => request({ ...options, method: 'DELETE' }),\n    get: (options) => request({ ...options, method: 'GET' }),\n    getConfig,\n    head: (options) => request({ ...options, method: 'HEAD' }),\n    interceptors,\n    options: (options) => request({ ...options, method: 'OPTIONS' }),\n    patch: (options) => request({ ...options, method: 'PATCH' }),\n    post: (options) => request({ ...options, method: 'POST' }),\n    put: (options) => request({ ...options, method: 'PUT' }),\n    request,\n    setConfig,\n    trace: (options) => request({ ...options, method: 'TRACE' }),\n  };\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/my-client/sdk-client-required/client/core/auth.ts",
    "content": "export 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/my-client/sdk-client-required/client/core/bodySerializer.ts",
    "content": "import type { ArrayStyle, ObjectStyle, SerializerOptions } from './pathSerializer';\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) => {\n  if (typeof value === 'string' || value instanceof Blob) {\n    data.append(key, value);\n  } else {\n    data.append(key, JSON.stringify(value));\n  }\n};\n\nconst serializeUrlSearchParamsPair = (data: URLSearchParams, key: string, value: unknown) => {\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) => {\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) =>\n    JSON.stringify(body, (_key, value) => (typeof value === 'bigint' ? value.toString() : value)),\n};\n\nexport const urlSearchParamsBodySerializer = {\n  bodySerializer: (body: unknown) => {\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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/my-client/sdk-client-required/client/core/params.ts",
    "content": "type Slot = 'body' | 'headers' | 'path' | 'query';\n\nexport type Field =\n  | {\n      in: Exclude<Slot, 'body'>;\n      key: string;\n      map?: string;\n    }\n  | {\n      in: Extract<Slot, 'body'>;\n      key?: string;\n      map?: string;\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\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 (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' && !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        (params[field.in] as Record<string, unknown>)[name] = arg;\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          const name = field.map || key;\n          (params[field.in] as Record<string, unknown>)[name] = value;\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 {\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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/my-client/sdk-client-required/client/core/pathSerializer.ts",
    "content": "interface 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/my-client/sdk-client-required/client/core/types.ts",
    "content": "import type { Auth, AuthToken } from './auth';\nimport type { BodySerializer, QuerySerializer, QuerySerializerOptions } from './bodySerializer';\n\nexport interface Client<RequestFn = never, Config = unknown, MethodFn = never, BuildUrlFn = never> {\n  /**\n   * Returns the final request URL.\n   */\n  buildUrl: BuildUrlFn;\n  connect: MethodFn;\n  delete: MethodFn;\n  get: MethodFn;\n  getConfig: () => Config;\n  head: MethodFn;\n  options: MethodFn;\n  patch: MethodFn;\n  post: MethodFn;\n  put: MethodFn;\n  request: RequestFn;\n  setConfig: (config: Config) => Config;\n  trace: MethodFn;\n}\n\nexport interface Config {\n  /**\n   * Auth token or a function returning auth token. The resolved value will be\n   * added to the request payload as defined by its `security` array.\n   */\n  auth?: ((auth: Auth) => Promise<AuthToken> | AuthToken) | AuthToken;\n  /**\n   * A function for serializing request body parameter. By default,\n   * {@link JSON.stringify()} will be used.\n   */\n  bodySerializer?: BodySerializer | null;\n  /**\n   * An object containing any HTTP headers that you want to pre-populate your\n   * `Headers` object with.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/Headers/Headers#init See more}\n   */\n  headers?:\n    | RequestInit['headers']\n    | Record<\n        string,\n        string | number | boolean | (string | number | boolean)[] | null | undefined | unknown\n      >;\n  /**\n   * The request method.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/fetch#method See more}\n   */\n  method?: 'CONNECT' | 'DELETE' | 'GET' | 'HEAD' | 'OPTIONS' | 'PATCH' | 'POST' | 'PUT' | 'TRACE';\n  /**\n   * A function for serializing request query parameters. By default, arrays\n   * will be exploded in form style, objects will be exploded in deepObject\n   * style, and reserved characters are percent-encoded.\n   *\n   * This method will have no effect if the native `paramsSerializer()` Axios\n   * API function is used.\n   *\n   * {@link https://swagger.io/docs/specification/serialization/#query View examples}\n   */\n  querySerializer?: QuerySerializer | QuerySerializerOptions;\n  /**\n   * A function transforming response data before it's returned. This is useful\n   * for post-processing data, e.g. converting ISO strings into Date objects.\n   */\n  responseTransformer?: (data: unknown) => Promise<unknown>;\n  /**\n   * A function validating response data. This is useful if you want to ensure\n   * the response conforms to the desired shape, so it can be safely passed to\n   * the transformers and returned to the user.\n   */\n  responseValidator?: (data: unknown) => Promise<unknown>;\n}\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/my-client/sdk-client-required/client/index.ts",
    "content": "export { createClient } from './client';\nexport type { Auth } from './core/auth';\nexport type { QuerySerializerOptions } from './core/bodySerializer';\nexport {\n  formDataBodySerializer,\n  jsonBodySerializer,\n  urlSearchParamsBodySerializer,\n} from './core/bodySerializer';\nexport type {\n  Client,\n  ClientOptions,\n  Config,\n  CreateClientConfig,\n  Options,\n  RequestOptions,\n  RequestResult,\n  TDataShape,\n} from './types';\nexport { createConfig } from './utils';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/my-client/sdk-client-required/client/plugin.ts",
    "content": "import {\n  type Client,\n  clientDefaultConfig,\n  clientDefaultMeta,\n  clientPluginHandler,\n  type DefinePlugin,\n  definePluginConfig,\n} from '@hey-api/openapi-ts';\n\nexport type Config = Client.Config & {\n  /**\n   * Plugin name. Must be unique.\n   */\n  name: string;\n};\n\nexport type MyClientPlugin = DefinePlugin<Config, Config>;\n\nexport const defaultConfig: MyClientPlugin['Config'] = {\n  ...clientDefaultMeta,\n  config: clientDefaultConfig,\n  handler: clientPluginHandler as MyClientPlugin['Handler'],\n  name: __filename,\n};\n\n/**\n * Type helper for `my-client` plugin, returns {@link Plugin.Config} object\n */\nexport const myClientPlugin = definePluginConfig(defaultConfig);\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/my-client/sdk-client-required/client/types.ts",
    "content": "import type { Auth } from './core/auth';\nimport type { Client as CoreClient, Config as CoreConfig } from './core/types';\nimport type { Middleware } from './utils';\n\nexport interface Config<T extends ClientOptions = ClientOptions>\n  extends Omit<RequestInit, 'body' | 'headers' | 'method'>, CoreConfig {\n  /**\n   * Base URL for all requests made by this client.\n   */\n  baseUrl?: T['baseUrl'];\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?: (request: Request) => ReturnType<typeof fetch>;\n  /**\n   * Return the response data parsed in a specified format. By default, `auto`\n   * will infer the appropriate method from the `Content-Type` response header.\n   * You can override this behavior with any of the {@link Body} methods.\n   * Select `stream` if you don't want to parse response data at all.\n   *\n   * @default 'auto'\n   */\n  parseAs?: 'arrayBuffer' | 'auto' | 'blob' | 'formData' | 'json' | 'stream' | 'text';\n  /**\n   * Throw an error instead of returning it in the response?\n   *\n   * @default false\n   */\n  throwOnError?: T['throwOnError'];\n}\n\nexport interface RequestOptions<\n  ThrowOnError extends boolean = boolean,\n  Url extends string = string,\n> extends Config<{\n  throwOnError: ThrowOnError;\n}> {\n  /**\n   * Any body that you want to add to your request.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/fetch#body}\n   */\n  body?: unknown;\n  path?: Record<string, unknown>;\n  query?: Record<string, unknown>;\n  /**\n   * Security mechanism(s) to use for the request.\n   */\n  security?: ReadonlyArray<Auth>;\n  url: Url;\n}\n\nexport type RequestResult<\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = boolean,\n> = ThrowOnError extends true\n  ? Promise<{\n      data: TData;\n      request: Request;\n      response: Response;\n    }>\n  : Promise<\n      ({ data: TData; error: undefined } | { data: undefined; error: TError }) & {\n        request: Request;\n        response: Response;\n      }\n    >;\n\nexport interface ClientOptions {\n  baseUrl?: string;\n  throwOnError?: boolean;\n}\n\ntype MethodFn = <TData = unknown, TError = unknown, ThrowOnError extends boolean = false>(\n  options: Omit<RequestOptions<ThrowOnError>, 'method'>,\n) => RequestResult<TData, TError, ThrowOnError>;\n\ntype RequestFn = <TData = unknown, TError = unknown, ThrowOnError extends boolean = false>(\n  options: Omit<RequestOptions<ThrowOnError>, 'method'> &\n    Pick<Required<RequestOptions<ThrowOnError>>, 'method'>,\n) => RequestResult<TData, TError, ThrowOnError>;\n\ntype BuildUrlFn = <\n  TData extends {\n    body?: unknown;\n    path?: Record<string, unknown>;\n    query?: Record<string, unknown>;\n    url: string;\n  },\n>(\n  options: TData & Options<TData>,\n) => string;\n\nexport type Client = CoreClient<RequestFn, Config, MethodFn, BuildUrlFn> & {\n  interceptors: Middleware<Request, Response, unknown, RequestOptions>;\n};\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 = ClientOptions> = (\n  override?: Config<ClientOptions & T>,\n) => Config<Required<ClientOptions> & T>;\n\nexport interface TDataShape {\n  body?: unknown;\n  headers?: unknown;\n  path?: unknown;\n  query?: unknown;\n  url: string;\n}\n\ntype OmitKeys<T, K> = Pick<T, Exclude<keyof T, K>>;\n\nexport type Options<\n  TData extends TDataShape = TDataShape,\n  ThrowOnError extends boolean = boolean,\n> = OmitKeys<RequestOptions<ThrowOnError>, 'body' | 'path' | 'query' | 'url'> & Omit<TData, 'url'>;\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/my-client/sdk-client-required/client/utils.ts",
    "content": "import { getAuthToken } from './core/auth';\nimport type { QuerySerializer, QuerySerializerOptions } from './core/bodySerializer';\nimport { jsonBodySerializer } from './core/bodySerializer';\nimport {\n  serializeArrayParam,\n  serializeObjectParam,\n  serializePrimitiveParam,\n} from './core/pathSerializer';\nimport type { Client, ClientOptions, Config, RequestOptions } from './types';\n\ninterface PathSerializer {\n  path: Record<string, unknown>;\n  url: string;\n}\n\nconst PATH_PARAM_RE = /\\{[^{}]+\\}/g;\n\ntype ArrayStyle = 'form' | 'spaceDelimited' | 'pipeDelimited';\ntype MatrixStyle = 'label' | 'matrix' | 'simple';\ntype ArraySeparatorStyle = ArrayStyle | MatrixStyle;\n\nconst 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 createQuerySerializer = <T = unknown>({\n  allowReserved,\n  array,\n  object,\n}: QuerySerializerOptions = {}) => {\n  const querySerializer = (queryParams: T) => {\n    let 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        if (Array.isArray(value)) {\n          search = [\n            ...search,\n            serializeArrayParam({\n              allowReserved,\n              explode: true,\n              name,\n              style: 'form',\n              value,\n              ...array,\n            }),\n          ];\n          continue;\n        }\n\n        if (typeof value === 'object') {\n          search = [\n            ...search,\n            serializeObjectParam({\n              allowReserved,\n              explode: true,\n              name,\n              style: 'deepObject',\n              value: value as Record<string, unknown>,\n              ...object,\n            }),\n          ];\n          continue;\n        }\n\n        search = [\n          ...search,\n          serializePrimitiveParam({\n            allowReserved,\n            name,\n            value: value as string,\n          }),\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\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    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    return;\n  }\n};\n\nexport const buildUrl: Client['buildUrl'] = (options) => {\n  const url = 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  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 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\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 || typeof header !== 'object') {\n      continue;\n    }\n\n    const iterator = header instanceof Headers ? header.entries() : 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/my-client/sdk-client-required/custom.gen.ts",
    "content": "// 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: 'http://localhost:3000/base' }));\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/my-client/sdk-client-required/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport { apiVVersionODataControllerCount, callToTestOrderOfParams, callWithDefaultOptionalParameters, callWithDefaultParameters, callWithDescriptions, callWithDuplicateResponses, callWithNoContentResponse, callWithParameters, callWithResponse, callWithResponseAndNoContentResponse, callWithResponses, callWithResultFromHeader, callWithWeirdParameterNames, collectionFormat, complexParams, complexTypes, deleteCallWithoutParametersAndResponse, deleteFoo, deprecatedCall, dummyA, dummyB, duplicateName, duplicateName2, duplicateName3, duplicateName4, export_, fileResponse, fooWow, getApiVbyApiVersionSimpleOperation, getCallWithOptionalParam, getCallWithoutParametersAndResponse, headCallWithoutParametersAndResponse, import_, multipartRequest, multipartResponse, nonAsciiæøåÆøÅöôêÊ字符串, type Options, optionsCallWithoutParametersAndResponse, patchApiVbyApiVersionNoTag, patchCallWithoutParametersAndResponse, postApiVbyApiVersionFormData, postApiVbyApiVersionRequestBody, postCallWithOptionalParam, postCallWithoutParametersAndResponse, putCallWithoutParametersAndResponse, putWithFormUrlEncoded, testErrorCode, types, uploadFile } from './sdk.gen';\nexport type { _3eNum1Период, _400, AdditionalPropertiesIntegerIssue, AdditionalPropertiesUnknownIssue, AdditionalPropertiesUnknownIssue2, AdditionalPropertiesUnknownIssue3, AdditionalPropertiesUnknownIssueWritable, AnyOfAnyAndNull, AnyOfArrays, ApiVVersionODataControllerCountData, ApiVVersionODataControllerCountResponse, ApiVVersionODataControllerCountResponses, ArrayWithAnyOfProperties, ArrayWithArray, ArrayWithBooleans, ArrayWithNumbers, ArrayWithProperties, ArrayWithReferences, ArrayWithStrings, CallToTestOrderOfParamsData, CallWithDefaultOptionalParametersData, CallWithDefaultParametersData, CallWithDescriptionsData, CallWithDuplicateResponsesData, CallWithDuplicateResponsesError, CallWithDuplicateResponsesErrors, CallWithDuplicateResponsesResponse, CallWithDuplicateResponsesResponses, CallWithNoContentResponseData, CallWithNoContentResponseResponse, CallWithNoContentResponseResponses, CallWithParametersData, CallWithResponseAndNoContentResponseData, CallWithResponseAndNoContentResponseResponse, CallWithResponseAndNoContentResponseResponses, CallWithResponseData, CallWithResponseResponse, CallWithResponseResponses, CallWithResponsesData, CallWithResponsesError, CallWithResponsesErrors, CallWithResponsesResponse, CallWithResponsesResponses, CallWithResultFromHeaderData, CallWithResultFromHeaderErrors, CallWithResultFromHeaderResponses, CallWithWeirdParameterNamesData, CamelCaseCommentWithBreaks, CharactersInDescription, ClientOptions, CollectionFormatData, CommentWithBackticks, CommentWithBackticksAndQuotes, CommentWithBreaks, CommentWithExpressionPlaceholders, CommentWithQuotes, CommentWithReservedCharacters, CommentWithSlashes, ComplexParamsData, ComplexParamsResponse, ComplexParamsResponses, ComplexTypesData, ComplexTypesErrors, ComplexTypesResponse, ComplexTypesResponses, CompositionBaseModel, CompositionExtendedModel, CompositionWithAllOfAndNullable, CompositionWithAnyOf, CompositionWithAnyOfAndNullable, CompositionWithAnyOfAnonymous, CompositionWithNestedAnyAndTypeNull, CompositionWithNestedAnyOfAndNull, CompositionWithOneOf, CompositionWithOneOfAndComplexArrayDictionary, CompositionWithOneOfAndNullable, CompositionWithOneOfAndProperties, CompositionWithOneOfAndSimpleArrayDictionary, CompositionWithOneOfAndSimpleDictionary, CompositionWithOneOfAnonymous, CompositionWithOneOfDiscriminator, ConstValue, Default, DeleteCallWithoutParametersAndResponseData, DeleteFooData, DeleteFooData2, DeleteFooData3, DeprecatedCallData, DeprecatedModel, DictionaryWithArray, DictionaryWithDictionary, DictionaryWithProperties, DictionaryWithPropertiesAndAdditionalProperties, DictionaryWithReference, DictionaryWithString, DummyAData, DummyAResponse, DummyAResponses, DummyBData, DummyBResponse, DummyBResponses, DuplicateName2Data, DuplicateName3Data, DuplicateName4Data, DuplicateNameData, EnumFromDescription, EnumWithExtensions, EnumWithNumbers, EnumWithReplacedCharacters, EnumWithStrings, EnumWithXEnumNames, ExportData, ExternalRefA, ExternalRefB, ExternalSharedModel, File, FileResponseData, FileResponseResponse, FileResponseResponses, FileWritable, FooWowData, FooWowResponses, FreeFormObjectWithAdditionalPropertiesEqEmptyObject, FreeFormObjectWithAdditionalPropertiesEqTrue, FreeFormObjectWithoutAdditionalProperties, GenericSchemaDuplicateIssue1SystemBoolean, GenericSchemaDuplicateIssue1SystemBooleanWritable, GenericSchemaDuplicateIssue1SystemString, GenericSchemaDuplicateIssue1SystemStringWritable, GetApiVbyApiVersionSimpleOperationData, GetApiVbyApiVersionSimpleOperationError, GetApiVbyApiVersionSimpleOperationErrors, GetApiVbyApiVersionSimpleOperationResponse, GetApiVbyApiVersionSimpleOperationResponses, GetCallWithOptionalParamData, GetCallWithoutParametersAndResponseData, HeadCallWithoutParametersAndResponseData, Import, ImportData, ImportResponse, ImportResponses, IoK8sApimachineryPkgApisMetaV1DeleteOptions, IoK8sApimachineryPkgApisMetaV1Preconditions, ModelCircle, ModelFromZendesk, ModelSquare, ModelThatExtends, ModelThatExtendsExtends, ModelWithAdditionalPropertiesEqTrue, ModelWithAdditionalPropertiesRef, ModelWithAnyOfConstantSizeArray, ModelWithAnyOfConstantSizeArrayAndIntersect, ModelWithAnyOfConstantSizeArrayNullable, ModelWithAnyOfConstantSizeArrayWithNSizeAndOptions, ModelWithAnyOfConstantSizeArrayWithNSizeAndOptionsWritable, ModelWithArray, ModelWithArrayReadOnlyAndWriteOnly, ModelWithArrayReadOnlyAndWriteOnlyWritable, ModelWithBackticksInDescription, ModelWithBoolean, ModelWithCircularReference, ModelWithConst, ModelWithConstantSizeArray, ModelWithDictionary, ModelWithDuplicateImports, ModelWithDuplicateProperties, ModelWithEnum, ModelWithEnumFromDescription, ModelWithEnumWithHyphen, ModelWithInteger, ModelWithNestedArrayEnums, ModelWithNestedArrayEnumsData, ModelWithNestedArrayEnumsDataBar, ModelWithNestedArrayEnumsDataFoo, ModelWithNestedCompositionEnums, ModelWithNestedEnums, ModelWithNestedProperties, ModelWithNullableObject, ModelWithNullableString, ModelWithNumericEnumUnion, ModelWithOneOfAndProperties, ModelWithOneOfEnum, ModelWithOrderedProperties, ModelWithPattern, ModelWithPatternWritable, ModelWithPrefixItemsConstantSizeArray, ModelWithProperties, ModelWithPropertiesWritable, ModelWithReadOnlyAndWriteOnly, ModelWithReadOnlyAndWriteOnlyWritable, ModelWithReference, ModelWithReferenceWritable, ModelWithString, ModelWithStringError, MultipartRequestData, MultipartResponseData, MultipartResponseResponse, MultipartResponseResponses, NestedAnyOfArraysNullable, NonAsciiæøåÆøÅöôêÊ字符串Data, NonAsciiæøåÆøÅöôêÊ字符串Response, NonAsciiæøåÆøÅöôêÊ字符串Responses, NonAsciiStringæøåÆøÅöôêÊ字符串, NullableObject, OneOfAllOfIssue, OneOfAllOfIssueWritable, OptionsCallWithoutParametersAndResponseData, Pageable, ParameterSimpleParameterUnused, PatchApiVbyApiVersionNoTagData, PatchApiVbyApiVersionNoTagResponses, PatchCallWithoutParametersAndResponseData, PostApiVbyApiVersionFormDataData, PostApiVbyApiVersionRequestBodyData, PostCallWithOptionalParamData, PostCallWithOptionalParamResponse, PostCallWithOptionalParamResponses, PostCallWithoutParametersAndResponseData, PostServiceWithEmptyTagResponse, PostServiceWithEmptyTagResponse2, PutCallWithoutParametersAndResponseData, PutWithFormUrlEncodedData, SchemaWithFormRestrictedKeys, SimpleBoolean, SimpleFile, SimpleFormData, SimpleInteger, SimpleParameter, SimpleReference, SimpleRequestBody, SimpleString, SimpleStringWithPattern, TestErrorCodeData, TestErrorCodeErrors, TestErrorCodeResponses, TypesData, TypesResponse, TypesResponses, UploadFileData, UploadFileResponse, UploadFileResponses, XFooBar } from './types.gen';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/my-client/sdk-client-required/sdk.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport { type Client, formDataBodySerializer, type Options as Options2, type TDataShape, urlSearchParamsBodySerializer } from './client';\nimport type { ApiVVersionODataControllerCountData, ApiVVersionODataControllerCountResponses, CallToTestOrderOfParamsData, CallWithDefaultOptionalParametersData, CallWithDefaultParametersData, CallWithDescriptionsData, CallWithDuplicateResponsesData, CallWithDuplicateResponsesErrors, CallWithDuplicateResponsesResponses, CallWithNoContentResponseData, CallWithNoContentResponseResponses, CallWithParametersData, CallWithResponseAndNoContentResponseData, CallWithResponseAndNoContentResponseResponses, CallWithResponseData, CallWithResponseResponses, CallWithResponsesData, CallWithResponsesErrors, CallWithResponsesResponses, CallWithResultFromHeaderData, CallWithResultFromHeaderErrors, CallWithResultFromHeaderResponses, CallWithWeirdParameterNamesData, CollectionFormatData, ComplexParamsData, ComplexParamsResponses, ComplexTypesData, ComplexTypesErrors, ComplexTypesResponses, DeleteCallWithoutParametersAndResponseData, DeleteFooData3, DeprecatedCallData, DummyAData, DummyAResponses, DummyBData, DummyBResponses, DuplicateName2Data, DuplicateName3Data, DuplicateName4Data, DuplicateNameData, ExportData, FileResponseData, FileResponseResponses, FooWowData, FooWowResponses, GetApiVbyApiVersionSimpleOperationData, GetApiVbyApiVersionSimpleOperationErrors, GetApiVbyApiVersionSimpleOperationResponses, GetCallWithOptionalParamData, GetCallWithoutParametersAndResponseData, HeadCallWithoutParametersAndResponseData, ImportData, ImportResponses, MultipartRequestData, MultipartResponseData, MultipartResponseResponses, NonAsciiæøåÆøÅöôêÊ字符串Data, NonAsciiæøåÆøÅöôêÊ字符串Responses, OptionsCallWithoutParametersAndResponseData, PatchApiVbyApiVersionNoTagData, PatchApiVbyApiVersionNoTagResponses, PatchCallWithoutParametersAndResponseData, PostApiVbyApiVersionFormDataData, PostApiVbyApiVersionRequestBodyData, PostCallWithOptionalParamData, PostCallWithOptionalParamResponses, PostCallWithoutParametersAndResponseData, PutCallWithoutParametersAndResponseData, PutWithFormUrlEncodedData, TestErrorCodeData, TestErrorCodeErrors, TestErrorCodeResponses, TypesData, TypesResponses, UploadFileData, UploadFileResponses } from './types.gen';\n\nexport type Options<TData extends TDataShape = TDataShape, ThrowOnError extends boolean = boolean> = Options2<TData, ThrowOnError> & {\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\nexport const export_ = <ThrowOnError extends boolean = false>(options: Options<ExportData, ThrowOnError>) => options.client.get<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/no+tag', ...options });\n\nexport const patchApiVbyApiVersionNoTag = <ThrowOnError extends boolean = false>(options: Options<PatchApiVbyApiVersionNoTagData, ThrowOnError>) => options.client.patch<PatchApiVbyApiVersionNoTagResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/no+tag', ...options });\n\nexport const import_ = <ThrowOnError extends boolean = false>(options: Options<ImportData, ThrowOnError>) => options.client.post<ImportResponses, unknown, ThrowOnError>({\n    url: '/api/v{api-version}/no+tag',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options.headers\n    }\n});\n\nexport const fooWow = <ThrowOnError extends boolean = false>(options: Options<FooWowData, ThrowOnError>) => options.client.put<FooWowResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/no+tag', ...options });\n\nexport const apiVVersionODataControllerCount = <ThrowOnError extends boolean = false>(options: Options<ApiVVersionODataControllerCountData, ThrowOnError>) => options.client.get<ApiVVersionODataControllerCountResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple/$count', ...options });\n\nexport const getApiVbyApiVersionSimpleOperation = <ThrowOnError extends boolean = false>(options: Options<GetApiVbyApiVersionSimpleOperationData, ThrowOnError>) => options.client.get<GetApiVbyApiVersionSimpleOperationResponses, GetApiVbyApiVersionSimpleOperationErrors, ThrowOnError>({ url: '/api/v{api-version}/simple:operation', ...options });\n\nexport const deleteCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options: Options<DeleteCallWithoutParametersAndResponseData, ThrowOnError>) => options.client.delete<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const getCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options: Options<GetCallWithoutParametersAndResponseData, ThrowOnError>) => options.client.get<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const headCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options: Options<HeadCallWithoutParametersAndResponseData, ThrowOnError>) => options.client.head<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const optionsCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options: Options<OptionsCallWithoutParametersAndResponseData, ThrowOnError>) => options.client.options<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const patchCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options: Options<PatchCallWithoutParametersAndResponseData, ThrowOnError>) => options.client.patch<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const postCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options: Options<PostCallWithoutParametersAndResponseData, ThrowOnError>) => options.client.post<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const putCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options: Options<PutCallWithoutParametersAndResponseData, ThrowOnError>) => options.client.put<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const deleteFoo = <ThrowOnError extends boolean = false>(options: Options<DeleteFooData3, ThrowOnError>) => options.client.delete<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/foo/{foo_param}/bar/{BarParam}', ...options });\n\nexport const callWithDescriptions = <ThrowOnError extends boolean = false>(options: Options<CallWithDescriptionsData, ThrowOnError>) => options.client.post<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/descriptions', ...options });\n\n/**\n * @deprecated\n */\nexport const deprecatedCall = <ThrowOnError extends boolean = false>(options: Options<DeprecatedCallData, ThrowOnError>) => options.client.post<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/parameters/deprecated', ...options });\n\nexport const callWithParameters = <ThrowOnError extends boolean = false>(options: Options<CallWithParametersData, ThrowOnError>) => options.client.post<unknown, unknown, ThrowOnError>({\n    url: '/api/v{api-version}/parameters/{parameterPath}',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options.headers\n    }\n});\n\nexport const callWithWeirdParameterNames = <ThrowOnError extends boolean = false>(options: Options<CallWithWeirdParameterNamesData, ThrowOnError>) => options.client.post<unknown, unknown, ThrowOnError>({\n    url: '/api/v{api-version}/parameters/{parameter.path.1}/{parameter-path-2}/{PARAMETER-PATH-3}',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options.headers\n    }\n});\n\nexport const getCallWithOptionalParam = <ThrowOnError extends boolean = false>(options: Options<GetCallWithOptionalParamData, ThrowOnError>) => options.client.get<unknown, unknown, ThrowOnError>({\n    url: '/api/v{api-version}/parameters',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options.headers\n    }\n});\n\nexport const postCallWithOptionalParam = <ThrowOnError extends boolean = false>(options: Options<PostCallWithOptionalParamData, ThrowOnError>) => options.client.post<PostCallWithOptionalParamResponses, unknown, ThrowOnError>({\n    url: '/api/v{api-version}/parameters',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options.headers\n    }\n});\n\nexport const postApiVbyApiVersionRequestBody = <ThrowOnError extends boolean = false>(options: Options<PostApiVbyApiVersionRequestBodyData, ThrowOnError>) => options.client.post<unknown, unknown, ThrowOnError>({\n    url: '/api/v{api-version}/requestBody',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options.headers\n    }\n});\n\nexport const postApiVbyApiVersionFormData = <ThrowOnError extends boolean = false>(options: Options<PostApiVbyApiVersionFormDataData, ThrowOnError>) => options.client.post<unknown, unknown, ThrowOnError>({\n    ...formDataBodySerializer,\n    url: '/api/v{api-version}/formData',\n    ...options,\n    headers: {\n        'Content-Type': null,\n        ...options.headers\n    }\n});\n\nexport const callWithDefaultParameters = <ThrowOnError extends boolean = false>(options: Options<CallWithDefaultParametersData, ThrowOnError>) => options.client.get<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/defaults', ...options });\n\nexport const callWithDefaultOptionalParameters = <ThrowOnError extends boolean = false>(options: Options<CallWithDefaultOptionalParametersData, ThrowOnError>) => options.client.post<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/defaults', ...options });\n\nexport const callToTestOrderOfParams = <ThrowOnError extends boolean = false>(options: Options<CallToTestOrderOfParamsData, ThrowOnError>) => options.client.put<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/defaults', ...options });\n\nexport const duplicateName = <ThrowOnError extends boolean = false>(options: Options<DuplicateNameData, ThrowOnError>) => options.client.delete<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/duplicate', ...options });\n\nexport const duplicateName2 = <ThrowOnError extends boolean = false>(options: Options<DuplicateName2Data, ThrowOnError>) => options.client.get<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/duplicate', ...options });\n\nexport const duplicateName3 = <ThrowOnError extends boolean = false>(options: Options<DuplicateName3Data, ThrowOnError>) => options.client.post<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/duplicate', ...options });\n\nexport const duplicateName4 = <ThrowOnError extends boolean = false>(options: Options<DuplicateName4Data, ThrowOnError>) => options.client.put<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/duplicate', ...options });\n\nexport const callWithNoContentResponse = <ThrowOnError extends boolean = false>(options: Options<CallWithNoContentResponseData, ThrowOnError>) => options.client.get<CallWithNoContentResponseResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/no-content', ...options });\n\nexport const callWithResponseAndNoContentResponse = <ThrowOnError extends boolean = false>(options: Options<CallWithResponseAndNoContentResponseData, ThrowOnError>) => options.client.get<CallWithResponseAndNoContentResponseResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/multiple-tags/response-and-no-content', ...options });\n\nexport const dummyA = <ThrowOnError extends boolean = false>(options: Options<DummyAData, ThrowOnError>) => options.client.get<DummyAResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/multiple-tags/a', ...options });\n\nexport const dummyB = <ThrowOnError extends boolean = false>(options: Options<DummyBData, ThrowOnError>) => options.client.get<DummyBResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/multiple-tags/b', ...options });\n\nexport const callWithResponse = <ThrowOnError extends boolean = false>(options: Options<CallWithResponseData, ThrowOnError>) => options.client.get<CallWithResponseResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/response', ...options });\n\nexport const callWithDuplicateResponses = <ThrowOnError extends boolean = false>(options: Options<CallWithDuplicateResponsesData, ThrowOnError>) => options.client.post<CallWithDuplicateResponsesResponses, CallWithDuplicateResponsesErrors, ThrowOnError>({ url: '/api/v{api-version}/response', ...options });\n\nexport const callWithResponses = <ThrowOnError extends boolean = false>(options: Options<CallWithResponsesData, ThrowOnError>) => options.client.put<CallWithResponsesResponses, CallWithResponsesErrors, ThrowOnError>({ url: '/api/v{api-version}/response', ...options });\n\nexport const collectionFormat = <ThrowOnError extends boolean = false>(options: Options<CollectionFormatData, ThrowOnError>) => options.client.get<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/collectionFormat', ...options });\n\nexport const types = <ThrowOnError extends boolean = false>(options: Options<TypesData, ThrowOnError>) => options.client.get<TypesResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/types', ...options });\n\nexport const uploadFile = <ThrowOnError extends boolean = false>(options: Options<UploadFileData, ThrowOnError>) => options.client.post<UploadFileResponses, unknown, ThrowOnError>({\n    ...urlSearchParamsBodySerializer,\n    url: '/api/v{api-version}/upload',\n    ...options,\n    headers: {\n        'Content-Type': 'application/x-www-form-urlencoded',\n        ...options.headers\n    }\n});\n\nexport const fileResponse = <ThrowOnError extends boolean = false>(options: Options<FileResponseData, ThrowOnError>) => options.client.get<FileResponseResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/file/{id}', ...options });\n\nexport const complexTypes = <ThrowOnError extends boolean = false>(options: Options<ComplexTypesData, ThrowOnError>) => options.client.get<ComplexTypesResponses, ComplexTypesErrors, ThrowOnError>({\n    querySerializer: { parameters: { parameterObject: { object: { style: 'form' } } } },\n    url: '/api/v{api-version}/complex',\n    ...options\n});\n\nexport const multipartResponse = <ThrowOnError extends boolean = false>(options: Options<MultipartResponseData, ThrowOnError>) => options.client.get<MultipartResponseResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/multipart', ...options });\n\nexport const multipartRequest = <ThrowOnError extends boolean = false>(options: Options<MultipartRequestData, ThrowOnError>) => options.client.post<unknown, unknown, ThrowOnError>({\n    ...formDataBodySerializer,\n    url: '/api/v{api-version}/multipart',\n    ...options,\n    headers: {\n        'Content-Type': null,\n        ...options.headers\n    }\n});\n\nexport const complexParams = <ThrowOnError extends boolean = false>(options: Options<ComplexParamsData, ThrowOnError>) => options.client.put<ComplexParamsResponses, unknown, ThrowOnError>({\n    url: '/api/v{api-version}/complex/{id}',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json-patch+json',\n        ...options.headers\n    }\n});\n\nexport const callWithResultFromHeader = <ThrowOnError extends boolean = false>(options: Options<CallWithResultFromHeaderData, ThrowOnError>) => options.client.post<CallWithResultFromHeaderResponses, CallWithResultFromHeaderErrors, ThrowOnError>({ url: '/api/v{api-version}/header', ...options });\n\nexport const testErrorCode = <ThrowOnError extends boolean = false>(options: Options<TestErrorCodeData, ThrowOnError>) => options.client.post<TestErrorCodeResponses, TestErrorCodeErrors, ThrowOnError>({ url: '/api/v{api-version}/error', ...options });\n\nexport const nonAsciiæøåÆøÅöôêÊ字符串 = <ThrowOnError extends boolean = false>(options: Options<NonAsciiæøåÆøÅöôêÊ字符串Data, ThrowOnError>) => options.client.post<NonAsciiæøåÆøÅöôêÊ字符串Responses, unknown, ThrowOnError>({ url: '/api/v{api-version}/non-ascii-æøåÆØÅöôêÊ字符串', ...options });\n\n/**\n * Login User\n */\nexport const putWithFormUrlEncoded = <ThrowOnError extends boolean = false>(options: Options<PutWithFormUrlEncodedData, ThrowOnError>) => options.client.put<unknown, unknown, ThrowOnError>({\n    ...urlSearchParamsBodySerializer,\n    url: '/api/v{api-version}/non-ascii-æøåÆØÅöôêÊ字符串',\n    ...options,\n    headers: {\n        'Content-Type': 'application/x-www-form-urlencoded',\n        ...options.headers\n    }\n});\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/my-client/sdk-client-required/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type ClientOptions = {\n    baseUrl: 'http://localhost:3000/base' | (string & {});\n};\n\n/**\n * Model with number-only name\n */\nexport type _400 = string;\n\n/**\n * External ref to shared model (A)\n */\nexport type ExternalRefA = ExternalSharedModel;\n\n/**\n * External ref to shared model (B)\n */\nexport type ExternalRefB = ExternalSharedModel;\n\n/**\n * Testing multiline comments in string: First line\n * Second line\n *\n * Fourth line\n */\nexport type CamelCaseCommentWithBreaks = number;\n\n/**\n * Testing multiline comments in string: First line\n * Second line\n *\n * Fourth line\n */\nexport type CommentWithBreaks = number;\n\n/**\n * Testing backticks in string: `backticks` and ```multiple backticks``` should work\n */\nexport type CommentWithBackticks = number;\n\n/**\n * Testing backticks and quotes in string: `backticks`, 'quotes', \"double quotes\" and ```multiple backticks``` should work\n */\nexport type CommentWithBackticksAndQuotes = number;\n\n/**\n * Testing slashes in string: \\backwards\\\\\\ and /forwards/// should work\n */\nexport type CommentWithSlashes = number;\n\n/**\n * Testing expression placeholders in string: ${expression} should work\n */\nexport type CommentWithExpressionPlaceholders = number;\n\n/**\n * Testing quotes in string: 'single quote''' and \"double quotes\"\"\" should work\n */\nexport type CommentWithQuotes = number;\n\n/**\n * Testing reserved characters in string: * inline * and ** inline ** should work\n */\nexport type CommentWithReservedCharacters = number;\n\n/**\n * This is a simple number\n */\nexport type SimpleInteger = number;\n\n/**\n * This is a simple boolean\n */\nexport type SimpleBoolean = boolean;\n\n/**\n * This is a simple string\n */\nexport type SimpleString = string;\n\n/**\n * A string with non-ascii (unicode) characters valid in typescript identifiers (æøåÆØÅöÔèÈ字符串)\n */\nexport type NonAsciiStringæøåÆøÅöôêÊ字符串 = string;\n\n/**\n * This is a simple file\n */\nexport type SimpleFile = Blob | File;\n\n/**\n * This is a simple reference\n */\nexport type SimpleReference = ModelWithString;\n\n/**\n * This is a simple string\n */\nexport type SimpleStringWithPattern = string | null;\n\n/**\n * This is a simple enum with strings\n */\nexport type EnumWithStrings = 'Success' | 'Warning' | 'Error' | '\\'Single Quote\\'' | '\"Double Quotes\"' | 'Non-ascii: øæåôöØÆÅÔÖ字符串';\n\nexport type EnumWithReplacedCharacters = '\\'Single Quote\\'' | '\"Double Quotes\"' | 'øæåôöØÆÅÔÖ字符串' | 3.1 | '';\n\n/**\n * This is a simple enum with numbers\n */\nexport type EnumWithNumbers = 1 | 2 | 3 | 1.1 | 1.2 | 1.3 | 100 | 200 | 300 | -100 | -200 | -300 | -1.1 | -1.2 | -1.3;\n\n/**\n * Success=1,Warning=2,Error=3\n */\nexport type EnumFromDescription = number;\n\n/**\n * This is a simple enum with numbers\n */\nexport type EnumWithExtensions = 200 | 400 | 500;\n\nexport type EnumWithXEnumNames = 0 | 1 | 2;\n\n/**\n * This is a simple array with numbers\n */\nexport type ArrayWithNumbers = Array<number>;\n\n/**\n * This is a simple array with booleans\n */\nexport type ArrayWithBooleans = Array<boolean>;\n\n/**\n * This is a simple array with strings\n */\nexport type ArrayWithStrings = Array<string>;\n\n/**\n * This is a simple array with references\n */\nexport type ArrayWithReferences = Array<ModelWithString>;\n\n/**\n * This is a simple array containing an array\n */\nexport type ArrayWithArray = Array<Array<ModelWithString>>;\n\n/**\n * This is a simple array with properties\n */\nexport type ArrayWithProperties = Array<{\n    '16x16'?: CamelCaseCommentWithBreaks;\n    bar?: string;\n}>;\n\n/**\n * This is a simple array with any of properties\n */\nexport type ArrayWithAnyOfProperties = Array<{\n    foo?: string;\n} | {\n    bar?: string;\n}>;\n\nexport type AnyOfAnyAndNull = {\n    data?: unknown | null;\n};\n\n/**\n * This is a simple array with any of properties\n */\nexport type AnyOfArrays = {\n    results?: Array<{\n        foo?: string;\n    } | {\n        bar?: string;\n    }>;\n};\n\n/**\n * This is a string dictionary\n */\nexport type DictionaryWithString = {\n    [key: string]: string;\n};\n\nexport type DictionaryWithPropertiesAndAdditionalProperties = {\n    foo?: number;\n    bar?: boolean;\n    [key: string]: string | number | boolean | undefined;\n};\n\n/**\n * This is a string reference\n */\nexport type DictionaryWithReference = {\n    [key: string]: ModelWithString;\n};\n\n/**\n * This is a complex dictionary\n */\nexport type DictionaryWithArray = {\n    [key: string]: Array<ModelWithString>;\n};\n\n/**\n * This is a string dictionary\n */\nexport type DictionaryWithDictionary = {\n    [key: string]: {\n        [key: string]: string;\n    };\n};\n\n/**\n * This is a complex dictionary\n */\nexport type DictionaryWithProperties = {\n    [key: string]: {\n        foo?: string;\n        bar?: string;\n    };\n};\n\n/**\n * This is a model with one number property\n */\nexport type ModelWithInteger = {\n    /**\n     * This is a simple number property\n     */\n    prop?: number;\n};\n\n/**\n * This is a model with one boolean property\n */\nexport type ModelWithBoolean = {\n    /**\n     * This is a simple boolean property\n     */\n    prop?: boolean;\n};\n\n/**\n * This is a model with one string property\n */\nexport type ModelWithString = {\n    /**\n     * This is a simple string property\n     */\n    prop?: string;\n};\n\n/**\n * This is a model with one string property\n */\nexport type ModelWithStringError = {\n    /**\n     * This is a simple string property\n     */\n    prop?: string;\n};\n\n/**\n * `Comment` or `VoiceComment`. The JSON object for adding voice comments to tickets is different. See [Adding voice comments to tickets](/documentation/ticketing/managing-tickets/adding-voice-comments-to-tickets)\n */\nexport type ModelFromZendesk = string;\n\n/**\n * This is a model with one string property\n */\nexport type ModelWithNullableString = {\n    /**\n     * This is a simple string property\n     */\n    nullableProp1?: string | null;\n    /**\n     * This is a simple string property\n     */\n    nullableRequiredProp1: string | null;\n    /**\n     * This is a simple string property\n     */\n    nullableProp2?: string | null;\n    /**\n     * This is a simple string property\n     */\n    nullableRequiredProp2: string | null;\n    /**\n     * This is a simple enum with strings\n     */\n    'foo_bar-enum'?: 'Success' | 'Warning' | 'Error' | 'ØÆÅ字符串';\n};\n\n/**\n * This is a model with one enum\n */\nexport type ModelWithEnum = {\n    /**\n     * This is a simple enum with strings\n     */\n    'foo_bar-enum'?: 'Success' | 'Warning' | 'Error' | 'ØÆÅ字符串';\n    /**\n     * These are the HTTP error code enums\n     */\n    statusCode?: '100' | '200 FOO' | '300 FOO_BAR' | '400 foo-bar' | '500 foo.bar' | '600 foo&bar';\n    /**\n     * Simple boolean enum\n     */\n    bool?: true;\n};\n\n/**\n * This is a model with one enum with escaped name\n */\nexport type ModelWithEnumWithHyphen = {\n    /**\n     * Foo-Bar-Baz-Qux\n     */\n    'foo-bar-baz-qux'?: '3.0';\n};\n\n/**\n * This is a model with one enum\n */\nexport type ModelWithEnumFromDescription = {\n    /**\n     * Success=1,Warning=2,Error=3\n     */\n    test?: number;\n};\n\n/**\n * This is a model with nested enums\n */\nexport type ModelWithNestedEnums = {\n    dictionaryWithEnum?: {\n        [key: string]: 'Success' | 'Warning' | 'Error';\n    };\n    dictionaryWithEnumFromDescription?: {\n        [key: string]: number;\n    };\n    arrayWithEnum?: Array<'Success' | 'Warning' | 'Error'>;\n    arrayWithDescription?: Array<number>;\n    /**\n     * This is a simple enum with strings\n     */\n    'foo_bar-enum'?: 'Success' | 'Warning' | 'Error' | 'ØÆÅ字符串';\n};\n\n/**\n * This is a model with one property containing a reference\n */\nexport type ModelWithReference = {\n    prop?: ModelWithProperties;\n};\n\n/**\n * This is a model with one property containing an array\n */\nexport type ModelWithArrayReadOnlyAndWriteOnly = {\n    prop?: Array<ModelWithReadOnlyAndWriteOnly>;\n    propWithFile?: Array<Blob | File>;\n    propWithNumber?: Array<number>;\n};\n\n/**\n * This is a model with one property containing an array\n */\nexport type ModelWithArray = {\n    prop?: Array<ModelWithString>;\n    propWithFile?: Array<Blob | File>;\n    propWithNumber?: Array<number>;\n};\n\n/**\n * This is a model with one property containing a dictionary\n */\nexport type ModelWithDictionary = {\n    prop?: {\n        [key: string]: string;\n    };\n};\n\n/**\n * This is a deprecated model with a deprecated property\n *\n * @deprecated\n */\nexport type DeprecatedModel = {\n    /**\n     * This is a deprecated property\n     *\n     * @deprecated\n     */\n    prop?: string;\n};\n\n/**\n * This is a model with one property containing a circular reference\n */\nexport type ModelWithCircularReference = {\n    prop?: ModelWithCircularReference;\n};\n\n/**\n * This is a model with one property with a 'one of' relationship\n */\nexport type CompositionWithOneOf = {\n    propA?: ModelWithString | ModelWithEnum | ModelWithArray | ModelWithDictionary;\n};\n\n/**\n * This is a model with one property with a 'one of' relationship where the options are not $ref\n */\nexport type CompositionWithOneOfAnonymous = {\n    propA?: {\n        propA?: string;\n    } | string | number;\n};\n\n/**\n * Circle\n */\nexport type ModelCircle = {\n    kind: string;\n    radius?: number;\n};\n\n/**\n * Square\n */\nexport type ModelSquare = {\n    kind: string;\n    sideLength?: number;\n};\n\n/**\n * This is a model with one property with a 'one of' relationship where the options are not $ref\n */\nexport type CompositionWithOneOfDiscriminator = ({\n    kind: 'circle';\n} & ModelCircle) | ({\n    kind: 'square';\n} & ModelSquare);\n\n/**\n * This is a model with one property with a 'any of' relationship\n */\nexport type CompositionWithAnyOf = {\n    propA?: ModelWithString | ModelWithEnum | ModelWithArray | ModelWithDictionary;\n};\n\n/**\n * This is a model with one property with a 'any of' relationship where the options are not $ref\n */\nexport type CompositionWithAnyOfAnonymous = {\n    propA?: {\n        propA?: string;\n    } | string | number;\n};\n\n/**\n * This is a model with nested 'any of' property with a type null\n */\nexport type CompositionWithNestedAnyAndTypeNull = {\n    propA?: Array<ModelWithDictionary | null> | Array<ModelWithArray | null>;\n};\n\nexport type _3eNum1Период = 'Bird' | 'Dog';\n\nexport type ConstValue = 'ConstValue';\n\n/**\n * This is a model with one property with a 'any of' relationship where the options are not $ref\n */\nexport type CompositionWithNestedAnyOfAndNull = {\n    /**\n     * Scopes\n     */\n    propA?: Array<_3eNum1Период | ConstValue> | null;\n};\n\n/**\n * This is a model with one property with a 'one of' relationship\n */\nexport type CompositionWithOneOfAndNullable = {\n    propA?: {\n        boolean?: boolean;\n    } | ModelWithEnum | ModelWithArray | ModelWithDictionary | null;\n};\n\n/**\n * This is a model that contains a simple dictionary within composition\n */\nexport type CompositionWithOneOfAndSimpleDictionary = {\n    propA?: boolean | {\n        [key: string]: number;\n    };\n};\n\n/**\n * This is a model that contains a dictionary of simple arrays within composition\n */\nexport type CompositionWithOneOfAndSimpleArrayDictionary = {\n    propA?: boolean | {\n        [key: string]: Array<boolean>;\n    };\n};\n\n/**\n * This is a model that contains a dictionary of complex arrays (composited) within composition\n */\nexport type CompositionWithOneOfAndComplexArrayDictionary = {\n    propA?: boolean | {\n        [key: string]: Array<number | string>;\n    };\n};\n\n/**\n * This is a model with one property with a 'all of' relationship\n */\nexport type CompositionWithAllOfAndNullable = {\n    propA?: ({\n        boolean?: boolean;\n    } & ModelWithEnum & ModelWithArray & ModelWithDictionary) | null;\n};\n\n/**\n * This is a model with one property with a 'any of' relationship\n */\nexport type CompositionWithAnyOfAndNullable = {\n    propA?: {\n        boolean?: boolean;\n    } | ModelWithEnum | ModelWithArray | ModelWithDictionary | null;\n};\n\n/**\n * This is a base model with two simple optional properties\n */\nexport type CompositionBaseModel = {\n    firstName?: string;\n    lastname?: string;\n};\n\n/**\n * This is a model that extends the base model\n */\nexport type CompositionExtendedModel = CompositionBaseModel & {\n    age: number;\n    firstName: string;\n    lastname: string;\n};\n\n/**\n * This is a model with one nested property\n */\nexport type ModelWithProperties = {\n    required: string;\n    readonly requiredAndReadOnly: string;\n    requiredAndNullable: string | null;\n    string?: string;\n    number?: number;\n    boolean?: boolean;\n    reference?: ModelWithString;\n    'property with space'?: string;\n    default?: string;\n    try?: string;\n    readonly '@namespace.string'?: string;\n    readonly '@namespace.integer'?: number;\n};\n\n/**\n * This is a model with one nested property\n */\nexport type ModelWithNestedProperties = {\n    readonly first: {\n        readonly second: {\n            readonly third: string | null;\n        } | null;\n    } | null;\n};\n\n/**\n * This is a model with duplicated properties\n */\nexport type ModelWithDuplicateProperties = {\n    prop?: ModelWithString;\n};\n\n/**\n * This is a model with ordered properties\n */\nexport type ModelWithOrderedProperties = {\n    zebra?: string;\n    apple?: string;\n    hawaii?: string;\n};\n\n/**\n * This is a model with duplicated imports\n */\nexport type ModelWithDuplicateImports = {\n    propA?: ModelWithString;\n    propB?: ModelWithString;\n    propC?: ModelWithString;\n};\n\n/**\n * This is a model that extends another model\n */\nexport type ModelThatExtends = ModelWithString & {\n    propExtendsA?: string;\n    propExtendsB?: ModelWithString;\n};\n\n/**\n * This is a model that extends another model\n */\nexport type ModelThatExtendsExtends = ModelWithString & ModelThatExtends & {\n    propExtendsC?: string;\n    propExtendsD?: ModelWithString;\n};\n\n/**\n * This is a model that contains a some patterns\n */\nexport type ModelWithPattern = {\n    key: string;\n    name: string;\n    readonly enabled?: boolean;\n    readonly modified?: string;\n    id?: string;\n    text?: string;\n    patternWithSingleQuotes?: string;\n    patternWithNewline?: string;\n    patternWithBacktick?: string;\n    patternWithUnicode?: string;\n};\n\nexport type File = {\n    /**\n     * Id\n     */\n    readonly id?: string;\n    /**\n     * Updated at\n     */\n    readonly updated_at?: string;\n    /**\n     * Created at\n     */\n    readonly created_at?: string;\n    /**\n     * Mime\n     */\n    mime: string;\n    /**\n     * File\n     */\n    readonly file?: string;\n};\n\nexport type Default = {\n    name?: string;\n};\n\nexport type Pageable = {\n    page?: number;\n    size?: number;\n    sort?: Array<string>;\n};\n\n/**\n * This is a free-form object without additionalProperties.\n */\nexport type FreeFormObjectWithoutAdditionalProperties = {\n    [key: string]: unknown;\n};\n\n/**\n * This is a free-form object with additionalProperties: true.\n */\nexport type FreeFormObjectWithAdditionalPropertiesEqTrue = {\n    [key: string]: unknown;\n};\n\n/**\n * This is a free-form object with additionalProperties: {}.\n */\nexport type FreeFormObjectWithAdditionalPropertiesEqEmptyObject = {\n    [key: string]: unknown;\n};\n\nexport type ModelWithConst = {\n    String?: 'String';\n    number?: 0;\n    null?: null;\n    withType?: 'Some string';\n};\n\n/**\n * This is a model with one property and additionalProperties: true\n */\nexport type ModelWithAdditionalPropertiesEqTrue = {\n    /**\n     * This is a simple string property\n     */\n    prop?: string;\n    [key: string]: unknown;\n};\n\nexport type NestedAnyOfArraysNullable = {\n    nullableArray?: Array<string | boolean> | null;\n};\n\nexport type CompositionWithOneOfAndProperties = ({\n    foo: SimpleParameter;\n} | {\n    bar: NonAsciiStringæøåÆøÅöôêÊ字符串;\n}) & {\n    baz: number | null;\n    qux: number;\n};\n\n/**\n * An object that can be null\n */\nexport type NullableObject = {\n    foo?: string;\n} | null;\n\n/**\n * Some % character\n */\nexport type CharactersInDescription = string;\n\nexport type ModelWithNullableObject = {\n    data?: NullableObject;\n};\n\n/**\n * An object with additional properties that can be null (anyOf ref + null)\n */\nexport type ModelWithAdditionalPropertiesRef = {\n    [key: string]: NullableObject | null;\n};\n\nexport type ModelWithOneOfEnum = {\n    foo: 'Bar';\n} | {\n    foo: 'Baz';\n} | {\n    foo: 'Qux';\n} | {\n    content: string;\n    foo: 'Quux';\n} | {\n    content: [\n        string,\n        string\n    ];\n    foo: 'Corge';\n};\n\nexport type ModelWithNestedArrayEnumsDataFoo = 'foo' | 'bar';\n\nexport type ModelWithNestedArrayEnumsDataBar = 'baz' | 'qux';\n\nexport type ModelWithNestedArrayEnumsData = {\n    foo?: Array<ModelWithNestedArrayEnumsDataFoo>;\n    bar?: Array<ModelWithNestedArrayEnumsDataBar>;\n};\n\nexport type ModelWithNestedArrayEnums = {\n    array_strings?: Array<string>;\n    data?: ModelWithNestedArrayEnumsData;\n};\n\nexport type ModelWithNestedCompositionEnums = {\n    foo?: ModelWithNestedArrayEnumsDataFoo;\n};\n\nexport type ModelWithReadOnlyAndWriteOnly = {\n    foo: string;\n    readonly bar: string;\n};\n\nexport type ModelWithConstantSizeArray = [\n    number,\n    number\n];\n\nexport type ModelWithAnyOfConstantSizeArray = [\n    number | string,\n    number | string,\n    number | string\n];\n\nexport type ModelWithPrefixItemsConstantSizeArray = [\n    ModelWithInteger,\n    number | string,\n    string\n];\n\nexport type ModelWithAnyOfConstantSizeArrayNullable = [\n    number | null | string,\n    number | null | string,\n    number | null | string\n];\n\nexport type ModelWithAnyOfConstantSizeArrayWithNSizeAndOptions = [\n    number | Import,\n    number | Import\n];\n\nexport type ModelWithAnyOfConstantSizeArrayAndIntersect = [\n    number & string,\n    number & string\n];\n\nexport type ModelWithNumericEnumUnion = {\n    /**\n     * Период\n     */\n    value?: -10 | -1 | 0 | 1 | 3 | 6 | 12;\n};\n\n/**\n * Some description with `back ticks`\n */\nexport type ModelWithBackticksInDescription = {\n    /**\n     * The template `that` should be used for parsing and importing the contents of the CSV file.\n     *\n     * <br/><p>There is one placeholder currently supported:<ul>     <li><b>${x}</b> - refers to the n-th column in the CSV file, e.g. ${1}, ${2}, ...)</li></ul><p>Example of a correct JSON template:</p>\n     * <pre>\n     * [\n     * {\n     * \"resourceType\": \"Asset\",\n     * \"identifier\": {\n     * \"name\": \"${1}\",\n     * \"domain\": {\n     * \"name\": \"${2}\",\n     * \"community\": {\n     * \"name\": \"Some Community\"\n     * }\n     * }\n     * },\n     * \"attributes\" : {\n     * \"00000000-0000-0000-0000-000000003115\" : [ {\n     * \"value\" : \"${3}\"\n     * } ],\n     * \"00000000-0000-0000-0000-000000000222\" : [ {\n     * \"value\" : \"${4}\"\n     * } ]\n     * }\n     * }\n     * ]\n     * </pre>\n     */\n    template?: string;\n};\n\nexport type ModelWithOneOfAndProperties = (SimpleParameter | NonAsciiStringæøåÆøÅöôêÊ字符串) & {\n    baz: number | null;\n    qux: number;\n};\n\n/**\n * Model used to test deduplication strategy (unused)\n */\nexport type ParameterSimpleParameterUnused = string;\n\n/**\n * Model used to test deduplication strategy\n */\nexport type PostServiceWithEmptyTagResponse = string;\n\n/**\n * Model used to test deduplication strategy\n */\nexport type PostServiceWithEmptyTagResponse2 = string;\n\n/**\n * Model used to test deduplication strategy\n */\nexport type DeleteFooData = string;\n\n/**\n * Model used to test deduplication strategy\n */\nexport type DeleteFooData2 = string;\n\n/**\n * Model with restricted keyword name\n */\nexport type Import = string;\n\nexport type SchemaWithFormRestrictedKeys = {\n    description?: string;\n    'x-enum-descriptions'?: string;\n    'x-enum-varnames'?: string;\n    'x-enumNames'?: string;\n    title?: string;\n    object?: {\n        description?: string;\n        'x-enum-descriptions'?: string;\n        'x-enum-varnames'?: string;\n        'x-enumNames'?: string;\n        title?: string;\n    };\n    array?: Array<{\n        description?: string;\n        'x-enum-descriptions'?: string;\n        'x-enum-varnames'?: string;\n        'x-enumNames'?: string;\n        title?: string;\n    }>;\n};\n\n/**\n * This schema was giving PascalCase transformations a hard time\n */\nexport type IoK8sApimachineryPkgApisMetaV1DeleteOptions = {\n    /**\n     * Must be fulfilled before a deletion is carried out. If not possible, a 409 Conflict status will be returned.\n     */\n    preconditions?: IoK8sApimachineryPkgApisMetaV1Preconditions;\n};\n\n/**\n * This schema was giving PascalCase transformations a hard time\n */\nexport type IoK8sApimachineryPkgApisMetaV1Preconditions = {\n    /**\n     * Specifies the target ResourceVersion\n     */\n    resourceVersion?: string;\n    /**\n     * Specifies the target UID.\n     */\n    uid?: string;\n};\n\nexport type AdditionalPropertiesUnknownIssue = {\n    [key: string]: string | number;\n};\n\nexport type AdditionalPropertiesUnknownIssue2 = {\n    [key: string]: string | number;\n};\n\nexport type AdditionalPropertiesUnknownIssue3 = string & {\n    entries: {\n        [key: string]: AdditionalPropertiesUnknownIssue;\n    };\n};\n\nexport type AdditionalPropertiesIntegerIssue = {\n    value: number;\n    [key: string]: number;\n};\n\nexport type OneOfAllOfIssue = ((ConstValue | GenericSchemaDuplicateIssue1SystemBoolean) & _3eNum1Период) | GenericSchemaDuplicateIssue1SystemString;\n\nexport type GenericSchemaDuplicateIssue1SystemBoolean = {\n    item?: boolean;\n    error?: string | null;\n    readonly hasError?: boolean;\n    data?: {\n        [key: string]: never;\n    };\n};\n\nexport type GenericSchemaDuplicateIssue1SystemString = {\n    item?: string | null;\n    error?: string | null;\n    readonly hasError?: boolean;\n};\n\nexport type ExternalSharedModel = {\n    id: string;\n    name?: string;\n};\n\n/**\n * This is a model with one property containing a reference\n */\nexport type ModelWithReferenceWritable = {\n    prop?: ModelWithPropertiesWritable;\n};\n\n/**\n * This is a model with one property containing an array\n */\nexport type ModelWithArrayReadOnlyAndWriteOnlyWritable = {\n    prop?: Array<ModelWithReadOnlyAndWriteOnlyWritable>;\n    propWithFile?: Array<Blob | File>;\n    propWithNumber?: Array<number>;\n};\n\n/**\n * This is a model with one nested property\n */\nexport type ModelWithPropertiesWritable = {\n    required: string;\n    requiredAndNullable: string | null;\n    string?: string;\n    number?: number;\n    boolean?: boolean;\n    reference?: ModelWithString;\n    'property with space'?: string;\n    default?: string;\n    try?: string;\n};\n\n/**\n * This is a model that contains a some patterns\n */\nexport type ModelWithPatternWritable = {\n    key: string;\n    name: string;\n    id?: string;\n    text?: string;\n    patternWithSingleQuotes?: string;\n    patternWithNewline?: string;\n    patternWithBacktick?: string;\n    patternWithUnicode?: string;\n};\n\nexport type FileWritable = {\n    /**\n     * Mime\n     */\n    mime: string;\n};\n\nexport type ModelWithReadOnlyAndWriteOnlyWritable = {\n    foo: string;\n    baz: string;\n};\n\nexport type ModelWithAnyOfConstantSizeArrayWithNSizeAndOptionsWritable = [\n    number | Import,\n    number | Import\n];\n\nexport type AdditionalPropertiesUnknownIssueWritable = {\n    [key: string]: string | number;\n};\n\nexport type OneOfAllOfIssueWritable = ((ConstValue | GenericSchemaDuplicateIssue1SystemBoolean) & _3eNum1Период) | GenericSchemaDuplicateIssue1SystemString;\n\nexport type GenericSchemaDuplicateIssue1SystemBooleanWritable = {\n    item?: boolean;\n    error?: string | null;\n    data?: {\n        [key: string]: never;\n    };\n};\n\nexport type GenericSchemaDuplicateIssue1SystemStringWritable = {\n    item?: string | null;\n    error?: string | null;\n};\n\n/**\n * This is a reusable parameter\n */\nexport type SimpleParameter = string;\n\n/**\n * Parameter with illegal characters\n */\nexport type XFooBar = ModelWithString;\n\n/**\n * A reusable request body\n */\nexport type SimpleRequestBody = ModelWithString;\n\n/**\n * A reusable request body\n */\nexport type SimpleFormData = ModelWithString;\n\nexport type ExportData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no+tag';\n};\n\nexport type PatchApiVbyApiVersionNoTagData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no+tag';\n};\n\nexport type PatchApiVbyApiVersionNoTagResponses = {\n    /**\n     * OK\n     */\n    default: unknown;\n};\n\nexport type ImportData = {\n    body: ModelWithReadOnlyAndWriteOnlyWritable | ModelWithArrayReadOnlyAndWriteOnlyWritable;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no+tag';\n};\n\nexport type ImportResponses = {\n    /**\n     * Success\n     */\n    200: ModelFromZendesk;\n    /**\n     * Default success response\n     */\n    default: ModelWithReadOnlyAndWriteOnly;\n};\n\nexport type ImportResponse = ImportResponses[keyof ImportResponses];\n\nexport type FooWowData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no+tag';\n};\n\nexport type FooWowResponses = {\n    /**\n     * OK\n     */\n    default: unknown;\n};\n\nexport type ApiVVersionODataControllerCountData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple/$count';\n};\n\nexport type ApiVVersionODataControllerCountResponses = {\n    /**\n     * Success\n     */\n    200: ModelFromZendesk;\n};\n\nexport type ApiVVersionODataControllerCountResponse = ApiVVersionODataControllerCountResponses[keyof ApiVVersionODataControllerCountResponses];\n\nexport type GetApiVbyApiVersionSimpleOperationData = {\n    body?: never;\n    path: {\n        /**\n         * foo in method\n         */\n        foo_param: string;\n    };\n    query?: never;\n    url: '/api/v{api-version}/simple:operation';\n};\n\nexport type GetApiVbyApiVersionSimpleOperationErrors = {\n    /**\n     * Default error response\n     */\n    default: ModelWithBoolean;\n};\n\nexport type GetApiVbyApiVersionSimpleOperationError = GetApiVbyApiVersionSimpleOperationErrors[keyof GetApiVbyApiVersionSimpleOperationErrors];\n\nexport type GetApiVbyApiVersionSimpleOperationResponses = {\n    /**\n     * Response is a simple number\n     */\n    200: number;\n};\n\nexport type GetApiVbyApiVersionSimpleOperationResponse = GetApiVbyApiVersionSimpleOperationResponses[keyof GetApiVbyApiVersionSimpleOperationResponses];\n\nexport type DeleteCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type GetCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type HeadCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type OptionsCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type PatchCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type PostCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type PutCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type DeleteFooData3 = {\n    body?: never;\n    headers: {\n        /**\n         * Parameter with illegal characters\n         */\n        'x-Foo-Bar': ModelWithString;\n    };\n    path: {\n        /**\n         * foo in method\n         */\n        foo_param: string;\n        /**\n         * bar in method\n         */\n        BarParam: string;\n    };\n    query?: never;\n    url: '/api/v{api-version}/foo/{foo_param}/bar/{BarParam}';\n};\n\nexport type CallWithDescriptionsData = {\n    body?: never;\n    path?: never;\n    query?: {\n        /**\n         * Testing multiline comments in string: First line\n         * Second line\n         *\n         * Fourth line\n         */\n        parameterWithBreaks?: string;\n        /**\n         * Testing backticks in string: `backticks` and ```multiple backticks``` should work\n         */\n        parameterWithBackticks?: string;\n        /**\n         * Testing slashes in string: \\backwards\\\\\\ and /forwards/// should work\n         */\n        parameterWithSlashes?: string;\n        /**\n         * Testing expression placeholders in string: ${expression} should work\n         */\n        parameterWithExpressionPlaceholders?: string;\n        /**\n         * Testing quotes in string: 'single quote''' and \"double quotes\"\"\" should work\n         */\n        parameterWithQuotes?: string;\n        /**\n         * Testing reserved characters in string: * inline * and ** inline ** should work\n         */\n        parameterWithReservedCharacters?: string;\n    };\n    url: '/api/v{api-version}/descriptions';\n};\n\nexport type DeprecatedCallData = {\n    body?: never;\n    headers: {\n        /**\n         * This parameter is deprecated\n         *\n         * @deprecated\n         */\n        parameter: DeprecatedModel | null;\n    };\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/parameters/deprecated';\n};\n\nexport type CallWithParametersData = {\n    /**\n     * This is the parameter that goes into the body\n     */\n    body: {\n        [key: string]: unknown;\n    } | null;\n    headers: {\n        /**\n         * This is the parameter that goes into the header\n         */\n        parameterHeader: string | null;\n    };\n    path: {\n        /**\n         * This is the parameter that goes into the path\n         */\n        parameterPath: string | null;\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string | null;\n    };\n    query: {\n        foo_ref_enum?: ModelWithNestedArrayEnumsDataFoo;\n        foo_all_of_enum: ModelWithNestedArrayEnumsDataFoo;\n        /**\n         * This is the parameter that goes into the query params\n         */\n        cursor: string | null;\n    };\n    url: '/api/v{api-version}/parameters/{parameterPath}';\n};\n\nexport type CallWithWeirdParameterNamesData = {\n    /**\n     * This is the parameter that goes into the body\n     */\n    body: ModelWithString | null;\n    headers: {\n        /**\n         * This is the parameter that goes into the request header\n         */\n        'parameter.header': string | null;\n    };\n    path: {\n        /**\n         * This is the parameter that goes into the path\n         */\n        'parameter.path.1'?: string;\n        /**\n         * This is the parameter that goes into the path\n         */\n        'parameter-path-2'?: string;\n        /**\n         * This is the parameter that goes into the path\n         */\n        'PARAMETER-PATH-3'?: string;\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string | null;\n    };\n    query: {\n        /**\n         * This is the parameter with a reserved keyword\n         */\n        default?: string;\n        /**\n         * This is the parameter that goes into the request query params\n         */\n        'parameter-query': string | null;\n    };\n    url: '/api/v{api-version}/parameters/{parameter.path.1}/{parameter-path-2}/{PARAMETER-PATH-3}';\n};\n\nexport type GetCallWithOptionalParamData = {\n    /**\n     * This is a required parameter\n     */\n    body: ModelWithOneOfEnum;\n    path?: never;\n    query?: {\n        /**\n         * This is an optional parameter\n         */\n        page?: number;\n    };\n    url: '/api/v{api-version}/parameters';\n};\n\nexport type PostCallWithOptionalParamData = {\n    /**\n     * This is an optional parameter\n     */\n    body?: {\n        offset?: number | null;\n    };\n    path?: never;\n    query: {\n        /**\n         * This is a required parameter\n         */\n        parameter: Pageable;\n    };\n    url: '/api/v{api-version}/parameters';\n};\n\nexport type PostCallWithOptionalParamResponses = {\n    /**\n     * Response is a simple number\n     */\n    200: number;\n    /**\n     * Success\n     */\n    204: void;\n};\n\nexport type PostCallWithOptionalParamResponse = PostCallWithOptionalParamResponses[keyof PostCallWithOptionalParamResponses];\n\nexport type PostApiVbyApiVersionRequestBodyData = {\n    /**\n     * A reusable request body\n     */\n    body?: SimpleRequestBody;\n    path?: never;\n    query?: {\n        /**\n         * This is a reusable parameter\n         */\n        parameter?: string;\n    };\n    url: '/api/v{api-version}/requestBody';\n};\n\nexport type PostApiVbyApiVersionFormDataData = {\n    /**\n     * A reusable request body\n     */\n    body?: SimpleFormData;\n    path?: never;\n    query?: {\n        /**\n         * This is a reusable parameter\n         */\n        parameter?: string;\n    };\n    url: '/api/v{api-version}/formData';\n};\n\nexport type CallWithDefaultParametersData = {\n    body?: never;\n    path?: never;\n    query?: {\n        /**\n         * This is a simple string with default value\n         */\n        parameterString?: string | null;\n        /**\n         * This is a simple number with default value\n         */\n        parameterNumber?: number | null;\n        /**\n         * This is a simple boolean with default value\n         */\n        parameterBoolean?: boolean | null;\n        /**\n         * This is a simple enum with default value\n         */\n        parameterEnum?: 'Success' | 'Warning' | 'Error';\n        /**\n         * This is a simple model with default value\n         */\n        parameterModel?: ModelWithString | null;\n    };\n    url: '/api/v{api-version}/defaults';\n};\n\nexport type CallWithDefaultOptionalParametersData = {\n    body?: never;\n    path?: never;\n    query?: {\n        /**\n         * This is a simple string that is optional with default value\n         */\n        parameterString?: string;\n        /**\n         * This is a simple number that is optional with default value\n         */\n        parameterNumber?: number;\n        /**\n         * This is a simple boolean that is optional with default value\n         */\n        parameterBoolean?: boolean;\n        /**\n         * This is a simple enum that is optional with default value\n         */\n        parameterEnum?: 'Success' | 'Warning' | 'Error';\n        /**\n         * This is a simple model that is optional with default value\n         */\n        parameterModel?: ModelWithString;\n    };\n    url: '/api/v{api-version}/defaults';\n};\n\nexport type CallToTestOrderOfParamsData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * This is a optional string with default\n         */\n        parameterOptionalStringWithDefault?: string;\n        /**\n         * This is a optional string with empty default\n         */\n        parameterOptionalStringWithEmptyDefault?: string;\n        /**\n         * This is a optional string with no default\n         */\n        parameterOptionalStringWithNoDefault?: string;\n        /**\n         * This is a string with default\n         */\n        parameterStringWithDefault: string;\n        /**\n         * This is a string with empty default\n         */\n        parameterStringWithEmptyDefault: string;\n        /**\n         * This is a string with no default\n         */\n        parameterStringWithNoDefault: string;\n        /**\n         * This is a string that can be null with no default\n         */\n        parameterStringNullableWithNoDefault?: string | null;\n        /**\n         * This is a string that can be null with default\n         */\n        parameterStringNullableWithDefault?: string | null;\n    };\n    url: '/api/v{api-version}/defaults';\n};\n\nexport type DuplicateNameData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/duplicate';\n};\n\nexport type DuplicateName2Data = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/duplicate';\n};\n\nexport type DuplicateName3Data = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/duplicate';\n};\n\nexport type DuplicateName4Data = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/duplicate';\n};\n\nexport type CallWithNoContentResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no-content';\n};\n\nexport type CallWithNoContentResponseResponses = {\n    /**\n     * Success\n     */\n    204: void;\n};\n\nexport type CallWithNoContentResponseResponse = CallWithNoContentResponseResponses[keyof CallWithNoContentResponseResponses];\n\nexport type CallWithResponseAndNoContentResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multiple-tags/response-and-no-content';\n};\n\nexport type CallWithResponseAndNoContentResponseResponses = {\n    /**\n     * Response is a simple number\n     */\n    200: number;\n    /**\n     * Success\n     */\n    204: void;\n};\n\nexport type CallWithResponseAndNoContentResponseResponse = CallWithResponseAndNoContentResponseResponses[keyof CallWithResponseAndNoContentResponseResponses];\n\nexport type DummyAData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multiple-tags/a';\n};\n\nexport type DummyAResponses = {\n    200: _400;\n};\n\nexport type DummyAResponse = DummyAResponses[keyof DummyAResponses];\n\nexport type DummyBData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multiple-tags/b';\n};\n\nexport type DummyBResponses = {\n    /**\n     * Success\n     */\n    204: void;\n};\n\nexport type DummyBResponse = DummyBResponses[keyof DummyBResponses];\n\nexport type CallWithResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/response';\n};\n\nexport type CallWithResponseResponses = {\n    default: Import;\n};\n\nexport type CallWithResponseResponse = CallWithResponseResponses[keyof CallWithResponseResponses];\n\nexport type CallWithDuplicateResponsesData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/response';\n};\n\nexport type CallWithDuplicateResponsesErrors = {\n    /**\n     * Message for 500 error\n     */\n    500: ModelWithStringError;\n    /**\n     * Message for 501 error\n     */\n    501: ModelWithStringError;\n    /**\n     * Message for 502 error\n     */\n    502: ModelWithStringError;\n    /**\n     * Message for 4XX errors\n     */\n    '4XX': DictionaryWithArray;\n    /**\n     * Default error response\n     */\n    default: ModelWithBoolean;\n};\n\nexport type CallWithDuplicateResponsesError = CallWithDuplicateResponsesErrors[keyof CallWithDuplicateResponsesErrors];\n\nexport type CallWithDuplicateResponsesResponses = {\n    /**\n     * Message for 200 response\n     */\n    200: ModelWithBoolean & ModelWithInteger;\n    /**\n     * Message for 201 response\n     */\n    201: ModelWithString;\n    /**\n     * Message for 202 response\n     */\n    202: ModelWithString;\n};\n\nexport type CallWithDuplicateResponsesResponse = CallWithDuplicateResponsesResponses[keyof CallWithDuplicateResponsesResponses];\n\nexport type CallWithResponsesData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/response';\n};\n\nexport type CallWithResponsesErrors = {\n    /**\n     * Message for 500 error\n     */\n    500: ModelWithStringError;\n    /**\n     * Message for 501 error\n     */\n    501: ModelWithStringError;\n    /**\n     * Message for 502 error\n     */\n    502: ModelWithStringError;\n    /**\n     * Message for default response\n     */\n    default: ModelWithStringError;\n};\n\nexport type CallWithResponsesError = CallWithResponsesErrors[keyof CallWithResponsesErrors];\n\nexport type CallWithResponsesResponses = {\n    /**\n     * Message for 200 response\n     */\n    200: {\n        readonly '@namespace.string'?: string;\n        readonly '@namespace.integer'?: number;\n        readonly value?: Array<ModelWithString>;\n    };\n    /**\n     * Message for 201 response\n     */\n    201: ModelThatExtends;\n    /**\n     * Message for 202 response\n     */\n    202: ModelThatExtendsExtends;\n};\n\nexport type CallWithResponsesResponse = CallWithResponsesResponses[keyof CallWithResponsesResponses];\n\nexport type CollectionFormatData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * This is an array parameter that is sent as csv format (comma-separated values)\n         */\n        parameterArrayCSV: Array<string> | null;\n        /**\n         * This is an array parameter that is sent as ssv format (space-separated values)\n         */\n        parameterArraySSV: Array<string> | null;\n        /**\n         * This is an array parameter that is sent as tsv format (tab-separated values)\n         */\n        parameterArrayTSV: Array<string> | null;\n        /**\n         * This is an array parameter that is sent as pipes format (pipe-separated values)\n         */\n        parameterArrayPipes: Array<string> | null;\n        /**\n         * This is an array parameter that is sent as multi format (multiple parameter instances)\n         */\n        parameterArrayMulti: Array<string> | null;\n    };\n    url: '/api/v{api-version}/collectionFormat';\n};\n\nexport type TypesData = {\n    body?: never;\n    path?: {\n        /**\n         * This is a number parameter\n         */\n        id?: number;\n    };\n    query: {\n        /**\n         * This is a number parameter\n         */\n        parameterNumber: number;\n        /**\n         * This is a string parameter\n         */\n        parameterString: string | null;\n        /**\n         * This is a boolean parameter\n         */\n        parameterBoolean: boolean | null;\n        /**\n         * This is an object parameter\n         */\n        parameterObject: {\n            [key: string]: unknown;\n        } | null;\n        /**\n         * This is an array parameter\n         */\n        parameterArray: Array<string> | null;\n        /**\n         * This is a dictionary parameter\n         */\n        parameterDictionary: {\n            [key: string]: unknown;\n        } | null;\n        /**\n         * This is an enum parameter\n         */\n        parameterEnum: 'Success' | 'Warning' | 'Error' | null;\n    };\n    url: '/api/v{api-version}/types';\n};\n\nexport type TypesResponses = {\n    /**\n     * Response is a simple number\n     */\n    200: number;\n    /**\n     * Response is a simple string\n     */\n    201: string;\n    /**\n     * Response is a simple boolean\n     */\n    202: boolean;\n    /**\n     * Response is a simple object\n     */\n    203: {\n        [key: string]: unknown;\n    };\n};\n\nexport type TypesResponse = TypesResponses[keyof TypesResponses];\n\nexport type UploadFileData = {\n    body: Blob | File;\n    path: {\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string | null;\n    };\n    query?: never;\n    url: '/api/v{api-version}/upload';\n};\n\nexport type UploadFileResponses = {\n    200: boolean;\n};\n\nexport type UploadFileResponse = UploadFileResponses[keyof UploadFileResponses];\n\nexport type FileResponseData = {\n    body?: never;\n    path: {\n        id: string;\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string;\n    };\n    query?: never;\n    url: '/api/v{api-version}/file/{id}';\n};\n\nexport type FileResponseResponses = {\n    /**\n     * Success\n     */\n    200: Blob | File;\n};\n\nexport type FileResponseResponse = FileResponseResponses[keyof FileResponseResponses];\n\nexport type ComplexTypesData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * Parameter containing object\n         */\n        parameterObject: {\n            first?: {\n                second?: {\n                    third?: string;\n                };\n            };\n        };\n        /**\n         * Parameter containing reference\n         */\n        parameterReference: ModelWithString;\n    };\n    url: '/api/v{api-version}/complex';\n};\n\nexport type ComplexTypesErrors = {\n    /**\n     * 400 `server` error\n     */\n    400: unknown;\n    /**\n     * 500 server error\n     */\n    500: unknown;\n};\n\nexport type ComplexTypesResponses = {\n    /**\n     * Successful response\n     */\n    200: Array<ModelWithString>;\n};\n\nexport type ComplexTypesResponse = ComplexTypesResponses[keyof ComplexTypesResponses];\n\nexport type MultipartResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multipart';\n};\n\nexport type MultipartResponseResponses = {\n    /**\n     * OK\n     */\n    200: {\n        file?: Blob | File;\n        metadata?: {\n            foo?: string;\n            bar?: string;\n        };\n    };\n};\n\nexport type MultipartResponseResponse = MultipartResponseResponses[keyof MultipartResponseResponses];\n\nexport type MultipartRequestData = {\n    body?: {\n        content?: Blob | File;\n        data?: ModelWithString | null;\n    };\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multipart';\n};\n\nexport type ComplexParamsData = {\n    body?: {\n        readonly key: string | null;\n        name: string | null;\n        enabled?: boolean;\n        type: 'Monkey' | 'Horse' | 'Bird';\n        listOfModels?: Array<ModelWithString> | null;\n        listOfStrings?: Array<string> | null;\n        parameters: ModelWithString | ModelWithEnum | ModelWithArray | ModelWithDictionary;\n        readonly user?: {\n            readonly id?: number;\n            readonly name?: string | null;\n        };\n    };\n    path: {\n        id: number;\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string;\n    };\n    query?: never;\n    url: '/api/v{api-version}/complex/{id}';\n};\n\nexport type ComplexParamsResponses = {\n    /**\n     * Success\n     */\n    200: ModelWithString;\n};\n\nexport type ComplexParamsResponse = ComplexParamsResponses[keyof ComplexParamsResponses];\n\nexport type CallWithResultFromHeaderData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/header';\n};\n\nexport type CallWithResultFromHeaderErrors = {\n    /**\n     * 400 server error\n     */\n    400: unknown;\n    /**\n     * 500 server error\n     */\n    500: unknown;\n};\n\nexport type CallWithResultFromHeaderResponses = {\n    /**\n     * Successful response\n     */\n    200: unknown;\n};\n\nexport type TestErrorCodeData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * Status code to return\n         */\n        status: number;\n    };\n    url: '/api/v{api-version}/error';\n};\n\nexport type TestErrorCodeErrors = {\n    /**\n     * Custom message: Internal Server Error\n     */\n    500: unknown;\n    /**\n     * Custom message: Not Implemented\n     */\n    501: unknown;\n    /**\n     * Custom message: Bad Gateway\n     */\n    502: unknown;\n    /**\n     * Custom message: Service Unavailable\n     */\n    503: unknown;\n};\n\nexport type TestErrorCodeResponses = {\n    /**\n     * Custom message: Successful response\n     */\n    200: unknown;\n};\n\nexport type NonAsciiæøåÆøÅöôêÊ字符串Data = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * Dummy input param\n         */\n        nonAsciiParamæøåÆØÅöôêÊ: number;\n    };\n    url: '/api/v{api-version}/non-ascii-æøåÆØÅöôêÊ字符串';\n};\n\nexport type NonAsciiæøåÆøÅöôêÊ字符串Responses = {\n    /**\n     * Successful response\n     */\n    200: Array<NonAsciiStringæøåÆøÅöôêÊ字符串>;\n};\n\nexport type NonAsciiæøåÆøÅöôêÊ字符串Response = NonAsciiæøåÆøÅöôêÊ字符串Responses[keyof NonAsciiæøåÆøÅöôêÊ字符串Responses];\n\nexport type PutWithFormUrlEncodedData = {\n    body: ArrayWithStrings;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/non-ascii-æøåÆØÅöôêÊ字符串';\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/components-request-bodies/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type { ClientOptions, Foo, PostFooData, PostFooResponses } from './types.gen';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/components-request-bodies/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type ClientOptions = {\n    baseUrl: `${string}://${string}` | (string & {});\n};\n\n/**\n * Foo\n */\nexport type Foo = {\n    page?: number;\n};\n\nexport type PostFooData = {\n    /**\n     * Foo\n     */\n    body: Foo;\n    path?: never;\n    query?: never;\n    url: '/foo';\n};\n\nexport type PostFooResponses = {\n    /**\n     * OK\n     */\n    200: unknown;\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/const/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type { ClientOptions, GetFooData, GetFooResponse, GetFooResponses } from './types.gen';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/const/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type ClientOptions = {\n    baseUrl: `${string}://${string}` | (string & {});\n};\n\nexport type GetFooData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/foo';\n};\n\nexport type GetFooResponses = {\n    /**\n     * OK\n     */\n    200: 'First line.\\n\\nSecond line.\\n\\nPS: I love you.';\n};\n\nexport type GetFooResponse = GetFooResponses[keyof GetFooResponses];\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/content-binary/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type { ClientOptions, GetBarData, GetBarResponse, GetBarResponses, GetFooData, GetFooResponse, GetFooResponses } from './types.gen';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/content-binary/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type ClientOptions = {\n    baseUrl: `${string}://${string}` | (string & {});\n};\n\nexport type GetFooData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/foo';\n};\n\nexport type GetFooResponses = {\n    200: string;\n};\n\nexport type GetFooResponse = GetFooResponses[keyof GetFooResponses];\n\nexport type GetBarData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/bar';\n};\n\nexport type GetBarResponses = {\n    200: Blob | File;\n};\n\nexport type GetBarResponse = GetBarResponses[keyof GetBarResponses];\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/content-media-type/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type { ClientOptions, FileUploadRequest, FileUploadRequestTyped, UploadFileData, UploadFileResponses, UploadFileTypedData, UploadFileTypedResponses } from './types.gen';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/content-media-type/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type ClientOptions = {\n    baseUrl: `${string}://${string}` | (string & {});\n};\n\nexport type FileUploadRequest = {\n    /**\n     * Binary file content\n     */\n    file: Blob | File;\n};\n\nexport type FileUploadRequestTyped = {\n    /**\n     * Binary file content with explicit string type\n     */\n    file: Blob | File;\n};\n\nexport type UploadFileData = {\n    body?: FileUploadRequest;\n    path?: never;\n    query?: never;\n    url: '/upload';\n};\n\nexport type UploadFileResponses = {\n    /**\n     * OK\n     */\n    200: unknown;\n};\n\nexport type UploadFileTypedData = {\n    body?: FileUploadRequestTyped;\n    path?: never;\n    query?: never;\n    url: '/upload-typed';\n};\n\nexport type UploadFileTypedResponses = {\n    /**\n     * OK\n     */\n    200: unknown;\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/content-types/client/client.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { AxiosError, AxiosInstance, RawAxiosRequestHeaders } from 'axios';\nimport axios from 'axios';\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 } from './types.gen';\nimport { buildUrl, createConfig, mergeConfigs, mergeHeaders, setAuthParams } from './utils.gen';\n\nexport const createClient = (config: Config = {}): Client => {\n  let _config = mergeConfigs(createConfig(), config);\n\n  let instance: AxiosInstance;\n\n  if (_config.axios && !('Axios' in _config.axios)) {\n    instance = _config.axios;\n  } else {\n    // eslint-disable-next-line @typescript-eslint/no-unused-vars\n    const { auth, ...configWithoutAuth } = _config;\n    instance = axios.create(configWithoutAuth);\n  }\n\n  const getConfig = (): Config => ({ ..._config });\n\n  const setConfig = (config: Config): Config => {\n    _config = mergeConfigs(_config, config);\n    instance.defaults = {\n      ...instance.defaults,\n      ..._config,\n      // @ts-expect-error\n      headers: mergeHeaders(instance.defaults.headers, _config.headers),\n    };\n    return getConfig();\n  };\n\n  const beforeRequest = async (options: RequestOptions) => {\n    const opts = {\n      ..._config,\n      ...options,\n      axios: options.axios ?? _config.axios ?? instance,\n      headers: mergeHeaders(_config.headers, options.headers),\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.body = opts.bodySerializer(opts.body);\n    }\n\n    const url = buildUrl(opts);\n\n    return { opts, url };\n  };\n\n  // @ts-expect-error\n  const request: Client['request'] = async (options) => {\n    // @ts-expect-error\n    const { opts, url } = await beforeRequest(options);\n    try {\n      // assign Axios here for consistency with fetch\n      const _axios = opts.axios!;\n      // eslint-disable-next-line @typescript-eslint/no-unused-vars\n      const { auth, ...optsWithoutAuth } = opts;\n      const response = await _axios({\n        ...optsWithoutAuth,\n        baseURL: '', // the baseURL is already included in `url`\n        data: getValidRequestBody(opts),\n        headers: opts.headers as RawAxiosRequestHeaders,\n        // let `paramsSerializer()` handle query params if it exists\n        params: opts.paramsSerializer ? opts.query : undefined,\n        url,\n      });\n\n      let { data } = response;\n\n      if (opts.responseType === '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 {\n        ...response,\n        data: data ?? {},\n      };\n    } catch (error) {\n      const e = error as AxiosError;\n      if (opts.throwOnError) {\n        throw e;\n      }\n      // @ts-expect-error\n      e.error = e.response?.data ?? {};\n      return e;\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 Record<string, string>,\n      method,\n      serializedBody: getValidRequestBody(opts) as BodyInit | null | undefined,\n      // @ts-expect-error\n      signal: opts.signal,\n      url,\n    });\n  };\n\n  const _buildUrl: Client['buildUrl'] = (options) =>\n    buildUrl({ axios: instance, ..._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    instance,\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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/content-types/client/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type { Auth } from '../core/auth.gen';\nexport type { QuerySerializerOptions } from '../core/bodySerializer.gen';\nexport {\n  formDataBodySerializer,\n  jsonBodySerializer,\n  urlSearchParamsBodySerializer,\n} from '../core/bodySerializer.gen';\nexport { buildClientParams } from '../core/params.gen';\nexport { serializeQueryKeyValue } from '../core/queryKeySerializer.gen';\nexport { createClient } from './client.gen';\nexport type {\n  Client,\n  ClientOptions,\n  Config,\n  CreateClientConfig,\n  Options,\n  RequestOptions,\n  RequestResult,\n  TDataShape,\n} from './types.gen';\nexport { createConfig } from './utils.gen';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/content-types/client/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type {\n  AxiosError,\n  AxiosInstance,\n  AxiosRequestHeaders,\n  AxiosResponse,\n  AxiosStatic,\n  CreateAxiosDefaults,\n} from 'axios';\n\nimport type { Auth } from '../core/auth.gen';\nimport type {\n  ServerSentEventsOptions,\n  ServerSentEventsResult,\n} from '../core/serverSentEvents.gen';\nimport type { Client as CoreClient, Config as CoreConfig } from '../core/types.gen';\n\nexport interface Config<T extends ClientOptions = ClientOptions>\n  extends Omit<CreateAxiosDefaults, 'auth' | 'baseURL' | 'headers' | 'method'>, CoreConfig {\n  /**\n   * Axios implementation. You can use this option to provide either an\n   * `AxiosStatic` or an `AxiosInstance`.\n   *\n   * @default axios\n   */\n  axios?: AxiosStatic | AxiosInstance;\n  /**\n   * Base URL for all requests made by this client.\n   */\n  baseURL?: T['baseURL'];\n  /**\n   * An object containing any HTTP headers that you want to pre-populate your\n   * `Headers` object with.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/Headers/Headers#init See more}\n   */\n  headers?:\n    | AxiosRequestHeaders\n    | Record<\n        string,\n        string | number | boolean | (string | number | boolean)[] | null | undefined | unknown\n      >;\n  /**\n   * Throw an error instead of returning it in the response?\n   *\n   * @default false\n   */\n  throwOnError?: T['throwOnError'];\n}\n\nexport interface RequestOptions<\n  TData = unknown,\n  ThrowOnError extends boolean = boolean,\n  Url extends string = string,\n>\n  extends\n    Config<{\n      throwOnError: ThrowOnError;\n    }>,\n    Pick<\n      ServerSentEventsOptions<TData>,\n      | 'onRequest'\n      | 'onSseError'\n      | 'onSseEvent'\n      | 'sseDefaultRetryDelay'\n      | 'sseMaxRetryAttempts'\n      | 'sseMaxRetryDelay'\n    > {\n  /**\n   * Any body that you want to add to your request.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/fetch#body}\n   */\n  body?: unknown;\n  path?: Record<string, unknown>;\n  query?: Record<string, unknown>;\n  /**\n   * Security mechanism(s) to use for the request.\n   */\n  security?: ReadonlyArray<Auth>;\n  url: Url;\n}\n\nexport interface ClientOptions {\n  baseURL?: string;\n  throwOnError?: boolean;\n}\n\nexport type RequestResult<\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = boolean,\n> = ThrowOnError extends true\n  ? Promise<AxiosResponse<TData extends Record<string, unknown> ? TData[keyof TData] : TData>>\n  : Promise<\n      | (AxiosResponse<TData extends Record<string, unknown> ? TData[keyof TData] : TData> & {\n          error: undefined;\n        })\n      | (AxiosError<TError extends Record<string, unknown> ? TError[keyof TError] : TError> & {\n          data: undefined;\n          error: TError extends Record<string, unknown> ? TError[keyof TError] : TError;\n        })\n    >;\n\ntype MethodFn = <TData = unknown, TError = unknown, ThrowOnError extends boolean = false>(\n  options: Omit<RequestOptions<TData, ThrowOnError>, 'method'>,\n) => RequestResult<TData, TError, ThrowOnError>;\n\ntype SseFn = <TData = unknown, TError = unknown, ThrowOnError extends boolean = false>(\n  options: Omit<RequestOptions<TData, ThrowOnError>, 'method'>,\n) => Promise<ServerSentEventsResult<TData, TError>>;\n\ntype RequestFn = <TData = unknown, TError = unknown, ThrowOnError extends boolean = false>(\n  options: Omit<RequestOptions<TData, ThrowOnError>, 'method'> &\n    Pick<Required<RequestOptions<TData, ThrowOnError>>, 'method'>,\n) => RequestResult<TData, TError, ThrowOnError>;\n\ntype BuildUrlFn = <\n  TData extends {\n    body?: unknown;\n    path?: Record<string, unknown>;\n    query?: Record<string, unknown>;\n    url: string;\n  },\n>(\n  options: TData & Options<TData>,\n) => string;\n\nexport type Client = CoreClient<RequestFn, Config, MethodFn, BuildUrlFn, SseFn> & {\n  instance: AxiosInstance;\n};\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 = ClientOptions> = (\n  override?: Config<ClientOptions & T>,\n) => Config<Required<ClientOptions> & T>;\n\nexport interface TDataShape {\n  body?: unknown;\n  headers?: unknown;\n  path?: unknown;\n  query?: unknown;\n  url: string;\n}\n\ntype OmitKeys<T, K> = Pick<T, Exclude<keyof T, K>>;\n\nexport type Options<\n  TData extends TDataShape = TDataShape,\n  ThrowOnError extends boolean = boolean,\n  TResponse = unknown,\n> = OmitKeys<RequestOptions<TResponse, ThrowOnError>, 'body' | 'path' | 'query' | 'url'> &\n  ([TData] extends [never] ? unknown : Omit<TData, 'url'>);\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/content-types/client/utils.gen.ts",
    "content": "// 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 {\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\nconst checkForExistence = (\n  options: Pick<RequestOptions, 'auth' | 'query'> & {\n    headers: Record<any, unknown>;\n  },\n  name?: string,\n): boolean => {\n  if (!name) {\n    return false;\n  }\n  if (name in options.headers || options.query?.[name]) {\n    return true;\n  }\n  if (\n    'Cookie' in options.headers &&\n    options.headers['Cookie'] &&\n    typeof options.headers['Cookie'] === 'string'\n  ) {\n    return options.headers['Cookie'].includes(`${name}=`);\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: Record<any, unknown>;\n  }) => {\n  for (const auth of security) {\n    if (checkForExistence(options, auth.name)) {\n      continue;\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        const value = `${name}=${token}`;\n        if ('Cookie' in options.headers && options.headers['Cookie']) {\n          options.headers['Cookie'] = `${options.headers['Cookie']}; ${value}`;\n        } else {\n          options.headers['Cookie'] = value;\n        }\n        break;\n      }\n      case 'header':\n      default:\n        options.headers[name] = token;\n        break;\n    }\n  }\n};\n\nexport const buildUrl: Client['buildUrl'] = (options) => {\n  const instanceBaseUrl = options.axios?.defaults?.baseURL;\n\n  const baseUrl =\n    !!options.baseURL && typeof options.baseURL === 'string' ? options.baseURL : instanceBaseUrl;\n\n  return getUrl({\n    baseUrl: baseUrl as string,\n    path: options.path,\n    // let `paramsSerializer()` handle query params if it exists\n    query: !options.paramsSerializer ? options.query : undefined,\n    querySerializer:\n      typeof options.querySerializer === 'function'\n        ? options.querySerializer\n        : createQuerySerializer(options.querySerializer),\n    url: options.url,\n  });\n};\n\nexport const mergeConfigs = (a: Config, b: Config): Config => {\n  const config = { ...a, ...b };\n  config.headers = mergeHeaders(a.headers, b.headers);\n  return config;\n};\n\n/**\n * Special Axios headers keywords allowing to set headers by request method.\n */\nexport const axiosHeadersKeywords = [\n  'common',\n  'delete',\n  'get',\n  'head',\n  'patch',\n  'post',\n  'put',\n] as const;\n\nexport const mergeHeaders = (\n  ...headers: Array<Required<Config>['headers'] | undefined>\n): Record<any, unknown> => {\n  const mergedHeaders: Record<any, unknown> = {};\n  for (const header of headers) {\n    if (!header || typeof header !== 'object') {\n      continue;\n    }\n\n    const iterator = Object.entries(header);\n\n    for (const [key, value] of iterator) {\n      if (\n        axiosHeadersKeywords.includes(key as (typeof axiosHeadersKeywords)[number]) &&\n        typeof value === 'object'\n      ) {\n        mergedHeaders[key] = {\n          ...(mergedHeaders[key] as Record<any, unknown>),\n          ...value,\n        };\n      } else if (value === null) {\n        delete mergedHeaders[key];\n      } else if (Array.isArray(value)) {\n        for (const v of value) {\n          // @ts-expect-error\n          mergedHeaders[key] = [...(mergedHeaders[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[key] = typeof value === 'object' ? JSON.stringify(value) : (value as string);\n      }\n    }\n  }\n  return mergedHeaders;\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  ...override,\n});\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/content-types/client.gen.ts",
    "content": "// 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>());\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/content-types/core/auth.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/content-types/core/bodySerializer.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/content-types/core/params.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/content-types/core/pathSerializer.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/content-types/core/queryKeySerializer.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\n/**\n * JSON-friendly union that mirrors what Pinia Colada can hash.\n */\nexport type JsonValue =\n  | null\n  | string\n  | number\n  | boolean\n  | JsonValue[]\n  | { [key: string]: JsonValue };\n\n/**\n * Replacer that converts non-JSON values (bigint, Date, etc.) to safe substitutes.\n */\nexport const queryKeyJsonReplacer = (_key: string, value: unknown) => {\n  if (value === undefined || typeof value === 'function' || typeof value === 'symbol') {\n    return undefined;\n  }\n  if (typeof value === 'bigint') {\n    return value.toString();\n  }\n  if (value instanceof Date) {\n    return value.toISOString();\n  }\n  return value;\n};\n\n/**\n * Safely stringifies a value and parses it back into a JsonValue.\n */\nexport const stringifyToJsonValue = (input: unknown): JsonValue | undefined => {\n  try {\n    const json = JSON.stringify(input, queryKeyJsonReplacer);\n    if (json === undefined) {\n      return undefined;\n    }\n    return JSON.parse(json) as JsonValue;\n  } catch {\n    return undefined;\n  }\n};\n\n/**\n * Detects plain objects (including objects with a null prototype).\n */\nconst isPlainObject = (value: unknown): value is Record<string, unknown> => {\n  if (value === null || typeof value !== 'object') {\n    return false;\n  }\n  const prototype = Object.getPrototypeOf(value as object);\n  return prototype === Object.prototype || prototype === null;\n};\n\n/**\n * Turns URLSearchParams into a sorted JSON object for deterministic keys.\n */\nconst serializeSearchParams = (params: URLSearchParams): JsonValue => {\n  const entries = Array.from(params.entries()).sort(([a], [b]) => a.localeCompare(b));\n  const result: Record<string, JsonValue> = {};\n\n  for (const [key, value] of entries) {\n    const existing = result[key];\n    if (existing === undefined) {\n      result[key] = value;\n      continue;\n    }\n\n    if (Array.isArray(existing)) {\n      (existing as string[]).push(value);\n    } else {\n      result[key] = [existing, value];\n    }\n  }\n\n  return result;\n};\n\n/**\n * Normalizes any accepted value into a JSON-friendly shape for query keys.\n */\nexport const serializeQueryKeyValue = (value: unknown): JsonValue | undefined => {\n  if (value === null) {\n    return null;\n  }\n\n  if (typeof value === 'string' || typeof value === 'number' || typeof value === 'boolean') {\n    return value;\n  }\n\n  if (value === undefined || typeof value === 'function' || typeof value === 'symbol') {\n    return undefined;\n  }\n\n  if (typeof value === 'bigint') {\n    return value.toString();\n  }\n\n  if (value instanceof Date) {\n    return value.toISOString();\n  }\n\n  if (Array.isArray(value)) {\n    return stringifyToJsonValue(value);\n  }\n\n  if (typeof URLSearchParams !== 'undefined' && value instanceof URLSearchParams) {\n    return serializeSearchParams(value);\n  }\n\n  if (isPlainObject(value)) {\n    return stringifyToJsonValue(value);\n  }\n\n  return undefined;\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/content-types/core/serverSentEvents.gen.ts",
    "content": "// 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 const 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            // Normalize line endings: CRLF -> LF, then CR -> LF\n            buffer = buffer.replace(/\\r\\n/g, '\\n').replace(/\\r/g, '\\n');\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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/content-types/core/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { Auth, AuthToken } from './auth.gen';\nimport type { BodySerializer, QuerySerializer, QuerySerializerOptions } from './bodySerializer.gen';\n\nexport type HttpMethod =\n  | 'connect'\n  | 'delete'\n  | 'get'\n  | 'head'\n  | 'options'\n  | 'patch'\n  | 'post'\n  | 'put'\n  | 'trace';\n\nexport type Client<\n  RequestFn = never,\n  Config = unknown,\n  MethodFn = never,\n  BuildUrlFn = never,\n  SseFn = never,\n> = {\n  /**\n   * Returns the final request URL.\n   */\n  buildUrl: BuildUrlFn;\n  getConfig: () => Config;\n  request: RequestFn;\n  setConfig: (config: Config) => Config;\n} & {\n  [K in HttpMethod]: MethodFn;\n} & ([SseFn] extends [never] ? { sse?: never } : { sse: { [K in HttpMethod]: SseFn } });\n\nexport interface Config {\n  /**\n   * Auth token or a function returning auth token. The resolved value will be\n   * added to the request payload as defined by its `security` array.\n   */\n  auth?: ((auth: Auth) => Promise<AuthToken> | AuthToken) | AuthToken;\n  /**\n   * A function for serializing request body parameter. By default,\n   * {@link JSON.stringify()} will be used.\n   */\n  bodySerializer?: BodySerializer | null;\n  /**\n   * An object containing any HTTP headers that you want to pre-populate your\n   * `Headers` object with.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/Headers/Headers#init See more}\n   */\n  headers?:\n    | RequestInit['headers']\n    | Record<\n        string,\n        string | number | boolean | (string | number | boolean)[] | null | undefined | unknown\n      >;\n  /**\n   * The request method.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/fetch#method See more}\n   */\n  method?: Uppercase<HttpMethod>;\n  /**\n   * A function for serializing request query parameters. By default, arrays\n   * will be exploded in form style, objects will be exploded in deepObject\n   * style, and reserved characters are percent-encoded.\n   *\n   * This method will have no effect if the native `paramsSerializer()` Axios\n   * API function is used.\n   *\n   * {@link https://swagger.io/docs/specification/serialization/#query View examples}\n   */\n  querySerializer?: QuerySerializer | QuerySerializerOptions;\n  /**\n   * A function validating request data. This is useful if you want to ensure\n   * the request conforms to the desired shape, so it can be safely sent to\n   * the server.\n   */\n  requestValidator?: (data: unknown) => Promise<unknown>;\n  /**\n   * A function transforming response data before it's returned. This is useful\n   * for post-processing data, e.g. converting ISO strings into Date objects.\n   */\n  responseTransformer?: (data: unknown) => Promise<unknown>;\n  /**\n   * A function validating response data. This is useful if you want to ensure\n   * the response conforms to the desired shape, so it can be safely passed to\n   * the transformers and returned to the user.\n   */\n  responseValidator?: (data: unknown) => Promise<unknown>;\n}\n\ntype IsExactlyNeverOrNeverUndefined<T> = [T] extends [never]\n  ? true\n  : [T] extends [never | undefined]\n    ? [undefined] extends [T]\n      ? false\n      : true\n    : false;\n\nexport type OmitNever<T extends Record<string, unknown>> = {\n  [K in keyof T as IsExactlyNeverOrNeverUndefined<T[K]> extends true ? never : K]: T[K];\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/content-types/core/utils.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/content-types/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport { getFoo, type Options } from './sdk.gen';\nexport type { ClientOptions, GetFooData, GetFooResponse, GetFooResponses } from './types.gen';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/content-types/sdk.gen.ts",
    "content": "// 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 { GetFooData, GetFooResponses } from './types.gen';\n\nexport type Options<TData extends TDataShape = TDataShape, ThrowOnError extends boolean = boolean> = Options2<TData, ThrowOnError> & {\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\nexport const getFoo = <ThrowOnError extends boolean = false>(options?: Options<GetFooData, ThrowOnError>) => (options?.client ?? client).get<GetFooResponses, unknown, ThrowOnError>({\n    responseType: 'json',\n    url: '/foo',\n    ...options\n});\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/content-types/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type ClientOptions = {\n    baseURL: `${string}://${string}` | (string & {});\n};\n\nexport type GetFooData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/foo';\n};\n\nexport type GetFooResponses = {\n    /**\n     * OK\n     */\n    200: string;\n};\n\nexport type GetFooResponse = GetFooResponses[keyof GetFooResponses];\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/discriminator-all-of/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type { Bar, BarMapped, BarUnion, Baz, BazMapped, BazUnion, ClientOptions, Foo, FooMapped, FooUnion, Qux, QuxExtend, QuxMapped } from './types.gen';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/discriminator-all-of/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type ClientOptions = {\n    baseUrl: `${string}://${string}` | (string & {});\n};\n\nexport type Foo = {\n    id: string;\n};\n\nexport type Bar = Omit<Foo, 'id'> & {\n    bar?: string;\n    id: 'Bar';\n};\n\nexport type Baz = Omit<Foo, 'id'> & {\n    baz?: string;\n    id: 'Baz';\n};\n\nexport type Qux = Omit<Foo, 'id'> & {\n    qux?: boolean;\n    id: 'Qux';\n};\n\nexport type FooMapped = {\n    id: string;\n};\n\nexport type BarMapped = Omit<FooMapped, 'id'> & {\n    bar?: string;\n    id: 'bar';\n};\n\nexport type BazMapped = Omit<FooMapped, 'id'> & {\n    baz?: string;\n    id: 'baz';\n};\n\nexport type QuxMapped = Omit<FooMapped, 'id'> & {\n    qux?: boolean;\n    id: 'QuxMapped';\n};\n\nexport type FooUnion = ({\n    id: 'bar';\n} & BarUnion) | ({\n    id: 'baz';\n} & BazUnion);\n\nexport type BarUnion = {\n    id?: string;\n    bar?: string;\n};\n\nexport type BazUnion = {\n    id?: string;\n    baz?: string;\n};\n\nexport type QuxExtend = FooUnion;\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/discriminator-allof-inline/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type { Bar, Baz, ClientOptions, Foo, GetFoosData, GetFoosResponse, GetFoosResponses, Qux } from './types.gen';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/discriminator-allof-inline/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type ClientOptions = {\n    baseUrl: `${string}://${string}` | (string & {});\n};\n\nexport type Foo = {\n    $type: string;\n    foo?: string;\n};\n\nexport type Bar = Omit<Foo, '$type'> & {\n    $type: 'FooBar';\n    bar?: string;\n};\n\nexport type Baz = Omit<Foo, '$type'> & {\n    baz?: string;\n    $type: 'FooBaz';\n};\n\nexport type Qux = Omit<Bar, '$type'> & {\n    qux?: string;\n    $type: 'BarQux';\n};\n\nexport type GetFoosData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/foos';\n};\n\nexport type GetFoosResponses = {\n    /**\n     * OK\n     */\n    200: Bar | Baz | Qux;\n};\n\nexport type GetFoosResponse = GetFoosResponses[keyof GetFoosResponses];\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/discriminator-allof-nested/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type { CarDto, ClientOptions, GetCarsData, GetCarsResponse, GetCarsResponses, VehicleDto, VolvoDto } from './types.gen';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/discriminator-allof-nested/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type ClientOptions = {\n    baseUrl: `${string}://${string}` | (string & {});\n};\n\nexport type VehicleDto = {\n    $type: string;\n    id: number;\n};\n\nexport type CarDto = Omit<VehicleDto, '$type'> & {\n    modelName: string;\n    $type: 'Car';\n};\n\nexport type VolvoDto = Omit<CarDto, '$type'> & {\n    seatbeltCount: number;\n    $type: 'Volvo';\n};\n\nexport type GetCarsData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/cars';\n};\n\nexport type GetCarsResponses = {\n    /**\n     * List of cars\n     */\n    200: Array<CarDto | VolvoDto>;\n};\n\nexport type GetCarsResponse = GetCarsResponses[keyof GetCarsResponses];\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/discriminator-any-of/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type { Bar, Baz, ClientOptions, Foo, Quux, Quuz, Qux, Spæcial } from './types.gen';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/discriminator-any-of/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type ClientOptions = {\n    baseUrl: `${string}://${string}` | (string & {});\n};\n\nexport type Foo = ({\n    type?: 'Bar';\n} & Bar) | ({\n    type?: 'Baz';\n} & Baz);\n\nexport type Baz = Qux;\n\nexport type Bar = Qux;\n\nexport type Spæcial = Qux;\n\nexport type Qux = {\n    id: string;\n    type: Quux;\n};\n\nexport type Quux = 'Bar' | 'Baz';\n\nexport type Quuz = ({\n    type?: 'bar';\n} & Bar) | ({\n    type?: 'baz';\n} & Baz) | ({\n    type?: 'non-ascii';\n} & Spæcial);\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/discriminator-mapped-many/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type { Bar, Baz, ClientOptions, Foo, Spæcial } from './types.gen';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/discriminator-mapped-many/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type ClientOptions = {\n    baseUrl: `${string}://${string}` | (string & {});\n};\n\nexport type Foo = ({\n    foo: 'one' | 'two';\n} & Bar) | ({\n    foo: 'three';\n} & Baz) | ({\n    foo: 'four';\n} & Spæcial);\n\nexport type Bar = {\n    foo?: 'one' | 'two';\n};\n\nexport type Baz = {\n    foo?: 'three';\n};\n\nexport type Spæcial = {\n    foo?: 'four';\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/discriminator-non-string/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type { AutoConfig, BooleanAnyOf, BooleanOneOf, ClientOptions, CustomConfig, IntegerAllOfBase, IntegerAllOfChildA, IntegerAllOfChildB, IntegerOneOf, NullableIntegerOneOf, NullableVariantX, NullableVariantY, NumberOneOf, TypeOne, TypeTwo, VersionAlpha, VersionBeta } from './types.gen';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/discriminator-non-string/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type ClientOptions = {\n    baseUrl: `${string}://${string}` | (string & {});\n};\n\nexport type BooleanOneOf = ({\n    use_custom: false;\n} & AutoConfig) | ({\n    use_custom: true;\n} & CustomConfig);\n\nexport type AutoConfig = {\n    use_custom: false;\n    auto_setting: string;\n};\n\nexport type CustomConfig = {\n    use_custom: true;\n    custom_value: number;\n};\n\nexport type BooleanAnyOf = ({\n    use_custom?: false;\n} & AutoConfig) | ({\n    use_custom?: true;\n} & CustomConfig);\n\nexport type IntegerOneOf = ({\n    type_id: 1;\n} & TypeOne) | ({\n    type_id: 2;\n} & TypeTwo);\n\nexport type TypeOne = {\n    type_id: 1;\n    one_data: string;\n};\n\nexport type TypeTwo = {\n    type_id: 2;\n    two_data: string;\n};\n\nexport type NumberOneOf = ({\n    version: 1;\n} & VersionAlpha) | ({\n    version: 2.5;\n} & VersionBeta);\n\nexport type VersionAlpha = {\n    version: 1;\n    alpha_field: string;\n};\n\nexport type VersionBeta = {\n    version: 2.5;\n    beta_field: string;\n};\n\nexport type IntegerAllOfBase = {\n    kind: number;\n};\n\nexport type IntegerAllOfChildA = Omit<IntegerAllOfBase, 'kind'> & {\n    child_a_field: string;\n    kind: 1;\n};\n\nexport type IntegerAllOfChildB = Omit<IntegerAllOfBase, 'kind'> & {\n    child_b_field: string;\n    kind: 2;\n};\n\nexport type NullableIntegerOneOf = ({\n    tag: 10;\n} & NullableVariantX) | ({\n    tag: 20;\n} & NullableVariantY);\n\nexport type NullableVariantX = {\n    tag: 10 | null;\n    x_data: string;\n};\n\nexport type NullableVariantY = {\n    tag: 20 | null;\n    y_data: string;\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/discriminator-object-self-mapped/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type { BlogPostDto, BlogPostWithImageDto, ClientOptions, GetBlogPostsData, GetBlogPostsResponse, GetBlogPostsResponses } from './types.gen';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/discriminator-object-self-mapped/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type ClientOptions = {\n    baseUrl: `${string}://${string}` | (string & {});\n};\n\nexport type BlogPostDto = {\n    $type: 'BlogPost';\n    id: number;\n    title: string;\n};\n\nexport type BlogPostWithImageDto = Omit<BlogPostDto, '$type'> & {\n    imageUrl: string;\n    $type: 'BlogPostWithImage';\n};\n\nexport type GetBlogPostsData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/blog-posts';\n};\n\nexport type GetBlogPostsResponses = {\n    /**\n     * List of blog posts\n     */\n    200: Array<BlogPostDto | BlogPostWithImageDto>;\n};\n\nexport type GetBlogPostsResponse = GetBlogPostsResponses[keyof GetBlogPostsResponses];\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/discriminator-one-of/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type { Bar, Baz, ClientOptions, Foo, Quux, Quuz, Qux, Spæcial } from './types.gen';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/discriminator-one-of/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type ClientOptions = {\n    baseUrl: `${string}://${string}` | (string & {});\n};\n\nexport type Foo = ({\n    type: 'Bar';\n} & Bar) | ({\n    type: 'Baz';\n} & Baz);\n\nexport type Baz = Qux;\n\nexport type Bar = Qux;\n\nexport type Spæcial = Qux;\n\nexport type Qux = {\n    id: string;\n    type: Quux;\n};\n\nexport type Quux = 'Bar' | 'Baz';\n\nexport type Quuz = ({\n    type: 'bar';\n} & Bar) | ({\n    type: 'baz';\n} & Baz) | ({\n    type: 'non-ascii';\n} & Spæcial);\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/discriminator-one-of-read-write/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type { AnimalPayload, AnimalPayloadWritable, CatPayload, CatPayloadWritable, ClientOptions, CreatePetRequest, CreatePetRequestWritable, CreatePetResponse, CreatePetResponseWritable, DogPayload, DogPayloadWritable, PostPetsData, PostPetsResponse, PostPetsResponses } from './types.gen';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/discriminator-one-of-read-write/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type ClientOptions = {\n    baseUrl: `${string}://${string}` | (string & {});\n};\n\nexport type AnimalPayload = {\n    typeDiscriminator: string;\n};\n\nexport type DogPayload = Omit<AnimalPayload, 'typeDiscriminator'> & {\n    breed: string;\n    canFetch: boolean;\n    readonly displayBreed: string;\n    typeDiscriminator: 'dog';\n};\n\nexport type CatPayload = Omit<AnimalPayload, 'typeDiscriminator'> & {\n    breed: string;\n    livesRemaining: number;\n    readonly displayBreed: string;\n    typeDiscriminator: 'cat';\n};\n\nexport type CreatePetRequest = {\n    name: string;\n    animal: ({\n        typeDiscriminator: 'dog';\n    } & DogPayload) | ({\n        typeDiscriminator: 'cat';\n    } & CatPayload);\n};\n\nexport type CreatePetResponse = {\n    id: string;\n    name: string;\n    animal: ({\n        typeDiscriminator: 'dog';\n    } & DogPayload) | ({\n        typeDiscriminator: 'cat';\n    } & CatPayload);\n};\n\nexport type DogPayloadWritable = Omit<AnimalPayloadWritable, 'typeDiscriminator'> & {\n    breed: string;\n    canFetch: boolean;\n    typeDiscriminator: 'dog';\n};\n\nexport type CatPayloadWritable = Omit<AnimalPayloadWritable, 'typeDiscriminator'> & {\n    breed: string;\n    livesRemaining: number;\n    typeDiscriminator: 'cat';\n};\n\nexport type CreatePetRequestWritable = {\n    name: string;\n    animal: ({\n        typeDiscriminator: 'dog';\n    } & DogPayloadWritable) | ({\n        typeDiscriminator: 'cat';\n    } & CatPayloadWritable);\n};\n\nexport type CreatePetResponseWritable = {\n    id: string;\n    name: string;\n    animal: ({\n        typeDiscriminator: 'dog';\n    } & DogPayloadWritable) | ({\n        typeDiscriminator: 'cat';\n    } & CatPayloadWritable);\n};\n\nexport type AnimalPayloadWritable = {\n    typeDiscriminator: string;\n};\n\nexport type PostPetsData = {\n    body: CreatePetRequestWritable;\n    path?: never;\n    query?: never;\n    url: '/pets';\n};\n\nexport type PostPetsResponses = {\n    /**\n     * OK\n     */\n    200: CreatePetResponse;\n};\n\nexport type PostPetsResponse = PostPetsResponses[keyof PostPetsResponses];\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/duplicate-null/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type { ClientOptions, WeirdEnum } from './types.gen';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/duplicate-null/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type ClientOptions = {\n    baseUrl: `${string}://${string}` | (string & {});\n};\n\n/**\n * should not produce duplicate null\n */\nexport type WeirdEnum = '' | string | null;\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/enum-escape/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type { Bar, ClientOptions, Foo } from './types.gen';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/enum-escape/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type ClientOptions = {\n    baseUrl: `${string}://${string}` | (string & {});\n};\n\nexport type Foo = {\n    foo?: 'foo\\'bar' | 'foo\"bar';\n};\n\nexport type Bar = 'foo\\'bar' | 'foo\"bar';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/enum-inline/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type { Bar, Baz, ClientOptions, Foo, FooEnum, FooEnum2, GetFooData, GetFooResponse, GetFooResponses, PostFooData, PostFooResponse, PostFooResponses, PutFooData, PutFooResponse, PutFooResponses, TypeEnum } from './types.gen';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/enum-inline/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type ClientOptions = {\n    baseUrl: `${string}://${string}` | (string & {});\n};\n\nexport type Foo = {\n    type?: TypeEnum;\n};\n\nexport type Bar = {\n    type?: Baz;\n};\n\nexport type Baz = 'qux' | 'quux';\n\nexport type FooEnum = 'foo' | 'bar' | 'FooBar' | 'fooBar' | 'foo bar';\n\nexport type FooEnum2 = 'baz';\n\nexport type TypeEnum = 'foo' | 'bar';\n\nexport type GetFooData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/foo';\n};\n\nexport type GetFooResponses = {\n    /**\n     * OK\n     */\n    200: {\n        foo?: FooEnum;\n    };\n};\n\nexport type GetFooResponse = GetFooResponses[keyof GetFooResponses];\n\nexport type PostFooData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/foo';\n};\n\nexport type PostFooResponses = {\n    /**\n     * OK\n     */\n    200: {\n        foo?: FooEnum2;\n    };\n};\n\nexport type PostFooResponse = PostFooResponses[keyof PostFooResponses];\n\nexport type PutFooData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/foo';\n};\n\nexport type PutFooResponses = {\n    /**\n     * OK\n     */\n    200: Baz;\n};\n\nexport type PutFooResponse = PutFooResponses[keyof PutFooResponses];\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/enum-inline-javascript/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport { type Bar, Baz, type ClientOptions, type Foo, FooEnum, FooEnum2, type GetFooData, type GetFooResponse, type GetFooResponses, type PostFooData, type PostFooResponse, type PostFooResponses, type PutFooData, type PutFooResponse, type PutFooResponses, TypeEnum } from './types.gen';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/enum-inline-javascript/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type ClientOptions = {\n    baseUrl: `${string}://${string}` | (string & {});\n};\n\nexport type Foo = {\n    type?: TypeEnum;\n};\n\nexport type Bar = {\n    type?: Baz;\n};\n\nexport const Baz = { QUX: 'qux', QUUX: 'quux' } as const;\n\nexport type Baz = typeof Baz[keyof typeof Baz];\n\nexport const FooEnum = {\n    FOO: 'foo',\n    BAR: 'bar',\n    FOO_BAR: 'FooBar',\n    FOO_BAR2: 'fooBar',\n    FOO_BAR3: 'foo bar'\n} as const;\n\nexport type FooEnum = typeof FooEnum[keyof typeof FooEnum];\n\nexport const FooEnum2 = { BAZ: 'baz' } as const;\n\nexport type FooEnum2 = typeof FooEnum2[keyof typeof FooEnum2];\n\nexport const TypeEnum = { FOO: 'foo', BAR: 'bar' } as const;\n\nexport type TypeEnum = typeof TypeEnum[keyof typeof TypeEnum];\n\nexport type GetFooData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/foo';\n};\n\nexport type GetFooResponses = {\n    /**\n     * OK\n     */\n    200: {\n        foo?: FooEnum;\n    };\n};\n\nexport type GetFooResponse = GetFooResponses[keyof GetFooResponses];\n\nexport type PostFooData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/foo';\n};\n\nexport type PostFooResponses = {\n    /**\n     * OK\n     */\n    200: {\n        foo?: FooEnum2;\n    };\n};\n\nexport type PostFooResponse = PostFooResponses[keyof PostFooResponses];\n\nexport type PutFooData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/foo';\n};\n\nexport type PutFooResponses = {\n    /**\n     * OK\n     */\n    200: Baz;\n};\n\nexport type PutFooResponse = PutFooResponses[keyof PutFooResponses];\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/enum-inline-name-resolver/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport { type Bar, Baz, type ClientOptions, type Foo, FooEnum, FooEnum2, type GetFooData, type GetFooResponse, type GetFooResponses, type PostFooData, type PostFooResponse, type PostFooResponses, type PutFooData, type PutFooResponse, type PutFooResponses, TypeEnum } from './types.gen';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/enum-inline-name-resolver/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type ClientOptions = {\n    baseUrl: `${string}://${string}` | (string & {});\n};\n\nexport type Foo = {\n    type?: TypeEnum;\n};\n\nexport type Bar = {\n    type?: Baz;\n};\n\nexport const Baz = { QUX: 'qux', QUUX: 'quux' } as const;\n\nexport type Baz = typeof Baz[keyof typeof Baz];\n\nexport const FooEnum = {\n    FOO: 'foo',\n    BAR: 'bar',\n    FOO_BAR: 'FooBar',\n    FOO_BAR_N2: 'fooBar',\n    FOO_BAR_N3: 'foo bar'\n} as const;\n\nexport type FooEnum = typeof FooEnum[keyof typeof FooEnum];\n\nexport const FooEnum2 = { BAZ: 'baz' } as const;\n\nexport type FooEnum2 = typeof FooEnum2[keyof typeof FooEnum2];\n\nexport const TypeEnum = { FOO: 'foo', BAR: 'bar' } as const;\n\nexport type TypeEnum = typeof TypeEnum[keyof typeof TypeEnum];\n\nexport type GetFooData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/foo';\n};\n\nexport type GetFooResponses = {\n    /**\n     * OK\n     */\n    200: {\n        foo?: FooEnum;\n    };\n};\n\nexport type GetFooResponse = GetFooResponses[keyof GetFooResponses];\n\nexport type PostFooData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/foo';\n};\n\nexport type PostFooResponses = {\n    /**\n     * OK\n     */\n    200: {\n        foo?: FooEnum2;\n    };\n};\n\nexport type PostFooResponse = PostFooResponses[keyof PostFooResponses];\n\nexport type PutFooData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/foo';\n};\n\nexport type PutFooResponses = {\n    /**\n     * OK\n     */\n    200: Baz;\n};\n\nexport type PutFooResponse = PutFooResponses[keyof PutFooResponses];\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/enum-inline-name-resolver-null/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport { type Bar, Baz, type ClientOptions, type Foo, FooEnum, FooEnum2, type GetFooData, type GetFooResponse, type GetFooResponses, type PostFooData, type PostFooResponse, type PostFooResponses, type PutFooData, type PutFooResponse, type PutFooResponses, TypeEnum } from './types.gen';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/enum-inline-name-resolver-null/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type ClientOptions = {\n    baseUrl: `${string}://${string}` | (string & {});\n};\n\nexport type Foo = {\n    type?: TypeEnum;\n};\n\nexport type Bar = {\n    type?: Baz;\n};\n\nexport const Baz = { QUX: 'qux', QUUX: 'quux' } as const;\n\nexport type Baz = typeof Baz[keyof typeof Baz];\n\nexport const FooEnum = {\n    FOO: 'foo',\n    BAR: 'bar',\n    FOO_BAR: 'FooBar',\n    FOO_BAR2: 'fooBar',\n    FOO_BAR3: 'foo bar'\n} as const;\n\nexport type FooEnum = typeof FooEnum[keyof typeof FooEnum];\n\nexport const FooEnum2 = { BAZ: 'baz' } as const;\n\nexport type FooEnum2 = typeof FooEnum2[keyof typeof FooEnum2];\n\nexport const TypeEnum = { FOO: 'foo', BAR: 'bar' } as const;\n\nexport type TypeEnum = typeof TypeEnum[keyof typeof TypeEnum];\n\nexport type GetFooData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/foo';\n};\n\nexport type GetFooResponses = {\n    /**\n     * OK\n     */\n    200: {\n        foo?: FooEnum;\n    };\n};\n\nexport type GetFooResponse = GetFooResponses[keyof GetFooResponses];\n\nexport type PostFooData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/foo';\n};\n\nexport type PostFooResponses = {\n    /**\n     * OK\n     */\n    200: {\n        foo?: FooEnum2;\n    };\n};\n\nexport type PostFooResponse = PostFooResponses[keyof PostFooResponses];\n\nexport type PutFooData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/foo';\n};\n\nexport type PutFooResponses = {\n    /**\n     * OK\n     */\n    200: Baz;\n};\n\nexport type PutFooResponse = PutFooResponses[keyof PutFooResponses];\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/enum-inline-typescript/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport { type Bar, Baz, type ClientOptions, type Foo, FooEnum, FooEnum2, type GetFooData, type GetFooResponse, type GetFooResponses, type PostFooData, type PostFooResponse, type PostFooResponses, type PutFooData, type PutFooResponse, type PutFooResponses, TypeEnum } from './types.gen';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/enum-inline-typescript/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type ClientOptions = {\n    baseUrl: `${string}://${string}` | (string & {});\n};\n\nexport type Foo = {\n    type?: TypeEnum;\n};\n\nexport type Bar = {\n    type?: Baz;\n};\n\nexport enum Baz {\n    QUX = 'qux',\n    QUUX = 'quux'\n}\n\nexport enum FooEnum {\n    FOO = 'foo',\n    BAR = 'bar',\n    FOO_BAR = 'FooBar',\n    FOO_BAR2 = 'fooBar',\n    FOO_BAR3 = 'foo bar'\n}\n\nexport enum FooEnum2 {\n    BAZ = 'baz'\n}\n\nexport enum TypeEnum {\n    FOO = 'foo',\n    BAR = 'bar'\n}\n\nexport type GetFooData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/foo';\n};\n\nexport type GetFooResponses = {\n    /**\n     * OK\n     */\n    200: {\n        foo?: FooEnum;\n    };\n};\n\nexport type GetFooResponse = GetFooResponses[keyof GetFooResponses];\n\nexport type PostFooData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/foo';\n};\n\nexport type PostFooResponses = {\n    /**\n     * OK\n     */\n    200: {\n        foo?: FooEnum2;\n    };\n};\n\nexport type PostFooResponse = PostFooResponses[keyof PostFooResponses];\n\nexport type PutFooData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/foo';\n};\n\nexport type PutFooResponses = {\n    /**\n     * OK\n     */\n    200: Baz;\n};\n\nexport type PutFooResponse = PutFooResponses[keyof PutFooResponses];\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/enum-names-values/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type { _110, Arrays, ClientOptions, Foo, MyFoo, MyFoo2, MyFooRef, Numbers } from './types.gen';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/enum-names-values/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type ClientOptions = {\n    baseUrl: `${string}://${string}` | (string & {});\n};\n\nexport type _110 = '1-10' | '11-20';\n\nexport type MyFoo = 'myFoo' | 'myBar';\n\nexport type MyFoo2 = 'MyFoo' | 'MyBar';\n\nexport type Foo = 'foo' | 'bar' | null | '' | true | false;\n\nexport type Numbers = 100 | 200 | 300 | -100 | -200 | -300;\n\nexport type Arrays = [\n    'foo'\n] | [\n    'bar'\n] | [\n    'baz'\n];\n\nexport type MyFooRef = {\n    foo?: Array<MyFoo2>;\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/enum-names-values-javascript-PascalCase/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport { _110, Arrays, type ClientOptions, Foo, MyFoo, MyFoo2, type MyFooRef, Numbers } from './types.gen';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/enum-names-values-javascript-PascalCase/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type ClientOptions = {\n    baseUrl: `${string}://${string}` | (string & {});\n};\n\nexport const _110 = { 110: '1-10', 1120: '11-20' } as const;\n\nexport type _110 = typeof _110[keyof typeof _110];\n\nexport const MyFoo = { MyFoo: 'myFoo', MyBar: 'myBar' } as const;\n\nexport type MyFoo = typeof MyFoo[keyof typeof MyFoo];\n\nexport const MyFoo2 = { MyFoo: 'MyFoo', MyBar: 'MyBar' } as const;\n\nexport type MyFoo2 = typeof MyFoo2[keyof typeof MyFoo2];\n\nexport const Foo = {\n    Foo: 'foo',\n    Bar: 'bar',\n    Null: null,\n    '': '',\n    True: true,\n    False: false\n} as const;\n\nexport type Foo = typeof Foo[keyof typeof Foo];\n\nexport const Numbers = {\n    100: 100,\n    200: 200,\n    300: 300,\n    '-100': -100,\n    '-200': -200,\n    '-300': -300\n} as const;\n\nexport type Numbers = typeof Numbers[keyof typeof Numbers];\n\nexport const Arrays = {\n    0: ['foo'],\n    1: ['bar'],\n    2: ['baz']\n} as const;\n\nexport type Arrays = typeof Arrays[keyof typeof Arrays];\n\nexport type MyFooRef = {\n    foo?: Array<MyFoo2>;\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/enum-names-values-javascript-SCREAMING_SNAKE_CASE/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport { _110, Arrays, type ClientOptions, Foo, MyFoo, MyFoo2, type MyFooRef, Numbers } from './types.gen';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/enum-names-values-javascript-SCREAMING_SNAKE_CASE/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type ClientOptions = {\n    baseUrl: `${string}://${string}` | (string & {});\n};\n\nexport const _110 = { '1_10': '1-10', '11_20': '11-20' } as const;\n\nexport type _110 = typeof _110[keyof typeof _110];\n\nexport const MyFoo = { MY_FOO: 'myFoo', MY_BAR: 'myBar' } as const;\n\nexport type MyFoo = typeof MyFoo[keyof typeof MyFoo];\n\nexport const MyFoo2 = { MY_FOO: 'MyFoo', MY_BAR: 'MyBar' } as const;\n\nexport type MyFoo2 = typeof MyFoo2[keyof typeof MyFoo2];\n\nexport const Foo = {\n    FOO: 'foo',\n    BAR: 'bar',\n    NULL: null,\n    '': '',\n    TRUE: true,\n    FALSE: false\n} as const;\n\nexport type Foo = typeof Foo[keyof typeof Foo];\n\nexport const Numbers = {\n    100: 100,\n    200: 200,\n    300: 300,\n    '-100': -100,\n    '-200': -200,\n    '-300': -300\n} as const;\n\nexport type Numbers = typeof Numbers[keyof typeof Numbers];\n\nexport const Arrays = {\n    0: ['foo'],\n    1: ['bar'],\n    2: ['baz']\n} as const;\n\nexport type Arrays = typeof Arrays[keyof typeof Arrays];\n\nexport type MyFooRef = {\n    foo?: Array<MyFoo2>;\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/enum-names-values-javascript-camelCase/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport { _110, Arrays, type ClientOptions, Foo, MyFoo, MyFoo2, type MyFooRef, Numbers } from './types.gen';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/enum-names-values-javascript-camelCase/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type ClientOptions = {\n    baseUrl: `${string}://${string}` | (string & {});\n};\n\nexport const _110 = { 110: '1-10', 1120: '11-20' } as const;\n\nexport type _110 = typeof _110[keyof typeof _110];\n\nexport const MyFoo = { myFoo: 'myFoo', myBar: 'myBar' } as const;\n\nexport type MyFoo = typeof MyFoo[keyof typeof MyFoo];\n\nexport const MyFoo2 = { myFoo: 'MyFoo', myBar: 'MyBar' } as const;\n\nexport type MyFoo2 = typeof MyFoo2[keyof typeof MyFoo2];\n\nexport const Foo = {\n    foo: 'foo',\n    bar: 'bar',\n    null: null,\n    '': '',\n    true: true,\n    false: false\n} as const;\n\nexport type Foo = typeof Foo[keyof typeof Foo];\n\nexport const Numbers = {\n    100: 100,\n    200: 200,\n    300: 300,\n    '-100': -100,\n    '-200': -200,\n    '-300': -300\n} as const;\n\nexport type Numbers = typeof Numbers[keyof typeof Numbers];\n\nexport const Arrays = {\n    0: ['foo'],\n    1: ['bar'],\n    2: ['baz']\n} as const;\n\nexport type Arrays = typeof Arrays[keyof typeof Arrays];\n\nexport type MyFooRef = {\n    foo?: Array<MyFoo2>;\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/enum-names-values-javascript-ignore-null/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport { _110, Arrays, type ClientOptions, Foo, MyFoo, MyFoo2, type MyFooRef, Numbers } from './types.gen';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/enum-names-values-javascript-ignore-null/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type ClientOptions = {\n    baseUrl: `${string}://${string}` | (string & {});\n};\n\nexport const _110 = { '1-10': '1-10', '11-20': '11-20' } as const;\n\nexport type _110 = typeof _110[keyof typeof _110];\n\nexport const MyFoo = { myFoo: 'myFoo', myBar: 'myBar' } as const;\n\nexport type MyFoo = typeof MyFoo[keyof typeof MyFoo];\n\nexport const MyFoo2 = { MyFoo: 'MyFoo', MyBar: 'MyBar' } as const;\n\nexport type MyFoo2 = typeof MyFoo2[keyof typeof MyFoo2];\n\nexport const Foo = {\n    foo: 'foo',\n    bar: 'bar',\n    '': '',\n    true: true,\n    false: false\n} as const;\n\nexport type Foo = typeof Foo[keyof typeof Foo];\n\nexport const Numbers = {\n    100: 100,\n    200: 200,\n    300: 300,\n    '-100': -100,\n    '-200': -200,\n    '-300': -300\n} as const;\n\nexport type Numbers = typeof Numbers[keyof typeof Numbers];\n\nexport const Arrays = {\n    0: ['foo'],\n    1: ['bar'],\n    2: ['baz']\n} as const;\n\nexport type Arrays = typeof Arrays[keyof typeof Arrays];\n\nexport type MyFooRef = {\n    foo?: Array<MyFoo2>;\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/enum-names-values-javascript-preserve/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport { _110, Arrays, type ClientOptions, Foo, MyFoo, MyFoo2, type MyFooRef, Numbers } from './types.gen';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/enum-names-values-javascript-preserve/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type ClientOptions = {\n    baseUrl: `${string}://${string}` | (string & {});\n};\n\nexport const _110 = { '1-10': '1-10', '11-20': '11-20' } as const;\n\nexport type _110 = typeof _110[keyof typeof _110];\n\nexport const MyFoo = { myFoo: 'myFoo', myBar: 'myBar' } as const;\n\nexport type MyFoo = typeof MyFoo[keyof typeof MyFoo];\n\nexport const MyFoo2 = { MyFoo: 'MyFoo', MyBar: 'MyBar' } as const;\n\nexport type MyFoo2 = typeof MyFoo2[keyof typeof MyFoo2];\n\nexport const Foo = {\n    foo: 'foo',\n    bar: 'bar',\n    null: null,\n    '': '',\n    true: true,\n    false: false\n} as const;\n\nexport type Foo = typeof Foo[keyof typeof Foo];\n\nexport const Numbers = {\n    100: 100,\n    200: 200,\n    300: 300,\n    '-100': -100,\n    '-200': -200,\n    '-300': -300\n} as const;\n\nexport type Numbers = typeof Numbers[keyof typeof Numbers];\n\nexport const Arrays = {\n    0: ['foo'],\n    1: ['bar'],\n    2: ['baz']\n} as const;\n\nexport type Arrays = typeof Arrays[keyof typeof Arrays];\n\nexport type MyFooRef = {\n    foo?: Array<MyFoo2>;\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/enum-names-values-javascript-snake_case/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport { _110, Arrays, type ClientOptions, Foo, MyFoo, MyFoo2, type MyFooRef, Numbers } from './types.gen';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/enum-names-values-javascript-snake_case/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type ClientOptions = {\n    baseUrl: `${string}://${string}` | (string & {});\n};\n\nexport const _110 = { '1_10': '1-10', '11_20': '11-20' } as const;\n\nexport type _110 = typeof _110[keyof typeof _110];\n\nexport const MyFoo = { my_foo: 'myFoo', my_bar: 'myBar' } as const;\n\nexport type MyFoo = typeof MyFoo[keyof typeof MyFoo];\n\nexport const MyFoo2 = { my_foo: 'MyFoo', my_bar: 'MyBar' } as const;\n\nexport type MyFoo2 = typeof MyFoo2[keyof typeof MyFoo2];\n\nexport const Foo = {\n    foo: 'foo',\n    bar: 'bar',\n    null: null,\n    '': '',\n    true: true,\n    false: false\n} as const;\n\nexport type Foo = typeof Foo[keyof typeof Foo];\n\nexport const Numbers = {\n    100: 100,\n    200: 200,\n    300: 300,\n    '-100': -100,\n    '-200': -200,\n    '-300': -300\n} as const;\n\nexport type Numbers = typeof Numbers[keyof typeof Numbers];\n\nexport const Arrays = {\n    0: ['foo'],\n    1: ['bar'],\n    2: ['baz']\n} as const;\n\nexport type Arrays = typeof Arrays[keyof typeof Arrays];\n\nexport type MyFooRef = {\n    foo?: Array<MyFoo2>;\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/enum-names-values-typescript-PascalCase/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport { _110, type Arrays, type ClientOptions, type Foo, MyFoo, MyFoo2, type MyFooRef, Numbers } from './types.gen';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/enum-names-values-typescript-PascalCase/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type ClientOptions = {\n    baseUrl: `${string}://${string}` | (string & {});\n};\n\nexport enum _110 {\n    _110 = '1-10',\n    _1120 = '11-20'\n}\n\nexport enum MyFoo {\n    MyFoo = 'myFoo',\n    MyBar = 'myBar'\n}\n\nexport enum MyFoo2 {\n    MyFoo = 'MyFoo',\n    MyBar = 'MyBar'\n}\n\nexport type Foo = 'foo' | 'bar' | null | '' | true | false;\n\nexport enum Numbers {\n    _100 = 100,\n    _200 = 200,\n    _300 = 300,\n    '_-100' = -100,\n    '_-200' = -200,\n    '_-300' = -300\n}\n\nexport type Arrays = [\n    'foo'\n] | [\n    'bar'\n] | [\n    'baz'\n];\n\nexport type MyFooRef = {\n    foo?: Array<MyFoo2>;\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/enum-names-values-typescript-SCREAMING_SNAKE_CASE/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport { _110, type Arrays, type ClientOptions, type Foo, MyFoo, MyFoo2, type MyFooRef, Numbers } from './types.gen';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/enum-names-values-typescript-SCREAMING_SNAKE_CASE/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type ClientOptions = {\n    baseUrl: `${string}://${string}` | (string & {});\n};\n\nexport enum _110 {\n    '1_10' = '1-10',\n    '11_20' = '11-20'\n}\n\nexport enum MyFoo {\n    MY_FOO = 'myFoo',\n    MY_BAR = 'myBar'\n}\n\nexport enum MyFoo2 {\n    MY_FOO = 'MyFoo',\n    MY_BAR = 'MyBar'\n}\n\nexport type Foo = 'foo' | 'bar' | null | '' | true | false;\n\nexport enum Numbers {\n    _100 = 100,\n    _200 = 200,\n    _300 = 300,\n    '_-100' = -100,\n    '_-200' = -200,\n    '_-300' = -300\n}\n\nexport type Arrays = [\n    'foo'\n] | [\n    'bar'\n] | [\n    'baz'\n];\n\nexport type MyFooRef = {\n    foo?: Array<MyFoo2>;\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/enum-names-values-typescript-camelCase/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport { _110, type Arrays, type ClientOptions, type Foo, MyFoo, MyFoo2, type MyFooRef, Numbers } from './types.gen';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/enum-names-values-typescript-camelCase/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type ClientOptions = {\n    baseUrl: `${string}://${string}` | (string & {});\n};\n\nexport enum _110 {\n    _110 = '1-10',\n    _1120 = '11-20'\n}\n\nexport enum MyFoo {\n    myFoo = 'myFoo',\n    myBar = 'myBar'\n}\n\nexport enum MyFoo2 {\n    myFoo = 'MyFoo',\n    myBar = 'MyBar'\n}\n\nexport type Foo = 'foo' | 'bar' | null | '' | true | false;\n\nexport enum Numbers {\n    _100 = 100,\n    _200 = 200,\n    _300 = 300,\n    '_-100' = -100,\n    '_-200' = -200,\n    '_-300' = -300\n}\n\nexport type Arrays = [\n    'foo'\n] | [\n    'bar'\n] | [\n    'baz'\n];\n\nexport type MyFooRef = {\n    foo?: Array<MyFoo2>;\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/enum-names-values-typescript-const/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport { _110, type Arrays, type ClientOptions, type Foo, MyFoo, MyFoo2, type MyFooRef, Numbers } from './types.gen';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/enum-names-values-typescript-const/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type ClientOptions = {\n    baseUrl: `${string}://${string}` | (string & {});\n};\n\nexport const enum _110 {\n    _110 = '1-10',\n    _1120 = '11-20'\n}\n\nexport const enum MyFoo {\n    myFoo = 'myFoo',\n    myBar = 'myBar'\n}\n\nexport const enum MyFoo2 {\n    myFoo = 'MyFoo',\n    myBar = 'MyBar'\n}\n\nexport type Foo = 'foo' | 'bar' | null | '' | true | false;\n\nexport const enum Numbers {\n    _100 = 100,\n    _200 = 200,\n    _300 = 300,\n    '_-100' = -100,\n    '_-200' = -200,\n    '_-300' = -300\n}\n\nexport type Arrays = [\n    'foo'\n] | [\n    'bar'\n] | [\n    'baz'\n];\n\nexport type MyFooRef = {\n    foo?: Array<MyFoo2>;\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/enum-names-values-typescript-preserve/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport { _110, type Arrays, type ClientOptions, type Foo, MyFoo, MyFoo2, type MyFooRef, Numbers } from './types.gen';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/enum-names-values-typescript-preserve/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type ClientOptions = {\n    baseUrl: `${string}://${string}` | (string & {});\n};\n\nexport enum _110 {\n    '1-10' = '1-10',\n    '11-20' = '11-20'\n}\n\nexport enum MyFoo {\n    myFoo = 'myFoo',\n    myBar = 'myBar'\n}\n\nexport enum MyFoo2 {\n    MyFoo = 'MyFoo',\n    MyBar = 'MyBar'\n}\n\nexport type Foo = 'foo' | 'bar' | null | '' | true | false;\n\nexport enum Numbers {\n    _100 = 100,\n    _200 = 200,\n    _300 = 300,\n    '_-100' = -100,\n    '_-200' = -200,\n    '_-300' = -300\n}\n\nexport type Arrays = [\n    'foo'\n] | [\n    'bar'\n] | [\n    'baz'\n];\n\nexport type MyFooRef = {\n    foo?: Array<MyFoo2>;\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/enum-names-values-typescript-snake_case/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport { _110, type Arrays, type ClientOptions, type Foo, MyFoo, MyFoo2, type MyFooRef, Numbers } from './types.gen';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/enum-names-values-typescript-snake_case/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type ClientOptions = {\n    baseUrl: `${string}://${string}` | (string & {});\n};\n\nexport enum _110 {\n    '1_10' = '1-10',\n    '11_20' = '11-20'\n}\n\nexport enum MyFoo {\n    my_foo = 'myFoo',\n    my_bar = 'myBar'\n}\n\nexport enum MyFoo2 {\n    my_foo = 'MyFoo',\n    my_bar = 'MyBar'\n}\n\nexport type Foo = 'foo' | 'bar' | null | '' | true | false;\n\nexport enum Numbers {\n    _100 = 100,\n    _200 = 200,\n    _300 = 300,\n    '_-100' = -100,\n    '_-200' = -200,\n    '_-300' = -300\n}\n\nexport type Arrays = [\n    'foo'\n] | [\n    'bar'\n] | [\n    'baz'\n];\n\nexport type MyFooRef = {\n    foo?: Array<MyFoo2>;\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/enum-null/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type { Bar, Baz, ClientOptions, Foo } from './types.gen';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/enum-null/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type ClientOptions = {\n    baseUrl: `${string}://${string}` | (string & {});\n};\n\nexport type Foo = 'foo' | 'bar' | null;\n\nexport type Bar = 'foo' | 'bar';\n\nexport type Baz = 'foo' | 'bar';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/exclude-deprecated/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type { ClientOptions, Foo, PostFooData, PostFooResponses } from './types.gen';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/exclude-deprecated/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type ClientOptions = {\n    baseUrl: `${string}://${string}` | (string & {});\n};\n\nexport type Foo = string;\n\nexport type PostFooData = {\n    body: Foo;\n    path?: never;\n    query?: never;\n    url: '/foo';\n};\n\nexport type PostFooResponses = {\n    /**\n     * OK\n     */\n    200: unknown;\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/external/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type { _1, ClientOptions, Deep, ExternalAllOfSchema, ExternalAnyOfSchema, ExternalArraySchema, ExternalDeepParam, ExternalDoubleNestedNumeric, ExternalDoubleNestedProp, ExternalIdParam, ExternalMixedBody, ExternalMixedProperties, ExternalModelBody, ExternalNested, ExternalNestedBody, ExternalNestedNumeric, ExternalNestedNumericObjectA, ExternalNestedNumericObjectB, ExternalNestedObjectA, ExternalNestedObjectB, ExternalNumericParam, ExternalSchemaA, ExternalSchemaB, ExternalSchemaC, ExternalSchemaExternalProp, ExternalSchemaExternalPropAlias, ExternalSchemaPathA, ExternalSchemaPathB, ExternalSchemaPropertyA, ExternalSchemaPropertyB, ExternalSchemaPropertyC, ExternalSchemaPropertyD, ExternalSharedModel, ExternalSharedModelWithUuid, ExternalUnionSchema, ExternalUuidBody, ExternalUuidParam, GetExternalArrayData, GetExternalArrayResponse, GetExternalArrayResponses, GetExternalMixedData, GetExternalMixedResponse, GetExternalMixedResponses, GetExternalModelData, GetExternalModelError, GetExternalModelErrors, GetExternalModelResponse, GetExternalModelResponses, GetExternalNestedData, GetExternalNestedResponse, GetExternalNestedResponses, GetExternalPropertiesByIdData, GetExternalPropertiesByIdResponse, GetExternalPropertiesByIdResponses, GetExternalUnionData, GetExternalUnionResponse, GetExternalUnionResponses, GetExternalUuidData, GetExternalUuidResponse, GetExternalUuidResponses, Id, Name, PostExternalArrayData, PostExternalArrayResponse, PostExternalArrayResponses, PostExternalMixedData, PostExternalMixedResponse, PostExternalMixedResponses, PostExternalModelData, PostExternalModelError, PostExternalModelErrors, PostExternalModelResponse, PostExternalModelResponses, PostExternalNestedData, PostExternalNestedResponse, PostExternalNestedResponses, PostExternalUnionData, PostExternalUnionResponse, PostExternalUnionResponses, PutExternalUuidData, PutExternalUuidResponse, PutExternalUuidResponses } from './types.gen';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/external/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type ClientOptions = {\n    baseUrl: `${string}://${string}` | (string & {});\n};\n\nexport type _1 = string;\n\n/**\n * External schema (A)\n */\nexport type ExternalSchemaA = ExternalSharedModel;\n\n/**\n * External schema (B) - second use of ExternalSharedModel\n */\nexport type ExternalSchemaB = ExternalSharedModel;\n\n/**\n * External schema (C) - third use of ExternalSharedModel\n */\nexport type ExternalSchemaC = ExternalSharedModel;\n\n/**\n * External schema via path reference (A)\n */\nexport type ExternalSchemaPathA = ExternalSharedModel;\n\n/**\n * External schema via path reference (B) - second use\n */\nexport type ExternalSchemaPathB = ExternalSharedModel;\n\n/**\n * External schema property (A)\n */\nexport type ExternalSchemaPropertyA = {\n    uuid1?: ExternalSharedModelWithUuid;\n};\n\n/**\n * External schema property (B) - second use of UUID\n */\nexport type ExternalSchemaPropertyB = {\n    uuid2?: ExternalSharedModelWithUuid;\n};\n\n/**\n * External schema property (C) - third use of UUID\n */\nexport type ExternalSchemaPropertyC = {\n    uuid3?: ExternalSharedModelWithUuid;\n};\n\n/**\n * External schema property with duplicate refs (D)\n */\nexport type ExternalSchemaPropertyD = {\n    uuid4?: ExternalSharedModelWithUuid;\n    uuid5?: ExternalSharedModelWithUuid;\n};\n\n/**\n * External schema property via external property ref (id)\n */\nexport type ExternalSchemaExternalProp = {\n    id3?: Id;\n    id4?: Id;\n};\n\n/**\n * Alias to external property via component property ref\n */\nexport type ExternalSchemaExternalPropAlias = {\n    id5?: Id;\n    id6?: Id;\n};\n\n/**\n * External double nested prop via property ref\n */\nexport type ExternalDoubleNestedProp = {\n    deep1?: Deep;\n    deep2?: Deep;\n};\n\n/**\n * External double nested numeric properties\n */\nexport type ExternalDoubleNestedNumeric = {\n    numeric1?: _1;\n    numeric2?: _1;\n};\n\n/**\n * External nested object reference (A)\n */\nexport type ExternalNestedObjectA = ExternalNested;\n\n/**\n * External nested object reference (B) - second use\n */\nexport type ExternalNestedObjectB = ExternalNested;\n\n/**\n * External numeric nested object reference (A)\n */\nexport type ExternalNestedNumericObjectA = ExternalNestedNumeric;\n\n/**\n * External numeric nested object reference (B) - second use\n */\nexport type ExternalNestedNumericObjectB = ExternalNestedNumeric;\n\n/**\n * Mixed external property references\n */\nexport type ExternalMixedProperties = {\n    id7?: Id;\n    name1?: Name;\n    uuid6?: ExternalSharedModelWithUuid;\n    deep3?: Deep;\n    numeric3?: _1;\n};\n\n/**\n * Array containing external references\n */\nexport type ExternalArraySchema = {\n    items?: Array<ExternalSharedModel>;\n    uuidItems?: Array<ExternalSharedModelWithUuid>;\n};\n\n/**\n * Union type with external references\n */\nexport type ExternalUnionSchema = ExternalSharedModel | ExternalSharedModelWithUuid;\n\n/**\n * AllOf with external references\n */\nexport type ExternalAllOfSchema = ExternalSharedModel & {\n    additional?: ExternalSharedModelWithUuid;\n};\n\n/**\n * AnyOf with external references\n */\nexport type ExternalAnyOfSchema = ExternalNested | ExternalNestedNumeric;\n\nexport type ExternalNested = {\n    inner?: {\n        deep?: string;\n    };\n};\n\nexport type Deep = string;\n\nexport type ExternalNestedNumeric = {\n    0?: {\n        1?: string;\n    };\n};\n\nexport type ExternalSharedModel = {\n    id: string;\n    name?: string;\n};\n\nexport type Id = string;\n\nexport type Name = string;\n\nexport type ExternalSharedModelWithUuid = string;\n\nexport type ExternalIdParam = Id;\n\nexport type ExternalUuidParam = ExternalSharedModelWithUuid;\n\nexport type ExternalDeepParam = Deep;\n\nexport type ExternalNumericParam = _1;\n\n/**\n * Request body using external model\n */\nexport type ExternalModelBody = ExternalSharedModel;\n\n/**\n * Request body using external UUID\n */\nexport type ExternalUuidBody = ExternalSharedModelWithUuid;\n\n/**\n * Request body using external nested object\n */\nexport type ExternalNestedBody = ExternalNested;\n\n/**\n * Request body with mixed external properties\n */\nexport type ExternalMixedBody = {\n    id?: Id;\n    name?: Name;\n    uuid?: ExternalSharedModelWithUuid;\n    deep?: Deep;\n};\n\nexport type GetExternalModelData = {\n    body?: never;\n    path: {\n        id: Id;\n    };\n    query?: {\n        uuid?: ExternalSharedModelWithUuid;\n    };\n    url: '/external-model';\n};\n\nexport type GetExternalModelErrors = {\n    /**\n     * Response using external UUID\n     */\n    400: ExternalSharedModelWithUuid;\n};\n\nexport type GetExternalModelError = GetExternalModelErrors[keyof GetExternalModelErrors];\n\nexport type GetExternalModelResponses = {\n    /**\n     * Response using external model\n     */\n    200: ExternalSharedModel;\n};\n\nexport type GetExternalModelResponse = GetExternalModelResponses[keyof GetExternalModelResponses];\n\nexport type PostExternalModelData = {\n    /**\n     * Request body using external model\n     */\n    body: ExternalModelBody;\n    path?: never;\n    query?: never;\n    url: '/external-model';\n};\n\nexport type PostExternalModelErrors = {\n    /**\n     * Response with union of external types\n     */\n    422: ExternalSharedModel | ExternalSharedModelWithUuid | ExternalNested;\n};\n\nexport type PostExternalModelError = PostExternalModelErrors[keyof PostExternalModelErrors];\n\nexport type PostExternalModelResponses = {\n    /**\n     * Response using external model\n     */\n    201: ExternalSharedModel;\n};\n\nexport type PostExternalModelResponse = PostExternalModelResponses[keyof PostExternalModelResponses];\n\nexport type GetExternalUuidData = {\n    body?: never;\n    path?: never;\n    query?: {\n        uuid?: ExternalSharedModelWithUuid;\n    };\n    url: '/external-uuid';\n};\n\nexport type GetExternalUuidResponses = {\n    /**\n     * Response using external UUID\n     */\n    200: ExternalSharedModelWithUuid;\n};\n\nexport type GetExternalUuidResponse = GetExternalUuidResponses[keyof GetExternalUuidResponses];\n\nexport type PutExternalUuidData = {\n    /**\n     * Request body using external UUID\n     */\n    body?: ExternalUuidBody;\n    path?: never;\n    query?: never;\n    url: '/external-uuid';\n};\n\nexport type PutExternalUuidResponses = {\n    /**\n     * Response using external UUID\n     */\n    200: ExternalSharedModelWithUuid;\n};\n\nexport type PutExternalUuidResponse = PutExternalUuidResponses[keyof PutExternalUuidResponses];\n\nexport type GetExternalNestedData = {\n    body?: never;\n    headers?: {\n        deep?: Deep;\n    };\n    path?: never;\n    query?: never;\n    url: '/external-nested';\n};\n\nexport type GetExternalNestedResponses = {\n    /**\n     * Response using external nested object\n     */\n    200: ExternalNested;\n};\n\nexport type GetExternalNestedResponse = GetExternalNestedResponses[keyof GetExternalNestedResponses];\n\nexport type PostExternalNestedData = {\n    /**\n     * Request body using external nested object\n     */\n    body?: ExternalNestedBody;\n    path?: never;\n    query?: never;\n    url: '/external-nested';\n};\n\nexport type PostExternalNestedResponses = {\n    /**\n     * Response using external nested object\n     */\n    201: ExternalNested;\n};\n\nexport type PostExternalNestedResponse = PostExternalNestedResponses[keyof PostExternalNestedResponses];\n\nexport type GetExternalMixedData = {\n    body?: never;\n    headers?: {\n        deep?: Deep;\n    };\n    path: {\n        id: Id;\n    };\n    query?: {\n        uuid?: ExternalSharedModelWithUuid;\n        numeric?: _1;\n    };\n    url: '/external-mixed';\n};\n\nexport type GetExternalMixedResponses = {\n    /**\n     * Response with array of external models\n     */\n    200: Array<ExternalSharedModel>;\n};\n\nexport type GetExternalMixedResponse = GetExternalMixedResponses[keyof GetExternalMixedResponses];\n\nexport type PostExternalMixedData = {\n    /**\n     * Request body with mixed external properties\n     */\n    body?: ExternalMixedBody;\n    path?: never;\n    query?: never;\n    url: '/external-mixed';\n};\n\nexport type PostExternalMixedResponses = {\n    /**\n     * Response using external model\n     */\n    201: ExternalSharedModel;\n};\n\nexport type PostExternalMixedResponse = PostExternalMixedResponses[keyof PostExternalMixedResponses];\n\nexport type GetExternalArrayData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/external-array';\n};\n\nexport type GetExternalArrayResponses = {\n    /**\n     * Response with array of external models\n     */\n    200: Array<ExternalSharedModel>;\n};\n\nexport type GetExternalArrayResponse = GetExternalArrayResponses[keyof GetExternalArrayResponses];\n\nexport type PostExternalArrayData = {\n    body: Array<ExternalSharedModel>;\n    path?: never;\n    query?: never;\n    url: '/external-array';\n};\n\nexport type PostExternalArrayResponses = {\n    /**\n     * Response with array of external models\n     */\n    201: Array<ExternalSharedModel>;\n};\n\nexport type PostExternalArrayResponse = PostExternalArrayResponses[keyof PostExternalArrayResponses];\n\nexport type GetExternalUnionData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/external-union';\n};\n\nexport type GetExternalUnionResponses = {\n    /**\n     * Response with union of external types\n     */\n    200: ExternalSharedModel | ExternalSharedModelWithUuid | ExternalNested;\n};\n\nexport type GetExternalUnionResponse = GetExternalUnionResponses[keyof GetExternalUnionResponses];\n\nexport type PostExternalUnionData = {\n    body: ExternalSharedModel | ExternalSharedModelWithUuid | ExternalNested;\n    path?: never;\n    query?: never;\n    url: '/external-union';\n};\n\nexport type PostExternalUnionResponses = {\n    /**\n     * Response with union of external types\n     */\n    201: ExternalSharedModel | ExternalSharedModelWithUuid | ExternalNested;\n};\n\nexport type PostExternalUnionResponse = PostExternalUnionResponses[keyof PostExternalUnionResponses];\n\nexport type GetExternalPropertiesByIdData = {\n    body?: never;\n    headers?: {\n        deep?: Deep;\n    };\n    path: {\n        id: Id;\n    };\n    query?: {\n        uuid?: ExternalSharedModelWithUuid;\n    };\n    url: '/external-properties/{id}';\n};\n\nexport type GetExternalPropertiesByIdResponses = {\n    200: {\n        id?: Id;\n        name?: Name;\n        uuid?: ExternalSharedModelWithUuid;\n        deep?: Deep;\n        numeric?: _1;\n    };\n};\n\nexport type GetExternalPropertiesByIdResponse = GetExternalPropertiesByIdResponses[keyof GetExternalPropertiesByIdResponses];\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/headers/client/client.gen.ts",
    "content": "// 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 (options: RequestOptions) => {\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 url = buildUrl(opts);\n\n    return { opts, url };\n  };\n\n  const request: Client['request'] = async (options) => {\n    // @ts-expect-error\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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/headers/client/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type { Auth } from '../core/auth.gen';\nexport type { QuerySerializerOptions } from '../core/bodySerializer.gen';\nexport {\n  formDataBodySerializer,\n  jsonBodySerializer,\n  urlSearchParamsBodySerializer,\n} from '../core/bodySerializer.gen';\nexport { buildClientParams } from '../core/params.gen';\nexport { serializeQueryKeyValue } from '../core/queryKeySerializer.gen';\nexport { createClient } from './client.gen';\nexport type {\n  Client,\n  ClientOptions,\n  Config,\n  CreateClientConfig,\n  Options,\n  RequestOptions,\n  RequestResult,\n  ResolvedRequestOptions,\n  ResponseStyle,\n  TDataShape,\n} from './types.gen';\nexport { createConfig, mergeHeaders } from './utils.gen';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/headers/client/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { Auth } from '../core/auth.gen';\nimport type {\n  ServerSentEventsOptions,\n  ServerSentEventsResult,\n} from '../core/serverSentEvents.gen';\nimport type { Client as CoreClient, Config as CoreConfig } from '../core/types.gen';\nimport type { Middleware } from './utils.gen';\n\nexport type ResponseStyle = 'data' | 'fields';\n\nexport interface Config<T extends ClientOptions = ClientOptions>\n  extends Omit<RequestInit, 'body' | 'headers' | 'method'>, CoreConfig {\n  /**\n   * Base URL for all requests made by this client.\n   */\n  baseUrl?: T['baseUrl'];\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   * Please don't use the Fetch client for Next.js applications. The `next`\n   * options won't have any effect.\n   *\n   * Install {@link https://www.npmjs.com/package/@hey-api/client-next `@hey-api/client-next`} instead.\n   */\n  next?: never;\n  /**\n   * Return the response data parsed in a specified format. By default, `auto`\n   * will infer the appropriate method from the `Content-Type` response header.\n   * You can override this behavior with any of the {@link Body} methods.\n   * Select `stream` if you don't want to parse response data at all.\n   *\n   * @default 'auto'\n   */\n  parseAs?: 'arrayBuffer' | 'auto' | 'blob' | 'formData' | 'json' | 'stream' | 'text';\n  /**\n   * Should we return only data or multiple fields (data, error, response, etc.)?\n   *\n   * @default 'fields'\n   */\n  responseStyle?: ResponseStyle;\n  /**\n   * Throw an error instead of returning it in the response?\n   *\n   * @default false\n   */\n  throwOnError?: T['throwOnError'];\n}\n\nexport interface RequestOptions<\n  TData = unknown,\n  TResponseStyle extends ResponseStyle = 'fields',\n  ThrowOnError extends boolean = boolean,\n  Url extends string = string,\n>\n  extends\n    Config<{\n      responseStyle: TResponseStyle;\n      throwOnError: ThrowOnError;\n    }>,\n    Pick<\n      ServerSentEventsOptions<TData>,\n      | 'onRequest'\n      | 'onSseError'\n      | 'onSseEvent'\n      | 'sseDefaultRetryDelay'\n      | 'sseMaxRetryAttempts'\n      | 'sseMaxRetryDelay'\n    > {\n  /**\n   * Any body that you want to add to your request.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/fetch#body}\n   */\n  body?: unknown;\n  path?: Record<string, unknown>;\n  query?: Record<string, unknown>;\n  /**\n   * Security mechanism(s) to use for the request.\n   */\n  security?: ReadonlyArray<Auth>;\n  url: Url;\n}\n\nexport interface ResolvedRequestOptions<\n  TResponseStyle extends ResponseStyle = 'fields',\n  ThrowOnError extends boolean = boolean,\n  Url extends string = string,\n> extends RequestOptions<unknown, TResponseStyle, ThrowOnError, Url> {\n  serializedBody?: string;\n}\n\nexport type RequestResult<\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = boolean,\n  TResponseStyle extends ResponseStyle = 'fields',\n> = ThrowOnError extends true\n  ? Promise<\n      TResponseStyle extends 'data'\n        ? TData extends Record<string, unknown>\n          ? TData[keyof TData]\n          : TData\n        : {\n            data: TData extends Record<string, unknown> ? TData[keyof TData] : TData;\n            request: Request;\n            response: Response;\n          }\n    >\n  : Promise<\n      TResponseStyle extends 'data'\n        ? (TData extends Record<string, unknown> ? TData[keyof TData] : TData) | undefined\n        : (\n            | {\n                data: TData extends Record<string, unknown> ? TData[keyof TData] : TData;\n                error: undefined;\n              }\n            | {\n                data: undefined;\n                error: TError extends Record<string, unknown> ? TError[keyof TError] : TError;\n              }\n          ) & {\n            request: Request;\n            response: Response;\n          }\n    >;\n\nexport interface ClientOptions {\n  baseUrl?: string;\n  responseStyle?: ResponseStyle;\n  throwOnError?: boolean;\n}\n\ntype MethodFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'>,\n) => RequestResult<TData, TError, ThrowOnError, TResponseStyle>;\n\ntype SseFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'>,\n) => Promise<ServerSentEventsResult<TData, TError>>;\n\ntype RequestFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'> &\n    Pick<Required<RequestOptions<TData, TResponseStyle, ThrowOnError>>, 'method'>,\n) => RequestResult<TData, TError, ThrowOnError, TResponseStyle>;\n\ntype BuildUrlFn = <\n  TData extends {\n    body?: unknown;\n    path?: Record<string, unknown>;\n    query?: Record<string, unknown>;\n    url: string;\n  },\n>(\n  options: TData & Options<TData>,\n) => string;\n\nexport type Client = CoreClient<RequestFn, Config, MethodFn, BuildUrlFn, SseFn> & {\n  interceptors: Middleware<Request, Response, unknown, ResolvedRequestOptions>;\n};\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 = ClientOptions> = (\n  override?: Config<ClientOptions & T>,\n) => Config<Required<ClientOptions> & T>;\n\nexport interface TDataShape {\n  body?: unknown;\n  headers?: unknown;\n  path?: unknown;\n  query?: unknown;\n  url: string;\n}\n\ntype OmitKeys<T, K> = Pick<T, Exclude<keyof T, K>>;\n\nexport type Options<\n  TData extends TDataShape = TDataShape,\n  ThrowOnError extends boolean = boolean,\n  TResponse = unknown,\n  TResponseStyle extends ResponseStyle = 'fields',\n> = OmitKeys<\n  RequestOptions<TResponse, TResponseStyle, ThrowOnError>,\n  'body' | 'path' | 'query' | 'url'\n> &\n  ([TData] extends [never] ? unknown : Omit<TData, 'url'>);\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/headers/client/utils.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/headers/client.gen.ts",
    "content": "// 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>());\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/headers/core/auth.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/headers/core/bodySerializer.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/headers/core/params.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/headers/core/pathSerializer.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/headers/core/queryKeySerializer.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\n/**\n * JSON-friendly union that mirrors what Pinia Colada can hash.\n */\nexport type JsonValue =\n  | null\n  | string\n  | number\n  | boolean\n  | JsonValue[]\n  | { [key: string]: JsonValue };\n\n/**\n * Replacer that converts non-JSON values (bigint, Date, etc.) to safe substitutes.\n */\nexport const queryKeyJsonReplacer = (_key: string, value: unknown) => {\n  if (value === undefined || typeof value === 'function' || typeof value === 'symbol') {\n    return undefined;\n  }\n  if (typeof value === 'bigint') {\n    return value.toString();\n  }\n  if (value instanceof Date) {\n    return value.toISOString();\n  }\n  return value;\n};\n\n/**\n * Safely stringifies a value and parses it back into a JsonValue.\n */\nexport const stringifyToJsonValue = (input: unknown): JsonValue | undefined => {\n  try {\n    const json = JSON.stringify(input, queryKeyJsonReplacer);\n    if (json === undefined) {\n      return undefined;\n    }\n    return JSON.parse(json) as JsonValue;\n  } catch {\n    return undefined;\n  }\n};\n\n/**\n * Detects plain objects (including objects with a null prototype).\n */\nconst isPlainObject = (value: unknown): value is Record<string, unknown> => {\n  if (value === null || typeof value !== 'object') {\n    return false;\n  }\n  const prototype = Object.getPrototypeOf(value as object);\n  return prototype === Object.prototype || prototype === null;\n};\n\n/**\n * Turns URLSearchParams into a sorted JSON object for deterministic keys.\n */\nconst serializeSearchParams = (params: URLSearchParams): JsonValue => {\n  const entries = Array.from(params.entries()).sort(([a], [b]) => a.localeCompare(b));\n  const result: Record<string, JsonValue> = {};\n\n  for (const [key, value] of entries) {\n    const existing = result[key];\n    if (existing === undefined) {\n      result[key] = value;\n      continue;\n    }\n\n    if (Array.isArray(existing)) {\n      (existing as string[]).push(value);\n    } else {\n      result[key] = [existing, value];\n    }\n  }\n\n  return result;\n};\n\n/**\n * Normalizes any accepted value into a JSON-friendly shape for query keys.\n */\nexport const serializeQueryKeyValue = (value: unknown): JsonValue | undefined => {\n  if (value === null) {\n    return null;\n  }\n\n  if (typeof value === 'string' || typeof value === 'number' || typeof value === 'boolean') {\n    return value;\n  }\n\n  if (value === undefined || typeof value === 'function' || typeof value === 'symbol') {\n    return undefined;\n  }\n\n  if (typeof value === 'bigint') {\n    return value.toString();\n  }\n\n  if (value instanceof Date) {\n    return value.toISOString();\n  }\n\n  if (Array.isArray(value)) {\n    return stringifyToJsonValue(value);\n  }\n\n  if (typeof URLSearchParams !== 'undefined' && value instanceof URLSearchParams) {\n    return serializeSearchParams(value);\n  }\n\n  if (isPlainObject(value)) {\n    return stringifyToJsonValue(value);\n  }\n\n  return undefined;\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/headers/core/serverSentEvents.gen.ts",
    "content": "// 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 const 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            // Normalize line endings: CRLF -> LF, then CR -> LF\n            buffer = buffer.replace(/\\r\\n/g, '\\n').replace(/\\r/g, '\\n');\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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/headers/core/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { Auth, AuthToken } from './auth.gen';\nimport type { BodySerializer, QuerySerializer, QuerySerializerOptions } from './bodySerializer.gen';\n\nexport type HttpMethod =\n  | 'connect'\n  | 'delete'\n  | 'get'\n  | 'head'\n  | 'options'\n  | 'patch'\n  | 'post'\n  | 'put'\n  | 'trace';\n\nexport type Client<\n  RequestFn = never,\n  Config = unknown,\n  MethodFn = never,\n  BuildUrlFn = never,\n  SseFn = never,\n> = {\n  /**\n   * Returns the final request URL.\n   */\n  buildUrl: BuildUrlFn;\n  getConfig: () => Config;\n  request: RequestFn;\n  setConfig: (config: Config) => Config;\n} & {\n  [K in HttpMethod]: MethodFn;\n} & ([SseFn] extends [never] ? { sse?: never } : { sse: { [K in HttpMethod]: SseFn } });\n\nexport interface Config {\n  /**\n   * Auth token or a function returning auth token. The resolved value will be\n   * added to the request payload as defined by its `security` array.\n   */\n  auth?: ((auth: Auth) => Promise<AuthToken> | AuthToken) | AuthToken;\n  /**\n   * A function for serializing request body parameter. By default,\n   * {@link JSON.stringify()} will be used.\n   */\n  bodySerializer?: BodySerializer | null;\n  /**\n   * An object containing any HTTP headers that you want to pre-populate your\n   * `Headers` object with.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/Headers/Headers#init See more}\n   */\n  headers?:\n    | RequestInit['headers']\n    | Record<\n        string,\n        string | number | boolean | (string | number | boolean)[] | null | undefined | unknown\n      >;\n  /**\n   * The request method.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/fetch#method See more}\n   */\n  method?: Uppercase<HttpMethod>;\n  /**\n   * A function for serializing request query parameters. By default, arrays\n   * will be exploded in form style, objects will be exploded in deepObject\n   * style, and reserved characters are percent-encoded.\n   *\n   * This method will have no effect if the native `paramsSerializer()` Axios\n   * API function is used.\n   *\n   * {@link https://swagger.io/docs/specification/serialization/#query View examples}\n   */\n  querySerializer?: QuerySerializer | QuerySerializerOptions;\n  /**\n   * A function validating request data. This is useful if you want to ensure\n   * the request conforms to the desired shape, so it can be safely sent to\n   * the server.\n   */\n  requestValidator?: (data: unknown) => Promise<unknown>;\n  /**\n   * A function transforming response data before it's returned. This is useful\n   * for post-processing data, e.g. converting ISO strings into Date objects.\n   */\n  responseTransformer?: (data: unknown) => Promise<unknown>;\n  /**\n   * A function validating response data. This is useful if you want to ensure\n   * the response conforms to the desired shape, so it can be safely passed to\n   * the transformers and returned to the user.\n   */\n  responseValidator?: (data: unknown) => Promise<unknown>;\n}\n\ntype IsExactlyNeverOrNeverUndefined<T> = [T] extends [never]\n  ? true\n  : [T] extends [never | undefined]\n    ? [undefined] extends [T]\n      ? false\n      : true\n    : false;\n\nexport type OmitNever<T extends Record<string, unknown>> = {\n  [K in keyof T as IsExactlyNeverOrNeverUndefined<T[K]> extends true ? never : K]: T[K];\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/headers/core/utils.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/headers/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport { getFoo, type Options, patchFoo, postFoo, putFoo } from './sdk.gen';\nexport type { ClientOptions, GetFooData, GetFooResponse, GetFooResponses, PatchFooData, PatchFooResponse, PatchFooResponses, PostFooData, PostFooResponse, PostFooResponses, PutFooData, PutFooResponse, PutFooResponses } from './types.gen';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/headers/sdk.gen.ts",
    "content": "// 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 { GetFooData, GetFooResponses, PatchFooData, PatchFooResponses, PostFooData, PostFooResponses, PutFooData, PutFooResponses } from './types.gen';\n\nexport type Options<TData extends TDataShape = TDataShape, ThrowOnError extends boolean = boolean> = Options2<TData, ThrowOnError> & {\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\nexport const getFoo = <ThrowOnError extends boolean = false>(options: Options<GetFooData, ThrowOnError>) => (options.client ?? client).get<GetFooResponses, unknown, ThrowOnError>({ url: '/foo', ...options });\n\nexport const patchFoo = <ThrowOnError extends boolean = false>(options?: Options<PatchFooData, ThrowOnError>) => (options?.client ?? client).patch<PatchFooResponses, unknown, ThrowOnError>({\n    url: '/foo',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options?.headers\n    }\n});\n\nexport const postFoo = <ThrowOnError extends boolean = false>(options: Options<PostFooData, ThrowOnError>) => (options.client ?? client).post<PostFooResponses, unknown, ThrowOnError>({\n    url: '/foo',\n    ...options,\n    headers: {\n        'content-type': 'application/json',\n        ...options.headers\n    }\n});\n\nexport const putFoo = <ThrowOnError extends boolean = false>(options: Options<PutFooData, ThrowOnError>) => (options.client ?? client).put<PutFooResponses, unknown, ThrowOnError>({\n    url: '/foo',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options.headers\n    }\n});\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/headers/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type ClientOptions = {\n    baseUrl: `${string}://${string}` | (string & {});\n};\n\nexport type GetFooData = {\n    body: string;\n    headers: {\n        'Content-Type': string;\n    };\n    path?: never;\n    query?: never;\n    url: '/foo';\n};\n\nexport type GetFooResponses = {\n    /**\n     * OK\n     */\n    200: string;\n};\n\nexport type GetFooResponse = GetFooResponses[keyof GetFooResponses];\n\nexport type PatchFooData = {\n    body?: string;\n    headers?: {\n        'Content-Type'?: string;\n    };\n    path?: never;\n    query?: never;\n    url: '/foo';\n};\n\nexport type PatchFooResponses = {\n    /**\n     * OK\n     */\n    200: string;\n};\n\nexport type PatchFooResponse = PatchFooResponses[keyof PatchFooResponses];\n\nexport type PostFooData = {\n    body: string;\n    headers?: {\n        'content-type'?: string;\n    };\n    path?: never;\n    query?: never;\n    url: '/foo';\n};\n\nexport type PostFooResponses = {\n    /**\n     * OK\n     */\n    200: string;\n};\n\nexport type PostFooResponse = PostFooResponses[keyof PostFooResponses];\n\nexport type PutFooData = {\n    body: string;\n    path?: never;\n    query?: never;\n    url: '/foo';\n};\n\nexport type PutFooResponses = {\n    /**\n     * OK\n     */\n    200: string;\n};\n\nexport type PutFooResponse = PutFooResponses[keyof PutFooResponses];\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/internal-name-conflict/@tanstack/react-query.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport { type DefaultError, queryOptions, type UseMutationOptions } from '@tanstack/react-query';\n\nimport { client } from '../client.gen';\nimport { create, create2, create3, type Options } from '../sdk.gen';\nimport type { Create2Data, Create3Data, CreateData } from '../types.gen';\n\nexport type QueryKey<TOptions extends Options> = [\n    Pick<TOptions, 'baseUrl' | 'body' | 'headers' | 'path' | 'query'> & {\n        _id: string;\n        _infinite?: boolean;\n        tags?: ReadonlyArray<string>;\n    }\n];\n\nconst createQueryKey = <TOptions extends Options>(id: string, options?: TOptions, infinite?: boolean, tags?: ReadonlyArray<string>): [\n    QueryKey<TOptions>[0]\n] => {\n    const params: QueryKey<TOptions>[0] = { _id: id, baseUrl: options?.baseUrl || (options?.client ?? client).getConfig().baseUrl } as QueryKey<TOptions>[0];\n    if (infinite) {\n        params._infinite = infinite;\n    }\n    if (tags) {\n        params.tags = tags;\n    }\n    if (options?.body) {\n        params.body = options.body;\n    }\n    if (options?.headers) {\n        params.headers = options.headers;\n    }\n    if (options?.path) {\n        params.path = options.path;\n    }\n    if (options?.query) {\n        params.query = options.query;\n    }\n    return [params];\n};\n\nexport const createQueryKey2 = (options?: Options<CreateData>) => createQueryKey('create', options);\n\nexport const createOptions = (options?: Options<CreateData>) => queryOptions<unknown, DefaultError, unknown, ReturnType<typeof createQueryKey2>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await create({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: createQueryKey2(options)\n});\n\nexport const create2Mutation = (options?: Partial<Options<Create2Data>>): UseMutationOptions<unknown, DefaultError, Options<Create2Data>> => {\n    const mutationOptions: UseMutationOptions<unknown, DefaultError, Options<Create2Data>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await create2({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const create3Mutation = (options?: Partial<Options<Create3Data>>): UseMutationOptions<unknown, DefaultError, Options<Create3Data>> => {\n    const mutationOptions: UseMutationOptions<unknown, DefaultError, Options<Create3Data>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await create3({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/internal-name-conflict/client/client.gen.ts",
    "content": "// 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 (options: RequestOptions) => {\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 url = buildUrl(opts);\n\n    return { opts, url };\n  };\n\n  const request: Client['request'] = async (options) => {\n    // @ts-expect-error\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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/internal-name-conflict/client/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type { Auth } from '../core/auth.gen';\nexport type { QuerySerializerOptions } from '../core/bodySerializer.gen';\nexport {\n  formDataBodySerializer,\n  jsonBodySerializer,\n  urlSearchParamsBodySerializer,\n} from '../core/bodySerializer.gen';\nexport { buildClientParams } from '../core/params.gen';\nexport { serializeQueryKeyValue } from '../core/queryKeySerializer.gen';\nexport { createClient } from './client.gen';\nexport type {\n  Client,\n  ClientOptions,\n  Config,\n  CreateClientConfig,\n  Options,\n  RequestOptions,\n  RequestResult,\n  ResolvedRequestOptions,\n  ResponseStyle,\n  TDataShape,\n} from './types.gen';\nexport { createConfig, mergeHeaders } from './utils.gen';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/internal-name-conflict/client/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { Auth } from '../core/auth.gen';\nimport type {\n  ServerSentEventsOptions,\n  ServerSentEventsResult,\n} from '../core/serverSentEvents.gen';\nimport type { Client as CoreClient, Config as CoreConfig } from '../core/types.gen';\nimport type { Middleware } from './utils.gen';\n\nexport type ResponseStyle = 'data' | 'fields';\n\nexport interface Config<T extends ClientOptions = ClientOptions>\n  extends Omit<RequestInit, 'body' | 'headers' | 'method'>, CoreConfig {\n  /**\n   * Base URL for all requests made by this client.\n   */\n  baseUrl?: T['baseUrl'];\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   * Please don't use the Fetch client for Next.js applications. The `next`\n   * options won't have any effect.\n   *\n   * Install {@link https://www.npmjs.com/package/@hey-api/client-next `@hey-api/client-next`} instead.\n   */\n  next?: never;\n  /**\n   * Return the response data parsed in a specified format. By default, `auto`\n   * will infer the appropriate method from the `Content-Type` response header.\n   * You can override this behavior with any of the {@link Body} methods.\n   * Select `stream` if you don't want to parse response data at all.\n   *\n   * @default 'auto'\n   */\n  parseAs?: 'arrayBuffer' | 'auto' | 'blob' | 'formData' | 'json' | 'stream' | 'text';\n  /**\n   * Should we return only data or multiple fields (data, error, response, etc.)?\n   *\n   * @default 'fields'\n   */\n  responseStyle?: ResponseStyle;\n  /**\n   * Throw an error instead of returning it in the response?\n   *\n   * @default false\n   */\n  throwOnError?: T['throwOnError'];\n}\n\nexport interface RequestOptions<\n  TData = unknown,\n  TResponseStyle extends ResponseStyle = 'fields',\n  ThrowOnError extends boolean = boolean,\n  Url extends string = string,\n>\n  extends\n    Config<{\n      responseStyle: TResponseStyle;\n      throwOnError: ThrowOnError;\n    }>,\n    Pick<\n      ServerSentEventsOptions<TData>,\n      | 'onRequest'\n      | 'onSseError'\n      | 'onSseEvent'\n      | 'sseDefaultRetryDelay'\n      | 'sseMaxRetryAttempts'\n      | 'sseMaxRetryDelay'\n    > {\n  /**\n   * Any body that you want to add to your request.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/fetch#body}\n   */\n  body?: unknown;\n  path?: Record<string, unknown>;\n  query?: Record<string, unknown>;\n  /**\n   * Security mechanism(s) to use for the request.\n   */\n  security?: ReadonlyArray<Auth>;\n  url: Url;\n}\n\nexport interface ResolvedRequestOptions<\n  TResponseStyle extends ResponseStyle = 'fields',\n  ThrowOnError extends boolean = boolean,\n  Url extends string = string,\n> extends RequestOptions<unknown, TResponseStyle, ThrowOnError, Url> {\n  serializedBody?: string;\n}\n\nexport type RequestResult<\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = boolean,\n  TResponseStyle extends ResponseStyle = 'fields',\n> = ThrowOnError extends true\n  ? Promise<\n      TResponseStyle extends 'data'\n        ? TData extends Record<string, unknown>\n          ? TData[keyof TData]\n          : TData\n        : {\n            data: TData extends Record<string, unknown> ? TData[keyof TData] : TData;\n            request: Request;\n            response: Response;\n          }\n    >\n  : Promise<\n      TResponseStyle extends 'data'\n        ? (TData extends Record<string, unknown> ? TData[keyof TData] : TData) | undefined\n        : (\n            | {\n                data: TData extends Record<string, unknown> ? TData[keyof TData] : TData;\n                error: undefined;\n              }\n            | {\n                data: undefined;\n                error: TError extends Record<string, unknown> ? TError[keyof TError] : TError;\n              }\n          ) & {\n            request: Request;\n            response: Response;\n          }\n    >;\n\nexport interface ClientOptions {\n  baseUrl?: string;\n  responseStyle?: ResponseStyle;\n  throwOnError?: boolean;\n}\n\ntype MethodFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'>,\n) => RequestResult<TData, TError, ThrowOnError, TResponseStyle>;\n\ntype SseFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'>,\n) => Promise<ServerSentEventsResult<TData, TError>>;\n\ntype RequestFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'> &\n    Pick<Required<RequestOptions<TData, TResponseStyle, ThrowOnError>>, 'method'>,\n) => RequestResult<TData, TError, ThrowOnError, TResponseStyle>;\n\ntype BuildUrlFn = <\n  TData extends {\n    body?: unknown;\n    path?: Record<string, unknown>;\n    query?: Record<string, unknown>;\n    url: string;\n  },\n>(\n  options: TData & Options<TData>,\n) => string;\n\nexport type Client = CoreClient<RequestFn, Config, MethodFn, BuildUrlFn, SseFn> & {\n  interceptors: Middleware<Request, Response, unknown, ResolvedRequestOptions>;\n};\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 = ClientOptions> = (\n  override?: Config<ClientOptions & T>,\n) => Config<Required<ClientOptions> & T>;\n\nexport interface TDataShape {\n  body?: unknown;\n  headers?: unknown;\n  path?: unknown;\n  query?: unknown;\n  url: string;\n}\n\ntype OmitKeys<T, K> = Pick<T, Exclude<keyof T, K>>;\n\nexport type Options<\n  TData extends TDataShape = TDataShape,\n  ThrowOnError extends boolean = boolean,\n  TResponse = unknown,\n  TResponseStyle extends ResponseStyle = 'fields',\n> = OmitKeys<\n  RequestOptions<TResponse, TResponseStyle, ThrowOnError>,\n  'body' | 'path' | 'query' | 'url'\n> &\n  ([TData] extends [never] ? unknown : Omit<TData, 'url'>);\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/internal-name-conflict/client/utils.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/internal-name-conflict/client.gen.ts",
    "content": "// 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>());\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/internal-name-conflict/core/auth.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/internal-name-conflict/core/bodySerializer.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/internal-name-conflict/core/params.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/internal-name-conflict/core/pathSerializer.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/internal-name-conflict/core/queryKeySerializer.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\n/**\n * JSON-friendly union that mirrors what Pinia Colada can hash.\n */\nexport type JsonValue =\n  | null\n  | string\n  | number\n  | boolean\n  | JsonValue[]\n  | { [key: string]: JsonValue };\n\n/**\n * Replacer that converts non-JSON values (bigint, Date, etc.) to safe substitutes.\n */\nexport const queryKeyJsonReplacer = (_key: string, value: unknown) => {\n  if (value === undefined || typeof value === 'function' || typeof value === 'symbol') {\n    return undefined;\n  }\n  if (typeof value === 'bigint') {\n    return value.toString();\n  }\n  if (value instanceof Date) {\n    return value.toISOString();\n  }\n  return value;\n};\n\n/**\n * Safely stringifies a value and parses it back into a JsonValue.\n */\nexport const stringifyToJsonValue = (input: unknown): JsonValue | undefined => {\n  try {\n    const json = JSON.stringify(input, queryKeyJsonReplacer);\n    if (json === undefined) {\n      return undefined;\n    }\n    return JSON.parse(json) as JsonValue;\n  } catch {\n    return undefined;\n  }\n};\n\n/**\n * Detects plain objects (including objects with a null prototype).\n */\nconst isPlainObject = (value: unknown): value is Record<string, unknown> => {\n  if (value === null || typeof value !== 'object') {\n    return false;\n  }\n  const prototype = Object.getPrototypeOf(value as object);\n  return prototype === Object.prototype || prototype === null;\n};\n\n/**\n * Turns URLSearchParams into a sorted JSON object for deterministic keys.\n */\nconst serializeSearchParams = (params: URLSearchParams): JsonValue => {\n  const entries = Array.from(params.entries()).sort(([a], [b]) => a.localeCompare(b));\n  const result: Record<string, JsonValue> = {};\n\n  for (const [key, value] of entries) {\n    const existing = result[key];\n    if (existing === undefined) {\n      result[key] = value;\n      continue;\n    }\n\n    if (Array.isArray(existing)) {\n      (existing as string[]).push(value);\n    } else {\n      result[key] = [existing, value];\n    }\n  }\n\n  return result;\n};\n\n/**\n * Normalizes any accepted value into a JSON-friendly shape for query keys.\n */\nexport const serializeQueryKeyValue = (value: unknown): JsonValue | undefined => {\n  if (value === null) {\n    return null;\n  }\n\n  if (typeof value === 'string' || typeof value === 'number' || typeof value === 'boolean') {\n    return value;\n  }\n\n  if (value === undefined || typeof value === 'function' || typeof value === 'symbol') {\n    return undefined;\n  }\n\n  if (typeof value === 'bigint') {\n    return value.toString();\n  }\n\n  if (value instanceof Date) {\n    return value.toISOString();\n  }\n\n  if (Array.isArray(value)) {\n    return stringifyToJsonValue(value);\n  }\n\n  if (typeof URLSearchParams !== 'undefined' && value instanceof URLSearchParams) {\n    return serializeSearchParams(value);\n  }\n\n  if (isPlainObject(value)) {\n    return stringifyToJsonValue(value);\n  }\n\n  return undefined;\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/internal-name-conflict/core/serverSentEvents.gen.ts",
    "content": "// 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 const 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            // Normalize line endings: CRLF -> LF, then CR -> LF\n            buffer = buffer.replace(/\\r\\n/g, '\\n').replace(/\\r/g, '\\n');\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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/internal-name-conflict/core/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { Auth, AuthToken } from './auth.gen';\nimport type { BodySerializer, QuerySerializer, QuerySerializerOptions } from './bodySerializer.gen';\n\nexport type HttpMethod =\n  | 'connect'\n  | 'delete'\n  | 'get'\n  | 'head'\n  | 'options'\n  | 'patch'\n  | 'post'\n  | 'put'\n  | 'trace';\n\nexport type Client<\n  RequestFn = never,\n  Config = unknown,\n  MethodFn = never,\n  BuildUrlFn = never,\n  SseFn = never,\n> = {\n  /**\n   * Returns the final request URL.\n   */\n  buildUrl: BuildUrlFn;\n  getConfig: () => Config;\n  request: RequestFn;\n  setConfig: (config: Config) => Config;\n} & {\n  [K in HttpMethod]: MethodFn;\n} & ([SseFn] extends [never] ? { sse?: never } : { sse: { [K in HttpMethod]: SseFn } });\n\nexport interface Config {\n  /**\n   * Auth token or a function returning auth token. The resolved value will be\n   * added to the request payload as defined by its `security` array.\n   */\n  auth?: ((auth: Auth) => Promise<AuthToken> | AuthToken) | AuthToken;\n  /**\n   * A function for serializing request body parameter. By default,\n   * {@link JSON.stringify()} will be used.\n   */\n  bodySerializer?: BodySerializer | null;\n  /**\n   * An object containing any HTTP headers that you want to pre-populate your\n   * `Headers` object with.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/Headers/Headers#init See more}\n   */\n  headers?:\n    | RequestInit['headers']\n    | Record<\n        string,\n        string | number | boolean | (string | number | boolean)[] | null | undefined | unknown\n      >;\n  /**\n   * The request method.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/fetch#method See more}\n   */\n  method?: Uppercase<HttpMethod>;\n  /**\n   * A function for serializing request query parameters. By default, arrays\n   * will be exploded in form style, objects will be exploded in deepObject\n   * style, and reserved characters are percent-encoded.\n   *\n   * This method will have no effect if the native `paramsSerializer()` Axios\n   * API function is used.\n   *\n   * {@link https://swagger.io/docs/specification/serialization/#query View examples}\n   */\n  querySerializer?: QuerySerializer | QuerySerializerOptions;\n  /**\n   * A function validating request data. This is useful if you want to ensure\n   * the request conforms to the desired shape, so it can be safely sent to\n   * the server.\n   */\n  requestValidator?: (data: unknown) => Promise<unknown>;\n  /**\n   * A function transforming response data before it's returned. This is useful\n   * for post-processing data, e.g. converting ISO strings into Date objects.\n   */\n  responseTransformer?: (data: unknown) => Promise<unknown>;\n  /**\n   * A function validating response data. This is useful if you want to ensure\n   * the response conforms to the desired shape, so it can be safely passed to\n   * the transformers and returned to the user.\n   */\n  responseValidator?: (data: unknown) => Promise<unknown>;\n}\n\ntype IsExactlyNeverOrNeverUndefined<T> = [T] extends [never]\n  ? true\n  : [T] extends [never | undefined]\n    ? [undefined] extends [T]\n      ? false\n      : true\n    : false;\n\nexport type OmitNever<T extends Record<string, unknown>> = {\n  [K in keyof T as IsExactlyNeverOrNeverUndefined<T[K]> extends true ? never : K]: T[K];\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/internal-name-conflict/core/utils.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/internal-name-conflict/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport { create, create2, create3, type Options } from './sdk.gen';\nexport type { ClientOptions, Create2Data, Create2Responses, Create3Data, Create3Responses, CreateData, CreateResponses } from './types.gen';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/internal-name-conflict/sdk.gen.ts",
    "content": "// 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 { Create2Data, Create2Responses, Create3Data, Create3Responses, CreateData, CreateResponses } from './types.gen';\n\nexport type Options<TData extends TDataShape = TDataShape, ThrowOnError extends boolean = boolean> = Options2<TData, ThrowOnError> & {\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\nexport const create = <ThrowOnError extends boolean = false>(options?: Options<CreateData, ThrowOnError>) => (options?.client ?? client).get<CreateResponses, unknown, ThrowOnError>({ url: '/foo', ...options });\n\nexport const create2 = <ThrowOnError extends boolean = false>(options?: Options<Create2Data, ThrowOnError>) => (options?.client ?? client).patch<Create2Responses, unknown, ThrowOnError>({ url: '/foo', ...options });\n\nexport const create3 = <ThrowOnError extends boolean = false>(options?: Options<Create3Data, ThrowOnError>) => (options?.client ?? client).post<Create3Responses, unknown, ThrowOnError>({ url: '/foo', ...options });\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/internal-name-conflict/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type ClientOptions = {\n    baseUrl: `${string}://${string}` | (string & {});\n};\n\nexport type CreateData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/foo';\n};\n\nexport type CreateResponses = {\n    /**\n     * OK\n     */\n    200: unknown;\n};\n\nexport type Create2Data = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/foo';\n};\n\nexport type Create2Responses = {\n    /**\n     * OK\n     */\n    200: unknown;\n};\n\nexport type Create3Data = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/foo';\n};\n\nexport type Create3Responses = {\n    /**\n     * OK\n     */\n    200: unknown;\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/negative-property-names/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type { ClientOptions, ReactionRollup } from './types.gen';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/negative-property-names/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type ClientOptions = {\n    baseUrl: `${string}://${string}` | (string & {});\n};\n\n/**\n * Reaction Rollup\n */\nexport type ReactionRollup = {\n    url: string;\n    total_count: number;\n    '+1': number;\n    '-1': number;\n    laugh: number;\n    confused: number;\n    heart: number;\n    hooray: number;\n    eyes: number;\n    rocket: number;\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/object-properties-all-of/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type { ClientOptions, Foo } from './types.gen';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/object-properties-all-of/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type ClientOptions = {\n    baseUrl: `${string}://${string}` | (string & {});\n};\n\nexport type Foo = {\n    bar: string;\n} & {\n    baz: string;\n} & {\n    foo: string;\n    bar?: string;\n    baz?: string;\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/object-properties-any-of/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type { ClientOptions, Foo } from './types.gen';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/object-properties-any-of/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type ClientOptions = {\n    baseUrl: `${string}://${string}` | (string & {});\n};\n\nexport type Foo = ({\n    bar: string;\n} | {\n    baz: string;\n}) & {\n    foo: string;\n    bar?: string;\n    baz?: string;\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/object-properties-one-of/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type { ClientOptions, Foo } from './types.gen';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/object-properties-one-of/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type ClientOptions = {\n    baseUrl: `${string}://${string}` | (string & {});\n};\n\nexport type Foo = ({\n    bar: string;\n} | {\n    baz: string;\n}) & {\n    foo: string;\n    bar?: string;\n    baz?: string;\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/object-property-names/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type { Bar, Baz, ClientOptions, Foo } from './types.gen';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/object-property-names/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type ClientOptions = {\n    baseUrl: `${string}://${string}` | (string & {});\n};\n\nexport type Foo = 'foo' | 'bar';\n\nexport type Bar = {\n    [key in Foo]?: string;\n};\n\nexport type Baz = {\n    [key in Foo]?: number;\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/operation-204/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type { ClientOptions, PostFooData, PostFooResponse, PostFooResponses } from './types.gen';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/operation-204/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type ClientOptions = {\n    baseUrl: `${string}://${string}` | (string & {});\n};\n\nexport type PostFooData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/foo';\n};\n\nexport type PostFooResponses = {\n    /**\n     * OK\n     */\n    200: string;\n    /**\n     * Created\n     */\n    204: void;\n};\n\nexport type PostFooResponse = PostFooResponses[keyof PostFooResponses];\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/pagination-ref/@tanstack/react-query.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport { type DefaultError, type InfiniteData, infiniteQueryOptions, queryOptions, type UseMutationOptions } from '@tanstack/react-query';\n\nimport { client } from '../client.gen';\nimport { getFoo, type Options, postFoo } from '../sdk.gen';\nimport type { GetFooData, GetFooResponse, PostFooData } from '../types.gen';\n\nexport type QueryKey<TOptions extends Options> = [\n    Pick<TOptions, 'baseUrl' | 'body' | 'headers' | 'path' | 'query'> & {\n        _id: string;\n        _infinite?: boolean;\n        tags?: ReadonlyArray<string>;\n    }\n];\n\nconst createQueryKey = <TOptions extends Options>(id: string, options?: TOptions, infinite?: boolean, tags?: ReadonlyArray<string>): [\n    QueryKey<TOptions>[0]\n] => {\n    const params: QueryKey<TOptions>[0] = { _id: id, baseUrl: options?.baseUrl || (options?.client ?? client).getConfig().baseUrl } as QueryKey<TOptions>[0];\n    if (infinite) {\n        params._infinite = infinite;\n    }\n    if (tags) {\n        params.tags = tags;\n    }\n    if (options?.body) {\n        params.body = options.body;\n    }\n    if (options?.headers) {\n        params.headers = options.headers;\n    }\n    if (options?.path) {\n        params.path = options.path;\n    }\n    if (options?.query) {\n        params.query = options.query;\n    }\n    return [params];\n};\n\nexport const getFooQueryKey = (options: Options<GetFooData>) => createQueryKey('getFoo', options);\n\nexport const getFooOptions = (options: Options<GetFooData>) => queryOptions<GetFooResponse, DefaultError, GetFooResponse, ReturnType<typeof getFooQueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await getFoo({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: getFooQueryKey(options)\n});\n\nconst createInfiniteParams = <K extends Pick<QueryKey<Options>[0], 'body' | 'headers' | 'path' | 'query'>>(queryKey: QueryKey<Options>, page: K) => {\n    const params = { ...queryKey[0] };\n    if (page.body) {\n        params.body = {\n            ...queryKey[0].body as any,\n            ...page.body as any\n        };\n    }\n    if (page.headers) {\n        params.headers = {\n            ...queryKey[0].headers,\n            ...page.headers\n        };\n    }\n    if (page.path) {\n        params.path = {\n            ...queryKey[0].path as any,\n            ...page.path as any\n        };\n    }\n    if (page.query) {\n        params.query = {\n            ...queryKey[0].query as any,\n            ...page.query as any\n        };\n    }\n    return params as unknown as typeof page;\n};\n\nexport const getFooInfiniteQueryKey = (options: Options<GetFooData>): QueryKey<Options<GetFooData>> => createQueryKey('getFoo', options, true);\n\nexport const getFooInfiniteOptions = (options: Options<GetFooData>) => infiniteQueryOptions<GetFooResponse, DefaultError, InfiniteData<GetFooResponse>, QueryKey<Options<GetFooData>>, number | null | Pick<QueryKey<Options<GetFooData>>[0], 'body' | 'headers' | 'path' | 'query'>>(\n// @ts-ignore\n{\n    queryFn: async ({ pageParam, queryKey, signal }) => {\n        // @ts-ignore\n        const page: Pick<QueryKey<Options<GetFooData>>[0], 'body' | 'headers' | 'path' | 'query'> = typeof pageParam === 'object' ? pageParam : {\n            query: {\n                'foo.page': pageParam\n            }\n        };\n        const params = createInfiniteParams(queryKey, page);\n        const { data } = await getFoo({\n            ...options,\n            ...params,\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: getFooInfiniteQueryKey(options)\n});\n\nexport const postFooMutation = (options?: Partial<Options<PostFooData>>): UseMutationOptions<unknown, DefaultError, Options<PostFooData>> => {\n    const mutationOptions: UseMutationOptions<unknown, DefaultError, Options<PostFooData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await postFoo({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/pagination-ref/client/client.gen.ts",
    "content": "// 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 (options: RequestOptions) => {\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 url = buildUrl(opts);\n\n    return { opts, url };\n  };\n\n  const request: Client['request'] = async (options) => {\n    // @ts-expect-error\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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/pagination-ref/client/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type { Auth } from '../core/auth.gen';\nexport type { QuerySerializerOptions } from '../core/bodySerializer.gen';\nexport {\n  formDataBodySerializer,\n  jsonBodySerializer,\n  urlSearchParamsBodySerializer,\n} from '../core/bodySerializer.gen';\nexport { buildClientParams } from '../core/params.gen';\nexport { serializeQueryKeyValue } from '../core/queryKeySerializer.gen';\nexport { createClient } from './client.gen';\nexport type {\n  Client,\n  ClientOptions,\n  Config,\n  CreateClientConfig,\n  Options,\n  RequestOptions,\n  RequestResult,\n  ResolvedRequestOptions,\n  ResponseStyle,\n  TDataShape,\n} from './types.gen';\nexport { createConfig, mergeHeaders } from './utils.gen';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/pagination-ref/client/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { Auth } from '../core/auth.gen';\nimport type {\n  ServerSentEventsOptions,\n  ServerSentEventsResult,\n} from '../core/serverSentEvents.gen';\nimport type { Client as CoreClient, Config as CoreConfig } from '../core/types.gen';\nimport type { Middleware } from './utils.gen';\n\nexport type ResponseStyle = 'data' | 'fields';\n\nexport interface Config<T extends ClientOptions = ClientOptions>\n  extends Omit<RequestInit, 'body' | 'headers' | 'method'>, CoreConfig {\n  /**\n   * Base URL for all requests made by this client.\n   */\n  baseUrl?: T['baseUrl'];\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   * Please don't use the Fetch client for Next.js applications. The `next`\n   * options won't have any effect.\n   *\n   * Install {@link https://www.npmjs.com/package/@hey-api/client-next `@hey-api/client-next`} instead.\n   */\n  next?: never;\n  /**\n   * Return the response data parsed in a specified format. By default, `auto`\n   * will infer the appropriate method from the `Content-Type` response header.\n   * You can override this behavior with any of the {@link Body} methods.\n   * Select `stream` if you don't want to parse response data at all.\n   *\n   * @default 'auto'\n   */\n  parseAs?: 'arrayBuffer' | 'auto' | 'blob' | 'formData' | 'json' | 'stream' | 'text';\n  /**\n   * Should we return only data or multiple fields (data, error, response, etc.)?\n   *\n   * @default 'fields'\n   */\n  responseStyle?: ResponseStyle;\n  /**\n   * Throw an error instead of returning it in the response?\n   *\n   * @default false\n   */\n  throwOnError?: T['throwOnError'];\n}\n\nexport interface RequestOptions<\n  TData = unknown,\n  TResponseStyle extends ResponseStyle = 'fields',\n  ThrowOnError extends boolean = boolean,\n  Url extends string = string,\n>\n  extends\n    Config<{\n      responseStyle: TResponseStyle;\n      throwOnError: ThrowOnError;\n    }>,\n    Pick<\n      ServerSentEventsOptions<TData>,\n      | 'onRequest'\n      | 'onSseError'\n      | 'onSseEvent'\n      | 'sseDefaultRetryDelay'\n      | 'sseMaxRetryAttempts'\n      | 'sseMaxRetryDelay'\n    > {\n  /**\n   * Any body that you want to add to your request.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/fetch#body}\n   */\n  body?: unknown;\n  path?: Record<string, unknown>;\n  query?: Record<string, unknown>;\n  /**\n   * Security mechanism(s) to use for the request.\n   */\n  security?: ReadonlyArray<Auth>;\n  url: Url;\n}\n\nexport interface ResolvedRequestOptions<\n  TResponseStyle extends ResponseStyle = 'fields',\n  ThrowOnError extends boolean = boolean,\n  Url extends string = string,\n> extends RequestOptions<unknown, TResponseStyle, ThrowOnError, Url> {\n  serializedBody?: string;\n}\n\nexport type RequestResult<\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = boolean,\n  TResponseStyle extends ResponseStyle = 'fields',\n> = ThrowOnError extends true\n  ? Promise<\n      TResponseStyle extends 'data'\n        ? TData extends Record<string, unknown>\n          ? TData[keyof TData]\n          : TData\n        : {\n            data: TData extends Record<string, unknown> ? TData[keyof TData] : TData;\n            request: Request;\n            response: Response;\n          }\n    >\n  : Promise<\n      TResponseStyle extends 'data'\n        ? (TData extends Record<string, unknown> ? TData[keyof TData] : TData) | undefined\n        : (\n            | {\n                data: TData extends Record<string, unknown> ? TData[keyof TData] : TData;\n                error: undefined;\n              }\n            | {\n                data: undefined;\n                error: TError extends Record<string, unknown> ? TError[keyof TError] : TError;\n              }\n          ) & {\n            request: Request;\n            response: Response;\n          }\n    >;\n\nexport interface ClientOptions {\n  baseUrl?: string;\n  responseStyle?: ResponseStyle;\n  throwOnError?: boolean;\n}\n\ntype MethodFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'>,\n) => RequestResult<TData, TError, ThrowOnError, TResponseStyle>;\n\ntype SseFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'>,\n) => Promise<ServerSentEventsResult<TData, TError>>;\n\ntype RequestFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'> &\n    Pick<Required<RequestOptions<TData, TResponseStyle, ThrowOnError>>, 'method'>,\n) => RequestResult<TData, TError, ThrowOnError, TResponseStyle>;\n\ntype BuildUrlFn = <\n  TData extends {\n    body?: unknown;\n    path?: Record<string, unknown>;\n    query?: Record<string, unknown>;\n    url: string;\n  },\n>(\n  options: TData & Options<TData>,\n) => string;\n\nexport type Client = CoreClient<RequestFn, Config, MethodFn, BuildUrlFn, SseFn> & {\n  interceptors: Middleware<Request, Response, unknown, ResolvedRequestOptions>;\n};\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 = ClientOptions> = (\n  override?: Config<ClientOptions & T>,\n) => Config<Required<ClientOptions> & T>;\n\nexport interface TDataShape {\n  body?: unknown;\n  headers?: unknown;\n  path?: unknown;\n  query?: unknown;\n  url: string;\n}\n\ntype OmitKeys<T, K> = Pick<T, Exclude<keyof T, K>>;\n\nexport type Options<\n  TData extends TDataShape = TDataShape,\n  ThrowOnError extends boolean = boolean,\n  TResponse = unknown,\n  TResponseStyle extends ResponseStyle = 'fields',\n> = OmitKeys<\n  RequestOptions<TResponse, TResponseStyle, ThrowOnError>,\n  'body' | 'path' | 'query' | 'url'\n> &\n  ([TData] extends [never] ? unknown : Omit<TData, 'url'>);\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/pagination-ref/client/utils.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/pagination-ref/client.gen.ts",
    "content": "// 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>());\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/pagination-ref/core/auth.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/pagination-ref/core/bodySerializer.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/pagination-ref/core/params.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/pagination-ref/core/pathSerializer.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/pagination-ref/core/queryKeySerializer.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\n/**\n * JSON-friendly union that mirrors what Pinia Colada can hash.\n */\nexport type JsonValue =\n  | null\n  | string\n  | number\n  | boolean\n  | JsonValue[]\n  | { [key: string]: JsonValue };\n\n/**\n * Replacer that converts non-JSON values (bigint, Date, etc.) to safe substitutes.\n */\nexport const queryKeyJsonReplacer = (_key: string, value: unknown) => {\n  if (value === undefined || typeof value === 'function' || typeof value === 'symbol') {\n    return undefined;\n  }\n  if (typeof value === 'bigint') {\n    return value.toString();\n  }\n  if (value instanceof Date) {\n    return value.toISOString();\n  }\n  return value;\n};\n\n/**\n * Safely stringifies a value and parses it back into a JsonValue.\n */\nexport const stringifyToJsonValue = (input: unknown): JsonValue | undefined => {\n  try {\n    const json = JSON.stringify(input, queryKeyJsonReplacer);\n    if (json === undefined) {\n      return undefined;\n    }\n    return JSON.parse(json) as JsonValue;\n  } catch {\n    return undefined;\n  }\n};\n\n/**\n * Detects plain objects (including objects with a null prototype).\n */\nconst isPlainObject = (value: unknown): value is Record<string, unknown> => {\n  if (value === null || typeof value !== 'object') {\n    return false;\n  }\n  const prototype = Object.getPrototypeOf(value as object);\n  return prototype === Object.prototype || prototype === null;\n};\n\n/**\n * Turns URLSearchParams into a sorted JSON object for deterministic keys.\n */\nconst serializeSearchParams = (params: URLSearchParams): JsonValue => {\n  const entries = Array.from(params.entries()).sort(([a], [b]) => a.localeCompare(b));\n  const result: Record<string, JsonValue> = {};\n\n  for (const [key, value] of entries) {\n    const existing = result[key];\n    if (existing === undefined) {\n      result[key] = value;\n      continue;\n    }\n\n    if (Array.isArray(existing)) {\n      (existing as string[]).push(value);\n    } else {\n      result[key] = [existing, value];\n    }\n  }\n\n  return result;\n};\n\n/**\n * Normalizes any accepted value into a JSON-friendly shape for query keys.\n */\nexport const serializeQueryKeyValue = (value: unknown): JsonValue | undefined => {\n  if (value === null) {\n    return null;\n  }\n\n  if (typeof value === 'string' || typeof value === 'number' || typeof value === 'boolean') {\n    return value;\n  }\n\n  if (value === undefined || typeof value === 'function' || typeof value === 'symbol') {\n    return undefined;\n  }\n\n  if (typeof value === 'bigint') {\n    return value.toString();\n  }\n\n  if (value instanceof Date) {\n    return value.toISOString();\n  }\n\n  if (Array.isArray(value)) {\n    return stringifyToJsonValue(value);\n  }\n\n  if (typeof URLSearchParams !== 'undefined' && value instanceof URLSearchParams) {\n    return serializeSearchParams(value);\n  }\n\n  if (isPlainObject(value)) {\n    return stringifyToJsonValue(value);\n  }\n\n  return undefined;\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/pagination-ref/core/serverSentEvents.gen.ts",
    "content": "// 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 const 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            // Normalize line endings: CRLF -> LF, then CR -> LF\n            buffer = buffer.replace(/\\r\\n/g, '\\n').replace(/\\r/g, '\\n');\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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/pagination-ref/core/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { Auth, AuthToken } from './auth.gen';\nimport type { BodySerializer, QuerySerializer, QuerySerializerOptions } from './bodySerializer.gen';\n\nexport type HttpMethod =\n  | 'connect'\n  | 'delete'\n  | 'get'\n  | 'head'\n  | 'options'\n  | 'patch'\n  | 'post'\n  | 'put'\n  | 'trace';\n\nexport type Client<\n  RequestFn = never,\n  Config = unknown,\n  MethodFn = never,\n  BuildUrlFn = never,\n  SseFn = never,\n> = {\n  /**\n   * Returns the final request URL.\n   */\n  buildUrl: BuildUrlFn;\n  getConfig: () => Config;\n  request: RequestFn;\n  setConfig: (config: Config) => Config;\n} & {\n  [K in HttpMethod]: MethodFn;\n} & ([SseFn] extends [never] ? { sse?: never } : { sse: { [K in HttpMethod]: SseFn } });\n\nexport interface Config {\n  /**\n   * Auth token or a function returning auth token. The resolved value will be\n   * added to the request payload as defined by its `security` array.\n   */\n  auth?: ((auth: Auth) => Promise<AuthToken> | AuthToken) | AuthToken;\n  /**\n   * A function for serializing request body parameter. By default,\n   * {@link JSON.stringify()} will be used.\n   */\n  bodySerializer?: BodySerializer | null;\n  /**\n   * An object containing any HTTP headers that you want to pre-populate your\n   * `Headers` object with.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/Headers/Headers#init See more}\n   */\n  headers?:\n    | RequestInit['headers']\n    | Record<\n        string,\n        string | number | boolean | (string | number | boolean)[] | null | undefined | unknown\n      >;\n  /**\n   * The request method.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/fetch#method See more}\n   */\n  method?: Uppercase<HttpMethod>;\n  /**\n   * A function for serializing request query parameters. By default, arrays\n   * will be exploded in form style, objects will be exploded in deepObject\n   * style, and reserved characters are percent-encoded.\n   *\n   * This method will have no effect if the native `paramsSerializer()` Axios\n   * API function is used.\n   *\n   * {@link https://swagger.io/docs/specification/serialization/#query View examples}\n   */\n  querySerializer?: QuerySerializer | QuerySerializerOptions;\n  /**\n   * A function validating request data. This is useful if you want to ensure\n   * the request conforms to the desired shape, so it can be safely sent to\n   * the server.\n   */\n  requestValidator?: (data: unknown) => Promise<unknown>;\n  /**\n   * A function transforming response data before it's returned. This is useful\n   * for post-processing data, e.g. converting ISO strings into Date objects.\n   */\n  responseTransformer?: (data: unknown) => Promise<unknown>;\n  /**\n   * A function validating response data. This is useful if you want to ensure\n   * the response conforms to the desired shape, so it can be safely passed to\n   * the transformers and returned to the user.\n   */\n  responseValidator?: (data: unknown) => Promise<unknown>;\n}\n\ntype IsExactlyNeverOrNeverUndefined<T> = [T] extends [never]\n  ? true\n  : [T] extends [never | undefined]\n    ? [undefined] extends [T]\n      ? false\n      : true\n    : false;\n\nexport type OmitNever<T extends Record<string, unknown>> = {\n  [K in keyof T as IsExactlyNeverOrNeverUndefined<T[K]> extends true ? never : K]: T[K];\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/pagination-ref/core/utils.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/pagination-ref/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport { getFoo, type Options, postFoo } from './sdk.gen';\nexport type { Bar, ClientOptions, Foo, GetFooData, GetFooResponse, GetFooResponses, PostFooData, PostFooResponses } from './types.gen';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/pagination-ref/sdk.gen.ts",
    "content": "// 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 { GetFooData, GetFooResponses, PostFooData, PostFooResponses } from './types.gen';\n\nexport type Options<TData extends TDataShape = TDataShape, ThrowOnError extends boolean = boolean> = Options2<TData, ThrowOnError> & {\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\nexport const getFoo = <ThrowOnError extends boolean = false>(options: Options<GetFooData, ThrowOnError>) => (options.client ?? client).get<GetFooResponses, unknown, ThrowOnError>({ url: '/foo', ...options });\n\nexport const postFoo = <ThrowOnError extends boolean = false>(options: Options<PostFooData, ThrowOnError>) => (options.client ?? client).post<PostFooResponses, unknown, ThrowOnError>({\n    url: '/foo',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options.headers\n    }\n});\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/pagination-ref/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type ClientOptions = {\n    baseUrl: `${string}://${string}` | (string & {});\n};\n\nexport type Foo = {\n    page?: number | null;\n};\n\nexport type Bar = {\n    page: number | null;\n    size: number | null;\n    sort: Array<string> | null;\n};\n\nexport type GetFooData = {\n    body?: never;\n    path?: never;\n    query: {\n        foo: Bar;\n    };\n    url: '/foo';\n};\n\nexport type GetFooResponses = {\n    /**\n     * OK\n     */\n    200: number;\n};\n\nexport type GetFooResponse = GetFooResponses[keyof GetFooResponses];\n\nexport type PostFooData = {\n    body: Foo;\n    path?: never;\n    query?: never;\n    url: '/foo';\n};\n\nexport type PostFooResponses = {\n    /**\n     * OK\n     */\n    200: unknown;\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/parameter-explode-false/client/client.gen.ts",
    "content": "// 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 (options: RequestOptions) => {\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 url = buildUrl(opts);\n\n    return { opts, url };\n  };\n\n  const request: Client['request'] = async (options) => {\n    // @ts-expect-error\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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/parameter-explode-false/client/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type { Auth } from '../core/auth.gen';\nexport type { QuerySerializerOptions } from '../core/bodySerializer.gen';\nexport {\n  formDataBodySerializer,\n  jsonBodySerializer,\n  urlSearchParamsBodySerializer,\n} from '../core/bodySerializer.gen';\nexport { buildClientParams } from '../core/params.gen';\nexport { serializeQueryKeyValue } from '../core/queryKeySerializer.gen';\nexport { createClient } from './client.gen';\nexport type {\n  Client,\n  ClientOptions,\n  Config,\n  CreateClientConfig,\n  Options,\n  RequestOptions,\n  RequestResult,\n  ResolvedRequestOptions,\n  ResponseStyle,\n  TDataShape,\n} from './types.gen';\nexport { createConfig, mergeHeaders } from './utils.gen';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/parameter-explode-false/client/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { Auth } from '../core/auth.gen';\nimport type {\n  ServerSentEventsOptions,\n  ServerSentEventsResult,\n} from '../core/serverSentEvents.gen';\nimport type { Client as CoreClient, Config as CoreConfig } from '../core/types.gen';\nimport type { Middleware } from './utils.gen';\n\nexport type ResponseStyle = 'data' | 'fields';\n\nexport interface Config<T extends ClientOptions = ClientOptions>\n  extends Omit<RequestInit, 'body' | 'headers' | 'method'>, CoreConfig {\n  /**\n   * Base URL for all requests made by this client.\n   */\n  baseUrl?: T['baseUrl'];\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   * Please don't use the Fetch client for Next.js applications. The `next`\n   * options won't have any effect.\n   *\n   * Install {@link https://www.npmjs.com/package/@hey-api/client-next `@hey-api/client-next`} instead.\n   */\n  next?: never;\n  /**\n   * Return the response data parsed in a specified format. By default, `auto`\n   * will infer the appropriate method from the `Content-Type` response header.\n   * You can override this behavior with any of the {@link Body} methods.\n   * Select `stream` if you don't want to parse response data at all.\n   *\n   * @default 'auto'\n   */\n  parseAs?: 'arrayBuffer' | 'auto' | 'blob' | 'formData' | 'json' | 'stream' | 'text';\n  /**\n   * Should we return only data or multiple fields (data, error, response, etc.)?\n   *\n   * @default 'fields'\n   */\n  responseStyle?: ResponseStyle;\n  /**\n   * Throw an error instead of returning it in the response?\n   *\n   * @default false\n   */\n  throwOnError?: T['throwOnError'];\n}\n\nexport interface RequestOptions<\n  TData = unknown,\n  TResponseStyle extends ResponseStyle = 'fields',\n  ThrowOnError extends boolean = boolean,\n  Url extends string = string,\n>\n  extends\n    Config<{\n      responseStyle: TResponseStyle;\n      throwOnError: ThrowOnError;\n    }>,\n    Pick<\n      ServerSentEventsOptions<TData>,\n      | 'onRequest'\n      | 'onSseError'\n      | 'onSseEvent'\n      | 'sseDefaultRetryDelay'\n      | 'sseMaxRetryAttempts'\n      | 'sseMaxRetryDelay'\n    > {\n  /**\n   * Any body that you want to add to your request.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/fetch#body}\n   */\n  body?: unknown;\n  path?: Record<string, unknown>;\n  query?: Record<string, unknown>;\n  /**\n   * Security mechanism(s) to use for the request.\n   */\n  security?: ReadonlyArray<Auth>;\n  url: Url;\n}\n\nexport interface ResolvedRequestOptions<\n  TResponseStyle extends ResponseStyle = 'fields',\n  ThrowOnError extends boolean = boolean,\n  Url extends string = string,\n> extends RequestOptions<unknown, TResponseStyle, ThrowOnError, Url> {\n  serializedBody?: string;\n}\n\nexport type RequestResult<\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = boolean,\n  TResponseStyle extends ResponseStyle = 'fields',\n> = ThrowOnError extends true\n  ? Promise<\n      TResponseStyle extends 'data'\n        ? TData extends Record<string, unknown>\n          ? TData[keyof TData]\n          : TData\n        : {\n            data: TData extends Record<string, unknown> ? TData[keyof TData] : TData;\n            request: Request;\n            response: Response;\n          }\n    >\n  : Promise<\n      TResponseStyle extends 'data'\n        ? (TData extends Record<string, unknown> ? TData[keyof TData] : TData) | undefined\n        : (\n            | {\n                data: TData extends Record<string, unknown> ? TData[keyof TData] : TData;\n                error: undefined;\n              }\n            | {\n                data: undefined;\n                error: TError extends Record<string, unknown> ? TError[keyof TError] : TError;\n              }\n          ) & {\n            request: Request;\n            response: Response;\n          }\n    >;\n\nexport interface ClientOptions {\n  baseUrl?: string;\n  responseStyle?: ResponseStyle;\n  throwOnError?: boolean;\n}\n\ntype MethodFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'>,\n) => RequestResult<TData, TError, ThrowOnError, TResponseStyle>;\n\ntype SseFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'>,\n) => Promise<ServerSentEventsResult<TData, TError>>;\n\ntype RequestFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'> &\n    Pick<Required<RequestOptions<TData, TResponseStyle, ThrowOnError>>, 'method'>,\n) => RequestResult<TData, TError, ThrowOnError, TResponseStyle>;\n\ntype BuildUrlFn = <\n  TData extends {\n    body?: unknown;\n    path?: Record<string, unknown>;\n    query?: Record<string, unknown>;\n    url: string;\n  },\n>(\n  options: TData & Options<TData>,\n) => string;\n\nexport type Client = CoreClient<RequestFn, Config, MethodFn, BuildUrlFn, SseFn> & {\n  interceptors: Middleware<Request, Response, unknown, ResolvedRequestOptions>;\n};\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 = ClientOptions> = (\n  override?: Config<ClientOptions & T>,\n) => Config<Required<ClientOptions> & T>;\n\nexport interface TDataShape {\n  body?: unknown;\n  headers?: unknown;\n  path?: unknown;\n  query?: unknown;\n  url: string;\n}\n\ntype OmitKeys<T, K> = Pick<T, Exclude<keyof T, K>>;\n\nexport type Options<\n  TData extends TDataShape = TDataShape,\n  ThrowOnError extends boolean = boolean,\n  TResponse = unknown,\n  TResponseStyle extends ResponseStyle = 'fields',\n> = OmitKeys<\n  RequestOptions<TResponse, TResponseStyle, ThrowOnError>,\n  'body' | 'path' | 'query' | 'url'\n> &\n  ([TData] extends [never] ? unknown : Omit<TData, 'url'>);\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/parameter-explode-false/client/utils.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/parameter-explode-false/client.gen.ts",
    "content": "// 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>());\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/parameter-explode-false/core/auth.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/parameter-explode-false/core/bodySerializer.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/parameter-explode-false/core/params.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/parameter-explode-false/core/pathSerializer.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/parameter-explode-false/core/queryKeySerializer.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\n/**\n * JSON-friendly union that mirrors what Pinia Colada can hash.\n */\nexport type JsonValue =\n  | null\n  | string\n  | number\n  | boolean\n  | JsonValue[]\n  | { [key: string]: JsonValue };\n\n/**\n * Replacer that converts non-JSON values (bigint, Date, etc.) to safe substitutes.\n */\nexport const queryKeyJsonReplacer = (_key: string, value: unknown) => {\n  if (value === undefined || typeof value === 'function' || typeof value === 'symbol') {\n    return undefined;\n  }\n  if (typeof value === 'bigint') {\n    return value.toString();\n  }\n  if (value instanceof Date) {\n    return value.toISOString();\n  }\n  return value;\n};\n\n/**\n * Safely stringifies a value and parses it back into a JsonValue.\n */\nexport const stringifyToJsonValue = (input: unknown): JsonValue | undefined => {\n  try {\n    const json = JSON.stringify(input, queryKeyJsonReplacer);\n    if (json === undefined) {\n      return undefined;\n    }\n    return JSON.parse(json) as JsonValue;\n  } catch {\n    return undefined;\n  }\n};\n\n/**\n * Detects plain objects (including objects with a null prototype).\n */\nconst isPlainObject = (value: unknown): value is Record<string, unknown> => {\n  if (value === null || typeof value !== 'object') {\n    return false;\n  }\n  const prototype = Object.getPrototypeOf(value as object);\n  return prototype === Object.prototype || prototype === null;\n};\n\n/**\n * Turns URLSearchParams into a sorted JSON object for deterministic keys.\n */\nconst serializeSearchParams = (params: URLSearchParams): JsonValue => {\n  const entries = Array.from(params.entries()).sort(([a], [b]) => a.localeCompare(b));\n  const result: Record<string, JsonValue> = {};\n\n  for (const [key, value] of entries) {\n    const existing = result[key];\n    if (existing === undefined) {\n      result[key] = value;\n      continue;\n    }\n\n    if (Array.isArray(existing)) {\n      (existing as string[]).push(value);\n    } else {\n      result[key] = [existing, value];\n    }\n  }\n\n  return result;\n};\n\n/**\n * Normalizes any accepted value into a JSON-friendly shape for query keys.\n */\nexport const serializeQueryKeyValue = (value: unknown): JsonValue | undefined => {\n  if (value === null) {\n    return null;\n  }\n\n  if (typeof value === 'string' || typeof value === 'number' || typeof value === 'boolean') {\n    return value;\n  }\n\n  if (value === undefined || typeof value === 'function' || typeof value === 'symbol') {\n    return undefined;\n  }\n\n  if (typeof value === 'bigint') {\n    return value.toString();\n  }\n\n  if (value instanceof Date) {\n    return value.toISOString();\n  }\n\n  if (Array.isArray(value)) {\n    return stringifyToJsonValue(value);\n  }\n\n  if (typeof URLSearchParams !== 'undefined' && value instanceof URLSearchParams) {\n    return serializeSearchParams(value);\n  }\n\n  if (isPlainObject(value)) {\n    return stringifyToJsonValue(value);\n  }\n\n  return undefined;\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/parameter-explode-false/core/serverSentEvents.gen.ts",
    "content": "// 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 const 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            // Normalize line endings: CRLF -> LF, then CR -> LF\n            buffer = buffer.replace(/\\r\\n/g, '\\n').replace(/\\r/g, '\\n');\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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/parameter-explode-false/core/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { Auth, AuthToken } from './auth.gen';\nimport type { BodySerializer, QuerySerializer, QuerySerializerOptions } from './bodySerializer.gen';\n\nexport type HttpMethod =\n  | 'connect'\n  | 'delete'\n  | 'get'\n  | 'head'\n  | 'options'\n  | 'patch'\n  | 'post'\n  | 'put'\n  | 'trace';\n\nexport type Client<\n  RequestFn = never,\n  Config = unknown,\n  MethodFn = never,\n  BuildUrlFn = never,\n  SseFn = never,\n> = {\n  /**\n   * Returns the final request URL.\n   */\n  buildUrl: BuildUrlFn;\n  getConfig: () => Config;\n  request: RequestFn;\n  setConfig: (config: Config) => Config;\n} & {\n  [K in HttpMethod]: MethodFn;\n} & ([SseFn] extends [never] ? { sse?: never } : { sse: { [K in HttpMethod]: SseFn } });\n\nexport interface Config {\n  /**\n   * Auth token or a function returning auth token. The resolved value will be\n   * added to the request payload as defined by its `security` array.\n   */\n  auth?: ((auth: Auth) => Promise<AuthToken> | AuthToken) | AuthToken;\n  /**\n   * A function for serializing request body parameter. By default,\n   * {@link JSON.stringify()} will be used.\n   */\n  bodySerializer?: BodySerializer | null;\n  /**\n   * An object containing any HTTP headers that you want to pre-populate your\n   * `Headers` object with.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/Headers/Headers#init See more}\n   */\n  headers?:\n    | RequestInit['headers']\n    | Record<\n        string,\n        string | number | boolean | (string | number | boolean)[] | null | undefined | unknown\n      >;\n  /**\n   * The request method.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/fetch#method See more}\n   */\n  method?: Uppercase<HttpMethod>;\n  /**\n   * A function for serializing request query parameters. By default, arrays\n   * will be exploded in form style, objects will be exploded in deepObject\n   * style, and reserved characters are percent-encoded.\n   *\n   * This method will have no effect if the native `paramsSerializer()` Axios\n   * API function is used.\n   *\n   * {@link https://swagger.io/docs/specification/serialization/#query View examples}\n   */\n  querySerializer?: QuerySerializer | QuerySerializerOptions;\n  /**\n   * A function validating request data. This is useful if you want to ensure\n   * the request conforms to the desired shape, so it can be safely sent to\n   * the server.\n   */\n  requestValidator?: (data: unknown) => Promise<unknown>;\n  /**\n   * A function transforming response data before it's returned. This is useful\n   * for post-processing data, e.g. converting ISO strings into Date objects.\n   */\n  responseTransformer?: (data: unknown) => Promise<unknown>;\n  /**\n   * A function validating response data. This is useful if you want to ensure\n   * the response conforms to the desired shape, so it can be safely passed to\n   * the transformers and returned to the user.\n   */\n  responseValidator?: (data: unknown) => Promise<unknown>;\n}\n\ntype IsExactlyNeverOrNeverUndefined<T> = [T] extends [never]\n  ? true\n  : [T] extends [never | undefined]\n    ? [undefined] extends [T]\n      ? false\n      : true\n    : false;\n\nexport type OmitNever<T extends Record<string, unknown>> = {\n  [K in keyof T as IsExactlyNeverOrNeverUndefined<T[K]> extends true ? never : K]: T[K];\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/parameter-explode-false/core/utils.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/parameter-explode-false/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport { type Options, postFoo } from './sdk.gen';\nexport type { ClientOptions, PostFooData, PostFooResponses } from './types.gen';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/parameter-explode-false/sdk.gen.ts",
    "content": "// 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 { PostFooData, PostFooResponses } from './types.gen';\n\nexport type Options<TData extends TDataShape = TDataShape, ThrowOnError extends boolean = boolean> = Options2<TData, ThrowOnError> & {\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\nexport const postFoo = <ThrowOnError extends boolean = false>(options?: Options<PostFooData, ThrowOnError>) => (options?.client ?? client).post<PostFooResponses, unknown, ThrowOnError>({\n    querySerializer: { parameters: { foo: { array: { explode: false } } } },\n    url: '/foo',\n    ...options\n});\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/parameter-explode-false/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type ClientOptions = {\n    baseUrl: `${string}://${string}` | (string & {});\n};\n\nexport type PostFooData = {\n    body?: never;\n    path?: never;\n    query?: {\n        foo?: Array<string>;\n    };\n    url: '/foo';\n};\n\nexport type PostFooResponses = {\n    /**\n     * OK\n     */\n    default: unknown;\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/parameter-explode-false-axios/client/client.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { AxiosError, AxiosInstance, RawAxiosRequestHeaders } from 'axios';\nimport axios from 'axios';\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 } from './types.gen';\nimport { buildUrl, createConfig, mergeConfigs, mergeHeaders, setAuthParams } from './utils.gen';\n\nexport const createClient = (config: Config = {}): Client => {\n  let _config = mergeConfigs(createConfig(), config);\n\n  let instance: AxiosInstance;\n\n  if (_config.axios && !('Axios' in _config.axios)) {\n    instance = _config.axios;\n  } else {\n    // eslint-disable-next-line @typescript-eslint/no-unused-vars\n    const { auth, ...configWithoutAuth } = _config;\n    instance = axios.create(configWithoutAuth);\n  }\n\n  const getConfig = (): Config => ({ ..._config });\n\n  const setConfig = (config: Config): Config => {\n    _config = mergeConfigs(_config, config);\n    instance.defaults = {\n      ...instance.defaults,\n      ..._config,\n      // @ts-expect-error\n      headers: mergeHeaders(instance.defaults.headers, _config.headers),\n    };\n    return getConfig();\n  };\n\n  const beforeRequest = async (options: RequestOptions) => {\n    const opts = {\n      ..._config,\n      ...options,\n      axios: options.axios ?? _config.axios ?? instance,\n      headers: mergeHeaders(_config.headers, options.headers),\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.body = opts.bodySerializer(opts.body);\n    }\n\n    const url = buildUrl(opts);\n\n    return { opts, url };\n  };\n\n  // @ts-expect-error\n  const request: Client['request'] = async (options) => {\n    // @ts-expect-error\n    const { opts, url } = await beforeRequest(options);\n    try {\n      // assign Axios here for consistency with fetch\n      const _axios = opts.axios!;\n      // eslint-disable-next-line @typescript-eslint/no-unused-vars\n      const { auth, ...optsWithoutAuth } = opts;\n      const response = await _axios({\n        ...optsWithoutAuth,\n        baseURL: '', // the baseURL is already included in `url`\n        data: getValidRequestBody(opts),\n        headers: opts.headers as RawAxiosRequestHeaders,\n        // let `paramsSerializer()` handle query params if it exists\n        params: opts.paramsSerializer ? opts.query : undefined,\n        url,\n      });\n\n      let { data } = response;\n\n      if (opts.responseType === '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 {\n        ...response,\n        data: data ?? {},\n      };\n    } catch (error) {\n      const e = error as AxiosError;\n      if (opts.throwOnError) {\n        throw e;\n      }\n      // @ts-expect-error\n      e.error = e.response?.data ?? {};\n      return e;\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 Record<string, string>,\n      method,\n      serializedBody: getValidRequestBody(opts) as BodyInit | null | undefined,\n      // @ts-expect-error\n      signal: opts.signal,\n      url,\n    });\n  };\n\n  const _buildUrl: Client['buildUrl'] = (options) =>\n    buildUrl({ axios: instance, ..._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    instance,\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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/parameter-explode-false-axios/client/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type { Auth } from '../core/auth.gen';\nexport type { QuerySerializerOptions } from '../core/bodySerializer.gen';\nexport {\n  formDataBodySerializer,\n  jsonBodySerializer,\n  urlSearchParamsBodySerializer,\n} from '../core/bodySerializer.gen';\nexport { buildClientParams } from '../core/params.gen';\nexport { serializeQueryKeyValue } from '../core/queryKeySerializer.gen';\nexport { createClient } from './client.gen';\nexport type {\n  Client,\n  ClientOptions,\n  Config,\n  CreateClientConfig,\n  Options,\n  RequestOptions,\n  RequestResult,\n  TDataShape,\n} from './types.gen';\nexport { createConfig } from './utils.gen';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/parameter-explode-false-axios/client/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type {\n  AxiosError,\n  AxiosInstance,\n  AxiosRequestHeaders,\n  AxiosResponse,\n  AxiosStatic,\n  CreateAxiosDefaults,\n} from 'axios';\n\nimport type { Auth } from '../core/auth.gen';\nimport type {\n  ServerSentEventsOptions,\n  ServerSentEventsResult,\n} from '../core/serverSentEvents.gen';\nimport type { Client as CoreClient, Config as CoreConfig } from '../core/types.gen';\n\nexport interface Config<T extends ClientOptions = ClientOptions>\n  extends Omit<CreateAxiosDefaults, 'auth' | 'baseURL' | 'headers' | 'method'>, CoreConfig {\n  /**\n   * Axios implementation. You can use this option to provide either an\n   * `AxiosStatic` or an `AxiosInstance`.\n   *\n   * @default axios\n   */\n  axios?: AxiosStatic | AxiosInstance;\n  /**\n   * Base URL for all requests made by this client.\n   */\n  baseURL?: T['baseURL'];\n  /**\n   * An object containing any HTTP headers that you want to pre-populate your\n   * `Headers` object with.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/Headers/Headers#init See more}\n   */\n  headers?:\n    | AxiosRequestHeaders\n    | Record<\n        string,\n        string | number | boolean | (string | number | boolean)[] | null | undefined | unknown\n      >;\n  /**\n   * Throw an error instead of returning it in the response?\n   *\n   * @default false\n   */\n  throwOnError?: T['throwOnError'];\n}\n\nexport interface RequestOptions<\n  TData = unknown,\n  ThrowOnError extends boolean = boolean,\n  Url extends string = string,\n>\n  extends\n    Config<{\n      throwOnError: ThrowOnError;\n    }>,\n    Pick<\n      ServerSentEventsOptions<TData>,\n      | 'onRequest'\n      | 'onSseError'\n      | 'onSseEvent'\n      | 'sseDefaultRetryDelay'\n      | 'sseMaxRetryAttempts'\n      | 'sseMaxRetryDelay'\n    > {\n  /**\n   * Any body that you want to add to your request.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/fetch#body}\n   */\n  body?: unknown;\n  path?: Record<string, unknown>;\n  query?: Record<string, unknown>;\n  /**\n   * Security mechanism(s) to use for the request.\n   */\n  security?: ReadonlyArray<Auth>;\n  url: Url;\n}\n\nexport interface ClientOptions {\n  baseURL?: string;\n  throwOnError?: boolean;\n}\n\nexport type RequestResult<\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = boolean,\n> = ThrowOnError extends true\n  ? Promise<AxiosResponse<TData extends Record<string, unknown> ? TData[keyof TData] : TData>>\n  : Promise<\n      | (AxiosResponse<TData extends Record<string, unknown> ? TData[keyof TData] : TData> & {\n          error: undefined;\n        })\n      | (AxiosError<TError extends Record<string, unknown> ? TError[keyof TError] : TError> & {\n          data: undefined;\n          error: TError extends Record<string, unknown> ? TError[keyof TError] : TError;\n        })\n    >;\n\ntype MethodFn = <TData = unknown, TError = unknown, ThrowOnError extends boolean = false>(\n  options: Omit<RequestOptions<TData, ThrowOnError>, 'method'>,\n) => RequestResult<TData, TError, ThrowOnError>;\n\ntype SseFn = <TData = unknown, TError = unknown, ThrowOnError extends boolean = false>(\n  options: Omit<RequestOptions<TData, ThrowOnError>, 'method'>,\n) => Promise<ServerSentEventsResult<TData, TError>>;\n\ntype RequestFn = <TData = unknown, TError = unknown, ThrowOnError extends boolean = false>(\n  options: Omit<RequestOptions<TData, ThrowOnError>, 'method'> &\n    Pick<Required<RequestOptions<TData, ThrowOnError>>, 'method'>,\n) => RequestResult<TData, TError, ThrowOnError>;\n\ntype BuildUrlFn = <\n  TData extends {\n    body?: unknown;\n    path?: Record<string, unknown>;\n    query?: Record<string, unknown>;\n    url: string;\n  },\n>(\n  options: TData & Options<TData>,\n) => string;\n\nexport type Client = CoreClient<RequestFn, Config, MethodFn, BuildUrlFn, SseFn> & {\n  instance: AxiosInstance;\n};\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 = ClientOptions> = (\n  override?: Config<ClientOptions & T>,\n) => Config<Required<ClientOptions> & T>;\n\nexport interface TDataShape {\n  body?: unknown;\n  headers?: unknown;\n  path?: unknown;\n  query?: unknown;\n  url: string;\n}\n\ntype OmitKeys<T, K> = Pick<T, Exclude<keyof T, K>>;\n\nexport type Options<\n  TData extends TDataShape = TDataShape,\n  ThrowOnError extends boolean = boolean,\n  TResponse = unknown,\n> = OmitKeys<RequestOptions<TResponse, ThrowOnError>, 'body' | 'path' | 'query' | 'url'> &\n  ([TData] extends [never] ? unknown : Omit<TData, 'url'>);\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/parameter-explode-false-axios/client/utils.gen.ts",
    "content": "// 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 {\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\nconst checkForExistence = (\n  options: Pick<RequestOptions, 'auth' | 'query'> & {\n    headers: Record<any, unknown>;\n  },\n  name?: string,\n): boolean => {\n  if (!name) {\n    return false;\n  }\n  if (name in options.headers || options.query?.[name]) {\n    return true;\n  }\n  if (\n    'Cookie' in options.headers &&\n    options.headers['Cookie'] &&\n    typeof options.headers['Cookie'] === 'string'\n  ) {\n    return options.headers['Cookie'].includes(`${name}=`);\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: Record<any, unknown>;\n  }) => {\n  for (const auth of security) {\n    if (checkForExistence(options, auth.name)) {\n      continue;\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        const value = `${name}=${token}`;\n        if ('Cookie' in options.headers && options.headers['Cookie']) {\n          options.headers['Cookie'] = `${options.headers['Cookie']}; ${value}`;\n        } else {\n          options.headers['Cookie'] = value;\n        }\n        break;\n      }\n      case 'header':\n      default:\n        options.headers[name] = token;\n        break;\n    }\n  }\n};\n\nexport const buildUrl: Client['buildUrl'] = (options) => {\n  const instanceBaseUrl = options.axios?.defaults?.baseURL;\n\n  const baseUrl =\n    !!options.baseURL && typeof options.baseURL === 'string' ? options.baseURL : instanceBaseUrl;\n\n  return getUrl({\n    baseUrl: baseUrl as string,\n    path: options.path,\n    // let `paramsSerializer()` handle query params if it exists\n    query: !options.paramsSerializer ? options.query : undefined,\n    querySerializer:\n      typeof options.querySerializer === 'function'\n        ? options.querySerializer\n        : createQuerySerializer(options.querySerializer),\n    url: options.url,\n  });\n};\n\nexport const mergeConfigs = (a: Config, b: Config): Config => {\n  const config = { ...a, ...b };\n  config.headers = mergeHeaders(a.headers, b.headers);\n  return config;\n};\n\n/**\n * Special Axios headers keywords allowing to set headers by request method.\n */\nexport const axiosHeadersKeywords = [\n  'common',\n  'delete',\n  'get',\n  'head',\n  'patch',\n  'post',\n  'put',\n] as const;\n\nexport const mergeHeaders = (\n  ...headers: Array<Required<Config>['headers'] | undefined>\n): Record<any, unknown> => {\n  const mergedHeaders: Record<any, unknown> = {};\n  for (const header of headers) {\n    if (!header || typeof header !== 'object') {\n      continue;\n    }\n\n    const iterator = Object.entries(header);\n\n    for (const [key, value] of iterator) {\n      if (\n        axiosHeadersKeywords.includes(key as (typeof axiosHeadersKeywords)[number]) &&\n        typeof value === 'object'\n      ) {\n        mergedHeaders[key] = {\n          ...(mergedHeaders[key] as Record<any, unknown>),\n          ...value,\n        };\n      } else if (value === null) {\n        delete mergedHeaders[key];\n      } else if (Array.isArray(value)) {\n        for (const v of value) {\n          // @ts-expect-error\n          mergedHeaders[key] = [...(mergedHeaders[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[key] = typeof value === 'object' ? JSON.stringify(value) : (value as string);\n      }\n    }\n  }\n  return mergedHeaders;\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  ...override,\n});\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/parameter-explode-false-axios/client.gen.ts",
    "content": "// 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>());\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/parameter-explode-false-axios/core/auth.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/parameter-explode-false-axios/core/bodySerializer.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/parameter-explode-false-axios/core/params.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/parameter-explode-false-axios/core/pathSerializer.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/parameter-explode-false-axios/core/queryKeySerializer.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\n/**\n * JSON-friendly union that mirrors what Pinia Colada can hash.\n */\nexport type JsonValue =\n  | null\n  | string\n  | number\n  | boolean\n  | JsonValue[]\n  | { [key: string]: JsonValue };\n\n/**\n * Replacer that converts non-JSON values (bigint, Date, etc.) to safe substitutes.\n */\nexport const queryKeyJsonReplacer = (_key: string, value: unknown) => {\n  if (value === undefined || typeof value === 'function' || typeof value === 'symbol') {\n    return undefined;\n  }\n  if (typeof value === 'bigint') {\n    return value.toString();\n  }\n  if (value instanceof Date) {\n    return value.toISOString();\n  }\n  return value;\n};\n\n/**\n * Safely stringifies a value and parses it back into a JsonValue.\n */\nexport const stringifyToJsonValue = (input: unknown): JsonValue | undefined => {\n  try {\n    const json = JSON.stringify(input, queryKeyJsonReplacer);\n    if (json === undefined) {\n      return undefined;\n    }\n    return JSON.parse(json) as JsonValue;\n  } catch {\n    return undefined;\n  }\n};\n\n/**\n * Detects plain objects (including objects with a null prototype).\n */\nconst isPlainObject = (value: unknown): value is Record<string, unknown> => {\n  if (value === null || typeof value !== 'object') {\n    return false;\n  }\n  const prototype = Object.getPrototypeOf(value as object);\n  return prototype === Object.prototype || prototype === null;\n};\n\n/**\n * Turns URLSearchParams into a sorted JSON object for deterministic keys.\n */\nconst serializeSearchParams = (params: URLSearchParams): JsonValue => {\n  const entries = Array.from(params.entries()).sort(([a], [b]) => a.localeCompare(b));\n  const result: Record<string, JsonValue> = {};\n\n  for (const [key, value] of entries) {\n    const existing = result[key];\n    if (existing === undefined) {\n      result[key] = value;\n      continue;\n    }\n\n    if (Array.isArray(existing)) {\n      (existing as string[]).push(value);\n    } else {\n      result[key] = [existing, value];\n    }\n  }\n\n  return result;\n};\n\n/**\n * Normalizes any accepted value into a JSON-friendly shape for query keys.\n */\nexport const serializeQueryKeyValue = (value: unknown): JsonValue | undefined => {\n  if (value === null) {\n    return null;\n  }\n\n  if (typeof value === 'string' || typeof value === 'number' || typeof value === 'boolean') {\n    return value;\n  }\n\n  if (value === undefined || typeof value === 'function' || typeof value === 'symbol') {\n    return undefined;\n  }\n\n  if (typeof value === 'bigint') {\n    return value.toString();\n  }\n\n  if (value instanceof Date) {\n    return value.toISOString();\n  }\n\n  if (Array.isArray(value)) {\n    return stringifyToJsonValue(value);\n  }\n\n  if (typeof URLSearchParams !== 'undefined' && value instanceof URLSearchParams) {\n    return serializeSearchParams(value);\n  }\n\n  if (isPlainObject(value)) {\n    return stringifyToJsonValue(value);\n  }\n\n  return undefined;\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/parameter-explode-false-axios/core/serverSentEvents.gen.ts",
    "content": "// 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 const 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            // Normalize line endings: CRLF -> LF, then CR -> LF\n            buffer = buffer.replace(/\\r\\n/g, '\\n').replace(/\\r/g, '\\n');\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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/parameter-explode-false-axios/core/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { Auth, AuthToken } from './auth.gen';\nimport type { BodySerializer, QuerySerializer, QuerySerializerOptions } from './bodySerializer.gen';\n\nexport type HttpMethod =\n  | 'connect'\n  | 'delete'\n  | 'get'\n  | 'head'\n  | 'options'\n  | 'patch'\n  | 'post'\n  | 'put'\n  | 'trace';\n\nexport type Client<\n  RequestFn = never,\n  Config = unknown,\n  MethodFn = never,\n  BuildUrlFn = never,\n  SseFn = never,\n> = {\n  /**\n   * Returns the final request URL.\n   */\n  buildUrl: BuildUrlFn;\n  getConfig: () => Config;\n  request: RequestFn;\n  setConfig: (config: Config) => Config;\n} & {\n  [K in HttpMethod]: MethodFn;\n} & ([SseFn] extends [never] ? { sse?: never } : { sse: { [K in HttpMethod]: SseFn } });\n\nexport interface Config {\n  /**\n   * Auth token or a function returning auth token. The resolved value will be\n   * added to the request payload as defined by its `security` array.\n   */\n  auth?: ((auth: Auth) => Promise<AuthToken> | AuthToken) | AuthToken;\n  /**\n   * A function for serializing request body parameter. By default,\n   * {@link JSON.stringify()} will be used.\n   */\n  bodySerializer?: BodySerializer | null;\n  /**\n   * An object containing any HTTP headers that you want to pre-populate your\n   * `Headers` object with.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/Headers/Headers#init See more}\n   */\n  headers?:\n    | RequestInit['headers']\n    | Record<\n        string,\n        string | number | boolean | (string | number | boolean)[] | null | undefined | unknown\n      >;\n  /**\n   * The request method.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/fetch#method See more}\n   */\n  method?: Uppercase<HttpMethod>;\n  /**\n   * A function for serializing request query parameters. By default, arrays\n   * will be exploded in form style, objects will be exploded in deepObject\n   * style, and reserved characters are percent-encoded.\n   *\n   * This method will have no effect if the native `paramsSerializer()` Axios\n   * API function is used.\n   *\n   * {@link https://swagger.io/docs/specification/serialization/#query View examples}\n   */\n  querySerializer?: QuerySerializer | QuerySerializerOptions;\n  /**\n   * A function validating request data. This is useful if you want to ensure\n   * the request conforms to the desired shape, so it can be safely sent to\n   * the server.\n   */\n  requestValidator?: (data: unknown) => Promise<unknown>;\n  /**\n   * A function transforming response data before it's returned. This is useful\n   * for post-processing data, e.g. converting ISO strings into Date objects.\n   */\n  responseTransformer?: (data: unknown) => Promise<unknown>;\n  /**\n   * A function validating response data. This is useful if you want to ensure\n   * the response conforms to the desired shape, so it can be safely passed to\n   * the transformers and returned to the user.\n   */\n  responseValidator?: (data: unknown) => Promise<unknown>;\n}\n\ntype IsExactlyNeverOrNeverUndefined<T> = [T] extends [never]\n  ? true\n  : [T] extends [never | undefined]\n    ? [undefined] extends [T]\n      ? false\n      : true\n    : false;\n\nexport type OmitNever<T extends Record<string, unknown>> = {\n  [K in keyof T as IsExactlyNeverOrNeverUndefined<T[K]> extends true ? never : K]: T[K];\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/parameter-explode-false-axios/core/utils.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/parameter-explode-false-axios/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport { type Options, postFoo } from './sdk.gen';\nexport type { ClientOptions, PostFooData, PostFooResponses } from './types.gen';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/parameter-explode-false-axios/sdk.gen.ts",
    "content": "// 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 { PostFooData, PostFooResponses } from './types.gen';\n\nexport type Options<TData extends TDataShape = TDataShape, ThrowOnError extends boolean = boolean> = Options2<TData, ThrowOnError> & {\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\nexport const postFoo = <ThrowOnError extends boolean = false>(options?: Options<PostFooData, ThrowOnError>) => (options?.client ?? client).post<PostFooResponses, unknown, ThrowOnError>({\n    querySerializer: { parameters: { foo: { array: { explode: false } } } },\n    url: '/foo',\n    ...options\n});\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/parameter-explode-false-axios/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type ClientOptions = {\n    baseURL: `${string}://${string}` | (string & {});\n};\n\nexport type PostFooData = {\n    body?: never;\n    path?: never;\n    query?: {\n        foo?: Array<string>;\n    };\n    url: '/foo';\n};\n\nexport type PostFooResponses = {\n    /**\n     * OK\n     */\n    default: unknown;\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/parameter-tuple/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type { ClientOptions, PostFooData, PostFooResponses } from './types.gen';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/parameter-tuple/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type ClientOptions = {\n    baseUrl: `${string}://${string}` | (string & {});\n};\n\nexport type PostFooData = {\n    body?: never;\n    path?: never;\n    query?: {\n        tuple?: [\n            number,\n            number,\n            number,\n            number\n        ];\n    };\n    url: '/foo';\n};\n\nexport type PostFooResponses = {\n    /**\n     * OK\n     */\n    default: unknown;\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/pattern-properties/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type { ClientOptions, MetadataObject, NestedPatternObject, PatternPropertiesResponse, PatternPropertiesTest, PostPatternTestData, PostPatternTestResponse, PostPatternTestResponses, UnionPatternObject } from './types.gen';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/pattern-properties/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type ClientOptions = {\n    baseUrl: `${string}://${string}` | (string & {});\n};\n\nexport type PatternPropertiesTest = {\n    id?: string;\n    metadata?: MetadataObject;\n};\n\nexport type MetadataObject = {\n    name?: string;\n    description?: string;\n    [key: string]: Array<string> | string | {\n        value?: string;\n        enabled?: boolean;\n    } | undefined;\n};\n\nexport type NestedPatternObject = {\n    base?: string;\n    [key: string]: {\n        [key: string]: string;\n    } | string | undefined;\n};\n\nexport type UnionPatternObject = {\n    type?: 'user' | 'admin' | 'guest';\n    [key: string]: ({\n        [key: string]: unknown;\n    } & {\n        level?: number;\n    }) | string | number | 'user' | 'admin' | 'guest' | undefined;\n};\n\nexport type PatternPropertiesResponse = {\n    success?: boolean;\n    data?: MetadataObject;\n};\n\nexport type PostPatternTestData = {\n    body: PatternPropertiesTest;\n    path?: never;\n    query?: never;\n    url: '/pattern-test';\n};\n\nexport type PostPatternTestResponses = {\n    /**\n     * Success\n     */\n    200: PatternPropertiesResponse;\n};\n\nexport type PostPatternTestResponse = PostPatternTestResponses[keyof PostPatternTestResponses];\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@angular/common/default/client/client.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { HttpResponse } from '@angular/common/http';\nimport { HttpClient, HttpErrorResponse, HttpEventType, HttpRequest } from '@angular/common/http';\nimport {\n  assertInInjectionContext,\n  inject,\n  provideAppInitializer,\n  runInInjectionContext,\n} from '@angular/core';\nimport { firstValueFrom } from 'rxjs';\nimport { filter } from 'rxjs/operators';\n\nimport { createSseClient } from '../core/serverSentEvents.gen';\nimport type { HttpMethod } from '../core/types.gen';\nimport { getValidRequestBody } from '../core/utils.gen';\nimport type {\n  Client,\n  Config,\n  RequestOptions,\n  ResolvedRequestOptions,\n  ResponseStyle,\n} from './types.gen';\nimport {\n  buildUrl,\n  createConfig,\n  createInterceptors,\n  mergeConfigs,\n  mergeHeaders,\n  setAuthParams,\n} from './utils.gen';\n\nexport function provideHeyApiClient(client: Client) {\n  return provideAppInitializer(() => {\n    const httpClient = inject(HttpClient);\n    client.setConfig({ httpClient });\n  });\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<\n    HttpRequest<unknown>,\n    HttpResponse<unknown>,\n    unknown,\n    ResolvedRequestOptions\n  >();\n\n  const requestOptions = <\n    TData = unknown,\n    ThrowOnError extends boolean = false,\n    TResponseStyle extends ResponseStyle = 'fields',\n  >(\n    options: RequestOptions<TData, TResponseStyle, ThrowOnError>,\n  ) => {\n    const opts = {\n      ..._config,\n      ...options,\n      headers: mergeHeaders(_config.headers, options.headers),\n      httpClient: options.httpClient ?? _config.httpClient,\n      serializedBody: undefined as string | undefined,\n    };\n\n    if (!opts.httpClient) {\n      if (opts.injector) {\n        opts.httpClient = runInInjectionContext(opts.injector, () => inject(HttpClient));\n      } else {\n        assertInInjectionContext(requestOptions);\n        opts.httpClient = inject(HttpClient);\n      }\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 url = buildUrl(opts as any);\n\n    const req = new HttpRequest<unknown>(opts.method ?? 'GET', url, getValidRequestBody(opts), {\n      redirect: 'follow',\n      ...opts,\n    });\n\n    return { opts, req, url };\n  };\n\n  const beforeRequest = async (options: RequestOptions) => {\n    const { opts, req, url } = requestOptions(options);\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    return { opts, req, url };\n  };\n\n  const request: Client['request'] = async (options) => {\n    // @ts-expect-error\n    const { opts, req: initialReq } = await beforeRequest(options);\n\n    let req = initialReq;\n\n    for (const fn of interceptors.request.fns) {\n      if (fn) {\n        req = await fn(req, opts as any);\n      }\n    }\n\n    const result: {\n      request: HttpRequest<unknown>;\n      response: any;\n    } = {\n      request: req,\n      response: null,\n    };\n\n    try {\n      result.response = (await firstValueFrom(\n        opts\n          .httpClient!.request(req)\n          .pipe(filter((event) => event.type === HttpEventType.Response)),\n      )) as HttpResponse<unknown>;\n\n      for (const fn of interceptors.response.fns) {\n        if (fn) {\n          result.response = await fn(result.response, req, opts as any);\n        }\n      }\n\n      let bodyResponse = result.response.body;\n\n      if (opts.responseValidator) {\n        await opts.responseValidator(bodyResponse);\n      }\n\n      if (opts.responseTransformer) {\n        bodyResponse = await opts.responseTransformer(bodyResponse);\n      }\n\n      return opts.responseStyle === 'data' ? bodyResponse : { data: bodyResponse, ...result };\n    } catch (error) {\n      if (error instanceof HttpErrorResponse) {\n        result.response = error;\n      }\n\n      let finalError = error instanceof HttpErrorResponse ? error.error : error;\n\n      for (const fn of interceptors.error.fns) {\n        if (fn) {\n          finalError = (await fn(finalError, result.response as any, req, opts as any)) as string;\n        }\n      }\n\n      if (opts.throwOnError) {\n        throw finalError;\n      }\n\n      return opts.responseStyle === 'data'\n        ? undefined\n        : {\n            error: finalError,\n            ...result,\n          };\n    }\n  };\n\n  const makeMethodFn = (method: Uppercase<HttpMethod>) => (options: RequestOptions) =>\n    request({ ...options, method });\n\n  const makeSseFn = (method: Uppercase<HttpMethod>) => async (options: RequestOptions) => {\n    const { opts, url } = await beforeRequest(options);\n    return createSseClient({\n      ...opts,\n      body: opts.body as BodyInit | null | undefined,\n      headers: opts.headers as unknown as Record<string, string>,\n      method,\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    requestOptions: (options) => {\n      if (options.security) {\n        throw new Error('Security is not supported in requestOptions');\n      }\n\n      if (options.requestValidator) {\n        throw new Error('Request validation is not supported in requestOptions');\n      }\n\n      return requestOptions(options).req;\n    },\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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@angular/common/default/client/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type { Auth } from '../core/auth.gen';\nexport type { QuerySerializerOptions } from '../core/bodySerializer.gen';\nexport {\n  formDataBodySerializer,\n  jsonBodySerializer,\n  urlSearchParamsBodySerializer,\n} from '../core/bodySerializer.gen';\nexport { buildClientParams } from '../core/params.gen';\nexport { serializeQueryKeyValue } from '../core/queryKeySerializer.gen';\nexport { createClient } from './client.gen';\nexport type {\n  Client,\n  ClientOptions,\n  Config,\n  CreateClientConfig,\n  Options,\n  RequestOptions,\n  RequestResult,\n  ResolvedRequestOptions,\n  ResponseStyle,\n  TDataShape,\n} from './types.gen';\nexport { createConfig, mergeHeaders } from './utils.gen';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@angular/common/default/client/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type {\n  HttpClient,\n  HttpErrorResponse,\n  HttpHeaders,\n  HttpRequest,\n  HttpResponse,\n} from '@angular/common/http';\nimport type { Injector } from '@angular/core';\n\nimport type { Auth } from '../core/auth.gen';\nimport type {\n  ServerSentEventsOptions,\n  ServerSentEventsResult,\n} from '../core/serverSentEvents.gen';\nimport type { Client as CoreClient, Config as CoreConfig } from '../core/types.gen';\nimport type { Middleware } from './utils.gen';\n\nexport type ResponseStyle = 'data' | 'fields';\n\nexport interface Config<T extends ClientOptions = ClientOptions>\n  extends Omit<RequestInit, 'body' | 'headers' | 'method'>, Omit<CoreConfig, 'headers'> {\n  /**\n   * Base URL for all requests made by this client.\n   */\n  baseUrl?: T['baseUrl'];\n  /**\n   * An object containing any HTTP headers that you want to pre-populate your\n   * `HttpHeaders` object with.\n   *\n   * {@link https://angular.dev/api/common/http/HttpHeaders#constructor See more}\n   */\n  headers?:\n    | HttpHeaders\n    | Record<\n        string,\n        string | number | boolean | (string | number | boolean)[] | null | undefined | unknown\n      >;\n  /**\n   * The HTTP client to use for making requests.\n   */\n  httpClient?: HttpClient;\n  /**\n   * Should we return only data or multiple fields (data, error, response, etc.)?\n   *\n   * @default 'fields'\n   */\n  responseStyle?: ResponseStyle;\n\n  /**\n   * Throw an error instead of returning it in the response?\n   *\n   * @default false\n   */\n  throwOnError?: T['throwOnError'];\n}\n\nexport interface RequestOptions<\n  TData = unknown,\n  TResponseStyle extends ResponseStyle = 'fields',\n  ThrowOnError extends boolean = boolean,\n  Url extends string = string,\n>\n  extends\n    Config<{\n      responseStyle: TResponseStyle;\n      throwOnError: ThrowOnError;\n    }>,\n    Pick<\n      ServerSentEventsOptions<TData>,\n      | 'onRequest'\n      | 'onSseError'\n      | 'onSseEvent'\n      | 'sseDefaultRetryDelay'\n      | 'sseMaxRetryAttempts'\n      | 'sseMaxRetryDelay'\n    > {\n  /**\n   * Any body that you want to add to your request.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/fetch#body}\n   */\n  body?: unknown;\n  /**\n   * Optional custom injector for dependency resolution if you don't implicitly or explicitly provide one.\n   */\n  injector?: Injector;\n  path?: Record<string, unknown>;\n  query?: Record<string, unknown>;\n  /**\n   * Security mechanism(s) to use for the request.\n   */\n  security?: ReadonlyArray<Auth>;\n  url: Url;\n}\n\nexport interface ResolvedRequestOptions<\n  TResponseStyle extends ResponseStyle = 'fields',\n  ThrowOnError extends boolean = boolean,\n  Url extends string = string,\n> extends RequestOptions<unknown, TResponseStyle, ThrowOnError, Url> {\n  serializedBody?: string;\n}\n\nexport type RequestResult<\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = boolean,\n  TResponseStyle extends ResponseStyle = 'fields',\n> = Promise<\n  ThrowOnError extends true\n    ? TResponseStyle extends 'data'\n      ? TData extends Record<string, unknown>\n        ? TData[keyof TData]\n        : TData\n      : {\n          data: TData extends Record<string, unknown> ? TData[keyof TData] : TData;\n          request: HttpRequest<unknown>;\n          response: HttpResponse<TData>;\n        }\n    : TResponseStyle extends 'data'\n      ? (TData extends Record<string, unknown> ? TData[keyof TData] : TData) | undefined\n      :\n          | {\n              data: TData extends Record<string, unknown> ? TData[keyof TData] : TData;\n              error: undefined;\n              request: HttpRequest<unknown>;\n              response: HttpResponse<TData>;\n            }\n          | {\n              data: undefined;\n              error: TError[keyof TError];\n              request: HttpRequest<unknown>;\n              response: HttpErrorResponse & {\n                error: TError[keyof TError] | null;\n              };\n            }\n>;\n\nexport interface ClientOptions {\n  baseUrl?: string;\n  responseStyle?: ResponseStyle;\n  throwOnError?: boolean;\n}\n\ntype MethodFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'>,\n) => RequestResult<TData, TError, ThrowOnError, TResponseStyle>;\n\ntype SseFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'>,\n) => Promise<ServerSentEventsResult<TData, TError>>;\n\ntype RequestFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'> &\n    Pick<Required<RequestOptions<TData, TResponseStyle, ThrowOnError>>, 'method'>,\n) => RequestResult<TData, TError, ThrowOnError, TResponseStyle>;\n\ntype RequestOptionsFn = <\n  T,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: RequestOptions<T, TResponseStyle, ThrowOnError>,\n) => HttpRequest<T>;\n\ntype BuildUrlFn = <\n  TData extends {\n    body?: unknown;\n    path?: Record<string, unknown>;\n    query?: Record<string, unknown>;\n    url: string;\n  },\n>(\n  options: TData & Options<TData>,\n) => string;\n\nexport type Client = CoreClient<RequestFn, Config, MethodFn, BuildUrlFn, SseFn> & {\n  interceptors: Middleware<\n    HttpRequest<unknown>,\n    HttpResponse<unknown>,\n    unknown,\n    ResolvedRequestOptions\n  >;\n  requestOptions: RequestOptionsFn;\n};\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 = ClientOptions> = (\n  override?: Config<ClientOptions & T>,\n) => Config<Required<ClientOptions> & T>;\n\nexport interface TDataShape {\n  body?: unknown;\n  headers?: unknown;\n  path?: unknown;\n  query?: unknown;\n  url: string;\n}\n\ntype OmitKeys<T, K> = Pick<T, Exclude<keyof T, K>>;\n\nexport type Options<\n  TData extends TDataShape = TDataShape,\n  ThrowOnError extends boolean = boolean,\n  TResponse = unknown,\n  TResponseStyle extends ResponseStyle = 'fields',\n> = OmitKeys<\n  RequestOptions<TResponse, TResponseStyle, ThrowOnError>,\n  'body' | 'path' | 'query' | 'url'\n> &\n  ([TData] extends [never] ? unknown : Omit<TData, 'url'>);\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@angular/common/default/client/utils.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport { HttpHeaders } from '@angular/common/http';\n\nimport { getAuthToken } from '../core/auth.gen';\nimport type {\n  QuerySerializer,\n  QuerySerializerOptions,\n} from '../core/bodySerializer.gen';\nimport {\n  serializeArrayParam,\n  serializeObjectParam,\n  serializePrimitiveParam,\n} from '../core/pathSerializer.gen';\nimport type { Client, ClientOptions, Config, RequestOptions } from './types.gen';\n\ninterface PathSerializer {\n  path: Record<string, unknown>;\n  url: string;\n}\n\nconst PATH_PARAM_RE = /\\{[^{}]+\\}/g;\n\ntype ArrayStyle = 'form' | 'spaceDelimited' | 'pipeDelimited';\ntype MatrixStyle = 'label' | 'matrix' | 'simple';\ntype ArraySeparatorStyle = ArrayStyle | MatrixStyle;\n\nconst 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 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 = (\n  contentType: string | null,\n): 'blob' | 'formData' | 'json' | 'stream' | 'text' | undefined => {\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\nexport const setAuthParams = async (\n  options: Pick<Required<RequestOptions>, 'security'> &\n    Pick<RequestOptions, 'auth' | 'query'> & {\n      headers: HttpHeaders;\n    },\n) => {\n  for (const auth of options.security) {\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 = options.headers.append('Cookie', `${name}=${token}`);\n        break;\n      case 'header':\n      default:\n        options.headers = options.headers.set(name, token);\n        break;\n    }\n\n    return;\n  }\n};\n\nexport const buildUrl: Client['buildUrl'] = (options) => {\n  const url = 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  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 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\nexport const mergeHeaders = (\n  ...headers: Array<Required<Config>['headers'] | undefined>\n): HttpHeaders => {\n  let mergedHeaders = new HttpHeaders();\n\n  for (const header of headers) {\n    if (!header || typeof header !== 'object') {\n      continue;\n    }\n\n    if (header instanceof HttpHeaders) {\n      // Merge HttpHeaders instance\n      header.keys().forEach((key) => {\n        const values = header.getAll(key);\n        if (values) {\n          values.forEach((value) => {\n            mergedHeaders = mergedHeaders.append(key, value);\n          });\n        }\n      });\n    } else {\n      // Merge plain object headers\n      for (const [key, value] of Object.entries(header)) {\n        if (value === null) {\n          mergedHeaders = mergedHeaders.delete(key);\n        } else if (Array.isArray(value)) {\n          for (const v of value) {\n            mergedHeaders = 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 = mergedHeaders.set(\n            key,\n            typeof value === 'object' ? JSON.stringify(value) : (value as string),\n          );\n        }\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  headers: defaultHeaders,\n  querySerializer: defaultQuerySerializer,\n  ...override,\n});\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@angular/common/default/client.gen.ts",
    "content": "// 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: 'http://localhost:3000/base' }));\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@angular/common/default/core/auth.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@angular/common/default/core/bodySerializer.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@angular/common/default/core/params.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@angular/common/default/core/pathSerializer.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@angular/common/default/core/queryKeySerializer.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\n/**\n * JSON-friendly union that mirrors what Pinia Colada can hash.\n */\nexport type JsonValue =\n  | null\n  | string\n  | number\n  | boolean\n  | JsonValue[]\n  | { [key: string]: JsonValue };\n\n/**\n * Replacer that converts non-JSON values (bigint, Date, etc.) to safe substitutes.\n */\nexport const queryKeyJsonReplacer = (_key: string, value: unknown) => {\n  if (value === undefined || typeof value === 'function' || typeof value === 'symbol') {\n    return undefined;\n  }\n  if (typeof value === 'bigint') {\n    return value.toString();\n  }\n  if (value instanceof Date) {\n    return value.toISOString();\n  }\n  return value;\n};\n\n/**\n * Safely stringifies a value and parses it back into a JsonValue.\n */\nexport const stringifyToJsonValue = (input: unknown): JsonValue | undefined => {\n  try {\n    const json = JSON.stringify(input, queryKeyJsonReplacer);\n    if (json === undefined) {\n      return undefined;\n    }\n    return JSON.parse(json) as JsonValue;\n  } catch {\n    return undefined;\n  }\n};\n\n/**\n * Detects plain objects (including objects with a null prototype).\n */\nconst isPlainObject = (value: unknown): value is Record<string, unknown> => {\n  if (value === null || typeof value !== 'object') {\n    return false;\n  }\n  const prototype = Object.getPrototypeOf(value as object);\n  return prototype === Object.prototype || prototype === null;\n};\n\n/**\n * Turns URLSearchParams into a sorted JSON object for deterministic keys.\n */\nconst serializeSearchParams = (params: URLSearchParams): JsonValue => {\n  const entries = Array.from(params.entries()).sort(([a], [b]) => a.localeCompare(b));\n  const result: Record<string, JsonValue> = {};\n\n  for (const [key, value] of entries) {\n    const existing = result[key];\n    if (existing === undefined) {\n      result[key] = value;\n      continue;\n    }\n\n    if (Array.isArray(existing)) {\n      (existing as string[]).push(value);\n    } else {\n      result[key] = [existing, value];\n    }\n  }\n\n  return result;\n};\n\n/**\n * Normalizes any accepted value into a JSON-friendly shape for query keys.\n */\nexport const serializeQueryKeyValue = (value: unknown): JsonValue | undefined => {\n  if (value === null) {\n    return null;\n  }\n\n  if (typeof value === 'string' || typeof value === 'number' || typeof value === 'boolean') {\n    return value;\n  }\n\n  if (value === undefined || typeof value === 'function' || typeof value === 'symbol') {\n    return undefined;\n  }\n\n  if (typeof value === 'bigint') {\n    return value.toString();\n  }\n\n  if (value instanceof Date) {\n    return value.toISOString();\n  }\n\n  if (Array.isArray(value)) {\n    return stringifyToJsonValue(value);\n  }\n\n  if (typeof URLSearchParams !== 'undefined' && value instanceof URLSearchParams) {\n    return serializeSearchParams(value);\n  }\n\n  if (isPlainObject(value)) {\n    return stringifyToJsonValue(value);\n  }\n\n  return undefined;\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@angular/common/default/core/serverSentEvents.gen.ts",
    "content": "// 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 const 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            // Normalize line endings: CRLF -> LF, then CR -> LF\n            buffer = buffer.replace(/\\r\\n/g, '\\n').replace(/\\r/g, '\\n');\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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@angular/common/default/core/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { Auth, AuthToken } from './auth.gen';\nimport type { BodySerializer, QuerySerializer, QuerySerializerOptions } from './bodySerializer.gen';\n\nexport type HttpMethod =\n  | 'connect'\n  | 'delete'\n  | 'get'\n  | 'head'\n  | 'options'\n  | 'patch'\n  | 'post'\n  | 'put'\n  | 'trace';\n\nexport type Client<\n  RequestFn = never,\n  Config = unknown,\n  MethodFn = never,\n  BuildUrlFn = never,\n  SseFn = never,\n> = {\n  /**\n   * Returns the final request URL.\n   */\n  buildUrl: BuildUrlFn;\n  getConfig: () => Config;\n  request: RequestFn;\n  setConfig: (config: Config) => Config;\n} & {\n  [K in HttpMethod]: MethodFn;\n} & ([SseFn] extends [never] ? { sse?: never } : { sse: { [K in HttpMethod]: SseFn } });\n\nexport interface Config {\n  /**\n   * Auth token or a function returning auth token. The resolved value will be\n   * added to the request payload as defined by its `security` array.\n   */\n  auth?: ((auth: Auth) => Promise<AuthToken> | AuthToken) | AuthToken;\n  /**\n   * A function for serializing request body parameter. By default,\n   * {@link JSON.stringify()} will be used.\n   */\n  bodySerializer?: BodySerializer | null;\n  /**\n   * An object containing any HTTP headers that you want to pre-populate your\n   * `Headers` object with.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/Headers/Headers#init See more}\n   */\n  headers?:\n    | RequestInit['headers']\n    | Record<\n        string,\n        string | number | boolean | (string | number | boolean)[] | null | undefined | unknown\n      >;\n  /**\n   * The request method.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/fetch#method See more}\n   */\n  method?: Uppercase<HttpMethod>;\n  /**\n   * A function for serializing request query parameters. By default, arrays\n   * will be exploded in form style, objects will be exploded in deepObject\n   * style, and reserved characters are percent-encoded.\n   *\n   * This method will have no effect if the native `paramsSerializer()` Axios\n   * API function is used.\n   *\n   * {@link https://swagger.io/docs/specification/serialization/#query View examples}\n   */\n  querySerializer?: QuerySerializer | QuerySerializerOptions;\n  /**\n   * A function validating request data. This is useful if you want to ensure\n   * the request conforms to the desired shape, so it can be safely sent to\n   * the server.\n   */\n  requestValidator?: (data: unknown) => Promise<unknown>;\n  /**\n   * A function transforming response data before it's returned. This is useful\n   * for post-processing data, e.g. converting ISO strings into Date objects.\n   */\n  responseTransformer?: (data: unknown) => Promise<unknown>;\n  /**\n   * A function validating response data. This is useful if you want to ensure\n   * the response conforms to the desired shape, so it can be safely passed to\n   * the transformers and returned to the user.\n   */\n  responseValidator?: (data: unknown) => Promise<unknown>;\n}\n\ntype IsExactlyNeverOrNeverUndefined<T> = [T] extends [never]\n  ? true\n  : [T] extends [never | undefined]\n    ? [undefined] extends [T]\n      ? false\n      : true\n    : false;\n\nexport type OmitNever<T extends Record<string, unknown>> = {\n  [K in keyof T as IsExactlyNeverOrNeverUndefined<T[K]> extends true ? never : K]: T[K];\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@angular/common/default/core/utils.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@angular/common/default/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport { apiVVersionODataControllerCount, callToTestOrderOfParams, callWithDefaultOptionalParameters, callWithDefaultParameters, callWithDescriptions, callWithDuplicateResponses, callWithNoContentResponse, callWithParameters, callWithResponse, callWithResponseAndNoContentResponse, callWithResponses, callWithResultFromHeader, callWithWeirdParameterNames, collectionFormat, complexParams, complexTypes, deleteCallWithoutParametersAndResponse, deleteFoo, deprecatedCall, dummyA, dummyB, duplicateName, duplicateName2, duplicateName3, duplicateName4, export_, fileResponse, fooWow, getApiVbyApiVersionSimpleOperation, getCallWithOptionalParam, getCallWithoutParametersAndResponse, headCallWithoutParametersAndResponse, import_, multipartRequest, multipartResponse, nonAsciiæøåÆøÅöôêÊ字符串, type Options, optionsCallWithoutParametersAndResponse, patchApiVbyApiVersionNoTag, patchCallWithoutParametersAndResponse, postApiVbyApiVersionFormData, postApiVbyApiVersionRequestBody, postCallWithOptionalParam, postCallWithoutParametersAndResponse, putCallWithoutParametersAndResponse, putWithFormUrlEncoded, testErrorCode, types, uploadFile } from './sdk.gen';\nexport type { _3eNum1Период, _400, AdditionalPropertiesIntegerIssue, AdditionalPropertiesUnknownIssue, AdditionalPropertiesUnknownIssue2, AdditionalPropertiesUnknownIssue3, AdditionalPropertiesUnknownIssueWritable, AnyOfAnyAndNull, AnyOfArrays, ApiVVersionODataControllerCountData, ApiVVersionODataControllerCountResponse, ApiVVersionODataControllerCountResponses, ArrayWithAnyOfProperties, ArrayWithArray, ArrayWithBooleans, ArrayWithNumbers, ArrayWithProperties, ArrayWithReferences, ArrayWithStrings, CallToTestOrderOfParamsData, CallWithDefaultOptionalParametersData, CallWithDefaultParametersData, CallWithDescriptionsData, CallWithDuplicateResponsesData, CallWithDuplicateResponsesError, CallWithDuplicateResponsesErrors, CallWithDuplicateResponsesResponse, CallWithDuplicateResponsesResponses, CallWithNoContentResponseData, CallWithNoContentResponseResponse, CallWithNoContentResponseResponses, CallWithParametersData, CallWithResponseAndNoContentResponseData, CallWithResponseAndNoContentResponseResponse, CallWithResponseAndNoContentResponseResponses, CallWithResponseData, CallWithResponseResponse, CallWithResponseResponses, CallWithResponsesData, CallWithResponsesError, CallWithResponsesErrors, CallWithResponsesResponse, CallWithResponsesResponses, CallWithResultFromHeaderData, CallWithResultFromHeaderErrors, CallWithResultFromHeaderResponses, CallWithWeirdParameterNamesData, CamelCaseCommentWithBreaks, CharactersInDescription, ClientOptions, CollectionFormatData, CommentWithBackticks, CommentWithBackticksAndQuotes, CommentWithBreaks, CommentWithExpressionPlaceholders, CommentWithQuotes, CommentWithReservedCharacters, CommentWithSlashes, ComplexParamsData, ComplexParamsResponse, ComplexParamsResponses, ComplexTypesData, ComplexTypesErrors, ComplexTypesResponse, ComplexTypesResponses, CompositionBaseModel, CompositionExtendedModel, CompositionWithAllOfAndNullable, CompositionWithAnyOf, CompositionWithAnyOfAndNullable, CompositionWithAnyOfAnonymous, CompositionWithNestedAnyAndTypeNull, CompositionWithNestedAnyOfAndNull, CompositionWithOneOf, CompositionWithOneOfAndComplexArrayDictionary, CompositionWithOneOfAndNullable, CompositionWithOneOfAndProperties, CompositionWithOneOfAndSimpleArrayDictionary, CompositionWithOneOfAndSimpleDictionary, CompositionWithOneOfAnonymous, CompositionWithOneOfDiscriminator, ConstValue, Default, DeleteCallWithoutParametersAndResponseData, DeleteFooData, DeleteFooData2, DeleteFooData3, DeprecatedCallData, DeprecatedModel, DictionaryWithArray, DictionaryWithDictionary, DictionaryWithProperties, DictionaryWithPropertiesAndAdditionalProperties, DictionaryWithReference, DictionaryWithString, DummyAData, DummyAResponse, DummyAResponses, DummyBData, DummyBResponse, DummyBResponses, DuplicateName2Data, DuplicateName3Data, DuplicateName4Data, DuplicateNameData, EnumFromDescription, EnumWithExtensions, EnumWithNumbers, EnumWithReplacedCharacters, EnumWithStrings, EnumWithXEnumNames, ExportData, ExternalRefA, ExternalRefB, ExternalSharedModel, File, FileResponseData, FileResponseResponse, FileResponseResponses, FileWritable, FooWowData, FooWowResponses, FreeFormObjectWithAdditionalPropertiesEqEmptyObject, FreeFormObjectWithAdditionalPropertiesEqTrue, FreeFormObjectWithoutAdditionalProperties, GenericSchemaDuplicateIssue1SystemBoolean, GenericSchemaDuplicateIssue1SystemBooleanWritable, GenericSchemaDuplicateIssue1SystemString, GenericSchemaDuplicateIssue1SystemStringWritable, GetApiVbyApiVersionSimpleOperationData, GetApiVbyApiVersionSimpleOperationError, GetApiVbyApiVersionSimpleOperationErrors, GetApiVbyApiVersionSimpleOperationResponse, GetApiVbyApiVersionSimpleOperationResponses, GetCallWithOptionalParamData, GetCallWithoutParametersAndResponseData, HeadCallWithoutParametersAndResponseData, Import, ImportData, ImportResponse, ImportResponses, IoK8sApimachineryPkgApisMetaV1DeleteOptions, IoK8sApimachineryPkgApisMetaV1Preconditions, ModelCircle, ModelFromZendesk, ModelSquare, ModelThatExtends, ModelThatExtendsExtends, ModelWithAdditionalPropertiesEqTrue, ModelWithAdditionalPropertiesRef, ModelWithAnyOfConstantSizeArray, ModelWithAnyOfConstantSizeArrayAndIntersect, ModelWithAnyOfConstantSizeArrayNullable, ModelWithAnyOfConstantSizeArrayWithNSizeAndOptions, ModelWithAnyOfConstantSizeArrayWithNSizeAndOptionsWritable, ModelWithArray, ModelWithArrayReadOnlyAndWriteOnly, ModelWithArrayReadOnlyAndWriteOnlyWritable, ModelWithBackticksInDescription, ModelWithBoolean, ModelWithCircularReference, ModelWithConst, ModelWithConstantSizeArray, ModelWithDictionary, ModelWithDuplicateImports, ModelWithDuplicateProperties, ModelWithEnum, ModelWithEnumFromDescription, ModelWithEnumWithHyphen, ModelWithInteger, ModelWithNestedArrayEnums, ModelWithNestedArrayEnumsData, ModelWithNestedArrayEnumsDataBar, ModelWithNestedArrayEnumsDataFoo, ModelWithNestedCompositionEnums, ModelWithNestedEnums, ModelWithNestedProperties, ModelWithNullableObject, ModelWithNullableString, ModelWithNumericEnumUnion, ModelWithOneOfAndProperties, ModelWithOneOfEnum, ModelWithOrderedProperties, ModelWithPattern, ModelWithPatternWritable, ModelWithPrefixItemsConstantSizeArray, ModelWithProperties, ModelWithPropertiesWritable, ModelWithReadOnlyAndWriteOnly, ModelWithReadOnlyAndWriteOnlyWritable, ModelWithReference, ModelWithReferenceWritable, ModelWithString, ModelWithStringError, MultipartRequestData, MultipartResponseData, MultipartResponseResponse, MultipartResponseResponses, NestedAnyOfArraysNullable, NonAsciiæøåÆøÅöôêÊ字符串Data, NonAsciiæøåÆøÅöôêÊ字符串Response, NonAsciiæøåÆøÅöôêÊ字符串Responses, NonAsciiStringæøåÆøÅöôêÊ字符串, NullableObject, OneOfAllOfIssue, OneOfAllOfIssueWritable, OptionsCallWithoutParametersAndResponseData, Pageable, ParameterSimpleParameterUnused, PatchApiVbyApiVersionNoTagData, PatchApiVbyApiVersionNoTagResponses, PatchCallWithoutParametersAndResponseData, PostApiVbyApiVersionFormDataData, PostApiVbyApiVersionRequestBodyData, PostCallWithOptionalParamData, PostCallWithOptionalParamResponse, PostCallWithOptionalParamResponses, PostCallWithoutParametersAndResponseData, PostServiceWithEmptyTagResponse, PostServiceWithEmptyTagResponse2, PutCallWithoutParametersAndResponseData, PutWithFormUrlEncodedData, SchemaWithFormRestrictedKeys, SimpleBoolean, SimpleFile, SimpleFormData, SimpleInteger, SimpleParameter, SimpleReference, SimpleRequestBody, SimpleString, SimpleStringWithPattern, TestErrorCodeData, TestErrorCodeErrors, TestErrorCodeResponses, TypesData, TypesResponse, TypesResponses, UploadFileData, UploadFileResponse, UploadFileResponses, XFooBar } from './types.gen';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@angular/common/default/sdk.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport { type Client, formDataBodySerializer, type Options as Options2, type TDataShape, urlSearchParamsBodySerializer } from './client';\nimport { client } from './client.gen';\nimport type { ApiVVersionODataControllerCountData, ApiVVersionODataControllerCountResponses, CallToTestOrderOfParamsData, CallWithDefaultOptionalParametersData, CallWithDefaultParametersData, CallWithDescriptionsData, CallWithDuplicateResponsesData, CallWithDuplicateResponsesErrors, CallWithDuplicateResponsesResponses, CallWithNoContentResponseData, CallWithNoContentResponseResponses, CallWithParametersData, CallWithResponseAndNoContentResponseData, CallWithResponseAndNoContentResponseResponses, CallWithResponseData, CallWithResponseResponses, CallWithResponsesData, CallWithResponsesErrors, CallWithResponsesResponses, CallWithResultFromHeaderData, CallWithResultFromHeaderErrors, CallWithResultFromHeaderResponses, CallWithWeirdParameterNamesData, CollectionFormatData, ComplexParamsData, ComplexParamsResponses, ComplexTypesData, ComplexTypesErrors, ComplexTypesResponses, DeleteCallWithoutParametersAndResponseData, DeleteFooData3, DeprecatedCallData, DummyAData, DummyAResponses, DummyBData, DummyBResponses, DuplicateName2Data, DuplicateName3Data, DuplicateName4Data, DuplicateNameData, ExportData, FileResponseData, FileResponseResponses, FooWowData, FooWowResponses, GetApiVbyApiVersionSimpleOperationData, GetApiVbyApiVersionSimpleOperationErrors, GetApiVbyApiVersionSimpleOperationResponses, GetCallWithOptionalParamData, GetCallWithoutParametersAndResponseData, HeadCallWithoutParametersAndResponseData, ImportData, ImportResponses, MultipartRequestData, MultipartResponseData, MultipartResponseResponses, NonAsciiæøåÆøÅöôêÊ字符串Data, NonAsciiæøåÆøÅöôêÊ字符串Responses, OptionsCallWithoutParametersAndResponseData, PatchApiVbyApiVersionNoTagData, PatchApiVbyApiVersionNoTagResponses, PatchCallWithoutParametersAndResponseData, PostApiVbyApiVersionFormDataData, PostApiVbyApiVersionRequestBodyData, PostCallWithOptionalParamData, PostCallWithOptionalParamResponses, PostCallWithoutParametersAndResponseData, PutCallWithoutParametersAndResponseData, PutWithFormUrlEncodedData, TestErrorCodeData, TestErrorCodeErrors, TestErrorCodeResponses, TypesData, TypesResponses, UploadFileData, UploadFileResponses } from './types.gen';\n\nexport type Options<TData extends TDataShape = TDataShape, ThrowOnError extends boolean = boolean> = Options2<TData, ThrowOnError> & {\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\nexport const export_ = <ThrowOnError extends boolean = false>(options?: Options<ExportData, ThrowOnError>) => (options?.client ?? client).get<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/no+tag', ...options });\n\nexport const patchApiVbyApiVersionNoTag = <ThrowOnError extends boolean = false>(options?: Options<PatchApiVbyApiVersionNoTagData, ThrowOnError>) => (options?.client ?? client).patch<PatchApiVbyApiVersionNoTagResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/no+tag', ...options });\n\nexport const import_ = <ThrowOnError extends boolean = false>(options: Options<ImportData, ThrowOnError>) => (options.client ?? client).post<ImportResponses, unknown, ThrowOnError>({\n    url: '/api/v{api-version}/no+tag',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options.headers\n    }\n});\n\nexport const fooWow = <ThrowOnError extends boolean = false>(options?: Options<FooWowData, ThrowOnError>) => (options?.client ?? client).put<FooWowResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/no+tag', ...options });\n\nexport const apiVVersionODataControllerCount = <ThrowOnError extends boolean = false>(options?: Options<ApiVVersionODataControllerCountData, ThrowOnError>) => (options?.client ?? client).get<ApiVVersionODataControllerCountResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple/$count', ...options });\n\nexport const getApiVbyApiVersionSimpleOperation = <ThrowOnError extends boolean = false>(options: Options<GetApiVbyApiVersionSimpleOperationData, ThrowOnError>) => (options.client ?? client).get<GetApiVbyApiVersionSimpleOperationResponses, GetApiVbyApiVersionSimpleOperationErrors, ThrowOnError>({ url: '/api/v{api-version}/simple:operation', ...options });\n\nexport const deleteCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<DeleteCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).delete<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const getCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<GetCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).get<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const headCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<HeadCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).head<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const optionsCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<OptionsCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).options<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const patchCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<PatchCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).patch<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const postCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<PostCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).post<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const putCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<PutCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).put<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const deleteFoo = <ThrowOnError extends boolean = false>(options: Options<DeleteFooData3, ThrowOnError>) => (options.client ?? client).delete<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/foo/{foo_param}/bar/{BarParam}', ...options });\n\nexport const callWithDescriptions = <ThrowOnError extends boolean = false>(options?: Options<CallWithDescriptionsData, ThrowOnError>) => (options?.client ?? client).post<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/descriptions', ...options });\n\n/**\n * @deprecated\n */\nexport const deprecatedCall = <ThrowOnError extends boolean = false>(options: Options<DeprecatedCallData, ThrowOnError>) => (options.client ?? client).post<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/parameters/deprecated', ...options });\n\nexport const callWithParameters = <ThrowOnError extends boolean = false>(options: Options<CallWithParametersData, ThrowOnError>) => (options.client ?? client).post<unknown, unknown, ThrowOnError>({\n    url: '/api/v{api-version}/parameters/{parameterPath}',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options.headers\n    }\n});\n\nexport const callWithWeirdParameterNames = <ThrowOnError extends boolean = false>(options: Options<CallWithWeirdParameterNamesData, ThrowOnError>) => (options.client ?? client).post<unknown, unknown, ThrowOnError>({\n    url: '/api/v{api-version}/parameters/{parameter.path.1}/{parameter-path-2}/{PARAMETER-PATH-3}',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options.headers\n    }\n});\n\nexport const getCallWithOptionalParam = <ThrowOnError extends boolean = false>(options: Options<GetCallWithOptionalParamData, ThrowOnError>) => (options.client ?? client).get<unknown, unknown, ThrowOnError>({\n    url: '/api/v{api-version}/parameters',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options.headers\n    }\n});\n\nexport const postCallWithOptionalParam = <ThrowOnError extends boolean = false>(options: Options<PostCallWithOptionalParamData, ThrowOnError>) => (options.client ?? client).post<PostCallWithOptionalParamResponses, unknown, ThrowOnError>({\n    url: '/api/v{api-version}/parameters',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options.headers\n    }\n});\n\nexport const postApiVbyApiVersionRequestBody = <ThrowOnError extends boolean = false>(options?: Options<PostApiVbyApiVersionRequestBodyData, ThrowOnError>) => (options?.client ?? client).post<unknown, unknown, ThrowOnError>({\n    url: '/api/v{api-version}/requestBody',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options?.headers\n    }\n});\n\nexport const postApiVbyApiVersionFormData = <ThrowOnError extends boolean = false>(options?: Options<PostApiVbyApiVersionFormDataData, ThrowOnError>) => (options?.client ?? client).post<unknown, unknown, ThrowOnError>({\n    ...formDataBodySerializer,\n    url: '/api/v{api-version}/formData',\n    ...options,\n    headers: {\n        'Content-Type': null,\n        ...options?.headers\n    }\n});\n\nexport const callWithDefaultParameters = <ThrowOnError extends boolean = false>(options?: Options<CallWithDefaultParametersData, ThrowOnError>) => (options?.client ?? client).get<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/defaults', ...options });\n\nexport const callWithDefaultOptionalParameters = <ThrowOnError extends boolean = false>(options?: Options<CallWithDefaultOptionalParametersData, ThrowOnError>) => (options?.client ?? client).post<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/defaults', ...options });\n\nexport const callToTestOrderOfParams = <ThrowOnError extends boolean = false>(options: Options<CallToTestOrderOfParamsData, ThrowOnError>) => (options.client ?? client).put<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/defaults', ...options });\n\nexport const duplicateName = <ThrowOnError extends boolean = false>(options?: Options<DuplicateNameData, ThrowOnError>) => (options?.client ?? client).delete<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/duplicate', ...options });\n\nexport const duplicateName2 = <ThrowOnError extends boolean = false>(options?: Options<DuplicateName2Data, ThrowOnError>) => (options?.client ?? client).get<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/duplicate', ...options });\n\nexport const duplicateName3 = <ThrowOnError extends boolean = false>(options?: Options<DuplicateName3Data, ThrowOnError>) => (options?.client ?? client).post<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/duplicate', ...options });\n\nexport const duplicateName4 = <ThrowOnError extends boolean = false>(options?: Options<DuplicateName4Data, ThrowOnError>) => (options?.client ?? client).put<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/duplicate', ...options });\n\nexport const callWithNoContentResponse = <ThrowOnError extends boolean = false>(options?: Options<CallWithNoContentResponseData, ThrowOnError>) => (options?.client ?? client).get<CallWithNoContentResponseResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/no-content', ...options });\n\nexport const callWithResponseAndNoContentResponse = <ThrowOnError extends boolean = false>(options?: Options<CallWithResponseAndNoContentResponseData, ThrowOnError>) => (options?.client ?? client).get<CallWithResponseAndNoContentResponseResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/multiple-tags/response-and-no-content', ...options });\n\nexport const dummyA = <ThrowOnError extends boolean = false>(options?: Options<DummyAData, ThrowOnError>) => (options?.client ?? client).get<DummyAResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/multiple-tags/a', ...options });\n\nexport const dummyB = <ThrowOnError extends boolean = false>(options?: Options<DummyBData, ThrowOnError>) => (options?.client ?? client).get<DummyBResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/multiple-tags/b', ...options });\n\nexport const callWithResponse = <ThrowOnError extends boolean = false>(options?: Options<CallWithResponseData, ThrowOnError>) => (options?.client ?? client).get<CallWithResponseResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/response', ...options });\n\nexport const callWithDuplicateResponses = <ThrowOnError extends boolean = false>(options?: Options<CallWithDuplicateResponsesData, ThrowOnError>) => (options?.client ?? client).post<CallWithDuplicateResponsesResponses, CallWithDuplicateResponsesErrors, ThrowOnError>({ url: '/api/v{api-version}/response', ...options });\n\nexport const callWithResponses = <ThrowOnError extends boolean = false>(options?: Options<CallWithResponsesData, ThrowOnError>) => (options?.client ?? client).put<CallWithResponsesResponses, CallWithResponsesErrors, ThrowOnError>({ url: '/api/v{api-version}/response', ...options });\n\nexport const collectionFormat = <ThrowOnError extends boolean = false>(options: Options<CollectionFormatData, ThrowOnError>) => (options.client ?? client).get<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/collectionFormat', ...options });\n\nexport const types = <ThrowOnError extends boolean = false>(options: Options<TypesData, ThrowOnError>) => (options.client ?? client).get<TypesResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/types', ...options });\n\nexport const uploadFile = <ThrowOnError extends boolean = false>(options: Options<UploadFileData, ThrowOnError>) => (options.client ?? client).post<UploadFileResponses, unknown, ThrowOnError>({\n    ...urlSearchParamsBodySerializer,\n    url: '/api/v{api-version}/upload',\n    ...options,\n    headers: {\n        'Content-Type': 'application/x-www-form-urlencoded',\n        ...options.headers\n    }\n});\n\nexport const fileResponse = <ThrowOnError extends boolean = false>(options: Options<FileResponseData, ThrowOnError>) => (options.client ?? client).get<FileResponseResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/file/{id}', ...options });\n\nexport const complexTypes = <ThrowOnError extends boolean = false>(options: Options<ComplexTypesData, ThrowOnError>) => (options.client ?? client).get<ComplexTypesResponses, ComplexTypesErrors, ThrowOnError>({\n    querySerializer: { parameters: { parameterObject: { object: { style: 'form' } } } },\n    url: '/api/v{api-version}/complex',\n    ...options\n});\n\nexport const multipartResponse = <ThrowOnError extends boolean = false>(options?: Options<MultipartResponseData, ThrowOnError>) => (options?.client ?? client).get<MultipartResponseResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/multipart', ...options });\n\nexport const multipartRequest = <ThrowOnError extends boolean = false>(options?: Options<MultipartRequestData, ThrowOnError>) => (options?.client ?? client).post<unknown, unknown, ThrowOnError>({\n    ...formDataBodySerializer,\n    url: '/api/v{api-version}/multipart',\n    ...options,\n    headers: {\n        'Content-Type': null,\n        ...options?.headers\n    }\n});\n\nexport const complexParams = <ThrowOnError extends boolean = false>(options: Options<ComplexParamsData, ThrowOnError>) => (options.client ?? client).put<ComplexParamsResponses, unknown, ThrowOnError>({\n    url: '/api/v{api-version}/complex/{id}',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json-patch+json',\n        ...options.headers\n    }\n});\n\nexport const callWithResultFromHeader = <ThrowOnError extends boolean = false>(options?: Options<CallWithResultFromHeaderData, ThrowOnError>) => (options?.client ?? client).post<CallWithResultFromHeaderResponses, CallWithResultFromHeaderErrors, ThrowOnError>({ url: '/api/v{api-version}/header', ...options });\n\nexport const testErrorCode = <ThrowOnError extends boolean = false>(options: Options<TestErrorCodeData, ThrowOnError>) => (options.client ?? client).post<TestErrorCodeResponses, TestErrorCodeErrors, ThrowOnError>({ url: '/api/v{api-version}/error', ...options });\n\nexport const nonAsciiæøåÆøÅöôêÊ字符串 = <ThrowOnError extends boolean = false>(options: Options<NonAsciiæøåÆøÅöôêÊ字符串Data, ThrowOnError>) => (options.client ?? client).post<NonAsciiæøåÆøÅöôêÊ字符串Responses, unknown, ThrowOnError>({ url: '/api/v{api-version}/non-ascii-æøåÆØÅöôêÊ字符串', ...options });\n\n/**\n * Login User\n */\nexport const putWithFormUrlEncoded = <ThrowOnError extends boolean = false>(options: Options<PutWithFormUrlEncodedData, ThrowOnError>) => (options.client ?? client).put<unknown, unknown, ThrowOnError>({\n    ...urlSearchParamsBodySerializer,\n    url: '/api/v{api-version}/non-ascii-æøåÆØÅöôêÊ字符串',\n    ...options,\n    headers: {\n        'Content-Type': 'application/x-www-form-urlencoded',\n        ...options.headers\n    }\n});\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@angular/common/default/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type ClientOptions = {\n    baseUrl: 'http://localhost:3000/base' | (string & {});\n};\n\n/**\n * Model with number-only name\n */\nexport type _400 = string;\n\n/**\n * External ref to shared model (A)\n */\nexport type ExternalRefA = ExternalSharedModel;\n\n/**\n * External ref to shared model (B)\n */\nexport type ExternalRefB = ExternalSharedModel;\n\n/**\n * Testing multiline comments in string: First line\n * Second line\n *\n * Fourth line\n */\nexport type CamelCaseCommentWithBreaks = number;\n\n/**\n * Testing multiline comments in string: First line\n * Second line\n *\n * Fourth line\n */\nexport type CommentWithBreaks = number;\n\n/**\n * Testing backticks in string: `backticks` and ```multiple backticks``` should work\n */\nexport type CommentWithBackticks = number;\n\n/**\n * Testing backticks and quotes in string: `backticks`, 'quotes', \"double quotes\" and ```multiple backticks``` should work\n */\nexport type CommentWithBackticksAndQuotes = number;\n\n/**\n * Testing slashes in string: \\backwards\\\\\\ and /forwards/// should work\n */\nexport type CommentWithSlashes = number;\n\n/**\n * Testing expression placeholders in string: ${expression} should work\n */\nexport type CommentWithExpressionPlaceholders = number;\n\n/**\n * Testing quotes in string: 'single quote''' and \"double quotes\"\"\" should work\n */\nexport type CommentWithQuotes = number;\n\n/**\n * Testing reserved characters in string: * inline * and ** inline ** should work\n */\nexport type CommentWithReservedCharacters = number;\n\n/**\n * This is a simple number\n */\nexport type SimpleInteger = number;\n\n/**\n * This is a simple boolean\n */\nexport type SimpleBoolean = boolean;\n\n/**\n * This is a simple string\n */\nexport type SimpleString = string;\n\n/**\n * A string with non-ascii (unicode) characters valid in typescript identifiers (æøåÆØÅöÔèÈ字符串)\n */\nexport type NonAsciiStringæøåÆøÅöôêÊ字符串 = string;\n\n/**\n * This is a simple file\n */\nexport type SimpleFile = Blob | File;\n\n/**\n * This is a simple reference\n */\nexport type SimpleReference = ModelWithString;\n\n/**\n * This is a simple string\n */\nexport type SimpleStringWithPattern = string | null;\n\n/**\n * This is a simple enum with strings\n */\nexport type EnumWithStrings = 'Success' | 'Warning' | 'Error' | '\\'Single Quote\\'' | '\"Double Quotes\"' | 'Non-ascii: øæåôöØÆÅÔÖ字符串';\n\nexport type EnumWithReplacedCharacters = '\\'Single Quote\\'' | '\"Double Quotes\"' | 'øæåôöØÆÅÔÖ字符串' | 3.1 | '';\n\n/**\n * This is a simple enum with numbers\n */\nexport type EnumWithNumbers = 1 | 2 | 3 | 1.1 | 1.2 | 1.3 | 100 | 200 | 300 | -100 | -200 | -300 | -1.1 | -1.2 | -1.3;\n\n/**\n * Success=1,Warning=2,Error=3\n */\nexport type EnumFromDescription = number;\n\n/**\n * This is a simple enum with numbers\n */\nexport type EnumWithExtensions = 200 | 400 | 500;\n\nexport type EnumWithXEnumNames = 0 | 1 | 2;\n\n/**\n * This is a simple array with numbers\n */\nexport type ArrayWithNumbers = Array<number>;\n\n/**\n * This is a simple array with booleans\n */\nexport type ArrayWithBooleans = Array<boolean>;\n\n/**\n * This is a simple array with strings\n */\nexport type ArrayWithStrings = Array<string>;\n\n/**\n * This is a simple array with references\n */\nexport type ArrayWithReferences = Array<ModelWithString>;\n\n/**\n * This is a simple array containing an array\n */\nexport type ArrayWithArray = Array<Array<ModelWithString>>;\n\n/**\n * This is a simple array with properties\n */\nexport type ArrayWithProperties = Array<{\n    '16x16'?: CamelCaseCommentWithBreaks;\n    bar?: string;\n}>;\n\n/**\n * This is a simple array with any of properties\n */\nexport type ArrayWithAnyOfProperties = Array<{\n    foo?: string;\n} | {\n    bar?: string;\n}>;\n\nexport type AnyOfAnyAndNull = {\n    data?: unknown | null;\n};\n\n/**\n * This is a simple array with any of properties\n */\nexport type AnyOfArrays = {\n    results?: Array<{\n        foo?: string;\n    } | {\n        bar?: string;\n    }>;\n};\n\n/**\n * This is a string dictionary\n */\nexport type DictionaryWithString = {\n    [key: string]: string;\n};\n\nexport type DictionaryWithPropertiesAndAdditionalProperties = {\n    foo?: number;\n    bar?: boolean;\n    [key: string]: string | number | boolean | undefined;\n};\n\n/**\n * This is a string reference\n */\nexport type DictionaryWithReference = {\n    [key: string]: ModelWithString;\n};\n\n/**\n * This is a complex dictionary\n */\nexport type DictionaryWithArray = {\n    [key: string]: Array<ModelWithString>;\n};\n\n/**\n * This is a string dictionary\n */\nexport type DictionaryWithDictionary = {\n    [key: string]: {\n        [key: string]: string;\n    };\n};\n\n/**\n * This is a complex dictionary\n */\nexport type DictionaryWithProperties = {\n    [key: string]: {\n        foo?: string;\n        bar?: string;\n    };\n};\n\n/**\n * This is a model with one number property\n */\nexport type ModelWithInteger = {\n    /**\n     * This is a simple number property\n     */\n    prop?: number;\n};\n\n/**\n * This is a model with one boolean property\n */\nexport type ModelWithBoolean = {\n    /**\n     * This is a simple boolean property\n     */\n    prop?: boolean;\n};\n\n/**\n * This is a model with one string property\n */\nexport type ModelWithString = {\n    /**\n     * This is a simple string property\n     */\n    prop?: string;\n};\n\n/**\n * This is a model with one string property\n */\nexport type ModelWithStringError = {\n    /**\n     * This is a simple string property\n     */\n    prop?: string;\n};\n\n/**\n * `Comment` or `VoiceComment`. The JSON object for adding voice comments to tickets is different. See [Adding voice comments to tickets](/documentation/ticketing/managing-tickets/adding-voice-comments-to-tickets)\n */\nexport type ModelFromZendesk = string;\n\n/**\n * This is a model with one string property\n */\nexport type ModelWithNullableString = {\n    /**\n     * This is a simple string property\n     */\n    nullableProp1?: string | null;\n    /**\n     * This is a simple string property\n     */\n    nullableRequiredProp1: string | null;\n    /**\n     * This is a simple string property\n     */\n    nullableProp2?: string | null;\n    /**\n     * This is a simple string property\n     */\n    nullableRequiredProp2: string | null;\n    /**\n     * This is a simple enum with strings\n     */\n    'foo_bar-enum'?: 'Success' | 'Warning' | 'Error' | 'ØÆÅ字符串';\n};\n\n/**\n * This is a model with one enum\n */\nexport type ModelWithEnum = {\n    /**\n     * This is a simple enum with strings\n     */\n    'foo_bar-enum'?: 'Success' | 'Warning' | 'Error' | 'ØÆÅ字符串';\n    /**\n     * These are the HTTP error code enums\n     */\n    statusCode?: '100' | '200 FOO' | '300 FOO_BAR' | '400 foo-bar' | '500 foo.bar' | '600 foo&bar';\n    /**\n     * Simple boolean enum\n     */\n    bool?: true;\n};\n\n/**\n * This is a model with one enum with escaped name\n */\nexport type ModelWithEnumWithHyphen = {\n    /**\n     * Foo-Bar-Baz-Qux\n     */\n    'foo-bar-baz-qux'?: '3.0';\n};\n\n/**\n * This is a model with one enum\n */\nexport type ModelWithEnumFromDescription = {\n    /**\n     * Success=1,Warning=2,Error=3\n     */\n    test?: number;\n};\n\n/**\n * This is a model with nested enums\n */\nexport type ModelWithNestedEnums = {\n    dictionaryWithEnum?: {\n        [key: string]: 'Success' | 'Warning' | 'Error';\n    };\n    dictionaryWithEnumFromDescription?: {\n        [key: string]: number;\n    };\n    arrayWithEnum?: Array<'Success' | 'Warning' | 'Error'>;\n    arrayWithDescription?: Array<number>;\n    /**\n     * This is a simple enum with strings\n     */\n    'foo_bar-enum'?: 'Success' | 'Warning' | 'Error' | 'ØÆÅ字符串';\n};\n\n/**\n * This is a model with one property containing a reference\n */\nexport type ModelWithReference = {\n    prop?: ModelWithProperties;\n};\n\n/**\n * This is a model with one property containing an array\n */\nexport type ModelWithArrayReadOnlyAndWriteOnly = {\n    prop?: Array<ModelWithReadOnlyAndWriteOnly>;\n    propWithFile?: Array<Blob | File>;\n    propWithNumber?: Array<number>;\n};\n\n/**\n * This is a model with one property containing an array\n */\nexport type ModelWithArray = {\n    prop?: Array<ModelWithString>;\n    propWithFile?: Array<Blob | File>;\n    propWithNumber?: Array<number>;\n};\n\n/**\n * This is a model with one property containing a dictionary\n */\nexport type ModelWithDictionary = {\n    prop?: {\n        [key: string]: string;\n    };\n};\n\n/**\n * This is a deprecated model with a deprecated property\n *\n * @deprecated\n */\nexport type DeprecatedModel = {\n    /**\n     * This is a deprecated property\n     *\n     * @deprecated\n     */\n    prop?: string;\n};\n\n/**\n * This is a model with one property containing a circular reference\n */\nexport type ModelWithCircularReference = {\n    prop?: ModelWithCircularReference;\n};\n\n/**\n * This is a model with one property with a 'one of' relationship\n */\nexport type CompositionWithOneOf = {\n    propA?: ModelWithString | ModelWithEnum | ModelWithArray | ModelWithDictionary;\n};\n\n/**\n * This is a model with one property with a 'one of' relationship where the options are not $ref\n */\nexport type CompositionWithOneOfAnonymous = {\n    propA?: {\n        propA?: string;\n    } | string | number;\n};\n\n/**\n * Circle\n */\nexport type ModelCircle = {\n    kind: string;\n    radius?: number;\n};\n\n/**\n * Square\n */\nexport type ModelSquare = {\n    kind: string;\n    sideLength?: number;\n};\n\n/**\n * This is a model with one property with a 'one of' relationship where the options are not $ref\n */\nexport type CompositionWithOneOfDiscriminator = ({\n    kind: 'circle';\n} & ModelCircle) | ({\n    kind: 'square';\n} & ModelSquare);\n\n/**\n * This is a model with one property with a 'any of' relationship\n */\nexport type CompositionWithAnyOf = {\n    propA?: ModelWithString | ModelWithEnum | ModelWithArray | ModelWithDictionary;\n};\n\n/**\n * This is a model with one property with a 'any of' relationship where the options are not $ref\n */\nexport type CompositionWithAnyOfAnonymous = {\n    propA?: {\n        propA?: string;\n    } | string | number;\n};\n\n/**\n * This is a model with nested 'any of' property with a type null\n */\nexport type CompositionWithNestedAnyAndTypeNull = {\n    propA?: Array<ModelWithDictionary | null> | Array<ModelWithArray | null>;\n};\n\nexport type _3eNum1Период = 'Bird' | 'Dog';\n\nexport type ConstValue = 'ConstValue';\n\n/**\n * This is a model with one property with a 'any of' relationship where the options are not $ref\n */\nexport type CompositionWithNestedAnyOfAndNull = {\n    /**\n     * Scopes\n     */\n    propA?: Array<_3eNum1Период | ConstValue> | null;\n};\n\n/**\n * This is a model with one property with a 'one of' relationship\n */\nexport type CompositionWithOneOfAndNullable = {\n    propA?: {\n        boolean?: boolean;\n    } | ModelWithEnum | ModelWithArray | ModelWithDictionary | null;\n};\n\n/**\n * This is a model that contains a simple dictionary within composition\n */\nexport type CompositionWithOneOfAndSimpleDictionary = {\n    propA?: boolean | {\n        [key: string]: number;\n    };\n};\n\n/**\n * This is a model that contains a dictionary of simple arrays within composition\n */\nexport type CompositionWithOneOfAndSimpleArrayDictionary = {\n    propA?: boolean | {\n        [key: string]: Array<boolean>;\n    };\n};\n\n/**\n * This is a model that contains a dictionary of complex arrays (composited) within composition\n */\nexport type CompositionWithOneOfAndComplexArrayDictionary = {\n    propA?: boolean | {\n        [key: string]: Array<number | string>;\n    };\n};\n\n/**\n * This is a model with one property with a 'all of' relationship\n */\nexport type CompositionWithAllOfAndNullable = {\n    propA?: ({\n        boolean?: boolean;\n    } & ModelWithEnum & ModelWithArray & ModelWithDictionary) | null;\n};\n\n/**\n * This is a model with one property with a 'any of' relationship\n */\nexport type CompositionWithAnyOfAndNullable = {\n    propA?: {\n        boolean?: boolean;\n    } | ModelWithEnum | ModelWithArray | ModelWithDictionary | null;\n};\n\n/**\n * This is a base model with two simple optional properties\n */\nexport type CompositionBaseModel = {\n    firstName?: string;\n    lastname?: string;\n};\n\n/**\n * This is a model that extends the base model\n */\nexport type CompositionExtendedModel = CompositionBaseModel & {\n    age: number;\n    firstName: string;\n    lastname: string;\n};\n\n/**\n * This is a model with one nested property\n */\nexport type ModelWithProperties = {\n    required: string;\n    readonly requiredAndReadOnly: string;\n    requiredAndNullable: string | null;\n    string?: string;\n    number?: number;\n    boolean?: boolean;\n    reference?: ModelWithString;\n    'property with space'?: string;\n    default?: string;\n    try?: string;\n    readonly '@namespace.string'?: string;\n    readonly '@namespace.integer'?: number;\n};\n\n/**\n * This is a model with one nested property\n */\nexport type ModelWithNestedProperties = {\n    readonly first: {\n        readonly second: {\n            readonly third: string | null;\n        } | null;\n    } | null;\n};\n\n/**\n * This is a model with duplicated properties\n */\nexport type ModelWithDuplicateProperties = {\n    prop?: ModelWithString;\n};\n\n/**\n * This is a model with ordered properties\n */\nexport type ModelWithOrderedProperties = {\n    zebra?: string;\n    apple?: string;\n    hawaii?: string;\n};\n\n/**\n * This is a model with duplicated imports\n */\nexport type ModelWithDuplicateImports = {\n    propA?: ModelWithString;\n    propB?: ModelWithString;\n    propC?: ModelWithString;\n};\n\n/**\n * This is a model that extends another model\n */\nexport type ModelThatExtends = ModelWithString & {\n    propExtendsA?: string;\n    propExtendsB?: ModelWithString;\n};\n\n/**\n * This is a model that extends another model\n */\nexport type ModelThatExtendsExtends = ModelWithString & ModelThatExtends & {\n    propExtendsC?: string;\n    propExtendsD?: ModelWithString;\n};\n\n/**\n * This is a model that contains a some patterns\n */\nexport type ModelWithPattern = {\n    key: string;\n    name: string;\n    readonly enabled?: boolean;\n    readonly modified?: string;\n    id?: string;\n    text?: string;\n    patternWithSingleQuotes?: string;\n    patternWithNewline?: string;\n    patternWithBacktick?: string;\n    patternWithUnicode?: string;\n};\n\nexport type File = {\n    /**\n     * Id\n     */\n    readonly id?: string;\n    /**\n     * Updated at\n     */\n    readonly updated_at?: string;\n    /**\n     * Created at\n     */\n    readonly created_at?: string;\n    /**\n     * Mime\n     */\n    mime: string;\n    /**\n     * File\n     */\n    readonly file?: string;\n};\n\nexport type Default = {\n    name?: string;\n};\n\nexport type Pageable = {\n    page?: number;\n    size?: number;\n    sort?: Array<string>;\n};\n\n/**\n * This is a free-form object without additionalProperties.\n */\nexport type FreeFormObjectWithoutAdditionalProperties = {\n    [key: string]: unknown;\n};\n\n/**\n * This is a free-form object with additionalProperties: true.\n */\nexport type FreeFormObjectWithAdditionalPropertiesEqTrue = {\n    [key: string]: unknown;\n};\n\n/**\n * This is a free-form object with additionalProperties: {}.\n */\nexport type FreeFormObjectWithAdditionalPropertiesEqEmptyObject = {\n    [key: string]: unknown;\n};\n\nexport type ModelWithConst = {\n    String?: 'String';\n    number?: 0;\n    null?: null;\n    withType?: 'Some string';\n};\n\n/**\n * This is a model with one property and additionalProperties: true\n */\nexport type ModelWithAdditionalPropertiesEqTrue = {\n    /**\n     * This is a simple string property\n     */\n    prop?: string;\n    [key: string]: unknown;\n};\n\nexport type NestedAnyOfArraysNullable = {\n    nullableArray?: Array<string | boolean> | null;\n};\n\nexport type CompositionWithOneOfAndProperties = ({\n    foo: SimpleParameter;\n} | {\n    bar: NonAsciiStringæøåÆøÅöôêÊ字符串;\n}) & {\n    baz: number | null;\n    qux: number;\n};\n\n/**\n * An object that can be null\n */\nexport type NullableObject = {\n    foo?: string;\n} | null;\n\n/**\n * Some % character\n */\nexport type CharactersInDescription = string;\n\nexport type ModelWithNullableObject = {\n    data?: NullableObject;\n};\n\n/**\n * An object with additional properties that can be null (anyOf ref + null)\n */\nexport type ModelWithAdditionalPropertiesRef = {\n    [key: string]: NullableObject | null;\n};\n\nexport type ModelWithOneOfEnum = {\n    foo: 'Bar';\n} | {\n    foo: 'Baz';\n} | {\n    foo: 'Qux';\n} | {\n    content: string;\n    foo: 'Quux';\n} | {\n    content: [\n        string,\n        string\n    ];\n    foo: 'Corge';\n};\n\nexport type ModelWithNestedArrayEnumsDataFoo = 'foo' | 'bar';\n\nexport type ModelWithNestedArrayEnumsDataBar = 'baz' | 'qux';\n\nexport type ModelWithNestedArrayEnumsData = {\n    foo?: Array<ModelWithNestedArrayEnumsDataFoo>;\n    bar?: Array<ModelWithNestedArrayEnumsDataBar>;\n};\n\nexport type ModelWithNestedArrayEnums = {\n    array_strings?: Array<string>;\n    data?: ModelWithNestedArrayEnumsData;\n};\n\nexport type ModelWithNestedCompositionEnums = {\n    foo?: ModelWithNestedArrayEnumsDataFoo;\n};\n\nexport type ModelWithReadOnlyAndWriteOnly = {\n    foo: string;\n    readonly bar: string;\n};\n\nexport type ModelWithConstantSizeArray = [\n    number,\n    number\n];\n\nexport type ModelWithAnyOfConstantSizeArray = [\n    number | string,\n    number | string,\n    number | string\n];\n\nexport type ModelWithPrefixItemsConstantSizeArray = [\n    ModelWithInteger,\n    number | string,\n    string\n];\n\nexport type ModelWithAnyOfConstantSizeArrayNullable = [\n    number | null | string,\n    number | null | string,\n    number | null | string\n];\n\nexport type ModelWithAnyOfConstantSizeArrayWithNSizeAndOptions = [\n    number | Import,\n    number | Import\n];\n\nexport type ModelWithAnyOfConstantSizeArrayAndIntersect = [\n    number & string,\n    number & string\n];\n\nexport type ModelWithNumericEnumUnion = {\n    /**\n     * Период\n     */\n    value?: -10 | -1 | 0 | 1 | 3 | 6 | 12;\n};\n\n/**\n * Some description with `back ticks`\n */\nexport type ModelWithBackticksInDescription = {\n    /**\n     * The template `that` should be used for parsing and importing the contents of the CSV file.\n     *\n     * <br/><p>There is one placeholder currently supported:<ul>     <li><b>${x}</b> - refers to the n-th column in the CSV file, e.g. ${1}, ${2}, ...)</li></ul><p>Example of a correct JSON template:</p>\n     * <pre>\n     * [\n     * {\n     * \"resourceType\": \"Asset\",\n     * \"identifier\": {\n     * \"name\": \"${1}\",\n     * \"domain\": {\n     * \"name\": \"${2}\",\n     * \"community\": {\n     * \"name\": \"Some Community\"\n     * }\n     * }\n     * },\n     * \"attributes\" : {\n     * \"00000000-0000-0000-0000-000000003115\" : [ {\n     * \"value\" : \"${3}\"\n     * } ],\n     * \"00000000-0000-0000-0000-000000000222\" : [ {\n     * \"value\" : \"${4}\"\n     * } ]\n     * }\n     * }\n     * ]\n     * </pre>\n     */\n    template?: string;\n};\n\nexport type ModelWithOneOfAndProperties = (SimpleParameter | NonAsciiStringæøåÆøÅöôêÊ字符串) & {\n    baz: number | null;\n    qux: number;\n};\n\n/**\n * Model used to test deduplication strategy (unused)\n */\nexport type ParameterSimpleParameterUnused = string;\n\n/**\n * Model used to test deduplication strategy\n */\nexport type PostServiceWithEmptyTagResponse = string;\n\n/**\n * Model used to test deduplication strategy\n */\nexport type PostServiceWithEmptyTagResponse2 = string;\n\n/**\n * Model used to test deduplication strategy\n */\nexport type DeleteFooData = string;\n\n/**\n * Model used to test deduplication strategy\n */\nexport type DeleteFooData2 = string;\n\n/**\n * Model with restricted keyword name\n */\nexport type Import = string;\n\nexport type SchemaWithFormRestrictedKeys = {\n    description?: string;\n    'x-enum-descriptions'?: string;\n    'x-enum-varnames'?: string;\n    'x-enumNames'?: string;\n    title?: string;\n    object?: {\n        description?: string;\n        'x-enum-descriptions'?: string;\n        'x-enum-varnames'?: string;\n        'x-enumNames'?: string;\n        title?: string;\n    };\n    array?: Array<{\n        description?: string;\n        'x-enum-descriptions'?: string;\n        'x-enum-varnames'?: string;\n        'x-enumNames'?: string;\n        title?: string;\n    }>;\n};\n\n/**\n * This schema was giving PascalCase transformations a hard time\n */\nexport type IoK8sApimachineryPkgApisMetaV1DeleteOptions = {\n    /**\n     * Must be fulfilled before a deletion is carried out. If not possible, a 409 Conflict status will be returned.\n     */\n    preconditions?: IoK8sApimachineryPkgApisMetaV1Preconditions;\n};\n\n/**\n * This schema was giving PascalCase transformations a hard time\n */\nexport type IoK8sApimachineryPkgApisMetaV1Preconditions = {\n    /**\n     * Specifies the target ResourceVersion\n     */\n    resourceVersion?: string;\n    /**\n     * Specifies the target UID.\n     */\n    uid?: string;\n};\n\nexport type AdditionalPropertiesUnknownIssue = {\n    [key: string]: string | number;\n};\n\nexport type AdditionalPropertiesUnknownIssue2 = {\n    [key: string]: string | number;\n};\n\nexport type AdditionalPropertiesUnknownIssue3 = string & {\n    entries: {\n        [key: string]: AdditionalPropertiesUnknownIssue;\n    };\n};\n\nexport type AdditionalPropertiesIntegerIssue = {\n    value: number;\n    [key: string]: number;\n};\n\nexport type OneOfAllOfIssue = ((ConstValue | GenericSchemaDuplicateIssue1SystemBoolean) & _3eNum1Период) | GenericSchemaDuplicateIssue1SystemString;\n\nexport type GenericSchemaDuplicateIssue1SystemBoolean = {\n    item?: boolean;\n    error?: string | null;\n    readonly hasError?: boolean;\n    data?: {\n        [key: string]: never;\n    };\n};\n\nexport type GenericSchemaDuplicateIssue1SystemString = {\n    item?: string | null;\n    error?: string | null;\n    readonly hasError?: boolean;\n};\n\nexport type ExternalSharedModel = {\n    id: string;\n    name?: string;\n};\n\n/**\n * This is a model with one property containing a reference\n */\nexport type ModelWithReferenceWritable = {\n    prop?: ModelWithPropertiesWritable;\n};\n\n/**\n * This is a model with one property containing an array\n */\nexport type ModelWithArrayReadOnlyAndWriteOnlyWritable = {\n    prop?: Array<ModelWithReadOnlyAndWriteOnlyWritable>;\n    propWithFile?: Array<Blob | File>;\n    propWithNumber?: Array<number>;\n};\n\n/**\n * This is a model with one nested property\n */\nexport type ModelWithPropertiesWritable = {\n    required: string;\n    requiredAndNullable: string | null;\n    string?: string;\n    number?: number;\n    boolean?: boolean;\n    reference?: ModelWithString;\n    'property with space'?: string;\n    default?: string;\n    try?: string;\n};\n\n/**\n * This is a model that contains a some patterns\n */\nexport type ModelWithPatternWritable = {\n    key: string;\n    name: string;\n    id?: string;\n    text?: string;\n    patternWithSingleQuotes?: string;\n    patternWithNewline?: string;\n    patternWithBacktick?: string;\n    patternWithUnicode?: string;\n};\n\nexport type FileWritable = {\n    /**\n     * Mime\n     */\n    mime: string;\n};\n\nexport type ModelWithReadOnlyAndWriteOnlyWritable = {\n    foo: string;\n    baz: string;\n};\n\nexport type ModelWithAnyOfConstantSizeArrayWithNSizeAndOptionsWritable = [\n    number | Import,\n    number | Import\n];\n\nexport type AdditionalPropertiesUnknownIssueWritable = {\n    [key: string]: string | number;\n};\n\nexport type OneOfAllOfIssueWritable = ((ConstValue | GenericSchemaDuplicateIssue1SystemBoolean) & _3eNum1Период) | GenericSchemaDuplicateIssue1SystemString;\n\nexport type GenericSchemaDuplicateIssue1SystemBooleanWritable = {\n    item?: boolean;\n    error?: string | null;\n    data?: {\n        [key: string]: never;\n    };\n};\n\nexport type GenericSchemaDuplicateIssue1SystemStringWritable = {\n    item?: string | null;\n    error?: string | null;\n};\n\n/**\n * This is a reusable parameter\n */\nexport type SimpleParameter = string;\n\n/**\n * Parameter with illegal characters\n */\nexport type XFooBar = ModelWithString;\n\n/**\n * A reusable request body\n */\nexport type SimpleRequestBody = ModelWithString;\n\n/**\n * A reusable request body\n */\nexport type SimpleFormData = ModelWithString;\n\nexport type ExportData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no+tag';\n};\n\nexport type PatchApiVbyApiVersionNoTagData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no+tag';\n};\n\nexport type PatchApiVbyApiVersionNoTagResponses = {\n    /**\n     * OK\n     */\n    default: unknown;\n};\n\nexport type ImportData = {\n    body: ModelWithReadOnlyAndWriteOnlyWritable | ModelWithArrayReadOnlyAndWriteOnlyWritable;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no+tag';\n};\n\nexport type ImportResponses = {\n    /**\n     * Success\n     */\n    200: ModelFromZendesk;\n    /**\n     * Default success response\n     */\n    default: ModelWithReadOnlyAndWriteOnly;\n};\n\nexport type ImportResponse = ImportResponses[keyof ImportResponses];\n\nexport type FooWowData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no+tag';\n};\n\nexport type FooWowResponses = {\n    /**\n     * OK\n     */\n    default: unknown;\n};\n\nexport type ApiVVersionODataControllerCountData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple/$count';\n};\n\nexport type ApiVVersionODataControllerCountResponses = {\n    /**\n     * Success\n     */\n    200: ModelFromZendesk;\n};\n\nexport type ApiVVersionODataControllerCountResponse = ApiVVersionODataControllerCountResponses[keyof ApiVVersionODataControllerCountResponses];\n\nexport type GetApiVbyApiVersionSimpleOperationData = {\n    body?: never;\n    path: {\n        /**\n         * foo in method\n         */\n        foo_param: string;\n    };\n    query?: never;\n    url: '/api/v{api-version}/simple:operation';\n};\n\nexport type GetApiVbyApiVersionSimpleOperationErrors = {\n    /**\n     * Default error response\n     */\n    default: ModelWithBoolean;\n};\n\nexport type GetApiVbyApiVersionSimpleOperationError = GetApiVbyApiVersionSimpleOperationErrors[keyof GetApiVbyApiVersionSimpleOperationErrors];\n\nexport type GetApiVbyApiVersionSimpleOperationResponses = {\n    /**\n     * Response is a simple number\n     */\n    200: number;\n};\n\nexport type GetApiVbyApiVersionSimpleOperationResponse = GetApiVbyApiVersionSimpleOperationResponses[keyof GetApiVbyApiVersionSimpleOperationResponses];\n\nexport type DeleteCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type GetCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type HeadCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type OptionsCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type PatchCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type PostCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type PutCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type DeleteFooData3 = {\n    body?: never;\n    headers: {\n        /**\n         * Parameter with illegal characters\n         */\n        'x-Foo-Bar': ModelWithString;\n    };\n    path: {\n        /**\n         * foo in method\n         */\n        foo_param: string;\n        /**\n         * bar in method\n         */\n        BarParam: string;\n    };\n    query?: never;\n    url: '/api/v{api-version}/foo/{foo_param}/bar/{BarParam}';\n};\n\nexport type CallWithDescriptionsData = {\n    body?: never;\n    path?: never;\n    query?: {\n        /**\n         * Testing multiline comments in string: First line\n         * Second line\n         *\n         * Fourth line\n         */\n        parameterWithBreaks?: string;\n        /**\n         * Testing backticks in string: `backticks` and ```multiple backticks``` should work\n         */\n        parameterWithBackticks?: string;\n        /**\n         * Testing slashes in string: \\backwards\\\\\\ and /forwards/// should work\n         */\n        parameterWithSlashes?: string;\n        /**\n         * Testing expression placeholders in string: ${expression} should work\n         */\n        parameterWithExpressionPlaceholders?: string;\n        /**\n         * Testing quotes in string: 'single quote''' and \"double quotes\"\"\" should work\n         */\n        parameterWithQuotes?: string;\n        /**\n         * Testing reserved characters in string: * inline * and ** inline ** should work\n         */\n        parameterWithReservedCharacters?: string;\n    };\n    url: '/api/v{api-version}/descriptions';\n};\n\nexport type DeprecatedCallData = {\n    body?: never;\n    headers: {\n        /**\n         * This parameter is deprecated\n         *\n         * @deprecated\n         */\n        parameter: DeprecatedModel | null;\n    };\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/parameters/deprecated';\n};\n\nexport type CallWithParametersData = {\n    /**\n     * This is the parameter that goes into the body\n     */\n    body: {\n        [key: string]: unknown;\n    } | null;\n    headers: {\n        /**\n         * This is the parameter that goes into the header\n         */\n        parameterHeader: string | null;\n    };\n    path: {\n        /**\n         * This is the parameter that goes into the path\n         */\n        parameterPath: string | null;\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string | null;\n    };\n    query: {\n        foo_ref_enum?: ModelWithNestedArrayEnumsDataFoo;\n        foo_all_of_enum: ModelWithNestedArrayEnumsDataFoo;\n        /**\n         * This is the parameter that goes into the query params\n         */\n        cursor: string | null;\n    };\n    url: '/api/v{api-version}/parameters/{parameterPath}';\n};\n\nexport type CallWithWeirdParameterNamesData = {\n    /**\n     * This is the parameter that goes into the body\n     */\n    body: ModelWithString | null;\n    headers: {\n        /**\n         * This is the parameter that goes into the request header\n         */\n        'parameter.header': string | null;\n    };\n    path: {\n        /**\n         * This is the parameter that goes into the path\n         */\n        'parameter.path.1'?: string;\n        /**\n         * This is the parameter that goes into the path\n         */\n        'parameter-path-2'?: string;\n        /**\n         * This is the parameter that goes into the path\n         */\n        'PARAMETER-PATH-3'?: string;\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string | null;\n    };\n    query: {\n        /**\n         * This is the parameter with a reserved keyword\n         */\n        default?: string;\n        /**\n         * This is the parameter that goes into the request query params\n         */\n        'parameter-query': string | null;\n    };\n    url: '/api/v{api-version}/parameters/{parameter.path.1}/{parameter-path-2}/{PARAMETER-PATH-3}';\n};\n\nexport type GetCallWithOptionalParamData = {\n    /**\n     * This is a required parameter\n     */\n    body: ModelWithOneOfEnum;\n    path?: never;\n    query?: {\n        /**\n         * This is an optional parameter\n         */\n        page?: number;\n    };\n    url: '/api/v{api-version}/parameters';\n};\n\nexport type PostCallWithOptionalParamData = {\n    /**\n     * This is an optional parameter\n     */\n    body?: {\n        offset?: number | null;\n    };\n    path?: never;\n    query: {\n        /**\n         * This is a required parameter\n         */\n        parameter: Pageable;\n    };\n    url: '/api/v{api-version}/parameters';\n};\n\nexport type PostCallWithOptionalParamResponses = {\n    /**\n     * Response is a simple number\n     */\n    200: number;\n    /**\n     * Success\n     */\n    204: void;\n};\n\nexport type PostCallWithOptionalParamResponse = PostCallWithOptionalParamResponses[keyof PostCallWithOptionalParamResponses];\n\nexport type PostApiVbyApiVersionRequestBodyData = {\n    /**\n     * A reusable request body\n     */\n    body?: SimpleRequestBody;\n    path?: never;\n    query?: {\n        /**\n         * This is a reusable parameter\n         */\n        parameter?: string;\n    };\n    url: '/api/v{api-version}/requestBody';\n};\n\nexport type PostApiVbyApiVersionFormDataData = {\n    /**\n     * A reusable request body\n     */\n    body?: SimpleFormData;\n    path?: never;\n    query?: {\n        /**\n         * This is a reusable parameter\n         */\n        parameter?: string;\n    };\n    url: '/api/v{api-version}/formData';\n};\n\nexport type CallWithDefaultParametersData = {\n    body?: never;\n    path?: never;\n    query?: {\n        /**\n         * This is a simple string with default value\n         */\n        parameterString?: string | null;\n        /**\n         * This is a simple number with default value\n         */\n        parameterNumber?: number | null;\n        /**\n         * This is a simple boolean with default value\n         */\n        parameterBoolean?: boolean | null;\n        /**\n         * This is a simple enum with default value\n         */\n        parameterEnum?: 'Success' | 'Warning' | 'Error';\n        /**\n         * This is a simple model with default value\n         */\n        parameterModel?: ModelWithString | null;\n    };\n    url: '/api/v{api-version}/defaults';\n};\n\nexport type CallWithDefaultOptionalParametersData = {\n    body?: never;\n    path?: never;\n    query?: {\n        /**\n         * This is a simple string that is optional with default value\n         */\n        parameterString?: string;\n        /**\n         * This is a simple number that is optional with default value\n         */\n        parameterNumber?: number;\n        /**\n         * This is a simple boolean that is optional with default value\n         */\n        parameterBoolean?: boolean;\n        /**\n         * This is a simple enum that is optional with default value\n         */\n        parameterEnum?: 'Success' | 'Warning' | 'Error';\n        /**\n         * This is a simple model that is optional with default value\n         */\n        parameterModel?: ModelWithString;\n    };\n    url: '/api/v{api-version}/defaults';\n};\n\nexport type CallToTestOrderOfParamsData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * This is a optional string with default\n         */\n        parameterOptionalStringWithDefault?: string;\n        /**\n         * This is a optional string with empty default\n         */\n        parameterOptionalStringWithEmptyDefault?: string;\n        /**\n         * This is a optional string with no default\n         */\n        parameterOptionalStringWithNoDefault?: string;\n        /**\n         * This is a string with default\n         */\n        parameterStringWithDefault: string;\n        /**\n         * This is a string with empty default\n         */\n        parameterStringWithEmptyDefault: string;\n        /**\n         * This is a string with no default\n         */\n        parameterStringWithNoDefault: string;\n        /**\n         * This is a string that can be null with no default\n         */\n        parameterStringNullableWithNoDefault?: string | null;\n        /**\n         * This is a string that can be null with default\n         */\n        parameterStringNullableWithDefault?: string | null;\n    };\n    url: '/api/v{api-version}/defaults';\n};\n\nexport type DuplicateNameData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/duplicate';\n};\n\nexport type DuplicateName2Data = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/duplicate';\n};\n\nexport type DuplicateName3Data = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/duplicate';\n};\n\nexport type DuplicateName4Data = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/duplicate';\n};\n\nexport type CallWithNoContentResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no-content';\n};\n\nexport type CallWithNoContentResponseResponses = {\n    /**\n     * Success\n     */\n    204: void;\n};\n\nexport type CallWithNoContentResponseResponse = CallWithNoContentResponseResponses[keyof CallWithNoContentResponseResponses];\n\nexport type CallWithResponseAndNoContentResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multiple-tags/response-and-no-content';\n};\n\nexport type CallWithResponseAndNoContentResponseResponses = {\n    /**\n     * Response is a simple number\n     */\n    200: number;\n    /**\n     * Success\n     */\n    204: void;\n};\n\nexport type CallWithResponseAndNoContentResponseResponse = CallWithResponseAndNoContentResponseResponses[keyof CallWithResponseAndNoContentResponseResponses];\n\nexport type DummyAData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multiple-tags/a';\n};\n\nexport type DummyAResponses = {\n    200: _400;\n};\n\nexport type DummyAResponse = DummyAResponses[keyof DummyAResponses];\n\nexport type DummyBData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multiple-tags/b';\n};\n\nexport type DummyBResponses = {\n    /**\n     * Success\n     */\n    204: void;\n};\n\nexport type DummyBResponse = DummyBResponses[keyof DummyBResponses];\n\nexport type CallWithResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/response';\n};\n\nexport type CallWithResponseResponses = {\n    default: Import;\n};\n\nexport type CallWithResponseResponse = CallWithResponseResponses[keyof CallWithResponseResponses];\n\nexport type CallWithDuplicateResponsesData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/response';\n};\n\nexport type CallWithDuplicateResponsesErrors = {\n    /**\n     * Message for 500 error\n     */\n    500: ModelWithStringError;\n    /**\n     * Message for 501 error\n     */\n    501: ModelWithStringError;\n    /**\n     * Message for 502 error\n     */\n    502: ModelWithStringError;\n    /**\n     * Message for 4XX errors\n     */\n    '4XX': DictionaryWithArray;\n    /**\n     * Default error response\n     */\n    default: ModelWithBoolean;\n};\n\nexport type CallWithDuplicateResponsesError = CallWithDuplicateResponsesErrors[keyof CallWithDuplicateResponsesErrors];\n\nexport type CallWithDuplicateResponsesResponses = {\n    /**\n     * Message for 200 response\n     */\n    200: ModelWithBoolean & ModelWithInteger;\n    /**\n     * Message for 201 response\n     */\n    201: ModelWithString;\n    /**\n     * Message for 202 response\n     */\n    202: ModelWithString;\n};\n\nexport type CallWithDuplicateResponsesResponse = CallWithDuplicateResponsesResponses[keyof CallWithDuplicateResponsesResponses];\n\nexport type CallWithResponsesData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/response';\n};\n\nexport type CallWithResponsesErrors = {\n    /**\n     * Message for 500 error\n     */\n    500: ModelWithStringError;\n    /**\n     * Message for 501 error\n     */\n    501: ModelWithStringError;\n    /**\n     * Message for 502 error\n     */\n    502: ModelWithStringError;\n    /**\n     * Message for default response\n     */\n    default: ModelWithStringError;\n};\n\nexport type CallWithResponsesError = CallWithResponsesErrors[keyof CallWithResponsesErrors];\n\nexport type CallWithResponsesResponses = {\n    /**\n     * Message for 200 response\n     */\n    200: {\n        readonly '@namespace.string'?: string;\n        readonly '@namespace.integer'?: number;\n        readonly value?: Array<ModelWithString>;\n    };\n    /**\n     * Message for 201 response\n     */\n    201: ModelThatExtends;\n    /**\n     * Message for 202 response\n     */\n    202: ModelThatExtendsExtends;\n};\n\nexport type CallWithResponsesResponse = CallWithResponsesResponses[keyof CallWithResponsesResponses];\n\nexport type CollectionFormatData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * This is an array parameter that is sent as csv format (comma-separated values)\n         */\n        parameterArrayCSV: Array<string> | null;\n        /**\n         * This is an array parameter that is sent as ssv format (space-separated values)\n         */\n        parameterArraySSV: Array<string> | null;\n        /**\n         * This is an array parameter that is sent as tsv format (tab-separated values)\n         */\n        parameterArrayTSV: Array<string> | null;\n        /**\n         * This is an array parameter that is sent as pipes format (pipe-separated values)\n         */\n        parameterArrayPipes: Array<string> | null;\n        /**\n         * This is an array parameter that is sent as multi format (multiple parameter instances)\n         */\n        parameterArrayMulti: Array<string> | null;\n    };\n    url: '/api/v{api-version}/collectionFormat';\n};\n\nexport type TypesData = {\n    body?: never;\n    path?: {\n        /**\n         * This is a number parameter\n         */\n        id?: number;\n    };\n    query: {\n        /**\n         * This is a number parameter\n         */\n        parameterNumber: number;\n        /**\n         * This is a string parameter\n         */\n        parameterString: string | null;\n        /**\n         * This is a boolean parameter\n         */\n        parameterBoolean: boolean | null;\n        /**\n         * This is an object parameter\n         */\n        parameterObject: {\n            [key: string]: unknown;\n        } | null;\n        /**\n         * This is an array parameter\n         */\n        parameterArray: Array<string> | null;\n        /**\n         * This is a dictionary parameter\n         */\n        parameterDictionary: {\n            [key: string]: unknown;\n        } | null;\n        /**\n         * This is an enum parameter\n         */\n        parameterEnum: 'Success' | 'Warning' | 'Error' | null;\n    };\n    url: '/api/v{api-version}/types';\n};\n\nexport type TypesResponses = {\n    /**\n     * Response is a simple number\n     */\n    200: number;\n    /**\n     * Response is a simple string\n     */\n    201: string;\n    /**\n     * Response is a simple boolean\n     */\n    202: boolean;\n    /**\n     * Response is a simple object\n     */\n    203: {\n        [key: string]: unknown;\n    };\n};\n\nexport type TypesResponse = TypesResponses[keyof TypesResponses];\n\nexport type UploadFileData = {\n    body: Blob | File;\n    path: {\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string | null;\n    };\n    query?: never;\n    url: '/api/v{api-version}/upload';\n};\n\nexport type UploadFileResponses = {\n    200: boolean;\n};\n\nexport type UploadFileResponse = UploadFileResponses[keyof UploadFileResponses];\n\nexport type FileResponseData = {\n    body?: never;\n    path: {\n        id: string;\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string;\n    };\n    query?: never;\n    url: '/api/v{api-version}/file/{id}';\n};\n\nexport type FileResponseResponses = {\n    /**\n     * Success\n     */\n    200: Blob | File;\n};\n\nexport type FileResponseResponse = FileResponseResponses[keyof FileResponseResponses];\n\nexport type ComplexTypesData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * Parameter containing object\n         */\n        parameterObject: {\n            first?: {\n                second?: {\n                    third?: string;\n                };\n            };\n        };\n        /**\n         * Parameter containing reference\n         */\n        parameterReference: ModelWithString;\n    };\n    url: '/api/v{api-version}/complex';\n};\n\nexport type ComplexTypesErrors = {\n    /**\n     * 400 `server` error\n     */\n    400: unknown;\n    /**\n     * 500 server error\n     */\n    500: unknown;\n};\n\nexport type ComplexTypesResponses = {\n    /**\n     * Successful response\n     */\n    200: Array<ModelWithString>;\n};\n\nexport type ComplexTypesResponse = ComplexTypesResponses[keyof ComplexTypesResponses];\n\nexport type MultipartResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multipart';\n};\n\nexport type MultipartResponseResponses = {\n    /**\n     * OK\n     */\n    200: {\n        file?: Blob | File;\n        metadata?: {\n            foo?: string;\n            bar?: string;\n        };\n    };\n};\n\nexport type MultipartResponseResponse = MultipartResponseResponses[keyof MultipartResponseResponses];\n\nexport type MultipartRequestData = {\n    body?: {\n        content?: Blob | File;\n        data?: ModelWithString | null;\n    };\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multipart';\n};\n\nexport type ComplexParamsData = {\n    body?: {\n        readonly key: string | null;\n        name: string | null;\n        enabled?: boolean;\n        type: 'Monkey' | 'Horse' | 'Bird';\n        listOfModels?: Array<ModelWithString> | null;\n        listOfStrings?: Array<string> | null;\n        parameters: ModelWithString | ModelWithEnum | ModelWithArray | ModelWithDictionary;\n        readonly user?: {\n            readonly id?: number;\n            readonly name?: string | null;\n        };\n    };\n    path: {\n        id: number;\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string;\n    };\n    query?: never;\n    url: '/api/v{api-version}/complex/{id}';\n};\n\nexport type ComplexParamsResponses = {\n    /**\n     * Success\n     */\n    200: ModelWithString;\n};\n\nexport type ComplexParamsResponse = ComplexParamsResponses[keyof ComplexParamsResponses];\n\nexport type CallWithResultFromHeaderData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/header';\n};\n\nexport type CallWithResultFromHeaderErrors = {\n    /**\n     * 400 server error\n     */\n    400: unknown;\n    /**\n     * 500 server error\n     */\n    500: unknown;\n};\n\nexport type CallWithResultFromHeaderResponses = {\n    /**\n     * Successful response\n     */\n    200: unknown;\n};\n\nexport type TestErrorCodeData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * Status code to return\n         */\n        status: number;\n    };\n    url: '/api/v{api-version}/error';\n};\n\nexport type TestErrorCodeErrors = {\n    /**\n     * Custom message: Internal Server Error\n     */\n    500: unknown;\n    /**\n     * Custom message: Not Implemented\n     */\n    501: unknown;\n    /**\n     * Custom message: Bad Gateway\n     */\n    502: unknown;\n    /**\n     * Custom message: Service Unavailable\n     */\n    503: unknown;\n};\n\nexport type TestErrorCodeResponses = {\n    /**\n     * Custom message: Successful response\n     */\n    200: unknown;\n};\n\nexport type NonAsciiæøåÆøÅöôêÊ字符串Data = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * Dummy input param\n         */\n        nonAsciiParamæøåÆØÅöôêÊ: number;\n    };\n    url: '/api/v{api-version}/non-ascii-æøåÆØÅöôêÊ字符串';\n};\n\nexport type NonAsciiæøåÆøÅöôêÊ字符串Responses = {\n    /**\n     * Successful response\n     */\n    200: Array<NonAsciiStringæøåÆøÅöôêÊ字符串>;\n};\n\nexport type NonAsciiæøåÆøÅöôêÊ字符串Response = NonAsciiæøåÆøÅöôêÊ字符串Responses[keyof NonAsciiæøåÆøÅöôêÊ字符串Responses];\n\nexport type PutWithFormUrlEncodedData = {\n    body: ArrayWithStrings;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/non-ascii-æøåÆØÅöôêÊ字符串';\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@angular/common/default-class/@angular/common.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport { type HttpRequest, httpResource } from '@angular/common/http';\nimport { inject, Injectable } from '@angular/core';\n\nimport { client } from '../client.gen';\nimport type { Options } from '../sdk.gen';\nimport type { ApiVVersionODataControllerCountData, ApiVVersionODataControllerCountResponse, CallToTestOrderOfParamsData, CallWithDefaultOptionalParametersData, CallWithDefaultParametersData, CallWithDescriptionsData, CallWithDuplicateResponsesData, CallWithDuplicateResponsesResponse, CallWithNoContentResponseData, CallWithNoContentResponseResponse, CallWithParametersData, CallWithResponseAndNoContentResponseData, CallWithResponseAndNoContentResponseResponse, CallWithResponseData, CallWithResponseResponse, CallWithResponsesData, CallWithResponsesResponse, CallWithResultFromHeaderData, CallWithWeirdParameterNamesData, CollectionFormatData, ComplexParamsData, ComplexParamsResponse, ComplexTypesData, ComplexTypesResponse, DeleteCallWithoutParametersAndResponseData, DeleteFooData3, DeprecatedCallData, DummyAData, DummyAResponse, DummyBData, DummyBResponse, DuplicateName2Data, DuplicateName3Data, DuplicateName4Data, DuplicateNameData, ExportData, FileResponseData, FileResponseResponse, FooWowData, GetApiVbyApiVersionSimpleOperationData, GetApiVbyApiVersionSimpleOperationResponse, GetCallWithOptionalParamData, GetCallWithoutParametersAndResponseData, HeadCallWithoutParametersAndResponseData, ImportData, ImportResponse, MultipartRequestData, MultipartResponseData, MultipartResponseResponse, NonAsciiæøåÆøÅöôêÊ字符串Data, NonAsciiæøåÆøÅöôêÊ字符串Response, OptionsCallWithoutParametersAndResponseData, PatchApiVbyApiVersionNoTagData, PatchCallWithoutParametersAndResponseData, PostApiVbyApiVersionFormDataData, PostApiVbyApiVersionRequestBodyData, PostCallWithOptionalParamData, PostCallWithOptionalParamResponse, PostCallWithoutParametersAndResponseData, PutCallWithoutParametersAndResponseData, PutWithFormUrlEncodedData, TestErrorCodeData, TypesData, TypesResponse, UploadFileData, UploadFileResponse } from '../types.gen';\n\n@Injectable({ providedIn: 'root' })\nexport class DefaultServiceRequests {\n    public export<ThrowOnError extends boolean = false>(options?: Options<ExportData, ThrowOnError>): HttpRequest<unknown> {\n        return (options?.client ?? client).requestOptions<unknown, ThrowOnError>({\n            responseStyle: 'data',\n            method: 'GET',\n            url: '/api/v{api-version}/no+tag',\n            ...options\n        });\n    }\n    \n    public patchApiVbyApiVersionNoTag<ThrowOnError extends boolean = false>(options?: Options<PatchApiVbyApiVersionNoTagData, ThrowOnError>): HttpRequest<unknown> {\n        return (options?.client ?? client).requestOptions<unknown, ThrowOnError>({\n            responseStyle: 'data',\n            method: 'PATCH',\n            url: '/api/v{api-version}/no+tag',\n            ...options\n        });\n    }\n    \n    public import<ThrowOnError extends boolean = false>(options: Options<ImportData, ThrowOnError>): HttpRequest<ImportResponse> {\n        return (options?.client ?? client).requestOptions<ImportResponse, ThrowOnError>({\n            responseStyle: 'data',\n            method: 'POST',\n            url: '/api/v{api-version}/no+tag',\n            ...options\n        });\n    }\n    \n    public fooWow<ThrowOnError extends boolean = false>(options?: Options<FooWowData, ThrowOnError>): HttpRequest<unknown> {\n        return (options?.client ?? client).requestOptions<unknown, ThrowOnError>({\n            responseStyle: 'data',\n            method: 'PUT',\n            url: '/api/v{api-version}/no+tag',\n            ...options\n        });\n    }\n    \n    public getApiVbyApiVersionSimpleOperation<ThrowOnError extends boolean = false>(options: Options<GetApiVbyApiVersionSimpleOperationData, ThrowOnError>): HttpRequest<GetApiVbyApiVersionSimpleOperationResponse> {\n        return (options?.client ?? client).requestOptions<GetApiVbyApiVersionSimpleOperationResponse, ThrowOnError>({\n            responseStyle: 'data',\n            method: 'GET',\n            url: '/api/v{api-version}/simple:operation',\n            ...options\n        });\n    }\n}\n\nexport class ODataControllerService {\n    public count<ThrowOnError extends boolean = false>(options?: Options<ApiVVersionODataControllerCountData, ThrowOnError>): HttpRequest<ApiVVersionODataControllerCountResponse> {\n        return (options?.client ?? client).requestOptions<ApiVVersionODataControllerCountResponse, ThrowOnError>({\n            responseStyle: 'data',\n            method: 'GET',\n            url: '/api/v{api-version}/simple/$count',\n            ...options\n        });\n    }\n}\n\nexport class VVersionService {\n    private _oDataControllerService?: ODataControllerService;\n    get oDataControllerService(): ODataControllerService {\n        return this._oDataControllerService ??= new ODataControllerService();\n    }\n}\n\nexport class ApiService {\n    private _vVersionService?: VVersionService;\n    get vVersionService(): VVersionService {\n        return this._vVersionService ??= new VVersionService();\n    }\n}\n\n@Injectable({ providedIn: 'root' })\nexport class SimpleServiceRequests {\n    public deleteCallWithoutParametersAndResponse<ThrowOnError extends boolean = false>(options?: Options<DeleteCallWithoutParametersAndResponseData, ThrowOnError>): HttpRequest<unknown> {\n        return (options?.client ?? client).requestOptions<unknown, ThrowOnError>({\n            responseStyle: 'data',\n            method: 'DELETE',\n            url: '/api/v{api-version}/simple',\n            ...options\n        });\n    }\n    \n    public getCallWithoutParametersAndResponse<ThrowOnError extends boolean = false>(options?: Options<GetCallWithoutParametersAndResponseData, ThrowOnError>): HttpRequest<unknown> {\n        return (options?.client ?? client).requestOptions<unknown, ThrowOnError>({\n            responseStyle: 'data',\n            method: 'GET',\n            url: '/api/v{api-version}/simple',\n            ...options\n        });\n    }\n    \n    public headCallWithoutParametersAndResponse<ThrowOnError extends boolean = false>(options?: Options<HeadCallWithoutParametersAndResponseData, ThrowOnError>): HttpRequest<unknown> {\n        return (options?.client ?? client).requestOptions<unknown, ThrowOnError>({\n            responseStyle: 'data',\n            method: 'HEAD',\n            url: '/api/v{api-version}/simple',\n            ...options\n        });\n    }\n    \n    public optionsCallWithoutParametersAndResponse<ThrowOnError extends boolean = false>(options?: Options<OptionsCallWithoutParametersAndResponseData, ThrowOnError>): HttpRequest<unknown> {\n        return (options?.client ?? client).requestOptions<unknown, ThrowOnError>({\n            responseStyle: 'data',\n            method: 'OPTIONS',\n            url: '/api/v{api-version}/simple',\n            ...options\n        });\n    }\n    \n    public patchCallWithoutParametersAndResponse<ThrowOnError extends boolean = false>(options?: Options<PatchCallWithoutParametersAndResponseData, ThrowOnError>): HttpRequest<unknown> {\n        return (options?.client ?? client).requestOptions<unknown, ThrowOnError>({\n            responseStyle: 'data',\n            method: 'PATCH',\n            url: '/api/v{api-version}/simple',\n            ...options\n        });\n    }\n    \n    public postCallWithoutParametersAndResponse<ThrowOnError extends boolean = false>(options?: Options<PostCallWithoutParametersAndResponseData, ThrowOnError>): HttpRequest<unknown> {\n        return (options?.client ?? client).requestOptions<unknown, ThrowOnError>({\n            responseStyle: 'data',\n            method: 'POST',\n            url: '/api/v{api-version}/simple',\n            ...options\n        });\n    }\n    \n    public putCallWithoutParametersAndResponse<ThrowOnError extends boolean = false>(options?: Options<PutCallWithoutParametersAndResponseData, ThrowOnError>): HttpRequest<unknown> {\n        return (options?.client ?? client).requestOptions<unknown, ThrowOnError>({\n            responseStyle: 'data',\n            method: 'PUT',\n            url: '/api/v{api-version}/simple',\n            ...options\n        });\n    }\n    \n    private _apiService?: ApiService;\n    get apiService(): ApiService {\n        return this._apiService ??= new ApiService();\n    }\n}\n\n@Injectable({ providedIn: 'root' })\nexport class ParametersServiceRequests {\n    public deleteFoo<ThrowOnError extends boolean = false>(options: Options<DeleteFooData3, ThrowOnError>): HttpRequest<unknown> {\n        return (options?.client ?? client).requestOptions<unknown, ThrowOnError>({\n            responseStyle: 'data',\n            method: 'DELETE',\n            url: '/api/v{api-version}/foo/{foo_param}/bar/{BarParam}',\n            ...options\n        });\n    }\n    \n    public callWithParameters<ThrowOnError extends boolean = false>(options: Options<CallWithParametersData, ThrowOnError>): HttpRequest<unknown> {\n        return (options?.client ?? client).requestOptions<unknown, ThrowOnError>({\n            responseStyle: 'data',\n            method: 'POST',\n            url: '/api/v{api-version}/parameters/{parameterPath}',\n            ...options\n        });\n    }\n    \n    public callWithWeirdParameterNames<ThrowOnError extends boolean = false>(options: Options<CallWithWeirdParameterNamesData, ThrowOnError>): HttpRequest<unknown> {\n        return (options?.client ?? client).requestOptions<unknown, ThrowOnError>({\n            responseStyle: 'data',\n            method: 'POST',\n            url: '/api/v{api-version}/parameters/{parameter.path.1}/{parameter-path-2}/{PARAMETER-PATH-3}',\n            ...options\n        });\n    }\n    \n    public getCallWithOptionalParam<ThrowOnError extends boolean = false>(options: Options<GetCallWithOptionalParamData, ThrowOnError>): HttpRequest<unknown> {\n        return (options?.client ?? client).requestOptions<unknown, ThrowOnError>({\n            responseStyle: 'data',\n            method: 'GET',\n            url: '/api/v{api-version}/parameters',\n            ...options\n        });\n    }\n    \n    public postCallWithOptionalParam<ThrowOnError extends boolean = false>(options: Options<PostCallWithOptionalParamData, ThrowOnError>): HttpRequest<PostCallWithOptionalParamResponse> {\n        return (options?.client ?? client).requestOptions<PostCallWithOptionalParamResponse, ThrowOnError>({\n            responseStyle: 'data',\n            method: 'POST',\n            url: '/api/v{api-version}/parameters',\n            ...options\n        });\n    }\n}\n\n@Injectable({ providedIn: 'root' })\nexport class DescriptionsServiceRequests {\n    public callWithDescriptions<ThrowOnError extends boolean = false>(options?: Options<CallWithDescriptionsData, ThrowOnError>): HttpRequest<unknown> {\n        return (options?.client ?? client).requestOptions<unknown, ThrowOnError>({\n            responseStyle: 'data',\n            method: 'POST',\n            url: '/api/v{api-version}/descriptions',\n            ...options\n        });\n    }\n}\n\n@Injectable({ providedIn: 'root' })\nexport class DeprecatedServiceRequests {\n    /**\n     * @deprecated\n     */\n    public deprecatedCall<ThrowOnError extends boolean = false>(options: Options<DeprecatedCallData, ThrowOnError>): HttpRequest<unknown> {\n        return (options?.client ?? client).requestOptions<unknown, ThrowOnError>({\n            responseStyle: 'data',\n            method: 'POST',\n            url: '/api/v{api-version}/parameters/deprecated',\n            ...options\n        });\n    }\n}\n\n@Injectable({ providedIn: 'root' })\nexport class RequestBodyServiceRequests {\n    public postApiVbyApiVersionRequestBody<ThrowOnError extends boolean = false>(options?: Options<PostApiVbyApiVersionRequestBodyData, ThrowOnError>): HttpRequest<unknown> {\n        return (options?.client ?? client).requestOptions<unknown, ThrowOnError>({\n            responseStyle: 'data',\n            method: 'POST',\n            url: '/api/v{api-version}/requestBody',\n            ...options\n        });\n    }\n}\n\n@Injectable({ providedIn: 'root' })\nexport class FormDataServiceRequests {\n    public postApiVbyApiVersionFormData<ThrowOnError extends boolean = false>(options?: Options<PostApiVbyApiVersionFormDataData, ThrowOnError>): HttpRequest<unknown> {\n        return (options?.client ?? client).requestOptions<unknown, ThrowOnError>({\n            responseStyle: 'data',\n            method: 'POST',\n            url: '/api/v{api-version}/formData',\n            ...options\n        });\n    }\n}\n\n@Injectable({ providedIn: 'root' })\nexport class DefaultsServiceRequests {\n    public callWithDefaultParameters<ThrowOnError extends boolean = false>(options?: Options<CallWithDefaultParametersData, ThrowOnError>): HttpRequest<unknown> {\n        return (options?.client ?? client).requestOptions<unknown, ThrowOnError>({\n            responseStyle: 'data',\n            method: 'GET',\n            url: '/api/v{api-version}/defaults',\n            ...options\n        });\n    }\n    \n    public callWithDefaultOptionalParameters<ThrowOnError extends boolean = false>(options?: Options<CallWithDefaultOptionalParametersData, ThrowOnError>): HttpRequest<unknown> {\n        return (options?.client ?? client).requestOptions<unknown, ThrowOnError>({\n            responseStyle: 'data',\n            method: 'POST',\n            url: '/api/v{api-version}/defaults',\n            ...options\n        });\n    }\n    \n    public callToTestOrderOfParams<ThrowOnError extends boolean = false>(options: Options<CallToTestOrderOfParamsData, ThrowOnError>): HttpRequest<unknown> {\n        return (options?.client ?? client).requestOptions<unknown, ThrowOnError>({\n            responseStyle: 'data',\n            method: 'PUT',\n            url: '/api/v{api-version}/defaults',\n            ...options\n        });\n    }\n}\n\n@Injectable({ providedIn: 'root' })\nexport class DuplicateServiceRequests {\n    public duplicateName<ThrowOnError extends boolean = false>(options?: Options<DuplicateNameData, ThrowOnError>): HttpRequest<unknown> {\n        return (options?.client ?? client).requestOptions<unknown, ThrowOnError>({\n            responseStyle: 'data',\n            method: 'DELETE',\n            url: '/api/v{api-version}/duplicate',\n            ...options\n        });\n    }\n    \n    public duplicateName2<ThrowOnError extends boolean = false>(options?: Options<DuplicateNameData, ThrowOnError>): HttpRequest<unknown> {\n        return (options?.client ?? client).requestOptions<unknown, ThrowOnError>({\n            responseStyle: 'data',\n            method: 'DELETE',\n            url: '/api/v{api-version}/duplicate',\n            ...options\n        });\n    }\n    \n    public duplicateName22<ThrowOnError extends boolean = false>(options?: Options<DuplicateName2Data, ThrowOnError>): HttpRequest<unknown> {\n        return (options?.client ?? client).requestOptions<unknown, ThrowOnError>({\n            responseStyle: 'data',\n            method: 'GET',\n            url: '/api/v{api-version}/duplicate',\n            ...options\n        });\n    }\n    \n    public duplicateName3<ThrowOnError extends boolean = false>(options?: Options<DuplicateName3Data, ThrowOnError>): HttpRequest<unknown> {\n        return (options?.client ?? client).requestOptions<unknown, ThrowOnError>({\n            responseStyle: 'data',\n            method: 'POST',\n            url: '/api/v{api-version}/duplicate',\n            ...options\n        });\n    }\n    \n    public duplicateName4<ThrowOnError extends boolean = false>(options?: Options<DuplicateName4Data, ThrowOnError>): HttpRequest<unknown> {\n        return (options?.client ?? client).requestOptions<unknown, ThrowOnError>({\n            responseStyle: 'data',\n            method: 'PUT',\n            url: '/api/v{api-version}/duplicate',\n            ...options\n        });\n    }\n}\n\n@Injectable({ providedIn: 'root' })\nexport class NoContentServiceRequests {\n    public callWithNoContentResponse<ThrowOnError extends boolean = false>(options?: Options<CallWithNoContentResponseData, ThrowOnError>): HttpRequest<CallWithNoContentResponseResponse> {\n        return (options?.client ?? client).requestOptions<CallWithNoContentResponseResponse, ThrowOnError>({\n            responseStyle: 'data',\n            method: 'GET',\n            url: '/api/v{api-version}/no-content',\n            ...options\n        });\n    }\n}\n\n@Injectable({ providedIn: 'root' })\nexport class ResponseServiceRequests {\n    public callWithResponseAndNoContentResponse<ThrowOnError extends boolean = false>(options?: Options<CallWithResponseAndNoContentResponseData, ThrowOnError>): HttpRequest<CallWithResponseAndNoContentResponseResponse> {\n        return (options?.client ?? client).requestOptions<CallWithResponseAndNoContentResponseResponse, ThrowOnError>({\n            responseStyle: 'data',\n            method: 'GET',\n            url: '/api/v{api-version}/multiple-tags/response-and-no-content',\n            ...options\n        });\n    }\n    \n    public callWithResponse<ThrowOnError extends boolean = false>(options?: Options<CallWithResponseData, ThrowOnError>): HttpRequest<CallWithResponseResponse> {\n        return (options?.client ?? client).requestOptions<CallWithResponseResponse, ThrowOnError>({\n            responseStyle: 'data',\n            method: 'GET',\n            url: '/api/v{api-version}/response',\n            ...options\n        });\n    }\n    \n    public callWithDuplicateResponses<ThrowOnError extends boolean = false>(options?: Options<CallWithDuplicateResponsesData, ThrowOnError>): HttpRequest<CallWithDuplicateResponsesResponse> {\n        return (options?.client ?? client).requestOptions<CallWithDuplicateResponsesResponse, ThrowOnError>({\n            responseStyle: 'data',\n            method: 'POST',\n            url: '/api/v{api-version}/response',\n            ...options\n        });\n    }\n    \n    public callWithResponses<ThrowOnError extends boolean = false>(options?: Options<CallWithResponsesData, ThrowOnError>): HttpRequest<CallWithResponsesResponse> {\n        return (options?.client ?? client).requestOptions<CallWithResponsesResponse, ThrowOnError>({\n            responseStyle: 'data',\n            method: 'PUT',\n            url: '/api/v{api-version}/response',\n            ...options\n        });\n    }\n}\n\n@Injectable({ providedIn: 'root' })\nexport class NoContentServiceRequests2 {\n    public callWithResponseAndNoContentResponse<ThrowOnError extends boolean = false>(options?: Options<CallWithResponseAndNoContentResponseData, ThrowOnError>): HttpRequest<CallWithResponseAndNoContentResponseResponse> {\n        return (options?.client ?? client).requestOptions<CallWithResponseAndNoContentResponseResponse, ThrowOnError>({\n            responseStyle: 'data',\n            method: 'GET',\n            url: '/api/v{api-version}/multiple-tags/response-and-no-content',\n            ...options\n        });\n    }\n}\n\n@Injectable({ providedIn: 'root' })\nexport class MultipleTags1ServiceRequests {\n    public dummyA<ThrowOnError extends boolean = false>(options?: Options<DummyAData, ThrowOnError>): HttpRequest<DummyAResponse> {\n        return (options?.client ?? client).requestOptions<DummyAResponse, ThrowOnError>({\n            responseStyle: 'data',\n            method: 'GET',\n            url: '/api/v{api-version}/multiple-tags/a',\n            ...options\n        });\n    }\n    \n    public dummyB<ThrowOnError extends boolean = false>(options?: Options<DummyBData, ThrowOnError>): HttpRequest<DummyBResponse> {\n        return (options?.client ?? client).requestOptions<DummyBResponse, ThrowOnError>({\n            responseStyle: 'data',\n            method: 'GET',\n            url: '/api/v{api-version}/multiple-tags/b',\n            ...options\n        });\n    }\n}\n\n@Injectable({ providedIn: 'root' })\nexport class MultipleTags2ServiceRequests {\n    public dummyA<ThrowOnError extends boolean = false>(options?: Options<DummyAData, ThrowOnError>): HttpRequest<DummyAResponse> {\n        return (options?.client ?? client).requestOptions<DummyAResponse, ThrowOnError>({\n            responseStyle: 'data',\n            method: 'GET',\n            url: '/api/v{api-version}/multiple-tags/a',\n            ...options\n        });\n    }\n    \n    public dummyB<ThrowOnError extends boolean = false>(options?: Options<DummyBData, ThrowOnError>): HttpRequest<DummyBResponse> {\n        return (options?.client ?? client).requestOptions<DummyBResponse, ThrowOnError>({\n            responseStyle: 'data',\n            method: 'GET',\n            url: '/api/v{api-version}/multiple-tags/b',\n            ...options\n        });\n    }\n}\n\n@Injectable({ providedIn: 'root' })\nexport class MultipleTags3ServiceRequests {\n    public dummyB<ThrowOnError extends boolean = false>(options?: Options<DummyBData, ThrowOnError>): HttpRequest<DummyBResponse> {\n        return (options?.client ?? client).requestOptions<DummyBResponse, ThrowOnError>({\n            responseStyle: 'data',\n            method: 'GET',\n            url: '/api/v{api-version}/multiple-tags/b',\n            ...options\n        });\n    }\n}\n\n@Injectable({ providedIn: 'root' })\nexport class CollectionFormatServiceRequests {\n    public collectionFormat<ThrowOnError extends boolean = false>(options: Options<CollectionFormatData, ThrowOnError>): HttpRequest<unknown> {\n        return (options?.client ?? client).requestOptions<unknown, ThrowOnError>({\n            responseStyle: 'data',\n            method: 'GET',\n            url: '/api/v{api-version}/collectionFormat',\n            ...options\n        });\n    }\n}\n\n@Injectable({ providedIn: 'root' })\nexport class TypesServiceRequests {\n    public types<ThrowOnError extends boolean = false>(options: Options<TypesData, ThrowOnError>): HttpRequest<TypesResponse> {\n        return (options?.client ?? client).requestOptions<TypesResponse, ThrowOnError>({\n            responseStyle: 'data',\n            method: 'GET',\n            url: '/api/v{api-version}/types',\n            ...options\n        });\n    }\n}\n\n@Injectable({ providedIn: 'root' })\nexport class UploadServiceRequests {\n    public uploadFile<ThrowOnError extends boolean = false>(options: Options<UploadFileData, ThrowOnError>): HttpRequest<UploadFileResponse> {\n        return (options?.client ?? client).requestOptions<UploadFileResponse, ThrowOnError>({\n            responseStyle: 'data',\n            method: 'POST',\n            url: '/api/v{api-version}/upload',\n            ...options\n        });\n    }\n}\n\n@Injectable({ providedIn: 'root' })\nexport class FileResponseServiceRequests {\n    public fileResponse<ThrowOnError extends boolean = false>(options: Options<FileResponseData, ThrowOnError>): HttpRequest<FileResponseResponse> {\n        return (options?.client ?? client).requestOptions<FileResponseResponse, ThrowOnError>({\n            responseStyle: 'data',\n            method: 'GET',\n            url: '/api/v{api-version}/file/{id}',\n            ...options\n        });\n    }\n}\n\n@Injectable({ providedIn: 'root' })\nexport class ComplexServiceRequests {\n    public complexTypes<ThrowOnError extends boolean = false>(options: Options<ComplexTypesData, ThrowOnError>): HttpRequest<ComplexTypesResponse> {\n        return (options?.client ?? client).requestOptions<ComplexTypesResponse, ThrowOnError>({\n            responseStyle: 'data',\n            method: 'GET',\n            url: '/api/v{api-version}/complex',\n            ...options\n        });\n    }\n    \n    public complexParams<ThrowOnError extends boolean = false>(options: Options<ComplexParamsData, ThrowOnError>): HttpRequest<ComplexParamsResponse> {\n        return (options?.client ?? client).requestOptions<ComplexParamsResponse, ThrowOnError>({\n            responseStyle: 'data',\n            method: 'PUT',\n            url: '/api/v{api-version}/complex/{id}',\n            ...options\n        });\n    }\n}\n\n@Injectable({ providedIn: 'root' })\nexport class MultipartServiceRequests {\n    public multipartResponse<ThrowOnError extends boolean = false>(options?: Options<MultipartResponseData, ThrowOnError>): HttpRequest<MultipartResponseResponse> {\n        return (options?.client ?? client).requestOptions<MultipartResponseResponse, ThrowOnError>({\n            responseStyle: 'data',\n            method: 'GET',\n            url: '/api/v{api-version}/multipart',\n            ...options\n        });\n    }\n    \n    public multipartRequest<ThrowOnError extends boolean = false>(options?: Options<MultipartRequestData, ThrowOnError>): HttpRequest<unknown> {\n        return (options?.client ?? client).requestOptions<unknown, ThrowOnError>({\n            responseStyle: 'data',\n            method: 'POST',\n            url: '/api/v{api-version}/multipart',\n            ...options\n        });\n    }\n}\n\n@Injectable({ providedIn: 'root' })\nexport class HeaderServiceRequests {\n    public callWithResultFromHeader<ThrowOnError extends boolean = false>(options?: Options<CallWithResultFromHeaderData, ThrowOnError>): HttpRequest<unknown> {\n        return (options?.client ?? client).requestOptions<unknown, ThrowOnError>({\n            responseStyle: 'data',\n            method: 'POST',\n            url: '/api/v{api-version}/header',\n            ...options\n        });\n    }\n}\n\n@Injectable({ providedIn: 'root' })\nexport class ErrorServiceRequests {\n    public testErrorCode<ThrowOnError extends boolean = false>(options: Options<TestErrorCodeData, ThrowOnError>): HttpRequest<unknown> {\n        return (options?.client ?? client).requestOptions<unknown, ThrowOnError>({\n            responseStyle: 'data',\n            method: 'POST',\n            url: '/api/v{api-version}/error',\n            ...options\n        });\n    }\n}\n\n@Injectable({ providedIn: 'root' })\nexport class NonAsciiÆøåÆøÅöôêÊServiceRequests {\n    public nonAsciiæøåÆøÅöôêÊ字符串<ThrowOnError extends boolean = false>(options: Options<NonAsciiæøåÆøÅöôêÊ字符串Data, ThrowOnError>): HttpRequest<NonAsciiæøåÆøÅöôêÊ字符串Response> {\n        return (options?.client ?? client).requestOptions<NonAsciiæøåÆøÅöôêÊ字符串Response, ThrowOnError>({\n            responseStyle: 'data',\n            method: 'POST',\n            url: '/api/v{api-version}/non-ascii-æøåÆØÅöôêÊ字符串',\n            ...options\n        });\n    }\n    \n    /**\n     * Login User\n     */\n    public putWithFormUrlEncoded<ThrowOnError extends boolean = false>(options: Options<PutWithFormUrlEncodedData, ThrowOnError>): HttpRequest<unknown> {\n        return (options?.client ?? client).requestOptions<unknown, ThrowOnError>({\n            responseStyle: 'data',\n            method: 'PUT',\n            url: '/api/v{api-version}/non-ascii-æøåÆØÅöôêÊ字符串',\n            ...options\n        });\n    }\n}\n\n@Injectable({ providedIn: 'root' })\nexport class DefaultServiceResources {\n    public export<ThrowOnError extends boolean = false>(options?: () => Options<ExportData, ThrowOnError> | undefined) {\n        return httpResource<unknown>(() => {\n            const opts = options ? options() : undefined;\n            return opts ? inject(DefaultServiceRequests).export(opts) : undefined;\n        });\n    }\n    \n    public patchApiVbyApiVersionNoTag<ThrowOnError extends boolean = false>(options?: () => Options<PatchApiVbyApiVersionNoTagData, ThrowOnError> | undefined) {\n        return httpResource<unknown>(() => {\n            const opts = options ? options() : undefined;\n            return opts ? inject(DefaultServiceRequests).patchApiVbyApiVersionNoTag(opts) : undefined;\n        });\n    }\n    \n    public import<ThrowOnError extends boolean = false>(options: () => Options<ImportData, ThrowOnError> | undefined) {\n        return httpResource<ImportResponse>(() => {\n            const opts = options ? options() : undefined;\n            return opts ? inject(DefaultServiceRequests).import(opts) : undefined;\n        });\n    }\n    \n    public fooWow<ThrowOnError extends boolean = false>(options?: () => Options<FooWowData, ThrowOnError> | undefined) {\n        return httpResource<unknown>(() => {\n            const opts = options ? options() : undefined;\n            return opts ? inject(DefaultServiceRequests).fooWow(opts) : undefined;\n        });\n    }\n    \n    public getApiVbyApiVersionSimpleOperation<ThrowOnError extends boolean = false>(options: () => Options<GetApiVbyApiVersionSimpleOperationData, ThrowOnError> | undefined) {\n        return httpResource<GetApiVbyApiVersionSimpleOperationResponse>(() => {\n            const opts = options ? options() : undefined;\n            return opts ? inject(DefaultServiceRequests).getApiVbyApiVersionSimpleOperation(opts) : undefined;\n        });\n    }\n}\n\nexport class ODataControllerService2 {\n    public count<ThrowOnError extends boolean = false>(options?: () => Options<ApiVVersionODataControllerCountData, ThrowOnError> | undefined) {\n        return httpResource<ApiVVersionODataControllerCountResponse>(() => {\n            const opts = options ? options() : undefined;\n            return opts ? inject(SimpleServiceRequests).apiService.vVersionService.oDataControllerService.count(opts) : undefined;\n        });\n    }\n}\n\nexport class VVersionService2 {\n    private _oDataControllerService?: ODataControllerService2;\n    get oDataControllerService(): ODataControllerService2 {\n        return this._oDataControllerService ??= new ODataControllerService2();\n    }\n}\n\nexport class ApiService2 {\n    private _vVersionService?: VVersionService2;\n    get vVersionService(): VVersionService2 {\n        return this._vVersionService ??= new VVersionService2();\n    }\n}\n\n@Injectable({ providedIn: 'root' })\nexport class SimpleServiceResources {\n    public deleteCallWithoutParametersAndResponse<ThrowOnError extends boolean = false>(options?: () => Options<DeleteCallWithoutParametersAndResponseData, ThrowOnError> | undefined) {\n        return httpResource<unknown>(() => {\n            const opts = options ? options() : undefined;\n            return opts ? inject(SimpleServiceRequests).deleteCallWithoutParametersAndResponse(opts) : undefined;\n        });\n    }\n    \n    public getCallWithoutParametersAndResponse<ThrowOnError extends boolean = false>(options?: () => Options<GetCallWithoutParametersAndResponseData, ThrowOnError> | undefined) {\n        return httpResource<unknown>(() => {\n            const opts = options ? options() : undefined;\n            return opts ? inject(SimpleServiceRequests).getCallWithoutParametersAndResponse(opts) : undefined;\n        });\n    }\n    \n    public headCallWithoutParametersAndResponse<ThrowOnError extends boolean = false>(options?: () => Options<HeadCallWithoutParametersAndResponseData, ThrowOnError> | undefined) {\n        return httpResource<unknown>(() => {\n            const opts = options ? options() : undefined;\n            return opts ? inject(SimpleServiceRequests).headCallWithoutParametersAndResponse(opts) : undefined;\n        });\n    }\n    \n    public optionsCallWithoutParametersAndResponse<ThrowOnError extends boolean = false>(options?: () => Options<OptionsCallWithoutParametersAndResponseData, ThrowOnError> | undefined) {\n        return httpResource<unknown>(() => {\n            const opts = options ? options() : undefined;\n            return opts ? inject(SimpleServiceRequests).optionsCallWithoutParametersAndResponse(opts) : undefined;\n        });\n    }\n    \n    public patchCallWithoutParametersAndResponse<ThrowOnError extends boolean = false>(options?: () => Options<PatchCallWithoutParametersAndResponseData, ThrowOnError> | undefined) {\n        return httpResource<unknown>(() => {\n            const opts = options ? options() : undefined;\n            return opts ? inject(SimpleServiceRequests).patchCallWithoutParametersAndResponse(opts) : undefined;\n        });\n    }\n    \n    public postCallWithoutParametersAndResponse<ThrowOnError extends boolean = false>(options?: () => Options<PostCallWithoutParametersAndResponseData, ThrowOnError> | undefined) {\n        return httpResource<unknown>(() => {\n            const opts = options ? options() : undefined;\n            return opts ? inject(SimpleServiceRequests).postCallWithoutParametersAndResponse(opts) : undefined;\n        });\n    }\n    \n    public putCallWithoutParametersAndResponse<ThrowOnError extends boolean = false>(options?: () => Options<PutCallWithoutParametersAndResponseData, ThrowOnError> | undefined) {\n        return httpResource<unknown>(() => {\n            const opts = options ? options() : undefined;\n            return opts ? inject(SimpleServiceRequests).putCallWithoutParametersAndResponse(opts) : undefined;\n        });\n    }\n    \n    private _apiService?: ApiService2;\n    get apiService(): ApiService2 {\n        return this._apiService ??= new ApiService2();\n    }\n}\n\n@Injectable({ providedIn: 'root' })\nexport class ParametersServiceResources {\n    public deleteFoo<ThrowOnError extends boolean = false>(options: () => Options<DeleteFooData3, ThrowOnError> | undefined) {\n        return httpResource<unknown>(() => {\n            const opts = options ? options() : undefined;\n            return opts ? inject(ParametersServiceRequests).deleteFoo(opts) : undefined;\n        });\n    }\n    \n    public callWithParameters<ThrowOnError extends boolean = false>(options: () => Options<CallWithParametersData, ThrowOnError> | undefined) {\n        return httpResource<unknown>(() => {\n            const opts = options ? options() : undefined;\n            return opts ? inject(ParametersServiceRequests).callWithParameters(opts) : undefined;\n        });\n    }\n    \n    public callWithWeirdParameterNames<ThrowOnError extends boolean = false>(options: () => Options<CallWithWeirdParameterNamesData, ThrowOnError> | undefined) {\n        return httpResource<unknown>(() => {\n            const opts = options ? options() : undefined;\n            return opts ? inject(ParametersServiceRequests).callWithWeirdParameterNames(opts) : undefined;\n        });\n    }\n    \n    public getCallWithOptionalParam<ThrowOnError extends boolean = false>(options: () => Options<GetCallWithOptionalParamData, ThrowOnError> | undefined) {\n        return httpResource<unknown>(() => {\n            const opts = options ? options() : undefined;\n            return opts ? inject(ParametersServiceRequests).getCallWithOptionalParam(opts) : undefined;\n        });\n    }\n    \n    public postCallWithOptionalParam<ThrowOnError extends boolean = false>(options: () => Options<PostCallWithOptionalParamData, ThrowOnError> | undefined) {\n        return httpResource<PostCallWithOptionalParamResponse>(() => {\n            const opts = options ? options() : undefined;\n            return opts ? inject(ParametersServiceRequests).postCallWithOptionalParam(opts) : undefined;\n        });\n    }\n}\n\n@Injectable({ providedIn: 'root' })\nexport class DescriptionsServiceResources {\n    public callWithDescriptions<ThrowOnError extends boolean = false>(options?: () => Options<CallWithDescriptionsData, ThrowOnError> | undefined) {\n        return httpResource<unknown>(() => {\n            const opts = options ? options() : undefined;\n            return opts ? inject(DescriptionsServiceRequests).callWithDescriptions(opts) : undefined;\n        });\n    }\n}\n\n@Injectable({ providedIn: 'root' })\nexport class DeprecatedServiceResources {\n    /**\n     * @deprecated\n     */\n    public deprecatedCall<ThrowOnError extends boolean = false>(options: () => Options<DeprecatedCallData, ThrowOnError> | undefined) {\n        return httpResource<unknown>(() => {\n            const opts = options ? options() : undefined;\n            return opts ? inject(DeprecatedServiceRequests).deprecatedCall(opts) : undefined;\n        });\n    }\n}\n\n@Injectable({ providedIn: 'root' })\nexport class RequestBodyServiceResources {\n    public postApiVbyApiVersionRequestBody<ThrowOnError extends boolean = false>(options?: () => Options<PostApiVbyApiVersionRequestBodyData, ThrowOnError> | undefined) {\n        return httpResource<unknown>(() => {\n            const opts = options ? options() : undefined;\n            return opts ? inject(RequestBodyServiceRequests).postApiVbyApiVersionRequestBody(opts) : undefined;\n        });\n    }\n}\n\n@Injectable({ providedIn: 'root' })\nexport class FormDataServiceResources {\n    public postApiVbyApiVersionFormData<ThrowOnError extends boolean = false>(options?: () => Options<PostApiVbyApiVersionFormDataData, ThrowOnError> | undefined) {\n        return httpResource<unknown>(() => {\n            const opts = options ? options() : undefined;\n            return opts ? inject(FormDataServiceRequests).postApiVbyApiVersionFormData(opts) : undefined;\n        });\n    }\n}\n\n@Injectable({ providedIn: 'root' })\nexport class DefaultsServiceResources {\n    public callWithDefaultParameters<ThrowOnError extends boolean = false>(options?: () => Options<CallWithDefaultParametersData, ThrowOnError> | undefined) {\n        return httpResource<unknown>(() => {\n            const opts = options ? options() : undefined;\n            return opts ? inject(DefaultsServiceRequests).callWithDefaultParameters(opts) : undefined;\n        });\n    }\n    \n    public callWithDefaultOptionalParameters<ThrowOnError extends boolean = false>(options?: () => Options<CallWithDefaultOptionalParametersData, ThrowOnError> | undefined) {\n        return httpResource<unknown>(() => {\n            const opts = options ? options() : undefined;\n            return opts ? inject(DefaultsServiceRequests).callWithDefaultOptionalParameters(opts) : undefined;\n        });\n    }\n    \n    public callToTestOrderOfParams<ThrowOnError extends boolean = false>(options: () => Options<CallToTestOrderOfParamsData, ThrowOnError> | undefined) {\n        return httpResource<unknown>(() => {\n            const opts = options ? options() : undefined;\n            return opts ? inject(DefaultsServiceRequests).callToTestOrderOfParams(opts) : undefined;\n        });\n    }\n}\n\n@Injectable({ providedIn: 'root' })\nexport class DuplicateServiceResources {\n    public duplicateName<ThrowOnError extends boolean = false>(options?: () => Options<DuplicateNameData, ThrowOnError> | undefined) {\n        return httpResource<unknown>(() => {\n            const opts = options ? options() : undefined;\n            return opts ? inject(DuplicateServiceRequests).duplicateName(opts) : undefined;\n        });\n    }\n    \n    public duplicateName2<ThrowOnError extends boolean = false>(options?: () => Options<DuplicateNameData, ThrowOnError> | undefined) {\n        return httpResource<unknown>(() => {\n            const opts = options ? options() : undefined;\n            return opts ? inject(DuplicateServiceRequests).duplicateName(opts) : undefined;\n        });\n    }\n    \n    public duplicateName22<ThrowOnError extends boolean = false>(options?: () => Options<DuplicateName2Data, ThrowOnError> | undefined) {\n        return httpResource<unknown>(() => {\n            const opts = options ? options() : undefined;\n            return opts ? inject(DuplicateServiceRequests).duplicateName22(opts) : undefined;\n        });\n    }\n    \n    public duplicateName3<ThrowOnError extends boolean = false>(options?: () => Options<DuplicateName3Data, ThrowOnError> | undefined) {\n        return httpResource<unknown>(() => {\n            const opts = options ? options() : undefined;\n            return opts ? inject(DuplicateServiceRequests).duplicateName3(opts) : undefined;\n        });\n    }\n    \n    public duplicateName4<ThrowOnError extends boolean = false>(options?: () => Options<DuplicateName4Data, ThrowOnError> | undefined) {\n        return httpResource<unknown>(() => {\n            const opts = options ? options() : undefined;\n            return opts ? inject(DuplicateServiceRequests).duplicateName4(opts) : undefined;\n        });\n    }\n}\n\n@Injectable({ providedIn: 'root' })\nexport class NoContentServiceResources {\n    public callWithNoContentResponse<ThrowOnError extends boolean = false>(options?: () => Options<CallWithNoContentResponseData, ThrowOnError> | undefined) {\n        return httpResource<CallWithNoContentResponseResponse>(() => {\n            const opts = options ? options() : undefined;\n            return opts ? inject(NoContentServiceRequests).callWithNoContentResponse(opts) : undefined;\n        });\n    }\n}\n\n@Injectable({ providedIn: 'root' })\nexport class ResponseServiceResources {\n    public callWithResponseAndNoContentResponse<ThrowOnError extends boolean = false>(options?: () => Options<CallWithResponseAndNoContentResponseData, ThrowOnError> | undefined) {\n        return httpResource<CallWithResponseAndNoContentResponseResponse>(() => {\n            const opts = options ? options() : undefined;\n            return opts ? inject(ResponseServiceRequests).callWithResponseAndNoContentResponse(opts) : undefined;\n        });\n    }\n    \n    public callWithResponse<ThrowOnError extends boolean = false>(options?: () => Options<CallWithResponseData, ThrowOnError> | undefined) {\n        return httpResource<CallWithResponseResponse>(() => {\n            const opts = options ? options() : undefined;\n            return opts ? inject(ResponseServiceRequests).callWithResponse(opts) : undefined;\n        });\n    }\n    \n    public callWithDuplicateResponses<ThrowOnError extends boolean = false>(options?: () => Options<CallWithDuplicateResponsesData, ThrowOnError> | undefined) {\n        return httpResource<CallWithDuplicateResponsesResponse>(() => {\n            const opts = options ? options() : undefined;\n            return opts ? inject(ResponseServiceRequests).callWithDuplicateResponses(opts) : undefined;\n        });\n    }\n    \n    public callWithResponses<ThrowOnError extends boolean = false>(options?: () => Options<CallWithResponsesData, ThrowOnError> | undefined) {\n        return httpResource<CallWithResponsesResponse>(() => {\n            const opts = options ? options() : undefined;\n            return opts ? inject(ResponseServiceRequests).callWithResponses(opts) : undefined;\n        });\n    }\n}\n\n@Injectable({ providedIn: 'root' })\nexport class NoContentServiceResources2 {\n    public callWithResponseAndNoContentResponse<ThrowOnError extends boolean = false>(options?: () => Options<CallWithResponseAndNoContentResponseData, ThrowOnError> | undefined) {\n        return httpResource<CallWithResponseAndNoContentResponseResponse>(() => {\n            const opts = options ? options() : undefined;\n            return opts ? inject(ResponseServiceRequests).callWithResponseAndNoContentResponse(opts) : undefined;\n        });\n    }\n}\n\n@Injectable({ providedIn: 'root' })\nexport class MultipleTags1ServiceResources {\n    public dummyA<ThrowOnError extends boolean = false>(options?: () => Options<DummyAData, ThrowOnError> | undefined) {\n        return httpResource<DummyAResponse>(() => {\n            const opts = options ? options() : undefined;\n            return opts ? inject(MultipleTags1ServiceRequests).dummyA(opts) : undefined;\n        });\n    }\n    \n    public dummyB<ThrowOnError extends boolean = false>(options?: () => Options<DummyBData, ThrowOnError> | undefined) {\n        return httpResource<DummyBResponse>(() => {\n            const opts = options ? options() : undefined;\n            return opts ? inject(MultipleTags1ServiceRequests).dummyB(opts) : undefined;\n        });\n    }\n}\n\n@Injectable({ providedIn: 'root' })\nexport class MultipleTags2ServiceResources {\n    public dummyA<ThrowOnError extends boolean = false>(options?: () => Options<DummyAData, ThrowOnError> | undefined) {\n        return httpResource<DummyAResponse>(() => {\n            const opts = options ? options() : undefined;\n            return opts ? inject(MultipleTags1ServiceRequests).dummyA(opts) : undefined;\n        });\n    }\n    \n    public dummyB<ThrowOnError extends boolean = false>(options?: () => Options<DummyBData, ThrowOnError> | undefined) {\n        return httpResource<DummyBResponse>(() => {\n            const opts = options ? options() : undefined;\n            return opts ? inject(MultipleTags1ServiceRequests).dummyB(opts) : undefined;\n        });\n    }\n}\n\n@Injectable({ providedIn: 'root' })\nexport class MultipleTags3ServiceResources {\n    public dummyB<ThrowOnError extends boolean = false>(options?: () => Options<DummyBData, ThrowOnError> | undefined) {\n        return httpResource<DummyBResponse>(() => {\n            const opts = options ? options() : undefined;\n            return opts ? inject(MultipleTags1ServiceRequests).dummyB(opts) : undefined;\n        });\n    }\n}\n\n@Injectable({ providedIn: 'root' })\nexport class CollectionFormatServiceResources {\n    public collectionFormat<ThrowOnError extends boolean = false>(options: () => Options<CollectionFormatData, ThrowOnError> | undefined) {\n        return httpResource<unknown>(() => {\n            const opts = options ? options() : undefined;\n            return opts ? inject(CollectionFormatServiceRequests).collectionFormat(opts) : undefined;\n        });\n    }\n}\n\n@Injectable({ providedIn: 'root' })\nexport class TypesServiceResources {\n    public types<ThrowOnError extends boolean = false>(options: () => Options<TypesData, ThrowOnError> | undefined) {\n        return httpResource<TypesResponse>(() => {\n            const opts = options ? options() : undefined;\n            return opts ? inject(TypesServiceRequests).types(opts) : undefined;\n        });\n    }\n}\n\n@Injectable({ providedIn: 'root' })\nexport class UploadServiceResources {\n    public uploadFile<ThrowOnError extends boolean = false>(options: () => Options<UploadFileData, ThrowOnError> | undefined) {\n        return httpResource<UploadFileResponse>(() => {\n            const opts = options ? options() : undefined;\n            return opts ? inject(UploadServiceRequests).uploadFile(opts) : undefined;\n        });\n    }\n}\n\n@Injectable({ providedIn: 'root' })\nexport class FileResponseServiceResources {\n    public fileResponse<ThrowOnError extends boolean = false>(options: () => Options<FileResponseData, ThrowOnError> | undefined) {\n        return httpResource<FileResponseResponse>(() => {\n            const opts = options ? options() : undefined;\n            return opts ? inject(FileResponseServiceRequests).fileResponse(opts) : undefined;\n        });\n    }\n}\n\n@Injectable({ providedIn: 'root' })\nexport class ComplexServiceResources {\n    public complexTypes<ThrowOnError extends boolean = false>(options: () => Options<ComplexTypesData, ThrowOnError> | undefined) {\n        return httpResource<ComplexTypesResponse>(() => {\n            const opts = options ? options() : undefined;\n            return opts ? inject(ComplexServiceRequests).complexTypes(opts) : undefined;\n        });\n    }\n    \n    public complexParams<ThrowOnError extends boolean = false>(options: () => Options<ComplexParamsData, ThrowOnError> | undefined) {\n        return httpResource<ComplexParamsResponse>(() => {\n            const opts = options ? options() : undefined;\n            return opts ? inject(ComplexServiceRequests).complexParams(opts) : undefined;\n        });\n    }\n}\n\n@Injectable({ providedIn: 'root' })\nexport class MultipartServiceResources {\n    public multipartResponse<ThrowOnError extends boolean = false>(options?: () => Options<MultipartResponseData, ThrowOnError> | undefined) {\n        return httpResource<MultipartResponseResponse>(() => {\n            const opts = options ? options() : undefined;\n            return opts ? inject(MultipartServiceRequests).multipartResponse(opts) : undefined;\n        });\n    }\n    \n    public multipartRequest<ThrowOnError extends boolean = false>(options?: () => Options<MultipartRequestData, ThrowOnError> | undefined) {\n        return httpResource<unknown>(() => {\n            const opts = options ? options() : undefined;\n            return opts ? inject(MultipartServiceRequests).multipartRequest(opts) : undefined;\n        });\n    }\n}\n\n@Injectable({ providedIn: 'root' })\nexport class HeaderServiceResources {\n    public callWithResultFromHeader<ThrowOnError extends boolean = false>(options?: () => Options<CallWithResultFromHeaderData, ThrowOnError> | undefined) {\n        return httpResource<unknown>(() => {\n            const opts = options ? options() : undefined;\n            return opts ? inject(HeaderServiceRequests).callWithResultFromHeader(opts) : undefined;\n        });\n    }\n}\n\n@Injectable({ providedIn: 'root' })\nexport class ErrorServiceResources {\n    public testErrorCode<ThrowOnError extends boolean = false>(options: () => Options<TestErrorCodeData, ThrowOnError> | undefined) {\n        return httpResource<unknown>(() => {\n            const opts = options ? options() : undefined;\n            return opts ? inject(ErrorServiceRequests).testErrorCode(opts) : undefined;\n        });\n    }\n}\n\n@Injectable({ providedIn: 'root' })\nexport class NonAsciiÆøåÆøÅöôêÊServiceResources {\n    public nonAsciiæøåÆøÅöôêÊ字符串<ThrowOnError extends boolean = false>(options: () => Options<NonAsciiæøåÆøÅöôêÊ字符串Data, ThrowOnError> | undefined) {\n        return httpResource<NonAsciiæøåÆøÅöôêÊ字符串Response>(() => {\n            const opts = options ? options() : undefined;\n            return opts ? inject(NonAsciiÆøåÆøÅöôêÊServiceRequests).nonAsciiæøåÆøÅöôêÊ字符串(opts) : undefined;\n        });\n    }\n    \n    /**\n     * Login User\n     */\n    public putWithFormUrlEncoded<ThrowOnError extends boolean = false>(options: () => Options<PutWithFormUrlEncodedData, ThrowOnError> | undefined) {\n        return httpResource<unknown>(() => {\n            const opts = options ? options() : undefined;\n            return opts ? inject(NonAsciiÆøåÆøÅöôêÊServiceRequests).putWithFormUrlEncoded(opts) : undefined;\n        });\n    }\n}\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@angular/common/default-class/client/client.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { HttpResponse } from '@angular/common/http';\nimport { HttpClient, HttpErrorResponse, HttpEventType, HttpRequest } from '@angular/common/http';\nimport {\n  assertInInjectionContext,\n  inject,\n  provideAppInitializer,\n  runInInjectionContext,\n} from '@angular/core';\nimport { firstValueFrom } from 'rxjs';\nimport { filter } from 'rxjs/operators';\n\nimport { createSseClient } from '../core/serverSentEvents.gen';\nimport type { HttpMethod } from '../core/types.gen';\nimport { getValidRequestBody } from '../core/utils.gen';\nimport type {\n  Client,\n  Config,\n  RequestOptions,\n  ResolvedRequestOptions,\n  ResponseStyle,\n} from './types.gen';\nimport {\n  buildUrl,\n  createConfig,\n  createInterceptors,\n  mergeConfigs,\n  mergeHeaders,\n  setAuthParams,\n} from './utils.gen';\n\nexport function provideHeyApiClient(client: Client) {\n  return provideAppInitializer(() => {\n    const httpClient = inject(HttpClient);\n    client.setConfig({ httpClient });\n  });\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<\n    HttpRequest<unknown>,\n    HttpResponse<unknown>,\n    unknown,\n    ResolvedRequestOptions\n  >();\n\n  const requestOptions = <\n    TData = unknown,\n    ThrowOnError extends boolean = false,\n    TResponseStyle extends ResponseStyle = 'fields',\n  >(\n    options: RequestOptions<TData, TResponseStyle, ThrowOnError>,\n  ) => {\n    const opts = {\n      ..._config,\n      ...options,\n      headers: mergeHeaders(_config.headers, options.headers),\n      httpClient: options.httpClient ?? _config.httpClient,\n      serializedBody: undefined as string | undefined,\n    };\n\n    if (!opts.httpClient) {\n      if (opts.injector) {\n        opts.httpClient = runInInjectionContext(opts.injector, () => inject(HttpClient));\n      } else {\n        assertInInjectionContext(requestOptions);\n        opts.httpClient = inject(HttpClient);\n      }\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 url = buildUrl(opts as any);\n\n    const req = new HttpRequest<unknown>(opts.method ?? 'GET', url, getValidRequestBody(opts), {\n      redirect: 'follow',\n      ...opts,\n    });\n\n    return { opts, req, url };\n  };\n\n  const beforeRequest = async (options: RequestOptions) => {\n    const { opts, req, url } = requestOptions(options);\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    return { opts, req, url };\n  };\n\n  const request: Client['request'] = async (options) => {\n    // @ts-expect-error\n    const { opts, req: initialReq } = await beforeRequest(options);\n\n    let req = initialReq;\n\n    for (const fn of interceptors.request.fns) {\n      if (fn) {\n        req = await fn(req, opts as any);\n      }\n    }\n\n    const result: {\n      request: HttpRequest<unknown>;\n      response: any;\n    } = {\n      request: req,\n      response: null,\n    };\n\n    try {\n      result.response = (await firstValueFrom(\n        opts\n          .httpClient!.request(req)\n          .pipe(filter((event) => event.type === HttpEventType.Response)),\n      )) as HttpResponse<unknown>;\n\n      for (const fn of interceptors.response.fns) {\n        if (fn) {\n          result.response = await fn(result.response, req, opts as any);\n        }\n      }\n\n      let bodyResponse = result.response.body;\n\n      if (opts.responseValidator) {\n        await opts.responseValidator(bodyResponse);\n      }\n\n      if (opts.responseTransformer) {\n        bodyResponse = await opts.responseTransformer(bodyResponse);\n      }\n\n      return opts.responseStyle === 'data' ? bodyResponse : { data: bodyResponse, ...result };\n    } catch (error) {\n      if (error instanceof HttpErrorResponse) {\n        result.response = error;\n      }\n\n      let finalError = error instanceof HttpErrorResponse ? error.error : error;\n\n      for (const fn of interceptors.error.fns) {\n        if (fn) {\n          finalError = (await fn(finalError, result.response as any, req, opts as any)) as string;\n        }\n      }\n\n      if (opts.throwOnError) {\n        throw finalError;\n      }\n\n      return opts.responseStyle === 'data'\n        ? undefined\n        : {\n            error: finalError,\n            ...result,\n          };\n    }\n  };\n\n  const makeMethodFn = (method: Uppercase<HttpMethod>) => (options: RequestOptions) =>\n    request({ ...options, method });\n\n  const makeSseFn = (method: Uppercase<HttpMethod>) => async (options: RequestOptions) => {\n    const { opts, url } = await beforeRequest(options);\n    return createSseClient({\n      ...opts,\n      body: opts.body as BodyInit | null | undefined,\n      headers: opts.headers as unknown as Record<string, string>,\n      method,\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    requestOptions: (options) => {\n      if (options.security) {\n        throw new Error('Security is not supported in requestOptions');\n      }\n\n      if (options.requestValidator) {\n        throw new Error('Request validation is not supported in requestOptions');\n      }\n\n      return requestOptions(options).req;\n    },\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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@angular/common/default-class/client/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type { Auth } from '../core/auth.gen';\nexport type { QuerySerializerOptions } from '../core/bodySerializer.gen';\nexport {\n  formDataBodySerializer,\n  jsonBodySerializer,\n  urlSearchParamsBodySerializer,\n} from '../core/bodySerializer.gen';\nexport { buildClientParams } from '../core/params.gen';\nexport { serializeQueryKeyValue } from '../core/queryKeySerializer.gen';\nexport { createClient } from './client.gen';\nexport type {\n  Client,\n  ClientOptions,\n  Config,\n  CreateClientConfig,\n  Options,\n  RequestOptions,\n  RequestResult,\n  ResolvedRequestOptions,\n  ResponseStyle,\n  TDataShape,\n} from './types.gen';\nexport { createConfig, mergeHeaders } from './utils.gen';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@angular/common/default-class/client/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type {\n  HttpClient,\n  HttpErrorResponse,\n  HttpHeaders,\n  HttpRequest,\n  HttpResponse,\n} from '@angular/common/http';\nimport type { Injector } from '@angular/core';\n\nimport type { Auth } from '../core/auth.gen';\nimport type {\n  ServerSentEventsOptions,\n  ServerSentEventsResult,\n} from '../core/serverSentEvents.gen';\nimport type { Client as CoreClient, Config as CoreConfig } from '../core/types.gen';\nimport type { Middleware } from './utils.gen';\n\nexport type ResponseStyle = 'data' | 'fields';\n\nexport interface Config<T extends ClientOptions = ClientOptions>\n  extends Omit<RequestInit, 'body' | 'headers' | 'method'>, Omit<CoreConfig, 'headers'> {\n  /**\n   * Base URL for all requests made by this client.\n   */\n  baseUrl?: T['baseUrl'];\n  /**\n   * An object containing any HTTP headers that you want to pre-populate your\n   * `HttpHeaders` object with.\n   *\n   * {@link https://angular.dev/api/common/http/HttpHeaders#constructor See more}\n   */\n  headers?:\n    | HttpHeaders\n    | Record<\n        string,\n        string | number | boolean | (string | number | boolean)[] | null | undefined | unknown\n      >;\n  /**\n   * The HTTP client to use for making requests.\n   */\n  httpClient?: HttpClient;\n  /**\n   * Should we return only data or multiple fields (data, error, response, etc.)?\n   *\n   * @default 'fields'\n   */\n  responseStyle?: ResponseStyle;\n\n  /**\n   * Throw an error instead of returning it in the response?\n   *\n   * @default false\n   */\n  throwOnError?: T['throwOnError'];\n}\n\nexport interface RequestOptions<\n  TData = unknown,\n  TResponseStyle extends ResponseStyle = 'fields',\n  ThrowOnError extends boolean = boolean,\n  Url extends string = string,\n>\n  extends\n    Config<{\n      responseStyle: TResponseStyle;\n      throwOnError: ThrowOnError;\n    }>,\n    Pick<\n      ServerSentEventsOptions<TData>,\n      | 'onRequest'\n      | 'onSseError'\n      | 'onSseEvent'\n      | 'sseDefaultRetryDelay'\n      | 'sseMaxRetryAttempts'\n      | 'sseMaxRetryDelay'\n    > {\n  /**\n   * Any body that you want to add to your request.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/fetch#body}\n   */\n  body?: unknown;\n  /**\n   * Optional custom injector for dependency resolution if you don't implicitly or explicitly provide one.\n   */\n  injector?: Injector;\n  path?: Record<string, unknown>;\n  query?: Record<string, unknown>;\n  /**\n   * Security mechanism(s) to use for the request.\n   */\n  security?: ReadonlyArray<Auth>;\n  url: Url;\n}\n\nexport interface ResolvedRequestOptions<\n  TResponseStyle extends ResponseStyle = 'fields',\n  ThrowOnError extends boolean = boolean,\n  Url extends string = string,\n> extends RequestOptions<unknown, TResponseStyle, ThrowOnError, Url> {\n  serializedBody?: string;\n}\n\nexport type RequestResult<\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = boolean,\n  TResponseStyle extends ResponseStyle = 'fields',\n> = Promise<\n  ThrowOnError extends true\n    ? TResponseStyle extends 'data'\n      ? TData extends Record<string, unknown>\n        ? TData[keyof TData]\n        : TData\n      : {\n          data: TData extends Record<string, unknown> ? TData[keyof TData] : TData;\n          request: HttpRequest<unknown>;\n          response: HttpResponse<TData>;\n        }\n    : TResponseStyle extends 'data'\n      ? (TData extends Record<string, unknown> ? TData[keyof TData] : TData) | undefined\n      :\n          | {\n              data: TData extends Record<string, unknown> ? TData[keyof TData] : TData;\n              error: undefined;\n              request: HttpRequest<unknown>;\n              response: HttpResponse<TData>;\n            }\n          | {\n              data: undefined;\n              error: TError[keyof TError];\n              request: HttpRequest<unknown>;\n              response: HttpErrorResponse & {\n                error: TError[keyof TError] | null;\n              };\n            }\n>;\n\nexport interface ClientOptions {\n  baseUrl?: string;\n  responseStyle?: ResponseStyle;\n  throwOnError?: boolean;\n}\n\ntype MethodFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'>,\n) => RequestResult<TData, TError, ThrowOnError, TResponseStyle>;\n\ntype SseFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'>,\n) => Promise<ServerSentEventsResult<TData, TError>>;\n\ntype RequestFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'> &\n    Pick<Required<RequestOptions<TData, TResponseStyle, ThrowOnError>>, 'method'>,\n) => RequestResult<TData, TError, ThrowOnError, TResponseStyle>;\n\ntype RequestOptionsFn = <\n  T,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: RequestOptions<T, TResponseStyle, ThrowOnError>,\n) => HttpRequest<T>;\n\ntype BuildUrlFn = <\n  TData extends {\n    body?: unknown;\n    path?: Record<string, unknown>;\n    query?: Record<string, unknown>;\n    url: string;\n  },\n>(\n  options: TData & Options<TData>,\n) => string;\n\nexport type Client = CoreClient<RequestFn, Config, MethodFn, BuildUrlFn, SseFn> & {\n  interceptors: Middleware<\n    HttpRequest<unknown>,\n    HttpResponse<unknown>,\n    unknown,\n    ResolvedRequestOptions\n  >;\n  requestOptions: RequestOptionsFn;\n};\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 = ClientOptions> = (\n  override?: Config<ClientOptions & T>,\n) => Config<Required<ClientOptions> & T>;\n\nexport interface TDataShape {\n  body?: unknown;\n  headers?: unknown;\n  path?: unknown;\n  query?: unknown;\n  url: string;\n}\n\ntype OmitKeys<T, K> = Pick<T, Exclude<keyof T, K>>;\n\nexport type Options<\n  TData extends TDataShape = TDataShape,\n  ThrowOnError extends boolean = boolean,\n  TResponse = unknown,\n  TResponseStyle extends ResponseStyle = 'fields',\n> = OmitKeys<\n  RequestOptions<TResponse, TResponseStyle, ThrowOnError>,\n  'body' | 'path' | 'query' | 'url'\n> &\n  ([TData] extends [never] ? unknown : Omit<TData, 'url'>);\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@angular/common/default-class/client/utils.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport { HttpHeaders } from '@angular/common/http';\n\nimport { getAuthToken } from '../core/auth.gen';\nimport type {\n  QuerySerializer,\n  QuerySerializerOptions,\n} from '../core/bodySerializer.gen';\nimport {\n  serializeArrayParam,\n  serializeObjectParam,\n  serializePrimitiveParam,\n} from '../core/pathSerializer.gen';\nimport type { Client, ClientOptions, Config, RequestOptions } from './types.gen';\n\ninterface PathSerializer {\n  path: Record<string, unknown>;\n  url: string;\n}\n\nconst PATH_PARAM_RE = /\\{[^{}]+\\}/g;\n\ntype ArrayStyle = 'form' | 'spaceDelimited' | 'pipeDelimited';\ntype MatrixStyle = 'label' | 'matrix' | 'simple';\ntype ArraySeparatorStyle = ArrayStyle | MatrixStyle;\n\nconst 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 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 = (\n  contentType: string | null,\n): 'blob' | 'formData' | 'json' | 'stream' | 'text' | undefined => {\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\nexport const setAuthParams = async (\n  options: Pick<Required<RequestOptions>, 'security'> &\n    Pick<RequestOptions, 'auth' | 'query'> & {\n      headers: HttpHeaders;\n    },\n) => {\n  for (const auth of options.security) {\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 = options.headers.append('Cookie', `${name}=${token}`);\n        break;\n      case 'header':\n      default:\n        options.headers = options.headers.set(name, token);\n        break;\n    }\n\n    return;\n  }\n};\n\nexport const buildUrl: Client['buildUrl'] = (options) => {\n  const url = 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  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 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\nexport const mergeHeaders = (\n  ...headers: Array<Required<Config>['headers'] | undefined>\n): HttpHeaders => {\n  let mergedHeaders = new HttpHeaders();\n\n  for (const header of headers) {\n    if (!header || typeof header !== 'object') {\n      continue;\n    }\n\n    if (header instanceof HttpHeaders) {\n      // Merge HttpHeaders instance\n      header.keys().forEach((key) => {\n        const values = header.getAll(key);\n        if (values) {\n          values.forEach((value) => {\n            mergedHeaders = mergedHeaders.append(key, value);\n          });\n        }\n      });\n    } else {\n      // Merge plain object headers\n      for (const [key, value] of Object.entries(header)) {\n        if (value === null) {\n          mergedHeaders = mergedHeaders.delete(key);\n        } else if (Array.isArray(value)) {\n          for (const v of value) {\n            mergedHeaders = 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 = mergedHeaders.set(\n            key,\n            typeof value === 'object' ? JSON.stringify(value) : (value as string),\n          );\n        }\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  headers: defaultHeaders,\n  querySerializer: defaultQuerySerializer,\n  ...override,\n});\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@angular/common/default-class/client.gen.ts",
    "content": "// 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: 'http://localhost:3000/base' }));\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@angular/common/default-class/core/auth.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@angular/common/default-class/core/bodySerializer.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@angular/common/default-class/core/params.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@angular/common/default-class/core/pathSerializer.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@angular/common/default-class/core/queryKeySerializer.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\n/**\n * JSON-friendly union that mirrors what Pinia Colada can hash.\n */\nexport type JsonValue =\n  | null\n  | string\n  | number\n  | boolean\n  | JsonValue[]\n  | { [key: string]: JsonValue };\n\n/**\n * Replacer that converts non-JSON values (bigint, Date, etc.) to safe substitutes.\n */\nexport const queryKeyJsonReplacer = (_key: string, value: unknown) => {\n  if (value === undefined || typeof value === 'function' || typeof value === 'symbol') {\n    return undefined;\n  }\n  if (typeof value === 'bigint') {\n    return value.toString();\n  }\n  if (value instanceof Date) {\n    return value.toISOString();\n  }\n  return value;\n};\n\n/**\n * Safely stringifies a value and parses it back into a JsonValue.\n */\nexport const stringifyToJsonValue = (input: unknown): JsonValue | undefined => {\n  try {\n    const json = JSON.stringify(input, queryKeyJsonReplacer);\n    if (json === undefined) {\n      return undefined;\n    }\n    return JSON.parse(json) as JsonValue;\n  } catch {\n    return undefined;\n  }\n};\n\n/**\n * Detects plain objects (including objects with a null prototype).\n */\nconst isPlainObject = (value: unknown): value is Record<string, unknown> => {\n  if (value === null || typeof value !== 'object') {\n    return false;\n  }\n  const prototype = Object.getPrototypeOf(value as object);\n  return prototype === Object.prototype || prototype === null;\n};\n\n/**\n * Turns URLSearchParams into a sorted JSON object for deterministic keys.\n */\nconst serializeSearchParams = (params: URLSearchParams): JsonValue => {\n  const entries = Array.from(params.entries()).sort(([a], [b]) => a.localeCompare(b));\n  const result: Record<string, JsonValue> = {};\n\n  for (const [key, value] of entries) {\n    const existing = result[key];\n    if (existing === undefined) {\n      result[key] = value;\n      continue;\n    }\n\n    if (Array.isArray(existing)) {\n      (existing as string[]).push(value);\n    } else {\n      result[key] = [existing, value];\n    }\n  }\n\n  return result;\n};\n\n/**\n * Normalizes any accepted value into a JSON-friendly shape for query keys.\n */\nexport const serializeQueryKeyValue = (value: unknown): JsonValue | undefined => {\n  if (value === null) {\n    return null;\n  }\n\n  if (typeof value === 'string' || typeof value === 'number' || typeof value === 'boolean') {\n    return value;\n  }\n\n  if (value === undefined || typeof value === 'function' || typeof value === 'symbol') {\n    return undefined;\n  }\n\n  if (typeof value === 'bigint') {\n    return value.toString();\n  }\n\n  if (value instanceof Date) {\n    return value.toISOString();\n  }\n\n  if (Array.isArray(value)) {\n    return stringifyToJsonValue(value);\n  }\n\n  if (typeof URLSearchParams !== 'undefined' && value instanceof URLSearchParams) {\n    return serializeSearchParams(value);\n  }\n\n  if (isPlainObject(value)) {\n    return stringifyToJsonValue(value);\n  }\n\n  return undefined;\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@angular/common/default-class/core/serverSentEvents.gen.ts",
    "content": "// 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 const 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            // Normalize line endings: CRLF -> LF, then CR -> LF\n            buffer = buffer.replace(/\\r\\n/g, '\\n').replace(/\\r/g, '\\n');\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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@angular/common/default-class/core/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { Auth, AuthToken } from './auth.gen';\nimport type { BodySerializer, QuerySerializer, QuerySerializerOptions } from './bodySerializer.gen';\n\nexport type HttpMethod =\n  | 'connect'\n  | 'delete'\n  | 'get'\n  | 'head'\n  | 'options'\n  | 'patch'\n  | 'post'\n  | 'put'\n  | 'trace';\n\nexport type Client<\n  RequestFn = never,\n  Config = unknown,\n  MethodFn = never,\n  BuildUrlFn = never,\n  SseFn = never,\n> = {\n  /**\n   * Returns the final request URL.\n   */\n  buildUrl: BuildUrlFn;\n  getConfig: () => Config;\n  request: RequestFn;\n  setConfig: (config: Config) => Config;\n} & {\n  [K in HttpMethod]: MethodFn;\n} & ([SseFn] extends [never] ? { sse?: never } : { sse: { [K in HttpMethod]: SseFn } });\n\nexport interface Config {\n  /**\n   * Auth token or a function returning auth token. The resolved value will be\n   * added to the request payload as defined by its `security` array.\n   */\n  auth?: ((auth: Auth) => Promise<AuthToken> | AuthToken) | AuthToken;\n  /**\n   * A function for serializing request body parameter. By default,\n   * {@link JSON.stringify()} will be used.\n   */\n  bodySerializer?: BodySerializer | null;\n  /**\n   * An object containing any HTTP headers that you want to pre-populate your\n   * `Headers` object with.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/Headers/Headers#init See more}\n   */\n  headers?:\n    | RequestInit['headers']\n    | Record<\n        string,\n        string | number | boolean | (string | number | boolean)[] | null | undefined | unknown\n      >;\n  /**\n   * The request method.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/fetch#method See more}\n   */\n  method?: Uppercase<HttpMethod>;\n  /**\n   * A function for serializing request query parameters. By default, arrays\n   * will be exploded in form style, objects will be exploded in deepObject\n   * style, and reserved characters are percent-encoded.\n   *\n   * This method will have no effect if the native `paramsSerializer()` Axios\n   * API function is used.\n   *\n   * {@link https://swagger.io/docs/specification/serialization/#query View examples}\n   */\n  querySerializer?: QuerySerializer | QuerySerializerOptions;\n  /**\n   * A function validating request data. This is useful if you want to ensure\n   * the request conforms to the desired shape, so it can be safely sent to\n   * the server.\n   */\n  requestValidator?: (data: unknown) => Promise<unknown>;\n  /**\n   * A function transforming response data before it's returned. This is useful\n   * for post-processing data, e.g. converting ISO strings into Date objects.\n   */\n  responseTransformer?: (data: unknown) => Promise<unknown>;\n  /**\n   * A function validating response data. This is useful if you want to ensure\n   * the response conforms to the desired shape, so it can be safely passed to\n   * the transformers and returned to the user.\n   */\n  responseValidator?: (data: unknown) => Promise<unknown>;\n}\n\ntype IsExactlyNeverOrNeverUndefined<T> = [T] extends [never]\n  ? true\n  : [T] extends [never | undefined]\n    ? [undefined] extends [T]\n      ? false\n      : true\n    : false;\n\nexport type OmitNever<T extends Record<string, unknown>> = {\n  [K in keyof T as IsExactlyNeverOrNeverUndefined<T[K]> extends true ? never : K]: T[K];\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@angular/common/default-class/core/utils.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@angular/common/default-class/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport { apiVVersionODataControllerCount, callToTestOrderOfParams, callWithDefaultOptionalParameters, callWithDefaultParameters, callWithDescriptions, callWithDuplicateResponses, callWithNoContentResponse, callWithParameters, callWithResponse, callWithResponseAndNoContentResponse, callWithResponses, callWithResultFromHeader, callWithWeirdParameterNames, collectionFormat, complexParams, complexTypes, deleteCallWithoutParametersAndResponse, deleteFoo, deprecatedCall, dummyA, dummyB, duplicateName, duplicateName2, duplicateName3, duplicateName4, export_, fileResponse, fooWow, getApiVbyApiVersionSimpleOperation, getCallWithOptionalParam, getCallWithoutParametersAndResponse, headCallWithoutParametersAndResponse, import_, multipartRequest, multipartResponse, nonAsciiæøåÆøÅöôêÊ字符串, type Options, optionsCallWithoutParametersAndResponse, patchApiVbyApiVersionNoTag, patchCallWithoutParametersAndResponse, postApiVbyApiVersionFormData, postApiVbyApiVersionRequestBody, postCallWithOptionalParam, postCallWithoutParametersAndResponse, putCallWithoutParametersAndResponse, putWithFormUrlEncoded, testErrorCode, types, uploadFile } from './sdk.gen';\nexport type { _3eNum1Период, _400, AdditionalPropertiesIntegerIssue, AdditionalPropertiesUnknownIssue, AdditionalPropertiesUnknownIssue2, AdditionalPropertiesUnknownIssue3, AdditionalPropertiesUnknownIssueWritable, AnyOfAnyAndNull, AnyOfArrays, ApiVVersionODataControllerCountData, ApiVVersionODataControllerCountResponse, ApiVVersionODataControllerCountResponses, ArrayWithAnyOfProperties, ArrayWithArray, ArrayWithBooleans, ArrayWithNumbers, ArrayWithProperties, ArrayWithReferences, ArrayWithStrings, CallToTestOrderOfParamsData, CallWithDefaultOptionalParametersData, CallWithDefaultParametersData, CallWithDescriptionsData, CallWithDuplicateResponsesData, CallWithDuplicateResponsesError, CallWithDuplicateResponsesErrors, CallWithDuplicateResponsesResponse, CallWithDuplicateResponsesResponses, CallWithNoContentResponseData, CallWithNoContentResponseResponse, CallWithNoContentResponseResponses, CallWithParametersData, CallWithResponseAndNoContentResponseData, CallWithResponseAndNoContentResponseResponse, CallWithResponseAndNoContentResponseResponses, CallWithResponseData, CallWithResponseResponse, CallWithResponseResponses, CallWithResponsesData, CallWithResponsesError, CallWithResponsesErrors, CallWithResponsesResponse, CallWithResponsesResponses, CallWithResultFromHeaderData, CallWithResultFromHeaderErrors, CallWithResultFromHeaderResponses, CallWithWeirdParameterNamesData, CamelCaseCommentWithBreaks, CharactersInDescription, ClientOptions, CollectionFormatData, CommentWithBackticks, CommentWithBackticksAndQuotes, CommentWithBreaks, CommentWithExpressionPlaceholders, CommentWithQuotes, CommentWithReservedCharacters, CommentWithSlashes, ComplexParamsData, ComplexParamsResponse, ComplexParamsResponses, ComplexTypesData, ComplexTypesErrors, ComplexTypesResponse, ComplexTypesResponses, CompositionBaseModel, CompositionExtendedModel, CompositionWithAllOfAndNullable, CompositionWithAnyOf, CompositionWithAnyOfAndNullable, CompositionWithAnyOfAnonymous, CompositionWithNestedAnyAndTypeNull, CompositionWithNestedAnyOfAndNull, CompositionWithOneOf, CompositionWithOneOfAndComplexArrayDictionary, CompositionWithOneOfAndNullable, CompositionWithOneOfAndProperties, CompositionWithOneOfAndSimpleArrayDictionary, CompositionWithOneOfAndSimpleDictionary, CompositionWithOneOfAnonymous, CompositionWithOneOfDiscriminator, ConstValue, Default, DeleteCallWithoutParametersAndResponseData, DeleteFooData, DeleteFooData2, DeleteFooData3, DeprecatedCallData, DeprecatedModel, DictionaryWithArray, DictionaryWithDictionary, DictionaryWithProperties, DictionaryWithPropertiesAndAdditionalProperties, DictionaryWithReference, DictionaryWithString, DummyAData, DummyAResponse, DummyAResponses, DummyBData, DummyBResponse, DummyBResponses, DuplicateName2Data, DuplicateName3Data, DuplicateName4Data, DuplicateNameData, EnumFromDescription, EnumWithExtensions, EnumWithNumbers, EnumWithReplacedCharacters, EnumWithStrings, EnumWithXEnumNames, ExportData, ExternalRefA, ExternalRefB, ExternalSharedModel, File, FileResponseData, FileResponseResponse, FileResponseResponses, FileWritable, FooWowData, FooWowResponses, FreeFormObjectWithAdditionalPropertiesEqEmptyObject, FreeFormObjectWithAdditionalPropertiesEqTrue, FreeFormObjectWithoutAdditionalProperties, GenericSchemaDuplicateIssue1SystemBoolean, GenericSchemaDuplicateIssue1SystemBooleanWritable, GenericSchemaDuplicateIssue1SystemString, GenericSchemaDuplicateIssue1SystemStringWritable, GetApiVbyApiVersionSimpleOperationData, GetApiVbyApiVersionSimpleOperationError, GetApiVbyApiVersionSimpleOperationErrors, GetApiVbyApiVersionSimpleOperationResponse, GetApiVbyApiVersionSimpleOperationResponses, GetCallWithOptionalParamData, GetCallWithoutParametersAndResponseData, HeadCallWithoutParametersAndResponseData, Import, ImportData, ImportResponse, ImportResponses, IoK8sApimachineryPkgApisMetaV1DeleteOptions, IoK8sApimachineryPkgApisMetaV1Preconditions, ModelCircle, ModelFromZendesk, ModelSquare, ModelThatExtends, ModelThatExtendsExtends, ModelWithAdditionalPropertiesEqTrue, ModelWithAdditionalPropertiesRef, ModelWithAnyOfConstantSizeArray, ModelWithAnyOfConstantSizeArrayAndIntersect, ModelWithAnyOfConstantSizeArrayNullable, ModelWithAnyOfConstantSizeArrayWithNSizeAndOptions, ModelWithAnyOfConstantSizeArrayWithNSizeAndOptionsWritable, ModelWithArray, ModelWithArrayReadOnlyAndWriteOnly, ModelWithArrayReadOnlyAndWriteOnlyWritable, ModelWithBackticksInDescription, ModelWithBoolean, ModelWithCircularReference, ModelWithConst, ModelWithConstantSizeArray, ModelWithDictionary, ModelWithDuplicateImports, ModelWithDuplicateProperties, ModelWithEnum, ModelWithEnumFromDescription, ModelWithEnumWithHyphen, ModelWithInteger, ModelWithNestedArrayEnums, ModelWithNestedArrayEnumsData, ModelWithNestedArrayEnumsDataBar, ModelWithNestedArrayEnumsDataFoo, ModelWithNestedCompositionEnums, ModelWithNestedEnums, ModelWithNestedProperties, ModelWithNullableObject, ModelWithNullableString, ModelWithNumericEnumUnion, ModelWithOneOfAndProperties, ModelWithOneOfEnum, ModelWithOrderedProperties, ModelWithPattern, ModelWithPatternWritable, ModelWithPrefixItemsConstantSizeArray, ModelWithProperties, ModelWithPropertiesWritable, ModelWithReadOnlyAndWriteOnly, ModelWithReadOnlyAndWriteOnlyWritable, ModelWithReference, ModelWithReferenceWritable, ModelWithString, ModelWithStringError, MultipartRequestData, MultipartResponseData, MultipartResponseResponse, MultipartResponseResponses, NestedAnyOfArraysNullable, NonAsciiæøåÆøÅöôêÊ字符串Data, NonAsciiæøåÆøÅöôêÊ字符串Response, NonAsciiæøåÆøÅöôêÊ字符串Responses, NonAsciiStringæøåÆøÅöôêÊ字符串, NullableObject, OneOfAllOfIssue, OneOfAllOfIssueWritable, OptionsCallWithoutParametersAndResponseData, Pageable, ParameterSimpleParameterUnused, PatchApiVbyApiVersionNoTagData, PatchApiVbyApiVersionNoTagResponses, PatchCallWithoutParametersAndResponseData, PostApiVbyApiVersionFormDataData, PostApiVbyApiVersionRequestBodyData, PostCallWithOptionalParamData, PostCallWithOptionalParamResponse, PostCallWithOptionalParamResponses, PostCallWithoutParametersAndResponseData, PostServiceWithEmptyTagResponse, PostServiceWithEmptyTagResponse2, PutCallWithoutParametersAndResponseData, PutWithFormUrlEncodedData, SchemaWithFormRestrictedKeys, SimpleBoolean, SimpleFile, SimpleFormData, SimpleInteger, SimpleParameter, SimpleReference, SimpleRequestBody, SimpleString, SimpleStringWithPattern, TestErrorCodeData, TestErrorCodeErrors, TestErrorCodeResponses, TypesData, TypesResponse, TypesResponses, UploadFileData, UploadFileResponse, UploadFileResponses, XFooBar } from './types.gen';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@angular/common/default-class/sdk.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport { type Client, formDataBodySerializer, type Options as Options2, type TDataShape, urlSearchParamsBodySerializer } from './client';\nimport { client } from './client.gen';\nimport type { ApiVVersionODataControllerCountData, ApiVVersionODataControllerCountResponses, CallToTestOrderOfParamsData, CallWithDefaultOptionalParametersData, CallWithDefaultParametersData, CallWithDescriptionsData, CallWithDuplicateResponsesData, CallWithDuplicateResponsesErrors, CallWithDuplicateResponsesResponses, CallWithNoContentResponseData, CallWithNoContentResponseResponses, CallWithParametersData, CallWithResponseAndNoContentResponseData, CallWithResponseAndNoContentResponseResponses, CallWithResponseData, CallWithResponseResponses, CallWithResponsesData, CallWithResponsesErrors, CallWithResponsesResponses, CallWithResultFromHeaderData, CallWithResultFromHeaderErrors, CallWithResultFromHeaderResponses, CallWithWeirdParameterNamesData, CollectionFormatData, ComplexParamsData, ComplexParamsResponses, ComplexTypesData, ComplexTypesErrors, ComplexTypesResponses, DeleteCallWithoutParametersAndResponseData, DeleteFooData3, DeprecatedCallData, DummyAData, DummyAResponses, DummyBData, DummyBResponses, DuplicateName2Data, DuplicateName3Data, DuplicateName4Data, DuplicateNameData, ExportData, FileResponseData, FileResponseResponses, FooWowData, FooWowResponses, GetApiVbyApiVersionSimpleOperationData, GetApiVbyApiVersionSimpleOperationErrors, GetApiVbyApiVersionSimpleOperationResponses, GetCallWithOptionalParamData, GetCallWithoutParametersAndResponseData, HeadCallWithoutParametersAndResponseData, ImportData, ImportResponses, MultipartRequestData, MultipartResponseData, MultipartResponseResponses, NonAsciiæøåÆøÅöôêÊ字符串Data, NonAsciiæøåÆøÅöôêÊ字符串Responses, OptionsCallWithoutParametersAndResponseData, PatchApiVbyApiVersionNoTagData, PatchApiVbyApiVersionNoTagResponses, PatchCallWithoutParametersAndResponseData, PostApiVbyApiVersionFormDataData, PostApiVbyApiVersionRequestBodyData, PostCallWithOptionalParamData, PostCallWithOptionalParamResponses, PostCallWithoutParametersAndResponseData, PutCallWithoutParametersAndResponseData, PutWithFormUrlEncodedData, TestErrorCodeData, TestErrorCodeErrors, TestErrorCodeResponses, TypesData, TypesResponses, UploadFileData, UploadFileResponses } from './types.gen';\n\nexport type Options<TData extends TDataShape = TDataShape, ThrowOnError extends boolean = boolean> = Options2<TData, ThrowOnError> & {\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\nexport const export_ = <ThrowOnError extends boolean = false>(options?: Options<ExportData, ThrowOnError>) => (options?.client ?? client).get<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/no+tag', ...options });\n\nexport const patchApiVbyApiVersionNoTag = <ThrowOnError extends boolean = false>(options?: Options<PatchApiVbyApiVersionNoTagData, ThrowOnError>) => (options?.client ?? client).patch<PatchApiVbyApiVersionNoTagResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/no+tag', ...options });\n\nexport const import_ = <ThrowOnError extends boolean = false>(options: Options<ImportData, ThrowOnError>) => (options.client ?? client).post<ImportResponses, unknown, ThrowOnError>({\n    url: '/api/v{api-version}/no+tag',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options.headers\n    }\n});\n\nexport const fooWow = <ThrowOnError extends boolean = false>(options?: Options<FooWowData, ThrowOnError>) => (options?.client ?? client).put<FooWowResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/no+tag', ...options });\n\nexport const apiVVersionODataControllerCount = <ThrowOnError extends boolean = false>(options?: Options<ApiVVersionODataControllerCountData, ThrowOnError>) => (options?.client ?? client).get<ApiVVersionODataControllerCountResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple/$count', ...options });\n\nexport const getApiVbyApiVersionSimpleOperation = <ThrowOnError extends boolean = false>(options: Options<GetApiVbyApiVersionSimpleOperationData, ThrowOnError>) => (options.client ?? client).get<GetApiVbyApiVersionSimpleOperationResponses, GetApiVbyApiVersionSimpleOperationErrors, ThrowOnError>({ url: '/api/v{api-version}/simple:operation', ...options });\n\nexport const deleteCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<DeleteCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).delete<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const getCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<GetCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).get<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const headCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<HeadCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).head<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const optionsCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<OptionsCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).options<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const patchCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<PatchCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).patch<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const postCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<PostCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).post<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const putCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<PutCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).put<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const deleteFoo = <ThrowOnError extends boolean = false>(options: Options<DeleteFooData3, ThrowOnError>) => (options.client ?? client).delete<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/foo/{foo_param}/bar/{BarParam}', ...options });\n\nexport const callWithDescriptions = <ThrowOnError extends boolean = false>(options?: Options<CallWithDescriptionsData, ThrowOnError>) => (options?.client ?? client).post<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/descriptions', ...options });\n\n/**\n * @deprecated\n */\nexport const deprecatedCall = <ThrowOnError extends boolean = false>(options: Options<DeprecatedCallData, ThrowOnError>) => (options.client ?? client).post<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/parameters/deprecated', ...options });\n\nexport const callWithParameters = <ThrowOnError extends boolean = false>(options: Options<CallWithParametersData, ThrowOnError>) => (options.client ?? client).post<unknown, unknown, ThrowOnError>({\n    url: '/api/v{api-version}/parameters/{parameterPath}',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options.headers\n    }\n});\n\nexport const callWithWeirdParameterNames = <ThrowOnError extends boolean = false>(options: Options<CallWithWeirdParameterNamesData, ThrowOnError>) => (options.client ?? client).post<unknown, unknown, ThrowOnError>({\n    url: '/api/v{api-version}/parameters/{parameter.path.1}/{parameter-path-2}/{PARAMETER-PATH-3}',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options.headers\n    }\n});\n\nexport const getCallWithOptionalParam = <ThrowOnError extends boolean = false>(options: Options<GetCallWithOptionalParamData, ThrowOnError>) => (options.client ?? client).get<unknown, unknown, ThrowOnError>({\n    url: '/api/v{api-version}/parameters',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options.headers\n    }\n});\n\nexport const postCallWithOptionalParam = <ThrowOnError extends boolean = false>(options: Options<PostCallWithOptionalParamData, ThrowOnError>) => (options.client ?? client).post<PostCallWithOptionalParamResponses, unknown, ThrowOnError>({\n    url: '/api/v{api-version}/parameters',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options.headers\n    }\n});\n\nexport const postApiVbyApiVersionRequestBody = <ThrowOnError extends boolean = false>(options?: Options<PostApiVbyApiVersionRequestBodyData, ThrowOnError>) => (options?.client ?? client).post<unknown, unknown, ThrowOnError>({\n    url: '/api/v{api-version}/requestBody',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options?.headers\n    }\n});\n\nexport const postApiVbyApiVersionFormData = <ThrowOnError extends boolean = false>(options?: Options<PostApiVbyApiVersionFormDataData, ThrowOnError>) => (options?.client ?? client).post<unknown, unknown, ThrowOnError>({\n    ...formDataBodySerializer,\n    url: '/api/v{api-version}/formData',\n    ...options,\n    headers: {\n        'Content-Type': null,\n        ...options?.headers\n    }\n});\n\nexport const callWithDefaultParameters = <ThrowOnError extends boolean = false>(options?: Options<CallWithDefaultParametersData, ThrowOnError>) => (options?.client ?? client).get<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/defaults', ...options });\n\nexport const callWithDefaultOptionalParameters = <ThrowOnError extends boolean = false>(options?: Options<CallWithDefaultOptionalParametersData, ThrowOnError>) => (options?.client ?? client).post<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/defaults', ...options });\n\nexport const callToTestOrderOfParams = <ThrowOnError extends boolean = false>(options: Options<CallToTestOrderOfParamsData, ThrowOnError>) => (options.client ?? client).put<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/defaults', ...options });\n\nexport const duplicateName = <ThrowOnError extends boolean = false>(options?: Options<DuplicateNameData, ThrowOnError>) => (options?.client ?? client).delete<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/duplicate', ...options });\n\nexport const duplicateName2 = <ThrowOnError extends boolean = false>(options?: Options<DuplicateName2Data, ThrowOnError>) => (options?.client ?? client).get<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/duplicate', ...options });\n\nexport const duplicateName3 = <ThrowOnError extends boolean = false>(options?: Options<DuplicateName3Data, ThrowOnError>) => (options?.client ?? client).post<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/duplicate', ...options });\n\nexport const duplicateName4 = <ThrowOnError extends boolean = false>(options?: Options<DuplicateName4Data, ThrowOnError>) => (options?.client ?? client).put<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/duplicate', ...options });\n\nexport const callWithNoContentResponse = <ThrowOnError extends boolean = false>(options?: Options<CallWithNoContentResponseData, ThrowOnError>) => (options?.client ?? client).get<CallWithNoContentResponseResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/no-content', ...options });\n\nexport const callWithResponseAndNoContentResponse = <ThrowOnError extends boolean = false>(options?: Options<CallWithResponseAndNoContentResponseData, ThrowOnError>) => (options?.client ?? client).get<CallWithResponseAndNoContentResponseResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/multiple-tags/response-and-no-content', ...options });\n\nexport const dummyA = <ThrowOnError extends boolean = false>(options?: Options<DummyAData, ThrowOnError>) => (options?.client ?? client).get<DummyAResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/multiple-tags/a', ...options });\n\nexport const dummyB = <ThrowOnError extends boolean = false>(options?: Options<DummyBData, ThrowOnError>) => (options?.client ?? client).get<DummyBResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/multiple-tags/b', ...options });\n\nexport const callWithResponse = <ThrowOnError extends boolean = false>(options?: Options<CallWithResponseData, ThrowOnError>) => (options?.client ?? client).get<CallWithResponseResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/response', ...options });\n\nexport const callWithDuplicateResponses = <ThrowOnError extends boolean = false>(options?: Options<CallWithDuplicateResponsesData, ThrowOnError>) => (options?.client ?? client).post<CallWithDuplicateResponsesResponses, CallWithDuplicateResponsesErrors, ThrowOnError>({ url: '/api/v{api-version}/response', ...options });\n\nexport const callWithResponses = <ThrowOnError extends boolean = false>(options?: Options<CallWithResponsesData, ThrowOnError>) => (options?.client ?? client).put<CallWithResponsesResponses, CallWithResponsesErrors, ThrowOnError>({ url: '/api/v{api-version}/response', ...options });\n\nexport const collectionFormat = <ThrowOnError extends boolean = false>(options: Options<CollectionFormatData, ThrowOnError>) => (options.client ?? client).get<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/collectionFormat', ...options });\n\nexport const types = <ThrowOnError extends boolean = false>(options: Options<TypesData, ThrowOnError>) => (options.client ?? client).get<TypesResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/types', ...options });\n\nexport const uploadFile = <ThrowOnError extends boolean = false>(options: Options<UploadFileData, ThrowOnError>) => (options.client ?? client).post<UploadFileResponses, unknown, ThrowOnError>({\n    ...urlSearchParamsBodySerializer,\n    url: '/api/v{api-version}/upload',\n    ...options,\n    headers: {\n        'Content-Type': 'application/x-www-form-urlencoded',\n        ...options.headers\n    }\n});\n\nexport const fileResponse = <ThrowOnError extends boolean = false>(options: Options<FileResponseData, ThrowOnError>) => (options.client ?? client).get<FileResponseResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/file/{id}', ...options });\n\nexport const complexTypes = <ThrowOnError extends boolean = false>(options: Options<ComplexTypesData, ThrowOnError>) => (options.client ?? client).get<ComplexTypesResponses, ComplexTypesErrors, ThrowOnError>({\n    querySerializer: { parameters: { parameterObject: { object: { style: 'form' } } } },\n    url: '/api/v{api-version}/complex',\n    ...options\n});\n\nexport const multipartResponse = <ThrowOnError extends boolean = false>(options?: Options<MultipartResponseData, ThrowOnError>) => (options?.client ?? client).get<MultipartResponseResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/multipart', ...options });\n\nexport const multipartRequest = <ThrowOnError extends boolean = false>(options?: Options<MultipartRequestData, ThrowOnError>) => (options?.client ?? client).post<unknown, unknown, ThrowOnError>({\n    ...formDataBodySerializer,\n    url: '/api/v{api-version}/multipart',\n    ...options,\n    headers: {\n        'Content-Type': null,\n        ...options?.headers\n    }\n});\n\nexport const complexParams = <ThrowOnError extends boolean = false>(options: Options<ComplexParamsData, ThrowOnError>) => (options.client ?? client).put<ComplexParamsResponses, unknown, ThrowOnError>({\n    url: '/api/v{api-version}/complex/{id}',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json-patch+json',\n        ...options.headers\n    }\n});\n\nexport const callWithResultFromHeader = <ThrowOnError extends boolean = false>(options?: Options<CallWithResultFromHeaderData, ThrowOnError>) => (options?.client ?? client).post<CallWithResultFromHeaderResponses, CallWithResultFromHeaderErrors, ThrowOnError>({ url: '/api/v{api-version}/header', ...options });\n\nexport const testErrorCode = <ThrowOnError extends boolean = false>(options: Options<TestErrorCodeData, ThrowOnError>) => (options.client ?? client).post<TestErrorCodeResponses, TestErrorCodeErrors, ThrowOnError>({ url: '/api/v{api-version}/error', ...options });\n\nexport const nonAsciiæøåÆøÅöôêÊ字符串 = <ThrowOnError extends boolean = false>(options: Options<NonAsciiæøåÆøÅöôêÊ字符串Data, ThrowOnError>) => (options.client ?? client).post<NonAsciiæøåÆøÅöôêÊ字符串Responses, unknown, ThrowOnError>({ url: '/api/v{api-version}/non-ascii-æøåÆØÅöôêÊ字符串', ...options });\n\n/**\n * Login User\n */\nexport const putWithFormUrlEncoded = <ThrowOnError extends boolean = false>(options: Options<PutWithFormUrlEncodedData, ThrowOnError>) => (options.client ?? client).put<unknown, unknown, ThrowOnError>({\n    ...urlSearchParamsBodySerializer,\n    url: '/api/v{api-version}/non-ascii-æøåÆØÅöôêÊ字符串',\n    ...options,\n    headers: {\n        'Content-Type': 'application/x-www-form-urlencoded',\n        ...options.headers\n    }\n});\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@angular/common/default-class/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type ClientOptions = {\n    baseUrl: 'http://localhost:3000/base' | (string & {});\n};\n\n/**\n * Model with number-only name\n */\nexport type _400 = string;\n\n/**\n * External ref to shared model (A)\n */\nexport type ExternalRefA = ExternalSharedModel;\n\n/**\n * External ref to shared model (B)\n */\nexport type ExternalRefB = ExternalSharedModel;\n\n/**\n * Testing multiline comments in string: First line\n * Second line\n *\n * Fourth line\n */\nexport type CamelCaseCommentWithBreaks = number;\n\n/**\n * Testing multiline comments in string: First line\n * Second line\n *\n * Fourth line\n */\nexport type CommentWithBreaks = number;\n\n/**\n * Testing backticks in string: `backticks` and ```multiple backticks``` should work\n */\nexport type CommentWithBackticks = number;\n\n/**\n * Testing backticks and quotes in string: `backticks`, 'quotes', \"double quotes\" and ```multiple backticks``` should work\n */\nexport type CommentWithBackticksAndQuotes = number;\n\n/**\n * Testing slashes in string: \\backwards\\\\\\ and /forwards/// should work\n */\nexport type CommentWithSlashes = number;\n\n/**\n * Testing expression placeholders in string: ${expression} should work\n */\nexport type CommentWithExpressionPlaceholders = number;\n\n/**\n * Testing quotes in string: 'single quote''' and \"double quotes\"\"\" should work\n */\nexport type CommentWithQuotes = number;\n\n/**\n * Testing reserved characters in string: * inline * and ** inline ** should work\n */\nexport type CommentWithReservedCharacters = number;\n\n/**\n * This is a simple number\n */\nexport type SimpleInteger = number;\n\n/**\n * This is a simple boolean\n */\nexport type SimpleBoolean = boolean;\n\n/**\n * This is a simple string\n */\nexport type SimpleString = string;\n\n/**\n * A string with non-ascii (unicode) characters valid in typescript identifiers (æøåÆØÅöÔèÈ字符串)\n */\nexport type NonAsciiStringæøåÆøÅöôêÊ字符串 = string;\n\n/**\n * This is a simple file\n */\nexport type SimpleFile = Blob | File;\n\n/**\n * This is a simple reference\n */\nexport type SimpleReference = ModelWithString;\n\n/**\n * This is a simple string\n */\nexport type SimpleStringWithPattern = string | null;\n\n/**\n * This is a simple enum with strings\n */\nexport type EnumWithStrings = 'Success' | 'Warning' | 'Error' | '\\'Single Quote\\'' | '\"Double Quotes\"' | 'Non-ascii: øæåôöØÆÅÔÖ字符串';\n\nexport type EnumWithReplacedCharacters = '\\'Single Quote\\'' | '\"Double Quotes\"' | 'øæåôöØÆÅÔÖ字符串' | 3.1 | '';\n\n/**\n * This is a simple enum with numbers\n */\nexport type EnumWithNumbers = 1 | 2 | 3 | 1.1 | 1.2 | 1.3 | 100 | 200 | 300 | -100 | -200 | -300 | -1.1 | -1.2 | -1.3;\n\n/**\n * Success=1,Warning=2,Error=3\n */\nexport type EnumFromDescription = number;\n\n/**\n * This is a simple enum with numbers\n */\nexport type EnumWithExtensions = 200 | 400 | 500;\n\nexport type EnumWithXEnumNames = 0 | 1 | 2;\n\n/**\n * This is a simple array with numbers\n */\nexport type ArrayWithNumbers = Array<number>;\n\n/**\n * This is a simple array with booleans\n */\nexport type ArrayWithBooleans = Array<boolean>;\n\n/**\n * This is a simple array with strings\n */\nexport type ArrayWithStrings = Array<string>;\n\n/**\n * This is a simple array with references\n */\nexport type ArrayWithReferences = Array<ModelWithString>;\n\n/**\n * This is a simple array containing an array\n */\nexport type ArrayWithArray = Array<Array<ModelWithString>>;\n\n/**\n * This is a simple array with properties\n */\nexport type ArrayWithProperties = Array<{\n    '16x16'?: CamelCaseCommentWithBreaks;\n    bar?: string;\n}>;\n\n/**\n * This is a simple array with any of properties\n */\nexport type ArrayWithAnyOfProperties = Array<{\n    foo?: string;\n} | {\n    bar?: string;\n}>;\n\nexport type AnyOfAnyAndNull = {\n    data?: unknown | null;\n};\n\n/**\n * This is a simple array with any of properties\n */\nexport type AnyOfArrays = {\n    results?: Array<{\n        foo?: string;\n    } | {\n        bar?: string;\n    }>;\n};\n\n/**\n * This is a string dictionary\n */\nexport type DictionaryWithString = {\n    [key: string]: string;\n};\n\nexport type DictionaryWithPropertiesAndAdditionalProperties = {\n    foo?: number;\n    bar?: boolean;\n    [key: string]: string | number | boolean | undefined;\n};\n\n/**\n * This is a string reference\n */\nexport type DictionaryWithReference = {\n    [key: string]: ModelWithString;\n};\n\n/**\n * This is a complex dictionary\n */\nexport type DictionaryWithArray = {\n    [key: string]: Array<ModelWithString>;\n};\n\n/**\n * This is a string dictionary\n */\nexport type DictionaryWithDictionary = {\n    [key: string]: {\n        [key: string]: string;\n    };\n};\n\n/**\n * This is a complex dictionary\n */\nexport type DictionaryWithProperties = {\n    [key: string]: {\n        foo?: string;\n        bar?: string;\n    };\n};\n\n/**\n * This is a model with one number property\n */\nexport type ModelWithInteger = {\n    /**\n     * This is a simple number property\n     */\n    prop?: number;\n};\n\n/**\n * This is a model with one boolean property\n */\nexport type ModelWithBoolean = {\n    /**\n     * This is a simple boolean property\n     */\n    prop?: boolean;\n};\n\n/**\n * This is a model with one string property\n */\nexport type ModelWithString = {\n    /**\n     * This is a simple string property\n     */\n    prop?: string;\n};\n\n/**\n * This is a model with one string property\n */\nexport type ModelWithStringError = {\n    /**\n     * This is a simple string property\n     */\n    prop?: string;\n};\n\n/**\n * `Comment` or `VoiceComment`. The JSON object for adding voice comments to tickets is different. See [Adding voice comments to tickets](/documentation/ticketing/managing-tickets/adding-voice-comments-to-tickets)\n */\nexport type ModelFromZendesk = string;\n\n/**\n * This is a model with one string property\n */\nexport type ModelWithNullableString = {\n    /**\n     * This is a simple string property\n     */\n    nullableProp1?: string | null;\n    /**\n     * This is a simple string property\n     */\n    nullableRequiredProp1: string | null;\n    /**\n     * This is a simple string property\n     */\n    nullableProp2?: string | null;\n    /**\n     * This is a simple string property\n     */\n    nullableRequiredProp2: string | null;\n    /**\n     * This is a simple enum with strings\n     */\n    'foo_bar-enum'?: 'Success' | 'Warning' | 'Error' | 'ØÆÅ字符串';\n};\n\n/**\n * This is a model with one enum\n */\nexport type ModelWithEnum = {\n    /**\n     * This is a simple enum with strings\n     */\n    'foo_bar-enum'?: 'Success' | 'Warning' | 'Error' | 'ØÆÅ字符串';\n    /**\n     * These are the HTTP error code enums\n     */\n    statusCode?: '100' | '200 FOO' | '300 FOO_BAR' | '400 foo-bar' | '500 foo.bar' | '600 foo&bar';\n    /**\n     * Simple boolean enum\n     */\n    bool?: true;\n};\n\n/**\n * This is a model with one enum with escaped name\n */\nexport type ModelWithEnumWithHyphen = {\n    /**\n     * Foo-Bar-Baz-Qux\n     */\n    'foo-bar-baz-qux'?: '3.0';\n};\n\n/**\n * This is a model with one enum\n */\nexport type ModelWithEnumFromDescription = {\n    /**\n     * Success=1,Warning=2,Error=3\n     */\n    test?: number;\n};\n\n/**\n * This is a model with nested enums\n */\nexport type ModelWithNestedEnums = {\n    dictionaryWithEnum?: {\n        [key: string]: 'Success' | 'Warning' | 'Error';\n    };\n    dictionaryWithEnumFromDescription?: {\n        [key: string]: number;\n    };\n    arrayWithEnum?: Array<'Success' | 'Warning' | 'Error'>;\n    arrayWithDescription?: Array<number>;\n    /**\n     * This is a simple enum with strings\n     */\n    'foo_bar-enum'?: 'Success' | 'Warning' | 'Error' | 'ØÆÅ字符串';\n};\n\n/**\n * This is a model with one property containing a reference\n */\nexport type ModelWithReference = {\n    prop?: ModelWithProperties;\n};\n\n/**\n * This is a model with one property containing an array\n */\nexport type ModelWithArrayReadOnlyAndWriteOnly = {\n    prop?: Array<ModelWithReadOnlyAndWriteOnly>;\n    propWithFile?: Array<Blob | File>;\n    propWithNumber?: Array<number>;\n};\n\n/**\n * This is a model with one property containing an array\n */\nexport type ModelWithArray = {\n    prop?: Array<ModelWithString>;\n    propWithFile?: Array<Blob | File>;\n    propWithNumber?: Array<number>;\n};\n\n/**\n * This is a model with one property containing a dictionary\n */\nexport type ModelWithDictionary = {\n    prop?: {\n        [key: string]: string;\n    };\n};\n\n/**\n * This is a deprecated model with a deprecated property\n *\n * @deprecated\n */\nexport type DeprecatedModel = {\n    /**\n     * This is a deprecated property\n     *\n     * @deprecated\n     */\n    prop?: string;\n};\n\n/**\n * This is a model with one property containing a circular reference\n */\nexport type ModelWithCircularReference = {\n    prop?: ModelWithCircularReference;\n};\n\n/**\n * This is a model with one property with a 'one of' relationship\n */\nexport type CompositionWithOneOf = {\n    propA?: ModelWithString | ModelWithEnum | ModelWithArray | ModelWithDictionary;\n};\n\n/**\n * This is a model with one property with a 'one of' relationship where the options are not $ref\n */\nexport type CompositionWithOneOfAnonymous = {\n    propA?: {\n        propA?: string;\n    } | string | number;\n};\n\n/**\n * Circle\n */\nexport type ModelCircle = {\n    kind: string;\n    radius?: number;\n};\n\n/**\n * Square\n */\nexport type ModelSquare = {\n    kind: string;\n    sideLength?: number;\n};\n\n/**\n * This is a model with one property with a 'one of' relationship where the options are not $ref\n */\nexport type CompositionWithOneOfDiscriminator = ({\n    kind: 'circle';\n} & ModelCircle) | ({\n    kind: 'square';\n} & ModelSquare);\n\n/**\n * This is a model with one property with a 'any of' relationship\n */\nexport type CompositionWithAnyOf = {\n    propA?: ModelWithString | ModelWithEnum | ModelWithArray | ModelWithDictionary;\n};\n\n/**\n * This is a model with one property with a 'any of' relationship where the options are not $ref\n */\nexport type CompositionWithAnyOfAnonymous = {\n    propA?: {\n        propA?: string;\n    } | string | number;\n};\n\n/**\n * This is a model with nested 'any of' property with a type null\n */\nexport type CompositionWithNestedAnyAndTypeNull = {\n    propA?: Array<ModelWithDictionary | null> | Array<ModelWithArray | null>;\n};\n\nexport type _3eNum1Период = 'Bird' | 'Dog';\n\nexport type ConstValue = 'ConstValue';\n\n/**\n * This is a model with one property with a 'any of' relationship where the options are not $ref\n */\nexport type CompositionWithNestedAnyOfAndNull = {\n    /**\n     * Scopes\n     */\n    propA?: Array<_3eNum1Период | ConstValue> | null;\n};\n\n/**\n * This is a model with one property with a 'one of' relationship\n */\nexport type CompositionWithOneOfAndNullable = {\n    propA?: {\n        boolean?: boolean;\n    } | ModelWithEnum | ModelWithArray | ModelWithDictionary | null;\n};\n\n/**\n * This is a model that contains a simple dictionary within composition\n */\nexport type CompositionWithOneOfAndSimpleDictionary = {\n    propA?: boolean | {\n        [key: string]: number;\n    };\n};\n\n/**\n * This is a model that contains a dictionary of simple arrays within composition\n */\nexport type CompositionWithOneOfAndSimpleArrayDictionary = {\n    propA?: boolean | {\n        [key: string]: Array<boolean>;\n    };\n};\n\n/**\n * This is a model that contains a dictionary of complex arrays (composited) within composition\n */\nexport type CompositionWithOneOfAndComplexArrayDictionary = {\n    propA?: boolean | {\n        [key: string]: Array<number | string>;\n    };\n};\n\n/**\n * This is a model with one property with a 'all of' relationship\n */\nexport type CompositionWithAllOfAndNullable = {\n    propA?: ({\n        boolean?: boolean;\n    } & ModelWithEnum & ModelWithArray & ModelWithDictionary) | null;\n};\n\n/**\n * This is a model with one property with a 'any of' relationship\n */\nexport type CompositionWithAnyOfAndNullable = {\n    propA?: {\n        boolean?: boolean;\n    } | ModelWithEnum | ModelWithArray | ModelWithDictionary | null;\n};\n\n/**\n * This is a base model with two simple optional properties\n */\nexport type CompositionBaseModel = {\n    firstName?: string;\n    lastname?: string;\n};\n\n/**\n * This is a model that extends the base model\n */\nexport type CompositionExtendedModel = CompositionBaseModel & {\n    age: number;\n    firstName: string;\n    lastname: string;\n};\n\n/**\n * This is a model with one nested property\n */\nexport type ModelWithProperties = {\n    required: string;\n    readonly requiredAndReadOnly: string;\n    requiredAndNullable: string | null;\n    string?: string;\n    number?: number;\n    boolean?: boolean;\n    reference?: ModelWithString;\n    'property with space'?: string;\n    default?: string;\n    try?: string;\n    readonly '@namespace.string'?: string;\n    readonly '@namespace.integer'?: number;\n};\n\n/**\n * This is a model with one nested property\n */\nexport type ModelWithNestedProperties = {\n    readonly first: {\n        readonly second: {\n            readonly third: string | null;\n        } | null;\n    } | null;\n};\n\n/**\n * This is a model with duplicated properties\n */\nexport type ModelWithDuplicateProperties = {\n    prop?: ModelWithString;\n};\n\n/**\n * This is a model with ordered properties\n */\nexport type ModelWithOrderedProperties = {\n    zebra?: string;\n    apple?: string;\n    hawaii?: string;\n};\n\n/**\n * This is a model with duplicated imports\n */\nexport type ModelWithDuplicateImports = {\n    propA?: ModelWithString;\n    propB?: ModelWithString;\n    propC?: ModelWithString;\n};\n\n/**\n * This is a model that extends another model\n */\nexport type ModelThatExtends = ModelWithString & {\n    propExtendsA?: string;\n    propExtendsB?: ModelWithString;\n};\n\n/**\n * This is a model that extends another model\n */\nexport type ModelThatExtendsExtends = ModelWithString & ModelThatExtends & {\n    propExtendsC?: string;\n    propExtendsD?: ModelWithString;\n};\n\n/**\n * This is a model that contains a some patterns\n */\nexport type ModelWithPattern = {\n    key: string;\n    name: string;\n    readonly enabled?: boolean;\n    readonly modified?: string;\n    id?: string;\n    text?: string;\n    patternWithSingleQuotes?: string;\n    patternWithNewline?: string;\n    patternWithBacktick?: string;\n    patternWithUnicode?: string;\n};\n\nexport type File = {\n    /**\n     * Id\n     */\n    readonly id?: string;\n    /**\n     * Updated at\n     */\n    readonly updated_at?: string;\n    /**\n     * Created at\n     */\n    readonly created_at?: string;\n    /**\n     * Mime\n     */\n    mime: string;\n    /**\n     * File\n     */\n    readonly file?: string;\n};\n\nexport type Default = {\n    name?: string;\n};\n\nexport type Pageable = {\n    page?: number;\n    size?: number;\n    sort?: Array<string>;\n};\n\n/**\n * This is a free-form object without additionalProperties.\n */\nexport type FreeFormObjectWithoutAdditionalProperties = {\n    [key: string]: unknown;\n};\n\n/**\n * This is a free-form object with additionalProperties: true.\n */\nexport type FreeFormObjectWithAdditionalPropertiesEqTrue = {\n    [key: string]: unknown;\n};\n\n/**\n * This is a free-form object with additionalProperties: {}.\n */\nexport type FreeFormObjectWithAdditionalPropertiesEqEmptyObject = {\n    [key: string]: unknown;\n};\n\nexport type ModelWithConst = {\n    String?: 'String';\n    number?: 0;\n    null?: null;\n    withType?: 'Some string';\n};\n\n/**\n * This is a model with one property and additionalProperties: true\n */\nexport type ModelWithAdditionalPropertiesEqTrue = {\n    /**\n     * This is a simple string property\n     */\n    prop?: string;\n    [key: string]: unknown;\n};\n\nexport type NestedAnyOfArraysNullable = {\n    nullableArray?: Array<string | boolean> | null;\n};\n\nexport type CompositionWithOneOfAndProperties = ({\n    foo: SimpleParameter;\n} | {\n    bar: NonAsciiStringæøåÆøÅöôêÊ字符串;\n}) & {\n    baz: number | null;\n    qux: number;\n};\n\n/**\n * An object that can be null\n */\nexport type NullableObject = {\n    foo?: string;\n} | null;\n\n/**\n * Some % character\n */\nexport type CharactersInDescription = string;\n\nexport type ModelWithNullableObject = {\n    data?: NullableObject;\n};\n\n/**\n * An object with additional properties that can be null (anyOf ref + null)\n */\nexport type ModelWithAdditionalPropertiesRef = {\n    [key: string]: NullableObject | null;\n};\n\nexport type ModelWithOneOfEnum = {\n    foo: 'Bar';\n} | {\n    foo: 'Baz';\n} | {\n    foo: 'Qux';\n} | {\n    content: string;\n    foo: 'Quux';\n} | {\n    content: [\n        string,\n        string\n    ];\n    foo: 'Corge';\n};\n\nexport type ModelWithNestedArrayEnumsDataFoo = 'foo' | 'bar';\n\nexport type ModelWithNestedArrayEnumsDataBar = 'baz' | 'qux';\n\nexport type ModelWithNestedArrayEnumsData = {\n    foo?: Array<ModelWithNestedArrayEnumsDataFoo>;\n    bar?: Array<ModelWithNestedArrayEnumsDataBar>;\n};\n\nexport type ModelWithNestedArrayEnums = {\n    array_strings?: Array<string>;\n    data?: ModelWithNestedArrayEnumsData;\n};\n\nexport type ModelWithNestedCompositionEnums = {\n    foo?: ModelWithNestedArrayEnumsDataFoo;\n};\n\nexport type ModelWithReadOnlyAndWriteOnly = {\n    foo: string;\n    readonly bar: string;\n};\n\nexport type ModelWithConstantSizeArray = [\n    number,\n    number\n];\n\nexport type ModelWithAnyOfConstantSizeArray = [\n    number | string,\n    number | string,\n    number | string\n];\n\nexport type ModelWithPrefixItemsConstantSizeArray = [\n    ModelWithInteger,\n    number | string,\n    string\n];\n\nexport type ModelWithAnyOfConstantSizeArrayNullable = [\n    number | null | string,\n    number | null | string,\n    number | null | string\n];\n\nexport type ModelWithAnyOfConstantSizeArrayWithNSizeAndOptions = [\n    number | Import,\n    number | Import\n];\n\nexport type ModelWithAnyOfConstantSizeArrayAndIntersect = [\n    number & string,\n    number & string\n];\n\nexport type ModelWithNumericEnumUnion = {\n    /**\n     * Период\n     */\n    value?: -10 | -1 | 0 | 1 | 3 | 6 | 12;\n};\n\n/**\n * Some description with `back ticks`\n */\nexport type ModelWithBackticksInDescription = {\n    /**\n     * The template `that` should be used for parsing and importing the contents of the CSV file.\n     *\n     * <br/><p>There is one placeholder currently supported:<ul>     <li><b>${x}</b> - refers to the n-th column in the CSV file, e.g. ${1}, ${2}, ...)</li></ul><p>Example of a correct JSON template:</p>\n     * <pre>\n     * [\n     * {\n     * \"resourceType\": \"Asset\",\n     * \"identifier\": {\n     * \"name\": \"${1}\",\n     * \"domain\": {\n     * \"name\": \"${2}\",\n     * \"community\": {\n     * \"name\": \"Some Community\"\n     * }\n     * }\n     * },\n     * \"attributes\" : {\n     * \"00000000-0000-0000-0000-000000003115\" : [ {\n     * \"value\" : \"${3}\"\n     * } ],\n     * \"00000000-0000-0000-0000-000000000222\" : [ {\n     * \"value\" : \"${4}\"\n     * } ]\n     * }\n     * }\n     * ]\n     * </pre>\n     */\n    template?: string;\n};\n\nexport type ModelWithOneOfAndProperties = (SimpleParameter | NonAsciiStringæøåÆøÅöôêÊ字符串) & {\n    baz: number | null;\n    qux: number;\n};\n\n/**\n * Model used to test deduplication strategy (unused)\n */\nexport type ParameterSimpleParameterUnused = string;\n\n/**\n * Model used to test deduplication strategy\n */\nexport type PostServiceWithEmptyTagResponse = string;\n\n/**\n * Model used to test deduplication strategy\n */\nexport type PostServiceWithEmptyTagResponse2 = string;\n\n/**\n * Model used to test deduplication strategy\n */\nexport type DeleteFooData = string;\n\n/**\n * Model used to test deduplication strategy\n */\nexport type DeleteFooData2 = string;\n\n/**\n * Model with restricted keyword name\n */\nexport type Import = string;\n\nexport type SchemaWithFormRestrictedKeys = {\n    description?: string;\n    'x-enum-descriptions'?: string;\n    'x-enum-varnames'?: string;\n    'x-enumNames'?: string;\n    title?: string;\n    object?: {\n        description?: string;\n        'x-enum-descriptions'?: string;\n        'x-enum-varnames'?: string;\n        'x-enumNames'?: string;\n        title?: string;\n    };\n    array?: Array<{\n        description?: string;\n        'x-enum-descriptions'?: string;\n        'x-enum-varnames'?: string;\n        'x-enumNames'?: string;\n        title?: string;\n    }>;\n};\n\n/**\n * This schema was giving PascalCase transformations a hard time\n */\nexport type IoK8sApimachineryPkgApisMetaV1DeleteOptions = {\n    /**\n     * Must be fulfilled before a deletion is carried out. If not possible, a 409 Conflict status will be returned.\n     */\n    preconditions?: IoK8sApimachineryPkgApisMetaV1Preconditions;\n};\n\n/**\n * This schema was giving PascalCase transformations a hard time\n */\nexport type IoK8sApimachineryPkgApisMetaV1Preconditions = {\n    /**\n     * Specifies the target ResourceVersion\n     */\n    resourceVersion?: string;\n    /**\n     * Specifies the target UID.\n     */\n    uid?: string;\n};\n\nexport type AdditionalPropertiesUnknownIssue = {\n    [key: string]: string | number;\n};\n\nexport type AdditionalPropertiesUnknownIssue2 = {\n    [key: string]: string | number;\n};\n\nexport type AdditionalPropertiesUnknownIssue3 = string & {\n    entries: {\n        [key: string]: AdditionalPropertiesUnknownIssue;\n    };\n};\n\nexport type AdditionalPropertiesIntegerIssue = {\n    value: number;\n    [key: string]: number;\n};\n\nexport type OneOfAllOfIssue = ((ConstValue | GenericSchemaDuplicateIssue1SystemBoolean) & _3eNum1Период) | GenericSchemaDuplicateIssue1SystemString;\n\nexport type GenericSchemaDuplicateIssue1SystemBoolean = {\n    item?: boolean;\n    error?: string | null;\n    readonly hasError?: boolean;\n    data?: {\n        [key: string]: never;\n    };\n};\n\nexport type GenericSchemaDuplicateIssue1SystemString = {\n    item?: string | null;\n    error?: string | null;\n    readonly hasError?: boolean;\n};\n\nexport type ExternalSharedModel = {\n    id: string;\n    name?: string;\n};\n\n/**\n * This is a model with one property containing a reference\n */\nexport type ModelWithReferenceWritable = {\n    prop?: ModelWithPropertiesWritable;\n};\n\n/**\n * This is a model with one property containing an array\n */\nexport type ModelWithArrayReadOnlyAndWriteOnlyWritable = {\n    prop?: Array<ModelWithReadOnlyAndWriteOnlyWritable>;\n    propWithFile?: Array<Blob | File>;\n    propWithNumber?: Array<number>;\n};\n\n/**\n * This is a model with one nested property\n */\nexport type ModelWithPropertiesWritable = {\n    required: string;\n    requiredAndNullable: string | null;\n    string?: string;\n    number?: number;\n    boolean?: boolean;\n    reference?: ModelWithString;\n    'property with space'?: string;\n    default?: string;\n    try?: string;\n};\n\n/**\n * This is a model that contains a some patterns\n */\nexport type ModelWithPatternWritable = {\n    key: string;\n    name: string;\n    id?: string;\n    text?: string;\n    patternWithSingleQuotes?: string;\n    patternWithNewline?: string;\n    patternWithBacktick?: string;\n    patternWithUnicode?: string;\n};\n\nexport type FileWritable = {\n    /**\n     * Mime\n     */\n    mime: string;\n};\n\nexport type ModelWithReadOnlyAndWriteOnlyWritable = {\n    foo: string;\n    baz: string;\n};\n\nexport type ModelWithAnyOfConstantSizeArrayWithNSizeAndOptionsWritable = [\n    number | Import,\n    number | Import\n];\n\nexport type AdditionalPropertiesUnknownIssueWritable = {\n    [key: string]: string | number;\n};\n\nexport type OneOfAllOfIssueWritable = ((ConstValue | GenericSchemaDuplicateIssue1SystemBoolean) & _3eNum1Период) | GenericSchemaDuplicateIssue1SystemString;\n\nexport type GenericSchemaDuplicateIssue1SystemBooleanWritable = {\n    item?: boolean;\n    error?: string | null;\n    data?: {\n        [key: string]: never;\n    };\n};\n\nexport type GenericSchemaDuplicateIssue1SystemStringWritable = {\n    item?: string | null;\n    error?: string | null;\n};\n\n/**\n * This is a reusable parameter\n */\nexport type SimpleParameter = string;\n\n/**\n * Parameter with illegal characters\n */\nexport type XFooBar = ModelWithString;\n\n/**\n * A reusable request body\n */\nexport type SimpleRequestBody = ModelWithString;\n\n/**\n * A reusable request body\n */\nexport type SimpleFormData = ModelWithString;\n\nexport type ExportData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no+tag';\n};\n\nexport type PatchApiVbyApiVersionNoTagData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no+tag';\n};\n\nexport type PatchApiVbyApiVersionNoTagResponses = {\n    /**\n     * OK\n     */\n    default: unknown;\n};\n\nexport type ImportData = {\n    body: ModelWithReadOnlyAndWriteOnlyWritable | ModelWithArrayReadOnlyAndWriteOnlyWritable;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no+tag';\n};\n\nexport type ImportResponses = {\n    /**\n     * Success\n     */\n    200: ModelFromZendesk;\n    /**\n     * Default success response\n     */\n    default: ModelWithReadOnlyAndWriteOnly;\n};\n\nexport type ImportResponse = ImportResponses[keyof ImportResponses];\n\nexport type FooWowData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no+tag';\n};\n\nexport type FooWowResponses = {\n    /**\n     * OK\n     */\n    default: unknown;\n};\n\nexport type ApiVVersionODataControllerCountData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple/$count';\n};\n\nexport type ApiVVersionODataControllerCountResponses = {\n    /**\n     * Success\n     */\n    200: ModelFromZendesk;\n};\n\nexport type ApiVVersionODataControllerCountResponse = ApiVVersionODataControllerCountResponses[keyof ApiVVersionODataControllerCountResponses];\n\nexport type GetApiVbyApiVersionSimpleOperationData = {\n    body?: never;\n    path: {\n        /**\n         * foo in method\n         */\n        foo_param: string;\n    };\n    query?: never;\n    url: '/api/v{api-version}/simple:operation';\n};\n\nexport type GetApiVbyApiVersionSimpleOperationErrors = {\n    /**\n     * Default error response\n     */\n    default: ModelWithBoolean;\n};\n\nexport type GetApiVbyApiVersionSimpleOperationError = GetApiVbyApiVersionSimpleOperationErrors[keyof GetApiVbyApiVersionSimpleOperationErrors];\n\nexport type GetApiVbyApiVersionSimpleOperationResponses = {\n    /**\n     * Response is a simple number\n     */\n    200: number;\n};\n\nexport type GetApiVbyApiVersionSimpleOperationResponse = GetApiVbyApiVersionSimpleOperationResponses[keyof GetApiVbyApiVersionSimpleOperationResponses];\n\nexport type DeleteCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type GetCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type HeadCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type OptionsCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type PatchCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type PostCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type PutCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type DeleteFooData3 = {\n    body?: never;\n    headers: {\n        /**\n         * Parameter with illegal characters\n         */\n        'x-Foo-Bar': ModelWithString;\n    };\n    path: {\n        /**\n         * foo in method\n         */\n        foo_param: string;\n        /**\n         * bar in method\n         */\n        BarParam: string;\n    };\n    query?: never;\n    url: '/api/v{api-version}/foo/{foo_param}/bar/{BarParam}';\n};\n\nexport type CallWithDescriptionsData = {\n    body?: never;\n    path?: never;\n    query?: {\n        /**\n         * Testing multiline comments in string: First line\n         * Second line\n         *\n         * Fourth line\n         */\n        parameterWithBreaks?: string;\n        /**\n         * Testing backticks in string: `backticks` and ```multiple backticks``` should work\n         */\n        parameterWithBackticks?: string;\n        /**\n         * Testing slashes in string: \\backwards\\\\\\ and /forwards/// should work\n         */\n        parameterWithSlashes?: string;\n        /**\n         * Testing expression placeholders in string: ${expression} should work\n         */\n        parameterWithExpressionPlaceholders?: string;\n        /**\n         * Testing quotes in string: 'single quote''' and \"double quotes\"\"\" should work\n         */\n        parameterWithQuotes?: string;\n        /**\n         * Testing reserved characters in string: * inline * and ** inline ** should work\n         */\n        parameterWithReservedCharacters?: string;\n    };\n    url: '/api/v{api-version}/descriptions';\n};\n\nexport type DeprecatedCallData = {\n    body?: never;\n    headers: {\n        /**\n         * This parameter is deprecated\n         *\n         * @deprecated\n         */\n        parameter: DeprecatedModel | null;\n    };\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/parameters/deprecated';\n};\n\nexport type CallWithParametersData = {\n    /**\n     * This is the parameter that goes into the body\n     */\n    body: {\n        [key: string]: unknown;\n    } | null;\n    headers: {\n        /**\n         * This is the parameter that goes into the header\n         */\n        parameterHeader: string | null;\n    };\n    path: {\n        /**\n         * This is the parameter that goes into the path\n         */\n        parameterPath: string | null;\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string | null;\n    };\n    query: {\n        foo_ref_enum?: ModelWithNestedArrayEnumsDataFoo;\n        foo_all_of_enum: ModelWithNestedArrayEnumsDataFoo;\n        /**\n         * This is the parameter that goes into the query params\n         */\n        cursor: string | null;\n    };\n    url: '/api/v{api-version}/parameters/{parameterPath}';\n};\n\nexport type CallWithWeirdParameterNamesData = {\n    /**\n     * This is the parameter that goes into the body\n     */\n    body: ModelWithString | null;\n    headers: {\n        /**\n         * This is the parameter that goes into the request header\n         */\n        'parameter.header': string | null;\n    };\n    path: {\n        /**\n         * This is the parameter that goes into the path\n         */\n        'parameter.path.1'?: string;\n        /**\n         * This is the parameter that goes into the path\n         */\n        'parameter-path-2'?: string;\n        /**\n         * This is the parameter that goes into the path\n         */\n        'PARAMETER-PATH-3'?: string;\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string | null;\n    };\n    query: {\n        /**\n         * This is the parameter with a reserved keyword\n         */\n        default?: string;\n        /**\n         * This is the parameter that goes into the request query params\n         */\n        'parameter-query': string | null;\n    };\n    url: '/api/v{api-version}/parameters/{parameter.path.1}/{parameter-path-2}/{PARAMETER-PATH-3}';\n};\n\nexport type GetCallWithOptionalParamData = {\n    /**\n     * This is a required parameter\n     */\n    body: ModelWithOneOfEnum;\n    path?: never;\n    query?: {\n        /**\n         * This is an optional parameter\n         */\n        page?: number;\n    };\n    url: '/api/v{api-version}/parameters';\n};\n\nexport type PostCallWithOptionalParamData = {\n    /**\n     * This is an optional parameter\n     */\n    body?: {\n        offset?: number | null;\n    };\n    path?: never;\n    query: {\n        /**\n         * This is a required parameter\n         */\n        parameter: Pageable;\n    };\n    url: '/api/v{api-version}/parameters';\n};\n\nexport type PostCallWithOptionalParamResponses = {\n    /**\n     * Response is a simple number\n     */\n    200: number;\n    /**\n     * Success\n     */\n    204: void;\n};\n\nexport type PostCallWithOptionalParamResponse = PostCallWithOptionalParamResponses[keyof PostCallWithOptionalParamResponses];\n\nexport type PostApiVbyApiVersionRequestBodyData = {\n    /**\n     * A reusable request body\n     */\n    body?: SimpleRequestBody;\n    path?: never;\n    query?: {\n        /**\n         * This is a reusable parameter\n         */\n        parameter?: string;\n    };\n    url: '/api/v{api-version}/requestBody';\n};\n\nexport type PostApiVbyApiVersionFormDataData = {\n    /**\n     * A reusable request body\n     */\n    body?: SimpleFormData;\n    path?: never;\n    query?: {\n        /**\n         * This is a reusable parameter\n         */\n        parameter?: string;\n    };\n    url: '/api/v{api-version}/formData';\n};\n\nexport type CallWithDefaultParametersData = {\n    body?: never;\n    path?: never;\n    query?: {\n        /**\n         * This is a simple string with default value\n         */\n        parameterString?: string | null;\n        /**\n         * This is a simple number with default value\n         */\n        parameterNumber?: number | null;\n        /**\n         * This is a simple boolean with default value\n         */\n        parameterBoolean?: boolean | null;\n        /**\n         * This is a simple enum with default value\n         */\n        parameterEnum?: 'Success' | 'Warning' | 'Error';\n        /**\n         * This is a simple model with default value\n         */\n        parameterModel?: ModelWithString | null;\n    };\n    url: '/api/v{api-version}/defaults';\n};\n\nexport type CallWithDefaultOptionalParametersData = {\n    body?: never;\n    path?: never;\n    query?: {\n        /**\n         * This is a simple string that is optional with default value\n         */\n        parameterString?: string;\n        /**\n         * This is a simple number that is optional with default value\n         */\n        parameterNumber?: number;\n        /**\n         * This is a simple boolean that is optional with default value\n         */\n        parameterBoolean?: boolean;\n        /**\n         * This is a simple enum that is optional with default value\n         */\n        parameterEnum?: 'Success' | 'Warning' | 'Error';\n        /**\n         * This is a simple model that is optional with default value\n         */\n        parameterModel?: ModelWithString;\n    };\n    url: '/api/v{api-version}/defaults';\n};\n\nexport type CallToTestOrderOfParamsData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * This is a optional string with default\n         */\n        parameterOptionalStringWithDefault?: string;\n        /**\n         * This is a optional string with empty default\n         */\n        parameterOptionalStringWithEmptyDefault?: string;\n        /**\n         * This is a optional string with no default\n         */\n        parameterOptionalStringWithNoDefault?: string;\n        /**\n         * This is a string with default\n         */\n        parameterStringWithDefault: string;\n        /**\n         * This is a string with empty default\n         */\n        parameterStringWithEmptyDefault: string;\n        /**\n         * This is a string with no default\n         */\n        parameterStringWithNoDefault: string;\n        /**\n         * This is a string that can be null with no default\n         */\n        parameterStringNullableWithNoDefault?: string | null;\n        /**\n         * This is a string that can be null with default\n         */\n        parameterStringNullableWithDefault?: string | null;\n    };\n    url: '/api/v{api-version}/defaults';\n};\n\nexport type DuplicateNameData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/duplicate';\n};\n\nexport type DuplicateName2Data = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/duplicate';\n};\n\nexport type DuplicateName3Data = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/duplicate';\n};\n\nexport type DuplicateName4Data = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/duplicate';\n};\n\nexport type CallWithNoContentResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no-content';\n};\n\nexport type CallWithNoContentResponseResponses = {\n    /**\n     * Success\n     */\n    204: void;\n};\n\nexport type CallWithNoContentResponseResponse = CallWithNoContentResponseResponses[keyof CallWithNoContentResponseResponses];\n\nexport type CallWithResponseAndNoContentResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multiple-tags/response-and-no-content';\n};\n\nexport type CallWithResponseAndNoContentResponseResponses = {\n    /**\n     * Response is a simple number\n     */\n    200: number;\n    /**\n     * Success\n     */\n    204: void;\n};\n\nexport type CallWithResponseAndNoContentResponseResponse = CallWithResponseAndNoContentResponseResponses[keyof CallWithResponseAndNoContentResponseResponses];\n\nexport type DummyAData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multiple-tags/a';\n};\n\nexport type DummyAResponses = {\n    200: _400;\n};\n\nexport type DummyAResponse = DummyAResponses[keyof DummyAResponses];\n\nexport type DummyBData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multiple-tags/b';\n};\n\nexport type DummyBResponses = {\n    /**\n     * Success\n     */\n    204: void;\n};\n\nexport type DummyBResponse = DummyBResponses[keyof DummyBResponses];\n\nexport type CallWithResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/response';\n};\n\nexport type CallWithResponseResponses = {\n    default: Import;\n};\n\nexport type CallWithResponseResponse = CallWithResponseResponses[keyof CallWithResponseResponses];\n\nexport type CallWithDuplicateResponsesData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/response';\n};\n\nexport type CallWithDuplicateResponsesErrors = {\n    /**\n     * Message for 500 error\n     */\n    500: ModelWithStringError;\n    /**\n     * Message for 501 error\n     */\n    501: ModelWithStringError;\n    /**\n     * Message for 502 error\n     */\n    502: ModelWithStringError;\n    /**\n     * Message for 4XX errors\n     */\n    '4XX': DictionaryWithArray;\n    /**\n     * Default error response\n     */\n    default: ModelWithBoolean;\n};\n\nexport type CallWithDuplicateResponsesError = CallWithDuplicateResponsesErrors[keyof CallWithDuplicateResponsesErrors];\n\nexport type CallWithDuplicateResponsesResponses = {\n    /**\n     * Message for 200 response\n     */\n    200: ModelWithBoolean & ModelWithInteger;\n    /**\n     * Message for 201 response\n     */\n    201: ModelWithString;\n    /**\n     * Message for 202 response\n     */\n    202: ModelWithString;\n};\n\nexport type CallWithDuplicateResponsesResponse = CallWithDuplicateResponsesResponses[keyof CallWithDuplicateResponsesResponses];\n\nexport type CallWithResponsesData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/response';\n};\n\nexport type CallWithResponsesErrors = {\n    /**\n     * Message for 500 error\n     */\n    500: ModelWithStringError;\n    /**\n     * Message for 501 error\n     */\n    501: ModelWithStringError;\n    /**\n     * Message for 502 error\n     */\n    502: ModelWithStringError;\n    /**\n     * Message for default response\n     */\n    default: ModelWithStringError;\n};\n\nexport type CallWithResponsesError = CallWithResponsesErrors[keyof CallWithResponsesErrors];\n\nexport type CallWithResponsesResponses = {\n    /**\n     * Message for 200 response\n     */\n    200: {\n        readonly '@namespace.string'?: string;\n        readonly '@namespace.integer'?: number;\n        readonly value?: Array<ModelWithString>;\n    };\n    /**\n     * Message for 201 response\n     */\n    201: ModelThatExtends;\n    /**\n     * Message for 202 response\n     */\n    202: ModelThatExtendsExtends;\n};\n\nexport type CallWithResponsesResponse = CallWithResponsesResponses[keyof CallWithResponsesResponses];\n\nexport type CollectionFormatData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * This is an array parameter that is sent as csv format (comma-separated values)\n         */\n        parameterArrayCSV: Array<string> | null;\n        /**\n         * This is an array parameter that is sent as ssv format (space-separated values)\n         */\n        parameterArraySSV: Array<string> | null;\n        /**\n         * This is an array parameter that is sent as tsv format (tab-separated values)\n         */\n        parameterArrayTSV: Array<string> | null;\n        /**\n         * This is an array parameter that is sent as pipes format (pipe-separated values)\n         */\n        parameterArrayPipes: Array<string> | null;\n        /**\n         * This is an array parameter that is sent as multi format (multiple parameter instances)\n         */\n        parameterArrayMulti: Array<string> | null;\n    };\n    url: '/api/v{api-version}/collectionFormat';\n};\n\nexport type TypesData = {\n    body?: never;\n    path?: {\n        /**\n         * This is a number parameter\n         */\n        id?: number;\n    };\n    query: {\n        /**\n         * This is a number parameter\n         */\n        parameterNumber: number;\n        /**\n         * This is a string parameter\n         */\n        parameterString: string | null;\n        /**\n         * This is a boolean parameter\n         */\n        parameterBoolean: boolean | null;\n        /**\n         * This is an object parameter\n         */\n        parameterObject: {\n            [key: string]: unknown;\n        } | null;\n        /**\n         * This is an array parameter\n         */\n        parameterArray: Array<string> | null;\n        /**\n         * This is a dictionary parameter\n         */\n        parameterDictionary: {\n            [key: string]: unknown;\n        } | null;\n        /**\n         * This is an enum parameter\n         */\n        parameterEnum: 'Success' | 'Warning' | 'Error' | null;\n    };\n    url: '/api/v{api-version}/types';\n};\n\nexport type TypesResponses = {\n    /**\n     * Response is a simple number\n     */\n    200: number;\n    /**\n     * Response is a simple string\n     */\n    201: string;\n    /**\n     * Response is a simple boolean\n     */\n    202: boolean;\n    /**\n     * Response is a simple object\n     */\n    203: {\n        [key: string]: unknown;\n    };\n};\n\nexport type TypesResponse = TypesResponses[keyof TypesResponses];\n\nexport type UploadFileData = {\n    body: Blob | File;\n    path: {\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string | null;\n    };\n    query?: never;\n    url: '/api/v{api-version}/upload';\n};\n\nexport type UploadFileResponses = {\n    200: boolean;\n};\n\nexport type UploadFileResponse = UploadFileResponses[keyof UploadFileResponses];\n\nexport type FileResponseData = {\n    body?: never;\n    path: {\n        id: string;\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string;\n    };\n    query?: never;\n    url: '/api/v{api-version}/file/{id}';\n};\n\nexport type FileResponseResponses = {\n    /**\n     * Success\n     */\n    200: Blob | File;\n};\n\nexport type FileResponseResponse = FileResponseResponses[keyof FileResponseResponses];\n\nexport type ComplexTypesData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * Parameter containing object\n         */\n        parameterObject: {\n            first?: {\n                second?: {\n                    third?: string;\n                };\n            };\n        };\n        /**\n         * Parameter containing reference\n         */\n        parameterReference: ModelWithString;\n    };\n    url: '/api/v{api-version}/complex';\n};\n\nexport type ComplexTypesErrors = {\n    /**\n     * 400 `server` error\n     */\n    400: unknown;\n    /**\n     * 500 server error\n     */\n    500: unknown;\n};\n\nexport type ComplexTypesResponses = {\n    /**\n     * Successful response\n     */\n    200: Array<ModelWithString>;\n};\n\nexport type ComplexTypesResponse = ComplexTypesResponses[keyof ComplexTypesResponses];\n\nexport type MultipartResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multipart';\n};\n\nexport type MultipartResponseResponses = {\n    /**\n     * OK\n     */\n    200: {\n        file?: Blob | File;\n        metadata?: {\n            foo?: string;\n            bar?: string;\n        };\n    };\n};\n\nexport type MultipartResponseResponse = MultipartResponseResponses[keyof MultipartResponseResponses];\n\nexport type MultipartRequestData = {\n    body?: {\n        content?: Blob | File;\n        data?: ModelWithString | null;\n    };\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multipart';\n};\n\nexport type ComplexParamsData = {\n    body?: {\n        readonly key: string | null;\n        name: string | null;\n        enabled?: boolean;\n        type: 'Monkey' | 'Horse' | 'Bird';\n        listOfModels?: Array<ModelWithString> | null;\n        listOfStrings?: Array<string> | null;\n        parameters: ModelWithString | ModelWithEnum | ModelWithArray | ModelWithDictionary;\n        readonly user?: {\n            readonly id?: number;\n            readonly name?: string | null;\n        };\n    };\n    path: {\n        id: number;\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string;\n    };\n    query?: never;\n    url: '/api/v{api-version}/complex/{id}';\n};\n\nexport type ComplexParamsResponses = {\n    /**\n     * Success\n     */\n    200: ModelWithString;\n};\n\nexport type ComplexParamsResponse = ComplexParamsResponses[keyof ComplexParamsResponses];\n\nexport type CallWithResultFromHeaderData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/header';\n};\n\nexport type CallWithResultFromHeaderErrors = {\n    /**\n     * 400 server error\n     */\n    400: unknown;\n    /**\n     * 500 server error\n     */\n    500: unknown;\n};\n\nexport type CallWithResultFromHeaderResponses = {\n    /**\n     * Successful response\n     */\n    200: unknown;\n};\n\nexport type TestErrorCodeData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * Status code to return\n         */\n        status: number;\n    };\n    url: '/api/v{api-version}/error';\n};\n\nexport type TestErrorCodeErrors = {\n    /**\n     * Custom message: Internal Server Error\n     */\n    500: unknown;\n    /**\n     * Custom message: Not Implemented\n     */\n    501: unknown;\n    /**\n     * Custom message: Bad Gateway\n     */\n    502: unknown;\n    /**\n     * Custom message: Service Unavailable\n     */\n    503: unknown;\n};\n\nexport type TestErrorCodeResponses = {\n    /**\n     * Custom message: Successful response\n     */\n    200: unknown;\n};\n\nexport type NonAsciiæøåÆøÅöôêÊ字符串Data = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * Dummy input param\n         */\n        nonAsciiParamæøåÆØÅöôêÊ: number;\n    };\n    url: '/api/v{api-version}/non-ascii-æøåÆØÅöôêÊ字符串';\n};\n\nexport type NonAsciiæøåÆøÅöôêÊ字符串Responses = {\n    /**\n     * Successful response\n     */\n    200: Array<NonAsciiStringæøåÆøÅöôêÊ字符串>;\n};\n\nexport type NonAsciiæøåÆøÅöôêÊ字符串Response = NonAsciiæøåÆøÅöôêÊ字符串Responses[keyof NonAsciiæøåÆøÅöôêÊ字符串Responses];\n\nexport type PutWithFormUrlEncodedData = {\n    body: ArrayWithStrings;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/non-ascii-æøåÆØÅöôêÊ字符串';\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@hey-api/client-fetch/sdk-nested-classes/client/client.gen.ts",
    "content": "// 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 (options: RequestOptions) => {\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 url = buildUrl(opts);\n\n    return { opts, url };\n  };\n\n  const request: Client['request'] = async (options) => {\n    // @ts-expect-error\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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@hey-api/client-fetch/sdk-nested-classes/client/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type { Auth } from '../core/auth.gen';\nexport type { QuerySerializerOptions } from '../core/bodySerializer.gen';\nexport {\n  formDataBodySerializer,\n  jsonBodySerializer,\n  urlSearchParamsBodySerializer,\n} from '../core/bodySerializer.gen';\nexport { buildClientParams } from '../core/params.gen';\nexport { serializeQueryKeyValue } from '../core/queryKeySerializer.gen';\nexport { createClient } from './client.gen';\nexport type {\n  Client,\n  ClientOptions,\n  Config,\n  CreateClientConfig,\n  Options,\n  RequestOptions,\n  RequestResult,\n  ResolvedRequestOptions,\n  ResponseStyle,\n  TDataShape,\n} from './types.gen';\nexport { createConfig, mergeHeaders } from './utils.gen';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@hey-api/client-fetch/sdk-nested-classes/client/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { Auth } from '../core/auth.gen';\nimport type {\n  ServerSentEventsOptions,\n  ServerSentEventsResult,\n} from '../core/serverSentEvents.gen';\nimport type { Client as CoreClient, Config as CoreConfig } from '../core/types.gen';\nimport type { Middleware } from './utils.gen';\n\nexport type ResponseStyle = 'data' | 'fields';\n\nexport interface Config<T extends ClientOptions = ClientOptions>\n  extends Omit<RequestInit, 'body' | 'headers' | 'method'>, CoreConfig {\n  /**\n   * Base URL for all requests made by this client.\n   */\n  baseUrl?: T['baseUrl'];\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   * Please don't use the Fetch client for Next.js applications. The `next`\n   * options won't have any effect.\n   *\n   * Install {@link https://www.npmjs.com/package/@hey-api/client-next `@hey-api/client-next`} instead.\n   */\n  next?: never;\n  /**\n   * Return the response data parsed in a specified format. By default, `auto`\n   * will infer the appropriate method from the `Content-Type` response header.\n   * You can override this behavior with any of the {@link Body} methods.\n   * Select `stream` if you don't want to parse response data at all.\n   *\n   * @default 'auto'\n   */\n  parseAs?: 'arrayBuffer' | 'auto' | 'blob' | 'formData' | 'json' | 'stream' | 'text';\n  /**\n   * Should we return only data or multiple fields (data, error, response, etc.)?\n   *\n   * @default 'fields'\n   */\n  responseStyle?: ResponseStyle;\n  /**\n   * Throw an error instead of returning it in the response?\n   *\n   * @default false\n   */\n  throwOnError?: T['throwOnError'];\n}\n\nexport interface RequestOptions<\n  TData = unknown,\n  TResponseStyle extends ResponseStyle = 'fields',\n  ThrowOnError extends boolean = boolean,\n  Url extends string = string,\n>\n  extends\n    Config<{\n      responseStyle: TResponseStyle;\n      throwOnError: ThrowOnError;\n    }>,\n    Pick<\n      ServerSentEventsOptions<TData>,\n      | 'onRequest'\n      | 'onSseError'\n      | 'onSseEvent'\n      | 'sseDefaultRetryDelay'\n      | 'sseMaxRetryAttempts'\n      | 'sseMaxRetryDelay'\n    > {\n  /**\n   * Any body that you want to add to your request.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/fetch#body}\n   */\n  body?: unknown;\n  path?: Record<string, unknown>;\n  query?: Record<string, unknown>;\n  /**\n   * Security mechanism(s) to use for the request.\n   */\n  security?: ReadonlyArray<Auth>;\n  url: Url;\n}\n\nexport interface ResolvedRequestOptions<\n  TResponseStyle extends ResponseStyle = 'fields',\n  ThrowOnError extends boolean = boolean,\n  Url extends string = string,\n> extends RequestOptions<unknown, TResponseStyle, ThrowOnError, Url> {\n  serializedBody?: string;\n}\n\nexport type RequestResult<\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = boolean,\n  TResponseStyle extends ResponseStyle = 'fields',\n> = ThrowOnError extends true\n  ? Promise<\n      TResponseStyle extends 'data'\n        ? TData extends Record<string, unknown>\n          ? TData[keyof TData]\n          : TData\n        : {\n            data: TData extends Record<string, unknown> ? TData[keyof TData] : TData;\n            request: Request;\n            response: Response;\n          }\n    >\n  : Promise<\n      TResponseStyle extends 'data'\n        ? (TData extends Record<string, unknown> ? TData[keyof TData] : TData) | undefined\n        : (\n            | {\n                data: TData extends Record<string, unknown> ? TData[keyof TData] : TData;\n                error: undefined;\n              }\n            | {\n                data: undefined;\n                error: TError extends Record<string, unknown> ? TError[keyof TError] : TError;\n              }\n          ) & {\n            request: Request;\n            response: Response;\n          }\n    >;\n\nexport interface ClientOptions {\n  baseUrl?: string;\n  responseStyle?: ResponseStyle;\n  throwOnError?: boolean;\n}\n\ntype MethodFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'>,\n) => RequestResult<TData, TError, ThrowOnError, TResponseStyle>;\n\ntype SseFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'>,\n) => Promise<ServerSentEventsResult<TData, TError>>;\n\ntype RequestFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'> &\n    Pick<Required<RequestOptions<TData, TResponseStyle, ThrowOnError>>, 'method'>,\n) => RequestResult<TData, TError, ThrowOnError, TResponseStyle>;\n\ntype BuildUrlFn = <\n  TData extends {\n    body?: unknown;\n    path?: Record<string, unknown>;\n    query?: Record<string, unknown>;\n    url: string;\n  },\n>(\n  options: TData & Options<TData>,\n) => string;\n\nexport type Client = CoreClient<RequestFn, Config, MethodFn, BuildUrlFn, SseFn> & {\n  interceptors: Middleware<Request, Response, unknown, ResolvedRequestOptions>;\n};\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 = ClientOptions> = (\n  override?: Config<ClientOptions & T>,\n) => Config<Required<ClientOptions> & T>;\n\nexport interface TDataShape {\n  body?: unknown;\n  headers?: unknown;\n  path?: unknown;\n  query?: unknown;\n  url: string;\n}\n\ntype OmitKeys<T, K> = Pick<T, Exclude<keyof T, K>>;\n\nexport type Options<\n  TData extends TDataShape = TDataShape,\n  ThrowOnError extends boolean = boolean,\n  TResponse = unknown,\n  TResponseStyle extends ResponseStyle = 'fields',\n> = OmitKeys<\n  RequestOptions<TResponse, TResponseStyle, ThrowOnError>,\n  'body' | 'path' | 'query' | 'url'\n> &\n  ([TData] extends [never] ? unknown : Omit<TData, 'url'>);\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@hey-api/client-fetch/sdk-nested-classes/client/utils.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@hey-api/client-fetch/sdk-nested-classes/client.gen.ts",
    "content": "// 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>());\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@hey-api/client-fetch/sdk-nested-classes/core/auth.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@hey-api/client-fetch/sdk-nested-classes/core/bodySerializer.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@hey-api/client-fetch/sdk-nested-classes/core/params.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@hey-api/client-fetch/sdk-nested-classes/core/pathSerializer.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@hey-api/client-fetch/sdk-nested-classes/core/queryKeySerializer.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\n/**\n * JSON-friendly union that mirrors what Pinia Colada can hash.\n */\nexport type JsonValue =\n  | null\n  | string\n  | number\n  | boolean\n  | JsonValue[]\n  | { [key: string]: JsonValue };\n\n/**\n * Replacer that converts non-JSON values (bigint, Date, etc.) to safe substitutes.\n */\nexport const queryKeyJsonReplacer = (_key: string, value: unknown) => {\n  if (value === undefined || typeof value === 'function' || typeof value === 'symbol') {\n    return undefined;\n  }\n  if (typeof value === 'bigint') {\n    return value.toString();\n  }\n  if (value instanceof Date) {\n    return value.toISOString();\n  }\n  return value;\n};\n\n/**\n * Safely stringifies a value and parses it back into a JsonValue.\n */\nexport const stringifyToJsonValue = (input: unknown): JsonValue | undefined => {\n  try {\n    const json = JSON.stringify(input, queryKeyJsonReplacer);\n    if (json === undefined) {\n      return undefined;\n    }\n    return JSON.parse(json) as JsonValue;\n  } catch {\n    return undefined;\n  }\n};\n\n/**\n * Detects plain objects (including objects with a null prototype).\n */\nconst isPlainObject = (value: unknown): value is Record<string, unknown> => {\n  if (value === null || typeof value !== 'object') {\n    return false;\n  }\n  const prototype = Object.getPrototypeOf(value as object);\n  return prototype === Object.prototype || prototype === null;\n};\n\n/**\n * Turns URLSearchParams into a sorted JSON object for deterministic keys.\n */\nconst serializeSearchParams = (params: URLSearchParams): JsonValue => {\n  const entries = Array.from(params.entries()).sort(([a], [b]) => a.localeCompare(b));\n  const result: Record<string, JsonValue> = {};\n\n  for (const [key, value] of entries) {\n    const existing = result[key];\n    if (existing === undefined) {\n      result[key] = value;\n      continue;\n    }\n\n    if (Array.isArray(existing)) {\n      (existing as string[]).push(value);\n    } else {\n      result[key] = [existing, value];\n    }\n  }\n\n  return result;\n};\n\n/**\n * Normalizes any accepted value into a JSON-friendly shape for query keys.\n */\nexport const serializeQueryKeyValue = (value: unknown): JsonValue | undefined => {\n  if (value === null) {\n    return null;\n  }\n\n  if (typeof value === 'string' || typeof value === 'number' || typeof value === 'boolean') {\n    return value;\n  }\n\n  if (value === undefined || typeof value === 'function' || typeof value === 'symbol') {\n    return undefined;\n  }\n\n  if (typeof value === 'bigint') {\n    return value.toString();\n  }\n\n  if (value instanceof Date) {\n    return value.toISOString();\n  }\n\n  if (Array.isArray(value)) {\n    return stringifyToJsonValue(value);\n  }\n\n  if (typeof URLSearchParams !== 'undefined' && value instanceof URLSearchParams) {\n    return serializeSearchParams(value);\n  }\n\n  if (isPlainObject(value)) {\n    return stringifyToJsonValue(value);\n  }\n\n  return undefined;\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@hey-api/client-fetch/sdk-nested-classes/core/serverSentEvents.gen.ts",
    "content": "// 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 const 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            // Normalize line endings: CRLF -> LF, then CR -> LF\n            buffer = buffer.replace(/\\r\\n/g, '\\n').replace(/\\r/g, '\\n');\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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@hey-api/client-fetch/sdk-nested-classes/core/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { Auth, AuthToken } from './auth.gen';\nimport type { BodySerializer, QuerySerializer, QuerySerializerOptions } from './bodySerializer.gen';\n\nexport type HttpMethod =\n  | 'connect'\n  | 'delete'\n  | 'get'\n  | 'head'\n  | 'options'\n  | 'patch'\n  | 'post'\n  | 'put'\n  | 'trace';\n\nexport type Client<\n  RequestFn = never,\n  Config = unknown,\n  MethodFn = never,\n  BuildUrlFn = never,\n  SseFn = never,\n> = {\n  /**\n   * Returns the final request URL.\n   */\n  buildUrl: BuildUrlFn;\n  getConfig: () => Config;\n  request: RequestFn;\n  setConfig: (config: Config) => Config;\n} & {\n  [K in HttpMethod]: MethodFn;\n} & ([SseFn] extends [never] ? { sse?: never } : { sse: { [K in HttpMethod]: SseFn } });\n\nexport interface Config {\n  /**\n   * Auth token or a function returning auth token. The resolved value will be\n   * added to the request payload as defined by its `security` array.\n   */\n  auth?: ((auth: Auth) => Promise<AuthToken> | AuthToken) | AuthToken;\n  /**\n   * A function for serializing request body parameter. By default,\n   * {@link JSON.stringify()} will be used.\n   */\n  bodySerializer?: BodySerializer | null;\n  /**\n   * An object containing any HTTP headers that you want to pre-populate your\n   * `Headers` object with.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/Headers/Headers#init See more}\n   */\n  headers?:\n    | RequestInit['headers']\n    | Record<\n        string,\n        string | number | boolean | (string | number | boolean)[] | null | undefined | unknown\n      >;\n  /**\n   * The request method.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/fetch#method See more}\n   */\n  method?: Uppercase<HttpMethod>;\n  /**\n   * A function for serializing request query parameters. By default, arrays\n   * will be exploded in form style, objects will be exploded in deepObject\n   * style, and reserved characters are percent-encoded.\n   *\n   * This method will have no effect if the native `paramsSerializer()` Axios\n   * API function is used.\n   *\n   * {@link https://swagger.io/docs/specification/serialization/#query View examples}\n   */\n  querySerializer?: QuerySerializer | QuerySerializerOptions;\n  /**\n   * A function validating request data. This is useful if you want to ensure\n   * the request conforms to the desired shape, so it can be safely sent to\n   * the server.\n   */\n  requestValidator?: (data: unknown) => Promise<unknown>;\n  /**\n   * A function transforming response data before it's returned. This is useful\n   * for post-processing data, e.g. converting ISO strings into Date objects.\n   */\n  responseTransformer?: (data: unknown) => Promise<unknown>;\n  /**\n   * A function validating response data. This is useful if you want to ensure\n   * the response conforms to the desired shape, so it can be safely passed to\n   * the transformers and returned to the user.\n   */\n  responseValidator?: (data: unknown) => Promise<unknown>;\n}\n\ntype IsExactlyNeverOrNeverUndefined<T> = [T] extends [never]\n  ? true\n  : [T] extends [never | undefined]\n    ? [undefined] extends [T]\n      ? false\n      : true\n    : false;\n\nexport type OmitNever<T extends Record<string, unknown>> = {\n  [K in keyof T as IsExactlyNeverOrNeverUndefined<T[K]> extends true ? never : K]: T[K];\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@hey-api/client-fetch/sdk-nested-classes/core/utils.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@hey-api/client-fetch/sdk-nested-classes/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport { Business, Business2, Business3, Business4, Business5, Domains, Domains2, Domains3, Domains4, Locations, type Options, Providers, Providers2, Providers3, Providers4 } from './sdk.gen';\nexport type { BusinessGetData, BusinessGetResponse, BusinessGetResponses, BusinessProvidersDomainsGetData, BusinessProvidersDomainsGetResponse, BusinessProvidersDomainsGetResponses, BusinessProvidersDomainsPostData, BusinessProvidersDomainsPostResponse, BusinessProvidersDomainsPostResponses, ClientOptions, GetData, GetResponse, GetResponses, PutBusinessProvidersDomainsData, PutBusinessProvidersDomainsResponse, PutBusinessProvidersDomainsResponses } from './types.gen';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@hey-api/client-fetch/sdk-nested-classes/sdk.gen.ts",
    "content": "// 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 { BusinessGetData, BusinessGetResponses, BusinessProvidersDomainsGetData, BusinessProvidersDomainsGetResponses, BusinessProvidersDomainsPostData, BusinessProvidersDomainsPostResponses, GetData, GetResponses, PutBusinessProvidersDomainsData, PutBusinessProvidersDomainsResponses } from './types.gen';\n\nexport type Options<TData extends TDataShape = TDataShape, ThrowOnError extends boolean = boolean> = Options2<TData, ThrowOnError> & {\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\nexport class Domains {\n    public static get<ThrowOnError extends boolean = false>(options?: Options<BusinessProvidersDomainsGetData, ThrowOnError>) {\n        return (options?.client ?? client).get<BusinessProvidersDomainsGetResponses, unknown, ThrowOnError>({ url: '/business/providers/domains', ...options });\n    }\n    \n    public static post<ThrowOnError extends boolean = false>(options?: Options<BusinessProvidersDomainsPostData, ThrowOnError>) {\n        return (options?.client ?? client).post<BusinessProvidersDomainsPostResponses, unknown, ThrowOnError>({ url: '/business/providers/domains', ...options });\n    }\n}\n\nexport class Providers {\n    static domains = Domains;\n}\n\nexport class Business {\n    public static get<ThrowOnError extends boolean = false>(options?: Options<BusinessGetData, ThrowOnError>) {\n        return (options?.client ?? client).get<BusinessGetResponses, unknown, ThrowOnError>({ url: '/locations/businesses', ...options });\n    }\n    \n    static providers = Providers;\n}\n\nexport class Business2 {\n    static business = Business;\n}\n\nexport class Domains2 {\n    public static get<ThrowOnError extends boolean = false>(options?: Options<BusinessProvidersDomainsGetData, ThrowOnError>) {\n        return (options?.client ?? client).get<BusinessProvidersDomainsGetResponses, unknown, ThrowOnError>({ url: '/business/providers/domains', ...options });\n    }\n    \n    public static post<ThrowOnError extends boolean = false>(options?: Options<BusinessProvidersDomainsPostData, ThrowOnError>) {\n        return (options?.client ?? client).post<BusinessProvidersDomainsPostResponses, unknown, ThrowOnError>({ url: '/business/providers/domains', ...options });\n    }\n}\n\nexport class Providers2 {\n    static domains = Domains2;\n}\n\nexport class Business3 {\n    static providers = Providers2;\n}\n\nexport class Providers3 {\n    static business = Business3;\n}\n\nexport class Domains3 {\n    public static get<ThrowOnError extends boolean = false>(options?: Options<BusinessProvidersDomainsGetData, ThrowOnError>) {\n        return (options?.client ?? client).get<BusinessProvidersDomainsGetResponses, unknown, ThrowOnError>({ url: '/business/providers/domains', ...options });\n    }\n    \n    public static post<ThrowOnError extends boolean = false>(options?: Options<BusinessProvidersDomainsPostData, ThrowOnError>) {\n        return (options?.client ?? client).post<BusinessProvidersDomainsPostResponses, unknown, ThrowOnError>({ url: '/business/providers/domains', ...options });\n    }\n}\n\nexport class Providers4 {\n    static domains = Domains3;\n}\n\nexport class Business4 {\n    static providers = Providers4;\n}\n\nexport class Domains4 {\n    public static putBusinessProvidersDomains<ThrowOnError extends boolean = false>(options?: Options<PutBusinessProvidersDomainsData, ThrowOnError>) {\n        return (options?.client ?? client).put<PutBusinessProvidersDomainsResponses, unknown, ThrowOnError>({ url: '/business/providers/domains', ...options });\n    }\n    \n    static business = Business4;\n}\n\nexport class Business5 {\n    public static get<ThrowOnError extends boolean = false>(options?: Options<BusinessGetData, ThrowOnError>) {\n        return (options?.client ?? client).get<BusinessGetResponses, unknown, ThrowOnError>({ url: '/locations/businesses', ...options });\n    }\n}\n\nexport class Locations {\n    public static get<ThrowOnError extends boolean = false>(options?: Options<GetData, ThrowOnError>) {\n        return (options?.client ?? client).get<GetResponses, unknown, ThrowOnError>({ url: '/locations', ...options });\n    }\n    \n    static business = Business5;\n}\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@hey-api/client-fetch/sdk-nested-classes/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type ClientOptions = {\n    baseUrl: `${string}://${string}` | (string & {});\n};\n\nexport type BusinessProvidersDomainsGetData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/business/providers/domains';\n};\n\nexport type BusinessProvidersDomainsGetResponses = {\n    /**\n     * OK\n     */\n    200: string;\n};\n\nexport type BusinessProvidersDomainsGetResponse = BusinessProvidersDomainsGetResponses[keyof BusinessProvidersDomainsGetResponses];\n\nexport type BusinessProvidersDomainsPostData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/business/providers/domains';\n};\n\nexport type BusinessProvidersDomainsPostResponses = {\n    /**\n     * OK\n     */\n    200: string;\n};\n\nexport type BusinessProvidersDomainsPostResponse = BusinessProvidersDomainsPostResponses[keyof BusinessProvidersDomainsPostResponses];\n\nexport type PutBusinessProvidersDomainsData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/business/providers/domains';\n};\n\nexport type PutBusinessProvidersDomainsResponses = {\n    /**\n     * OK\n     */\n    200: string;\n};\n\nexport type PutBusinessProvidersDomainsResponse = PutBusinessProvidersDomainsResponses[keyof PutBusinessProvidersDomainsResponses];\n\nexport type BusinessGetData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/locations/businesses';\n};\n\nexport type BusinessGetResponses = {\n    /**\n     * OK\n     */\n    200: string;\n};\n\nexport type BusinessGetResponse = BusinessGetResponses[keyof BusinessGetResponses];\n\nexport type GetData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/locations';\n};\n\nexport type GetResponses = {\n    /**\n     * OK\n     */\n    200: string;\n};\n\nexport type GetResponse = GetResponses[keyof GetResponses];\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@hey-api/client-fetch/sdk-nested-classes-instance/client/client.gen.ts",
    "content": "// 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 (options: RequestOptions) => {\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 url = buildUrl(opts);\n\n    return { opts, url };\n  };\n\n  const request: Client['request'] = async (options) => {\n    // @ts-expect-error\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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@hey-api/client-fetch/sdk-nested-classes-instance/client/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type { Auth } from '../core/auth.gen';\nexport type { QuerySerializerOptions } from '../core/bodySerializer.gen';\nexport {\n  formDataBodySerializer,\n  jsonBodySerializer,\n  urlSearchParamsBodySerializer,\n} from '../core/bodySerializer.gen';\nexport { buildClientParams } from '../core/params.gen';\nexport { serializeQueryKeyValue } from '../core/queryKeySerializer.gen';\nexport { createClient } from './client.gen';\nexport type {\n  Client,\n  ClientOptions,\n  Config,\n  CreateClientConfig,\n  Options,\n  RequestOptions,\n  RequestResult,\n  ResolvedRequestOptions,\n  ResponseStyle,\n  TDataShape,\n} from './types.gen';\nexport { createConfig, mergeHeaders } from './utils.gen';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@hey-api/client-fetch/sdk-nested-classes-instance/client/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { Auth } from '../core/auth.gen';\nimport type {\n  ServerSentEventsOptions,\n  ServerSentEventsResult,\n} from '../core/serverSentEvents.gen';\nimport type { Client as CoreClient, Config as CoreConfig } from '../core/types.gen';\nimport type { Middleware } from './utils.gen';\n\nexport type ResponseStyle = 'data' | 'fields';\n\nexport interface Config<T extends ClientOptions = ClientOptions>\n  extends Omit<RequestInit, 'body' | 'headers' | 'method'>, CoreConfig {\n  /**\n   * Base URL for all requests made by this client.\n   */\n  baseUrl?: T['baseUrl'];\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   * Please don't use the Fetch client for Next.js applications. The `next`\n   * options won't have any effect.\n   *\n   * Install {@link https://www.npmjs.com/package/@hey-api/client-next `@hey-api/client-next`} instead.\n   */\n  next?: never;\n  /**\n   * Return the response data parsed in a specified format. By default, `auto`\n   * will infer the appropriate method from the `Content-Type` response header.\n   * You can override this behavior with any of the {@link Body} methods.\n   * Select `stream` if you don't want to parse response data at all.\n   *\n   * @default 'auto'\n   */\n  parseAs?: 'arrayBuffer' | 'auto' | 'blob' | 'formData' | 'json' | 'stream' | 'text';\n  /**\n   * Should we return only data or multiple fields (data, error, response, etc.)?\n   *\n   * @default 'fields'\n   */\n  responseStyle?: ResponseStyle;\n  /**\n   * Throw an error instead of returning it in the response?\n   *\n   * @default false\n   */\n  throwOnError?: T['throwOnError'];\n}\n\nexport interface RequestOptions<\n  TData = unknown,\n  TResponseStyle extends ResponseStyle = 'fields',\n  ThrowOnError extends boolean = boolean,\n  Url extends string = string,\n>\n  extends\n    Config<{\n      responseStyle: TResponseStyle;\n      throwOnError: ThrowOnError;\n    }>,\n    Pick<\n      ServerSentEventsOptions<TData>,\n      | 'onRequest'\n      | 'onSseError'\n      | 'onSseEvent'\n      | 'sseDefaultRetryDelay'\n      | 'sseMaxRetryAttempts'\n      | 'sseMaxRetryDelay'\n    > {\n  /**\n   * Any body that you want to add to your request.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/fetch#body}\n   */\n  body?: unknown;\n  path?: Record<string, unknown>;\n  query?: Record<string, unknown>;\n  /**\n   * Security mechanism(s) to use for the request.\n   */\n  security?: ReadonlyArray<Auth>;\n  url: Url;\n}\n\nexport interface ResolvedRequestOptions<\n  TResponseStyle extends ResponseStyle = 'fields',\n  ThrowOnError extends boolean = boolean,\n  Url extends string = string,\n> extends RequestOptions<unknown, TResponseStyle, ThrowOnError, Url> {\n  serializedBody?: string;\n}\n\nexport type RequestResult<\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = boolean,\n  TResponseStyle extends ResponseStyle = 'fields',\n> = ThrowOnError extends true\n  ? Promise<\n      TResponseStyle extends 'data'\n        ? TData extends Record<string, unknown>\n          ? TData[keyof TData]\n          : TData\n        : {\n            data: TData extends Record<string, unknown> ? TData[keyof TData] : TData;\n            request: Request;\n            response: Response;\n          }\n    >\n  : Promise<\n      TResponseStyle extends 'data'\n        ? (TData extends Record<string, unknown> ? TData[keyof TData] : TData) | undefined\n        : (\n            | {\n                data: TData extends Record<string, unknown> ? TData[keyof TData] : TData;\n                error: undefined;\n              }\n            | {\n                data: undefined;\n                error: TError extends Record<string, unknown> ? TError[keyof TError] : TError;\n              }\n          ) & {\n            request: Request;\n            response: Response;\n          }\n    >;\n\nexport interface ClientOptions {\n  baseUrl?: string;\n  responseStyle?: ResponseStyle;\n  throwOnError?: boolean;\n}\n\ntype MethodFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'>,\n) => RequestResult<TData, TError, ThrowOnError, TResponseStyle>;\n\ntype SseFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'>,\n) => Promise<ServerSentEventsResult<TData, TError>>;\n\ntype RequestFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'> &\n    Pick<Required<RequestOptions<TData, TResponseStyle, ThrowOnError>>, 'method'>,\n) => RequestResult<TData, TError, ThrowOnError, TResponseStyle>;\n\ntype BuildUrlFn = <\n  TData extends {\n    body?: unknown;\n    path?: Record<string, unknown>;\n    query?: Record<string, unknown>;\n    url: string;\n  },\n>(\n  options: TData & Options<TData>,\n) => string;\n\nexport type Client = CoreClient<RequestFn, Config, MethodFn, BuildUrlFn, SseFn> & {\n  interceptors: Middleware<Request, Response, unknown, ResolvedRequestOptions>;\n};\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 = ClientOptions> = (\n  override?: Config<ClientOptions & T>,\n) => Config<Required<ClientOptions> & T>;\n\nexport interface TDataShape {\n  body?: unknown;\n  headers?: unknown;\n  path?: unknown;\n  query?: unknown;\n  url: string;\n}\n\ntype OmitKeys<T, K> = Pick<T, Exclude<keyof T, K>>;\n\nexport type Options<\n  TData extends TDataShape = TDataShape,\n  ThrowOnError extends boolean = boolean,\n  TResponse = unknown,\n  TResponseStyle extends ResponseStyle = 'fields',\n> = OmitKeys<\n  RequestOptions<TResponse, TResponseStyle, ThrowOnError>,\n  'body' | 'path' | 'query' | 'url'\n> &\n  ([TData] extends [never] ? unknown : Omit<TData, 'url'>);\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@hey-api/client-fetch/sdk-nested-classes-instance/client/utils.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@hey-api/client-fetch/sdk-nested-classes-instance/client.gen.ts",
    "content": "// 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>());\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@hey-api/client-fetch/sdk-nested-classes-instance/core/auth.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@hey-api/client-fetch/sdk-nested-classes-instance/core/bodySerializer.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@hey-api/client-fetch/sdk-nested-classes-instance/core/params.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@hey-api/client-fetch/sdk-nested-classes-instance/core/pathSerializer.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@hey-api/client-fetch/sdk-nested-classes-instance/core/queryKeySerializer.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\n/**\n * JSON-friendly union that mirrors what Pinia Colada can hash.\n */\nexport type JsonValue =\n  | null\n  | string\n  | number\n  | boolean\n  | JsonValue[]\n  | { [key: string]: JsonValue };\n\n/**\n * Replacer that converts non-JSON values (bigint, Date, etc.) to safe substitutes.\n */\nexport const queryKeyJsonReplacer = (_key: string, value: unknown) => {\n  if (value === undefined || typeof value === 'function' || typeof value === 'symbol') {\n    return undefined;\n  }\n  if (typeof value === 'bigint') {\n    return value.toString();\n  }\n  if (value instanceof Date) {\n    return value.toISOString();\n  }\n  return value;\n};\n\n/**\n * Safely stringifies a value and parses it back into a JsonValue.\n */\nexport const stringifyToJsonValue = (input: unknown): JsonValue | undefined => {\n  try {\n    const json = JSON.stringify(input, queryKeyJsonReplacer);\n    if (json === undefined) {\n      return undefined;\n    }\n    return JSON.parse(json) as JsonValue;\n  } catch {\n    return undefined;\n  }\n};\n\n/**\n * Detects plain objects (including objects with a null prototype).\n */\nconst isPlainObject = (value: unknown): value is Record<string, unknown> => {\n  if (value === null || typeof value !== 'object') {\n    return false;\n  }\n  const prototype = Object.getPrototypeOf(value as object);\n  return prototype === Object.prototype || prototype === null;\n};\n\n/**\n * Turns URLSearchParams into a sorted JSON object for deterministic keys.\n */\nconst serializeSearchParams = (params: URLSearchParams): JsonValue => {\n  const entries = Array.from(params.entries()).sort(([a], [b]) => a.localeCompare(b));\n  const result: Record<string, JsonValue> = {};\n\n  for (const [key, value] of entries) {\n    const existing = result[key];\n    if (existing === undefined) {\n      result[key] = value;\n      continue;\n    }\n\n    if (Array.isArray(existing)) {\n      (existing as string[]).push(value);\n    } else {\n      result[key] = [existing, value];\n    }\n  }\n\n  return result;\n};\n\n/**\n * Normalizes any accepted value into a JSON-friendly shape for query keys.\n */\nexport const serializeQueryKeyValue = (value: unknown): JsonValue | undefined => {\n  if (value === null) {\n    return null;\n  }\n\n  if (typeof value === 'string' || typeof value === 'number' || typeof value === 'boolean') {\n    return value;\n  }\n\n  if (value === undefined || typeof value === 'function' || typeof value === 'symbol') {\n    return undefined;\n  }\n\n  if (typeof value === 'bigint') {\n    return value.toString();\n  }\n\n  if (value instanceof Date) {\n    return value.toISOString();\n  }\n\n  if (Array.isArray(value)) {\n    return stringifyToJsonValue(value);\n  }\n\n  if (typeof URLSearchParams !== 'undefined' && value instanceof URLSearchParams) {\n    return serializeSearchParams(value);\n  }\n\n  if (isPlainObject(value)) {\n    return stringifyToJsonValue(value);\n  }\n\n  return undefined;\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@hey-api/client-fetch/sdk-nested-classes-instance/core/serverSentEvents.gen.ts",
    "content": "// 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 const 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            // Normalize line endings: CRLF -> LF, then CR -> LF\n            buffer = buffer.replace(/\\r\\n/g, '\\n').replace(/\\r/g, '\\n');\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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@hey-api/client-fetch/sdk-nested-classes-instance/core/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { Auth, AuthToken } from './auth.gen';\nimport type { BodySerializer, QuerySerializer, QuerySerializerOptions } from './bodySerializer.gen';\n\nexport type HttpMethod =\n  | 'connect'\n  | 'delete'\n  | 'get'\n  | 'head'\n  | 'options'\n  | 'patch'\n  | 'post'\n  | 'put'\n  | 'trace';\n\nexport type Client<\n  RequestFn = never,\n  Config = unknown,\n  MethodFn = never,\n  BuildUrlFn = never,\n  SseFn = never,\n> = {\n  /**\n   * Returns the final request URL.\n   */\n  buildUrl: BuildUrlFn;\n  getConfig: () => Config;\n  request: RequestFn;\n  setConfig: (config: Config) => Config;\n} & {\n  [K in HttpMethod]: MethodFn;\n} & ([SseFn] extends [never] ? { sse?: never } : { sse: { [K in HttpMethod]: SseFn } });\n\nexport interface Config {\n  /**\n   * Auth token or a function returning auth token. The resolved value will be\n   * added to the request payload as defined by its `security` array.\n   */\n  auth?: ((auth: Auth) => Promise<AuthToken> | AuthToken) | AuthToken;\n  /**\n   * A function for serializing request body parameter. By default,\n   * {@link JSON.stringify()} will be used.\n   */\n  bodySerializer?: BodySerializer | null;\n  /**\n   * An object containing any HTTP headers that you want to pre-populate your\n   * `Headers` object with.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/Headers/Headers#init See more}\n   */\n  headers?:\n    | RequestInit['headers']\n    | Record<\n        string,\n        string | number | boolean | (string | number | boolean)[] | null | undefined | unknown\n      >;\n  /**\n   * The request method.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/fetch#method See more}\n   */\n  method?: Uppercase<HttpMethod>;\n  /**\n   * A function for serializing request query parameters. By default, arrays\n   * will be exploded in form style, objects will be exploded in deepObject\n   * style, and reserved characters are percent-encoded.\n   *\n   * This method will have no effect if the native `paramsSerializer()` Axios\n   * API function is used.\n   *\n   * {@link https://swagger.io/docs/specification/serialization/#query View examples}\n   */\n  querySerializer?: QuerySerializer | QuerySerializerOptions;\n  /**\n   * A function validating request data. This is useful if you want to ensure\n   * the request conforms to the desired shape, so it can be safely sent to\n   * the server.\n   */\n  requestValidator?: (data: unknown) => Promise<unknown>;\n  /**\n   * A function transforming response data before it's returned. This is useful\n   * for post-processing data, e.g. converting ISO strings into Date objects.\n   */\n  responseTransformer?: (data: unknown) => Promise<unknown>;\n  /**\n   * A function validating response data. This is useful if you want to ensure\n   * the response conforms to the desired shape, so it can be safely passed to\n   * the transformers and returned to the user.\n   */\n  responseValidator?: (data: unknown) => Promise<unknown>;\n}\n\ntype IsExactlyNeverOrNeverUndefined<T> = [T] extends [never]\n  ? true\n  : [T] extends [never | undefined]\n    ? [undefined] extends [T]\n      ? false\n      : true\n    : false;\n\nexport type OmitNever<T extends Record<string, unknown>> = {\n  [K in keyof T as IsExactlyNeverOrNeverUndefined<T[K]> extends true ? never : K]: T[K];\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@hey-api/client-fetch/sdk-nested-classes-instance/core/utils.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@hey-api/client-fetch/sdk-nested-classes-instance/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport { Business, Domains, NestedSdkWithInstance, type Options, Providers } from './sdk.gen';\nexport type { BusinessGetData, BusinessGetResponse, BusinessGetResponses, BusinessProvidersDomainsGetData, BusinessProvidersDomainsGetResponse, BusinessProvidersDomainsGetResponses, BusinessProvidersDomainsPostData, BusinessProvidersDomainsPostResponse, BusinessProvidersDomainsPostResponses, ClientOptions, GetData, GetResponse, GetResponses, PutBusinessProvidersDomainsData, PutBusinessProvidersDomainsResponse, PutBusinessProvidersDomainsResponses } from './types.gen';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@hey-api/client-fetch/sdk-nested-classes-instance/sdk.gen.ts",
    "content": "// 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 { BusinessGetData, BusinessGetResponses, BusinessProvidersDomainsGetData, BusinessProvidersDomainsGetResponses, BusinessProvidersDomainsPostData, BusinessProvidersDomainsPostResponses, GetData, GetResponses, PutBusinessProvidersDomainsData, PutBusinessProvidersDomainsResponses } from './types.gen';\n\nexport type Options<TData extends TDataShape = TDataShape, ThrowOnError extends boolean = boolean> = Options2<TData, ThrowOnError> & {\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\nclass HeyApiClient {\n    protected client: Client;\n    \n    constructor(args?: {\n        client?: Client;\n    }) {\n        this.client = args?.client ?? client;\n    }\n}\n\nclass HeyApiRegistry<T> {\n    private readonly defaultKey = 'default';\n    \n    private readonly instances: Map<string, T> = new Map();\n    \n    get(key?: string): T {\n        const instance = this.instances.get(key ?? this.defaultKey);\n        if (!instance) {\n            throw new Error(`No SDK client found. Create one with \"new NestedSdkWithInstance()\" to fix this error.`);\n        }\n        return instance;\n    }\n    \n    set(value: T, key?: string): void {\n        this.instances.set(key ?? this.defaultKey, value);\n    }\n}\n\nexport class Domains extends HeyApiClient {\n    public get<ThrowOnError extends boolean = false>(options?: Options<BusinessProvidersDomainsGetData, ThrowOnError>) {\n        return (options?.client ?? this.client).get<BusinessProvidersDomainsGetResponses, unknown, ThrowOnError>({ url: '/business/providers/domains', ...options });\n    }\n    \n    public post<ThrowOnError extends boolean = false>(options?: Options<BusinessProvidersDomainsPostData, ThrowOnError>) {\n        return (options?.client ?? this.client).post<BusinessProvidersDomainsPostResponses, unknown, ThrowOnError>({ url: '/business/providers/domains', ...options });\n    }\n}\n\nexport class Providers extends HeyApiClient {\n    private _domains?: Domains;\n    get domains(): Domains {\n        return this._domains ??= new Domains({ client: this.client });\n    }\n}\n\nexport class Business extends HeyApiClient {\n    public get<ThrowOnError extends boolean = false>(options?: Options<BusinessGetData, ThrowOnError>) {\n        return (options?.client ?? this.client).get<BusinessGetResponses, unknown, ThrowOnError>({ url: '/locations/businesses', ...options });\n    }\n    \n    private _providers?: Providers;\n    get providers(): Providers {\n        return this._providers ??= new Providers({ client: this.client });\n    }\n}\n\nexport class NestedSdkWithInstance extends HeyApiClient {\n    public static readonly __registry = new HeyApiRegistry<NestedSdkWithInstance>();\n    \n    constructor(args?: {\n        client?: Client;\n        key?: string;\n    }) {\n        super(args);\n        NestedSdkWithInstance.__registry.set(this, args?.key);\n    }\n    \n    public putBusinessProvidersDomains<ThrowOnError extends boolean = false>(options?: Options<PutBusinessProvidersDomainsData, ThrowOnError>) {\n        return (options?.client ?? this.client).put<PutBusinessProvidersDomainsResponses, unknown, ThrowOnError>({ url: '/business/providers/domains', ...options });\n    }\n    \n    public get<ThrowOnError extends boolean = false>(options?: Options<GetData, ThrowOnError>) {\n        return (options?.client ?? this.client).get<GetResponses, unknown, ThrowOnError>({ url: '/locations', ...options });\n    }\n    \n    private _business?: Business;\n    get business(): Business {\n        return this._business ??= new Business({ client: this.client });\n    }\n}\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@hey-api/client-fetch/sdk-nested-classes-instance/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type ClientOptions = {\n    baseUrl: `${string}://${string}` | (string & {});\n};\n\nexport type BusinessProvidersDomainsGetData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/business/providers/domains';\n};\n\nexport type BusinessProvidersDomainsGetResponses = {\n    /**\n     * OK\n     */\n    200: string;\n};\n\nexport type BusinessProvidersDomainsGetResponse = BusinessProvidersDomainsGetResponses[keyof BusinessProvidersDomainsGetResponses];\n\nexport type BusinessProvidersDomainsPostData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/business/providers/domains';\n};\n\nexport type BusinessProvidersDomainsPostResponses = {\n    /**\n     * OK\n     */\n    200: string;\n};\n\nexport type BusinessProvidersDomainsPostResponse = BusinessProvidersDomainsPostResponses[keyof BusinessProvidersDomainsPostResponses];\n\nexport type PutBusinessProvidersDomainsData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/business/providers/domains';\n};\n\nexport type PutBusinessProvidersDomainsResponses = {\n    /**\n     * OK\n     */\n    200: string;\n};\n\nexport type PutBusinessProvidersDomainsResponse = PutBusinessProvidersDomainsResponses[keyof PutBusinessProvidersDomainsResponses];\n\nexport type BusinessGetData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/locations/businesses';\n};\n\nexport type BusinessGetResponses = {\n    /**\n     * OK\n     */\n    200: string;\n};\n\nexport type BusinessGetResponse = BusinessGetResponses[keyof BusinessGetResponses];\n\nexport type GetData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/locations';\n};\n\nexport type GetResponses = {\n    /**\n     * OK\n     */\n    200: string;\n};\n\nexport type GetResponse = GetResponses[keyof GetResponses];\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@hey-api/schemas/default/schemas.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport const _400Schema = {\n    description: 'Model with number-only name',\n    type: 'string'\n} as const;\n\nexport const ExternalRefASchema = {\n    description: 'External ref to shared model (A)',\n    $ref: '#/components/schemas/ExternalSharedModel'\n} as const;\n\nexport const ExternalRefBSchema = {\n    description: 'External ref to shared model (B)',\n    $ref: '#/components/schemas/ExternalSharedModel'\n} as const;\n\nexport const camelCaseCommentWithBreaksSchema = {\n    description: 'Testing multiline comments in string: First line\\nSecond line\\n\\nFourth line',\n    type: 'integer'\n} as const;\n\nexport const CommentWithBreaksSchema = {\n    description: 'Testing multiline comments in string: First line\\nSecond line\\n\\nFourth line',\n    type: 'integer'\n} as const;\n\nexport const CommentWithBackticksSchema = {\n    description: 'Testing backticks in string: `backticks` and ```multiple backticks``` should work',\n    type: 'integer'\n} as const;\n\nexport const CommentWithBackticksAndQuotesSchema = {\n    description: 'Testing backticks and quotes in string: `backticks`, \\'quotes\\', \"double quotes\" and ```multiple backticks``` should work',\n    type: 'integer'\n} as const;\n\nexport const CommentWithSlashesSchema = {\n    description: 'Testing slashes in string: \\\\backwards\\\\\\\\\\\\ and /forwards/// should work',\n    type: 'integer'\n} as const;\n\nexport const CommentWithExpressionPlaceholdersSchema = {\n    description: 'Testing expression placeholders in string: ${expression} should work',\n    type: 'integer'\n} as const;\n\nexport const CommentWithQuotesSchema = {\n    description: 'Testing quotes in string: \\'single quote\\'\\'\\' and \"double quotes\"\"\" should work',\n    type: 'integer'\n} as const;\n\nexport const CommentWithReservedCharactersSchema = {\n    description: 'Testing reserved characters in string: /* inline */ and /** inline **/ should work',\n    type: 'integer'\n} as const;\n\nexport const SimpleIntegerSchema = {\n    description: 'This is a simple number',\n    type: 'integer'\n} as const;\n\nexport const SimpleBooleanSchema = {\n    description: 'This is a simple boolean',\n    type: 'boolean'\n} as const;\n\nexport const SimpleStringSchema = {\n    description: 'This is a simple string',\n    type: 'string'\n} as const;\n\nexport const NonAsciiStringæøåÆØÅöôêÊ字符串Schema = {\n    description: 'A string with non-ascii (unicode) characters valid in typescript identifiers (æøåÆØÅöÔèÈ字符串)',\n    type: 'string'\n} as const;\n\nexport const SimpleFileSchema = {\n    description: 'This is a simple file',\n    format: 'binary',\n    type: 'string'\n} as const;\n\nexport const SimpleReferenceSchema = {\n    description: 'This is a simple reference',\n    $ref: '#/components/schemas/ModelWithString'\n} as const;\n\nexport const SimpleStringWithPatternSchema = {\n    description: 'This is a simple string',\n    maxLength: 64,\n    pattern: '^[a-zA-Z0-9_]*$',\n    type: [\n        'string',\n        'null'\n    ]\n} as const;\n\nexport const EnumWithStringsSchema = {\n    description: 'This is a simple enum with strings',\n    enum: [\n        'Success',\n        'Warning',\n        'Error',\n        '\\'Single Quote\\'',\n        '\"Double Quotes\"',\n        'Non-ascii: øæåôöØÆÅÔÖ字符串'\n    ]\n} as const;\n\nexport const EnumWithReplacedCharactersSchema = {\n    enum: [\n        '\\'Single Quote\\'',\n        '\"Double Quotes\"',\n        'øæåôöØÆÅÔÖ字符串',\n        3.1,\n        ''\n    ],\n    type: 'string'\n} as const;\n\nexport const EnumWithNumbersSchema = {\n    description: 'This is a simple enum with numbers',\n    enum: [\n        1,\n        2,\n        3,\n        1.1,\n        1.2,\n        1.3,\n        100,\n        200,\n        300,\n        -100,\n        -200,\n        -300,\n        -1.1,\n        -1.2,\n        -1.3\n    ],\n    default: 200\n} as const;\n\nexport const EnumFromDescriptionSchema = {\n    description: 'Success=1,Warning=2,Error=3',\n    type: 'number'\n} as const;\n\nexport const EnumWithExtensionsSchema = {\n    description: 'This is a simple enum with numbers',\n    enum: [\n        200,\n        400,\n        500\n    ],\n    'x-enum-varnames': [\n        'CUSTOM_SUCCESS',\n        'CUSTOM_WARNING',\n        'CUSTOM_ERROR'\n    ],\n    'x-enum-descriptions': [\n        'Used when the status of something is successful',\n        'Used when the status of something has a warning',\n        'Used when the status of something has an error'\n    ]\n} as const;\n\nexport const EnumWithXEnumNamesSchema = {\n    enum: [\n        0,\n        1,\n        2\n    ],\n    'x-enumNames': [\n        'zero',\n        'one',\n        'two'\n    ]\n} as const;\n\nexport const ArrayWithNumbersSchema = {\n    description: 'This is a simple array with numbers',\n    type: 'array',\n    items: {\n        type: 'integer'\n    }\n} as const;\n\nexport const ArrayWithBooleansSchema = {\n    description: 'This is a simple array with booleans',\n    type: 'array',\n    items: {\n        type: 'boolean'\n    }\n} as const;\n\nexport const ArrayWithStringsSchema = {\n    description: 'This is a simple array with strings',\n    type: 'array',\n    items: {\n        type: 'string'\n    },\n    default: [\n        'test'\n    ]\n} as const;\n\nexport const ArrayWithReferencesSchema = {\n    description: 'This is a simple array with references',\n    type: 'array',\n    items: {\n        $ref: '#/components/schemas/ModelWithString'\n    }\n} as const;\n\nexport const ArrayWithArraySchema = {\n    description: 'This is a simple array containing an array',\n    type: 'array',\n    items: {\n        type: 'array',\n        items: {\n            $ref: '#/components/schemas/ModelWithString'\n        }\n    }\n} as const;\n\nexport const ArrayWithPropertiesSchema = {\n    description: 'This is a simple array with properties',\n    type: 'array',\n    items: {\n        type: 'object',\n        properties: {\n            '16x16': {\n                $ref: '#/components/schemas/camelCaseCommentWithBreaks'\n            },\n            bar: {\n                type: 'string'\n            }\n        }\n    }\n} as const;\n\nexport const ArrayWithAnyOfPropertiesSchema = {\n    description: 'This is a simple array with any of properties',\n    type: 'array',\n    items: {\n        anyOf: [\n            {\n                type: 'object',\n                properties: {\n                    foo: {\n                        type: 'string',\n                        default: 'test'\n                    }\n                }\n            },\n            {\n                type: 'object',\n                properties: {\n                    bar: {\n                        type: 'string'\n                    }\n                }\n            }\n        ]\n    }\n} as const;\n\nexport const AnyOfAnyAndNullSchema = {\n    type: 'object',\n    properties: {\n        data: {\n            anyOf: [\n                {},\n                {\n                    type: 'null'\n                }\n            ]\n        }\n    }\n} as const;\n\nexport const AnyOfArraysSchema = {\n    description: 'This is a simple array with any of properties',\n    type: 'object',\n    properties: {\n        results: {\n            items: {\n                anyOf: [\n                    {\n                        type: 'object',\n                        properties: {\n                            foo: {\n                                type: 'string'\n                            }\n                        }\n                    },\n                    {\n                        type: 'object',\n                        properties: {\n                            bar: {\n                                type: 'string'\n                            }\n                        }\n                    }\n                ]\n            },\n            type: 'array'\n        }\n    }\n} as const;\n\nexport const DictionaryWithStringSchema = {\n    description: 'This is a string dictionary',\n    type: 'object',\n    additionalProperties: {\n        type: 'string'\n    }\n} as const;\n\nexport const DictionaryWithPropertiesAndAdditionalPropertiesSchema = {\n    type: 'object',\n    properties: {\n        foo: {\n            type: 'number'\n        },\n        bar: {\n            type: 'boolean'\n        }\n    },\n    additionalProperties: {\n        type: 'string'\n    }\n} as const;\n\nexport const DictionaryWithReferenceSchema = {\n    description: 'This is a string reference',\n    type: 'object',\n    additionalProperties: {\n        $ref: '#/components/schemas/ModelWithString'\n    }\n} as const;\n\nexport const DictionaryWithArraySchema = {\n    description: 'This is a complex dictionary',\n    type: 'object',\n    additionalProperties: {\n        type: 'array',\n        items: {\n            $ref: '#/components/schemas/ModelWithString'\n        }\n    }\n} as const;\n\nexport const DictionaryWithDictionarySchema = {\n    description: 'This is a string dictionary',\n    type: 'object',\n    additionalProperties: {\n        type: 'object',\n        additionalProperties: {\n            type: 'string'\n        }\n    }\n} as const;\n\nexport const DictionaryWithPropertiesSchema = {\n    description: 'This is a complex dictionary',\n    type: 'object',\n    additionalProperties: {\n        type: 'object',\n        properties: {\n            foo: {\n                type: 'string'\n            },\n            bar: {\n                type: 'string'\n            }\n        }\n    }\n} as const;\n\nexport const ModelWithIntegerSchema = {\n    description: 'This is a model with one number property',\n    type: 'object',\n    properties: {\n        prop: {\n            description: 'This is a simple number property',\n            type: 'integer'\n        }\n    }\n} as const;\n\nexport const ModelWithBooleanSchema = {\n    description: 'This is a model with one boolean property',\n    type: 'object',\n    properties: {\n        prop: {\n            description: 'This is a simple boolean property',\n            type: 'boolean'\n        }\n    }\n} as const;\n\nexport const ModelWithStringSchema = {\n    description: 'This is a model with one string property',\n    type: 'object',\n    properties: {\n        prop: {\n            description: 'This is a simple string property',\n            type: 'string'\n        }\n    }\n} as const;\n\nexport const ModelWithStringErrorSchema = {\n    description: 'This is a model with one string property',\n    type: 'object',\n    properties: {\n        prop: {\n            description: 'This is a simple string property',\n            type: 'string'\n        }\n    }\n} as const;\n\nexport const Model_From_ZendeskSchema = {\n    description: '`Comment` or `VoiceComment`. The JSON object for adding voice comments to tickets is different. See [Adding voice comments to tickets](/documentation/ticketing/managing-tickets/adding-voice-comments-to-tickets)',\n    type: 'string'\n} as const;\n\nexport const ModelWithNullableStringSchema = {\n    description: 'This is a model with one string property',\n    type: 'object',\n    required: [\n        'nullableRequiredProp1',\n        'nullableRequiredProp2'\n    ],\n    properties: {\n        nullableProp1: {\n            description: 'This is a simple string property',\n            type: [\n                'string',\n                'null'\n            ]\n        },\n        nullableRequiredProp1: {\n            description: 'This is a simple string property',\n            type: [\n                'string',\n                'null'\n            ]\n        },\n        nullableProp2: {\n            description: 'This is a simple string property',\n            type: [\n                'string',\n                'null'\n            ]\n        },\n        nullableRequiredProp2: {\n            description: 'This is a simple string property',\n            type: [\n                'string',\n                'null'\n            ]\n        },\n        'foo_bar-enum': {\n            description: 'This is a simple enum with strings',\n            enum: [\n                'Success',\n                'Warning',\n                'Error',\n                'ØÆÅ字符串'\n            ]\n        }\n    }\n} as const;\n\nexport const ModelWithEnumSchema = {\n    description: 'This is a model with one enum',\n    type: 'object',\n    properties: {\n        'foo_bar-enum': {\n            description: 'This is a simple enum with strings',\n            enum: [\n                'Success',\n                'Warning',\n                'Error',\n                'ØÆÅ字符串'\n            ]\n        },\n        statusCode: {\n            description: 'These are the HTTP error code enums',\n            enum: [\n                '100',\n                '200 FOO',\n                '300 FOO_BAR',\n                '400 foo-bar',\n                '500 foo.bar',\n                '600 foo&bar'\n            ]\n        },\n        bool: {\n            description: 'Simple boolean enum',\n            type: 'boolean',\n            enum: [\n                true\n            ]\n        }\n    }\n} as const;\n\nexport const ModelWithEnumWithHyphenSchema = {\n    description: 'This is a model with one enum with escaped name',\n    type: 'object',\n    properties: {\n        'foo-bar-baz-qux': {\n            type: 'string',\n            enum: [\n                '3.0'\n            ],\n            title: 'Foo-Bar-Baz-Qux',\n            default: '3.0'\n        }\n    }\n} as const;\n\nexport const ModelWithEnumFromDescriptionSchema = {\n    description: 'This is a model with one enum',\n    type: 'object',\n    properties: {\n        test: {\n            type: 'integer',\n            description: 'Success=1,Warning=2,Error=3'\n        }\n    }\n} as const;\n\nexport const ModelWithNestedEnumsSchema = {\n    description: 'This is a model with nested enums',\n    type: 'object',\n    properties: {\n        dictionaryWithEnum: {\n            type: 'object',\n            additionalProperties: {\n                enum: [\n                    'Success',\n                    'Warning',\n                    'Error'\n                ]\n            }\n        },\n        dictionaryWithEnumFromDescription: {\n            type: 'object',\n            additionalProperties: {\n                type: 'integer',\n                description: 'Success=1,Warning=2,Error=3'\n            }\n        },\n        arrayWithEnum: {\n            type: 'array',\n            items: {\n                enum: [\n                    'Success',\n                    'Warning',\n                    'Error'\n                ]\n            }\n        },\n        arrayWithDescription: {\n            type: 'array',\n            items: {\n                type: 'integer',\n                description: 'Success=1,Warning=2,Error=3'\n            }\n        },\n        'foo_bar-enum': {\n            description: 'This is a simple enum with strings',\n            enum: [\n                'Success',\n                'Warning',\n                'Error',\n                'ØÆÅ字符串'\n            ]\n        }\n    }\n} as const;\n\nexport const ModelWithReferenceSchema = {\n    description: 'This is a model with one property containing a reference',\n    type: 'object',\n    properties: {\n        prop: {\n            $ref: '#/components/schemas/ModelWithProperties'\n        }\n    }\n} as const;\n\nexport const ModelWithArrayReadOnlyAndWriteOnlySchema = {\n    description: 'This is a model with one property containing an array',\n    type: 'object',\n    properties: {\n        prop: {\n            type: 'array',\n            items: {\n                $ref: '#/components/schemas/ModelWithReadOnlyAndWriteOnly'\n            }\n        },\n        propWithFile: {\n            type: 'array',\n            items: {\n                format: 'binary',\n                type: 'string'\n            }\n        },\n        propWithNumber: {\n            type: 'array',\n            items: {\n                type: 'number'\n            }\n        }\n    }\n} as const;\n\nexport const ModelWithArraySchema = {\n    description: 'This is a model with one property containing an array',\n    type: 'object',\n    properties: {\n        prop: {\n            type: 'array',\n            items: {\n                $ref: '#/components/schemas/ModelWithString'\n            }\n        },\n        propWithFile: {\n            type: 'array',\n            items: {\n                format: 'binary',\n                type: 'string'\n            }\n        },\n        propWithNumber: {\n            type: 'array',\n            items: {\n                type: 'number'\n            }\n        }\n    }\n} as const;\n\nexport const ModelWithDictionarySchema = {\n    description: 'This is a model with one property containing a dictionary',\n    type: 'object',\n    properties: {\n        prop: {\n            type: 'object',\n            additionalProperties: {\n                type: 'string'\n            }\n        }\n    }\n} as const;\n\nexport const DeprecatedModelSchema = {\n    deprecated: true,\n    description: 'This is a deprecated model with a deprecated property',\n    type: 'object',\n    properties: {\n        prop: {\n            deprecated: true,\n            description: 'This is a deprecated property',\n            type: 'string'\n        }\n    }\n} as const;\n\nexport const ModelWithCircularReferenceSchema = {\n    description: 'This is a model with one property containing a circular reference',\n    type: 'object',\n    properties: {\n        prop: {\n            $ref: '#/components/schemas/ModelWithCircularReference'\n        }\n    }\n} as const;\n\nexport const CompositionWithOneOfSchema = {\n    description: 'This is a model with one property with a \\'one of\\' relationship',\n    type: 'object',\n    properties: {\n        propA: {\n            type: 'object',\n            oneOf: [\n                {\n                    $ref: '#/components/schemas/ModelWithString'\n                },\n                {\n                    $ref: '#/components/schemas/ModelWithEnum'\n                },\n                {\n                    $ref: '#/components/schemas/ModelWithArray'\n                },\n                {\n                    $ref: '#/components/schemas/ModelWithDictionary'\n                }\n            ]\n        }\n    }\n} as const;\n\nexport const CompositionWithOneOfAnonymousSchema = {\n    description: 'This is a model with one property with a \\'one of\\' relationship where the options are not $ref',\n    type: 'object',\n    properties: {\n        propA: {\n            type: 'object',\n            oneOf: [\n                {\n                    description: 'Anonymous object type',\n                    type: 'object',\n                    properties: {\n                        propA: {\n                            type: 'string'\n                        }\n                    }\n                },\n                {\n                    description: 'Anonymous string type',\n                    type: 'string'\n                },\n                {\n                    description: 'Anonymous integer type',\n                    type: 'integer'\n                }\n            ]\n        }\n    }\n} as const;\n\nexport const ModelCircleSchema = {\n    description: 'Circle',\n    type: 'object',\n    required: [\n        'kind'\n    ],\n    properties: {\n        kind: {\n            type: 'string'\n        },\n        radius: {\n            type: 'number'\n        }\n    }\n} as const;\n\nexport const ModelSquareSchema = {\n    description: 'Square',\n    type: 'object',\n    required: [\n        'kind'\n    ],\n    properties: {\n        kind: {\n            type: 'string'\n        },\n        sideLength: {\n            type: 'number'\n        }\n    }\n} as const;\n\nexport const CompositionWithOneOfDiscriminatorSchema = {\n    description: 'This is a model with one property with a \\'one of\\' relationship where the options are not $ref',\n    type: 'object',\n    oneOf: [\n        {\n            $ref: '#/components/schemas/ModelCircle'\n        },\n        {\n            $ref: '#/components/schemas/ModelSquare'\n        }\n    ],\n    discriminator: {\n        propertyName: 'kind',\n        mapping: {\n            circle: '#/components/schemas/ModelCircle',\n            square: '#/components/schemas/ModelSquare'\n        }\n    }\n} as const;\n\nexport const CompositionWithAnyOfSchema = {\n    description: 'This is a model with one property with a \\'any of\\' relationship',\n    type: 'object',\n    properties: {\n        propA: {\n            type: 'object',\n            anyOf: [\n                {\n                    $ref: '#/components/schemas/ModelWithString'\n                },\n                {\n                    $ref: '#/components/schemas/ModelWithEnum'\n                },\n                {\n                    $ref: '#/components/schemas/ModelWithArray'\n                },\n                {\n                    $ref: '#/components/schemas/ModelWithDictionary'\n                }\n            ]\n        }\n    }\n} as const;\n\nexport const CompositionWithAnyOfAnonymousSchema = {\n    description: 'This is a model with one property with a \\'any of\\' relationship where the options are not $ref',\n    type: 'object',\n    properties: {\n        propA: {\n            type: 'object',\n            anyOf: [\n                {\n                    description: 'Anonymous object type',\n                    type: 'object',\n                    properties: {\n                        propA: {\n                            type: 'string'\n                        }\n                    }\n                },\n                {\n                    description: 'Anonymous string type',\n                    type: 'string'\n                },\n                {\n                    description: 'Anonymous integer type',\n                    type: 'integer'\n                }\n            ]\n        }\n    }\n} as const;\n\nexport const CompositionWithNestedAnyAndTypeNullSchema = {\n    description: 'This is a model with nested \\'any of\\' property with a type null',\n    type: 'object',\n    properties: {\n        propA: {\n            type: 'object',\n            anyOf: [\n                {\n                    items: {\n                        anyOf: [\n                            {\n                                $ref: '#/components/schemas/ModelWithDictionary'\n                            },\n                            {\n                                type: 'null'\n                            }\n                        ]\n                    },\n                    type: 'array'\n                },\n                {\n                    items: {\n                        anyOf: [\n                            {\n                                $ref: '#/components/schemas/ModelWithArray'\n                            },\n                            {\n                                type: 'null'\n                            }\n                        ]\n                    },\n                    type: 'array'\n                }\n            ]\n        }\n    }\n} as const;\n\nexport const _3e_num_1ПериодSchema = {\n    enum: [\n        'Bird',\n        'Dog'\n    ],\n    type: 'string'\n} as const;\n\nexport const ConstValueSchema = {\n    type: 'string',\n    const: 'ConstValue'\n} as const;\n\nexport const CompositionWithNestedAnyOfAndNullSchema = {\n    description: 'This is a model with one property with a \\'any of\\' relationship where the options are not $ref',\n    type: 'object',\n    properties: {\n        propA: {\n            anyOf: [\n                {\n                    items: {\n                        anyOf: [\n                            {\n                                $ref: '#/components/schemas/3e-num_1Период'\n                            },\n                            {\n                                $ref: '#/components/schemas/ConstValue'\n                            }\n                        ]\n                    },\n                    type: 'array'\n                },\n                {\n                    type: 'null'\n                }\n            ],\n            title: 'Scopes'\n        }\n    }\n} as const;\n\nexport const CompositionWithOneOfAndNullableSchema = {\n    description: 'This is a model with one property with a \\'one of\\' relationship',\n    type: 'object',\n    properties: {\n        propA: {\n            type: [\n                'object',\n                'null'\n            ],\n            oneOf: [\n                {\n                    type: 'object',\n                    properties: {\n                        boolean: {\n                            type: 'boolean'\n                        }\n                    }\n                },\n                {\n                    $ref: '#/components/schemas/ModelWithEnum'\n                },\n                {\n                    $ref: '#/components/schemas/ModelWithArray'\n                },\n                {\n                    $ref: '#/components/schemas/ModelWithDictionary'\n                }\n            ]\n        }\n    }\n} as const;\n\nexport const CompositionWithOneOfAndSimpleDictionarySchema = {\n    description: 'This is a model that contains a simple dictionary within composition',\n    type: 'object',\n    properties: {\n        propA: {\n            oneOf: [\n                {\n                    type: 'boolean'\n                },\n                {\n                    type: 'object',\n                    additionalProperties: {\n                        type: 'number'\n                    }\n                }\n            ]\n        }\n    }\n} as const;\n\nexport const CompositionWithOneOfAndSimpleArrayDictionarySchema = {\n    description: 'This is a model that contains a dictionary of simple arrays within composition',\n    type: 'object',\n    properties: {\n        propA: {\n            oneOf: [\n                {\n                    type: 'boolean'\n                },\n                {\n                    type: 'object',\n                    additionalProperties: {\n                        type: 'array',\n                        items: {\n                            type: 'boolean'\n                        }\n                    }\n                }\n            ]\n        }\n    }\n} as const;\n\nexport const CompositionWithOneOfAndComplexArrayDictionarySchema = {\n    description: 'This is a model that contains a dictionary of complex arrays (composited) within composition',\n    type: 'object',\n    properties: {\n        propA: {\n            oneOf: [\n                {\n                    type: 'boolean'\n                },\n                {\n                    type: 'object',\n                    additionalProperties: {\n                        type: 'array',\n                        items: {\n                            oneOf: [\n                                {\n                                    type: 'number'\n                                },\n                                {\n                                    type: 'string'\n                                }\n                            ]\n                        }\n                    }\n                }\n            ]\n        }\n    }\n} as const;\n\nexport const CompositionWithAllOfAndNullableSchema = {\n    description: 'This is a model with one property with a \\'all of\\' relationship',\n    type: 'object',\n    properties: {\n        propA: {\n            type: [\n                'object',\n                'null'\n            ],\n            allOf: [\n                {\n                    type: 'object',\n                    properties: {\n                        boolean: {\n                            type: 'boolean'\n                        }\n                    }\n                },\n                {\n                    $ref: '#/components/schemas/ModelWithEnum'\n                },\n                {\n                    $ref: '#/components/schemas/ModelWithArray'\n                },\n                {\n                    $ref: '#/components/schemas/ModelWithDictionary'\n                }\n            ]\n        }\n    }\n} as const;\n\nexport const CompositionWithAnyOfAndNullableSchema = {\n    description: 'This is a model with one property with a \\'any of\\' relationship',\n    type: 'object',\n    properties: {\n        propA: {\n            type: [\n                'object',\n                'null'\n            ],\n            anyOf: [\n                {\n                    type: 'object',\n                    properties: {\n                        boolean: {\n                            type: 'boolean'\n                        }\n                    }\n                },\n                {\n                    $ref: '#/components/schemas/ModelWithEnum'\n                },\n                {\n                    $ref: '#/components/schemas/ModelWithArray'\n                },\n                {\n                    $ref: '#/components/schemas/ModelWithDictionary'\n                }\n            ]\n        }\n    }\n} as const;\n\nexport const CompositionBaseModelSchema = {\n    description: 'This is a base model with two simple optional properties',\n    type: 'object',\n    properties: {\n        firstName: {\n            type: 'string'\n        },\n        lastname: {\n            type: 'string'\n        }\n    }\n} as const;\n\nexport const CompositionExtendedModelSchema = {\n    description: 'This is a model that extends the base model',\n    type: 'object',\n    allOf: [\n        {\n            $ref: '#/components/schemas/CompositionBaseModel'\n        }\n    ],\n    properties: {\n        age: {\n            type: 'number'\n        }\n    },\n    required: [\n        'firstName',\n        'lastname',\n        'age'\n    ]\n} as const;\n\nexport const ModelWithPropertiesSchema = {\n    description: 'This is a model with one nested property',\n    type: 'object',\n    required: [\n        'required',\n        'requiredAndReadOnly',\n        'requiredAndNullable'\n    ],\n    properties: {\n        required: {\n            type: 'string'\n        },\n        requiredAndReadOnly: {\n            type: 'string',\n            readOnly: true\n        },\n        requiredAndNullable: {\n            type: [\n                'string',\n                'null'\n            ]\n        },\n        string: {\n            type: 'string'\n        },\n        number: {\n            type: 'number'\n        },\n        boolean: {\n            type: 'boolean'\n        },\n        reference: {\n            $ref: '#/components/schemas/ModelWithString'\n        },\n        'property with space': {\n            type: 'string'\n        },\n        default: {\n            type: 'string'\n        },\n        try: {\n            type: 'string'\n        },\n        '@namespace.string': {\n            type: 'string',\n            readOnly: true\n        },\n        '@namespace.integer': {\n            type: 'integer',\n            readOnly: true\n        }\n    }\n} as const;\n\nexport const ModelWithNestedPropertiesSchema = {\n    description: 'This is a model with one nested property',\n    type: 'object',\n    required: [\n        'first'\n    ],\n    properties: {\n        first: {\n            type: [\n                'object',\n                'null'\n            ],\n            required: [\n                'second'\n            ],\n            readOnly: true,\n            properties: {\n                second: {\n                    type: [\n                        'object',\n                        'null'\n                    ],\n                    required: [\n                        'third'\n                    ],\n                    readOnly: true,\n                    properties: {\n                        third: {\n                            type: [\n                                'string',\n                                'null'\n                            ],\n                            required: true,\n                            readOnly: true\n                        }\n                    }\n                }\n            }\n        }\n    }\n} as const;\n\nexport const ModelWithDuplicatePropertiesSchema = {\n    description: 'This is a model with duplicated properties',\n    type: 'object',\n    properties: {\n        prop: {\n            $ref: '#/components/schemas/ModelWithString'\n        }\n    }\n} as const;\n\nexport const ModelWithOrderedPropertiesSchema = {\n    description: 'This is a model with ordered properties',\n    type: 'object',\n    properties: {\n        zebra: {\n            type: 'string'\n        },\n        apple: {\n            type: 'string'\n        },\n        hawaii: {\n            type: 'string'\n        }\n    }\n} as const;\n\nexport const ModelWithDuplicateImportsSchema = {\n    description: 'This is a model with duplicated imports',\n    type: 'object',\n    properties: {\n        propA: {\n            $ref: '#/components/schemas/ModelWithString'\n        },\n        propB: {\n            $ref: '#/components/schemas/ModelWithString'\n        },\n        propC: {\n            $ref: '#/components/schemas/ModelWithString'\n        }\n    }\n} as const;\n\nexport const ModelThatExtendsSchema = {\n    description: 'This is a model that extends another model',\n    type: 'object',\n    allOf: [\n        {\n            $ref: '#/components/schemas/ModelWithString'\n        },\n        {\n            type: 'object',\n            properties: {\n                propExtendsA: {\n                    type: 'string'\n                },\n                propExtendsB: {\n                    $ref: '#/components/schemas/ModelWithString'\n                }\n            }\n        }\n    ]\n} as const;\n\nexport const ModelThatExtendsExtendsSchema = {\n    description: 'This is a model that extends another model',\n    type: 'object',\n    allOf: [\n        {\n            $ref: '#/components/schemas/ModelWithString'\n        },\n        {\n            $ref: '#/components/schemas/ModelThatExtends'\n        },\n        {\n            type: 'object',\n            properties: {\n                propExtendsC: {\n                    type: 'string'\n                },\n                propExtendsD: {\n                    $ref: '#/components/schemas/ModelWithString'\n                }\n            }\n        }\n    ]\n} as const;\n\nexport const ModelWithPatternSchema = {\n    description: 'This is a model that contains a some patterns',\n    type: 'object',\n    required: [\n        'key',\n        'name'\n    ],\n    properties: {\n        key: {\n            maxLength: 64,\n            pattern: '^[a-zA-Z0-9_]*$',\n            type: 'string'\n        },\n        name: {\n            maxLength: 255,\n            type: 'string'\n        },\n        enabled: {\n            type: 'boolean',\n            readOnly: true\n        },\n        modified: {\n            type: 'string',\n            format: 'date-time',\n            readOnly: true\n        },\n        id: {\n            type: 'string',\n            pattern: '^\\\\d{2}-\\\\d{3}-\\\\d{4}$'\n        },\n        text: {\n            type: 'string',\n            pattern: '^\\\\w+$'\n        },\n        patternWithSingleQuotes: {\n            type: 'string',\n            pattern: '^[a-zA-Z0-9\\']*$'\n        },\n        patternWithNewline: {\n            type: 'string',\n            pattern: 'aaa\\\\nbbb'\n        },\n        patternWithBacktick: {\n            type: 'string',\n            pattern: 'aaa`bbb'\n        },\n        patternWithUnicode: {\n            type: 'string',\n            pattern: '^\\\\p{L}+$'\n        }\n    }\n} as const;\n\nexport const FileSchema = {\n    required: [\n        'mime'\n    ],\n    type: 'object',\n    properties: {\n        id: {\n            title: 'Id',\n            type: 'string',\n            readOnly: true,\n            minLength: 1\n        },\n        updated_at: {\n            title: 'Updated at',\n            type: 'string',\n            format: 'date-time',\n            readOnly: true\n        },\n        created_at: {\n            title: 'Created at',\n            type: 'string',\n            format: 'date-time',\n            readOnly: true\n        },\n        mime: {\n            title: 'Mime',\n            type: 'string',\n            maxLength: 24,\n            minLength: 1\n        },\n        file: {\n            title: 'File',\n            type: 'string',\n            readOnly: true,\n            format: 'uri'\n        }\n    }\n} as const;\n\nexport const defaultSchema = {\n    type: 'object',\n    properties: {\n        name: {\n            type: 'string'\n        }\n    }\n} as const;\n\nexport const PageableSchema = {\n    type: 'object',\n    properties: {\n        page: {\n            minimum: 0,\n            type: 'integer',\n            format: 'int32',\n            default: 0\n        },\n        size: {\n            minimum: 1,\n            type: 'integer',\n            format: 'int32'\n        },\n        sort: {\n            type: 'array',\n            items: {\n                type: 'string'\n            }\n        }\n    }\n} as const;\n\nexport const FreeFormObjectWithoutAdditionalPropertiesSchema = {\n    description: 'This is a free-form object without additionalProperties.',\n    type: 'object'\n} as const;\n\nexport const FreeFormObjectWithAdditionalPropertiesEqTrueSchema = {\n    description: 'This is a free-form object with additionalProperties: true.',\n    type: 'object',\n    additionalProperties: true\n} as const;\n\nexport const FreeFormObjectWithAdditionalPropertiesEqEmptyObjectSchema = {\n    description: 'This is a free-form object with additionalProperties: {}.',\n    type: 'object',\n    additionalProperties: {}\n} as const;\n\nexport const ModelWithConstSchema = {\n    type: 'object',\n    properties: {\n        String: {\n            const: 'String'\n        },\n        number: {\n            const: 0\n        },\n        null: {\n            const: null\n        },\n        withType: {\n            type: 'string',\n            const: 'Some string'\n        }\n    }\n} as const;\n\nexport const ModelWithAdditionalPropertiesEqTrueSchema = {\n    description: 'This is a model with one property and additionalProperties: true',\n    type: 'object',\n    properties: {\n        prop: {\n            description: 'This is a simple string property',\n            type: 'string'\n        }\n    },\n    additionalProperties: true\n} as const;\n\nexport const NestedAnyOfArraysNullableSchema = {\n    properties: {\n        nullableArray: {\n            anyOf: [\n                {\n                    items: {\n                        anyOf: [\n                            {\n                                type: 'string'\n                            },\n                            {\n                                type: 'boolean'\n                            }\n                        ]\n                    },\n                    type: 'array'\n                },\n                {\n                    type: 'null'\n                }\n            ]\n        }\n    },\n    type: 'object'\n} as const;\n\nexport const CompositionWithOneOfAndPropertiesSchema = {\n    type: 'object',\n    oneOf: [\n        {\n            type: 'object',\n            required: [\n                'foo'\n            ],\n            properties: {\n                foo: {\n                    $ref: '#/components/parameters/SimpleParameter'\n                }\n            },\n            additionalProperties: false\n        },\n        {\n            type: 'object',\n            required: [\n                'bar'\n            ],\n            properties: {\n                bar: {\n                    $ref: '#/components/schemas/NonAsciiStringæøåÆØÅöôêÊ字符串'\n                }\n            },\n            additionalProperties: false\n        }\n    ],\n    required: [\n        'baz',\n        'qux'\n    ],\n    properties: {\n        baz: {\n            type: [\n                'integer',\n                'null'\n            ],\n            format: 'uint16',\n            minimum: 0\n        },\n        qux: {\n            type: 'integer',\n            format: 'uint8',\n            minimum: 0\n        }\n    }\n} as const;\n\nexport const NullableObjectSchema = {\n    type: [\n        'object',\n        'null'\n    ],\n    description: 'An object that can be null',\n    properties: {\n        foo: {\n            type: 'string'\n        }\n    },\n    default: null\n} as const;\n\nexport const CharactersInDescriptionSchema = {\n    type: 'string',\n    description: 'Some % character'\n} as const;\n\nexport const ModelWithNullableObjectSchema = {\n    type: 'object',\n    properties: {\n        data: {\n            $ref: '#/components/schemas/NullableObject'\n        }\n    }\n} as const;\n\nexport const ModelWithAdditionalPropertiesRefSchema = {\n    type: 'object',\n    description: 'An object with additional properties that can be null (anyOf ref + null)',\n    additionalProperties: {\n        anyOf: [\n            {\n                $ref: '#/components/schemas/NullableObject'\n            },\n            {\n                type: 'null'\n            }\n        ]\n    }\n} as const;\n\nexport const ModelWithOneOfEnumSchema = {\n    oneOf: [\n        {\n            type: 'object',\n            required: [\n                'foo'\n            ],\n            properties: {\n                foo: {\n                    type: 'string',\n                    enum: [\n                        'Bar'\n                    ]\n                }\n            }\n        },\n        {\n            type: 'object',\n            required: [\n                'foo'\n            ],\n            properties: {\n                foo: {\n                    type: 'string',\n                    enum: [\n                        'Baz'\n                    ]\n                }\n            }\n        },\n        {\n            type: 'object',\n            required: [\n                'foo'\n            ],\n            properties: {\n                foo: {\n                    type: 'string',\n                    enum: [\n                        'Qux'\n                    ]\n                }\n            }\n        },\n        {\n            type: 'object',\n            required: [\n                'content',\n                'foo'\n            ],\n            properties: {\n                content: {\n                    type: 'string',\n                    format: 'date-time'\n                },\n                foo: {\n                    type: 'string',\n                    enum: [\n                        'Quux'\n                    ]\n                }\n            }\n        },\n        {\n            type: 'object',\n            required: [\n                'content',\n                'foo'\n            ],\n            properties: {\n                content: {\n                    type: 'array',\n                    prefixItems: [\n                        {\n                            type: 'string',\n                            format: 'date-time'\n                        },\n                        {\n                            type: 'string'\n                        }\n                    ],\n                    maxItems: 2,\n                    minItems: 2\n                },\n                foo: {\n                    type: 'string',\n                    enum: [\n                        'Corge'\n                    ]\n                }\n            }\n        }\n    ]\n} as const;\n\nexport const ModelWithNestedArrayEnumsDataFooSchema = {\n    enum: [\n        'foo',\n        'bar'\n    ],\n    type: 'string'\n} as const;\n\nexport const ModelWithNestedArrayEnumsDataBarSchema = {\n    enum: [\n        'baz',\n        'qux'\n    ],\n    type: 'string'\n} as const;\n\nexport const ModelWithNestedArrayEnumsDataSchema = {\n    type: 'object',\n    properties: {\n        foo: {\n            type: 'array',\n            items: {\n                $ref: '#/components/schemas/ModelWithNestedArrayEnumsDataFoo'\n            }\n        },\n        bar: {\n            type: 'array',\n            items: {\n                $ref: '#/components/schemas/ModelWithNestedArrayEnumsDataBar'\n            }\n        }\n    }\n} as const;\n\nexport const ModelWithNestedArrayEnumsSchema = {\n    type: 'object',\n    properties: {\n        array_strings: {\n            type: 'array',\n            items: {\n                type: 'string'\n            }\n        },\n        data: {\n            allOf: [\n                {\n                    $ref: '#/components/schemas/ModelWithNestedArrayEnumsData'\n                }\n            ]\n        }\n    }\n} as const;\n\nexport const ModelWithNestedCompositionEnumsSchema = {\n    type: 'object',\n    properties: {\n        foo: {\n            allOf: [\n                {\n                    $ref: '#/components/schemas/ModelWithNestedArrayEnumsDataFoo'\n                }\n            ]\n        }\n    }\n} as const;\n\nexport const ModelWithReadOnlyAndWriteOnlySchema = {\n    type: 'object',\n    required: [\n        'foo',\n        'bar'\n    ],\n    properties: {\n        foo: {\n            type: 'string'\n        },\n        bar: {\n            readOnly: true,\n            type: 'string'\n        }\n    }\n} as const;\n\nexport const ModelWithConstantSizeArraySchema = {\n    type: 'array',\n    items: {\n        type: 'number'\n    },\n    minItems: 2,\n    maxItems: 2\n} as const;\n\nexport const ModelWithAnyOfConstantSizeArraySchema = {\n    type: 'array',\n    items: {\n        oneOf: [\n            {\n                type: 'number'\n            },\n            {\n                type: 'string'\n            }\n        ]\n    },\n    minItems: 3,\n    maxItems: 3\n} as const;\n\nexport const ModelWithPrefixItemsConstantSizeArraySchema = {\n    type: 'array',\n    prefixItems: [\n        {\n            $ref: '#/components/schemas/ModelWithInteger'\n        },\n        {\n            oneOf: [\n                {\n                    type: 'number'\n                },\n                {\n                    type: 'string'\n                }\n            ]\n        },\n        {\n            type: 'string'\n        }\n    ]\n} as const;\n\nexport const ModelWithAnyOfConstantSizeArrayNullableSchema = {\n    type: [\n        'array'\n    ],\n    items: {\n        oneOf: [\n            {\n                type: [\n                    'number',\n                    'null'\n                ]\n            },\n            {\n                type: 'string'\n            }\n        ]\n    },\n    minItems: 3,\n    maxItems: 3\n} as const;\n\nexport const ModelWithAnyOfConstantSizeArrayWithNSizeAndOptionsSchema = {\n    type: 'array',\n    items: {\n        oneOf: [\n            {\n                type: 'number'\n            },\n            {\n                $ref: '#/components/schemas/import'\n            }\n        ]\n    },\n    minItems: 2,\n    maxItems: 2\n} as const;\n\nexport const ModelWithAnyOfConstantSizeArrayAndIntersectSchema = {\n    type: 'array',\n    items: {\n        allOf: [\n            {\n                type: 'number'\n            },\n            {\n                type: 'string'\n            }\n        ]\n    },\n    minItems: 2,\n    maxItems: 2\n} as const;\n\nexport const ModelWithNumericEnumUnionSchema = {\n    type: 'object',\n    properties: {\n        value: {\n            type: 'number',\n            description: 'Период',\n            enum: [\n                -10,\n                -1,\n                0,\n                1,\n                3,\n                6,\n                12\n            ]\n        }\n    }\n} as const;\n\nexport const ModelWithBackticksInDescriptionSchema = {\n    description: 'Some description with `back ticks`',\n    type: 'object',\n    properties: {\n        template: {\n            type: 'string',\n            description: 'The template `that` should be used for parsing and importing the contents of the CSV file.\\n\\n<br/><p>There is one placeholder currently supported:<ul>     <li><b>${x}</b> - refers to the n-th column in the CSV file, e.g. ${1}, ${2}, ...)</li></ul><p>Example of a correct JSON template:</p>\\n<pre>\\n[\\n  {\\n    \"resourceType\": \"Asset\",\\n    \"identifier\": {\\n      \"name\": \"${1}\",\\n      \"domain\": {\\n        \"name\": \"${2}\",\\n        \"community\": {\\n          \"name\": \"Some Community\"\\n        }\\n      }\\n    },\\n    \"attributes\" : {\\n      \"00000000-0000-0000-0000-000000003115\" : [ {\\n        \"value\" : \"${3}\"\\n      } ],\\n      \"00000000-0000-0000-0000-000000000222\" : [ {\\n        \"value\" : \"${4}\"\\n      } ]\\n    }\\n  }\\n]\\n</pre>'\n        }\n    }\n} as const;\n\nexport const ModelWithOneOfAndPropertiesSchema = {\n    type: 'object',\n    oneOf: [\n        {\n            $ref: '#/components/parameters/SimpleParameter'\n        },\n        {\n            $ref: '#/components/schemas/NonAsciiStringæøåÆØÅöôêÊ字符串'\n        }\n    ],\n    required: [\n        'baz',\n        'qux'\n    ],\n    properties: {\n        baz: {\n            type: [\n                'integer',\n                'null'\n            ],\n            format: 'uint16',\n            minimum: 0\n        },\n        qux: {\n            type: 'integer',\n            format: 'uint8',\n            minimum: 0\n        }\n    }\n} as const;\n\nexport const ParameterSimpleParameterUnusedSchema = {\n    description: 'Model used to test deduplication strategy (unused)',\n    type: 'string'\n} as const;\n\nexport const PostServiceWithEmptyTagResponseSchema = {\n    description: 'Model used to test deduplication strategy',\n    type: 'string'\n} as const;\n\nexport const PostServiceWithEmptyTagResponse2Schema = {\n    description: 'Model used to test deduplication strategy',\n    type: 'string'\n} as const;\n\nexport const DeleteFooDataSchema = {\n    description: 'Model used to test deduplication strategy',\n    type: 'string'\n} as const;\n\nexport const DeleteFooData2Schema = {\n    description: 'Model used to test deduplication strategy',\n    type: 'string'\n} as const;\n\nexport const importSchema = {\n    description: 'Model with restricted keyword name',\n    type: 'string'\n} as const;\n\nexport const SchemaWithFormRestrictedKeysSchema = {\n    type: 'object',\n    properties: {\n        description: {\n            type: 'string'\n        },\n        'x-enum-descriptions': {\n            type: 'string'\n        },\n        'x-enum-varnames': {\n            type: 'string'\n        },\n        'x-enumNames': {\n            type: 'string'\n        },\n        title: {\n            type: 'string'\n        },\n        object: {\n            type: 'object',\n            properties: {\n                description: {\n                    type: 'string'\n                },\n                'x-enum-descriptions': {\n                    type: 'string'\n                },\n                'x-enum-varnames': {\n                    type: 'string'\n                },\n                'x-enumNames': {\n                    type: 'string'\n                },\n                title: {\n                    type: 'string'\n                }\n            }\n        },\n        array: {\n            type: 'array',\n            items: {\n                type: 'object',\n                properties: {\n                    description: {\n                        type: 'string'\n                    },\n                    'x-enum-descriptions': {\n                        type: 'string'\n                    },\n                    'x-enum-varnames': {\n                        type: 'string'\n                    },\n                    'x-enumNames': {\n                        type: 'string'\n                    },\n                    title: {\n                        type: 'string'\n                    }\n                }\n            }\n        }\n    }\n} as const;\n\nexport const io_k8s_apimachinery_pkg_apis_meta_v1_DeleteOptionsSchema = {\n    description: 'This schema was giving PascalCase transformations a hard time',\n    properties: {\n        preconditions: {\n            allOf: [\n                {\n                    $ref: '#/components/schemas/io.k8s.apimachinery.pkg.apis.meta.v1.Preconditions'\n                }\n            ],\n            description: 'Must be fulfilled before a deletion is carried out. If not possible, a 409 Conflict status will be returned.'\n        }\n    },\n    type: 'object'\n} as const;\n\nexport const io_k8s_apimachinery_pkg_apis_meta_v1_PreconditionsSchema = {\n    description: 'This schema was giving PascalCase transformations a hard time',\n    properties: {\n        resourceVersion: {\n            description: 'Specifies the target ResourceVersion',\n            type: 'string'\n        },\n        uid: {\n            description: 'Specifies the target UID.',\n            type: 'string'\n        }\n    },\n    type: 'object'\n} as const;\n\nexport const AdditionalPropertiesUnknownIssueSchema = {\n    type: 'object',\n    additionalProperties: {\n        anyOf: [\n            {\n                type: 'string'\n            },\n            {\n                type: 'number'\n            }\n        ]\n    }\n} as const;\n\nexport const AdditionalPropertiesUnknownIssue2Schema = {\n    type: 'object',\n    additionalProperties: {\n        anyOf: [\n            {\n                type: 'string'\n            },\n            {\n                type: 'number'\n            }\n        ]\n    }\n} as const;\n\nexport const AdditionalPropertiesUnknownIssue3Schema = {\n    type: 'object',\n    allOf: [\n        {\n            type: 'string'\n        },\n        {\n            type: 'object',\n            required: [\n                'entries'\n            ],\n            properties: {\n                entries: {\n                    type: 'object',\n                    additionalProperties: {\n                        $ref: '#/components/schemas/AdditionalPropertiesUnknownIssue'\n                    }\n                }\n            }\n        }\n    ]\n} as const;\n\nexport const AdditionalPropertiesIntegerIssueSchema = {\n    type: 'object',\n    required: [\n        'value'\n    ],\n    properties: {\n        value: {\n            type: 'integer'\n        }\n    },\n    additionalProperties: {\n        type: 'integer'\n    }\n} as const;\n\nexport const OneOfAllOfIssueSchema = {\n    oneOf: [\n        {\n            allOf: [\n                {\n                    oneOf: [\n                        {\n                            $ref: '#/components/schemas/ConstValue'\n                        },\n                        {\n                            $ref: '#/components/schemas/Generic.Schema.Duplicate.Issue`1[System.Boolean]'\n                        }\n                    ]\n                },\n                {\n                    $ref: '#/components/schemas/3e-num_1Период'\n                }\n            ]\n        },\n        {\n            $ref: '#/components/schemas/Generic.Schema.Duplicate.Issue`1[System.String]'\n        }\n    ]\n} as const;\n\nexport const Generic_Schema_Duplicate_Issue_1_System_Boolean_Schema = {\n    type: 'object',\n    properties: {\n        item: {\n            type: 'boolean'\n        },\n        error: {\n            type: [\n                'string',\n                'null'\n            ]\n        },\n        hasError: {\n            type: 'boolean',\n            readOnly: true\n        },\n        data: {\n            type: 'object',\n            additionalProperties: false\n        }\n    },\n    additionalProperties: false\n} as const;\n\nexport const Generic_Schema_Duplicate_Issue_1_System_String_Schema = {\n    type: 'object',\n    properties: {\n        item: {\n            type: [\n                'string',\n                'null'\n            ]\n        },\n        error: {\n            type: [\n                'string',\n                'null'\n            ]\n        },\n        hasError: {\n            type: 'boolean',\n            readOnly: true\n        }\n    },\n    additionalProperties: false\n} as const;\n\nexport const ExternalSharedModelSchema = {\n    type: 'object',\n    properties: {\n        id: {\n            type: 'string'\n        },\n        name: {\n            type: 'string'\n        }\n    },\n    required: [\n        'id'\n    ]\n} as const;\n\nexport const ModelWithReferenceWritableSchema = {\n    description: 'This is a model with one property containing a reference',\n    type: 'object',\n    properties: {\n        prop: {\n            $ref: '#/components/schemas/ModelWithPropertiesWritable'\n        }\n    }\n} as const;\n\nexport const ModelWithArrayReadOnlyAndWriteOnlyWritableSchema = {\n    description: 'This is a model with one property containing an array',\n    type: 'object',\n    properties: {\n        prop: {\n            type: 'array',\n            items: {\n                $ref: '#/components/schemas/ModelWithReadOnlyAndWriteOnlyWritable'\n            }\n        },\n        propWithFile: {\n            type: 'array',\n            items: {\n                format: 'binary',\n                type: 'string'\n            }\n        },\n        propWithNumber: {\n            type: 'array',\n            items: {\n                type: 'number'\n            }\n        }\n    }\n} as const;\n\nexport const ModelWithPropertiesWritableSchema = {\n    description: 'This is a model with one nested property',\n    type: 'object',\n    required: [\n        'required',\n        'requiredAndNullable'\n    ],\n    properties: {\n        required: {\n            type: 'string'\n        },\n        requiredAndNullable: {\n            type: [\n                'string',\n                'null'\n            ]\n        },\n        string: {\n            type: 'string'\n        },\n        number: {\n            type: 'number'\n        },\n        boolean: {\n            type: 'boolean'\n        },\n        reference: {\n            $ref: '#/components/schemas/ModelWithString'\n        },\n        'property with space': {\n            type: 'string'\n        },\n        default: {\n            type: 'string'\n        },\n        try: {\n            type: 'string'\n        }\n    }\n} as const;\n\nexport const ModelWithPatternWritableSchema = {\n    description: 'This is a model that contains a some patterns',\n    type: 'object',\n    required: [\n        'key',\n        'name'\n    ],\n    properties: {\n        key: {\n            maxLength: 64,\n            pattern: '^[a-zA-Z0-9_]*$',\n            type: 'string'\n        },\n        name: {\n            maxLength: 255,\n            type: 'string'\n        },\n        id: {\n            type: 'string',\n            pattern: '^\\\\d{2}-\\\\d{3}-\\\\d{4}$'\n        },\n        text: {\n            type: 'string',\n            pattern: '^\\\\w+$'\n        },\n        patternWithSingleQuotes: {\n            type: 'string',\n            pattern: '^[a-zA-Z0-9\\']*$'\n        },\n        patternWithNewline: {\n            type: 'string',\n            pattern: 'aaa\\\\nbbb'\n        },\n        patternWithBacktick: {\n            type: 'string',\n            pattern: 'aaa`bbb'\n        },\n        patternWithUnicode: {\n            type: 'string',\n            pattern: '^\\\\p{L}+$'\n        }\n    }\n} as const;\n\nexport const FileWritableSchema = {\n    required: [\n        'mime'\n    ],\n    type: 'object',\n    properties: {\n        mime: {\n            title: 'Mime',\n            type: 'string',\n            maxLength: 24,\n            minLength: 1\n        }\n    }\n} as const;\n\nexport const ModelWithReadOnlyAndWriteOnlyWritableSchema = {\n    type: 'object',\n    required: [\n        'foo',\n        'baz'\n    ],\n    properties: {\n        foo: {\n            type: 'string'\n        },\n        baz: {\n            type: 'string',\n            writeOnly: true\n        }\n    }\n} as const;\n\nexport const ModelWithAnyOfConstantSizeArrayWithNSizeAndOptionsWritableSchema = {\n    type: 'array',\n    items: {\n        oneOf: [\n            {\n                type: 'number'\n            },\n            {\n                $ref: '#/components/schemas/import'\n            }\n        ]\n    },\n    minItems: 2,\n    maxItems: 2\n} as const;\n\nexport const AdditionalPropertiesUnknownIssueWritableSchema = {\n    type: 'object',\n    additionalProperties: {\n        anyOf: [\n            {\n                type: 'string'\n            },\n            {\n                type: 'number'\n            }\n        ]\n    }\n} as const;\n\nexport const OneOfAllOfIssueWritableSchema = {\n    oneOf: [\n        {\n            allOf: [\n                {\n                    oneOf: [\n                        {\n                            $ref: '#/components/schemas/ConstValue'\n                        },\n                        {\n                            $ref: '#/components/schemas/Generic.Schema.Duplicate.Issue`1[System.Boolean]'\n                        }\n                    ]\n                },\n                {\n                    $ref: '#/components/schemas/3e-num_1Период'\n                }\n            ]\n        },\n        {\n            $ref: '#/components/schemas/Generic.Schema.Duplicate.Issue`1[System.String]'\n        }\n    ]\n} as const;\n\nexport const Generic_Schema_Duplicate_Issue_1_System_Boolean_WritableSchema = {\n    type: 'object',\n    properties: {\n        item: {\n            type: 'boolean'\n        },\n        error: {\n            type: [\n                'string',\n                'null'\n            ]\n        },\n        data: {\n            type: 'object',\n            additionalProperties: false\n        }\n    },\n    additionalProperties: false\n} as const;\n\nexport const Generic_Schema_Duplicate_Issue_1_System_String_WritableSchema = {\n    type: 'object',\n    properties: {\n        item: {\n            type: [\n                'string',\n                'null'\n            ]\n        },\n        error: {\n            type: [\n                'string',\n                'null'\n            ]\n        }\n    },\n    additionalProperties: false\n} as const;\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@hey-api/sdk/default/client/client.gen.ts",
    "content": "// 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 (options: RequestOptions) => {\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 url = buildUrl(opts);\n\n    return { opts, url };\n  };\n\n  const request: Client['request'] = async (options) => {\n    // @ts-expect-error\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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@hey-api/sdk/default/client/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type { Auth } from '../core/auth.gen';\nexport type { QuerySerializerOptions } from '../core/bodySerializer.gen';\nexport {\n  formDataBodySerializer,\n  jsonBodySerializer,\n  urlSearchParamsBodySerializer,\n} from '../core/bodySerializer.gen';\nexport { buildClientParams } from '../core/params.gen';\nexport { serializeQueryKeyValue } from '../core/queryKeySerializer.gen';\nexport { createClient } from './client.gen';\nexport type {\n  Client,\n  ClientOptions,\n  Config,\n  CreateClientConfig,\n  Options,\n  RequestOptions,\n  RequestResult,\n  ResolvedRequestOptions,\n  ResponseStyle,\n  TDataShape,\n} from './types.gen';\nexport { createConfig, mergeHeaders } from './utils.gen';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@hey-api/sdk/default/client/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { Auth } from '../core/auth.gen';\nimport type {\n  ServerSentEventsOptions,\n  ServerSentEventsResult,\n} from '../core/serverSentEvents.gen';\nimport type { Client as CoreClient, Config as CoreConfig } from '../core/types.gen';\nimport type { Middleware } from './utils.gen';\n\nexport type ResponseStyle = 'data' | 'fields';\n\nexport interface Config<T extends ClientOptions = ClientOptions>\n  extends Omit<RequestInit, 'body' | 'headers' | 'method'>, CoreConfig {\n  /**\n   * Base URL for all requests made by this client.\n   */\n  baseUrl?: T['baseUrl'];\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   * Please don't use the Fetch client for Next.js applications. The `next`\n   * options won't have any effect.\n   *\n   * Install {@link https://www.npmjs.com/package/@hey-api/client-next `@hey-api/client-next`} instead.\n   */\n  next?: never;\n  /**\n   * Return the response data parsed in a specified format. By default, `auto`\n   * will infer the appropriate method from the `Content-Type` response header.\n   * You can override this behavior with any of the {@link Body} methods.\n   * Select `stream` if you don't want to parse response data at all.\n   *\n   * @default 'auto'\n   */\n  parseAs?: 'arrayBuffer' | 'auto' | 'blob' | 'formData' | 'json' | 'stream' | 'text';\n  /**\n   * Should we return only data or multiple fields (data, error, response, etc.)?\n   *\n   * @default 'fields'\n   */\n  responseStyle?: ResponseStyle;\n  /**\n   * Throw an error instead of returning it in the response?\n   *\n   * @default false\n   */\n  throwOnError?: T['throwOnError'];\n}\n\nexport interface RequestOptions<\n  TData = unknown,\n  TResponseStyle extends ResponseStyle = 'fields',\n  ThrowOnError extends boolean = boolean,\n  Url extends string = string,\n>\n  extends\n    Config<{\n      responseStyle: TResponseStyle;\n      throwOnError: ThrowOnError;\n    }>,\n    Pick<\n      ServerSentEventsOptions<TData>,\n      | 'onRequest'\n      | 'onSseError'\n      | 'onSseEvent'\n      | 'sseDefaultRetryDelay'\n      | 'sseMaxRetryAttempts'\n      | 'sseMaxRetryDelay'\n    > {\n  /**\n   * Any body that you want to add to your request.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/fetch#body}\n   */\n  body?: unknown;\n  path?: Record<string, unknown>;\n  query?: Record<string, unknown>;\n  /**\n   * Security mechanism(s) to use for the request.\n   */\n  security?: ReadonlyArray<Auth>;\n  url: Url;\n}\n\nexport interface ResolvedRequestOptions<\n  TResponseStyle extends ResponseStyle = 'fields',\n  ThrowOnError extends boolean = boolean,\n  Url extends string = string,\n> extends RequestOptions<unknown, TResponseStyle, ThrowOnError, Url> {\n  serializedBody?: string;\n}\n\nexport type RequestResult<\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = boolean,\n  TResponseStyle extends ResponseStyle = 'fields',\n> = ThrowOnError extends true\n  ? Promise<\n      TResponseStyle extends 'data'\n        ? TData extends Record<string, unknown>\n          ? TData[keyof TData]\n          : TData\n        : {\n            data: TData extends Record<string, unknown> ? TData[keyof TData] : TData;\n            request: Request;\n            response: Response;\n          }\n    >\n  : Promise<\n      TResponseStyle extends 'data'\n        ? (TData extends Record<string, unknown> ? TData[keyof TData] : TData) | undefined\n        : (\n            | {\n                data: TData extends Record<string, unknown> ? TData[keyof TData] : TData;\n                error: undefined;\n              }\n            | {\n                data: undefined;\n                error: TError extends Record<string, unknown> ? TError[keyof TError] : TError;\n              }\n          ) & {\n            request: Request;\n            response: Response;\n          }\n    >;\n\nexport interface ClientOptions {\n  baseUrl?: string;\n  responseStyle?: ResponseStyle;\n  throwOnError?: boolean;\n}\n\ntype MethodFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'>,\n) => RequestResult<TData, TError, ThrowOnError, TResponseStyle>;\n\ntype SseFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'>,\n) => Promise<ServerSentEventsResult<TData, TError>>;\n\ntype RequestFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'> &\n    Pick<Required<RequestOptions<TData, TResponseStyle, ThrowOnError>>, 'method'>,\n) => RequestResult<TData, TError, ThrowOnError, TResponseStyle>;\n\ntype BuildUrlFn = <\n  TData extends {\n    body?: unknown;\n    path?: Record<string, unknown>;\n    query?: Record<string, unknown>;\n    url: string;\n  },\n>(\n  options: TData & Options<TData>,\n) => string;\n\nexport type Client = CoreClient<RequestFn, Config, MethodFn, BuildUrlFn, SseFn> & {\n  interceptors: Middleware<Request, Response, unknown, ResolvedRequestOptions>;\n};\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 = ClientOptions> = (\n  override?: Config<ClientOptions & T>,\n) => Config<Required<ClientOptions> & T>;\n\nexport interface TDataShape {\n  body?: unknown;\n  headers?: unknown;\n  path?: unknown;\n  query?: unknown;\n  url: string;\n}\n\ntype OmitKeys<T, K> = Pick<T, Exclude<keyof T, K>>;\n\nexport type Options<\n  TData extends TDataShape = TDataShape,\n  ThrowOnError extends boolean = boolean,\n  TResponse = unknown,\n  TResponseStyle extends ResponseStyle = 'fields',\n> = OmitKeys<\n  RequestOptions<TResponse, TResponseStyle, ThrowOnError>,\n  'body' | 'path' | 'query' | 'url'\n> &\n  ([TData] extends [never] ? unknown : Omit<TData, 'url'>);\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@hey-api/sdk/default/client/utils.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@hey-api/sdk/default/client.gen.ts",
    "content": "// 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: 'http://localhost:3000/base' }));\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@hey-api/sdk/default/core/auth.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@hey-api/sdk/default/core/bodySerializer.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@hey-api/sdk/default/core/params.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@hey-api/sdk/default/core/pathSerializer.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@hey-api/sdk/default/core/queryKeySerializer.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\n/**\n * JSON-friendly union that mirrors what Pinia Colada can hash.\n */\nexport type JsonValue =\n  | null\n  | string\n  | number\n  | boolean\n  | JsonValue[]\n  | { [key: string]: JsonValue };\n\n/**\n * Replacer that converts non-JSON values (bigint, Date, etc.) to safe substitutes.\n */\nexport const queryKeyJsonReplacer = (_key: string, value: unknown) => {\n  if (value === undefined || typeof value === 'function' || typeof value === 'symbol') {\n    return undefined;\n  }\n  if (typeof value === 'bigint') {\n    return value.toString();\n  }\n  if (value instanceof Date) {\n    return value.toISOString();\n  }\n  return value;\n};\n\n/**\n * Safely stringifies a value and parses it back into a JsonValue.\n */\nexport const stringifyToJsonValue = (input: unknown): JsonValue | undefined => {\n  try {\n    const json = JSON.stringify(input, queryKeyJsonReplacer);\n    if (json === undefined) {\n      return undefined;\n    }\n    return JSON.parse(json) as JsonValue;\n  } catch {\n    return undefined;\n  }\n};\n\n/**\n * Detects plain objects (including objects with a null prototype).\n */\nconst isPlainObject = (value: unknown): value is Record<string, unknown> => {\n  if (value === null || typeof value !== 'object') {\n    return false;\n  }\n  const prototype = Object.getPrototypeOf(value as object);\n  return prototype === Object.prototype || prototype === null;\n};\n\n/**\n * Turns URLSearchParams into a sorted JSON object for deterministic keys.\n */\nconst serializeSearchParams = (params: URLSearchParams): JsonValue => {\n  const entries = Array.from(params.entries()).sort(([a], [b]) => a.localeCompare(b));\n  const result: Record<string, JsonValue> = {};\n\n  for (const [key, value] of entries) {\n    const existing = result[key];\n    if (existing === undefined) {\n      result[key] = value;\n      continue;\n    }\n\n    if (Array.isArray(existing)) {\n      (existing as string[]).push(value);\n    } else {\n      result[key] = [existing, value];\n    }\n  }\n\n  return result;\n};\n\n/**\n * Normalizes any accepted value into a JSON-friendly shape for query keys.\n */\nexport const serializeQueryKeyValue = (value: unknown): JsonValue | undefined => {\n  if (value === null) {\n    return null;\n  }\n\n  if (typeof value === 'string' || typeof value === 'number' || typeof value === 'boolean') {\n    return value;\n  }\n\n  if (value === undefined || typeof value === 'function' || typeof value === 'symbol') {\n    return undefined;\n  }\n\n  if (typeof value === 'bigint') {\n    return value.toString();\n  }\n\n  if (value instanceof Date) {\n    return value.toISOString();\n  }\n\n  if (Array.isArray(value)) {\n    return stringifyToJsonValue(value);\n  }\n\n  if (typeof URLSearchParams !== 'undefined' && value instanceof URLSearchParams) {\n    return serializeSearchParams(value);\n  }\n\n  if (isPlainObject(value)) {\n    return stringifyToJsonValue(value);\n  }\n\n  return undefined;\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@hey-api/sdk/default/core/serverSentEvents.gen.ts",
    "content": "// 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 const 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            // Normalize line endings: CRLF -> LF, then CR -> LF\n            buffer = buffer.replace(/\\r\\n/g, '\\n').replace(/\\r/g, '\\n');\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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@hey-api/sdk/default/core/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { Auth, AuthToken } from './auth.gen';\nimport type { BodySerializer, QuerySerializer, QuerySerializerOptions } from './bodySerializer.gen';\n\nexport type HttpMethod =\n  | 'connect'\n  | 'delete'\n  | 'get'\n  | 'head'\n  | 'options'\n  | 'patch'\n  | 'post'\n  | 'put'\n  | 'trace';\n\nexport type Client<\n  RequestFn = never,\n  Config = unknown,\n  MethodFn = never,\n  BuildUrlFn = never,\n  SseFn = never,\n> = {\n  /**\n   * Returns the final request URL.\n   */\n  buildUrl: BuildUrlFn;\n  getConfig: () => Config;\n  request: RequestFn;\n  setConfig: (config: Config) => Config;\n} & {\n  [K in HttpMethod]: MethodFn;\n} & ([SseFn] extends [never] ? { sse?: never } : { sse: { [K in HttpMethod]: SseFn } });\n\nexport interface Config {\n  /**\n   * Auth token or a function returning auth token. The resolved value will be\n   * added to the request payload as defined by its `security` array.\n   */\n  auth?: ((auth: Auth) => Promise<AuthToken> | AuthToken) | AuthToken;\n  /**\n   * A function for serializing request body parameter. By default,\n   * {@link JSON.stringify()} will be used.\n   */\n  bodySerializer?: BodySerializer | null;\n  /**\n   * An object containing any HTTP headers that you want to pre-populate your\n   * `Headers` object with.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/Headers/Headers#init See more}\n   */\n  headers?:\n    | RequestInit['headers']\n    | Record<\n        string,\n        string | number | boolean | (string | number | boolean)[] | null | undefined | unknown\n      >;\n  /**\n   * The request method.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/fetch#method See more}\n   */\n  method?: Uppercase<HttpMethod>;\n  /**\n   * A function for serializing request query parameters. By default, arrays\n   * will be exploded in form style, objects will be exploded in deepObject\n   * style, and reserved characters are percent-encoded.\n   *\n   * This method will have no effect if the native `paramsSerializer()` Axios\n   * API function is used.\n   *\n   * {@link https://swagger.io/docs/specification/serialization/#query View examples}\n   */\n  querySerializer?: QuerySerializer | QuerySerializerOptions;\n  /**\n   * A function validating request data. This is useful if you want to ensure\n   * the request conforms to the desired shape, so it can be safely sent to\n   * the server.\n   */\n  requestValidator?: (data: unknown) => Promise<unknown>;\n  /**\n   * A function transforming response data before it's returned. This is useful\n   * for post-processing data, e.g. converting ISO strings into Date objects.\n   */\n  responseTransformer?: (data: unknown) => Promise<unknown>;\n  /**\n   * A function validating response data. This is useful if you want to ensure\n   * the response conforms to the desired shape, so it can be safely passed to\n   * the transformers and returned to the user.\n   */\n  responseValidator?: (data: unknown) => Promise<unknown>;\n}\n\ntype IsExactlyNeverOrNeverUndefined<T> = [T] extends [never]\n  ? true\n  : [T] extends [never | undefined]\n    ? [undefined] extends [T]\n      ? false\n      : true\n    : false;\n\nexport type OmitNever<T extends Record<string, unknown>> = {\n  [K in keyof T as IsExactlyNeverOrNeverUndefined<T[K]> extends true ? never : K]: T[K];\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@hey-api/sdk/default/core/utils.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@hey-api/sdk/default/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport { apiVVersionODataControllerCount, callToTestOrderOfParams, callWithDefaultOptionalParameters, callWithDefaultParameters, callWithDescriptions, callWithDuplicateResponses, callWithNoContentResponse, callWithParameters, callWithResponse, callWithResponseAndNoContentResponse, callWithResponses, callWithResultFromHeader, callWithWeirdParameterNames, collectionFormat, complexParams, complexTypes, deleteCallWithoutParametersAndResponse, deleteFoo, deprecatedCall, dummyA, dummyB, duplicateName, duplicateName2, duplicateName3, duplicateName4, export_, fileResponse, fooWow, getApiVbyApiVersionSimpleOperation, getCallWithOptionalParam, getCallWithoutParametersAndResponse, headCallWithoutParametersAndResponse, import_, multipartRequest, multipartResponse, nonAsciiæøåÆøÅöôêÊ字符串, type Options, optionsCallWithoutParametersAndResponse, patchApiVbyApiVersionNoTag, patchCallWithoutParametersAndResponse, postApiVbyApiVersionFormData, postApiVbyApiVersionRequestBody, postCallWithOptionalParam, postCallWithoutParametersAndResponse, putCallWithoutParametersAndResponse, putWithFormUrlEncoded, testErrorCode, types, uploadFile } from './sdk.gen';\nexport type { _3eNum1Период, _400, AdditionalPropertiesIntegerIssue, AdditionalPropertiesUnknownIssue, AdditionalPropertiesUnknownIssue2, AdditionalPropertiesUnknownIssue3, AdditionalPropertiesUnknownIssueWritable, AnyOfAnyAndNull, AnyOfArrays, ApiVVersionODataControllerCountData, ApiVVersionODataControllerCountResponse, ApiVVersionODataControllerCountResponses, ArrayWithAnyOfProperties, ArrayWithArray, ArrayWithBooleans, ArrayWithNumbers, ArrayWithProperties, ArrayWithReferences, ArrayWithStrings, CallToTestOrderOfParamsData, CallWithDefaultOptionalParametersData, CallWithDefaultParametersData, CallWithDescriptionsData, CallWithDuplicateResponsesData, CallWithDuplicateResponsesError, CallWithDuplicateResponsesErrors, CallWithDuplicateResponsesResponse, CallWithDuplicateResponsesResponses, CallWithNoContentResponseData, CallWithNoContentResponseResponse, CallWithNoContentResponseResponses, CallWithParametersData, CallWithResponseAndNoContentResponseData, CallWithResponseAndNoContentResponseResponse, CallWithResponseAndNoContentResponseResponses, CallWithResponseData, CallWithResponseResponse, CallWithResponseResponses, CallWithResponsesData, CallWithResponsesError, CallWithResponsesErrors, CallWithResponsesResponse, CallWithResponsesResponses, CallWithResultFromHeaderData, CallWithResultFromHeaderErrors, CallWithResultFromHeaderResponses, CallWithWeirdParameterNamesData, CamelCaseCommentWithBreaks, CharactersInDescription, ClientOptions, CollectionFormatData, CommentWithBackticks, CommentWithBackticksAndQuotes, CommentWithBreaks, CommentWithExpressionPlaceholders, CommentWithQuotes, CommentWithReservedCharacters, CommentWithSlashes, ComplexParamsData, ComplexParamsResponse, ComplexParamsResponses, ComplexTypesData, ComplexTypesErrors, ComplexTypesResponse, ComplexTypesResponses, CompositionBaseModel, CompositionExtendedModel, CompositionWithAllOfAndNullable, CompositionWithAnyOf, CompositionWithAnyOfAndNullable, CompositionWithAnyOfAnonymous, CompositionWithNestedAnyAndTypeNull, CompositionWithNestedAnyOfAndNull, CompositionWithOneOf, CompositionWithOneOfAndComplexArrayDictionary, CompositionWithOneOfAndNullable, CompositionWithOneOfAndProperties, CompositionWithOneOfAndSimpleArrayDictionary, CompositionWithOneOfAndSimpleDictionary, CompositionWithOneOfAnonymous, CompositionWithOneOfDiscriminator, ConstValue, Default, DeleteCallWithoutParametersAndResponseData, DeleteFooData, DeleteFooData2, DeleteFooData3, DeprecatedCallData, DeprecatedModel, DictionaryWithArray, DictionaryWithDictionary, DictionaryWithProperties, DictionaryWithPropertiesAndAdditionalProperties, DictionaryWithReference, DictionaryWithString, DummyAData, DummyAResponse, DummyAResponses, DummyBData, DummyBResponse, DummyBResponses, DuplicateName2Data, DuplicateName3Data, DuplicateName4Data, DuplicateNameData, EnumFromDescription, EnumWithExtensions, EnumWithNumbers, EnumWithReplacedCharacters, EnumWithStrings, EnumWithXEnumNames, ExportData, ExternalRefA, ExternalRefB, ExternalSharedModel, File, FileResponseData, FileResponseResponse, FileResponseResponses, FileWritable, FooWowData, FooWowResponses, FreeFormObjectWithAdditionalPropertiesEqEmptyObject, FreeFormObjectWithAdditionalPropertiesEqTrue, FreeFormObjectWithoutAdditionalProperties, GenericSchemaDuplicateIssue1SystemBoolean, GenericSchemaDuplicateIssue1SystemBooleanWritable, GenericSchemaDuplicateIssue1SystemString, GenericSchemaDuplicateIssue1SystemStringWritable, GetApiVbyApiVersionSimpleOperationData, GetApiVbyApiVersionSimpleOperationError, GetApiVbyApiVersionSimpleOperationErrors, GetApiVbyApiVersionSimpleOperationResponse, GetApiVbyApiVersionSimpleOperationResponses, GetCallWithOptionalParamData, GetCallWithoutParametersAndResponseData, HeadCallWithoutParametersAndResponseData, Import, ImportData, ImportResponse, ImportResponses, IoK8sApimachineryPkgApisMetaV1DeleteOptions, IoK8sApimachineryPkgApisMetaV1Preconditions, ModelCircle, ModelFromZendesk, ModelSquare, ModelThatExtends, ModelThatExtendsExtends, ModelWithAdditionalPropertiesEqTrue, ModelWithAdditionalPropertiesRef, ModelWithAnyOfConstantSizeArray, ModelWithAnyOfConstantSizeArrayAndIntersect, ModelWithAnyOfConstantSizeArrayNullable, ModelWithAnyOfConstantSizeArrayWithNSizeAndOptions, ModelWithAnyOfConstantSizeArrayWithNSizeAndOptionsWritable, ModelWithArray, ModelWithArrayReadOnlyAndWriteOnly, ModelWithArrayReadOnlyAndWriteOnlyWritable, ModelWithBackticksInDescription, ModelWithBoolean, ModelWithCircularReference, ModelWithConst, ModelWithConstantSizeArray, ModelWithDictionary, ModelWithDuplicateImports, ModelWithDuplicateProperties, ModelWithEnum, ModelWithEnumFromDescription, ModelWithEnumWithHyphen, ModelWithInteger, ModelWithNestedArrayEnums, ModelWithNestedArrayEnumsData, ModelWithNestedArrayEnumsDataBar, ModelWithNestedArrayEnumsDataFoo, ModelWithNestedCompositionEnums, ModelWithNestedEnums, ModelWithNestedProperties, ModelWithNullableObject, ModelWithNullableString, ModelWithNumericEnumUnion, ModelWithOneOfAndProperties, ModelWithOneOfEnum, ModelWithOrderedProperties, ModelWithPattern, ModelWithPatternWritable, ModelWithPrefixItemsConstantSizeArray, ModelWithProperties, ModelWithPropertiesWritable, ModelWithReadOnlyAndWriteOnly, ModelWithReadOnlyAndWriteOnlyWritable, ModelWithReference, ModelWithReferenceWritable, ModelWithString, ModelWithStringError, MultipartRequestData, MultipartResponseData, MultipartResponseResponse, MultipartResponseResponses, NestedAnyOfArraysNullable, NonAsciiæøåÆøÅöôêÊ字符串Data, NonAsciiæøåÆøÅöôêÊ字符串Response, NonAsciiæøåÆøÅöôêÊ字符串Responses, NonAsciiStringæøåÆøÅöôêÊ字符串, NullableObject, OneOfAllOfIssue, OneOfAllOfIssueWritable, OptionsCallWithoutParametersAndResponseData, Pageable, ParameterSimpleParameterUnused, PatchApiVbyApiVersionNoTagData, PatchApiVbyApiVersionNoTagResponses, PatchCallWithoutParametersAndResponseData, PostApiVbyApiVersionFormDataData, PostApiVbyApiVersionRequestBodyData, PostCallWithOptionalParamData, PostCallWithOptionalParamResponse, PostCallWithOptionalParamResponses, PostCallWithoutParametersAndResponseData, PostServiceWithEmptyTagResponse, PostServiceWithEmptyTagResponse2, PutCallWithoutParametersAndResponseData, PutWithFormUrlEncodedData, SchemaWithFormRestrictedKeys, SimpleBoolean, SimpleFile, SimpleFormData, SimpleInteger, SimpleParameter, SimpleReference, SimpleRequestBody, SimpleString, SimpleStringWithPattern, TestErrorCodeData, TestErrorCodeErrors, TestErrorCodeResponses, TypesData, TypesResponse, TypesResponses, UploadFileData, UploadFileResponse, UploadFileResponses, XFooBar } from './types.gen';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@hey-api/sdk/default/sdk.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport { type Client, formDataBodySerializer, type Options as Options2, type TDataShape, urlSearchParamsBodySerializer } from './client';\nimport { client } from './client.gen';\nimport type { ApiVVersionODataControllerCountData, ApiVVersionODataControllerCountResponses, CallToTestOrderOfParamsData, CallWithDefaultOptionalParametersData, CallWithDefaultParametersData, CallWithDescriptionsData, CallWithDuplicateResponsesData, CallWithDuplicateResponsesErrors, CallWithDuplicateResponsesResponses, CallWithNoContentResponseData, CallWithNoContentResponseResponses, CallWithParametersData, CallWithResponseAndNoContentResponseData, CallWithResponseAndNoContentResponseResponses, CallWithResponseData, CallWithResponseResponses, CallWithResponsesData, CallWithResponsesErrors, CallWithResponsesResponses, CallWithResultFromHeaderData, CallWithResultFromHeaderErrors, CallWithResultFromHeaderResponses, CallWithWeirdParameterNamesData, CollectionFormatData, ComplexParamsData, ComplexParamsResponses, ComplexTypesData, ComplexTypesErrors, ComplexTypesResponses, DeleteCallWithoutParametersAndResponseData, DeleteFooData3, DeprecatedCallData, DummyAData, DummyAResponses, DummyBData, DummyBResponses, DuplicateName2Data, DuplicateName3Data, DuplicateName4Data, DuplicateNameData, ExportData, FileResponseData, FileResponseResponses, FooWowData, FooWowResponses, GetApiVbyApiVersionSimpleOperationData, GetApiVbyApiVersionSimpleOperationErrors, GetApiVbyApiVersionSimpleOperationResponses, GetCallWithOptionalParamData, GetCallWithoutParametersAndResponseData, HeadCallWithoutParametersAndResponseData, ImportData, ImportResponses, MultipartRequestData, MultipartResponseData, MultipartResponseResponses, NonAsciiæøåÆøÅöôêÊ字符串Data, NonAsciiæøåÆøÅöôêÊ字符串Responses, OptionsCallWithoutParametersAndResponseData, PatchApiVbyApiVersionNoTagData, PatchApiVbyApiVersionNoTagResponses, PatchCallWithoutParametersAndResponseData, PostApiVbyApiVersionFormDataData, PostApiVbyApiVersionRequestBodyData, PostCallWithOptionalParamData, PostCallWithOptionalParamResponses, PostCallWithoutParametersAndResponseData, PutCallWithoutParametersAndResponseData, PutWithFormUrlEncodedData, TestErrorCodeData, TestErrorCodeErrors, TestErrorCodeResponses, TypesData, TypesResponses, UploadFileData, UploadFileResponses } from './types.gen';\n\nexport type Options<TData extends TDataShape = TDataShape, ThrowOnError extends boolean = boolean> = Options2<TData, ThrowOnError> & {\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\nexport const export_ = <ThrowOnError extends boolean = false>(options?: Options<ExportData, ThrowOnError>) => (options?.client ?? client).get<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/no+tag', ...options });\n\nexport const patchApiVbyApiVersionNoTag = <ThrowOnError extends boolean = false>(options?: Options<PatchApiVbyApiVersionNoTagData, ThrowOnError>) => (options?.client ?? client).patch<PatchApiVbyApiVersionNoTagResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/no+tag', ...options });\n\nexport const import_ = <ThrowOnError extends boolean = false>(options: Options<ImportData, ThrowOnError>) => (options.client ?? client).post<ImportResponses, unknown, ThrowOnError>({\n    url: '/api/v{api-version}/no+tag',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options.headers\n    }\n});\n\nexport const fooWow = <ThrowOnError extends boolean = false>(options?: Options<FooWowData, ThrowOnError>) => (options?.client ?? client).put<FooWowResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/no+tag', ...options });\n\nexport const apiVVersionODataControllerCount = <ThrowOnError extends boolean = false>(options?: Options<ApiVVersionODataControllerCountData, ThrowOnError>) => (options?.client ?? client).get<ApiVVersionODataControllerCountResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple/$count', ...options });\n\nexport const getApiVbyApiVersionSimpleOperation = <ThrowOnError extends boolean = false>(options: Options<GetApiVbyApiVersionSimpleOperationData, ThrowOnError>) => (options.client ?? client).get<GetApiVbyApiVersionSimpleOperationResponses, GetApiVbyApiVersionSimpleOperationErrors, ThrowOnError>({ url: '/api/v{api-version}/simple:operation', ...options });\n\nexport const deleteCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<DeleteCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).delete<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const getCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<GetCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).get<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const headCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<HeadCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).head<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const optionsCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<OptionsCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).options<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const patchCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<PatchCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).patch<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const postCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<PostCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).post<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const putCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<PutCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).put<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const deleteFoo = <ThrowOnError extends boolean = false>(options: Options<DeleteFooData3, ThrowOnError>) => (options.client ?? client).delete<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/foo/{foo_param}/bar/{BarParam}', ...options });\n\nexport const callWithDescriptions = <ThrowOnError extends boolean = false>(options?: Options<CallWithDescriptionsData, ThrowOnError>) => (options?.client ?? client).post<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/descriptions', ...options });\n\n/**\n * @deprecated\n */\nexport const deprecatedCall = <ThrowOnError extends boolean = false>(options: Options<DeprecatedCallData, ThrowOnError>) => (options.client ?? client).post<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/parameters/deprecated', ...options });\n\nexport const callWithParameters = <ThrowOnError extends boolean = false>(options: Options<CallWithParametersData, ThrowOnError>) => (options.client ?? client).post<unknown, unknown, ThrowOnError>({\n    url: '/api/v{api-version}/parameters/{parameterPath}',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options.headers\n    }\n});\n\nexport const callWithWeirdParameterNames = <ThrowOnError extends boolean = false>(options: Options<CallWithWeirdParameterNamesData, ThrowOnError>) => (options.client ?? client).post<unknown, unknown, ThrowOnError>({\n    url: '/api/v{api-version}/parameters/{parameter.path.1}/{parameter-path-2}/{PARAMETER-PATH-3}',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options.headers\n    }\n});\n\nexport const getCallWithOptionalParam = <ThrowOnError extends boolean = false>(options: Options<GetCallWithOptionalParamData, ThrowOnError>) => (options.client ?? client).get<unknown, unknown, ThrowOnError>({\n    url: '/api/v{api-version}/parameters',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options.headers\n    }\n});\n\nexport const postCallWithOptionalParam = <ThrowOnError extends boolean = false>(options: Options<PostCallWithOptionalParamData, ThrowOnError>) => (options.client ?? client).post<PostCallWithOptionalParamResponses, unknown, ThrowOnError>({\n    url: '/api/v{api-version}/parameters',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options.headers\n    }\n});\n\nexport const postApiVbyApiVersionRequestBody = <ThrowOnError extends boolean = false>(options?: Options<PostApiVbyApiVersionRequestBodyData, ThrowOnError>) => (options?.client ?? client).post<unknown, unknown, ThrowOnError>({\n    url: '/api/v{api-version}/requestBody',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options?.headers\n    }\n});\n\nexport const postApiVbyApiVersionFormData = <ThrowOnError extends boolean = false>(options?: Options<PostApiVbyApiVersionFormDataData, ThrowOnError>) => (options?.client ?? client).post<unknown, unknown, ThrowOnError>({\n    ...formDataBodySerializer,\n    url: '/api/v{api-version}/formData',\n    ...options,\n    headers: {\n        'Content-Type': null,\n        ...options?.headers\n    }\n});\n\nexport const callWithDefaultParameters = <ThrowOnError extends boolean = false>(options?: Options<CallWithDefaultParametersData, ThrowOnError>) => (options?.client ?? client).get<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/defaults', ...options });\n\nexport const callWithDefaultOptionalParameters = <ThrowOnError extends boolean = false>(options?: Options<CallWithDefaultOptionalParametersData, ThrowOnError>) => (options?.client ?? client).post<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/defaults', ...options });\n\nexport const callToTestOrderOfParams = <ThrowOnError extends boolean = false>(options: Options<CallToTestOrderOfParamsData, ThrowOnError>) => (options.client ?? client).put<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/defaults', ...options });\n\nexport const duplicateName = <ThrowOnError extends boolean = false>(options?: Options<DuplicateNameData, ThrowOnError>) => (options?.client ?? client).delete<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/duplicate', ...options });\n\nexport const duplicateName2 = <ThrowOnError extends boolean = false>(options?: Options<DuplicateName2Data, ThrowOnError>) => (options?.client ?? client).get<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/duplicate', ...options });\n\nexport const duplicateName3 = <ThrowOnError extends boolean = false>(options?: Options<DuplicateName3Data, ThrowOnError>) => (options?.client ?? client).post<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/duplicate', ...options });\n\nexport const duplicateName4 = <ThrowOnError extends boolean = false>(options?: Options<DuplicateName4Data, ThrowOnError>) => (options?.client ?? client).put<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/duplicate', ...options });\n\nexport const callWithNoContentResponse = <ThrowOnError extends boolean = false>(options?: Options<CallWithNoContentResponseData, ThrowOnError>) => (options?.client ?? client).get<CallWithNoContentResponseResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/no-content', ...options });\n\nexport const callWithResponseAndNoContentResponse = <ThrowOnError extends boolean = false>(options?: Options<CallWithResponseAndNoContentResponseData, ThrowOnError>) => (options?.client ?? client).get<CallWithResponseAndNoContentResponseResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/multiple-tags/response-and-no-content', ...options });\n\nexport const dummyA = <ThrowOnError extends boolean = false>(options?: Options<DummyAData, ThrowOnError>) => (options?.client ?? client).get<DummyAResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/multiple-tags/a', ...options });\n\nexport const dummyB = <ThrowOnError extends boolean = false>(options?: Options<DummyBData, ThrowOnError>) => (options?.client ?? client).get<DummyBResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/multiple-tags/b', ...options });\n\nexport const callWithResponse = <ThrowOnError extends boolean = false>(options?: Options<CallWithResponseData, ThrowOnError>) => (options?.client ?? client).get<CallWithResponseResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/response', ...options });\n\nexport const callWithDuplicateResponses = <ThrowOnError extends boolean = false>(options?: Options<CallWithDuplicateResponsesData, ThrowOnError>) => (options?.client ?? client).post<CallWithDuplicateResponsesResponses, CallWithDuplicateResponsesErrors, ThrowOnError>({ url: '/api/v{api-version}/response', ...options });\n\nexport const callWithResponses = <ThrowOnError extends boolean = false>(options?: Options<CallWithResponsesData, ThrowOnError>) => (options?.client ?? client).put<CallWithResponsesResponses, CallWithResponsesErrors, ThrowOnError>({ url: '/api/v{api-version}/response', ...options });\n\nexport const collectionFormat = <ThrowOnError extends boolean = false>(options: Options<CollectionFormatData, ThrowOnError>) => (options.client ?? client).get<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/collectionFormat', ...options });\n\nexport const types = <ThrowOnError extends boolean = false>(options: Options<TypesData, ThrowOnError>) => (options.client ?? client).get<TypesResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/types', ...options });\n\nexport const uploadFile = <ThrowOnError extends boolean = false>(options: Options<UploadFileData, ThrowOnError>) => (options.client ?? client).post<UploadFileResponses, unknown, ThrowOnError>({\n    ...urlSearchParamsBodySerializer,\n    url: '/api/v{api-version}/upload',\n    ...options,\n    headers: {\n        'Content-Type': 'application/x-www-form-urlencoded',\n        ...options.headers\n    }\n});\n\nexport const fileResponse = <ThrowOnError extends boolean = false>(options: Options<FileResponseData, ThrowOnError>) => (options.client ?? client).get<FileResponseResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/file/{id}', ...options });\n\nexport const complexTypes = <ThrowOnError extends boolean = false>(options: Options<ComplexTypesData, ThrowOnError>) => (options.client ?? client).get<ComplexTypesResponses, ComplexTypesErrors, ThrowOnError>({\n    querySerializer: { parameters: { parameterObject: { object: { style: 'form' } } } },\n    url: '/api/v{api-version}/complex',\n    ...options\n});\n\nexport const multipartResponse = <ThrowOnError extends boolean = false>(options?: Options<MultipartResponseData, ThrowOnError>) => (options?.client ?? client).get<MultipartResponseResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/multipart', ...options });\n\nexport const multipartRequest = <ThrowOnError extends boolean = false>(options?: Options<MultipartRequestData, ThrowOnError>) => (options?.client ?? client).post<unknown, unknown, ThrowOnError>({\n    ...formDataBodySerializer,\n    url: '/api/v{api-version}/multipart',\n    ...options,\n    headers: {\n        'Content-Type': null,\n        ...options?.headers\n    }\n});\n\nexport const complexParams = <ThrowOnError extends boolean = false>(options: Options<ComplexParamsData, ThrowOnError>) => (options.client ?? client).put<ComplexParamsResponses, unknown, ThrowOnError>({\n    url: '/api/v{api-version}/complex/{id}',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json-patch+json',\n        ...options.headers\n    }\n});\n\nexport const callWithResultFromHeader = <ThrowOnError extends boolean = false>(options?: Options<CallWithResultFromHeaderData, ThrowOnError>) => (options?.client ?? client).post<CallWithResultFromHeaderResponses, CallWithResultFromHeaderErrors, ThrowOnError>({ url: '/api/v{api-version}/header', ...options });\n\nexport const testErrorCode = <ThrowOnError extends boolean = false>(options: Options<TestErrorCodeData, ThrowOnError>) => (options.client ?? client).post<TestErrorCodeResponses, TestErrorCodeErrors, ThrowOnError>({ url: '/api/v{api-version}/error', ...options });\n\nexport const nonAsciiæøåÆøÅöôêÊ字符串 = <ThrowOnError extends boolean = false>(options: Options<NonAsciiæøåÆøÅöôêÊ字符串Data, ThrowOnError>) => (options.client ?? client).post<NonAsciiæøåÆøÅöôêÊ字符串Responses, unknown, ThrowOnError>({ url: '/api/v{api-version}/non-ascii-æøåÆØÅöôêÊ字符串', ...options });\n\n/**\n * Login User\n */\nexport const putWithFormUrlEncoded = <ThrowOnError extends boolean = false>(options: Options<PutWithFormUrlEncodedData, ThrowOnError>) => (options.client ?? client).put<unknown, unknown, ThrowOnError>({\n    ...urlSearchParamsBodySerializer,\n    url: '/api/v{api-version}/non-ascii-æøåÆØÅöôêÊ字符串',\n    ...options,\n    headers: {\n        'Content-Type': 'application/x-www-form-urlencoded',\n        ...options.headers\n    }\n});\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@hey-api/sdk/default/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type ClientOptions = {\n    baseUrl: 'http://localhost:3000/base' | (string & {});\n};\n\n/**\n * Model with number-only name\n */\nexport type _400 = string;\n\n/**\n * External ref to shared model (A)\n */\nexport type ExternalRefA = ExternalSharedModel;\n\n/**\n * External ref to shared model (B)\n */\nexport type ExternalRefB = ExternalSharedModel;\n\n/**\n * Testing multiline comments in string: First line\n * Second line\n *\n * Fourth line\n */\nexport type CamelCaseCommentWithBreaks = number;\n\n/**\n * Testing multiline comments in string: First line\n * Second line\n *\n * Fourth line\n */\nexport type CommentWithBreaks = number;\n\n/**\n * Testing backticks in string: `backticks` and ```multiple backticks``` should work\n */\nexport type CommentWithBackticks = number;\n\n/**\n * Testing backticks and quotes in string: `backticks`, 'quotes', \"double quotes\" and ```multiple backticks``` should work\n */\nexport type CommentWithBackticksAndQuotes = number;\n\n/**\n * Testing slashes in string: \\backwards\\\\\\ and /forwards/// should work\n */\nexport type CommentWithSlashes = number;\n\n/**\n * Testing expression placeholders in string: ${expression} should work\n */\nexport type CommentWithExpressionPlaceholders = number;\n\n/**\n * Testing quotes in string: 'single quote''' and \"double quotes\"\"\" should work\n */\nexport type CommentWithQuotes = number;\n\n/**\n * Testing reserved characters in string: * inline * and ** inline ** should work\n */\nexport type CommentWithReservedCharacters = number;\n\n/**\n * This is a simple number\n */\nexport type SimpleInteger = number;\n\n/**\n * This is a simple boolean\n */\nexport type SimpleBoolean = boolean;\n\n/**\n * This is a simple string\n */\nexport type SimpleString = string;\n\n/**\n * A string with non-ascii (unicode) characters valid in typescript identifiers (æøåÆØÅöÔèÈ字符串)\n */\nexport type NonAsciiStringæøåÆøÅöôêÊ字符串 = string;\n\n/**\n * This is a simple file\n */\nexport type SimpleFile = Blob | File;\n\n/**\n * This is a simple reference\n */\nexport type SimpleReference = ModelWithString;\n\n/**\n * This is a simple string\n */\nexport type SimpleStringWithPattern = string | null;\n\n/**\n * This is a simple enum with strings\n */\nexport type EnumWithStrings = 'Success' | 'Warning' | 'Error' | '\\'Single Quote\\'' | '\"Double Quotes\"' | 'Non-ascii: øæåôöØÆÅÔÖ字符串';\n\nexport type EnumWithReplacedCharacters = '\\'Single Quote\\'' | '\"Double Quotes\"' | 'øæåôöØÆÅÔÖ字符串' | 3.1 | '';\n\n/**\n * This is a simple enum with numbers\n */\nexport type EnumWithNumbers = 1 | 2 | 3 | 1.1 | 1.2 | 1.3 | 100 | 200 | 300 | -100 | -200 | -300 | -1.1 | -1.2 | -1.3;\n\n/**\n * Success=1,Warning=2,Error=3\n */\nexport type EnumFromDescription = number;\n\n/**\n * This is a simple enum with numbers\n */\nexport type EnumWithExtensions = 200 | 400 | 500;\n\nexport type EnumWithXEnumNames = 0 | 1 | 2;\n\n/**\n * This is a simple array with numbers\n */\nexport type ArrayWithNumbers = Array<number>;\n\n/**\n * This is a simple array with booleans\n */\nexport type ArrayWithBooleans = Array<boolean>;\n\n/**\n * This is a simple array with strings\n */\nexport type ArrayWithStrings = Array<string>;\n\n/**\n * This is a simple array with references\n */\nexport type ArrayWithReferences = Array<ModelWithString>;\n\n/**\n * This is a simple array containing an array\n */\nexport type ArrayWithArray = Array<Array<ModelWithString>>;\n\n/**\n * This is a simple array with properties\n */\nexport type ArrayWithProperties = Array<{\n    '16x16'?: CamelCaseCommentWithBreaks;\n    bar?: string;\n}>;\n\n/**\n * This is a simple array with any of properties\n */\nexport type ArrayWithAnyOfProperties = Array<{\n    foo?: string;\n} | {\n    bar?: string;\n}>;\n\nexport type AnyOfAnyAndNull = {\n    data?: unknown | null;\n};\n\n/**\n * This is a simple array with any of properties\n */\nexport type AnyOfArrays = {\n    results?: Array<{\n        foo?: string;\n    } | {\n        bar?: string;\n    }>;\n};\n\n/**\n * This is a string dictionary\n */\nexport type DictionaryWithString = {\n    [key: string]: string;\n};\n\nexport type DictionaryWithPropertiesAndAdditionalProperties = {\n    foo?: number;\n    bar?: boolean;\n    [key: string]: string | number | boolean | undefined;\n};\n\n/**\n * This is a string reference\n */\nexport type DictionaryWithReference = {\n    [key: string]: ModelWithString;\n};\n\n/**\n * This is a complex dictionary\n */\nexport type DictionaryWithArray = {\n    [key: string]: Array<ModelWithString>;\n};\n\n/**\n * This is a string dictionary\n */\nexport type DictionaryWithDictionary = {\n    [key: string]: {\n        [key: string]: string;\n    };\n};\n\n/**\n * This is a complex dictionary\n */\nexport type DictionaryWithProperties = {\n    [key: string]: {\n        foo?: string;\n        bar?: string;\n    };\n};\n\n/**\n * This is a model with one number property\n */\nexport type ModelWithInteger = {\n    /**\n     * This is a simple number property\n     */\n    prop?: number;\n};\n\n/**\n * This is a model with one boolean property\n */\nexport type ModelWithBoolean = {\n    /**\n     * This is a simple boolean property\n     */\n    prop?: boolean;\n};\n\n/**\n * This is a model with one string property\n */\nexport type ModelWithString = {\n    /**\n     * This is a simple string property\n     */\n    prop?: string;\n};\n\n/**\n * This is a model with one string property\n */\nexport type ModelWithStringError = {\n    /**\n     * This is a simple string property\n     */\n    prop?: string;\n};\n\n/**\n * `Comment` or `VoiceComment`. The JSON object for adding voice comments to tickets is different. See [Adding voice comments to tickets](/documentation/ticketing/managing-tickets/adding-voice-comments-to-tickets)\n */\nexport type ModelFromZendesk = string;\n\n/**\n * This is a model with one string property\n */\nexport type ModelWithNullableString = {\n    /**\n     * This is a simple string property\n     */\n    nullableProp1?: string | null;\n    /**\n     * This is a simple string property\n     */\n    nullableRequiredProp1: string | null;\n    /**\n     * This is a simple string property\n     */\n    nullableProp2?: string | null;\n    /**\n     * This is a simple string property\n     */\n    nullableRequiredProp2: string | null;\n    /**\n     * This is a simple enum with strings\n     */\n    'foo_bar-enum'?: 'Success' | 'Warning' | 'Error' | 'ØÆÅ字符串';\n};\n\n/**\n * This is a model with one enum\n */\nexport type ModelWithEnum = {\n    /**\n     * This is a simple enum with strings\n     */\n    'foo_bar-enum'?: 'Success' | 'Warning' | 'Error' | 'ØÆÅ字符串';\n    /**\n     * These are the HTTP error code enums\n     */\n    statusCode?: '100' | '200 FOO' | '300 FOO_BAR' | '400 foo-bar' | '500 foo.bar' | '600 foo&bar';\n    /**\n     * Simple boolean enum\n     */\n    bool?: true;\n};\n\n/**\n * This is a model with one enum with escaped name\n */\nexport type ModelWithEnumWithHyphen = {\n    /**\n     * Foo-Bar-Baz-Qux\n     */\n    'foo-bar-baz-qux'?: '3.0';\n};\n\n/**\n * This is a model with one enum\n */\nexport type ModelWithEnumFromDescription = {\n    /**\n     * Success=1,Warning=2,Error=3\n     */\n    test?: number;\n};\n\n/**\n * This is a model with nested enums\n */\nexport type ModelWithNestedEnums = {\n    dictionaryWithEnum?: {\n        [key: string]: 'Success' | 'Warning' | 'Error';\n    };\n    dictionaryWithEnumFromDescription?: {\n        [key: string]: number;\n    };\n    arrayWithEnum?: Array<'Success' | 'Warning' | 'Error'>;\n    arrayWithDescription?: Array<number>;\n    /**\n     * This is a simple enum with strings\n     */\n    'foo_bar-enum'?: 'Success' | 'Warning' | 'Error' | 'ØÆÅ字符串';\n};\n\n/**\n * This is a model with one property containing a reference\n */\nexport type ModelWithReference = {\n    prop?: ModelWithProperties;\n};\n\n/**\n * This is a model with one property containing an array\n */\nexport type ModelWithArrayReadOnlyAndWriteOnly = {\n    prop?: Array<ModelWithReadOnlyAndWriteOnly>;\n    propWithFile?: Array<Blob | File>;\n    propWithNumber?: Array<number>;\n};\n\n/**\n * This is a model with one property containing an array\n */\nexport type ModelWithArray = {\n    prop?: Array<ModelWithString>;\n    propWithFile?: Array<Blob | File>;\n    propWithNumber?: Array<number>;\n};\n\n/**\n * This is a model with one property containing a dictionary\n */\nexport type ModelWithDictionary = {\n    prop?: {\n        [key: string]: string;\n    };\n};\n\n/**\n * This is a deprecated model with a deprecated property\n *\n * @deprecated\n */\nexport type DeprecatedModel = {\n    /**\n     * This is a deprecated property\n     *\n     * @deprecated\n     */\n    prop?: string;\n};\n\n/**\n * This is a model with one property containing a circular reference\n */\nexport type ModelWithCircularReference = {\n    prop?: ModelWithCircularReference;\n};\n\n/**\n * This is a model with one property with a 'one of' relationship\n */\nexport type CompositionWithOneOf = {\n    propA?: ModelWithString | ModelWithEnum | ModelWithArray | ModelWithDictionary;\n};\n\n/**\n * This is a model with one property with a 'one of' relationship where the options are not $ref\n */\nexport type CompositionWithOneOfAnonymous = {\n    propA?: {\n        propA?: string;\n    } | string | number;\n};\n\n/**\n * Circle\n */\nexport type ModelCircle = {\n    kind: string;\n    radius?: number;\n};\n\n/**\n * Square\n */\nexport type ModelSquare = {\n    kind: string;\n    sideLength?: number;\n};\n\n/**\n * This is a model with one property with a 'one of' relationship where the options are not $ref\n */\nexport type CompositionWithOneOfDiscriminator = ({\n    kind: 'circle';\n} & ModelCircle) | ({\n    kind: 'square';\n} & ModelSquare);\n\n/**\n * This is a model with one property with a 'any of' relationship\n */\nexport type CompositionWithAnyOf = {\n    propA?: ModelWithString | ModelWithEnum | ModelWithArray | ModelWithDictionary;\n};\n\n/**\n * This is a model with one property with a 'any of' relationship where the options are not $ref\n */\nexport type CompositionWithAnyOfAnonymous = {\n    propA?: {\n        propA?: string;\n    } | string | number;\n};\n\n/**\n * This is a model with nested 'any of' property with a type null\n */\nexport type CompositionWithNestedAnyAndTypeNull = {\n    propA?: Array<ModelWithDictionary | null> | Array<ModelWithArray | null>;\n};\n\nexport type _3eNum1Период = 'Bird' | 'Dog';\n\nexport type ConstValue = 'ConstValue';\n\n/**\n * This is a model with one property with a 'any of' relationship where the options are not $ref\n */\nexport type CompositionWithNestedAnyOfAndNull = {\n    /**\n     * Scopes\n     */\n    propA?: Array<_3eNum1Период | ConstValue> | null;\n};\n\n/**\n * This is a model with one property with a 'one of' relationship\n */\nexport type CompositionWithOneOfAndNullable = {\n    propA?: {\n        boolean?: boolean;\n    } | ModelWithEnum | ModelWithArray | ModelWithDictionary | null;\n};\n\n/**\n * This is a model that contains a simple dictionary within composition\n */\nexport type CompositionWithOneOfAndSimpleDictionary = {\n    propA?: boolean | {\n        [key: string]: number;\n    };\n};\n\n/**\n * This is a model that contains a dictionary of simple arrays within composition\n */\nexport type CompositionWithOneOfAndSimpleArrayDictionary = {\n    propA?: boolean | {\n        [key: string]: Array<boolean>;\n    };\n};\n\n/**\n * This is a model that contains a dictionary of complex arrays (composited) within composition\n */\nexport type CompositionWithOneOfAndComplexArrayDictionary = {\n    propA?: boolean | {\n        [key: string]: Array<number | string>;\n    };\n};\n\n/**\n * This is a model with one property with a 'all of' relationship\n */\nexport type CompositionWithAllOfAndNullable = {\n    propA?: ({\n        boolean?: boolean;\n    } & ModelWithEnum & ModelWithArray & ModelWithDictionary) | null;\n};\n\n/**\n * This is a model with one property with a 'any of' relationship\n */\nexport type CompositionWithAnyOfAndNullable = {\n    propA?: {\n        boolean?: boolean;\n    } | ModelWithEnum | ModelWithArray | ModelWithDictionary | null;\n};\n\n/**\n * This is a base model with two simple optional properties\n */\nexport type CompositionBaseModel = {\n    firstName?: string;\n    lastname?: string;\n};\n\n/**\n * This is a model that extends the base model\n */\nexport type CompositionExtendedModel = CompositionBaseModel & {\n    age: number;\n    firstName: string;\n    lastname: string;\n};\n\n/**\n * This is a model with one nested property\n */\nexport type ModelWithProperties = {\n    required: string;\n    readonly requiredAndReadOnly: string;\n    requiredAndNullable: string | null;\n    string?: string;\n    number?: number;\n    boolean?: boolean;\n    reference?: ModelWithString;\n    'property with space'?: string;\n    default?: string;\n    try?: string;\n    readonly '@namespace.string'?: string;\n    readonly '@namespace.integer'?: number;\n};\n\n/**\n * This is a model with one nested property\n */\nexport type ModelWithNestedProperties = {\n    readonly first: {\n        readonly second: {\n            readonly third: string | null;\n        } | null;\n    } | null;\n};\n\n/**\n * This is a model with duplicated properties\n */\nexport type ModelWithDuplicateProperties = {\n    prop?: ModelWithString;\n};\n\n/**\n * This is a model with ordered properties\n */\nexport type ModelWithOrderedProperties = {\n    zebra?: string;\n    apple?: string;\n    hawaii?: string;\n};\n\n/**\n * This is a model with duplicated imports\n */\nexport type ModelWithDuplicateImports = {\n    propA?: ModelWithString;\n    propB?: ModelWithString;\n    propC?: ModelWithString;\n};\n\n/**\n * This is a model that extends another model\n */\nexport type ModelThatExtends = ModelWithString & {\n    propExtendsA?: string;\n    propExtendsB?: ModelWithString;\n};\n\n/**\n * This is a model that extends another model\n */\nexport type ModelThatExtendsExtends = ModelWithString & ModelThatExtends & {\n    propExtendsC?: string;\n    propExtendsD?: ModelWithString;\n};\n\n/**\n * This is a model that contains a some patterns\n */\nexport type ModelWithPattern = {\n    key: string;\n    name: string;\n    readonly enabled?: boolean;\n    readonly modified?: string;\n    id?: string;\n    text?: string;\n    patternWithSingleQuotes?: string;\n    patternWithNewline?: string;\n    patternWithBacktick?: string;\n    patternWithUnicode?: string;\n};\n\nexport type File = {\n    /**\n     * Id\n     */\n    readonly id?: string;\n    /**\n     * Updated at\n     */\n    readonly updated_at?: string;\n    /**\n     * Created at\n     */\n    readonly created_at?: string;\n    /**\n     * Mime\n     */\n    mime: string;\n    /**\n     * File\n     */\n    readonly file?: string;\n};\n\nexport type Default = {\n    name?: string;\n};\n\nexport type Pageable = {\n    page?: number;\n    size?: number;\n    sort?: Array<string>;\n};\n\n/**\n * This is a free-form object without additionalProperties.\n */\nexport type FreeFormObjectWithoutAdditionalProperties = {\n    [key: string]: unknown;\n};\n\n/**\n * This is a free-form object with additionalProperties: true.\n */\nexport type FreeFormObjectWithAdditionalPropertiesEqTrue = {\n    [key: string]: unknown;\n};\n\n/**\n * This is a free-form object with additionalProperties: {}.\n */\nexport type FreeFormObjectWithAdditionalPropertiesEqEmptyObject = {\n    [key: string]: unknown;\n};\n\nexport type ModelWithConst = {\n    String?: 'String';\n    number?: 0;\n    null?: null;\n    withType?: 'Some string';\n};\n\n/**\n * This is a model with one property and additionalProperties: true\n */\nexport type ModelWithAdditionalPropertiesEqTrue = {\n    /**\n     * This is a simple string property\n     */\n    prop?: string;\n    [key: string]: unknown;\n};\n\nexport type NestedAnyOfArraysNullable = {\n    nullableArray?: Array<string | boolean> | null;\n};\n\nexport type CompositionWithOneOfAndProperties = ({\n    foo: SimpleParameter;\n} | {\n    bar: NonAsciiStringæøåÆøÅöôêÊ字符串;\n}) & {\n    baz: number | null;\n    qux: number;\n};\n\n/**\n * An object that can be null\n */\nexport type NullableObject = {\n    foo?: string;\n} | null;\n\n/**\n * Some % character\n */\nexport type CharactersInDescription = string;\n\nexport type ModelWithNullableObject = {\n    data?: NullableObject;\n};\n\n/**\n * An object with additional properties that can be null (anyOf ref + null)\n */\nexport type ModelWithAdditionalPropertiesRef = {\n    [key: string]: NullableObject | null;\n};\n\nexport type ModelWithOneOfEnum = {\n    foo: 'Bar';\n} | {\n    foo: 'Baz';\n} | {\n    foo: 'Qux';\n} | {\n    content: string;\n    foo: 'Quux';\n} | {\n    content: [\n        string,\n        string\n    ];\n    foo: 'Corge';\n};\n\nexport type ModelWithNestedArrayEnumsDataFoo = 'foo' | 'bar';\n\nexport type ModelWithNestedArrayEnumsDataBar = 'baz' | 'qux';\n\nexport type ModelWithNestedArrayEnumsData = {\n    foo?: Array<ModelWithNestedArrayEnumsDataFoo>;\n    bar?: Array<ModelWithNestedArrayEnumsDataBar>;\n};\n\nexport type ModelWithNestedArrayEnums = {\n    array_strings?: Array<string>;\n    data?: ModelWithNestedArrayEnumsData;\n};\n\nexport type ModelWithNestedCompositionEnums = {\n    foo?: ModelWithNestedArrayEnumsDataFoo;\n};\n\nexport type ModelWithReadOnlyAndWriteOnly = {\n    foo: string;\n    readonly bar: string;\n};\n\nexport type ModelWithConstantSizeArray = [\n    number,\n    number\n];\n\nexport type ModelWithAnyOfConstantSizeArray = [\n    number | string,\n    number | string,\n    number | string\n];\n\nexport type ModelWithPrefixItemsConstantSizeArray = [\n    ModelWithInteger,\n    number | string,\n    string\n];\n\nexport type ModelWithAnyOfConstantSizeArrayNullable = [\n    number | null | string,\n    number | null | string,\n    number | null | string\n];\n\nexport type ModelWithAnyOfConstantSizeArrayWithNSizeAndOptions = [\n    number | Import,\n    number | Import\n];\n\nexport type ModelWithAnyOfConstantSizeArrayAndIntersect = [\n    number & string,\n    number & string\n];\n\nexport type ModelWithNumericEnumUnion = {\n    /**\n     * Период\n     */\n    value?: -10 | -1 | 0 | 1 | 3 | 6 | 12;\n};\n\n/**\n * Some description with `back ticks`\n */\nexport type ModelWithBackticksInDescription = {\n    /**\n     * The template `that` should be used for parsing and importing the contents of the CSV file.\n     *\n     * <br/><p>There is one placeholder currently supported:<ul>     <li><b>${x}</b> - refers to the n-th column in the CSV file, e.g. ${1}, ${2}, ...)</li></ul><p>Example of a correct JSON template:</p>\n     * <pre>\n     * [\n     * {\n     * \"resourceType\": \"Asset\",\n     * \"identifier\": {\n     * \"name\": \"${1}\",\n     * \"domain\": {\n     * \"name\": \"${2}\",\n     * \"community\": {\n     * \"name\": \"Some Community\"\n     * }\n     * }\n     * },\n     * \"attributes\" : {\n     * \"00000000-0000-0000-0000-000000003115\" : [ {\n     * \"value\" : \"${3}\"\n     * } ],\n     * \"00000000-0000-0000-0000-000000000222\" : [ {\n     * \"value\" : \"${4}\"\n     * } ]\n     * }\n     * }\n     * ]\n     * </pre>\n     */\n    template?: string;\n};\n\nexport type ModelWithOneOfAndProperties = (SimpleParameter | NonAsciiStringæøåÆøÅöôêÊ字符串) & {\n    baz: number | null;\n    qux: number;\n};\n\n/**\n * Model used to test deduplication strategy (unused)\n */\nexport type ParameterSimpleParameterUnused = string;\n\n/**\n * Model used to test deduplication strategy\n */\nexport type PostServiceWithEmptyTagResponse = string;\n\n/**\n * Model used to test deduplication strategy\n */\nexport type PostServiceWithEmptyTagResponse2 = string;\n\n/**\n * Model used to test deduplication strategy\n */\nexport type DeleteFooData = string;\n\n/**\n * Model used to test deduplication strategy\n */\nexport type DeleteFooData2 = string;\n\n/**\n * Model with restricted keyword name\n */\nexport type Import = string;\n\nexport type SchemaWithFormRestrictedKeys = {\n    description?: string;\n    'x-enum-descriptions'?: string;\n    'x-enum-varnames'?: string;\n    'x-enumNames'?: string;\n    title?: string;\n    object?: {\n        description?: string;\n        'x-enum-descriptions'?: string;\n        'x-enum-varnames'?: string;\n        'x-enumNames'?: string;\n        title?: string;\n    };\n    array?: Array<{\n        description?: string;\n        'x-enum-descriptions'?: string;\n        'x-enum-varnames'?: string;\n        'x-enumNames'?: string;\n        title?: string;\n    }>;\n};\n\n/**\n * This schema was giving PascalCase transformations a hard time\n */\nexport type IoK8sApimachineryPkgApisMetaV1DeleteOptions = {\n    /**\n     * Must be fulfilled before a deletion is carried out. If not possible, a 409 Conflict status will be returned.\n     */\n    preconditions?: IoK8sApimachineryPkgApisMetaV1Preconditions;\n};\n\n/**\n * This schema was giving PascalCase transformations a hard time\n */\nexport type IoK8sApimachineryPkgApisMetaV1Preconditions = {\n    /**\n     * Specifies the target ResourceVersion\n     */\n    resourceVersion?: string;\n    /**\n     * Specifies the target UID.\n     */\n    uid?: string;\n};\n\nexport type AdditionalPropertiesUnknownIssue = {\n    [key: string]: string | number;\n};\n\nexport type AdditionalPropertiesUnknownIssue2 = {\n    [key: string]: string | number;\n};\n\nexport type AdditionalPropertiesUnknownIssue3 = string & {\n    entries: {\n        [key: string]: AdditionalPropertiesUnknownIssue;\n    };\n};\n\nexport type AdditionalPropertiesIntegerIssue = {\n    value: number;\n    [key: string]: number;\n};\n\nexport type OneOfAllOfIssue = ((ConstValue | GenericSchemaDuplicateIssue1SystemBoolean) & _3eNum1Период) | GenericSchemaDuplicateIssue1SystemString;\n\nexport type GenericSchemaDuplicateIssue1SystemBoolean = {\n    item?: boolean;\n    error?: string | null;\n    readonly hasError?: boolean;\n    data?: {\n        [key: string]: never;\n    };\n};\n\nexport type GenericSchemaDuplicateIssue1SystemString = {\n    item?: string | null;\n    error?: string | null;\n    readonly hasError?: boolean;\n};\n\nexport type ExternalSharedModel = {\n    id: string;\n    name?: string;\n};\n\n/**\n * This is a model with one property containing a reference\n */\nexport type ModelWithReferenceWritable = {\n    prop?: ModelWithPropertiesWritable;\n};\n\n/**\n * This is a model with one property containing an array\n */\nexport type ModelWithArrayReadOnlyAndWriteOnlyWritable = {\n    prop?: Array<ModelWithReadOnlyAndWriteOnlyWritable>;\n    propWithFile?: Array<Blob | File>;\n    propWithNumber?: Array<number>;\n};\n\n/**\n * This is a model with one nested property\n */\nexport type ModelWithPropertiesWritable = {\n    required: string;\n    requiredAndNullable: string | null;\n    string?: string;\n    number?: number;\n    boolean?: boolean;\n    reference?: ModelWithString;\n    'property with space'?: string;\n    default?: string;\n    try?: string;\n};\n\n/**\n * This is a model that contains a some patterns\n */\nexport type ModelWithPatternWritable = {\n    key: string;\n    name: string;\n    id?: string;\n    text?: string;\n    patternWithSingleQuotes?: string;\n    patternWithNewline?: string;\n    patternWithBacktick?: string;\n    patternWithUnicode?: string;\n};\n\nexport type FileWritable = {\n    /**\n     * Mime\n     */\n    mime: string;\n};\n\nexport type ModelWithReadOnlyAndWriteOnlyWritable = {\n    foo: string;\n    baz: string;\n};\n\nexport type ModelWithAnyOfConstantSizeArrayWithNSizeAndOptionsWritable = [\n    number | Import,\n    number | Import\n];\n\nexport type AdditionalPropertiesUnknownIssueWritable = {\n    [key: string]: string | number;\n};\n\nexport type OneOfAllOfIssueWritable = ((ConstValue | GenericSchemaDuplicateIssue1SystemBoolean) & _3eNum1Период) | GenericSchemaDuplicateIssue1SystemString;\n\nexport type GenericSchemaDuplicateIssue1SystemBooleanWritable = {\n    item?: boolean;\n    error?: string | null;\n    data?: {\n        [key: string]: never;\n    };\n};\n\nexport type GenericSchemaDuplicateIssue1SystemStringWritable = {\n    item?: string | null;\n    error?: string | null;\n};\n\n/**\n * This is a reusable parameter\n */\nexport type SimpleParameter = string;\n\n/**\n * Parameter with illegal characters\n */\nexport type XFooBar = ModelWithString;\n\n/**\n * A reusable request body\n */\nexport type SimpleRequestBody = ModelWithString;\n\n/**\n * A reusable request body\n */\nexport type SimpleFormData = ModelWithString;\n\nexport type ExportData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no+tag';\n};\n\nexport type PatchApiVbyApiVersionNoTagData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no+tag';\n};\n\nexport type PatchApiVbyApiVersionNoTagResponses = {\n    /**\n     * OK\n     */\n    default: unknown;\n};\n\nexport type ImportData = {\n    body: ModelWithReadOnlyAndWriteOnlyWritable | ModelWithArrayReadOnlyAndWriteOnlyWritable;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no+tag';\n};\n\nexport type ImportResponses = {\n    /**\n     * Success\n     */\n    200: ModelFromZendesk;\n    /**\n     * Default success response\n     */\n    default: ModelWithReadOnlyAndWriteOnly;\n};\n\nexport type ImportResponse = ImportResponses[keyof ImportResponses];\n\nexport type FooWowData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no+tag';\n};\n\nexport type FooWowResponses = {\n    /**\n     * OK\n     */\n    default: unknown;\n};\n\nexport type ApiVVersionODataControllerCountData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple/$count';\n};\n\nexport type ApiVVersionODataControllerCountResponses = {\n    /**\n     * Success\n     */\n    200: ModelFromZendesk;\n};\n\nexport type ApiVVersionODataControllerCountResponse = ApiVVersionODataControllerCountResponses[keyof ApiVVersionODataControllerCountResponses];\n\nexport type GetApiVbyApiVersionSimpleOperationData = {\n    body?: never;\n    path: {\n        /**\n         * foo in method\n         */\n        foo_param: string;\n    };\n    query?: never;\n    url: '/api/v{api-version}/simple:operation';\n};\n\nexport type GetApiVbyApiVersionSimpleOperationErrors = {\n    /**\n     * Default error response\n     */\n    default: ModelWithBoolean;\n};\n\nexport type GetApiVbyApiVersionSimpleOperationError = GetApiVbyApiVersionSimpleOperationErrors[keyof GetApiVbyApiVersionSimpleOperationErrors];\n\nexport type GetApiVbyApiVersionSimpleOperationResponses = {\n    /**\n     * Response is a simple number\n     */\n    200: number;\n};\n\nexport type GetApiVbyApiVersionSimpleOperationResponse = GetApiVbyApiVersionSimpleOperationResponses[keyof GetApiVbyApiVersionSimpleOperationResponses];\n\nexport type DeleteCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type GetCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type HeadCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type OptionsCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type PatchCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type PostCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type PutCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type DeleteFooData3 = {\n    body?: never;\n    headers: {\n        /**\n         * Parameter with illegal characters\n         */\n        'x-Foo-Bar': ModelWithString;\n    };\n    path: {\n        /**\n         * foo in method\n         */\n        foo_param: string;\n        /**\n         * bar in method\n         */\n        BarParam: string;\n    };\n    query?: never;\n    url: '/api/v{api-version}/foo/{foo_param}/bar/{BarParam}';\n};\n\nexport type CallWithDescriptionsData = {\n    body?: never;\n    path?: never;\n    query?: {\n        /**\n         * Testing multiline comments in string: First line\n         * Second line\n         *\n         * Fourth line\n         */\n        parameterWithBreaks?: string;\n        /**\n         * Testing backticks in string: `backticks` and ```multiple backticks``` should work\n         */\n        parameterWithBackticks?: string;\n        /**\n         * Testing slashes in string: \\backwards\\\\\\ and /forwards/// should work\n         */\n        parameterWithSlashes?: string;\n        /**\n         * Testing expression placeholders in string: ${expression} should work\n         */\n        parameterWithExpressionPlaceholders?: string;\n        /**\n         * Testing quotes in string: 'single quote''' and \"double quotes\"\"\" should work\n         */\n        parameterWithQuotes?: string;\n        /**\n         * Testing reserved characters in string: * inline * and ** inline ** should work\n         */\n        parameterWithReservedCharacters?: string;\n    };\n    url: '/api/v{api-version}/descriptions';\n};\n\nexport type DeprecatedCallData = {\n    body?: never;\n    headers: {\n        /**\n         * This parameter is deprecated\n         *\n         * @deprecated\n         */\n        parameter: DeprecatedModel | null;\n    };\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/parameters/deprecated';\n};\n\nexport type CallWithParametersData = {\n    /**\n     * This is the parameter that goes into the body\n     */\n    body: {\n        [key: string]: unknown;\n    } | null;\n    headers: {\n        /**\n         * This is the parameter that goes into the header\n         */\n        parameterHeader: string | null;\n    };\n    path: {\n        /**\n         * This is the parameter that goes into the path\n         */\n        parameterPath: string | null;\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string | null;\n    };\n    query: {\n        foo_ref_enum?: ModelWithNestedArrayEnumsDataFoo;\n        foo_all_of_enum: ModelWithNestedArrayEnumsDataFoo;\n        /**\n         * This is the parameter that goes into the query params\n         */\n        cursor: string | null;\n    };\n    url: '/api/v{api-version}/parameters/{parameterPath}';\n};\n\nexport type CallWithWeirdParameterNamesData = {\n    /**\n     * This is the parameter that goes into the body\n     */\n    body: ModelWithString | null;\n    headers: {\n        /**\n         * This is the parameter that goes into the request header\n         */\n        'parameter.header': string | null;\n    };\n    path: {\n        /**\n         * This is the parameter that goes into the path\n         */\n        'parameter.path.1'?: string;\n        /**\n         * This is the parameter that goes into the path\n         */\n        'parameter-path-2'?: string;\n        /**\n         * This is the parameter that goes into the path\n         */\n        'PARAMETER-PATH-3'?: string;\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string | null;\n    };\n    query: {\n        /**\n         * This is the parameter with a reserved keyword\n         */\n        default?: string;\n        /**\n         * This is the parameter that goes into the request query params\n         */\n        'parameter-query': string | null;\n    };\n    url: '/api/v{api-version}/parameters/{parameter.path.1}/{parameter-path-2}/{PARAMETER-PATH-3}';\n};\n\nexport type GetCallWithOptionalParamData = {\n    /**\n     * This is a required parameter\n     */\n    body: ModelWithOneOfEnum;\n    path?: never;\n    query?: {\n        /**\n         * This is an optional parameter\n         */\n        page?: number;\n    };\n    url: '/api/v{api-version}/parameters';\n};\n\nexport type PostCallWithOptionalParamData = {\n    /**\n     * This is an optional parameter\n     */\n    body?: {\n        offset?: number | null;\n    };\n    path?: never;\n    query: {\n        /**\n         * This is a required parameter\n         */\n        parameter: Pageable;\n    };\n    url: '/api/v{api-version}/parameters';\n};\n\nexport type PostCallWithOptionalParamResponses = {\n    /**\n     * Response is a simple number\n     */\n    200: number;\n    /**\n     * Success\n     */\n    204: void;\n};\n\nexport type PostCallWithOptionalParamResponse = PostCallWithOptionalParamResponses[keyof PostCallWithOptionalParamResponses];\n\nexport type PostApiVbyApiVersionRequestBodyData = {\n    /**\n     * A reusable request body\n     */\n    body?: SimpleRequestBody;\n    path?: never;\n    query?: {\n        /**\n         * This is a reusable parameter\n         */\n        parameter?: string;\n    };\n    url: '/api/v{api-version}/requestBody';\n};\n\nexport type PostApiVbyApiVersionFormDataData = {\n    /**\n     * A reusable request body\n     */\n    body?: SimpleFormData;\n    path?: never;\n    query?: {\n        /**\n         * This is a reusable parameter\n         */\n        parameter?: string;\n    };\n    url: '/api/v{api-version}/formData';\n};\n\nexport type CallWithDefaultParametersData = {\n    body?: never;\n    path?: never;\n    query?: {\n        /**\n         * This is a simple string with default value\n         */\n        parameterString?: string | null;\n        /**\n         * This is a simple number with default value\n         */\n        parameterNumber?: number | null;\n        /**\n         * This is a simple boolean with default value\n         */\n        parameterBoolean?: boolean | null;\n        /**\n         * This is a simple enum with default value\n         */\n        parameterEnum?: 'Success' | 'Warning' | 'Error';\n        /**\n         * This is a simple model with default value\n         */\n        parameterModel?: ModelWithString | null;\n    };\n    url: '/api/v{api-version}/defaults';\n};\n\nexport type CallWithDefaultOptionalParametersData = {\n    body?: never;\n    path?: never;\n    query?: {\n        /**\n         * This is a simple string that is optional with default value\n         */\n        parameterString?: string;\n        /**\n         * This is a simple number that is optional with default value\n         */\n        parameterNumber?: number;\n        /**\n         * This is a simple boolean that is optional with default value\n         */\n        parameterBoolean?: boolean;\n        /**\n         * This is a simple enum that is optional with default value\n         */\n        parameterEnum?: 'Success' | 'Warning' | 'Error';\n        /**\n         * This is a simple model that is optional with default value\n         */\n        parameterModel?: ModelWithString;\n    };\n    url: '/api/v{api-version}/defaults';\n};\n\nexport type CallToTestOrderOfParamsData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * This is a optional string with default\n         */\n        parameterOptionalStringWithDefault?: string;\n        /**\n         * This is a optional string with empty default\n         */\n        parameterOptionalStringWithEmptyDefault?: string;\n        /**\n         * This is a optional string with no default\n         */\n        parameterOptionalStringWithNoDefault?: string;\n        /**\n         * This is a string with default\n         */\n        parameterStringWithDefault: string;\n        /**\n         * This is a string with empty default\n         */\n        parameterStringWithEmptyDefault: string;\n        /**\n         * This is a string with no default\n         */\n        parameterStringWithNoDefault: string;\n        /**\n         * This is a string that can be null with no default\n         */\n        parameterStringNullableWithNoDefault?: string | null;\n        /**\n         * This is a string that can be null with default\n         */\n        parameterStringNullableWithDefault?: string | null;\n    };\n    url: '/api/v{api-version}/defaults';\n};\n\nexport type DuplicateNameData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/duplicate';\n};\n\nexport type DuplicateName2Data = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/duplicate';\n};\n\nexport type DuplicateName3Data = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/duplicate';\n};\n\nexport type DuplicateName4Data = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/duplicate';\n};\n\nexport type CallWithNoContentResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no-content';\n};\n\nexport type CallWithNoContentResponseResponses = {\n    /**\n     * Success\n     */\n    204: void;\n};\n\nexport type CallWithNoContentResponseResponse = CallWithNoContentResponseResponses[keyof CallWithNoContentResponseResponses];\n\nexport type CallWithResponseAndNoContentResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multiple-tags/response-and-no-content';\n};\n\nexport type CallWithResponseAndNoContentResponseResponses = {\n    /**\n     * Response is a simple number\n     */\n    200: number;\n    /**\n     * Success\n     */\n    204: void;\n};\n\nexport type CallWithResponseAndNoContentResponseResponse = CallWithResponseAndNoContentResponseResponses[keyof CallWithResponseAndNoContentResponseResponses];\n\nexport type DummyAData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multiple-tags/a';\n};\n\nexport type DummyAResponses = {\n    200: _400;\n};\n\nexport type DummyAResponse = DummyAResponses[keyof DummyAResponses];\n\nexport type DummyBData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multiple-tags/b';\n};\n\nexport type DummyBResponses = {\n    /**\n     * Success\n     */\n    204: void;\n};\n\nexport type DummyBResponse = DummyBResponses[keyof DummyBResponses];\n\nexport type CallWithResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/response';\n};\n\nexport type CallWithResponseResponses = {\n    default: Import;\n};\n\nexport type CallWithResponseResponse = CallWithResponseResponses[keyof CallWithResponseResponses];\n\nexport type CallWithDuplicateResponsesData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/response';\n};\n\nexport type CallWithDuplicateResponsesErrors = {\n    /**\n     * Message for 500 error\n     */\n    500: ModelWithStringError;\n    /**\n     * Message for 501 error\n     */\n    501: ModelWithStringError;\n    /**\n     * Message for 502 error\n     */\n    502: ModelWithStringError;\n    /**\n     * Message for 4XX errors\n     */\n    '4XX': DictionaryWithArray;\n    /**\n     * Default error response\n     */\n    default: ModelWithBoolean;\n};\n\nexport type CallWithDuplicateResponsesError = CallWithDuplicateResponsesErrors[keyof CallWithDuplicateResponsesErrors];\n\nexport type CallWithDuplicateResponsesResponses = {\n    /**\n     * Message for 200 response\n     */\n    200: ModelWithBoolean & ModelWithInteger;\n    /**\n     * Message for 201 response\n     */\n    201: ModelWithString;\n    /**\n     * Message for 202 response\n     */\n    202: ModelWithString;\n};\n\nexport type CallWithDuplicateResponsesResponse = CallWithDuplicateResponsesResponses[keyof CallWithDuplicateResponsesResponses];\n\nexport type CallWithResponsesData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/response';\n};\n\nexport type CallWithResponsesErrors = {\n    /**\n     * Message for 500 error\n     */\n    500: ModelWithStringError;\n    /**\n     * Message for 501 error\n     */\n    501: ModelWithStringError;\n    /**\n     * Message for 502 error\n     */\n    502: ModelWithStringError;\n    /**\n     * Message for default response\n     */\n    default: ModelWithStringError;\n};\n\nexport type CallWithResponsesError = CallWithResponsesErrors[keyof CallWithResponsesErrors];\n\nexport type CallWithResponsesResponses = {\n    /**\n     * Message for 200 response\n     */\n    200: {\n        readonly '@namespace.string'?: string;\n        readonly '@namespace.integer'?: number;\n        readonly value?: Array<ModelWithString>;\n    };\n    /**\n     * Message for 201 response\n     */\n    201: ModelThatExtends;\n    /**\n     * Message for 202 response\n     */\n    202: ModelThatExtendsExtends;\n};\n\nexport type CallWithResponsesResponse = CallWithResponsesResponses[keyof CallWithResponsesResponses];\n\nexport type CollectionFormatData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * This is an array parameter that is sent as csv format (comma-separated values)\n         */\n        parameterArrayCSV: Array<string> | null;\n        /**\n         * This is an array parameter that is sent as ssv format (space-separated values)\n         */\n        parameterArraySSV: Array<string> | null;\n        /**\n         * This is an array parameter that is sent as tsv format (tab-separated values)\n         */\n        parameterArrayTSV: Array<string> | null;\n        /**\n         * This is an array parameter that is sent as pipes format (pipe-separated values)\n         */\n        parameterArrayPipes: Array<string> | null;\n        /**\n         * This is an array parameter that is sent as multi format (multiple parameter instances)\n         */\n        parameterArrayMulti: Array<string> | null;\n    };\n    url: '/api/v{api-version}/collectionFormat';\n};\n\nexport type TypesData = {\n    body?: never;\n    path?: {\n        /**\n         * This is a number parameter\n         */\n        id?: number;\n    };\n    query: {\n        /**\n         * This is a number parameter\n         */\n        parameterNumber: number;\n        /**\n         * This is a string parameter\n         */\n        parameterString: string | null;\n        /**\n         * This is a boolean parameter\n         */\n        parameterBoolean: boolean | null;\n        /**\n         * This is an object parameter\n         */\n        parameterObject: {\n            [key: string]: unknown;\n        } | null;\n        /**\n         * This is an array parameter\n         */\n        parameterArray: Array<string> | null;\n        /**\n         * This is a dictionary parameter\n         */\n        parameterDictionary: {\n            [key: string]: unknown;\n        } | null;\n        /**\n         * This is an enum parameter\n         */\n        parameterEnum: 'Success' | 'Warning' | 'Error' | null;\n    };\n    url: '/api/v{api-version}/types';\n};\n\nexport type TypesResponses = {\n    /**\n     * Response is a simple number\n     */\n    200: number;\n    /**\n     * Response is a simple string\n     */\n    201: string;\n    /**\n     * Response is a simple boolean\n     */\n    202: boolean;\n    /**\n     * Response is a simple object\n     */\n    203: {\n        [key: string]: unknown;\n    };\n};\n\nexport type TypesResponse = TypesResponses[keyof TypesResponses];\n\nexport type UploadFileData = {\n    body: Blob | File;\n    path: {\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string | null;\n    };\n    query?: never;\n    url: '/api/v{api-version}/upload';\n};\n\nexport type UploadFileResponses = {\n    200: boolean;\n};\n\nexport type UploadFileResponse = UploadFileResponses[keyof UploadFileResponses];\n\nexport type FileResponseData = {\n    body?: never;\n    path: {\n        id: string;\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string;\n    };\n    query?: never;\n    url: '/api/v{api-version}/file/{id}';\n};\n\nexport type FileResponseResponses = {\n    /**\n     * Success\n     */\n    200: Blob | File;\n};\n\nexport type FileResponseResponse = FileResponseResponses[keyof FileResponseResponses];\n\nexport type ComplexTypesData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * Parameter containing object\n         */\n        parameterObject: {\n            first?: {\n                second?: {\n                    third?: string;\n                };\n            };\n        };\n        /**\n         * Parameter containing reference\n         */\n        parameterReference: ModelWithString;\n    };\n    url: '/api/v{api-version}/complex';\n};\n\nexport type ComplexTypesErrors = {\n    /**\n     * 400 `server` error\n     */\n    400: unknown;\n    /**\n     * 500 server error\n     */\n    500: unknown;\n};\n\nexport type ComplexTypesResponses = {\n    /**\n     * Successful response\n     */\n    200: Array<ModelWithString>;\n};\n\nexport type ComplexTypesResponse = ComplexTypesResponses[keyof ComplexTypesResponses];\n\nexport type MultipartResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multipart';\n};\n\nexport type MultipartResponseResponses = {\n    /**\n     * OK\n     */\n    200: {\n        file?: Blob | File;\n        metadata?: {\n            foo?: string;\n            bar?: string;\n        };\n    };\n};\n\nexport type MultipartResponseResponse = MultipartResponseResponses[keyof MultipartResponseResponses];\n\nexport type MultipartRequestData = {\n    body?: {\n        content?: Blob | File;\n        data?: ModelWithString | null;\n    };\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multipart';\n};\n\nexport type ComplexParamsData = {\n    body?: {\n        readonly key: string | null;\n        name: string | null;\n        enabled?: boolean;\n        type: 'Monkey' | 'Horse' | 'Bird';\n        listOfModels?: Array<ModelWithString> | null;\n        listOfStrings?: Array<string> | null;\n        parameters: ModelWithString | ModelWithEnum | ModelWithArray | ModelWithDictionary;\n        readonly user?: {\n            readonly id?: number;\n            readonly name?: string | null;\n        };\n    };\n    path: {\n        id: number;\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string;\n    };\n    query?: never;\n    url: '/api/v{api-version}/complex/{id}';\n};\n\nexport type ComplexParamsResponses = {\n    /**\n     * Success\n     */\n    200: ModelWithString;\n};\n\nexport type ComplexParamsResponse = ComplexParamsResponses[keyof ComplexParamsResponses];\n\nexport type CallWithResultFromHeaderData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/header';\n};\n\nexport type CallWithResultFromHeaderErrors = {\n    /**\n     * 400 server error\n     */\n    400: unknown;\n    /**\n     * 500 server error\n     */\n    500: unknown;\n};\n\nexport type CallWithResultFromHeaderResponses = {\n    /**\n     * Successful response\n     */\n    200: unknown;\n};\n\nexport type TestErrorCodeData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * Status code to return\n         */\n        status: number;\n    };\n    url: '/api/v{api-version}/error';\n};\n\nexport type TestErrorCodeErrors = {\n    /**\n     * Custom message: Internal Server Error\n     */\n    500: unknown;\n    /**\n     * Custom message: Not Implemented\n     */\n    501: unknown;\n    /**\n     * Custom message: Bad Gateway\n     */\n    502: unknown;\n    /**\n     * Custom message: Service Unavailable\n     */\n    503: unknown;\n};\n\nexport type TestErrorCodeResponses = {\n    /**\n     * Custom message: Successful response\n     */\n    200: unknown;\n};\n\nexport type NonAsciiæøåÆøÅöôêÊ字符串Data = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * Dummy input param\n         */\n        nonAsciiParamæøåÆØÅöôêÊ: number;\n    };\n    url: '/api/v{api-version}/non-ascii-æøåÆØÅöôêÊ字符串';\n};\n\nexport type NonAsciiæøåÆøÅöôêÊ字符串Responses = {\n    /**\n     * Successful response\n     */\n    200: Array<NonAsciiStringæøåÆøÅöôêÊ字符串>;\n};\n\nexport type NonAsciiæøåÆøÅöôêÊ字符串Response = NonAsciiæøåÆøÅöôêÊ字符串Responses[keyof NonAsciiæøåÆøÅöôêÊ字符串Responses];\n\nexport type PutWithFormUrlEncodedData = {\n    body: ArrayWithStrings;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/non-ascii-æøåÆØÅöôêÊ字符串';\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@hey-api/sdk/instance/client/client.gen.ts",
    "content": "// 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 (options: RequestOptions) => {\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 url = buildUrl(opts);\n\n    return { opts, url };\n  };\n\n  const request: Client['request'] = async (options) => {\n    // @ts-expect-error\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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@hey-api/sdk/instance/client/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type { Auth } from '../core/auth.gen';\nexport type { QuerySerializerOptions } from '../core/bodySerializer.gen';\nexport {\n  formDataBodySerializer,\n  jsonBodySerializer,\n  urlSearchParamsBodySerializer,\n} from '../core/bodySerializer.gen';\nexport { buildClientParams } from '../core/params.gen';\nexport { serializeQueryKeyValue } from '../core/queryKeySerializer.gen';\nexport { createClient } from './client.gen';\nexport type {\n  Client,\n  ClientOptions,\n  Config,\n  CreateClientConfig,\n  Options,\n  RequestOptions,\n  RequestResult,\n  ResolvedRequestOptions,\n  ResponseStyle,\n  TDataShape,\n} from './types.gen';\nexport { createConfig, mergeHeaders } from './utils.gen';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@hey-api/sdk/instance/client/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { Auth } from '../core/auth.gen';\nimport type {\n  ServerSentEventsOptions,\n  ServerSentEventsResult,\n} from '../core/serverSentEvents.gen';\nimport type { Client as CoreClient, Config as CoreConfig } from '../core/types.gen';\nimport type { Middleware } from './utils.gen';\n\nexport type ResponseStyle = 'data' | 'fields';\n\nexport interface Config<T extends ClientOptions = ClientOptions>\n  extends Omit<RequestInit, 'body' | 'headers' | 'method'>, CoreConfig {\n  /**\n   * Base URL for all requests made by this client.\n   */\n  baseUrl?: T['baseUrl'];\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   * Please don't use the Fetch client for Next.js applications. The `next`\n   * options won't have any effect.\n   *\n   * Install {@link https://www.npmjs.com/package/@hey-api/client-next `@hey-api/client-next`} instead.\n   */\n  next?: never;\n  /**\n   * Return the response data parsed in a specified format. By default, `auto`\n   * will infer the appropriate method from the `Content-Type` response header.\n   * You can override this behavior with any of the {@link Body} methods.\n   * Select `stream` if you don't want to parse response data at all.\n   *\n   * @default 'auto'\n   */\n  parseAs?: 'arrayBuffer' | 'auto' | 'blob' | 'formData' | 'json' | 'stream' | 'text';\n  /**\n   * Should we return only data or multiple fields (data, error, response, etc.)?\n   *\n   * @default 'fields'\n   */\n  responseStyle?: ResponseStyle;\n  /**\n   * Throw an error instead of returning it in the response?\n   *\n   * @default false\n   */\n  throwOnError?: T['throwOnError'];\n}\n\nexport interface RequestOptions<\n  TData = unknown,\n  TResponseStyle extends ResponseStyle = 'fields',\n  ThrowOnError extends boolean = boolean,\n  Url extends string = string,\n>\n  extends\n    Config<{\n      responseStyle: TResponseStyle;\n      throwOnError: ThrowOnError;\n    }>,\n    Pick<\n      ServerSentEventsOptions<TData>,\n      | 'onRequest'\n      | 'onSseError'\n      | 'onSseEvent'\n      | 'sseDefaultRetryDelay'\n      | 'sseMaxRetryAttempts'\n      | 'sseMaxRetryDelay'\n    > {\n  /**\n   * Any body that you want to add to your request.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/fetch#body}\n   */\n  body?: unknown;\n  path?: Record<string, unknown>;\n  query?: Record<string, unknown>;\n  /**\n   * Security mechanism(s) to use for the request.\n   */\n  security?: ReadonlyArray<Auth>;\n  url: Url;\n}\n\nexport interface ResolvedRequestOptions<\n  TResponseStyle extends ResponseStyle = 'fields',\n  ThrowOnError extends boolean = boolean,\n  Url extends string = string,\n> extends RequestOptions<unknown, TResponseStyle, ThrowOnError, Url> {\n  serializedBody?: string;\n}\n\nexport type RequestResult<\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = boolean,\n  TResponseStyle extends ResponseStyle = 'fields',\n> = ThrowOnError extends true\n  ? Promise<\n      TResponseStyle extends 'data'\n        ? TData extends Record<string, unknown>\n          ? TData[keyof TData]\n          : TData\n        : {\n            data: TData extends Record<string, unknown> ? TData[keyof TData] : TData;\n            request: Request;\n            response: Response;\n          }\n    >\n  : Promise<\n      TResponseStyle extends 'data'\n        ? (TData extends Record<string, unknown> ? TData[keyof TData] : TData) | undefined\n        : (\n            | {\n                data: TData extends Record<string, unknown> ? TData[keyof TData] : TData;\n                error: undefined;\n              }\n            | {\n                data: undefined;\n                error: TError extends Record<string, unknown> ? TError[keyof TError] : TError;\n              }\n          ) & {\n            request: Request;\n            response: Response;\n          }\n    >;\n\nexport interface ClientOptions {\n  baseUrl?: string;\n  responseStyle?: ResponseStyle;\n  throwOnError?: boolean;\n}\n\ntype MethodFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'>,\n) => RequestResult<TData, TError, ThrowOnError, TResponseStyle>;\n\ntype SseFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'>,\n) => Promise<ServerSentEventsResult<TData, TError>>;\n\ntype RequestFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'> &\n    Pick<Required<RequestOptions<TData, TResponseStyle, ThrowOnError>>, 'method'>,\n) => RequestResult<TData, TError, ThrowOnError, TResponseStyle>;\n\ntype BuildUrlFn = <\n  TData extends {\n    body?: unknown;\n    path?: Record<string, unknown>;\n    query?: Record<string, unknown>;\n    url: string;\n  },\n>(\n  options: TData & Options<TData>,\n) => string;\n\nexport type Client = CoreClient<RequestFn, Config, MethodFn, BuildUrlFn, SseFn> & {\n  interceptors: Middleware<Request, Response, unknown, ResolvedRequestOptions>;\n};\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 = ClientOptions> = (\n  override?: Config<ClientOptions & T>,\n) => Config<Required<ClientOptions> & T>;\n\nexport interface TDataShape {\n  body?: unknown;\n  headers?: unknown;\n  path?: unknown;\n  query?: unknown;\n  url: string;\n}\n\ntype OmitKeys<T, K> = Pick<T, Exclude<keyof T, K>>;\n\nexport type Options<\n  TData extends TDataShape = TDataShape,\n  ThrowOnError extends boolean = boolean,\n  TResponse = unknown,\n  TResponseStyle extends ResponseStyle = 'fields',\n> = OmitKeys<\n  RequestOptions<TResponse, TResponseStyle, ThrowOnError>,\n  'body' | 'path' | 'query' | 'url'\n> &\n  ([TData] extends [never] ? unknown : Omit<TData, 'url'>);\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@hey-api/sdk/instance/client/utils.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@hey-api/sdk/instance/client.gen.ts",
    "content": "// 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>());\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@hey-api/sdk/instance/core/auth.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@hey-api/sdk/instance/core/bodySerializer.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@hey-api/sdk/instance/core/params.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@hey-api/sdk/instance/core/pathSerializer.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@hey-api/sdk/instance/core/queryKeySerializer.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\n/**\n * JSON-friendly union that mirrors what Pinia Colada can hash.\n */\nexport type JsonValue =\n  | null\n  | string\n  | number\n  | boolean\n  | JsonValue[]\n  | { [key: string]: JsonValue };\n\n/**\n * Replacer that converts non-JSON values (bigint, Date, etc.) to safe substitutes.\n */\nexport const queryKeyJsonReplacer = (_key: string, value: unknown) => {\n  if (value === undefined || typeof value === 'function' || typeof value === 'symbol') {\n    return undefined;\n  }\n  if (typeof value === 'bigint') {\n    return value.toString();\n  }\n  if (value instanceof Date) {\n    return value.toISOString();\n  }\n  return value;\n};\n\n/**\n * Safely stringifies a value and parses it back into a JsonValue.\n */\nexport const stringifyToJsonValue = (input: unknown): JsonValue | undefined => {\n  try {\n    const json = JSON.stringify(input, queryKeyJsonReplacer);\n    if (json === undefined) {\n      return undefined;\n    }\n    return JSON.parse(json) as JsonValue;\n  } catch {\n    return undefined;\n  }\n};\n\n/**\n * Detects plain objects (including objects with a null prototype).\n */\nconst isPlainObject = (value: unknown): value is Record<string, unknown> => {\n  if (value === null || typeof value !== 'object') {\n    return false;\n  }\n  const prototype = Object.getPrototypeOf(value as object);\n  return prototype === Object.prototype || prototype === null;\n};\n\n/**\n * Turns URLSearchParams into a sorted JSON object for deterministic keys.\n */\nconst serializeSearchParams = (params: URLSearchParams): JsonValue => {\n  const entries = Array.from(params.entries()).sort(([a], [b]) => a.localeCompare(b));\n  const result: Record<string, JsonValue> = {};\n\n  for (const [key, value] of entries) {\n    const existing = result[key];\n    if (existing === undefined) {\n      result[key] = value;\n      continue;\n    }\n\n    if (Array.isArray(existing)) {\n      (existing as string[]).push(value);\n    } else {\n      result[key] = [existing, value];\n    }\n  }\n\n  return result;\n};\n\n/**\n * Normalizes any accepted value into a JSON-friendly shape for query keys.\n */\nexport const serializeQueryKeyValue = (value: unknown): JsonValue | undefined => {\n  if (value === null) {\n    return null;\n  }\n\n  if (typeof value === 'string' || typeof value === 'number' || typeof value === 'boolean') {\n    return value;\n  }\n\n  if (value === undefined || typeof value === 'function' || typeof value === 'symbol') {\n    return undefined;\n  }\n\n  if (typeof value === 'bigint') {\n    return value.toString();\n  }\n\n  if (value instanceof Date) {\n    return value.toISOString();\n  }\n\n  if (Array.isArray(value)) {\n    return stringifyToJsonValue(value);\n  }\n\n  if (typeof URLSearchParams !== 'undefined' && value instanceof URLSearchParams) {\n    return serializeSearchParams(value);\n  }\n\n  if (isPlainObject(value)) {\n    return stringifyToJsonValue(value);\n  }\n\n  return undefined;\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@hey-api/sdk/instance/core/serverSentEvents.gen.ts",
    "content": "// 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 const 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            // Normalize line endings: CRLF -> LF, then CR -> LF\n            buffer = buffer.replace(/\\r\\n/g, '\\n').replace(/\\r/g, '\\n');\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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@hey-api/sdk/instance/core/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { Auth, AuthToken } from './auth.gen';\nimport type { BodySerializer, QuerySerializer, QuerySerializerOptions } from './bodySerializer.gen';\n\nexport type HttpMethod =\n  | 'connect'\n  | 'delete'\n  | 'get'\n  | 'head'\n  | 'options'\n  | 'patch'\n  | 'post'\n  | 'put'\n  | 'trace';\n\nexport type Client<\n  RequestFn = never,\n  Config = unknown,\n  MethodFn = never,\n  BuildUrlFn = never,\n  SseFn = never,\n> = {\n  /**\n   * Returns the final request URL.\n   */\n  buildUrl: BuildUrlFn;\n  getConfig: () => Config;\n  request: RequestFn;\n  setConfig: (config: Config) => Config;\n} & {\n  [K in HttpMethod]: MethodFn;\n} & ([SseFn] extends [never] ? { sse?: never } : { sse: { [K in HttpMethod]: SseFn } });\n\nexport interface Config {\n  /**\n   * Auth token or a function returning auth token. The resolved value will be\n   * added to the request payload as defined by its `security` array.\n   */\n  auth?: ((auth: Auth) => Promise<AuthToken> | AuthToken) | AuthToken;\n  /**\n   * A function for serializing request body parameter. By default,\n   * {@link JSON.stringify()} will be used.\n   */\n  bodySerializer?: BodySerializer | null;\n  /**\n   * An object containing any HTTP headers that you want to pre-populate your\n   * `Headers` object with.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/Headers/Headers#init See more}\n   */\n  headers?:\n    | RequestInit['headers']\n    | Record<\n        string,\n        string | number | boolean | (string | number | boolean)[] | null | undefined | unknown\n      >;\n  /**\n   * The request method.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/fetch#method See more}\n   */\n  method?: Uppercase<HttpMethod>;\n  /**\n   * A function for serializing request query parameters. By default, arrays\n   * will be exploded in form style, objects will be exploded in deepObject\n   * style, and reserved characters are percent-encoded.\n   *\n   * This method will have no effect if the native `paramsSerializer()` Axios\n   * API function is used.\n   *\n   * {@link https://swagger.io/docs/specification/serialization/#query View examples}\n   */\n  querySerializer?: QuerySerializer | QuerySerializerOptions;\n  /**\n   * A function validating request data. This is useful if you want to ensure\n   * the request conforms to the desired shape, so it can be safely sent to\n   * the server.\n   */\n  requestValidator?: (data: unknown) => Promise<unknown>;\n  /**\n   * A function transforming response data before it's returned. This is useful\n   * for post-processing data, e.g. converting ISO strings into Date objects.\n   */\n  responseTransformer?: (data: unknown) => Promise<unknown>;\n  /**\n   * A function validating response data. This is useful if you want to ensure\n   * the response conforms to the desired shape, so it can be safely passed to\n   * the transformers and returned to the user.\n   */\n  responseValidator?: (data: unknown) => Promise<unknown>;\n}\n\ntype IsExactlyNeverOrNeverUndefined<T> = [T] extends [never]\n  ? true\n  : [T] extends [never | undefined]\n    ? [undefined] extends [T]\n      ? false\n      : true\n    : false;\n\nexport type OmitNever<T extends Record<string, unknown>> = {\n  [K in keyof T as IsExactlyNeverOrNeverUndefined<T[K]> extends true ? never : K]: T[K];\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@hey-api/sdk/instance/core/utils.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@hey-api/sdk/instance/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport { Bar, Foo, type Options, Sdk } from './sdk.gen';\nexport type { ClientOptions, FooBarPostData, FooBarPostResponse, FooBarPostResponses, FooBarPutData, FooBarPutResponse, FooBarPutResponses, FooPostData, FooPostResponse, FooPostResponses, FooPutData, FooPutResponse, FooPutResponses, GetFooBarData, GetFooBarResponse, GetFooBarResponses, GetFooData, GetFooResponse, GetFooResponses } from './types.gen';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@hey-api/sdk/instance/sdk.gen.ts",
    "content": "// 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 { FooBarPostData, FooBarPostResponses, FooBarPutData, FooBarPutResponses, FooPostData, FooPostResponses, FooPutData, FooPutResponses, GetFooBarData, GetFooBarResponses, GetFooData, GetFooResponses } from './types.gen';\n\nexport type Options<TData extends TDataShape = TDataShape, ThrowOnError extends boolean = boolean> = Options2<TData, ThrowOnError> & {\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\nclass HeyApiClient {\n    protected client: Client;\n    \n    constructor(args?: {\n        client?: Client;\n    }) {\n        this.client = args?.client ?? client;\n    }\n}\n\nclass HeyApiRegistry<T> {\n    private readonly defaultKey = 'default';\n    \n    private readonly instances: Map<string, T> = new Map();\n    \n    get(key?: string): T {\n        const instance = this.instances.get(key ?? this.defaultKey);\n        if (!instance) {\n            throw new Error(`No SDK client found. Create one with \"new Sdk()\" to fix this error.`);\n        }\n        return instance;\n    }\n    \n    set(value: T, key?: string): void {\n        this.instances.set(key ?? this.defaultKey, value);\n    }\n}\n\nexport class Bar extends HeyApiClient {\n    public post<ThrowOnError extends boolean = false>(options?: Options<FooBarPostData, ThrowOnError>) {\n        return (options?.client ?? this.client).post<FooBarPostResponses, unknown, ThrowOnError>({ url: '/foo/bar', ...options });\n    }\n    \n    public put<ThrowOnError extends boolean = false>(options?: Options<FooBarPutData, ThrowOnError>) {\n        return (options?.client ?? this.client).put<FooBarPutResponses, unknown, ThrowOnError>({ url: '/foo/bar', ...options });\n    }\n}\n\nexport class Foo extends HeyApiClient {\n    public post<ThrowOnError extends boolean = false>(options?: Options<FooPostData, ThrowOnError>) {\n        return (options?.client ?? this.client).post<FooPostResponses, unknown, ThrowOnError>({ url: '/foo', ...options });\n    }\n    \n    public put<ThrowOnError extends boolean = false>(options?: Options<FooPutData, ThrowOnError>) {\n        return (options?.client ?? this.client).put<FooPutResponses, unknown, ThrowOnError>({ url: '/foo', ...options });\n    }\n    \n    private _bar?: Bar;\n    get bar(): Bar {\n        return this._bar ??= new Bar({ client: this.client });\n    }\n}\n\nexport class Sdk extends HeyApiClient {\n    public static readonly __registry = new HeyApiRegistry<Sdk>();\n    \n    constructor(args?: {\n        client?: Client;\n        key?: string;\n    }) {\n        super(args);\n        Sdk.__registry.set(this, args?.key);\n    }\n    \n    public getFoo<ThrowOnError extends boolean = false>(options?: Options<GetFooData, ThrowOnError>) {\n        return (options?.client ?? this.client).get<GetFooResponses, unknown, ThrowOnError>({ url: '/foo', ...options });\n    }\n    \n    public getFooBar<ThrowOnError extends boolean = false>(options?: Options<GetFooBarData, ThrowOnError>) {\n        return (options?.client ?? this.client).get<GetFooBarResponses, unknown, ThrowOnError>({ url: '/foo/bar', ...options });\n    }\n    \n    private _foo?: Foo;\n    get foo(): Foo {\n        return this._foo ??= new Foo({ client: this.client });\n    }\n}\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@hey-api/sdk/instance/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type ClientOptions = {\n    baseUrl: `${string}://${string}` | (string & {});\n};\n\nexport type GetFooData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/foo';\n};\n\nexport type GetFooResponses = {\n    /**\n     * OK\n     */\n    200: string;\n};\n\nexport type GetFooResponse = GetFooResponses[keyof GetFooResponses];\n\nexport type FooPostData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/foo';\n};\n\nexport type FooPostResponses = {\n    /**\n     * OK\n     */\n    200: string;\n};\n\nexport type FooPostResponse = FooPostResponses[keyof FooPostResponses];\n\nexport type FooPutData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/foo';\n};\n\nexport type FooPutResponses = {\n    /**\n     * OK\n     */\n    200: string;\n};\n\nexport type FooPutResponse = FooPutResponses[keyof FooPutResponses];\n\nexport type GetFooBarData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/foo/bar';\n};\n\nexport type GetFooBarResponses = {\n    /**\n     * OK\n     */\n    200: string;\n};\n\nexport type GetFooBarResponse = GetFooBarResponses[keyof GetFooBarResponses];\n\nexport type FooBarPostData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/foo/bar';\n};\n\nexport type FooBarPostResponses = {\n    /**\n     * OK\n     */\n    200: string;\n};\n\nexport type FooBarPostResponse = FooBarPostResponses[keyof FooBarPostResponses];\n\nexport type FooBarPutData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/foo/bar';\n};\n\nexport type FooBarPutResponses = {\n    /**\n     * OK\n     */\n    200: string;\n};\n\nexport type FooBarPutResponse = FooBarPutResponses[keyof FooBarPutResponses];\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@hey-api/sdk/throwOnError/client/client.gen.ts",
    "content": "// 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 (options: RequestOptions) => {\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 url = buildUrl(opts);\n\n    return { opts, url };\n  };\n\n  const request: Client['request'] = async (options) => {\n    // @ts-expect-error\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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@hey-api/sdk/throwOnError/client/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type { Auth } from '../core/auth.gen';\nexport type { QuerySerializerOptions } from '../core/bodySerializer.gen';\nexport {\n  formDataBodySerializer,\n  jsonBodySerializer,\n  urlSearchParamsBodySerializer,\n} from '../core/bodySerializer.gen';\nexport { buildClientParams } from '../core/params.gen';\nexport { serializeQueryKeyValue } from '../core/queryKeySerializer.gen';\nexport { createClient } from './client.gen';\nexport type {\n  Client,\n  ClientOptions,\n  Config,\n  CreateClientConfig,\n  Options,\n  RequestOptions,\n  RequestResult,\n  ResolvedRequestOptions,\n  ResponseStyle,\n  TDataShape,\n} from './types.gen';\nexport { createConfig, mergeHeaders } from './utils.gen';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@hey-api/sdk/throwOnError/client/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { Auth } from '../core/auth.gen';\nimport type {\n  ServerSentEventsOptions,\n  ServerSentEventsResult,\n} from '../core/serverSentEvents.gen';\nimport type { Client as CoreClient, Config as CoreConfig } from '../core/types.gen';\nimport type { Middleware } from './utils.gen';\n\nexport type ResponseStyle = 'data' | 'fields';\n\nexport interface Config<T extends ClientOptions = ClientOptions>\n  extends Omit<RequestInit, 'body' | 'headers' | 'method'>, CoreConfig {\n  /**\n   * Base URL for all requests made by this client.\n   */\n  baseUrl?: T['baseUrl'];\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   * Please don't use the Fetch client for Next.js applications. The `next`\n   * options won't have any effect.\n   *\n   * Install {@link https://www.npmjs.com/package/@hey-api/client-next `@hey-api/client-next`} instead.\n   */\n  next?: never;\n  /**\n   * Return the response data parsed in a specified format. By default, `auto`\n   * will infer the appropriate method from the `Content-Type` response header.\n   * You can override this behavior with any of the {@link Body} methods.\n   * Select `stream` if you don't want to parse response data at all.\n   *\n   * @default 'auto'\n   */\n  parseAs?: 'arrayBuffer' | 'auto' | 'blob' | 'formData' | 'json' | 'stream' | 'text';\n  /**\n   * Should we return only data or multiple fields (data, error, response, etc.)?\n   *\n   * @default 'fields'\n   */\n  responseStyle?: ResponseStyle;\n  /**\n   * Throw an error instead of returning it in the response?\n   *\n   * @default false\n   */\n  throwOnError?: T['throwOnError'];\n}\n\nexport interface RequestOptions<\n  TData = unknown,\n  TResponseStyle extends ResponseStyle = 'fields',\n  ThrowOnError extends boolean = boolean,\n  Url extends string = string,\n>\n  extends\n    Config<{\n      responseStyle: TResponseStyle;\n      throwOnError: ThrowOnError;\n    }>,\n    Pick<\n      ServerSentEventsOptions<TData>,\n      | 'onRequest'\n      | 'onSseError'\n      | 'onSseEvent'\n      | 'sseDefaultRetryDelay'\n      | 'sseMaxRetryAttempts'\n      | 'sseMaxRetryDelay'\n    > {\n  /**\n   * Any body that you want to add to your request.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/fetch#body}\n   */\n  body?: unknown;\n  path?: Record<string, unknown>;\n  query?: Record<string, unknown>;\n  /**\n   * Security mechanism(s) to use for the request.\n   */\n  security?: ReadonlyArray<Auth>;\n  url: Url;\n}\n\nexport interface ResolvedRequestOptions<\n  TResponseStyle extends ResponseStyle = 'fields',\n  ThrowOnError extends boolean = boolean,\n  Url extends string = string,\n> extends RequestOptions<unknown, TResponseStyle, ThrowOnError, Url> {\n  serializedBody?: string;\n}\n\nexport type RequestResult<\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = boolean,\n  TResponseStyle extends ResponseStyle = 'fields',\n> = ThrowOnError extends true\n  ? Promise<\n      TResponseStyle extends 'data'\n        ? TData extends Record<string, unknown>\n          ? TData[keyof TData]\n          : TData\n        : {\n            data: TData extends Record<string, unknown> ? TData[keyof TData] : TData;\n            request: Request;\n            response: Response;\n          }\n    >\n  : Promise<\n      TResponseStyle extends 'data'\n        ? (TData extends Record<string, unknown> ? TData[keyof TData] : TData) | undefined\n        : (\n            | {\n                data: TData extends Record<string, unknown> ? TData[keyof TData] : TData;\n                error: undefined;\n              }\n            | {\n                data: undefined;\n                error: TError extends Record<string, unknown> ? TError[keyof TError] : TError;\n              }\n          ) & {\n            request: Request;\n            response: Response;\n          }\n    >;\n\nexport interface ClientOptions {\n  baseUrl?: string;\n  responseStyle?: ResponseStyle;\n  throwOnError?: boolean;\n}\n\ntype MethodFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'>,\n) => RequestResult<TData, TError, ThrowOnError, TResponseStyle>;\n\ntype SseFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'>,\n) => Promise<ServerSentEventsResult<TData, TError>>;\n\ntype RequestFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'> &\n    Pick<Required<RequestOptions<TData, TResponseStyle, ThrowOnError>>, 'method'>,\n) => RequestResult<TData, TError, ThrowOnError, TResponseStyle>;\n\ntype BuildUrlFn = <\n  TData extends {\n    body?: unknown;\n    path?: Record<string, unknown>;\n    query?: Record<string, unknown>;\n    url: string;\n  },\n>(\n  options: TData & Options<TData>,\n) => string;\n\nexport type Client = CoreClient<RequestFn, Config, MethodFn, BuildUrlFn, SseFn> & {\n  interceptors: Middleware<Request, Response, unknown, ResolvedRequestOptions>;\n};\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 = ClientOptions> = (\n  override?: Config<ClientOptions & T>,\n) => Config<Required<ClientOptions> & T>;\n\nexport interface TDataShape {\n  body?: unknown;\n  headers?: unknown;\n  path?: unknown;\n  query?: unknown;\n  url: string;\n}\n\ntype OmitKeys<T, K> = Pick<T, Exclude<keyof T, K>>;\n\nexport type Options<\n  TData extends TDataShape = TDataShape,\n  ThrowOnError extends boolean = boolean,\n  TResponse = unknown,\n  TResponseStyle extends ResponseStyle = 'fields',\n> = OmitKeys<\n  RequestOptions<TResponse, TResponseStyle, ThrowOnError>,\n  'body' | 'path' | 'query' | 'url'\n> &\n  ([TData] extends [never] ? unknown : Omit<TData, 'url'>);\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@hey-api/sdk/throwOnError/client/utils.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@hey-api/sdk/throwOnError/client.gen.ts",
    "content": "// 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: 'http://localhost:3000/base', throwOnError: true }));\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@hey-api/sdk/throwOnError/core/auth.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@hey-api/sdk/throwOnError/core/bodySerializer.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@hey-api/sdk/throwOnError/core/params.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@hey-api/sdk/throwOnError/core/pathSerializer.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@hey-api/sdk/throwOnError/core/queryKeySerializer.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\n/**\n * JSON-friendly union that mirrors what Pinia Colada can hash.\n */\nexport type JsonValue =\n  | null\n  | string\n  | number\n  | boolean\n  | JsonValue[]\n  | { [key: string]: JsonValue };\n\n/**\n * Replacer that converts non-JSON values (bigint, Date, etc.) to safe substitutes.\n */\nexport const queryKeyJsonReplacer = (_key: string, value: unknown) => {\n  if (value === undefined || typeof value === 'function' || typeof value === 'symbol') {\n    return undefined;\n  }\n  if (typeof value === 'bigint') {\n    return value.toString();\n  }\n  if (value instanceof Date) {\n    return value.toISOString();\n  }\n  return value;\n};\n\n/**\n * Safely stringifies a value and parses it back into a JsonValue.\n */\nexport const stringifyToJsonValue = (input: unknown): JsonValue | undefined => {\n  try {\n    const json = JSON.stringify(input, queryKeyJsonReplacer);\n    if (json === undefined) {\n      return undefined;\n    }\n    return JSON.parse(json) as JsonValue;\n  } catch {\n    return undefined;\n  }\n};\n\n/**\n * Detects plain objects (including objects with a null prototype).\n */\nconst isPlainObject = (value: unknown): value is Record<string, unknown> => {\n  if (value === null || typeof value !== 'object') {\n    return false;\n  }\n  const prototype = Object.getPrototypeOf(value as object);\n  return prototype === Object.prototype || prototype === null;\n};\n\n/**\n * Turns URLSearchParams into a sorted JSON object for deterministic keys.\n */\nconst serializeSearchParams = (params: URLSearchParams): JsonValue => {\n  const entries = Array.from(params.entries()).sort(([a], [b]) => a.localeCompare(b));\n  const result: Record<string, JsonValue> = {};\n\n  for (const [key, value] of entries) {\n    const existing = result[key];\n    if (existing === undefined) {\n      result[key] = value;\n      continue;\n    }\n\n    if (Array.isArray(existing)) {\n      (existing as string[]).push(value);\n    } else {\n      result[key] = [existing, value];\n    }\n  }\n\n  return result;\n};\n\n/**\n * Normalizes any accepted value into a JSON-friendly shape for query keys.\n */\nexport const serializeQueryKeyValue = (value: unknown): JsonValue | undefined => {\n  if (value === null) {\n    return null;\n  }\n\n  if (typeof value === 'string' || typeof value === 'number' || typeof value === 'boolean') {\n    return value;\n  }\n\n  if (value === undefined || typeof value === 'function' || typeof value === 'symbol') {\n    return undefined;\n  }\n\n  if (typeof value === 'bigint') {\n    return value.toString();\n  }\n\n  if (value instanceof Date) {\n    return value.toISOString();\n  }\n\n  if (Array.isArray(value)) {\n    return stringifyToJsonValue(value);\n  }\n\n  if (typeof URLSearchParams !== 'undefined' && value instanceof URLSearchParams) {\n    return serializeSearchParams(value);\n  }\n\n  if (isPlainObject(value)) {\n    return stringifyToJsonValue(value);\n  }\n\n  return undefined;\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@hey-api/sdk/throwOnError/core/serverSentEvents.gen.ts",
    "content": "// 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 const 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            // Normalize line endings: CRLF -> LF, then CR -> LF\n            buffer = buffer.replace(/\\r\\n/g, '\\n').replace(/\\r/g, '\\n');\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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@hey-api/sdk/throwOnError/core/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { Auth, AuthToken } from './auth.gen';\nimport type { BodySerializer, QuerySerializer, QuerySerializerOptions } from './bodySerializer.gen';\n\nexport type HttpMethod =\n  | 'connect'\n  | 'delete'\n  | 'get'\n  | 'head'\n  | 'options'\n  | 'patch'\n  | 'post'\n  | 'put'\n  | 'trace';\n\nexport type Client<\n  RequestFn = never,\n  Config = unknown,\n  MethodFn = never,\n  BuildUrlFn = never,\n  SseFn = never,\n> = {\n  /**\n   * Returns the final request URL.\n   */\n  buildUrl: BuildUrlFn;\n  getConfig: () => Config;\n  request: RequestFn;\n  setConfig: (config: Config) => Config;\n} & {\n  [K in HttpMethod]: MethodFn;\n} & ([SseFn] extends [never] ? { sse?: never } : { sse: { [K in HttpMethod]: SseFn } });\n\nexport interface Config {\n  /**\n   * Auth token or a function returning auth token. The resolved value will be\n   * added to the request payload as defined by its `security` array.\n   */\n  auth?: ((auth: Auth) => Promise<AuthToken> | AuthToken) | AuthToken;\n  /**\n   * A function for serializing request body parameter. By default,\n   * {@link JSON.stringify()} will be used.\n   */\n  bodySerializer?: BodySerializer | null;\n  /**\n   * An object containing any HTTP headers that you want to pre-populate your\n   * `Headers` object with.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/Headers/Headers#init See more}\n   */\n  headers?:\n    | RequestInit['headers']\n    | Record<\n        string,\n        string | number | boolean | (string | number | boolean)[] | null | undefined | unknown\n      >;\n  /**\n   * The request method.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/fetch#method See more}\n   */\n  method?: Uppercase<HttpMethod>;\n  /**\n   * A function for serializing request query parameters. By default, arrays\n   * will be exploded in form style, objects will be exploded in deepObject\n   * style, and reserved characters are percent-encoded.\n   *\n   * This method will have no effect if the native `paramsSerializer()` Axios\n   * API function is used.\n   *\n   * {@link https://swagger.io/docs/specification/serialization/#query View examples}\n   */\n  querySerializer?: QuerySerializer | QuerySerializerOptions;\n  /**\n   * A function validating request data. This is useful if you want to ensure\n   * the request conforms to the desired shape, so it can be safely sent to\n   * the server.\n   */\n  requestValidator?: (data: unknown) => Promise<unknown>;\n  /**\n   * A function transforming response data before it's returned. This is useful\n   * for post-processing data, e.g. converting ISO strings into Date objects.\n   */\n  responseTransformer?: (data: unknown) => Promise<unknown>;\n  /**\n   * A function validating response data. This is useful if you want to ensure\n   * the response conforms to the desired shape, so it can be safely passed to\n   * the transformers and returned to the user.\n   */\n  responseValidator?: (data: unknown) => Promise<unknown>;\n}\n\ntype IsExactlyNeverOrNeverUndefined<T> = [T] extends [never]\n  ? true\n  : [T] extends [never | undefined]\n    ? [undefined] extends [T]\n      ? false\n      : true\n    : false;\n\nexport type OmitNever<T extends Record<string, unknown>> = {\n  [K in keyof T as IsExactlyNeverOrNeverUndefined<T[K]> extends true ? never : K]: T[K];\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@hey-api/sdk/throwOnError/core/utils.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@hey-api/sdk/throwOnError/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport { apiVVersionODataControllerCount, callToTestOrderOfParams, callWithDefaultOptionalParameters, callWithDefaultParameters, callWithDescriptions, callWithDuplicateResponses, callWithNoContentResponse, callWithParameters, callWithResponse, callWithResponseAndNoContentResponse, callWithResponses, callWithResultFromHeader, callWithWeirdParameterNames, collectionFormat, complexParams, complexTypes, deleteCallWithoutParametersAndResponse, deleteFoo, deprecatedCall, dummyA, dummyB, duplicateName, duplicateName2, duplicateName3, duplicateName4, export_, fileResponse, fooWow, getApiVbyApiVersionSimpleOperation, getCallWithOptionalParam, getCallWithoutParametersAndResponse, headCallWithoutParametersAndResponse, import_, multipartRequest, multipartResponse, nonAsciiæøåÆøÅöôêÊ字符串, type Options, optionsCallWithoutParametersAndResponse, patchApiVbyApiVersionNoTag, patchCallWithoutParametersAndResponse, postApiVbyApiVersionFormData, postApiVbyApiVersionRequestBody, postCallWithOptionalParam, postCallWithoutParametersAndResponse, putCallWithoutParametersAndResponse, putWithFormUrlEncoded, testErrorCode, types, uploadFile } from './sdk.gen';\nexport type { _3eNum1Период, _400, AdditionalPropertiesIntegerIssue, AdditionalPropertiesUnknownIssue, AdditionalPropertiesUnknownIssue2, AdditionalPropertiesUnknownIssue3, AdditionalPropertiesUnknownIssueWritable, AnyOfAnyAndNull, AnyOfArrays, ApiVVersionODataControllerCountData, ApiVVersionODataControllerCountResponse, ApiVVersionODataControllerCountResponses, ArrayWithAnyOfProperties, ArrayWithArray, ArrayWithBooleans, ArrayWithNumbers, ArrayWithProperties, ArrayWithReferences, ArrayWithStrings, CallToTestOrderOfParamsData, CallWithDefaultOptionalParametersData, CallWithDefaultParametersData, CallWithDescriptionsData, CallWithDuplicateResponsesData, CallWithDuplicateResponsesError, CallWithDuplicateResponsesErrors, CallWithDuplicateResponsesResponse, CallWithDuplicateResponsesResponses, CallWithNoContentResponseData, CallWithNoContentResponseResponse, CallWithNoContentResponseResponses, CallWithParametersData, CallWithResponseAndNoContentResponseData, CallWithResponseAndNoContentResponseResponse, CallWithResponseAndNoContentResponseResponses, CallWithResponseData, CallWithResponseResponse, CallWithResponseResponses, CallWithResponsesData, CallWithResponsesError, CallWithResponsesErrors, CallWithResponsesResponse, CallWithResponsesResponses, CallWithResultFromHeaderData, CallWithResultFromHeaderErrors, CallWithResultFromHeaderResponses, CallWithWeirdParameterNamesData, CamelCaseCommentWithBreaks, CharactersInDescription, ClientOptions, CollectionFormatData, CommentWithBackticks, CommentWithBackticksAndQuotes, CommentWithBreaks, CommentWithExpressionPlaceholders, CommentWithQuotes, CommentWithReservedCharacters, CommentWithSlashes, ComplexParamsData, ComplexParamsResponse, ComplexParamsResponses, ComplexTypesData, ComplexTypesErrors, ComplexTypesResponse, ComplexTypesResponses, CompositionBaseModel, CompositionExtendedModel, CompositionWithAllOfAndNullable, CompositionWithAnyOf, CompositionWithAnyOfAndNullable, CompositionWithAnyOfAnonymous, CompositionWithNestedAnyAndTypeNull, CompositionWithNestedAnyOfAndNull, CompositionWithOneOf, CompositionWithOneOfAndComplexArrayDictionary, CompositionWithOneOfAndNullable, CompositionWithOneOfAndProperties, CompositionWithOneOfAndSimpleArrayDictionary, CompositionWithOneOfAndSimpleDictionary, CompositionWithOneOfAnonymous, CompositionWithOneOfDiscriminator, ConstValue, Default, DeleteCallWithoutParametersAndResponseData, DeleteFooData, DeleteFooData2, DeleteFooData3, DeprecatedCallData, DeprecatedModel, DictionaryWithArray, DictionaryWithDictionary, DictionaryWithProperties, DictionaryWithPropertiesAndAdditionalProperties, DictionaryWithReference, DictionaryWithString, DummyAData, DummyAResponse, DummyAResponses, DummyBData, DummyBResponse, DummyBResponses, DuplicateName2Data, DuplicateName3Data, DuplicateName4Data, DuplicateNameData, EnumFromDescription, EnumWithExtensions, EnumWithNumbers, EnumWithReplacedCharacters, EnumWithStrings, EnumWithXEnumNames, ExportData, ExternalRefA, ExternalRefB, ExternalSharedModel, File, FileResponseData, FileResponseResponse, FileResponseResponses, FileWritable, FooWowData, FooWowResponses, FreeFormObjectWithAdditionalPropertiesEqEmptyObject, FreeFormObjectWithAdditionalPropertiesEqTrue, FreeFormObjectWithoutAdditionalProperties, GenericSchemaDuplicateIssue1SystemBoolean, GenericSchemaDuplicateIssue1SystemBooleanWritable, GenericSchemaDuplicateIssue1SystemString, GenericSchemaDuplicateIssue1SystemStringWritable, GetApiVbyApiVersionSimpleOperationData, GetApiVbyApiVersionSimpleOperationError, GetApiVbyApiVersionSimpleOperationErrors, GetApiVbyApiVersionSimpleOperationResponse, GetApiVbyApiVersionSimpleOperationResponses, GetCallWithOptionalParamData, GetCallWithoutParametersAndResponseData, HeadCallWithoutParametersAndResponseData, Import, ImportData, ImportResponse, ImportResponses, IoK8sApimachineryPkgApisMetaV1DeleteOptions, IoK8sApimachineryPkgApisMetaV1Preconditions, ModelCircle, ModelFromZendesk, ModelSquare, ModelThatExtends, ModelThatExtendsExtends, ModelWithAdditionalPropertiesEqTrue, ModelWithAdditionalPropertiesRef, ModelWithAnyOfConstantSizeArray, ModelWithAnyOfConstantSizeArrayAndIntersect, ModelWithAnyOfConstantSizeArrayNullable, ModelWithAnyOfConstantSizeArrayWithNSizeAndOptions, ModelWithAnyOfConstantSizeArrayWithNSizeAndOptionsWritable, ModelWithArray, ModelWithArrayReadOnlyAndWriteOnly, ModelWithArrayReadOnlyAndWriteOnlyWritable, ModelWithBackticksInDescription, ModelWithBoolean, ModelWithCircularReference, ModelWithConst, ModelWithConstantSizeArray, ModelWithDictionary, ModelWithDuplicateImports, ModelWithDuplicateProperties, ModelWithEnum, ModelWithEnumFromDescription, ModelWithEnumWithHyphen, ModelWithInteger, ModelWithNestedArrayEnums, ModelWithNestedArrayEnumsData, ModelWithNestedArrayEnumsDataBar, ModelWithNestedArrayEnumsDataFoo, ModelWithNestedCompositionEnums, ModelWithNestedEnums, ModelWithNestedProperties, ModelWithNullableObject, ModelWithNullableString, ModelWithNumericEnumUnion, ModelWithOneOfAndProperties, ModelWithOneOfEnum, ModelWithOrderedProperties, ModelWithPattern, ModelWithPatternWritable, ModelWithPrefixItemsConstantSizeArray, ModelWithProperties, ModelWithPropertiesWritable, ModelWithReadOnlyAndWriteOnly, ModelWithReadOnlyAndWriteOnlyWritable, ModelWithReference, ModelWithReferenceWritable, ModelWithString, ModelWithStringError, MultipartRequestData, MultipartResponseData, MultipartResponseResponse, MultipartResponseResponses, NestedAnyOfArraysNullable, NonAsciiæøåÆøÅöôêÊ字符串Data, NonAsciiæøåÆøÅöôêÊ字符串Response, NonAsciiæøåÆøÅöôêÊ字符串Responses, NonAsciiStringæøåÆøÅöôêÊ字符串, NullableObject, OneOfAllOfIssue, OneOfAllOfIssueWritable, OptionsCallWithoutParametersAndResponseData, Pageable, ParameterSimpleParameterUnused, PatchApiVbyApiVersionNoTagData, PatchApiVbyApiVersionNoTagResponses, PatchCallWithoutParametersAndResponseData, PostApiVbyApiVersionFormDataData, PostApiVbyApiVersionRequestBodyData, PostCallWithOptionalParamData, PostCallWithOptionalParamResponse, PostCallWithOptionalParamResponses, PostCallWithoutParametersAndResponseData, PostServiceWithEmptyTagResponse, PostServiceWithEmptyTagResponse2, PutCallWithoutParametersAndResponseData, PutWithFormUrlEncodedData, SchemaWithFormRestrictedKeys, SimpleBoolean, SimpleFile, SimpleFormData, SimpleInteger, SimpleParameter, SimpleReference, SimpleRequestBody, SimpleString, SimpleStringWithPattern, TestErrorCodeData, TestErrorCodeErrors, TestErrorCodeResponses, TypesData, TypesResponse, TypesResponses, UploadFileData, UploadFileResponse, UploadFileResponses, XFooBar } from './types.gen';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@hey-api/sdk/throwOnError/sdk.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport { type Client, formDataBodySerializer, type Options as Options2, type TDataShape, urlSearchParamsBodySerializer } from './client';\nimport { client } from './client.gen';\nimport type { ApiVVersionODataControllerCountData, ApiVVersionODataControllerCountResponses, CallToTestOrderOfParamsData, CallWithDefaultOptionalParametersData, CallWithDefaultParametersData, CallWithDescriptionsData, CallWithDuplicateResponsesData, CallWithDuplicateResponsesErrors, CallWithDuplicateResponsesResponses, CallWithNoContentResponseData, CallWithNoContentResponseResponses, CallWithParametersData, CallWithResponseAndNoContentResponseData, CallWithResponseAndNoContentResponseResponses, CallWithResponseData, CallWithResponseResponses, CallWithResponsesData, CallWithResponsesErrors, CallWithResponsesResponses, CallWithResultFromHeaderData, CallWithResultFromHeaderErrors, CallWithResultFromHeaderResponses, CallWithWeirdParameterNamesData, CollectionFormatData, ComplexParamsData, ComplexParamsResponses, ComplexTypesData, ComplexTypesErrors, ComplexTypesResponses, DeleteCallWithoutParametersAndResponseData, DeleteFooData3, DeprecatedCallData, DummyAData, DummyAResponses, DummyBData, DummyBResponses, DuplicateName2Data, DuplicateName3Data, DuplicateName4Data, DuplicateNameData, ExportData, FileResponseData, FileResponseResponses, FooWowData, FooWowResponses, GetApiVbyApiVersionSimpleOperationData, GetApiVbyApiVersionSimpleOperationErrors, GetApiVbyApiVersionSimpleOperationResponses, GetCallWithOptionalParamData, GetCallWithoutParametersAndResponseData, HeadCallWithoutParametersAndResponseData, ImportData, ImportResponses, MultipartRequestData, MultipartResponseData, MultipartResponseResponses, NonAsciiæøåÆøÅöôêÊ字符串Data, NonAsciiæøåÆøÅöôêÊ字符串Responses, OptionsCallWithoutParametersAndResponseData, PatchApiVbyApiVersionNoTagData, PatchApiVbyApiVersionNoTagResponses, PatchCallWithoutParametersAndResponseData, PostApiVbyApiVersionFormDataData, PostApiVbyApiVersionRequestBodyData, PostCallWithOptionalParamData, PostCallWithOptionalParamResponses, PostCallWithoutParametersAndResponseData, PutCallWithoutParametersAndResponseData, PutWithFormUrlEncodedData, TestErrorCodeData, TestErrorCodeErrors, TestErrorCodeResponses, TypesData, TypesResponses, UploadFileData, UploadFileResponses } from './types.gen';\n\nexport type Options<TData extends TDataShape = TDataShape, ThrowOnError extends boolean = boolean> = Options2<TData, ThrowOnError> & {\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\nexport const export_ = <ThrowOnError extends boolean = true>(options?: Options<ExportData, ThrowOnError>) => (options?.client ?? client).get<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/no+tag', ...options });\n\nexport const patchApiVbyApiVersionNoTag = <ThrowOnError extends boolean = true>(options?: Options<PatchApiVbyApiVersionNoTagData, ThrowOnError>) => (options?.client ?? client).patch<PatchApiVbyApiVersionNoTagResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/no+tag', ...options });\n\nexport const import_ = <ThrowOnError extends boolean = true>(options: Options<ImportData, ThrowOnError>) => (options.client ?? client).post<ImportResponses, unknown, ThrowOnError>({\n    url: '/api/v{api-version}/no+tag',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options.headers\n    }\n});\n\nexport const fooWow = <ThrowOnError extends boolean = true>(options?: Options<FooWowData, ThrowOnError>) => (options?.client ?? client).put<FooWowResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/no+tag', ...options });\n\nexport const apiVVersionODataControllerCount = <ThrowOnError extends boolean = true>(options?: Options<ApiVVersionODataControllerCountData, ThrowOnError>) => (options?.client ?? client).get<ApiVVersionODataControllerCountResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple/$count', ...options });\n\nexport const getApiVbyApiVersionSimpleOperation = <ThrowOnError extends boolean = true>(options: Options<GetApiVbyApiVersionSimpleOperationData, ThrowOnError>) => (options.client ?? client).get<GetApiVbyApiVersionSimpleOperationResponses, GetApiVbyApiVersionSimpleOperationErrors, ThrowOnError>({ url: '/api/v{api-version}/simple:operation', ...options });\n\nexport const deleteCallWithoutParametersAndResponse = <ThrowOnError extends boolean = true>(options?: Options<DeleteCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).delete<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const getCallWithoutParametersAndResponse = <ThrowOnError extends boolean = true>(options?: Options<GetCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).get<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const headCallWithoutParametersAndResponse = <ThrowOnError extends boolean = true>(options?: Options<HeadCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).head<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const optionsCallWithoutParametersAndResponse = <ThrowOnError extends boolean = true>(options?: Options<OptionsCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).options<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const patchCallWithoutParametersAndResponse = <ThrowOnError extends boolean = true>(options?: Options<PatchCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).patch<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const postCallWithoutParametersAndResponse = <ThrowOnError extends boolean = true>(options?: Options<PostCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).post<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const putCallWithoutParametersAndResponse = <ThrowOnError extends boolean = true>(options?: Options<PutCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).put<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const deleteFoo = <ThrowOnError extends boolean = true>(options: Options<DeleteFooData3, ThrowOnError>) => (options.client ?? client).delete<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/foo/{foo_param}/bar/{BarParam}', ...options });\n\nexport const callWithDescriptions = <ThrowOnError extends boolean = true>(options?: Options<CallWithDescriptionsData, ThrowOnError>) => (options?.client ?? client).post<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/descriptions', ...options });\n\n/**\n * @deprecated\n */\nexport const deprecatedCall = <ThrowOnError extends boolean = true>(options: Options<DeprecatedCallData, ThrowOnError>) => (options.client ?? client).post<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/parameters/deprecated', ...options });\n\nexport const callWithParameters = <ThrowOnError extends boolean = true>(options: Options<CallWithParametersData, ThrowOnError>) => (options.client ?? client).post<unknown, unknown, ThrowOnError>({\n    url: '/api/v{api-version}/parameters/{parameterPath}',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options.headers\n    }\n});\n\nexport const callWithWeirdParameterNames = <ThrowOnError extends boolean = true>(options: Options<CallWithWeirdParameterNamesData, ThrowOnError>) => (options.client ?? client).post<unknown, unknown, ThrowOnError>({\n    url: '/api/v{api-version}/parameters/{parameter.path.1}/{parameter-path-2}/{PARAMETER-PATH-3}',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options.headers\n    }\n});\n\nexport const getCallWithOptionalParam = <ThrowOnError extends boolean = true>(options: Options<GetCallWithOptionalParamData, ThrowOnError>) => (options.client ?? client).get<unknown, unknown, ThrowOnError>({\n    url: '/api/v{api-version}/parameters',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options.headers\n    }\n});\n\nexport const postCallWithOptionalParam = <ThrowOnError extends boolean = true>(options: Options<PostCallWithOptionalParamData, ThrowOnError>) => (options.client ?? client).post<PostCallWithOptionalParamResponses, unknown, ThrowOnError>({\n    url: '/api/v{api-version}/parameters',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options.headers\n    }\n});\n\nexport const postApiVbyApiVersionRequestBody = <ThrowOnError extends boolean = true>(options?: Options<PostApiVbyApiVersionRequestBodyData, ThrowOnError>) => (options?.client ?? client).post<unknown, unknown, ThrowOnError>({\n    url: '/api/v{api-version}/requestBody',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options?.headers\n    }\n});\n\nexport const postApiVbyApiVersionFormData = <ThrowOnError extends boolean = true>(options?: Options<PostApiVbyApiVersionFormDataData, ThrowOnError>) => (options?.client ?? client).post<unknown, unknown, ThrowOnError>({\n    ...formDataBodySerializer,\n    url: '/api/v{api-version}/formData',\n    ...options,\n    headers: {\n        'Content-Type': null,\n        ...options?.headers\n    }\n});\n\nexport const callWithDefaultParameters = <ThrowOnError extends boolean = true>(options?: Options<CallWithDefaultParametersData, ThrowOnError>) => (options?.client ?? client).get<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/defaults', ...options });\n\nexport const callWithDefaultOptionalParameters = <ThrowOnError extends boolean = true>(options?: Options<CallWithDefaultOptionalParametersData, ThrowOnError>) => (options?.client ?? client).post<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/defaults', ...options });\n\nexport const callToTestOrderOfParams = <ThrowOnError extends boolean = true>(options: Options<CallToTestOrderOfParamsData, ThrowOnError>) => (options.client ?? client).put<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/defaults', ...options });\n\nexport const duplicateName = <ThrowOnError extends boolean = true>(options?: Options<DuplicateNameData, ThrowOnError>) => (options?.client ?? client).delete<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/duplicate', ...options });\n\nexport const duplicateName2 = <ThrowOnError extends boolean = true>(options?: Options<DuplicateName2Data, ThrowOnError>) => (options?.client ?? client).get<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/duplicate', ...options });\n\nexport const duplicateName3 = <ThrowOnError extends boolean = true>(options?: Options<DuplicateName3Data, ThrowOnError>) => (options?.client ?? client).post<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/duplicate', ...options });\n\nexport const duplicateName4 = <ThrowOnError extends boolean = true>(options?: Options<DuplicateName4Data, ThrowOnError>) => (options?.client ?? client).put<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/duplicate', ...options });\n\nexport const callWithNoContentResponse = <ThrowOnError extends boolean = true>(options?: Options<CallWithNoContentResponseData, ThrowOnError>) => (options?.client ?? client).get<CallWithNoContentResponseResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/no-content', ...options });\n\nexport const callWithResponseAndNoContentResponse = <ThrowOnError extends boolean = true>(options?: Options<CallWithResponseAndNoContentResponseData, ThrowOnError>) => (options?.client ?? client).get<CallWithResponseAndNoContentResponseResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/multiple-tags/response-and-no-content', ...options });\n\nexport const dummyA = <ThrowOnError extends boolean = true>(options?: Options<DummyAData, ThrowOnError>) => (options?.client ?? client).get<DummyAResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/multiple-tags/a', ...options });\n\nexport const dummyB = <ThrowOnError extends boolean = true>(options?: Options<DummyBData, ThrowOnError>) => (options?.client ?? client).get<DummyBResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/multiple-tags/b', ...options });\n\nexport const callWithResponse = <ThrowOnError extends boolean = true>(options?: Options<CallWithResponseData, ThrowOnError>) => (options?.client ?? client).get<CallWithResponseResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/response', ...options });\n\nexport const callWithDuplicateResponses = <ThrowOnError extends boolean = true>(options?: Options<CallWithDuplicateResponsesData, ThrowOnError>) => (options?.client ?? client).post<CallWithDuplicateResponsesResponses, CallWithDuplicateResponsesErrors, ThrowOnError>({ url: '/api/v{api-version}/response', ...options });\n\nexport const callWithResponses = <ThrowOnError extends boolean = true>(options?: Options<CallWithResponsesData, ThrowOnError>) => (options?.client ?? client).put<CallWithResponsesResponses, CallWithResponsesErrors, ThrowOnError>({ url: '/api/v{api-version}/response', ...options });\n\nexport const collectionFormat = <ThrowOnError extends boolean = true>(options: Options<CollectionFormatData, ThrowOnError>) => (options.client ?? client).get<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/collectionFormat', ...options });\n\nexport const types = <ThrowOnError extends boolean = true>(options: Options<TypesData, ThrowOnError>) => (options.client ?? client).get<TypesResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/types', ...options });\n\nexport const uploadFile = <ThrowOnError extends boolean = true>(options: Options<UploadFileData, ThrowOnError>) => (options.client ?? client).post<UploadFileResponses, unknown, ThrowOnError>({\n    ...urlSearchParamsBodySerializer,\n    url: '/api/v{api-version}/upload',\n    ...options,\n    headers: {\n        'Content-Type': 'application/x-www-form-urlencoded',\n        ...options.headers\n    }\n});\n\nexport const fileResponse = <ThrowOnError extends boolean = true>(options: Options<FileResponseData, ThrowOnError>) => (options.client ?? client).get<FileResponseResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/file/{id}', ...options });\n\nexport const complexTypes = <ThrowOnError extends boolean = true>(options: Options<ComplexTypesData, ThrowOnError>) => (options.client ?? client).get<ComplexTypesResponses, ComplexTypesErrors, ThrowOnError>({\n    querySerializer: { parameters: { parameterObject: { object: { style: 'form' } } } },\n    url: '/api/v{api-version}/complex',\n    ...options\n});\n\nexport const multipartResponse = <ThrowOnError extends boolean = true>(options?: Options<MultipartResponseData, ThrowOnError>) => (options?.client ?? client).get<MultipartResponseResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/multipart', ...options });\n\nexport const multipartRequest = <ThrowOnError extends boolean = true>(options?: Options<MultipartRequestData, ThrowOnError>) => (options?.client ?? client).post<unknown, unknown, ThrowOnError>({\n    ...formDataBodySerializer,\n    url: '/api/v{api-version}/multipart',\n    ...options,\n    headers: {\n        'Content-Type': null,\n        ...options?.headers\n    }\n});\n\nexport const complexParams = <ThrowOnError extends boolean = true>(options: Options<ComplexParamsData, ThrowOnError>) => (options.client ?? client).put<ComplexParamsResponses, unknown, ThrowOnError>({\n    url: '/api/v{api-version}/complex/{id}',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json-patch+json',\n        ...options.headers\n    }\n});\n\nexport const callWithResultFromHeader = <ThrowOnError extends boolean = true>(options?: Options<CallWithResultFromHeaderData, ThrowOnError>) => (options?.client ?? client).post<CallWithResultFromHeaderResponses, CallWithResultFromHeaderErrors, ThrowOnError>({ url: '/api/v{api-version}/header', ...options });\n\nexport const testErrorCode = <ThrowOnError extends boolean = true>(options: Options<TestErrorCodeData, ThrowOnError>) => (options.client ?? client).post<TestErrorCodeResponses, TestErrorCodeErrors, ThrowOnError>({ url: '/api/v{api-version}/error', ...options });\n\nexport const nonAsciiæøåÆøÅöôêÊ字符串 = <ThrowOnError extends boolean = true>(options: Options<NonAsciiæøåÆøÅöôêÊ字符串Data, ThrowOnError>) => (options.client ?? client).post<NonAsciiæøåÆøÅöôêÊ字符串Responses, unknown, ThrowOnError>({ url: '/api/v{api-version}/non-ascii-æøåÆØÅöôêÊ字符串', ...options });\n\n/**\n * Login User\n */\nexport const putWithFormUrlEncoded = <ThrowOnError extends boolean = true>(options: Options<PutWithFormUrlEncodedData, ThrowOnError>) => (options.client ?? client).put<unknown, unknown, ThrowOnError>({\n    ...urlSearchParamsBodySerializer,\n    url: '/api/v{api-version}/non-ascii-æøåÆØÅöôêÊ字符串',\n    ...options,\n    headers: {\n        'Content-Type': 'application/x-www-form-urlencoded',\n        ...options.headers\n    }\n});\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@hey-api/sdk/throwOnError/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type ClientOptions = {\n    baseUrl: 'http://localhost:3000/base' | (string & {});\n};\n\n/**\n * Model with number-only name\n */\nexport type _400 = string;\n\n/**\n * External ref to shared model (A)\n */\nexport type ExternalRefA = ExternalSharedModel;\n\n/**\n * External ref to shared model (B)\n */\nexport type ExternalRefB = ExternalSharedModel;\n\n/**\n * Testing multiline comments in string: First line\n * Second line\n *\n * Fourth line\n */\nexport type CamelCaseCommentWithBreaks = number;\n\n/**\n * Testing multiline comments in string: First line\n * Second line\n *\n * Fourth line\n */\nexport type CommentWithBreaks = number;\n\n/**\n * Testing backticks in string: `backticks` and ```multiple backticks``` should work\n */\nexport type CommentWithBackticks = number;\n\n/**\n * Testing backticks and quotes in string: `backticks`, 'quotes', \"double quotes\" and ```multiple backticks``` should work\n */\nexport type CommentWithBackticksAndQuotes = number;\n\n/**\n * Testing slashes in string: \\backwards\\\\\\ and /forwards/// should work\n */\nexport type CommentWithSlashes = number;\n\n/**\n * Testing expression placeholders in string: ${expression} should work\n */\nexport type CommentWithExpressionPlaceholders = number;\n\n/**\n * Testing quotes in string: 'single quote''' and \"double quotes\"\"\" should work\n */\nexport type CommentWithQuotes = number;\n\n/**\n * Testing reserved characters in string: * inline * and ** inline ** should work\n */\nexport type CommentWithReservedCharacters = number;\n\n/**\n * This is a simple number\n */\nexport type SimpleInteger = number;\n\n/**\n * This is a simple boolean\n */\nexport type SimpleBoolean = boolean;\n\n/**\n * This is a simple string\n */\nexport type SimpleString = string;\n\n/**\n * A string with non-ascii (unicode) characters valid in typescript identifiers (æøåÆØÅöÔèÈ字符串)\n */\nexport type NonAsciiStringæøåÆøÅöôêÊ字符串 = string;\n\n/**\n * This is a simple file\n */\nexport type SimpleFile = Blob | File;\n\n/**\n * This is a simple reference\n */\nexport type SimpleReference = ModelWithString;\n\n/**\n * This is a simple string\n */\nexport type SimpleStringWithPattern = string | null;\n\n/**\n * This is a simple enum with strings\n */\nexport type EnumWithStrings = 'Success' | 'Warning' | 'Error' | '\\'Single Quote\\'' | '\"Double Quotes\"' | 'Non-ascii: øæåôöØÆÅÔÖ字符串';\n\nexport type EnumWithReplacedCharacters = '\\'Single Quote\\'' | '\"Double Quotes\"' | 'øæåôöØÆÅÔÖ字符串' | 3.1 | '';\n\n/**\n * This is a simple enum with numbers\n */\nexport type EnumWithNumbers = 1 | 2 | 3 | 1.1 | 1.2 | 1.3 | 100 | 200 | 300 | -100 | -200 | -300 | -1.1 | -1.2 | -1.3;\n\n/**\n * Success=1,Warning=2,Error=3\n */\nexport type EnumFromDescription = number;\n\n/**\n * This is a simple enum with numbers\n */\nexport type EnumWithExtensions = 200 | 400 | 500;\n\nexport type EnumWithXEnumNames = 0 | 1 | 2;\n\n/**\n * This is a simple array with numbers\n */\nexport type ArrayWithNumbers = Array<number>;\n\n/**\n * This is a simple array with booleans\n */\nexport type ArrayWithBooleans = Array<boolean>;\n\n/**\n * This is a simple array with strings\n */\nexport type ArrayWithStrings = Array<string>;\n\n/**\n * This is a simple array with references\n */\nexport type ArrayWithReferences = Array<ModelWithString>;\n\n/**\n * This is a simple array containing an array\n */\nexport type ArrayWithArray = Array<Array<ModelWithString>>;\n\n/**\n * This is a simple array with properties\n */\nexport type ArrayWithProperties = Array<{\n    '16x16'?: CamelCaseCommentWithBreaks;\n    bar?: string;\n}>;\n\n/**\n * This is a simple array with any of properties\n */\nexport type ArrayWithAnyOfProperties = Array<{\n    foo?: string;\n} | {\n    bar?: string;\n}>;\n\nexport type AnyOfAnyAndNull = {\n    data?: unknown | null;\n};\n\n/**\n * This is a simple array with any of properties\n */\nexport type AnyOfArrays = {\n    results?: Array<{\n        foo?: string;\n    } | {\n        bar?: string;\n    }>;\n};\n\n/**\n * This is a string dictionary\n */\nexport type DictionaryWithString = {\n    [key: string]: string;\n};\n\nexport type DictionaryWithPropertiesAndAdditionalProperties = {\n    foo?: number;\n    bar?: boolean;\n    [key: string]: string | number | boolean | undefined;\n};\n\n/**\n * This is a string reference\n */\nexport type DictionaryWithReference = {\n    [key: string]: ModelWithString;\n};\n\n/**\n * This is a complex dictionary\n */\nexport type DictionaryWithArray = {\n    [key: string]: Array<ModelWithString>;\n};\n\n/**\n * This is a string dictionary\n */\nexport type DictionaryWithDictionary = {\n    [key: string]: {\n        [key: string]: string;\n    };\n};\n\n/**\n * This is a complex dictionary\n */\nexport type DictionaryWithProperties = {\n    [key: string]: {\n        foo?: string;\n        bar?: string;\n    };\n};\n\n/**\n * This is a model with one number property\n */\nexport type ModelWithInteger = {\n    /**\n     * This is a simple number property\n     */\n    prop?: number;\n};\n\n/**\n * This is a model with one boolean property\n */\nexport type ModelWithBoolean = {\n    /**\n     * This is a simple boolean property\n     */\n    prop?: boolean;\n};\n\n/**\n * This is a model with one string property\n */\nexport type ModelWithString = {\n    /**\n     * This is a simple string property\n     */\n    prop?: string;\n};\n\n/**\n * This is a model with one string property\n */\nexport type ModelWithStringError = {\n    /**\n     * This is a simple string property\n     */\n    prop?: string;\n};\n\n/**\n * `Comment` or `VoiceComment`. The JSON object for adding voice comments to tickets is different. See [Adding voice comments to tickets](/documentation/ticketing/managing-tickets/adding-voice-comments-to-tickets)\n */\nexport type ModelFromZendesk = string;\n\n/**\n * This is a model with one string property\n */\nexport type ModelWithNullableString = {\n    /**\n     * This is a simple string property\n     */\n    nullableProp1?: string | null;\n    /**\n     * This is a simple string property\n     */\n    nullableRequiredProp1: string | null;\n    /**\n     * This is a simple string property\n     */\n    nullableProp2?: string | null;\n    /**\n     * This is a simple string property\n     */\n    nullableRequiredProp2: string | null;\n    /**\n     * This is a simple enum with strings\n     */\n    'foo_bar-enum'?: 'Success' | 'Warning' | 'Error' | 'ØÆÅ字符串';\n};\n\n/**\n * This is a model with one enum\n */\nexport type ModelWithEnum = {\n    /**\n     * This is a simple enum with strings\n     */\n    'foo_bar-enum'?: 'Success' | 'Warning' | 'Error' | 'ØÆÅ字符串';\n    /**\n     * These are the HTTP error code enums\n     */\n    statusCode?: '100' | '200 FOO' | '300 FOO_BAR' | '400 foo-bar' | '500 foo.bar' | '600 foo&bar';\n    /**\n     * Simple boolean enum\n     */\n    bool?: true;\n};\n\n/**\n * This is a model with one enum with escaped name\n */\nexport type ModelWithEnumWithHyphen = {\n    /**\n     * Foo-Bar-Baz-Qux\n     */\n    'foo-bar-baz-qux'?: '3.0';\n};\n\n/**\n * This is a model with one enum\n */\nexport type ModelWithEnumFromDescription = {\n    /**\n     * Success=1,Warning=2,Error=3\n     */\n    test?: number;\n};\n\n/**\n * This is a model with nested enums\n */\nexport type ModelWithNestedEnums = {\n    dictionaryWithEnum?: {\n        [key: string]: 'Success' | 'Warning' | 'Error';\n    };\n    dictionaryWithEnumFromDescription?: {\n        [key: string]: number;\n    };\n    arrayWithEnum?: Array<'Success' | 'Warning' | 'Error'>;\n    arrayWithDescription?: Array<number>;\n    /**\n     * This is a simple enum with strings\n     */\n    'foo_bar-enum'?: 'Success' | 'Warning' | 'Error' | 'ØÆÅ字符串';\n};\n\n/**\n * This is a model with one property containing a reference\n */\nexport type ModelWithReference = {\n    prop?: ModelWithProperties;\n};\n\n/**\n * This is a model with one property containing an array\n */\nexport type ModelWithArrayReadOnlyAndWriteOnly = {\n    prop?: Array<ModelWithReadOnlyAndWriteOnly>;\n    propWithFile?: Array<Blob | File>;\n    propWithNumber?: Array<number>;\n};\n\n/**\n * This is a model with one property containing an array\n */\nexport type ModelWithArray = {\n    prop?: Array<ModelWithString>;\n    propWithFile?: Array<Blob | File>;\n    propWithNumber?: Array<number>;\n};\n\n/**\n * This is a model with one property containing a dictionary\n */\nexport type ModelWithDictionary = {\n    prop?: {\n        [key: string]: string;\n    };\n};\n\n/**\n * This is a deprecated model with a deprecated property\n *\n * @deprecated\n */\nexport type DeprecatedModel = {\n    /**\n     * This is a deprecated property\n     *\n     * @deprecated\n     */\n    prop?: string;\n};\n\n/**\n * This is a model with one property containing a circular reference\n */\nexport type ModelWithCircularReference = {\n    prop?: ModelWithCircularReference;\n};\n\n/**\n * This is a model with one property with a 'one of' relationship\n */\nexport type CompositionWithOneOf = {\n    propA?: ModelWithString | ModelWithEnum | ModelWithArray | ModelWithDictionary;\n};\n\n/**\n * This is a model with one property with a 'one of' relationship where the options are not $ref\n */\nexport type CompositionWithOneOfAnonymous = {\n    propA?: {\n        propA?: string;\n    } | string | number;\n};\n\n/**\n * Circle\n */\nexport type ModelCircle = {\n    kind: string;\n    radius?: number;\n};\n\n/**\n * Square\n */\nexport type ModelSquare = {\n    kind: string;\n    sideLength?: number;\n};\n\n/**\n * This is a model with one property with a 'one of' relationship where the options are not $ref\n */\nexport type CompositionWithOneOfDiscriminator = ({\n    kind: 'circle';\n} & ModelCircle) | ({\n    kind: 'square';\n} & ModelSquare);\n\n/**\n * This is a model with one property with a 'any of' relationship\n */\nexport type CompositionWithAnyOf = {\n    propA?: ModelWithString | ModelWithEnum | ModelWithArray | ModelWithDictionary;\n};\n\n/**\n * This is a model with one property with a 'any of' relationship where the options are not $ref\n */\nexport type CompositionWithAnyOfAnonymous = {\n    propA?: {\n        propA?: string;\n    } | string | number;\n};\n\n/**\n * This is a model with nested 'any of' property with a type null\n */\nexport type CompositionWithNestedAnyAndTypeNull = {\n    propA?: Array<ModelWithDictionary | null> | Array<ModelWithArray | null>;\n};\n\nexport type _3eNum1Период = 'Bird' | 'Dog';\n\nexport type ConstValue = 'ConstValue';\n\n/**\n * This is a model with one property with a 'any of' relationship where the options are not $ref\n */\nexport type CompositionWithNestedAnyOfAndNull = {\n    /**\n     * Scopes\n     */\n    propA?: Array<_3eNum1Период | ConstValue> | null;\n};\n\n/**\n * This is a model with one property with a 'one of' relationship\n */\nexport type CompositionWithOneOfAndNullable = {\n    propA?: {\n        boolean?: boolean;\n    } | ModelWithEnum | ModelWithArray | ModelWithDictionary | null;\n};\n\n/**\n * This is a model that contains a simple dictionary within composition\n */\nexport type CompositionWithOneOfAndSimpleDictionary = {\n    propA?: boolean | {\n        [key: string]: number;\n    };\n};\n\n/**\n * This is a model that contains a dictionary of simple arrays within composition\n */\nexport type CompositionWithOneOfAndSimpleArrayDictionary = {\n    propA?: boolean | {\n        [key: string]: Array<boolean>;\n    };\n};\n\n/**\n * This is a model that contains a dictionary of complex arrays (composited) within composition\n */\nexport type CompositionWithOneOfAndComplexArrayDictionary = {\n    propA?: boolean | {\n        [key: string]: Array<number | string>;\n    };\n};\n\n/**\n * This is a model with one property with a 'all of' relationship\n */\nexport type CompositionWithAllOfAndNullable = {\n    propA?: ({\n        boolean?: boolean;\n    } & ModelWithEnum & ModelWithArray & ModelWithDictionary) | null;\n};\n\n/**\n * This is a model with one property with a 'any of' relationship\n */\nexport type CompositionWithAnyOfAndNullable = {\n    propA?: {\n        boolean?: boolean;\n    } | ModelWithEnum | ModelWithArray | ModelWithDictionary | null;\n};\n\n/**\n * This is a base model with two simple optional properties\n */\nexport type CompositionBaseModel = {\n    firstName?: string;\n    lastname?: string;\n};\n\n/**\n * This is a model that extends the base model\n */\nexport type CompositionExtendedModel = CompositionBaseModel & {\n    age: number;\n    firstName: string;\n    lastname: string;\n};\n\n/**\n * This is a model with one nested property\n */\nexport type ModelWithProperties = {\n    required: string;\n    readonly requiredAndReadOnly: string;\n    requiredAndNullable: string | null;\n    string?: string;\n    number?: number;\n    boolean?: boolean;\n    reference?: ModelWithString;\n    'property with space'?: string;\n    default?: string;\n    try?: string;\n    readonly '@namespace.string'?: string;\n    readonly '@namespace.integer'?: number;\n};\n\n/**\n * This is a model with one nested property\n */\nexport type ModelWithNestedProperties = {\n    readonly first: {\n        readonly second: {\n            readonly third: string | null;\n        } | null;\n    } | null;\n};\n\n/**\n * This is a model with duplicated properties\n */\nexport type ModelWithDuplicateProperties = {\n    prop?: ModelWithString;\n};\n\n/**\n * This is a model with ordered properties\n */\nexport type ModelWithOrderedProperties = {\n    zebra?: string;\n    apple?: string;\n    hawaii?: string;\n};\n\n/**\n * This is a model with duplicated imports\n */\nexport type ModelWithDuplicateImports = {\n    propA?: ModelWithString;\n    propB?: ModelWithString;\n    propC?: ModelWithString;\n};\n\n/**\n * This is a model that extends another model\n */\nexport type ModelThatExtends = ModelWithString & {\n    propExtendsA?: string;\n    propExtendsB?: ModelWithString;\n};\n\n/**\n * This is a model that extends another model\n */\nexport type ModelThatExtendsExtends = ModelWithString & ModelThatExtends & {\n    propExtendsC?: string;\n    propExtendsD?: ModelWithString;\n};\n\n/**\n * This is a model that contains a some patterns\n */\nexport type ModelWithPattern = {\n    key: string;\n    name: string;\n    readonly enabled?: boolean;\n    readonly modified?: string;\n    id?: string;\n    text?: string;\n    patternWithSingleQuotes?: string;\n    patternWithNewline?: string;\n    patternWithBacktick?: string;\n    patternWithUnicode?: string;\n};\n\nexport type File = {\n    /**\n     * Id\n     */\n    readonly id?: string;\n    /**\n     * Updated at\n     */\n    readonly updated_at?: string;\n    /**\n     * Created at\n     */\n    readonly created_at?: string;\n    /**\n     * Mime\n     */\n    mime: string;\n    /**\n     * File\n     */\n    readonly file?: string;\n};\n\nexport type Default = {\n    name?: string;\n};\n\nexport type Pageable = {\n    page?: number;\n    size?: number;\n    sort?: Array<string>;\n};\n\n/**\n * This is a free-form object without additionalProperties.\n */\nexport type FreeFormObjectWithoutAdditionalProperties = {\n    [key: string]: unknown;\n};\n\n/**\n * This is a free-form object with additionalProperties: true.\n */\nexport type FreeFormObjectWithAdditionalPropertiesEqTrue = {\n    [key: string]: unknown;\n};\n\n/**\n * This is a free-form object with additionalProperties: {}.\n */\nexport type FreeFormObjectWithAdditionalPropertiesEqEmptyObject = {\n    [key: string]: unknown;\n};\n\nexport type ModelWithConst = {\n    String?: 'String';\n    number?: 0;\n    null?: null;\n    withType?: 'Some string';\n};\n\n/**\n * This is a model with one property and additionalProperties: true\n */\nexport type ModelWithAdditionalPropertiesEqTrue = {\n    /**\n     * This is a simple string property\n     */\n    prop?: string;\n    [key: string]: unknown;\n};\n\nexport type NestedAnyOfArraysNullable = {\n    nullableArray?: Array<string | boolean> | null;\n};\n\nexport type CompositionWithOneOfAndProperties = ({\n    foo: SimpleParameter;\n} | {\n    bar: NonAsciiStringæøåÆøÅöôêÊ字符串;\n}) & {\n    baz: number | null;\n    qux: number;\n};\n\n/**\n * An object that can be null\n */\nexport type NullableObject = {\n    foo?: string;\n} | null;\n\n/**\n * Some % character\n */\nexport type CharactersInDescription = string;\n\nexport type ModelWithNullableObject = {\n    data?: NullableObject;\n};\n\n/**\n * An object with additional properties that can be null (anyOf ref + null)\n */\nexport type ModelWithAdditionalPropertiesRef = {\n    [key: string]: NullableObject | null;\n};\n\nexport type ModelWithOneOfEnum = {\n    foo: 'Bar';\n} | {\n    foo: 'Baz';\n} | {\n    foo: 'Qux';\n} | {\n    content: string;\n    foo: 'Quux';\n} | {\n    content: [\n        string,\n        string\n    ];\n    foo: 'Corge';\n};\n\nexport type ModelWithNestedArrayEnumsDataFoo = 'foo' | 'bar';\n\nexport type ModelWithNestedArrayEnumsDataBar = 'baz' | 'qux';\n\nexport type ModelWithNestedArrayEnumsData = {\n    foo?: Array<ModelWithNestedArrayEnumsDataFoo>;\n    bar?: Array<ModelWithNestedArrayEnumsDataBar>;\n};\n\nexport type ModelWithNestedArrayEnums = {\n    array_strings?: Array<string>;\n    data?: ModelWithNestedArrayEnumsData;\n};\n\nexport type ModelWithNestedCompositionEnums = {\n    foo?: ModelWithNestedArrayEnumsDataFoo;\n};\n\nexport type ModelWithReadOnlyAndWriteOnly = {\n    foo: string;\n    readonly bar: string;\n};\n\nexport type ModelWithConstantSizeArray = [\n    number,\n    number\n];\n\nexport type ModelWithAnyOfConstantSizeArray = [\n    number | string,\n    number | string,\n    number | string\n];\n\nexport type ModelWithPrefixItemsConstantSizeArray = [\n    ModelWithInteger,\n    number | string,\n    string\n];\n\nexport type ModelWithAnyOfConstantSizeArrayNullable = [\n    number | null | string,\n    number | null | string,\n    number | null | string\n];\n\nexport type ModelWithAnyOfConstantSizeArrayWithNSizeAndOptions = [\n    number | Import,\n    number | Import\n];\n\nexport type ModelWithAnyOfConstantSizeArrayAndIntersect = [\n    number & string,\n    number & string\n];\n\nexport type ModelWithNumericEnumUnion = {\n    /**\n     * Период\n     */\n    value?: -10 | -1 | 0 | 1 | 3 | 6 | 12;\n};\n\n/**\n * Some description with `back ticks`\n */\nexport type ModelWithBackticksInDescription = {\n    /**\n     * The template `that` should be used for parsing and importing the contents of the CSV file.\n     *\n     * <br/><p>There is one placeholder currently supported:<ul>     <li><b>${x}</b> - refers to the n-th column in the CSV file, e.g. ${1}, ${2}, ...)</li></ul><p>Example of a correct JSON template:</p>\n     * <pre>\n     * [\n     * {\n     * \"resourceType\": \"Asset\",\n     * \"identifier\": {\n     * \"name\": \"${1}\",\n     * \"domain\": {\n     * \"name\": \"${2}\",\n     * \"community\": {\n     * \"name\": \"Some Community\"\n     * }\n     * }\n     * },\n     * \"attributes\" : {\n     * \"00000000-0000-0000-0000-000000003115\" : [ {\n     * \"value\" : \"${3}\"\n     * } ],\n     * \"00000000-0000-0000-0000-000000000222\" : [ {\n     * \"value\" : \"${4}\"\n     * } ]\n     * }\n     * }\n     * ]\n     * </pre>\n     */\n    template?: string;\n};\n\nexport type ModelWithOneOfAndProperties = (SimpleParameter | NonAsciiStringæøåÆøÅöôêÊ字符串) & {\n    baz: number | null;\n    qux: number;\n};\n\n/**\n * Model used to test deduplication strategy (unused)\n */\nexport type ParameterSimpleParameterUnused = string;\n\n/**\n * Model used to test deduplication strategy\n */\nexport type PostServiceWithEmptyTagResponse = string;\n\n/**\n * Model used to test deduplication strategy\n */\nexport type PostServiceWithEmptyTagResponse2 = string;\n\n/**\n * Model used to test deduplication strategy\n */\nexport type DeleteFooData = string;\n\n/**\n * Model used to test deduplication strategy\n */\nexport type DeleteFooData2 = string;\n\n/**\n * Model with restricted keyword name\n */\nexport type Import = string;\n\nexport type SchemaWithFormRestrictedKeys = {\n    description?: string;\n    'x-enum-descriptions'?: string;\n    'x-enum-varnames'?: string;\n    'x-enumNames'?: string;\n    title?: string;\n    object?: {\n        description?: string;\n        'x-enum-descriptions'?: string;\n        'x-enum-varnames'?: string;\n        'x-enumNames'?: string;\n        title?: string;\n    };\n    array?: Array<{\n        description?: string;\n        'x-enum-descriptions'?: string;\n        'x-enum-varnames'?: string;\n        'x-enumNames'?: string;\n        title?: string;\n    }>;\n};\n\n/**\n * This schema was giving PascalCase transformations a hard time\n */\nexport type IoK8sApimachineryPkgApisMetaV1DeleteOptions = {\n    /**\n     * Must be fulfilled before a deletion is carried out. If not possible, a 409 Conflict status will be returned.\n     */\n    preconditions?: IoK8sApimachineryPkgApisMetaV1Preconditions;\n};\n\n/**\n * This schema was giving PascalCase transformations a hard time\n */\nexport type IoK8sApimachineryPkgApisMetaV1Preconditions = {\n    /**\n     * Specifies the target ResourceVersion\n     */\n    resourceVersion?: string;\n    /**\n     * Specifies the target UID.\n     */\n    uid?: string;\n};\n\nexport type AdditionalPropertiesUnknownIssue = {\n    [key: string]: string | number;\n};\n\nexport type AdditionalPropertiesUnknownIssue2 = {\n    [key: string]: string | number;\n};\n\nexport type AdditionalPropertiesUnknownIssue3 = string & {\n    entries: {\n        [key: string]: AdditionalPropertiesUnknownIssue;\n    };\n};\n\nexport type AdditionalPropertiesIntegerIssue = {\n    value: number;\n    [key: string]: number;\n};\n\nexport type OneOfAllOfIssue = ((ConstValue | GenericSchemaDuplicateIssue1SystemBoolean) & _3eNum1Период) | GenericSchemaDuplicateIssue1SystemString;\n\nexport type GenericSchemaDuplicateIssue1SystemBoolean = {\n    item?: boolean;\n    error?: string | null;\n    readonly hasError?: boolean;\n    data?: {\n        [key: string]: never;\n    };\n};\n\nexport type GenericSchemaDuplicateIssue1SystemString = {\n    item?: string | null;\n    error?: string | null;\n    readonly hasError?: boolean;\n};\n\nexport type ExternalSharedModel = {\n    id: string;\n    name?: string;\n};\n\n/**\n * This is a model with one property containing a reference\n */\nexport type ModelWithReferenceWritable = {\n    prop?: ModelWithPropertiesWritable;\n};\n\n/**\n * This is a model with one property containing an array\n */\nexport type ModelWithArrayReadOnlyAndWriteOnlyWritable = {\n    prop?: Array<ModelWithReadOnlyAndWriteOnlyWritable>;\n    propWithFile?: Array<Blob | File>;\n    propWithNumber?: Array<number>;\n};\n\n/**\n * This is a model with one nested property\n */\nexport type ModelWithPropertiesWritable = {\n    required: string;\n    requiredAndNullable: string | null;\n    string?: string;\n    number?: number;\n    boolean?: boolean;\n    reference?: ModelWithString;\n    'property with space'?: string;\n    default?: string;\n    try?: string;\n};\n\n/**\n * This is a model that contains a some patterns\n */\nexport type ModelWithPatternWritable = {\n    key: string;\n    name: string;\n    id?: string;\n    text?: string;\n    patternWithSingleQuotes?: string;\n    patternWithNewline?: string;\n    patternWithBacktick?: string;\n    patternWithUnicode?: string;\n};\n\nexport type FileWritable = {\n    /**\n     * Mime\n     */\n    mime: string;\n};\n\nexport type ModelWithReadOnlyAndWriteOnlyWritable = {\n    foo: string;\n    baz: string;\n};\n\nexport type ModelWithAnyOfConstantSizeArrayWithNSizeAndOptionsWritable = [\n    number | Import,\n    number | Import\n];\n\nexport type AdditionalPropertiesUnknownIssueWritable = {\n    [key: string]: string | number;\n};\n\nexport type OneOfAllOfIssueWritable = ((ConstValue | GenericSchemaDuplicateIssue1SystemBoolean) & _3eNum1Период) | GenericSchemaDuplicateIssue1SystemString;\n\nexport type GenericSchemaDuplicateIssue1SystemBooleanWritable = {\n    item?: boolean;\n    error?: string | null;\n    data?: {\n        [key: string]: never;\n    };\n};\n\nexport type GenericSchemaDuplicateIssue1SystemStringWritable = {\n    item?: string | null;\n    error?: string | null;\n};\n\n/**\n * This is a reusable parameter\n */\nexport type SimpleParameter = string;\n\n/**\n * Parameter with illegal characters\n */\nexport type XFooBar = ModelWithString;\n\n/**\n * A reusable request body\n */\nexport type SimpleRequestBody = ModelWithString;\n\n/**\n * A reusable request body\n */\nexport type SimpleFormData = ModelWithString;\n\nexport type ExportData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no+tag';\n};\n\nexport type PatchApiVbyApiVersionNoTagData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no+tag';\n};\n\nexport type PatchApiVbyApiVersionNoTagResponses = {\n    /**\n     * OK\n     */\n    default: unknown;\n};\n\nexport type ImportData = {\n    body: ModelWithReadOnlyAndWriteOnlyWritable | ModelWithArrayReadOnlyAndWriteOnlyWritable;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no+tag';\n};\n\nexport type ImportResponses = {\n    /**\n     * Success\n     */\n    200: ModelFromZendesk;\n    /**\n     * Default success response\n     */\n    default: ModelWithReadOnlyAndWriteOnly;\n};\n\nexport type ImportResponse = ImportResponses[keyof ImportResponses];\n\nexport type FooWowData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no+tag';\n};\n\nexport type FooWowResponses = {\n    /**\n     * OK\n     */\n    default: unknown;\n};\n\nexport type ApiVVersionODataControllerCountData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple/$count';\n};\n\nexport type ApiVVersionODataControllerCountResponses = {\n    /**\n     * Success\n     */\n    200: ModelFromZendesk;\n};\n\nexport type ApiVVersionODataControllerCountResponse = ApiVVersionODataControllerCountResponses[keyof ApiVVersionODataControllerCountResponses];\n\nexport type GetApiVbyApiVersionSimpleOperationData = {\n    body?: never;\n    path: {\n        /**\n         * foo in method\n         */\n        foo_param: string;\n    };\n    query?: never;\n    url: '/api/v{api-version}/simple:operation';\n};\n\nexport type GetApiVbyApiVersionSimpleOperationErrors = {\n    /**\n     * Default error response\n     */\n    default: ModelWithBoolean;\n};\n\nexport type GetApiVbyApiVersionSimpleOperationError = GetApiVbyApiVersionSimpleOperationErrors[keyof GetApiVbyApiVersionSimpleOperationErrors];\n\nexport type GetApiVbyApiVersionSimpleOperationResponses = {\n    /**\n     * Response is a simple number\n     */\n    200: number;\n};\n\nexport type GetApiVbyApiVersionSimpleOperationResponse = GetApiVbyApiVersionSimpleOperationResponses[keyof GetApiVbyApiVersionSimpleOperationResponses];\n\nexport type DeleteCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type GetCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type HeadCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type OptionsCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type PatchCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type PostCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type PutCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type DeleteFooData3 = {\n    body?: never;\n    headers: {\n        /**\n         * Parameter with illegal characters\n         */\n        'x-Foo-Bar': ModelWithString;\n    };\n    path: {\n        /**\n         * foo in method\n         */\n        foo_param: string;\n        /**\n         * bar in method\n         */\n        BarParam: string;\n    };\n    query?: never;\n    url: '/api/v{api-version}/foo/{foo_param}/bar/{BarParam}';\n};\n\nexport type CallWithDescriptionsData = {\n    body?: never;\n    path?: never;\n    query?: {\n        /**\n         * Testing multiline comments in string: First line\n         * Second line\n         *\n         * Fourth line\n         */\n        parameterWithBreaks?: string;\n        /**\n         * Testing backticks in string: `backticks` and ```multiple backticks``` should work\n         */\n        parameterWithBackticks?: string;\n        /**\n         * Testing slashes in string: \\backwards\\\\\\ and /forwards/// should work\n         */\n        parameterWithSlashes?: string;\n        /**\n         * Testing expression placeholders in string: ${expression} should work\n         */\n        parameterWithExpressionPlaceholders?: string;\n        /**\n         * Testing quotes in string: 'single quote''' and \"double quotes\"\"\" should work\n         */\n        parameterWithQuotes?: string;\n        /**\n         * Testing reserved characters in string: * inline * and ** inline ** should work\n         */\n        parameterWithReservedCharacters?: string;\n    };\n    url: '/api/v{api-version}/descriptions';\n};\n\nexport type DeprecatedCallData = {\n    body?: never;\n    headers: {\n        /**\n         * This parameter is deprecated\n         *\n         * @deprecated\n         */\n        parameter: DeprecatedModel | null;\n    };\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/parameters/deprecated';\n};\n\nexport type CallWithParametersData = {\n    /**\n     * This is the parameter that goes into the body\n     */\n    body: {\n        [key: string]: unknown;\n    } | null;\n    headers: {\n        /**\n         * This is the parameter that goes into the header\n         */\n        parameterHeader: string | null;\n    };\n    path: {\n        /**\n         * This is the parameter that goes into the path\n         */\n        parameterPath: string | null;\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string | null;\n    };\n    query: {\n        foo_ref_enum?: ModelWithNestedArrayEnumsDataFoo;\n        foo_all_of_enum: ModelWithNestedArrayEnumsDataFoo;\n        /**\n         * This is the parameter that goes into the query params\n         */\n        cursor: string | null;\n    };\n    url: '/api/v{api-version}/parameters/{parameterPath}';\n};\n\nexport type CallWithWeirdParameterNamesData = {\n    /**\n     * This is the parameter that goes into the body\n     */\n    body: ModelWithString | null;\n    headers: {\n        /**\n         * This is the parameter that goes into the request header\n         */\n        'parameter.header': string | null;\n    };\n    path: {\n        /**\n         * This is the parameter that goes into the path\n         */\n        'parameter.path.1'?: string;\n        /**\n         * This is the parameter that goes into the path\n         */\n        'parameter-path-2'?: string;\n        /**\n         * This is the parameter that goes into the path\n         */\n        'PARAMETER-PATH-3'?: string;\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string | null;\n    };\n    query: {\n        /**\n         * This is the parameter with a reserved keyword\n         */\n        default?: string;\n        /**\n         * This is the parameter that goes into the request query params\n         */\n        'parameter-query': string | null;\n    };\n    url: '/api/v{api-version}/parameters/{parameter.path.1}/{parameter-path-2}/{PARAMETER-PATH-3}';\n};\n\nexport type GetCallWithOptionalParamData = {\n    /**\n     * This is a required parameter\n     */\n    body: ModelWithOneOfEnum;\n    path?: never;\n    query?: {\n        /**\n         * This is an optional parameter\n         */\n        page?: number;\n    };\n    url: '/api/v{api-version}/parameters';\n};\n\nexport type PostCallWithOptionalParamData = {\n    /**\n     * This is an optional parameter\n     */\n    body?: {\n        offset?: number | null;\n    };\n    path?: never;\n    query: {\n        /**\n         * This is a required parameter\n         */\n        parameter: Pageable;\n    };\n    url: '/api/v{api-version}/parameters';\n};\n\nexport type PostCallWithOptionalParamResponses = {\n    /**\n     * Response is a simple number\n     */\n    200: number;\n    /**\n     * Success\n     */\n    204: void;\n};\n\nexport type PostCallWithOptionalParamResponse = PostCallWithOptionalParamResponses[keyof PostCallWithOptionalParamResponses];\n\nexport type PostApiVbyApiVersionRequestBodyData = {\n    /**\n     * A reusable request body\n     */\n    body?: SimpleRequestBody;\n    path?: never;\n    query?: {\n        /**\n         * This is a reusable parameter\n         */\n        parameter?: string;\n    };\n    url: '/api/v{api-version}/requestBody';\n};\n\nexport type PostApiVbyApiVersionFormDataData = {\n    /**\n     * A reusable request body\n     */\n    body?: SimpleFormData;\n    path?: never;\n    query?: {\n        /**\n         * This is a reusable parameter\n         */\n        parameter?: string;\n    };\n    url: '/api/v{api-version}/formData';\n};\n\nexport type CallWithDefaultParametersData = {\n    body?: never;\n    path?: never;\n    query?: {\n        /**\n         * This is a simple string with default value\n         */\n        parameterString?: string | null;\n        /**\n         * This is a simple number with default value\n         */\n        parameterNumber?: number | null;\n        /**\n         * This is a simple boolean with default value\n         */\n        parameterBoolean?: boolean | null;\n        /**\n         * This is a simple enum with default value\n         */\n        parameterEnum?: 'Success' | 'Warning' | 'Error';\n        /**\n         * This is a simple model with default value\n         */\n        parameterModel?: ModelWithString | null;\n    };\n    url: '/api/v{api-version}/defaults';\n};\n\nexport type CallWithDefaultOptionalParametersData = {\n    body?: never;\n    path?: never;\n    query?: {\n        /**\n         * This is a simple string that is optional with default value\n         */\n        parameterString?: string;\n        /**\n         * This is a simple number that is optional with default value\n         */\n        parameterNumber?: number;\n        /**\n         * This is a simple boolean that is optional with default value\n         */\n        parameterBoolean?: boolean;\n        /**\n         * This is a simple enum that is optional with default value\n         */\n        parameterEnum?: 'Success' | 'Warning' | 'Error';\n        /**\n         * This is a simple model that is optional with default value\n         */\n        parameterModel?: ModelWithString;\n    };\n    url: '/api/v{api-version}/defaults';\n};\n\nexport type CallToTestOrderOfParamsData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * This is a optional string with default\n         */\n        parameterOptionalStringWithDefault?: string;\n        /**\n         * This is a optional string with empty default\n         */\n        parameterOptionalStringWithEmptyDefault?: string;\n        /**\n         * This is a optional string with no default\n         */\n        parameterOptionalStringWithNoDefault?: string;\n        /**\n         * This is a string with default\n         */\n        parameterStringWithDefault: string;\n        /**\n         * This is a string with empty default\n         */\n        parameterStringWithEmptyDefault: string;\n        /**\n         * This is a string with no default\n         */\n        parameterStringWithNoDefault: string;\n        /**\n         * This is a string that can be null with no default\n         */\n        parameterStringNullableWithNoDefault?: string | null;\n        /**\n         * This is a string that can be null with default\n         */\n        parameterStringNullableWithDefault?: string | null;\n    };\n    url: '/api/v{api-version}/defaults';\n};\n\nexport type DuplicateNameData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/duplicate';\n};\n\nexport type DuplicateName2Data = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/duplicate';\n};\n\nexport type DuplicateName3Data = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/duplicate';\n};\n\nexport type DuplicateName4Data = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/duplicate';\n};\n\nexport type CallWithNoContentResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no-content';\n};\n\nexport type CallWithNoContentResponseResponses = {\n    /**\n     * Success\n     */\n    204: void;\n};\n\nexport type CallWithNoContentResponseResponse = CallWithNoContentResponseResponses[keyof CallWithNoContentResponseResponses];\n\nexport type CallWithResponseAndNoContentResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multiple-tags/response-and-no-content';\n};\n\nexport type CallWithResponseAndNoContentResponseResponses = {\n    /**\n     * Response is a simple number\n     */\n    200: number;\n    /**\n     * Success\n     */\n    204: void;\n};\n\nexport type CallWithResponseAndNoContentResponseResponse = CallWithResponseAndNoContentResponseResponses[keyof CallWithResponseAndNoContentResponseResponses];\n\nexport type DummyAData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multiple-tags/a';\n};\n\nexport type DummyAResponses = {\n    200: _400;\n};\n\nexport type DummyAResponse = DummyAResponses[keyof DummyAResponses];\n\nexport type DummyBData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multiple-tags/b';\n};\n\nexport type DummyBResponses = {\n    /**\n     * Success\n     */\n    204: void;\n};\n\nexport type DummyBResponse = DummyBResponses[keyof DummyBResponses];\n\nexport type CallWithResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/response';\n};\n\nexport type CallWithResponseResponses = {\n    default: Import;\n};\n\nexport type CallWithResponseResponse = CallWithResponseResponses[keyof CallWithResponseResponses];\n\nexport type CallWithDuplicateResponsesData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/response';\n};\n\nexport type CallWithDuplicateResponsesErrors = {\n    /**\n     * Message for 500 error\n     */\n    500: ModelWithStringError;\n    /**\n     * Message for 501 error\n     */\n    501: ModelWithStringError;\n    /**\n     * Message for 502 error\n     */\n    502: ModelWithStringError;\n    /**\n     * Message for 4XX errors\n     */\n    '4XX': DictionaryWithArray;\n    /**\n     * Default error response\n     */\n    default: ModelWithBoolean;\n};\n\nexport type CallWithDuplicateResponsesError = CallWithDuplicateResponsesErrors[keyof CallWithDuplicateResponsesErrors];\n\nexport type CallWithDuplicateResponsesResponses = {\n    /**\n     * Message for 200 response\n     */\n    200: ModelWithBoolean & ModelWithInteger;\n    /**\n     * Message for 201 response\n     */\n    201: ModelWithString;\n    /**\n     * Message for 202 response\n     */\n    202: ModelWithString;\n};\n\nexport type CallWithDuplicateResponsesResponse = CallWithDuplicateResponsesResponses[keyof CallWithDuplicateResponsesResponses];\n\nexport type CallWithResponsesData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/response';\n};\n\nexport type CallWithResponsesErrors = {\n    /**\n     * Message for 500 error\n     */\n    500: ModelWithStringError;\n    /**\n     * Message for 501 error\n     */\n    501: ModelWithStringError;\n    /**\n     * Message for 502 error\n     */\n    502: ModelWithStringError;\n    /**\n     * Message for default response\n     */\n    default: ModelWithStringError;\n};\n\nexport type CallWithResponsesError = CallWithResponsesErrors[keyof CallWithResponsesErrors];\n\nexport type CallWithResponsesResponses = {\n    /**\n     * Message for 200 response\n     */\n    200: {\n        readonly '@namespace.string'?: string;\n        readonly '@namespace.integer'?: number;\n        readonly value?: Array<ModelWithString>;\n    };\n    /**\n     * Message for 201 response\n     */\n    201: ModelThatExtends;\n    /**\n     * Message for 202 response\n     */\n    202: ModelThatExtendsExtends;\n};\n\nexport type CallWithResponsesResponse = CallWithResponsesResponses[keyof CallWithResponsesResponses];\n\nexport type CollectionFormatData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * This is an array parameter that is sent as csv format (comma-separated values)\n         */\n        parameterArrayCSV: Array<string> | null;\n        /**\n         * This is an array parameter that is sent as ssv format (space-separated values)\n         */\n        parameterArraySSV: Array<string> | null;\n        /**\n         * This is an array parameter that is sent as tsv format (tab-separated values)\n         */\n        parameterArrayTSV: Array<string> | null;\n        /**\n         * This is an array parameter that is sent as pipes format (pipe-separated values)\n         */\n        parameterArrayPipes: Array<string> | null;\n        /**\n         * This is an array parameter that is sent as multi format (multiple parameter instances)\n         */\n        parameterArrayMulti: Array<string> | null;\n    };\n    url: '/api/v{api-version}/collectionFormat';\n};\n\nexport type TypesData = {\n    body?: never;\n    path?: {\n        /**\n         * This is a number parameter\n         */\n        id?: number;\n    };\n    query: {\n        /**\n         * This is a number parameter\n         */\n        parameterNumber: number;\n        /**\n         * This is a string parameter\n         */\n        parameterString: string | null;\n        /**\n         * This is a boolean parameter\n         */\n        parameterBoolean: boolean | null;\n        /**\n         * This is an object parameter\n         */\n        parameterObject: {\n            [key: string]: unknown;\n        } | null;\n        /**\n         * This is an array parameter\n         */\n        parameterArray: Array<string> | null;\n        /**\n         * This is a dictionary parameter\n         */\n        parameterDictionary: {\n            [key: string]: unknown;\n        } | null;\n        /**\n         * This is an enum parameter\n         */\n        parameterEnum: 'Success' | 'Warning' | 'Error' | null;\n    };\n    url: '/api/v{api-version}/types';\n};\n\nexport type TypesResponses = {\n    /**\n     * Response is a simple number\n     */\n    200: number;\n    /**\n     * Response is a simple string\n     */\n    201: string;\n    /**\n     * Response is a simple boolean\n     */\n    202: boolean;\n    /**\n     * Response is a simple object\n     */\n    203: {\n        [key: string]: unknown;\n    };\n};\n\nexport type TypesResponse = TypesResponses[keyof TypesResponses];\n\nexport type UploadFileData = {\n    body: Blob | File;\n    path: {\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string | null;\n    };\n    query?: never;\n    url: '/api/v{api-version}/upload';\n};\n\nexport type UploadFileResponses = {\n    200: boolean;\n};\n\nexport type UploadFileResponse = UploadFileResponses[keyof UploadFileResponses];\n\nexport type FileResponseData = {\n    body?: never;\n    path: {\n        id: string;\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string;\n    };\n    query?: never;\n    url: '/api/v{api-version}/file/{id}';\n};\n\nexport type FileResponseResponses = {\n    /**\n     * Success\n     */\n    200: Blob | File;\n};\n\nexport type FileResponseResponse = FileResponseResponses[keyof FileResponseResponses];\n\nexport type ComplexTypesData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * Parameter containing object\n         */\n        parameterObject: {\n            first?: {\n                second?: {\n                    third?: string;\n                };\n            };\n        };\n        /**\n         * Parameter containing reference\n         */\n        parameterReference: ModelWithString;\n    };\n    url: '/api/v{api-version}/complex';\n};\n\nexport type ComplexTypesErrors = {\n    /**\n     * 400 `server` error\n     */\n    400: unknown;\n    /**\n     * 500 server error\n     */\n    500: unknown;\n};\n\nexport type ComplexTypesResponses = {\n    /**\n     * Successful response\n     */\n    200: Array<ModelWithString>;\n};\n\nexport type ComplexTypesResponse = ComplexTypesResponses[keyof ComplexTypesResponses];\n\nexport type MultipartResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multipart';\n};\n\nexport type MultipartResponseResponses = {\n    /**\n     * OK\n     */\n    200: {\n        file?: Blob | File;\n        metadata?: {\n            foo?: string;\n            bar?: string;\n        };\n    };\n};\n\nexport type MultipartResponseResponse = MultipartResponseResponses[keyof MultipartResponseResponses];\n\nexport type MultipartRequestData = {\n    body?: {\n        content?: Blob | File;\n        data?: ModelWithString | null;\n    };\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multipart';\n};\n\nexport type ComplexParamsData = {\n    body?: {\n        readonly key: string | null;\n        name: string | null;\n        enabled?: boolean;\n        type: 'Monkey' | 'Horse' | 'Bird';\n        listOfModels?: Array<ModelWithString> | null;\n        listOfStrings?: Array<string> | null;\n        parameters: ModelWithString | ModelWithEnum | ModelWithArray | ModelWithDictionary;\n        readonly user?: {\n            readonly id?: number;\n            readonly name?: string | null;\n        };\n    };\n    path: {\n        id: number;\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string;\n    };\n    query?: never;\n    url: '/api/v{api-version}/complex/{id}';\n};\n\nexport type ComplexParamsResponses = {\n    /**\n     * Success\n     */\n    200: ModelWithString;\n};\n\nexport type ComplexParamsResponse = ComplexParamsResponses[keyof ComplexParamsResponses];\n\nexport type CallWithResultFromHeaderData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/header';\n};\n\nexport type CallWithResultFromHeaderErrors = {\n    /**\n     * 400 server error\n     */\n    400: unknown;\n    /**\n     * 500 server error\n     */\n    500: unknown;\n};\n\nexport type CallWithResultFromHeaderResponses = {\n    /**\n     * Successful response\n     */\n    200: unknown;\n};\n\nexport type TestErrorCodeData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * Status code to return\n         */\n        status: number;\n    };\n    url: '/api/v{api-version}/error';\n};\n\nexport type TestErrorCodeErrors = {\n    /**\n     * Custom message: Internal Server Error\n     */\n    500: unknown;\n    /**\n     * Custom message: Not Implemented\n     */\n    501: unknown;\n    /**\n     * Custom message: Bad Gateway\n     */\n    502: unknown;\n    /**\n     * Custom message: Service Unavailable\n     */\n    503: unknown;\n};\n\nexport type TestErrorCodeResponses = {\n    /**\n     * Custom message: Successful response\n     */\n    200: unknown;\n};\n\nexport type NonAsciiæøåÆøÅöôêÊ字符串Data = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * Dummy input param\n         */\n        nonAsciiParamæøåÆØÅöôêÊ: number;\n    };\n    url: '/api/v{api-version}/non-ascii-æøåÆØÅöôêÊ字符串';\n};\n\nexport type NonAsciiæøåÆøÅöôêÊ字符串Responses = {\n    /**\n     * Successful response\n     */\n    200: Array<NonAsciiStringæøåÆøÅöôêÊ字符串>;\n};\n\nexport type NonAsciiæøåÆøÅöôêÊ字符串Response = NonAsciiæøåÆøÅöôêÊ字符串Responses[keyof NonAsciiæøåÆøÅöôêÊ字符串Responses];\n\nexport type PutWithFormUrlEncodedData = {\n    body: ArrayWithStrings;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/non-ascii-æøåÆØÅöôêÊ字符串';\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@hey-api/typescript/transforms-read-write-custom-name/client/client.gen.ts",
    "content": "// 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 (options: RequestOptions) => {\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 url = buildUrl(opts);\n\n    return { opts, url };\n  };\n\n  const request: Client['request'] = async (options) => {\n    // @ts-expect-error\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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@hey-api/typescript/transforms-read-write-custom-name/client/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type { Auth } from '../core/auth.gen';\nexport type { QuerySerializerOptions } from '../core/bodySerializer.gen';\nexport {\n  formDataBodySerializer,\n  jsonBodySerializer,\n  urlSearchParamsBodySerializer,\n} from '../core/bodySerializer.gen';\nexport { buildClientParams } from '../core/params.gen';\nexport { serializeQueryKeyValue } from '../core/queryKeySerializer.gen';\nexport { createClient } from './client.gen';\nexport type {\n  Client,\n  ClientOptions,\n  Config,\n  CreateClientConfig,\n  Options,\n  RequestOptions,\n  RequestResult,\n  ResolvedRequestOptions,\n  ResponseStyle,\n  TDataShape,\n} from './types.gen';\nexport { createConfig, mergeHeaders } from './utils.gen';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@hey-api/typescript/transforms-read-write-custom-name/client/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { Auth } from '../core/auth.gen';\nimport type {\n  ServerSentEventsOptions,\n  ServerSentEventsResult,\n} from '../core/serverSentEvents.gen';\nimport type { Client as CoreClient, Config as CoreConfig } from '../core/types.gen';\nimport type { Middleware } from './utils.gen';\n\nexport type ResponseStyle = 'data' | 'fields';\n\nexport interface Config<T extends ClientOptions = ClientOptions>\n  extends Omit<RequestInit, 'body' | 'headers' | 'method'>, CoreConfig {\n  /**\n   * Base URL for all requests made by this client.\n   */\n  baseUrl?: T['baseUrl'];\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   * Please don't use the Fetch client for Next.js applications. The `next`\n   * options won't have any effect.\n   *\n   * Install {@link https://www.npmjs.com/package/@hey-api/client-next `@hey-api/client-next`} instead.\n   */\n  next?: never;\n  /**\n   * Return the response data parsed in a specified format. By default, `auto`\n   * will infer the appropriate method from the `Content-Type` response header.\n   * You can override this behavior with any of the {@link Body} methods.\n   * Select `stream` if you don't want to parse response data at all.\n   *\n   * @default 'auto'\n   */\n  parseAs?: 'arrayBuffer' | 'auto' | 'blob' | 'formData' | 'json' | 'stream' | 'text';\n  /**\n   * Should we return only data or multiple fields (data, error, response, etc.)?\n   *\n   * @default 'fields'\n   */\n  responseStyle?: ResponseStyle;\n  /**\n   * Throw an error instead of returning it in the response?\n   *\n   * @default false\n   */\n  throwOnError?: T['throwOnError'];\n}\n\nexport interface RequestOptions<\n  TData = unknown,\n  TResponseStyle extends ResponseStyle = 'fields',\n  ThrowOnError extends boolean = boolean,\n  Url extends string = string,\n>\n  extends\n    Config<{\n      responseStyle: TResponseStyle;\n      throwOnError: ThrowOnError;\n    }>,\n    Pick<\n      ServerSentEventsOptions<TData>,\n      | 'onRequest'\n      | 'onSseError'\n      | 'onSseEvent'\n      | 'sseDefaultRetryDelay'\n      | 'sseMaxRetryAttempts'\n      | 'sseMaxRetryDelay'\n    > {\n  /**\n   * Any body that you want to add to your request.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/fetch#body}\n   */\n  body?: unknown;\n  path?: Record<string, unknown>;\n  query?: Record<string, unknown>;\n  /**\n   * Security mechanism(s) to use for the request.\n   */\n  security?: ReadonlyArray<Auth>;\n  url: Url;\n}\n\nexport interface ResolvedRequestOptions<\n  TResponseStyle extends ResponseStyle = 'fields',\n  ThrowOnError extends boolean = boolean,\n  Url extends string = string,\n> extends RequestOptions<unknown, TResponseStyle, ThrowOnError, Url> {\n  serializedBody?: string;\n}\n\nexport type RequestResult<\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = boolean,\n  TResponseStyle extends ResponseStyle = 'fields',\n> = ThrowOnError extends true\n  ? Promise<\n      TResponseStyle extends 'data'\n        ? TData extends Record<string, unknown>\n          ? TData[keyof TData]\n          : TData\n        : {\n            data: TData extends Record<string, unknown> ? TData[keyof TData] : TData;\n            request: Request;\n            response: Response;\n          }\n    >\n  : Promise<\n      TResponseStyle extends 'data'\n        ? (TData extends Record<string, unknown> ? TData[keyof TData] : TData) | undefined\n        : (\n            | {\n                data: TData extends Record<string, unknown> ? TData[keyof TData] : TData;\n                error: undefined;\n              }\n            | {\n                data: undefined;\n                error: TError extends Record<string, unknown> ? TError[keyof TError] : TError;\n              }\n          ) & {\n            request: Request;\n            response: Response;\n          }\n    >;\n\nexport interface ClientOptions {\n  baseUrl?: string;\n  responseStyle?: ResponseStyle;\n  throwOnError?: boolean;\n}\n\ntype MethodFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'>,\n) => RequestResult<TData, TError, ThrowOnError, TResponseStyle>;\n\ntype SseFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'>,\n) => Promise<ServerSentEventsResult<TData, TError>>;\n\ntype RequestFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'> &\n    Pick<Required<RequestOptions<TData, TResponseStyle, ThrowOnError>>, 'method'>,\n) => RequestResult<TData, TError, ThrowOnError, TResponseStyle>;\n\ntype BuildUrlFn = <\n  TData extends {\n    body?: unknown;\n    path?: Record<string, unknown>;\n    query?: Record<string, unknown>;\n    url: string;\n  },\n>(\n  options: TData & Options<TData>,\n) => string;\n\nexport type Client = CoreClient<RequestFn, Config, MethodFn, BuildUrlFn, SseFn> & {\n  interceptors: Middleware<Request, Response, unknown, ResolvedRequestOptions>;\n};\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 = ClientOptions> = (\n  override?: Config<ClientOptions & T>,\n) => Config<Required<ClientOptions> & T>;\n\nexport interface TDataShape {\n  body?: unknown;\n  headers?: unknown;\n  path?: unknown;\n  query?: unknown;\n  url: string;\n}\n\ntype OmitKeys<T, K> = Pick<T, Exclude<keyof T, K>>;\n\nexport type Options<\n  TData extends TDataShape = TDataShape,\n  ThrowOnError extends boolean = boolean,\n  TResponse = unknown,\n  TResponseStyle extends ResponseStyle = 'fields',\n> = OmitKeys<\n  RequestOptions<TResponse, TResponseStyle, ThrowOnError>,\n  'body' | 'path' | 'query' | 'url'\n> &\n  ([TData] extends [never] ? unknown : Omit<TData, 'url'>);\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@hey-api/typescript/transforms-read-write-custom-name/client/utils.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@hey-api/typescript/transforms-read-write-custom-name/client.gen.ts",
    "content": "// 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>());\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@hey-api/typescript/transforms-read-write-custom-name/core/auth.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@hey-api/typescript/transforms-read-write-custom-name/core/bodySerializer.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@hey-api/typescript/transforms-read-write-custom-name/core/params.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@hey-api/typescript/transforms-read-write-custom-name/core/pathSerializer.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@hey-api/typescript/transforms-read-write-custom-name/core/queryKeySerializer.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\n/**\n * JSON-friendly union that mirrors what Pinia Colada can hash.\n */\nexport type JsonValue =\n  | null\n  | string\n  | number\n  | boolean\n  | JsonValue[]\n  | { [key: string]: JsonValue };\n\n/**\n * Replacer that converts non-JSON values (bigint, Date, etc.) to safe substitutes.\n */\nexport const queryKeyJsonReplacer = (_key: string, value: unknown) => {\n  if (value === undefined || typeof value === 'function' || typeof value === 'symbol') {\n    return undefined;\n  }\n  if (typeof value === 'bigint') {\n    return value.toString();\n  }\n  if (value instanceof Date) {\n    return value.toISOString();\n  }\n  return value;\n};\n\n/**\n * Safely stringifies a value and parses it back into a JsonValue.\n */\nexport const stringifyToJsonValue = (input: unknown): JsonValue | undefined => {\n  try {\n    const json = JSON.stringify(input, queryKeyJsonReplacer);\n    if (json === undefined) {\n      return undefined;\n    }\n    return JSON.parse(json) as JsonValue;\n  } catch {\n    return undefined;\n  }\n};\n\n/**\n * Detects plain objects (including objects with a null prototype).\n */\nconst isPlainObject = (value: unknown): value is Record<string, unknown> => {\n  if (value === null || typeof value !== 'object') {\n    return false;\n  }\n  const prototype = Object.getPrototypeOf(value as object);\n  return prototype === Object.prototype || prototype === null;\n};\n\n/**\n * Turns URLSearchParams into a sorted JSON object for deterministic keys.\n */\nconst serializeSearchParams = (params: URLSearchParams): JsonValue => {\n  const entries = Array.from(params.entries()).sort(([a], [b]) => a.localeCompare(b));\n  const result: Record<string, JsonValue> = {};\n\n  for (const [key, value] of entries) {\n    const existing = result[key];\n    if (existing === undefined) {\n      result[key] = value;\n      continue;\n    }\n\n    if (Array.isArray(existing)) {\n      (existing as string[]).push(value);\n    } else {\n      result[key] = [existing, value];\n    }\n  }\n\n  return result;\n};\n\n/**\n * Normalizes any accepted value into a JSON-friendly shape for query keys.\n */\nexport const serializeQueryKeyValue = (value: unknown): JsonValue | undefined => {\n  if (value === null) {\n    return null;\n  }\n\n  if (typeof value === 'string' || typeof value === 'number' || typeof value === 'boolean') {\n    return value;\n  }\n\n  if (value === undefined || typeof value === 'function' || typeof value === 'symbol') {\n    return undefined;\n  }\n\n  if (typeof value === 'bigint') {\n    return value.toString();\n  }\n\n  if (value instanceof Date) {\n    return value.toISOString();\n  }\n\n  if (Array.isArray(value)) {\n    return stringifyToJsonValue(value);\n  }\n\n  if (typeof URLSearchParams !== 'undefined' && value instanceof URLSearchParams) {\n    return serializeSearchParams(value);\n  }\n\n  if (isPlainObject(value)) {\n    return stringifyToJsonValue(value);\n  }\n\n  return undefined;\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@hey-api/typescript/transforms-read-write-custom-name/core/serverSentEvents.gen.ts",
    "content": "// 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 const 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            // Normalize line endings: CRLF -> LF, then CR -> LF\n            buffer = buffer.replace(/\\r\\n/g, '\\n').replace(/\\r/g, '\\n');\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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@hey-api/typescript/transforms-read-write-custom-name/core/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { Auth, AuthToken } from './auth.gen';\nimport type { BodySerializer, QuerySerializer, QuerySerializerOptions } from './bodySerializer.gen';\n\nexport type HttpMethod =\n  | 'connect'\n  | 'delete'\n  | 'get'\n  | 'head'\n  | 'options'\n  | 'patch'\n  | 'post'\n  | 'put'\n  | 'trace';\n\nexport type Client<\n  RequestFn = never,\n  Config = unknown,\n  MethodFn = never,\n  BuildUrlFn = never,\n  SseFn = never,\n> = {\n  /**\n   * Returns the final request URL.\n   */\n  buildUrl: BuildUrlFn;\n  getConfig: () => Config;\n  request: RequestFn;\n  setConfig: (config: Config) => Config;\n} & {\n  [K in HttpMethod]: MethodFn;\n} & ([SseFn] extends [never] ? { sse?: never } : { sse: { [K in HttpMethod]: SseFn } });\n\nexport interface Config {\n  /**\n   * Auth token or a function returning auth token. The resolved value will be\n   * added to the request payload as defined by its `security` array.\n   */\n  auth?: ((auth: Auth) => Promise<AuthToken> | AuthToken) | AuthToken;\n  /**\n   * A function for serializing request body parameter. By default,\n   * {@link JSON.stringify()} will be used.\n   */\n  bodySerializer?: BodySerializer | null;\n  /**\n   * An object containing any HTTP headers that you want to pre-populate your\n   * `Headers` object with.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/Headers/Headers#init See more}\n   */\n  headers?:\n    | RequestInit['headers']\n    | Record<\n        string,\n        string | number | boolean | (string | number | boolean)[] | null | undefined | unknown\n      >;\n  /**\n   * The request method.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/fetch#method See more}\n   */\n  method?: Uppercase<HttpMethod>;\n  /**\n   * A function for serializing request query parameters. By default, arrays\n   * will be exploded in form style, objects will be exploded in deepObject\n   * style, and reserved characters are percent-encoded.\n   *\n   * This method will have no effect if the native `paramsSerializer()` Axios\n   * API function is used.\n   *\n   * {@link https://swagger.io/docs/specification/serialization/#query View examples}\n   */\n  querySerializer?: QuerySerializer | QuerySerializerOptions;\n  /**\n   * A function validating request data. This is useful if you want to ensure\n   * the request conforms to the desired shape, so it can be safely sent to\n   * the server.\n   */\n  requestValidator?: (data: unknown) => Promise<unknown>;\n  /**\n   * A function transforming response data before it's returned. This is useful\n   * for post-processing data, e.g. converting ISO strings into Date objects.\n   */\n  responseTransformer?: (data: unknown) => Promise<unknown>;\n  /**\n   * A function validating response data. This is useful if you want to ensure\n   * the response conforms to the desired shape, so it can be safely passed to\n   * the transformers and returned to the user.\n   */\n  responseValidator?: (data: unknown) => Promise<unknown>;\n}\n\ntype IsExactlyNeverOrNeverUndefined<T> = [T] extends [never]\n  ? true\n  : [T] extends [never | undefined]\n    ? [undefined] extends [T]\n      ? false\n      : true\n    : false;\n\nexport type OmitNever<T extends Record<string, unknown>> = {\n  [K in keyof T as IsExactlyNeverOrNeverUndefined<T[K]> extends true ? never : K]: T[K];\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@hey-api/typescript/transforms-read-write-custom-name/core/utils.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@hey-api/typescript/transforms-read-write-custom-name/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type { Baz, ClientOptions, Foo, Foo2, PostFooReadData, PostFooReadResponse, PostFooReadResponses, PostFooReadWriteData, PostFooReadWriteResponse, PostFooReadWriteResponses, PostFooWriteData, PostFooWriteResponse, PostFooWriteResponses, PutFooWriteData, PutFooWriteResponse, PutFooWriteResponses, QuxAllRead, QuxAllWrite, ReadableBarRead, ReadableBarWrite, ReadableCorge, ReadableFooRead, ReadableFooReadWrite, ReadableFooReadWriteRef, ReadableFooReadWriteRef2, ReadableFooWrite, ReadableQuux, WritableBarRead, WritableBarWrite, WritableCorge, WritableFooRead, WritableFooReadWrite, WritableFooReadWriteRef, WritableFooReadWriteRef2, WritableFooWrite, WritableQuux } from './types.gen';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@hey-api/typescript/transforms-read-write-custom-name/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type ClientOptions = {\n    baseUrl: `${string}://${string}` | (string & {});\n};\n\nexport type Baz = {\n    baz?: string;\n};\n\nexport type QuxAllWrite = {\n    baz?: string;\n};\n\nexport type QuxAllRead = {\n    readonly baz?: string;\n};\n\nexport type ReadableFooReadWrite = ReadableBarRead;\n\nexport type WritableFooReadWrite = WritableBarRead & {\n    foo?: string;\n};\n\nexport type ReadableFooRead = ReadableBarRead & {\n    readonly foo?: string;\n};\n\nexport type WritableFooRead = WritableBarRead;\n\nexport type ReadableFooWrite = ReadableBarWrite;\n\nexport type WritableFooWrite = WritableBarWrite & {\n    foo?: string;\n};\n\nexport type ReadableBarRead = Baz | QuxAllRead | {\n    readonly bar?: string;\n};\n\nexport type WritableBarRead = Baz | QuxAllWrite;\n\nexport type ReadableBarWrite = Baz | QuxAllRead;\n\nexport type WritableBarWrite = Baz | QuxAllWrite | {\n    bar?: string;\n};\n\nexport type ReadableQuux = {\n    baz?: Array<Baz>;\n    qux?: QuxAllRead;\n};\n\nexport type WritableQuux = {\n    baz?: Array<Baz>;\n};\n\nexport type ReadableCorge = {\n    bar?: {\n        readonly baz?: boolean;\n    };\n};\n\nexport type WritableCorge = {\n    foo?: {\n        baz?: boolean;\n    };\n};\n\nexport type ReadableFooReadWriteRef = {\n    foo?: ReadableFooReadWrite;\n    bar?: ReadableFooReadWriteRef;\n};\n\nexport type WritableFooReadWriteRef = {\n    foo?: WritableFooReadWrite;\n    bar?: WritableFooReadWriteRef;\n};\n\nexport type ReadableFooReadWriteRef2 = ReadableFooReadWrite;\n\nexport type WritableFooReadWriteRef2 = WritableFooReadWrite;\n\n/**\n * Query parameter\n */\nexport type Foo = string;\n\n/**\n * PUT /foo-write payload\n */\nexport type Foo2 = {\n    foo?: WritableBarRead;\n};\n\nexport type PostFooReadWriteData = {\n    body: WritableFooReadWrite;\n    path?: never;\n    query?: never;\n    url: '/foo-read-write';\n};\n\nexport type PostFooReadWriteResponses = {\n    /**\n     * OK\n     */\n    200: ReadableFooReadWrite;\n};\n\nexport type PostFooReadWriteResponse = PostFooReadWriteResponses[keyof PostFooReadWriteResponses];\n\nexport type PostFooReadData = {\n    body: WritableFooRead;\n    path?: never;\n    query?: never;\n    url: '/foo-read';\n};\n\nexport type PostFooReadResponses = {\n    /**\n     * OK\n     */\n    200: ReadableFooRead;\n};\n\nexport type PostFooReadResponse = PostFooReadResponses[keyof PostFooReadResponses];\n\nexport type PostFooWriteData = {\n    body: WritableFooWrite;\n    path?: never;\n    query?: never;\n    url: '/foo-write';\n};\n\nexport type PostFooWriteResponses = {\n    /**\n     * OK\n     */\n    200: ReadableFooWrite;\n};\n\nexport type PostFooWriteResponse = PostFooWriteResponses[keyof PostFooWriteResponses];\n\nexport type PutFooWriteData = {\n    /**\n     * PUT /foo-write payload\n     */\n    body: Foo2;\n    path?: never;\n    query?: {\n        /**\n         * Query parameter\n         */\n        foo?: string;\n    };\n    url: '/foo-write';\n};\n\nexport type PutFooWriteResponses = {\n    /**\n     * OK\n     */\n    200: ReadableFooWrite;\n};\n\nexport type PutFooWriteResponse = PutFooWriteResponses[keyof PutFooWriteResponses];\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@hey-api/typescript/transforms-read-write-ignore/client/client.gen.ts",
    "content": "// 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 (options: RequestOptions) => {\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 url = buildUrl(opts);\n\n    return { opts, url };\n  };\n\n  const request: Client['request'] = async (options) => {\n    // @ts-expect-error\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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@hey-api/typescript/transforms-read-write-ignore/client/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type { Auth } from '../core/auth.gen';\nexport type { QuerySerializerOptions } from '../core/bodySerializer.gen';\nexport {\n  formDataBodySerializer,\n  jsonBodySerializer,\n  urlSearchParamsBodySerializer,\n} from '../core/bodySerializer.gen';\nexport { buildClientParams } from '../core/params.gen';\nexport { serializeQueryKeyValue } from '../core/queryKeySerializer.gen';\nexport { createClient } from './client.gen';\nexport type {\n  Client,\n  ClientOptions,\n  Config,\n  CreateClientConfig,\n  Options,\n  RequestOptions,\n  RequestResult,\n  ResolvedRequestOptions,\n  ResponseStyle,\n  TDataShape,\n} from './types.gen';\nexport { createConfig, mergeHeaders } from './utils.gen';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@hey-api/typescript/transforms-read-write-ignore/client/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { Auth } from '../core/auth.gen';\nimport type {\n  ServerSentEventsOptions,\n  ServerSentEventsResult,\n} from '../core/serverSentEvents.gen';\nimport type { Client as CoreClient, Config as CoreConfig } from '../core/types.gen';\nimport type { Middleware } from './utils.gen';\n\nexport type ResponseStyle = 'data' | 'fields';\n\nexport interface Config<T extends ClientOptions = ClientOptions>\n  extends Omit<RequestInit, 'body' | 'headers' | 'method'>, CoreConfig {\n  /**\n   * Base URL for all requests made by this client.\n   */\n  baseUrl?: T['baseUrl'];\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   * Please don't use the Fetch client for Next.js applications. The `next`\n   * options won't have any effect.\n   *\n   * Install {@link https://www.npmjs.com/package/@hey-api/client-next `@hey-api/client-next`} instead.\n   */\n  next?: never;\n  /**\n   * Return the response data parsed in a specified format. By default, `auto`\n   * will infer the appropriate method from the `Content-Type` response header.\n   * You can override this behavior with any of the {@link Body} methods.\n   * Select `stream` if you don't want to parse response data at all.\n   *\n   * @default 'auto'\n   */\n  parseAs?: 'arrayBuffer' | 'auto' | 'blob' | 'formData' | 'json' | 'stream' | 'text';\n  /**\n   * Should we return only data or multiple fields (data, error, response, etc.)?\n   *\n   * @default 'fields'\n   */\n  responseStyle?: ResponseStyle;\n  /**\n   * Throw an error instead of returning it in the response?\n   *\n   * @default false\n   */\n  throwOnError?: T['throwOnError'];\n}\n\nexport interface RequestOptions<\n  TData = unknown,\n  TResponseStyle extends ResponseStyle = 'fields',\n  ThrowOnError extends boolean = boolean,\n  Url extends string = string,\n>\n  extends\n    Config<{\n      responseStyle: TResponseStyle;\n      throwOnError: ThrowOnError;\n    }>,\n    Pick<\n      ServerSentEventsOptions<TData>,\n      | 'onRequest'\n      | 'onSseError'\n      | 'onSseEvent'\n      | 'sseDefaultRetryDelay'\n      | 'sseMaxRetryAttempts'\n      | 'sseMaxRetryDelay'\n    > {\n  /**\n   * Any body that you want to add to your request.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/fetch#body}\n   */\n  body?: unknown;\n  path?: Record<string, unknown>;\n  query?: Record<string, unknown>;\n  /**\n   * Security mechanism(s) to use for the request.\n   */\n  security?: ReadonlyArray<Auth>;\n  url: Url;\n}\n\nexport interface ResolvedRequestOptions<\n  TResponseStyle extends ResponseStyle = 'fields',\n  ThrowOnError extends boolean = boolean,\n  Url extends string = string,\n> extends RequestOptions<unknown, TResponseStyle, ThrowOnError, Url> {\n  serializedBody?: string;\n}\n\nexport type RequestResult<\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = boolean,\n  TResponseStyle extends ResponseStyle = 'fields',\n> = ThrowOnError extends true\n  ? Promise<\n      TResponseStyle extends 'data'\n        ? TData extends Record<string, unknown>\n          ? TData[keyof TData]\n          : TData\n        : {\n            data: TData extends Record<string, unknown> ? TData[keyof TData] : TData;\n            request: Request;\n            response: Response;\n          }\n    >\n  : Promise<\n      TResponseStyle extends 'data'\n        ? (TData extends Record<string, unknown> ? TData[keyof TData] : TData) | undefined\n        : (\n            | {\n                data: TData extends Record<string, unknown> ? TData[keyof TData] : TData;\n                error: undefined;\n              }\n            | {\n                data: undefined;\n                error: TError extends Record<string, unknown> ? TError[keyof TError] : TError;\n              }\n          ) & {\n            request: Request;\n            response: Response;\n          }\n    >;\n\nexport interface ClientOptions {\n  baseUrl?: string;\n  responseStyle?: ResponseStyle;\n  throwOnError?: boolean;\n}\n\ntype MethodFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'>,\n) => RequestResult<TData, TError, ThrowOnError, TResponseStyle>;\n\ntype SseFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'>,\n) => Promise<ServerSentEventsResult<TData, TError>>;\n\ntype RequestFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'> &\n    Pick<Required<RequestOptions<TData, TResponseStyle, ThrowOnError>>, 'method'>,\n) => RequestResult<TData, TError, ThrowOnError, TResponseStyle>;\n\ntype BuildUrlFn = <\n  TData extends {\n    body?: unknown;\n    path?: Record<string, unknown>;\n    query?: Record<string, unknown>;\n    url: string;\n  },\n>(\n  options: TData & Options<TData>,\n) => string;\n\nexport type Client = CoreClient<RequestFn, Config, MethodFn, BuildUrlFn, SseFn> & {\n  interceptors: Middleware<Request, Response, unknown, ResolvedRequestOptions>;\n};\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 = ClientOptions> = (\n  override?: Config<ClientOptions & T>,\n) => Config<Required<ClientOptions> & T>;\n\nexport interface TDataShape {\n  body?: unknown;\n  headers?: unknown;\n  path?: unknown;\n  query?: unknown;\n  url: string;\n}\n\ntype OmitKeys<T, K> = Pick<T, Exclude<keyof T, K>>;\n\nexport type Options<\n  TData extends TDataShape = TDataShape,\n  ThrowOnError extends boolean = boolean,\n  TResponse = unknown,\n  TResponseStyle extends ResponseStyle = 'fields',\n> = OmitKeys<\n  RequestOptions<TResponse, TResponseStyle, ThrowOnError>,\n  'body' | 'path' | 'query' | 'url'\n> &\n  ([TData] extends [never] ? unknown : Omit<TData, 'url'>);\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@hey-api/typescript/transforms-read-write-ignore/client/utils.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@hey-api/typescript/transforms-read-write-ignore/client.gen.ts",
    "content": "// 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>());\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@hey-api/typescript/transforms-read-write-ignore/core/auth.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@hey-api/typescript/transforms-read-write-ignore/core/bodySerializer.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@hey-api/typescript/transforms-read-write-ignore/core/params.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@hey-api/typescript/transforms-read-write-ignore/core/pathSerializer.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@hey-api/typescript/transforms-read-write-ignore/core/queryKeySerializer.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\n/**\n * JSON-friendly union that mirrors what Pinia Colada can hash.\n */\nexport type JsonValue =\n  | null\n  | string\n  | number\n  | boolean\n  | JsonValue[]\n  | { [key: string]: JsonValue };\n\n/**\n * Replacer that converts non-JSON values (bigint, Date, etc.) to safe substitutes.\n */\nexport const queryKeyJsonReplacer = (_key: string, value: unknown) => {\n  if (value === undefined || typeof value === 'function' || typeof value === 'symbol') {\n    return undefined;\n  }\n  if (typeof value === 'bigint') {\n    return value.toString();\n  }\n  if (value instanceof Date) {\n    return value.toISOString();\n  }\n  return value;\n};\n\n/**\n * Safely stringifies a value and parses it back into a JsonValue.\n */\nexport const stringifyToJsonValue = (input: unknown): JsonValue | undefined => {\n  try {\n    const json = JSON.stringify(input, queryKeyJsonReplacer);\n    if (json === undefined) {\n      return undefined;\n    }\n    return JSON.parse(json) as JsonValue;\n  } catch {\n    return undefined;\n  }\n};\n\n/**\n * Detects plain objects (including objects with a null prototype).\n */\nconst isPlainObject = (value: unknown): value is Record<string, unknown> => {\n  if (value === null || typeof value !== 'object') {\n    return false;\n  }\n  const prototype = Object.getPrototypeOf(value as object);\n  return prototype === Object.prototype || prototype === null;\n};\n\n/**\n * Turns URLSearchParams into a sorted JSON object for deterministic keys.\n */\nconst serializeSearchParams = (params: URLSearchParams): JsonValue => {\n  const entries = Array.from(params.entries()).sort(([a], [b]) => a.localeCompare(b));\n  const result: Record<string, JsonValue> = {};\n\n  for (const [key, value] of entries) {\n    const existing = result[key];\n    if (existing === undefined) {\n      result[key] = value;\n      continue;\n    }\n\n    if (Array.isArray(existing)) {\n      (existing as string[]).push(value);\n    } else {\n      result[key] = [existing, value];\n    }\n  }\n\n  return result;\n};\n\n/**\n * Normalizes any accepted value into a JSON-friendly shape for query keys.\n */\nexport const serializeQueryKeyValue = (value: unknown): JsonValue | undefined => {\n  if (value === null) {\n    return null;\n  }\n\n  if (typeof value === 'string' || typeof value === 'number' || typeof value === 'boolean') {\n    return value;\n  }\n\n  if (value === undefined || typeof value === 'function' || typeof value === 'symbol') {\n    return undefined;\n  }\n\n  if (typeof value === 'bigint') {\n    return value.toString();\n  }\n\n  if (value instanceof Date) {\n    return value.toISOString();\n  }\n\n  if (Array.isArray(value)) {\n    return stringifyToJsonValue(value);\n  }\n\n  if (typeof URLSearchParams !== 'undefined' && value instanceof URLSearchParams) {\n    return serializeSearchParams(value);\n  }\n\n  if (isPlainObject(value)) {\n    return stringifyToJsonValue(value);\n  }\n\n  return undefined;\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@hey-api/typescript/transforms-read-write-ignore/core/serverSentEvents.gen.ts",
    "content": "// 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 const 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            // Normalize line endings: CRLF -> LF, then CR -> LF\n            buffer = buffer.replace(/\\r\\n/g, '\\n').replace(/\\r/g, '\\n');\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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@hey-api/typescript/transforms-read-write-ignore/core/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { Auth, AuthToken } from './auth.gen';\nimport type { BodySerializer, QuerySerializer, QuerySerializerOptions } from './bodySerializer.gen';\n\nexport type HttpMethod =\n  | 'connect'\n  | 'delete'\n  | 'get'\n  | 'head'\n  | 'options'\n  | 'patch'\n  | 'post'\n  | 'put'\n  | 'trace';\n\nexport type Client<\n  RequestFn = never,\n  Config = unknown,\n  MethodFn = never,\n  BuildUrlFn = never,\n  SseFn = never,\n> = {\n  /**\n   * Returns the final request URL.\n   */\n  buildUrl: BuildUrlFn;\n  getConfig: () => Config;\n  request: RequestFn;\n  setConfig: (config: Config) => Config;\n} & {\n  [K in HttpMethod]: MethodFn;\n} & ([SseFn] extends [never] ? { sse?: never } : { sse: { [K in HttpMethod]: SseFn } });\n\nexport interface Config {\n  /**\n   * Auth token or a function returning auth token. The resolved value will be\n   * added to the request payload as defined by its `security` array.\n   */\n  auth?: ((auth: Auth) => Promise<AuthToken> | AuthToken) | AuthToken;\n  /**\n   * A function for serializing request body parameter. By default,\n   * {@link JSON.stringify()} will be used.\n   */\n  bodySerializer?: BodySerializer | null;\n  /**\n   * An object containing any HTTP headers that you want to pre-populate your\n   * `Headers` object with.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/Headers/Headers#init See more}\n   */\n  headers?:\n    | RequestInit['headers']\n    | Record<\n        string,\n        string | number | boolean | (string | number | boolean)[] | null | undefined | unknown\n      >;\n  /**\n   * The request method.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/fetch#method See more}\n   */\n  method?: Uppercase<HttpMethod>;\n  /**\n   * A function for serializing request query parameters. By default, arrays\n   * will be exploded in form style, objects will be exploded in deepObject\n   * style, and reserved characters are percent-encoded.\n   *\n   * This method will have no effect if the native `paramsSerializer()` Axios\n   * API function is used.\n   *\n   * {@link https://swagger.io/docs/specification/serialization/#query View examples}\n   */\n  querySerializer?: QuerySerializer | QuerySerializerOptions;\n  /**\n   * A function validating request data. This is useful if you want to ensure\n   * the request conforms to the desired shape, so it can be safely sent to\n   * the server.\n   */\n  requestValidator?: (data: unknown) => Promise<unknown>;\n  /**\n   * A function transforming response data before it's returned. This is useful\n   * for post-processing data, e.g. converting ISO strings into Date objects.\n   */\n  responseTransformer?: (data: unknown) => Promise<unknown>;\n  /**\n   * A function validating response data. This is useful if you want to ensure\n   * the response conforms to the desired shape, so it can be safely passed to\n   * the transformers and returned to the user.\n   */\n  responseValidator?: (data: unknown) => Promise<unknown>;\n}\n\ntype IsExactlyNeverOrNeverUndefined<T> = [T] extends [never]\n  ? true\n  : [T] extends [never | undefined]\n    ? [undefined] extends [T]\n      ? false\n      : true\n    : false;\n\nexport type OmitNever<T extends Record<string, unknown>> = {\n  [K in keyof T as IsExactlyNeverOrNeverUndefined<T[K]> extends true ? never : K]: T[K];\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@hey-api/typescript/transforms-read-write-ignore/core/utils.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@hey-api/typescript/transforms-read-write-ignore/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type { BarRead, BarWrite, Baz, ClientOptions, Corge, Foo, Foo2, FooRead, FooReadWrite, FooReadWriteRef, FooReadWriteRef2, FooWrite, PostFooReadData, PostFooReadResponse, PostFooReadResponses, PostFooReadWriteData, PostFooReadWriteResponse, PostFooReadWriteResponses, PostFooWriteData, PostFooWriteResponse, PostFooWriteResponses, PutFooWriteData, PutFooWriteResponse, PutFooWriteResponses, Quux, QuxAllRead, QuxAllWrite } from './types.gen';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@hey-api/typescript/transforms-read-write-ignore/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type ClientOptions = {\n    baseUrl: `${string}://${string}` | (string & {});\n};\n\nexport type FooReadWrite = BarRead & {\n    foo?: string;\n};\n\nexport type FooRead = BarRead & {\n    readonly foo?: string;\n};\n\nexport type FooWrite = BarWrite & {\n    foo?: string;\n};\n\nexport type BarRead = Baz | QuxAllWrite | QuxAllRead | {\n    readonly bar?: string;\n};\n\nexport type BarWrite = Baz | QuxAllWrite | QuxAllRead | {\n    bar?: string;\n};\n\nexport type Baz = {\n    baz?: string;\n};\n\nexport type QuxAllWrite = {\n    baz?: string;\n};\n\nexport type QuxAllRead = {\n    readonly baz?: string;\n};\n\nexport type Quux = {\n    baz?: Array<Baz>;\n    qux?: QuxAllRead;\n};\n\nexport type Corge = {\n    foo?: {\n        baz?: boolean;\n    };\n    bar?: {\n        readonly baz?: boolean;\n    };\n};\n\nexport type FooReadWriteRef = {\n    foo?: FooReadWrite;\n    bar?: FooReadWriteRef;\n};\n\nexport type FooReadWriteRef2 = FooReadWrite;\n\n/**\n * Query parameter\n */\nexport type Foo = string;\n\n/**\n * PUT /foo-write payload\n */\nexport type Foo2 = {\n    foo?: BarRead;\n};\n\nexport type PostFooReadWriteData = {\n    body: FooReadWrite;\n    path?: never;\n    query?: never;\n    url: '/foo-read-write';\n};\n\nexport type PostFooReadWriteResponses = {\n    /**\n     * OK\n     */\n    200: FooReadWrite;\n};\n\nexport type PostFooReadWriteResponse = PostFooReadWriteResponses[keyof PostFooReadWriteResponses];\n\nexport type PostFooReadData = {\n    body: FooRead;\n    path?: never;\n    query?: never;\n    url: '/foo-read';\n};\n\nexport type PostFooReadResponses = {\n    /**\n     * OK\n     */\n    200: FooRead;\n};\n\nexport type PostFooReadResponse = PostFooReadResponses[keyof PostFooReadResponses];\n\nexport type PostFooWriteData = {\n    body: FooWrite;\n    path?: never;\n    query?: never;\n    url: '/foo-write';\n};\n\nexport type PostFooWriteResponses = {\n    /**\n     * OK\n     */\n    200: FooWrite;\n};\n\nexport type PostFooWriteResponse = PostFooWriteResponses[keyof PostFooWriteResponses];\n\nexport type PutFooWriteData = {\n    /**\n     * PUT /foo-write payload\n     */\n    body: Foo2;\n    path?: never;\n    query?: {\n        /**\n         * Query parameter\n         */\n        foo?: string;\n    };\n    url: '/foo-write';\n};\n\nexport type PutFooWriteResponses = {\n    /**\n     * OK\n     */\n    200: FooWrite;\n};\n\nexport type PutFooWriteResponse = PutFooWriteResponses[keyof PutFooWriteResponses];\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@pinia/colada/asClass/@pinia/colada.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport { type _JSONValue, defineQueryOptions, type UseMutationOptions } from '@pinia/colada';\n\nimport { serializeQueryKeyValue } from '../client';\nimport { client } from '../client.gen';\nimport { BarBazService, BarService, FooBazService, FooService, type Options } from '../sdk.gen';\nimport type { FooBarPostData, FooBarPostResponse, FooBarPutData, FooBarPutResponse, FooPostData, FooPostResponse, FooPutData, FooPutResponse, GetFooBarData, GetFooBarResponse, GetFooData, GetFooResponse } from '../types.gen';\n\nexport type QueryKey<TOptions extends Options> = [\n    Pick<TOptions, 'path'> & {\n        _id: string;\n        baseUrl?: _JSONValue;\n        body?: _JSONValue;\n        query?: _JSONValue;\n        tags?: _JSONValue;\n    }\n];\n\nconst createQueryKey = <TOptions extends Options>(id: string, options?: TOptions, tags?: ReadonlyArray<string>): [\n    QueryKey<TOptions>[0]\n] => {\n    const params: QueryKey<TOptions>[0] = { _id: id, baseUrl: options?.baseUrl || (options?.client ?? client).getConfig().baseUrl } as QueryKey<TOptions>[0];\n    if (tags) {\n        params.tags = tags as unknown as _JSONValue;\n    }\n    if (options?.body !== undefined) {\n        const normalizedBody = serializeQueryKeyValue(options.body);\n        if (normalizedBody !== undefined) {\n            params.body = normalizedBody;\n        }\n    }\n    if (options?.path) {\n        params.path = options.path;\n    }\n    if (options?.query !== undefined) {\n        const normalizedQuery = serializeQueryKeyValue(options.query);\n        if (normalizedQuery !== undefined) {\n            params.query = normalizedQuery;\n        }\n    }\n    return [params];\n};\n\nexport const getFooQueryKey = (options?: Options<GetFooData>) => createQueryKey('getFoo', options);\n\nexport const getFooQuery = defineQueryOptions<Options<GetFooData>, GetFooResponse, Error>((options?: Options<GetFooData>) => ({\n    key: getFooQueryKey(options),\n    query: async (context) => {\n        const { data } = await FooBazService.getFoo({\n            ...options,\n            ...context,\n            throwOnError: true\n        });\n        return data;\n    }\n}));\n\nexport const fooPostMutation = (options?: Partial<Options<FooPostData>>): UseMutationOptions<FooPostResponse, Options<FooPostData>, Error> => ({\n    mutation: async (vars) => {\n        const { data } = await FooService.post({\n            ...options,\n            ...vars,\n            throwOnError: true\n        });\n        return data;\n    }\n});\n\nexport const fooPutMutation = (options?: Partial<Options<FooPutData>>): UseMutationOptions<FooPutResponse, Options<FooPutData>, Error> => ({\n    mutation: async (vars) => {\n        const { data } = await FooService.put({\n            ...options,\n            ...vars,\n            throwOnError: true\n        });\n        return data;\n    }\n});\n\nexport const getFooBarQueryKey = (options?: Options<GetFooBarData>) => createQueryKey('getFooBar', options);\n\nexport const getFooBarQuery = defineQueryOptions<Options<GetFooBarData>, GetFooBarResponse, Error>((options?: Options<GetFooBarData>) => ({\n    key: getFooBarQueryKey(options),\n    query: async (context) => {\n        const { data } = await BarBazService.getFooBar({\n            ...options,\n            ...context,\n            throwOnError: true\n        });\n        return data;\n    }\n}));\n\nexport const fooBarPostMutation = (options?: Partial<Options<FooBarPostData>>): UseMutationOptions<FooBarPostResponse, Options<FooBarPostData>, Error> => ({\n    mutation: async (vars) => {\n        const { data } = await BarService.post({\n            ...options,\n            ...vars,\n            throwOnError: true\n        });\n        return data;\n    }\n});\n\nexport const fooBarPutMutation = (options?: Partial<Options<FooBarPutData>>): UseMutationOptions<FooBarPutResponse, Options<FooBarPutData>, Error> => ({\n    mutation: async (vars) => {\n        const { data } = await BarService.put({\n            ...options,\n            ...vars,\n            throwOnError: true\n        });\n        return data;\n    }\n});\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@pinia/colada/asClass/client/client.gen.ts",
    "content": "// 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 (options: RequestOptions) => {\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 url = buildUrl(opts);\n\n    return { opts, url };\n  };\n\n  const request: Client['request'] = async (options) => {\n    // @ts-expect-error\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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@pinia/colada/asClass/client/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type { Auth } from '../core/auth.gen';\nexport type { QuerySerializerOptions } from '../core/bodySerializer.gen';\nexport {\n  formDataBodySerializer,\n  jsonBodySerializer,\n  urlSearchParamsBodySerializer,\n} from '../core/bodySerializer.gen';\nexport { buildClientParams } from '../core/params.gen';\nexport { serializeQueryKeyValue } from '../core/queryKeySerializer.gen';\nexport { createClient } from './client.gen';\nexport type {\n  Client,\n  ClientOptions,\n  Config,\n  CreateClientConfig,\n  Options,\n  RequestOptions,\n  RequestResult,\n  ResolvedRequestOptions,\n  ResponseStyle,\n  TDataShape,\n} from './types.gen';\nexport { createConfig, mergeHeaders } from './utils.gen';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@pinia/colada/asClass/client/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { Auth } from '../core/auth.gen';\nimport type {\n  ServerSentEventsOptions,\n  ServerSentEventsResult,\n} from '../core/serverSentEvents.gen';\nimport type { Client as CoreClient, Config as CoreConfig } from '../core/types.gen';\nimport type { Middleware } from './utils.gen';\n\nexport type ResponseStyle = 'data' | 'fields';\n\nexport interface Config<T extends ClientOptions = ClientOptions>\n  extends Omit<RequestInit, 'body' | 'headers' | 'method'>, CoreConfig {\n  /**\n   * Base URL for all requests made by this client.\n   */\n  baseUrl?: T['baseUrl'];\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   * Please don't use the Fetch client for Next.js applications. The `next`\n   * options won't have any effect.\n   *\n   * Install {@link https://www.npmjs.com/package/@hey-api/client-next `@hey-api/client-next`} instead.\n   */\n  next?: never;\n  /**\n   * Return the response data parsed in a specified format. By default, `auto`\n   * will infer the appropriate method from the `Content-Type` response header.\n   * You can override this behavior with any of the {@link Body} methods.\n   * Select `stream` if you don't want to parse response data at all.\n   *\n   * @default 'auto'\n   */\n  parseAs?: 'arrayBuffer' | 'auto' | 'blob' | 'formData' | 'json' | 'stream' | 'text';\n  /**\n   * Should we return only data or multiple fields (data, error, response, etc.)?\n   *\n   * @default 'fields'\n   */\n  responseStyle?: ResponseStyle;\n  /**\n   * Throw an error instead of returning it in the response?\n   *\n   * @default false\n   */\n  throwOnError?: T['throwOnError'];\n}\n\nexport interface RequestOptions<\n  TData = unknown,\n  TResponseStyle extends ResponseStyle = 'fields',\n  ThrowOnError extends boolean = boolean,\n  Url extends string = string,\n>\n  extends\n    Config<{\n      responseStyle: TResponseStyle;\n      throwOnError: ThrowOnError;\n    }>,\n    Pick<\n      ServerSentEventsOptions<TData>,\n      | 'onRequest'\n      | 'onSseError'\n      | 'onSseEvent'\n      | 'sseDefaultRetryDelay'\n      | 'sseMaxRetryAttempts'\n      | 'sseMaxRetryDelay'\n    > {\n  /**\n   * Any body that you want to add to your request.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/fetch#body}\n   */\n  body?: unknown;\n  path?: Record<string, unknown>;\n  query?: Record<string, unknown>;\n  /**\n   * Security mechanism(s) to use for the request.\n   */\n  security?: ReadonlyArray<Auth>;\n  url: Url;\n}\n\nexport interface ResolvedRequestOptions<\n  TResponseStyle extends ResponseStyle = 'fields',\n  ThrowOnError extends boolean = boolean,\n  Url extends string = string,\n> extends RequestOptions<unknown, TResponseStyle, ThrowOnError, Url> {\n  serializedBody?: string;\n}\n\nexport type RequestResult<\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = boolean,\n  TResponseStyle extends ResponseStyle = 'fields',\n> = ThrowOnError extends true\n  ? Promise<\n      TResponseStyle extends 'data'\n        ? TData extends Record<string, unknown>\n          ? TData[keyof TData]\n          : TData\n        : {\n            data: TData extends Record<string, unknown> ? TData[keyof TData] : TData;\n            request: Request;\n            response: Response;\n          }\n    >\n  : Promise<\n      TResponseStyle extends 'data'\n        ? (TData extends Record<string, unknown> ? TData[keyof TData] : TData) | undefined\n        : (\n            | {\n                data: TData extends Record<string, unknown> ? TData[keyof TData] : TData;\n                error: undefined;\n              }\n            | {\n                data: undefined;\n                error: TError extends Record<string, unknown> ? TError[keyof TError] : TError;\n              }\n          ) & {\n            request: Request;\n            response: Response;\n          }\n    >;\n\nexport interface ClientOptions {\n  baseUrl?: string;\n  responseStyle?: ResponseStyle;\n  throwOnError?: boolean;\n}\n\ntype MethodFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'>,\n) => RequestResult<TData, TError, ThrowOnError, TResponseStyle>;\n\ntype SseFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'>,\n) => Promise<ServerSentEventsResult<TData, TError>>;\n\ntype RequestFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'> &\n    Pick<Required<RequestOptions<TData, TResponseStyle, ThrowOnError>>, 'method'>,\n) => RequestResult<TData, TError, ThrowOnError, TResponseStyle>;\n\ntype BuildUrlFn = <\n  TData extends {\n    body?: unknown;\n    path?: Record<string, unknown>;\n    query?: Record<string, unknown>;\n    url: string;\n  },\n>(\n  options: TData & Options<TData>,\n) => string;\n\nexport type Client = CoreClient<RequestFn, Config, MethodFn, BuildUrlFn, SseFn> & {\n  interceptors: Middleware<Request, Response, unknown, ResolvedRequestOptions>;\n};\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 = ClientOptions> = (\n  override?: Config<ClientOptions & T>,\n) => Config<Required<ClientOptions> & T>;\n\nexport interface TDataShape {\n  body?: unknown;\n  headers?: unknown;\n  path?: unknown;\n  query?: unknown;\n  url: string;\n}\n\ntype OmitKeys<T, K> = Pick<T, Exclude<keyof T, K>>;\n\nexport type Options<\n  TData extends TDataShape = TDataShape,\n  ThrowOnError extends boolean = boolean,\n  TResponse = unknown,\n  TResponseStyle extends ResponseStyle = 'fields',\n> = OmitKeys<\n  RequestOptions<TResponse, TResponseStyle, ThrowOnError>,\n  'body' | 'path' | 'query' | 'url'\n> &\n  ([TData] extends [never] ? unknown : Omit<TData, 'url'>);\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@pinia/colada/asClass/client/utils.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@pinia/colada/asClass/client.gen.ts",
    "content": "// 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>());\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@pinia/colada/asClass/core/auth.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@pinia/colada/asClass/core/bodySerializer.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@pinia/colada/asClass/core/params.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@pinia/colada/asClass/core/pathSerializer.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@pinia/colada/asClass/core/queryKeySerializer.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\n/**\n * JSON-friendly union that mirrors what Pinia Colada can hash.\n */\nexport type JsonValue =\n  | null\n  | string\n  | number\n  | boolean\n  | JsonValue[]\n  | { [key: string]: JsonValue };\n\n/**\n * Replacer that converts non-JSON values (bigint, Date, etc.) to safe substitutes.\n */\nexport const queryKeyJsonReplacer = (_key: string, value: unknown) => {\n  if (value === undefined || typeof value === 'function' || typeof value === 'symbol') {\n    return undefined;\n  }\n  if (typeof value === 'bigint') {\n    return value.toString();\n  }\n  if (value instanceof Date) {\n    return value.toISOString();\n  }\n  return value;\n};\n\n/**\n * Safely stringifies a value and parses it back into a JsonValue.\n */\nexport const stringifyToJsonValue = (input: unknown): JsonValue | undefined => {\n  try {\n    const json = JSON.stringify(input, queryKeyJsonReplacer);\n    if (json === undefined) {\n      return undefined;\n    }\n    return JSON.parse(json) as JsonValue;\n  } catch {\n    return undefined;\n  }\n};\n\n/**\n * Detects plain objects (including objects with a null prototype).\n */\nconst isPlainObject = (value: unknown): value is Record<string, unknown> => {\n  if (value === null || typeof value !== 'object') {\n    return false;\n  }\n  const prototype = Object.getPrototypeOf(value as object);\n  return prototype === Object.prototype || prototype === null;\n};\n\n/**\n * Turns URLSearchParams into a sorted JSON object for deterministic keys.\n */\nconst serializeSearchParams = (params: URLSearchParams): JsonValue => {\n  const entries = Array.from(params.entries()).sort(([a], [b]) => a.localeCompare(b));\n  const result: Record<string, JsonValue> = {};\n\n  for (const [key, value] of entries) {\n    const existing = result[key];\n    if (existing === undefined) {\n      result[key] = value;\n      continue;\n    }\n\n    if (Array.isArray(existing)) {\n      (existing as string[]).push(value);\n    } else {\n      result[key] = [existing, value];\n    }\n  }\n\n  return result;\n};\n\n/**\n * Normalizes any accepted value into a JSON-friendly shape for query keys.\n */\nexport const serializeQueryKeyValue = (value: unknown): JsonValue | undefined => {\n  if (value === null) {\n    return null;\n  }\n\n  if (typeof value === 'string' || typeof value === 'number' || typeof value === 'boolean') {\n    return value;\n  }\n\n  if (value === undefined || typeof value === 'function' || typeof value === 'symbol') {\n    return undefined;\n  }\n\n  if (typeof value === 'bigint') {\n    return value.toString();\n  }\n\n  if (value instanceof Date) {\n    return value.toISOString();\n  }\n\n  if (Array.isArray(value)) {\n    return stringifyToJsonValue(value);\n  }\n\n  if (typeof URLSearchParams !== 'undefined' && value instanceof URLSearchParams) {\n    return serializeSearchParams(value);\n  }\n\n  if (isPlainObject(value)) {\n    return stringifyToJsonValue(value);\n  }\n\n  return undefined;\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@pinia/colada/asClass/core/serverSentEvents.gen.ts",
    "content": "// 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 const 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            // Normalize line endings: CRLF -> LF, then CR -> LF\n            buffer = buffer.replace(/\\r\\n/g, '\\n').replace(/\\r/g, '\\n');\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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@pinia/colada/asClass/core/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { Auth, AuthToken } from './auth.gen';\nimport type { BodySerializer, QuerySerializer, QuerySerializerOptions } from './bodySerializer.gen';\n\nexport type HttpMethod =\n  | 'connect'\n  | 'delete'\n  | 'get'\n  | 'head'\n  | 'options'\n  | 'patch'\n  | 'post'\n  | 'put'\n  | 'trace';\n\nexport type Client<\n  RequestFn = never,\n  Config = unknown,\n  MethodFn = never,\n  BuildUrlFn = never,\n  SseFn = never,\n> = {\n  /**\n   * Returns the final request URL.\n   */\n  buildUrl: BuildUrlFn;\n  getConfig: () => Config;\n  request: RequestFn;\n  setConfig: (config: Config) => Config;\n} & {\n  [K in HttpMethod]: MethodFn;\n} & ([SseFn] extends [never] ? { sse?: never } : { sse: { [K in HttpMethod]: SseFn } });\n\nexport interface Config {\n  /**\n   * Auth token or a function returning auth token. The resolved value will be\n   * added to the request payload as defined by its `security` array.\n   */\n  auth?: ((auth: Auth) => Promise<AuthToken> | AuthToken) | AuthToken;\n  /**\n   * A function for serializing request body parameter. By default,\n   * {@link JSON.stringify()} will be used.\n   */\n  bodySerializer?: BodySerializer | null;\n  /**\n   * An object containing any HTTP headers that you want to pre-populate your\n   * `Headers` object with.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/Headers/Headers#init See more}\n   */\n  headers?:\n    | RequestInit['headers']\n    | Record<\n        string,\n        string | number | boolean | (string | number | boolean)[] | null | undefined | unknown\n      >;\n  /**\n   * The request method.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/fetch#method See more}\n   */\n  method?: Uppercase<HttpMethod>;\n  /**\n   * A function for serializing request query parameters. By default, arrays\n   * will be exploded in form style, objects will be exploded in deepObject\n   * style, and reserved characters are percent-encoded.\n   *\n   * This method will have no effect if the native `paramsSerializer()` Axios\n   * API function is used.\n   *\n   * {@link https://swagger.io/docs/specification/serialization/#query View examples}\n   */\n  querySerializer?: QuerySerializer | QuerySerializerOptions;\n  /**\n   * A function validating request data. This is useful if you want to ensure\n   * the request conforms to the desired shape, so it can be safely sent to\n   * the server.\n   */\n  requestValidator?: (data: unknown) => Promise<unknown>;\n  /**\n   * A function transforming response data before it's returned. This is useful\n   * for post-processing data, e.g. converting ISO strings into Date objects.\n   */\n  responseTransformer?: (data: unknown) => Promise<unknown>;\n  /**\n   * A function validating response data. This is useful if you want to ensure\n   * the response conforms to the desired shape, so it can be safely passed to\n   * the transformers and returned to the user.\n   */\n  responseValidator?: (data: unknown) => Promise<unknown>;\n}\n\ntype IsExactlyNeverOrNeverUndefined<T> = [T] extends [never]\n  ? true\n  : [T] extends [never | undefined]\n    ? [undefined] extends [T]\n      ? false\n      : true\n    : false;\n\nexport type OmitNever<T extends Record<string, unknown>> = {\n  [K in keyof T as IsExactlyNeverOrNeverUndefined<T[K]> extends true ? never : K]: T[K];\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@pinia/colada/asClass/core/utils.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@pinia/colada/asClass/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport { BarBazService, BarService, BarService2, FooBazService, FooService, FooService2, type Options } from './sdk.gen';\nexport type { ClientOptions, FooBarPostData, FooBarPostResponse, FooBarPostResponses, FooBarPutData, FooBarPutResponse, FooBarPutResponses, FooPostData, FooPostResponse, FooPostResponses, FooPutData, FooPutResponse, FooPutResponses, GetFooBarData, GetFooBarResponse, GetFooBarResponses, GetFooData, GetFooResponse, GetFooResponses } from './types.gen';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@pinia/colada/asClass/sdk.gen.ts",
    "content": "// 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 { FooBarPostData, FooBarPostResponses, FooBarPutData, FooBarPutResponses, FooPostData, FooPostResponses, FooPutData, FooPutResponses, GetFooBarData, GetFooBarResponses, GetFooData, GetFooResponses } from './types.gen';\n\nexport type Options<TData extends TDataShape = TDataShape, ThrowOnError extends boolean = boolean> = Options2<TData, ThrowOnError> & {\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\nexport class BarService {\n    public static post<ThrowOnError extends boolean = false>(options?: Options<FooBarPostData, ThrowOnError>) {\n        return (options?.client ?? client).post<FooBarPostResponses, unknown, ThrowOnError>({ url: '/foo/bar', ...options });\n    }\n    \n    public static put<ThrowOnError extends boolean = false>(options?: Options<FooBarPutData, ThrowOnError>) {\n        return (options?.client ?? client).put<FooBarPutResponses, unknown, ThrowOnError>({ url: '/foo/bar', ...options });\n    }\n}\n\nexport class FooService {\n    public static post<ThrowOnError extends boolean = false>(options?: Options<FooPostData, ThrowOnError>) {\n        return (options?.client ?? client).post<FooPostResponses, unknown, ThrowOnError>({ url: '/foo', ...options });\n    }\n    \n    public static put<ThrowOnError extends boolean = false>(options?: Options<FooPutData, ThrowOnError>) {\n        return (options?.client ?? client).put<FooPutResponses, unknown, ThrowOnError>({ url: '/foo', ...options });\n    }\n    \n    static barService = BarService;\n}\n\nexport class FooBazService {\n    public static getFoo<ThrowOnError extends boolean = false>(options?: Options<GetFooData, ThrowOnError>) {\n        return (options?.client ?? client).get<GetFooResponses, unknown, ThrowOnError>({ url: '/foo', ...options });\n    }\n    \n    static fooService = FooService;\n}\n\nexport class BarService2 {\n    public static post<ThrowOnError extends boolean = false>(options?: Options<FooBarPostData, ThrowOnError>) {\n        return (options?.client ?? client).post<FooBarPostResponses, unknown, ThrowOnError>({ url: '/foo/bar', ...options });\n    }\n    \n    public static put<ThrowOnError extends boolean = false>(options?: Options<FooBarPutData, ThrowOnError>) {\n        return (options?.client ?? client).put<FooBarPutResponses, unknown, ThrowOnError>({ url: '/foo/bar', ...options });\n    }\n}\n\nexport class FooService2 {\n    static barService = BarService2;\n}\n\nexport class BarBazService {\n    public static getFooBar<ThrowOnError extends boolean = false>(options?: Options<GetFooBarData, ThrowOnError>) {\n        return (options?.client ?? client).get<GetFooBarResponses, unknown, ThrowOnError>({ url: '/foo/bar', ...options });\n    }\n    \n    static fooService = FooService2;\n}\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@pinia/colada/asClass/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type ClientOptions = {\n    baseUrl: `${string}://${string}` | (string & {});\n};\n\nexport type GetFooData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/foo';\n};\n\nexport type GetFooResponses = {\n    /**\n     * OK\n     */\n    200: string;\n};\n\nexport type GetFooResponse = GetFooResponses[keyof GetFooResponses];\n\nexport type FooPostData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/foo';\n};\n\nexport type FooPostResponses = {\n    /**\n     * OK\n     */\n    200: string;\n};\n\nexport type FooPostResponse = FooPostResponses[keyof FooPostResponses];\n\nexport type FooPutData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/foo';\n};\n\nexport type FooPutResponses = {\n    /**\n     * OK\n     */\n    200: string;\n};\n\nexport type FooPutResponse = FooPutResponses[keyof FooPutResponses];\n\nexport type GetFooBarData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/foo/bar';\n};\n\nexport type GetFooBarResponses = {\n    /**\n     * OK\n     */\n    200: string;\n};\n\nexport type GetFooBarResponse = GetFooBarResponses[keyof GetFooBarResponses];\n\nexport type FooBarPostData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/foo/bar';\n};\n\nexport type FooBarPostResponses = {\n    /**\n     * OK\n     */\n    200: string;\n};\n\nexport type FooBarPostResponse = FooBarPostResponses[keyof FooBarPostResponses];\n\nexport type FooBarPutData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/foo/bar';\n};\n\nexport type FooBarPutResponses = {\n    /**\n     * OK\n     */\n    200: string;\n};\n\nexport type FooBarPutResponse = FooBarPutResponses[keyof FooBarPutResponses];\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@pinia/colada/fetch/@pinia/colada.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport { type _JSONValue, defineQueryOptions, type UseMutationOptions } from '@pinia/colada';\n\nimport { serializeQueryKeyValue } from '../client';\nimport { client } from '../client.gen';\nimport { apiVVersionODataControllerCount, callToTestOrderOfParams, callWithDefaultOptionalParameters, callWithDefaultParameters, callWithDescriptions, callWithDuplicateResponses, callWithNoContentResponse, callWithParameters, callWithResponse, callWithResponseAndNoContentResponse, callWithResponses, callWithResultFromHeader, callWithWeirdParameterNames, collectionFormat, complexParams, complexTypes, deleteCallWithoutParametersAndResponse, deleteFoo, deprecatedCall, dummyA, dummyB, duplicateName, duplicateName2, duplicateName3, duplicateName4, export_, fileResponse, fooWow, getApiVbyApiVersionSimpleOperation, getCallWithOptionalParam, getCallWithoutParametersAndResponse, import_, multipartRequest, multipartResponse, nonAsciiæøåÆøÅöôêÊ字符串, type Options, patchApiVbyApiVersionNoTag, patchCallWithoutParametersAndResponse, postApiVbyApiVersionFormData, postApiVbyApiVersionRequestBody, postCallWithOptionalParam, postCallWithoutParametersAndResponse, putCallWithoutParametersAndResponse, putWithFormUrlEncoded, testErrorCode, types, uploadFile } from '../sdk.gen';\nimport type { ApiVVersionODataControllerCountData, ApiVVersionODataControllerCountResponse, CallToTestOrderOfParamsData, CallWithDefaultOptionalParametersData, CallWithDefaultParametersData, CallWithDescriptionsData, CallWithDuplicateResponsesData, CallWithDuplicateResponsesError, CallWithDuplicateResponsesResponse, CallWithNoContentResponseData, CallWithNoContentResponseResponse, CallWithParametersData, CallWithResponseAndNoContentResponseData, CallWithResponseAndNoContentResponseResponse, CallWithResponseData, CallWithResponseResponse, CallWithResponsesData, CallWithResponsesError, CallWithResponsesResponse, CallWithResultFromHeaderData, CallWithWeirdParameterNamesData, CollectionFormatData, ComplexParamsData, ComplexParamsResponse, ComplexTypesData, ComplexTypesResponse, DeleteCallWithoutParametersAndResponseData, DeleteFooData3, DeprecatedCallData, DummyAData, DummyAResponse, DummyBData, DummyBResponse, DuplicateName2Data, DuplicateName3Data, DuplicateName4Data, DuplicateNameData, ExportData, FileResponseData, FileResponseResponse, FooWowData, GetApiVbyApiVersionSimpleOperationData, GetApiVbyApiVersionSimpleOperationError, GetApiVbyApiVersionSimpleOperationResponse, GetCallWithOptionalParamData, GetCallWithoutParametersAndResponseData, ImportData, ImportResponse, MultipartRequestData, MultipartResponseData, MultipartResponseResponse, NonAsciiæøåÆøÅöôêÊ字符串Data, NonAsciiæøåÆøÅöôêÊ字符串Response, PatchApiVbyApiVersionNoTagData, PatchCallWithoutParametersAndResponseData, PostApiVbyApiVersionFormDataData, PostApiVbyApiVersionRequestBodyData, PostCallWithOptionalParamData, PostCallWithOptionalParamResponse, PostCallWithoutParametersAndResponseData, PutCallWithoutParametersAndResponseData, PutWithFormUrlEncodedData, TestErrorCodeData, TypesData, TypesResponse, UploadFileData, UploadFileResponse } from '../types.gen';\n\nexport type QueryKey<TOptions extends Options> = [\n    Pick<TOptions, 'path'> & {\n        _id: string;\n        baseUrl?: _JSONValue;\n        body?: _JSONValue;\n        query?: _JSONValue;\n        tags?: _JSONValue;\n    }\n];\n\nconst createQueryKey = <TOptions extends Options>(id: string, options?: TOptions, tags?: ReadonlyArray<string>): [\n    QueryKey<TOptions>[0]\n] => {\n    const params: QueryKey<TOptions>[0] = { _id: id, baseUrl: options?.baseUrl || (options?.client ?? client).getConfig().baseUrl } as QueryKey<TOptions>[0];\n    if (tags) {\n        params.tags = tags as unknown as _JSONValue;\n    }\n    if (options?.body !== undefined) {\n        const normalizedBody = serializeQueryKeyValue(options.body);\n        if (normalizedBody !== undefined) {\n            params.body = normalizedBody;\n        }\n    }\n    if (options?.path) {\n        params.path = options.path;\n    }\n    if (options?.query !== undefined) {\n        const normalizedQuery = serializeQueryKeyValue(options.query);\n        if (normalizedQuery !== undefined) {\n            params.query = normalizedQuery;\n        }\n    }\n    return [params];\n};\n\nexport const exportQueryKey = (options?: Options<ExportData>) => createQueryKey('export', options);\n\nexport const exportQuery = defineQueryOptions<Options<ExportData>, unknown, Error>((options?: Options<ExportData>) => ({\n    key: exportQueryKey(options),\n    query: async (context) => {\n        const { data } = await export_({\n            ...options,\n            ...context,\n            throwOnError: true\n        });\n        return data;\n    }\n}));\n\nexport const patchApiVbyApiVersionNoTagMutation = (options?: Partial<Options<PatchApiVbyApiVersionNoTagData>>): UseMutationOptions<unknown, Options<PatchApiVbyApiVersionNoTagData>, Error> => ({\n    mutation: async (vars) => {\n        const { data } = await patchApiVbyApiVersionNoTag({\n            ...options,\n            ...vars,\n            throwOnError: true\n        });\n        return data;\n    }\n});\n\nexport const importMutation = (options?: Partial<Options<ImportData>>): UseMutationOptions<ImportResponse, Options<ImportData>, Error> => ({\n    mutation: async (vars) => {\n        const { data } = await import_({\n            ...options,\n            ...vars,\n            throwOnError: true\n        });\n        return data;\n    }\n});\n\nexport const fooWowMutation = (options?: Partial<Options<FooWowData>>): UseMutationOptions<unknown, Options<FooWowData>, Error> => ({\n    mutation: async (vars) => {\n        const { data } = await fooWow({\n            ...options,\n            ...vars,\n            throwOnError: true\n        });\n        return data;\n    }\n});\n\nexport const apiVVersionODataControllerCountQueryKey = (options?: Options<ApiVVersionODataControllerCountData>) => createQueryKey('apiVVersionODataControllerCount', options);\n\nexport const apiVVersionODataControllerCountQuery = defineQueryOptions<Options<ApiVVersionODataControllerCountData>, ApiVVersionODataControllerCountResponse, Error>((options?: Options<ApiVVersionODataControllerCountData>) => ({\n    key: apiVVersionODataControllerCountQueryKey(options),\n    query: async (context) => {\n        const { data } = await apiVVersionODataControllerCount({\n            ...options,\n            ...context,\n            throwOnError: true\n        });\n        return data;\n    }\n}));\n\nexport const getApiVbyApiVersionSimpleOperationQueryKey = (options: Options<GetApiVbyApiVersionSimpleOperationData>) => createQueryKey('getApiVbyApiVersionSimpleOperation', options);\n\nexport const getApiVbyApiVersionSimpleOperationQuery = defineQueryOptions<Options<GetApiVbyApiVersionSimpleOperationData>, GetApiVbyApiVersionSimpleOperationResponse, GetApiVbyApiVersionSimpleOperationError>((options: Options<GetApiVbyApiVersionSimpleOperationData>) => ({\n    key: getApiVbyApiVersionSimpleOperationQueryKey(options),\n    query: async (context) => {\n        const { data } = await getApiVbyApiVersionSimpleOperation({\n            ...options,\n            ...context,\n            throwOnError: true\n        });\n        return data;\n    }\n}));\n\nexport const deleteCallWithoutParametersAndResponseMutation = (options?: Partial<Options<DeleteCallWithoutParametersAndResponseData>>): UseMutationOptions<unknown, Options<DeleteCallWithoutParametersAndResponseData>, Error> => ({\n    mutation: async (vars) => {\n        const { data } = await deleteCallWithoutParametersAndResponse({\n            ...options,\n            ...vars,\n            throwOnError: true\n        });\n        return data;\n    }\n});\n\nexport const getCallWithoutParametersAndResponseQueryKey = (options?: Options<GetCallWithoutParametersAndResponseData>) => createQueryKey('getCallWithoutParametersAndResponse', options);\n\nexport const getCallWithoutParametersAndResponseQuery = defineQueryOptions<Options<GetCallWithoutParametersAndResponseData>, unknown, Error>((options?: Options<GetCallWithoutParametersAndResponseData>) => ({\n    key: getCallWithoutParametersAndResponseQueryKey(options),\n    query: async (context) => {\n        const { data } = await getCallWithoutParametersAndResponse({\n            ...options,\n            ...context,\n            throwOnError: true\n        });\n        return data;\n    }\n}));\n\nexport const patchCallWithoutParametersAndResponseMutation = (options?: Partial<Options<PatchCallWithoutParametersAndResponseData>>): UseMutationOptions<unknown, Options<PatchCallWithoutParametersAndResponseData>, Error> => ({\n    mutation: async (vars) => {\n        const { data } = await patchCallWithoutParametersAndResponse({\n            ...options,\n            ...vars,\n            throwOnError: true\n        });\n        return data;\n    }\n});\n\nexport const postCallWithoutParametersAndResponseMutation = (options?: Partial<Options<PostCallWithoutParametersAndResponseData>>): UseMutationOptions<unknown, Options<PostCallWithoutParametersAndResponseData>, Error> => ({\n    mutation: async (vars) => {\n        const { data } = await postCallWithoutParametersAndResponse({\n            ...options,\n            ...vars,\n            throwOnError: true\n        });\n        return data;\n    }\n});\n\nexport const putCallWithoutParametersAndResponseMutation = (options?: Partial<Options<PutCallWithoutParametersAndResponseData>>): UseMutationOptions<unknown, Options<PutCallWithoutParametersAndResponseData>, Error> => ({\n    mutation: async (vars) => {\n        const { data } = await putCallWithoutParametersAndResponse({\n            ...options,\n            ...vars,\n            throwOnError: true\n        });\n        return data;\n    }\n});\n\nexport const deleteFooMutation = (options?: Partial<Options<DeleteFooData3>>): UseMutationOptions<unknown, Options<DeleteFooData3>, Error> => ({\n    mutation: async (vars) => {\n        const { data } = await deleteFoo({\n            ...options,\n            ...vars,\n            throwOnError: true\n        });\n        return data;\n    }\n});\n\nexport const callWithDescriptionsMutation = (options?: Partial<Options<CallWithDescriptionsData>>): UseMutationOptions<unknown, Options<CallWithDescriptionsData>, Error> => ({\n    mutation: async (vars) => {\n        const { data } = await callWithDescriptions({\n            ...options,\n            ...vars,\n            throwOnError: true\n        });\n        return data;\n    }\n});\n\n/**\n * @deprecated\n */\nexport const deprecatedCallMutation = (options?: Partial<Options<DeprecatedCallData>>): UseMutationOptions<unknown, Options<DeprecatedCallData>, Error> => ({\n    mutation: async (vars) => {\n        const { data } = await deprecatedCall({\n            ...options,\n            ...vars,\n            throwOnError: true\n        });\n        return data;\n    }\n});\n\nexport const callWithParametersMutation = (options?: Partial<Options<CallWithParametersData>>): UseMutationOptions<unknown, Options<CallWithParametersData>, Error> => ({\n    mutation: async (vars) => {\n        const { data } = await callWithParameters({\n            ...options,\n            ...vars,\n            throwOnError: true\n        });\n        return data;\n    }\n});\n\nexport const callWithWeirdParameterNamesMutation = (options?: Partial<Options<CallWithWeirdParameterNamesData>>): UseMutationOptions<unknown, Options<CallWithWeirdParameterNamesData>, Error> => ({\n    mutation: async (vars) => {\n        const { data } = await callWithWeirdParameterNames({\n            ...options,\n            ...vars,\n            throwOnError: true\n        });\n        return data;\n    }\n});\n\nexport const getCallWithOptionalParamQueryKey = (options: Options<GetCallWithOptionalParamData>) => createQueryKey('getCallWithOptionalParam', options);\n\nexport const getCallWithOptionalParamQuery = defineQueryOptions<Options<GetCallWithOptionalParamData>, unknown, Error>((options: Options<GetCallWithOptionalParamData>) => ({\n    key: getCallWithOptionalParamQueryKey(options),\n    query: async (context) => {\n        const { data } = await getCallWithOptionalParam({\n            ...options,\n            ...context,\n            throwOnError: true\n        });\n        return data;\n    }\n}));\n\nexport const postCallWithOptionalParamMutation = (options?: Partial<Options<PostCallWithOptionalParamData>>): UseMutationOptions<PostCallWithOptionalParamResponse, Options<PostCallWithOptionalParamData>, Error> => ({\n    mutation: async (vars) => {\n        const { data } = await postCallWithOptionalParam({\n            ...options,\n            ...vars,\n            throwOnError: true\n        });\n        return data;\n    }\n});\n\nexport const postApiVbyApiVersionRequestBodyMutation = (options?: Partial<Options<PostApiVbyApiVersionRequestBodyData>>): UseMutationOptions<unknown, Options<PostApiVbyApiVersionRequestBodyData>, Error> => ({\n    mutation: async (vars) => {\n        const { data } = await postApiVbyApiVersionRequestBody({\n            ...options,\n            ...vars,\n            throwOnError: true\n        });\n        return data;\n    }\n});\n\nexport const postApiVbyApiVersionFormDataMutation = (options?: Partial<Options<PostApiVbyApiVersionFormDataData>>): UseMutationOptions<unknown, Options<PostApiVbyApiVersionFormDataData>, Error> => ({\n    mutation: async (vars) => {\n        const { data } = await postApiVbyApiVersionFormData({\n            ...options,\n            ...vars,\n            throwOnError: true\n        });\n        return data;\n    }\n});\n\nexport const callWithDefaultParametersQueryKey = (options?: Options<CallWithDefaultParametersData>) => createQueryKey('callWithDefaultParameters', options);\n\nexport const callWithDefaultParametersQuery = defineQueryOptions<Options<CallWithDefaultParametersData>, unknown, Error>((options?: Options<CallWithDefaultParametersData>) => ({\n    key: callWithDefaultParametersQueryKey(options),\n    query: async (context) => {\n        const { data } = await callWithDefaultParameters({\n            ...options,\n            ...context,\n            throwOnError: true\n        });\n        return data;\n    }\n}));\n\nexport const callWithDefaultOptionalParametersMutation = (options?: Partial<Options<CallWithDefaultOptionalParametersData>>): UseMutationOptions<unknown, Options<CallWithDefaultOptionalParametersData>, Error> => ({\n    mutation: async (vars) => {\n        const { data } = await callWithDefaultOptionalParameters({\n            ...options,\n            ...vars,\n            throwOnError: true\n        });\n        return data;\n    }\n});\n\nexport const callToTestOrderOfParamsMutation = (options?: Partial<Options<CallToTestOrderOfParamsData>>): UseMutationOptions<unknown, Options<CallToTestOrderOfParamsData>, Error> => ({\n    mutation: async (vars) => {\n        const { data } = await callToTestOrderOfParams({\n            ...options,\n            ...vars,\n            throwOnError: true\n        });\n        return data;\n    }\n});\n\nexport const duplicateNameMutation = (options?: Partial<Options<DuplicateNameData>>): UseMutationOptions<unknown, Options<DuplicateNameData>, Error> => ({\n    mutation: async (vars) => {\n        const { data } = await duplicateName({\n            ...options,\n            ...vars,\n            throwOnError: true\n        });\n        return data;\n    }\n});\n\nexport const duplicateName2QueryKey = (options?: Options<DuplicateName2Data>) => createQueryKey('duplicateName2', options);\n\nexport const duplicateName2Query = defineQueryOptions<Options<DuplicateName2Data>, unknown, Error>((options?: Options<DuplicateName2Data>) => ({\n    key: duplicateName2QueryKey(options),\n    query: async (context) => {\n        const { data } = await duplicateName2({\n            ...options,\n            ...context,\n            throwOnError: true\n        });\n        return data;\n    }\n}));\n\nexport const duplicateName3Mutation = (options?: Partial<Options<DuplicateName3Data>>): UseMutationOptions<unknown, Options<DuplicateName3Data>, Error> => ({\n    mutation: async (vars) => {\n        const { data } = await duplicateName3({\n            ...options,\n            ...vars,\n            throwOnError: true\n        });\n        return data;\n    }\n});\n\nexport const duplicateName4Mutation = (options?: Partial<Options<DuplicateName4Data>>): UseMutationOptions<unknown, Options<DuplicateName4Data>, Error> => ({\n    mutation: async (vars) => {\n        const { data } = await duplicateName4({\n            ...options,\n            ...vars,\n            throwOnError: true\n        });\n        return data;\n    }\n});\n\nexport const callWithNoContentResponseQueryKey = (options?: Options<CallWithNoContentResponseData>) => createQueryKey('callWithNoContentResponse', options);\n\nexport const callWithNoContentResponseQuery = defineQueryOptions<Options<CallWithNoContentResponseData>, CallWithNoContentResponseResponse, Error>((options?: Options<CallWithNoContentResponseData>) => ({\n    key: callWithNoContentResponseQueryKey(options),\n    query: async (context) => {\n        const { data } = await callWithNoContentResponse({\n            ...options,\n            ...context,\n            throwOnError: true\n        });\n        return data;\n    }\n}));\n\nexport const callWithResponseAndNoContentResponseQueryKey = (options?: Options<CallWithResponseAndNoContentResponseData>) => createQueryKey('callWithResponseAndNoContentResponse', options);\n\nexport const callWithResponseAndNoContentResponseQuery = defineQueryOptions<Options<CallWithResponseAndNoContentResponseData>, CallWithResponseAndNoContentResponseResponse, Error>((options?: Options<CallWithResponseAndNoContentResponseData>) => ({\n    key: callWithResponseAndNoContentResponseQueryKey(options),\n    query: async (context) => {\n        const { data } = await callWithResponseAndNoContentResponse({\n            ...options,\n            ...context,\n            throwOnError: true\n        });\n        return data;\n    }\n}));\n\nexport const dummyAQueryKey = (options?: Options<DummyAData>) => createQueryKey('dummyA', options);\n\nexport const dummyAQuery = defineQueryOptions<Options<DummyAData>, DummyAResponse, Error>((options?: Options<DummyAData>) => ({\n    key: dummyAQueryKey(options),\n    query: async (context) => {\n        const { data } = await dummyA({\n            ...options,\n            ...context,\n            throwOnError: true\n        });\n        return data;\n    }\n}));\n\nexport const dummyBQueryKey = (options?: Options<DummyBData>) => createQueryKey('dummyB', options);\n\nexport const dummyBQuery = defineQueryOptions<Options<DummyBData>, DummyBResponse, Error>((options?: Options<DummyBData>) => ({\n    key: dummyBQueryKey(options),\n    query: async (context) => {\n        const { data } = await dummyB({\n            ...options,\n            ...context,\n            throwOnError: true\n        });\n        return data;\n    }\n}));\n\nexport const callWithResponseQueryKey = (options?: Options<CallWithResponseData>) => createQueryKey('callWithResponse', options);\n\nexport const callWithResponseQuery = defineQueryOptions<Options<CallWithResponseData>, CallWithResponseResponse, Error>((options?: Options<CallWithResponseData>) => ({\n    key: callWithResponseQueryKey(options),\n    query: async (context) => {\n        const { data } = await callWithResponse({\n            ...options,\n            ...context,\n            throwOnError: true\n        });\n        return data;\n    }\n}));\n\nexport const callWithDuplicateResponsesMutation = (options?: Partial<Options<CallWithDuplicateResponsesData>>): UseMutationOptions<CallWithDuplicateResponsesResponse, Options<CallWithDuplicateResponsesData>, CallWithDuplicateResponsesError> => ({\n    mutation: async (vars) => {\n        const { data } = await callWithDuplicateResponses({\n            ...options,\n            ...vars,\n            throwOnError: true\n        });\n        return data;\n    }\n});\n\nexport const callWithResponsesMutation = (options?: Partial<Options<CallWithResponsesData>>): UseMutationOptions<CallWithResponsesResponse, Options<CallWithResponsesData>, CallWithResponsesError> => ({\n    mutation: async (vars) => {\n        const { data } = await callWithResponses({\n            ...options,\n            ...vars,\n            throwOnError: true\n        });\n        return data;\n    }\n});\n\nexport const collectionFormatQueryKey = (options: Options<CollectionFormatData>) => createQueryKey('collectionFormat', options);\n\nexport const collectionFormatQuery = defineQueryOptions<Options<CollectionFormatData>, unknown, Error>((options: Options<CollectionFormatData>) => ({\n    key: collectionFormatQueryKey(options),\n    query: async (context) => {\n        const { data } = await collectionFormat({\n            ...options,\n            ...context,\n            throwOnError: true\n        });\n        return data;\n    }\n}));\n\nexport const typesQueryKey = (options: Options<TypesData>) => createQueryKey('types', options);\n\nexport const typesQuery = defineQueryOptions<Options<TypesData>, TypesResponse, Error>((options: Options<TypesData>) => ({\n    key: typesQueryKey(options),\n    query: async (context) => {\n        const { data } = await types({\n            ...options,\n            ...context,\n            throwOnError: true\n        });\n        return data;\n    }\n}));\n\nexport const uploadFileMutation = (options?: Partial<Options<UploadFileData>>): UseMutationOptions<UploadFileResponse, Options<UploadFileData>, Error> => ({\n    mutation: async (vars) => {\n        const { data } = await uploadFile({\n            ...options,\n            ...vars,\n            throwOnError: true\n        });\n        return data;\n    }\n});\n\nexport const fileResponseQueryKey = (options: Options<FileResponseData>) => createQueryKey('fileResponse', options);\n\nexport const fileResponseQuery = defineQueryOptions<Options<FileResponseData>, FileResponseResponse, Error>((options: Options<FileResponseData>) => ({\n    key: fileResponseQueryKey(options),\n    query: async (context) => {\n        const { data } = await fileResponse({\n            ...options,\n            ...context,\n            throwOnError: true\n        });\n        return data;\n    }\n}));\n\nexport const complexTypesQueryKey = (options: Options<ComplexTypesData>) => createQueryKey('complexTypes', options);\n\nexport const complexTypesQuery = defineQueryOptions<Options<ComplexTypesData>, ComplexTypesResponse, Error>((options: Options<ComplexTypesData>) => ({\n    key: complexTypesQueryKey(options),\n    query: async (context) => {\n        const { data } = await complexTypes({\n            ...options,\n            ...context,\n            throwOnError: true\n        });\n        return data;\n    }\n}));\n\nexport const multipartResponseQueryKey = (options?: Options<MultipartResponseData>) => createQueryKey('multipartResponse', options);\n\nexport const multipartResponseQuery = defineQueryOptions<Options<MultipartResponseData>, MultipartResponseResponse, Error>((options?: Options<MultipartResponseData>) => ({\n    key: multipartResponseQueryKey(options),\n    query: async (context) => {\n        const { data } = await multipartResponse({\n            ...options,\n            ...context,\n            throwOnError: true\n        });\n        return data;\n    }\n}));\n\nexport const multipartRequestMutation = (options?: Partial<Options<MultipartRequestData>>): UseMutationOptions<unknown, Options<MultipartRequestData>, Error> => ({\n    mutation: async (vars) => {\n        const { data } = await multipartRequest({\n            ...options,\n            ...vars,\n            throwOnError: true\n        });\n        return data;\n    }\n});\n\nexport const complexParamsMutation = (options?: Partial<Options<ComplexParamsData>>): UseMutationOptions<ComplexParamsResponse, Options<ComplexParamsData>, Error> => ({\n    mutation: async (vars) => {\n        const { data } = await complexParams({\n            ...options,\n            ...vars,\n            throwOnError: true\n        });\n        return data;\n    }\n});\n\nexport const callWithResultFromHeaderMutation = (options?: Partial<Options<CallWithResultFromHeaderData>>): UseMutationOptions<unknown, Options<CallWithResultFromHeaderData>, Error> => ({\n    mutation: async (vars) => {\n        const { data } = await callWithResultFromHeader({\n            ...options,\n            ...vars,\n            throwOnError: true\n        });\n        return data;\n    }\n});\n\nexport const testErrorCodeMutation = (options?: Partial<Options<TestErrorCodeData>>): UseMutationOptions<unknown, Options<TestErrorCodeData>, Error> => ({\n    mutation: async (vars) => {\n        const { data } = await testErrorCode({\n            ...options,\n            ...vars,\n            throwOnError: true\n        });\n        return data;\n    }\n});\n\nexport const nonAsciiæøåÆøÅöôêÊ字符串Mutation = (options?: Partial<Options<NonAsciiæøåÆøÅöôêÊ字符串Data>>): UseMutationOptions<NonAsciiæøåÆøÅöôêÊ字符串Response, Options<NonAsciiæøåÆøÅöôêÊ字符串Data>, Error> => ({\n    mutation: async (vars) => {\n        const { data } = await nonAsciiæøåÆøÅöôêÊ字符串({\n            ...options,\n            ...vars,\n            throwOnError: true\n        });\n        return data;\n    }\n});\n\n/**\n * Login User\n */\nexport const putWithFormUrlEncodedMutation = (options?: Partial<Options<PutWithFormUrlEncodedData>>): UseMutationOptions<unknown, Options<PutWithFormUrlEncodedData>, Error> => ({\n    mutation: async (vars) => {\n        const { data } = await putWithFormUrlEncoded({\n            ...options,\n            ...vars,\n            throwOnError: true\n        });\n        return data;\n    }\n});\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@pinia/colada/fetch/client/client.gen.ts",
    "content": "// 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 (options: RequestOptions) => {\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 url = buildUrl(opts);\n\n    return { opts, url };\n  };\n\n  const request: Client['request'] = async (options) => {\n    // @ts-expect-error\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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@pinia/colada/fetch/client/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type { Auth } from '../core/auth.gen';\nexport type { QuerySerializerOptions } from '../core/bodySerializer.gen';\nexport {\n  formDataBodySerializer,\n  jsonBodySerializer,\n  urlSearchParamsBodySerializer,\n} from '../core/bodySerializer.gen';\nexport { buildClientParams } from '../core/params.gen';\nexport { serializeQueryKeyValue } from '../core/queryKeySerializer.gen';\nexport { createClient } from './client.gen';\nexport type {\n  Client,\n  ClientOptions,\n  Config,\n  CreateClientConfig,\n  Options,\n  RequestOptions,\n  RequestResult,\n  ResolvedRequestOptions,\n  ResponseStyle,\n  TDataShape,\n} from './types.gen';\nexport { createConfig, mergeHeaders } from './utils.gen';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@pinia/colada/fetch/client/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { Auth } from '../core/auth.gen';\nimport type {\n  ServerSentEventsOptions,\n  ServerSentEventsResult,\n} from '../core/serverSentEvents.gen';\nimport type { Client as CoreClient, Config as CoreConfig } from '../core/types.gen';\nimport type { Middleware } from './utils.gen';\n\nexport type ResponseStyle = 'data' | 'fields';\n\nexport interface Config<T extends ClientOptions = ClientOptions>\n  extends Omit<RequestInit, 'body' | 'headers' | 'method'>, CoreConfig {\n  /**\n   * Base URL for all requests made by this client.\n   */\n  baseUrl?: T['baseUrl'];\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   * Please don't use the Fetch client for Next.js applications. The `next`\n   * options won't have any effect.\n   *\n   * Install {@link https://www.npmjs.com/package/@hey-api/client-next `@hey-api/client-next`} instead.\n   */\n  next?: never;\n  /**\n   * Return the response data parsed in a specified format. By default, `auto`\n   * will infer the appropriate method from the `Content-Type` response header.\n   * You can override this behavior with any of the {@link Body} methods.\n   * Select `stream` if you don't want to parse response data at all.\n   *\n   * @default 'auto'\n   */\n  parseAs?: 'arrayBuffer' | 'auto' | 'blob' | 'formData' | 'json' | 'stream' | 'text';\n  /**\n   * Should we return only data or multiple fields (data, error, response, etc.)?\n   *\n   * @default 'fields'\n   */\n  responseStyle?: ResponseStyle;\n  /**\n   * Throw an error instead of returning it in the response?\n   *\n   * @default false\n   */\n  throwOnError?: T['throwOnError'];\n}\n\nexport interface RequestOptions<\n  TData = unknown,\n  TResponseStyle extends ResponseStyle = 'fields',\n  ThrowOnError extends boolean = boolean,\n  Url extends string = string,\n>\n  extends\n    Config<{\n      responseStyle: TResponseStyle;\n      throwOnError: ThrowOnError;\n    }>,\n    Pick<\n      ServerSentEventsOptions<TData>,\n      | 'onRequest'\n      | 'onSseError'\n      | 'onSseEvent'\n      | 'sseDefaultRetryDelay'\n      | 'sseMaxRetryAttempts'\n      | 'sseMaxRetryDelay'\n    > {\n  /**\n   * Any body that you want to add to your request.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/fetch#body}\n   */\n  body?: unknown;\n  path?: Record<string, unknown>;\n  query?: Record<string, unknown>;\n  /**\n   * Security mechanism(s) to use for the request.\n   */\n  security?: ReadonlyArray<Auth>;\n  url: Url;\n}\n\nexport interface ResolvedRequestOptions<\n  TResponseStyle extends ResponseStyle = 'fields',\n  ThrowOnError extends boolean = boolean,\n  Url extends string = string,\n> extends RequestOptions<unknown, TResponseStyle, ThrowOnError, Url> {\n  serializedBody?: string;\n}\n\nexport type RequestResult<\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = boolean,\n  TResponseStyle extends ResponseStyle = 'fields',\n> = ThrowOnError extends true\n  ? Promise<\n      TResponseStyle extends 'data'\n        ? TData extends Record<string, unknown>\n          ? TData[keyof TData]\n          : TData\n        : {\n            data: TData extends Record<string, unknown> ? TData[keyof TData] : TData;\n            request: Request;\n            response: Response;\n          }\n    >\n  : Promise<\n      TResponseStyle extends 'data'\n        ? (TData extends Record<string, unknown> ? TData[keyof TData] : TData) | undefined\n        : (\n            | {\n                data: TData extends Record<string, unknown> ? TData[keyof TData] : TData;\n                error: undefined;\n              }\n            | {\n                data: undefined;\n                error: TError extends Record<string, unknown> ? TError[keyof TError] : TError;\n              }\n          ) & {\n            request: Request;\n            response: Response;\n          }\n    >;\n\nexport interface ClientOptions {\n  baseUrl?: string;\n  responseStyle?: ResponseStyle;\n  throwOnError?: boolean;\n}\n\ntype MethodFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'>,\n) => RequestResult<TData, TError, ThrowOnError, TResponseStyle>;\n\ntype SseFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'>,\n) => Promise<ServerSentEventsResult<TData, TError>>;\n\ntype RequestFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'> &\n    Pick<Required<RequestOptions<TData, TResponseStyle, ThrowOnError>>, 'method'>,\n) => RequestResult<TData, TError, ThrowOnError, TResponseStyle>;\n\ntype BuildUrlFn = <\n  TData extends {\n    body?: unknown;\n    path?: Record<string, unknown>;\n    query?: Record<string, unknown>;\n    url: string;\n  },\n>(\n  options: TData & Options<TData>,\n) => string;\n\nexport type Client = CoreClient<RequestFn, Config, MethodFn, BuildUrlFn, SseFn> & {\n  interceptors: Middleware<Request, Response, unknown, ResolvedRequestOptions>;\n};\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 = ClientOptions> = (\n  override?: Config<ClientOptions & T>,\n) => Config<Required<ClientOptions> & T>;\n\nexport interface TDataShape {\n  body?: unknown;\n  headers?: unknown;\n  path?: unknown;\n  query?: unknown;\n  url: string;\n}\n\ntype OmitKeys<T, K> = Pick<T, Exclude<keyof T, K>>;\n\nexport type Options<\n  TData extends TDataShape = TDataShape,\n  ThrowOnError extends boolean = boolean,\n  TResponse = unknown,\n  TResponseStyle extends ResponseStyle = 'fields',\n> = OmitKeys<\n  RequestOptions<TResponse, TResponseStyle, ThrowOnError>,\n  'body' | 'path' | 'query' | 'url'\n> &\n  ([TData] extends [never] ? unknown : Omit<TData, 'url'>);\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@pinia/colada/fetch/client/utils.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@pinia/colada/fetch/client.gen.ts",
    "content": "// 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: 'http://localhost:3000/base' }));\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@pinia/colada/fetch/core/auth.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@pinia/colada/fetch/core/bodySerializer.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@pinia/colada/fetch/core/params.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@pinia/colada/fetch/core/pathSerializer.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@pinia/colada/fetch/core/queryKeySerializer.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\n/**\n * JSON-friendly union that mirrors what Pinia Colada can hash.\n */\nexport type JsonValue =\n  | null\n  | string\n  | number\n  | boolean\n  | JsonValue[]\n  | { [key: string]: JsonValue };\n\n/**\n * Replacer that converts non-JSON values (bigint, Date, etc.) to safe substitutes.\n */\nexport const queryKeyJsonReplacer = (_key: string, value: unknown) => {\n  if (value === undefined || typeof value === 'function' || typeof value === 'symbol') {\n    return undefined;\n  }\n  if (typeof value === 'bigint') {\n    return value.toString();\n  }\n  if (value instanceof Date) {\n    return value.toISOString();\n  }\n  return value;\n};\n\n/**\n * Safely stringifies a value and parses it back into a JsonValue.\n */\nexport const stringifyToJsonValue = (input: unknown): JsonValue | undefined => {\n  try {\n    const json = JSON.stringify(input, queryKeyJsonReplacer);\n    if (json === undefined) {\n      return undefined;\n    }\n    return JSON.parse(json) as JsonValue;\n  } catch {\n    return undefined;\n  }\n};\n\n/**\n * Detects plain objects (including objects with a null prototype).\n */\nconst isPlainObject = (value: unknown): value is Record<string, unknown> => {\n  if (value === null || typeof value !== 'object') {\n    return false;\n  }\n  const prototype = Object.getPrototypeOf(value as object);\n  return prototype === Object.prototype || prototype === null;\n};\n\n/**\n * Turns URLSearchParams into a sorted JSON object for deterministic keys.\n */\nconst serializeSearchParams = (params: URLSearchParams): JsonValue => {\n  const entries = Array.from(params.entries()).sort(([a], [b]) => a.localeCompare(b));\n  const result: Record<string, JsonValue> = {};\n\n  for (const [key, value] of entries) {\n    const existing = result[key];\n    if (existing === undefined) {\n      result[key] = value;\n      continue;\n    }\n\n    if (Array.isArray(existing)) {\n      (existing as string[]).push(value);\n    } else {\n      result[key] = [existing, value];\n    }\n  }\n\n  return result;\n};\n\n/**\n * Normalizes any accepted value into a JSON-friendly shape for query keys.\n */\nexport const serializeQueryKeyValue = (value: unknown): JsonValue | undefined => {\n  if (value === null) {\n    return null;\n  }\n\n  if (typeof value === 'string' || typeof value === 'number' || typeof value === 'boolean') {\n    return value;\n  }\n\n  if (value === undefined || typeof value === 'function' || typeof value === 'symbol') {\n    return undefined;\n  }\n\n  if (typeof value === 'bigint') {\n    return value.toString();\n  }\n\n  if (value instanceof Date) {\n    return value.toISOString();\n  }\n\n  if (Array.isArray(value)) {\n    return stringifyToJsonValue(value);\n  }\n\n  if (typeof URLSearchParams !== 'undefined' && value instanceof URLSearchParams) {\n    return serializeSearchParams(value);\n  }\n\n  if (isPlainObject(value)) {\n    return stringifyToJsonValue(value);\n  }\n\n  return undefined;\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@pinia/colada/fetch/core/serverSentEvents.gen.ts",
    "content": "// 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 const 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            // Normalize line endings: CRLF -> LF, then CR -> LF\n            buffer = buffer.replace(/\\r\\n/g, '\\n').replace(/\\r/g, '\\n');\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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@pinia/colada/fetch/core/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { Auth, AuthToken } from './auth.gen';\nimport type { BodySerializer, QuerySerializer, QuerySerializerOptions } from './bodySerializer.gen';\n\nexport type HttpMethod =\n  | 'connect'\n  | 'delete'\n  | 'get'\n  | 'head'\n  | 'options'\n  | 'patch'\n  | 'post'\n  | 'put'\n  | 'trace';\n\nexport type Client<\n  RequestFn = never,\n  Config = unknown,\n  MethodFn = never,\n  BuildUrlFn = never,\n  SseFn = never,\n> = {\n  /**\n   * Returns the final request URL.\n   */\n  buildUrl: BuildUrlFn;\n  getConfig: () => Config;\n  request: RequestFn;\n  setConfig: (config: Config) => Config;\n} & {\n  [K in HttpMethod]: MethodFn;\n} & ([SseFn] extends [never] ? { sse?: never } : { sse: { [K in HttpMethod]: SseFn } });\n\nexport interface Config {\n  /**\n   * Auth token or a function returning auth token. The resolved value will be\n   * added to the request payload as defined by its `security` array.\n   */\n  auth?: ((auth: Auth) => Promise<AuthToken> | AuthToken) | AuthToken;\n  /**\n   * A function for serializing request body parameter. By default,\n   * {@link JSON.stringify()} will be used.\n   */\n  bodySerializer?: BodySerializer | null;\n  /**\n   * An object containing any HTTP headers that you want to pre-populate your\n   * `Headers` object with.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/Headers/Headers#init See more}\n   */\n  headers?:\n    | RequestInit['headers']\n    | Record<\n        string,\n        string | number | boolean | (string | number | boolean)[] | null | undefined | unknown\n      >;\n  /**\n   * The request method.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/fetch#method See more}\n   */\n  method?: Uppercase<HttpMethod>;\n  /**\n   * A function for serializing request query parameters. By default, arrays\n   * will be exploded in form style, objects will be exploded in deepObject\n   * style, and reserved characters are percent-encoded.\n   *\n   * This method will have no effect if the native `paramsSerializer()` Axios\n   * API function is used.\n   *\n   * {@link https://swagger.io/docs/specification/serialization/#query View examples}\n   */\n  querySerializer?: QuerySerializer | QuerySerializerOptions;\n  /**\n   * A function validating request data. This is useful if you want to ensure\n   * the request conforms to the desired shape, so it can be safely sent to\n   * the server.\n   */\n  requestValidator?: (data: unknown) => Promise<unknown>;\n  /**\n   * A function transforming response data before it's returned. This is useful\n   * for post-processing data, e.g. converting ISO strings into Date objects.\n   */\n  responseTransformer?: (data: unknown) => Promise<unknown>;\n  /**\n   * A function validating response data. This is useful if you want to ensure\n   * the response conforms to the desired shape, so it can be safely passed to\n   * the transformers and returned to the user.\n   */\n  responseValidator?: (data: unknown) => Promise<unknown>;\n}\n\ntype IsExactlyNeverOrNeverUndefined<T> = [T] extends [never]\n  ? true\n  : [T] extends [never | undefined]\n    ? [undefined] extends [T]\n      ? false\n      : true\n    : false;\n\nexport type OmitNever<T extends Record<string, unknown>> = {\n  [K in keyof T as IsExactlyNeverOrNeverUndefined<T[K]> extends true ? never : K]: T[K];\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@pinia/colada/fetch/core/utils.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@pinia/colada/fetch/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport { apiVVersionODataControllerCount, callToTestOrderOfParams, callWithDefaultOptionalParameters, callWithDefaultParameters, callWithDescriptions, callWithDuplicateResponses, callWithNoContentResponse, callWithParameters, callWithResponse, callWithResponseAndNoContentResponse, callWithResponses, callWithResultFromHeader, callWithWeirdParameterNames, collectionFormat, complexParams, complexTypes, deleteCallWithoutParametersAndResponse, deleteFoo, deprecatedCall, dummyA, dummyB, duplicateName, duplicateName2, duplicateName3, duplicateName4, export_, fileResponse, fooWow, getApiVbyApiVersionSimpleOperation, getCallWithOptionalParam, getCallWithoutParametersAndResponse, headCallWithoutParametersAndResponse, import_, multipartRequest, multipartResponse, nonAsciiæøåÆøÅöôêÊ字符串, type Options, optionsCallWithoutParametersAndResponse, patchApiVbyApiVersionNoTag, patchCallWithoutParametersAndResponse, postApiVbyApiVersionFormData, postApiVbyApiVersionRequestBody, postCallWithOptionalParam, postCallWithoutParametersAndResponse, putCallWithoutParametersAndResponse, putWithFormUrlEncoded, testErrorCode, types, uploadFile } from './sdk.gen';\nexport type { _3eNum1Период, _400, AdditionalPropertiesIntegerIssue, AdditionalPropertiesUnknownIssue, AdditionalPropertiesUnknownIssue2, AdditionalPropertiesUnknownIssue3, AdditionalPropertiesUnknownIssueWritable, AnyOfAnyAndNull, AnyOfArrays, ApiVVersionODataControllerCountData, ApiVVersionODataControllerCountResponse, ApiVVersionODataControllerCountResponses, ArrayWithAnyOfProperties, ArrayWithArray, ArrayWithBooleans, ArrayWithNumbers, ArrayWithProperties, ArrayWithReferences, ArrayWithStrings, CallToTestOrderOfParamsData, CallWithDefaultOptionalParametersData, CallWithDefaultParametersData, CallWithDescriptionsData, CallWithDuplicateResponsesData, CallWithDuplicateResponsesError, CallWithDuplicateResponsesErrors, CallWithDuplicateResponsesResponse, CallWithDuplicateResponsesResponses, CallWithNoContentResponseData, CallWithNoContentResponseResponse, CallWithNoContentResponseResponses, CallWithParametersData, CallWithResponseAndNoContentResponseData, CallWithResponseAndNoContentResponseResponse, CallWithResponseAndNoContentResponseResponses, CallWithResponseData, CallWithResponseResponse, CallWithResponseResponses, CallWithResponsesData, CallWithResponsesError, CallWithResponsesErrors, CallWithResponsesResponse, CallWithResponsesResponses, CallWithResultFromHeaderData, CallWithResultFromHeaderErrors, CallWithResultFromHeaderResponses, CallWithWeirdParameterNamesData, CamelCaseCommentWithBreaks, CharactersInDescription, ClientOptions, CollectionFormatData, CommentWithBackticks, CommentWithBackticksAndQuotes, CommentWithBreaks, CommentWithExpressionPlaceholders, CommentWithQuotes, CommentWithReservedCharacters, CommentWithSlashes, ComplexParamsData, ComplexParamsResponse, ComplexParamsResponses, ComplexTypesData, ComplexTypesErrors, ComplexTypesResponse, ComplexTypesResponses, CompositionBaseModel, CompositionExtendedModel, CompositionWithAllOfAndNullable, CompositionWithAnyOf, CompositionWithAnyOfAndNullable, CompositionWithAnyOfAnonymous, CompositionWithNestedAnyAndTypeNull, CompositionWithNestedAnyOfAndNull, CompositionWithOneOf, CompositionWithOneOfAndComplexArrayDictionary, CompositionWithOneOfAndNullable, CompositionWithOneOfAndProperties, CompositionWithOneOfAndSimpleArrayDictionary, CompositionWithOneOfAndSimpleDictionary, CompositionWithOneOfAnonymous, CompositionWithOneOfDiscriminator, ConstValue, Default, DeleteCallWithoutParametersAndResponseData, DeleteFooData, DeleteFooData2, DeleteFooData3, DeprecatedCallData, DeprecatedModel, DictionaryWithArray, DictionaryWithDictionary, DictionaryWithProperties, DictionaryWithPropertiesAndAdditionalProperties, DictionaryWithReference, DictionaryWithString, DummyAData, DummyAResponse, DummyAResponses, DummyBData, DummyBResponse, DummyBResponses, DuplicateName2Data, DuplicateName3Data, DuplicateName4Data, DuplicateNameData, EnumFromDescription, EnumWithExtensions, EnumWithNumbers, EnumWithReplacedCharacters, EnumWithStrings, EnumWithXEnumNames, ExportData, ExternalRefA, ExternalRefB, ExternalSharedModel, File, FileResponseData, FileResponseResponse, FileResponseResponses, FileWritable, FooWowData, FooWowResponses, FreeFormObjectWithAdditionalPropertiesEqEmptyObject, FreeFormObjectWithAdditionalPropertiesEqTrue, FreeFormObjectWithoutAdditionalProperties, GenericSchemaDuplicateIssue1SystemBoolean, GenericSchemaDuplicateIssue1SystemBooleanWritable, GenericSchemaDuplicateIssue1SystemString, GenericSchemaDuplicateIssue1SystemStringWritable, GetApiVbyApiVersionSimpleOperationData, GetApiVbyApiVersionSimpleOperationError, GetApiVbyApiVersionSimpleOperationErrors, GetApiVbyApiVersionSimpleOperationResponse, GetApiVbyApiVersionSimpleOperationResponses, GetCallWithOptionalParamData, GetCallWithoutParametersAndResponseData, HeadCallWithoutParametersAndResponseData, Import, ImportData, ImportResponse, ImportResponses, IoK8sApimachineryPkgApisMetaV1DeleteOptions, IoK8sApimachineryPkgApisMetaV1Preconditions, ModelCircle, ModelFromZendesk, ModelSquare, ModelThatExtends, ModelThatExtendsExtends, ModelWithAdditionalPropertiesEqTrue, ModelWithAdditionalPropertiesRef, ModelWithAnyOfConstantSizeArray, ModelWithAnyOfConstantSizeArrayAndIntersect, ModelWithAnyOfConstantSizeArrayNullable, ModelWithAnyOfConstantSizeArrayWithNSizeAndOptions, ModelWithAnyOfConstantSizeArrayWithNSizeAndOptionsWritable, ModelWithArray, ModelWithArrayReadOnlyAndWriteOnly, ModelWithArrayReadOnlyAndWriteOnlyWritable, ModelWithBackticksInDescription, ModelWithBoolean, ModelWithCircularReference, ModelWithConst, ModelWithConstantSizeArray, ModelWithDictionary, ModelWithDuplicateImports, ModelWithDuplicateProperties, ModelWithEnum, ModelWithEnumFromDescription, ModelWithEnumWithHyphen, ModelWithInteger, ModelWithNestedArrayEnums, ModelWithNestedArrayEnumsData, ModelWithNestedArrayEnumsDataBar, ModelWithNestedArrayEnumsDataFoo, ModelWithNestedCompositionEnums, ModelWithNestedEnums, ModelWithNestedProperties, ModelWithNullableObject, ModelWithNullableString, ModelWithNumericEnumUnion, ModelWithOneOfAndProperties, ModelWithOneOfEnum, ModelWithOrderedProperties, ModelWithPattern, ModelWithPatternWritable, ModelWithPrefixItemsConstantSizeArray, ModelWithProperties, ModelWithPropertiesWritable, ModelWithReadOnlyAndWriteOnly, ModelWithReadOnlyAndWriteOnlyWritable, ModelWithReference, ModelWithReferenceWritable, ModelWithString, ModelWithStringError, MultipartRequestData, MultipartResponseData, MultipartResponseResponse, MultipartResponseResponses, NestedAnyOfArraysNullable, NonAsciiæøåÆøÅöôêÊ字符串Data, NonAsciiæøåÆøÅöôêÊ字符串Response, NonAsciiæøåÆøÅöôêÊ字符串Responses, NonAsciiStringæøåÆøÅöôêÊ字符串, NullableObject, OneOfAllOfIssue, OneOfAllOfIssueWritable, OptionsCallWithoutParametersAndResponseData, Pageable, ParameterSimpleParameterUnused, PatchApiVbyApiVersionNoTagData, PatchApiVbyApiVersionNoTagResponses, PatchCallWithoutParametersAndResponseData, PostApiVbyApiVersionFormDataData, PostApiVbyApiVersionRequestBodyData, PostCallWithOptionalParamData, PostCallWithOptionalParamResponse, PostCallWithOptionalParamResponses, PostCallWithoutParametersAndResponseData, PostServiceWithEmptyTagResponse, PostServiceWithEmptyTagResponse2, PutCallWithoutParametersAndResponseData, PutWithFormUrlEncodedData, SchemaWithFormRestrictedKeys, SimpleBoolean, SimpleFile, SimpleFormData, SimpleInteger, SimpleParameter, SimpleReference, SimpleRequestBody, SimpleString, SimpleStringWithPattern, TestErrorCodeData, TestErrorCodeErrors, TestErrorCodeResponses, TypesData, TypesResponse, TypesResponses, UploadFileData, UploadFileResponse, UploadFileResponses, XFooBar } from './types.gen';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@pinia/colada/fetch/sdk.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport { type Client, formDataBodySerializer, type Options as Options2, type TDataShape, urlSearchParamsBodySerializer } from './client';\nimport { client } from './client.gen';\nimport type { ApiVVersionODataControllerCountData, ApiVVersionODataControllerCountResponses, CallToTestOrderOfParamsData, CallWithDefaultOptionalParametersData, CallWithDefaultParametersData, CallWithDescriptionsData, CallWithDuplicateResponsesData, CallWithDuplicateResponsesErrors, CallWithDuplicateResponsesResponses, CallWithNoContentResponseData, CallWithNoContentResponseResponses, CallWithParametersData, CallWithResponseAndNoContentResponseData, CallWithResponseAndNoContentResponseResponses, CallWithResponseData, CallWithResponseResponses, CallWithResponsesData, CallWithResponsesErrors, CallWithResponsesResponses, CallWithResultFromHeaderData, CallWithResultFromHeaderErrors, CallWithResultFromHeaderResponses, CallWithWeirdParameterNamesData, CollectionFormatData, ComplexParamsData, ComplexParamsResponses, ComplexTypesData, ComplexTypesErrors, ComplexTypesResponses, DeleteCallWithoutParametersAndResponseData, DeleteFooData3, DeprecatedCallData, DummyAData, DummyAResponses, DummyBData, DummyBResponses, DuplicateName2Data, DuplicateName3Data, DuplicateName4Data, DuplicateNameData, ExportData, FileResponseData, FileResponseResponses, FooWowData, FooWowResponses, GetApiVbyApiVersionSimpleOperationData, GetApiVbyApiVersionSimpleOperationErrors, GetApiVbyApiVersionSimpleOperationResponses, GetCallWithOptionalParamData, GetCallWithoutParametersAndResponseData, HeadCallWithoutParametersAndResponseData, ImportData, ImportResponses, MultipartRequestData, MultipartResponseData, MultipartResponseResponses, NonAsciiæøåÆøÅöôêÊ字符串Data, NonAsciiæøåÆøÅöôêÊ字符串Responses, OptionsCallWithoutParametersAndResponseData, PatchApiVbyApiVersionNoTagData, PatchApiVbyApiVersionNoTagResponses, PatchCallWithoutParametersAndResponseData, PostApiVbyApiVersionFormDataData, PostApiVbyApiVersionRequestBodyData, PostCallWithOptionalParamData, PostCallWithOptionalParamResponses, PostCallWithoutParametersAndResponseData, PutCallWithoutParametersAndResponseData, PutWithFormUrlEncodedData, TestErrorCodeData, TestErrorCodeErrors, TestErrorCodeResponses, TypesData, TypesResponses, UploadFileData, UploadFileResponses } from './types.gen';\n\nexport type Options<TData extends TDataShape = TDataShape, ThrowOnError extends boolean = boolean> = Options2<TData, ThrowOnError> & {\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\nexport const export_ = <ThrowOnError extends boolean = false>(options?: Options<ExportData, ThrowOnError>) => (options?.client ?? client).get<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/no+tag', ...options });\n\nexport const patchApiVbyApiVersionNoTag = <ThrowOnError extends boolean = false>(options?: Options<PatchApiVbyApiVersionNoTagData, ThrowOnError>) => (options?.client ?? client).patch<PatchApiVbyApiVersionNoTagResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/no+tag', ...options });\n\nexport const import_ = <ThrowOnError extends boolean = false>(options: Options<ImportData, ThrowOnError>) => (options.client ?? client).post<ImportResponses, unknown, ThrowOnError>({\n    url: '/api/v{api-version}/no+tag',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options.headers\n    }\n});\n\nexport const fooWow = <ThrowOnError extends boolean = false>(options?: Options<FooWowData, ThrowOnError>) => (options?.client ?? client).put<FooWowResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/no+tag', ...options });\n\nexport const apiVVersionODataControllerCount = <ThrowOnError extends boolean = false>(options?: Options<ApiVVersionODataControllerCountData, ThrowOnError>) => (options?.client ?? client).get<ApiVVersionODataControllerCountResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple/$count', ...options });\n\nexport const getApiVbyApiVersionSimpleOperation = <ThrowOnError extends boolean = false>(options: Options<GetApiVbyApiVersionSimpleOperationData, ThrowOnError>) => (options.client ?? client).get<GetApiVbyApiVersionSimpleOperationResponses, GetApiVbyApiVersionSimpleOperationErrors, ThrowOnError>({ url: '/api/v{api-version}/simple:operation', ...options });\n\nexport const deleteCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<DeleteCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).delete<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const getCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<GetCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).get<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const headCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<HeadCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).head<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const optionsCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<OptionsCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).options<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const patchCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<PatchCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).patch<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const postCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<PostCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).post<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const putCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<PutCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).put<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const deleteFoo = <ThrowOnError extends boolean = false>(options: Options<DeleteFooData3, ThrowOnError>) => (options.client ?? client).delete<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/foo/{foo_param}/bar/{BarParam}', ...options });\n\nexport const callWithDescriptions = <ThrowOnError extends boolean = false>(options?: Options<CallWithDescriptionsData, ThrowOnError>) => (options?.client ?? client).post<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/descriptions', ...options });\n\n/**\n * @deprecated\n */\nexport const deprecatedCall = <ThrowOnError extends boolean = false>(options: Options<DeprecatedCallData, ThrowOnError>) => (options.client ?? client).post<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/parameters/deprecated', ...options });\n\nexport const callWithParameters = <ThrowOnError extends boolean = false>(options: Options<CallWithParametersData, ThrowOnError>) => (options.client ?? client).post<unknown, unknown, ThrowOnError>({\n    url: '/api/v{api-version}/parameters/{parameterPath}',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options.headers\n    }\n});\n\nexport const callWithWeirdParameterNames = <ThrowOnError extends boolean = false>(options: Options<CallWithWeirdParameterNamesData, ThrowOnError>) => (options.client ?? client).post<unknown, unknown, ThrowOnError>({\n    url: '/api/v{api-version}/parameters/{parameter.path.1}/{parameter-path-2}/{PARAMETER-PATH-3}',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options.headers\n    }\n});\n\nexport const getCallWithOptionalParam = <ThrowOnError extends boolean = false>(options: Options<GetCallWithOptionalParamData, ThrowOnError>) => (options.client ?? client).get<unknown, unknown, ThrowOnError>({\n    url: '/api/v{api-version}/parameters',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options.headers\n    }\n});\n\nexport const postCallWithOptionalParam = <ThrowOnError extends boolean = false>(options: Options<PostCallWithOptionalParamData, ThrowOnError>) => (options.client ?? client).post<PostCallWithOptionalParamResponses, unknown, ThrowOnError>({\n    url: '/api/v{api-version}/parameters',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options.headers\n    }\n});\n\nexport const postApiVbyApiVersionRequestBody = <ThrowOnError extends boolean = false>(options?: Options<PostApiVbyApiVersionRequestBodyData, ThrowOnError>) => (options?.client ?? client).post<unknown, unknown, ThrowOnError>({\n    url: '/api/v{api-version}/requestBody',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options?.headers\n    }\n});\n\nexport const postApiVbyApiVersionFormData = <ThrowOnError extends boolean = false>(options?: Options<PostApiVbyApiVersionFormDataData, ThrowOnError>) => (options?.client ?? client).post<unknown, unknown, ThrowOnError>({\n    ...formDataBodySerializer,\n    url: '/api/v{api-version}/formData',\n    ...options,\n    headers: {\n        'Content-Type': null,\n        ...options?.headers\n    }\n});\n\nexport const callWithDefaultParameters = <ThrowOnError extends boolean = false>(options?: Options<CallWithDefaultParametersData, ThrowOnError>) => (options?.client ?? client).get<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/defaults', ...options });\n\nexport const callWithDefaultOptionalParameters = <ThrowOnError extends boolean = false>(options?: Options<CallWithDefaultOptionalParametersData, ThrowOnError>) => (options?.client ?? client).post<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/defaults', ...options });\n\nexport const callToTestOrderOfParams = <ThrowOnError extends boolean = false>(options: Options<CallToTestOrderOfParamsData, ThrowOnError>) => (options.client ?? client).put<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/defaults', ...options });\n\nexport const duplicateName = <ThrowOnError extends boolean = false>(options?: Options<DuplicateNameData, ThrowOnError>) => (options?.client ?? client).delete<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/duplicate', ...options });\n\nexport const duplicateName2 = <ThrowOnError extends boolean = false>(options?: Options<DuplicateName2Data, ThrowOnError>) => (options?.client ?? client).get<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/duplicate', ...options });\n\nexport const duplicateName3 = <ThrowOnError extends boolean = false>(options?: Options<DuplicateName3Data, ThrowOnError>) => (options?.client ?? client).post<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/duplicate', ...options });\n\nexport const duplicateName4 = <ThrowOnError extends boolean = false>(options?: Options<DuplicateName4Data, ThrowOnError>) => (options?.client ?? client).put<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/duplicate', ...options });\n\nexport const callWithNoContentResponse = <ThrowOnError extends boolean = false>(options?: Options<CallWithNoContentResponseData, ThrowOnError>) => (options?.client ?? client).get<CallWithNoContentResponseResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/no-content', ...options });\n\nexport const callWithResponseAndNoContentResponse = <ThrowOnError extends boolean = false>(options?: Options<CallWithResponseAndNoContentResponseData, ThrowOnError>) => (options?.client ?? client).get<CallWithResponseAndNoContentResponseResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/multiple-tags/response-and-no-content', ...options });\n\nexport const dummyA = <ThrowOnError extends boolean = false>(options?: Options<DummyAData, ThrowOnError>) => (options?.client ?? client).get<DummyAResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/multiple-tags/a', ...options });\n\nexport const dummyB = <ThrowOnError extends boolean = false>(options?: Options<DummyBData, ThrowOnError>) => (options?.client ?? client).get<DummyBResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/multiple-tags/b', ...options });\n\nexport const callWithResponse = <ThrowOnError extends boolean = false>(options?: Options<CallWithResponseData, ThrowOnError>) => (options?.client ?? client).get<CallWithResponseResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/response', ...options });\n\nexport const callWithDuplicateResponses = <ThrowOnError extends boolean = false>(options?: Options<CallWithDuplicateResponsesData, ThrowOnError>) => (options?.client ?? client).post<CallWithDuplicateResponsesResponses, CallWithDuplicateResponsesErrors, ThrowOnError>({ url: '/api/v{api-version}/response', ...options });\n\nexport const callWithResponses = <ThrowOnError extends boolean = false>(options?: Options<CallWithResponsesData, ThrowOnError>) => (options?.client ?? client).put<CallWithResponsesResponses, CallWithResponsesErrors, ThrowOnError>({ url: '/api/v{api-version}/response', ...options });\n\nexport const collectionFormat = <ThrowOnError extends boolean = false>(options: Options<CollectionFormatData, ThrowOnError>) => (options.client ?? client).get<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/collectionFormat', ...options });\n\nexport const types = <ThrowOnError extends boolean = false>(options: Options<TypesData, ThrowOnError>) => (options.client ?? client).get<TypesResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/types', ...options });\n\nexport const uploadFile = <ThrowOnError extends boolean = false>(options: Options<UploadFileData, ThrowOnError>) => (options.client ?? client).post<UploadFileResponses, unknown, ThrowOnError>({\n    ...urlSearchParamsBodySerializer,\n    url: '/api/v{api-version}/upload',\n    ...options,\n    headers: {\n        'Content-Type': 'application/x-www-form-urlencoded',\n        ...options.headers\n    }\n});\n\nexport const fileResponse = <ThrowOnError extends boolean = false>(options: Options<FileResponseData, ThrowOnError>) => (options.client ?? client).get<FileResponseResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/file/{id}', ...options });\n\nexport const complexTypes = <ThrowOnError extends boolean = false>(options: Options<ComplexTypesData, ThrowOnError>) => (options.client ?? client).get<ComplexTypesResponses, ComplexTypesErrors, ThrowOnError>({\n    querySerializer: { parameters: { parameterObject: { object: { style: 'form' } } } },\n    url: '/api/v{api-version}/complex',\n    ...options\n});\n\nexport const multipartResponse = <ThrowOnError extends boolean = false>(options?: Options<MultipartResponseData, ThrowOnError>) => (options?.client ?? client).get<MultipartResponseResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/multipart', ...options });\n\nexport const multipartRequest = <ThrowOnError extends boolean = false>(options?: Options<MultipartRequestData, ThrowOnError>) => (options?.client ?? client).post<unknown, unknown, ThrowOnError>({\n    ...formDataBodySerializer,\n    url: '/api/v{api-version}/multipart',\n    ...options,\n    headers: {\n        'Content-Type': null,\n        ...options?.headers\n    }\n});\n\nexport const complexParams = <ThrowOnError extends boolean = false>(options: Options<ComplexParamsData, ThrowOnError>) => (options.client ?? client).put<ComplexParamsResponses, unknown, ThrowOnError>({\n    url: '/api/v{api-version}/complex/{id}',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json-patch+json',\n        ...options.headers\n    }\n});\n\nexport const callWithResultFromHeader = <ThrowOnError extends boolean = false>(options?: Options<CallWithResultFromHeaderData, ThrowOnError>) => (options?.client ?? client).post<CallWithResultFromHeaderResponses, CallWithResultFromHeaderErrors, ThrowOnError>({ url: '/api/v{api-version}/header', ...options });\n\nexport const testErrorCode = <ThrowOnError extends boolean = false>(options: Options<TestErrorCodeData, ThrowOnError>) => (options.client ?? client).post<TestErrorCodeResponses, TestErrorCodeErrors, ThrowOnError>({ url: '/api/v{api-version}/error', ...options });\n\nexport const nonAsciiæøåÆøÅöôêÊ字符串 = <ThrowOnError extends boolean = false>(options: Options<NonAsciiæøåÆøÅöôêÊ字符串Data, ThrowOnError>) => (options.client ?? client).post<NonAsciiæøåÆøÅöôêÊ字符串Responses, unknown, ThrowOnError>({ url: '/api/v{api-version}/non-ascii-æøåÆØÅöôêÊ字符串', ...options });\n\n/**\n * Login User\n */\nexport const putWithFormUrlEncoded = <ThrowOnError extends boolean = false>(options: Options<PutWithFormUrlEncodedData, ThrowOnError>) => (options.client ?? client).put<unknown, unknown, ThrowOnError>({\n    ...urlSearchParamsBodySerializer,\n    url: '/api/v{api-version}/non-ascii-æøåÆØÅöôêÊ字符串',\n    ...options,\n    headers: {\n        'Content-Type': 'application/x-www-form-urlencoded',\n        ...options.headers\n    }\n});\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@pinia/colada/fetch/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type ClientOptions = {\n    baseUrl: 'http://localhost:3000/base' | (string & {});\n};\n\n/**\n * Model with number-only name\n */\nexport type _400 = string;\n\n/**\n * External ref to shared model (A)\n */\nexport type ExternalRefA = ExternalSharedModel;\n\n/**\n * External ref to shared model (B)\n */\nexport type ExternalRefB = ExternalSharedModel;\n\n/**\n * Testing multiline comments in string: First line\n * Second line\n *\n * Fourth line\n */\nexport type CamelCaseCommentWithBreaks = number;\n\n/**\n * Testing multiline comments in string: First line\n * Second line\n *\n * Fourth line\n */\nexport type CommentWithBreaks = number;\n\n/**\n * Testing backticks in string: `backticks` and ```multiple backticks``` should work\n */\nexport type CommentWithBackticks = number;\n\n/**\n * Testing backticks and quotes in string: `backticks`, 'quotes', \"double quotes\" and ```multiple backticks``` should work\n */\nexport type CommentWithBackticksAndQuotes = number;\n\n/**\n * Testing slashes in string: \\backwards\\\\\\ and /forwards/// should work\n */\nexport type CommentWithSlashes = number;\n\n/**\n * Testing expression placeholders in string: ${expression} should work\n */\nexport type CommentWithExpressionPlaceholders = number;\n\n/**\n * Testing quotes in string: 'single quote''' and \"double quotes\"\"\" should work\n */\nexport type CommentWithQuotes = number;\n\n/**\n * Testing reserved characters in string: * inline * and ** inline ** should work\n */\nexport type CommentWithReservedCharacters = number;\n\n/**\n * This is a simple number\n */\nexport type SimpleInteger = number;\n\n/**\n * This is a simple boolean\n */\nexport type SimpleBoolean = boolean;\n\n/**\n * This is a simple string\n */\nexport type SimpleString = string;\n\n/**\n * A string with non-ascii (unicode) characters valid in typescript identifiers (æøåÆØÅöÔèÈ字符串)\n */\nexport type NonAsciiStringæøåÆøÅöôêÊ字符串 = string;\n\n/**\n * This is a simple file\n */\nexport type SimpleFile = Blob | File;\n\n/**\n * This is a simple reference\n */\nexport type SimpleReference = ModelWithString;\n\n/**\n * This is a simple string\n */\nexport type SimpleStringWithPattern = string | null;\n\n/**\n * This is a simple enum with strings\n */\nexport type EnumWithStrings = 'Success' | 'Warning' | 'Error' | '\\'Single Quote\\'' | '\"Double Quotes\"' | 'Non-ascii: øæåôöØÆÅÔÖ字符串';\n\nexport type EnumWithReplacedCharacters = '\\'Single Quote\\'' | '\"Double Quotes\"' | 'øæåôöØÆÅÔÖ字符串' | 3.1 | '';\n\n/**\n * This is a simple enum with numbers\n */\nexport type EnumWithNumbers = 1 | 2 | 3 | 1.1 | 1.2 | 1.3 | 100 | 200 | 300 | -100 | -200 | -300 | -1.1 | -1.2 | -1.3;\n\n/**\n * Success=1,Warning=2,Error=3\n */\nexport type EnumFromDescription = number;\n\n/**\n * This is a simple enum with numbers\n */\nexport type EnumWithExtensions = 200 | 400 | 500;\n\nexport type EnumWithXEnumNames = 0 | 1 | 2;\n\n/**\n * This is a simple array with numbers\n */\nexport type ArrayWithNumbers = Array<number>;\n\n/**\n * This is a simple array with booleans\n */\nexport type ArrayWithBooleans = Array<boolean>;\n\n/**\n * This is a simple array with strings\n */\nexport type ArrayWithStrings = Array<string>;\n\n/**\n * This is a simple array with references\n */\nexport type ArrayWithReferences = Array<ModelWithString>;\n\n/**\n * This is a simple array containing an array\n */\nexport type ArrayWithArray = Array<Array<ModelWithString>>;\n\n/**\n * This is a simple array with properties\n */\nexport type ArrayWithProperties = Array<{\n    '16x16'?: CamelCaseCommentWithBreaks;\n    bar?: string;\n}>;\n\n/**\n * This is a simple array with any of properties\n */\nexport type ArrayWithAnyOfProperties = Array<{\n    foo?: string;\n} | {\n    bar?: string;\n}>;\n\nexport type AnyOfAnyAndNull = {\n    data?: unknown | null;\n};\n\n/**\n * This is a simple array with any of properties\n */\nexport type AnyOfArrays = {\n    results?: Array<{\n        foo?: string;\n    } | {\n        bar?: string;\n    }>;\n};\n\n/**\n * This is a string dictionary\n */\nexport type DictionaryWithString = {\n    [key: string]: string;\n};\n\nexport type DictionaryWithPropertiesAndAdditionalProperties = {\n    foo?: number;\n    bar?: boolean;\n    [key: string]: string | number | boolean | undefined;\n};\n\n/**\n * This is a string reference\n */\nexport type DictionaryWithReference = {\n    [key: string]: ModelWithString;\n};\n\n/**\n * This is a complex dictionary\n */\nexport type DictionaryWithArray = {\n    [key: string]: Array<ModelWithString>;\n};\n\n/**\n * This is a string dictionary\n */\nexport type DictionaryWithDictionary = {\n    [key: string]: {\n        [key: string]: string;\n    };\n};\n\n/**\n * This is a complex dictionary\n */\nexport type DictionaryWithProperties = {\n    [key: string]: {\n        foo?: string;\n        bar?: string;\n    };\n};\n\n/**\n * This is a model with one number property\n */\nexport type ModelWithInteger = {\n    /**\n     * This is a simple number property\n     */\n    prop?: number;\n};\n\n/**\n * This is a model with one boolean property\n */\nexport type ModelWithBoolean = {\n    /**\n     * This is a simple boolean property\n     */\n    prop?: boolean;\n};\n\n/**\n * This is a model with one string property\n */\nexport type ModelWithString = {\n    /**\n     * This is a simple string property\n     */\n    prop?: string;\n};\n\n/**\n * This is a model with one string property\n */\nexport type ModelWithStringError = {\n    /**\n     * This is a simple string property\n     */\n    prop?: string;\n};\n\n/**\n * `Comment` or `VoiceComment`. The JSON object for adding voice comments to tickets is different. See [Adding voice comments to tickets](/documentation/ticketing/managing-tickets/adding-voice-comments-to-tickets)\n */\nexport type ModelFromZendesk = string;\n\n/**\n * This is a model with one string property\n */\nexport type ModelWithNullableString = {\n    /**\n     * This is a simple string property\n     */\n    nullableProp1?: string | null;\n    /**\n     * This is a simple string property\n     */\n    nullableRequiredProp1: string | null;\n    /**\n     * This is a simple string property\n     */\n    nullableProp2?: string | null;\n    /**\n     * This is a simple string property\n     */\n    nullableRequiredProp2: string | null;\n    /**\n     * This is a simple enum with strings\n     */\n    'foo_bar-enum'?: 'Success' | 'Warning' | 'Error' | 'ØÆÅ字符串';\n};\n\n/**\n * This is a model with one enum\n */\nexport type ModelWithEnum = {\n    /**\n     * This is a simple enum with strings\n     */\n    'foo_bar-enum'?: 'Success' | 'Warning' | 'Error' | 'ØÆÅ字符串';\n    /**\n     * These are the HTTP error code enums\n     */\n    statusCode?: '100' | '200 FOO' | '300 FOO_BAR' | '400 foo-bar' | '500 foo.bar' | '600 foo&bar';\n    /**\n     * Simple boolean enum\n     */\n    bool?: true;\n};\n\n/**\n * This is a model with one enum with escaped name\n */\nexport type ModelWithEnumWithHyphen = {\n    /**\n     * Foo-Bar-Baz-Qux\n     */\n    'foo-bar-baz-qux'?: '3.0';\n};\n\n/**\n * This is a model with one enum\n */\nexport type ModelWithEnumFromDescription = {\n    /**\n     * Success=1,Warning=2,Error=3\n     */\n    test?: number;\n};\n\n/**\n * This is a model with nested enums\n */\nexport type ModelWithNestedEnums = {\n    dictionaryWithEnum?: {\n        [key: string]: 'Success' | 'Warning' | 'Error';\n    };\n    dictionaryWithEnumFromDescription?: {\n        [key: string]: number;\n    };\n    arrayWithEnum?: Array<'Success' | 'Warning' | 'Error'>;\n    arrayWithDescription?: Array<number>;\n    /**\n     * This is a simple enum with strings\n     */\n    'foo_bar-enum'?: 'Success' | 'Warning' | 'Error' | 'ØÆÅ字符串';\n};\n\n/**\n * This is a model with one property containing a reference\n */\nexport type ModelWithReference = {\n    prop?: ModelWithProperties;\n};\n\n/**\n * This is a model with one property containing an array\n */\nexport type ModelWithArrayReadOnlyAndWriteOnly = {\n    prop?: Array<ModelWithReadOnlyAndWriteOnly>;\n    propWithFile?: Array<Blob | File>;\n    propWithNumber?: Array<number>;\n};\n\n/**\n * This is a model with one property containing an array\n */\nexport type ModelWithArray = {\n    prop?: Array<ModelWithString>;\n    propWithFile?: Array<Blob | File>;\n    propWithNumber?: Array<number>;\n};\n\n/**\n * This is a model with one property containing a dictionary\n */\nexport type ModelWithDictionary = {\n    prop?: {\n        [key: string]: string;\n    };\n};\n\n/**\n * This is a deprecated model with a deprecated property\n *\n * @deprecated\n */\nexport type DeprecatedModel = {\n    /**\n     * This is a deprecated property\n     *\n     * @deprecated\n     */\n    prop?: string;\n};\n\n/**\n * This is a model with one property containing a circular reference\n */\nexport type ModelWithCircularReference = {\n    prop?: ModelWithCircularReference;\n};\n\n/**\n * This is a model with one property with a 'one of' relationship\n */\nexport type CompositionWithOneOf = {\n    propA?: ModelWithString | ModelWithEnum | ModelWithArray | ModelWithDictionary;\n};\n\n/**\n * This is a model with one property with a 'one of' relationship where the options are not $ref\n */\nexport type CompositionWithOneOfAnonymous = {\n    propA?: {\n        propA?: string;\n    } | string | number;\n};\n\n/**\n * Circle\n */\nexport type ModelCircle = {\n    kind: string;\n    radius?: number;\n};\n\n/**\n * Square\n */\nexport type ModelSquare = {\n    kind: string;\n    sideLength?: number;\n};\n\n/**\n * This is a model with one property with a 'one of' relationship where the options are not $ref\n */\nexport type CompositionWithOneOfDiscriminator = ({\n    kind: 'circle';\n} & ModelCircle) | ({\n    kind: 'square';\n} & ModelSquare);\n\n/**\n * This is a model with one property with a 'any of' relationship\n */\nexport type CompositionWithAnyOf = {\n    propA?: ModelWithString | ModelWithEnum | ModelWithArray | ModelWithDictionary;\n};\n\n/**\n * This is a model with one property with a 'any of' relationship where the options are not $ref\n */\nexport type CompositionWithAnyOfAnonymous = {\n    propA?: {\n        propA?: string;\n    } | string | number;\n};\n\n/**\n * This is a model with nested 'any of' property with a type null\n */\nexport type CompositionWithNestedAnyAndTypeNull = {\n    propA?: Array<ModelWithDictionary | null> | Array<ModelWithArray | null>;\n};\n\nexport type _3eNum1Период = 'Bird' | 'Dog';\n\nexport type ConstValue = 'ConstValue';\n\n/**\n * This is a model with one property with a 'any of' relationship where the options are not $ref\n */\nexport type CompositionWithNestedAnyOfAndNull = {\n    /**\n     * Scopes\n     */\n    propA?: Array<_3eNum1Период | ConstValue> | null;\n};\n\n/**\n * This is a model with one property with a 'one of' relationship\n */\nexport type CompositionWithOneOfAndNullable = {\n    propA?: {\n        boolean?: boolean;\n    } | ModelWithEnum | ModelWithArray | ModelWithDictionary | null;\n};\n\n/**\n * This is a model that contains a simple dictionary within composition\n */\nexport type CompositionWithOneOfAndSimpleDictionary = {\n    propA?: boolean | {\n        [key: string]: number;\n    };\n};\n\n/**\n * This is a model that contains a dictionary of simple arrays within composition\n */\nexport type CompositionWithOneOfAndSimpleArrayDictionary = {\n    propA?: boolean | {\n        [key: string]: Array<boolean>;\n    };\n};\n\n/**\n * This is a model that contains a dictionary of complex arrays (composited) within composition\n */\nexport type CompositionWithOneOfAndComplexArrayDictionary = {\n    propA?: boolean | {\n        [key: string]: Array<number | string>;\n    };\n};\n\n/**\n * This is a model with one property with a 'all of' relationship\n */\nexport type CompositionWithAllOfAndNullable = {\n    propA?: ({\n        boolean?: boolean;\n    } & ModelWithEnum & ModelWithArray & ModelWithDictionary) | null;\n};\n\n/**\n * This is a model with one property with a 'any of' relationship\n */\nexport type CompositionWithAnyOfAndNullable = {\n    propA?: {\n        boolean?: boolean;\n    } | ModelWithEnum | ModelWithArray | ModelWithDictionary | null;\n};\n\n/**\n * This is a base model with two simple optional properties\n */\nexport type CompositionBaseModel = {\n    firstName?: string;\n    lastname?: string;\n};\n\n/**\n * This is a model that extends the base model\n */\nexport type CompositionExtendedModel = CompositionBaseModel & {\n    age: number;\n    firstName: string;\n    lastname: string;\n};\n\n/**\n * This is a model with one nested property\n */\nexport type ModelWithProperties = {\n    required: string;\n    readonly requiredAndReadOnly: string;\n    requiredAndNullable: string | null;\n    string?: string;\n    number?: number;\n    boolean?: boolean;\n    reference?: ModelWithString;\n    'property with space'?: string;\n    default?: string;\n    try?: string;\n    readonly '@namespace.string'?: string;\n    readonly '@namespace.integer'?: number;\n};\n\n/**\n * This is a model with one nested property\n */\nexport type ModelWithNestedProperties = {\n    readonly first: {\n        readonly second: {\n            readonly third: string | null;\n        } | null;\n    } | null;\n};\n\n/**\n * This is a model with duplicated properties\n */\nexport type ModelWithDuplicateProperties = {\n    prop?: ModelWithString;\n};\n\n/**\n * This is a model with ordered properties\n */\nexport type ModelWithOrderedProperties = {\n    zebra?: string;\n    apple?: string;\n    hawaii?: string;\n};\n\n/**\n * This is a model with duplicated imports\n */\nexport type ModelWithDuplicateImports = {\n    propA?: ModelWithString;\n    propB?: ModelWithString;\n    propC?: ModelWithString;\n};\n\n/**\n * This is a model that extends another model\n */\nexport type ModelThatExtends = ModelWithString & {\n    propExtendsA?: string;\n    propExtendsB?: ModelWithString;\n};\n\n/**\n * This is a model that extends another model\n */\nexport type ModelThatExtendsExtends = ModelWithString & ModelThatExtends & {\n    propExtendsC?: string;\n    propExtendsD?: ModelWithString;\n};\n\n/**\n * This is a model that contains a some patterns\n */\nexport type ModelWithPattern = {\n    key: string;\n    name: string;\n    readonly enabled?: boolean;\n    readonly modified?: string;\n    id?: string;\n    text?: string;\n    patternWithSingleQuotes?: string;\n    patternWithNewline?: string;\n    patternWithBacktick?: string;\n    patternWithUnicode?: string;\n};\n\nexport type File = {\n    /**\n     * Id\n     */\n    readonly id?: string;\n    /**\n     * Updated at\n     */\n    readonly updated_at?: string;\n    /**\n     * Created at\n     */\n    readonly created_at?: string;\n    /**\n     * Mime\n     */\n    mime: string;\n    /**\n     * File\n     */\n    readonly file?: string;\n};\n\nexport type Default = {\n    name?: string;\n};\n\nexport type Pageable = {\n    page?: number;\n    size?: number;\n    sort?: Array<string>;\n};\n\n/**\n * This is a free-form object without additionalProperties.\n */\nexport type FreeFormObjectWithoutAdditionalProperties = {\n    [key: string]: unknown;\n};\n\n/**\n * This is a free-form object with additionalProperties: true.\n */\nexport type FreeFormObjectWithAdditionalPropertiesEqTrue = {\n    [key: string]: unknown;\n};\n\n/**\n * This is a free-form object with additionalProperties: {}.\n */\nexport type FreeFormObjectWithAdditionalPropertiesEqEmptyObject = {\n    [key: string]: unknown;\n};\n\nexport type ModelWithConst = {\n    String?: 'String';\n    number?: 0;\n    null?: null;\n    withType?: 'Some string';\n};\n\n/**\n * This is a model with one property and additionalProperties: true\n */\nexport type ModelWithAdditionalPropertiesEqTrue = {\n    /**\n     * This is a simple string property\n     */\n    prop?: string;\n    [key: string]: unknown;\n};\n\nexport type NestedAnyOfArraysNullable = {\n    nullableArray?: Array<string | boolean> | null;\n};\n\nexport type CompositionWithOneOfAndProperties = ({\n    foo: SimpleParameter;\n} | {\n    bar: NonAsciiStringæøåÆøÅöôêÊ字符串;\n}) & {\n    baz: number | null;\n    qux: number;\n};\n\n/**\n * An object that can be null\n */\nexport type NullableObject = {\n    foo?: string;\n} | null;\n\n/**\n * Some % character\n */\nexport type CharactersInDescription = string;\n\nexport type ModelWithNullableObject = {\n    data?: NullableObject;\n};\n\n/**\n * An object with additional properties that can be null (anyOf ref + null)\n */\nexport type ModelWithAdditionalPropertiesRef = {\n    [key: string]: NullableObject | null;\n};\n\nexport type ModelWithOneOfEnum = {\n    foo: 'Bar';\n} | {\n    foo: 'Baz';\n} | {\n    foo: 'Qux';\n} | {\n    content: string;\n    foo: 'Quux';\n} | {\n    content: [\n        string,\n        string\n    ];\n    foo: 'Corge';\n};\n\nexport type ModelWithNestedArrayEnumsDataFoo = 'foo' | 'bar';\n\nexport type ModelWithNestedArrayEnumsDataBar = 'baz' | 'qux';\n\nexport type ModelWithNestedArrayEnumsData = {\n    foo?: Array<ModelWithNestedArrayEnumsDataFoo>;\n    bar?: Array<ModelWithNestedArrayEnumsDataBar>;\n};\n\nexport type ModelWithNestedArrayEnums = {\n    array_strings?: Array<string>;\n    data?: ModelWithNestedArrayEnumsData;\n};\n\nexport type ModelWithNestedCompositionEnums = {\n    foo?: ModelWithNestedArrayEnumsDataFoo;\n};\n\nexport type ModelWithReadOnlyAndWriteOnly = {\n    foo: string;\n    readonly bar: string;\n};\n\nexport type ModelWithConstantSizeArray = [\n    number,\n    number\n];\n\nexport type ModelWithAnyOfConstantSizeArray = [\n    number | string,\n    number | string,\n    number | string\n];\n\nexport type ModelWithPrefixItemsConstantSizeArray = [\n    ModelWithInteger,\n    number | string,\n    string\n];\n\nexport type ModelWithAnyOfConstantSizeArrayNullable = [\n    number | null | string,\n    number | null | string,\n    number | null | string\n];\n\nexport type ModelWithAnyOfConstantSizeArrayWithNSizeAndOptions = [\n    number | Import,\n    number | Import\n];\n\nexport type ModelWithAnyOfConstantSizeArrayAndIntersect = [\n    number & string,\n    number & string\n];\n\nexport type ModelWithNumericEnumUnion = {\n    /**\n     * Период\n     */\n    value?: -10 | -1 | 0 | 1 | 3 | 6 | 12;\n};\n\n/**\n * Some description with `back ticks`\n */\nexport type ModelWithBackticksInDescription = {\n    /**\n     * The template `that` should be used for parsing and importing the contents of the CSV file.\n     *\n     * <br/><p>There is one placeholder currently supported:<ul>     <li><b>${x}</b> - refers to the n-th column in the CSV file, e.g. ${1}, ${2}, ...)</li></ul><p>Example of a correct JSON template:</p>\n     * <pre>\n     * [\n     * {\n     * \"resourceType\": \"Asset\",\n     * \"identifier\": {\n     * \"name\": \"${1}\",\n     * \"domain\": {\n     * \"name\": \"${2}\",\n     * \"community\": {\n     * \"name\": \"Some Community\"\n     * }\n     * }\n     * },\n     * \"attributes\" : {\n     * \"00000000-0000-0000-0000-000000003115\" : [ {\n     * \"value\" : \"${3}\"\n     * } ],\n     * \"00000000-0000-0000-0000-000000000222\" : [ {\n     * \"value\" : \"${4}\"\n     * } ]\n     * }\n     * }\n     * ]\n     * </pre>\n     */\n    template?: string;\n};\n\nexport type ModelWithOneOfAndProperties = (SimpleParameter | NonAsciiStringæøåÆøÅöôêÊ字符串) & {\n    baz: number | null;\n    qux: number;\n};\n\n/**\n * Model used to test deduplication strategy (unused)\n */\nexport type ParameterSimpleParameterUnused = string;\n\n/**\n * Model used to test deduplication strategy\n */\nexport type PostServiceWithEmptyTagResponse = string;\n\n/**\n * Model used to test deduplication strategy\n */\nexport type PostServiceWithEmptyTagResponse2 = string;\n\n/**\n * Model used to test deduplication strategy\n */\nexport type DeleteFooData = string;\n\n/**\n * Model used to test deduplication strategy\n */\nexport type DeleteFooData2 = string;\n\n/**\n * Model with restricted keyword name\n */\nexport type Import = string;\n\nexport type SchemaWithFormRestrictedKeys = {\n    description?: string;\n    'x-enum-descriptions'?: string;\n    'x-enum-varnames'?: string;\n    'x-enumNames'?: string;\n    title?: string;\n    object?: {\n        description?: string;\n        'x-enum-descriptions'?: string;\n        'x-enum-varnames'?: string;\n        'x-enumNames'?: string;\n        title?: string;\n    };\n    array?: Array<{\n        description?: string;\n        'x-enum-descriptions'?: string;\n        'x-enum-varnames'?: string;\n        'x-enumNames'?: string;\n        title?: string;\n    }>;\n};\n\n/**\n * This schema was giving PascalCase transformations a hard time\n */\nexport type IoK8sApimachineryPkgApisMetaV1DeleteOptions = {\n    /**\n     * Must be fulfilled before a deletion is carried out. If not possible, a 409 Conflict status will be returned.\n     */\n    preconditions?: IoK8sApimachineryPkgApisMetaV1Preconditions;\n};\n\n/**\n * This schema was giving PascalCase transformations a hard time\n */\nexport type IoK8sApimachineryPkgApisMetaV1Preconditions = {\n    /**\n     * Specifies the target ResourceVersion\n     */\n    resourceVersion?: string;\n    /**\n     * Specifies the target UID.\n     */\n    uid?: string;\n};\n\nexport type AdditionalPropertiesUnknownIssue = {\n    [key: string]: string | number;\n};\n\nexport type AdditionalPropertiesUnknownIssue2 = {\n    [key: string]: string | number;\n};\n\nexport type AdditionalPropertiesUnknownIssue3 = string & {\n    entries: {\n        [key: string]: AdditionalPropertiesUnknownIssue;\n    };\n};\n\nexport type AdditionalPropertiesIntegerIssue = {\n    value: number;\n    [key: string]: number;\n};\n\nexport type OneOfAllOfIssue = ((ConstValue | GenericSchemaDuplicateIssue1SystemBoolean) & _3eNum1Период) | GenericSchemaDuplicateIssue1SystemString;\n\nexport type GenericSchemaDuplicateIssue1SystemBoolean = {\n    item?: boolean;\n    error?: string | null;\n    readonly hasError?: boolean;\n    data?: {\n        [key: string]: never;\n    };\n};\n\nexport type GenericSchemaDuplicateIssue1SystemString = {\n    item?: string | null;\n    error?: string | null;\n    readonly hasError?: boolean;\n};\n\nexport type ExternalSharedModel = {\n    id: string;\n    name?: string;\n};\n\n/**\n * This is a model with one property containing a reference\n */\nexport type ModelWithReferenceWritable = {\n    prop?: ModelWithPropertiesWritable;\n};\n\n/**\n * This is a model with one property containing an array\n */\nexport type ModelWithArrayReadOnlyAndWriteOnlyWritable = {\n    prop?: Array<ModelWithReadOnlyAndWriteOnlyWritable>;\n    propWithFile?: Array<Blob | File>;\n    propWithNumber?: Array<number>;\n};\n\n/**\n * This is a model with one nested property\n */\nexport type ModelWithPropertiesWritable = {\n    required: string;\n    requiredAndNullable: string | null;\n    string?: string;\n    number?: number;\n    boolean?: boolean;\n    reference?: ModelWithString;\n    'property with space'?: string;\n    default?: string;\n    try?: string;\n};\n\n/**\n * This is a model that contains a some patterns\n */\nexport type ModelWithPatternWritable = {\n    key: string;\n    name: string;\n    id?: string;\n    text?: string;\n    patternWithSingleQuotes?: string;\n    patternWithNewline?: string;\n    patternWithBacktick?: string;\n    patternWithUnicode?: string;\n};\n\nexport type FileWritable = {\n    /**\n     * Mime\n     */\n    mime: string;\n};\n\nexport type ModelWithReadOnlyAndWriteOnlyWritable = {\n    foo: string;\n    baz: string;\n};\n\nexport type ModelWithAnyOfConstantSizeArrayWithNSizeAndOptionsWritable = [\n    number | Import,\n    number | Import\n];\n\nexport type AdditionalPropertiesUnknownIssueWritable = {\n    [key: string]: string | number;\n};\n\nexport type OneOfAllOfIssueWritable = ((ConstValue | GenericSchemaDuplicateIssue1SystemBoolean) & _3eNum1Период) | GenericSchemaDuplicateIssue1SystemString;\n\nexport type GenericSchemaDuplicateIssue1SystemBooleanWritable = {\n    item?: boolean;\n    error?: string | null;\n    data?: {\n        [key: string]: never;\n    };\n};\n\nexport type GenericSchemaDuplicateIssue1SystemStringWritable = {\n    item?: string | null;\n    error?: string | null;\n};\n\n/**\n * This is a reusable parameter\n */\nexport type SimpleParameter = string;\n\n/**\n * Parameter with illegal characters\n */\nexport type XFooBar = ModelWithString;\n\n/**\n * A reusable request body\n */\nexport type SimpleRequestBody = ModelWithString;\n\n/**\n * A reusable request body\n */\nexport type SimpleFormData = ModelWithString;\n\nexport type ExportData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no+tag';\n};\n\nexport type PatchApiVbyApiVersionNoTagData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no+tag';\n};\n\nexport type PatchApiVbyApiVersionNoTagResponses = {\n    /**\n     * OK\n     */\n    default: unknown;\n};\n\nexport type ImportData = {\n    body: ModelWithReadOnlyAndWriteOnlyWritable | ModelWithArrayReadOnlyAndWriteOnlyWritable;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no+tag';\n};\n\nexport type ImportResponses = {\n    /**\n     * Success\n     */\n    200: ModelFromZendesk;\n    /**\n     * Default success response\n     */\n    default: ModelWithReadOnlyAndWriteOnly;\n};\n\nexport type ImportResponse = ImportResponses[keyof ImportResponses];\n\nexport type FooWowData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no+tag';\n};\n\nexport type FooWowResponses = {\n    /**\n     * OK\n     */\n    default: unknown;\n};\n\nexport type ApiVVersionODataControllerCountData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple/$count';\n};\n\nexport type ApiVVersionODataControllerCountResponses = {\n    /**\n     * Success\n     */\n    200: ModelFromZendesk;\n};\n\nexport type ApiVVersionODataControllerCountResponse = ApiVVersionODataControllerCountResponses[keyof ApiVVersionODataControllerCountResponses];\n\nexport type GetApiVbyApiVersionSimpleOperationData = {\n    body?: never;\n    path: {\n        /**\n         * foo in method\n         */\n        foo_param: string;\n    };\n    query?: never;\n    url: '/api/v{api-version}/simple:operation';\n};\n\nexport type GetApiVbyApiVersionSimpleOperationErrors = {\n    /**\n     * Default error response\n     */\n    default: ModelWithBoolean;\n};\n\nexport type GetApiVbyApiVersionSimpleOperationError = GetApiVbyApiVersionSimpleOperationErrors[keyof GetApiVbyApiVersionSimpleOperationErrors];\n\nexport type GetApiVbyApiVersionSimpleOperationResponses = {\n    /**\n     * Response is a simple number\n     */\n    200: number;\n};\n\nexport type GetApiVbyApiVersionSimpleOperationResponse = GetApiVbyApiVersionSimpleOperationResponses[keyof GetApiVbyApiVersionSimpleOperationResponses];\n\nexport type DeleteCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type GetCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type HeadCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type OptionsCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type PatchCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type PostCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type PutCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type DeleteFooData3 = {\n    body?: never;\n    headers: {\n        /**\n         * Parameter with illegal characters\n         */\n        'x-Foo-Bar': ModelWithString;\n    };\n    path: {\n        /**\n         * foo in method\n         */\n        foo_param: string;\n        /**\n         * bar in method\n         */\n        BarParam: string;\n    };\n    query?: never;\n    url: '/api/v{api-version}/foo/{foo_param}/bar/{BarParam}';\n};\n\nexport type CallWithDescriptionsData = {\n    body?: never;\n    path?: never;\n    query?: {\n        /**\n         * Testing multiline comments in string: First line\n         * Second line\n         *\n         * Fourth line\n         */\n        parameterWithBreaks?: string;\n        /**\n         * Testing backticks in string: `backticks` and ```multiple backticks``` should work\n         */\n        parameterWithBackticks?: string;\n        /**\n         * Testing slashes in string: \\backwards\\\\\\ and /forwards/// should work\n         */\n        parameterWithSlashes?: string;\n        /**\n         * Testing expression placeholders in string: ${expression} should work\n         */\n        parameterWithExpressionPlaceholders?: string;\n        /**\n         * Testing quotes in string: 'single quote''' and \"double quotes\"\"\" should work\n         */\n        parameterWithQuotes?: string;\n        /**\n         * Testing reserved characters in string: * inline * and ** inline ** should work\n         */\n        parameterWithReservedCharacters?: string;\n    };\n    url: '/api/v{api-version}/descriptions';\n};\n\nexport type DeprecatedCallData = {\n    body?: never;\n    headers: {\n        /**\n         * This parameter is deprecated\n         *\n         * @deprecated\n         */\n        parameter: DeprecatedModel | null;\n    };\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/parameters/deprecated';\n};\n\nexport type CallWithParametersData = {\n    /**\n     * This is the parameter that goes into the body\n     */\n    body: {\n        [key: string]: unknown;\n    } | null;\n    headers: {\n        /**\n         * This is the parameter that goes into the header\n         */\n        parameterHeader: string | null;\n    };\n    path: {\n        /**\n         * This is the parameter that goes into the path\n         */\n        parameterPath: string | null;\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string | null;\n    };\n    query: {\n        foo_ref_enum?: ModelWithNestedArrayEnumsDataFoo;\n        foo_all_of_enum: ModelWithNestedArrayEnumsDataFoo;\n        /**\n         * This is the parameter that goes into the query params\n         */\n        cursor: string | null;\n    };\n    url: '/api/v{api-version}/parameters/{parameterPath}';\n};\n\nexport type CallWithWeirdParameterNamesData = {\n    /**\n     * This is the parameter that goes into the body\n     */\n    body: ModelWithString | null;\n    headers: {\n        /**\n         * This is the parameter that goes into the request header\n         */\n        'parameter.header': string | null;\n    };\n    path: {\n        /**\n         * This is the parameter that goes into the path\n         */\n        'parameter.path.1'?: string;\n        /**\n         * This is the parameter that goes into the path\n         */\n        'parameter-path-2'?: string;\n        /**\n         * This is the parameter that goes into the path\n         */\n        'PARAMETER-PATH-3'?: string;\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string | null;\n    };\n    query: {\n        /**\n         * This is the parameter with a reserved keyword\n         */\n        default?: string;\n        /**\n         * This is the parameter that goes into the request query params\n         */\n        'parameter-query': string | null;\n    };\n    url: '/api/v{api-version}/parameters/{parameter.path.1}/{parameter-path-2}/{PARAMETER-PATH-3}';\n};\n\nexport type GetCallWithOptionalParamData = {\n    /**\n     * This is a required parameter\n     */\n    body: ModelWithOneOfEnum;\n    path?: never;\n    query?: {\n        /**\n         * This is an optional parameter\n         */\n        page?: number;\n    };\n    url: '/api/v{api-version}/parameters';\n};\n\nexport type PostCallWithOptionalParamData = {\n    /**\n     * This is an optional parameter\n     */\n    body?: {\n        offset?: number | null;\n    };\n    path?: never;\n    query: {\n        /**\n         * This is a required parameter\n         */\n        parameter: Pageable;\n    };\n    url: '/api/v{api-version}/parameters';\n};\n\nexport type PostCallWithOptionalParamResponses = {\n    /**\n     * Response is a simple number\n     */\n    200: number;\n    /**\n     * Success\n     */\n    204: void;\n};\n\nexport type PostCallWithOptionalParamResponse = PostCallWithOptionalParamResponses[keyof PostCallWithOptionalParamResponses];\n\nexport type PostApiVbyApiVersionRequestBodyData = {\n    /**\n     * A reusable request body\n     */\n    body?: SimpleRequestBody;\n    path?: never;\n    query?: {\n        /**\n         * This is a reusable parameter\n         */\n        parameter?: string;\n    };\n    url: '/api/v{api-version}/requestBody';\n};\n\nexport type PostApiVbyApiVersionFormDataData = {\n    /**\n     * A reusable request body\n     */\n    body?: SimpleFormData;\n    path?: never;\n    query?: {\n        /**\n         * This is a reusable parameter\n         */\n        parameter?: string;\n    };\n    url: '/api/v{api-version}/formData';\n};\n\nexport type CallWithDefaultParametersData = {\n    body?: never;\n    path?: never;\n    query?: {\n        /**\n         * This is a simple string with default value\n         */\n        parameterString?: string | null;\n        /**\n         * This is a simple number with default value\n         */\n        parameterNumber?: number | null;\n        /**\n         * This is a simple boolean with default value\n         */\n        parameterBoolean?: boolean | null;\n        /**\n         * This is a simple enum with default value\n         */\n        parameterEnum?: 'Success' | 'Warning' | 'Error';\n        /**\n         * This is a simple model with default value\n         */\n        parameterModel?: ModelWithString | null;\n    };\n    url: '/api/v{api-version}/defaults';\n};\n\nexport type CallWithDefaultOptionalParametersData = {\n    body?: never;\n    path?: never;\n    query?: {\n        /**\n         * This is a simple string that is optional with default value\n         */\n        parameterString?: string;\n        /**\n         * This is a simple number that is optional with default value\n         */\n        parameterNumber?: number;\n        /**\n         * This is a simple boolean that is optional with default value\n         */\n        parameterBoolean?: boolean;\n        /**\n         * This is a simple enum that is optional with default value\n         */\n        parameterEnum?: 'Success' | 'Warning' | 'Error';\n        /**\n         * This is a simple model that is optional with default value\n         */\n        parameterModel?: ModelWithString;\n    };\n    url: '/api/v{api-version}/defaults';\n};\n\nexport type CallToTestOrderOfParamsData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * This is a optional string with default\n         */\n        parameterOptionalStringWithDefault?: string;\n        /**\n         * This is a optional string with empty default\n         */\n        parameterOptionalStringWithEmptyDefault?: string;\n        /**\n         * This is a optional string with no default\n         */\n        parameterOptionalStringWithNoDefault?: string;\n        /**\n         * This is a string with default\n         */\n        parameterStringWithDefault: string;\n        /**\n         * This is a string with empty default\n         */\n        parameterStringWithEmptyDefault: string;\n        /**\n         * This is a string with no default\n         */\n        parameterStringWithNoDefault: string;\n        /**\n         * This is a string that can be null with no default\n         */\n        parameterStringNullableWithNoDefault?: string | null;\n        /**\n         * This is a string that can be null with default\n         */\n        parameterStringNullableWithDefault?: string | null;\n    };\n    url: '/api/v{api-version}/defaults';\n};\n\nexport type DuplicateNameData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/duplicate';\n};\n\nexport type DuplicateName2Data = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/duplicate';\n};\n\nexport type DuplicateName3Data = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/duplicate';\n};\n\nexport type DuplicateName4Data = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/duplicate';\n};\n\nexport type CallWithNoContentResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no-content';\n};\n\nexport type CallWithNoContentResponseResponses = {\n    /**\n     * Success\n     */\n    204: void;\n};\n\nexport type CallWithNoContentResponseResponse = CallWithNoContentResponseResponses[keyof CallWithNoContentResponseResponses];\n\nexport type CallWithResponseAndNoContentResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multiple-tags/response-and-no-content';\n};\n\nexport type CallWithResponseAndNoContentResponseResponses = {\n    /**\n     * Response is a simple number\n     */\n    200: number;\n    /**\n     * Success\n     */\n    204: void;\n};\n\nexport type CallWithResponseAndNoContentResponseResponse = CallWithResponseAndNoContentResponseResponses[keyof CallWithResponseAndNoContentResponseResponses];\n\nexport type DummyAData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multiple-tags/a';\n};\n\nexport type DummyAResponses = {\n    200: _400;\n};\n\nexport type DummyAResponse = DummyAResponses[keyof DummyAResponses];\n\nexport type DummyBData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multiple-tags/b';\n};\n\nexport type DummyBResponses = {\n    /**\n     * Success\n     */\n    204: void;\n};\n\nexport type DummyBResponse = DummyBResponses[keyof DummyBResponses];\n\nexport type CallWithResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/response';\n};\n\nexport type CallWithResponseResponses = {\n    default: Import;\n};\n\nexport type CallWithResponseResponse = CallWithResponseResponses[keyof CallWithResponseResponses];\n\nexport type CallWithDuplicateResponsesData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/response';\n};\n\nexport type CallWithDuplicateResponsesErrors = {\n    /**\n     * Message for 500 error\n     */\n    500: ModelWithStringError;\n    /**\n     * Message for 501 error\n     */\n    501: ModelWithStringError;\n    /**\n     * Message for 502 error\n     */\n    502: ModelWithStringError;\n    /**\n     * Message for 4XX errors\n     */\n    '4XX': DictionaryWithArray;\n    /**\n     * Default error response\n     */\n    default: ModelWithBoolean;\n};\n\nexport type CallWithDuplicateResponsesError = CallWithDuplicateResponsesErrors[keyof CallWithDuplicateResponsesErrors];\n\nexport type CallWithDuplicateResponsesResponses = {\n    /**\n     * Message for 200 response\n     */\n    200: ModelWithBoolean & ModelWithInteger;\n    /**\n     * Message for 201 response\n     */\n    201: ModelWithString;\n    /**\n     * Message for 202 response\n     */\n    202: ModelWithString;\n};\n\nexport type CallWithDuplicateResponsesResponse = CallWithDuplicateResponsesResponses[keyof CallWithDuplicateResponsesResponses];\n\nexport type CallWithResponsesData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/response';\n};\n\nexport type CallWithResponsesErrors = {\n    /**\n     * Message for 500 error\n     */\n    500: ModelWithStringError;\n    /**\n     * Message for 501 error\n     */\n    501: ModelWithStringError;\n    /**\n     * Message for 502 error\n     */\n    502: ModelWithStringError;\n    /**\n     * Message for default response\n     */\n    default: ModelWithStringError;\n};\n\nexport type CallWithResponsesError = CallWithResponsesErrors[keyof CallWithResponsesErrors];\n\nexport type CallWithResponsesResponses = {\n    /**\n     * Message for 200 response\n     */\n    200: {\n        readonly '@namespace.string'?: string;\n        readonly '@namespace.integer'?: number;\n        readonly value?: Array<ModelWithString>;\n    };\n    /**\n     * Message for 201 response\n     */\n    201: ModelThatExtends;\n    /**\n     * Message for 202 response\n     */\n    202: ModelThatExtendsExtends;\n};\n\nexport type CallWithResponsesResponse = CallWithResponsesResponses[keyof CallWithResponsesResponses];\n\nexport type CollectionFormatData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * This is an array parameter that is sent as csv format (comma-separated values)\n         */\n        parameterArrayCSV: Array<string> | null;\n        /**\n         * This is an array parameter that is sent as ssv format (space-separated values)\n         */\n        parameterArraySSV: Array<string> | null;\n        /**\n         * This is an array parameter that is sent as tsv format (tab-separated values)\n         */\n        parameterArrayTSV: Array<string> | null;\n        /**\n         * This is an array parameter that is sent as pipes format (pipe-separated values)\n         */\n        parameterArrayPipes: Array<string> | null;\n        /**\n         * This is an array parameter that is sent as multi format (multiple parameter instances)\n         */\n        parameterArrayMulti: Array<string> | null;\n    };\n    url: '/api/v{api-version}/collectionFormat';\n};\n\nexport type TypesData = {\n    body?: never;\n    path?: {\n        /**\n         * This is a number parameter\n         */\n        id?: number;\n    };\n    query: {\n        /**\n         * This is a number parameter\n         */\n        parameterNumber: number;\n        /**\n         * This is a string parameter\n         */\n        parameterString: string | null;\n        /**\n         * This is a boolean parameter\n         */\n        parameterBoolean: boolean | null;\n        /**\n         * This is an object parameter\n         */\n        parameterObject: {\n            [key: string]: unknown;\n        } | null;\n        /**\n         * This is an array parameter\n         */\n        parameterArray: Array<string> | null;\n        /**\n         * This is a dictionary parameter\n         */\n        parameterDictionary: {\n            [key: string]: unknown;\n        } | null;\n        /**\n         * This is an enum parameter\n         */\n        parameterEnum: 'Success' | 'Warning' | 'Error' | null;\n    };\n    url: '/api/v{api-version}/types';\n};\n\nexport type TypesResponses = {\n    /**\n     * Response is a simple number\n     */\n    200: number;\n    /**\n     * Response is a simple string\n     */\n    201: string;\n    /**\n     * Response is a simple boolean\n     */\n    202: boolean;\n    /**\n     * Response is a simple object\n     */\n    203: {\n        [key: string]: unknown;\n    };\n};\n\nexport type TypesResponse = TypesResponses[keyof TypesResponses];\n\nexport type UploadFileData = {\n    body: Blob | File;\n    path: {\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string | null;\n    };\n    query?: never;\n    url: '/api/v{api-version}/upload';\n};\n\nexport type UploadFileResponses = {\n    200: boolean;\n};\n\nexport type UploadFileResponse = UploadFileResponses[keyof UploadFileResponses];\n\nexport type FileResponseData = {\n    body?: never;\n    path: {\n        id: string;\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string;\n    };\n    query?: never;\n    url: '/api/v{api-version}/file/{id}';\n};\n\nexport type FileResponseResponses = {\n    /**\n     * Success\n     */\n    200: Blob | File;\n};\n\nexport type FileResponseResponse = FileResponseResponses[keyof FileResponseResponses];\n\nexport type ComplexTypesData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * Parameter containing object\n         */\n        parameterObject: {\n            first?: {\n                second?: {\n                    third?: string;\n                };\n            };\n        };\n        /**\n         * Parameter containing reference\n         */\n        parameterReference: ModelWithString;\n    };\n    url: '/api/v{api-version}/complex';\n};\n\nexport type ComplexTypesErrors = {\n    /**\n     * 400 `server` error\n     */\n    400: unknown;\n    /**\n     * 500 server error\n     */\n    500: unknown;\n};\n\nexport type ComplexTypesResponses = {\n    /**\n     * Successful response\n     */\n    200: Array<ModelWithString>;\n};\n\nexport type ComplexTypesResponse = ComplexTypesResponses[keyof ComplexTypesResponses];\n\nexport type MultipartResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multipart';\n};\n\nexport type MultipartResponseResponses = {\n    /**\n     * OK\n     */\n    200: {\n        file?: Blob | File;\n        metadata?: {\n            foo?: string;\n            bar?: string;\n        };\n    };\n};\n\nexport type MultipartResponseResponse = MultipartResponseResponses[keyof MultipartResponseResponses];\n\nexport type MultipartRequestData = {\n    body?: {\n        content?: Blob | File;\n        data?: ModelWithString | null;\n    };\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multipart';\n};\n\nexport type ComplexParamsData = {\n    body?: {\n        readonly key: string | null;\n        name: string | null;\n        enabled?: boolean;\n        type: 'Monkey' | 'Horse' | 'Bird';\n        listOfModels?: Array<ModelWithString> | null;\n        listOfStrings?: Array<string> | null;\n        parameters: ModelWithString | ModelWithEnum | ModelWithArray | ModelWithDictionary;\n        readonly user?: {\n            readonly id?: number;\n            readonly name?: string | null;\n        };\n    };\n    path: {\n        id: number;\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string;\n    };\n    query?: never;\n    url: '/api/v{api-version}/complex/{id}';\n};\n\nexport type ComplexParamsResponses = {\n    /**\n     * Success\n     */\n    200: ModelWithString;\n};\n\nexport type ComplexParamsResponse = ComplexParamsResponses[keyof ComplexParamsResponses];\n\nexport type CallWithResultFromHeaderData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/header';\n};\n\nexport type CallWithResultFromHeaderErrors = {\n    /**\n     * 400 server error\n     */\n    400: unknown;\n    /**\n     * 500 server error\n     */\n    500: unknown;\n};\n\nexport type CallWithResultFromHeaderResponses = {\n    /**\n     * Successful response\n     */\n    200: unknown;\n};\n\nexport type TestErrorCodeData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * Status code to return\n         */\n        status: number;\n    };\n    url: '/api/v{api-version}/error';\n};\n\nexport type TestErrorCodeErrors = {\n    /**\n     * Custom message: Internal Server Error\n     */\n    500: unknown;\n    /**\n     * Custom message: Not Implemented\n     */\n    501: unknown;\n    /**\n     * Custom message: Bad Gateway\n     */\n    502: unknown;\n    /**\n     * Custom message: Service Unavailable\n     */\n    503: unknown;\n};\n\nexport type TestErrorCodeResponses = {\n    /**\n     * Custom message: Successful response\n     */\n    200: unknown;\n};\n\nexport type NonAsciiæøåÆøÅöôêÊ字符串Data = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * Dummy input param\n         */\n        nonAsciiParamæøåÆØÅöôêÊ: number;\n    };\n    url: '/api/v{api-version}/non-ascii-æøåÆØÅöôêÊ字符串';\n};\n\nexport type NonAsciiæøåÆøÅöôêÊ字符串Responses = {\n    /**\n     * Successful response\n     */\n    200: Array<NonAsciiStringæøåÆøÅöôêÊ字符串>;\n};\n\nexport type NonAsciiæøåÆøÅöôêÊ字符串Response = NonAsciiæøåÆøÅöôêÊ字符串Responses[keyof NonAsciiæøåÆøÅöôêÊ字符串Responses];\n\nexport type PutWithFormUrlEncodedData = {\n    body: ArrayWithStrings;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/non-ascii-æøåÆØÅöôêÊ字符串';\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/angular-query-experimental/asClass/@tanstack/angular-query-experimental.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport { type DefaultError, type MutationOptions, queryOptions } from '@tanstack/angular-query-experimental';\n\nimport { client } from '../client.gen';\nimport { BarBazService, BarService, FooBazService, FooService, type Options } from '../sdk.gen';\nimport type { FooBarPostData, FooBarPostResponse, FooBarPutData, FooBarPutResponse, FooPostData, FooPostResponse, FooPutData, FooPutResponse, GetFooBarData, GetFooBarResponse, GetFooData, GetFooResponse } from '../types.gen';\n\nexport type QueryKey<TOptions extends Options> = [\n    Pick<TOptions, 'baseUrl' | 'body' | 'headers' | 'path' | 'query'> & {\n        _id: string;\n        _infinite?: boolean;\n        tags?: ReadonlyArray<string>;\n    }\n];\n\nconst createQueryKey = <TOptions extends Options>(id: string, options?: TOptions, infinite?: boolean, tags?: ReadonlyArray<string>): [\n    QueryKey<TOptions>[0]\n] => {\n    const params: QueryKey<TOptions>[0] = { _id: id, baseUrl: options?.baseUrl || (options?.client ?? client).getConfig().baseUrl } as QueryKey<TOptions>[0];\n    if (infinite) {\n        params._infinite = infinite;\n    }\n    if (tags) {\n        params.tags = tags;\n    }\n    if (options?.body) {\n        params.body = options.body;\n    }\n    if (options?.headers) {\n        params.headers = options.headers;\n    }\n    if (options?.path) {\n        params.path = options.path;\n    }\n    if (options?.query) {\n        params.query = options.query;\n    }\n    return [params];\n};\n\nexport const getFooQueryKey = (options?: Options<GetFooData>) => createQueryKey('getFoo', options);\n\nexport const getFooOptions = (options?: Options<GetFooData>) => queryOptions<GetFooResponse, DefaultError, GetFooResponse, ReturnType<typeof getFooQueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await FooBazService.getFoo({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: getFooQueryKey(options)\n});\n\nexport const fooPostMutation = (options?: Partial<Options<FooPostData>>): MutationOptions<FooPostResponse, DefaultError, Options<FooPostData>> => {\n    const mutationOptions: MutationOptions<FooPostResponse, DefaultError, Options<FooPostData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await FooService.post({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const fooPutMutation = (options?: Partial<Options<FooPutData>>): MutationOptions<FooPutResponse, DefaultError, Options<FooPutData>> => {\n    const mutationOptions: MutationOptions<FooPutResponse, DefaultError, Options<FooPutData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await FooService.put({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const getFooBarQueryKey = (options?: Options<GetFooBarData>) => createQueryKey('getFooBar', options);\n\nexport const getFooBarOptions = (options?: Options<GetFooBarData>) => queryOptions<GetFooBarResponse, DefaultError, GetFooBarResponse, ReturnType<typeof getFooBarQueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await BarBazService.getFooBar({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: getFooBarQueryKey(options)\n});\n\nexport const fooBarPostMutation = (options?: Partial<Options<FooBarPostData>>): MutationOptions<FooBarPostResponse, DefaultError, Options<FooBarPostData>> => {\n    const mutationOptions: MutationOptions<FooBarPostResponse, DefaultError, Options<FooBarPostData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await BarService.post({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const fooBarPutMutation = (options?: Partial<Options<FooBarPutData>>): MutationOptions<FooBarPutResponse, DefaultError, Options<FooBarPutData>> => {\n    const mutationOptions: MutationOptions<FooBarPutResponse, DefaultError, Options<FooBarPutData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await BarService.put({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/angular-query-experimental/asClass/client/client.gen.ts",
    "content": "// 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 (options: RequestOptions) => {\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 url = buildUrl(opts);\n\n    return { opts, url };\n  };\n\n  const request: Client['request'] = async (options) => {\n    // @ts-expect-error\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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/angular-query-experimental/asClass/client/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type { Auth } from '../core/auth.gen';\nexport type { QuerySerializerOptions } from '../core/bodySerializer.gen';\nexport {\n  formDataBodySerializer,\n  jsonBodySerializer,\n  urlSearchParamsBodySerializer,\n} from '../core/bodySerializer.gen';\nexport { buildClientParams } from '../core/params.gen';\nexport { serializeQueryKeyValue } from '../core/queryKeySerializer.gen';\nexport { createClient } from './client.gen';\nexport type {\n  Client,\n  ClientOptions,\n  Config,\n  CreateClientConfig,\n  Options,\n  RequestOptions,\n  RequestResult,\n  ResolvedRequestOptions,\n  ResponseStyle,\n  TDataShape,\n} from './types.gen';\nexport { createConfig, mergeHeaders } from './utils.gen';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/angular-query-experimental/asClass/client/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { Auth } from '../core/auth.gen';\nimport type {\n  ServerSentEventsOptions,\n  ServerSentEventsResult,\n} from '../core/serverSentEvents.gen';\nimport type { Client as CoreClient, Config as CoreConfig } from '../core/types.gen';\nimport type { Middleware } from './utils.gen';\n\nexport type ResponseStyle = 'data' | 'fields';\n\nexport interface Config<T extends ClientOptions = ClientOptions>\n  extends Omit<RequestInit, 'body' | 'headers' | 'method'>, CoreConfig {\n  /**\n   * Base URL for all requests made by this client.\n   */\n  baseUrl?: T['baseUrl'];\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   * Please don't use the Fetch client for Next.js applications. The `next`\n   * options won't have any effect.\n   *\n   * Install {@link https://www.npmjs.com/package/@hey-api/client-next `@hey-api/client-next`} instead.\n   */\n  next?: never;\n  /**\n   * Return the response data parsed in a specified format. By default, `auto`\n   * will infer the appropriate method from the `Content-Type` response header.\n   * You can override this behavior with any of the {@link Body} methods.\n   * Select `stream` if you don't want to parse response data at all.\n   *\n   * @default 'auto'\n   */\n  parseAs?: 'arrayBuffer' | 'auto' | 'blob' | 'formData' | 'json' | 'stream' | 'text';\n  /**\n   * Should we return only data or multiple fields (data, error, response, etc.)?\n   *\n   * @default 'fields'\n   */\n  responseStyle?: ResponseStyle;\n  /**\n   * Throw an error instead of returning it in the response?\n   *\n   * @default false\n   */\n  throwOnError?: T['throwOnError'];\n}\n\nexport interface RequestOptions<\n  TData = unknown,\n  TResponseStyle extends ResponseStyle = 'fields',\n  ThrowOnError extends boolean = boolean,\n  Url extends string = string,\n>\n  extends\n    Config<{\n      responseStyle: TResponseStyle;\n      throwOnError: ThrowOnError;\n    }>,\n    Pick<\n      ServerSentEventsOptions<TData>,\n      | 'onRequest'\n      | 'onSseError'\n      | 'onSseEvent'\n      | 'sseDefaultRetryDelay'\n      | 'sseMaxRetryAttempts'\n      | 'sseMaxRetryDelay'\n    > {\n  /**\n   * Any body that you want to add to your request.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/fetch#body}\n   */\n  body?: unknown;\n  path?: Record<string, unknown>;\n  query?: Record<string, unknown>;\n  /**\n   * Security mechanism(s) to use for the request.\n   */\n  security?: ReadonlyArray<Auth>;\n  url: Url;\n}\n\nexport interface ResolvedRequestOptions<\n  TResponseStyle extends ResponseStyle = 'fields',\n  ThrowOnError extends boolean = boolean,\n  Url extends string = string,\n> extends RequestOptions<unknown, TResponseStyle, ThrowOnError, Url> {\n  serializedBody?: string;\n}\n\nexport type RequestResult<\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = boolean,\n  TResponseStyle extends ResponseStyle = 'fields',\n> = ThrowOnError extends true\n  ? Promise<\n      TResponseStyle extends 'data'\n        ? TData extends Record<string, unknown>\n          ? TData[keyof TData]\n          : TData\n        : {\n            data: TData extends Record<string, unknown> ? TData[keyof TData] : TData;\n            request: Request;\n            response: Response;\n          }\n    >\n  : Promise<\n      TResponseStyle extends 'data'\n        ? (TData extends Record<string, unknown> ? TData[keyof TData] : TData) | undefined\n        : (\n            | {\n                data: TData extends Record<string, unknown> ? TData[keyof TData] : TData;\n                error: undefined;\n              }\n            | {\n                data: undefined;\n                error: TError extends Record<string, unknown> ? TError[keyof TError] : TError;\n              }\n          ) & {\n            request: Request;\n            response: Response;\n          }\n    >;\n\nexport interface ClientOptions {\n  baseUrl?: string;\n  responseStyle?: ResponseStyle;\n  throwOnError?: boolean;\n}\n\ntype MethodFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'>,\n) => RequestResult<TData, TError, ThrowOnError, TResponseStyle>;\n\ntype SseFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'>,\n) => Promise<ServerSentEventsResult<TData, TError>>;\n\ntype RequestFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'> &\n    Pick<Required<RequestOptions<TData, TResponseStyle, ThrowOnError>>, 'method'>,\n) => RequestResult<TData, TError, ThrowOnError, TResponseStyle>;\n\ntype BuildUrlFn = <\n  TData extends {\n    body?: unknown;\n    path?: Record<string, unknown>;\n    query?: Record<string, unknown>;\n    url: string;\n  },\n>(\n  options: TData & Options<TData>,\n) => string;\n\nexport type Client = CoreClient<RequestFn, Config, MethodFn, BuildUrlFn, SseFn> & {\n  interceptors: Middleware<Request, Response, unknown, ResolvedRequestOptions>;\n};\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 = ClientOptions> = (\n  override?: Config<ClientOptions & T>,\n) => Config<Required<ClientOptions> & T>;\n\nexport interface TDataShape {\n  body?: unknown;\n  headers?: unknown;\n  path?: unknown;\n  query?: unknown;\n  url: string;\n}\n\ntype OmitKeys<T, K> = Pick<T, Exclude<keyof T, K>>;\n\nexport type Options<\n  TData extends TDataShape = TDataShape,\n  ThrowOnError extends boolean = boolean,\n  TResponse = unknown,\n  TResponseStyle extends ResponseStyle = 'fields',\n> = OmitKeys<\n  RequestOptions<TResponse, TResponseStyle, ThrowOnError>,\n  'body' | 'path' | 'query' | 'url'\n> &\n  ([TData] extends [never] ? unknown : Omit<TData, 'url'>);\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/angular-query-experimental/asClass/client/utils.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/angular-query-experimental/asClass/client.gen.ts",
    "content": "// 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>());\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/angular-query-experimental/asClass/core/auth.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/angular-query-experimental/asClass/core/bodySerializer.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/angular-query-experimental/asClass/core/params.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/angular-query-experimental/asClass/core/pathSerializer.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/angular-query-experimental/asClass/core/queryKeySerializer.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\n/**\n * JSON-friendly union that mirrors what Pinia Colada can hash.\n */\nexport type JsonValue =\n  | null\n  | string\n  | number\n  | boolean\n  | JsonValue[]\n  | { [key: string]: JsonValue };\n\n/**\n * Replacer that converts non-JSON values (bigint, Date, etc.) to safe substitutes.\n */\nexport const queryKeyJsonReplacer = (_key: string, value: unknown) => {\n  if (value === undefined || typeof value === 'function' || typeof value === 'symbol') {\n    return undefined;\n  }\n  if (typeof value === 'bigint') {\n    return value.toString();\n  }\n  if (value instanceof Date) {\n    return value.toISOString();\n  }\n  return value;\n};\n\n/**\n * Safely stringifies a value and parses it back into a JsonValue.\n */\nexport const stringifyToJsonValue = (input: unknown): JsonValue | undefined => {\n  try {\n    const json = JSON.stringify(input, queryKeyJsonReplacer);\n    if (json === undefined) {\n      return undefined;\n    }\n    return JSON.parse(json) as JsonValue;\n  } catch {\n    return undefined;\n  }\n};\n\n/**\n * Detects plain objects (including objects with a null prototype).\n */\nconst isPlainObject = (value: unknown): value is Record<string, unknown> => {\n  if (value === null || typeof value !== 'object') {\n    return false;\n  }\n  const prototype = Object.getPrototypeOf(value as object);\n  return prototype === Object.prototype || prototype === null;\n};\n\n/**\n * Turns URLSearchParams into a sorted JSON object for deterministic keys.\n */\nconst serializeSearchParams = (params: URLSearchParams): JsonValue => {\n  const entries = Array.from(params.entries()).sort(([a], [b]) => a.localeCompare(b));\n  const result: Record<string, JsonValue> = {};\n\n  for (const [key, value] of entries) {\n    const existing = result[key];\n    if (existing === undefined) {\n      result[key] = value;\n      continue;\n    }\n\n    if (Array.isArray(existing)) {\n      (existing as string[]).push(value);\n    } else {\n      result[key] = [existing, value];\n    }\n  }\n\n  return result;\n};\n\n/**\n * Normalizes any accepted value into a JSON-friendly shape for query keys.\n */\nexport const serializeQueryKeyValue = (value: unknown): JsonValue | undefined => {\n  if (value === null) {\n    return null;\n  }\n\n  if (typeof value === 'string' || typeof value === 'number' || typeof value === 'boolean') {\n    return value;\n  }\n\n  if (value === undefined || typeof value === 'function' || typeof value === 'symbol') {\n    return undefined;\n  }\n\n  if (typeof value === 'bigint') {\n    return value.toString();\n  }\n\n  if (value instanceof Date) {\n    return value.toISOString();\n  }\n\n  if (Array.isArray(value)) {\n    return stringifyToJsonValue(value);\n  }\n\n  if (typeof URLSearchParams !== 'undefined' && value instanceof URLSearchParams) {\n    return serializeSearchParams(value);\n  }\n\n  if (isPlainObject(value)) {\n    return stringifyToJsonValue(value);\n  }\n\n  return undefined;\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/angular-query-experimental/asClass/core/serverSentEvents.gen.ts",
    "content": "// 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 const 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            // Normalize line endings: CRLF -> LF, then CR -> LF\n            buffer = buffer.replace(/\\r\\n/g, '\\n').replace(/\\r/g, '\\n');\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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/angular-query-experimental/asClass/core/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { Auth, AuthToken } from './auth.gen';\nimport type { BodySerializer, QuerySerializer, QuerySerializerOptions } from './bodySerializer.gen';\n\nexport type HttpMethod =\n  | 'connect'\n  | 'delete'\n  | 'get'\n  | 'head'\n  | 'options'\n  | 'patch'\n  | 'post'\n  | 'put'\n  | 'trace';\n\nexport type Client<\n  RequestFn = never,\n  Config = unknown,\n  MethodFn = never,\n  BuildUrlFn = never,\n  SseFn = never,\n> = {\n  /**\n   * Returns the final request URL.\n   */\n  buildUrl: BuildUrlFn;\n  getConfig: () => Config;\n  request: RequestFn;\n  setConfig: (config: Config) => Config;\n} & {\n  [K in HttpMethod]: MethodFn;\n} & ([SseFn] extends [never] ? { sse?: never } : { sse: { [K in HttpMethod]: SseFn } });\n\nexport interface Config {\n  /**\n   * Auth token or a function returning auth token. The resolved value will be\n   * added to the request payload as defined by its `security` array.\n   */\n  auth?: ((auth: Auth) => Promise<AuthToken> | AuthToken) | AuthToken;\n  /**\n   * A function for serializing request body parameter. By default,\n   * {@link JSON.stringify()} will be used.\n   */\n  bodySerializer?: BodySerializer | null;\n  /**\n   * An object containing any HTTP headers that you want to pre-populate your\n   * `Headers` object with.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/Headers/Headers#init See more}\n   */\n  headers?:\n    | RequestInit['headers']\n    | Record<\n        string,\n        string | number | boolean | (string | number | boolean)[] | null | undefined | unknown\n      >;\n  /**\n   * The request method.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/fetch#method See more}\n   */\n  method?: Uppercase<HttpMethod>;\n  /**\n   * A function for serializing request query parameters. By default, arrays\n   * will be exploded in form style, objects will be exploded in deepObject\n   * style, and reserved characters are percent-encoded.\n   *\n   * This method will have no effect if the native `paramsSerializer()` Axios\n   * API function is used.\n   *\n   * {@link https://swagger.io/docs/specification/serialization/#query View examples}\n   */\n  querySerializer?: QuerySerializer | QuerySerializerOptions;\n  /**\n   * A function validating request data. This is useful if you want to ensure\n   * the request conforms to the desired shape, so it can be safely sent to\n   * the server.\n   */\n  requestValidator?: (data: unknown) => Promise<unknown>;\n  /**\n   * A function transforming response data before it's returned. This is useful\n   * for post-processing data, e.g. converting ISO strings into Date objects.\n   */\n  responseTransformer?: (data: unknown) => Promise<unknown>;\n  /**\n   * A function validating response data. This is useful if you want to ensure\n   * the response conforms to the desired shape, so it can be safely passed to\n   * the transformers and returned to the user.\n   */\n  responseValidator?: (data: unknown) => Promise<unknown>;\n}\n\ntype IsExactlyNeverOrNeverUndefined<T> = [T] extends [never]\n  ? true\n  : [T] extends [never | undefined]\n    ? [undefined] extends [T]\n      ? false\n      : true\n    : false;\n\nexport type OmitNever<T extends Record<string, unknown>> = {\n  [K in keyof T as IsExactlyNeverOrNeverUndefined<T[K]> extends true ? never : K]: T[K];\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/angular-query-experimental/asClass/core/utils.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/angular-query-experimental/asClass/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport { BarBazService, BarService, BarService2, FooBazService, FooService, FooService2, type Options } from './sdk.gen';\nexport type { ClientOptions, FooBarPostData, FooBarPostResponse, FooBarPostResponses, FooBarPutData, FooBarPutResponse, FooBarPutResponses, FooPostData, FooPostResponse, FooPostResponses, FooPutData, FooPutResponse, FooPutResponses, GetFooBarData, GetFooBarResponse, GetFooBarResponses, GetFooData, GetFooResponse, GetFooResponses } from './types.gen';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/angular-query-experimental/asClass/sdk.gen.ts",
    "content": "// 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 { FooBarPostData, FooBarPostResponses, FooBarPutData, FooBarPutResponses, FooPostData, FooPostResponses, FooPutData, FooPutResponses, GetFooBarData, GetFooBarResponses, GetFooData, GetFooResponses } from './types.gen';\n\nexport type Options<TData extends TDataShape = TDataShape, ThrowOnError extends boolean = boolean> = Options2<TData, ThrowOnError> & {\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\nexport class BarService {\n    public static post<ThrowOnError extends boolean = false>(options?: Options<FooBarPostData, ThrowOnError>) {\n        return (options?.client ?? client).post<FooBarPostResponses, unknown, ThrowOnError>({ url: '/foo/bar', ...options });\n    }\n    \n    public static put<ThrowOnError extends boolean = false>(options?: Options<FooBarPutData, ThrowOnError>) {\n        return (options?.client ?? client).put<FooBarPutResponses, unknown, ThrowOnError>({ url: '/foo/bar', ...options });\n    }\n}\n\nexport class FooService {\n    public static post<ThrowOnError extends boolean = false>(options?: Options<FooPostData, ThrowOnError>) {\n        return (options?.client ?? client).post<FooPostResponses, unknown, ThrowOnError>({ url: '/foo', ...options });\n    }\n    \n    public static put<ThrowOnError extends boolean = false>(options?: Options<FooPutData, ThrowOnError>) {\n        return (options?.client ?? client).put<FooPutResponses, unknown, ThrowOnError>({ url: '/foo', ...options });\n    }\n    \n    static barService = BarService;\n}\n\nexport class FooBazService {\n    public static getFoo<ThrowOnError extends boolean = false>(options?: Options<GetFooData, ThrowOnError>) {\n        return (options?.client ?? client).get<GetFooResponses, unknown, ThrowOnError>({ url: '/foo', ...options });\n    }\n    \n    static fooService = FooService;\n}\n\nexport class BarService2 {\n    public static post<ThrowOnError extends boolean = false>(options?: Options<FooBarPostData, ThrowOnError>) {\n        return (options?.client ?? client).post<FooBarPostResponses, unknown, ThrowOnError>({ url: '/foo/bar', ...options });\n    }\n    \n    public static put<ThrowOnError extends boolean = false>(options?: Options<FooBarPutData, ThrowOnError>) {\n        return (options?.client ?? client).put<FooBarPutResponses, unknown, ThrowOnError>({ url: '/foo/bar', ...options });\n    }\n}\n\nexport class FooService2 {\n    static barService = BarService2;\n}\n\nexport class BarBazService {\n    public static getFooBar<ThrowOnError extends boolean = false>(options?: Options<GetFooBarData, ThrowOnError>) {\n        return (options?.client ?? client).get<GetFooBarResponses, unknown, ThrowOnError>({ url: '/foo/bar', ...options });\n    }\n    \n    static fooService = FooService2;\n}\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/angular-query-experimental/asClass/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type ClientOptions = {\n    baseUrl: `${string}://${string}` | (string & {});\n};\n\nexport type GetFooData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/foo';\n};\n\nexport type GetFooResponses = {\n    /**\n     * OK\n     */\n    200: string;\n};\n\nexport type GetFooResponse = GetFooResponses[keyof GetFooResponses];\n\nexport type FooPostData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/foo';\n};\n\nexport type FooPostResponses = {\n    /**\n     * OK\n     */\n    200: string;\n};\n\nexport type FooPostResponse = FooPostResponses[keyof FooPostResponses];\n\nexport type FooPutData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/foo';\n};\n\nexport type FooPutResponses = {\n    /**\n     * OK\n     */\n    200: string;\n};\n\nexport type FooPutResponse = FooPutResponses[keyof FooPutResponses];\n\nexport type GetFooBarData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/foo/bar';\n};\n\nexport type GetFooBarResponses = {\n    /**\n     * OK\n     */\n    200: string;\n};\n\nexport type GetFooBarResponse = GetFooBarResponses[keyof GetFooBarResponses];\n\nexport type FooBarPostData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/foo/bar';\n};\n\nexport type FooBarPostResponses = {\n    /**\n     * OK\n     */\n    200: string;\n};\n\nexport type FooBarPostResponse = FooBarPostResponses[keyof FooBarPostResponses];\n\nexport type FooBarPutData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/foo/bar';\n};\n\nexport type FooBarPutResponses = {\n    /**\n     * OK\n     */\n    200: string;\n};\n\nexport type FooBarPutResponse = FooBarPutResponses[keyof FooBarPutResponses];\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/angular-query-experimental/axios/@tanstack/angular-query-experimental.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport { type DefaultError, type InfiniteData, infiniteQueryOptions, type MutationOptions, queryOptions } from '@tanstack/angular-query-experimental';\nimport type { AxiosError } from 'axios';\n\nimport { client } from '../client.gen';\nimport { apiVVersionODataControllerCount, callToTestOrderOfParams, callWithDefaultOptionalParameters, callWithDefaultParameters, callWithDescriptions, callWithDuplicateResponses, callWithNoContentResponse, callWithParameters, callWithResponse, callWithResponseAndNoContentResponse, callWithResponses, callWithResultFromHeader, callWithWeirdParameterNames, collectionFormat, complexParams, complexTypes, deleteCallWithoutParametersAndResponse, deleteFoo, deprecatedCall, dummyA, dummyB, duplicateName, duplicateName2, duplicateName3, duplicateName4, export_, fileResponse, fooWow, getApiVbyApiVersionSimpleOperation, getCallWithOptionalParam, getCallWithoutParametersAndResponse, import_, multipartRequest, multipartResponse, nonAsciiæøåÆøÅöôêÊ字符串, type Options, patchApiVbyApiVersionNoTag, patchCallWithoutParametersAndResponse, postApiVbyApiVersionFormData, postApiVbyApiVersionRequestBody, postCallWithOptionalParam, postCallWithoutParametersAndResponse, putCallWithoutParametersAndResponse, putWithFormUrlEncoded, testErrorCode, types, uploadFile } from '../sdk.gen';\nimport type { ApiVVersionODataControllerCountData, ApiVVersionODataControllerCountResponse, CallToTestOrderOfParamsData, CallWithDefaultOptionalParametersData, CallWithDefaultParametersData, CallWithDescriptionsData, CallWithDuplicateResponsesData, CallWithDuplicateResponsesError, CallWithDuplicateResponsesResponse, CallWithNoContentResponseData, CallWithNoContentResponseResponse, CallWithParametersData, CallWithResponseAndNoContentResponseData, CallWithResponseAndNoContentResponseResponse, CallWithResponseData, CallWithResponseResponse, CallWithResponsesData, CallWithResponsesError, CallWithResponsesResponse, CallWithResultFromHeaderData, CallWithWeirdParameterNamesData, CollectionFormatData, ComplexParamsData, ComplexParamsResponse, ComplexTypesData, ComplexTypesResponse, DeleteCallWithoutParametersAndResponseData, DeleteFooData3, DeprecatedCallData, DummyAData, DummyAResponse, DummyBData, DummyBResponse, DuplicateName2Data, DuplicateName3Data, DuplicateName4Data, DuplicateNameData, ExportData, FileResponseData, FileResponseResponse, FooWowData, GetApiVbyApiVersionSimpleOperationData, GetApiVbyApiVersionSimpleOperationError, GetApiVbyApiVersionSimpleOperationResponse, GetCallWithOptionalParamData, GetCallWithoutParametersAndResponseData, ImportData, ImportResponse, MultipartRequestData, MultipartResponseData, MultipartResponseResponse, NonAsciiæøåÆøÅöôêÊ字符串Data, NonAsciiæøåÆøÅöôêÊ字符串Response, PatchApiVbyApiVersionNoTagData, PatchCallWithoutParametersAndResponseData, PostApiVbyApiVersionFormDataData, PostApiVbyApiVersionRequestBodyData, PostCallWithOptionalParamData, PostCallWithOptionalParamResponse, PostCallWithoutParametersAndResponseData, PutCallWithoutParametersAndResponseData, PutWithFormUrlEncodedData, TestErrorCodeData, TypesData, TypesResponse, UploadFileData, UploadFileResponse } from '../types.gen';\n\nexport type QueryKey<TOptions extends Options> = [\n    Pick<TOptions, 'baseURL' | 'body' | 'headers' | 'path' | 'query'> & {\n        _id: string;\n        _infinite?: boolean;\n        tags?: ReadonlyArray<string>;\n    }\n];\n\nconst createQueryKey = <TOptions extends Options>(id: string, options?: TOptions, infinite?: boolean, tags?: ReadonlyArray<string>): [\n    QueryKey<TOptions>[0]\n] => {\n    const params: QueryKey<TOptions>[0] = { _id: id, baseURL: options?.baseURL || (options?.client ?? client).getConfig().baseURL } as QueryKey<TOptions>[0];\n    if (infinite) {\n        params._infinite = infinite;\n    }\n    if (tags) {\n        params.tags = tags;\n    }\n    if (options?.body) {\n        params.body = options.body;\n    }\n    if (options?.headers) {\n        params.headers = options.headers;\n    }\n    if (options?.path) {\n        params.path = options.path;\n    }\n    if (options?.query) {\n        params.query = options.query;\n    }\n    return [params];\n};\n\nexport const exportQueryKey = (options?: Options<ExportData>) => createQueryKey('export', options);\n\nexport const exportOptions = (options?: Options<ExportData>) => queryOptions<unknown, AxiosError<DefaultError>, unknown, ReturnType<typeof exportQueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await export_({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: exportQueryKey(options)\n});\n\nexport const patchApiVbyApiVersionNoTagMutation = (options?: Partial<Options<PatchApiVbyApiVersionNoTagData>>): MutationOptions<unknown, AxiosError<DefaultError>, Options<PatchApiVbyApiVersionNoTagData>> => {\n    const mutationOptions: MutationOptions<unknown, AxiosError<DefaultError>, Options<PatchApiVbyApiVersionNoTagData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await patchApiVbyApiVersionNoTag({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const importMutation = (options?: Partial<Options<ImportData>>): MutationOptions<ImportResponse, AxiosError<DefaultError>, Options<ImportData>> => {\n    const mutationOptions: MutationOptions<ImportResponse, AxiosError<DefaultError>, Options<ImportData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await import_({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const fooWowMutation = (options?: Partial<Options<FooWowData>>): MutationOptions<unknown, AxiosError<DefaultError>, Options<FooWowData>> => {\n    const mutationOptions: MutationOptions<unknown, AxiosError<DefaultError>, Options<FooWowData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await fooWow({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const apiVVersionODataControllerCountQueryKey = (options?: Options<ApiVVersionODataControllerCountData>) => createQueryKey('apiVVersionODataControllerCount', options);\n\nexport const apiVVersionODataControllerCountOptions = (options?: Options<ApiVVersionODataControllerCountData>) => queryOptions<ApiVVersionODataControllerCountResponse, AxiosError<DefaultError>, ApiVVersionODataControllerCountResponse, ReturnType<typeof apiVVersionODataControllerCountQueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await apiVVersionODataControllerCount({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: apiVVersionODataControllerCountQueryKey(options)\n});\n\nexport const getApiVbyApiVersionSimpleOperationQueryKey = (options: Options<GetApiVbyApiVersionSimpleOperationData>) => createQueryKey('getApiVbyApiVersionSimpleOperation', options);\n\nexport const getApiVbyApiVersionSimpleOperationOptions = (options: Options<GetApiVbyApiVersionSimpleOperationData>) => queryOptions<GetApiVbyApiVersionSimpleOperationResponse, AxiosError<GetApiVbyApiVersionSimpleOperationError>, GetApiVbyApiVersionSimpleOperationResponse, ReturnType<typeof getApiVbyApiVersionSimpleOperationQueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await getApiVbyApiVersionSimpleOperation({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: getApiVbyApiVersionSimpleOperationQueryKey(options)\n});\n\nexport const deleteCallWithoutParametersAndResponseMutation = (options?: Partial<Options<DeleteCallWithoutParametersAndResponseData>>): MutationOptions<unknown, AxiosError<DefaultError>, Options<DeleteCallWithoutParametersAndResponseData>> => {\n    const mutationOptions: MutationOptions<unknown, AxiosError<DefaultError>, Options<DeleteCallWithoutParametersAndResponseData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await deleteCallWithoutParametersAndResponse({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const getCallWithoutParametersAndResponseQueryKey = (options?: Options<GetCallWithoutParametersAndResponseData>) => createQueryKey('getCallWithoutParametersAndResponse', options);\n\nexport const getCallWithoutParametersAndResponseOptions = (options?: Options<GetCallWithoutParametersAndResponseData>) => queryOptions<unknown, AxiosError<DefaultError>, unknown, ReturnType<typeof getCallWithoutParametersAndResponseQueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await getCallWithoutParametersAndResponse({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: getCallWithoutParametersAndResponseQueryKey(options)\n});\n\nexport const patchCallWithoutParametersAndResponseMutation = (options?: Partial<Options<PatchCallWithoutParametersAndResponseData>>): MutationOptions<unknown, AxiosError<DefaultError>, Options<PatchCallWithoutParametersAndResponseData>> => {\n    const mutationOptions: MutationOptions<unknown, AxiosError<DefaultError>, Options<PatchCallWithoutParametersAndResponseData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await patchCallWithoutParametersAndResponse({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const postCallWithoutParametersAndResponseMutation = (options?: Partial<Options<PostCallWithoutParametersAndResponseData>>): MutationOptions<unknown, AxiosError<DefaultError>, Options<PostCallWithoutParametersAndResponseData>> => {\n    const mutationOptions: MutationOptions<unknown, AxiosError<DefaultError>, Options<PostCallWithoutParametersAndResponseData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await postCallWithoutParametersAndResponse({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const putCallWithoutParametersAndResponseMutation = (options?: Partial<Options<PutCallWithoutParametersAndResponseData>>): MutationOptions<unknown, AxiosError<DefaultError>, Options<PutCallWithoutParametersAndResponseData>> => {\n    const mutationOptions: MutationOptions<unknown, AxiosError<DefaultError>, Options<PutCallWithoutParametersAndResponseData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await putCallWithoutParametersAndResponse({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const deleteFooMutation = (options?: Partial<Options<DeleteFooData3>>): MutationOptions<unknown, AxiosError<DefaultError>, Options<DeleteFooData3>> => {\n    const mutationOptions: MutationOptions<unknown, AxiosError<DefaultError>, Options<DeleteFooData3>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await deleteFoo({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const callWithDescriptionsMutation = (options?: Partial<Options<CallWithDescriptionsData>>): MutationOptions<unknown, AxiosError<DefaultError>, Options<CallWithDescriptionsData>> => {\n    const mutationOptions: MutationOptions<unknown, AxiosError<DefaultError>, Options<CallWithDescriptionsData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await callWithDescriptions({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\n/**\n * @deprecated\n */\nexport const deprecatedCallMutation = (options?: Partial<Options<DeprecatedCallData>>): MutationOptions<unknown, AxiosError<DefaultError>, Options<DeprecatedCallData>> => {\n    const mutationOptions: MutationOptions<unknown, AxiosError<DefaultError>, Options<DeprecatedCallData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await deprecatedCall({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const callWithParametersMutation = (options?: Partial<Options<CallWithParametersData>>): MutationOptions<unknown, AxiosError<DefaultError>, Options<CallWithParametersData>> => {\n    const mutationOptions: MutationOptions<unknown, AxiosError<DefaultError>, Options<CallWithParametersData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await callWithParameters({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const callWithWeirdParameterNamesMutation = (options?: Partial<Options<CallWithWeirdParameterNamesData>>): MutationOptions<unknown, AxiosError<DefaultError>, Options<CallWithWeirdParameterNamesData>> => {\n    const mutationOptions: MutationOptions<unknown, AxiosError<DefaultError>, Options<CallWithWeirdParameterNamesData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await callWithWeirdParameterNames({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const getCallWithOptionalParamQueryKey = (options: Options<GetCallWithOptionalParamData>) => createQueryKey('getCallWithOptionalParam', options);\n\nexport const getCallWithOptionalParamOptions = (options: Options<GetCallWithOptionalParamData>) => queryOptions<unknown, AxiosError<DefaultError>, unknown, ReturnType<typeof getCallWithOptionalParamQueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await getCallWithOptionalParam({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: getCallWithOptionalParamQueryKey(options)\n});\n\nconst createInfiniteParams = <K extends Pick<QueryKey<Options>[0], 'body' | 'headers' | 'path' | 'query'>>(queryKey: QueryKey<Options>, page: K) => {\n    const params = { ...queryKey[0] };\n    if (page.body) {\n        params.body = {\n            ...queryKey[0].body as any,\n            ...page.body as any\n        };\n    }\n    if (page.headers) {\n        params.headers = {\n            ...queryKey[0].headers,\n            ...page.headers\n        };\n    }\n    if (page.path) {\n        params.path = {\n            ...queryKey[0].path as any,\n            ...page.path as any\n        };\n    }\n    if (page.query) {\n        params.query = {\n            ...queryKey[0].query as any,\n            ...page.query as any\n        };\n    }\n    return params as unknown as typeof page;\n};\n\nexport const getCallWithOptionalParamInfiniteQueryKey = (options: Options<GetCallWithOptionalParamData>): QueryKey<Options<GetCallWithOptionalParamData>> => createQueryKey('getCallWithOptionalParam', options, true);\n\nexport const getCallWithOptionalParamInfiniteOptions = (options: Options<GetCallWithOptionalParamData>) => infiniteQueryOptions<unknown, AxiosError<DefaultError>, InfiniteData<unknown>, QueryKey<Options<GetCallWithOptionalParamData>>, number | Pick<QueryKey<Options<GetCallWithOptionalParamData>>[0], 'body' | 'headers' | 'path' | 'query'>>(\n// @ts-ignore\n{\n    queryFn: async ({ pageParam, queryKey, signal }) => {\n        // @ts-ignore\n        const page: Pick<QueryKey<Options<GetCallWithOptionalParamData>>[0], 'body' | 'headers' | 'path' | 'query'> = typeof pageParam === 'object' ? pageParam : {\n            query: {\n                page: pageParam\n            }\n        };\n        const params = createInfiniteParams(queryKey, page);\n        const { data } = await getCallWithOptionalParam({\n            ...options,\n            ...params,\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: getCallWithOptionalParamInfiniteQueryKey(options)\n});\n\nexport const postCallWithOptionalParamMutation = (options?: Partial<Options<PostCallWithOptionalParamData>>): MutationOptions<PostCallWithOptionalParamResponse, AxiosError<DefaultError>, Options<PostCallWithOptionalParamData>> => {\n    const mutationOptions: MutationOptions<PostCallWithOptionalParamResponse, AxiosError<DefaultError>, Options<PostCallWithOptionalParamData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await postCallWithOptionalParam({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const postApiVbyApiVersionRequestBodyMutation = (options?: Partial<Options<PostApiVbyApiVersionRequestBodyData>>): MutationOptions<unknown, AxiosError<DefaultError>, Options<PostApiVbyApiVersionRequestBodyData>> => {\n    const mutationOptions: MutationOptions<unknown, AxiosError<DefaultError>, Options<PostApiVbyApiVersionRequestBodyData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await postApiVbyApiVersionRequestBody({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const postApiVbyApiVersionFormDataMutation = (options?: Partial<Options<PostApiVbyApiVersionFormDataData>>): MutationOptions<unknown, AxiosError<DefaultError>, Options<PostApiVbyApiVersionFormDataData>> => {\n    const mutationOptions: MutationOptions<unknown, AxiosError<DefaultError>, Options<PostApiVbyApiVersionFormDataData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await postApiVbyApiVersionFormData({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const callWithDefaultParametersQueryKey = (options?: Options<CallWithDefaultParametersData>) => createQueryKey('callWithDefaultParameters', options);\n\nexport const callWithDefaultParametersOptions = (options?: Options<CallWithDefaultParametersData>) => queryOptions<unknown, AxiosError<DefaultError>, unknown, ReturnType<typeof callWithDefaultParametersQueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await callWithDefaultParameters({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: callWithDefaultParametersQueryKey(options)\n});\n\nexport const callWithDefaultOptionalParametersMutation = (options?: Partial<Options<CallWithDefaultOptionalParametersData>>): MutationOptions<unknown, AxiosError<DefaultError>, Options<CallWithDefaultOptionalParametersData>> => {\n    const mutationOptions: MutationOptions<unknown, AxiosError<DefaultError>, Options<CallWithDefaultOptionalParametersData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await callWithDefaultOptionalParameters({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const callToTestOrderOfParamsMutation = (options?: Partial<Options<CallToTestOrderOfParamsData>>): MutationOptions<unknown, AxiosError<DefaultError>, Options<CallToTestOrderOfParamsData>> => {\n    const mutationOptions: MutationOptions<unknown, AxiosError<DefaultError>, Options<CallToTestOrderOfParamsData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await callToTestOrderOfParams({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const duplicateNameMutation = (options?: Partial<Options<DuplicateNameData>>): MutationOptions<unknown, AxiosError<DefaultError>, Options<DuplicateNameData>> => {\n    const mutationOptions: MutationOptions<unknown, AxiosError<DefaultError>, Options<DuplicateNameData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await duplicateName({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const duplicateName2QueryKey = (options?: Options<DuplicateName2Data>) => createQueryKey('duplicateName2', options);\n\nexport const duplicateName2Options = (options?: Options<DuplicateName2Data>) => queryOptions<unknown, AxiosError<DefaultError>, unknown, ReturnType<typeof duplicateName2QueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await duplicateName2({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: duplicateName2QueryKey(options)\n});\n\nexport const duplicateName3Mutation = (options?: Partial<Options<DuplicateName3Data>>): MutationOptions<unknown, AxiosError<DefaultError>, Options<DuplicateName3Data>> => {\n    const mutationOptions: MutationOptions<unknown, AxiosError<DefaultError>, Options<DuplicateName3Data>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await duplicateName3({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const duplicateName4Mutation = (options?: Partial<Options<DuplicateName4Data>>): MutationOptions<unknown, AxiosError<DefaultError>, Options<DuplicateName4Data>> => {\n    const mutationOptions: MutationOptions<unknown, AxiosError<DefaultError>, Options<DuplicateName4Data>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await duplicateName4({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const callWithNoContentResponseQueryKey = (options?: Options<CallWithNoContentResponseData>) => createQueryKey('callWithNoContentResponse', options);\n\nexport const callWithNoContentResponseOptions = (options?: Options<CallWithNoContentResponseData>) => queryOptions<CallWithNoContentResponseResponse, AxiosError<DefaultError>, CallWithNoContentResponseResponse, ReturnType<typeof callWithNoContentResponseQueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await callWithNoContentResponse({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: callWithNoContentResponseQueryKey(options)\n});\n\nexport const callWithResponseAndNoContentResponseQueryKey = (options?: Options<CallWithResponseAndNoContentResponseData>) => createQueryKey('callWithResponseAndNoContentResponse', options);\n\nexport const callWithResponseAndNoContentResponseOptions = (options?: Options<CallWithResponseAndNoContentResponseData>) => queryOptions<CallWithResponseAndNoContentResponseResponse, AxiosError<DefaultError>, CallWithResponseAndNoContentResponseResponse, ReturnType<typeof callWithResponseAndNoContentResponseQueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await callWithResponseAndNoContentResponse({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: callWithResponseAndNoContentResponseQueryKey(options)\n});\n\nexport const dummyAQueryKey = (options?: Options<DummyAData>) => createQueryKey('dummyA', options);\n\nexport const dummyAOptions = (options?: Options<DummyAData>) => queryOptions<DummyAResponse, AxiosError<DefaultError>, DummyAResponse, ReturnType<typeof dummyAQueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await dummyA({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: dummyAQueryKey(options)\n});\n\nexport const dummyBQueryKey = (options?: Options<DummyBData>) => createQueryKey('dummyB', options);\n\nexport const dummyBOptions = (options?: Options<DummyBData>) => queryOptions<DummyBResponse, AxiosError<DefaultError>, DummyBResponse, ReturnType<typeof dummyBQueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await dummyB({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: dummyBQueryKey(options)\n});\n\nexport const callWithResponseQueryKey = (options?: Options<CallWithResponseData>) => createQueryKey('callWithResponse', options);\n\nexport const callWithResponseOptions = (options?: Options<CallWithResponseData>) => queryOptions<CallWithResponseResponse, AxiosError<DefaultError>, CallWithResponseResponse, ReturnType<typeof callWithResponseQueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await callWithResponse({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: callWithResponseQueryKey(options)\n});\n\nexport const callWithDuplicateResponsesMutation = (options?: Partial<Options<CallWithDuplicateResponsesData>>): MutationOptions<CallWithDuplicateResponsesResponse, AxiosError<CallWithDuplicateResponsesError>, Options<CallWithDuplicateResponsesData>> => {\n    const mutationOptions: MutationOptions<CallWithDuplicateResponsesResponse, AxiosError<CallWithDuplicateResponsesError>, Options<CallWithDuplicateResponsesData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await callWithDuplicateResponses({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const callWithResponsesMutation = (options?: Partial<Options<CallWithResponsesData>>): MutationOptions<CallWithResponsesResponse, AxiosError<CallWithResponsesError>, Options<CallWithResponsesData>> => {\n    const mutationOptions: MutationOptions<CallWithResponsesResponse, AxiosError<CallWithResponsesError>, Options<CallWithResponsesData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await callWithResponses({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const collectionFormatQueryKey = (options: Options<CollectionFormatData>) => createQueryKey('collectionFormat', options);\n\nexport const collectionFormatOptions = (options: Options<CollectionFormatData>) => queryOptions<unknown, AxiosError<DefaultError>, unknown, ReturnType<typeof collectionFormatQueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await collectionFormat({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: collectionFormatQueryKey(options)\n});\n\nexport const typesQueryKey = (options: Options<TypesData>) => createQueryKey('types', options);\n\nexport const typesOptions = (options: Options<TypesData>) => queryOptions<TypesResponse, AxiosError<DefaultError>, TypesResponse, ReturnType<typeof typesQueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await types({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: typesQueryKey(options)\n});\n\nexport const uploadFileMutation = (options?: Partial<Options<UploadFileData>>): MutationOptions<UploadFileResponse, AxiosError<DefaultError>, Options<UploadFileData>> => {\n    const mutationOptions: MutationOptions<UploadFileResponse, AxiosError<DefaultError>, Options<UploadFileData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await uploadFile({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const fileResponseQueryKey = (options: Options<FileResponseData>) => createQueryKey('fileResponse', options);\n\nexport const fileResponseOptions = (options: Options<FileResponseData>) => queryOptions<FileResponseResponse, AxiosError<DefaultError>, FileResponseResponse, ReturnType<typeof fileResponseQueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await fileResponse({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: fileResponseQueryKey(options)\n});\n\nexport const complexTypesQueryKey = (options: Options<ComplexTypesData>) => createQueryKey('complexTypes', options);\n\nexport const complexTypesOptions = (options: Options<ComplexTypesData>) => queryOptions<ComplexTypesResponse, AxiosError<DefaultError>, ComplexTypesResponse, ReturnType<typeof complexTypesQueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await complexTypes({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: complexTypesQueryKey(options)\n});\n\nexport const multipartResponseQueryKey = (options?: Options<MultipartResponseData>) => createQueryKey('multipartResponse', options);\n\nexport const multipartResponseOptions = (options?: Options<MultipartResponseData>) => queryOptions<MultipartResponseResponse, AxiosError<DefaultError>, MultipartResponseResponse, ReturnType<typeof multipartResponseQueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await multipartResponse({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: multipartResponseQueryKey(options)\n});\n\nexport const multipartRequestMutation = (options?: Partial<Options<MultipartRequestData>>): MutationOptions<unknown, AxiosError<DefaultError>, Options<MultipartRequestData>> => {\n    const mutationOptions: MutationOptions<unknown, AxiosError<DefaultError>, Options<MultipartRequestData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await multipartRequest({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const complexParamsMutation = (options?: Partial<Options<ComplexParamsData>>): MutationOptions<ComplexParamsResponse, AxiosError<DefaultError>, Options<ComplexParamsData>> => {\n    const mutationOptions: MutationOptions<ComplexParamsResponse, AxiosError<DefaultError>, Options<ComplexParamsData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await complexParams({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const callWithResultFromHeaderMutation = (options?: Partial<Options<CallWithResultFromHeaderData>>): MutationOptions<unknown, AxiosError<DefaultError>, Options<CallWithResultFromHeaderData>> => {\n    const mutationOptions: MutationOptions<unknown, AxiosError<DefaultError>, Options<CallWithResultFromHeaderData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await callWithResultFromHeader({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const testErrorCodeMutation = (options?: Partial<Options<TestErrorCodeData>>): MutationOptions<unknown, AxiosError<DefaultError>, Options<TestErrorCodeData>> => {\n    const mutationOptions: MutationOptions<unknown, AxiosError<DefaultError>, Options<TestErrorCodeData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await testErrorCode({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const nonAsciiæøåÆøÅöôêÊ字符串Mutation = (options?: Partial<Options<NonAsciiæøåÆøÅöôêÊ字符串Data>>): MutationOptions<NonAsciiæøåÆøÅöôêÊ字符串Response, AxiosError<DefaultError>, Options<NonAsciiæøåÆøÅöôêÊ字符串Data>> => {\n    const mutationOptions: MutationOptions<NonAsciiæøåÆøÅöôêÊ字符串Response, AxiosError<DefaultError>, Options<NonAsciiæøåÆøÅöôêÊ字符串Data>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await nonAsciiæøåÆøÅöôêÊ字符串({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\n/**\n * Login User\n */\nexport const putWithFormUrlEncodedMutation = (options?: Partial<Options<PutWithFormUrlEncodedData>>): MutationOptions<unknown, AxiosError<DefaultError>, Options<PutWithFormUrlEncodedData>> => {\n    const mutationOptions: MutationOptions<unknown, AxiosError<DefaultError>, Options<PutWithFormUrlEncodedData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await putWithFormUrlEncoded({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/angular-query-experimental/axios/client/client.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { AxiosError, AxiosInstance, RawAxiosRequestHeaders } from 'axios';\nimport axios from 'axios';\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 } from './types.gen';\nimport { buildUrl, createConfig, mergeConfigs, mergeHeaders, setAuthParams } from './utils.gen';\n\nexport const createClient = (config: Config = {}): Client => {\n  let _config = mergeConfigs(createConfig(), config);\n\n  let instance: AxiosInstance;\n\n  if (_config.axios && !('Axios' in _config.axios)) {\n    instance = _config.axios;\n  } else {\n    // eslint-disable-next-line @typescript-eslint/no-unused-vars\n    const { auth, ...configWithoutAuth } = _config;\n    instance = axios.create(configWithoutAuth);\n  }\n\n  const getConfig = (): Config => ({ ..._config });\n\n  const setConfig = (config: Config): Config => {\n    _config = mergeConfigs(_config, config);\n    instance.defaults = {\n      ...instance.defaults,\n      ..._config,\n      // @ts-expect-error\n      headers: mergeHeaders(instance.defaults.headers, _config.headers),\n    };\n    return getConfig();\n  };\n\n  const beforeRequest = async (options: RequestOptions) => {\n    const opts = {\n      ..._config,\n      ...options,\n      axios: options.axios ?? _config.axios ?? instance,\n      headers: mergeHeaders(_config.headers, options.headers),\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.body = opts.bodySerializer(opts.body);\n    }\n\n    const url = buildUrl(opts);\n\n    return { opts, url };\n  };\n\n  // @ts-expect-error\n  const request: Client['request'] = async (options) => {\n    // @ts-expect-error\n    const { opts, url } = await beforeRequest(options);\n    try {\n      // assign Axios here for consistency with fetch\n      const _axios = opts.axios!;\n      // eslint-disable-next-line @typescript-eslint/no-unused-vars\n      const { auth, ...optsWithoutAuth } = opts;\n      const response = await _axios({\n        ...optsWithoutAuth,\n        baseURL: '', // the baseURL is already included in `url`\n        data: getValidRequestBody(opts),\n        headers: opts.headers as RawAxiosRequestHeaders,\n        // let `paramsSerializer()` handle query params if it exists\n        params: opts.paramsSerializer ? opts.query : undefined,\n        url,\n      });\n\n      let { data } = response;\n\n      if (opts.responseType === '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 {\n        ...response,\n        data: data ?? {},\n      };\n    } catch (error) {\n      const e = error as AxiosError;\n      if (opts.throwOnError) {\n        throw e;\n      }\n      // @ts-expect-error\n      e.error = e.response?.data ?? {};\n      return e;\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 Record<string, string>,\n      method,\n      serializedBody: getValidRequestBody(opts) as BodyInit | null | undefined,\n      // @ts-expect-error\n      signal: opts.signal,\n      url,\n    });\n  };\n\n  const _buildUrl: Client['buildUrl'] = (options) =>\n    buildUrl({ axios: instance, ..._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    instance,\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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/angular-query-experimental/axios/client/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type { Auth } from '../core/auth.gen';\nexport type { QuerySerializerOptions } from '../core/bodySerializer.gen';\nexport {\n  formDataBodySerializer,\n  jsonBodySerializer,\n  urlSearchParamsBodySerializer,\n} from '../core/bodySerializer.gen';\nexport { buildClientParams } from '../core/params.gen';\nexport { serializeQueryKeyValue } from '../core/queryKeySerializer.gen';\nexport { createClient } from './client.gen';\nexport type {\n  Client,\n  ClientOptions,\n  Config,\n  CreateClientConfig,\n  Options,\n  RequestOptions,\n  RequestResult,\n  TDataShape,\n} from './types.gen';\nexport { createConfig } from './utils.gen';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/angular-query-experimental/axios/client/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type {\n  AxiosError,\n  AxiosInstance,\n  AxiosRequestHeaders,\n  AxiosResponse,\n  AxiosStatic,\n  CreateAxiosDefaults,\n} from 'axios';\n\nimport type { Auth } from '../core/auth.gen';\nimport type {\n  ServerSentEventsOptions,\n  ServerSentEventsResult,\n} from '../core/serverSentEvents.gen';\nimport type { Client as CoreClient, Config as CoreConfig } from '../core/types.gen';\n\nexport interface Config<T extends ClientOptions = ClientOptions>\n  extends Omit<CreateAxiosDefaults, 'auth' | 'baseURL' | 'headers' | 'method'>, CoreConfig {\n  /**\n   * Axios implementation. You can use this option to provide either an\n   * `AxiosStatic` or an `AxiosInstance`.\n   *\n   * @default axios\n   */\n  axios?: AxiosStatic | AxiosInstance;\n  /**\n   * Base URL for all requests made by this client.\n   */\n  baseURL?: T['baseURL'];\n  /**\n   * An object containing any HTTP headers that you want to pre-populate your\n   * `Headers` object with.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/Headers/Headers#init See more}\n   */\n  headers?:\n    | AxiosRequestHeaders\n    | Record<\n        string,\n        string | number | boolean | (string | number | boolean)[] | null | undefined | unknown\n      >;\n  /**\n   * Throw an error instead of returning it in the response?\n   *\n   * @default false\n   */\n  throwOnError?: T['throwOnError'];\n}\n\nexport interface RequestOptions<\n  TData = unknown,\n  ThrowOnError extends boolean = boolean,\n  Url extends string = string,\n>\n  extends\n    Config<{\n      throwOnError: ThrowOnError;\n    }>,\n    Pick<\n      ServerSentEventsOptions<TData>,\n      | 'onRequest'\n      | 'onSseError'\n      | 'onSseEvent'\n      | 'sseDefaultRetryDelay'\n      | 'sseMaxRetryAttempts'\n      | 'sseMaxRetryDelay'\n    > {\n  /**\n   * Any body that you want to add to your request.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/fetch#body}\n   */\n  body?: unknown;\n  path?: Record<string, unknown>;\n  query?: Record<string, unknown>;\n  /**\n   * Security mechanism(s) to use for the request.\n   */\n  security?: ReadonlyArray<Auth>;\n  url: Url;\n}\n\nexport interface ClientOptions {\n  baseURL?: string;\n  throwOnError?: boolean;\n}\n\nexport type RequestResult<\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = boolean,\n> = ThrowOnError extends true\n  ? Promise<AxiosResponse<TData extends Record<string, unknown> ? TData[keyof TData] : TData>>\n  : Promise<\n      | (AxiosResponse<TData extends Record<string, unknown> ? TData[keyof TData] : TData> & {\n          error: undefined;\n        })\n      | (AxiosError<TError extends Record<string, unknown> ? TError[keyof TError] : TError> & {\n          data: undefined;\n          error: TError extends Record<string, unknown> ? TError[keyof TError] : TError;\n        })\n    >;\n\ntype MethodFn = <TData = unknown, TError = unknown, ThrowOnError extends boolean = false>(\n  options: Omit<RequestOptions<TData, ThrowOnError>, 'method'>,\n) => RequestResult<TData, TError, ThrowOnError>;\n\ntype SseFn = <TData = unknown, TError = unknown, ThrowOnError extends boolean = false>(\n  options: Omit<RequestOptions<TData, ThrowOnError>, 'method'>,\n) => Promise<ServerSentEventsResult<TData, TError>>;\n\ntype RequestFn = <TData = unknown, TError = unknown, ThrowOnError extends boolean = false>(\n  options: Omit<RequestOptions<TData, ThrowOnError>, 'method'> &\n    Pick<Required<RequestOptions<TData, ThrowOnError>>, 'method'>,\n) => RequestResult<TData, TError, ThrowOnError>;\n\ntype BuildUrlFn = <\n  TData extends {\n    body?: unknown;\n    path?: Record<string, unknown>;\n    query?: Record<string, unknown>;\n    url: string;\n  },\n>(\n  options: TData & Options<TData>,\n) => string;\n\nexport type Client = CoreClient<RequestFn, Config, MethodFn, BuildUrlFn, SseFn> & {\n  instance: AxiosInstance;\n};\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 = ClientOptions> = (\n  override?: Config<ClientOptions & T>,\n) => Config<Required<ClientOptions> & T>;\n\nexport interface TDataShape {\n  body?: unknown;\n  headers?: unknown;\n  path?: unknown;\n  query?: unknown;\n  url: string;\n}\n\ntype OmitKeys<T, K> = Pick<T, Exclude<keyof T, K>>;\n\nexport type Options<\n  TData extends TDataShape = TDataShape,\n  ThrowOnError extends boolean = boolean,\n  TResponse = unknown,\n> = OmitKeys<RequestOptions<TResponse, ThrowOnError>, 'body' | 'path' | 'query' | 'url'> &\n  ([TData] extends [never] ? unknown : Omit<TData, 'url'>);\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/angular-query-experimental/axios/client/utils.gen.ts",
    "content": "// 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 {\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\nconst checkForExistence = (\n  options: Pick<RequestOptions, 'auth' | 'query'> & {\n    headers: Record<any, unknown>;\n  },\n  name?: string,\n): boolean => {\n  if (!name) {\n    return false;\n  }\n  if (name in options.headers || options.query?.[name]) {\n    return true;\n  }\n  if (\n    'Cookie' in options.headers &&\n    options.headers['Cookie'] &&\n    typeof options.headers['Cookie'] === 'string'\n  ) {\n    return options.headers['Cookie'].includes(`${name}=`);\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: Record<any, unknown>;\n  }) => {\n  for (const auth of security) {\n    if (checkForExistence(options, auth.name)) {\n      continue;\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        const value = `${name}=${token}`;\n        if ('Cookie' in options.headers && options.headers['Cookie']) {\n          options.headers['Cookie'] = `${options.headers['Cookie']}; ${value}`;\n        } else {\n          options.headers['Cookie'] = value;\n        }\n        break;\n      }\n      case 'header':\n      default:\n        options.headers[name] = token;\n        break;\n    }\n  }\n};\n\nexport const buildUrl: Client['buildUrl'] = (options) => {\n  const instanceBaseUrl = options.axios?.defaults?.baseURL;\n\n  const baseUrl =\n    !!options.baseURL && typeof options.baseURL === 'string' ? options.baseURL : instanceBaseUrl;\n\n  return getUrl({\n    baseUrl: baseUrl as string,\n    path: options.path,\n    // let `paramsSerializer()` handle query params if it exists\n    query: !options.paramsSerializer ? options.query : undefined,\n    querySerializer:\n      typeof options.querySerializer === 'function'\n        ? options.querySerializer\n        : createQuerySerializer(options.querySerializer),\n    url: options.url,\n  });\n};\n\nexport const mergeConfigs = (a: Config, b: Config): Config => {\n  const config = { ...a, ...b };\n  config.headers = mergeHeaders(a.headers, b.headers);\n  return config;\n};\n\n/**\n * Special Axios headers keywords allowing to set headers by request method.\n */\nexport const axiosHeadersKeywords = [\n  'common',\n  'delete',\n  'get',\n  'head',\n  'patch',\n  'post',\n  'put',\n] as const;\n\nexport const mergeHeaders = (\n  ...headers: Array<Required<Config>['headers'] | undefined>\n): Record<any, unknown> => {\n  const mergedHeaders: Record<any, unknown> = {};\n  for (const header of headers) {\n    if (!header || typeof header !== 'object') {\n      continue;\n    }\n\n    const iterator = Object.entries(header);\n\n    for (const [key, value] of iterator) {\n      if (\n        axiosHeadersKeywords.includes(key as (typeof axiosHeadersKeywords)[number]) &&\n        typeof value === 'object'\n      ) {\n        mergedHeaders[key] = {\n          ...(mergedHeaders[key] as Record<any, unknown>),\n          ...value,\n        };\n      } else if (value === null) {\n        delete mergedHeaders[key];\n      } else if (Array.isArray(value)) {\n        for (const v of value) {\n          // @ts-expect-error\n          mergedHeaders[key] = [...(mergedHeaders[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[key] = typeof value === 'object' ? JSON.stringify(value) : (value as string);\n      }\n    }\n  }\n  return mergedHeaders;\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  ...override,\n});\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/angular-query-experimental/axios/client.gen.ts",
    "content": "// 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: 'http://localhost:3000/base' }));\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/angular-query-experimental/axios/core/auth.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/angular-query-experimental/axios/core/bodySerializer.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/angular-query-experimental/axios/core/params.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/angular-query-experimental/axios/core/pathSerializer.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/angular-query-experimental/axios/core/queryKeySerializer.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\n/**\n * JSON-friendly union that mirrors what Pinia Colada can hash.\n */\nexport type JsonValue =\n  | null\n  | string\n  | number\n  | boolean\n  | JsonValue[]\n  | { [key: string]: JsonValue };\n\n/**\n * Replacer that converts non-JSON values (bigint, Date, etc.) to safe substitutes.\n */\nexport const queryKeyJsonReplacer = (_key: string, value: unknown) => {\n  if (value === undefined || typeof value === 'function' || typeof value === 'symbol') {\n    return undefined;\n  }\n  if (typeof value === 'bigint') {\n    return value.toString();\n  }\n  if (value instanceof Date) {\n    return value.toISOString();\n  }\n  return value;\n};\n\n/**\n * Safely stringifies a value and parses it back into a JsonValue.\n */\nexport const stringifyToJsonValue = (input: unknown): JsonValue | undefined => {\n  try {\n    const json = JSON.stringify(input, queryKeyJsonReplacer);\n    if (json === undefined) {\n      return undefined;\n    }\n    return JSON.parse(json) as JsonValue;\n  } catch {\n    return undefined;\n  }\n};\n\n/**\n * Detects plain objects (including objects with a null prototype).\n */\nconst isPlainObject = (value: unknown): value is Record<string, unknown> => {\n  if (value === null || typeof value !== 'object') {\n    return false;\n  }\n  const prototype = Object.getPrototypeOf(value as object);\n  return prototype === Object.prototype || prototype === null;\n};\n\n/**\n * Turns URLSearchParams into a sorted JSON object for deterministic keys.\n */\nconst serializeSearchParams = (params: URLSearchParams): JsonValue => {\n  const entries = Array.from(params.entries()).sort(([a], [b]) => a.localeCompare(b));\n  const result: Record<string, JsonValue> = {};\n\n  for (const [key, value] of entries) {\n    const existing = result[key];\n    if (existing === undefined) {\n      result[key] = value;\n      continue;\n    }\n\n    if (Array.isArray(existing)) {\n      (existing as string[]).push(value);\n    } else {\n      result[key] = [existing, value];\n    }\n  }\n\n  return result;\n};\n\n/**\n * Normalizes any accepted value into a JSON-friendly shape for query keys.\n */\nexport const serializeQueryKeyValue = (value: unknown): JsonValue | undefined => {\n  if (value === null) {\n    return null;\n  }\n\n  if (typeof value === 'string' || typeof value === 'number' || typeof value === 'boolean') {\n    return value;\n  }\n\n  if (value === undefined || typeof value === 'function' || typeof value === 'symbol') {\n    return undefined;\n  }\n\n  if (typeof value === 'bigint') {\n    return value.toString();\n  }\n\n  if (value instanceof Date) {\n    return value.toISOString();\n  }\n\n  if (Array.isArray(value)) {\n    return stringifyToJsonValue(value);\n  }\n\n  if (typeof URLSearchParams !== 'undefined' && value instanceof URLSearchParams) {\n    return serializeSearchParams(value);\n  }\n\n  if (isPlainObject(value)) {\n    return stringifyToJsonValue(value);\n  }\n\n  return undefined;\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/angular-query-experimental/axios/core/serverSentEvents.gen.ts",
    "content": "// 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 const 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            // Normalize line endings: CRLF -> LF, then CR -> LF\n            buffer = buffer.replace(/\\r\\n/g, '\\n').replace(/\\r/g, '\\n');\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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/angular-query-experimental/axios/core/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { Auth, AuthToken } from './auth.gen';\nimport type { BodySerializer, QuerySerializer, QuerySerializerOptions } from './bodySerializer.gen';\n\nexport type HttpMethod =\n  | 'connect'\n  | 'delete'\n  | 'get'\n  | 'head'\n  | 'options'\n  | 'patch'\n  | 'post'\n  | 'put'\n  | 'trace';\n\nexport type Client<\n  RequestFn = never,\n  Config = unknown,\n  MethodFn = never,\n  BuildUrlFn = never,\n  SseFn = never,\n> = {\n  /**\n   * Returns the final request URL.\n   */\n  buildUrl: BuildUrlFn;\n  getConfig: () => Config;\n  request: RequestFn;\n  setConfig: (config: Config) => Config;\n} & {\n  [K in HttpMethod]: MethodFn;\n} & ([SseFn] extends [never] ? { sse?: never } : { sse: { [K in HttpMethod]: SseFn } });\n\nexport interface Config {\n  /**\n   * Auth token or a function returning auth token. The resolved value will be\n   * added to the request payload as defined by its `security` array.\n   */\n  auth?: ((auth: Auth) => Promise<AuthToken> | AuthToken) | AuthToken;\n  /**\n   * A function for serializing request body parameter. By default,\n   * {@link JSON.stringify()} will be used.\n   */\n  bodySerializer?: BodySerializer | null;\n  /**\n   * An object containing any HTTP headers that you want to pre-populate your\n   * `Headers` object with.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/Headers/Headers#init See more}\n   */\n  headers?:\n    | RequestInit['headers']\n    | Record<\n        string,\n        string | number | boolean | (string | number | boolean)[] | null | undefined | unknown\n      >;\n  /**\n   * The request method.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/fetch#method See more}\n   */\n  method?: Uppercase<HttpMethod>;\n  /**\n   * A function for serializing request query parameters. By default, arrays\n   * will be exploded in form style, objects will be exploded in deepObject\n   * style, and reserved characters are percent-encoded.\n   *\n   * This method will have no effect if the native `paramsSerializer()` Axios\n   * API function is used.\n   *\n   * {@link https://swagger.io/docs/specification/serialization/#query View examples}\n   */\n  querySerializer?: QuerySerializer | QuerySerializerOptions;\n  /**\n   * A function validating request data. This is useful if you want to ensure\n   * the request conforms to the desired shape, so it can be safely sent to\n   * the server.\n   */\n  requestValidator?: (data: unknown) => Promise<unknown>;\n  /**\n   * A function transforming response data before it's returned. This is useful\n   * for post-processing data, e.g. converting ISO strings into Date objects.\n   */\n  responseTransformer?: (data: unknown) => Promise<unknown>;\n  /**\n   * A function validating response data. This is useful if you want to ensure\n   * the response conforms to the desired shape, so it can be safely passed to\n   * the transformers and returned to the user.\n   */\n  responseValidator?: (data: unknown) => Promise<unknown>;\n}\n\ntype IsExactlyNeverOrNeverUndefined<T> = [T] extends [never]\n  ? true\n  : [T] extends [never | undefined]\n    ? [undefined] extends [T]\n      ? false\n      : true\n    : false;\n\nexport type OmitNever<T extends Record<string, unknown>> = {\n  [K in keyof T as IsExactlyNeverOrNeverUndefined<T[K]> extends true ? never : K]: T[K];\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/angular-query-experimental/axios/core/utils.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/angular-query-experimental/axios/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport { apiVVersionODataControllerCount, callToTestOrderOfParams, callWithDefaultOptionalParameters, callWithDefaultParameters, callWithDescriptions, callWithDuplicateResponses, callWithNoContentResponse, callWithParameters, callWithResponse, callWithResponseAndNoContentResponse, callWithResponses, callWithResultFromHeader, callWithWeirdParameterNames, collectionFormat, complexParams, complexTypes, deleteCallWithoutParametersAndResponse, deleteFoo, deprecatedCall, dummyA, dummyB, duplicateName, duplicateName2, duplicateName3, duplicateName4, export_, fileResponse, fooWow, getApiVbyApiVersionSimpleOperation, getCallWithOptionalParam, getCallWithoutParametersAndResponse, headCallWithoutParametersAndResponse, import_, multipartRequest, multipartResponse, nonAsciiæøåÆøÅöôêÊ字符串, type Options, optionsCallWithoutParametersAndResponse, patchApiVbyApiVersionNoTag, patchCallWithoutParametersAndResponse, postApiVbyApiVersionFormData, postApiVbyApiVersionRequestBody, postCallWithOptionalParam, postCallWithoutParametersAndResponse, putCallWithoutParametersAndResponse, putWithFormUrlEncoded, testErrorCode, types, uploadFile } from './sdk.gen';\nexport type { _3eNum1Период, _400, AdditionalPropertiesIntegerIssue, AdditionalPropertiesUnknownIssue, AdditionalPropertiesUnknownIssue2, AdditionalPropertiesUnknownIssue3, AdditionalPropertiesUnknownIssueWritable, AnyOfAnyAndNull, AnyOfArrays, ApiVVersionODataControllerCountData, ApiVVersionODataControllerCountResponse, ApiVVersionODataControllerCountResponses, ArrayWithAnyOfProperties, ArrayWithArray, ArrayWithBooleans, ArrayWithNumbers, ArrayWithProperties, ArrayWithReferences, ArrayWithStrings, CallToTestOrderOfParamsData, CallWithDefaultOptionalParametersData, CallWithDefaultParametersData, CallWithDescriptionsData, CallWithDuplicateResponsesData, CallWithDuplicateResponsesError, CallWithDuplicateResponsesErrors, CallWithDuplicateResponsesResponse, CallWithDuplicateResponsesResponses, CallWithNoContentResponseData, CallWithNoContentResponseResponse, CallWithNoContentResponseResponses, CallWithParametersData, CallWithResponseAndNoContentResponseData, CallWithResponseAndNoContentResponseResponse, CallWithResponseAndNoContentResponseResponses, CallWithResponseData, CallWithResponseResponse, CallWithResponseResponses, CallWithResponsesData, CallWithResponsesError, CallWithResponsesErrors, CallWithResponsesResponse, CallWithResponsesResponses, CallWithResultFromHeaderData, CallWithResultFromHeaderErrors, CallWithResultFromHeaderResponses, CallWithWeirdParameterNamesData, CamelCaseCommentWithBreaks, CharactersInDescription, ClientOptions, CollectionFormatData, CommentWithBackticks, CommentWithBackticksAndQuotes, CommentWithBreaks, CommentWithExpressionPlaceholders, CommentWithQuotes, CommentWithReservedCharacters, CommentWithSlashes, ComplexParamsData, ComplexParamsResponse, ComplexParamsResponses, ComplexTypesData, ComplexTypesErrors, ComplexTypesResponse, ComplexTypesResponses, CompositionBaseModel, CompositionExtendedModel, CompositionWithAllOfAndNullable, CompositionWithAnyOf, CompositionWithAnyOfAndNullable, CompositionWithAnyOfAnonymous, CompositionWithNestedAnyAndTypeNull, CompositionWithNestedAnyOfAndNull, CompositionWithOneOf, CompositionWithOneOfAndComplexArrayDictionary, CompositionWithOneOfAndNullable, CompositionWithOneOfAndProperties, CompositionWithOneOfAndSimpleArrayDictionary, CompositionWithOneOfAndSimpleDictionary, CompositionWithOneOfAnonymous, CompositionWithOneOfDiscriminator, ConstValue, Default, DeleteCallWithoutParametersAndResponseData, DeleteFooData, DeleteFooData2, DeleteFooData3, DeprecatedCallData, DeprecatedModel, DictionaryWithArray, DictionaryWithDictionary, DictionaryWithProperties, DictionaryWithPropertiesAndAdditionalProperties, DictionaryWithReference, DictionaryWithString, DummyAData, DummyAResponse, DummyAResponses, DummyBData, DummyBResponse, DummyBResponses, DuplicateName2Data, DuplicateName3Data, DuplicateName4Data, DuplicateNameData, EnumFromDescription, EnumWithExtensions, EnumWithNumbers, EnumWithReplacedCharacters, EnumWithStrings, EnumWithXEnumNames, ExportData, ExternalRefA, ExternalRefB, ExternalSharedModel, File, FileResponseData, FileResponseResponse, FileResponseResponses, FileWritable, FooWowData, FooWowResponses, FreeFormObjectWithAdditionalPropertiesEqEmptyObject, FreeFormObjectWithAdditionalPropertiesEqTrue, FreeFormObjectWithoutAdditionalProperties, GenericSchemaDuplicateIssue1SystemBoolean, GenericSchemaDuplicateIssue1SystemBooleanWritable, GenericSchemaDuplicateIssue1SystemString, GenericSchemaDuplicateIssue1SystemStringWritable, GetApiVbyApiVersionSimpleOperationData, GetApiVbyApiVersionSimpleOperationError, GetApiVbyApiVersionSimpleOperationErrors, GetApiVbyApiVersionSimpleOperationResponse, GetApiVbyApiVersionSimpleOperationResponses, GetCallWithOptionalParamData, GetCallWithoutParametersAndResponseData, HeadCallWithoutParametersAndResponseData, Import, ImportData, ImportResponse, ImportResponses, IoK8sApimachineryPkgApisMetaV1DeleteOptions, IoK8sApimachineryPkgApisMetaV1Preconditions, ModelCircle, ModelFromZendesk, ModelSquare, ModelThatExtends, ModelThatExtendsExtends, ModelWithAdditionalPropertiesEqTrue, ModelWithAdditionalPropertiesRef, ModelWithAnyOfConstantSizeArray, ModelWithAnyOfConstantSizeArrayAndIntersect, ModelWithAnyOfConstantSizeArrayNullable, ModelWithAnyOfConstantSizeArrayWithNSizeAndOptions, ModelWithAnyOfConstantSizeArrayWithNSizeAndOptionsWritable, ModelWithArray, ModelWithArrayReadOnlyAndWriteOnly, ModelWithArrayReadOnlyAndWriteOnlyWritable, ModelWithBackticksInDescription, ModelWithBoolean, ModelWithCircularReference, ModelWithConst, ModelWithConstantSizeArray, ModelWithDictionary, ModelWithDuplicateImports, ModelWithDuplicateProperties, ModelWithEnum, ModelWithEnumFromDescription, ModelWithEnumWithHyphen, ModelWithInteger, ModelWithNestedArrayEnums, ModelWithNestedArrayEnumsData, ModelWithNestedArrayEnumsDataBar, ModelWithNestedArrayEnumsDataFoo, ModelWithNestedCompositionEnums, ModelWithNestedEnums, ModelWithNestedProperties, ModelWithNullableObject, ModelWithNullableString, ModelWithNumericEnumUnion, ModelWithOneOfAndProperties, ModelWithOneOfEnum, ModelWithOrderedProperties, ModelWithPattern, ModelWithPatternWritable, ModelWithPrefixItemsConstantSizeArray, ModelWithProperties, ModelWithPropertiesWritable, ModelWithReadOnlyAndWriteOnly, ModelWithReadOnlyAndWriteOnlyWritable, ModelWithReference, ModelWithReferenceWritable, ModelWithString, ModelWithStringError, MultipartRequestData, MultipartResponseData, MultipartResponseResponse, MultipartResponseResponses, NestedAnyOfArraysNullable, NonAsciiæøåÆøÅöôêÊ字符串Data, NonAsciiæøåÆøÅöôêÊ字符串Response, NonAsciiæøåÆøÅöôêÊ字符串Responses, NonAsciiStringæøåÆøÅöôêÊ字符串, NullableObject, OneOfAllOfIssue, OneOfAllOfIssueWritable, OptionsCallWithoutParametersAndResponseData, Pageable, ParameterSimpleParameterUnused, PatchApiVbyApiVersionNoTagData, PatchApiVbyApiVersionNoTagResponses, PatchCallWithoutParametersAndResponseData, PostApiVbyApiVersionFormDataData, PostApiVbyApiVersionRequestBodyData, PostCallWithOptionalParamData, PostCallWithOptionalParamResponse, PostCallWithOptionalParamResponses, PostCallWithoutParametersAndResponseData, PostServiceWithEmptyTagResponse, PostServiceWithEmptyTagResponse2, PutCallWithoutParametersAndResponseData, PutWithFormUrlEncodedData, SchemaWithFormRestrictedKeys, SimpleBoolean, SimpleFile, SimpleFormData, SimpleInteger, SimpleParameter, SimpleReference, SimpleRequestBody, SimpleString, SimpleStringWithPattern, TestErrorCodeData, TestErrorCodeErrors, TestErrorCodeResponses, TypesData, TypesResponse, TypesResponses, UploadFileData, UploadFileResponse, UploadFileResponses, XFooBar } from './types.gen';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/angular-query-experimental/axios/sdk.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport { type Client, formDataBodySerializer, type Options as Options2, type TDataShape, urlSearchParamsBodySerializer } from './client';\nimport { client } from './client.gen';\nimport type { ApiVVersionODataControllerCountData, ApiVVersionODataControllerCountResponses, CallToTestOrderOfParamsData, CallWithDefaultOptionalParametersData, CallWithDefaultParametersData, CallWithDescriptionsData, CallWithDuplicateResponsesData, CallWithDuplicateResponsesErrors, CallWithDuplicateResponsesResponses, CallWithNoContentResponseData, CallWithNoContentResponseResponses, CallWithParametersData, CallWithResponseAndNoContentResponseData, CallWithResponseAndNoContentResponseResponses, CallWithResponseData, CallWithResponseResponses, CallWithResponsesData, CallWithResponsesErrors, CallWithResponsesResponses, CallWithResultFromHeaderData, CallWithResultFromHeaderErrors, CallWithResultFromHeaderResponses, CallWithWeirdParameterNamesData, CollectionFormatData, ComplexParamsData, ComplexParamsResponses, ComplexTypesData, ComplexTypesErrors, ComplexTypesResponses, DeleteCallWithoutParametersAndResponseData, DeleteFooData3, DeprecatedCallData, DummyAData, DummyAResponses, DummyBData, DummyBResponses, DuplicateName2Data, DuplicateName3Data, DuplicateName4Data, DuplicateNameData, ExportData, FileResponseData, FileResponseResponses, FooWowData, FooWowResponses, GetApiVbyApiVersionSimpleOperationData, GetApiVbyApiVersionSimpleOperationErrors, GetApiVbyApiVersionSimpleOperationResponses, GetCallWithOptionalParamData, GetCallWithoutParametersAndResponseData, HeadCallWithoutParametersAndResponseData, ImportData, ImportResponses, MultipartRequestData, MultipartResponseData, MultipartResponseResponses, NonAsciiæøåÆøÅöôêÊ字符串Data, NonAsciiæøåÆøÅöôêÊ字符串Responses, OptionsCallWithoutParametersAndResponseData, PatchApiVbyApiVersionNoTagData, PatchApiVbyApiVersionNoTagResponses, PatchCallWithoutParametersAndResponseData, PostApiVbyApiVersionFormDataData, PostApiVbyApiVersionRequestBodyData, PostCallWithOptionalParamData, PostCallWithOptionalParamResponses, PostCallWithoutParametersAndResponseData, PutCallWithoutParametersAndResponseData, PutWithFormUrlEncodedData, TestErrorCodeData, TestErrorCodeErrors, TestErrorCodeResponses, TypesData, TypesResponses, UploadFileData, UploadFileResponses } from './types.gen';\n\nexport type Options<TData extends TDataShape = TDataShape, ThrowOnError extends boolean = boolean> = Options2<TData, ThrowOnError> & {\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\nexport const export_ = <ThrowOnError extends boolean = false>(options?: Options<ExportData, ThrowOnError>) => (options?.client ?? client).get<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/no+tag', ...options });\n\nexport const patchApiVbyApiVersionNoTag = <ThrowOnError extends boolean = false>(options?: Options<PatchApiVbyApiVersionNoTagData, ThrowOnError>) => (options?.client ?? client).patch<PatchApiVbyApiVersionNoTagResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/no+tag', ...options });\n\nexport const import_ = <ThrowOnError extends boolean = false>(options: Options<ImportData, ThrowOnError>) => (options.client ?? client).post<ImportResponses, unknown, ThrowOnError>({\n    responseType: 'json',\n    url: '/api/v{api-version}/no+tag',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options.headers\n    }\n});\n\nexport const fooWow = <ThrowOnError extends boolean = false>(options?: Options<FooWowData, ThrowOnError>) => (options?.client ?? client).put<FooWowResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/no+tag', ...options });\n\nexport const apiVVersionODataControllerCount = <ThrowOnError extends boolean = false>(options?: Options<ApiVVersionODataControllerCountData, ThrowOnError>) => (options?.client ?? client).get<ApiVVersionODataControllerCountResponses, unknown, ThrowOnError>({\n    responseType: 'json',\n    url: '/api/v{api-version}/simple/$count',\n    ...options\n});\n\nexport const getApiVbyApiVersionSimpleOperation = <ThrowOnError extends boolean = false>(options: Options<GetApiVbyApiVersionSimpleOperationData, ThrowOnError>) => (options.client ?? client).get<GetApiVbyApiVersionSimpleOperationResponses, GetApiVbyApiVersionSimpleOperationErrors, ThrowOnError>({\n    responseType: 'json',\n    url: '/api/v{api-version}/simple:operation',\n    ...options\n});\n\nexport const deleteCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<DeleteCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).delete<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const getCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<GetCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).get<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const headCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<HeadCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).head<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const optionsCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<OptionsCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).options<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const patchCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<PatchCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).patch<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const postCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<PostCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).post<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const putCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<PutCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).put<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const deleteFoo = <ThrowOnError extends boolean = false>(options: Options<DeleteFooData3, ThrowOnError>) => (options.client ?? client).delete<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/foo/{foo_param}/bar/{BarParam}', ...options });\n\nexport const callWithDescriptions = <ThrowOnError extends boolean = false>(options?: Options<CallWithDescriptionsData, ThrowOnError>) => (options?.client ?? client).post<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/descriptions', ...options });\n\n/**\n * @deprecated\n */\nexport const deprecatedCall = <ThrowOnError extends boolean = false>(options: Options<DeprecatedCallData, ThrowOnError>) => (options.client ?? client).post<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/parameters/deprecated', ...options });\n\nexport const callWithParameters = <ThrowOnError extends boolean = false>(options: Options<CallWithParametersData, ThrowOnError>) => (options.client ?? client).post<unknown, unknown, ThrowOnError>({\n    url: '/api/v{api-version}/parameters/{parameterPath}',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options.headers\n    }\n});\n\nexport const callWithWeirdParameterNames = <ThrowOnError extends boolean = false>(options: Options<CallWithWeirdParameterNamesData, ThrowOnError>) => (options.client ?? client).post<unknown, unknown, ThrowOnError>({\n    url: '/api/v{api-version}/parameters/{parameter.path.1}/{parameter-path-2}/{PARAMETER-PATH-3}',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options.headers\n    }\n});\n\nexport const getCallWithOptionalParam = <ThrowOnError extends boolean = false>(options: Options<GetCallWithOptionalParamData, ThrowOnError>) => (options.client ?? client).get<unknown, unknown, ThrowOnError>({\n    url: '/api/v{api-version}/parameters',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options.headers\n    }\n});\n\nexport const postCallWithOptionalParam = <ThrowOnError extends boolean = false>(options: Options<PostCallWithOptionalParamData, ThrowOnError>) => (options.client ?? client).post<PostCallWithOptionalParamResponses, unknown, ThrowOnError>({\n    responseType: 'json',\n    url: '/api/v{api-version}/parameters',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options.headers\n    }\n});\n\nexport const postApiVbyApiVersionRequestBody = <ThrowOnError extends boolean = false>(options?: Options<PostApiVbyApiVersionRequestBodyData, ThrowOnError>) => (options?.client ?? client).post<unknown, unknown, ThrowOnError>({\n    url: '/api/v{api-version}/requestBody',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options?.headers\n    }\n});\n\nexport const postApiVbyApiVersionFormData = <ThrowOnError extends boolean = false>(options?: Options<PostApiVbyApiVersionFormDataData, ThrowOnError>) => (options?.client ?? client).post<unknown, unknown, ThrowOnError>({\n    ...formDataBodySerializer,\n    url: '/api/v{api-version}/formData',\n    ...options,\n    headers: {\n        'Content-Type': null,\n        ...options?.headers\n    }\n});\n\nexport const callWithDefaultParameters = <ThrowOnError extends boolean = false>(options?: Options<CallWithDefaultParametersData, ThrowOnError>) => (options?.client ?? client).get<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/defaults', ...options });\n\nexport const callWithDefaultOptionalParameters = <ThrowOnError extends boolean = false>(options?: Options<CallWithDefaultOptionalParametersData, ThrowOnError>) => (options?.client ?? client).post<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/defaults', ...options });\n\nexport const callToTestOrderOfParams = <ThrowOnError extends boolean = false>(options: Options<CallToTestOrderOfParamsData, ThrowOnError>) => (options.client ?? client).put<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/defaults', ...options });\n\nexport const duplicateName = <ThrowOnError extends boolean = false>(options?: Options<DuplicateNameData, ThrowOnError>) => (options?.client ?? client).delete<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/duplicate', ...options });\n\nexport const duplicateName2 = <ThrowOnError extends boolean = false>(options?: Options<DuplicateName2Data, ThrowOnError>) => (options?.client ?? client).get<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/duplicate', ...options });\n\nexport const duplicateName3 = <ThrowOnError extends boolean = false>(options?: Options<DuplicateName3Data, ThrowOnError>) => (options?.client ?? client).post<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/duplicate', ...options });\n\nexport const duplicateName4 = <ThrowOnError extends boolean = false>(options?: Options<DuplicateName4Data, ThrowOnError>) => (options?.client ?? client).put<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/duplicate', ...options });\n\nexport const callWithNoContentResponse = <ThrowOnError extends boolean = false>(options?: Options<CallWithNoContentResponseData, ThrowOnError>) => (options?.client ?? client).get<CallWithNoContentResponseResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/no-content', ...options });\n\nexport const callWithResponseAndNoContentResponse = <ThrowOnError extends boolean = false>(options?: Options<CallWithResponseAndNoContentResponseData, ThrowOnError>) => (options?.client ?? client).get<CallWithResponseAndNoContentResponseResponses, unknown, ThrowOnError>({\n    responseType: 'json',\n    url: '/api/v{api-version}/multiple-tags/response-and-no-content',\n    ...options\n});\n\nexport const dummyA = <ThrowOnError extends boolean = false>(options?: Options<DummyAData, ThrowOnError>) => (options?.client ?? client).get<DummyAResponses, unknown, ThrowOnError>({\n    responseType: 'json',\n    url: '/api/v{api-version}/multiple-tags/a',\n    ...options\n});\n\nexport const dummyB = <ThrowOnError extends boolean = false>(options?: Options<DummyBData, ThrowOnError>) => (options?.client ?? client).get<DummyBResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/multiple-tags/b', ...options });\n\nexport const callWithResponse = <ThrowOnError extends boolean = false>(options?: Options<CallWithResponseData, ThrowOnError>) => (options?.client ?? client).get<CallWithResponseResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/response', ...options });\n\nexport const callWithDuplicateResponses = <ThrowOnError extends boolean = false>(options?: Options<CallWithDuplicateResponsesData, ThrowOnError>) => (options?.client ?? client).post<CallWithDuplicateResponsesResponses, CallWithDuplicateResponsesErrors, ThrowOnError>({\n    responseType: 'json',\n    url: '/api/v{api-version}/response',\n    ...options\n});\n\nexport const callWithResponses = <ThrowOnError extends boolean = false>(options?: Options<CallWithResponsesData, ThrowOnError>) => (options?.client ?? client).put<CallWithResponsesResponses, CallWithResponsesErrors, ThrowOnError>({\n    responseType: 'json',\n    url: '/api/v{api-version}/response',\n    ...options\n});\n\nexport const collectionFormat = <ThrowOnError extends boolean = false>(options: Options<CollectionFormatData, ThrowOnError>) => (options.client ?? client).get<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/collectionFormat', ...options });\n\nexport const types = <ThrowOnError extends boolean = false>(options: Options<TypesData, ThrowOnError>) => (options.client ?? client).get<TypesResponses, unknown, ThrowOnError>({\n    responseType: 'json',\n    url: '/api/v{api-version}/types',\n    ...options\n});\n\nexport const uploadFile = <ThrowOnError extends boolean = false>(options: Options<UploadFileData, ThrowOnError>) => (options.client ?? client).post<UploadFileResponses, unknown, ThrowOnError>({\n    ...urlSearchParamsBodySerializer,\n    responseType: 'json',\n    url: '/api/v{api-version}/upload',\n    ...options,\n    headers: {\n        'Content-Type': 'application/x-www-form-urlencoded',\n        ...options.headers\n    }\n});\n\nexport const fileResponse = <ThrowOnError extends boolean = false>(options: Options<FileResponseData, ThrowOnError>) => (options.client ?? client).get<FileResponseResponses, unknown, ThrowOnError>({\n    responseType: 'blob',\n    url: '/api/v{api-version}/file/{id}',\n    ...options\n});\n\nexport const complexTypes = <ThrowOnError extends boolean = false>(options: Options<ComplexTypesData, ThrowOnError>) => (options.client ?? client).get<ComplexTypesResponses, ComplexTypesErrors, ThrowOnError>({\n    querySerializer: { parameters: { parameterObject: { object: { style: 'form' } } } },\n    responseType: 'json',\n    url: '/api/v{api-version}/complex',\n    ...options\n});\n\nexport const multipartResponse = <ThrowOnError extends boolean = false>(options?: Options<MultipartResponseData, ThrowOnError>) => (options?.client ?? client).get<MultipartResponseResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/multipart', ...options });\n\nexport const multipartRequest = <ThrowOnError extends boolean = false>(options?: Options<MultipartRequestData, ThrowOnError>) => (options?.client ?? client).post<unknown, unknown, ThrowOnError>({\n    ...formDataBodySerializer,\n    url: '/api/v{api-version}/multipart',\n    ...options,\n    headers: {\n        'Content-Type': null,\n        ...options?.headers\n    }\n});\n\nexport const complexParams = <ThrowOnError extends boolean = false>(options: Options<ComplexParamsData, ThrowOnError>) => (options.client ?? client).put<ComplexParamsResponses, unknown, ThrowOnError>({\n    responseType: 'json',\n    url: '/api/v{api-version}/complex/{id}',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json-patch+json',\n        ...options.headers\n    }\n});\n\nexport const callWithResultFromHeader = <ThrowOnError extends boolean = false>(options?: Options<CallWithResultFromHeaderData, ThrowOnError>) => (options?.client ?? client).post<CallWithResultFromHeaderResponses, CallWithResultFromHeaderErrors, ThrowOnError>({ url: '/api/v{api-version}/header', ...options });\n\nexport const testErrorCode = <ThrowOnError extends boolean = false>(options: Options<TestErrorCodeData, ThrowOnError>) => (options.client ?? client).post<TestErrorCodeResponses, TestErrorCodeErrors, ThrowOnError>({ url: '/api/v{api-version}/error', ...options });\n\nexport const nonAsciiæøåÆøÅöôêÊ字符串 = <ThrowOnError extends boolean = false>(options: Options<NonAsciiæøåÆøÅöôêÊ字符串Data, ThrowOnError>) => (options.client ?? client).post<NonAsciiæøåÆøÅöôêÊ字符串Responses, unknown, ThrowOnError>({\n    responseType: 'json',\n    url: '/api/v{api-version}/non-ascii-æøåÆØÅöôêÊ字符串',\n    ...options\n});\n\n/**\n * Login User\n */\nexport const putWithFormUrlEncoded = <ThrowOnError extends boolean = false>(options: Options<PutWithFormUrlEncodedData, ThrowOnError>) => (options.client ?? client).put<unknown, unknown, ThrowOnError>({\n    ...urlSearchParamsBodySerializer,\n    url: '/api/v{api-version}/non-ascii-æøåÆØÅöôêÊ字符串',\n    ...options,\n    headers: {\n        'Content-Type': 'application/x-www-form-urlencoded',\n        ...options.headers\n    }\n});\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/angular-query-experimental/axios/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type ClientOptions = {\n    baseURL: 'http://localhost:3000/base' | (string & {});\n};\n\n/**\n * Model with number-only name\n */\nexport type _400 = string;\n\n/**\n * External ref to shared model (A)\n */\nexport type ExternalRefA = ExternalSharedModel;\n\n/**\n * External ref to shared model (B)\n */\nexport type ExternalRefB = ExternalSharedModel;\n\n/**\n * Testing multiline comments in string: First line\n * Second line\n *\n * Fourth line\n */\nexport type CamelCaseCommentWithBreaks = number;\n\n/**\n * Testing multiline comments in string: First line\n * Second line\n *\n * Fourth line\n */\nexport type CommentWithBreaks = number;\n\n/**\n * Testing backticks in string: `backticks` and ```multiple backticks``` should work\n */\nexport type CommentWithBackticks = number;\n\n/**\n * Testing backticks and quotes in string: `backticks`, 'quotes', \"double quotes\" and ```multiple backticks``` should work\n */\nexport type CommentWithBackticksAndQuotes = number;\n\n/**\n * Testing slashes in string: \\backwards\\\\\\ and /forwards/// should work\n */\nexport type CommentWithSlashes = number;\n\n/**\n * Testing expression placeholders in string: ${expression} should work\n */\nexport type CommentWithExpressionPlaceholders = number;\n\n/**\n * Testing quotes in string: 'single quote''' and \"double quotes\"\"\" should work\n */\nexport type CommentWithQuotes = number;\n\n/**\n * Testing reserved characters in string: * inline * and ** inline ** should work\n */\nexport type CommentWithReservedCharacters = number;\n\n/**\n * This is a simple number\n */\nexport type SimpleInteger = number;\n\n/**\n * This is a simple boolean\n */\nexport type SimpleBoolean = boolean;\n\n/**\n * This is a simple string\n */\nexport type SimpleString = string;\n\n/**\n * A string with non-ascii (unicode) characters valid in typescript identifiers (æøåÆØÅöÔèÈ字符串)\n */\nexport type NonAsciiStringæøåÆøÅöôêÊ字符串 = string;\n\n/**\n * This is a simple file\n */\nexport type SimpleFile = Blob | File;\n\n/**\n * This is a simple reference\n */\nexport type SimpleReference = ModelWithString;\n\n/**\n * This is a simple string\n */\nexport type SimpleStringWithPattern = string | null;\n\n/**\n * This is a simple enum with strings\n */\nexport type EnumWithStrings = 'Success' | 'Warning' | 'Error' | '\\'Single Quote\\'' | '\"Double Quotes\"' | 'Non-ascii: øæåôöØÆÅÔÖ字符串';\n\nexport type EnumWithReplacedCharacters = '\\'Single Quote\\'' | '\"Double Quotes\"' | 'øæåôöØÆÅÔÖ字符串' | 3.1 | '';\n\n/**\n * This is a simple enum with numbers\n */\nexport type EnumWithNumbers = 1 | 2 | 3 | 1.1 | 1.2 | 1.3 | 100 | 200 | 300 | -100 | -200 | -300 | -1.1 | -1.2 | -1.3;\n\n/**\n * Success=1,Warning=2,Error=3\n */\nexport type EnumFromDescription = number;\n\n/**\n * This is a simple enum with numbers\n */\nexport type EnumWithExtensions = 200 | 400 | 500;\n\nexport type EnumWithXEnumNames = 0 | 1 | 2;\n\n/**\n * This is a simple array with numbers\n */\nexport type ArrayWithNumbers = Array<number>;\n\n/**\n * This is a simple array with booleans\n */\nexport type ArrayWithBooleans = Array<boolean>;\n\n/**\n * This is a simple array with strings\n */\nexport type ArrayWithStrings = Array<string>;\n\n/**\n * This is a simple array with references\n */\nexport type ArrayWithReferences = Array<ModelWithString>;\n\n/**\n * This is a simple array containing an array\n */\nexport type ArrayWithArray = Array<Array<ModelWithString>>;\n\n/**\n * This is a simple array with properties\n */\nexport type ArrayWithProperties = Array<{\n    '16x16'?: CamelCaseCommentWithBreaks;\n    bar?: string;\n}>;\n\n/**\n * This is a simple array with any of properties\n */\nexport type ArrayWithAnyOfProperties = Array<{\n    foo?: string;\n} | {\n    bar?: string;\n}>;\n\nexport type AnyOfAnyAndNull = {\n    data?: unknown | null;\n};\n\n/**\n * This is a simple array with any of properties\n */\nexport type AnyOfArrays = {\n    results?: Array<{\n        foo?: string;\n    } | {\n        bar?: string;\n    }>;\n};\n\n/**\n * This is a string dictionary\n */\nexport type DictionaryWithString = {\n    [key: string]: string;\n};\n\nexport type DictionaryWithPropertiesAndAdditionalProperties = {\n    foo?: number;\n    bar?: boolean;\n    [key: string]: string | number | boolean | undefined;\n};\n\n/**\n * This is a string reference\n */\nexport type DictionaryWithReference = {\n    [key: string]: ModelWithString;\n};\n\n/**\n * This is a complex dictionary\n */\nexport type DictionaryWithArray = {\n    [key: string]: Array<ModelWithString>;\n};\n\n/**\n * This is a string dictionary\n */\nexport type DictionaryWithDictionary = {\n    [key: string]: {\n        [key: string]: string;\n    };\n};\n\n/**\n * This is a complex dictionary\n */\nexport type DictionaryWithProperties = {\n    [key: string]: {\n        foo?: string;\n        bar?: string;\n    };\n};\n\n/**\n * This is a model with one number property\n */\nexport type ModelWithInteger = {\n    /**\n     * This is a simple number property\n     */\n    prop?: number;\n};\n\n/**\n * This is a model with one boolean property\n */\nexport type ModelWithBoolean = {\n    /**\n     * This is a simple boolean property\n     */\n    prop?: boolean;\n};\n\n/**\n * This is a model with one string property\n */\nexport type ModelWithString = {\n    /**\n     * This is a simple string property\n     */\n    prop?: string;\n};\n\n/**\n * This is a model with one string property\n */\nexport type ModelWithStringError = {\n    /**\n     * This is a simple string property\n     */\n    prop?: string;\n};\n\n/**\n * `Comment` or `VoiceComment`. The JSON object for adding voice comments to tickets is different. See [Adding voice comments to tickets](/documentation/ticketing/managing-tickets/adding-voice-comments-to-tickets)\n */\nexport type ModelFromZendesk = string;\n\n/**\n * This is a model with one string property\n */\nexport type ModelWithNullableString = {\n    /**\n     * This is a simple string property\n     */\n    nullableProp1?: string | null;\n    /**\n     * This is a simple string property\n     */\n    nullableRequiredProp1: string | null;\n    /**\n     * This is a simple string property\n     */\n    nullableProp2?: string | null;\n    /**\n     * This is a simple string property\n     */\n    nullableRequiredProp2: string | null;\n    /**\n     * This is a simple enum with strings\n     */\n    'foo_bar-enum'?: 'Success' | 'Warning' | 'Error' | 'ØÆÅ字符串';\n};\n\n/**\n * This is a model with one enum\n */\nexport type ModelWithEnum = {\n    /**\n     * This is a simple enum with strings\n     */\n    'foo_bar-enum'?: 'Success' | 'Warning' | 'Error' | 'ØÆÅ字符串';\n    /**\n     * These are the HTTP error code enums\n     */\n    statusCode?: '100' | '200 FOO' | '300 FOO_BAR' | '400 foo-bar' | '500 foo.bar' | '600 foo&bar';\n    /**\n     * Simple boolean enum\n     */\n    bool?: true;\n};\n\n/**\n * This is a model with one enum with escaped name\n */\nexport type ModelWithEnumWithHyphen = {\n    /**\n     * Foo-Bar-Baz-Qux\n     */\n    'foo-bar-baz-qux'?: '3.0';\n};\n\n/**\n * This is a model with one enum\n */\nexport type ModelWithEnumFromDescription = {\n    /**\n     * Success=1,Warning=2,Error=3\n     */\n    test?: number;\n};\n\n/**\n * This is a model with nested enums\n */\nexport type ModelWithNestedEnums = {\n    dictionaryWithEnum?: {\n        [key: string]: 'Success' | 'Warning' | 'Error';\n    };\n    dictionaryWithEnumFromDescription?: {\n        [key: string]: number;\n    };\n    arrayWithEnum?: Array<'Success' | 'Warning' | 'Error'>;\n    arrayWithDescription?: Array<number>;\n    /**\n     * This is a simple enum with strings\n     */\n    'foo_bar-enum'?: 'Success' | 'Warning' | 'Error' | 'ØÆÅ字符串';\n};\n\n/**\n * This is a model with one property containing a reference\n */\nexport type ModelWithReference = {\n    prop?: ModelWithProperties;\n};\n\n/**\n * This is a model with one property containing an array\n */\nexport type ModelWithArrayReadOnlyAndWriteOnly = {\n    prop?: Array<ModelWithReadOnlyAndWriteOnly>;\n    propWithFile?: Array<Blob | File>;\n    propWithNumber?: Array<number>;\n};\n\n/**\n * This is a model with one property containing an array\n */\nexport type ModelWithArray = {\n    prop?: Array<ModelWithString>;\n    propWithFile?: Array<Blob | File>;\n    propWithNumber?: Array<number>;\n};\n\n/**\n * This is a model with one property containing a dictionary\n */\nexport type ModelWithDictionary = {\n    prop?: {\n        [key: string]: string;\n    };\n};\n\n/**\n * This is a deprecated model with a deprecated property\n *\n * @deprecated\n */\nexport type DeprecatedModel = {\n    /**\n     * This is a deprecated property\n     *\n     * @deprecated\n     */\n    prop?: string;\n};\n\n/**\n * This is a model with one property containing a circular reference\n */\nexport type ModelWithCircularReference = {\n    prop?: ModelWithCircularReference;\n};\n\n/**\n * This is a model with one property with a 'one of' relationship\n */\nexport type CompositionWithOneOf = {\n    propA?: ModelWithString | ModelWithEnum | ModelWithArray | ModelWithDictionary;\n};\n\n/**\n * This is a model with one property with a 'one of' relationship where the options are not $ref\n */\nexport type CompositionWithOneOfAnonymous = {\n    propA?: {\n        propA?: string;\n    } | string | number;\n};\n\n/**\n * Circle\n */\nexport type ModelCircle = {\n    kind: string;\n    radius?: number;\n};\n\n/**\n * Square\n */\nexport type ModelSquare = {\n    kind: string;\n    sideLength?: number;\n};\n\n/**\n * This is a model with one property with a 'one of' relationship where the options are not $ref\n */\nexport type CompositionWithOneOfDiscriminator = ({\n    kind: 'circle';\n} & ModelCircle) | ({\n    kind: 'square';\n} & ModelSquare);\n\n/**\n * This is a model with one property with a 'any of' relationship\n */\nexport type CompositionWithAnyOf = {\n    propA?: ModelWithString | ModelWithEnum | ModelWithArray | ModelWithDictionary;\n};\n\n/**\n * This is a model with one property with a 'any of' relationship where the options are not $ref\n */\nexport type CompositionWithAnyOfAnonymous = {\n    propA?: {\n        propA?: string;\n    } | string | number;\n};\n\n/**\n * This is a model with nested 'any of' property with a type null\n */\nexport type CompositionWithNestedAnyAndTypeNull = {\n    propA?: Array<ModelWithDictionary | null> | Array<ModelWithArray | null>;\n};\n\nexport type _3eNum1Период = 'Bird' | 'Dog';\n\nexport type ConstValue = 'ConstValue';\n\n/**\n * This is a model with one property with a 'any of' relationship where the options are not $ref\n */\nexport type CompositionWithNestedAnyOfAndNull = {\n    /**\n     * Scopes\n     */\n    propA?: Array<_3eNum1Период | ConstValue> | null;\n};\n\n/**\n * This is a model with one property with a 'one of' relationship\n */\nexport type CompositionWithOneOfAndNullable = {\n    propA?: {\n        boolean?: boolean;\n    } | ModelWithEnum | ModelWithArray | ModelWithDictionary | null;\n};\n\n/**\n * This is a model that contains a simple dictionary within composition\n */\nexport type CompositionWithOneOfAndSimpleDictionary = {\n    propA?: boolean | {\n        [key: string]: number;\n    };\n};\n\n/**\n * This is a model that contains a dictionary of simple arrays within composition\n */\nexport type CompositionWithOneOfAndSimpleArrayDictionary = {\n    propA?: boolean | {\n        [key: string]: Array<boolean>;\n    };\n};\n\n/**\n * This is a model that contains a dictionary of complex arrays (composited) within composition\n */\nexport type CompositionWithOneOfAndComplexArrayDictionary = {\n    propA?: boolean | {\n        [key: string]: Array<number | string>;\n    };\n};\n\n/**\n * This is a model with one property with a 'all of' relationship\n */\nexport type CompositionWithAllOfAndNullable = {\n    propA?: ({\n        boolean?: boolean;\n    } & ModelWithEnum & ModelWithArray & ModelWithDictionary) | null;\n};\n\n/**\n * This is a model with one property with a 'any of' relationship\n */\nexport type CompositionWithAnyOfAndNullable = {\n    propA?: {\n        boolean?: boolean;\n    } | ModelWithEnum | ModelWithArray | ModelWithDictionary | null;\n};\n\n/**\n * This is a base model with two simple optional properties\n */\nexport type CompositionBaseModel = {\n    firstName?: string;\n    lastname?: string;\n};\n\n/**\n * This is a model that extends the base model\n */\nexport type CompositionExtendedModel = CompositionBaseModel & {\n    age: number;\n    firstName: string;\n    lastname: string;\n};\n\n/**\n * This is a model with one nested property\n */\nexport type ModelWithProperties = {\n    required: string;\n    readonly requiredAndReadOnly: string;\n    requiredAndNullable: string | null;\n    string?: string;\n    number?: number;\n    boolean?: boolean;\n    reference?: ModelWithString;\n    'property with space'?: string;\n    default?: string;\n    try?: string;\n    readonly '@namespace.string'?: string;\n    readonly '@namespace.integer'?: number;\n};\n\n/**\n * This is a model with one nested property\n */\nexport type ModelWithNestedProperties = {\n    readonly first: {\n        readonly second: {\n            readonly third: string | null;\n        } | null;\n    } | null;\n};\n\n/**\n * This is a model with duplicated properties\n */\nexport type ModelWithDuplicateProperties = {\n    prop?: ModelWithString;\n};\n\n/**\n * This is a model with ordered properties\n */\nexport type ModelWithOrderedProperties = {\n    zebra?: string;\n    apple?: string;\n    hawaii?: string;\n};\n\n/**\n * This is a model with duplicated imports\n */\nexport type ModelWithDuplicateImports = {\n    propA?: ModelWithString;\n    propB?: ModelWithString;\n    propC?: ModelWithString;\n};\n\n/**\n * This is a model that extends another model\n */\nexport type ModelThatExtends = ModelWithString & {\n    propExtendsA?: string;\n    propExtendsB?: ModelWithString;\n};\n\n/**\n * This is a model that extends another model\n */\nexport type ModelThatExtendsExtends = ModelWithString & ModelThatExtends & {\n    propExtendsC?: string;\n    propExtendsD?: ModelWithString;\n};\n\n/**\n * This is a model that contains a some patterns\n */\nexport type ModelWithPattern = {\n    key: string;\n    name: string;\n    readonly enabled?: boolean;\n    readonly modified?: string;\n    id?: string;\n    text?: string;\n    patternWithSingleQuotes?: string;\n    patternWithNewline?: string;\n    patternWithBacktick?: string;\n    patternWithUnicode?: string;\n};\n\nexport type File = {\n    /**\n     * Id\n     */\n    readonly id?: string;\n    /**\n     * Updated at\n     */\n    readonly updated_at?: string;\n    /**\n     * Created at\n     */\n    readonly created_at?: string;\n    /**\n     * Mime\n     */\n    mime: string;\n    /**\n     * File\n     */\n    readonly file?: string;\n};\n\nexport type Default = {\n    name?: string;\n};\n\nexport type Pageable = {\n    page?: number;\n    size?: number;\n    sort?: Array<string>;\n};\n\n/**\n * This is a free-form object without additionalProperties.\n */\nexport type FreeFormObjectWithoutAdditionalProperties = {\n    [key: string]: unknown;\n};\n\n/**\n * This is a free-form object with additionalProperties: true.\n */\nexport type FreeFormObjectWithAdditionalPropertiesEqTrue = {\n    [key: string]: unknown;\n};\n\n/**\n * This is a free-form object with additionalProperties: {}.\n */\nexport type FreeFormObjectWithAdditionalPropertiesEqEmptyObject = {\n    [key: string]: unknown;\n};\n\nexport type ModelWithConst = {\n    String?: 'String';\n    number?: 0;\n    null?: null;\n    withType?: 'Some string';\n};\n\n/**\n * This is a model with one property and additionalProperties: true\n */\nexport type ModelWithAdditionalPropertiesEqTrue = {\n    /**\n     * This is a simple string property\n     */\n    prop?: string;\n    [key: string]: unknown;\n};\n\nexport type NestedAnyOfArraysNullable = {\n    nullableArray?: Array<string | boolean> | null;\n};\n\nexport type CompositionWithOneOfAndProperties = ({\n    foo: SimpleParameter;\n} | {\n    bar: NonAsciiStringæøåÆøÅöôêÊ字符串;\n}) & {\n    baz: number | null;\n    qux: number;\n};\n\n/**\n * An object that can be null\n */\nexport type NullableObject = {\n    foo?: string;\n} | null;\n\n/**\n * Some % character\n */\nexport type CharactersInDescription = string;\n\nexport type ModelWithNullableObject = {\n    data?: NullableObject;\n};\n\n/**\n * An object with additional properties that can be null (anyOf ref + null)\n */\nexport type ModelWithAdditionalPropertiesRef = {\n    [key: string]: NullableObject | null;\n};\n\nexport type ModelWithOneOfEnum = {\n    foo: 'Bar';\n} | {\n    foo: 'Baz';\n} | {\n    foo: 'Qux';\n} | {\n    content: string;\n    foo: 'Quux';\n} | {\n    content: [\n        string,\n        string\n    ];\n    foo: 'Corge';\n};\n\nexport type ModelWithNestedArrayEnumsDataFoo = 'foo' | 'bar';\n\nexport type ModelWithNestedArrayEnumsDataBar = 'baz' | 'qux';\n\nexport type ModelWithNestedArrayEnumsData = {\n    foo?: Array<ModelWithNestedArrayEnumsDataFoo>;\n    bar?: Array<ModelWithNestedArrayEnumsDataBar>;\n};\n\nexport type ModelWithNestedArrayEnums = {\n    array_strings?: Array<string>;\n    data?: ModelWithNestedArrayEnumsData;\n};\n\nexport type ModelWithNestedCompositionEnums = {\n    foo?: ModelWithNestedArrayEnumsDataFoo;\n};\n\nexport type ModelWithReadOnlyAndWriteOnly = {\n    foo: string;\n    readonly bar: string;\n};\n\nexport type ModelWithConstantSizeArray = [\n    number,\n    number\n];\n\nexport type ModelWithAnyOfConstantSizeArray = [\n    number | string,\n    number | string,\n    number | string\n];\n\nexport type ModelWithPrefixItemsConstantSizeArray = [\n    ModelWithInteger,\n    number | string,\n    string\n];\n\nexport type ModelWithAnyOfConstantSizeArrayNullable = [\n    number | null | string,\n    number | null | string,\n    number | null | string\n];\n\nexport type ModelWithAnyOfConstantSizeArrayWithNSizeAndOptions = [\n    number | Import,\n    number | Import\n];\n\nexport type ModelWithAnyOfConstantSizeArrayAndIntersect = [\n    number & string,\n    number & string\n];\n\nexport type ModelWithNumericEnumUnion = {\n    /**\n     * Период\n     */\n    value?: -10 | -1 | 0 | 1 | 3 | 6 | 12;\n};\n\n/**\n * Some description with `back ticks`\n */\nexport type ModelWithBackticksInDescription = {\n    /**\n     * The template `that` should be used for parsing and importing the contents of the CSV file.\n     *\n     * <br/><p>There is one placeholder currently supported:<ul>     <li><b>${x}</b> - refers to the n-th column in the CSV file, e.g. ${1}, ${2}, ...)</li></ul><p>Example of a correct JSON template:</p>\n     * <pre>\n     * [\n     * {\n     * \"resourceType\": \"Asset\",\n     * \"identifier\": {\n     * \"name\": \"${1}\",\n     * \"domain\": {\n     * \"name\": \"${2}\",\n     * \"community\": {\n     * \"name\": \"Some Community\"\n     * }\n     * }\n     * },\n     * \"attributes\" : {\n     * \"00000000-0000-0000-0000-000000003115\" : [ {\n     * \"value\" : \"${3}\"\n     * } ],\n     * \"00000000-0000-0000-0000-000000000222\" : [ {\n     * \"value\" : \"${4}\"\n     * } ]\n     * }\n     * }\n     * ]\n     * </pre>\n     */\n    template?: string;\n};\n\nexport type ModelWithOneOfAndProperties = (SimpleParameter | NonAsciiStringæøåÆøÅöôêÊ字符串) & {\n    baz: number | null;\n    qux: number;\n};\n\n/**\n * Model used to test deduplication strategy (unused)\n */\nexport type ParameterSimpleParameterUnused = string;\n\n/**\n * Model used to test deduplication strategy\n */\nexport type PostServiceWithEmptyTagResponse = string;\n\n/**\n * Model used to test deduplication strategy\n */\nexport type PostServiceWithEmptyTagResponse2 = string;\n\n/**\n * Model used to test deduplication strategy\n */\nexport type DeleteFooData = string;\n\n/**\n * Model used to test deduplication strategy\n */\nexport type DeleteFooData2 = string;\n\n/**\n * Model with restricted keyword name\n */\nexport type Import = string;\n\nexport type SchemaWithFormRestrictedKeys = {\n    description?: string;\n    'x-enum-descriptions'?: string;\n    'x-enum-varnames'?: string;\n    'x-enumNames'?: string;\n    title?: string;\n    object?: {\n        description?: string;\n        'x-enum-descriptions'?: string;\n        'x-enum-varnames'?: string;\n        'x-enumNames'?: string;\n        title?: string;\n    };\n    array?: Array<{\n        description?: string;\n        'x-enum-descriptions'?: string;\n        'x-enum-varnames'?: string;\n        'x-enumNames'?: string;\n        title?: string;\n    }>;\n};\n\n/**\n * This schema was giving PascalCase transformations a hard time\n */\nexport type IoK8sApimachineryPkgApisMetaV1DeleteOptions = {\n    /**\n     * Must be fulfilled before a deletion is carried out. If not possible, a 409 Conflict status will be returned.\n     */\n    preconditions?: IoK8sApimachineryPkgApisMetaV1Preconditions;\n};\n\n/**\n * This schema was giving PascalCase transformations a hard time\n */\nexport type IoK8sApimachineryPkgApisMetaV1Preconditions = {\n    /**\n     * Specifies the target ResourceVersion\n     */\n    resourceVersion?: string;\n    /**\n     * Specifies the target UID.\n     */\n    uid?: string;\n};\n\nexport type AdditionalPropertiesUnknownIssue = {\n    [key: string]: string | number;\n};\n\nexport type AdditionalPropertiesUnknownIssue2 = {\n    [key: string]: string | number;\n};\n\nexport type AdditionalPropertiesUnknownIssue3 = string & {\n    entries: {\n        [key: string]: AdditionalPropertiesUnknownIssue;\n    };\n};\n\nexport type AdditionalPropertiesIntegerIssue = {\n    value: number;\n    [key: string]: number;\n};\n\nexport type OneOfAllOfIssue = ((ConstValue | GenericSchemaDuplicateIssue1SystemBoolean) & _3eNum1Период) | GenericSchemaDuplicateIssue1SystemString;\n\nexport type GenericSchemaDuplicateIssue1SystemBoolean = {\n    item?: boolean;\n    error?: string | null;\n    readonly hasError?: boolean;\n    data?: {\n        [key: string]: never;\n    };\n};\n\nexport type GenericSchemaDuplicateIssue1SystemString = {\n    item?: string | null;\n    error?: string | null;\n    readonly hasError?: boolean;\n};\n\nexport type ExternalSharedModel = {\n    id: string;\n    name?: string;\n};\n\n/**\n * This is a model with one property containing a reference\n */\nexport type ModelWithReferenceWritable = {\n    prop?: ModelWithPropertiesWritable;\n};\n\n/**\n * This is a model with one property containing an array\n */\nexport type ModelWithArrayReadOnlyAndWriteOnlyWritable = {\n    prop?: Array<ModelWithReadOnlyAndWriteOnlyWritable>;\n    propWithFile?: Array<Blob | File>;\n    propWithNumber?: Array<number>;\n};\n\n/**\n * This is a model with one nested property\n */\nexport type ModelWithPropertiesWritable = {\n    required: string;\n    requiredAndNullable: string | null;\n    string?: string;\n    number?: number;\n    boolean?: boolean;\n    reference?: ModelWithString;\n    'property with space'?: string;\n    default?: string;\n    try?: string;\n};\n\n/**\n * This is a model that contains a some patterns\n */\nexport type ModelWithPatternWritable = {\n    key: string;\n    name: string;\n    id?: string;\n    text?: string;\n    patternWithSingleQuotes?: string;\n    patternWithNewline?: string;\n    patternWithBacktick?: string;\n    patternWithUnicode?: string;\n};\n\nexport type FileWritable = {\n    /**\n     * Mime\n     */\n    mime: string;\n};\n\nexport type ModelWithReadOnlyAndWriteOnlyWritable = {\n    foo: string;\n    baz: string;\n};\n\nexport type ModelWithAnyOfConstantSizeArrayWithNSizeAndOptionsWritable = [\n    number | Import,\n    number | Import\n];\n\nexport type AdditionalPropertiesUnknownIssueWritable = {\n    [key: string]: string | number;\n};\n\nexport type OneOfAllOfIssueWritable = ((ConstValue | GenericSchemaDuplicateIssue1SystemBoolean) & _3eNum1Период) | GenericSchemaDuplicateIssue1SystemString;\n\nexport type GenericSchemaDuplicateIssue1SystemBooleanWritable = {\n    item?: boolean;\n    error?: string | null;\n    data?: {\n        [key: string]: never;\n    };\n};\n\nexport type GenericSchemaDuplicateIssue1SystemStringWritable = {\n    item?: string | null;\n    error?: string | null;\n};\n\n/**\n * This is a reusable parameter\n */\nexport type SimpleParameter = string;\n\n/**\n * Parameter with illegal characters\n */\nexport type XFooBar = ModelWithString;\n\n/**\n * A reusable request body\n */\nexport type SimpleRequestBody = ModelWithString;\n\n/**\n * A reusable request body\n */\nexport type SimpleFormData = ModelWithString;\n\nexport type ExportData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no+tag';\n};\n\nexport type PatchApiVbyApiVersionNoTagData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no+tag';\n};\n\nexport type PatchApiVbyApiVersionNoTagResponses = {\n    /**\n     * OK\n     */\n    default: unknown;\n};\n\nexport type ImportData = {\n    body: ModelWithReadOnlyAndWriteOnlyWritable | ModelWithArrayReadOnlyAndWriteOnlyWritable;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no+tag';\n};\n\nexport type ImportResponses = {\n    /**\n     * Success\n     */\n    200: ModelFromZendesk;\n    /**\n     * Default success response\n     */\n    default: ModelWithReadOnlyAndWriteOnly;\n};\n\nexport type ImportResponse = ImportResponses[keyof ImportResponses];\n\nexport type FooWowData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no+tag';\n};\n\nexport type FooWowResponses = {\n    /**\n     * OK\n     */\n    default: unknown;\n};\n\nexport type ApiVVersionODataControllerCountData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple/$count';\n};\n\nexport type ApiVVersionODataControllerCountResponses = {\n    /**\n     * Success\n     */\n    200: ModelFromZendesk;\n};\n\nexport type ApiVVersionODataControllerCountResponse = ApiVVersionODataControllerCountResponses[keyof ApiVVersionODataControllerCountResponses];\n\nexport type GetApiVbyApiVersionSimpleOperationData = {\n    body?: never;\n    path: {\n        /**\n         * foo in method\n         */\n        foo_param: string;\n    };\n    query?: never;\n    url: '/api/v{api-version}/simple:operation';\n};\n\nexport type GetApiVbyApiVersionSimpleOperationErrors = {\n    /**\n     * Default error response\n     */\n    default: ModelWithBoolean;\n};\n\nexport type GetApiVbyApiVersionSimpleOperationError = GetApiVbyApiVersionSimpleOperationErrors[keyof GetApiVbyApiVersionSimpleOperationErrors];\n\nexport type GetApiVbyApiVersionSimpleOperationResponses = {\n    /**\n     * Response is a simple number\n     */\n    200: number;\n};\n\nexport type GetApiVbyApiVersionSimpleOperationResponse = GetApiVbyApiVersionSimpleOperationResponses[keyof GetApiVbyApiVersionSimpleOperationResponses];\n\nexport type DeleteCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type GetCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type HeadCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type OptionsCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type PatchCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type PostCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type PutCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type DeleteFooData3 = {\n    body?: never;\n    headers: {\n        /**\n         * Parameter with illegal characters\n         */\n        'x-Foo-Bar': ModelWithString;\n    };\n    path: {\n        /**\n         * foo in method\n         */\n        foo_param: string;\n        /**\n         * bar in method\n         */\n        BarParam: string;\n    };\n    query?: never;\n    url: '/api/v{api-version}/foo/{foo_param}/bar/{BarParam}';\n};\n\nexport type CallWithDescriptionsData = {\n    body?: never;\n    path?: never;\n    query?: {\n        /**\n         * Testing multiline comments in string: First line\n         * Second line\n         *\n         * Fourth line\n         */\n        parameterWithBreaks?: string;\n        /**\n         * Testing backticks in string: `backticks` and ```multiple backticks``` should work\n         */\n        parameterWithBackticks?: string;\n        /**\n         * Testing slashes in string: \\backwards\\\\\\ and /forwards/// should work\n         */\n        parameterWithSlashes?: string;\n        /**\n         * Testing expression placeholders in string: ${expression} should work\n         */\n        parameterWithExpressionPlaceholders?: string;\n        /**\n         * Testing quotes in string: 'single quote''' and \"double quotes\"\"\" should work\n         */\n        parameterWithQuotes?: string;\n        /**\n         * Testing reserved characters in string: * inline * and ** inline ** should work\n         */\n        parameterWithReservedCharacters?: string;\n    };\n    url: '/api/v{api-version}/descriptions';\n};\n\nexport type DeprecatedCallData = {\n    body?: never;\n    headers: {\n        /**\n         * This parameter is deprecated\n         *\n         * @deprecated\n         */\n        parameter: DeprecatedModel | null;\n    };\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/parameters/deprecated';\n};\n\nexport type CallWithParametersData = {\n    /**\n     * This is the parameter that goes into the body\n     */\n    body: {\n        [key: string]: unknown;\n    } | null;\n    headers: {\n        /**\n         * This is the parameter that goes into the header\n         */\n        parameterHeader: string | null;\n    };\n    path: {\n        /**\n         * This is the parameter that goes into the path\n         */\n        parameterPath: string | null;\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string | null;\n    };\n    query: {\n        foo_ref_enum?: ModelWithNestedArrayEnumsDataFoo;\n        foo_all_of_enum: ModelWithNestedArrayEnumsDataFoo;\n        /**\n         * This is the parameter that goes into the query params\n         */\n        cursor: string | null;\n    };\n    url: '/api/v{api-version}/parameters/{parameterPath}';\n};\n\nexport type CallWithWeirdParameterNamesData = {\n    /**\n     * This is the parameter that goes into the body\n     */\n    body: ModelWithString | null;\n    headers: {\n        /**\n         * This is the parameter that goes into the request header\n         */\n        'parameter.header': string | null;\n    };\n    path: {\n        /**\n         * This is the parameter that goes into the path\n         */\n        'parameter.path.1'?: string;\n        /**\n         * This is the parameter that goes into the path\n         */\n        'parameter-path-2'?: string;\n        /**\n         * This is the parameter that goes into the path\n         */\n        'PARAMETER-PATH-3'?: string;\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string | null;\n    };\n    query: {\n        /**\n         * This is the parameter with a reserved keyword\n         */\n        default?: string;\n        /**\n         * This is the parameter that goes into the request query params\n         */\n        'parameter-query': string | null;\n    };\n    url: '/api/v{api-version}/parameters/{parameter.path.1}/{parameter-path-2}/{PARAMETER-PATH-3}';\n};\n\nexport type GetCallWithOptionalParamData = {\n    /**\n     * This is a required parameter\n     */\n    body: ModelWithOneOfEnum;\n    path?: never;\n    query?: {\n        /**\n         * This is an optional parameter\n         */\n        page?: number;\n    };\n    url: '/api/v{api-version}/parameters';\n};\n\nexport type PostCallWithOptionalParamData = {\n    /**\n     * This is an optional parameter\n     */\n    body?: {\n        offset?: number | null;\n    };\n    path?: never;\n    query: {\n        /**\n         * This is a required parameter\n         */\n        parameter: Pageable;\n    };\n    url: '/api/v{api-version}/parameters';\n};\n\nexport type PostCallWithOptionalParamResponses = {\n    /**\n     * Response is a simple number\n     */\n    200: number;\n    /**\n     * Success\n     */\n    204: void;\n};\n\nexport type PostCallWithOptionalParamResponse = PostCallWithOptionalParamResponses[keyof PostCallWithOptionalParamResponses];\n\nexport type PostApiVbyApiVersionRequestBodyData = {\n    /**\n     * A reusable request body\n     */\n    body?: SimpleRequestBody;\n    path?: never;\n    query?: {\n        /**\n         * This is a reusable parameter\n         */\n        parameter?: string;\n    };\n    url: '/api/v{api-version}/requestBody';\n};\n\nexport type PostApiVbyApiVersionFormDataData = {\n    /**\n     * A reusable request body\n     */\n    body?: SimpleFormData;\n    path?: never;\n    query?: {\n        /**\n         * This is a reusable parameter\n         */\n        parameter?: string;\n    };\n    url: '/api/v{api-version}/formData';\n};\n\nexport type CallWithDefaultParametersData = {\n    body?: never;\n    path?: never;\n    query?: {\n        /**\n         * This is a simple string with default value\n         */\n        parameterString?: string | null;\n        /**\n         * This is a simple number with default value\n         */\n        parameterNumber?: number | null;\n        /**\n         * This is a simple boolean with default value\n         */\n        parameterBoolean?: boolean | null;\n        /**\n         * This is a simple enum with default value\n         */\n        parameterEnum?: 'Success' | 'Warning' | 'Error';\n        /**\n         * This is a simple model with default value\n         */\n        parameterModel?: ModelWithString | null;\n    };\n    url: '/api/v{api-version}/defaults';\n};\n\nexport type CallWithDefaultOptionalParametersData = {\n    body?: never;\n    path?: never;\n    query?: {\n        /**\n         * This is a simple string that is optional with default value\n         */\n        parameterString?: string;\n        /**\n         * This is a simple number that is optional with default value\n         */\n        parameterNumber?: number;\n        /**\n         * This is a simple boolean that is optional with default value\n         */\n        parameterBoolean?: boolean;\n        /**\n         * This is a simple enum that is optional with default value\n         */\n        parameterEnum?: 'Success' | 'Warning' | 'Error';\n        /**\n         * This is a simple model that is optional with default value\n         */\n        parameterModel?: ModelWithString;\n    };\n    url: '/api/v{api-version}/defaults';\n};\n\nexport type CallToTestOrderOfParamsData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * This is a optional string with default\n         */\n        parameterOptionalStringWithDefault?: string;\n        /**\n         * This is a optional string with empty default\n         */\n        parameterOptionalStringWithEmptyDefault?: string;\n        /**\n         * This is a optional string with no default\n         */\n        parameterOptionalStringWithNoDefault?: string;\n        /**\n         * This is a string with default\n         */\n        parameterStringWithDefault: string;\n        /**\n         * This is a string with empty default\n         */\n        parameterStringWithEmptyDefault: string;\n        /**\n         * This is a string with no default\n         */\n        parameterStringWithNoDefault: string;\n        /**\n         * This is a string that can be null with no default\n         */\n        parameterStringNullableWithNoDefault?: string | null;\n        /**\n         * This is a string that can be null with default\n         */\n        parameterStringNullableWithDefault?: string | null;\n    };\n    url: '/api/v{api-version}/defaults';\n};\n\nexport type DuplicateNameData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/duplicate';\n};\n\nexport type DuplicateName2Data = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/duplicate';\n};\n\nexport type DuplicateName3Data = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/duplicate';\n};\n\nexport type DuplicateName4Data = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/duplicate';\n};\n\nexport type CallWithNoContentResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no-content';\n};\n\nexport type CallWithNoContentResponseResponses = {\n    /**\n     * Success\n     */\n    204: void;\n};\n\nexport type CallWithNoContentResponseResponse = CallWithNoContentResponseResponses[keyof CallWithNoContentResponseResponses];\n\nexport type CallWithResponseAndNoContentResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multiple-tags/response-and-no-content';\n};\n\nexport type CallWithResponseAndNoContentResponseResponses = {\n    /**\n     * Response is a simple number\n     */\n    200: number;\n    /**\n     * Success\n     */\n    204: void;\n};\n\nexport type CallWithResponseAndNoContentResponseResponse = CallWithResponseAndNoContentResponseResponses[keyof CallWithResponseAndNoContentResponseResponses];\n\nexport type DummyAData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multiple-tags/a';\n};\n\nexport type DummyAResponses = {\n    200: _400;\n};\n\nexport type DummyAResponse = DummyAResponses[keyof DummyAResponses];\n\nexport type DummyBData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multiple-tags/b';\n};\n\nexport type DummyBResponses = {\n    /**\n     * Success\n     */\n    204: void;\n};\n\nexport type DummyBResponse = DummyBResponses[keyof DummyBResponses];\n\nexport type CallWithResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/response';\n};\n\nexport type CallWithResponseResponses = {\n    default: Import;\n};\n\nexport type CallWithResponseResponse = CallWithResponseResponses[keyof CallWithResponseResponses];\n\nexport type CallWithDuplicateResponsesData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/response';\n};\n\nexport type CallWithDuplicateResponsesErrors = {\n    /**\n     * Message for 500 error\n     */\n    500: ModelWithStringError;\n    /**\n     * Message for 501 error\n     */\n    501: ModelWithStringError;\n    /**\n     * Message for 502 error\n     */\n    502: ModelWithStringError;\n    /**\n     * Message for 4XX errors\n     */\n    '4XX': DictionaryWithArray;\n    /**\n     * Default error response\n     */\n    default: ModelWithBoolean;\n};\n\nexport type CallWithDuplicateResponsesError = CallWithDuplicateResponsesErrors[keyof CallWithDuplicateResponsesErrors];\n\nexport type CallWithDuplicateResponsesResponses = {\n    /**\n     * Message for 200 response\n     */\n    200: ModelWithBoolean & ModelWithInteger;\n    /**\n     * Message for 201 response\n     */\n    201: ModelWithString;\n    /**\n     * Message for 202 response\n     */\n    202: ModelWithString;\n};\n\nexport type CallWithDuplicateResponsesResponse = CallWithDuplicateResponsesResponses[keyof CallWithDuplicateResponsesResponses];\n\nexport type CallWithResponsesData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/response';\n};\n\nexport type CallWithResponsesErrors = {\n    /**\n     * Message for 500 error\n     */\n    500: ModelWithStringError;\n    /**\n     * Message for 501 error\n     */\n    501: ModelWithStringError;\n    /**\n     * Message for 502 error\n     */\n    502: ModelWithStringError;\n    /**\n     * Message for default response\n     */\n    default: ModelWithStringError;\n};\n\nexport type CallWithResponsesError = CallWithResponsesErrors[keyof CallWithResponsesErrors];\n\nexport type CallWithResponsesResponses = {\n    /**\n     * Message for 200 response\n     */\n    200: {\n        readonly '@namespace.string'?: string;\n        readonly '@namespace.integer'?: number;\n        readonly value?: Array<ModelWithString>;\n    };\n    /**\n     * Message for 201 response\n     */\n    201: ModelThatExtends;\n    /**\n     * Message for 202 response\n     */\n    202: ModelThatExtendsExtends;\n};\n\nexport type CallWithResponsesResponse = CallWithResponsesResponses[keyof CallWithResponsesResponses];\n\nexport type CollectionFormatData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * This is an array parameter that is sent as csv format (comma-separated values)\n         */\n        parameterArrayCSV: Array<string> | null;\n        /**\n         * This is an array parameter that is sent as ssv format (space-separated values)\n         */\n        parameterArraySSV: Array<string> | null;\n        /**\n         * This is an array parameter that is sent as tsv format (tab-separated values)\n         */\n        parameterArrayTSV: Array<string> | null;\n        /**\n         * This is an array parameter that is sent as pipes format (pipe-separated values)\n         */\n        parameterArrayPipes: Array<string> | null;\n        /**\n         * This is an array parameter that is sent as multi format (multiple parameter instances)\n         */\n        parameterArrayMulti: Array<string> | null;\n    };\n    url: '/api/v{api-version}/collectionFormat';\n};\n\nexport type TypesData = {\n    body?: never;\n    path?: {\n        /**\n         * This is a number parameter\n         */\n        id?: number;\n    };\n    query: {\n        /**\n         * This is a number parameter\n         */\n        parameterNumber: number;\n        /**\n         * This is a string parameter\n         */\n        parameterString: string | null;\n        /**\n         * This is a boolean parameter\n         */\n        parameterBoolean: boolean | null;\n        /**\n         * This is an object parameter\n         */\n        parameterObject: {\n            [key: string]: unknown;\n        } | null;\n        /**\n         * This is an array parameter\n         */\n        parameterArray: Array<string> | null;\n        /**\n         * This is a dictionary parameter\n         */\n        parameterDictionary: {\n            [key: string]: unknown;\n        } | null;\n        /**\n         * This is an enum parameter\n         */\n        parameterEnum: 'Success' | 'Warning' | 'Error' | null;\n    };\n    url: '/api/v{api-version}/types';\n};\n\nexport type TypesResponses = {\n    /**\n     * Response is a simple number\n     */\n    200: number;\n    /**\n     * Response is a simple string\n     */\n    201: string;\n    /**\n     * Response is a simple boolean\n     */\n    202: boolean;\n    /**\n     * Response is a simple object\n     */\n    203: {\n        [key: string]: unknown;\n    };\n};\n\nexport type TypesResponse = TypesResponses[keyof TypesResponses];\n\nexport type UploadFileData = {\n    body: Blob | File;\n    path: {\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string | null;\n    };\n    query?: never;\n    url: '/api/v{api-version}/upload';\n};\n\nexport type UploadFileResponses = {\n    200: boolean;\n};\n\nexport type UploadFileResponse = UploadFileResponses[keyof UploadFileResponses];\n\nexport type FileResponseData = {\n    body?: never;\n    path: {\n        id: string;\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string;\n    };\n    query?: never;\n    url: '/api/v{api-version}/file/{id}';\n};\n\nexport type FileResponseResponses = {\n    /**\n     * Success\n     */\n    200: Blob | File;\n};\n\nexport type FileResponseResponse = FileResponseResponses[keyof FileResponseResponses];\n\nexport type ComplexTypesData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * Parameter containing object\n         */\n        parameterObject: {\n            first?: {\n                second?: {\n                    third?: string;\n                };\n            };\n        };\n        /**\n         * Parameter containing reference\n         */\n        parameterReference: ModelWithString;\n    };\n    url: '/api/v{api-version}/complex';\n};\n\nexport type ComplexTypesErrors = {\n    /**\n     * 400 `server` error\n     */\n    400: unknown;\n    /**\n     * 500 server error\n     */\n    500: unknown;\n};\n\nexport type ComplexTypesResponses = {\n    /**\n     * Successful response\n     */\n    200: Array<ModelWithString>;\n};\n\nexport type ComplexTypesResponse = ComplexTypesResponses[keyof ComplexTypesResponses];\n\nexport type MultipartResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multipart';\n};\n\nexport type MultipartResponseResponses = {\n    /**\n     * OK\n     */\n    200: {\n        file?: Blob | File;\n        metadata?: {\n            foo?: string;\n            bar?: string;\n        };\n    };\n};\n\nexport type MultipartResponseResponse = MultipartResponseResponses[keyof MultipartResponseResponses];\n\nexport type MultipartRequestData = {\n    body?: {\n        content?: Blob | File;\n        data?: ModelWithString | null;\n    };\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multipart';\n};\n\nexport type ComplexParamsData = {\n    body?: {\n        readonly key: string | null;\n        name: string | null;\n        enabled?: boolean;\n        type: 'Monkey' | 'Horse' | 'Bird';\n        listOfModels?: Array<ModelWithString> | null;\n        listOfStrings?: Array<string> | null;\n        parameters: ModelWithString | ModelWithEnum | ModelWithArray | ModelWithDictionary;\n        readonly user?: {\n            readonly id?: number;\n            readonly name?: string | null;\n        };\n    };\n    path: {\n        id: number;\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string;\n    };\n    query?: never;\n    url: '/api/v{api-version}/complex/{id}';\n};\n\nexport type ComplexParamsResponses = {\n    /**\n     * Success\n     */\n    200: ModelWithString;\n};\n\nexport type ComplexParamsResponse = ComplexParamsResponses[keyof ComplexParamsResponses];\n\nexport type CallWithResultFromHeaderData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/header';\n};\n\nexport type CallWithResultFromHeaderErrors = {\n    /**\n     * 400 server error\n     */\n    400: unknown;\n    /**\n     * 500 server error\n     */\n    500: unknown;\n};\n\nexport type CallWithResultFromHeaderResponses = {\n    /**\n     * Successful response\n     */\n    200: unknown;\n};\n\nexport type TestErrorCodeData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * Status code to return\n         */\n        status: number;\n    };\n    url: '/api/v{api-version}/error';\n};\n\nexport type TestErrorCodeErrors = {\n    /**\n     * Custom message: Internal Server Error\n     */\n    500: unknown;\n    /**\n     * Custom message: Not Implemented\n     */\n    501: unknown;\n    /**\n     * Custom message: Bad Gateway\n     */\n    502: unknown;\n    /**\n     * Custom message: Service Unavailable\n     */\n    503: unknown;\n};\n\nexport type TestErrorCodeResponses = {\n    /**\n     * Custom message: Successful response\n     */\n    200: unknown;\n};\n\nexport type NonAsciiæøåÆøÅöôêÊ字符串Data = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * Dummy input param\n         */\n        nonAsciiParamæøåÆØÅöôêÊ: number;\n    };\n    url: '/api/v{api-version}/non-ascii-æøåÆØÅöôêÊ字符串';\n};\n\nexport type NonAsciiæøåÆøÅöôêÊ字符串Responses = {\n    /**\n     * Successful response\n     */\n    200: Array<NonAsciiStringæøåÆøÅöôêÊ字符串>;\n};\n\nexport type NonAsciiæøåÆøÅöôêÊ字符串Response = NonAsciiæøåÆøÅöôêÊ字符串Responses[keyof NonAsciiæøåÆøÅöôêÊ字符串Responses];\n\nexport type PutWithFormUrlEncodedData = {\n    body: ArrayWithStrings;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/non-ascii-æøåÆØÅöôêÊ字符串';\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/angular-query-experimental/fetch/@tanstack/angular-query-experimental.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport { type DefaultError, type InfiniteData, infiniteQueryOptions, type MutationOptions, queryOptions } from '@tanstack/angular-query-experimental';\n\nimport { client } from '../client.gen';\nimport { apiVVersionODataControllerCount, callToTestOrderOfParams, callWithDefaultOptionalParameters, callWithDefaultParameters, callWithDescriptions, callWithDuplicateResponses, callWithNoContentResponse, callWithParameters, callWithResponse, callWithResponseAndNoContentResponse, callWithResponses, callWithResultFromHeader, callWithWeirdParameterNames, collectionFormat, complexParams, complexTypes, deleteCallWithoutParametersAndResponse, deleteFoo, deprecatedCall, dummyA, dummyB, duplicateName, duplicateName2, duplicateName3, duplicateName4, export_, fileResponse, fooWow, getApiVbyApiVersionSimpleOperation, getCallWithOptionalParam, getCallWithoutParametersAndResponse, import_, multipartRequest, multipartResponse, nonAsciiæøåÆøÅöôêÊ字符串, type Options, patchApiVbyApiVersionNoTag, patchCallWithoutParametersAndResponse, postApiVbyApiVersionFormData, postApiVbyApiVersionRequestBody, postCallWithOptionalParam, postCallWithoutParametersAndResponse, putCallWithoutParametersAndResponse, putWithFormUrlEncoded, testErrorCode, types, uploadFile } from '../sdk.gen';\nimport type { ApiVVersionODataControllerCountData, ApiVVersionODataControllerCountResponse, CallToTestOrderOfParamsData, CallWithDefaultOptionalParametersData, CallWithDefaultParametersData, CallWithDescriptionsData, CallWithDuplicateResponsesData, CallWithDuplicateResponsesError, CallWithDuplicateResponsesResponse, CallWithNoContentResponseData, CallWithNoContentResponseResponse, CallWithParametersData, CallWithResponseAndNoContentResponseData, CallWithResponseAndNoContentResponseResponse, CallWithResponseData, CallWithResponseResponse, CallWithResponsesData, CallWithResponsesError, CallWithResponsesResponse, CallWithResultFromHeaderData, CallWithWeirdParameterNamesData, CollectionFormatData, ComplexParamsData, ComplexParamsResponse, ComplexTypesData, ComplexTypesResponse, DeleteCallWithoutParametersAndResponseData, DeleteFooData3, DeprecatedCallData, DummyAData, DummyAResponse, DummyBData, DummyBResponse, DuplicateName2Data, DuplicateName3Data, DuplicateName4Data, DuplicateNameData, ExportData, FileResponseData, FileResponseResponse, FooWowData, GetApiVbyApiVersionSimpleOperationData, GetApiVbyApiVersionSimpleOperationError, GetApiVbyApiVersionSimpleOperationResponse, GetCallWithOptionalParamData, GetCallWithoutParametersAndResponseData, ImportData, ImportResponse, MultipartRequestData, MultipartResponseData, MultipartResponseResponse, NonAsciiæøåÆøÅöôêÊ字符串Data, NonAsciiæøåÆøÅöôêÊ字符串Response, PatchApiVbyApiVersionNoTagData, PatchCallWithoutParametersAndResponseData, PostApiVbyApiVersionFormDataData, PostApiVbyApiVersionRequestBodyData, PostCallWithOptionalParamData, PostCallWithOptionalParamResponse, PostCallWithoutParametersAndResponseData, PutCallWithoutParametersAndResponseData, PutWithFormUrlEncodedData, TestErrorCodeData, TypesData, TypesResponse, UploadFileData, UploadFileResponse } from '../types.gen';\n\nexport type QueryKey<TOptions extends Options> = [\n    Pick<TOptions, 'baseUrl' | 'body' | 'headers' | 'path' | 'query'> & {\n        _id: string;\n        _infinite?: boolean;\n        tags?: ReadonlyArray<string>;\n    }\n];\n\nconst createQueryKey = <TOptions extends Options>(id: string, options?: TOptions, infinite?: boolean, tags?: ReadonlyArray<string>): [\n    QueryKey<TOptions>[0]\n] => {\n    const params: QueryKey<TOptions>[0] = { _id: id, baseUrl: options?.baseUrl || (options?.client ?? client).getConfig().baseUrl } as QueryKey<TOptions>[0];\n    if (infinite) {\n        params._infinite = infinite;\n    }\n    if (tags) {\n        params.tags = tags;\n    }\n    if (options?.body) {\n        params.body = options.body;\n    }\n    if (options?.headers) {\n        params.headers = options.headers;\n    }\n    if (options?.path) {\n        params.path = options.path;\n    }\n    if (options?.query) {\n        params.query = options.query;\n    }\n    return [params];\n};\n\nexport const exportQueryKey = (options?: Options<ExportData>) => createQueryKey('export', options);\n\nexport const exportOptions = (options?: Options<ExportData>) => queryOptions<unknown, DefaultError, unknown, ReturnType<typeof exportQueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await export_({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: exportQueryKey(options)\n});\n\nexport const patchApiVbyApiVersionNoTagMutation = (options?: Partial<Options<PatchApiVbyApiVersionNoTagData>>): MutationOptions<unknown, DefaultError, Options<PatchApiVbyApiVersionNoTagData>> => {\n    const mutationOptions: MutationOptions<unknown, DefaultError, Options<PatchApiVbyApiVersionNoTagData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await patchApiVbyApiVersionNoTag({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const importMutation = (options?: Partial<Options<ImportData>>): MutationOptions<ImportResponse, DefaultError, Options<ImportData>> => {\n    const mutationOptions: MutationOptions<ImportResponse, DefaultError, Options<ImportData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await import_({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const fooWowMutation = (options?: Partial<Options<FooWowData>>): MutationOptions<unknown, DefaultError, Options<FooWowData>> => {\n    const mutationOptions: MutationOptions<unknown, DefaultError, Options<FooWowData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await fooWow({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const apiVVersionODataControllerCountQueryKey = (options?: Options<ApiVVersionODataControllerCountData>) => createQueryKey('apiVVersionODataControllerCount', options);\n\nexport const apiVVersionODataControllerCountOptions = (options?: Options<ApiVVersionODataControllerCountData>) => queryOptions<ApiVVersionODataControllerCountResponse, DefaultError, ApiVVersionODataControllerCountResponse, ReturnType<typeof apiVVersionODataControllerCountQueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await apiVVersionODataControllerCount({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: apiVVersionODataControllerCountQueryKey(options)\n});\n\nexport const getApiVbyApiVersionSimpleOperationQueryKey = (options: Options<GetApiVbyApiVersionSimpleOperationData>) => createQueryKey('getApiVbyApiVersionSimpleOperation', options);\n\nexport const getApiVbyApiVersionSimpleOperationOptions = (options: Options<GetApiVbyApiVersionSimpleOperationData>) => queryOptions<GetApiVbyApiVersionSimpleOperationResponse, GetApiVbyApiVersionSimpleOperationError, GetApiVbyApiVersionSimpleOperationResponse, ReturnType<typeof getApiVbyApiVersionSimpleOperationQueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await getApiVbyApiVersionSimpleOperation({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: getApiVbyApiVersionSimpleOperationQueryKey(options)\n});\n\nexport const deleteCallWithoutParametersAndResponseMutation = (options?: Partial<Options<DeleteCallWithoutParametersAndResponseData>>): MutationOptions<unknown, DefaultError, Options<DeleteCallWithoutParametersAndResponseData>> => {\n    const mutationOptions: MutationOptions<unknown, DefaultError, Options<DeleteCallWithoutParametersAndResponseData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await deleteCallWithoutParametersAndResponse({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const getCallWithoutParametersAndResponseQueryKey = (options?: Options<GetCallWithoutParametersAndResponseData>) => createQueryKey('getCallWithoutParametersAndResponse', options);\n\nexport const getCallWithoutParametersAndResponseOptions = (options?: Options<GetCallWithoutParametersAndResponseData>) => queryOptions<unknown, DefaultError, unknown, ReturnType<typeof getCallWithoutParametersAndResponseQueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await getCallWithoutParametersAndResponse({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: getCallWithoutParametersAndResponseQueryKey(options)\n});\n\nexport const patchCallWithoutParametersAndResponseMutation = (options?: Partial<Options<PatchCallWithoutParametersAndResponseData>>): MutationOptions<unknown, DefaultError, Options<PatchCallWithoutParametersAndResponseData>> => {\n    const mutationOptions: MutationOptions<unknown, DefaultError, Options<PatchCallWithoutParametersAndResponseData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await patchCallWithoutParametersAndResponse({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const postCallWithoutParametersAndResponseMutation = (options?: Partial<Options<PostCallWithoutParametersAndResponseData>>): MutationOptions<unknown, DefaultError, Options<PostCallWithoutParametersAndResponseData>> => {\n    const mutationOptions: MutationOptions<unknown, DefaultError, Options<PostCallWithoutParametersAndResponseData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await postCallWithoutParametersAndResponse({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const putCallWithoutParametersAndResponseMutation = (options?: Partial<Options<PutCallWithoutParametersAndResponseData>>): MutationOptions<unknown, DefaultError, Options<PutCallWithoutParametersAndResponseData>> => {\n    const mutationOptions: MutationOptions<unknown, DefaultError, Options<PutCallWithoutParametersAndResponseData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await putCallWithoutParametersAndResponse({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const deleteFooMutation = (options?: Partial<Options<DeleteFooData3>>): MutationOptions<unknown, DefaultError, Options<DeleteFooData3>> => {\n    const mutationOptions: MutationOptions<unknown, DefaultError, Options<DeleteFooData3>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await deleteFoo({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const callWithDescriptionsMutation = (options?: Partial<Options<CallWithDescriptionsData>>): MutationOptions<unknown, DefaultError, Options<CallWithDescriptionsData>> => {\n    const mutationOptions: MutationOptions<unknown, DefaultError, Options<CallWithDescriptionsData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await callWithDescriptions({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\n/**\n * @deprecated\n */\nexport const deprecatedCallMutation = (options?: Partial<Options<DeprecatedCallData>>): MutationOptions<unknown, DefaultError, Options<DeprecatedCallData>> => {\n    const mutationOptions: MutationOptions<unknown, DefaultError, Options<DeprecatedCallData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await deprecatedCall({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const callWithParametersMutation = (options?: Partial<Options<CallWithParametersData>>): MutationOptions<unknown, DefaultError, Options<CallWithParametersData>> => {\n    const mutationOptions: MutationOptions<unknown, DefaultError, Options<CallWithParametersData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await callWithParameters({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const callWithWeirdParameterNamesMutation = (options?: Partial<Options<CallWithWeirdParameterNamesData>>): MutationOptions<unknown, DefaultError, Options<CallWithWeirdParameterNamesData>> => {\n    const mutationOptions: MutationOptions<unknown, DefaultError, Options<CallWithWeirdParameterNamesData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await callWithWeirdParameterNames({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const getCallWithOptionalParamQueryKey = (options: Options<GetCallWithOptionalParamData>) => createQueryKey('getCallWithOptionalParam', options);\n\nexport const getCallWithOptionalParamOptions = (options: Options<GetCallWithOptionalParamData>) => queryOptions<unknown, DefaultError, unknown, ReturnType<typeof getCallWithOptionalParamQueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await getCallWithOptionalParam({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: getCallWithOptionalParamQueryKey(options)\n});\n\nconst createInfiniteParams = <K extends Pick<QueryKey<Options>[0], 'body' | 'headers' | 'path' | 'query'>>(queryKey: QueryKey<Options>, page: K) => {\n    const params = { ...queryKey[0] };\n    if (page.body) {\n        params.body = {\n            ...queryKey[0].body as any,\n            ...page.body as any\n        };\n    }\n    if (page.headers) {\n        params.headers = {\n            ...queryKey[0].headers,\n            ...page.headers\n        };\n    }\n    if (page.path) {\n        params.path = {\n            ...queryKey[0].path as any,\n            ...page.path as any\n        };\n    }\n    if (page.query) {\n        params.query = {\n            ...queryKey[0].query as any,\n            ...page.query as any\n        };\n    }\n    return params as unknown as typeof page;\n};\n\nexport const getCallWithOptionalParamInfiniteQueryKey = (options: Options<GetCallWithOptionalParamData>): QueryKey<Options<GetCallWithOptionalParamData>> => createQueryKey('getCallWithOptionalParam', options, true);\n\nexport const getCallWithOptionalParamInfiniteOptions = (options: Options<GetCallWithOptionalParamData>) => infiniteQueryOptions<unknown, DefaultError, InfiniteData<unknown>, QueryKey<Options<GetCallWithOptionalParamData>>, number | Pick<QueryKey<Options<GetCallWithOptionalParamData>>[0], 'body' | 'headers' | 'path' | 'query'>>(\n// @ts-ignore\n{\n    queryFn: async ({ pageParam, queryKey, signal }) => {\n        // @ts-ignore\n        const page: Pick<QueryKey<Options<GetCallWithOptionalParamData>>[0], 'body' | 'headers' | 'path' | 'query'> = typeof pageParam === 'object' ? pageParam : {\n            query: {\n                page: pageParam\n            }\n        };\n        const params = createInfiniteParams(queryKey, page);\n        const { data } = await getCallWithOptionalParam({\n            ...options,\n            ...params,\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: getCallWithOptionalParamInfiniteQueryKey(options)\n});\n\nexport const postCallWithOptionalParamMutation = (options?: Partial<Options<PostCallWithOptionalParamData>>): MutationOptions<PostCallWithOptionalParamResponse, DefaultError, Options<PostCallWithOptionalParamData>> => {\n    const mutationOptions: MutationOptions<PostCallWithOptionalParamResponse, DefaultError, Options<PostCallWithOptionalParamData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await postCallWithOptionalParam({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const postApiVbyApiVersionRequestBodyMutation = (options?: Partial<Options<PostApiVbyApiVersionRequestBodyData>>): MutationOptions<unknown, DefaultError, Options<PostApiVbyApiVersionRequestBodyData>> => {\n    const mutationOptions: MutationOptions<unknown, DefaultError, Options<PostApiVbyApiVersionRequestBodyData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await postApiVbyApiVersionRequestBody({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const postApiVbyApiVersionFormDataMutation = (options?: Partial<Options<PostApiVbyApiVersionFormDataData>>): MutationOptions<unknown, DefaultError, Options<PostApiVbyApiVersionFormDataData>> => {\n    const mutationOptions: MutationOptions<unknown, DefaultError, Options<PostApiVbyApiVersionFormDataData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await postApiVbyApiVersionFormData({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const callWithDefaultParametersQueryKey = (options?: Options<CallWithDefaultParametersData>) => createQueryKey('callWithDefaultParameters', options);\n\nexport const callWithDefaultParametersOptions = (options?: Options<CallWithDefaultParametersData>) => queryOptions<unknown, DefaultError, unknown, ReturnType<typeof callWithDefaultParametersQueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await callWithDefaultParameters({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: callWithDefaultParametersQueryKey(options)\n});\n\nexport const callWithDefaultOptionalParametersMutation = (options?: Partial<Options<CallWithDefaultOptionalParametersData>>): MutationOptions<unknown, DefaultError, Options<CallWithDefaultOptionalParametersData>> => {\n    const mutationOptions: MutationOptions<unknown, DefaultError, Options<CallWithDefaultOptionalParametersData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await callWithDefaultOptionalParameters({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const callToTestOrderOfParamsMutation = (options?: Partial<Options<CallToTestOrderOfParamsData>>): MutationOptions<unknown, DefaultError, Options<CallToTestOrderOfParamsData>> => {\n    const mutationOptions: MutationOptions<unknown, DefaultError, Options<CallToTestOrderOfParamsData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await callToTestOrderOfParams({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const duplicateNameMutation = (options?: Partial<Options<DuplicateNameData>>): MutationOptions<unknown, DefaultError, Options<DuplicateNameData>> => {\n    const mutationOptions: MutationOptions<unknown, DefaultError, Options<DuplicateNameData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await duplicateName({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const duplicateName2QueryKey = (options?: Options<DuplicateName2Data>) => createQueryKey('duplicateName2', options);\n\nexport const duplicateName2Options = (options?: Options<DuplicateName2Data>) => queryOptions<unknown, DefaultError, unknown, ReturnType<typeof duplicateName2QueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await duplicateName2({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: duplicateName2QueryKey(options)\n});\n\nexport const duplicateName3Mutation = (options?: Partial<Options<DuplicateName3Data>>): MutationOptions<unknown, DefaultError, Options<DuplicateName3Data>> => {\n    const mutationOptions: MutationOptions<unknown, DefaultError, Options<DuplicateName3Data>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await duplicateName3({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const duplicateName4Mutation = (options?: Partial<Options<DuplicateName4Data>>): MutationOptions<unknown, DefaultError, Options<DuplicateName4Data>> => {\n    const mutationOptions: MutationOptions<unknown, DefaultError, Options<DuplicateName4Data>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await duplicateName4({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const callWithNoContentResponseQueryKey = (options?: Options<CallWithNoContentResponseData>) => createQueryKey('callWithNoContentResponse', options);\n\nexport const callWithNoContentResponseOptions = (options?: Options<CallWithNoContentResponseData>) => queryOptions<CallWithNoContentResponseResponse, DefaultError, CallWithNoContentResponseResponse, ReturnType<typeof callWithNoContentResponseQueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await callWithNoContentResponse({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: callWithNoContentResponseQueryKey(options)\n});\n\nexport const callWithResponseAndNoContentResponseQueryKey = (options?: Options<CallWithResponseAndNoContentResponseData>) => createQueryKey('callWithResponseAndNoContentResponse', options);\n\nexport const callWithResponseAndNoContentResponseOptions = (options?: Options<CallWithResponseAndNoContentResponseData>) => queryOptions<CallWithResponseAndNoContentResponseResponse, DefaultError, CallWithResponseAndNoContentResponseResponse, ReturnType<typeof callWithResponseAndNoContentResponseQueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await callWithResponseAndNoContentResponse({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: callWithResponseAndNoContentResponseQueryKey(options)\n});\n\nexport const dummyAQueryKey = (options?: Options<DummyAData>) => createQueryKey('dummyA', options);\n\nexport const dummyAOptions = (options?: Options<DummyAData>) => queryOptions<DummyAResponse, DefaultError, DummyAResponse, ReturnType<typeof dummyAQueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await dummyA({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: dummyAQueryKey(options)\n});\n\nexport const dummyBQueryKey = (options?: Options<DummyBData>) => createQueryKey('dummyB', options);\n\nexport const dummyBOptions = (options?: Options<DummyBData>) => queryOptions<DummyBResponse, DefaultError, DummyBResponse, ReturnType<typeof dummyBQueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await dummyB({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: dummyBQueryKey(options)\n});\n\nexport const callWithResponseQueryKey = (options?: Options<CallWithResponseData>) => createQueryKey('callWithResponse', options);\n\nexport const callWithResponseOptions = (options?: Options<CallWithResponseData>) => queryOptions<CallWithResponseResponse, DefaultError, CallWithResponseResponse, ReturnType<typeof callWithResponseQueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await callWithResponse({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: callWithResponseQueryKey(options)\n});\n\nexport const callWithDuplicateResponsesMutation = (options?: Partial<Options<CallWithDuplicateResponsesData>>): MutationOptions<CallWithDuplicateResponsesResponse, CallWithDuplicateResponsesError, Options<CallWithDuplicateResponsesData>> => {\n    const mutationOptions: MutationOptions<CallWithDuplicateResponsesResponse, CallWithDuplicateResponsesError, Options<CallWithDuplicateResponsesData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await callWithDuplicateResponses({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const callWithResponsesMutation = (options?: Partial<Options<CallWithResponsesData>>): MutationOptions<CallWithResponsesResponse, CallWithResponsesError, Options<CallWithResponsesData>> => {\n    const mutationOptions: MutationOptions<CallWithResponsesResponse, CallWithResponsesError, Options<CallWithResponsesData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await callWithResponses({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const collectionFormatQueryKey = (options: Options<CollectionFormatData>) => createQueryKey('collectionFormat', options);\n\nexport const collectionFormatOptions = (options: Options<CollectionFormatData>) => queryOptions<unknown, DefaultError, unknown, ReturnType<typeof collectionFormatQueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await collectionFormat({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: collectionFormatQueryKey(options)\n});\n\nexport const typesQueryKey = (options: Options<TypesData>) => createQueryKey('types', options);\n\nexport const typesOptions = (options: Options<TypesData>) => queryOptions<TypesResponse, DefaultError, TypesResponse, ReturnType<typeof typesQueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await types({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: typesQueryKey(options)\n});\n\nexport const uploadFileMutation = (options?: Partial<Options<UploadFileData>>): MutationOptions<UploadFileResponse, DefaultError, Options<UploadFileData>> => {\n    const mutationOptions: MutationOptions<UploadFileResponse, DefaultError, Options<UploadFileData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await uploadFile({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const fileResponseQueryKey = (options: Options<FileResponseData>) => createQueryKey('fileResponse', options);\n\nexport const fileResponseOptions = (options: Options<FileResponseData>) => queryOptions<FileResponseResponse, DefaultError, FileResponseResponse, ReturnType<typeof fileResponseQueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await fileResponse({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: fileResponseQueryKey(options)\n});\n\nexport const complexTypesQueryKey = (options: Options<ComplexTypesData>) => createQueryKey('complexTypes', options);\n\nexport const complexTypesOptions = (options: Options<ComplexTypesData>) => queryOptions<ComplexTypesResponse, DefaultError, ComplexTypesResponse, ReturnType<typeof complexTypesQueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await complexTypes({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: complexTypesQueryKey(options)\n});\n\nexport const multipartResponseQueryKey = (options?: Options<MultipartResponseData>) => createQueryKey('multipartResponse', options);\n\nexport const multipartResponseOptions = (options?: Options<MultipartResponseData>) => queryOptions<MultipartResponseResponse, DefaultError, MultipartResponseResponse, ReturnType<typeof multipartResponseQueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await multipartResponse({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: multipartResponseQueryKey(options)\n});\n\nexport const multipartRequestMutation = (options?: Partial<Options<MultipartRequestData>>): MutationOptions<unknown, DefaultError, Options<MultipartRequestData>> => {\n    const mutationOptions: MutationOptions<unknown, DefaultError, Options<MultipartRequestData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await multipartRequest({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const complexParamsMutation = (options?: Partial<Options<ComplexParamsData>>): MutationOptions<ComplexParamsResponse, DefaultError, Options<ComplexParamsData>> => {\n    const mutationOptions: MutationOptions<ComplexParamsResponse, DefaultError, Options<ComplexParamsData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await complexParams({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const callWithResultFromHeaderMutation = (options?: Partial<Options<CallWithResultFromHeaderData>>): MutationOptions<unknown, DefaultError, Options<CallWithResultFromHeaderData>> => {\n    const mutationOptions: MutationOptions<unknown, DefaultError, Options<CallWithResultFromHeaderData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await callWithResultFromHeader({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const testErrorCodeMutation = (options?: Partial<Options<TestErrorCodeData>>): MutationOptions<unknown, DefaultError, Options<TestErrorCodeData>> => {\n    const mutationOptions: MutationOptions<unknown, DefaultError, Options<TestErrorCodeData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await testErrorCode({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const nonAsciiæøåÆøÅöôêÊ字符串Mutation = (options?: Partial<Options<NonAsciiæøåÆøÅöôêÊ字符串Data>>): MutationOptions<NonAsciiæøåÆøÅöôêÊ字符串Response, DefaultError, Options<NonAsciiæøåÆøÅöôêÊ字符串Data>> => {\n    const mutationOptions: MutationOptions<NonAsciiæøåÆøÅöôêÊ字符串Response, DefaultError, Options<NonAsciiæøåÆøÅöôêÊ字符串Data>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await nonAsciiæøåÆøÅöôêÊ字符串({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\n/**\n * Login User\n */\nexport const putWithFormUrlEncodedMutation = (options?: Partial<Options<PutWithFormUrlEncodedData>>): MutationOptions<unknown, DefaultError, Options<PutWithFormUrlEncodedData>> => {\n    const mutationOptions: MutationOptions<unknown, DefaultError, Options<PutWithFormUrlEncodedData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await putWithFormUrlEncoded({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/angular-query-experimental/fetch/client/client.gen.ts",
    "content": "// 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 (options: RequestOptions) => {\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 url = buildUrl(opts);\n\n    return { opts, url };\n  };\n\n  const request: Client['request'] = async (options) => {\n    // @ts-expect-error\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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/angular-query-experimental/fetch/client/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type { Auth } from '../core/auth.gen';\nexport type { QuerySerializerOptions } from '../core/bodySerializer.gen';\nexport {\n  formDataBodySerializer,\n  jsonBodySerializer,\n  urlSearchParamsBodySerializer,\n} from '../core/bodySerializer.gen';\nexport { buildClientParams } from '../core/params.gen';\nexport { serializeQueryKeyValue } from '../core/queryKeySerializer.gen';\nexport { createClient } from './client.gen';\nexport type {\n  Client,\n  ClientOptions,\n  Config,\n  CreateClientConfig,\n  Options,\n  RequestOptions,\n  RequestResult,\n  ResolvedRequestOptions,\n  ResponseStyle,\n  TDataShape,\n} from './types.gen';\nexport { createConfig, mergeHeaders } from './utils.gen';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/angular-query-experimental/fetch/client/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { Auth } from '../core/auth.gen';\nimport type {\n  ServerSentEventsOptions,\n  ServerSentEventsResult,\n} from '../core/serverSentEvents.gen';\nimport type { Client as CoreClient, Config as CoreConfig } from '../core/types.gen';\nimport type { Middleware } from './utils.gen';\n\nexport type ResponseStyle = 'data' | 'fields';\n\nexport interface Config<T extends ClientOptions = ClientOptions>\n  extends Omit<RequestInit, 'body' | 'headers' | 'method'>, CoreConfig {\n  /**\n   * Base URL for all requests made by this client.\n   */\n  baseUrl?: T['baseUrl'];\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   * Please don't use the Fetch client for Next.js applications. The `next`\n   * options won't have any effect.\n   *\n   * Install {@link https://www.npmjs.com/package/@hey-api/client-next `@hey-api/client-next`} instead.\n   */\n  next?: never;\n  /**\n   * Return the response data parsed in a specified format. By default, `auto`\n   * will infer the appropriate method from the `Content-Type` response header.\n   * You can override this behavior with any of the {@link Body} methods.\n   * Select `stream` if you don't want to parse response data at all.\n   *\n   * @default 'auto'\n   */\n  parseAs?: 'arrayBuffer' | 'auto' | 'blob' | 'formData' | 'json' | 'stream' | 'text';\n  /**\n   * Should we return only data or multiple fields (data, error, response, etc.)?\n   *\n   * @default 'fields'\n   */\n  responseStyle?: ResponseStyle;\n  /**\n   * Throw an error instead of returning it in the response?\n   *\n   * @default false\n   */\n  throwOnError?: T['throwOnError'];\n}\n\nexport interface RequestOptions<\n  TData = unknown,\n  TResponseStyle extends ResponseStyle = 'fields',\n  ThrowOnError extends boolean = boolean,\n  Url extends string = string,\n>\n  extends\n    Config<{\n      responseStyle: TResponseStyle;\n      throwOnError: ThrowOnError;\n    }>,\n    Pick<\n      ServerSentEventsOptions<TData>,\n      | 'onRequest'\n      | 'onSseError'\n      | 'onSseEvent'\n      | 'sseDefaultRetryDelay'\n      | 'sseMaxRetryAttempts'\n      | 'sseMaxRetryDelay'\n    > {\n  /**\n   * Any body that you want to add to your request.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/fetch#body}\n   */\n  body?: unknown;\n  path?: Record<string, unknown>;\n  query?: Record<string, unknown>;\n  /**\n   * Security mechanism(s) to use for the request.\n   */\n  security?: ReadonlyArray<Auth>;\n  url: Url;\n}\n\nexport interface ResolvedRequestOptions<\n  TResponseStyle extends ResponseStyle = 'fields',\n  ThrowOnError extends boolean = boolean,\n  Url extends string = string,\n> extends RequestOptions<unknown, TResponseStyle, ThrowOnError, Url> {\n  serializedBody?: string;\n}\n\nexport type RequestResult<\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = boolean,\n  TResponseStyle extends ResponseStyle = 'fields',\n> = ThrowOnError extends true\n  ? Promise<\n      TResponseStyle extends 'data'\n        ? TData extends Record<string, unknown>\n          ? TData[keyof TData]\n          : TData\n        : {\n            data: TData extends Record<string, unknown> ? TData[keyof TData] : TData;\n            request: Request;\n            response: Response;\n          }\n    >\n  : Promise<\n      TResponseStyle extends 'data'\n        ? (TData extends Record<string, unknown> ? TData[keyof TData] : TData) | undefined\n        : (\n            | {\n                data: TData extends Record<string, unknown> ? TData[keyof TData] : TData;\n                error: undefined;\n              }\n            | {\n                data: undefined;\n                error: TError extends Record<string, unknown> ? TError[keyof TError] : TError;\n              }\n          ) & {\n            request: Request;\n            response: Response;\n          }\n    >;\n\nexport interface ClientOptions {\n  baseUrl?: string;\n  responseStyle?: ResponseStyle;\n  throwOnError?: boolean;\n}\n\ntype MethodFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'>,\n) => RequestResult<TData, TError, ThrowOnError, TResponseStyle>;\n\ntype SseFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'>,\n) => Promise<ServerSentEventsResult<TData, TError>>;\n\ntype RequestFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'> &\n    Pick<Required<RequestOptions<TData, TResponseStyle, ThrowOnError>>, 'method'>,\n) => RequestResult<TData, TError, ThrowOnError, TResponseStyle>;\n\ntype BuildUrlFn = <\n  TData extends {\n    body?: unknown;\n    path?: Record<string, unknown>;\n    query?: Record<string, unknown>;\n    url: string;\n  },\n>(\n  options: TData & Options<TData>,\n) => string;\n\nexport type Client = CoreClient<RequestFn, Config, MethodFn, BuildUrlFn, SseFn> & {\n  interceptors: Middleware<Request, Response, unknown, ResolvedRequestOptions>;\n};\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 = ClientOptions> = (\n  override?: Config<ClientOptions & T>,\n) => Config<Required<ClientOptions> & T>;\n\nexport interface TDataShape {\n  body?: unknown;\n  headers?: unknown;\n  path?: unknown;\n  query?: unknown;\n  url: string;\n}\n\ntype OmitKeys<T, K> = Pick<T, Exclude<keyof T, K>>;\n\nexport type Options<\n  TData extends TDataShape = TDataShape,\n  ThrowOnError extends boolean = boolean,\n  TResponse = unknown,\n  TResponseStyle extends ResponseStyle = 'fields',\n> = OmitKeys<\n  RequestOptions<TResponse, TResponseStyle, ThrowOnError>,\n  'body' | 'path' | 'query' | 'url'\n> &\n  ([TData] extends [never] ? unknown : Omit<TData, 'url'>);\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/angular-query-experimental/fetch/client/utils.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/angular-query-experimental/fetch/client.gen.ts",
    "content": "// 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: 'http://localhost:3000/base' }));\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/angular-query-experimental/fetch/core/auth.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/angular-query-experimental/fetch/core/bodySerializer.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/angular-query-experimental/fetch/core/params.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/angular-query-experimental/fetch/core/pathSerializer.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/angular-query-experimental/fetch/core/queryKeySerializer.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\n/**\n * JSON-friendly union that mirrors what Pinia Colada can hash.\n */\nexport type JsonValue =\n  | null\n  | string\n  | number\n  | boolean\n  | JsonValue[]\n  | { [key: string]: JsonValue };\n\n/**\n * Replacer that converts non-JSON values (bigint, Date, etc.) to safe substitutes.\n */\nexport const queryKeyJsonReplacer = (_key: string, value: unknown) => {\n  if (value === undefined || typeof value === 'function' || typeof value === 'symbol') {\n    return undefined;\n  }\n  if (typeof value === 'bigint') {\n    return value.toString();\n  }\n  if (value instanceof Date) {\n    return value.toISOString();\n  }\n  return value;\n};\n\n/**\n * Safely stringifies a value and parses it back into a JsonValue.\n */\nexport const stringifyToJsonValue = (input: unknown): JsonValue | undefined => {\n  try {\n    const json = JSON.stringify(input, queryKeyJsonReplacer);\n    if (json === undefined) {\n      return undefined;\n    }\n    return JSON.parse(json) as JsonValue;\n  } catch {\n    return undefined;\n  }\n};\n\n/**\n * Detects plain objects (including objects with a null prototype).\n */\nconst isPlainObject = (value: unknown): value is Record<string, unknown> => {\n  if (value === null || typeof value !== 'object') {\n    return false;\n  }\n  const prototype = Object.getPrototypeOf(value as object);\n  return prototype === Object.prototype || prototype === null;\n};\n\n/**\n * Turns URLSearchParams into a sorted JSON object for deterministic keys.\n */\nconst serializeSearchParams = (params: URLSearchParams): JsonValue => {\n  const entries = Array.from(params.entries()).sort(([a], [b]) => a.localeCompare(b));\n  const result: Record<string, JsonValue> = {};\n\n  for (const [key, value] of entries) {\n    const existing = result[key];\n    if (existing === undefined) {\n      result[key] = value;\n      continue;\n    }\n\n    if (Array.isArray(existing)) {\n      (existing as string[]).push(value);\n    } else {\n      result[key] = [existing, value];\n    }\n  }\n\n  return result;\n};\n\n/**\n * Normalizes any accepted value into a JSON-friendly shape for query keys.\n */\nexport const serializeQueryKeyValue = (value: unknown): JsonValue | undefined => {\n  if (value === null) {\n    return null;\n  }\n\n  if (typeof value === 'string' || typeof value === 'number' || typeof value === 'boolean') {\n    return value;\n  }\n\n  if (value === undefined || typeof value === 'function' || typeof value === 'symbol') {\n    return undefined;\n  }\n\n  if (typeof value === 'bigint') {\n    return value.toString();\n  }\n\n  if (value instanceof Date) {\n    return value.toISOString();\n  }\n\n  if (Array.isArray(value)) {\n    return stringifyToJsonValue(value);\n  }\n\n  if (typeof URLSearchParams !== 'undefined' && value instanceof URLSearchParams) {\n    return serializeSearchParams(value);\n  }\n\n  if (isPlainObject(value)) {\n    return stringifyToJsonValue(value);\n  }\n\n  return undefined;\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/angular-query-experimental/fetch/core/serverSentEvents.gen.ts",
    "content": "// 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 const 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            // Normalize line endings: CRLF -> LF, then CR -> LF\n            buffer = buffer.replace(/\\r\\n/g, '\\n').replace(/\\r/g, '\\n');\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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/angular-query-experimental/fetch/core/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { Auth, AuthToken } from './auth.gen';\nimport type { BodySerializer, QuerySerializer, QuerySerializerOptions } from './bodySerializer.gen';\n\nexport type HttpMethod =\n  | 'connect'\n  | 'delete'\n  | 'get'\n  | 'head'\n  | 'options'\n  | 'patch'\n  | 'post'\n  | 'put'\n  | 'trace';\n\nexport type Client<\n  RequestFn = never,\n  Config = unknown,\n  MethodFn = never,\n  BuildUrlFn = never,\n  SseFn = never,\n> = {\n  /**\n   * Returns the final request URL.\n   */\n  buildUrl: BuildUrlFn;\n  getConfig: () => Config;\n  request: RequestFn;\n  setConfig: (config: Config) => Config;\n} & {\n  [K in HttpMethod]: MethodFn;\n} & ([SseFn] extends [never] ? { sse?: never } : { sse: { [K in HttpMethod]: SseFn } });\n\nexport interface Config {\n  /**\n   * Auth token or a function returning auth token. The resolved value will be\n   * added to the request payload as defined by its `security` array.\n   */\n  auth?: ((auth: Auth) => Promise<AuthToken> | AuthToken) | AuthToken;\n  /**\n   * A function for serializing request body parameter. By default,\n   * {@link JSON.stringify()} will be used.\n   */\n  bodySerializer?: BodySerializer | null;\n  /**\n   * An object containing any HTTP headers that you want to pre-populate your\n   * `Headers` object with.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/Headers/Headers#init See more}\n   */\n  headers?:\n    | RequestInit['headers']\n    | Record<\n        string,\n        string | number | boolean | (string | number | boolean)[] | null | undefined | unknown\n      >;\n  /**\n   * The request method.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/fetch#method See more}\n   */\n  method?: Uppercase<HttpMethod>;\n  /**\n   * A function for serializing request query parameters. By default, arrays\n   * will be exploded in form style, objects will be exploded in deepObject\n   * style, and reserved characters are percent-encoded.\n   *\n   * This method will have no effect if the native `paramsSerializer()` Axios\n   * API function is used.\n   *\n   * {@link https://swagger.io/docs/specification/serialization/#query View examples}\n   */\n  querySerializer?: QuerySerializer | QuerySerializerOptions;\n  /**\n   * A function validating request data. This is useful if you want to ensure\n   * the request conforms to the desired shape, so it can be safely sent to\n   * the server.\n   */\n  requestValidator?: (data: unknown) => Promise<unknown>;\n  /**\n   * A function transforming response data before it's returned. This is useful\n   * for post-processing data, e.g. converting ISO strings into Date objects.\n   */\n  responseTransformer?: (data: unknown) => Promise<unknown>;\n  /**\n   * A function validating response data. This is useful if you want to ensure\n   * the response conforms to the desired shape, so it can be safely passed to\n   * the transformers and returned to the user.\n   */\n  responseValidator?: (data: unknown) => Promise<unknown>;\n}\n\ntype IsExactlyNeverOrNeverUndefined<T> = [T] extends [never]\n  ? true\n  : [T] extends [never | undefined]\n    ? [undefined] extends [T]\n      ? false\n      : true\n    : false;\n\nexport type OmitNever<T extends Record<string, unknown>> = {\n  [K in keyof T as IsExactlyNeverOrNeverUndefined<T[K]> extends true ? never : K]: T[K];\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/angular-query-experimental/fetch/core/utils.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/angular-query-experimental/fetch/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport { apiVVersionODataControllerCount, callToTestOrderOfParams, callWithDefaultOptionalParameters, callWithDefaultParameters, callWithDescriptions, callWithDuplicateResponses, callWithNoContentResponse, callWithParameters, callWithResponse, callWithResponseAndNoContentResponse, callWithResponses, callWithResultFromHeader, callWithWeirdParameterNames, collectionFormat, complexParams, complexTypes, deleteCallWithoutParametersAndResponse, deleteFoo, deprecatedCall, dummyA, dummyB, duplicateName, duplicateName2, duplicateName3, duplicateName4, export_, fileResponse, fooWow, getApiVbyApiVersionSimpleOperation, getCallWithOptionalParam, getCallWithoutParametersAndResponse, headCallWithoutParametersAndResponse, import_, multipartRequest, multipartResponse, nonAsciiæøåÆøÅöôêÊ字符串, type Options, optionsCallWithoutParametersAndResponse, patchApiVbyApiVersionNoTag, patchCallWithoutParametersAndResponse, postApiVbyApiVersionFormData, postApiVbyApiVersionRequestBody, postCallWithOptionalParam, postCallWithoutParametersAndResponse, putCallWithoutParametersAndResponse, putWithFormUrlEncoded, testErrorCode, types, uploadFile } from './sdk.gen';\nexport type { _3eNum1Период, _400, AdditionalPropertiesIntegerIssue, AdditionalPropertiesUnknownIssue, AdditionalPropertiesUnknownIssue2, AdditionalPropertiesUnknownIssue3, AdditionalPropertiesUnknownIssueWritable, AnyOfAnyAndNull, AnyOfArrays, ApiVVersionODataControllerCountData, ApiVVersionODataControllerCountResponse, ApiVVersionODataControllerCountResponses, ArrayWithAnyOfProperties, ArrayWithArray, ArrayWithBooleans, ArrayWithNumbers, ArrayWithProperties, ArrayWithReferences, ArrayWithStrings, CallToTestOrderOfParamsData, CallWithDefaultOptionalParametersData, CallWithDefaultParametersData, CallWithDescriptionsData, CallWithDuplicateResponsesData, CallWithDuplicateResponsesError, CallWithDuplicateResponsesErrors, CallWithDuplicateResponsesResponse, CallWithDuplicateResponsesResponses, CallWithNoContentResponseData, CallWithNoContentResponseResponse, CallWithNoContentResponseResponses, CallWithParametersData, CallWithResponseAndNoContentResponseData, CallWithResponseAndNoContentResponseResponse, CallWithResponseAndNoContentResponseResponses, CallWithResponseData, CallWithResponseResponse, CallWithResponseResponses, CallWithResponsesData, CallWithResponsesError, CallWithResponsesErrors, CallWithResponsesResponse, CallWithResponsesResponses, CallWithResultFromHeaderData, CallWithResultFromHeaderErrors, CallWithResultFromHeaderResponses, CallWithWeirdParameterNamesData, CamelCaseCommentWithBreaks, CharactersInDescription, ClientOptions, CollectionFormatData, CommentWithBackticks, CommentWithBackticksAndQuotes, CommentWithBreaks, CommentWithExpressionPlaceholders, CommentWithQuotes, CommentWithReservedCharacters, CommentWithSlashes, ComplexParamsData, ComplexParamsResponse, ComplexParamsResponses, ComplexTypesData, ComplexTypesErrors, ComplexTypesResponse, ComplexTypesResponses, CompositionBaseModel, CompositionExtendedModel, CompositionWithAllOfAndNullable, CompositionWithAnyOf, CompositionWithAnyOfAndNullable, CompositionWithAnyOfAnonymous, CompositionWithNestedAnyAndTypeNull, CompositionWithNestedAnyOfAndNull, CompositionWithOneOf, CompositionWithOneOfAndComplexArrayDictionary, CompositionWithOneOfAndNullable, CompositionWithOneOfAndProperties, CompositionWithOneOfAndSimpleArrayDictionary, CompositionWithOneOfAndSimpleDictionary, CompositionWithOneOfAnonymous, CompositionWithOneOfDiscriminator, ConstValue, Default, DeleteCallWithoutParametersAndResponseData, DeleteFooData, DeleteFooData2, DeleteFooData3, DeprecatedCallData, DeprecatedModel, DictionaryWithArray, DictionaryWithDictionary, DictionaryWithProperties, DictionaryWithPropertiesAndAdditionalProperties, DictionaryWithReference, DictionaryWithString, DummyAData, DummyAResponse, DummyAResponses, DummyBData, DummyBResponse, DummyBResponses, DuplicateName2Data, DuplicateName3Data, DuplicateName4Data, DuplicateNameData, EnumFromDescription, EnumWithExtensions, EnumWithNumbers, EnumWithReplacedCharacters, EnumWithStrings, EnumWithXEnumNames, ExportData, ExternalRefA, ExternalRefB, ExternalSharedModel, File, FileResponseData, FileResponseResponse, FileResponseResponses, FileWritable, FooWowData, FooWowResponses, FreeFormObjectWithAdditionalPropertiesEqEmptyObject, FreeFormObjectWithAdditionalPropertiesEqTrue, FreeFormObjectWithoutAdditionalProperties, GenericSchemaDuplicateIssue1SystemBoolean, GenericSchemaDuplicateIssue1SystemBooleanWritable, GenericSchemaDuplicateIssue1SystemString, GenericSchemaDuplicateIssue1SystemStringWritable, GetApiVbyApiVersionSimpleOperationData, GetApiVbyApiVersionSimpleOperationError, GetApiVbyApiVersionSimpleOperationErrors, GetApiVbyApiVersionSimpleOperationResponse, GetApiVbyApiVersionSimpleOperationResponses, GetCallWithOptionalParamData, GetCallWithoutParametersAndResponseData, HeadCallWithoutParametersAndResponseData, Import, ImportData, ImportResponse, ImportResponses, IoK8sApimachineryPkgApisMetaV1DeleteOptions, IoK8sApimachineryPkgApisMetaV1Preconditions, ModelCircle, ModelFromZendesk, ModelSquare, ModelThatExtends, ModelThatExtendsExtends, ModelWithAdditionalPropertiesEqTrue, ModelWithAdditionalPropertiesRef, ModelWithAnyOfConstantSizeArray, ModelWithAnyOfConstantSizeArrayAndIntersect, ModelWithAnyOfConstantSizeArrayNullable, ModelWithAnyOfConstantSizeArrayWithNSizeAndOptions, ModelWithAnyOfConstantSizeArrayWithNSizeAndOptionsWritable, ModelWithArray, ModelWithArrayReadOnlyAndWriteOnly, ModelWithArrayReadOnlyAndWriteOnlyWritable, ModelWithBackticksInDescription, ModelWithBoolean, ModelWithCircularReference, ModelWithConst, ModelWithConstantSizeArray, ModelWithDictionary, ModelWithDuplicateImports, ModelWithDuplicateProperties, ModelWithEnum, ModelWithEnumFromDescription, ModelWithEnumWithHyphen, ModelWithInteger, ModelWithNestedArrayEnums, ModelWithNestedArrayEnumsData, ModelWithNestedArrayEnumsDataBar, ModelWithNestedArrayEnumsDataFoo, ModelWithNestedCompositionEnums, ModelWithNestedEnums, ModelWithNestedProperties, ModelWithNullableObject, ModelWithNullableString, ModelWithNumericEnumUnion, ModelWithOneOfAndProperties, ModelWithOneOfEnum, ModelWithOrderedProperties, ModelWithPattern, ModelWithPatternWritable, ModelWithPrefixItemsConstantSizeArray, ModelWithProperties, ModelWithPropertiesWritable, ModelWithReadOnlyAndWriteOnly, ModelWithReadOnlyAndWriteOnlyWritable, ModelWithReference, ModelWithReferenceWritable, ModelWithString, ModelWithStringError, MultipartRequestData, MultipartResponseData, MultipartResponseResponse, MultipartResponseResponses, NestedAnyOfArraysNullable, NonAsciiæøåÆøÅöôêÊ字符串Data, NonAsciiæøåÆøÅöôêÊ字符串Response, NonAsciiæøåÆøÅöôêÊ字符串Responses, NonAsciiStringæøåÆøÅöôêÊ字符串, NullableObject, OneOfAllOfIssue, OneOfAllOfIssueWritable, OptionsCallWithoutParametersAndResponseData, Pageable, ParameterSimpleParameterUnused, PatchApiVbyApiVersionNoTagData, PatchApiVbyApiVersionNoTagResponses, PatchCallWithoutParametersAndResponseData, PostApiVbyApiVersionFormDataData, PostApiVbyApiVersionRequestBodyData, PostCallWithOptionalParamData, PostCallWithOptionalParamResponse, PostCallWithOptionalParamResponses, PostCallWithoutParametersAndResponseData, PostServiceWithEmptyTagResponse, PostServiceWithEmptyTagResponse2, PutCallWithoutParametersAndResponseData, PutWithFormUrlEncodedData, SchemaWithFormRestrictedKeys, SimpleBoolean, SimpleFile, SimpleFormData, SimpleInteger, SimpleParameter, SimpleReference, SimpleRequestBody, SimpleString, SimpleStringWithPattern, TestErrorCodeData, TestErrorCodeErrors, TestErrorCodeResponses, TypesData, TypesResponse, TypesResponses, UploadFileData, UploadFileResponse, UploadFileResponses, XFooBar } from './types.gen';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/angular-query-experimental/fetch/sdk.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport { type Client, formDataBodySerializer, type Options as Options2, type TDataShape, urlSearchParamsBodySerializer } from './client';\nimport { client } from './client.gen';\nimport type { ApiVVersionODataControllerCountData, ApiVVersionODataControllerCountResponses, CallToTestOrderOfParamsData, CallWithDefaultOptionalParametersData, CallWithDefaultParametersData, CallWithDescriptionsData, CallWithDuplicateResponsesData, CallWithDuplicateResponsesErrors, CallWithDuplicateResponsesResponses, CallWithNoContentResponseData, CallWithNoContentResponseResponses, CallWithParametersData, CallWithResponseAndNoContentResponseData, CallWithResponseAndNoContentResponseResponses, CallWithResponseData, CallWithResponseResponses, CallWithResponsesData, CallWithResponsesErrors, CallWithResponsesResponses, CallWithResultFromHeaderData, CallWithResultFromHeaderErrors, CallWithResultFromHeaderResponses, CallWithWeirdParameterNamesData, CollectionFormatData, ComplexParamsData, ComplexParamsResponses, ComplexTypesData, ComplexTypesErrors, ComplexTypesResponses, DeleteCallWithoutParametersAndResponseData, DeleteFooData3, DeprecatedCallData, DummyAData, DummyAResponses, DummyBData, DummyBResponses, DuplicateName2Data, DuplicateName3Data, DuplicateName4Data, DuplicateNameData, ExportData, FileResponseData, FileResponseResponses, FooWowData, FooWowResponses, GetApiVbyApiVersionSimpleOperationData, GetApiVbyApiVersionSimpleOperationErrors, GetApiVbyApiVersionSimpleOperationResponses, GetCallWithOptionalParamData, GetCallWithoutParametersAndResponseData, HeadCallWithoutParametersAndResponseData, ImportData, ImportResponses, MultipartRequestData, MultipartResponseData, MultipartResponseResponses, NonAsciiæøåÆøÅöôêÊ字符串Data, NonAsciiæøåÆøÅöôêÊ字符串Responses, OptionsCallWithoutParametersAndResponseData, PatchApiVbyApiVersionNoTagData, PatchApiVbyApiVersionNoTagResponses, PatchCallWithoutParametersAndResponseData, PostApiVbyApiVersionFormDataData, PostApiVbyApiVersionRequestBodyData, PostCallWithOptionalParamData, PostCallWithOptionalParamResponses, PostCallWithoutParametersAndResponseData, PutCallWithoutParametersAndResponseData, PutWithFormUrlEncodedData, TestErrorCodeData, TestErrorCodeErrors, TestErrorCodeResponses, TypesData, TypesResponses, UploadFileData, UploadFileResponses } from './types.gen';\n\nexport type Options<TData extends TDataShape = TDataShape, ThrowOnError extends boolean = boolean> = Options2<TData, ThrowOnError> & {\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\nexport const export_ = <ThrowOnError extends boolean = false>(options?: Options<ExportData, ThrowOnError>) => (options?.client ?? client).get<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/no+tag', ...options });\n\nexport const patchApiVbyApiVersionNoTag = <ThrowOnError extends boolean = false>(options?: Options<PatchApiVbyApiVersionNoTagData, ThrowOnError>) => (options?.client ?? client).patch<PatchApiVbyApiVersionNoTagResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/no+tag', ...options });\n\nexport const import_ = <ThrowOnError extends boolean = false>(options: Options<ImportData, ThrowOnError>) => (options.client ?? client).post<ImportResponses, unknown, ThrowOnError>({\n    url: '/api/v{api-version}/no+tag',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options.headers\n    }\n});\n\nexport const fooWow = <ThrowOnError extends boolean = false>(options?: Options<FooWowData, ThrowOnError>) => (options?.client ?? client).put<FooWowResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/no+tag', ...options });\n\nexport const apiVVersionODataControllerCount = <ThrowOnError extends boolean = false>(options?: Options<ApiVVersionODataControllerCountData, ThrowOnError>) => (options?.client ?? client).get<ApiVVersionODataControllerCountResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple/$count', ...options });\n\nexport const getApiVbyApiVersionSimpleOperation = <ThrowOnError extends boolean = false>(options: Options<GetApiVbyApiVersionSimpleOperationData, ThrowOnError>) => (options.client ?? client).get<GetApiVbyApiVersionSimpleOperationResponses, GetApiVbyApiVersionSimpleOperationErrors, ThrowOnError>({ url: '/api/v{api-version}/simple:operation', ...options });\n\nexport const deleteCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<DeleteCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).delete<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const getCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<GetCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).get<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const headCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<HeadCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).head<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const optionsCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<OptionsCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).options<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const patchCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<PatchCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).patch<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const postCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<PostCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).post<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const putCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<PutCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).put<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const deleteFoo = <ThrowOnError extends boolean = false>(options: Options<DeleteFooData3, ThrowOnError>) => (options.client ?? client).delete<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/foo/{foo_param}/bar/{BarParam}', ...options });\n\nexport const callWithDescriptions = <ThrowOnError extends boolean = false>(options?: Options<CallWithDescriptionsData, ThrowOnError>) => (options?.client ?? client).post<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/descriptions', ...options });\n\n/**\n * @deprecated\n */\nexport const deprecatedCall = <ThrowOnError extends boolean = false>(options: Options<DeprecatedCallData, ThrowOnError>) => (options.client ?? client).post<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/parameters/deprecated', ...options });\n\nexport const callWithParameters = <ThrowOnError extends boolean = false>(options: Options<CallWithParametersData, ThrowOnError>) => (options.client ?? client).post<unknown, unknown, ThrowOnError>({\n    url: '/api/v{api-version}/parameters/{parameterPath}',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options.headers\n    }\n});\n\nexport const callWithWeirdParameterNames = <ThrowOnError extends boolean = false>(options: Options<CallWithWeirdParameterNamesData, ThrowOnError>) => (options.client ?? client).post<unknown, unknown, ThrowOnError>({\n    url: '/api/v{api-version}/parameters/{parameter.path.1}/{parameter-path-2}/{PARAMETER-PATH-3}',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options.headers\n    }\n});\n\nexport const getCallWithOptionalParam = <ThrowOnError extends boolean = false>(options: Options<GetCallWithOptionalParamData, ThrowOnError>) => (options.client ?? client).get<unknown, unknown, ThrowOnError>({\n    url: '/api/v{api-version}/parameters',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options.headers\n    }\n});\n\nexport const postCallWithOptionalParam = <ThrowOnError extends boolean = false>(options: Options<PostCallWithOptionalParamData, ThrowOnError>) => (options.client ?? client).post<PostCallWithOptionalParamResponses, unknown, ThrowOnError>({\n    url: '/api/v{api-version}/parameters',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options.headers\n    }\n});\n\nexport const postApiVbyApiVersionRequestBody = <ThrowOnError extends boolean = false>(options?: Options<PostApiVbyApiVersionRequestBodyData, ThrowOnError>) => (options?.client ?? client).post<unknown, unknown, ThrowOnError>({\n    url: '/api/v{api-version}/requestBody',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options?.headers\n    }\n});\n\nexport const postApiVbyApiVersionFormData = <ThrowOnError extends boolean = false>(options?: Options<PostApiVbyApiVersionFormDataData, ThrowOnError>) => (options?.client ?? client).post<unknown, unknown, ThrowOnError>({\n    ...formDataBodySerializer,\n    url: '/api/v{api-version}/formData',\n    ...options,\n    headers: {\n        'Content-Type': null,\n        ...options?.headers\n    }\n});\n\nexport const callWithDefaultParameters = <ThrowOnError extends boolean = false>(options?: Options<CallWithDefaultParametersData, ThrowOnError>) => (options?.client ?? client).get<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/defaults', ...options });\n\nexport const callWithDefaultOptionalParameters = <ThrowOnError extends boolean = false>(options?: Options<CallWithDefaultOptionalParametersData, ThrowOnError>) => (options?.client ?? client).post<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/defaults', ...options });\n\nexport const callToTestOrderOfParams = <ThrowOnError extends boolean = false>(options: Options<CallToTestOrderOfParamsData, ThrowOnError>) => (options.client ?? client).put<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/defaults', ...options });\n\nexport const duplicateName = <ThrowOnError extends boolean = false>(options?: Options<DuplicateNameData, ThrowOnError>) => (options?.client ?? client).delete<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/duplicate', ...options });\n\nexport const duplicateName2 = <ThrowOnError extends boolean = false>(options?: Options<DuplicateName2Data, ThrowOnError>) => (options?.client ?? client).get<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/duplicate', ...options });\n\nexport const duplicateName3 = <ThrowOnError extends boolean = false>(options?: Options<DuplicateName3Data, ThrowOnError>) => (options?.client ?? client).post<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/duplicate', ...options });\n\nexport const duplicateName4 = <ThrowOnError extends boolean = false>(options?: Options<DuplicateName4Data, ThrowOnError>) => (options?.client ?? client).put<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/duplicate', ...options });\n\nexport const callWithNoContentResponse = <ThrowOnError extends boolean = false>(options?: Options<CallWithNoContentResponseData, ThrowOnError>) => (options?.client ?? client).get<CallWithNoContentResponseResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/no-content', ...options });\n\nexport const callWithResponseAndNoContentResponse = <ThrowOnError extends boolean = false>(options?: Options<CallWithResponseAndNoContentResponseData, ThrowOnError>) => (options?.client ?? client).get<CallWithResponseAndNoContentResponseResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/multiple-tags/response-and-no-content', ...options });\n\nexport const dummyA = <ThrowOnError extends boolean = false>(options?: Options<DummyAData, ThrowOnError>) => (options?.client ?? client).get<DummyAResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/multiple-tags/a', ...options });\n\nexport const dummyB = <ThrowOnError extends boolean = false>(options?: Options<DummyBData, ThrowOnError>) => (options?.client ?? client).get<DummyBResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/multiple-tags/b', ...options });\n\nexport const callWithResponse = <ThrowOnError extends boolean = false>(options?: Options<CallWithResponseData, ThrowOnError>) => (options?.client ?? client).get<CallWithResponseResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/response', ...options });\n\nexport const callWithDuplicateResponses = <ThrowOnError extends boolean = false>(options?: Options<CallWithDuplicateResponsesData, ThrowOnError>) => (options?.client ?? client).post<CallWithDuplicateResponsesResponses, CallWithDuplicateResponsesErrors, ThrowOnError>({ url: '/api/v{api-version}/response', ...options });\n\nexport const callWithResponses = <ThrowOnError extends boolean = false>(options?: Options<CallWithResponsesData, ThrowOnError>) => (options?.client ?? client).put<CallWithResponsesResponses, CallWithResponsesErrors, ThrowOnError>({ url: '/api/v{api-version}/response', ...options });\n\nexport const collectionFormat = <ThrowOnError extends boolean = false>(options: Options<CollectionFormatData, ThrowOnError>) => (options.client ?? client).get<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/collectionFormat', ...options });\n\nexport const types = <ThrowOnError extends boolean = false>(options: Options<TypesData, ThrowOnError>) => (options.client ?? client).get<TypesResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/types', ...options });\n\nexport const uploadFile = <ThrowOnError extends boolean = false>(options: Options<UploadFileData, ThrowOnError>) => (options.client ?? client).post<UploadFileResponses, unknown, ThrowOnError>({\n    ...urlSearchParamsBodySerializer,\n    url: '/api/v{api-version}/upload',\n    ...options,\n    headers: {\n        'Content-Type': 'application/x-www-form-urlencoded',\n        ...options.headers\n    }\n});\n\nexport const fileResponse = <ThrowOnError extends boolean = false>(options: Options<FileResponseData, ThrowOnError>) => (options.client ?? client).get<FileResponseResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/file/{id}', ...options });\n\nexport const complexTypes = <ThrowOnError extends boolean = false>(options: Options<ComplexTypesData, ThrowOnError>) => (options.client ?? client).get<ComplexTypesResponses, ComplexTypesErrors, ThrowOnError>({\n    querySerializer: { parameters: { parameterObject: { object: { style: 'form' } } } },\n    url: '/api/v{api-version}/complex',\n    ...options\n});\n\nexport const multipartResponse = <ThrowOnError extends boolean = false>(options?: Options<MultipartResponseData, ThrowOnError>) => (options?.client ?? client).get<MultipartResponseResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/multipart', ...options });\n\nexport const multipartRequest = <ThrowOnError extends boolean = false>(options?: Options<MultipartRequestData, ThrowOnError>) => (options?.client ?? client).post<unknown, unknown, ThrowOnError>({\n    ...formDataBodySerializer,\n    url: '/api/v{api-version}/multipart',\n    ...options,\n    headers: {\n        'Content-Type': null,\n        ...options?.headers\n    }\n});\n\nexport const complexParams = <ThrowOnError extends boolean = false>(options: Options<ComplexParamsData, ThrowOnError>) => (options.client ?? client).put<ComplexParamsResponses, unknown, ThrowOnError>({\n    url: '/api/v{api-version}/complex/{id}',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json-patch+json',\n        ...options.headers\n    }\n});\n\nexport const callWithResultFromHeader = <ThrowOnError extends boolean = false>(options?: Options<CallWithResultFromHeaderData, ThrowOnError>) => (options?.client ?? client).post<CallWithResultFromHeaderResponses, CallWithResultFromHeaderErrors, ThrowOnError>({ url: '/api/v{api-version}/header', ...options });\n\nexport const testErrorCode = <ThrowOnError extends boolean = false>(options: Options<TestErrorCodeData, ThrowOnError>) => (options.client ?? client).post<TestErrorCodeResponses, TestErrorCodeErrors, ThrowOnError>({ url: '/api/v{api-version}/error', ...options });\n\nexport const nonAsciiæøåÆøÅöôêÊ字符串 = <ThrowOnError extends boolean = false>(options: Options<NonAsciiæøåÆøÅöôêÊ字符串Data, ThrowOnError>) => (options.client ?? client).post<NonAsciiæøåÆøÅöôêÊ字符串Responses, unknown, ThrowOnError>({ url: '/api/v{api-version}/non-ascii-æøåÆØÅöôêÊ字符串', ...options });\n\n/**\n * Login User\n */\nexport const putWithFormUrlEncoded = <ThrowOnError extends boolean = false>(options: Options<PutWithFormUrlEncodedData, ThrowOnError>) => (options.client ?? client).put<unknown, unknown, ThrowOnError>({\n    ...urlSearchParamsBodySerializer,\n    url: '/api/v{api-version}/non-ascii-æøåÆØÅöôêÊ字符串',\n    ...options,\n    headers: {\n        'Content-Type': 'application/x-www-form-urlencoded',\n        ...options.headers\n    }\n});\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/angular-query-experimental/fetch/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type ClientOptions = {\n    baseUrl: 'http://localhost:3000/base' | (string & {});\n};\n\n/**\n * Model with number-only name\n */\nexport type _400 = string;\n\n/**\n * External ref to shared model (A)\n */\nexport type ExternalRefA = ExternalSharedModel;\n\n/**\n * External ref to shared model (B)\n */\nexport type ExternalRefB = ExternalSharedModel;\n\n/**\n * Testing multiline comments in string: First line\n * Second line\n *\n * Fourth line\n */\nexport type CamelCaseCommentWithBreaks = number;\n\n/**\n * Testing multiline comments in string: First line\n * Second line\n *\n * Fourth line\n */\nexport type CommentWithBreaks = number;\n\n/**\n * Testing backticks in string: `backticks` and ```multiple backticks``` should work\n */\nexport type CommentWithBackticks = number;\n\n/**\n * Testing backticks and quotes in string: `backticks`, 'quotes', \"double quotes\" and ```multiple backticks``` should work\n */\nexport type CommentWithBackticksAndQuotes = number;\n\n/**\n * Testing slashes in string: \\backwards\\\\\\ and /forwards/// should work\n */\nexport type CommentWithSlashes = number;\n\n/**\n * Testing expression placeholders in string: ${expression} should work\n */\nexport type CommentWithExpressionPlaceholders = number;\n\n/**\n * Testing quotes in string: 'single quote''' and \"double quotes\"\"\" should work\n */\nexport type CommentWithQuotes = number;\n\n/**\n * Testing reserved characters in string: * inline * and ** inline ** should work\n */\nexport type CommentWithReservedCharacters = number;\n\n/**\n * This is a simple number\n */\nexport type SimpleInteger = number;\n\n/**\n * This is a simple boolean\n */\nexport type SimpleBoolean = boolean;\n\n/**\n * This is a simple string\n */\nexport type SimpleString = string;\n\n/**\n * A string with non-ascii (unicode) characters valid in typescript identifiers (æøåÆØÅöÔèÈ字符串)\n */\nexport type NonAsciiStringæøåÆøÅöôêÊ字符串 = string;\n\n/**\n * This is a simple file\n */\nexport type SimpleFile = Blob | File;\n\n/**\n * This is a simple reference\n */\nexport type SimpleReference = ModelWithString;\n\n/**\n * This is a simple string\n */\nexport type SimpleStringWithPattern = string | null;\n\n/**\n * This is a simple enum with strings\n */\nexport type EnumWithStrings = 'Success' | 'Warning' | 'Error' | '\\'Single Quote\\'' | '\"Double Quotes\"' | 'Non-ascii: øæåôöØÆÅÔÖ字符串';\n\nexport type EnumWithReplacedCharacters = '\\'Single Quote\\'' | '\"Double Quotes\"' | 'øæåôöØÆÅÔÖ字符串' | 3.1 | '';\n\n/**\n * This is a simple enum with numbers\n */\nexport type EnumWithNumbers = 1 | 2 | 3 | 1.1 | 1.2 | 1.3 | 100 | 200 | 300 | -100 | -200 | -300 | -1.1 | -1.2 | -1.3;\n\n/**\n * Success=1,Warning=2,Error=3\n */\nexport type EnumFromDescription = number;\n\n/**\n * This is a simple enum with numbers\n */\nexport type EnumWithExtensions = 200 | 400 | 500;\n\nexport type EnumWithXEnumNames = 0 | 1 | 2;\n\n/**\n * This is a simple array with numbers\n */\nexport type ArrayWithNumbers = Array<number>;\n\n/**\n * This is a simple array with booleans\n */\nexport type ArrayWithBooleans = Array<boolean>;\n\n/**\n * This is a simple array with strings\n */\nexport type ArrayWithStrings = Array<string>;\n\n/**\n * This is a simple array with references\n */\nexport type ArrayWithReferences = Array<ModelWithString>;\n\n/**\n * This is a simple array containing an array\n */\nexport type ArrayWithArray = Array<Array<ModelWithString>>;\n\n/**\n * This is a simple array with properties\n */\nexport type ArrayWithProperties = Array<{\n    '16x16'?: CamelCaseCommentWithBreaks;\n    bar?: string;\n}>;\n\n/**\n * This is a simple array with any of properties\n */\nexport type ArrayWithAnyOfProperties = Array<{\n    foo?: string;\n} | {\n    bar?: string;\n}>;\n\nexport type AnyOfAnyAndNull = {\n    data?: unknown | null;\n};\n\n/**\n * This is a simple array with any of properties\n */\nexport type AnyOfArrays = {\n    results?: Array<{\n        foo?: string;\n    } | {\n        bar?: string;\n    }>;\n};\n\n/**\n * This is a string dictionary\n */\nexport type DictionaryWithString = {\n    [key: string]: string;\n};\n\nexport type DictionaryWithPropertiesAndAdditionalProperties = {\n    foo?: number;\n    bar?: boolean;\n    [key: string]: string | number | boolean | undefined;\n};\n\n/**\n * This is a string reference\n */\nexport type DictionaryWithReference = {\n    [key: string]: ModelWithString;\n};\n\n/**\n * This is a complex dictionary\n */\nexport type DictionaryWithArray = {\n    [key: string]: Array<ModelWithString>;\n};\n\n/**\n * This is a string dictionary\n */\nexport type DictionaryWithDictionary = {\n    [key: string]: {\n        [key: string]: string;\n    };\n};\n\n/**\n * This is a complex dictionary\n */\nexport type DictionaryWithProperties = {\n    [key: string]: {\n        foo?: string;\n        bar?: string;\n    };\n};\n\n/**\n * This is a model with one number property\n */\nexport type ModelWithInteger = {\n    /**\n     * This is a simple number property\n     */\n    prop?: number;\n};\n\n/**\n * This is a model with one boolean property\n */\nexport type ModelWithBoolean = {\n    /**\n     * This is a simple boolean property\n     */\n    prop?: boolean;\n};\n\n/**\n * This is a model with one string property\n */\nexport type ModelWithString = {\n    /**\n     * This is a simple string property\n     */\n    prop?: string;\n};\n\n/**\n * This is a model with one string property\n */\nexport type ModelWithStringError = {\n    /**\n     * This is a simple string property\n     */\n    prop?: string;\n};\n\n/**\n * `Comment` or `VoiceComment`. The JSON object for adding voice comments to tickets is different. See [Adding voice comments to tickets](/documentation/ticketing/managing-tickets/adding-voice-comments-to-tickets)\n */\nexport type ModelFromZendesk = string;\n\n/**\n * This is a model with one string property\n */\nexport type ModelWithNullableString = {\n    /**\n     * This is a simple string property\n     */\n    nullableProp1?: string | null;\n    /**\n     * This is a simple string property\n     */\n    nullableRequiredProp1: string | null;\n    /**\n     * This is a simple string property\n     */\n    nullableProp2?: string | null;\n    /**\n     * This is a simple string property\n     */\n    nullableRequiredProp2: string | null;\n    /**\n     * This is a simple enum with strings\n     */\n    'foo_bar-enum'?: 'Success' | 'Warning' | 'Error' | 'ØÆÅ字符串';\n};\n\n/**\n * This is a model with one enum\n */\nexport type ModelWithEnum = {\n    /**\n     * This is a simple enum with strings\n     */\n    'foo_bar-enum'?: 'Success' | 'Warning' | 'Error' | 'ØÆÅ字符串';\n    /**\n     * These are the HTTP error code enums\n     */\n    statusCode?: '100' | '200 FOO' | '300 FOO_BAR' | '400 foo-bar' | '500 foo.bar' | '600 foo&bar';\n    /**\n     * Simple boolean enum\n     */\n    bool?: true;\n};\n\n/**\n * This is a model with one enum with escaped name\n */\nexport type ModelWithEnumWithHyphen = {\n    /**\n     * Foo-Bar-Baz-Qux\n     */\n    'foo-bar-baz-qux'?: '3.0';\n};\n\n/**\n * This is a model with one enum\n */\nexport type ModelWithEnumFromDescription = {\n    /**\n     * Success=1,Warning=2,Error=3\n     */\n    test?: number;\n};\n\n/**\n * This is a model with nested enums\n */\nexport type ModelWithNestedEnums = {\n    dictionaryWithEnum?: {\n        [key: string]: 'Success' | 'Warning' | 'Error';\n    };\n    dictionaryWithEnumFromDescription?: {\n        [key: string]: number;\n    };\n    arrayWithEnum?: Array<'Success' | 'Warning' | 'Error'>;\n    arrayWithDescription?: Array<number>;\n    /**\n     * This is a simple enum with strings\n     */\n    'foo_bar-enum'?: 'Success' | 'Warning' | 'Error' | 'ØÆÅ字符串';\n};\n\n/**\n * This is a model with one property containing a reference\n */\nexport type ModelWithReference = {\n    prop?: ModelWithProperties;\n};\n\n/**\n * This is a model with one property containing an array\n */\nexport type ModelWithArrayReadOnlyAndWriteOnly = {\n    prop?: Array<ModelWithReadOnlyAndWriteOnly>;\n    propWithFile?: Array<Blob | File>;\n    propWithNumber?: Array<number>;\n};\n\n/**\n * This is a model with one property containing an array\n */\nexport type ModelWithArray = {\n    prop?: Array<ModelWithString>;\n    propWithFile?: Array<Blob | File>;\n    propWithNumber?: Array<number>;\n};\n\n/**\n * This is a model with one property containing a dictionary\n */\nexport type ModelWithDictionary = {\n    prop?: {\n        [key: string]: string;\n    };\n};\n\n/**\n * This is a deprecated model with a deprecated property\n *\n * @deprecated\n */\nexport type DeprecatedModel = {\n    /**\n     * This is a deprecated property\n     *\n     * @deprecated\n     */\n    prop?: string;\n};\n\n/**\n * This is a model with one property containing a circular reference\n */\nexport type ModelWithCircularReference = {\n    prop?: ModelWithCircularReference;\n};\n\n/**\n * This is a model with one property with a 'one of' relationship\n */\nexport type CompositionWithOneOf = {\n    propA?: ModelWithString | ModelWithEnum | ModelWithArray | ModelWithDictionary;\n};\n\n/**\n * This is a model with one property with a 'one of' relationship where the options are not $ref\n */\nexport type CompositionWithOneOfAnonymous = {\n    propA?: {\n        propA?: string;\n    } | string | number;\n};\n\n/**\n * Circle\n */\nexport type ModelCircle = {\n    kind: string;\n    radius?: number;\n};\n\n/**\n * Square\n */\nexport type ModelSquare = {\n    kind: string;\n    sideLength?: number;\n};\n\n/**\n * This is a model with one property with a 'one of' relationship where the options are not $ref\n */\nexport type CompositionWithOneOfDiscriminator = ({\n    kind: 'circle';\n} & ModelCircle) | ({\n    kind: 'square';\n} & ModelSquare);\n\n/**\n * This is a model with one property with a 'any of' relationship\n */\nexport type CompositionWithAnyOf = {\n    propA?: ModelWithString | ModelWithEnum | ModelWithArray | ModelWithDictionary;\n};\n\n/**\n * This is a model with one property with a 'any of' relationship where the options are not $ref\n */\nexport type CompositionWithAnyOfAnonymous = {\n    propA?: {\n        propA?: string;\n    } | string | number;\n};\n\n/**\n * This is a model with nested 'any of' property with a type null\n */\nexport type CompositionWithNestedAnyAndTypeNull = {\n    propA?: Array<ModelWithDictionary | null> | Array<ModelWithArray | null>;\n};\n\nexport type _3eNum1Период = 'Bird' | 'Dog';\n\nexport type ConstValue = 'ConstValue';\n\n/**\n * This is a model with one property with a 'any of' relationship where the options are not $ref\n */\nexport type CompositionWithNestedAnyOfAndNull = {\n    /**\n     * Scopes\n     */\n    propA?: Array<_3eNum1Период | ConstValue> | null;\n};\n\n/**\n * This is a model with one property with a 'one of' relationship\n */\nexport type CompositionWithOneOfAndNullable = {\n    propA?: {\n        boolean?: boolean;\n    } | ModelWithEnum | ModelWithArray | ModelWithDictionary | null;\n};\n\n/**\n * This is a model that contains a simple dictionary within composition\n */\nexport type CompositionWithOneOfAndSimpleDictionary = {\n    propA?: boolean | {\n        [key: string]: number;\n    };\n};\n\n/**\n * This is a model that contains a dictionary of simple arrays within composition\n */\nexport type CompositionWithOneOfAndSimpleArrayDictionary = {\n    propA?: boolean | {\n        [key: string]: Array<boolean>;\n    };\n};\n\n/**\n * This is a model that contains a dictionary of complex arrays (composited) within composition\n */\nexport type CompositionWithOneOfAndComplexArrayDictionary = {\n    propA?: boolean | {\n        [key: string]: Array<number | string>;\n    };\n};\n\n/**\n * This is a model with one property with a 'all of' relationship\n */\nexport type CompositionWithAllOfAndNullable = {\n    propA?: ({\n        boolean?: boolean;\n    } & ModelWithEnum & ModelWithArray & ModelWithDictionary) | null;\n};\n\n/**\n * This is a model with one property with a 'any of' relationship\n */\nexport type CompositionWithAnyOfAndNullable = {\n    propA?: {\n        boolean?: boolean;\n    } | ModelWithEnum | ModelWithArray | ModelWithDictionary | null;\n};\n\n/**\n * This is a base model with two simple optional properties\n */\nexport type CompositionBaseModel = {\n    firstName?: string;\n    lastname?: string;\n};\n\n/**\n * This is a model that extends the base model\n */\nexport type CompositionExtendedModel = CompositionBaseModel & {\n    age: number;\n    firstName: string;\n    lastname: string;\n};\n\n/**\n * This is a model with one nested property\n */\nexport type ModelWithProperties = {\n    required: string;\n    readonly requiredAndReadOnly: string;\n    requiredAndNullable: string | null;\n    string?: string;\n    number?: number;\n    boolean?: boolean;\n    reference?: ModelWithString;\n    'property with space'?: string;\n    default?: string;\n    try?: string;\n    readonly '@namespace.string'?: string;\n    readonly '@namespace.integer'?: number;\n};\n\n/**\n * This is a model with one nested property\n */\nexport type ModelWithNestedProperties = {\n    readonly first: {\n        readonly second: {\n            readonly third: string | null;\n        } | null;\n    } | null;\n};\n\n/**\n * This is a model with duplicated properties\n */\nexport type ModelWithDuplicateProperties = {\n    prop?: ModelWithString;\n};\n\n/**\n * This is a model with ordered properties\n */\nexport type ModelWithOrderedProperties = {\n    zebra?: string;\n    apple?: string;\n    hawaii?: string;\n};\n\n/**\n * This is a model with duplicated imports\n */\nexport type ModelWithDuplicateImports = {\n    propA?: ModelWithString;\n    propB?: ModelWithString;\n    propC?: ModelWithString;\n};\n\n/**\n * This is a model that extends another model\n */\nexport type ModelThatExtends = ModelWithString & {\n    propExtendsA?: string;\n    propExtendsB?: ModelWithString;\n};\n\n/**\n * This is a model that extends another model\n */\nexport type ModelThatExtendsExtends = ModelWithString & ModelThatExtends & {\n    propExtendsC?: string;\n    propExtendsD?: ModelWithString;\n};\n\n/**\n * This is a model that contains a some patterns\n */\nexport type ModelWithPattern = {\n    key: string;\n    name: string;\n    readonly enabled?: boolean;\n    readonly modified?: string;\n    id?: string;\n    text?: string;\n    patternWithSingleQuotes?: string;\n    patternWithNewline?: string;\n    patternWithBacktick?: string;\n    patternWithUnicode?: string;\n};\n\nexport type File = {\n    /**\n     * Id\n     */\n    readonly id?: string;\n    /**\n     * Updated at\n     */\n    readonly updated_at?: string;\n    /**\n     * Created at\n     */\n    readonly created_at?: string;\n    /**\n     * Mime\n     */\n    mime: string;\n    /**\n     * File\n     */\n    readonly file?: string;\n};\n\nexport type Default = {\n    name?: string;\n};\n\nexport type Pageable = {\n    page?: number;\n    size?: number;\n    sort?: Array<string>;\n};\n\n/**\n * This is a free-form object without additionalProperties.\n */\nexport type FreeFormObjectWithoutAdditionalProperties = {\n    [key: string]: unknown;\n};\n\n/**\n * This is a free-form object with additionalProperties: true.\n */\nexport type FreeFormObjectWithAdditionalPropertiesEqTrue = {\n    [key: string]: unknown;\n};\n\n/**\n * This is a free-form object with additionalProperties: {}.\n */\nexport type FreeFormObjectWithAdditionalPropertiesEqEmptyObject = {\n    [key: string]: unknown;\n};\n\nexport type ModelWithConst = {\n    String?: 'String';\n    number?: 0;\n    null?: null;\n    withType?: 'Some string';\n};\n\n/**\n * This is a model with one property and additionalProperties: true\n */\nexport type ModelWithAdditionalPropertiesEqTrue = {\n    /**\n     * This is a simple string property\n     */\n    prop?: string;\n    [key: string]: unknown;\n};\n\nexport type NestedAnyOfArraysNullable = {\n    nullableArray?: Array<string | boolean> | null;\n};\n\nexport type CompositionWithOneOfAndProperties = ({\n    foo: SimpleParameter;\n} | {\n    bar: NonAsciiStringæøåÆøÅöôêÊ字符串;\n}) & {\n    baz: number | null;\n    qux: number;\n};\n\n/**\n * An object that can be null\n */\nexport type NullableObject = {\n    foo?: string;\n} | null;\n\n/**\n * Some % character\n */\nexport type CharactersInDescription = string;\n\nexport type ModelWithNullableObject = {\n    data?: NullableObject;\n};\n\n/**\n * An object with additional properties that can be null (anyOf ref + null)\n */\nexport type ModelWithAdditionalPropertiesRef = {\n    [key: string]: NullableObject | null;\n};\n\nexport type ModelWithOneOfEnum = {\n    foo: 'Bar';\n} | {\n    foo: 'Baz';\n} | {\n    foo: 'Qux';\n} | {\n    content: string;\n    foo: 'Quux';\n} | {\n    content: [\n        string,\n        string\n    ];\n    foo: 'Corge';\n};\n\nexport type ModelWithNestedArrayEnumsDataFoo = 'foo' | 'bar';\n\nexport type ModelWithNestedArrayEnumsDataBar = 'baz' | 'qux';\n\nexport type ModelWithNestedArrayEnumsData = {\n    foo?: Array<ModelWithNestedArrayEnumsDataFoo>;\n    bar?: Array<ModelWithNestedArrayEnumsDataBar>;\n};\n\nexport type ModelWithNestedArrayEnums = {\n    array_strings?: Array<string>;\n    data?: ModelWithNestedArrayEnumsData;\n};\n\nexport type ModelWithNestedCompositionEnums = {\n    foo?: ModelWithNestedArrayEnumsDataFoo;\n};\n\nexport type ModelWithReadOnlyAndWriteOnly = {\n    foo: string;\n    readonly bar: string;\n};\n\nexport type ModelWithConstantSizeArray = [\n    number,\n    number\n];\n\nexport type ModelWithAnyOfConstantSizeArray = [\n    number | string,\n    number | string,\n    number | string\n];\n\nexport type ModelWithPrefixItemsConstantSizeArray = [\n    ModelWithInteger,\n    number | string,\n    string\n];\n\nexport type ModelWithAnyOfConstantSizeArrayNullable = [\n    number | null | string,\n    number | null | string,\n    number | null | string\n];\n\nexport type ModelWithAnyOfConstantSizeArrayWithNSizeAndOptions = [\n    number | Import,\n    number | Import\n];\n\nexport type ModelWithAnyOfConstantSizeArrayAndIntersect = [\n    number & string,\n    number & string\n];\n\nexport type ModelWithNumericEnumUnion = {\n    /**\n     * Период\n     */\n    value?: -10 | -1 | 0 | 1 | 3 | 6 | 12;\n};\n\n/**\n * Some description with `back ticks`\n */\nexport type ModelWithBackticksInDescription = {\n    /**\n     * The template `that` should be used for parsing and importing the contents of the CSV file.\n     *\n     * <br/><p>There is one placeholder currently supported:<ul>     <li><b>${x}</b> - refers to the n-th column in the CSV file, e.g. ${1}, ${2}, ...)</li></ul><p>Example of a correct JSON template:</p>\n     * <pre>\n     * [\n     * {\n     * \"resourceType\": \"Asset\",\n     * \"identifier\": {\n     * \"name\": \"${1}\",\n     * \"domain\": {\n     * \"name\": \"${2}\",\n     * \"community\": {\n     * \"name\": \"Some Community\"\n     * }\n     * }\n     * },\n     * \"attributes\" : {\n     * \"00000000-0000-0000-0000-000000003115\" : [ {\n     * \"value\" : \"${3}\"\n     * } ],\n     * \"00000000-0000-0000-0000-000000000222\" : [ {\n     * \"value\" : \"${4}\"\n     * } ]\n     * }\n     * }\n     * ]\n     * </pre>\n     */\n    template?: string;\n};\n\nexport type ModelWithOneOfAndProperties = (SimpleParameter | NonAsciiStringæøåÆøÅöôêÊ字符串) & {\n    baz: number | null;\n    qux: number;\n};\n\n/**\n * Model used to test deduplication strategy (unused)\n */\nexport type ParameterSimpleParameterUnused = string;\n\n/**\n * Model used to test deduplication strategy\n */\nexport type PostServiceWithEmptyTagResponse = string;\n\n/**\n * Model used to test deduplication strategy\n */\nexport type PostServiceWithEmptyTagResponse2 = string;\n\n/**\n * Model used to test deduplication strategy\n */\nexport type DeleteFooData = string;\n\n/**\n * Model used to test deduplication strategy\n */\nexport type DeleteFooData2 = string;\n\n/**\n * Model with restricted keyword name\n */\nexport type Import = string;\n\nexport type SchemaWithFormRestrictedKeys = {\n    description?: string;\n    'x-enum-descriptions'?: string;\n    'x-enum-varnames'?: string;\n    'x-enumNames'?: string;\n    title?: string;\n    object?: {\n        description?: string;\n        'x-enum-descriptions'?: string;\n        'x-enum-varnames'?: string;\n        'x-enumNames'?: string;\n        title?: string;\n    };\n    array?: Array<{\n        description?: string;\n        'x-enum-descriptions'?: string;\n        'x-enum-varnames'?: string;\n        'x-enumNames'?: string;\n        title?: string;\n    }>;\n};\n\n/**\n * This schema was giving PascalCase transformations a hard time\n */\nexport type IoK8sApimachineryPkgApisMetaV1DeleteOptions = {\n    /**\n     * Must be fulfilled before a deletion is carried out. If not possible, a 409 Conflict status will be returned.\n     */\n    preconditions?: IoK8sApimachineryPkgApisMetaV1Preconditions;\n};\n\n/**\n * This schema was giving PascalCase transformations a hard time\n */\nexport type IoK8sApimachineryPkgApisMetaV1Preconditions = {\n    /**\n     * Specifies the target ResourceVersion\n     */\n    resourceVersion?: string;\n    /**\n     * Specifies the target UID.\n     */\n    uid?: string;\n};\n\nexport type AdditionalPropertiesUnknownIssue = {\n    [key: string]: string | number;\n};\n\nexport type AdditionalPropertiesUnknownIssue2 = {\n    [key: string]: string | number;\n};\n\nexport type AdditionalPropertiesUnknownIssue3 = string & {\n    entries: {\n        [key: string]: AdditionalPropertiesUnknownIssue;\n    };\n};\n\nexport type AdditionalPropertiesIntegerIssue = {\n    value: number;\n    [key: string]: number;\n};\n\nexport type OneOfAllOfIssue = ((ConstValue | GenericSchemaDuplicateIssue1SystemBoolean) & _3eNum1Период) | GenericSchemaDuplicateIssue1SystemString;\n\nexport type GenericSchemaDuplicateIssue1SystemBoolean = {\n    item?: boolean;\n    error?: string | null;\n    readonly hasError?: boolean;\n    data?: {\n        [key: string]: never;\n    };\n};\n\nexport type GenericSchemaDuplicateIssue1SystemString = {\n    item?: string | null;\n    error?: string | null;\n    readonly hasError?: boolean;\n};\n\nexport type ExternalSharedModel = {\n    id: string;\n    name?: string;\n};\n\n/**\n * This is a model with one property containing a reference\n */\nexport type ModelWithReferenceWritable = {\n    prop?: ModelWithPropertiesWritable;\n};\n\n/**\n * This is a model with one property containing an array\n */\nexport type ModelWithArrayReadOnlyAndWriteOnlyWritable = {\n    prop?: Array<ModelWithReadOnlyAndWriteOnlyWritable>;\n    propWithFile?: Array<Blob | File>;\n    propWithNumber?: Array<number>;\n};\n\n/**\n * This is a model with one nested property\n */\nexport type ModelWithPropertiesWritable = {\n    required: string;\n    requiredAndNullable: string | null;\n    string?: string;\n    number?: number;\n    boolean?: boolean;\n    reference?: ModelWithString;\n    'property with space'?: string;\n    default?: string;\n    try?: string;\n};\n\n/**\n * This is a model that contains a some patterns\n */\nexport type ModelWithPatternWritable = {\n    key: string;\n    name: string;\n    id?: string;\n    text?: string;\n    patternWithSingleQuotes?: string;\n    patternWithNewline?: string;\n    patternWithBacktick?: string;\n    patternWithUnicode?: string;\n};\n\nexport type FileWritable = {\n    /**\n     * Mime\n     */\n    mime: string;\n};\n\nexport type ModelWithReadOnlyAndWriteOnlyWritable = {\n    foo: string;\n    baz: string;\n};\n\nexport type ModelWithAnyOfConstantSizeArrayWithNSizeAndOptionsWritable = [\n    number | Import,\n    number | Import\n];\n\nexport type AdditionalPropertiesUnknownIssueWritable = {\n    [key: string]: string | number;\n};\n\nexport type OneOfAllOfIssueWritable = ((ConstValue | GenericSchemaDuplicateIssue1SystemBoolean) & _3eNum1Период) | GenericSchemaDuplicateIssue1SystemString;\n\nexport type GenericSchemaDuplicateIssue1SystemBooleanWritable = {\n    item?: boolean;\n    error?: string | null;\n    data?: {\n        [key: string]: never;\n    };\n};\n\nexport type GenericSchemaDuplicateIssue1SystemStringWritable = {\n    item?: string | null;\n    error?: string | null;\n};\n\n/**\n * This is a reusable parameter\n */\nexport type SimpleParameter = string;\n\n/**\n * Parameter with illegal characters\n */\nexport type XFooBar = ModelWithString;\n\n/**\n * A reusable request body\n */\nexport type SimpleRequestBody = ModelWithString;\n\n/**\n * A reusable request body\n */\nexport type SimpleFormData = ModelWithString;\n\nexport type ExportData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no+tag';\n};\n\nexport type PatchApiVbyApiVersionNoTagData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no+tag';\n};\n\nexport type PatchApiVbyApiVersionNoTagResponses = {\n    /**\n     * OK\n     */\n    default: unknown;\n};\n\nexport type ImportData = {\n    body: ModelWithReadOnlyAndWriteOnlyWritable | ModelWithArrayReadOnlyAndWriteOnlyWritable;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no+tag';\n};\n\nexport type ImportResponses = {\n    /**\n     * Success\n     */\n    200: ModelFromZendesk;\n    /**\n     * Default success response\n     */\n    default: ModelWithReadOnlyAndWriteOnly;\n};\n\nexport type ImportResponse = ImportResponses[keyof ImportResponses];\n\nexport type FooWowData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no+tag';\n};\n\nexport type FooWowResponses = {\n    /**\n     * OK\n     */\n    default: unknown;\n};\n\nexport type ApiVVersionODataControllerCountData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple/$count';\n};\n\nexport type ApiVVersionODataControllerCountResponses = {\n    /**\n     * Success\n     */\n    200: ModelFromZendesk;\n};\n\nexport type ApiVVersionODataControllerCountResponse = ApiVVersionODataControllerCountResponses[keyof ApiVVersionODataControllerCountResponses];\n\nexport type GetApiVbyApiVersionSimpleOperationData = {\n    body?: never;\n    path: {\n        /**\n         * foo in method\n         */\n        foo_param: string;\n    };\n    query?: never;\n    url: '/api/v{api-version}/simple:operation';\n};\n\nexport type GetApiVbyApiVersionSimpleOperationErrors = {\n    /**\n     * Default error response\n     */\n    default: ModelWithBoolean;\n};\n\nexport type GetApiVbyApiVersionSimpleOperationError = GetApiVbyApiVersionSimpleOperationErrors[keyof GetApiVbyApiVersionSimpleOperationErrors];\n\nexport type GetApiVbyApiVersionSimpleOperationResponses = {\n    /**\n     * Response is a simple number\n     */\n    200: number;\n};\n\nexport type GetApiVbyApiVersionSimpleOperationResponse = GetApiVbyApiVersionSimpleOperationResponses[keyof GetApiVbyApiVersionSimpleOperationResponses];\n\nexport type DeleteCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type GetCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type HeadCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type OptionsCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type PatchCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type PostCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type PutCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type DeleteFooData3 = {\n    body?: never;\n    headers: {\n        /**\n         * Parameter with illegal characters\n         */\n        'x-Foo-Bar': ModelWithString;\n    };\n    path: {\n        /**\n         * foo in method\n         */\n        foo_param: string;\n        /**\n         * bar in method\n         */\n        BarParam: string;\n    };\n    query?: never;\n    url: '/api/v{api-version}/foo/{foo_param}/bar/{BarParam}';\n};\n\nexport type CallWithDescriptionsData = {\n    body?: never;\n    path?: never;\n    query?: {\n        /**\n         * Testing multiline comments in string: First line\n         * Second line\n         *\n         * Fourth line\n         */\n        parameterWithBreaks?: string;\n        /**\n         * Testing backticks in string: `backticks` and ```multiple backticks``` should work\n         */\n        parameterWithBackticks?: string;\n        /**\n         * Testing slashes in string: \\backwards\\\\\\ and /forwards/// should work\n         */\n        parameterWithSlashes?: string;\n        /**\n         * Testing expression placeholders in string: ${expression} should work\n         */\n        parameterWithExpressionPlaceholders?: string;\n        /**\n         * Testing quotes in string: 'single quote''' and \"double quotes\"\"\" should work\n         */\n        parameterWithQuotes?: string;\n        /**\n         * Testing reserved characters in string: * inline * and ** inline ** should work\n         */\n        parameterWithReservedCharacters?: string;\n    };\n    url: '/api/v{api-version}/descriptions';\n};\n\nexport type DeprecatedCallData = {\n    body?: never;\n    headers: {\n        /**\n         * This parameter is deprecated\n         *\n         * @deprecated\n         */\n        parameter: DeprecatedModel | null;\n    };\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/parameters/deprecated';\n};\n\nexport type CallWithParametersData = {\n    /**\n     * This is the parameter that goes into the body\n     */\n    body: {\n        [key: string]: unknown;\n    } | null;\n    headers: {\n        /**\n         * This is the parameter that goes into the header\n         */\n        parameterHeader: string | null;\n    };\n    path: {\n        /**\n         * This is the parameter that goes into the path\n         */\n        parameterPath: string | null;\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string | null;\n    };\n    query: {\n        foo_ref_enum?: ModelWithNestedArrayEnumsDataFoo;\n        foo_all_of_enum: ModelWithNestedArrayEnumsDataFoo;\n        /**\n         * This is the parameter that goes into the query params\n         */\n        cursor: string | null;\n    };\n    url: '/api/v{api-version}/parameters/{parameterPath}';\n};\n\nexport type CallWithWeirdParameterNamesData = {\n    /**\n     * This is the parameter that goes into the body\n     */\n    body: ModelWithString | null;\n    headers: {\n        /**\n         * This is the parameter that goes into the request header\n         */\n        'parameter.header': string | null;\n    };\n    path: {\n        /**\n         * This is the parameter that goes into the path\n         */\n        'parameter.path.1'?: string;\n        /**\n         * This is the parameter that goes into the path\n         */\n        'parameter-path-2'?: string;\n        /**\n         * This is the parameter that goes into the path\n         */\n        'PARAMETER-PATH-3'?: string;\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string | null;\n    };\n    query: {\n        /**\n         * This is the parameter with a reserved keyword\n         */\n        default?: string;\n        /**\n         * This is the parameter that goes into the request query params\n         */\n        'parameter-query': string | null;\n    };\n    url: '/api/v{api-version}/parameters/{parameter.path.1}/{parameter-path-2}/{PARAMETER-PATH-3}';\n};\n\nexport type GetCallWithOptionalParamData = {\n    /**\n     * This is a required parameter\n     */\n    body: ModelWithOneOfEnum;\n    path?: never;\n    query?: {\n        /**\n         * This is an optional parameter\n         */\n        page?: number;\n    };\n    url: '/api/v{api-version}/parameters';\n};\n\nexport type PostCallWithOptionalParamData = {\n    /**\n     * This is an optional parameter\n     */\n    body?: {\n        offset?: number | null;\n    };\n    path?: never;\n    query: {\n        /**\n         * This is a required parameter\n         */\n        parameter: Pageable;\n    };\n    url: '/api/v{api-version}/parameters';\n};\n\nexport type PostCallWithOptionalParamResponses = {\n    /**\n     * Response is a simple number\n     */\n    200: number;\n    /**\n     * Success\n     */\n    204: void;\n};\n\nexport type PostCallWithOptionalParamResponse = PostCallWithOptionalParamResponses[keyof PostCallWithOptionalParamResponses];\n\nexport type PostApiVbyApiVersionRequestBodyData = {\n    /**\n     * A reusable request body\n     */\n    body?: SimpleRequestBody;\n    path?: never;\n    query?: {\n        /**\n         * This is a reusable parameter\n         */\n        parameter?: string;\n    };\n    url: '/api/v{api-version}/requestBody';\n};\n\nexport type PostApiVbyApiVersionFormDataData = {\n    /**\n     * A reusable request body\n     */\n    body?: SimpleFormData;\n    path?: never;\n    query?: {\n        /**\n         * This is a reusable parameter\n         */\n        parameter?: string;\n    };\n    url: '/api/v{api-version}/formData';\n};\n\nexport type CallWithDefaultParametersData = {\n    body?: never;\n    path?: never;\n    query?: {\n        /**\n         * This is a simple string with default value\n         */\n        parameterString?: string | null;\n        /**\n         * This is a simple number with default value\n         */\n        parameterNumber?: number | null;\n        /**\n         * This is a simple boolean with default value\n         */\n        parameterBoolean?: boolean | null;\n        /**\n         * This is a simple enum with default value\n         */\n        parameterEnum?: 'Success' | 'Warning' | 'Error';\n        /**\n         * This is a simple model with default value\n         */\n        parameterModel?: ModelWithString | null;\n    };\n    url: '/api/v{api-version}/defaults';\n};\n\nexport type CallWithDefaultOptionalParametersData = {\n    body?: never;\n    path?: never;\n    query?: {\n        /**\n         * This is a simple string that is optional with default value\n         */\n        parameterString?: string;\n        /**\n         * This is a simple number that is optional with default value\n         */\n        parameterNumber?: number;\n        /**\n         * This is a simple boolean that is optional with default value\n         */\n        parameterBoolean?: boolean;\n        /**\n         * This is a simple enum that is optional with default value\n         */\n        parameterEnum?: 'Success' | 'Warning' | 'Error';\n        /**\n         * This is a simple model that is optional with default value\n         */\n        parameterModel?: ModelWithString;\n    };\n    url: '/api/v{api-version}/defaults';\n};\n\nexport type CallToTestOrderOfParamsData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * This is a optional string with default\n         */\n        parameterOptionalStringWithDefault?: string;\n        /**\n         * This is a optional string with empty default\n         */\n        parameterOptionalStringWithEmptyDefault?: string;\n        /**\n         * This is a optional string with no default\n         */\n        parameterOptionalStringWithNoDefault?: string;\n        /**\n         * This is a string with default\n         */\n        parameterStringWithDefault: string;\n        /**\n         * This is a string with empty default\n         */\n        parameterStringWithEmptyDefault: string;\n        /**\n         * This is a string with no default\n         */\n        parameterStringWithNoDefault: string;\n        /**\n         * This is a string that can be null with no default\n         */\n        parameterStringNullableWithNoDefault?: string | null;\n        /**\n         * This is a string that can be null with default\n         */\n        parameterStringNullableWithDefault?: string | null;\n    };\n    url: '/api/v{api-version}/defaults';\n};\n\nexport type DuplicateNameData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/duplicate';\n};\n\nexport type DuplicateName2Data = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/duplicate';\n};\n\nexport type DuplicateName3Data = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/duplicate';\n};\n\nexport type DuplicateName4Data = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/duplicate';\n};\n\nexport type CallWithNoContentResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no-content';\n};\n\nexport type CallWithNoContentResponseResponses = {\n    /**\n     * Success\n     */\n    204: void;\n};\n\nexport type CallWithNoContentResponseResponse = CallWithNoContentResponseResponses[keyof CallWithNoContentResponseResponses];\n\nexport type CallWithResponseAndNoContentResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multiple-tags/response-and-no-content';\n};\n\nexport type CallWithResponseAndNoContentResponseResponses = {\n    /**\n     * Response is a simple number\n     */\n    200: number;\n    /**\n     * Success\n     */\n    204: void;\n};\n\nexport type CallWithResponseAndNoContentResponseResponse = CallWithResponseAndNoContentResponseResponses[keyof CallWithResponseAndNoContentResponseResponses];\n\nexport type DummyAData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multiple-tags/a';\n};\n\nexport type DummyAResponses = {\n    200: _400;\n};\n\nexport type DummyAResponse = DummyAResponses[keyof DummyAResponses];\n\nexport type DummyBData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multiple-tags/b';\n};\n\nexport type DummyBResponses = {\n    /**\n     * Success\n     */\n    204: void;\n};\n\nexport type DummyBResponse = DummyBResponses[keyof DummyBResponses];\n\nexport type CallWithResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/response';\n};\n\nexport type CallWithResponseResponses = {\n    default: Import;\n};\n\nexport type CallWithResponseResponse = CallWithResponseResponses[keyof CallWithResponseResponses];\n\nexport type CallWithDuplicateResponsesData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/response';\n};\n\nexport type CallWithDuplicateResponsesErrors = {\n    /**\n     * Message for 500 error\n     */\n    500: ModelWithStringError;\n    /**\n     * Message for 501 error\n     */\n    501: ModelWithStringError;\n    /**\n     * Message for 502 error\n     */\n    502: ModelWithStringError;\n    /**\n     * Message for 4XX errors\n     */\n    '4XX': DictionaryWithArray;\n    /**\n     * Default error response\n     */\n    default: ModelWithBoolean;\n};\n\nexport type CallWithDuplicateResponsesError = CallWithDuplicateResponsesErrors[keyof CallWithDuplicateResponsesErrors];\n\nexport type CallWithDuplicateResponsesResponses = {\n    /**\n     * Message for 200 response\n     */\n    200: ModelWithBoolean & ModelWithInteger;\n    /**\n     * Message for 201 response\n     */\n    201: ModelWithString;\n    /**\n     * Message for 202 response\n     */\n    202: ModelWithString;\n};\n\nexport type CallWithDuplicateResponsesResponse = CallWithDuplicateResponsesResponses[keyof CallWithDuplicateResponsesResponses];\n\nexport type CallWithResponsesData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/response';\n};\n\nexport type CallWithResponsesErrors = {\n    /**\n     * Message for 500 error\n     */\n    500: ModelWithStringError;\n    /**\n     * Message for 501 error\n     */\n    501: ModelWithStringError;\n    /**\n     * Message for 502 error\n     */\n    502: ModelWithStringError;\n    /**\n     * Message for default response\n     */\n    default: ModelWithStringError;\n};\n\nexport type CallWithResponsesError = CallWithResponsesErrors[keyof CallWithResponsesErrors];\n\nexport type CallWithResponsesResponses = {\n    /**\n     * Message for 200 response\n     */\n    200: {\n        readonly '@namespace.string'?: string;\n        readonly '@namespace.integer'?: number;\n        readonly value?: Array<ModelWithString>;\n    };\n    /**\n     * Message for 201 response\n     */\n    201: ModelThatExtends;\n    /**\n     * Message for 202 response\n     */\n    202: ModelThatExtendsExtends;\n};\n\nexport type CallWithResponsesResponse = CallWithResponsesResponses[keyof CallWithResponsesResponses];\n\nexport type CollectionFormatData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * This is an array parameter that is sent as csv format (comma-separated values)\n         */\n        parameterArrayCSV: Array<string> | null;\n        /**\n         * This is an array parameter that is sent as ssv format (space-separated values)\n         */\n        parameterArraySSV: Array<string> | null;\n        /**\n         * This is an array parameter that is sent as tsv format (tab-separated values)\n         */\n        parameterArrayTSV: Array<string> | null;\n        /**\n         * This is an array parameter that is sent as pipes format (pipe-separated values)\n         */\n        parameterArrayPipes: Array<string> | null;\n        /**\n         * This is an array parameter that is sent as multi format (multiple parameter instances)\n         */\n        parameterArrayMulti: Array<string> | null;\n    };\n    url: '/api/v{api-version}/collectionFormat';\n};\n\nexport type TypesData = {\n    body?: never;\n    path?: {\n        /**\n         * This is a number parameter\n         */\n        id?: number;\n    };\n    query: {\n        /**\n         * This is a number parameter\n         */\n        parameterNumber: number;\n        /**\n         * This is a string parameter\n         */\n        parameterString: string | null;\n        /**\n         * This is a boolean parameter\n         */\n        parameterBoolean: boolean | null;\n        /**\n         * This is an object parameter\n         */\n        parameterObject: {\n            [key: string]: unknown;\n        } | null;\n        /**\n         * This is an array parameter\n         */\n        parameterArray: Array<string> | null;\n        /**\n         * This is a dictionary parameter\n         */\n        parameterDictionary: {\n            [key: string]: unknown;\n        } | null;\n        /**\n         * This is an enum parameter\n         */\n        parameterEnum: 'Success' | 'Warning' | 'Error' | null;\n    };\n    url: '/api/v{api-version}/types';\n};\n\nexport type TypesResponses = {\n    /**\n     * Response is a simple number\n     */\n    200: number;\n    /**\n     * Response is a simple string\n     */\n    201: string;\n    /**\n     * Response is a simple boolean\n     */\n    202: boolean;\n    /**\n     * Response is a simple object\n     */\n    203: {\n        [key: string]: unknown;\n    };\n};\n\nexport type TypesResponse = TypesResponses[keyof TypesResponses];\n\nexport type UploadFileData = {\n    body: Blob | File;\n    path: {\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string | null;\n    };\n    query?: never;\n    url: '/api/v{api-version}/upload';\n};\n\nexport type UploadFileResponses = {\n    200: boolean;\n};\n\nexport type UploadFileResponse = UploadFileResponses[keyof UploadFileResponses];\n\nexport type FileResponseData = {\n    body?: never;\n    path: {\n        id: string;\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string;\n    };\n    query?: never;\n    url: '/api/v{api-version}/file/{id}';\n};\n\nexport type FileResponseResponses = {\n    /**\n     * Success\n     */\n    200: Blob | File;\n};\n\nexport type FileResponseResponse = FileResponseResponses[keyof FileResponseResponses];\n\nexport type ComplexTypesData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * Parameter containing object\n         */\n        parameterObject: {\n            first?: {\n                second?: {\n                    third?: string;\n                };\n            };\n        };\n        /**\n         * Parameter containing reference\n         */\n        parameterReference: ModelWithString;\n    };\n    url: '/api/v{api-version}/complex';\n};\n\nexport type ComplexTypesErrors = {\n    /**\n     * 400 `server` error\n     */\n    400: unknown;\n    /**\n     * 500 server error\n     */\n    500: unknown;\n};\n\nexport type ComplexTypesResponses = {\n    /**\n     * Successful response\n     */\n    200: Array<ModelWithString>;\n};\n\nexport type ComplexTypesResponse = ComplexTypesResponses[keyof ComplexTypesResponses];\n\nexport type MultipartResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multipart';\n};\n\nexport type MultipartResponseResponses = {\n    /**\n     * OK\n     */\n    200: {\n        file?: Blob | File;\n        metadata?: {\n            foo?: string;\n            bar?: string;\n        };\n    };\n};\n\nexport type MultipartResponseResponse = MultipartResponseResponses[keyof MultipartResponseResponses];\n\nexport type MultipartRequestData = {\n    body?: {\n        content?: Blob | File;\n        data?: ModelWithString | null;\n    };\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multipart';\n};\n\nexport type ComplexParamsData = {\n    body?: {\n        readonly key: string | null;\n        name: string | null;\n        enabled?: boolean;\n        type: 'Monkey' | 'Horse' | 'Bird';\n        listOfModels?: Array<ModelWithString> | null;\n        listOfStrings?: Array<string> | null;\n        parameters: ModelWithString | ModelWithEnum | ModelWithArray | ModelWithDictionary;\n        readonly user?: {\n            readonly id?: number;\n            readonly name?: string | null;\n        };\n    };\n    path: {\n        id: number;\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string;\n    };\n    query?: never;\n    url: '/api/v{api-version}/complex/{id}';\n};\n\nexport type ComplexParamsResponses = {\n    /**\n     * Success\n     */\n    200: ModelWithString;\n};\n\nexport type ComplexParamsResponse = ComplexParamsResponses[keyof ComplexParamsResponses];\n\nexport type CallWithResultFromHeaderData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/header';\n};\n\nexport type CallWithResultFromHeaderErrors = {\n    /**\n     * 400 server error\n     */\n    400: unknown;\n    /**\n     * 500 server error\n     */\n    500: unknown;\n};\n\nexport type CallWithResultFromHeaderResponses = {\n    /**\n     * Successful response\n     */\n    200: unknown;\n};\n\nexport type TestErrorCodeData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * Status code to return\n         */\n        status: number;\n    };\n    url: '/api/v{api-version}/error';\n};\n\nexport type TestErrorCodeErrors = {\n    /**\n     * Custom message: Internal Server Error\n     */\n    500: unknown;\n    /**\n     * Custom message: Not Implemented\n     */\n    501: unknown;\n    /**\n     * Custom message: Bad Gateway\n     */\n    502: unknown;\n    /**\n     * Custom message: Service Unavailable\n     */\n    503: unknown;\n};\n\nexport type TestErrorCodeResponses = {\n    /**\n     * Custom message: Successful response\n     */\n    200: unknown;\n};\n\nexport type NonAsciiæøåÆøÅöôêÊ字符串Data = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * Dummy input param\n         */\n        nonAsciiParamæøåÆØÅöôêÊ: number;\n    };\n    url: '/api/v{api-version}/non-ascii-æøåÆØÅöôêÊ字符串';\n};\n\nexport type NonAsciiæøåÆøÅöôêÊ字符串Responses = {\n    /**\n     * Successful response\n     */\n    200: Array<NonAsciiStringæøåÆøÅöôêÊ字符串>;\n};\n\nexport type NonAsciiæøåÆøÅöôêÊ字符串Response = NonAsciiæøåÆøÅöôêÊ字符串Responses[keyof NonAsciiæøåÆøÅöôêÊ字符串Responses];\n\nexport type PutWithFormUrlEncodedData = {\n    body: ArrayWithStrings;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/non-ascii-æøåÆØÅöôêÊ字符串';\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/angular-query-experimental/name-builder/@tanstack/angular-query-experimental.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport { type DefaultError, type MutationOptions, queryOptions } from '@tanstack/angular-query-experimental';\n\nimport { client } from '../client.gen';\nimport { fooBarPost, fooBarPut, fooPost, fooPut, getFoo, getFooBar, type Options } from '../sdk.gen';\nimport type { FooBarPostData, FooBarPostResponse, FooBarPutData, FooBarPutResponse, FooPostData, FooPostResponse, FooPutData, FooPutResponse, GetFooBarData, GetFooBarResponse, GetFooData, GetFooResponse } from '../types.gen';\n\nexport type QueryKey<TOptions extends Options> = [\n    Pick<TOptions, 'baseUrl' | 'body' | 'headers' | 'path' | 'query'> & {\n        _id: string;\n        _infinite?: boolean;\n        tags?: ReadonlyArray<string>;\n    }\n];\n\nconst createQueryKey = <TOptions extends Options>(id: string, options?: TOptions, infinite?: boolean, tags?: ReadonlyArray<string>): [\n    QueryKey<TOptions>[0]\n] => {\n    const params: QueryKey<TOptions>[0] = { _id: id, baseUrl: options?.baseUrl || (options?.client ?? client).getConfig().baseUrl } as QueryKey<TOptions>[0];\n    if (infinite) {\n        params._infinite = infinite;\n    }\n    if (tags) {\n        params.tags = tags;\n    }\n    if (options?.body) {\n        params.body = options.body;\n    }\n    if (options?.headers) {\n        params.headers = options.headers;\n    }\n    if (options?.path) {\n        params.path = options.path;\n    }\n    if (options?.query) {\n        params.query = options.query;\n    }\n    return [params];\n};\n\nexport const getFooD = (options?: Options<GetFooData>) => createQueryKey('getFoo', options);\n\nexport const getFooE = (options?: Options<GetFooData>) => queryOptions<GetFooResponse, DefaultError, GetFooResponse, ReturnType<typeof getFooD>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await getFoo({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: getFooD(options)\n});\n\nexport const fooPostC = (options?: Partial<Options<FooPostData>>): MutationOptions<FooPostResponse, DefaultError, Options<FooPostData>> => {\n    const mutationOptions: MutationOptions<FooPostResponse, DefaultError, Options<FooPostData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await fooPost({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const fooPutC = (options?: Partial<Options<FooPutData>>): MutationOptions<FooPutResponse, DefaultError, Options<FooPutData>> => {\n    const mutationOptions: MutationOptions<FooPutResponse, DefaultError, Options<FooPutData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await fooPut({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const getFooBarD = (options?: Options<GetFooBarData>) => createQueryKey('getFooBar', options);\n\nexport const getFooBarE = (options?: Options<GetFooBarData>) => queryOptions<GetFooBarResponse, DefaultError, GetFooBarResponse, ReturnType<typeof getFooBarD>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await getFooBar({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: getFooBarD(options)\n});\n\nexport const fooBarPostC = (options?: Partial<Options<FooBarPostData>>): MutationOptions<FooBarPostResponse, DefaultError, Options<FooBarPostData>> => {\n    const mutationOptions: MutationOptions<FooBarPostResponse, DefaultError, Options<FooBarPostData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await fooBarPost({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const fooBarPutC = (options?: Partial<Options<FooBarPutData>>): MutationOptions<FooBarPutResponse, DefaultError, Options<FooBarPutData>> => {\n    const mutationOptions: MutationOptions<FooBarPutResponse, DefaultError, Options<FooBarPutData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await fooBarPut({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/angular-query-experimental/name-builder/client/client.gen.ts",
    "content": "// 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 (options: RequestOptions) => {\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 url = buildUrl(opts);\n\n    return { opts, url };\n  };\n\n  const request: Client['request'] = async (options) => {\n    // @ts-expect-error\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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/angular-query-experimental/name-builder/client/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type { Auth } from '../core/auth.gen';\nexport type { QuerySerializerOptions } from '../core/bodySerializer.gen';\nexport {\n  formDataBodySerializer,\n  jsonBodySerializer,\n  urlSearchParamsBodySerializer,\n} from '../core/bodySerializer.gen';\nexport { buildClientParams } from '../core/params.gen';\nexport { serializeQueryKeyValue } from '../core/queryKeySerializer.gen';\nexport { createClient } from './client.gen';\nexport type {\n  Client,\n  ClientOptions,\n  Config,\n  CreateClientConfig,\n  Options,\n  RequestOptions,\n  RequestResult,\n  ResolvedRequestOptions,\n  ResponseStyle,\n  TDataShape,\n} from './types.gen';\nexport { createConfig, mergeHeaders } from './utils.gen';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/angular-query-experimental/name-builder/client/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { Auth } from '../core/auth.gen';\nimport type {\n  ServerSentEventsOptions,\n  ServerSentEventsResult,\n} from '../core/serverSentEvents.gen';\nimport type { Client as CoreClient, Config as CoreConfig } from '../core/types.gen';\nimport type { Middleware } from './utils.gen';\n\nexport type ResponseStyle = 'data' | 'fields';\n\nexport interface Config<T extends ClientOptions = ClientOptions>\n  extends Omit<RequestInit, 'body' | 'headers' | 'method'>, CoreConfig {\n  /**\n   * Base URL for all requests made by this client.\n   */\n  baseUrl?: T['baseUrl'];\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   * Please don't use the Fetch client for Next.js applications. The `next`\n   * options won't have any effect.\n   *\n   * Install {@link https://www.npmjs.com/package/@hey-api/client-next `@hey-api/client-next`} instead.\n   */\n  next?: never;\n  /**\n   * Return the response data parsed in a specified format. By default, `auto`\n   * will infer the appropriate method from the `Content-Type` response header.\n   * You can override this behavior with any of the {@link Body} methods.\n   * Select `stream` if you don't want to parse response data at all.\n   *\n   * @default 'auto'\n   */\n  parseAs?: 'arrayBuffer' | 'auto' | 'blob' | 'formData' | 'json' | 'stream' | 'text';\n  /**\n   * Should we return only data or multiple fields (data, error, response, etc.)?\n   *\n   * @default 'fields'\n   */\n  responseStyle?: ResponseStyle;\n  /**\n   * Throw an error instead of returning it in the response?\n   *\n   * @default false\n   */\n  throwOnError?: T['throwOnError'];\n}\n\nexport interface RequestOptions<\n  TData = unknown,\n  TResponseStyle extends ResponseStyle = 'fields',\n  ThrowOnError extends boolean = boolean,\n  Url extends string = string,\n>\n  extends\n    Config<{\n      responseStyle: TResponseStyle;\n      throwOnError: ThrowOnError;\n    }>,\n    Pick<\n      ServerSentEventsOptions<TData>,\n      | 'onRequest'\n      | 'onSseError'\n      | 'onSseEvent'\n      | 'sseDefaultRetryDelay'\n      | 'sseMaxRetryAttempts'\n      | 'sseMaxRetryDelay'\n    > {\n  /**\n   * Any body that you want to add to your request.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/fetch#body}\n   */\n  body?: unknown;\n  path?: Record<string, unknown>;\n  query?: Record<string, unknown>;\n  /**\n   * Security mechanism(s) to use for the request.\n   */\n  security?: ReadonlyArray<Auth>;\n  url: Url;\n}\n\nexport interface ResolvedRequestOptions<\n  TResponseStyle extends ResponseStyle = 'fields',\n  ThrowOnError extends boolean = boolean,\n  Url extends string = string,\n> extends RequestOptions<unknown, TResponseStyle, ThrowOnError, Url> {\n  serializedBody?: string;\n}\n\nexport type RequestResult<\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = boolean,\n  TResponseStyle extends ResponseStyle = 'fields',\n> = ThrowOnError extends true\n  ? Promise<\n      TResponseStyle extends 'data'\n        ? TData extends Record<string, unknown>\n          ? TData[keyof TData]\n          : TData\n        : {\n            data: TData extends Record<string, unknown> ? TData[keyof TData] : TData;\n            request: Request;\n            response: Response;\n          }\n    >\n  : Promise<\n      TResponseStyle extends 'data'\n        ? (TData extends Record<string, unknown> ? TData[keyof TData] : TData) | undefined\n        : (\n            | {\n                data: TData extends Record<string, unknown> ? TData[keyof TData] : TData;\n                error: undefined;\n              }\n            | {\n                data: undefined;\n                error: TError extends Record<string, unknown> ? TError[keyof TError] : TError;\n              }\n          ) & {\n            request: Request;\n            response: Response;\n          }\n    >;\n\nexport interface ClientOptions {\n  baseUrl?: string;\n  responseStyle?: ResponseStyle;\n  throwOnError?: boolean;\n}\n\ntype MethodFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'>,\n) => RequestResult<TData, TError, ThrowOnError, TResponseStyle>;\n\ntype SseFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'>,\n) => Promise<ServerSentEventsResult<TData, TError>>;\n\ntype RequestFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'> &\n    Pick<Required<RequestOptions<TData, TResponseStyle, ThrowOnError>>, 'method'>,\n) => RequestResult<TData, TError, ThrowOnError, TResponseStyle>;\n\ntype BuildUrlFn = <\n  TData extends {\n    body?: unknown;\n    path?: Record<string, unknown>;\n    query?: Record<string, unknown>;\n    url: string;\n  },\n>(\n  options: TData & Options<TData>,\n) => string;\n\nexport type Client = CoreClient<RequestFn, Config, MethodFn, BuildUrlFn, SseFn> & {\n  interceptors: Middleware<Request, Response, unknown, ResolvedRequestOptions>;\n};\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 = ClientOptions> = (\n  override?: Config<ClientOptions & T>,\n) => Config<Required<ClientOptions> & T>;\n\nexport interface TDataShape {\n  body?: unknown;\n  headers?: unknown;\n  path?: unknown;\n  query?: unknown;\n  url: string;\n}\n\ntype OmitKeys<T, K> = Pick<T, Exclude<keyof T, K>>;\n\nexport type Options<\n  TData extends TDataShape = TDataShape,\n  ThrowOnError extends boolean = boolean,\n  TResponse = unknown,\n  TResponseStyle extends ResponseStyle = 'fields',\n> = OmitKeys<\n  RequestOptions<TResponse, TResponseStyle, ThrowOnError>,\n  'body' | 'path' | 'query' | 'url'\n> &\n  ([TData] extends [never] ? unknown : Omit<TData, 'url'>);\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/angular-query-experimental/name-builder/client/utils.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/angular-query-experimental/name-builder/client.gen.ts",
    "content": "// 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>());\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/angular-query-experimental/name-builder/core/auth.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/angular-query-experimental/name-builder/core/bodySerializer.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/angular-query-experimental/name-builder/core/params.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/angular-query-experimental/name-builder/core/pathSerializer.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/angular-query-experimental/name-builder/core/queryKeySerializer.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\n/**\n * JSON-friendly union that mirrors what Pinia Colada can hash.\n */\nexport type JsonValue =\n  | null\n  | string\n  | number\n  | boolean\n  | JsonValue[]\n  | { [key: string]: JsonValue };\n\n/**\n * Replacer that converts non-JSON values (bigint, Date, etc.) to safe substitutes.\n */\nexport const queryKeyJsonReplacer = (_key: string, value: unknown) => {\n  if (value === undefined || typeof value === 'function' || typeof value === 'symbol') {\n    return undefined;\n  }\n  if (typeof value === 'bigint') {\n    return value.toString();\n  }\n  if (value instanceof Date) {\n    return value.toISOString();\n  }\n  return value;\n};\n\n/**\n * Safely stringifies a value and parses it back into a JsonValue.\n */\nexport const stringifyToJsonValue = (input: unknown): JsonValue | undefined => {\n  try {\n    const json = JSON.stringify(input, queryKeyJsonReplacer);\n    if (json === undefined) {\n      return undefined;\n    }\n    return JSON.parse(json) as JsonValue;\n  } catch {\n    return undefined;\n  }\n};\n\n/**\n * Detects plain objects (including objects with a null prototype).\n */\nconst isPlainObject = (value: unknown): value is Record<string, unknown> => {\n  if (value === null || typeof value !== 'object') {\n    return false;\n  }\n  const prototype = Object.getPrototypeOf(value as object);\n  return prototype === Object.prototype || prototype === null;\n};\n\n/**\n * Turns URLSearchParams into a sorted JSON object for deterministic keys.\n */\nconst serializeSearchParams = (params: URLSearchParams): JsonValue => {\n  const entries = Array.from(params.entries()).sort(([a], [b]) => a.localeCompare(b));\n  const result: Record<string, JsonValue> = {};\n\n  for (const [key, value] of entries) {\n    const existing = result[key];\n    if (existing === undefined) {\n      result[key] = value;\n      continue;\n    }\n\n    if (Array.isArray(existing)) {\n      (existing as string[]).push(value);\n    } else {\n      result[key] = [existing, value];\n    }\n  }\n\n  return result;\n};\n\n/**\n * Normalizes any accepted value into a JSON-friendly shape for query keys.\n */\nexport const serializeQueryKeyValue = (value: unknown): JsonValue | undefined => {\n  if (value === null) {\n    return null;\n  }\n\n  if (typeof value === 'string' || typeof value === 'number' || typeof value === 'boolean') {\n    return value;\n  }\n\n  if (value === undefined || typeof value === 'function' || typeof value === 'symbol') {\n    return undefined;\n  }\n\n  if (typeof value === 'bigint') {\n    return value.toString();\n  }\n\n  if (value instanceof Date) {\n    return value.toISOString();\n  }\n\n  if (Array.isArray(value)) {\n    return stringifyToJsonValue(value);\n  }\n\n  if (typeof URLSearchParams !== 'undefined' && value instanceof URLSearchParams) {\n    return serializeSearchParams(value);\n  }\n\n  if (isPlainObject(value)) {\n    return stringifyToJsonValue(value);\n  }\n\n  return undefined;\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/angular-query-experimental/name-builder/core/serverSentEvents.gen.ts",
    "content": "// 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 const 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            // Normalize line endings: CRLF -> LF, then CR -> LF\n            buffer = buffer.replace(/\\r\\n/g, '\\n').replace(/\\r/g, '\\n');\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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/angular-query-experimental/name-builder/core/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { Auth, AuthToken } from './auth.gen';\nimport type { BodySerializer, QuerySerializer, QuerySerializerOptions } from './bodySerializer.gen';\n\nexport type HttpMethod =\n  | 'connect'\n  | 'delete'\n  | 'get'\n  | 'head'\n  | 'options'\n  | 'patch'\n  | 'post'\n  | 'put'\n  | 'trace';\n\nexport type Client<\n  RequestFn = never,\n  Config = unknown,\n  MethodFn = never,\n  BuildUrlFn = never,\n  SseFn = never,\n> = {\n  /**\n   * Returns the final request URL.\n   */\n  buildUrl: BuildUrlFn;\n  getConfig: () => Config;\n  request: RequestFn;\n  setConfig: (config: Config) => Config;\n} & {\n  [K in HttpMethod]: MethodFn;\n} & ([SseFn] extends [never] ? { sse?: never } : { sse: { [K in HttpMethod]: SseFn } });\n\nexport interface Config {\n  /**\n   * Auth token or a function returning auth token. The resolved value will be\n   * added to the request payload as defined by its `security` array.\n   */\n  auth?: ((auth: Auth) => Promise<AuthToken> | AuthToken) | AuthToken;\n  /**\n   * A function for serializing request body parameter. By default,\n   * {@link JSON.stringify()} will be used.\n   */\n  bodySerializer?: BodySerializer | null;\n  /**\n   * An object containing any HTTP headers that you want to pre-populate your\n   * `Headers` object with.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/Headers/Headers#init See more}\n   */\n  headers?:\n    | RequestInit['headers']\n    | Record<\n        string,\n        string | number | boolean | (string | number | boolean)[] | null | undefined | unknown\n      >;\n  /**\n   * The request method.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/fetch#method See more}\n   */\n  method?: Uppercase<HttpMethod>;\n  /**\n   * A function for serializing request query parameters. By default, arrays\n   * will be exploded in form style, objects will be exploded in deepObject\n   * style, and reserved characters are percent-encoded.\n   *\n   * This method will have no effect if the native `paramsSerializer()` Axios\n   * API function is used.\n   *\n   * {@link https://swagger.io/docs/specification/serialization/#query View examples}\n   */\n  querySerializer?: QuerySerializer | QuerySerializerOptions;\n  /**\n   * A function validating request data. This is useful if you want to ensure\n   * the request conforms to the desired shape, so it can be safely sent to\n   * the server.\n   */\n  requestValidator?: (data: unknown) => Promise<unknown>;\n  /**\n   * A function transforming response data before it's returned. This is useful\n   * for post-processing data, e.g. converting ISO strings into Date objects.\n   */\n  responseTransformer?: (data: unknown) => Promise<unknown>;\n  /**\n   * A function validating response data. This is useful if you want to ensure\n   * the response conforms to the desired shape, so it can be safely passed to\n   * the transformers and returned to the user.\n   */\n  responseValidator?: (data: unknown) => Promise<unknown>;\n}\n\ntype IsExactlyNeverOrNeverUndefined<T> = [T] extends [never]\n  ? true\n  : [T] extends [never | undefined]\n    ? [undefined] extends [T]\n      ? false\n      : true\n    : false;\n\nexport type OmitNever<T extends Record<string, unknown>> = {\n  [K in keyof T as IsExactlyNeverOrNeverUndefined<T[K]> extends true ? never : K]: T[K];\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/angular-query-experimental/name-builder/core/utils.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/angular-query-experimental/name-builder/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport { fooBarPost, fooBarPut, fooPost, fooPut, getFoo, getFooBar, type Options } from './sdk.gen';\nexport type { ClientOptions, FooBarPostData, FooBarPostResponse, FooBarPostResponses, FooBarPutData, FooBarPutResponse, FooBarPutResponses, FooPostData, FooPostResponse, FooPostResponses, FooPutData, FooPutResponse, FooPutResponses, GetFooBarData, GetFooBarResponse, GetFooBarResponses, GetFooData, GetFooResponse, GetFooResponses } from './types.gen';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/angular-query-experimental/name-builder/sdk.gen.ts",
    "content": "// 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 { FooBarPostData, FooBarPostResponses, FooBarPutData, FooBarPutResponses, FooPostData, FooPostResponses, FooPutData, FooPutResponses, GetFooBarData, GetFooBarResponses, GetFooData, GetFooResponses } from './types.gen';\n\nexport type Options<TData extends TDataShape = TDataShape, ThrowOnError extends boolean = boolean> = Options2<TData, ThrowOnError> & {\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\nexport const getFoo = <ThrowOnError extends boolean = false>(options?: Options<GetFooData, ThrowOnError>) => (options?.client ?? client).get<GetFooResponses, unknown, ThrowOnError>({ url: '/foo', ...options });\n\nexport const fooPost = <ThrowOnError extends boolean = false>(options?: Options<FooPostData, ThrowOnError>) => (options?.client ?? client).post<FooPostResponses, unknown, ThrowOnError>({ url: '/foo', ...options });\n\nexport const fooPut = <ThrowOnError extends boolean = false>(options?: Options<FooPutData, ThrowOnError>) => (options?.client ?? client).put<FooPutResponses, unknown, ThrowOnError>({ url: '/foo', ...options });\n\nexport const getFooBar = <ThrowOnError extends boolean = false>(options?: Options<GetFooBarData, ThrowOnError>) => (options?.client ?? client).get<GetFooBarResponses, unknown, ThrowOnError>({ url: '/foo/bar', ...options });\n\nexport const fooBarPost = <ThrowOnError extends boolean = false>(options?: Options<FooBarPostData, ThrowOnError>) => (options?.client ?? client).post<FooBarPostResponses, unknown, ThrowOnError>({ url: '/foo/bar', ...options });\n\nexport const fooBarPut = <ThrowOnError extends boolean = false>(options?: Options<FooBarPutData, ThrowOnError>) => (options?.client ?? client).put<FooBarPutResponses, unknown, ThrowOnError>({ url: '/foo/bar', ...options });\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/angular-query-experimental/name-builder/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type ClientOptions = {\n    baseUrl: `${string}://${string}` | (string & {});\n};\n\nexport type GetFooData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/foo';\n};\n\nexport type GetFooResponses = {\n    /**\n     * OK\n     */\n    200: string;\n};\n\nexport type GetFooResponse = GetFooResponses[keyof GetFooResponses];\n\nexport type FooPostData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/foo';\n};\n\nexport type FooPostResponses = {\n    /**\n     * OK\n     */\n    200: string;\n};\n\nexport type FooPostResponse = FooPostResponses[keyof FooPostResponses];\n\nexport type FooPutData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/foo';\n};\n\nexport type FooPutResponses = {\n    /**\n     * OK\n     */\n    200: string;\n};\n\nexport type FooPutResponse = FooPutResponses[keyof FooPutResponses];\n\nexport type GetFooBarData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/foo/bar';\n};\n\nexport type GetFooBarResponses = {\n    /**\n     * OK\n     */\n    200: string;\n};\n\nexport type GetFooBarResponse = GetFooBarResponses[keyof GetFooBarResponses];\n\nexport type FooBarPostData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/foo/bar';\n};\n\nexport type FooBarPostResponses = {\n    /**\n     * OK\n     */\n    200: string;\n};\n\nexport type FooBarPostResponse = FooBarPostResponses[keyof FooBarPostResponses];\n\nexport type FooBarPutData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/foo/bar';\n};\n\nexport type FooBarPutResponses = {\n    /**\n     * OK\n     */\n    200: string;\n};\n\nexport type FooBarPutResponse = FooBarPutResponses[keyof FooBarPutResponses];\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/preact-query/asClass/@tanstack/preact-query.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport { type DefaultError, queryOptions, type UseMutationOptions } from '@tanstack/preact-query';\n\nimport { client } from '../client.gen';\nimport { BarBazService, BarService, FooBazService, FooService, type Options } from '../sdk.gen';\nimport type { FooBarPostData, FooBarPostResponse, FooBarPutData, FooBarPutResponse, FooPostData, FooPostResponse, FooPutData, FooPutResponse, GetFooBarData, GetFooBarResponse, GetFooData, GetFooResponse } from '../types.gen';\n\nexport type QueryKey<TOptions extends Options> = [\n    Pick<TOptions, 'baseUrl' | 'body' | 'headers' | 'path' | 'query'> & {\n        _id: string;\n        _infinite?: boolean;\n        tags?: ReadonlyArray<string>;\n    }\n];\n\nconst createQueryKey = <TOptions extends Options>(id: string, options?: TOptions, infinite?: boolean, tags?: ReadonlyArray<string>): [\n    QueryKey<TOptions>[0]\n] => {\n    const params: QueryKey<TOptions>[0] = { _id: id, baseUrl: options?.baseUrl || (options?.client ?? client).getConfig().baseUrl } as QueryKey<TOptions>[0];\n    if (infinite) {\n        params._infinite = infinite;\n    }\n    if (tags) {\n        params.tags = tags;\n    }\n    if (options?.body) {\n        params.body = options.body;\n    }\n    if (options?.headers) {\n        params.headers = options.headers;\n    }\n    if (options?.path) {\n        params.path = options.path;\n    }\n    if (options?.query) {\n        params.query = options.query;\n    }\n    return [params];\n};\n\nexport const getFooQueryKey = (options?: Options<GetFooData>) => createQueryKey('getFoo', options);\n\nexport const getFooOptions = (options?: Options<GetFooData>) => queryOptions<GetFooResponse, DefaultError, GetFooResponse, ReturnType<typeof getFooQueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await FooBazService.getFoo({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: getFooQueryKey(options)\n});\n\nexport const fooPostMutation = (options?: Partial<Options<FooPostData>>): UseMutationOptions<FooPostResponse, DefaultError, Options<FooPostData>> => {\n    const mutationOptions: UseMutationOptions<FooPostResponse, DefaultError, Options<FooPostData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await FooService.post({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const fooPutMutation = (options?: Partial<Options<FooPutData>>): UseMutationOptions<FooPutResponse, DefaultError, Options<FooPutData>> => {\n    const mutationOptions: UseMutationOptions<FooPutResponse, DefaultError, Options<FooPutData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await FooService.put({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const getFooBarQueryKey = (options?: Options<GetFooBarData>) => createQueryKey('getFooBar', options);\n\nexport const getFooBarOptions = (options?: Options<GetFooBarData>) => queryOptions<GetFooBarResponse, DefaultError, GetFooBarResponse, ReturnType<typeof getFooBarQueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await BarBazService.getFooBar({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: getFooBarQueryKey(options)\n});\n\nexport const fooBarPostMutation = (options?: Partial<Options<FooBarPostData>>): UseMutationOptions<FooBarPostResponse, DefaultError, Options<FooBarPostData>> => {\n    const mutationOptions: UseMutationOptions<FooBarPostResponse, DefaultError, Options<FooBarPostData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await BarService.post({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const fooBarPutMutation = (options?: Partial<Options<FooBarPutData>>): UseMutationOptions<FooBarPutResponse, DefaultError, Options<FooBarPutData>> => {\n    const mutationOptions: UseMutationOptions<FooBarPutResponse, DefaultError, Options<FooBarPutData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await BarService.put({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/preact-query/asClass/client/client.gen.ts",
    "content": "// 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 (options: RequestOptions) => {\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 url = buildUrl(opts);\n\n    return { opts, url };\n  };\n\n  const request: Client['request'] = async (options) => {\n    // @ts-expect-error\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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/preact-query/asClass/client/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type { Auth } from '../core/auth.gen';\nexport type { QuerySerializerOptions } from '../core/bodySerializer.gen';\nexport {\n  formDataBodySerializer,\n  jsonBodySerializer,\n  urlSearchParamsBodySerializer,\n} from '../core/bodySerializer.gen';\nexport { buildClientParams } from '../core/params.gen';\nexport { serializeQueryKeyValue } from '../core/queryKeySerializer.gen';\nexport { createClient } from './client.gen';\nexport type {\n  Client,\n  ClientOptions,\n  Config,\n  CreateClientConfig,\n  Options,\n  RequestOptions,\n  RequestResult,\n  ResolvedRequestOptions,\n  ResponseStyle,\n  TDataShape,\n} from './types.gen';\nexport { createConfig, mergeHeaders } from './utils.gen';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/preact-query/asClass/client/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { Auth } from '../core/auth.gen';\nimport type {\n  ServerSentEventsOptions,\n  ServerSentEventsResult,\n} from '../core/serverSentEvents.gen';\nimport type { Client as CoreClient, Config as CoreConfig } from '../core/types.gen';\nimport type { Middleware } from './utils.gen';\n\nexport type ResponseStyle = 'data' | 'fields';\n\nexport interface Config<T extends ClientOptions = ClientOptions>\n  extends Omit<RequestInit, 'body' | 'headers' | 'method'>, CoreConfig {\n  /**\n   * Base URL for all requests made by this client.\n   */\n  baseUrl?: T['baseUrl'];\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   * Please don't use the Fetch client for Next.js applications. The `next`\n   * options won't have any effect.\n   *\n   * Install {@link https://www.npmjs.com/package/@hey-api/client-next `@hey-api/client-next`} instead.\n   */\n  next?: never;\n  /**\n   * Return the response data parsed in a specified format. By default, `auto`\n   * will infer the appropriate method from the `Content-Type` response header.\n   * You can override this behavior with any of the {@link Body} methods.\n   * Select `stream` if you don't want to parse response data at all.\n   *\n   * @default 'auto'\n   */\n  parseAs?: 'arrayBuffer' | 'auto' | 'blob' | 'formData' | 'json' | 'stream' | 'text';\n  /**\n   * Should we return only data or multiple fields (data, error, response, etc.)?\n   *\n   * @default 'fields'\n   */\n  responseStyle?: ResponseStyle;\n  /**\n   * Throw an error instead of returning it in the response?\n   *\n   * @default false\n   */\n  throwOnError?: T['throwOnError'];\n}\n\nexport interface RequestOptions<\n  TData = unknown,\n  TResponseStyle extends ResponseStyle = 'fields',\n  ThrowOnError extends boolean = boolean,\n  Url extends string = string,\n>\n  extends\n    Config<{\n      responseStyle: TResponseStyle;\n      throwOnError: ThrowOnError;\n    }>,\n    Pick<\n      ServerSentEventsOptions<TData>,\n      | 'onRequest'\n      | 'onSseError'\n      | 'onSseEvent'\n      | 'sseDefaultRetryDelay'\n      | 'sseMaxRetryAttempts'\n      | 'sseMaxRetryDelay'\n    > {\n  /**\n   * Any body that you want to add to your request.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/fetch#body}\n   */\n  body?: unknown;\n  path?: Record<string, unknown>;\n  query?: Record<string, unknown>;\n  /**\n   * Security mechanism(s) to use for the request.\n   */\n  security?: ReadonlyArray<Auth>;\n  url: Url;\n}\n\nexport interface ResolvedRequestOptions<\n  TResponseStyle extends ResponseStyle = 'fields',\n  ThrowOnError extends boolean = boolean,\n  Url extends string = string,\n> extends RequestOptions<unknown, TResponseStyle, ThrowOnError, Url> {\n  serializedBody?: string;\n}\n\nexport type RequestResult<\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = boolean,\n  TResponseStyle extends ResponseStyle = 'fields',\n> = ThrowOnError extends true\n  ? Promise<\n      TResponseStyle extends 'data'\n        ? TData extends Record<string, unknown>\n          ? TData[keyof TData]\n          : TData\n        : {\n            data: TData extends Record<string, unknown> ? TData[keyof TData] : TData;\n            request: Request;\n            response: Response;\n          }\n    >\n  : Promise<\n      TResponseStyle extends 'data'\n        ? (TData extends Record<string, unknown> ? TData[keyof TData] : TData) | undefined\n        : (\n            | {\n                data: TData extends Record<string, unknown> ? TData[keyof TData] : TData;\n                error: undefined;\n              }\n            | {\n                data: undefined;\n                error: TError extends Record<string, unknown> ? TError[keyof TError] : TError;\n              }\n          ) & {\n            request: Request;\n            response: Response;\n          }\n    >;\n\nexport interface ClientOptions {\n  baseUrl?: string;\n  responseStyle?: ResponseStyle;\n  throwOnError?: boolean;\n}\n\ntype MethodFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'>,\n) => RequestResult<TData, TError, ThrowOnError, TResponseStyle>;\n\ntype SseFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'>,\n) => Promise<ServerSentEventsResult<TData, TError>>;\n\ntype RequestFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'> &\n    Pick<Required<RequestOptions<TData, TResponseStyle, ThrowOnError>>, 'method'>,\n) => RequestResult<TData, TError, ThrowOnError, TResponseStyle>;\n\ntype BuildUrlFn = <\n  TData extends {\n    body?: unknown;\n    path?: Record<string, unknown>;\n    query?: Record<string, unknown>;\n    url: string;\n  },\n>(\n  options: TData & Options<TData>,\n) => string;\n\nexport type Client = CoreClient<RequestFn, Config, MethodFn, BuildUrlFn, SseFn> & {\n  interceptors: Middleware<Request, Response, unknown, ResolvedRequestOptions>;\n};\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 = ClientOptions> = (\n  override?: Config<ClientOptions & T>,\n) => Config<Required<ClientOptions> & T>;\n\nexport interface TDataShape {\n  body?: unknown;\n  headers?: unknown;\n  path?: unknown;\n  query?: unknown;\n  url: string;\n}\n\ntype OmitKeys<T, K> = Pick<T, Exclude<keyof T, K>>;\n\nexport type Options<\n  TData extends TDataShape = TDataShape,\n  ThrowOnError extends boolean = boolean,\n  TResponse = unknown,\n  TResponseStyle extends ResponseStyle = 'fields',\n> = OmitKeys<\n  RequestOptions<TResponse, TResponseStyle, ThrowOnError>,\n  'body' | 'path' | 'query' | 'url'\n> &\n  ([TData] extends [never] ? unknown : Omit<TData, 'url'>);\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/preact-query/asClass/client/utils.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/preact-query/asClass/client.gen.ts",
    "content": "// 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>());\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/preact-query/asClass/core/auth.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/preact-query/asClass/core/bodySerializer.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/preact-query/asClass/core/params.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/preact-query/asClass/core/pathSerializer.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/preact-query/asClass/core/queryKeySerializer.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\n/**\n * JSON-friendly union that mirrors what Pinia Colada can hash.\n */\nexport type JsonValue =\n  | null\n  | string\n  | number\n  | boolean\n  | JsonValue[]\n  | { [key: string]: JsonValue };\n\n/**\n * Replacer that converts non-JSON values (bigint, Date, etc.) to safe substitutes.\n */\nexport const queryKeyJsonReplacer = (_key: string, value: unknown) => {\n  if (value === undefined || typeof value === 'function' || typeof value === 'symbol') {\n    return undefined;\n  }\n  if (typeof value === 'bigint') {\n    return value.toString();\n  }\n  if (value instanceof Date) {\n    return value.toISOString();\n  }\n  return value;\n};\n\n/**\n * Safely stringifies a value and parses it back into a JsonValue.\n */\nexport const stringifyToJsonValue = (input: unknown): JsonValue | undefined => {\n  try {\n    const json = JSON.stringify(input, queryKeyJsonReplacer);\n    if (json === undefined) {\n      return undefined;\n    }\n    return JSON.parse(json) as JsonValue;\n  } catch {\n    return undefined;\n  }\n};\n\n/**\n * Detects plain objects (including objects with a null prototype).\n */\nconst isPlainObject = (value: unknown): value is Record<string, unknown> => {\n  if (value === null || typeof value !== 'object') {\n    return false;\n  }\n  const prototype = Object.getPrototypeOf(value as object);\n  return prototype === Object.prototype || prototype === null;\n};\n\n/**\n * Turns URLSearchParams into a sorted JSON object for deterministic keys.\n */\nconst serializeSearchParams = (params: URLSearchParams): JsonValue => {\n  const entries = Array.from(params.entries()).sort(([a], [b]) => a.localeCompare(b));\n  const result: Record<string, JsonValue> = {};\n\n  for (const [key, value] of entries) {\n    const existing = result[key];\n    if (existing === undefined) {\n      result[key] = value;\n      continue;\n    }\n\n    if (Array.isArray(existing)) {\n      (existing as string[]).push(value);\n    } else {\n      result[key] = [existing, value];\n    }\n  }\n\n  return result;\n};\n\n/**\n * Normalizes any accepted value into a JSON-friendly shape for query keys.\n */\nexport const serializeQueryKeyValue = (value: unknown): JsonValue | undefined => {\n  if (value === null) {\n    return null;\n  }\n\n  if (typeof value === 'string' || typeof value === 'number' || typeof value === 'boolean') {\n    return value;\n  }\n\n  if (value === undefined || typeof value === 'function' || typeof value === 'symbol') {\n    return undefined;\n  }\n\n  if (typeof value === 'bigint') {\n    return value.toString();\n  }\n\n  if (value instanceof Date) {\n    return value.toISOString();\n  }\n\n  if (Array.isArray(value)) {\n    return stringifyToJsonValue(value);\n  }\n\n  if (typeof URLSearchParams !== 'undefined' && value instanceof URLSearchParams) {\n    return serializeSearchParams(value);\n  }\n\n  if (isPlainObject(value)) {\n    return stringifyToJsonValue(value);\n  }\n\n  return undefined;\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/preact-query/asClass/core/serverSentEvents.gen.ts",
    "content": "// 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 const 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            // Normalize line endings: CRLF -> LF, then CR -> LF\n            buffer = buffer.replace(/\\r\\n/g, '\\n').replace(/\\r/g, '\\n');\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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/preact-query/asClass/core/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { Auth, AuthToken } from './auth.gen';\nimport type { BodySerializer, QuerySerializer, QuerySerializerOptions } from './bodySerializer.gen';\n\nexport type HttpMethod =\n  | 'connect'\n  | 'delete'\n  | 'get'\n  | 'head'\n  | 'options'\n  | 'patch'\n  | 'post'\n  | 'put'\n  | 'trace';\n\nexport type Client<\n  RequestFn = never,\n  Config = unknown,\n  MethodFn = never,\n  BuildUrlFn = never,\n  SseFn = never,\n> = {\n  /**\n   * Returns the final request URL.\n   */\n  buildUrl: BuildUrlFn;\n  getConfig: () => Config;\n  request: RequestFn;\n  setConfig: (config: Config) => Config;\n} & {\n  [K in HttpMethod]: MethodFn;\n} & ([SseFn] extends [never] ? { sse?: never } : { sse: { [K in HttpMethod]: SseFn } });\n\nexport interface Config {\n  /**\n   * Auth token or a function returning auth token. The resolved value will be\n   * added to the request payload as defined by its `security` array.\n   */\n  auth?: ((auth: Auth) => Promise<AuthToken> | AuthToken) | AuthToken;\n  /**\n   * A function for serializing request body parameter. By default,\n   * {@link JSON.stringify()} will be used.\n   */\n  bodySerializer?: BodySerializer | null;\n  /**\n   * An object containing any HTTP headers that you want to pre-populate your\n   * `Headers` object with.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/Headers/Headers#init See more}\n   */\n  headers?:\n    | RequestInit['headers']\n    | Record<\n        string,\n        string | number | boolean | (string | number | boolean)[] | null | undefined | unknown\n      >;\n  /**\n   * The request method.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/fetch#method See more}\n   */\n  method?: Uppercase<HttpMethod>;\n  /**\n   * A function for serializing request query parameters. By default, arrays\n   * will be exploded in form style, objects will be exploded in deepObject\n   * style, and reserved characters are percent-encoded.\n   *\n   * This method will have no effect if the native `paramsSerializer()` Axios\n   * API function is used.\n   *\n   * {@link https://swagger.io/docs/specification/serialization/#query View examples}\n   */\n  querySerializer?: QuerySerializer | QuerySerializerOptions;\n  /**\n   * A function validating request data. This is useful if you want to ensure\n   * the request conforms to the desired shape, so it can be safely sent to\n   * the server.\n   */\n  requestValidator?: (data: unknown) => Promise<unknown>;\n  /**\n   * A function transforming response data before it's returned. This is useful\n   * for post-processing data, e.g. converting ISO strings into Date objects.\n   */\n  responseTransformer?: (data: unknown) => Promise<unknown>;\n  /**\n   * A function validating response data. This is useful if you want to ensure\n   * the response conforms to the desired shape, so it can be safely passed to\n   * the transformers and returned to the user.\n   */\n  responseValidator?: (data: unknown) => Promise<unknown>;\n}\n\ntype IsExactlyNeverOrNeverUndefined<T> = [T] extends [never]\n  ? true\n  : [T] extends [never | undefined]\n    ? [undefined] extends [T]\n      ? false\n      : true\n    : false;\n\nexport type OmitNever<T extends Record<string, unknown>> = {\n  [K in keyof T as IsExactlyNeverOrNeverUndefined<T[K]> extends true ? never : K]: T[K];\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/preact-query/asClass/core/utils.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/preact-query/asClass/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport { BarBazService, BarService, BarService2, FooBazService, FooService, FooService2, type Options } from './sdk.gen';\nexport type { ClientOptions, FooBarPostData, FooBarPostResponse, FooBarPostResponses, FooBarPutData, FooBarPutResponse, FooBarPutResponses, FooPostData, FooPostResponse, FooPostResponses, FooPutData, FooPutResponse, FooPutResponses, GetFooBarData, GetFooBarResponse, GetFooBarResponses, GetFooData, GetFooResponse, GetFooResponses } from './types.gen';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/preact-query/asClass/sdk.gen.ts",
    "content": "// 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 { FooBarPostData, FooBarPostResponses, FooBarPutData, FooBarPutResponses, FooPostData, FooPostResponses, FooPutData, FooPutResponses, GetFooBarData, GetFooBarResponses, GetFooData, GetFooResponses } from './types.gen';\n\nexport type Options<TData extends TDataShape = TDataShape, ThrowOnError extends boolean = boolean> = Options2<TData, ThrowOnError> & {\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\nexport class BarService {\n    public static post<ThrowOnError extends boolean = false>(options?: Options<FooBarPostData, ThrowOnError>) {\n        return (options?.client ?? client).post<FooBarPostResponses, unknown, ThrowOnError>({ url: '/foo/bar', ...options });\n    }\n    \n    public static put<ThrowOnError extends boolean = false>(options?: Options<FooBarPutData, ThrowOnError>) {\n        return (options?.client ?? client).put<FooBarPutResponses, unknown, ThrowOnError>({ url: '/foo/bar', ...options });\n    }\n}\n\nexport class FooService {\n    public static post<ThrowOnError extends boolean = false>(options?: Options<FooPostData, ThrowOnError>) {\n        return (options?.client ?? client).post<FooPostResponses, unknown, ThrowOnError>({ url: '/foo', ...options });\n    }\n    \n    public static put<ThrowOnError extends boolean = false>(options?: Options<FooPutData, ThrowOnError>) {\n        return (options?.client ?? client).put<FooPutResponses, unknown, ThrowOnError>({ url: '/foo', ...options });\n    }\n    \n    static barService = BarService;\n}\n\nexport class FooBazService {\n    public static getFoo<ThrowOnError extends boolean = false>(options?: Options<GetFooData, ThrowOnError>) {\n        return (options?.client ?? client).get<GetFooResponses, unknown, ThrowOnError>({ url: '/foo', ...options });\n    }\n    \n    static fooService = FooService;\n}\n\nexport class BarService2 {\n    public static post<ThrowOnError extends boolean = false>(options?: Options<FooBarPostData, ThrowOnError>) {\n        return (options?.client ?? client).post<FooBarPostResponses, unknown, ThrowOnError>({ url: '/foo/bar', ...options });\n    }\n    \n    public static put<ThrowOnError extends boolean = false>(options?: Options<FooBarPutData, ThrowOnError>) {\n        return (options?.client ?? client).put<FooBarPutResponses, unknown, ThrowOnError>({ url: '/foo/bar', ...options });\n    }\n}\n\nexport class FooService2 {\n    static barService = BarService2;\n}\n\nexport class BarBazService {\n    public static getFooBar<ThrowOnError extends boolean = false>(options?: Options<GetFooBarData, ThrowOnError>) {\n        return (options?.client ?? client).get<GetFooBarResponses, unknown, ThrowOnError>({ url: '/foo/bar', ...options });\n    }\n    \n    static fooService = FooService2;\n}\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/preact-query/asClass/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type ClientOptions = {\n    baseUrl: `${string}://${string}` | (string & {});\n};\n\nexport type GetFooData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/foo';\n};\n\nexport type GetFooResponses = {\n    /**\n     * OK\n     */\n    200: string;\n};\n\nexport type GetFooResponse = GetFooResponses[keyof GetFooResponses];\n\nexport type FooPostData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/foo';\n};\n\nexport type FooPostResponses = {\n    /**\n     * OK\n     */\n    200: string;\n};\n\nexport type FooPostResponse = FooPostResponses[keyof FooPostResponses];\n\nexport type FooPutData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/foo';\n};\n\nexport type FooPutResponses = {\n    /**\n     * OK\n     */\n    200: string;\n};\n\nexport type FooPutResponse = FooPutResponses[keyof FooPutResponses];\n\nexport type GetFooBarData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/foo/bar';\n};\n\nexport type GetFooBarResponses = {\n    /**\n     * OK\n     */\n    200: string;\n};\n\nexport type GetFooBarResponse = GetFooBarResponses[keyof GetFooBarResponses];\n\nexport type FooBarPostData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/foo/bar';\n};\n\nexport type FooBarPostResponses = {\n    /**\n     * OK\n     */\n    200: string;\n};\n\nexport type FooBarPostResponse = FooBarPostResponses[keyof FooBarPostResponses];\n\nexport type FooBarPutData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/foo/bar';\n};\n\nexport type FooBarPutResponses = {\n    /**\n     * OK\n     */\n    200: string;\n};\n\nexport type FooBarPutResponse = FooBarPutResponses[keyof FooBarPutResponses];\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/preact-query/axios/@tanstack/preact-query.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport { type DefaultError, type InfiniteData, infiniteQueryOptions, queryOptions, type UseMutationOptions } from '@tanstack/preact-query';\nimport type { AxiosError } from 'axios';\n\nimport { client } from '../client.gen';\nimport { apiVVersionODataControllerCount, callToTestOrderOfParams, callWithDefaultOptionalParameters, callWithDefaultParameters, callWithDescriptions, callWithDuplicateResponses, callWithNoContentResponse, callWithParameters, callWithResponse, callWithResponseAndNoContentResponse, callWithResponses, callWithResultFromHeader, callWithWeirdParameterNames, collectionFormat, complexParams, complexTypes, deleteCallWithoutParametersAndResponse, deleteFoo, deprecatedCall, dummyA, dummyB, duplicateName, duplicateName2, duplicateName3, duplicateName4, export_, fileResponse, fooWow, getApiVbyApiVersionSimpleOperation, getCallWithOptionalParam, getCallWithoutParametersAndResponse, import_, multipartRequest, multipartResponse, nonAsciiæøåÆøÅöôêÊ字符串, type Options, patchApiVbyApiVersionNoTag, patchCallWithoutParametersAndResponse, postApiVbyApiVersionFormData, postApiVbyApiVersionRequestBody, postCallWithOptionalParam, postCallWithoutParametersAndResponse, putCallWithoutParametersAndResponse, putWithFormUrlEncoded, testErrorCode, types, uploadFile } from '../sdk.gen';\nimport type { ApiVVersionODataControllerCountData, ApiVVersionODataControllerCountResponse, CallToTestOrderOfParamsData, CallWithDefaultOptionalParametersData, CallWithDefaultParametersData, CallWithDescriptionsData, CallWithDuplicateResponsesData, CallWithDuplicateResponsesError, CallWithDuplicateResponsesResponse, CallWithNoContentResponseData, CallWithNoContentResponseResponse, CallWithParametersData, CallWithResponseAndNoContentResponseData, CallWithResponseAndNoContentResponseResponse, CallWithResponseData, CallWithResponseResponse, CallWithResponsesData, CallWithResponsesError, CallWithResponsesResponse, CallWithResultFromHeaderData, CallWithWeirdParameterNamesData, CollectionFormatData, ComplexParamsData, ComplexParamsResponse, ComplexTypesData, ComplexTypesResponse, DeleteCallWithoutParametersAndResponseData, DeleteFooData3, DeprecatedCallData, DummyAData, DummyAResponse, DummyBData, DummyBResponse, DuplicateName2Data, DuplicateName3Data, DuplicateName4Data, DuplicateNameData, ExportData, FileResponseData, FileResponseResponse, FooWowData, GetApiVbyApiVersionSimpleOperationData, GetApiVbyApiVersionSimpleOperationError, GetApiVbyApiVersionSimpleOperationResponse, GetCallWithOptionalParamData, GetCallWithoutParametersAndResponseData, ImportData, ImportResponse, MultipartRequestData, MultipartResponseData, MultipartResponseResponse, NonAsciiæøåÆøÅöôêÊ字符串Data, NonAsciiæøåÆøÅöôêÊ字符串Response, PatchApiVbyApiVersionNoTagData, PatchCallWithoutParametersAndResponseData, PostApiVbyApiVersionFormDataData, PostApiVbyApiVersionRequestBodyData, PostCallWithOptionalParamData, PostCallWithOptionalParamResponse, PostCallWithoutParametersAndResponseData, PutCallWithoutParametersAndResponseData, PutWithFormUrlEncodedData, TestErrorCodeData, TypesData, TypesResponse, UploadFileData, UploadFileResponse } from '../types.gen';\n\nexport type QueryKey<TOptions extends Options> = [\n    Pick<TOptions, 'baseURL' | 'body' | 'headers' | 'path' | 'query'> & {\n        _id: string;\n        _infinite?: boolean;\n        tags?: ReadonlyArray<string>;\n    }\n];\n\nconst createQueryKey = <TOptions extends Options>(id: string, options?: TOptions, infinite?: boolean, tags?: ReadonlyArray<string>): [\n    QueryKey<TOptions>[0]\n] => {\n    const params: QueryKey<TOptions>[0] = { _id: id, baseURL: options?.baseURL || (options?.client ?? client).getConfig().baseURL } as QueryKey<TOptions>[0];\n    if (infinite) {\n        params._infinite = infinite;\n    }\n    if (tags) {\n        params.tags = tags;\n    }\n    if (options?.body) {\n        params.body = options.body;\n    }\n    if (options?.headers) {\n        params.headers = options.headers;\n    }\n    if (options?.path) {\n        params.path = options.path;\n    }\n    if (options?.query) {\n        params.query = options.query;\n    }\n    return [params];\n};\n\nexport const exportQueryKey = (options?: Options<ExportData>) => createQueryKey('export', options);\n\nexport const exportOptions = (options?: Options<ExportData>) => queryOptions<unknown, AxiosError<DefaultError>, unknown, ReturnType<typeof exportQueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await export_({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: exportQueryKey(options)\n});\n\nexport const patchApiVbyApiVersionNoTagMutation = (options?: Partial<Options<PatchApiVbyApiVersionNoTagData>>): UseMutationOptions<unknown, AxiosError<DefaultError>, Options<PatchApiVbyApiVersionNoTagData>> => {\n    const mutationOptions: UseMutationOptions<unknown, AxiosError<DefaultError>, Options<PatchApiVbyApiVersionNoTagData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await patchApiVbyApiVersionNoTag({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const importMutation = (options?: Partial<Options<ImportData>>): UseMutationOptions<ImportResponse, AxiosError<DefaultError>, Options<ImportData>> => {\n    const mutationOptions: UseMutationOptions<ImportResponse, AxiosError<DefaultError>, Options<ImportData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await import_({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const fooWowMutation = (options?: Partial<Options<FooWowData>>): UseMutationOptions<unknown, AxiosError<DefaultError>, Options<FooWowData>> => {\n    const mutationOptions: UseMutationOptions<unknown, AxiosError<DefaultError>, Options<FooWowData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await fooWow({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const apiVVersionODataControllerCountQueryKey = (options?: Options<ApiVVersionODataControllerCountData>) => createQueryKey('apiVVersionODataControllerCount', options);\n\nexport const apiVVersionODataControllerCountOptions = (options?: Options<ApiVVersionODataControllerCountData>) => queryOptions<ApiVVersionODataControllerCountResponse, AxiosError<DefaultError>, ApiVVersionODataControllerCountResponse, ReturnType<typeof apiVVersionODataControllerCountQueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await apiVVersionODataControllerCount({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: apiVVersionODataControllerCountQueryKey(options)\n});\n\nexport const getApiVbyApiVersionSimpleOperationQueryKey = (options: Options<GetApiVbyApiVersionSimpleOperationData>) => createQueryKey('getApiVbyApiVersionSimpleOperation', options);\n\nexport const getApiVbyApiVersionSimpleOperationOptions = (options: Options<GetApiVbyApiVersionSimpleOperationData>) => queryOptions<GetApiVbyApiVersionSimpleOperationResponse, AxiosError<GetApiVbyApiVersionSimpleOperationError>, GetApiVbyApiVersionSimpleOperationResponse, ReturnType<typeof getApiVbyApiVersionSimpleOperationQueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await getApiVbyApiVersionSimpleOperation({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: getApiVbyApiVersionSimpleOperationQueryKey(options)\n});\n\nexport const deleteCallWithoutParametersAndResponseMutation = (options?: Partial<Options<DeleteCallWithoutParametersAndResponseData>>): UseMutationOptions<unknown, AxiosError<DefaultError>, Options<DeleteCallWithoutParametersAndResponseData>> => {\n    const mutationOptions: UseMutationOptions<unknown, AxiosError<DefaultError>, Options<DeleteCallWithoutParametersAndResponseData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await deleteCallWithoutParametersAndResponse({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const getCallWithoutParametersAndResponseQueryKey = (options?: Options<GetCallWithoutParametersAndResponseData>) => createQueryKey('getCallWithoutParametersAndResponse', options);\n\nexport const getCallWithoutParametersAndResponseOptions = (options?: Options<GetCallWithoutParametersAndResponseData>) => queryOptions<unknown, AxiosError<DefaultError>, unknown, ReturnType<typeof getCallWithoutParametersAndResponseQueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await getCallWithoutParametersAndResponse({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: getCallWithoutParametersAndResponseQueryKey(options)\n});\n\nexport const patchCallWithoutParametersAndResponseMutation = (options?: Partial<Options<PatchCallWithoutParametersAndResponseData>>): UseMutationOptions<unknown, AxiosError<DefaultError>, Options<PatchCallWithoutParametersAndResponseData>> => {\n    const mutationOptions: UseMutationOptions<unknown, AxiosError<DefaultError>, Options<PatchCallWithoutParametersAndResponseData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await patchCallWithoutParametersAndResponse({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const postCallWithoutParametersAndResponseMutation = (options?: Partial<Options<PostCallWithoutParametersAndResponseData>>): UseMutationOptions<unknown, AxiosError<DefaultError>, Options<PostCallWithoutParametersAndResponseData>> => {\n    const mutationOptions: UseMutationOptions<unknown, AxiosError<DefaultError>, Options<PostCallWithoutParametersAndResponseData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await postCallWithoutParametersAndResponse({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const putCallWithoutParametersAndResponseMutation = (options?: Partial<Options<PutCallWithoutParametersAndResponseData>>): UseMutationOptions<unknown, AxiosError<DefaultError>, Options<PutCallWithoutParametersAndResponseData>> => {\n    const mutationOptions: UseMutationOptions<unknown, AxiosError<DefaultError>, Options<PutCallWithoutParametersAndResponseData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await putCallWithoutParametersAndResponse({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const deleteFooMutation = (options?: Partial<Options<DeleteFooData3>>): UseMutationOptions<unknown, AxiosError<DefaultError>, Options<DeleteFooData3>> => {\n    const mutationOptions: UseMutationOptions<unknown, AxiosError<DefaultError>, Options<DeleteFooData3>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await deleteFoo({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const callWithDescriptionsMutation = (options?: Partial<Options<CallWithDescriptionsData>>): UseMutationOptions<unknown, AxiosError<DefaultError>, Options<CallWithDescriptionsData>> => {\n    const mutationOptions: UseMutationOptions<unknown, AxiosError<DefaultError>, Options<CallWithDescriptionsData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await callWithDescriptions({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\n/**\n * @deprecated\n */\nexport const deprecatedCallMutation = (options?: Partial<Options<DeprecatedCallData>>): UseMutationOptions<unknown, AxiosError<DefaultError>, Options<DeprecatedCallData>> => {\n    const mutationOptions: UseMutationOptions<unknown, AxiosError<DefaultError>, Options<DeprecatedCallData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await deprecatedCall({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const callWithParametersMutation = (options?: Partial<Options<CallWithParametersData>>): UseMutationOptions<unknown, AxiosError<DefaultError>, Options<CallWithParametersData>> => {\n    const mutationOptions: UseMutationOptions<unknown, AxiosError<DefaultError>, Options<CallWithParametersData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await callWithParameters({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const callWithWeirdParameterNamesMutation = (options?: Partial<Options<CallWithWeirdParameterNamesData>>): UseMutationOptions<unknown, AxiosError<DefaultError>, Options<CallWithWeirdParameterNamesData>> => {\n    const mutationOptions: UseMutationOptions<unknown, AxiosError<DefaultError>, Options<CallWithWeirdParameterNamesData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await callWithWeirdParameterNames({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const getCallWithOptionalParamQueryKey = (options: Options<GetCallWithOptionalParamData>) => createQueryKey('getCallWithOptionalParam', options);\n\nexport const getCallWithOptionalParamOptions = (options: Options<GetCallWithOptionalParamData>) => queryOptions<unknown, AxiosError<DefaultError>, unknown, ReturnType<typeof getCallWithOptionalParamQueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await getCallWithOptionalParam({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: getCallWithOptionalParamQueryKey(options)\n});\n\nconst createInfiniteParams = <K extends Pick<QueryKey<Options>[0], 'body' | 'headers' | 'path' | 'query'>>(queryKey: QueryKey<Options>, page: K) => {\n    const params = { ...queryKey[0] };\n    if (page.body) {\n        params.body = {\n            ...queryKey[0].body as any,\n            ...page.body as any\n        };\n    }\n    if (page.headers) {\n        params.headers = {\n            ...queryKey[0].headers,\n            ...page.headers\n        };\n    }\n    if (page.path) {\n        params.path = {\n            ...queryKey[0].path as any,\n            ...page.path as any\n        };\n    }\n    if (page.query) {\n        params.query = {\n            ...queryKey[0].query as any,\n            ...page.query as any\n        };\n    }\n    return params as unknown as typeof page;\n};\n\nexport const getCallWithOptionalParamInfiniteQueryKey = (options: Options<GetCallWithOptionalParamData>): QueryKey<Options<GetCallWithOptionalParamData>> => createQueryKey('getCallWithOptionalParam', options, true);\n\nexport const getCallWithOptionalParamInfiniteOptions = (options: Options<GetCallWithOptionalParamData>) => infiniteQueryOptions<unknown, AxiosError<DefaultError>, InfiniteData<unknown>, QueryKey<Options<GetCallWithOptionalParamData>>, number | Pick<QueryKey<Options<GetCallWithOptionalParamData>>[0], 'body' | 'headers' | 'path' | 'query'>>(\n// @ts-ignore\n{\n    queryFn: async ({ pageParam, queryKey, signal }) => {\n        // @ts-ignore\n        const page: Pick<QueryKey<Options<GetCallWithOptionalParamData>>[0], 'body' | 'headers' | 'path' | 'query'> = typeof pageParam === 'object' ? pageParam : {\n            query: {\n                page: pageParam\n            }\n        };\n        const params = createInfiniteParams(queryKey, page);\n        const { data } = await getCallWithOptionalParam({\n            ...options,\n            ...params,\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: getCallWithOptionalParamInfiniteQueryKey(options)\n});\n\nexport const postCallWithOptionalParamMutation = (options?: Partial<Options<PostCallWithOptionalParamData>>): UseMutationOptions<PostCallWithOptionalParamResponse, AxiosError<DefaultError>, Options<PostCallWithOptionalParamData>> => {\n    const mutationOptions: UseMutationOptions<PostCallWithOptionalParamResponse, AxiosError<DefaultError>, Options<PostCallWithOptionalParamData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await postCallWithOptionalParam({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const postApiVbyApiVersionRequestBodyMutation = (options?: Partial<Options<PostApiVbyApiVersionRequestBodyData>>): UseMutationOptions<unknown, AxiosError<DefaultError>, Options<PostApiVbyApiVersionRequestBodyData>> => {\n    const mutationOptions: UseMutationOptions<unknown, AxiosError<DefaultError>, Options<PostApiVbyApiVersionRequestBodyData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await postApiVbyApiVersionRequestBody({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const postApiVbyApiVersionFormDataMutation = (options?: Partial<Options<PostApiVbyApiVersionFormDataData>>): UseMutationOptions<unknown, AxiosError<DefaultError>, Options<PostApiVbyApiVersionFormDataData>> => {\n    const mutationOptions: UseMutationOptions<unknown, AxiosError<DefaultError>, Options<PostApiVbyApiVersionFormDataData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await postApiVbyApiVersionFormData({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const callWithDefaultParametersQueryKey = (options?: Options<CallWithDefaultParametersData>) => createQueryKey('callWithDefaultParameters', options);\n\nexport const callWithDefaultParametersOptions = (options?: Options<CallWithDefaultParametersData>) => queryOptions<unknown, AxiosError<DefaultError>, unknown, ReturnType<typeof callWithDefaultParametersQueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await callWithDefaultParameters({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: callWithDefaultParametersQueryKey(options)\n});\n\nexport const callWithDefaultOptionalParametersMutation = (options?: Partial<Options<CallWithDefaultOptionalParametersData>>): UseMutationOptions<unknown, AxiosError<DefaultError>, Options<CallWithDefaultOptionalParametersData>> => {\n    const mutationOptions: UseMutationOptions<unknown, AxiosError<DefaultError>, Options<CallWithDefaultOptionalParametersData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await callWithDefaultOptionalParameters({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const callToTestOrderOfParamsMutation = (options?: Partial<Options<CallToTestOrderOfParamsData>>): UseMutationOptions<unknown, AxiosError<DefaultError>, Options<CallToTestOrderOfParamsData>> => {\n    const mutationOptions: UseMutationOptions<unknown, AxiosError<DefaultError>, Options<CallToTestOrderOfParamsData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await callToTestOrderOfParams({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const duplicateNameMutation = (options?: Partial<Options<DuplicateNameData>>): UseMutationOptions<unknown, AxiosError<DefaultError>, Options<DuplicateNameData>> => {\n    const mutationOptions: UseMutationOptions<unknown, AxiosError<DefaultError>, Options<DuplicateNameData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await duplicateName({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const duplicateName2QueryKey = (options?: Options<DuplicateName2Data>) => createQueryKey('duplicateName2', options);\n\nexport const duplicateName2Options = (options?: Options<DuplicateName2Data>) => queryOptions<unknown, AxiosError<DefaultError>, unknown, ReturnType<typeof duplicateName2QueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await duplicateName2({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: duplicateName2QueryKey(options)\n});\n\nexport const duplicateName3Mutation = (options?: Partial<Options<DuplicateName3Data>>): UseMutationOptions<unknown, AxiosError<DefaultError>, Options<DuplicateName3Data>> => {\n    const mutationOptions: UseMutationOptions<unknown, AxiosError<DefaultError>, Options<DuplicateName3Data>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await duplicateName3({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const duplicateName4Mutation = (options?: Partial<Options<DuplicateName4Data>>): UseMutationOptions<unknown, AxiosError<DefaultError>, Options<DuplicateName4Data>> => {\n    const mutationOptions: UseMutationOptions<unknown, AxiosError<DefaultError>, Options<DuplicateName4Data>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await duplicateName4({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const callWithNoContentResponseQueryKey = (options?: Options<CallWithNoContentResponseData>) => createQueryKey('callWithNoContentResponse', options);\n\nexport const callWithNoContentResponseOptions = (options?: Options<CallWithNoContentResponseData>) => queryOptions<CallWithNoContentResponseResponse, AxiosError<DefaultError>, CallWithNoContentResponseResponse, ReturnType<typeof callWithNoContentResponseQueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await callWithNoContentResponse({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: callWithNoContentResponseQueryKey(options)\n});\n\nexport const callWithResponseAndNoContentResponseQueryKey = (options?: Options<CallWithResponseAndNoContentResponseData>) => createQueryKey('callWithResponseAndNoContentResponse', options);\n\nexport const callWithResponseAndNoContentResponseOptions = (options?: Options<CallWithResponseAndNoContentResponseData>) => queryOptions<CallWithResponseAndNoContentResponseResponse, AxiosError<DefaultError>, CallWithResponseAndNoContentResponseResponse, ReturnType<typeof callWithResponseAndNoContentResponseQueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await callWithResponseAndNoContentResponse({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: callWithResponseAndNoContentResponseQueryKey(options)\n});\n\nexport const dummyAQueryKey = (options?: Options<DummyAData>) => createQueryKey('dummyA', options);\n\nexport const dummyAOptions = (options?: Options<DummyAData>) => queryOptions<DummyAResponse, AxiosError<DefaultError>, DummyAResponse, ReturnType<typeof dummyAQueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await dummyA({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: dummyAQueryKey(options)\n});\n\nexport const dummyBQueryKey = (options?: Options<DummyBData>) => createQueryKey('dummyB', options);\n\nexport const dummyBOptions = (options?: Options<DummyBData>) => queryOptions<DummyBResponse, AxiosError<DefaultError>, DummyBResponse, ReturnType<typeof dummyBQueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await dummyB({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: dummyBQueryKey(options)\n});\n\nexport const callWithResponseQueryKey = (options?: Options<CallWithResponseData>) => createQueryKey('callWithResponse', options);\n\nexport const callWithResponseOptions = (options?: Options<CallWithResponseData>) => queryOptions<CallWithResponseResponse, AxiosError<DefaultError>, CallWithResponseResponse, ReturnType<typeof callWithResponseQueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await callWithResponse({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: callWithResponseQueryKey(options)\n});\n\nexport const callWithDuplicateResponsesMutation = (options?: Partial<Options<CallWithDuplicateResponsesData>>): UseMutationOptions<CallWithDuplicateResponsesResponse, AxiosError<CallWithDuplicateResponsesError>, Options<CallWithDuplicateResponsesData>> => {\n    const mutationOptions: UseMutationOptions<CallWithDuplicateResponsesResponse, AxiosError<CallWithDuplicateResponsesError>, Options<CallWithDuplicateResponsesData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await callWithDuplicateResponses({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const callWithResponsesMutation = (options?: Partial<Options<CallWithResponsesData>>): UseMutationOptions<CallWithResponsesResponse, AxiosError<CallWithResponsesError>, Options<CallWithResponsesData>> => {\n    const mutationOptions: UseMutationOptions<CallWithResponsesResponse, AxiosError<CallWithResponsesError>, Options<CallWithResponsesData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await callWithResponses({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const collectionFormatQueryKey = (options: Options<CollectionFormatData>) => createQueryKey('collectionFormat', options);\n\nexport const collectionFormatOptions = (options: Options<CollectionFormatData>) => queryOptions<unknown, AxiosError<DefaultError>, unknown, ReturnType<typeof collectionFormatQueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await collectionFormat({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: collectionFormatQueryKey(options)\n});\n\nexport const typesQueryKey = (options: Options<TypesData>) => createQueryKey('types', options);\n\nexport const typesOptions = (options: Options<TypesData>) => queryOptions<TypesResponse, AxiosError<DefaultError>, TypesResponse, ReturnType<typeof typesQueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await types({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: typesQueryKey(options)\n});\n\nexport const uploadFileMutation = (options?: Partial<Options<UploadFileData>>): UseMutationOptions<UploadFileResponse, AxiosError<DefaultError>, Options<UploadFileData>> => {\n    const mutationOptions: UseMutationOptions<UploadFileResponse, AxiosError<DefaultError>, Options<UploadFileData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await uploadFile({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const fileResponseQueryKey = (options: Options<FileResponseData>) => createQueryKey('fileResponse', options);\n\nexport const fileResponseOptions = (options: Options<FileResponseData>) => queryOptions<FileResponseResponse, AxiosError<DefaultError>, FileResponseResponse, ReturnType<typeof fileResponseQueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await fileResponse({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: fileResponseQueryKey(options)\n});\n\nexport const complexTypesQueryKey = (options: Options<ComplexTypesData>) => createQueryKey('complexTypes', options);\n\nexport const complexTypesOptions = (options: Options<ComplexTypesData>) => queryOptions<ComplexTypesResponse, AxiosError<DefaultError>, ComplexTypesResponse, ReturnType<typeof complexTypesQueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await complexTypes({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: complexTypesQueryKey(options)\n});\n\nexport const multipartResponseQueryKey = (options?: Options<MultipartResponseData>) => createQueryKey('multipartResponse', options);\n\nexport const multipartResponseOptions = (options?: Options<MultipartResponseData>) => queryOptions<MultipartResponseResponse, AxiosError<DefaultError>, MultipartResponseResponse, ReturnType<typeof multipartResponseQueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await multipartResponse({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: multipartResponseQueryKey(options)\n});\n\nexport const multipartRequestMutation = (options?: Partial<Options<MultipartRequestData>>): UseMutationOptions<unknown, AxiosError<DefaultError>, Options<MultipartRequestData>> => {\n    const mutationOptions: UseMutationOptions<unknown, AxiosError<DefaultError>, Options<MultipartRequestData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await multipartRequest({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const complexParamsMutation = (options?: Partial<Options<ComplexParamsData>>): UseMutationOptions<ComplexParamsResponse, AxiosError<DefaultError>, Options<ComplexParamsData>> => {\n    const mutationOptions: UseMutationOptions<ComplexParamsResponse, AxiosError<DefaultError>, Options<ComplexParamsData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await complexParams({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const callWithResultFromHeaderMutation = (options?: Partial<Options<CallWithResultFromHeaderData>>): UseMutationOptions<unknown, AxiosError<DefaultError>, Options<CallWithResultFromHeaderData>> => {\n    const mutationOptions: UseMutationOptions<unknown, AxiosError<DefaultError>, Options<CallWithResultFromHeaderData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await callWithResultFromHeader({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const testErrorCodeMutation = (options?: Partial<Options<TestErrorCodeData>>): UseMutationOptions<unknown, AxiosError<DefaultError>, Options<TestErrorCodeData>> => {\n    const mutationOptions: UseMutationOptions<unknown, AxiosError<DefaultError>, Options<TestErrorCodeData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await testErrorCode({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const nonAsciiæøåÆøÅöôêÊ字符串Mutation = (options?: Partial<Options<NonAsciiæøåÆøÅöôêÊ字符串Data>>): UseMutationOptions<NonAsciiæøåÆøÅöôêÊ字符串Response, AxiosError<DefaultError>, Options<NonAsciiæøåÆøÅöôêÊ字符串Data>> => {\n    const mutationOptions: UseMutationOptions<NonAsciiæøåÆøÅöôêÊ字符串Response, AxiosError<DefaultError>, Options<NonAsciiæøåÆøÅöôêÊ字符串Data>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await nonAsciiæøåÆøÅöôêÊ字符串({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\n/**\n * Login User\n */\nexport const putWithFormUrlEncodedMutation = (options?: Partial<Options<PutWithFormUrlEncodedData>>): UseMutationOptions<unknown, AxiosError<DefaultError>, Options<PutWithFormUrlEncodedData>> => {\n    const mutationOptions: UseMutationOptions<unknown, AxiosError<DefaultError>, Options<PutWithFormUrlEncodedData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await putWithFormUrlEncoded({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/preact-query/axios/client/client.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { AxiosError, AxiosInstance, RawAxiosRequestHeaders } from 'axios';\nimport axios from 'axios';\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 } from './types.gen';\nimport { buildUrl, createConfig, mergeConfigs, mergeHeaders, setAuthParams } from './utils.gen';\n\nexport const createClient = (config: Config = {}): Client => {\n  let _config = mergeConfigs(createConfig(), config);\n\n  let instance: AxiosInstance;\n\n  if (_config.axios && !('Axios' in _config.axios)) {\n    instance = _config.axios;\n  } else {\n    // eslint-disable-next-line @typescript-eslint/no-unused-vars\n    const { auth, ...configWithoutAuth } = _config;\n    instance = axios.create(configWithoutAuth);\n  }\n\n  const getConfig = (): Config => ({ ..._config });\n\n  const setConfig = (config: Config): Config => {\n    _config = mergeConfigs(_config, config);\n    instance.defaults = {\n      ...instance.defaults,\n      ..._config,\n      // @ts-expect-error\n      headers: mergeHeaders(instance.defaults.headers, _config.headers),\n    };\n    return getConfig();\n  };\n\n  const beforeRequest = async (options: RequestOptions) => {\n    const opts = {\n      ..._config,\n      ...options,\n      axios: options.axios ?? _config.axios ?? instance,\n      headers: mergeHeaders(_config.headers, options.headers),\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.body = opts.bodySerializer(opts.body);\n    }\n\n    const url = buildUrl(opts);\n\n    return { opts, url };\n  };\n\n  // @ts-expect-error\n  const request: Client['request'] = async (options) => {\n    // @ts-expect-error\n    const { opts, url } = await beforeRequest(options);\n    try {\n      // assign Axios here for consistency with fetch\n      const _axios = opts.axios!;\n      // eslint-disable-next-line @typescript-eslint/no-unused-vars\n      const { auth, ...optsWithoutAuth } = opts;\n      const response = await _axios({\n        ...optsWithoutAuth,\n        baseURL: '', // the baseURL is already included in `url`\n        data: getValidRequestBody(opts),\n        headers: opts.headers as RawAxiosRequestHeaders,\n        // let `paramsSerializer()` handle query params if it exists\n        params: opts.paramsSerializer ? opts.query : undefined,\n        url,\n      });\n\n      let { data } = response;\n\n      if (opts.responseType === '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 {\n        ...response,\n        data: data ?? {},\n      };\n    } catch (error) {\n      const e = error as AxiosError;\n      if (opts.throwOnError) {\n        throw e;\n      }\n      // @ts-expect-error\n      e.error = e.response?.data ?? {};\n      return e;\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 Record<string, string>,\n      method,\n      serializedBody: getValidRequestBody(opts) as BodyInit | null | undefined,\n      // @ts-expect-error\n      signal: opts.signal,\n      url,\n    });\n  };\n\n  const _buildUrl: Client['buildUrl'] = (options) =>\n    buildUrl({ axios: instance, ..._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    instance,\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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/preact-query/axios/client/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type { Auth } from '../core/auth.gen';\nexport type { QuerySerializerOptions } from '../core/bodySerializer.gen';\nexport {\n  formDataBodySerializer,\n  jsonBodySerializer,\n  urlSearchParamsBodySerializer,\n} from '../core/bodySerializer.gen';\nexport { buildClientParams } from '../core/params.gen';\nexport { serializeQueryKeyValue } from '../core/queryKeySerializer.gen';\nexport { createClient } from './client.gen';\nexport type {\n  Client,\n  ClientOptions,\n  Config,\n  CreateClientConfig,\n  Options,\n  RequestOptions,\n  RequestResult,\n  TDataShape,\n} from './types.gen';\nexport { createConfig } from './utils.gen';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/preact-query/axios/client/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type {\n  AxiosError,\n  AxiosInstance,\n  AxiosRequestHeaders,\n  AxiosResponse,\n  AxiosStatic,\n  CreateAxiosDefaults,\n} from 'axios';\n\nimport type { Auth } from '../core/auth.gen';\nimport type {\n  ServerSentEventsOptions,\n  ServerSentEventsResult,\n} from '../core/serverSentEvents.gen';\nimport type { Client as CoreClient, Config as CoreConfig } from '../core/types.gen';\n\nexport interface Config<T extends ClientOptions = ClientOptions>\n  extends Omit<CreateAxiosDefaults, 'auth' | 'baseURL' | 'headers' | 'method'>, CoreConfig {\n  /**\n   * Axios implementation. You can use this option to provide either an\n   * `AxiosStatic` or an `AxiosInstance`.\n   *\n   * @default axios\n   */\n  axios?: AxiosStatic | AxiosInstance;\n  /**\n   * Base URL for all requests made by this client.\n   */\n  baseURL?: T['baseURL'];\n  /**\n   * An object containing any HTTP headers that you want to pre-populate your\n   * `Headers` object with.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/Headers/Headers#init See more}\n   */\n  headers?:\n    | AxiosRequestHeaders\n    | Record<\n        string,\n        string | number | boolean | (string | number | boolean)[] | null | undefined | unknown\n      >;\n  /**\n   * Throw an error instead of returning it in the response?\n   *\n   * @default false\n   */\n  throwOnError?: T['throwOnError'];\n}\n\nexport interface RequestOptions<\n  TData = unknown,\n  ThrowOnError extends boolean = boolean,\n  Url extends string = string,\n>\n  extends\n    Config<{\n      throwOnError: ThrowOnError;\n    }>,\n    Pick<\n      ServerSentEventsOptions<TData>,\n      | 'onRequest'\n      | 'onSseError'\n      | 'onSseEvent'\n      | 'sseDefaultRetryDelay'\n      | 'sseMaxRetryAttempts'\n      | 'sseMaxRetryDelay'\n    > {\n  /**\n   * Any body that you want to add to your request.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/fetch#body}\n   */\n  body?: unknown;\n  path?: Record<string, unknown>;\n  query?: Record<string, unknown>;\n  /**\n   * Security mechanism(s) to use for the request.\n   */\n  security?: ReadonlyArray<Auth>;\n  url: Url;\n}\n\nexport interface ClientOptions {\n  baseURL?: string;\n  throwOnError?: boolean;\n}\n\nexport type RequestResult<\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = boolean,\n> = ThrowOnError extends true\n  ? Promise<AxiosResponse<TData extends Record<string, unknown> ? TData[keyof TData] : TData>>\n  : Promise<\n      | (AxiosResponse<TData extends Record<string, unknown> ? TData[keyof TData] : TData> & {\n          error: undefined;\n        })\n      | (AxiosError<TError extends Record<string, unknown> ? TError[keyof TError] : TError> & {\n          data: undefined;\n          error: TError extends Record<string, unknown> ? TError[keyof TError] : TError;\n        })\n    >;\n\ntype MethodFn = <TData = unknown, TError = unknown, ThrowOnError extends boolean = false>(\n  options: Omit<RequestOptions<TData, ThrowOnError>, 'method'>,\n) => RequestResult<TData, TError, ThrowOnError>;\n\ntype SseFn = <TData = unknown, TError = unknown, ThrowOnError extends boolean = false>(\n  options: Omit<RequestOptions<TData, ThrowOnError>, 'method'>,\n) => Promise<ServerSentEventsResult<TData, TError>>;\n\ntype RequestFn = <TData = unknown, TError = unknown, ThrowOnError extends boolean = false>(\n  options: Omit<RequestOptions<TData, ThrowOnError>, 'method'> &\n    Pick<Required<RequestOptions<TData, ThrowOnError>>, 'method'>,\n) => RequestResult<TData, TError, ThrowOnError>;\n\ntype BuildUrlFn = <\n  TData extends {\n    body?: unknown;\n    path?: Record<string, unknown>;\n    query?: Record<string, unknown>;\n    url: string;\n  },\n>(\n  options: TData & Options<TData>,\n) => string;\n\nexport type Client = CoreClient<RequestFn, Config, MethodFn, BuildUrlFn, SseFn> & {\n  instance: AxiosInstance;\n};\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 = ClientOptions> = (\n  override?: Config<ClientOptions & T>,\n) => Config<Required<ClientOptions> & T>;\n\nexport interface TDataShape {\n  body?: unknown;\n  headers?: unknown;\n  path?: unknown;\n  query?: unknown;\n  url: string;\n}\n\ntype OmitKeys<T, K> = Pick<T, Exclude<keyof T, K>>;\n\nexport type Options<\n  TData extends TDataShape = TDataShape,\n  ThrowOnError extends boolean = boolean,\n  TResponse = unknown,\n> = OmitKeys<RequestOptions<TResponse, ThrowOnError>, 'body' | 'path' | 'query' | 'url'> &\n  ([TData] extends [never] ? unknown : Omit<TData, 'url'>);\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/preact-query/axios/client/utils.gen.ts",
    "content": "// 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 {\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\nconst checkForExistence = (\n  options: Pick<RequestOptions, 'auth' | 'query'> & {\n    headers: Record<any, unknown>;\n  },\n  name?: string,\n): boolean => {\n  if (!name) {\n    return false;\n  }\n  if (name in options.headers || options.query?.[name]) {\n    return true;\n  }\n  if (\n    'Cookie' in options.headers &&\n    options.headers['Cookie'] &&\n    typeof options.headers['Cookie'] === 'string'\n  ) {\n    return options.headers['Cookie'].includes(`${name}=`);\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: Record<any, unknown>;\n  }) => {\n  for (const auth of security) {\n    if (checkForExistence(options, auth.name)) {\n      continue;\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        const value = `${name}=${token}`;\n        if ('Cookie' in options.headers && options.headers['Cookie']) {\n          options.headers['Cookie'] = `${options.headers['Cookie']}; ${value}`;\n        } else {\n          options.headers['Cookie'] = value;\n        }\n        break;\n      }\n      case 'header':\n      default:\n        options.headers[name] = token;\n        break;\n    }\n  }\n};\n\nexport const buildUrl: Client['buildUrl'] = (options) => {\n  const instanceBaseUrl = options.axios?.defaults?.baseURL;\n\n  const baseUrl =\n    !!options.baseURL && typeof options.baseURL === 'string' ? options.baseURL : instanceBaseUrl;\n\n  return getUrl({\n    baseUrl: baseUrl as string,\n    path: options.path,\n    // let `paramsSerializer()` handle query params if it exists\n    query: !options.paramsSerializer ? options.query : undefined,\n    querySerializer:\n      typeof options.querySerializer === 'function'\n        ? options.querySerializer\n        : createQuerySerializer(options.querySerializer),\n    url: options.url,\n  });\n};\n\nexport const mergeConfigs = (a: Config, b: Config): Config => {\n  const config = { ...a, ...b };\n  config.headers = mergeHeaders(a.headers, b.headers);\n  return config;\n};\n\n/**\n * Special Axios headers keywords allowing to set headers by request method.\n */\nexport const axiosHeadersKeywords = [\n  'common',\n  'delete',\n  'get',\n  'head',\n  'patch',\n  'post',\n  'put',\n] as const;\n\nexport const mergeHeaders = (\n  ...headers: Array<Required<Config>['headers'] | undefined>\n): Record<any, unknown> => {\n  const mergedHeaders: Record<any, unknown> = {};\n  for (const header of headers) {\n    if (!header || typeof header !== 'object') {\n      continue;\n    }\n\n    const iterator = Object.entries(header);\n\n    for (const [key, value] of iterator) {\n      if (\n        axiosHeadersKeywords.includes(key as (typeof axiosHeadersKeywords)[number]) &&\n        typeof value === 'object'\n      ) {\n        mergedHeaders[key] = {\n          ...(mergedHeaders[key] as Record<any, unknown>),\n          ...value,\n        };\n      } else if (value === null) {\n        delete mergedHeaders[key];\n      } else if (Array.isArray(value)) {\n        for (const v of value) {\n          // @ts-expect-error\n          mergedHeaders[key] = [...(mergedHeaders[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[key] = typeof value === 'object' ? JSON.stringify(value) : (value as string);\n      }\n    }\n  }\n  return mergedHeaders;\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  ...override,\n});\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/preact-query/axios/client.gen.ts",
    "content": "// 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: 'http://localhost:3000/base' }));\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/preact-query/axios/core/auth.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/preact-query/axios/core/bodySerializer.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/preact-query/axios/core/params.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/preact-query/axios/core/pathSerializer.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/preact-query/axios/core/queryKeySerializer.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\n/**\n * JSON-friendly union that mirrors what Pinia Colada can hash.\n */\nexport type JsonValue =\n  | null\n  | string\n  | number\n  | boolean\n  | JsonValue[]\n  | { [key: string]: JsonValue };\n\n/**\n * Replacer that converts non-JSON values (bigint, Date, etc.) to safe substitutes.\n */\nexport const queryKeyJsonReplacer = (_key: string, value: unknown) => {\n  if (value === undefined || typeof value === 'function' || typeof value === 'symbol') {\n    return undefined;\n  }\n  if (typeof value === 'bigint') {\n    return value.toString();\n  }\n  if (value instanceof Date) {\n    return value.toISOString();\n  }\n  return value;\n};\n\n/**\n * Safely stringifies a value and parses it back into a JsonValue.\n */\nexport const stringifyToJsonValue = (input: unknown): JsonValue | undefined => {\n  try {\n    const json = JSON.stringify(input, queryKeyJsonReplacer);\n    if (json === undefined) {\n      return undefined;\n    }\n    return JSON.parse(json) as JsonValue;\n  } catch {\n    return undefined;\n  }\n};\n\n/**\n * Detects plain objects (including objects with a null prototype).\n */\nconst isPlainObject = (value: unknown): value is Record<string, unknown> => {\n  if (value === null || typeof value !== 'object') {\n    return false;\n  }\n  const prototype = Object.getPrototypeOf(value as object);\n  return prototype === Object.prototype || prototype === null;\n};\n\n/**\n * Turns URLSearchParams into a sorted JSON object for deterministic keys.\n */\nconst serializeSearchParams = (params: URLSearchParams): JsonValue => {\n  const entries = Array.from(params.entries()).sort(([a], [b]) => a.localeCompare(b));\n  const result: Record<string, JsonValue> = {};\n\n  for (const [key, value] of entries) {\n    const existing = result[key];\n    if (existing === undefined) {\n      result[key] = value;\n      continue;\n    }\n\n    if (Array.isArray(existing)) {\n      (existing as string[]).push(value);\n    } else {\n      result[key] = [existing, value];\n    }\n  }\n\n  return result;\n};\n\n/**\n * Normalizes any accepted value into a JSON-friendly shape for query keys.\n */\nexport const serializeQueryKeyValue = (value: unknown): JsonValue | undefined => {\n  if (value === null) {\n    return null;\n  }\n\n  if (typeof value === 'string' || typeof value === 'number' || typeof value === 'boolean') {\n    return value;\n  }\n\n  if (value === undefined || typeof value === 'function' || typeof value === 'symbol') {\n    return undefined;\n  }\n\n  if (typeof value === 'bigint') {\n    return value.toString();\n  }\n\n  if (value instanceof Date) {\n    return value.toISOString();\n  }\n\n  if (Array.isArray(value)) {\n    return stringifyToJsonValue(value);\n  }\n\n  if (typeof URLSearchParams !== 'undefined' && value instanceof URLSearchParams) {\n    return serializeSearchParams(value);\n  }\n\n  if (isPlainObject(value)) {\n    return stringifyToJsonValue(value);\n  }\n\n  return undefined;\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/preact-query/axios/core/serverSentEvents.gen.ts",
    "content": "// 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 const 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            // Normalize line endings: CRLF -> LF, then CR -> LF\n            buffer = buffer.replace(/\\r\\n/g, '\\n').replace(/\\r/g, '\\n');\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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/preact-query/axios/core/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { Auth, AuthToken } from './auth.gen';\nimport type { BodySerializer, QuerySerializer, QuerySerializerOptions } from './bodySerializer.gen';\n\nexport type HttpMethod =\n  | 'connect'\n  | 'delete'\n  | 'get'\n  | 'head'\n  | 'options'\n  | 'patch'\n  | 'post'\n  | 'put'\n  | 'trace';\n\nexport type Client<\n  RequestFn = never,\n  Config = unknown,\n  MethodFn = never,\n  BuildUrlFn = never,\n  SseFn = never,\n> = {\n  /**\n   * Returns the final request URL.\n   */\n  buildUrl: BuildUrlFn;\n  getConfig: () => Config;\n  request: RequestFn;\n  setConfig: (config: Config) => Config;\n} & {\n  [K in HttpMethod]: MethodFn;\n} & ([SseFn] extends [never] ? { sse?: never } : { sse: { [K in HttpMethod]: SseFn } });\n\nexport interface Config {\n  /**\n   * Auth token or a function returning auth token. The resolved value will be\n   * added to the request payload as defined by its `security` array.\n   */\n  auth?: ((auth: Auth) => Promise<AuthToken> | AuthToken) | AuthToken;\n  /**\n   * A function for serializing request body parameter. By default,\n   * {@link JSON.stringify()} will be used.\n   */\n  bodySerializer?: BodySerializer | null;\n  /**\n   * An object containing any HTTP headers that you want to pre-populate your\n   * `Headers` object with.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/Headers/Headers#init See more}\n   */\n  headers?:\n    | RequestInit['headers']\n    | Record<\n        string,\n        string | number | boolean | (string | number | boolean)[] | null | undefined | unknown\n      >;\n  /**\n   * The request method.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/fetch#method See more}\n   */\n  method?: Uppercase<HttpMethod>;\n  /**\n   * A function for serializing request query parameters. By default, arrays\n   * will be exploded in form style, objects will be exploded in deepObject\n   * style, and reserved characters are percent-encoded.\n   *\n   * This method will have no effect if the native `paramsSerializer()` Axios\n   * API function is used.\n   *\n   * {@link https://swagger.io/docs/specification/serialization/#query View examples}\n   */\n  querySerializer?: QuerySerializer | QuerySerializerOptions;\n  /**\n   * A function validating request data. This is useful if you want to ensure\n   * the request conforms to the desired shape, so it can be safely sent to\n   * the server.\n   */\n  requestValidator?: (data: unknown) => Promise<unknown>;\n  /**\n   * A function transforming response data before it's returned. This is useful\n   * for post-processing data, e.g. converting ISO strings into Date objects.\n   */\n  responseTransformer?: (data: unknown) => Promise<unknown>;\n  /**\n   * A function validating response data. This is useful if you want to ensure\n   * the response conforms to the desired shape, so it can be safely passed to\n   * the transformers and returned to the user.\n   */\n  responseValidator?: (data: unknown) => Promise<unknown>;\n}\n\ntype IsExactlyNeverOrNeverUndefined<T> = [T] extends [never]\n  ? true\n  : [T] extends [never | undefined]\n    ? [undefined] extends [T]\n      ? false\n      : true\n    : false;\n\nexport type OmitNever<T extends Record<string, unknown>> = {\n  [K in keyof T as IsExactlyNeverOrNeverUndefined<T[K]> extends true ? never : K]: T[K];\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/preact-query/axios/core/utils.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/preact-query/axios/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport { apiVVersionODataControllerCount, callToTestOrderOfParams, callWithDefaultOptionalParameters, callWithDefaultParameters, callWithDescriptions, callWithDuplicateResponses, callWithNoContentResponse, callWithParameters, callWithResponse, callWithResponseAndNoContentResponse, callWithResponses, callWithResultFromHeader, callWithWeirdParameterNames, collectionFormat, complexParams, complexTypes, deleteCallWithoutParametersAndResponse, deleteFoo, deprecatedCall, dummyA, dummyB, duplicateName, duplicateName2, duplicateName3, duplicateName4, export_, fileResponse, fooWow, getApiVbyApiVersionSimpleOperation, getCallWithOptionalParam, getCallWithoutParametersAndResponse, headCallWithoutParametersAndResponse, import_, multipartRequest, multipartResponse, nonAsciiæøåÆøÅöôêÊ字符串, type Options, optionsCallWithoutParametersAndResponse, patchApiVbyApiVersionNoTag, patchCallWithoutParametersAndResponse, postApiVbyApiVersionFormData, postApiVbyApiVersionRequestBody, postCallWithOptionalParam, postCallWithoutParametersAndResponse, putCallWithoutParametersAndResponse, putWithFormUrlEncoded, testErrorCode, types, uploadFile } from './sdk.gen';\nexport type { _3eNum1Период, _400, AdditionalPropertiesIntegerIssue, AdditionalPropertiesUnknownIssue, AdditionalPropertiesUnknownIssue2, AdditionalPropertiesUnknownIssue3, AdditionalPropertiesUnknownIssueWritable, AnyOfAnyAndNull, AnyOfArrays, ApiVVersionODataControllerCountData, ApiVVersionODataControllerCountResponse, ApiVVersionODataControllerCountResponses, ArrayWithAnyOfProperties, ArrayWithArray, ArrayWithBooleans, ArrayWithNumbers, ArrayWithProperties, ArrayWithReferences, ArrayWithStrings, CallToTestOrderOfParamsData, CallWithDefaultOptionalParametersData, CallWithDefaultParametersData, CallWithDescriptionsData, CallWithDuplicateResponsesData, CallWithDuplicateResponsesError, CallWithDuplicateResponsesErrors, CallWithDuplicateResponsesResponse, CallWithDuplicateResponsesResponses, CallWithNoContentResponseData, CallWithNoContentResponseResponse, CallWithNoContentResponseResponses, CallWithParametersData, CallWithResponseAndNoContentResponseData, CallWithResponseAndNoContentResponseResponse, CallWithResponseAndNoContentResponseResponses, CallWithResponseData, CallWithResponseResponse, CallWithResponseResponses, CallWithResponsesData, CallWithResponsesError, CallWithResponsesErrors, CallWithResponsesResponse, CallWithResponsesResponses, CallWithResultFromHeaderData, CallWithResultFromHeaderErrors, CallWithResultFromHeaderResponses, CallWithWeirdParameterNamesData, CamelCaseCommentWithBreaks, CharactersInDescription, ClientOptions, CollectionFormatData, CommentWithBackticks, CommentWithBackticksAndQuotes, CommentWithBreaks, CommentWithExpressionPlaceholders, CommentWithQuotes, CommentWithReservedCharacters, CommentWithSlashes, ComplexParamsData, ComplexParamsResponse, ComplexParamsResponses, ComplexTypesData, ComplexTypesErrors, ComplexTypesResponse, ComplexTypesResponses, CompositionBaseModel, CompositionExtendedModel, CompositionWithAllOfAndNullable, CompositionWithAnyOf, CompositionWithAnyOfAndNullable, CompositionWithAnyOfAnonymous, CompositionWithNestedAnyAndTypeNull, CompositionWithNestedAnyOfAndNull, CompositionWithOneOf, CompositionWithOneOfAndComplexArrayDictionary, CompositionWithOneOfAndNullable, CompositionWithOneOfAndProperties, CompositionWithOneOfAndSimpleArrayDictionary, CompositionWithOneOfAndSimpleDictionary, CompositionWithOneOfAnonymous, CompositionWithOneOfDiscriminator, ConstValue, Default, DeleteCallWithoutParametersAndResponseData, DeleteFooData, DeleteFooData2, DeleteFooData3, DeprecatedCallData, DeprecatedModel, DictionaryWithArray, DictionaryWithDictionary, DictionaryWithProperties, DictionaryWithPropertiesAndAdditionalProperties, DictionaryWithReference, DictionaryWithString, DummyAData, DummyAResponse, DummyAResponses, DummyBData, DummyBResponse, DummyBResponses, DuplicateName2Data, DuplicateName3Data, DuplicateName4Data, DuplicateNameData, EnumFromDescription, EnumWithExtensions, EnumWithNumbers, EnumWithReplacedCharacters, EnumWithStrings, EnumWithXEnumNames, ExportData, ExternalRefA, ExternalRefB, ExternalSharedModel, File, FileResponseData, FileResponseResponse, FileResponseResponses, FileWritable, FooWowData, FooWowResponses, FreeFormObjectWithAdditionalPropertiesEqEmptyObject, FreeFormObjectWithAdditionalPropertiesEqTrue, FreeFormObjectWithoutAdditionalProperties, GenericSchemaDuplicateIssue1SystemBoolean, GenericSchemaDuplicateIssue1SystemBooleanWritable, GenericSchemaDuplicateIssue1SystemString, GenericSchemaDuplicateIssue1SystemStringWritable, GetApiVbyApiVersionSimpleOperationData, GetApiVbyApiVersionSimpleOperationError, GetApiVbyApiVersionSimpleOperationErrors, GetApiVbyApiVersionSimpleOperationResponse, GetApiVbyApiVersionSimpleOperationResponses, GetCallWithOptionalParamData, GetCallWithoutParametersAndResponseData, HeadCallWithoutParametersAndResponseData, Import, ImportData, ImportResponse, ImportResponses, IoK8sApimachineryPkgApisMetaV1DeleteOptions, IoK8sApimachineryPkgApisMetaV1Preconditions, ModelCircle, ModelFromZendesk, ModelSquare, ModelThatExtends, ModelThatExtendsExtends, ModelWithAdditionalPropertiesEqTrue, ModelWithAdditionalPropertiesRef, ModelWithAnyOfConstantSizeArray, ModelWithAnyOfConstantSizeArrayAndIntersect, ModelWithAnyOfConstantSizeArrayNullable, ModelWithAnyOfConstantSizeArrayWithNSizeAndOptions, ModelWithAnyOfConstantSizeArrayWithNSizeAndOptionsWritable, ModelWithArray, ModelWithArrayReadOnlyAndWriteOnly, ModelWithArrayReadOnlyAndWriteOnlyWritable, ModelWithBackticksInDescription, ModelWithBoolean, ModelWithCircularReference, ModelWithConst, ModelWithConstantSizeArray, ModelWithDictionary, ModelWithDuplicateImports, ModelWithDuplicateProperties, ModelWithEnum, ModelWithEnumFromDescription, ModelWithEnumWithHyphen, ModelWithInteger, ModelWithNestedArrayEnums, ModelWithNestedArrayEnumsData, ModelWithNestedArrayEnumsDataBar, ModelWithNestedArrayEnumsDataFoo, ModelWithNestedCompositionEnums, ModelWithNestedEnums, ModelWithNestedProperties, ModelWithNullableObject, ModelWithNullableString, ModelWithNumericEnumUnion, ModelWithOneOfAndProperties, ModelWithOneOfEnum, ModelWithOrderedProperties, ModelWithPattern, ModelWithPatternWritable, ModelWithPrefixItemsConstantSizeArray, ModelWithProperties, ModelWithPropertiesWritable, ModelWithReadOnlyAndWriteOnly, ModelWithReadOnlyAndWriteOnlyWritable, ModelWithReference, ModelWithReferenceWritable, ModelWithString, ModelWithStringError, MultipartRequestData, MultipartResponseData, MultipartResponseResponse, MultipartResponseResponses, NestedAnyOfArraysNullable, NonAsciiæøåÆøÅöôêÊ字符串Data, NonAsciiæøåÆøÅöôêÊ字符串Response, NonAsciiæøåÆøÅöôêÊ字符串Responses, NonAsciiStringæøåÆøÅöôêÊ字符串, NullableObject, OneOfAllOfIssue, OneOfAllOfIssueWritable, OptionsCallWithoutParametersAndResponseData, Pageable, ParameterSimpleParameterUnused, PatchApiVbyApiVersionNoTagData, PatchApiVbyApiVersionNoTagResponses, PatchCallWithoutParametersAndResponseData, PostApiVbyApiVersionFormDataData, PostApiVbyApiVersionRequestBodyData, PostCallWithOptionalParamData, PostCallWithOptionalParamResponse, PostCallWithOptionalParamResponses, PostCallWithoutParametersAndResponseData, PostServiceWithEmptyTagResponse, PostServiceWithEmptyTagResponse2, PutCallWithoutParametersAndResponseData, PutWithFormUrlEncodedData, SchemaWithFormRestrictedKeys, SimpleBoolean, SimpleFile, SimpleFormData, SimpleInteger, SimpleParameter, SimpleReference, SimpleRequestBody, SimpleString, SimpleStringWithPattern, TestErrorCodeData, TestErrorCodeErrors, TestErrorCodeResponses, TypesData, TypesResponse, TypesResponses, UploadFileData, UploadFileResponse, UploadFileResponses, XFooBar } from './types.gen';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/preact-query/axios/sdk.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport { type Client, formDataBodySerializer, type Options as Options2, type TDataShape, urlSearchParamsBodySerializer } from './client';\nimport { client } from './client.gen';\nimport type { ApiVVersionODataControllerCountData, ApiVVersionODataControllerCountResponses, CallToTestOrderOfParamsData, CallWithDefaultOptionalParametersData, CallWithDefaultParametersData, CallWithDescriptionsData, CallWithDuplicateResponsesData, CallWithDuplicateResponsesErrors, CallWithDuplicateResponsesResponses, CallWithNoContentResponseData, CallWithNoContentResponseResponses, CallWithParametersData, CallWithResponseAndNoContentResponseData, CallWithResponseAndNoContentResponseResponses, CallWithResponseData, CallWithResponseResponses, CallWithResponsesData, CallWithResponsesErrors, CallWithResponsesResponses, CallWithResultFromHeaderData, CallWithResultFromHeaderErrors, CallWithResultFromHeaderResponses, CallWithWeirdParameterNamesData, CollectionFormatData, ComplexParamsData, ComplexParamsResponses, ComplexTypesData, ComplexTypesErrors, ComplexTypesResponses, DeleteCallWithoutParametersAndResponseData, DeleteFooData3, DeprecatedCallData, DummyAData, DummyAResponses, DummyBData, DummyBResponses, DuplicateName2Data, DuplicateName3Data, DuplicateName4Data, DuplicateNameData, ExportData, FileResponseData, FileResponseResponses, FooWowData, FooWowResponses, GetApiVbyApiVersionSimpleOperationData, GetApiVbyApiVersionSimpleOperationErrors, GetApiVbyApiVersionSimpleOperationResponses, GetCallWithOptionalParamData, GetCallWithoutParametersAndResponseData, HeadCallWithoutParametersAndResponseData, ImportData, ImportResponses, MultipartRequestData, MultipartResponseData, MultipartResponseResponses, NonAsciiæøåÆøÅöôêÊ字符串Data, NonAsciiæøåÆøÅöôêÊ字符串Responses, OptionsCallWithoutParametersAndResponseData, PatchApiVbyApiVersionNoTagData, PatchApiVbyApiVersionNoTagResponses, PatchCallWithoutParametersAndResponseData, PostApiVbyApiVersionFormDataData, PostApiVbyApiVersionRequestBodyData, PostCallWithOptionalParamData, PostCallWithOptionalParamResponses, PostCallWithoutParametersAndResponseData, PutCallWithoutParametersAndResponseData, PutWithFormUrlEncodedData, TestErrorCodeData, TestErrorCodeErrors, TestErrorCodeResponses, TypesData, TypesResponses, UploadFileData, UploadFileResponses } from './types.gen';\n\nexport type Options<TData extends TDataShape = TDataShape, ThrowOnError extends boolean = boolean> = Options2<TData, ThrowOnError> & {\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\nexport const export_ = <ThrowOnError extends boolean = false>(options?: Options<ExportData, ThrowOnError>) => (options?.client ?? client).get<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/no+tag', ...options });\n\nexport const patchApiVbyApiVersionNoTag = <ThrowOnError extends boolean = false>(options?: Options<PatchApiVbyApiVersionNoTagData, ThrowOnError>) => (options?.client ?? client).patch<PatchApiVbyApiVersionNoTagResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/no+tag', ...options });\n\nexport const import_ = <ThrowOnError extends boolean = false>(options: Options<ImportData, ThrowOnError>) => (options.client ?? client).post<ImportResponses, unknown, ThrowOnError>({\n    responseType: 'json',\n    url: '/api/v{api-version}/no+tag',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options.headers\n    }\n});\n\nexport const fooWow = <ThrowOnError extends boolean = false>(options?: Options<FooWowData, ThrowOnError>) => (options?.client ?? client).put<FooWowResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/no+tag', ...options });\n\nexport const apiVVersionODataControllerCount = <ThrowOnError extends boolean = false>(options?: Options<ApiVVersionODataControllerCountData, ThrowOnError>) => (options?.client ?? client).get<ApiVVersionODataControllerCountResponses, unknown, ThrowOnError>({\n    responseType: 'json',\n    url: '/api/v{api-version}/simple/$count',\n    ...options\n});\n\nexport const getApiVbyApiVersionSimpleOperation = <ThrowOnError extends boolean = false>(options: Options<GetApiVbyApiVersionSimpleOperationData, ThrowOnError>) => (options.client ?? client).get<GetApiVbyApiVersionSimpleOperationResponses, GetApiVbyApiVersionSimpleOperationErrors, ThrowOnError>({\n    responseType: 'json',\n    url: '/api/v{api-version}/simple:operation',\n    ...options\n});\n\nexport const deleteCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<DeleteCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).delete<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const getCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<GetCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).get<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const headCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<HeadCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).head<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const optionsCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<OptionsCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).options<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const patchCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<PatchCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).patch<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const postCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<PostCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).post<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const putCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<PutCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).put<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const deleteFoo = <ThrowOnError extends boolean = false>(options: Options<DeleteFooData3, ThrowOnError>) => (options.client ?? client).delete<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/foo/{foo_param}/bar/{BarParam}', ...options });\n\nexport const callWithDescriptions = <ThrowOnError extends boolean = false>(options?: Options<CallWithDescriptionsData, ThrowOnError>) => (options?.client ?? client).post<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/descriptions', ...options });\n\n/**\n * @deprecated\n */\nexport const deprecatedCall = <ThrowOnError extends boolean = false>(options: Options<DeprecatedCallData, ThrowOnError>) => (options.client ?? client).post<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/parameters/deprecated', ...options });\n\nexport const callWithParameters = <ThrowOnError extends boolean = false>(options: Options<CallWithParametersData, ThrowOnError>) => (options.client ?? client).post<unknown, unknown, ThrowOnError>({\n    url: '/api/v{api-version}/parameters/{parameterPath}',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options.headers\n    }\n});\n\nexport const callWithWeirdParameterNames = <ThrowOnError extends boolean = false>(options: Options<CallWithWeirdParameterNamesData, ThrowOnError>) => (options.client ?? client).post<unknown, unknown, ThrowOnError>({\n    url: '/api/v{api-version}/parameters/{parameter.path.1}/{parameter-path-2}/{PARAMETER-PATH-3}',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options.headers\n    }\n});\n\nexport const getCallWithOptionalParam = <ThrowOnError extends boolean = false>(options: Options<GetCallWithOptionalParamData, ThrowOnError>) => (options.client ?? client).get<unknown, unknown, ThrowOnError>({\n    url: '/api/v{api-version}/parameters',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options.headers\n    }\n});\n\nexport const postCallWithOptionalParam = <ThrowOnError extends boolean = false>(options: Options<PostCallWithOptionalParamData, ThrowOnError>) => (options.client ?? client).post<PostCallWithOptionalParamResponses, unknown, ThrowOnError>({\n    responseType: 'json',\n    url: '/api/v{api-version}/parameters',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options.headers\n    }\n});\n\nexport const postApiVbyApiVersionRequestBody = <ThrowOnError extends boolean = false>(options?: Options<PostApiVbyApiVersionRequestBodyData, ThrowOnError>) => (options?.client ?? client).post<unknown, unknown, ThrowOnError>({\n    url: '/api/v{api-version}/requestBody',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options?.headers\n    }\n});\n\nexport const postApiVbyApiVersionFormData = <ThrowOnError extends boolean = false>(options?: Options<PostApiVbyApiVersionFormDataData, ThrowOnError>) => (options?.client ?? client).post<unknown, unknown, ThrowOnError>({\n    ...formDataBodySerializer,\n    url: '/api/v{api-version}/formData',\n    ...options,\n    headers: {\n        'Content-Type': null,\n        ...options?.headers\n    }\n});\n\nexport const callWithDefaultParameters = <ThrowOnError extends boolean = false>(options?: Options<CallWithDefaultParametersData, ThrowOnError>) => (options?.client ?? client).get<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/defaults', ...options });\n\nexport const callWithDefaultOptionalParameters = <ThrowOnError extends boolean = false>(options?: Options<CallWithDefaultOptionalParametersData, ThrowOnError>) => (options?.client ?? client).post<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/defaults', ...options });\n\nexport const callToTestOrderOfParams = <ThrowOnError extends boolean = false>(options: Options<CallToTestOrderOfParamsData, ThrowOnError>) => (options.client ?? client).put<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/defaults', ...options });\n\nexport const duplicateName = <ThrowOnError extends boolean = false>(options?: Options<DuplicateNameData, ThrowOnError>) => (options?.client ?? client).delete<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/duplicate', ...options });\n\nexport const duplicateName2 = <ThrowOnError extends boolean = false>(options?: Options<DuplicateName2Data, ThrowOnError>) => (options?.client ?? client).get<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/duplicate', ...options });\n\nexport const duplicateName3 = <ThrowOnError extends boolean = false>(options?: Options<DuplicateName3Data, ThrowOnError>) => (options?.client ?? client).post<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/duplicate', ...options });\n\nexport const duplicateName4 = <ThrowOnError extends boolean = false>(options?: Options<DuplicateName4Data, ThrowOnError>) => (options?.client ?? client).put<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/duplicate', ...options });\n\nexport const callWithNoContentResponse = <ThrowOnError extends boolean = false>(options?: Options<CallWithNoContentResponseData, ThrowOnError>) => (options?.client ?? client).get<CallWithNoContentResponseResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/no-content', ...options });\n\nexport const callWithResponseAndNoContentResponse = <ThrowOnError extends boolean = false>(options?: Options<CallWithResponseAndNoContentResponseData, ThrowOnError>) => (options?.client ?? client).get<CallWithResponseAndNoContentResponseResponses, unknown, ThrowOnError>({\n    responseType: 'json',\n    url: '/api/v{api-version}/multiple-tags/response-and-no-content',\n    ...options\n});\n\nexport const dummyA = <ThrowOnError extends boolean = false>(options?: Options<DummyAData, ThrowOnError>) => (options?.client ?? client).get<DummyAResponses, unknown, ThrowOnError>({\n    responseType: 'json',\n    url: '/api/v{api-version}/multiple-tags/a',\n    ...options\n});\n\nexport const dummyB = <ThrowOnError extends boolean = false>(options?: Options<DummyBData, ThrowOnError>) => (options?.client ?? client).get<DummyBResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/multiple-tags/b', ...options });\n\nexport const callWithResponse = <ThrowOnError extends boolean = false>(options?: Options<CallWithResponseData, ThrowOnError>) => (options?.client ?? client).get<CallWithResponseResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/response', ...options });\n\nexport const callWithDuplicateResponses = <ThrowOnError extends boolean = false>(options?: Options<CallWithDuplicateResponsesData, ThrowOnError>) => (options?.client ?? client).post<CallWithDuplicateResponsesResponses, CallWithDuplicateResponsesErrors, ThrowOnError>({\n    responseType: 'json',\n    url: '/api/v{api-version}/response',\n    ...options\n});\n\nexport const callWithResponses = <ThrowOnError extends boolean = false>(options?: Options<CallWithResponsesData, ThrowOnError>) => (options?.client ?? client).put<CallWithResponsesResponses, CallWithResponsesErrors, ThrowOnError>({\n    responseType: 'json',\n    url: '/api/v{api-version}/response',\n    ...options\n});\n\nexport const collectionFormat = <ThrowOnError extends boolean = false>(options: Options<CollectionFormatData, ThrowOnError>) => (options.client ?? client).get<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/collectionFormat', ...options });\n\nexport const types = <ThrowOnError extends boolean = false>(options: Options<TypesData, ThrowOnError>) => (options.client ?? client).get<TypesResponses, unknown, ThrowOnError>({\n    responseType: 'json',\n    url: '/api/v{api-version}/types',\n    ...options\n});\n\nexport const uploadFile = <ThrowOnError extends boolean = false>(options: Options<UploadFileData, ThrowOnError>) => (options.client ?? client).post<UploadFileResponses, unknown, ThrowOnError>({\n    ...urlSearchParamsBodySerializer,\n    responseType: 'json',\n    url: '/api/v{api-version}/upload',\n    ...options,\n    headers: {\n        'Content-Type': 'application/x-www-form-urlencoded',\n        ...options.headers\n    }\n});\n\nexport const fileResponse = <ThrowOnError extends boolean = false>(options: Options<FileResponseData, ThrowOnError>) => (options.client ?? client).get<FileResponseResponses, unknown, ThrowOnError>({\n    responseType: 'blob',\n    url: '/api/v{api-version}/file/{id}',\n    ...options\n});\n\nexport const complexTypes = <ThrowOnError extends boolean = false>(options: Options<ComplexTypesData, ThrowOnError>) => (options.client ?? client).get<ComplexTypesResponses, ComplexTypesErrors, ThrowOnError>({\n    querySerializer: { parameters: { parameterObject: { object: { style: 'form' } } } },\n    responseType: 'json',\n    url: '/api/v{api-version}/complex',\n    ...options\n});\n\nexport const multipartResponse = <ThrowOnError extends boolean = false>(options?: Options<MultipartResponseData, ThrowOnError>) => (options?.client ?? client).get<MultipartResponseResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/multipart', ...options });\n\nexport const multipartRequest = <ThrowOnError extends boolean = false>(options?: Options<MultipartRequestData, ThrowOnError>) => (options?.client ?? client).post<unknown, unknown, ThrowOnError>({\n    ...formDataBodySerializer,\n    url: '/api/v{api-version}/multipart',\n    ...options,\n    headers: {\n        'Content-Type': null,\n        ...options?.headers\n    }\n});\n\nexport const complexParams = <ThrowOnError extends boolean = false>(options: Options<ComplexParamsData, ThrowOnError>) => (options.client ?? client).put<ComplexParamsResponses, unknown, ThrowOnError>({\n    responseType: 'json',\n    url: '/api/v{api-version}/complex/{id}',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json-patch+json',\n        ...options.headers\n    }\n});\n\nexport const callWithResultFromHeader = <ThrowOnError extends boolean = false>(options?: Options<CallWithResultFromHeaderData, ThrowOnError>) => (options?.client ?? client).post<CallWithResultFromHeaderResponses, CallWithResultFromHeaderErrors, ThrowOnError>({ url: '/api/v{api-version}/header', ...options });\n\nexport const testErrorCode = <ThrowOnError extends boolean = false>(options: Options<TestErrorCodeData, ThrowOnError>) => (options.client ?? client).post<TestErrorCodeResponses, TestErrorCodeErrors, ThrowOnError>({ url: '/api/v{api-version}/error', ...options });\n\nexport const nonAsciiæøåÆøÅöôêÊ字符串 = <ThrowOnError extends boolean = false>(options: Options<NonAsciiæøåÆøÅöôêÊ字符串Data, ThrowOnError>) => (options.client ?? client).post<NonAsciiæøåÆøÅöôêÊ字符串Responses, unknown, ThrowOnError>({\n    responseType: 'json',\n    url: '/api/v{api-version}/non-ascii-æøåÆØÅöôêÊ字符串',\n    ...options\n});\n\n/**\n * Login User\n */\nexport const putWithFormUrlEncoded = <ThrowOnError extends boolean = false>(options: Options<PutWithFormUrlEncodedData, ThrowOnError>) => (options.client ?? client).put<unknown, unknown, ThrowOnError>({\n    ...urlSearchParamsBodySerializer,\n    url: '/api/v{api-version}/non-ascii-æøåÆØÅöôêÊ字符串',\n    ...options,\n    headers: {\n        'Content-Type': 'application/x-www-form-urlencoded',\n        ...options.headers\n    }\n});\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/preact-query/axios/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type ClientOptions = {\n    baseURL: 'http://localhost:3000/base' | (string & {});\n};\n\n/**\n * Model with number-only name\n */\nexport type _400 = string;\n\n/**\n * External ref to shared model (A)\n */\nexport type ExternalRefA = ExternalSharedModel;\n\n/**\n * External ref to shared model (B)\n */\nexport type ExternalRefB = ExternalSharedModel;\n\n/**\n * Testing multiline comments in string: First line\n * Second line\n *\n * Fourth line\n */\nexport type CamelCaseCommentWithBreaks = number;\n\n/**\n * Testing multiline comments in string: First line\n * Second line\n *\n * Fourth line\n */\nexport type CommentWithBreaks = number;\n\n/**\n * Testing backticks in string: `backticks` and ```multiple backticks``` should work\n */\nexport type CommentWithBackticks = number;\n\n/**\n * Testing backticks and quotes in string: `backticks`, 'quotes', \"double quotes\" and ```multiple backticks``` should work\n */\nexport type CommentWithBackticksAndQuotes = number;\n\n/**\n * Testing slashes in string: \\backwards\\\\\\ and /forwards/// should work\n */\nexport type CommentWithSlashes = number;\n\n/**\n * Testing expression placeholders in string: ${expression} should work\n */\nexport type CommentWithExpressionPlaceholders = number;\n\n/**\n * Testing quotes in string: 'single quote''' and \"double quotes\"\"\" should work\n */\nexport type CommentWithQuotes = number;\n\n/**\n * Testing reserved characters in string: * inline * and ** inline ** should work\n */\nexport type CommentWithReservedCharacters = number;\n\n/**\n * This is a simple number\n */\nexport type SimpleInteger = number;\n\n/**\n * This is a simple boolean\n */\nexport type SimpleBoolean = boolean;\n\n/**\n * This is a simple string\n */\nexport type SimpleString = string;\n\n/**\n * A string with non-ascii (unicode) characters valid in typescript identifiers (æøåÆØÅöÔèÈ字符串)\n */\nexport type NonAsciiStringæøåÆøÅöôêÊ字符串 = string;\n\n/**\n * This is a simple file\n */\nexport type SimpleFile = Blob | File;\n\n/**\n * This is a simple reference\n */\nexport type SimpleReference = ModelWithString;\n\n/**\n * This is a simple string\n */\nexport type SimpleStringWithPattern = string | null;\n\n/**\n * This is a simple enum with strings\n */\nexport type EnumWithStrings = 'Success' | 'Warning' | 'Error' | '\\'Single Quote\\'' | '\"Double Quotes\"' | 'Non-ascii: øæåôöØÆÅÔÖ字符串';\n\nexport type EnumWithReplacedCharacters = '\\'Single Quote\\'' | '\"Double Quotes\"' | 'øæåôöØÆÅÔÖ字符串' | 3.1 | '';\n\n/**\n * This is a simple enum with numbers\n */\nexport type EnumWithNumbers = 1 | 2 | 3 | 1.1 | 1.2 | 1.3 | 100 | 200 | 300 | -100 | -200 | -300 | -1.1 | -1.2 | -1.3;\n\n/**\n * Success=1,Warning=2,Error=3\n */\nexport type EnumFromDescription = number;\n\n/**\n * This is a simple enum with numbers\n */\nexport type EnumWithExtensions = 200 | 400 | 500;\n\nexport type EnumWithXEnumNames = 0 | 1 | 2;\n\n/**\n * This is a simple array with numbers\n */\nexport type ArrayWithNumbers = Array<number>;\n\n/**\n * This is a simple array with booleans\n */\nexport type ArrayWithBooleans = Array<boolean>;\n\n/**\n * This is a simple array with strings\n */\nexport type ArrayWithStrings = Array<string>;\n\n/**\n * This is a simple array with references\n */\nexport type ArrayWithReferences = Array<ModelWithString>;\n\n/**\n * This is a simple array containing an array\n */\nexport type ArrayWithArray = Array<Array<ModelWithString>>;\n\n/**\n * This is a simple array with properties\n */\nexport type ArrayWithProperties = Array<{\n    '16x16'?: CamelCaseCommentWithBreaks;\n    bar?: string;\n}>;\n\n/**\n * This is a simple array with any of properties\n */\nexport type ArrayWithAnyOfProperties = Array<{\n    foo?: string;\n} | {\n    bar?: string;\n}>;\n\nexport type AnyOfAnyAndNull = {\n    data?: unknown | null;\n};\n\n/**\n * This is a simple array with any of properties\n */\nexport type AnyOfArrays = {\n    results?: Array<{\n        foo?: string;\n    } | {\n        bar?: string;\n    }>;\n};\n\n/**\n * This is a string dictionary\n */\nexport type DictionaryWithString = {\n    [key: string]: string;\n};\n\nexport type DictionaryWithPropertiesAndAdditionalProperties = {\n    foo?: number;\n    bar?: boolean;\n    [key: string]: string | number | boolean | undefined;\n};\n\n/**\n * This is a string reference\n */\nexport type DictionaryWithReference = {\n    [key: string]: ModelWithString;\n};\n\n/**\n * This is a complex dictionary\n */\nexport type DictionaryWithArray = {\n    [key: string]: Array<ModelWithString>;\n};\n\n/**\n * This is a string dictionary\n */\nexport type DictionaryWithDictionary = {\n    [key: string]: {\n        [key: string]: string;\n    };\n};\n\n/**\n * This is a complex dictionary\n */\nexport type DictionaryWithProperties = {\n    [key: string]: {\n        foo?: string;\n        bar?: string;\n    };\n};\n\n/**\n * This is a model with one number property\n */\nexport type ModelWithInteger = {\n    /**\n     * This is a simple number property\n     */\n    prop?: number;\n};\n\n/**\n * This is a model with one boolean property\n */\nexport type ModelWithBoolean = {\n    /**\n     * This is a simple boolean property\n     */\n    prop?: boolean;\n};\n\n/**\n * This is a model with one string property\n */\nexport type ModelWithString = {\n    /**\n     * This is a simple string property\n     */\n    prop?: string;\n};\n\n/**\n * This is a model with one string property\n */\nexport type ModelWithStringError = {\n    /**\n     * This is a simple string property\n     */\n    prop?: string;\n};\n\n/**\n * `Comment` or `VoiceComment`. The JSON object for adding voice comments to tickets is different. See [Adding voice comments to tickets](/documentation/ticketing/managing-tickets/adding-voice-comments-to-tickets)\n */\nexport type ModelFromZendesk = string;\n\n/**\n * This is a model with one string property\n */\nexport type ModelWithNullableString = {\n    /**\n     * This is a simple string property\n     */\n    nullableProp1?: string | null;\n    /**\n     * This is a simple string property\n     */\n    nullableRequiredProp1: string | null;\n    /**\n     * This is a simple string property\n     */\n    nullableProp2?: string | null;\n    /**\n     * This is a simple string property\n     */\n    nullableRequiredProp2: string | null;\n    /**\n     * This is a simple enum with strings\n     */\n    'foo_bar-enum'?: 'Success' | 'Warning' | 'Error' | 'ØÆÅ字符串';\n};\n\n/**\n * This is a model with one enum\n */\nexport type ModelWithEnum = {\n    /**\n     * This is a simple enum with strings\n     */\n    'foo_bar-enum'?: 'Success' | 'Warning' | 'Error' | 'ØÆÅ字符串';\n    /**\n     * These are the HTTP error code enums\n     */\n    statusCode?: '100' | '200 FOO' | '300 FOO_BAR' | '400 foo-bar' | '500 foo.bar' | '600 foo&bar';\n    /**\n     * Simple boolean enum\n     */\n    bool?: true;\n};\n\n/**\n * This is a model with one enum with escaped name\n */\nexport type ModelWithEnumWithHyphen = {\n    /**\n     * Foo-Bar-Baz-Qux\n     */\n    'foo-bar-baz-qux'?: '3.0';\n};\n\n/**\n * This is a model with one enum\n */\nexport type ModelWithEnumFromDescription = {\n    /**\n     * Success=1,Warning=2,Error=3\n     */\n    test?: number;\n};\n\n/**\n * This is a model with nested enums\n */\nexport type ModelWithNestedEnums = {\n    dictionaryWithEnum?: {\n        [key: string]: 'Success' | 'Warning' | 'Error';\n    };\n    dictionaryWithEnumFromDescription?: {\n        [key: string]: number;\n    };\n    arrayWithEnum?: Array<'Success' | 'Warning' | 'Error'>;\n    arrayWithDescription?: Array<number>;\n    /**\n     * This is a simple enum with strings\n     */\n    'foo_bar-enum'?: 'Success' | 'Warning' | 'Error' | 'ØÆÅ字符串';\n};\n\n/**\n * This is a model with one property containing a reference\n */\nexport type ModelWithReference = {\n    prop?: ModelWithProperties;\n};\n\n/**\n * This is a model with one property containing an array\n */\nexport type ModelWithArrayReadOnlyAndWriteOnly = {\n    prop?: Array<ModelWithReadOnlyAndWriteOnly>;\n    propWithFile?: Array<Blob | File>;\n    propWithNumber?: Array<number>;\n};\n\n/**\n * This is a model with one property containing an array\n */\nexport type ModelWithArray = {\n    prop?: Array<ModelWithString>;\n    propWithFile?: Array<Blob | File>;\n    propWithNumber?: Array<number>;\n};\n\n/**\n * This is a model with one property containing a dictionary\n */\nexport type ModelWithDictionary = {\n    prop?: {\n        [key: string]: string;\n    };\n};\n\n/**\n * This is a deprecated model with a deprecated property\n *\n * @deprecated\n */\nexport type DeprecatedModel = {\n    /**\n     * This is a deprecated property\n     *\n     * @deprecated\n     */\n    prop?: string;\n};\n\n/**\n * This is a model with one property containing a circular reference\n */\nexport type ModelWithCircularReference = {\n    prop?: ModelWithCircularReference;\n};\n\n/**\n * This is a model with one property with a 'one of' relationship\n */\nexport type CompositionWithOneOf = {\n    propA?: ModelWithString | ModelWithEnum | ModelWithArray | ModelWithDictionary;\n};\n\n/**\n * This is a model with one property with a 'one of' relationship where the options are not $ref\n */\nexport type CompositionWithOneOfAnonymous = {\n    propA?: {\n        propA?: string;\n    } | string | number;\n};\n\n/**\n * Circle\n */\nexport type ModelCircle = {\n    kind: string;\n    radius?: number;\n};\n\n/**\n * Square\n */\nexport type ModelSquare = {\n    kind: string;\n    sideLength?: number;\n};\n\n/**\n * This is a model with one property with a 'one of' relationship where the options are not $ref\n */\nexport type CompositionWithOneOfDiscriminator = ({\n    kind: 'circle';\n} & ModelCircle) | ({\n    kind: 'square';\n} & ModelSquare);\n\n/**\n * This is a model with one property with a 'any of' relationship\n */\nexport type CompositionWithAnyOf = {\n    propA?: ModelWithString | ModelWithEnum | ModelWithArray | ModelWithDictionary;\n};\n\n/**\n * This is a model with one property with a 'any of' relationship where the options are not $ref\n */\nexport type CompositionWithAnyOfAnonymous = {\n    propA?: {\n        propA?: string;\n    } | string | number;\n};\n\n/**\n * This is a model with nested 'any of' property with a type null\n */\nexport type CompositionWithNestedAnyAndTypeNull = {\n    propA?: Array<ModelWithDictionary | null> | Array<ModelWithArray | null>;\n};\n\nexport type _3eNum1Период = 'Bird' | 'Dog';\n\nexport type ConstValue = 'ConstValue';\n\n/**\n * This is a model with one property with a 'any of' relationship where the options are not $ref\n */\nexport type CompositionWithNestedAnyOfAndNull = {\n    /**\n     * Scopes\n     */\n    propA?: Array<_3eNum1Период | ConstValue> | null;\n};\n\n/**\n * This is a model with one property with a 'one of' relationship\n */\nexport type CompositionWithOneOfAndNullable = {\n    propA?: {\n        boolean?: boolean;\n    } | ModelWithEnum | ModelWithArray | ModelWithDictionary | null;\n};\n\n/**\n * This is a model that contains a simple dictionary within composition\n */\nexport type CompositionWithOneOfAndSimpleDictionary = {\n    propA?: boolean | {\n        [key: string]: number;\n    };\n};\n\n/**\n * This is a model that contains a dictionary of simple arrays within composition\n */\nexport type CompositionWithOneOfAndSimpleArrayDictionary = {\n    propA?: boolean | {\n        [key: string]: Array<boolean>;\n    };\n};\n\n/**\n * This is a model that contains a dictionary of complex arrays (composited) within composition\n */\nexport type CompositionWithOneOfAndComplexArrayDictionary = {\n    propA?: boolean | {\n        [key: string]: Array<number | string>;\n    };\n};\n\n/**\n * This is a model with one property with a 'all of' relationship\n */\nexport type CompositionWithAllOfAndNullable = {\n    propA?: ({\n        boolean?: boolean;\n    } & ModelWithEnum & ModelWithArray & ModelWithDictionary) | null;\n};\n\n/**\n * This is a model with one property with a 'any of' relationship\n */\nexport type CompositionWithAnyOfAndNullable = {\n    propA?: {\n        boolean?: boolean;\n    } | ModelWithEnum | ModelWithArray | ModelWithDictionary | null;\n};\n\n/**\n * This is a base model with two simple optional properties\n */\nexport type CompositionBaseModel = {\n    firstName?: string;\n    lastname?: string;\n};\n\n/**\n * This is a model that extends the base model\n */\nexport type CompositionExtendedModel = CompositionBaseModel & {\n    age: number;\n    firstName: string;\n    lastname: string;\n};\n\n/**\n * This is a model with one nested property\n */\nexport type ModelWithProperties = {\n    required: string;\n    readonly requiredAndReadOnly: string;\n    requiredAndNullable: string | null;\n    string?: string;\n    number?: number;\n    boolean?: boolean;\n    reference?: ModelWithString;\n    'property with space'?: string;\n    default?: string;\n    try?: string;\n    readonly '@namespace.string'?: string;\n    readonly '@namespace.integer'?: number;\n};\n\n/**\n * This is a model with one nested property\n */\nexport type ModelWithNestedProperties = {\n    readonly first: {\n        readonly second: {\n            readonly third: string | null;\n        } | null;\n    } | null;\n};\n\n/**\n * This is a model with duplicated properties\n */\nexport type ModelWithDuplicateProperties = {\n    prop?: ModelWithString;\n};\n\n/**\n * This is a model with ordered properties\n */\nexport type ModelWithOrderedProperties = {\n    zebra?: string;\n    apple?: string;\n    hawaii?: string;\n};\n\n/**\n * This is a model with duplicated imports\n */\nexport type ModelWithDuplicateImports = {\n    propA?: ModelWithString;\n    propB?: ModelWithString;\n    propC?: ModelWithString;\n};\n\n/**\n * This is a model that extends another model\n */\nexport type ModelThatExtends = ModelWithString & {\n    propExtendsA?: string;\n    propExtendsB?: ModelWithString;\n};\n\n/**\n * This is a model that extends another model\n */\nexport type ModelThatExtendsExtends = ModelWithString & ModelThatExtends & {\n    propExtendsC?: string;\n    propExtendsD?: ModelWithString;\n};\n\n/**\n * This is a model that contains a some patterns\n */\nexport type ModelWithPattern = {\n    key: string;\n    name: string;\n    readonly enabled?: boolean;\n    readonly modified?: string;\n    id?: string;\n    text?: string;\n    patternWithSingleQuotes?: string;\n    patternWithNewline?: string;\n    patternWithBacktick?: string;\n    patternWithUnicode?: string;\n};\n\nexport type File = {\n    /**\n     * Id\n     */\n    readonly id?: string;\n    /**\n     * Updated at\n     */\n    readonly updated_at?: string;\n    /**\n     * Created at\n     */\n    readonly created_at?: string;\n    /**\n     * Mime\n     */\n    mime: string;\n    /**\n     * File\n     */\n    readonly file?: string;\n};\n\nexport type Default = {\n    name?: string;\n};\n\nexport type Pageable = {\n    page?: number;\n    size?: number;\n    sort?: Array<string>;\n};\n\n/**\n * This is a free-form object without additionalProperties.\n */\nexport type FreeFormObjectWithoutAdditionalProperties = {\n    [key: string]: unknown;\n};\n\n/**\n * This is a free-form object with additionalProperties: true.\n */\nexport type FreeFormObjectWithAdditionalPropertiesEqTrue = {\n    [key: string]: unknown;\n};\n\n/**\n * This is a free-form object with additionalProperties: {}.\n */\nexport type FreeFormObjectWithAdditionalPropertiesEqEmptyObject = {\n    [key: string]: unknown;\n};\n\nexport type ModelWithConst = {\n    String?: 'String';\n    number?: 0;\n    null?: null;\n    withType?: 'Some string';\n};\n\n/**\n * This is a model with one property and additionalProperties: true\n */\nexport type ModelWithAdditionalPropertiesEqTrue = {\n    /**\n     * This is a simple string property\n     */\n    prop?: string;\n    [key: string]: unknown;\n};\n\nexport type NestedAnyOfArraysNullable = {\n    nullableArray?: Array<string | boolean> | null;\n};\n\nexport type CompositionWithOneOfAndProperties = ({\n    foo: SimpleParameter;\n} | {\n    bar: NonAsciiStringæøåÆøÅöôêÊ字符串;\n}) & {\n    baz: number | null;\n    qux: number;\n};\n\n/**\n * An object that can be null\n */\nexport type NullableObject = {\n    foo?: string;\n} | null;\n\n/**\n * Some % character\n */\nexport type CharactersInDescription = string;\n\nexport type ModelWithNullableObject = {\n    data?: NullableObject;\n};\n\n/**\n * An object with additional properties that can be null (anyOf ref + null)\n */\nexport type ModelWithAdditionalPropertiesRef = {\n    [key: string]: NullableObject | null;\n};\n\nexport type ModelWithOneOfEnum = {\n    foo: 'Bar';\n} | {\n    foo: 'Baz';\n} | {\n    foo: 'Qux';\n} | {\n    content: string;\n    foo: 'Quux';\n} | {\n    content: [\n        string,\n        string\n    ];\n    foo: 'Corge';\n};\n\nexport type ModelWithNestedArrayEnumsDataFoo = 'foo' | 'bar';\n\nexport type ModelWithNestedArrayEnumsDataBar = 'baz' | 'qux';\n\nexport type ModelWithNestedArrayEnumsData = {\n    foo?: Array<ModelWithNestedArrayEnumsDataFoo>;\n    bar?: Array<ModelWithNestedArrayEnumsDataBar>;\n};\n\nexport type ModelWithNestedArrayEnums = {\n    array_strings?: Array<string>;\n    data?: ModelWithNestedArrayEnumsData;\n};\n\nexport type ModelWithNestedCompositionEnums = {\n    foo?: ModelWithNestedArrayEnumsDataFoo;\n};\n\nexport type ModelWithReadOnlyAndWriteOnly = {\n    foo: string;\n    readonly bar: string;\n};\n\nexport type ModelWithConstantSizeArray = [\n    number,\n    number\n];\n\nexport type ModelWithAnyOfConstantSizeArray = [\n    number | string,\n    number | string,\n    number | string\n];\n\nexport type ModelWithPrefixItemsConstantSizeArray = [\n    ModelWithInteger,\n    number | string,\n    string\n];\n\nexport type ModelWithAnyOfConstantSizeArrayNullable = [\n    number | null | string,\n    number | null | string,\n    number | null | string\n];\n\nexport type ModelWithAnyOfConstantSizeArrayWithNSizeAndOptions = [\n    number | Import,\n    number | Import\n];\n\nexport type ModelWithAnyOfConstantSizeArrayAndIntersect = [\n    number & string,\n    number & string\n];\n\nexport type ModelWithNumericEnumUnion = {\n    /**\n     * Период\n     */\n    value?: -10 | -1 | 0 | 1 | 3 | 6 | 12;\n};\n\n/**\n * Some description with `back ticks`\n */\nexport type ModelWithBackticksInDescription = {\n    /**\n     * The template `that` should be used for parsing and importing the contents of the CSV file.\n     *\n     * <br/><p>There is one placeholder currently supported:<ul>     <li><b>${x}</b> - refers to the n-th column in the CSV file, e.g. ${1}, ${2}, ...)</li></ul><p>Example of a correct JSON template:</p>\n     * <pre>\n     * [\n     * {\n     * \"resourceType\": \"Asset\",\n     * \"identifier\": {\n     * \"name\": \"${1}\",\n     * \"domain\": {\n     * \"name\": \"${2}\",\n     * \"community\": {\n     * \"name\": \"Some Community\"\n     * }\n     * }\n     * },\n     * \"attributes\" : {\n     * \"00000000-0000-0000-0000-000000003115\" : [ {\n     * \"value\" : \"${3}\"\n     * } ],\n     * \"00000000-0000-0000-0000-000000000222\" : [ {\n     * \"value\" : \"${4}\"\n     * } ]\n     * }\n     * }\n     * ]\n     * </pre>\n     */\n    template?: string;\n};\n\nexport type ModelWithOneOfAndProperties = (SimpleParameter | NonAsciiStringæøåÆøÅöôêÊ字符串) & {\n    baz: number | null;\n    qux: number;\n};\n\n/**\n * Model used to test deduplication strategy (unused)\n */\nexport type ParameterSimpleParameterUnused = string;\n\n/**\n * Model used to test deduplication strategy\n */\nexport type PostServiceWithEmptyTagResponse = string;\n\n/**\n * Model used to test deduplication strategy\n */\nexport type PostServiceWithEmptyTagResponse2 = string;\n\n/**\n * Model used to test deduplication strategy\n */\nexport type DeleteFooData = string;\n\n/**\n * Model used to test deduplication strategy\n */\nexport type DeleteFooData2 = string;\n\n/**\n * Model with restricted keyword name\n */\nexport type Import = string;\n\nexport type SchemaWithFormRestrictedKeys = {\n    description?: string;\n    'x-enum-descriptions'?: string;\n    'x-enum-varnames'?: string;\n    'x-enumNames'?: string;\n    title?: string;\n    object?: {\n        description?: string;\n        'x-enum-descriptions'?: string;\n        'x-enum-varnames'?: string;\n        'x-enumNames'?: string;\n        title?: string;\n    };\n    array?: Array<{\n        description?: string;\n        'x-enum-descriptions'?: string;\n        'x-enum-varnames'?: string;\n        'x-enumNames'?: string;\n        title?: string;\n    }>;\n};\n\n/**\n * This schema was giving PascalCase transformations a hard time\n */\nexport type IoK8sApimachineryPkgApisMetaV1DeleteOptions = {\n    /**\n     * Must be fulfilled before a deletion is carried out. If not possible, a 409 Conflict status will be returned.\n     */\n    preconditions?: IoK8sApimachineryPkgApisMetaV1Preconditions;\n};\n\n/**\n * This schema was giving PascalCase transformations a hard time\n */\nexport type IoK8sApimachineryPkgApisMetaV1Preconditions = {\n    /**\n     * Specifies the target ResourceVersion\n     */\n    resourceVersion?: string;\n    /**\n     * Specifies the target UID.\n     */\n    uid?: string;\n};\n\nexport type AdditionalPropertiesUnknownIssue = {\n    [key: string]: string | number;\n};\n\nexport type AdditionalPropertiesUnknownIssue2 = {\n    [key: string]: string | number;\n};\n\nexport type AdditionalPropertiesUnknownIssue3 = string & {\n    entries: {\n        [key: string]: AdditionalPropertiesUnknownIssue;\n    };\n};\n\nexport type AdditionalPropertiesIntegerIssue = {\n    value: number;\n    [key: string]: number;\n};\n\nexport type OneOfAllOfIssue = ((ConstValue | GenericSchemaDuplicateIssue1SystemBoolean) & _3eNum1Период) | GenericSchemaDuplicateIssue1SystemString;\n\nexport type GenericSchemaDuplicateIssue1SystemBoolean = {\n    item?: boolean;\n    error?: string | null;\n    readonly hasError?: boolean;\n    data?: {\n        [key: string]: never;\n    };\n};\n\nexport type GenericSchemaDuplicateIssue1SystemString = {\n    item?: string | null;\n    error?: string | null;\n    readonly hasError?: boolean;\n};\n\nexport type ExternalSharedModel = {\n    id: string;\n    name?: string;\n};\n\n/**\n * This is a model with one property containing a reference\n */\nexport type ModelWithReferenceWritable = {\n    prop?: ModelWithPropertiesWritable;\n};\n\n/**\n * This is a model with one property containing an array\n */\nexport type ModelWithArrayReadOnlyAndWriteOnlyWritable = {\n    prop?: Array<ModelWithReadOnlyAndWriteOnlyWritable>;\n    propWithFile?: Array<Blob | File>;\n    propWithNumber?: Array<number>;\n};\n\n/**\n * This is a model with one nested property\n */\nexport type ModelWithPropertiesWritable = {\n    required: string;\n    requiredAndNullable: string | null;\n    string?: string;\n    number?: number;\n    boolean?: boolean;\n    reference?: ModelWithString;\n    'property with space'?: string;\n    default?: string;\n    try?: string;\n};\n\n/**\n * This is a model that contains a some patterns\n */\nexport type ModelWithPatternWritable = {\n    key: string;\n    name: string;\n    id?: string;\n    text?: string;\n    patternWithSingleQuotes?: string;\n    patternWithNewline?: string;\n    patternWithBacktick?: string;\n    patternWithUnicode?: string;\n};\n\nexport type FileWritable = {\n    /**\n     * Mime\n     */\n    mime: string;\n};\n\nexport type ModelWithReadOnlyAndWriteOnlyWritable = {\n    foo: string;\n    baz: string;\n};\n\nexport type ModelWithAnyOfConstantSizeArrayWithNSizeAndOptionsWritable = [\n    number | Import,\n    number | Import\n];\n\nexport type AdditionalPropertiesUnknownIssueWritable = {\n    [key: string]: string | number;\n};\n\nexport type OneOfAllOfIssueWritable = ((ConstValue | GenericSchemaDuplicateIssue1SystemBoolean) & _3eNum1Период) | GenericSchemaDuplicateIssue1SystemString;\n\nexport type GenericSchemaDuplicateIssue1SystemBooleanWritable = {\n    item?: boolean;\n    error?: string | null;\n    data?: {\n        [key: string]: never;\n    };\n};\n\nexport type GenericSchemaDuplicateIssue1SystemStringWritable = {\n    item?: string | null;\n    error?: string | null;\n};\n\n/**\n * This is a reusable parameter\n */\nexport type SimpleParameter = string;\n\n/**\n * Parameter with illegal characters\n */\nexport type XFooBar = ModelWithString;\n\n/**\n * A reusable request body\n */\nexport type SimpleRequestBody = ModelWithString;\n\n/**\n * A reusable request body\n */\nexport type SimpleFormData = ModelWithString;\n\nexport type ExportData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no+tag';\n};\n\nexport type PatchApiVbyApiVersionNoTagData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no+tag';\n};\n\nexport type PatchApiVbyApiVersionNoTagResponses = {\n    /**\n     * OK\n     */\n    default: unknown;\n};\n\nexport type ImportData = {\n    body: ModelWithReadOnlyAndWriteOnlyWritable | ModelWithArrayReadOnlyAndWriteOnlyWritable;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no+tag';\n};\n\nexport type ImportResponses = {\n    /**\n     * Success\n     */\n    200: ModelFromZendesk;\n    /**\n     * Default success response\n     */\n    default: ModelWithReadOnlyAndWriteOnly;\n};\n\nexport type ImportResponse = ImportResponses[keyof ImportResponses];\n\nexport type FooWowData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no+tag';\n};\n\nexport type FooWowResponses = {\n    /**\n     * OK\n     */\n    default: unknown;\n};\n\nexport type ApiVVersionODataControllerCountData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple/$count';\n};\n\nexport type ApiVVersionODataControllerCountResponses = {\n    /**\n     * Success\n     */\n    200: ModelFromZendesk;\n};\n\nexport type ApiVVersionODataControllerCountResponse = ApiVVersionODataControllerCountResponses[keyof ApiVVersionODataControllerCountResponses];\n\nexport type GetApiVbyApiVersionSimpleOperationData = {\n    body?: never;\n    path: {\n        /**\n         * foo in method\n         */\n        foo_param: string;\n    };\n    query?: never;\n    url: '/api/v{api-version}/simple:operation';\n};\n\nexport type GetApiVbyApiVersionSimpleOperationErrors = {\n    /**\n     * Default error response\n     */\n    default: ModelWithBoolean;\n};\n\nexport type GetApiVbyApiVersionSimpleOperationError = GetApiVbyApiVersionSimpleOperationErrors[keyof GetApiVbyApiVersionSimpleOperationErrors];\n\nexport type GetApiVbyApiVersionSimpleOperationResponses = {\n    /**\n     * Response is a simple number\n     */\n    200: number;\n};\n\nexport type GetApiVbyApiVersionSimpleOperationResponse = GetApiVbyApiVersionSimpleOperationResponses[keyof GetApiVbyApiVersionSimpleOperationResponses];\n\nexport type DeleteCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type GetCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type HeadCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type OptionsCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type PatchCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type PostCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type PutCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type DeleteFooData3 = {\n    body?: never;\n    headers: {\n        /**\n         * Parameter with illegal characters\n         */\n        'x-Foo-Bar': ModelWithString;\n    };\n    path: {\n        /**\n         * foo in method\n         */\n        foo_param: string;\n        /**\n         * bar in method\n         */\n        BarParam: string;\n    };\n    query?: never;\n    url: '/api/v{api-version}/foo/{foo_param}/bar/{BarParam}';\n};\n\nexport type CallWithDescriptionsData = {\n    body?: never;\n    path?: never;\n    query?: {\n        /**\n         * Testing multiline comments in string: First line\n         * Second line\n         *\n         * Fourth line\n         */\n        parameterWithBreaks?: string;\n        /**\n         * Testing backticks in string: `backticks` and ```multiple backticks``` should work\n         */\n        parameterWithBackticks?: string;\n        /**\n         * Testing slashes in string: \\backwards\\\\\\ and /forwards/// should work\n         */\n        parameterWithSlashes?: string;\n        /**\n         * Testing expression placeholders in string: ${expression} should work\n         */\n        parameterWithExpressionPlaceholders?: string;\n        /**\n         * Testing quotes in string: 'single quote''' and \"double quotes\"\"\" should work\n         */\n        parameterWithQuotes?: string;\n        /**\n         * Testing reserved characters in string: * inline * and ** inline ** should work\n         */\n        parameterWithReservedCharacters?: string;\n    };\n    url: '/api/v{api-version}/descriptions';\n};\n\nexport type DeprecatedCallData = {\n    body?: never;\n    headers: {\n        /**\n         * This parameter is deprecated\n         *\n         * @deprecated\n         */\n        parameter: DeprecatedModel | null;\n    };\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/parameters/deprecated';\n};\n\nexport type CallWithParametersData = {\n    /**\n     * This is the parameter that goes into the body\n     */\n    body: {\n        [key: string]: unknown;\n    } | null;\n    headers: {\n        /**\n         * This is the parameter that goes into the header\n         */\n        parameterHeader: string | null;\n    };\n    path: {\n        /**\n         * This is the parameter that goes into the path\n         */\n        parameterPath: string | null;\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string | null;\n    };\n    query: {\n        foo_ref_enum?: ModelWithNestedArrayEnumsDataFoo;\n        foo_all_of_enum: ModelWithNestedArrayEnumsDataFoo;\n        /**\n         * This is the parameter that goes into the query params\n         */\n        cursor: string | null;\n    };\n    url: '/api/v{api-version}/parameters/{parameterPath}';\n};\n\nexport type CallWithWeirdParameterNamesData = {\n    /**\n     * This is the parameter that goes into the body\n     */\n    body: ModelWithString | null;\n    headers: {\n        /**\n         * This is the parameter that goes into the request header\n         */\n        'parameter.header': string | null;\n    };\n    path: {\n        /**\n         * This is the parameter that goes into the path\n         */\n        'parameter.path.1'?: string;\n        /**\n         * This is the parameter that goes into the path\n         */\n        'parameter-path-2'?: string;\n        /**\n         * This is the parameter that goes into the path\n         */\n        'PARAMETER-PATH-3'?: string;\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string | null;\n    };\n    query: {\n        /**\n         * This is the parameter with a reserved keyword\n         */\n        default?: string;\n        /**\n         * This is the parameter that goes into the request query params\n         */\n        'parameter-query': string | null;\n    };\n    url: '/api/v{api-version}/parameters/{parameter.path.1}/{parameter-path-2}/{PARAMETER-PATH-3}';\n};\n\nexport type GetCallWithOptionalParamData = {\n    /**\n     * This is a required parameter\n     */\n    body: ModelWithOneOfEnum;\n    path?: never;\n    query?: {\n        /**\n         * This is an optional parameter\n         */\n        page?: number;\n    };\n    url: '/api/v{api-version}/parameters';\n};\n\nexport type PostCallWithOptionalParamData = {\n    /**\n     * This is an optional parameter\n     */\n    body?: {\n        offset?: number | null;\n    };\n    path?: never;\n    query: {\n        /**\n         * This is a required parameter\n         */\n        parameter: Pageable;\n    };\n    url: '/api/v{api-version}/parameters';\n};\n\nexport type PostCallWithOptionalParamResponses = {\n    /**\n     * Response is a simple number\n     */\n    200: number;\n    /**\n     * Success\n     */\n    204: void;\n};\n\nexport type PostCallWithOptionalParamResponse = PostCallWithOptionalParamResponses[keyof PostCallWithOptionalParamResponses];\n\nexport type PostApiVbyApiVersionRequestBodyData = {\n    /**\n     * A reusable request body\n     */\n    body?: SimpleRequestBody;\n    path?: never;\n    query?: {\n        /**\n         * This is a reusable parameter\n         */\n        parameter?: string;\n    };\n    url: '/api/v{api-version}/requestBody';\n};\n\nexport type PostApiVbyApiVersionFormDataData = {\n    /**\n     * A reusable request body\n     */\n    body?: SimpleFormData;\n    path?: never;\n    query?: {\n        /**\n         * This is a reusable parameter\n         */\n        parameter?: string;\n    };\n    url: '/api/v{api-version}/formData';\n};\n\nexport type CallWithDefaultParametersData = {\n    body?: never;\n    path?: never;\n    query?: {\n        /**\n         * This is a simple string with default value\n         */\n        parameterString?: string | null;\n        /**\n         * This is a simple number with default value\n         */\n        parameterNumber?: number | null;\n        /**\n         * This is a simple boolean with default value\n         */\n        parameterBoolean?: boolean | null;\n        /**\n         * This is a simple enum with default value\n         */\n        parameterEnum?: 'Success' | 'Warning' | 'Error';\n        /**\n         * This is a simple model with default value\n         */\n        parameterModel?: ModelWithString | null;\n    };\n    url: '/api/v{api-version}/defaults';\n};\n\nexport type CallWithDefaultOptionalParametersData = {\n    body?: never;\n    path?: never;\n    query?: {\n        /**\n         * This is a simple string that is optional with default value\n         */\n        parameterString?: string;\n        /**\n         * This is a simple number that is optional with default value\n         */\n        parameterNumber?: number;\n        /**\n         * This is a simple boolean that is optional with default value\n         */\n        parameterBoolean?: boolean;\n        /**\n         * This is a simple enum that is optional with default value\n         */\n        parameterEnum?: 'Success' | 'Warning' | 'Error';\n        /**\n         * This is a simple model that is optional with default value\n         */\n        parameterModel?: ModelWithString;\n    };\n    url: '/api/v{api-version}/defaults';\n};\n\nexport type CallToTestOrderOfParamsData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * This is a optional string with default\n         */\n        parameterOptionalStringWithDefault?: string;\n        /**\n         * This is a optional string with empty default\n         */\n        parameterOptionalStringWithEmptyDefault?: string;\n        /**\n         * This is a optional string with no default\n         */\n        parameterOptionalStringWithNoDefault?: string;\n        /**\n         * This is a string with default\n         */\n        parameterStringWithDefault: string;\n        /**\n         * This is a string with empty default\n         */\n        parameterStringWithEmptyDefault: string;\n        /**\n         * This is a string with no default\n         */\n        parameterStringWithNoDefault: string;\n        /**\n         * This is a string that can be null with no default\n         */\n        parameterStringNullableWithNoDefault?: string | null;\n        /**\n         * This is a string that can be null with default\n         */\n        parameterStringNullableWithDefault?: string | null;\n    };\n    url: '/api/v{api-version}/defaults';\n};\n\nexport type DuplicateNameData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/duplicate';\n};\n\nexport type DuplicateName2Data = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/duplicate';\n};\n\nexport type DuplicateName3Data = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/duplicate';\n};\n\nexport type DuplicateName4Data = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/duplicate';\n};\n\nexport type CallWithNoContentResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no-content';\n};\n\nexport type CallWithNoContentResponseResponses = {\n    /**\n     * Success\n     */\n    204: void;\n};\n\nexport type CallWithNoContentResponseResponse = CallWithNoContentResponseResponses[keyof CallWithNoContentResponseResponses];\n\nexport type CallWithResponseAndNoContentResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multiple-tags/response-and-no-content';\n};\n\nexport type CallWithResponseAndNoContentResponseResponses = {\n    /**\n     * Response is a simple number\n     */\n    200: number;\n    /**\n     * Success\n     */\n    204: void;\n};\n\nexport type CallWithResponseAndNoContentResponseResponse = CallWithResponseAndNoContentResponseResponses[keyof CallWithResponseAndNoContentResponseResponses];\n\nexport type DummyAData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multiple-tags/a';\n};\n\nexport type DummyAResponses = {\n    200: _400;\n};\n\nexport type DummyAResponse = DummyAResponses[keyof DummyAResponses];\n\nexport type DummyBData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multiple-tags/b';\n};\n\nexport type DummyBResponses = {\n    /**\n     * Success\n     */\n    204: void;\n};\n\nexport type DummyBResponse = DummyBResponses[keyof DummyBResponses];\n\nexport type CallWithResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/response';\n};\n\nexport type CallWithResponseResponses = {\n    default: Import;\n};\n\nexport type CallWithResponseResponse = CallWithResponseResponses[keyof CallWithResponseResponses];\n\nexport type CallWithDuplicateResponsesData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/response';\n};\n\nexport type CallWithDuplicateResponsesErrors = {\n    /**\n     * Message for 500 error\n     */\n    500: ModelWithStringError;\n    /**\n     * Message for 501 error\n     */\n    501: ModelWithStringError;\n    /**\n     * Message for 502 error\n     */\n    502: ModelWithStringError;\n    /**\n     * Message for 4XX errors\n     */\n    '4XX': DictionaryWithArray;\n    /**\n     * Default error response\n     */\n    default: ModelWithBoolean;\n};\n\nexport type CallWithDuplicateResponsesError = CallWithDuplicateResponsesErrors[keyof CallWithDuplicateResponsesErrors];\n\nexport type CallWithDuplicateResponsesResponses = {\n    /**\n     * Message for 200 response\n     */\n    200: ModelWithBoolean & ModelWithInteger;\n    /**\n     * Message for 201 response\n     */\n    201: ModelWithString;\n    /**\n     * Message for 202 response\n     */\n    202: ModelWithString;\n};\n\nexport type CallWithDuplicateResponsesResponse = CallWithDuplicateResponsesResponses[keyof CallWithDuplicateResponsesResponses];\n\nexport type CallWithResponsesData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/response';\n};\n\nexport type CallWithResponsesErrors = {\n    /**\n     * Message for 500 error\n     */\n    500: ModelWithStringError;\n    /**\n     * Message for 501 error\n     */\n    501: ModelWithStringError;\n    /**\n     * Message for 502 error\n     */\n    502: ModelWithStringError;\n    /**\n     * Message for default response\n     */\n    default: ModelWithStringError;\n};\n\nexport type CallWithResponsesError = CallWithResponsesErrors[keyof CallWithResponsesErrors];\n\nexport type CallWithResponsesResponses = {\n    /**\n     * Message for 200 response\n     */\n    200: {\n        readonly '@namespace.string'?: string;\n        readonly '@namespace.integer'?: number;\n        readonly value?: Array<ModelWithString>;\n    };\n    /**\n     * Message for 201 response\n     */\n    201: ModelThatExtends;\n    /**\n     * Message for 202 response\n     */\n    202: ModelThatExtendsExtends;\n};\n\nexport type CallWithResponsesResponse = CallWithResponsesResponses[keyof CallWithResponsesResponses];\n\nexport type CollectionFormatData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * This is an array parameter that is sent as csv format (comma-separated values)\n         */\n        parameterArrayCSV: Array<string> | null;\n        /**\n         * This is an array parameter that is sent as ssv format (space-separated values)\n         */\n        parameterArraySSV: Array<string> | null;\n        /**\n         * This is an array parameter that is sent as tsv format (tab-separated values)\n         */\n        parameterArrayTSV: Array<string> | null;\n        /**\n         * This is an array parameter that is sent as pipes format (pipe-separated values)\n         */\n        parameterArrayPipes: Array<string> | null;\n        /**\n         * This is an array parameter that is sent as multi format (multiple parameter instances)\n         */\n        parameterArrayMulti: Array<string> | null;\n    };\n    url: '/api/v{api-version}/collectionFormat';\n};\n\nexport type TypesData = {\n    body?: never;\n    path?: {\n        /**\n         * This is a number parameter\n         */\n        id?: number;\n    };\n    query: {\n        /**\n         * This is a number parameter\n         */\n        parameterNumber: number;\n        /**\n         * This is a string parameter\n         */\n        parameterString: string | null;\n        /**\n         * This is a boolean parameter\n         */\n        parameterBoolean: boolean | null;\n        /**\n         * This is an object parameter\n         */\n        parameterObject: {\n            [key: string]: unknown;\n        } | null;\n        /**\n         * This is an array parameter\n         */\n        parameterArray: Array<string> | null;\n        /**\n         * This is a dictionary parameter\n         */\n        parameterDictionary: {\n            [key: string]: unknown;\n        } | null;\n        /**\n         * This is an enum parameter\n         */\n        parameterEnum: 'Success' | 'Warning' | 'Error' | null;\n    };\n    url: '/api/v{api-version}/types';\n};\n\nexport type TypesResponses = {\n    /**\n     * Response is a simple number\n     */\n    200: number;\n    /**\n     * Response is a simple string\n     */\n    201: string;\n    /**\n     * Response is a simple boolean\n     */\n    202: boolean;\n    /**\n     * Response is a simple object\n     */\n    203: {\n        [key: string]: unknown;\n    };\n};\n\nexport type TypesResponse = TypesResponses[keyof TypesResponses];\n\nexport type UploadFileData = {\n    body: Blob | File;\n    path: {\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string | null;\n    };\n    query?: never;\n    url: '/api/v{api-version}/upload';\n};\n\nexport type UploadFileResponses = {\n    200: boolean;\n};\n\nexport type UploadFileResponse = UploadFileResponses[keyof UploadFileResponses];\n\nexport type FileResponseData = {\n    body?: never;\n    path: {\n        id: string;\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string;\n    };\n    query?: never;\n    url: '/api/v{api-version}/file/{id}';\n};\n\nexport type FileResponseResponses = {\n    /**\n     * Success\n     */\n    200: Blob | File;\n};\n\nexport type FileResponseResponse = FileResponseResponses[keyof FileResponseResponses];\n\nexport type ComplexTypesData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * Parameter containing object\n         */\n        parameterObject: {\n            first?: {\n                second?: {\n                    third?: string;\n                };\n            };\n        };\n        /**\n         * Parameter containing reference\n         */\n        parameterReference: ModelWithString;\n    };\n    url: '/api/v{api-version}/complex';\n};\n\nexport type ComplexTypesErrors = {\n    /**\n     * 400 `server` error\n     */\n    400: unknown;\n    /**\n     * 500 server error\n     */\n    500: unknown;\n};\n\nexport type ComplexTypesResponses = {\n    /**\n     * Successful response\n     */\n    200: Array<ModelWithString>;\n};\n\nexport type ComplexTypesResponse = ComplexTypesResponses[keyof ComplexTypesResponses];\n\nexport type MultipartResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multipart';\n};\n\nexport type MultipartResponseResponses = {\n    /**\n     * OK\n     */\n    200: {\n        file?: Blob | File;\n        metadata?: {\n            foo?: string;\n            bar?: string;\n        };\n    };\n};\n\nexport type MultipartResponseResponse = MultipartResponseResponses[keyof MultipartResponseResponses];\n\nexport type MultipartRequestData = {\n    body?: {\n        content?: Blob | File;\n        data?: ModelWithString | null;\n    };\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multipart';\n};\n\nexport type ComplexParamsData = {\n    body?: {\n        readonly key: string | null;\n        name: string | null;\n        enabled?: boolean;\n        type: 'Monkey' | 'Horse' | 'Bird';\n        listOfModels?: Array<ModelWithString> | null;\n        listOfStrings?: Array<string> | null;\n        parameters: ModelWithString | ModelWithEnum | ModelWithArray | ModelWithDictionary;\n        readonly user?: {\n            readonly id?: number;\n            readonly name?: string | null;\n        };\n    };\n    path: {\n        id: number;\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string;\n    };\n    query?: never;\n    url: '/api/v{api-version}/complex/{id}';\n};\n\nexport type ComplexParamsResponses = {\n    /**\n     * Success\n     */\n    200: ModelWithString;\n};\n\nexport type ComplexParamsResponse = ComplexParamsResponses[keyof ComplexParamsResponses];\n\nexport type CallWithResultFromHeaderData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/header';\n};\n\nexport type CallWithResultFromHeaderErrors = {\n    /**\n     * 400 server error\n     */\n    400: unknown;\n    /**\n     * 500 server error\n     */\n    500: unknown;\n};\n\nexport type CallWithResultFromHeaderResponses = {\n    /**\n     * Successful response\n     */\n    200: unknown;\n};\n\nexport type TestErrorCodeData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * Status code to return\n         */\n        status: number;\n    };\n    url: '/api/v{api-version}/error';\n};\n\nexport type TestErrorCodeErrors = {\n    /**\n     * Custom message: Internal Server Error\n     */\n    500: unknown;\n    /**\n     * Custom message: Not Implemented\n     */\n    501: unknown;\n    /**\n     * Custom message: Bad Gateway\n     */\n    502: unknown;\n    /**\n     * Custom message: Service Unavailable\n     */\n    503: unknown;\n};\n\nexport type TestErrorCodeResponses = {\n    /**\n     * Custom message: Successful response\n     */\n    200: unknown;\n};\n\nexport type NonAsciiæøåÆøÅöôêÊ字符串Data = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * Dummy input param\n         */\n        nonAsciiParamæøåÆØÅöôêÊ: number;\n    };\n    url: '/api/v{api-version}/non-ascii-æøåÆØÅöôêÊ字符串';\n};\n\nexport type NonAsciiæøåÆøÅöôêÊ字符串Responses = {\n    /**\n     * Successful response\n     */\n    200: Array<NonAsciiStringæøåÆøÅöôêÊ字符串>;\n};\n\nexport type NonAsciiæøåÆøÅöôêÊ字符串Response = NonAsciiæøåÆøÅöôêÊ字符串Responses[keyof NonAsciiæøåÆøÅöôêÊ字符串Responses];\n\nexport type PutWithFormUrlEncodedData = {\n    body: ArrayWithStrings;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/non-ascii-æøåÆØÅöôêÊ字符串';\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/preact-query/fetch/@tanstack/preact-query.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport { type DefaultError, type InfiniteData, infiniteQueryOptions, queryOptions, type UseMutationOptions } from '@tanstack/preact-query';\n\nimport { client } from '../client.gen';\nimport { apiVVersionODataControllerCount, callToTestOrderOfParams, callWithDefaultOptionalParameters, callWithDefaultParameters, callWithDescriptions, callWithDuplicateResponses, callWithNoContentResponse, callWithParameters, callWithResponse, callWithResponseAndNoContentResponse, callWithResponses, callWithResultFromHeader, callWithWeirdParameterNames, collectionFormat, complexParams, complexTypes, deleteCallWithoutParametersAndResponse, deleteFoo, deprecatedCall, dummyA, dummyB, duplicateName, duplicateName2, duplicateName3, duplicateName4, export_, fileResponse, fooWow, getApiVbyApiVersionSimpleOperation, getCallWithOptionalParam, getCallWithoutParametersAndResponse, import_, multipartRequest, multipartResponse, nonAsciiæøåÆøÅöôêÊ字符串, type Options, patchApiVbyApiVersionNoTag, patchCallWithoutParametersAndResponse, postApiVbyApiVersionFormData, postApiVbyApiVersionRequestBody, postCallWithOptionalParam, postCallWithoutParametersAndResponse, putCallWithoutParametersAndResponse, putWithFormUrlEncoded, testErrorCode, types, uploadFile } from '../sdk.gen';\nimport type { ApiVVersionODataControllerCountData, ApiVVersionODataControllerCountResponse, CallToTestOrderOfParamsData, CallWithDefaultOptionalParametersData, CallWithDefaultParametersData, CallWithDescriptionsData, CallWithDuplicateResponsesData, CallWithDuplicateResponsesError, CallWithDuplicateResponsesResponse, CallWithNoContentResponseData, CallWithNoContentResponseResponse, CallWithParametersData, CallWithResponseAndNoContentResponseData, CallWithResponseAndNoContentResponseResponse, CallWithResponseData, CallWithResponseResponse, CallWithResponsesData, CallWithResponsesError, CallWithResponsesResponse, CallWithResultFromHeaderData, CallWithWeirdParameterNamesData, CollectionFormatData, ComplexParamsData, ComplexParamsResponse, ComplexTypesData, ComplexTypesResponse, DeleteCallWithoutParametersAndResponseData, DeleteFooData3, DeprecatedCallData, DummyAData, DummyAResponse, DummyBData, DummyBResponse, DuplicateName2Data, DuplicateName3Data, DuplicateName4Data, DuplicateNameData, ExportData, FileResponseData, FileResponseResponse, FooWowData, GetApiVbyApiVersionSimpleOperationData, GetApiVbyApiVersionSimpleOperationError, GetApiVbyApiVersionSimpleOperationResponse, GetCallWithOptionalParamData, GetCallWithoutParametersAndResponseData, ImportData, ImportResponse, MultipartRequestData, MultipartResponseData, MultipartResponseResponse, NonAsciiæøåÆøÅöôêÊ字符串Data, NonAsciiæøåÆøÅöôêÊ字符串Response, PatchApiVbyApiVersionNoTagData, PatchCallWithoutParametersAndResponseData, PostApiVbyApiVersionFormDataData, PostApiVbyApiVersionRequestBodyData, PostCallWithOptionalParamData, PostCallWithOptionalParamResponse, PostCallWithoutParametersAndResponseData, PutCallWithoutParametersAndResponseData, PutWithFormUrlEncodedData, TestErrorCodeData, TypesData, TypesResponse, UploadFileData, UploadFileResponse } from '../types.gen';\n\nexport type QueryKey<TOptions extends Options> = [\n    Pick<TOptions, 'baseUrl' | 'body' | 'headers' | 'path' | 'query'> & {\n        _id: string;\n        _infinite?: boolean;\n        tags?: ReadonlyArray<string>;\n    }\n];\n\nconst createQueryKey = <TOptions extends Options>(id: string, options?: TOptions, infinite?: boolean, tags?: ReadonlyArray<string>): [\n    QueryKey<TOptions>[0]\n] => {\n    const params: QueryKey<TOptions>[0] = { _id: id, baseUrl: options?.baseUrl || (options?.client ?? client).getConfig().baseUrl } as QueryKey<TOptions>[0];\n    if (infinite) {\n        params._infinite = infinite;\n    }\n    if (tags) {\n        params.tags = tags;\n    }\n    if (options?.body) {\n        params.body = options.body;\n    }\n    if (options?.headers) {\n        params.headers = options.headers;\n    }\n    if (options?.path) {\n        params.path = options.path;\n    }\n    if (options?.query) {\n        params.query = options.query;\n    }\n    return [params];\n};\n\nexport const exportQueryKey = (options?: Options<ExportData>) => createQueryKey('export', options);\n\nexport const exportOptions = (options?: Options<ExportData>) => queryOptions<unknown, DefaultError, unknown, ReturnType<typeof exportQueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await export_({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: exportQueryKey(options)\n});\n\nexport const patchApiVbyApiVersionNoTagMutation = (options?: Partial<Options<PatchApiVbyApiVersionNoTagData>>): UseMutationOptions<unknown, DefaultError, Options<PatchApiVbyApiVersionNoTagData>> => {\n    const mutationOptions: UseMutationOptions<unknown, DefaultError, Options<PatchApiVbyApiVersionNoTagData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await patchApiVbyApiVersionNoTag({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const importMutation = (options?: Partial<Options<ImportData>>): UseMutationOptions<ImportResponse, DefaultError, Options<ImportData>> => {\n    const mutationOptions: UseMutationOptions<ImportResponse, DefaultError, Options<ImportData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await import_({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const fooWowMutation = (options?: Partial<Options<FooWowData>>): UseMutationOptions<unknown, DefaultError, Options<FooWowData>> => {\n    const mutationOptions: UseMutationOptions<unknown, DefaultError, Options<FooWowData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await fooWow({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const apiVVersionODataControllerCountQueryKey = (options?: Options<ApiVVersionODataControllerCountData>) => createQueryKey('apiVVersionODataControllerCount', options);\n\nexport const apiVVersionODataControllerCountOptions = (options?: Options<ApiVVersionODataControllerCountData>) => queryOptions<ApiVVersionODataControllerCountResponse, DefaultError, ApiVVersionODataControllerCountResponse, ReturnType<typeof apiVVersionODataControllerCountQueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await apiVVersionODataControllerCount({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: apiVVersionODataControllerCountQueryKey(options)\n});\n\nexport const getApiVbyApiVersionSimpleOperationQueryKey = (options: Options<GetApiVbyApiVersionSimpleOperationData>) => createQueryKey('getApiVbyApiVersionSimpleOperation', options);\n\nexport const getApiVbyApiVersionSimpleOperationOptions = (options: Options<GetApiVbyApiVersionSimpleOperationData>) => queryOptions<GetApiVbyApiVersionSimpleOperationResponse, GetApiVbyApiVersionSimpleOperationError, GetApiVbyApiVersionSimpleOperationResponse, ReturnType<typeof getApiVbyApiVersionSimpleOperationQueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await getApiVbyApiVersionSimpleOperation({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: getApiVbyApiVersionSimpleOperationQueryKey(options)\n});\n\nexport const deleteCallWithoutParametersAndResponseMutation = (options?: Partial<Options<DeleteCallWithoutParametersAndResponseData>>): UseMutationOptions<unknown, DefaultError, Options<DeleteCallWithoutParametersAndResponseData>> => {\n    const mutationOptions: UseMutationOptions<unknown, DefaultError, Options<DeleteCallWithoutParametersAndResponseData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await deleteCallWithoutParametersAndResponse({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const getCallWithoutParametersAndResponseQueryKey = (options?: Options<GetCallWithoutParametersAndResponseData>) => createQueryKey('getCallWithoutParametersAndResponse', options);\n\nexport const getCallWithoutParametersAndResponseOptions = (options?: Options<GetCallWithoutParametersAndResponseData>) => queryOptions<unknown, DefaultError, unknown, ReturnType<typeof getCallWithoutParametersAndResponseQueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await getCallWithoutParametersAndResponse({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: getCallWithoutParametersAndResponseQueryKey(options)\n});\n\nexport const patchCallWithoutParametersAndResponseMutation = (options?: Partial<Options<PatchCallWithoutParametersAndResponseData>>): UseMutationOptions<unknown, DefaultError, Options<PatchCallWithoutParametersAndResponseData>> => {\n    const mutationOptions: UseMutationOptions<unknown, DefaultError, Options<PatchCallWithoutParametersAndResponseData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await patchCallWithoutParametersAndResponse({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const postCallWithoutParametersAndResponseMutation = (options?: Partial<Options<PostCallWithoutParametersAndResponseData>>): UseMutationOptions<unknown, DefaultError, Options<PostCallWithoutParametersAndResponseData>> => {\n    const mutationOptions: UseMutationOptions<unknown, DefaultError, Options<PostCallWithoutParametersAndResponseData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await postCallWithoutParametersAndResponse({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const putCallWithoutParametersAndResponseMutation = (options?: Partial<Options<PutCallWithoutParametersAndResponseData>>): UseMutationOptions<unknown, DefaultError, Options<PutCallWithoutParametersAndResponseData>> => {\n    const mutationOptions: UseMutationOptions<unknown, DefaultError, Options<PutCallWithoutParametersAndResponseData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await putCallWithoutParametersAndResponse({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const deleteFooMutation = (options?: Partial<Options<DeleteFooData3>>): UseMutationOptions<unknown, DefaultError, Options<DeleteFooData3>> => {\n    const mutationOptions: UseMutationOptions<unknown, DefaultError, Options<DeleteFooData3>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await deleteFoo({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const callWithDescriptionsMutation = (options?: Partial<Options<CallWithDescriptionsData>>): UseMutationOptions<unknown, DefaultError, Options<CallWithDescriptionsData>> => {\n    const mutationOptions: UseMutationOptions<unknown, DefaultError, Options<CallWithDescriptionsData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await callWithDescriptions({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\n/**\n * @deprecated\n */\nexport const deprecatedCallMutation = (options?: Partial<Options<DeprecatedCallData>>): UseMutationOptions<unknown, DefaultError, Options<DeprecatedCallData>> => {\n    const mutationOptions: UseMutationOptions<unknown, DefaultError, Options<DeprecatedCallData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await deprecatedCall({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const callWithParametersMutation = (options?: Partial<Options<CallWithParametersData>>): UseMutationOptions<unknown, DefaultError, Options<CallWithParametersData>> => {\n    const mutationOptions: UseMutationOptions<unknown, DefaultError, Options<CallWithParametersData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await callWithParameters({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const callWithWeirdParameterNamesMutation = (options?: Partial<Options<CallWithWeirdParameterNamesData>>): UseMutationOptions<unknown, DefaultError, Options<CallWithWeirdParameterNamesData>> => {\n    const mutationOptions: UseMutationOptions<unknown, DefaultError, Options<CallWithWeirdParameterNamesData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await callWithWeirdParameterNames({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const getCallWithOptionalParamQueryKey = (options: Options<GetCallWithOptionalParamData>) => createQueryKey('getCallWithOptionalParam', options);\n\nexport const getCallWithOptionalParamOptions = (options: Options<GetCallWithOptionalParamData>) => queryOptions<unknown, DefaultError, unknown, ReturnType<typeof getCallWithOptionalParamQueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await getCallWithOptionalParam({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: getCallWithOptionalParamQueryKey(options)\n});\n\nconst createInfiniteParams = <K extends Pick<QueryKey<Options>[0], 'body' | 'headers' | 'path' | 'query'>>(queryKey: QueryKey<Options>, page: K) => {\n    const params = { ...queryKey[0] };\n    if (page.body) {\n        params.body = {\n            ...queryKey[0].body as any,\n            ...page.body as any\n        };\n    }\n    if (page.headers) {\n        params.headers = {\n            ...queryKey[0].headers,\n            ...page.headers\n        };\n    }\n    if (page.path) {\n        params.path = {\n            ...queryKey[0].path as any,\n            ...page.path as any\n        };\n    }\n    if (page.query) {\n        params.query = {\n            ...queryKey[0].query as any,\n            ...page.query as any\n        };\n    }\n    return params as unknown as typeof page;\n};\n\nexport const getCallWithOptionalParamInfiniteQueryKey = (options: Options<GetCallWithOptionalParamData>): QueryKey<Options<GetCallWithOptionalParamData>> => createQueryKey('getCallWithOptionalParam', options, true);\n\nexport const getCallWithOptionalParamInfiniteOptions = (options: Options<GetCallWithOptionalParamData>) => infiniteQueryOptions<unknown, DefaultError, InfiniteData<unknown>, QueryKey<Options<GetCallWithOptionalParamData>>, number | Pick<QueryKey<Options<GetCallWithOptionalParamData>>[0], 'body' | 'headers' | 'path' | 'query'>>(\n// @ts-ignore\n{\n    queryFn: async ({ pageParam, queryKey, signal }) => {\n        // @ts-ignore\n        const page: Pick<QueryKey<Options<GetCallWithOptionalParamData>>[0], 'body' | 'headers' | 'path' | 'query'> = typeof pageParam === 'object' ? pageParam : {\n            query: {\n                page: pageParam\n            }\n        };\n        const params = createInfiniteParams(queryKey, page);\n        const { data } = await getCallWithOptionalParam({\n            ...options,\n            ...params,\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: getCallWithOptionalParamInfiniteQueryKey(options)\n});\n\nexport const postCallWithOptionalParamMutation = (options?: Partial<Options<PostCallWithOptionalParamData>>): UseMutationOptions<PostCallWithOptionalParamResponse, DefaultError, Options<PostCallWithOptionalParamData>> => {\n    const mutationOptions: UseMutationOptions<PostCallWithOptionalParamResponse, DefaultError, Options<PostCallWithOptionalParamData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await postCallWithOptionalParam({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const postApiVbyApiVersionRequestBodyMutation = (options?: Partial<Options<PostApiVbyApiVersionRequestBodyData>>): UseMutationOptions<unknown, DefaultError, Options<PostApiVbyApiVersionRequestBodyData>> => {\n    const mutationOptions: UseMutationOptions<unknown, DefaultError, Options<PostApiVbyApiVersionRequestBodyData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await postApiVbyApiVersionRequestBody({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const postApiVbyApiVersionFormDataMutation = (options?: Partial<Options<PostApiVbyApiVersionFormDataData>>): UseMutationOptions<unknown, DefaultError, Options<PostApiVbyApiVersionFormDataData>> => {\n    const mutationOptions: UseMutationOptions<unknown, DefaultError, Options<PostApiVbyApiVersionFormDataData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await postApiVbyApiVersionFormData({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const callWithDefaultParametersQueryKey = (options?: Options<CallWithDefaultParametersData>) => createQueryKey('callWithDefaultParameters', options);\n\nexport const callWithDefaultParametersOptions = (options?: Options<CallWithDefaultParametersData>) => queryOptions<unknown, DefaultError, unknown, ReturnType<typeof callWithDefaultParametersQueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await callWithDefaultParameters({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: callWithDefaultParametersQueryKey(options)\n});\n\nexport const callWithDefaultOptionalParametersMutation = (options?: Partial<Options<CallWithDefaultOptionalParametersData>>): UseMutationOptions<unknown, DefaultError, Options<CallWithDefaultOptionalParametersData>> => {\n    const mutationOptions: UseMutationOptions<unknown, DefaultError, Options<CallWithDefaultOptionalParametersData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await callWithDefaultOptionalParameters({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const callToTestOrderOfParamsMutation = (options?: Partial<Options<CallToTestOrderOfParamsData>>): UseMutationOptions<unknown, DefaultError, Options<CallToTestOrderOfParamsData>> => {\n    const mutationOptions: UseMutationOptions<unknown, DefaultError, Options<CallToTestOrderOfParamsData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await callToTestOrderOfParams({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const duplicateNameMutation = (options?: Partial<Options<DuplicateNameData>>): UseMutationOptions<unknown, DefaultError, Options<DuplicateNameData>> => {\n    const mutationOptions: UseMutationOptions<unknown, DefaultError, Options<DuplicateNameData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await duplicateName({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const duplicateName2QueryKey = (options?: Options<DuplicateName2Data>) => createQueryKey('duplicateName2', options);\n\nexport const duplicateName2Options = (options?: Options<DuplicateName2Data>) => queryOptions<unknown, DefaultError, unknown, ReturnType<typeof duplicateName2QueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await duplicateName2({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: duplicateName2QueryKey(options)\n});\n\nexport const duplicateName3Mutation = (options?: Partial<Options<DuplicateName3Data>>): UseMutationOptions<unknown, DefaultError, Options<DuplicateName3Data>> => {\n    const mutationOptions: UseMutationOptions<unknown, DefaultError, Options<DuplicateName3Data>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await duplicateName3({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const duplicateName4Mutation = (options?: Partial<Options<DuplicateName4Data>>): UseMutationOptions<unknown, DefaultError, Options<DuplicateName4Data>> => {\n    const mutationOptions: UseMutationOptions<unknown, DefaultError, Options<DuplicateName4Data>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await duplicateName4({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const callWithNoContentResponseQueryKey = (options?: Options<CallWithNoContentResponseData>) => createQueryKey('callWithNoContentResponse', options);\n\nexport const callWithNoContentResponseOptions = (options?: Options<CallWithNoContentResponseData>) => queryOptions<CallWithNoContentResponseResponse, DefaultError, CallWithNoContentResponseResponse, ReturnType<typeof callWithNoContentResponseQueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await callWithNoContentResponse({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: callWithNoContentResponseQueryKey(options)\n});\n\nexport const callWithResponseAndNoContentResponseQueryKey = (options?: Options<CallWithResponseAndNoContentResponseData>) => createQueryKey('callWithResponseAndNoContentResponse', options);\n\nexport const callWithResponseAndNoContentResponseOptions = (options?: Options<CallWithResponseAndNoContentResponseData>) => queryOptions<CallWithResponseAndNoContentResponseResponse, DefaultError, CallWithResponseAndNoContentResponseResponse, ReturnType<typeof callWithResponseAndNoContentResponseQueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await callWithResponseAndNoContentResponse({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: callWithResponseAndNoContentResponseQueryKey(options)\n});\n\nexport const dummyAQueryKey = (options?: Options<DummyAData>) => createQueryKey('dummyA', options);\n\nexport const dummyAOptions = (options?: Options<DummyAData>) => queryOptions<DummyAResponse, DefaultError, DummyAResponse, ReturnType<typeof dummyAQueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await dummyA({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: dummyAQueryKey(options)\n});\n\nexport const dummyBQueryKey = (options?: Options<DummyBData>) => createQueryKey('dummyB', options);\n\nexport const dummyBOptions = (options?: Options<DummyBData>) => queryOptions<DummyBResponse, DefaultError, DummyBResponse, ReturnType<typeof dummyBQueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await dummyB({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: dummyBQueryKey(options)\n});\n\nexport const callWithResponseQueryKey = (options?: Options<CallWithResponseData>) => createQueryKey('callWithResponse', options);\n\nexport const callWithResponseOptions = (options?: Options<CallWithResponseData>) => queryOptions<CallWithResponseResponse, DefaultError, CallWithResponseResponse, ReturnType<typeof callWithResponseQueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await callWithResponse({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: callWithResponseQueryKey(options)\n});\n\nexport const callWithDuplicateResponsesMutation = (options?: Partial<Options<CallWithDuplicateResponsesData>>): UseMutationOptions<CallWithDuplicateResponsesResponse, CallWithDuplicateResponsesError, Options<CallWithDuplicateResponsesData>> => {\n    const mutationOptions: UseMutationOptions<CallWithDuplicateResponsesResponse, CallWithDuplicateResponsesError, Options<CallWithDuplicateResponsesData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await callWithDuplicateResponses({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const callWithResponsesMutation = (options?: Partial<Options<CallWithResponsesData>>): UseMutationOptions<CallWithResponsesResponse, CallWithResponsesError, Options<CallWithResponsesData>> => {\n    const mutationOptions: UseMutationOptions<CallWithResponsesResponse, CallWithResponsesError, Options<CallWithResponsesData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await callWithResponses({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const collectionFormatQueryKey = (options: Options<CollectionFormatData>) => createQueryKey('collectionFormat', options);\n\nexport const collectionFormatOptions = (options: Options<CollectionFormatData>) => queryOptions<unknown, DefaultError, unknown, ReturnType<typeof collectionFormatQueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await collectionFormat({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: collectionFormatQueryKey(options)\n});\n\nexport const typesQueryKey = (options: Options<TypesData>) => createQueryKey('types', options);\n\nexport const typesOptions = (options: Options<TypesData>) => queryOptions<TypesResponse, DefaultError, TypesResponse, ReturnType<typeof typesQueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await types({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: typesQueryKey(options)\n});\n\nexport const uploadFileMutation = (options?: Partial<Options<UploadFileData>>): UseMutationOptions<UploadFileResponse, DefaultError, Options<UploadFileData>> => {\n    const mutationOptions: UseMutationOptions<UploadFileResponse, DefaultError, Options<UploadFileData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await uploadFile({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const fileResponseQueryKey = (options: Options<FileResponseData>) => createQueryKey('fileResponse', options);\n\nexport const fileResponseOptions = (options: Options<FileResponseData>) => queryOptions<FileResponseResponse, DefaultError, FileResponseResponse, ReturnType<typeof fileResponseQueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await fileResponse({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: fileResponseQueryKey(options)\n});\n\nexport const complexTypesQueryKey = (options: Options<ComplexTypesData>) => createQueryKey('complexTypes', options);\n\nexport const complexTypesOptions = (options: Options<ComplexTypesData>) => queryOptions<ComplexTypesResponse, DefaultError, ComplexTypesResponse, ReturnType<typeof complexTypesQueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await complexTypes({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: complexTypesQueryKey(options)\n});\n\nexport const multipartResponseQueryKey = (options?: Options<MultipartResponseData>) => createQueryKey('multipartResponse', options);\n\nexport const multipartResponseOptions = (options?: Options<MultipartResponseData>) => queryOptions<MultipartResponseResponse, DefaultError, MultipartResponseResponse, ReturnType<typeof multipartResponseQueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await multipartResponse({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: multipartResponseQueryKey(options)\n});\n\nexport const multipartRequestMutation = (options?: Partial<Options<MultipartRequestData>>): UseMutationOptions<unknown, DefaultError, Options<MultipartRequestData>> => {\n    const mutationOptions: UseMutationOptions<unknown, DefaultError, Options<MultipartRequestData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await multipartRequest({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const complexParamsMutation = (options?: Partial<Options<ComplexParamsData>>): UseMutationOptions<ComplexParamsResponse, DefaultError, Options<ComplexParamsData>> => {\n    const mutationOptions: UseMutationOptions<ComplexParamsResponse, DefaultError, Options<ComplexParamsData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await complexParams({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const callWithResultFromHeaderMutation = (options?: Partial<Options<CallWithResultFromHeaderData>>): UseMutationOptions<unknown, DefaultError, Options<CallWithResultFromHeaderData>> => {\n    const mutationOptions: UseMutationOptions<unknown, DefaultError, Options<CallWithResultFromHeaderData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await callWithResultFromHeader({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const testErrorCodeMutation = (options?: Partial<Options<TestErrorCodeData>>): UseMutationOptions<unknown, DefaultError, Options<TestErrorCodeData>> => {\n    const mutationOptions: UseMutationOptions<unknown, DefaultError, Options<TestErrorCodeData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await testErrorCode({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const nonAsciiæøåÆøÅöôêÊ字符串Mutation = (options?: Partial<Options<NonAsciiæøåÆøÅöôêÊ字符串Data>>): UseMutationOptions<NonAsciiæøåÆøÅöôêÊ字符串Response, DefaultError, Options<NonAsciiæøåÆøÅöôêÊ字符串Data>> => {\n    const mutationOptions: UseMutationOptions<NonAsciiæøåÆøÅöôêÊ字符串Response, DefaultError, Options<NonAsciiæøåÆøÅöôêÊ字符串Data>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await nonAsciiæøåÆøÅöôêÊ字符串({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\n/**\n * Login User\n */\nexport const putWithFormUrlEncodedMutation = (options?: Partial<Options<PutWithFormUrlEncodedData>>): UseMutationOptions<unknown, DefaultError, Options<PutWithFormUrlEncodedData>> => {\n    const mutationOptions: UseMutationOptions<unknown, DefaultError, Options<PutWithFormUrlEncodedData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await putWithFormUrlEncoded({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/preact-query/fetch/client/client.gen.ts",
    "content": "// 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 (options: RequestOptions) => {\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 url = buildUrl(opts);\n\n    return { opts, url };\n  };\n\n  const request: Client['request'] = async (options) => {\n    // @ts-expect-error\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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/preact-query/fetch/client/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type { Auth } from '../core/auth.gen';\nexport type { QuerySerializerOptions } from '../core/bodySerializer.gen';\nexport {\n  formDataBodySerializer,\n  jsonBodySerializer,\n  urlSearchParamsBodySerializer,\n} from '../core/bodySerializer.gen';\nexport { buildClientParams } from '../core/params.gen';\nexport { serializeQueryKeyValue } from '../core/queryKeySerializer.gen';\nexport { createClient } from './client.gen';\nexport type {\n  Client,\n  ClientOptions,\n  Config,\n  CreateClientConfig,\n  Options,\n  RequestOptions,\n  RequestResult,\n  ResolvedRequestOptions,\n  ResponseStyle,\n  TDataShape,\n} from './types.gen';\nexport { createConfig, mergeHeaders } from './utils.gen';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/preact-query/fetch/client/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { Auth } from '../core/auth.gen';\nimport type {\n  ServerSentEventsOptions,\n  ServerSentEventsResult,\n} from '../core/serverSentEvents.gen';\nimport type { Client as CoreClient, Config as CoreConfig } from '../core/types.gen';\nimport type { Middleware } from './utils.gen';\n\nexport type ResponseStyle = 'data' | 'fields';\n\nexport interface Config<T extends ClientOptions = ClientOptions>\n  extends Omit<RequestInit, 'body' | 'headers' | 'method'>, CoreConfig {\n  /**\n   * Base URL for all requests made by this client.\n   */\n  baseUrl?: T['baseUrl'];\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   * Please don't use the Fetch client for Next.js applications. The `next`\n   * options won't have any effect.\n   *\n   * Install {@link https://www.npmjs.com/package/@hey-api/client-next `@hey-api/client-next`} instead.\n   */\n  next?: never;\n  /**\n   * Return the response data parsed in a specified format. By default, `auto`\n   * will infer the appropriate method from the `Content-Type` response header.\n   * You can override this behavior with any of the {@link Body} methods.\n   * Select `stream` if you don't want to parse response data at all.\n   *\n   * @default 'auto'\n   */\n  parseAs?: 'arrayBuffer' | 'auto' | 'blob' | 'formData' | 'json' | 'stream' | 'text';\n  /**\n   * Should we return only data or multiple fields (data, error, response, etc.)?\n   *\n   * @default 'fields'\n   */\n  responseStyle?: ResponseStyle;\n  /**\n   * Throw an error instead of returning it in the response?\n   *\n   * @default false\n   */\n  throwOnError?: T['throwOnError'];\n}\n\nexport interface RequestOptions<\n  TData = unknown,\n  TResponseStyle extends ResponseStyle = 'fields',\n  ThrowOnError extends boolean = boolean,\n  Url extends string = string,\n>\n  extends\n    Config<{\n      responseStyle: TResponseStyle;\n      throwOnError: ThrowOnError;\n    }>,\n    Pick<\n      ServerSentEventsOptions<TData>,\n      | 'onRequest'\n      | 'onSseError'\n      | 'onSseEvent'\n      | 'sseDefaultRetryDelay'\n      | 'sseMaxRetryAttempts'\n      | 'sseMaxRetryDelay'\n    > {\n  /**\n   * Any body that you want to add to your request.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/fetch#body}\n   */\n  body?: unknown;\n  path?: Record<string, unknown>;\n  query?: Record<string, unknown>;\n  /**\n   * Security mechanism(s) to use for the request.\n   */\n  security?: ReadonlyArray<Auth>;\n  url: Url;\n}\n\nexport interface ResolvedRequestOptions<\n  TResponseStyle extends ResponseStyle = 'fields',\n  ThrowOnError extends boolean = boolean,\n  Url extends string = string,\n> extends RequestOptions<unknown, TResponseStyle, ThrowOnError, Url> {\n  serializedBody?: string;\n}\n\nexport type RequestResult<\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = boolean,\n  TResponseStyle extends ResponseStyle = 'fields',\n> = ThrowOnError extends true\n  ? Promise<\n      TResponseStyle extends 'data'\n        ? TData extends Record<string, unknown>\n          ? TData[keyof TData]\n          : TData\n        : {\n            data: TData extends Record<string, unknown> ? TData[keyof TData] : TData;\n            request: Request;\n            response: Response;\n          }\n    >\n  : Promise<\n      TResponseStyle extends 'data'\n        ? (TData extends Record<string, unknown> ? TData[keyof TData] : TData) | undefined\n        : (\n            | {\n                data: TData extends Record<string, unknown> ? TData[keyof TData] : TData;\n                error: undefined;\n              }\n            | {\n                data: undefined;\n                error: TError extends Record<string, unknown> ? TError[keyof TError] : TError;\n              }\n          ) & {\n            request: Request;\n            response: Response;\n          }\n    >;\n\nexport interface ClientOptions {\n  baseUrl?: string;\n  responseStyle?: ResponseStyle;\n  throwOnError?: boolean;\n}\n\ntype MethodFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'>,\n) => RequestResult<TData, TError, ThrowOnError, TResponseStyle>;\n\ntype SseFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'>,\n) => Promise<ServerSentEventsResult<TData, TError>>;\n\ntype RequestFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'> &\n    Pick<Required<RequestOptions<TData, TResponseStyle, ThrowOnError>>, 'method'>,\n) => RequestResult<TData, TError, ThrowOnError, TResponseStyle>;\n\ntype BuildUrlFn = <\n  TData extends {\n    body?: unknown;\n    path?: Record<string, unknown>;\n    query?: Record<string, unknown>;\n    url: string;\n  },\n>(\n  options: TData & Options<TData>,\n) => string;\n\nexport type Client = CoreClient<RequestFn, Config, MethodFn, BuildUrlFn, SseFn> & {\n  interceptors: Middleware<Request, Response, unknown, ResolvedRequestOptions>;\n};\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 = ClientOptions> = (\n  override?: Config<ClientOptions & T>,\n) => Config<Required<ClientOptions> & T>;\n\nexport interface TDataShape {\n  body?: unknown;\n  headers?: unknown;\n  path?: unknown;\n  query?: unknown;\n  url: string;\n}\n\ntype OmitKeys<T, K> = Pick<T, Exclude<keyof T, K>>;\n\nexport type Options<\n  TData extends TDataShape = TDataShape,\n  ThrowOnError extends boolean = boolean,\n  TResponse = unknown,\n  TResponseStyle extends ResponseStyle = 'fields',\n> = OmitKeys<\n  RequestOptions<TResponse, TResponseStyle, ThrowOnError>,\n  'body' | 'path' | 'query' | 'url'\n> &\n  ([TData] extends [never] ? unknown : Omit<TData, 'url'>);\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/preact-query/fetch/client/utils.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/preact-query/fetch/client.gen.ts",
    "content": "// 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: 'http://localhost:3000/base' }));\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/preact-query/fetch/core/auth.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/preact-query/fetch/core/bodySerializer.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/preact-query/fetch/core/params.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/preact-query/fetch/core/pathSerializer.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/preact-query/fetch/core/queryKeySerializer.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\n/**\n * JSON-friendly union that mirrors what Pinia Colada can hash.\n */\nexport type JsonValue =\n  | null\n  | string\n  | number\n  | boolean\n  | JsonValue[]\n  | { [key: string]: JsonValue };\n\n/**\n * Replacer that converts non-JSON values (bigint, Date, etc.) to safe substitutes.\n */\nexport const queryKeyJsonReplacer = (_key: string, value: unknown) => {\n  if (value === undefined || typeof value === 'function' || typeof value === 'symbol') {\n    return undefined;\n  }\n  if (typeof value === 'bigint') {\n    return value.toString();\n  }\n  if (value instanceof Date) {\n    return value.toISOString();\n  }\n  return value;\n};\n\n/**\n * Safely stringifies a value and parses it back into a JsonValue.\n */\nexport const stringifyToJsonValue = (input: unknown): JsonValue | undefined => {\n  try {\n    const json = JSON.stringify(input, queryKeyJsonReplacer);\n    if (json === undefined) {\n      return undefined;\n    }\n    return JSON.parse(json) as JsonValue;\n  } catch {\n    return undefined;\n  }\n};\n\n/**\n * Detects plain objects (including objects with a null prototype).\n */\nconst isPlainObject = (value: unknown): value is Record<string, unknown> => {\n  if (value === null || typeof value !== 'object') {\n    return false;\n  }\n  const prototype = Object.getPrototypeOf(value as object);\n  return prototype === Object.prototype || prototype === null;\n};\n\n/**\n * Turns URLSearchParams into a sorted JSON object for deterministic keys.\n */\nconst serializeSearchParams = (params: URLSearchParams): JsonValue => {\n  const entries = Array.from(params.entries()).sort(([a], [b]) => a.localeCompare(b));\n  const result: Record<string, JsonValue> = {};\n\n  for (const [key, value] of entries) {\n    const existing = result[key];\n    if (existing === undefined) {\n      result[key] = value;\n      continue;\n    }\n\n    if (Array.isArray(existing)) {\n      (existing as string[]).push(value);\n    } else {\n      result[key] = [existing, value];\n    }\n  }\n\n  return result;\n};\n\n/**\n * Normalizes any accepted value into a JSON-friendly shape for query keys.\n */\nexport const serializeQueryKeyValue = (value: unknown): JsonValue | undefined => {\n  if (value === null) {\n    return null;\n  }\n\n  if (typeof value === 'string' || typeof value === 'number' || typeof value === 'boolean') {\n    return value;\n  }\n\n  if (value === undefined || typeof value === 'function' || typeof value === 'symbol') {\n    return undefined;\n  }\n\n  if (typeof value === 'bigint') {\n    return value.toString();\n  }\n\n  if (value instanceof Date) {\n    return value.toISOString();\n  }\n\n  if (Array.isArray(value)) {\n    return stringifyToJsonValue(value);\n  }\n\n  if (typeof URLSearchParams !== 'undefined' && value instanceof URLSearchParams) {\n    return serializeSearchParams(value);\n  }\n\n  if (isPlainObject(value)) {\n    return stringifyToJsonValue(value);\n  }\n\n  return undefined;\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/preact-query/fetch/core/serverSentEvents.gen.ts",
    "content": "// 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 const 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            // Normalize line endings: CRLF -> LF, then CR -> LF\n            buffer = buffer.replace(/\\r\\n/g, '\\n').replace(/\\r/g, '\\n');\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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/preact-query/fetch/core/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { Auth, AuthToken } from './auth.gen';\nimport type { BodySerializer, QuerySerializer, QuerySerializerOptions } from './bodySerializer.gen';\n\nexport type HttpMethod =\n  | 'connect'\n  | 'delete'\n  | 'get'\n  | 'head'\n  | 'options'\n  | 'patch'\n  | 'post'\n  | 'put'\n  | 'trace';\n\nexport type Client<\n  RequestFn = never,\n  Config = unknown,\n  MethodFn = never,\n  BuildUrlFn = never,\n  SseFn = never,\n> = {\n  /**\n   * Returns the final request URL.\n   */\n  buildUrl: BuildUrlFn;\n  getConfig: () => Config;\n  request: RequestFn;\n  setConfig: (config: Config) => Config;\n} & {\n  [K in HttpMethod]: MethodFn;\n} & ([SseFn] extends [never] ? { sse?: never } : { sse: { [K in HttpMethod]: SseFn } });\n\nexport interface Config {\n  /**\n   * Auth token or a function returning auth token. The resolved value will be\n   * added to the request payload as defined by its `security` array.\n   */\n  auth?: ((auth: Auth) => Promise<AuthToken> | AuthToken) | AuthToken;\n  /**\n   * A function for serializing request body parameter. By default,\n   * {@link JSON.stringify()} will be used.\n   */\n  bodySerializer?: BodySerializer | null;\n  /**\n   * An object containing any HTTP headers that you want to pre-populate your\n   * `Headers` object with.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/Headers/Headers#init See more}\n   */\n  headers?:\n    | RequestInit['headers']\n    | Record<\n        string,\n        string | number | boolean | (string | number | boolean)[] | null | undefined | unknown\n      >;\n  /**\n   * The request method.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/fetch#method See more}\n   */\n  method?: Uppercase<HttpMethod>;\n  /**\n   * A function for serializing request query parameters. By default, arrays\n   * will be exploded in form style, objects will be exploded in deepObject\n   * style, and reserved characters are percent-encoded.\n   *\n   * This method will have no effect if the native `paramsSerializer()` Axios\n   * API function is used.\n   *\n   * {@link https://swagger.io/docs/specification/serialization/#query View examples}\n   */\n  querySerializer?: QuerySerializer | QuerySerializerOptions;\n  /**\n   * A function validating request data. This is useful if you want to ensure\n   * the request conforms to the desired shape, so it can be safely sent to\n   * the server.\n   */\n  requestValidator?: (data: unknown) => Promise<unknown>;\n  /**\n   * A function transforming response data before it's returned. This is useful\n   * for post-processing data, e.g. converting ISO strings into Date objects.\n   */\n  responseTransformer?: (data: unknown) => Promise<unknown>;\n  /**\n   * A function validating response data. This is useful if you want to ensure\n   * the response conforms to the desired shape, so it can be safely passed to\n   * the transformers and returned to the user.\n   */\n  responseValidator?: (data: unknown) => Promise<unknown>;\n}\n\ntype IsExactlyNeverOrNeverUndefined<T> = [T] extends [never]\n  ? true\n  : [T] extends [never | undefined]\n    ? [undefined] extends [T]\n      ? false\n      : true\n    : false;\n\nexport type OmitNever<T extends Record<string, unknown>> = {\n  [K in keyof T as IsExactlyNeverOrNeverUndefined<T[K]> extends true ? never : K]: T[K];\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/preact-query/fetch/core/utils.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/preact-query/fetch/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport { apiVVersionODataControllerCount, callToTestOrderOfParams, callWithDefaultOptionalParameters, callWithDefaultParameters, callWithDescriptions, callWithDuplicateResponses, callWithNoContentResponse, callWithParameters, callWithResponse, callWithResponseAndNoContentResponse, callWithResponses, callWithResultFromHeader, callWithWeirdParameterNames, collectionFormat, complexParams, complexTypes, deleteCallWithoutParametersAndResponse, deleteFoo, deprecatedCall, dummyA, dummyB, duplicateName, duplicateName2, duplicateName3, duplicateName4, export_, fileResponse, fooWow, getApiVbyApiVersionSimpleOperation, getCallWithOptionalParam, getCallWithoutParametersAndResponse, headCallWithoutParametersAndResponse, import_, multipartRequest, multipartResponse, nonAsciiæøåÆøÅöôêÊ字符串, type Options, optionsCallWithoutParametersAndResponse, patchApiVbyApiVersionNoTag, patchCallWithoutParametersAndResponse, postApiVbyApiVersionFormData, postApiVbyApiVersionRequestBody, postCallWithOptionalParam, postCallWithoutParametersAndResponse, putCallWithoutParametersAndResponse, putWithFormUrlEncoded, testErrorCode, types, uploadFile } from './sdk.gen';\nexport type { _3eNum1Период, _400, AdditionalPropertiesIntegerIssue, AdditionalPropertiesUnknownIssue, AdditionalPropertiesUnknownIssue2, AdditionalPropertiesUnknownIssue3, AdditionalPropertiesUnknownIssueWritable, AnyOfAnyAndNull, AnyOfArrays, ApiVVersionODataControllerCountData, ApiVVersionODataControllerCountResponse, ApiVVersionODataControllerCountResponses, ArrayWithAnyOfProperties, ArrayWithArray, ArrayWithBooleans, ArrayWithNumbers, ArrayWithProperties, ArrayWithReferences, ArrayWithStrings, CallToTestOrderOfParamsData, CallWithDefaultOptionalParametersData, CallWithDefaultParametersData, CallWithDescriptionsData, CallWithDuplicateResponsesData, CallWithDuplicateResponsesError, CallWithDuplicateResponsesErrors, CallWithDuplicateResponsesResponse, CallWithDuplicateResponsesResponses, CallWithNoContentResponseData, CallWithNoContentResponseResponse, CallWithNoContentResponseResponses, CallWithParametersData, CallWithResponseAndNoContentResponseData, CallWithResponseAndNoContentResponseResponse, CallWithResponseAndNoContentResponseResponses, CallWithResponseData, CallWithResponseResponse, CallWithResponseResponses, CallWithResponsesData, CallWithResponsesError, CallWithResponsesErrors, CallWithResponsesResponse, CallWithResponsesResponses, CallWithResultFromHeaderData, CallWithResultFromHeaderErrors, CallWithResultFromHeaderResponses, CallWithWeirdParameterNamesData, CamelCaseCommentWithBreaks, CharactersInDescription, ClientOptions, CollectionFormatData, CommentWithBackticks, CommentWithBackticksAndQuotes, CommentWithBreaks, CommentWithExpressionPlaceholders, CommentWithQuotes, CommentWithReservedCharacters, CommentWithSlashes, ComplexParamsData, ComplexParamsResponse, ComplexParamsResponses, ComplexTypesData, ComplexTypesErrors, ComplexTypesResponse, ComplexTypesResponses, CompositionBaseModel, CompositionExtendedModel, CompositionWithAllOfAndNullable, CompositionWithAnyOf, CompositionWithAnyOfAndNullable, CompositionWithAnyOfAnonymous, CompositionWithNestedAnyAndTypeNull, CompositionWithNestedAnyOfAndNull, CompositionWithOneOf, CompositionWithOneOfAndComplexArrayDictionary, CompositionWithOneOfAndNullable, CompositionWithOneOfAndProperties, CompositionWithOneOfAndSimpleArrayDictionary, CompositionWithOneOfAndSimpleDictionary, CompositionWithOneOfAnonymous, CompositionWithOneOfDiscriminator, ConstValue, Default, DeleteCallWithoutParametersAndResponseData, DeleteFooData, DeleteFooData2, DeleteFooData3, DeprecatedCallData, DeprecatedModel, DictionaryWithArray, DictionaryWithDictionary, DictionaryWithProperties, DictionaryWithPropertiesAndAdditionalProperties, DictionaryWithReference, DictionaryWithString, DummyAData, DummyAResponse, DummyAResponses, DummyBData, DummyBResponse, DummyBResponses, DuplicateName2Data, DuplicateName3Data, DuplicateName4Data, DuplicateNameData, EnumFromDescription, EnumWithExtensions, EnumWithNumbers, EnumWithReplacedCharacters, EnumWithStrings, EnumWithXEnumNames, ExportData, ExternalRefA, ExternalRefB, ExternalSharedModel, File, FileResponseData, FileResponseResponse, FileResponseResponses, FileWritable, FooWowData, FooWowResponses, FreeFormObjectWithAdditionalPropertiesEqEmptyObject, FreeFormObjectWithAdditionalPropertiesEqTrue, FreeFormObjectWithoutAdditionalProperties, GenericSchemaDuplicateIssue1SystemBoolean, GenericSchemaDuplicateIssue1SystemBooleanWritable, GenericSchemaDuplicateIssue1SystemString, GenericSchemaDuplicateIssue1SystemStringWritable, GetApiVbyApiVersionSimpleOperationData, GetApiVbyApiVersionSimpleOperationError, GetApiVbyApiVersionSimpleOperationErrors, GetApiVbyApiVersionSimpleOperationResponse, GetApiVbyApiVersionSimpleOperationResponses, GetCallWithOptionalParamData, GetCallWithoutParametersAndResponseData, HeadCallWithoutParametersAndResponseData, Import, ImportData, ImportResponse, ImportResponses, IoK8sApimachineryPkgApisMetaV1DeleteOptions, IoK8sApimachineryPkgApisMetaV1Preconditions, ModelCircle, ModelFromZendesk, ModelSquare, ModelThatExtends, ModelThatExtendsExtends, ModelWithAdditionalPropertiesEqTrue, ModelWithAdditionalPropertiesRef, ModelWithAnyOfConstantSizeArray, ModelWithAnyOfConstantSizeArrayAndIntersect, ModelWithAnyOfConstantSizeArrayNullable, ModelWithAnyOfConstantSizeArrayWithNSizeAndOptions, ModelWithAnyOfConstantSizeArrayWithNSizeAndOptionsWritable, ModelWithArray, ModelWithArrayReadOnlyAndWriteOnly, ModelWithArrayReadOnlyAndWriteOnlyWritable, ModelWithBackticksInDescription, ModelWithBoolean, ModelWithCircularReference, ModelWithConst, ModelWithConstantSizeArray, ModelWithDictionary, ModelWithDuplicateImports, ModelWithDuplicateProperties, ModelWithEnum, ModelWithEnumFromDescription, ModelWithEnumWithHyphen, ModelWithInteger, ModelWithNestedArrayEnums, ModelWithNestedArrayEnumsData, ModelWithNestedArrayEnumsDataBar, ModelWithNestedArrayEnumsDataFoo, ModelWithNestedCompositionEnums, ModelWithNestedEnums, ModelWithNestedProperties, ModelWithNullableObject, ModelWithNullableString, ModelWithNumericEnumUnion, ModelWithOneOfAndProperties, ModelWithOneOfEnum, ModelWithOrderedProperties, ModelWithPattern, ModelWithPatternWritable, ModelWithPrefixItemsConstantSizeArray, ModelWithProperties, ModelWithPropertiesWritable, ModelWithReadOnlyAndWriteOnly, ModelWithReadOnlyAndWriteOnlyWritable, ModelWithReference, ModelWithReferenceWritable, ModelWithString, ModelWithStringError, MultipartRequestData, MultipartResponseData, MultipartResponseResponse, MultipartResponseResponses, NestedAnyOfArraysNullable, NonAsciiæøåÆøÅöôêÊ字符串Data, NonAsciiæøåÆøÅöôêÊ字符串Response, NonAsciiæøåÆøÅöôêÊ字符串Responses, NonAsciiStringæøåÆøÅöôêÊ字符串, NullableObject, OneOfAllOfIssue, OneOfAllOfIssueWritable, OptionsCallWithoutParametersAndResponseData, Pageable, ParameterSimpleParameterUnused, PatchApiVbyApiVersionNoTagData, PatchApiVbyApiVersionNoTagResponses, PatchCallWithoutParametersAndResponseData, PostApiVbyApiVersionFormDataData, PostApiVbyApiVersionRequestBodyData, PostCallWithOptionalParamData, PostCallWithOptionalParamResponse, PostCallWithOptionalParamResponses, PostCallWithoutParametersAndResponseData, PostServiceWithEmptyTagResponse, PostServiceWithEmptyTagResponse2, PutCallWithoutParametersAndResponseData, PutWithFormUrlEncodedData, SchemaWithFormRestrictedKeys, SimpleBoolean, SimpleFile, SimpleFormData, SimpleInteger, SimpleParameter, SimpleReference, SimpleRequestBody, SimpleString, SimpleStringWithPattern, TestErrorCodeData, TestErrorCodeErrors, TestErrorCodeResponses, TypesData, TypesResponse, TypesResponses, UploadFileData, UploadFileResponse, UploadFileResponses, XFooBar } from './types.gen';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/preact-query/fetch/sdk.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport { type Client, formDataBodySerializer, type Options as Options2, type TDataShape, urlSearchParamsBodySerializer } from './client';\nimport { client } from './client.gen';\nimport type { ApiVVersionODataControllerCountData, ApiVVersionODataControllerCountResponses, CallToTestOrderOfParamsData, CallWithDefaultOptionalParametersData, CallWithDefaultParametersData, CallWithDescriptionsData, CallWithDuplicateResponsesData, CallWithDuplicateResponsesErrors, CallWithDuplicateResponsesResponses, CallWithNoContentResponseData, CallWithNoContentResponseResponses, CallWithParametersData, CallWithResponseAndNoContentResponseData, CallWithResponseAndNoContentResponseResponses, CallWithResponseData, CallWithResponseResponses, CallWithResponsesData, CallWithResponsesErrors, CallWithResponsesResponses, CallWithResultFromHeaderData, CallWithResultFromHeaderErrors, CallWithResultFromHeaderResponses, CallWithWeirdParameterNamesData, CollectionFormatData, ComplexParamsData, ComplexParamsResponses, ComplexTypesData, ComplexTypesErrors, ComplexTypesResponses, DeleteCallWithoutParametersAndResponseData, DeleteFooData3, DeprecatedCallData, DummyAData, DummyAResponses, DummyBData, DummyBResponses, DuplicateName2Data, DuplicateName3Data, DuplicateName4Data, DuplicateNameData, ExportData, FileResponseData, FileResponseResponses, FooWowData, FooWowResponses, GetApiVbyApiVersionSimpleOperationData, GetApiVbyApiVersionSimpleOperationErrors, GetApiVbyApiVersionSimpleOperationResponses, GetCallWithOptionalParamData, GetCallWithoutParametersAndResponseData, HeadCallWithoutParametersAndResponseData, ImportData, ImportResponses, MultipartRequestData, MultipartResponseData, MultipartResponseResponses, NonAsciiæøåÆøÅöôêÊ字符串Data, NonAsciiæøåÆøÅöôêÊ字符串Responses, OptionsCallWithoutParametersAndResponseData, PatchApiVbyApiVersionNoTagData, PatchApiVbyApiVersionNoTagResponses, PatchCallWithoutParametersAndResponseData, PostApiVbyApiVersionFormDataData, PostApiVbyApiVersionRequestBodyData, PostCallWithOptionalParamData, PostCallWithOptionalParamResponses, PostCallWithoutParametersAndResponseData, PutCallWithoutParametersAndResponseData, PutWithFormUrlEncodedData, TestErrorCodeData, TestErrorCodeErrors, TestErrorCodeResponses, TypesData, TypesResponses, UploadFileData, UploadFileResponses } from './types.gen';\n\nexport type Options<TData extends TDataShape = TDataShape, ThrowOnError extends boolean = boolean> = Options2<TData, ThrowOnError> & {\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\nexport const export_ = <ThrowOnError extends boolean = false>(options?: Options<ExportData, ThrowOnError>) => (options?.client ?? client).get<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/no+tag', ...options });\n\nexport const patchApiVbyApiVersionNoTag = <ThrowOnError extends boolean = false>(options?: Options<PatchApiVbyApiVersionNoTagData, ThrowOnError>) => (options?.client ?? client).patch<PatchApiVbyApiVersionNoTagResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/no+tag', ...options });\n\nexport const import_ = <ThrowOnError extends boolean = false>(options: Options<ImportData, ThrowOnError>) => (options.client ?? client).post<ImportResponses, unknown, ThrowOnError>({\n    url: '/api/v{api-version}/no+tag',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options.headers\n    }\n});\n\nexport const fooWow = <ThrowOnError extends boolean = false>(options?: Options<FooWowData, ThrowOnError>) => (options?.client ?? client).put<FooWowResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/no+tag', ...options });\n\nexport const apiVVersionODataControllerCount = <ThrowOnError extends boolean = false>(options?: Options<ApiVVersionODataControllerCountData, ThrowOnError>) => (options?.client ?? client).get<ApiVVersionODataControllerCountResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple/$count', ...options });\n\nexport const getApiVbyApiVersionSimpleOperation = <ThrowOnError extends boolean = false>(options: Options<GetApiVbyApiVersionSimpleOperationData, ThrowOnError>) => (options.client ?? client).get<GetApiVbyApiVersionSimpleOperationResponses, GetApiVbyApiVersionSimpleOperationErrors, ThrowOnError>({ url: '/api/v{api-version}/simple:operation', ...options });\n\nexport const deleteCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<DeleteCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).delete<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const getCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<GetCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).get<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const headCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<HeadCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).head<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const optionsCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<OptionsCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).options<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const patchCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<PatchCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).patch<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const postCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<PostCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).post<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const putCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<PutCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).put<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const deleteFoo = <ThrowOnError extends boolean = false>(options: Options<DeleteFooData3, ThrowOnError>) => (options.client ?? client).delete<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/foo/{foo_param}/bar/{BarParam}', ...options });\n\nexport const callWithDescriptions = <ThrowOnError extends boolean = false>(options?: Options<CallWithDescriptionsData, ThrowOnError>) => (options?.client ?? client).post<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/descriptions', ...options });\n\n/**\n * @deprecated\n */\nexport const deprecatedCall = <ThrowOnError extends boolean = false>(options: Options<DeprecatedCallData, ThrowOnError>) => (options.client ?? client).post<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/parameters/deprecated', ...options });\n\nexport const callWithParameters = <ThrowOnError extends boolean = false>(options: Options<CallWithParametersData, ThrowOnError>) => (options.client ?? client).post<unknown, unknown, ThrowOnError>({\n    url: '/api/v{api-version}/parameters/{parameterPath}',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options.headers\n    }\n});\n\nexport const callWithWeirdParameterNames = <ThrowOnError extends boolean = false>(options: Options<CallWithWeirdParameterNamesData, ThrowOnError>) => (options.client ?? client).post<unknown, unknown, ThrowOnError>({\n    url: '/api/v{api-version}/parameters/{parameter.path.1}/{parameter-path-2}/{PARAMETER-PATH-3}',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options.headers\n    }\n});\n\nexport const getCallWithOptionalParam = <ThrowOnError extends boolean = false>(options: Options<GetCallWithOptionalParamData, ThrowOnError>) => (options.client ?? client).get<unknown, unknown, ThrowOnError>({\n    url: '/api/v{api-version}/parameters',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options.headers\n    }\n});\n\nexport const postCallWithOptionalParam = <ThrowOnError extends boolean = false>(options: Options<PostCallWithOptionalParamData, ThrowOnError>) => (options.client ?? client).post<PostCallWithOptionalParamResponses, unknown, ThrowOnError>({\n    url: '/api/v{api-version}/parameters',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options.headers\n    }\n});\n\nexport const postApiVbyApiVersionRequestBody = <ThrowOnError extends boolean = false>(options?: Options<PostApiVbyApiVersionRequestBodyData, ThrowOnError>) => (options?.client ?? client).post<unknown, unknown, ThrowOnError>({\n    url: '/api/v{api-version}/requestBody',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options?.headers\n    }\n});\n\nexport const postApiVbyApiVersionFormData = <ThrowOnError extends boolean = false>(options?: Options<PostApiVbyApiVersionFormDataData, ThrowOnError>) => (options?.client ?? client).post<unknown, unknown, ThrowOnError>({\n    ...formDataBodySerializer,\n    url: '/api/v{api-version}/formData',\n    ...options,\n    headers: {\n        'Content-Type': null,\n        ...options?.headers\n    }\n});\n\nexport const callWithDefaultParameters = <ThrowOnError extends boolean = false>(options?: Options<CallWithDefaultParametersData, ThrowOnError>) => (options?.client ?? client).get<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/defaults', ...options });\n\nexport const callWithDefaultOptionalParameters = <ThrowOnError extends boolean = false>(options?: Options<CallWithDefaultOptionalParametersData, ThrowOnError>) => (options?.client ?? client).post<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/defaults', ...options });\n\nexport const callToTestOrderOfParams = <ThrowOnError extends boolean = false>(options: Options<CallToTestOrderOfParamsData, ThrowOnError>) => (options.client ?? client).put<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/defaults', ...options });\n\nexport const duplicateName = <ThrowOnError extends boolean = false>(options?: Options<DuplicateNameData, ThrowOnError>) => (options?.client ?? client).delete<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/duplicate', ...options });\n\nexport const duplicateName2 = <ThrowOnError extends boolean = false>(options?: Options<DuplicateName2Data, ThrowOnError>) => (options?.client ?? client).get<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/duplicate', ...options });\n\nexport const duplicateName3 = <ThrowOnError extends boolean = false>(options?: Options<DuplicateName3Data, ThrowOnError>) => (options?.client ?? client).post<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/duplicate', ...options });\n\nexport const duplicateName4 = <ThrowOnError extends boolean = false>(options?: Options<DuplicateName4Data, ThrowOnError>) => (options?.client ?? client).put<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/duplicate', ...options });\n\nexport const callWithNoContentResponse = <ThrowOnError extends boolean = false>(options?: Options<CallWithNoContentResponseData, ThrowOnError>) => (options?.client ?? client).get<CallWithNoContentResponseResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/no-content', ...options });\n\nexport const callWithResponseAndNoContentResponse = <ThrowOnError extends boolean = false>(options?: Options<CallWithResponseAndNoContentResponseData, ThrowOnError>) => (options?.client ?? client).get<CallWithResponseAndNoContentResponseResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/multiple-tags/response-and-no-content', ...options });\n\nexport const dummyA = <ThrowOnError extends boolean = false>(options?: Options<DummyAData, ThrowOnError>) => (options?.client ?? client).get<DummyAResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/multiple-tags/a', ...options });\n\nexport const dummyB = <ThrowOnError extends boolean = false>(options?: Options<DummyBData, ThrowOnError>) => (options?.client ?? client).get<DummyBResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/multiple-tags/b', ...options });\n\nexport const callWithResponse = <ThrowOnError extends boolean = false>(options?: Options<CallWithResponseData, ThrowOnError>) => (options?.client ?? client).get<CallWithResponseResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/response', ...options });\n\nexport const callWithDuplicateResponses = <ThrowOnError extends boolean = false>(options?: Options<CallWithDuplicateResponsesData, ThrowOnError>) => (options?.client ?? client).post<CallWithDuplicateResponsesResponses, CallWithDuplicateResponsesErrors, ThrowOnError>({ url: '/api/v{api-version}/response', ...options });\n\nexport const callWithResponses = <ThrowOnError extends boolean = false>(options?: Options<CallWithResponsesData, ThrowOnError>) => (options?.client ?? client).put<CallWithResponsesResponses, CallWithResponsesErrors, ThrowOnError>({ url: '/api/v{api-version}/response', ...options });\n\nexport const collectionFormat = <ThrowOnError extends boolean = false>(options: Options<CollectionFormatData, ThrowOnError>) => (options.client ?? client).get<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/collectionFormat', ...options });\n\nexport const types = <ThrowOnError extends boolean = false>(options: Options<TypesData, ThrowOnError>) => (options.client ?? client).get<TypesResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/types', ...options });\n\nexport const uploadFile = <ThrowOnError extends boolean = false>(options: Options<UploadFileData, ThrowOnError>) => (options.client ?? client).post<UploadFileResponses, unknown, ThrowOnError>({\n    ...urlSearchParamsBodySerializer,\n    url: '/api/v{api-version}/upload',\n    ...options,\n    headers: {\n        'Content-Type': 'application/x-www-form-urlencoded',\n        ...options.headers\n    }\n});\n\nexport const fileResponse = <ThrowOnError extends boolean = false>(options: Options<FileResponseData, ThrowOnError>) => (options.client ?? client).get<FileResponseResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/file/{id}', ...options });\n\nexport const complexTypes = <ThrowOnError extends boolean = false>(options: Options<ComplexTypesData, ThrowOnError>) => (options.client ?? client).get<ComplexTypesResponses, ComplexTypesErrors, ThrowOnError>({\n    querySerializer: { parameters: { parameterObject: { object: { style: 'form' } } } },\n    url: '/api/v{api-version}/complex',\n    ...options\n});\n\nexport const multipartResponse = <ThrowOnError extends boolean = false>(options?: Options<MultipartResponseData, ThrowOnError>) => (options?.client ?? client).get<MultipartResponseResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/multipart', ...options });\n\nexport const multipartRequest = <ThrowOnError extends boolean = false>(options?: Options<MultipartRequestData, ThrowOnError>) => (options?.client ?? client).post<unknown, unknown, ThrowOnError>({\n    ...formDataBodySerializer,\n    url: '/api/v{api-version}/multipart',\n    ...options,\n    headers: {\n        'Content-Type': null,\n        ...options?.headers\n    }\n});\n\nexport const complexParams = <ThrowOnError extends boolean = false>(options: Options<ComplexParamsData, ThrowOnError>) => (options.client ?? client).put<ComplexParamsResponses, unknown, ThrowOnError>({\n    url: '/api/v{api-version}/complex/{id}',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json-patch+json',\n        ...options.headers\n    }\n});\n\nexport const callWithResultFromHeader = <ThrowOnError extends boolean = false>(options?: Options<CallWithResultFromHeaderData, ThrowOnError>) => (options?.client ?? client).post<CallWithResultFromHeaderResponses, CallWithResultFromHeaderErrors, ThrowOnError>({ url: '/api/v{api-version}/header', ...options });\n\nexport const testErrorCode = <ThrowOnError extends boolean = false>(options: Options<TestErrorCodeData, ThrowOnError>) => (options.client ?? client).post<TestErrorCodeResponses, TestErrorCodeErrors, ThrowOnError>({ url: '/api/v{api-version}/error', ...options });\n\nexport const nonAsciiæøåÆøÅöôêÊ字符串 = <ThrowOnError extends boolean = false>(options: Options<NonAsciiæøåÆøÅöôêÊ字符串Data, ThrowOnError>) => (options.client ?? client).post<NonAsciiæøåÆøÅöôêÊ字符串Responses, unknown, ThrowOnError>({ url: '/api/v{api-version}/non-ascii-æøåÆØÅöôêÊ字符串', ...options });\n\n/**\n * Login User\n */\nexport const putWithFormUrlEncoded = <ThrowOnError extends boolean = false>(options: Options<PutWithFormUrlEncodedData, ThrowOnError>) => (options.client ?? client).put<unknown, unknown, ThrowOnError>({\n    ...urlSearchParamsBodySerializer,\n    url: '/api/v{api-version}/non-ascii-æøåÆØÅöôêÊ字符串',\n    ...options,\n    headers: {\n        'Content-Type': 'application/x-www-form-urlencoded',\n        ...options.headers\n    }\n});\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/preact-query/fetch/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type ClientOptions = {\n    baseUrl: 'http://localhost:3000/base' | (string & {});\n};\n\n/**\n * Model with number-only name\n */\nexport type _400 = string;\n\n/**\n * External ref to shared model (A)\n */\nexport type ExternalRefA = ExternalSharedModel;\n\n/**\n * External ref to shared model (B)\n */\nexport type ExternalRefB = ExternalSharedModel;\n\n/**\n * Testing multiline comments in string: First line\n * Second line\n *\n * Fourth line\n */\nexport type CamelCaseCommentWithBreaks = number;\n\n/**\n * Testing multiline comments in string: First line\n * Second line\n *\n * Fourth line\n */\nexport type CommentWithBreaks = number;\n\n/**\n * Testing backticks in string: `backticks` and ```multiple backticks``` should work\n */\nexport type CommentWithBackticks = number;\n\n/**\n * Testing backticks and quotes in string: `backticks`, 'quotes', \"double quotes\" and ```multiple backticks``` should work\n */\nexport type CommentWithBackticksAndQuotes = number;\n\n/**\n * Testing slashes in string: \\backwards\\\\\\ and /forwards/// should work\n */\nexport type CommentWithSlashes = number;\n\n/**\n * Testing expression placeholders in string: ${expression} should work\n */\nexport type CommentWithExpressionPlaceholders = number;\n\n/**\n * Testing quotes in string: 'single quote''' and \"double quotes\"\"\" should work\n */\nexport type CommentWithQuotes = number;\n\n/**\n * Testing reserved characters in string: * inline * and ** inline ** should work\n */\nexport type CommentWithReservedCharacters = number;\n\n/**\n * This is a simple number\n */\nexport type SimpleInteger = number;\n\n/**\n * This is a simple boolean\n */\nexport type SimpleBoolean = boolean;\n\n/**\n * This is a simple string\n */\nexport type SimpleString = string;\n\n/**\n * A string with non-ascii (unicode) characters valid in typescript identifiers (æøåÆØÅöÔèÈ字符串)\n */\nexport type NonAsciiStringæøåÆøÅöôêÊ字符串 = string;\n\n/**\n * This is a simple file\n */\nexport type SimpleFile = Blob | File;\n\n/**\n * This is a simple reference\n */\nexport type SimpleReference = ModelWithString;\n\n/**\n * This is a simple string\n */\nexport type SimpleStringWithPattern = string | null;\n\n/**\n * This is a simple enum with strings\n */\nexport type EnumWithStrings = 'Success' | 'Warning' | 'Error' | '\\'Single Quote\\'' | '\"Double Quotes\"' | 'Non-ascii: øæåôöØÆÅÔÖ字符串';\n\nexport type EnumWithReplacedCharacters = '\\'Single Quote\\'' | '\"Double Quotes\"' | 'øæåôöØÆÅÔÖ字符串' | 3.1 | '';\n\n/**\n * This is a simple enum with numbers\n */\nexport type EnumWithNumbers = 1 | 2 | 3 | 1.1 | 1.2 | 1.3 | 100 | 200 | 300 | -100 | -200 | -300 | -1.1 | -1.2 | -1.3;\n\n/**\n * Success=1,Warning=2,Error=3\n */\nexport type EnumFromDescription = number;\n\n/**\n * This is a simple enum with numbers\n */\nexport type EnumWithExtensions = 200 | 400 | 500;\n\nexport type EnumWithXEnumNames = 0 | 1 | 2;\n\n/**\n * This is a simple array with numbers\n */\nexport type ArrayWithNumbers = Array<number>;\n\n/**\n * This is a simple array with booleans\n */\nexport type ArrayWithBooleans = Array<boolean>;\n\n/**\n * This is a simple array with strings\n */\nexport type ArrayWithStrings = Array<string>;\n\n/**\n * This is a simple array with references\n */\nexport type ArrayWithReferences = Array<ModelWithString>;\n\n/**\n * This is a simple array containing an array\n */\nexport type ArrayWithArray = Array<Array<ModelWithString>>;\n\n/**\n * This is a simple array with properties\n */\nexport type ArrayWithProperties = Array<{\n    '16x16'?: CamelCaseCommentWithBreaks;\n    bar?: string;\n}>;\n\n/**\n * This is a simple array with any of properties\n */\nexport type ArrayWithAnyOfProperties = Array<{\n    foo?: string;\n} | {\n    bar?: string;\n}>;\n\nexport type AnyOfAnyAndNull = {\n    data?: unknown | null;\n};\n\n/**\n * This is a simple array with any of properties\n */\nexport type AnyOfArrays = {\n    results?: Array<{\n        foo?: string;\n    } | {\n        bar?: string;\n    }>;\n};\n\n/**\n * This is a string dictionary\n */\nexport type DictionaryWithString = {\n    [key: string]: string;\n};\n\nexport type DictionaryWithPropertiesAndAdditionalProperties = {\n    foo?: number;\n    bar?: boolean;\n    [key: string]: string | number | boolean | undefined;\n};\n\n/**\n * This is a string reference\n */\nexport type DictionaryWithReference = {\n    [key: string]: ModelWithString;\n};\n\n/**\n * This is a complex dictionary\n */\nexport type DictionaryWithArray = {\n    [key: string]: Array<ModelWithString>;\n};\n\n/**\n * This is a string dictionary\n */\nexport type DictionaryWithDictionary = {\n    [key: string]: {\n        [key: string]: string;\n    };\n};\n\n/**\n * This is a complex dictionary\n */\nexport type DictionaryWithProperties = {\n    [key: string]: {\n        foo?: string;\n        bar?: string;\n    };\n};\n\n/**\n * This is a model with one number property\n */\nexport type ModelWithInteger = {\n    /**\n     * This is a simple number property\n     */\n    prop?: number;\n};\n\n/**\n * This is a model with one boolean property\n */\nexport type ModelWithBoolean = {\n    /**\n     * This is a simple boolean property\n     */\n    prop?: boolean;\n};\n\n/**\n * This is a model with one string property\n */\nexport type ModelWithString = {\n    /**\n     * This is a simple string property\n     */\n    prop?: string;\n};\n\n/**\n * This is a model with one string property\n */\nexport type ModelWithStringError = {\n    /**\n     * This is a simple string property\n     */\n    prop?: string;\n};\n\n/**\n * `Comment` or `VoiceComment`. The JSON object for adding voice comments to tickets is different. See [Adding voice comments to tickets](/documentation/ticketing/managing-tickets/adding-voice-comments-to-tickets)\n */\nexport type ModelFromZendesk = string;\n\n/**\n * This is a model with one string property\n */\nexport type ModelWithNullableString = {\n    /**\n     * This is a simple string property\n     */\n    nullableProp1?: string | null;\n    /**\n     * This is a simple string property\n     */\n    nullableRequiredProp1: string | null;\n    /**\n     * This is a simple string property\n     */\n    nullableProp2?: string | null;\n    /**\n     * This is a simple string property\n     */\n    nullableRequiredProp2: string | null;\n    /**\n     * This is a simple enum with strings\n     */\n    'foo_bar-enum'?: 'Success' | 'Warning' | 'Error' | 'ØÆÅ字符串';\n};\n\n/**\n * This is a model with one enum\n */\nexport type ModelWithEnum = {\n    /**\n     * This is a simple enum with strings\n     */\n    'foo_bar-enum'?: 'Success' | 'Warning' | 'Error' | 'ØÆÅ字符串';\n    /**\n     * These are the HTTP error code enums\n     */\n    statusCode?: '100' | '200 FOO' | '300 FOO_BAR' | '400 foo-bar' | '500 foo.bar' | '600 foo&bar';\n    /**\n     * Simple boolean enum\n     */\n    bool?: true;\n};\n\n/**\n * This is a model with one enum with escaped name\n */\nexport type ModelWithEnumWithHyphen = {\n    /**\n     * Foo-Bar-Baz-Qux\n     */\n    'foo-bar-baz-qux'?: '3.0';\n};\n\n/**\n * This is a model with one enum\n */\nexport type ModelWithEnumFromDescription = {\n    /**\n     * Success=1,Warning=2,Error=3\n     */\n    test?: number;\n};\n\n/**\n * This is a model with nested enums\n */\nexport type ModelWithNestedEnums = {\n    dictionaryWithEnum?: {\n        [key: string]: 'Success' | 'Warning' | 'Error';\n    };\n    dictionaryWithEnumFromDescription?: {\n        [key: string]: number;\n    };\n    arrayWithEnum?: Array<'Success' | 'Warning' | 'Error'>;\n    arrayWithDescription?: Array<number>;\n    /**\n     * This is a simple enum with strings\n     */\n    'foo_bar-enum'?: 'Success' | 'Warning' | 'Error' | 'ØÆÅ字符串';\n};\n\n/**\n * This is a model with one property containing a reference\n */\nexport type ModelWithReference = {\n    prop?: ModelWithProperties;\n};\n\n/**\n * This is a model with one property containing an array\n */\nexport type ModelWithArrayReadOnlyAndWriteOnly = {\n    prop?: Array<ModelWithReadOnlyAndWriteOnly>;\n    propWithFile?: Array<Blob | File>;\n    propWithNumber?: Array<number>;\n};\n\n/**\n * This is a model with one property containing an array\n */\nexport type ModelWithArray = {\n    prop?: Array<ModelWithString>;\n    propWithFile?: Array<Blob | File>;\n    propWithNumber?: Array<number>;\n};\n\n/**\n * This is a model with one property containing a dictionary\n */\nexport type ModelWithDictionary = {\n    prop?: {\n        [key: string]: string;\n    };\n};\n\n/**\n * This is a deprecated model with a deprecated property\n *\n * @deprecated\n */\nexport type DeprecatedModel = {\n    /**\n     * This is a deprecated property\n     *\n     * @deprecated\n     */\n    prop?: string;\n};\n\n/**\n * This is a model with one property containing a circular reference\n */\nexport type ModelWithCircularReference = {\n    prop?: ModelWithCircularReference;\n};\n\n/**\n * This is a model with one property with a 'one of' relationship\n */\nexport type CompositionWithOneOf = {\n    propA?: ModelWithString | ModelWithEnum | ModelWithArray | ModelWithDictionary;\n};\n\n/**\n * This is a model with one property with a 'one of' relationship where the options are not $ref\n */\nexport type CompositionWithOneOfAnonymous = {\n    propA?: {\n        propA?: string;\n    } | string | number;\n};\n\n/**\n * Circle\n */\nexport type ModelCircle = {\n    kind: string;\n    radius?: number;\n};\n\n/**\n * Square\n */\nexport type ModelSquare = {\n    kind: string;\n    sideLength?: number;\n};\n\n/**\n * This is a model with one property with a 'one of' relationship where the options are not $ref\n */\nexport type CompositionWithOneOfDiscriminator = ({\n    kind: 'circle';\n} & ModelCircle) | ({\n    kind: 'square';\n} & ModelSquare);\n\n/**\n * This is a model with one property with a 'any of' relationship\n */\nexport type CompositionWithAnyOf = {\n    propA?: ModelWithString | ModelWithEnum | ModelWithArray | ModelWithDictionary;\n};\n\n/**\n * This is a model with one property with a 'any of' relationship where the options are not $ref\n */\nexport type CompositionWithAnyOfAnonymous = {\n    propA?: {\n        propA?: string;\n    } | string | number;\n};\n\n/**\n * This is a model with nested 'any of' property with a type null\n */\nexport type CompositionWithNestedAnyAndTypeNull = {\n    propA?: Array<ModelWithDictionary | null> | Array<ModelWithArray | null>;\n};\n\nexport type _3eNum1Период = 'Bird' | 'Dog';\n\nexport type ConstValue = 'ConstValue';\n\n/**\n * This is a model with one property with a 'any of' relationship where the options are not $ref\n */\nexport type CompositionWithNestedAnyOfAndNull = {\n    /**\n     * Scopes\n     */\n    propA?: Array<_3eNum1Период | ConstValue> | null;\n};\n\n/**\n * This is a model with one property with a 'one of' relationship\n */\nexport type CompositionWithOneOfAndNullable = {\n    propA?: {\n        boolean?: boolean;\n    } | ModelWithEnum | ModelWithArray | ModelWithDictionary | null;\n};\n\n/**\n * This is a model that contains a simple dictionary within composition\n */\nexport type CompositionWithOneOfAndSimpleDictionary = {\n    propA?: boolean | {\n        [key: string]: number;\n    };\n};\n\n/**\n * This is a model that contains a dictionary of simple arrays within composition\n */\nexport type CompositionWithOneOfAndSimpleArrayDictionary = {\n    propA?: boolean | {\n        [key: string]: Array<boolean>;\n    };\n};\n\n/**\n * This is a model that contains a dictionary of complex arrays (composited) within composition\n */\nexport type CompositionWithOneOfAndComplexArrayDictionary = {\n    propA?: boolean | {\n        [key: string]: Array<number | string>;\n    };\n};\n\n/**\n * This is a model with one property with a 'all of' relationship\n */\nexport type CompositionWithAllOfAndNullable = {\n    propA?: ({\n        boolean?: boolean;\n    } & ModelWithEnum & ModelWithArray & ModelWithDictionary) | null;\n};\n\n/**\n * This is a model with one property with a 'any of' relationship\n */\nexport type CompositionWithAnyOfAndNullable = {\n    propA?: {\n        boolean?: boolean;\n    } | ModelWithEnum | ModelWithArray | ModelWithDictionary | null;\n};\n\n/**\n * This is a base model with two simple optional properties\n */\nexport type CompositionBaseModel = {\n    firstName?: string;\n    lastname?: string;\n};\n\n/**\n * This is a model that extends the base model\n */\nexport type CompositionExtendedModel = CompositionBaseModel & {\n    age: number;\n    firstName: string;\n    lastname: string;\n};\n\n/**\n * This is a model with one nested property\n */\nexport type ModelWithProperties = {\n    required: string;\n    readonly requiredAndReadOnly: string;\n    requiredAndNullable: string | null;\n    string?: string;\n    number?: number;\n    boolean?: boolean;\n    reference?: ModelWithString;\n    'property with space'?: string;\n    default?: string;\n    try?: string;\n    readonly '@namespace.string'?: string;\n    readonly '@namespace.integer'?: number;\n};\n\n/**\n * This is a model with one nested property\n */\nexport type ModelWithNestedProperties = {\n    readonly first: {\n        readonly second: {\n            readonly third: string | null;\n        } | null;\n    } | null;\n};\n\n/**\n * This is a model with duplicated properties\n */\nexport type ModelWithDuplicateProperties = {\n    prop?: ModelWithString;\n};\n\n/**\n * This is a model with ordered properties\n */\nexport type ModelWithOrderedProperties = {\n    zebra?: string;\n    apple?: string;\n    hawaii?: string;\n};\n\n/**\n * This is a model with duplicated imports\n */\nexport type ModelWithDuplicateImports = {\n    propA?: ModelWithString;\n    propB?: ModelWithString;\n    propC?: ModelWithString;\n};\n\n/**\n * This is a model that extends another model\n */\nexport type ModelThatExtends = ModelWithString & {\n    propExtendsA?: string;\n    propExtendsB?: ModelWithString;\n};\n\n/**\n * This is a model that extends another model\n */\nexport type ModelThatExtendsExtends = ModelWithString & ModelThatExtends & {\n    propExtendsC?: string;\n    propExtendsD?: ModelWithString;\n};\n\n/**\n * This is a model that contains a some patterns\n */\nexport type ModelWithPattern = {\n    key: string;\n    name: string;\n    readonly enabled?: boolean;\n    readonly modified?: string;\n    id?: string;\n    text?: string;\n    patternWithSingleQuotes?: string;\n    patternWithNewline?: string;\n    patternWithBacktick?: string;\n    patternWithUnicode?: string;\n};\n\nexport type File = {\n    /**\n     * Id\n     */\n    readonly id?: string;\n    /**\n     * Updated at\n     */\n    readonly updated_at?: string;\n    /**\n     * Created at\n     */\n    readonly created_at?: string;\n    /**\n     * Mime\n     */\n    mime: string;\n    /**\n     * File\n     */\n    readonly file?: string;\n};\n\nexport type Default = {\n    name?: string;\n};\n\nexport type Pageable = {\n    page?: number;\n    size?: number;\n    sort?: Array<string>;\n};\n\n/**\n * This is a free-form object without additionalProperties.\n */\nexport type FreeFormObjectWithoutAdditionalProperties = {\n    [key: string]: unknown;\n};\n\n/**\n * This is a free-form object with additionalProperties: true.\n */\nexport type FreeFormObjectWithAdditionalPropertiesEqTrue = {\n    [key: string]: unknown;\n};\n\n/**\n * This is a free-form object with additionalProperties: {}.\n */\nexport type FreeFormObjectWithAdditionalPropertiesEqEmptyObject = {\n    [key: string]: unknown;\n};\n\nexport type ModelWithConst = {\n    String?: 'String';\n    number?: 0;\n    null?: null;\n    withType?: 'Some string';\n};\n\n/**\n * This is a model with one property and additionalProperties: true\n */\nexport type ModelWithAdditionalPropertiesEqTrue = {\n    /**\n     * This is a simple string property\n     */\n    prop?: string;\n    [key: string]: unknown;\n};\n\nexport type NestedAnyOfArraysNullable = {\n    nullableArray?: Array<string | boolean> | null;\n};\n\nexport type CompositionWithOneOfAndProperties = ({\n    foo: SimpleParameter;\n} | {\n    bar: NonAsciiStringæøåÆøÅöôêÊ字符串;\n}) & {\n    baz: number | null;\n    qux: number;\n};\n\n/**\n * An object that can be null\n */\nexport type NullableObject = {\n    foo?: string;\n} | null;\n\n/**\n * Some % character\n */\nexport type CharactersInDescription = string;\n\nexport type ModelWithNullableObject = {\n    data?: NullableObject;\n};\n\n/**\n * An object with additional properties that can be null (anyOf ref + null)\n */\nexport type ModelWithAdditionalPropertiesRef = {\n    [key: string]: NullableObject | null;\n};\n\nexport type ModelWithOneOfEnum = {\n    foo: 'Bar';\n} | {\n    foo: 'Baz';\n} | {\n    foo: 'Qux';\n} | {\n    content: string;\n    foo: 'Quux';\n} | {\n    content: [\n        string,\n        string\n    ];\n    foo: 'Corge';\n};\n\nexport type ModelWithNestedArrayEnumsDataFoo = 'foo' | 'bar';\n\nexport type ModelWithNestedArrayEnumsDataBar = 'baz' | 'qux';\n\nexport type ModelWithNestedArrayEnumsData = {\n    foo?: Array<ModelWithNestedArrayEnumsDataFoo>;\n    bar?: Array<ModelWithNestedArrayEnumsDataBar>;\n};\n\nexport type ModelWithNestedArrayEnums = {\n    array_strings?: Array<string>;\n    data?: ModelWithNestedArrayEnumsData;\n};\n\nexport type ModelWithNestedCompositionEnums = {\n    foo?: ModelWithNestedArrayEnumsDataFoo;\n};\n\nexport type ModelWithReadOnlyAndWriteOnly = {\n    foo: string;\n    readonly bar: string;\n};\n\nexport type ModelWithConstantSizeArray = [\n    number,\n    number\n];\n\nexport type ModelWithAnyOfConstantSizeArray = [\n    number | string,\n    number | string,\n    number | string\n];\n\nexport type ModelWithPrefixItemsConstantSizeArray = [\n    ModelWithInteger,\n    number | string,\n    string\n];\n\nexport type ModelWithAnyOfConstantSizeArrayNullable = [\n    number | null | string,\n    number | null | string,\n    number | null | string\n];\n\nexport type ModelWithAnyOfConstantSizeArrayWithNSizeAndOptions = [\n    number | Import,\n    number | Import\n];\n\nexport type ModelWithAnyOfConstantSizeArrayAndIntersect = [\n    number & string,\n    number & string\n];\n\nexport type ModelWithNumericEnumUnion = {\n    /**\n     * Период\n     */\n    value?: -10 | -1 | 0 | 1 | 3 | 6 | 12;\n};\n\n/**\n * Some description with `back ticks`\n */\nexport type ModelWithBackticksInDescription = {\n    /**\n     * The template `that` should be used for parsing and importing the contents of the CSV file.\n     *\n     * <br/><p>There is one placeholder currently supported:<ul>     <li><b>${x}</b> - refers to the n-th column in the CSV file, e.g. ${1}, ${2}, ...)</li></ul><p>Example of a correct JSON template:</p>\n     * <pre>\n     * [\n     * {\n     * \"resourceType\": \"Asset\",\n     * \"identifier\": {\n     * \"name\": \"${1}\",\n     * \"domain\": {\n     * \"name\": \"${2}\",\n     * \"community\": {\n     * \"name\": \"Some Community\"\n     * }\n     * }\n     * },\n     * \"attributes\" : {\n     * \"00000000-0000-0000-0000-000000003115\" : [ {\n     * \"value\" : \"${3}\"\n     * } ],\n     * \"00000000-0000-0000-0000-000000000222\" : [ {\n     * \"value\" : \"${4}\"\n     * } ]\n     * }\n     * }\n     * ]\n     * </pre>\n     */\n    template?: string;\n};\n\nexport type ModelWithOneOfAndProperties = (SimpleParameter | NonAsciiStringæøåÆøÅöôêÊ字符串) & {\n    baz: number | null;\n    qux: number;\n};\n\n/**\n * Model used to test deduplication strategy (unused)\n */\nexport type ParameterSimpleParameterUnused = string;\n\n/**\n * Model used to test deduplication strategy\n */\nexport type PostServiceWithEmptyTagResponse = string;\n\n/**\n * Model used to test deduplication strategy\n */\nexport type PostServiceWithEmptyTagResponse2 = string;\n\n/**\n * Model used to test deduplication strategy\n */\nexport type DeleteFooData = string;\n\n/**\n * Model used to test deduplication strategy\n */\nexport type DeleteFooData2 = string;\n\n/**\n * Model with restricted keyword name\n */\nexport type Import = string;\n\nexport type SchemaWithFormRestrictedKeys = {\n    description?: string;\n    'x-enum-descriptions'?: string;\n    'x-enum-varnames'?: string;\n    'x-enumNames'?: string;\n    title?: string;\n    object?: {\n        description?: string;\n        'x-enum-descriptions'?: string;\n        'x-enum-varnames'?: string;\n        'x-enumNames'?: string;\n        title?: string;\n    };\n    array?: Array<{\n        description?: string;\n        'x-enum-descriptions'?: string;\n        'x-enum-varnames'?: string;\n        'x-enumNames'?: string;\n        title?: string;\n    }>;\n};\n\n/**\n * This schema was giving PascalCase transformations a hard time\n */\nexport type IoK8sApimachineryPkgApisMetaV1DeleteOptions = {\n    /**\n     * Must be fulfilled before a deletion is carried out. If not possible, a 409 Conflict status will be returned.\n     */\n    preconditions?: IoK8sApimachineryPkgApisMetaV1Preconditions;\n};\n\n/**\n * This schema was giving PascalCase transformations a hard time\n */\nexport type IoK8sApimachineryPkgApisMetaV1Preconditions = {\n    /**\n     * Specifies the target ResourceVersion\n     */\n    resourceVersion?: string;\n    /**\n     * Specifies the target UID.\n     */\n    uid?: string;\n};\n\nexport type AdditionalPropertiesUnknownIssue = {\n    [key: string]: string | number;\n};\n\nexport type AdditionalPropertiesUnknownIssue2 = {\n    [key: string]: string | number;\n};\n\nexport type AdditionalPropertiesUnknownIssue3 = string & {\n    entries: {\n        [key: string]: AdditionalPropertiesUnknownIssue;\n    };\n};\n\nexport type AdditionalPropertiesIntegerIssue = {\n    value: number;\n    [key: string]: number;\n};\n\nexport type OneOfAllOfIssue = ((ConstValue | GenericSchemaDuplicateIssue1SystemBoolean) & _3eNum1Период) | GenericSchemaDuplicateIssue1SystemString;\n\nexport type GenericSchemaDuplicateIssue1SystemBoolean = {\n    item?: boolean;\n    error?: string | null;\n    readonly hasError?: boolean;\n    data?: {\n        [key: string]: never;\n    };\n};\n\nexport type GenericSchemaDuplicateIssue1SystemString = {\n    item?: string | null;\n    error?: string | null;\n    readonly hasError?: boolean;\n};\n\nexport type ExternalSharedModel = {\n    id: string;\n    name?: string;\n};\n\n/**\n * This is a model with one property containing a reference\n */\nexport type ModelWithReferenceWritable = {\n    prop?: ModelWithPropertiesWritable;\n};\n\n/**\n * This is a model with one property containing an array\n */\nexport type ModelWithArrayReadOnlyAndWriteOnlyWritable = {\n    prop?: Array<ModelWithReadOnlyAndWriteOnlyWritable>;\n    propWithFile?: Array<Blob | File>;\n    propWithNumber?: Array<number>;\n};\n\n/**\n * This is a model with one nested property\n */\nexport type ModelWithPropertiesWritable = {\n    required: string;\n    requiredAndNullable: string | null;\n    string?: string;\n    number?: number;\n    boolean?: boolean;\n    reference?: ModelWithString;\n    'property with space'?: string;\n    default?: string;\n    try?: string;\n};\n\n/**\n * This is a model that contains a some patterns\n */\nexport type ModelWithPatternWritable = {\n    key: string;\n    name: string;\n    id?: string;\n    text?: string;\n    patternWithSingleQuotes?: string;\n    patternWithNewline?: string;\n    patternWithBacktick?: string;\n    patternWithUnicode?: string;\n};\n\nexport type FileWritable = {\n    /**\n     * Mime\n     */\n    mime: string;\n};\n\nexport type ModelWithReadOnlyAndWriteOnlyWritable = {\n    foo: string;\n    baz: string;\n};\n\nexport type ModelWithAnyOfConstantSizeArrayWithNSizeAndOptionsWritable = [\n    number | Import,\n    number | Import\n];\n\nexport type AdditionalPropertiesUnknownIssueWritable = {\n    [key: string]: string | number;\n};\n\nexport type OneOfAllOfIssueWritable = ((ConstValue | GenericSchemaDuplicateIssue1SystemBoolean) & _3eNum1Период) | GenericSchemaDuplicateIssue1SystemString;\n\nexport type GenericSchemaDuplicateIssue1SystemBooleanWritable = {\n    item?: boolean;\n    error?: string | null;\n    data?: {\n        [key: string]: never;\n    };\n};\n\nexport type GenericSchemaDuplicateIssue1SystemStringWritable = {\n    item?: string | null;\n    error?: string | null;\n};\n\n/**\n * This is a reusable parameter\n */\nexport type SimpleParameter = string;\n\n/**\n * Parameter with illegal characters\n */\nexport type XFooBar = ModelWithString;\n\n/**\n * A reusable request body\n */\nexport type SimpleRequestBody = ModelWithString;\n\n/**\n * A reusable request body\n */\nexport type SimpleFormData = ModelWithString;\n\nexport type ExportData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no+tag';\n};\n\nexport type PatchApiVbyApiVersionNoTagData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no+tag';\n};\n\nexport type PatchApiVbyApiVersionNoTagResponses = {\n    /**\n     * OK\n     */\n    default: unknown;\n};\n\nexport type ImportData = {\n    body: ModelWithReadOnlyAndWriteOnlyWritable | ModelWithArrayReadOnlyAndWriteOnlyWritable;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no+tag';\n};\n\nexport type ImportResponses = {\n    /**\n     * Success\n     */\n    200: ModelFromZendesk;\n    /**\n     * Default success response\n     */\n    default: ModelWithReadOnlyAndWriteOnly;\n};\n\nexport type ImportResponse = ImportResponses[keyof ImportResponses];\n\nexport type FooWowData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no+tag';\n};\n\nexport type FooWowResponses = {\n    /**\n     * OK\n     */\n    default: unknown;\n};\n\nexport type ApiVVersionODataControllerCountData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple/$count';\n};\n\nexport type ApiVVersionODataControllerCountResponses = {\n    /**\n     * Success\n     */\n    200: ModelFromZendesk;\n};\n\nexport type ApiVVersionODataControllerCountResponse = ApiVVersionODataControllerCountResponses[keyof ApiVVersionODataControllerCountResponses];\n\nexport type GetApiVbyApiVersionSimpleOperationData = {\n    body?: never;\n    path: {\n        /**\n         * foo in method\n         */\n        foo_param: string;\n    };\n    query?: never;\n    url: '/api/v{api-version}/simple:operation';\n};\n\nexport type GetApiVbyApiVersionSimpleOperationErrors = {\n    /**\n     * Default error response\n     */\n    default: ModelWithBoolean;\n};\n\nexport type GetApiVbyApiVersionSimpleOperationError = GetApiVbyApiVersionSimpleOperationErrors[keyof GetApiVbyApiVersionSimpleOperationErrors];\n\nexport type GetApiVbyApiVersionSimpleOperationResponses = {\n    /**\n     * Response is a simple number\n     */\n    200: number;\n};\n\nexport type GetApiVbyApiVersionSimpleOperationResponse = GetApiVbyApiVersionSimpleOperationResponses[keyof GetApiVbyApiVersionSimpleOperationResponses];\n\nexport type DeleteCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type GetCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type HeadCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type OptionsCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type PatchCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type PostCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type PutCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type DeleteFooData3 = {\n    body?: never;\n    headers: {\n        /**\n         * Parameter with illegal characters\n         */\n        'x-Foo-Bar': ModelWithString;\n    };\n    path: {\n        /**\n         * foo in method\n         */\n        foo_param: string;\n        /**\n         * bar in method\n         */\n        BarParam: string;\n    };\n    query?: never;\n    url: '/api/v{api-version}/foo/{foo_param}/bar/{BarParam}';\n};\n\nexport type CallWithDescriptionsData = {\n    body?: never;\n    path?: never;\n    query?: {\n        /**\n         * Testing multiline comments in string: First line\n         * Second line\n         *\n         * Fourth line\n         */\n        parameterWithBreaks?: string;\n        /**\n         * Testing backticks in string: `backticks` and ```multiple backticks``` should work\n         */\n        parameterWithBackticks?: string;\n        /**\n         * Testing slashes in string: \\backwards\\\\\\ and /forwards/// should work\n         */\n        parameterWithSlashes?: string;\n        /**\n         * Testing expression placeholders in string: ${expression} should work\n         */\n        parameterWithExpressionPlaceholders?: string;\n        /**\n         * Testing quotes in string: 'single quote''' and \"double quotes\"\"\" should work\n         */\n        parameterWithQuotes?: string;\n        /**\n         * Testing reserved characters in string: * inline * and ** inline ** should work\n         */\n        parameterWithReservedCharacters?: string;\n    };\n    url: '/api/v{api-version}/descriptions';\n};\n\nexport type DeprecatedCallData = {\n    body?: never;\n    headers: {\n        /**\n         * This parameter is deprecated\n         *\n         * @deprecated\n         */\n        parameter: DeprecatedModel | null;\n    };\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/parameters/deprecated';\n};\n\nexport type CallWithParametersData = {\n    /**\n     * This is the parameter that goes into the body\n     */\n    body: {\n        [key: string]: unknown;\n    } | null;\n    headers: {\n        /**\n         * This is the parameter that goes into the header\n         */\n        parameterHeader: string | null;\n    };\n    path: {\n        /**\n         * This is the parameter that goes into the path\n         */\n        parameterPath: string | null;\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string | null;\n    };\n    query: {\n        foo_ref_enum?: ModelWithNestedArrayEnumsDataFoo;\n        foo_all_of_enum: ModelWithNestedArrayEnumsDataFoo;\n        /**\n         * This is the parameter that goes into the query params\n         */\n        cursor: string | null;\n    };\n    url: '/api/v{api-version}/parameters/{parameterPath}';\n};\n\nexport type CallWithWeirdParameterNamesData = {\n    /**\n     * This is the parameter that goes into the body\n     */\n    body: ModelWithString | null;\n    headers: {\n        /**\n         * This is the parameter that goes into the request header\n         */\n        'parameter.header': string | null;\n    };\n    path: {\n        /**\n         * This is the parameter that goes into the path\n         */\n        'parameter.path.1'?: string;\n        /**\n         * This is the parameter that goes into the path\n         */\n        'parameter-path-2'?: string;\n        /**\n         * This is the parameter that goes into the path\n         */\n        'PARAMETER-PATH-3'?: string;\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string | null;\n    };\n    query: {\n        /**\n         * This is the parameter with a reserved keyword\n         */\n        default?: string;\n        /**\n         * This is the parameter that goes into the request query params\n         */\n        'parameter-query': string | null;\n    };\n    url: '/api/v{api-version}/parameters/{parameter.path.1}/{parameter-path-2}/{PARAMETER-PATH-3}';\n};\n\nexport type GetCallWithOptionalParamData = {\n    /**\n     * This is a required parameter\n     */\n    body: ModelWithOneOfEnum;\n    path?: never;\n    query?: {\n        /**\n         * This is an optional parameter\n         */\n        page?: number;\n    };\n    url: '/api/v{api-version}/parameters';\n};\n\nexport type PostCallWithOptionalParamData = {\n    /**\n     * This is an optional parameter\n     */\n    body?: {\n        offset?: number | null;\n    };\n    path?: never;\n    query: {\n        /**\n         * This is a required parameter\n         */\n        parameter: Pageable;\n    };\n    url: '/api/v{api-version}/parameters';\n};\n\nexport type PostCallWithOptionalParamResponses = {\n    /**\n     * Response is a simple number\n     */\n    200: number;\n    /**\n     * Success\n     */\n    204: void;\n};\n\nexport type PostCallWithOptionalParamResponse = PostCallWithOptionalParamResponses[keyof PostCallWithOptionalParamResponses];\n\nexport type PostApiVbyApiVersionRequestBodyData = {\n    /**\n     * A reusable request body\n     */\n    body?: SimpleRequestBody;\n    path?: never;\n    query?: {\n        /**\n         * This is a reusable parameter\n         */\n        parameter?: string;\n    };\n    url: '/api/v{api-version}/requestBody';\n};\n\nexport type PostApiVbyApiVersionFormDataData = {\n    /**\n     * A reusable request body\n     */\n    body?: SimpleFormData;\n    path?: never;\n    query?: {\n        /**\n         * This is a reusable parameter\n         */\n        parameter?: string;\n    };\n    url: '/api/v{api-version}/formData';\n};\n\nexport type CallWithDefaultParametersData = {\n    body?: never;\n    path?: never;\n    query?: {\n        /**\n         * This is a simple string with default value\n         */\n        parameterString?: string | null;\n        /**\n         * This is a simple number with default value\n         */\n        parameterNumber?: number | null;\n        /**\n         * This is a simple boolean with default value\n         */\n        parameterBoolean?: boolean | null;\n        /**\n         * This is a simple enum with default value\n         */\n        parameterEnum?: 'Success' | 'Warning' | 'Error';\n        /**\n         * This is a simple model with default value\n         */\n        parameterModel?: ModelWithString | null;\n    };\n    url: '/api/v{api-version}/defaults';\n};\n\nexport type CallWithDefaultOptionalParametersData = {\n    body?: never;\n    path?: never;\n    query?: {\n        /**\n         * This is a simple string that is optional with default value\n         */\n        parameterString?: string;\n        /**\n         * This is a simple number that is optional with default value\n         */\n        parameterNumber?: number;\n        /**\n         * This is a simple boolean that is optional with default value\n         */\n        parameterBoolean?: boolean;\n        /**\n         * This is a simple enum that is optional with default value\n         */\n        parameterEnum?: 'Success' | 'Warning' | 'Error';\n        /**\n         * This is a simple model that is optional with default value\n         */\n        parameterModel?: ModelWithString;\n    };\n    url: '/api/v{api-version}/defaults';\n};\n\nexport type CallToTestOrderOfParamsData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * This is a optional string with default\n         */\n        parameterOptionalStringWithDefault?: string;\n        /**\n         * This is a optional string with empty default\n         */\n        parameterOptionalStringWithEmptyDefault?: string;\n        /**\n         * This is a optional string with no default\n         */\n        parameterOptionalStringWithNoDefault?: string;\n        /**\n         * This is a string with default\n         */\n        parameterStringWithDefault: string;\n        /**\n         * This is a string with empty default\n         */\n        parameterStringWithEmptyDefault: string;\n        /**\n         * This is a string with no default\n         */\n        parameterStringWithNoDefault: string;\n        /**\n         * This is a string that can be null with no default\n         */\n        parameterStringNullableWithNoDefault?: string | null;\n        /**\n         * This is a string that can be null with default\n         */\n        parameterStringNullableWithDefault?: string | null;\n    };\n    url: '/api/v{api-version}/defaults';\n};\n\nexport type DuplicateNameData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/duplicate';\n};\n\nexport type DuplicateName2Data = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/duplicate';\n};\n\nexport type DuplicateName3Data = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/duplicate';\n};\n\nexport type DuplicateName4Data = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/duplicate';\n};\n\nexport type CallWithNoContentResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no-content';\n};\n\nexport type CallWithNoContentResponseResponses = {\n    /**\n     * Success\n     */\n    204: void;\n};\n\nexport type CallWithNoContentResponseResponse = CallWithNoContentResponseResponses[keyof CallWithNoContentResponseResponses];\n\nexport type CallWithResponseAndNoContentResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multiple-tags/response-and-no-content';\n};\n\nexport type CallWithResponseAndNoContentResponseResponses = {\n    /**\n     * Response is a simple number\n     */\n    200: number;\n    /**\n     * Success\n     */\n    204: void;\n};\n\nexport type CallWithResponseAndNoContentResponseResponse = CallWithResponseAndNoContentResponseResponses[keyof CallWithResponseAndNoContentResponseResponses];\n\nexport type DummyAData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multiple-tags/a';\n};\n\nexport type DummyAResponses = {\n    200: _400;\n};\n\nexport type DummyAResponse = DummyAResponses[keyof DummyAResponses];\n\nexport type DummyBData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multiple-tags/b';\n};\n\nexport type DummyBResponses = {\n    /**\n     * Success\n     */\n    204: void;\n};\n\nexport type DummyBResponse = DummyBResponses[keyof DummyBResponses];\n\nexport type CallWithResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/response';\n};\n\nexport type CallWithResponseResponses = {\n    default: Import;\n};\n\nexport type CallWithResponseResponse = CallWithResponseResponses[keyof CallWithResponseResponses];\n\nexport type CallWithDuplicateResponsesData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/response';\n};\n\nexport type CallWithDuplicateResponsesErrors = {\n    /**\n     * Message for 500 error\n     */\n    500: ModelWithStringError;\n    /**\n     * Message for 501 error\n     */\n    501: ModelWithStringError;\n    /**\n     * Message for 502 error\n     */\n    502: ModelWithStringError;\n    /**\n     * Message for 4XX errors\n     */\n    '4XX': DictionaryWithArray;\n    /**\n     * Default error response\n     */\n    default: ModelWithBoolean;\n};\n\nexport type CallWithDuplicateResponsesError = CallWithDuplicateResponsesErrors[keyof CallWithDuplicateResponsesErrors];\n\nexport type CallWithDuplicateResponsesResponses = {\n    /**\n     * Message for 200 response\n     */\n    200: ModelWithBoolean & ModelWithInteger;\n    /**\n     * Message for 201 response\n     */\n    201: ModelWithString;\n    /**\n     * Message for 202 response\n     */\n    202: ModelWithString;\n};\n\nexport type CallWithDuplicateResponsesResponse = CallWithDuplicateResponsesResponses[keyof CallWithDuplicateResponsesResponses];\n\nexport type CallWithResponsesData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/response';\n};\n\nexport type CallWithResponsesErrors = {\n    /**\n     * Message for 500 error\n     */\n    500: ModelWithStringError;\n    /**\n     * Message for 501 error\n     */\n    501: ModelWithStringError;\n    /**\n     * Message for 502 error\n     */\n    502: ModelWithStringError;\n    /**\n     * Message for default response\n     */\n    default: ModelWithStringError;\n};\n\nexport type CallWithResponsesError = CallWithResponsesErrors[keyof CallWithResponsesErrors];\n\nexport type CallWithResponsesResponses = {\n    /**\n     * Message for 200 response\n     */\n    200: {\n        readonly '@namespace.string'?: string;\n        readonly '@namespace.integer'?: number;\n        readonly value?: Array<ModelWithString>;\n    };\n    /**\n     * Message for 201 response\n     */\n    201: ModelThatExtends;\n    /**\n     * Message for 202 response\n     */\n    202: ModelThatExtendsExtends;\n};\n\nexport type CallWithResponsesResponse = CallWithResponsesResponses[keyof CallWithResponsesResponses];\n\nexport type CollectionFormatData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * This is an array parameter that is sent as csv format (comma-separated values)\n         */\n        parameterArrayCSV: Array<string> | null;\n        /**\n         * This is an array parameter that is sent as ssv format (space-separated values)\n         */\n        parameterArraySSV: Array<string> | null;\n        /**\n         * This is an array parameter that is sent as tsv format (tab-separated values)\n         */\n        parameterArrayTSV: Array<string> | null;\n        /**\n         * This is an array parameter that is sent as pipes format (pipe-separated values)\n         */\n        parameterArrayPipes: Array<string> | null;\n        /**\n         * This is an array parameter that is sent as multi format (multiple parameter instances)\n         */\n        parameterArrayMulti: Array<string> | null;\n    };\n    url: '/api/v{api-version}/collectionFormat';\n};\n\nexport type TypesData = {\n    body?: never;\n    path?: {\n        /**\n         * This is a number parameter\n         */\n        id?: number;\n    };\n    query: {\n        /**\n         * This is a number parameter\n         */\n        parameterNumber: number;\n        /**\n         * This is a string parameter\n         */\n        parameterString: string | null;\n        /**\n         * This is a boolean parameter\n         */\n        parameterBoolean: boolean | null;\n        /**\n         * This is an object parameter\n         */\n        parameterObject: {\n            [key: string]: unknown;\n        } | null;\n        /**\n         * This is an array parameter\n         */\n        parameterArray: Array<string> | null;\n        /**\n         * This is a dictionary parameter\n         */\n        parameterDictionary: {\n            [key: string]: unknown;\n        } | null;\n        /**\n         * This is an enum parameter\n         */\n        parameterEnum: 'Success' | 'Warning' | 'Error' | null;\n    };\n    url: '/api/v{api-version}/types';\n};\n\nexport type TypesResponses = {\n    /**\n     * Response is a simple number\n     */\n    200: number;\n    /**\n     * Response is a simple string\n     */\n    201: string;\n    /**\n     * Response is a simple boolean\n     */\n    202: boolean;\n    /**\n     * Response is a simple object\n     */\n    203: {\n        [key: string]: unknown;\n    };\n};\n\nexport type TypesResponse = TypesResponses[keyof TypesResponses];\n\nexport type UploadFileData = {\n    body: Blob | File;\n    path: {\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string | null;\n    };\n    query?: never;\n    url: '/api/v{api-version}/upload';\n};\n\nexport type UploadFileResponses = {\n    200: boolean;\n};\n\nexport type UploadFileResponse = UploadFileResponses[keyof UploadFileResponses];\n\nexport type FileResponseData = {\n    body?: never;\n    path: {\n        id: string;\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string;\n    };\n    query?: never;\n    url: '/api/v{api-version}/file/{id}';\n};\n\nexport type FileResponseResponses = {\n    /**\n     * Success\n     */\n    200: Blob | File;\n};\n\nexport type FileResponseResponse = FileResponseResponses[keyof FileResponseResponses];\n\nexport type ComplexTypesData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * Parameter containing object\n         */\n        parameterObject: {\n            first?: {\n                second?: {\n                    third?: string;\n                };\n            };\n        };\n        /**\n         * Parameter containing reference\n         */\n        parameterReference: ModelWithString;\n    };\n    url: '/api/v{api-version}/complex';\n};\n\nexport type ComplexTypesErrors = {\n    /**\n     * 400 `server` error\n     */\n    400: unknown;\n    /**\n     * 500 server error\n     */\n    500: unknown;\n};\n\nexport type ComplexTypesResponses = {\n    /**\n     * Successful response\n     */\n    200: Array<ModelWithString>;\n};\n\nexport type ComplexTypesResponse = ComplexTypesResponses[keyof ComplexTypesResponses];\n\nexport type MultipartResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multipart';\n};\n\nexport type MultipartResponseResponses = {\n    /**\n     * OK\n     */\n    200: {\n        file?: Blob | File;\n        metadata?: {\n            foo?: string;\n            bar?: string;\n        };\n    };\n};\n\nexport type MultipartResponseResponse = MultipartResponseResponses[keyof MultipartResponseResponses];\n\nexport type MultipartRequestData = {\n    body?: {\n        content?: Blob | File;\n        data?: ModelWithString | null;\n    };\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multipart';\n};\n\nexport type ComplexParamsData = {\n    body?: {\n        readonly key: string | null;\n        name: string | null;\n        enabled?: boolean;\n        type: 'Monkey' | 'Horse' | 'Bird';\n        listOfModels?: Array<ModelWithString> | null;\n        listOfStrings?: Array<string> | null;\n        parameters: ModelWithString | ModelWithEnum | ModelWithArray | ModelWithDictionary;\n        readonly user?: {\n            readonly id?: number;\n            readonly name?: string | null;\n        };\n    };\n    path: {\n        id: number;\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string;\n    };\n    query?: never;\n    url: '/api/v{api-version}/complex/{id}';\n};\n\nexport type ComplexParamsResponses = {\n    /**\n     * Success\n     */\n    200: ModelWithString;\n};\n\nexport type ComplexParamsResponse = ComplexParamsResponses[keyof ComplexParamsResponses];\n\nexport type CallWithResultFromHeaderData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/header';\n};\n\nexport type CallWithResultFromHeaderErrors = {\n    /**\n     * 400 server error\n     */\n    400: unknown;\n    /**\n     * 500 server error\n     */\n    500: unknown;\n};\n\nexport type CallWithResultFromHeaderResponses = {\n    /**\n     * Successful response\n     */\n    200: unknown;\n};\n\nexport type TestErrorCodeData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * Status code to return\n         */\n        status: number;\n    };\n    url: '/api/v{api-version}/error';\n};\n\nexport type TestErrorCodeErrors = {\n    /**\n     * Custom message: Internal Server Error\n     */\n    500: unknown;\n    /**\n     * Custom message: Not Implemented\n     */\n    501: unknown;\n    /**\n     * Custom message: Bad Gateway\n     */\n    502: unknown;\n    /**\n     * Custom message: Service Unavailable\n     */\n    503: unknown;\n};\n\nexport type TestErrorCodeResponses = {\n    /**\n     * Custom message: Successful response\n     */\n    200: unknown;\n};\n\nexport type NonAsciiæøåÆøÅöôêÊ字符串Data = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * Dummy input param\n         */\n        nonAsciiParamæøåÆØÅöôêÊ: number;\n    };\n    url: '/api/v{api-version}/non-ascii-æøåÆØÅöôêÊ字符串';\n};\n\nexport type NonAsciiæøåÆøÅöôêÊ字符串Responses = {\n    /**\n     * Successful response\n     */\n    200: Array<NonAsciiStringæøåÆøÅöôêÊ字符串>;\n};\n\nexport type NonAsciiæøåÆøÅöôêÊ字符串Response = NonAsciiæøåÆøÅöôêÊ字符串Responses[keyof NonAsciiæøåÆøÅöôêÊ字符串Responses];\n\nexport type PutWithFormUrlEncodedData = {\n    body: ArrayWithStrings;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/non-ascii-æøåÆØÅöôêÊ字符串';\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/preact-query/name-builder/@tanstack/preact-query.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport { type DefaultError, queryOptions, type UseMutationOptions } from '@tanstack/preact-query';\n\nimport { client } from '../client.gen';\nimport { fooBarPost, fooBarPut, fooPost, fooPut, getFoo, getFooBar, type Options } from '../sdk.gen';\nimport type { FooBarPostData, FooBarPostResponse, FooBarPutData, FooBarPutResponse, FooPostData, FooPostResponse, FooPutData, FooPutResponse, GetFooBarData, GetFooBarResponse, GetFooData, GetFooResponse } from '../types.gen';\n\nexport type QueryKey<TOptions extends Options> = [\n    Pick<TOptions, 'baseUrl' | 'body' | 'headers' | 'path' | 'query'> & {\n        _id: string;\n        _infinite?: boolean;\n        tags?: ReadonlyArray<string>;\n    }\n];\n\nconst createQueryKey = <TOptions extends Options>(id: string, options?: TOptions, infinite?: boolean, tags?: ReadonlyArray<string>): [\n    QueryKey<TOptions>[0]\n] => {\n    const params: QueryKey<TOptions>[0] = { _id: id, baseUrl: options?.baseUrl || (options?.client ?? client).getConfig().baseUrl } as QueryKey<TOptions>[0];\n    if (infinite) {\n        params._infinite = infinite;\n    }\n    if (tags) {\n        params.tags = tags;\n    }\n    if (options?.body) {\n        params.body = options.body;\n    }\n    if (options?.headers) {\n        params.headers = options.headers;\n    }\n    if (options?.path) {\n        params.path = options.path;\n    }\n    if (options?.query) {\n        params.query = options.query;\n    }\n    return [params];\n};\n\nexport const getFooD = (options?: Options<GetFooData>) => createQueryKey('getFoo', options);\n\nexport const getFooE = (options?: Options<GetFooData>) => queryOptions<GetFooResponse, DefaultError, GetFooResponse, ReturnType<typeof getFooD>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await getFoo({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: getFooD(options)\n});\n\nexport const fooPostC = (options?: Partial<Options<FooPostData>>): UseMutationOptions<FooPostResponse, DefaultError, Options<FooPostData>> => {\n    const mutationOptions: UseMutationOptions<FooPostResponse, DefaultError, Options<FooPostData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await fooPost({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const fooPutC = (options?: Partial<Options<FooPutData>>): UseMutationOptions<FooPutResponse, DefaultError, Options<FooPutData>> => {\n    const mutationOptions: UseMutationOptions<FooPutResponse, DefaultError, Options<FooPutData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await fooPut({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const getFooBarD = (options?: Options<GetFooBarData>) => createQueryKey('getFooBar', options);\n\nexport const getFooBarE = (options?: Options<GetFooBarData>) => queryOptions<GetFooBarResponse, DefaultError, GetFooBarResponse, ReturnType<typeof getFooBarD>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await getFooBar({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: getFooBarD(options)\n});\n\nexport const fooBarPostC = (options?: Partial<Options<FooBarPostData>>): UseMutationOptions<FooBarPostResponse, DefaultError, Options<FooBarPostData>> => {\n    const mutationOptions: UseMutationOptions<FooBarPostResponse, DefaultError, Options<FooBarPostData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await fooBarPost({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const fooBarPutC = (options?: Partial<Options<FooBarPutData>>): UseMutationOptions<FooBarPutResponse, DefaultError, Options<FooBarPutData>> => {\n    const mutationOptions: UseMutationOptions<FooBarPutResponse, DefaultError, Options<FooBarPutData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await fooBarPut({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/preact-query/name-builder/client/client.gen.ts",
    "content": "// 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 (options: RequestOptions) => {\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 url = buildUrl(opts);\n\n    return { opts, url };\n  };\n\n  const request: Client['request'] = async (options) => {\n    // @ts-expect-error\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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/preact-query/name-builder/client/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type { Auth } from '../core/auth.gen';\nexport type { QuerySerializerOptions } from '../core/bodySerializer.gen';\nexport {\n  formDataBodySerializer,\n  jsonBodySerializer,\n  urlSearchParamsBodySerializer,\n} from '../core/bodySerializer.gen';\nexport { buildClientParams } from '../core/params.gen';\nexport { serializeQueryKeyValue } from '../core/queryKeySerializer.gen';\nexport { createClient } from './client.gen';\nexport type {\n  Client,\n  ClientOptions,\n  Config,\n  CreateClientConfig,\n  Options,\n  RequestOptions,\n  RequestResult,\n  ResolvedRequestOptions,\n  ResponseStyle,\n  TDataShape,\n} from './types.gen';\nexport { createConfig, mergeHeaders } from './utils.gen';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/preact-query/name-builder/client/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { Auth } from '../core/auth.gen';\nimport type {\n  ServerSentEventsOptions,\n  ServerSentEventsResult,\n} from '../core/serverSentEvents.gen';\nimport type { Client as CoreClient, Config as CoreConfig } from '../core/types.gen';\nimport type { Middleware } from './utils.gen';\n\nexport type ResponseStyle = 'data' | 'fields';\n\nexport interface Config<T extends ClientOptions = ClientOptions>\n  extends Omit<RequestInit, 'body' | 'headers' | 'method'>, CoreConfig {\n  /**\n   * Base URL for all requests made by this client.\n   */\n  baseUrl?: T['baseUrl'];\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   * Please don't use the Fetch client for Next.js applications. The `next`\n   * options won't have any effect.\n   *\n   * Install {@link https://www.npmjs.com/package/@hey-api/client-next `@hey-api/client-next`} instead.\n   */\n  next?: never;\n  /**\n   * Return the response data parsed in a specified format. By default, `auto`\n   * will infer the appropriate method from the `Content-Type` response header.\n   * You can override this behavior with any of the {@link Body} methods.\n   * Select `stream` if you don't want to parse response data at all.\n   *\n   * @default 'auto'\n   */\n  parseAs?: 'arrayBuffer' | 'auto' | 'blob' | 'formData' | 'json' | 'stream' | 'text';\n  /**\n   * Should we return only data or multiple fields (data, error, response, etc.)?\n   *\n   * @default 'fields'\n   */\n  responseStyle?: ResponseStyle;\n  /**\n   * Throw an error instead of returning it in the response?\n   *\n   * @default false\n   */\n  throwOnError?: T['throwOnError'];\n}\n\nexport interface RequestOptions<\n  TData = unknown,\n  TResponseStyle extends ResponseStyle = 'fields',\n  ThrowOnError extends boolean = boolean,\n  Url extends string = string,\n>\n  extends\n    Config<{\n      responseStyle: TResponseStyle;\n      throwOnError: ThrowOnError;\n    }>,\n    Pick<\n      ServerSentEventsOptions<TData>,\n      | 'onRequest'\n      | 'onSseError'\n      | 'onSseEvent'\n      | 'sseDefaultRetryDelay'\n      | 'sseMaxRetryAttempts'\n      | 'sseMaxRetryDelay'\n    > {\n  /**\n   * Any body that you want to add to your request.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/fetch#body}\n   */\n  body?: unknown;\n  path?: Record<string, unknown>;\n  query?: Record<string, unknown>;\n  /**\n   * Security mechanism(s) to use for the request.\n   */\n  security?: ReadonlyArray<Auth>;\n  url: Url;\n}\n\nexport interface ResolvedRequestOptions<\n  TResponseStyle extends ResponseStyle = 'fields',\n  ThrowOnError extends boolean = boolean,\n  Url extends string = string,\n> extends RequestOptions<unknown, TResponseStyle, ThrowOnError, Url> {\n  serializedBody?: string;\n}\n\nexport type RequestResult<\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = boolean,\n  TResponseStyle extends ResponseStyle = 'fields',\n> = ThrowOnError extends true\n  ? Promise<\n      TResponseStyle extends 'data'\n        ? TData extends Record<string, unknown>\n          ? TData[keyof TData]\n          : TData\n        : {\n            data: TData extends Record<string, unknown> ? TData[keyof TData] : TData;\n            request: Request;\n            response: Response;\n          }\n    >\n  : Promise<\n      TResponseStyle extends 'data'\n        ? (TData extends Record<string, unknown> ? TData[keyof TData] : TData) | undefined\n        : (\n            | {\n                data: TData extends Record<string, unknown> ? TData[keyof TData] : TData;\n                error: undefined;\n              }\n            | {\n                data: undefined;\n                error: TError extends Record<string, unknown> ? TError[keyof TError] : TError;\n              }\n          ) & {\n            request: Request;\n            response: Response;\n          }\n    >;\n\nexport interface ClientOptions {\n  baseUrl?: string;\n  responseStyle?: ResponseStyle;\n  throwOnError?: boolean;\n}\n\ntype MethodFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'>,\n) => RequestResult<TData, TError, ThrowOnError, TResponseStyle>;\n\ntype SseFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'>,\n) => Promise<ServerSentEventsResult<TData, TError>>;\n\ntype RequestFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'> &\n    Pick<Required<RequestOptions<TData, TResponseStyle, ThrowOnError>>, 'method'>,\n) => RequestResult<TData, TError, ThrowOnError, TResponseStyle>;\n\ntype BuildUrlFn = <\n  TData extends {\n    body?: unknown;\n    path?: Record<string, unknown>;\n    query?: Record<string, unknown>;\n    url: string;\n  },\n>(\n  options: TData & Options<TData>,\n) => string;\n\nexport type Client = CoreClient<RequestFn, Config, MethodFn, BuildUrlFn, SseFn> & {\n  interceptors: Middleware<Request, Response, unknown, ResolvedRequestOptions>;\n};\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 = ClientOptions> = (\n  override?: Config<ClientOptions & T>,\n) => Config<Required<ClientOptions> & T>;\n\nexport interface TDataShape {\n  body?: unknown;\n  headers?: unknown;\n  path?: unknown;\n  query?: unknown;\n  url: string;\n}\n\ntype OmitKeys<T, K> = Pick<T, Exclude<keyof T, K>>;\n\nexport type Options<\n  TData extends TDataShape = TDataShape,\n  ThrowOnError extends boolean = boolean,\n  TResponse = unknown,\n  TResponseStyle extends ResponseStyle = 'fields',\n> = OmitKeys<\n  RequestOptions<TResponse, TResponseStyle, ThrowOnError>,\n  'body' | 'path' | 'query' | 'url'\n> &\n  ([TData] extends [never] ? unknown : Omit<TData, 'url'>);\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/preact-query/name-builder/client/utils.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/preact-query/name-builder/client.gen.ts",
    "content": "// 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>());\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/preact-query/name-builder/core/auth.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/preact-query/name-builder/core/bodySerializer.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/preact-query/name-builder/core/params.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/preact-query/name-builder/core/pathSerializer.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/preact-query/name-builder/core/queryKeySerializer.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\n/**\n * JSON-friendly union that mirrors what Pinia Colada can hash.\n */\nexport type JsonValue =\n  | null\n  | string\n  | number\n  | boolean\n  | JsonValue[]\n  | { [key: string]: JsonValue };\n\n/**\n * Replacer that converts non-JSON values (bigint, Date, etc.) to safe substitutes.\n */\nexport const queryKeyJsonReplacer = (_key: string, value: unknown) => {\n  if (value === undefined || typeof value === 'function' || typeof value === 'symbol') {\n    return undefined;\n  }\n  if (typeof value === 'bigint') {\n    return value.toString();\n  }\n  if (value instanceof Date) {\n    return value.toISOString();\n  }\n  return value;\n};\n\n/**\n * Safely stringifies a value and parses it back into a JsonValue.\n */\nexport const stringifyToJsonValue = (input: unknown): JsonValue | undefined => {\n  try {\n    const json = JSON.stringify(input, queryKeyJsonReplacer);\n    if (json === undefined) {\n      return undefined;\n    }\n    return JSON.parse(json) as JsonValue;\n  } catch {\n    return undefined;\n  }\n};\n\n/**\n * Detects plain objects (including objects with a null prototype).\n */\nconst isPlainObject = (value: unknown): value is Record<string, unknown> => {\n  if (value === null || typeof value !== 'object') {\n    return false;\n  }\n  const prototype = Object.getPrototypeOf(value as object);\n  return prototype === Object.prototype || prototype === null;\n};\n\n/**\n * Turns URLSearchParams into a sorted JSON object for deterministic keys.\n */\nconst serializeSearchParams = (params: URLSearchParams): JsonValue => {\n  const entries = Array.from(params.entries()).sort(([a], [b]) => a.localeCompare(b));\n  const result: Record<string, JsonValue> = {};\n\n  for (const [key, value] of entries) {\n    const existing = result[key];\n    if (existing === undefined) {\n      result[key] = value;\n      continue;\n    }\n\n    if (Array.isArray(existing)) {\n      (existing as string[]).push(value);\n    } else {\n      result[key] = [existing, value];\n    }\n  }\n\n  return result;\n};\n\n/**\n * Normalizes any accepted value into a JSON-friendly shape for query keys.\n */\nexport const serializeQueryKeyValue = (value: unknown): JsonValue | undefined => {\n  if (value === null) {\n    return null;\n  }\n\n  if (typeof value === 'string' || typeof value === 'number' || typeof value === 'boolean') {\n    return value;\n  }\n\n  if (value === undefined || typeof value === 'function' || typeof value === 'symbol') {\n    return undefined;\n  }\n\n  if (typeof value === 'bigint') {\n    return value.toString();\n  }\n\n  if (value instanceof Date) {\n    return value.toISOString();\n  }\n\n  if (Array.isArray(value)) {\n    return stringifyToJsonValue(value);\n  }\n\n  if (typeof URLSearchParams !== 'undefined' && value instanceof URLSearchParams) {\n    return serializeSearchParams(value);\n  }\n\n  if (isPlainObject(value)) {\n    return stringifyToJsonValue(value);\n  }\n\n  return undefined;\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/preact-query/name-builder/core/serverSentEvents.gen.ts",
    "content": "// 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 const 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            // Normalize line endings: CRLF -> LF, then CR -> LF\n            buffer = buffer.replace(/\\r\\n/g, '\\n').replace(/\\r/g, '\\n');\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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/preact-query/name-builder/core/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { Auth, AuthToken } from './auth.gen';\nimport type { BodySerializer, QuerySerializer, QuerySerializerOptions } from './bodySerializer.gen';\n\nexport type HttpMethod =\n  | 'connect'\n  | 'delete'\n  | 'get'\n  | 'head'\n  | 'options'\n  | 'patch'\n  | 'post'\n  | 'put'\n  | 'trace';\n\nexport type Client<\n  RequestFn = never,\n  Config = unknown,\n  MethodFn = never,\n  BuildUrlFn = never,\n  SseFn = never,\n> = {\n  /**\n   * Returns the final request URL.\n   */\n  buildUrl: BuildUrlFn;\n  getConfig: () => Config;\n  request: RequestFn;\n  setConfig: (config: Config) => Config;\n} & {\n  [K in HttpMethod]: MethodFn;\n} & ([SseFn] extends [never] ? { sse?: never } : { sse: { [K in HttpMethod]: SseFn } });\n\nexport interface Config {\n  /**\n   * Auth token or a function returning auth token. The resolved value will be\n   * added to the request payload as defined by its `security` array.\n   */\n  auth?: ((auth: Auth) => Promise<AuthToken> | AuthToken) | AuthToken;\n  /**\n   * A function for serializing request body parameter. By default,\n   * {@link JSON.stringify()} will be used.\n   */\n  bodySerializer?: BodySerializer | null;\n  /**\n   * An object containing any HTTP headers that you want to pre-populate your\n   * `Headers` object with.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/Headers/Headers#init See more}\n   */\n  headers?:\n    | RequestInit['headers']\n    | Record<\n        string,\n        string | number | boolean | (string | number | boolean)[] | null | undefined | unknown\n      >;\n  /**\n   * The request method.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/fetch#method See more}\n   */\n  method?: Uppercase<HttpMethod>;\n  /**\n   * A function for serializing request query parameters. By default, arrays\n   * will be exploded in form style, objects will be exploded in deepObject\n   * style, and reserved characters are percent-encoded.\n   *\n   * This method will have no effect if the native `paramsSerializer()` Axios\n   * API function is used.\n   *\n   * {@link https://swagger.io/docs/specification/serialization/#query View examples}\n   */\n  querySerializer?: QuerySerializer | QuerySerializerOptions;\n  /**\n   * A function validating request data. This is useful if you want to ensure\n   * the request conforms to the desired shape, so it can be safely sent to\n   * the server.\n   */\n  requestValidator?: (data: unknown) => Promise<unknown>;\n  /**\n   * A function transforming response data before it's returned. This is useful\n   * for post-processing data, e.g. converting ISO strings into Date objects.\n   */\n  responseTransformer?: (data: unknown) => Promise<unknown>;\n  /**\n   * A function validating response data. This is useful if you want to ensure\n   * the response conforms to the desired shape, so it can be safely passed to\n   * the transformers and returned to the user.\n   */\n  responseValidator?: (data: unknown) => Promise<unknown>;\n}\n\ntype IsExactlyNeverOrNeverUndefined<T> = [T] extends [never]\n  ? true\n  : [T] extends [never | undefined]\n    ? [undefined] extends [T]\n      ? false\n      : true\n    : false;\n\nexport type OmitNever<T extends Record<string, unknown>> = {\n  [K in keyof T as IsExactlyNeverOrNeverUndefined<T[K]> extends true ? never : K]: T[K];\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/preact-query/name-builder/core/utils.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/preact-query/name-builder/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport { fooBarPost, fooBarPut, fooPost, fooPut, getFoo, getFooBar, type Options } from './sdk.gen';\nexport type { ClientOptions, FooBarPostData, FooBarPostResponse, FooBarPostResponses, FooBarPutData, FooBarPutResponse, FooBarPutResponses, FooPostData, FooPostResponse, FooPostResponses, FooPutData, FooPutResponse, FooPutResponses, GetFooBarData, GetFooBarResponse, GetFooBarResponses, GetFooData, GetFooResponse, GetFooResponses } from './types.gen';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/preact-query/name-builder/sdk.gen.ts",
    "content": "// 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 { FooBarPostData, FooBarPostResponses, FooBarPutData, FooBarPutResponses, FooPostData, FooPostResponses, FooPutData, FooPutResponses, GetFooBarData, GetFooBarResponses, GetFooData, GetFooResponses } from './types.gen';\n\nexport type Options<TData extends TDataShape = TDataShape, ThrowOnError extends boolean = boolean> = Options2<TData, ThrowOnError> & {\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\nexport const getFoo = <ThrowOnError extends boolean = false>(options?: Options<GetFooData, ThrowOnError>) => (options?.client ?? client).get<GetFooResponses, unknown, ThrowOnError>({ url: '/foo', ...options });\n\nexport const fooPost = <ThrowOnError extends boolean = false>(options?: Options<FooPostData, ThrowOnError>) => (options?.client ?? client).post<FooPostResponses, unknown, ThrowOnError>({ url: '/foo', ...options });\n\nexport const fooPut = <ThrowOnError extends boolean = false>(options?: Options<FooPutData, ThrowOnError>) => (options?.client ?? client).put<FooPutResponses, unknown, ThrowOnError>({ url: '/foo', ...options });\n\nexport const getFooBar = <ThrowOnError extends boolean = false>(options?: Options<GetFooBarData, ThrowOnError>) => (options?.client ?? client).get<GetFooBarResponses, unknown, ThrowOnError>({ url: '/foo/bar', ...options });\n\nexport const fooBarPost = <ThrowOnError extends boolean = false>(options?: Options<FooBarPostData, ThrowOnError>) => (options?.client ?? client).post<FooBarPostResponses, unknown, ThrowOnError>({ url: '/foo/bar', ...options });\n\nexport const fooBarPut = <ThrowOnError extends boolean = false>(options?: Options<FooBarPutData, ThrowOnError>) => (options?.client ?? client).put<FooBarPutResponses, unknown, ThrowOnError>({ url: '/foo/bar', ...options });\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/preact-query/name-builder/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type ClientOptions = {\n    baseUrl: `${string}://${string}` | (string & {});\n};\n\nexport type GetFooData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/foo';\n};\n\nexport type GetFooResponses = {\n    /**\n     * OK\n     */\n    200: string;\n};\n\nexport type GetFooResponse = GetFooResponses[keyof GetFooResponses];\n\nexport type FooPostData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/foo';\n};\n\nexport type FooPostResponses = {\n    /**\n     * OK\n     */\n    200: string;\n};\n\nexport type FooPostResponse = FooPostResponses[keyof FooPostResponses];\n\nexport type FooPutData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/foo';\n};\n\nexport type FooPutResponses = {\n    /**\n     * OK\n     */\n    200: string;\n};\n\nexport type FooPutResponse = FooPutResponses[keyof FooPutResponses];\n\nexport type GetFooBarData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/foo/bar';\n};\n\nexport type GetFooBarResponses = {\n    /**\n     * OK\n     */\n    200: string;\n};\n\nexport type GetFooBarResponse = GetFooBarResponses[keyof GetFooBarResponses];\n\nexport type FooBarPostData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/foo/bar';\n};\n\nexport type FooBarPostResponses = {\n    /**\n     * OK\n     */\n    200: string;\n};\n\nexport type FooBarPostResponse = FooBarPostResponses[keyof FooBarPostResponses];\n\nexport type FooBarPutData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/foo/bar';\n};\n\nexport type FooBarPutResponses = {\n    /**\n     * OK\n     */\n    200: string;\n};\n\nexport type FooBarPutResponse = FooBarPutResponses[keyof FooBarPutResponses];\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/react-query/asClass/@tanstack/react-query.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport { type DefaultError, queryOptions, type UseMutationOptions } from '@tanstack/react-query';\n\nimport { client } from '../client.gen';\nimport { BarBazService, BarService, FooBazService, FooService, type Options } from '../sdk.gen';\nimport type { FooBarPostData, FooBarPostResponse, FooBarPutData, FooBarPutResponse, FooPostData, FooPostResponse, FooPutData, FooPutResponse, GetFooBarData, GetFooBarResponse, GetFooData, GetFooResponse } from '../types.gen';\n\nexport type QueryKey<TOptions extends Options> = [\n    Pick<TOptions, 'baseUrl' | 'body' | 'headers' | 'path' | 'query'> & {\n        _id: string;\n        _infinite?: boolean;\n        tags?: ReadonlyArray<string>;\n    }\n];\n\nconst createQueryKey = <TOptions extends Options>(id: string, options?: TOptions, infinite?: boolean, tags?: ReadonlyArray<string>): [\n    QueryKey<TOptions>[0]\n] => {\n    const params: QueryKey<TOptions>[0] = { _id: id, baseUrl: options?.baseUrl || (options?.client ?? client).getConfig().baseUrl } as QueryKey<TOptions>[0];\n    if (infinite) {\n        params._infinite = infinite;\n    }\n    if (tags) {\n        params.tags = tags;\n    }\n    if (options?.body) {\n        params.body = options.body;\n    }\n    if (options?.headers) {\n        params.headers = options.headers;\n    }\n    if (options?.path) {\n        params.path = options.path;\n    }\n    if (options?.query) {\n        params.query = options.query;\n    }\n    return [params];\n};\n\nexport const getFooQueryKey = (options?: Options<GetFooData>) => createQueryKey('getFoo', options);\n\nexport const getFooOptions = (options?: Options<GetFooData>) => queryOptions<GetFooResponse, DefaultError, GetFooResponse, ReturnType<typeof getFooQueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await FooBazService.getFoo({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: getFooQueryKey(options)\n});\n\nexport const fooPostMutation = (options?: Partial<Options<FooPostData>>): UseMutationOptions<FooPostResponse, DefaultError, Options<FooPostData>> => {\n    const mutationOptions: UseMutationOptions<FooPostResponse, DefaultError, Options<FooPostData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await FooService.post({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const fooPutMutation = (options?: Partial<Options<FooPutData>>): UseMutationOptions<FooPutResponse, DefaultError, Options<FooPutData>> => {\n    const mutationOptions: UseMutationOptions<FooPutResponse, DefaultError, Options<FooPutData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await FooService.put({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const getFooBarQueryKey = (options?: Options<GetFooBarData>) => createQueryKey('getFooBar', options);\n\nexport const getFooBarOptions = (options?: Options<GetFooBarData>) => queryOptions<GetFooBarResponse, DefaultError, GetFooBarResponse, ReturnType<typeof getFooBarQueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await BarBazService.getFooBar({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: getFooBarQueryKey(options)\n});\n\nexport const fooBarPostMutation = (options?: Partial<Options<FooBarPostData>>): UseMutationOptions<FooBarPostResponse, DefaultError, Options<FooBarPostData>> => {\n    const mutationOptions: UseMutationOptions<FooBarPostResponse, DefaultError, Options<FooBarPostData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await BarService.post({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const fooBarPutMutation = (options?: Partial<Options<FooBarPutData>>): UseMutationOptions<FooBarPutResponse, DefaultError, Options<FooBarPutData>> => {\n    const mutationOptions: UseMutationOptions<FooBarPutResponse, DefaultError, Options<FooBarPutData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await BarService.put({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/react-query/asClass/client/client.gen.ts",
    "content": "// 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 (options: RequestOptions) => {\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 url = buildUrl(opts);\n\n    return { opts, url };\n  };\n\n  const request: Client['request'] = async (options) => {\n    // @ts-expect-error\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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/react-query/asClass/client/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type { Auth } from '../core/auth.gen';\nexport type { QuerySerializerOptions } from '../core/bodySerializer.gen';\nexport {\n  formDataBodySerializer,\n  jsonBodySerializer,\n  urlSearchParamsBodySerializer,\n} from '../core/bodySerializer.gen';\nexport { buildClientParams } from '../core/params.gen';\nexport { serializeQueryKeyValue } from '../core/queryKeySerializer.gen';\nexport { createClient } from './client.gen';\nexport type {\n  Client,\n  ClientOptions,\n  Config,\n  CreateClientConfig,\n  Options,\n  RequestOptions,\n  RequestResult,\n  ResolvedRequestOptions,\n  ResponseStyle,\n  TDataShape,\n} from './types.gen';\nexport { createConfig, mergeHeaders } from './utils.gen';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/react-query/asClass/client/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { Auth } from '../core/auth.gen';\nimport type {\n  ServerSentEventsOptions,\n  ServerSentEventsResult,\n} from '../core/serverSentEvents.gen';\nimport type { Client as CoreClient, Config as CoreConfig } from '../core/types.gen';\nimport type { Middleware } from './utils.gen';\n\nexport type ResponseStyle = 'data' | 'fields';\n\nexport interface Config<T extends ClientOptions = ClientOptions>\n  extends Omit<RequestInit, 'body' | 'headers' | 'method'>, CoreConfig {\n  /**\n   * Base URL for all requests made by this client.\n   */\n  baseUrl?: T['baseUrl'];\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   * Please don't use the Fetch client for Next.js applications. The `next`\n   * options won't have any effect.\n   *\n   * Install {@link https://www.npmjs.com/package/@hey-api/client-next `@hey-api/client-next`} instead.\n   */\n  next?: never;\n  /**\n   * Return the response data parsed in a specified format. By default, `auto`\n   * will infer the appropriate method from the `Content-Type` response header.\n   * You can override this behavior with any of the {@link Body} methods.\n   * Select `stream` if you don't want to parse response data at all.\n   *\n   * @default 'auto'\n   */\n  parseAs?: 'arrayBuffer' | 'auto' | 'blob' | 'formData' | 'json' | 'stream' | 'text';\n  /**\n   * Should we return only data or multiple fields (data, error, response, etc.)?\n   *\n   * @default 'fields'\n   */\n  responseStyle?: ResponseStyle;\n  /**\n   * Throw an error instead of returning it in the response?\n   *\n   * @default false\n   */\n  throwOnError?: T['throwOnError'];\n}\n\nexport interface RequestOptions<\n  TData = unknown,\n  TResponseStyle extends ResponseStyle = 'fields',\n  ThrowOnError extends boolean = boolean,\n  Url extends string = string,\n>\n  extends\n    Config<{\n      responseStyle: TResponseStyle;\n      throwOnError: ThrowOnError;\n    }>,\n    Pick<\n      ServerSentEventsOptions<TData>,\n      | 'onRequest'\n      | 'onSseError'\n      | 'onSseEvent'\n      | 'sseDefaultRetryDelay'\n      | 'sseMaxRetryAttempts'\n      | 'sseMaxRetryDelay'\n    > {\n  /**\n   * Any body that you want to add to your request.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/fetch#body}\n   */\n  body?: unknown;\n  path?: Record<string, unknown>;\n  query?: Record<string, unknown>;\n  /**\n   * Security mechanism(s) to use for the request.\n   */\n  security?: ReadonlyArray<Auth>;\n  url: Url;\n}\n\nexport interface ResolvedRequestOptions<\n  TResponseStyle extends ResponseStyle = 'fields',\n  ThrowOnError extends boolean = boolean,\n  Url extends string = string,\n> extends RequestOptions<unknown, TResponseStyle, ThrowOnError, Url> {\n  serializedBody?: string;\n}\n\nexport type RequestResult<\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = boolean,\n  TResponseStyle extends ResponseStyle = 'fields',\n> = ThrowOnError extends true\n  ? Promise<\n      TResponseStyle extends 'data'\n        ? TData extends Record<string, unknown>\n          ? TData[keyof TData]\n          : TData\n        : {\n            data: TData extends Record<string, unknown> ? TData[keyof TData] : TData;\n            request: Request;\n            response: Response;\n          }\n    >\n  : Promise<\n      TResponseStyle extends 'data'\n        ? (TData extends Record<string, unknown> ? TData[keyof TData] : TData) | undefined\n        : (\n            | {\n                data: TData extends Record<string, unknown> ? TData[keyof TData] : TData;\n                error: undefined;\n              }\n            | {\n                data: undefined;\n                error: TError extends Record<string, unknown> ? TError[keyof TError] : TError;\n              }\n          ) & {\n            request: Request;\n            response: Response;\n          }\n    >;\n\nexport interface ClientOptions {\n  baseUrl?: string;\n  responseStyle?: ResponseStyle;\n  throwOnError?: boolean;\n}\n\ntype MethodFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'>,\n) => RequestResult<TData, TError, ThrowOnError, TResponseStyle>;\n\ntype SseFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'>,\n) => Promise<ServerSentEventsResult<TData, TError>>;\n\ntype RequestFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'> &\n    Pick<Required<RequestOptions<TData, TResponseStyle, ThrowOnError>>, 'method'>,\n) => RequestResult<TData, TError, ThrowOnError, TResponseStyle>;\n\ntype BuildUrlFn = <\n  TData extends {\n    body?: unknown;\n    path?: Record<string, unknown>;\n    query?: Record<string, unknown>;\n    url: string;\n  },\n>(\n  options: TData & Options<TData>,\n) => string;\n\nexport type Client = CoreClient<RequestFn, Config, MethodFn, BuildUrlFn, SseFn> & {\n  interceptors: Middleware<Request, Response, unknown, ResolvedRequestOptions>;\n};\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 = ClientOptions> = (\n  override?: Config<ClientOptions & T>,\n) => Config<Required<ClientOptions> & T>;\n\nexport interface TDataShape {\n  body?: unknown;\n  headers?: unknown;\n  path?: unknown;\n  query?: unknown;\n  url: string;\n}\n\ntype OmitKeys<T, K> = Pick<T, Exclude<keyof T, K>>;\n\nexport type Options<\n  TData extends TDataShape = TDataShape,\n  ThrowOnError extends boolean = boolean,\n  TResponse = unknown,\n  TResponseStyle extends ResponseStyle = 'fields',\n> = OmitKeys<\n  RequestOptions<TResponse, TResponseStyle, ThrowOnError>,\n  'body' | 'path' | 'query' | 'url'\n> &\n  ([TData] extends [never] ? unknown : Omit<TData, 'url'>);\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/react-query/asClass/client/utils.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/react-query/asClass/client.gen.ts",
    "content": "// 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>());\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/react-query/asClass/core/auth.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/react-query/asClass/core/bodySerializer.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/react-query/asClass/core/params.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/react-query/asClass/core/pathSerializer.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/react-query/asClass/core/queryKeySerializer.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\n/**\n * JSON-friendly union that mirrors what Pinia Colada can hash.\n */\nexport type JsonValue =\n  | null\n  | string\n  | number\n  | boolean\n  | JsonValue[]\n  | { [key: string]: JsonValue };\n\n/**\n * Replacer that converts non-JSON values (bigint, Date, etc.) to safe substitutes.\n */\nexport const queryKeyJsonReplacer = (_key: string, value: unknown) => {\n  if (value === undefined || typeof value === 'function' || typeof value === 'symbol') {\n    return undefined;\n  }\n  if (typeof value === 'bigint') {\n    return value.toString();\n  }\n  if (value instanceof Date) {\n    return value.toISOString();\n  }\n  return value;\n};\n\n/**\n * Safely stringifies a value and parses it back into a JsonValue.\n */\nexport const stringifyToJsonValue = (input: unknown): JsonValue | undefined => {\n  try {\n    const json = JSON.stringify(input, queryKeyJsonReplacer);\n    if (json === undefined) {\n      return undefined;\n    }\n    return JSON.parse(json) as JsonValue;\n  } catch {\n    return undefined;\n  }\n};\n\n/**\n * Detects plain objects (including objects with a null prototype).\n */\nconst isPlainObject = (value: unknown): value is Record<string, unknown> => {\n  if (value === null || typeof value !== 'object') {\n    return false;\n  }\n  const prototype = Object.getPrototypeOf(value as object);\n  return prototype === Object.prototype || prototype === null;\n};\n\n/**\n * Turns URLSearchParams into a sorted JSON object for deterministic keys.\n */\nconst serializeSearchParams = (params: URLSearchParams): JsonValue => {\n  const entries = Array.from(params.entries()).sort(([a], [b]) => a.localeCompare(b));\n  const result: Record<string, JsonValue> = {};\n\n  for (const [key, value] of entries) {\n    const existing = result[key];\n    if (existing === undefined) {\n      result[key] = value;\n      continue;\n    }\n\n    if (Array.isArray(existing)) {\n      (existing as string[]).push(value);\n    } else {\n      result[key] = [existing, value];\n    }\n  }\n\n  return result;\n};\n\n/**\n * Normalizes any accepted value into a JSON-friendly shape for query keys.\n */\nexport const serializeQueryKeyValue = (value: unknown): JsonValue | undefined => {\n  if (value === null) {\n    return null;\n  }\n\n  if (typeof value === 'string' || typeof value === 'number' || typeof value === 'boolean') {\n    return value;\n  }\n\n  if (value === undefined || typeof value === 'function' || typeof value === 'symbol') {\n    return undefined;\n  }\n\n  if (typeof value === 'bigint') {\n    return value.toString();\n  }\n\n  if (value instanceof Date) {\n    return value.toISOString();\n  }\n\n  if (Array.isArray(value)) {\n    return stringifyToJsonValue(value);\n  }\n\n  if (typeof URLSearchParams !== 'undefined' && value instanceof URLSearchParams) {\n    return serializeSearchParams(value);\n  }\n\n  if (isPlainObject(value)) {\n    return stringifyToJsonValue(value);\n  }\n\n  return undefined;\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/react-query/asClass/core/serverSentEvents.gen.ts",
    "content": "// 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 const 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            // Normalize line endings: CRLF -> LF, then CR -> LF\n            buffer = buffer.replace(/\\r\\n/g, '\\n').replace(/\\r/g, '\\n');\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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/react-query/asClass/core/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { Auth, AuthToken } from './auth.gen';\nimport type { BodySerializer, QuerySerializer, QuerySerializerOptions } from './bodySerializer.gen';\n\nexport type HttpMethod =\n  | 'connect'\n  | 'delete'\n  | 'get'\n  | 'head'\n  | 'options'\n  | 'patch'\n  | 'post'\n  | 'put'\n  | 'trace';\n\nexport type Client<\n  RequestFn = never,\n  Config = unknown,\n  MethodFn = never,\n  BuildUrlFn = never,\n  SseFn = never,\n> = {\n  /**\n   * Returns the final request URL.\n   */\n  buildUrl: BuildUrlFn;\n  getConfig: () => Config;\n  request: RequestFn;\n  setConfig: (config: Config) => Config;\n} & {\n  [K in HttpMethod]: MethodFn;\n} & ([SseFn] extends [never] ? { sse?: never } : { sse: { [K in HttpMethod]: SseFn } });\n\nexport interface Config {\n  /**\n   * Auth token or a function returning auth token. The resolved value will be\n   * added to the request payload as defined by its `security` array.\n   */\n  auth?: ((auth: Auth) => Promise<AuthToken> | AuthToken) | AuthToken;\n  /**\n   * A function for serializing request body parameter. By default,\n   * {@link JSON.stringify()} will be used.\n   */\n  bodySerializer?: BodySerializer | null;\n  /**\n   * An object containing any HTTP headers that you want to pre-populate your\n   * `Headers` object with.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/Headers/Headers#init See more}\n   */\n  headers?:\n    | RequestInit['headers']\n    | Record<\n        string,\n        string | number | boolean | (string | number | boolean)[] | null | undefined | unknown\n      >;\n  /**\n   * The request method.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/fetch#method See more}\n   */\n  method?: Uppercase<HttpMethod>;\n  /**\n   * A function for serializing request query parameters. By default, arrays\n   * will be exploded in form style, objects will be exploded in deepObject\n   * style, and reserved characters are percent-encoded.\n   *\n   * This method will have no effect if the native `paramsSerializer()` Axios\n   * API function is used.\n   *\n   * {@link https://swagger.io/docs/specification/serialization/#query View examples}\n   */\n  querySerializer?: QuerySerializer | QuerySerializerOptions;\n  /**\n   * A function validating request data. This is useful if you want to ensure\n   * the request conforms to the desired shape, so it can be safely sent to\n   * the server.\n   */\n  requestValidator?: (data: unknown) => Promise<unknown>;\n  /**\n   * A function transforming response data before it's returned. This is useful\n   * for post-processing data, e.g. converting ISO strings into Date objects.\n   */\n  responseTransformer?: (data: unknown) => Promise<unknown>;\n  /**\n   * A function validating response data. This is useful if you want to ensure\n   * the response conforms to the desired shape, so it can be safely passed to\n   * the transformers and returned to the user.\n   */\n  responseValidator?: (data: unknown) => Promise<unknown>;\n}\n\ntype IsExactlyNeverOrNeverUndefined<T> = [T] extends [never]\n  ? true\n  : [T] extends [never | undefined]\n    ? [undefined] extends [T]\n      ? false\n      : true\n    : false;\n\nexport type OmitNever<T extends Record<string, unknown>> = {\n  [K in keyof T as IsExactlyNeverOrNeverUndefined<T[K]> extends true ? never : K]: T[K];\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/react-query/asClass/core/utils.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/react-query/asClass/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport { BarBazService, BarService, BarService2, FooBazService, FooService, FooService2, type Options } from './sdk.gen';\nexport type { ClientOptions, FooBarPostData, FooBarPostResponse, FooBarPostResponses, FooBarPutData, FooBarPutResponse, FooBarPutResponses, FooPostData, FooPostResponse, FooPostResponses, FooPutData, FooPutResponse, FooPutResponses, GetFooBarData, GetFooBarResponse, GetFooBarResponses, GetFooData, GetFooResponse, GetFooResponses } from './types.gen';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/react-query/asClass/sdk.gen.ts",
    "content": "// 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 { FooBarPostData, FooBarPostResponses, FooBarPutData, FooBarPutResponses, FooPostData, FooPostResponses, FooPutData, FooPutResponses, GetFooBarData, GetFooBarResponses, GetFooData, GetFooResponses } from './types.gen';\n\nexport type Options<TData extends TDataShape = TDataShape, ThrowOnError extends boolean = boolean> = Options2<TData, ThrowOnError> & {\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\nexport class BarService {\n    public static post<ThrowOnError extends boolean = false>(options?: Options<FooBarPostData, ThrowOnError>) {\n        return (options?.client ?? client).post<FooBarPostResponses, unknown, ThrowOnError>({ url: '/foo/bar', ...options });\n    }\n    \n    public static put<ThrowOnError extends boolean = false>(options?: Options<FooBarPutData, ThrowOnError>) {\n        return (options?.client ?? client).put<FooBarPutResponses, unknown, ThrowOnError>({ url: '/foo/bar', ...options });\n    }\n}\n\nexport class FooService {\n    public static post<ThrowOnError extends boolean = false>(options?: Options<FooPostData, ThrowOnError>) {\n        return (options?.client ?? client).post<FooPostResponses, unknown, ThrowOnError>({ url: '/foo', ...options });\n    }\n    \n    public static put<ThrowOnError extends boolean = false>(options?: Options<FooPutData, ThrowOnError>) {\n        return (options?.client ?? client).put<FooPutResponses, unknown, ThrowOnError>({ url: '/foo', ...options });\n    }\n    \n    static barService = BarService;\n}\n\nexport class FooBazService {\n    public static getFoo<ThrowOnError extends boolean = false>(options?: Options<GetFooData, ThrowOnError>) {\n        return (options?.client ?? client).get<GetFooResponses, unknown, ThrowOnError>({ url: '/foo', ...options });\n    }\n    \n    static fooService = FooService;\n}\n\nexport class BarService2 {\n    public static post<ThrowOnError extends boolean = false>(options?: Options<FooBarPostData, ThrowOnError>) {\n        return (options?.client ?? client).post<FooBarPostResponses, unknown, ThrowOnError>({ url: '/foo/bar', ...options });\n    }\n    \n    public static put<ThrowOnError extends boolean = false>(options?: Options<FooBarPutData, ThrowOnError>) {\n        return (options?.client ?? client).put<FooBarPutResponses, unknown, ThrowOnError>({ url: '/foo/bar', ...options });\n    }\n}\n\nexport class FooService2 {\n    static barService = BarService2;\n}\n\nexport class BarBazService {\n    public static getFooBar<ThrowOnError extends boolean = false>(options?: Options<GetFooBarData, ThrowOnError>) {\n        return (options?.client ?? client).get<GetFooBarResponses, unknown, ThrowOnError>({ url: '/foo/bar', ...options });\n    }\n    \n    static fooService = FooService2;\n}\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/react-query/asClass/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type ClientOptions = {\n    baseUrl: `${string}://${string}` | (string & {});\n};\n\nexport type GetFooData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/foo';\n};\n\nexport type GetFooResponses = {\n    /**\n     * OK\n     */\n    200: string;\n};\n\nexport type GetFooResponse = GetFooResponses[keyof GetFooResponses];\n\nexport type FooPostData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/foo';\n};\n\nexport type FooPostResponses = {\n    /**\n     * OK\n     */\n    200: string;\n};\n\nexport type FooPostResponse = FooPostResponses[keyof FooPostResponses];\n\nexport type FooPutData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/foo';\n};\n\nexport type FooPutResponses = {\n    /**\n     * OK\n     */\n    200: string;\n};\n\nexport type FooPutResponse = FooPutResponses[keyof FooPutResponses];\n\nexport type GetFooBarData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/foo/bar';\n};\n\nexport type GetFooBarResponses = {\n    /**\n     * OK\n     */\n    200: string;\n};\n\nexport type GetFooBarResponse = GetFooBarResponses[keyof GetFooBarResponses];\n\nexport type FooBarPostData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/foo/bar';\n};\n\nexport type FooBarPostResponses = {\n    /**\n     * OK\n     */\n    200: string;\n};\n\nexport type FooBarPostResponse = FooBarPostResponses[keyof FooBarPostResponses];\n\nexport type FooBarPutData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/foo/bar';\n};\n\nexport type FooBarPutResponses = {\n    /**\n     * OK\n     */\n    200: string;\n};\n\nexport type FooBarPutResponse = FooBarPutResponses[keyof FooBarPutResponses];\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/react-query/axios/@tanstack/react-query.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport { type DefaultError, type InfiniteData, infiniteQueryOptions, queryOptions, type UseMutationOptions } from '@tanstack/react-query';\nimport type { AxiosError } from 'axios';\n\nimport { client } from '../client.gen';\nimport { apiVVersionODataControllerCount, callToTestOrderOfParams, callWithDefaultOptionalParameters, callWithDefaultParameters, callWithDescriptions, callWithDuplicateResponses, callWithNoContentResponse, callWithParameters, callWithResponse, callWithResponseAndNoContentResponse, callWithResponses, callWithResultFromHeader, callWithWeirdParameterNames, collectionFormat, complexParams, complexTypes, deleteCallWithoutParametersAndResponse, deleteFoo, deprecatedCall, dummyA, dummyB, duplicateName, duplicateName2, duplicateName3, duplicateName4, export_, fileResponse, fooWow, getApiVbyApiVersionSimpleOperation, getCallWithOptionalParam, getCallWithoutParametersAndResponse, import_, multipartRequest, multipartResponse, nonAsciiæøåÆøÅöôêÊ字符串, type Options, patchApiVbyApiVersionNoTag, patchCallWithoutParametersAndResponse, postApiVbyApiVersionFormData, postApiVbyApiVersionRequestBody, postCallWithOptionalParam, postCallWithoutParametersAndResponse, putCallWithoutParametersAndResponse, putWithFormUrlEncoded, testErrorCode, types, uploadFile } from '../sdk.gen';\nimport type { ApiVVersionODataControllerCountData, ApiVVersionODataControllerCountResponse, CallToTestOrderOfParamsData, CallWithDefaultOptionalParametersData, CallWithDefaultParametersData, CallWithDescriptionsData, CallWithDuplicateResponsesData, CallWithDuplicateResponsesError, CallWithDuplicateResponsesResponse, CallWithNoContentResponseData, CallWithNoContentResponseResponse, CallWithParametersData, CallWithResponseAndNoContentResponseData, CallWithResponseAndNoContentResponseResponse, CallWithResponseData, CallWithResponseResponse, CallWithResponsesData, CallWithResponsesError, CallWithResponsesResponse, CallWithResultFromHeaderData, CallWithWeirdParameterNamesData, CollectionFormatData, ComplexParamsData, ComplexParamsResponse, ComplexTypesData, ComplexTypesResponse, DeleteCallWithoutParametersAndResponseData, DeleteFooData3, DeprecatedCallData, DummyAData, DummyAResponse, DummyBData, DummyBResponse, DuplicateName2Data, DuplicateName3Data, DuplicateName4Data, DuplicateNameData, ExportData, FileResponseData, FileResponseResponse, FooWowData, GetApiVbyApiVersionSimpleOperationData, GetApiVbyApiVersionSimpleOperationError, GetApiVbyApiVersionSimpleOperationResponse, GetCallWithOptionalParamData, GetCallWithoutParametersAndResponseData, ImportData, ImportResponse, MultipartRequestData, MultipartResponseData, MultipartResponseResponse, NonAsciiæøåÆøÅöôêÊ字符串Data, NonAsciiæøåÆøÅöôêÊ字符串Response, PatchApiVbyApiVersionNoTagData, PatchCallWithoutParametersAndResponseData, PostApiVbyApiVersionFormDataData, PostApiVbyApiVersionRequestBodyData, PostCallWithOptionalParamData, PostCallWithOptionalParamResponse, PostCallWithoutParametersAndResponseData, PutCallWithoutParametersAndResponseData, PutWithFormUrlEncodedData, TestErrorCodeData, TypesData, TypesResponse, UploadFileData, UploadFileResponse } from '../types.gen';\n\nexport type QueryKey<TOptions extends Options> = [\n    Pick<TOptions, 'baseURL' | 'body' | 'headers' | 'path' | 'query'> & {\n        _id: string;\n        _infinite?: boolean;\n        tags?: ReadonlyArray<string>;\n    }\n];\n\nconst createQueryKey = <TOptions extends Options>(id: string, options?: TOptions, infinite?: boolean, tags?: ReadonlyArray<string>): [\n    QueryKey<TOptions>[0]\n] => {\n    const params: QueryKey<TOptions>[0] = { _id: id, baseURL: options?.baseURL || (options?.client ?? client).getConfig().baseURL } as QueryKey<TOptions>[0];\n    if (infinite) {\n        params._infinite = infinite;\n    }\n    if (tags) {\n        params.tags = tags;\n    }\n    if (options?.body) {\n        params.body = options.body;\n    }\n    if (options?.headers) {\n        params.headers = options.headers;\n    }\n    if (options?.path) {\n        params.path = options.path;\n    }\n    if (options?.query) {\n        params.query = options.query;\n    }\n    return [params];\n};\n\nexport const exportQueryKey = (options?: Options<ExportData>) => createQueryKey('export', options);\n\nexport const exportOptions = (options?: Options<ExportData>) => queryOptions<unknown, AxiosError<DefaultError>, unknown, ReturnType<typeof exportQueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await export_({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: exportQueryKey(options)\n});\n\nexport const patchApiVbyApiVersionNoTagMutation = (options?: Partial<Options<PatchApiVbyApiVersionNoTagData>>): UseMutationOptions<unknown, AxiosError<DefaultError>, Options<PatchApiVbyApiVersionNoTagData>> => {\n    const mutationOptions: UseMutationOptions<unknown, AxiosError<DefaultError>, Options<PatchApiVbyApiVersionNoTagData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await patchApiVbyApiVersionNoTag({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const importMutation = (options?: Partial<Options<ImportData>>): UseMutationOptions<ImportResponse, AxiosError<DefaultError>, Options<ImportData>> => {\n    const mutationOptions: UseMutationOptions<ImportResponse, AxiosError<DefaultError>, Options<ImportData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await import_({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const fooWowMutation = (options?: Partial<Options<FooWowData>>): UseMutationOptions<unknown, AxiosError<DefaultError>, Options<FooWowData>> => {\n    const mutationOptions: UseMutationOptions<unknown, AxiosError<DefaultError>, Options<FooWowData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await fooWow({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const apiVVersionODataControllerCountQueryKey = (options?: Options<ApiVVersionODataControllerCountData>) => createQueryKey('apiVVersionODataControllerCount', options);\n\nexport const apiVVersionODataControllerCountOptions = (options?: Options<ApiVVersionODataControllerCountData>) => queryOptions<ApiVVersionODataControllerCountResponse, AxiosError<DefaultError>, ApiVVersionODataControllerCountResponse, ReturnType<typeof apiVVersionODataControllerCountQueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await apiVVersionODataControllerCount({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: apiVVersionODataControllerCountQueryKey(options)\n});\n\nexport const getApiVbyApiVersionSimpleOperationQueryKey = (options: Options<GetApiVbyApiVersionSimpleOperationData>) => createQueryKey('getApiVbyApiVersionSimpleOperation', options);\n\nexport const getApiVbyApiVersionSimpleOperationOptions = (options: Options<GetApiVbyApiVersionSimpleOperationData>) => queryOptions<GetApiVbyApiVersionSimpleOperationResponse, AxiosError<GetApiVbyApiVersionSimpleOperationError>, GetApiVbyApiVersionSimpleOperationResponse, ReturnType<typeof getApiVbyApiVersionSimpleOperationQueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await getApiVbyApiVersionSimpleOperation({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: getApiVbyApiVersionSimpleOperationQueryKey(options)\n});\n\nexport const deleteCallWithoutParametersAndResponseMutation = (options?: Partial<Options<DeleteCallWithoutParametersAndResponseData>>): UseMutationOptions<unknown, AxiosError<DefaultError>, Options<DeleteCallWithoutParametersAndResponseData>> => {\n    const mutationOptions: UseMutationOptions<unknown, AxiosError<DefaultError>, Options<DeleteCallWithoutParametersAndResponseData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await deleteCallWithoutParametersAndResponse({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const getCallWithoutParametersAndResponseQueryKey = (options?: Options<GetCallWithoutParametersAndResponseData>) => createQueryKey('getCallWithoutParametersAndResponse', options);\n\nexport const getCallWithoutParametersAndResponseOptions = (options?: Options<GetCallWithoutParametersAndResponseData>) => queryOptions<unknown, AxiosError<DefaultError>, unknown, ReturnType<typeof getCallWithoutParametersAndResponseQueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await getCallWithoutParametersAndResponse({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: getCallWithoutParametersAndResponseQueryKey(options)\n});\n\nexport const patchCallWithoutParametersAndResponseMutation = (options?: Partial<Options<PatchCallWithoutParametersAndResponseData>>): UseMutationOptions<unknown, AxiosError<DefaultError>, Options<PatchCallWithoutParametersAndResponseData>> => {\n    const mutationOptions: UseMutationOptions<unknown, AxiosError<DefaultError>, Options<PatchCallWithoutParametersAndResponseData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await patchCallWithoutParametersAndResponse({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const postCallWithoutParametersAndResponseMutation = (options?: Partial<Options<PostCallWithoutParametersAndResponseData>>): UseMutationOptions<unknown, AxiosError<DefaultError>, Options<PostCallWithoutParametersAndResponseData>> => {\n    const mutationOptions: UseMutationOptions<unknown, AxiosError<DefaultError>, Options<PostCallWithoutParametersAndResponseData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await postCallWithoutParametersAndResponse({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const putCallWithoutParametersAndResponseMutation = (options?: Partial<Options<PutCallWithoutParametersAndResponseData>>): UseMutationOptions<unknown, AxiosError<DefaultError>, Options<PutCallWithoutParametersAndResponseData>> => {\n    const mutationOptions: UseMutationOptions<unknown, AxiosError<DefaultError>, Options<PutCallWithoutParametersAndResponseData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await putCallWithoutParametersAndResponse({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const deleteFooMutation = (options?: Partial<Options<DeleteFooData3>>): UseMutationOptions<unknown, AxiosError<DefaultError>, Options<DeleteFooData3>> => {\n    const mutationOptions: UseMutationOptions<unknown, AxiosError<DefaultError>, Options<DeleteFooData3>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await deleteFoo({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const callWithDescriptionsMutation = (options?: Partial<Options<CallWithDescriptionsData>>): UseMutationOptions<unknown, AxiosError<DefaultError>, Options<CallWithDescriptionsData>> => {\n    const mutationOptions: UseMutationOptions<unknown, AxiosError<DefaultError>, Options<CallWithDescriptionsData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await callWithDescriptions({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\n/**\n * @deprecated\n */\nexport const deprecatedCallMutation = (options?: Partial<Options<DeprecatedCallData>>): UseMutationOptions<unknown, AxiosError<DefaultError>, Options<DeprecatedCallData>> => {\n    const mutationOptions: UseMutationOptions<unknown, AxiosError<DefaultError>, Options<DeprecatedCallData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await deprecatedCall({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const callWithParametersMutation = (options?: Partial<Options<CallWithParametersData>>): UseMutationOptions<unknown, AxiosError<DefaultError>, Options<CallWithParametersData>> => {\n    const mutationOptions: UseMutationOptions<unknown, AxiosError<DefaultError>, Options<CallWithParametersData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await callWithParameters({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const callWithWeirdParameterNamesMutation = (options?: Partial<Options<CallWithWeirdParameterNamesData>>): UseMutationOptions<unknown, AxiosError<DefaultError>, Options<CallWithWeirdParameterNamesData>> => {\n    const mutationOptions: UseMutationOptions<unknown, AxiosError<DefaultError>, Options<CallWithWeirdParameterNamesData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await callWithWeirdParameterNames({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const getCallWithOptionalParamQueryKey = (options: Options<GetCallWithOptionalParamData>) => createQueryKey('getCallWithOptionalParam', options);\n\nexport const getCallWithOptionalParamOptions = (options: Options<GetCallWithOptionalParamData>) => queryOptions<unknown, AxiosError<DefaultError>, unknown, ReturnType<typeof getCallWithOptionalParamQueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await getCallWithOptionalParam({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: getCallWithOptionalParamQueryKey(options)\n});\n\nconst createInfiniteParams = <K extends Pick<QueryKey<Options>[0], 'body' | 'headers' | 'path' | 'query'>>(queryKey: QueryKey<Options>, page: K) => {\n    const params = { ...queryKey[0] };\n    if (page.body) {\n        params.body = {\n            ...queryKey[0].body as any,\n            ...page.body as any\n        };\n    }\n    if (page.headers) {\n        params.headers = {\n            ...queryKey[0].headers,\n            ...page.headers\n        };\n    }\n    if (page.path) {\n        params.path = {\n            ...queryKey[0].path as any,\n            ...page.path as any\n        };\n    }\n    if (page.query) {\n        params.query = {\n            ...queryKey[0].query as any,\n            ...page.query as any\n        };\n    }\n    return params as unknown as typeof page;\n};\n\nexport const getCallWithOptionalParamInfiniteQueryKey = (options: Options<GetCallWithOptionalParamData>): QueryKey<Options<GetCallWithOptionalParamData>> => createQueryKey('getCallWithOptionalParam', options, true);\n\nexport const getCallWithOptionalParamInfiniteOptions = (options: Options<GetCallWithOptionalParamData>) => infiniteQueryOptions<unknown, AxiosError<DefaultError>, InfiniteData<unknown>, QueryKey<Options<GetCallWithOptionalParamData>>, number | Pick<QueryKey<Options<GetCallWithOptionalParamData>>[0], 'body' | 'headers' | 'path' | 'query'>>(\n// @ts-ignore\n{\n    queryFn: async ({ pageParam, queryKey, signal }) => {\n        // @ts-ignore\n        const page: Pick<QueryKey<Options<GetCallWithOptionalParamData>>[0], 'body' | 'headers' | 'path' | 'query'> = typeof pageParam === 'object' ? pageParam : {\n            query: {\n                page: pageParam\n            }\n        };\n        const params = createInfiniteParams(queryKey, page);\n        const { data } = await getCallWithOptionalParam({\n            ...options,\n            ...params,\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: getCallWithOptionalParamInfiniteQueryKey(options)\n});\n\nexport const postCallWithOptionalParamMutation = (options?: Partial<Options<PostCallWithOptionalParamData>>): UseMutationOptions<PostCallWithOptionalParamResponse, AxiosError<DefaultError>, Options<PostCallWithOptionalParamData>> => {\n    const mutationOptions: UseMutationOptions<PostCallWithOptionalParamResponse, AxiosError<DefaultError>, Options<PostCallWithOptionalParamData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await postCallWithOptionalParam({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const postApiVbyApiVersionRequestBodyMutation = (options?: Partial<Options<PostApiVbyApiVersionRequestBodyData>>): UseMutationOptions<unknown, AxiosError<DefaultError>, Options<PostApiVbyApiVersionRequestBodyData>> => {\n    const mutationOptions: UseMutationOptions<unknown, AxiosError<DefaultError>, Options<PostApiVbyApiVersionRequestBodyData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await postApiVbyApiVersionRequestBody({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const postApiVbyApiVersionFormDataMutation = (options?: Partial<Options<PostApiVbyApiVersionFormDataData>>): UseMutationOptions<unknown, AxiosError<DefaultError>, Options<PostApiVbyApiVersionFormDataData>> => {\n    const mutationOptions: UseMutationOptions<unknown, AxiosError<DefaultError>, Options<PostApiVbyApiVersionFormDataData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await postApiVbyApiVersionFormData({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const callWithDefaultParametersQueryKey = (options?: Options<CallWithDefaultParametersData>) => createQueryKey('callWithDefaultParameters', options);\n\nexport const callWithDefaultParametersOptions = (options?: Options<CallWithDefaultParametersData>) => queryOptions<unknown, AxiosError<DefaultError>, unknown, ReturnType<typeof callWithDefaultParametersQueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await callWithDefaultParameters({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: callWithDefaultParametersQueryKey(options)\n});\n\nexport const callWithDefaultOptionalParametersMutation = (options?: Partial<Options<CallWithDefaultOptionalParametersData>>): UseMutationOptions<unknown, AxiosError<DefaultError>, Options<CallWithDefaultOptionalParametersData>> => {\n    const mutationOptions: UseMutationOptions<unknown, AxiosError<DefaultError>, Options<CallWithDefaultOptionalParametersData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await callWithDefaultOptionalParameters({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const callToTestOrderOfParamsMutation = (options?: Partial<Options<CallToTestOrderOfParamsData>>): UseMutationOptions<unknown, AxiosError<DefaultError>, Options<CallToTestOrderOfParamsData>> => {\n    const mutationOptions: UseMutationOptions<unknown, AxiosError<DefaultError>, Options<CallToTestOrderOfParamsData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await callToTestOrderOfParams({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const duplicateNameMutation = (options?: Partial<Options<DuplicateNameData>>): UseMutationOptions<unknown, AxiosError<DefaultError>, Options<DuplicateNameData>> => {\n    const mutationOptions: UseMutationOptions<unknown, AxiosError<DefaultError>, Options<DuplicateNameData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await duplicateName({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const duplicateName2QueryKey = (options?: Options<DuplicateName2Data>) => createQueryKey('duplicateName2', options);\n\nexport const duplicateName2Options = (options?: Options<DuplicateName2Data>) => queryOptions<unknown, AxiosError<DefaultError>, unknown, ReturnType<typeof duplicateName2QueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await duplicateName2({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: duplicateName2QueryKey(options)\n});\n\nexport const duplicateName3Mutation = (options?: Partial<Options<DuplicateName3Data>>): UseMutationOptions<unknown, AxiosError<DefaultError>, Options<DuplicateName3Data>> => {\n    const mutationOptions: UseMutationOptions<unknown, AxiosError<DefaultError>, Options<DuplicateName3Data>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await duplicateName3({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const duplicateName4Mutation = (options?: Partial<Options<DuplicateName4Data>>): UseMutationOptions<unknown, AxiosError<DefaultError>, Options<DuplicateName4Data>> => {\n    const mutationOptions: UseMutationOptions<unknown, AxiosError<DefaultError>, Options<DuplicateName4Data>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await duplicateName4({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const callWithNoContentResponseQueryKey = (options?: Options<CallWithNoContentResponseData>) => createQueryKey('callWithNoContentResponse', options);\n\nexport const callWithNoContentResponseOptions = (options?: Options<CallWithNoContentResponseData>) => queryOptions<CallWithNoContentResponseResponse, AxiosError<DefaultError>, CallWithNoContentResponseResponse, ReturnType<typeof callWithNoContentResponseQueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await callWithNoContentResponse({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: callWithNoContentResponseQueryKey(options)\n});\n\nexport const callWithResponseAndNoContentResponseQueryKey = (options?: Options<CallWithResponseAndNoContentResponseData>) => createQueryKey('callWithResponseAndNoContentResponse', options);\n\nexport const callWithResponseAndNoContentResponseOptions = (options?: Options<CallWithResponseAndNoContentResponseData>) => queryOptions<CallWithResponseAndNoContentResponseResponse, AxiosError<DefaultError>, CallWithResponseAndNoContentResponseResponse, ReturnType<typeof callWithResponseAndNoContentResponseQueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await callWithResponseAndNoContentResponse({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: callWithResponseAndNoContentResponseQueryKey(options)\n});\n\nexport const dummyAQueryKey = (options?: Options<DummyAData>) => createQueryKey('dummyA', options);\n\nexport const dummyAOptions = (options?: Options<DummyAData>) => queryOptions<DummyAResponse, AxiosError<DefaultError>, DummyAResponse, ReturnType<typeof dummyAQueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await dummyA({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: dummyAQueryKey(options)\n});\n\nexport const dummyBQueryKey = (options?: Options<DummyBData>) => createQueryKey('dummyB', options);\n\nexport const dummyBOptions = (options?: Options<DummyBData>) => queryOptions<DummyBResponse, AxiosError<DefaultError>, DummyBResponse, ReturnType<typeof dummyBQueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await dummyB({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: dummyBQueryKey(options)\n});\n\nexport const callWithResponseQueryKey = (options?: Options<CallWithResponseData>) => createQueryKey('callWithResponse', options);\n\nexport const callWithResponseOptions = (options?: Options<CallWithResponseData>) => queryOptions<CallWithResponseResponse, AxiosError<DefaultError>, CallWithResponseResponse, ReturnType<typeof callWithResponseQueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await callWithResponse({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: callWithResponseQueryKey(options)\n});\n\nexport const callWithDuplicateResponsesMutation = (options?: Partial<Options<CallWithDuplicateResponsesData>>): UseMutationOptions<CallWithDuplicateResponsesResponse, AxiosError<CallWithDuplicateResponsesError>, Options<CallWithDuplicateResponsesData>> => {\n    const mutationOptions: UseMutationOptions<CallWithDuplicateResponsesResponse, AxiosError<CallWithDuplicateResponsesError>, Options<CallWithDuplicateResponsesData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await callWithDuplicateResponses({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const callWithResponsesMutation = (options?: Partial<Options<CallWithResponsesData>>): UseMutationOptions<CallWithResponsesResponse, AxiosError<CallWithResponsesError>, Options<CallWithResponsesData>> => {\n    const mutationOptions: UseMutationOptions<CallWithResponsesResponse, AxiosError<CallWithResponsesError>, Options<CallWithResponsesData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await callWithResponses({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const collectionFormatQueryKey = (options: Options<CollectionFormatData>) => createQueryKey('collectionFormat', options);\n\nexport const collectionFormatOptions = (options: Options<CollectionFormatData>) => queryOptions<unknown, AxiosError<DefaultError>, unknown, ReturnType<typeof collectionFormatQueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await collectionFormat({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: collectionFormatQueryKey(options)\n});\n\nexport const typesQueryKey = (options: Options<TypesData>) => createQueryKey('types', options);\n\nexport const typesOptions = (options: Options<TypesData>) => queryOptions<TypesResponse, AxiosError<DefaultError>, TypesResponse, ReturnType<typeof typesQueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await types({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: typesQueryKey(options)\n});\n\nexport const uploadFileMutation = (options?: Partial<Options<UploadFileData>>): UseMutationOptions<UploadFileResponse, AxiosError<DefaultError>, Options<UploadFileData>> => {\n    const mutationOptions: UseMutationOptions<UploadFileResponse, AxiosError<DefaultError>, Options<UploadFileData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await uploadFile({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const fileResponseQueryKey = (options: Options<FileResponseData>) => createQueryKey('fileResponse', options);\n\nexport const fileResponseOptions = (options: Options<FileResponseData>) => queryOptions<FileResponseResponse, AxiosError<DefaultError>, FileResponseResponse, ReturnType<typeof fileResponseQueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await fileResponse({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: fileResponseQueryKey(options)\n});\n\nexport const complexTypesQueryKey = (options: Options<ComplexTypesData>) => createQueryKey('complexTypes', options);\n\nexport const complexTypesOptions = (options: Options<ComplexTypesData>) => queryOptions<ComplexTypesResponse, AxiosError<DefaultError>, ComplexTypesResponse, ReturnType<typeof complexTypesQueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await complexTypes({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: complexTypesQueryKey(options)\n});\n\nexport const multipartResponseQueryKey = (options?: Options<MultipartResponseData>) => createQueryKey('multipartResponse', options);\n\nexport const multipartResponseOptions = (options?: Options<MultipartResponseData>) => queryOptions<MultipartResponseResponse, AxiosError<DefaultError>, MultipartResponseResponse, ReturnType<typeof multipartResponseQueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await multipartResponse({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: multipartResponseQueryKey(options)\n});\n\nexport const multipartRequestMutation = (options?: Partial<Options<MultipartRequestData>>): UseMutationOptions<unknown, AxiosError<DefaultError>, Options<MultipartRequestData>> => {\n    const mutationOptions: UseMutationOptions<unknown, AxiosError<DefaultError>, Options<MultipartRequestData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await multipartRequest({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const complexParamsMutation = (options?: Partial<Options<ComplexParamsData>>): UseMutationOptions<ComplexParamsResponse, AxiosError<DefaultError>, Options<ComplexParamsData>> => {\n    const mutationOptions: UseMutationOptions<ComplexParamsResponse, AxiosError<DefaultError>, Options<ComplexParamsData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await complexParams({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const callWithResultFromHeaderMutation = (options?: Partial<Options<CallWithResultFromHeaderData>>): UseMutationOptions<unknown, AxiosError<DefaultError>, Options<CallWithResultFromHeaderData>> => {\n    const mutationOptions: UseMutationOptions<unknown, AxiosError<DefaultError>, Options<CallWithResultFromHeaderData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await callWithResultFromHeader({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const testErrorCodeMutation = (options?: Partial<Options<TestErrorCodeData>>): UseMutationOptions<unknown, AxiosError<DefaultError>, Options<TestErrorCodeData>> => {\n    const mutationOptions: UseMutationOptions<unknown, AxiosError<DefaultError>, Options<TestErrorCodeData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await testErrorCode({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const nonAsciiæøåÆøÅöôêÊ字符串Mutation = (options?: Partial<Options<NonAsciiæøåÆøÅöôêÊ字符串Data>>): UseMutationOptions<NonAsciiæøåÆøÅöôêÊ字符串Response, AxiosError<DefaultError>, Options<NonAsciiæøåÆøÅöôêÊ字符串Data>> => {\n    const mutationOptions: UseMutationOptions<NonAsciiæøåÆøÅöôêÊ字符串Response, AxiosError<DefaultError>, Options<NonAsciiæøåÆøÅöôêÊ字符串Data>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await nonAsciiæøåÆøÅöôêÊ字符串({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\n/**\n * Login User\n */\nexport const putWithFormUrlEncodedMutation = (options?: Partial<Options<PutWithFormUrlEncodedData>>): UseMutationOptions<unknown, AxiosError<DefaultError>, Options<PutWithFormUrlEncodedData>> => {\n    const mutationOptions: UseMutationOptions<unknown, AxiosError<DefaultError>, Options<PutWithFormUrlEncodedData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await putWithFormUrlEncoded({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/react-query/axios/client/client.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { AxiosError, AxiosInstance, RawAxiosRequestHeaders } from 'axios';\nimport axios from 'axios';\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 } from './types.gen';\nimport { buildUrl, createConfig, mergeConfigs, mergeHeaders, setAuthParams } from './utils.gen';\n\nexport const createClient = (config: Config = {}): Client => {\n  let _config = mergeConfigs(createConfig(), config);\n\n  let instance: AxiosInstance;\n\n  if (_config.axios && !('Axios' in _config.axios)) {\n    instance = _config.axios;\n  } else {\n    // eslint-disable-next-line @typescript-eslint/no-unused-vars\n    const { auth, ...configWithoutAuth } = _config;\n    instance = axios.create(configWithoutAuth);\n  }\n\n  const getConfig = (): Config => ({ ..._config });\n\n  const setConfig = (config: Config): Config => {\n    _config = mergeConfigs(_config, config);\n    instance.defaults = {\n      ...instance.defaults,\n      ..._config,\n      // @ts-expect-error\n      headers: mergeHeaders(instance.defaults.headers, _config.headers),\n    };\n    return getConfig();\n  };\n\n  const beforeRequest = async (options: RequestOptions) => {\n    const opts = {\n      ..._config,\n      ...options,\n      axios: options.axios ?? _config.axios ?? instance,\n      headers: mergeHeaders(_config.headers, options.headers),\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.body = opts.bodySerializer(opts.body);\n    }\n\n    const url = buildUrl(opts);\n\n    return { opts, url };\n  };\n\n  // @ts-expect-error\n  const request: Client['request'] = async (options) => {\n    // @ts-expect-error\n    const { opts, url } = await beforeRequest(options);\n    try {\n      // assign Axios here for consistency with fetch\n      const _axios = opts.axios!;\n      // eslint-disable-next-line @typescript-eslint/no-unused-vars\n      const { auth, ...optsWithoutAuth } = opts;\n      const response = await _axios({\n        ...optsWithoutAuth,\n        baseURL: '', // the baseURL is already included in `url`\n        data: getValidRequestBody(opts),\n        headers: opts.headers as RawAxiosRequestHeaders,\n        // let `paramsSerializer()` handle query params if it exists\n        params: opts.paramsSerializer ? opts.query : undefined,\n        url,\n      });\n\n      let { data } = response;\n\n      if (opts.responseType === '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 {\n        ...response,\n        data: data ?? {},\n      };\n    } catch (error) {\n      const e = error as AxiosError;\n      if (opts.throwOnError) {\n        throw e;\n      }\n      // @ts-expect-error\n      e.error = e.response?.data ?? {};\n      return e;\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 Record<string, string>,\n      method,\n      serializedBody: getValidRequestBody(opts) as BodyInit | null | undefined,\n      // @ts-expect-error\n      signal: opts.signal,\n      url,\n    });\n  };\n\n  const _buildUrl: Client['buildUrl'] = (options) =>\n    buildUrl({ axios: instance, ..._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    instance,\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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/react-query/axios/client/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type { Auth } from '../core/auth.gen';\nexport type { QuerySerializerOptions } from '../core/bodySerializer.gen';\nexport {\n  formDataBodySerializer,\n  jsonBodySerializer,\n  urlSearchParamsBodySerializer,\n} from '../core/bodySerializer.gen';\nexport { buildClientParams } from '../core/params.gen';\nexport { serializeQueryKeyValue } from '../core/queryKeySerializer.gen';\nexport { createClient } from './client.gen';\nexport type {\n  Client,\n  ClientOptions,\n  Config,\n  CreateClientConfig,\n  Options,\n  RequestOptions,\n  RequestResult,\n  TDataShape,\n} from './types.gen';\nexport { createConfig } from './utils.gen';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/react-query/axios/client/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type {\n  AxiosError,\n  AxiosInstance,\n  AxiosRequestHeaders,\n  AxiosResponse,\n  AxiosStatic,\n  CreateAxiosDefaults,\n} from 'axios';\n\nimport type { Auth } from '../core/auth.gen';\nimport type {\n  ServerSentEventsOptions,\n  ServerSentEventsResult,\n} from '../core/serverSentEvents.gen';\nimport type { Client as CoreClient, Config as CoreConfig } from '../core/types.gen';\n\nexport interface Config<T extends ClientOptions = ClientOptions>\n  extends Omit<CreateAxiosDefaults, 'auth' | 'baseURL' | 'headers' | 'method'>, CoreConfig {\n  /**\n   * Axios implementation. You can use this option to provide either an\n   * `AxiosStatic` or an `AxiosInstance`.\n   *\n   * @default axios\n   */\n  axios?: AxiosStatic | AxiosInstance;\n  /**\n   * Base URL for all requests made by this client.\n   */\n  baseURL?: T['baseURL'];\n  /**\n   * An object containing any HTTP headers that you want to pre-populate your\n   * `Headers` object with.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/Headers/Headers#init See more}\n   */\n  headers?:\n    | AxiosRequestHeaders\n    | Record<\n        string,\n        string | number | boolean | (string | number | boolean)[] | null | undefined | unknown\n      >;\n  /**\n   * Throw an error instead of returning it in the response?\n   *\n   * @default false\n   */\n  throwOnError?: T['throwOnError'];\n}\n\nexport interface RequestOptions<\n  TData = unknown,\n  ThrowOnError extends boolean = boolean,\n  Url extends string = string,\n>\n  extends\n    Config<{\n      throwOnError: ThrowOnError;\n    }>,\n    Pick<\n      ServerSentEventsOptions<TData>,\n      | 'onRequest'\n      | 'onSseError'\n      | 'onSseEvent'\n      | 'sseDefaultRetryDelay'\n      | 'sseMaxRetryAttempts'\n      | 'sseMaxRetryDelay'\n    > {\n  /**\n   * Any body that you want to add to your request.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/fetch#body}\n   */\n  body?: unknown;\n  path?: Record<string, unknown>;\n  query?: Record<string, unknown>;\n  /**\n   * Security mechanism(s) to use for the request.\n   */\n  security?: ReadonlyArray<Auth>;\n  url: Url;\n}\n\nexport interface ClientOptions {\n  baseURL?: string;\n  throwOnError?: boolean;\n}\n\nexport type RequestResult<\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = boolean,\n> = ThrowOnError extends true\n  ? Promise<AxiosResponse<TData extends Record<string, unknown> ? TData[keyof TData] : TData>>\n  : Promise<\n      | (AxiosResponse<TData extends Record<string, unknown> ? TData[keyof TData] : TData> & {\n          error: undefined;\n        })\n      | (AxiosError<TError extends Record<string, unknown> ? TError[keyof TError] : TError> & {\n          data: undefined;\n          error: TError extends Record<string, unknown> ? TError[keyof TError] : TError;\n        })\n    >;\n\ntype MethodFn = <TData = unknown, TError = unknown, ThrowOnError extends boolean = false>(\n  options: Omit<RequestOptions<TData, ThrowOnError>, 'method'>,\n) => RequestResult<TData, TError, ThrowOnError>;\n\ntype SseFn = <TData = unknown, TError = unknown, ThrowOnError extends boolean = false>(\n  options: Omit<RequestOptions<TData, ThrowOnError>, 'method'>,\n) => Promise<ServerSentEventsResult<TData, TError>>;\n\ntype RequestFn = <TData = unknown, TError = unknown, ThrowOnError extends boolean = false>(\n  options: Omit<RequestOptions<TData, ThrowOnError>, 'method'> &\n    Pick<Required<RequestOptions<TData, ThrowOnError>>, 'method'>,\n) => RequestResult<TData, TError, ThrowOnError>;\n\ntype BuildUrlFn = <\n  TData extends {\n    body?: unknown;\n    path?: Record<string, unknown>;\n    query?: Record<string, unknown>;\n    url: string;\n  },\n>(\n  options: TData & Options<TData>,\n) => string;\n\nexport type Client = CoreClient<RequestFn, Config, MethodFn, BuildUrlFn, SseFn> & {\n  instance: AxiosInstance;\n};\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 = ClientOptions> = (\n  override?: Config<ClientOptions & T>,\n) => Config<Required<ClientOptions> & T>;\n\nexport interface TDataShape {\n  body?: unknown;\n  headers?: unknown;\n  path?: unknown;\n  query?: unknown;\n  url: string;\n}\n\ntype OmitKeys<T, K> = Pick<T, Exclude<keyof T, K>>;\n\nexport type Options<\n  TData extends TDataShape = TDataShape,\n  ThrowOnError extends boolean = boolean,\n  TResponse = unknown,\n> = OmitKeys<RequestOptions<TResponse, ThrowOnError>, 'body' | 'path' | 'query' | 'url'> &\n  ([TData] extends [never] ? unknown : Omit<TData, 'url'>);\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/react-query/axios/client/utils.gen.ts",
    "content": "// 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 {\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\nconst checkForExistence = (\n  options: Pick<RequestOptions, 'auth' | 'query'> & {\n    headers: Record<any, unknown>;\n  },\n  name?: string,\n): boolean => {\n  if (!name) {\n    return false;\n  }\n  if (name in options.headers || options.query?.[name]) {\n    return true;\n  }\n  if (\n    'Cookie' in options.headers &&\n    options.headers['Cookie'] &&\n    typeof options.headers['Cookie'] === 'string'\n  ) {\n    return options.headers['Cookie'].includes(`${name}=`);\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: Record<any, unknown>;\n  }) => {\n  for (const auth of security) {\n    if (checkForExistence(options, auth.name)) {\n      continue;\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        const value = `${name}=${token}`;\n        if ('Cookie' in options.headers && options.headers['Cookie']) {\n          options.headers['Cookie'] = `${options.headers['Cookie']}; ${value}`;\n        } else {\n          options.headers['Cookie'] = value;\n        }\n        break;\n      }\n      case 'header':\n      default:\n        options.headers[name] = token;\n        break;\n    }\n  }\n};\n\nexport const buildUrl: Client['buildUrl'] = (options) => {\n  const instanceBaseUrl = options.axios?.defaults?.baseURL;\n\n  const baseUrl =\n    !!options.baseURL && typeof options.baseURL === 'string' ? options.baseURL : instanceBaseUrl;\n\n  return getUrl({\n    baseUrl: baseUrl as string,\n    path: options.path,\n    // let `paramsSerializer()` handle query params if it exists\n    query: !options.paramsSerializer ? options.query : undefined,\n    querySerializer:\n      typeof options.querySerializer === 'function'\n        ? options.querySerializer\n        : createQuerySerializer(options.querySerializer),\n    url: options.url,\n  });\n};\n\nexport const mergeConfigs = (a: Config, b: Config): Config => {\n  const config = { ...a, ...b };\n  config.headers = mergeHeaders(a.headers, b.headers);\n  return config;\n};\n\n/**\n * Special Axios headers keywords allowing to set headers by request method.\n */\nexport const axiosHeadersKeywords = [\n  'common',\n  'delete',\n  'get',\n  'head',\n  'patch',\n  'post',\n  'put',\n] as const;\n\nexport const mergeHeaders = (\n  ...headers: Array<Required<Config>['headers'] | undefined>\n): Record<any, unknown> => {\n  const mergedHeaders: Record<any, unknown> = {};\n  for (const header of headers) {\n    if (!header || typeof header !== 'object') {\n      continue;\n    }\n\n    const iterator = Object.entries(header);\n\n    for (const [key, value] of iterator) {\n      if (\n        axiosHeadersKeywords.includes(key as (typeof axiosHeadersKeywords)[number]) &&\n        typeof value === 'object'\n      ) {\n        mergedHeaders[key] = {\n          ...(mergedHeaders[key] as Record<any, unknown>),\n          ...value,\n        };\n      } else if (value === null) {\n        delete mergedHeaders[key];\n      } else if (Array.isArray(value)) {\n        for (const v of value) {\n          // @ts-expect-error\n          mergedHeaders[key] = [...(mergedHeaders[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[key] = typeof value === 'object' ? JSON.stringify(value) : (value as string);\n      }\n    }\n  }\n  return mergedHeaders;\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  ...override,\n});\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/react-query/axios/client.gen.ts",
    "content": "// 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: 'http://localhost:3000/base' }));\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/react-query/axios/core/auth.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/react-query/axios/core/bodySerializer.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/react-query/axios/core/params.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/react-query/axios/core/pathSerializer.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/react-query/axios/core/queryKeySerializer.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\n/**\n * JSON-friendly union that mirrors what Pinia Colada can hash.\n */\nexport type JsonValue =\n  | null\n  | string\n  | number\n  | boolean\n  | JsonValue[]\n  | { [key: string]: JsonValue };\n\n/**\n * Replacer that converts non-JSON values (bigint, Date, etc.) to safe substitutes.\n */\nexport const queryKeyJsonReplacer = (_key: string, value: unknown) => {\n  if (value === undefined || typeof value === 'function' || typeof value === 'symbol') {\n    return undefined;\n  }\n  if (typeof value === 'bigint') {\n    return value.toString();\n  }\n  if (value instanceof Date) {\n    return value.toISOString();\n  }\n  return value;\n};\n\n/**\n * Safely stringifies a value and parses it back into a JsonValue.\n */\nexport const stringifyToJsonValue = (input: unknown): JsonValue | undefined => {\n  try {\n    const json = JSON.stringify(input, queryKeyJsonReplacer);\n    if (json === undefined) {\n      return undefined;\n    }\n    return JSON.parse(json) as JsonValue;\n  } catch {\n    return undefined;\n  }\n};\n\n/**\n * Detects plain objects (including objects with a null prototype).\n */\nconst isPlainObject = (value: unknown): value is Record<string, unknown> => {\n  if (value === null || typeof value !== 'object') {\n    return false;\n  }\n  const prototype = Object.getPrototypeOf(value as object);\n  return prototype === Object.prototype || prototype === null;\n};\n\n/**\n * Turns URLSearchParams into a sorted JSON object for deterministic keys.\n */\nconst serializeSearchParams = (params: URLSearchParams): JsonValue => {\n  const entries = Array.from(params.entries()).sort(([a], [b]) => a.localeCompare(b));\n  const result: Record<string, JsonValue> = {};\n\n  for (const [key, value] of entries) {\n    const existing = result[key];\n    if (existing === undefined) {\n      result[key] = value;\n      continue;\n    }\n\n    if (Array.isArray(existing)) {\n      (existing as string[]).push(value);\n    } else {\n      result[key] = [existing, value];\n    }\n  }\n\n  return result;\n};\n\n/**\n * Normalizes any accepted value into a JSON-friendly shape for query keys.\n */\nexport const serializeQueryKeyValue = (value: unknown): JsonValue | undefined => {\n  if (value === null) {\n    return null;\n  }\n\n  if (typeof value === 'string' || typeof value === 'number' || typeof value === 'boolean') {\n    return value;\n  }\n\n  if (value === undefined || typeof value === 'function' || typeof value === 'symbol') {\n    return undefined;\n  }\n\n  if (typeof value === 'bigint') {\n    return value.toString();\n  }\n\n  if (value instanceof Date) {\n    return value.toISOString();\n  }\n\n  if (Array.isArray(value)) {\n    return stringifyToJsonValue(value);\n  }\n\n  if (typeof URLSearchParams !== 'undefined' && value instanceof URLSearchParams) {\n    return serializeSearchParams(value);\n  }\n\n  if (isPlainObject(value)) {\n    return stringifyToJsonValue(value);\n  }\n\n  return undefined;\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/react-query/axios/core/serverSentEvents.gen.ts",
    "content": "// 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 const 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            // Normalize line endings: CRLF -> LF, then CR -> LF\n            buffer = buffer.replace(/\\r\\n/g, '\\n').replace(/\\r/g, '\\n');\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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/react-query/axios/core/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { Auth, AuthToken } from './auth.gen';\nimport type { BodySerializer, QuerySerializer, QuerySerializerOptions } from './bodySerializer.gen';\n\nexport type HttpMethod =\n  | 'connect'\n  | 'delete'\n  | 'get'\n  | 'head'\n  | 'options'\n  | 'patch'\n  | 'post'\n  | 'put'\n  | 'trace';\n\nexport type Client<\n  RequestFn = never,\n  Config = unknown,\n  MethodFn = never,\n  BuildUrlFn = never,\n  SseFn = never,\n> = {\n  /**\n   * Returns the final request URL.\n   */\n  buildUrl: BuildUrlFn;\n  getConfig: () => Config;\n  request: RequestFn;\n  setConfig: (config: Config) => Config;\n} & {\n  [K in HttpMethod]: MethodFn;\n} & ([SseFn] extends [never] ? { sse?: never } : { sse: { [K in HttpMethod]: SseFn } });\n\nexport interface Config {\n  /**\n   * Auth token or a function returning auth token. The resolved value will be\n   * added to the request payload as defined by its `security` array.\n   */\n  auth?: ((auth: Auth) => Promise<AuthToken> | AuthToken) | AuthToken;\n  /**\n   * A function for serializing request body parameter. By default,\n   * {@link JSON.stringify()} will be used.\n   */\n  bodySerializer?: BodySerializer | null;\n  /**\n   * An object containing any HTTP headers that you want to pre-populate your\n   * `Headers` object with.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/Headers/Headers#init See more}\n   */\n  headers?:\n    | RequestInit['headers']\n    | Record<\n        string,\n        string | number | boolean | (string | number | boolean)[] | null | undefined | unknown\n      >;\n  /**\n   * The request method.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/fetch#method See more}\n   */\n  method?: Uppercase<HttpMethod>;\n  /**\n   * A function for serializing request query parameters. By default, arrays\n   * will be exploded in form style, objects will be exploded in deepObject\n   * style, and reserved characters are percent-encoded.\n   *\n   * This method will have no effect if the native `paramsSerializer()` Axios\n   * API function is used.\n   *\n   * {@link https://swagger.io/docs/specification/serialization/#query View examples}\n   */\n  querySerializer?: QuerySerializer | QuerySerializerOptions;\n  /**\n   * A function validating request data. This is useful if you want to ensure\n   * the request conforms to the desired shape, so it can be safely sent to\n   * the server.\n   */\n  requestValidator?: (data: unknown) => Promise<unknown>;\n  /**\n   * A function transforming response data before it's returned. This is useful\n   * for post-processing data, e.g. converting ISO strings into Date objects.\n   */\n  responseTransformer?: (data: unknown) => Promise<unknown>;\n  /**\n   * A function validating response data. This is useful if you want to ensure\n   * the response conforms to the desired shape, so it can be safely passed to\n   * the transformers and returned to the user.\n   */\n  responseValidator?: (data: unknown) => Promise<unknown>;\n}\n\ntype IsExactlyNeverOrNeverUndefined<T> = [T] extends [never]\n  ? true\n  : [T] extends [never | undefined]\n    ? [undefined] extends [T]\n      ? false\n      : true\n    : false;\n\nexport type OmitNever<T extends Record<string, unknown>> = {\n  [K in keyof T as IsExactlyNeverOrNeverUndefined<T[K]> extends true ? never : K]: T[K];\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/react-query/axios/core/utils.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/react-query/axios/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport { apiVVersionODataControllerCount, callToTestOrderOfParams, callWithDefaultOptionalParameters, callWithDefaultParameters, callWithDescriptions, callWithDuplicateResponses, callWithNoContentResponse, callWithParameters, callWithResponse, callWithResponseAndNoContentResponse, callWithResponses, callWithResultFromHeader, callWithWeirdParameterNames, collectionFormat, complexParams, complexTypes, deleteCallWithoutParametersAndResponse, deleteFoo, deprecatedCall, dummyA, dummyB, duplicateName, duplicateName2, duplicateName3, duplicateName4, export_, fileResponse, fooWow, getApiVbyApiVersionSimpleOperation, getCallWithOptionalParam, getCallWithoutParametersAndResponse, headCallWithoutParametersAndResponse, import_, multipartRequest, multipartResponse, nonAsciiæøåÆøÅöôêÊ字符串, type Options, optionsCallWithoutParametersAndResponse, patchApiVbyApiVersionNoTag, patchCallWithoutParametersAndResponse, postApiVbyApiVersionFormData, postApiVbyApiVersionRequestBody, postCallWithOptionalParam, postCallWithoutParametersAndResponse, putCallWithoutParametersAndResponse, putWithFormUrlEncoded, testErrorCode, types, uploadFile } from './sdk.gen';\nexport type { _3eNum1Период, _400, AdditionalPropertiesIntegerIssue, AdditionalPropertiesUnknownIssue, AdditionalPropertiesUnknownIssue2, AdditionalPropertiesUnknownIssue3, AdditionalPropertiesUnknownIssueWritable, AnyOfAnyAndNull, AnyOfArrays, ApiVVersionODataControllerCountData, ApiVVersionODataControllerCountResponse, ApiVVersionODataControllerCountResponses, ArrayWithAnyOfProperties, ArrayWithArray, ArrayWithBooleans, ArrayWithNumbers, ArrayWithProperties, ArrayWithReferences, ArrayWithStrings, CallToTestOrderOfParamsData, CallWithDefaultOptionalParametersData, CallWithDefaultParametersData, CallWithDescriptionsData, CallWithDuplicateResponsesData, CallWithDuplicateResponsesError, CallWithDuplicateResponsesErrors, CallWithDuplicateResponsesResponse, CallWithDuplicateResponsesResponses, CallWithNoContentResponseData, CallWithNoContentResponseResponse, CallWithNoContentResponseResponses, CallWithParametersData, CallWithResponseAndNoContentResponseData, CallWithResponseAndNoContentResponseResponse, CallWithResponseAndNoContentResponseResponses, CallWithResponseData, CallWithResponseResponse, CallWithResponseResponses, CallWithResponsesData, CallWithResponsesError, CallWithResponsesErrors, CallWithResponsesResponse, CallWithResponsesResponses, CallWithResultFromHeaderData, CallWithResultFromHeaderErrors, CallWithResultFromHeaderResponses, CallWithWeirdParameterNamesData, CamelCaseCommentWithBreaks, CharactersInDescription, ClientOptions, CollectionFormatData, CommentWithBackticks, CommentWithBackticksAndQuotes, CommentWithBreaks, CommentWithExpressionPlaceholders, CommentWithQuotes, CommentWithReservedCharacters, CommentWithSlashes, ComplexParamsData, ComplexParamsResponse, ComplexParamsResponses, ComplexTypesData, ComplexTypesErrors, ComplexTypesResponse, ComplexTypesResponses, CompositionBaseModel, CompositionExtendedModel, CompositionWithAllOfAndNullable, CompositionWithAnyOf, CompositionWithAnyOfAndNullable, CompositionWithAnyOfAnonymous, CompositionWithNestedAnyAndTypeNull, CompositionWithNestedAnyOfAndNull, CompositionWithOneOf, CompositionWithOneOfAndComplexArrayDictionary, CompositionWithOneOfAndNullable, CompositionWithOneOfAndProperties, CompositionWithOneOfAndSimpleArrayDictionary, CompositionWithOneOfAndSimpleDictionary, CompositionWithOneOfAnonymous, CompositionWithOneOfDiscriminator, ConstValue, Default, DeleteCallWithoutParametersAndResponseData, DeleteFooData, DeleteFooData2, DeleteFooData3, DeprecatedCallData, DeprecatedModel, DictionaryWithArray, DictionaryWithDictionary, DictionaryWithProperties, DictionaryWithPropertiesAndAdditionalProperties, DictionaryWithReference, DictionaryWithString, DummyAData, DummyAResponse, DummyAResponses, DummyBData, DummyBResponse, DummyBResponses, DuplicateName2Data, DuplicateName3Data, DuplicateName4Data, DuplicateNameData, EnumFromDescription, EnumWithExtensions, EnumWithNumbers, EnumWithReplacedCharacters, EnumWithStrings, EnumWithXEnumNames, ExportData, ExternalRefA, ExternalRefB, ExternalSharedModel, File, FileResponseData, FileResponseResponse, FileResponseResponses, FileWritable, FooWowData, FooWowResponses, FreeFormObjectWithAdditionalPropertiesEqEmptyObject, FreeFormObjectWithAdditionalPropertiesEqTrue, FreeFormObjectWithoutAdditionalProperties, GenericSchemaDuplicateIssue1SystemBoolean, GenericSchemaDuplicateIssue1SystemBooleanWritable, GenericSchemaDuplicateIssue1SystemString, GenericSchemaDuplicateIssue1SystemStringWritable, GetApiVbyApiVersionSimpleOperationData, GetApiVbyApiVersionSimpleOperationError, GetApiVbyApiVersionSimpleOperationErrors, GetApiVbyApiVersionSimpleOperationResponse, GetApiVbyApiVersionSimpleOperationResponses, GetCallWithOptionalParamData, GetCallWithoutParametersAndResponseData, HeadCallWithoutParametersAndResponseData, Import, ImportData, ImportResponse, ImportResponses, IoK8sApimachineryPkgApisMetaV1DeleteOptions, IoK8sApimachineryPkgApisMetaV1Preconditions, ModelCircle, ModelFromZendesk, ModelSquare, ModelThatExtends, ModelThatExtendsExtends, ModelWithAdditionalPropertiesEqTrue, ModelWithAdditionalPropertiesRef, ModelWithAnyOfConstantSizeArray, ModelWithAnyOfConstantSizeArrayAndIntersect, ModelWithAnyOfConstantSizeArrayNullable, ModelWithAnyOfConstantSizeArrayWithNSizeAndOptions, ModelWithAnyOfConstantSizeArrayWithNSizeAndOptionsWritable, ModelWithArray, ModelWithArrayReadOnlyAndWriteOnly, ModelWithArrayReadOnlyAndWriteOnlyWritable, ModelWithBackticksInDescription, ModelWithBoolean, ModelWithCircularReference, ModelWithConst, ModelWithConstantSizeArray, ModelWithDictionary, ModelWithDuplicateImports, ModelWithDuplicateProperties, ModelWithEnum, ModelWithEnumFromDescription, ModelWithEnumWithHyphen, ModelWithInteger, ModelWithNestedArrayEnums, ModelWithNestedArrayEnumsData, ModelWithNestedArrayEnumsDataBar, ModelWithNestedArrayEnumsDataFoo, ModelWithNestedCompositionEnums, ModelWithNestedEnums, ModelWithNestedProperties, ModelWithNullableObject, ModelWithNullableString, ModelWithNumericEnumUnion, ModelWithOneOfAndProperties, ModelWithOneOfEnum, ModelWithOrderedProperties, ModelWithPattern, ModelWithPatternWritable, ModelWithPrefixItemsConstantSizeArray, ModelWithProperties, ModelWithPropertiesWritable, ModelWithReadOnlyAndWriteOnly, ModelWithReadOnlyAndWriteOnlyWritable, ModelWithReference, ModelWithReferenceWritable, ModelWithString, ModelWithStringError, MultipartRequestData, MultipartResponseData, MultipartResponseResponse, MultipartResponseResponses, NestedAnyOfArraysNullable, NonAsciiæøåÆøÅöôêÊ字符串Data, NonAsciiæøåÆøÅöôêÊ字符串Response, NonAsciiæøåÆøÅöôêÊ字符串Responses, NonAsciiStringæøåÆøÅöôêÊ字符串, NullableObject, OneOfAllOfIssue, OneOfAllOfIssueWritable, OptionsCallWithoutParametersAndResponseData, Pageable, ParameterSimpleParameterUnused, PatchApiVbyApiVersionNoTagData, PatchApiVbyApiVersionNoTagResponses, PatchCallWithoutParametersAndResponseData, PostApiVbyApiVersionFormDataData, PostApiVbyApiVersionRequestBodyData, PostCallWithOptionalParamData, PostCallWithOptionalParamResponse, PostCallWithOptionalParamResponses, PostCallWithoutParametersAndResponseData, PostServiceWithEmptyTagResponse, PostServiceWithEmptyTagResponse2, PutCallWithoutParametersAndResponseData, PutWithFormUrlEncodedData, SchemaWithFormRestrictedKeys, SimpleBoolean, SimpleFile, SimpleFormData, SimpleInteger, SimpleParameter, SimpleReference, SimpleRequestBody, SimpleString, SimpleStringWithPattern, TestErrorCodeData, TestErrorCodeErrors, TestErrorCodeResponses, TypesData, TypesResponse, TypesResponses, UploadFileData, UploadFileResponse, UploadFileResponses, XFooBar } from './types.gen';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/react-query/axios/sdk.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport { type Client, formDataBodySerializer, type Options as Options2, type TDataShape, urlSearchParamsBodySerializer } from './client';\nimport { client } from './client.gen';\nimport type { ApiVVersionODataControllerCountData, ApiVVersionODataControllerCountResponses, CallToTestOrderOfParamsData, CallWithDefaultOptionalParametersData, CallWithDefaultParametersData, CallWithDescriptionsData, CallWithDuplicateResponsesData, CallWithDuplicateResponsesErrors, CallWithDuplicateResponsesResponses, CallWithNoContentResponseData, CallWithNoContentResponseResponses, CallWithParametersData, CallWithResponseAndNoContentResponseData, CallWithResponseAndNoContentResponseResponses, CallWithResponseData, CallWithResponseResponses, CallWithResponsesData, CallWithResponsesErrors, CallWithResponsesResponses, CallWithResultFromHeaderData, CallWithResultFromHeaderErrors, CallWithResultFromHeaderResponses, CallWithWeirdParameterNamesData, CollectionFormatData, ComplexParamsData, ComplexParamsResponses, ComplexTypesData, ComplexTypesErrors, ComplexTypesResponses, DeleteCallWithoutParametersAndResponseData, DeleteFooData3, DeprecatedCallData, DummyAData, DummyAResponses, DummyBData, DummyBResponses, DuplicateName2Data, DuplicateName3Data, DuplicateName4Data, DuplicateNameData, ExportData, FileResponseData, FileResponseResponses, FooWowData, FooWowResponses, GetApiVbyApiVersionSimpleOperationData, GetApiVbyApiVersionSimpleOperationErrors, GetApiVbyApiVersionSimpleOperationResponses, GetCallWithOptionalParamData, GetCallWithoutParametersAndResponseData, HeadCallWithoutParametersAndResponseData, ImportData, ImportResponses, MultipartRequestData, MultipartResponseData, MultipartResponseResponses, NonAsciiæøåÆøÅöôêÊ字符串Data, NonAsciiæøåÆøÅöôêÊ字符串Responses, OptionsCallWithoutParametersAndResponseData, PatchApiVbyApiVersionNoTagData, PatchApiVbyApiVersionNoTagResponses, PatchCallWithoutParametersAndResponseData, PostApiVbyApiVersionFormDataData, PostApiVbyApiVersionRequestBodyData, PostCallWithOptionalParamData, PostCallWithOptionalParamResponses, PostCallWithoutParametersAndResponseData, PutCallWithoutParametersAndResponseData, PutWithFormUrlEncodedData, TestErrorCodeData, TestErrorCodeErrors, TestErrorCodeResponses, TypesData, TypesResponses, UploadFileData, UploadFileResponses } from './types.gen';\n\nexport type Options<TData extends TDataShape = TDataShape, ThrowOnError extends boolean = boolean> = Options2<TData, ThrowOnError> & {\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\nexport const export_ = <ThrowOnError extends boolean = false>(options?: Options<ExportData, ThrowOnError>) => (options?.client ?? client).get<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/no+tag', ...options });\n\nexport const patchApiVbyApiVersionNoTag = <ThrowOnError extends boolean = false>(options?: Options<PatchApiVbyApiVersionNoTagData, ThrowOnError>) => (options?.client ?? client).patch<PatchApiVbyApiVersionNoTagResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/no+tag', ...options });\n\nexport const import_ = <ThrowOnError extends boolean = false>(options: Options<ImportData, ThrowOnError>) => (options.client ?? client).post<ImportResponses, unknown, ThrowOnError>({\n    responseType: 'json',\n    url: '/api/v{api-version}/no+tag',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options.headers\n    }\n});\n\nexport const fooWow = <ThrowOnError extends boolean = false>(options?: Options<FooWowData, ThrowOnError>) => (options?.client ?? client).put<FooWowResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/no+tag', ...options });\n\nexport const apiVVersionODataControllerCount = <ThrowOnError extends boolean = false>(options?: Options<ApiVVersionODataControllerCountData, ThrowOnError>) => (options?.client ?? client).get<ApiVVersionODataControllerCountResponses, unknown, ThrowOnError>({\n    responseType: 'json',\n    url: '/api/v{api-version}/simple/$count',\n    ...options\n});\n\nexport const getApiVbyApiVersionSimpleOperation = <ThrowOnError extends boolean = false>(options: Options<GetApiVbyApiVersionSimpleOperationData, ThrowOnError>) => (options.client ?? client).get<GetApiVbyApiVersionSimpleOperationResponses, GetApiVbyApiVersionSimpleOperationErrors, ThrowOnError>({\n    responseType: 'json',\n    url: '/api/v{api-version}/simple:operation',\n    ...options\n});\n\nexport const deleteCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<DeleteCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).delete<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const getCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<GetCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).get<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const headCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<HeadCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).head<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const optionsCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<OptionsCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).options<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const patchCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<PatchCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).patch<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const postCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<PostCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).post<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const putCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<PutCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).put<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const deleteFoo = <ThrowOnError extends boolean = false>(options: Options<DeleteFooData3, ThrowOnError>) => (options.client ?? client).delete<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/foo/{foo_param}/bar/{BarParam}', ...options });\n\nexport const callWithDescriptions = <ThrowOnError extends boolean = false>(options?: Options<CallWithDescriptionsData, ThrowOnError>) => (options?.client ?? client).post<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/descriptions', ...options });\n\n/**\n * @deprecated\n */\nexport const deprecatedCall = <ThrowOnError extends boolean = false>(options: Options<DeprecatedCallData, ThrowOnError>) => (options.client ?? client).post<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/parameters/deprecated', ...options });\n\nexport const callWithParameters = <ThrowOnError extends boolean = false>(options: Options<CallWithParametersData, ThrowOnError>) => (options.client ?? client).post<unknown, unknown, ThrowOnError>({\n    url: '/api/v{api-version}/parameters/{parameterPath}',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options.headers\n    }\n});\n\nexport const callWithWeirdParameterNames = <ThrowOnError extends boolean = false>(options: Options<CallWithWeirdParameterNamesData, ThrowOnError>) => (options.client ?? client).post<unknown, unknown, ThrowOnError>({\n    url: '/api/v{api-version}/parameters/{parameter.path.1}/{parameter-path-2}/{PARAMETER-PATH-3}',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options.headers\n    }\n});\n\nexport const getCallWithOptionalParam = <ThrowOnError extends boolean = false>(options: Options<GetCallWithOptionalParamData, ThrowOnError>) => (options.client ?? client).get<unknown, unknown, ThrowOnError>({\n    url: '/api/v{api-version}/parameters',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options.headers\n    }\n});\n\nexport const postCallWithOptionalParam = <ThrowOnError extends boolean = false>(options: Options<PostCallWithOptionalParamData, ThrowOnError>) => (options.client ?? client).post<PostCallWithOptionalParamResponses, unknown, ThrowOnError>({\n    responseType: 'json',\n    url: '/api/v{api-version}/parameters',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options.headers\n    }\n});\n\nexport const postApiVbyApiVersionRequestBody = <ThrowOnError extends boolean = false>(options?: Options<PostApiVbyApiVersionRequestBodyData, ThrowOnError>) => (options?.client ?? client).post<unknown, unknown, ThrowOnError>({\n    url: '/api/v{api-version}/requestBody',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options?.headers\n    }\n});\n\nexport const postApiVbyApiVersionFormData = <ThrowOnError extends boolean = false>(options?: Options<PostApiVbyApiVersionFormDataData, ThrowOnError>) => (options?.client ?? client).post<unknown, unknown, ThrowOnError>({\n    ...formDataBodySerializer,\n    url: '/api/v{api-version}/formData',\n    ...options,\n    headers: {\n        'Content-Type': null,\n        ...options?.headers\n    }\n});\n\nexport const callWithDefaultParameters = <ThrowOnError extends boolean = false>(options?: Options<CallWithDefaultParametersData, ThrowOnError>) => (options?.client ?? client).get<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/defaults', ...options });\n\nexport const callWithDefaultOptionalParameters = <ThrowOnError extends boolean = false>(options?: Options<CallWithDefaultOptionalParametersData, ThrowOnError>) => (options?.client ?? client).post<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/defaults', ...options });\n\nexport const callToTestOrderOfParams = <ThrowOnError extends boolean = false>(options: Options<CallToTestOrderOfParamsData, ThrowOnError>) => (options.client ?? client).put<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/defaults', ...options });\n\nexport const duplicateName = <ThrowOnError extends boolean = false>(options?: Options<DuplicateNameData, ThrowOnError>) => (options?.client ?? client).delete<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/duplicate', ...options });\n\nexport const duplicateName2 = <ThrowOnError extends boolean = false>(options?: Options<DuplicateName2Data, ThrowOnError>) => (options?.client ?? client).get<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/duplicate', ...options });\n\nexport const duplicateName3 = <ThrowOnError extends boolean = false>(options?: Options<DuplicateName3Data, ThrowOnError>) => (options?.client ?? client).post<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/duplicate', ...options });\n\nexport const duplicateName4 = <ThrowOnError extends boolean = false>(options?: Options<DuplicateName4Data, ThrowOnError>) => (options?.client ?? client).put<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/duplicate', ...options });\n\nexport const callWithNoContentResponse = <ThrowOnError extends boolean = false>(options?: Options<CallWithNoContentResponseData, ThrowOnError>) => (options?.client ?? client).get<CallWithNoContentResponseResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/no-content', ...options });\n\nexport const callWithResponseAndNoContentResponse = <ThrowOnError extends boolean = false>(options?: Options<CallWithResponseAndNoContentResponseData, ThrowOnError>) => (options?.client ?? client).get<CallWithResponseAndNoContentResponseResponses, unknown, ThrowOnError>({\n    responseType: 'json',\n    url: '/api/v{api-version}/multiple-tags/response-and-no-content',\n    ...options\n});\n\nexport const dummyA = <ThrowOnError extends boolean = false>(options?: Options<DummyAData, ThrowOnError>) => (options?.client ?? client).get<DummyAResponses, unknown, ThrowOnError>({\n    responseType: 'json',\n    url: '/api/v{api-version}/multiple-tags/a',\n    ...options\n});\n\nexport const dummyB = <ThrowOnError extends boolean = false>(options?: Options<DummyBData, ThrowOnError>) => (options?.client ?? client).get<DummyBResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/multiple-tags/b', ...options });\n\nexport const callWithResponse = <ThrowOnError extends boolean = false>(options?: Options<CallWithResponseData, ThrowOnError>) => (options?.client ?? client).get<CallWithResponseResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/response', ...options });\n\nexport const callWithDuplicateResponses = <ThrowOnError extends boolean = false>(options?: Options<CallWithDuplicateResponsesData, ThrowOnError>) => (options?.client ?? client).post<CallWithDuplicateResponsesResponses, CallWithDuplicateResponsesErrors, ThrowOnError>({\n    responseType: 'json',\n    url: '/api/v{api-version}/response',\n    ...options\n});\n\nexport const callWithResponses = <ThrowOnError extends boolean = false>(options?: Options<CallWithResponsesData, ThrowOnError>) => (options?.client ?? client).put<CallWithResponsesResponses, CallWithResponsesErrors, ThrowOnError>({\n    responseType: 'json',\n    url: '/api/v{api-version}/response',\n    ...options\n});\n\nexport const collectionFormat = <ThrowOnError extends boolean = false>(options: Options<CollectionFormatData, ThrowOnError>) => (options.client ?? client).get<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/collectionFormat', ...options });\n\nexport const types = <ThrowOnError extends boolean = false>(options: Options<TypesData, ThrowOnError>) => (options.client ?? client).get<TypesResponses, unknown, ThrowOnError>({\n    responseType: 'json',\n    url: '/api/v{api-version}/types',\n    ...options\n});\n\nexport const uploadFile = <ThrowOnError extends boolean = false>(options: Options<UploadFileData, ThrowOnError>) => (options.client ?? client).post<UploadFileResponses, unknown, ThrowOnError>({\n    ...urlSearchParamsBodySerializer,\n    responseType: 'json',\n    url: '/api/v{api-version}/upload',\n    ...options,\n    headers: {\n        'Content-Type': 'application/x-www-form-urlencoded',\n        ...options.headers\n    }\n});\n\nexport const fileResponse = <ThrowOnError extends boolean = false>(options: Options<FileResponseData, ThrowOnError>) => (options.client ?? client).get<FileResponseResponses, unknown, ThrowOnError>({\n    responseType: 'blob',\n    url: '/api/v{api-version}/file/{id}',\n    ...options\n});\n\nexport const complexTypes = <ThrowOnError extends boolean = false>(options: Options<ComplexTypesData, ThrowOnError>) => (options.client ?? client).get<ComplexTypesResponses, ComplexTypesErrors, ThrowOnError>({\n    querySerializer: { parameters: { parameterObject: { object: { style: 'form' } } } },\n    responseType: 'json',\n    url: '/api/v{api-version}/complex',\n    ...options\n});\n\nexport const multipartResponse = <ThrowOnError extends boolean = false>(options?: Options<MultipartResponseData, ThrowOnError>) => (options?.client ?? client).get<MultipartResponseResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/multipart', ...options });\n\nexport const multipartRequest = <ThrowOnError extends boolean = false>(options?: Options<MultipartRequestData, ThrowOnError>) => (options?.client ?? client).post<unknown, unknown, ThrowOnError>({\n    ...formDataBodySerializer,\n    url: '/api/v{api-version}/multipart',\n    ...options,\n    headers: {\n        'Content-Type': null,\n        ...options?.headers\n    }\n});\n\nexport const complexParams = <ThrowOnError extends boolean = false>(options: Options<ComplexParamsData, ThrowOnError>) => (options.client ?? client).put<ComplexParamsResponses, unknown, ThrowOnError>({\n    responseType: 'json',\n    url: '/api/v{api-version}/complex/{id}',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json-patch+json',\n        ...options.headers\n    }\n});\n\nexport const callWithResultFromHeader = <ThrowOnError extends boolean = false>(options?: Options<CallWithResultFromHeaderData, ThrowOnError>) => (options?.client ?? client).post<CallWithResultFromHeaderResponses, CallWithResultFromHeaderErrors, ThrowOnError>({ url: '/api/v{api-version}/header', ...options });\n\nexport const testErrorCode = <ThrowOnError extends boolean = false>(options: Options<TestErrorCodeData, ThrowOnError>) => (options.client ?? client).post<TestErrorCodeResponses, TestErrorCodeErrors, ThrowOnError>({ url: '/api/v{api-version}/error', ...options });\n\nexport const nonAsciiæøåÆøÅöôêÊ字符串 = <ThrowOnError extends boolean = false>(options: Options<NonAsciiæøåÆøÅöôêÊ字符串Data, ThrowOnError>) => (options.client ?? client).post<NonAsciiæøåÆøÅöôêÊ字符串Responses, unknown, ThrowOnError>({\n    responseType: 'json',\n    url: '/api/v{api-version}/non-ascii-æøåÆØÅöôêÊ字符串',\n    ...options\n});\n\n/**\n * Login User\n */\nexport const putWithFormUrlEncoded = <ThrowOnError extends boolean = false>(options: Options<PutWithFormUrlEncodedData, ThrowOnError>) => (options.client ?? client).put<unknown, unknown, ThrowOnError>({\n    ...urlSearchParamsBodySerializer,\n    url: '/api/v{api-version}/non-ascii-æøåÆØÅöôêÊ字符串',\n    ...options,\n    headers: {\n        'Content-Type': 'application/x-www-form-urlencoded',\n        ...options.headers\n    }\n});\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/react-query/axios/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type ClientOptions = {\n    baseURL: 'http://localhost:3000/base' | (string & {});\n};\n\n/**\n * Model with number-only name\n */\nexport type _400 = string;\n\n/**\n * External ref to shared model (A)\n */\nexport type ExternalRefA = ExternalSharedModel;\n\n/**\n * External ref to shared model (B)\n */\nexport type ExternalRefB = ExternalSharedModel;\n\n/**\n * Testing multiline comments in string: First line\n * Second line\n *\n * Fourth line\n */\nexport type CamelCaseCommentWithBreaks = number;\n\n/**\n * Testing multiline comments in string: First line\n * Second line\n *\n * Fourth line\n */\nexport type CommentWithBreaks = number;\n\n/**\n * Testing backticks in string: `backticks` and ```multiple backticks``` should work\n */\nexport type CommentWithBackticks = number;\n\n/**\n * Testing backticks and quotes in string: `backticks`, 'quotes', \"double quotes\" and ```multiple backticks``` should work\n */\nexport type CommentWithBackticksAndQuotes = number;\n\n/**\n * Testing slashes in string: \\backwards\\\\\\ and /forwards/// should work\n */\nexport type CommentWithSlashes = number;\n\n/**\n * Testing expression placeholders in string: ${expression} should work\n */\nexport type CommentWithExpressionPlaceholders = number;\n\n/**\n * Testing quotes in string: 'single quote''' and \"double quotes\"\"\" should work\n */\nexport type CommentWithQuotes = number;\n\n/**\n * Testing reserved characters in string: * inline * and ** inline ** should work\n */\nexport type CommentWithReservedCharacters = number;\n\n/**\n * This is a simple number\n */\nexport type SimpleInteger = number;\n\n/**\n * This is a simple boolean\n */\nexport type SimpleBoolean = boolean;\n\n/**\n * This is a simple string\n */\nexport type SimpleString = string;\n\n/**\n * A string with non-ascii (unicode) characters valid in typescript identifiers (æøåÆØÅöÔèÈ字符串)\n */\nexport type NonAsciiStringæøåÆøÅöôêÊ字符串 = string;\n\n/**\n * This is a simple file\n */\nexport type SimpleFile = Blob | File;\n\n/**\n * This is a simple reference\n */\nexport type SimpleReference = ModelWithString;\n\n/**\n * This is a simple string\n */\nexport type SimpleStringWithPattern = string | null;\n\n/**\n * This is a simple enum with strings\n */\nexport type EnumWithStrings = 'Success' | 'Warning' | 'Error' | '\\'Single Quote\\'' | '\"Double Quotes\"' | 'Non-ascii: øæåôöØÆÅÔÖ字符串';\n\nexport type EnumWithReplacedCharacters = '\\'Single Quote\\'' | '\"Double Quotes\"' | 'øæåôöØÆÅÔÖ字符串' | 3.1 | '';\n\n/**\n * This is a simple enum with numbers\n */\nexport type EnumWithNumbers = 1 | 2 | 3 | 1.1 | 1.2 | 1.3 | 100 | 200 | 300 | -100 | -200 | -300 | -1.1 | -1.2 | -1.3;\n\n/**\n * Success=1,Warning=2,Error=3\n */\nexport type EnumFromDescription = number;\n\n/**\n * This is a simple enum with numbers\n */\nexport type EnumWithExtensions = 200 | 400 | 500;\n\nexport type EnumWithXEnumNames = 0 | 1 | 2;\n\n/**\n * This is a simple array with numbers\n */\nexport type ArrayWithNumbers = Array<number>;\n\n/**\n * This is a simple array with booleans\n */\nexport type ArrayWithBooleans = Array<boolean>;\n\n/**\n * This is a simple array with strings\n */\nexport type ArrayWithStrings = Array<string>;\n\n/**\n * This is a simple array with references\n */\nexport type ArrayWithReferences = Array<ModelWithString>;\n\n/**\n * This is a simple array containing an array\n */\nexport type ArrayWithArray = Array<Array<ModelWithString>>;\n\n/**\n * This is a simple array with properties\n */\nexport type ArrayWithProperties = Array<{\n    '16x16'?: CamelCaseCommentWithBreaks;\n    bar?: string;\n}>;\n\n/**\n * This is a simple array with any of properties\n */\nexport type ArrayWithAnyOfProperties = Array<{\n    foo?: string;\n} | {\n    bar?: string;\n}>;\n\nexport type AnyOfAnyAndNull = {\n    data?: unknown | null;\n};\n\n/**\n * This is a simple array with any of properties\n */\nexport type AnyOfArrays = {\n    results?: Array<{\n        foo?: string;\n    } | {\n        bar?: string;\n    }>;\n};\n\n/**\n * This is a string dictionary\n */\nexport type DictionaryWithString = {\n    [key: string]: string;\n};\n\nexport type DictionaryWithPropertiesAndAdditionalProperties = {\n    foo?: number;\n    bar?: boolean;\n    [key: string]: string | number | boolean | undefined;\n};\n\n/**\n * This is a string reference\n */\nexport type DictionaryWithReference = {\n    [key: string]: ModelWithString;\n};\n\n/**\n * This is a complex dictionary\n */\nexport type DictionaryWithArray = {\n    [key: string]: Array<ModelWithString>;\n};\n\n/**\n * This is a string dictionary\n */\nexport type DictionaryWithDictionary = {\n    [key: string]: {\n        [key: string]: string;\n    };\n};\n\n/**\n * This is a complex dictionary\n */\nexport type DictionaryWithProperties = {\n    [key: string]: {\n        foo?: string;\n        bar?: string;\n    };\n};\n\n/**\n * This is a model with one number property\n */\nexport type ModelWithInteger = {\n    /**\n     * This is a simple number property\n     */\n    prop?: number;\n};\n\n/**\n * This is a model with one boolean property\n */\nexport type ModelWithBoolean = {\n    /**\n     * This is a simple boolean property\n     */\n    prop?: boolean;\n};\n\n/**\n * This is a model with one string property\n */\nexport type ModelWithString = {\n    /**\n     * This is a simple string property\n     */\n    prop?: string;\n};\n\n/**\n * This is a model with one string property\n */\nexport type ModelWithStringError = {\n    /**\n     * This is a simple string property\n     */\n    prop?: string;\n};\n\n/**\n * `Comment` or `VoiceComment`. The JSON object for adding voice comments to tickets is different. See [Adding voice comments to tickets](/documentation/ticketing/managing-tickets/adding-voice-comments-to-tickets)\n */\nexport type ModelFromZendesk = string;\n\n/**\n * This is a model with one string property\n */\nexport type ModelWithNullableString = {\n    /**\n     * This is a simple string property\n     */\n    nullableProp1?: string | null;\n    /**\n     * This is a simple string property\n     */\n    nullableRequiredProp1: string | null;\n    /**\n     * This is a simple string property\n     */\n    nullableProp2?: string | null;\n    /**\n     * This is a simple string property\n     */\n    nullableRequiredProp2: string | null;\n    /**\n     * This is a simple enum with strings\n     */\n    'foo_bar-enum'?: 'Success' | 'Warning' | 'Error' | 'ØÆÅ字符串';\n};\n\n/**\n * This is a model with one enum\n */\nexport type ModelWithEnum = {\n    /**\n     * This is a simple enum with strings\n     */\n    'foo_bar-enum'?: 'Success' | 'Warning' | 'Error' | 'ØÆÅ字符串';\n    /**\n     * These are the HTTP error code enums\n     */\n    statusCode?: '100' | '200 FOO' | '300 FOO_BAR' | '400 foo-bar' | '500 foo.bar' | '600 foo&bar';\n    /**\n     * Simple boolean enum\n     */\n    bool?: true;\n};\n\n/**\n * This is a model with one enum with escaped name\n */\nexport type ModelWithEnumWithHyphen = {\n    /**\n     * Foo-Bar-Baz-Qux\n     */\n    'foo-bar-baz-qux'?: '3.0';\n};\n\n/**\n * This is a model with one enum\n */\nexport type ModelWithEnumFromDescription = {\n    /**\n     * Success=1,Warning=2,Error=3\n     */\n    test?: number;\n};\n\n/**\n * This is a model with nested enums\n */\nexport type ModelWithNestedEnums = {\n    dictionaryWithEnum?: {\n        [key: string]: 'Success' | 'Warning' | 'Error';\n    };\n    dictionaryWithEnumFromDescription?: {\n        [key: string]: number;\n    };\n    arrayWithEnum?: Array<'Success' | 'Warning' | 'Error'>;\n    arrayWithDescription?: Array<number>;\n    /**\n     * This is a simple enum with strings\n     */\n    'foo_bar-enum'?: 'Success' | 'Warning' | 'Error' | 'ØÆÅ字符串';\n};\n\n/**\n * This is a model with one property containing a reference\n */\nexport type ModelWithReference = {\n    prop?: ModelWithProperties;\n};\n\n/**\n * This is a model with one property containing an array\n */\nexport type ModelWithArrayReadOnlyAndWriteOnly = {\n    prop?: Array<ModelWithReadOnlyAndWriteOnly>;\n    propWithFile?: Array<Blob | File>;\n    propWithNumber?: Array<number>;\n};\n\n/**\n * This is a model with one property containing an array\n */\nexport type ModelWithArray = {\n    prop?: Array<ModelWithString>;\n    propWithFile?: Array<Blob | File>;\n    propWithNumber?: Array<number>;\n};\n\n/**\n * This is a model with one property containing a dictionary\n */\nexport type ModelWithDictionary = {\n    prop?: {\n        [key: string]: string;\n    };\n};\n\n/**\n * This is a deprecated model with a deprecated property\n *\n * @deprecated\n */\nexport type DeprecatedModel = {\n    /**\n     * This is a deprecated property\n     *\n     * @deprecated\n     */\n    prop?: string;\n};\n\n/**\n * This is a model with one property containing a circular reference\n */\nexport type ModelWithCircularReference = {\n    prop?: ModelWithCircularReference;\n};\n\n/**\n * This is a model with one property with a 'one of' relationship\n */\nexport type CompositionWithOneOf = {\n    propA?: ModelWithString | ModelWithEnum | ModelWithArray | ModelWithDictionary;\n};\n\n/**\n * This is a model with one property with a 'one of' relationship where the options are not $ref\n */\nexport type CompositionWithOneOfAnonymous = {\n    propA?: {\n        propA?: string;\n    } | string | number;\n};\n\n/**\n * Circle\n */\nexport type ModelCircle = {\n    kind: string;\n    radius?: number;\n};\n\n/**\n * Square\n */\nexport type ModelSquare = {\n    kind: string;\n    sideLength?: number;\n};\n\n/**\n * This is a model with one property with a 'one of' relationship where the options are not $ref\n */\nexport type CompositionWithOneOfDiscriminator = ({\n    kind: 'circle';\n} & ModelCircle) | ({\n    kind: 'square';\n} & ModelSquare);\n\n/**\n * This is a model with one property with a 'any of' relationship\n */\nexport type CompositionWithAnyOf = {\n    propA?: ModelWithString | ModelWithEnum | ModelWithArray | ModelWithDictionary;\n};\n\n/**\n * This is a model with one property with a 'any of' relationship where the options are not $ref\n */\nexport type CompositionWithAnyOfAnonymous = {\n    propA?: {\n        propA?: string;\n    } | string | number;\n};\n\n/**\n * This is a model with nested 'any of' property with a type null\n */\nexport type CompositionWithNestedAnyAndTypeNull = {\n    propA?: Array<ModelWithDictionary | null> | Array<ModelWithArray | null>;\n};\n\nexport type _3eNum1Период = 'Bird' | 'Dog';\n\nexport type ConstValue = 'ConstValue';\n\n/**\n * This is a model with one property with a 'any of' relationship where the options are not $ref\n */\nexport type CompositionWithNestedAnyOfAndNull = {\n    /**\n     * Scopes\n     */\n    propA?: Array<_3eNum1Период | ConstValue> | null;\n};\n\n/**\n * This is a model with one property with a 'one of' relationship\n */\nexport type CompositionWithOneOfAndNullable = {\n    propA?: {\n        boolean?: boolean;\n    } | ModelWithEnum | ModelWithArray | ModelWithDictionary | null;\n};\n\n/**\n * This is a model that contains a simple dictionary within composition\n */\nexport type CompositionWithOneOfAndSimpleDictionary = {\n    propA?: boolean | {\n        [key: string]: number;\n    };\n};\n\n/**\n * This is a model that contains a dictionary of simple arrays within composition\n */\nexport type CompositionWithOneOfAndSimpleArrayDictionary = {\n    propA?: boolean | {\n        [key: string]: Array<boolean>;\n    };\n};\n\n/**\n * This is a model that contains a dictionary of complex arrays (composited) within composition\n */\nexport type CompositionWithOneOfAndComplexArrayDictionary = {\n    propA?: boolean | {\n        [key: string]: Array<number | string>;\n    };\n};\n\n/**\n * This is a model with one property with a 'all of' relationship\n */\nexport type CompositionWithAllOfAndNullable = {\n    propA?: ({\n        boolean?: boolean;\n    } & ModelWithEnum & ModelWithArray & ModelWithDictionary) | null;\n};\n\n/**\n * This is a model with one property with a 'any of' relationship\n */\nexport type CompositionWithAnyOfAndNullable = {\n    propA?: {\n        boolean?: boolean;\n    } | ModelWithEnum | ModelWithArray | ModelWithDictionary | null;\n};\n\n/**\n * This is a base model with two simple optional properties\n */\nexport type CompositionBaseModel = {\n    firstName?: string;\n    lastname?: string;\n};\n\n/**\n * This is a model that extends the base model\n */\nexport type CompositionExtendedModel = CompositionBaseModel & {\n    age: number;\n    firstName: string;\n    lastname: string;\n};\n\n/**\n * This is a model with one nested property\n */\nexport type ModelWithProperties = {\n    required: string;\n    readonly requiredAndReadOnly: string;\n    requiredAndNullable: string | null;\n    string?: string;\n    number?: number;\n    boolean?: boolean;\n    reference?: ModelWithString;\n    'property with space'?: string;\n    default?: string;\n    try?: string;\n    readonly '@namespace.string'?: string;\n    readonly '@namespace.integer'?: number;\n};\n\n/**\n * This is a model with one nested property\n */\nexport type ModelWithNestedProperties = {\n    readonly first: {\n        readonly second: {\n            readonly third: string | null;\n        } | null;\n    } | null;\n};\n\n/**\n * This is a model with duplicated properties\n */\nexport type ModelWithDuplicateProperties = {\n    prop?: ModelWithString;\n};\n\n/**\n * This is a model with ordered properties\n */\nexport type ModelWithOrderedProperties = {\n    zebra?: string;\n    apple?: string;\n    hawaii?: string;\n};\n\n/**\n * This is a model with duplicated imports\n */\nexport type ModelWithDuplicateImports = {\n    propA?: ModelWithString;\n    propB?: ModelWithString;\n    propC?: ModelWithString;\n};\n\n/**\n * This is a model that extends another model\n */\nexport type ModelThatExtends = ModelWithString & {\n    propExtendsA?: string;\n    propExtendsB?: ModelWithString;\n};\n\n/**\n * This is a model that extends another model\n */\nexport type ModelThatExtendsExtends = ModelWithString & ModelThatExtends & {\n    propExtendsC?: string;\n    propExtendsD?: ModelWithString;\n};\n\n/**\n * This is a model that contains a some patterns\n */\nexport type ModelWithPattern = {\n    key: string;\n    name: string;\n    readonly enabled?: boolean;\n    readonly modified?: string;\n    id?: string;\n    text?: string;\n    patternWithSingleQuotes?: string;\n    patternWithNewline?: string;\n    patternWithBacktick?: string;\n    patternWithUnicode?: string;\n};\n\nexport type File = {\n    /**\n     * Id\n     */\n    readonly id?: string;\n    /**\n     * Updated at\n     */\n    readonly updated_at?: string;\n    /**\n     * Created at\n     */\n    readonly created_at?: string;\n    /**\n     * Mime\n     */\n    mime: string;\n    /**\n     * File\n     */\n    readonly file?: string;\n};\n\nexport type Default = {\n    name?: string;\n};\n\nexport type Pageable = {\n    page?: number;\n    size?: number;\n    sort?: Array<string>;\n};\n\n/**\n * This is a free-form object without additionalProperties.\n */\nexport type FreeFormObjectWithoutAdditionalProperties = {\n    [key: string]: unknown;\n};\n\n/**\n * This is a free-form object with additionalProperties: true.\n */\nexport type FreeFormObjectWithAdditionalPropertiesEqTrue = {\n    [key: string]: unknown;\n};\n\n/**\n * This is a free-form object with additionalProperties: {}.\n */\nexport type FreeFormObjectWithAdditionalPropertiesEqEmptyObject = {\n    [key: string]: unknown;\n};\n\nexport type ModelWithConst = {\n    String?: 'String';\n    number?: 0;\n    null?: null;\n    withType?: 'Some string';\n};\n\n/**\n * This is a model with one property and additionalProperties: true\n */\nexport type ModelWithAdditionalPropertiesEqTrue = {\n    /**\n     * This is a simple string property\n     */\n    prop?: string;\n    [key: string]: unknown;\n};\n\nexport type NestedAnyOfArraysNullable = {\n    nullableArray?: Array<string | boolean> | null;\n};\n\nexport type CompositionWithOneOfAndProperties = ({\n    foo: SimpleParameter;\n} | {\n    bar: NonAsciiStringæøåÆøÅöôêÊ字符串;\n}) & {\n    baz: number | null;\n    qux: number;\n};\n\n/**\n * An object that can be null\n */\nexport type NullableObject = {\n    foo?: string;\n} | null;\n\n/**\n * Some % character\n */\nexport type CharactersInDescription = string;\n\nexport type ModelWithNullableObject = {\n    data?: NullableObject;\n};\n\n/**\n * An object with additional properties that can be null (anyOf ref + null)\n */\nexport type ModelWithAdditionalPropertiesRef = {\n    [key: string]: NullableObject | null;\n};\n\nexport type ModelWithOneOfEnum = {\n    foo: 'Bar';\n} | {\n    foo: 'Baz';\n} | {\n    foo: 'Qux';\n} | {\n    content: string;\n    foo: 'Quux';\n} | {\n    content: [\n        string,\n        string\n    ];\n    foo: 'Corge';\n};\n\nexport type ModelWithNestedArrayEnumsDataFoo = 'foo' | 'bar';\n\nexport type ModelWithNestedArrayEnumsDataBar = 'baz' | 'qux';\n\nexport type ModelWithNestedArrayEnumsData = {\n    foo?: Array<ModelWithNestedArrayEnumsDataFoo>;\n    bar?: Array<ModelWithNestedArrayEnumsDataBar>;\n};\n\nexport type ModelWithNestedArrayEnums = {\n    array_strings?: Array<string>;\n    data?: ModelWithNestedArrayEnumsData;\n};\n\nexport type ModelWithNestedCompositionEnums = {\n    foo?: ModelWithNestedArrayEnumsDataFoo;\n};\n\nexport type ModelWithReadOnlyAndWriteOnly = {\n    foo: string;\n    readonly bar: string;\n};\n\nexport type ModelWithConstantSizeArray = [\n    number,\n    number\n];\n\nexport type ModelWithAnyOfConstantSizeArray = [\n    number | string,\n    number | string,\n    number | string\n];\n\nexport type ModelWithPrefixItemsConstantSizeArray = [\n    ModelWithInteger,\n    number | string,\n    string\n];\n\nexport type ModelWithAnyOfConstantSizeArrayNullable = [\n    number | null | string,\n    number | null | string,\n    number | null | string\n];\n\nexport type ModelWithAnyOfConstantSizeArrayWithNSizeAndOptions = [\n    number | Import,\n    number | Import\n];\n\nexport type ModelWithAnyOfConstantSizeArrayAndIntersect = [\n    number & string,\n    number & string\n];\n\nexport type ModelWithNumericEnumUnion = {\n    /**\n     * Период\n     */\n    value?: -10 | -1 | 0 | 1 | 3 | 6 | 12;\n};\n\n/**\n * Some description with `back ticks`\n */\nexport type ModelWithBackticksInDescription = {\n    /**\n     * The template `that` should be used for parsing and importing the contents of the CSV file.\n     *\n     * <br/><p>There is one placeholder currently supported:<ul>     <li><b>${x}</b> - refers to the n-th column in the CSV file, e.g. ${1}, ${2}, ...)</li></ul><p>Example of a correct JSON template:</p>\n     * <pre>\n     * [\n     * {\n     * \"resourceType\": \"Asset\",\n     * \"identifier\": {\n     * \"name\": \"${1}\",\n     * \"domain\": {\n     * \"name\": \"${2}\",\n     * \"community\": {\n     * \"name\": \"Some Community\"\n     * }\n     * }\n     * },\n     * \"attributes\" : {\n     * \"00000000-0000-0000-0000-000000003115\" : [ {\n     * \"value\" : \"${3}\"\n     * } ],\n     * \"00000000-0000-0000-0000-000000000222\" : [ {\n     * \"value\" : \"${4}\"\n     * } ]\n     * }\n     * }\n     * ]\n     * </pre>\n     */\n    template?: string;\n};\n\nexport type ModelWithOneOfAndProperties = (SimpleParameter | NonAsciiStringæøåÆøÅöôêÊ字符串) & {\n    baz: number | null;\n    qux: number;\n};\n\n/**\n * Model used to test deduplication strategy (unused)\n */\nexport type ParameterSimpleParameterUnused = string;\n\n/**\n * Model used to test deduplication strategy\n */\nexport type PostServiceWithEmptyTagResponse = string;\n\n/**\n * Model used to test deduplication strategy\n */\nexport type PostServiceWithEmptyTagResponse2 = string;\n\n/**\n * Model used to test deduplication strategy\n */\nexport type DeleteFooData = string;\n\n/**\n * Model used to test deduplication strategy\n */\nexport type DeleteFooData2 = string;\n\n/**\n * Model with restricted keyword name\n */\nexport type Import = string;\n\nexport type SchemaWithFormRestrictedKeys = {\n    description?: string;\n    'x-enum-descriptions'?: string;\n    'x-enum-varnames'?: string;\n    'x-enumNames'?: string;\n    title?: string;\n    object?: {\n        description?: string;\n        'x-enum-descriptions'?: string;\n        'x-enum-varnames'?: string;\n        'x-enumNames'?: string;\n        title?: string;\n    };\n    array?: Array<{\n        description?: string;\n        'x-enum-descriptions'?: string;\n        'x-enum-varnames'?: string;\n        'x-enumNames'?: string;\n        title?: string;\n    }>;\n};\n\n/**\n * This schema was giving PascalCase transformations a hard time\n */\nexport type IoK8sApimachineryPkgApisMetaV1DeleteOptions = {\n    /**\n     * Must be fulfilled before a deletion is carried out. If not possible, a 409 Conflict status will be returned.\n     */\n    preconditions?: IoK8sApimachineryPkgApisMetaV1Preconditions;\n};\n\n/**\n * This schema was giving PascalCase transformations a hard time\n */\nexport type IoK8sApimachineryPkgApisMetaV1Preconditions = {\n    /**\n     * Specifies the target ResourceVersion\n     */\n    resourceVersion?: string;\n    /**\n     * Specifies the target UID.\n     */\n    uid?: string;\n};\n\nexport type AdditionalPropertiesUnknownIssue = {\n    [key: string]: string | number;\n};\n\nexport type AdditionalPropertiesUnknownIssue2 = {\n    [key: string]: string | number;\n};\n\nexport type AdditionalPropertiesUnknownIssue3 = string & {\n    entries: {\n        [key: string]: AdditionalPropertiesUnknownIssue;\n    };\n};\n\nexport type AdditionalPropertiesIntegerIssue = {\n    value: number;\n    [key: string]: number;\n};\n\nexport type OneOfAllOfIssue = ((ConstValue | GenericSchemaDuplicateIssue1SystemBoolean) & _3eNum1Период) | GenericSchemaDuplicateIssue1SystemString;\n\nexport type GenericSchemaDuplicateIssue1SystemBoolean = {\n    item?: boolean;\n    error?: string | null;\n    readonly hasError?: boolean;\n    data?: {\n        [key: string]: never;\n    };\n};\n\nexport type GenericSchemaDuplicateIssue1SystemString = {\n    item?: string | null;\n    error?: string | null;\n    readonly hasError?: boolean;\n};\n\nexport type ExternalSharedModel = {\n    id: string;\n    name?: string;\n};\n\n/**\n * This is a model with one property containing a reference\n */\nexport type ModelWithReferenceWritable = {\n    prop?: ModelWithPropertiesWritable;\n};\n\n/**\n * This is a model with one property containing an array\n */\nexport type ModelWithArrayReadOnlyAndWriteOnlyWritable = {\n    prop?: Array<ModelWithReadOnlyAndWriteOnlyWritable>;\n    propWithFile?: Array<Blob | File>;\n    propWithNumber?: Array<number>;\n};\n\n/**\n * This is a model with one nested property\n */\nexport type ModelWithPropertiesWritable = {\n    required: string;\n    requiredAndNullable: string | null;\n    string?: string;\n    number?: number;\n    boolean?: boolean;\n    reference?: ModelWithString;\n    'property with space'?: string;\n    default?: string;\n    try?: string;\n};\n\n/**\n * This is a model that contains a some patterns\n */\nexport type ModelWithPatternWritable = {\n    key: string;\n    name: string;\n    id?: string;\n    text?: string;\n    patternWithSingleQuotes?: string;\n    patternWithNewline?: string;\n    patternWithBacktick?: string;\n    patternWithUnicode?: string;\n};\n\nexport type FileWritable = {\n    /**\n     * Mime\n     */\n    mime: string;\n};\n\nexport type ModelWithReadOnlyAndWriteOnlyWritable = {\n    foo: string;\n    baz: string;\n};\n\nexport type ModelWithAnyOfConstantSizeArrayWithNSizeAndOptionsWritable = [\n    number | Import,\n    number | Import\n];\n\nexport type AdditionalPropertiesUnknownIssueWritable = {\n    [key: string]: string | number;\n};\n\nexport type OneOfAllOfIssueWritable = ((ConstValue | GenericSchemaDuplicateIssue1SystemBoolean) & _3eNum1Период) | GenericSchemaDuplicateIssue1SystemString;\n\nexport type GenericSchemaDuplicateIssue1SystemBooleanWritable = {\n    item?: boolean;\n    error?: string | null;\n    data?: {\n        [key: string]: never;\n    };\n};\n\nexport type GenericSchemaDuplicateIssue1SystemStringWritable = {\n    item?: string | null;\n    error?: string | null;\n};\n\n/**\n * This is a reusable parameter\n */\nexport type SimpleParameter = string;\n\n/**\n * Parameter with illegal characters\n */\nexport type XFooBar = ModelWithString;\n\n/**\n * A reusable request body\n */\nexport type SimpleRequestBody = ModelWithString;\n\n/**\n * A reusable request body\n */\nexport type SimpleFormData = ModelWithString;\n\nexport type ExportData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no+tag';\n};\n\nexport type PatchApiVbyApiVersionNoTagData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no+tag';\n};\n\nexport type PatchApiVbyApiVersionNoTagResponses = {\n    /**\n     * OK\n     */\n    default: unknown;\n};\n\nexport type ImportData = {\n    body: ModelWithReadOnlyAndWriteOnlyWritable | ModelWithArrayReadOnlyAndWriteOnlyWritable;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no+tag';\n};\n\nexport type ImportResponses = {\n    /**\n     * Success\n     */\n    200: ModelFromZendesk;\n    /**\n     * Default success response\n     */\n    default: ModelWithReadOnlyAndWriteOnly;\n};\n\nexport type ImportResponse = ImportResponses[keyof ImportResponses];\n\nexport type FooWowData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no+tag';\n};\n\nexport type FooWowResponses = {\n    /**\n     * OK\n     */\n    default: unknown;\n};\n\nexport type ApiVVersionODataControllerCountData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple/$count';\n};\n\nexport type ApiVVersionODataControllerCountResponses = {\n    /**\n     * Success\n     */\n    200: ModelFromZendesk;\n};\n\nexport type ApiVVersionODataControllerCountResponse = ApiVVersionODataControllerCountResponses[keyof ApiVVersionODataControllerCountResponses];\n\nexport type GetApiVbyApiVersionSimpleOperationData = {\n    body?: never;\n    path: {\n        /**\n         * foo in method\n         */\n        foo_param: string;\n    };\n    query?: never;\n    url: '/api/v{api-version}/simple:operation';\n};\n\nexport type GetApiVbyApiVersionSimpleOperationErrors = {\n    /**\n     * Default error response\n     */\n    default: ModelWithBoolean;\n};\n\nexport type GetApiVbyApiVersionSimpleOperationError = GetApiVbyApiVersionSimpleOperationErrors[keyof GetApiVbyApiVersionSimpleOperationErrors];\n\nexport type GetApiVbyApiVersionSimpleOperationResponses = {\n    /**\n     * Response is a simple number\n     */\n    200: number;\n};\n\nexport type GetApiVbyApiVersionSimpleOperationResponse = GetApiVbyApiVersionSimpleOperationResponses[keyof GetApiVbyApiVersionSimpleOperationResponses];\n\nexport type DeleteCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type GetCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type HeadCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type OptionsCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type PatchCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type PostCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type PutCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type DeleteFooData3 = {\n    body?: never;\n    headers: {\n        /**\n         * Parameter with illegal characters\n         */\n        'x-Foo-Bar': ModelWithString;\n    };\n    path: {\n        /**\n         * foo in method\n         */\n        foo_param: string;\n        /**\n         * bar in method\n         */\n        BarParam: string;\n    };\n    query?: never;\n    url: '/api/v{api-version}/foo/{foo_param}/bar/{BarParam}';\n};\n\nexport type CallWithDescriptionsData = {\n    body?: never;\n    path?: never;\n    query?: {\n        /**\n         * Testing multiline comments in string: First line\n         * Second line\n         *\n         * Fourth line\n         */\n        parameterWithBreaks?: string;\n        /**\n         * Testing backticks in string: `backticks` and ```multiple backticks``` should work\n         */\n        parameterWithBackticks?: string;\n        /**\n         * Testing slashes in string: \\backwards\\\\\\ and /forwards/// should work\n         */\n        parameterWithSlashes?: string;\n        /**\n         * Testing expression placeholders in string: ${expression} should work\n         */\n        parameterWithExpressionPlaceholders?: string;\n        /**\n         * Testing quotes in string: 'single quote''' and \"double quotes\"\"\" should work\n         */\n        parameterWithQuotes?: string;\n        /**\n         * Testing reserved characters in string: * inline * and ** inline ** should work\n         */\n        parameterWithReservedCharacters?: string;\n    };\n    url: '/api/v{api-version}/descriptions';\n};\n\nexport type DeprecatedCallData = {\n    body?: never;\n    headers: {\n        /**\n         * This parameter is deprecated\n         *\n         * @deprecated\n         */\n        parameter: DeprecatedModel | null;\n    };\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/parameters/deprecated';\n};\n\nexport type CallWithParametersData = {\n    /**\n     * This is the parameter that goes into the body\n     */\n    body: {\n        [key: string]: unknown;\n    } | null;\n    headers: {\n        /**\n         * This is the parameter that goes into the header\n         */\n        parameterHeader: string | null;\n    };\n    path: {\n        /**\n         * This is the parameter that goes into the path\n         */\n        parameterPath: string | null;\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string | null;\n    };\n    query: {\n        foo_ref_enum?: ModelWithNestedArrayEnumsDataFoo;\n        foo_all_of_enum: ModelWithNestedArrayEnumsDataFoo;\n        /**\n         * This is the parameter that goes into the query params\n         */\n        cursor: string | null;\n    };\n    url: '/api/v{api-version}/parameters/{parameterPath}';\n};\n\nexport type CallWithWeirdParameterNamesData = {\n    /**\n     * This is the parameter that goes into the body\n     */\n    body: ModelWithString | null;\n    headers: {\n        /**\n         * This is the parameter that goes into the request header\n         */\n        'parameter.header': string | null;\n    };\n    path: {\n        /**\n         * This is the parameter that goes into the path\n         */\n        'parameter.path.1'?: string;\n        /**\n         * This is the parameter that goes into the path\n         */\n        'parameter-path-2'?: string;\n        /**\n         * This is the parameter that goes into the path\n         */\n        'PARAMETER-PATH-3'?: string;\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string | null;\n    };\n    query: {\n        /**\n         * This is the parameter with a reserved keyword\n         */\n        default?: string;\n        /**\n         * This is the parameter that goes into the request query params\n         */\n        'parameter-query': string | null;\n    };\n    url: '/api/v{api-version}/parameters/{parameter.path.1}/{parameter-path-2}/{PARAMETER-PATH-3}';\n};\n\nexport type GetCallWithOptionalParamData = {\n    /**\n     * This is a required parameter\n     */\n    body: ModelWithOneOfEnum;\n    path?: never;\n    query?: {\n        /**\n         * This is an optional parameter\n         */\n        page?: number;\n    };\n    url: '/api/v{api-version}/parameters';\n};\n\nexport type PostCallWithOptionalParamData = {\n    /**\n     * This is an optional parameter\n     */\n    body?: {\n        offset?: number | null;\n    };\n    path?: never;\n    query: {\n        /**\n         * This is a required parameter\n         */\n        parameter: Pageable;\n    };\n    url: '/api/v{api-version}/parameters';\n};\n\nexport type PostCallWithOptionalParamResponses = {\n    /**\n     * Response is a simple number\n     */\n    200: number;\n    /**\n     * Success\n     */\n    204: void;\n};\n\nexport type PostCallWithOptionalParamResponse = PostCallWithOptionalParamResponses[keyof PostCallWithOptionalParamResponses];\n\nexport type PostApiVbyApiVersionRequestBodyData = {\n    /**\n     * A reusable request body\n     */\n    body?: SimpleRequestBody;\n    path?: never;\n    query?: {\n        /**\n         * This is a reusable parameter\n         */\n        parameter?: string;\n    };\n    url: '/api/v{api-version}/requestBody';\n};\n\nexport type PostApiVbyApiVersionFormDataData = {\n    /**\n     * A reusable request body\n     */\n    body?: SimpleFormData;\n    path?: never;\n    query?: {\n        /**\n         * This is a reusable parameter\n         */\n        parameter?: string;\n    };\n    url: '/api/v{api-version}/formData';\n};\n\nexport type CallWithDefaultParametersData = {\n    body?: never;\n    path?: never;\n    query?: {\n        /**\n         * This is a simple string with default value\n         */\n        parameterString?: string | null;\n        /**\n         * This is a simple number with default value\n         */\n        parameterNumber?: number | null;\n        /**\n         * This is a simple boolean with default value\n         */\n        parameterBoolean?: boolean | null;\n        /**\n         * This is a simple enum with default value\n         */\n        parameterEnum?: 'Success' | 'Warning' | 'Error';\n        /**\n         * This is a simple model with default value\n         */\n        parameterModel?: ModelWithString | null;\n    };\n    url: '/api/v{api-version}/defaults';\n};\n\nexport type CallWithDefaultOptionalParametersData = {\n    body?: never;\n    path?: never;\n    query?: {\n        /**\n         * This is a simple string that is optional with default value\n         */\n        parameterString?: string;\n        /**\n         * This is a simple number that is optional with default value\n         */\n        parameterNumber?: number;\n        /**\n         * This is a simple boolean that is optional with default value\n         */\n        parameterBoolean?: boolean;\n        /**\n         * This is a simple enum that is optional with default value\n         */\n        parameterEnum?: 'Success' | 'Warning' | 'Error';\n        /**\n         * This is a simple model that is optional with default value\n         */\n        parameterModel?: ModelWithString;\n    };\n    url: '/api/v{api-version}/defaults';\n};\n\nexport type CallToTestOrderOfParamsData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * This is a optional string with default\n         */\n        parameterOptionalStringWithDefault?: string;\n        /**\n         * This is a optional string with empty default\n         */\n        parameterOptionalStringWithEmptyDefault?: string;\n        /**\n         * This is a optional string with no default\n         */\n        parameterOptionalStringWithNoDefault?: string;\n        /**\n         * This is a string with default\n         */\n        parameterStringWithDefault: string;\n        /**\n         * This is a string with empty default\n         */\n        parameterStringWithEmptyDefault: string;\n        /**\n         * This is a string with no default\n         */\n        parameterStringWithNoDefault: string;\n        /**\n         * This is a string that can be null with no default\n         */\n        parameterStringNullableWithNoDefault?: string | null;\n        /**\n         * This is a string that can be null with default\n         */\n        parameterStringNullableWithDefault?: string | null;\n    };\n    url: '/api/v{api-version}/defaults';\n};\n\nexport type DuplicateNameData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/duplicate';\n};\n\nexport type DuplicateName2Data = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/duplicate';\n};\n\nexport type DuplicateName3Data = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/duplicate';\n};\n\nexport type DuplicateName4Data = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/duplicate';\n};\n\nexport type CallWithNoContentResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no-content';\n};\n\nexport type CallWithNoContentResponseResponses = {\n    /**\n     * Success\n     */\n    204: void;\n};\n\nexport type CallWithNoContentResponseResponse = CallWithNoContentResponseResponses[keyof CallWithNoContentResponseResponses];\n\nexport type CallWithResponseAndNoContentResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multiple-tags/response-and-no-content';\n};\n\nexport type CallWithResponseAndNoContentResponseResponses = {\n    /**\n     * Response is a simple number\n     */\n    200: number;\n    /**\n     * Success\n     */\n    204: void;\n};\n\nexport type CallWithResponseAndNoContentResponseResponse = CallWithResponseAndNoContentResponseResponses[keyof CallWithResponseAndNoContentResponseResponses];\n\nexport type DummyAData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multiple-tags/a';\n};\n\nexport type DummyAResponses = {\n    200: _400;\n};\n\nexport type DummyAResponse = DummyAResponses[keyof DummyAResponses];\n\nexport type DummyBData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multiple-tags/b';\n};\n\nexport type DummyBResponses = {\n    /**\n     * Success\n     */\n    204: void;\n};\n\nexport type DummyBResponse = DummyBResponses[keyof DummyBResponses];\n\nexport type CallWithResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/response';\n};\n\nexport type CallWithResponseResponses = {\n    default: Import;\n};\n\nexport type CallWithResponseResponse = CallWithResponseResponses[keyof CallWithResponseResponses];\n\nexport type CallWithDuplicateResponsesData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/response';\n};\n\nexport type CallWithDuplicateResponsesErrors = {\n    /**\n     * Message for 500 error\n     */\n    500: ModelWithStringError;\n    /**\n     * Message for 501 error\n     */\n    501: ModelWithStringError;\n    /**\n     * Message for 502 error\n     */\n    502: ModelWithStringError;\n    /**\n     * Message for 4XX errors\n     */\n    '4XX': DictionaryWithArray;\n    /**\n     * Default error response\n     */\n    default: ModelWithBoolean;\n};\n\nexport type CallWithDuplicateResponsesError = CallWithDuplicateResponsesErrors[keyof CallWithDuplicateResponsesErrors];\n\nexport type CallWithDuplicateResponsesResponses = {\n    /**\n     * Message for 200 response\n     */\n    200: ModelWithBoolean & ModelWithInteger;\n    /**\n     * Message for 201 response\n     */\n    201: ModelWithString;\n    /**\n     * Message for 202 response\n     */\n    202: ModelWithString;\n};\n\nexport type CallWithDuplicateResponsesResponse = CallWithDuplicateResponsesResponses[keyof CallWithDuplicateResponsesResponses];\n\nexport type CallWithResponsesData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/response';\n};\n\nexport type CallWithResponsesErrors = {\n    /**\n     * Message for 500 error\n     */\n    500: ModelWithStringError;\n    /**\n     * Message for 501 error\n     */\n    501: ModelWithStringError;\n    /**\n     * Message for 502 error\n     */\n    502: ModelWithStringError;\n    /**\n     * Message for default response\n     */\n    default: ModelWithStringError;\n};\n\nexport type CallWithResponsesError = CallWithResponsesErrors[keyof CallWithResponsesErrors];\n\nexport type CallWithResponsesResponses = {\n    /**\n     * Message for 200 response\n     */\n    200: {\n        readonly '@namespace.string'?: string;\n        readonly '@namespace.integer'?: number;\n        readonly value?: Array<ModelWithString>;\n    };\n    /**\n     * Message for 201 response\n     */\n    201: ModelThatExtends;\n    /**\n     * Message for 202 response\n     */\n    202: ModelThatExtendsExtends;\n};\n\nexport type CallWithResponsesResponse = CallWithResponsesResponses[keyof CallWithResponsesResponses];\n\nexport type CollectionFormatData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * This is an array parameter that is sent as csv format (comma-separated values)\n         */\n        parameterArrayCSV: Array<string> | null;\n        /**\n         * This is an array parameter that is sent as ssv format (space-separated values)\n         */\n        parameterArraySSV: Array<string> | null;\n        /**\n         * This is an array parameter that is sent as tsv format (tab-separated values)\n         */\n        parameterArrayTSV: Array<string> | null;\n        /**\n         * This is an array parameter that is sent as pipes format (pipe-separated values)\n         */\n        parameterArrayPipes: Array<string> | null;\n        /**\n         * This is an array parameter that is sent as multi format (multiple parameter instances)\n         */\n        parameterArrayMulti: Array<string> | null;\n    };\n    url: '/api/v{api-version}/collectionFormat';\n};\n\nexport type TypesData = {\n    body?: never;\n    path?: {\n        /**\n         * This is a number parameter\n         */\n        id?: number;\n    };\n    query: {\n        /**\n         * This is a number parameter\n         */\n        parameterNumber: number;\n        /**\n         * This is a string parameter\n         */\n        parameterString: string | null;\n        /**\n         * This is a boolean parameter\n         */\n        parameterBoolean: boolean | null;\n        /**\n         * This is an object parameter\n         */\n        parameterObject: {\n            [key: string]: unknown;\n        } | null;\n        /**\n         * This is an array parameter\n         */\n        parameterArray: Array<string> | null;\n        /**\n         * This is a dictionary parameter\n         */\n        parameterDictionary: {\n            [key: string]: unknown;\n        } | null;\n        /**\n         * This is an enum parameter\n         */\n        parameterEnum: 'Success' | 'Warning' | 'Error' | null;\n    };\n    url: '/api/v{api-version}/types';\n};\n\nexport type TypesResponses = {\n    /**\n     * Response is a simple number\n     */\n    200: number;\n    /**\n     * Response is a simple string\n     */\n    201: string;\n    /**\n     * Response is a simple boolean\n     */\n    202: boolean;\n    /**\n     * Response is a simple object\n     */\n    203: {\n        [key: string]: unknown;\n    };\n};\n\nexport type TypesResponse = TypesResponses[keyof TypesResponses];\n\nexport type UploadFileData = {\n    body: Blob | File;\n    path: {\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string | null;\n    };\n    query?: never;\n    url: '/api/v{api-version}/upload';\n};\n\nexport type UploadFileResponses = {\n    200: boolean;\n};\n\nexport type UploadFileResponse = UploadFileResponses[keyof UploadFileResponses];\n\nexport type FileResponseData = {\n    body?: never;\n    path: {\n        id: string;\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string;\n    };\n    query?: never;\n    url: '/api/v{api-version}/file/{id}';\n};\n\nexport type FileResponseResponses = {\n    /**\n     * Success\n     */\n    200: Blob | File;\n};\n\nexport type FileResponseResponse = FileResponseResponses[keyof FileResponseResponses];\n\nexport type ComplexTypesData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * Parameter containing object\n         */\n        parameterObject: {\n            first?: {\n                second?: {\n                    third?: string;\n                };\n            };\n        };\n        /**\n         * Parameter containing reference\n         */\n        parameterReference: ModelWithString;\n    };\n    url: '/api/v{api-version}/complex';\n};\n\nexport type ComplexTypesErrors = {\n    /**\n     * 400 `server` error\n     */\n    400: unknown;\n    /**\n     * 500 server error\n     */\n    500: unknown;\n};\n\nexport type ComplexTypesResponses = {\n    /**\n     * Successful response\n     */\n    200: Array<ModelWithString>;\n};\n\nexport type ComplexTypesResponse = ComplexTypesResponses[keyof ComplexTypesResponses];\n\nexport type MultipartResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multipart';\n};\n\nexport type MultipartResponseResponses = {\n    /**\n     * OK\n     */\n    200: {\n        file?: Blob | File;\n        metadata?: {\n            foo?: string;\n            bar?: string;\n        };\n    };\n};\n\nexport type MultipartResponseResponse = MultipartResponseResponses[keyof MultipartResponseResponses];\n\nexport type MultipartRequestData = {\n    body?: {\n        content?: Blob | File;\n        data?: ModelWithString | null;\n    };\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multipart';\n};\n\nexport type ComplexParamsData = {\n    body?: {\n        readonly key: string | null;\n        name: string | null;\n        enabled?: boolean;\n        type: 'Monkey' | 'Horse' | 'Bird';\n        listOfModels?: Array<ModelWithString> | null;\n        listOfStrings?: Array<string> | null;\n        parameters: ModelWithString | ModelWithEnum | ModelWithArray | ModelWithDictionary;\n        readonly user?: {\n            readonly id?: number;\n            readonly name?: string | null;\n        };\n    };\n    path: {\n        id: number;\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string;\n    };\n    query?: never;\n    url: '/api/v{api-version}/complex/{id}';\n};\n\nexport type ComplexParamsResponses = {\n    /**\n     * Success\n     */\n    200: ModelWithString;\n};\n\nexport type ComplexParamsResponse = ComplexParamsResponses[keyof ComplexParamsResponses];\n\nexport type CallWithResultFromHeaderData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/header';\n};\n\nexport type CallWithResultFromHeaderErrors = {\n    /**\n     * 400 server error\n     */\n    400: unknown;\n    /**\n     * 500 server error\n     */\n    500: unknown;\n};\n\nexport type CallWithResultFromHeaderResponses = {\n    /**\n     * Successful response\n     */\n    200: unknown;\n};\n\nexport type TestErrorCodeData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * Status code to return\n         */\n        status: number;\n    };\n    url: '/api/v{api-version}/error';\n};\n\nexport type TestErrorCodeErrors = {\n    /**\n     * Custom message: Internal Server Error\n     */\n    500: unknown;\n    /**\n     * Custom message: Not Implemented\n     */\n    501: unknown;\n    /**\n     * Custom message: Bad Gateway\n     */\n    502: unknown;\n    /**\n     * Custom message: Service Unavailable\n     */\n    503: unknown;\n};\n\nexport type TestErrorCodeResponses = {\n    /**\n     * Custom message: Successful response\n     */\n    200: unknown;\n};\n\nexport type NonAsciiæøåÆøÅöôêÊ字符串Data = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * Dummy input param\n         */\n        nonAsciiParamæøåÆØÅöôêÊ: number;\n    };\n    url: '/api/v{api-version}/non-ascii-æøåÆØÅöôêÊ字符串';\n};\n\nexport type NonAsciiæøåÆøÅöôêÊ字符串Responses = {\n    /**\n     * Successful response\n     */\n    200: Array<NonAsciiStringæøåÆøÅöôêÊ字符串>;\n};\n\nexport type NonAsciiæøåÆøÅöôêÊ字符串Response = NonAsciiæøåÆøÅöôêÊ字符串Responses[keyof NonAsciiæøåÆøÅöôêÊ字符串Responses];\n\nexport type PutWithFormUrlEncodedData = {\n    body: ArrayWithStrings;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/non-ascii-æøåÆØÅöôêÊ字符串';\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/react-query/fetch/@tanstack/react-query.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport { type DefaultError, type InfiniteData, infiniteQueryOptions, queryOptions, type UseMutationOptions } from '@tanstack/react-query';\n\nimport { client } from '../client.gen';\nimport { apiVVersionODataControllerCount, callToTestOrderOfParams, callWithDefaultOptionalParameters, callWithDefaultParameters, callWithDescriptions, callWithDuplicateResponses, callWithNoContentResponse, callWithParameters, callWithResponse, callWithResponseAndNoContentResponse, callWithResponses, callWithResultFromHeader, callWithWeirdParameterNames, collectionFormat, complexParams, complexTypes, deleteCallWithoutParametersAndResponse, deleteFoo, deprecatedCall, dummyA, dummyB, duplicateName, duplicateName2, duplicateName3, duplicateName4, export_, fileResponse, fooWow, getApiVbyApiVersionSimpleOperation, getCallWithOptionalParam, getCallWithoutParametersAndResponse, import_, multipartRequest, multipartResponse, nonAsciiæøåÆøÅöôêÊ字符串, type Options, patchApiVbyApiVersionNoTag, patchCallWithoutParametersAndResponse, postApiVbyApiVersionFormData, postApiVbyApiVersionRequestBody, postCallWithOptionalParam, postCallWithoutParametersAndResponse, putCallWithoutParametersAndResponse, putWithFormUrlEncoded, testErrorCode, types, uploadFile } from '../sdk.gen';\nimport type { ApiVVersionODataControllerCountData, ApiVVersionODataControllerCountResponse, CallToTestOrderOfParamsData, CallWithDefaultOptionalParametersData, CallWithDefaultParametersData, CallWithDescriptionsData, CallWithDuplicateResponsesData, CallWithDuplicateResponsesError, CallWithDuplicateResponsesResponse, CallWithNoContentResponseData, CallWithNoContentResponseResponse, CallWithParametersData, CallWithResponseAndNoContentResponseData, CallWithResponseAndNoContentResponseResponse, CallWithResponseData, CallWithResponseResponse, CallWithResponsesData, CallWithResponsesError, CallWithResponsesResponse, CallWithResultFromHeaderData, CallWithWeirdParameterNamesData, CollectionFormatData, ComplexParamsData, ComplexParamsResponse, ComplexTypesData, ComplexTypesResponse, DeleteCallWithoutParametersAndResponseData, DeleteFooData3, DeprecatedCallData, DummyAData, DummyAResponse, DummyBData, DummyBResponse, DuplicateName2Data, DuplicateName3Data, DuplicateName4Data, DuplicateNameData, ExportData, FileResponseData, FileResponseResponse, FooWowData, GetApiVbyApiVersionSimpleOperationData, GetApiVbyApiVersionSimpleOperationError, GetApiVbyApiVersionSimpleOperationResponse, GetCallWithOptionalParamData, GetCallWithoutParametersAndResponseData, ImportData, ImportResponse, MultipartRequestData, MultipartResponseData, MultipartResponseResponse, NonAsciiæøåÆøÅöôêÊ字符串Data, NonAsciiæøåÆøÅöôêÊ字符串Response, PatchApiVbyApiVersionNoTagData, PatchCallWithoutParametersAndResponseData, PostApiVbyApiVersionFormDataData, PostApiVbyApiVersionRequestBodyData, PostCallWithOptionalParamData, PostCallWithOptionalParamResponse, PostCallWithoutParametersAndResponseData, PutCallWithoutParametersAndResponseData, PutWithFormUrlEncodedData, TestErrorCodeData, TypesData, TypesResponse, UploadFileData, UploadFileResponse } from '../types.gen';\n\nexport type QueryKey<TOptions extends Options> = [\n    Pick<TOptions, 'baseUrl' | 'body' | 'headers' | 'path' | 'query'> & {\n        _id: string;\n        _infinite?: boolean;\n        tags?: ReadonlyArray<string>;\n    }\n];\n\nconst createQueryKey = <TOptions extends Options>(id: string, options?: TOptions, infinite?: boolean, tags?: ReadonlyArray<string>): [\n    QueryKey<TOptions>[0]\n] => {\n    const params: QueryKey<TOptions>[0] = { _id: id, baseUrl: options?.baseUrl || (options?.client ?? client).getConfig().baseUrl } as QueryKey<TOptions>[0];\n    if (infinite) {\n        params._infinite = infinite;\n    }\n    if (tags) {\n        params.tags = tags;\n    }\n    if (options?.body) {\n        params.body = options.body;\n    }\n    if (options?.headers) {\n        params.headers = options.headers;\n    }\n    if (options?.path) {\n        params.path = options.path;\n    }\n    if (options?.query) {\n        params.query = options.query;\n    }\n    return [params];\n};\n\nexport const exportQueryKey = (options?: Options<ExportData>) => createQueryKey('export', options);\n\nexport const exportOptions = (options?: Options<ExportData>) => queryOptions<unknown, DefaultError, unknown, ReturnType<typeof exportQueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await export_({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: exportQueryKey(options)\n});\n\nexport const patchApiVbyApiVersionNoTagMutation = (options?: Partial<Options<PatchApiVbyApiVersionNoTagData>>): UseMutationOptions<unknown, DefaultError, Options<PatchApiVbyApiVersionNoTagData>> => {\n    const mutationOptions: UseMutationOptions<unknown, DefaultError, Options<PatchApiVbyApiVersionNoTagData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await patchApiVbyApiVersionNoTag({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const importMutation = (options?: Partial<Options<ImportData>>): UseMutationOptions<ImportResponse, DefaultError, Options<ImportData>> => {\n    const mutationOptions: UseMutationOptions<ImportResponse, DefaultError, Options<ImportData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await import_({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const fooWowMutation = (options?: Partial<Options<FooWowData>>): UseMutationOptions<unknown, DefaultError, Options<FooWowData>> => {\n    const mutationOptions: UseMutationOptions<unknown, DefaultError, Options<FooWowData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await fooWow({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const apiVVersionODataControllerCountQueryKey = (options?: Options<ApiVVersionODataControllerCountData>) => createQueryKey('apiVVersionODataControllerCount', options);\n\nexport const apiVVersionODataControllerCountOptions = (options?: Options<ApiVVersionODataControllerCountData>) => queryOptions<ApiVVersionODataControllerCountResponse, DefaultError, ApiVVersionODataControllerCountResponse, ReturnType<typeof apiVVersionODataControllerCountQueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await apiVVersionODataControllerCount({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: apiVVersionODataControllerCountQueryKey(options)\n});\n\nexport const getApiVbyApiVersionSimpleOperationQueryKey = (options: Options<GetApiVbyApiVersionSimpleOperationData>) => createQueryKey('getApiVbyApiVersionSimpleOperation', options);\n\nexport const getApiVbyApiVersionSimpleOperationOptions = (options: Options<GetApiVbyApiVersionSimpleOperationData>) => queryOptions<GetApiVbyApiVersionSimpleOperationResponse, GetApiVbyApiVersionSimpleOperationError, GetApiVbyApiVersionSimpleOperationResponse, ReturnType<typeof getApiVbyApiVersionSimpleOperationQueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await getApiVbyApiVersionSimpleOperation({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: getApiVbyApiVersionSimpleOperationQueryKey(options)\n});\n\nexport const deleteCallWithoutParametersAndResponseMutation = (options?: Partial<Options<DeleteCallWithoutParametersAndResponseData>>): UseMutationOptions<unknown, DefaultError, Options<DeleteCallWithoutParametersAndResponseData>> => {\n    const mutationOptions: UseMutationOptions<unknown, DefaultError, Options<DeleteCallWithoutParametersAndResponseData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await deleteCallWithoutParametersAndResponse({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const getCallWithoutParametersAndResponseQueryKey = (options?: Options<GetCallWithoutParametersAndResponseData>) => createQueryKey('getCallWithoutParametersAndResponse', options);\n\nexport const getCallWithoutParametersAndResponseOptions = (options?: Options<GetCallWithoutParametersAndResponseData>) => queryOptions<unknown, DefaultError, unknown, ReturnType<typeof getCallWithoutParametersAndResponseQueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await getCallWithoutParametersAndResponse({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: getCallWithoutParametersAndResponseQueryKey(options)\n});\n\nexport const patchCallWithoutParametersAndResponseMutation = (options?: Partial<Options<PatchCallWithoutParametersAndResponseData>>): UseMutationOptions<unknown, DefaultError, Options<PatchCallWithoutParametersAndResponseData>> => {\n    const mutationOptions: UseMutationOptions<unknown, DefaultError, Options<PatchCallWithoutParametersAndResponseData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await patchCallWithoutParametersAndResponse({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const postCallWithoutParametersAndResponseMutation = (options?: Partial<Options<PostCallWithoutParametersAndResponseData>>): UseMutationOptions<unknown, DefaultError, Options<PostCallWithoutParametersAndResponseData>> => {\n    const mutationOptions: UseMutationOptions<unknown, DefaultError, Options<PostCallWithoutParametersAndResponseData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await postCallWithoutParametersAndResponse({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const putCallWithoutParametersAndResponseMutation = (options?: Partial<Options<PutCallWithoutParametersAndResponseData>>): UseMutationOptions<unknown, DefaultError, Options<PutCallWithoutParametersAndResponseData>> => {\n    const mutationOptions: UseMutationOptions<unknown, DefaultError, Options<PutCallWithoutParametersAndResponseData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await putCallWithoutParametersAndResponse({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const deleteFooMutation = (options?: Partial<Options<DeleteFooData3>>): UseMutationOptions<unknown, DefaultError, Options<DeleteFooData3>> => {\n    const mutationOptions: UseMutationOptions<unknown, DefaultError, Options<DeleteFooData3>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await deleteFoo({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const callWithDescriptionsMutation = (options?: Partial<Options<CallWithDescriptionsData>>): UseMutationOptions<unknown, DefaultError, Options<CallWithDescriptionsData>> => {\n    const mutationOptions: UseMutationOptions<unknown, DefaultError, Options<CallWithDescriptionsData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await callWithDescriptions({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\n/**\n * @deprecated\n */\nexport const deprecatedCallMutation = (options?: Partial<Options<DeprecatedCallData>>): UseMutationOptions<unknown, DefaultError, Options<DeprecatedCallData>> => {\n    const mutationOptions: UseMutationOptions<unknown, DefaultError, Options<DeprecatedCallData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await deprecatedCall({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const callWithParametersMutation = (options?: Partial<Options<CallWithParametersData>>): UseMutationOptions<unknown, DefaultError, Options<CallWithParametersData>> => {\n    const mutationOptions: UseMutationOptions<unknown, DefaultError, Options<CallWithParametersData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await callWithParameters({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const callWithWeirdParameterNamesMutation = (options?: Partial<Options<CallWithWeirdParameterNamesData>>): UseMutationOptions<unknown, DefaultError, Options<CallWithWeirdParameterNamesData>> => {\n    const mutationOptions: UseMutationOptions<unknown, DefaultError, Options<CallWithWeirdParameterNamesData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await callWithWeirdParameterNames({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const getCallWithOptionalParamQueryKey = (options: Options<GetCallWithOptionalParamData>) => createQueryKey('getCallWithOptionalParam', options);\n\nexport const getCallWithOptionalParamOptions = (options: Options<GetCallWithOptionalParamData>) => queryOptions<unknown, DefaultError, unknown, ReturnType<typeof getCallWithOptionalParamQueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await getCallWithOptionalParam({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: getCallWithOptionalParamQueryKey(options)\n});\n\nconst createInfiniteParams = <K extends Pick<QueryKey<Options>[0], 'body' | 'headers' | 'path' | 'query'>>(queryKey: QueryKey<Options>, page: K) => {\n    const params = { ...queryKey[0] };\n    if (page.body) {\n        params.body = {\n            ...queryKey[0].body as any,\n            ...page.body as any\n        };\n    }\n    if (page.headers) {\n        params.headers = {\n            ...queryKey[0].headers,\n            ...page.headers\n        };\n    }\n    if (page.path) {\n        params.path = {\n            ...queryKey[0].path as any,\n            ...page.path as any\n        };\n    }\n    if (page.query) {\n        params.query = {\n            ...queryKey[0].query as any,\n            ...page.query as any\n        };\n    }\n    return params as unknown as typeof page;\n};\n\nexport const getCallWithOptionalParamInfiniteQueryKey = (options: Options<GetCallWithOptionalParamData>): QueryKey<Options<GetCallWithOptionalParamData>> => createQueryKey('getCallWithOptionalParam', options, true);\n\nexport const getCallWithOptionalParamInfiniteOptions = (options: Options<GetCallWithOptionalParamData>) => infiniteQueryOptions<unknown, DefaultError, InfiniteData<unknown>, QueryKey<Options<GetCallWithOptionalParamData>>, number | Pick<QueryKey<Options<GetCallWithOptionalParamData>>[0], 'body' | 'headers' | 'path' | 'query'>>(\n// @ts-ignore\n{\n    queryFn: async ({ pageParam, queryKey, signal }) => {\n        // @ts-ignore\n        const page: Pick<QueryKey<Options<GetCallWithOptionalParamData>>[0], 'body' | 'headers' | 'path' | 'query'> = typeof pageParam === 'object' ? pageParam : {\n            query: {\n                page: pageParam\n            }\n        };\n        const params = createInfiniteParams(queryKey, page);\n        const { data } = await getCallWithOptionalParam({\n            ...options,\n            ...params,\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: getCallWithOptionalParamInfiniteQueryKey(options)\n});\n\nexport const postCallWithOptionalParamMutation = (options?: Partial<Options<PostCallWithOptionalParamData>>): UseMutationOptions<PostCallWithOptionalParamResponse, DefaultError, Options<PostCallWithOptionalParamData>> => {\n    const mutationOptions: UseMutationOptions<PostCallWithOptionalParamResponse, DefaultError, Options<PostCallWithOptionalParamData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await postCallWithOptionalParam({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const postApiVbyApiVersionRequestBodyMutation = (options?: Partial<Options<PostApiVbyApiVersionRequestBodyData>>): UseMutationOptions<unknown, DefaultError, Options<PostApiVbyApiVersionRequestBodyData>> => {\n    const mutationOptions: UseMutationOptions<unknown, DefaultError, Options<PostApiVbyApiVersionRequestBodyData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await postApiVbyApiVersionRequestBody({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const postApiVbyApiVersionFormDataMutation = (options?: Partial<Options<PostApiVbyApiVersionFormDataData>>): UseMutationOptions<unknown, DefaultError, Options<PostApiVbyApiVersionFormDataData>> => {\n    const mutationOptions: UseMutationOptions<unknown, DefaultError, Options<PostApiVbyApiVersionFormDataData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await postApiVbyApiVersionFormData({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const callWithDefaultParametersQueryKey = (options?: Options<CallWithDefaultParametersData>) => createQueryKey('callWithDefaultParameters', options);\n\nexport const callWithDefaultParametersOptions = (options?: Options<CallWithDefaultParametersData>) => queryOptions<unknown, DefaultError, unknown, ReturnType<typeof callWithDefaultParametersQueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await callWithDefaultParameters({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: callWithDefaultParametersQueryKey(options)\n});\n\nexport const callWithDefaultOptionalParametersMutation = (options?: Partial<Options<CallWithDefaultOptionalParametersData>>): UseMutationOptions<unknown, DefaultError, Options<CallWithDefaultOptionalParametersData>> => {\n    const mutationOptions: UseMutationOptions<unknown, DefaultError, Options<CallWithDefaultOptionalParametersData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await callWithDefaultOptionalParameters({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const callToTestOrderOfParamsMutation = (options?: Partial<Options<CallToTestOrderOfParamsData>>): UseMutationOptions<unknown, DefaultError, Options<CallToTestOrderOfParamsData>> => {\n    const mutationOptions: UseMutationOptions<unknown, DefaultError, Options<CallToTestOrderOfParamsData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await callToTestOrderOfParams({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const duplicateNameMutation = (options?: Partial<Options<DuplicateNameData>>): UseMutationOptions<unknown, DefaultError, Options<DuplicateNameData>> => {\n    const mutationOptions: UseMutationOptions<unknown, DefaultError, Options<DuplicateNameData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await duplicateName({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const duplicateName2QueryKey = (options?: Options<DuplicateName2Data>) => createQueryKey('duplicateName2', options);\n\nexport const duplicateName2Options = (options?: Options<DuplicateName2Data>) => queryOptions<unknown, DefaultError, unknown, ReturnType<typeof duplicateName2QueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await duplicateName2({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: duplicateName2QueryKey(options)\n});\n\nexport const duplicateName3Mutation = (options?: Partial<Options<DuplicateName3Data>>): UseMutationOptions<unknown, DefaultError, Options<DuplicateName3Data>> => {\n    const mutationOptions: UseMutationOptions<unknown, DefaultError, Options<DuplicateName3Data>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await duplicateName3({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const duplicateName4Mutation = (options?: Partial<Options<DuplicateName4Data>>): UseMutationOptions<unknown, DefaultError, Options<DuplicateName4Data>> => {\n    const mutationOptions: UseMutationOptions<unknown, DefaultError, Options<DuplicateName4Data>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await duplicateName4({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const callWithNoContentResponseQueryKey = (options?: Options<CallWithNoContentResponseData>) => createQueryKey('callWithNoContentResponse', options);\n\nexport const callWithNoContentResponseOptions = (options?: Options<CallWithNoContentResponseData>) => queryOptions<CallWithNoContentResponseResponse, DefaultError, CallWithNoContentResponseResponse, ReturnType<typeof callWithNoContentResponseQueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await callWithNoContentResponse({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: callWithNoContentResponseQueryKey(options)\n});\n\nexport const callWithResponseAndNoContentResponseQueryKey = (options?: Options<CallWithResponseAndNoContentResponseData>) => createQueryKey('callWithResponseAndNoContentResponse', options);\n\nexport const callWithResponseAndNoContentResponseOptions = (options?: Options<CallWithResponseAndNoContentResponseData>) => queryOptions<CallWithResponseAndNoContentResponseResponse, DefaultError, CallWithResponseAndNoContentResponseResponse, ReturnType<typeof callWithResponseAndNoContentResponseQueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await callWithResponseAndNoContentResponse({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: callWithResponseAndNoContentResponseQueryKey(options)\n});\n\nexport const dummyAQueryKey = (options?: Options<DummyAData>) => createQueryKey('dummyA', options);\n\nexport const dummyAOptions = (options?: Options<DummyAData>) => queryOptions<DummyAResponse, DefaultError, DummyAResponse, ReturnType<typeof dummyAQueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await dummyA({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: dummyAQueryKey(options)\n});\n\nexport const dummyBQueryKey = (options?: Options<DummyBData>) => createQueryKey('dummyB', options);\n\nexport const dummyBOptions = (options?: Options<DummyBData>) => queryOptions<DummyBResponse, DefaultError, DummyBResponse, ReturnType<typeof dummyBQueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await dummyB({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: dummyBQueryKey(options)\n});\n\nexport const callWithResponseQueryKey = (options?: Options<CallWithResponseData>) => createQueryKey('callWithResponse', options);\n\nexport const callWithResponseOptions = (options?: Options<CallWithResponseData>) => queryOptions<CallWithResponseResponse, DefaultError, CallWithResponseResponse, ReturnType<typeof callWithResponseQueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await callWithResponse({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: callWithResponseQueryKey(options)\n});\n\nexport const callWithDuplicateResponsesMutation = (options?: Partial<Options<CallWithDuplicateResponsesData>>): UseMutationOptions<CallWithDuplicateResponsesResponse, CallWithDuplicateResponsesError, Options<CallWithDuplicateResponsesData>> => {\n    const mutationOptions: UseMutationOptions<CallWithDuplicateResponsesResponse, CallWithDuplicateResponsesError, Options<CallWithDuplicateResponsesData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await callWithDuplicateResponses({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const callWithResponsesMutation = (options?: Partial<Options<CallWithResponsesData>>): UseMutationOptions<CallWithResponsesResponse, CallWithResponsesError, Options<CallWithResponsesData>> => {\n    const mutationOptions: UseMutationOptions<CallWithResponsesResponse, CallWithResponsesError, Options<CallWithResponsesData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await callWithResponses({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const collectionFormatQueryKey = (options: Options<CollectionFormatData>) => createQueryKey('collectionFormat', options);\n\nexport const collectionFormatOptions = (options: Options<CollectionFormatData>) => queryOptions<unknown, DefaultError, unknown, ReturnType<typeof collectionFormatQueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await collectionFormat({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: collectionFormatQueryKey(options)\n});\n\nexport const typesQueryKey = (options: Options<TypesData>) => createQueryKey('types', options);\n\nexport const typesOptions = (options: Options<TypesData>) => queryOptions<TypesResponse, DefaultError, TypesResponse, ReturnType<typeof typesQueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await types({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: typesQueryKey(options)\n});\n\nexport const uploadFileMutation = (options?: Partial<Options<UploadFileData>>): UseMutationOptions<UploadFileResponse, DefaultError, Options<UploadFileData>> => {\n    const mutationOptions: UseMutationOptions<UploadFileResponse, DefaultError, Options<UploadFileData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await uploadFile({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const fileResponseQueryKey = (options: Options<FileResponseData>) => createQueryKey('fileResponse', options);\n\nexport const fileResponseOptions = (options: Options<FileResponseData>) => queryOptions<FileResponseResponse, DefaultError, FileResponseResponse, ReturnType<typeof fileResponseQueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await fileResponse({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: fileResponseQueryKey(options)\n});\n\nexport const complexTypesQueryKey = (options: Options<ComplexTypesData>) => createQueryKey('complexTypes', options);\n\nexport const complexTypesOptions = (options: Options<ComplexTypesData>) => queryOptions<ComplexTypesResponse, DefaultError, ComplexTypesResponse, ReturnType<typeof complexTypesQueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await complexTypes({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: complexTypesQueryKey(options)\n});\n\nexport const multipartResponseQueryKey = (options?: Options<MultipartResponseData>) => createQueryKey('multipartResponse', options);\n\nexport const multipartResponseOptions = (options?: Options<MultipartResponseData>) => queryOptions<MultipartResponseResponse, DefaultError, MultipartResponseResponse, ReturnType<typeof multipartResponseQueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await multipartResponse({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: multipartResponseQueryKey(options)\n});\n\nexport const multipartRequestMutation = (options?: Partial<Options<MultipartRequestData>>): UseMutationOptions<unknown, DefaultError, Options<MultipartRequestData>> => {\n    const mutationOptions: UseMutationOptions<unknown, DefaultError, Options<MultipartRequestData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await multipartRequest({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const complexParamsMutation = (options?: Partial<Options<ComplexParamsData>>): UseMutationOptions<ComplexParamsResponse, DefaultError, Options<ComplexParamsData>> => {\n    const mutationOptions: UseMutationOptions<ComplexParamsResponse, DefaultError, Options<ComplexParamsData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await complexParams({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const callWithResultFromHeaderMutation = (options?: Partial<Options<CallWithResultFromHeaderData>>): UseMutationOptions<unknown, DefaultError, Options<CallWithResultFromHeaderData>> => {\n    const mutationOptions: UseMutationOptions<unknown, DefaultError, Options<CallWithResultFromHeaderData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await callWithResultFromHeader({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const testErrorCodeMutation = (options?: Partial<Options<TestErrorCodeData>>): UseMutationOptions<unknown, DefaultError, Options<TestErrorCodeData>> => {\n    const mutationOptions: UseMutationOptions<unknown, DefaultError, Options<TestErrorCodeData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await testErrorCode({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const nonAsciiæøåÆøÅöôêÊ字符串Mutation = (options?: Partial<Options<NonAsciiæøåÆøÅöôêÊ字符串Data>>): UseMutationOptions<NonAsciiæøåÆøÅöôêÊ字符串Response, DefaultError, Options<NonAsciiæøåÆøÅöôêÊ字符串Data>> => {\n    const mutationOptions: UseMutationOptions<NonAsciiæøåÆøÅöôêÊ字符串Response, DefaultError, Options<NonAsciiæøåÆøÅöôêÊ字符串Data>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await nonAsciiæøåÆøÅöôêÊ字符串({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\n/**\n * Login User\n */\nexport const putWithFormUrlEncodedMutation = (options?: Partial<Options<PutWithFormUrlEncodedData>>): UseMutationOptions<unknown, DefaultError, Options<PutWithFormUrlEncodedData>> => {\n    const mutationOptions: UseMutationOptions<unknown, DefaultError, Options<PutWithFormUrlEncodedData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await putWithFormUrlEncoded({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/react-query/fetch/client/client.gen.ts",
    "content": "// 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 (options: RequestOptions) => {\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 url = buildUrl(opts);\n\n    return { opts, url };\n  };\n\n  const request: Client['request'] = async (options) => {\n    // @ts-expect-error\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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/react-query/fetch/client/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type { Auth } from '../core/auth.gen';\nexport type { QuerySerializerOptions } from '../core/bodySerializer.gen';\nexport {\n  formDataBodySerializer,\n  jsonBodySerializer,\n  urlSearchParamsBodySerializer,\n} from '../core/bodySerializer.gen';\nexport { buildClientParams } from '../core/params.gen';\nexport { serializeQueryKeyValue } from '../core/queryKeySerializer.gen';\nexport { createClient } from './client.gen';\nexport type {\n  Client,\n  ClientOptions,\n  Config,\n  CreateClientConfig,\n  Options,\n  RequestOptions,\n  RequestResult,\n  ResolvedRequestOptions,\n  ResponseStyle,\n  TDataShape,\n} from './types.gen';\nexport { createConfig, mergeHeaders } from './utils.gen';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/react-query/fetch/client/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { Auth } from '../core/auth.gen';\nimport type {\n  ServerSentEventsOptions,\n  ServerSentEventsResult,\n} from '../core/serverSentEvents.gen';\nimport type { Client as CoreClient, Config as CoreConfig } from '../core/types.gen';\nimport type { Middleware } from './utils.gen';\n\nexport type ResponseStyle = 'data' | 'fields';\n\nexport interface Config<T extends ClientOptions = ClientOptions>\n  extends Omit<RequestInit, 'body' | 'headers' | 'method'>, CoreConfig {\n  /**\n   * Base URL for all requests made by this client.\n   */\n  baseUrl?: T['baseUrl'];\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   * Please don't use the Fetch client for Next.js applications. The `next`\n   * options won't have any effect.\n   *\n   * Install {@link https://www.npmjs.com/package/@hey-api/client-next `@hey-api/client-next`} instead.\n   */\n  next?: never;\n  /**\n   * Return the response data parsed in a specified format. By default, `auto`\n   * will infer the appropriate method from the `Content-Type` response header.\n   * You can override this behavior with any of the {@link Body} methods.\n   * Select `stream` if you don't want to parse response data at all.\n   *\n   * @default 'auto'\n   */\n  parseAs?: 'arrayBuffer' | 'auto' | 'blob' | 'formData' | 'json' | 'stream' | 'text';\n  /**\n   * Should we return only data or multiple fields (data, error, response, etc.)?\n   *\n   * @default 'fields'\n   */\n  responseStyle?: ResponseStyle;\n  /**\n   * Throw an error instead of returning it in the response?\n   *\n   * @default false\n   */\n  throwOnError?: T['throwOnError'];\n}\n\nexport interface RequestOptions<\n  TData = unknown,\n  TResponseStyle extends ResponseStyle = 'fields',\n  ThrowOnError extends boolean = boolean,\n  Url extends string = string,\n>\n  extends\n    Config<{\n      responseStyle: TResponseStyle;\n      throwOnError: ThrowOnError;\n    }>,\n    Pick<\n      ServerSentEventsOptions<TData>,\n      | 'onRequest'\n      | 'onSseError'\n      | 'onSseEvent'\n      | 'sseDefaultRetryDelay'\n      | 'sseMaxRetryAttempts'\n      | 'sseMaxRetryDelay'\n    > {\n  /**\n   * Any body that you want to add to your request.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/fetch#body}\n   */\n  body?: unknown;\n  path?: Record<string, unknown>;\n  query?: Record<string, unknown>;\n  /**\n   * Security mechanism(s) to use for the request.\n   */\n  security?: ReadonlyArray<Auth>;\n  url: Url;\n}\n\nexport interface ResolvedRequestOptions<\n  TResponseStyle extends ResponseStyle = 'fields',\n  ThrowOnError extends boolean = boolean,\n  Url extends string = string,\n> extends RequestOptions<unknown, TResponseStyle, ThrowOnError, Url> {\n  serializedBody?: string;\n}\n\nexport type RequestResult<\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = boolean,\n  TResponseStyle extends ResponseStyle = 'fields',\n> = ThrowOnError extends true\n  ? Promise<\n      TResponseStyle extends 'data'\n        ? TData extends Record<string, unknown>\n          ? TData[keyof TData]\n          : TData\n        : {\n            data: TData extends Record<string, unknown> ? TData[keyof TData] : TData;\n            request: Request;\n            response: Response;\n          }\n    >\n  : Promise<\n      TResponseStyle extends 'data'\n        ? (TData extends Record<string, unknown> ? TData[keyof TData] : TData) | undefined\n        : (\n            | {\n                data: TData extends Record<string, unknown> ? TData[keyof TData] : TData;\n                error: undefined;\n              }\n            | {\n                data: undefined;\n                error: TError extends Record<string, unknown> ? TError[keyof TError] : TError;\n              }\n          ) & {\n            request: Request;\n            response: Response;\n          }\n    >;\n\nexport interface ClientOptions {\n  baseUrl?: string;\n  responseStyle?: ResponseStyle;\n  throwOnError?: boolean;\n}\n\ntype MethodFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'>,\n) => RequestResult<TData, TError, ThrowOnError, TResponseStyle>;\n\ntype SseFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'>,\n) => Promise<ServerSentEventsResult<TData, TError>>;\n\ntype RequestFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'> &\n    Pick<Required<RequestOptions<TData, TResponseStyle, ThrowOnError>>, 'method'>,\n) => RequestResult<TData, TError, ThrowOnError, TResponseStyle>;\n\ntype BuildUrlFn = <\n  TData extends {\n    body?: unknown;\n    path?: Record<string, unknown>;\n    query?: Record<string, unknown>;\n    url: string;\n  },\n>(\n  options: TData & Options<TData>,\n) => string;\n\nexport type Client = CoreClient<RequestFn, Config, MethodFn, BuildUrlFn, SseFn> & {\n  interceptors: Middleware<Request, Response, unknown, ResolvedRequestOptions>;\n};\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 = ClientOptions> = (\n  override?: Config<ClientOptions & T>,\n) => Config<Required<ClientOptions> & T>;\n\nexport interface TDataShape {\n  body?: unknown;\n  headers?: unknown;\n  path?: unknown;\n  query?: unknown;\n  url: string;\n}\n\ntype OmitKeys<T, K> = Pick<T, Exclude<keyof T, K>>;\n\nexport type Options<\n  TData extends TDataShape = TDataShape,\n  ThrowOnError extends boolean = boolean,\n  TResponse = unknown,\n  TResponseStyle extends ResponseStyle = 'fields',\n> = OmitKeys<\n  RequestOptions<TResponse, TResponseStyle, ThrowOnError>,\n  'body' | 'path' | 'query' | 'url'\n> &\n  ([TData] extends [never] ? unknown : Omit<TData, 'url'>);\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/react-query/fetch/client/utils.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/react-query/fetch/client.gen.ts",
    "content": "// 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: 'http://localhost:3000/base' }));\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/react-query/fetch/core/auth.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/react-query/fetch/core/bodySerializer.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/react-query/fetch/core/params.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/react-query/fetch/core/pathSerializer.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/react-query/fetch/core/queryKeySerializer.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\n/**\n * JSON-friendly union that mirrors what Pinia Colada can hash.\n */\nexport type JsonValue =\n  | null\n  | string\n  | number\n  | boolean\n  | JsonValue[]\n  | { [key: string]: JsonValue };\n\n/**\n * Replacer that converts non-JSON values (bigint, Date, etc.) to safe substitutes.\n */\nexport const queryKeyJsonReplacer = (_key: string, value: unknown) => {\n  if (value === undefined || typeof value === 'function' || typeof value === 'symbol') {\n    return undefined;\n  }\n  if (typeof value === 'bigint') {\n    return value.toString();\n  }\n  if (value instanceof Date) {\n    return value.toISOString();\n  }\n  return value;\n};\n\n/**\n * Safely stringifies a value and parses it back into a JsonValue.\n */\nexport const stringifyToJsonValue = (input: unknown): JsonValue | undefined => {\n  try {\n    const json = JSON.stringify(input, queryKeyJsonReplacer);\n    if (json === undefined) {\n      return undefined;\n    }\n    return JSON.parse(json) as JsonValue;\n  } catch {\n    return undefined;\n  }\n};\n\n/**\n * Detects plain objects (including objects with a null prototype).\n */\nconst isPlainObject = (value: unknown): value is Record<string, unknown> => {\n  if (value === null || typeof value !== 'object') {\n    return false;\n  }\n  const prototype = Object.getPrototypeOf(value as object);\n  return prototype === Object.prototype || prototype === null;\n};\n\n/**\n * Turns URLSearchParams into a sorted JSON object for deterministic keys.\n */\nconst serializeSearchParams = (params: URLSearchParams): JsonValue => {\n  const entries = Array.from(params.entries()).sort(([a], [b]) => a.localeCompare(b));\n  const result: Record<string, JsonValue> = {};\n\n  for (const [key, value] of entries) {\n    const existing = result[key];\n    if (existing === undefined) {\n      result[key] = value;\n      continue;\n    }\n\n    if (Array.isArray(existing)) {\n      (existing as string[]).push(value);\n    } else {\n      result[key] = [existing, value];\n    }\n  }\n\n  return result;\n};\n\n/**\n * Normalizes any accepted value into a JSON-friendly shape for query keys.\n */\nexport const serializeQueryKeyValue = (value: unknown): JsonValue | undefined => {\n  if (value === null) {\n    return null;\n  }\n\n  if (typeof value === 'string' || typeof value === 'number' || typeof value === 'boolean') {\n    return value;\n  }\n\n  if (value === undefined || typeof value === 'function' || typeof value === 'symbol') {\n    return undefined;\n  }\n\n  if (typeof value === 'bigint') {\n    return value.toString();\n  }\n\n  if (value instanceof Date) {\n    return value.toISOString();\n  }\n\n  if (Array.isArray(value)) {\n    return stringifyToJsonValue(value);\n  }\n\n  if (typeof URLSearchParams !== 'undefined' && value instanceof URLSearchParams) {\n    return serializeSearchParams(value);\n  }\n\n  if (isPlainObject(value)) {\n    return stringifyToJsonValue(value);\n  }\n\n  return undefined;\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/react-query/fetch/core/serverSentEvents.gen.ts",
    "content": "// 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 const 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            // Normalize line endings: CRLF -> LF, then CR -> LF\n            buffer = buffer.replace(/\\r\\n/g, '\\n').replace(/\\r/g, '\\n');\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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/react-query/fetch/core/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { Auth, AuthToken } from './auth.gen';\nimport type { BodySerializer, QuerySerializer, QuerySerializerOptions } from './bodySerializer.gen';\n\nexport type HttpMethod =\n  | 'connect'\n  | 'delete'\n  | 'get'\n  | 'head'\n  | 'options'\n  | 'patch'\n  | 'post'\n  | 'put'\n  | 'trace';\n\nexport type Client<\n  RequestFn = never,\n  Config = unknown,\n  MethodFn = never,\n  BuildUrlFn = never,\n  SseFn = never,\n> = {\n  /**\n   * Returns the final request URL.\n   */\n  buildUrl: BuildUrlFn;\n  getConfig: () => Config;\n  request: RequestFn;\n  setConfig: (config: Config) => Config;\n} & {\n  [K in HttpMethod]: MethodFn;\n} & ([SseFn] extends [never] ? { sse?: never } : { sse: { [K in HttpMethod]: SseFn } });\n\nexport interface Config {\n  /**\n   * Auth token or a function returning auth token. The resolved value will be\n   * added to the request payload as defined by its `security` array.\n   */\n  auth?: ((auth: Auth) => Promise<AuthToken> | AuthToken) | AuthToken;\n  /**\n   * A function for serializing request body parameter. By default,\n   * {@link JSON.stringify()} will be used.\n   */\n  bodySerializer?: BodySerializer | null;\n  /**\n   * An object containing any HTTP headers that you want to pre-populate your\n   * `Headers` object with.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/Headers/Headers#init See more}\n   */\n  headers?:\n    | RequestInit['headers']\n    | Record<\n        string,\n        string | number | boolean | (string | number | boolean)[] | null | undefined | unknown\n      >;\n  /**\n   * The request method.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/fetch#method See more}\n   */\n  method?: Uppercase<HttpMethod>;\n  /**\n   * A function for serializing request query parameters. By default, arrays\n   * will be exploded in form style, objects will be exploded in deepObject\n   * style, and reserved characters are percent-encoded.\n   *\n   * This method will have no effect if the native `paramsSerializer()` Axios\n   * API function is used.\n   *\n   * {@link https://swagger.io/docs/specification/serialization/#query View examples}\n   */\n  querySerializer?: QuerySerializer | QuerySerializerOptions;\n  /**\n   * A function validating request data. This is useful if you want to ensure\n   * the request conforms to the desired shape, so it can be safely sent to\n   * the server.\n   */\n  requestValidator?: (data: unknown) => Promise<unknown>;\n  /**\n   * A function transforming response data before it's returned. This is useful\n   * for post-processing data, e.g. converting ISO strings into Date objects.\n   */\n  responseTransformer?: (data: unknown) => Promise<unknown>;\n  /**\n   * A function validating response data. This is useful if you want to ensure\n   * the response conforms to the desired shape, so it can be safely passed to\n   * the transformers and returned to the user.\n   */\n  responseValidator?: (data: unknown) => Promise<unknown>;\n}\n\ntype IsExactlyNeverOrNeverUndefined<T> = [T] extends [never]\n  ? true\n  : [T] extends [never | undefined]\n    ? [undefined] extends [T]\n      ? false\n      : true\n    : false;\n\nexport type OmitNever<T extends Record<string, unknown>> = {\n  [K in keyof T as IsExactlyNeverOrNeverUndefined<T[K]> extends true ? never : K]: T[K];\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/react-query/fetch/core/utils.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/react-query/fetch/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport { apiVVersionODataControllerCount, callToTestOrderOfParams, callWithDefaultOptionalParameters, callWithDefaultParameters, callWithDescriptions, callWithDuplicateResponses, callWithNoContentResponse, callWithParameters, callWithResponse, callWithResponseAndNoContentResponse, callWithResponses, callWithResultFromHeader, callWithWeirdParameterNames, collectionFormat, complexParams, complexTypes, deleteCallWithoutParametersAndResponse, deleteFoo, deprecatedCall, dummyA, dummyB, duplicateName, duplicateName2, duplicateName3, duplicateName4, export_, fileResponse, fooWow, getApiVbyApiVersionSimpleOperation, getCallWithOptionalParam, getCallWithoutParametersAndResponse, headCallWithoutParametersAndResponse, import_, multipartRequest, multipartResponse, nonAsciiæøåÆøÅöôêÊ字符串, type Options, optionsCallWithoutParametersAndResponse, patchApiVbyApiVersionNoTag, patchCallWithoutParametersAndResponse, postApiVbyApiVersionFormData, postApiVbyApiVersionRequestBody, postCallWithOptionalParam, postCallWithoutParametersAndResponse, putCallWithoutParametersAndResponse, putWithFormUrlEncoded, testErrorCode, types, uploadFile } from './sdk.gen';\nexport type { _3eNum1Период, _400, AdditionalPropertiesIntegerIssue, AdditionalPropertiesUnknownIssue, AdditionalPropertiesUnknownIssue2, AdditionalPropertiesUnknownIssue3, AdditionalPropertiesUnknownIssueWritable, AnyOfAnyAndNull, AnyOfArrays, ApiVVersionODataControllerCountData, ApiVVersionODataControllerCountResponse, ApiVVersionODataControllerCountResponses, ArrayWithAnyOfProperties, ArrayWithArray, ArrayWithBooleans, ArrayWithNumbers, ArrayWithProperties, ArrayWithReferences, ArrayWithStrings, CallToTestOrderOfParamsData, CallWithDefaultOptionalParametersData, CallWithDefaultParametersData, CallWithDescriptionsData, CallWithDuplicateResponsesData, CallWithDuplicateResponsesError, CallWithDuplicateResponsesErrors, CallWithDuplicateResponsesResponse, CallWithDuplicateResponsesResponses, CallWithNoContentResponseData, CallWithNoContentResponseResponse, CallWithNoContentResponseResponses, CallWithParametersData, CallWithResponseAndNoContentResponseData, CallWithResponseAndNoContentResponseResponse, CallWithResponseAndNoContentResponseResponses, CallWithResponseData, CallWithResponseResponse, CallWithResponseResponses, CallWithResponsesData, CallWithResponsesError, CallWithResponsesErrors, CallWithResponsesResponse, CallWithResponsesResponses, CallWithResultFromHeaderData, CallWithResultFromHeaderErrors, CallWithResultFromHeaderResponses, CallWithWeirdParameterNamesData, CamelCaseCommentWithBreaks, CharactersInDescription, ClientOptions, CollectionFormatData, CommentWithBackticks, CommentWithBackticksAndQuotes, CommentWithBreaks, CommentWithExpressionPlaceholders, CommentWithQuotes, CommentWithReservedCharacters, CommentWithSlashes, ComplexParamsData, ComplexParamsResponse, ComplexParamsResponses, ComplexTypesData, ComplexTypesErrors, ComplexTypesResponse, ComplexTypesResponses, CompositionBaseModel, CompositionExtendedModel, CompositionWithAllOfAndNullable, CompositionWithAnyOf, CompositionWithAnyOfAndNullable, CompositionWithAnyOfAnonymous, CompositionWithNestedAnyAndTypeNull, CompositionWithNestedAnyOfAndNull, CompositionWithOneOf, CompositionWithOneOfAndComplexArrayDictionary, CompositionWithOneOfAndNullable, CompositionWithOneOfAndProperties, CompositionWithOneOfAndSimpleArrayDictionary, CompositionWithOneOfAndSimpleDictionary, CompositionWithOneOfAnonymous, CompositionWithOneOfDiscriminator, ConstValue, Default, DeleteCallWithoutParametersAndResponseData, DeleteFooData, DeleteFooData2, DeleteFooData3, DeprecatedCallData, DeprecatedModel, DictionaryWithArray, DictionaryWithDictionary, DictionaryWithProperties, DictionaryWithPropertiesAndAdditionalProperties, DictionaryWithReference, DictionaryWithString, DummyAData, DummyAResponse, DummyAResponses, DummyBData, DummyBResponse, DummyBResponses, DuplicateName2Data, DuplicateName3Data, DuplicateName4Data, DuplicateNameData, EnumFromDescription, EnumWithExtensions, EnumWithNumbers, EnumWithReplacedCharacters, EnumWithStrings, EnumWithXEnumNames, ExportData, ExternalRefA, ExternalRefB, ExternalSharedModel, File, FileResponseData, FileResponseResponse, FileResponseResponses, FileWritable, FooWowData, FooWowResponses, FreeFormObjectWithAdditionalPropertiesEqEmptyObject, FreeFormObjectWithAdditionalPropertiesEqTrue, FreeFormObjectWithoutAdditionalProperties, GenericSchemaDuplicateIssue1SystemBoolean, GenericSchemaDuplicateIssue1SystemBooleanWritable, GenericSchemaDuplicateIssue1SystemString, GenericSchemaDuplicateIssue1SystemStringWritable, GetApiVbyApiVersionSimpleOperationData, GetApiVbyApiVersionSimpleOperationError, GetApiVbyApiVersionSimpleOperationErrors, GetApiVbyApiVersionSimpleOperationResponse, GetApiVbyApiVersionSimpleOperationResponses, GetCallWithOptionalParamData, GetCallWithoutParametersAndResponseData, HeadCallWithoutParametersAndResponseData, Import, ImportData, ImportResponse, ImportResponses, IoK8sApimachineryPkgApisMetaV1DeleteOptions, IoK8sApimachineryPkgApisMetaV1Preconditions, ModelCircle, ModelFromZendesk, ModelSquare, ModelThatExtends, ModelThatExtendsExtends, ModelWithAdditionalPropertiesEqTrue, ModelWithAdditionalPropertiesRef, ModelWithAnyOfConstantSizeArray, ModelWithAnyOfConstantSizeArrayAndIntersect, ModelWithAnyOfConstantSizeArrayNullable, ModelWithAnyOfConstantSizeArrayWithNSizeAndOptions, ModelWithAnyOfConstantSizeArrayWithNSizeAndOptionsWritable, ModelWithArray, ModelWithArrayReadOnlyAndWriteOnly, ModelWithArrayReadOnlyAndWriteOnlyWritable, ModelWithBackticksInDescription, ModelWithBoolean, ModelWithCircularReference, ModelWithConst, ModelWithConstantSizeArray, ModelWithDictionary, ModelWithDuplicateImports, ModelWithDuplicateProperties, ModelWithEnum, ModelWithEnumFromDescription, ModelWithEnumWithHyphen, ModelWithInteger, ModelWithNestedArrayEnums, ModelWithNestedArrayEnumsData, ModelWithNestedArrayEnumsDataBar, ModelWithNestedArrayEnumsDataFoo, ModelWithNestedCompositionEnums, ModelWithNestedEnums, ModelWithNestedProperties, ModelWithNullableObject, ModelWithNullableString, ModelWithNumericEnumUnion, ModelWithOneOfAndProperties, ModelWithOneOfEnum, ModelWithOrderedProperties, ModelWithPattern, ModelWithPatternWritable, ModelWithPrefixItemsConstantSizeArray, ModelWithProperties, ModelWithPropertiesWritable, ModelWithReadOnlyAndWriteOnly, ModelWithReadOnlyAndWriteOnlyWritable, ModelWithReference, ModelWithReferenceWritable, ModelWithString, ModelWithStringError, MultipartRequestData, MultipartResponseData, MultipartResponseResponse, MultipartResponseResponses, NestedAnyOfArraysNullable, NonAsciiæøåÆøÅöôêÊ字符串Data, NonAsciiæøåÆøÅöôêÊ字符串Response, NonAsciiæøåÆøÅöôêÊ字符串Responses, NonAsciiStringæøåÆøÅöôêÊ字符串, NullableObject, OneOfAllOfIssue, OneOfAllOfIssueWritable, OptionsCallWithoutParametersAndResponseData, Pageable, ParameterSimpleParameterUnused, PatchApiVbyApiVersionNoTagData, PatchApiVbyApiVersionNoTagResponses, PatchCallWithoutParametersAndResponseData, PostApiVbyApiVersionFormDataData, PostApiVbyApiVersionRequestBodyData, PostCallWithOptionalParamData, PostCallWithOptionalParamResponse, PostCallWithOptionalParamResponses, PostCallWithoutParametersAndResponseData, PostServiceWithEmptyTagResponse, PostServiceWithEmptyTagResponse2, PutCallWithoutParametersAndResponseData, PutWithFormUrlEncodedData, SchemaWithFormRestrictedKeys, SimpleBoolean, SimpleFile, SimpleFormData, SimpleInteger, SimpleParameter, SimpleReference, SimpleRequestBody, SimpleString, SimpleStringWithPattern, TestErrorCodeData, TestErrorCodeErrors, TestErrorCodeResponses, TypesData, TypesResponse, TypesResponses, UploadFileData, UploadFileResponse, UploadFileResponses, XFooBar } from './types.gen';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/react-query/fetch/sdk.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport { type Client, formDataBodySerializer, type Options as Options2, type TDataShape, urlSearchParamsBodySerializer } from './client';\nimport { client } from './client.gen';\nimport type { ApiVVersionODataControllerCountData, ApiVVersionODataControllerCountResponses, CallToTestOrderOfParamsData, CallWithDefaultOptionalParametersData, CallWithDefaultParametersData, CallWithDescriptionsData, CallWithDuplicateResponsesData, CallWithDuplicateResponsesErrors, CallWithDuplicateResponsesResponses, CallWithNoContentResponseData, CallWithNoContentResponseResponses, CallWithParametersData, CallWithResponseAndNoContentResponseData, CallWithResponseAndNoContentResponseResponses, CallWithResponseData, CallWithResponseResponses, CallWithResponsesData, CallWithResponsesErrors, CallWithResponsesResponses, CallWithResultFromHeaderData, CallWithResultFromHeaderErrors, CallWithResultFromHeaderResponses, CallWithWeirdParameterNamesData, CollectionFormatData, ComplexParamsData, ComplexParamsResponses, ComplexTypesData, ComplexTypesErrors, ComplexTypesResponses, DeleteCallWithoutParametersAndResponseData, DeleteFooData3, DeprecatedCallData, DummyAData, DummyAResponses, DummyBData, DummyBResponses, DuplicateName2Data, DuplicateName3Data, DuplicateName4Data, DuplicateNameData, ExportData, FileResponseData, FileResponseResponses, FooWowData, FooWowResponses, GetApiVbyApiVersionSimpleOperationData, GetApiVbyApiVersionSimpleOperationErrors, GetApiVbyApiVersionSimpleOperationResponses, GetCallWithOptionalParamData, GetCallWithoutParametersAndResponseData, HeadCallWithoutParametersAndResponseData, ImportData, ImportResponses, MultipartRequestData, MultipartResponseData, MultipartResponseResponses, NonAsciiæøåÆøÅöôêÊ字符串Data, NonAsciiæøåÆøÅöôêÊ字符串Responses, OptionsCallWithoutParametersAndResponseData, PatchApiVbyApiVersionNoTagData, PatchApiVbyApiVersionNoTagResponses, PatchCallWithoutParametersAndResponseData, PostApiVbyApiVersionFormDataData, PostApiVbyApiVersionRequestBodyData, PostCallWithOptionalParamData, PostCallWithOptionalParamResponses, PostCallWithoutParametersAndResponseData, PutCallWithoutParametersAndResponseData, PutWithFormUrlEncodedData, TestErrorCodeData, TestErrorCodeErrors, TestErrorCodeResponses, TypesData, TypesResponses, UploadFileData, UploadFileResponses } from './types.gen';\n\nexport type Options<TData extends TDataShape = TDataShape, ThrowOnError extends boolean = boolean> = Options2<TData, ThrowOnError> & {\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\nexport const export_ = <ThrowOnError extends boolean = false>(options?: Options<ExportData, ThrowOnError>) => (options?.client ?? client).get<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/no+tag', ...options });\n\nexport const patchApiVbyApiVersionNoTag = <ThrowOnError extends boolean = false>(options?: Options<PatchApiVbyApiVersionNoTagData, ThrowOnError>) => (options?.client ?? client).patch<PatchApiVbyApiVersionNoTagResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/no+tag', ...options });\n\nexport const import_ = <ThrowOnError extends boolean = false>(options: Options<ImportData, ThrowOnError>) => (options.client ?? client).post<ImportResponses, unknown, ThrowOnError>({\n    url: '/api/v{api-version}/no+tag',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options.headers\n    }\n});\n\nexport const fooWow = <ThrowOnError extends boolean = false>(options?: Options<FooWowData, ThrowOnError>) => (options?.client ?? client).put<FooWowResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/no+tag', ...options });\n\nexport const apiVVersionODataControllerCount = <ThrowOnError extends boolean = false>(options?: Options<ApiVVersionODataControllerCountData, ThrowOnError>) => (options?.client ?? client).get<ApiVVersionODataControllerCountResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple/$count', ...options });\n\nexport const getApiVbyApiVersionSimpleOperation = <ThrowOnError extends boolean = false>(options: Options<GetApiVbyApiVersionSimpleOperationData, ThrowOnError>) => (options.client ?? client).get<GetApiVbyApiVersionSimpleOperationResponses, GetApiVbyApiVersionSimpleOperationErrors, ThrowOnError>({ url: '/api/v{api-version}/simple:operation', ...options });\n\nexport const deleteCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<DeleteCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).delete<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const getCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<GetCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).get<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const headCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<HeadCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).head<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const optionsCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<OptionsCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).options<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const patchCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<PatchCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).patch<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const postCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<PostCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).post<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const putCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<PutCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).put<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const deleteFoo = <ThrowOnError extends boolean = false>(options: Options<DeleteFooData3, ThrowOnError>) => (options.client ?? client).delete<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/foo/{foo_param}/bar/{BarParam}', ...options });\n\nexport const callWithDescriptions = <ThrowOnError extends boolean = false>(options?: Options<CallWithDescriptionsData, ThrowOnError>) => (options?.client ?? client).post<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/descriptions', ...options });\n\n/**\n * @deprecated\n */\nexport const deprecatedCall = <ThrowOnError extends boolean = false>(options: Options<DeprecatedCallData, ThrowOnError>) => (options.client ?? client).post<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/parameters/deprecated', ...options });\n\nexport const callWithParameters = <ThrowOnError extends boolean = false>(options: Options<CallWithParametersData, ThrowOnError>) => (options.client ?? client).post<unknown, unknown, ThrowOnError>({\n    url: '/api/v{api-version}/parameters/{parameterPath}',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options.headers\n    }\n});\n\nexport const callWithWeirdParameterNames = <ThrowOnError extends boolean = false>(options: Options<CallWithWeirdParameterNamesData, ThrowOnError>) => (options.client ?? client).post<unknown, unknown, ThrowOnError>({\n    url: '/api/v{api-version}/parameters/{parameter.path.1}/{parameter-path-2}/{PARAMETER-PATH-3}',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options.headers\n    }\n});\n\nexport const getCallWithOptionalParam = <ThrowOnError extends boolean = false>(options: Options<GetCallWithOptionalParamData, ThrowOnError>) => (options.client ?? client).get<unknown, unknown, ThrowOnError>({\n    url: '/api/v{api-version}/parameters',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options.headers\n    }\n});\n\nexport const postCallWithOptionalParam = <ThrowOnError extends boolean = false>(options: Options<PostCallWithOptionalParamData, ThrowOnError>) => (options.client ?? client).post<PostCallWithOptionalParamResponses, unknown, ThrowOnError>({\n    url: '/api/v{api-version}/parameters',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options.headers\n    }\n});\n\nexport const postApiVbyApiVersionRequestBody = <ThrowOnError extends boolean = false>(options?: Options<PostApiVbyApiVersionRequestBodyData, ThrowOnError>) => (options?.client ?? client).post<unknown, unknown, ThrowOnError>({\n    url: '/api/v{api-version}/requestBody',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options?.headers\n    }\n});\n\nexport const postApiVbyApiVersionFormData = <ThrowOnError extends boolean = false>(options?: Options<PostApiVbyApiVersionFormDataData, ThrowOnError>) => (options?.client ?? client).post<unknown, unknown, ThrowOnError>({\n    ...formDataBodySerializer,\n    url: '/api/v{api-version}/formData',\n    ...options,\n    headers: {\n        'Content-Type': null,\n        ...options?.headers\n    }\n});\n\nexport const callWithDefaultParameters = <ThrowOnError extends boolean = false>(options?: Options<CallWithDefaultParametersData, ThrowOnError>) => (options?.client ?? client).get<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/defaults', ...options });\n\nexport const callWithDefaultOptionalParameters = <ThrowOnError extends boolean = false>(options?: Options<CallWithDefaultOptionalParametersData, ThrowOnError>) => (options?.client ?? client).post<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/defaults', ...options });\n\nexport const callToTestOrderOfParams = <ThrowOnError extends boolean = false>(options: Options<CallToTestOrderOfParamsData, ThrowOnError>) => (options.client ?? client).put<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/defaults', ...options });\n\nexport const duplicateName = <ThrowOnError extends boolean = false>(options?: Options<DuplicateNameData, ThrowOnError>) => (options?.client ?? client).delete<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/duplicate', ...options });\n\nexport const duplicateName2 = <ThrowOnError extends boolean = false>(options?: Options<DuplicateName2Data, ThrowOnError>) => (options?.client ?? client).get<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/duplicate', ...options });\n\nexport const duplicateName3 = <ThrowOnError extends boolean = false>(options?: Options<DuplicateName3Data, ThrowOnError>) => (options?.client ?? client).post<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/duplicate', ...options });\n\nexport const duplicateName4 = <ThrowOnError extends boolean = false>(options?: Options<DuplicateName4Data, ThrowOnError>) => (options?.client ?? client).put<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/duplicate', ...options });\n\nexport const callWithNoContentResponse = <ThrowOnError extends boolean = false>(options?: Options<CallWithNoContentResponseData, ThrowOnError>) => (options?.client ?? client).get<CallWithNoContentResponseResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/no-content', ...options });\n\nexport const callWithResponseAndNoContentResponse = <ThrowOnError extends boolean = false>(options?: Options<CallWithResponseAndNoContentResponseData, ThrowOnError>) => (options?.client ?? client).get<CallWithResponseAndNoContentResponseResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/multiple-tags/response-and-no-content', ...options });\n\nexport const dummyA = <ThrowOnError extends boolean = false>(options?: Options<DummyAData, ThrowOnError>) => (options?.client ?? client).get<DummyAResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/multiple-tags/a', ...options });\n\nexport const dummyB = <ThrowOnError extends boolean = false>(options?: Options<DummyBData, ThrowOnError>) => (options?.client ?? client).get<DummyBResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/multiple-tags/b', ...options });\n\nexport const callWithResponse = <ThrowOnError extends boolean = false>(options?: Options<CallWithResponseData, ThrowOnError>) => (options?.client ?? client).get<CallWithResponseResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/response', ...options });\n\nexport const callWithDuplicateResponses = <ThrowOnError extends boolean = false>(options?: Options<CallWithDuplicateResponsesData, ThrowOnError>) => (options?.client ?? client).post<CallWithDuplicateResponsesResponses, CallWithDuplicateResponsesErrors, ThrowOnError>({ url: '/api/v{api-version}/response', ...options });\n\nexport const callWithResponses = <ThrowOnError extends boolean = false>(options?: Options<CallWithResponsesData, ThrowOnError>) => (options?.client ?? client).put<CallWithResponsesResponses, CallWithResponsesErrors, ThrowOnError>({ url: '/api/v{api-version}/response', ...options });\n\nexport const collectionFormat = <ThrowOnError extends boolean = false>(options: Options<CollectionFormatData, ThrowOnError>) => (options.client ?? client).get<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/collectionFormat', ...options });\n\nexport const types = <ThrowOnError extends boolean = false>(options: Options<TypesData, ThrowOnError>) => (options.client ?? client).get<TypesResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/types', ...options });\n\nexport const uploadFile = <ThrowOnError extends boolean = false>(options: Options<UploadFileData, ThrowOnError>) => (options.client ?? client).post<UploadFileResponses, unknown, ThrowOnError>({\n    ...urlSearchParamsBodySerializer,\n    url: '/api/v{api-version}/upload',\n    ...options,\n    headers: {\n        'Content-Type': 'application/x-www-form-urlencoded',\n        ...options.headers\n    }\n});\n\nexport const fileResponse = <ThrowOnError extends boolean = false>(options: Options<FileResponseData, ThrowOnError>) => (options.client ?? client).get<FileResponseResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/file/{id}', ...options });\n\nexport const complexTypes = <ThrowOnError extends boolean = false>(options: Options<ComplexTypesData, ThrowOnError>) => (options.client ?? client).get<ComplexTypesResponses, ComplexTypesErrors, ThrowOnError>({\n    querySerializer: { parameters: { parameterObject: { object: { style: 'form' } } } },\n    url: '/api/v{api-version}/complex',\n    ...options\n});\n\nexport const multipartResponse = <ThrowOnError extends boolean = false>(options?: Options<MultipartResponseData, ThrowOnError>) => (options?.client ?? client).get<MultipartResponseResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/multipart', ...options });\n\nexport const multipartRequest = <ThrowOnError extends boolean = false>(options?: Options<MultipartRequestData, ThrowOnError>) => (options?.client ?? client).post<unknown, unknown, ThrowOnError>({\n    ...formDataBodySerializer,\n    url: '/api/v{api-version}/multipart',\n    ...options,\n    headers: {\n        'Content-Type': null,\n        ...options?.headers\n    }\n});\n\nexport const complexParams = <ThrowOnError extends boolean = false>(options: Options<ComplexParamsData, ThrowOnError>) => (options.client ?? client).put<ComplexParamsResponses, unknown, ThrowOnError>({\n    url: '/api/v{api-version}/complex/{id}',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json-patch+json',\n        ...options.headers\n    }\n});\n\nexport const callWithResultFromHeader = <ThrowOnError extends boolean = false>(options?: Options<CallWithResultFromHeaderData, ThrowOnError>) => (options?.client ?? client).post<CallWithResultFromHeaderResponses, CallWithResultFromHeaderErrors, ThrowOnError>({ url: '/api/v{api-version}/header', ...options });\n\nexport const testErrorCode = <ThrowOnError extends boolean = false>(options: Options<TestErrorCodeData, ThrowOnError>) => (options.client ?? client).post<TestErrorCodeResponses, TestErrorCodeErrors, ThrowOnError>({ url: '/api/v{api-version}/error', ...options });\n\nexport const nonAsciiæøåÆøÅöôêÊ字符串 = <ThrowOnError extends boolean = false>(options: Options<NonAsciiæøåÆøÅöôêÊ字符串Data, ThrowOnError>) => (options.client ?? client).post<NonAsciiæøåÆøÅöôêÊ字符串Responses, unknown, ThrowOnError>({ url: '/api/v{api-version}/non-ascii-æøåÆØÅöôêÊ字符串', ...options });\n\n/**\n * Login User\n */\nexport const putWithFormUrlEncoded = <ThrowOnError extends boolean = false>(options: Options<PutWithFormUrlEncodedData, ThrowOnError>) => (options.client ?? client).put<unknown, unknown, ThrowOnError>({\n    ...urlSearchParamsBodySerializer,\n    url: '/api/v{api-version}/non-ascii-æøåÆØÅöôêÊ字符串',\n    ...options,\n    headers: {\n        'Content-Type': 'application/x-www-form-urlencoded',\n        ...options.headers\n    }\n});\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/react-query/fetch/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type ClientOptions = {\n    baseUrl: 'http://localhost:3000/base' | (string & {});\n};\n\n/**\n * Model with number-only name\n */\nexport type _400 = string;\n\n/**\n * External ref to shared model (A)\n */\nexport type ExternalRefA = ExternalSharedModel;\n\n/**\n * External ref to shared model (B)\n */\nexport type ExternalRefB = ExternalSharedModel;\n\n/**\n * Testing multiline comments in string: First line\n * Second line\n *\n * Fourth line\n */\nexport type CamelCaseCommentWithBreaks = number;\n\n/**\n * Testing multiline comments in string: First line\n * Second line\n *\n * Fourth line\n */\nexport type CommentWithBreaks = number;\n\n/**\n * Testing backticks in string: `backticks` and ```multiple backticks``` should work\n */\nexport type CommentWithBackticks = number;\n\n/**\n * Testing backticks and quotes in string: `backticks`, 'quotes', \"double quotes\" and ```multiple backticks``` should work\n */\nexport type CommentWithBackticksAndQuotes = number;\n\n/**\n * Testing slashes in string: \\backwards\\\\\\ and /forwards/// should work\n */\nexport type CommentWithSlashes = number;\n\n/**\n * Testing expression placeholders in string: ${expression} should work\n */\nexport type CommentWithExpressionPlaceholders = number;\n\n/**\n * Testing quotes in string: 'single quote''' and \"double quotes\"\"\" should work\n */\nexport type CommentWithQuotes = number;\n\n/**\n * Testing reserved characters in string: * inline * and ** inline ** should work\n */\nexport type CommentWithReservedCharacters = number;\n\n/**\n * This is a simple number\n */\nexport type SimpleInteger = number;\n\n/**\n * This is a simple boolean\n */\nexport type SimpleBoolean = boolean;\n\n/**\n * This is a simple string\n */\nexport type SimpleString = string;\n\n/**\n * A string with non-ascii (unicode) characters valid in typescript identifiers (æøåÆØÅöÔèÈ字符串)\n */\nexport type NonAsciiStringæøåÆøÅöôêÊ字符串 = string;\n\n/**\n * This is a simple file\n */\nexport type SimpleFile = Blob | File;\n\n/**\n * This is a simple reference\n */\nexport type SimpleReference = ModelWithString;\n\n/**\n * This is a simple string\n */\nexport type SimpleStringWithPattern = string | null;\n\n/**\n * This is a simple enum with strings\n */\nexport type EnumWithStrings = 'Success' | 'Warning' | 'Error' | '\\'Single Quote\\'' | '\"Double Quotes\"' | 'Non-ascii: øæåôöØÆÅÔÖ字符串';\n\nexport type EnumWithReplacedCharacters = '\\'Single Quote\\'' | '\"Double Quotes\"' | 'øæåôöØÆÅÔÖ字符串' | 3.1 | '';\n\n/**\n * This is a simple enum with numbers\n */\nexport type EnumWithNumbers = 1 | 2 | 3 | 1.1 | 1.2 | 1.3 | 100 | 200 | 300 | -100 | -200 | -300 | -1.1 | -1.2 | -1.3;\n\n/**\n * Success=1,Warning=2,Error=3\n */\nexport type EnumFromDescription = number;\n\n/**\n * This is a simple enum with numbers\n */\nexport type EnumWithExtensions = 200 | 400 | 500;\n\nexport type EnumWithXEnumNames = 0 | 1 | 2;\n\n/**\n * This is a simple array with numbers\n */\nexport type ArrayWithNumbers = Array<number>;\n\n/**\n * This is a simple array with booleans\n */\nexport type ArrayWithBooleans = Array<boolean>;\n\n/**\n * This is a simple array with strings\n */\nexport type ArrayWithStrings = Array<string>;\n\n/**\n * This is a simple array with references\n */\nexport type ArrayWithReferences = Array<ModelWithString>;\n\n/**\n * This is a simple array containing an array\n */\nexport type ArrayWithArray = Array<Array<ModelWithString>>;\n\n/**\n * This is a simple array with properties\n */\nexport type ArrayWithProperties = Array<{\n    '16x16'?: CamelCaseCommentWithBreaks;\n    bar?: string;\n}>;\n\n/**\n * This is a simple array with any of properties\n */\nexport type ArrayWithAnyOfProperties = Array<{\n    foo?: string;\n} | {\n    bar?: string;\n}>;\n\nexport type AnyOfAnyAndNull = {\n    data?: unknown | null;\n};\n\n/**\n * This is a simple array with any of properties\n */\nexport type AnyOfArrays = {\n    results?: Array<{\n        foo?: string;\n    } | {\n        bar?: string;\n    }>;\n};\n\n/**\n * This is a string dictionary\n */\nexport type DictionaryWithString = {\n    [key: string]: string;\n};\n\nexport type DictionaryWithPropertiesAndAdditionalProperties = {\n    foo?: number;\n    bar?: boolean;\n    [key: string]: string | number | boolean | undefined;\n};\n\n/**\n * This is a string reference\n */\nexport type DictionaryWithReference = {\n    [key: string]: ModelWithString;\n};\n\n/**\n * This is a complex dictionary\n */\nexport type DictionaryWithArray = {\n    [key: string]: Array<ModelWithString>;\n};\n\n/**\n * This is a string dictionary\n */\nexport type DictionaryWithDictionary = {\n    [key: string]: {\n        [key: string]: string;\n    };\n};\n\n/**\n * This is a complex dictionary\n */\nexport type DictionaryWithProperties = {\n    [key: string]: {\n        foo?: string;\n        bar?: string;\n    };\n};\n\n/**\n * This is a model with one number property\n */\nexport type ModelWithInteger = {\n    /**\n     * This is a simple number property\n     */\n    prop?: number;\n};\n\n/**\n * This is a model with one boolean property\n */\nexport type ModelWithBoolean = {\n    /**\n     * This is a simple boolean property\n     */\n    prop?: boolean;\n};\n\n/**\n * This is a model with one string property\n */\nexport type ModelWithString = {\n    /**\n     * This is a simple string property\n     */\n    prop?: string;\n};\n\n/**\n * This is a model with one string property\n */\nexport type ModelWithStringError = {\n    /**\n     * This is a simple string property\n     */\n    prop?: string;\n};\n\n/**\n * `Comment` or `VoiceComment`. The JSON object for adding voice comments to tickets is different. See [Adding voice comments to tickets](/documentation/ticketing/managing-tickets/adding-voice-comments-to-tickets)\n */\nexport type ModelFromZendesk = string;\n\n/**\n * This is a model with one string property\n */\nexport type ModelWithNullableString = {\n    /**\n     * This is a simple string property\n     */\n    nullableProp1?: string | null;\n    /**\n     * This is a simple string property\n     */\n    nullableRequiredProp1: string | null;\n    /**\n     * This is a simple string property\n     */\n    nullableProp2?: string | null;\n    /**\n     * This is a simple string property\n     */\n    nullableRequiredProp2: string | null;\n    /**\n     * This is a simple enum with strings\n     */\n    'foo_bar-enum'?: 'Success' | 'Warning' | 'Error' | 'ØÆÅ字符串';\n};\n\n/**\n * This is a model with one enum\n */\nexport type ModelWithEnum = {\n    /**\n     * This is a simple enum with strings\n     */\n    'foo_bar-enum'?: 'Success' | 'Warning' | 'Error' | 'ØÆÅ字符串';\n    /**\n     * These are the HTTP error code enums\n     */\n    statusCode?: '100' | '200 FOO' | '300 FOO_BAR' | '400 foo-bar' | '500 foo.bar' | '600 foo&bar';\n    /**\n     * Simple boolean enum\n     */\n    bool?: true;\n};\n\n/**\n * This is a model with one enum with escaped name\n */\nexport type ModelWithEnumWithHyphen = {\n    /**\n     * Foo-Bar-Baz-Qux\n     */\n    'foo-bar-baz-qux'?: '3.0';\n};\n\n/**\n * This is a model with one enum\n */\nexport type ModelWithEnumFromDescription = {\n    /**\n     * Success=1,Warning=2,Error=3\n     */\n    test?: number;\n};\n\n/**\n * This is a model with nested enums\n */\nexport type ModelWithNestedEnums = {\n    dictionaryWithEnum?: {\n        [key: string]: 'Success' | 'Warning' | 'Error';\n    };\n    dictionaryWithEnumFromDescription?: {\n        [key: string]: number;\n    };\n    arrayWithEnum?: Array<'Success' | 'Warning' | 'Error'>;\n    arrayWithDescription?: Array<number>;\n    /**\n     * This is a simple enum with strings\n     */\n    'foo_bar-enum'?: 'Success' | 'Warning' | 'Error' | 'ØÆÅ字符串';\n};\n\n/**\n * This is a model with one property containing a reference\n */\nexport type ModelWithReference = {\n    prop?: ModelWithProperties;\n};\n\n/**\n * This is a model with one property containing an array\n */\nexport type ModelWithArrayReadOnlyAndWriteOnly = {\n    prop?: Array<ModelWithReadOnlyAndWriteOnly>;\n    propWithFile?: Array<Blob | File>;\n    propWithNumber?: Array<number>;\n};\n\n/**\n * This is a model with one property containing an array\n */\nexport type ModelWithArray = {\n    prop?: Array<ModelWithString>;\n    propWithFile?: Array<Blob | File>;\n    propWithNumber?: Array<number>;\n};\n\n/**\n * This is a model with one property containing a dictionary\n */\nexport type ModelWithDictionary = {\n    prop?: {\n        [key: string]: string;\n    };\n};\n\n/**\n * This is a deprecated model with a deprecated property\n *\n * @deprecated\n */\nexport type DeprecatedModel = {\n    /**\n     * This is a deprecated property\n     *\n     * @deprecated\n     */\n    prop?: string;\n};\n\n/**\n * This is a model with one property containing a circular reference\n */\nexport type ModelWithCircularReference = {\n    prop?: ModelWithCircularReference;\n};\n\n/**\n * This is a model with one property with a 'one of' relationship\n */\nexport type CompositionWithOneOf = {\n    propA?: ModelWithString | ModelWithEnum | ModelWithArray | ModelWithDictionary;\n};\n\n/**\n * This is a model with one property with a 'one of' relationship where the options are not $ref\n */\nexport type CompositionWithOneOfAnonymous = {\n    propA?: {\n        propA?: string;\n    } | string | number;\n};\n\n/**\n * Circle\n */\nexport type ModelCircle = {\n    kind: string;\n    radius?: number;\n};\n\n/**\n * Square\n */\nexport type ModelSquare = {\n    kind: string;\n    sideLength?: number;\n};\n\n/**\n * This is a model with one property with a 'one of' relationship where the options are not $ref\n */\nexport type CompositionWithOneOfDiscriminator = ({\n    kind: 'circle';\n} & ModelCircle) | ({\n    kind: 'square';\n} & ModelSquare);\n\n/**\n * This is a model with one property with a 'any of' relationship\n */\nexport type CompositionWithAnyOf = {\n    propA?: ModelWithString | ModelWithEnum | ModelWithArray | ModelWithDictionary;\n};\n\n/**\n * This is a model with one property with a 'any of' relationship where the options are not $ref\n */\nexport type CompositionWithAnyOfAnonymous = {\n    propA?: {\n        propA?: string;\n    } | string | number;\n};\n\n/**\n * This is a model with nested 'any of' property with a type null\n */\nexport type CompositionWithNestedAnyAndTypeNull = {\n    propA?: Array<ModelWithDictionary | null> | Array<ModelWithArray | null>;\n};\n\nexport type _3eNum1Период = 'Bird' | 'Dog';\n\nexport type ConstValue = 'ConstValue';\n\n/**\n * This is a model with one property with a 'any of' relationship where the options are not $ref\n */\nexport type CompositionWithNestedAnyOfAndNull = {\n    /**\n     * Scopes\n     */\n    propA?: Array<_3eNum1Период | ConstValue> | null;\n};\n\n/**\n * This is a model with one property with a 'one of' relationship\n */\nexport type CompositionWithOneOfAndNullable = {\n    propA?: {\n        boolean?: boolean;\n    } | ModelWithEnum | ModelWithArray | ModelWithDictionary | null;\n};\n\n/**\n * This is a model that contains a simple dictionary within composition\n */\nexport type CompositionWithOneOfAndSimpleDictionary = {\n    propA?: boolean | {\n        [key: string]: number;\n    };\n};\n\n/**\n * This is a model that contains a dictionary of simple arrays within composition\n */\nexport type CompositionWithOneOfAndSimpleArrayDictionary = {\n    propA?: boolean | {\n        [key: string]: Array<boolean>;\n    };\n};\n\n/**\n * This is a model that contains a dictionary of complex arrays (composited) within composition\n */\nexport type CompositionWithOneOfAndComplexArrayDictionary = {\n    propA?: boolean | {\n        [key: string]: Array<number | string>;\n    };\n};\n\n/**\n * This is a model with one property with a 'all of' relationship\n */\nexport type CompositionWithAllOfAndNullable = {\n    propA?: ({\n        boolean?: boolean;\n    } & ModelWithEnum & ModelWithArray & ModelWithDictionary) | null;\n};\n\n/**\n * This is a model with one property with a 'any of' relationship\n */\nexport type CompositionWithAnyOfAndNullable = {\n    propA?: {\n        boolean?: boolean;\n    } | ModelWithEnum | ModelWithArray | ModelWithDictionary | null;\n};\n\n/**\n * This is a base model with two simple optional properties\n */\nexport type CompositionBaseModel = {\n    firstName?: string;\n    lastname?: string;\n};\n\n/**\n * This is a model that extends the base model\n */\nexport type CompositionExtendedModel = CompositionBaseModel & {\n    age: number;\n    firstName: string;\n    lastname: string;\n};\n\n/**\n * This is a model with one nested property\n */\nexport type ModelWithProperties = {\n    required: string;\n    readonly requiredAndReadOnly: string;\n    requiredAndNullable: string | null;\n    string?: string;\n    number?: number;\n    boolean?: boolean;\n    reference?: ModelWithString;\n    'property with space'?: string;\n    default?: string;\n    try?: string;\n    readonly '@namespace.string'?: string;\n    readonly '@namespace.integer'?: number;\n};\n\n/**\n * This is a model with one nested property\n */\nexport type ModelWithNestedProperties = {\n    readonly first: {\n        readonly second: {\n            readonly third: string | null;\n        } | null;\n    } | null;\n};\n\n/**\n * This is a model with duplicated properties\n */\nexport type ModelWithDuplicateProperties = {\n    prop?: ModelWithString;\n};\n\n/**\n * This is a model with ordered properties\n */\nexport type ModelWithOrderedProperties = {\n    zebra?: string;\n    apple?: string;\n    hawaii?: string;\n};\n\n/**\n * This is a model with duplicated imports\n */\nexport type ModelWithDuplicateImports = {\n    propA?: ModelWithString;\n    propB?: ModelWithString;\n    propC?: ModelWithString;\n};\n\n/**\n * This is a model that extends another model\n */\nexport type ModelThatExtends = ModelWithString & {\n    propExtendsA?: string;\n    propExtendsB?: ModelWithString;\n};\n\n/**\n * This is a model that extends another model\n */\nexport type ModelThatExtendsExtends = ModelWithString & ModelThatExtends & {\n    propExtendsC?: string;\n    propExtendsD?: ModelWithString;\n};\n\n/**\n * This is a model that contains a some patterns\n */\nexport type ModelWithPattern = {\n    key: string;\n    name: string;\n    readonly enabled?: boolean;\n    readonly modified?: string;\n    id?: string;\n    text?: string;\n    patternWithSingleQuotes?: string;\n    patternWithNewline?: string;\n    patternWithBacktick?: string;\n    patternWithUnicode?: string;\n};\n\nexport type File = {\n    /**\n     * Id\n     */\n    readonly id?: string;\n    /**\n     * Updated at\n     */\n    readonly updated_at?: string;\n    /**\n     * Created at\n     */\n    readonly created_at?: string;\n    /**\n     * Mime\n     */\n    mime: string;\n    /**\n     * File\n     */\n    readonly file?: string;\n};\n\nexport type Default = {\n    name?: string;\n};\n\nexport type Pageable = {\n    page?: number;\n    size?: number;\n    sort?: Array<string>;\n};\n\n/**\n * This is a free-form object without additionalProperties.\n */\nexport type FreeFormObjectWithoutAdditionalProperties = {\n    [key: string]: unknown;\n};\n\n/**\n * This is a free-form object with additionalProperties: true.\n */\nexport type FreeFormObjectWithAdditionalPropertiesEqTrue = {\n    [key: string]: unknown;\n};\n\n/**\n * This is a free-form object with additionalProperties: {}.\n */\nexport type FreeFormObjectWithAdditionalPropertiesEqEmptyObject = {\n    [key: string]: unknown;\n};\n\nexport type ModelWithConst = {\n    String?: 'String';\n    number?: 0;\n    null?: null;\n    withType?: 'Some string';\n};\n\n/**\n * This is a model with one property and additionalProperties: true\n */\nexport type ModelWithAdditionalPropertiesEqTrue = {\n    /**\n     * This is a simple string property\n     */\n    prop?: string;\n    [key: string]: unknown;\n};\n\nexport type NestedAnyOfArraysNullable = {\n    nullableArray?: Array<string | boolean> | null;\n};\n\nexport type CompositionWithOneOfAndProperties = ({\n    foo: SimpleParameter;\n} | {\n    bar: NonAsciiStringæøåÆøÅöôêÊ字符串;\n}) & {\n    baz: number | null;\n    qux: number;\n};\n\n/**\n * An object that can be null\n */\nexport type NullableObject = {\n    foo?: string;\n} | null;\n\n/**\n * Some % character\n */\nexport type CharactersInDescription = string;\n\nexport type ModelWithNullableObject = {\n    data?: NullableObject;\n};\n\n/**\n * An object with additional properties that can be null (anyOf ref + null)\n */\nexport type ModelWithAdditionalPropertiesRef = {\n    [key: string]: NullableObject | null;\n};\n\nexport type ModelWithOneOfEnum = {\n    foo: 'Bar';\n} | {\n    foo: 'Baz';\n} | {\n    foo: 'Qux';\n} | {\n    content: string;\n    foo: 'Quux';\n} | {\n    content: [\n        string,\n        string\n    ];\n    foo: 'Corge';\n};\n\nexport type ModelWithNestedArrayEnumsDataFoo = 'foo' | 'bar';\n\nexport type ModelWithNestedArrayEnumsDataBar = 'baz' | 'qux';\n\nexport type ModelWithNestedArrayEnumsData = {\n    foo?: Array<ModelWithNestedArrayEnumsDataFoo>;\n    bar?: Array<ModelWithNestedArrayEnumsDataBar>;\n};\n\nexport type ModelWithNestedArrayEnums = {\n    array_strings?: Array<string>;\n    data?: ModelWithNestedArrayEnumsData;\n};\n\nexport type ModelWithNestedCompositionEnums = {\n    foo?: ModelWithNestedArrayEnumsDataFoo;\n};\n\nexport type ModelWithReadOnlyAndWriteOnly = {\n    foo: string;\n    readonly bar: string;\n};\n\nexport type ModelWithConstantSizeArray = [\n    number,\n    number\n];\n\nexport type ModelWithAnyOfConstantSizeArray = [\n    number | string,\n    number | string,\n    number | string\n];\n\nexport type ModelWithPrefixItemsConstantSizeArray = [\n    ModelWithInteger,\n    number | string,\n    string\n];\n\nexport type ModelWithAnyOfConstantSizeArrayNullable = [\n    number | null | string,\n    number | null | string,\n    number | null | string\n];\n\nexport type ModelWithAnyOfConstantSizeArrayWithNSizeAndOptions = [\n    number | Import,\n    number | Import\n];\n\nexport type ModelWithAnyOfConstantSizeArrayAndIntersect = [\n    number & string,\n    number & string\n];\n\nexport type ModelWithNumericEnumUnion = {\n    /**\n     * Период\n     */\n    value?: -10 | -1 | 0 | 1 | 3 | 6 | 12;\n};\n\n/**\n * Some description with `back ticks`\n */\nexport type ModelWithBackticksInDescription = {\n    /**\n     * The template `that` should be used for parsing and importing the contents of the CSV file.\n     *\n     * <br/><p>There is one placeholder currently supported:<ul>     <li><b>${x}</b> - refers to the n-th column in the CSV file, e.g. ${1}, ${2}, ...)</li></ul><p>Example of a correct JSON template:</p>\n     * <pre>\n     * [\n     * {\n     * \"resourceType\": \"Asset\",\n     * \"identifier\": {\n     * \"name\": \"${1}\",\n     * \"domain\": {\n     * \"name\": \"${2}\",\n     * \"community\": {\n     * \"name\": \"Some Community\"\n     * }\n     * }\n     * },\n     * \"attributes\" : {\n     * \"00000000-0000-0000-0000-000000003115\" : [ {\n     * \"value\" : \"${3}\"\n     * } ],\n     * \"00000000-0000-0000-0000-000000000222\" : [ {\n     * \"value\" : \"${4}\"\n     * } ]\n     * }\n     * }\n     * ]\n     * </pre>\n     */\n    template?: string;\n};\n\nexport type ModelWithOneOfAndProperties = (SimpleParameter | NonAsciiStringæøåÆøÅöôêÊ字符串) & {\n    baz: number | null;\n    qux: number;\n};\n\n/**\n * Model used to test deduplication strategy (unused)\n */\nexport type ParameterSimpleParameterUnused = string;\n\n/**\n * Model used to test deduplication strategy\n */\nexport type PostServiceWithEmptyTagResponse = string;\n\n/**\n * Model used to test deduplication strategy\n */\nexport type PostServiceWithEmptyTagResponse2 = string;\n\n/**\n * Model used to test deduplication strategy\n */\nexport type DeleteFooData = string;\n\n/**\n * Model used to test deduplication strategy\n */\nexport type DeleteFooData2 = string;\n\n/**\n * Model with restricted keyword name\n */\nexport type Import = string;\n\nexport type SchemaWithFormRestrictedKeys = {\n    description?: string;\n    'x-enum-descriptions'?: string;\n    'x-enum-varnames'?: string;\n    'x-enumNames'?: string;\n    title?: string;\n    object?: {\n        description?: string;\n        'x-enum-descriptions'?: string;\n        'x-enum-varnames'?: string;\n        'x-enumNames'?: string;\n        title?: string;\n    };\n    array?: Array<{\n        description?: string;\n        'x-enum-descriptions'?: string;\n        'x-enum-varnames'?: string;\n        'x-enumNames'?: string;\n        title?: string;\n    }>;\n};\n\n/**\n * This schema was giving PascalCase transformations a hard time\n */\nexport type IoK8sApimachineryPkgApisMetaV1DeleteOptions = {\n    /**\n     * Must be fulfilled before a deletion is carried out. If not possible, a 409 Conflict status will be returned.\n     */\n    preconditions?: IoK8sApimachineryPkgApisMetaV1Preconditions;\n};\n\n/**\n * This schema was giving PascalCase transformations a hard time\n */\nexport type IoK8sApimachineryPkgApisMetaV1Preconditions = {\n    /**\n     * Specifies the target ResourceVersion\n     */\n    resourceVersion?: string;\n    /**\n     * Specifies the target UID.\n     */\n    uid?: string;\n};\n\nexport type AdditionalPropertiesUnknownIssue = {\n    [key: string]: string | number;\n};\n\nexport type AdditionalPropertiesUnknownIssue2 = {\n    [key: string]: string | number;\n};\n\nexport type AdditionalPropertiesUnknownIssue3 = string & {\n    entries: {\n        [key: string]: AdditionalPropertiesUnknownIssue;\n    };\n};\n\nexport type AdditionalPropertiesIntegerIssue = {\n    value: number;\n    [key: string]: number;\n};\n\nexport type OneOfAllOfIssue = ((ConstValue | GenericSchemaDuplicateIssue1SystemBoolean) & _3eNum1Период) | GenericSchemaDuplicateIssue1SystemString;\n\nexport type GenericSchemaDuplicateIssue1SystemBoolean = {\n    item?: boolean;\n    error?: string | null;\n    readonly hasError?: boolean;\n    data?: {\n        [key: string]: never;\n    };\n};\n\nexport type GenericSchemaDuplicateIssue1SystemString = {\n    item?: string | null;\n    error?: string | null;\n    readonly hasError?: boolean;\n};\n\nexport type ExternalSharedModel = {\n    id: string;\n    name?: string;\n};\n\n/**\n * This is a model with one property containing a reference\n */\nexport type ModelWithReferenceWritable = {\n    prop?: ModelWithPropertiesWritable;\n};\n\n/**\n * This is a model with one property containing an array\n */\nexport type ModelWithArrayReadOnlyAndWriteOnlyWritable = {\n    prop?: Array<ModelWithReadOnlyAndWriteOnlyWritable>;\n    propWithFile?: Array<Blob | File>;\n    propWithNumber?: Array<number>;\n};\n\n/**\n * This is a model with one nested property\n */\nexport type ModelWithPropertiesWritable = {\n    required: string;\n    requiredAndNullable: string | null;\n    string?: string;\n    number?: number;\n    boolean?: boolean;\n    reference?: ModelWithString;\n    'property with space'?: string;\n    default?: string;\n    try?: string;\n};\n\n/**\n * This is a model that contains a some patterns\n */\nexport type ModelWithPatternWritable = {\n    key: string;\n    name: string;\n    id?: string;\n    text?: string;\n    patternWithSingleQuotes?: string;\n    patternWithNewline?: string;\n    patternWithBacktick?: string;\n    patternWithUnicode?: string;\n};\n\nexport type FileWritable = {\n    /**\n     * Mime\n     */\n    mime: string;\n};\n\nexport type ModelWithReadOnlyAndWriteOnlyWritable = {\n    foo: string;\n    baz: string;\n};\n\nexport type ModelWithAnyOfConstantSizeArrayWithNSizeAndOptionsWritable = [\n    number | Import,\n    number | Import\n];\n\nexport type AdditionalPropertiesUnknownIssueWritable = {\n    [key: string]: string | number;\n};\n\nexport type OneOfAllOfIssueWritable = ((ConstValue | GenericSchemaDuplicateIssue1SystemBoolean) & _3eNum1Период) | GenericSchemaDuplicateIssue1SystemString;\n\nexport type GenericSchemaDuplicateIssue1SystemBooleanWritable = {\n    item?: boolean;\n    error?: string | null;\n    data?: {\n        [key: string]: never;\n    };\n};\n\nexport type GenericSchemaDuplicateIssue1SystemStringWritable = {\n    item?: string | null;\n    error?: string | null;\n};\n\n/**\n * This is a reusable parameter\n */\nexport type SimpleParameter = string;\n\n/**\n * Parameter with illegal characters\n */\nexport type XFooBar = ModelWithString;\n\n/**\n * A reusable request body\n */\nexport type SimpleRequestBody = ModelWithString;\n\n/**\n * A reusable request body\n */\nexport type SimpleFormData = ModelWithString;\n\nexport type ExportData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no+tag';\n};\n\nexport type PatchApiVbyApiVersionNoTagData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no+tag';\n};\n\nexport type PatchApiVbyApiVersionNoTagResponses = {\n    /**\n     * OK\n     */\n    default: unknown;\n};\n\nexport type ImportData = {\n    body: ModelWithReadOnlyAndWriteOnlyWritable | ModelWithArrayReadOnlyAndWriteOnlyWritable;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no+tag';\n};\n\nexport type ImportResponses = {\n    /**\n     * Success\n     */\n    200: ModelFromZendesk;\n    /**\n     * Default success response\n     */\n    default: ModelWithReadOnlyAndWriteOnly;\n};\n\nexport type ImportResponse = ImportResponses[keyof ImportResponses];\n\nexport type FooWowData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no+tag';\n};\n\nexport type FooWowResponses = {\n    /**\n     * OK\n     */\n    default: unknown;\n};\n\nexport type ApiVVersionODataControllerCountData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple/$count';\n};\n\nexport type ApiVVersionODataControllerCountResponses = {\n    /**\n     * Success\n     */\n    200: ModelFromZendesk;\n};\n\nexport type ApiVVersionODataControllerCountResponse = ApiVVersionODataControllerCountResponses[keyof ApiVVersionODataControllerCountResponses];\n\nexport type GetApiVbyApiVersionSimpleOperationData = {\n    body?: never;\n    path: {\n        /**\n         * foo in method\n         */\n        foo_param: string;\n    };\n    query?: never;\n    url: '/api/v{api-version}/simple:operation';\n};\n\nexport type GetApiVbyApiVersionSimpleOperationErrors = {\n    /**\n     * Default error response\n     */\n    default: ModelWithBoolean;\n};\n\nexport type GetApiVbyApiVersionSimpleOperationError = GetApiVbyApiVersionSimpleOperationErrors[keyof GetApiVbyApiVersionSimpleOperationErrors];\n\nexport type GetApiVbyApiVersionSimpleOperationResponses = {\n    /**\n     * Response is a simple number\n     */\n    200: number;\n};\n\nexport type GetApiVbyApiVersionSimpleOperationResponse = GetApiVbyApiVersionSimpleOperationResponses[keyof GetApiVbyApiVersionSimpleOperationResponses];\n\nexport type DeleteCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type GetCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type HeadCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type OptionsCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type PatchCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type PostCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type PutCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type DeleteFooData3 = {\n    body?: never;\n    headers: {\n        /**\n         * Parameter with illegal characters\n         */\n        'x-Foo-Bar': ModelWithString;\n    };\n    path: {\n        /**\n         * foo in method\n         */\n        foo_param: string;\n        /**\n         * bar in method\n         */\n        BarParam: string;\n    };\n    query?: never;\n    url: '/api/v{api-version}/foo/{foo_param}/bar/{BarParam}';\n};\n\nexport type CallWithDescriptionsData = {\n    body?: never;\n    path?: never;\n    query?: {\n        /**\n         * Testing multiline comments in string: First line\n         * Second line\n         *\n         * Fourth line\n         */\n        parameterWithBreaks?: string;\n        /**\n         * Testing backticks in string: `backticks` and ```multiple backticks``` should work\n         */\n        parameterWithBackticks?: string;\n        /**\n         * Testing slashes in string: \\backwards\\\\\\ and /forwards/// should work\n         */\n        parameterWithSlashes?: string;\n        /**\n         * Testing expression placeholders in string: ${expression} should work\n         */\n        parameterWithExpressionPlaceholders?: string;\n        /**\n         * Testing quotes in string: 'single quote''' and \"double quotes\"\"\" should work\n         */\n        parameterWithQuotes?: string;\n        /**\n         * Testing reserved characters in string: * inline * and ** inline ** should work\n         */\n        parameterWithReservedCharacters?: string;\n    };\n    url: '/api/v{api-version}/descriptions';\n};\n\nexport type DeprecatedCallData = {\n    body?: never;\n    headers: {\n        /**\n         * This parameter is deprecated\n         *\n         * @deprecated\n         */\n        parameter: DeprecatedModel | null;\n    };\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/parameters/deprecated';\n};\n\nexport type CallWithParametersData = {\n    /**\n     * This is the parameter that goes into the body\n     */\n    body: {\n        [key: string]: unknown;\n    } | null;\n    headers: {\n        /**\n         * This is the parameter that goes into the header\n         */\n        parameterHeader: string | null;\n    };\n    path: {\n        /**\n         * This is the parameter that goes into the path\n         */\n        parameterPath: string | null;\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string | null;\n    };\n    query: {\n        foo_ref_enum?: ModelWithNestedArrayEnumsDataFoo;\n        foo_all_of_enum: ModelWithNestedArrayEnumsDataFoo;\n        /**\n         * This is the parameter that goes into the query params\n         */\n        cursor: string | null;\n    };\n    url: '/api/v{api-version}/parameters/{parameterPath}';\n};\n\nexport type CallWithWeirdParameterNamesData = {\n    /**\n     * This is the parameter that goes into the body\n     */\n    body: ModelWithString | null;\n    headers: {\n        /**\n         * This is the parameter that goes into the request header\n         */\n        'parameter.header': string | null;\n    };\n    path: {\n        /**\n         * This is the parameter that goes into the path\n         */\n        'parameter.path.1'?: string;\n        /**\n         * This is the parameter that goes into the path\n         */\n        'parameter-path-2'?: string;\n        /**\n         * This is the parameter that goes into the path\n         */\n        'PARAMETER-PATH-3'?: string;\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string | null;\n    };\n    query: {\n        /**\n         * This is the parameter with a reserved keyword\n         */\n        default?: string;\n        /**\n         * This is the parameter that goes into the request query params\n         */\n        'parameter-query': string | null;\n    };\n    url: '/api/v{api-version}/parameters/{parameter.path.1}/{parameter-path-2}/{PARAMETER-PATH-3}';\n};\n\nexport type GetCallWithOptionalParamData = {\n    /**\n     * This is a required parameter\n     */\n    body: ModelWithOneOfEnum;\n    path?: never;\n    query?: {\n        /**\n         * This is an optional parameter\n         */\n        page?: number;\n    };\n    url: '/api/v{api-version}/parameters';\n};\n\nexport type PostCallWithOptionalParamData = {\n    /**\n     * This is an optional parameter\n     */\n    body?: {\n        offset?: number | null;\n    };\n    path?: never;\n    query: {\n        /**\n         * This is a required parameter\n         */\n        parameter: Pageable;\n    };\n    url: '/api/v{api-version}/parameters';\n};\n\nexport type PostCallWithOptionalParamResponses = {\n    /**\n     * Response is a simple number\n     */\n    200: number;\n    /**\n     * Success\n     */\n    204: void;\n};\n\nexport type PostCallWithOptionalParamResponse = PostCallWithOptionalParamResponses[keyof PostCallWithOptionalParamResponses];\n\nexport type PostApiVbyApiVersionRequestBodyData = {\n    /**\n     * A reusable request body\n     */\n    body?: SimpleRequestBody;\n    path?: never;\n    query?: {\n        /**\n         * This is a reusable parameter\n         */\n        parameter?: string;\n    };\n    url: '/api/v{api-version}/requestBody';\n};\n\nexport type PostApiVbyApiVersionFormDataData = {\n    /**\n     * A reusable request body\n     */\n    body?: SimpleFormData;\n    path?: never;\n    query?: {\n        /**\n         * This is a reusable parameter\n         */\n        parameter?: string;\n    };\n    url: '/api/v{api-version}/formData';\n};\n\nexport type CallWithDefaultParametersData = {\n    body?: never;\n    path?: never;\n    query?: {\n        /**\n         * This is a simple string with default value\n         */\n        parameterString?: string | null;\n        /**\n         * This is a simple number with default value\n         */\n        parameterNumber?: number | null;\n        /**\n         * This is a simple boolean with default value\n         */\n        parameterBoolean?: boolean | null;\n        /**\n         * This is a simple enum with default value\n         */\n        parameterEnum?: 'Success' | 'Warning' | 'Error';\n        /**\n         * This is a simple model with default value\n         */\n        parameterModel?: ModelWithString | null;\n    };\n    url: '/api/v{api-version}/defaults';\n};\n\nexport type CallWithDefaultOptionalParametersData = {\n    body?: never;\n    path?: never;\n    query?: {\n        /**\n         * This is a simple string that is optional with default value\n         */\n        parameterString?: string;\n        /**\n         * This is a simple number that is optional with default value\n         */\n        parameterNumber?: number;\n        /**\n         * This is a simple boolean that is optional with default value\n         */\n        parameterBoolean?: boolean;\n        /**\n         * This is a simple enum that is optional with default value\n         */\n        parameterEnum?: 'Success' | 'Warning' | 'Error';\n        /**\n         * This is a simple model that is optional with default value\n         */\n        parameterModel?: ModelWithString;\n    };\n    url: '/api/v{api-version}/defaults';\n};\n\nexport type CallToTestOrderOfParamsData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * This is a optional string with default\n         */\n        parameterOptionalStringWithDefault?: string;\n        /**\n         * This is a optional string with empty default\n         */\n        parameterOptionalStringWithEmptyDefault?: string;\n        /**\n         * This is a optional string with no default\n         */\n        parameterOptionalStringWithNoDefault?: string;\n        /**\n         * This is a string with default\n         */\n        parameterStringWithDefault: string;\n        /**\n         * This is a string with empty default\n         */\n        parameterStringWithEmptyDefault: string;\n        /**\n         * This is a string with no default\n         */\n        parameterStringWithNoDefault: string;\n        /**\n         * This is a string that can be null with no default\n         */\n        parameterStringNullableWithNoDefault?: string | null;\n        /**\n         * This is a string that can be null with default\n         */\n        parameterStringNullableWithDefault?: string | null;\n    };\n    url: '/api/v{api-version}/defaults';\n};\n\nexport type DuplicateNameData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/duplicate';\n};\n\nexport type DuplicateName2Data = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/duplicate';\n};\n\nexport type DuplicateName3Data = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/duplicate';\n};\n\nexport type DuplicateName4Data = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/duplicate';\n};\n\nexport type CallWithNoContentResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no-content';\n};\n\nexport type CallWithNoContentResponseResponses = {\n    /**\n     * Success\n     */\n    204: void;\n};\n\nexport type CallWithNoContentResponseResponse = CallWithNoContentResponseResponses[keyof CallWithNoContentResponseResponses];\n\nexport type CallWithResponseAndNoContentResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multiple-tags/response-and-no-content';\n};\n\nexport type CallWithResponseAndNoContentResponseResponses = {\n    /**\n     * Response is a simple number\n     */\n    200: number;\n    /**\n     * Success\n     */\n    204: void;\n};\n\nexport type CallWithResponseAndNoContentResponseResponse = CallWithResponseAndNoContentResponseResponses[keyof CallWithResponseAndNoContentResponseResponses];\n\nexport type DummyAData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multiple-tags/a';\n};\n\nexport type DummyAResponses = {\n    200: _400;\n};\n\nexport type DummyAResponse = DummyAResponses[keyof DummyAResponses];\n\nexport type DummyBData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multiple-tags/b';\n};\n\nexport type DummyBResponses = {\n    /**\n     * Success\n     */\n    204: void;\n};\n\nexport type DummyBResponse = DummyBResponses[keyof DummyBResponses];\n\nexport type CallWithResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/response';\n};\n\nexport type CallWithResponseResponses = {\n    default: Import;\n};\n\nexport type CallWithResponseResponse = CallWithResponseResponses[keyof CallWithResponseResponses];\n\nexport type CallWithDuplicateResponsesData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/response';\n};\n\nexport type CallWithDuplicateResponsesErrors = {\n    /**\n     * Message for 500 error\n     */\n    500: ModelWithStringError;\n    /**\n     * Message for 501 error\n     */\n    501: ModelWithStringError;\n    /**\n     * Message for 502 error\n     */\n    502: ModelWithStringError;\n    /**\n     * Message for 4XX errors\n     */\n    '4XX': DictionaryWithArray;\n    /**\n     * Default error response\n     */\n    default: ModelWithBoolean;\n};\n\nexport type CallWithDuplicateResponsesError = CallWithDuplicateResponsesErrors[keyof CallWithDuplicateResponsesErrors];\n\nexport type CallWithDuplicateResponsesResponses = {\n    /**\n     * Message for 200 response\n     */\n    200: ModelWithBoolean & ModelWithInteger;\n    /**\n     * Message for 201 response\n     */\n    201: ModelWithString;\n    /**\n     * Message for 202 response\n     */\n    202: ModelWithString;\n};\n\nexport type CallWithDuplicateResponsesResponse = CallWithDuplicateResponsesResponses[keyof CallWithDuplicateResponsesResponses];\n\nexport type CallWithResponsesData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/response';\n};\n\nexport type CallWithResponsesErrors = {\n    /**\n     * Message for 500 error\n     */\n    500: ModelWithStringError;\n    /**\n     * Message for 501 error\n     */\n    501: ModelWithStringError;\n    /**\n     * Message for 502 error\n     */\n    502: ModelWithStringError;\n    /**\n     * Message for default response\n     */\n    default: ModelWithStringError;\n};\n\nexport type CallWithResponsesError = CallWithResponsesErrors[keyof CallWithResponsesErrors];\n\nexport type CallWithResponsesResponses = {\n    /**\n     * Message for 200 response\n     */\n    200: {\n        readonly '@namespace.string'?: string;\n        readonly '@namespace.integer'?: number;\n        readonly value?: Array<ModelWithString>;\n    };\n    /**\n     * Message for 201 response\n     */\n    201: ModelThatExtends;\n    /**\n     * Message for 202 response\n     */\n    202: ModelThatExtendsExtends;\n};\n\nexport type CallWithResponsesResponse = CallWithResponsesResponses[keyof CallWithResponsesResponses];\n\nexport type CollectionFormatData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * This is an array parameter that is sent as csv format (comma-separated values)\n         */\n        parameterArrayCSV: Array<string> | null;\n        /**\n         * This is an array parameter that is sent as ssv format (space-separated values)\n         */\n        parameterArraySSV: Array<string> | null;\n        /**\n         * This is an array parameter that is sent as tsv format (tab-separated values)\n         */\n        parameterArrayTSV: Array<string> | null;\n        /**\n         * This is an array parameter that is sent as pipes format (pipe-separated values)\n         */\n        parameterArrayPipes: Array<string> | null;\n        /**\n         * This is an array parameter that is sent as multi format (multiple parameter instances)\n         */\n        parameterArrayMulti: Array<string> | null;\n    };\n    url: '/api/v{api-version}/collectionFormat';\n};\n\nexport type TypesData = {\n    body?: never;\n    path?: {\n        /**\n         * This is a number parameter\n         */\n        id?: number;\n    };\n    query: {\n        /**\n         * This is a number parameter\n         */\n        parameterNumber: number;\n        /**\n         * This is a string parameter\n         */\n        parameterString: string | null;\n        /**\n         * This is a boolean parameter\n         */\n        parameterBoolean: boolean | null;\n        /**\n         * This is an object parameter\n         */\n        parameterObject: {\n            [key: string]: unknown;\n        } | null;\n        /**\n         * This is an array parameter\n         */\n        parameterArray: Array<string> | null;\n        /**\n         * This is a dictionary parameter\n         */\n        parameterDictionary: {\n            [key: string]: unknown;\n        } | null;\n        /**\n         * This is an enum parameter\n         */\n        parameterEnum: 'Success' | 'Warning' | 'Error' | null;\n    };\n    url: '/api/v{api-version}/types';\n};\n\nexport type TypesResponses = {\n    /**\n     * Response is a simple number\n     */\n    200: number;\n    /**\n     * Response is a simple string\n     */\n    201: string;\n    /**\n     * Response is a simple boolean\n     */\n    202: boolean;\n    /**\n     * Response is a simple object\n     */\n    203: {\n        [key: string]: unknown;\n    };\n};\n\nexport type TypesResponse = TypesResponses[keyof TypesResponses];\n\nexport type UploadFileData = {\n    body: Blob | File;\n    path: {\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string | null;\n    };\n    query?: never;\n    url: '/api/v{api-version}/upload';\n};\n\nexport type UploadFileResponses = {\n    200: boolean;\n};\n\nexport type UploadFileResponse = UploadFileResponses[keyof UploadFileResponses];\n\nexport type FileResponseData = {\n    body?: never;\n    path: {\n        id: string;\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string;\n    };\n    query?: never;\n    url: '/api/v{api-version}/file/{id}';\n};\n\nexport type FileResponseResponses = {\n    /**\n     * Success\n     */\n    200: Blob | File;\n};\n\nexport type FileResponseResponse = FileResponseResponses[keyof FileResponseResponses];\n\nexport type ComplexTypesData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * Parameter containing object\n         */\n        parameterObject: {\n            first?: {\n                second?: {\n                    third?: string;\n                };\n            };\n        };\n        /**\n         * Parameter containing reference\n         */\n        parameterReference: ModelWithString;\n    };\n    url: '/api/v{api-version}/complex';\n};\n\nexport type ComplexTypesErrors = {\n    /**\n     * 400 `server` error\n     */\n    400: unknown;\n    /**\n     * 500 server error\n     */\n    500: unknown;\n};\n\nexport type ComplexTypesResponses = {\n    /**\n     * Successful response\n     */\n    200: Array<ModelWithString>;\n};\n\nexport type ComplexTypesResponse = ComplexTypesResponses[keyof ComplexTypesResponses];\n\nexport type MultipartResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multipart';\n};\n\nexport type MultipartResponseResponses = {\n    /**\n     * OK\n     */\n    200: {\n        file?: Blob | File;\n        metadata?: {\n            foo?: string;\n            bar?: string;\n        };\n    };\n};\n\nexport type MultipartResponseResponse = MultipartResponseResponses[keyof MultipartResponseResponses];\n\nexport type MultipartRequestData = {\n    body?: {\n        content?: Blob | File;\n        data?: ModelWithString | null;\n    };\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multipart';\n};\n\nexport type ComplexParamsData = {\n    body?: {\n        readonly key: string | null;\n        name: string | null;\n        enabled?: boolean;\n        type: 'Monkey' | 'Horse' | 'Bird';\n        listOfModels?: Array<ModelWithString> | null;\n        listOfStrings?: Array<string> | null;\n        parameters: ModelWithString | ModelWithEnum | ModelWithArray | ModelWithDictionary;\n        readonly user?: {\n            readonly id?: number;\n            readonly name?: string | null;\n        };\n    };\n    path: {\n        id: number;\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string;\n    };\n    query?: never;\n    url: '/api/v{api-version}/complex/{id}';\n};\n\nexport type ComplexParamsResponses = {\n    /**\n     * Success\n     */\n    200: ModelWithString;\n};\n\nexport type ComplexParamsResponse = ComplexParamsResponses[keyof ComplexParamsResponses];\n\nexport type CallWithResultFromHeaderData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/header';\n};\n\nexport type CallWithResultFromHeaderErrors = {\n    /**\n     * 400 server error\n     */\n    400: unknown;\n    /**\n     * 500 server error\n     */\n    500: unknown;\n};\n\nexport type CallWithResultFromHeaderResponses = {\n    /**\n     * Successful response\n     */\n    200: unknown;\n};\n\nexport type TestErrorCodeData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * Status code to return\n         */\n        status: number;\n    };\n    url: '/api/v{api-version}/error';\n};\n\nexport type TestErrorCodeErrors = {\n    /**\n     * Custom message: Internal Server Error\n     */\n    500: unknown;\n    /**\n     * Custom message: Not Implemented\n     */\n    501: unknown;\n    /**\n     * Custom message: Bad Gateway\n     */\n    502: unknown;\n    /**\n     * Custom message: Service Unavailable\n     */\n    503: unknown;\n};\n\nexport type TestErrorCodeResponses = {\n    /**\n     * Custom message: Successful response\n     */\n    200: unknown;\n};\n\nexport type NonAsciiæøåÆøÅöôêÊ字符串Data = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * Dummy input param\n         */\n        nonAsciiParamæøåÆØÅöôêÊ: number;\n    };\n    url: '/api/v{api-version}/non-ascii-æøåÆØÅöôêÊ字符串';\n};\n\nexport type NonAsciiæøåÆøÅöôêÊ字符串Responses = {\n    /**\n     * Successful response\n     */\n    200: Array<NonAsciiStringæøåÆøÅöôêÊ字符串>;\n};\n\nexport type NonAsciiæøåÆøÅöôêÊ字符串Response = NonAsciiæøåÆøÅöôêÊ字符串Responses[keyof NonAsciiæøåÆøÅöôêÊ字符串Responses];\n\nexport type PutWithFormUrlEncodedData = {\n    body: ArrayWithStrings;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/non-ascii-æøåÆØÅöôêÊ字符串';\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/react-query/name-builder/@tanstack/react-query.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport { type DefaultError, queryOptions, type UseMutationOptions } from '@tanstack/react-query';\n\nimport { client } from '../client.gen';\nimport { fooBarPost, fooBarPut, fooPost, fooPut, getFoo, getFooBar, type Options } from '../sdk.gen';\nimport type { FooBarPostData, FooBarPostResponse, FooBarPutData, FooBarPutResponse, FooPostData, FooPostResponse, FooPutData, FooPutResponse, GetFooBarData, GetFooBarResponse, GetFooData, GetFooResponse } from '../types.gen';\n\nexport type QueryKey<TOptions extends Options> = [\n    Pick<TOptions, 'baseUrl' | 'body' | 'headers' | 'path' | 'query'> & {\n        _id: string;\n        _infinite?: boolean;\n        tags?: ReadonlyArray<string>;\n    }\n];\n\nconst createQueryKey = <TOptions extends Options>(id: string, options?: TOptions, infinite?: boolean, tags?: ReadonlyArray<string>): [\n    QueryKey<TOptions>[0]\n] => {\n    const params: QueryKey<TOptions>[0] = { _id: id, baseUrl: options?.baseUrl || (options?.client ?? client).getConfig().baseUrl } as QueryKey<TOptions>[0];\n    if (infinite) {\n        params._infinite = infinite;\n    }\n    if (tags) {\n        params.tags = tags;\n    }\n    if (options?.body) {\n        params.body = options.body;\n    }\n    if (options?.headers) {\n        params.headers = options.headers;\n    }\n    if (options?.path) {\n        params.path = options.path;\n    }\n    if (options?.query) {\n        params.query = options.query;\n    }\n    return [params];\n};\n\nexport const getFooD = (options?: Options<GetFooData>) => createQueryKey('getFoo', options);\n\nexport const getFooE = (options?: Options<GetFooData>) => queryOptions<GetFooResponse, DefaultError, GetFooResponse, ReturnType<typeof getFooD>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await getFoo({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: getFooD(options)\n});\n\nexport const fooPostC = (options?: Partial<Options<FooPostData>>): UseMutationOptions<FooPostResponse, DefaultError, Options<FooPostData>> => {\n    const mutationOptions: UseMutationOptions<FooPostResponse, DefaultError, Options<FooPostData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await fooPost({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const fooPutC = (options?: Partial<Options<FooPutData>>): UseMutationOptions<FooPutResponse, DefaultError, Options<FooPutData>> => {\n    const mutationOptions: UseMutationOptions<FooPutResponse, DefaultError, Options<FooPutData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await fooPut({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const getFooBarD = (options?: Options<GetFooBarData>) => createQueryKey('getFooBar', options);\n\nexport const getFooBarE = (options?: Options<GetFooBarData>) => queryOptions<GetFooBarResponse, DefaultError, GetFooBarResponse, ReturnType<typeof getFooBarD>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await getFooBar({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: getFooBarD(options)\n});\n\nexport const fooBarPostC = (options?: Partial<Options<FooBarPostData>>): UseMutationOptions<FooBarPostResponse, DefaultError, Options<FooBarPostData>> => {\n    const mutationOptions: UseMutationOptions<FooBarPostResponse, DefaultError, Options<FooBarPostData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await fooBarPost({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const fooBarPutC = (options?: Partial<Options<FooBarPutData>>): UseMutationOptions<FooBarPutResponse, DefaultError, Options<FooBarPutData>> => {\n    const mutationOptions: UseMutationOptions<FooBarPutResponse, DefaultError, Options<FooBarPutData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await fooBarPut({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/react-query/name-builder/client/client.gen.ts",
    "content": "// 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 (options: RequestOptions) => {\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 url = buildUrl(opts);\n\n    return { opts, url };\n  };\n\n  const request: Client['request'] = async (options) => {\n    // @ts-expect-error\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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/react-query/name-builder/client/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type { Auth } from '../core/auth.gen';\nexport type { QuerySerializerOptions } from '../core/bodySerializer.gen';\nexport {\n  formDataBodySerializer,\n  jsonBodySerializer,\n  urlSearchParamsBodySerializer,\n} from '../core/bodySerializer.gen';\nexport { buildClientParams } from '../core/params.gen';\nexport { serializeQueryKeyValue } from '../core/queryKeySerializer.gen';\nexport { createClient } from './client.gen';\nexport type {\n  Client,\n  ClientOptions,\n  Config,\n  CreateClientConfig,\n  Options,\n  RequestOptions,\n  RequestResult,\n  ResolvedRequestOptions,\n  ResponseStyle,\n  TDataShape,\n} from './types.gen';\nexport { createConfig, mergeHeaders } from './utils.gen';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/react-query/name-builder/client/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { Auth } from '../core/auth.gen';\nimport type {\n  ServerSentEventsOptions,\n  ServerSentEventsResult,\n} from '../core/serverSentEvents.gen';\nimport type { Client as CoreClient, Config as CoreConfig } from '../core/types.gen';\nimport type { Middleware } from './utils.gen';\n\nexport type ResponseStyle = 'data' | 'fields';\n\nexport interface Config<T extends ClientOptions = ClientOptions>\n  extends Omit<RequestInit, 'body' | 'headers' | 'method'>, CoreConfig {\n  /**\n   * Base URL for all requests made by this client.\n   */\n  baseUrl?: T['baseUrl'];\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   * Please don't use the Fetch client for Next.js applications. The `next`\n   * options won't have any effect.\n   *\n   * Install {@link https://www.npmjs.com/package/@hey-api/client-next `@hey-api/client-next`} instead.\n   */\n  next?: never;\n  /**\n   * Return the response data parsed in a specified format. By default, `auto`\n   * will infer the appropriate method from the `Content-Type` response header.\n   * You can override this behavior with any of the {@link Body} methods.\n   * Select `stream` if you don't want to parse response data at all.\n   *\n   * @default 'auto'\n   */\n  parseAs?: 'arrayBuffer' | 'auto' | 'blob' | 'formData' | 'json' | 'stream' | 'text';\n  /**\n   * Should we return only data or multiple fields (data, error, response, etc.)?\n   *\n   * @default 'fields'\n   */\n  responseStyle?: ResponseStyle;\n  /**\n   * Throw an error instead of returning it in the response?\n   *\n   * @default false\n   */\n  throwOnError?: T['throwOnError'];\n}\n\nexport interface RequestOptions<\n  TData = unknown,\n  TResponseStyle extends ResponseStyle = 'fields',\n  ThrowOnError extends boolean = boolean,\n  Url extends string = string,\n>\n  extends\n    Config<{\n      responseStyle: TResponseStyle;\n      throwOnError: ThrowOnError;\n    }>,\n    Pick<\n      ServerSentEventsOptions<TData>,\n      | 'onRequest'\n      | 'onSseError'\n      | 'onSseEvent'\n      | 'sseDefaultRetryDelay'\n      | 'sseMaxRetryAttempts'\n      | 'sseMaxRetryDelay'\n    > {\n  /**\n   * Any body that you want to add to your request.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/fetch#body}\n   */\n  body?: unknown;\n  path?: Record<string, unknown>;\n  query?: Record<string, unknown>;\n  /**\n   * Security mechanism(s) to use for the request.\n   */\n  security?: ReadonlyArray<Auth>;\n  url: Url;\n}\n\nexport interface ResolvedRequestOptions<\n  TResponseStyle extends ResponseStyle = 'fields',\n  ThrowOnError extends boolean = boolean,\n  Url extends string = string,\n> extends RequestOptions<unknown, TResponseStyle, ThrowOnError, Url> {\n  serializedBody?: string;\n}\n\nexport type RequestResult<\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = boolean,\n  TResponseStyle extends ResponseStyle = 'fields',\n> = ThrowOnError extends true\n  ? Promise<\n      TResponseStyle extends 'data'\n        ? TData extends Record<string, unknown>\n          ? TData[keyof TData]\n          : TData\n        : {\n            data: TData extends Record<string, unknown> ? TData[keyof TData] : TData;\n            request: Request;\n            response: Response;\n          }\n    >\n  : Promise<\n      TResponseStyle extends 'data'\n        ? (TData extends Record<string, unknown> ? TData[keyof TData] : TData) | undefined\n        : (\n            | {\n                data: TData extends Record<string, unknown> ? TData[keyof TData] : TData;\n                error: undefined;\n              }\n            | {\n                data: undefined;\n                error: TError extends Record<string, unknown> ? TError[keyof TError] : TError;\n              }\n          ) & {\n            request: Request;\n            response: Response;\n          }\n    >;\n\nexport interface ClientOptions {\n  baseUrl?: string;\n  responseStyle?: ResponseStyle;\n  throwOnError?: boolean;\n}\n\ntype MethodFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'>,\n) => RequestResult<TData, TError, ThrowOnError, TResponseStyle>;\n\ntype SseFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'>,\n) => Promise<ServerSentEventsResult<TData, TError>>;\n\ntype RequestFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'> &\n    Pick<Required<RequestOptions<TData, TResponseStyle, ThrowOnError>>, 'method'>,\n) => RequestResult<TData, TError, ThrowOnError, TResponseStyle>;\n\ntype BuildUrlFn = <\n  TData extends {\n    body?: unknown;\n    path?: Record<string, unknown>;\n    query?: Record<string, unknown>;\n    url: string;\n  },\n>(\n  options: TData & Options<TData>,\n) => string;\n\nexport type Client = CoreClient<RequestFn, Config, MethodFn, BuildUrlFn, SseFn> & {\n  interceptors: Middleware<Request, Response, unknown, ResolvedRequestOptions>;\n};\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 = ClientOptions> = (\n  override?: Config<ClientOptions & T>,\n) => Config<Required<ClientOptions> & T>;\n\nexport interface TDataShape {\n  body?: unknown;\n  headers?: unknown;\n  path?: unknown;\n  query?: unknown;\n  url: string;\n}\n\ntype OmitKeys<T, K> = Pick<T, Exclude<keyof T, K>>;\n\nexport type Options<\n  TData extends TDataShape = TDataShape,\n  ThrowOnError extends boolean = boolean,\n  TResponse = unknown,\n  TResponseStyle extends ResponseStyle = 'fields',\n> = OmitKeys<\n  RequestOptions<TResponse, TResponseStyle, ThrowOnError>,\n  'body' | 'path' | 'query' | 'url'\n> &\n  ([TData] extends [never] ? unknown : Omit<TData, 'url'>);\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/react-query/name-builder/client/utils.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/react-query/name-builder/client.gen.ts",
    "content": "// 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>());\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/react-query/name-builder/core/auth.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/react-query/name-builder/core/bodySerializer.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/react-query/name-builder/core/params.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/react-query/name-builder/core/pathSerializer.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/react-query/name-builder/core/queryKeySerializer.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\n/**\n * JSON-friendly union that mirrors what Pinia Colada can hash.\n */\nexport type JsonValue =\n  | null\n  | string\n  | number\n  | boolean\n  | JsonValue[]\n  | { [key: string]: JsonValue };\n\n/**\n * Replacer that converts non-JSON values (bigint, Date, etc.) to safe substitutes.\n */\nexport const queryKeyJsonReplacer = (_key: string, value: unknown) => {\n  if (value === undefined || typeof value === 'function' || typeof value === 'symbol') {\n    return undefined;\n  }\n  if (typeof value === 'bigint') {\n    return value.toString();\n  }\n  if (value instanceof Date) {\n    return value.toISOString();\n  }\n  return value;\n};\n\n/**\n * Safely stringifies a value and parses it back into a JsonValue.\n */\nexport const stringifyToJsonValue = (input: unknown): JsonValue | undefined => {\n  try {\n    const json = JSON.stringify(input, queryKeyJsonReplacer);\n    if (json === undefined) {\n      return undefined;\n    }\n    return JSON.parse(json) as JsonValue;\n  } catch {\n    return undefined;\n  }\n};\n\n/**\n * Detects plain objects (including objects with a null prototype).\n */\nconst isPlainObject = (value: unknown): value is Record<string, unknown> => {\n  if (value === null || typeof value !== 'object') {\n    return false;\n  }\n  const prototype = Object.getPrototypeOf(value as object);\n  return prototype === Object.prototype || prototype === null;\n};\n\n/**\n * Turns URLSearchParams into a sorted JSON object for deterministic keys.\n */\nconst serializeSearchParams = (params: URLSearchParams): JsonValue => {\n  const entries = Array.from(params.entries()).sort(([a], [b]) => a.localeCompare(b));\n  const result: Record<string, JsonValue> = {};\n\n  for (const [key, value] of entries) {\n    const existing = result[key];\n    if (existing === undefined) {\n      result[key] = value;\n      continue;\n    }\n\n    if (Array.isArray(existing)) {\n      (existing as string[]).push(value);\n    } else {\n      result[key] = [existing, value];\n    }\n  }\n\n  return result;\n};\n\n/**\n * Normalizes any accepted value into a JSON-friendly shape for query keys.\n */\nexport const serializeQueryKeyValue = (value: unknown): JsonValue | undefined => {\n  if (value === null) {\n    return null;\n  }\n\n  if (typeof value === 'string' || typeof value === 'number' || typeof value === 'boolean') {\n    return value;\n  }\n\n  if (value === undefined || typeof value === 'function' || typeof value === 'symbol') {\n    return undefined;\n  }\n\n  if (typeof value === 'bigint') {\n    return value.toString();\n  }\n\n  if (value instanceof Date) {\n    return value.toISOString();\n  }\n\n  if (Array.isArray(value)) {\n    return stringifyToJsonValue(value);\n  }\n\n  if (typeof URLSearchParams !== 'undefined' && value instanceof URLSearchParams) {\n    return serializeSearchParams(value);\n  }\n\n  if (isPlainObject(value)) {\n    return stringifyToJsonValue(value);\n  }\n\n  return undefined;\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/react-query/name-builder/core/serverSentEvents.gen.ts",
    "content": "// 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 const 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            // Normalize line endings: CRLF -> LF, then CR -> LF\n            buffer = buffer.replace(/\\r\\n/g, '\\n').replace(/\\r/g, '\\n');\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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/react-query/name-builder/core/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { Auth, AuthToken } from './auth.gen';\nimport type { BodySerializer, QuerySerializer, QuerySerializerOptions } from './bodySerializer.gen';\n\nexport type HttpMethod =\n  | 'connect'\n  | 'delete'\n  | 'get'\n  | 'head'\n  | 'options'\n  | 'patch'\n  | 'post'\n  | 'put'\n  | 'trace';\n\nexport type Client<\n  RequestFn = never,\n  Config = unknown,\n  MethodFn = never,\n  BuildUrlFn = never,\n  SseFn = never,\n> = {\n  /**\n   * Returns the final request URL.\n   */\n  buildUrl: BuildUrlFn;\n  getConfig: () => Config;\n  request: RequestFn;\n  setConfig: (config: Config) => Config;\n} & {\n  [K in HttpMethod]: MethodFn;\n} & ([SseFn] extends [never] ? { sse?: never } : { sse: { [K in HttpMethod]: SseFn } });\n\nexport interface Config {\n  /**\n   * Auth token or a function returning auth token. The resolved value will be\n   * added to the request payload as defined by its `security` array.\n   */\n  auth?: ((auth: Auth) => Promise<AuthToken> | AuthToken) | AuthToken;\n  /**\n   * A function for serializing request body parameter. By default,\n   * {@link JSON.stringify()} will be used.\n   */\n  bodySerializer?: BodySerializer | null;\n  /**\n   * An object containing any HTTP headers that you want to pre-populate your\n   * `Headers` object with.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/Headers/Headers#init See more}\n   */\n  headers?:\n    | RequestInit['headers']\n    | Record<\n        string,\n        string | number | boolean | (string | number | boolean)[] | null | undefined | unknown\n      >;\n  /**\n   * The request method.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/fetch#method See more}\n   */\n  method?: Uppercase<HttpMethod>;\n  /**\n   * A function for serializing request query parameters. By default, arrays\n   * will be exploded in form style, objects will be exploded in deepObject\n   * style, and reserved characters are percent-encoded.\n   *\n   * This method will have no effect if the native `paramsSerializer()` Axios\n   * API function is used.\n   *\n   * {@link https://swagger.io/docs/specification/serialization/#query View examples}\n   */\n  querySerializer?: QuerySerializer | QuerySerializerOptions;\n  /**\n   * A function validating request data. This is useful if you want to ensure\n   * the request conforms to the desired shape, so it can be safely sent to\n   * the server.\n   */\n  requestValidator?: (data: unknown) => Promise<unknown>;\n  /**\n   * A function transforming response data before it's returned. This is useful\n   * for post-processing data, e.g. converting ISO strings into Date objects.\n   */\n  responseTransformer?: (data: unknown) => Promise<unknown>;\n  /**\n   * A function validating response data. This is useful if you want to ensure\n   * the response conforms to the desired shape, so it can be safely passed to\n   * the transformers and returned to the user.\n   */\n  responseValidator?: (data: unknown) => Promise<unknown>;\n}\n\ntype IsExactlyNeverOrNeverUndefined<T> = [T] extends [never]\n  ? true\n  : [T] extends [never | undefined]\n    ? [undefined] extends [T]\n      ? false\n      : true\n    : false;\n\nexport type OmitNever<T extends Record<string, unknown>> = {\n  [K in keyof T as IsExactlyNeverOrNeverUndefined<T[K]> extends true ? never : K]: T[K];\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/react-query/name-builder/core/utils.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/react-query/name-builder/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport { fooBarPost, fooBarPut, fooPost, fooPut, getFoo, getFooBar, type Options } from './sdk.gen';\nexport type { ClientOptions, FooBarPostData, FooBarPostResponse, FooBarPostResponses, FooBarPutData, FooBarPutResponse, FooBarPutResponses, FooPostData, FooPostResponse, FooPostResponses, FooPutData, FooPutResponse, FooPutResponses, GetFooBarData, GetFooBarResponse, GetFooBarResponses, GetFooData, GetFooResponse, GetFooResponses } from './types.gen';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/react-query/name-builder/sdk.gen.ts",
    "content": "// 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 { FooBarPostData, FooBarPostResponses, FooBarPutData, FooBarPutResponses, FooPostData, FooPostResponses, FooPutData, FooPutResponses, GetFooBarData, GetFooBarResponses, GetFooData, GetFooResponses } from './types.gen';\n\nexport type Options<TData extends TDataShape = TDataShape, ThrowOnError extends boolean = boolean> = Options2<TData, ThrowOnError> & {\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\nexport const getFoo = <ThrowOnError extends boolean = false>(options?: Options<GetFooData, ThrowOnError>) => (options?.client ?? client).get<GetFooResponses, unknown, ThrowOnError>({ url: '/foo', ...options });\n\nexport const fooPost = <ThrowOnError extends boolean = false>(options?: Options<FooPostData, ThrowOnError>) => (options?.client ?? client).post<FooPostResponses, unknown, ThrowOnError>({ url: '/foo', ...options });\n\nexport const fooPut = <ThrowOnError extends boolean = false>(options?: Options<FooPutData, ThrowOnError>) => (options?.client ?? client).put<FooPutResponses, unknown, ThrowOnError>({ url: '/foo', ...options });\n\nexport const getFooBar = <ThrowOnError extends boolean = false>(options?: Options<GetFooBarData, ThrowOnError>) => (options?.client ?? client).get<GetFooBarResponses, unknown, ThrowOnError>({ url: '/foo/bar', ...options });\n\nexport const fooBarPost = <ThrowOnError extends boolean = false>(options?: Options<FooBarPostData, ThrowOnError>) => (options?.client ?? client).post<FooBarPostResponses, unknown, ThrowOnError>({ url: '/foo/bar', ...options });\n\nexport const fooBarPut = <ThrowOnError extends boolean = false>(options?: Options<FooBarPutData, ThrowOnError>) => (options?.client ?? client).put<FooBarPutResponses, unknown, ThrowOnError>({ url: '/foo/bar', ...options });\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/react-query/name-builder/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type ClientOptions = {\n    baseUrl: `${string}://${string}` | (string & {});\n};\n\nexport type GetFooData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/foo';\n};\n\nexport type GetFooResponses = {\n    /**\n     * OK\n     */\n    200: string;\n};\n\nexport type GetFooResponse = GetFooResponses[keyof GetFooResponses];\n\nexport type FooPostData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/foo';\n};\n\nexport type FooPostResponses = {\n    /**\n     * OK\n     */\n    200: string;\n};\n\nexport type FooPostResponse = FooPostResponses[keyof FooPostResponses];\n\nexport type FooPutData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/foo';\n};\n\nexport type FooPutResponses = {\n    /**\n     * OK\n     */\n    200: string;\n};\n\nexport type FooPutResponse = FooPutResponses[keyof FooPutResponses];\n\nexport type GetFooBarData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/foo/bar';\n};\n\nexport type GetFooBarResponses = {\n    /**\n     * OK\n     */\n    200: string;\n};\n\nexport type GetFooBarResponse = GetFooBarResponses[keyof GetFooBarResponses];\n\nexport type FooBarPostData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/foo/bar';\n};\n\nexport type FooBarPostResponses = {\n    /**\n     * OK\n     */\n    200: string;\n};\n\nexport type FooBarPostResponse = FooBarPostResponses[keyof FooBarPostResponses];\n\nexport type FooBarPutData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/foo/bar';\n};\n\nexport type FooBarPutResponses = {\n    /**\n     * OK\n     */\n    200: string;\n};\n\nexport type FooBarPutResponse = FooBarPutResponses[keyof FooBarPutResponses];\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/react-query/useMutation/@tanstack/react-query.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport { type DefaultError, type InfiniteData, infiniteQueryOptions, queryOptions, useMutation, type UseMutationOptions } from '@tanstack/react-query';\n\nimport { client } from '../client.gen';\nimport { apiVVersionODataControllerCount, callToTestOrderOfParams, callWithDefaultOptionalParameters, callWithDefaultParameters, callWithDescriptions, callWithDuplicateResponses, callWithNoContentResponse, callWithParameters, callWithResponse, callWithResponseAndNoContentResponse, callWithResponses, callWithResultFromHeader, callWithWeirdParameterNames, collectionFormat, complexParams, complexTypes, deleteCallWithoutParametersAndResponse, deleteFoo, deprecatedCall, dummyA, dummyB, duplicateName, duplicateName2, duplicateName3, duplicateName4, export_, fileResponse, fooWow, getApiVbyApiVersionSimpleOperation, getCallWithOptionalParam, getCallWithoutParametersAndResponse, import_, multipartRequest, multipartResponse, nonAsciiæøåÆøÅöôêÊ字符串, type Options, patchApiVbyApiVersionNoTag, patchCallWithoutParametersAndResponse, postApiVbyApiVersionFormData, postApiVbyApiVersionRequestBody, postCallWithOptionalParam, postCallWithoutParametersAndResponse, putCallWithoutParametersAndResponse, putWithFormUrlEncoded, testErrorCode, types, uploadFile } from '../sdk.gen';\nimport type { ApiVVersionODataControllerCountData, ApiVVersionODataControllerCountResponse, CallToTestOrderOfParamsData, CallWithDefaultOptionalParametersData, CallWithDefaultParametersData, CallWithDescriptionsData, CallWithDuplicateResponsesData, CallWithDuplicateResponsesError, CallWithDuplicateResponsesResponse, CallWithNoContentResponseData, CallWithNoContentResponseResponse, CallWithParametersData, CallWithResponseAndNoContentResponseData, CallWithResponseAndNoContentResponseResponse, CallWithResponseData, CallWithResponseResponse, CallWithResponsesData, CallWithResponsesError, CallWithResponsesResponse, CallWithResultFromHeaderData, CallWithWeirdParameterNamesData, CollectionFormatData, ComplexParamsData, ComplexParamsResponse, ComplexTypesData, ComplexTypesResponse, DeleteCallWithoutParametersAndResponseData, DeleteFooData3, DeprecatedCallData, DummyAData, DummyAResponse, DummyBData, DummyBResponse, DuplicateName2Data, DuplicateName3Data, DuplicateName4Data, DuplicateNameData, ExportData, FileResponseData, FileResponseResponse, FooWowData, GetApiVbyApiVersionSimpleOperationData, GetApiVbyApiVersionSimpleOperationError, GetApiVbyApiVersionSimpleOperationResponse, GetCallWithOptionalParamData, GetCallWithoutParametersAndResponseData, ImportData, ImportResponse, MultipartRequestData, MultipartResponseData, MultipartResponseResponse, NonAsciiæøåÆøÅöôêÊ字符串Data, NonAsciiæøåÆøÅöôêÊ字符串Response, PatchApiVbyApiVersionNoTagData, PatchCallWithoutParametersAndResponseData, PostApiVbyApiVersionFormDataData, PostApiVbyApiVersionRequestBodyData, PostCallWithOptionalParamData, PostCallWithOptionalParamResponse, PostCallWithoutParametersAndResponseData, PutCallWithoutParametersAndResponseData, PutWithFormUrlEncodedData, TestErrorCodeData, TypesData, TypesResponse, UploadFileData, UploadFileResponse } from '../types.gen';\n\nexport type QueryKey<TOptions extends Options> = [\n    Pick<TOptions, 'baseUrl' | 'body' | 'headers' | 'path' | 'query'> & {\n        _id: string;\n        _infinite?: boolean;\n        tags?: ReadonlyArray<string>;\n    }\n];\n\nconst createQueryKey = <TOptions extends Options>(id: string, options?: TOptions, infinite?: boolean, tags?: ReadonlyArray<string>): [\n    QueryKey<TOptions>[0]\n] => {\n    const params: QueryKey<TOptions>[0] = { _id: id, baseUrl: options?.baseUrl || (options?.client ?? client).getConfig().baseUrl } as QueryKey<TOptions>[0];\n    if (infinite) {\n        params._infinite = infinite;\n    }\n    if (tags) {\n        params.tags = tags;\n    }\n    if (options?.body) {\n        params.body = options.body;\n    }\n    if (options?.headers) {\n        params.headers = options.headers;\n    }\n    if (options?.path) {\n        params.path = options.path;\n    }\n    if (options?.query) {\n        params.query = options.query;\n    }\n    return [params];\n};\n\nexport const exportQueryKey = (options?: Options<ExportData>) => createQueryKey('export', options);\n\nexport const exportOptions = (options?: Options<ExportData>) => queryOptions<unknown, DefaultError, unknown, ReturnType<typeof exportQueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await export_({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: exportQueryKey(options)\n});\n\nexport const patchApiVbyApiVersionNoTagMutation = (options?: Partial<Options<PatchApiVbyApiVersionNoTagData>>): UseMutationOptions<unknown, DefaultError, Options<PatchApiVbyApiVersionNoTagData>> => {\n    const mutationOptions: UseMutationOptions<unknown, DefaultError, Options<PatchApiVbyApiVersionNoTagData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await patchApiVbyApiVersionNoTag({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const usePatchApiVbyApiVersionNoTagMutation = (mutationOptions?: Partial<Omit<UseMutationOptions<unknown, DefaultError, Options<PatchApiVbyApiVersionNoTagData>>, 'mutationFn'>>) => useMutation({ ...patchApiVbyApiVersionNoTagMutation(), ...mutationOptions });\n\nexport const importMutation = (options?: Partial<Options<ImportData>>): UseMutationOptions<ImportResponse, DefaultError, Options<ImportData>> => {\n    const mutationOptions: UseMutationOptions<ImportResponse, DefaultError, Options<ImportData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await import_({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const useImportMutation = (mutationOptions?: Partial<Omit<UseMutationOptions<ImportResponse, DefaultError, Options<ImportData>>, 'mutationFn'>>) => useMutation({ ...importMutation(), ...mutationOptions });\n\nexport const fooWowMutation = (options?: Partial<Options<FooWowData>>): UseMutationOptions<unknown, DefaultError, Options<FooWowData>> => {\n    const mutationOptions: UseMutationOptions<unknown, DefaultError, Options<FooWowData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await fooWow({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const useFooWowMutation = (mutationOptions?: Partial<Omit<UseMutationOptions<unknown, DefaultError, Options<FooWowData>>, 'mutationFn'>>) => useMutation({ ...fooWowMutation(), ...mutationOptions });\n\nexport const apiVVersionODataControllerCountQueryKey = (options?: Options<ApiVVersionODataControllerCountData>) => createQueryKey('apiVVersionODataControllerCount', options);\n\nexport const apiVVersionODataControllerCountOptions = (options?: Options<ApiVVersionODataControllerCountData>) => queryOptions<ApiVVersionODataControllerCountResponse, DefaultError, ApiVVersionODataControllerCountResponse, ReturnType<typeof apiVVersionODataControllerCountQueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await apiVVersionODataControllerCount({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: apiVVersionODataControllerCountQueryKey(options)\n});\n\nexport const getApiVbyApiVersionSimpleOperationQueryKey = (options: Options<GetApiVbyApiVersionSimpleOperationData>) => createQueryKey('getApiVbyApiVersionSimpleOperation', options);\n\nexport const getApiVbyApiVersionSimpleOperationOptions = (options: Options<GetApiVbyApiVersionSimpleOperationData>) => queryOptions<GetApiVbyApiVersionSimpleOperationResponse, GetApiVbyApiVersionSimpleOperationError, GetApiVbyApiVersionSimpleOperationResponse, ReturnType<typeof getApiVbyApiVersionSimpleOperationQueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await getApiVbyApiVersionSimpleOperation({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: getApiVbyApiVersionSimpleOperationQueryKey(options)\n});\n\nexport const deleteCallWithoutParametersAndResponseMutation = (options?: Partial<Options<DeleteCallWithoutParametersAndResponseData>>): UseMutationOptions<unknown, DefaultError, Options<DeleteCallWithoutParametersAndResponseData>> => {\n    const mutationOptions: UseMutationOptions<unknown, DefaultError, Options<DeleteCallWithoutParametersAndResponseData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await deleteCallWithoutParametersAndResponse({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const useDeleteCallWithoutParametersAndResponseMutation = (mutationOptions?: Partial<Omit<UseMutationOptions<unknown, DefaultError, Options<DeleteCallWithoutParametersAndResponseData>>, 'mutationFn'>>) => useMutation({ ...deleteCallWithoutParametersAndResponseMutation(), ...mutationOptions });\n\nexport const getCallWithoutParametersAndResponseQueryKey = (options?: Options<GetCallWithoutParametersAndResponseData>) => createQueryKey('getCallWithoutParametersAndResponse', options);\n\nexport const getCallWithoutParametersAndResponseOptions = (options?: Options<GetCallWithoutParametersAndResponseData>) => queryOptions<unknown, DefaultError, unknown, ReturnType<typeof getCallWithoutParametersAndResponseQueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await getCallWithoutParametersAndResponse({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: getCallWithoutParametersAndResponseQueryKey(options)\n});\n\nexport const patchCallWithoutParametersAndResponseMutation = (options?: Partial<Options<PatchCallWithoutParametersAndResponseData>>): UseMutationOptions<unknown, DefaultError, Options<PatchCallWithoutParametersAndResponseData>> => {\n    const mutationOptions: UseMutationOptions<unknown, DefaultError, Options<PatchCallWithoutParametersAndResponseData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await patchCallWithoutParametersAndResponse({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const usePatchCallWithoutParametersAndResponseMutation = (mutationOptions?: Partial<Omit<UseMutationOptions<unknown, DefaultError, Options<PatchCallWithoutParametersAndResponseData>>, 'mutationFn'>>) => useMutation({ ...patchCallWithoutParametersAndResponseMutation(), ...mutationOptions });\n\nexport const postCallWithoutParametersAndResponseMutation = (options?: Partial<Options<PostCallWithoutParametersAndResponseData>>): UseMutationOptions<unknown, DefaultError, Options<PostCallWithoutParametersAndResponseData>> => {\n    const mutationOptions: UseMutationOptions<unknown, DefaultError, Options<PostCallWithoutParametersAndResponseData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await postCallWithoutParametersAndResponse({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const usePostCallWithoutParametersAndResponseMutation = (mutationOptions?: Partial<Omit<UseMutationOptions<unknown, DefaultError, Options<PostCallWithoutParametersAndResponseData>>, 'mutationFn'>>) => useMutation({ ...postCallWithoutParametersAndResponseMutation(), ...mutationOptions });\n\nexport const putCallWithoutParametersAndResponseMutation = (options?: Partial<Options<PutCallWithoutParametersAndResponseData>>): UseMutationOptions<unknown, DefaultError, Options<PutCallWithoutParametersAndResponseData>> => {\n    const mutationOptions: UseMutationOptions<unknown, DefaultError, Options<PutCallWithoutParametersAndResponseData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await putCallWithoutParametersAndResponse({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const usePutCallWithoutParametersAndResponseMutation = (mutationOptions?: Partial<Omit<UseMutationOptions<unknown, DefaultError, Options<PutCallWithoutParametersAndResponseData>>, 'mutationFn'>>) => useMutation({ ...putCallWithoutParametersAndResponseMutation(), ...mutationOptions });\n\nexport const deleteFooMutation = (options?: Partial<Options<DeleteFooData3>>): UseMutationOptions<unknown, DefaultError, Options<DeleteFooData3>> => {\n    const mutationOptions: UseMutationOptions<unknown, DefaultError, Options<DeleteFooData3>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await deleteFoo({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const useDeleteFooMutation = (mutationOptions?: Partial<Omit<UseMutationOptions<unknown, DefaultError, Options<DeleteFooData3>>, 'mutationFn'>>) => useMutation({ ...deleteFooMutation(), ...mutationOptions });\n\nexport const callWithDescriptionsMutation = (options?: Partial<Options<CallWithDescriptionsData>>): UseMutationOptions<unknown, DefaultError, Options<CallWithDescriptionsData>> => {\n    const mutationOptions: UseMutationOptions<unknown, DefaultError, Options<CallWithDescriptionsData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await callWithDescriptions({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const useCallWithDescriptionsMutation = (mutationOptions?: Partial<Omit<UseMutationOptions<unknown, DefaultError, Options<CallWithDescriptionsData>>, 'mutationFn'>>) => useMutation({ ...callWithDescriptionsMutation(), ...mutationOptions });\n\n/**\n * @deprecated\n */\nexport const deprecatedCallMutation = (options?: Partial<Options<DeprecatedCallData>>): UseMutationOptions<unknown, DefaultError, Options<DeprecatedCallData>> => {\n    const mutationOptions: UseMutationOptions<unknown, DefaultError, Options<DeprecatedCallData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await deprecatedCall({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\n/**\n * @deprecated\n */\nexport const useDeprecatedCallMutation = (mutationOptions?: Partial<Omit<UseMutationOptions<unknown, DefaultError, Options<DeprecatedCallData>>, 'mutationFn'>>) => useMutation({ ...deprecatedCallMutation(), ...mutationOptions });\n\nexport const callWithParametersMutation = (options?: Partial<Options<CallWithParametersData>>): UseMutationOptions<unknown, DefaultError, Options<CallWithParametersData>> => {\n    const mutationOptions: UseMutationOptions<unknown, DefaultError, Options<CallWithParametersData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await callWithParameters({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const useCallWithParametersMutation = (mutationOptions?: Partial<Omit<UseMutationOptions<unknown, DefaultError, Options<CallWithParametersData>>, 'mutationFn'>>) => useMutation({ ...callWithParametersMutation(), ...mutationOptions });\n\nexport const callWithWeirdParameterNamesMutation = (options?: Partial<Options<CallWithWeirdParameterNamesData>>): UseMutationOptions<unknown, DefaultError, Options<CallWithWeirdParameterNamesData>> => {\n    const mutationOptions: UseMutationOptions<unknown, DefaultError, Options<CallWithWeirdParameterNamesData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await callWithWeirdParameterNames({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const useCallWithWeirdParameterNamesMutation = (mutationOptions?: Partial<Omit<UseMutationOptions<unknown, DefaultError, Options<CallWithWeirdParameterNamesData>>, 'mutationFn'>>) => useMutation({ ...callWithWeirdParameterNamesMutation(), ...mutationOptions });\n\nexport const getCallWithOptionalParamQueryKey = (options: Options<GetCallWithOptionalParamData>) => createQueryKey('getCallWithOptionalParam', options);\n\nexport const getCallWithOptionalParamOptions = (options: Options<GetCallWithOptionalParamData>) => queryOptions<unknown, DefaultError, unknown, ReturnType<typeof getCallWithOptionalParamQueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await getCallWithOptionalParam({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: getCallWithOptionalParamQueryKey(options)\n});\n\nconst createInfiniteParams = <K extends Pick<QueryKey<Options>[0], 'body' | 'headers' | 'path' | 'query'>>(queryKey: QueryKey<Options>, page: K) => {\n    const params = { ...queryKey[0] };\n    if (page.body) {\n        params.body = {\n            ...queryKey[0].body as any,\n            ...page.body as any\n        };\n    }\n    if (page.headers) {\n        params.headers = {\n            ...queryKey[0].headers,\n            ...page.headers\n        };\n    }\n    if (page.path) {\n        params.path = {\n            ...queryKey[0].path as any,\n            ...page.path as any\n        };\n    }\n    if (page.query) {\n        params.query = {\n            ...queryKey[0].query as any,\n            ...page.query as any\n        };\n    }\n    return params as unknown as typeof page;\n};\n\nexport const getCallWithOptionalParamInfiniteQueryKey = (options: Options<GetCallWithOptionalParamData>): QueryKey<Options<GetCallWithOptionalParamData>> => createQueryKey('getCallWithOptionalParam', options, true);\n\nexport const getCallWithOptionalParamInfiniteOptions = (options: Options<GetCallWithOptionalParamData>) => infiniteQueryOptions<unknown, DefaultError, InfiniteData<unknown>, QueryKey<Options<GetCallWithOptionalParamData>>, number | Pick<QueryKey<Options<GetCallWithOptionalParamData>>[0], 'body' | 'headers' | 'path' | 'query'>>(\n// @ts-ignore\n{\n    queryFn: async ({ pageParam, queryKey, signal }) => {\n        // @ts-ignore\n        const page: Pick<QueryKey<Options<GetCallWithOptionalParamData>>[0], 'body' | 'headers' | 'path' | 'query'> = typeof pageParam === 'object' ? pageParam : {\n            query: {\n                page: pageParam\n            }\n        };\n        const params = createInfiniteParams(queryKey, page);\n        const { data } = await getCallWithOptionalParam({\n            ...options,\n            ...params,\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: getCallWithOptionalParamInfiniteQueryKey(options)\n});\n\nexport const postCallWithOptionalParamMutation = (options?: Partial<Options<PostCallWithOptionalParamData>>): UseMutationOptions<PostCallWithOptionalParamResponse, DefaultError, Options<PostCallWithOptionalParamData>> => {\n    const mutationOptions: UseMutationOptions<PostCallWithOptionalParamResponse, DefaultError, Options<PostCallWithOptionalParamData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await postCallWithOptionalParam({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const usePostCallWithOptionalParamMutation = (mutationOptions?: Partial<Omit<UseMutationOptions<PostCallWithOptionalParamResponse, DefaultError, Options<PostCallWithOptionalParamData>>, 'mutationFn'>>) => useMutation({ ...postCallWithOptionalParamMutation(), ...mutationOptions });\n\nexport const postApiVbyApiVersionRequestBodyMutation = (options?: Partial<Options<PostApiVbyApiVersionRequestBodyData>>): UseMutationOptions<unknown, DefaultError, Options<PostApiVbyApiVersionRequestBodyData>> => {\n    const mutationOptions: UseMutationOptions<unknown, DefaultError, Options<PostApiVbyApiVersionRequestBodyData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await postApiVbyApiVersionRequestBody({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const usePostApiVbyApiVersionRequestBodyMutation = (mutationOptions?: Partial<Omit<UseMutationOptions<unknown, DefaultError, Options<PostApiVbyApiVersionRequestBodyData>>, 'mutationFn'>>) => useMutation({ ...postApiVbyApiVersionRequestBodyMutation(), ...mutationOptions });\n\nexport const postApiVbyApiVersionFormDataMutation = (options?: Partial<Options<PostApiVbyApiVersionFormDataData>>): UseMutationOptions<unknown, DefaultError, Options<PostApiVbyApiVersionFormDataData>> => {\n    const mutationOptions: UseMutationOptions<unknown, DefaultError, Options<PostApiVbyApiVersionFormDataData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await postApiVbyApiVersionFormData({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const usePostApiVbyApiVersionFormDataMutation = (mutationOptions?: Partial<Omit<UseMutationOptions<unknown, DefaultError, Options<PostApiVbyApiVersionFormDataData>>, 'mutationFn'>>) => useMutation({ ...postApiVbyApiVersionFormDataMutation(), ...mutationOptions });\n\nexport const callWithDefaultParametersQueryKey = (options?: Options<CallWithDefaultParametersData>) => createQueryKey('callWithDefaultParameters', options);\n\nexport const callWithDefaultParametersOptions = (options?: Options<CallWithDefaultParametersData>) => queryOptions<unknown, DefaultError, unknown, ReturnType<typeof callWithDefaultParametersQueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await callWithDefaultParameters({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: callWithDefaultParametersQueryKey(options)\n});\n\nexport const callWithDefaultOptionalParametersMutation = (options?: Partial<Options<CallWithDefaultOptionalParametersData>>): UseMutationOptions<unknown, DefaultError, Options<CallWithDefaultOptionalParametersData>> => {\n    const mutationOptions: UseMutationOptions<unknown, DefaultError, Options<CallWithDefaultOptionalParametersData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await callWithDefaultOptionalParameters({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const useCallWithDefaultOptionalParametersMutation = (mutationOptions?: Partial<Omit<UseMutationOptions<unknown, DefaultError, Options<CallWithDefaultOptionalParametersData>>, 'mutationFn'>>) => useMutation({ ...callWithDefaultOptionalParametersMutation(), ...mutationOptions });\n\nexport const callToTestOrderOfParamsMutation = (options?: Partial<Options<CallToTestOrderOfParamsData>>): UseMutationOptions<unknown, DefaultError, Options<CallToTestOrderOfParamsData>> => {\n    const mutationOptions: UseMutationOptions<unknown, DefaultError, Options<CallToTestOrderOfParamsData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await callToTestOrderOfParams({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const useCallToTestOrderOfParamsMutation = (mutationOptions?: Partial<Omit<UseMutationOptions<unknown, DefaultError, Options<CallToTestOrderOfParamsData>>, 'mutationFn'>>) => useMutation({ ...callToTestOrderOfParamsMutation(), ...mutationOptions });\n\nexport const duplicateNameMutation = (options?: Partial<Options<DuplicateNameData>>): UseMutationOptions<unknown, DefaultError, Options<DuplicateNameData>> => {\n    const mutationOptions: UseMutationOptions<unknown, DefaultError, Options<DuplicateNameData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await duplicateName({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const useDuplicateNameMutation = (mutationOptions?: Partial<Omit<UseMutationOptions<unknown, DefaultError, Options<DuplicateNameData>>, 'mutationFn'>>) => useMutation({ ...duplicateNameMutation(), ...mutationOptions });\n\nexport const duplicateName2QueryKey = (options?: Options<DuplicateName2Data>) => createQueryKey('duplicateName2', options);\n\nexport const duplicateName2Options = (options?: Options<DuplicateName2Data>) => queryOptions<unknown, DefaultError, unknown, ReturnType<typeof duplicateName2QueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await duplicateName2({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: duplicateName2QueryKey(options)\n});\n\nexport const duplicateName3Mutation = (options?: Partial<Options<DuplicateName3Data>>): UseMutationOptions<unknown, DefaultError, Options<DuplicateName3Data>> => {\n    const mutationOptions: UseMutationOptions<unknown, DefaultError, Options<DuplicateName3Data>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await duplicateName3({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const useDuplicateName3Mutation = (mutationOptions?: Partial<Omit<UseMutationOptions<unknown, DefaultError, Options<DuplicateName3Data>>, 'mutationFn'>>) => useMutation({ ...duplicateName3Mutation(), ...mutationOptions });\n\nexport const duplicateName4Mutation = (options?: Partial<Options<DuplicateName4Data>>): UseMutationOptions<unknown, DefaultError, Options<DuplicateName4Data>> => {\n    const mutationOptions: UseMutationOptions<unknown, DefaultError, Options<DuplicateName4Data>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await duplicateName4({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const useDuplicateName4Mutation = (mutationOptions?: Partial<Omit<UseMutationOptions<unknown, DefaultError, Options<DuplicateName4Data>>, 'mutationFn'>>) => useMutation({ ...duplicateName4Mutation(), ...mutationOptions });\n\nexport const callWithNoContentResponseQueryKey = (options?: Options<CallWithNoContentResponseData>) => createQueryKey('callWithNoContentResponse', options);\n\nexport const callWithNoContentResponseOptions = (options?: Options<CallWithNoContentResponseData>) => queryOptions<CallWithNoContentResponseResponse, DefaultError, CallWithNoContentResponseResponse, ReturnType<typeof callWithNoContentResponseQueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await callWithNoContentResponse({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: callWithNoContentResponseQueryKey(options)\n});\n\nexport const callWithResponseAndNoContentResponseQueryKey = (options?: Options<CallWithResponseAndNoContentResponseData>) => createQueryKey('callWithResponseAndNoContentResponse', options);\n\nexport const callWithResponseAndNoContentResponseOptions = (options?: Options<CallWithResponseAndNoContentResponseData>) => queryOptions<CallWithResponseAndNoContentResponseResponse, DefaultError, CallWithResponseAndNoContentResponseResponse, ReturnType<typeof callWithResponseAndNoContentResponseQueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await callWithResponseAndNoContentResponse({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: callWithResponseAndNoContentResponseQueryKey(options)\n});\n\nexport const dummyAQueryKey = (options?: Options<DummyAData>) => createQueryKey('dummyA', options);\n\nexport const dummyAOptions = (options?: Options<DummyAData>) => queryOptions<DummyAResponse, DefaultError, DummyAResponse, ReturnType<typeof dummyAQueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await dummyA({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: dummyAQueryKey(options)\n});\n\nexport const dummyBQueryKey = (options?: Options<DummyBData>) => createQueryKey('dummyB', options);\n\nexport const dummyBOptions = (options?: Options<DummyBData>) => queryOptions<DummyBResponse, DefaultError, DummyBResponse, ReturnType<typeof dummyBQueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await dummyB({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: dummyBQueryKey(options)\n});\n\nexport const callWithResponseQueryKey = (options?: Options<CallWithResponseData>) => createQueryKey('callWithResponse', options);\n\nexport const callWithResponseOptions = (options?: Options<CallWithResponseData>) => queryOptions<CallWithResponseResponse, DefaultError, CallWithResponseResponse, ReturnType<typeof callWithResponseQueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await callWithResponse({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: callWithResponseQueryKey(options)\n});\n\nexport const callWithDuplicateResponsesMutation = (options?: Partial<Options<CallWithDuplicateResponsesData>>): UseMutationOptions<CallWithDuplicateResponsesResponse, CallWithDuplicateResponsesError, Options<CallWithDuplicateResponsesData>> => {\n    const mutationOptions: UseMutationOptions<CallWithDuplicateResponsesResponse, CallWithDuplicateResponsesError, Options<CallWithDuplicateResponsesData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await callWithDuplicateResponses({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const useCallWithDuplicateResponsesMutation = (mutationOptions?: Partial<Omit<UseMutationOptions<CallWithDuplicateResponsesResponse, CallWithDuplicateResponsesError, Options<CallWithDuplicateResponsesData>>, 'mutationFn'>>) => useMutation({ ...callWithDuplicateResponsesMutation(), ...mutationOptions });\n\nexport const callWithResponsesMutation = (options?: Partial<Options<CallWithResponsesData>>): UseMutationOptions<CallWithResponsesResponse, CallWithResponsesError, Options<CallWithResponsesData>> => {\n    const mutationOptions: UseMutationOptions<CallWithResponsesResponse, CallWithResponsesError, Options<CallWithResponsesData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await callWithResponses({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const useCallWithResponsesMutation = (mutationOptions?: Partial<Omit<UseMutationOptions<CallWithResponsesResponse, CallWithResponsesError, Options<CallWithResponsesData>>, 'mutationFn'>>) => useMutation({ ...callWithResponsesMutation(), ...mutationOptions });\n\nexport const collectionFormatQueryKey = (options: Options<CollectionFormatData>) => createQueryKey('collectionFormat', options);\n\nexport const collectionFormatOptions = (options: Options<CollectionFormatData>) => queryOptions<unknown, DefaultError, unknown, ReturnType<typeof collectionFormatQueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await collectionFormat({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: collectionFormatQueryKey(options)\n});\n\nexport const typesQueryKey = (options: Options<TypesData>) => createQueryKey('types', options);\n\nexport const typesOptions = (options: Options<TypesData>) => queryOptions<TypesResponse, DefaultError, TypesResponse, ReturnType<typeof typesQueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await types({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: typesQueryKey(options)\n});\n\nexport const uploadFileMutation = (options?: Partial<Options<UploadFileData>>): UseMutationOptions<UploadFileResponse, DefaultError, Options<UploadFileData>> => {\n    const mutationOptions: UseMutationOptions<UploadFileResponse, DefaultError, Options<UploadFileData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await uploadFile({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const useUploadFileMutation = (mutationOptions?: Partial<Omit<UseMutationOptions<UploadFileResponse, DefaultError, Options<UploadFileData>>, 'mutationFn'>>) => useMutation({ ...uploadFileMutation(), ...mutationOptions });\n\nexport const fileResponseQueryKey = (options: Options<FileResponseData>) => createQueryKey('fileResponse', options);\n\nexport const fileResponseOptions = (options: Options<FileResponseData>) => queryOptions<FileResponseResponse, DefaultError, FileResponseResponse, ReturnType<typeof fileResponseQueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await fileResponse({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: fileResponseQueryKey(options)\n});\n\nexport const complexTypesQueryKey = (options: Options<ComplexTypesData>) => createQueryKey('complexTypes', options);\n\nexport const complexTypesOptions = (options: Options<ComplexTypesData>) => queryOptions<ComplexTypesResponse, DefaultError, ComplexTypesResponse, ReturnType<typeof complexTypesQueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await complexTypes({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: complexTypesQueryKey(options)\n});\n\nexport const multipartResponseQueryKey = (options?: Options<MultipartResponseData>) => createQueryKey('multipartResponse', options);\n\nexport const multipartResponseOptions = (options?: Options<MultipartResponseData>) => queryOptions<MultipartResponseResponse, DefaultError, MultipartResponseResponse, ReturnType<typeof multipartResponseQueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await multipartResponse({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: multipartResponseQueryKey(options)\n});\n\nexport const multipartRequestMutation = (options?: Partial<Options<MultipartRequestData>>): UseMutationOptions<unknown, DefaultError, Options<MultipartRequestData>> => {\n    const mutationOptions: UseMutationOptions<unknown, DefaultError, Options<MultipartRequestData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await multipartRequest({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const useMultipartRequestMutation = (mutationOptions?: Partial<Omit<UseMutationOptions<unknown, DefaultError, Options<MultipartRequestData>>, 'mutationFn'>>) => useMutation({ ...multipartRequestMutation(), ...mutationOptions });\n\nexport const complexParamsMutation = (options?: Partial<Options<ComplexParamsData>>): UseMutationOptions<ComplexParamsResponse, DefaultError, Options<ComplexParamsData>> => {\n    const mutationOptions: UseMutationOptions<ComplexParamsResponse, DefaultError, Options<ComplexParamsData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await complexParams({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const useComplexParamsMutation = (mutationOptions?: Partial<Omit<UseMutationOptions<ComplexParamsResponse, DefaultError, Options<ComplexParamsData>>, 'mutationFn'>>) => useMutation({ ...complexParamsMutation(), ...mutationOptions });\n\nexport const callWithResultFromHeaderMutation = (options?: Partial<Options<CallWithResultFromHeaderData>>): UseMutationOptions<unknown, DefaultError, Options<CallWithResultFromHeaderData>> => {\n    const mutationOptions: UseMutationOptions<unknown, DefaultError, Options<CallWithResultFromHeaderData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await callWithResultFromHeader({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const useCallWithResultFromHeaderMutation = (mutationOptions?: Partial<Omit<UseMutationOptions<unknown, DefaultError, Options<CallWithResultFromHeaderData>>, 'mutationFn'>>) => useMutation({ ...callWithResultFromHeaderMutation(), ...mutationOptions });\n\nexport const testErrorCodeMutation = (options?: Partial<Options<TestErrorCodeData>>): UseMutationOptions<unknown, DefaultError, Options<TestErrorCodeData>> => {\n    const mutationOptions: UseMutationOptions<unknown, DefaultError, Options<TestErrorCodeData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await testErrorCode({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const useTestErrorCodeMutation = (mutationOptions?: Partial<Omit<UseMutationOptions<unknown, DefaultError, Options<TestErrorCodeData>>, 'mutationFn'>>) => useMutation({ ...testErrorCodeMutation(), ...mutationOptions });\n\nexport const nonAsciiæøåÆøÅöôêÊ字符串Mutation = (options?: Partial<Options<NonAsciiæøåÆøÅöôêÊ字符串Data>>): UseMutationOptions<NonAsciiæøåÆøÅöôêÊ字符串Response, DefaultError, Options<NonAsciiæøåÆøÅöôêÊ字符串Data>> => {\n    const mutationOptions: UseMutationOptions<NonAsciiæøåÆøÅöôêÊ字符串Response, DefaultError, Options<NonAsciiæøåÆøÅöôêÊ字符串Data>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await nonAsciiæøåÆøÅöôêÊ字符串({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const useNonAsciiæøåÆøÅöôêÊ字符串Mutation = (mutationOptions?: Partial<Omit<UseMutationOptions<NonAsciiæøåÆøÅöôêÊ字符串Response, DefaultError, Options<NonAsciiæøåÆøÅöôêÊ字符串Data>>, 'mutationFn'>>) => useMutation({ ...nonAsciiæøåÆøÅöôêÊ字符串Mutation(), ...mutationOptions });\n\n/**\n * Login User\n */\nexport const putWithFormUrlEncodedMutation = (options?: Partial<Options<PutWithFormUrlEncodedData>>): UseMutationOptions<unknown, DefaultError, Options<PutWithFormUrlEncodedData>> => {\n    const mutationOptions: UseMutationOptions<unknown, DefaultError, Options<PutWithFormUrlEncodedData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await putWithFormUrlEncoded({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\n/**\n * Login User\n */\nexport const usePutWithFormUrlEncodedMutation = (mutationOptions?: Partial<Omit<UseMutationOptions<unknown, DefaultError, Options<PutWithFormUrlEncodedData>>, 'mutationFn'>>) => useMutation({ ...putWithFormUrlEncodedMutation(), ...mutationOptions });\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/react-query/useMutation/client/client.gen.ts",
    "content": "// 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 (options: RequestOptions) => {\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 url = buildUrl(opts);\n\n    return { opts, url };\n  };\n\n  const request: Client['request'] = async (options) => {\n    // @ts-expect-error\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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/react-query/useMutation/client/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type { Auth } from '../core/auth.gen';\nexport type { QuerySerializerOptions } from '../core/bodySerializer.gen';\nexport {\n  formDataBodySerializer,\n  jsonBodySerializer,\n  urlSearchParamsBodySerializer,\n} from '../core/bodySerializer.gen';\nexport { buildClientParams } from '../core/params.gen';\nexport { serializeQueryKeyValue } from '../core/queryKeySerializer.gen';\nexport { createClient } from './client.gen';\nexport type {\n  Client,\n  ClientOptions,\n  Config,\n  CreateClientConfig,\n  Options,\n  RequestOptions,\n  RequestResult,\n  ResolvedRequestOptions,\n  ResponseStyle,\n  TDataShape,\n} from './types.gen';\nexport { createConfig, mergeHeaders } from './utils.gen';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/react-query/useMutation/client/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { Auth } from '../core/auth.gen';\nimport type {\n  ServerSentEventsOptions,\n  ServerSentEventsResult,\n} from '../core/serverSentEvents.gen';\nimport type { Client as CoreClient, Config as CoreConfig } from '../core/types.gen';\nimport type { Middleware } from './utils.gen';\n\nexport type ResponseStyle = 'data' | 'fields';\n\nexport interface Config<T extends ClientOptions = ClientOptions>\n  extends Omit<RequestInit, 'body' | 'headers' | 'method'>, CoreConfig {\n  /**\n   * Base URL for all requests made by this client.\n   */\n  baseUrl?: T['baseUrl'];\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   * Please don't use the Fetch client for Next.js applications. The `next`\n   * options won't have any effect.\n   *\n   * Install {@link https://www.npmjs.com/package/@hey-api/client-next `@hey-api/client-next`} instead.\n   */\n  next?: never;\n  /**\n   * Return the response data parsed in a specified format. By default, `auto`\n   * will infer the appropriate method from the `Content-Type` response header.\n   * You can override this behavior with any of the {@link Body} methods.\n   * Select `stream` if you don't want to parse response data at all.\n   *\n   * @default 'auto'\n   */\n  parseAs?: 'arrayBuffer' | 'auto' | 'blob' | 'formData' | 'json' | 'stream' | 'text';\n  /**\n   * Should we return only data or multiple fields (data, error, response, etc.)?\n   *\n   * @default 'fields'\n   */\n  responseStyle?: ResponseStyle;\n  /**\n   * Throw an error instead of returning it in the response?\n   *\n   * @default false\n   */\n  throwOnError?: T['throwOnError'];\n}\n\nexport interface RequestOptions<\n  TData = unknown,\n  TResponseStyle extends ResponseStyle = 'fields',\n  ThrowOnError extends boolean = boolean,\n  Url extends string = string,\n>\n  extends\n    Config<{\n      responseStyle: TResponseStyle;\n      throwOnError: ThrowOnError;\n    }>,\n    Pick<\n      ServerSentEventsOptions<TData>,\n      | 'onRequest'\n      | 'onSseError'\n      | 'onSseEvent'\n      | 'sseDefaultRetryDelay'\n      | 'sseMaxRetryAttempts'\n      | 'sseMaxRetryDelay'\n    > {\n  /**\n   * Any body that you want to add to your request.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/fetch#body}\n   */\n  body?: unknown;\n  path?: Record<string, unknown>;\n  query?: Record<string, unknown>;\n  /**\n   * Security mechanism(s) to use for the request.\n   */\n  security?: ReadonlyArray<Auth>;\n  url: Url;\n}\n\nexport interface ResolvedRequestOptions<\n  TResponseStyle extends ResponseStyle = 'fields',\n  ThrowOnError extends boolean = boolean,\n  Url extends string = string,\n> extends RequestOptions<unknown, TResponseStyle, ThrowOnError, Url> {\n  serializedBody?: string;\n}\n\nexport type RequestResult<\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = boolean,\n  TResponseStyle extends ResponseStyle = 'fields',\n> = ThrowOnError extends true\n  ? Promise<\n      TResponseStyle extends 'data'\n        ? TData extends Record<string, unknown>\n          ? TData[keyof TData]\n          : TData\n        : {\n            data: TData extends Record<string, unknown> ? TData[keyof TData] : TData;\n            request: Request;\n            response: Response;\n          }\n    >\n  : Promise<\n      TResponseStyle extends 'data'\n        ? (TData extends Record<string, unknown> ? TData[keyof TData] : TData) | undefined\n        : (\n            | {\n                data: TData extends Record<string, unknown> ? TData[keyof TData] : TData;\n                error: undefined;\n              }\n            | {\n                data: undefined;\n                error: TError extends Record<string, unknown> ? TError[keyof TError] : TError;\n              }\n          ) & {\n            request: Request;\n            response: Response;\n          }\n    >;\n\nexport interface ClientOptions {\n  baseUrl?: string;\n  responseStyle?: ResponseStyle;\n  throwOnError?: boolean;\n}\n\ntype MethodFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'>,\n) => RequestResult<TData, TError, ThrowOnError, TResponseStyle>;\n\ntype SseFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'>,\n) => Promise<ServerSentEventsResult<TData, TError>>;\n\ntype RequestFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'> &\n    Pick<Required<RequestOptions<TData, TResponseStyle, ThrowOnError>>, 'method'>,\n) => RequestResult<TData, TError, ThrowOnError, TResponseStyle>;\n\ntype BuildUrlFn = <\n  TData extends {\n    body?: unknown;\n    path?: Record<string, unknown>;\n    query?: Record<string, unknown>;\n    url: string;\n  },\n>(\n  options: TData & Options<TData>,\n) => string;\n\nexport type Client = CoreClient<RequestFn, Config, MethodFn, BuildUrlFn, SseFn> & {\n  interceptors: Middleware<Request, Response, unknown, ResolvedRequestOptions>;\n};\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 = ClientOptions> = (\n  override?: Config<ClientOptions & T>,\n) => Config<Required<ClientOptions> & T>;\n\nexport interface TDataShape {\n  body?: unknown;\n  headers?: unknown;\n  path?: unknown;\n  query?: unknown;\n  url: string;\n}\n\ntype OmitKeys<T, K> = Pick<T, Exclude<keyof T, K>>;\n\nexport type Options<\n  TData extends TDataShape = TDataShape,\n  ThrowOnError extends boolean = boolean,\n  TResponse = unknown,\n  TResponseStyle extends ResponseStyle = 'fields',\n> = OmitKeys<\n  RequestOptions<TResponse, TResponseStyle, ThrowOnError>,\n  'body' | 'path' | 'query' | 'url'\n> &\n  ([TData] extends [never] ? unknown : Omit<TData, 'url'>);\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/react-query/useMutation/client/utils.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/react-query/useMutation/client.gen.ts",
    "content": "// 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: 'http://localhost:3000/base' }));\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/react-query/useMutation/core/auth.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/react-query/useMutation/core/bodySerializer.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/react-query/useMutation/core/params.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/react-query/useMutation/core/pathSerializer.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/react-query/useMutation/core/queryKeySerializer.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\n/**\n * JSON-friendly union that mirrors what Pinia Colada can hash.\n */\nexport type JsonValue =\n  | null\n  | string\n  | number\n  | boolean\n  | JsonValue[]\n  | { [key: string]: JsonValue };\n\n/**\n * Replacer that converts non-JSON values (bigint, Date, etc.) to safe substitutes.\n */\nexport const queryKeyJsonReplacer = (_key: string, value: unknown) => {\n  if (value === undefined || typeof value === 'function' || typeof value === 'symbol') {\n    return undefined;\n  }\n  if (typeof value === 'bigint') {\n    return value.toString();\n  }\n  if (value instanceof Date) {\n    return value.toISOString();\n  }\n  return value;\n};\n\n/**\n * Safely stringifies a value and parses it back into a JsonValue.\n */\nexport const stringifyToJsonValue = (input: unknown): JsonValue | undefined => {\n  try {\n    const json = JSON.stringify(input, queryKeyJsonReplacer);\n    if (json === undefined) {\n      return undefined;\n    }\n    return JSON.parse(json) as JsonValue;\n  } catch {\n    return undefined;\n  }\n};\n\n/**\n * Detects plain objects (including objects with a null prototype).\n */\nconst isPlainObject = (value: unknown): value is Record<string, unknown> => {\n  if (value === null || typeof value !== 'object') {\n    return false;\n  }\n  const prototype = Object.getPrototypeOf(value as object);\n  return prototype === Object.prototype || prototype === null;\n};\n\n/**\n * Turns URLSearchParams into a sorted JSON object for deterministic keys.\n */\nconst serializeSearchParams = (params: URLSearchParams): JsonValue => {\n  const entries = Array.from(params.entries()).sort(([a], [b]) => a.localeCompare(b));\n  const result: Record<string, JsonValue> = {};\n\n  for (const [key, value] of entries) {\n    const existing = result[key];\n    if (existing === undefined) {\n      result[key] = value;\n      continue;\n    }\n\n    if (Array.isArray(existing)) {\n      (existing as string[]).push(value);\n    } else {\n      result[key] = [existing, value];\n    }\n  }\n\n  return result;\n};\n\n/**\n * Normalizes any accepted value into a JSON-friendly shape for query keys.\n */\nexport const serializeQueryKeyValue = (value: unknown): JsonValue | undefined => {\n  if (value === null) {\n    return null;\n  }\n\n  if (typeof value === 'string' || typeof value === 'number' || typeof value === 'boolean') {\n    return value;\n  }\n\n  if (value === undefined || typeof value === 'function' || typeof value === 'symbol') {\n    return undefined;\n  }\n\n  if (typeof value === 'bigint') {\n    return value.toString();\n  }\n\n  if (value instanceof Date) {\n    return value.toISOString();\n  }\n\n  if (Array.isArray(value)) {\n    return stringifyToJsonValue(value);\n  }\n\n  if (typeof URLSearchParams !== 'undefined' && value instanceof URLSearchParams) {\n    return serializeSearchParams(value);\n  }\n\n  if (isPlainObject(value)) {\n    return stringifyToJsonValue(value);\n  }\n\n  return undefined;\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/react-query/useMutation/core/serverSentEvents.gen.ts",
    "content": "// 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 const 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            // Normalize line endings: CRLF -> LF, then CR -> LF\n            buffer = buffer.replace(/\\r\\n/g, '\\n').replace(/\\r/g, '\\n');\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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/react-query/useMutation/core/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { Auth, AuthToken } from './auth.gen';\nimport type { BodySerializer, QuerySerializer, QuerySerializerOptions } from './bodySerializer.gen';\n\nexport type HttpMethod =\n  | 'connect'\n  | 'delete'\n  | 'get'\n  | 'head'\n  | 'options'\n  | 'patch'\n  | 'post'\n  | 'put'\n  | 'trace';\n\nexport type Client<\n  RequestFn = never,\n  Config = unknown,\n  MethodFn = never,\n  BuildUrlFn = never,\n  SseFn = never,\n> = {\n  /**\n   * Returns the final request URL.\n   */\n  buildUrl: BuildUrlFn;\n  getConfig: () => Config;\n  request: RequestFn;\n  setConfig: (config: Config) => Config;\n} & {\n  [K in HttpMethod]: MethodFn;\n} & ([SseFn] extends [never] ? { sse?: never } : { sse: { [K in HttpMethod]: SseFn } });\n\nexport interface Config {\n  /**\n   * Auth token or a function returning auth token. The resolved value will be\n   * added to the request payload as defined by its `security` array.\n   */\n  auth?: ((auth: Auth) => Promise<AuthToken> | AuthToken) | AuthToken;\n  /**\n   * A function for serializing request body parameter. By default,\n   * {@link JSON.stringify()} will be used.\n   */\n  bodySerializer?: BodySerializer | null;\n  /**\n   * An object containing any HTTP headers that you want to pre-populate your\n   * `Headers` object with.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/Headers/Headers#init See more}\n   */\n  headers?:\n    | RequestInit['headers']\n    | Record<\n        string,\n        string | number | boolean | (string | number | boolean)[] | null | undefined | unknown\n      >;\n  /**\n   * The request method.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/fetch#method See more}\n   */\n  method?: Uppercase<HttpMethod>;\n  /**\n   * A function for serializing request query parameters. By default, arrays\n   * will be exploded in form style, objects will be exploded in deepObject\n   * style, and reserved characters are percent-encoded.\n   *\n   * This method will have no effect if the native `paramsSerializer()` Axios\n   * API function is used.\n   *\n   * {@link https://swagger.io/docs/specification/serialization/#query View examples}\n   */\n  querySerializer?: QuerySerializer | QuerySerializerOptions;\n  /**\n   * A function validating request data. This is useful if you want to ensure\n   * the request conforms to the desired shape, so it can be safely sent to\n   * the server.\n   */\n  requestValidator?: (data: unknown) => Promise<unknown>;\n  /**\n   * A function transforming response data before it's returned. This is useful\n   * for post-processing data, e.g. converting ISO strings into Date objects.\n   */\n  responseTransformer?: (data: unknown) => Promise<unknown>;\n  /**\n   * A function validating response data. This is useful if you want to ensure\n   * the response conforms to the desired shape, so it can be safely passed to\n   * the transformers and returned to the user.\n   */\n  responseValidator?: (data: unknown) => Promise<unknown>;\n}\n\ntype IsExactlyNeverOrNeverUndefined<T> = [T] extends [never]\n  ? true\n  : [T] extends [never | undefined]\n    ? [undefined] extends [T]\n      ? false\n      : true\n    : false;\n\nexport type OmitNever<T extends Record<string, unknown>> = {\n  [K in keyof T as IsExactlyNeverOrNeverUndefined<T[K]> extends true ? never : K]: T[K];\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/react-query/useMutation/core/utils.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/react-query/useMutation/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport { apiVVersionODataControllerCount, callToTestOrderOfParams, callWithDefaultOptionalParameters, callWithDefaultParameters, callWithDescriptions, callWithDuplicateResponses, callWithNoContentResponse, callWithParameters, callWithResponse, callWithResponseAndNoContentResponse, callWithResponses, callWithResultFromHeader, callWithWeirdParameterNames, collectionFormat, complexParams, complexTypes, deleteCallWithoutParametersAndResponse, deleteFoo, deprecatedCall, dummyA, dummyB, duplicateName, duplicateName2, duplicateName3, duplicateName4, export_, fileResponse, fooWow, getApiVbyApiVersionSimpleOperation, getCallWithOptionalParam, getCallWithoutParametersAndResponse, headCallWithoutParametersAndResponse, import_, multipartRequest, multipartResponse, nonAsciiæøåÆøÅöôêÊ字符串, type Options, optionsCallWithoutParametersAndResponse, patchApiVbyApiVersionNoTag, patchCallWithoutParametersAndResponse, postApiVbyApiVersionFormData, postApiVbyApiVersionRequestBody, postCallWithOptionalParam, postCallWithoutParametersAndResponse, putCallWithoutParametersAndResponse, putWithFormUrlEncoded, testErrorCode, types, uploadFile } from './sdk.gen';\nexport type { _3eNum1Период, _400, AdditionalPropertiesIntegerIssue, AdditionalPropertiesUnknownIssue, AdditionalPropertiesUnknownIssue2, AdditionalPropertiesUnknownIssue3, AdditionalPropertiesUnknownIssueWritable, AnyOfAnyAndNull, AnyOfArrays, ApiVVersionODataControllerCountData, ApiVVersionODataControllerCountResponse, ApiVVersionODataControllerCountResponses, ArrayWithAnyOfProperties, ArrayWithArray, ArrayWithBooleans, ArrayWithNumbers, ArrayWithProperties, ArrayWithReferences, ArrayWithStrings, CallToTestOrderOfParamsData, CallWithDefaultOptionalParametersData, CallWithDefaultParametersData, CallWithDescriptionsData, CallWithDuplicateResponsesData, CallWithDuplicateResponsesError, CallWithDuplicateResponsesErrors, CallWithDuplicateResponsesResponse, CallWithDuplicateResponsesResponses, CallWithNoContentResponseData, CallWithNoContentResponseResponse, CallWithNoContentResponseResponses, CallWithParametersData, CallWithResponseAndNoContentResponseData, CallWithResponseAndNoContentResponseResponse, CallWithResponseAndNoContentResponseResponses, CallWithResponseData, CallWithResponseResponse, CallWithResponseResponses, CallWithResponsesData, CallWithResponsesError, CallWithResponsesErrors, CallWithResponsesResponse, CallWithResponsesResponses, CallWithResultFromHeaderData, CallWithResultFromHeaderErrors, CallWithResultFromHeaderResponses, CallWithWeirdParameterNamesData, CamelCaseCommentWithBreaks, CharactersInDescription, ClientOptions, CollectionFormatData, CommentWithBackticks, CommentWithBackticksAndQuotes, CommentWithBreaks, CommentWithExpressionPlaceholders, CommentWithQuotes, CommentWithReservedCharacters, CommentWithSlashes, ComplexParamsData, ComplexParamsResponse, ComplexParamsResponses, ComplexTypesData, ComplexTypesErrors, ComplexTypesResponse, ComplexTypesResponses, CompositionBaseModel, CompositionExtendedModel, CompositionWithAllOfAndNullable, CompositionWithAnyOf, CompositionWithAnyOfAndNullable, CompositionWithAnyOfAnonymous, CompositionWithNestedAnyAndTypeNull, CompositionWithNestedAnyOfAndNull, CompositionWithOneOf, CompositionWithOneOfAndComplexArrayDictionary, CompositionWithOneOfAndNullable, CompositionWithOneOfAndProperties, CompositionWithOneOfAndSimpleArrayDictionary, CompositionWithOneOfAndSimpleDictionary, CompositionWithOneOfAnonymous, CompositionWithOneOfDiscriminator, ConstValue, Default, DeleteCallWithoutParametersAndResponseData, DeleteFooData, DeleteFooData2, DeleteFooData3, DeprecatedCallData, DeprecatedModel, DictionaryWithArray, DictionaryWithDictionary, DictionaryWithProperties, DictionaryWithPropertiesAndAdditionalProperties, DictionaryWithReference, DictionaryWithString, DummyAData, DummyAResponse, DummyAResponses, DummyBData, DummyBResponse, DummyBResponses, DuplicateName2Data, DuplicateName3Data, DuplicateName4Data, DuplicateNameData, EnumFromDescription, EnumWithExtensions, EnumWithNumbers, EnumWithReplacedCharacters, EnumWithStrings, EnumWithXEnumNames, ExportData, ExternalRefA, ExternalRefB, ExternalSharedModel, File, FileResponseData, FileResponseResponse, FileResponseResponses, FileWritable, FooWowData, FooWowResponses, FreeFormObjectWithAdditionalPropertiesEqEmptyObject, FreeFormObjectWithAdditionalPropertiesEqTrue, FreeFormObjectWithoutAdditionalProperties, GenericSchemaDuplicateIssue1SystemBoolean, GenericSchemaDuplicateIssue1SystemBooleanWritable, GenericSchemaDuplicateIssue1SystemString, GenericSchemaDuplicateIssue1SystemStringWritable, GetApiVbyApiVersionSimpleOperationData, GetApiVbyApiVersionSimpleOperationError, GetApiVbyApiVersionSimpleOperationErrors, GetApiVbyApiVersionSimpleOperationResponse, GetApiVbyApiVersionSimpleOperationResponses, GetCallWithOptionalParamData, GetCallWithoutParametersAndResponseData, HeadCallWithoutParametersAndResponseData, Import, ImportData, ImportResponse, ImportResponses, IoK8sApimachineryPkgApisMetaV1DeleteOptions, IoK8sApimachineryPkgApisMetaV1Preconditions, ModelCircle, ModelFromZendesk, ModelSquare, ModelThatExtends, ModelThatExtendsExtends, ModelWithAdditionalPropertiesEqTrue, ModelWithAdditionalPropertiesRef, ModelWithAnyOfConstantSizeArray, ModelWithAnyOfConstantSizeArrayAndIntersect, ModelWithAnyOfConstantSizeArrayNullable, ModelWithAnyOfConstantSizeArrayWithNSizeAndOptions, ModelWithAnyOfConstantSizeArrayWithNSizeAndOptionsWritable, ModelWithArray, ModelWithArrayReadOnlyAndWriteOnly, ModelWithArrayReadOnlyAndWriteOnlyWritable, ModelWithBackticksInDescription, ModelWithBoolean, ModelWithCircularReference, ModelWithConst, ModelWithConstantSizeArray, ModelWithDictionary, ModelWithDuplicateImports, ModelWithDuplicateProperties, ModelWithEnum, ModelWithEnumFromDescription, ModelWithEnumWithHyphen, ModelWithInteger, ModelWithNestedArrayEnums, ModelWithNestedArrayEnumsData, ModelWithNestedArrayEnumsDataBar, ModelWithNestedArrayEnumsDataFoo, ModelWithNestedCompositionEnums, ModelWithNestedEnums, ModelWithNestedProperties, ModelWithNullableObject, ModelWithNullableString, ModelWithNumericEnumUnion, ModelWithOneOfAndProperties, ModelWithOneOfEnum, ModelWithOrderedProperties, ModelWithPattern, ModelWithPatternWritable, ModelWithPrefixItemsConstantSizeArray, ModelWithProperties, ModelWithPropertiesWritable, ModelWithReadOnlyAndWriteOnly, ModelWithReadOnlyAndWriteOnlyWritable, ModelWithReference, ModelWithReferenceWritable, ModelWithString, ModelWithStringError, MultipartRequestData, MultipartResponseData, MultipartResponseResponse, MultipartResponseResponses, NestedAnyOfArraysNullable, NonAsciiæøåÆøÅöôêÊ字符串Data, NonAsciiæøåÆøÅöôêÊ字符串Response, NonAsciiæøåÆøÅöôêÊ字符串Responses, NonAsciiStringæøåÆøÅöôêÊ字符串, NullableObject, OneOfAllOfIssue, OneOfAllOfIssueWritable, OptionsCallWithoutParametersAndResponseData, Pageable, ParameterSimpleParameterUnused, PatchApiVbyApiVersionNoTagData, PatchApiVbyApiVersionNoTagResponses, PatchCallWithoutParametersAndResponseData, PostApiVbyApiVersionFormDataData, PostApiVbyApiVersionRequestBodyData, PostCallWithOptionalParamData, PostCallWithOptionalParamResponse, PostCallWithOptionalParamResponses, PostCallWithoutParametersAndResponseData, PostServiceWithEmptyTagResponse, PostServiceWithEmptyTagResponse2, PutCallWithoutParametersAndResponseData, PutWithFormUrlEncodedData, SchemaWithFormRestrictedKeys, SimpleBoolean, SimpleFile, SimpleFormData, SimpleInteger, SimpleParameter, SimpleReference, SimpleRequestBody, SimpleString, SimpleStringWithPattern, TestErrorCodeData, TestErrorCodeErrors, TestErrorCodeResponses, TypesData, TypesResponse, TypesResponses, UploadFileData, UploadFileResponse, UploadFileResponses, XFooBar } from './types.gen';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/react-query/useMutation/sdk.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport { type Client, formDataBodySerializer, type Options as Options2, type TDataShape, urlSearchParamsBodySerializer } from './client';\nimport { client } from './client.gen';\nimport type { ApiVVersionODataControllerCountData, ApiVVersionODataControllerCountResponses, CallToTestOrderOfParamsData, CallWithDefaultOptionalParametersData, CallWithDefaultParametersData, CallWithDescriptionsData, CallWithDuplicateResponsesData, CallWithDuplicateResponsesErrors, CallWithDuplicateResponsesResponses, CallWithNoContentResponseData, CallWithNoContentResponseResponses, CallWithParametersData, CallWithResponseAndNoContentResponseData, CallWithResponseAndNoContentResponseResponses, CallWithResponseData, CallWithResponseResponses, CallWithResponsesData, CallWithResponsesErrors, CallWithResponsesResponses, CallWithResultFromHeaderData, CallWithResultFromHeaderErrors, CallWithResultFromHeaderResponses, CallWithWeirdParameterNamesData, CollectionFormatData, ComplexParamsData, ComplexParamsResponses, ComplexTypesData, ComplexTypesErrors, ComplexTypesResponses, DeleteCallWithoutParametersAndResponseData, DeleteFooData3, DeprecatedCallData, DummyAData, DummyAResponses, DummyBData, DummyBResponses, DuplicateName2Data, DuplicateName3Data, DuplicateName4Data, DuplicateNameData, ExportData, FileResponseData, FileResponseResponses, FooWowData, FooWowResponses, GetApiVbyApiVersionSimpleOperationData, GetApiVbyApiVersionSimpleOperationErrors, GetApiVbyApiVersionSimpleOperationResponses, GetCallWithOptionalParamData, GetCallWithoutParametersAndResponseData, HeadCallWithoutParametersAndResponseData, ImportData, ImportResponses, MultipartRequestData, MultipartResponseData, MultipartResponseResponses, NonAsciiæøåÆøÅöôêÊ字符串Data, NonAsciiæøåÆøÅöôêÊ字符串Responses, OptionsCallWithoutParametersAndResponseData, PatchApiVbyApiVersionNoTagData, PatchApiVbyApiVersionNoTagResponses, PatchCallWithoutParametersAndResponseData, PostApiVbyApiVersionFormDataData, PostApiVbyApiVersionRequestBodyData, PostCallWithOptionalParamData, PostCallWithOptionalParamResponses, PostCallWithoutParametersAndResponseData, PutCallWithoutParametersAndResponseData, PutWithFormUrlEncodedData, TestErrorCodeData, TestErrorCodeErrors, TestErrorCodeResponses, TypesData, TypesResponses, UploadFileData, UploadFileResponses } from './types.gen';\n\nexport type Options<TData extends TDataShape = TDataShape, ThrowOnError extends boolean = boolean> = Options2<TData, ThrowOnError> & {\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\nexport const export_ = <ThrowOnError extends boolean = false>(options?: Options<ExportData, ThrowOnError>) => (options?.client ?? client).get<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/no+tag', ...options });\n\nexport const patchApiVbyApiVersionNoTag = <ThrowOnError extends boolean = false>(options?: Options<PatchApiVbyApiVersionNoTagData, ThrowOnError>) => (options?.client ?? client).patch<PatchApiVbyApiVersionNoTagResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/no+tag', ...options });\n\nexport const import_ = <ThrowOnError extends boolean = false>(options: Options<ImportData, ThrowOnError>) => (options.client ?? client).post<ImportResponses, unknown, ThrowOnError>({\n    url: '/api/v{api-version}/no+tag',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options.headers\n    }\n});\n\nexport const fooWow = <ThrowOnError extends boolean = false>(options?: Options<FooWowData, ThrowOnError>) => (options?.client ?? client).put<FooWowResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/no+tag', ...options });\n\nexport const apiVVersionODataControllerCount = <ThrowOnError extends boolean = false>(options?: Options<ApiVVersionODataControllerCountData, ThrowOnError>) => (options?.client ?? client).get<ApiVVersionODataControllerCountResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple/$count', ...options });\n\nexport const getApiVbyApiVersionSimpleOperation = <ThrowOnError extends boolean = false>(options: Options<GetApiVbyApiVersionSimpleOperationData, ThrowOnError>) => (options.client ?? client).get<GetApiVbyApiVersionSimpleOperationResponses, GetApiVbyApiVersionSimpleOperationErrors, ThrowOnError>({ url: '/api/v{api-version}/simple:operation', ...options });\n\nexport const deleteCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<DeleteCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).delete<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const getCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<GetCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).get<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const headCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<HeadCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).head<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const optionsCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<OptionsCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).options<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const patchCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<PatchCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).patch<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const postCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<PostCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).post<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const putCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<PutCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).put<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const deleteFoo = <ThrowOnError extends boolean = false>(options: Options<DeleteFooData3, ThrowOnError>) => (options.client ?? client).delete<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/foo/{foo_param}/bar/{BarParam}', ...options });\n\nexport const callWithDescriptions = <ThrowOnError extends boolean = false>(options?: Options<CallWithDescriptionsData, ThrowOnError>) => (options?.client ?? client).post<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/descriptions', ...options });\n\n/**\n * @deprecated\n */\nexport const deprecatedCall = <ThrowOnError extends boolean = false>(options: Options<DeprecatedCallData, ThrowOnError>) => (options.client ?? client).post<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/parameters/deprecated', ...options });\n\nexport const callWithParameters = <ThrowOnError extends boolean = false>(options: Options<CallWithParametersData, ThrowOnError>) => (options.client ?? client).post<unknown, unknown, ThrowOnError>({\n    url: '/api/v{api-version}/parameters/{parameterPath}',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options.headers\n    }\n});\n\nexport const callWithWeirdParameterNames = <ThrowOnError extends boolean = false>(options: Options<CallWithWeirdParameterNamesData, ThrowOnError>) => (options.client ?? client).post<unknown, unknown, ThrowOnError>({\n    url: '/api/v{api-version}/parameters/{parameter.path.1}/{parameter-path-2}/{PARAMETER-PATH-3}',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options.headers\n    }\n});\n\nexport const getCallWithOptionalParam = <ThrowOnError extends boolean = false>(options: Options<GetCallWithOptionalParamData, ThrowOnError>) => (options.client ?? client).get<unknown, unknown, ThrowOnError>({\n    url: '/api/v{api-version}/parameters',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options.headers\n    }\n});\n\nexport const postCallWithOptionalParam = <ThrowOnError extends boolean = false>(options: Options<PostCallWithOptionalParamData, ThrowOnError>) => (options.client ?? client).post<PostCallWithOptionalParamResponses, unknown, ThrowOnError>({\n    url: '/api/v{api-version}/parameters',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options.headers\n    }\n});\n\nexport const postApiVbyApiVersionRequestBody = <ThrowOnError extends boolean = false>(options?: Options<PostApiVbyApiVersionRequestBodyData, ThrowOnError>) => (options?.client ?? client).post<unknown, unknown, ThrowOnError>({\n    url: '/api/v{api-version}/requestBody',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options?.headers\n    }\n});\n\nexport const postApiVbyApiVersionFormData = <ThrowOnError extends boolean = false>(options?: Options<PostApiVbyApiVersionFormDataData, ThrowOnError>) => (options?.client ?? client).post<unknown, unknown, ThrowOnError>({\n    ...formDataBodySerializer,\n    url: '/api/v{api-version}/formData',\n    ...options,\n    headers: {\n        'Content-Type': null,\n        ...options?.headers\n    }\n});\n\nexport const callWithDefaultParameters = <ThrowOnError extends boolean = false>(options?: Options<CallWithDefaultParametersData, ThrowOnError>) => (options?.client ?? client).get<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/defaults', ...options });\n\nexport const callWithDefaultOptionalParameters = <ThrowOnError extends boolean = false>(options?: Options<CallWithDefaultOptionalParametersData, ThrowOnError>) => (options?.client ?? client).post<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/defaults', ...options });\n\nexport const callToTestOrderOfParams = <ThrowOnError extends boolean = false>(options: Options<CallToTestOrderOfParamsData, ThrowOnError>) => (options.client ?? client).put<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/defaults', ...options });\n\nexport const duplicateName = <ThrowOnError extends boolean = false>(options?: Options<DuplicateNameData, ThrowOnError>) => (options?.client ?? client).delete<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/duplicate', ...options });\n\nexport const duplicateName2 = <ThrowOnError extends boolean = false>(options?: Options<DuplicateName2Data, ThrowOnError>) => (options?.client ?? client).get<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/duplicate', ...options });\n\nexport const duplicateName3 = <ThrowOnError extends boolean = false>(options?: Options<DuplicateName3Data, ThrowOnError>) => (options?.client ?? client).post<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/duplicate', ...options });\n\nexport const duplicateName4 = <ThrowOnError extends boolean = false>(options?: Options<DuplicateName4Data, ThrowOnError>) => (options?.client ?? client).put<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/duplicate', ...options });\n\nexport const callWithNoContentResponse = <ThrowOnError extends boolean = false>(options?: Options<CallWithNoContentResponseData, ThrowOnError>) => (options?.client ?? client).get<CallWithNoContentResponseResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/no-content', ...options });\n\nexport const callWithResponseAndNoContentResponse = <ThrowOnError extends boolean = false>(options?: Options<CallWithResponseAndNoContentResponseData, ThrowOnError>) => (options?.client ?? client).get<CallWithResponseAndNoContentResponseResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/multiple-tags/response-and-no-content', ...options });\n\nexport const dummyA = <ThrowOnError extends boolean = false>(options?: Options<DummyAData, ThrowOnError>) => (options?.client ?? client).get<DummyAResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/multiple-tags/a', ...options });\n\nexport const dummyB = <ThrowOnError extends boolean = false>(options?: Options<DummyBData, ThrowOnError>) => (options?.client ?? client).get<DummyBResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/multiple-tags/b', ...options });\n\nexport const callWithResponse = <ThrowOnError extends boolean = false>(options?: Options<CallWithResponseData, ThrowOnError>) => (options?.client ?? client).get<CallWithResponseResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/response', ...options });\n\nexport const callWithDuplicateResponses = <ThrowOnError extends boolean = false>(options?: Options<CallWithDuplicateResponsesData, ThrowOnError>) => (options?.client ?? client).post<CallWithDuplicateResponsesResponses, CallWithDuplicateResponsesErrors, ThrowOnError>({ url: '/api/v{api-version}/response', ...options });\n\nexport const callWithResponses = <ThrowOnError extends boolean = false>(options?: Options<CallWithResponsesData, ThrowOnError>) => (options?.client ?? client).put<CallWithResponsesResponses, CallWithResponsesErrors, ThrowOnError>({ url: '/api/v{api-version}/response', ...options });\n\nexport const collectionFormat = <ThrowOnError extends boolean = false>(options: Options<CollectionFormatData, ThrowOnError>) => (options.client ?? client).get<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/collectionFormat', ...options });\n\nexport const types = <ThrowOnError extends boolean = false>(options: Options<TypesData, ThrowOnError>) => (options.client ?? client).get<TypesResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/types', ...options });\n\nexport const uploadFile = <ThrowOnError extends boolean = false>(options: Options<UploadFileData, ThrowOnError>) => (options.client ?? client).post<UploadFileResponses, unknown, ThrowOnError>({\n    ...urlSearchParamsBodySerializer,\n    url: '/api/v{api-version}/upload',\n    ...options,\n    headers: {\n        'Content-Type': 'application/x-www-form-urlencoded',\n        ...options.headers\n    }\n});\n\nexport const fileResponse = <ThrowOnError extends boolean = false>(options: Options<FileResponseData, ThrowOnError>) => (options.client ?? client).get<FileResponseResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/file/{id}', ...options });\n\nexport const complexTypes = <ThrowOnError extends boolean = false>(options: Options<ComplexTypesData, ThrowOnError>) => (options.client ?? client).get<ComplexTypesResponses, ComplexTypesErrors, ThrowOnError>({\n    querySerializer: { parameters: { parameterObject: { object: { style: 'form' } } } },\n    url: '/api/v{api-version}/complex',\n    ...options\n});\n\nexport const multipartResponse = <ThrowOnError extends boolean = false>(options?: Options<MultipartResponseData, ThrowOnError>) => (options?.client ?? client).get<MultipartResponseResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/multipart', ...options });\n\nexport const multipartRequest = <ThrowOnError extends boolean = false>(options?: Options<MultipartRequestData, ThrowOnError>) => (options?.client ?? client).post<unknown, unknown, ThrowOnError>({\n    ...formDataBodySerializer,\n    url: '/api/v{api-version}/multipart',\n    ...options,\n    headers: {\n        'Content-Type': null,\n        ...options?.headers\n    }\n});\n\nexport const complexParams = <ThrowOnError extends boolean = false>(options: Options<ComplexParamsData, ThrowOnError>) => (options.client ?? client).put<ComplexParamsResponses, unknown, ThrowOnError>({\n    url: '/api/v{api-version}/complex/{id}',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json-patch+json',\n        ...options.headers\n    }\n});\n\nexport const callWithResultFromHeader = <ThrowOnError extends boolean = false>(options?: Options<CallWithResultFromHeaderData, ThrowOnError>) => (options?.client ?? client).post<CallWithResultFromHeaderResponses, CallWithResultFromHeaderErrors, ThrowOnError>({ url: '/api/v{api-version}/header', ...options });\n\nexport const testErrorCode = <ThrowOnError extends boolean = false>(options: Options<TestErrorCodeData, ThrowOnError>) => (options.client ?? client).post<TestErrorCodeResponses, TestErrorCodeErrors, ThrowOnError>({ url: '/api/v{api-version}/error', ...options });\n\nexport const nonAsciiæøåÆøÅöôêÊ字符串 = <ThrowOnError extends boolean = false>(options: Options<NonAsciiæøåÆøÅöôêÊ字符串Data, ThrowOnError>) => (options.client ?? client).post<NonAsciiæøåÆøÅöôêÊ字符串Responses, unknown, ThrowOnError>({ url: '/api/v{api-version}/non-ascii-æøåÆØÅöôêÊ字符串', ...options });\n\n/**\n * Login User\n */\nexport const putWithFormUrlEncoded = <ThrowOnError extends boolean = false>(options: Options<PutWithFormUrlEncodedData, ThrowOnError>) => (options.client ?? client).put<unknown, unknown, ThrowOnError>({\n    ...urlSearchParamsBodySerializer,\n    url: '/api/v{api-version}/non-ascii-æøåÆØÅöôêÊ字符串',\n    ...options,\n    headers: {\n        'Content-Type': 'application/x-www-form-urlencoded',\n        ...options.headers\n    }\n});\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/react-query/useMutation/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type ClientOptions = {\n    baseUrl: 'http://localhost:3000/base' | (string & {});\n};\n\n/**\n * Model with number-only name\n */\nexport type _400 = string;\n\n/**\n * External ref to shared model (A)\n */\nexport type ExternalRefA = ExternalSharedModel;\n\n/**\n * External ref to shared model (B)\n */\nexport type ExternalRefB = ExternalSharedModel;\n\n/**\n * Testing multiline comments in string: First line\n * Second line\n *\n * Fourth line\n */\nexport type CamelCaseCommentWithBreaks = number;\n\n/**\n * Testing multiline comments in string: First line\n * Second line\n *\n * Fourth line\n */\nexport type CommentWithBreaks = number;\n\n/**\n * Testing backticks in string: `backticks` and ```multiple backticks``` should work\n */\nexport type CommentWithBackticks = number;\n\n/**\n * Testing backticks and quotes in string: `backticks`, 'quotes', \"double quotes\" and ```multiple backticks``` should work\n */\nexport type CommentWithBackticksAndQuotes = number;\n\n/**\n * Testing slashes in string: \\backwards\\\\\\ and /forwards/// should work\n */\nexport type CommentWithSlashes = number;\n\n/**\n * Testing expression placeholders in string: ${expression} should work\n */\nexport type CommentWithExpressionPlaceholders = number;\n\n/**\n * Testing quotes in string: 'single quote''' and \"double quotes\"\"\" should work\n */\nexport type CommentWithQuotes = number;\n\n/**\n * Testing reserved characters in string: * inline * and ** inline ** should work\n */\nexport type CommentWithReservedCharacters = number;\n\n/**\n * This is a simple number\n */\nexport type SimpleInteger = number;\n\n/**\n * This is a simple boolean\n */\nexport type SimpleBoolean = boolean;\n\n/**\n * This is a simple string\n */\nexport type SimpleString = string;\n\n/**\n * A string with non-ascii (unicode) characters valid in typescript identifiers (æøåÆØÅöÔèÈ字符串)\n */\nexport type NonAsciiStringæøåÆøÅöôêÊ字符串 = string;\n\n/**\n * This is a simple file\n */\nexport type SimpleFile = Blob | File;\n\n/**\n * This is a simple reference\n */\nexport type SimpleReference = ModelWithString;\n\n/**\n * This is a simple string\n */\nexport type SimpleStringWithPattern = string | null;\n\n/**\n * This is a simple enum with strings\n */\nexport type EnumWithStrings = 'Success' | 'Warning' | 'Error' | '\\'Single Quote\\'' | '\"Double Quotes\"' | 'Non-ascii: øæåôöØÆÅÔÖ字符串';\n\nexport type EnumWithReplacedCharacters = '\\'Single Quote\\'' | '\"Double Quotes\"' | 'øæåôöØÆÅÔÖ字符串' | 3.1 | '';\n\n/**\n * This is a simple enum with numbers\n */\nexport type EnumWithNumbers = 1 | 2 | 3 | 1.1 | 1.2 | 1.3 | 100 | 200 | 300 | -100 | -200 | -300 | -1.1 | -1.2 | -1.3;\n\n/**\n * Success=1,Warning=2,Error=3\n */\nexport type EnumFromDescription = number;\n\n/**\n * This is a simple enum with numbers\n */\nexport type EnumWithExtensions = 200 | 400 | 500;\n\nexport type EnumWithXEnumNames = 0 | 1 | 2;\n\n/**\n * This is a simple array with numbers\n */\nexport type ArrayWithNumbers = Array<number>;\n\n/**\n * This is a simple array with booleans\n */\nexport type ArrayWithBooleans = Array<boolean>;\n\n/**\n * This is a simple array with strings\n */\nexport type ArrayWithStrings = Array<string>;\n\n/**\n * This is a simple array with references\n */\nexport type ArrayWithReferences = Array<ModelWithString>;\n\n/**\n * This is a simple array containing an array\n */\nexport type ArrayWithArray = Array<Array<ModelWithString>>;\n\n/**\n * This is a simple array with properties\n */\nexport type ArrayWithProperties = Array<{\n    '16x16'?: CamelCaseCommentWithBreaks;\n    bar?: string;\n}>;\n\n/**\n * This is a simple array with any of properties\n */\nexport type ArrayWithAnyOfProperties = Array<{\n    foo?: string;\n} | {\n    bar?: string;\n}>;\n\nexport type AnyOfAnyAndNull = {\n    data?: unknown | null;\n};\n\n/**\n * This is a simple array with any of properties\n */\nexport type AnyOfArrays = {\n    results?: Array<{\n        foo?: string;\n    } | {\n        bar?: string;\n    }>;\n};\n\n/**\n * This is a string dictionary\n */\nexport type DictionaryWithString = {\n    [key: string]: string;\n};\n\nexport type DictionaryWithPropertiesAndAdditionalProperties = {\n    foo?: number;\n    bar?: boolean;\n    [key: string]: string | number | boolean | undefined;\n};\n\n/**\n * This is a string reference\n */\nexport type DictionaryWithReference = {\n    [key: string]: ModelWithString;\n};\n\n/**\n * This is a complex dictionary\n */\nexport type DictionaryWithArray = {\n    [key: string]: Array<ModelWithString>;\n};\n\n/**\n * This is a string dictionary\n */\nexport type DictionaryWithDictionary = {\n    [key: string]: {\n        [key: string]: string;\n    };\n};\n\n/**\n * This is a complex dictionary\n */\nexport type DictionaryWithProperties = {\n    [key: string]: {\n        foo?: string;\n        bar?: string;\n    };\n};\n\n/**\n * This is a model with one number property\n */\nexport type ModelWithInteger = {\n    /**\n     * This is a simple number property\n     */\n    prop?: number;\n};\n\n/**\n * This is a model with one boolean property\n */\nexport type ModelWithBoolean = {\n    /**\n     * This is a simple boolean property\n     */\n    prop?: boolean;\n};\n\n/**\n * This is a model with one string property\n */\nexport type ModelWithString = {\n    /**\n     * This is a simple string property\n     */\n    prop?: string;\n};\n\n/**\n * This is a model with one string property\n */\nexport type ModelWithStringError = {\n    /**\n     * This is a simple string property\n     */\n    prop?: string;\n};\n\n/**\n * `Comment` or `VoiceComment`. The JSON object for adding voice comments to tickets is different. See [Adding voice comments to tickets](/documentation/ticketing/managing-tickets/adding-voice-comments-to-tickets)\n */\nexport type ModelFromZendesk = string;\n\n/**\n * This is a model with one string property\n */\nexport type ModelWithNullableString = {\n    /**\n     * This is a simple string property\n     */\n    nullableProp1?: string | null;\n    /**\n     * This is a simple string property\n     */\n    nullableRequiredProp1: string | null;\n    /**\n     * This is a simple string property\n     */\n    nullableProp2?: string | null;\n    /**\n     * This is a simple string property\n     */\n    nullableRequiredProp2: string | null;\n    /**\n     * This is a simple enum with strings\n     */\n    'foo_bar-enum'?: 'Success' | 'Warning' | 'Error' | 'ØÆÅ字符串';\n};\n\n/**\n * This is a model with one enum\n */\nexport type ModelWithEnum = {\n    /**\n     * This is a simple enum with strings\n     */\n    'foo_bar-enum'?: 'Success' | 'Warning' | 'Error' | 'ØÆÅ字符串';\n    /**\n     * These are the HTTP error code enums\n     */\n    statusCode?: '100' | '200 FOO' | '300 FOO_BAR' | '400 foo-bar' | '500 foo.bar' | '600 foo&bar';\n    /**\n     * Simple boolean enum\n     */\n    bool?: true;\n};\n\n/**\n * This is a model with one enum with escaped name\n */\nexport type ModelWithEnumWithHyphen = {\n    /**\n     * Foo-Bar-Baz-Qux\n     */\n    'foo-bar-baz-qux'?: '3.0';\n};\n\n/**\n * This is a model with one enum\n */\nexport type ModelWithEnumFromDescription = {\n    /**\n     * Success=1,Warning=2,Error=3\n     */\n    test?: number;\n};\n\n/**\n * This is a model with nested enums\n */\nexport type ModelWithNestedEnums = {\n    dictionaryWithEnum?: {\n        [key: string]: 'Success' | 'Warning' | 'Error';\n    };\n    dictionaryWithEnumFromDescription?: {\n        [key: string]: number;\n    };\n    arrayWithEnum?: Array<'Success' | 'Warning' | 'Error'>;\n    arrayWithDescription?: Array<number>;\n    /**\n     * This is a simple enum with strings\n     */\n    'foo_bar-enum'?: 'Success' | 'Warning' | 'Error' | 'ØÆÅ字符串';\n};\n\n/**\n * This is a model with one property containing a reference\n */\nexport type ModelWithReference = {\n    prop?: ModelWithProperties;\n};\n\n/**\n * This is a model with one property containing an array\n */\nexport type ModelWithArrayReadOnlyAndWriteOnly = {\n    prop?: Array<ModelWithReadOnlyAndWriteOnly>;\n    propWithFile?: Array<Blob | File>;\n    propWithNumber?: Array<number>;\n};\n\n/**\n * This is a model with one property containing an array\n */\nexport type ModelWithArray = {\n    prop?: Array<ModelWithString>;\n    propWithFile?: Array<Blob | File>;\n    propWithNumber?: Array<number>;\n};\n\n/**\n * This is a model with one property containing a dictionary\n */\nexport type ModelWithDictionary = {\n    prop?: {\n        [key: string]: string;\n    };\n};\n\n/**\n * This is a deprecated model with a deprecated property\n *\n * @deprecated\n */\nexport type DeprecatedModel = {\n    /**\n     * This is a deprecated property\n     *\n     * @deprecated\n     */\n    prop?: string;\n};\n\n/**\n * This is a model with one property containing a circular reference\n */\nexport type ModelWithCircularReference = {\n    prop?: ModelWithCircularReference;\n};\n\n/**\n * This is a model with one property with a 'one of' relationship\n */\nexport type CompositionWithOneOf = {\n    propA?: ModelWithString | ModelWithEnum | ModelWithArray | ModelWithDictionary;\n};\n\n/**\n * This is a model with one property with a 'one of' relationship where the options are not $ref\n */\nexport type CompositionWithOneOfAnonymous = {\n    propA?: {\n        propA?: string;\n    } | string | number;\n};\n\n/**\n * Circle\n */\nexport type ModelCircle = {\n    kind: string;\n    radius?: number;\n};\n\n/**\n * Square\n */\nexport type ModelSquare = {\n    kind: string;\n    sideLength?: number;\n};\n\n/**\n * This is a model with one property with a 'one of' relationship where the options are not $ref\n */\nexport type CompositionWithOneOfDiscriminator = ({\n    kind: 'circle';\n} & ModelCircle) | ({\n    kind: 'square';\n} & ModelSquare);\n\n/**\n * This is a model with one property with a 'any of' relationship\n */\nexport type CompositionWithAnyOf = {\n    propA?: ModelWithString | ModelWithEnum | ModelWithArray | ModelWithDictionary;\n};\n\n/**\n * This is a model with one property with a 'any of' relationship where the options are not $ref\n */\nexport type CompositionWithAnyOfAnonymous = {\n    propA?: {\n        propA?: string;\n    } | string | number;\n};\n\n/**\n * This is a model with nested 'any of' property with a type null\n */\nexport type CompositionWithNestedAnyAndTypeNull = {\n    propA?: Array<ModelWithDictionary | null> | Array<ModelWithArray | null>;\n};\n\nexport type _3eNum1Период = 'Bird' | 'Dog';\n\nexport type ConstValue = 'ConstValue';\n\n/**\n * This is a model with one property with a 'any of' relationship where the options are not $ref\n */\nexport type CompositionWithNestedAnyOfAndNull = {\n    /**\n     * Scopes\n     */\n    propA?: Array<_3eNum1Период | ConstValue> | null;\n};\n\n/**\n * This is a model with one property with a 'one of' relationship\n */\nexport type CompositionWithOneOfAndNullable = {\n    propA?: {\n        boolean?: boolean;\n    } | ModelWithEnum | ModelWithArray | ModelWithDictionary | null;\n};\n\n/**\n * This is a model that contains a simple dictionary within composition\n */\nexport type CompositionWithOneOfAndSimpleDictionary = {\n    propA?: boolean | {\n        [key: string]: number;\n    };\n};\n\n/**\n * This is a model that contains a dictionary of simple arrays within composition\n */\nexport type CompositionWithOneOfAndSimpleArrayDictionary = {\n    propA?: boolean | {\n        [key: string]: Array<boolean>;\n    };\n};\n\n/**\n * This is a model that contains a dictionary of complex arrays (composited) within composition\n */\nexport type CompositionWithOneOfAndComplexArrayDictionary = {\n    propA?: boolean | {\n        [key: string]: Array<number | string>;\n    };\n};\n\n/**\n * This is a model with one property with a 'all of' relationship\n */\nexport type CompositionWithAllOfAndNullable = {\n    propA?: ({\n        boolean?: boolean;\n    } & ModelWithEnum & ModelWithArray & ModelWithDictionary) | null;\n};\n\n/**\n * This is a model with one property with a 'any of' relationship\n */\nexport type CompositionWithAnyOfAndNullable = {\n    propA?: {\n        boolean?: boolean;\n    } | ModelWithEnum | ModelWithArray | ModelWithDictionary | null;\n};\n\n/**\n * This is a base model with two simple optional properties\n */\nexport type CompositionBaseModel = {\n    firstName?: string;\n    lastname?: string;\n};\n\n/**\n * This is a model that extends the base model\n */\nexport type CompositionExtendedModel = CompositionBaseModel & {\n    age: number;\n    firstName: string;\n    lastname: string;\n};\n\n/**\n * This is a model with one nested property\n */\nexport type ModelWithProperties = {\n    required: string;\n    readonly requiredAndReadOnly: string;\n    requiredAndNullable: string | null;\n    string?: string;\n    number?: number;\n    boolean?: boolean;\n    reference?: ModelWithString;\n    'property with space'?: string;\n    default?: string;\n    try?: string;\n    readonly '@namespace.string'?: string;\n    readonly '@namespace.integer'?: number;\n};\n\n/**\n * This is a model with one nested property\n */\nexport type ModelWithNestedProperties = {\n    readonly first: {\n        readonly second: {\n            readonly third: string | null;\n        } | null;\n    } | null;\n};\n\n/**\n * This is a model with duplicated properties\n */\nexport type ModelWithDuplicateProperties = {\n    prop?: ModelWithString;\n};\n\n/**\n * This is a model with ordered properties\n */\nexport type ModelWithOrderedProperties = {\n    zebra?: string;\n    apple?: string;\n    hawaii?: string;\n};\n\n/**\n * This is a model with duplicated imports\n */\nexport type ModelWithDuplicateImports = {\n    propA?: ModelWithString;\n    propB?: ModelWithString;\n    propC?: ModelWithString;\n};\n\n/**\n * This is a model that extends another model\n */\nexport type ModelThatExtends = ModelWithString & {\n    propExtendsA?: string;\n    propExtendsB?: ModelWithString;\n};\n\n/**\n * This is a model that extends another model\n */\nexport type ModelThatExtendsExtends = ModelWithString & ModelThatExtends & {\n    propExtendsC?: string;\n    propExtendsD?: ModelWithString;\n};\n\n/**\n * This is a model that contains a some patterns\n */\nexport type ModelWithPattern = {\n    key: string;\n    name: string;\n    readonly enabled?: boolean;\n    readonly modified?: string;\n    id?: string;\n    text?: string;\n    patternWithSingleQuotes?: string;\n    patternWithNewline?: string;\n    patternWithBacktick?: string;\n    patternWithUnicode?: string;\n};\n\nexport type File = {\n    /**\n     * Id\n     */\n    readonly id?: string;\n    /**\n     * Updated at\n     */\n    readonly updated_at?: string;\n    /**\n     * Created at\n     */\n    readonly created_at?: string;\n    /**\n     * Mime\n     */\n    mime: string;\n    /**\n     * File\n     */\n    readonly file?: string;\n};\n\nexport type Default = {\n    name?: string;\n};\n\nexport type Pageable = {\n    page?: number;\n    size?: number;\n    sort?: Array<string>;\n};\n\n/**\n * This is a free-form object without additionalProperties.\n */\nexport type FreeFormObjectWithoutAdditionalProperties = {\n    [key: string]: unknown;\n};\n\n/**\n * This is a free-form object with additionalProperties: true.\n */\nexport type FreeFormObjectWithAdditionalPropertiesEqTrue = {\n    [key: string]: unknown;\n};\n\n/**\n * This is a free-form object with additionalProperties: {}.\n */\nexport type FreeFormObjectWithAdditionalPropertiesEqEmptyObject = {\n    [key: string]: unknown;\n};\n\nexport type ModelWithConst = {\n    String?: 'String';\n    number?: 0;\n    null?: null;\n    withType?: 'Some string';\n};\n\n/**\n * This is a model with one property and additionalProperties: true\n */\nexport type ModelWithAdditionalPropertiesEqTrue = {\n    /**\n     * This is a simple string property\n     */\n    prop?: string;\n    [key: string]: unknown;\n};\n\nexport type NestedAnyOfArraysNullable = {\n    nullableArray?: Array<string | boolean> | null;\n};\n\nexport type CompositionWithOneOfAndProperties = ({\n    foo: SimpleParameter;\n} | {\n    bar: NonAsciiStringæøåÆøÅöôêÊ字符串;\n}) & {\n    baz: number | null;\n    qux: number;\n};\n\n/**\n * An object that can be null\n */\nexport type NullableObject = {\n    foo?: string;\n} | null;\n\n/**\n * Some % character\n */\nexport type CharactersInDescription = string;\n\nexport type ModelWithNullableObject = {\n    data?: NullableObject;\n};\n\n/**\n * An object with additional properties that can be null (anyOf ref + null)\n */\nexport type ModelWithAdditionalPropertiesRef = {\n    [key: string]: NullableObject | null;\n};\n\nexport type ModelWithOneOfEnum = {\n    foo: 'Bar';\n} | {\n    foo: 'Baz';\n} | {\n    foo: 'Qux';\n} | {\n    content: string;\n    foo: 'Quux';\n} | {\n    content: [\n        string,\n        string\n    ];\n    foo: 'Corge';\n};\n\nexport type ModelWithNestedArrayEnumsDataFoo = 'foo' | 'bar';\n\nexport type ModelWithNestedArrayEnumsDataBar = 'baz' | 'qux';\n\nexport type ModelWithNestedArrayEnumsData = {\n    foo?: Array<ModelWithNestedArrayEnumsDataFoo>;\n    bar?: Array<ModelWithNestedArrayEnumsDataBar>;\n};\n\nexport type ModelWithNestedArrayEnums = {\n    array_strings?: Array<string>;\n    data?: ModelWithNestedArrayEnumsData;\n};\n\nexport type ModelWithNestedCompositionEnums = {\n    foo?: ModelWithNestedArrayEnumsDataFoo;\n};\n\nexport type ModelWithReadOnlyAndWriteOnly = {\n    foo: string;\n    readonly bar: string;\n};\n\nexport type ModelWithConstantSizeArray = [\n    number,\n    number\n];\n\nexport type ModelWithAnyOfConstantSizeArray = [\n    number | string,\n    number | string,\n    number | string\n];\n\nexport type ModelWithPrefixItemsConstantSizeArray = [\n    ModelWithInteger,\n    number | string,\n    string\n];\n\nexport type ModelWithAnyOfConstantSizeArrayNullable = [\n    number | null | string,\n    number | null | string,\n    number | null | string\n];\n\nexport type ModelWithAnyOfConstantSizeArrayWithNSizeAndOptions = [\n    number | Import,\n    number | Import\n];\n\nexport type ModelWithAnyOfConstantSizeArrayAndIntersect = [\n    number & string,\n    number & string\n];\n\nexport type ModelWithNumericEnumUnion = {\n    /**\n     * Период\n     */\n    value?: -10 | -1 | 0 | 1 | 3 | 6 | 12;\n};\n\n/**\n * Some description with `back ticks`\n */\nexport type ModelWithBackticksInDescription = {\n    /**\n     * The template `that` should be used for parsing and importing the contents of the CSV file.\n     *\n     * <br/><p>There is one placeholder currently supported:<ul>     <li><b>${x}</b> - refers to the n-th column in the CSV file, e.g. ${1}, ${2}, ...)</li></ul><p>Example of a correct JSON template:</p>\n     * <pre>\n     * [\n     * {\n     * \"resourceType\": \"Asset\",\n     * \"identifier\": {\n     * \"name\": \"${1}\",\n     * \"domain\": {\n     * \"name\": \"${2}\",\n     * \"community\": {\n     * \"name\": \"Some Community\"\n     * }\n     * }\n     * },\n     * \"attributes\" : {\n     * \"00000000-0000-0000-0000-000000003115\" : [ {\n     * \"value\" : \"${3}\"\n     * } ],\n     * \"00000000-0000-0000-0000-000000000222\" : [ {\n     * \"value\" : \"${4}\"\n     * } ]\n     * }\n     * }\n     * ]\n     * </pre>\n     */\n    template?: string;\n};\n\nexport type ModelWithOneOfAndProperties = (SimpleParameter | NonAsciiStringæøåÆøÅöôêÊ字符串) & {\n    baz: number | null;\n    qux: number;\n};\n\n/**\n * Model used to test deduplication strategy (unused)\n */\nexport type ParameterSimpleParameterUnused = string;\n\n/**\n * Model used to test deduplication strategy\n */\nexport type PostServiceWithEmptyTagResponse = string;\n\n/**\n * Model used to test deduplication strategy\n */\nexport type PostServiceWithEmptyTagResponse2 = string;\n\n/**\n * Model used to test deduplication strategy\n */\nexport type DeleteFooData = string;\n\n/**\n * Model used to test deduplication strategy\n */\nexport type DeleteFooData2 = string;\n\n/**\n * Model with restricted keyword name\n */\nexport type Import = string;\n\nexport type SchemaWithFormRestrictedKeys = {\n    description?: string;\n    'x-enum-descriptions'?: string;\n    'x-enum-varnames'?: string;\n    'x-enumNames'?: string;\n    title?: string;\n    object?: {\n        description?: string;\n        'x-enum-descriptions'?: string;\n        'x-enum-varnames'?: string;\n        'x-enumNames'?: string;\n        title?: string;\n    };\n    array?: Array<{\n        description?: string;\n        'x-enum-descriptions'?: string;\n        'x-enum-varnames'?: string;\n        'x-enumNames'?: string;\n        title?: string;\n    }>;\n};\n\n/**\n * This schema was giving PascalCase transformations a hard time\n */\nexport type IoK8sApimachineryPkgApisMetaV1DeleteOptions = {\n    /**\n     * Must be fulfilled before a deletion is carried out. If not possible, a 409 Conflict status will be returned.\n     */\n    preconditions?: IoK8sApimachineryPkgApisMetaV1Preconditions;\n};\n\n/**\n * This schema was giving PascalCase transformations a hard time\n */\nexport type IoK8sApimachineryPkgApisMetaV1Preconditions = {\n    /**\n     * Specifies the target ResourceVersion\n     */\n    resourceVersion?: string;\n    /**\n     * Specifies the target UID.\n     */\n    uid?: string;\n};\n\nexport type AdditionalPropertiesUnknownIssue = {\n    [key: string]: string | number;\n};\n\nexport type AdditionalPropertiesUnknownIssue2 = {\n    [key: string]: string | number;\n};\n\nexport type AdditionalPropertiesUnknownIssue3 = string & {\n    entries: {\n        [key: string]: AdditionalPropertiesUnknownIssue;\n    };\n};\n\nexport type AdditionalPropertiesIntegerIssue = {\n    value: number;\n    [key: string]: number;\n};\n\nexport type OneOfAllOfIssue = ((ConstValue | GenericSchemaDuplicateIssue1SystemBoolean) & _3eNum1Период) | GenericSchemaDuplicateIssue1SystemString;\n\nexport type GenericSchemaDuplicateIssue1SystemBoolean = {\n    item?: boolean;\n    error?: string | null;\n    readonly hasError?: boolean;\n    data?: {\n        [key: string]: never;\n    };\n};\n\nexport type GenericSchemaDuplicateIssue1SystemString = {\n    item?: string | null;\n    error?: string | null;\n    readonly hasError?: boolean;\n};\n\nexport type ExternalSharedModel = {\n    id: string;\n    name?: string;\n};\n\n/**\n * This is a model with one property containing a reference\n */\nexport type ModelWithReferenceWritable = {\n    prop?: ModelWithPropertiesWritable;\n};\n\n/**\n * This is a model with one property containing an array\n */\nexport type ModelWithArrayReadOnlyAndWriteOnlyWritable = {\n    prop?: Array<ModelWithReadOnlyAndWriteOnlyWritable>;\n    propWithFile?: Array<Blob | File>;\n    propWithNumber?: Array<number>;\n};\n\n/**\n * This is a model with one nested property\n */\nexport type ModelWithPropertiesWritable = {\n    required: string;\n    requiredAndNullable: string | null;\n    string?: string;\n    number?: number;\n    boolean?: boolean;\n    reference?: ModelWithString;\n    'property with space'?: string;\n    default?: string;\n    try?: string;\n};\n\n/**\n * This is a model that contains a some patterns\n */\nexport type ModelWithPatternWritable = {\n    key: string;\n    name: string;\n    id?: string;\n    text?: string;\n    patternWithSingleQuotes?: string;\n    patternWithNewline?: string;\n    patternWithBacktick?: string;\n    patternWithUnicode?: string;\n};\n\nexport type FileWritable = {\n    /**\n     * Mime\n     */\n    mime: string;\n};\n\nexport type ModelWithReadOnlyAndWriteOnlyWritable = {\n    foo: string;\n    baz: string;\n};\n\nexport type ModelWithAnyOfConstantSizeArrayWithNSizeAndOptionsWritable = [\n    number | Import,\n    number | Import\n];\n\nexport type AdditionalPropertiesUnknownIssueWritable = {\n    [key: string]: string | number;\n};\n\nexport type OneOfAllOfIssueWritable = ((ConstValue | GenericSchemaDuplicateIssue1SystemBoolean) & _3eNum1Период) | GenericSchemaDuplicateIssue1SystemString;\n\nexport type GenericSchemaDuplicateIssue1SystemBooleanWritable = {\n    item?: boolean;\n    error?: string | null;\n    data?: {\n        [key: string]: never;\n    };\n};\n\nexport type GenericSchemaDuplicateIssue1SystemStringWritable = {\n    item?: string | null;\n    error?: string | null;\n};\n\n/**\n * This is a reusable parameter\n */\nexport type SimpleParameter = string;\n\n/**\n * Parameter with illegal characters\n */\nexport type XFooBar = ModelWithString;\n\n/**\n * A reusable request body\n */\nexport type SimpleRequestBody = ModelWithString;\n\n/**\n * A reusable request body\n */\nexport type SimpleFormData = ModelWithString;\n\nexport type ExportData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no+tag';\n};\n\nexport type PatchApiVbyApiVersionNoTagData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no+tag';\n};\n\nexport type PatchApiVbyApiVersionNoTagResponses = {\n    /**\n     * OK\n     */\n    default: unknown;\n};\n\nexport type ImportData = {\n    body: ModelWithReadOnlyAndWriteOnlyWritable | ModelWithArrayReadOnlyAndWriteOnlyWritable;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no+tag';\n};\n\nexport type ImportResponses = {\n    /**\n     * Success\n     */\n    200: ModelFromZendesk;\n    /**\n     * Default success response\n     */\n    default: ModelWithReadOnlyAndWriteOnly;\n};\n\nexport type ImportResponse = ImportResponses[keyof ImportResponses];\n\nexport type FooWowData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no+tag';\n};\n\nexport type FooWowResponses = {\n    /**\n     * OK\n     */\n    default: unknown;\n};\n\nexport type ApiVVersionODataControllerCountData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple/$count';\n};\n\nexport type ApiVVersionODataControllerCountResponses = {\n    /**\n     * Success\n     */\n    200: ModelFromZendesk;\n};\n\nexport type ApiVVersionODataControllerCountResponse = ApiVVersionODataControllerCountResponses[keyof ApiVVersionODataControllerCountResponses];\n\nexport type GetApiVbyApiVersionSimpleOperationData = {\n    body?: never;\n    path: {\n        /**\n         * foo in method\n         */\n        foo_param: string;\n    };\n    query?: never;\n    url: '/api/v{api-version}/simple:operation';\n};\n\nexport type GetApiVbyApiVersionSimpleOperationErrors = {\n    /**\n     * Default error response\n     */\n    default: ModelWithBoolean;\n};\n\nexport type GetApiVbyApiVersionSimpleOperationError = GetApiVbyApiVersionSimpleOperationErrors[keyof GetApiVbyApiVersionSimpleOperationErrors];\n\nexport type GetApiVbyApiVersionSimpleOperationResponses = {\n    /**\n     * Response is a simple number\n     */\n    200: number;\n};\n\nexport type GetApiVbyApiVersionSimpleOperationResponse = GetApiVbyApiVersionSimpleOperationResponses[keyof GetApiVbyApiVersionSimpleOperationResponses];\n\nexport type DeleteCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type GetCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type HeadCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type OptionsCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type PatchCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type PostCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type PutCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type DeleteFooData3 = {\n    body?: never;\n    headers: {\n        /**\n         * Parameter with illegal characters\n         */\n        'x-Foo-Bar': ModelWithString;\n    };\n    path: {\n        /**\n         * foo in method\n         */\n        foo_param: string;\n        /**\n         * bar in method\n         */\n        BarParam: string;\n    };\n    query?: never;\n    url: '/api/v{api-version}/foo/{foo_param}/bar/{BarParam}';\n};\n\nexport type CallWithDescriptionsData = {\n    body?: never;\n    path?: never;\n    query?: {\n        /**\n         * Testing multiline comments in string: First line\n         * Second line\n         *\n         * Fourth line\n         */\n        parameterWithBreaks?: string;\n        /**\n         * Testing backticks in string: `backticks` and ```multiple backticks``` should work\n         */\n        parameterWithBackticks?: string;\n        /**\n         * Testing slashes in string: \\backwards\\\\\\ and /forwards/// should work\n         */\n        parameterWithSlashes?: string;\n        /**\n         * Testing expression placeholders in string: ${expression} should work\n         */\n        parameterWithExpressionPlaceholders?: string;\n        /**\n         * Testing quotes in string: 'single quote''' and \"double quotes\"\"\" should work\n         */\n        parameterWithQuotes?: string;\n        /**\n         * Testing reserved characters in string: * inline * and ** inline ** should work\n         */\n        parameterWithReservedCharacters?: string;\n    };\n    url: '/api/v{api-version}/descriptions';\n};\n\nexport type DeprecatedCallData = {\n    body?: never;\n    headers: {\n        /**\n         * This parameter is deprecated\n         *\n         * @deprecated\n         */\n        parameter: DeprecatedModel | null;\n    };\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/parameters/deprecated';\n};\n\nexport type CallWithParametersData = {\n    /**\n     * This is the parameter that goes into the body\n     */\n    body: {\n        [key: string]: unknown;\n    } | null;\n    headers: {\n        /**\n         * This is the parameter that goes into the header\n         */\n        parameterHeader: string | null;\n    };\n    path: {\n        /**\n         * This is the parameter that goes into the path\n         */\n        parameterPath: string | null;\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string | null;\n    };\n    query: {\n        foo_ref_enum?: ModelWithNestedArrayEnumsDataFoo;\n        foo_all_of_enum: ModelWithNestedArrayEnumsDataFoo;\n        /**\n         * This is the parameter that goes into the query params\n         */\n        cursor: string | null;\n    };\n    url: '/api/v{api-version}/parameters/{parameterPath}';\n};\n\nexport type CallWithWeirdParameterNamesData = {\n    /**\n     * This is the parameter that goes into the body\n     */\n    body: ModelWithString | null;\n    headers: {\n        /**\n         * This is the parameter that goes into the request header\n         */\n        'parameter.header': string | null;\n    };\n    path: {\n        /**\n         * This is the parameter that goes into the path\n         */\n        'parameter.path.1'?: string;\n        /**\n         * This is the parameter that goes into the path\n         */\n        'parameter-path-2'?: string;\n        /**\n         * This is the parameter that goes into the path\n         */\n        'PARAMETER-PATH-3'?: string;\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string | null;\n    };\n    query: {\n        /**\n         * This is the parameter with a reserved keyword\n         */\n        default?: string;\n        /**\n         * This is the parameter that goes into the request query params\n         */\n        'parameter-query': string | null;\n    };\n    url: '/api/v{api-version}/parameters/{parameter.path.1}/{parameter-path-2}/{PARAMETER-PATH-3}';\n};\n\nexport type GetCallWithOptionalParamData = {\n    /**\n     * This is a required parameter\n     */\n    body: ModelWithOneOfEnum;\n    path?: never;\n    query?: {\n        /**\n         * This is an optional parameter\n         */\n        page?: number;\n    };\n    url: '/api/v{api-version}/parameters';\n};\n\nexport type PostCallWithOptionalParamData = {\n    /**\n     * This is an optional parameter\n     */\n    body?: {\n        offset?: number | null;\n    };\n    path?: never;\n    query: {\n        /**\n         * This is a required parameter\n         */\n        parameter: Pageable;\n    };\n    url: '/api/v{api-version}/parameters';\n};\n\nexport type PostCallWithOptionalParamResponses = {\n    /**\n     * Response is a simple number\n     */\n    200: number;\n    /**\n     * Success\n     */\n    204: void;\n};\n\nexport type PostCallWithOptionalParamResponse = PostCallWithOptionalParamResponses[keyof PostCallWithOptionalParamResponses];\n\nexport type PostApiVbyApiVersionRequestBodyData = {\n    /**\n     * A reusable request body\n     */\n    body?: SimpleRequestBody;\n    path?: never;\n    query?: {\n        /**\n         * This is a reusable parameter\n         */\n        parameter?: string;\n    };\n    url: '/api/v{api-version}/requestBody';\n};\n\nexport type PostApiVbyApiVersionFormDataData = {\n    /**\n     * A reusable request body\n     */\n    body?: SimpleFormData;\n    path?: never;\n    query?: {\n        /**\n         * This is a reusable parameter\n         */\n        parameter?: string;\n    };\n    url: '/api/v{api-version}/formData';\n};\n\nexport type CallWithDefaultParametersData = {\n    body?: never;\n    path?: never;\n    query?: {\n        /**\n         * This is a simple string with default value\n         */\n        parameterString?: string | null;\n        /**\n         * This is a simple number with default value\n         */\n        parameterNumber?: number | null;\n        /**\n         * This is a simple boolean with default value\n         */\n        parameterBoolean?: boolean | null;\n        /**\n         * This is a simple enum with default value\n         */\n        parameterEnum?: 'Success' | 'Warning' | 'Error';\n        /**\n         * This is a simple model with default value\n         */\n        parameterModel?: ModelWithString | null;\n    };\n    url: '/api/v{api-version}/defaults';\n};\n\nexport type CallWithDefaultOptionalParametersData = {\n    body?: never;\n    path?: never;\n    query?: {\n        /**\n         * This is a simple string that is optional with default value\n         */\n        parameterString?: string;\n        /**\n         * This is a simple number that is optional with default value\n         */\n        parameterNumber?: number;\n        /**\n         * This is a simple boolean that is optional with default value\n         */\n        parameterBoolean?: boolean;\n        /**\n         * This is a simple enum that is optional with default value\n         */\n        parameterEnum?: 'Success' | 'Warning' | 'Error';\n        /**\n         * This is a simple model that is optional with default value\n         */\n        parameterModel?: ModelWithString;\n    };\n    url: '/api/v{api-version}/defaults';\n};\n\nexport type CallToTestOrderOfParamsData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * This is a optional string with default\n         */\n        parameterOptionalStringWithDefault?: string;\n        /**\n         * This is a optional string with empty default\n         */\n        parameterOptionalStringWithEmptyDefault?: string;\n        /**\n         * This is a optional string with no default\n         */\n        parameterOptionalStringWithNoDefault?: string;\n        /**\n         * This is a string with default\n         */\n        parameterStringWithDefault: string;\n        /**\n         * This is a string with empty default\n         */\n        parameterStringWithEmptyDefault: string;\n        /**\n         * This is a string with no default\n         */\n        parameterStringWithNoDefault: string;\n        /**\n         * This is a string that can be null with no default\n         */\n        parameterStringNullableWithNoDefault?: string | null;\n        /**\n         * This is a string that can be null with default\n         */\n        parameterStringNullableWithDefault?: string | null;\n    };\n    url: '/api/v{api-version}/defaults';\n};\n\nexport type DuplicateNameData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/duplicate';\n};\n\nexport type DuplicateName2Data = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/duplicate';\n};\n\nexport type DuplicateName3Data = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/duplicate';\n};\n\nexport type DuplicateName4Data = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/duplicate';\n};\n\nexport type CallWithNoContentResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no-content';\n};\n\nexport type CallWithNoContentResponseResponses = {\n    /**\n     * Success\n     */\n    204: void;\n};\n\nexport type CallWithNoContentResponseResponse = CallWithNoContentResponseResponses[keyof CallWithNoContentResponseResponses];\n\nexport type CallWithResponseAndNoContentResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multiple-tags/response-and-no-content';\n};\n\nexport type CallWithResponseAndNoContentResponseResponses = {\n    /**\n     * Response is a simple number\n     */\n    200: number;\n    /**\n     * Success\n     */\n    204: void;\n};\n\nexport type CallWithResponseAndNoContentResponseResponse = CallWithResponseAndNoContentResponseResponses[keyof CallWithResponseAndNoContentResponseResponses];\n\nexport type DummyAData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multiple-tags/a';\n};\n\nexport type DummyAResponses = {\n    200: _400;\n};\n\nexport type DummyAResponse = DummyAResponses[keyof DummyAResponses];\n\nexport type DummyBData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multiple-tags/b';\n};\n\nexport type DummyBResponses = {\n    /**\n     * Success\n     */\n    204: void;\n};\n\nexport type DummyBResponse = DummyBResponses[keyof DummyBResponses];\n\nexport type CallWithResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/response';\n};\n\nexport type CallWithResponseResponses = {\n    default: Import;\n};\n\nexport type CallWithResponseResponse = CallWithResponseResponses[keyof CallWithResponseResponses];\n\nexport type CallWithDuplicateResponsesData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/response';\n};\n\nexport type CallWithDuplicateResponsesErrors = {\n    /**\n     * Message for 500 error\n     */\n    500: ModelWithStringError;\n    /**\n     * Message for 501 error\n     */\n    501: ModelWithStringError;\n    /**\n     * Message for 502 error\n     */\n    502: ModelWithStringError;\n    /**\n     * Message for 4XX errors\n     */\n    '4XX': DictionaryWithArray;\n    /**\n     * Default error response\n     */\n    default: ModelWithBoolean;\n};\n\nexport type CallWithDuplicateResponsesError = CallWithDuplicateResponsesErrors[keyof CallWithDuplicateResponsesErrors];\n\nexport type CallWithDuplicateResponsesResponses = {\n    /**\n     * Message for 200 response\n     */\n    200: ModelWithBoolean & ModelWithInteger;\n    /**\n     * Message for 201 response\n     */\n    201: ModelWithString;\n    /**\n     * Message for 202 response\n     */\n    202: ModelWithString;\n};\n\nexport type CallWithDuplicateResponsesResponse = CallWithDuplicateResponsesResponses[keyof CallWithDuplicateResponsesResponses];\n\nexport type CallWithResponsesData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/response';\n};\n\nexport type CallWithResponsesErrors = {\n    /**\n     * Message for 500 error\n     */\n    500: ModelWithStringError;\n    /**\n     * Message for 501 error\n     */\n    501: ModelWithStringError;\n    /**\n     * Message for 502 error\n     */\n    502: ModelWithStringError;\n    /**\n     * Message for default response\n     */\n    default: ModelWithStringError;\n};\n\nexport type CallWithResponsesError = CallWithResponsesErrors[keyof CallWithResponsesErrors];\n\nexport type CallWithResponsesResponses = {\n    /**\n     * Message for 200 response\n     */\n    200: {\n        readonly '@namespace.string'?: string;\n        readonly '@namespace.integer'?: number;\n        readonly value?: Array<ModelWithString>;\n    };\n    /**\n     * Message for 201 response\n     */\n    201: ModelThatExtends;\n    /**\n     * Message for 202 response\n     */\n    202: ModelThatExtendsExtends;\n};\n\nexport type CallWithResponsesResponse = CallWithResponsesResponses[keyof CallWithResponsesResponses];\n\nexport type CollectionFormatData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * This is an array parameter that is sent as csv format (comma-separated values)\n         */\n        parameterArrayCSV: Array<string> | null;\n        /**\n         * This is an array parameter that is sent as ssv format (space-separated values)\n         */\n        parameterArraySSV: Array<string> | null;\n        /**\n         * This is an array parameter that is sent as tsv format (tab-separated values)\n         */\n        parameterArrayTSV: Array<string> | null;\n        /**\n         * This is an array parameter that is sent as pipes format (pipe-separated values)\n         */\n        parameterArrayPipes: Array<string> | null;\n        /**\n         * This is an array parameter that is sent as multi format (multiple parameter instances)\n         */\n        parameterArrayMulti: Array<string> | null;\n    };\n    url: '/api/v{api-version}/collectionFormat';\n};\n\nexport type TypesData = {\n    body?: never;\n    path?: {\n        /**\n         * This is a number parameter\n         */\n        id?: number;\n    };\n    query: {\n        /**\n         * This is a number parameter\n         */\n        parameterNumber: number;\n        /**\n         * This is a string parameter\n         */\n        parameterString: string | null;\n        /**\n         * This is a boolean parameter\n         */\n        parameterBoolean: boolean | null;\n        /**\n         * This is an object parameter\n         */\n        parameterObject: {\n            [key: string]: unknown;\n        } | null;\n        /**\n         * This is an array parameter\n         */\n        parameterArray: Array<string> | null;\n        /**\n         * This is a dictionary parameter\n         */\n        parameterDictionary: {\n            [key: string]: unknown;\n        } | null;\n        /**\n         * This is an enum parameter\n         */\n        parameterEnum: 'Success' | 'Warning' | 'Error' | null;\n    };\n    url: '/api/v{api-version}/types';\n};\n\nexport type TypesResponses = {\n    /**\n     * Response is a simple number\n     */\n    200: number;\n    /**\n     * Response is a simple string\n     */\n    201: string;\n    /**\n     * Response is a simple boolean\n     */\n    202: boolean;\n    /**\n     * Response is a simple object\n     */\n    203: {\n        [key: string]: unknown;\n    };\n};\n\nexport type TypesResponse = TypesResponses[keyof TypesResponses];\n\nexport type UploadFileData = {\n    body: Blob | File;\n    path: {\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string | null;\n    };\n    query?: never;\n    url: '/api/v{api-version}/upload';\n};\n\nexport type UploadFileResponses = {\n    200: boolean;\n};\n\nexport type UploadFileResponse = UploadFileResponses[keyof UploadFileResponses];\n\nexport type FileResponseData = {\n    body?: never;\n    path: {\n        id: string;\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string;\n    };\n    query?: never;\n    url: '/api/v{api-version}/file/{id}';\n};\n\nexport type FileResponseResponses = {\n    /**\n     * Success\n     */\n    200: Blob | File;\n};\n\nexport type FileResponseResponse = FileResponseResponses[keyof FileResponseResponses];\n\nexport type ComplexTypesData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * Parameter containing object\n         */\n        parameterObject: {\n            first?: {\n                second?: {\n                    third?: string;\n                };\n            };\n        };\n        /**\n         * Parameter containing reference\n         */\n        parameterReference: ModelWithString;\n    };\n    url: '/api/v{api-version}/complex';\n};\n\nexport type ComplexTypesErrors = {\n    /**\n     * 400 `server` error\n     */\n    400: unknown;\n    /**\n     * 500 server error\n     */\n    500: unknown;\n};\n\nexport type ComplexTypesResponses = {\n    /**\n     * Successful response\n     */\n    200: Array<ModelWithString>;\n};\n\nexport type ComplexTypesResponse = ComplexTypesResponses[keyof ComplexTypesResponses];\n\nexport type MultipartResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multipart';\n};\n\nexport type MultipartResponseResponses = {\n    /**\n     * OK\n     */\n    200: {\n        file?: Blob | File;\n        metadata?: {\n            foo?: string;\n            bar?: string;\n        };\n    };\n};\n\nexport type MultipartResponseResponse = MultipartResponseResponses[keyof MultipartResponseResponses];\n\nexport type MultipartRequestData = {\n    body?: {\n        content?: Blob | File;\n        data?: ModelWithString | null;\n    };\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multipart';\n};\n\nexport type ComplexParamsData = {\n    body?: {\n        readonly key: string | null;\n        name: string | null;\n        enabled?: boolean;\n        type: 'Monkey' | 'Horse' | 'Bird';\n        listOfModels?: Array<ModelWithString> | null;\n        listOfStrings?: Array<string> | null;\n        parameters: ModelWithString | ModelWithEnum | ModelWithArray | ModelWithDictionary;\n        readonly user?: {\n            readonly id?: number;\n            readonly name?: string | null;\n        };\n    };\n    path: {\n        id: number;\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string;\n    };\n    query?: never;\n    url: '/api/v{api-version}/complex/{id}';\n};\n\nexport type ComplexParamsResponses = {\n    /**\n     * Success\n     */\n    200: ModelWithString;\n};\n\nexport type ComplexParamsResponse = ComplexParamsResponses[keyof ComplexParamsResponses];\n\nexport type CallWithResultFromHeaderData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/header';\n};\n\nexport type CallWithResultFromHeaderErrors = {\n    /**\n     * 400 server error\n     */\n    400: unknown;\n    /**\n     * 500 server error\n     */\n    500: unknown;\n};\n\nexport type CallWithResultFromHeaderResponses = {\n    /**\n     * Successful response\n     */\n    200: unknown;\n};\n\nexport type TestErrorCodeData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * Status code to return\n         */\n        status: number;\n    };\n    url: '/api/v{api-version}/error';\n};\n\nexport type TestErrorCodeErrors = {\n    /**\n     * Custom message: Internal Server Error\n     */\n    500: unknown;\n    /**\n     * Custom message: Not Implemented\n     */\n    501: unknown;\n    /**\n     * Custom message: Bad Gateway\n     */\n    502: unknown;\n    /**\n     * Custom message: Service Unavailable\n     */\n    503: unknown;\n};\n\nexport type TestErrorCodeResponses = {\n    /**\n     * Custom message: Successful response\n     */\n    200: unknown;\n};\n\nexport type NonAsciiæøåÆøÅöôêÊ字符串Data = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * Dummy input param\n         */\n        nonAsciiParamæøåÆØÅöôêÊ: number;\n    };\n    url: '/api/v{api-version}/non-ascii-æøåÆØÅöôêÊ字符串';\n};\n\nexport type NonAsciiæøåÆøÅöôêÊ字符串Responses = {\n    /**\n     * Successful response\n     */\n    200: Array<NonAsciiStringæøåÆøÅöôêÊ字符串>;\n};\n\nexport type NonAsciiæøåÆøÅöôêÊ字符串Response = NonAsciiæøåÆøÅöôêÊ字符串Responses[keyof NonAsciiæøåÆøÅöôêÊ字符串Responses];\n\nexport type PutWithFormUrlEncodedData = {\n    body: ArrayWithStrings;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/non-ascii-æøåÆØÅöôêÊ字符串';\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/solid-query/asClass/@tanstack/solid-query.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport { type DefaultError, type MutationOptions, queryOptions } from '@tanstack/solid-query';\n\nimport { client } from '../client.gen';\nimport { BarBazService, BarService, FooBazService, FooService, type Options } from '../sdk.gen';\nimport type { FooBarPostData, FooBarPostResponse, FooBarPutData, FooBarPutResponse, FooPostData, FooPostResponse, FooPutData, FooPutResponse, GetFooBarData, GetFooBarResponse, GetFooData, GetFooResponse } from '../types.gen';\n\nexport type QueryKey<TOptions extends Options> = [\n    Pick<TOptions, 'baseUrl' | 'body' | 'headers' | 'path' | 'query'> & {\n        _id: string;\n        _infinite?: boolean;\n        tags?: ReadonlyArray<string>;\n    }\n];\n\nconst createQueryKey = <TOptions extends Options>(id: string, options?: TOptions, infinite?: boolean, tags?: ReadonlyArray<string>): [\n    QueryKey<TOptions>[0]\n] => {\n    const params: QueryKey<TOptions>[0] = { _id: id, baseUrl: options?.baseUrl || (options?.client ?? client).getConfig().baseUrl } as QueryKey<TOptions>[0];\n    if (infinite) {\n        params._infinite = infinite;\n    }\n    if (tags) {\n        params.tags = tags;\n    }\n    if (options?.body) {\n        params.body = options.body;\n    }\n    if (options?.headers) {\n        params.headers = options.headers;\n    }\n    if (options?.path) {\n        params.path = options.path;\n    }\n    if (options?.query) {\n        params.query = options.query;\n    }\n    return [params];\n};\n\nexport const getFooQueryKey = (options?: Options<GetFooData>) => createQueryKey('getFoo', options);\n\nexport const getFooOptions = (options?: Options<GetFooData>) => queryOptions<GetFooResponse, DefaultError, GetFooResponse, ReturnType<typeof getFooQueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await FooBazService.getFoo({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: getFooQueryKey(options)\n});\n\nexport const fooPostMutation = (options?: Partial<Options<FooPostData>>): MutationOptions<FooPostResponse, DefaultError, Options<FooPostData>> => {\n    const mutationOptions: MutationOptions<FooPostResponse, DefaultError, Options<FooPostData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await FooService.post({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const fooPutMutation = (options?: Partial<Options<FooPutData>>): MutationOptions<FooPutResponse, DefaultError, Options<FooPutData>> => {\n    const mutationOptions: MutationOptions<FooPutResponse, DefaultError, Options<FooPutData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await FooService.put({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const getFooBarQueryKey = (options?: Options<GetFooBarData>) => createQueryKey('getFooBar', options);\n\nexport const getFooBarOptions = (options?: Options<GetFooBarData>) => queryOptions<GetFooBarResponse, DefaultError, GetFooBarResponse, ReturnType<typeof getFooBarQueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await BarBazService.getFooBar({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: getFooBarQueryKey(options)\n});\n\nexport const fooBarPostMutation = (options?: Partial<Options<FooBarPostData>>): MutationOptions<FooBarPostResponse, DefaultError, Options<FooBarPostData>> => {\n    const mutationOptions: MutationOptions<FooBarPostResponse, DefaultError, Options<FooBarPostData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await BarService.post({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const fooBarPutMutation = (options?: Partial<Options<FooBarPutData>>): MutationOptions<FooBarPutResponse, DefaultError, Options<FooBarPutData>> => {\n    const mutationOptions: MutationOptions<FooBarPutResponse, DefaultError, Options<FooBarPutData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await BarService.put({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/solid-query/asClass/client/client.gen.ts",
    "content": "// 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 (options: RequestOptions) => {\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 url = buildUrl(opts);\n\n    return { opts, url };\n  };\n\n  const request: Client['request'] = async (options) => {\n    // @ts-expect-error\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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/solid-query/asClass/client/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type { Auth } from '../core/auth.gen';\nexport type { QuerySerializerOptions } from '../core/bodySerializer.gen';\nexport {\n  formDataBodySerializer,\n  jsonBodySerializer,\n  urlSearchParamsBodySerializer,\n} from '../core/bodySerializer.gen';\nexport { buildClientParams } from '../core/params.gen';\nexport { serializeQueryKeyValue } from '../core/queryKeySerializer.gen';\nexport { createClient } from './client.gen';\nexport type {\n  Client,\n  ClientOptions,\n  Config,\n  CreateClientConfig,\n  Options,\n  RequestOptions,\n  RequestResult,\n  ResolvedRequestOptions,\n  ResponseStyle,\n  TDataShape,\n} from './types.gen';\nexport { createConfig, mergeHeaders } from './utils.gen';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/solid-query/asClass/client/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { Auth } from '../core/auth.gen';\nimport type {\n  ServerSentEventsOptions,\n  ServerSentEventsResult,\n} from '../core/serverSentEvents.gen';\nimport type { Client as CoreClient, Config as CoreConfig } from '../core/types.gen';\nimport type { Middleware } from './utils.gen';\n\nexport type ResponseStyle = 'data' | 'fields';\n\nexport interface Config<T extends ClientOptions = ClientOptions>\n  extends Omit<RequestInit, 'body' | 'headers' | 'method'>, CoreConfig {\n  /**\n   * Base URL for all requests made by this client.\n   */\n  baseUrl?: T['baseUrl'];\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   * Please don't use the Fetch client for Next.js applications. The `next`\n   * options won't have any effect.\n   *\n   * Install {@link https://www.npmjs.com/package/@hey-api/client-next `@hey-api/client-next`} instead.\n   */\n  next?: never;\n  /**\n   * Return the response data parsed in a specified format. By default, `auto`\n   * will infer the appropriate method from the `Content-Type` response header.\n   * You can override this behavior with any of the {@link Body} methods.\n   * Select `stream` if you don't want to parse response data at all.\n   *\n   * @default 'auto'\n   */\n  parseAs?: 'arrayBuffer' | 'auto' | 'blob' | 'formData' | 'json' | 'stream' | 'text';\n  /**\n   * Should we return only data or multiple fields (data, error, response, etc.)?\n   *\n   * @default 'fields'\n   */\n  responseStyle?: ResponseStyle;\n  /**\n   * Throw an error instead of returning it in the response?\n   *\n   * @default false\n   */\n  throwOnError?: T['throwOnError'];\n}\n\nexport interface RequestOptions<\n  TData = unknown,\n  TResponseStyle extends ResponseStyle = 'fields',\n  ThrowOnError extends boolean = boolean,\n  Url extends string = string,\n>\n  extends\n    Config<{\n      responseStyle: TResponseStyle;\n      throwOnError: ThrowOnError;\n    }>,\n    Pick<\n      ServerSentEventsOptions<TData>,\n      | 'onRequest'\n      | 'onSseError'\n      | 'onSseEvent'\n      | 'sseDefaultRetryDelay'\n      | 'sseMaxRetryAttempts'\n      | 'sseMaxRetryDelay'\n    > {\n  /**\n   * Any body that you want to add to your request.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/fetch#body}\n   */\n  body?: unknown;\n  path?: Record<string, unknown>;\n  query?: Record<string, unknown>;\n  /**\n   * Security mechanism(s) to use for the request.\n   */\n  security?: ReadonlyArray<Auth>;\n  url: Url;\n}\n\nexport interface ResolvedRequestOptions<\n  TResponseStyle extends ResponseStyle = 'fields',\n  ThrowOnError extends boolean = boolean,\n  Url extends string = string,\n> extends RequestOptions<unknown, TResponseStyle, ThrowOnError, Url> {\n  serializedBody?: string;\n}\n\nexport type RequestResult<\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = boolean,\n  TResponseStyle extends ResponseStyle = 'fields',\n> = ThrowOnError extends true\n  ? Promise<\n      TResponseStyle extends 'data'\n        ? TData extends Record<string, unknown>\n          ? TData[keyof TData]\n          : TData\n        : {\n            data: TData extends Record<string, unknown> ? TData[keyof TData] : TData;\n            request: Request;\n            response: Response;\n          }\n    >\n  : Promise<\n      TResponseStyle extends 'data'\n        ? (TData extends Record<string, unknown> ? TData[keyof TData] : TData) | undefined\n        : (\n            | {\n                data: TData extends Record<string, unknown> ? TData[keyof TData] : TData;\n                error: undefined;\n              }\n            | {\n                data: undefined;\n                error: TError extends Record<string, unknown> ? TError[keyof TError] : TError;\n              }\n          ) & {\n            request: Request;\n            response: Response;\n          }\n    >;\n\nexport interface ClientOptions {\n  baseUrl?: string;\n  responseStyle?: ResponseStyle;\n  throwOnError?: boolean;\n}\n\ntype MethodFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'>,\n) => RequestResult<TData, TError, ThrowOnError, TResponseStyle>;\n\ntype SseFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'>,\n) => Promise<ServerSentEventsResult<TData, TError>>;\n\ntype RequestFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'> &\n    Pick<Required<RequestOptions<TData, TResponseStyle, ThrowOnError>>, 'method'>,\n) => RequestResult<TData, TError, ThrowOnError, TResponseStyle>;\n\ntype BuildUrlFn = <\n  TData extends {\n    body?: unknown;\n    path?: Record<string, unknown>;\n    query?: Record<string, unknown>;\n    url: string;\n  },\n>(\n  options: TData & Options<TData>,\n) => string;\n\nexport type Client = CoreClient<RequestFn, Config, MethodFn, BuildUrlFn, SseFn> & {\n  interceptors: Middleware<Request, Response, unknown, ResolvedRequestOptions>;\n};\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 = ClientOptions> = (\n  override?: Config<ClientOptions & T>,\n) => Config<Required<ClientOptions> & T>;\n\nexport interface TDataShape {\n  body?: unknown;\n  headers?: unknown;\n  path?: unknown;\n  query?: unknown;\n  url: string;\n}\n\ntype OmitKeys<T, K> = Pick<T, Exclude<keyof T, K>>;\n\nexport type Options<\n  TData extends TDataShape = TDataShape,\n  ThrowOnError extends boolean = boolean,\n  TResponse = unknown,\n  TResponseStyle extends ResponseStyle = 'fields',\n> = OmitKeys<\n  RequestOptions<TResponse, TResponseStyle, ThrowOnError>,\n  'body' | 'path' | 'query' | 'url'\n> &\n  ([TData] extends [never] ? unknown : Omit<TData, 'url'>);\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/solid-query/asClass/client/utils.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/solid-query/asClass/client.gen.ts",
    "content": "// 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>());\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/solid-query/asClass/core/auth.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/solid-query/asClass/core/bodySerializer.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/solid-query/asClass/core/params.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/solid-query/asClass/core/pathSerializer.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/solid-query/asClass/core/queryKeySerializer.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\n/**\n * JSON-friendly union that mirrors what Pinia Colada can hash.\n */\nexport type JsonValue =\n  | null\n  | string\n  | number\n  | boolean\n  | JsonValue[]\n  | { [key: string]: JsonValue };\n\n/**\n * Replacer that converts non-JSON values (bigint, Date, etc.) to safe substitutes.\n */\nexport const queryKeyJsonReplacer = (_key: string, value: unknown) => {\n  if (value === undefined || typeof value === 'function' || typeof value === 'symbol') {\n    return undefined;\n  }\n  if (typeof value === 'bigint') {\n    return value.toString();\n  }\n  if (value instanceof Date) {\n    return value.toISOString();\n  }\n  return value;\n};\n\n/**\n * Safely stringifies a value and parses it back into a JsonValue.\n */\nexport const stringifyToJsonValue = (input: unknown): JsonValue | undefined => {\n  try {\n    const json = JSON.stringify(input, queryKeyJsonReplacer);\n    if (json === undefined) {\n      return undefined;\n    }\n    return JSON.parse(json) as JsonValue;\n  } catch {\n    return undefined;\n  }\n};\n\n/**\n * Detects plain objects (including objects with a null prototype).\n */\nconst isPlainObject = (value: unknown): value is Record<string, unknown> => {\n  if (value === null || typeof value !== 'object') {\n    return false;\n  }\n  const prototype = Object.getPrototypeOf(value as object);\n  return prototype === Object.prototype || prototype === null;\n};\n\n/**\n * Turns URLSearchParams into a sorted JSON object for deterministic keys.\n */\nconst serializeSearchParams = (params: URLSearchParams): JsonValue => {\n  const entries = Array.from(params.entries()).sort(([a], [b]) => a.localeCompare(b));\n  const result: Record<string, JsonValue> = {};\n\n  for (const [key, value] of entries) {\n    const existing = result[key];\n    if (existing === undefined) {\n      result[key] = value;\n      continue;\n    }\n\n    if (Array.isArray(existing)) {\n      (existing as string[]).push(value);\n    } else {\n      result[key] = [existing, value];\n    }\n  }\n\n  return result;\n};\n\n/**\n * Normalizes any accepted value into a JSON-friendly shape for query keys.\n */\nexport const serializeQueryKeyValue = (value: unknown): JsonValue | undefined => {\n  if (value === null) {\n    return null;\n  }\n\n  if (typeof value === 'string' || typeof value === 'number' || typeof value === 'boolean') {\n    return value;\n  }\n\n  if (value === undefined || typeof value === 'function' || typeof value === 'symbol') {\n    return undefined;\n  }\n\n  if (typeof value === 'bigint') {\n    return value.toString();\n  }\n\n  if (value instanceof Date) {\n    return value.toISOString();\n  }\n\n  if (Array.isArray(value)) {\n    return stringifyToJsonValue(value);\n  }\n\n  if (typeof URLSearchParams !== 'undefined' && value instanceof URLSearchParams) {\n    return serializeSearchParams(value);\n  }\n\n  if (isPlainObject(value)) {\n    return stringifyToJsonValue(value);\n  }\n\n  return undefined;\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/solid-query/asClass/core/serverSentEvents.gen.ts",
    "content": "// 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 const 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            // Normalize line endings: CRLF -> LF, then CR -> LF\n            buffer = buffer.replace(/\\r\\n/g, '\\n').replace(/\\r/g, '\\n');\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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/solid-query/asClass/core/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { Auth, AuthToken } from './auth.gen';\nimport type { BodySerializer, QuerySerializer, QuerySerializerOptions } from './bodySerializer.gen';\n\nexport type HttpMethod =\n  | 'connect'\n  | 'delete'\n  | 'get'\n  | 'head'\n  | 'options'\n  | 'patch'\n  | 'post'\n  | 'put'\n  | 'trace';\n\nexport type Client<\n  RequestFn = never,\n  Config = unknown,\n  MethodFn = never,\n  BuildUrlFn = never,\n  SseFn = never,\n> = {\n  /**\n   * Returns the final request URL.\n   */\n  buildUrl: BuildUrlFn;\n  getConfig: () => Config;\n  request: RequestFn;\n  setConfig: (config: Config) => Config;\n} & {\n  [K in HttpMethod]: MethodFn;\n} & ([SseFn] extends [never] ? { sse?: never } : { sse: { [K in HttpMethod]: SseFn } });\n\nexport interface Config {\n  /**\n   * Auth token or a function returning auth token. The resolved value will be\n   * added to the request payload as defined by its `security` array.\n   */\n  auth?: ((auth: Auth) => Promise<AuthToken> | AuthToken) | AuthToken;\n  /**\n   * A function for serializing request body parameter. By default,\n   * {@link JSON.stringify()} will be used.\n   */\n  bodySerializer?: BodySerializer | null;\n  /**\n   * An object containing any HTTP headers that you want to pre-populate your\n   * `Headers` object with.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/Headers/Headers#init See more}\n   */\n  headers?:\n    | RequestInit['headers']\n    | Record<\n        string,\n        string | number | boolean | (string | number | boolean)[] | null | undefined | unknown\n      >;\n  /**\n   * The request method.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/fetch#method See more}\n   */\n  method?: Uppercase<HttpMethod>;\n  /**\n   * A function for serializing request query parameters. By default, arrays\n   * will be exploded in form style, objects will be exploded in deepObject\n   * style, and reserved characters are percent-encoded.\n   *\n   * This method will have no effect if the native `paramsSerializer()` Axios\n   * API function is used.\n   *\n   * {@link https://swagger.io/docs/specification/serialization/#query View examples}\n   */\n  querySerializer?: QuerySerializer | QuerySerializerOptions;\n  /**\n   * A function validating request data. This is useful if you want to ensure\n   * the request conforms to the desired shape, so it can be safely sent to\n   * the server.\n   */\n  requestValidator?: (data: unknown) => Promise<unknown>;\n  /**\n   * A function transforming response data before it's returned. This is useful\n   * for post-processing data, e.g. converting ISO strings into Date objects.\n   */\n  responseTransformer?: (data: unknown) => Promise<unknown>;\n  /**\n   * A function validating response data. This is useful if you want to ensure\n   * the response conforms to the desired shape, so it can be safely passed to\n   * the transformers and returned to the user.\n   */\n  responseValidator?: (data: unknown) => Promise<unknown>;\n}\n\ntype IsExactlyNeverOrNeverUndefined<T> = [T] extends [never]\n  ? true\n  : [T] extends [never | undefined]\n    ? [undefined] extends [T]\n      ? false\n      : true\n    : false;\n\nexport type OmitNever<T extends Record<string, unknown>> = {\n  [K in keyof T as IsExactlyNeverOrNeverUndefined<T[K]> extends true ? never : K]: T[K];\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/solid-query/asClass/core/utils.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/solid-query/asClass/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport { BarBazService, BarService, BarService2, FooBazService, FooService, FooService2, type Options } from './sdk.gen';\nexport type { ClientOptions, FooBarPostData, FooBarPostResponse, FooBarPostResponses, FooBarPutData, FooBarPutResponse, FooBarPutResponses, FooPostData, FooPostResponse, FooPostResponses, FooPutData, FooPutResponse, FooPutResponses, GetFooBarData, GetFooBarResponse, GetFooBarResponses, GetFooData, GetFooResponse, GetFooResponses } from './types.gen';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/solid-query/asClass/sdk.gen.ts",
    "content": "// 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 { FooBarPostData, FooBarPostResponses, FooBarPutData, FooBarPutResponses, FooPostData, FooPostResponses, FooPutData, FooPutResponses, GetFooBarData, GetFooBarResponses, GetFooData, GetFooResponses } from './types.gen';\n\nexport type Options<TData extends TDataShape = TDataShape, ThrowOnError extends boolean = boolean> = Options2<TData, ThrowOnError> & {\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\nexport class BarService {\n    public static post<ThrowOnError extends boolean = false>(options?: Options<FooBarPostData, ThrowOnError>) {\n        return (options?.client ?? client).post<FooBarPostResponses, unknown, ThrowOnError>({ url: '/foo/bar', ...options });\n    }\n    \n    public static put<ThrowOnError extends boolean = false>(options?: Options<FooBarPutData, ThrowOnError>) {\n        return (options?.client ?? client).put<FooBarPutResponses, unknown, ThrowOnError>({ url: '/foo/bar', ...options });\n    }\n}\n\nexport class FooService {\n    public static post<ThrowOnError extends boolean = false>(options?: Options<FooPostData, ThrowOnError>) {\n        return (options?.client ?? client).post<FooPostResponses, unknown, ThrowOnError>({ url: '/foo', ...options });\n    }\n    \n    public static put<ThrowOnError extends boolean = false>(options?: Options<FooPutData, ThrowOnError>) {\n        return (options?.client ?? client).put<FooPutResponses, unknown, ThrowOnError>({ url: '/foo', ...options });\n    }\n    \n    static barService = BarService;\n}\n\nexport class FooBazService {\n    public static getFoo<ThrowOnError extends boolean = false>(options?: Options<GetFooData, ThrowOnError>) {\n        return (options?.client ?? client).get<GetFooResponses, unknown, ThrowOnError>({ url: '/foo', ...options });\n    }\n    \n    static fooService = FooService;\n}\n\nexport class BarService2 {\n    public static post<ThrowOnError extends boolean = false>(options?: Options<FooBarPostData, ThrowOnError>) {\n        return (options?.client ?? client).post<FooBarPostResponses, unknown, ThrowOnError>({ url: '/foo/bar', ...options });\n    }\n    \n    public static put<ThrowOnError extends boolean = false>(options?: Options<FooBarPutData, ThrowOnError>) {\n        return (options?.client ?? client).put<FooBarPutResponses, unknown, ThrowOnError>({ url: '/foo/bar', ...options });\n    }\n}\n\nexport class FooService2 {\n    static barService = BarService2;\n}\n\nexport class BarBazService {\n    public static getFooBar<ThrowOnError extends boolean = false>(options?: Options<GetFooBarData, ThrowOnError>) {\n        return (options?.client ?? client).get<GetFooBarResponses, unknown, ThrowOnError>({ url: '/foo/bar', ...options });\n    }\n    \n    static fooService = FooService2;\n}\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/solid-query/asClass/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type ClientOptions = {\n    baseUrl: `${string}://${string}` | (string & {});\n};\n\nexport type GetFooData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/foo';\n};\n\nexport type GetFooResponses = {\n    /**\n     * OK\n     */\n    200: string;\n};\n\nexport type GetFooResponse = GetFooResponses[keyof GetFooResponses];\n\nexport type FooPostData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/foo';\n};\n\nexport type FooPostResponses = {\n    /**\n     * OK\n     */\n    200: string;\n};\n\nexport type FooPostResponse = FooPostResponses[keyof FooPostResponses];\n\nexport type FooPutData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/foo';\n};\n\nexport type FooPutResponses = {\n    /**\n     * OK\n     */\n    200: string;\n};\n\nexport type FooPutResponse = FooPutResponses[keyof FooPutResponses];\n\nexport type GetFooBarData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/foo/bar';\n};\n\nexport type GetFooBarResponses = {\n    /**\n     * OK\n     */\n    200: string;\n};\n\nexport type GetFooBarResponse = GetFooBarResponses[keyof GetFooBarResponses];\n\nexport type FooBarPostData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/foo/bar';\n};\n\nexport type FooBarPostResponses = {\n    /**\n     * OK\n     */\n    200: string;\n};\n\nexport type FooBarPostResponse = FooBarPostResponses[keyof FooBarPostResponses];\n\nexport type FooBarPutData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/foo/bar';\n};\n\nexport type FooBarPutResponses = {\n    /**\n     * OK\n     */\n    200: string;\n};\n\nexport type FooBarPutResponse = FooBarPutResponses[keyof FooBarPutResponses];\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/solid-query/axios/@tanstack/solid-query.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport { type DefaultError, type InfiniteData, infiniteQueryOptions, type MutationOptions, queryOptions } from '@tanstack/solid-query';\nimport type { AxiosError } from 'axios';\n\nimport { client } from '../client.gen';\nimport { apiVVersionODataControllerCount, callToTestOrderOfParams, callWithDefaultOptionalParameters, callWithDefaultParameters, callWithDescriptions, callWithDuplicateResponses, callWithNoContentResponse, callWithParameters, callWithResponse, callWithResponseAndNoContentResponse, callWithResponses, callWithResultFromHeader, callWithWeirdParameterNames, collectionFormat, complexParams, complexTypes, deleteCallWithoutParametersAndResponse, deleteFoo, deprecatedCall, dummyA, dummyB, duplicateName, duplicateName2, duplicateName3, duplicateName4, export_, fileResponse, fooWow, getApiVbyApiVersionSimpleOperation, getCallWithOptionalParam, getCallWithoutParametersAndResponse, import_, multipartRequest, multipartResponse, nonAsciiæøåÆøÅöôêÊ字符串, type Options, patchApiVbyApiVersionNoTag, patchCallWithoutParametersAndResponse, postApiVbyApiVersionFormData, postApiVbyApiVersionRequestBody, postCallWithOptionalParam, postCallWithoutParametersAndResponse, putCallWithoutParametersAndResponse, putWithFormUrlEncoded, testErrorCode, types, uploadFile } from '../sdk.gen';\nimport type { ApiVVersionODataControllerCountData, ApiVVersionODataControllerCountResponse, CallToTestOrderOfParamsData, CallWithDefaultOptionalParametersData, CallWithDefaultParametersData, CallWithDescriptionsData, CallWithDuplicateResponsesData, CallWithDuplicateResponsesError, CallWithDuplicateResponsesResponse, CallWithNoContentResponseData, CallWithNoContentResponseResponse, CallWithParametersData, CallWithResponseAndNoContentResponseData, CallWithResponseAndNoContentResponseResponse, CallWithResponseData, CallWithResponseResponse, CallWithResponsesData, CallWithResponsesError, CallWithResponsesResponse, CallWithResultFromHeaderData, CallWithWeirdParameterNamesData, CollectionFormatData, ComplexParamsData, ComplexParamsResponse, ComplexTypesData, ComplexTypesResponse, DeleteCallWithoutParametersAndResponseData, DeleteFooData3, DeprecatedCallData, DummyAData, DummyAResponse, DummyBData, DummyBResponse, DuplicateName2Data, DuplicateName3Data, DuplicateName4Data, DuplicateNameData, ExportData, FileResponseData, FileResponseResponse, FooWowData, GetApiVbyApiVersionSimpleOperationData, GetApiVbyApiVersionSimpleOperationError, GetApiVbyApiVersionSimpleOperationResponse, GetCallWithOptionalParamData, GetCallWithoutParametersAndResponseData, ImportData, ImportResponse, MultipartRequestData, MultipartResponseData, MultipartResponseResponse, NonAsciiæøåÆøÅöôêÊ字符串Data, NonAsciiæøåÆøÅöôêÊ字符串Response, PatchApiVbyApiVersionNoTagData, PatchCallWithoutParametersAndResponseData, PostApiVbyApiVersionFormDataData, PostApiVbyApiVersionRequestBodyData, PostCallWithOptionalParamData, PostCallWithOptionalParamResponse, PostCallWithoutParametersAndResponseData, PutCallWithoutParametersAndResponseData, PutWithFormUrlEncodedData, TestErrorCodeData, TypesData, TypesResponse, UploadFileData, UploadFileResponse } from '../types.gen';\n\nexport type QueryKey<TOptions extends Options> = [\n    Pick<TOptions, 'baseURL' | 'body' | 'headers' | 'path' | 'query'> & {\n        _id: string;\n        _infinite?: boolean;\n        tags?: ReadonlyArray<string>;\n    }\n];\n\nconst createQueryKey = <TOptions extends Options>(id: string, options?: TOptions, infinite?: boolean, tags?: ReadonlyArray<string>): [\n    QueryKey<TOptions>[0]\n] => {\n    const params: QueryKey<TOptions>[0] = { _id: id, baseURL: options?.baseURL || (options?.client ?? client).getConfig().baseURL } as QueryKey<TOptions>[0];\n    if (infinite) {\n        params._infinite = infinite;\n    }\n    if (tags) {\n        params.tags = tags;\n    }\n    if (options?.body) {\n        params.body = options.body;\n    }\n    if (options?.headers) {\n        params.headers = options.headers;\n    }\n    if (options?.path) {\n        params.path = options.path;\n    }\n    if (options?.query) {\n        params.query = options.query;\n    }\n    return [params];\n};\n\nexport const exportQueryKey = (options?: Options<ExportData>) => createQueryKey('export', options);\n\nexport const exportOptions = (options?: Options<ExportData>) => queryOptions<unknown, AxiosError<DefaultError>, unknown, ReturnType<typeof exportQueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await export_({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: exportQueryKey(options)\n});\n\nexport const patchApiVbyApiVersionNoTagMutation = (options?: Partial<Options<PatchApiVbyApiVersionNoTagData>>): MutationOptions<unknown, AxiosError<DefaultError>, Options<PatchApiVbyApiVersionNoTagData>> => {\n    const mutationOptions: MutationOptions<unknown, AxiosError<DefaultError>, Options<PatchApiVbyApiVersionNoTagData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await patchApiVbyApiVersionNoTag({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const importMutation = (options?: Partial<Options<ImportData>>): MutationOptions<ImportResponse, AxiosError<DefaultError>, Options<ImportData>> => {\n    const mutationOptions: MutationOptions<ImportResponse, AxiosError<DefaultError>, Options<ImportData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await import_({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const fooWowMutation = (options?: Partial<Options<FooWowData>>): MutationOptions<unknown, AxiosError<DefaultError>, Options<FooWowData>> => {\n    const mutationOptions: MutationOptions<unknown, AxiosError<DefaultError>, Options<FooWowData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await fooWow({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const apiVVersionODataControllerCountQueryKey = (options?: Options<ApiVVersionODataControllerCountData>) => createQueryKey('apiVVersionODataControllerCount', options);\n\nexport const apiVVersionODataControllerCountOptions = (options?: Options<ApiVVersionODataControllerCountData>) => queryOptions<ApiVVersionODataControllerCountResponse, AxiosError<DefaultError>, ApiVVersionODataControllerCountResponse, ReturnType<typeof apiVVersionODataControllerCountQueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await apiVVersionODataControllerCount({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: apiVVersionODataControllerCountQueryKey(options)\n});\n\nexport const getApiVbyApiVersionSimpleOperationQueryKey = (options: Options<GetApiVbyApiVersionSimpleOperationData>) => createQueryKey('getApiVbyApiVersionSimpleOperation', options);\n\nexport const getApiVbyApiVersionSimpleOperationOptions = (options: Options<GetApiVbyApiVersionSimpleOperationData>) => queryOptions<GetApiVbyApiVersionSimpleOperationResponse, AxiosError<GetApiVbyApiVersionSimpleOperationError>, GetApiVbyApiVersionSimpleOperationResponse, ReturnType<typeof getApiVbyApiVersionSimpleOperationQueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await getApiVbyApiVersionSimpleOperation({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: getApiVbyApiVersionSimpleOperationQueryKey(options)\n});\n\nexport const deleteCallWithoutParametersAndResponseMutation = (options?: Partial<Options<DeleteCallWithoutParametersAndResponseData>>): MutationOptions<unknown, AxiosError<DefaultError>, Options<DeleteCallWithoutParametersAndResponseData>> => {\n    const mutationOptions: MutationOptions<unknown, AxiosError<DefaultError>, Options<DeleteCallWithoutParametersAndResponseData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await deleteCallWithoutParametersAndResponse({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const getCallWithoutParametersAndResponseQueryKey = (options?: Options<GetCallWithoutParametersAndResponseData>) => createQueryKey('getCallWithoutParametersAndResponse', options);\n\nexport const getCallWithoutParametersAndResponseOptions = (options?: Options<GetCallWithoutParametersAndResponseData>) => queryOptions<unknown, AxiosError<DefaultError>, unknown, ReturnType<typeof getCallWithoutParametersAndResponseQueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await getCallWithoutParametersAndResponse({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: getCallWithoutParametersAndResponseQueryKey(options)\n});\n\nexport const patchCallWithoutParametersAndResponseMutation = (options?: Partial<Options<PatchCallWithoutParametersAndResponseData>>): MutationOptions<unknown, AxiosError<DefaultError>, Options<PatchCallWithoutParametersAndResponseData>> => {\n    const mutationOptions: MutationOptions<unknown, AxiosError<DefaultError>, Options<PatchCallWithoutParametersAndResponseData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await patchCallWithoutParametersAndResponse({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const postCallWithoutParametersAndResponseMutation = (options?: Partial<Options<PostCallWithoutParametersAndResponseData>>): MutationOptions<unknown, AxiosError<DefaultError>, Options<PostCallWithoutParametersAndResponseData>> => {\n    const mutationOptions: MutationOptions<unknown, AxiosError<DefaultError>, Options<PostCallWithoutParametersAndResponseData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await postCallWithoutParametersAndResponse({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const putCallWithoutParametersAndResponseMutation = (options?: Partial<Options<PutCallWithoutParametersAndResponseData>>): MutationOptions<unknown, AxiosError<DefaultError>, Options<PutCallWithoutParametersAndResponseData>> => {\n    const mutationOptions: MutationOptions<unknown, AxiosError<DefaultError>, Options<PutCallWithoutParametersAndResponseData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await putCallWithoutParametersAndResponse({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const deleteFooMutation = (options?: Partial<Options<DeleteFooData3>>): MutationOptions<unknown, AxiosError<DefaultError>, Options<DeleteFooData3>> => {\n    const mutationOptions: MutationOptions<unknown, AxiosError<DefaultError>, Options<DeleteFooData3>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await deleteFoo({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const callWithDescriptionsMutation = (options?: Partial<Options<CallWithDescriptionsData>>): MutationOptions<unknown, AxiosError<DefaultError>, Options<CallWithDescriptionsData>> => {\n    const mutationOptions: MutationOptions<unknown, AxiosError<DefaultError>, Options<CallWithDescriptionsData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await callWithDescriptions({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\n/**\n * @deprecated\n */\nexport const deprecatedCallMutation = (options?: Partial<Options<DeprecatedCallData>>): MutationOptions<unknown, AxiosError<DefaultError>, Options<DeprecatedCallData>> => {\n    const mutationOptions: MutationOptions<unknown, AxiosError<DefaultError>, Options<DeprecatedCallData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await deprecatedCall({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const callWithParametersMutation = (options?: Partial<Options<CallWithParametersData>>): MutationOptions<unknown, AxiosError<DefaultError>, Options<CallWithParametersData>> => {\n    const mutationOptions: MutationOptions<unknown, AxiosError<DefaultError>, Options<CallWithParametersData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await callWithParameters({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const callWithWeirdParameterNamesMutation = (options?: Partial<Options<CallWithWeirdParameterNamesData>>): MutationOptions<unknown, AxiosError<DefaultError>, Options<CallWithWeirdParameterNamesData>> => {\n    const mutationOptions: MutationOptions<unknown, AxiosError<DefaultError>, Options<CallWithWeirdParameterNamesData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await callWithWeirdParameterNames({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const getCallWithOptionalParamQueryKey = (options: Options<GetCallWithOptionalParamData>) => createQueryKey('getCallWithOptionalParam', options);\n\nexport const getCallWithOptionalParamOptions = (options: Options<GetCallWithOptionalParamData>) => queryOptions<unknown, AxiosError<DefaultError>, unknown, ReturnType<typeof getCallWithOptionalParamQueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await getCallWithOptionalParam({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: getCallWithOptionalParamQueryKey(options)\n});\n\nconst createInfiniteParams = <K extends Pick<QueryKey<Options>[0], 'body' | 'headers' | 'path' | 'query'>>(queryKey: QueryKey<Options>, page: K) => {\n    const params = { ...queryKey[0] };\n    if (page.body) {\n        params.body = {\n            ...queryKey[0].body as any,\n            ...page.body as any\n        };\n    }\n    if (page.headers) {\n        params.headers = {\n            ...queryKey[0].headers,\n            ...page.headers\n        };\n    }\n    if (page.path) {\n        params.path = {\n            ...queryKey[0].path as any,\n            ...page.path as any\n        };\n    }\n    if (page.query) {\n        params.query = {\n            ...queryKey[0].query as any,\n            ...page.query as any\n        };\n    }\n    return params as unknown as typeof page;\n};\n\nexport const getCallWithOptionalParamInfiniteQueryKey = (options: Options<GetCallWithOptionalParamData>): QueryKey<Options<GetCallWithOptionalParamData>> => createQueryKey('getCallWithOptionalParam', options, true);\n\nexport const getCallWithOptionalParamInfiniteOptions = (options: Options<GetCallWithOptionalParamData>) => infiniteQueryOptions<unknown, AxiosError<DefaultError>, InfiniteData<unknown>, QueryKey<Options<GetCallWithOptionalParamData>>, number | Pick<QueryKey<Options<GetCallWithOptionalParamData>>[0], 'body' | 'headers' | 'path' | 'query'>>(\n// @ts-ignore\n{\n    queryFn: async ({ pageParam, queryKey, signal }) => {\n        // @ts-ignore\n        const page: Pick<QueryKey<Options<GetCallWithOptionalParamData>>[0], 'body' | 'headers' | 'path' | 'query'> = typeof pageParam === 'object' ? pageParam : {\n            query: {\n                page: pageParam\n            }\n        };\n        const params = createInfiniteParams(queryKey, page);\n        const { data } = await getCallWithOptionalParam({\n            ...options,\n            ...params,\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: getCallWithOptionalParamInfiniteQueryKey(options)\n});\n\nexport const postCallWithOptionalParamMutation = (options?: Partial<Options<PostCallWithOptionalParamData>>): MutationOptions<PostCallWithOptionalParamResponse, AxiosError<DefaultError>, Options<PostCallWithOptionalParamData>> => {\n    const mutationOptions: MutationOptions<PostCallWithOptionalParamResponse, AxiosError<DefaultError>, Options<PostCallWithOptionalParamData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await postCallWithOptionalParam({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const postApiVbyApiVersionRequestBodyMutation = (options?: Partial<Options<PostApiVbyApiVersionRequestBodyData>>): MutationOptions<unknown, AxiosError<DefaultError>, Options<PostApiVbyApiVersionRequestBodyData>> => {\n    const mutationOptions: MutationOptions<unknown, AxiosError<DefaultError>, Options<PostApiVbyApiVersionRequestBodyData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await postApiVbyApiVersionRequestBody({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const postApiVbyApiVersionFormDataMutation = (options?: Partial<Options<PostApiVbyApiVersionFormDataData>>): MutationOptions<unknown, AxiosError<DefaultError>, Options<PostApiVbyApiVersionFormDataData>> => {\n    const mutationOptions: MutationOptions<unknown, AxiosError<DefaultError>, Options<PostApiVbyApiVersionFormDataData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await postApiVbyApiVersionFormData({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const callWithDefaultParametersQueryKey = (options?: Options<CallWithDefaultParametersData>) => createQueryKey('callWithDefaultParameters', options);\n\nexport const callWithDefaultParametersOptions = (options?: Options<CallWithDefaultParametersData>) => queryOptions<unknown, AxiosError<DefaultError>, unknown, ReturnType<typeof callWithDefaultParametersQueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await callWithDefaultParameters({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: callWithDefaultParametersQueryKey(options)\n});\n\nexport const callWithDefaultOptionalParametersMutation = (options?: Partial<Options<CallWithDefaultOptionalParametersData>>): MutationOptions<unknown, AxiosError<DefaultError>, Options<CallWithDefaultOptionalParametersData>> => {\n    const mutationOptions: MutationOptions<unknown, AxiosError<DefaultError>, Options<CallWithDefaultOptionalParametersData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await callWithDefaultOptionalParameters({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const callToTestOrderOfParamsMutation = (options?: Partial<Options<CallToTestOrderOfParamsData>>): MutationOptions<unknown, AxiosError<DefaultError>, Options<CallToTestOrderOfParamsData>> => {\n    const mutationOptions: MutationOptions<unknown, AxiosError<DefaultError>, Options<CallToTestOrderOfParamsData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await callToTestOrderOfParams({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const duplicateNameMutation = (options?: Partial<Options<DuplicateNameData>>): MutationOptions<unknown, AxiosError<DefaultError>, Options<DuplicateNameData>> => {\n    const mutationOptions: MutationOptions<unknown, AxiosError<DefaultError>, Options<DuplicateNameData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await duplicateName({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const duplicateName2QueryKey = (options?: Options<DuplicateName2Data>) => createQueryKey('duplicateName2', options);\n\nexport const duplicateName2Options = (options?: Options<DuplicateName2Data>) => queryOptions<unknown, AxiosError<DefaultError>, unknown, ReturnType<typeof duplicateName2QueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await duplicateName2({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: duplicateName2QueryKey(options)\n});\n\nexport const duplicateName3Mutation = (options?: Partial<Options<DuplicateName3Data>>): MutationOptions<unknown, AxiosError<DefaultError>, Options<DuplicateName3Data>> => {\n    const mutationOptions: MutationOptions<unknown, AxiosError<DefaultError>, Options<DuplicateName3Data>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await duplicateName3({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const duplicateName4Mutation = (options?: Partial<Options<DuplicateName4Data>>): MutationOptions<unknown, AxiosError<DefaultError>, Options<DuplicateName4Data>> => {\n    const mutationOptions: MutationOptions<unknown, AxiosError<DefaultError>, Options<DuplicateName4Data>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await duplicateName4({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const callWithNoContentResponseQueryKey = (options?: Options<CallWithNoContentResponseData>) => createQueryKey('callWithNoContentResponse', options);\n\nexport const callWithNoContentResponseOptions = (options?: Options<CallWithNoContentResponseData>) => queryOptions<CallWithNoContentResponseResponse, AxiosError<DefaultError>, CallWithNoContentResponseResponse, ReturnType<typeof callWithNoContentResponseQueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await callWithNoContentResponse({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: callWithNoContentResponseQueryKey(options)\n});\n\nexport const callWithResponseAndNoContentResponseQueryKey = (options?: Options<CallWithResponseAndNoContentResponseData>) => createQueryKey('callWithResponseAndNoContentResponse', options);\n\nexport const callWithResponseAndNoContentResponseOptions = (options?: Options<CallWithResponseAndNoContentResponseData>) => queryOptions<CallWithResponseAndNoContentResponseResponse, AxiosError<DefaultError>, CallWithResponseAndNoContentResponseResponse, ReturnType<typeof callWithResponseAndNoContentResponseQueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await callWithResponseAndNoContentResponse({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: callWithResponseAndNoContentResponseQueryKey(options)\n});\n\nexport const dummyAQueryKey = (options?: Options<DummyAData>) => createQueryKey('dummyA', options);\n\nexport const dummyAOptions = (options?: Options<DummyAData>) => queryOptions<DummyAResponse, AxiosError<DefaultError>, DummyAResponse, ReturnType<typeof dummyAQueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await dummyA({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: dummyAQueryKey(options)\n});\n\nexport const dummyBQueryKey = (options?: Options<DummyBData>) => createQueryKey('dummyB', options);\n\nexport const dummyBOptions = (options?: Options<DummyBData>) => queryOptions<DummyBResponse, AxiosError<DefaultError>, DummyBResponse, ReturnType<typeof dummyBQueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await dummyB({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: dummyBQueryKey(options)\n});\n\nexport const callWithResponseQueryKey = (options?: Options<CallWithResponseData>) => createQueryKey('callWithResponse', options);\n\nexport const callWithResponseOptions = (options?: Options<CallWithResponseData>) => queryOptions<CallWithResponseResponse, AxiosError<DefaultError>, CallWithResponseResponse, ReturnType<typeof callWithResponseQueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await callWithResponse({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: callWithResponseQueryKey(options)\n});\n\nexport const callWithDuplicateResponsesMutation = (options?: Partial<Options<CallWithDuplicateResponsesData>>): MutationOptions<CallWithDuplicateResponsesResponse, AxiosError<CallWithDuplicateResponsesError>, Options<CallWithDuplicateResponsesData>> => {\n    const mutationOptions: MutationOptions<CallWithDuplicateResponsesResponse, AxiosError<CallWithDuplicateResponsesError>, Options<CallWithDuplicateResponsesData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await callWithDuplicateResponses({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const callWithResponsesMutation = (options?: Partial<Options<CallWithResponsesData>>): MutationOptions<CallWithResponsesResponse, AxiosError<CallWithResponsesError>, Options<CallWithResponsesData>> => {\n    const mutationOptions: MutationOptions<CallWithResponsesResponse, AxiosError<CallWithResponsesError>, Options<CallWithResponsesData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await callWithResponses({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const collectionFormatQueryKey = (options: Options<CollectionFormatData>) => createQueryKey('collectionFormat', options);\n\nexport const collectionFormatOptions = (options: Options<CollectionFormatData>) => queryOptions<unknown, AxiosError<DefaultError>, unknown, ReturnType<typeof collectionFormatQueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await collectionFormat({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: collectionFormatQueryKey(options)\n});\n\nexport const typesQueryKey = (options: Options<TypesData>) => createQueryKey('types', options);\n\nexport const typesOptions = (options: Options<TypesData>) => queryOptions<TypesResponse, AxiosError<DefaultError>, TypesResponse, ReturnType<typeof typesQueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await types({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: typesQueryKey(options)\n});\n\nexport const uploadFileMutation = (options?: Partial<Options<UploadFileData>>): MutationOptions<UploadFileResponse, AxiosError<DefaultError>, Options<UploadFileData>> => {\n    const mutationOptions: MutationOptions<UploadFileResponse, AxiosError<DefaultError>, Options<UploadFileData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await uploadFile({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const fileResponseQueryKey = (options: Options<FileResponseData>) => createQueryKey('fileResponse', options);\n\nexport const fileResponseOptions = (options: Options<FileResponseData>) => queryOptions<FileResponseResponse, AxiosError<DefaultError>, FileResponseResponse, ReturnType<typeof fileResponseQueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await fileResponse({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: fileResponseQueryKey(options)\n});\n\nexport const complexTypesQueryKey = (options: Options<ComplexTypesData>) => createQueryKey('complexTypes', options);\n\nexport const complexTypesOptions = (options: Options<ComplexTypesData>) => queryOptions<ComplexTypesResponse, AxiosError<DefaultError>, ComplexTypesResponse, ReturnType<typeof complexTypesQueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await complexTypes({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: complexTypesQueryKey(options)\n});\n\nexport const multipartResponseQueryKey = (options?: Options<MultipartResponseData>) => createQueryKey('multipartResponse', options);\n\nexport const multipartResponseOptions = (options?: Options<MultipartResponseData>) => queryOptions<MultipartResponseResponse, AxiosError<DefaultError>, MultipartResponseResponse, ReturnType<typeof multipartResponseQueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await multipartResponse({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: multipartResponseQueryKey(options)\n});\n\nexport const multipartRequestMutation = (options?: Partial<Options<MultipartRequestData>>): MutationOptions<unknown, AxiosError<DefaultError>, Options<MultipartRequestData>> => {\n    const mutationOptions: MutationOptions<unknown, AxiosError<DefaultError>, Options<MultipartRequestData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await multipartRequest({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const complexParamsMutation = (options?: Partial<Options<ComplexParamsData>>): MutationOptions<ComplexParamsResponse, AxiosError<DefaultError>, Options<ComplexParamsData>> => {\n    const mutationOptions: MutationOptions<ComplexParamsResponse, AxiosError<DefaultError>, Options<ComplexParamsData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await complexParams({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const callWithResultFromHeaderMutation = (options?: Partial<Options<CallWithResultFromHeaderData>>): MutationOptions<unknown, AxiosError<DefaultError>, Options<CallWithResultFromHeaderData>> => {\n    const mutationOptions: MutationOptions<unknown, AxiosError<DefaultError>, Options<CallWithResultFromHeaderData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await callWithResultFromHeader({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const testErrorCodeMutation = (options?: Partial<Options<TestErrorCodeData>>): MutationOptions<unknown, AxiosError<DefaultError>, Options<TestErrorCodeData>> => {\n    const mutationOptions: MutationOptions<unknown, AxiosError<DefaultError>, Options<TestErrorCodeData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await testErrorCode({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const nonAsciiæøåÆøÅöôêÊ字符串Mutation = (options?: Partial<Options<NonAsciiæøåÆøÅöôêÊ字符串Data>>): MutationOptions<NonAsciiæøåÆøÅöôêÊ字符串Response, AxiosError<DefaultError>, Options<NonAsciiæøåÆøÅöôêÊ字符串Data>> => {\n    const mutationOptions: MutationOptions<NonAsciiæøåÆøÅöôêÊ字符串Response, AxiosError<DefaultError>, Options<NonAsciiæøåÆøÅöôêÊ字符串Data>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await nonAsciiæøåÆøÅöôêÊ字符串({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\n/**\n * Login User\n */\nexport const putWithFormUrlEncodedMutation = (options?: Partial<Options<PutWithFormUrlEncodedData>>): MutationOptions<unknown, AxiosError<DefaultError>, Options<PutWithFormUrlEncodedData>> => {\n    const mutationOptions: MutationOptions<unknown, AxiosError<DefaultError>, Options<PutWithFormUrlEncodedData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await putWithFormUrlEncoded({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/solid-query/axios/client/client.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { AxiosError, AxiosInstance, RawAxiosRequestHeaders } from 'axios';\nimport axios from 'axios';\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 } from './types.gen';\nimport { buildUrl, createConfig, mergeConfigs, mergeHeaders, setAuthParams } from './utils.gen';\n\nexport const createClient = (config: Config = {}): Client => {\n  let _config = mergeConfigs(createConfig(), config);\n\n  let instance: AxiosInstance;\n\n  if (_config.axios && !('Axios' in _config.axios)) {\n    instance = _config.axios;\n  } else {\n    // eslint-disable-next-line @typescript-eslint/no-unused-vars\n    const { auth, ...configWithoutAuth } = _config;\n    instance = axios.create(configWithoutAuth);\n  }\n\n  const getConfig = (): Config => ({ ..._config });\n\n  const setConfig = (config: Config): Config => {\n    _config = mergeConfigs(_config, config);\n    instance.defaults = {\n      ...instance.defaults,\n      ..._config,\n      // @ts-expect-error\n      headers: mergeHeaders(instance.defaults.headers, _config.headers),\n    };\n    return getConfig();\n  };\n\n  const beforeRequest = async (options: RequestOptions) => {\n    const opts = {\n      ..._config,\n      ...options,\n      axios: options.axios ?? _config.axios ?? instance,\n      headers: mergeHeaders(_config.headers, options.headers),\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.body = opts.bodySerializer(opts.body);\n    }\n\n    const url = buildUrl(opts);\n\n    return { opts, url };\n  };\n\n  // @ts-expect-error\n  const request: Client['request'] = async (options) => {\n    // @ts-expect-error\n    const { opts, url } = await beforeRequest(options);\n    try {\n      // assign Axios here for consistency with fetch\n      const _axios = opts.axios!;\n      // eslint-disable-next-line @typescript-eslint/no-unused-vars\n      const { auth, ...optsWithoutAuth } = opts;\n      const response = await _axios({\n        ...optsWithoutAuth,\n        baseURL: '', // the baseURL is already included in `url`\n        data: getValidRequestBody(opts),\n        headers: opts.headers as RawAxiosRequestHeaders,\n        // let `paramsSerializer()` handle query params if it exists\n        params: opts.paramsSerializer ? opts.query : undefined,\n        url,\n      });\n\n      let { data } = response;\n\n      if (opts.responseType === '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 {\n        ...response,\n        data: data ?? {},\n      };\n    } catch (error) {\n      const e = error as AxiosError;\n      if (opts.throwOnError) {\n        throw e;\n      }\n      // @ts-expect-error\n      e.error = e.response?.data ?? {};\n      return e;\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 Record<string, string>,\n      method,\n      serializedBody: getValidRequestBody(opts) as BodyInit | null | undefined,\n      // @ts-expect-error\n      signal: opts.signal,\n      url,\n    });\n  };\n\n  const _buildUrl: Client['buildUrl'] = (options) =>\n    buildUrl({ axios: instance, ..._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    instance,\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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/solid-query/axios/client/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type { Auth } from '../core/auth.gen';\nexport type { QuerySerializerOptions } from '../core/bodySerializer.gen';\nexport {\n  formDataBodySerializer,\n  jsonBodySerializer,\n  urlSearchParamsBodySerializer,\n} from '../core/bodySerializer.gen';\nexport { buildClientParams } from '../core/params.gen';\nexport { serializeQueryKeyValue } from '../core/queryKeySerializer.gen';\nexport { createClient } from './client.gen';\nexport type {\n  Client,\n  ClientOptions,\n  Config,\n  CreateClientConfig,\n  Options,\n  RequestOptions,\n  RequestResult,\n  TDataShape,\n} from './types.gen';\nexport { createConfig } from './utils.gen';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/solid-query/axios/client/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type {\n  AxiosError,\n  AxiosInstance,\n  AxiosRequestHeaders,\n  AxiosResponse,\n  AxiosStatic,\n  CreateAxiosDefaults,\n} from 'axios';\n\nimport type { Auth } from '../core/auth.gen';\nimport type {\n  ServerSentEventsOptions,\n  ServerSentEventsResult,\n} from '../core/serverSentEvents.gen';\nimport type { Client as CoreClient, Config as CoreConfig } from '../core/types.gen';\n\nexport interface Config<T extends ClientOptions = ClientOptions>\n  extends Omit<CreateAxiosDefaults, 'auth' | 'baseURL' | 'headers' | 'method'>, CoreConfig {\n  /**\n   * Axios implementation. You can use this option to provide either an\n   * `AxiosStatic` or an `AxiosInstance`.\n   *\n   * @default axios\n   */\n  axios?: AxiosStatic | AxiosInstance;\n  /**\n   * Base URL for all requests made by this client.\n   */\n  baseURL?: T['baseURL'];\n  /**\n   * An object containing any HTTP headers that you want to pre-populate your\n   * `Headers` object with.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/Headers/Headers#init See more}\n   */\n  headers?:\n    | AxiosRequestHeaders\n    | Record<\n        string,\n        string | number | boolean | (string | number | boolean)[] | null | undefined | unknown\n      >;\n  /**\n   * Throw an error instead of returning it in the response?\n   *\n   * @default false\n   */\n  throwOnError?: T['throwOnError'];\n}\n\nexport interface RequestOptions<\n  TData = unknown,\n  ThrowOnError extends boolean = boolean,\n  Url extends string = string,\n>\n  extends\n    Config<{\n      throwOnError: ThrowOnError;\n    }>,\n    Pick<\n      ServerSentEventsOptions<TData>,\n      | 'onRequest'\n      | 'onSseError'\n      | 'onSseEvent'\n      | 'sseDefaultRetryDelay'\n      | 'sseMaxRetryAttempts'\n      | 'sseMaxRetryDelay'\n    > {\n  /**\n   * Any body that you want to add to your request.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/fetch#body}\n   */\n  body?: unknown;\n  path?: Record<string, unknown>;\n  query?: Record<string, unknown>;\n  /**\n   * Security mechanism(s) to use for the request.\n   */\n  security?: ReadonlyArray<Auth>;\n  url: Url;\n}\n\nexport interface ClientOptions {\n  baseURL?: string;\n  throwOnError?: boolean;\n}\n\nexport type RequestResult<\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = boolean,\n> = ThrowOnError extends true\n  ? Promise<AxiosResponse<TData extends Record<string, unknown> ? TData[keyof TData] : TData>>\n  : Promise<\n      | (AxiosResponse<TData extends Record<string, unknown> ? TData[keyof TData] : TData> & {\n          error: undefined;\n        })\n      | (AxiosError<TError extends Record<string, unknown> ? TError[keyof TError] : TError> & {\n          data: undefined;\n          error: TError extends Record<string, unknown> ? TError[keyof TError] : TError;\n        })\n    >;\n\ntype MethodFn = <TData = unknown, TError = unknown, ThrowOnError extends boolean = false>(\n  options: Omit<RequestOptions<TData, ThrowOnError>, 'method'>,\n) => RequestResult<TData, TError, ThrowOnError>;\n\ntype SseFn = <TData = unknown, TError = unknown, ThrowOnError extends boolean = false>(\n  options: Omit<RequestOptions<TData, ThrowOnError>, 'method'>,\n) => Promise<ServerSentEventsResult<TData, TError>>;\n\ntype RequestFn = <TData = unknown, TError = unknown, ThrowOnError extends boolean = false>(\n  options: Omit<RequestOptions<TData, ThrowOnError>, 'method'> &\n    Pick<Required<RequestOptions<TData, ThrowOnError>>, 'method'>,\n) => RequestResult<TData, TError, ThrowOnError>;\n\ntype BuildUrlFn = <\n  TData extends {\n    body?: unknown;\n    path?: Record<string, unknown>;\n    query?: Record<string, unknown>;\n    url: string;\n  },\n>(\n  options: TData & Options<TData>,\n) => string;\n\nexport type Client = CoreClient<RequestFn, Config, MethodFn, BuildUrlFn, SseFn> & {\n  instance: AxiosInstance;\n};\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 = ClientOptions> = (\n  override?: Config<ClientOptions & T>,\n) => Config<Required<ClientOptions> & T>;\n\nexport interface TDataShape {\n  body?: unknown;\n  headers?: unknown;\n  path?: unknown;\n  query?: unknown;\n  url: string;\n}\n\ntype OmitKeys<T, K> = Pick<T, Exclude<keyof T, K>>;\n\nexport type Options<\n  TData extends TDataShape = TDataShape,\n  ThrowOnError extends boolean = boolean,\n  TResponse = unknown,\n> = OmitKeys<RequestOptions<TResponse, ThrowOnError>, 'body' | 'path' | 'query' | 'url'> &\n  ([TData] extends [never] ? unknown : Omit<TData, 'url'>);\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/solid-query/axios/client/utils.gen.ts",
    "content": "// 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 {\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\nconst checkForExistence = (\n  options: Pick<RequestOptions, 'auth' | 'query'> & {\n    headers: Record<any, unknown>;\n  },\n  name?: string,\n): boolean => {\n  if (!name) {\n    return false;\n  }\n  if (name in options.headers || options.query?.[name]) {\n    return true;\n  }\n  if (\n    'Cookie' in options.headers &&\n    options.headers['Cookie'] &&\n    typeof options.headers['Cookie'] === 'string'\n  ) {\n    return options.headers['Cookie'].includes(`${name}=`);\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: Record<any, unknown>;\n  }) => {\n  for (const auth of security) {\n    if (checkForExistence(options, auth.name)) {\n      continue;\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        const value = `${name}=${token}`;\n        if ('Cookie' in options.headers && options.headers['Cookie']) {\n          options.headers['Cookie'] = `${options.headers['Cookie']}; ${value}`;\n        } else {\n          options.headers['Cookie'] = value;\n        }\n        break;\n      }\n      case 'header':\n      default:\n        options.headers[name] = token;\n        break;\n    }\n  }\n};\n\nexport const buildUrl: Client['buildUrl'] = (options) => {\n  const instanceBaseUrl = options.axios?.defaults?.baseURL;\n\n  const baseUrl =\n    !!options.baseURL && typeof options.baseURL === 'string' ? options.baseURL : instanceBaseUrl;\n\n  return getUrl({\n    baseUrl: baseUrl as string,\n    path: options.path,\n    // let `paramsSerializer()` handle query params if it exists\n    query: !options.paramsSerializer ? options.query : undefined,\n    querySerializer:\n      typeof options.querySerializer === 'function'\n        ? options.querySerializer\n        : createQuerySerializer(options.querySerializer),\n    url: options.url,\n  });\n};\n\nexport const mergeConfigs = (a: Config, b: Config): Config => {\n  const config = { ...a, ...b };\n  config.headers = mergeHeaders(a.headers, b.headers);\n  return config;\n};\n\n/**\n * Special Axios headers keywords allowing to set headers by request method.\n */\nexport const axiosHeadersKeywords = [\n  'common',\n  'delete',\n  'get',\n  'head',\n  'patch',\n  'post',\n  'put',\n] as const;\n\nexport const mergeHeaders = (\n  ...headers: Array<Required<Config>['headers'] | undefined>\n): Record<any, unknown> => {\n  const mergedHeaders: Record<any, unknown> = {};\n  for (const header of headers) {\n    if (!header || typeof header !== 'object') {\n      continue;\n    }\n\n    const iterator = Object.entries(header);\n\n    for (const [key, value] of iterator) {\n      if (\n        axiosHeadersKeywords.includes(key as (typeof axiosHeadersKeywords)[number]) &&\n        typeof value === 'object'\n      ) {\n        mergedHeaders[key] = {\n          ...(mergedHeaders[key] as Record<any, unknown>),\n          ...value,\n        };\n      } else if (value === null) {\n        delete mergedHeaders[key];\n      } else if (Array.isArray(value)) {\n        for (const v of value) {\n          // @ts-expect-error\n          mergedHeaders[key] = [...(mergedHeaders[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[key] = typeof value === 'object' ? JSON.stringify(value) : (value as string);\n      }\n    }\n  }\n  return mergedHeaders;\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  ...override,\n});\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/solid-query/axios/client.gen.ts",
    "content": "// 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: 'http://localhost:3000/base' }));\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/solid-query/axios/core/auth.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/solid-query/axios/core/bodySerializer.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/solid-query/axios/core/params.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/solid-query/axios/core/pathSerializer.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/solid-query/axios/core/queryKeySerializer.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\n/**\n * JSON-friendly union that mirrors what Pinia Colada can hash.\n */\nexport type JsonValue =\n  | null\n  | string\n  | number\n  | boolean\n  | JsonValue[]\n  | { [key: string]: JsonValue };\n\n/**\n * Replacer that converts non-JSON values (bigint, Date, etc.) to safe substitutes.\n */\nexport const queryKeyJsonReplacer = (_key: string, value: unknown) => {\n  if (value === undefined || typeof value === 'function' || typeof value === 'symbol') {\n    return undefined;\n  }\n  if (typeof value === 'bigint') {\n    return value.toString();\n  }\n  if (value instanceof Date) {\n    return value.toISOString();\n  }\n  return value;\n};\n\n/**\n * Safely stringifies a value and parses it back into a JsonValue.\n */\nexport const stringifyToJsonValue = (input: unknown): JsonValue | undefined => {\n  try {\n    const json = JSON.stringify(input, queryKeyJsonReplacer);\n    if (json === undefined) {\n      return undefined;\n    }\n    return JSON.parse(json) as JsonValue;\n  } catch {\n    return undefined;\n  }\n};\n\n/**\n * Detects plain objects (including objects with a null prototype).\n */\nconst isPlainObject = (value: unknown): value is Record<string, unknown> => {\n  if (value === null || typeof value !== 'object') {\n    return false;\n  }\n  const prototype = Object.getPrototypeOf(value as object);\n  return prototype === Object.prototype || prototype === null;\n};\n\n/**\n * Turns URLSearchParams into a sorted JSON object for deterministic keys.\n */\nconst serializeSearchParams = (params: URLSearchParams): JsonValue => {\n  const entries = Array.from(params.entries()).sort(([a], [b]) => a.localeCompare(b));\n  const result: Record<string, JsonValue> = {};\n\n  for (const [key, value] of entries) {\n    const existing = result[key];\n    if (existing === undefined) {\n      result[key] = value;\n      continue;\n    }\n\n    if (Array.isArray(existing)) {\n      (existing as string[]).push(value);\n    } else {\n      result[key] = [existing, value];\n    }\n  }\n\n  return result;\n};\n\n/**\n * Normalizes any accepted value into a JSON-friendly shape for query keys.\n */\nexport const serializeQueryKeyValue = (value: unknown): JsonValue | undefined => {\n  if (value === null) {\n    return null;\n  }\n\n  if (typeof value === 'string' || typeof value === 'number' || typeof value === 'boolean') {\n    return value;\n  }\n\n  if (value === undefined || typeof value === 'function' || typeof value === 'symbol') {\n    return undefined;\n  }\n\n  if (typeof value === 'bigint') {\n    return value.toString();\n  }\n\n  if (value instanceof Date) {\n    return value.toISOString();\n  }\n\n  if (Array.isArray(value)) {\n    return stringifyToJsonValue(value);\n  }\n\n  if (typeof URLSearchParams !== 'undefined' && value instanceof URLSearchParams) {\n    return serializeSearchParams(value);\n  }\n\n  if (isPlainObject(value)) {\n    return stringifyToJsonValue(value);\n  }\n\n  return undefined;\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/solid-query/axios/core/serverSentEvents.gen.ts",
    "content": "// 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 const 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            // Normalize line endings: CRLF -> LF, then CR -> LF\n            buffer = buffer.replace(/\\r\\n/g, '\\n').replace(/\\r/g, '\\n');\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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/solid-query/axios/core/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { Auth, AuthToken } from './auth.gen';\nimport type { BodySerializer, QuerySerializer, QuerySerializerOptions } from './bodySerializer.gen';\n\nexport type HttpMethod =\n  | 'connect'\n  | 'delete'\n  | 'get'\n  | 'head'\n  | 'options'\n  | 'patch'\n  | 'post'\n  | 'put'\n  | 'trace';\n\nexport type Client<\n  RequestFn = never,\n  Config = unknown,\n  MethodFn = never,\n  BuildUrlFn = never,\n  SseFn = never,\n> = {\n  /**\n   * Returns the final request URL.\n   */\n  buildUrl: BuildUrlFn;\n  getConfig: () => Config;\n  request: RequestFn;\n  setConfig: (config: Config) => Config;\n} & {\n  [K in HttpMethod]: MethodFn;\n} & ([SseFn] extends [never] ? { sse?: never } : { sse: { [K in HttpMethod]: SseFn } });\n\nexport interface Config {\n  /**\n   * Auth token or a function returning auth token. The resolved value will be\n   * added to the request payload as defined by its `security` array.\n   */\n  auth?: ((auth: Auth) => Promise<AuthToken> | AuthToken) | AuthToken;\n  /**\n   * A function for serializing request body parameter. By default,\n   * {@link JSON.stringify()} will be used.\n   */\n  bodySerializer?: BodySerializer | null;\n  /**\n   * An object containing any HTTP headers that you want to pre-populate your\n   * `Headers` object with.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/Headers/Headers#init See more}\n   */\n  headers?:\n    | RequestInit['headers']\n    | Record<\n        string,\n        string | number | boolean | (string | number | boolean)[] | null | undefined | unknown\n      >;\n  /**\n   * The request method.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/fetch#method See more}\n   */\n  method?: Uppercase<HttpMethod>;\n  /**\n   * A function for serializing request query parameters. By default, arrays\n   * will be exploded in form style, objects will be exploded in deepObject\n   * style, and reserved characters are percent-encoded.\n   *\n   * This method will have no effect if the native `paramsSerializer()` Axios\n   * API function is used.\n   *\n   * {@link https://swagger.io/docs/specification/serialization/#query View examples}\n   */\n  querySerializer?: QuerySerializer | QuerySerializerOptions;\n  /**\n   * A function validating request data. This is useful if you want to ensure\n   * the request conforms to the desired shape, so it can be safely sent to\n   * the server.\n   */\n  requestValidator?: (data: unknown) => Promise<unknown>;\n  /**\n   * A function transforming response data before it's returned. This is useful\n   * for post-processing data, e.g. converting ISO strings into Date objects.\n   */\n  responseTransformer?: (data: unknown) => Promise<unknown>;\n  /**\n   * A function validating response data. This is useful if you want to ensure\n   * the response conforms to the desired shape, so it can be safely passed to\n   * the transformers and returned to the user.\n   */\n  responseValidator?: (data: unknown) => Promise<unknown>;\n}\n\ntype IsExactlyNeverOrNeverUndefined<T> = [T] extends [never]\n  ? true\n  : [T] extends [never | undefined]\n    ? [undefined] extends [T]\n      ? false\n      : true\n    : false;\n\nexport type OmitNever<T extends Record<string, unknown>> = {\n  [K in keyof T as IsExactlyNeverOrNeverUndefined<T[K]> extends true ? never : K]: T[K];\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/solid-query/axios/core/utils.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/solid-query/axios/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport { apiVVersionODataControllerCount, callToTestOrderOfParams, callWithDefaultOptionalParameters, callWithDefaultParameters, callWithDescriptions, callWithDuplicateResponses, callWithNoContentResponse, callWithParameters, callWithResponse, callWithResponseAndNoContentResponse, callWithResponses, callWithResultFromHeader, callWithWeirdParameterNames, collectionFormat, complexParams, complexTypes, deleteCallWithoutParametersAndResponse, deleteFoo, deprecatedCall, dummyA, dummyB, duplicateName, duplicateName2, duplicateName3, duplicateName4, export_, fileResponse, fooWow, getApiVbyApiVersionSimpleOperation, getCallWithOptionalParam, getCallWithoutParametersAndResponse, headCallWithoutParametersAndResponse, import_, multipartRequest, multipartResponse, nonAsciiæøåÆøÅöôêÊ字符串, type Options, optionsCallWithoutParametersAndResponse, patchApiVbyApiVersionNoTag, patchCallWithoutParametersAndResponse, postApiVbyApiVersionFormData, postApiVbyApiVersionRequestBody, postCallWithOptionalParam, postCallWithoutParametersAndResponse, putCallWithoutParametersAndResponse, putWithFormUrlEncoded, testErrorCode, types, uploadFile } from './sdk.gen';\nexport type { _3eNum1Период, _400, AdditionalPropertiesIntegerIssue, AdditionalPropertiesUnknownIssue, AdditionalPropertiesUnknownIssue2, AdditionalPropertiesUnknownIssue3, AdditionalPropertiesUnknownIssueWritable, AnyOfAnyAndNull, AnyOfArrays, ApiVVersionODataControllerCountData, ApiVVersionODataControllerCountResponse, ApiVVersionODataControllerCountResponses, ArrayWithAnyOfProperties, ArrayWithArray, ArrayWithBooleans, ArrayWithNumbers, ArrayWithProperties, ArrayWithReferences, ArrayWithStrings, CallToTestOrderOfParamsData, CallWithDefaultOptionalParametersData, CallWithDefaultParametersData, CallWithDescriptionsData, CallWithDuplicateResponsesData, CallWithDuplicateResponsesError, CallWithDuplicateResponsesErrors, CallWithDuplicateResponsesResponse, CallWithDuplicateResponsesResponses, CallWithNoContentResponseData, CallWithNoContentResponseResponse, CallWithNoContentResponseResponses, CallWithParametersData, CallWithResponseAndNoContentResponseData, CallWithResponseAndNoContentResponseResponse, CallWithResponseAndNoContentResponseResponses, CallWithResponseData, CallWithResponseResponse, CallWithResponseResponses, CallWithResponsesData, CallWithResponsesError, CallWithResponsesErrors, CallWithResponsesResponse, CallWithResponsesResponses, CallWithResultFromHeaderData, CallWithResultFromHeaderErrors, CallWithResultFromHeaderResponses, CallWithWeirdParameterNamesData, CamelCaseCommentWithBreaks, CharactersInDescription, ClientOptions, CollectionFormatData, CommentWithBackticks, CommentWithBackticksAndQuotes, CommentWithBreaks, CommentWithExpressionPlaceholders, CommentWithQuotes, CommentWithReservedCharacters, CommentWithSlashes, ComplexParamsData, ComplexParamsResponse, ComplexParamsResponses, ComplexTypesData, ComplexTypesErrors, ComplexTypesResponse, ComplexTypesResponses, CompositionBaseModel, CompositionExtendedModel, CompositionWithAllOfAndNullable, CompositionWithAnyOf, CompositionWithAnyOfAndNullable, CompositionWithAnyOfAnonymous, CompositionWithNestedAnyAndTypeNull, CompositionWithNestedAnyOfAndNull, CompositionWithOneOf, CompositionWithOneOfAndComplexArrayDictionary, CompositionWithOneOfAndNullable, CompositionWithOneOfAndProperties, CompositionWithOneOfAndSimpleArrayDictionary, CompositionWithOneOfAndSimpleDictionary, CompositionWithOneOfAnonymous, CompositionWithOneOfDiscriminator, ConstValue, Default, DeleteCallWithoutParametersAndResponseData, DeleteFooData, DeleteFooData2, DeleteFooData3, DeprecatedCallData, DeprecatedModel, DictionaryWithArray, DictionaryWithDictionary, DictionaryWithProperties, DictionaryWithPropertiesAndAdditionalProperties, DictionaryWithReference, DictionaryWithString, DummyAData, DummyAResponse, DummyAResponses, DummyBData, DummyBResponse, DummyBResponses, DuplicateName2Data, DuplicateName3Data, DuplicateName4Data, DuplicateNameData, EnumFromDescription, EnumWithExtensions, EnumWithNumbers, EnumWithReplacedCharacters, EnumWithStrings, EnumWithXEnumNames, ExportData, ExternalRefA, ExternalRefB, ExternalSharedModel, File, FileResponseData, FileResponseResponse, FileResponseResponses, FileWritable, FooWowData, FooWowResponses, FreeFormObjectWithAdditionalPropertiesEqEmptyObject, FreeFormObjectWithAdditionalPropertiesEqTrue, FreeFormObjectWithoutAdditionalProperties, GenericSchemaDuplicateIssue1SystemBoolean, GenericSchemaDuplicateIssue1SystemBooleanWritable, GenericSchemaDuplicateIssue1SystemString, GenericSchemaDuplicateIssue1SystemStringWritable, GetApiVbyApiVersionSimpleOperationData, GetApiVbyApiVersionSimpleOperationError, GetApiVbyApiVersionSimpleOperationErrors, GetApiVbyApiVersionSimpleOperationResponse, GetApiVbyApiVersionSimpleOperationResponses, GetCallWithOptionalParamData, GetCallWithoutParametersAndResponseData, HeadCallWithoutParametersAndResponseData, Import, ImportData, ImportResponse, ImportResponses, IoK8sApimachineryPkgApisMetaV1DeleteOptions, IoK8sApimachineryPkgApisMetaV1Preconditions, ModelCircle, ModelFromZendesk, ModelSquare, ModelThatExtends, ModelThatExtendsExtends, ModelWithAdditionalPropertiesEqTrue, ModelWithAdditionalPropertiesRef, ModelWithAnyOfConstantSizeArray, ModelWithAnyOfConstantSizeArrayAndIntersect, ModelWithAnyOfConstantSizeArrayNullable, ModelWithAnyOfConstantSizeArrayWithNSizeAndOptions, ModelWithAnyOfConstantSizeArrayWithNSizeAndOptionsWritable, ModelWithArray, ModelWithArrayReadOnlyAndWriteOnly, ModelWithArrayReadOnlyAndWriteOnlyWritable, ModelWithBackticksInDescription, ModelWithBoolean, ModelWithCircularReference, ModelWithConst, ModelWithConstantSizeArray, ModelWithDictionary, ModelWithDuplicateImports, ModelWithDuplicateProperties, ModelWithEnum, ModelWithEnumFromDescription, ModelWithEnumWithHyphen, ModelWithInteger, ModelWithNestedArrayEnums, ModelWithNestedArrayEnumsData, ModelWithNestedArrayEnumsDataBar, ModelWithNestedArrayEnumsDataFoo, ModelWithNestedCompositionEnums, ModelWithNestedEnums, ModelWithNestedProperties, ModelWithNullableObject, ModelWithNullableString, ModelWithNumericEnumUnion, ModelWithOneOfAndProperties, ModelWithOneOfEnum, ModelWithOrderedProperties, ModelWithPattern, ModelWithPatternWritable, ModelWithPrefixItemsConstantSizeArray, ModelWithProperties, ModelWithPropertiesWritable, ModelWithReadOnlyAndWriteOnly, ModelWithReadOnlyAndWriteOnlyWritable, ModelWithReference, ModelWithReferenceWritable, ModelWithString, ModelWithStringError, MultipartRequestData, MultipartResponseData, MultipartResponseResponse, MultipartResponseResponses, NestedAnyOfArraysNullable, NonAsciiæøåÆøÅöôêÊ字符串Data, NonAsciiæøåÆøÅöôêÊ字符串Response, NonAsciiæøåÆøÅöôêÊ字符串Responses, NonAsciiStringæøåÆøÅöôêÊ字符串, NullableObject, OneOfAllOfIssue, OneOfAllOfIssueWritable, OptionsCallWithoutParametersAndResponseData, Pageable, ParameterSimpleParameterUnused, PatchApiVbyApiVersionNoTagData, PatchApiVbyApiVersionNoTagResponses, PatchCallWithoutParametersAndResponseData, PostApiVbyApiVersionFormDataData, PostApiVbyApiVersionRequestBodyData, PostCallWithOptionalParamData, PostCallWithOptionalParamResponse, PostCallWithOptionalParamResponses, PostCallWithoutParametersAndResponseData, PostServiceWithEmptyTagResponse, PostServiceWithEmptyTagResponse2, PutCallWithoutParametersAndResponseData, PutWithFormUrlEncodedData, SchemaWithFormRestrictedKeys, SimpleBoolean, SimpleFile, SimpleFormData, SimpleInteger, SimpleParameter, SimpleReference, SimpleRequestBody, SimpleString, SimpleStringWithPattern, TestErrorCodeData, TestErrorCodeErrors, TestErrorCodeResponses, TypesData, TypesResponse, TypesResponses, UploadFileData, UploadFileResponse, UploadFileResponses, XFooBar } from './types.gen';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/solid-query/axios/sdk.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport { type Client, formDataBodySerializer, type Options as Options2, type TDataShape, urlSearchParamsBodySerializer } from './client';\nimport { client } from './client.gen';\nimport type { ApiVVersionODataControllerCountData, ApiVVersionODataControllerCountResponses, CallToTestOrderOfParamsData, CallWithDefaultOptionalParametersData, CallWithDefaultParametersData, CallWithDescriptionsData, CallWithDuplicateResponsesData, CallWithDuplicateResponsesErrors, CallWithDuplicateResponsesResponses, CallWithNoContentResponseData, CallWithNoContentResponseResponses, CallWithParametersData, CallWithResponseAndNoContentResponseData, CallWithResponseAndNoContentResponseResponses, CallWithResponseData, CallWithResponseResponses, CallWithResponsesData, CallWithResponsesErrors, CallWithResponsesResponses, CallWithResultFromHeaderData, CallWithResultFromHeaderErrors, CallWithResultFromHeaderResponses, CallWithWeirdParameterNamesData, CollectionFormatData, ComplexParamsData, ComplexParamsResponses, ComplexTypesData, ComplexTypesErrors, ComplexTypesResponses, DeleteCallWithoutParametersAndResponseData, DeleteFooData3, DeprecatedCallData, DummyAData, DummyAResponses, DummyBData, DummyBResponses, DuplicateName2Data, DuplicateName3Data, DuplicateName4Data, DuplicateNameData, ExportData, FileResponseData, FileResponseResponses, FooWowData, FooWowResponses, GetApiVbyApiVersionSimpleOperationData, GetApiVbyApiVersionSimpleOperationErrors, GetApiVbyApiVersionSimpleOperationResponses, GetCallWithOptionalParamData, GetCallWithoutParametersAndResponseData, HeadCallWithoutParametersAndResponseData, ImportData, ImportResponses, MultipartRequestData, MultipartResponseData, MultipartResponseResponses, NonAsciiæøåÆøÅöôêÊ字符串Data, NonAsciiæøåÆøÅöôêÊ字符串Responses, OptionsCallWithoutParametersAndResponseData, PatchApiVbyApiVersionNoTagData, PatchApiVbyApiVersionNoTagResponses, PatchCallWithoutParametersAndResponseData, PostApiVbyApiVersionFormDataData, PostApiVbyApiVersionRequestBodyData, PostCallWithOptionalParamData, PostCallWithOptionalParamResponses, PostCallWithoutParametersAndResponseData, PutCallWithoutParametersAndResponseData, PutWithFormUrlEncodedData, TestErrorCodeData, TestErrorCodeErrors, TestErrorCodeResponses, TypesData, TypesResponses, UploadFileData, UploadFileResponses } from './types.gen';\n\nexport type Options<TData extends TDataShape = TDataShape, ThrowOnError extends boolean = boolean> = Options2<TData, ThrowOnError> & {\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\nexport const export_ = <ThrowOnError extends boolean = false>(options?: Options<ExportData, ThrowOnError>) => (options?.client ?? client).get<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/no+tag', ...options });\n\nexport const patchApiVbyApiVersionNoTag = <ThrowOnError extends boolean = false>(options?: Options<PatchApiVbyApiVersionNoTagData, ThrowOnError>) => (options?.client ?? client).patch<PatchApiVbyApiVersionNoTagResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/no+tag', ...options });\n\nexport const import_ = <ThrowOnError extends boolean = false>(options: Options<ImportData, ThrowOnError>) => (options.client ?? client).post<ImportResponses, unknown, ThrowOnError>({\n    responseType: 'json',\n    url: '/api/v{api-version}/no+tag',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options.headers\n    }\n});\n\nexport const fooWow = <ThrowOnError extends boolean = false>(options?: Options<FooWowData, ThrowOnError>) => (options?.client ?? client).put<FooWowResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/no+tag', ...options });\n\nexport const apiVVersionODataControllerCount = <ThrowOnError extends boolean = false>(options?: Options<ApiVVersionODataControllerCountData, ThrowOnError>) => (options?.client ?? client).get<ApiVVersionODataControllerCountResponses, unknown, ThrowOnError>({\n    responseType: 'json',\n    url: '/api/v{api-version}/simple/$count',\n    ...options\n});\n\nexport const getApiVbyApiVersionSimpleOperation = <ThrowOnError extends boolean = false>(options: Options<GetApiVbyApiVersionSimpleOperationData, ThrowOnError>) => (options.client ?? client).get<GetApiVbyApiVersionSimpleOperationResponses, GetApiVbyApiVersionSimpleOperationErrors, ThrowOnError>({\n    responseType: 'json',\n    url: '/api/v{api-version}/simple:operation',\n    ...options\n});\n\nexport const deleteCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<DeleteCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).delete<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const getCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<GetCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).get<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const headCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<HeadCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).head<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const optionsCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<OptionsCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).options<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const patchCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<PatchCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).patch<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const postCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<PostCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).post<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const putCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<PutCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).put<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const deleteFoo = <ThrowOnError extends boolean = false>(options: Options<DeleteFooData3, ThrowOnError>) => (options.client ?? client).delete<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/foo/{foo_param}/bar/{BarParam}', ...options });\n\nexport const callWithDescriptions = <ThrowOnError extends boolean = false>(options?: Options<CallWithDescriptionsData, ThrowOnError>) => (options?.client ?? client).post<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/descriptions', ...options });\n\n/**\n * @deprecated\n */\nexport const deprecatedCall = <ThrowOnError extends boolean = false>(options: Options<DeprecatedCallData, ThrowOnError>) => (options.client ?? client).post<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/parameters/deprecated', ...options });\n\nexport const callWithParameters = <ThrowOnError extends boolean = false>(options: Options<CallWithParametersData, ThrowOnError>) => (options.client ?? client).post<unknown, unknown, ThrowOnError>({\n    url: '/api/v{api-version}/parameters/{parameterPath}',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options.headers\n    }\n});\n\nexport const callWithWeirdParameterNames = <ThrowOnError extends boolean = false>(options: Options<CallWithWeirdParameterNamesData, ThrowOnError>) => (options.client ?? client).post<unknown, unknown, ThrowOnError>({\n    url: '/api/v{api-version}/parameters/{parameter.path.1}/{parameter-path-2}/{PARAMETER-PATH-3}',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options.headers\n    }\n});\n\nexport const getCallWithOptionalParam = <ThrowOnError extends boolean = false>(options: Options<GetCallWithOptionalParamData, ThrowOnError>) => (options.client ?? client).get<unknown, unknown, ThrowOnError>({\n    url: '/api/v{api-version}/parameters',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options.headers\n    }\n});\n\nexport const postCallWithOptionalParam = <ThrowOnError extends boolean = false>(options: Options<PostCallWithOptionalParamData, ThrowOnError>) => (options.client ?? client).post<PostCallWithOptionalParamResponses, unknown, ThrowOnError>({\n    responseType: 'json',\n    url: '/api/v{api-version}/parameters',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options.headers\n    }\n});\n\nexport const postApiVbyApiVersionRequestBody = <ThrowOnError extends boolean = false>(options?: Options<PostApiVbyApiVersionRequestBodyData, ThrowOnError>) => (options?.client ?? client).post<unknown, unknown, ThrowOnError>({\n    url: '/api/v{api-version}/requestBody',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options?.headers\n    }\n});\n\nexport const postApiVbyApiVersionFormData = <ThrowOnError extends boolean = false>(options?: Options<PostApiVbyApiVersionFormDataData, ThrowOnError>) => (options?.client ?? client).post<unknown, unknown, ThrowOnError>({\n    ...formDataBodySerializer,\n    url: '/api/v{api-version}/formData',\n    ...options,\n    headers: {\n        'Content-Type': null,\n        ...options?.headers\n    }\n});\n\nexport const callWithDefaultParameters = <ThrowOnError extends boolean = false>(options?: Options<CallWithDefaultParametersData, ThrowOnError>) => (options?.client ?? client).get<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/defaults', ...options });\n\nexport const callWithDefaultOptionalParameters = <ThrowOnError extends boolean = false>(options?: Options<CallWithDefaultOptionalParametersData, ThrowOnError>) => (options?.client ?? client).post<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/defaults', ...options });\n\nexport const callToTestOrderOfParams = <ThrowOnError extends boolean = false>(options: Options<CallToTestOrderOfParamsData, ThrowOnError>) => (options.client ?? client).put<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/defaults', ...options });\n\nexport const duplicateName = <ThrowOnError extends boolean = false>(options?: Options<DuplicateNameData, ThrowOnError>) => (options?.client ?? client).delete<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/duplicate', ...options });\n\nexport const duplicateName2 = <ThrowOnError extends boolean = false>(options?: Options<DuplicateName2Data, ThrowOnError>) => (options?.client ?? client).get<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/duplicate', ...options });\n\nexport const duplicateName3 = <ThrowOnError extends boolean = false>(options?: Options<DuplicateName3Data, ThrowOnError>) => (options?.client ?? client).post<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/duplicate', ...options });\n\nexport const duplicateName4 = <ThrowOnError extends boolean = false>(options?: Options<DuplicateName4Data, ThrowOnError>) => (options?.client ?? client).put<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/duplicate', ...options });\n\nexport const callWithNoContentResponse = <ThrowOnError extends boolean = false>(options?: Options<CallWithNoContentResponseData, ThrowOnError>) => (options?.client ?? client).get<CallWithNoContentResponseResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/no-content', ...options });\n\nexport const callWithResponseAndNoContentResponse = <ThrowOnError extends boolean = false>(options?: Options<CallWithResponseAndNoContentResponseData, ThrowOnError>) => (options?.client ?? client).get<CallWithResponseAndNoContentResponseResponses, unknown, ThrowOnError>({\n    responseType: 'json',\n    url: '/api/v{api-version}/multiple-tags/response-and-no-content',\n    ...options\n});\n\nexport const dummyA = <ThrowOnError extends boolean = false>(options?: Options<DummyAData, ThrowOnError>) => (options?.client ?? client).get<DummyAResponses, unknown, ThrowOnError>({\n    responseType: 'json',\n    url: '/api/v{api-version}/multiple-tags/a',\n    ...options\n});\n\nexport const dummyB = <ThrowOnError extends boolean = false>(options?: Options<DummyBData, ThrowOnError>) => (options?.client ?? client).get<DummyBResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/multiple-tags/b', ...options });\n\nexport const callWithResponse = <ThrowOnError extends boolean = false>(options?: Options<CallWithResponseData, ThrowOnError>) => (options?.client ?? client).get<CallWithResponseResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/response', ...options });\n\nexport const callWithDuplicateResponses = <ThrowOnError extends boolean = false>(options?: Options<CallWithDuplicateResponsesData, ThrowOnError>) => (options?.client ?? client).post<CallWithDuplicateResponsesResponses, CallWithDuplicateResponsesErrors, ThrowOnError>({\n    responseType: 'json',\n    url: '/api/v{api-version}/response',\n    ...options\n});\n\nexport const callWithResponses = <ThrowOnError extends boolean = false>(options?: Options<CallWithResponsesData, ThrowOnError>) => (options?.client ?? client).put<CallWithResponsesResponses, CallWithResponsesErrors, ThrowOnError>({\n    responseType: 'json',\n    url: '/api/v{api-version}/response',\n    ...options\n});\n\nexport const collectionFormat = <ThrowOnError extends boolean = false>(options: Options<CollectionFormatData, ThrowOnError>) => (options.client ?? client).get<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/collectionFormat', ...options });\n\nexport const types = <ThrowOnError extends boolean = false>(options: Options<TypesData, ThrowOnError>) => (options.client ?? client).get<TypesResponses, unknown, ThrowOnError>({\n    responseType: 'json',\n    url: '/api/v{api-version}/types',\n    ...options\n});\n\nexport const uploadFile = <ThrowOnError extends boolean = false>(options: Options<UploadFileData, ThrowOnError>) => (options.client ?? client).post<UploadFileResponses, unknown, ThrowOnError>({\n    ...urlSearchParamsBodySerializer,\n    responseType: 'json',\n    url: '/api/v{api-version}/upload',\n    ...options,\n    headers: {\n        'Content-Type': 'application/x-www-form-urlencoded',\n        ...options.headers\n    }\n});\n\nexport const fileResponse = <ThrowOnError extends boolean = false>(options: Options<FileResponseData, ThrowOnError>) => (options.client ?? client).get<FileResponseResponses, unknown, ThrowOnError>({\n    responseType: 'blob',\n    url: '/api/v{api-version}/file/{id}',\n    ...options\n});\n\nexport const complexTypes = <ThrowOnError extends boolean = false>(options: Options<ComplexTypesData, ThrowOnError>) => (options.client ?? client).get<ComplexTypesResponses, ComplexTypesErrors, ThrowOnError>({\n    querySerializer: { parameters: { parameterObject: { object: { style: 'form' } } } },\n    responseType: 'json',\n    url: '/api/v{api-version}/complex',\n    ...options\n});\n\nexport const multipartResponse = <ThrowOnError extends boolean = false>(options?: Options<MultipartResponseData, ThrowOnError>) => (options?.client ?? client).get<MultipartResponseResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/multipart', ...options });\n\nexport const multipartRequest = <ThrowOnError extends boolean = false>(options?: Options<MultipartRequestData, ThrowOnError>) => (options?.client ?? client).post<unknown, unknown, ThrowOnError>({\n    ...formDataBodySerializer,\n    url: '/api/v{api-version}/multipart',\n    ...options,\n    headers: {\n        'Content-Type': null,\n        ...options?.headers\n    }\n});\n\nexport const complexParams = <ThrowOnError extends boolean = false>(options: Options<ComplexParamsData, ThrowOnError>) => (options.client ?? client).put<ComplexParamsResponses, unknown, ThrowOnError>({\n    responseType: 'json',\n    url: '/api/v{api-version}/complex/{id}',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json-patch+json',\n        ...options.headers\n    }\n});\n\nexport const callWithResultFromHeader = <ThrowOnError extends boolean = false>(options?: Options<CallWithResultFromHeaderData, ThrowOnError>) => (options?.client ?? client).post<CallWithResultFromHeaderResponses, CallWithResultFromHeaderErrors, ThrowOnError>({ url: '/api/v{api-version}/header', ...options });\n\nexport const testErrorCode = <ThrowOnError extends boolean = false>(options: Options<TestErrorCodeData, ThrowOnError>) => (options.client ?? client).post<TestErrorCodeResponses, TestErrorCodeErrors, ThrowOnError>({ url: '/api/v{api-version}/error', ...options });\n\nexport const nonAsciiæøåÆøÅöôêÊ字符串 = <ThrowOnError extends boolean = false>(options: Options<NonAsciiæøåÆøÅöôêÊ字符串Data, ThrowOnError>) => (options.client ?? client).post<NonAsciiæøåÆøÅöôêÊ字符串Responses, unknown, ThrowOnError>({\n    responseType: 'json',\n    url: '/api/v{api-version}/non-ascii-æøåÆØÅöôêÊ字符串',\n    ...options\n});\n\n/**\n * Login User\n */\nexport const putWithFormUrlEncoded = <ThrowOnError extends boolean = false>(options: Options<PutWithFormUrlEncodedData, ThrowOnError>) => (options.client ?? client).put<unknown, unknown, ThrowOnError>({\n    ...urlSearchParamsBodySerializer,\n    url: '/api/v{api-version}/non-ascii-æøåÆØÅöôêÊ字符串',\n    ...options,\n    headers: {\n        'Content-Type': 'application/x-www-form-urlencoded',\n        ...options.headers\n    }\n});\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/solid-query/axios/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type ClientOptions = {\n    baseURL: 'http://localhost:3000/base' | (string & {});\n};\n\n/**\n * Model with number-only name\n */\nexport type _400 = string;\n\n/**\n * External ref to shared model (A)\n */\nexport type ExternalRefA = ExternalSharedModel;\n\n/**\n * External ref to shared model (B)\n */\nexport type ExternalRefB = ExternalSharedModel;\n\n/**\n * Testing multiline comments in string: First line\n * Second line\n *\n * Fourth line\n */\nexport type CamelCaseCommentWithBreaks = number;\n\n/**\n * Testing multiline comments in string: First line\n * Second line\n *\n * Fourth line\n */\nexport type CommentWithBreaks = number;\n\n/**\n * Testing backticks in string: `backticks` and ```multiple backticks``` should work\n */\nexport type CommentWithBackticks = number;\n\n/**\n * Testing backticks and quotes in string: `backticks`, 'quotes', \"double quotes\" and ```multiple backticks``` should work\n */\nexport type CommentWithBackticksAndQuotes = number;\n\n/**\n * Testing slashes in string: \\backwards\\\\\\ and /forwards/// should work\n */\nexport type CommentWithSlashes = number;\n\n/**\n * Testing expression placeholders in string: ${expression} should work\n */\nexport type CommentWithExpressionPlaceholders = number;\n\n/**\n * Testing quotes in string: 'single quote''' and \"double quotes\"\"\" should work\n */\nexport type CommentWithQuotes = number;\n\n/**\n * Testing reserved characters in string: * inline * and ** inline ** should work\n */\nexport type CommentWithReservedCharacters = number;\n\n/**\n * This is a simple number\n */\nexport type SimpleInteger = number;\n\n/**\n * This is a simple boolean\n */\nexport type SimpleBoolean = boolean;\n\n/**\n * This is a simple string\n */\nexport type SimpleString = string;\n\n/**\n * A string with non-ascii (unicode) characters valid in typescript identifiers (æøåÆØÅöÔèÈ字符串)\n */\nexport type NonAsciiStringæøåÆøÅöôêÊ字符串 = string;\n\n/**\n * This is a simple file\n */\nexport type SimpleFile = Blob | File;\n\n/**\n * This is a simple reference\n */\nexport type SimpleReference = ModelWithString;\n\n/**\n * This is a simple string\n */\nexport type SimpleStringWithPattern = string | null;\n\n/**\n * This is a simple enum with strings\n */\nexport type EnumWithStrings = 'Success' | 'Warning' | 'Error' | '\\'Single Quote\\'' | '\"Double Quotes\"' | 'Non-ascii: øæåôöØÆÅÔÖ字符串';\n\nexport type EnumWithReplacedCharacters = '\\'Single Quote\\'' | '\"Double Quotes\"' | 'øæåôöØÆÅÔÖ字符串' | 3.1 | '';\n\n/**\n * This is a simple enum with numbers\n */\nexport type EnumWithNumbers = 1 | 2 | 3 | 1.1 | 1.2 | 1.3 | 100 | 200 | 300 | -100 | -200 | -300 | -1.1 | -1.2 | -1.3;\n\n/**\n * Success=1,Warning=2,Error=3\n */\nexport type EnumFromDescription = number;\n\n/**\n * This is a simple enum with numbers\n */\nexport type EnumWithExtensions = 200 | 400 | 500;\n\nexport type EnumWithXEnumNames = 0 | 1 | 2;\n\n/**\n * This is a simple array with numbers\n */\nexport type ArrayWithNumbers = Array<number>;\n\n/**\n * This is a simple array with booleans\n */\nexport type ArrayWithBooleans = Array<boolean>;\n\n/**\n * This is a simple array with strings\n */\nexport type ArrayWithStrings = Array<string>;\n\n/**\n * This is a simple array with references\n */\nexport type ArrayWithReferences = Array<ModelWithString>;\n\n/**\n * This is a simple array containing an array\n */\nexport type ArrayWithArray = Array<Array<ModelWithString>>;\n\n/**\n * This is a simple array with properties\n */\nexport type ArrayWithProperties = Array<{\n    '16x16'?: CamelCaseCommentWithBreaks;\n    bar?: string;\n}>;\n\n/**\n * This is a simple array with any of properties\n */\nexport type ArrayWithAnyOfProperties = Array<{\n    foo?: string;\n} | {\n    bar?: string;\n}>;\n\nexport type AnyOfAnyAndNull = {\n    data?: unknown | null;\n};\n\n/**\n * This is a simple array with any of properties\n */\nexport type AnyOfArrays = {\n    results?: Array<{\n        foo?: string;\n    } | {\n        bar?: string;\n    }>;\n};\n\n/**\n * This is a string dictionary\n */\nexport type DictionaryWithString = {\n    [key: string]: string;\n};\n\nexport type DictionaryWithPropertiesAndAdditionalProperties = {\n    foo?: number;\n    bar?: boolean;\n    [key: string]: string | number | boolean | undefined;\n};\n\n/**\n * This is a string reference\n */\nexport type DictionaryWithReference = {\n    [key: string]: ModelWithString;\n};\n\n/**\n * This is a complex dictionary\n */\nexport type DictionaryWithArray = {\n    [key: string]: Array<ModelWithString>;\n};\n\n/**\n * This is a string dictionary\n */\nexport type DictionaryWithDictionary = {\n    [key: string]: {\n        [key: string]: string;\n    };\n};\n\n/**\n * This is a complex dictionary\n */\nexport type DictionaryWithProperties = {\n    [key: string]: {\n        foo?: string;\n        bar?: string;\n    };\n};\n\n/**\n * This is a model with one number property\n */\nexport type ModelWithInteger = {\n    /**\n     * This is a simple number property\n     */\n    prop?: number;\n};\n\n/**\n * This is a model with one boolean property\n */\nexport type ModelWithBoolean = {\n    /**\n     * This is a simple boolean property\n     */\n    prop?: boolean;\n};\n\n/**\n * This is a model with one string property\n */\nexport type ModelWithString = {\n    /**\n     * This is a simple string property\n     */\n    prop?: string;\n};\n\n/**\n * This is a model with one string property\n */\nexport type ModelWithStringError = {\n    /**\n     * This is a simple string property\n     */\n    prop?: string;\n};\n\n/**\n * `Comment` or `VoiceComment`. The JSON object for adding voice comments to tickets is different. See [Adding voice comments to tickets](/documentation/ticketing/managing-tickets/adding-voice-comments-to-tickets)\n */\nexport type ModelFromZendesk = string;\n\n/**\n * This is a model with one string property\n */\nexport type ModelWithNullableString = {\n    /**\n     * This is a simple string property\n     */\n    nullableProp1?: string | null;\n    /**\n     * This is a simple string property\n     */\n    nullableRequiredProp1: string | null;\n    /**\n     * This is a simple string property\n     */\n    nullableProp2?: string | null;\n    /**\n     * This is a simple string property\n     */\n    nullableRequiredProp2: string | null;\n    /**\n     * This is a simple enum with strings\n     */\n    'foo_bar-enum'?: 'Success' | 'Warning' | 'Error' | 'ØÆÅ字符串';\n};\n\n/**\n * This is a model with one enum\n */\nexport type ModelWithEnum = {\n    /**\n     * This is a simple enum with strings\n     */\n    'foo_bar-enum'?: 'Success' | 'Warning' | 'Error' | 'ØÆÅ字符串';\n    /**\n     * These are the HTTP error code enums\n     */\n    statusCode?: '100' | '200 FOO' | '300 FOO_BAR' | '400 foo-bar' | '500 foo.bar' | '600 foo&bar';\n    /**\n     * Simple boolean enum\n     */\n    bool?: true;\n};\n\n/**\n * This is a model with one enum with escaped name\n */\nexport type ModelWithEnumWithHyphen = {\n    /**\n     * Foo-Bar-Baz-Qux\n     */\n    'foo-bar-baz-qux'?: '3.0';\n};\n\n/**\n * This is a model with one enum\n */\nexport type ModelWithEnumFromDescription = {\n    /**\n     * Success=1,Warning=2,Error=3\n     */\n    test?: number;\n};\n\n/**\n * This is a model with nested enums\n */\nexport type ModelWithNestedEnums = {\n    dictionaryWithEnum?: {\n        [key: string]: 'Success' | 'Warning' | 'Error';\n    };\n    dictionaryWithEnumFromDescription?: {\n        [key: string]: number;\n    };\n    arrayWithEnum?: Array<'Success' | 'Warning' | 'Error'>;\n    arrayWithDescription?: Array<number>;\n    /**\n     * This is a simple enum with strings\n     */\n    'foo_bar-enum'?: 'Success' | 'Warning' | 'Error' | 'ØÆÅ字符串';\n};\n\n/**\n * This is a model with one property containing a reference\n */\nexport type ModelWithReference = {\n    prop?: ModelWithProperties;\n};\n\n/**\n * This is a model with one property containing an array\n */\nexport type ModelWithArrayReadOnlyAndWriteOnly = {\n    prop?: Array<ModelWithReadOnlyAndWriteOnly>;\n    propWithFile?: Array<Blob | File>;\n    propWithNumber?: Array<number>;\n};\n\n/**\n * This is a model with one property containing an array\n */\nexport type ModelWithArray = {\n    prop?: Array<ModelWithString>;\n    propWithFile?: Array<Blob | File>;\n    propWithNumber?: Array<number>;\n};\n\n/**\n * This is a model with one property containing a dictionary\n */\nexport type ModelWithDictionary = {\n    prop?: {\n        [key: string]: string;\n    };\n};\n\n/**\n * This is a deprecated model with a deprecated property\n *\n * @deprecated\n */\nexport type DeprecatedModel = {\n    /**\n     * This is a deprecated property\n     *\n     * @deprecated\n     */\n    prop?: string;\n};\n\n/**\n * This is a model with one property containing a circular reference\n */\nexport type ModelWithCircularReference = {\n    prop?: ModelWithCircularReference;\n};\n\n/**\n * This is a model with one property with a 'one of' relationship\n */\nexport type CompositionWithOneOf = {\n    propA?: ModelWithString | ModelWithEnum | ModelWithArray | ModelWithDictionary;\n};\n\n/**\n * This is a model with one property with a 'one of' relationship where the options are not $ref\n */\nexport type CompositionWithOneOfAnonymous = {\n    propA?: {\n        propA?: string;\n    } | string | number;\n};\n\n/**\n * Circle\n */\nexport type ModelCircle = {\n    kind: string;\n    radius?: number;\n};\n\n/**\n * Square\n */\nexport type ModelSquare = {\n    kind: string;\n    sideLength?: number;\n};\n\n/**\n * This is a model with one property with a 'one of' relationship where the options are not $ref\n */\nexport type CompositionWithOneOfDiscriminator = ({\n    kind: 'circle';\n} & ModelCircle) | ({\n    kind: 'square';\n} & ModelSquare);\n\n/**\n * This is a model with one property with a 'any of' relationship\n */\nexport type CompositionWithAnyOf = {\n    propA?: ModelWithString | ModelWithEnum | ModelWithArray | ModelWithDictionary;\n};\n\n/**\n * This is a model with one property with a 'any of' relationship where the options are not $ref\n */\nexport type CompositionWithAnyOfAnonymous = {\n    propA?: {\n        propA?: string;\n    } | string | number;\n};\n\n/**\n * This is a model with nested 'any of' property with a type null\n */\nexport type CompositionWithNestedAnyAndTypeNull = {\n    propA?: Array<ModelWithDictionary | null> | Array<ModelWithArray | null>;\n};\n\nexport type _3eNum1Период = 'Bird' | 'Dog';\n\nexport type ConstValue = 'ConstValue';\n\n/**\n * This is a model with one property with a 'any of' relationship where the options are not $ref\n */\nexport type CompositionWithNestedAnyOfAndNull = {\n    /**\n     * Scopes\n     */\n    propA?: Array<_3eNum1Период | ConstValue> | null;\n};\n\n/**\n * This is a model with one property with a 'one of' relationship\n */\nexport type CompositionWithOneOfAndNullable = {\n    propA?: {\n        boolean?: boolean;\n    } | ModelWithEnum | ModelWithArray | ModelWithDictionary | null;\n};\n\n/**\n * This is a model that contains a simple dictionary within composition\n */\nexport type CompositionWithOneOfAndSimpleDictionary = {\n    propA?: boolean | {\n        [key: string]: number;\n    };\n};\n\n/**\n * This is a model that contains a dictionary of simple arrays within composition\n */\nexport type CompositionWithOneOfAndSimpleArrayDictionary = {\n    propA?: boolean | {\n        [key: string]: Array<boolean>;\n    };\n};\n\n/**\n * This is a model that contains a dictionary of complex arrays (composited) within composition\n */\nexport type CompositionWithOneOfAndComplexArrayDictionary = {\n    propA?: boolean | {\n        [key: string]: Array<number | string>;\n    };\n};\n\n/**\n * This is a model with one property with a 'all of' relationship\n */\nexport type CompositionWithAllOfAndNullable = {\n    propA?: ({\n        boolean?: boolean;\n    } & ModelWithEnum & ModelWithArray & ModelWithDictionary) | null;\n};\n\n/**\n * This is a model with one property with a 'any of' relationship\n */\nexport type CompositionWithAnyOfAndNullable = {\n    propA?: {\n        boolean?: boolean;\n    } | ModelWithEnum | ModelWithArray | ModelWithDictionary | null;\n};\n\n/**\n * This is a base model with two simple optional properties\n */\nexport type CompositionBaseModel = {\n    firstName?: string;\n    lastname?: string;\n};\n\n/**\n * This is a model that extends the base model\n */\nexport type CompositionExtendedModel = CompositionBaseModel & {\n    age: number;\n    firstName: string;\n    lastname: string;\n};\n\n/**\n * This is a model with one nested property\n */\nexport type ModelWithProperties = {\n    required: string;\n    readonly requiredAndReadOnly: string;\n    requiredAndNullable: string | null;\n    string?: string;\n    number?: number;\n    boolean?: boolean;\n    reference?: ModelWithString;\n    'property with space'?: string;\n    default?: string;\n    try?: string;\n    readonly '@namespace.string'?: string;\n    readonly '@namespace.integer'?: number;\n};\n\n/**\n * This is a model with one nested property\n */\nexport type ModelWithNestedProperties = {\n    readonly first: {\n        readonly second: {\n            readonly third: string | null;\n        } | null;\n    } | null;\n};\n\n/**\n * This is a model with duplicated properties\n */\nexport type ModelWithDuplicateProperties = {\n    prop?: ModelWithString;\n};\n\n/**\n * This is a model with ordered properties\n */\nexport type ModelWithOrderedProperties = {\n    zebra?: string;\n    apple?: string;\n    hawaii?: string;\n};\n\n/**\n * This is a model with duplicated imports\n */\nexport type ModelWithDuplicateImports = {\n    propA?: ModelWithString;\n    propB?: ModelWithString;\n    propC?: ModelWithString;\n};\n\n/**\n * This is a model that extends another model\n */\nexport type ModelThatExtends = ModelWithString & {\n    propExtendsA?: string;\n    propExtendsB?: ModelWithString;\n};\n\n/**\n * This is a model that extends another model\n */\nexport type ModelThatExtendsExtends = ModelWithString & ModelThatExtends & {\n    propExtendsC?: string;\n    propExtendsD?: ModelWithString;\n};\n\n/**\n * This is a model that contains a some patterns\n */\nexport type ModelWithPattern = {\n    key: string;\n    name: string;\n    readonly enabled?: boolean;\n    readonly modified?: string;\n    id?: string;\n    text?: string;\n    patternWithSingleQuotes?: string;\n    patternWithNewline?: string;\n    patternWithBacktick?: string;\n    patternWithUnicode?: string;\n};\n\nexport type File = {\n    /**\n     * Id\n     */\n    readonly id?: string;\n    /**\n     * Updated at\n     */\n    readonly updated_at?: string;\n    /**\n     * Created at\n     */\n    readonly created_at?: string;\n    /**\n     * Mime\n     */\n    mime: string;\n    /**\n     * File\n     */\n    readonly file?: string;\n};\n\nexport type Default = {\n    name?: string;\n};\n\nexport type Pageable = {\n    page?: number;\n    size?: number;\n    sort?: Array<string>;\n};\n\n/**\n * This is a free-form object without additionalProperties.\n */\nexport type FreeFormObjectWithoutAdditionalProperties = {\n    [key: string]: unknown;\n};\n\n/**\n * This is a free-form object with additionalProperties: true.\n */\nexport type FreeFormObjectWithAdditionalPropertiesEqTrue = {\n    [key: string]: unknown;\n};\n\n/**\n * This is a free-form object with additionalProperties: {}.\n */\nexport type FreeFormObjectWithAdditionalPropertiesEqEmptyObject = {\n    [key: string]: unknown;\n};\n\nexport type ModelWithConst = {\n    String?: 'String';\n    number?: 0;\n    null?: null;\n    withType?: 'Some string';\n};\n\n/**\n * This is a model with one property and additionalProperties: true\n */\nexport type ModelWithAdditionalPropertiesEqTrue = {\n    /**\n     * This is a simple string property\n     */\n    prop?: string;\n    [key: string]: unknown;\n};\n\nexport type NestedAnyOfArraysNullable = {\n    nullableArray?: Array<string | boolean> | null;\n};\n\nexport type CompositionWithOneOfAndProperties = ({\n    foo: SimpleParameter;\n} | {\n    bar: NonAsciiStringæøåÆøÅöôêÊ字符串;\n}) & {\n    baz: number | null;\n    qux: number;\n};\n\n/**\n * An object that can be null\n */\nexport type NullableObject = {\n    foo?: string;\n} | null;\n\n/**\n * Some % character\n */\nexport type CharactersInDescription = string;\n\nexport type ModelWithNullableObject = {\n    data?: NullableObject;\n};\n\n/**\n * An object with additional properties that can be null (anyOf ref + null)\n */\nexport type ModelWithAdditionalPropertiesRef = {\n    [key: string]: NullableObject | null;\n};\n\nexport type ModelWithOneOfEnum = {\n    foo: 'Bar';\n} | {\n    foo: 'Baz';\n} | {\n    foo: 'Qux';\n} | {\n    content: string;\n    foo: 'Quux';\n} | {\n    content: [\n        string,\n        string\n    ];\n    foo: 'Corge';\n};\n\nexport type ModelWithNestedArrayEnumsDataFoo = 'foo' | 'bar';\n\nexport type ModelWithNestedArrayEnumsDataBar = 'baz' | 'qux';\n\nexport type ModelWithNestedArrayEnumsData = {\n    foo?: Array<ModelWithNestedArrayEnumsDataFoo>;\n    bar?: Array<ModelWithNestedArrayEnumsDataBar>;\n};\n\nexport type ModelWithNestedArrayEnums = {\n    array_strings?: Array<string>;\n    data?: ModelWithNestedArrayEnumsData;\n};\n\nexport type ModelWithNestedCompositionEnums = {\n    foo?: ModelWithNestedArrayEnumsDataFoo;\n};\n\nexport type ModelWithReadOnlyAndWriteOnly = {\n    foo: string;\n    readonly bar: string;\n};\n\nexport type ModelWithConstantSizeArray = [\n    number,\n    number\n];\n\nexport type ModelWithAnyOfConstantSizeArray = [\n    number | string,\n    number | string,\n    number | string\n];\n\nexport type ModelWithPrefixItemsConstantSizeArray = [\n    ModelWithInteger,\n    number | string,\n    string\n];\n\nexport type ModelWithAnyOfConstantSizeArrayNullable = [\n    number | null | string,\n    number | null | string,\n    number | null | string\n];\n\nexport type ModelWithAnyOfConstantSizeArrayWithNSizeAndOptions = [\n    number | Import,\n    number | Import\n];\n\nexport type ModelWithAnyOfConstantSizeArrayAndIntersect = [\n    number & string,\n    number & string\n];\n\nexport type ModelWithNumericEnumUnion = {\n    /**\n     * Период\n     */\n    value?: -10 | -1 | 0 | 1 | 3 | 6 | 12;\n};\n\n/**\n * Some description with `back ticks`\n */\nexport type ModelWithBackticksInDescription = {\n    /**\n     * The template `that` should be used for parsing and importing the contents of the CSV file.\n     *\n     * <br/><p>There is one placeholder currently supported:<ul>     <li><b>${x}</b> - refers to the n-th column in the CSV file, e.g. ${1}, ${2}, ...)</li></ul><p>Example of a correct JSON template:</p>\n     * <pre>\n     * [\n     * {\n     * \"resourceType\": \"Asset\",\n     * \"identifier\": {\n     * \"name\": \"${1}\",\n     * \"domain\": {\n     * \"name\": \"${2}\",\n     * \"community\": {\n     * \"name\": \"Some Community\"\n     * }\n     * }\n     * },\n     * \"attributes\" : {\n     * \"00000000-0000-0000-0000-000000003115\" : [ {\n     * \"value\" : \"${3}\"\n     * } ],\n     * \"00000000-0000-0000-0000-000000000222\" : [ {\n     * \"value\" : \"${4}\"\n     * } ]\n     * }\n     * }\n     * ]\n     * </pre>\n     */\n    template?: string;\n};\n\nexport type ModelWithOneOfAndProperties = (SimpleParameter | NonAsciiStringæøåÆøÅöôêÊ字符串) & {\n    baz: number | null;\n    qux: number;\n};\n\n/**\n * Model used to test deduplication strategy (unused)\n */\nexport type ParameterSimpleParameterUnused = string;\n\n/**\n * Model used to test deduplication strategy\n */\nexport type PostServiceWithEmptyTagResponse = string;\n\n/**\n * Model used to test deduplication strategy\n */\nexport type PostServiceWithEmptyTagResponse2 = string;\n\n/**\n * Model used to test deduplication strategy\n */\nexport type DeleteFooData = string;\n\n/**\n * Model used to test deduplication strategy\n */\nexport type DeleteFooData2 = string;\n\n/**\n * Model with restricted keyword name\n */\nexport type Import = string;\n\nexport type SchemaWithFormRestrictedKeys = {\n    description?: string;\n    'x-enum-descriptions'?: string;\n    'x-enum-varnames'?: string;\n    'x-enumNames'?: string;\n    title?: string;\n    object?: {\n        description?: string;\n        'x-enum-descriptions'?: string;\n        'x-enum-varnames'?: string;\n        'x-enumNames'?: string;\n        title?: string;\n    };\n    array?: Array<{\n        description?: string;\n        'x-enum-descriptions'?: string;\n        'x-enum-varnames'?: string;\n        'x-enumNames'?: string;\n        title?: string;\n    }>;\n};\n\n/**\n * This schema was giving PascalCase transformations a hard time\n */\nexport type IoK8sApimachineryPkgApisMetaV1DeleteOptions = {\n    /**\n     * Must be fulfilled before a deletion is carried out. If not possible, a 409 Conflict status will be returned.\n     */\n    preconditions?: IoK8sApimachineryPkgApisMetaV1Preconditions;\n};\n\n/**\n * This schema was giving PascalCase transformations a hard time\n */\nexport type IoK8sApimachineryPkgApisMetaV1Preconditions = {\n    /**\n     * Specifies the target ResourceVersion\n     */\n    resourceVersion?: string;\n    /**\n     * Specifies the target UID.\n     */\n    uid?: string;\n};\n\nexport type AdditionalPropertiesUnknownIssue = {\n    [key: string]: string | number;\n};\n\nexport type AdditionalPropertiesUnknownIssue2 = {\n    [key: string]: string | number;\n};\n\nexport type AdditionalPropertiesUnknownIssue3 = string & {\n    entries: {\n        [key: string]: AdditionalPropertiesUnknownIssue;\n    };\n};\n\nexport type AdditionalPropertiesIntegerIssue = {\n    value: number;\n    [key: string]: number;\n};\n\nexport type OneOfAllOfIssue = ((ConstValue | GenericSchemaDuplicateIssue1SystemBoolean) & _3eNum1Период) | GenericSchemaDuplicateIssue1SystemString;\n\nexport type GenericSchemaDuplicateIssue1SystemBoolean = {\n    item?: boolean;\n    error?: string | null;\n    readonly hasError?: boolean;\n    data?: {\n        [key: string]: never;\n    };\n};\n\nexport type GenericSchemaDuplicateIssue1SystemString = {\n    item?: string | null;\n    error?: string | null;\n    readonly hasError?: boolean;\n};\n\nexport type ExternalSharedModel = {\n    id: string;\n    name?: string;\n};\n\n/**\n * This is a model with one property containing a reference\n */\nexport type ModelWithReferenceWritable = {\n    prop?: ModelWithPropertiesWritable;\n};\n\n/**\n * This is a model with one property containing an array\n */\nexport type ModelWithArrayReadOnlyAndWriteOnlyWritable = {\n    prop?: Array<ModelWithReadOnlyAndWriteOnlyWritable>;\n    propWithFile?: Array<Blob | File>;\n    propWithNumber?: Array<number>;\n};\n\n/**\n * This is a model with one nested property\n */\nexport type ModelWithPropertiesWritable = {\n    required: string;\n    requiredAndNullable: string | null;\n    string?: string;\n    number?: number;\n    boolean?: boolean;\n    reference?: ModelWithString;\n    'property with space'?: string;\n    default?: string;\n    try?: string;\n};\n\n/**\n * This is a model that contains a some patterns\n */\nexport type ModelWithPatternWritable = {\n    key: string;\n    name: string;\n    id?: string;\n    text?: string;\n    patternWithSingleQuotes?: string;\n    patternWithNewline?: string;\n    patternWithBacktick?: string;\n    patternWithUnicode?: string;\n};\n\nexport type FileWritable = {\n    /**\n     * Mime\n     */\n    mime: string;\n};\n\nexport type ModelWithReadOnlyAndWriteOnlyWritable = {\n    foo: string;\n    baz: string;\n};\n\nexport type ModelWithAnyOfConstantSizeArrayWithNSizeAndOptionsWritable = [\n    number | Import,\n    number | Import\n];\n\nexport type AdditionalPropertiesUnknownIssueWritable = {\n    [key: string]: string | number;\n};\n\nexport type OneOfAllOfIssueWritable = ((ConstValue | GenericSchemaDuplicateIssue1SystemBoolean) & _3eNum1Период) | GenericSchemaDuplicateIssue1SystemString;\n\nexport type GenericSchemaDuplicateIssue1SystemBooleanWritable = {\n    item?: boolean;\n    error?: string | null;\n    data?: {\n        [key: string]: never;\n    };\n};\n\nexport type GenericSchemaDuplicateIssue1SystemStringWritable = {\n    item?: string | null;\n    error?: string | null;\n};\n\n/**\n * This is a reusable parameter\n */\nexport type SimpleParameter = string;\n\n/**\n * Parameter with illegal characters\n */\nexport type XFooBar = ModelWithString;\n\n/**\n * A reusable request body\n */\nexport type SimpleRequestBody = ModelWithString;\n\n/**\n * A reusable request body\n */\nexport type SimpleFormData = ModelWithString;\n\nexport type ExportData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no+tag';\n};\n\nexport type PatchApiVbyApiVersionNoTagData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no+tag';\n};\n\nexport type PatchApiVbyApiVersionNoTagResponses = {\n    /**\n     * OK\n     */\n    default: unknown;\n};\n\nexport type ImportData = {\n    body: ModelWithReadOnlyAndWriteOnlyWritable | ModelWithArrayReadOnlyAndWriteOnlyWritable;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no+tag';\n};\n\nexport type ImportResponses = {\n    /**\n     * Success\n     */\n    200: ModelFromZendesk;\n    /**\n     * Default success response\n     */\n    default: ModelWithReadOnlyAndWriteOnly;\n};\n\nexport type ImportResponse = ImportResponses[keyof ImportResponses];\n\nexport type FooWowData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no+tag';\n};\n\nexport type FooWowResponses = {\n    /**\n     * OK\n     */\n    default: unknown;\n};\n\nexport type ApiVVersionODataControllerCountData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple/$count';\n};\n\nexport type ApiVVersionODataControllerCountResponses = {\n    /**\n     * Success\n     */\n    200: ModelFromZendesk;\n};\n\nexport type ApiVVersionODataControllerCountResponse = ApiVVersionODataControllerCountResponses[keyof ApiVVersionODataControllerCountResponses];\n\nexport type GetApiVbyApiVersionSimpleOperationData = {\n    body?: never;\n    path: {\n        /**\n         * foo in method\n         */\n        foo_param: string;\n    };\n    query?: never;\n    url: '/api/v{api-version}/simple:operation';\n};\n\nexport type GetApiVbyApiVersionSimpleOperationErrors = {\n    /**\n     * Default error response\n     */\n    default: ModelWithBoolean;\n};\n\nexport type GetApiVbyApiVersionSimpleOperationError = GetApiVbyApiVersionSimpleOperationErrors[keyof GetApiVbyApiVersionSimpleOperationErrors];\n\nexport type GetApiVbyApiVersionSimpleOperationResponses = {\n    /**\n     * Response is a simple number\n     */\n    200: number;\n};\n\nexport type GetApiVbyApiVersionSimpleOperationResponse = GetApiVbyApiVersionSimpleOperationResponses[keyof GetApiVbyApiVersionSimpleOperationResponses];\n\nexport type DeleteCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type GetCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type HeadCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type OptionsCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type PatchCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type PostCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type PutCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type DeleteFooData3 = {\n    body?: never;\n    headers: {\n        /**\n         * Parameter with illegal characters\n         */\n        'x-Foo-Bar': ModelWithString;\n    };\n    path: {\n        /**\n         * foo in method\n         */\n        foo_param: string;\n        /**\n         * bar in method\n         */\n        BarParam: string;\n    };\n    query?: never;\n    url: '/api/v{api-version}/foo/{foo_param}/bar/{BarParam}';\n};\n\nexport type CallWithDescriptionsData = {\n    body?: never;\n    path?: never;\n    query?: {\n        /**\n         * Testing multiline comments in string: First line\n         * Second line\n         *\n         * Fourth line\n         */\n        parameterWithBreaks?: string;\n        /**\n         * Testing backticks in string: `backticks` and ```multiple backticks``` should work\n         */\n        parameterWithBackticks?: string;\n        /**\n         * Testing slashes in string: \\backwards\\\\\\ and /forwards/// should work\n         */\n        parameterWithSlashes?: string;\n        /**\n         * Testing expression placeholders in string: ${expression} should work\n         */\n        parameterWithExpressionPlaceholders?: string;\n        /**\n         * Testing quotes in string: 'single quote''' and \"double quotes\"\"\" should work\n         */\n        parameterWithQuotes?: string;\n        /**\n         * Testing reserved characters in string: * inline * and ** inline ** should work\n         */\n        parameterWithReservedCharacters?: string;\n    };\n    url: '/api/v{api-version}/descriptions';\n};\n\nexport type DeprecatedCallData = {\n    body?: never;\n    headers: {\n        /**\n         * This parameter is deprecated\n         *\n         * @deprecated\n         */\n        parameter: DeprecatedModel | null;\n    };\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/parameters/deprecated';\n};\n\nexport type CallWithParametersData = {\n    /**\n     * This is the parameter that goes into the body\n     */\n    body: {\n        [key: string]: unknown;\n    } | null;\n    headers: {\n        /**\n         * This is the parameter that goes into the header\n         */\n        parameterHeader: string | null;\n    };\n    path: {\n        /**\n         * This is the parameter that goes into the path\n         */\n        parameterPath: string | null;\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string | null;\n    };\n    query: {\n        foo_ref_enum?: ModelWithNestedArrayEnumsDataFoo;\n        foo_all_of_enum: ModelWithNestedArrayEnumsDataFoo;\n        /**\n         * This is the parameter that goes into the query params\n         */\n        cursor: string | null;\n    };\n    url: '/api/v{api-version}/parameters/{parameterPath}';\n};\n\nexport type CallWithWeirdParameterNamesData = {\n    /**\n     * This is the parameter that goes into the body\n     */\n    body: ModelWithString | null;\n    headers: {\n        /**\n         * This is the parameter that goes into the request header\n         */\n        'parameter.header': string | null;\n    };\n    path: {\n        /**\n         * This is the parameter that goes into the path\n         */\n        'parameter.path.1'?: string;\n        /**\n         * This is the parameter that goes into the path\n         */\n        'parameter-path-2'?: string;\n        /**\n         * This is the parameter that goes into the path\n         */\n        'PARAMETER-PATH-3'?: string;\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string | null;\n    };\n    query: {\n        /**\n         * This is the parameter with a reserved keyword\n         */\n        default?: string;\n        /**\n         * This is the parameter that goes into the request query params\n         */\n        'parameter-query': string | null;\n    };\n    url: '/api/v{api-version}/parameters/{parameter.path.1}/{parameter-path-2}/{PARAMETER-PATH-3}';\n};\n\nexport type GetCallWithOptionalParamData = {\n    /**\n     * This is a required parameter\n     */\n    body: ModelWithOneOfEnum;\n    path?: never;\n    query?: {\n        /**\n         * This is an optional parameter\n         */\n        page?: number;\n    };\n    url: '/api/v{api-version}/parameters';\n};\n\nexport type PostCallWithOptionalParamData = {\n    /**\n     * This is an optional parameter\n     */\n    body?: {\n        offset?: number | null;\n    };\n    path?: never;\n    query: {\n        /**\n         * This is a required parameter\n         */\n        parameter: Pageable;\n    };\n    url: '/api/v{api-version}/parameters';\n};\n\nexport type PostCallWithOptionalParamResponses = {\n    /**\n     * Response is a simple number\n     */\n    200: number;\n    /**\n     * Success\n     */\n    204: void;\n};\n\nexport type PostCallWithOptionalParamResponse = PostCallWithOptionalParamResponses[keyof PostCallWithOptionalParamResponses];\n\nexport type PostApiVbyApiVersionRequestBodyData = {\n    /**\n     * A reusable request body\n     */\n    body?: SimpleRequestBody;\n    path?: never;\n    query?: {\n        /**\n         * This is a reusable parameter\n         */\n        parameter?: string;\n    };\n    url: '/api/v{api-version}/requestBody';\n};\n\nexport type PostApiVbyApiVersionFormDataData = {\n    /**\n     * A reusable request body\n     */\n    body?: SimpleFormData;\n    path?: never;\n    query?: {\n        /**\n         * This is a reusable parameter\n         */\n        parameter?: string;\n    };\n    url: '/api/v{api-version}/formData';\n};\n\nexport type CallWithDefaultParametersData = {\n    body?: never;\n    path?: never;\n    query?: {\n        /**\n         * This is a simple string with default value\n         */\n        parameterString?: string | null;\n        /**\n         * This is a simple number with default value\n         */\n        parameterNumber?: number | null;\n        /**\n         * This is a simple boolean with default value\n         */\n        parameterBoolean?: boolean | null;\n        /**\n         * This is a simple enum with default value\n         */\n        parameterEnum?: 'Success' | 'Warning' | 'Error';\n        /**\n         * This is a simple model with default value\n         */\n        parameterModel?: ModelWithString | null;\n    };\n    url: '/api/v{api-version}/defaults';\n};\n\nexport type CallWithDefaultOptionalParametersData = {\n    body?: never;\n    path?: never;\n    query?: {\n        /**\n         * This is a simple string that is optional with default value\n         */\n        parameterString?: string;\n        /**\n         * This is a simple number that is optional with default value\n         */\n        parameterNumber?: number;\n        /**\n         * This is a simple boolean that is optional with default value\n         */\n        parameterBoolean?: boolean;\n        /**\n         * This is a simple enum that is optional with default value\n         */\n        parameterEnum?: 'Success' | 'Warning' | 'Error';\n        /**\n         * This is a simple model that is optional with default value\n         */\n        parameterModel?: ModelWithString;\n    };\n    url: '/api/v{api-version}/defaults';\n};\n\nexport type CallToTestOrderOfParamsData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * This is a optional string with default\n         */\n        parameterOptionalStringWithDefault?: string;\n        /**\n         * This is a optional string with empty default\n         */\n        parameterOptionalStringWithEmptyDefault?: string;\n        /**\n         * This is a optional string with no default\n         */\n        parameterOptionalStringWithNoDefault?: string;\n        /**\n         * This is a string with default\n         */\n        parameterStringWithDefault: string;\n        /**\n         * This is a string with empty default\n         */\n        parameterStringWithEmptyDefault: string;\n        /**\n         * This is a string with no default\n         */\n        parameterStringWithNoDefault: string;\n        /**\n         * This is a string that can be null with no default\n         */\n        parameterStringNullableWithNoDefault?: string | null;\n        /**\n         * This is a string that can be null with default\n         */\n        parameterStringNullableWithDefault?: string | null;\n    };\n    url: '/api/v{api-version}/defaults';\n};\n\nexport type DuplicateNameData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/duplicate';\n};\n\nexport type DuplicateName2Data = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/duplicate';\n};\n\nexport type DuplicateName3Data = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/duplicate';\n};\n\nexport type DuplicateName4Data = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/duplicate';\n};\n\nexport type CallWithNoContentResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no-content';\n};\n\nexport type CallWithNoContentResponseResponses = {\n    /**\n     * Success\n     */\n    204: void;\n};\n\nexport type CallWithNoContentResponseResponse = CallWithNoContentResponseResponses[keyof CallWithNoContentResponseResponses];\n\nexport type CallWithResponseAndNoContentResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multiple-tags/response-and-no-content';\n};\n\nexport type CallWithResponseAndNoContentResponseResponses = {\n    /**\n     * Response is a simple number\n     */\n    200: number;\n    /**\n     * Success\n     */\n    204: void;\n};\n\nexport type CallWithResponseAndNoContentResponseResponse = CallWithResponseAndNoContentResponseResponses[keyof CallWithResponseAndNoContentResponseResponses];\n\nexport type DummyAData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multiple-tags/a';\n};\n\nexport type DummyAResponses = {\n    200: _400;\n};\n\nexport type DummyAResponse = DummyAResponses[keyof DummyAResponses];\n\nexport type DummyBData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multiple-tags/b';\n};\n\nexport type DummyBResponses = {\n    /**\n     * Success\n     */\n    204: void;\n};\n\nexport type DummyBResponse = DummyBResponses[keyof DummyBResponses];\n\nexport type CallWithResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/response';\n};\n\nexport type CallWithResponseResponses = {\n    default: Import;\n};\n\nexport type CallWithResponseResponse = CallWithResponseResponses[keyof CallWithResponseResponses];\n\nexport type CallWithDuplicateResponsesData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/response';\n};\n\nexport type CallWithDuplicateResponsesErrors = {\n    /**\n     * Message for 500 error\n     */\n    500: ModelWithStringError;\n    /**\n     * Message for 501 error\n     */\n    501: ModelWithStringError;\n    /**\n     * Message for 502 error\n     */\n    502: ModelWithStringError;\n    /**\n     * Message for 4XX errors\n     */\n    '4XX': DictionaryWithArray;\n    /**\n     * Default error response\n     */\n    default: ModelWithBoolean;\n};\n\nexport type CallWithDuplicateResponsesError = CallWithDuplicateResponsesErrors[keyof CallWithDuplicateResponsesErrors];\n\nexport type CallWithDuplicateResponsesResponses = {\n    /**\n     * Message for 200 response\n     */\n    200: ModelWithBoolean & ModelWithInteger;\n    /**\n     * Message for 201 response\n     */\n    201: ModelWithString;\n    /**\n     * Message for 202 response\n     */\n    202: ModelWithString;\n};\n\nexport type CallWithDuplicateResponsesResponse = CallWithDuplicateResponsesResponses[keyof CallWithDuplicateResponsesResponses];\n\nexport type CallWithResponsesData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/response';\n};\n\nexport type CallWithResponsesErrors = {\n    /**\n     * Message for 500 error\n     */\n    500: ModelWithStringError;\n    /**\n     * Message for 501 error\n     */\n    501: ModelWithStringError;\n    /**\n     * Message for 502 error\n     */\n    502: ModelWithStringError;\n    /**\n     * Message for default response\n     */\n    default: ModelWithStringError;\n};\n\nexport type CallWithResponsesError = CallWithResponsesErrors[keyof CallWithResponsesErrors];\n\nexport type CallWithResponsesResponses = {\n    /**\n     * Message for 200 response\n     */\n    200: {\n        readonly '@namespace.string'?: string;\n        readonly '@namespace.integer'?: number;\n        readonly value?: Array<ModelWithString>;\n    };\n    /**\n     * Message for 201 response\n     */\n    201: ModelThatExtends;\n    /**\n     * Message for 202 response\n     */\n    202: ModelThatExtendsExtends;\n};\n\nexport type CallWithResponsesResponse = CallWithResponsesResponses[keyof CallWithResponsesResponses];\n\nexport type CollectionFormatData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * This is an array parameter that is sent as csv format (comma-separated values)\n         */\n        parameterArrayCSV: Array<string> | null;\n        /**\n         * This is an array parameter that is sent as ssv format (space-separated values)\n         */\n        parameterArraySSV: Array<string> | null;\n        /**\n         * This is an array parameter that is sent as tsv format (tab-separated values)\n         */\n        parameterArrayTSV: Array<string> | null;\n        /**\n         * This is an array parameter that is sent as pipes format (pipe-separated values)\n         */\n        parameterArrayPipes: Array<string> | null;\n        /**\n         * This is an array parameter that is sent as multi format (multiple parameter instances)\n         */\n        parameterArrayMulti: Array<string> | null;\n    };\n    url: '/api/v{api-version}/collectionFormat';\n};\n\nexport type TypesData = {\n    body?: never;\n    path?: {\n        /**\n         * This is a number parameter\n         */\n        id?: number;\n    };\n    query: {\n        /**\n         * This is a number parameter\n         */\n        parameterNumber: number;\n        /**\n         * This is a string parameter\n         */\n        parameterString: string | null;\n        /**\n         * This is a boolean parameter\n         */\n        parameterBoolean: boolean | null;\n        /**\n         * This is an object parameter\n         */\n        parameterObject: {\n            [key: string]: unknown;\n        } | null;\n        /**\n         * This is an array parameter\n         */\n        parameterArray: Array<string> | null;\n        /**\n         * This is a dictionary parameter\n         */\n        parameterDictionary: {\n            [key: string]: unknown;\n        } | null;\n        /**\n         * This is an enum parameter\n         */\n        parameterEnum: 'Success' | 'Warning' | 'Error' | null;\n    };\n    url: '/api/v{api-version}/types';\n};\n\nexport type TypesResponses = {\n    /**\n     * Response is a simple number\n     */\n    200: number;\n    /**\n     * Response is a simple string\n     */\n    201: string;\n    /**\n     * Response is a simple boolean\n     */\n    202: boolean;\n    /**\n     * Response is a simple object\n     */\n    203: {\n        [key: string]: unknown;\n    };\n};\n\nexport type TypesResponse = TypesResponses[keyof TypesResponses];\n\nexport type UploadFileData = {\n    body: Blob | File;\n    path: {\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string | null;\n    };\n    query?: never;\n    url: '/api/v{api-version}/upload';\n};\n\nexport type UploadFileResponses = {\n    200: boolean;\n};\n\nexport type UploadFileResponse = UploadFileResponses[keyof UploadFileResponses];\n\nexport type FileResponseData = {\n    body?: never;\n    path: {\n        id: string;\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string;\n    };\n    query?: never;\n    url: '/api/v{api-version}/file/{id}';\n};\n\nexport type FileResponseResponses = {\n    /**\n     * Success\n     */\n    200: Blob | File;\n};\n\nexport type FileResponseResponse = FileResponseResponses[keyof FileResponseResponses];\n\nexport type ComplexTypesData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * Parameter containing object\n         */\n        parameterObject: {\n            first?: {\n                second?: {\n                    third?: string;\n                };\n            };\n        };\n        /**\n         * Parameter containing reference\n         */\n        parameterReference: ModelWithString;\n    };\n    url: '/api/v{api-version}/complex';\n};\n\nexport type ComplexTypesErrors = {\n    /**\n     * 400 `server` error\n     */\n    400: unknown;\n    /**\n     * 500 server error\n     */\n    500: unknown;\n};\n\nexport type ComplexTypesResponses = {\n    /**\n     * Successful response\n     */\n    200: Array<ModelWithString>;\n};\n\nexport type ComplexTypesResponse = ComplexTypesResponses[keyof ComplexTypesResponses];\n\nexport type MultipartResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multipart';\n};\n\nexport type MultipartResponseResponses = {\n    /**\n     * OK\n     */\n    200: {\n        file?: Blob | File;\n        metadata?: {\n            foo?: string;\n            bar?: string;\n        };\n    };\n};\n\nexport type MultipartResponseResponse = MultipartResponseResponses[keyof MultipartResponseResponses];\n\nexport type MultipartRequestData = {\n    body?: {\n        content?: Blob | File;\n        data?: ModelWithString | null;\n    };\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multipart';\n};\n\nexport type ComplexParamsData = {\n    body?: {\n        readonly key: string | null;\n        name: string | null;\n        enabled?: boolean;\n        type: 'Monkey' | 'Horse' | 'Bird';\n        listOfModels?: Array<ModelWithString> | null;\n        listOfStrings?: Array<string> | null;\n        parameters: ModelWithString | ModelWithEnum | ModelWithArray | ModelWithDictionary;\n        readonly user?: {\n            readonly id?: number;\n            readonly name?: string | null;\n        };\n    };\n    path: {\n        id: number;\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string;\n    };\n    query?: never;\n    url: '/api/v{api-version}/complex/{id}';\n};\n\nexport type ComplexParamsResponses = {\n    /**\n     * Success\n     */\n    200: ModelWithString;\n};\n\nexport type ComplexParamsResponse = ComplexParamsResponses[keyof ComplexParamsResponses];\n\nexport type CallWithResultFromHeaderData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/header';\n};\n\nexport type CallWithResultFromHeaderErrors = {\n    /**\n     * 400 server error\n     */\n    400: unknown;\n    /**\n     * 500 server error\n     */\n    500: unknown;\n};\n\nexport type CallWithResultFromHeaderResponses = {\n    /**\n     * Successful response\n     */\n    200: unknown;\n};\n\nexport type TestErrorCodeData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * Status code to return\n         */\n        status: number;\n    };\n    url: '/api/v{api-version}/error';\n};\n\nexport type TestErrorCodeErrors = {\n    /**\n     * Custom message: Internal Server Error\n     */\n    500: unknown;\n    /**\n     * Custom message: Not Implemented\n     */\n    501: unknown;\n    /**\n     * Custom message: Bad Gateway\n     */\n    502: unknown;\n    /**\n     * Custom message: Service Unavailable\n     */\n    503: unknown;\n};\n\nexport type TestErrorCodeResponses = {\n    /**\n     * Custom message: Successful response\n     */\n    200: unknown;\n};\n\nexport type NonAsciiæøåÆøÅöôêÊ字符串Data = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * Dummy input param\n         */\n        nonAsciiParamæøåÆØÅöôêÊ: number;\n    };\n    url: '/api/v{api-version}/non-ascii-æøåÆØÅöôêÊ字符串';\n};\n\nexport type NonAsciiæøåÆøÅöôêÊ字符串Responses = {\n    /**\n     * Successful response\n     */\n    200: Array<NonAsciiStringæøåÆøÅöôêÊ字符串>;\n};\n\nexport type NonAsciiæøåÆøÅöôêÊ字符串Response = NonAsciiæøåÆøÅöôêÊ字符串Responses[keyof NonAsciiæøåÆøÅöôêÊ字符串Responses];\n\nexport type PutWithFormUrlEncodedData = {\n    body: ArrayWithStrings;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/non-ascii-æøåÆØÅöôêÊ字符串';\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/solid-query/fetch/@tanstack/solid-query.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport { type DefaultError, type InfiniteData, infiniteQueryOptions, type MutationOptions, queryOptions } from '@tanstack/solid-query';\n\nimport { client } from '../client.gen';\nimport { apiVVersionODataControllerCount, callToTestOrderOfParams, callWithDefaultOptionalParameters, callWithDefaultParameters, callWithDescriptions, callWithDuplicateResponses, callWithNoContentResponse, callWithParameters, callWithResponse, callWithResponseAndNoContentResponse, callWithResponses, callWithResultFromHeader, callWithWeirdParameterNames, collectionFormat, complexParams, complexTypes, deleteCallWithoutParametersAndResponse, deleteFoo, deprecatedCall, dummyA, dummyB, duplicateName, duplicateName2, duplicateName3, duplicateName4, export_, fileResponse, fooWow, getApiVbyApiVersionSimpleOperation, getCallWithOptionalParam, getCallWithoutParametersAndResponse, import_, multipartRequest, multipartResponse, nonAsciiæøåÆøÅöôêÊ字符串, type Options, patchApiVbyApiVersionNoTag, patchCallWithoutParametersAndResponse, postApiVbyApiVersionFormData, postApiVbyApiVersionRequestBody, postCallWithOptionalParam, postCallWithoutParametersAndResponse, putCallWithoutParametersAndResponse, putWithFormUrlEncoded, testErrorCode, types, uploadFile } from '../sdk.gen';\nimport type { ApiVVersionODataControllerCountData, ApiVVersionODataControllerCountResponse, CallToTestOrderOfParamsData, CallWithDefaultOptionalParametersData, CallWithDefaultParametersData, CallWithDescriptionsData, CallWithDuplicateResponsesData, CallWithDuplicateResponsesError, CallWithDuplicateResponsesResponse, CallWithNoContentResponseData, CallWithNoContentResponseResponse, CallWithParametersData, CallWithResponseAndNoContentResponseData, CallWithResponseAndNoContentResponseResponse, CallWithResponseData, CallWithResponseResponse, CallWithResponsesData, CallWithResponsesError, CallWithResponsesResponse, CallWithResultFromHeaderData, CallWithWeirdParameterNamesData, CollectionFormatData, ComplexParamsData, ComplexParamsResponse, ComplexTypesData, ComplexTypesResponse, DeleteCallWithoutParametersAndResponseData, DeleteFooData3, DeprecatedCallData, DummyAData, DummyAResponse, DummyBData, DummyBResponse, DuplicateName2Data, DuplicateName3Data, DuplicateName4Data, DuplicateNameData, ExportData, FileResponseData, FileResponseResponse, FooWowData, GetApiVbyApiVersionSimpleOperationData, GetApiVbyApiVersionSimpleOperationError, GetApiVbyApiVersionSimpleOperationResponse, GetCallWithOptionalParamData, GetCallWithoutParametersAndResponseData, ImportData, ImportResponse, MultipartRequestData, MultipartResponseData, MultipartResponseResponse, NonAsciiæøåÆøÅöôêÊ字符串Data, NonAsciiæøåÆøÅöôêÊ字符串Response, PatchApiVbyApiVersionNoTagData, PatchCallWithoutParametersAndResponseData, PostApiVbyApiVersionFormDataData, PostApiVbyApiVersionRequestBodyData, PostCallWithOptionalParamData, PostCallWithOptionalParamResponse, PostCallWithoutParametersAndResponseData, PutCallWithoutParametersAndResponseData, PutWithFormUrlEncodedData, TestErrorCodeData, TypesData, TypesResponse, UploadFileData, UploadFileResponse } from '../types.gen';\n\nexport type QueryKey<TOptions extends Options> = [\n    Pick<TOptions, 'baseUrl' | 'body' | 'headers' | 'path' | 'query'> & {\n        _id: string;\n        _infinite?: boolean;\n        tags?: ReadonlyArray<string>;\n    }\n];\n\nconst createQueryKey = <TOptions extends Options>(id: string, options?: TOptions, infinite?: boolean, tags?: ReadonlyArray<string>): [\n    QueryKey<TOptions>[0]\n] => {\n    const params: QueryKey<TOptions>[0] = { _id: id, baseUrl: options?.baseUrl || (options?.client ?? client).getConfig().baseUrl } as QueryKey<TOptions>[0];\n    if (infinite) {\n        params._infinite = infinite;\n    }\n    if (tags) {\n        params.tags = tags;\n    }\n    if (options?.body) {\n        params.body = options.body;\n    }\n    if (options?.headers) {\n        params.headers = options.headers;\n    }\n    if (options?.path) {\n        params.path = options.path;\n    }\n    if (options?.query) {\n        params.query = options.query;\n    }\n    return [params];\n};\n\nexport const exportQueryKey = (options?: Options<ExportData>) => createQueryKey('export', options);\n\nexport const exportOptions = (options?: Options<ExportData>) => queryOptions<unknown, DefaultError, unknown, ReturnType<typeof exportQueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await export_({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: exportQueryKey(options)\n});\n\nexport const patchApiVbyApiVersionNoTagMutation = (options?: Partial<Options<PatchApiVbyApiVersionNoTagData>>): MutationOptions<unknown, DefaultError, Options<PatchApiVbyApiVersionNoTagData>> => {\n    const mutationOptions: MutationOptions<unknown, DefaultError, Options<PatchApiVbyApiVersionNoTagData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await patchApiVbyApiVersionNoTag({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const importMutation = (options?: Partial<Options<ImportData>>): MutationOptions<ImportResponse, DefaultError, Options<ImportData>> => {\n    const mutationOptions: MutationOptions<ImportResponse, DefaultError, Options<ImportData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await import_({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const fooWowMutation = (options?: Partial<Options<FooWowData>>): MutationOptions<unknown, DefaultError, Options<FooWowData>> => {\n    const mutationOptions: MutationOptions<unknown, DefaultError, Options<FooWowData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await fooWow({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const apiVVersionODataControllerCountQueryKey = (options?: Options<ApiVVersionODataControllerCountData>) => createQueryKey('apiVVersionODataControllerCount', options);\n\nexport const apiVVersionODataControllerCountOptions = (options?: Options<ApiVVersionODataControllerCountData>) => queryOptions<ApiVVersionODataControllerCountResponse, DefaultError, ApiVVersionODataControllerCountResponse, ReturnType<typeof apiVVersionODataControllerCountQueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await apiVVersionODataControllerCount({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: apiVVersionODataControllerCountQueryKey(options)\n});\n\nexport const getApiVbyApiVersionSimpleOperationQueryKey = (options: Options<GetApiVbyApiVersionSimpleOperationData>) => createQueryKey('getApiVbyApiVersionSimpleOperation', options);\n\nexport const getApiVbyApiVersionSimpleOperationOptions = (options: Options<GetApiVbyApiVersionSimpleOperationData>) => queryOptions<GetApiVbyApiVersionSimpleOperationResponse, GetApiVbyApiVersionSimpleOperationError, GetApiVbyApiVersionSimpleOperationResponse, ReturnType<typeof getApiVbyApiVersionSimpleOperationQueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await getApiVbyApiVersionSimpleOperation({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: getApiVbyApiVersionSimpleOperationQueryKey(options)\n});\n\nexport const deleteCallWithoutParametersAndResponseMutation = (options?: Partial<Options<DeleteCallWithoutParametersAndResponseData>>): MutationOptions<unknown, DefaultError, Options<DeleteCallWithoutParametersAndResponseData>> => {\n    const mutationOptions: MutationOptions<unknown, DefaultError, Options<DeleteCallWithoutParametersAndResponseData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await deleteCallWithoutParametersAndResponse({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const getCallWithoutParametersAndResponseQueryKey = (options?: Options<GetCallWithoutParametersAndResponseData>) => createQueryKey('getCallWithoutParametersAndResponse', options);\n\nexport const getCallWithoutParametersAndResponseOptions = (options?: Options<GetCallWithoutParametersAndResponseData>) => queryOptions<unknown, DefaultError, unknown, ReturnType<typeof getCallWithoutParametersAndResponseQueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await getCallWithoutParametersAndResponse({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: getCallWithoutParametersAndResponseQueryKey(options)\n});\n\nexport const patchCallWithoutParametersAndResponseMutation = (options?: Partial<Options<PatchCallWithoutParametersAndResponseData>>): MutationOptions<unknown, DefaultError, Options<PatchCallWithoutParametersAndResponseData>> => {\n    const mutationOptions: MutationOptions<unknown, DefaultError, Options<PatchCallWithoutParametersAndResponseData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await patchCallWithoutParametersAndResponse({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const postCallWithoutParametersAndResponseMutation = (options?: Partial<Options<PostCallWithoutParametersAndResponseData>>): MutationOptions<unknown, DefaultError, Options<PostCallWithoutParametersAndResponseData>> => {\n    const mutationOptions: MutationOptions<unknown, DefaultError, Options<PostCallWithoutParametersAndResponseData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await postCallWithoutParametersAndResponse({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const putCallWithoutParametersAndResponseMutation = (options?: Partial<Options<PutCallWithoutParametersAndResponseData>>): MutationOptions<unknown, DefaultError, Options<PutCallWithoutParametersAndResponseData>> => {\n    const mutationOptions: MutationOptions<unknown, DefaultError, Options<PutCallWithoutParametersAndResponseData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await putCallWithoutParametersAndResponse({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const deleteFooMutation = (options?: Partial<Options<DeleteFooData3>>): MutationOptions<unknown, DefaultError, Options<DeleteFooData3>> => {\n    const mutationOptions: MutationOptions<unknown, DefaultError, Options<DeleteFooData3>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await deleteFoo({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const callWithDescriptionsMutation = (options?: Partial<Options<CallWithDescriptionsData>>): MutationOptions<unknown, DefaultError, Options<CallWithDescriptionsData>> => {\n    const mutationOptions: MutationOptions<unknown, DefaultError, Options<CallWithDescriptionsData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await callWithDescriptions({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\n/**\n * @deprecated\n */\nexport const deprecatedCallMutation = (options?: Partial<Options<DeprecatedCallData>>): MutationOptions<unknown, DefaultError, Options<DeprecatedCallData>> => {\n    const mutationOptions: MutationOptions<unknown, DefaultError, Options<DeprecatedCallData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await deprecatedCall({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const callWithParametersMutation = (options?: Partial<Options<CallWithParametersData>>): MutationOptions<unknown, DefaultError, Options<CallWithParametersData>> => {\n    const mutationOptions: MutationOptions<unknown, DefaultError, Options<CallWithParametersData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await callWithParameters({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const callWithWeirdParameterNamesMutation = (options?: Partial<Options<CallWithWeirdParameterNamesData>>): MutationOptions<unknown, DefaultError, Options<CallWithWeirdParameterNamesData>> => {\n    const mutationOptions: MutationOptions<unknown, DefaultError, Options<CallWithWeirdParameterNamesData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await callWithWeirdParameterNames({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const getCallWithOptionalParamQueryKey = (options: Options<GetCallWithOptionalParamData>) => createQueryKey('getCallWithOptionalParam', options);\n\nexport const getCallWithOptionalParamOptions = (options: Options<GetCallWithOptionalParamData>) => queryOptions<unknown, DefaultError, unknown, ReturnType<typeof getCallWithOptionalParamQueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await getCallWithOptionalParam({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: getCallWithOptionalParamQueryKey(options)\n});\n\nconst createInfiniteParams = <K extends Pick<QueryKey<Options>[0], 'body' | 'headers' | 'path' | 'query'>>(queryKey: QueryKey<Options>, page: K) => {\n    const params = { ...queryKey[0] };\n    if (page.body) {\n        params.body = {\n            ...queryKey[0].body as any,\n            ...page.body as any\n        };\n    }\n    if (page.headers) {\n        params.headers = {\n            ...queryKey[0].headers,\n            ...page.headers\n        };\n    }\n    if (page.path) {\n        params.path = {\n            ...queryKey[0].path as any,\n            ...page.path as any\n        };\n    }\n    if (page.query) {\n        params.query = {\n            ...queryKey[0].query as any,\n            ...page.query as any\n        };\n    }\n    return params as unknown as typeof page;\n};\n\nexport const getCallWithOptionalParamInfiniteQueryKey = (options: Options<GetCallWithOptionalParamData>): QueryKey<Options<GetCallWithOptionalParamData>> => createQueryKey('getCallWithOptionalParam', options, true);\n\nexport const getCallWithOptionalParamInfiniteOptions = (options: Options<GetCallWithOptionalParamData>) => infiniteQueryOptions<unknown, DefaultError, InfiniteData<unknown>, QueryKey<Options<GetCallWithOptionalParamData>>, number | Pick<QueryKey<Options<GetCallWithOptionalParamData>>[0], 'body' | 'headers' | 'path' | 'query'>>(\n// @ts-ignore\n{\n    queryFn: async ({ pageParam, queryKey, signal }) => {\n        // @ts-ignore\n        const page: Pick<QueryKey<Options<GetCallWithOptionalParamData>>[0], 'body' | 'headers' | 'path' | 'query'> = typeof pageParam === 'object' ? pageParam : {\n            query: {\n                page: pageParam\n            }\n        };\n        const params = createInfiniteParams(queryKey, page);\n        const { data } = await getCallWithOptionalParam({\n            ...options,\n            ...params,\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: getCallWithOptionalParamInfiniteQueryKey(options)\n});\n\nexport const postCallWithOptionalParamMutation = (options?: Partial<Options<PostCallWithOptionalParamData>>): MutationOptions<PostCallWithOptionalParamResponse, DefaultError, Options<PostCallWithOptionalParamData>> => {\n    const mutationOptions: MutationOptions<PostCallWithOptionalParamResponse, DefaultError, Options<PostCallWithOptionalParamData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await postCallWithOptionalParam({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const postApiVbyApiVersionRequestBodyMutation = (options?: Partial<Options<PostApiVbyApiVersionRequestBodyData>>): MutationOptions<unknown, DefaultError, Options<PostApiVbyApiVersionRequestBodyData>> => {\n    const mutationOptions: MutationOptions<unknown, DefaultError, Options<PostApiVbyApiVersionRequestBodyData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await postApiVbyApiVersionRequestBody({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const postApiVbyApiVersionFormDataMutation = (options?: Partial<Options<PostApiVbyApiVersionFormDataData>>): MutationOptions<unknown, DefaultError, Options<PostApiVbyApiVersionFormDataData>> => {\n    const mutationOptions: MutationOptions<unknown, DefaultError, Options<PostApiVbyApiVersionFormDataData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await postApiVbyApiVersionFormData({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const callWithDefaultParametersQueryKey = (options?: Options<CallWithDefaultParametersData>) => createQueryKey('callWithDefaultParameters', options);\n\nexport const callWithDefaultParametersOptions = (options?: Options<CallWithDefaultParametersData>) => queryOptions<unknown, DefaultError, unknown, ReturnType<typeof callWithDefaultParametersQueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await callWithDefaultParameters({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: callWithDefaultParametersQueryKey(options)\n});\n\nexport const callWithDefaultOptionalParametersMutation = (options?: Partial<Options<CallWithDefaultOptionalParametersData>>): MutationOptions<unknown, DefaultError, Options<CallWithDefaultOptionalParametersData>> => {\n    const mutationOptions: MutationOptions<unknown, DefaultError, Options<CallWithDefaultOptionalParametersData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await callWithDefaultOptionalParameters({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const callToTestOrderOfParamsMutation = (options?: Partial<Options<CallToTestOrderOfParamsData>>): MutationOptions<unknown, DefaultError, Options<CallToTestOrderOfParamsData>> => {\n    const mutationOptions: MutationOptions<unknown, DefaultError, Options<CallToTestOrderOfParamsData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await callToTestOrderOfParams({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const duplicateNameMutation = (options?: Partial<Options<DuplicateNameData>>): MutationOptions<unknown, DefaultError, Options<DuplicateNameData>> => {\n    const mutationOptions: MutationOptions<unknown, DefaultError, Options<DuplicateNameData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await duplicateName({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const duplicateName2QueryKey = (options?: Options<DuplicateName2Data>) => createQueryKey('duplicateName2', options);\n\nexport const duplicateName2Options = (options?: Options<DuplicateName2Data>) => queryOptions<unknown, DefaultError, unknown, ReturnType<typeof duplicateName2QueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await duplicateName2({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: duplicateName2QueryKey(options)\n});\n\nexport const duplicateName3Mutation = (options?: Partial<Options<DuplicateName3Data>>): MutationOptions<unknown, DefaultError, Options<DuplicateName3Data>> => {\n    const mutationOptions: MutationOptions<unknown, DefaultError, Options<DuplicateName3Data>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await duplicateName3({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const duplicateName4Mutation = (options?: Partial<Options<DuplicateName4Data>>): MutationOptions<unknown, DefaultError, Options<DuplicateName4Data>> => {\n    const mutationOptions: MutationOptions<unknown, DefaultError, Options<DuplicateName4Data>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await duplicateName4({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const callWithNoContentResponseQueryKey = (options?: Options<CallWithNoContentResponseData>) => createQueryKey('callWithNoContentResponse', options);\n\nexport const callWithNoContentResponseOptions = (options?: Options<CallWithNoContentResponseData>) => queryOptions<CallWithNoContentResponseResponse, DefaultError, CallWithNoContentResponseResponse, ReturnType<typeof callWithNoContentResponseQueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await callWithNoContentResponse({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: callWithNoContentResponseQueryKey(options)\n});\n\nexport const callWithResponseAndNoContentResponseQueryKey = (options?: Options<CallWithResponseAndNoContentResponseData>) => createQueryKey('callWithResponseAndNoContentResponse', options);\n\nexport const callWithResponseAndNoContentResponseOptions = (options?: Options<CallWithResponseAndNoContentResponseData>) => queryOptions<CallWithResponseAndNoContentResponseResponse, DefaultError, CallWithResponseAndNoContentResponseResponse, ReturnType<typeof callWithResponseAndNoContentResponseQueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await callWithResponseAndNoContentResponse({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: callWithResponseAndNoContentResponseQueryKey(options)\n});\n\nexport const dummyAQueryKey = (options?: Options<DummyAData>) => createQueryKey('dummyA', options);\n\nexport const dummyAOptions = (options?: Options<DummyAData>) => queryOptions<DummyAResponse, DefaultError, DummyAResponse, ReturnType<typeof dummyAQueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await dummyA({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: dummyAQueryKey(options)\n});\n\nexport const dummyBQueryKey = (options?: Options<DummyBData>) => createQueryKey('dummyB', options);\n\nexport const dummyBOptions = (options?: Options<DummyBData>) => queryOptions<DummyBResponse, DefaultError, DummyBResponse, ReturnType<typeof dummyBQueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await dummyB({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: dummyBQueryKey(options)\n});\n\nexport const callWithResponseQueryKey = (options?: Options<CallWithResponseData>) => createQueryKey('callWithResponse', options);\n\nexport const callWithResponseOptions = (options?: Options<CallWithResponseData>) => queryOptions<CallWithResponseResponse, DefaultError, CallWithResponseResponse, ReturnType<typeof callWithResponseQueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await callWithResponse({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: callWithResponseQueryKey(options)\n});\n\nexport const callWithDuplicateResponsesMutation = (options?: Partial<Options<CallWithDuplicateResponsesData>>): MutationOptions<CallWithDuplicateResponsesResponse, CallWithDuplicateResponsesError, Options<CallWithDuplicateResponsesData>> => {\n    const mutationOptions: MutationOptions<CallWithDuplicateResponsesResponse, CallWithDuplicateResponsesError, Options<CallWithDuplicateResponsesData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await callWithDuplicateResponses({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const callWithResponsesMutation = (options?: Partial<Options<CallWithResponsesData>>): MutationOptions<CallWithResponsesResponse, CallWithResponsesError, Options<CallWithResponsesData>> => {\n    const mutationOptions: MutationOptions<CallWithResponsesResponse, CallWithResponsesError, Options<CallWithResponsesData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await callWithResponses({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const collectionFormatQueryKey = (options: Options<CollectionFormatData>) => createQueryKey('collectionFormat', options);\n\nexport const collectionFormatOptions = (options: Options<CollectionFormatData>) => queryOptions<unknown, DefaultError, unknown, ReturnType<typeof collectionFormatQueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await collectionFormat({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: collectionFormatQueryKey(options)\n});\n\nexport const typesQueryKey = (options: Options<TypesData>) => createQueryKey('types', options);\n\nexport const typesOptions = (options: Options<TypesData>) => queryOptions<TypesResponse, DefaultError, TypesResponse, ReturnType<typeof typesQueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await types({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: typesQueryKey(options)\n});\n\nexport const uploadFileMutation = (options?: Partial<Options<UploadFileData>>): MutationOptions<UploadFileResponse, DefaultError, Options<UploadFileData>> => {\n    const mutationOptions: MutationOptions<UploadFileResponse, DefaultError, Options<UploadFileData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await uploadFile({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const fileResponseQueryKey = (options: Options<FileResponseData>) => createQueryKey('fileResponse', options);\n\nexport const fileResponseOptions = (options: Options<FileResponseData>) => queryOptions<FileResponseResponse, DefaultError, FileResponseResponse, ReturnType<typeof fileResponseQueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await fileResponse({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: fileResponseQueryKey(options)\n});\n\nexport const complexTypesQueryKey = (options: Options<ComplexTypesData>) => createQueryKey('complexTypes', options);\n\nexport const complexTypesOptions = (options: Options<ComplexTypesData>) => queryOptions<ComplexTypesResponse, DefaultError, ComplexTypesResponse, ReturnType<typeof complexTypesQueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await complexTypes({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: complexTypesQueryKey(options)\n});\n\nexport const multipartResponseQueryKey = (options?: Options<MultipartResponseData>) => createQueryKey('multipartResponse', options);\n\nexport const multipartResponseOptions = (options?: Options<MultipartResponseData>) => queryOptions<MultipartResponseResponse, DefaultError, MultipartResponseResponse, ReturnType<typeof multipartResponseQueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await multipartResponse({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: multipartResponseQueryKey(options)\n});\n\nexport const multipartRequestMutation = (options?: Partial<Options<MultipartRequestData>>): MutationOptions<unknown, DefaultError, Options<MultipartRequestData>> => {\n    const mutationOptions: MutationOptions<unknown, DefaultError, Options<MultipartRequestData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await multipartRequest({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const complexParamsMutation = (options?: Partial<Options<ComplexParamsData>>): MutationOptions<ComplexParamsResponse, DefaultError, Options<ComplexParamsData>> => {\n    const mutationOptions: MutationOptions<ComplexParamsResponse, DefaultError, Options<ComplexParamsData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await complexParams({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const callWithResultFromHeaderMutation = (options?: Partial<Options<CallWithResultFromHeaderData>>): MutationOptions<unknown, DefaultError, Options<CallWithResultFromHeaderData>> => {\n    const mutationOptions: MutationOptions<unknown, DefaultError, Options<CallWithResultFromHeaderData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await callWithResultFromHeader({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const testErrorCodeMutation = (options?: Partial<Options<TestErrorCodeData>>): MutationOptions<unknown, DefaultError, Options<TestErrorCodeData>> => {\n    const mutationOptions: MutationOptions<unknown, DefaultError, Options<TestErrorCodeData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await testErrorCode({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const nonAsciiæøåÆøÅöôêÊ字符串Mutation = (options?: Partial<Options<NonAsciiæøåÆøÅöôêÊ字符串Data>>): MutationOptions<NonAsciiæøåÆøÅöôêÊ字符串Response, DefaultError, Options<NonAsciiæøåÆøÅöôêÊ字符串Data>> => {\n    const mutationOptions: MutationOptions<NonAsciiæøåÆøÅöôêÊ字符串Response, DefaultError, Options<NonAsciiæøåÆøÅöôêÊ字符串Data>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await nonAsciiæøåÆøÅöôêÊ字符串({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\n/**\n * Login User\n */\nexport const putWithFormUrlEncodedMutation = (options?: Partial<Options<PutWithFormUrlEncodedData>>): MutationOptions<unknown, DefaultError, Options<PutWithFormUrlEncodedData>> => {\n    const mutationOptions: MutationOptions<unknown, DefaultError, Options<PutWithFormUrlEncodedData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await putWithFormUrlEncoded({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/solid-query/fetch/client/client.gen.ts",
    "content": "// 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 (options: RequestOptions) => {\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 url = buildUrl(opts);\n\n    return { opts, url };\n  };\n\n  const request: Client['request'] = async (options) => {\n    // @ts-expect-error\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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/solid-query/fetch/client/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type { Auth } from '../core/auth.gen';\nexport type { QuerySerializerOptions } from '../core/bodySerializer.gen';\nexport {\n  formDataBodySerializer,\n  jsonBodySerializer,\n  urlSearchParamsBodySerializer,\n} from '../core/bodySerializer.gen';\nexport { buildClientParams } from '../core/params.gen';\nexport { serializeQueryKeyValue } from '../core/queryKeySerializer.gen';\nexport { createClient } from './client.gen';\nexport type {\n  Client,\n  ClientOptions,\n  Config,\n  CreateClientConfig,\n  Options,\n  RequestOptions,\n  RequestResult,\n  ResolvedRequestOptions,\n  ResponseStyle,\n  TDataShape,\n} from './types.gen';\nexport { createConfig, mergeHeaders } from './utils.gen';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/solid-query/fetch/client/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { Auth } from '../core/auth.gen';\nimport type {\n  ServerSentEventsOptions,\n  ServerSentEventsResult,\n} from '../core/serverSentEvents.gen';\nimport type { Client as CoreClient, Config as CoreConfig } from '../core/types.gen';\nimport type { Middleware } from './utils.gen';\n\nexport type ResponseStyle = 'data' | 'fields';\n\nexport interface Config<T extends ClientOptions = ClientOptions>\n  extends Omit<RequestInit, 'body' | 'headers' | 'method'>, CoreConfig {\n  /**\n   * Base URL for all requests made by this client.\n   */\n  baseUrl?: T['baseUrl'];\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   * Please don't use the Fetch client for Next.js applications. The `next`\n   * options won't have any effect.\n   *\n   * Install {@link https://www.npmjs.com/package/@hey-api/client-next `@hey-api/client-next`} instead.\n   */\n  next?: never;\n  /**\n   * Return the response data parsed in a specified format. By default, `auto`\n   * will infer the appropriate method from the `Content-Type` response header.\n   * You can override this behavior with any of the {@link Body} methods.\n   * Select `stream` if you don't want to parse response data at all.\n   *\n   * @default 'auto'\n   */\n  parseAs?: 'arrayBuffer' | 'auto' | 'blob' | 'formData' | 'json' | 'stream' | 'text';\n  /**\n   * Should we return only data or multiple fields (data, error, response, etc.)?\n   *\n   * @default 'fields'\n   */\n  responseStyle?: ResponseStyle;\n  /**\n   * Throw an error instead of returning it in the response?\n   *\n   * @default false\n   */\n  throwOnError?: T['throwOnError'];\n}\n\nexport interface RequestOptions<\n  TData = unknown,\n  TResponseStyle extends ResponseStyle = 'fields',\n  ThrowOnError extends boolean = boolean,\n  Url extends string = string,\n>\n  extends\n    Config<{\n      responseStyle: TResponseStyle;\n      throwOnError: ThrowOnError;\n    }>,\n    Pick<\n      ServerSentEventsOptions<TData>,\n      | 'onRequest'\n      | 'onSseError'\n      | 'onSseEvent'\n      | 'sseDefaultRetryDelay'\n      | 'sseMaxRetryAttempts'\n      | 'sseMaxRetryDelay'\n    > {\n  /**\n   * Any body that you want to add to your request.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/fetch#body}\n   */\n  body?: unknown;\n  path?: Record<string, unknown>;\n  query?: Record<string, unknown>;\n  /**\n   * Security mechanism(s) to use for the request.\n   */\n  security?: ReadonlyArray<Auth>;\n  url: Url;\n}\n\nexport interface ResolvedRequestOptions<\n  TResponseStyle extends ResponseStyle = 'fields',\n  ThrowOnError extends boolean = boolean,\n  Url extends string = string,\n> extends RequestOptions<unknown, TResponseStyle, ThrowOnError, Url> {\n  serializedBody?: string;\n}\n\nexport type RequestResult<\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = boolean,\n  TResponseStyle extends ResponseStyle = 'fields',\n> = ThrowOnError extends true\n  ? Promise<\n      TResponseStyle extends 'data'\n        ? TData extends Record<string, unknown>\n          ? TData[keyof TData]\n          : TData\n        : {\n            data: TData extends Record<string, unknown> ? TData[keyof TData] : TData;\n            request: Request;\n            response: Response;\n          }\n    >\n  : Promise<\n      TResponseStyle extends 'data'\n        ? (TData extends Record<string, unknown> ? TData[keyof TData] : TData) | undefined\n        : (\n            | {\n                data: TData extends Record<string, unknown> ? TData[keyof TData] : TData;\n                error: undefined;\n              }\n            | {\n                data: undefined;\n                error: TError extends Record<string, unknown> ? TError[keyof TError] : TError;\n              }\n          ) & {\n            request: Request;\n            response: Response;\n          }\n    >;\n\nexport interface ClientOptions {\n  baseUrl?: string;\n  responseStyle?: ResponseStyle;\n  throwOnError?: boolean;\n}\n\ntype MethodFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'>,\n) => RequestResult<TData, TError, ThrowOnError, TResponseStyle>;\n\ntype SseFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'>,\n) => Promise<ServerSentEventsResult<TData, TError>>;\n\ntype RequestFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'> &\n    Pick<Required<RequestOptions<TData, TResponseStyle, ThrowOnError>>, 'method'>,\n) => RequestResult<TData, TError, ThrowOnError, TResponseStyle>;\n\ntype BuildUrlFn = <\n  TData extends {\n    body?: unknown;\n    path?: Record<string, unknown>;\n    query?: Record<string, unknown>;\n    url: string;\n  },\n>(\n  options: TData & Options<TData>,\n) => string;\n\nexport type Client = CoreClient<RequestFn, Config, MethodFn, BuildUrlFn, SseFn> & {\n  interceptors: Middleware<Request, Response, unknown, ResolvedRequestOptions>;\n};\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 = ClientOptions> = (\n  override?: Config<ClientOptions & T>,\n) => Config<Required<ClientOptions> & T>;\n\nexport interface TDataShape {\n  body?: unknown;\n  headers?: unknown;\n  path?: unknown;\n  query?: unknown;\n  url: string;\n}\n\ntype OmitKeys<T, K> = Pick<T, Exclude<keyof T, K>>;\n\nexport type Options<\n  TData extends TDataShape = TDataShape,\n  ThrowOnError extends boolean = boolean,\n  TResponse = unknown,\n  TResponseStyle extends ResponseStyle = 'fields',\n> = OmitKeys<\n  RequestOptions<TResponse, TResponseStyle, ThrowOnError>,\n  'body' | 'path' | 'query' | 'url'\n> &\n  ([TData] extends [never] ? unknown : Omit<TData, 'url'>);\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/solid-query/fetch/client/utils.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/solid-query/fetch/client.gen.ts",
    "content": "// 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: 'http://localhost:3000/base' }));\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/solid-query/fetch/core/auth.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/solid-query/fetch/core/bodySerializer.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/solid-query/fetch/core/params.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/solid-query/fetch/core/pathSerializer.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/solid-query/fetch/core/queryKeySerializer.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\n/**\n * JSON-friendly union that mirrors what Pinia Colada can hash.\n */\nexport type JsonValue =\n  | null\n  | string\n  | number\n  | boolean\n  | JsonValue[]\n  | { [key: string]: JsonValue };\n\n/**\n * Replacer that converts non-JSON values (bigint, Date, etc.) to safe substitutes.\n */\nexport const queryKeyJsonReplacer = (_key: string, value: unknown) => {\n  if (value === undefined || typeof value === 'function' || typeof value === 'symbol') {\n    return undefined;\n  }\n  if (typeof value === 'bigint') {\n    return value.toString();\n  }\n  if (value instanceof Date) {\n    return value.toISOString();\n  }\n  return value;\n};\n\n/**\n * Safely stringifies a value and parses it back into a JsonValue.\n */\nexport const stringifyToJsonValue = (input: unknown): JsonValue | undefined => {\n  try {\n    const json = JSON.stringify(input, queryKeyJsonReplacer);\n    if (json === undefined) {\n      return undefined;\n    }\n    return JSON.parse(json) as JsonValue;\n  } catch {\n    return undefined;\n  }\n};\n\n/**\n * Detects plain objects (including objects with a null prototype).\n */\nconst isPlainObject = (value: unknown): value is Record<string, unknown> => {\n  if (value === null || typeof value !== 'object') {\n    return false;\n  }\n  const prototype = Object.getPrototypeOf(value as object);\n  return prototype === Object.prototype || prototype === null;\n};\n\n/**\n * Turns URLSearchParams into a sorted JSON object for deterministic keys.\n */\nconst serializeSearchParams = (params: URLSearchParams): JsonValue => {\n  const entries = Array.from(params.entries()).sort(([a], [b]) => a.localeCompare(b));\n  const result: Record<string, JsonValue> = {};\n\n  for (const [key, value] of entries) {\n    const existing = result[key];\n    if (existing === undefined) {\n      result[key] = value;\n      continue;\n    }\n\n    if (Array.isArray(existing)) {\n      (existing as string[]).push(value);\n    } else {\n      result[key] = [existing, value];\n    }\n  }\n\n  return result;\n};\n\n/**\n * Normalizes any accepted value into a JSON-friendly shape for query keys.\n */\nexport const serializeQueryKeyValue = (value: unknown): JsonValue | undefined => {\n  if (value === null) {\n    return null;\n  }\n\n  if (typeof value === 'string' || typeof value === 'number' || typeof value === 'boolean') {\n    return value;\n  }\n\n  if (value === undefined || typeof value === 'function' || typeof value === 'symbol') {\n    return undefined;\n  }\n\n  if (typeof value === 'bigint') {\n    return value.toString();\n  }\n\n  if (value instanceof Date) {\n    return value.toISOString();\n  }\n\n  if (Array.isArray(value)) {\n    return stringifyToJsonValue(value);\n  }\n\n  if (typeof URLSearchParams !== 'undefined' && value instanceof URLSearchParams) {\n    return serializeSearchParams(value);\n  }\n\n  if (isPlainObject(value)) {\n    return stringifyToJsonValue(value);\n  }\n\n  return undefined;\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/solid-query/fetch/core/serverSentEvents.gen.ts",
    "content": "// 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 const 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            // Normalize line endings: CRLF -> LF, then CR -> LF\n            buffer = buffer.replace(/\\r\\n/g, '\\n').replace(/\\r/g, '\\n');\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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/solid-query/fetch/core/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { Auth, AuthToken } from './auth.gen';\nimport type { BodySerializer, QuerySerializer, QuerySerializerOptions } from './bodySerializer.gen';\n\nexport type HttpMethod =\n  | 'connect'\n  | 'delete'\n  | 'get'\n  | 'head'\n  | 'options'\n  | 'patch'\n  | 'post'\n  | 'put'\n  | 'trace';\n\nexport type Client<\n  RequestFn = never,\n  Config = unknown,\n  MethodFn = never,\n  BuildUrlFn = never,\n  SseFn = never,\n> = {\n  /**\n   * Returns the final request URL.\n   */\n  buildUrl: BuildUrlFn;\n  getConfig: () => Config;\n  request: RequestFn;\n  setConfig: (config: Config) => Config;\n} & {\n  [K in HttpMethod]: MethodFn;\n} & ([SseFn] extends [never] ? { sse?: never } : { sse: { [K in HttpMethod]: SseFn } });\n\nexport interface Config {\n  /**\n   * Auth token or a function returning auth token. The resolved value will be\n   * added to the request payload as defined by its `security` array.\n   */\n  auth?: ((auth: Auth) => Promise<AuthToken> | AuthToken) | AuthToken;\n  /**\n   * A function for serializing request body parameter. By default,\n   * {@link JSON.stringify()} will be used.\n   */\n  bodySerializer?: BodySerializer | null;\n  /**\n   * An object containing any HTTP headers that you want to pre-populate your\n   * `Headers` object with.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/Headers/Headers#init See more}\n   */\n  headers?:\n    | RequestInit['headers']\n    | Record<\n        string,\n        string | number | boolean | (string | number | boolean)[] | null | undefined | unknown\n      >;\n  /**\n   * The request method.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/fetch#method See more}\n   */\n  method?: Uppercase<HttpMethod>;\n  /**\n   * A function for serializing request query parameters. By default, arrays\n   * will be exploded in form style, objects will be exploded in deepObject\n   * style, and reserved characters are percent-encoded.\n   *\n   * This method will have no effect if the native `paramsSerializer()` Axios\n   * API function is used.\n   *\n   * {@link https://swagger.io/docs/specification/serialization/#query View examples}\n   */\n  querySerializer?: QuerySerializer | QuerySerializerOptions;\n  /**\n   * A function validating request data. This is useful if you want to ensure\n   * the request conforms to the desired shape, so it can be safely sent to\n   * the server.\n   */\n  requestValidator?: (data: unknown) => Promise<unknown>;\n  /**\n   * A function transforming response data before it's returned. This is useful\n   * for post-processing data, e.g. converting ISO strings into Date objects.\n   */\n  responseTransformer?: (data: unknown) => Promise<unknown>;\n  /**\n   * A function validating response data. This is useful if you want to ensure\n   * the response conforms to the desired shape, so it can be safely passed to\n   * the transformers and returned to the user.\n   */\n  responseValidator?: (data: unknown) => Promise<unknown>;\n}\n\ntype IsExactlyNeverOrNeverUndefined<T> = [T] extends [never]\n  ? true\n  : [T] extends [never | undefined]\n    ? [undefined] extends [T]\n      ? false\n      : true\n    : false;\n\nexport type OmitNever<T extends Record<string, unknown>> = {\n  [K in keyof T as IsExactlyNeverOrNeverUndefined<T[K]> extends true ? never : K]: T[K];\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/solid-query/fetch/core/utils.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/solid-query/fetch/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport { apiVVersionODataControllerCount, callToTestOrderOfParams, callWithDefaultOptionalParameters, callWithDefaultParameters, callWithDescriptions, callWithDuplicateResponses, callWithNoContentResponse, callWithParameters, callWithResponse, callWithResponseAndNoContentResponse, callWithResponses, callWithResultFromHeader, callWithWeirdParameterNames, collectionFormat, complexParams, complexTypes, deleteCallWithoutParametersAndResponse, deleteFoo, deprecatedCall, dummyA, dummyB, duplicateName, duplicateName2, duplicateName3, duplicateName4, export_, fileResponse, fooWow, getApiVbyApiVersionSimpleOperation, getCallWithOptionalParam, getCallWithoutParametersAndResponse, headCallWithoutParametersAndResponse, import_, multipartRequest, multipartResponse, nonAsciiæøåÆøÅöôêÊ字符串, type Options, optionsCallWithoutParametersAndResponse, patchApiVbyApiVersionNoTag, patchCallWithoutParametersAndResponse, postApiVbyApiVersionFormData, postApiVbyApiVersionRequestBody, postCallWithOptionalParam, postCallWithoutParametersAndResponse, putCallWithoutParametersAndResponse, putWithFormUrlEncoded, testErrorCode, types, uploadFile } from './sdk.gen';\nexport type { _3eNum1Период, _400, AdditionalPropertiesIntegerIssue, AdditionalPropertiesUnknownIssue, AdditionalPropertiesUnknownIssue2, AdditionalPropertiesUnknownIssue3, AdditionalPropertiesUnknownIssueWritable, AnyOfAnyAndNull, AnyOfArrays, ApiVVersionODataControllerCountData, ApiVVersionODataControllerCountResponse, ApiVVersionODataControllerCountResponses, ArrayWithAnyOfProperties, ArrayWithArray, ArrayWithBooleans, ArrayWithNumbers, ArrayWithProperties, ArrayWithReferences, ArrayWithStrings, CallToTestOrderOfParamsData, CallWithDefaultOptionalParametersData, CallWithDefaultParametersData, CallWithDescriptionsData, CallWithDuplicateResponsesData, CallWithDuplicateResponsesError, CallWithDuplicateResponsesErrors, CallWithDuplicateResponsesResponse, CallWithDuplicateResponsesResponses, CallWithNoContentResponseData, CallWithNoContentResponseResponse, CallWithNoContentResponseResponses, CallWithParametersData, CallWithResponseAndNoContentResponseData, CallWithResponseAndNoContentResponseResponse, CallWithResponseAndNoContentResponseResponses, CallWithResponseData, CallWithResponseResponse, CallWithResponseResponses, CallWithResponsesData, CallWithResponsesError, CallWithResponsesErrors, CallWithResponsesResponse, CallWithResponsesResponses, CallWithResultFromHeaderData, CallWithResultFromHeaderErrors, CallWithResultFromHeaderResponses, CallWithWeirdParameterNamesData, CamelCaseCommentWithBreaks, CharactersInDescription, ClientOptions, CollectionFormatData, CommentWithBackticks, CommentWithBackticksAndQuotes, CommentWithBreaks, CommentWithExpressionPlaceholders, CommentWithQuotes, CommentWithReservedCharacters, CommentWithSlashes, ComplexParamsData, ComplexParamsResponse, ComplexParamsResponses, ComplexTypesData, ComplexTypesErrors, ComplexTypesResponse, ComplexTypesResponses, CompositionBaseModel, CompositionExtendedModel, CompositionWithAllOfAndNullable, CompositionWithAnyOf, CompositionWithAnyOfAndNullable, CompositionWithAnyOfAnonymous, CompositionWithNestedAnyAndTypeNull, CompositionWithNestedAnyOfAndNull, CompositionWithOneOf, CompositionWithOneOfAndComplexArrayDictionary, CompositionWithOneOfAndNullable, CompositionWithOneOfAndProperties, CompositionWithOneOfAndSimpleArrayDictionary, CompositionWithOneOfAndSimpleDictionary, CompositionWithOneOfAnonymous, CompositionWithOneOfDiscriminator, ConstValue, Default, DeleteCallWithoutParametersAndResponseData, DeleteFooData, DeleteFooData2, DeleteFooData3, DeprecatedCallData, DeprecatedModel, DictionaryWithArray, DictionaryWithDictionary, DictionaryWithProperties, DictionaryWithPropertiesAndAdditionalProperties, DictionaryWithReference, DictionaryWithString, DummyAData, DummyAResponse, DummyAResponses, DummyBData, DummyBResponse, DummyBResponses, DuplicateName2Data, DuplicateName3Data, DuplicateName4Data, DuplicateNameData, EnumFromDescription, EnumWithExtensions, EnumWithNumbers, EnumWithReplacedCharacters, EnumWithStrings, EnumWithXEnumNames, ExportData, ExternalRefA, ExternalRefB, ExternalSharedModel, File, FileResponseData, FileResponseResponse, FileResponseResponses, FileWritable, FooWowData, FooWowResponses, FreeFormObjectWithAdditionalPropertiesEqEmptyObject, FreeFormObjectWithAdditionalPropertiesEqTrue, FreeFormObjectWithoutAdditionalProperties, GenericSchemaDuplicateIssue1SystemBoolean, GenericSchemaDuplicateIssue1SystemBooleanWritable, GenericSchemaDuplicateIssue1SystemString, GenericSchemaDuplicateIssue1SystemStringWritable, GetApiVbyApiVersionSimpleOperationData, GetApiVbyApiVersionSimpleOperationError, GetApiVbyApiVersionSimpleOperationErrors, GetApiVbyApiVersionSimpleOperationResponse, GetApiVbyApiVersionSimpleOperationResponses, GetCallWithOptionalParamData, GetCallWithoutParametersAndResponseData, HeadCallWithoutParametersAndResponseData, Import, ImportData, ImportResponse, ImportResponses, IoK8sApimachineryPkgApisMetaV1DeleteOptions, IoK8sApimachineryPkgApisMetaV1Preconditions, ModelCircle, ModelFromZendesk, ModelSquare, ModelThatExtends, ModelThatExtendsExtends, ModelWithAdditionalPropertiesEqTrue, ModelWithAdditionalPropertiesRef, ModelWithAnyOfConstantSizeArray, ModelWithAnyOfConstantSizeArrayAndIntersect, ModelWithAnyOfConstantSizeArrayNullable, ModelWithAnyOfConstantSizeArrayWithNSizeAndOptions, ModelWithAnyOfConstantSizeArrayWithNSizeAndOptionsWritable, ModelWithArray, ModelWithArrayReadOnlyAndWriteOnly, ModelWithArrayReadOnlyAndWriteOnlyWritable, ModelWithBackticksInDescription, ModelWithBoolean, ModelWithCircularReference, ModelWithConst, ModelWithConstantSizeArray, ModelWithDictionary, ModelWithDuplicateImports, ModelWithDuplicateProperties, ModelWithEnum, ModelWithEnumFromDescription, ModelWithEnumWithHyphen, ModelWithInteger, ModelWithNestedArrayEnums, ModelWithNestedArrayEnumsData, ModelWithNestedArrayEnumsDataBar, ModelWithNestedArrayEnumsDataFoo, ModelWithNestedCompositionEnums, ModelWithNestedEnums, ModelWithNestedProperties, ModelWithNullableObject, ModelWithNullableString, ModelWithNumericEnumUnion, ModelWithOneOfAndProperties, ModelWithOneOfEnum, ModelWithOrderedProperties, ModelWithPattern, ModelWithPatternWritable, ModelWithPrefixItemsConstantSizeArray, ModelWithProperties, ModelWithPropertiesWritable, ModelWithReadOnlyAndWriteOnly, ModelWithReadOnlyAndWriteOnlyWritable, ModelWithReference, ModelWithReferenceWritable, ModelWithString, ModelWithStringError, MultipartRequestData, MultipartResponseData, MultipartResponseResponse, MultipartResponseResponses, NestedAnyOfArraysNullable, NonAsciiæøåÆøÅöôêÊ字符串Data, NonAsciiæøåÆøÅöôêÊ字符串Response, NonAsciiæøåÆøÅöôêÊ字符串Responses, NonAsciiStringæøåÆøÅöôêÊ字符串, NullableObject, OneOfAllOfIssue, OneOfAllOfIssueWritable, OptionsCallWithoutParametersAndResponseData, Pageable, ParameterSimpleParameterUnused, PatchApiVbyApiVersionNoTagData, PatchApiVbyApiVersionNoTagResponses, PatchCallWithoutParametersAndResponseData, PostApiVbyApiVersionFormDataData, PostApiVbyApiVersionRequestBodyData, PostCallWithOptionalParamData, PostCallWithOptionalParamResponse, PostCallWithOptionalParamResponses, PostCallWithoutParametersAndResponseData, PostServiceWithEmptyTagResponse, PostServiceWithEmptyTagResponse2, PutCallWithoutParametersAndResponseData, PutWithFormUrlEncodedData, SchemaWithFormRestrictedKeys, SimpleBoolean, SimpleFile, SimpleFormData, SimpleInteger, SimpleParameter, SimpleReference, SimpleRequestBody, SimpleString, SimpleStringWithPattern, TestErrorCodeData, TestErrorCodeErrors, TestErrorCodeResponses, TypesData, TypesResponse, TypesResponses, UploadFileData, UploadFileResponse, UploadFileResponses, XFooBar } from './types.gen';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/solid-query/fetch/sdk.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport { type Client, formDataBodySerializer, type Options as Options2, type TDataShape, urlSearchParamsBodySerializer } from './client';\nimport { client } from './client.gen';\nimport type { ApiVVersionODataControllerCountData, ApiVVersionODataControllerCountResponses, CallToTestOrderOfParamsData, CallWithDefaultOptionalParametersData, CallWithDefaultParametersData, CallWithDescriptionsData, CallWithDuplicateResponsesData, CallWithDuplicateResponsesErrors, CallWithDuplicateResponsesResponses, CallWithNoContentResponseData, CallWithNoContentResponseResponses, CallWithParametersData, CallWithResponseAndNoContentResponseData, CallWithResponseAndNoContentResponseResponses, CallWithResponseData, CallWithResponseResponses, CallWithResponsesData, CallWithResponsesErrors, CallWithResponsesResponses, CallWithResultFromHeaderData, CallWithResultFromHeaderErrors, CallWithResultFromHeaderResponses, CallWithWeirdParameterNamesData, CollectionFormatData, ComplexParamsData, ComplexParamsResponses, ComplexTypesData, ComplexTypesErrors, ComplexTypesResponses, DeleteCallWithoutParametersAndResponseData, DeleteFooData3, DeprecatedCallData, DummyAData, DummyAResponses, DummyBData, DummyBResponses, DuplicateName2Data, DuplicateName3Data, DuplicateName4Data, DuplicateNameData, ExportData, FileResponseData, FileResponseResponses, FooWowData, FooWowResponses, GetApiVbyApiVersionSimpleOperationData, GetApiVbyApiVersionSimpleOperationErrors, GetApiVbyApiVersionSimpleOperationResponses, GetCallWithOptionalParamData, GetCallWithoutParametersAndResponseData, HeadCallWithoutParametersAndResponseData, ImportData, ImportResponses, MultipartRequestData, MultipartResponseData, MultipartResponseResponses, NonAsciiæøåÆøÅöôêÊ字符串Data, NonAsciiæøåÆøÅöôêÊ字符串Responses, OptionsCallWithoutParametersAndResponseData, PatchApiVbyApiVersionNoTagData, PatchApiVbyApiVersionNoTagResponses, PatchCallWithoutParametersAndResponseData, PostApiVbyApiVersionFormDataData, PostApiVbyApiVersionRequestBodyData, PostCallWithOptionalParamData, PostCallWithOptionalParamResponses, PostCallWithoutParametersAndResponseData, PutCallWithoutParametersAndResponseData, PutWithFormUrlEncodedData, TestErrorCodeData, TestErrorCodeErrors, TestErrorCodeResponses, TypesData, TypesResponses, UploadFileData, UploadFileResponses } from './types.gen';\n\nexport type Options<TData extends TDataShape = TDataShape, ThrowOnError extends boolean = boolean> = Options2<TData, ThrowOnError> & {\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\nexport const export_ = <ThrowOnError extends boolean = false>(options?: Options<ExportData, ThrowOnError>) => (options?.client ?? client).get<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/no+tag', ...options });\n\nexport const patchApiVbyApiVersionNoTag = <ThrowOnError extends boolean = false>(options?: Options<PatchApiVbyApiVersionNoTagData, ThrowOnError>) => (options?.client ?? client).patch<PatchApiVbyApiVersionNoTagResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/no+tag', ...options });\n\nexport const import_ = <ThrowOnError extends boolean = false>(options: Options<ImportData, ThrowOnError>) => (options.client ?? client).post<ImportResponses, unknown, ThrowOnError>({\n    url: '/api/v{api-version}/no+tag',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options.headers\n    }\n});\n\nexport const fooWow = <ThrowOnError extends boolean = false>(options?: Options<FooWowData, ThrowOnError>) => (options?.client ?? client).put<FooWowResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/no+tag', ...options });\n\nexport const apiVVersionODataControllerCount = <ThrowOnError extends boolean = false>(options?: Options<ApiVVersionODataControllerCountData, ThrowOnError>) => (options?.client ?? client).get<ApiVVersionODataControllerCountResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple/$count', ...options });\n\nexport const getApiVbyApiVersionSimpleOperation = <ThrowOnError extends boolean = false>(options: Options<GetApiVbyApiVersionSimpleOperationData, ThrowOnError>) => (options.client ?? client).get<GetApiVbyApiVersionSimpleOperationResponses, GetApiVbyApiVersionSimpleOperationErrors, ThrowOnError>({ url: '/api/v{api-version}/simple:operation', ...options });\n\nexport const deleteCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<DeleteCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).delete<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const getCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<GetCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).get<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const headCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<HeadCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).head<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const optionsCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<OptionsCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).options<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const patchCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<PatchCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).patch<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const postCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<PostCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).post<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const putCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<PutCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).put<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const deleteFoo = <ThrowOnError extends boolean = false>(options: Options<DeleteFooData3, ThrowOnError>) => (options.client ?? client).delete<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/foo/{foo_param}/bar/{BarParam}', ...options });\n\nexport const callWithDescriptions = <ThrowOnError extends boolean = false>(options?: Options<CallWithDescriptionsData, ThrowOnError>) => (options?.client ?? client).post<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/descriptions', ...options });\n\n/**\n * @deprecated\n */\nexport const deprecatedCall = <ThrowOnError extends boolean = false>(options: Options<DeprecatedCallData, ThrowOnError>) => (options.client ?? client).post<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/parameters/deprecated', ...options });\n\nexport const callWithParameters = <ThrowOnError extends boolean = false>(options: Options<CallWithParametersData, ThrowOnError>) => (options.client ?? client).post<unknown, unknown, ThrowOnError>({\n    url: '/api/v{api-version}/parameters/{parameterPath}',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options.headers\n    }\n});\n\nexport const callWithWeirdParameterNames = <ThrowOnError extends boolean = false>(options: Options<CallWithWeirdParameterNamesData, ThrowOnError>) => (options.client ?? client).post<unknown, unknown, ThrowOnError>({\n    url: '/api/v{api-version}/parameters/{parameter.path.1}/{parameter-path-2}/{PARAMETER-PATH-3}',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options.headers\n    }\n});\n\nexport const getCallWithOptionalParam = <ThrowOnError extends boolean = false>(options: Options<GetCallWithOptionalParamData, ThrowOnError>) => (options.client ?? client).get<unknown, unknown, ThrowOnError>({\n    url: '/api/v{api-version}/parameters',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options.headers\n    }\n});\n\nexport const postCallWithOptionalParam = <ThrowOnError extends boolean = false>(options: Options<PostCallWithOptionalParamData, ThrowOnError>) => (options.client ?? client).post<PostCallWithOptionalParamResponses, unknown, ThrowOnError>({\n    url: '/api/v{api-version}/parameters',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options.headers\n    }\n});\n\nexport const postApiVbyApiVersionRequestBody = <ThrowOnError extends boolean = false>(options?: Options<PostApiVbyApiVersionRequestBodyData, ThrowOnError>) => (options?.client ?? client).post<unknown, unknown, ThrowOnError>({\n    url: '/api/v{api-version}/requestBody',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options?.headers\n    }\n});\n\nexport const postApiVbyApiVersionFormData = <ThrowOnError extends boolean = false>(options?: Options<PostApiVbyApiVersionFormDataData, ThrowOnError>) => (options?.client ?? client).post<unknown, unknown, ThrowOnError>({\n    ...formDataBodySerializer,\n    url: '/api/v{api-version}/formData',\n    ...options,\n    headers: {\n        'Content-Type': null,\n        ...options?.headers\n    }\n});\n\nexport const callWithDefaultParameters = <ThrowOnError extends boolean = false>(options?: Options<CallWithDefaultParametersData, ThrowOnError>) => (options?.client ?? client).get<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/defaults', ...options });\n\nexport const callWithDefaultOptionalParameters = <ThrowOnError extends boolean = false>(options?: Options<CallWithDefaultOptionalParametersData, ThrowOnError>) => (options?.client ?? client).post<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/defaults', ...options });\n\nexport const callToTestOrderOfParams = <ThrowOnError extends boolean = false>(options: Options<CallToTestOrderOfParamsData, ThrowOnError>) => (options.client ?? client).put<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/defaults', ...options });\n\nexport const duplicateName = <ThrowOnError extends boolean = false>(options?: Options<DuplicateNameData, ThrowOnError>) => (options?.client ?? client).delete<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/duplicate', ...options });\n\nexport const duplicateName2 = <ThrowOnError extends boolean = false>(options?: Options<DuplicateName2Data, ThrowOnError>) => (options?.client ?? client).get<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/duplicate', ...options });\n\nexport const duplicateName3 = <ThrowOnError extends boolean = false>(options?: Options<DuplicateName3Data, ThrowOnError>) => (options?.client ?? client).post<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/duplicate', ...options });\n\nexport const duplicateName4 = <ThrowOnError extends boolean = false>(options?: Options<DuplicateName4Data, ThrowOnError>) => (options?.client ?? client).put<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/duplicate', ...options });\n\nexport const callWithNoContentResponse = <ThrowOnError extends boolean = false>(options?: Options<CallWithNoContentResponseData, ThrowOnError>) => (options?.client ?? client).get<CallWithNoContentResponseResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/no-content', ...options });\n\nexport const callWithResponseAndNoContentResponse = <ThrowOnError extends boolean = false>(options?: Options<CallWithResponseAndNoContentResponseData, ThrowOnError>) => (options?.client ?? client).get<CallWithResponseAndNoContentResponseResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/multiple-tags/response-and-no-content', ...options });\n\nexport const dummyA = <ThrowOnError extends boolean = false>(options?: Options<DummyAData, ThrowOnError>) => (options?.client ?? client).get<DummyAResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/multiple-tags/a', ...options });\n\nexport const dummyB = <ThrowOnError extends boolean = false>(options?: Options<DummyBData, ThrowOnError>) => (options?.client ?? client).get<DummyBResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/multiple-tags/b', ...options });\n\nexport const callWithResponse = <ThrowOnError extends boolean = false>(options?: Options<CallWithResponseData, ThrowOnError>) => (options?.client ?? client).get<CallWithResponseResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/response', ...options });\n\nexport const callWithDuplicateResponses = <ThrowOnError extends boolean = false>(options?: Options<CallWithDuplicateResponsesData, ThrowOnError>) => (options?.client ?? client).post<CallWithDuplicateResponsesResponses, CallWithDuplicateResponsesErrors, ThrowOnError>({ url: '/api/v{api-version}/response', ...options });\n\nexport const callWithResponses = <ThrowOnError extends boolean = false>(options?: Options<CallWithResponsesData, ThrowOnError>) => (options?.client ?? client).put<CallWithResponsesResponses, CallWithResponsesErrors, ThrowOnError>({ url: '/api/v{api-version}/response', ...options });\n\nexport const collectionFormat = <ThrowOnError extends boolean = false>(options: Options<CollectionFormatData, ThrowOnError>) => (options.client ?? client).get<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/collectionFormat', ...options });\n\nexport const types = <ThrowOnError extends boolean = false>(options: Options<TypesData, ThrowOnError>) => (options.client ?? client).get<TypesResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/types', ...options });\n\nexport const uploadFile = <ThrowOnError extends boolean = false>(options: Options<UploadFileData, ThrowOnError>) => (options.client ?? client).post<UploadFileResponses, unknown, ThrowOnError>({\n    ...urlSearchParamsBodySerializer,\n    url: '/api/v{api-version}/upload',\n    ...options,\n    headers: {\n        'Content-Type': 'application/x-www-form-urlencoded',\n        ...options.headers\n    }\n});\n\nexport const fileResponse = <ThrowOnError extends boolean = false>(options: Options<FileResponseData, ThrowOnError>) => (options.client ?? client).get<FileResponseResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/file/{id}', ...options });\n\nexport const complexTypes = <ThrowOnError extends boolean = false>(options: Options<ComplexTypesData, ThrowOnError>) => (options.client ?? client).get<ComplexTypesResponses, ComplexTypesErrors, ThrowOnError>({\n    querySerializer: { parameters: { parameterObject: { object: { style: 'form' } } } },\n    url: '/api/v{api-version}/complex',\n    ...options\n});\n\nexport const multipartResponse = <ThrowOnError extends boolean = false>(options?: Options<MultipartResponseData, ThrowOnError>) => (options?.client ?? client).get<MultipartResponseResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/multipart', ...options });\n\nexport const multipartRequest = <ThrowOnError extends boolean = false>(options?: Options<MultipartRequestData, ThrowOnError>) => (options?.client ?? client).post<unknown, unknown, ThrowOnError>({\n    ...formDataBodySerializer,\n    url: '/api/v{api-version}/multipart',\n    ...options,\n    headers: {\n        'Content-Type': null,\n        ...options?.headers\n    }\n});\n\nexport const complexParams = <ThrowOnError extends boolean = false>(options: Options<ComplexParamsData, ThrowOnError>) => (options.client ?? client).put<ComplexParamsResponses, unknown, ThrowOnError>({\n    url: '/api/v{api-version}/complex/{id}',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json-patch+json',\n        ...options.headers\n    }\n});\n\nexport const callWithResultFromHeader = <ThrowOnError extends boolean = false>(options?: Options<CallWithResultFromHeaderData, ThrowOnError>) => (options?.client ?? client).post<CallWithResultFromHeaderResponses, CallWithResultFromHeaderErrors, ThrowOnError>({ url: '/api/v{api-version}/header', ...options });\n\nexport const testErrorCode = <ThrowOnError extends boolean = false>(options: Options<TestErrorCodeData, ThrowOnError>) => (options.client ?? client).post<TestErrorCodeResponses, TestErrorCodeErrors, ThrowOnError>({ url: '/api/v{api-version}/error', ...options });\n\nexport const nonAsciiæøåÆøÅöôêÊ字符串 = <ThrowOnError extends boolean = false>(options: Options<NonAsciiæøåÆøÅöôêÊ字符串Data, ThrowOnError>) => (options.client ?? client).post<NonAsciiæøåÆøÅöôêÊ字符串Responses, unknown, ThrowOnError>({ url: '/api/v{api-version}/non-ascii-æøåÆØÅöôêÊ字符串', ...options });\n\n/**\n * Login User\n */\nexport const putWithFormUrlEncoded = <ThrowOnError extends boolean = false>(options: Options<PutWithFormUrlEncodedData, ThrowOnError>) => (options.client ?? client).put<unknown, unknown, ThrowOnError>({\n    ...urlSearchParamsBodySerializer,\n    url: '/api/v{api-version}/non-ascii-æøåÆØÅöôêÊ字符串',\n    ...options,\n    headers: {\n        'Content-Type': 'application/x-www-form-urlencoded',\n        ...options.headers\n    }\n});\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/solid-query/fetch/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type ClientOptions = {\n    baseUrl: 'http://localhost:3000/base' | (string & {});\n};\n\n/**\n * Model with number-only name\n */\nexport type _400 = string;\n\n/**\n * External ref to shared model (A)\n */\nexport type ExternalRefA = ExternalSharedModel;\n\n/**\n * External ref to shared model (B)\n */\nexport type ExternalRefB = ExternalSharedModel;\n\n/**\n * Testing multiline comments in string: First line\n * Second line\n *\n * Fourth line\n */\nexport type CamelCaseCommentWithBreaks = number;\n\n/**\n * Testing multiline comments in string: First line\n * Second line\n *\n * Fourth line\n */\nexport type CommentWithBreaks = number;\n\n/**\n * Testing backticks in string: `backticks` and ```multiple backticks``` should work\n */\nexport type CommentWithBackticks = number;\n\n/**\n * Testing backticks and quotes in string: `backticks`, 'quotes', \"double quotes\" and ```multiple backticks``` should work\n */\nexport type CommentWithBackticksAndQuotes = number;\n\n/**\n * Testing slashes in string: \\backwards\\\\\\ and /forwards/// should work\n */\nexport type CommentWithSlashes = number;\n\n/**\n * Testing expression placeholders in string: ${expression} should work\n */\nexport type CommentWithExpressionPlaceholders = number;\n\n/**\n * Testing quotes in string: 'single quote''' and \"double quotes\"\"\" should work\n */\nexport type CommentWithQuotes = number;\n\n/**\n * Testing reserved characters in string: * inline * and ** inline ** should work\n */\nexport type CommentWithReservedCharacters = number;\n\n/**\n * This is a simple number\n */\nexport type SimpleInteger = number;\n\n/**\n * This is a simple boolean\n */\nexport type SimpleBoolean = boolean;\n\n/**\n * This is a simple string\n */\nexport type SimpleString = string;\n\n/**\n * A string with non-ascii (unicode) characters valid in typescript identifiers (æøåÆØÅöÔèÈ字符串)\n */\nexport type NonAsciiStringæøåÆøÅöôêÊ字符串 = string;\n\n/**\n * This is a simple file\n */\nexport type SimpleFile = Blob | File;\n\n/**\n * This is a simple reference\n */\nexport type SimpleReference = ModelWithString;\n\n/**\n * This is a simple string\n */\nexport type SimpleStringWithPattern = string | null;\n\n/**\n * This is a simple enum with strings\n */\nexport type EnumWithStrings = 'Success' | 'Warning' | 'Error' | '\\'Single Quote\\'' | '\"Double Quotes\"' | 'Non-ascii: øæåôöØÆÅÔÖ字符串';\n\nexport type EnumWithReplacedCharacters = '\\'Single Quote\\'' | '\"Double Quotes\"' | 'øæåôöØÆÅÔÖ字符串' | 3.1 | '';\n\n/**\n * This is a simple enum with numbers\n */\nexport type EnumWithNumbers = 1 | 2 | 3 | 1.1 | 1.2 | 1.3 | 100 | 200 | 300 | -100 | -200 | -300 | -1.1 | -1.2 | -1.3;\n\n/**\n * Success=1,Warning=2,Error=3\n */\nexport type EnumFromDescription = number;\n\n/**\n * This is a simple enum with numbers\n */\nexport type EnumWithExtensions = 200 | 400 | 500;\n\nexport type EnumWithXEnumNames = 0 | 1 | 2;\n\n/**\n * This is a simple array with numbers\n */\nexport type ArrayWithNumbers = Array<number>;\n\n/**\n * This is a simple array with booleans\n */\nexport type ArrayWithBooleans = Array<boolean>;\n\n/**\n * This is a simple array with strings\n */\nexport type ArrayWithStrings = Array<string>;\n\n/**\n * This is a simple array with references\n */\nexport type ArrayWithReferences = Array<ModelWithString>;\n\n/**\n * This is a simple array containing an array\n */\nexport type ArrayWithArray = Array<Array<ModelWithString>>;\n\n/**\n * This is a simple array with properties\n */\nexport type ArrayWithProperties = Array<{\n    '16x16'?: CamelCaseCommentWithBreaks;\n    bar?: string;\n}>;\n\n/**\n * This is a simple array with any of properties\n */\nexport type ArrayWithAnyOfProperties = Array<{\n    foo?: string;\n} | {\n    bar?: string;\n}>;\n\nexport type AnyOfAnyAndNull = {\n    data?: unknown | null;\n};\n\n/**\n * This is a simple array with any of properties\n */\nexport type AnyOfArrays = {\n    results?: Array<{\n        foo?: string;\n    } | {\n        bar?: string;\n    }>;\n};\n\n/**\n * This is a string dictionary\n */\nexport type DictionaryWithString = {\n    [key: string]: string;\n};\n\nexport type DictionaryWithPropertiesAndAdditionalProperties = {\n    foo?: number;\n    bar?: boolean;\n    [key: string]: string | number | boolean | undefined;\n};\n\n/**\n * This is a string reference\n */\nexport type DictionaryWithReference = {\n    [key: string]: ModelWithString;\n};\n\n/**\n * This is a complex dictionary\n */\nexport type DictionaryWithArray = {\n    [key: string]: Array<ModelWithString>;\n};\n\n/**\n * This is a string dictionary\n */\nexport type DictionaryWithDictionary = {\n    [key: string]: {\n        [key: string]: string;\n    };\n};\n\n/**\n * This is a complex dictionary\n */\nexport type DictionaryWithProperties = {\n    [key: string]: {\n        foo?: string;\n        bar?: string;\n    };\n};\n\n/**\n * This is a model with one number property\n */\nexport type ModelWithInteger = {\n    /**\n     * This is a simple number property\n     */\n    prop?: number;\n};\n\n/**\n * This is a model with one boolean property\n */\nexport type ModelWithBoolean = {\n    /**\n     * This is a simple boolean property\n     */\n    prop?: boolean;\n};\n\n/**\n * This is a model with one string property\n */\nexport type ModelWithString = {\n    /**\n     * This is a simple string property\n     */\n    prop?: string;\n};\n\n/**\n * This is a model with one string property\n */\nexport type ModelWithStringError = {\n    /**\n     * This is a simple string property\n     */\n    prop?: string;\n};\n\n/**\n * `Comment` or `VoiceComment`. The JSON object for adding voice comments to tickets is different. See [Adding voice comments to tickets](/documentation/ticketing/managing-tickets/adding-voice-comments-to-tickets)\n */\nexport type ModelFromZendesk = string;\n\n/**\n * This is a model with one string property\n */\nexport type ModelWithNullableString = {\n    /**\n     * This is a simple string property\n     */\n    nullableProp1?: string | null;\n    /**\n     * This is a simple string property\n     */\n    nullableRequiredProp1: string | null;\n    /**\n     * This is a simple string property\n     */\n    nullableProp2?: string | null;\n    /**\n     * This is a simple string property\n     */\n    nullableRequiredProp2: string | null;\n    /**\n     * This is a simple enum with strings\n     */\n    'foo_bar-enum'?: 'Success' | 'Warning' | 'Error' | 'ØÆÅ字符串';\n};\n\n/**\n * This is a model with one enum\n */\nexport type ModelWithEnum = {\n    /**\n     * This is a simple enum with strings\n     */\n    'foo_bar-enum'?: 'Success' | 'Warning' | 'Error' | 'ØÆÅ字符串';\n    /**\n     * These are the HTTP error code enums\n     */\n    statusCode?: '100' | '200 FOO' | '300 FOO_BAR' | '400 foo-bar' | '500 foo.bar' | '600 foo&bar';\n    /**\n     * Simple boolean enum\n     */\n    bool?: true;\n};\n\n/**\n * This is a model with one enum with escaped name\n */\nexport type ModelWithEnumWithHyphen = {\n    /**\n     * Foo-Bar-Baz-Qux\n     */\n    'foo-bar-baz-qux'?: '3.0';\n};\n\n/**\n * This is a model with one enum\n */\nexport type ModelWithEnumFromDescription = {\n    /**\n     * Success=1,Warning=2,Error=3\n     */\n    test?: number;\n};\n\n/**\n * This is a model with nested enums\n */\nexport type ModelWithNestedEnums = {\n    dictionaryWithEnum?: {\n        [key: string]: 'Success' | 'Warning' | 'Error';\n    };\n    dictionaryWithEnumFromDescription?: {\n        [key: string]: number;\n    };\n    arrayWithEnum?: Array<'Success' | 'Warning' | 'Error'>;\n    arrayWithDescription?: Array<number>;\n    /**\n     * This is a simple enum with strings\n     */\n    'foo_bar-enum'?: 'Success' | 'Warning' | 'Error' | 'ØÆÅ字符串';\n};\n\n/**\n * This is a model with one property containing a reference\n */\nexport type ModelWithReference = {\n    prop?: ModelWithProperties;\n};\n\n/**\n * This is a model with one property containing an array\n */\nexport type ModelWithArrayReadOnlyAndWriteOnly = {\n    prop?: Array<ModelWithReadOnlyAndWriteOnly>;\n    propWithFile?: Array<Blob | File>;\n    propWithNumber?: Array<number>;\n};\n\n/**\n * This is a model with one property containing an array\n */\nexport type ModelWithArray = {\n    prop?: Array<ModelWithString>;\n    propWithFile?: Array<Blob | File>;\n    propWithNumber?: Array<number>;\n};\n\n/**\n * This is a model with one property containing a dictionary\n */\nexport type ModelWithDictionary = {\n    prop?: {\n        [key: string]: string;\n    };\n};\n\n/**\n * This is a deprecated model with a deprecated property\n *\n * @deprecated\n */\nexport type DeprecatedModel = {\n    /**\n     * This is a deprecated property\n     *\n     * @deprecated\n     */\n    prop?: string;\n};\n\n/**\n * This is a model with one property containing a circular reference\n */\nexport type ModelWithCircularReference = {\n    prop?: ModelWithCircularReference;\n};\n\n/**\n * This is a model with one property with a 'one of' relationship\n */\nexport type CompositionWithOneOf = {\n    propA?: ModelWithString | ModelWithEnum | ModelWithArray | ModelWithDictionary;\n};\n\n/**\n * This is a model with one property with a 'one of' relationship where the options are not $ref\n */\nexport type CompositionWithOneOfAnonymous = {\n    propA?: {\n        propA?: string;\n    } | string | number;\n};\n\n/**\n * Circle\n */\nexport type ModelCircle = {\n    kind: string;\n    radius?: number;\n};\n\n/**\n * Square\n */\nexport type ModelSquare = {\n    kind: string;\n    sideLength?: number;\n};\n\n/**\n * This is a model with one property with a 'one of' relationship where the options are not $ref\n */\nexport type CompositionWithOneOfDiscriminator = ({\n    kind: 'circle';\n} & ModelCircle) | ({\n    kind: 'square';\n} & ModelSquare);\n\n/**\n * This is a model with one property with a 'any of' relationship\n */\nexport type CompositionWithAnyOf = {\n    propA?: ModelWithString | ModelWithEnum | ModelWithArray | ModelWithDictionary;\n};\n\n/**\n * This is a model with one property with a 'any of' relationship where the options are not $ref\n */\nexport type CompositionWithAnyOfAnonymous = {\n    propA?: {\n        propA?: string;\n    } | string | number;\n};\n\n/**\n * This is a model with nested 'any of' property with a type null\n */\nexport type CompositionWithNestedAnyAndTypeNull = {\n    propA?: Array<ModelWithDictionary | null> | Array<ModelWithArray | null>;\n};\n\nexport type _3eNum1Период = 'Bird' | 'Dog';\n\nexport type ConstValue = 'ConstValue';\n\n/**\n * This is a model with one property with a 'any of' relationship where the options are not $ref\n */\nexport type CompositionWithNestedAnyOfAndNull = {\n    /**\n     * Scopes\n     */\n    propA?: Array<_3eNum1Период | ConstValue> | null;\n};\n\n/**\n * This is a model with one property with a 'one of' relationship\n */\nexport type CompositionWithOneOfAndNullable = {\n    propA?: {\n        boolean?: boolean;\n    } | ModelWithEnum | ModelWithArray | ModelWithDictionary | null;\n};\n\n/**\n * This is a model that contains a simple dictionary within composition\n */\nexport type CompositionWithOneOfAndSimpleDictionary = {\n    propA?: boolean | {\n        [key: string]: number;\n    };\n};\n\n/**\n * This is a model that contains a dictionary of simple arrays within composition\n */\nexport type CompositionWithOneOfAndSimpleArrayDictionary = {\n    propA?: boolean | {\n        [key: string]: Array<boolean>;\n    };\n};\n\n/**\n * This is a model that contains a dictionary of complex arrays (composited) within composition\n */\nexport type CompositionWithOneOfAndComplexArrayDictionary = {\n    propA?: boolean | {\n        [key: string]: Array<number | string>;\n    };\n};\n\n/**\n * This is a model with one property with a 'all of' relationship\n */\nexport type CompositionWithAllOfAndNullable = {\n    propA?: ({\n        boolean?: boolean;\n    } & ModelWithEnum & ModelWithArray & ModelWithDictionary) | null;\n};\n\n/**\n * This is a model with one property with a 'any of' relationship\n */\nexport type CompositionWithAnyOfAndNullable = {\n    propA?: {\n        boolean?: boolean;\n    } | ModelWithEnum | ModelWithArray | ModelWithDictionary | null;\n};\n\n/**\n * This is a base model with two simple optional properties\n */\nexport type CompositionBaseModel = {\n    firstName?: string;\n    lastname?: string;\n};\n\n/**\n * This is a model that extends the base model\n */\nexport type CompositionExtendedModel = CompositionBaseModel & {\n    age: number;\n    firstName: string;\n    lastname: string;\n};\n\n/**\n * This is a model with one nested property\n */\nexport type ModelWithProperties = {\n    required: string;\n    readonly requiredAndReadOnly: string;\n    requiredAndNullable: string | null;\n    string?: string;\n    number?: number;\n    boolean?: boolean;\n    reference?: ModelWithString;\n    'property with space'?: string;\n    default?: string;\n    try?: string;\n    readonly '@namespace.string'?: string;\n    readonly '@namespace.integer'?: number;\n};\n\n/**\n * This is a model with one nested property\n */\nexport type ModelWithNestedProperties = {\n    readonly first: {\n        readonly second: {\n            readonly third: string | null;\n        } | null;\n    } | null;\n};\n\n/**\n * This is a model with duplicated properties\n */\nexport type ModelWithDuplicateProperties = {\n    prop?: ModelWithString;\n};\n\n/**\n * This is a model with ordered properties\n */\nexport type ModelWithOrderedProperties = {\n    zebra?: string;\n    apple?: string;\n    hawaii?: string;\n};\n\n/**\n * This is a model with duplicated imports\n */\nexport type ModelWithDuplicateImports = {\n    propA?: ModelWithString;\n    propB?: ModelWithString;\n    propC?: ModelWithString;\n};\n\n/**\n * This is a model that extends another model\n */\nexport type ModelThatExtends = ModelWithString & {\n    propExtendsA?: string;\n    propExtendsB?: ModelWithString;\n};\n\n/**\n * This is a model that extends another model\n */\nexport type ModelThatExtendsExtends = ModelWithString & ModelThatExtends & {\n    propExtendsC?: string;\n    propExtendsD?: ModelWithString;\n};\n\n/**\n * This is a model that contains a some patterns\n */\nexport type ModelWithPattern = {\n    key: string;\n    name: string;\n    readonly enabled?: boolean;\n    readonly modified?: string;\n    id?: string;\n    text?: string;\n    patternWithSingleQuotes?: string;\n    patternWithNewline?: string;\n    patternWithBacktick?: string;\n    patternWithUnicode?: string;\n};\n\nexport type File = {\n    /**\n     * Id\n     */\n    readonly id?: string;\n    /**\n     * Updated at\n     */\n    readonly updated_at?: string;\n    /**\n     * Created at\n     */\n    readonly created_at?: string;\n    /**\n     * Mime\n     */\n    mime: string;\n    /**\n     * File\n     */\n    readonly file?: string;\n};\n\nexport type Default = {\n    name?: string;\n};\n\nexport type Pageable = {\n    page?: number;\n    size?: number;\n    sort?: Array<string>;\n};\n\n/**\n * This is a free-form object without additionalProperties.\n */\nexport type FreeFormObjectWithoutAdditionalProperties = {\n    [key: string]: unknown;\n};\n\n/**\n * This is a free-form object with additionalProperties: true.\n */\nexport type FreeFormObjectWithAdditionalPropertiesEqTrue = {\n    [key: string]: unknown;\n};\n\n/**\n * This is a free-form object with additionalProperties: {}.\n */\nexport type FreeFormObjectWithAdditionalPropertiesEqEmptyObject = {\n    [key: string]: unknown;\n};\n\nexport type ModelWithConst = {\n    String?: 'String';\n    number?: 0;\n    null?: null;\n    withType?: 'Some string';\n};\n\n/**\n * This is a model with one property and additionalProperties: true\n */\nexport type ModelWithAdditionalPropertiesEqTrue = {\n    /**\n     * This is a simple string property\n     */\n    prop?: string;\n    [key: string]: unknown;\n};\n\nexport type NestedAnyOfArraysNullable = {\n    nullableArray?: Array<string | boolean> | null;\n};\n\nexport type CompositionWithOneOfAndProperties = ({\n    foo: SimpleParameter;\n} | {\n    bar: NonAsciiStringæøåÆøÅöôêÊ字符串;\n}) & {\n    baz: number | null;\n    qux: number;\n};\n\n/**\n * An object that can be null\n */\nexport type NullableObject = {\n    foo?: string;\n} | null;\n\n/**\n * Some % character\n */\nexport type CharactersInDescription = string;\n\nexport type ModelWithNullableObject = {\n    data?: NullableObject;\n};\n\n/**\n * An object with additional properties that can be null (anyOf ref + null)\n */\nexport type ModelWithAdditionalPropertiesRef = {\n    [key: string]: NullableObject | null;\n};\n\nexport type ModelWithOneOfEnum = {\n    foo: 'Bar';\n} | {\n    foo: 'Baz';\n} | {\n    foo: 'Qux';\n} | {\n    content: string;\n    foo: 'Quux';\n} | {\n    content: [\n        string,\n        string\n    ];\n    foo: 'Corge';\n};\n\nexport type ModelWithNestedArrayEnumsDataFoo = 'foo' | 'bar';\n\nexport type ModelWithNestedArrayEnumsDataBar = 'baz' | 'qux';\n\nexport type ModelWithNestedArrayEnumsData = {\n    foo?: Array<ModelWithNestedArrayEnumsDataFoo>;\n    bar?: Array<ModelWithNestedArrayEnumsDataBar>;\n};\n\nexport type ModelWithNestedArrayEnums = {\n    array_strings?: Array<string>;\n    data?: ModelWithNestedArrayEnumsData;\n};\n\nexport type ModelWithNestedCompositionEnums = {\n    foo?: ModelWithNestedArrayEnumsDataFoo;\n};\n\nexport type ModelWithReadOnlyAndWriteOnly = {\n    foo: string;\n    readonly bar: string;\n};\n\nexport type ModelWithConstantSizeArray = [\n    number,\n    number\n];\n\nexport type ModelWithAnyOfConstantSizeArray = [\n    number | string,\n    number | string,\n    number | string\n];\n\nexport type ModelWithPrefixItemsConstantSizeArray = [\n    ModelWithInteger,\n    number | string,\n    string\n];\n\nexport type ModelWithAnyOfConstantSizeArrayNullable = [\n    number | null | string,\n    number | null | string,\n    number | null | string\n];\n\nexport type ModelWithAnyOfConstantSizeArrayWithNSizeAndOptions = [\n    number | Import,\n    number | Import\n];\n\nexport type ModelWithAnyOfConstantSizeArrayAndIntersect = [\n    number & string,\n    number & string\n];\n\nexport type ModelWithNumericEnumUnion = {\n    /**\n     * Период\n     */\n    value?: -10 | -1 | 0 | 1 | 3 | 6 | 12;\n};\n\n/**\n * Some description with `back ticks`\n */\nexport type ModelWithBackticksInDescription = {\n    /**\n     * The template `that` should be used for parsing and importing the contents of the CSV file.\n     *\n     * <br/><p>There is one placeholder currently supported:<ul>     <li><b>${x}</b> - refers to the n-th column in the CSV file, e.g. ${1}, ${2}, ...)</li></ul><p>Example of a correct JSON template:</p>\n     * <pre>\n     * [\n     * {\n     * \"resourceType\": \"Asset\",\n     * \"identifier\": {\n     * \"name\": \"${1}\",\n     * \"domain\": {\n     * \"name\": \"${2}\",\n     * \"community\": {\n     * \"name\": \"Some Community\"\n     * }\n     * }\n     * },\n     * \"attributes\" : {\n     * \"00000000-0000-0000-0000-000000003115\" : [ {\n     * \"value\" : \"${3}\"\n     * } ],\n     * \"00000000-0000-0000-0000-000000000222\" : [ {\n     * \"value\" : \"${4}\"\n     * } ]\n     * }\n     * }\n     * ]\n     * </pre>\n     */\n    template?: string;\n};\n\nexport type ModelWithOneOfAndProperties = (SimpleParameter | NonAsciiStringæøåÆøÅöôêÊ字符串) & {\n    baz: number | null;\n    qux: number;\n};\n\n/**\n * Model used to test deduplication strategy (unused)\n */\nexport type ParameterSimpleParameterUnused = string;\n\n/**\n * Model used to test deduplication strategy\n */\nexport type PostServiceWithEmptyTagResponse = string;\n\n/**\n * Model used to test deduplication strategy\n */\nexport type PostServiceWithEmptyTagResponse2 = string;\n\n/**\n * Model used to test deduplication strategy\n */\nexport type DeleteFooData = string;\n\n/**\n * Model used to test deduplication strategy\n */\nexport type DeleteFooData2 = string;\n\n/**\n * Model with restricted keyword name\n */\nexport type Import = string;\n\nexport type SchemaWithFormRestrictedKeys = {\n    description?: string;\n    'x-enum-descriptions'?: string;\n    'x-enum-varnames'?: string;\n    'x-enumNames'?: string;\n    title?: string;\n    object?: {\n        description?: string;\n        'x-enum-descriptions'?: string;\n        'x-enum-varnames'?: string;\n        'x-enumNames'?: string;\n        title?: string;\n    };\n    array?: Array<{\n        description?: string;\n        'x-enum-descriptions'?: string;\n        'x-enum-varnames'?: string;\n        'x-enumNames'?: string;\n        title?: string;\n    }>;\n};\n\n/**\n * This schema was giving PascalCase transformations a hard time\n */\nexport type IoK8sApimachineryPkgApisMetaV1DeleteOptions = {\n    /**\n     * Must be fulfilled before a deletion is carried out. If not possible, a 409 Conflict status will be returned.\n     */\n    preconditions?: IoK8sApimachineryPkgApisMetaV1Preconditions;\n};\n\n/**\n * This schema was giving PascalCase transformations a hard time\n */\nexport type IoK8sApimachineryPkgApisMetaV1Preconditions = {\n    /**\n     * Specifies the target ResourceVersion\n     */\n    resourceVersion?: string;\n    /**\n     * Specifies the target UID.\n     */\n    uid?: string;\n};\n\nexport type AdditionalPropertiesUnknownIssue = {\n    [key: string]: string | number;\n};\n\nexport type AdditionalPropertiesUnknownIssue2 = {\n    [key: string]: string | number;\n};\n\nexport type AdditionalPropertiesUnknownIssue3 = string & {\n    entries: {\n        [key: string]: AdditionalPropertiesUnknownIssue;\n    };\n};\n\nexport type AdditionalPropertiesIntegerIssue = {\n    value: number;\n    [key: string]: number;\n};\n\nexport type OneOfAllOfIssue = ((ConstValue | GenericSchemaDuplicateIssue1SystemBoolean) & _3eNum1Период) | GenericSchemaDuplicateIssue1SystemString;\n\nexport type GenericSchemaDuplicateIssue1SystemBoolean = {\n    item?: boolean;\n    error?: string | null;\n    readonly hasError?: boolean;\n    data?: {\n        [key: string]: never;\n    };\n};\n\nexport type GenericSchemaDuplicateIssue1SystemString = {\n    item?: string | null;\n    error?: string | null;\n    readonly hasError?: boolean;\n};\n\nexport type ExternalSharedModel = {\n    id: string;\n    name?: string;\n};\n\n/**\n * This is a model with one property containing a reference\n */\nexport type ModelWithReferenceWritable = {\n    prop?: ModelWithPropertiesWritable;\n};\n\n/**\n * This is a model with one property containing an array\n */\nexport type ModelWithArrayReadOnlyAndWriteOnlyWritable = {\n    prop?: Array<ModelWithReadOnlyAndWriteOnlyWritable>;\n    propWithFile?: Array<Blob | File>;\n    propWithNumber?: Array<number>;\n};\n\n/**\n * This is a model with one nested property\n */\nexport type ModelWithPropertiesWritable = {\n    required: string;\n    requiredAndNullable: string | null;\n    string?: string;\n    number?: number;\n    boolean?: boolean;\n    reference?: ModelWithString;\n    'property with space'?: string;\n    default?: string;\n    try?: string;\n};\n\n/**\n * This is a model that contains a some patterns\n */\nexport type ModelWithPatternWritable = {\n    key: string;\n    name: string;\n    id?: string;\n    text?: string;\n    patternWithSingleQuotes?: string;\n    patternWithNewline?: string;\n    patternWithBacktick?: string;\n    patternWithUnicode?: string;\n};\n\nexport type FileWritable = {\n    /**\n     * Mime\n     */\n    mime: string;\n};\n\nexport type ModelWithReadOnlyAndWriteOnlyWritable = {\n    foo: string;\n    baz: string;\n};\n\nexport type ModelWithAnyOfConstantSizeArrayWithNSizeAndOptionsWritable = [\n    number | Import,\n    number | Import\n];\n\nexport type AdditionalPropertiesUnknownIssueWritable = {\n    [key: string]: string | number;\n};\n\nexport type OneOfAllOfIssueWritable = ((ConstValue | GenericSchemaDuplicateIssue1SystemBoolean) & _3eNum1Период) | GenericSchemaDuplicateIssue1SystemString;\n\nexport type GenericSchemaDuplicateIssue1SystemBooleanWritable = {\n    item?: boolean;\n    error?: string | null;\n    data?: {\n        [key: string]: never;\n    };\n};\n\nexport type GenericSchemaDuplicateIssue1SystemStringWritable = {\n    item?: string | null;\n    error?: string | null;\n};\n\n/**\n * This is a reusable parameter\n */\nexport type SimpleParameter = string;\n\n/**\n * Parameter with illegal characters\n */\nexport type XFooBar = ModelWithString;\n\n/**\n * A reusable request body\n */\nexport type SimpleRequestBody = ModelWithString;\n\n/**\n * A reusable request body\n */\nexport type SimpleFormData = ModelWithString;\n\nexport type ExportData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no+tag';\n};\n\nexport type PatchApiVbyApiVersionNoTagData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no+tag';\n};\n\nexport type PatchApiVbyApiVersionNoTagResponses = {\n    /**\n     * OK\n     */\n    default: unknown;\n};\n\nexport type ImportData = {\n    body: ModelWithReadOnlyAndWriteOnlyWritable | ModelWithArrayReadOnlyAndWriteOnlyWritable;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no+tag';\n};\n\nexport type ImportResponses = {\n    /**\n     * Success\n     */\n    200: ModelFromZendesk;\n    /**\n     * Default success response\n     */\n    default: ModelWithReadOnlyAndWriteOnly;\n};\n\nexport type ImportResponse = ImportResponses[keyof ImportResponses];\n\nexport type FooWowData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no+tag';\n};\n\nexport type FooWowResponses = {\n    /**\n     * OK\n     */\n    default: unknown;\n};\n\nexport type ApiVVersionODataControllerCountData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple/$count';\n};\n\nexport type ApiVVersionODataControllerCountResponses = {\n    /**\n     * Success\n     */\n    200: ModelFromZendesk;\n};\n\nexport type ApiVVersionODataControllerCountResponse = ApiVVersionODataControllerCountResponses[keyof ApiVVersionODataControllerCountResponses];\n\nexport type GetApiVbyApiVersionSimpleOperationData = {\n    body?: never;\n    path: {\n        /**\n         * foo in method\n         */\n        foo_param: string;\n    };\n    query?: never;\n    url: '/api/v{api-version}/simple:operation';\n};\n\nexport type GetApiVbyApiVersionSimpleOperationErrors = {\n    /**\n     * Default error response\n     */\n    default: ModelWithBoolean;\n};\n\nexport type GetApiVbyApiVersionSimpleOperationError = GetApiVbyApiVersionSimpleOperationErrors[keyof GetApiVbyApiVersionSimpleOperationErrors];\n\nexport type GetApiVbyApiVersionSimpleOperationResponses = {\n    /**\n     * Response is a simple number\n     */\n    200: number;\n};\n\nexport type GetApiVbyApiVersionSimpleOperationResponse = GetApiVbyApiVersionSimpleOperationResponses[keyof GetApiVbyApiVersionSimpleOperationResponses];\n\nexport type DeleteCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type GetCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type HeadCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type OptionsCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type PatchCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type PostCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type PutCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type DeleteFooData3 = {\n    body?: never;\n    headers: {\n        /**\n         * Parameter with illegal characters\n         */\n        'x-Foo-Bar': ModelWithString;\n    };\n    path: {\n        /**\n         * foo in method\n         */\n        foo_param: string;\n        /**\n         * bar in method\n         */\n        BarParam: string;\n    };\n    query?: never;\n    url: '/api/v{api-version}/foo/{foo_param}/bar/{BarParam}';\n};\n\nexport type CallWithDescriptionsData = {\n    body?: never;\n    path?: never;\n    query?: {\n        /**\n         * Testing multiline comments in string: First line\n         * Second line\n         *\n         * Fourth line\n         */\n        parameterWithBreaks?: string;\n        /**\n         * Testing backticks in string: `backticks` and ```multiple backticks``` should work\n         */\n        parameterWithBackticks?: string;\n        /**\n         * Testing slashes in string: \\backwards\\\\\\ and /forwards/// should work\n         */\n        parameterWithSlashes?: string;\n        /**\n         * Testing expression placeholders in string: ${expression} should work\n         */\n        parameterWithExpressionPlaceholders?: string;\n        /**\n         * Testing quotes in string: 'single quote''' and \"double quotes\"\"\" should work\n         */\n        parameterWithQuotes?: string;\n        /**\n         * Testing reserved characters in string: * inline * and ** inline ** should work\n         */\n        parameterWithReservedCharacters?: string;\n    };\n    url: '/api/v{api-version}/descriptions';\n};\n\nexport type DeprecatedCallData = {\n    body?: never;\n    headers: {\n        /**\n         * This parameter is deprecated\n         *\n         * @deprecated\n         */\n        parameter: DeprecatedModel | null;\n    };\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/parameters/deprecated';\n};\n\nexport type CallWithParametersData = {\n    /**\n     * This is the parameter that goes into the body\n     */\n    body: {\n        [key: string]: unknown;\n    } | null;\n    headers: {\n        /**\n         * This is the parameter that goes into the header\n         */\n        parameterHeader: string | null;\n    };\n    path: {\n        /**\n         * This is the parameter that goes into the path\n         */\n        parameterPath: string | null;\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string | null;\n    };\n    query: {\n        foo_ref_enum?: ModelWithNestedArrayEnumsDataFoo;\n        foo_all_of_enum: ModelWithNestedArrayEnumsDataFoo;\n        /**\n         * This is the parameter that goes into the query params\n         */\n        cursor: string | null;\n    };\n    url: '/api/v{api-version}/parameters/{parameterPath}';\n};\n\nexport type CallWithWeirdParameterNamesData = {\n    /**\n     * This is the parameter that goes into the body\n     */\n    body: ModelWithString | null;\n    headers: {\n        /**\n         * This is the parameter that goes into the request header\n         */\n        'parameter.header': string | null;\n    };\n    path: {\n        /**\n         * This is the parameter that goes into the path\n         */\n        'parameter.path.1'?: string;\n        /**\n         * This is the parameter that goes into the path\n         */\n        'parameter-path-2'?: string;\n        /**\n         * This is the parameter that goes into the path\n         */\n        'PARAMETER-PATH-3'?: string;\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string | null;\n    };\n    query: {\n        /**\n         * This is the parameter with a reserved keyword\n         */\n        default?: string;\n        /**\n         * This is the parameter that goes into the request query params\n         */\n        'parameter-query': string | null;\n    };\n    url: '/api/v{api-version}/parameters/{parameter.path.1}/{parameter-path-2}/{PARAMETER-PATH-3}';\n};\n\nexport type GetCallWithOptionalParamData = {\n    /**\n     * This is a required parameter\n     */\n    body: ModelWithOneOfEnum;\n    path?: never;\n    query?: {\n        /**\n         * This is an optional parameter\n         */\n        page?: number;\n    };\n    url: '/api/v{api-version}/parameters';\n};\n\nexport type PostCallWithOptionalParamData = {\n    /**\n     * This is an optional parameter\n     */\n    body?: {\n        offset?: number | null;\n    };\n    path?: never;\n    query: {\n        /**\n         * This is a required parameter\n         */\n        parameter: Pageable;\n    };\n    url: '/api/v{api-version}/parameters';\n};\n\nexport type PostCallWithOptionalParamResponses = {\n    /**\n     * Response is a simple number\n     */\n    200: number;\n    /**\n     * Success\n     */\n    204: void;\n};\n\nexport type PostCallWithOptionalParamResponse = PostCallWithOptionalParamResponses[keyof PostCallWithOptionalParamResponses];\n\nexport type PostApiVbyApiVersionRequestBodyData = {\n    /**\n     * A reusable request body\n     */\n    body?: SimpleRequestBody;\n    path?: never;\n    query?: {\n        /**\n         * This is a reusable parameter\n         */\n        parameter?: string;\n    };\n    url: '/api/v{api-version}/requestBody';\n};\n\nexport type PostApiVbyApiVersionFormDataData = {\n    /**\n     * A reusable request body\n     */\n    body?: SimpleFormData;\n    path?: never;\n    query?: {\n        /**\n         * This is a reusable parameter\n         */\n        parameter?: string;\n    };\n    url: '/api/v{api-version}/formData';\n};\n\nexport type CallWithDefaultParametersData = {\n    body?: never;\n    path?: never;\n    query?: {\n        /**\n         * This is a simple string with default value\n         */\n        parameterString?: string | null;\n        /**\n         * This is a simple number with default value\n         */\n        parameterNumber?: number | null;\n        /**\n         * This is a simple boolean with default value\n         */\n        parameterBoolean?: boolean | null;\n        /**\n         * This is a simple enum with default value\n         */\n        parameterEnum?: 'Success' | 'Warning' | 'Error';\n        /**\n         * This is a simple model with default value\n         */\n        parameterModel?: ModelWithString | null;\n    };\n    url: '/api/v{api-version}/defaults';\n};\n\nexport type CallWithDefaultOptionalParametersData = {\n    body?: never;\n    path?: never;\n    query?: {\n        /**\n         * This is a simple string that is optional with default value\n         */\n        parameterString?: string;\n        /**\n         * This is a simple number that is optional with default value\n         */\n        parameterNumber?: number;\n        /**\n         * This is a simple boolean that is optional with default value\n         */\n        parameterBoolean?: boolean;\n        /**\n         * This is a simple enum that is optional with default value\n         */\n        parameterEnum?: 'Success' | 'Warning' | 'Error';\n        /**\n         * This is a simple model that is optional with default value\n         */\n        parameterModel?: ModelWithString;\n    };\n    url: '/api/v{api-version}/defaults';\n};\n\nexport type CallToTestOrderOfParamsData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * This is a optional string with default\n         */\n        parameterOptionalStringWithDefault?: string;\n        /**\n         * This is a optional string with empty default\n         */\n        parameterOptionalStringWithEmptyDefault?: string;\n        /**\n         * This is a optional string with no default\n         */\n        parameterOptionalStringWithNoDefault?: string;\n        /**\n         * This is a string with default\n         */\n        parameterStringWithDefault: string;\n        /**\n         * This is a string with empty default\n         */\n        parameterStringWithEmptyDefault: string;\n        /**\n         * This is a string with no default\n         */\n        parameterStringWithNoDefault: string;\n        /**\n         * This is a string that can be null with no default\n         */\n        parameterStringNullableWithNoDefault?: string | null;\n        /**\n         * This is a string that can be null with default\n         */\n        parameterStringNullableWithDefault?: string | null;\n    };\n    url: '/api/v{api-version}/defaults';\n};\n\nexport type DuplicateNameData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/duplicate';\n};\n\nexport type DuplicateName2Data = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/duplicate';\n};\n\nexport type DuplicateName3Data = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/duplicate';\n};\n\nexport type DuplicateName4Data = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/duplicate';\n};\n\nexport type CallWithNoContentResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no-content';\n};\n\nexport type CallWithNoContentResponseResponses = {\n    /**\n     * Success\n     */\n    204: void;\n};\n\nexport type CallWithNoContentResponseResponse = CallWithNoContentResponseResponses[keyof CallWithNoContentResponseResponses];\n\nexport type CallWithResponseAndNoContentResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multiple-tags/response-and-no-content';\n};\n\nexport type CallWithResponseAndNoContentResponseResponses = {\n    /**\n     * Response is a simple number\n     */\n    200: number;\n    /**\n     * Success\n     */\n    204: void;\n};\n\nexport type CallWithResponseAndNoContentResponseResponse = CallWithResponseAndNoContentResponseResponses[keyof CallWithResponseAndNoContentResponseResponses];\n\nexport type DummyAData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multiple-tags/a';\n};\n\nexport type DummyAResponses = {\n    200: _400;\n};\n\nexport type DummyAResponse = DummyAResponses[keyof DummyAResponses];\n\nexport type DummyBData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multiple-tags/b';\n};\n\nexport type DummyBResponses = {\n    /**\n     * Success\n     */\n    204: void;\n};\n\nexport type DummyBResponse = DummyBResponses[keyof DummyBResponses];\n\nexport type CallWithResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/response';\n};\n\nexport type CallWithResponseResponses = {\n    default: Import;\n};\n\nexport type CallWithResponseResponse = CallWithResponseResponses[keyof CallWithResponseResponses];\n\nexport type CallWithDuplicateResponsesData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/response';\n};\n\nexport type CallWithDuplicateResponsesErrors = {\n    /**\n     * Message for 500 error\n     */\n    500: ModelWithStringError;\n    /**\n     * Message for 501 error\n     */\n    501: ModelWithStringError;\n    /**\n     * Message for 502 error\n     */\n    502: ModelWithStringError;\n    /**\n     * Message for 4XX errors\n     */\n    '4XX': DictionaryWithArray;\n    /**\n     * Default error response\n     */\n    default: ModelWithBoolean;\n};\n\nexport type CallWithDuplicateResponsesError = CallWithDuplicateResponsesErrors[keyof CallWithDuplicateResponsesErrors];\n\nexport type CallWithDuplicateResponsesResponses = {\n    /**\n     * Message for 200 response\n     */\n    200: ModelWithBoolean & ModelWithInteger;\n    /**\n     * Message for 201 response\n     */\n    201: ModelWithString;\n    /**\n     * Message for 202 response\n     */\n    202: ModelWithString;\n};\n\nexport type CallWithDuplicateResponsesResponse = CallWithDuplicateResponsesResponses[keyof CallWithDuplicateResponsesResponses];\n\nexport type CallWithResponsesData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/response';\n};\n\nexport type CallWithResponsesErrors = {\n    /**\n     * Message for 500 error\n     */\n    500: ModelWithStringError;\n    /**\n     * Message for 501 error\n     */\n    501: ModelWithStringError;\n    /**\n     * Message for 502 error\n     */\n    502: ModelWithStringError;\n    /**\n     * Message for default response\n     */\n    default: ModelWithStringError;\n};\n\nexport type CallWithResponsesError = CallWithResponsesErrors[keyof CallWithResponsesErrors];\n\nexport type CallWithResponsesResponses = {\n    /**\n     * Message for 200 response\n     */\n    200: {\n        readonly '@namespace.string'?: string;\n        readonly '@namespace.integer'?: number;\n        readonly value?: Array<ModelWithString>;\n    };\n    /**\n     * Message for 201 response\n     */\n    201: ModelThatExtends;\n    /**\n     * Message for 202 response\n     */\n    202: ModelThatExtendsExtends;\n};\n\nexport type CallWithResponsesResponse = CallWithResponsesResponses[keyof CallWithResponsesResponses];\n\nexport type CollectionFormatData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * This is an array parameter that is sent as csv format (comma-separated values)\n         */\n        parameterArrayCSV: Array<string> | null;\n        /**\n         * This is an array parameter that is sent as ssv format (space-separated values)\n         */\n        parameterArraySSV: Array<string> | null;\n        /**\n         * This is an array parameter that is sent as tsv format (tab-separated values)\n         */\n        parameterArrayTSV: Array<string> | null;\n        /**\n         * This is an array parameter that is sent as pipes format (pipe-separated values)\n         */\n        parameterArrayPipes: Array<string> | null;\n        /**\n         * This is an array parameter that is sent as multi format (multiple parameter instances)\n         */\n        parameterArrayMulti: Array<string> | null;\n    };\n    url: '/api/v{api-version}/collectionFormat';\n};\n\nexport type TypesData = {\n    body?: never;\n    path?: {\n        /**\n         * This is a number parameter\n         */\n        id?: number;\n    };\n    query: {\n        /**\n         * This is a number parameter\n         */\n        parameterNumber: number;\n        /**\n         * This is a string parameter\n         */\n        parameterString: string | null;\n        /**\n         * This is a boolean parameter\n         */\n        parameterBoolean: boolean | null;\n        /**\n         * This is an object parameter\n         */\n        parameterObject: {\n            [key: string]: unknown;\n        } | null;\n        /**\n         * This is an array parameter\n         */\n        parameterArray: Array<string> | null;\n        /**\n         * This is a dictionary parameter\n         */\n        parameterDictionary: {\n            [key: string]: unknown;\n        } | null;\n        /**\n         * This is an enum parameter\n         */\n        parameterEnum: 'Success' | 'Warning' | 'Error' | null;\n    };\n    url: '/api/v{api-version}/types';\n};\n\nexport type TypesResponses = {\n    /**\n     * Response is a simple number\n     */\n    200: number;\n    /**\n     * Response is a simple string\n     */\n    201: string;\n    /**\n     * Response is a simple boolean\n     */\n    202: boolean;\n    /**\n     * Response is a simple object\n     */\n    203: {\n        [key: string]: unknown;\n    };\n};\n\nexport type TypesResponse = TypesResponses[keyof TypesResponses];\n\nexport type UploadFileData = {\n    body: Blob | File;\n    path: {\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string | null;\n    };\n    query?: never;\n    url: '/api/v{api-version}/upload';\n};\n\nexport type UploadFileResponses = {\n    200: boolean;\n};\n\nexport type UploadFileResponse = UploadFileResponses[keyof UploadFileResponses];\n\nexport type FileResponseData = {\n    body?: never;\n    path: {\n        id: string;\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string;\n    };\n    query?: never;\n    url: '/api/v{api-version}/file/{id}';\n};\n\nexport type FileResponseResponses = {\n    /**\n     * Success\n     */\n    200: Blob | File;\n};\n\nexport type FileResponseResponse = FileResponseResponses[keyof FileResponseResponses];\n\nexport type ComplexTypesData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * Parameter containing object\n         */\n        parameterObject: {\n            first?: {\n                second?: {\n                    third?: string;\n                };\n            };\n        };\n        /**\n         * Parameter containing reference\n         */\n        parameterReference: ModelWithString;\n    };\n    url: '/api/v{api-version}/complex';\n};\n\nexport type ComplexTypesErrors = {\n    /**\n     * 400 `server` error\n     */\n    400: unknown;\n    /**\n     * 500 server error\n     */\n    500: unknown;\n};\n\nexport type ComplexTypesResponses = {\n    /**\n     * Successful response\n     */\n    200: Array<ModelWithString>;\n};\n\nexport type ComplexTypesResponse = ComplexTypesResponses[keyof ComplexTypesResponses];\n\nexport type MultipartResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multipart';\n};\n\nexport type MultipartResponseResponses = {\n    /**\n     * OK\n     */\n    200: {\n        file?: Blob | File;\n        metadata?: {\n            foo?: string;\n            bar?: string;\n        };\n    };\n};\n\nexport type MultipartResponseResponse = MultipartResponseResponses[keyof MultipartResponseResponses];\n\nexport type MultipartRequestData = {\n    body?: {\n        content?: Blob | File;\n        data?: ModelWithString | null;\n    };\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multipart';\n};\n\nexport type ComplexParamsData = {\n    body?: {\n        readonly key: string | null;\n        name: string | null;\n        enabled?: boolean;\n        type: 'Monkey' | 'Horse' | 'Bird';\n        listOfModels?: Array<ModelWithString> | null;\n        listOfStrings?: Array<string> | null;\n        parameters: ModelWithString | ModelWithEnum | ModelWithArray | ModelWithDictionary;\n        readonly user?: {\n            readonly id?: number;\n            readonly name?: string | null;\n        };\n    };\n    path: {\n        id: number;\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string;\n    };\n    query?: never;\n    url: '/api/v{api-version}/complex/{id}';\n};\n\nexport type ComplexParamsResponses = {\n    /**\n     * Success\n     */\n    200: ModelWithString;\n};\n\nexport type ComplexParamsResponse = ComplexParamsResponses[keyof ComplexParamsResponses];\n\nexport type CallWithResultFromHeaderData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/header';\n};\n\nexport type CallWithResultFromHeaderErrors = {\n    /**\n     * 400 server error\n     */\n    400: unknown;\n    /**\n     * 500 server error\n     */\n    500: unknown;\n};\n\nexport type CallWithResultFromHeaderResponses = {\n    /**\n     * Successful response\n     */\n    200: unknown;\n};\n\nexport type TestErrorCodeData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * Status code to return\n         */\n        status: number;\n    };\n    url: '/api/v{api-version}/error';\n};\n\nexport type TestErrorCodeErrors = {\n    /**\n     * Custom message: Internal Server Error\n     */\n    500: unknown;\n    /**\n     * Custom message: Not Implemented\n     */\n    501: unknown;\n    /**\n     * Custom message: Bad Gateway\n     */\n    502: unknown;\n    /**\n     * Custom message: Service Unavailable\n     */\n    503: unknown;\n};\n\nexport type TestErrorCodeResponses = {\n    /**\n     * Custom message: Successful response\n     */\n    200: unknown;\n};\n\nexport type NonAsciiæøåÆøÅöôêÊ字符串Data = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * Dummy input param\n         */\n        nonAsciiParamæøåÆØÅöôêÊ: number;\n    };\n    url: '/api/v{api-version}/non-ascii-æøåÆØÅöôêÊ字符串';\n};\n\nexport type NonAsciiæøåÆøÅöôêÊ字符串Responses = {\n    /**\n     * Successful response\n     */\n    200: Array<NonAsciiStringæøåÆøÅöôêÊ字符串>;\n};\n\nexport type NonAsciiæøåÆøÅöôêÊ字符串Response = NonAsciiæøåÆøÅöôêÊ字符串Responses[keyof NonAsciiæøåÆøÅöôêÊ字符串Responses];\n\nexport type PutWithFormUrlEncodedData = {\n    body: ArrayWithStrings;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/non-ascii-æøåÆØÅöôêÊ字符串';\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/solid-query/name-builder/@tanstack/solid-query.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport { type DefaultError, type MutationOptions, queryOptions } from '@tanstack/solid-query';\n\nimport { client } from '../client.gen';\nimport { fooBarPost, fooBarPut, fooPost, fooPut, getFoo, getFooBar, type Options } from '../sdk.gen';\nimport type { FooBarPostData, FooBarPostResponse, FooBarPutData, FooBarPutResponse, FooPostData, FooPostResponse, FooPutData, FooPutResponse, GetFooBarData, GetFooBarResponse, GetFooData, GetFooResponse } from '../types.gen';\n\nexport type QueryKey<TOptions extends Options> = [\n    Pick<TOptions, 'baseUrl' | 'body' | 'headers' | 'path' | 'query'> & {\n        _id: string;\n        _infinite?: boolean;\n        tags?: ReadonlyArray<string>;\n    }\n];\n\nconst createQueryKey = <TOptions extends Options>(id: string, options?: TOptions, infinite?: boolean, tags?: ReadonlyArray<string>): [\n    QueryKey<TOptions>[0]\n] => {\n    const params: QueryKey<TOptions>[0] = { _id: id, baseUrl: options?.baseUrl || (options?.client ?? client).getConfig().baseUrl } as QueryKey<TOptions>[0];\n    if (infinite) {\n        params._infinite = infinite;\n    }\n    if (tags) {\n        params.tags = tags;\n    }\n    if (options?.body) {\n        params.body = options.body;\n    }\n    if (options?.headers) {\n        params.headers = options.headers;\n    }\n    if (options?.path) {\n        params.path = options.path;\n    }\n    if (options?.query) {\n        params.query = options.query;\n    }\n    return [params];\n};\n\nexport const getFooD = (options?: Options<GetFooData>) => createQueryKey('getFoo', options);\n\nexport const getFooE = (options?: Options<GetFooData>) => queryOptions<GetFooResponse, DefaultError, GetFooResponse, ReturnType<typeof getFooD>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await getFoo({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: getFooD(options)\n});\n\nexport const fooPostC = (options?: Partial<Options<FooPostData>>): MutationOptions<FooPostResponse, DefaultError, Options<FooPostData>> => {\n    const mutationOptions: MutationOptions<FooPostResponse, DefaultError, Options<FooPostData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await fooPost({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const fooPutC = (options?: Partial<Options<FooPutData>>): MutationOptions<FooPutResponse, DefaultError, Options<FooPutData>> => {\n    const mutationOptions: MutationOptions<FooPutResponse, DefaultError, Options<FooPutData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await fooPut({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const getFooBarD = (options?: Options<GetFooBarData>) => createQueryKey('getFooBar', options);\n\nexport const getFooBarE = (options?: Options<GetFooBarData>) => queryOptions<GetFooBarResponse, DefaultError, GetFooBarResponse, ReturnType<typeof getFooBarD>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await getFooBar({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: getFooBarD(options)\n});\n\nexport const fooBarPostC = (options?: Partial<Options<FooBarPostData>>): MutationOptions<FooBarPostResponse, DefaultError, Options<FooBarPostData>> => {\n    const mutationOptions: MutationOptions<FooBarPostResponse, DefaultError, Options<FooBarPostData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await fooBarPost({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const fooBarPutC = (options?: Partial<Options<FooBarPutData>>): MutationOptions<FooBarPutResponse, DefaultError, Options<FooBarPutData>> => {\n    const mutationOptions: MutationOptions<FooBarPutResponse, DefaultError, Options<FooBarPutData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await fooBarPut({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/solid-query/name-builder/client/client.gen.ts",
    "content": "// 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 (options: RequestOptions) => {\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 url = buildUrl(opts);\n\n    return { opts, url };\n  };\n\n  const request: Client['request'] = async (options) => {\n    // @ts-expect-error\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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/solid-query/name-builder/client/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type { Auth } from '../core/auth.gen';\nexport type { QuerySerializerOptions } from '../core/bodySerializer.gen';\nexport {\n  formDataBodySerializer,\n  jsonBodySerializer,\n  urlSearchParamsBodySerializer,\n} from '../core/bodySerializer.gen';\nexport { buildClientParams } from '../core/params.gen';\nexport { serializeQueryKeyValue } from '../core/queryKeySerializer.gen';\nexport { createClient } from './client.gen';\nexport type {\n  Client,\n  ClientOptions,\n  Config,\n  CreateClientConfig,\n  Options,\n  RequestOptions,\n  RequestResult,\n  ResolvedRequestOptions,\n  ResponseStyle,\n  TDataShape,\n} from './types.gen';\nexport { createConfig, mergeHeaders } from './utils.gen';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/solid-query/name-builder/client/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { Auth } from '../core/auth.gen';\nimport type {\n  ServerSentEventsOptions,\n  ServerSentEventsResult,\n} from '../core/serverSentEvents.gen';\nimport type { Client as CoreClient, Config as CoreConfig } from '../core/types.gen';\nimport type { Middleware } from './utils.gen';\n\nexport type ResponseStyle = 'data' | 'fields';\n\nexport interface Config<T extends ClientOptions = ClientOptions>\n  extends Omit<RequestInit, 'body' | 'headers' | 'method'>, CoreConfig {\n  /**\n   * Base URL for all requests made by this client.\n   */\n  baseUrl?: T['baseUrl'];\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   * Please don't use the Fetch client for Next.js applications. The `next`\n   * options won't have any effect.\n   *\n   * Install {@link https://www.npmjs.com/package/@hey-api/client-next `@hey-api/client-next`} instead.\n   */\n  next?: never;\n  /**\n   * Return the response data parsed in a specified format. By default, `auto`\n   * will infer the appropriate method from the `Content-Type` response header.\n   * You can override this behavior with any of the {@link Body} methods.\n   * Select `stream` if you don't want to parse response data at all.\n   *\n   * @default 'auto'\n   */\n  parseAs?: 'arrayBuffer' | 'auto' | 'blob' | 'formData' | 'json' | 'stream' | 'text';\n  /**\n   * Should we return only data or multiple fields (data, error, response, etc.)?\n   *\n   * @default 'fields'\n   */\n  responseStyle?: ResponseStyle;\n  /**\n   * Throw an error instead of returning it in the response?\n   *\n   * @default false\n   */\n  throwOnError?: T['throwOnError'];\n}\n\nexport interface RequestOptions<\n  TData = unknown,\n  TResponseStyle extends ResponseStyle = 'fields',\n  ThrowOnError extends boolean = boolean,\n  Url extends string = string,\n>\n  extends\n    Config<{\n      responseStyle: TResponseStyle;\n      throwOnError: ThrowOnError;\n    }>,\n    Pick<\n      ServerSentEventsOptions<TData>,\n      | 'onRequest'\n      | 'onSseError'\n      | 'onSseEvent'\n      | 'sseDefaultRetryDelay'\n      | 'sseMaxRetryAttempts'\n      | 'sseMaxRetryDelay'\n    > {\n  /**\n   * Any body that you want to add to your request.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/fetch#body}\n   */\n  body?: unknown;\n  path?: Record<string, unknown>;\n  query?: Record<string, unknown>;\n  /**\n   * Security mechanism(s) to use for the request.\n   */\n  security?: ReadonlyArray<Auth>;\n  url: Url;\n}\n\nexport interface ResolvedRequestOptions<\n  TResponseStyle extends ResponseStyle = 'fields',\n  ThrowOnError extends boolean = boolean,\n  Url extends string = string,\n> extends RequestOptions<unknown, TResponseStyle, ThrowOnError, Url> {\n  serializedBody?: string;\n}\n\nexport type RequestResult<\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = boolean,\n  TResponseStyle extends ResponseStyle = 'fields',\n> = ThrowOnError extends true\n  ? Promise<\n      TResponseStyle extends 'data'\n        ? TData extends Record<string, unknown>\n          ? TData[keyof TData]\n          : TData\n        : {\n            data: TData extends Record<string, unknown> ? TData[keyof TData] : TData;\n            request: Request;\n            response: Response;\n          }\n    >\n  : Promise<\n      TResponseStyle extends 'data'\n        ? (TData extends Record<string, unknown> ? TData[keyof TData] : TData) | undefined\n        : (\n            | {\n                data: TData extends Record<string, unknown> ? TData[keyof TData] : TData;\n                error: undefined;\n              }\n            | {\n                data: undefined;\n                error: TError extends Record<string, unknown> ? TError[keyof TError] : TError;\n              }\n          ) & {\n            request: Request;\n            response: Response;\n          }\n    >;\n\nexport interface ClientOptions {\n  baseUrl?: string;\n  responseStyle?: ResponseStyle;\n  throwOnError?: boolean;\n}\n\ntype MethodFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'>,\n) => RequestResult<TData, TError, ThrowOnError, TResponseStyle>;\n\ntype SseFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'>,\n) => Promise<ServerSentEventsResult<TData, TError>>;\n\ntype RequestFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'> &\n    Pick<Required<RequestOptions<TData, TResponseStyle, ThrowOnError>>, 'method'>,\n) => RequestResult<TData, TError, ThrowOnError, TResponseStyle>;\n\ntype BuildUrlFn = <\n  TData extends {\n    body?: unknown;\n    path?: Record<string, unknown>;\n    query?: Record<string, unknown>;\n    url: string;\n  },\n>(\n  options: TData & Options<TData>,\n) => string;\n\nexport type Client = CoreClient<RequestFn, Config, MethodFn, BuildUrlFn, SseFn> & {\n  interceptors: Middleware<Request, Response, unknown, ResolvedRequestOptions>;\n};\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 = ClientOptions> = (\n  override?: Config<ClientOptions & T>,\n) => Config<Required<ClientOptions> & T>;\n\nexport interface TDataShape {\n  body?: unknown;\n  headers?: unknown;\n  path?: unknown;\n  query?: unknown;\n  url: string;\n}\n\ntype OmitKeys<T, K> = Pick<T, Exclude<keyof T, K>>;\n\nexport type Options<\n  TData extends TDataShape = TDataShape,\n  ThrowOnError extends boolean = boolean,\n  TResponse = unknown,\n  TResponseStyle extends ResponseStyle = 'fields',\n> = OmitKeys<\n  RequestOptions<TResponse, TResponseStyle, ThrowOnError>,\n  'body' | 'path' | 'query' | 'url'\n> &\n  ([TData] extends [never] ? unknown : Omit<TData, 'url'>);\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/solid-query/name-builder/client/utils.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/solid-query/name-builder/client.gen.ts",
    "content": "// 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>());\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/solid-query/name-builder/core/auth.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/solid-query/name-builder/core/bodySerializer.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/solid-query/name-builder/core/params.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/solid-query/name-builder/core/pathSerializer.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/solid-query/name-builder/core/queryKeySerializer.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\n/**\n * JSON-friendly union that mirrors what Pinia Colada can hash.\n */\nexport type JsonValue =\n  | null\n  | string\n  | number\n  | boolean\n  | JsonValue[]\n  | { [key: string]: JsonValue };\n\n/**\n * Replacer that converts non-JSON values (bigint, Date, etc.) to safe substitutes.\n */\nexport const queryKeyJsonReplacer = (_key: string, value: unknown) => {\n  if (value === undefined || typeof value === 'function' || typeof value === 'symbol') {\n    return undefined;\n  }\n  if (typeof value === 'bigint') {\n    return value.toString();\n  }\n  if (value instanceof Date) {\n    return value.toISOString();\n  }\n  return value;\n};\n\n/**\n * Safely stringifies a value and parses it back into a JsonValue.\n */\nexport const stringifyToJsonValue = (input: unknown): JsonValue | undefined => {\n  try {\n    const json = JSON.stringify(input, queryKeyJsonReplacer);\n    if (json === undefined) {\n      return undefined;\n    }\n    return JSON.parse(json) as JsonValue;\n  } catch {\n    return undefined;\n  }\n};\n\n/**\n * Detects plain objects (including objects with a null prototype).\n */\nconst isPlainObject = (value: unknown): value is Record<string, unknown> => {\n  if (value === null || typeof value !== 'object') {\n    return false;\n  }\n  const prototype = Object.getPrototypeOf(value as object);\n  return prototype === Object.prototype || prototype === null;\n};\n\n/**\n * Turns URLSearchParams into a sorted JSON object for deterministic keys.\n */\nconst serializeSearchParams = (params: URLSearchParams): JsonValue => {\n  const entries = Array.from(params.entries()).sort(([a], [b]) => a.localeCompare(b));\n  const result: Record<string, JsonValue> = {};\n\n  for (const [key, value] of entries) {\n    const existing = result[key];\n    if (existing === undefined) {\n      result[key] = value;\n      continue;\n    }\n\n    if (Array.isArray(existing)) {\n      (existing as string[]).push(value);\n    } else {\n      result[key] = [existing, value];\n    }\n  }\n\n  return result;\n};\n\n/**\n * Normalizes any accepted value into a JSON-friendly shape for query keys.\n */\nexport const serializeQueryKeyValue = (value: unknown): JsonValue | undefined => {\n  if (value === null) {\n    return null;\n  }\n\n  if (typeof value === 'string' || typeof value === 'number' || typeof value === 'boolean') {\n    return value;\n  }\n\n  if (value === undefined || typeof value === 'function' || typeof value === 'symbol') {\n    return undefined;\n  }\n\n  if (typeof value === 'bigint') {\n    return value.toString();\n  }\n\n  if (value instanceof Date) {\n    return value.toISOString();\n  }\n\n  if (Array.isArray(value)) {\n    return stringifyToJsonValue(value);\n  }\n\n  if (typeof URLSearchParams !== 'undefined' && value instanceof URLSearchParams) {\n    return serializeSearchParams(value);\n  }\n\n  if (isPlainObject(value)) {\n    return stringifyToJsonValue(value);\n  }\n\n  return undefined;\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/solid-query/name-builder/core/serverSentEvents.gen.ts",
    "content": "// 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 const 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            // Normalize line endings: CRLF -> LF, then CR -> LF\n            buffer = buffer.replace(/\\r\\n/g, '\\n').replace(/\\r/g, '\\n');\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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/solid-query/name-builder/core/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { Auth, AuthToken } from './auth.gen';\nimport type { BodySerializer, QuerySerializer, QuerySerializerOptions } from './bodySerializer.gen';\n\nexport type HttpMethod =\n  | 'connect'\n  | 'delete'\n  | 'get'\n  | 'head'\n  | 'options'\n  | 'patch'\n  | 'post'\n  | 'put'\n  | 'trace';\n\nexport type Client<\n  RequestFn = never,\n  Config = unknown,\n  MethodFn = never,\n  BuildUrlFn = never,\n  SseFn = never,\n> = {\n  /**\n   * Returns the final request URL.\n   */\n  buildUrl: BuildUrlFn;\n  getConfig: () => Config;\n  request: RequestFn;\n  setConfig: (config: Config) => Config;\n} & {\n  [K in HttpMethod]: MethodFn;\n} & ([SseFn] extends [never] ? { sse?: never } : { sse: { [K in HttpMethod]: SseFn } });\n\nexport interface Config {\n  /**\n   * Auth token or a function returning auth token. The resolved value will be\n   * added to the request payload as defined by its `security` array.\n   */\n  auth?: ((auth: Auth) => Promise<AuthToken> | AuthToken) | AuthToken;\n  /**\n   * A function for serializing request body parameter. By default,\n   * {@link JSON.stringify()} will be used.\n   */\n  bodySerializer?: BodySerializer | null;\n  /**\n   * An object containing any HTTP headers that you want to pre-populate your\n   * `Headers` object with.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/Headers/Headers#init See more}\n   */\n  headers?:\n    | RequestInit['headers']\n    | Record<\n        string,\n        string | number | boolean | (string | number | boolean)[] | null | undefined | unknown\n      >;\n  /**\n   * The request method.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/fetch#method See more}\n   */\n  method?: Uppercase<HttpMethod>;\n  /**\n   * A function for serializing request query parameters. By default, arrays\n   * will be exploded in form style, objects will be exploded in deepObject\n   * style, and reserved characters are percent-encoded.\n   *\n   * This method will have no effect if the native `paramsSerializer()` Axios\n   * API function is used.\n   *\n   * {@link https://swagger.io/docs/specification/serialization/#query View examples}\n   */\n  querySerializer?: QuerySerializer | QuerySerializerOptions;\n  /**\n   * A function validating request data. This is useful if you want to ensure\n   * the request conforms to the desired shape, so it can be safely sent to\n   * the server.\n   */\n  requestValidator?: (data: unknown) => Promise<unknown>;\n  /**\n   * A function transforming response data before it's returned. This is useful\n   * for post-processing data, e.g. converting ISO strings into Date objects.\n   */\n  responseTransformer?: (data: unknown) => Promise<unknown>;\n  /**\n   * A function validating response data. This is useful if you want to ensure\n   * the response conforms to the desired shape, so it can be safely passed to\n   * the transformers and returned to the user.\n   */\n  responseValidator?: (data: unknown) => Promise<unknown>;\n}\n\ntype IsExactlyNeverOrNeverUndefined<T> = [T] extends [never]\n  ? true\n  : [T] extends [never | undefined]\n    ? [undefined] extends [T]\n      ? false\n      : true\n    : false;\n\nexport type OmitNever<T extends Record<string, unknown>> = {\n  [K in keyof T as IsExactlyNeverOrNeverUndefined<T[K]> extends true ? never : K]: T[K];\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/solid-query/name-builder/core/utils.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/solid-query/name-builder/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport { fooBarPost, fooBarPut, fooPost, fooPut, getFoo, getFooBar, type Options } from './sdk.gen';\nexport type { ClientOptions, FooBarPostData, FooBarPostResponse, FooBarPostResponses, FooBarPutData, FooBarPutResponse, FooBarPutResponses, FooPostData, FooPostResponse, FooPostResponses, FooPutData, FooPutResponse, FooPutResponses, GetFooBarData, GetFooBarResponse, GetFooBarResponses, GetFooData, GetFooResponse, GetFooResponses } from './types.gen';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/solid-query/name-builder/sdk.gen.ts",
    "content": "// 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 { FooBarPostData, FooBarPostResponses, FooBarPutData, FooBarPutResponses, FooPostData, FooPostResponses, FooPutData, FooPutResponses, GetFooBarData, GetFooBarResponses, GetFooData, GetFooResponses } from './types.gen';\n\nexport type Options<TData extends TDataShape = TDataShape, ThrowOnError extends boolean = boolean> = Options2<TData, ThrowOnError> & {\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\nexport const getFoo = <ThrowOnError extends boolean = false>(options?: Options<GetFooData, ThrowOnError>) => (options?.client ?? client).get<GetFooResponses, unknown, ThrowOnError>({ url: '/foo', ...options });\n\nexport const fooPost = <ThrowOnError extends boolean = false>(options?: Options<FooPostData, ThrowOnError>) => (options?.client ?? client).post<FooPostResponses, unknown, ThrowOnError>({ url: '/foo', ...options });\n\nexport const fooPut = <ThrowOnError extends boolean = false>(options?: Options<FooPutData, ThrowOnError>) => (options?.client ?? client).put<FooPutResponses, unknown, ThrowOnError>({ url: '/foo', ...options });\n\nexport const getFooBar = <ThrowOnError extends boolean = false>(options?: Options<GetFooBarData, ThrowOnError>) => (options?.client ?? client).get<GetFooBarResponses, unknown, ThrowOnError>({ url: '/foo/bar', ...options });\n\nexport const fooBarPost = <ThrowOnError extends boolean = false>(options?: Options<FooBarPostData, ThrowOnError>) => (options?.client ?? client).post<FooBarPostResponses, unknown, ThrowOnError>({ url: '/foo/bar', ...options });\n\nexport const fooBarPut = <ThrowOnError extends boolean = false>(options?: Options<FooBarPutData, ThrowOnError>) => (options?.client ?? client).put<FooBarPutResponses, unknown, ThrowOnError>({ url: '/foo/bar', ...options });\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/solid-query/name-builder/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type ClientOptions = {\n    baseUrl: `${string}://${string}` | (string & {});\n};\n\nexport type GetFooData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/foo';\n};\n\nexport type GetFooResponses = {\n    /**\n     * OK\n     */\n    200: string;\n};\n\nexport type GetFooResponse = GetFooResponses[keyof GetFooResponses];\n\nexport type FooPostData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/foo';\n};\n\nexport type FooPostResponses = {\n    /**\n     * OK\n     */\n    200: string;\n};\n\nexport type FooPostResponse = FooPostResponses[keyof FooPostResponses];\n\nexport type FooPutData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/foo';\n};\n\nexport type FooPutResponses = {\n    /**\n     * OK\n     */\n    200: string;\n};\n\nexport type FooPutResponse = FooPutResponses[keyof FooPutResponses];\n\nexport type GetFooBarData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/foo/bar';\n};\n\nexport type GetFooBarResponses = {\n    /**\n     * OK\n     */\n    200: string;\n};\n\nexport type GetFooBarResponse = GetFooBarResponses[keyof GetFooBarResponses];\n\nexport type FooBarPostData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/foo/bar';\n};\n\nexport type FooBarPostResponses = {\n    /**\n     * OK\n     */\n    200: string;\n};\n\nexport type FooBarPostResponse = FooBarPostResponses[keyof FooBarPostResponses];\n\nexport type FooBarPutData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/foo/bar';\n};\n\nexport type FooBarPutResponses = {\n    /**\n     * OK\n     */\n    200: string;\n};\n\nexport type FooBarPutResponse = FooBarPutResponses[keyof FooBarPutResponses];\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/svelte-query/asClass/@tanstack/svelte-query.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport { type DefaultError, type MutationOptions, queryOptions } from '@tanstack/svelte-query';\n\nimport { client } from '../client.gen';\nimport { BarBazService, BarService, FooBazService, FooService, type Options } from '../sdk.gen';\nimport type { FooBarPostData, FooBarPostResponse, FooBarPutData, FooBarPutResponse, FooPostData, FooPostResponse, FooPutData, FooPutResponse, GetFooBarData, GetFooBarResponse, GetFooData, GetFooResponse } from '../types.gen';\n\nexport type QueryKey<TOptions extends Options> = [\n    Pick<TOptions, 'baseUrl' | 'body' | 'headers' | 'path' | 'query'> & {\n        _id: string;\n        _infinite?: boolean;\n        tags?: ReadonlyArray<string>;\n    }\n];\n\nconst createQueryKey = <TOptions extends Options>(id: string, options?: TOptions, infinite?: boolean, tags?: ReadonlyArray<string>): [\n    QueryKey<TOptions>[0]\n] => {\n    const params: QueryKey<TOptions>[0] = { _id: id, baseUrl: options?.baseUrl || (options?.client ?? client).getConfig().baseUrl } as QueryKey<TOptions>[0];\n    if (infinite) {\n        params._infinite = infinite;\n    }\n    if (tags) {\n        params.tags = tags;\n    }\n    if (options?.body) {\n        params.body = options.body;\n    }\n    if (options?.headers) {\n        params.headers = options.headers;\n    }\n    if (options?.path) {\n        params.path = options.path;\n    }\n    if (options?.query) {\n        params.query = options.query;\n    }\n    return [params];\n};\n\nexport const getFooQueryKey = (options?: Options<GetFooData>) => createQueryKey('getFoo', options);\n\nexport const getFooOptions = (options?: Options<GetFooData>) => queryOptions<GetFooResponse, DefaultError, GetFooResponse, ReturnType<typeof getFooQueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await FooBazService.getFoo({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: getFooQueryKey(options)\n});\n\nexport const fooPostMutation = (options?: Partial<Options<FooPostData>>): MutationOptions<FooPostResponse, DefaultError, Options<FooPostData>> => {\n    const mutationOptions: MutationOptions<FooPostResponse, DefaultError, Options<FooPostData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await FooService.post({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const fooPutMutation = (options?: Partial<Options<FooPutData>>): MutationOptions<FooPutResponse, DefaultError, Options<FooPutData>> => {\n    const mutationOptions: MutationOptions<FooPutResponse, DefaultError, Options<FooPutData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await FooService.put({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const getFooBarQueryKey = (options?: Options<GetFooBarData>) => createQueryKey('getFooBar', options);\n\nexport const getFooBarOptions = (options?: Options<GetFooBarData>) => queryOptions<GetFooBarResponse, DefaultError, GetFooBarResponse, ReturnType<typeof getFooBarQueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await BarBazService.getFooBar({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: getFooBarQueryKey(options)\n});\n\nexport const fooBarPostMutation = (options?: Partial<Options<FooBarPostData>>): MutationOptions<FooBarPostResponse, DefaultError, Options<FooBarPostData>> => {\n    const mutationOptions: MutationOptions<FooBarPostResponse, DefaultError, Options<FooBarPostData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await BarService.post({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const fooBarPutMutation = (options?: Partial<Options<FooBarPutData>>): MutationOptions<FooBarPutResponse, DefaultError, Options<FooBarPutData>> => {\n    const mutationOptions: MutationOptions<FooBarPutResponse, DefaultError, Options<FooBarPutData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await BarService.put({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/svelte-query/asClass/client/client.gen.ts",
    "content": "// 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 (options: RequestOptions) => {\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 url = buildUrl(opts);\n\n    return { opts, url };\n  };\n\n  const request: Client['request'] = async (options) => {\n    // @ts-expect-error\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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/svelte-query/asClass/client/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type { Auth } from '../core/auth.gen';\nexport type { QuerySerializerOptions } from '../core/bodySerializer.gen';\nexport {\n  formDataBodySerializer,\n  jsonBodySerializer,\n  urlSearchParamsBodySerializer,\n} from '../core/bodySerializer.gen';\nexport { buildClientParams } from '../core/params.gen';\nexport { serializeQueryKeyValue } from '../core/queryKeySerializer.gen';\nexport { createClient } from './client.gen';\nexport type {\n  Client,\n  ClientOptions,\n  Config,\n  CreateClientConfig,\n  Options,\n  RequestOptions,\n  RequestResult,\n  ResolvedRequestOptions,\n  ResponseStyle,\n  TDataShape,\n} from './types.gen';\nexport { createConfig, mergeHeaders } from './utils.gen';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/svelte-query/asClass/client/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { Auth } from '../core/auth.gen';\nimport type {\n  ServerSentEventsOptions,\n  ServerSentEventsResult,\n} from '../core/serverSentEvents.gen';\nimport type { Client as CoreClient, Config as CoreConfig } from '../core/types.gen';\nimport type { Middleware } from './utils.gen';\n\nexport type ResponseStyle = 'data' | 'fields';\n\nexport interface Config<T extends ClientOptions = ClientOptions>\n  extends Omit<RequestInit, 'body' | 'headers' | 'method'>, CoreConfig {\n  /**\n   * Base URL for all requests made by this client.\n   */\n  baseUrl?: T['baseUrl'];\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   * Please don't use the Fetch client for Next.js applications. The `next`\n   * options won't have any effect.\n   *\n   * Install {@link https://www.npmjs.com/package/@hey-api/client-next `@hey-api/client-next`} instead.\n   */\n  next?: never;\n  /**\n   * Return the response data parsed in a specified format. By default, `auto`\n   * will infer the appropriate method from the `Content-Type` response header.\n   * You can override this behavior with any of the {@link Body} methods.\n   * Select `stream` if you don't want to parse response data at all.\n   *\n   * @default 'auto'\n   */\n  parseAs?: 'arrayBuffer' | 'auto' | 'blob' | 'formData' | 'json' | 'stream' | 'text';\n  /**\n   * Should we return only data or multiple fields (data, error, response, etc.)?\n   *\n   * @default 'fields'\n   */\n  responseStyle?: ResponseStyle;\n  /**\n   * Throw an error instead of returning it in the response?\n   *\n   * @default false\n   */\n  throwOnError?: T['throwOnError'];\n}\n\nexport interface RequestOptions<\n  TData = unknown,\n  TResponseStyle extends ResponseStyle = 'fields',\n  ThrowOnError extends boolean = boolean,\n  Url extends string = string,\n>\n  extends\n    Config<{\n      responseStyle: TResponseStyle;\n      throwOnError: ThrowOnError;\n    }>,\n    Pick<\n      ServerSentEventsOptions<TData>,\n      | 'onRequest'\n      | 'onSseError'\n      | 'onSseEvent'\n      | 'sseDefaultRetryDelay'\n      | 'sseMaxRetryAttempts'\n      | 'sseMaxRetryDelay'\n    > {\n  /**\n   * Any body that you want to add to your request.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/fetch#body}\n   */\n  body?: unknown;\n  path?: Record<string, unknown>;\n  query?: Record<string, unknown>;\n  /**\n   * Security mechanism(s) to use for the request.\n   */\n  security?: ReadonlyArray<Auth>;\n  url: Url;\n}\n\nexport interface ResolvedRequestOptions<\n  TResponseStyle extends ResponseStyle = 'fields',\n  ThrowOnError extends boolean = boolean,\n  Url extends string = string,\n> extends RequestOptions<unknown, TResponseStyle, ThrowOnError, Url> {\n  serializedBody?: string;\n}\n\nexport type RequestResult<\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = boolean,\n  TResponseStyle extends ResponseStyle = 'fields',\n> = ThrowOnError extends true\n  ? Promise<\n      TResponseStyle extends 'data'\n        ? TData extends Record<string, unknown>\n          ? TData[keyof TData]\n          : TData\n        : {\n            data: TData extends Record<string, unknown> ? TData[keyof TData] : TData;\n            request: Request;\n            response: Response;\n          }\n    >\n  : Promise<\n      TResponseStyle extends 'data'\n        ? (TData extends Record<string, unknown> ? TData[keyof TData] : TData) | undefined\n        : (\n            | {\n                data: TData extends Record<string, unknown> ? TData[keyof TData] : TData;\n                error: undefined;\n              }\n            | {\n                data: undefined;\n                error: TError extends Record<string, unknown> ? TError[keyof TError] : TError;\n              }\n          ) & {\n            request: Request;\n            response: Response;\n          }\n    >;\n\nexport interface ClientOptions {\n  baseUrl?: string;\n  responseStyle?: ResponseStyle;\n  throwOnError?: boolean;\n}\n\ntype MethodFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'>,\n) => RequestResult<TData, TError, ThrowOnError, TResponseStyle>;\n\ntype SseFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'>,\n) => Promise<ServerSentEventsResult<TData, TError>>;\n\ntype RequestFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'> &\n    Pick<Required<RequestOptions<TData, TResponseStyle, ThrowOnError>>, 'method'>,\n) => RequestResult<TData, TError, ThrowOnError, TResponseStyle>;\n\ntype BuildUrlFn = <\n  TData extends {\n    body?: unknown;\n    path?: Record<string, unknown>;\n    query?: Record<string, unknown>;\n    url: string;\n  },\n>(\n  options: TData & Options<TData>,\n) => string;\n\nexport type Client = CoreClient<RequestFn, Config, MethodFn, BuildUrlFn, SseFn> & {\n  interceptors: Middleware<Request, Response, unknown, ResolvedRequestOptions>;\n};\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 = ClientOptions> = (\n  override?: Config<ClientOptions & T>,\n) => Config<Required<ClientOptions> & T>;\n\nexport interface TDataShape {\n  body?: unknown;\n  headers?: unknown;\n  path?: unknown;\n  query?: unknown;\n  url: string;\n}\n\ntype OmitKeys<T, K> = Pick<T, Exclude<keyof T, K>>;\n\nexport type Options<\n  TData extends TDataShape = TDataShape,\n  ThrowOnError extends boolean = boolean,\n  TResponse = unknown,\n  TResponseStyle extends ResponseStyle = 'fields',\n> = OmitKeys<\n  RequestOptions<TResponse, TResponseStyle, ThrowOnError>,\n  'body' | 'path' | 'query' | 'url'\n> &\n  ([TData] extends [never] ? unknown : Omit<TData, 'url'>);\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/svelte-query/asClass/client/utils.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/svelte-query/asClass/client.gen.ts",
    "content": "// 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>());\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/svelte-query/asClass/core/auth.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/svelte-query/asClass/core/bodySerializer.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/svelte-query/asClass/core/params.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/svelte-query/asClass/core/pathSerializer.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/svelte-query/asClass/core/queryKeySerializer.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\n/**\n * JSON-friendly union that mirrors what Pinia Colada can hash.\n */\nexport type JsonValue =\n  | null\n  | string\n  | number\n  | boolean\n  | JsonValue[]\n  | { [key: string]: JsonValue };\n\n/**\n * Replacer that converts non-JSON values (bigint, Date, etc.) to safe substitutes.\n */\nexport const queryKeyJsonReplacer = (_key: string, value: unknown) => {\n  if (value === undefined || typeof value === 'function' || typeof value === 'symbol') {\n    return undefined;\n  }\n  if (typeof value === 'bigint') {\n    return value.toString();\n  }\n  if (value instanceof Date) {\n    return value.toISOString();\n  }\n  return value;\n};\n\n/**\n * Safely stringifies a value and parses it back into a JsonValue.\n */\nexport const stringifyToJsonValue = (input: unknown): JsonValue | undefined => {\n  try {\n    const json = JSON.stringify(input, queryKeyJsonReplacer);\n    if (json === undefined) {\n      return undefined;\n    }\n    return JSON.parse(json) as JsonValue;\n  } catch {\n    return undefined;\n  }\n};\n\n/**\n * Detects plain objects (including objects with a null prototype).\n */\nconst isPlainObject = (value: unknown): value is Record<string, unknown> => {\n  if (value === null || typeof value !== 'object') {\n    return false;\n  }\n  const prototype = Object.getPrototypeOf(value as object);\n  return prototype === Object.prototype || prototype === null;\n};\n\n/**\n * Turns URLSearchParams into a sorted JSON object for deterministic keys.\n */\nconst serializeSearchParams = (params: URLSearchParams): JsonValue => {\n  const entries = Array.from(params.entries()).sort(([a], [b]) => a.localeCompare(b));\n  const result: Record<string, JsonValue> = {};\n\n  for (const [key, value] of entries) {\n    const existing = result[key];\n    if (existing === undefined) {\n      result[key] = value;\n      continue;\n    }\n\n    if (Array.isArray(existing)) {\n      (existing as string[]).push(value);\n    } else {\n      result[key] = [existing, value];\n    }\n  }\n\n  return result;\n};\n\n/**\n * Normalizes any accepted value into a JSON-friendly shape for query keys.\n */\nexport const serializeQueryKeyValue = (value: unknown): JsonValue | undefined => {\n  if (value === null) {\n    return null;\n  }\n\n  if (typeof value === 'string' || typeof value === 'number' || typeof value === 'boolean') {\n    return value;\n  }\n\n  if (value === undefined || typeof value === 'function' || typeof value === 'symbol') {\n    return undefined;\n  }\n\n  if (typeof value === 'bigint') {\n    return value.toString();\n  }\n\n  if (value instanceof Date) {\n    return value.toISOString();\n  }\n\n  if (Array.isArray(value)) {\n    return stringifyToJsonValue(value);\n  }\n\n  if (typeof URLSearchParams !== 'undefined' && value instanceof URLSearchParams) {\n    return serializeSearchParams(value);\n  }\n\n  if (isPlainObject(value)) {\n    return stringifyToJsonValue(value);\n  }\n\n  return undefined;\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/svelte-query/asClass/core/serverSentEvents.gen.ts",
    "content": "// 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 const 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            // Normalize line endings: CRLF -> LF, then CR -> LF\n            buffer = buffer.replace(/\\r\\n/g, '\\n').replace(/\\r/g, '\\n');\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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/svelte-query/asClass/core/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { Auth, AuthToken } from './auth.gen';\nimport type { BodySerializer, QuerySerializer, QuerySerializerOptions } from './bodySerializer.gen';\n\nexport type HttpMethod =\n  | 'connect'\n  | 'delete'\n  | 'get'\n  | 'head'\n  | 'options'\n  | 'patch'\n  | 'post'\n  | 'put'\n  | 'trace';\n\nexport type Client<\n  RequestFn = never,\n  Config = unknown,\n  MethodFn = never,\n  BuildUrlFn = never,\n  SseFn = never,\n> = {\n  /**\n   * Returns the final request URL.\n   */\n  buildUrl: BuildUrlFn;\n  getConfig: () => Config;\n  request: RequestFn;\n  setConfig: (config: Config) => Config;\n} & {\n  [K in HttpMethod]: MethodFn;\n} & ([SseFn] extends [never] ? { sse?: never } : { sse: { [K in HttpMethod]: SseFn } });\n\nexport interface Config {\n  /**\n   * Auth token or a function returning auth token. The resolved value will be\n   * added to the request payload as defined by its `security` array.\n   */\n  auth?: ((auth: Auth) => Promise<AuthToken> | AuthToken) | AuthToken;\n  /**\n   * A function for serializing request body parameter. By default,\n   * {@link JSON.stringify()} will be used.\n   */\n  bodySerializer?: BodySerializer | null;\n  /**\n   * An object containing any HTTP headers that you want to pre-populate your\n   * `Headers` object with.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/Headers/Headers#init See more}\n   */\n  headers?:\n    | RequestInit['headers']\n    | Record<\n        string,\n        string | number | boolean | (string | number | boolean)[] | null | undefined | unknown\n      >;\n  /**\n   * The request method.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/fetch#method See more}\n   */\n  method?: Uppercase<HttpMethod>;\n  /**\n   * A function for serializing request query parameters. By default, arrays\n   * will be exploded in form style, objects will be exploded in deepObject\n   * style, and reserved characters are percent-encoded.\n   *\n   * This method will have no effect if the native `paramsSerializer()` Axios\n   * API function is used.\n   *\n   * {@link https://swagger.io/docs/specification/serialization/#query View examples}\n   */\n  querySerializer?: QuerySerializer | QuerySerializerOptions;\n  /**\n   * A function validating request data. This is useful if you want to ensure\n   * the request conforms to the desired shape, so it can be safely sent to\n   * the server.\n   */\n  requestValidator?: (data: unknown) => Promise<unknown>;\n  /**\n   * A function transforming response data before it's returned. This is useful\n   * for post-processing data, e.g. converting ISO strings into Date objects.\n   */\n  responseTransformer?: (data: unknown) => Promise<unknown>;\n  /**\n   * A function validating response data. This is useful if you want to ensure\n   * the response conforms to the desired shape, so it can be safely passed to\n   * the transformers and returned to the user.\n   */\n  responseValidator?: (data: unknown) => Promise<unknown>;\n}\n\ntype IsExactlyNeverOrNeverUndefined<T> = [T] extends [never]\n  ? true\n  : [T] extends [never | undefined]\n    ? [undefined] extends [T]\n      ? false\n      : true\n    : false;\n\nexport type OmitNever<T extends Record<string, unknown>> = {\n  [K in keyof T as IsExactlyNeverOrNeverUndefined<T[K]> extends true ? never : K]: T[K];\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/svelte-query/asClass/core/utils.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/svelte-query/asClass/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport { BarBazService, BarService, BarService2, FooBazService, FooService, FooService2, type Options } from './sdk.gen';\nexport type { ClientOptions, FooBarPostData, FooBarPostResponse, FooBarPostResponses, FooBarPutData, FooBarPutResponse, FooBarPutResponses, FooPostData, FooPostResponse, FooPostResponses, FooPutData, FooPutResponse, FooPutResponses, GetFooBarData, GetFooBarResponse, GetFooBarResponses, GetFooData, GetFooResponse, GetFooResponses } from './types.gen';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/svelte-query/asClass/sdk.gen.ts",
    "content": "// 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 { FooBarPostData, FooBarPostResponses, FooBarPutData, FooBarPutResponses, FooPostData, FooPostResponses, FooPutData, FooPutResponses, GetFooBarData, GetFooBarResponses, GetFooData, GetFooResponses } from './types.gen';\n\nexport type Options<TData extends TDataShape = TDataShape, ThrowOnError extends boolean = boolean> = Options2<TData, ThrowOnError> & {\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\nexport class BarService {\n    public static post<ThrowOnError extends boolean = false>(options?: Options<FooBarPostData, ThrowOnError>) {\n        return (options?.client ?? client).post<FooBarPostResponses, unknown, ThrowOnError>({ url: '/foo/bar', ...options });\n    }\n    \n    public static put<ThrowOnError extends boolean = false>(options?: Options<FooBarPutData, ThrowOnError>) {\n        return (options?.client ?? client).put<FooBarPutResponses, unknown, ThrowOnError>({ url: '/foo/bar', ...options });\n    }\n}\n\nexport class FooService {\n    public static post<ThrowOnError extends boolean = false>(options?: Options<FooPostData, ThrowOnError>) {\n        return (options?.client ?? client).post<FooPostResponses, unknown, ThrowOnError>({ url: '/foo', ...options });\n    }\n    \n    public static put<ThrowOnError extends boolean = false>(options?: Options<FooPutData, ThrowOnError>) {\n        return (options?.client ?? client).put<FooPutResponses, unknown, ThrowOnError>({ url: '/foo', ...options });\n    }\n    \n    static barService = BarService;\n}\n\nexport class FooBazService {\n    public static getFoo<ThrowOnError extends boolean = false>(options?: Options<GetFooData, ThrowOnError>) {\n        return (options?.client ?? client).get<GetFooResponses, unknown, ThrowOnError>({ url: '/foo', ...options });\n    }\n    \n    static fooService = FooService;\n}\n\nexport class BarService2 {\n    public static post<ThrowOnError extends boolean = false>(options?: Options<FooBarPostData, ThrowOnError>) {\n        return (options?.client ?? client).post<FooBarPostResponses, unknown, ThrowOnError>({ url: '/foo/bar', ...options });\n    }\n    \n    public static put<ThrowOnError extends boolean = false>(options?: Options<FooBarPutData, ThrowOnError>) {\n        return (options?.client ?? client).put<FooBarPutResponses, unknown, ThrowOnError>({ url: '/foo/bar', ...options });\n    }\n}\n\nexport class FooService2 {\n    static barService = BarService2;\n}\n\nexport class BarBazService {\n    public static getFooBar<ThrowOnError extends boolean = false>(options?: Options<GetFooBarData, ThrowOnError>) {\n        return (options?.client ?? client).get<GetFooBarResponses, unknown, ThrowOnError>({ url: '/foo/bar', ...options });\n    }\n    \n    static fooService = FooService2;\n}\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/svelte-query/asClass/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type ClientOptions = {\n    baseUrl: `${string}://${string}` | (string & {});\n};\n\nexport type GetFooData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/foo';\n};\n\nexport type GetFooResponses = {\n    /**\n     * OK\n     */\n    200: string;\n};\n\nexport type GetFooResponse = GetFooResponses[keyof GetFooResponses];\n\nexport type FooPostData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/foo';\n};\n\nexport type FooPostResponses = {\n    /**\n     * OK\n     */\n    200: string;\n};\n\nexport type FooPostResponse = FooPostResponses[keyof FooPostResponses];\n\nexport type FooPutData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/foo';\n};\n\nexport type FooPutResponses = {\n    /**\n     * OK\n     */\n    200: string;\n};\n\nexport type FooPutResponse = FooPutResponses[keyof FooPutResponses];\n\nexport type GetFooBarData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/foo/bar';\n};\n\nexport type GetFooBarResponses = {\n    /**\n     * OK\n     */\n    200: string;\n};\n\nexport type GetFooBarResponse = GetFooBarResponses[keyof GetFooBarResponses];\n\nexport type FooBarPostData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/foo/bar';\n};\n\nexport type FooBarPostResponses = {\n    /**\n     * OK\n     */\n    200: string;\n};\n\nexport type FooBarPostResponse = FooBarPostResponses[keyof FooBarPostResponses];\n\nexport type FooBarPutData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/foo/bar';\n};\n\nexport type FooBarPutResponses = {\n    /**\n     * OK\n     */\n    200: string;\n};\n\nexport type FooBarPutResponse = FooBarPutResponses[keyof FooBarPutResponses];\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/svelte-query/axios/@tanstack/svelte-query.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport { type DefaultError, type InfiniteData, infiniteQueryOptions, type MutationOptions, queryOptions } from '@tanstack/svelte-query';\nimport type { AxiosError } from 'axios';\n\nimport { client } from '../client.gen';\nimport { apiVVersionODataControllerCount, callToTestOrderOfParams, callWithDefaultOptionalParameters, callWithDefaultParameters, callWithDescriptions, callWithDuplicateResponses, callWithNoContentResponse, callWithParameters, callWithResponse, callWithResponseAndNoContentResponse, callWithResponses, callWithResultFromHeader, callWithWeirdParameterNames, collectionFormat, complexParams, complexTypes, deleteCallWithoutParametersAndResponse, deleteFoo, deprecatedCall, dummyA, dummyB, duplicateName, duplicateName2, duplicateName3, duplicateName4, export_, fileResponse, fooWow, getApiVbyApiVersionSimpleOperation, getCallWithOptionalParam, getCallWithoutParametersAndResponse, import_, multipartRequest, multipartResponse, nonAsciiæøåÆøÅöôêÊ字符串, type Options, patchApiVbyApiVersionNoTag, patchCallWithoutParametersAndResponse, postApiVbyApiVersionFormData, postApiVbyApiVersionRequestBody, postCallWithOptionalParam, postCallWithoutParametersAndResponse, putCallWithoutParametersAndResponse, putWithFormUrlEncoded, testErrorCode, types, uploadFile } from '../sdk.gen';\nimport type { ApiVVersionODataControllerCountData, ApiVVersionODataControllerCountResponse, CallToTestOrderOfParamsData, CallWithDefaultOptionalParametersData, CallWithDefaultParametersData, CallWithDescriptionsData, CallWithDuplicateResponsesData, CallWithDuplicateResponsesError, CallWithDuplicateResponsesResponse, CallWithNoContentResponseData, CallWithNoContentResponseResponse, CallWithParametersData, CallWithResponseAndNoContentResponseData, CallWithResponseAndNoContentResponseResponse, CallWithResponseData, CallWithResponseResponse, CallWithResponsesData, CallWithResponsesError, CallWithResponsesResponse, CallWithResultFromHeaderData, CallWithWeirdParameterNamesData, CollectionFormatData, ComplexParamsData, ComplexParamsResponse, ComplexTypesData, ComplexTypesResponse, DeleteCallWithoutParametersAndResponseData, DeleteFooData3, DeprecatedCallData, DummyAData, DummyAResponse, DummyBData, DummyBResponse, DuplicateName2Data, DuplicateName3Data, DuplicateName4Data, DuplicateNameData, ExportData, FileResponseData, FileResponseResponse, FooWowData, GetApiVbyApiVersionSimpleOperationData, GetApiVbyApiVersionSimpleOperationError, GetApiVbyApiVersionSimpleOperationResponse, GetCallWithOptionalParamData, GetCallWithoutParametersAndResponseData, ImportData, ImportResponse, MultipartRequestData, MultipartResponseData, MultipartResponseResponse, NonAsciiæøåÆøÅöôêÊ字符串Data, NonAsciiæøåÆøÅöôêÊ字符串Response, PatchApiVbyApiVersionNoTagData, PatchCallWithoutParametersAndResponseData, PostApiVbyApiVersionFormDataData, PostApiVbyApiVersionRequestBodyData, PostCallWithOptionalParamData, PostCallWithOptionalParamResponse, PostCallWithoutParametersAndResponseData, PutCallWithoutParametersAndResponseData, PutWithFormUrlEncodedData, TestErrorCodeData, TypesData, TypesResponse, UploadFileData, UploadFileResponse } from '../types.gen';\n\nexport type QueryKey<TOptions extends Options> = [\n    Pick<TOptions, 'baseURL' | 'body' | 'headers' | 'path' | 'query'> & {\n        _id: string;\n        _infinite?: boolean;\n        tags?: ReadonlyArray<string>;\n    }\n];\n\nconst createQueryKey = <TOptions extends Options>(id: string, options?: TOptions, infinite?: boolean, tags?: ReadonlyArray<string>): [\n    QueryKey<TOptions>[0]\n] => {\n    const params: QueryKey<TOptions>[0] = { _id: id, baseURL: options?.baseURL || (options?.client ?? client).getConfig().baseURL } as QueryKey<TOptions>[0];\n    if (infinite) {\n        params._infinite = infinite;\n    }\n    if (tags) {\n        params.tags = tags;\n    }\n    if (options?.body) {\n        params.body = options.body;\n    }\n    if (options?.headers) {\n        params.headers = options.headers;\n    }\n    if (options?.path) {\n        params.path = options.path;\n    }\n    if (options?.query) {\n        params.query = options.query;\n    }\n    return [params];\n};\n\nexport const exportQueryKey = (options?: Options<ExportData>) => createQueryKey('export', options);\n\nexport const exportOptions = (options?: Options<ExportData>) => queryOptions<unknown, AxiosError<DefaultError>, unknown, ReturnType<typeof exportQueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await export_({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: exportQueryKey(options)\n});\n\nexport const patchApiVbyApiVersionNoTagMutation = (options?: Partial<Options<PatchApiVbyApiVersionNoTagData>>): MutationOptions<unknown, AxiosError<DefaultError>, Options<PatchApiVbyApiVersionNoTagData>> => {\n    const mutationOptions: MutationOptions<unknown, AxiosError<DefaultError>, Options<PatchApiVbyApiVersionNoTagData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await patchApiVbyApiVersionNoTag({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const importMutation = (options?: Partial<Options<ImportData>>): MutationOptions<ImportResponse, AxiosError<DefaultError>, Options<ImportData>> => {\n    const mutationOptions: MutationOptions<ImportResponse, AxiosError<DefaultError>, Options<ImportData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await import_({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const fooWowMutation = (options?: Partial<Options<FooWowData>>): MutationOptions<unknown, AxiosError<DefaultError>, Options<FooWowData>> => {\n    const mutationOptions: MutationOptions<unknown, AxiosError<DefaultError>, Options<FooWowData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await fooWow({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const apiVVersionODataControllerCountQueryKey = (options?: Options<ApiVVersionODataControllerCountData>) => createQueryKey('apiVVersionODataControllerCount', options);\n\nexport const apiVVersionODataControllerCountOptions = (options?: Options<ApiVVersionODataControllerCountData>) => queryOptions<ApiVVersionODataControllerCountResponse, AxiosError<DefaultError>, ApiVVersionODataControllerCountResponse, ReturnType<typeof apiVVersionODataControllerCountQueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await apiVVersionODataControllerCount({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: apiVVersionODataControllerCountQueryKey(options)\n});\n\nexport const getApiVbyApiVersionSimpleOperationQueryKey = (options: Options<GetApiVbyApiVersionSimpleOperationData>) => createQueryKey('getApiVbyApiVersionSimpleOperation', options);\n\nexport const getApiVbyApiVersionSimpleOperationOptions = (options: Options<GetApiVbyApiVersionSimpleOperationData>) => queryOptions<GetApiVbyApiVersionSimpleOperationResponse, AxiosError<GetApiVbyApiVersionSimpleOperationError>, GetApiVbyApiVersionSimpleOperationResponse, ReturnType<typeof getApiVbyApiVersionSimpleOperationQueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await getApiVbyApiVersionSimpleOperation({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: getApiVbyApiVersionSimpleOperationQueryKey(options)\n});\n\nexport const deleteCallWithoutParametersAndResponseMutation = (options?: Partial<Options<DeleteCallWithoutParametersAndResponseData>>): MutationOptions<unknown, AxiosError<DefaultError>, Options<DeleteCallWithoutParametersAndResponseData>> => {\n    const mutationOptions: MutationOptions<unknown, AxiosError<DefaultError>, Options<DeleteCallWithoutParametersAndResponseData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await deleteCallWithoutParametersAndResponse({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const getCallWithoutParametersAndResponseQueryKey = (options?: Options<GetCallWithoutParametersAndResponseData>) => createQueryKey('getCallWithoutParametersAndResponse', options);\n\nexport const getCallWithoutParametersAndResponseOptions = (options?: Options<GetCallWithoutParametersAndResponseData>) => queryOptions<unknown, AxiosError<DefaultError>, unknown, ReturnType<typeof getCallWithoutParametersAndResponseQueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await getCallWithoutParametersAndResponse({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: getCallWithoutParametersAndResponseQueryKey(options)\n});\n\nexport const patchCallWithoutParametersAndResponseMutation = (options?: Partial<Options<PatchCallWithoutParametersAndResponseData>>): MutationOptions<unknown, AxiosError<DefaultError>, Options<PatchCallWithoutParametersAndResponseData>> => {\n    const mutationOptions: MutationOptions<unknown, AxiosError<DefaultError>, Options<PatchCallWithoutParametersAndResponseData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await patchCallWithoutParametersAndResponse({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const postCallWithoutParametersAndResponseMutation = (options?: Partial<Options<PostCallWithoutParametersAndResponseData>>): MutationOptions<unknown, AxiosError<DefaultError>, Options<PostCallWithoutParametersAndResponseData>> => {\n    const mutationOptions: MutationOptions<unknown, AxiosError<DefaultError>, Options<PostCallWithoutParametersAndResponseData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await postCallWithoutParametersAndResponse({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const putCallWithoutParametersAndResponseMutation = (options?: Partial<Options<PutCallWithoutParametersAndResponseData>>): MutationOptions<unknown, AxiosError<DefaultError>, Options<PutCallWithoutParametersAndResponseData>> => {\n    const mutationOptions: MutationOptions<unknown, AxiosError<DefaultError>, Options<PutCallWithoutParametersAndResponseData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await putCallWithoutParametersAndResponse({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const deleteFooMutation = (options?: Partial<Options<DeleteFooData3>>): MutationOptions<unknown, AxiosError<DefaultError>, Options<DeleteFooData3>> => {\n    const mutationOptions: MutationOptions<unknown, AxiosError<DefaultError>, Options<DeleteFooData3>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await deleteFoo({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const callWithDescriptionsMutation = (options?: Partial<Options<CallWithDescriptionsData>>): MutationOptions<unknown, AxiosError<DefaultError>, Options<CallWithDescriptionsData>> => {\n    const mutationOptions: MutationOptions<unknown, AxiosError<DefaultError>, Options<CallWithDescriptionsData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await callWithDescriptions({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\n/**\n * @deprecated\n */\nexport const deprecatedCallMutation = (options?: Partial<Options<DeprecatedCallData>>): MutationOptions<unknown, AxiosError<DefaultError>, Options<DeprecatedCallData>> => {\n    const mutationOptions: MutationOptions<unknown, AxiosError<DefaultError>, Options<DeprecatedCallData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await deprecatedCall({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const callWithParametersMutation = (options?: Partial<Options<CallWithParametersData>>): MutationOptions<unknown, AxiosError<DefaultError>, Options<CallWithParametersData>> => {\n    const mutationOptions: MutationOptions<unknown, AxiosError<DefaultError>, Options<CallWithParametersData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await callWithParameters({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const callWithWeirdParameterNamesMutation = (options?: Partial<Options<CallWithWeirdParameterNamesData>>): MutationOptions<unknown, AxiosError<DefaultError>, Options<CallWithWeirdParameterNamesData>> => {\n    const mutationOptions: MutationOptions<unknown, AxiosError<DefaultError>, Options<CallWithWeirdParameterNamesData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await callWithWeirdParameterNames({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const getCallWithOptionalParamQueryKey = (options: Options<GetCallWithOptionalParamData>) => createQueryKey('getCallWithOptionalParam', options);\n\nexport const getCallWithOptionalParamOptions = (options: Options<GetCallWithOptionalParamData>) => queryOptions<unknown, AxiosError<DefaultError>, unknown, ReturnType<typeof getCallWithOptionalParamQueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await getCallWithOptionalParam({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: getCallWithOptionalParamQueryKey(options)\n});\n\nconst createInfiniteParams = <K extends Pick<QueryKey<Options>[0], 'body' | 'headers' | 'path' | 'query'>>(queryKey: QueryKey<Options>, page: K) => {\n    const params = { ...queryKey[0] };\n    if (page.body) {\n        params.body = {\n            ...queryKey[0].body as any,\n            ...page.body as any\n        };\n    }\n    if (page.headers) {\n        params.headers = {\n            ...queryKey[0].headers,\n            ...page.headers\n        };\n    }\n    if (page.path) {\n        params.path = {\n            ...queryKey[0].path as any,\n            ...page.path as any\n        };\n    }\n    if (page.query) {\n        params.query = {\n            ...queryKey[0].query as any,\n            ...page.query as any\n        };\n    }\n    return params as unknown as typeof page;\n};\n\nexport const getCallWithOptionalParamInfiniteQueryKey = (options: Options<GetCallWithOptionalParamData>): QueryKey<Options<GetCallWithOptionalParamData>> => createQueryKey('getCallWithOptionalParam', options, true);\n\nexport const getCallWithOptionalParamInfiniteOptions = (options: Options<GetCallWithOptionalParamData>) => infiniteQueryOptions<unknown, AxiosError<DefaultError>, InfiniteData<unknown>, QueryKey<Options<GetCallWithOptionalParamData>>, number | Pick<QueryKey<Options<GetCallWithOptionalParamData>>[0], 'body' | 'headers' | 'path' | 'query'>>(\n// @ts-ignore\n{\n    queryFn: async ({ pageParam, queryKey, signal }) => {\n        // @ts-ignore\n        const page: Pick<QueryKey<Options<GetCallWithOptionalParamData>>[0], 'body' | 'headers' | 'path' | 'query'> = typeof pageParam === 'object' ? pageParam : {\n            query: {\n                page: pageParam\n            }\n        };\n        const params = createInfiniteParams(queryKey, page);\n        const { data } = await getCallWithOptionalParam({\n            ...options,\n            ...params,\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: getCallWithOptionalParamInfiniteQueryKey(options)\n});\n\nexport const postCallWithOptionalParamMutation = (options?: Partial<Options<PostCallWithOptionalParamData>>): MutationOptions<PostCallWithOptionalParamResponse, AxiosError<DefaultError>, Options<PostCallWithOptionalParamData>> => {\n    const mutationOptions: MutationOptions<PostCallWithOptionalParamResponse, AxiosError<DefaultError>, Options<PostCallWithOptionalParamData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await postCallWithOptionalParam({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const postApiVbyApiVersionRequestBodyMutation = (options?: Partial<Options<PostApiVbyApiVersionRequestBodyData>>): MutationOptions<unknown, AxiosError<DefaultError>, Options<PostApiVbyApiVersionRequestBodyData>> => {\n    const mutationOptions: MutationOptions<unknown, AxiosError<DefaultError>, Options<PostApiVbyApiVersionRequestBodyData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await postApiVbyApiVersionRequestBody({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const postApiVbyApiVersionFormDataMutation = (options?: Partial<Options<PostApiVbyApiVersionFormDataData>>): MutationOptions<unknown, AxiosError<DefaultError>, Options<PostApiVbyApiVersionFormDataData>> => {\n    const mutationOptions: MutationOptions<unknown, AxiosError<DefaultError>, Options<PostApiVbyApiVersionFormDataData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await postApiVbyApiVersionFormData({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const callWithDefaultParametersQueryKey = (options?: Options<CallWithDefaultParametersData>) => createQueryKey('callWithDefaultParameters', options);\n\nexport const callWithDefaultParametersOptions = (options?: Options<CallWithDefaultParametersData>) => queryOptions<unknown, AxiosError<DefaultError>, unknown, ReturnType<typeof callWithDefaultParametersQueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await callWithDefaultParameters({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: callWithDefaultParametersQueryKey(options)\n});\n\nexport const callWithDefaultOptionalParametersMutation = (options?: Partial<Options<CallWithDefaultOptionalParametersData>>): MutationOptions<unknown, AxiosError<DefaultError>, Options<CallWithDefaultOptionalParametersData>> => {\n    const mutationOptions: MutationOptions<unknown, AxiosError<DefaultError>, Options<CallWithDefaultOptionalParametersData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await callWithDefaultOptionalParameters({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const callToTestOrderOfParamsMutation = (options?: Partial<Options<CallToTestOrderOfParamsData>>): MutationOptions<unknown, AxiosError<DefaultError>, Options<CallToTestOrderOfParamsData>> => {\n    const mutationOptions: MutationOptions<unknown, AxiosError<DefaultError>, Options<CallToTestOrderOfParamsData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await callToTestOrderOfParams({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const duplicateNameMutation = (options?: Partial<Options<DuplicateNameData>>): MutationOptions<unknown, AxiosError<DefaultError>, Options<DuplicateNameData>> => {\n    const mutationOptions: MutationOptions<unknown, AxiosError<DefaultError>, Options<DuplicateNameData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await duplicateName({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const duplicateName2QueryKey = (options?: Options<DuplicateName2Data>) => createQueryKey('duplicateName2', options);\n\nexport const duplicateName2Options = (options?: Options<DuplicateName2Data>) => queryOptions<unknown, AxiosError<DefaultError>, unknown, ReturnType<typeof duplicateName2QueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await duplicateName2({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: duplicateName2QueryKey(options)\n});\n\nexport const duplicateName3Mutation = (options?: Partial<Options<DuplicateName3Data>>): MutationOptions<unknown, AxiosError<DefaultError>, Options<DuplicateName3Data>> => {\n    const mutationOptions: MutationOptions<unknown, AxiosError<DefaultError>, Options<DuplicateName3Data>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await duplicateName3({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const duplicateName4Mutation = (options?: Partial<Options<DuplicateName4Data>>): MutationOptions<unknown, AxiosError<DefaultError>, Options<DuplicateName4Data>> => {\n    const mutationOptions: MutationOptions<unknown, AxiosError<DefaultError>, Options<DuplicateName4Data>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await duplicateName4({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const callWithNoContentResponseQueryKey = (options?: Options<CallWithNoContentResponseData>) => createQueryKey('callWithNoContentResponse', options);\n\nexport const callWithNoContentResponseOptions = (options?: Options<CallWithNoContentResponseData>) => queryOptions<CallWithNoContentResponseResponse, AxiosError<DefaultError>, CallWithNoContentResponseResponse, ReturnType<typeof callWithNoContentResponseQueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await callWithNoContentResponse({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: callWithNoContentResponseQueryKey(options)\n});\n\nexport const callWithResponseAndNoContentResponseQueryKey = (options?: Options<CallWithResponseAndNoContentResponseData>) => createQueryKey('callWithResponseAndNoContentResponse', options);\n\nexport const callWithResponseAndNoContentResponseOptions = (options?: Options<CallWithResponseAndNoContentResponseData>) => queryOptions<CallWithResponseAndNoContentResponseResponse, AxiosError<DefaultError>, CallWithResponseAndNoContentResponseResponse, ReturnType<typeof callWithResponseAndNoContentResponseQueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await callWithResponseAndNoContentResponse({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: callWithResponseAndNoContentResponseQueryKey(options)\n});\n\nexport const dummyAQueryKey = (options?: Options<DummyAData>) => createQueryKey('dummyA', options);\n\nexport const dummyAOptions = (options?: Options<DummyAData>) => queryOptions<DummyAResponse, AxiosError<DefaultError>, DummyAResponse, ReturnType<typeof dummyAQueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await dummyA({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: dummyAQueryKey(options)\n});\n\nexport const dummyBQueryKey = (options?: Options<DummyBData>) => createQueryKey('dummyB', options);\n\nexport const dummyBOptions = (options?: Options<DummyBData>) => queryOptions<DummyBResponse, AxiosError<DefaultError>, DummyBResponse, ReturnType<typeof dummyBQueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await dummyB({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: dummyBQueryKey(options)\n});\n\nexport const callWithResponseQueryKey = (options?: Options<CallWithResponseData>) => createQueryKey('callWithResponse', options);\n\nexport const callWithResponseOptions = (options?: Options<CallWithResponseData>) => queryOptions<CallWithResponseResponse, AxiosError<DefaultError>, CallWithResponseResponse, ReturnType<typeof callWithResponseQueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await callWithResponse({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: callWithResponseQueryKey(options)\n});\n\nexport const callWithDuplicateResponsesMutation = (options?: Partial<Options<CallWithDuplicateResponsesData>>): MutationOptions<CallWithDuplicateResponsesResponse, AxiosError<CallWithDuplicateResponsesError>, Options<CallWithDuplicateResponsesData>> => {\n    const mutationOptions: MutationOptions<CallWithDuplicateResponsesResponse, AxiosError<CallWithDuplicateResponsesError>, Options<CallWithDuplicateResponsesData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await callWithDuplicateResponses({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const callWithResponsesMutation = (options?: Partial<Options<CallWithResponsesData>>): MutationOptions<CallWithResponsesResponse, AxiosError<CallWithResponsesError>, Options<CallWithResponsesData>> => {\n    const mutationOptions: MutationOptions<CallWithResponsesResponse, AxiosError<CallWithResponsesError>, Options<CallWithResponsesData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await callWithResponses({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const collectionFormatQueryKey = (options: Options<CollectionFormatData>) => createQueryKey('collectionFormat', options);\n\nexport const collectionFormatOptions = (options: Options<CollectionFormatData>) => queryOptions<unknown, AxiosError<DefaultError>, unknown, ReturnType<typeof collectionFormatQueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await collectionFormat({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: collectionFormatQueryKey(options)\n});\n\nexport const typesQueryKey = (options: Options<TypesData>) => createQueryKey('types', options);\n\nexport const typesOptions = (options: Options<TypesData>) => queryOptions<TypesResponse, AxiosError<DefaultError>, TypesResponse, ReturnType<typeof typesQueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await types({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: typesQueryKey(options)\n});\n\nexport const uploadFileMutation = (options?: Partial<Options<UploadFileData>>): MutationOptions<UploadFileResponse, AxiosError<DefaultError>, Options<UploadFileData>> => {\n    const mutationOptions: MutationOptions<UploadFileResponse, AxiosError<DefaultError>, Options<UploadFileData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await uploadFile({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const fileResponseQueryKey = (options: Options<FileResponseData>) => createQueryKey('fileResponse', options);\n\nexport const fileResponseOptions = (options: Options<FileResponseData>) => queryOptions<FileResponseResponse, AxiosError<DefaultError>, FileResponseResponse, ReturnType<typeof fileResponseQueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await fileResponse({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: fileResponseQueryKey(options)\n});\n\nexport const complexTypesQueryKey = (options: Options<ComplexTypesData>) => createQueryKey('complexTypes', options);\n\nexport const complexTypesOptions = (options: Options<ComplexTypesData>) => queryOptions<ComplexTypesResponse, AxiosError<DefaultError>, ComplexTypesResponse, ReturnType<typeof complexTypesQueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await complexTypes({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: complexTypesQueryKey(options)\n});\n\nexport const multipartResponseQueryKey = (options?: Options<MultipartResponseData>) => createQueryKey('multipartResponse', options);\n\nexport const multipartResponseOptions = (options?: Options<MultipartResponseData>) => queryOptions<MultipartResponseResponse, AxiosError<DefaultError>, MultipartResponseResponse, ReturnType<typeof multipartResponseQueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await multipartResponse({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: multipartResponseQueryKey(options)\n});\n\nexport const multipartRequestMutation = (options?: Partial<Options<MultipartRequestData>>): MutationOptions<unknown, AxiosError<DefaultError>, Options<MultipartRequestData>> => {\n    const mutationOptions: MutationOptions<unknown, AxiosError<DefaultError>, Options<MultipartRequestData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await multipartRequest({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const complexParamsMutation = (options?: Partial<Options<ComplexParamsData>>): MutationOptions<ComplexParamsResponse, AxiosError<DefaultError>, Options<ComplexParamsData>> => {\n    const mutationOptions: MutationOptions<ComplexParamsResponse, AxiosError<DefaultError>, Options<ComplexParamsData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await complexParams({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const callWithResultFromHeaderMutation = (options?: Partial<Options<CallWithResultFromHeaderData>>): MutationOptions<unknown, AxiosError<DefaultError>, Options<CallWithResultFromHeaderData>> => {\n    const mutationOptions: MutationOptions<unknown, AxiosError<DefaultError>, Options<CallWithResultFromHeaderData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await callWithResultFromHeader({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const testErrorCodeMutation = (options?: Partial<Options<TestErrorCodeData>>): MutationOptions<unknown, AxiosError<DefaultError>, Options<TestErrorCodeData>> => {\n    const mutationOptions: MutationOptions<unknown, AxiosError<DefaultError>, Options<TestErrorCodeData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await testErrorCode({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const nonAsciiæøåÆøÅöôêÊ字符串Mutation = (options?: Partial<Options<NonAsciiæøåÆøÅöôêÊ字符串Data>>): MutationOptions<NonAsciiæøåÆøÅöôêÊ字符串Response, AxiosError<DefaultError>, Options<NonAsciiæøåÆøÅöôêÊ字符串Data>> => {\n    const mutationOptions: MutationOptions<NonAsciiæøåÆøÅöôêÊ字符串Response, AxiosError<DefaultError>, Options<NonAsciiæøåÆøÅöôêÊ字符串Data>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await nonAsciiæøåÆøÅöôêÊ字符串({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\n/**\n * Login User\n */\nexport const putWithFormUrlEncodedMutation = (options?: Partial<Options<PutWithFormUrlEncodedData>>): MutationOptions<unknown, AxiosError<DefaultError>, Options<PutWithFormUrlEncodedData>> => {\n    const mutationOptions: MutationOptions<unknown, AxiosError<DefaultError>, Options<PutWithFormUrlEncodedData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await putWithFormUrlEncoded({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/svelte-query/axios/client/client.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { AxiosError, AxiosInstance, RawAxiosRequestHeaders } from 'axios';\nimport axios from 'axios';\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 } from './types.gen';\nimport { buildUrl, createConfig, mergeConfigs, mergeHeaders, setAuthParams } from './utils.gen';\n\nexport const createClient = (config: Config = {}): Client => {\n  let _config = mergeConfigs(createConfig(), config);\n\n  let instance: AxiosInstance;\n\n  if (_config.axios && !('Axios' in _config.axios)) {\n    instance = _config.axios;\n  } else {\n    // eslint-disable-next-line @typescript-eslint/no-unused-vars\n    const { auth, ...configWithoutAuth } = _config;\n    instance = axios.create(configWithoutAuth);\n  }\n\n  const getConfig = (): Config => ({ ..._config });\n\n  const setConfig = (config: Config): Config => {\n    _config = mergeConfigs(_config, config);\n    instance.defaults = {\n      ...instance.defaults,\n      ..._config,\n      // @ts-expect-error\n      headers: mergeHeaders(instance.defaults.headers, _config.headers),\n    };\n    return getConfig();\n  };\n\n  const beforeRequest = async (options: RequestOptions) => {\n    const opts = {\n      ..._config,\n      ...options,\n      axios: options.axios ?? _config.axios ?? instance,\n      headers: mergeHeaders(_config.headers, options.headers),\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.body = opts.bodySerializer(opts.body);\n    }\n\n    const url = buildUrl(opts);\n\n    return { opts, url };\n  };\n\n  // @ts-expect-error\n  const request: Client['request'] = async (options) => {\n    // @ts-expect-error\n    const { opts, url } = await beforeRequest(options);\n    try {\n      // assign Axios here for consistency with fetch\n      const _axios = opts.axios!;\n      // eslint-disable-next-line @typescript-eslint/no-unused-vars\n      const { auth, ...optsWithoutAuth } = opts;\n      const response = await _axios({\n        ...optsWithoutAuth,\n        baseURL: '', // the baseURL is already included in `url`\n        data: getValidRequestBody(opts),\n        headers: opts.headers as RawAxiosRequestHeaders,\n        // let `paramsSerializer()` handle query params if it exists\n        params: opts.paramsSerializer ? opts.query : undefined,\n        url,\n      });\n\n      let { data } = response;\n\n      if (opts.responseType === '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 {\n        ...response,\n        data: data ?? {},\n      };\n    } catch (error) {\n      const e = error as AxiosError;\n      if (opts.throwOnError) {\n        throw e;\n      }\n      // @ts-expect-error\n      e.error = e.response?.data ?? {};\n      return e;\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 Record<string, string>,\n      method,\n      serializedBody: getValidRequestBody(opts) as BodyInit | null | undefined,\n      // @ts-expect-error\n      signal: opts.signal,\n      url,\n    });\n  };\n\n  const _buildUrl: Client['buildUrl'] = (options) =>\n    buildUrl({ axios: instance, ..._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    instance,\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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/svelte-query/axios/client/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type { Auth } from '../core/auth.gen';\nexport type { QuerySerializerOptions } from '../core/bodySerializer.gen';\nexport {\n  formDataBodySerializer,\n  jsonBodySerializer,\n  urlSearchParamsBodySerializer,\n} from '../core/bodySerializer.gen';\nexport { buildClientParams } from '../core/params.gen';\nexport { serializeQueryKeyValue } from '../core/queryKeySerializer.gen';\nexport { createClient } from './client.gen';\nexport type {\n  Client,\n  ClientOptions,\n  Config,\n  CreateClientConfig,\n  Options,\n  RequestOptions,\n  RequestResult,\n  TDataShape,\n} from './types.gen';\nexport { createConfig } from './utils.gen';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/svelte-query/axios/client/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type {\n  AxiosError,\n  AxiosInstance,\n  AxiosRequestHeaders,\n  AxiosResponse,\n  AxiosStatic,\n  CreateAxiosDefaults,\n} from 'axios';\n\nimport type { Auth } from '../core/auth.gen';\nimport type {\n  ServerSentEventsOptions,\n  ServerSentEventsResult,\n} from '../core/serverSentEvents.gen';\nimport type { Client as CoreClient, Config as CoreConfig } from '../core/types.gen';\n\nexport interface Config<T extends ClientOptions = ClientOptions>\n  extends Omit<CreateAxiosDefaults, 'auth' | 'baseURL' | 'headers' | 'method'>, CoreConfig {\n  /**\n   * Axios implementation. You can use this option to provide either an\n   * `AxiosStatic` or an `AxiosInstance`.\n   *\n   * @default axios\n   */\n  axios?: AxiosStatic | AxiosInstance;\n  /**\n   * Base URL for all requests made by this client.\n   */\n  baseURL?: T['baseURL'];\n  /**\n   * An object containing any HTTP headers that you want to pre-populate your\n   * `Headers` object with.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/Headers/Headers#init See more}\n   */\n  headers?:\n    | AxiosRequestHeaders\n    | Record<\n        string,\n        string | number | boolean | (string | number | boolean)[] | null | undefined | unknown\n      >;\n  /**\n   * Throw an error instead of returning it in the response?\n   *\n   * @default false\n   */\n  throwOnError?: T['throwOnError'];\n}\n\nexport interface RequestOptions<\n  TData = unknown,\n  ThrowOnError extends boolean = boolean,\n  Url extends string = string,\n>\n  extends\n    Config<{\n      throwOnError: ThrowOnError;\n    }>,\n    Pick<\n      ServerSentEventsOptions<TData>,\n      | 'onRequest'\n      | 'onSseError'\n      | 'onSseEvent'\n      | 'sseDefaultRetryDelay'\n      | 'sseMaxRetryAttempts'\n      | 'sseMaxRetryDelay'\n    > {\n  /**\n   * Any body that you want to add to your request.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/fetch#body}\n   */\n  body?: unknown;\n  path?: Record<string, unknown>;\n  query?: Record<string, unknown>;\n  /**\n   * Security mechanism(s) to use for the request.\n   */\n  security?: ReadonlyArray<Auth>;\n  url: Url;\n}\n\nexport interface ClientOptions {\n  baseURL?: string;\n  throwOnError?: boolean;\n}\n\nexport type RequestResult<\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = boolean,\n> = ThrowOnError extends true\n  ? Promise<AxiosResponse<TData extends Record<string, unknown> ? TData[keyof TData] : TData>>\n  : Promise<\n      | (AxiosResponse<TData extends Record<string, unknown> ? TData[keyof TData] : TData> & {\n          error: undefined;\n        })\n      | (AxiosError<TError extends Record<string, unknown> ? TError[keyof TError] : TError> & {\n          data: undefined;\n          error: TError extends Record<string, unknown> ? TError[keyof TError] : TError;\n        })\n    >;\n\ntype MethodFn = <TData = unknown, TError = unknown, ThrowOnError extends boolean = false>(\n  options: Omit<RequestOptions<TData, ThrowOnError>, 'method'>,\n) => RequestResult<TData, TError, ThrowOnError>;\n\ntype SseFn = <TData = unknown, TError = unknown, ThrowOnError extends boolean = false>(\n  options: Omit<RequestOptions<TData, ThrowOnError>, 'method'>,\n) => Promise<ServerSentEventsResult<TData, TError>>;\n\ntype RequestFn = <TData = unknown, TError = unknown, ThrowOnError extends boolean = false>(\n  options: Omit<RequestOptions<TData, ThrowOnError>, 'method'> &\n    Pick<Required<RequestOptions<TData, ThrowOnError>>, 'method'>,\n) => RequestResult<TData, TError, ThrowOnError>;\n\ntype BuildUrlFn = <\n  TData extends {\n    body?: unknown;\n    path?: Record<string, unknown>;\n    query?: Record<string, unknown>;\n    url: string;\n  },\n>(\n  options: TData & Options<TData>,\n) => string;\n\nexport type Client = CoreClient<RequestFn, Config, MethodFn, BuildUrlFn, SseFn> & {\n  instance: AxiosInstance;\n};\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 = ClientOptions> = (\n  override?: Config<ClientOptions & T>,\n) => Config<Required<ClientOptions> & T>;\n\nexport interface TDataShape {\n  body?: unknown;\n  headers?: unknown;\n  path?: unknown;\n  query?: unknown;\n  url: string;\n}\n\ntype OmitKeys<T, K> = Pick<T, Exclude<keyof T, K>>;\n\nexport type Options<\n  TData extends TDataShape = TDataShape,\n  ThrowOnError extends boolean = boolean,\n  TResponse = unknown,\n> = OmitKeys<RequestOptions<TResponse, ThrowOnError>, 'body' | 'path' | 'query' | 'url'> &\n  ([TData] extends [never] ? unknown : Omit<TData, 'url'>);\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/svelte-query/axios/client/utils.gen.ts",
    "content": "// 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 {\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\nconst checkForExistence = (\n  options: Pick<RequestOptions, 'auth' | 'query'> & {\n    headers: Record<any, unknown>;\n  },\n  name?: string,\n): boolean => {\n  if (!name) {\n    return false;\n  }\n  if (name in options.headers || options.query?.[name]) {\n    return true;\n  }\n  if (\n    'Cookie' in options.headers &&\n    options.headers['Cookie'] &&\n    typeof options.headers['Cookie'] === 'string'\n  ) {\n    return options.headers['Cookie'].includes(`${name}=`);\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: Record<any, unknown>;\n  }) => {\n  for (const auth of security) {\n    if (checkForExistence(options, auth.name)) {\n      continue;\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        const value = `${name}=${token}`;\n        if ('Cookie' in options.headers && options.headers['Cookie']) {\n          options.headers['Cookie'] = `${options.headers['Cookie']}; ${value}`;\n        } else {\n          options.headers['Cookie'] = value;\n        }\n        break;\n      }\n      case 'header':\n      default:\n        options.headers[name] = token;\n        break;\n    }\n  }\n};\n\nexport const buildUrl: Client['buildUrl'] = (options) => {\n  const instanceBaseUrl = options.axios?.defaults?.baseURL;\n\n  const baseUrl =\n    !!options.baseURL && typeof options.baseURL === 'string' ? options.baseURL : instanceBaseUrl;\n\n  return getUrl({\n    baseUrl: baseUrl as string,\n    path: options.path,\n    // let `paramsSerializer()` handle query params if it exists\n    query: !options.paramsSerializer ? options.query : undefined,\n    querySerializer:\n      typeof options.querySerializer === 'function'\n        ? options.querySerializer\n        : createQuerySerializer(options.querySerializer),\n    url: options.url,\n  });\n};\n\nexport const mergeConfigs = (a: Config, b: Config): Config => {\n  const config = { ...a, ...b };\n  config.headers = mergeHeaders(a.headers, b.headers);\n  return config;\n};\n\n/**\n * Special Axios headers keywords allowing to set headers by request method.\n */\nexport const axiosHeadersKeywords = [\n  'common',\n  'delete',\n  'get',\n  'head',\n  'patch',\n  'post',\n  'put',\n] as const;\n\nexport const mergeHeaders = (\n  ...headers: Array<Required<Config>['headers'] | undefined>\n): Record<any, unknown> => {\n  const mergedHeaders: Record<any, unknown> = {};\n  for (const header of headers) {\n    if (!header || typeof header !== 'object') {\n      continue;\n    }\n\n    const iterator = Object.entries(header);\n\n    for (const [key, value] of iterator) {\n      if (\n        axiosHeadersKeywords.includes(key as (typeof axiosHeadersKeywords)[number]) &&\n        typeof value === 'object'\n      ) {\n        mergedHeaders[key] = {\n          ...(mergedHeaders[key] as Record<any, unknown>),\n          ...value,\n        };\n      } else if (value === null) {\n        delete mergedHeaders[key];\n      } else if (Array.isArray(value)) {\n        for (const v of value) {\n          // @ts-expect-error\n          mergedHeaders[key] = [...(mergedHeaders[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[key] = typeof value === 'object' ? JSON.stringify(value) : (value as string);\n      }\n    }\n  }\n  return mergedHeaders;\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  ...override,\n});\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/svelte-query/axios/client.gen.ts",
    "content": "// 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: 'http://localhost:3000/base' }));\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/svelte-query/axios/core/auth.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/svelte-query/axios/core/bodySerializer.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/svelte-query/axios/core/params.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/svelte-query/axios/core/pathSerializer.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/svelte-query/axios/core/queryKeySerializer.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\n/**\n * JSON-friendly union that mirrors what Pinia Colada can hash.\n */\nexport type JsonValue =\n  | null\n  | string\n  | number\n  | boolean\n  | JsonValue[]\n  | { [key: string]: JsonValue };\n\n/**\n * Replacer that converts non-JSON values (bigint, Date, etc.) to safe substitutes.\n */\nexport const queryKeyJsonReplacer = (_key: string, value: unknown) => {\n  if (value === undefined || typeof value === 'function' || typeof value === 'symbol') {\n    return undefined;\n  }\n  if (typeof value === 'bigint') {\n    return value.toString();\n  }\n  if (value instanceof Date) {\n    return value.toISOString();\n  }\n  return value;\n};\n\n/**\n * Safely stringifies a value and parses it back into a JsonValue.\n */\nexport const stringifyToJsonValue = (input: unknown): JsonValue | undefined => {\n  try {\n    const json = JSON.stringify(input, queryKeyJsonReplacer);\n    if (json === undefined) {\n      return undefined;\n    }\n    return JSON.parse(json) as JsonValue;\n  } catch {\n    return undefined;\n  }\n};\n\n/**\n * Detects plain objects (including objects with a null prototype).\n */\nconst isPlainObject = (value: unknown): value is Record<string, unknown> => {\n  if (value === null || typeof value !== 'object') {\n    return false;\n  }\n  const prototype = Object.getPrototypeOf(value as object);\n  return prototype === Object.prototype || prototype === null;\n};\n\n/**\n * Turns URLSearchParams into a sorted JSON object for deterministic keys.\n */\nconst serializeSearchParams = (params: URLSearchParams): JsonValue => {\n  const entries = Array.from(params.entries()).sort(([a], [b]) => a.localeCompare(b));\n  const result: Record<string, JsonValue> = {};\n\n  for (const [key, value] of entries) {\n    const existing = result[key];\n    if (existing === undefined) {\n      result[key] = value;\n      continue;\n    }\n\n    if (Array.isArray(existing)) {\n      (existing as string[]).push(value);\n    } else {\n      result[key] = [existing, value];\n    }\n  }\n\n  return result;\n};\n\n/**\n * Normalizes any accepted value into a JSON-friendly shape for query keys.\n */\nexport const serializeQueryKeyValue = (value: unknown): JsonValue | undefined => {\n  if (value === null) {\n    return null;\n  }\n\n  if (typeof value === 'string' || typeof value === 'number' || typeof value === 'boolean') {\n    return value;\n  }\n\n  if (value === undefined || typeof value === 'function' || typeof value === 'symbol') {\n    return undefined;\n  }\n\n  if (typeof value === 'bigint') {\n    return value.toString();\n  }\n\n  if (value instanceof Date) {\n    return value.toISOString();\n  }\n\n  if (Array.isArray(value)) {\n    return stringifyToJsonValue(value);\n  }\n\n  if (typeof URLSearchParams !== 'undefined' && value instanceof URLSearchParams) {\n    return serializeSearchParams(value);\n  }\n\n  if (isPlainObject(value)) {\n    return stringifyToJsonValue(value);\n  }\n\n  return undefined;\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/svelte-query/axios/core/serverSentEvents.gen.ts",
    "content": "// 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 const 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            // Normalize line endings: CRLF -> LF, then CR -> LF\n            buffer = buffer.replace(/\\r\\n/g, '\\n').replace(/\\r/g, '\\n');\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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/svelte-query/axios/core/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { Auth, AuthToken } from './auth.gen';\nimport type { BodySerializer, QuerySerializer, QuerySerializerOptions } from './bodySerializer.gen';\n\nexport type HttpMethod =\n  | 'connect'\n  | 'delete'\n  | 'get'\n  | 'head'\n  | 'options'\n  | 'patch'\n  | 'post'\n  | 'put'\n  | 'trace';\n\nexport type Client<\n  RequestFn = never,\n  Config = unknown,\n  MethodFn = never,\n  BuildUrlFn = never,\n  SseFn = never,\n> = {\n  /**\n   * Returns the final request URL.\n   */\n  buildUrl: BuildUrlFn;\n  getConfig: () => Config;\n  request: RequestFn;\n  setConfig: (config: Config) => Config;\n} & {\n  [K in HttpMethod]: MethodFn;\n} & ([SseFn] extends [never] ? { sse?: never } : { sse: { [K in HttpMethod]: SseFn } });\n\nexport interface Config {\n  /**\n   * Auth token or a function returning auth token. The resolved value will be\n   * added to the request payload as defined by its `security` array.\n   */\n  auth?: ((auth: Auth) => Promise<AuthToken> | AuthToken) | AuthToken;\n  /**\n   * A function for serializing request body parameter. By default,\n   * {@link JSON.stringify()} will be used.\n   */\n  bodySerializer?: BodySerializer | null;\n  /**\n   * An object containing any HTTP headers that you want to pre-populate your\n   * `Headers` object with.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/Headers/Headers#init See more}\n   */\n  headers?:\n    | RequestInit['headers']\n    | Record<\n        string,\n        string | number | boolean | (string | number | boolean)[] | null | undefined | unknown\n      >;\n  /**\n   * The request method.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/fetch#method See more}\n   */\n  method?: Uppercase<HttpMethod>;\n  /**\n   * A function for serializing request query parameters. By default, arrays\n   * will be exploded in form style, objects will be exploded in deepObject\n   * style, and reserved characters are percent-encoded.\n   *\n   * This method will have no effect if the native `paramsSerializer()` Axios\n   * API function is used.\n   *\n   * {@link https://swagger.io/docs/specification/serialization/#query View examples}\n   */\n  querySerializer?: QuerySerializer | QuerySerializerOptions;\n  /**\n   * A function validating request data. This is useful if you want to ensure\n   * the request conforms to the desired shape, so it can be safely sent to\n   * the server.\n   */\n  requestValidator?: (data: unknown) => Promise<unknown>;\n  /**\n   * A function transforming response data before it's returned. This is useful\n   * for post-processing data, e.g. converting ISO strings into Date objects.\n   */\n  responseTransformer?: (data: unknown) => Promise<unknown>;\n  /**\n   * A function validating response data. This is useful if you want to ensure\n   * the response conforms to the desired shape, so it can be safely passed to\n   * the transformers and returned to the user.\n   */\n  responseValidator?: (data: unknown) => Promise<unknown>;\n}\n\ntype IsExactlyNeverOrNeverUndefined<T> = [T] extends [never]\n  ? true\n  : [T] extends [never | undefined]\n    ? [undefined] extends [T]\n      ? false\n      : true\n    : false;\n\nexport type OmitNever<T extends Record<string, unknown>> = {\n  [K in keyof T as IsExactlyNeverOrNeverUndefined<T[K]> extends true ? never : K]: T[K];\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/svelte-query/axios/core/utils.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/svelte-query/axios/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport { apiVVersionODataControllerCount, callToTestOrderOfParams, callWithDefaultOptionalParameters, callWithDefaultParameters, callWithDescriptions, callWithDuplicateResponses, callWithNoContentResponse, callWithParameters, callWithResponse, callWithResponseAndNoContentResponse, callWithResponses, callWithResultFromHeader, callWithWeirdParameterNames, collectionFormat, complexParams, complexTypes, deleteCallWithoutParametersAndResponse, deleteFoo, deprecatedCall, dummyA, dummyB, duplicateName, duplicateName2, duplicateName3, duplicateName4, export_, fileResponse, fooWow, getApiVbyApiVersionSimpleOperation, getCallWithOptionalParam, getCallWithoutParametersAndResponse, headCallWithoutParametersAndResponse, import_, multipartRequest, multipartResponse, nonAsciiæøåÆøÅöôêÊ字符串, type Options, optionsCallWithoutParametersAndResponse, patchApiVbyApiVersionNoTag, patchCallWithoutParametersAndResponse, postApiVbyApiVersionFormData, postApiVbyApiVersionRequestBody, postCallWithOptionalParam, postCallWithoutParametersAndResponse, putCallWithoutParametersAndResponse, putWithFormUrlEncoded, testErrorCode, types, uploadFile } from './sdk.gen';\nexport type { _3eNum1Период, _400, AdditionalPropertiesIntegerIssue, AdditionalPropertiesUnknownIssue, AdditionalPropertiesUnknownIssue2, AdditionalPropertiesUnknownIssue3, AdditionalPropertiesUnknownIssueWritable, AnyOfAnyAndNull, AnyOfArrays, ApiVVersionODataControllerCountData, ApiVVersionODataControllerCountResponse, ApiVVersionODataControllerCountResponses, ArrayWithAnyOfProperties, ArrayWithArray, ArrayWithBooleans, ArrayWithNumbers, ArrayWithProperties, ArrayWithReferences, ArrayWithStrings, CallToTestOrderOfParamsData, CallWithDefaultOptionalParametersData, CallWithDefaultParametersData, CallWithDescriptionsData, CallWithDuplicateResponsesData, CallWithDuplicateResponsesError, CallWithDuplicateResponsesErrors, CallWithDuplicateResponsesResponse, CallWithDuplicateResponsesResponses, CallWithNoContentResponseData, CallWithNoContentResponseResponse, CallWithNoContentResponseResponses, CallWithParametersData, CallWithResponseAndNoContentResponseData, CallWithResponseAndNoContentResponseResponse, CallWithResponseAndNoContentResponseResponses, CallWithResponseData, CallWithResponseResponse, CallWithResponseResponses, CallWithResponsesData, CallWithResponsesError, CallWithResponsesErrors, CallWithResponsesResponse, CallWithResponsesResponses, CallWithResultFromHeaderData, CallWithResultFromHeaderErrors, CallWithResultFromHeaderResponses, CallWithWeirdParameterNamesData, CamelCaseCommentWithBreaks, CharactersInDescription, ClientOptions, CollectionFormatData, CommentWithBackticks, CommentWithBackticksAndQuotes, CommentWithBreaks, CommentWithExpressionPlaceholders, CommentWithQuotes, CommentWithReservedCharacters, CommentWithSlashes, ComplexParamsData, ComplexParamsResponse, ComplexParamsResponses, ComplexTypesData, ComplexTypesErrors, ComplexTypesResponse, ComplexTypesResponses, CompositionBaseModel, CompositionExtendedModel, CompositionWithAllOfAndNullable, CompositionWithAnyOf, CompositionWithAnyOfAndNullable, CompositionWithAnyOfAnonymous, CompositionWithNestedAnyAndTypeNull, CompositionWithNestedAnyOfAndNull, CompositionWithOneOf, CompositionWithOneOfAndComplexArrayDictionary, CompositionWithOneOfAndNullable, CompositionWithOneOfAndProperties, CompositionWithOneOfAndSimpleArrayDictionary, CompositionWithOneOfAndSimpleDictionary, CompositionWithOneOfAnonymous, CompositionWithOneOfDiscriminator, ConstValue, Default, DeleteCallWithoutParametersAndResponseData, DeleteFooData, DeleteFooData2, DeleteFooData3, DeprecatedCallData, DeprecatedModel, DictionaryWithArray, DictionaryWithDictionary, DictionaryWithProperties, DictionaryWithPropertiesAndAdditionalProperties, DictionaryWithReference, DictionaryWithString, DummyAData, DummyAResponse, DummyAResponses, DummyBData, DummyBResponse, DummyBResponses, DuplicateName2Data, DuplicateName3Data, DuplicateName4Data, DuplicateNameData, EnumFromDescription, EnumWithExtensions, EnumWithNumbers, EnumWithReplacedCharacters, EnumWithStrings, EnumWithXEnumNames, ExportData, ExternalRefA, ExternalRefB, ExternalSharedModel, File, FileResponseData, FileResponseResponse, FileResponseResponses, FileWritable, FooWowData, FooWowResponses, FreeFormObjectWithAdditionalPropertiesEqEmptyObject, FreeFormObjectWithAdditionalPropertiesEqTrue, FreeFormObjectWithoutAdditionalProperties, GenericSchemaDuplicateIssue1SystemBoolean, GenericSchemaDuplicateIssue1SystemBooleanWritable, GenericSchemaDuplicateIssue1SystemString, GenericSchemaDuplicateIssue1SystemStringWritable, GetApiVbyApiVersionSimpleOperationData, GetApiVbyApiVersionSimpleOperationError, GetApiVbyApiVersionSimpleOperationErrors, GetApiVbyApiVersionSimpleOperationResponse, GetApiVbyApiVersionSimpleOperationResponses, GetCallWithOptionalParamData, GetCallWithoutParametersAndResponseData, HeadCallWithoutParametersAndResponseData, Import, ImportData, ImportResponse, ImportResponses, IoK8sApimachineryPkgApisMetaV1DeleteOptions, IoK8sApimachineryPkgApisMetaV1Preconditions, ModelCircle, ModelFromZendesk, ModelSquare, ModelThatExtends, ModelThatExtendsExtends, ModelWithAdditionalPropertiesEqTrue, ModelWithAdditionalPropertiesRef, ModelWithAnyOfConstantSizeArray, ModelWithAnyOfConstantSizeArrayAndIntersect, ModelWithAnyOfConstantSizeArrayNullable, ModelWithAnyOfConstantSizeArrayWithNSizeAndOptions, ModelWithAnyOfConstantSizeArrayWithNSizeAndOptionsWritable, ModelWithArray, ModelWithArrayReadOnlyAndWriteOnly, ModelWithArrayReadOnlyAndWriteOnlyWritable, ModelWithBackticksInDescription, ModelWithBoolean, ModelWithCircularReference, ModelWithConst, ModelWithConstantSizeArray, ModelWithDictionary, ModelWithDuplicateImports, ModelWithDuplicateProperties, ModelWithEnum, ModelWithEnumFromDescription, ModelWithEnumWithHyphen, ModelWithInteger, ModelWithNestedArrayEnums, ModelWithNestedArrayEnumsData, ModelWithNestedArrayEnumsDataBar, ModelWithNestedArrayEnumsDataFoo, ModelWithNestedCompositionEnums, ModelWithNestedEnums, ModelWithNestedProperties, ModelWithNullableObject, ModelWithNullableString, ModelWithNumericEnumUnion, ModelWithOneOfAndProperties, ModelWithOneOfEnum, ModelWithOrderedProperties, ModelWithPattern, ModelWithPatternWritable, ModelWithPrefixItemsConstantSizeArray, ModelWithProperties, ModelWithPropertiesWritable, ModelWithReadOnlyAndWriteOnly, ModelWithReadOnlyAndWriteOnlyWritable, ModelWithReference, ModelWithReferenceWritable, ModelWithString, ModelWithStringError, MultipartRequestData, MultipartResponseData, MultipartResponseResponse, MultipartResponseResponses, NestedAnyOfArraysNullable, NonAsciiæøåÆøÅöôêÊ字符串Data, NonAsciiæøåÆøÅöôêÊ字符串Response, NonAsciiæøåÆøÅöôêÊ字符串Responses, NonAsciiStringæøåÆøÅöôêÊ字符串, NullableObject, OneOfAllOfIssue, OneOfAllOfIssueWritable, OptionsCallWithoutParametersAndResponseData, Pageable, ParameterSimpleParameterUnused, PatchApiVbyApiVersionNoTagData, PatchApiVbyApiVersionNoTagResponses, PatchCallWithoutParametersAndResponseData, PostApiVbyApiVersionFormDataData, PostApiVbyApiVersionRequestBodyData, PostCallWithOptionalParamData, PostCallWithOptionalParamResponse, PostCallWithOptionalParamResponses, PostCallWithoutParametersAndResponseData, PostServiceWithEmptyTagResponse, PostServiceWithEmptyTagResponse2, PutCallWithoutParametersAndResponseData, PutWithFormUrlEncodedData, SchemaWithFormRestrictedKeys, SimpleBoolean, SimpleFile, SimpleFormData, SimpleInteger, SimpleParameter, SimpleReference, SimpleRequestBody, SimpleString, SimpleStringWithPattern, TestErrorCodeData, TestErrorCodeErrors, TestErrorCodeResponses, TypesData, TypesResponse, TypesResponses, UploadFileData, UploadFileResponse, UploadFileResponses, XFooBar } from './types.gen';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/svelte-query/axios/sdk.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport { type Client, formDataBodySerializer, type Options as Options2, type TDataShape, urlSearchParamsBodySerializer } from './client';\nimport { client } from './client.gen';\nimport type { ApiVVersionODataControllerCountData, ApiVVersionODataControllerCountResponses, CallToTestOrderOfParamsData, CallWithDefaultOptionalParametersData, CallWithDefaultParametersData, CallWithDescriptionsData, CallWithDuplicateResponsesData, CallWithDuplicateResponsesErrors, CallWithDuplicateResponsesResponses, CallWithNoContentResponseData, CallWithNoContentResponseResponses, CallWithParametersData, CallWithResponseAndNoContentResponseData, CallWithResponseAndNoContentResponseResponses, CallWithResponseData, CallWithResponseResponses, CallWithResponsesData, CallWithResponsesErrors, CallWithResponsesResponses, CallWithResultFromHeaderData, CallWithResultFromHeaderErrors, CallWithResultFromHeaderResponses, CallWithWeirdParameterNamesData, CollectionFormatData, ComplexParamsData, ComplexParamsResponses, ComplexTypesData, ComplexTypesErrors, ComplexTypesResponses, DeleteCallWithoutParametersAndResponseData, DeleteFooData3, DeprecatedCallData, DummyAData, DummyAResponses, DummyBData, DummyBResponses, DuplicateName2Data, DuplicateName3Data, DuplicateName4Data, DuplicateNameData, ExportData, FileResponseData, FileResponseResponses, FooWowData, FooWowResponses, GetApiVbyApiVersionSimpleOperationData, GetApiVbyApiVersionSimpleOperationErrors, GetApiVbyApiVersionSimpleOperationResponses, GetCallWithOptionalParamData, GetCallWithoutParametersAndResponseData, HeadCallWithoutParametersAndResponseData, ImportData, ImportResponses, MultipartRequestData, MultipartResponseData, MultipartResponseResponses, NonAsciiæøåÆøÅöôêÊ字符串Data, NonAsciiæøåÆøÅöôêÊ字符串Responses, OptionsCallWithoutParametersAndResponseData, PatchApiVbyApiVersionNoTagData, PatchApiVbyApiVersionNoTagResponses, PatchCallWithoutParametersAndResponseData, PostApiVbyApiVersionFormDataData, PostApiVbyApiVersionRequestBodyData, PostCallWithOptionalParamData, PostCallWithOptionalParamResponses, PostCallWithoutParametersAndResponseData, PutCallWithoutParametersAndResponseData, PutWithFormUrlEncodedData, TestErrorCodeData, TestErrorCodeErrors, TestErrorCodeResponses, TypesData, TypesResponses, UploadFileData, UploadFileResponses } from './types.gen';\n\nexport type Options<TData extends TDataShape = TDataShape, ThrowOnError extends boolean = boolean> = Options2<TData, ThrowOnError> & {\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\nexport const export_ = <ThrowOnError extends boolean = false>(options?: Options<ExportData, ThrowOnError>) => (options?.client ?? client).get<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/no+tag', ...options });\n\nexport const patchApiVbyApiVersionNoTag = <ThrowOnError extends boolean = false>(options?: Options<PatchApiVbyApiVersionNoTagData, ThrowOnError>) => (options?.client ?? client).patch<PatchApiVbyApiVersionNoTagResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/no+tag', ...options });\n\nexport const import_ = <ThrowOnError extends boolean = false>(options: Options<ImportData, ThrowOnError>) => (options.client ?? client).post<ImportResponses, unknown, ThrowOnError>({\n    responseType: 'json',\n    url: '/api/v{api-version}/no+tag',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options.headers\n    }\n});\n\nexport const fooWow = <ThrowOnError extends boolean = false>(options?: Options<FooWowData, ThrowOnError>) => (options?.client ?? client).put<FooWowResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/no+tag', ...options });\n\nexport const apiVVersionODataControllerCount = <ThrowOnError extends boolean = false>(options?: Options<ApiVVersionODataControllerCountData, ThrowOnError>) => (options?.client ?? client).get<ApiVVersionODataControllerCountResponses, unknown, ThrowOnError>({\n    responseType: 'json',\n    url: '/api/v{api-version}/simple/$count',\n    ...options\n});\n\nexport const getApiVbyApiVersionSimpleOperation = <ThrowOnError extends boolean = false>(options: Options<GetApiVbyApiVersionSimpleOperationData, ThrowOnError>) => (options.client ?? client).get<GetApiVbyApiVersionSimpleOperationResponses, GetApiVbyApiVersionSimpleOperationErrors, ThrowOnError>({\n    responseType: 'json',\n    url: '/api/v{api-version}/simple:operation',\n    ...options\n});\n\nexport const deleteCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<DeleteCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).delete<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const getCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<GetCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).get<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const headCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<HeadCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).head<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const optionsCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<OptionsCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).options<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const patchCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<PatchCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).patch<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const postCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<PostCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).post<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const putCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<PutCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).put<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const deleteFoo = <ThrowOnError extends boolean = false>(options: Options<DeleteFooData3, ThrowOnError>) => (options.client ?? client).delete<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/foo/{foo_param}/bar/{BarParam}', ...options });\n\nexport const callWithDescriptions = <ThrowOnError extends boolean = false>(options?: Options<CallWithDescriptionsData, ThrowOnError>) => (options?.client ?? client).post<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/descriptions', ...options });\n\n/**\n * @deprecated\n */\nexport const deprecatedCall = <ThrowOnError extends boolean = false>(options: Options<DeprecatedCallData, ThrowOnError>) => (options.client ?? client).post<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/parameters/deprecated', ...options });\n\nexport const callWithParameters = <ThrowOnError extends boolean = false>(options: Options<CallWithParametersData, ThrowOnError>) => (options.client ?? client).post<unknown, unknown, ThrowOnError>({\n    url: '/api/v{api-version}/parameters/{parameterPath}',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options.headers\n    }\n});\n\nexport const callWithWeirdParameterNames = <ThrowOnError extends boolean = false>(options: Options<CallWithWeirdParameterNamesData, ThrowOnError>) => (options.client ?? client).post<unknown, unknown, ThrowOnError>({\n    url: '/api/v{api-version}/parameters/{parameter.path.1}/{parameter-path-2}/{PARAMETER-PATH-3}',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options.headers\n    }\n});\n\nexport const getCallWithOptionalParam = <ThrowOnError extends boolean = false>(options: Options<GetCallWithOptionalParamData, ThrowOnError>) => (options.client ?? client).get<unknown, unknown, ThrowOnError>({\n    url: '/api/v{api-version}/parameters',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options.headers\n    }\n});\n\nexport const postCallWithOptionalParam = <ThrowOnError extends boolean = false>(options: Options<PostCallWithOptionalParamData, ThrowOnError>) => (options.client ?? client).post<PostCallWithOptionalParamResponses, unknown, ThrowOnError>({\n    responseType: 'json',\n    url: '/api/v{api-version}/parameters',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options.headers\n    }\n});\n\nexport const postApiVbyApiVersionRequestBody = <ThrowOnError extends boolean = false>(options?: Options<PostApiVbyApiVersionRequestBodyData, ThrowOnError>) => (options?.client ?? client).post<unknown, unknown, ThrowOnError>({\n    url: '/api/v{api-version}/requestBody',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options?.headers\n    }\n});\n\nexport const postApiVbyApiVersionFormData = <ThrowOnError extends boolean = false>(options?: Options<PostApiVbyApiVersionFormDataData, ThrowOnError>) => (options?.client ?? client).post<unknown, unknown, ThrowOnError>({\n    ...formDataBodySerializer,\n    url: '/api/v{api-version}/formData',\n    ...options,\n    headers: {\n        'Content-Type': null,\n        ...options?.headers\n    }\n});\n\nexport const callWithDefaultParameters = <ThrowOnError extends boolean = false>(options?: Options<CallWithDefaultParametersData, ThrowOnError>) => (options?.client ?? client).get<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/defaults', ...options });\n\nexport const callWithDefaultOptionalParameters = <ThrowOnError extends boolean = false>(options?: Options<CallWithDefaultOptionalParametersData, ThrowOnError>) => (options?.client ?? client).post<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/defaults', ...options });\n\nexport const callToTestOrderOfParams = <ThrowOnError extends boolean = false>(options: Options<CallToTestOrderOfParamsData, ThrowOnError>) => (options.client ?? client).put<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/defaults', ...options });\n\nexport const duplicateName = <ThrowOnError extends boolean = false>(options?: Options<DuplicateNameData, ThrowOnError>) => (options?.client ?? client).delete<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/duplicate', ...options });\n\nexport const duplicateName2 = <ThrowOnError extends boolean = false>(options?: Options<DuplicateName2Data, ThrowOnError>) => (options?.client ?? client).get<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/duplicate', ...options });\n\nexport const duplicateName3 = <ThrowOnError extends boolean = false>(options?: Options<DuplicateName3Data, ThrowOnError>) => (options?.client ?? client).post<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/duplicate', ...options });\n\nexport const duplicateName4 = <ThrowOnError extends boolean = false>(options?: Options<DuplicateName4Data, ThrowOnError>) => (options?.client ?? client).put<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/duplicate', ...options });\n\nexport const callWithNoContentResponse = <ThrowOnError extends boolean = false>(options?: Options<CallWithNoContentResponseData, ThrowOnError>) => (options?.client ?? client).get<CallWithNoContentResponseResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/no-content', ...options });\n\nexport const callWithResponseAndNoContentResponse = <ThrowOnError extends boolean = false>(options?: Options<CallWithResponseAndNoContentResponseData, ThrowOnError>) => (options?.client ?? client).get<CallWithResponseAndNoContentResponseResponses, unknown, ThrowOnError>({\n    responseType: 'json',\n    url: '/api/v{api-version}/multiple-tags/response-and-no-content',\n    ...options\n});\n\nexport const dummyA = <ThrowOnError extends boolean = false>(options?: Options<DummyAData, ThrowOnError>) => (options?.client ?? client).get<DummyAResponses, unknown, ThrowOnError>({\n    responseType: 'json',\n    url: '/api/v{api-version}/multiple-tags/a',\n    ...options\n});\n\nexport const dummyB = <ThrowOnError extends boolean = false>(options?: Options<DummyBData, ThrowOnError>) => (options?.client ?? client).get<DummyBResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/multiple-tags/b', ...options });\n\nexport const callWithResponse = <ThrowOnError extends boolean = false>(options?: Options<CallWithResponseData, ThrowOnError>) => (options?.client ?? client).get<CallWithResponseResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/response', ...options });\n\nexport const callWithDuplicateResponses = <ThrowOnError extends boolean = false>(options?: Options<CallWithDuplicateResponsesData, ThrowOnError>) => (options?.client ?? client).post<CallWithDuplicateResponsesResponses, CallWithDuplicateResponsesErrors, ThrowOnError>({\n    responseType: 'json',\n    url: '/api/v{api-version}/response',\n    ...options\n});\n\nexport const callWithResponses = <ThrowOnError extends boolean = false>(options?: Options<CallWithResponsesData, ThrowOnError>) => (options?.client ?? client).put<CallWithResponsesResponses, CallWithResponsesErrors, ThrowOnError>({\n    responseType: 'json',\n    url: '/api/v{api-version}/response',\n    ...options\n});\n\nexport const collectionFormat = <ThrowOnError extends boolean = false>(options: Options<CollectionFormatData, ThrowOnError>) => (options.client ?? client).get<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/collectionFormat', ...options });\n\nexport const types = <ThrowOnError extends boolean = false>(options: Options<TypesData, ThrowOnError>) => (options.client ?? client).get<TypesResponses, unknown, ThrowOnError>({\n    responseType: 'json',\n    url: '/api/v{api-version}/types',\n    ...options\n});\n\nexport const uploadFile = <ThrowOnError extends boolean = false>(options: Options<UploadFileData, ThrowOnError>) => (options.client ?? client).post<UploadFileResponses, unknown, ThrowOnError>({\n    ...urlSearchParamsBodySerializer,\n    responseType: 'json',\n    url: '/api/v{api-version}/upload',\n    ...options,\n    headers: {\n        'Content-Type': 'application/x-www-form-urlencoded',\n        ...options.headers\n    }\n});\n\nexport const fileResponse = <ThrowOnError extends boolean = false>(options: Options<FileResponseData, ThrowOnError>) => (options.client ?? client).get<FileResponseResponses, unknown, ThrowOnError>({\n    responseType: 'blob',\n    url: '/api/v{api-version}/file/{id}',\n    ...options\n});\n\nexport const complexTypes = <ThrowOnError extends boolean = false>(options: Options<ComplexTypesData, ThrowOnError>) => (options.client ?? client).get<ComplexTypesResponses, ComplexTypesErrors, ThrowOnError>({\n    querySerializer: { parameters: { parameterObject: { object: { style: 'form' } } } },\n    responseType: 'json',\n    url: '/api/v{api-version}/complex',\n    ...options\n});\n\nexport const multipartResponse = <ThrowOnError extends boolean = false>(options?: Options<MultipartResponseData, ThrowOnError>) => (options?.client ?? client).get<MultipartResponseResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/multipart', ...options });\n\nexport const multipartRequest = <ThrowOnError extends boolean = false>(options?: Options<MultipartRequestData, ThrowOnError>) => (options?.client ?? client).post<unknown, unknown, ThrowOnError>({\n    ...formDataBodySerializer,\n    url: '/api/v{api-version}/multipart',\n    ...options,\n    headers: {\n        'Content-Type': null,\n        ...options?.headers\n    }\n});\n\nexport const complexParams = <ThrowOnError extends boolean = false>(options: Options<ComplexParamsData, ThrowOnError>) => (options.client ?? client).put<ComplexParamsResponses, unknown, ThrowOnError>({\n    responseType: 'json',\n    url: '/api/v{api-version}/complex/{id}',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json-patch+json',\n        ...options.headers\n    }\n});\n\nexport const callWithResultFromHeader = <ThrowOnError extends boolean = false>(options?: Options<CallWithResultFromHeaderData, ThrowOnError>) => (options?.client ?? client).post<CallWithResultFromHeaderResponses, CallWithResultFromHeaderErrors, ThrowOnError>({ url: '/api/v{api-version}/header', ...options });\n\nexport const testErrorCode = <ThrowOnError extends boolean = false>(options: Options<TestErrorCodeData, ThrowOnError>) => (options.client ?? client).post<TestErrorCodeResponses, TestErrorCodeErrors, ThrowOnError>({ url: '/api/v{api-version}/error', ...options });\n\nexport const nonAsciiæøåÆøÅöôêÊ字符串 = <ThrowOnError extends boolean = false>(options: Options<NonAsciiæøåÆøÅöôêÊ字符串Data, ThrowOnError>) => (options.client ?? client).post<NonAsciiæøåÆøÅöôêÊ字符串Responses, unknown, ThrowOnError>({\n    responseType: 'json',\n    url: '/api/v{api-version}/non-ascii-æøåÆØÅöôêÊ字符串',\n    ...options\n});\n\n/**\n * Login User\n */\nexport const putWithFormUrlEncoded = <ThrowOnError extends boolean = false>(options: Options<PutWithFormUrlEncodedData, ThrowOnError>) => (options.client ?? client).put<unknown, unknown, ThrowOnError>({\n    ...urlSearchParamsBodySerializer,\n    url: '/api/v{api-version}/non-ascii-æøåÆØÅöôêÊ字符串',\n    ...options,\n    headers: {\n        'Content-Type': 'application/x-www-form-urlencoded',\n        ...options.headers\n    }\n});\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/svelte-query/axios/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type ClientOptions = {\n    baseURL: 'http://localhost:3000/base' | (string & {});\n};\n\n/**\n * Model with number-only name\n */\nexport type _400 = string;\n\n/**\n * External ref to shared model (A)\n */\nexport type ExternalRefA = ExternalSharedModel;\n\n/**\n * External ref to shared model (B)\n */\nexport type ExternalRefB = ExternalSharedModel;\n\n/**\n * Testing multiline comments in string: First line\n * Second line\n *\n * Fourth line\n */\nexport type CamelCaseCommentWithBreaks = number;\n\n/**\n * Testing multiline comments in string: First line\n * Second line\n *\n * Fourth line\n */\nexport type CommentWithBreaks = number;\n\n/**\n * Testing backticks in string: `backticks` and ```multiple backticks``` should work\n */\nexport type CommentWithBackticks = number;\n\n/**\n * Testing backticks and quotes in string: `backticks`, 'quotes', \"double quotes\" and ```multiple backticks``` should work\n */\nexport type CommentWithBackticksAndQuotes = number;\n\n/**\n * Testing slashes in string: \\backwards\\\\\\ and /forwards/// should work\n */\nexport type CommentWithSlashes = number;\n\n/**\n * Testing expression placeholders in string: ${expression} should work\n */\nexport type CommentWithExpressionPlaceholders = number;\n\n/**\n * Testing quotes in string: 'single quote''' and \"double quotes\"\"\" should work\n */\nexport type CommentWithQuotes = number;\n\n/**\n * Testing reserved characters in string: * inline * and ** inline ** should work\n */\nexport type CommentWithReservedCharacters = number;\n\n/**\n * This is a simple number\n */\nexport type SimpleInteger = number;\n\n/**\n * This is a simple boolean\n */\nexport type SimpleBoolean = boolean;\n\n/**\n * This is a simple string\n */\nexport type SimpleString = string;\n\n/**\n * A string with non-ascii (unicode) characters valid in typescript identifiers (æøåÆØÅöÔèÈ字符串)\n */\nexport type NonAsciiStringæøåÆøÅöôêÊ字符串 = string;\n\n/**\n * This is a simple file\n */\nexport type SimpleFile = Blob | File;\n\n/**\n * This is a simple reference\n */\nexport type SimpleReference = ModelWithString;\n\n/**\n * This is a simple string\n */\nexport type SimpleStringWithPattern = string | null;\n\n/**\n * This is a simple enum with strings\n */\nexport type EnumWithStrings = 'Success' | 'Warning' | 'Error' | '\\'Single Quote\\'' | '\"Double Quotes\"' | 'Non-ascii: øæåôöØÆÅÔÖ字符串';\n\nexport type EnumWithReplacedCharacters = '\\'Single Quote\\'' | '\"Double Quotes\"' | 'øæåôöØÆÅÔÖ字符串' | 3.1 | '';\n\n/**\n * This is a simple enum with numbers\n */\nexport type EnumWithNumbers = 1 | 2 | 3 | 1.1 | 1.2 | 1.3 | 100 | 200 | 300 | -100 | -200 | -300 | -1.1 | -1.2 | -1.3;\n\n/**\n * Success=1,Warning=2,Error=3\n */\nexport type EnumFromDescription = number;\n\n/**\n * This is a simple enum with numbers\n */\nexport type EnumWithExtensions = 200 | 400 | 500;\n\nexport type EnumWithXEnumNames = 0 | 1 | 2;\n\n/**\n * This is a simple array with numbers\n */\nexport type ArrayWithNumbers = Array<number>;\n\n/**\n * This is a simple array with booleans\n */\nexport type ArrayWithBooleans = Array<boolean>;\n\n/**\n * This is a simple array with strings\n */\nexport type ArrayWithStrings = Array<string>;\n\n/**\n * This is a simple array with references\n */\nexport type ArrayWithReferences = Array<ModelWithString>;\n\n/**\n * This is a simple array containing an array\n */\nexport type ArrayWithArray = Array<Array<ModelWithString>>;\n\n/**\n * This is a simple array with properties\n */\nexport type ArrayWithProperties = Array<{\n    '16x16'?: CamelCaseCommentWithBreaks;\n    bar?: string;\n}>;\n\n/**\n * This is a simple array with any of properties\n */\nexport type ArrayWithAnyOfProperties = Array<{\n    foo?: string;\n} | {\n    bar?: string;\n}>;\n\nexport type AnyOfAnyAndNull = {\n    data?: unknown | null;\n};\n\n/**\n * This is a simple array with any of properties\n */\nexport type AnyOfArrays = {\n    results?: Array<{\n        foo?: string;\n    } | {\n        bar?: string;\n    }>;\n};\n\n/**\n * This is a string dictionary\n */\nexport type DictionaryWithString = {\n    [key: string]: string;\n};\n\nexport type DictionaryWithPropertiesAndAdditionalProperties = {\n    foo?: number;\n    bar?: boolean;\n    [key: string]: string | number | boolean | undefined;\n};\n\n/**\n * This is a string reference\n */\nexport type DictionaryWithReference = {\n    [key: string]: ModelWithString;\n};\n\n/**\n * This is a complex dictionary\n */\nexport type DictionaryWithArray = {\n    [key: string]: Array<ModelWithString>;\n};\n\n/**\n * This is a string dictionary\n */\nexport type DictionaryWithDictionary = {\n    [key: string]: {\n        [key: string]: string;\n    };\n};\n\n/**\n * This is a complex dictionary\n */\nexport type DictionaryWithProperties = {\n    [key: string]: {\n        foo?: string;\n        bar?: string;\n    };\n};\n\n/**\n * This is a model with one number property\n */\nexport type ModelWithInteger = {\n    /**\n     * This is a simple number property\n     */\n    prop?: number;\n};\n\n/**\n * This is a model with one boolean property\n */\nexport type ModelWithBoolean = {\n    /**\n     * This is a simple boolean property\n     */\n    prop?: boolean;\n};\n\n/**\n * This is a model with one string property\n */\nexport type ModelWithString = {\n    /**\n     * This is a simple string property\n     */\n    prop?: string;\n};\n\n/**\n * This is a model with one string property\n */\nexport type ModelWithStringError = {\n    /**\n     * This is a simple string property\n     */\n    prop?: string;\n};\n\n/**\n * `Comment` or `VoiceComment`. The JSON object for adding voice comments to tickets is different. See [Adding voice comments to tickets](/documentation/ticketing/managing-tickets/adding-voice-comments-to-tickets)\n */\nexport type ModelFromZendesk = string;\n\n/**\n * This is a model with one string property\n */\nexport type ModelWithNullableString = {\n    /**\n     * This is a simple string property\n     */\n    nullableProp1?: string | null;\n    /**\n     * This is a simple string property\n     */\n    nullableRequiredProp1: string | null;\n    /**\n     * This is a simple string property\n     */\n    nullableProp2?: string | null;\n    /**\n     * This is a simple string property\n     */\n    nullableRequiredProp2: string | null;\n    /**\n     * This is a simple enum with strings\n     */\n    'foo_bar-enum'?: 'Success' | 'Warning' | 'Error' | 'ØÆÅ字符串';\n};\n\n/**\n * This is a model with one enum\n */\nexport type ModelWithEnum = {\n    /**\n     * This is a simple enum with strings\n     */\n    'foo_bar-enum'?: 'Success' | 'Warning' | 'Error' | 'ØÆÅ字符串';\n    /**\n     * These are the HTTP error code enums\n     */\n    statusCode?: '100' | '200 FOO' | '300 FOO_BAR' | '400 foo-bar' | '500 foo.bar' | '600 foo&bar';\n    /**\n     * Simple boolean enum\n     */\n    bool?: true;\n};\n\n/**\n * This is a model with one enum with escaped name\n */\nexport type ModelWithEnumWithHyphen = {\n    /**\n     * Foo-Bar-Baz-Qux\n     */\n    'foo-bar-baz-qux'?: '3.0';\n};\n\n/**\n * This is a model with one enum\n */\nexport type ModelWithEnumFromDescription = {\n    /**\n     * Success=1,Warning=2,Error=3\n     */\n    test?: number;\n};\n\n/**\n * This is a model with nested enums\n */\nexport type ModelWithNestedEnums = {\n    dictionaryWithEnum?: {\n        [key: string]: 'Success' | 'Warning' | 'Error';\n    };\n    dictionaryWithEnumFromDescription?: {\n        [key: string]: number;\n    };\n    arrayWithEnum?: Array<'Success' | 'Warning' | 'Error'>;\n    arrayWithDescription?: Array<number>;\n    /**\n     * This is a simple enum with strings\n     */\n    'foo_bar-enum'?: 'Success' | 'Warning' | 'Error' | 'ØÆÅ字符串';\n};\n\n/**\n * This is a model with one property containing a reference\n */\nexport type ModelWithReference = {\n    prop?: ModelWithProperties;\n};\n\n/**\n * This is a model with one property containing an array\n */\nexport type ModelWithArrayReadOnlyAndWriteOnly = {\n    prop?: Array<ModelWithReadOnlyAndWriteOnly>;\n    propWithFile?: Array<Blob | File>;\n    propWithNumber?: Array<number>;\n};\n\n/**\n * This is a model with one property containing an array\n */\nexport type ModelWithArray = {\n    prop?: Array<ModelWithString>;\n    propWithFile?: Array<Blob | File>;\n    propWithNumber?: Array<number>;\n};\n\n/**\n * This is a model with one property containing a dictionary\n */\nexport type ModelWithDictionary = {\n    prop?: {\n        [key: string]: string;\n    };\n};\n\n/**\n * This is a deprecated model with a deprecated property\n *\n * @deprecated\n */\nexport type DeprecatedModel = {\n    /**\n     * This is a deprecated property\n     *\n     * @deprecated\n     */\n    prop?: string;\n};\n\n/**\n * This is a model with one property containing a circular reference\n */\nexport type ModelWithCircularReference = {\n    prop?: ModelWithCircularReference;\n};\n\n/**\n * This is a model with one property with a 'one of' relationship\n */\nexport type CompositionWithOneOf = {\n    propA?: ModelWithString | ModelWithEnum | ModelWithArray | ModelWithDictionary;\n};\n\n/**\n * This is a model with one property with a 'one of' relationship where the options are not $ref\n */\nexport type CompositionWithOneOfAnonymous = {\n    propA?: {\n        propA?: string;\n    } | string | number;\n};\n\n/**\n * Circle\n */\nexport type ModelCircle = {\n    kind: string;\n    radius?: number;\n};\n\n/**\n * Square\n */\nexport type ModelSquare = {\n    kind: string;\n    sideLength?: number;\n};\n\n/**\n * This is a model with one property with a 'one of' relationship where the options are not $ref\n */\nexport type CompositionWithOneOfDiscriminator = ({\n    kind: 'circle';\n} & ModelCircle) | ({\n    kind: 'square';\n} & ModelSquare);\n\n/**\n * This is a model with one property with a 'any of' relationship\n */\nexport type CompositionWithAnyOf = {\n    propA?: ModelWithString | ModelWithEnum | ModelWithArray | ModelWithDictionary;\n};\n\n/**\n * This is a model with one property with a 'any of' relationship where the options are not $ref\n */\nexport type CompositionWithAnyOfAnonymous = {\n    propA?: {\n        propA?: string;\n    } | string | number;\n};\n\n/**\n * This is a model with nested 'any of' property with a type null\n */\nexport type CompositionWithNestedAnyAndTypeNull = {\n    propA?: Array<ModelWithDictionary | null> | Array<ModelWithArray | null>;\n};\n\nexport type _3eNum1Период = 'Bird' | 'Dog';\n\nexport type ConstValue = 'ConstValue';\n\n/**\n * This is a model with one property with a 'any of' relationship where the options are not $ref\n */\nexport type CompositionWithNestedAnyOfAndNull = {\n    /**\n     * Scopes\n     */\n    propA?: Array<_3eNum1Период | ConstValue> | null;\n};\n\n/**\n * This is a model with one property with a 'one of' relationship\n */\nexport type CompositionWithOneOfAndNullable = {\n    propA?: {\n        boolean?: boolean;\n    } | ModelWithEnum | ModelWithArray | ModelWithDictionary | null;\n};\n\n/**\n * This is a model that contains a simple dictionary within composition\n */\nexport type CompositionWithOneOfAndSimpleDictionary = {\n    propA?: boolean | {\n        [key: string]: number;\n    };\n};\n\n/**\n * This is a model that contains a dictionary of simple arrays within composition\n */\nexport type CompositionWithOneOfAndSimpleArrayDictionary = {\n    propA?: boolean | {\n        [key: string]: Array<boolean>;\n    };\n};\n\n/**\n * This is a model that contains a dictionary of complex arrays (composited) within composition\n */\nexport type CompositionWithOneOfAndComplexArrayDictionary = {\n    propA?: boolean | {\n        [key: string]: Array<number | string>;\n    };\n};\n\n/**\n * This is a model with one property with a 'all of' relationship\n */\nexport type CompositionWithAllOfAndNullable = {\n    propA?: ({\n        boolean?: boolean;\n    } & ModelWithEnum & ModelWithArray & ModelWithDictionary) | null;\n};\n\n/**\n * This is a model with one property with a 'any of' relationship\n */\nexport type CompositionWithAnyOfAndNullable = {\n    propA?: {\n        boolean?: boolean;\n    } | ModelWithEnum | ModelWithArray | ModelWithDictionary | null;\n};\n\n/**\n * This is a base model with two simple optional properties\n */\nexport type CompositionBaseModel = {\n    firstName?: string;\n    lastname?: string;\n};\n\n/**\n * This is a model that extends the base model\n */\nexport type CompositionExtendedModel = CompositionBaseModel & {\n    age: number;\n    firstName: string;\n    lastname: string;\n};\n\n/**\n * This is a model with one nested property\n */\nexport type ModelWithProperties = {\n    required: string;\n    readonly requiredAndReadOnly: string;\n    requiredAndNullable: string | null;\n    string?: string;\n    number?: number;\n    boolean?: boolean;\n    reference?: ModelWithString;\n    'property with space'?: string;\n    default?: string;\n    try?: string;\n    readonly '@namespace.string'?: string;\n    readonly '@namespace.integer'?: number;\n};\n\n/**\n * This is a model with one nested property\n */\nexport type ModelWithNestedProperties = {\n    readonly first: {\n        readonly second: {\n            readonly third: string | null;\n        } | null;\n    } | null;\n};\n\n/**\n * This is a model with duplicated properties\n */\nexport type ModelWithDuplicateProperties = {\n    prop?: ModelWithString;\n};\n\n/**\n * This is a model with ordered properties\n */\nexport type ModelWithOrderedProperties = {\n    zebra?: string;\n    apple?: string;\n    hawaii?: string;\n};\n\n/**\n * This is a model with duplicated imports\n */\nexport type ModelWithDuplicateImports = {\n    propA?: ModelWithString;\n    propB?: ModelWithString;\n    propC?: ModelWithString;\n};\n\n/**\n * This is a model that extends another model\n */\nexport type ModelThatExtends = ModelWithString & {\n    propExtendsA?: string;\n    propExtendsB?: ModelWithString;\n};\n\n/**\n * This is a model that extends another model\n */\nexport type ModelThatExtendsExtends = ModelWithString & ModelThatExtends & {\n    propExtendsC?: string;\n    propExtendsD?: ModelWithString;\n};\n\n/**\n * This is a model that contains a some patterns\n */\nexport type ModelWithPattern = {\n    key: string;\n    name: string;\n    readonly enabled?: boolean;\n    readonly modified?: string;\n    id?: string;\n    text?: string;\n    patternWithSingleQuotes?: string;\n    patternWithNewline?: string;\n    patternWithBacktick?: string;\n    patternWithUnicode?: string;\n};\n\nexport type File = {\n    /**\n     * Id\n     */\n    readonly id?: string;\n    /**\n     * Updated at\n     */\n    readonly updated_at?: string;\n    /**\n     * Created at\n     */\n    readonly created_at?: string;\n    /**\n     * Mime\n     */\n    mime: string;\n    /**\n     * File\n     */\n    readonly file?: string;\n};\n\nexport type Default = {\n    name?: string;\n};\n\nexport type Pageable = {\n    page?: number;\n    size?: number;\n    sort?: Array<string>;\n};\n\n/**\n * This is a free-form object without additionalProperties.\n */\nexport type FreeFormObjectWithoutAdditionalProperties = {\n    [key: string]: unknown;\n};\n\n/**\n * This is a free-form object with additionalProperties: true.\n */\nexport type FreeFormObjectWithAdditionalPropertiesEqTrue = {\n    [key: string]: unknown;\n};\n\n/**\n * This is a free-form object with additionalProperties: {}.\n */\nexport type FreeFormObjectWithAdditionalPropertiesEqEmptyObject = {\n    [key: string]: unknown;\n};\n\nexport type ModelWithConst = {\n    String?: 'String';\n    number?: 0;\n    null?: null;\n    withType?: 'Some string';\n};\n\n/**\n * This is a model with one property and additionalProperties: true\n */\nexport type ModelWithAdditionalPropertiesEqTrue = {\n    /**\n     * This is a simple string property\n     */\n    prop?: string;\n    [key: string]: unknown;\n};\n\nexport type NestedAnyOfArraysNullable = {\n    nullableArray?: Array<string | boolean> | null;\n};\n\nexport type CompositionWithOneOfAndProperties = ({\n    foo: SimpleParameter;\n} | {\n    bar: NonAsciiStringæøåÆøÅöôêÊ字符串;\n}) & {\n    baz: number | null;\n    qux: number;\n};\n\n/**\n * An object that can be null\n */\nexport type NullableObject = {\n    foo?: string;\n} | null;\n\n/**\n * Some % character\n */\nexport type CharactersInDescription = string;\n\nexport type ModelWithNullableObject = {\n    data?: NullableObject;\n};\n\n/**\n * An object with additional properties that can be null (anyOf ref + null)\n */\nexport type ModelWithAdditionalPropertiesRef = {\n    [key: string]: NullableObject | null;\n};\n\nexport type ModelWithOneOfEnum = {\n    foo: 'Bar';\n} | {\n    foo: 'Baz';\n} | {\n    foo: 'Qux';\n} | {\n    content: string;\n    foo: 'Quux';\n} | {\n    content: [\n        string,\n        string\n    ];\n    foo: 'Corge';\n};\n\nexport type ModelWithNestedArrayEnumsDataFoo = 'foo' | 'bar';\n\nexport type ModelWithNestedArrayEnumsDataBar = 'baz' | 'qux';\n\nexport type ModelWithNestedArrayEnumsData = {\n    foo?: Array<ModelWithNestedArrayEnumsDataFoo>;\n    bar?: Array<ModelWithNestedArrayEnumsDataBar>;\n};\n\nexport type ModelWithNestedArrayEnums = {\n    array_strings?: Array<string>;\n    data?: ModelWithNestedArrayEnumsData;\n};\n\nexport type ModelWithNestedCompositionEnums = {\n    foo?: ModelWithNestedArrayEnumsDataFoo;\n};\n\nexport type ModelWithReadOnlyAndWriteOnly = {\n    foo: string;\n    readonly bar: string;\n};\n\nexport type ModelWithConstantSizeArray = [\n    number,\n    number\n];\n\nexport type ModelWithAnyOfConstantSizeArray = [\n    number | string,\n    number | string,\n    number | string\n];\n\nexport type ModelWithPrefixItemsConstantSizeArray = [\n    ModelWithInteger,\n    number | string,\n    string\n];\n\nexport type ModelWithAnyOfConstantSizeArrayNullable = [\n    number | null | string,\n    number | null | string,\n    number | null | string\n];\n\nexport type ModelWithAnyOfConstantSizeArrayWithNSizeAndOptions = [\n    number | Import,\n    number | Import\n];\n\nexport type ModelWithAnyOfConstantSizeArrayAndIntersect = [\n    number & string,\n    number & string\n];\n\nexport type ModelWithNumericEnumUnion = {\n    /**\n     * Период\n     */\n    value?: -10 | -1 | 0 | 1 | 3 | 6 | 12;\n};\n\n/**\n * Some description with `back ticks`\n */\nexport type ModelWithBackticksInDescription = {\n    /**\n     * The template `that` should be used for parsing and importing the contents of the CSV file.\n     *\n     * <br/><p>There is one placeholder currently supported:<ul>     <li><b>${x}</b> - refers to the n-th column in the CSV file, e.g. ${1}, ${2}, ...)</li></ul><p>Example of a correct JSON template:</p>\n     * <pre>\n     * [\n     * {\n     * \"resourceType\": \"Asset\",\n     * \"identifier\": {\n     * \"name\": \"${1}\",\n     * \"domain\": {\n     * \"name\": \"${2}\",\n     * \"community\": {\n     * \"name\": \"Some Community\"\n     * }\n     * }\n     * },\n     * \"attributes\" : {\n     * \"00000000-0000-0000-0000-000000003115\" : [ {\n     * \"value\" : \"${3}\"\n     * } ],\n     * \"00000000-0000-0000-0000-000000000222\" : [ {\n     * \"value\" : \"${4}\"\n     * } ]\n     * }\n     * }\n     * ]\n     * </pre>\n     */\n    template?: string;\n};\n\nexport type ModelWithOneOfAndProperties = (SimpleParameter | NonAsciiStringæøåÆøÅöôêÊ字符串) & {\n    baz: number | null;\n    qux: number;\n};\n\n/**\n * Model used to test deduplication strategy (unused)\n */\nexport type ParameterSimpleParameterUnused = string;\n\n/**\n * Model used to test deduplication strategy\n */\nexport type PostServiceWithEmptyTagResponse = string;\n\n/**\n * Model used to test deduplication strategy\n */\nexport type PostServiceWithEmptyTagResponse2 = string;\n\n/**\n * Model used to test deduplication strategy\n */\nexport type DeleteFooData = string;\n\n/**\n * Model used to test deduplication strategy\n */\nexport type DeleteFooData2 = string;\n\n/**\n * Model with restricted keyword name\n */\nexport type Import = string;\n\nexport type SchemaWithFormRestrictedKeys = {\n    description?: string;\n    'x-enum-descriptions'?: string;\n    'x-enum-varnames'?: string;\n    'x-enumNames'?: string;\n    title?: string;\n    object?: {\n        description?: string;\n        'x-enum-descriptions'?: string;\n        'x-enum-varnames'?: string;\n        'x-enumNames'?: string;\n        title?: string;\n    };\n    array?: Array<{\n        description?: string;\n        'x-enum-descriptions'?: string;\n        'x-enum-varnames'?: string;\n        'x-enumNames'?: string;\n        title?: string;\n    }>;\n};\n\n/**\n * This schema was giving PascalCase transformations a hard time\n */\nexport type IoK8sApimachineryPkgApisMetaV1DeleteOptions = {\n    /**\n     * Must be fulfilled before a deletion is carried out. If not possible, a 409 Conflict status will be returned.\n     */\n    preconditions?: IoK8sApimachineryPkgApisMetaV1Preconditions;\n};\n\n/**\n * This schema was giving PascalCase transformations a hard time\n */\nexport type IoK8sApimachineryPkgApisMetaV1Preconditions = {\n    /**\n     * Specifies the target ResourceVersion\n     */\n    resourceVersion?: string;\n    /**\n     * Specifies the target UID.\n     */\n    uid?: string;\n};\n\nexport type AdditionalPropertiesUnknownIssue = {\n    [key: string]: string | number;\n};\n\nexport type AdditionalPropertiesUnknownIssue2 = {\n    [key: string]: string | number;\n};\n\nexport type AdditionalPropertiesUnknownIssue3 = string & {\n    entries: {\n        [key: string]: AdditionalPropertiesUnknownIssue;\n    };\n};\n\nexport type AdditionalPropertiesIntegerIssue = {\n    value: number;\n    [key: string]: number;\n};\n\nexport type OneOfAllOfIssue = ((ConstValue | GenericSchemaDuplicateIssue1SystemBoolean) & _3eNum1Период) | GenericSchemaDuplicateIssue1SystemString;\n\nexport type GenericSchemaDuplicateIssue1SystemBoolean = {\n    item?: boolean;\n    error?: string | null;\n    readonly hasError?: boolean;\n    data?: {\n        [key: string]: never;\n    };\n};\n\nexport type GenericSchemaDuplicateIssue1SystemString = {\n    item?: string | null;\n    error?: string | null;\n    readonly hasError?: boolean;\n};\n\nexport type ExternalSharedModel = {\n    id: string;\n    name?: string;\n};\n\n/**\n * This is a model with one property containing a reference\n */\nexport type ModelWithReferenceWritable = {\n    prop?: ModelWithPropertiesWritable;\n};\n\n/**\n * This is a model with one property containing an array\n */\nexport type ModelWithArrayReadOnlyAndWriteOnlyWritable = {\n    prop?: Array<ModelWithReadOnlyAndWriteOnlyWritable>;\n    propWithFile?: Array<Blob | File>;\n    propWithNumber?: Array<number>;\n};\n\n/**\n * This is a model with one nested property\n */\nexport type ModelWithPropertiesWritable = {\n    required: string;\n    requiredAndNullable: string | null;\n    string?: string;\n    number?: number;\n    boolean?: boolean;\n    reference?: ModelWithString;\n    'property with space'?: string;\n    default?: string;\n    try?: string;\n};\n\n/**\n * This is a model that contains a some patterns\n */\nexport type ModelWithPatternWritable = {\n    key: string;\n    name: string;\n    id?: string;\n    text?: string;\n    patternWithSingleQuotes?: string;\n    patternWithNewline?: string;\n    patternWithBacktick?: string;\n    patternWithUnicode?: string;\n};\n\nexport type FileWritable = {\n    /**\n     * Mime\n     */\n    mime: string;\n};\n\nexport type ModelWithReadOnlyAndWriteOnlyWritable = {\n    foo: string;\n    baz: string;\n};\n\nexport type ModelWithAnyOfConstantSizeArrayWithNSizeAndOptionsWritable = [\n    number | Import,\n    number | Import\n];\n\nexport type AdditionalPropertiesUnknownIssueWritable = {\n    [key: string]: string | number;\n};\n\nexport type OneOfAllOfIssueWritable = ((ConstValue | GenericSchemaDuplicateIssue1SystemBoolean) & _3eNum1Период) | GenericSchemaDuplicateIssue1SystemString;\n\nexport type GenericSchemaDuplicateIssue1SystemBooleanWritable = {\n    item?: boolean;\n    error?: string | null;\n    data?: {\n        [key: string]: never;\n    };\n};\n\nexport type GenericSchemaDuplicateIssue1SystemStringWritable = {\n    item?: string | null;\n    error?: string | null;\n};\n\n/**\n * This is a reusable parameter\n */\nexport type SimpleParameter = string;\n\n/**\n * Parameter with illegal characters\n */\nexport type XFooBar = ModelWithString;\n\n/**\n * A reusable request body\n */\nexport type SimpleRequestBody = ModelWithString;\n\n/**\n * A reusable request body\n */\nexport type SimpleFormData = ModelWithString;\n\nexport type ExportData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no+tag';\n};\n\nexport type PatchApiVbyApiVersionNoTagData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no+tag';\n};\n\nexport type PatchApiVbyApiVersionNoTagResponses = {\n    /**\n     * OK\n     */\n    default: unknown;\n};\n\nexport type ImportData = {\n    body: ModelWithReadOnlyAndWriteOnlyWritable | ModelWithArrayReadOnlyAndWriteOnlyWritable;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no+tag';\n};\n\nexport type ImportResponses = {\n    /**\n     * Success\n     */\n    200: ModelFromZendesk;\n    /**\n     * Default success response\n     */\n    default: ModelWithReadOnlyAndWriteOnly;\n};\n\nexport type ImportResponse = ImportResponses[keyof ImportResponses];\n\nexport type FooWowData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no+tag';\n};\n\nexport type FooWowResponses = {\n    /**\n     * OK\n     */\n    default: unknown;\n};\n\nexport type ApiVVersionODataControllerCountData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple/$count';\n};\n\nexport type ApiVVersionODataControllerCountResponses = {\n    /**\n     * Success\n     */\n    200: ModelFromZendesk;\n};\n\nexport type ApiVVersionODataControllerCountResponse = ApiVVersionODataControllerCountResponses[keyof ApiVVersionODataControllerCountResponses];\n\nexport type GetApiVbyApiVersionSimpleOperationData = {\n    body?: never;\n    path: {\n        /**\n         * foo in method\n         */\n        foo_param: string;\n    };\n    query?: never;\n    url: '/api/v{api-version}/simple:operation';\n};\n\nexport type GetApiVbyApiVersionSimpleOperationErrors = {\n    /**\n     * Default error response\n     */\n    default: ModelWithBoolean;\n};\n\nexport type GetApiVbyApiVersionSimpleOperationError = GetApiVbyApiVersionSimpleOperationErrors[keyof GetApiVbyApiVersionSimpleOperationErrors];\n\nexport type GetApiVbyApiVersionSimpleOperationResponses = {\n    /**\n     * Response is a simple number\n     */\n    200: number;\n};\n\nexport type GetApiVbyApiVersionSimpleOperationResponse = GetApiVbyApiVersionSimpleOperationResponses[keyof GetApiVbyApiVersionSimpleOperationResponses];\n\nexport type DeleteCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type GetCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type HeadCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type OptionsCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type PatchCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type PostCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type PutCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type DeleteFooData3 = {\n    body?: never;\n    headers: {\n        /**\n         * Parameter with illegal characters\n         */\n        'x-Foo-Bar': ModelWithString;\n    };\n    path: {\n        /**\n         * foo in method\n         */\n        foo_param: string;\n        /**\n         * bar in method\n         */\n        BarParam: string;\n    };\n    query?: never;\n    url: '/api/v{api-version}/foo/{foo_param}/bar/{BarParam}';\n};\n\nexport type CallWithDescriptionsData = {\n    body?: never;\n    path?: never;\n    query?: {\n        /**\n         * Testing multiline comments in string: First line\n         * Second line\n         *\n         * Fourth line\n         */\n        parameterWithBreaks?: string;\n        /**\n         * Testing backticks in string: `backticks` and ```multiple backticks``` should work\n         */\n        parameterWithBackticks?: string;\n        /**\n         * Testing slashes in string: \\backwards\\\\\\ and /forwards/// should work\n         */\n        parameterWithSlashes?: string;\n        /**\n         * Testing expression placeholders in string: ${expression} should work\n         */\n        parameterWithExpressionPlaceholders?: string;\n        /**\n         * Testing quotes in string: 'single quote''' and \"double quotes\"\"\" should work\n         */\n        parameterWithQuotes?: string;\n        /**\n         * Testing reserved characters in string: * inline * and ** inline ** should work\n         */\n        parameterWithReservedCharacters?: string;\n    };\n    url: '/api/v{api-version}/descriptions';\n};\n\nexport type DeprecatedCallData = {\n    body?: never;\n    headers: {\n        /**\n         * This parameter is deprecated\n         *\n         * @deprecated\n         */\n        parameter: DeprecatedModel | null;\n    };\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/parameters/deprecated';\n};\n\nexport type CallWithParametersData = {\n    /**\n     * This is the parameter that goes into the body\n     */\n    body: {\n        [key: string]: unknown;\n    } | null;\n    headers: {\n        /**\n         * This is the parameter that goes into the header\n         */\n        parameterHeader: string | null;\n    };\n    path: {\n        /**\n         * This is the parameter that goes into the path\n         */\n        parameterPath: string | null;\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string | null;\n    };\n    query: {\n        foo_ref_enum?: ModelWithNestedArrayEnumsDataFoo;\n        foo_all_of_enum: ModelWithNestedArrayEnumsDataFoo;\n        /**\n         * This is the parameter that goes into the query params\n         */\n        cursor: string | null;\n    };\n    url: '/api/v{api-version}/parameters/{parameterPath}';\n};\n\nexport type CallWithWeirdParameterNamesData = {\n    /**\n     * This is the parameter that goes into the body\n     */\n    body: ModelWithString | null;\n    headers: {\n        /**\n         * This is the parameter that goes into the request header\n         */\n        'parameter.header': string | null;\n    };\n    path: {\n        /**\n         * This is the parameter that goes into the path\n         */\n        'parameter.path.1'?: string;\n        /**\n         * This is the parameter that goes into the path\n         */\n        'parameter-path-2'?: string;\n        /**\n         * This is the parameter that goes into the path\n         */\n        'PARAMETER-PATH-3'?: string;\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string | null;\n    };\n    query: {\n        /**\n         * This is the parameter with a reserved keyword\n         */\n        default?: string;\n        /**\n         * This is the parameter that goes into the request query params\n         */\n        'parameter-query': string | null;\n    };\n    url: '/api/v{api-version}/parameters/{parameter.path.1}/{parameter-path-2}/{PARAMETER-PATH-3}';\n};\n\nexport type GetCallWithOptionalParamData = {\n    /**\n     * This is a required parameter\n     */\n    body: ModelWithOneOfEnum;\n    path?: never;\n    query?: {\n        /**\n         * This is an optional parameter\n         */\n        page?: number;\n    };\n    url: '/api/v{api-version}/parameters';\n};\n\nexport type PostCallWithOptionalParamData = {\n    /**\n     * This is an optional parameter\n     */\n    body?: {\n        offset?: number | null;\n    };\n    path?: never;\n    query: {\n        /**\n         * This is a required parameter\n         */\n        parameter: Pageable;\n    };\n    url: '/api/v{api-version}/parameters';\n};\n\nexport type PostCallWithOptionalParamResponses = {\n    /**\n     * Response is a simple number\n     */\n    200: number;\n    /**\n     * Success\n     */\n    204: void;\n};\n\nexport type PostCallWithOptionalParamResponse = PostCallWithOptionalParamResponses[keyof PostCallWithOptionalParamResponses];\n\nexport type PostApiVbyApiVersionRequestBodyData = {\n    /**\n     * A reusable request body\n     */\n    body?: SimpleRequestBody;\n    path?: never;\n    query?: {\n        /**\n         * This is a reusable parameter\n         */\n        parameter?: string;\n    };\n    url: '/api/v{api-version}/requestBody';\n};\n\nexport type PostApiVbyApiVersionFormDataData = {\n    /**\n     * A reusable request body\n     */\n    body?: SimpleFormData;\n    path?: never;\n    query?: {\n        /**\n         * This is a reusable parameter\n         */\n        parameter?: string;\n    };\n    url: '/api/v{api-version}/formData';\n};\n\nexport type CallWithDefaultParametersData = {\n    body?: never;\n    path?: never;\n    query?: {\n        /**\n         * This is a simple string with default value\n         */\n        parameterString?: string | null;\n        /**\n         * This is a simple number with default value\n         */\n        parameterNumber?: number | null;\n        /**\n         * This is a simple boolean with default value\n         */\n        parameterBoolean?: boolean | null;\n        /**\n         * This is a simple enum with default value\n         */\n        parameterEnum?: 'Success' | 'Warning' | 'Error';\n        /**\n         * This is a simple model with default value\n         */\n        parameterModel?: ModelWithString | null;\n    };\n    url: '/api/v{api-version}/defaults';\n};\n\nexport type CallWithDefaultOptionalParametersData = {\n    body?: never;\n    path?: never;\n    query?: {\n        /**\n         * This is a simple string that is optional with default value\n         */\n        parameterString?: string;\n        /**\n         * This is a simple number that is optional with default value\n         */\n        parameterNumber?: number;\n        /**\n         * This is a simple boolean that is optional with default value\n         */\n        parameterBoolean?: boolean;\n        /**\n         * This is a simple enum that is optional with default value\n         */\n        parameterEnum?: 'Success' | 'Warning' | 'Error';\n        /**\n         * This is a simple model that is optional with default value\n         */\n        parameterModel?: ModelWithString;\n    };\n    url: '/api/v{api-version}/defaults';\n};\n\nexport type CallToTestOrderOfParamsData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * This is a optional string with default\n         */\n        parameterOptionalStringWithDefault?: string;\n        /**\n         * This is a optional string with empty default\n         */\n        parameterOptionalStringWithEmptyDefault?: string;\n        /**\n         * This is a optional string with no default\n         */\n        parameterOptionalStringWithNoDefault?: string;\n        /**\n         * This is a string with default\n         */\n        parameterStringWithDefault: string;\n        /**\n         * This is a string with empty default\n         */\n        parameterStringWithEmptyDefault: string;\n        /**\n         * This is a string with no default\n         */\n        parameterStringWithNoDefault: string;\n        /**\n         * This is a string that can be null with no default\n         */\n        parameterStringNullableWithNoDefault?: string | null;\n        /**\n         * This is a string that can be null with default\n         */\n        parameterStringNullableWithDefault?: string | null;\n    };\n    url: '/api/v{api-version}/defaults';\n};\n\nexport type DuplicateNameData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/duplicate';\n};\n\nexport type DuplicateName2Data = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/duplicate';\n};\n\nexport type DuplicateName3Data = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/duplicate';\n};\n\nexport type DuplicateName4Data = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/duplicate';\n};\n\nexport type CallWithNoContentResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no-content';\n};\n\nexport type CallWithNoContentResponseResponses = {\n    /**\n     * Success\n     */\n    204: void;\n};\n\nexport type CallWithNoContentResponseResponse = CallWithNoContentResponseResponses[keyof CallWithNoContentResponseResponses];\n\nexport type CallWithResponseAndNoContentResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multiple-tags/response-and-no-content';\n};\n\nexport type CallWithResponseAndNoContentResponseResponses = {\n    /**\n     * Response is a simple number\n     */\n    200: number;\n    /**\n     * Success\n     */\n    204: void;\n};\n\nexport type CallWithResponseAndNoContentResponseResponse = CallWithResponseAndNoContentResponseResponses[keyof CallWithResponseAndNoContentResponseResponses];\n\nexport type DummyAData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multiple-tags/a';\n};\n\nexport type DummyAResponses = {\n    200: _400;\n};\n\nexport type DummyAResponse = DummyAResponses[keyof DummyAResponses];\n\nexport type DummyBData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multiple-tags/b';\n};\n\nexport type DummyBResponses = {\n    /**\n     * Success\n     */\n    204: void;\n};\n\nexport type DummyBResponse = DummyBResponses[keyof DummyBResponses];\n\nexport type CallWithResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/response';\n};\n\nexport type CallWithResponseResponses = {\n    default: Import;\n};\n\nexport type CallWithResponseResponse = CallWithResponseResponses[keyof CallWithResponseResponses];\n\nexport type CallWithDuplicateResponsesData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/response';\n};\n\nexport type CallWithDuplicateResponsesErrors = {\n    /**\n     * Message for 500 error\n     */\n    500: ModelWithStringError;\n    /**\n     * Message for 501 error\n     */\n    501: ModelWithStringError;\n    /**\n     * Message for 502 error\n     */\n    502: ModelWithStringError;\n    /**\n     * Message for 4XX errors\n     */\n    '4XX': DictionaryWithArray;\n    /**\n     * Default error response\n     */\n    default: ModelWithBoolean;\n};\n\nexport type CallWithDuplicateResponsesError = CallWithDuplicateResponsesErrors[keyof CallWithDuplicateResponsesErrors];\n\nexport type CallWithDuplicateResponsesResponses = {\n    /**\n     * Message for 200 response\n     */\n    200: ModelWithBoolean & ModelWithInteger;\n    /**\n     * Message for 201 response\n     */\n    201: ModelWithString;\n    /**\n     * Message for 202 response\n     */\n    202: ModelWithString;\n};\n\nexport type CallWithDuplicateResponsesResponse = CallWithDuplicateResponsesResponses[keyof CallWithDuplicateResponsesResponses];\n\nexport type CallWithResponsesData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/response';\n};\n\nexport type CallWithResponsesErrors = {\n    /**\n     * Message for 500 error\n     */\n    500: ModelWithStringError;\n    /**\n     * Message for 501 error\n     */\n    501: ModelWithStringError;\n    /**\n     * Message for 502 error\n     */\n    502: ModelWithStringError;\n    /**\n     * Message for default response\n     */\n    default: ModelWithStringError;\n};\n\nexport type CallWithResponsesError = CallWithResponsesErrors[keyof CallWithResponsesErrors];\n\nexport type CallWithResponsesResponses = {\n    /**\n     * Message for 200 response\n     */\n    200: {\n        readonly '@namespace.string'?: string;\n        readonly '@namespace.integer'?: number;\n        readonly value?: Array<ModelWithString>;\n    };\n    /**\n     * Message for 201 response\n     */\n    201: ModelThatExtends;\n    /**\n     * Message for 202 response\n     */\n    202: ModelThatExtendsExtends;\n};\n\nexport type CallWithResponsesResponse = CallWithResponsesResponses[keyof CallWithResponsesResponses];\n\nexport type CollectionFormatData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * This is an array parameter that is sent as csv format (comma-separated values)\n         */\n        parameterArrayCSV: Array<string> | null;\n        /**\n         * This is an array parameter that is sent as ssv format (space-separated values)\n         */\n        parameterArraySSV: Array<string> | null;\n        /**\n         * This is an array parameter that is sent as tsv format (tab-separated values)\n         */\n        parameterArrayTSV: Array<string> | null;\n        /**\n         * This is an array parameter that is sent as pipes format (pipe-separated values)\n         */\n        parameterArrayPipes: Array<string> | null;\n        /**\n         * This is an array parameter that is sent as multi format (multiple parameter instances)\n         */\n        parameterArrayMulti: Array<string> | null;\n    };\n    url: '/api/v{api-version}/collectionFormat';\n};\n\nexport type TypesData = {\n    body?: never;\n    path?: {\n        /**\n         * This is a number parameter\n         */\n        id?: number;\n    };\n    query: {\n        /**\n         * This is a number parameter\n         */\n        parameterNumber: number;\n        /**\n         * This is a string parameter\n         */\n        parameterString: string | null;\n        /**\n         * This is a boolean parameter\n         */\n        parameterBoolean: boolean | null;\n        /**\n         * This is an object parameter\n         */\n        parameterObject: {\n            [key: string]: unknown;\n        } | null;\n        /**\n         * This is an array parameter\n         */\n        parameterArray: Array<string> | null;\n        /**\n         * This is a dictionary parameter\n         */\n        parameterDictionary: {\n            [key: string]: unknown;\n        } | null;\n        /**\n         * This is an enum parameter\n         */\n        parameterEnum: 'Success' | 'Warning' | 'Error' | null;\n    };\n    url: '/api/v{api-version}/types';\n};\n\nexport type TypesResponses = {\n    /**\n     * Response is a simple number\n     */\n    200: number;\n    /**\n     * Response is a simple string\n     */\n    201: string;\n    /**\n     * Response is a simple boolean\n     */\n    202: boolean;\n    /**\n     * Response is a simple object\n     */\n    203: {\n        [key: string]: unknown;\n    };\n};\n\nexport type TypesResponse = TypesResponses[keyof TypesResponses];\n\nexport type UploadFileData = {\n    body: Blob | File;\n    path: {\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string | null;\n    };\n    query?: never;\n    url: '/api/v{api-version}/upload';\n};\n\nexport type UploadFileResponses = {\n    200: boolean;\n};\n\nexport type UploadFileResponse = UploadFileResponses[keyof UploadFileResponses];\n\nexport type FileResponseData = {\n    body?: never;\n    path: {\n        id: string;\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string;\n    };\n    query?: never;\n    url: '/api/v{api-version}/file/{id}';\n};\n\nexport type FileResponseResponses = {\n    /**\n     * Success\n     */\n    200: Blob | File;\n};\n\nexport type FileResponseResponse = FileResponseResponses[keyof FileResponseResponses];\n\nexport type ComplexTypesData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * Parameter containing object\n         */\n        parameterObject: {\n            first?: {\n                second?: {\n                    third?: string;\n                };\n            };\n        };\n        /**\n         * Parameter containing reference\n         */\n        parameterReference: ModelWithString;\n    };\n    url: '/api/v{api-version}/complex';\n};\n\nexport type ComplexTypesErrors = {\n    /**\n     * 400 `server` error\n     */\n    400: unknown;\n    /**\n     * 500 server error\n     */\n    500: unknown;\n};\n\nexport type ComplexTypesResponses = {\n    /**\n     * Successful response\n     */\n    200: Array<ModelWithString>;\n};\n\nexport type ComplexTypesResponse = ComplexTypesResponses[keyof ComplexTypesResponses];\n\nexport type MultipartResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multipart';\n};\n\nexport type MultipartResponseResponses = {\n    /**\n     * OK\n     */\n    200: {\n        file?: Blob | File;\n        metadata?: {\n            foo?: string;\n            bar?: string;\n        };\n    };\n};\n\nexport type MultipartResponseResponse = MultipartResponseResponses[keyof MultipartResponseResponses];\n\nexport type MultipartRequestData = {\n    body?: {\n        content?: Blob | File;\n        data?: ModelWithString | null;\n    };\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multipart';\n};\n\nexport type ComplexParamsData = {\n    body?: {\n        readonly key: string | null;\n        name: string | null;\n        enabled?: boolean;\n        type: 'Monkey' | 'Horse' | 'Bird';\n        listOfModels?: Array<ModelWithString> | null;\n        listOfStrings?: Array<string> | null;\n        parameters: ModelWithString | ModelWithEnum | ModelWithArray | ModelWithDictionary;\n        readonly user?: {\n            readonly id?: number;\n            readonly name?: string | null;\n        };\n    };\n    path: {\n        id: number;\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string;\n    };\n    query?: never;\n    url: '/api/v{api-version}/complex/{id}';\n};\n\nexport type ComplexParamsResponses = {\n    /**\n     * Success\n     */\n    200: ModelWithString;\n};\n\nexport type ComplexParamsResponse = ComplexParamsResponses[keyof ComplexParamsResponses];\n\nexport type CallWithResultFromHeaderData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/header';\n};\n\nexport type CallWithResultFromHeaderErrors = {\n    /**\n     * 400 server error\n     */\n    400: unknown;\n    /**\n     * 500 server error\n     */\n    500: unknown;\n};\n\nexport type CallWithResultFromHeaderResponses = {\n    /**\n     * Successful response\n     */\n    200: unknown;\n};\n\nexport type TestErrorCodeData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * Status code to return\n         */\n        status: number;\n    };\n    url: '/api/v{api-version}/error';\n};\n\nexport type TestErrorCodeErrors = {\n    /**\n     * Custom message: Internal Server Error\n     */\n    500: unknown;\n    /**\n     * Custom message: Not Implemented\n     */\n    501: unknown;\n    /**\n     * Custom message: Bad Gateway\n     */\n    502: unknown;\n    /**\n     * Custom message: Service Unavailable\n     */\n    503: unknown;\n};\n\nexport type TestErrorCodeResponses = {\n    /**\n     * Custom message: Successful response\n     */\n    200: unknown;\n};\n\nexport type NonAsciiæøåÆøÅöôêÊ字符串Data = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * Dummy input param\n         */\n        nonAsciiParamæøåÆØÅöôêÊ: number;\n    };\n    url: '/api/v{api-version}/non-ascii-æøåÆØÅöôêÊ字符串';\n};\n\nexport type NonAsciiæøåÆøÅöôêÊ字符串Responses = {\n    /**\n     * Successful response\n     */\n    200: Array<NonAsciiStringæøåÆøÅöôêÊ字符串>;\n};\n\nexport type NonAsciiæøåÆøÅöôêÊ字符串Response = NonAsciiæøåÆøÅöôêÊ字符串Responses[keyof NonAsciiæøåÆøÅöôêÊ字符串Responses];\n\nexport type PutWithFormUrlEncodedData = {\n    body: ArrayWithStrings;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/non-ascii-æøåÆØÅöôêÊ字符串';\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/svelte-query/fetch/@tanstack/svelte-query.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport { type DefaultError, type InfiniteData, infiniteQueryOptions, type MutationOptions, queryOptions } from '@tanstack/svelte-query';\n\nimport { client } from '../client.gen';\nimport { apiVVersionODataControllerCount, callToTestOrderOfParams, callWithDefaultOptionalParameters, callWithDefaultParameters, callWithDescriptions, callWithDuplicateResponses, callWithNoContentResponse, callWithParameters, callWithResponse, callWithResponseAndNoContentResponse, callWithResponses, callWithResultFromHeader, callWithWeirdParameterNames, collectionFormat, complexParams, complexTypes, deleteCallWithoutParametersAndResponse, deleteFoo, deprecatedCall, dummyA, dummyB, duplicateName, duplicateName2, duplicateName3, duplicateName4, export_, fileResponse, fooWow, getApiVbyApiVersionSimpleOperation, getCallWithOptionalParam, getCallWithoutParametersAndResponse, import_, multipartRequest, multipartResponse, nonAsciiæøåÆøÅöôêÊ字符串, type Options, patchApiVbyApiVersionNoTag, patchCallWithoutParametersAndResponse, postApiVbyApiVersionFormData, postApiVbyApiVersionRequestBody, postCallWithOptionalParam, postCallWithoutParametersAndResponse, putCallWithoutParametersAndResponse, putWithFormUrlEncoded, testErrorCode, types, uploadFile } from '../sdk.gen';\nimport type { ApiVVersionODataControllerCountData, ApiVVersionODataControllerCountResponse, CallToTestOrderOfParamsData, CallWithDefaultOptionalParametersData, CallWithDefaultParametersData, CallWithDescriptionsData, CallWithDuplicateResponsesData, CallWithDuplicateResponsesError, CallWithDuplicateResponsesResponse, CallWithNoContentResponseData, CallWithNoContentResponseResponse, CallWithParametersData, CallWithResponseAndNoContentResponseData, CallWithResponseAndNoContentResponseResponse, CallWithResponseData, CallWithResponseResponse, CallWithResponsesData, CallWithResponsesError, CallWithResponsesResponse, CallWithResultFromHeaderData, CallWithWeirdParameterNamesData, CollectionFormatData, ComplexParamsData, ComplexParamsResponse, ComplexTypesData, ComplexTypesResponse, DeleteCallWithoutParametersAndResponseData, DeleteFooData3, DeprecatedCallData, DummyAData, DummyAResponse, DummyBData, DummyBResponse, DuplicateName2Data, DuplicateName3Data, DuplicateName4Data, DuplicateNameData, ExportData, FileResponseData, FileResponseResponse, FooWowData, GetApiVbyApiVersionSimpleOperationData, GetApiVbyApiVersionSimpleOperationError, GetApiVbyApiVersionSimpleOperationResponse, GetCallWithOptionalParamData, GetCallWithoutParametersAndResponseData, ImportData, ImportResponse, MultipartRequestData, MultipartResponseData, MultipartResponseResponse, NonAsciiæøåÆøÅöôêÊ字符串Data, NonAsciiæøåÆøÅöôêÊ字符串Response, PatchApiVbyApiVersionNoTagData, PatchCallWithoutParametersAndResponseData, PostApiVbyApiVersionFormDataData, PostApiVbyApiVersionRequestBodyData, PostCallWithOptionalParamData, PostCallWithOptionalParamResponse, PostCallWithoutParametersAndResponseData, PutCallWithoutParametersAndResponseData, PutWithFormUrlEncodedData, TestErrorCodeData, TypesData, TypesResponse, UploadFileData, UploadFileResponse } from '../types.gen';\n\nexport type QueryKey<TOptions extends Options> = [\n    Pick<TOptions, 'baseUrl' | 'body' | 'headers' | 'path' | 'query'> & {\n        _id: string;\n        _infinite?: boolean;\n        tags?: ReadonlyArray<string>;\n    }\n];\n\nconst createQueryKey = <TOptions extends Options>(id: string, options?: TOptions, infinite?: boolean, tags?: ReadonlyArray<string>): [\n    QueryKey<TOptions>[0]\n] => {\n    const params: QueryKey<TOptions>[0] = { _id: id, baseUrl: options?.baseUrl || (options?.client ?? client).getConfig().baseUrl } as QueryKey<TOptions>[0];\n    if (infinite) {\n        params._infinite = infinite;\n    }\n    if (tags) {\n        params.tags = tags;\n    }\n    if (options?.body) {\n        params.body = options.body;\n    }\n    if (options?.headers) {\n        params.headers = options.headers;\n    }\n    if (options?.path) {\n        params.path = options.path;\n    }\n    if (options?.query) {\n        params.query = options.query;\n    }\n    return [params];\n};\n\nexport const exportQueryKey = (options?: Options<ExportData>) => createQueryKey('export', options);\n\nexport const exportOptions = (options?: Options<ExportData>) => queryOptions<unknown, DefaultError, unknown, ReturnType<typeof exportQueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await export_({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: exportQueryKey(options)\n});\n\nexport const patchApiVbyApiVersionNoTagMutation = (options?: Partial<Options<PatchApiVbyApiVersionNoTagData>>): MutationOptions<unknown, DefaultError, Options<PatchApiVbyApiVersionNoTagData>> => {\n    const mutationOptions: MutationOptions<unknown, DefaultError, Options<PatchApiVbyApiVersionNoTagData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await patchApiVbyApiVersionNoTag({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const importMutation = (options?: Partial<Options<ImportData>>): MutationOptions<ImportResponse, DefaultError, Options<ImportData>> => {\n    const mutationOptions: MutationOptions<ImportResponse, DefaultError, Options<ImportData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await import_({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const fooWowMutation = (options?: Partial<Options<FooWowData>>): MutationOptions<unknown, DefaultError, Options<FooWowData>> => {\n    const mutationOptions: MutationOptions<unknown, DefaultError, Options<FooWowData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await fooWow({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const apiVVersionODataControllerCountQueryKey = (options?: Options<ApiVVersionODataControllerCountData>) => createQueryKey('apiVVersionODataControllerCount', options);\n\nexport const apiVVersionODataControllerCountOptions = (options?: Options<ApiVVersionODataControllerCountData>) => queryOptions<ApiVVersionODataControllerCountResponse, DefaultError, ApiVVersionODataControllerCountResponse, ReturnType<typeof apiVVersionODataControllerCountQueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await apiVVersionODataControllerCount({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: apiVVersionODataControllerCountQueryKey(options)\n});\n\nexport const getApiVbyApiVersionSimpleOperationQueryKey = (options: Options<GetApiVbyApiVersionSimpleOperationData>) => createQueryKey('getApiVbyApiVersionSimpleOperation', options);\n\nexport const getApiVbyApiVersionSimpleOperationOptions = (options: Options<GetApiVbyApiVersionSimpleOperationData>) => queryOptions<GetApiVbyApiVersionSimpleOperationResponse, GetApiVbyApiVersionSimpleOperationError, GetApiVbyApiVersionSimpleOperationResponse, ReturnType<typeof getApiVbyApiVersionSimpleOperationQueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await getApiVbyApiVersionSimpleOperation({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: getApiVbyApiVersionSimpleOperationQueryKey(options)\n});\n\nexport const deleteCallWithoutParametersAndResponseMutation = (options?: Partial<Options<DeleteCallWithoutParametersAndResponseData>>): MutationOptions<unknown, DefaultError, Options<DeleteCallWithoutParametersAndResponseData>> => {\n    const mutationOptions: MutationOptions<unknown, DefaultError, Options<DeleteCallWithoutParametersAndResponseData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await deleteCallWithoutParametersAndResponse({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const getCallWithoutParametersAndResponseQueryKey = (options?: Options<GetCallWithoutParametersAndResponseData>) => createQueryKey('getCallWithoutParametersAndResponse', options);\n\nexport const getCallWithoutParametersAndResponseOptions = (options?: Options<GetCallWithoutParametersAndResponseData>) => queryOptions<unknown, DefaultError, unknown, ReturnType<typeof getCallWithoutParametersAndResponseQueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await getCallWithoutParametersAndResponse({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: getCallWithoutParametersAndResponseQueryKey(options)\n});\n\nexport const patchCallWithoutParametersAndResponseMutation = (options?: Partial<Options<PatchCallWithoutParametersAndResponseData>>): MutationOptions<unknown, DefaultError, Options<PatchCallWithoutParametersAndResponseData>> => {\n    const mutationOptions: MutationOptions<unknown, DefaultError, Options<PatchCallWithoutParametersAndResponseData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await patchCallWithoutParametersAndResponse({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const postCallWithoutParametersAndResponseMutation = (options?: Partial<Options<PostCallWithoutParametersAndResponseData>>): MutationOptions<unknown, DefaultError, Options<PostCallWithoutParametersAndResponseData>> => {\n    const mutationOptions: MutationOptions<unknown, DefaultError, Options<PostCallWithoutParametersAndResponseData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await postCallWithoutParametersAndResponse({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const putCallWithoutParametersAndResponseMutation = (options?: Partial<Options<PutCallWithoutParametersAndResponseData>>): MutationOptions<unknown, DefaultError, Options<PutCallWithoutParametersAndResponseData>> => {\n    const mutationOptions: MutationOptions<unknown, DefaultError, Options<PutCallWithoutParametersAndResponseData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await putCallWithoutParametersAndResponse({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const deleteFooMutation = (options?: Partial<Options<DeleteFooData3>>): MutationOptions<unknown, DefaultError, Options<DeleteFooData3>> => {\n    const mutationOptions: MutationOptions<unknown, DefaultError, Options<DeleteFooData3>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await deleteFoo({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const callWithDescriptionsMutation = (options?: Partial<Options<CallWithDescriptionsData>>): MutationOptions<unknown, DefaultError, Options<CallWithDescriptionsData>> => {\n    const mutationOptions: MutationOptions<unknown, DefaultError, Options<CallWithDescriptionsData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await callWithDescriptions({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\n/**\n * @deprecated\n */\nexport const deprecatedCallMutation = (options?: Partial<Options<DeprecatedCallData>>): MutationOptions<unknown, DefaultError, Options<DeprecatedCallData>> => {\n    const mutationOptions: MutationOptions<unknown, DefaultError, Options<DeprecatedCallData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await deprecatedCall({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const callWithParametersMutation = (options?: Partial<Options<CallWithParametersData>>): MutationOptions<unknown, DefaultError, Options<CallWithParametersData>> => {\n    const mutationOptions: MutationOptions<unknown, DefaultError, Options<CallWithParametersData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await callWithParameters({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const callWithWeirdParameterNamesMutation = (options?: Partial<Options<CallWithWeirdParameterNamesData>>): MutationOptions<unknown, DefaultError, Options<CallWithWeirdParameterNamesData>> => {\n    const mutationOptions: MutationOptions<unknown, DefaultError, Options<CallWithWeirdParameterNamesData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await callWithWeirdParameterNames({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const getCallWithOptionalParamQueryKey = (options: Options<GetCallWithOptionalParamData>) => createQueryKey('getCallWithOptionalParam', options);\n\nexport const getCallWithOptionalParamOptions = (options: Options<GetCallWithOptionalParamData>) => queryOptions<unknown, DefaultError, unknown, ReturnType<typeof getCallWithOptionalParamQueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await getCallWithOptionalParam({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: getCallWithOptionalParamQueryKey(options)\n});\n\nconst createInfiniteParams = <K extends Pick<QueryKey<Options>[0], 'body' | 'headers' | 'path' | 'query'>>(queryKey: QueryKey<Options>, page: K) => {\n    const params = { ...queryKey[0] };\n    if (page.body) {\n        params.body = {\n            ...queryKey[0].body as any,\n            ...page.body as any\n        };\n    }\n    if (page.headers) {\n        params.headers = {\n            ...queryKey[0].headers,\n            ...page.headers\n        };\n    }\n    if (page.path) {\n        params.path = {\n            ...queryKey[0].path as any,\n            ...page.path as any\n        };\n    }\n    if (page.query) {\n        params.query = {\n            ...queryKey[0].query as any,\n            ...page.query as any\n        };\n    }\n    return params as unknown as typeof page;\n};\n\nexport const getCallWithOptionalParamInfiniteQueryKey = (options: Options<GetCallWithOptionalParamData>): QueryKey<Options<GetCallWithOptionalParamData>> => createQueryKey('getCallWithOptionalParam', options, true);\n\nexport const getCallWithOptionalParamInfiniteOptions = (options: Options<GetCallWithOptionalParamData>) => infiniteQueryOptions<unknown, DefaultError, InfiniteData<unknown>, QueryKey<Options<GetCallWithOptionalParamData>>, number | Pick<QueryKey<Options<GetCallWithOptionalParamData>>[0], 'body' | 'headers' | 'path' | 'query'>>(\n// @ts-ignore\n{\n    queryFn: async ({ pageParam, queryKey, signal }) => {\n        // @ts-ignore\n        const page: Pick<QueryKey<Options<GetCallWithOptionalParamData>>[0], 'body' | 'headers' | 'path' | 'query'> = typeof pageParam === 'object' ? pageParam : {\n            query: {\n                page: pageParam\n            }\n        };\n        const params = createInfiniteParams(queryKey, page);\n        const { data } = await getCallWithOptionalParam({\n            ...options,\n            ...params,\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: getCallWithOptionalParamInfiniteQueryKey(options)\n});\n\nexport const postCallWithOptionalParamMutation = (options?: Partial<Options<PostCallWithOptionalParamData>>): MutationOptions<PostCallWithOptionalParamResponse, DefaultError, Options<PostCallWithOptionalParamData>> => {\n    const mutationOptions: MutationOptions<PostCallWithOptionalParamResponse, DefaultError, Options<PostCallWithOptionalParamData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await postCallWithOptionalParam({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const postApiVbyApiVersionRequestBodyMutation = (options?: Partial<Options<PostApiVbyApiVersionRequestBodyData>>): MutationOptions<unknown, DefaultError, Options<PostApiVbyApiVersionRequestBodyData>> => {\n    const mutationOptions: MutationOptions<unknown, DefaultError, Options<PostApiVbyApiVersionRequestBodyData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await postApiVbyApiVersionRequestBody({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const postApiVbyApiVersionFormDataMutation = (options?: Partial<Options<PostApiVbyApiVersionFormDataData>>): MutationOptions<unknown, DefaultError, Options<PostApiVbyApiVersionFormDataData>> => {\n    const mutationOptions: MutationOptions<unknown, DefaultError, Options<PostApiVbyApiVersionFormDataData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await postApiVbyApiVersionFormData({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const callWithDefaultParametersQueryKey = (options?: Options<CallWithDefaultParametersData>) => createQueryKey('callWithDefaultParameters', options);\n\nexport const callWithDefaultParametersOptions = (options?: Options<CallWithDefaultParametersData>) => queryOptions<unknown, DefaultError, unknown, ReturnType<typeof callWithDefaultParametersQueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await callWithDefaultParameters({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: callWithDefaultParametersQueryKey(options)\n});\n\nexport const callWithDefaultOptionalParametersMutation = (options?: Partial<Options<CallWithDefaultOptionalParametersData>>): MutationOptions<unknown, DefaultError, Options<CallWithDefaultOptionalParametersData>> => {\n    const mutationOptions: MutationOptions<unknown, DefaultError, Options<CallWithDefaultOptionalParametersData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await callWithDefaultOptionalParameters({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const callToTestOrderOfParamsMutation = (options?: Partial<Options<CallToTestOrderOfParamsData>>): MutationOptions<unknown, DefaultError, Options<CallToTestOrderOfParamsData>> => {\n    const mutationOptions: MutationOptions<unknown, DefaultError, Options<CallToTestOrderOfParamsData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await callToTestOrderOfParams({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const duplicateNameMutation = (options?: Partial<Options<DuplicateNameData>>): MutationOptions<unknown, DefaultError, Options<DuplicateNameData>> => {\n    const mutationOptions: MutationOptions<unknown, DefaultError, Options<DuplicateNameData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await duplicateName({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const duplicateName2QueryKey = (options?: Options<DuplicateName2Data>) => createQueryKey('duplicateName2', options);\n\nexport const duplicateName2Options = (options?: Options<DuplicateName2Data>) => queryOptions<unknown, DefaultError, unknown, ReturnType<typeof duplicateName2QueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await duplicateName2({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: duplicateName2QueryKey(options)\n});\n\nexport const duplicateName3Mutation = (options?: Partial<Options<DuplicateName3Data>>): MutationOptions<unknown, DefaultError, Options<DuplicateName3Data>> => {\n    const mutationOptions: MutationOptions<unknown, DefaultError, Options<DuplicateName3Data>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await duplicateName3({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const duplicateName4Mutation = (options?: Partial<Options<DuplicateName4Data>>): MutationOptions<unknown, DefaultError, Options<DuplicateName4Data>> => {\n    const mutationOptions: MutationOptions<unknown, DefaultError, Options<DuplicateName4Data>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await duplicateName4({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const callWithNoContentResponseQueryKey = (options?: Options<CallWithNoContentResponseData>) => createQueryKey('callWithNoContentResponse', options);\n\nexport const callWithNoContentResponseOptions = (options?: Options<CallWithNoContentResponseData>) => queryOptions<CallWithNoContentResponseResponse, DefaultError, CallWithNoContentResponseResponse, ReturnType<typeof callWithNoContentResponseQueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await callWithNoContentResponse({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: callWithNoContentResponseQueryKey(options)\n});\n\nexport const callWithResponseAndNoContentResponseQueryKey = (options?: Options<CallWithResponseAndNoContentResponseData>) => createQueryKey('callWithResponseAndNoContentResponse', options);\n\nexport const callWithResponseAndNoContentResponseOptions = (options?: Options<CallWithResponseAndNoContentResponseData>) => queryOptions<CallWithResponseAndNoContentResponseResponse, DefaultError, CallWithResponseAndNoContentResponseResponse, ReturnType<typeof callWithResponseAndNoContentResponseQueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await callWithResponseAndNoContentResponse({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: callWithResponseAndNoContentResponseQueryKey(options)\n});\n\nexport const dummyAQueryKey = (options?: Options<DummyAData>) => createQueryKey('dummyA', options);\n\nexport const dummyAOptions = (options?: Options<DummyAData>) => queryOptions<DummyAResponse, DefaultError, DummyAResponse, ReturnType<typeof dummyAQueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await dummyA({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: dummyAQueryKey(options)\n});\n\nexport const dummyBQueryKey = (options?: Options<DummyBData>) => createQueryKey('dummyB', options);\n\nexport const dummyBOptions = (options?: Options<DummyBData>) => queryOptions<DummyBResponse, DefaultError, DummyBResponse, ReturnType<typeof dummyBQueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await dummyB({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: dummyBQueryKey(options)\n});\n\nexport const callWithResponseQueryKey = (options?: Options<CallWithResponseData>) => createQueryKey('callWithResponse', options);\n\nexport const callWithResponseOptions = (options?: Options<CallWithResponseData>) => queryOptions<CallWithResponseResponse, DefaultError, CallWithResponseResponse, ReturnType<typeof callWithResponseQueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await callWithResponse({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: callWithResponseQueryKey(options)\n});\n\nexport const callWithDuplicateResponsesMutation = (options?: Partial<Options<CallWithDuplicateResponsesData>>): MutationOptions<CallWithDuplicateResponsesResponse, CallWithDuplicateResponsesError, Options<CallWithDuplicateResponsesData>> => {\n    const mutationOptions: MutationOptions<CallWithDuplicateResponsesResponse, CallWithDuplicateResponsesError, Options<CallWithDuplicateResponsesData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await callWithDuplicateResponses({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const callWithResponsesMutation = (options?: Partial<Options<CallWithResponsesData>>): MutationOptions<CallWithResponsesResponse, CallWithResponsesError, Options<CallWithResponsesData>> => {\n    const mutationOptions: MutationOptions<CallWithResponsesResponse, CallWithResponsesError, Options<CallWithResponsesData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await callWithResponses({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const collectionFormatQueryKey = (options: Options<CollectionFormatData>) => createQueryKey('collectionFormat', options);\n\nexport const collectionFormatOptions = (options: Options<CollectionFormatData>) => queryOptions<unknown, DefaultError, unknown, ReturnType<typeof collectionFormatQueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await collectionFormat({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: collectionFormatQueryKey(options)\n});\n\nexport const typesQueryKey = (options: Options<TypesData>) => createQueryKey('types', options);\n\nexport const typesOptions = (options: Options<TypesData>) => queryOptions<TypesResponse, DefaultError, TypesResponse, ReturnType<typeof typesQueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await types({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: typesQueryKey(options)\n});\n\nexport const uploadFileMutation = (options?: Partial<Options<UploadFileData>>): MutationOptions<UploadFileResponse, DefaultError, Options<UploadFileData>> => {\n    const mutationOptions: MutationOptions<UploadFileResponse, DefaultError, Options<UploadFileData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await uploadFile({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const fileResponseQueryKey = (options: Options<FileResponseData>) => createQueryKey('fileResponse', options);\n\nexport const fileResponseOptions = (options: Options<FileResponseData>) => queryOptions<FileResponseResponse, DefaultError, FileResponseResponse, ReturnType<typeof fileResponseQueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await fileResponse({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: fileResponseQueryKey(options)\n});\n\nexport const complexTypesQueryKey = (options: Options<ComplexTypesData>) => createQueryKey('complexTypes', options);\n\nexport const complexTypesOptions = (options: Options<ComplexTypesData>) => queryOptions<ComplexTypesResponse, DefaultError, ComplexTypesResponse, ReturnType<typeof complexTypesQueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await complexTypes({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: complexTypesQueryKey(options)\n});\n\nexport const multipartResponseQueryKey = (options?: Options<MultipartResponseData>) => createQueryKey('multipartResponse', options);\n\nexport const multipartResponseOptions = (options?: Options<MultipartResponseData>) => queryOptions<MultipartResponseResponse, DefaultError, MultipartResponseResponse, ReturnType<typeof multipartResponseQueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await multipartResponse({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: multipartResponseQueryKey(options)\n});\n\nexport const multipartRequestMutation = (options?: Partial<Options<MultipartRequestData>>): MutationOptions<unknown, DefaultError, Options<MultipartRequestData>> => {\n    const mutationOptions: MutationOptions<unknown, DefaultError, Options<MultipartRequestData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await multipartRequest({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const complexParamsMutation = (options?: Partial<Options<ComplexParamsData>>): MutationOptions<ComplexParamsResponse, DefaultError, Options<ComplexParamsData>> => {\n    const mutationOptions: MutationOptions<ComplexParamsResponse, DefaultError, Options<ComplexParamsData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await complexParams({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const callWithResultFromHeaderMutation = (options?: Partial<Options<CallWithResultFromHeaderData>>): MutationOptions<unknown, DefaultError, Options<CallWithResultFromHeaderData>> => {\n    const mutationOptions: MutationOptions<unknown, DefaultError, Options<CallWithResultFromHeaderData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await callWithResultFromHeader({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const testErrorCodeMutation = (options?: Partial<Options<TestErrorCodeData>>): MutationOptions<unknown, DefaultError, Options<TestErrorCodeData>> => {\n    const mutationOptions: MutationOptions<unknown, DefaultError, Options<TestErrorCodeData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await testErrorCode({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const nonAsciiæøåÆøÅöôêÊ字符串Mutation = (options?: Partial<Options<NonAsciiæøåÆøÅöôêÊ字符串Data>>): MutationOptions<NonAsciiæøåÆøÅöôêÊ字符串Response, DefaultError, Options<NonAsciiæøåÆøÅöôêÊ字符串Data>> => {\n    const mutationOptions: MutationOptions<NonAsciiæøåÆøÅöôêÊ字符串Response, DefaultError, Options<NonAsciiæøåÆøÅöôêÊ字符串Data>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await nonAsciiæøåÆøÅöôêÊ字符串({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\n/**\n * Login User\n */\nexport const putWithFormUrlEncodedMutation = (options?: Partial<Options<PutWithFormUrlEncodedData>>): MutationOptions<unknown, DefaultError, Options<PutWithFormUrlEncodedData>> => {\n    const mutationOptions: MutationOptions<unknown, DefaultError, Options<PutWithFormUrlEncodedData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await putWithFormUrlEncoded({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/svelte-query/fetch/client/client.gen.ts",
    "content": "// 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 (options: RequestOptions) => {\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 url = buildUrl(opts);\n\n    return { opts, url };\n  };\n\n  const request: Client['request'] = async (options) => {\n    // @ts-expect-error\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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/svelte-query/fetch/client/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type { Auth } from '../core/auth.gen';\nexport type { QuerySerializerOptions } from '../core/bodySerializer.gen';\nexport {\n  formDataBodySerializer,\n  jsonBodySerializer,\n  urlSearchParamsBodySerializer,\n} from '../core/bodySerializer.gen';\nexport { buildClientParams } from '../core/params.gen';\nexport { serializeQueryKeyValue } from '../core/queryKeySerializer.gen';\nexport { createClient } from './client.gen';\nexport type {\n  Client,\n  ClientOptions,\n  Config,\n  CreateClientConfig,\n  Options,\n  RequestOptions,\n  RequestResult,\n  ResolvedRequestOptions,\n  ResponseStyle,\n  TDataShape,\n} from './types.gen';\nexport { createConfig, mergeHeaders } from './utils.gen';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/svelte-query/fetch/client/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { Auth } from '../core/auth.gen';\nimport type {\n  ServerSentEventsOptions,\n  ServerSentEventsResult,\n} from '../core/serverSentEvents.gen';\nimport type { Client as CoreClient, Config as CoreConfig } from '../core/types.gen';\nimport type { Middleware } from './utils.gen';\n\nexport type ResponseStyle = 'data' | 'fields';\n\nexport interface Config<T extends ClientOptions = ClientOptions>\n  extends Omit<RequestInit, 'body' | 'headers' | 'method'>, CoreConfig {\n  /**\n   * Base URL for all requests made by this client.\n   */\n  baseUrl?: T['baseUrl'];\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   * Please don't use the Fetch client for Next.js applications. The `next`\n   * options won't have any effect.\n   *\n   * Install {@link https://www.npmjs.com/package/@hey-api/client-next `@hey-api/client-next`} instead.\n   */\n  next?: never;\n  /**\n   * Return the response data parsed in a specified format. By default, `auto`\n   * will infer the appropriate method from the `Content-Type` response header.\n   * You can override this behavior with any of the {@link Body} methods.\n   * Select `stream` if you don't want to parse response data at all.\n   *\n   * @default 'auto'\n   */\n  parseAs?: 'arrayBuffer' | 'auto' | 'blob' | 'formData' | 'json' | 'stream' | 'text';\n  /**\n   * Should we return only data or multiple fields (data, error, response, etc.)?\n   *\n   * @default 'fields'\n   */\n  responseStyle?: ResponseStyle;\n  /**\n   * Throw an error instead of returning it in the response?\n   *\n   * @default false\n   */\n  throwOnError?: T['throwOnError'];\n}\n\nexport interface RequestOptions<\n  TData = unknown,\n  TResponseStyle extends ResponseStyle = 'fields',\n  ThrowOnError extends boolean = boolean,\n  Url extends string = string,\n>\n  extends\n    Config<{\n      responseStyle: TResponseStyle;\n      throwOnError: ThrowOnError;\n    }>,\n    Pick<\n      ServerSentEventsOptions<TData>,\n      | 'onRequest'\n      | 'onSseError'\n      | 'onSseEvent'\n      | 'sseDefaultRetryDelay'\n      | 'sseMaxRetryAttempts'\n      | 'sseMaxRetryDelay'\n    > {\n  /**\n   * Any body that you want to add to your request.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/fetch#body}\n   */\n  body?: unknown;\n  path?: Record<string, unknown>;\n  query?: Record<string, unknown>;\n  /**\n   * Security mechanism(s) to use for the request.\n   */\n  security?: ReadonlyArray<Auth>;\n  url: Url;\n}\n\nexport interface ResolvedRequestOptions<\n  TResponseStyle extends ResponseStyle = 'fields',\n  ThrowOnError extends boolean = boolean,\n  Url extends string = string,\n> extends RequestOptions<unknown, TResponseStyle, ThrowOnError, Url> {\n  serializedBody?: string;\n}\n\nexport type RequestResult<\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = boolean,\n  TResponseStyle extends ResponseStyle = 'fields',\n> = ThrowOnError extends true\n  ? Promise<\n      TResponseStyle extends 'data'\n        ? TData extends Record<string, unknown>\n          ? TData[keyof TData]\n          : TData\n        : {\n            data: TData extends Record<string, unknown> ? TData[keyof TData] : TData;\n            request: Request;\n            response: Response;\n          }\n    >\n  : Promise<\n      TResponseStyle extends 'data'\n        ? (TData extends Record<string, unknown> ? TData[keyof TData] : TData) | undefined\n        : (\n            | {\n                data: TData extends Record<string, unknown> ? TData[keyof TData] : TData;\n                error: undefined;\n              }\n            | {\n                data: undefined;\n                error: TError extends Record<string, unknown> ? TError[keyof TError] : TError;\n              }\n          ) & {\n            request: Request;\n            response: Response;\n          }\n    >;\n\nexport interface ClientOptions {\n  baseUrl?: string;\n  responseStyle?: ResponseStyle;\n  throwOnError?: boolean;\n}\n\ntype MethodFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'>,\n) => RequestResult<TData, TError, ThrowOnError, TResponseStyle>;\n\ntype SseFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'>,\n) => Promise<ServerSentEventsResult<TData, TError>>;\n\ntype RequestFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'> &\n    Pick<Required<RequestOptions<TData, TResponseStyle, ThrowOnError>>, 'method'>,\n) => RequestResult<TData, TError, ThrowOnError, TResponseStyle>;\n\ntype BuildUrlFn = <\n  TData extends {\n    body?: unknown;\n    path?: Record<string, unknown>;\n    query?: Record<string, unknown>;\n    url: string;\n  },\n>(\n  options: TData & Options<TData>,\n) => string;\n\nexport type Client = CoreClient<RequestFn, Config, MethodFn, BuildUrlFn, SseFn> & {\n  interceptors: Middleware<Request, Response, unknown, ResolvedRequestOptions>;\n};\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 = ClientOptions> = (\n  override?: Config<ClientOptions & T>,\n) => Config<Required<ClientOptions> & T>;\n\nexport interface TDataShape {\n  body?: unknown;\n  headers?: unknown;\n  path?: unknown;\n  query?: unknown;\n  url: string;\n}\n\ntype OmitKeys<T, K> = Pick<T, Exclude<keyof T, K>>;\n\nexport type Options<\n  TData extends TDataShape = TDataShape,\n  ThrowOnError extends boolean = boolean,\n  TResponse = unknown,\n  TResponseStyle extends ResponseStyle = 'fields',\n> = OmitKeys<\n  RequestOptions<TResponse, TResponseStyle, ThrowOnError>,\n  'body' | 'path' | 'query' | 'url'\n> &\n  ([TData] extends [never] ? unknown : Omit<TData, 'url'>);\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/svelte-query/fetch/client/utils.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/svelte-query/fetch/client.gen.ts",
    "content": "// 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: 'http://localhost:3000/base' }));\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/svelte-query/fetch/core/auth.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/svelte-query/fetch/core/bodySerializer.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/svelte-query/fetch/core/params.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/svelte-query/fetch/core/pathSerializer.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/svelte-query/fetch/core/queryKeySerializer.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\n/**\n * JSON-friendly union that mirrors what Pinia Colada can hash.\n */\nexport type JsonValue =\n  | null\n  | string\n  | number\n  | boolean\n  | JsonValue[]\n  | { [key: string]: JsonValue };\n\n/**\n * Replacer that converts non-JSON values (bigint, Date, etc.) to safe substitutes.\n */\nexport const queryKeyJsonReplacer = (_key: string, value: unknown) => {\n  if (value === undefined || typeof value === 'function' || typeof value === 'symbol') {\n    return undefined;\n  }\n  if (typeof value === 'bigint') {\n    return value.toString();\n  }\n  if (value instanceof Date) {\n    return value.toISOString();\n  }\n  return value;\n};\n\n/**\n * Safely stringifies a value and parses it back into a JsonValue.\n */\nexport const stringifyToJsonValue = (input: unknown): JsonValue | undefined => {\n  try {\n    const json = JSON.stringify(input, queryKeyJsonReplacer);\n    if (json === undefined) {\n      return undefined;\n    }\n    return JSON.parse(json) as JsonValue;\n  } catch {\n    return undefined;\n  }\n};\n\n/**\n * Detects plain objects (including objects with a null prototype).\n */\nconst isPlainObject = (value: unknown): value is Record<string, unknown> => {\n  if (value === null || typeof value !== 'object') {\n    return false;\n  }\n  const prototype = Object.getPrototypeOf(value as object);\n  return prototype === Object.prototype || prototype === null;\n};\n\n/**\n * Turns URLSearchParams into a sorted JSON object for deterministic keys.\n */\nconst serializeSearchParams = (params: URLSearchParams): JsonValue => {\n  const entries = Array.from(params.entries()).sort(([a], [b]) => a.localeCompare(b));\n  const result: Record<string, JsonValue> = {};\n\n  for (const [key, value] of entries) {\n    const existing = result[key];\n    if (existing === undefined) {\n      result[key] = value;\n      continue;\n    }\n\n    if (Array.isArray(existing)) {\n      (existing as string[]).push(value);\n    } else {\n      result[key] = [existing, value];\n    }\n  }\n\n  return result;\n};\n\n/**\n * Normalizes any accepted value into a JSON-friendly shape for query keys.\n */\nexport const serializeQueryKeyValue = (value: unknown): JsonValue | undefined => {\n  if (value === null) {\n    return null;\n  }\n\n  if (typeof value === 'string' || typeof value === 'number' || typeof value === 'boolean') {\n    return value;\n  }\n\n  if (value === undefined || typeof value === 'function' || typeof value === 'symbol') {\n    return undefined;\n  }\n\n  if (typeof value === 'bigint') {\n    return value.toString();\n  }\n\n  if (value instanceof Date) {\n    return value.toISOString();\n  }\n\n  if (Array.isArray(value)) {\n    return stringifyToJsonValue(value);\n  }\n\n  if (typeof URLSearchParams !== 'undefined' && value instanceof URLSearchParams) {\n    return serializeSearchParams(value);\n  }\n\n  if (isPlainObject(value)) {\n    return stringifyToJsonValue(value);\n  }\n\n  return undefined;\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/svelte-query/fetch/core/serverSentEvents.gen.ts",
    "content": "// 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 const 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            // Normalize line endings: CRLF -> LF, then CR -> LF\n            buffer = buffer.replace(/\\r\\n/g, '\\n').replace(/\\r/g, '\\n');\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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/svelte-query/fetch/core/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { Auth, AuthToken } from './auth.gen';\nimport type { BodySerializer, QuerySerializer, QuerySerializerOptions } from './bodySerializer.gen';\n\nexport type HttpMethod =\n  | 'connect'\n  | 'delete'\n  | 'get'\n  | 'head'\n  | 'options'\n  | 'patch'\n  | 'post'\n  | 'put'\n  | 'trace';\n\nexport type Client<\n  RequestFn = never,\n  Config = unknown,\n  MethodFn = never,\n  BuildUrlFn = never,\n  SseFn = never,\n> = {\n  /**\n   * Returns the final request URL.\n   */\n  buildUrl: BuildUrlFn;\n  getConfig: () => Config;\n  request: RequestFn;\n  setConfig: (config: Config) => Config;\n} & {\n  [K in HttpMethod]: MethodFn;\n} & ([SseFn] extends [never] ? { sse?: never } : { sse: { [K in HttpMethod]: SseFn } });\n\nexport interface Config {\n  /**\n   * Auth token or a function returning auth token. The resolved value will be\n   * added to the request payload as defined by its `security` array.\n   */\n  auth?: ((auth: Auth) => Promise<AuthToken> | AuthToken) | AuthToken;\n  /**\n   * A function for serializing request body parameter. By default,\n   * {@link JSON.stringify()} will be used.\n   */\n  bodySerializer?: BodySerializer | null;\n  /**\n   * An object containing any HTTP headers that you want to pre-populate your\n   * `Headers` object with.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/Headers/Headers#init See more}\n   */\n  headers?:\n    | RequestInit['headers']\n    | Record<\n        string,\n        string | number | boolean | (string | number | boolean)[] | null | undefined | unknown\n      >;\n  /**\n   * The request method.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/fetch#method See more}\n   */\n  method?: Uppercase<HttpMethod>;\n  /**\n   * A function for serializing request query parameters. By default, arrays\n   * will be exploded in form style, objects will be exploded in deepObject\n   * style, and reserved characters are percent-encoded.\n   *\n   * This method will have no effect if the native `paramsSerializer()` Axios\n   * API function is used.\n   *\n   * {@link https://swagger.io/docs/specification/serialization/#query View examples}\n   */\n  querySerializer?: QuerySerializer | QuerySerializerOptions;\n  /**\n   * A function validating request data. This is useful if you want to ensure\n   * the request conforms to the desired shape, so it can be safely sent to\n   * the server.\n   */\n  requestValidator?: (data: unknown) => Promise<unknown>;\n  /**\n   * A function transforming response data before it's returned. This is useful\n   * for post-processing data, e.g. converting ISO strings into Date objects.\n   */\n  responseTransformer?: (data: unknown) => Promise<unknown>;\n  /**\n   * A function validating response data. This is useful if you want to ensure\n   * the response conforms to the desired shape, so it can be safely passed to\n   * the transformers and returned to the user.\n   */\n  responseValidator?: (data: unknown) => Promise<unknown>;\n}\n\ntype IsExactlyNeverOrNeverUndefined<T> = [T] extends [never]\n  ? true\n  : [T] extends [never | undefined]\n    ? [undefined] extends [T]\n      ? false\n      : true\n    : false;\n\nexport type OmitNever<T extends Record<string, unknown>> = {\n  [K in keyof T as IsExactlyNeverOrNeverUndefined<T[K]> extends true ? never : K]: T[K];\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/svelte-query/fetch/core/utils.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/svelte-query/fetch/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport { apiVVersionODataControllerCount, callToTestOrderOfParams, callWithDefaultOptionalParameters, callWithDefaultParameters, callWithDescriptions, callWithDuplicateResponses, callWithNoContentResponse, callWithParameters, callWithResponse, callWithResponseAndNoContentResponse, callWithResponses, callWithResultFromHeader, callWithWeirdParameterNames, collectionFormat, complexParams, complexTypes, deleteCallWithoutParametersAndResponse, deleteFoo, deprecatedCall, dummyA, dummyB, duplicateName, duplicateName2, duplicateName3, duplicateName4, export_, fileResponse, fooWow, getApiVbyApiVersionSimpleOperation, getCallWithOptionalParam, getCallWithoutParametersAndResponse, headCallWithoutParametersAndResponse, import_, multipartRequest, multipartResponse, nonAsciiæøåÆøÅöôêÊ字符串, type Options, optionsCallWithoutParametersAndResponse, patchApiVbyApiVersionNoTag, patchCallWithoutParametersAndResponse, postApiVbyApiVersionFormData, postApiVbyApiVersionRequestBody, postCallWithOptionalParam, postCallWithoutParametersAndResponse, putCallWithoutParametersAndResponse, putWithFormUrlEncoded, testErrorCode, types, uploadFile } from './sdk.gen';\nexport type { _3eNum1Период, _400, AdditionalPropertiesIntegerIssue, AdditionalPropertiesUnknownIssue, AdditionalPropertiesUnknownIssue2, AdditionalPropertiesUnknownIssue3, AdditionalPropertiesUnknownIssueWritable, AnyOfAnyAndNull, AnyOfArrays, ApiVVersionODataControllerCountData, ApiVVersionODataControllerCountResponse, ApiVVersionODataControllerCountResponses, ArrayWithAnyOfProperties, ArrayWithArray, ArrayWithBooleans, ArrayWithNumbers, ArrayWithProperties, ArrayWithReferences, ArrayWithStrings, CallToTestOrderOfParamsData, CallWithDefaultOptionalParametersData, CallWithDefaultParametersData, CallWithDescriptionsData, CallWithDuplicateResponsesData, CallWithDuplicateResponsesError, CallWithDuplicateResponsesErrors, CallWithDuplicateResponsesResponse, CallWithDuplicateResponsesResponses, CallWithNoContentResponseData, CallWithNoContentResponseResponse, CallWithNoContentResponseResponses, CallWithParametersData, CallWithResponseAndNoContentResponseData, CallWithResponseAndNoContentResponseResponse, CallWithResponseAndNoContentResponseResponses, CallWithResponseData, CallWithResponseResponse, CallWithResponseResponses, CallWithResponsesData, CallWithResponsesError, CallWithResponsesErrors, CallWithResponsesResponse, CallWithResponsesResponses, CallWithResultFromHeaderData, CallWithResultFromHeaderErrors, CallWithResultFromHeaderResponses, CallWithWeirdParameterNamesData, CamelCaseCommentWithBreaks, CharactersInDescription, ClientOptions, CollectionFormatData, CommentWithBackticks, CommentWithBackticksAndQuotes, CommentWithBreaks, CommentWithExpressionPlaceholders, CommentWithQuotes, CommentWithReservedCharacters, CommentWithSlashes, ComplexParamsData, ComplexParamsResponse, ComplexParamsResponses, ComplexTypesData, ComplexTypesErrors, ComplexTypesResponse, ComplexTypesResponses, CompositionBaseModel, CompositionExtendedModel, CompositionWithAllOfAndNullable, CompositionWithAnyOf, CompositionWithAnyOfAndNullable, CompositionWithAnyOfAnonymous, CompositionWithNestedAnyAndTypeNull, CompositionWithNestedAnyOfAndNull, CompositionWithOneOf, CompositionWithOneOfAndComplexArrayDictionary, CompositionWithOneOfAndNullable, CompositionWithOneOfAndProperties, CompositionWithOneOfAndSimpleArrayDictionary, CompositionWithOneOfAndSimpleDictionary, CompositionWithOneOfAnonymous, CompositionWithOneOfDiscriminator, ConstValue, Default, DeleteCallWithoutParametersAndResponseData, DeleteFooData, DeleteFooData2, DeleteFooData3, DeprecatedCallData, DeprecatedModel, DictionaryWithArray, DictionaryWithDictionary, DictionaryWithProperties, DictionaryWithPropertiesAndAdditionalProperties, DictionaryWithReference, DictionaryWithString, DummyAData, DummyAResponse, DummyAResponses, DummyBData, DummyBResponse, DummyBResponses, DuplicateName2Data, DuplicateName3Data, DuplicateName4Data, DuplicateNameData, EnumFromDescription, EnumWithExtensions, EnumWithNumbers, EnumWithReplacedCharacters, EnumWithStrings, EnumWithXEnumNames, ExportData, ExternalRefA, ExternalRefB, ExternalSharedModel, File, FileResponseData, FileResponseResponse, FileResponseResponses, FileWritable, FooWowData, FooWowResponses, FreeFormObjectWithAdditionalPropertiesEqEmptyObject, FreeFormObjectWithAdditionalPropertiesEqTrue, FreeFormObjectWithoutAdditionalProperties, GenericSchemaDuplicateIssue1SystemBoolean, GenericSchemaDuplicateIssue1SystemBooleanWritable, GenericSchemaDuplicateIssue1SystemString, GenericSchemaDuplicateIssue1SystemStringWritable, GetApiVbyApiVersionSimpleOperationData, GetApiVbyApiVersionSimpleOperationError, GetApiVbyApiVersionSimpleOperationErrors, GetApiVbyApiVersionSimpleOperationResponse, GetApiVbyApiVersionSimpleOperationResponses, GetCallWithOptionalParamData, GetCallWithoutParametersAndResponseData, HeadCallWithoutParametersAndResponseData, Import, ImportData, ImportResponse, ImportResponses, IoK8sApimachineryPkgApisMetaV1DeleteOptions, IoK8sApimachineryPkgApisMetaV1Preconditions, ModelCircle, ModelFromZendesk, ModelSquare, ModelThatExtends, ModelThatExtendsExtends, ModelWithAdditionalPropertiesEqTrue, ModelWithAdditionalPropertiesRef, ModelWithAnyOfConstantSizeArray, ModelWithAnyOfConstantSizeArrayAndIntersect, ModelWithAnyOfConstantSizeArrayNullable, ModelWithAnyOfConstantSizeArrayWithNSizeAndOptions, ModelWithAnyOfConstantSizeArrayWithNSizeAndOptionsWritable, ModelWithArray, ModelWithArrayReadOnlyAndWriteOnly, ModelWithArrayReadOnlyAndWriteOnlyWritable, ModelWithBackticksInDescription, ModelWithBoolean, ModelWithCircularReference, ModelWithConst, ModelWithConstantSizeArray, ModelWithDictionary, ModelWithDuplicateImports, ModelWithDuplicateProperties, ModelWithEnum, ModelWithEnumFromDescription, ModelWithEnumWithHyphen, ModelWithInteger, ModelWithNestedArrayEnums, ModelWithNestedArrayEnumsData, ModelWithNestedArrayEnumsDataBar, ModelWithNestedArrayEnumsDataFoo, ModelWithNestedCompositionEnums, ModelWithNestedEnums, ModelWithNestedProperties, ModelWithNullableObject, ModelWithNullableString, ModelWithNumericEnumUnion, ModelWithOneOfAndProperties, ModelWithOneOfEnum, ModelWithOrderedProperties, ModelWithPattern, ModelWithPatternWritable, ModelWithPrefixItemsConstantSizeArray, ModelWithProperties, ModelWithPropertiesWritable, ModelWithReadOnlyAndWriteOnly, ModelWithReadOnlyAndWriteOnlyWritable, ModelWithReference, ModelWithReferenceWritable, ModelWithString, ModelWithStringError, MultipartRequestData, MultipartResponseData, MultipartResponseResponse, MultipartResponseResponses, NestedAnyOfArraysNullable, NonAsciiæøåÆøÅöôêÊ字符串Data, NonAsciiæøåÆøÅöôêÊ字符串Response, NonAsciiæøåÆøÅöôêÊ字符串Responses, NonAsciiStringæøåÆøÅöôêÊ字符串, NullableObject, OneOfAllOfIssue, OneOfAllOfIssueWritable, OptionsCallWithoutParametersAndResponseData, Pageable, ParameterSimpleParameterUnused, PatchApiVbyApiVersionNoTagData, PatchApiVbyApiVersionNoTagResponses, PatchCallWithoutParametersAndResponseData, PostApiVbyApiVersionFormDataData, PostApiVbyApiVersionRequestBodyData, PostCallWithOptionalParamData, PostCallWithOptionalParamResponse, PostCallWithOptionalParamResponses, PostCallWithoutParametersAndResponseData, PostServiceWithEmptyTagResponse, PostServiceWithEmptyTagResponse2, PutCallWithoutParametersAndResponseData, PutWithFormUrlEncodedData, SchemaWithFormRestrictedKeys, SimpleBoolean, SimpleFile, SimpleFormData, SimpleInteger, SimpleParameter, SimpleReference, SimpleRequestBody, SimpleString, SimpleStringWithPattern, TestErrorCodeData, TestErrorCodeErrors, TestErrorCodeResponses, TypesData, TypesResponse, TypesResponses, UploadFileData, UploadFileResponse, UploadFileResponses, XFooBar } from './types.gen';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/svelte-query/fetch/sdk.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport { type Client, formDataBodySerializer, type Options as Options2, type TDataShape, urlSearchParamsBodySerializer } from './client';\nimport { client } from './client.gen';\nimport type { ApiVVersionODataControllerCountData, ApiVVersionODataControllerCountResponses, CallToTestOrderOfParamsData, CallWithDefaultOptionalParametersData, CallWithDefaultParametersData, CallWithDescriptionsData, CallWithDuplicateResponsesData, CallWithDuplicateResponsesErrors, CallWithDuplicateResponsesResponses, CallWithNoContentResponseData, CallWithNoContentResponseResponses, CallWithParametersData, CallWithResponseAndNoContentResponseData, CallWithResponseAndNoContentResponseResponses, CallWithResponseData, CallWithResponseResponses, CallWithResponsesData, CallWithResponsesErrors, CallWithResponsesResponses, CallWithResultFromHeaderData, CallWithResultFromHeaderErrors, CallWithResultFromHeaderResponses, CallWithWeirdParameterNamesData, CollectionFormatData, ComplexParamsData, ComplexParamsResponses, ComplexTypesData, ComplexTypesErrors, ComplexTypesResponses, DeleteCallWithoutParametersAndResponseData, DeleteFooData3, DeprecatedCallData, DummyAData, DummyAResponses, DummyBData, DummyBResponses, DuplicateName2Data, DuplicateName3Data, DuplicateName4Data, DuplicateNameData, ExportData, FileResponseData, FileResponseResponses, FooWowData, FooWowResponses, GetApiVbyApiVersionSimpleOperationData, GetApiVbyApiVersionSimpleOperationErrors, GetApiVbyApiVersionSimpleOperationResponses, GetCallWithOptionalParamData, GetCallWithoutParametersAndResponseData, HeadCallWithoutParametersAndResponseData, ImportData, ImportResponses, MultipartRequestData, MultipartResponseData, MultipartResponseResponses, NonAsciiæøåÆøÅöôêÊ字符串Data, NonAsciiæøåÆøÅöôêÊ字符串Responses, OptionsCallWithoutParametersAndResponseData, PatchApiVbyApiVersionNoTagData, PatchApiVbyApiVersionNoTagResponses, PatchCallWithoutParametersAndResponseData, PostApiVbyApiVersionFormDataData, PostApiVbyApiVersionRequestBodyData, PostCallWithOptionalParamData, PostCallWithOptionalParamResponses, PostCallWithoutParametersAndResponseData, PutCallWithoutParametersAndResponseData, PutWithFormUrlEncodedData, TestErrorCodeData, TestErrorCodeErrors, TestErrorCodeResponses, TypesData, TypesResponses, UploadFileData, UploadFileResponses } from './types.gen';\n\nexport type Options<TData extends TDataShape = TDataShape, ThrowOnError extends boolean = boolean> = Options2<TData, ThrowOnError> & {\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\nexport const export_ = <ThrowOnError extends boolean = false>(options?: Options<ExportData, ThrowOnError>) => (options?.client ?? client).get<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/no+tag', ...options });\n\nexport const patchApiVbyApiVersionNoTag = <ThrowOnError extends boolean = false>(options?: Options<PatchApiVbyApiVersionNoTagData, ThrowOnError>) => (options?.client ?? client).patch<PatchApiVbyApiVersionNoTagResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/no+tag', ...options });\n\nexport const import_ = <ThrowOnError extends boolean = false>(options: Options<ImportData, ThrowOnError>) => (options.client ?? client).post<ImportResponses, unknown, ThrowOnError>({\n    url: '/api/v{api-version}/no+tag',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options.headers\n    }\n});\n\nexport const fooWow = <ThrowOnError extends boolean = false>(options?: Options<FooWowData, ThrowOnError>) => (options?.client ?? client).put<FooWowResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/no+tag', ...options });\n\nexport const apiVVersionODataControllerCount = <ThrowOnError extends boolean = false>(options?: Options<ApiVVersionODataControllerCountData, ThrowOnError>) => (options?.client ?? client).get<ApiVVersionODataControllerCountResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple/$count', ...options });\n\nexport const getApiVbyApiVersionSimpleOperation = <ThrowOnError extends boolean = false>(options: Options<GetApiVbyApiVersionSimpleOperationData, ThrowOnError>) => (options.client ?? client).get<GetApiVbyApiVersionSimpleOperationResponses, GetApiVbyApiVersionSimpleOperationErrors, ThrowOnError>({ url: '/api/v{api-version}/simple:operation', ...options });\n\nexport const deleteCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<DeleteCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).delete<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const getCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<GetCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).get<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const headCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<HeadCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).head<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const optionsCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<OptionsCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).options<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const patchCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<PatchCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).patch<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const postCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<PostCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).post<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const putCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<PutCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).put<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const deleteFoo = <ThrowOnError extends boolean = false>(options: Options<DeleteFooData3, ThrowOnError>) => (options.client ?? client).delete<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/foo/{foo_param}/bar/{BarParam}', ...options });\n\nexport const callWithDescriptions = <ThrowOnError extends boolean = false>(options?: Options<CallWithDescriptionsData, ThrowOnError>) => (options?.client ?? client).post<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/descriptions', ...options });\n\n/**\n * @deprecated\n */\nexport const deprecatedCall = <ThrowOnError extends boolean = false>(options: Options<DeprecatedCallData, ThrowOnError>) => (options.client ?? client).post<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/parameters/deprecated', ...options });\n\nexport const callWithParameters = <ThrowOnError extends boolean = false>(options: Options<CallWithParametersData, ThrowOnError>) => (options.client ?? client).post<unknown, unknown, ThrowOnError>({\n    url: '/api/v{api-version}/parameters/{parameterPath}',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options.headers\n    }\n});\n\nexport const callWithWeirdParameterNames = <ThrowOnError extends boolean = false>(options: Options<CallWithWeirdParameterNamesData, ThrowOnError>) => (options.client ?? client).post<unknown, unknown, ThrowOnError>({\n    url: '/api/v{api-version}/parameters/{parameter.path.1}/{parameter-path-2}/{PARAMETER-PATH-3}',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options.headers\n    }\n});\n\nexport const getCallWithOptionalParam = <ThrowOnError extends boolean = false>(options: Options<GetCallWithOptionalParamData, ThrowOnError>) => (options.client ?? client).get<unknown, unknown, ThrowOnError>({\n    url: '/api/v{api-version}/parameters',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options.headers\n    }\n});\n\nexport const postCallWithOptionalParam = <ThrowOnError extends boolean = false>(options: Options<PostCallWithOptionalParamData, ThrowOnError>) => (options.client ?? client).post<PostCallWithOptionalParamResponses, unknown, ThrowOnError>({\n    url: '/api/v{api-version}/parameters',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options.headers\n    }\n});\n\nexport const postApiVbyApiVersionRequestBody = <ThrowOnError extends boolean = false>(options?: Options<PostApiVbyApiVersionRequestBodyData, ThrowOnError>) => (options?.client ?? client).post<unknown, unknown, ThrowOnError>({\n    url: '/api/v{api-version}/requestBody',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options?.headers\n    }\n});\n\nexport const postApiVbyApiVersionFormData = <ThrowOnError extends boolean = false>(options?: Options<PostApiVbyApiVersionFormDataData, ThrowOnError>) => (options?.client ?? client).post<unknown, unknown, ThrowOnError>({\n    ...formDataBodySerializer,\n    url: '/api/v{api-version}/formData',\n    ...options,\n    headers: {\n        'Content-Type': null,\n        ...options?.headers\n    }\n});\n\nexport const callWithDefaultParameters = <ThrowOnError extends boolean = false>(options?: Options<CallWithDefaultParametersData, ThrowOnError>) => (options?.client ?? client).get<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/defaults', ...options });\n\nexport const callWithDefaultOptionalParameters = <ThrowOnError extends boolean = false>(options?: Options<CallWithDefaultOptionalParametersData, ThrowOnError>) => (options?.client ?? client).post<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/defaults', ...options });\n\nexport const callToTestOrderOfParams = <ThrowOnError extends boolean = false>(options: Options<CallToTestOrderOfParamsData, ThrowOnError>) => (options.client ?? client).put<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/defaults', ...options });\n\nexport const duplicateName = <ThrowOnError extends boolean = false>(options?: Options<DuplicateNameData, ThrowOnError>) => (options?.client ?? client).delete<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/duplicate', ...options });\n\nexport const duplicateName2 = <ThrowOnError extends boolean = false>(options?: Options<DuplicateName2Data, ThrowOnError>) => (options?.client ?? client).get<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/duplicate', ...options });\n\nexport const duplicateName3 = <ThrowOnError extends boolean = false>(options?: Options<DuplicateName3Data, ThrowOnError>) => (options?.client ?? client).post<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/duplicate', ...options });\n\nexport const duplicateName4 = <ThrowOnError extends boolean = false>(options?: Options<DuplicateName4Data, ThrowOnError>) => (options?.client ?? client).put<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/duplicate', ...options });\n\nexport const callWithNoContentResponse = <ThrowOnError extends boolean = false>(options?: Options<CallWithNoContentResponseData, ThrowOnError>) => (options?.client ?? client).get<CallWithNoContentResponseResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/no-content', ...options });\n\nexport const callWithResponseAndNoContentResponse = <ThrowOnError extends boolean = false>(options?: Options<CallWithResponseAndNoContentResponseData, ThrowOnError>) => (options?.client ?? client).get<CallWithResponseAndNoContentResponseResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/multiple-tags/response-and-no-content', ...options });\n\nexport const dummyA = <ThrowOnError extends boolean = false>(options?: Options<DummyAData, ThrowOnError>) => (options?.client ?? client).get<DummyAResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/multiple-tags/a', ...options });\n\nexport const dummyB = <ThrowOnError extends boolean = false>(options?: Options<DummyBData, ThrowOnError>) => (options?.client ?? client).get<DummyBResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/multiple-tags/b', ...options });\n\nexport const callWithResponse = <ThrowOnError extends boolean = false>(options?: Options<CallWithResponseData, ThrowOnError>) => (options?.client ?? client).get<CallWithResponseResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/response', ...options });\n\nexport const callWithDuplicateResponses = <ThrowOnError extends boolean = false>(options?: Options<CallWithDuplicateResponsesData, ThrowOnError>) => (options?.client ?? client).post<CallWithDuplicateResponsesResponses, CallWithDuplicateResponsesErrors, ThrowOnError>({ url: '/api/v{api-version}/response', ...options });\n\nexport const callWithResponses = <ThrowOnError extends boolean = false>(options?: Options<CallWithResponsesData, ThrowOnError>) => (options?.client ?? client).put<CallWithResponsesResponses, CallWithResponsesErrors, ThrowOnError>({ url: '/api/v{api-version}/response', ...options });\n\nexport const collectionFormat = <ThrowOnError extends boolean = false>(options: Options<CollectionFormatData, ThrowOnError>) => (options.client ?? client).get<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/collectionFormat', ...options });\n\nexport const types = <ThrowOnError extends boolean = false>(options: Options<TypesData, ThrowOnError>) => (options.client ?? client).get<TypesResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/types', ...options });\n\nexport const uploadFile = <ThrowOnError extends boolean = false>(options: Options<UploadFileData, ThrowOnError>) => (options.client ?? client).post<UploadFileResponses, unknown, ThrowOnError>({\n    ...urlSearchParamsBodySerializer,\n    url: '/api/v{api-version}/upload',\n    ...options,\n    headers: {\n        'Content-Type': 'application/x-www-form-urlencoded',\n        ...options.headers\n    }\n});\n\nexport const fileResponse = <ThrowOnError extends boolean = false>(options: Options<FileResponseData, ThrowOnError>) => (options.client ?? client).get<FileResponseResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/file/{id}', ...options });\n\nexport const complexTypes = <ThrowOnError extends boolean = false>(options: Options<ComplexTypesData, ThrowOnError>) => (options.client ?? client).get<ComplexTypesResponses, ComplexTypesErrors, ThrowOnError>({\n    querySerializer: { parameters: { parameterObject: { object: { style: 'form' } } } },\n    url: '/api/v{api-version}/complex',\n    ...options\n});\n\nexport const multipartResponse = <ThrowOnError extends boolean = false>(options?: Options<MultipartResponseData, ThrowOnError>) => (options?.client ?? client).get<MultipartResponseResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/multipart', ...options });\n\nexport const multipartRequest = <ThrowOnError extends boolean = false>(options?: Options<MultipartRequestData, ThrowOnError>) => (options?.client ?? client).post<unknown, unknown, ThrowOnError>({\n    ...formDataBodySerializer,\n    url: '/api/v{api-version}/multipart',\n    ...options,\n    headers: {\n        'Content-Type': null,\n        ...options?.headers\n    }\n});\n\nexport const complexParams = <ThrowOnError extends boolean = false>(options: Options<ComplexParamsData, ThrowOnError>) => (options.client ?? client).put<ComplexParamsResponses, unknown, ThrowOnError>({\n    url: '/api/v{api-version}/complex/{id}',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json-patch+json',\n        ...options.headers\n    }\n});\n\nexport const callWithResultFromHeader = <ThrowOnError extends boolean = false>(options?: Options<CallWithResultFromHeaderData, ThrowOnError>) => (options?.client ?? client).post<CallWithResultFromHeaderResponses, CallWithResultFromHeaderErrors, ThrowOnError>({ url: '/api/v{api-version}/header', ...options });\n\nexport const testErrorCode = <ThrowOnError extends boolean = false>(options: Options<TestErrorCodeData, ThrowOnError>) => (options.client ?? client).post<TestErrorCodeResponses, TestErrorCodeErrors, ThrowOnError>({ url: '/api/v{api-version}/error', ...options });\n\nexport const nonAsciiæøåÆøÅöôêÊ字符串 = <ThrowOnError extends boolean = false>(options: Options<NonAsciiæøåÆøÅöôêÊ字符串Data, ThrowOnError>) => (options.client ?? client).post<NonAsciiæøåÆøÅöôêÊ字符串Responses, unknown, ThrowOnError>({ url: '/api/v{api-version}/non-ascii-æøåÆØÅöôêÊ字符串', ...options });\n\n/**\n * Login User\n */\nexport const putWithFormUrlEncoded = <ThrowOnError extends boolean = false>(options: Options<PutWithFormUrlEncodedData, ThrowOnError>) => (options.client ?? client).put<unknown, unknown, ThrowOnError>({\n    ...urlSearchParamsBodySerializer,\n    url: '/api/v{api-version}/non-ascii-æøåÆØÅöôêÊ字符串',\n    ...options,\n    headers: {\n        'Content-Type': 'application/x-www-form-urlencoded',\n        ...options.headers\n    }\n});\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/svelte-query/fetch/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type ClientOptions = {\n    baseUrl: 'http://localhost:3000/base' | (string & {});\n};\n\n/**\n * Model with number-only name\n */\nexport type _400 = string;\n\n/**\n * External ref to shared model (A)\n */\nexport type ExternalRefA = ExternalSharedModel;\n\n/**\n * External ref to shared model (B)\n */\nexport type ExternalRefB = ExternalSharedModel;\n\n/**\n * Testing multiline comments in string: First line\n * Second line\n *\n * Fourth line\n */\nexport type CamelCaseCommentWithBreaks = number;\n\n/**\n * Testing multiline comments in string: First line\n * Second line\n *\n * Fourth line\n */\nexport type CommentWithBreaks = number;\n\n/**\n * Testing backticks in string: `backticks` and ```multiple backticks``` should work\n */\nexport type CommentWithBackticks = number;\n\n/**\n * Testing backticks and quotes in string: `backticks`, 'quotes', \"double quotes\" and ```multiple backticks``` should work\n */\nexport type CommentWithBackticksAndQuotes = number;\n\n/**\n * Testing slashes in string: \\backwards\\\\\\ and /forwards/// should work\n */\nexport type CommentWithSlashes = number;\n\n/**\n * Testing expression placeholders in string: ${expression} should work\n */\nexport type CommentWithExpressionPlaceholders = number;\n\n/**\n * Testing quotes in string: 'single quote''' and \"double quotes\"\"\" should work\n */\nexport type CommentWithQuotes = number;\n\n/**\n * Testing reserved characters in string: * inline * and ** inline ** should work\n */\nexport type CommentWithReservedCharacters = number;\n\n/**\n * This is a simple number\n */\nexport type SimpleInteger = number;\n\n/**\n * This is a simple boolean\n */\nexport type SimpleBoolean = boolean;\n\n/**\n * This is a simple string\n */\nexport type SimpleString = string;\n\n/**\n * A string with non-ascii (unicode) characters valid in typescript identifiers (æøåÆØÅöÔèÈ字符串)\n */\nexport type NonAsciiStringæøåÆøÅöôêÊ字符串 = string;\n\n/**\n * This is a simple file\n */\nexport type SimpleFile = Blob | File;\n\n/**\n * This is a simple reference\n */\nexport type SimpleReference = ModelWithString;\n\n/**\n * This is a simple string\n */\nexport type SimpleStringWithPattern = string | null;\n\n/**\n * This is a simple enum with strings\n */\nexport type EnumWithStrings = 'Success' | 'Warning' | 'Error' | '\\'Single Quote\\'' | '\"Double Quotes\"' | 'Non-ascii: øæåôöØÆÅÔÖ字符串';\n\nexport type EnumWithReplacedCharacters = '\\'Single Quote\\'' | '\"Double Quotes\"' | 'øæåôöØÆÅÔÖ字符串' | 3.1 | '';\n\n/**\n * This is a simple enum with numbers\n */\nexport type EnumWithNumbers = 1 | 2 | 3 | 1.1 | 1.2 | 1.3 | 100 | 200 | 300 | -100 | -200 | -300 | -1.1 | -1.2 | -1.3;\n\n/**\n * Success=1,Warning=2,Error=3\n */\nexport type EnumFromDescription = number;\n\n/**\n * This is a simple enum with numbers\n */\nexport type EnumWithExtensions = 200 | 400 | 500;\n\nexport type EnumWithXEnumNames = 0 | 1 | 2;\n\n/**\n * This is a simple array with numbers\n */\nexport type ArrayWithNumbers = Array<number>;\n\n/**\n * This is a simple array with booleans\n */\nexport type ArrayWithBooleans = Array<boolean>;\n\n/**\n * This is a simple array with strings\n */\nexport type ArrayWithStrings = Array<string>;\n\n/**\n * This is a simple array with references\n */\nexport type ArrayWithReferences = Array<ModelWithString>;\n\n/**\n * This is a simple array containing an array\n */\nexport type ArrayWithArray = Array<Array<ModelWithString>>;\n\n/**\n * This is a simple array with properties\n */\nexport type ArrayWithProperties = Array<{\n    '16x16'?: CamelCaseCommentWithBreaks;\n    bar?: string;\n}>;\n\n/**\n * This is a simple array with any of properties\n */\nexport type ArrayWithAnyOfProperties = Array<{\n    foo?: string;\n} | {\n    bar?: string;\n}>;\n\nexport type AnyOfAnyAndNull = {\n    data?: unknown | null;\n};\n\n/**\n * This is a simple array with any of properties\n */\nexport type AnyOfArrays = {\n    results?: Array<{\n        foo?: string;\n    } | {\n        bar?: string;\n    }>;\n};\n\n/**\n * This is a string dictionary\n */\nexport type DictionaryWithString = {\n    [key: string]: string;\n};\n\nexport type DictionaryWithPropertiesAndAdditionalProperties = {\n    foo?: number;\n    bar?: boolean;\n    [key: string]: string | number | boolean | undefined;\n};\n\n/**\n * This is a string reference\n */\nexport type DictionaryWithReference = {\n    [key: string]: ModelWithString;\n};\n\n/**\n * This is a complex dictionary\n */\nexport type DictionaryWithArray = {\n    [key: string]: Array<ModelWithString>;\n};\n\n/**\n * This is a string dictionary\n */\nexport type DictionaryWithDictionary = {\n    [key: string]: {\n        [key: string]: string;\n    };\n};\n\n/**\n * This is a complex dictionary\n */\nexport type DictionaryWithProperties = {\n    [key: string]: {\n        foo?: string;\n        bar?: string;\n    };\n};\n\n/**\n * This is a model with one number property\n */\nexport type ModelWithInteger = {\n    /**\n     * This is a simple number property\n     */\n    prop?: number;\n};\n\n/**\n * This is a model with one boolean property\n */\nexport type ModelWithBoolean = {\n    /**\n     * This is a simple boolean property\n     */\n    prop?: boolean;\n};\n\n/**\n * This is a model with one string property\n */\nexport type ModelWithString = {\n    /**\n     * This is a simple string property\n     */\n    prop?: string;\n};\n\n/**\n * This is a model with one string property\n */\nexport type ModelWithStringError = {\n    /**\n     * This is a simple string property\n     */\n    prop?: string;\n};\n\n/**\n * `Comment` or `VoiceComment`. The JSON object for adding voice comments to tickets is different. See [Adding voice comments to tickets](/documentation/ticketing/managing-tickets/adding-voice-comments-to-tickets)\n */\nexport type ModelFromZendesk = string;\n\n/**\n * This is a model with one string property\n */\nexport type ModelWithNullableString = {\n    /**\n     * This is a simple string property\n     */\n    nullableProp1?: string | null;\n    /**\n     * This is a simple string property\n     */\n    nullableRequiredProp1: string | null;\n    /**\n     * This is a simple string property\n     */\n    nullableProp2?: string | null;\n    /**\n     * This is a simple string property\n     */\n    nullableRequiredProp2: string | null;\n    /**\n     * This is a simple enum with strings\n     */\n    'foo_bar-enum'?: 'Success' | 'Warning' | 'Error' | 'ØÆÅ字符串';\n};\n\n/**\n * This is a model with one enum\n */\nexport type ModelWithEnum = {\n    /**\n     * This is a simple enum with strings\n     */\n    'foo_bar-enum'?: 'Success' | 'Warning' | 'Error' | 'ØÆÅ字符串';\n    /**\n     * These are the HTTP error code enums\n     */\n    statusCode?: '100' | '200 FOO' | '300 FOO_BAR' | '400 foo-bar' | '500 foo.bar' | '600 foo&bar';\n    /**\n     * Simple boolean enum\n     */\n    bool?: true;\n};\n\n/**\n * This is a model with one enum with escaped name\n */\nexport type ModelWithEnumWithHyphen = {\n    /**\n     * Foo-Bar-Baz-Qux\n     */\n    'foo-bar-baz-qux'?: '3.0';\n};\n\n/**\n * This is a model with one enum\n */\nexport type ModelWithEnumFromDescription = {\n    /**\n     * Success=1,Warning=2,Error=3\n     */\n    test?: number;\n};\n\n/**\n * This is a model with nested enums\n */\nexport type ModelWithNestedEnums = {\n    dictionaryWithEnum?: {\n        [key: string]: 'Success' | 'Warning' | 'Error';\n    };\n    dictionaryWithEnumFromDescription?: {\n        [key: string]: number;\n    };\n    arrayWithEnum?: Array<'Success' | 'Warning' | 'Error'>;\n    arrayWithDescription?: Array<number>;\n    /**\n     * This is a simple enum with strings\n     */\n    'foo_bar-enum'?: 'Success' | 'Warning' | 'Error' | 'ØÆÅ字符串';\n};\n\n/**\n * This is a model with one property containing a reference\n */\nexport type ModelWithReference = {\n    prop?: ModelWithProperties;\n};\n\n/**\n * This is a model with one property containing an array\n */\nexport type ModelWithArrayReadOnlyAndWriteOnly = {\n    prop?: Array<ModelWithReadOnlyAndWriteOnly>;\n    propWithFile?: Array<Blob | File>;\n    propWithNumber?: Array<number>;\n};\n\n/**\n * This is a model with one property containing an array\n */\nexport type ModelWithArray = {\n    prop?: Array<ModelWithString>;\n    propWithFile?: Array<Blob | File>;\n    propWithNumber?: Array<number>;\n};\n\n/**\n * This is a model with one property containing a dictionary\n */\nexport type ModelWithDictionary = {\n    prop?: {\n        [key: string]: string;\n    };\n};\n\n/**\n * This is a deprecated model with a deprecated property\n *\n * @deprecated\n */\nexport type DeprecatedModel = {\n    /**\n     * This is a deprecated property\n     *\n     * @deprecated\n     */\n    prop?: string;\n};\n\n/**\n * This is a model with one property containing a circular reference\n */\nexport type ModelWithCircularReference = {\n    prop?: ModelWithCircularReference;\n};\n\n/**\n * This is a model with one property with a 'one of' relationship\n */\nexport type CompositionWithOneOf = {\n    propA?: ModelWithString | ModelWithEnum | ModelWithArray | ModelWithDictionary;\n};\n\n/**\n * This is a model with one property with a 'one of' relationship where the options are not $ref\n */\nexport type CompositionWithOneOfAnonymous = {\n    propA?: {\n        propA?: string;\n    } | string | number;\n};\n\n/**\n * Circle\n */\nexport type ModelCircle = {\n    kind: string;\n    radius?: number;\n};\n\n/**\n * Square\n */\nexport type ModelSquare = {\n    kind: string;\n    sideLength?: number;\n};\n\n/**\n * This is a model with one property with a 'one of' relationship where the options are not $ref\n */\nexport type CompositionWithOneOfDiscriminator = ({\n    kind: 'circle';\n} & ModelCircle) | ({\n    kind: 'square';\n} & ModelSquare);\n\n/**\n * This is a model with one property with a 'any of' relationship\n */\nexport type CompositionWithAnyOf = {\n    propA?: ModelWithString | ModelWithEnum | ModelWithArray | ModelWithDictionary;\n};\n\n/**\n * This is a model with one property with a 'any of' relationship where the options are not $ref\n */\nexport type CompositionWithAnyOfAnonymous = {\n    propA?: {\n        propA?: string;\n    } | string | number;\n};\n\n/**\n * This is a model with nested 'any of' property with a type null\n */\nexport type CompositionWithNestedAnyAndTypeNull = {\n    propA?: Array<ModelWithDictionary | null> | Array<ModelWithArray | null>;\n};\n\nexport type _3eNum1Период = 'Bird' | 'Dog';\n\nexport type ConstValue = 'ConstValue';\n\n/**\n * This is a model with one property with a 'any of' relationship where the options are not $ref\n */\nexport type CompositionWithNestedAnyOfAndNull = {\n    /**\n     * Scopes\n     */\n    propA?: Array<_3eNum1Период | ConstValue> | null;\n};\n\n/**\n * This is a model with one property with a 'one of' relationship\n */\nexport type CompositionWithOneOfAndNullable = {\n    propA?: {\n        boolean?: boolean;\n    } | ModelWithEnum | ModelWithArray | ModelWithDictionary | null;\n};\n\n/**\n * This is a model that contains a simple dictionary within composition\n */\nexport type CompositionWithOneOfAndSimpleDictionary = {\n    propA?: boolean | {\n        [key: string]: number;\n    };\n};\n\n/**\n * This is a model that contains a dictionary of simple arrays within composition\n */\nexport type CompositionWithOneOfAndSimpleArrayDictionary = {\n    propA?: boolean | {\n        [key: string]: Array<boolean>;\n    };\n};\n\n/**\n * This is a model that contains a dictionary of complex arrays (composited) within composition\n */\nexport type CompositionWithOneOfAndComplexArrayDictionary = {\n    propA?: boolean | {\n        [key: string]: Array<number | string>;\n    };\n};\n\n/**\n * This is a model with one property with a 'all of' relationship\n */\nexport type CompositionWithAllOfAndNullable = {\n    propA?: ({\n        boolean?: boolean;\n    } & ModelWithEnum & ModelWithArray & ModelWithDictionary) | null;\n};\n\n/**\n * This is a model with one property with a 'any of' relationship\n */\nexport type CompositionWithAnyOfAndNullable = {\n    propA?: {\n        boolean?: boolean;\n    } | ModelWithEnum | ModelWithArray | ModelWithDictionary | null;\n};\n\n/**\n * This is a base model with two simple optional properties\n */\nexport type CompositionBaseModel = {\n    firstName?: string;\n    lastname?: string;\n};\n\n/**\n * This is a model that extends the base model\n */\nexport type CompositionExtendedModel = CompositionBaseModel & {\n    age: number;\n    firstName: string;\n    lastname: string;\n};\n\n/**\n * This is a model with one nested property\n */\nexport type ModelWithProperties = {\n    required: string;\n    readonly requiredAndReadOnly: string;\n    requiredAndNullable: string | null;\n    string?: string;\n    number?: number;\n    boolean?: boolean;\n    reference?: ModelWithString;\n    'property with space'?: string;\n    default?: string;\n    try?: string;\n    readonly '@namespace.string'?: string;\n    readonly '@namespace.integer'?: number;\n};\n\n/**\n * This is a model with one nested property\n */\nexport type ModelWithNestedProperties = {\n    readonly first: {\n        readonly second: {\n            readonly third: string | null;\n        } | null;\n    } | null;\n};\n\n/**\n * This is a model with duplicated properties\n */\nexport type ModelWithDuplicateProperties = {\n    prop?: ModelWithString;\n};\n\n/**\n * This is a model with ordered properties\n */\nexport type ModelWithOrderedProperties = {\n    zebra?: string;\n    apple?: string;\n    hawaii?: string;\n};\n\n/**\n * This is a model with duplicated imports\n */\nexport type ModelWithDuplicateImports = {\n    propA?: ModelWithString;\n    propB?: ModelWithString;\n    propC?: ModelWithString;\n};\n\n/**\n * This is a model that extends another model\n */\nexport type ModelThatExtends = ModelWithString & {\n    propExtendsA?: string;\n    propExtendsB?: ModelWithString;\n};\n\n/**\n * This is a model that extends another model\n */\nexport type ModelThatExtendsExtends = ModelWithString & ModelThatExtends & {\n    propExtendsC?: string;\n    propExtendsD?: ModelWithString;\n};\n\n/**\n * This is a model that contains a some patterns\n */\nexport type ModelWithPattern = {\n    key: string;\n    name: string;\n    readonly enabled?: boolean;\n    readonly modified?: string;\n    id?: string;\n    text?: string;\n    patternWithSingleQuotes?: string;\n    patternWithNewline?: string;\n    patternWithBacktick?: string;\n    patternWithUnicode?: string;\n};\n\nexport type File = {\n    /**\n     * Id\n     */\n    readonly id?: string;\n    /**\n     * Updated at\n     */\n    readonly updated_at?: string;\n    /**\n     * Created at\n     */\n    readonly created_at?: string;\n    /**\n     * Mime\n     */\n    mime: string;\n    /**\n     * File\n     */\n    readonly file?: string;\n};\n\nexport type Default = {\n    name?: string;\n};\n\nexport type Pageable = {\n    page?: number;\n    size?: number;\n    sort?: Array<string>;\n};\n\n/**\n * This is a free-form object without additionalProperties.\n */\nexport type FreeFormObjectWithoutAdditionalProperties = {\n    [key: string]: unknown;\n};\n\n/**\n * This is a free-form object with additionalProperties: true.\n */\nexport type FreeFormObjectWithAdditionalPropertiesEqTrue = {\n    [key: string]: unknown;\n};\n\n/**\n * This is a free-form object with additionalProperties: {}.\n */\nexport type FreeFormObjectWithAdditionalPropertiesEqEmptyObject = {\n    [key: string]: unknown;\n};\n\nexport type ModelWithConst = {\n    String?: 'String';\n    number?: 0;\n    null?: null;\n    withType?: 'Some string';\n};\n\n/**\n * This is a model with one property and additionalProperties: true\n */\nexport type ModelWithAdditionalPropertiesEqTrue = {\n    /**\n     * This is a simple string property\n     */\n    prop?: string;\n    [key: string]: unknown;\n};\n\nexport type NestedAnyOfArraysNullable = {\n    nullableArray?: Array<string | boolean> | null;\n};\n\nexport type CompositionWithOneOfAndProperties = ({\n    foo: SimpleParameter;\n} | {\n    bar: NonAsciiStringæøåÆøÅöôêÊ字符串;\n}) & {\n    baz: number | null;\n    qux: number;\n};\n\n/**\n * An object that can be null\n */\nexport type NullableObject = {\n    foo?: string;\n} | null;\n\n/**\n * Some % character\n */\nexport type CharactersInDescription = string;\n\nexport type ModelWithNullableObject = {\n    data?: NullableObject;\n};\n\n/**\n * An object with additional properties that can be null (anyOf ref + null)\n */\nexport type ModelWithAdditionalPropertiesRef = {\n    [key: string]: NullableObject | null;\n};\n\nexport type ModelWithOneOfEnum = {\n    foo: 'Bar';\n} | {\n    foo: 'Baz';\n} | {\n    foo: 'Qux';\n} | {\n    content: string;\n    foo: 'Quux';\n} | {\n    content: [\n        string,\n        string\n    ];\n    foo: 'Corge';\n};\n\nexport type ModelWithNestedArrayEnumsDataFoo = 'foo' | 'bar';\n\nexport type ModelWithNestedArrayEnumsDataBar = 'baz' | 'qux';\n\nexport type ModelWithNestedArrayEnumsData = {\n    foo?: Array<ModelWithNestedArrayEnumsDataFoo>;\n    bar?: Array<ModelWithNestedArrayEnumsDataBar>;\n};\n\nexport type ModelWithNestedArrayEnums = {\n    array_strings?: Array<string>;\n    data?: ModelWithNestedArrayEnumsData;\n};\n\nexport type ModelWithNestedCompositionEnums = {\n    foo?: ModelWithNestedArrayEnumsDataFoo;\n};\n\nexport type ModelWithReadOnlyAndWriteOnly = {\n    foo: string;\n    readonly bar: string;\n};\n\nexport type ModelWithConstantSizeArray = [\n    number,\n    number\n];\n\nexport type ModelWithAnyOfConstantSizeArray = [\n    number | string,\n    number | string,\n    number | string\n];\n\nexport type ModelWithPrefixItemsConstantSizeArray = [\n    ModelWithInteger,\n    number | string,\n    string\n];\n\nexport type ModelWithAnyOfConstantSizeArrayNullable = [\n    number | null | string,\n    number | null | string,\n    number | null | string\n];\n\nexport type ModelWithAnyOfConstantSizeArrayWithNSizeAndOptions = [\n    number | Import,\n    number | Import\n];\n\nexport type ModelWithAnyOfConstantSizeArrayAndIntersect = [\n    number & string,\n    number & string\n];\n\nexport type ModelWithNumericEnumUnion = {\n    /**\n     * Период\n     */\n    value?: -10 | -1 | 0 | 1 | 3 | 6 | 12;\n};\n\n/**\n * Some description with `back ticks`\n */\nexport type ModelWithBackticksInDescription = {\n    /**\n     * The template `that` should be used for parsing and importing the contents of the CSV file.\n     *\n     * <br/><p>There is one placeholder currently supported:<ul>     <li><b>${x}</b> - refers to the n-th column in the CSV file, e.g. ${1}, ${2}, ...)</li></ul><p>Example of a correct JSON template:</p>\n     * <pre>\n     * [\n     * {\n     * \"resourceType\": \"Asset\",\n     * \"identifier\": {\n     * \"name\": \"${1}\",\n     * \"domain\": {\n     * \"name\": \"${2}\",\n     * \"community\": {\n     * \"name\": \"Some Community\"\n     * }\n     * }\n     * },\n     * \"attributes\" : {\n     * \"00000000-0000-0000-0000-000000003115\" : [ {\n     * \"value\" : \"${3}\"\n     * } ],\n     * \"00000000-0000-0000-0000-000000000222\" : [ {\n     * \"value\" : \"${4}\"\n     * } ]\n     * }\n     * }\n     * ]\n     * </pre>\n     */\n    template?: string;\n};\n\nexport type ModelWithOneOfAndProperties = (SimpleParameter | NonAsciiStringæøåÆøÅöôêÊ字符串) & {\n    baz: number | null;\n    qux: number;\n};\n\n/**\n * Model used to test deduplication strategy (unused)\n */\nexport type ParameterSimpleParameterUnused = string;\n\n/**\n * Model used to test deduplication strategy\n */\nexport type PostServiceWithEmptyTagResponse = string;\n\n/**\n * Model used to test deduplication strategy\n */\nexport type PostServiceWithEmptyTagResponse2 = string;\n\n/**\n * Model used to test deduplication strategy\n */\nexport type DeleteFooData = string;\n\n/**\n * Model used to test deduplication strategy\n */\nexport type DeleteFooData2 = string;\n\n/**\n * Model with restricted keyword name\n */\nexport type Import = string;\n\nexport type SchemaWithFormRestrictedKeys = {\n    description?: string;\n    'x-enum-descriptions'?: string;\n    'x-enum-varnames'?: string;\n    'x-enumNames'?: string;\n    title?: string;\n    object?: {\n        description?: string;\n        'x-enum-descriptions'?: string;\n        'x-enum-varnames'?: string;\n        'x-enumNames'?: string;\n        title?: string;\n    };\n    array?: Array<{\n        description?: string;\n        'x-enum-descriptions'?: string;\n        'x-enum-varnames'?: string;\n        'x-enumNames'?: string;\n        title?: string;\n    }>;\n};\n\n/**\n * This schema was giving PascalCase transformations a hard time\n */\nexport type IoK8sApimachineryPkgApisMetaV1DeleteOptions = {\n    /**\n     * Must be fulfilled before a deletion is carried out. If not possible, a 409 Conflict status will be returned.\n     */\n    preconditions?: IoK8sApimachineryPkgApisMetaV1Preconditions;\n};\n\n/**\n * This schema was giving PascalCase transformations a hard time\n */\nexport type IoK8sApimachineryPkgApisMetaV1Preconditions = {\n    /**\n     * Specifies the target ResourceVersion\n     */\n    resourceVersion?: string;\n    /**\n     * Specifies the target UID.\n     */\n    uid?: string;\n};\n\nexport type AdditionalPropertiesUnknownIssue = {\n    [key: string]: string | number;\n};\n\nexport type AdditionalPropertiesUnknownIssue2 = {\n    [key: string]: string | number;\n};\n\nexport type AdditionalPropertiesUnknownIssue3 = string & {\n    entries: {\n        [key: string]: AdditionalPropertiesUnknownIssue;\n    };\n};\n\nexport type AdditionalPropertiesIntegerIssue = {\n    value: number;\n    [key: string]: number;\n};\n\nexport type OneOfAllOfIssue = ((ConstValue | GenericSchemaDuplicateIssue1SystemBoolean) & _3eNum1Период) | GenericSchemaDuplicateIssue1SystemString;\n\nexport type GenericSchemaDuplicateIssue1SystemBoolean = {\n    item?: boolean;\n    error?: string | null;\n    readonly hasError?: boolean;\n    data?: {\n        [key: string]: never;\n    };\n};\n\nexport type GenericSchemaDuplicateIssue1SystemString = {\n    item?: string | null;\n    error?: string | null;\n    readonly hasError?: boolean;\n};\n\nexport type ExternalSharedModel = {\n    id: string;\n    name?: string;\n};\n\n/**\n * This is a model with one property containing a reference\n */\nexport type ModelWithReferenceWritable = {\n    prop?: ModelWithPropertiesWritable;\n};\n\n/**\n * This is a model with one property containing an array\n */\nexport type ModelWithArrayReadOnlyAndWriteOnlyWritable = {\n    prop?: Array<ModelWithReadOnlyAndWriteOnlyWritable>;\n    propWithFile?: Array<Blob | File>;\n    propWithNumber?: Array<number>;\n};\n\n/**\n * This is a model with one nested property\n */\nexport type ModelWithPropertiesWritable = {\n    required: string;\n    requiredAndNullable: string | null;\n    string?: string;\n    number?: number;\n    boolean?: boolean;\n    reference?: ModelWithString;\n    'property with space'?: string;\n    default?: string;\n    try?: string;\n};\n\n/**\n * This is a model that contains a some patterns\n */\nexport type ModelWithPatternWritable = {\n    key: string;\n    name: string;\n    id?: string;\n    text?: string;\n    patternWithSingleQuotes?: string;\n    patternWithNewline?: string;\n    patternWithBacktick?: string;\n    patternWithUnicode?: string;\n};\n\nexport type FileWritable = {\n    /**\n     * Mime\n     */\n    mime: string;\n};\n\nexport type ModelWithReadOnlyAndWriteOnlyWritable = {\n    foo: string;\n    baz: string;\n};\n\nexport type ModelWithAnyOfConstantSizeArrayWithNSizeAndOptionsWritable = [\n    number | Import,\n    number | Import\n];\n\nexport type AdditionalPropertiesUnknownIssueWritable = {\n    [key: string]: string | number;\n};\n\nexport type OneOfAllOfIssueWritable = ((ConstValue | GenericSchemaDuplicateIssue1SystemBoolean) & _3eNum1Период) | GenericSchemaDuplicateIssue1SystemString;\n\nexport type GenericSchemaDuplicateIssue1SystemBooleanWritable = {\n    item?: boolean;\n    error?: string | null;\n    data?: {\n        [key: string]: never;\n    };\n};\n\nexport type GenericSchemaDuplicateIssue1SystemStringWritable = {\n    item?: string | null;\n    error?: string | null;\n};\n\n/**\n * This is a reusable parameter\n */\nexport type SimpleParameter = string;\n\n/**\n * Parameter with illegal characters\n */\nexport type XFooBar = ModelWithString;\n\n/**\n * A reusable request body\n */\nexport type SimpleRequestBody = ModelWithString;\n\n/**\n * A reusable request body\n */\nexport type SimpleFormData = ModelWithString;\n\nexport type ExportData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no+tag';\n};\n\nexport type PatchApiVbyApiVersionNoTagData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no+tag';\n};\n\nexport type PatchApiVbyApiVersionNoTagResponses = {\n    /**\n     * OK\n     */\n    default: unknown;\n};\n\nexport type ImportData = {\n    body: ModelWithReadOnlyAndWriteOnlyWritable | ModelWithArrayReadOnlyAndWriteOnlyWritable;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no+tag';\n};\n\nexport type ImportResponses = {\n    /**\n     * Success\n     */\n    200: ModelFromZendesk;\n    /**\n     * Default success response\n     */\n    default: ModelWithReadOnlyAndWriteOnly;\n};\n\nexport type ImportResponse = ImportResponses[keyof ImportResponses];\n\nexport type FooWowData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no+tag';\n};\n\nexport type FooWowResponses = {\n    /**\n     * OK\n     */\n    default: unknown;\n};\n\nexport type ApiVVersionODataControllerCountData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple/$count';\n};\n\nexport type ApiVVersionODataControllerCountResponses = {\n    /**\n     * Success\n     */\n    200: ModelFromZendesk;\n};\n\nexport type ApiVVersionODataControllerCountResponse = ApiVVersionODataControllerCountResponses[keyof ApiVVersionODataControllerCountResponses];\n\nexport type GetApiVbyApiVersionSimpleOperationData = {\n    body?: never;\n    path: {\n        /**\n         * foo in method\n         */\n        foo_param: string;\n    };\n    query?: never;\n    url: '/api/v{api-version}/simple:operation';\n};\n\nexport type GetApiVbyApiVersionSimpleOperationErrors = {\n    /**\n     * Default error response\n     */\n    default: ModelWithBoolean;\n};\n\nexport type GetApiVbyApiVersionSimpleOperationError = GetApiVbyApiVersionSimpleOperationErrors[keyof GetApiVbyApiVersionSimpleOperationErrors];\n\nexport type GetApiVbyApiVersionSimpleOperationResponses = {\n    /**\n     * Response is a simple number\n     */\n    200: number;\n};\n\nexport type GetApiVbyApiVersionSimpleOperationResponse = GetApiVbyApiVersionSimpleOperationResponses[keyof GetApiVbyApiVersionSimpleOperationResponses];\n\nexport type DeleteCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type GetCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type HeadCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type OptionsCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type PatchCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type PostCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type PutCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type DeleteFooData3 = {\n    body?: never;\n    headers: {\n        /**\n         * Parameter with illegal characters\n         */\n        'x-Foo-Bar': ModelWithString;\n    };\n    path: {\n        /**\n         * foo in method\n         */\n        foo_param: string;\n        /**\n         * bar in method\n         */\n        BarParam: string;\n    };\n    query?: never;\n    url: '/api/v{api-version}/foo/{foo_param}/bar/{BarParam}';\n};\n\nexport type CallWithDescriptionsData = {\n    body?: never;\n    path?: never;\n    query?: {\n        /**\n         * Testing multiline comments in string: First line\n         * Second line\n         *\n         * Fourth line\n         */\n        parameterWithBreaks?: string;\n        /**\n         * Testing backticks in string: `backticks` and ```multiple backticks``` should work\n         */\n        parameterWithBackticks?: string;\n        /**\n         * Testing slashes in string: \\backwards\\\\\\ and /forwards/// should work\n         */\n        parameterWithSlashes?: string;\n        /**\n         * Testing expression placeholders in string: ${expression} should work\n         */\n        parameterWithExpressionPlaceholders?: string;\n        /**\n         * Testing quotes in string: 'single quote''' and \"double quotes\"\"\" should work\n         */\n        parameterWithQuotes?: string;\n        /**\n         * Testing reserved characters in string: * inline * and ** inline ** should work\n         */\n        parameterWithReservedCharacters?: string;\n    };\n    url: '/api/v{api-version}/descriptions';\n};\n\nexport type DeprecatedCallData = {\n    body?: never;\n    headers: {\n        /**\n         * This parameter is deprecated\n         *\n         * @deprecated\n         */\n        parameter: DeprecatedModel | null;\n    };\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/parameters/deprecated';\n};\n\nexport type CallWithParametersData = {\n    /**\n     * This is the parameter that goes into the body\n     */\n    body: {\n        [key: string]: unknown;\n    } | null;\n    headers: {\n        /**\n         * This is the parameter that goes into the header\n         */\n        parameterHeader: string | null;\n    };\n    path: {\n        /**\n         * This is the parameter that goes into the path\n         */\n        parameterPath: string | null;\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string | null;\n    };\n    query: {\n        foo_ref_enum?: ModelWithNestedArrayEnumsDataFoo;\n        foo_all_of_enum: ModelWithNestedArrayEnumsDataFoo;\n        /**\n         * This is the parameter that goes into the query params\n         */\n        cursor: string | null;\n    };\n    url: '/api/v{api-version}/parameters/{parameterPath}';\n};\n\nexport type CallWithWeirdParameterNamesData = {\n    /**\n     * This is the parameter that goes into the body\n     */\n    body: ModelWithString | null;\n    headers: {\n        /**\n         * This is the parameter that goes into the request header\n         */\n        'parameter.header': string | null;\n    };\n    path: {\n        /**\n         * This is the parameter that goes into the path\n         */\n        'parameter.path.1'?: string;\n        /**\n         * This is the parameter that goes into the path\n         */\n        'parameter-path-2'?: string;\n        /**\n         * This is the parameter that goes into the path\n         */\n        'PARAMETER-PATH-3'?: string;\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string | null;\n    };\n    query: {\n        /**\n         * This is the parameter with a reserved keyword\n         */\n        default?: string;\n        /**\n         * This is the parameter that goes into the request query params\n         */\n        'parameter-query': string | null;\n    };\n    url: '/api/v{api-version}/parameters/{parameter.path.1}/{parameter-path-2}/{PARAMETER-PATH-3}';\n};\n\nexport type GetCallWithOptionalParamData = {\n    /**\n     * This is a required parameter\n     */\n    body: ModelWithOneOfEnum;\n    path?: never;\n    query?: {\n        /**\n         * This is an optional parameter\n         */\n        page?: number;\n    };\n    url: '/api/v{api-version}/parameters';\n};\n\nexport type PostCallWithOptionalParamData = {\n    /**\n     * This is an optional parameter\n     */\n    body?: {\n        offset?: number | null;\n    };\n    path?: never;\n    query: {\n        /**\n         * This is a required parameter\n         */\n        parameter: Pageable;\n    };\n    url: '/api/v{api-version}/parameters';\n};\n\nexport type PostCallWithOptionalParamResponses = {\n    /**\n     * Response is a simple number\n     */\n    200: number;\n    /**\n     * Success\n     */\n    204: void;\n};\n\nexport type PostCallWithOptionalParamResponse = PostCallWithOptionalParamResponses[keyof PostCallWithOptionalParamResponses];\n\nexport type PostApiVbyApiVersionRequestBodyData = {\n    /**\n     * A reusable request body\n     */\n    body?: SimpleRequestBody;\n    path?: never;\n    query?: {\n        /**\n         * This is a reusable parameter\n         */\n        parameter?: string;\n    };\n    url: '/api/v{api-version}/requestBody';\n};\n\nexport type PostApiVbyApiVersionFormDataData = {\n    /**\n     * A reusable request body\n     */\n    body?: SimpleFormData;\n    path?: never;\n    query?: {\n        /**\n         * This is a reusable parameter\n         */\n        parameter?: string;\n    };\n    url: '/api/v{api-version}/formData';\n};\n\nexport type CallWithDefaultParametersData = {\n    body?: never;\n    path?: never;\n    query?: {\n        /**\n         * This is a simple string with default value\n         */\n        parameterString?: string | null;\n        /**\n         * This is a simple number with default value\n         */\n        parameterNumber?: number | null;\n        /**\n         * This is a simple boolean with default value\n         */\n        parameterBoolean?: boolean | null;\n        /**\n         * This is a simple enum with default value\n         */\n        parameterEnum?: 'Success' | 'Warning' | 'Error';\n        /**\n         * This is a simple model with default value\n         */\n        parameterModel?: ModelWithString | null;\n    };\n    url: '/api/v{api-version}/defaults';\n};\n\nexport type CallWithDefaultOptionalParametersData = {\n    body?: never;\n    path?: never;\n    query?: {\n        /**\n         * This is a simple string that is optional with default value\n         */\n        parameterString?: string;\n        /**\n         * This is a simple number that is optional with default value\n         */\n        parameterNumber?: number;\n        /**\n         * This is a simple boolean that is optional with default value\n         */\n        parameterBoolean?: boolean;\n        /**\n         * This is a simple enum that is optional with default value\n         */\n        parameterEnum?: 'Success' | 'Warning' | 'Error';\n        /**\n         * This is a simple model that is optional with default value\n         */\n        parameterModel?: ModelWithString;\n    };\n    url: '/api/v{api-version}/defaults';\n};\n\nexport type CallToTestOrderOfParamsData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * This is a optional string with default\n         */\n        parameterOptionalStringWithDefault?: string;\n        /**\n         * This is a optional string with empty default\n         */\n        parameterOptionalStringWithEmptyDefault?: string;\n        /**\n         * This is a optional string with no default\n         */\n        parameterOptionalStringWithNoDefault?: string;\n        /**\n         * This is a string with default\n         */\n        parameterStringWithDefault: string;\n        /**\n         * This is a string with empty default\n         */\n        parameterStringWithEmptyDefault: string;\n        /**\n         * This is a string with no default\n         */\n        parameterStringWithNoDefault: string;\n        /**\n         * This is a string that can be null with no default\n         */\n        parameterStringNullableWithNoDefault?: string | null;\n        /**\n         * This is a string that can be null with default\n         */\n        parameterStringNullableWithDefault?: string | null;\n    };\n    url: '/api/v{api-version}/defaults';\n};\n\nexport type DuplicateNameData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/duplicate';\n};\n\nexport type DuplicateName2Data = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/duplicate';\n};\n\nexport type DuplicateName3Data = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/duplicate';\n};\n\nexport type DuplicateName4Data = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/duplicate';\n};\n\nexport type CallWithNoContentResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no-content';\n};\n\nexport type CallWithNoContentResponseResponses = {\n    /**\n     * Success\n     */\n    204: void;\n};\n\nexport type CallWithNoContentResponseResponse = CallWithNoContentResponseResponses[keyof CallWithNoContentResponseResponses];\n\nexport type CallWithResponseAndNoContentResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multiple-tags/response-and-no-content';\n};\n\nexport type CallWithResponseAndNoContentResponseResponses = {\n    /**\n     * Response is a simple number\n     */\n    200: number;\n    /**\n     * Success\n     */\n    204: void;\n};\n\nexport type CallWithResponseAndNoContentResponseResponse = CallWithResponseAndNoContentResponseResponses[keyof CallWithResponseAndNoContentResponseResponses];\n\nexport type DummyAData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multiple-tags/a';\n};\n\nexport type DummyAResponses = {\n    200: _400;\n};\n\nexport type DummyAResponse = DummyAResponses[keyof DummyAResponses];\n\nexport type DummyBData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multiple-tags/b';\n};\n\nexport type DummyBResponses = {\n    /**\n     * Success\n     */\n    204: void;\n};\n\nexport type DummyBResponse = DummyBResponses[keyof DummyBResponses];\n\nexport type CallWithResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/response';\n};\n\nexport type CallWithResponseResponses = {\n    default: Import;\n};\n\nexport type CallWithResponseResponse = CallWithResponseResponses[keyof CallWithResponseResponses];\n\nexport type CallWithDuplicateResponsesData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/response';\n};\n\nexport type CallWithDuplicateResponsesErrors = {\n    /**\n     * Message for 500 error\n     */\n    500: ModelWithStringError;\n    /**\n     * Message for 501 error\n     */\n    501: ModelWithStringError;\n    /**\n     * Message for 502 error\n     */\n    502: ModelWithStringError;\n    /**\n     * Message for 4XX errors\n     */\n    '4XX': DictionaryWithArray;\n    /**\n     * Default error response\n     */\n    default: ModelWithBoolean;\n};\n\nexport type CallWithDuplicateResponsesError = CallWithDuplicateResponsesErrors[keyof CallWithDuplicateResponsesErrors];\n\nexport type CallWithDuplicateResponsesResponses = {\n    /**\n     * Message for 200 response\n     */\n    200: ModelWithBoolean & ModelWithInteger;\n    /**\n     * Message for 201 response\n     */\n    201: ModelWithString;\n    /**\n     * Message for 202 response\n     */\n    202: ModelWithString;\n};\n\nexport type CallWithDuplicateResponsesResponse = CallWithDuplicateResponsesResponses[keyof CallWithDuplicateResponsesResponses];\n\nexport type CallWithResponsesData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/response';\n};\n\nexport type CallWithResponsesErrors = {\n    /**\n     * Message for 500 error\n     */\n    500: ModelWithStringError;\n    /**\n     * Message for 501 error\n     */\n    501: ModelWithStringError;\n    /**\n     * Message for 502 error\n     */\n    502: ModelWithStringError;\n    /**\n     * Message for default response\n     */\n    default: ModelWithStringError;\n};\n\nexport type CallWithResponsesError = CallWithResponsesErrors[keyof CallWithResponsesErrors];\n\nexport type CallWithResponsesResponses = {\n    /**\n     * Message for 200 response\n     */\n    200: {\n        readonly '@namespace.string'?: string;\n        readonly '@namespace.integer'?: number;\n        readonly value?: Array<ModelWithString>;\n    };\n    /**\n     * Message for 201 response\n     */\n    201: ModelThatExtends;\n    /**\n     * Message for 202 response\n     */\n    202: ModelThatExtendsExtends;\n};\n\nexport type CallWithResponsesResponse = CallWithResponsesResponses[keyof CallWithResponsesResponses];\n\nexport type CollectionFormatData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * This is an array parameter that is sent as csv format (comma-separated values)\n         */\n        parameterArrayCSV: Array<string> | null;\n        /**\n         * This is an array parameter that is sent as ssv format (space-separated values)\n         */\n        parameterArraySSV: Array<string> | null;\n        /**\n         * This is an array parameter that is sent as tsv format (tab-separated values)\n         */\n        parameterArrayTSV: Array<string> | null;\n        /**\n         * This is an array parameter that is sent as pipes format (pipe-separated values)\n         */\n        parameterArrayPipes: Array<string> | null;\n        /**\n         * This is an array parameter that is sent as multi format (multiple parameter instances)\n         */\n        parameterArrayMulti: Array<string> | null;\n    };\n    url: '/api/v{api-version}/collectionFormat';\n};\n\nexport type TypesData = {\n    body?: never;\n    path?: {\n        /**\n         * This is a number parameter\n         */\n        id?: number;\n    };\n    query: {\n        /**\n         * This is a number parameter\n         */\n        parameterNumber: number;\n        /**\n         * This is a string parameter\n         */\n        parameterString: string | null;\n        /**\n         * This is a boolean parameter\n         */\n        parameterBoolean: boolean | null;\n        /**\n         * This is an object parameter\n         */\n        parameterObject: {\n            [key: string]: unknown;\n        } | null;\n        /**\n         * This is an array parameter\n         */\n        parameterArray: Array<string> | null;\n        /**\n         * This is a dictionary parameter\n         */\n        parameterDictionary: {\n            [key: string]: unknown;\n        } | null;\n        /**\n         * This is an enum parameter\n         */\n        parameterEnum: 'Success' | 'Warning' | 'Error' | null;\n    };\n    url: '/api/v{api-version}/types';\n};\n\nexport type TypesResponses = {\n    /**\n     * Response is a simple number\n     */\n    200: number;\n    /**\n     * Response is a simple string\n     */\n    201: string;\n    /**\n     * Response is a simple boolean\n     */\n    202: boolean;\n    /**\n     * Response is a simple object\n     */\n    203: {\n        [key: string]: unknown;\n    };\n};\n\nexport type TypesResponse = TypesResponses[keyof TypesResponses];\n\nexport type UploadFileData = {\n    body: Blob | File;\n    path: {\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string | null;\n    };\n    query?: never;\n    url: '/api/v{api-version}/upload';\n};\n\nexport type UploadFileResponses = {\n    200: boolean;\n};\n\nexport type UploadFileResponse = UploadFileResponses[keyof UploadFileResponses];\n\nexport type FileResponseData = {\n    body?: never;\n    path: {\n        id: string;\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string;\n    };\n    query?: never;\n    url: '/api/v{api-version}/file/{id}';\n};\n\nexport type FileResponseResponses = {\n    /**\n     * Success\n     */\n    200: Blob | File;\n};\n\nexport type FileResponseResponse = FileResponseResponses[keyof FileResponseResponses];\n\nexport type ComplexTypesData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * Parameter containing object\n         */\n        parameterObject: {\n            first?: {\n                second?: {\n                    third?: string;\n                };\n            };\n        };\n        /**\n         * Parameter containing reference\n         */\n        parameterReference: ModelWithString;\n    };\n    url: '/api/v{api-version}/complex';\n};\n\nexport type ComplexTypesErrors = {\n    /**\n     * 400 `server` error\n     */\n    400: unknown;\n    /**\n     * 500 server error\n     */\n    500: unknown;\n};\n\nexport type ComplexTypesResponses = {\n    /**\n     * Successful response\n     */\n    200: Array<ModelWithString>;\n};\n\nexport type ComplexTypesResponse = ComplexTypesResponses[keyof ComplexTypesResponses];\n\nexport type MultipartResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multipart';\n};\n\nexport type MultipartResponseResponses = {\n    /**\n     * OK\n     */\n    200: {\n        file?: Blob | File;\n        metadata?: {\n            foo?: string;\n            bar?: string;\n        };\n    };\n};\n\nexport type MultipartResponseResponse = MultipartResponseResponses[keyof MultipartResponseResponses];\n\nexport type MultipartRequestData = {\n    body?: {\n        content?: Blob | File;\n        data?: ModelWithString | null;\n    };\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multipart';\n};\n\nexport type ComplexParamsData = {\n    body?: {\n        readonly key: string | null;\n        name: string | null;\n        enabled?: boolean;\n        type: 'Monkey' | 'Horse' | 'Bird';\n        listOfModels?: Array<ModelWithString> | null;\n        listOfStrings?: Array<string> | null;\n        parameters: ModelWithString | ModelWithEnum | ModelWithArray | ModelWithDictionary;\n        readonly user?: {\n            readonly id?: number;\n            readonly name?: string | null;\n        };\n    };\n    path: {\n        id: number;\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string;\n    };\n    query?: never;\n    url: '/api/v{api-version}/complex/{id}';\n};\n\nexport type ComplexParamsResponses = {\n    /**\n     * Success\n     */\n    200: ModelWithString;\n};\n\nexport type ComplexParamsResponse = ComplexParamsResponses[keyof ComplexParamsResponses];\n\nexport type CallWithResultFromHeaderData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/header';\n};\n\nexport type CallWithResultFromHeaderErrors = {\n    /**\n     * 400 server error\n     */\n    400: unknown;\n    /**\n     * 500 server error\n     */\n    500: unknown;\n};\n\nexport type CallWithResultFromHeaderResponses = {\n    /**\n     * Successful response\n     */\n    200: unknown;\n};\n\nexport type TestErrorCodeData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * Status code to return\n         */\n        status: number;\n    };\n    url: '/api/v{api-version}/error';\n};\n\nexport type TestErrorCodeErrors = {\n    /**\n     * Custom message: Internal Server Error\n     */\n    500: unknown;\n    /**\n     * Custom message: Not Implemented\n     */\n    501: unknown;\n    /**\n     * Custom message: Bad Gateway\n     */\n    502: unknown;\n    /**\n     * Custom message: Service Unavailable\n     */\n    503: unknown;\n};\n\nexport type TestErrorCodeResponses = {\n    /**\n     * Custom message: Successful response\n     */\n    200: unknown;\n};\n\nexport type NonAsciiæøåÆøÅöôêÊ字符串Data = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * Dummy input param\n         */\n        nonAsciiParamæøåÆØÅöôêÊ: number;\n    };\n    url: '/api/v{api-version}/non-ascii-æøåÆØÅöôêÊ字符串';\n};\n\nexport type NonAsciiæøåÆøÅöôêÊ字符串Responses = {\n    /**\n     * Successful response\n     */\n    200: Array<NonAsciiStringæøåÆøÅöôêÊ字符串>;\n};\n\nexport type NonAsciiæøåÆøÅöôêÊ字符串Response = NonAsciiæøåÆøÅöôêÊ字符串Responses[keyof NonAsciiæøåÆøÅöôêÊ字符串Responses];\n\nexport type PutWithFormUrlEncodedData = {\n    body: ArrayWithStrings;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/non-ascii-æøåÆØÅöôêÊ字符串';\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/svelte-query/name-builder/@tanstack/svelte-query.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport { type DefaultError, type MutationOptions, queryOptions } from '@tanstack/svelte-query';\n\nimport { client } from '../client.gen';\nimport { fooBarPost, fooBarPut, fooPost, fooPut, getFoo, getFooBar, type Options } from '../sdk.gen';\nimport type { FooBarPostData, FooBarPostResponse, FooBarPutData, FooBarPutResponse, FooPostData, FooPostResponse, FooPutData, FooPutResponse, GetFooBarData, GetFooBarResponse, GetFooData, GetFooResponse } from '../types.gen';\n\nexport type QueryKey<TOptions extends Options> = [\n    Pick<TOptions, 'baseUrl' | 'body' | 'headers' | 'path' | 'query'> & {\n        _id: string;\n        _infinite?: boolean;\n        tags?: ReadonlyArray<string>;\n    }\n];\n\nconst createQueryKey = <TOptions extends Options>(id: string, options?: TOptions, infinite?: boolean, tags?: ReadonlyArray<string>): [\n    QueryKey<TOptions>[0]\n] => {\n    const params: QueryKey<TOptions>[0] = { _id: id, baseUrl: options?.baseUrl || (options?.client ?? client).getConfig().baseUrl } as QueryKey<TOptions>[0];\n    if (infinite) {\n        params._infinite = infinite;\n    }\n    if (tags) {\n        params.tags = tags;\n    }\n    if (options?.body) {\n        params.body = options.body;\n    }\n    if (options?.headers) {\n        params.headers = options.headers;\n    }\n    if (options?.path) {\n        params.path = options.path;\n    }\n    if (options?.query) {\n        params.query = options.query;\n    }\n    return [params];\n};\n\nexport const getFooD = (options?: Options<GetFooData>) => createQueryKey('getFoo', options);\n\nexport const getFooE = (options?: Options<GetFooData>) => queryOptions<GetFooResponse, DefaultError, GetFooResponse, ReturnType<typeof getFooD>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await getFoo({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: getFooD(options)\n});\n\nexport const fooPostC = (options?: Partial<Options<FooPostData>>): MutationOptions<FooPostResponse, DefaultError, Options<FooPostData>> => {\n    const mutationOptions: MutationOptions<FooPostResponse, DefaultError, Options<FooPostData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await fooPost({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const fooPutC = (options?: Partial<Options<FooPutData>>): MutationOptions<FooPutResponse, DefaultError, Options<FooPutData>> => {\n    const mutationOptions: MutationOptions<FooPutResponse, DefaultError, Options<FooPutData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await fooPut({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const getFooBarD = (options?: Options<GetFooBarData>) => createQueryKey('getFooBar', options);\n\nexport const getFooBarE = (options?: Options<GetFooBarData>) => queryOptions<GetFooBarResponse, DefaultError, GetFooBarResponse, ReturnType<typeof getFooBarD>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await getFooBar({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: getFooBarD(options)\n});\n\nexport const fooBarPostC = (options?: Partial<Options<FooBarPostData>>): MutationOptions<FooBarPostResponse, DefaultError, Options<FooBarPostData>> => {\n    const mutationOptions: MutationOptions<FooBarPostResponse, DefaultError, Options<FooBarPostData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await fooBarPost({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const fooBarPutC = (options?: Partial<Options<FooBarPutData>>): MutationOptions<FooBarPutResponse, DefaultError, Options<FooBarPutData>> => {\n    const mutationOptions: MutationOptions<FooBarPutResponse, DefaultError, Options<FooBarPutData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await fooBarPut({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/svelte-query/name-builder/client/client.gen.ts",
    "content": "// 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 (options: RequestOptions) => {\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 url = buildUrl(opts);\n\n    return { opts, url };\n  };\n\n  const request: Client['request'] = async (options) => {\n    // @ts-expect-error\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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/svelte-query/name-builder/client/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type { Auth } from '../core/auth.gen';\nexport type { QuerySerializerOptions } from '../core/bodySerializer.gen';\nexport {\n  formDataBodySerializer,\n  jsonBodySerializer,\n  urlSearchParamsBodySerializer,\n} from '../core/bodySerializer.gen';\nexport { buildClientParams } from '../core/params.gen';\nexport { serializeQueryKeyValue } from '../core/queryKeySerializer.gen';\nexport { createClient } from './client.gen';\nexport type {\n  Client,\n  ClientOptions,\n  Config,\n  CreateClientConfig,\n  Options,\n  RequestOptions,\n  RequestResult,\n  ResolvedRequestOptions,\n  ResponseStyle,\n  TDataShape,\n} from './types.gen';\nexport { createConfig, mergeHeaders } from './utils.gen';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/svelte-query/name-builder/client/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { Auth } from '../core/auth.gen';\nimport type {\n  ServerSentEventsOptions,\n  ServerSentEventsResult,\n} from '../core/serverSentEvents.gen';\nimport type { Client as CoreClient, Config as CoreConfig } from '../core/types.gen';\nimport type { Middleware } from './utils.gen';\n\nexport type ResponseStyle = 'data' | 'fields';\n\nexport interface Config<T extends ClientOptions = ClientOptions>\n  extends Omit<RequestInit, 'body' | 'headers' | 'method'>, CoreConfig {\n  /**\n   * Base URL for all requests made by this client.\n   */\n  baseUrl?: T['baseUrl'];\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   * Please don't use the Fetch client for Next.js applications. The `next`\n   * options won't have any effect.\n   *\n   * Install {@link https://www.npmjs.com/package/@hey-api/client-next `@hey-api/client-next`} instead.\n   */\n  next?: never;\n  /**\n   * Return the response data parsed in a specified format. By default, `auto`\n   * will infer the appropriate method from the `Content-Type` response header.\n   * You can override this behavior with any of the {@link Body} methods.\n   * Select `stream` if you don't want to parse response data at all.\n   *\n   * @default 'auto'\n   */\n  parseAs?: 'arrayBuffer' | 'auto' | 'blob' | 'formData' | 'json' | 'stream' | 'text';\n  /**\n   * Should we return only data or multiple fields (data, error, response, etc.)?\n   *\n   * @default 'fields'\n   */\n  responseStyle?: ResponseStyle;\n  /**\n   * Throw an error instead of returning it in the response?\n   *\n   * @default false\n   */\n  throwOnError?: T['throwOnError'];\n}\n\nexport interface RequestOptions<\n  TData = unknown,\n  TResponseStyle extends ResponseStyle = 'fields',\n  ThrowOnError extends boolean = boolean,\n  Url extends string = string,\n>\n  extends\n    Config<{\n      responseStyle: TResponseStyle;\n      throwOnError: ThrowOnError;\n    }>,\n    Pick<\n      ServerSentEventsOptions<TData>,\n      | 'onRequest'\n      | 'onSseError'\n      | 'onSseEvent'\n      | 'sseDefaultRetryDelay'\n      | 'sseMaxRetryAttempts'\n      | 'sseMaxRetryDelay'\n    > {\n  /**\n   * Any body that you want to add to your request.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/fetch#body}\n   */\n  body?: unknown;\n  path?: Record<string, unknown>;\n  query?: Record<string, unknown>;\n  /**\n   * Security mechanism(s) to use for the request.\n   */\n  security?: ReadonlyArray<Auth>;\n  url: Url;\n}\n\nexport interface ResolvedRequestOptions<\n  TResponseStyle extends ResponseStyle = 'fields',\n  ThrowOnError extends boolean = boolean,\n  Url extends string = string,\n> extends RequestOptions<unknown, TResponseStyle, ThrowOnError, Url> {\n  serializedBody?: string;\n}\n\nexport type RequestResult<\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = boolean,\n  TResponseStyle extends ResponseStyle = 'fields',\n> = ThrowOnError extends true\n  ? Promise<\n      TResponseStyle extends 'data'\n        ? TData extends Record<string, unknown>\n          ? TData[keyof TData]\n          : TData\n        : {\n            data: TData extends Record<string, unknown> ? TData[keyof TData] : TData;\n            request: Request;\n            response: Response;\n          }\n    >\n  : Promise<\n      TResponseStyle extends 'data'\n        ? (TData extends Record<string, unknown> ? TData[keyof TData] : TData) | undefined\n        : (\n            | {\n                data: TData extends Record<string, unknown> ? TData[keyof TData] : TData;\n                error: undefined;\n              }\n            | {\n                data: undefined;\n                error: TError extends Record<string, unknown> ? TError[keyof TError] : TError;\n              }\n          ) & {\n            request: Request;\n            response: Response;\n          }\n    >;\n\nexport interface ClientOptions {\n  baseUrl?: string;\n  responseStyle?: ResponseStyle;\n  throwOnError?: boolean;\n}\n\ntype MethodFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'>,\n) => RequestResult<TData, TError, ThrowOnError, TResponseStyle>;\n\ntype SseFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'>,\n) => Promise<ServerSentEventsResult<TData, TError>>;\n\ntype RequestFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'> &\n    Pick<Required<RequestOptions<TData, TResponseStyle, ThrowOnError>>, 'method'>,\n) => RequestResult<TData, TError, ThrowOnError, TResponseStyle>;\n\ntype BuildUrlFn = <\n  TData extends {\n    body?: unknown;\n    path?: Record<string, unknown>;\n    query?: Record<string, unknown>;\n    url: string;\n  },\n>(\n  options: TData & Options<TData>,\n) => string;\n\nexport type Client = CoreClient<RequestFn, Config, MethodFn, BuildUrlFn, SseFn> & {\n  interceptors: Middleware<Request, Response, unknown, ResolvedRequestOptions>;\n};\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 = ClientOptions> = (\n  override?: Config<ClientOptions & T>,\n) => Config<Required<ClientOptions> & T>;\n\nexport interface TDataShape {\n  body?: unknown;\n  headers?: unknown;\n  path?: unknown;\n  query?: unknown;\n  url: string;\n}\n\ntype OmitKeys<T, K> = Pick<T, Exclude<keyof T, K>>;\n\nexport type Options<\n  TData extends TDataShape = TDataShape,\n  ThrowOnError extends boolean = boolean,\n  TResponse = unknown,\n  TResponseStyle extends ResponseStyle = 'fields',\n> = OmitKeys<\n  RequestOptions<TResponse, TResponseStyle, ThrowOnError>,\n  'body' | 'path' | 'query' | 'url'\n> &\n  ([TData] extends [never] ? unknown : Omit<TData, 'url'>);\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/svelte-query/name-builder/client/utils.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/svelte-query/name-builder/client.gen.ts",
    "content": "// 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>());\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/svelte-query/name-builder/core/auth.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/svelte-query/name-builder/core/bodySerializer.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/svelte-query/name-builder/core/params.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/svelte-query/name-builder/core/pathSerializer.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/svelte-query/name-builder/core/queryKeySerializer.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\n/**\n * JSON-friendly union that mirrors what Pinia Colada can hash.\n */\nexport type JsonValue =\n  | null\n  | string\n  | number\n  | boolean\n  | JsonValue[]\n  | { [key: string]: JsonValue };\n\n/**\n * Replacer that converts non-JSON values (bigint, Date, etc.) to safe substitutes.\n */\nexport const queryKeyJsonReplacer = (_key: string, value: unknown) => {\n  if (value === undefined || typeof value === 'function' || typeof value === 'symbol') {\n    return undefined;\n  }\n  if (typeof value === 'bigint') {\n    return value.toString();\n  }\n  if (value instanceof Date) {\n    return value.toISOString();\n  }\n  return value;\n};\n\n/**\n * Safely stringifies a value and parses it back into a JsonValue.\n */\nexport const stringifyToJsonValue = (input: unknown): JsonValue | undefined => {\n  try {\n    const json = JSON.stringify(input, queryKeyJsonReplacer);\n    if (json === undefined) {\n      return undefined;\n    }\n    return JSON.parse(json) as JsonValue;\n  } catch {\n    return undefined;\n  }\n};\n\n/**\n * Detects plain objects (including objects with a null prototype).\n */\nconst isPlainObject = (value: unknown): value is Record<string, unknown> => {\n  if (value === null || typeof value !== 'object') {\n    return false;\n  }\n  const prototype = Object.getPrototypeOf(value as object);\n  return prototype === Object.prototype || prototype === null;\n};\n\n/**\n * Turns URLSearchParams into a sorted JSON object for deterministic keys.\n */\nconst serializeSearchParams = (params: URLSearchParams): JsonValue => {\n  const entries = Array.from(params.entries()).sort(([a], [b]) => a.localeCompare(b));\n  const result: Record<string, JsonValue> = {};\n\n  for (const [key, value] of entries) {\n    const existing = result[key];\n    if (existing === undefined) {\n      result[key] = value;\n      continue;\n    }\n\n    if (Array.isArray(existing)) {\n      (existing as string[]).push(value);\n    } else {\n      result[key] = [existing, value];\n    }\n  }\n\n  return result;\n};\n\n/**\n * Normalizes any accepted value into a JSON-friendly shape for query keys.\n */\nexport const serializeQueryKeyValue = (value: unknown): JsonValue | undefined => {\n  if (value === null) {\n    return null;\n  }\n\n  if (typeof value === 'string' || typeof value === 'number' || typeof value === 'boolean') {\n    return value;\n  }\n\n  if (value === undefined || typeof value === 'function' || typeof value === 'symbol') {\n    return undefined;\n  }\n\n  if (typeof value === 'bigint') {\n    return value.toString();\n  }\n\n  if (value instanceof Date) {\n    return value.toISOString();\n  }\n\n  if (Array.isArray(value)) {\n    return stringifyToJsonValue(value);\n  }\n\n  if (typeof URLSearchParams !== 'undefined' && value instanceof URLSearchParams) {\n    return serializeSearchParams(value);\n  }\n\n  if (isPlainObject(value)) {\n    return stringifyToJsonValue(value);\n  }\n\n  return undefined;\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/svelte-query/name-builder/core/serverSentEvents.gen.ts",
    "content": "// 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 const 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            // Normalize line endings: CRLF -> LF, then CR -> LF\n            buffer = buffer.replace(/\\r\\n/g, '\\n').replace(/\\r/g, '\\n');\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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/svelte-query/name-builder/core/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { Auth, AuthToken } from './auth.gen';\nimport type { BodySerializer, QuerySerializer, QuerySerializerOptions } from './bodySerializer.gen';\n\nexport type HttpMethod =\n  | 'connect'\n  | 'delete'\n  | 'get'\n  | 'head'\n  | 'options'\n  | 'patch'\n  | 'post'\n  | 'put'\n  | 'trace';\n\nexport type Client<\n  RequestFn = never,\n  Config = unknown,\n  MethodFn = never,\n  BuildUrlFn = never,\n  SseFn = never,\n> = {\n  /**\n   * Returns the final request URL.\n   */\n  buildUrl: BuildUrlFn;\n  getConfig: () => Config;\n  request: RequestFn;\n  setConfig: (config: Config) => Config;\n} & {\n  [K in HttpMethod]: MethodFn;\n} & ([SseFn] extends [never] ? { sse?: never } : { sse: { [K in HttpMethod]: SseFn } });\n\nexport interface Config {\n  /**\n   * Auth token or a function returning auth token. The resolved value will be\n   * added to the request payload as defined by its `security` array.\n   */\n  auth?: ((auth: Auth) => Promise<AuthToken> | AuthToken) | AuthToken;\n  /**\n   * A function for serializing request body parameter. By default,\n   * {@link JSON.stringify()} will be used.\n   */\n  bodySerializer?: BodySerializer | null;\n  /**\n   * An object containing any HTTP headers that you want to pre-populate your\n   * `Headers` object with.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/Headers/Headers#init See more}\n   */\n  headers?:\n    | RequestInit['headers']\n    | Record<\n        string,\n        string | number | boolean | (string | number | boolean)[] | null | undefined | unknown\n      >;\n  /**\n   * The request method.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/fetch#method See more}\n   */\n  method?: Uppercase<HttpMethod>;\n  /**\n   * A function for serializing request query parameters. By default, arrays\n   * will be exploded in form style, objects will be exploded in deepObject\n   * style, and reserved characters are percent-encoded.\n   *\n   * This method will have no effect if the native `paramsSerializer()` Axios\n   * API function is used.\n   *\n   * {@link https://swagger.io/docs/specification/serialization/#query View examples}\n   */\n  querySerializer?: QuerySerializer | QuerySerializerOptions;\n  /**\n   * A function validating request data. This is useful if you want to ensure\n   * the request conforms to the desired shape, so it can be safely sent to\n   * the server.\n   */\n  requestValidator?: (data: unknown) => Promise<unknown>;\n  /**\n   * A function transforming response data before it's returned. This is useful\n   * for post-processing data, e.g. converting ISO strings into Date objects.\n   */\n  responseTransformer?: (data: unknown) => Promise<unknown>;\n  /**\n   * A function validating response data. This is useful if you want to ensure\n   * the response conforms to the desired shape, so it can be safely passed to\n   * the transformers and returned to the user.\n   */\n  responseValidator?: (data: unknown) => Promise<unknown>;\n}\n\ntype IsExactlyNeverOrNeverUndefined<T> = [T] extends [never]\n  ? true\n  : [T] extends [never | undefined]\n    ? [undefined] extends [T]\n      ? false\n      : true\n    : false;\n\nexport type OmitNever<T extends Record<string, unknown>> = {\n  [K in keyof T as IsExactlyNeverOrNeverUndefined<T[K]> extends true ? never : K]: T[K];\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/svelte-query/name-builder/core/utils.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/svelte-query/name-builder/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport { fooBarPost, fooBarPut, fooPost, fooPut, getFoo, getFooBar, type Options } from './sdk.gen';\nexport type { ClientOptions, FooBarPostData, FooBarPostResponse, FooBarPostResponses, FooBarPutData, FooBarPutResponse, FooBarPutResponses, FooPostData, FooPostResponse, FooPostResponses, FooPutData, FooPutResponse, FooPutResponses, GetFooBarData, GetFooBarResponse, GetFooBarResponses, GetFooData, GetFooResponse, GetFooResponses } from './types.gen';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/svelte-query/name-builder/sdk.gen.ts",
    "content": "// 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 { FooBarPostData, FooBarPostResponses, FooBarPutData, FooBarPutResponses, FooPostData, FooPostResponses, FooPutData, FooPutResponses, GetFooBarData, GetFooBarResponses, GetFooData, GetFooResponses } from './types.gen';\n\nexport type Options<TData extends TDataShape = TDataShape, ThrowOnError extends boolean = boolean> = Options2<TData, ThrowOnError> & {\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\nexport const getFoo = <ThrowOnError extends boolean = false>(options?: Options<GetFooData, ThrowOnError>) => (options?.client ?? client).get<GetFooResponses, unknown, ThrowOnError>({ url: '/foo', ...options });\n\nexport const fooPost = <ThrowOnError extends boolean = false>(options?: Options<FooPostData, ThrowOnError>) => (options?.client ?? client).post<FooPostResponses, unknown, ThrowOnError>({ url: '/foo', ...options });\n\nexport const fooPut = <ThrowOnError extends boolean = false>(options?: Options<FooPutData, ThrowOnError>) => (options?.client ?? client).put<FooPutResponses, unknown, ThrowOnError>({ url: '/foo', ...options });\n\nexport const getFooBar = <ThrowOnError extends boolean = false>(options?: Options<GetFooBarData, ThrowOnError>) => (options?.client ?? client).get<GetFooBarResponses, unknown, ThrowOnError>({ url: '/foo/bar', ...options });\n\nexport const fooBarPost = <ThrowOnError extends boolean = false>(options?: Options<FooBarPostData, ThrowOnError>) => (options?.client ?? client).post<FooBarPostResponses, unknown, ThrowOnError>({ url: '/foo/bar', ...options });\n\nexport const fooBarPut = <ThrowOnError extends boolean = false>(options?: Options<FooBarPutData, ThrowOnError>) => (options?.client ?? client).put<FooBarPutResponses, unknown, ThrowOnError>({ url: '/foo/bar', ...options });\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/svelte-query/name-builder/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type ClientOptions = {\n    baseUrl: `${string}://${string}` | (string & {});\n};\n\nexport type GetFooData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/foo';\n};\n\nexport type GetFooResponses = {\n    /**\n     * OK\n     */\n    200: string;\n};\n\nexport type GetFooResponse = GetFooResponses[keyof GetFooResponses];\n\nexport type FooPostData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/foo';\n};\n\nexport type FooPostResponses = {\n    /**\n     * OK\n     */\n    200: string;\n};\n\nexport type FooPostResponse = FooPostResponses[keyof FooPostResponses];\n\nexport type FooPutData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/foo';\n};\n\nexport type FooPutResponses = {\n    /**\n     * OK\n     */\n    200: string;\n};\n\nexport type FooPutResponse = FooPutResponses[keyof FooPutResponses];\n\nexport type GetFooBarData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/foo/bar';\n};\n\nexport type GetFooBarResponses = {\n    /**\n     * OK\n     */\n    200: string;\n};\n\nexport type GetFooBarResponse = GetFooBarResponses[keyof GetFooBarResponses];\n\nexport type FooBarPostData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/foo/bar';\n};\n\nexport type FooBarPostResponses = {\n    /**\n     * OK\n     */\n    200: string;\n};\n\nexport type FooBarPostResponse = FooBarPostResponses[keyof FooBarPostResponses];\n\nexport type FooBarPutData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/foo/bar';\n};\n\nexport type FooBarPutResponses = {\n    /**\n     * OK\n     */\n    200: string;\n};\n\nexport type FooBarPutResponse = FooBarPutResponses[keyof FooBarPutResponses];\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/vue-query/asClass/@tanstack/vue-query.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport { type DefaultError, queryOptions, type UseMutationOptions } from '@tanstack/vue-query';\n\nimport { client } from '../client.gen';\nimport { BarBazService, BarService, FooBazService, FooService, type Options } from '../sdk.gen';\nimport type { FooBarPostData, FooBarPostResponse, FooBarPutData, FooBarPutResponse, FooPostData, FooPostResponse, FooPutData, FooPutResponse, GetFooBarData, GetFooBarResponse, GetFooData, GetFooResponse } from '../types.gen';\n\nexport type QueryKey<TOptions extends Options> = [\n    Pick<TOptions, 'baseUrl' | 'body' | 'headers' | 'path' | 'query'> & {\n        _id: string;\n        _infinite?: boolean;\n        tags?: ReadonlyArray<string>;\n    }\n];\n\nconst createQueryKey = <TOptions extends Options>(id: string, options?: TOptions, infinite?: boolean, tags?: ReadonlyArray<string>): [\n    QueryKey<TOptions>[0]\n] => {\n    const params: QueryKey<TOptions>[0] = { _id: id, baseUrl: options?.baseUrl || (options?.client ?? client).getConfig().baseUrl } as QueryKey<TOptions>[0];\n    if (infinite) {\n        params._infinite = infinite;\n    }\n    if (tags) {\n        params.tags = tags;\n    }\n    if (options?.body) {\n        params.body = options.body;\n    }\n    if (options?.headers) {\n        params.headers = options.headers;\n    }\n    if (options?.path) {\n        params.path = options.path;\n    }\n    if (options?.query) {\n        params.query = options.query;\n    }\n    return [params];\n};\n\nexport const getFooQueryKey = (options?: Options<GetFooData>) => createQueryKey('getFoo', options);\n\nexport const getFooOptions = (options?: Options<GetFooData>) => queryOptions<GetFooResponse, DefaultError, GetFooResponse, ReturnType<typeof getFooQueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await FooBazService.getFoo({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: getFooQueryKey(options)\n});\n\nexport const fooPostMutation = (options?: Partial<Options<FooPostData>>): UseMutationOptions<FooPostResponse, DefaultError, Options<FooPostData>> => {\n    const mutationOptions: UseMutationOptions<FooPostResponse, DefaultError, Options<FooPostData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await FooService.post({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const fooPutMutation = (options?: Partial<Options<FooPutData>>): UseMutationOptions<FooPutResponse, DefaultError, Options<FooPutData>> => {\n    const mutationOptions: UseMutationOptions<FooPutResponse, DefaultError, Options<FooPutData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await FooService.put({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const getFooBarQueryKey = (options?: Options<GetFooBarData>) => createQueryKey('getFooBar', options);\n\nexport const getFooBarOptions = (options?: Options<GetFooBarData>) => queryOptions<GetFooBarResponse, DefaultError, GetFooBarResponse, ReturnType<typeof getFooBarQueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await BarBazService.getFooBar({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: getFooBarQueryKey(options)\n});\n\nexport const fooBarPostMutation = (options?: Partial<Options<FooBarPostData>>): UseMutationOptions<FooBarPostResponse, DefaultError, Options<FooBarPostData>> => {\n    const mutationOptions: UseMutationOptions<FooBarPostResponse, DefaultError, Options<FooBarPostData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await BarService.post({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const fooBarPutMutation = (options?: Partial<Options<FooBarPutData>>): UseMutationOptions<FooBarPutResponse, DefaultError, Options<FooBarPutData>> => {\n    const mutationOptions: UseMutationOptions<FooBarPutResponse, DefaultError, Options<FooBarPutData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await BarService.put({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/vue-query/asClass/client/client.gen.ts",
    "content": "// 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 (options: RequestOptions) => {\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 url = buildUrl(opts);\n\n    return { opts, url };\n  };\n\n  const request: Client['request'] = async (options) => {\n    // @ts-expect-error\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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/vue-query/asClass/client/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type { Auth } from '../core/auth.gen';\nexport type { QuerySerializerOptions } from '../core/bodySerializer.gen';\nexport {\n  formDataBodySerializer,\n  jsonBodySerializer,\n  urlSearchParamsBodySerializer,\n} from '../core/bodySerializer.gen';\nexport { buildClientParams } from '../core/params.gen';\nexport { serializeQueryKeyValue } from '../core/queryKeySerializer.gen';\nexport { createClient } from './client.gen';\nexport type {\n  Client,\n  ClientOptions,\n  Config,\n  CreateClientConfig,\n  Options,\n  RequestOptions,\n  RequestResult,\n  ResolvedRequestOptions,\n  ResponseStyle,\n  TDataShape,\n} from './types.gen';\nexport { createConfig, mergeHeaders } from './utils.gen';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/vue-query/asClass/client/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { Auth } from '../core/auth.gen';\nimport type {\n  ServerSentEventsOptions,\n  ServerSentEventsResult,\n} from '../core/serverSentEvents.gen';\nimport type { Client as CoreClient, Config as CoreConfig } from '../core/types.gen';\nimport type { Middleware } from './utils.gen';\n\nexport type ResponseStyle = 'data' | 'fields';\n\nexport interface Config<T extends ClientOptions = ClientOptions>\n  extends Omit<RequestInit, 'body' | 'headers' | 'method'>, CoreConfig {\n  /**\n   * Base URL for all requests made by this client.\n   */\n  baseUrl?: T['baseUrl'];\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   * Please don't use the Fetch client for Next.js applications. The `next`\n   * options won't have any effect.\n   *\n   * Install {@link https://www.npmjs.com/package/@hey-api/client-next `@hey-api/client-next`} instead.\n   */\n  next?: never;\n  /**\n   * Return the response data parsed in a specified format. By default, `auto`\n   * will infer the appropriate method from the `Content-Type` response header.\n   * You can override this behavior with any of the {@link Body} methods.\n   * Select `stream` if you don't want to parse response data at all.\n   *\n   * @default 'auto'\n   */\n  parseAs?: 'arrayBuffer' | 'auto' | 'blob' | 'formData' | 'json' | 'stream' | 'text';\n  /**\n   * Should we return only data or multiple fields (data, error, response, etc.)?\n   *\n   * @default 'fields'\n   */\n  responseStyle?: ResponseStyle;\n  /**\n   * Throw an error instead of returning it in the response?\n   *\n   * @default false\n   */\n  throwOnError?: T['throwOnError'];\n}\n\nexport interface RequestOptions<\n  TData = unknown,\n  TResponseStyle extends ResponseStyle = 'fields',\n  ThrowOnError extends boolean = boolean,\n  Url extends string = string,\n>\n  extends\n    Config<{\n      responseStyle: TResponseStyle;\n      throwOnError: ThrowOnError;\n    }>,\n    Pick<\n      ServerSentEventsOptions<TData>,\n      | 'onRequest'\n      | 'onSseError'\n      | 'onSseEvent'\n      | 'sseDefaultRetryDelay'\n      | 'sseMaxRetryAttempts'\n      | 'sseMaxRetryDelay'\n    > {\n  /**\n   * Any body that you want to add to your request.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/fetch#body}\n   */\n  body?: unknown;\n  path?: Record<string, unknown>;\n  query?: Record<string, unknown>;\n  /**\n   * Security mechanism(s) to use for the request.\n   */\n  security?: ReadonlyArray<Auth>;\n  url: Url;\n}\n\nexport interface ResolvedRequestOptions<\n  TResponseStyle extends ResponseStyle = 'fields',\n  ThrowOnError extends boolean = boolean,\n  Url extends string = string,\n> extends RequestOptions<unknown, TResponseStyle, ThrowOnError, Url> {\n  serializedBody?: string;\n}\n\nexport type RequestResult<\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = boolean,\n  TResponseStyle extends ResponseStyle = 'fields',\n> = ThrowOnError extends true\n  ? Promise<\n      TResponseStyle extends 'data'\n        ? TData extends Record<string, unknown>\n          ? TData[keyof TData]\n          : TData\n        : {\n            data: TData extends Record<string, unknown> ? TData[keyof TData] : TData;\n            request: Request;\n            response: Response;\n          }\n    >\n  : Promise<\n      TResponseStyle extends 'data'\n        ? (TData extends Record<string, unknown> ? TData[keyof TData] : TData) | undefined\n        : (\n            | {\n                data: TData extends Record<string, unknown> ? TData[keyof TData] : TData;\n                error: undefined;\n              }\n            | {\n                data: undefined;\n                error: TError extends Record<string, unknown> ? TError[keyof TError] : TError;\n              }\n          ) & {\n            request: Request;\n            response: Response;\n          }\n    >;\n\nexport interface ClientOptions {\n  baseUrl?: string;\n  responseStyle?: ResponseStyle;\n  throwOnError?: boolean;\n}\n\ntype MethodFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'>,\n) => RequestResult<TData, TError, ThrowOnError, TResponseStyle>;\n\ntype SseFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'>,\n) => Promise<ServerSentEventsResult<TData, TError>>;\n\ntype RequestFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'> &\n    Pick<Required<RequestOptions<TData, TResponseStyle, ThrowOnError>>, 'method'>,\n) => RequestResult<TData, TError, ThrowOnError, TResponseStyle>;\n\ntype BuildUrlFn = <\n  TData extends {\n    body?: unknown;\n    path?: Record<string, unknown>;\n    query?: Record<string, unknown>;\n    url: string;\n  },\n>(\n  options: TData & Options<TData>,\n) => string;\n\nexport type Client = CoreClient<RequestFn, Config, MethodFn, BuildUrlFn, SseFn> & {\n  interceptors: Middleware<Request, Response, unknown, ResolvedRequestOptions>;\n};\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 = ClientOptions> = (\n  override?: Config<ClientOptions & T>,\n) => Config<Required<ClientOptions> & T>;\n\nexport interface TDataShape {\n  body?: unknown;\n  headers?: unknown;\n  path?: unknown;\n  query?: unknown;\n  url: string;\n}\n\ntype OmitKeys<T, K> = Pick<T, Exclude<keyof T, K>>;\n\nexport type Options<\n  TData extends TDataShape = TDataShape,\n  ThrowOnError extends boolean = boolean,\n  TResponse = unknown,\n  TResponseStyle extends ResponseStyle = 'fields',\n> = OmitKeys<\n  RequestOptions<TResponse, TResponseStyle, ThrowOnError>,\n  'body' | 'path' | 'query' | 'url'\n> &\n  ([TData] extends [never] ? unknown : Omit<TData, 'url'>);\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/vue-query/asClass/client/utils.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/vue-query/asClass/client.gen.ts",
    "content": "// 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>());\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/vue-query/asClass/core/auth.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/vue-query/asClass/core/bodySerializer.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/vue-query/asClass/core/params.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/vue-query/asClass/core/pathSerializer.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/vue-query/asClass/core/queryKeySerializer.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\n/**\n * JSON-friendly union that mirrors what Pinia Colada can hash.\n */\nexport type JsonValue =\n  | null\n  | string\n  | number\n  | boolean\n  | JsonValue[]\n  | { [key: string]: JsonValue };\n\n/**\n * Replacer that converts non-JSON values (bigint, Date, etc.) to safe substitutes.\n */\nexport const queryKeyJsonReplacer = (_key: string, value: unknown) => {\n  if (value === undefined || typeof value === 'function' || typeof value === 'symbol') {\n    return undefined;\n  }\n  if (typeof value === 'bigint') {\n    return value.toString();\n  }\n  if (value instanceof Date) {\n    return value.toISOString();\n  }\n  return value;\n};\n\n/**\n * Safely stringifies a value and parses it back into a JsonValue.\n */\nexport const stringifyToJsonValue = (input: unknown): JsonValue | undefined => {\n  try {\n    const json = JSON.stringify(input, queryKeyJsonReplacer);\n    if (json === undefined) {\n      return undefined;\n    }\n    return JSON.parse(json) as JsonValue;\n  } catch {\n    return undefined;\n  }\n};\n\n/**\n * Detects plain objects (including objects with a null prototype).\n */\nconst isPlainObject = (value: unknown): value is Record<string, unknown> => {\n  if (value === null || typeof value !== 'object') {\n    return false;\n  }\n  const prototype = Object.getPrototypeOf(value as object);\n  return prototype === Object.prototype || prototype === null;\n};\n\n/**\n * Turns URLSearchParams into a sorted JSON object for deterministic keys.\n */\nconst serializeSearchParams = (params: URLSearchParams): JsonValue => {\n  const entries = Array.from(params.entries()).sort(([a], [b]) => a.localeCompare(b));\n  const result: Record<string, JsonValue> = {};\n\n  for (const [key, value] of entries) {\n    const existing = result[key];\n    if (existing === undefined) {\n      result[key] = value;\n      continue;\n    }\n\n    if (Array.isArray(existing)) {\n      (existing as string[]).push(value);\n    } else {\n      result[key] = [existing, value];\n    }\n  }\n\n  return result;\n};\n\n/**\n * Normalizes any accepted value into a JSON-friendly shape for query keys.\n */\nexport const serializeQueryKeyValue = (value: unknown): JsonValue | undefined => {\n  if (value === null) {\n    return null;\n  }\n\n  if (typeof value === 'string' || typeof value === 'number' || typeof value === 'boolean') {\n    return value;\n  }\n\n  if (value === undefined || typeof value === 'function' || typeof value === 'symbol') {\n    return undefined;\n  }\n\n  if (typeof value === 'bigint') {\n    return value.toString();\n  }\n\n  if (value instanceof Date) {\n    return value.toISOString();\n  }\n\n  if (Array.isArray(value)) {\n    return stringifyToJsonValue(value);\n  }\n\n  if (typeof URLSearchParams !== 'undefined' && value instanceof URLSearchParams) {\n    return serializeSearchParams(value);\n  }\n\n  if (isPlainObject(value)) {\n    return stringifyToJsonValue(value);\n  }\n\n  return undefined;\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/vue-query/asClass/core/serverSentEvents.gen.ts",
    "content": "// 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 const 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            // Normalize line endings: CRLF -> LF, then CR -> LF\n            buffer = buffer.replace(/\\r\\n/g, '\\n').replace(/\\r/g, '\\n');\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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/vue-query/asClass/core/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { Auth, AuthToken } from './auth.gen';\nimport type { BodySerializer, QuerySerializer, QuerySerializerOptions } from './bodySerializer.gen';\n\nexport type HttpMethod =\n  | 'connect'\n  | 'delete'\n  | 'get'\n  | 'head'\n  | 'options'\n  | 'patch'\n  | 'post'\n  | 'put'\n  | 'trace';\n\nexport type Client<\n  RequestFn = never,\n  Config = unknown,\n  MethodFn = never,\n  BuildUrlFn = never,\n  SseFn = never,\n> = {\n  /**\n   * Returns the final request URL.\n   */\n  buildUrl: BuildUrlFn;\n  getConfig: () => Config;\n  request: RequestFn;\n  setConfig: (config: Config) => Config;\n} & {\n  [K in HttpMethod]: MethodFn;\n} & ([SseFn] extends [never] ? { sse?: never } : { sse: { [K in HttpMethod]: SseFn } });\n\nexport interface Config {\n  /**\n   * Auth token or a function returning auth token. The resolved value will be\n   * added to the request payload as defined by its `security` array.\n   */\n  auth?: ((auth: Auth) => Promise<AuthToken> | AuthToken) | AuthToken;\n  /**\n   * A function for serializing request body parameter. By default,\n   * {@link JSON.stringify()} will be used.\n   */\n  bodySerializer?: BodySerializer | null;\n  /**\n   * An object containing any HTTP headers that you want to pre-populate your\n   * `Headers` object with.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/Headers/Headers#init See more}\n   */\n  headers?:\n    | RequestInit['headers']\n    | Record<\n        string,\n        string | number | boolean | (string | number | boolean)[] | null | undefined | unknown\n      >;\n  /**\n   * The request method.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/fetch#method See more}\n   */\n  method?: Uppercase<HttpMethod>;\n  /**\n   * A function for serializing request query parameters. By default, arrays\n   * will be exploded in form style, objects will be exploded in deepObject\n   * style, and reserved characters are percent-encoded.\n   *\n   * This method will have no effect if the native `paramsSerializer()` Axios\n   * API function is used.\n   *\n   * {@link https://swagger.io/docs/specification/serialization/#query View examples}\n   */\n  querySerializer?: QuerySerializer | QuerySerializerOptions;\n  /**\n   * A function validating request data. This is useful if you want to ensure\n   * the request conforms to the desired shape, so it can be safely sent to\n   * the server.\n   */\n  requestValidator?: (data: unknown) => Promise<unknown>;\n  /**\n   * A function transforming response data before it's returned. This is useful\n   * for post-processing data, e.g. converting ISO strings into Date objects.\n   */\n  responseTransformer?: (data: unknown) => Promise<unknown>;\n  /**\n   * A function validating response data. This is useful if you want to ensure\n   * the response conforms to the desired shape, so it can be safely passed to\n   * the transformers and returned to the user.\n   */\n  responseValidator?: (data: unknown) => Promise<unknown>;\n}\n\ntype IsExactlyNeverOrNeverUndefined<T> = [T] extends [never]\n  ? true\n  : [T] extends [never | undefined]\n    ? [undefined] extends [T]\n      ? false\n      : true\n    : false;\n\nexport type OmitNever<T extends Record<string, unknown>> = {\n  [K in keyof T as IsExactlyNeverOrNeverUndefined<T[K]> extends true ? never : K]: T[K];\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/vue-query/asClass/core/utils.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/vue-query/asClass/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport { BarBazService, BarService, BarService2, FooBazService, FooService, FooService2, type Options } from './sdk.gen';\nexport type { ClientOptions, FooBarPostData, FooBarPostResponse, FooBarPostResponses, FooBarPutData, FooBarPutResponse, FooBarPutResponses, FooPostData, FooPostResponse, FooPostResponses, FooPutData, FooPutResponse, FooPutResponses, GetFooBarData, GetFooBarResponse, GetFooBarResponses, GetFooData, GetFooResponse, GetFooResponses } from './types.gen';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/vue-query/asClass/sdk.gen.ts",
    "content": "// 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 { FooBarPostData, FooBarPostResponses, FooBarPutData, FooBarPutResponses, FooPostData, FooPostResponses, FooPutData, FooPutResponses, GetFooBarData, GetFooBarResponses, GetFooData, GetFooResponses } from './types.gen';\n\nexport type Options<TData extends TDataShape = TDataShape, ThrowOnError extends boolean = boolean> = Options2<TData, ThrowOnError> & {\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\nexport class BarService {\n    public static post<ThrowOnError extends boolean = false>(options?: Options<FooBarPostData, ThrowOnError>) {\n        return (options?.client ?? client).post<FooBarPostResponses, unknown, ThrowOnError>({ url: '/foo/bar', ...options });\n    }\n    \n    public static put<ThrowOnError extends boolean = false>(options?: Options<FooBarPutData, ThrowOnError>) {\n        return (options?.client ?? client).put<FooBarPutResponses, unknown, ThrowOnError>({ url: '/foo/bar', ...options });\n    }\n}\n\nexport class FooService {\n    public static post<ThrowOnError extends boolean = false>(options?: Options<FooPostData, ThrowOnError>) {\n        return (options?.client ?? client).post<FooPostResponses, unknown, ThrowOnError>({ url: '/foo', ...options });\n    }\n    \n    public static put<ThrowOnError extends boolean = false>(options?: Options<FooPutData, ThrowOnError>) {\n        return (options?.client ?? client).put<FooPutResponses, unknown, ThrowOnError>({ url: '/foo', ...options });\n    }\n    \n    static barService = BarService;\n}\n\nexport class FooBazService {\n    public static getFoo<ThrowOnError extends boolean = false>(options?: Options<GetFooData, ThrowOnError>) {\n        return (options?.client ?? client).get<GetFooResponses, unknown, ThrowOnError>({ url: '/foo', ...options });\n    }\n    \n    static fooService = FooService;\n}\n\nexport class BarService2 {\n    public static post<ThrowOnError extends boolean = false>(options?: Options<FooBarPostData, ThrowOnError>) {\n        return (options?.client ?? client).post<FooBarPostResponses, unknown, ThrowOnError>({ url: '/foo/bar', ...options });\n    }\n    \n    public static put<ThrowOnError extends boolean = false>(options?: Options<FooBarPutData, ThrowOnError>) {\n        return (options?.client ?? client).put<FooBarPutResponses, unknown, ThrowOnError>({ url: '/foo/bar', ...options });\n    }\n}\n\nexport class FooService2 {\n    static barService = BarService2;\n}\n\nexport class BarBazService {\n    public static getFooBar<ThrowOnError extends boolean = false>(options?: Options<GetFooBarData, ThrowOnError>) {\n        return (options?.client ?? client).get<GetFooBarResponses, unknown, ThrowOnError>({ url: '/foo/bar', ...options });\n    }\n    \n    static fooService = FooService2;\n}\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/vue-query/asClass/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type ClientOptions = {\n    baseUrl: `${string}://${string}` | (string & {});\n};\n\nexport type GetFooData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/foo';\n};\n\nexport type GetFooResponses = {\n    /**\n     * OK\n     */\n    200: string;\n};\n\nexport type GetFooResponse = GetFooResponses[keyof GetFooResponses];\n\nexport type FooPostData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/foo';\n};\n\nexport type FooPostResponses = {\n    /**\n     * OK\n     */\n    200: string;\n};\n\nexport type FooPostResponse = FooPostResponses[keyof FooPostResponses];\n\nexport type FooPutData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/foo';\n};\n\nexport type FooPutResponses = {\n    /**\n     * OK\n     */\n    200: string;\n};\n\nexport type FooPutResponse = FooPutResponses[keyof FooPutResponses];\n\nexport type GetFooBarData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/foo/bar';\n};\n\nexport type GetFooBarResponses = {\n    /**\n     * OK\n     */\n    200: string;\n};\n\nexport type GetFooBarResponse = GetFooBarResponses[keyof GetFooBarResponses];\n\nexport type FooBarPostData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/foo/bar';\n};\n\nexport type FooBarPostResponses = {\n    /**\n     * OK\n     */\n    200: string;\n};\n\nexport type FooBarPostResponse = FooBarPostResponses[keyof FooBarPostResponses];\n\nexport type FooBarPutData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/foo/bar';\n};\n\nexport type FooBarPutResponses = {\n    /**\n     * OK\n     */\n    200: string;\n};\n\nexport type FooBarPutResponse = FooBarPutResponses[keyof FooBarPutResponses];\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/vue-query/axios/@tanstack/vue-query.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport { type DefaultError, type InfiniteData, infiniteQueryOptions, queryOptions, type UseMutationOptions } from '@tanstack/vue-query';\nimport type { AxiosError } from 'axios';\n\nimport { client } from '../client.gen';\nimport { apiVVersionODataControllerCount, callToTestOrderOfParams, callWithDefaultOptionalParameters, callWithDefaultParameters, callWithDescriptions, callWithDuplicateResponses, callWithNoContentResponse, callWithParameters, callWithResponse, callWithResponseAndNoContentResponse, callWithResponses, callWithResultFromHeader, callWithWeirdParameterNames, collectionFormat, complexParams, complexTypes, deleteCallWithoutParametersAndResponse, deleteFoo, deprecatedCall, dummyA, dummyB, duplicateName, duplicateName2, duplicateName3, duplicateName4, export_, fileResponse, fooWow, getApiVbyApiVersionSimpleOperation, getCallWithOptionalParam, getCallWithoutParametersAndResponse, import_, multipartRequest, multipartResponse, nonAsciiæøåÆøÅöôêÊ字符串, type Options, patchApiVbyApiVersionNoTag, patchCallWithoutParametersAndResponse, postApiVbyApiVersionFormData, postApiVbyApiVersionRequestBody, postCallWithOptionalParam, postCallWithoutParametersAndResponse, putCallWithoutParametersAndResponse, putWithFormUrlEncoded, testErrorCode, types, uploadFile } from '../sdk.gen';\nimport type { ApiVVersionODataControllerCountData, ApiVVersionODataControllerCountResponse, CallToTestOrderOfParamsData, CallWithDefaultOptionalParametersData, CallWithDefaultParametersData, CallWithDescriptionsData, CallWithDuplicateResponsesData, CallWithDuplicateResponsesError, CallWithDuplicateResponsesResponse, CallWithNoContentResponseData, CallWithNoContentResponseResponse, CallWithParametersData, CallWithResponseAndNoContentResponseData, CallWithResponseAndNoContentResponseResponse, CallWithResponseData, CallWithResponseResponse, CallWithResponsesData, CallWithResponsesError, CallWithResponsesResponse, CallWithResultFromHeaderData, CallWithWeirdParameterNamesData, CollectionFormatData, ComplexParamsData, ComplexParamsResponse, ComplexTypesData, ComplexTypesResponse, DeleteCallWithoutParametersAndResponseData, DeleteFooData3, DeprecatedCallData, DummyAData, DummyAResponse, DummyBData, DummyBResponse, DuplicateName2Data, DuplicateName3Data, DuplicateName4Data, DuplicateNameData, ExportData, FileResponseData, FileResponseResponse, FooWowData, GetApiVbyApiVersionSimpleOperationData, GetApiVbyApiVersionSimpleOperationError, GetApiVbyApiVersionSimpleOperationResponse, GetCallWithOptionalParamData, GetCallWithoutParametersAndResponseData, ImportData, ImportResponse, MultipartRequestData, MultipartResponseData, MultipartResponseResponse, NonAsciiæøåÆøÅöôêÊ字符串Data, NonAsciiæøåÆøÅöôêÊ字符串Response, PatchApiVbyApiVersionNoTagData, PatchCallWithoutParametersAndResponseData, PostApiVbyApiVersionFormDataData, PostApiVbyApiVersionRequestBodyData, PostCallWithOptionalParamData, PostCallWithOptionalParamResponse, PostCallWithoutParametersAndResponseData, PutCallWithoutParametersAndResponseData, PutWithFormUrlEncodedData, TestErrorCodeData, TypesData, TypesResponse, UploadFileData, UploadFileResponse } from '../types.gen';\n\nexport type QueryKey<TOptions extends Options> = [\n    Pick<TOptions, 'baseURL' | 'body' | 'headers' | 'path' | 'query'> & {\n        _id: string;\n        _infinite?: boolean;\n        tags?: ReadonlyArray<string>;\n    }\n];\n\nconst createQueryKey = <TOptions extends Options>(id: string, options?: TOptions, infinite?: boolean, tags?: ReadonlyArray<string>): [\n    QueryKey<TOptions>[0]\n] => {\n    const params: QueryKey<TOptions>[0] = { _id: id, baseURL: options?.baseURL || (options?.client ?? client).getConfig().baseURL } as QueryKey<TOptions>[0];\n    if (infinite) {\n        params._infinite = infinite;\n    }\n    if (tags) {\n        params.tags = tags;\n    }\n    if (options?.body) {\n        params.body = options.body;\n    }\n    if (options?.headers) {\n        params.headers = options.headers;\n    }\n    if (options?.path) {\n        params.path = options.path;\n    }\n    if (options?.query) {\n        params.query = options.query;\n    }\n    return [params];\n};\n\nexport const exportQueryKey = (options?: Options<ExportData>) => createQueryKey('export', options);\n\nexport const exportOptions = (options?: Options<ExportData>) => queryOptions<unknown, AxiosError<DefaultError>, unknown, ReturnType<typeof exportQueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await export_({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: exportQueryKey(options)\n});\n\nexport const patchApiVbyApiVersionNoTagMutation = (options?: Partial<Options<PatchApiVbyApiVersionNoTagData>>): UseMutationOptions<unknown, AxiosError<DefaultError>, Options<PatchApiVbyApiVersionNoTagData>> => {\n    const mutationOptions: UseMutationOptions<unknown, AxiosError<DefaultError>, Options<PatchApiVbyApiVersionNoTagData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await patchApiVbyApiVersionNoTag({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const importMutation = (options?: Partial<Options<ImportData>>): UseMutationOptions<ImportResponse, AxiosError<DefaultError>, Options<ImportData>> => {\n    const mutationOptions: UseMutationOptions<ImportResponse, AxiosError<DefaultError>, Options<ImportData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await import_({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const fooWowMutation = (options?: Partial<Options<FooWowData>>): UseMutationOptions<unknown, AxiosError<DefaultError>, Options<FooWowData>> => {\n    const mutationOptions: UseMutationOptions<unknown, AxiosError<DefaultError>, Options<FooWowData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await fooWow({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const apiVVersionODataControllerCountQueryKey = (options?: Options<ApiVVersionODataControllerCountData>) => createQueryKey('apiVVersionODataControllerCount', options);\n\nexport const apiVVersionODataControllerCountOptions = (options?: Options<ApiVVersionODataControllerCountData>) => queryOptions<ApiVVersionODataControllerCountResponse, AxiosError<DefaultError>, ApiVVersionODataControllerCountResponse, ReturnType<typeof apiVVersionODataControllerCountQueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await apiVVersionODataControllerCount({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: apiVVersionODataControllerCountQueryKey(options)\n});\n\nexport const getApiVbyApiVersionSimpleOperationQueryKey = (options: Options<GetApiVbyApiVersionSimpleOperationData>) => createQueryKey('getApiVbyApiVersionSimpleOperation', options);\n\nexport const getApiVbyApiVersionSimpleOperationOptions = (options: Options<GetApiVbyApiVersionSimpleOperationData>) => queryOptions<GetApiVbyApiVersionSimpleOperationResponse, AxiosError<GetApiVbyApiVersionSimpleOperationError>, GetApiVbyApiVersionSimpleOperationResponse, ReturnType<typeof getApiVbyApiVersionSimpleOperationQueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await getApiVbyApiVersionSimpleOperation({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: getApiVbyApiVersionSimpleOperationQueryKey(options)\n});\n\nexport const deleteCallWithoutParametersAndResponseMutation = (options?: Partial<Options<DeleteCallWithoutParametersAndResponseData>>): UseMutationOptions<unknown, AxiosError<DefaultError>, Options<DeleteCallWithoutParametersAndResponseData>> => {\n    const mutationOptions: UseMutationOptions<unknown, AxiosError<DefaultError>, Options<DeleteCallWithoutParametersAndResponseData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await deleteCallWithoutParametersAndResponse({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const getCallWithoutParametersAndResponseQueryKey = (options?: Options<GetCallWithoutParametersAndResponseData>) => createQueryKey('getCallWithoutParametersAndResponse', options);\n\nexport const getCallWithoutParametersAndResponseOptions = (options?: Options<GetCallWithoutParametersAndResponseData>) => queryOptions<unknown, AxiosError<DefaultError>, unknown, ReturnType<typeof getCallWithoutParametersAndResponseQueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await getCallWithoutParametersAndResponse({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: getCallWithoutParametersAndResponseQueryKey(options)\n});\n\nexport const patchCallWithoutParametersAndResponseMutation = (options?: Partial<Options<PatchCallWithoutParametersAndResponseData>>): UseMutationOptions<unknown, AxiosError<DefaultError>, Options<PatchCallWithoutParametersAndResponseData>> => {\n    const mutationOptions: UseMutationOptions<unknown, AxiosError<DefaultError>, Options<PatchCallWithoutParametersAndResponseData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await patchCallWithoutParametersAndResponse({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const postCallWithoutParametersAndResponseMutation = (options?: Partial<Options<PostCallWithoutParametersAndResponseData>>): UseMutationOptions<unknown, AxiosError<DefaultError>, Options<PostCallWithoutParametersAndResponseData>> => {\n    const mutationOptions: UseMutationOptions<unknown, AxiosError<DefaultError>, Options<PostCallWithoutParametersAndResponseData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await postCallWithoutParametersAndResponse({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const putCallWithoutParametersAndResponseMutation = (options?: Partial<Options<PutCallWithoutParametersAndResponseData>>): UseMutationOptions<unknown, AxiosError<DefaultError>, Options<PutCallWithoutParametersAndResponseData>> => {\n    const mutationOptions: UseMutationOptions<unknown, AxiosError<DefaultError>, Options<PutCallWithoutParametersAndResponseData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await putCallWithoutParametersAndResponse({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const deleteFooMutation = (options?: Partial<Options<DeleteFooData3>>): UseMutationOptions<unknown, AxiosError<DefaultError>, Options<DeleteFooData3>> => {\n    const mutationOptions: UseMutationOptions<unknown, AxiosError<DefaultError>, Options<DeleteFooData3>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await deleteFoo({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const callWithDescriptionsMutation = (options?: Partial<Options<CallWithDescriptionsData>>): UseMutationOptions<unknown, AxiosError<DefaultError>, Options<CallWithDescriptionsData>> => {\n    const mutationOptions: UseMutationOptions<unknown, AxiosError<DefaultError>, Options<CallWithDescriptionsData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await callWithDescriptions({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\n/**\n * @deprecated\n */\nexport const deprecatedCallMutation = (options?: Partial<Options<DeprecatedCallData>>): UseMutationOptions<unknown, AxiosError<DefaultError>, Options<DeprecatedCallData>> => {\n    const mutationOptions: UseMutationOptions<unknown, AxiosError<DefaultError>, Options<DeprecatedCallData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await deprecatedCall({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const callWithParametersMutation = (options?: Partial<Options<CallWithParametersData>>): UseMutationOptions<unknown, AxiosError<DefaultError>, Options<CallWithParametersData>> => {\n    const mutationOptions: UseMutationOptions<unknown, AxiosError<DefaultError>, Options<CallWithParametersData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await callWithParameters({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const callWithWeirdParameterNamesMutation = (options?: Partial<Options<CallWithWeirdParameterNamesData>>): UseMutationOptions<unknown, AxiosError<DefaultError>, Options<CallWithWeirdParameterNamesData>> => {\n    const mutationOptions: UseMutationOptions<unknown, AxiosError<DefaultError>, Options<CallWithWeirdParameterNamesData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await callWithWeirdParameterNames({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const getCallWithOptionalParamQueryKey = (options: Options<GetCallWithOptionalParamData>) => createQueryKey('getCallWithOptionalParam', options);\n\nexport const getCallWithOptionalParamOptions = (options: Options<GetCallWithOptionalParamData>) => queryOptions<unknown, AxiosError<DefaultError>, unknown, ReturnType<typeof getCallWithOptionalParamQueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await getCallWithOptionalParam({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: getCallWithOptionalParamQueryKey(options)\n});\n\nconst createInfiniteParams = <K extends Pick<QueryKey<Options>[0], 'body' | 'headers' | 'path' | 'query'>>(queryKey: QueryKey<Options>, page: K) => {\n    const params = { ...queryKey[0] };\n    if (page.body) {\n        params.body = {\n            ...queryKey[0].body as any,\n            ...page.body as any\n        };\n    }\n    if (page.headers) {\n        params.headers = {\n            ...queryKey[0].headers,\n            ...page.headers\n        };\n    }\n    if (page.path) {\n        params.path = {\n            ...queryKey[0].path as any,\n            ...page.path as any\n        };\n    }\n    if (page.query) {\n        params.query = {\n            ...queryKey[0].query as any,\n            ...page.query as any\n        };\n    }\n    return params as unknown as typeof page;\n};\n\nexport const getCallWithOptionalParamInfiniteQueryKey = (options: Options<GetCallWithOptionalParamData>): QueryKey<Options<GetCallWithOptionalParamData>> => createQueryKey('getCallWithOptionalParam', options, true);\n\nexport const getCallWithOptionalParamInfiniteOptions = (options: Options<GetCallWithOptionalParamData>) => infiniteQueryOptions<unknown, AxiosError<DefaultError>, InfiniteData<unknown>, QueryKey<Options<GetCallWithOptionalParamData>>, number | Pick<QueryKey<Options<GetCallWithOptionalParamData>>[0], 'body' | 'headers' | 'path' | 'query'>>(\n// @ts-ignore\n{\n    queryFn: async ({ pageParam, queryKey, signal }) => {\n        // @ts-ignore\n        const page: Pick<QueryKey<Options<GetCallWithOptionalParamData>>[0], 'body' | 'headers' | 'path' | 'query'> = typeof pageParam === 'object' ? pageParam : {\n            query: {\n                page: pageParam\n            }\n        };\n        const params = createInfiniteParams(queryKey, page);\n        const { data } = await getCallWithOptionalParam({\n            ...options,\n            ...params,\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: getCallWithOptionalParamInfiniteQueryKey(options)\n});\n\nexport const postCallWithOptionalParamMutation = (options?: Partial<Options<PostCallWithOptionalParamData>>): UseMutationOptions<PostCallWithOptionalParamResponse, AxiosError<DefaultError>, Options<PostCallWithOptionalParamData>> => {\n    const mutationOptions: UseMutationOptions<PostCallWithOptionalParamResponse, AxiosError<DefaultError>, Options<PostCallWithOptionalParamData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await postCallWithOptionalParam({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const postApiVbyApiVersionRequestBodyMutation = (options?: Partial<Options<PostApiVbyApiVersionRequestBodyData>>): UseMutationOptions<unknown, AxiosError<DefaultError>, Options<PostApiVbyApiVersionRequestBodyData>> => {\n    const mutationOptions: UseMutationOptions<unknown, AxiosError<DefaultError>, Options<PostApiVbyApiVersionRequestBodyData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await postApiVbyApiVersionRequestBody({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const postApiVbyApiVersionFormDataMutation = (options?: Partial<Options<PostApiVbyApiVersionFormDataData>>): UseMutationOptions<unknown, AxiosError<DefaultError>, Options<PostApiVbyApiVersionFormDataData>> => {\n    const mutationOptions: UseMutationOptions<unknown, AxiosError<DefaultError>, Options<PostApiVbyApiVersionFormDataData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await postApiVbyApiVersionFormData({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const callWithDefaultParametersQueryKey = (options?: Options<CallWithDefaultParametersData>) => createQueryKey('callWithDefaultParameters', options);\n\nexport const callWithDefaultParametersOptions = (options?: Options<CallWithDefaultParametersData>) => queryOptions<unknown, AxiosError<DefaultError>, unknown, ReturnType<typeof callWithDefaultParametersQueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await callWithDefaultParameters({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: callWithDefaultParametersQueryKey(options)\n});\n\nexport const callWithDefaultOptionalParametersMutation = (options?: Partial<Options<CallWithDefaultOptionalParametersData>>): UseMutationOptions<unknown, AxiosError<DefaultError>, Options<CallWithDefaultOptionalParametersData>> => {\n    const mutationOptions: UseMutationOptions<unknown, AxiosError<DefaultError>, Options<CallWithDefaultOptionalParametersData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await callWithDefaultOptionalParameters({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const callToTestOrderOfParamsMutation = (options?: Partial<Options<CallToTestOrderOfParamsData>>): UseMutationOptions<unknown, AxiosError<DefaultError>, Options<CallToTestOrderOfParamsData>> => {\n    const mutationOptions: UseMutationOptions<unknown, AxiosError<DefaultError>, Options<CallToTestOrderOfParamsData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await callToTestOrderOfParams({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const duplicateNameMutation = (options?: Partial<Options<DuplicateNameData>>): UseMutationOptions<unknown, AxiosError<DefaultError>, Options<DuplicateNameData>> => {\n    const mutationOptions: UseMutationOptions<unknown, AxiosError<DefaultError>, Options<DuplicateNameData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await duplicateName({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const duplicateName2QueryKey = (options?: Options<DuplicateName2Data>) => createQueryKey('duplicateName2', options);\n\nexport const duplicateName2Options = (options?: Options<DuplicateName2Data>) => queryOptions<unknown, AxiosError<DefaultError>, unknown, ReturnType<typeof duplicateName2QueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await duplicateName2({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: duplicateName2QueryKey(options)\n});\n\nexport const duplicateName3Mutation = (options?: Partial<Options<DuplicateName3Data>>): UseMutationOptions<unknown, AxiosError<DefaultError>, Options<DuplicateName3Data>> => {\n    const mutationOptions: UseMutationOptions<unknown, AxiosError<DefaultError>, Options<DuplicateName3Data>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await duplicateName3({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const duplicateName4Mutation = (options?: Partial<Options<DuplicateName4Data>>): UseMutationOptions<unknown, AxiosError<DefaultError>, Options<DuplicateName4Data>> => {\n    const mutationOptions: UseMutationOptions<unknown, AxiosError<DefaultError>, Options<DuplicateName4Data>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await duplicateName4({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const callWithNoContentResponseQueryKey = (options?: Options<CallWithNoContentResponseData>) => createQueryKey('callWithNoContentResponse', options);\n\nexport const callWithNoContentResponseOptions = (options?: Options<CallWithNoContentResponseData>) => queryOptions<CallWithNoContentResponseResponse, AxiosError<DefaultError>, CallWithNoContentResponseResponse, ReturnType<typeof callWithNoContentResponseQueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await callWithNoContentResponse({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: callWithNoContentResponseQueryKey(options)\n});\n\nexport const callWithResponseAndNoContentResponseQueryKey = (options?: Options<CallWithResponseAndNoContentResponseData>) => createQueryKey('callWithResponseAndNoContentResponse', options);\n\nexport const callWithResponseAndNoContentResponseOptions = (options?: Options<CallWithResponseAndNoContentResponseData>) => queryOptions<CallWithResponseAndNoContentResponseResponse, AxiosError<DefaultError>, CallWithResponseAndNoContentResponseResponse, ReturnType<typeof callWithResponseAndNoContentResponseQueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await callWithResponseAndNoContentResponse({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: callWithResponseAndNoContentResponseQueryKey(options)\n});\n\nexport const dummyAQueryKey = (options?: Options<DummyAData>) => createQueryKey('dummyA', options);\n\nexport const dummyAOptions = (options?: Options<DummyAData>) => queryOptions<DummyAResponse, AxiosError<DefaultError>, DummyAResponse, ReturnType<typeof dummyAQueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await dummyA({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: dummyAQueryKey(options)\n});\n\nexport const dummyBQueryKey = (options?: Options<DummyBData>) => createQueryKey('dummyB', options);\n\nexport const dummyBOptions = (options?: Options<DummyBData>) => queryOptions<DummyBResponse, AxiosError<DefaultError>, DummyBResponse, ReturnType<typeof dummyBQueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await dummyB({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: dummyBQueryKey(options)\n});\n\nexport const callWithResponseQueryKey = (options?: Options<CallWithResponseData>) => createQueryKey('callWithResponse', options);\n\nexport const callWithResponseOptions = (options?: Options<CallWithResponseData>) => queryOptions<CallWithResponseResponse, AxiosError<DefaultError>, CallWithResponseResponse, ReturnType<typeof callWithResponseQueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await callWithResponse({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: callWithResponseQueryKey(options)\n});\n\nexport const callWithDuplicateResponsesMutation = (options?: Partial<Options<CallWithDuplicateResponsesData>>): UseMutationOptions<CallWithDuplicateResponsesResponse, AxiosError<CallWithDuplicateResponsesError>, Options<CallWithDuplicateResponsesData>> => {\n    const mutationOptions: UseMutationOptions<CallWithDuplicateResponsesResponse, AxiosError<CallWithDuplicateResponsesError>, Options<CallWithDuplicateResponsesData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await callWithDuplicateResponses({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const callWithResponsesMutation = (options?: Partial<Options<CallWithResponsesData>>): UseMutationOptions<CallWithResponsesResponse, AxiosError<CallWithResponsesError>, Options<CallWithResponsesData>> => {\n    const mutationOptions: UseMutationOptions<CallWithResponsesResponse, AxiosError<CallWithResponsesError>, Options<CallWithResponsesData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await callWithResponses({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const collectionFormatQueryKey = (options: Options<CollectionFormatData>) => createQueryKey('collectionFormat', options);\n\nexport const collectionFormatOptions = (options: Options<CollectionFormatData>) => queryOptions<unknown, AxiosError<DefaultError>, unknown, ReturnType<typeof collectionFormatQueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await collectionFormat({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: collectionFormatQueryKey(options)\n});\n\nexport const typesQueryKey = (options: Options<TypesData>) => createQueryKey('types', options);\n\nexport const typesOptions = (options: Options<TypesData>) => queryOptions<TypesResponse, AxiosError<DefaultError>, TypesResponse, ReturnType<typeof typesQueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await types({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: typesQueryKey(options)\n});\n\nexport const uploadFileMutation = (options?: Partial<Options<UploadFileData>>): UseMutationOptions<UploadFileResponse, AxiosError<DefaultError>, Options<UploadFileData>> => {\n    const mutationOptions: UseMutationOptions<UploadFileResponse, AxiosError<DefaultError>, Options<UploadFileData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await uploadFile({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const fileResponseQueryKey = (options: Options<FileResponseData>) => createQueryKey('fileResponse', options);\n\nexport const fileResponseOptions = (options: Options<FileResponseData>) => queryOptions<FileResponseResponse, AxiosError<DefaultError>, FileResponseResponse, ReturnType<typeof fileResponseQueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await fileResponse({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: fileResponseQueryKey(options)\n});\n\nexport const complexTypesQueryKey = (options: Options<ComplexTypesData>) => createQueryKey('complexTypes', options);\n\nexport const complexTypesOptions = (options: Options<ComplexTypesData>) => queryOptions<ComplexTypesResponse, AxiosError<DefaultError>, ComplexTypesResponse, ReturnType<typeof complexTypesQueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await complexTypes({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: complexTypesQueryKey(options)\n});\n\nexport const multipartResponseQueryKey = (options?: Options<MultipartResponseData>) => createQueryKey('multipartResponse', options);\n\nexport const multipartResponseOptions = (options?: Options<MultipartResponseData>) => queryOptions<MultipartResponseResponse, AxiosError<DefaultError>, MultipartResponseResponse, ReturnType<typeof multipartResponseQueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await multipartResponse({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: multipartResponseQueryKey(options)\n});\n\nexport const multipartRequestMutation = (options?: Partial<Options<MultipartRequestData>>): UseMutationOptions<unknown, AxiosError<DefaultError>, Options<MultipartRequestData>> => {\n    const mutationOptions: UseMutationOptions<unknown, AxiosError<DefaultError>, Options<MultipartRequestData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await multipartRequest({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const complexParamsMutation = (options?: Partial<Options<ComplexParamsData>>): UseMutationOptions<ComplexParamsResponse, AxiosError<DefaultError>, Options<ComplexParamsData>> => {\n    const mutationOptions: UseMutationOptions<ComplexParamsResponse, AxiosError<DefaultError>, Options<ComplexParamsData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await complexParams({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const callWithResultFromHeaderMutation = (options?: Partial<Options<CallWithResultFromHeaderData>>): UseMutationOptions<unknown, AxiosError<DefaultError>, Options<CallWithResultFromHeaderData>> => {\n    const mutationOptions: UseMutationOptions<unknown, AxiosError<DefaultError>, Options<CallWithResultFromHeaderData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await callWithResultFromHeader({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const testErrorCodeMutation = (options?: Partial<Options<TestErrorCodeData>>): UseMutationOptions<unknown, AxiosError<DefaultError>, Options<TestErrorCodeData>> => {\n    const mutationOptions: UseMutationOptions<unknown, AxiosError<DefaultError>, Options<TestErrorCodeData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await testErrorCode({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const nonAsciiæøåÆøÅöôêÊ字符串Mutation = (options?: Partial<Options<NonAsciiæøåÆøÅöôêÊ字符串Data>>): UseMutationOptions<NonAsciiæøåÆøÅöôêÊ字符串Response, AxiosError<DefaultError>, Options<NonAsciiæøåÆøÅöôêÊ字符串Data>> => {\n    const mutationOptions: UseMutationOptions<NonAsciiæøåÆøÅöôêÊ字符串Response, AxiosError<DefaultError>, Options<NonAsciiæøåÆøÅöôêÊ字符串Data>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await nonAsciiæøåÆøÅöôêÊ字符串({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\n/**\n * Login User\n */\nexport const putWithFormUrlEncodedMutation = (options?: Partial<Options<PutWithFormUrlEncodedData>>): UseMutationOptions<unknown, AxiosError<DefaultError>, Options<PutWithFormUrlEncodedData>> => {\n    const mutationOptions: UseMutationOptions<unknown, AxiosError<DefaultError>, Options<PutWithFormUrlEncodedData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await putWithFormUrlEncoded({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/vue-query/axios/client/client.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { AxiosError, AxiosInstance, RawAxiosRequestHeaders } from 'axios';\nimport axios from 'axios';\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 } from './types.gen';\nimport { buildUrl, createConfig, mergeConfigs, mergeHeaders, setAuthParams } from './utils.gen';\n\nexport const createClient = (config: Config = {}): Client => {\n  let _config = mergeConfigs(createConfig(), config);\n\n  let instance: AxiosInstance;\n\n  if (_config.axios && !('Axios' in _config.axios)) {\n    instance = _config.axios;\n  } else {\n    // eslint-disable-next-line @typescript-eslint/no-unused-vars\n    const { auth, ...configWithoutAuth } = _config;\n    instance = axios.create(configWithoutAuth);\n  }\n\n  const getConfig = (): Config => ({ ..._config });\n\n  const setConfig = (config: Config): Config => {\n    _config = mergeConfigs(_config, config);\n    instance.defaults = {\n      ...instance.defaults,\n      ..._config,\n      // @ts-expect-error\n      headers: mergeHeaders(instance.defaults.headers, _config.headers),\n    };\n    return getConfig();\n  };\n\n  const beforeRequest = async (options: RequestOptions) => {\n    const opts = {\n      ..._config,\n      ...options,\n      axios: options.axios ?? _config.axios ?? instance,\n      headers: mergeHeaders(_config.headers, options.headers),\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.body = opts.bodySerializer(opts.body);\n    }\n\n    const url = buildUrl(opts);\n\n    return { opts, url };\n  };\n\n  // @ts-expect-error\n  const request: Client['request'] = async (options) => {\n    // @ts-expect-error\n    const { opts, url } = await beforeRequest(options);\n    try {\n      // assign Axios here for consistency with fetch\n      const _axios = opts.axios!;\n      // eslint-disable-next-line @typescript-eslint/no-unused-vars\n      const { auth, ...optsWithoutAuth } = opts;\n      const response = await _axios({\n        ...optsWithoutAuth,\n        baseURL: '', // the baseURL is already included in `url`\n        data: getValidRequestBody(opts),\n        headers: opts.headers as RawAxiosRequestHeaders,\n        // let `paramsSerializer()` handle query params if it exists\n        params: opts.paramsSerializer ? opts.query : undefined,\n        url,\n      });\n\n      let { data } = response;\n\n      if (opts.responseType === '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 {\n        ...response,\n        data: data ?? {},\n      };\n    } catch (error) {\n      const e = error as AxiosError;\n      if (opts.throwOnError) {\n        throw e;\n      }\n      // @ts-expect-error\n      e.error = e.response?.data ?? {};\n      return e;\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 Record<string, string>,\n      method,\n      serializedBody: getValidRequestBody(opts) as BodyInit | null | undefined,\n      // @ts-expect-error\n      signal: opts.signal,\n      url,\n    });\n  };\n\n  const _buildUrl: Client['buildUrl'] = (options) =>\n    buildUrl({ axios: instance, ..._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    instance,\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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/vue-query/axios/client/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type { Auth } from '../core/auth.gen';\nexport type { QuerySerializerOptions } from '../core/bodySerializer.gen';\nexport {\n  formDataBodySerializer,\n  jsonBodySerializer,\n  urlSearchParamsBodySerializer,\n} from '../core/bodySerializer.gen';\nexport { buildClientParams } from '../core/params.gen';\nexport { serializeQueryKeyValue } from '../core/queryKeySerializer.gen';\nexport { createClient } from './client.gen';\nexport type {\n  Client,\n  ClientOptions,\n  Config,\n  CreateClientConfig,\n  Options,\n  RequestOptions,\n  RequestResult,\n  TDataShape,\n} from './types.gen';\nexport { createConfig } from './utils.gen';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/vue-query/axios/client/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type {\n  AxiosError,\n  AxiosInstance,\n  AxiosRequestHeaders,\n  AxiosResponse,\n  AxiosStatic,\n  CreateAxiosDefaults,\n} from 'axios';\n\nimport type { Auth } from '../core/auth.gen';\nimport type {\n  ServerSentEventsOptions,\n  ServerSentEventsResult,\n} from '../core/serverSentEvents.gen';\nimport type { Client as CoreClient, Config as CoreConfig } from '../core/types.gen';\n\nexport interface Config<T extends ClientOptions = ClientOptions>\n  extends Omit<CreateAxiosDefaults, 'auth' | 'baseURL' | 'headers' | 'method'>, CoreConfig {\n  /**\n   * Axios implementation. You can use this option to provide either an\n   * `AxiosStatic` or an `AxiosInstance`.\n   *\n   * @default axios\n   */\n  axios?: AxiosStatic | AxiosInstance;\n  /**\n   * Base URL for all requests made by this client.\n   */\n  baseURL?: T['baseURL'];\n  /**\n   * An object containing any HTTP headers that you want to pre-populate your\n   * `Headers` object with.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/Headers/Headers#init See more}\n   */\n  headers?:\n    | AxiosRequestHeaders\n    | Record<\n        string,\n        string | number | boolean | (string | number | boolean)[] | null | undefined | unknown\n      >;\n  /**\n   * Throw an error instead of returning it in the response?\n   *\n   * @default false\n   */\n  throwOnError?: T['throwOnError'];\n}\n\nexport interface RequestOptions<\n  TData = unknown,\n  ThrowOnError extends boolean = boolean,\n  Url extends string = string,\n>\n  extends\n    Config<{\n      throwOnError: ThrowOnError;\n    }>,\n    Pick<\n      ServerSentEventsOptions<TData>,\n      | 'onRequest'\n      | 'onSseError'\n      | 'onSseEvent'\n      | 'sseDefaultRetryDelay'\n      | 'sseMaxRetryAttempts'\n      | 'sseMaxRetryDelay'\n    > {\n  /**\n   * Any body that you want to add to your request.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/fetch#body}\n   */\n  body?: unknown;\n  path?: Record<string, unknown>;\n  query?: Record<string, unknown>;\n  /**\n   * Security mechanism(s) to use for the request.\n   */\n  security?: ReadonlyArray<Auth>;\n  url: Url;\n}\n\nexport interface ClientOptions {\n  baseURL?: string;\n  throwOnError?: boolean;\n}\n\nexport type RequestResult<\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = boolean,\n> = ThrowOnError extends true\n  ? Promise<AxiosResponse<TData extends Record<string, unknown> ? TData[keyof TData] : TData>>\n  : Promise<\n      | (AxiosResponse<TData extends Record<string, unknown> ? TData[keyof TData] : TData> & {\n          error: undefined;\n        })\n      | (AxiosError<TError extends Record<string, unknown> ? TError[keyof TError] : TError> & {\n          data: undefined;\n          error: TError extends Record<string, unknown> ? TError[keyof TError] : TError;\n        })\n    >;\n\ntype MethodFn = <TData = unknown, TError = unknown, ThrowOnError extends boolean = false>(\n  options: Omit<RequestOptions<TData, ThrowOnError>, 'method'>,\n) => RequestResult<TData, TError, ThrowOnError>;\n\ntype SseFn = <TData = unknown, TError = unknown, ThrowOnError extends boolean = false>(\n  options: Omit<RequestOptions<TData, ThrowOnError>, 'method'>,\n) => Promise<ServerSentEventsResult<TData, TError>>;\n\ntype RequestFn = <TData = unknown, TError = unknown, ThrowOnError extends boolean = false>(\n  options: Omit<RequestOptions<TData, ThrowOnError>, 'method'> &\n    Pick<Required<RequestOptions<TData, ThrowOnError>>, 'method'>,\n) => RequestResult<TData, TError, ThrowOnError>;\n\ntype BuildUrlFn = <\n  TData extends {\n    body?: unknown;\n    path?: Record<string, unknown>;\n    query?: Record<string, unknown>;\n    url: string;\n  },\n>(\n  options: TData & Options<TData>,\n) => string;\n\nexport type Client = CoreClient<RequestFn, Config, MethodFn, BuildUrlFn, SseFn> & {\n  instance: AxiosInstance;\n};\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 = ClientOptions> = (\n  override?: Config<ClientOptions & T>,\n) => Config<Required<ClientOptions> & T>;\n\nexport interface TDataShape {\n  body?: unknown;\n  headers?: unknown;\n  path?: unknown;\n  query?: unknown;\n  url: string;\n}\n\ntype OmitKeys<T, K> = Pick<T, Exclude<keyof T, K>>;\n\nexport type Options<\n  TData extends TDataShape = TDataShape,\n  ThrowOnError extends boolean = boolean,\n  TResponse = unknown,\n> = OmitKeys<RequestOptions<TResponse, ThrowOnError>, 'body' | 'path' | 'query' | 'url'> &\n  ([TData] extends [never] ? unknown : Omit<TData, 'url'>);\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/vue-query/axios/client/utils.gen.ts",
    "content": "// 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 {\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\nconst checkForExistence = (\n  options: Pick<RequestOptions, 'auth' | 'query'> & {\n    headers: Record<any, unknown>;\n  },\n  name?: string,\n): boolean => {\n  if (!name) {\n    return false;\n  }\n  if (name in options.headers || options.query?.[name]) {\n    return true;\n  }\n  if (\n    'Cookie' in options.headers &&\n    options.headers['Cookie'] &&\n    typeof options.headers['Cookie'] === 'string'\n  ) {\n    return options.headers['Cookie'].includes(`${name}=`);\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: Record<any, unknown>;\n  }) => {\n  for (const auth of security) {\n    if (checkForExistence(options, auth.name)) {\n      continue;\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        const value = `${name}=${token}`;\n        if ('Cookie' in options.headers && options.headers['Cookie']) {\n          options.headers['Cookie'] = `${options.headers['Cookie']}; ${value}`;\n        } else {\n          options.headers['Cookie'] = value;\n        }\n        break;\n      }\n      case 'header':\n      default:\n        options.headers[name] = token;\n        break;\n    }\n  }\n};\n\nexport const buildUrl: Client['buildUrl'] = (options) => {\n  const instanceBaseUrl = options.axios?.defaults?.baseURL;\n\n  const baseUrl =\n    !!options.baseURL && typeof options.baseURL === 'string' ? options.baseURL : instanceBaseUrl;\n\n  return getUrl({\n    baseUrl: baseUrl as string,\n    path: options.path,\n    // let `paramsSerializer()` handle query params if it exists\n    query: !options.paramsSerializer ? options.query : undefined,\n    querySerializer:\n      typeof options.querySerializer === 'function'\n        ? options.querySerializer\n        : createQuerySerializer(options.querySerializer),\n    url: options.url,\n  });\n};\n\nexport const mergeConfigs = (a: Config, b: Config): Config => {\n  const config = { ...a, ...b };\n  config.headers = mergeHeaders(a.headers, b.headers);\n  return config;\n};\n\n/**\n * Special Axios headers keywords allowing to set headers by request method.\n */\nexport const axiosHeadersKeywords = [\n  'common',\n  'delete',\n  'get',\n  'head',\n  'patch',\n  'post',\n  'put',\n] as const;\n\nexport const mergeHeaders = (\n  ...headers: Array<Required<Config>['headers'] | undefined>\n): Record<any, unknown> => {\n  const mergedHeaders: Record<any, unknown> = {};\n  for (const header of headers) {\n    if (!header || typeof header !== 'object') {\n      continue;\n    }\n\n    const iterator = Object.entries(header);\n\n    for (const [key, value] of iterator) {\n      if (\n        axiosHeadersKeywords.includes(key as (typeof axiosHeadersKeywords)[number]) &&\n        typeof value === 'object'\n      ) {\n        mergedHeaders[key] = {\n          ...(mergedHeaders[key] as Record<any, unknown>),\n          ...value,\n        };\n      } else if (value === null) {\n        delete mergedHeaders[key];\n      } else if (Array.isArray(value)) {\n        for (const v of value) {\n          // @ts-expect-error\n          mergedHeaders[key] = [...(mergedHeaders[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[key] = typeof value === 'object' ? JSON.stringify(value) : (value as string);\n      }\n    }\n  }\n  return mergedHeaders;\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  ...override,\n});\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/vue-query/axios/client.gen.ts",
    "content": "// 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: 'http://localhost:3000/base' }));\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/vue-query/axios/core/auth.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/vue-query/axios/core/bodySerializer.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/vue-query/axios/core/params.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/vue-query/axios/core/pathSerializer.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/vue-query/axios/core/queryKeySerializer.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\n/**\n * JSON-friendly union that mirrors what Pinia Colada can hash.\n */\nexport type JsonValue =\n  | null\n  | string\n  | number\n  | boolean\n  | JsonValue[]\n  | { [key: string]: JsonValue };\n\n/**\n * Replacer that converts non-JSON values (bigint, Date, etc.) to safe substitutes.\n */\nexport const queryKeyJsonReplacer = (_key: string, value: unknown) => {\n  if (value === undefined || typeof value === 'function' || typeof value === 'symbol') {\n    return undefined;\n  }\n  if (typeof value === 'bigint') {\n    return value.toString();\n  }\n  if (value instanceof Date) {\n    return value.toISOString();\n  }\n  return value;\n};\n\n/**\n * Safely stringifies a value and parses it back into a JsonValue.\n */\nexport const stringifyToJsonValue = (input: unknown): JsonValue | undefined => {\n  try {\n    const json = JSON.stringify(input, queryKeyJsonReplacer);\n    if (json === undefined) {\n      return undefined;\n    }\n    return JSON.parse(json) as JsonValue;\n  } catch {\n    return undefined;\n  }\n};\n\n/**\n * Detects plain objects (including objects with a null prototype).\n */\nconst isPlainObject = (value: unknown): value is Record<string, unknown> => {\n  if (value === null || typeof value !== 'object') {\n    return false;\n  }\n  const prototype = Object.getPrototypeOf(value as object);\n  return prototype === Object.prototype || prototype === null;\n};\n\n/**\n * Turns URLSearchParams into a sorted JSON object for deterministic keys.\n */\nconst serializeSearchParams = (params: URLSearchParams): JsonValue => {\n  const entries = Array.from(params.entries()).sort(([a], [b]) => a.localeCompare(b));\n  const result: Record<string, JsonValue> = {};\n\n  for (const [key, value] of entries) {\n    const existing = result[key];\n    if (existing === undefined) {\n      result[key] = value;\n      continue;\n    }\n\n    if (Array.isArray(existing)) {\n      (existing as string[]).push(value);\n    } else {\n      result[key] = [existing, value];\n    }\n  }\n\n  return result;\n};\n\n/**\n * Normalizes any accepted value into a JSON-friendly shape for query keys.\n */\nexport const serializeQueryKeyValue = (value: unknown): JsonValue | undefined => {\n  if (value === null) {\n    return null;\n  }\n\n  if (typeof value === 'string' || typeof value === 'number' || typeof value === 'boolean') {\n    return value;\n  }\n\n  if (value === undefined || typeof value === 'function' || typeof value === 'symbol') {\n    return undefined;\n  }\n\n  if (typeof value === 'bigint') {\n    return value.toString();\n  }\n\n  if (value instanceof Date) {\n    return value.toISOString();\n  }\n\n  if (Array.isArray(value)) {\n    return stringifyToJsonValue(value);\n  }\n\n  if (typeof URLSearchParams !== 'undefined' && value instanceof URLSearchParams) {\n    return serializeSearchParams(value);\n  }\n\n  if (isPlainObject(value)) {\n    return stringifyToJsonValue(value);\n  }\n\n  return undefined;\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/vue-query/axios/core/serverSentEvents.gen.ts",
    "content": "// 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 const 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            // Normalize line endings: CRLF -> LF, then CR -> LF\n            buffer = buffer.replace(/\\r\\n/g, '\\n').replace(/\\r/g, '\\n');\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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/vue-query/axios/core/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { Auth, AuthToken } from './auth.gen';\nimport type { BodySerializer, QuerySerializer, QuerySerializerOptions } from './bodySerializer.gen';\n\nexport type HttpMethod =\n  | 'connect'\n  | 'delete'\n  | 'get'\n  | 'head'\n  | 'options'\n  | 'patch'\n  | 'post'\n  | 'put'\n  | 'trace';\n\nexport type Client<\n  RequestFn = never,\n  Config = unknown,\n  MethodFn = never,\n  BuildUrlFn = never,\n  SseFn = never,\n> = {\n  /**\n   * Returns the final request URL.\n   */\n  buildUrl: BuildUrlFn;\n  getConfig: () => Config;\n  request: RequestFn;\n  setConfig: (config: Config) => Config;\n} & {\n  [K in HttpMethod]: MethodFn;\n} & ([SseFn] extends [never] ? { sse?: never } : { sse: { [K in HttpMethod]: SseFn } });\n\nexport interface Config {\n  /**\n   * Auth token or a function returning auth token. The resolved value will be\n   * added to the request payload as defined by its `security` array.\n   */\n  auth?: ((auth: Auth) => Promise<AuthToken> | AuthToken) | AuthToken;\n  /**\n   * A function for serializing request body parameter. By default,\n   * {@link JSON.stringify()} will be used.\n   */\n  bodySerializer?: BodySerializer | null;\n  /**\n   * An object containing any HTTP headers that you want to pre-populate your\n   * `Headers` object with.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/Headers/Headers#init See more}\n   */\n  headers?:\n    | RequestInit['headers']\n    | Record<\n        string,\n        string | number | boolean | (string | number | boolean)[] | null | undefined | unknown\n      >;\n  /**\n   * The request method.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/fetch#method See more}\n   */\n  method?: Uppercase<HttpMethod>;\n  /**\n   * A function for serializing request query parameters. By default, arrays\n   * will be exploded in form style, objects will be exploded in deepObject\n   * style, and reserved characters are percent-encoded.\n   *\n   * This method will have no effect if the native `paramsSerializer()` Axios\n   * API function is used.\n   *\n   * {@link https://swagger.io/docs/specification/serialization/#query View examples}\n   */\n  querySerializer?: QuerySerializer | QuerySerializerOptions;\n  /**\n   * A function validating request data. This is useful if you want to ensure\n   * the request conforms to the desired shape, so it can be safely sent to\n   * the server.\n   */\n  requestValidator?: (data: unknown) => Promise<unknown>;\n  /**\n   * A function transforming response data before it's returned. This is useful\n   * for post-processing data, e.g. converting ISO strings into Date objects.\n   */\n  responseTransformer?: (data: unknown) => Promise<unknown>;\n  /**\n   * A function validating response data. This is useful if you want to ensure\n   * the response conforms to the desired shape, so it can be safely passed to\n   * the transformers and returned to the user.\n   */\n  responseValidator?: (data: unknown) => Promise<unknown>;\n}\n\ntype IsExactlyNeverOrNeverUndefined<T> = [T] extends [never]\n  ? true\n  : [T] extends [never | undefined]\n    ? [undefined] extends [T]\n      ? false\n      : true\n    : false;\n\nexport type OmitNever<T extends Record<string, unknown>> = {\n  [K in keyof T as IsExactlyNeverOrNeverUndefined<T[K]> extends true ? never : K]: T[K];\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/vue-query/axios/core/utils.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/vue-query/axios/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport { apiVVersionODataControllerCount, callToTestOrderOfParams, callWithDefaultOptionalParameters, callWithDefaultParameters, callWithDescriptions, callWithDuplicateResponses, callWithNoContentResponse, callWithParameters, callWithResponse, callWithResponseAndNoContentResponse, callWithResponses, callWithResultFromHeader, callWithWeirdParameterNames, collectionFormat, complexParams, complexTypes, deleteCallWithoutParametersAndResponse, deleteFoo, deprecatedCall, dummyA, dummyB, duplicateName, duplicateName2, duplicateName3, duplicateName4, export_, fileResponse, fooWow, getApiVbyApiVersionSimpleOperation, getCallWithOptionalParam, getCallWithoutParametersAndResponse, headCallWithoutParametersAndResponse, import_, multipartRequest, multipartResponse, nonAsciiæøåÆøÅöôêÊ字符串, type Options, optionsCallWithoutParametersAndResponse, patchApiVbyApiVersionNoTag, patchCallWithoutParametersAndResponse, postApiVbyApiVersionFormData, postApiVbyApiVersionRequestBody, postCallWithOptionalParam, postCallWithoutParametersAndResponse, putCallWithoutParametersAndResponse, putWithFormUrlEncoded, testErrorCode, types, uploadFile } from './sdk.gen';\nexport type { _3eNum1Период, _400, AdditionalPropertiesIntegerIssue, AdditionalPropertiesUnknownIssue, AdditionalPropertiesUnknownIssue2, AdditionalPropertiesUnknownIssue3, AdditionalPropertiesUnknownIssueWritable, AnyOfAnyAndNull, AnyOfArrays, ApiVVersionODataControllerCountData, ApiVVersionODataControllerCountResponse, ApiVVersionODataControllerCountResponses, ArrayWithAnyOfProperties, ArrayWithArray, ArrayWithBooleans, ArrayWithNumbers, ArrayWithProperties, ArrayWithReferences, ArrayWithStrings, CallToTestOrderOfParamsData, CallWithDefaultOptionalParametersData, CallWithDefaultParametersData, CallWithDescriptionsData, CallWithDuplicateResponsesData, CallWithDuplicateResponsesError, CallWithDuplicateResponsesErrors, CallWithDuplicateResponsesResponse, CallWithDuplicateResponsesResponses, CallWithNoContentResponseData, CallWithNoContentResponseResponse, CallWithNoContentResponseResponses, CallWithParametersData, CallWithResponseAndNoContentResponseData, CallWithResponseAndNoContentResponseResponse, CallWithResponseAndNoContentResponseResponses, CallWithResponseData, CallWithResponseResponse, CallWithResponseResponses, CallWithResponsesData, CallWithResponsesError, CallWithResponsesErrors, CallWithResponsesResponse, CallWithResponsesResponses, CallWithResultFromHeaderData, CallWithResultFromHeaderErrors, CallWithResultFromHeaderResponses, CallWithWeirdParameterNamesData, CamelCaseCommentWithBreaks, CharactersInDescription, ClientOptions, CollectionFormatData, CommentWithBackticks, CommentWithBackticksAndQuotes, CommentWithBreaks, CommentWithExpressionPlaceholders, CommentWithQuotes, CommentWithReservedCharacters, CommentWithSlashes, ComplexParamsData, ComplexParamsResponse, ComplexParamsResponses, ComplexTypesData, ComplexTypesErrors, ComplexTypesResponse, ComplexTypesResponses, CompositionBaseModel, CompositionExtendedModel, CompositionWithAllOfAndNullable, CompositionWithAnyOf, CompositionWithAnyOfAndNullable, CompositionWithAnyOfAnonymous, CompositionWithNestedAnyAndTypeNull, CompositionWithNestedAnyOfAndNull, CompositionWithOneOf, CompositionWithOneOfAndComplexArrayDictionary, CompositionWithOneOfAndNullable, CompositionWithOneOfAndProperties, CompositionWithOneOfAndSimpleArrayDictionary, CompositionWithOneOfAndSimpleDictionary, CompositionWithOneOfAnonymous, CompositionWithOneOfDiscriminator, ConstValue, Default, DeleteCallWithoutParametersAndResponseData, DeleteFooData, DeleteFooData2, DeleteFooData3, DeprecatedCallData, DeprecatedModel, DictionaryWithArray, DictionaryWithDictionary, DictionaryWithProperties, DictionaryWithPropertiesAndAdditionalProperties, DictionaryWithReference, DictionaryWithString, DummyAData, DummyAResponse, DummyAResponses, DummyBData, DummyBResponse, DummyBResponses, DuplicateName2Data, DuplicateName3Data, DuplicateName4Data, DuplicateNameData, EnumFromDescription, EnumWithExtensions, EnumWithNumbers, EnumWithReplacedCharacters, EnumWithStrings, EnumWithXEnumNames, ExportData, ExternalRefA, ExternalRefB, ExternalSharedModel, File, FileResponseData, FileResponseResponse, FileResponseResponses, FileWritable, FooWowData, FooWowResponses, FreeFormObjectWithAdditionalPropertiesEqEmptyObject, FreeFormObjectWithAdditionalPropertiesEqTrue, FreeFormObjectWithoutAdditionalProperties, GenericSchemaDuplicateIssue1SystemBoolean, GenericSchemaDuplicateIssue1SystemBooleanWritable, GenericSchemaDuplicateIssue1SystemString, GenericSchemaDuplicateIssue1SystemStringWritable, GetApiVbyApiVersionSimpleOperationData, GetApiVbyApiVersionSimpleOperationError, GetApiVbyApiVersionSimpleOperationErrors, GetApiVbyApiVersionSimpleOperationResponse, GetApiVbyApiVersionSimpleOperationResponses, GetCallWithOptionalParamData, GetCallWithoutParametersAndResponseData, HeadCallWithoutParametersAndResponseData, Import, ImportData, ImportResponse, ImportResponses, IoK8sApimachineryPkgApisMetaV1DeleteOptions, IoK8sApimachineryPkgApisMetaV1Preconditions, ModelCircle, ModelFromZendesk, ModelSquare, ModelThatExtends, ModelThatExtendsExtends, ModelWithAdditionalPropertiesEqTrue, ModelWithAdditionalPropertiesRef, ModelWithAnyOfConstantSizeArray, ModelWithAnyOfConstantSizeArrayAndIntersect, ModelWithAnyOfConstantSizeArrayNullable, ModelWithAnyOfConstantSizeArrayWithNSizeAndOptions, ModelWithAnyOfConstantSizeArrayWithNSizeAndOptionsWritable, ModelWithArray, ModelWithArrayReadOnlyAndWriteOnly, ModelWithArrayReadOnlyAndWriteOnlyWritable, ModelWithBackticksInDescription, ModelWithBoolean, ModelWithCircularReference, ModelWithConst, ModelWithConstantSizeArray, ModelWithDictionary, ModelWithDuplicateImports, ModelWithDuplicateProperties, ModelWithEnum, ModelWithEnumFromDescription, ModelWithEnumWithHyphen, ModelWithInteger, ModelWithNestedArrayEnums, ModelWithNestedArrayEnumsData, ModelWithNestedArrayEnumsDataBar, ModelWithNestedArrayEnumsDataFoo, ModelWithNestedCompositionEnums, ModelWithNestedEnums, ModelWithNestedProperties, ModelWithNullableObject, ModelWithNullableString, ModelWithNumericEnumUnion, ModelWithOneOfAndProperties, ModelWithOneOfEnum, ModelWithOrderedProperties, ModelWithPattern, ModelWithPatternWritable, ModelWithPrefixItemsConstantSizeArray, ModelWithProperties, ModelWithPropertiesWritable, ModelWithReadOnlyAndWriteOnly, ModelWithReadOnlyAndWriteOnlyWritable, ModelWithReference, ModelWithReferenceWritable, ModelWithString, ModelWithStringError, MultipartRequestData, MultipartResponseData, MultipartResponseResponse, MultipartResponseResponses, NestedAnyOfArraysNullable, NonAsciiæøåÆøÅöôêÊ字符串Data, NonAsciiæøåÆøÅöôêÊ字符串Response, NonAsciiæøåÆøÅöôêÊ字符串Responses, NonAsciiStringæøåÆøÅöôêÊ字符串, NullableObject, OneOfAllOfIssue, OneOfAllOfIssueWritable, OptionsCallWithoutParametersAndResponseData, Pageable, ParameterSimpleParameterUnused, PatchApiVbyApiVersionNoTagData, PatchApiVbyApiVersionNoTagResponses, PatchCallWithoutParametersAndResponseData, PostApiVbyApiVersionFormDataData, PostApiVbyApiVersionRequestBodyData, PostCallWithOptionalParamData, PostCallWithOptionalParamResponse, PostCallWithOptionalParamResponses, PostCallWithoutParametersAndResponseData, PostServiceWithEmptyTagResponse, PostServiceWithEmptyTagResponse2, PutCallWithoutParametersAndResponseData, PutWithFormUrlEncodedData, SchemaWithFormRestrictedKeys, SimpleBoolean, SimpleFile, SimpleFormData, SimpleInteger, SimpleParameter, SimpleReference, SimpleRequestBody, SimpleString, SimpleStringWithPattern, TestErrorCodeData, TestErrorCodeErrors, TestErrorCodeResponses, TypesData, TypesResponse, TypesResponses, UploadFileData, UploadFileResponse, UploadFileResponses, XFooBar } from './types.gen';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/vue-query/axios/sdk.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport { type Client, formDataBodySerializer, type Options as Options2, type TDataShape, urlSearchParamsBodySerializer } from './client';\nimport { client } from './client.gen';\nimport type { ApiVVersionODataControllerCountData, ApiVVersionODataControllerCountResponses, CallToTestOrderOfParamsData, CallWithDefaultOptionalParametersData, CallWithDefaultParametersData, CallWithDescriptionsData, CallWithDuplicateResponsesData, CallWithDuplicateResponsesErrors, CallWithDuplicateResponsesResponses, CallWithNoContentResponseData, CallWithNoContentResponseResponses, CallWithParametersData, CallWithResponseAndNoContentResponseData, CallWithResponseAndNoContentResponseResponses, CallWithResponseData, CallWithResponseResponses, CallWithResponsesData, CallWithResponsesErrors, CallWithResponsesResponses, CallWithResultFromHeaderData, CallWithResultFromHeaderErrors, CallWithResultFromHeaderResponses, CallWithWeirdParameterNamesData, CollectionFormatData, ComplexParamsData, ComplexParamsResponses, ComplexTypesData, ComplexTypesErrors, ComplexTypesResponses, DeleteCallWithoutParametersAndResponseData, DeleteFooData3, DeprecatedCallData, DummyAData, DummyAResponses, DummyBData, DummyBResponses, DuplicateName2Data, DuplicateName3Data, DuplicateName4Data, DuplicateNameData, ExportData, FileResponseData, FileResponseResponses, FooWowData, FooWowResponses, GetApiVbyApiVersionSimpleOperationData, GetApiVbyApiVersionSimpleOperationErrors, GetApiVbyApiVersionSimpleOperationResponses, GetCallWithOptionalParamData, GetCallWithoutParametersAndResponseData, HeadCallWithoutParametersAndResponseData, ImportData, ImportResponses, MultipartRequestData, MultipartResponseData, MultipartResponseResponses, NonAsciiæøåÆøÅöôêÊ字符串Data, NonAsciiæøåÆøÅöôêÊ字符串Responses, OptionsCallWithoutParametersAndResponseData, PatchApiVbyApiVersionNoTagData, PatchApiVbyApiVersionNoTagResponses, PatchCallWithoutParametersAndResponseData, PostApiVbyApiVersionFormDataData, PostApiVbyApiVersionRequestBodyData, PostCallWithOptionalParamData, PostCallWithOptionalParamResponses, PostCallWithoutParametersAndResponseData, PutCallWithoutParametersAndResponseData, PutWithFormUrlEncodedData, TestErrorCodeData, TestErrorCodeErrors, TestErrorCodeResponses, TypesData, TypesResponses, UploadFileData, UploadFileResponses } from './types.gen';\n\nexport type Options<TData extends TDataShape = TDataShape, ThrowOnError extends boolean = boolean> = Options2<TData, ThrowOnError> & {\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\nexport const export_ = <ThrowOnError extends boolean = false>(options?: Options<ExportData, ThrowOnError>) => (options?.client ?? client).get<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/no+tag', ...options });\n\nexport const patchApiVbyApiVersionNoTag = <ThrowOnError extends boolean = false>(options?: Options<PatchApiVbyApiVersionNoTagData, ThrowOnError>) => (options?.client ?? client).patch<PatchApiVbyApiVersionNoTagResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/no+tag', ...options });\n\nexport const import_ = <ThrowOnError extends boolean = false>(options: Options<ImportData, ThrowOnError>) => (options.client ?? client).post<ImportResponses, unknown, ThrowOnError>({\n    responseType: 'json',\n    url: '/api/v{api-version}/no+tag',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options.headers\n    }\n});\n\nexport const fooWow = <ThrowOnError extends boolean = false>(options?: Options<FooWowData, ThrowOnError>) => (options?.client ?? client).put<FooWowResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/no+tag', ...options });\n\nexport const apiVVersionODataControllerCount = <ThrowOnError extends boolean = false>(options?: Options<ApiVVersionODataControllerCountData, ThrowOnError>) => (options?.client ?? client).get<ApiVVersionODataControllerCountResponses, unknown, ThrowOnError>({\n    responseType: 'json',\n    url: '/api/v{api-version}/simple/$count',\n    ...options\n});\n\nexport const getApiVbyApiVersionSimpleOperation = <ThrowOnError extends boolean = false>(options: Options<GetApiVbyApiVersionSimpleOperationData, ThrowOnError>) => (options.client ?? client).get<GetApiVbyApiVersionSimpleOperationResponses, GetApiVbyApiVersionSimpleOperationErrors, ThrowOnError>({\n    responseType: 'json',\n    url: '/api/v{api-version}/simple:operation',\n    ...options\n});\n\nexport const deleteCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<DeleteCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).delete<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const getCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<GetCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).get<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const headCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<HeadCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).head<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const optionsCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<OptionsCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).options<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const patchCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<PatchCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).patch<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const postCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<PostCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).post<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const putCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<PutCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).put<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const deleteFoo = <ThrowOnError extends boolean = false>(options: Options<DeleteFooData3, ThrowOnError>) => (options.client ?? client).delete<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/foo/{foo_param}/bar/{BarParam}', ...options });\n\nexport const callWithDescriptions = <ThrowOnError extends boolean = false>(options?: Options<CallWithDescriptionsData, ThrowOnError>) => (options?.client ?? client).post<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/descriptions', ...options });\n\n/**\n * @deprecated\n */\nexport const deprecatedCall = <ThrowOnError extends boolean = false>(options: Options<DeprecatedCallData, ThrowOnError>) => (options.client ?? client).post<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/parameters/deprecated', ...options });\n\nexport const callWithParameters = <ThrowOnError extends boolean = false>(options: Options<CallWithParametersData, ThrowOnError>) => (options.client ?? client).post<unknown, unknown, ThrowOnError>({\n    url: '/api/v{api-version}/parameters/{parameterPath}',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options.headers\n    }\n});\n\nexport const callWithWeirdParameterNames = <ThrowOnError extends boolean = false>(options: Options<CallWithWeirdParameterNamesData, ThrowOnError>) => (options.client ?? client).post<unknown, unknown, ThrowOnError>({\n    url: '/api/v{api-version}/parameters/{parameter.path.1}/{parameter-path-2}/{PARAMETER-PATH-3}',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options.headers\n    }\n});\n\nexport const getCallWithOptionalParam = <ThrowOnError extends boolean = false>(options: Options<GetCallWithOptionalParamData, ThrowOnError>) => (options.client ?? client).get<unknown, unknown, ThrowOnError>({\n    url: '/api/v{api-version}/parameters',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options.headers\n    }\n});\n\nexport const postCallWithOptionalParam = <ThrowOnError extends boolean = false>(options: Options<PostCallWithOptionalParamData, ThrowOnError>) => (options.client ?? client).post<PostCallWithOptionalParamResponses, unknown, ThrowOnError>({\n    responseType: 'json',\n    url: '/api/v{api-version}/parameters',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options.headers\n    }\n});\n\nexport const postApiVbyApiVersionRequestBody = <ThrowOnError extends boolean = false>(options?: Options<PostApiVbyApiVersionRequestBodyData, ThrowOnError>) => (options?.client ?? client).post<unknown, unknown, ThrowOnError>({\n    url: '/api/v{api-version}/requestBody',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options?.headers\n    }\n});\n\nexport const postApiVbyApiVersionFormData = <ThrowOnError extends boolean = false>(options?: Options<PostApiVbyApiVersionFormDataData, ThrowOnError>) => (options?.client ?? client).post<unknown, unknown, ThrowOnError>({\n    ...formDataBodySerializer,\n    url: '/api/v{api-version}/formData',\n    ...options,\n    headers: {\n        'Content-Type': null,\n        ...options?.headers\n    }\n});\n\nexport const callWithDefaultParameters = <ThrowOnError extends boolean = false>(options?: Options<CallWithDefaultParametersData, ThrowOnError>) => (options?.client ?? client).get<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/defaults', ...options });\n\nexport const callWithDefaultOptionalParameters = <ThrowOnError extends boolean = false>(options?: Options<CallWithDefaultOptionalParametersData, ThrowOnError>) => (options?.client ?? client).post<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/defaults', ...options });\n\nexport const callToTestOrderOfParams = <ThrowOnError extends boolean = false>(options: Options<CallToTestOrderOfParamsData, ThrowOnError>) => (options.client ?? client).put<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/defaults', ...options });\n\nexport const duplicateName = <ThrowOnError extends boolean = false>(options?: Options<DuplicateNameData, ThrowOnError>) => (options?.client ?? client).delete<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/duplicate', ...options });\n\nexport const duplicateName2 = <ThrowOnError extends boolean = false>(options?: Options<DuplicateName2Data, ThrowOnError>) => (options?.client ?? client).get<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/duplicate', ...options });\n\nexport const duplicateName3 = <ThrowOnError extends boolean = false>(options?: Options<DuplicateName3Data, ThrowOnError>) => (options?.client ?? client).post<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/duplicate', ...options });\n\nexport const duplicateName4 = <ThrowOnError extends boolean = false>(options?: Options<DuplicateName4Data, ThrowOnError>) => (options?.client ?? client).put<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/duplicate', ...options });\n\nexport const callWithNoContentResponse = <ThrowOnError extends boolean = false>(options?: Options<CallWithNoContentResponseData, ThrowOnError>) => (options?.client ?? client).get<CallWithNoContentResponseResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/no-content', ...options });\n\nexport const callWithResponseAndNoContentResponse = <ThrowOnError extends boolean = false>(options?: Options<CallWithResponseAndNoContentResponseData, ThrowOnError>) => (options?.client ?? client).get<CallWithResponseAndNoContentResponseResponses, unknown, ThrowOnError>({\n    responseType: 'json',\n    url: '/api/v{api-version}/multiple-tags/response-and-no-content',\n    ...options\n});\n\nexport const dummyA = <ThrowOnError extends boolean = false>(options?: Options<DummyAData, ThrowOnError>) => (options?.client ?? client).get<DummyAResponses, unknown, ThrowOnError>({\n    responseType: 'json',\n    url: '/api/v{api-version}/multiple-tags/a',\n    ...options\n});\n\nexport const dummyB = <ThrowOnError extends boolean = false>(options?: Options<DummyBData, ThrowOnError>) => (options?.client ?? client).get<DummyBResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/multiple-tags/b', ...options });\n\nexport const callWithResponse = <ThrowOnError extends boolean = false>(options?: Options<CallWithResponseData, ThrowOnError>) => (options?.client ?? client).get<CallWithResponseResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/response', ...options });\n\nexport const callWithDuplicateResponses = <ThrowOnError extends boolean = false>(options?: Options<CallWithDuplicateResponsesData, ThrowOnError>) => (options?.client ?? client).post<CallWithDuplicateResponsesResponses, CallWithDuplicateResponsesErrors, ThrowOnError>({\n    responseType: 'json',\n    url: '/api/v{api-version}/response',\n    ...options\n});\n\nexport const callWithResponses = <ThrowOnError extends boolean = false>(options?: Options<CallWithResponsesData, ThrowOnError>) => (options?.client ?? client).put<CallWithResponsesResponses, CallWithResponsesErrors, ThrowOnError>({\n    responseType: 'json',\n    url: '/api/v{api-version}/response',\n    ...options\n});\n\nexport const collectionFormat = <ThrowOnError extends boolean = false>(options: Options<CollectionFormatData, ThrowOnError>) => (options.client ?? client).get<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/collectionFormat', ...options });\n\nexport const types = <ThrowOnError extends boolean = false>(options: Options<TypesData, ThrowOnError>) => (options.client ?? client).get<TypesResponses, unknown, ThrowOnError>({\n    responseType: 'json',\n    url: '/api/v{api-version}/types',\n    ...options\n});\n\nexport const uploadFile = <ThrowOnError extends boolean = false>(options: Options<UploadFileData, ThrowOnError>) => (options.client ?? client).post<UploadFileResponses, unknown, ThrowOnError>({\n    ...urlSearchParamsBodySerializer,\n    responseType: 'json',\n    url: '/api/v{api-version}/upload',\n    ...options,\n    headers: {\n        'Content-Type': 'application/x-www-form-urlencoded',\n        ...options.headers\n    }\n});\n\nexport const fileResponse = <ThrowOnError extends boolean = false>(options: Options<FileResponseData, ThrowOnError>) => (options.client ?? client).get<FileResponseResponses, unknown, ThrowOnError>({\n    responseType: 'blob',\n    url: '/api/v{api-version}/file/{id}',\n    ...options\n});\n\nexport const complexTypes = <ThrowOnError extends boolean = false>(options: Options<ComplexTypesData, ThrowOnError>) => (options.client ?? client).get<ComplexTypesResponses, ComplexTypesErrors, ThrowOnError>({\n    querySerializer: { parameters: { parameterObject: { object: { style: 'form' } } } },\n    responseType: 'json',\n    url: '/api/v{api-version}/complex',\n    ...options\n});\n\nexport const multipartResponse = <ThrowOnError extends boolean = false>(options?: Options<MultipartResponseData, ThrowOnError>) => (options?.client ?? client).get<MultipartResponseResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/multipart', ...options });\n\nexport const multipartRequest = <ThrowOnError extends boolean = false>(options?: Options<MultipartRequestData, ThrowOnError>) => (options?.client ?? client).post<unknown, unknown, ThrowOnError>({\n    ...formDataBodySerializer,\n    url: '/api/v{api-version}/multipart',\n    ...options,\n    headers: {\n        'Content-Type': null,\n        ...options?.headers\n    }\n});\n\nexport const complexParams = <ThrowOnError extends boolean = false>(options: Options<ComplexParamsData, ThrowOnError>) => (options.client ?? client).put<ComplexParamsResponses, unknown, ThrowOnError>({\n    responseType: 'json',\n    url: '/api/v{api-version}/complex/{id}',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json-patch+json',\n        ...options.headers\n    }\n});\n\nexport const callWithResultFromHeader = <ThrowOnError extends boolean = false>(options?: Options<CallWithResultFromHeaderData, ThrowOnError>) => (options?.client ?? client).post<CallWithResultFromHeaderResponses, CallWithResultFromHeaderErrors, ThrowOnError>({ url: '/api/v{api-version}/header', ...options });\n\nexport const testErrorCode = <ThrowOnError extends boolean = false>(options: Options<TestErrorCodeData, ThrowOnError>) => (options.client ?? client).post<TestErrorCodeResponses, TestErrorCodeErrors, ThrowOnError>({ url: '/api/v{api-version}/error', ...options });\n\nexport const nonAsciiæøåÆøÅöôêÊ字符串 = <ThrowOnError extends boolean = false>(options: Options<NonAsciiæøåÆøÅöôêÊ字符串Data, ThrowOnError>) => (options.client ?? client).post<NonAsciiæøåÆøÅöôêÊ字符串Responses, unknown, ThrowOnError>({\n    responseType: 'json',\n    url: '/api/v{api-version}/non-ascii-æøåÆØÅöôêÊ字符串',\n    ...options\n});\n\n/**\n * Login User\n */\nexport const putWithFormUrlEncoded = <ThrowOnError extends boolean = false>(options: Options<PutWithFormUrlEncodedData, ThrowOnError>) => (options.client ?? client).put<unknown, unknown, ThrowOnError>({\n    ...urlSearchParamsBodySerializer,\n    url: '/api/v{api-version}/non-ascii-æøåÆØÅöôêÊ字符串',\n    ...options,\n    headers: {\n        'Content-Type': 'application/x-www-form-urlencoded',\n        ...options.headers\n    }\n});\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/vue-query/axios/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type ClientOptions = {\n    baseURL: 'http://localhost:3000/base' | (string & {});\n};\n\n/**\n * Model with number-only name\n */\nexport type _400 = string;\n\n/**\n * External ref to shared model (A)\n */\nexport type ExternalRefA = ExternalSharedModel;\n\n/**\n * External ref to shared model (B)\n */\nexport type ExternalRefB = ExternalSharedModel;\n\n/**\n * Testing multiline comments in string: First line\n * Second line\n *\n * Fourth line\n */\nexport type CamelCaseCommentWithBreaks = number;\n\n/**\n * Testing multiline comments in string: First line\n * Second line\n *\n * Fourth line\n */\nexport type CommentWithBreaks = number;\n\n/**\n * Testing backticks in string: `backticks` and ```multiple backticks``` should work\n */\nexport type CommentWithBackticks = number;\n\n/**\n * Testing backticks and quotes in string: `backticks`, 'quotes', \"double quotes\" and ```multiple backticks``` should work\n */\nexport type CommentWithBackticksAndQuotes = number;\n\n/**\n * Testing slashes in string: \\backwards\\\\\\ and /forwards/// should work\n */\nexport type CommentWithSlashes = number;\n\n/**\n * Testing expression placeholders in string: ${expression} should work\n */\nexport type CommentWithExpressionPlaceholders = number;\n\n/**\n * Testing quotes in string: 'single quote''' and \"double quotes\"\"\" should work\n */\nexport type CommentWithQuotes = number;\n\n/**\n * Testing reserved characters in string: * inline * and ** inline ** should work\n */\nexport type CommentWithReservedCharacters = number;\n\n/**\n * This is a simple number\n */\nexport type SimpleInteger = number;\n\n/**\n * This is a simple boolean\n */\nexport type SimpleBoolean = boolean;\n\n/**\n * This is a simple string\n */\nexport type SimpleString = string;\n\n/**\n * A string with non-ascii (unicode) characters valid in typescript identifiers (æøåÆØÅöÔèÈ字符串)\n */\nexport type NonAsciiStringæøåÆøÅöôêÊ字符串 = string;\n\n/**\n * This is a simple file\n */\nexport type SimpleFile = Blob | File;\n\n/**\n * This is a simple reference\n */\nexport type SimpleReference = ModelWithString;\n\n/**\n * This is a simple string\n */\nexport type SimpleStringWithPattern = string | null;\n\n/**\n * This is a simple enum with strings\n */\nexport type EnumWithStrings = 'Success' | 'Warning' | 'Error' | '\\'Single Quote\\'' | '\"Double Quotes\"' | 'Non-ascii: øæåôöØÆÅÔÖ字符串';\n\nexport type EnumWithReplacedCharacters = '\\'Single Quote\\'' | '\"Double Quotes\"' | 'øæåôöØÆÅÔÖ字符串' | 3.1 | '';\n\n/**\n * This is a simple enum with numbers\n */\nexport type EnumWithNumbers = 1 | 2 | 3 | 1.1 | 1.2 | 1.3 | 100 | 200 | 300 | -100 | -200 | -300 | -1.1 | -1.2 | -1.3;\n\n/**\n * Success=1,Warning=2,Error=3\n */\nexport type EnumFromDescription = number;\n\n/**\n * This is a simple enum with numbers\n */\nexport type EnumWithExtensions = 200 | 400 | 500;\n\nexport type EnumWithXEnumNames = 0 | 1 | 2;\n\n/**\n * This is a simple array with numbers\n */\nexport type ArrayWithNumbers = Array<number>;\n\n/**\n * This is a simple array with booleans\n */\nexport type ArrayWithBooleans = Array<boolean>;\n\n/**\n * This is a simple array with strings\n */\nexport type ArrayWithStrings = Array<string>;\n\n/**\n * This is a simple array with references\n */\nexport type ArrayWithReferences = Array<ModelWithString>;\n\n/**\n * This is a simple array containing an array\n */\nexport type ArrayWithArray = Array<Array<ModelWithString>>;\n\n/**\n * This is a simple array with properties\n */\nexport type ArrayWithProperties = Array<{\n    '16x16'?: CamelCaseCommentWithBreaks;\n    bar?: string;\n}>;\n\n/**\n * This is a simple array with any of properties\n */\nexport type ArrayWithAnyOfProperties = Array<{\n    foo?: string;\n} | {\n    bar?: string;\n}>;\n\nexport type AnyOfAnyAndNull = {\n    data?: unknown | null;\n};\n\n/**\n * This is a simple array with any of properties\n */\nexport type AnyOfArrays = {\n    results?: Array<{\n        foo?: string;\n    } | {\n        bar?: string;\n    }>;\n};\n\n/**\n * This is a string dictionary\n */\nexport type DictionaryWithString = {\n    [key: string]: string;\n};\n\nexport type DictionaryWithPropertiesAndAdditionalProperties = {\n    foo?: number;\n    bar?: boolean;\n    [key: string]: string | number | boolean | undefined;\n};\n\n/**\n * This is a string reference\n */\nexport type DictionaryWithReference = {\n    [key: string]: ModelWithString;\n};\n\n/**\n * This is a complex dictionary\n */\nexport type DictionaryWithArray = {\n    [key: string]: Array<ModelWithString>;\n};\n\n/**\n * This is a string dictionary\n */\nexport type DictionaryWithDictionary = {\n    [key: string]: {\n        [key: string]: string;\n    };\n};\n\n/**\n * This is a complex dictionary\n */\nexport type DictionaryWithProperties = {\n    [key: string]: {\n        foo?: string;\n        bar?: string;\n    };\n};\n\n/**\n * This is a model with one number property\n */\nexport type ModelWithInteger = {\n    /**\n     * This is a simple number property\n     */\n    prop?: number;\n};\n\n/**\n * This is a model with one boolean property\n */\nexport type ModelWithBoolean = {\n    /**\n     * This is a simple boolean property\n     */\n    prop?: boolean;\n};\n\n/**\n * This is a model with one string property\n */\nexport type ModelWithString = {\n    /**\n     * This is a simple string property\n     */\n    prop?: string;\n};\n\n/**\n * This is a model with one string property\n */\nexport type ModelWithStringError = {\n    /**\n     * This is a simple string property\n     */\n    prop?: string;\n};\n\n/**\n * `Comment` or `VoiceComment`. The JSON object for adding voice comments to tickets is different. See [Adding voice comments to tickets](/documentation/ticketing/managing-tickets/adding-voice-comments-to-tickets)\n */\nexport type ModelFromZendesk = string;\n\n/**\n * This is a model with one string property\n */\nexport type ModelWithNullableString = {\n    /**\n     * This is a simple string property\n     */\n    nullableProp1?: string | null;\n    /**\n     * This is a simple string property\n     */\n    nullableRequiredProp1: string | null;\n    /**\n     * This is a simple string property\n     */\n    nullableProp2?: string | null;\n    /**\n     * This is a simple string property\n     */\n    nullableRequiredProp2: string | null;\n    /**\n     * This is a simple enum with strings\n     */\n    'foo_bar-enum'?: 'Success' | 'Warning' | 'Error' | 'ØÆÅ字符串';\n};\n\n/**\n * This is a model with one enum\n */\nexport type ModelWithEnum = {\n    /**\n     * This is a simple enum with strings\n     */\n    'foo_bar-enum'?: 'Success' | 'Warning' | 'Error' | 'ØÆÅ字符串';\n    /**\n     * These are the HTTP error code enums\n     */\n    statusCode?: '100' | '200 FOO' | '300 FOO_BAR' | '400 foo-bar' | '500 foo.bar' | '600 foo&bar';\n    /**\n     * Simple boolean enum\n     */\n    bool?: true;\n};\n\n/**\n * This is a model with one enum with escaped name\n */\nexport type ModelWithEnumWithHyphen = {\n    /**\n     * Foo-Bar-Baz-Qux\n     */\n    'foo-bar-baz-qux'?: '3.0';\n};\n\n/**\n * This is a model with one enum\n */\nexport type ModelWithEnumFromDescription = {\n    /**\n     * Success=1,Warning=2,Error=3\n     */\n    test?: number;\n};\n\n/**\n * This is a model with nested enums\n */\nexport type ModelWithNestedEnums = {\n    dictionaryWithEnum?: {\n        [key: string]: 'Success' | 'Warning' | 'Error';\n    };\n    dictionaryWithEnumFromDescription?: {\n        [key: string]: number;\n    };\n    arrayWithEnum?: Array<'Success' | 'Warning' | 'Error'>;\n    arrayWithDescription?: Array<number>;\n    /**\n     * This is a simple enum with strings\n     */\n    'foo_bar-enum'?: 'Success' | 'Warning' | 'Error' | 'ØÆÅ字符串';\n};\n\n/**\n * This is a model with one property containing a reference\n */\nexport type ModelWithReference = {\n    prop?: ModelWithProperties;\n};\n\n/**\n * This is a model with one property containing an array\n */\nexport type ModelWithArrayReadOnlyAndWriteOnly = {\n    prop?: Array<ModelWithReadOnlyAndWriteOnly>;\n    propWithFile?: Array<Blob | File>;\n    propWithNumber?: Array<number>;\n};\n\n/**\n * This is a model with one property containing an array\n */\nexport type ModelWithArray = {\n    prop?: Array<ModelWithString>;\n    propWithFile?: Array<Blob | File>;\n    propWithNumber?: Array<number>;\n};\n\n/**\n * This is a model with one property containing a dictionary\n */\nexport type ModelWithDictionary = {\n    prop?: {\n        [key: string]: string;\n    };\n};\n\n/**\n * This is a deprecated model with a deprecated property\n *\n * @deprecated\n */\nexport type DeprecatedModel = {\n    /**\n     * This is a deprecated property\n     *\n     * @deprecated\n     */\n    prop?: string;\n};\n\n/**\n * This is a model with one property containing a circular reference\n */\nexport type ModelWithCircularReference = {\n    prop?: ModelWithCircularReference;\n};\n\n/**\n * This is a model with one property with a 'one of' relationship\n */\nexport type CompositionWithOneOf = {\n    propA?: ModelWithString | ModelWithEnum | ModelWithArray | ModelWithDictionary;\n};\n\n/**\n * This is a model with one property with a 'one of' relationship where the options are not $ref\n */\nexport type CompositionWithOneOfAnonymous = {\n    propA?: {\n        propA?: string;\n    } | string | number;\n};\n\n/**\n * Circle\n */\nexport type ModelCircle = {\n    kind: string;\n    radius?: number;\n};\n\n/**\n * Square\n */\nexport type ModelSquare = {\n    kind: string;\n    sideLength?: number;\n};\n\n/**\n * This is a model with one property with a 'one of' relationship where the options are not $ref\n */\nexport type CompositionWithOneOfDiscriminator = ({\n    kind: 'circle';\n} & ModelCircle) | ({\n    kind: 'square';\n} & ModelSquare);\n\n/**\n * This is a model with one property with a 'any of' relationship\n */\nexport type CompositionWithAnyOf = {\n    propA?: ModelWithString | ModelWithEnum | ModelWithArray | ModelWithDictionary;\n};\n\n/**\n * This is a model with one property with a 'any of' relationship where the options are not $ref\n */\nexport type CompositionWithAnyOfAnonymous = {\n    propA?: {\n        propA?: string;\n    } | string | number;\n};\n\n/**\n * This is a model with nested 'any of' property with a type null\n */\nexport type CompositionWithNestedAnyAndTypeNull = {\n    propA?: Array<ModelWithDictionary | null> | Array<ModelWithArray | null>;\n};\n\nexport type _3eNum1Период = 'Bird' | 'Dog';\n\nexport type ConstValue = 'ConstValue';\n\n/**\n * This is a model with one property with a 'any of' relationship where the options are not $ref\n */\nexport type CompositionWithNestedAnyOfAndNull = {\n    /**\n     * Scopes\n     */\n    propA?: Array<_3eNum1Период | ConstValue> | null;\n};\n\n/**\n * This is a model with one property with a 'one of' relationship\n */\nexport type CompositionWithOneOfAndNullable = {\n    propA?: {\n        boolean?: boolean;\n    } | ModelWithEnum | ModelWithArray | ModelWithDictionary | null;\n};\n\n/**\n * This is a model that contains a simple dictionary within composition\n */\nexport type CompositionWithOneOfAndSimpleDictionary = {\n    propA?: boolean | {\n        [key: string]: number;\n    };\n};\n\n/**\n * This is a model that contains a dictionary of simple arrays within composition\n */\nexport type CompositionWithOneOfAndSimpleArrayDictionary = {\n    propA?: boolean | {\n        [key: string]: Array<boolean>;\n    };\n};\n\n/**\n * This is a model that contains a dictionary of complex arrays (composited) within composition\n */\nexport type CompositionWithOneOfAndComplexArrayDictionary = {\n    propA?: boolean | {\n        [key: string]: Array<number | string>;\n    };\n};\n\n/**\n * This is a model with one property with a 'all of' relationship\n */\nexport type CompositionWithAllOfAndNullable = {\n    propA?: ({\n        boolean?: boolean;\n    } & ModelWithEnum & ModelWithArray & ModelWithDictionary) | null;\n};\n\n/**\n * This is a model with one property with a 'any of' relationship\n */\nexport type CompositionWithAnyOfAndNullable = {\n    propA?: {\n        boolean?: boolean;\n    } | ModelWithEnum | ModelWithArray | ModelWithDictionary | null;\n};\n\n/**\n * This is a base model with two simple optional properties\n */\nexport type CompositionBaseModel = {\n    firstName?: string;\n    lastname?: string;\n};\n\n/**\n * This is a model that extends the base model\n */\nexport type CompositionExtendedModel = CompositionBaseModel & {\n    age: number;\n    firstName: string;\n    lastname: string;\n};\n\n/**\n * This is a model with one nested property\n */\nexport type ModelWithProperties = {\n    required: string;\n    readonly requiredAndReadOnly: string;\n    requiredAndNullable: string | null;\n    string?: string;\n    number?: number;\n    boolean?: boolean;\n    reference?: ModelWithString;\n    'property with space'?: string;\n    default?: string;\n    try?: string;\n    readonly '@namespace.string'?: string;\n    readonly '@namespace.integer'?: number;\n};\n\n/**\n * This is a model with one nested property\n */\nexport type ModelWithNestedProperties = {\n    readonly first: {\n        readonly second: {\n            readonly third: string | null;\n        } | null;\n    } | null;\n};\n\n/**\n * This is a model with duplicated properties\n */\nexport type ModelWithDuplicateProperties = {\n    prop?: ModelWithString;\n};\n\n/**\n * This is a model with ordered properties\n */\nexport type ModelWithOrderedProperties = {\n    zebra?: string;\n    apple?: string;\n    hawaii?: string;\n};\n\n/**\n * This is a model with duplicated imports\n */\nexport type ModelWithDuplicateImports = {\n    propA?: ModelWithString;\n    propB?: ModelWithString;\n    propC?: ModelWithString;\n};\n\n/**\n * This is a model that extends another model\n */\nexport type ModelThatExtends = ModelWithString & {\n    propExtendsA?: string;\n    propExtendsB?: ModelWithString;\n};\n\n/**\n * This is a model that extends another model\n */\nexport type ModelThatExtendsExtends = ModelWithString & ModelThatExtends & {\n    propExtendsC?: string;\n    propExtendsD?: ModelWithString;\n};\n\n/**\n * This is a model that contains a some patterns\n */\nexport type ModelWithPattern = {\n    key: string;\n    name: string;\n    readonly enabled?: boolean;\n    readonly modified?: string;\n    id?: string;\n    text?: string;\n    patternWithSingleQuotes?: string;\n    patternWithNewline?: string;\n    patternWithBacktick?: string;\n    patternWithUnicode?: string;\n};\n\nexport type File = {\n    /**\n     * Id\n     */\n    readonly id?: string;\n    /**\n     * Updated at\n     */\n    readonly updated_at?: string;\n    /**\n     * Created at\n     */\n    readonly created_at?: string;\n    /**\n     * Mime\n     */\n    mime: string;\n    /**\n     * File\n     */\n    readonly file?: string;\n};\n\nexport type Default = {\n    name?: string;\n};\n\nexport type Pageable = {\n    page?: number;\n    size?: number;\n    sort?: Array<string>;\n};\n\n/**\n * This is a free-form object without additionalProperties.\n */\nexport type FreeFormObjectWithoutAdditionalProperties = {\n    [key: string]: unknown;\n};\n\n/**\n * This is a free-form object with additionalProperties: true.\n */\nexport type FreeFormObjectWithAdditionalPropertiesEqTrue = {\n    [key: string]: unknown;\n};\n\n/**\n * This is a free-form object with additionalProperties: {}.\n */\nexport type FreeFormObjectWithAdditionalPropertiesEqEmptyObject = {\n    [key: string]: unknown;\n};\n\nexport type ModelWithConst = {\n    String?: 'String';\n    number?: 0;\n    null?: null;\n    withType?: 'Some string';\n};\n\n/**\n * This is a model with one property and additionalProperties: true\n */\nexport type ModelWithAdditionalPropertiesEqTrue = {\n    /**\n     * This is a simple string property\n     */\n    prop?: string;\n    [key: string]: unknown;\n};\n\nexport type NestedAnyOfArraysNullable = {\n    nullableArray?: Array<string | boolean> | null;\n};\n\nexport type CompositionWithOneOfAndProperties = ({\n    foo: SimpleParameter;\n} | {\n    bar: NonAsciiStringæøåÆøÅöôêÊ字符串;\n}) & {\n    baz: number | null;\n    qux: number;\n};\n\n/**\n * An object that can be null\n */\nexport type NullableObject = {\n    foo?: string;\n} | null;\n\n/**\n * Some % character\n */\nexport type CharactersInDescription = string;\n\nexport type ModelWithNullableObject = {\n    data?: NullableObject;\n};\n\n/**\n * An object with additional properties that can be null (anyOf ref + null)\n */\nexport type ModelWithAdditionalPropertiesRef = {\n    [key: string]: NullableObject | null;\n};\n\nexport type ModelWithOneOfEnum = {\n    foo: 'Bar';\n} | {\n    foo: 'Baz';\n} | {\n    foo: 'Qux';\n} | {\n    content: string;\n    foo: 'Quux';\n} | {\n    content: [\n        string,\n        string\n    ];\n    foo: 'Corge';\n};\n\nexport type ModelWithNestedArrayEnumsDataFoo = 'foo' | 'bar';\n\nexport type ModelWithNestedArrayEnumsDataBar = 'baz' | 'qux';\n\nexport type ModelWithNestedArrayEnumsData = {\n    foo?: Array<ModelWithNestedArrayEnumsDataFoo>;\n    bar?: Array<ModelWithNestedArrayEnumsDataBar>;\n};\n\nexport type ModelWithNestedArrayEnums = {\n    array_strings?: Array<string>;\n    data?: ModelWithNestedArrayEnumsData;\n};\n\nexport type ModelWithNestedCompositionEnums = {\n    foo?: ModelWithNestedArrayEnumsDataFoo;\n};\n\nexport type ModelWithReadOnlyAndWriteOnly = {\n    foo: string;\n    readonly bar: string;\n};\n\nexport type ModelWithConstantSizeArray = [\n    number,\n    number\n];\n\nexport type ModelWithAnyOfConstantSizeArray = [\n    number | string,\n    number | string,\n    number | string\n];\n\nexport type ModelWithPrefixItemsConstantSizeArray = [\n    ModelWithInteger,\n    number | string,\n    string\n];\n\nexport type ModelWithAnyOfConstantSizeArrayNullable = [\n    number | null | string,\n    number | null | string,\n    number | null | string\n];\n\nexport type ModelWithAnyOfConstantSizeArrayWithNSizeAndOptions = [\n    number | Import,\n    number | Import\n];\n\nexport type ModelWithAnyOfConstantSizeArrayAndIntersect = [\n    number & string,\n    number & string\n];\n\nexport type ModelWithNumericEnumUnion = {\n    /**\n     * Период\n     */\n    value?: -10 | -1 | 0 | 1 | 3 | 6 | 12;\n};\n\n/**\n * Some description with `back ticks`\n */\nexport type ModelWithBackticksInDescription = {\n    /**\n     * The template `that` should be used for parsing and importing the contents of the CSV file.\n     *\n     * <br/><p>There is one placeholder currently supported:<ul>     <li><b>${x}</b> - refers to the n-th column in the CSV file, e.g. ${1}, ${2}, ...)</li></ul><p>Example of a correct JSON template:</p>\n     * <pre>\n     * [\n     * {\n     * \"resourceType\": \"Asset\",\n     * \"identifier\": {\n     * \"name\": \"${1}\",\n     * \"domain\": {\n     * \"name\": \"${2}\",\n     * \"community\": {\n     * \"name\": \"Some Community\"\n     * }\n     * }\n     * },\n     * \"attributes\" : {\n     * \"00000000-0000-0000-0000-000000003115\" : [ {\n     * \"value\" : \"${3}\"\n     * } ],\n     * \"00000000-0000-0000-0000-000000000222\" : [ {\n     * \"value\" : \"${4}\"\n     * } ]\n     * }\n     * }\n     * ]\n     * </pre>\n     */\n    template?: string;\n};\n\nexport type ModelWithOneOfAndProperties = (SimpleParameter | NonAsciiStringæøåÆøÅöôêÊ字符串) & {\n    baz: number | null;\n    qux: number;\n};\n\n/**\n * Model used to test deduplication strategy (unused)\n */\nexport type ParameterSimpleParameterUnused = string;\n\n/**\n * Model used to test deduplication strategy\n */\nexport type PostServiceWithEmptyTagResponse = string;\n\n/**\n * Model used to test deduplication strategy\n */\nexport type PostServiceWithEmptyTagResponse2 = string;\n\n/**\n * Model used to test deduplication strategy\n */\nexport type DeleteFooData = string;\n\n/**\n * Model used to test deduplication strategy\n */\nexport type DeleteFooData2 = string;\n\n/**\n * Model with restricted keyword name\n */\nexport type Import = string;\n\nexport type SchemaWithFormRestrictedKeys = {\n    description?: string;\n    'x-enum-descriptions'?: string;\n    'x-enum-varnames'?: string;\n    'x-enumNames'?: string;\n    title?: string;\n    object?: {\n        description?: string;\n        'x-enum-descriptions'?: string;\n        'x-enum-varnames'?: string;\n        'x-enumNames'?: string;\n        title?: string;\n    };\n    array?: Array<{\n        description?: string;\n        'x-enum-descriptions'?: string;\n        'x-enum-varnames'?: string;\n        'x-enumNames'?: string;\n        title?: string;\n    }>;\n};\n\n/**\n * This schema was giving PascalCase transformations a hard time\n */\nexport type IoK8sApimachineryPkgApisMetaV1DeleteOptions = {\n    /**\n     * Must be fulfilled before a deletion is carried out. If not possible, a 409 Conflict status will be returned.\n     */\n    preconditions?: IoK8sApimachineryPkgApisMetaV1Preconditions;\n};\n\n/**\n * This schema was giving PascalCase transformations a hard time\n */\nexport type IoK8sApimachineryPkgApisMetaV1Preconditions = {\n    /**\n     * Specifies the target ResourceVersion\n     */\n    resourceVersion?: string;\n    /**\n     * Specifies the target UID.\n     */\n    uid?: string;\n};\n\nexport type AdditionalPropertiesUnknownIssue = {\n    [key: string]: string | number;\n};\n\nexport type AdditionalPropertiesUnknownIssue2 = {\n    [key: string]: string | number;\n};\n\nexport type AdditionalPropertiesUnknownIssue3 = string & {\n    entries: {\n        [key: string]: AdditionalPropertiesUnknownIssue;\n    };\n};\n\nexport type AdditionalPropertiesIntegerIssue = {\n    value: number;\n    [key: string]: number;\n};\n\nexport type OneOfAllOfIssue = ((ConstValue | GenericSchemaDuplicateIssue1SystemBoolean) & _3eNum1Период) | GenericSchemaDuplicateIssue1SystemString;\n\nexport type GenericSchemaDuplicateIssue1SystemBoolean = {\n    item?: boolean;\n    error?: string | null;\n    readonly hasError?: boolean;\n    data?: {\n        [key: string]: never;\n    };\n};\n\nexport type GenericSchemaDuplicateIssue1SystemString = {\n    item?: string | null;\n    error?: string | null;\n    readonly hasError?: boolean;\n};\n\nexport type ExternalSharedModel = {\n    id: string;\n    name?: string;\n};\n\n/**\n * This is a model with one property containing a reference\n */\nexport type ModelWithReferenceWritable = {\n    prop?: ModelWithPropertiesWritable;\n};\n\n/**\n * This is a model with one property containing an array\n */\nexport type ModelWithArrayReadOnlyAndWriteOnlyWritable = {\n    prop?: Array<ModelWithReadOnlyAndWriteOnlyWritable>;\n    propWithFile?: Array<Blob | File>;\n    propWithNumber?: Array<number>;\n};\n\n/**\n * This is a model with one nested property\n */\nexport type ModelWithPropertiesWritable = {\n    required: string;\n    requiredAndNullable: string | null;\n    string?: string;\n    number?: number;\n    boolean?: boolean;\n    reference?: ModelWithString;\n    'property with space'?: string;\n    default?: string;\n    try?: string;\n};\n\n/**\n * This is a model that contains a some patterns\n */\nexport type ModelWithPatternWritable = {\n    key: string;\n    name: string;\n    id?: string;\n    text?: string;\n    patternWithSingleQuotes?: string;\n    patternWithNewline?: string;\n    patternWithBacktick?: string;\n    patternWithUnicode?: string;\n};\n\nexport type FileWritable = {\n    /**\n     * Mime\n     */\n    mime: string;\n};\n\nexport type ModelWithReadOnlyAndWriteOnlyWritable = {\n    foo: string;\n    baz: string;\n};\n\nexport type ModelWithAnyOfConstantSizeArrayWithNSizeAndOptionsWritable = [\n    number | Import,\n    number | Import\n];\n\nexport type AdditionalPropertiesUnknownIssueWritable = {\n    [key: string]: string | number;\n};\n\nexport type OneOfAllOfIssueWritable = ((ConstValue | GenericSchemaDuplicateIssue1SystemBoolean) & _3eNum1Период) | GenericSchemaDuplicateIssue1SystemString;\n\nexport type GenericSchemaDuplicateIssue1SystemBooleanWritable = {\n    item?: boolean;\n    error?: string | null;\n    data?: {\n        [key: string]: never;\n    };\n};\n\nexport type GenericSchemaDuplicateIssue1SystemStringWritable = {\n    item?: string | null;\n    error?: string | null;\n};\n\n/**\n * This is a reusable parameter\n */\nexport type SimpleParameter = string;\n\n/**\n * Parameter with illegal characters\n */\nexport type XFooBar = ModelWithString;\n\n/**\n * A reusable request body\n */\nexport type SimpleRequestBody = ModelWithString;\n\n/**\n * A reusable request body\n */\nexport type SimpleFormData = ModelWithString;\n\nexport type ExportData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no+tag';\n};\n\nexport type PatchApiVbyApiVersionNoTagData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no+tag';\n};\n\nexport type PatchApiVbyApiVersionNoTagResponses = {\n    /**\n     * OK\n     */\n    default: unknown;\n};\n\nexport type ImportData = {\n    body: ModelWithReadOnlyAndWriteOnlyWritable | ModelWithArrayReadOnlyAndWriteOnlyWritable;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no+tag';\n};\n\nexport type ImportResponses = {\n    /**\n     * Success\n     */\n    200: ModelFromZendesk;\n    /**\n     * Default success response\n     */\n    default: ModelWithReadOnlyAndWriteOnly;\n};\n\nexport type ImportResponse = ImportResponses[keyof ImportResponses];\n\nexport type FooWowData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no+tag';\n};\n\nexport type FooWowResponses = {\n    /**\n     * OK\n     */\n    default: unknown;\n};\n\nexport type ApiVVersionODataControllerCountData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple/$count';\n};\n\nexport type ApiVVersionODataControllerCountResponses = {\n    /**\n     * Success\n     */\n    200: ModelFromZendesk;\n};\n\nexport type ApiVVersionODataControllerCountResponse = ApiVVersionODataControllerCountResponses[keyof ApiVVersionODataControllerCountResponses];\n\nexport type GetApiVbyApiVersionSimpleOperationData = {\n    body?: never;\n    path: {\n        /**\n         * foo in method\n         */\n        foo_param: string;\n    };\n    query?: never;\n    url: '/api/v{api-version}/simple:operation';\n};\n\nexport type GetApiVbyApiVersionSimpleOperationErrors = {\n    /**\n     * Default error response\n     */\n    default: ModelWithBoolean;\n};\n\nexport type GetApiVbyApiVersionSimpleOperationError = GetApiVbyApiVersionSimpleOperationErrors[keyof GetApiVbyApiVersionSimpleOperationErrors];\n\nexport type GetApiVbyApiVersionSimpleOperationResponses = {\n    /**\n     * Response is a simple number\n     */\n    200: number;\n};\n\nexport type GetApiVbyApiVersionSimpleOperationResponse = GetApiVbyApiVersionSimpleOperationResponses[keyof GetApiVbyApiVersionSimpleOperationResponses];\n\nexport type DeleteCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type GetCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type HeadCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type OptionsCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type PatchCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type PostCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type PutCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type DeleteFooData3 = {\n    body?: never;\n    headers: {\n        /**\n         * Parameter with illegal characters\n         */\n        'x-Foo-Bar': ModelWithString;\n    };\n    path: {\n        /**\n         * foo in method\n         */\n        foo_param: string;\n        /**\n         * bar in method\n         */\n        BarParam: string;\n    };\n    query?: never;\n    url: '/api/v{api-version}/foo/{foo_param}/bar/{BarParam}';\n};\n\nexport type CallWithDescriptionsData = {\n    body?: never;\n    path?: never;\n    query?: {\n        /**\n         * Testing multiline comments in string: First line\n         * Second line\n         *\n         * Fourth line\n         */\n        parameterWithBreaks?: string;\n        /**\n         * Testing backticks in string: `backticks` and ```multiple backticks``` should work\n         */\n        parameterWithBackticks?: string;\n        /**\n         * Testing slashes in string: \\backwards\\\\\\ and /forwards/// should work\n         */\n        parameterWithSlashes?: string;\n        /**\n         * Testing expression placeholders in string: ${expression} should work\n         */\n        parameterWithExpressionPlaceholders?: string;\n        /**\n         * Testing quotes in string: 'single quote''' and \"double quotes\"\"\" should work\n         */\n        parameterWithQuotes?: string;\n        /**\n         * Testing reserved characters in string: * inline * and ** inline ** should work\n         */\n        parameterWithReservedCharacters?: string;\n    };\n    url: '/api/v{api-version}/descriptions';\n};\n\nexport type DeprecatedCallData = {\n    body?: never;\n    headers: {\n        /**\n         * This parameter is deprecated\n         *\n         * @deprecated\n         */\n        parameter: DeprecatedModel | null;\n    };\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/parameters/deprecated';\n};\n\nexport type CallWithParametersData = {\n    /**\n     * This is the parameter that goes into the body\n     */\n    body: {\n        [key: string]: unknown;\n    } | null;\n    headers: {\n        /**\n         * This is the parameter that goes into the header\n         */\n        parameterHeader: string | null;\n    };\n    path: {\n        /**\n         * This is the parameter that goes into the path\n         */\n        parameterPath: string | null;\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string | null;\n    };\n    query: {\n        foo_ref_enum?: ModelWithNestedArrayEnumsDataFoo;\n        foo_all_of_enum: ModelWithNestedArrayEnumsDataFoo;\n        /**\n         * This is the parameter that goes into the query params\n         */\n        cursor: string | null;\n    };\n    url: '/api/v{api-version}/parameters/{parameterPath}';\n};\n\nexport type CallWithWeirdParameterNamesData = {\n    /**\n     * This is the parameter that goes into the body\n     */\n    body: ModelWithString | null;\n    headers: {\n        /**\n         * This is the parameter that goes into the request header\n         */\n        'parameter.header': string | null;\n    };\n    path: {\n        /**\n         * This is the parameter that goes into the path\n         */\n        'parameter.path.1'?: string;\n        /**\n         * This is the parameter that goes into the path\n         */\n        'parameter-path-2'?: string;\n        /**\n         * This is the parameter that goes into the path\n         */\n        'PARAMETER-PATH-3'?: string;\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string | null;\n    };\n    query: {\n        /**\n         * This is the parameter with a reserved keyword\n         */\n        default?: string;\n        /**\n         * This is the parameter that goes into the request query params\n         */\n        'parameter-query': string | null;\n    };\n    url: '/api/v{api-version}/parameters/{parameter.path.1}/{parameter-path-2}/{PARAMETER-PATH-3}';\n};\n\nexport type GetCallWithOptionalParamData = {\n    /**\n     * This is a required parameter\n     */\n    body: ModelWithOneOfEnum;\n    path?: never;\n    query?: {\n        /**\n         * This is an optional parameter\n         */\n        page?: number;\n    };\n    url: '/api/v{api-version}/parameters';\n};\n\nexport type PostCallWithOptionalParamData = {\n    /**\n     * This is an optional parameter\n     */\n    body?: {\n        offset?: number | null;\n    };\n    path?: never;\n    query: {\n        /**\n         * This is a required parameter\n         */\n        parameter: Pageable;\n    };\n    url: '/api/v{api-version}/parameters';\n};\n\nexport type PostCallWithOptionalParamResponses = {\n    /**\n     * Response is a simple number\n     */\n    200: number;\n    /**\n     * Success\n     */\n    204: void;\n};\n\nexport type PostCallWithOptionalParamResponse = PostCallWithOptionalParamResponses[keyof PostCallWithOptionalParamResponses];\n\nexport type PostApiVbyApiVersionRequestBodyData = {\n    /**\n     * A reusable request body\n     */\n    body?: SimpleRequestBody;\n    path?: never;\n    query?: {\n        /**\n         * This is a reusable parameter\n         */\n        parameter?: string;\n    };\n    url: '/api/v{api-version}/requestBody';\n};\n\nexport type PostApiVbyApiVersionFormDataData = {\n    /**\n     * A reusable request body\n     */\n    body?: SimpleFormData;\n    path?: never;\n    query?: {\n        /**\n         * This is a reusable parameter\n         */\n        parameter?: string;\n    };\n    url: '/api/v{api-version}/formData';\n};\n\nexport type CallWithDefaultParametersData = {\n    body?: never;\n    path?: never;\n    query?: {\n        /**\n         * This is a simple string with default value\n         */\n        parameterString?: string | null;\n        /**\n         * This is a simple number with default value\n         */\n        parameterNumber?: number | null;\n        /**\n         * This is a simple boolean with default value\n         */\n        parameterBoolean?: boolean | null;\n        /**\n         * This is a simple enum with default value\n         */\n        parameterEnum?: 'Success' | 'Warning' | 'Error';\n        /**\n         * This is a simple model with default value\n         */\n        parameterModel?: ModelWithString | null;\n    };\n    url: '/api/v{api-version}/defaults';\n};\n\nexport type CallWithDefaultOptionalParametersData = {\n    body?: never;\n    path?: never;\n    query?: {\n        /**\n         * This is a simple string that is optional with default value\n         */\n        parameterString?: string;\n        /**\n         * This is a simple number that is optional with default value\n         */\n        parameterNumber?: number;\n        /**\n         * This is a simple boolean that is optional with default value\n         */\n        parameterBoolean?: boolean;\n        /**\n         * This is a simple enum that is optional with default value\n         */\n        parameterEnum?: 'Success' | 'Warning' | 'Error';\n        /**\n         * This is a simple model that is optional with default value\n         */\n        parameterModel?: ModelWithString;\n    };\n    url: '/api/v{api-version}/defaults';\n};\n\nexport type CallToTestOrderOfParamsData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * This is a optional string with default\n         */\n        parameterOptionalStringWithDefault?: string;\n        /**\n         * This is a optional string with empty default\n         */\n        parameterOptionalStringWithEmptyDefault?: string;\n        /**\n         * This is a optional string with no default\n         */\n        parameterOptionalStringWithNoDefault?: string;\n        /**\n         * This is a string with default\n         */\n        parameterStringWithDefault: string;\n        /**\n         * This is a string with empty default\n         */\n        parameterStringWithEmptyDefault: string;\n        /**\n         * This is a string with no default\n         */\n        parameterStringWithNoDefault: string;\n        /**\n         * This is a string that can be null with no default\n         */\n        parameterStringNullableWithNoDefault?: string | null;\n        /**\n         * This is a string that can be null with default\n         */\n        parameterStringNullableWithDefault?: string | null;\n    };\n    url: '/api/v{api-version}/defaults';\n};\n\nexport type DuplicateNameData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/duplicate';\n};\n\nexport type DuplicateName2Data = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/duplicate';\n};\n\nexport type DuplicateName3Data = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/duplicate';\n};\n\nexport type DuplicateName4Data = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/duplicate';\n};\n\nexport type CallWithNoContentResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no-content';\n};\n\nexport type CallWithNoContentResponseResponses = {\n    /**\n     * Success\n     */\n    204: void;\n};\n\nexport type CallWithNoContentResponseResponse = CallWithNoContentResponseResponses[keyof CallWithNoContentResponseResponses];\n\nexport type CallWithResponseAndNoContentResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multiple-tags/response-and-no-content';\n};\n\nexport type CallWithResponseAndNoContentResponseResponses = {\n    /**\n     * Response is a simple number\n     */\n    200: number;\n    /**\n     * Success\n     */\n    204: void;\n};\n\nexport type CallWithResponseAndNoContentResponseResponse = CallWithResponseAndNoContentResponseResponses[keyof CallWithResponseAndNoContentResponseResponses];\n\nexport type DummyAData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multiple-tags/a';\n};\n\nexport type DummyAResponses = {\n    200: _400;\n};\n\nexport type DummyAResponse = DummyAResponses[keyof DummyAResponses];\n\nexport type DummyBData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multiple-tags/b';\n};\n\nexport type DummyBResponses = {\n    /**\n     * Success\n     */\n    204: void;\n};\n\nexport type DummyBResponse = DummyBResponses[keyof DummyBResponses];\n\nexport type CallWithResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/response';\n};\n\nexport type CallWithResponseResponses = {\n    default: Import;\n};\n\nexport type CallWithResponseResponse = CallWithResponseResponses[keyof CallWithResponseResponses];\n\nexport type CallWithDuplicateResponsesData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/response';\n};\n\nexport type CallWithDuplicateResponsesErrors = {\n    /**\n     * Message for 500 error\n     */\n    500: ModelWithStringError;\n    /**\n     * Message for 501 error\n     */\n    501: ModelWithStringError;\n    /**\n     * Message for 502 error\n     */\n    502: ModelWithStringError;\n    /**\n     * Message for 4XX errors\n     */\n    '4XX': DictionaryWithArray;\n    /**\n     * Default error response\n     */\n    default: ModelWithBoolean;\n};\n\nexport type CallWithDuplicateResponsesError = CallWithDuplicateResponsesErrors[keyof CallWithDuplicateResponsesErrors];\n\nexport type CallWithDuplicateResponsesResponses = {\n    /**\n     * Message for 200 response\n     */\n    200: ModelWithBoolean & ModelWithInteger;\n    /**\n     * Message for 201 response\n     */\n    201: ModelWithString;\n    /**\n     * Message for 202 response\n     */\n    202: ModelWithString;\n};\n\nexport type CallWithDuplicateResponsesResponse = CallWithDuplicateResponsesResponses[keyof CallWithDuplicateResponsesResponses];\n\nexport type CallWithResponsesData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/response';\n};\n\nexport type CallWithResponsesErrors = {\n    /**\n     * Message for 500 error\n     */\n    500: ModelWithStringError;\n    /**\n     * Message for 501 error\n     */\n    501: ModelWithStringError;\n    /**\n     * Message for 502 error\n     */\n    502: ModelWithStringError;\n    /**\n     * Message for default response\n     */\n    default: ModelWithStringError;\n};\n\nexport type CallWithResponsesError = CallWithResponsesErrors[keyof CallWithResponsesErrors];\n\nexport type CallWithResponsesResponses = {\n    /**\n     * Message for 200 response\n     */\n    200: {\n        readonly '@namespace.string'?: string;\n        readonly '@namespace.integer'?: number;\n        readonly value?: Array<ModelWithString>;\n    };\n    /**\n     * Message for 201 response\n     */\n    201: ModelThatExtends;\n    /**\n     * Message for 202 response\n     */\n    202: ModelThatExtendsExtends;\n};\n\nexport type CallWithResponsesResponse = CallWithResponsesResponses[keyof CallWithResponsesResponses];\n\nexport type CollectionFormatData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * This is an array parameter that is sent as csv format (comma-separated values)\n         */\n        parameterArrayCSV: Array<string> | null;\n        /**\n         * This is an array parameter that is sent as ssv format (space-separated values)\n         */\n        parameterArraySSV: Array<string> | null;\n        /**\n         * This is an array parameter that is sent as tsv format (tab-separated values)\n         */\n        parameterArrayTSV: Array<string> | null;\n        /**\n         * This is an array parameter that is sent as pipes format (pipe-separated values)\n         */\n        parameterArrayPipes: Array<string> | null;\n        /**\n         * This is an array parameter that is sent as multi format (multiple parameter instances)\n         */\n        parameterArrayMulti: Array<string> | null;\n    };\n    url: '/api/v{api-version}/collectionFormat';\n};\n\nexport type TypesData = {\n    body?: never;\n    path?: {\n        /**\n         * This is a number parameter\n         */\n        id?: number;\n    };\n    query: {\n        /**\n         * This is a number parameter\n         */\n        parameterNumber: number;\n        /**\n         * This is a string parameter\n         */\n        parameterString: string | null;\n        /**\n         * This is a boolean parameter\n         */\n        parameterBoolean: boolean | null;\n        /**\n         * This is an object parameter\n         */\n        parameterObject: {\n            [key: string]: unknown;\n        } | null;\n        /**\n         * This is an array parameter\n         */\n        parameterArray: Array<string> | null;\n        /**\n         * This is a dictionary parameter\n         */\n        parameterDictionary: {\n            [key: string]: unknown;\n        } | null;\n        /**\n         * This is an enum parameter\n         */\n        parameterEnum: 'Success' | 'Warning' | 'Error' | null;\n    };\n    url: '/api/v{api-version}/types';\n};\n\nexport type TypesResponses = {\n    /**\n     * Response is a simple number\n     */\n    200: number;\n    /**\n     * Response is a simple string\n     */\n    201: string;\n    /**\n     * Response is a simple boolean\n     */\n    202: boolean;\n    /**\n     * Response is a simple object\n     */\n    203: {\n        [key: string]: unknown;\n    };\n};\n\nexport type TypesResponse = TypesResponses[keyof TypesResponses];\n\nexport type UploadFileData = {\n    body: Blob | File;\n    path: {\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string | null;\n    };\n    query?: never;\n    url: '/api/v{api-version}/upload';\n};\n\nexport type UploadFileResponses = {\n    200: boolean;\n};\n\nexport type UploadFileResponse = UploadFileResponses[keyof UploadFileResponses];\n\nexport type FileResponseData = {\n    body?: never;\n    path: {\n        id: string;\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string;\n    };\n    query?: never;\n    url: '/api/v{api-version}/file/{id}';\n};\n\nexport type FileResponseResponses = {\n    /**\n     * Success\n     */\n    200: Blob | File;\n};\n\nexport type FileResponseResponse = FileResponseResponses[keyof FileResponseResponses];\n\nexport type ComplexTypesData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * Parameter containing object\n         */\n        parameterObject: {\n            first?: {\n                second?: {\n                    third?: string;\n                };\n            };\n        };\n        /**\n         * Parameter containing reference\n         */\n        parameterReference: ModelWithString;\n    };\n    url: '/api/v{api-version}/complex';\n};\n\nexport type ComplexTypesErrors = {\n    /**\n     * 400 `server` error\n     */\n    400: unknown;\n    /**\n     * 500 server error\n     */\n    500: unknown;\n};\n\nexport type ComplexTypesResponses = {\n    /**\n     * Successful response\n     */\n    200: Array<ModelWithString>;\n};\n\nexport type ComplexTypesResponse = ComplexTypesResponses[keyof ComplexTypesResponses];\n\nexport type MultipartResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multipart';\n};\n\nexport type MultipartResponseResponses = {\n    /**\n     * OK\n     */\n    200: {\n        file?: Blob | File;\n        metadata?: {\n            foo?: string;\n            bar?: string;\n        };\n    };\n};\n\nexport type MultipartResponseResponse = MultipartResponseResponses[keyof MultipartResponseResponses];\n\nexport type MultipartRequestData = {\n    body?: {\n        content?: Blob | File;\n        data?: ModelWithString | null;\n    };\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multipart';\n};\n\nexport type ComplexParamsData = {\n    body?: {\n        readonly key: string | null;\n        name: string | null;\n        enabled?: boolean;\n        type: 'Monkey' | 'Horse' | 'Bird';\n        listOfModels?: Array<ModelWithString> | null;\n        listOfStrings?: Array<string> | null;\n        parameters: ModelWithString | ModelWithEnum | ModelWithArray | ModelWithDictionary;\n        readonly user?: {\n            readonly id?: number;\n            readonly name?: string | null;\n        };\n    };\n    path: {\n        id: number;\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string;\n    };\n    query?: never;\n    url: '/api/v{api-version}/complex/{id}';\n};\n\nexport type ComplexParamsResponses = {\n    /**\n     * Success\n     */\n    200: ModelWithString;\n};\n\nexport type ComplexParamsResponse = ComplexParamsResponses[keyof ComplexParamsResponses];\n\nexport type CallWithResultFromHeaderData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/header';\n};\n\nexport type CallWithResultFromHeaderErrors = {\n    /**\n     * 400 server error\n     */\n    400: unknown;\n    /**\n     * 500 server error\n     */\n    500: unknown;\n};\n\nexport type CallWithResultFromHeaderResponses = {\n    /**\n     * Successful response\n     */\n    200: unknown;\n};\n\nexport type TestErrorCodeData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * Status code to return\n         */\n        status: number;\n    };\n    url: '/api/v{api-version}/error';\n};\n\nexport type TestErrorCodeErrors = {\n    /**\n     * Custom message: Internal Server Error\n     */\n    500: unknown;\n    /**\n     * Custom message: Not Implemented\n     */\n    501: unknown;\n    /**\n     * Custom message: Bad Gateway\n     */\n    502: unknown;\n    /**\n     * Custom message: Service Unavailable\n     */\n    503: unknown;\n};\n\nexport type TestErrorCodeResponses = {\n    /**\n     * Custom message: Successful response\n     */\n    200: unknown;\n};\n\nexport type NonAsciiæøåÆøÅöôêÊ字符串Data = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * Dummy input param\n         */\n        nonAsciiParamæøåÆØÅöôêÊ: number;\n    };\n    url: '/api/v{api-version}/non-ascii-æøåÆØÅöôêÊ字符串';\n};\n\nexport type NonAsciiæøåÆøÅöôêÊ字符串Responses = {\n    /**\n     * Successful response\n     */\n    200: Array<NonAsciiStringæøåÆøÅöôêÊ字符串>;\n};\n\nexport type NonAsciiæøåÆøÅöôêÊ字符串Response = NonAsciiæøåÆøÅöôêÊ字符串Responses[keyof NonAsciiæøåÆøÅöôêÊ字符串Responses];\n\nexport type PutWithFormUrlEncodedData = {\n    body: ArrayWithStrings;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/non-ascii-æøåÆØÅöôêÊ字符串';\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/vue-query/fetch/@tanstack/vue-query.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport { type DefaultError, type InfiniteData, infiniteQueryOptions, queryOptions, type UseMutationOptions } from '@tanstack/vue-query';\n\nimport { client } from '../client.gen';\nimport { apiVVersionODataControllerCount, callToTestOrderOfParams, callWithDefaultOptionalParameters, callWithDefaultParameters, callWithDescriptions, callWithDuplicateResponses, callWithNoContentResponse, callWithParameters, callWithResponse, callWithResponseAndNoContentResponse, callWithResponses, callWithResultFromHeader, callWithWeirdParameterNames, collectionFormat, complexParams, complexTypes, deleteCallWithoutParametersAndResponse, deleteFoo, deprecatedCall, dummyA, dummyB, duplicateName, duplicateName2, duplicateName3, duplicateName4, export_, fileResponse, fooWow, getApiVbyApiVersionSimpleOperation, getCallWithOptionalParam, getCallWithoutParametersAndResponse, import_, multipartRequest, multipartResponse, nonAsciiæøåÆøÅöôêÊ字符串, type Options, patchApiVbyApiVersionNoTag, patchCallWithoutParametersAndResponse, postApiVbyApiVersionFormData, postApiVbyApiVersionRequestBody, postCallWithOptionalParam, postCallWithoutParametersAndResponse, putCallWithoutParametersAndResponse, putWithFormUrlEncoded, testErrorCode, types, uploadFile } from '../sdk.gen';\nimport type { ApiVVersionODataControllerCountData, ApiVVersionODataControllerCountResponse, CallToTestOrderOfParamsData, CallWithDefaultOptionalParametersData, CallWithDefaultParametersData, CallWithDescriptionsData, CallWithDuplicateResponsesData, CallWithDuplicateResponsesError, CallWithDuplicateResponsesResponse, CallWithNoContentResponseData, CallWithNoContentResponseResponse, CallWithParametersData, CallWithResponseAndNoContentResponseData, CallWithResponseAndNoContentResponseResponse, CallWithResponseData, CallWithResponseResponse, CallWithResponsesData, CallWithResponsesError, CallWithResponsesResponse, CallWithResultFromHeaderData, CallWithWeirdParameterNamesData, CollectionFormatData, ComplexParamsData, ComplexParamsResponse, ComplexTypesData, ComplexTypesResponse, DeleteCallWithoutParametersAndResponseData, DeleteFooData3, DeprecatedCallData, DummyAData, DummyAResponse, DummyBData, DummyBResponse, DuplicateName2Data, DuplicateName3Data, DuplicateName4Data, DuplicateNameData, ExportData, FileResponseData, FileResponseResponse, FooWowData, GetApiVbyApiVersionSimpleOperationData, GetApiVbyApiVersionSimpleOperationError, GetApiVbyApiVersionSimpleOperationResponse, GetCallWithOptionalParamData, GetCallWithoutParametersAndResponseData, ImportData, ImportResponse, MultipartRequestData, MultipartResponseData, MultipartResponseResponse, NonAsciiæøåÆøÅöôêÊ字符串Data, NonAsciiæøåÆøÅöôêÊ字符串Response, PatchApiVbyApiVersionNoTagData, PatchCallWithoutParametersAndResponseData, PostApiVbyApiVersionFormDataData, PostApiVbyApiVersionRequestBodyData, PostCallWithOptionalParamData, PostCallWithOptionalParamResponse, PostCallWithoutParametersAndResponseData, PutCallWithoutParametersAndResponseData, PutWithFormUrlEncodedData, TestErrorCodeData, TypesData, TypesResponse, UploadFileData, UploadFileResponse } from '../types.gen';\n\nexport type QueryKey<TOptions extends Options> = [\n    Pick<TOptions, 'baseUrl' | 'body' | 'headers' | 'path' | 'query'> & {\n        _id: string;\n        _infinite?: boolean;\n        tags?: ReadonlyArray<string>;\n    }\n];\n\nconst createQueryKey = <TOptions extends Options>(id: string, options?: TOptions, infinite?: boolean, tags?: ReadonlyArray<string>): [\n    QueryKey<TOptions>[0]\n] => {\n    const params: QueryKey<TOptions>[0] = { _id: id, baseUrl: options?.baseUrl || (options?.client ?? client).getConfig().baseUrl } as QueryKey<TOptions>[0];\n    if (infinite) {\n        params._infinite = infinite;\n    }\n    if (tags) {\n        params.tags = tags;\n    }\n    if (options?.body) {\n        params.body = options.body;\n    }\n    if (options?.headers) {\n        params.headers = options.headers;\n    }\n    if (options?.path) {\n        params.path = options.path;\n    }\n    if (options?.query) {\n        params.query = options.query;\n    }\n    return [params];\n};\n\nexport const exportQueryKey = (options?: Options<ExportData>) => createQueryKey('export', options);\n\nexport const exportOptions = (options?: Options<ExportData>) => queryOptions<unknown, DefaultError, unknown, ReturnType<typeof exportQueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await export_({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: exportQueryKey(options)\n});\n\nexport const patchApiVbyApiVersionNoTagMutation = (options?: Partial<Options<PatchApiVbyApiVersionNoTagData>>): UseMutationOptions<unknown, DefaultError, Options<PatchApiVbyApiVersionNoTagData>> => {\n    const mutationOptions: UseMutationOptions<unknown, DefaultError, Options<PatchApiVbyApiVersionNoTagData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await patchApiVbyApiVersionNoTag({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const importMutation = (options?: Partial<Options<ImportData>>): UseMutationOptions<ImportResponse, DefaultError, Options<ImportData>> => {\n    const mutationOptions: UseMutationOptions<ImportResponse, DefaultError, Options<ImportData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await import_({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const fooWowMutation = (options?: Partial<Options<FooWowData>>): UseMutationOptions<unknown, DefaultError, Options<FooWowData>> => {\n    const mutationOptions: UseMutationOptions<unknown, DefaultError, Options<FooWowData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await fooWow({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const apiVVersionODataControllerCountQueryKey = (options?: Options<ApiVVersionODataControllerCountData>) => createQueryKey('apiVVersionODataControllerCount', options);\n\nexport const apiVVersionODataControllerCountOptions = (options?: Options<ApiVVersionODataControllerCountData>) => queryOptions<ApiVVersionODataControllerCountResponse, DefaultError, ApiVVersionODataControllerCountResponse, ReturnType<typeof apiVVersionODataControllerCountQueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await apiVVersionODataControllerCount({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: apiVVersionODataControllerCountQueryKey(options)\n});\n\nexport const getApiVbyApiVersionSimpleOperationQueryKey = (options: Options<GetApiVbyApiVersionSimpleOperationData>) => createQueryKey('getApiVbyApiVersionSimpleOperation', options);\n\nexport const getApiVbyApiVersionSimpleOperationOptions = (options: Options<GetApiVbyApiVersionSimpleOperationData>) => queryOptions<GetApiVbyApiVersionSimpleOperationResponse, GetApiVbyApiVersionSimpleOperationError, GetApiVbyApiVersionSimpleOperationResponse, ReturnType<typeof getApiVbyApiVersionSimpleOperationQueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await getApiVbyApiVersionSimpleOperation({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: getApiVbyApiVersionSimpleOperationQueryKey(options)\n});\n\nexport const deleteCallWithoutParametersAndResponseMutation = (options?: Partial<Options<DeleteCallWithoutParametersAndResponseData>>): UseMutationOptions<unknown, DefaultError, Options<DeleteCallWithoutParametersAndResponseData>> => {\n    const mutationOptions: UseMutationOptions<unknown, DefaultError, Options<DeleteCallWithoutParametersAndResponseData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await deleteCallWithoutParametersAndResponse({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const getCallWithoutParametersAndResponseQueryKey = (options?: Options<GetCallWithoutParametersAndResponseData>) => createQueryKey('getCallWithoutParametersAndResponse', options);\n\nexport const getCallWithoutParametersAndResponseOptions = (options?: Options<GetCallWithoutParametersAndResponseData>) => queryOptions<unknown, DefaultError, unknown, ReturnType<typeof getCallWithoutParametersAndResponseQueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await getCallWithoutParametersAndResponse({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: getCallWithoutParametersAndResponseQueryKey(options)\n});\n\nexport const patchCallWithoutParametersAndResponseMutation = (options?: Partial<Options<PatchCallWithoutParametersAndResponseData>>): UseMutationOptions<unknown, DefaultError, Options<PatchCallWithoutParametersAndResponseData>> => {\n    const mutationOptions: UseMutationOptions<unknown, DefaultError, Options<PatchCallWithoutParametersAndResponseData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await patchCallWithoutParametersAndResponse({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const postCallWithoutParametersAndResponseMutation = (options?: Partial<Options<PostCallWithoutParametersAndResponseData>>): UseMutationOptions<unknown, DefaultError, Options<PostCallWithoutParametersAndResponseData>> => {\n    const mutationOptions: UseMutationOptions<unknown, DefaultError, Options<PostCallWithoutParametersAndResponseData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await postCallWithoutParametersAndResponse({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const putCallWithoutParametersAndResponseMutation = (options?: Partial<Options<PutCallWithoutParametersAndResponseData>>): UseMutationOptions<unknown, DefaultError, Options<PutCallWithoutParametersAndResponseData>> => {\n    const mutationOptions: UseMutationOptions<unknown, DefaultError, Options<PutCallWithoutParametersAndResponseData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await putCallWithoutParametersAndResponse({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const deleteFooMutation = (options?: Partial<Options<DeleteFooData3>>): UseMutationOptions<unknown, DefaultError, Options<DeleteFooData3>> => {\n    const mutationOptions: UseMutationOptions<unknown, DefaultError, Options<DeleteFooData3>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await deleteFoo({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const callWithDescriptionsMutation = (options?: Partial<Options<CallWithDescriptionsData>>): UseMutationOptions<unknown, DefaultError, Options<CallWithDescriptionsData>> => {\n    const mutationOptions: UseMutationOptions<unknown, DefaultError, Options<CallWithDescriptionsData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await callWithDescriptions({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\n/**\n * @deprecated\n */\nexport const deprecatedCallMutation = (options?: Partial<Options<DeprecatedCallData>>): UseMutationOptions<unknown, DefaultError, Options<DeprecatedCallData>> => {\n    const mutationOptions: UseMutationOptions<unknown, DefaultError, Options<DeprecatedCallData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await deprecatedCall({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const callWithParametersMutation = (options?: Partial<Options<CallWithParametersData>>): UseMutationOptions<unknown, DefaultError, Options<CallWithParametersData>> => {\n    const mutationOptions: UseMutationOptions<unknown, DefaultError, Options<CallWithParametersData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await callWithParameters({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const callWithWeirdParameterNamesMutation = (options?: Partial<Options<CallWithWeirdParameterNamesData>>): UseMutationOptions<unknown, DefaultError, Options<CallWithWeirdParameterNamesData>> => {\n    const mutationOptions: UseMutationOptions<unknown, DefaultError, Options<CallWithWeirdParameterNamesData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await callWithWeirdParameterNames({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const getCallWithOptionalParamQueryKey = (options: Options<GetCallWithOptionalParamData>) => createQueryKey('getCallWithOptionalParam', options);\n\nexport const getCallWithOptionalParamOptions = (options: Options<GetCallWithOptionalParamData>) => queryOptions<unknown, DefaultError, unknown, ReturnType<typeof getCallWithOptionalParamQueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await getCallWithOptionalParam({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: getCallWithOptionalParamQueryKey(options)\n});\n\nconst createInfiniteParams = <K extends Pick<QueryKey<Options>[0], 'body' | 'headers' | 'path' | 'query'>>(queryKey: QueryKey<Options>, page: K) => {\n    const params = { ...queryKey[0] };\n    if (page.body) {\n        params.body = {\n            ...queryKey[0].body as any,\n            ...page.body as any\n        };\n    }\n    if (page.headers) {\n        params.headers = {\n            ...queryKey[0].headers,\n            ...page.headers\n        };\n    }\n    if (page.path) {\n        params.path = {\n            ...queryKey[0].path as any,\n            ...page.path as any\n        };\n    }\n    if (page.query) {\n        params.query = {\n            ...queryKey[0].query as any,\n            ...page.query as any\n        };\n    }\n    return params as unknown as typeof page;\n};\n\nexport const getCallWithOptionalParamInfiniteQueryKey = (options: Options<GetCallWithOptionalParamData>): QueryKey<Options<GetCallWithOptionalParamData>> => createQueryKey('getCallWithOptionalParam', options, true);\n\nexport const getCallWithOptionalParamInfiniteOptions = (options: Options<GetCallWithOptionalParamData>) => infiniteQueryOptions<unknown, DefaultError, InfiniteData<unknown>, QueryKey<Options<GetCallWithOptionalParamData>>, number | Pick<QueryKey<Options<GetCallWithOptionalParamData>>[0], 'body' | 'headers' | 'path' | 'query'>>(\n// @ts-ignore\n{\n    queryFn: async ({ pageParam, queryKey, signal }) => {\n        // @ts-ignore\n        const page: Pick<QueryKey<Options<GetCallWithOptionalParamData>>[0], 'body' | 'headers' | 'path' | 'query'> = typeof pageParam === 'object' ? pageParam : {\n            query: {\n                page: pageParam\n            }\n        };\n        const params = createInfiniteParams(queryKey, page);\n        const { data } = await getCallWithOptionalParam({\n            ...options,\n            ...params,\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: getCallWithOptionalParamInfiniteQueryKey(options)\n});\n\nexport const postCallWithOptionalParamMutation = (options?: Partial<Options<PostCallWithOptionalParamData>>): UseMutationOptions<PostCallWithOptionalParamResponse, DefaultError, Options<PostCallWithOptionalParamData>> => {\n    const mutationOptions: UseMutationOptions<PostCallWithOptionalParamResponse, DefaultError, Options<PostCallWithOptionalParamData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await postCallWithOptionalParam({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const postApiVbyApiVersionRequestBodyMutation = (options?: Partial<Options<PostApiVbyApiVersionRequestBodyData>>): UseMutationOptions<unknown, DefaultError, Options<PostApiVbyApiVersionRequestBodyData>> => {\n    const mutationOptions: UseMutationOptions<unknown, DefaultError, Options<PostApiVbyApiVersionRequestBodyData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await postApiVbyApiVersionRequestBody({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const postApiVbyApiVersionFormDataMutation = (options?: Partial<Options<PostApiVbyApiVersionFormDataData>>): UseMutationOptions<unknown, DefaultError, Options<PostApiVbyApiVersionFormDataData>> => {\n    const mutationOptions: UseMutationOptions<unknown, DefaultError, Options<PostApiVbyApiVersionFormDataData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await postApiVbyApiVersionFormData({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const callWithDefaultParametersQueryKey = (options?: Options<CallWithDefaultParametersData>) => createQueryKey('callWithDefaultParameters', options);\n\nexport const callWithDefaultParametersOptions = (options?: Options<CallWithDefaultParametersData>) => queryOptions<unknown, DefaultError, unknown, ReturnType<typeof callWithDefaultParametersQueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await callWithDefaultParameters({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: callWithDefaultParametersQueryKey(options)\n});\n\nexport const callWithDefaultOptionalParametersMutation = (options?: Partial<Options<CallWithDefaultOptionalParametersData>>): UseMutationOptions<unknown, DefaultError, Options<CallWithDefaultOptionalParametersData>> => {\n    const mutationOptions: UseMutationOptions<unknown, DefaultError, Options<CallWithDefaultOptionalParametersData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await callWithDefaultOptionalParameters({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const callToTestOrderOfParamsMutation = (options?: Partial<Options<CallToTestOrderOfParamsData>>): UseMutationOptions<unknown, DefaultError, Options<CallToTestOrderOfParamsData>> => {\n    const mutationOptions: UseMutationOptions<unknown, DefaultError, Options<CallToTestOrderOfParamsData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await callToTestOrderOfParams({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const duplicateNameMutation = (options?: Partial<Options<DuplicateNameData>>): UseMutationOptions<unknown, DefaultError, Options<DuplicateNameData>> => {\n    const mutationOptions: UseMutationOptions<unknown, DefaultError, Options<DuplicateNameData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await duplicateName({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const duplicateName2QueryKey = (options?: Options<DuplicateName2Data>) => createQueryKey('duplicateName2', options);\n\nexport const duplicateName2Options = (options?: Options<DuplicateName2Data>) => queryOptions<unknown, DefaultError, unknown, ReturnType<typeof duplicateName2QueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await duplicateName2({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: duplicateName2QueryKey(options)\n});\n\nexport const duplicateName3Mutation = (options?: Partial<Options<DuplicateName3Data>>): UseMutationOptions<unknown, DefaultError, Options<DuplicateName3Data>> => {\n    const mutationOptions: UseMutationOptions<unknown, DefaultError, Options<DuplicateName3Data>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await duplicateName3({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const duplicateName4Mutation = (options?: Partial<Options<DuplicateName4Data>>): UseMutationOptions<unknown, DefaultError, Options<DuplicateName4Data>> => {\n    const mutationOptions: UseMutationOptions<unknown, DefaultError, Options<DuplicateName4Data>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await duplicateName4({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const callWithNoContentResponseQueryKey = (options?: Options<CallWithNoContentResponseData>) => createQueryKey('callWithNoContentResponse', options);\n\nexport const callWithNoContentResponseOptions = (options?: Options<CallWithNoContentResponseData>) => queryOptions<CallWithNoContentResponseResponse, DefaultError, CallWithNoContentResponseResponse, ReturnType<typeof callWithNoContentResponseQueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await callWithNoContentResponse({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: callWithNoContentResponseQueryKey(options)\n});\n\nexport const callWithResponseAndNoContentResponseQueryKey = (options?: Options<CallWithResponseAndNoContentResponseData>) => createQueryKey('callWithResponseAndNoContentResponse', options);\n\nexport const callWithResponseAndNoContentResponseOptions = (options?: Options<CallWithResponseAndNoContentResponseData>) => queryOptions<CallWithResponseAndNoContentResponseResponse, DefaultError, CallWithResponseAndNoContentResponseResponse, ReturnType<typeof callWithResponseAndNoContentResponseQueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await callWithResponseAndNoContentResponse({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: callWithResponseAndNoContentResponseQueryKey(options)\n});\n\nexport const dummyAQueryKey = (options?: Options<DummyAData>) => createQueryKey('dummyA', options);\n\nexport const dummyAOptions = (options?: Options<DummyAData>) => queryOptions<DummyAResponse, DefaultError, DummyAResponse, ReturnType<typeof dummyAQueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await dummyA({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: dummyAQueryKey(options)\n});\n\nexport const dummyBQueryKey = (options?: Options<DummyBData>) => createQueryKey('dummyB', options);\n\nexport const dummyBOptions = (options?: Options<DummyBData>) => queryOptions<DummyBResponse, DefaultError, DummyBResponse, ReturnType<typeof dummyBQueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await dummyB({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: dummyBQueryKey(options)\n});\n\nexport const callWithResponseQueryKey = (options?: Options<CallWithResponseData>) => createQueryKey('callWithResponse', options);\n\nexport const callWithResponseOptions = (options?: Options<CallWithResponseData>) => queryOptions<CallWithResponseResponse, DefaultError, CallWithResponseResponse, ReturnType<typeof callWithResponseQueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await callWithResponse({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: callWithResponseQueryKey(options)\n});\n\nexport const callWithDuplicateResponsesMutation = (options?: Partial<Options<CallWithDuplicateResponsesData>>): UseMutationOptions<CallWithDuplicateResponsesResponse, CallWithDuplicateResponsesError, Options<CallWithDuplicateResponsesData>> => {\n    const mutationOptions: UseMutationOptions<CallWithDuplicateResponsesResponse, CallWithDuplicateResponsesError, Options<CallWithDuplicateResponsesData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await callWithDuplicateResponses({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const callWithResponsesMutation = (options?: Partial<Options<CallWithResponsesData>>): UseMutationOptions<CallWithResponsesResponse, CallWithResponsesError, Options<CallWithResponsesData>> => {\n    const mutationOptions: UseMutationOptions<CallWithResponsesResponse, CallWithResponsesError, Options<CallWithResponsesData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await callWithResponses({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const collectionFormatQueryKey = (options: Options<CollectionFormatData>) => createQueryKey('collectionFormat', options);\n\nexport const collectionFormatOptions = (options: Options<CollectionFormatData>) => queryOptions<unknown, DefaultError, unknown, ReturnType<typeof collectionFormatQueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await collectionFormat({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: collectionFormatQueryKey(options)\n});\n\nexport const typesQueryKey = (options: Options<TypesData>) => createQueryKey('types', options);\n\nexport const typesOptions = (options: Options<TypesData>) => queryOptions<TypesResponse, DefaultError, TypesResponse, ReturnType<typeof typesQueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await types({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: typesQueryKey(options)\n});\n\nexport const uploadFileMutation = (options?: Partial<Options<UploadFileData>>): UseMutationOptions<UploadFileResponse, DefaultError, Options<UploadFileData>> => {\n    const mutationOptions: UseMutationOptions<UploadFileResponse, DefaultError, Options<UploadFileData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await uploadFile({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const fileResponseQueryKey = (options: Options<FileResponseData>) => createQueryKey('fileResponse', options);\n\nexport const fileResponseOptions = (options: Options<FileResponseData>) => queryOptions<FileResponseResponse, DefaultError, FileResponseResponse, ReturnType<typeof fileResponseQueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await fileResponse({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: fileResponseQueryKey(options)\n});\n\nexport const complexTypesQueryKey = (options: Options<ComplexTypesData>) => createQueryKey('complexTypes', options);\n\nexport const complexTypesOptions = (options: Options<ComplexTypesData>) => queryOptions<ComplexTypesResponse, DefaultError, ComplexTypesResponse, ReturnType<typeof complexTypesQueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await complexTypes({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: complexTypesQueryKey(options)\n});\n\nexport const multipartResponseQueryKey = (options?: Options<MultipartResponseData>) => createQueryKey('multipartResponse', options);\n\nexport const multipartResponseOptions = (options?: Options<MultipartResponseData>) => queryOptions<MultipartResponseResponse, DefaultError, MultipartResponseResponse, ReturnType<typeof multipartResponseQueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await multipartResponse({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: multipartResponseQueryKey(options)\n});\n\nexport const multipartRequestMutation = (options?: Partial<Options<MultipartRequestData>>): UseMutationOptions<unknown, DefaultError, Options<MultipartRequestData>> => {\n    const mutationOptions: UseMutationOptions<unknown, DefaultError, Options<MultipartRequestData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await multipartRequest({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const complexParamsMutation = (options?: Partial<Options<ComplexParamsData>>): UseMutationOptions<ComplexParamsResponse, DefaultError, Options<ComplexParamsData>> => {\n    const mutationOptions: UseMutationOptions<ComplexParamsResponse, DefaultError, Options<ComplexParamsData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await complexParams({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const callWithResultFromHeaderMutation = (options?: Partial<Options<CallWithResultFromHeaderData>>): UseMutationOptions<unknown, DefaultError, Options<CallWithResultFromHeaderData>> => {\n    const mutationOptions: UseMutationOptions<unknown, DefaultError, Options<CallWithResultFromHeaderData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await callWithResultFromHeader({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const testErrorCodeMutation = (options?: Partial<Options<TestErrorCodeData>>): UseMutationOptions<unknown, DefaultError, Options<TestErrorCodeData>> => {\n    const mutationOptions: UseMutationOptions<unknown, DefaultError, Options<TestErrorCodeData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await testErrorCode({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const nonAsciiæøåÆøÅöôêÊ字符串Mutation = (options?: Partial<Options<NonAsciiæøåÆøÅöôêÊ字符串Data>>): UseMutationOptions<NonAsciiæøåÆøÅöôêÊ字符串Response, DefaultError, Options<NonAsciiæøåÆøÅöôêÊ字符串Data>> => {\n    const mutationOptions: UseMutationOptions<NonAsciiæøåÆøÅöôêÊ字符串Response, DefaultError, Options<NonAsciiæøåÆøÅöôêÊ字符串Data>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await nonAsciiæøåÆøÅöôêÊ字符串({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\n/**\n * Login User\n */\nexport const putWithFormUrlEncodedMutation = (options?: Partial<Options<PutWithFormUrlEncodedData>>): UseMutationOptions<unknown, DefaultError, Options<PutWithFormUrlEncodedData>> => {\n    const mutationOptions: UseMutationOptions<unknown, DefaultError, Options<PutWithFormUrlEncodedData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await putWithFormUrlEncoded({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/vue-query/fetch/client/client.gen.ts",
    "content": "// 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 (options: RequestOptions) => {\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 url = buildUrl(opts);\n\n    return { opts, url };\n  };\n\n  const request: Client['request'] = async (options) => {\n    // @ts-expect-error\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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/vue-query/fetch/client/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type { Auth } from '../core/auth.gen';\nexport type { QuerySerializerOptions } from '../core/bodySerializer.gen';\nexport {\n  formDataBodySerializer,\n  jsonBodySerializer,\n  urlSearchParamsBodySerializer,\n} from '../core/bodySerializer.gen';\nexport { buildClientParams } from '../core/params.gen';\nexport { serializeQueryKeyValue } from '../core/queryKeySerializer.gen';\nexport { createClient } from './client.gen';\nexport type {\n  Client,\n  ClientOptions,\n  Config,\n  CreateClientConfig,\n  Options,\n  RequestOptions,\n  RequestResult,\n  ResolvedRequestOptions,\n  ResponseStyle,\n  TDataShape,\n} from './types.gen';\nexport { createConfig, mergeHeaders } from './utils.gen';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/vue-query/fetch/client/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { Auth } from '../core/auth.gen';\nimport type {\n  ServerSentEventsOptions,\n  ServerSentEventsResult,\n} from '../core/serverSentEvents.gen';\nimport type { Client as CoreClient, Config as CoreConfig } from '../core/types.gen';\nimport type { Middleware } from './utils.gen';\n\nexport type ResponseStyle = 'data' | 'fields';\n\nexport interface Config<T extends ClientOptions = ClientOptions>\n  extends Omit<RequestInit, 'body' | 'headers' | 'method'>, CoreConfig {\n  /**\n   * Base URL for all requests made by this client.\n   */\n  baseUrl?: T['baseUrl'];\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   * Please don't use the Fetch client for Next.js applications. The `next`\n   * options won't have any effect.\n   *\n   * Install {@link https://www.npmjs.com/package/@hey-api/client-next `@hey-api/client-next`} instead.\n   */\n  next?: never;\n  /**\n   * Return the response data parsed in a specified format. By default, `auto`\n   * will infer the appropriate method from the `Content-Type` response header.\n   * You can override this behavior with any of the {@link Body} methods.\n   * Select `stream` if you don't want to parse response data at all.\n   *\n   * @default 'auto'\n   */\n  parseAs?: 'arrayBuffer' | 'auto' | 'blob' | 'formData' | 'json' | 'stream' | 'text';\n  /**\n   * Should we return only data or multiple fields (data, error, response, etc.)?\n   *\n   * @default 'fields'\n   */\n  responseStyle?: ResponseStyle;\n  /**\n   * Throw an error instead of returning it in the response?\n   *\n   * @default false\n   */\n  throwOnError?: T['throwOnError'];\n}\n\nexport interface RequestOptions<\n  TData = unknown,\n  TResponseStyle extends ResponseStyle = 'fields',\n  ThrowOnError extends boolean = boolean,\n  Url extends string = string,\n>\n  extends\n    Config<{\n      responseStyle: TResponseStyle;\n      throwOnError: ThrowOnError;\n    }>,\n    Pick<\n      ServerSentEventsOptions<TData>,\n      | 'onRequest'\n      | 'onSseError'\n      | 'onSseEvent'\n      | 'sseDefaultRetryDelay'\n      | 'sseMaxRetryAttempts'\n      | 'sseMaxRetryDelay'\n    > {\n  /**\n   * Any body that you want to add to your request.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/fetch#body}\n   */\n  body?: unknown;\n  path?: Record<string, unknown>;\n  query?: Record<string, unknown>;\n  /**\n   * Security mechanism(s) to use for the request.\n   */\n  security?: ReadonlyArray<Auth>;\n  url: Url;\n}\n\nexport interface ResolvedRequestOptions<\n  TResponseStyle extends ResponseStyle = 'fields',\n  ThrowOnError extends boolean = boolean,\n  Url extends string = string,\n> extends RequestOptions<unknown, TResponseStyle, ThrowOnError, Url> {\n  serializedBody?: string;\n}\n\nexport type RequestResult<\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = boolean,\n  TResponseStyle extends ResponseStyle = 'fields',\n> = ThrowOnError extends true\n  ? Promise<\n      TResponseStyle extends 'data'\n        ? TData extends Record<string, unknown>\n          ? TData[keyof TData]\n          : TData\n        : {\n            data: TData extends Record<string, unknown> ? TData[keyof TData] : TData;\n            request: Request;\n            response: Response;\n          }\n    >\n  : Promise<\n      TResponseStyle extends 'data'\n        ? (TData extends Record<string, unknown> ? TData[keyof TData] : TData) | undefined\n        : (\n            | {\n                data: TData extends Record<string, unknown> ? TData[keyof TData] : TData;\n                error: undefined;\n              }\n            | {\n                data: undefined;\n                error: TError extends Record<string, unknown> ? TError[keyof TError] : TError;\n              }\n          ) & {\n            request: Request;\n            response: Response;\n          }\n    >;\n\nexport interface ClientOptions {\n  baseUrl?: string;\n  responseStyle?: ResponseStyle;\n  throwOnError?: boolean;\n}\n\ntype MethodFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'>,\n) => RequestResult<TData, TError, ThrowOnError, TResponseStyle>;\n\ntype SseFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'>,\n) => Promise<ServerSentEventsResult<TData, TError>>;\n\ntype RequestFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'> &\n    Pick<Required<RequestOptions<TData, TResponseStyle, ThrowOnError>>, 'method'>,\n) => RequestResult<TData, TError, ThrowOnError, TResponseStyle>;\n\ntype BuildUrlFn = <\n  TData extends {\n    body?: unknown;\n    path?: Record<string, unknown>;\n    query?: Record<string, unknown>;\n    url: string;\n  },\n>(\n  options: TData & Options<TData>,\n) => string;\n\nexport type Client = CoreClient<RequestFn, Config, MethodFn, BuildUrlFn, SseFn> & {\n  interceptors: Middleware<Request, Response, unknown, ResolvedRequestOptions>;\n};\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 = ClientOptions> = (\n  override?: Config<ClientOptions & T>,\n) => Config<Required<ClientOptions> & T>;\n\nexport interface TDataShape {\n  body?: unknown;\n  headers?: unknown;\n  path?: unknown;\n  query?: unknown;\n  url: string;\n}\n\ntype OmitKeys<T, K> = Pick<T, Exclude<keyof T, K>>;\n\nexport type Options<\n  TData extends TDataShape = TDataShape,\n  ThrowOnError extends boolean = boolean,\n  TResponse = unknown,\n  TResponseStyle extends ResponseStyle = 'fields',\n> = OmitKeys<\n  RequestOptions<TResponse, TResponseStyle, ThrowOnError>,\n  'body' | 'path' | 'query' | 'url'\n> &\n  ([TData] extends [never] ? unknown : Omit<TData, 'url'>);\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/vue-query/fetch/client/utils.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/vue-query/fetch/client.gen.ts",
    "content": "// 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: 'http://localhost:3000/base' }));\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/vue-query/fetch/core/auth.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/vue-query/fetch/core/bodySerializer.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/vue-query/fetch/core/params.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/vue-query/fetch/core/pathSerializer.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/vue-query/fetch/core/queryKeySerializer.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\n/**\n * JSON-friendly union that mirrors what Pinia Colada can hash.\n */\nexport type JsonValue =\n  | null\n  | string\n  | number\n  | boolean\n  | JsonValue[]\n  | { [key: string]: JsonValue };\n\n/**\n * Replacer that converts non-JSON values (bigint, Date, etc.) to safe substitutes.\n */\nexport const queryKeyJsonReplacer = (_key: string, value: unknown) => {\n  if (value === undefined || typeof value === 'function' || typeof value === 'symbol') {\n    return undefined;\n  }\n  if (typeof value === 'bigint') {\n    return value.toString();\n  }\n  if (value instanceof Date) {\n    return value.toISOString();\n  }\n  return value;\n};\n\n/**\n * Safely stringifies a value and parses it back into a JsonValue.\n */\nexport const stringifyToJsonValue = (input: unknown): JsonValue | undefined => {\n  try {\n    const json = JSON.stringify(input, queryKeyJsonReplacer);\n    if (json === undefined) {\n      return undefined;\n    }\n    return JSON.parse(json) as JsonValue;\n  } catch {\n    return undefined;\n  }\n};\n\n/**\n * Detects plain objects (including objects with a null prototype).\n */\nconst isPlainObject = (value: unknown): value is Record<string, unknown> => {\n  if (value === null || typeof value !== 'object') {\n    return false;\n  }\n  const prototype = Object.getPrototypeOf(value as object);\n  return prototype === Object.prototype || prototype === null;\n};\n\n/**\n * Turns URLSearchParams into a sorted JSON object for deterministic keys.\n */\nconst serializeSearchParams = (params: URLSearchParams): JsonValue => {\n  const entries = Array.from(params.entries()).sort(([a], [b]) => a.localeCompare(b));\n  const result: Record<string, JsonValue> = {};\n\n  for (const [key, value] of entries) {\n    const existing = result[key];\n    if (existing === undefined) {\n      result[key] = value;\n      continue;\n    }\n\n    if (Array.isArray(existing)) {\n      (existing as string[]).push(value);\n    } else {\n      result[key] = [existing, value];\n    }\n  }\n\n  return result;\n};\n\n/**\n * Normalizes any accepted value into a JSON-friendly shape for query keys.\n */\nexport const serializeQueryKeyValue = (value: unknown): JsonValue | undefined => {\n  if (value === null) {\n    return null;\n  }\n\n  if (typeof value === 'string' || typeof value === 'number' || typeof value === 'boolean') {\n    return value;\n  }\n\n  if (value === undefined || typeof value === 'function' || typeof value === 'symbol') {\n    return undefined;\n  }\n\n  if (typeof value === 'bigint') {\n    return value.toString();\n  }\n\n  if (value instanceof Date) {\n    return value.toISOString();\n  }\n\n  if (Array.isArray(value)) {\n    return stringifyToJsonValue(value);\n  }\n\n  if (typeof URLSearchParams !== 'undefined' && value instanceof URLSearchParams) {\n    return serializeSearchParams(value);\n  }\n\n  if (isPlainObject(value)) {\n    return stringifyToJsonValue(value);\n  }\n\n  return undefined;\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/vue-query/fetch/core/serverSentEvents.gen.ts",
    "content": "// 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 const 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            // Normalize line endings: CRLF -> LF, then CR -> LF\n            buffer = buffer.replace(/\\r\\n/g, '\\n').replace(/\\r/g, '\\n');\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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/vue-query/fetch/core/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { Auth, AuthToken } from './auth.gen';\nimport type { BodySerializer, QuerySerializer, QuerySerializerOptions } from './bodySerializer.gen';\n\nexport type HttpMethod =\n  | 'connect'\n  | 'delete'\n  | 'get'\n  | 'head'\n  | 'options'\n  | 'patch'\n  | 'post'\n  | 'put'\n  | 'trace';\n\nexport type Client<\n  RequestFn = never,\n  Config = unknown,\n  MethodFn = never,\n  BuildUrlFn = never,\n  SseFn = never,\n> = {\n  /**\n   * Returns the final request URL.\n   */\n  buildUrl: BuildUrlFn;\n  getConfig: () => Config;\n  request: RequestFn;\n  setConfig: (config: Config) => Config;\n} & {\n  [K in HttpMethod]: MethodFn;\n} & ([SseFn] extends [never] ? { sse?: never } : { sse: { [K in HttpMethod]: SseFn } });\n\nexport interface Config {\n  /**\n   * Auth token or a function returning auth token. The resolved value will be\n   * added to the request payload as defined by its `security` array.\n   */\n  auth?: ((auth: Auth) => Promise<AuthToken> | AuthToken) | AuthToken;\n  /**\n   * A function for serializing request body parameter. By default,\n   * {@link JSON.stringify()} will be used.\n   */\n  bodySerializer?: BodySerializer | null;\n  /**\n   * An object containing any HTTP headers that you want to pre-populate your\n   * `Headers` object with.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/Headers/Headers#init See more}\n   */\n  headers?:\n    | RequestInit['headers']\n    | Record<\n        string,\n        string | number | boolean | (string | number | boolean)[] | null | undefined | unknown\n      >;\n  /**\n   * The request method.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/fetch#method See more}\n   */\n  method?: Uppercase<HttpMethod>;\n  /**\n   * A function for serializing request query parameters. By default, arrays\n   * will be exploded in form style, objects will be exploded in deepObject\n   * style, and reserved characters are percent-encoded.\n   *\n   * This method will have no effect if the native `paramsSerializer()` Axios\n   * API function is used.\n   *\n   * {@link https://swagger.io/docs/specification/serialization/#query View examples}\n   */\n  querySerializer?: QuerySerializer | QuerySerializerOptions;\n  /**\n   * A function validating request data. This is useful if you want to ensure\n   * the request conforms to the desired shape, so it can be safely sent to\n   * the server.\n   */\n  requestValidator?: (data: unknown) => Promise<unknown>;\n  /**\n   * A function transforming response data before it's returned. This is useful\n   * for post-processing data, e.g. converting ISO strings into Date objects.\n   */\n  responseTransformer?: (data: unknown) => Promise<unknown>;\n  /**\n   * A function validating response data. This is useful if you want to ensure\n   * the response conforms to the desired shape, so it can be safely passed to\n   * the transformers and returned to the user.\n   */\n  responseValidator?: (data: unknown) => Promise<unknown>;\n}\n\ntype IsExactlyNeverOrNeverUndefined<T> = [T] extends [never]\n  ? true\n  : [T] extends [never | undefined]\n    ? [undefined] extends [T]\n      ? false\n      : true\n    : false;\n\nexport type OmitNever<T extends Record<string, unknown>> = {\n  [K in keyof T as IsExactlyNeverOrNeverUndefined<T[K]> extends true ? never : K]: T[K];\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/vue-query/fetch/core/utils.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/vue-query/fetch/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport { apiVVersionODataControllerCount, callToTestOrderOfParams, callWithDefaultOptionalParameters, callWithDefaultParameters, callWithDescriptions, callWithDuplicateResponses, callWithNoContentResponse, callWithParameters, callWithResponse, callWithResponseAndNoContentResponse, callWithResponses, callWithResultFromHeader, callWithWeirdParameterNames, collectionFormat, complexParams, complexTypes, deleteCallWithoutParametersAndResponse, deleteFoo, deprecatedCall, dummyA, dummyB, duplicateName, duplicateName2, duplicateName3, duplicateName4, export_, fileResponse, fooWow, getApiVbyApiVersionSimpleOperation, getCallWithOptionalParam, getCallWithoutParametersAndResponse, headCallWithoutParametersAndResponse, import_, multipartRequest, multipartResponse, nonAsciiæøåÆøÅöôêÊ字符串, type Options, optionsCallWithoutParametersAndResponse, patchApiVbyApiVersionNoTag, patchCallWithoutParametersAndResponse, postApiVbyApiVersionFormData, postApiVbyApiVersionRequestBody, postCallWithOptionalParam, postCallWithoutParametersAndResponse, putCallWithoutParametersAndResponse, putWithFormUrlEncoded, testErrorCode, types, uploadFile } from './sdk.gen';\nexport type { _3eNum1Период, _400, AdditionalPropertiesIntegerIssue, AdditionalPropertiesUnknownIssue, AdditionalPropertiesUnknownIssue2, AdditionalPropertiesUnknownIssue3, AdditionalPropertiesUnknownIssueWritable, AnyOfAnyAndNull, AnyOfArrays, ApiVVersionODataControllerCountData, ApiVVersionODataControllerCountResponse, ApiVVersionODataControllerCountResponses, ArrayWithAnyOfProperties, ArrayWithArray, ArrayWithBooleans, ArrayWithNumbers, ArrayWithProperties, ArrayWithReferences, ArrayWithStrings, CallToTestOrderOfParamsData, CallWithDefaultOptionalParametersData, CallWithDefaultParametersData, CallWithDescriptionsData, CallWithDuplicateResponsesData, CallWithDuplicateResponsesError, CallWithDuplicateResponsesErrors, CallWithDuplicateResponsesResponse, CallWithDuplicateResponsesResponses, CallWithNoContentResponseData, CallWithNoContentResponseResponse, CallWithNoContentResponseResponses, CallWithParametersData, CallWithResponseAndNoContentResponseData, CallWithResponseAndNoContentResponseResponse, CallWithResponseAndNoContentResponseResponses, CallWithResponseData, CallWithResponseResponse, CallWithResponseResponses, CallWithResponsesData, CallWithResponsesError, CallWithResponsesErrors, CallWithResponsesResponse, CallWithResponsesResponses, CallWithResultFromHeaderData, CallWithResultFromHeaderErrors, CallWithResultFromHeaderResponses, CallWithWeirdParameterNamesData, CamelCaseCommentWithBreaks, CharactersInDescription, ClientOptions, CollectionFormatData, CommentWithBackticks, CommentWithBackticksAndQuotes, CommentWithBreaks, CommentWithExpressionPlaceholders, CommentWithQuotes, CommentWithReservedCharacters, CommentWithSlashes, ComplexParamsData, ComplexParamsResponse, ComplexParamsResponses, ComplexTypesData, ComplexTypesErrors, ComplexTypesResponse, ComplexTypesResponses, CompositionBaseModel, CompositionExtendedModel, CompositionWithAllOfAndNullable, CompositionWithAnyOf, CompositionWithAnyOfAndNullable, CompositionWithAnyOfAnonymous, CompositionWithNestedAnyAndTypeNull, CompositionWithNestedAnyOfAndNull, CompositionWithOneOf, CompositionWithOneOfAndComplexArrayDictionary, CompositionWithOneOfAndNullable, CompositionWithOneOfAndProperties, CompositionWithOneOfAndSimpleArrayDictionary, CompositionWithOneOfAndSimpleDictionary, CompositionWithOneOfAnonymous, CompositionWithOneOfDiscriminator, ConstValue, Default, DeleteCallWithoutParametersAndResponseData, DeleteFooData, DeleteFooData2, DeleteFooData3, DeprecatedCallData, DeprecatedModel, DictionaryWithArray, DictionaryWithDictionary, DictionaryWithProperties, DictionaryWithPropertiesAndAdditionalProperties, DictionaryWithReference, DictionaryWithString, DummyAData, DummyAResponse, DummyAResponses, DummyBData, DummyBResponse, DummyBResponses, DuplicateName2Data, DuplicateName3Data, DuplicateName4Data, DuplicateNameData, EnumFromDescription, EnumWithExtensions, EnumWithNumbers, EnumWithReplacedCharacters, EnumWithStrings, EnumWithXEnumNames, ExportData, ExternalRefA, ExternalRefB, ExternalSharedModel, File, FileResponseData, FileResponseResponse, FileResponseResponses, FileWritable, FooWowData, FooWowResponses, FreeFormObjectWithAdditionalPropertiesEqEmptyObject, FreeFormObjectWithAdditionalPropertiesEqTrue, FreeFormObjectWithoutAdditionalProperties, GenericSchemaDuplicateIssue1SystemBoolean, GenericSchemaDuplicateIssue1SystemBooleanWritable, GenericSchemaDuplicateIssue1SystemString, GenericSchemaDuplicateIssue1SystemStringWritable, GetApiVbyApiVersionSimpleOperationData, GetApiVbyApiVersionSimpleOperationError, GetApiVbyApiVersionSimpleOperationErrors, GetApiVbyApiVersionSimpleOperationResponse, GetApiVbyApiVersionSimpleOperationResponses, GetCallWithOptionalParamData, GetCallWithoutParametersAndResponseData, HeadCallWithoutParametersAndResponseData, Import, ImportData, ImportResponse, ImportResponses, IoK8sApimachineryPkgApisMetaV1DeleteOptions, IoK8sApimachineryPkgApisMetaV1Preconditions, ModelCircle, ModelFromZendesk, ModelSquare, ModelThatExtends, ModelThatExtendsExtends, ModelWithAdditionalPropertiesEqTrue, ModelWithAdditionalPropertiesRef, ModelWithAnyOfConstantSizeArray, ModelWithAnyOfConstantSizeArrayAndIntersect, ModelWithAnyOfConstantSizeArrayNullable, ModelWithAnyOfConstantSizeArrayWithNSizeAndOptions, ModelWithAnyOfConstantSizeArrayWithNSizeAndOptionsWritable, ModelWithArray, ModelWithArrayReadOnlyAndWriteOnly, ModelWithArrayReadOnlyAndWriteOnlyWritable, ModelWithBackticksInDescription, ModelWithBoolean, ModelWithCircularReference, ModelWithConst, ModelWithConstantSizeArray, ModelWithDictionary, ModelWithDuplicateImports, ModelWithDuplicateProperties, ModelWithEnum, ModelWithEnumFromDescription, ModelWithEnumWithHyphen, ModelWithInteger, ModelWithNestedArrayEnums, ModelWithNestedArrayEnumsData, ModelWithNestedArrayEnumsDataBar, ModelWithNestedArrayEnumsDataFoo, ModelWithNestedCompositionEnums, ModelWithNestedEnums, ModelWithNestedProperties, ModelWithNullableObject, ModelWithNullableString, ModelWithNumericEnumUnion, ModelWithOneOfAndProperties, ModelWithOneOfEnum, ModelWithOrderedProperties, ModelWithPattern, ModelWithPatternWritable, ModelWithPrefixItemsConstantSizeArray, ModelWithProperties, ModelWithPropertiesWritable, ModelWithReadOnlyAndWriteOnly, ModelWithReadOnlyAndWriteOnlyWritable, ModelWithReference, ModelWithReferenceWritable, ModelWithString, ModelWithStringError, MultipartRequestData, MultipartResponseData, MultipartResponseResponse, MultipartResponseResponses, NestedAnyOfArraysNullable, NonAsciiæøåÆøÅöôêÊ字符串Data, NonAsciiæøåÆøÅöôêÊ字符串Response, NonAsciiæøåÆøÅöôêÊ字符串Responses, NonAsciiStringæøåÆøÅöôêÊ字符串, NullableObject, OneOfAllOfIssue, OneOfAllOfIssueWritable, OptionsCallWithoutParametersAndResponseData, Pageable, ParameterSimpleParameterUnused, PatchApiVbyApiVersionNoTagData, PatchApiVbyApiVersionNoTagResponses, PatchCallWithoutParametersAndResponseData, PostApiVbyApiVersionFormDataData, PostApiVbyApiVersionRequestBodyData, PostCallWithOptionalParamData, PostCallWithOptionalParamResponse, PostCallWithOptionalParamResponses, PostCallWithoutParametersAndResponseData, PostServiceWithEmptyTagResponse, PostServiceWithEmptyTagResponse2, PutCallWithoutParametersAndResponseData, PutWithFormUrlEncodedData, SchemaWithFormRestrictedKeys, SimpleBoolean, SimpleFile, SimpleFormData, SimpleInteger, SimpleParameter, SimpleReference, SimpleRequestBody, SimpleString, SimpleStringWithPattern, TestErrorCodeData, TestErrorCodeErrors, TestErrorCodeResponses, TypesData, TypesResponse, TypesResponses, UploadFileData, UploadFileResponse, UploadFileResponses, XFooBar } from './types.gen';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/vue-query/fetch/sdk.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport { type Client, formDataBodySerializer, type Options as Options2, type TDataShape, urlSearchParamsBodySerializer } from './client';\nimport { client } from './client.gen';\nimport type { ApiVVersionODataControllerCountData, ApiVVersionODataControllerCountResponses, CallToTestOrderOfParamsData, CallWithDefaultOptionalParametersData, CallWithDefaultParametersData, CallWithDescriptionsData, CallWithDuplicateResponsesData, CallWithDuplicateResponsesErrors, CallWithDuplicateResponsesResponses, CallWithNoContentResponseData, CallWithNoContentResponseResponses, CallWithParametersData, CallWithResponseAndNoContentResponseData, CallWithResponseAndNoContentResponseResponses, CallWithResponseData, CallWithResponseResponses, CallWithResponsesData, CallWithResponsesErrors, CallWithResponsesResponses, CallWithResultFromHeaderData, CallWithResultFromHeaderErrors, CallWithResultFromHeaderResponses, CallWithWeirdParameterNamesData, CollectionFormatData, ComplexParamsData, ComplexParamsResponses, ComplexTypesData, ComplexTypesErrors, ComplexTypesResponses, DeleteCallWithoutParametersAndResponseData, DeleteFooData3, DeprecatedCallData, DummyAData, DummyAResponses, DummyBData, DummyBResponses, DuplicateName2Data, DuplicateName3Data, DuplicateName4Data, DuplicateNameData, ExportData, FileResponseData, FileResponseResponses, FooWowData, FooWowResponses, GetApiVbyApiVersionSimpleOperationData, GetApiVbyApiVersionSimpleOperationErrors, GetApiVbyApiVersionSimpleOperationResponses, GetCallWithOptionalParamData, GetCallWithoutParametersAndResponseData, HeadCallWithoutParametersAndResponseData, ImportData, ImportResponses, MultipartRequestData, MultipartResponseData, MultipartResponseResponses, NonAsciiæøåÆøÅöôêÊ字符串Data, NonAsciiæøåÆøÅöôêÊ字符串Responses, OptionsCallWithoutParametersAndResponseData, PatchApiVbyApiVersionNoTagData, PatchApiVbyApiVersionNoTagResponses, PatchCallWithoutParametersAndResponseData, PostApiVbyApiVersionFormDataData, PostApiVbyApiVersionRequestBodyData, PostCallWithOptionalParamData, PostCallWithOptionalParamResponses, PostCallWithoutParametersAndResponseData, PutCallWithoutParametersAndResponseData, PutWithFormUrlEncodedData, TestErrorCodeData, TestErrorCodeErrors, TestErrorCodeResponses, TypesData, TypesResponses, UploadFileData, UploadFileResponses } from './types.gen';\n\nexport type Options<TData extends TDataShape = TDataShape, ThrowOnError extends boolean = boolean> = Options2<TData, ThrowOnError> & {\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\nexport const export_ = <ThrowOnError extends boolean = false>(options?: Options<ExportData, ThrowOnError>) => (options?.client ?? client).get<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/no+tag', ...options });\n\nexport const patchApiVbyApiVersionNoTag = <ThrowOnError extends boolean = false>(options?: Options<PatchApiVbyApiVersionNoTagData, ThrowOnError>) => (options?.client ?? client).patch<PatchApiVbyApiVersionNoTagResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/no+tag', ...options });\n\nexport const import_ = <ThrowOnError extends boolean = false>(options: Options<ImportData, ThrowOnError>) => (options.client ?? client).post<ImportResponses, unknown, ThrowOnError>({\n    url: '/api/v{api-version}/no+tag',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options.headers\n    }\n});\n\nexport const fooWow = <ThrowOnError extends boolean = false>(options?: Options<FooWowData, ThrowOnError>) => (options?.client ?? client).put<FooWowResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/no+tag', ...options });\n\nexport const apiVVersionODataControllerCount = <ThrowOnError extends boolean = false>(options?: Options<ApiVVersionODataControllerCountData, ThrowOnError>) => (options?.client ?? client).get<ApiVVersionODataControllerCountResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple/$count', ...options });\n\nexport const getApiVbyApiVersionSimpleOperation = <ThrowOnError extends boolean = false>(options: Options<GetApiVbyApiVersionSimpleOperationData, ThrowOnError>) => (options.client ?? client).get<GetApiVbyApiVersionSimpleOperationResponses, GetApiVbyApiVersionSimpleOperationErrors, ThrowOnError>({ url: '/api/v{api-version}/simple:operation', ...options });\n\nexport const deleteCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<DeleteCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).delete<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const getCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<GetCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).get<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const headCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<HeadCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).head<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const optionsCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<OptionsCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).options<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const patchCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<PatchCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).patch<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const postCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<PostCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).post<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const putCallWithoutParametersAndResponse = <ThrowOnError extends boolean = false>(options?: Options<PutCallWithoutParametersAndResponseData, ThrowOnError>) => (options?.client ?? client).put<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/simple', ...options });\n\nexport const deleteFoo = <ThrowOnError extends boolean = false>(options: Options<DeleteFooData3, ThrowOnError>) => (options.client ?? client).delete<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/foo/{foo_param}/bar/{BarParam}', ...options });\n\nexport const callWithDescriptions = <ThrowOnError extends boolean = false>(options?: Options<CallWithDescriptionsData, ThrowOnError>) => (options?.client ?? client).post<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/descriptions', ...options });\n\n/**\n * @deprecated\n */\nexport const deprecatedCall = <ThrowOnError extends boolean = false>(options: Options<DeprecatedCallData, ThrowOnError>) => (options.client ?? client).post<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/parameters/deprecated', ...options });\n\nexport const callWithParameters = <ThrowOnError extends boolean = false>(options: Options<CallWithParametersData, ThrowOnError>) => (options.client ?? client).post<unknown, unknown, ThrowOnError>({\n    url: '/api/v{api-version}/parameters/{parameterPath}',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options.headers\n    }\n});\n\nexport const callWithWeirdParameterNames = <ThrowOnError extends boolean = false>(options: Options<CallWithWeirdParameterNamesData, ThrowOnError>) => (options.client ?? client).post<unknown, unknown, ThrowOnError>({\n    url: '/api/v{api-version}/parameters/{parameter.path.1}/{parameter-path-2}/{PARAMETER-PATH-3}',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options.headers\n    }\n});\n\nexport const getCallWithOptionalParam = <ThrowOnError extends boolean = false>(options: Options<GetCallWithOptionalParamData, ThrowOnError>) => (options.client ?? client).get<unknown, unknown, ThrowOnError>({\n    url: '/api/v{api-version}/parameters',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options.headers\n    }\n});\n\nexport const postCallWithOptionalParam = <ThrowOnError extends boolean = false>(options: Options<PostCallWithOptionalParamData, ThrowOnError>) => (options.client ?? client).post<PostCallWithOptionalParamResponses, unknown, ThrowOnError>({\n    url: '/api/v{api-version}/parameters',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options.headers\n    }\n});\n\nexport const postApiVbyApiVersionRequestBody = <ThrowOnError extends boolean = false>(options?: Options<PostApiVbyApiVersionRequestBodyData, ThrowOnError>) => (options?.client ?? client).post<unknown, unknown, ThrowOnError>({\n    url: '/api/v{api-version}/requestBody',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options?.headers\n    }\n});\n\nexport const postApiVbyApiVersionFormData = <ThrowOnError extends boolean = false>(options?: Options<PostApiVbyApiVersionFormDataData, ThrowOnError>) => (options?.client ?? client).post<unknown, unknown, ThrowOnError>({\n    ...formDataBodySerializer,\n    url: '/api/v{api-version}/formData',\n    ...options,\n    headers: {\n        'Content-Type': null,\n        ...options?.headers\n    }\n});\n\nexport const callWithDefaultParameters = <ThrowOnError extends boolean = false>(options?: Options<CallWithDefaultParametersData, ThrowOnError>) => (options?.client ?? client).get<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/defaults', ...options });\n\nexport const callWithDefaultOptionalParameters = <ThrowOnError extends boolean = false>(options?: Options<CallWithDefaultOptionalParametersData, ThrowOnError>) => (options?.client ?? client).post<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/defaults', ...options });\n\nexport const callToTestOrderOfParams = <ThrowOnError extends boolean = false>(options: Options<CallToTestOrderOfParamsData, ThrowOnError>) => (options.client ?? client).put<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/defaults', ...options });\n\nexport const duplicateName = <ThrowOnError extends boolean = false>(options?: Options<DuplicateNameData, ThrowOnError>) => (options?.client ?? client).delete<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/duplicate', ...options });\n\nexport const duplicateName2 = <ThrowOnError extends boolean = false>(options?: Options<DuplicateName2Data, ThrowOnError>) => (options?.client ?? client).get<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/duplicate', ...options });\n\nexport const duplicateName3 = <ThrowOnError extends boolean = false>(options?: Options<DuplicateName3Data, ThrowOnError>) => (options?.client ?? client).post<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/duplicate', ...options });\n\nexport const duplicateName4 = <ThrowOnError extends boolean = false>(options?: Options<DuplicateName4Data, ThrowOnError>) => (options?.client ?? client).put<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/duplicate', ...options });\n\nexport const callWithNoContentResponse = <ThrowOnError extends boolean = false>(options?: Options<CallWithNoContentResponseData, ThrowOnError>) => (options?.client ?? client).get<CallWithNoContentResponseResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/no-content', ...options });\n\nexport const callWithResponseAndNoContentResponse = <ThrowOnError extends boolean = false>(options?: Options<CallWithResponseAndNoContentResponseData, ThrowOnError>) => (options?.client ?? client).get<CallWithResponseAndNoContentResponseResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/multiple-tags/response-and-no-content', ...options });\n\nexport const dummyA = <ThrowOnError extends boolean = false>(options?: Options<DummyAData, ThrowOnError>) => (options?.client ?? client).get<DummyAResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/multiple-tags/a', ...options });\n\nexport const dummyB = <ThrowOnError extends boolean = false>(options?: Options<DummyBData, ThrowOnError>) => (options?.client ?? client).get<DummyBResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/multiple-tags/b', ...options });\n\nexport const callWithResponse = <ThrowOnError extends boolean = false>(options?: Options<CallWithResponseData, ThrowOnError>) => (options?.client ?? client).get<CallWithResponseResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/response', ...options });\n\nexport const callWithDuplicateResponses = <ThrowOnError extends boolean = false>(options?: Options<CallWithDuplicateResponsesData, ThrowOnError>) => (options?.client ?? client).post<CallWithDuplicateResponsesResponses, CallWithDuplicateResponsesErrors, ThrowOnError>({ url: '/api/v{api-version}/response', ...options });\n\nexport const callWithResponses = <ThrowOnError extends boolean = false>(options?: Options<CallWithResponsesData, ThrowOnError>) => (options?.client ?? client).put<CallWithResponsesResponses, CallWithResponsesErrors, ThrowOnError>({ url: '/api/v{api-version}/response', ...options });\n\nexport const collectionFormat = <ThrowOnError extends boolean = false>(options: Options<CollectionFormatData, ThrowOnError>) => (options.client ?? client).get<unknown, unknown, ThrowOnError>({ url: '/api/v{api-version}/collectionFormat', ...options });\n\nexport const types = <ThrowOnError extends boolean = false>(options: Options<TypesData, ThrowOnError>) => (options.client ?? client).get<TypesResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/types', ...options });\n\nexport const uploadFile = <ThrowOnError extends boolean = false>(options: Options<UploadFileData, ThrowOnError>) => (options.client ?? client).post<UploadFileResponses, unknown, ThrowOnError>({\n    ...urlSearchParamsBodySerializer,\n    url: '/api/v{api-version}/upload',\n    ...options,\n    headers: {\n        'Content-Type': 'application/x-www-form-urlencoded',\n        ...options.headers\n    }\n});\n\nexport const fileResponse = <ThrowOnError extends boolean = false>(options: Options<FileResponseData, ThrowOnError>) => (options.client ?? client).get<FileResponseResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/file/{id}', ...options });\n\nexport const complexTypes = <ThrowOnError extends boolean = false>(options: Options<ComplexTypesData, ThrowOnError>) => (options.client ?? client).get<ComplexTypesResponses, ComplexTypesErrors, ThrowOnError>({\n    querySerializer: { parameters: { parameterObject: { object: { style: 'form' } } } },\n    url: '/api/v{api-version}/complex',\n    ...options\n});\n\nexport const multipartResponse = <ThrowOnError extends boolean = false>(options?: Options<MultipartResponseData, ThrowOnError>) => (options?.client ?? client).get<MultipartResponseResponses, unknown, ThrowOnError>({ url: '/api/v{api-version}/multipart', ...options });\n\nexport const multipartRequest = <ThrowOnError extends boolean = false>(options?: Options<MultipartRequestData, ThrowOnError>) => (options?.client ?? client).post<unknown, unknown, ThrowOnError>({\n    ...formDataBodySerializer,\n    url: '/api/v{api-version}/multipart',\n    ...options,\n    headers: {\n        'Content-Type': null,\n        ...options?.headers\n    }\n});\n\nexport const complexParams = <ThrowOnError extends boolean = false>(options: Options<ComplexParamsData, ThrowOnError>) => (options.client ?? client).put<ComplexParamsResponses, unknown, ThrowOnError>({\n    url: '/api/v{api-version}/complex/{id}',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json-patch+json',\n        ...options.headers\n    }\n});\n\nexport const callWithResultFromHeader = <ThrowOnError extends boolean = false>(options?: Options<CallWithResultFromHeaderData, ThrowOnError>) => (options?.client ?? client).post<CallWithResultFromHeaderResponses, CallWithResultFromHeaderErrors, ThrowOnError>({ url: '/api/v{api-version}/header', ...options });\n\nexport const testErrorCode = <ThrowOnError extends boolean = false>(options: Options<TestErrorCodeData, ThrowOnError>) => (options.client ?? client).post<TestErrorCodeResponses, TestErrorCodeErrors, ThrowOnError>({ url: '/api/v{api-version}/error', ...options });\n\nexport const nonAsciiæøåÆøÅöôêÊ字符串 = <ThrowOnError extends boolean = false>(options: Options<NonAsciiæøåÆøÅöôêÊ字符串Data, ThrowOnError>) => (options.client ?? client).post<NonAsciiæøåÆøÅöôêÊ字符串Responses, unknown, ThrowOnError>({ url: '/api/v{api-version}/non-ascii-æøåÆØÅöôêÊ字符串', ...options });\n\n/**\n * Login User\n */\nexport const putWithFormUrlEncoded = <ThrowOnError extends boolean = false>(options: Options<PutWithFormUrlEncodedData, ThrowOnError>) => (options.client ?? client).put<unknown, unknown, ThrowOnError>({\n    ...urlSearchParamsBodySerializer,\n    url: '/api/v{api-version}/non-ascii-æøåÆØÅöôêÊ字符串',\n    ...options,\n    headers: {\n        'Content-Type': 'application/x-www-form-urlencoded',\n        ...options.headers\n    }\n});\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/vue-query/fetch/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type ClientOptions = {\n    baseUrl: 'http://localhost:3000/base' | (string & {});\n};\n\n/**\n * Model with number-only name\n */\nexport type _400 = string;\n\n/**\n * External ref to shared model (A)\n */\nexport type ExternalRefA = ExternalSharedModel;\n\n/**\n * External ref to shared model (B)\n */\nexport type ExternalRefB = ExternalSharedModel;\n\n/**\n * Testing multiline comments in string: First line\n * Second line\n *\n * Fourth line\n */\nexport type CamelCaseCommentWithBreaks = number;\n\n/**\n * Testing multiline comments in string: First line\n * Second line\n *\n * Fourth line\n */\nexport type CommentWithBreaks = number;\n\n/**\n * Testing backticks in string: `backticks` and ```multiple backticks``` should work\n */\nexport type CommentWithBackticks = number;\n\n/**\n * Testing backticks and quotes in string: `backticks`, 'quotes', \"double quotes\" and ```multiple backticks``` should work\n */\nexport type CommentWithBackticksAndQuotes = number;\n\n/**\n * Testing slashes in string: \\backwards\\\\\\ and /forwards/// should work\n */\nexport type CommentWithSlashes = number;\n\n/**\n * Testing expression placeholders in string: ${expression} should work\n */\nexport type CommentWithExpressionPlaceholders = number;\n\n/**\n * Testing quotes in string: 'single quote''' and \"double quotes\"\"\" should work\n */\nexport type CommentWithQuotes = number;\n\n/**\n * Testing reserved characters in string: * inline * and ** inline ** should work\n */\nexport type CommentWithReservedCharacters = number;\n\n/**\n * This is a simple number\n */\nexport type SimpleInteger = number;\n\n/**\n * This is a simple boolean\n */\nexport type SimpleBoolean = boolean;\n\n/**\n * This is a simple string\n */\nexport type SimpleString = string;\n\n/**\n * A string with non-ascii (unicode) characters valid in typescript identifiers (æøåÆØÅöÔèÈ字符串)\n */\nexport type NonAsciiStringæøåÆøÅöôêÊ字符串 = string;\n\n/**\n * This is a simple file\n */\nexport type SimpleFile = Blob | File;\n\n/**\n * This is a simple reference\n */\nexport type SimpleReference = ModelWithString;\n\n/**\n * This is a simple string\n */\nexport type SimpleStringWithPattern = string | null;\n\n/**\n * This is a simple enum with strings\n */\nexport type EnumWithStrings = 'Success' | 'Warning' | 'Error' | '\\'Single Quote\\'' | '\"Double Quotes\"' | 'Non-ascii: øæåôöØÆÅÔÖ字符串';\n\nexport type EnumWithReplacedCharacters = '\\'Single Quote\\'' | '\"Double Quotes\"' | 'øæåôöØÆÅÔÖ字符串' | 3.1 | '';\n\n/**\n * This is a simple enum with numbers\n */\nexport type EnumWithNumbers = 1 | 2 | 3 | 1.1 | 1.2 | 1.3 | 100 | 200 | 300 | -100 | -200 | -300 | -1.1 | -1.2 | -1.3;\n\n/**\n * Success=1,Warning=2,Error=3\n */\nexport type EnumFromDescription = number;\n\n/**\n * This is a simple enum with numbers\n */\nexport type EnumWithExtensions = 200 | 400 | 500;\n\nexport type EnumWithXEnumNames = 0 | 1 | 2;\n\n/**\n * This is a simple array with numbers\n */\nexport type ArrayWithNumbers = Array<number>;\n\n/**\n * This is a simple array with booleans\n */\nexport type ArrayWithBooleans = Array<boolean>;\n\n/**\n * This is a simple array with strings\n */\nexport type ArrayWithStrings = Array<string>;\n\n/**\n * This is a simple array with references\n */\nexport type ArrayWithReferences = Array<ModelWithString>;\n\n/**\n * This is a simple array containing an array\n */\nexport type ArrayWithArray = Array<Array<ModelWithString>>;\n\n/**\n * This is a simple array with properties\n */\nexport type ArrayWithProperties = Array<{\n    '16x16'?: CamelCaseCommentWithBreaks;\n    bar?: string;\n}>;\n\n/**\n * This is a simple array with any of properties\n */\nexport type ArrayWithAnyOfProperties = Array<{\n    foo?: string;\n} | {\n    bar?: string;\n}>;\n\nexport type AnyOfAnyAndNull = {\n    data?: unknown | null;\n};\n\n/**\n * This is a simple array with any of properties\n */\nexport type AnyOfArrays = {\n    results?: Array<{\n        foo?: string;\n    } | {\n        bar?: string;\n    }>;\n};\n\n/**\n * This is a string dictionary\n */\nexport type DictionaryWithString = {\n    [key: string]: string;\n};\n\nexport type DictionaryWithPropertiesAndAdditionalProperties = {\n    foo?: number;\n    bar?: boolean;\n    [key: string]: string | number | boolean | undefined;\n};\n\n/**\n * This is a string reference\n */\nexport type DictionaryWithReference = {\n    [key: string]: ModelWithString;\n};\n\n/**\n * This is a complex dictionary\n */\nexport type DictionaryWithArray = {\n    [key: string]: Array<ModelWithString>;\n};\n\n/**\n * This is a string dictionary\n */\nexport type DictionaryWithDictionary = {\n    [key: string]: {\n        [key: string]: string;\n    };\n};\n\n/**\n * This is a complex dictionary\n */\nexport type DictionaryWithProperties = {\n    [key: string]: {\n        foo?: string;\n        bar?: string;\n    };\n};\n\n/**\n * This is a model with one number property\n */\nexport type ModelWithInteger = {\n    /**\n     * This is a simple number property\n     */\n    prop?: number;\n};\n\n/**\n * This is a model with one boolean property\n */\nexport type ModelWithBoolean = {\n    /**\n     * This is a simple boolean property\n     */\n    prop?: boolean;\n};\n\n/**\n * This is a model with one string property\n */\nexport type ModelWithString = {\n    /**\n     * This is a simple string property\n     */\n    prop?: string;\n};\n\n/**\n * This is a model with one string property\n */\nexport type ModelWithStringError = {\n    /**\n     * This is a simple string property\n     */\n    prop?: string;\n};\n\n/**\n * `Comment` or `VoiceComment`. The JSON object for adding voice comments to tickets is different. See [Adding voice comments to tickets](/documentation/ticketing/managing-tickets/adding-voice-comments-to-tickets)\n */\nexport type ModelFromZendesk = string;\n\n/**\n * This is a model with one string property\n */\nexport type ModelWithNullableString = {\n    /**\n     * This is a simple string property\n     */\n    nullableProp1?: string | null;\n    /**\n     * This is a simple string property\n     */\n    nullableRequiredProp1: string | null;\n    /**\n     * This is a simple string property\n     */\n    nullableProp2?: string | null;\n    /**\n     * This is a simple string property\n     */\n    nullableRequiredProp2: string | null;\n    /**\n     * This is a simple enum with strings\n     */\n    'foo_bar-enum'?: 'Success' | 'Warning' | 'Error' | 'ØÆÅ字符串';\n};\n\n/**\n * This is a model with one enum\n */\nexport type ModelWithEnum = {\n    /**\n     * This is a simple enum with strings\n     */\n    'foo_bar-enum'?: 'Success' | 'Warning' | 'Error' | 'ØÆÅ字符串';\n    /**\n     * These are the HTTP error code enums\n     */\n    statusCode?: '100' | '200 FOO' | '300 FOO_BAR' | '400 foo-bar' | '500 foo.bar' | '600 foo&bar';\n    /**\n     * Simple boolean enum\n     */\n    bool?: true;\n};\n\n/**\n * This is a model with one enum with escaped name\n */\nexport type ModelWithEnumWithHyphen = {\n    /**\n     * Foo-Bar-Baz-Qux\n     */\n    'foo-bar-baz-qux'?: '3.0';\n};\n\n/**\n * This is a model with one enum\n */\nexport type ModelWithEnumFromDescription = {\n    /**\n     * Success=1,Warning=2,Error=3\n     */\n    test?: number;\n};\n\n/**\n * This is a model with nested enums\n */\nexport type ModelWithNestedEnums = {\n    dictionaryWithEnum?: {\n        [key: string]: 'Success' | 'Warning' | 'Error';\n    };\n    dictionaryWithEnumFromDescription?: {\n        [key: string]: number;\n    };\n    arrayWithEnum?: Array<'Success' | 'Warning' | 'Error'>;\n    arrayWithDescription?: Array<number>;\n    /**\n     * This is a simple enum with strings\n     */\n    'foo_bar-enum'?: 'Success' | 'Warning' | 'Error' | 'ØÆÅ字符串';\n};\n\n/**\n * This is a model with one property containing a reference\n */\nexport type ModelWithReference = {\n    prop?: ModelWithProperties;\n};\n\n/**\n * This is a model with one property containing an array\n */\nexport type ModelWithArrayReadOnlyAndWriteOnly = {\n    prop?: Array<ModelWithReadOnlyAndWriteOnly>;\n    propWithFile?: Array<Blob | File>;\n    propWithNumber?: Array<number>;\n};\n\n/**\n * This is a model with one property containing an array\n */\nexport type ModelWithArray = {\n    prop?: Array<ModelWithString>;\n    propWithFile?: Array<Blob | File>;\n    propWithNumber?: Array<number>;\n};\n\n/**\n * This is a model with one property containing a dictionary\n */\nexport type ModelWithDictionary = {\n    prop?: {\n        [key: string]: string;\n    };\n};\n\n/**\n * This is a deprecated model with a deprecated property\n *\n * @deprecated\n */\nexport type DeprecatedModel = {\n    /**\n     * This is a deprecated property\n     *\n     * @deprecated\n     */\n    prop?: string;\n};\n\n/**\n * This is a model with one property containing a circular reference\n */\nexport type ModelWithCircularReference = {\n    prop?: ModelWithCircularReference;\n};\n\n/**\n * This is a model with one property with a 'one of' relationship\n */\nexport type CompositionWithOneOf = {\n    propA?: ModelWithString | ModelWithEnum | ModelWithArray | ModelWithDictionary;\n};\n\n/**\n * This is a model with one property with a 'one of' relationship where the options are not $ref\n */\nexport type CompositionWithOneOfAnonymous = {\n    propA?: {\n        propA?: string;\n    } | string | number;\n};\n\n/**\n * Circle\n */\nexport type ModelCircle = {\n    kind: string;\n    radius?: number;\n};\n\n/**\n * Square\n */\nexport type ModelSquare = {\n    kind: string;\n    sideLength?: number;\n};\n\n/**\n * This is a model with one property with a 'one of' relationship where the options are not $ref\n */\nexport type CompositionWithOneOfDiscriminator = ({\n    kind: 'circle';\n} & ModelCircle) | ({\n    kind: 'square';\n} & ModelSquare);\n\n/**\n * This is a model with one property with a 'any of' relationship\n */\nexport type CompositionWithAnyOf = {\n    propA?: ModelWithString | ModelWithEnum | ModelWithArray | ModelWithDictionary;\n};\n\n/**\n * This is a model with one property with a 'any of' relationship where the options are not $ref\n */\nexport type CompositionWithAnyOfAnonymous = {\n    propA?: {\n        propA?: string;\n    } | string | number;\n};\n\n/**\n * This is a model with nested 'any of' property with a type null\n */\nexport type CompositionWithNestedAnyAndTypeNull = {\n    propA?: Array<ModelWithDictionary | null> | Array<ModelWithArray | null>;\n};\n\nexport type _3eNum1Период = 'Bird' | 'Dog';\n\nexport type ConstValue = 'ConstValue';\n\n/**\n * This is a model with one property with a 'any of' relationship where the options are not $ref\n */\nexport type CompositionWithNestedAnyOfAndNull = {\n    /**\n     * Scopes\n     */\n    propA?: Array<_3eNum1Период | ConstValue> | null;\n};\n\n/**\n * This is a model with one property with a 'one of' relationship\n */\nexport type CompositionWithOneOfAndNullable = {\n    propA?: {\n        boolean?: boolean;\n    } | ModelWithEnum | ModelWithArray | ModelWithDictionary | null;\n};\n\n/**\n * This is a model that contains a simple dictionary within composition\n */\nexport type CompositionWithOneOfAndSimpleDictionary = {\n    propA?: boolean | {\n        [key: string]: number;\n    };\n};\n\n/**\n * This is a model that contains a dictionary of simple arrays within composition\n */\nexport type CompositionWithOneOfAndSimpleArrayDictionary = {\n    propA?: boolean | {\n        [key: string]: Array<boolean>;\n    };\n};\n\n/**\n * This is a model that contains a dictionary of complex arrays (composited) within composition\n */\nexport type CompositionWithOneOfAndComplexArrayDictionary = {\n    propA?: boolean | {\n        [key: string]: Array<number | string>;\n    };\n};\n\n/**\n * This is a model with one property with a 'all of' relationship\n */\nexport type CompositionWithAllOfAndNullable = {\n    propA?: ({\n        boolean?: boolean;\n    } & ModelWithEnum & ModelWithArray & ModelWithDictionary) | null;\n};\n\n/**\n * This is a model with one property with a 'any of' relationship\n */\nexport type CompositionWithAnyOfAndNullable = {\n    propA?: {\n        boolean?: boolean;\n    } | ModelWithEnum | ModelWithArray | ModelWithDictionary | null;\n};\n\n/**\n * This is a base model with two simple optional properties\n */\nexport type CompositionBaseModel = {\n    firstName?: string;\n    lastname?: string;\n};\n\n/**\n * This is a model that extends the base model\n */\nexport type CompositionExtendedModel = CompositionBaseModel & {\n    age: number;\n    firstName: string;\n    lastname: string;\n};\n\n/**\n * This is a model with one nested property\n */\nexport type ModelWithProperties = {\n    required: string;\n    readonly requiredAndReadOnly: string;\n    requiredAndNullable: string | null;\n    string?: string;\n    number?: number;\n    boolean?: boolean;\n    reference?: ModelWithString;\n    'property with space'?: string;\n    default?: string;\n    try?: string;\n    readonly '@namespace.string'?: string;\n    readonly '@namespace.integer'?: number;\n};\n\n/**\n * This is a model with one nested property\n */\nexport type ModelWithNestedProperties = {\n    readonly first: {\n        readonly second: {\n            readonly third: string | null;\n        } | null;\n    } | null;\n};\n\n/**\n * This is a model with duplicated properties\n */\nexport type ModelWithDuplicateProperties = {\n    prop?: ModelWithString;\n};\n\n/**\n * This is a model with ordered properties\n */\nexport type ModelWithOrderedProperties = {\n    zebra?: string;\n    apple?: string;\n    hawaii?: string;\n};\n\n/**\n * This is a model with duplicated imports\n */\nexport type ModelWithDuplicateImports = {\n    propA?: ModelWithString;\n    propB?: ModelWithString;\n    propC?: ModelWithString;\n};\n\n/**\n * This is a model that extends another model\n */\nexport type ModelThatExtends = ModelWithString & {\n    propExtendsA?: string;\n    propExtendsB?: ModelWithString;\n};\n\n/**\n * This is a model that extends another model\n */\nexport type ModelThatExtendsExtends = ModelWithString & ModelThatExtends & {\n    propExtendsC?: string;\n    propExtendsD?: ModelWithString;\n};\n\n/**\n * This is a model that contains a some patterns\n */\nexport type ModelWithPattern = {\n    key: string;\n    name: string;\n    readonly enabled?: boolean;\n    readonly modified?: string;\n    id?: string;\n    text?: string;\n    patternWithSingleQuotes?: string;\n    patternWithNewline?: string;\n    patternWithBacktick?: string;\n    patternWithUnicode?: string;\n};\n\nexport type File = {\n    /**\n     * Id\n     */\n    readonly id?: string;\n    /**\n     * Updated at\n     */\n    readonly updated_at?: string;\n    /**\n     * Created at\n     */\n    readonly created_at?: string;\n    /**\n     * Mime\n     */\n    mime: string;\n    /**\n     * File\n     */\n    readonly file?: string;\n};\n\nexport type Default = {\n    name?: string;\n};\n\nexport type Pageable = {\n    page?: number;\n    size?: number;\n    sort?: Array<string>;\n};\n\n/**\n * This is a free-form object without additionalProperties.\n */\nexport type FreeFormObjectWithoutAdditionalProperties = {\n    [key: string]: unknown;\n};\n\n/**\n * This is a free-form object with additionalProperties: true.\n */\nexport type FreeFormObjectWithAdditionalPropertiesEqTrue = {\n    [key: string]: unknown;\n};\n\n/**\n * This is a free-form object with additionalProperties: {}.\n */\nexport type FreeFormObjectWithAdditionalPropertiesEqEmptyObject = {\n    [key: string]: unknown;\n};\n\nexport type ModelWithConst = {\n    String?: 'String';\n    number?: 0;\n    null?: null;\n    withType?: 'Some string';\n};\n\n/**\n * This is a model with one property and additionalProperties: true\n */\nexport type ModelWithAdditionalPropertiesEqTrue = {\n    /**\n     * This is a simple string property\n     */\n    prop?: string;\n    [key: string]: unknown;\n};\n\nexport type NestedAnyOfArraysNullable = {\n    nullableArray?: Array<string | boolean> | null;\n};\n\nexport type CompositionWithOneOfAndProperties = ({\n    foo: SimpleParameter;\n} | {\n    bar: NonAsciiStringæøåÆøÅöôêÊ字符串;\n}) & {\n    baz: number | null;\n    qux: number;\n};\n\n/**\n * An object that can be null\n */\nexport type NullableObject = {\n    foo?: string;\n} | null;\n\n/**\n * Some % character\n */\nexport type CharactersInDescription = string;\n\nexport type ModelWithNullableObject = {\n    data?: NullableObject;\n};\n\n/**\n * An object with additional properties that can be null (anyOf ref + null)\n */\nexport type ModelWithAdditionalPropertiesRef = {\n    [key: string]: NullableObject | null;\n};\n\nexport type ModelWithOneOfEnum = {\n    foo: 'Bar';\n} | {\n    foo: 'Baz';\n} | {\n    foo: 'Qux';\n} | {\n    content: string;\n    foo: 'Quux';\n} | {\n    content: [\n        string,\n        string\n    ];\n    foo: 'Corge';\n};\n\nexport type ModelWithNestedArrayEnumsDataFoo = 'foo' | 'bar';\n\nexport type ModelWithNestedArrayEnumsDataBar = 'baz' | 'qux';\n\nexport type ModelWithNestedArrayEnumsData = {\n    foo?: Array<ModelWithNestedArrayEnumsDataFoo>;\n    bar?: Array<ModelWithNestedArrayEnumsDataBar>;\n};\n\nexport type ModelWithNestedArrayEnums = {\n    array_strings?: Array<string>;\n    data?: ModelWithNestedArrayEnumsData;\n};\n\nexport type ModelWithNestedCompositionEnums = {\n    foo?: ModelWithNestedArrayEnumsDataFoo;\n};\n\nexport type ModelWithReadOnlyAndWriteOnly = {\n    foo: string;\n    readonly bar: string;\n};\n\nexport type ModelWithConstantSizeArray = [\n    number,\n    number\n];\n\nexport type ModelWithAnyOfConstantSizeArray = [\n    number | string,\n    number | string,\n    number | string\n];\n\nexport type ModelWithPrefixItemsConstantSizeArray = [\n    ModelWithInteger,\n    number | string,\n    string\n];\n\nexport type ModelWithAnyOfConstantSizeArrayNullable = [\n    number | null | string,\n    number | null | string,\n    number | null | string\n];\n\nexport type ModelWithAnyOfConstantSizeArrayWithNSizeAndOptions = [\n    number | Import,\n    number | Import\n];\n\nexport type ModelWithAnyOfConstantSizeArrayAndIntersect = [\n    number & string,\n    number & string\n];\n\nexport type ModelWithNumericEnumUnion = {\n    /**\n     * Период\n     */\n    value?: -10 | -1 | 0 | 1 | 3 | 6 | 12;\n};\n\n/**\n * Some description with `back ticks`\n */\nexport type ModelWithBackticksInDescription = {\n    /**\n     * The template `that` should be used for parsing and importing the contents of the CSV file.\n     *\n     * <br/><p>There is one placeholder currently supported:<ul>     <li><b>${x}</b> - refers to the n-th column in the CSV file, e.g. ${1}, ${2}, ...)</li></ul><p>Example of a correct JSON template:</p>\n     * <pre>\n     * [\n     * {\n     * \"resourceType\": \"Asset\",\n     * \"identifier\": {\n     * \"name\": \"${1}\",\n     * \"domain\": {\n     * \"name\": \"${2}\",\n     * \"community\": {\n     * \"name\": \"Some Community\"\n     * }\n     * }\n     * },\n     * \"attributes\" : {\n     * \"00000000-0000-0000-0000-000000003115\" : [ {\n     * \"value\" : \"${3}\"\n     * } ],\n     * \"00000000-0000-0000-0000-000000000222\" : [ {\n     * \"value\" : \"${4}\"\n     * } ]\n     * }\n     * }\n     * ]\n     * </pre>\n     */\n    template?: string;\n};\n\nexport type ModelWithOneOfAndProperties = (SimpleParameter | NonAsciiStringæøåÆøÅöôêÊ字符串) & {\n    baz: number | null;\n    qux: number;\n};\n\n/**\n * Model used to test deduplication strategy (unused)\n */\nexport type ParameterSimpleParameterUnused = string;\n\n/**\n * Model used to test deduplication strategy\n */\nexport type PostServiceWithEmptyTagResponse = string;\n\n/**\n * Model used to test deduplication strategy\n */\nexport type PostServiceWithEmptyTagResponse2 = string;\n\n/**\n * Model used to test deduplication strategy\n */\nexport type DeleteFooData = string;\n\n/**\n * Model used to test deduplication strategy\n */\nexport type DeleteFooData2 = string;\n\n/**\n * Model with restricted keyword name\n */\nexport type Import = string;\n\nexport type SchemaWithFormRestrictedKeys = {\n    description?: string;\n    'x-enum-descriptions'?: string;\n    'x-enum-varnames'?: string;\n    'x-enumNames'?: string;\n    title?: string;\n    object?: {\n        description?: string;\n        'x-enum-descriptions'?: string;\n        'x-enum-varnames'?: string;\n        'x-enumNames'?: string;\n        title?: string;\n    };\n    array?: Array<{\n        description?: string;\n        'x-enum-descriptions'?: string;\n        'x-enum-varnames'?: string;\n        'x-enumNames'?: string;\n        title?: string;\n    }>;\n};\n\n/**\n * This schema was giving PascalCase transformations a hard time\n */\nexport type IoK8sApimachineryPkgApisMetaV1DeleteOptions = {\n    /**\n     * Must be fulfilled before a deletion is carried out. If not possible, a 409 Conflict status will be returned.\n     */\n    preconditions?: IoK8sApimachineryPkgApisMetaV1Preconditions;\n};\n\n/**\n * This schema was giving PascalCase transformations a hard time\n */\nexport type IoK8sApimachineryPkgApisMetaV1Preconditions = {\n    /**\n     * Specifies the target ResourceVersion\n     */\n    resourceVersion?: string;\n    /**\n     * Specifies the target UID.\n     */\n    uid?: string;\n};\n\nexport type AdditionalPropertiesUnknownIssue = {\n    [key: string]: string | number;\n};\n\nexport type AdditionalPropertiesUnknownIssue2 = {\n    [key: string]: string | number;\n};\n\nexport type AdditionalPropertiesUnknownIssue3 = string & {\n    entries: {\n        [key: string]: AdditionalPropertiesUnknownIssue;\n    };\n};\n\nexport type AdditionalPropertiesIntegerIssue = {\n    value: number;\n    [key: string]: number;\n};\n\nexport type OneOfAllOfIssue = ((ConstValue | GenericSchemaDuplicateIssue1SystemBoolean) & _3eNum1Период) | GenericSchemaDuplicateIssue1SystemString;\n\nexport type GenericSchemaDuplicateIssue1SystemBoolean = {\n    item?: boolean;\n    error?: string | null;\n    readonly hasError?: boolean;\n    data?: {\n        [key: string]: never;\n    };\n};\n\nexport type GenericSchemaDuplicateIssue1SystemString = {\n    item?: string | null;\n    error?: string | null;\n    readonly hasError?: boolean;\n};\n\nexport type ExternalSharedModel = {\n    id: string;\n    name?: string;\n};\n\n/**\n * This is a model with one property containing a reference\n */\nexport type ModelWithReferenceWritable = {\n    prop?: ModelWithPropertiesWritable;\n};\n\n/**\n * This is a model with one property containing an array\n */\nexport type ModelWithArrayReadOnlyAndWriteOnlyWritable = {\n    prop?: Array<ModelWithReadOnlyAndWriteOnlyWritable>;\n    propWithFile?: Array<Blob | File>;\n    propWithNumber?: Array<number>;\n};\n\n/**\n * This is a model with one nested property\n */\nexport type ModelWithPropertiesWritable = {\n    required: string;\n    requiredAndNullable: string | null;\n    string?: string;\n    number?: number;\n    boolean?: boolean;\n    reference?: ModelWithString;\n    'property with space'?: string;\n    default?: string;\n    try?: string;\n};\n\n/**\n * This is a model that contains a some patterns\n */\nexport type ModelWithPatternWritable = {\n    key: string;\n    name: string;\n    id?: string;\n    text?: string;\n    patternWithSingleQuotes?: string;\n    patternWithNewline?: string;\n    patternWithBacktick?: string;\n    patternWithUnicode?: string;\n};\n\nexport type FileWritable = {\n    /**\n     * Mime\n     */\n    mime: string;\n};\n\nexport type ModelWithReadOnlyAndWriteOnlyWritable = {\n    foo: string;\n    baz: string;\n};\n\nexport type ModelWithAnyOfConstantSizeArrayWithNSizeAndOptionsWritable = [\n    number | Import,\n    number | Import\n];\n\nexport type AdditionalPropertiesUnknownIssueWritable = {\n    [key: string]: string | number;\n};\n\nexport type OneOfAllOfIssueWritable = ((ConstValue | GenericSchemaDuplicateIssue1SystemBoolean) & _3eNum1Период) | GenericSchemaDuplicateIssue1SystemString;\n\nexport type GenericSchemaDuplicateIssue1SystemBooleanWritable = {\n    item?: boolean;\n    error?: string | null;\n    data?: {\n        [key: string]: never;\n    };\n};\n\nexport type GenericSchemaDuplicateIssue1SystemStringWritable = {\n    item?: string | null;\n    error?: string | null;\n};\n\n/**\n * This is a reusable parameter\n */\nexport type SimpleParameter = string;\n\n/**\n * Parameter with illegal characters\n */\nexport type XFooBar = ModelWithString;\n\n/**\n * A reusable request body\n */\nexport type SimpleRequestBody = ModelWithString;\n\n/**\n * A reusable request body\n */\nexport type SimpleFormData = ModelWithString;\n\nexport type ExportData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no+tag';\n};\n\nexport type PatchApiVbyApiVersionNoTagData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no+tag';\n};\n\nexport type PatchApiVbyApiVersionNoTagResponses = {\n    /**\n     * OK\n     */\n    default: unknown;\n};\n\nexport type ImportData = {\n    body: ModelWithReadOnlyAndWriteOnlyWritable | ModelWithArrayReadOnlyAndWriteOnlyWritable;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no+tag';\n};\n\nexport type ImportResponses = {\n    /**\n     * Success\n     */\n    200: ModelFromZendesk;\n    /**\n     * Default success response\n     */\n    default: ModelWithReadOnlyAndWriteOnly;\n};\n\nexport type ImportResponse = ImportResponses[keyof ImportResponses];\n\nexport type FooWowData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no+tag';\n};\n\nexport type FooWowResponses = {\n    /**\n     * OK\n     */\n    default: unknown;\n};\n\nexport type ApiVVersionODataControllerCountData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple/$count';\n};\n\nexport type ApiVVersionODataControllerCountResponses = {\n    /**\n     * Success\n     */\n    200: ModelFromZendesk;\n};\n\nexport type ApiVVersionODataControllerCountResponse = ApiVVersionODataControllerCountResponses[keyof ApiVVersionODataControllerCountResponses];\n\nexport type GetApiVbyApiVersionSimpleOperationData = {\n    body?: never;\n    path: {\n        /**\n         * foo in method\n         */\n        foo_param: string;\n    };\n    query?: never;\n    url: '/api/v{api-version}/simple:operation';\n};\n\nexport type GetApiVbyApiVersionSimpleOperationErrors = {\n    /**\n     * Default error response\n     */\n    default: ModelWithBoolean;\n};\n\nexport type GetApiVbyApiVersionSimpleOperationError = GetApiVbyApiVersionSimpleOperationErrors[keyof GetApiVbyApiVersionSimpleOperationErrors];\n\nexport type GetApiVbyApiVersionSimpleOperationResponses = {\n    /**\n     * Response is a simple number\n     */\n    200: number;\n};\n\nexport type GetApiVbyApiVersionSimpleOperationResponse = GetApiVbyApiVersionSimpleOperationResponses[keyof GetApiVbyApiVersionSimpleOperationResponses];\n\nexport type DeleteCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type GetCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type HeadCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type OptionsCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type PatchCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type PostCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type PutCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type DeleteFooData3 = {\n    body?: never;\n    headers: {\n        /**\n         * Parameter with illegal characters\n         */\n        'x-Foo-Bar': ModelWithString;\n    };\n    path: {\n        /**\n         * foo in method\n         */\n        foo_param: string;\n        /**\n         * bar in method\n         */\n        BarParam: string;\n    };\n    query?: never;\n    url: '/api/v{api-version}/foo/{foo_param}/bar/{BarParam}';\n};\n\nexport type CallWithDescriptionsData = {\n    body?: never;\n    path?: never;\n    query?: {\n        /**\n         * Testing multiline comments in string: First line\n         * Second line\n         *\n         * Fourth line\n         */\n        parameterWithBreaks?: string;\n        /**\n         * Testing backticks in string: `backticks` and ```multiple backticks``` should work\n         */\n        parameterWithBackticks?: string;\n        /**\n         * Testing slashes in string: \\backwards\\\\\\ and /forwards/// should work\n         */\n        parameterWithSlashes?: string;\n        /**\n         * Testing expression placeholders in string: ${expression} should work\n         */\n        parameterWithExpressionPlaceholders?: string;\n        /**\n         * Testing quotes in string: 'single quote''' and \"double quotes\"\"\" should work\n         */\n        parameterWithQuotes?: string;\n        /**\n         * Testing reserved characters in string: * inline * and ** inline ** should work\n         */\n        parameterWithReservedCharacters?: string;\n    };\n    url: '/api/v{api-version}/descriptions';\n};\n\nexport type DeprecatedCallData = {\n    body?: never;\n    headers: {\n        /**\n         * This parameter is deprecated\n         *\n         * @deprecated\n         */\n        parameter: DeprecatedModel | null;\n    };\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/parameters/deprecated';\n};\n\nexport type CallWithParametersData = {\n    /**\n     * This is the parameter that goes into the body\n     */\n    body: {\n        [key: string]: unknown;\n    } | null;\n    headers: {\n        /**\n         * This is the parameter that goes into the header\n         */\n        parameterHeader: string | null;\n    };\n    path: {\n        /**\n         * This is the parameter that goes into the path\n         */\n        parameterPath: string | null;\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string | null;\n    };\n    query: {\n        foo_ref_enum?: ModelWithNestedArrayEnumsDataFoo;\n        foo_all_of_enum: ModelWithNestedArrayEnumsDataFoo;\n        /**\n         * This is the parameter that goes into the query params\n         */\n        cursor: string | null;\n    };\n    url: '/api/v{api-version}/parameters/{parameterPath}';\n};\n\nexport type CallWithWeirdParameterNamesData = {\n    /**\n     * This is the parameter that goes into the body\n     */\n    body: ModelWithString | null;\n    headers: {\n        /**\n         * This is the parameter that goes into the request header\n         */\n        'parameter.header': string | null;\n    };\n    path: {\n        /**\n         * This is the parameter that goes into the path\n         */\n        'parameter.path.1'?: string;\n        /**\n         * This is the parameter that goes into the path\n         */\n        'parameter-path-2'?: string;\n        /**\n         * This is the parameter that goes into the path\n         */\n        'PARAMETER-PATH-3'?: string;\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string | null;\n    };\n    query: {\n        /**\n         * This is the parameter with a reserved keyword\n         */\n        default?: string;\n        /**\n         * This is the parameter that goes into the request query params\n         */\n        'parameter-query': string | null;\n    };\n    url: '/api/v{api-version}/parameters/{parameter.path.1}/{parameter-path-2}/{PARAMETER-PATH-3}';\n};\n\nexport type GetCallWithOptionalParamData = {\n    /**\n     * This is a required parameter\n     */\n    body: ModelWithOneOfEnum;\n    path?: never;\n    query?: {\n        /**\n         * This is an optional parameter\n         */\n        page?: number;\n    };\n    url: '/api/v{api-version}/parameters';\n};\n\nexport type PostCallWithOptionalParamData = {\n    /**\n     * This is an optional parameter\n     */\n    body?: {\n        offset?: number | null;\n    };\n    path?: never;\n    query: {\n        /**\n         * This is a required parameter\n         */\n        parameter: Pageable;\n    };\n    url: '/api/v{api-version}/parameters';\n};\n\nexport type PostCallWithOptionalParamResponses = {\n    /**\n     * Response is a simple number\n     */\n    200: number;\n    /**\n     * Success\n     */\n    204: void;\n};\n\nexport type PostCallWithOptionalParamResponse = PostCallWithOptionalParamResponses[keyof PostCallWithOptionalParamResponses];\n\nexport type PostApiVbyApiVersionRequestBodyData = {\n    /**\n     * A reusable request body\n     */\n    body?: SimpleRequestBody;\n    path?: never;\n    query?: {\n        /**\n         * This is a reusable parameter\n         */\n        parameter?: string;\n    };\n    url: '/api/v{api-version}/requestBody';\n};\n\nexport type PostApiVbyApiVersionFormDataData = {\n    /**\n     * A reusable request body\n     */\n    body?: SimpleFormData;\n    path?: never;\n    query?: {\n        /**\n         * This is a reusable parameter\n         */\n        parameter?: string;\n    };\n    url: '/api/v{api-version}/formData';\n};\n\nexport type CallWithDefaultParametersData = {\n    body?: never;\n    path?: never;\n    query?: {\n        /**\n         * This is a simple string with default value\n         */\n        parameterString?: string | null;\n        /**\n         * This is a simple number with default value\n         */\n        parameterNumber?: number | null;\n        /**\n         * This is a simple boolean with default value\n         */\n        parameterBoolean?: boolean | null;\n        /**\n         * This is a simple enum with default value\n         */\n        parameterEnum?: 'Success' | 'Warning' | 'Error';\n        /**\n         * This is a simple model with default value\n         */\n        parameterModel?: ModelWithString | null;\n    };\n    url: '/api/v{api-version}/defaults';\n};\n\nexport type CallWithDefaultOptionalParametersData = {\n    body?: never;\n    path?: never;\n    query?: {\n        /**\n         * This is a simple string that is optional with default value\n         */\n        parameterString?: string;\n        /**\n         * This is a simple number that is optional with default value\n         */\n        parameterNumber?: number;\n        /**\n         * This is a simple boolean that is optional with default value\n         */\n        parameterBoolean?: boolean;\n        /**\n         * This is a simple enum that is optional with default value\n         */\n        parameterEnum?: 'Success' | 'Warning' | 'Error';\n        /**\n         * This is a simple model that is optional with default value\n         */\n        parameterModel?: ModelWithString;\n    };\n    url: '/api/v{api-version}/defaults';\n};\n\nexport type CallToTestOrderOfParamsData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * This is a optional string with default\n         */\n        parameterOptionalStringWithDefault?: string;\n        /**\n         * This is a optional string with empty default\n         */\n        parameterOptionalStringWithEmptyDefault?: string;\n        /**\n         * This is a optional string with no default\n         */\n        parameterOptionalStringWithNoDefault?: string;\n        /**\n         * This is a string with default\n         */\n        parameterStringWithDefault: string;\n        /**\n         * This is a string with empty default\n         */\n        parameterStringWithEmptyDefault: string;\n        /**\n         * This is a string with no default\n         */\n        parameterStringWithNoDefault: string;\n        /**\n         * This is a string that can be null with no default\n         */\n        parameterStringNullableWithNoDefault?: string | null;\n        /**\n         * This is a string that can be null with default\n         */\n        parameterStringNullableWithDefault?: string | null;\n    };\n    url: '/api/v{api-version}/defaults';\n};\n\nexport type DuplicateNameData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/duplicate';\n};\n\nexport type DuplicateName2Data = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/duplicate';\n};\n\nexport type DuplicateName3Data = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/duplicate';\n};\n\nexport type DuplicateName4Data = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/duplicate';\n};\n\nexport type CallWithNoContentResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no-content';\n};\n\nexport type CallWithNoContentResponseResponses = {\n    /**\n     * Success\n     */\n    204: void;\n};\n\nexport type CallWithNoContentResponseResponse = CallWithNoContentResponseResponses[keyof CallWithNoContentResponseResponses];\n\nexport type CallWithResponseAndNoContentResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multiple-tags/response-and-no-content';\n};\n\nexport type CallWithResponseAndNoContentResponseResponses = {\n    /**\n     * Response is a simple number\n     */\n    200: number;\n    /**\n     * Success\n     */\n    204: void;\n};\n\nexport type CallWithResponseAndNoContentResponseResponse = CallWithResponseAndNoContentResponseResponses[keyof CallWithResponseAndNoContentResponseResponses];\n\nexport type DummyAData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multiple-tags/a';\n};\n\nexport type DummyAResponses = {\n    200: _400;\n};\n\nexport type DummyAResponse = DummyAResponses[keyof DummyAResponses];\n\nexport type DummyBData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multiple-tags/b';\n};\n\nexport type DummyBResponses = {\n    /**\n     * Success\n     */\n    204: void;\n};\n\nexport type DummyBResponse = DummyBResponses[keyof DummyBResponses];\n\nexport type CallWithResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/response';\n};\n\nexport type CallWithResponseResponses = {\n    default: Import;\n};\n\nexport type CallWithResponseResponse = CallWithResponseResponses[keyof CallWithResponseResponses];\n\nexport type CallWithDuplicateResponsesData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/response';\n};\n\nexport type CallWithDuplicateResponsesErrors = {\n    /**\n     * Message for 500 error\n     */\n    500: ModelWithStringError;\n    /**\n     * Message for 501 error\n     */\n    501: ModelWithStringError;\n    /**\n     * Message for 502 error\n     */\n    502: ModelWithStringError;\n    /**\n     * Message for 4XX errors\n     */\n    '4XX': DictionaryWithArray;\n    /**\n     * Default error response\n     */\n    default: ModelWithBoolean;\n};\n\nexport type CallWithDuplicateResponsesError = CallWithDuplicateResponsesErrors[keyof CallWithDuplicateResponsesErrors];\n\nexport type CallWithDuplicateResponsesResponses = {\n    /**\n     * Message for 200 response\n     */\n    200: ModelWithBoolean & ModelWithInteger;\n    /**\n     * Message for 201 response\n     */\n    201: ModelWithString;\n    /**\n     * Message for 202 response\n     */\n    202: ModelWithString;\n};\n\nexport type CallWithDuplicateResponsesResponse = CallWithDuplicateResponsesResponses[keyof CallWithDuplicateResponsesResponses];\n\nexport type CallWithResponsesData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/response';\n};\n\nexport type CallWithResponsesErrors = {\n    /**\n     * Message for 500 error\n     */\n    500: ModelWithStringError;\n    /**\n     * Message for 501 error\n     */\n    501: ModelWithStringError;\n    /**\n     * Message for 502 error\n     */\n    502: ModelWithStringError;\n    /**\n     * Message for default response\n     */\n    default: ModelWithStringError;\n};\n\nexport type CallWithResponsesError = CallWithResponsesErrors[keyof CallWithResponsesErrors];\n\nexport type CallWithResponsesResponses = {\n    /**\n     * Message for 200 response\n     */\n    200: {\n        readonly '@namespace.string'?: string;\n        readonly '@namespace.integer'?: number;\n        readonly value?: Array<ModelWithString>;\n    };\n    /**\n     * Message for 201 response\n     */\n    201: ModelThatExtends;\n    /**\n     * Message for 202 response\n     */\n    202: ModelThatExtendsExtends;\n};\n\nexport type CallWithResponsesResponse = CallWithResponsesResponses[keyof CallWithResponsesResponses];\n\nexport type CollectionFormatData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * This is an array parameter that is sent as csv format (comma-separated values)\n         */\n        parameterArrayCSV: Array<string> | null;\n        /**\n         * This is an array parameter that is sent as ssv format (space-separated values)\n         */\n        parameterArraySSV: Array<string> | null;\n        /**\n         * This is an array parameter that is sent as tsv format (tab-separated values)\n         */\n        parameterArrayTSV: Array<string> | null;\n        /**\n         * This is an array parameter that is sent as pipes format (pipe-separated values)\n         */\n        parameterArrayPipes: Array<string> | null;\n        /**\n         * This is an array parameter that is sent as multi format (multiple parameter instances)\n         */\n        parameterArrayMulti: Array<string> | null;\n    };\n    url: '/api/v{api-version}/collectionFormat';\n};\n\nexport type TypesData = {\n    body?: never;\n    path?: {\n        /**\n         * This is a number parameter\n         */\n        id?: number;\n    };\n    query: {\n        /**\n         * This is a number parameter\n         */\n        parameterNumber: number;\n        /**\n         * This is a string parameter\n         */\n        parameterString: string | null;\n        /**\n         * This is a boolean parameter\n         */\n        parameterBoolean: boolean | null;\n        /**\n         * This is an object parameter\n         */\n        parameterObject: {\n            [key: string]: unknown;\n        } | null;\n        /**\n         * This is an array parameter\n         */\n        parameterArray: Array<string> | null;\n        /**\n         * This is a dictionary parameter\n         */\n        parameterDictionary: {\n            [key: string]: unknown;\n        } | null;\n        /**\n         * This is an enum parameter\n         */\n        parameterEnum: 'Success' | 'Warning' | 'Error' | null;\n    };\n    url: '/api/v{api-version}/types';\n};\n\nexport type TypesResponses = {\n    /**\n     * Response is a simple number\n     */\n    200: number;\n    /**\n     * Response is a simple string\n     */\n    201: string;\n    /**\n     * Response is a simple boolean\n     */\n    202: boolean;\n    /**\n     * Response is a simple object\n     */\n    203: {\n        [key: string]: unknown;\n    };\n};\n\nexport type TypesResponse = TypesResponses[keyof TypesResponses];\n\nexport type UploadFileData = {\n    body: Blob | File;\n    path: {\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string | null;\n    };\n    query?: never;\n    url: '/api/v{api-version}/upload';\n};\n\nexport type UploadFileResponses = {\n    200: boolean;\n};\n\nexport type UploadFileResponse = UploadFileResponses[keyof UploadFileResponses];\n\nexport type FileResponseData = {\n    body?: never;\n    path: {\n        id: string;\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string;\n    };\n    query?: never;\n    url: '/api/v{api-version}/file/{id}';\n};\n\nexport type FileResponseResponses = {\n    /**\n     * Success\n     */\n    200: Blob | File;\n};\n\nexport type FileResponseResponse = FileResponseResponses[keyof FileResponseResponses];\n\nexport type ComplexTypesData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * Parameter containing object\n         */\n        parameterObject: {\n            first?: {\n                second?: {\n                    third?: string;\n                };\n            };\n        };\n        /**\n         * Parameter containing reference\n         */\n        parameterReference: ModelWithString;\n    };\n    url: '/api/v{api-version}/complex';\n};\n\nexport type ComplexTypesErrors = {\n    /**\n     * 400 `server` error\n     */\n    400: unknown;\n    /**\n     * 500 server error\n     */\n    500: unknown;\n};\n\nexport type ComplexTypesResponses = {\n    /**\n     * Successful response\n     */\n    200: Array<ModelWithString>;\n};\n\nexport type ComplexTypesResponse = ComplexTypesResponses[keyof ComplexTypesResponses];\n\nexport type MultipartResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multipart';\n};\n\nexport type MultipartResponseResponses = {\n    /**\n     * OK\n     */\n    200: {\n        file?: Blob | File;\n        metadata?: {\n            foo?: string;\n            bar?: string;\n        };\n    };\n};\n\nexport type MultipartResponseResponse = MultipartResponseResponses[keyof MultipartResponseResponses];\n\nexport type MultipartRequestData = {\n    body?: {\n        content?: Blob | File;\n        data?: ModelWithString | null;\n    };\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multipart';\n};\n\nexport type ComplexParamsData = {\n    body?: {\n        readonly key: string | null;\n        name: string | null;\n        enabled?: boolean;\n        type: 'Monkey' | 'Horse' | 'Bird';\n        listOfModels?: Array<ModelWithString> | null;\n        listOfStrings?: Array<string> | null;\n        parameters: ModelWithString | ModelWithEnum | ModelWithArray | ModelWithDictionary;\n        readonly user?: {\n            readonly id?: number;\n            readonly name?: string | null;\n        };\n    };\n    path: {\n        id: number;\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string;\n    };\n    query?: never;\n    url: '/api/v{api-version}/complex/{id}';\n};\n\nexport type ComplexParamsResponses = {\n    /**\n     * Success\n     */\n    200: ModelWithString;\n};\n\nexport type ComplexParamsResponse = ComplexParamsResponses[keyof ComplexParamsResponses];\n\nexport type CallWithResultFromHeaderData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/header';\n};\n\nexport type CallWithResultFromHeaderErrors = {\n    /**\n     * 400 server error\n     */\n    400: unknown;\n    /**\n     * 500 server error\n     */\n    500: unknown;\n};\n\nexport type CallWithResultFromHeaderResponses = {\n    /**\n     * Successful response\n     */\n    200: unknown;\n};\n\nexport type TestErrorCodeData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * Status code to return\n         */\n        status: number;\n    };\n    url: '/api/v{api-version}/error';\n};\n\nexport type TestErrorCodeErrors = {\n    /**\n     * Custom message: Internal Server Error\n     */\n    500: unknown;\n    /**\n     * Custom message: Not Implemented\n     */\n    501: unknown;\n    /**\n     * Custom message: Bad Gateway\n     */\n    502: unknown;\n    /**\n     * Custom message: Service Unavailable\n     */\n    503: unknown;\n};\n\nexport type TestErrorCodeResponses = {\n    /**\n     * Custom message: Successful response\n     */\n    200: unknown;\n};\n\nexport type NonAsciiæøåÆøÅöôêÊ字符串Data = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * Dummy input param\n         */\n        nonAsciiParamæøåÆØÅöôêÊ: number;\n    };\n    url: '/api/v{api-version}/non-ascii-æøåÆØÅöôêÊ字符串';\n};\n\nexport type NonAsciiæøåÆøÅöôêÊ字符串Responses = {\n    /**\n     * Successful response\n     */\n    200: Array<NonAsciiStringæøåÆøÅöôêÊ字符串>;\n};\n\nexport type NonAsciiæøåÆøÅöôêÊ字符串Response = NonAsciiæøåÆøÅöôêÊ字符串Responses[keyof NonAsciiæøåÆøÅöôêÊ字符串Responses];\n\nexport type PutWithFormUrlEncodedData = {\n    body: ArrayWithStrings;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/non-ascii-æøåÆØÅöôêÊ字符串';\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/vue-query/name-builder/@tanstack/vue-query.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport { type DefaultError, queryOptions, type UseMutationOptions } from '@tanstack/vue-query';\n\nimport { client } from '../client.gen';\nimport { fooBarPost, fooBarPut, fooPost, fooPut, getFoo, getFooBar, type Options } from '../sdk.gen';\nimport type { FooBarPostData, FooBarPostResponse, FooBarPutData, FooBarPutResponse, FooPostData, FooPostResponse, FooPutData, FooPutResponse, GetFooBarData, GetFooBarResponse, GetFooData, GetFooResponse } from '../types.gen';\n\nexport type QueryKey<TOptions extends Options> = [\n    Pick<TOptions, 'baseUrl' | 'body' | 'headers' | 'path' | 'query'> & {\n        _id: string;\n        _infinite?: boolean;\n        tags?: ReadonlyArray<string>;\n    }\n];\n\nconst createQueryKey = <TOptions extends Options>(id: string, options?: TOptions, infinite?: boolean, tags?: ReadonlyArray<string>): [\n    QueryKey<TOptions>[0]\n] => {\n    const params: QueryKey<TOptions>[0] = { _id: id, baseUrl: options?.baseUrl || (options?.client ?? client).getConfig().baseUrl } as QueryKey<TOptions>[0];\n    if (infinite) {\n        params._infinite = infinite;\n    }\n    if (tags) {\n        params.tags = tags;\n    }\n    if (options?.body) {\n        params.body = options.body;\n    }\n    if (options?.headers) {\n        params.headers = options.headers;\n    }\n    if (options?.path) {\n        params.path = options.path;\n    }\n    if (options?.query) {\n        params.query = options.query;\n    }\n    return [params];\n};\n\nexport const getFooD = (options?: Options<GetFooData>) => createQueryKey('getFoo', options);\n\nexport const getFooE = (options?: Options<GetFooData>) => queryOptions<GetFooResponse, DefaultError, GetFooResponse, ReturnType<typeof getFooD>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await getFoo({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: getFooD(options)\n});\n\nexport const fooPostC = (options?: Partial<Options<FooPostData>>): UseMutationOptions<FooPostResponse, DefaultError, Options<FooPostData>> => {\n    const mutationOptions: UseMutationOptions<FooPostResponse, DefaultError, Options<FooPostData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await fooPost({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const fooPutC = (options?: Partial<Options<FooPutData>>): UseMutationOptions<FooPutResponse, DefaultError, Options<FooPutData>> => {\n    const mutationOptions: UseMutationOptions<FooPutResponse, DefaultError, Options<FooPutData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await fooPut({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const getFooBarD = (options?: Options<GetFooBarData>) => createQueryKey('getFooBar', options);\n\nexport const getFooBarE = (options?: Options<GetFooBarData>) => queryOptions<GetFooBarResponse, DefaultError, GetFooBarResponse, ReturnType<typeof getFooBarD>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await getFooBar({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: getFooBarD(options)\n});\n\nexport const fooBarPostC = (options?: Partial<Options<FooBarPostData>>): UseMutationOptions<FooBarPostResponse, DefaultError, Options<FooBarPostData>> => {\n    const mutationOptions: UseMutationOptions<FooBarPostResponse, DefaultError, Options<FooBarPostData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await fooBarPost({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n\nexport const fooBarPutC = (options?: Partial<Options<FooBarPutData>>): UseMutationOptions<FooBarPutResponse, DefaultError, Options<FooBarPutData>> => {\n    const mutationOptions: UseMutationOptions<FooBarPutResponse, DefaultError, Options<FooBarPutData>> = {\n        mutationFn: async (fnOptions) => {\n            const { data } = await fooBarPut({\n                ...options,\n                ...fnOptions,\n                throwOnError: true\n            });\n            return data;\n        }\n    };\n    return mutationOptions;\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/vue-query/name-builder/client/client.gen.ts",
    "content": "// 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 (options: RequestOptions) => {\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 url = buildUrl(opts);\n\n    return { opts, url };\n  };\n\n  const request: Client['request'] = async (options) => {\n    // @ts-expect-error\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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/vue-query/name-builder/client/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type { Auth } from '../core/auth.gen';\nexport type { QuerySerializerOptions } from '../core/bodySerializer.gen';\nexport {\n  formDataBodySerializer,\n  jsonBodySerializer,\n  urlSearchParamsBodySerializer,\n} from '../core/bodySerializer.gen';\nexport { buildClientParams } from '../core/params.gen';\nexport { serializeQueryKeyValue } from '../core/queryKeySerializer.gen';\nexport { createClient } from './client.gen';\nexport type {\n  Client,\n  ClientOptions,\n  Config,\n  CreateClientConfig,\n  Options,\n  RequestOptions,\n  RequestResult,\n  ResolvedRequestOptions,\n  ResponseStyle,\n  TDataShape,\n} from './types.gen';\nexport { createConfig, mergeHeaders } from './utils.gen';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/vue-query/name-builder/client/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { Auth } from '../core/auth.gen';\nimport type {\n  ServerSentEventsOptions,\n  ServerSentEventsResult,\n} from '../core/serverSentEvents.gen';\nimport type { Client as CoreClient, Config as CoreConfig } from '../core/types.gen';\nimport type { Middleware } from './utils.gen';\n\nexport type ResponseStyle = 'data' | 'fields';\n\nexport interface Config<T extends ClientOptions = ClientOptions>\n  extends Omit<RequestInit, 'body' | 'headers' | 'method'>, CoreConfig {\n  /**\n   * Base URL for all requests made by this client.\n   */\n  baseUrl?: T['baseUrl'];\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   * Please don't use the Fetch client for Next.js applications. The `next`\n   * options won't have any effect.\n   *\n   * Install {@link https://www.npmjs.com/package/@hey-api/client-next `@hey-api/client-next`} instead.\n   */\n  next?: never;\n  /**\n   * Return the response data parsed in a specified format. By default, `auto`\n   * will infer the appropriate method from the `Content-Type` response header.\n   * You can override this behavior with any of the {@link Body} methods.\n   * Select `stream` if you don't want to parse response data at all.\n   *\n   * @default 'auto'\n   */\n  parseAs?: 'arrayBuffer' | 'auto' | 'blob' | 'formData' | 'json' | 'stream' | 'text';\n  /**\n   * Should we return only data or multiple fields (data, error, response, etc.)?\n   *\n   * @default 'fields'\n   */\n  responseStyle?: ResponseStyle;\n  /**\n   * Throw an error instead of returning it in the response?\n   *\n   * @default false\n   */\n  throwOnError?: T['throwOnError'];\n}\n\nexport interface RequestOptions<\n  TData = unknown,\n  TResponseStyle extends ResponseStyle = 'fields',\n  ThrowOnError extends boolean = boolean,\n  Url extends string = string,\n>\n  extends\n    Config<{\n      responseStyle: TResponseStyle;\n      throwOnError: ThrowOnError;\n    }>,\n    Pick<\n      ServerSentEventsOptions<TData>,\n      | 'onRequest'\n      | 'onSseError'\n      | 'onSseEvent'\n      | 'sseDefaultRetryDelay'\n      | 'sseMaxRetryAttempts'\n      | 'sseMaxRetryDelay'\n    > {\n  /**\n   * Any body that you want to add to your request.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/fetch#body}\n   */\n  body?: unknown;\n  path?: Record<string, unknown>;\n  query?: Record<string, unknown>;\n  /**\n   * Security mechanism(s) to use for the request.\n   */\n  security?: ReadonlyArray<Auth>;\n  url: Url;\n}\n\nexport interface ResolvedRequestOptions<\n  TResponseStyle extends ResponseStyle = 'fields',\n  ThrowOnError extends boolean = boolean,\n  Url extends string = string,\n> extends RequestOptions<unknown, TResponseStyle, ThrowOnError, Url> {\n  serializedBody?: string;\n}\n\nexport type RequestResult<\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = boolean,\n  TResponseStyle extends ResponseStyle = 'fields',\n> = ThrowOnError extends true\n  ? Promise<\n      TResponseStyle extends 'data'\n        ? TData extends Record<string, unknown>\n          ? TData[keyof TData]\n          : TData\n        : {\n            data: TData extends Record<string, unknown> ? TData[keyof TData] : TData;\n            request: Request;\n            response: Response;\n          }\n    >\n  : Promise<\n      TResponseStyle extends 'data'\n        ? (TData extends Record<string, unknown> ? TData[keyof TData] : TData) | undefined\n        : (\n            | {\n                data: TData extends Record<string, unknown> ? TData[keyof TData] : TData;\n                error: undefined;\n              }\n            | {\n                data: undefined;\n                error: TError extends Record<string, unknown> ? TError[keyof TError] : TError;\n              }\n          ) & {\n            request: Request;\n            response: Response;\n          }\n    >;\n\nexport interface ClientOptions {\n  baseUrl?: string;\n  responseStyle?: ResponseStyle;\n  throwOnError?: boolean;\n}\n\ntype MethodFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'>,\n) => RequestResult<TData, TError, ThrowOnError, TResponseStyle>;\n\ntype SseFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'>,\n) => Promise<ServerSentEventsResult<TData, TError>>;\n\ntype RequestFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'> &\n    Pick<Required<RequestOptions<TData, TResponseStyle, ThrowOnError>>, 'method'>,\n) => RequestResult<TData, TError, ThrowOnError, TResponseStyle>;\n\ntype BuildUrlFn = <\n  TData extends {\n    body?: unknown;\n    path?: Record<string, unknown>;\n    query?: Record<string, unknown>;\n    url: string;\n  },\n>(\n  options: TData & Options<TData>,\n) => string;\n\nexport type Client = CoreClient<RequestFn, Config, MethodFn, BuildUrlFn, SseFn> & {\n  interceptors: Middleware<Request, Response, unknown, ResolvedRequestOptions>;\n};\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 = ClientOptions> = (\n  override?: Config<ClientOptions & T>,\n) => Config<Required<ClientOptions> & T>;\n\nexport interface TDataShape {\n  body?: unknown;\n  headers?: unknown;\n  path?: unknown;\n  query?: unknown;\n  url: string;\n}\n\ntype OmitKeys<T, K> = Pick<T, Exclude<keyof T, K>>;\n\nexport type Options<\n  TData extends TDataShape = TDataShape,\n  ThrowOnError extends boolean = boolean,\n  TResponse = unknown,\n  TResponseStyle extends ResponseStyle = 'fields',\n> = OmitKeys<\n  RequestOptions<TResponse, TResponseStyle, ThrowOnError>,\n  'body' | 'path' | 'query' | 'url'\n> &\n  ([TData] extends [never] ? unknown : Omit<TData, 'url'>);\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/vue-query/name-builder/client/utils.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/vue-query/name-builder/client.gen.ts",
    "content": "// 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>());\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/vue-query/name-builder/core/auth.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/vue-query/name-builder/core/bodySerializer.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/vue-query/name-builder/core/params.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/vue-query/name-builder/core/pathSerializer.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/vue-query/name-builder/core/queryKeySerializer.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\n/**\n * JSON-friendly union that mirrors what Pinia Colada can hash.\n */\nexport type JsonValue =\n  | null\n  | string\n  | number\n  | boolean\n  | JsonValue[]\n  | { [key: string]: JsonValue };\n\n/**\n * Replacer that converts non-JSON values (bigint, Date, etc.) to safe substitutes.\n */\nexport const queryKeyJsonReplacer = (_key: string, value: unknown) => {\n  if (value === undefined || typeof value === 'function' || typeof value === 'symbol') {\n    return undefined;\n  }\n  if (typeof value === 'bigint') {\n    return value.toString();\n  }\n  if (value instanceof Date) {\n    return value.toISOString();\n  }\n  return value;\n};\n\n/**\n * Safely stringifies a value and parses it back into a JsonValue.\n */\nexport const stringifyToJsonValue = (input: unknown): JsonValue | undefined => {\n  try {\n    const json = JSON.stringify(input, queryKeyJsonReplacer);\n    if (json === undefined) {\n      return undefined;\n    }\n    return JSON.parse(json) as JsonValue;\n  } catch {\n    return undefined;\n  }\n};\n\n/**\n * Detects plain objects (including objects with a null prototype).\n */\nconst isPlainObject = (value: unknown): value is Record<string, unknown> => {\n  if (value === null || typeof value !== 'object') {\n    return false;\n  }\n  const prototype = Object.getPrototypeOf(value as object);\n  return prototype === Object.prototype || prototype === null;\n};\n\n/**\n * Turns URLSearchParams into a sorted JSON object for deterministic keys.\n */\nconst serializeSearchParams = (params: URLSearchParams): JsonValue => {\n  const entries = Array.from(params.entries()).sort(([a], [b]) => a.localeCompare(b));\n  const result: Record<string, JsonValue> = {};\n\n  for (const [key, value] of entries) {\n    const existing = result[key];\n    if (existing === undefined) {\n      result[key] = value;\n      continue;\n    }\n\n    if (Array.isArray(existing)) {\n      (existing as string[]).push(value);\n    } else {\n      result[key] = [existing, value];\n    }\n  }\n\n  return result;\n};\n\n/**\n * Normalizes any accepted value into a JSON-friendly shape for query keys.\n */\nexport const serializeQueryKeyValue = (value: unknown): JsonValue | undefined => {\n  if (value === null) {\n    return null;\n  }\n\n  if (typeof value === 'string' || typeof value === 'number' || typeof value === 'boolean') {\n    return value;\n  }\n\n  if (value === undefined || typeof value === 'function' || typeof value === 'symbol') {\n    return undefined;\n  }\n\n  if (typeof value === 'bigint') {\n    return value.toString();\n  }\n\n  if (value instanceof Date) {\n    return value.toISOString();\n  }\n\n  if (Array.isArray(value)) {\n    return stringifyToJsonValue(value);\n  }\n\n  if (typeof URLSearchParams !== 'undefined' && value instanceof URLSearchParams) {\n    return serializeSearchParams(value);\n  }\n\n  if (isPlainObject(value)) {\n    return stringifyToJsonValue(value);\n  }\n\n  return undefined;\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/vue-query/name-builder/core/serverSentEvents.gen.ts",
    "content": "// 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 const 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            // Normalize line endings: CRLF -> LF, then CR -> LF\n            buffer = buffer.replace(/\\r\\n/g, '\\n').replace(/\\r/g, '\\n');\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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/vue-query/name-builder/core/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { Auth, AuthToken } from './auth.gen';\nimport type { BodySerializer, QuerySerializer, QuerySerializerOptions } from './bodySerializer.gen';\n\nexport type HttpMethod =\n  | 'connect'\n  | 'delete'\n  | 'get'\n  | 'head'\n  | 'options'\n  | 'patch'\n  | 'post'\n  | 'put'\n  | 'trace';\n\nexport type Client<\n  RequestFn = never,\n  Config = unknown,\n  MethodFn = never,\n  BuildUrlFn = never,\n  SseFn = never,\n> = {\n  /**\n   * Returns the final request URL.\n   */\n  buildUrl: BuildUrlFn;\n  getConfig: () => Config;\n  request: RequestFn;\n  setConfig: (config: Config) => Config;\n} & {\n  [K in HttpMethod]: MethodFn;\n} & ([SseFn] extends [never] ? { sse?: never } : { sse: { [K in HttpMethod]: SseFn } });\n\nexport interface Config {\n  /**\n   * Auth token or a function returning auth token. The resolved value will be\n   * added to the request payload as defined by its `security` array.\n   */\n  auth?: ((auth: Auth) => Promise<AuthToken> | AuthToken) | AuthToken;\n  /**\n   * A function for serializing request body parameter. By default,\n   * {@link JSON.stringify()} will be used.\n   */\n  bodySerializer?: BodySerializer | null;\n  /**\n   * An object containing any HTTP headers that you want to pre-populate your\n   * `Headers` object with.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/Headers/Headers#init See more}\n   */\n  headers?:\n    | RequestInit['headers']\n    | Record<\n        string,\n        string | number | boolean | (string | number | boolean)[] | null | undefined | unknown\n      >;\n  /**\n   * The request method.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/fetch#method See more}\n   */\n  method?: Uppercase<HttpMethod>;\n  /**\n   * A function for serializing request query parameters. By default, arrays\n   * will be exploded in form style, objects will be exploded in deepObject\n   * style, and reserved characters are percent-encoded.\n   *\n   * This method will have no effect if the native `paramsSerializer()` Axios\n   * API function is used.\n   *\n   * {@link https://swagger.io/docs/specification/serialization/#query View examples}\n   */\n  querySerializer?: QuerySerializer | QuerySerializerOptions;\n  /**\n   * A function validating request data. This is useful if you want to ensure\n   * the request conforms to the desired shape, so it can be safely sent to\n   * the server.\n   */\n  requestValidator?: (data: unknown) => Promise<unknown>;\n  /**\n   * A function transforming response data before it's returned. This is useful\n   * for post-processing data, e.g. converting ISO strings into Date objects.\n   */\n  responseTransformer?: (data: unknown) => Promise<unknown>;\n  /**\n   * A function validating response data. This is useful if you want to ensure\n   * the response conforms to the desired shape, so it can be safely passed to\n   * the transformers and returned to the user.\n   */\n  responseValidator?: (data: unknown) => Promise<unknown>;\n}\n\ntype IsExactlyNeverOrNeverUndefined<T> = [T] extends [never]\n  ? true\n  : [T] extends [never | undefined]\n    ? [undefined] extends [T]\n      ? false\n      : true\n    : false;\n\nexport type OmitNever<T extends Record<string, unknown>> = {\n  [K in keyof T as IsExactlyNeverOrNeverUndefined<T[K]> extends true ? never : K]: T[K];\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/vue-query/name-builder/core/utils.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/vue-query/name-builder/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport { fooBarPost, fooBarPut, fooPost, fooPut, getFoo, getFooBar, type Options } from './sdk.gen';\nexport type { ClientOptions, FooBarPostData, FooBarPostResponse, FooBarPostResponses, FooBarPutData, FooBarPutResponse, FooBarPutResponses, FooPostData, FooPostResponse, FooPostResponses, FooPutData, FooPutResponse, FooPutResponses, GetFooBarData, GetFooBarResponse, GetFooBarResponses, GetFooData, GetFooResponse, GetFooResponses } from './types.gen';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/vue-query/name-builder/sdk.gen.ts",
    "content": "// 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 { FooBarPostData, FooBarPostResponses, FooBarPutData, FooBarPutResponses, FooPostData, FooPostResponses, FooPutData, FooPutResponses, GetFooBarData, GetFooBarResponses, GetFooData, GetFooResponses } from './types.gen';\n\nexport type Options<TData extends TDataShape = TDataShape, ThrowOnError extends boolean = boolean> = Options2<TData, ThrowOnError> & {\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\nexport const getFoo = <ThrowOnError extends boolean = false>(options?: Options<GetFooData, ThrowOnError>) => (options?.client ?? client).get<GetFooResponses, unknown, ThrowOnError>({ url: '/foo', ...options });\n\nexport const fooPost = <ThrowOnError extends boolean = false>(options?: Options<FooPostData, ThrowOnError>) => (options?.client ?? client).post<FooPostResponses, unknown, ThrowOnError>({ url: '/foo', ...options });\n\nexport const fooPut = <ThrowOnError extends boolean = false>(options?: Options<FooPutData, ThrowOnError>) => (options?.client ?? client).put<FooPutResponses, unknown, ThrowOnError>({ url: '/foo', ...options });\n\nexport const getFooBar = <ThrowOnError extends boolean = false>(options?: Options<GetFooBarData, ThrowOnError>) => (options?.client ?? client).get<GetFooBarResponses, unknown, ThrowOnError>({ url: '/foo/bar', ...options });\n\nexport const fooBarPost = <ThrowOnError extends boolean = false>(options?: Options<FooBarPostData, ThrowOnError>) => (options?.client ?? client).post<FooBarPostResponses, unknown, ThrowOnError>({ url: '/foo/bar', ...options });\n\nexport const fooBarPut = <ThrowOnError extends boolean = false>(options?: Options<FooBarPutData, ThrowOnError>) => (options?.client ?? client).put<FooBarPutResponses, unknown, ThrowOnError>({ url: '/foo/bar', ...options });\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/vue-query/name-builder/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type ClientOptions = {\n    baseUrl: `${string}://${string}` | (string & {});\n};\n\nexport type GetFooData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/foo';\n};\n\nexport type GetFooResponses = {\n    /**\n     * OK\n     */\n    200: string;\n};\n\nexport type GetFooResponse = GetFooResponses[keyof GetFooResponses];\n\nexport type FooPostData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/foo';\n};\n\nexport type FooPostResponses = {\n    /**\n     * OK\n     */\n    200: string;\n};\n\nexport type FooPostResponse = FooPostResponses[keyof FooPostResponses];\n\nexport type FooPutData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/foo';\n};\n\nexport type FooPutResponses = {\n    /**\n     * OK\n     */\n    200: string;\n};\n\nexport type FooPutResponse = FooPutResponses[keyof FooPutResponses];\n\nexport type GetFooBarData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/foo/bar';\n};\n\nexport type GetFooBarResponses = {\n    /**\n     * OK\n     */\n    200: string;\n};\n\nexport type GetFooBarResponse = GetFooBarResponses[keyof GetFooBarResponses];\n\nexport type FooBarPostData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/foo/bar';\n};\n\nexport type FooBarPostResponses = {\n    /**\n     * OK\n     */\n    200: string;\n};\n\nexport type FooBarPostResponse = FooBarPostResponses[keyof FooBarPostResponses];\n\nexport type FooBarPutData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/foo/bar';\n};\n\nexport type FooBarPutResponses = {\n    /**\n     * OK\n     */\n    200: string;\n};\n\nexport type FooBarPutResponse = FooBarPutResponses[keyof FooBarPutResponses];\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/fastify/default/fastify.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { RouteHandler } from 'fastify';\n\nimport type { ApiVVersionODataControllerCountResponses, CallToTestOrderOfParamsData, CallWithDefaultOptionalParametersData, CallWithDefaultParametersData, CallWithDescriptionsData, CallWithDuplicateResponsesErrors, CallWithDuplicateResponsesResponses, CallWithNoContentResponseResponses, CallWithParametersData, CallWithResponseAndNoContentResponseResponses, CallWithResponsesErrors, CallWithResponsesResponses, CallWithResultFromHeaderErrors, CallWithResultFromHeaderResponses, CallWithWeirdParameterNamesData, CollectionFormatData, ComplexParamsData, ComplexParamsResponses, ComplexTypesData, ComplexTypesErrors, ComplexTypesResponses, DeleteFooData3, DeprecatedCallData, DummyAResponses, DummyBResponses, FileResponseData, FileResponseResponses, GetApiVbyApiVersionSimpleOperationData, GetApiVbyApiVersionSimpleOperationResponses, GetCallWithOptionalParamData, ImportData, ImportResponses, MultipartRequestData, MultipartResponseResponses, NonAsciiæøåÆøÅöôêÊ字符串Data, NonAsciiæøåÆøÅöôêÊ字符串Responses, PostApiVbyApiVersionFormDataData, PostApiVbyApiVersionRequestBodyData, PostCallWithOptionalParamData, PostCallWithOptionalParamResponses, PutWithFormUrlEncodedData, TestErrorCodeData, TestErrorCodeErrors, TestErrorCodeResponses, TypesData, TypesResponses, UploadFileData, UploadFileResponses } from './types.gen';\n\nexport type RouteHandlers = {\n    import: RouteHandler<{\n        Body: ImportData['body'];\n        Reply: Omit<ImportResponses, 'default'>;\n    }>;\n    apiVVersionODataControllerCount: RouteHandler<{\n        Reply: ApiVVersionODataControllerCountResponses;\n    }>;\n    getApiVbyApiVersionSimpleOperation: RouteHandler<{\n        Params: GetApiVbyApiVersionSimpleOperationData['path'];\n        Reply: GetApiVbyApiVersionSimpleOperationResponses;\n    }>;\n    deleteFoo: RouteHandler<{\n        Headers: DeleteFooData3['headers'];\n        Params: DeleteFooData3['path'];\n    }>;\n    callWithDescriptions: RouteHandler<{\n        Querystring?: CallWithDescriptionsData['query'];\n    }>;\n    deprecatedCall: RouteHandler<{\n        Headers: DeprecatedCallData['headers'];\n    }>;\n    callWithParameters: RouteHandler<{\n        Body: CallWithParametersData['body'];\n        Headers: CallWithParametersData['headers'];\n        Params: CallWithParametersData['path'];\n        Querystring: CallWithParametersData['query'];\n    }>;\n    callWithWeirdParameterNames: RouteHandler<{\n        Body: CallWithWeirdParameterNamesData['body'];\n        Headers: CallWithWeirdParameterNamesData['headers'];\n        Params: CallWithWeirdParameterNamesData['path'];\n        Querystring: CallWithWeirdParameterNamesData['query'];\n    }>;\n    getCallWithOptionalParam: RouteHandler<{\n        Body: GetCallWithOptionalParamData['body'];\n        Querystring?: GetCallWithOptionalParamData['query'];\n    }>;\n    postCallWithOptionalParam: RouteHandler<{\n        Body?: PostCallWithOptionalParamData['body'];\n        Querystring: PostCallWithOptionalParamData['query'];\n        Reply: PostCallWithOptionalParamResponses;\n    }>;\n    postApiVbyApiVersionRequestBody: RouteHandler<{\n        Body?: PostApiVbyApiVersionRequestBodyData['body'];\n        Querystring?: PostApiVbyApiVersionRequestBodyData['query'];\n    }>;\n    postApiVbyApiVersionFormData: RouteHandler<{\n        Body?: PostApiVbyApiVersionFormDataData['body'];\n        Querystring?: PostApiVbyApiVersionFormDataData['query'];\n    }>;\n    callWithDefaultParameters: RouteHandler<{\n        Querystring?: CallWithDefaultParametersData['query'];\n    }>;\n    callWithDefaultOptionalParameters: RouteHandler<{\n        Querystring?: CallWithDefaultOptionalParametersData['query'];\n    }>;\n    callToTestOrderOfParams: RouteHandler<{\n        Querystring: CallToTestOrderOfParamsData['query'];\n    }>;\n    callWithNoContentResponse: RouteHandler<{\n        Reply: CallWithNoContentResponseResponses;\n    }>;\n    callWithResponseAndNoContentResponse: RouteHandler<{\n        Reply: CallWithResponseAndNoContentResponseResponses;\n    }>;\n    dummyA: RouteHandler<{\n        Reply: DummyAResponses;\n    }>;\n    dummyB: RouteHandler<{\n        Reply: DummyBResponses;\n    }>;\n    callWithDuplicateResponses: RouteHandler<{\n        Reply: Omit<CallWithDuplicateResponsesErrors, 'default'> & CallWithDuplicateResponsesResponses;\n    }>;\n    callWithResponses: RouteHandler<{\n        Reply: Omit<CallWithResponsesErrors, 'default'> & CallWithResponsesResponses;\n    }>;\n    collectionFormat: RouteHandler<{\n        Querystring: CollectionFormatData['query'];\n    }>;\n    types: RouteHandler<{\n        Params?: TypesData['path'];\n        Querystring: TypesData['query'];\n        Reply: TypesResponses;\n    }>;\n    uploadFile: RouteHandler<{\n        Body: UploadFileData['body'];\n        Params: UploadFileData['path'];\n        Reply: UploadFileResponses;\n    }>;\n    fileResponse: RouteHandler<{\n        Params: FileResponseData['path'];\n        Reply: FileResponseResponses;\n    }>;\n    complexTypes: RouteHandler<{\n        Querystring: ComplexTypesData['query'];\n        Reply: ComplexTypesErrors & ComplexTypesResponses;\n    }>;\n    multipartResponse: RouteHandler<{\n        Reply: MultipartResponseResponses;\n    }>;\n    multipartRequest: RouteHandler<{\n        Body?: MultipartRequestData['body'];\n    }>;\n    complexParams: RouteHandler<{\n        Body?: ComplexParamsData['body'];\n        Params: ComplexParamsData['path'];\n        Reply: ComplexParamsResponses;\n    }>;\n    callWithResultFromHeader: RouteHandler<{\n        Reply: CallWithResultFromHeaderErrors & CallWithResultFromHeaderResponses;\n    }>;\n    testErrorCode: RouteHandler<{\n        Querystring: TestErrorCodeData['query'];\n        Reply: TestErrorCodeErrors & TestErrorCodeResponses;\n    }>;\n    nonAsciiæøåÆøÅöôêÊ字符串: RouteHandler<{\n        Querystring: NonAsciiæøåÆøÅöôêÊ字符串Data['query'];\n        Reply: NonAsciiæøåÆøÅöôêÊ字符串Responses;\n    }>;\n    putWithFormUrlEncoded: RouteHandler<{\n        Body: PutWithFormUrlEncodedData['body'];\n    }>;\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/fastify/default/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type { _3eNum1Период, _400, AdditionalPropertiesIntegerIssue, AdditionalPropertiesUnknownIssue, AdditionalPropertiesUnknownIssue2, AdditionalPropertiesUnknownIssue3, AdditionalPropertiesUnknownIssueWritable, AnyOfAnyAndNull, AnyOfArrays, ApiVVersionODataControllerCountData, ApiVVersionODataControllerCountResponse, ApiVVersionODataControllerCountResponses, ArrayWithAnyOfProperties, ArrayWithArray, ArrayWithBooleans, ArrayWithNumbers, ArrayWithProperties, ArrayWithReferences, ArrayWithStrings, CallToTestOrderOfParamsData, CallWithDefaultOptionalParametersData, CallWithDefaultParametersData, CallWithDescriptionsData, CallWithDuplicateResponsesData, CallWithDuplicateResponsesError, CallWithDuplicateResponsesErrors, CallWithDuplicateResponsesResponse, CallWithDuplicateResponsesResponses, CallWithNoContentResponseData, CallWithNoContentResponseResponse, CallWithNoContentResponseResponses, CallWithParametersData, CallWithResponseAndNoContentResponseData, CallWithResponseAndNoContentResponseResponse, CallWithResponseAndNoContentResponseResponses, CallWithResponseData, CallWithResponseResponse, CallWithResponseResponses, CallWithResponsesData, CallWithResponsesError, CallWithResponsesErrors, CallWithResponsesResponse, CallWithResponsesResponses, CallWithResultFromHeaderData, CallWithResultFromHeaderErrors, CallWithResultFromHeaderResponses, CallWithWeirdParameterNamesData, CamelCaseCommentWithBreaks, CharactersInDescription, ClientOptions, CollectionFormatData, CommentWithBackticks, CommentWithBackticksAndQuotes, CommentWithBreaks, CommentWithExpressionPlaceholders, CommentWithQuotes, CommentWithReservedCharacters, CommentWithSlashes, ComplexParamsData, ComplexParamsResponse, ComplexParamsResponses, ComplexTypesData, ComplexTypesErrors, ComplexTypesResponse, ComplexTypesResponses, CompositionBaseModel, CompositionExtendedModel, CompositionWithAllOfAndNullable, CompositionWithAnyOf, CompositionWithAnyOfAndNullable, CompositionWithAnyOfAnonymous, CompositionWithNestedAnyAndTypeNull, CompositionWithNestedAnyOfAndNull, CompositionWithOneOf, CompositionWithOneOfAndComplexArrayDictionary, CompositionWithOneOfAndNullable, CompositionWithOneOfAndProperties, CompositionWithOneOfAndSimpleArrayDictionary, CompositionWithOneOfAndSimpleDictionary, CompositionWithOneOfAnonymous, CompositionWithOneOfDiscriminator, ConstValue, Default, DeleteCallWithoutParametersAndResponseData, DeleteFooData, DeleteFooData2, DeleteFooData3, DeprecatedCallData, DeprecatedModel, DictionaryWithArray, DictionaryWithDictionary, DictionaryWithProperties, DictionaryWithPropertiesAndAdditionalProperties, DictionaryWithReference, DictionaryWithString, DummyAData, DummyAResponse, DummyAResponses, DummyBData, DummyBResponse, DummyBResponses, DuplicateName2Data, DuplicateName3Data, DuplicateName4Data, DuplicateNameData, EnumFromDescription, EnumWithExtensions, EnumWithNumbers, EnumWithReplacedCharacters, EnumWithStrings, EnumWithXEnumNames, ExportData, ExternalRefA, ExternalRefB, ExternalSharedModel, File, FileResponseData, FileResponseResponse, FileResponseResponses, FileWritable, FooWowData, FooWowResponses, FreeFormObjectWithAdditionalPropertiesEqEmptyObject, FreeFormObjectWithAdditionalPropertiesEqTrue, FreeFormObjectWithoutAdditionalProperties, GenericSchemaDuplicateIssue1SystemBoolean, GenericSchemaDuplicateIssue1SystemBooleanWritable, GenericSchemaDuplicateIssue1SystemString, GenericSchemaDuplicateIssue1SystemStringWritable, GetApiVbyApiVersionSimpleOperationData, GetApiVbyApiVersionSimpleOperationError, GetApiVbyApiVersionSimpleOperationErrors, GetApiVbyApiVersionSimpleOperationResponse, GetApiVbyApiVersionSimpleOperationResponses, GetCallWithOptionalParamData, GetCallWithoutParametersAndResponseData, HeadCallWithoutParametersAndResponseData, Import, ImportData, ImportResponse, ImportResponses, IoK8sApimachineryPkgApisMetaV1DeleteOptions, IoK8sApimachineryPkgApisMetaV1Preconditions, ModelCircle, ModelFromZendesk, ModelSquare, ModelThatExtends, ModelThatExtendsExtends, ModelWithAdditionalPropertiesEqTrue, ModelWithAdditionalPropertiesRef, ModelWithAnyOfConstantSizeArray, ModelWithAnyOfConstantSizeArrayAndIntersect, ModelWithAnyOfConstantSizeArrayNullable, ModelWithAnyOfConstantSizeArrayWithNSizeAndOptions, ModelWithAnyOfConstantSizeArrayWithNSizeAndOptionsWritable, ModelWithArray, ModelWithArrayReadOnlyAndWriteOnly, ModelWithArrayReadOnlyAndWriteOnlyWritable, ModelWithBackticksInDescription, ModelWithBoolean, ModelWithCircularReference, ModelWithConst, ModelWithConstantSizeArray, ModelWithDictionary, ModelWithDuplicateImports, ModelWithDuplicateProperties, ModelWithEnum, ModelWithEnumFromDescription, ModelWithEnumWithHyphen, ModelWithInteger, ModelWithNestedArrayEnums, ModelWithNestedArrayEnumsData, ModelWithNestedArrayEnumsDataBar, ModelWithNestedArrayEnumsDataFoo, ModelWithNestedCompositionEnums, ModelWithNestedEnums, ModelWithNestedProperties, ModelWithNullableObject, ModelWithNullableString, ModelWithNumericEnumUnion, ModelWithOneOfAndProperties, ModelWithOneOfEnum, ModelWithOrderedProperties, ModelWithPattern, ModelWithPatternWritable, ModelWithPrefixItemsConstantSizeArray, ModelWithProperties, ModelWithPropertiesWritable, ModelWithReadOnlyAndWriteOnly, ModelWithReadOnlyAndWriteOnlyWritable, ModelWithReference, ModelWithReferenceWritable, ModelWithString, ModelWithStringError, MultipartRequestData, MultipartResponseData, MultipartResponseResponse, MultipartResponseResponses, NestedAnyOfArraysNullable, NonAsciiæøåÆøÅöôêÊ字符串Data, NonAsciiæøåÆøÅöôêÊ字符串Response, NonAsciiæøåÆøÅöôêÊ字符串Responses, NonAsciiStringæøåÆøÅöôêÊ字符串, NullableObject, OneOfAllOfIssue, OneOfAllOfIssueWritable, OptionsCallWithoutParametersAndResponseData, Pageable, ParameterSimpleParameterUnused, PatchApiVbyApiVersionNoTagData, PatchApiVbyApiVersionNoTagResponses, PatchCallWithoutParametersAndResponseData, PostApiVbyApiVersionFormDataData, PostApiVbyApiVersionRequestBodyData, PostCallWithOptionalParamData, PostCallWithOptionalParamResponse, PostCallWithOptionalParamResponses, PostCallWithoutParametersAndResponseData, PostServiceWithEmptyTagResponse, PostServiceWithEmptyTagResponse2, PutCallWithoutParametersAndResponseData, PutWithFormUrlEncodedData, SchemaWithFormRestrictedKeys, SimpleBoolean, SimpleFile, SimpleFormData, SimpleInteger, SimpleParameter, SimpleReference, SimpleRequestBody, SimpleString, SimpleStringWithPattern, TestErrorCodeData, TestErrorCodeErrors, TestErrorCodeResponses, TypesData, TypesResponse, TypesResponses, UploadFileData, UploadFileResponse, UploadFileResponses, XFooBar } from './types.gen';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/fastify/default/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type ClientOptions = {\n    baseUrl: 'http://localhost:3000/base' | (string & {});\n};\n\n/**\n * Model with number-only name\n */\nexport type _400 = string;\n\n/**\n * External ref to shared model (A)\n */\nexport type ExternalRefA = ExternalSharedModel;\n\n/**\n * External ref to shared model (B)\n */\nexport type ExternalRefB = ExternalSharedModel;\n\n/**\n * Testing multiline comments in string: First line\n * Second line\n *\n * Fourth line\n */\nexport type CamelCaseCommentWithBreaks = number;\n\n/**\n * Testing multiline comments in string: First line\n * Second line\n *\n * Fourth line\n */\nexport type CommentWithBreaks = number;\n\n/**\n * Testing backticks in string: `backticks` and ```multiple backticks``` should work\n */\nexport type CommentWithBackticks = number;\n\n/**\n * Testing backticks and quotes in string: `backticks`, 'quotes', \"double quotes\" and ```multiple backticks``` should work\n */\nexport type CommentWithBackticksAndQuotes = number;\n\n/**\n * Testing slashes in string: \\backwards\\\\\\ and /forwards/// should work\n */\nexport type CommentWithSlashes = number;\n\n/**\n * Testing expression placeholders in string: ${expression} should work\n */\nexport type CommentWithExpressionPlaceholders = number;\n\n/**\n * Testing quotes in string: 'single quote''' and \"double quotes\"\"\" should work\n */\nexport type CommentWithQuotes = number;\n\n/**\n * Testing reserved characters in string: * inline * and ** inline ** should work\n */\nexport type CommentWithReservedCharacters = number;\n\n/**\n * This is a simple number\n */\nexport type SimpleInteger = number;\n\n/**\n * This is a simple boolean\n */\nexport type SimpleBoolean = boolean;\n\n/**\n * This is a simple string\n */\nexport type SimpleString = string;\n\n/**\n * A string with non-ascii (unicode) characters valid in typescript identifiers (æøåÆØÅöÔèÈ字符串)\n */\nexport type NonAsciiStringæøåÆøÅöôêÊ字符串 = string;\n\n/**\n * This is a simple file\n */\nexport type SimpleFile = Blob | File;\n\n/**\n * This is a simple reference\n */\nexport type SimpleReference = ModelWithString;\n\n/**\n * This is a simple string\n */\nexport type SimpleStringWithPattern = string | null;\n\n/**\n * This is a simple enum with strings\n */\nexport type EnumWithStrings = 'Success' | 'Warning' | 'Error' | '\\'Single Quote\\'' | '\"Double Quotes\"' | 'Non-ascii: øæåôöØÆÅÔÖ字符串';\n\nexport type EnumWithReplacedCharacters = '\\'Single Quote\\'' | '\"Double Quotes\"' | 'øæåôöØÆÅÔÖ字符串' | 3.1 | '';\n\n/**\n * This is a simple enum with numbers\n */\nexport type EnumWithNumbers = 1 | 2 | 3 | 1.1 | 1.2 | 1.3 | 100 | 200 | 300 | -100 | -200 | -300 | -1.1 | -1.2 | -1.3;\n\n/**\n * Success=1,Warning=2,Error=3\n */\nexport type EnumFromDescription = number;\n\n/**\n * This is a simple enum with numbers\n */\nexport type EnumWithExtensions = 200 | 400 | 500;\n\nexport type EnumWithXEnumNames = 0 | 1 | 2;\n\n/**\n * This is a simple array with numbers\n */\nexport type ArrayWithNumbers = Array<number>;\n\n/**\n * This is a simple array with booleans\n */\nexport type ArrayWithBooleans = Array<boolean>;\n\n/**\n * This is a simple array with strings\n */\nexport type ArrayWithStrings = Array<string>;\n\n/**\n * This is a simple array with references\n */\nexport type ArrayWithReferences = Array<ModelWithString>;\n\n/**\n * This is a simple array containing an array\n */\nexport type ArrayWithArray = Array<Array<ModelWithString>>;\n\n/**\n * This is a simple array with properties\n */\nexport type ArrayWithProperties = Array<{\n    '16x16'?: CamelCaseCommentWithBreaks;\n    bar?: string;\n}>;\n\n/**\n * This is a simple array with any of properties\n */\nexport type ArrayWithAnyOfProperties = Array<{\n    foo?: string;\n} | {\n    bar?: string;\n}>;\n\nexport type AnyOfAnyAndNull = {\n    data?: unknown | null;\n};\n\n/**\n * This is a simple array with any of properties\n */\nexport type AnyOfArrays = {\n    results?: Array<{\n        foo?: string;\n    } | {\n        bar?: string;\n    }>;\n};\n\n/**\n * This is a string dictionary\n */\nexport type DictionaryWithString = {\n    [key: string]: string;\n};\n\nexport type DictionaryWithPropertiesAndAdditionalProperties = {\n    foo?: number;\n    bar?: boolean;\n    [key: string]: string | number | boolean | undefined;\n};\n\n/**\n * This is a string reference\n */\nexport type DictionaryWithReference = {\n    [key: string]: ModelWithString;\n};\n\n/**\n * This is a complex dictionary\n */\nexport type DictionaryWithArray = {\n    [key: string]: Array<ModelWithString>;\n};\n\n/**\n * This is a string dictionary\n */\nexport type DictionaryWithDictionary = {\n    [key: string]: {\n        [key: string]: string;\n    };\n};\n\n/**\n * This is a complex dictionary\n */\nexport type DictionaryWithProperties = {\n    [key: string]: {\n        foo?: string;\n        bar?: string;\n    };\n};\n\n/**\n * This is a model with one number property\n */\nexport type ModelWithInteger = {\n    /**\n     * This is a simple number property\n     */\n    prop?: number;\n};\n\n/**\n * This is a model with one boolean property\n */\nexport type ModelWithBoolean = {\n    /**\n     * This is a simple boolean property\n     */\n    prop?: boolean;\n};\n\n/**\n * This is a model with one string property\n */\nexport type ModelWithString = {\n    /**\n     * This is a simple string property\n     */\n    prop?: string;\n};\n\n/**\n * This is a model with one string property\n */\nexport type ModelWithStringError = {\n    /**\n     * This is a simple string property\n     */\n    prop?: string;\n};\n\n/**\n * `Comment` or `VoiceComment`. The JSON object for adding voice comments to tickets is different. See [Adding voice comments to tickets](/documentation/ticketing/managing-tickets/adding-voice-comments-to-tickets)\n */\nexport type ModelFromZendesk = string;\n\n/**\n * This is a model with one string property\n */\nexport type ModelWithNullableString = {\n    /**\n     * This is a simple string property\n     */\n    nullableProp1?: string | null;\n    /**\n     * This is a simple string property\n     */\n    nullableRequiredProp1: string | null;\n    /**\n     * This is a simple string property\n     */\n    nullableProp2?: string | null;\n    /**\n     * This is a simple string property\n     */\n    nullableRequiredProp2: string | null;\n    /**\n     * This is a simple enum with strings\n     */\n    'foo_bar-enum'?: 'Success' | 'Warning' | 'Error' | 'ØÆÅ字符串';\n};\n\n/**\n * This is a model with one enum\n */\nexport type ModelWithEnum = {\n    /**\n     * This is a simple enum with strings\n     */\n    'foo_bar-enum'?: 'Success' | 'Warning' | 'Error' | 'ØÆÅ字符串';\n    /**\n     * These are the HTTP error code enums\n     */\n    statusCode?: '100' | '200 FOO' | '300 FOO_BAR' | '400 foo-bar' | '500 foo.bar' | '600 foo&bar';\n    /**\n     * Simple boolean enum\n     */\n    bool?: true;\n};\n\n/**\n * This is a model with one enum with escaped name\n */\nexport type ModelWithEnumWithHyphen = {\n    /**\n     * Foo-Bar-Baz-Qux\n     */\n    'foo-bar-baz-qux'?: '3.0';\n};\n\n/**\n * This is a model with one enum\n */\nexport type ModelWithEnumFromDescription = {\n    /**\n     * Success=1,Warning=2,Error=3\n     */\n    test?: number;\n};\n\n/**\n * This is a model with nested enums\n */\nexport type ModelWithNestedEnums = {\n    dictionaryWithEnum?: {\n        [key: string]: 'Success' | 'Warning' | 'Error';\n    };\n    dictionaryWithEnumFromDescription?: {\n        [key: string]: number;\n    };\n    arrayWithEnum?: Array<'Success' | 'Warning' | 'Error'>;\n    arrayWithDescription?: Array<number>;\n    /**\n     * This is a simple enum with strings\n     */\n    'foo_bar-enum'?: 'Success' | 'Warning' | 'Error' | 'ØÆÅ字符串';\n};\n\n/**\n * This is a model with one property containing a reference\n */\nexport type ModelWithReference = {\n    prop?: ModelWithProperties;\n};\n\n/**\n * This is a model with one property containing an array\n */\nexport type ModelWithArrayReadOnlyAndWriteOnly = {\n    prop?: Array<ModelWithReadOnlyAndWriteOnly>;\n    propWithFile?: Array<Blob | File>;\n    propWithNumber?: Array<number>;\n};\n\n/**\n * This is a model with one property containing an array\n */\nexport type ModelWithArray = {\n    prop?: Array<ModelWithString>;\n    propWithFile?: Array<Blob | File>;\n    propWithNumber?: Array<number>;\n};\n\n/**\n * This is a model with one property containing a dictionary\n */\nexport type ModelWithDictionary = {\n    prop?: {\n        [key: string]: string;\n    };\n};\n\n/**\n * This is a deprecated model with a deprecated property\n *\n * @deprecated\n */\nexport type DeprecatedModel = {\n    /**\n     * This is a deprecated property\n     *\n     * @deprecated\n     */\n    prop?: string;\n};\n\n/**\n * This is a model with one property containing a circular reference\n */\nexport type ModelWithCircularReference = {\n    prop?: ModelWithCircularReference;\n};\n\n/**\n * This is a model with one property with a 'one of' relationship\n */\nexport type CompositionWithOneOf = {\n    propA?: ModelWithString | ModelWithEnum | ModelWithArray | ModelWithDictionary;\n};\n\n/**\n * This is a model with one property with a 'one of' relationship where the options are not $ref\n */\nexport type CompositionWithOneOfAnonymous = {\n    propA?: {\n        propA?: string;\n    } | string | number;\n};\n\n/**\n * Circle\n */\nexport type ModelCircle = {\n    kind: string;\n    radius?: number;\n};\n\n/**\n * Square\n */\nexport type ModelSquare = {\n    kind: string;\n    sideLength?: number;\n};\n\n/**\n * This is a model with one property with a 'one of' relationship where the options are not $ref\n */\nexport type CompositionWithOneOfDiscriminator = ({\n    kind: 'circle';\n} & ModelCircle) | ({\n    kind: 'square';\n} & ModelSquare);\n\n/**\n * This is a model with one property with a 'any of' relationship\n */\nexport type CompositionWithAnyOf = {\n    propA?: ModelWithString | ModelWithEnum | ModelWithArray | ModelWithDictionary;\n};\n\n/**\n * This is a model with one property with a 'any of' relationship where the options are not $ref\n */\nexport type CompositionWithAnyOfAnonymous = {\n    propA?: {\n        propA?: string;\n    } | string | number;\n};\n\n/**\n * This is a model with nested 'any of' property with a type null\n */\nexport type CompositionWithNestedAnyAndTypeNull = {\n    propA?: Array<ModelWithDictionary | null> | Array<ModelWithArray | null>;\n};\n\nexport type _3eNum1Период = 'Bird' | 'Dog';\n\nexport type ConstValue = 'ConstValue';\n\n/**\n * This is a model with one property with a 'any of' relationship where the options are not $ref\n */\nexport type CompositionWithNestedAnyOfAndNull = {\n    /**\n     * Scopes\n     */\n    propA?: Array<_3eNum1Период | ConstValue> | null;\n};\n\n/**\n * This is a model with one property with a 'one of' relationship\n */\nexport type CompositionWithOneOfAndNullable = {\n    propA?: {\n        boolean?: boolean;\n    } | ModelWithEnum | ModelWithArray | ModelWithDictionary | null;\n};\n\n/**\n * This is a model that contains a simple dictionary within composition\n */\nexport type CompositionWithOneOfAndSimpleDictionary = {\n    propA?: boolean | {\n        [key: string]: number;\n    };\n};\n\n/**\n * This is a model that contains a dictionary of simple arrays within composition\n */\nexport type CompositionWithOneOfAndSimpleArrayDictionary = {\n    propA?: boolean | {\n        [key: string]: Array<boolean>;\n    };\n};\n\n/**\n * This is a model that contains a dictionary of complex arrays (composited) within composition\n */\nexport type CompositionWithOneOfAndComplexArrayDictionary = {\n    propA?: boolean | {\n        [key: string]: Array<number | string>;\n    };\n};\n\n/**\n * This is a model with one property with a 'all of' relationship\n */\nexport type CompositionWithAllOfAndNullable = {\n    propA?: ({\n        boolean?: boolean;\n    } & ModelWithEnum & ModelWithArray & ModelWithDictionary) | null;\n};\n\n/**\n * This is a model with one property with a 'any of' relationship\n */\nexport type CompositionWithAnyOfAndNullable = {\n    propA?: {\n        boolean?: boolean;\n    } | ModelWithEnum | ModelWithArray | ModelWithDictionary | null;\n};\n\n/**\n * This is a base model with two simple optional properties\n */\nexport type CompositionBaseModel = {\n    firstName?: string;\n    lastname?: string;\n};\n\n/**\n * This is a model that extends the base model\n */\nexport type CompositionExtendedModel = CompositionBaseModel & {\n    age: number;\n    firstName: string;\n    lastname: string;\n};\n\n/**\n * This is a model with one nested property\n */\nexport type ModelWithProperties = {\n    required: string;\n    readonly requiredAndReadOnly: string;\n    requiredAndNullable: string | null;\n    string?: string;\n    number?: number;\n    boolean?: boolean;\n    reference?: ModelWithString;\n    'property with space'?: string;\n    default?: string;\n    try?: string;\n    readonly '@namespace.string'?: string;\n    readonly '@namespace.integer'?: number;\n};\n\n/**\n * This is a model with one nested property\n */\nexport type ModelWithNestedProperties = {\n    readonly first: {\n        readonly second: {\n            readonly third: string | null;\n        } | null;\n    } | null;\n};\n\n/**\n * This is a model with duplicated properties\n */\nexport type ModelWithDuplicateProperties = {\n    prop?: ModelWithString;\n};\n\n/**\n * This is a model with ordered properties\n */\nexport type ModelWithOrderedProperties = {\n    zebra?: string;\n    apple?: string;\n    hawaii?: string;\n};\n\n/**\n * This is a model with duplicated imports\n */\nexport type ModelWithDuplicateImports = {\n    propA?: ModelWithString;\n    propB?: ModelWithString;\n    propC?: ModelWithString;\n};\n\n/**\n * This is a model that extends another model\n */\nexport type ModelThatExtends = ModelWithString & {\n    propExtendsA?: string;\n    propExtendsB?: ModelWithString;\n};\n\n/**\n * This is a model that extends another model\n */\nexport type ModelThatExtendsExtends = ModelWithString & ModelThatExtends & {\n    propExtendsC?: string;\n    propExtendsD?: ModelWithString;\n};\n\n/**\n * This is a model that contains a some patterns\n */\nexport type ModelWithPattern = {\n    key: string;\n    name: string;\n    readonly enabled?: boolean;\n    readonly modified?: string;\n    id?: string;\n    text?: string;\n    patternWithSingleQuotes?: string;\n    patternWithNewline?: string;\n    patternWithBacktick?: string;\n    patternWithUnicode?: string;\n};\n\nexport type File = {\n    /**\n     * Id\n     */\n    readonly id?: string;\n    /**\n     * Updated at\n     */\n    readonly updated_at?: string;\n    /**\n     * Created at\n     */\n    readonly created_at?: string;\n    /**\n     * Mime\n     */\n    mime: string;\n    /**\n     * File\n     */\n    readonly file?: string;\n};\n\nexport type Default = {\n    name?: string;\n};\n\nexport type Pageable = {\n    page?: number;\n    size?: number;\n    sort?: Array<string>;\n};\n\n/**\n * This is a free-form object without additionalProperties.\n */\nexport type FreeFormObjectWithoutAdditionalProperties = {\n    [key: string]: unknown;\n};\n\n/**\n * This is a free-form object with additionalProperties: true.\n */\nexport type FreeFormObjectWithAdditionalPropertiesEqTrue = {\n    [key: string]: unknown;\n};\n\n/**\n * This is a free-form object with additionalProperties: {}.\n */\nexport type FreeFormObjectWithAdditionalPropertiesEqEmptyObject = {\n    [key: string]: unknown;\n};\n\nexport type ModelWithConst = {\n    String?: 'String';\n    number?: 0;\n    null?: null;\n    withType?: 'Some string';\n};\n\n/**\n * This is a model with one property and additionalProperties: true\n */\nexport type ModelWithAdditionalPropertiesEqTrue = {\n    /**\n     * This is a simple string property\n     */\n    prop?: string;\n    [key: string]: unknown;\n};\n\nexport type NestedAnyOfArraysNullable = {\n    nullableArray?: Array<string | boolean> | null;\n};\n\nexport type CompositionWithOneOfAndProperties = ({\n    foo: SimpleParameter;\n} | {\n    bar: NonAsciiStringæøåÆøÅöôêÊ字符串;\n}) & {\n    baz: number | null;\n    qux: number;\n};\n\n/**\n * An object that can be null\n */\nexport type NullableObject = {\n    foo?: string;\n} | null;\n\n/**\n * Some % character\n */\nexport type CharactersInDescription = string;\n\nexport type ModelWithNullableObject = {\n    data?: NullableObject;\n};\n\n/**\n * An object with additional properties that can be null (anyOf ref + null)\n */\nexport type ModelWithAdditionalPropertiesRef = {\n    [key: string]: NullableObject | null;\n};\n\nexport type ModelWithOneOfEnum = {\n    foo: 'Bar';\n} | {\n    foo: 'Baz';\n} | {\n    foo: 'Qux';\n} | {\n    content: string;\n    foo: 'Quux';\n} | {\n    content: [\n        string,\n        string\n    ];\n    foo: 'Corge';\n};\n\nexport type ModelWithNestedArrayEnumsDataFoo = 'foo' | 'bar';\n\nexport type ModelWithNestedArrayEnumsDataBar = 'baz' | 'qux';\n\nexport type ModelWithNestedArrayEnumsData = {\n    foo?: Array<ModelWithNestedArrayEnumsDataFoo>;\n    bar?: Array<ModelWithNestedArrayEnumsDataBar>;\n};\n\nexport type ModelWithNestedArrayEnums = {\n    array_strings?: Array<string>;\n    data?: ModelWithNestedArrayEnumsData;\n};\n\nexport type ModelWithNestedCompositionEnums = {\n    foo?: ModelWithNestedArrayEnumsDataFoo;\n};\n\nexport type ModelWithReadOnlyAndWriteOnly = {\n    foo: string;\n    readonly bar: string;\n};\n\nexport type ModelWithConstantSizeArray = [\n    number,\n    number\n];\n\nexport type ModelWithAnyOfConstantSizeArray = [\n    number | string,\n    number | string,\n    number | string\n];\n\nexport type ModelWithPrefixItemsConstantSizeArray = [\n    ModelWithInteger,\n    number | string,\n    string\n];\n\nexport type ModelWithAnyOfConstantSizeArrayNullable = [\n    number | null | string,\n    number | null | string,\n    number | null | string\n];\n\nexport type ModelWithAnyOfConstantSizeArrayWithNSizeAndOptions = [\n    number | Import,\n    number | Import\n];\n\nexport type ModelWithAnyOfConstantSizeArrayAndIntersect = [\n    number & string,\n    number & string\n];\n\nexport type ModelWithNumericEnumUnion = {\n    /**\n     * Период\n     */\n    value?: -10 | -1 | 0 | 1 | 3 | 6 | 12;\n};\n\n/**\n * Some description with `back ticks`\n */\nexport type ModelWithBackticksInDescription = {\n    /**\n     * The template `that` should be used for parsing and importing the contents of the CSV file.\n     *\n     * <br/><p>There is one placeholder currently supported:<ul>     <li><b>${x}</b> - refers to the n-th column in the CSV file, e.g. ${1}, ${2}, ...)</li></ul><p>Example of a correct JSON template:</p>\n     * <pre>\n     * [\n     * {\n     * \"resourceType\": \"Asset\",\n     * \"identifier\": {\n     * \"name\": \"${1}\",\n     * \"domain\": {\n     * \"name\": \"${2}\",\n     * \"community\": {\n     * \"name\": \"Some Community\"\n     * }\n     * }\n     * },\n     * \"attributes\" : {\n     * \"00000000-0000-0000-0000-000000003115\" : [ {\n     * \"value\" : \"${3}\"\n     * } ],\n     * \"00000000-0000-0000-0000-000000000222\" : [ {\n     * \"value\" : \"${4}\"\n     * } ]\n     * }\n     * }\n     * ]\n     * </pre>\n     */\n    template?: string;\n};\n\nexport type ModelWithOneOfAndProperties = (SimpleParameter | NonAsciiStringæøåÆøÅöôêÊ字符串) & {\n    baz: number | null;\n    qux: number;\n};\n\n/**\n * Model used to test deduplication strategy (unused)\n */\nexport type ParameterSimpleParameterUnused = string;\n\n/**\n * Model used to test deduplication strategy\n */\nexport type PostServiceWithEmptyTagResponse = string;\n\n/**\n * Model used to test deduplication strategy\n */\nexport type PostServiceWithEmptyTagResponse2 = string;\n\n/**\n * Model used to test deduplication strategy\n */\nexport type DeleteFooData = string;\n\n/**\n * Model used to test deduplication strategy\n */\nexport type DeleteFooData2 = string;\n\n/**\n * Model with restricted keyword name\n */\nexport type Import = string;\n\nexport type SchemaWithFormRestrictedKeys = {\n    description?: string;\n    'x-enum-descriptions'?: string;\n    'x-enum-varnames'?: string;\n    'x-enumNames'?: string;\n    title?: string;\n    object?: {\n        description?: string;\n        'x-enum-descriptions'?: string;\n        'x-enum-varnames'?: string;\n        'x-enumNames'?: string;\n        title?: string;\n    };\n    array?: Array<{\n        description?: string;\n        'x-enum-descriptions'?: string;\n        'x-enum-varnames'?: string;\n        'x-enumNames'?: string;\n        title?: string;\n    }>;\n};\n\n/**\n * This schema was giving PascalCase transformations a hard time\n */\nexport type IoK8sApimachineryPkgApisMetaV1DeleteOptions = {\n    /**\n     * Must be fulfilled before a deletion is carried out. If not possible, a 409 Conflict status will be returned.\n     */\n    preconditions?: IoK8sApimachineryPkgApisMetaV1Preconditions;\n};\n\n/**\n * This schema was giving PascalCase transformations a hard time\n */\nexport type IoK8sApimachineryPkgApisMetaV1Preconditions = {\n    /**\n     * Specifies the target ResourceVersion\n     */\n    resourceVersion?: string;\n    /**\n     * Specifies the target UID.\n     */\n    uid?: string;\n};\n\nexport type AdditionalPropertiesUnknownIssue = {\n    [key: string]: string | number;\n};\n\nexport type AdditionalPropertiesUnknownIssue2 = {\n    [key: string]: string | number;\n};\n\nexport type AdditionalPropertiesUnknownIssue3 = string & {\n    entries: {\n        [key: string]: AdditionalPropertiesUnknownIssue;\n    };\n};\n\nexport type AdditionalPropertiesIntegerIssue = {\n    value: number;\n    [key: string]: number;\n};\n\nexport type OneOfAllOfIssue = ((ConstValue | GenericSchemaDuplicateIssue1SystemBoolean) & _3eNum1Период) | GenericSchemaDuplicateIssue1SystemString;\n\nexport type GenericSchemaDuplicateIssue1SystemBoolean = {\n    item?: boolean;\n    error?: string | null;\n    readonly hasError?: boolean;\n    data?: {\n        [key: string]: never;\n    };\n};\n\nexport type GenericSchemaDuplicateIssue1SystemString = {\n    item?: string | null;\n    error?: string | null;\n    readonly hasError?: boolean;\n};\n\nexport type ExternalSharedModel = {\n    id: string;\n    name?: string;\n};\n\n/**\n * This is a model with one property containing a reference\n */\nexport type ModelWithReferenceWritable = {\n    prop?: ModelWithPropertiesWritable;\n};\n\n/**\n * This is a model with one property containing an array\n */\nexport type ModelWithArrayReadOnlyAndWriteOnlyWritable = {\n    prop?: Array<ModelWithReadOnlyAndWriteOnlyWritable>;\n    propWithFile?: Array<Blob | File>;\n    propWithNumber?: Array<number>;\n};\n\n/**\n * This is a model with one nested property\n */\nexport type ModelWithPropertiesWritable = {\n    required: string;\n    requiredAndNullable: string | null;\n    string?: string;\n    number?: number;\n    boolean?: boolean;\n    reference?: ModelWithString;\n    'property with space'?: string;\n    default?: string;\n    try?: string;\n};\n\n/**\n * This is a model that contains a some patterns\n */\nexport type ModelWithPatternWritable = {\n    key: string;\n    name: string;\n    id?: string;\n    text?: string;\n    patternWithSingleQuotes?: string;\n    patternWithNewline?: string;\n    patternWithBacktick?: string;\n    patternWithUnicode?: string;\n};\n\nexport type FileWritable = {\n    /**\n     * Mime\n     */\n    mime: string;\n};\n\nexport type ModelWithReadOnlyAndWriteOnlyWritable = {\n    foo: string;\n    baz: string;\n};\n\nexport type ModelWithAnyOfConstantSizeArrayWithNSizeAndOptionsWritable = [\n    number | Import,\n    number | Import\n];\n\nexport type AdditionalPropertiesUnknownIssueWritable = {\n    [key: string]: string | number;\n};\n\nexport type OneOfAllOfIssueWritable = ((ConstValue | GenericSchemaDuplicateIssue1SystemBoolean) & _3eNum1Период) | GenericSchemaDuplicateIssue1SystemString;\n\nexport type GenericSchemaDuplicateIssue1SystemBooleanWritable = {\n    item?: boolean;\n    error?: string | null;\n    data?: {\n        [key: string]: never;\n    };\n};\n\nexport type GenericSchemaDuplicateIssue1SystemStringWritable = {\n    item?: string | null;\n    error?: string | null;\n};\n\n/**\n * This is a reusable parameter\n */\nexport type SimpleParameter = string;\n\n/**\n * Parameter with illegal characters\n */\nexport type XFooBar = ModelWithString;\n\n/**\n * A reusable request body\n */\nexport type SimpleRequestBody = ModelWithString;\n\n/**\n * A reusable request body\n */\nexport type SimpleFormData = ModelWithString;\n\nexport type ExportData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no+tag';\n};\n\nexport type PatchApiVbyApiVersionNoTagData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no+tag';\n};\n\nexport type PatchApiVbyApiVersionNoTagResponses = {\n    /**\n     * OK\n     */\n    default: unknown;\n};\n\nexport type ImportData = {\n    body: ModelWithReadOnlyAndWriteOnlyWritable | ModelWithArrayReadOnlyAndWriteOnlyWritable;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no+tag';\n};\n\nexport type ImportResponses = {\n    /**\n     * Success\n     */\n    200: ModelFromZendesk;\n    /**\n     * Default success response\n     */\n    default: ModelWithReadOnlyAndWriteOnly;\n};\n\nexport type ImportResponse = ImportResponses[keyof ImportResponses];\n\nexport type FooWowData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no+tag';\n};\n\nexport type FooWowResponses = {\n    /**\n     * OK\n     */\n    default: unknown;\n};\n\nexport type ApiVVersionODataControllerCountData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple/$count';\n};\n\nexport type ApiVVersionODataControllerCountResponses = {\n    /**\n     * Success\n     */\n    200: ModelFromZendesk;\n};\n\nexport type ApiVVersionODataControllerCountResponse = ApiVVersionODataControllerCountResponses[keyof ApiVVersionODataControllerCountResponses];\n\nexport type GetApiVbyApiVersionSimpleOperationData = {\n    body?: never;\n    path: {\n        /**\n         * foo in method\n         */\n        foo_param: string;\n    };\n    query?: never;\n    url: '/api/v{api-version}/simple:operation';\n};\n\nexport type GetApiVbyApiVersionSimpleOperationErrors = {\n    /**\n     * Default error response\n     */\n    default: ModelWithBoolean;\n};\n\nexport type GetApiVbyApiVersionSimpleOperationError = GetApiVbyApiVersionSimpleOperationErrors[keyof GetApiVbyApiVersionSimpleOperationErrors];\n\nexport type GetApiVbyApiVersionSimpleOperationResponses = {\n    /**\n     * Response is a simple number\n     */\n    200: number;\n};\n\nexport type GetApiVbyApiVersionSimpleOperationResponse = GetApiVbyApiVersionSimpleOperationResponses[keyof GetApiVbyApiVersionSimpleOperationResponses];\n\nexport type DeleteCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type GetCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type HeadCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type OptionsCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type PatchCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type PostCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type PutCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type DeleteFooData3 = {\n    body?: never;\n    headers: {\n        /**\n         * Parameter with illegal characters\n         */\n        'x-Foo-Bar': ModelWithString;\n    };\n    path: {\n        /**\n         * foo in method\n         */\n        foo_param: string;\n        /**\n         * bar in method\n         */\n        BarParam: string;\n    };\n    query?: never;\n    url: '/api/v{api-version}/foo/{foo_param}/bar/{BarParam}';\n};\n\nexport type CallWithDescriptionsData = {\n    body?: never;\n    path?: never;\n    query?: {\n        /**\n         * Testing multiline comments in string: First line\n         * Second line\n         *\n         * Fourth line\n         */\n        parameterWithBreaks?: string;\n        /**\n         * Testing backticks in string: `backticks` and ```multiple backticks``` should work\n         */\n        parameterWithBackticks?: string;\n        /**\n         * Testing slashes in string: \\backwards\\\\\\ and /forwards/// should work\n         */\n        parameterWithSlashes?: string;\n        /**\n         * Testing expression placeholders in string: ${expression} should work\n         */\n        parameterWithExpressionPlaceholders?: string;\n        /**\n         * Testing quotes in string: 'single quote''' and \"double quotes\"\"\" should work\n         */\n        parameterWithQuotes?: string;\n        /**\n         * Testing reserved characters in string: * inline * and ** inline ** should work\n         */\n        parameterWithReservedCharacters?: string;\n    };\n    url: '/api/v{api-version}/descriptions';\n};\n\nexport type DeprecatedCallData = {\n    body?: never;\n    headers: {\n        /**\n         * This parameter is deprecated\n         *\n         * @deprecated\n         */\n        parameter: DeprecatedModel | null;\n    };\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/parameters/deprecated';\n};\n\nexport type CallWithParametersData = {\n    /**\n     * This is the parameter that goes into the body\n     */\n    body: {\n        [key: string]: unknown;\n    } | null;\n    headers: {\n        /**\n         * This is the parameter that goes into the header\n         */\n        parameterHeader: string | null;\n    };\n    path: {\n        /**\n         * This is the parameter that goes into the path\n         */\n        parameterPath: string | null;\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string | null;\n    };\n    query: {\n        foo_ref_enum?: ModelWithNestedArrayEnumsDataFoo;\n        foo_all_of_enum: ModelWithNestedArrayEnumsDataFoo;\n        /**\n         * This is the parameter that goes into the query params\n         */\n        cursor: string | null;\n    };\n    url: '/api/v{api-version}/parameters/{parameterPath}';\n};\n\nexport type CallWithWeirdParameterNamesData = {\n    /**\n     * This is the parameter that goes into the body\n     */\n    body: ModelWithString | null;\n    headers: {\n        /**\n         * This is the parameter that goes into the request header\n         */\n        'parameter.header': string | null;\n    };\n    path: {\n        /**\n         * This is the parameter that goes into the path\n         */\n        'parameter.path.1'?: string;\n        /**\n         * This is the parameter that goes into the path\n         */\n        'parameter-path-2'?: string;\n        /**\n         * This is the parameter that goes into the path\n         */\n        'PARAMETER-PATH-3'?: string;\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string | null;\n    };\n    query: {\n        /**\n         * This is the parameter with a reserved keyword\n         */\n        default?: string;\n        /**\n         * This is the parameter that goes into the request query params\n         */\n        'parameter-query': string | null;\n    };\n    url: '/api/v{api-version}/parameters/{parameter.path.1}/{parameter-path-2}/{PARAMETER-PATH-3}';\n};\n\nexport type GetCallWithOptionalParamData = {\n    /**\n     * This is a required parameter\n     */\n    body: ModelWithOneOfEnum;\n    path?: never;\n    query?: {\n        /**\n         * This is an optional parameter\n         */\n        page?: number;\n    };\n    url: '/api/v{api-version}/parameters';\n};\n\nexport type PostCallWithOptionalParamData = {\n    /**\n     * This is an optional parameter\n     */\n    body?: {\n        offset?: number | null;\n    };\n    path?: never;\n    query: {\n        /**\n         * This is a required parameter\n         */\n        parameter: Pageable;\n    };\n    url: '/api/v{api-version}/parameters';\n};\n\nexport type PostCallWithOptionalParamResponses = {\n    /**\n     * Response is a simple number\n     */\n    200: number;\n    /**\n     * Success\n     */\n    204: void;\n};\n\nexport type PostCallWithOptionalParamResponse = PostCallWithOptionalParamResponses[keyof PostCallWithOptionalParamResponses];\n\nexport type PostApiVbyApiVersionRequestBodyData = {\n    /**\n     * A reusable request body\n     */\n    body?: SimpleRequestBody;\n    path?: never;\n    query?: {\n        /**\n         * This is a reusable parameter\n         */\n        parameter?: string;\n    };\n    url: '/api/v{api-version}/requestBody';\n};\n\nexport type PostApiVbyApiVersionFormDataData = {\n    /**\n     * A reusable request body\n     */\n    body?: SimpleFormData;\n    path?: never;\n    query?: {\n        /**\n         * This is a reusable parameter\n         */\n        parameter?: string;\n    };\n    url: '/api/v{api-version}/formData';\n};\n\nexport type CallWithDefaultParametersData = {\n    body?: never;\n    path?: never;\n    query?: {\n        /**\n         * This is a simple string with default value\n         */\n        parameterString?: string | null;\n        /**\n         * This is a simple number with default value\n         */\n        parameterNumber?: number | null;\n        /**\n         * This is a simple boolean with default value\n         */\n        parameterBoolean?: boolean | null;\n        /**\n         * This is a simple enum with default value\n         */\n        parameterEnum?: 'Success' | 'Warning' | 'Error';\n        /**\n         * This is a simple model with default value\n         */\n        parameterModel?: ModelWithString | null;\n    };\n    url: '/api/v{api-version}/defaults';\n};\n\nexport type CallWithDefaultOptionalParametersData = {\n    body?: never;\n    path?: never;\n    query?: {\n        /**\n         * This is a simple string that is optional with default value\n         */\n        parameterString?: string;\n        /**\n         * This is a simple number that is optional with default value\n         */\n        parameterNumber?: number;\n        /**\n         * This is a simple boolean that is optional with default value\n         */\n        parameterBoolean?: boolean;\n        /**\n         * This is a simple enum that is optional with default value\n         */\n        parameterEnum?: 'Success' | 'Warning' | 'Error';\n        /**\n         * This is a simple model that is optional with default value\n         */\n        parameterModel?: ModelWithString;\n    };\n    url: '/api/v{api-version}/defaults';\n};\n\nexport type CallToTestOrderOfParamsData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * This is a optional string with default\n         */\n        parameterOptionalStringWithDefault?: string;\n        /**\n         * This is a optional string with empty default\n         */\n        parameterOptionalStringWithEmptyDefault?: string;\n        /**\n         * This is a optional string with no default\n         */\n        parameterOptionalStringWithNoDefault?: string;\n        /**\n         * This is a string with default\n         */\n        parameterStringWithDefault: string;\n        /**\n         * This is a string with empty default\n         */\n        parameterStringWithEmptyDefault: string;\n        /**\n         * This is a string with no default\n         */\n        parameterStringWithNoDefault: string;\n        /**\n         * This is a string that can be null with no default\n         */\n        parameterStringNullableWithNoDefault?: string | null;\n        /**\n         * This is a string that can be null with default\n         */\n        parameterStringNullableWithDefault?: string | null;\n    };\n    url: '/api/v{api-version}/defaults';\n};\n\nexport type DuplicateNameData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/duplicate';\n};\n\nexport type DuplicateName2Data = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/duplicate';\n};\n\nexport type DuplicateName3Data = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/duplicate';\n};\n\nexport type DuplicateName4Data = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/duplicate';\n};\n\nexport type CallWithNoContentResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no-content';\n};\n\nexport type CallWithNoContentResponseResponses = {\n    /**\n     * Success\n     */\n    204: void;\n};\n\nexport type CallWithNoContentResponseResponse = CallWithNoContentResponseResponses[keyof CallWithNoContentResponseResponses];\n\nexport type CallWithResponseAndNoContentResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multiple-tags/response-and-no-content';\n};\n\nexport type CallWithResponseAndNoContentResponseResponses = {\n    /**\n     * Response is a simple number\n     */\n    200: number;\n    /**\n     * Success\n     */\n    204: void;\n};\n\nexport type CallWithResponseAndNoContentResponseResponse = CallWithResponseAndNoContentResponseResponses[keyof CallWithResponseAndNoContentResponseResponses];\n\nexport type DummyAData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multiple-tags/a';\n};\n\nexport type DummyAResponses = {\n    200: _400;\n};\n\nexport type DummyAResponse = DummyAResponses[keyof DummyAResponses];\n\nexport type DummyBData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multiple-tags/b';\n};\n\nexport type DummyBResponses = {\n    /**\n     * Success\n     */\n    204: void;\n};\n\nexport type DummyBResponse = DummyBResponses[keyof DummyBResponses];\n\nexport type CallWithResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/response';\n};\n\nexport type CallWithResponseResponses = {\n    default: Import;\n};\n\nexport type CallWithResponseResponse = CallWithResponseResponses[keyof CallWithResponseResponses];\n\nexport type CallWithDuplicateResponsesData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/response';\n};\n\nexport type CallWithDuplicateResponsesErrors = {\n    /**\n     * Message for 500 error\n     */\n    500: ModelWithStringError;\n    /**\n     * Message for 501 error\n     */\n    501: ModelWithStringError;\n    /**\n     * Message for 502 error\n     */\n    502: ModelWithStringError;\n    /**\n     * Message for 4XX errors\n     */\n    '4XX': DictionaryWithArray;\n    /**\n     * Default error response\n     */\n    default: ModelWithBoolean;\n};\n\nexport type CallWithDuplicateResponsesError = CallWithDuplicateResponsesErrors[keyof CallWithDuplicateResponsesErrors];\n\nexport type CallWithDuplicateResponsesResponses = {\n    /**\n     * Message for 200 response\n     */\n    200: ModelWithBoolean & ModelWithInteger;\n    /**\n     * Message for 201 response\n     */\n    201: ModelWithString;\n    /**\n     * Message for 202 response\n     */\n    202: ModelWithString;\n};\n\nexport type CallWithDuplicateResponsesResponse = CallWithDuplicateResponsesResponses[keyof CallWithDuplicateResponsesResponses];\n\nexport type CallWithResponsesData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/response';\n};\n\nexport type CallWithResponsesErrors = {\n    /**\n     * Message for 500 error\n     */\n    500: ModelWithStringError;\n    /**\n     * Message for 501 error\n     */\n    501: ModelWithStringError;\n    /**\n     * Message for 502 error\n     */\n    502: ModelWithStringError;\n    /**\n     * Message for default response\n     */\n    default: ModelWithStringError;\n};\n\nexport type CallWithResponsesError = CallWithResponsesErrors[keyof CallWithResponsesErrors];\n\nexport type CallWithResponsesResponses = {\n    /**\n     * Message for 200 response\n     */\n    200: {\n        readonly '@namespace.string'?: string;\n        readonly '@namespace.integer'?: number;\n        readonly value?: Array<ModelWithString>;\n    };\n    /**\n     * Message for 201 response\n     */\n    201: ModelThatExtends;\n    /**\n     * Message for 202 response\n     */\n    202: ModelThatExtendsExtends;\n};\n\nexport type CallWithResponsesResponse = CallWithResponsesResponses[keyof CallWithResponsesResponses];\n\nexport type CollectionFormatData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * This is an array parameter that is sent as csv format (comma-separated values)\n         */\n        parameterArrayCSV: Array<string> | null;\n        /**\n         * This is an array parameter that is sent as ssv format (space-separated values)\n         */\n        parameterArraySSV: Array<string> | null;\n        /**\n         * This is an array parameter that is sent as tsv format (tab-separated values)\n         */\n        parameterArrayTSV: Array<string> | null;\n        /**\n         * This is an array parameter that is sent as pipes format (pipe-separated values)\n         */\n        parameterArrayPipes: Array<string> | null;\n        /**\n         * This is an array parameter that is sent as multi format (multiple parameter instances)\n         */\n        parameterArrayMulti: Array<string> | null;\n    };\n    url: '/api/v{api-version}/collectionFormat';\n};\n\nexport type TypesData = {\n    body?: never;\n    path?: {\n        /**\n         * This is a number parameter\n         */\n        id?: number;\n    };\n    query: {\n        /**\n         * This is a number parameter\n         */\n        parameterNumber: number;\n        /**\n         * This is a string parameter\n         */\n        parameterString: string | null;\n        /**\n         * This is a boolean parameter\n         */\n        parameterBoolean: boolean | null;\n        /**\n         * This is an object parameter\n         */\n        parameterObject: {\n            [key: string]: unknown;\n        } | null;\n        /**\n         * This is an array parameter\n         */\n        parameterArray: Array<string> | null;\n        /**\n         * This is a dictionary parameter\n         */\n        parameterDictionary: {\n            [key: string]: unknown;\n        } | null;\n        /**\n         * This is an enum parameter\n         */\n        parameterEnum: 'Success' | 'Warning' | 'Error' | null;\n    };\n    url: '/api/v{api-version}/types';\n};\n\nexport type TypesResponses = {\n    /**\n     * Response is a simple number\n     */\n    200: number;\n    /**\n     * Response is a simple string\n     */\n    201: string;\n    /**\n     * Response is a simple boolean\n     */\n    202: boolean;\n    /**\n     * Response is a simple object\n     */\n    203: {\n        [key: string]: unknown;\n    };\n};\n\nexport type TypesResponse = TypesResponses[keyof TypesResponses];\n\nexport type UploadFileData = {\n    body: Blob | File;\n    path: {\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string | null;\n    };\n    query?: never;\n    url: '/api/v{api-version}/upload';\n};\n\nexport type UploadFileResponses = {\n    200: boolean;\n};\n\nexport type UploadFileResponse = UploadFileResponses[keyof UploadFileResponses];\n\nexport type FileResponseData = {\n    body?: never;\n    path: {\n        id: string;\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string;\n    };\n    query?: never;\n    url: '/api/v{api-version}/file/{id}';\n};\n\nexport type FileResponseResponses = {\n    /**\n     * Success\n     */\n    200: Blob | File;\n};\n\nexport type FileResponseResponse = FileResponseResponses[keyof FileResponseResponses];\n\nexport type ComplexTypesData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * Parameter containing object\n         */\n        parameterObject: {\n            first?: {\n                second?: {\n                    third?: string;\n                };\n            };\n        };\n        /**\n         * Parameter containing reference\n         */\n        parameterReference: ModelWithString;\n    };\n    url: '/api/v{api-version}/complex';\n};\n\nexport type ComplexTypesErrors = {\n    /**\n     * 400 `server` error\n     */\n    400: unknown;\n    /**\n     * 500 server error\n     */\n    500: unknown;\n};\n\nexport type ComplexTypesResponses = {\n    /**\n     * Successful response\n     */\n    200: Array<ModelWithString>;\n};\n\nexport type ComplexTypesResponse = ComplexTypesResponses[keyof ComplexTypesResponses];\n\nexport type MultipartResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multipart';\n};\n\nexport type MultipartResponseResponses = {\n    /**\n     * OK\n     */\n    200: {\n        file?: Blob | File;\n        metadata?: {\n            foo?: string;\n            bar?: string;\n        };\n    };\n};\n\nexport type MultipartResponseResponse = MultipartResponseResponses[keyof MultipartResponseResponses];\n\nexport type MultipartRequestData = {\n    body?: {\n        content?: Blob | File;\n        data?: ModelWithString | null;\n    };\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multipart';\n};\n\nexport type ComplexParamsData = {\n    body?: {\n        readonly key: string | null;\n        name: string | null;\n        enabled?: boolean;\n        type: 'Monkey' | 'Horse' | 'Bird';\n        listOfModels?: Array<ModelWithString> | null;\n        listOfStrings?: Array<string> | null;\n        parameters: ModelWithString | ModelWithEnum | ModelWithArray | ModelWithDictionary;\n        readonly user?: {\n            readonly id?: number;\n            readonly name?: string | null;\n        };\n    };\n    path: {\n        id: number;\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string;\n    };\n    query?: never;\n    url: '/api/v{api-version}/complex/{id}';\n};\n\nexport type ComplexParamsResponses = {\n    /**\n     * Success\n     */\n    200: ModelWithString;\n};\n\nexport type ComplexParamsResponse = ComplexParamsResponses[keyof ComplexParamsResponses];\n\nexport type CallWithResultFromHeaderData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/header';\n};\n\nexport type CallWithResultFromHeaderErrors = {\n    /**\n     * 400 server error\n     */\n    400: unknown;\n    /**\n     * 500 server error\n     */\n    500: unknown;\n};\n\nexport type CallWithResultFromHeaderResponses = {\n    /**\n     * Successful response\n     */\n    200: unknown;\n};\n\nexport type TestErrorCodeData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * Status code to return\n         */\n        status: number;\n    };\n    url: '/api/v{api-version}/error';\n};\n\nexport type TestErrorCodeErrors = {\n    /**\n     * Custom message: Internal Server Error\n     */\n    500: unknown;\n    /**\n     * Custom message: Not Implemented\n     */\n    501: unknown;\n    /**\n     * Custom message: Bad Gateway\n     */\n    502: unknown;\n    /**\n     * Custom message: Service Unavailable\n     */\n    503: unknown;\n};\n\nexport type TestErrorCodeResponses = {\n    /**\n     * Custom message: Successful response\n     */\n    200: unknown;\n};\n\nexport type NonAsciiæøåÆøÅöôêÊ字符串Data = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * Dummy input param\n         */\n        nonAsciiParamæøåÆØÅöôêÊ: number;\n    };\n    url: '/api/v{api-version}/non-ascii-æøåÆØÅöôêÊ字符串';\n};\n\nexport type NonAsciiæøåÆøÅöôêÊ字符串Responses = {\n    /**\n     * Successful response\n     */\n    200: Array<NonAsciiStringæøåÆøÅöôêÊ字符串>;\n};\n\nexport type NonAsciiæøåÆøÅöôêÊ字符串Response = NonAsciiæøåÆøÅöôêÊ字符串Responses[keyof NonAsciiæøåÆøÅöôêÊ字符串Responses];\n\nexport type PutWithFormUrlEncodedData = {\n    body: ArrayWithStrings;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/non-ascii-æøåÆØÅöôêÊ字符串';\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/ref-deep/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type { Bar, ClientOptions, Foo, GetFooData, GetFooResponse, GetFooResponses, PostFooData, PostFooResponse, PostFooResponses } from './types.gen';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/ref-deep/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type ClientOptions = {\n    baseUrl: `${string}://${string}` | (string & {});\n};\n\nexport type Foo = {\n    foo?: Array<{\n        baz?: string;\n    }>;\n    bar?: Array<{\n        baz?: string;\n    }>;\n};\n\nexport type Bar = {\n    foo?: Array<{\n        baz?: string;\n    }>;\n    bar?: Array<{\n        baz?: string;\n    }>;\n};\n\nexport type GetFooData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/foo';\n};\n\nexport type GetFooResponses = {\n    /**\n     * OK\n     */\n    200: Array<{\n        foo?: number;\n        bar?: string;\n    }>;\n};\n\nexport type GetFooResponse = GetFooResponses[keyof GetFooResponses];\n\nexport type PostFooData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/foo';\n};\n\nexport type PostFooResponses = {\n    /**\n     * OK\n     */\n    200: {\n        foo?: {\n            foo?: number;\n            bar?: string;\n        };\n        bar?: string;\n    };\n};\n\nexport type PostFooResponse = PostFooResponses[keyof PostFooResponses];\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/ref-type/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type { Bar, ClientOptions, Foo, GetFooData, GetFooResponse, GetFooResponses } from './types.gen';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/ref-type/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type ClientOptions = {\n    baseUrl: `${string}://${string}` | (string & {});\n};\n\nexport type Foo = {\n    foo: Array<{\n        baz: Bar | null;\n    }>;\n};\n\nexport type Bar = {\n    bar: number;\n};\n\nexport type GetFooData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/foo';\n};\n\nexport type GetFooResponses = {\n    /**\n     * OK\n     */\n    200: Foo | null;\n};\n\nexport type GetFooResponse = GetFooResponses[keyof GetFooResponses];\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/required-all-of-ref/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type { Bar, ClientOptions, Foo } from './types.gen';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/required-all-of-ref/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type ClientOptions = {\n    baseUrl: `${string}://${string}` | (string & {});\n};\n\nexport type Foo = {\n    foo?: string;\n    baz?: string;\n};\n\nexport type Bar = Foo & {\n    bar: number;\n    foo: string;\n    baz: string;\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/required-any-of-ref/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type { Bar, ClientOptions, Foo } from './types.gen';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/required-any-of-ref/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type ClientOptions = {\n    baseUrl: `${string}://${string}` | (string & {});\n};\n\nexport type Foo = {\n    foo?: string;\n    baz?: string;\n};\n\nexport type Bar = Foo & {\n    bar: number;\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/required-one-of-ref/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type { Bar, ClientOptions, Foo } from './types.gen';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/required-one-of-ref/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type ClientOptions = {\n    baseUrl: `${string}://${string}` | (string & {});\n};\n\nexport type Foo = {\n    foo?: string;\n    baz?: string;\n};\n\nexport type Bar = Foo & {\n    bar: number;\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/schema-const/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type { ClientOptions, Foo } from './types.gen';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/schema-const/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type ClientOptions = {\n    baseUrl: `${string}://${string}` | (string & {});\n};\n\nexport type Foo = {\n    foo?: 'foo';\n    bar?: 3.2;\n    baz?: -1;\n    qux?: true;\n    quux?: [\n        1,\n        2,\n        3,\n        'foo',\n        true\n    ];\n    corge?: {\n        [key: string]: unknown;\n    };\n    garply?: '10n';\n    numberInt8?: 100;\n    numberInt16?: 1000;\n    numberInt32?: 100000;\n    numberInt64?: 1000000000000;\n    numberUint8?: 200;\n    numberUint16?: 50000;\n    numberUint32?: 3000000000;\n    numberUint64?: 18000000000000000000;\n    integerInt8?: -100;\n    integerInt16?: -1000;\n    integerInt32?: -100000;\n    integerInt64?: -1000000000000;\n    integerUint8?: 255;\n    integerUint16?: 65535;\n    integerUint32?: 4294967295;\n    integerUint64?: '18446744073709551615n';\n    stringInt64?: '-9223372036854775808';\n    stringUint64?: '18446744073709551615';\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/security-api-key/client/client.gen.ts",
    "content": "// 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 (options: RequestOptions) => {\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 url = buildUrl(opts);\n\n    return { opts, url };\n  };\n\n  const request: Client['request'] = async (options) => {\n    // @ts-expect-error\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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/security-api-key/client/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type { Auth } from '../core/auth.gen';\nexport type { QuerySerializerOptions } from '../core/bodySerializer.gen';\nexport {\n  formDataBodySerializer,\n  jsonBodySerializer,\n  urlSearchParamsBodySerializer,\n} from '../core/bodySerializer.gen';\nexport { buildClientParams } from '../core/params.gen';\nexport { serializeQueryKeyValue } from '../core/queryKeySerializer.gen';\nexport { createClient } from './client.gen';\nexport type {\n  Client,\n  ClientOptions,\n  Config,\n  CreateClientConfig,\n  Options,\n  RequestOptions,\n  RequestResult,\n  ResolvedRequestOptions,\n  ResponseStyle,\n  TDataShape,\n} from './types.gen';\nexport { createConfig, mergeHeaders } from './utils.gen';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/security-api-key/client/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { Auth } from '../core/auth.gen';\nimport type {\n  ServerSentEventsOptions,\n  ServerSentEventsResult,\n} from '../core/serverSentEvents.gen';\nimport type { Client as CoreClient, Config as CoreConfig } from '../core/types.gen';\nimport type { Middleware } from './utils.gen';\n\nexport type ResponseStyle = 'data' | 'fields';\n\nexport interface Config<T extends ClientOptions = ClientOptions>\n  extends Omit<RequestInit, 'body' | 'headers' | 'method'>, CoreConfig {\n  /**\n   * Base URL for all requests made by this client.\n   */\n  baseUrl?: T['baseUrl'];\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   * Please don't use the Fetch client for Next.js applications. The `next`\n   * options won't have any effect.\n   *\n   * Install {@link https://www.npmjs.com/package/@hey-api/client-next `@hey-api/client-next`} instead.\n   */\n  next?: never;\n  /**\n   * Return the response data parsed in a specified format. By default, `auto`\n   * will infer the appropriate method from the `Content-Type` response header.\n   * You can override this behavior with any of the {@link Body} methods.\n   * Select `stream` if you don't want to parse response data at all.\n   *\n   * @default 'auto'\n   */\n  parseAs?: 'arrayBuffer' | 'auto' | 'blob' | 'formData' | 'json' | 'stream' | 'text';\n  /**\n   * Should we return only data or multiple fields (data, error, response, etc.)?\n   *\n   * @default 'fields'\n   */\n  responseStyle?: ResponseStyle;\n  /**\n   * Throw an error instead of returning it in the response?\n   *\n   * @default false\n   */\n  throwOnError?: T['throwOnError'];\n}\n\nexport interface RequestOptions<\n  TData = unknown,\n  TResponseStyle extends ResponseStyle = 'fields',\n  ThrowOnError extends boolean = boolean,\n  Url extends string = string,\n>\n  extends\n    Config<{\n      responseStyle: TResponseStyle;\n      throwOnError: ThrowOnError;\n    }>,\n    Pick<\n      ServerSentEventsOptions<TData>,\n      | 'onRequest'\n      | 'onSseError'\n      | 'onSseEvent'\n      | 'sseDefaultRetryDelay'\n      | 'sseMaxRetryAttempts'\n      | 'sseMaxRetryDelay'\n    > {\n  /**\n   * Any body that you want to add to your request.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/fetch#body}\n   */\n  body?: unknown;\n  path?: Record<string, unknown>;\n  query?: Record<string, unknown>;\n  /**\n   * Security mechanism(s) to use for the request.\n   */\n  security?: ReadonlyArray<Auth>;\n  url: Url;\n}\n\nexport interface ResolvedRequestOptions<\n  TResponseStyle extends ResponseStyle = 'fields',\n  ThrowOnError extends boolean = boolean,\n  Url extends string = string,\n> extends RequestOptions<unknown, TResponseStyle, ThrowOnError, Url> {\n  serializedBody?: string;\n}\n\nexport type RequestResult<\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = boolean,\n  TResponseStyle extends ResponseStyle = 'fields',\n> = ThrowOnError extends true\n  ? Promise<\n      TResponseStyle extends 'data'\n        ? TData extends Record<string, unknown>\n          ? TData[keyof TData]\n          : TData\n        : {\n            data: TData extends Record<string, unknown> ? TData[keyof TData] : TData;\n            request: Request;\n            response: Response;\n          }\n    >\n  : Promise<\n      TResponseStyle extends 'data'\n        ? (TData extends Record<string, unknown> ? TData[keyof TData] : TData) | undefined\n        : (\n            | {\n                data: TData extends Record<string, unknown> ? TData[keyof TData] : TData;\n                error: undefined;\n              }\n            | {\n                data: undefined;\n                error: TError extends Record<string, unknown> ? TError[keyof TError] : TError;\n              }\n          ) & {\n            request: Request;\n            response: Response;\n          }\n    >;\n\nexport interface ClientOptions {\n  baseUrl?: string;\n  responseStyle?: ResponseStyle;\n  throwOnError?: boolean;\n}\n\ntype MethodFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'>,\n) => RequestResult<TData, TError, ThrowOnError, TResponseStyle>;\n\ntype SseFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'>,\n) => Promise<ServerSentEventsResult<TData, TError>>;\n\ntype RequestFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'> &\n    Pick<Required<RequestOptions<TData, TResponseStyle, ThrowOnError>>, 'method'>,\n) => RequestResult<TData, TError, ThrowOnError, TResponseStyle>;\n\ntype BuildUrlFn = <\n  TData extends {\n    body?: unknown;\n    path?: Record<string, unknown>;\n    query?: Record<string, unknown>;\n    url: string;\n  },\n>(\n  options: TData & Options<TData>,\n) => string;\n\nexport type Client = CoreClient<RequestFn, Config, MethodFn, BuildUrlFn, SseFn> & {\n  interceptors: Middleware<Request, Response, unknown, ResolvedRequestOptions>;\n};\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 = ClientOptions> = (\n  override?: Config<ClientOptions & T>,\n) => Config<Required<ClientOptions> & T>;\n\nexport interface TDataShape {\n  body?: unknown;\n  headers?: unknown;\n  path?: unknown;\n  query?: unknown;\n  url: string;\n}\n\ntype OmitKeys<T, K> = Pick<T, Exclude<keyof T, K>>;\n\nexport type Options<\n  TData extends TDataShape = TDataShape,\n  ThrowOnError extends boolean = boolean,\n  TResponse = unknown,\n  TResponseStyle extends ResponseStyle = 'fields',\n> = OmitKeys<\n  RequestOptions<TResponse, TResponseStyle, ThrowOnError>,\n  'body' | 'path' | 'query' | 'url'\n> &\n  ([TData] extends [never] ? unknown : Omit<TData, 'url'>);\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/security-api-key/client/utils.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/security-api-key/client.gen.ts",
    "content": "// 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>());\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/security-api-key/core/auth.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/security-api-key/core/bodySerializer.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/security-api-key/core/params.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/security-api-key/core/pathSerializer.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/security-api-key/core/queryKeySerializer.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\n/**\n * JSON-friendly union that mirrors what Pinia Colada can hash.\n */\nexport type JsonValue =\n  | null\n  | string\n  | number\n  | boolean\n  | JsonValue[]\n  | { [key: string]: JsonValue };\n\n/**\n * Replacer that converts non-JSON values (bigint, Date, etc.) to safe substitutes.\n */\nexport const queryKeyJsonReplacer = (_key: string, value: unknown) => {\n  if (value === undefined || typeof value === 'function' || typeof value === 'symbol') {\n    return undefined;\n  }\n  if (typeof value === 'bigint') {\n    return value.toString();\n  }\n  if (value instanceof Date) {\n    return value.toISOString();\n  }\n  return value;\n};\n\n/**\n * Safely stringifies a value and parses it back into a JsonValue.\n */\nexport const stringifyToJsonValue = (input: unknown): JsonValue | undefined => {\n  try {\n    const json = JSON.stringify(input, queryKeyJsonReplacer);\n    if (json === undefined) {\n      return undefined;\n    }\n    return JSON.parse(json) as JsonValue;\n  } catch {\n    return undefined;\n  }\n};\n\n/**\n * Detects plain objects (including objects with a null prototype).\n */\nconst isPlainObject = (value: unknown): value is Record<string, unknown> => {\n  if (value === null || typeof value !== 'object') {\n    return false;\n  }\n  const prototype = Object.getPrototypeOf(value as object);\n  return prototype === Object.prototype || prototype === null;\n};\n\n/**\n * Turns URLSearchParams into a sorted JSON object for deterministic keys.\n */\nconst serializeSearchParams = (params: URLSearchParams): JsonValue => {\n  const entries = Array.from(params.entries()).sort(([a], [b]) => a.localeCompare(b));\n  const result: Record<string, JsonValue> = {};\n\n  for (const [key, value] of entries) {\n    const existing = result[key];\n    if (existing === undefined) {\n      result[key] = value;\n      continue;\n    }\n\n    if (Array.isArray(existing)) {\n      (existing as string[]).push(value);\n    } else {\n      result[key] = [existing, value];\n    }\n  }\n\n  return result;\n};\n\n/**\n * Normalizes any accepted value into a JSON-friendly shape for query keys.\n */\nexport const serializeQueryKeyValue = (value: unknown): JsonValue | undefined => {\n  if (value === null) {\n    return null;\n  }\n\n  if (typeof value === 'string' || typeof value === 'number' || typeof value === 'boolean') {\n    return value;\n  }\n\n  if (value === undefined || typeof value === 'function' || typeof value === 'symbol') {\n    return undefined;\n  }\n\n  if (typeof value === 'bigint') {\n    return value.toString();\n  }\n\n  if (value instanceof Date) {\n    return value.toISOString();\n  }\n\n  if (Array.isArray(value)) {\n    return stringifyToJsonValue(value);\n  }\n\n  if (typeof URLSearchParams !== 'undefined' && value instanceof URLSearchParams) {\n    return serializeSearchParams(value);\n  }\n\n  if (isPlainObject(value)) {\n    return stringifyToJsonValue(value);\n  }\n\n  return undefined;\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/security-api-key/core/serverSentEvents.gen.ts",
    "content": "// 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 const 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            // Normalize line endings: CRLF -> LF, then CR -> LF\n            buffer = buffer.replace(/\\r\\n/g, '\\n').replace(/\\r/g, '\\n');\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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/security-api-key/core/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { Auth, AuthToken } from './auth.gen';\nimport type { BodySerializer, QuerySerializer, QuerySerializerOptions } from './bodySerializer.gen';\n\nexport type HttpMethod =\n  | 'connect'\n  | 'delete'\n  | 'get'\n  | 'head'\n  | 'options'\n  | 'patch'\n  | 'post'\n  | 'put'\n  | 'trace';\n\nexport type Client<\n  RequestFn = never,\n  Config = unknown,\n  MethodFn = never,\n  BuildUrlFn = never,\n  SseFn = never,\n> = {\n  /**\n   * Returns the final request URL.\n   */\n  buildUrl: BuildUrlFn;\n  getConfig: () => Config;\n  request: RequestFn;\n  setConfig: (config: Config) => Config;\n} & {\n  [K in HttpMethod]: MethodFn;\n} & ([SseFn] extends [never] ? { sse?: never } : { sse: { [K in HttpMethod]: SseFn } });\n\nexport interface Config {\n  /**\n   * Auth token or a function returning auth token. The resolved value will be\n   * added to the request payload as defined by its `security` array.\n   */\n  auth?: ((auth: Auth) => Promise<AuthToken> | AuthToken) | AuthToken;\n  /**\n   * A function for serializing request body parameter. By default,\n   * {@link JSON.stringify()} will be used.\n   */\n  bodySerializer?: BodySerializer | null;\n  /**\n   * An object containing any HTTP headers that you want to pre-populate your\n   * `Headers` object with.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/Headers/Headers#init See more}\n   */\n  headers?:\n    | RequestInit['headers']\n    | Record<\n        string,\n        string | number | boolean | (string | number | boolean)[] | null | undefined | unknown\n      >;\n  /**\n   * The request method.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/fetch#method See more}\n   */\n  method?: Uppercase<HttpMethod>;\n  /**\n   * A function for serializing request query parameters. By default, arrays\n   * will be exploded in form style, objects will be exploded in deepObject\n   * style, and reserved characters are percent-encoded.\n   *\n   * This method will have no effect if the native `paramsSerializer()` Axios\n   * API function is used.\n   *\n   * {@link https://swagger.io/docs/specification/serialization/#query View examples}\n   */\n  querySerializer?: QuerySerializer | QuerySerializerOptions;\n  /**\n   * A function validating request data. This is useful if you want to ensure\n   * the request conforms to the desired shape, so it can be safely sent to\n   * the server.\n   */\n  requestValidator?: (data: unknown) => Promise<unknown>;\n  /**\n   * A function transforming response data before it's returned. This is useful\n   * for post-processing data, e.g. converting ISO strings into Date objects.\n   */\n  responseTransformer?: (data: unknown) => Promise<unknown>;\n  /**\n   * A function validating response data. This is useful if you want to ensure\n   * the response conforms to the desired shape, so it can be safely passed to\n   * the transformers and returned to the user.\n   */\n  responseValidator?: (data: unknown) => Promise<unknown>;\n}\n\ntype IsExactlyNeverOrNeverUndefined<T> = [T] extends [never]\n  ? true\n  : [T] extends [never | undefined]\n    ? [undefined] extends [T]\n      ? false\n      : true\n    : false;\n\nexport type OmitNever<T extends Record<string, unknown>> = {\n  [K in keyof T as IsExactlyNeverOrNeverUndefined<T[K]> extends true ? never : K]: T[K];\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/security-api-key/core/utils.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/security-api-key/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport { getBar, getFoo, type Options } from './sdk.gen';\nexport type { ClientOptions, GetBarData, GetBarResponses, GetFooData, GetFooResponses } from './types.gen';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/security-api-key/sdk.gen.ts",
    "content": "// 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 { GetBarData, GetBarResponses, GetFooData, GetFooResponses } from './types.gen';\n\nexport type Options<TData extends TDataShape = TDataShape, ThrowOnError extends boolean = boolean> = Options2<TData, ThrowOnError> & {\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\nexport const getFoo = <ThrowOnError extends boolean = false>(options?: Options<GetFooData, ThrowOnError>) => (options?.client ?? client).get<GetFooResponses, unknown, ThrowOnError>({\n    security: [{\n            in: 'query',\n            name: 'foo',\n            type: 'apiKey'\n        }],\n    url: '/foo',\n    ...options\n});\n\nexport const getBar = <ThrowOnError extends boolean = false>(options?: Options<GetBarData, ThrowOnError>) => (options?.client ?? client).get<GetBarResponses, unknown, ThrowOnError>({\n    security: [{\n            in: 'cookie',\n            name: 'bar',\n            type: 'apiKey'\n        }],\n    url: '/bar',\n    ...options\n});\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/security-api-key/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type ClientOptions = {\n    baseUrl: `${string}://${string}` | (string & {});\n};\n\nexport type GetFooData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/foo';\n};\n\nexport type GetFooResponses = {\n    /**\n     * OK\n     */\n    200: unknown;\n};\n\nexport type GetBarData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/bar';\n};\n\nexport type GetBarResponses = {\n    /**\n     * OK\n     */\n    200: unknown;\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/security-false/client/client.gen.ts",
    "content": "// 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 (options: RequestOptions) => {\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 url = buildUrl(opts);\n\n    return { opts, url };\n  };\n\n  const request: Client['request'] = async (options) => {\n    // @ts-expect-error\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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/security-false/client/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type { Auth } from '../core/auth.gen';\nexport type { QuerySerializerOptions } from '../core/bodySerializer.gen';\nexport {\n  formDataBodySerializer,\n  jsonBodySerializer,\n  urlSearchParamsBodySerializer,\n} from '../core/bodySerializer.gen';\nexport { buildClientParams } from '../core/params.gen';\nexport { serializeQueryKeyValue } from '../core/queryKeySerializer.gen';\nexport { createClient } from './client.gen';\nexport type {\n  Client,\n  ClientOptions,\n  Config,\n  CreateClientConfig,\n  Options,\n  RequestOptions,\n  RequestResult,\n  ResolvedRequestOptions,\n  ResponseStyle,\n  TDataShape,\n} from './types.gen';\nexport { createConfig, mergeHeaders } from './utils.gen';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/security-false/client/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { Auth } from '../core/auth.gen';\nimport type {\n  ServerSentEventsOptions,\n  ServerSentEventsResult,\n} from '../core/serverSentEvents.gen';\nimport type { Client as CoreClient, Config as CoreConfig } from '../core/types.gen';\nimport type { Middleware } from './utils.gen';\n\nexport type ResponseStyle = 'data' | 'fields';\n\nexport interface Config<T extends ClientOptions = ClientOptions>\n  extends Omit<RequestInit, 'body' | 'headers' | 'method'>, CoreConfig {\n  /**\n   * Base URL for all requests made by this client.\n   */\n  baseUrl?: T['baseUrl'];\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   * Please don't use the Fetch client for Next.js applications. The `next`\n   * options won't have any effect.\n   *\n   * Install {@link https://www.npmjs.com/package/@hey-api/client-next `@hey-api/client-next`} instead.\n   */\n  next?: never;\n  /**\n   * Return the response data parsed in a specified format. By default, `auto`\n   * will infer the appropriate method from the `Content-Type` response header.\n   * You can override this behavior with any of the {@link Body} methods.\n   * Select `stream` if you don't want to parse response data at all.\n   *\n   * @default 'auto'\n   */\n  parseAs?: 'arrayBuffer' | 'auto' | 'blob' | 'formData' | 'json' | 'stream' | 'text';\n  /**\n   * Should we return only data or multiple fields (data, error, response, etc.)?\n   *\n   * @default 'fields'\n   */\n  responseStyle?: ResponseStyle;\n  /**\n   * Throw an error instead of returning it in the response?\n   *\n   * @default false\n   */\n  throwOnError?: T['throwOnError'];\n}\n\nexport interface RequestOptions<\n  TData = unknown,\n  TResponseStyle extends ResponseStyle = 'fields',\n  ThrowOnError extends boolean = boolean,\n  Url extends string = string,\n>\n  extends\n    Config<{\n      responseStyle: TResponseStyle;\n      throwOnError: ThrowOnError;\n    }>,\n    Pick<\n      ServerSentEventsOptions<TData>,\n      | 'onRequest'\n      | 'onSseError'\n      | 'onSseEvent'\n      | 'sseDefaultRetryDelay'\n      | 'sseMaxRetryAttempts'\n      | 'sseMaxRetryDelay'\n    > {\n  /**\n   * Any body that you want to add to your request.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/fetch#body}\n   */\n  body?: unknown;\n  path?: Record<string, unknown>;\n  query?: Record<string, unknown>;\n  /**\n   * Security mechanism(s) to use for the request.\n   */\n  security?: ReadonlyArray<Auth>;\n  url: Url;\n}\n\nexport interface ResolvedRequestOptions<\n  TResponseStyle extends ResponseStyle = 'fields',\n  ThrowOnError extends boolean = boolean,\n  Url extends string = string,\n> extends RequestOptions<unknown, TResponseStyle, ThrowOnError, Url> {\n  serializedBody?: string;\n}\n\nexport type RequestResult<\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = boolean,\n  TResponseStyle extends ResponseStyle = 'fields',\n> = ThrowOnError extends true\n  ? Promise<\n      TResponseStyle extends 'data'\n        ? TData extends Record<string, unknown>\n          ? TData[keyof TData]\n          : TData\n        : {\n            data: TData extends Record<string, unknown> ? TData[keyof TData] : TData;\n            request: Request;\n            response: Response;\n          }\n    >\n  : Promise<\n      TResponseStyle extends 'data'\n        ? (TData extends Record<string, unknown> ? TData[keyof TData] : TData) | undefined\n        : (\n            | {\n                data: TData extends Record<string, unknown> ? TData[keyof TData] : TData;\n                error: undefined;\n              }\n            | {\n                data: undefined;\n                error: TError extends Record<string, unknown> ? TError[keyof TError] : TError;\n              }\n          ) & {\n            request: Request;\n            response: Response;\n          }\n    >;\n\nexport interface ClientOptions {\n  baseUrl?: string;\n  responseStyle?: ResponseStyle;\n  throwOnError?: boolean;\n}\n\ntype MethodFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'>,\n) => RequestResult<TData, TError, ThrowOnError, TResponseStyle>;\n\ntype SseFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'>,\n) => Promise<ServerSentEventsResult<TData, TError>>;\n\ntype RequestFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'> &\n    Pick<Required<RequestOptions<TData, TResponseStyle, ThrowOnError>>, 'method'>,\n) => RequestResult<TData, TError, ThrowOnError, TResponseStyle>;\n\ntype BuildUrlFn = <\n  TData extends {\n    body?: unknown;\n    path?: Record<string, unknown>;\n    query?: Record<string, unknown>;\n    url: string;\n  },\n>(\n  options: TData & Options<TData>,\n) => string;\n\nexport type Client = CoreClient<RequestFn, Config, MethodFn, BuildUrlFn, SseFn> & {\n  interceptors: Middleware<Request, Response, unknown, ResolvedRequestOptions>;\n};\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 = ClientOptions> = (\n  override?: Config<ClientOptions & T>,\n) => Config<Required<ClientOptions> & T>;\n\nexport interface TDataShape {\n  body?: unknown;\n  headers?: unknown;\n  path?: unknown;\n  query?: unknown;\n  url: string;\n}\n\ntype OmitKeys<T, K> = Pick<T, Exclude<keyof T, K>>;\n\nexport type Options<\n  TData extends TDataShape = TDataShape,\n  ThrowOnError extends boolean = boolean,\n  TResponse = unknown,\n  TResponseStyle extends ResponseStyle = 'fields',\n> = OmitKeys<\n  RequestOptions<TResponse, TResponseStyle, ThrowOnError>,\n  'body' | 'path' | 'query' | 'url'\n> &\n  ([TData] extends [never] ? unknown : Omit<TData, 'url'>);\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/security-false/client/utils.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/security-false/client.gen.ts",
    "content": "// 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>());\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/security-false/core/auth.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/security-false/core/bodySerializer.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/security-false/core/params.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/security-false/core/pathSerializer.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/security-false/core/queryKeySerializer.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\n/**\n * JSON-friendly union that mirrors what Pinia Colada can hash.\n */\nexport type JsonValue =\n  | null\n  | string\n  | number\n  | boolean\n  | JsonValue[]\n  | { [key: string]: JsonValue };\n\n/**\n * Replacer that converts non-JSON values (bigint, Date, etc.) to safe substitutes.\n */\nexport const queryKeyJsonReplacer = (_key: string, value: unknown) => {\n  if (value === undefined || typeof value === 'function' || typeof value === 'symbol') {\n    return undefined;\n  }\n  if (typeof value === 'bigint') {\n    return value.toString();\n  }\n  if (value instanceof Date) {\n    return value.toISOString();\n  }\n  return value;\n};\n\n/**\n * Safely stringifies a value and parses it back into a JsonValue.\n */\nexport const stringifyToJsonValue = (input: unknown): JsonValue | undefined => {\n  try {\n    const json = JSON.stringify(input, queryKeyJsonReplacer);\n    if (json === undefined) {\n      return undefined;\n    }\n    return JSON.parse(json) as JsonValue;\n  } catch {\n    return undefined;\n  }\n};\n\n/**\n * Detects plain objects (including objects with a null prototype).\n */\nconst isPlainObject = (value: unknown): value is Record<string, unknown> => {\n  if (value === null || typeof value !== 'object') {\n    return false;\n  }\n  const prototype = Object.getPrototypeOf(value as object);\n  return prototype === Object.prototype || prototype === null;\n};\n\n/**\n * Turns URLSearchParams into a sorted JSON object for deterministic keys.\n */\nconst serializeSearchParams = (params: URLSearchParams): JsonValue => {\n  const entries = Array.from(params.entries()).sort(([a], [b]) => a.localeCompare(b));\n  const result: Record<string, JsonValue> = {};\n\n  for (const [key, value] of entries) {\n    const existing = result[key];\n    if (existing === undefined) {\n      result[key] = value;\n      continue;\n    }\n\n    if (Array.isArray(existing)) {\n      (existing as string[]).push(value);\n    } else {\n      result[key] = [existing, value];\n    }\n  }\n\n  return result;\n};\n\n/**\n * Normalizes any accepted value into a JSON-friendly shape for query keys.\n */\nexport const serializeQueryKeyValue = (value: unknown): JsonValue | undefined => {\n  if (value === null) {\n    return null;\n  }\n\n  if (typeof value === 'string' || typeof value === 'number' || typeof value === 'boolean') {\n    return value;\n  }\n\n  if (value === undefined || typeof value === 'function' || typeof value === 'symbol') {\n    return undefined;\n  }\n\n  if (typeof value === 'bigint') {\n    return value.toString();\n  }\n\n  if (value instanceof Date) {\n    return value.toISOString();\n  }\n\n  if (Array.isArray(value)) {\n    return stringifyToJsonValue(value);\n  }\n\n  if (typeof URLSearchParams !== 'undefined' && value instanceof URLSearchParams) {\n    return serializeSearchParams(value);\n  }\n\n  if (isPlainObject(value)) {\n    return stringifyToJsonValue(value);\n  }\n\n  return undefined;\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/security-false/core/serverSentEvents.gen.ts",
    "content": "// 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 const 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            // Normalize line endings: CRLF -> LF, then CR -> LF\n            buffer = buffer.replace(/\\r\\n/g, '\\n').replace(/\\r/g, '\\n');\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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/security-false/core/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { Auth, AuthToken } from './auth.gen';\nimport type { BodySerializer, QuerySerializer, QuerySerializerOptions } from './bodySerializer.gen';\n\nexport type HttpMethod =\n  | 'connect'\n  | 'delete'\n  | 'get'\n  | 'head'\n  | 'options'\n  | 'patch'\n  | 'post'\n  | 'put'\n  | 'trace';\n\nexport type Client<\n  RequestFn = never,\n  Config = unknown,\n  MethodFn = never,\n  BuildUrlFn = never,\n  SseFn = never,\n> = {\n  /**\n   * Returns the final request URL.\n   */\n  buildUrl: BuildUrlFn;\n  getConfig: () => Config;\n  request: RequestFn;\n  setConfig: (config: Config) => Config;\n} & {\n  [K in HttpMethod]: MethodFn;\n} & ([SseFn] extends [never] ? { sse?: never } : { sse: { [K in HttpMethod]: SseFn } });\n\nexport interface Config {\n  /**\n   * Auth token or a function returning auth token. The resolved value will be\n   * added to the request payload as defined by its `security` array.\n   */\n  auth?: ((auth: Auth) => Promise<AuthToken> | AuthToken) | AuthToken;\n  /**\n   * A function for serializing request body parameter. By default,\n   * {@link JSON.stringify()} will be used.\n   */\n  bodySerializer?: BodySerializer | null;\n  /**\n   * An object containing any HTTP headers that you want to pre-populate your\n   * `Headers` object with.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/Headers/Headers#init See more}\n   */\n  headers?:\n    | RequestInit['headers']\n    | Record<\n        string,\n        string | number | boolean | (string | number | boolean)[] | null | undefined | unknown\n      >;\n  /**\n   * The request method.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/fetch#method See more}\n   */\n  method?: Uppercase<HttpMethod>;\n  /**\n   * A function for serializing request query parameters. By default, arrays\n   * will be exploded in form style, objects will be exploded in deepObject\n   * style, and reserved characters are percent-encoded.\n   *\n   * This method will have no effect if the native `paramsSerializer()` Axios\n   * API function is used.\n   *\n   * {@link https://swagger.io/docs/specification/serialization/#query View examples}\n   */\n  querySerializer?: QuerySerializer | QuerySerializerOptions;\n  /**\n   * A function validating request data. This is useful if you want to ensure\n   * the request conforms to the desired shape, so it can be safely sent to\n   * the server.\n   */\n  requestValidator?: (data: unknown) => Promise<unknown>;\n  /**\n   * A function transforming response data before it's returned. This is useful\n   * for post-processing data, e.g. converting ISO strings into Date objects.\n   */\n  responseTransformer?: (data: unknown) => Promise<unknown>;\n  /**\n   * A function validating response data. This is useful if you want to ensure\n   * the response conforms to the desired shape, so it can be safely passed to\n   * the transformers and returned to the user.\n   */\n  responseValidator?: (data: unknown) => Promise<unknown>;\n}\n\ntype IsExactlyNeverOrNeverUndefined<T> = [T] extends [never]\n  ? true\n  : [T] extends [never | undefined]\n    ? [undefined] extends [T]\n      ? false\n      : true\n    : false;\n\nexport type OmitNever<T extends Record<string, unknown>> = {\n  [K in keyof T as IsExactlyNeverOrNeverUndefined<T[K]> extends true ? never : K]: T[K];\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/security-false/core/utils.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/security-false/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport { getFoo, type Options } from './sdk.gen';\nexport type { ClientOptions, GetFooData, GetFooResponses } from './types.gen';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/security-false/sdk.gen.ts",
    "content": "// 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 { GetFooData, GetFooResponses } from './types.gen';\n\nexport type Options<TData extends TDataShape = TDataShape, ThrowOnError extends boolean = boolean> = Options2<TData, ThrowOnError> & {\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\nexport const getFoo = <ThrowOnError extends boolean = false>(options?: Options<GetFooData, ThrowOnError>) => (options?.client ?? client).get<GetFooResponses, unknown, ThrowOnError>({ url: '/foo', ...options });\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/security-false/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type ClientOptions = {\n    baseUrl: `${string}://${string}` | (string & {});\n};\n\nexport type GetFooData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/foo';\n};\n\nexport type GetFooResponses = {\n    /**\n     * OK\n     */\n    200: unknown;\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/security-http-bearer/client/client.gen.ts",
    "content": "// 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 (options: RequestOptions) => {\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 url = buildUrl(opts);\n\n    return { opts, url };\n  };\n\n  const request: Client['request'] = async (options) => {\n    // @ts-expect-error\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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/security-http-bearer/client/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type { Auth } from '../core/auth.gen';\nexport type { QuerySerializerOptions } from '../core/bodySerializer.gen';\nexport {\n  formDataBodySerializer,\n  jsonBodySerializer,\n  urlSearchParamsBodySerializer,\n} from '../core/bodySerializer.gen';\nexport { buildClientParams } from '../core/params.gen';\nexport { serializeQueryKeyValue } from '../core/queryKeySerializer.gen';\nexport { createClient } from './client.gen';\nexport type {\n  Client,\n  ClientOptions,\n  Config,\n  CreateClientConfig,\n  Options,\n  RequestOptions,\n  RequestResult,\n  ResolvedRequestOptions,\n  ResponseStyle,\n  TDataShape,\n} from './types.gen';\nexport { createConfig, mergeHeaders } from './utils.gen';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/security-http-bearer/client/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { Auth } from '../core/auth.gen';\nimport type {\n  ServerSentEventsOptions,\n  ServerSentEventsResult,\n} from '../core/serverSentEvents.gen';\nimport type { Client as CoreClient, Config as CoreConfig } from '../core/types.gen';\nimport type { Middleware } from './utils.gen';\n\nexport type ResponseStyle = 'data' | 'fields';\n\nexport interface Config<T extends ClientOptions = ClientOptions>\n  extends Omit<RequestInit, 'body' | 'headers' | 'method'>, CoreConfig {\n  /**\n   * Base URL for all requests made by this client.\n   */\n  baseUrl?: T['baseUrl'];\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   * Please don't use the Fetch client for Next.js applications. The `next`\n   * options won't have any effect.\n   *\n   * Install {@link https://www.npmjs.com/package/@hey-api/client-next `@hey-api/client-next`} instead.\n   */\n  next?: never;\n  /**\n   * Return the response data parsed in a specified format. By default, `auto`\n   * will infer the appropriate method from the `Content-Type` response header.\n   * You can override this behavior with any of the {@link Body} methods.\n   * Select `stream` if you don't want to parse response data at all.\n   *\n   * @default 'auto'\n   */\n  parseAs?: 'arrayBuffer' | 'auto' | 'blob' | 'formData' | 'json' | 'stream' | 'text';\n  /**\n   * Should we return only data or multiple fields (data, error, response, etc.)?\n   *\n   * @default 'fields'\n   */\n  responseStyle?: ResponseStyle;\n  /**\n   * Throw an error instead of returning it in the response?\n   *\n   * @default false\n   */\n  throwOnError?: T['throwOnError'];\n}\n\nexport interface RequestOptions<\n  TData = unknown,\n  TResponseStyle extends ResponseStyle = 'fields',\n  ThrowOnError extends boolean = boolean,\n  Url extends string = string,\n>\n  extends\n    Config<{\n      responseStyle: TResponseStyle;\n      throwOnError: ThrowOnError;\n    }>,\n    Pick<\n      ServerSentEventsOptions<TData>,\n      | 'onRequest'\n      | 'onSseError'\n      | 'onSseEvent'\n      | 'sseDefaultRetryDelay'\n      | 'sseMaxRetryAttempts'\n      | 'sseMaxRetryDelay'\n    > {\n  /**\n   * Any body that you want to add to your request.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/fetch#body}\n   */\n  body?: unknown;\n  path?: Record<string, unknown>;\n  query?: Record<string, unknown>;\n  /**\n   * Security mechanism(s) to use for the request.\n   */\n  security?: ReadonlyArray<Auth>;\n  url: Url;\n}\n\nexport interface ResolvedRequestOptions<\n  TResponseStyle extends ResponseStyle = 'fields',\n  ThrowOnError extends boolean = boolean,\n  Url extends string = string,\n> extends RequestOptions<unknown, TResponseStyle, ThrowOnError, Url> {\n  serializedBody?: string;\n}\n\nexport type RequestResult<\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = boolean,\n  TResponseStyle extends ResponseStyle = 'fields',\n> = ThrowOnError extends true\n  ? Promise<\n      TResponseStyle extends 'data'\n        ? TData extends Record<string, unknown>\n          ? TData[keyof TData]\n          : TData\n        : {\n            data: TData extends Record<string, unknown> ? TData[keyof TData] : TData;\n            request: Request;\n            response: Response;\n          }\n    >\n  : Promise<\n      TResponseStyle extends 'data'\n        ? (TData extends Record<string, unknown> ? TData[keyof TData] : TData) | undefined\n        : (\n            | {\n                data: TData extends Record<string, unknown> ? TData[keyof TData] : TData;\n                error: undefined;\n              }\n            | {\n                data: undefined;\n                error: TError extends Record<string, unknown> ? TError[keyof TError] : TError;\n              }\n          ) & {\n            request: Request;\n            response: Response;\n          }\n    >;\n\nexport interface ClientOptions {\n  baseUrl?: string;\n  responseStyle?: ResponseStyle;\n  throwOnError?: boolean;\n}\n\ntype MethodFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'>,\n) => RequestResult<TData, TError, ThrowOnError, TResponseStyle>;\n\ntype SseFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'>,\n) => Promise<ServerSentEventsResult<TData, TError>>;\n\ntype RequestFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'> &\n    Pick<Required<RequestOptions<TData, TResponseStyle, ThrowOnError>>, 'method'>,\n) => RequestResult<TData, TError, ThrowOnError, TResponseStyle>;\n\ntype BuildUrlFn = <\n  TData extends {\n    body?: unknown;\n    path?: Record<string, unknown>;\n    query?: Record<string, unknown>;\n    url: string;\n  },\n>(\n  options: TData & Options<TData>,\n) => string;\n\nexport type Client = CoreClient<RequestFn, Config, MethodFn, BuildUrlFn, SseFn> & {\n  interceptors: Middleware<Request, Response, unknown, ResolvedRequestOptions>;\n};\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 = ClientOptions> = (\n  override?: Config<ClientOptions & T>,\n) => Config<Required<ClientOptions> & T>;\n\nexport interface TDataShape {\n  body?: unknown;\n  headers?: unknown;\n  path?: unknown;\n  query?: unknown;\n  url: string;\n}\n\ntype OmitKeys<T, K> = Pick<T, Exclude<keyof T, K>>;\n\nexport type Options<\n  TData extends TDataShape = TDataShape,\n  ThrowOnError extends boolean = boolean,\n  TResponse = unknown,\n  TResponseStyle extends ResponseStyle = 'fields',\n> = OmitKeys<\n  RequestOptions<TResponse, TResponseStyle, ThrowOnError>,\n  'body' | 'path' | 'query' | 'url'\n> &\n  ([TData] extends [never] ? unknown : Omit<TData, 'url'>);\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/security-http-bearer/client/utils.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/security-http-bearer/client.gen.ts",
    "content": "// 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>());\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/security-http-bearer/core/auth.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/security-http-bearer/core/bodySerializer.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/security-http-bearer/core/params.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/security-http-bearer/core/pathSerializer.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/security-http-bearer/core/queryKeySerializer.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\n/**\n * JSON-friendly union that mirrors what Pinia Colada can hash.\n */\nexport type JsonValue =\n  | null\n  | string\n  | number\n  | boolean\n  | JsonValue[]\n  | { [key: string]: JsonValue };\n\n/**\n * Replacer that converts non-JSON values (bigint, Date, etc.) to safe substitutes.\n */\nexport const queryKeyJsonReplacer = (_key: string, value: unknown) => {\n  if (value === undefined || typeof value === 'function' || typeof value === 'symbol') {\n    return undefined;\n  }\n  if (typeof value === 'bigint') {\n    return value.toString();\n  }\n  if (value instanceof Date) {\n    return value.toISOString();\n  }\n  return value;\n};\n\n/**\n * Safely stringifies a value and parses it back into a JsonValue.\n */\nexport const stringifyToJsonValue = (input: unknown): JsonValue | undefined => {\n  try {\n    const json = JSON.stringify(input, queryKeyJsonReplacer);\n    if (json === undefined) {\n      return undefined;\n    }\n    return JSON.parse(json) as JsonValue;\n  } catch {\n    return undefined;\n  }\n};\n\n/**\n * Detects plain objects (including objects with a null prototype).\n */\nconst isPlainObject = (value: unknown): value is Record<string, unknown> => {\n  if (value === null || typeof value !== 'object') {\n    return false;\n  }\n  const prototype = Object.getPrototypeOf(value as object);\n  return prototype === Object.prototype || prototype === null;\n};\n\n/**\n * Turns URLSearchParams into a sorted JSON object for deterministic keys.\n */\nconst serializeSearchParams = (params: URLSearchParams): JsonValue => {\n  const entries = Array.from(params.entries()).sort(([a], [b]) => a.localeCompare(b));\n  const result: Record<string, JsonValue> = {};\n\n  for (const [key, value] of entries) {\n    const existing = result[key];\n    if (existing === undefined) {\n      result[key] = value;\n      continue;\n    }\n\n    if (Array.isArray(existing)) {\n      (existing as string[]).push(value);\n    } else {\n      result[key] = [existing, value];\n    }\n  }\n\n  return result;\n};\n\n/**\n * Normalizes any accepted value into a JSON-friendly shape for query keys.\n */\nexport const serializeQueryKeyValue = (value: unknown): JsonValue | undefined => {\n  if (value === null) {\n    return null;\n  }\n\n  if (typeof value === 'string' || typeof value === 'number' || typeof value === 'boolean') {\n    return value;\n  }\n\n  if (value === undefined || typeof value === 'function' || typeof value === 'symbol') {\n    return undefined;\n  }\n\n  if (typeof value === 'bigint') {\n    return value.toString();\n  }\n\n  if (value instanceof Date) {\n    return value.toISOString();\n  }\n\n  if (Array.isArray(value)) {\n    return stringifyToJsonValue(value);\n  }\n\n  if (typeof URLSearchParams !== 'undefined' && value instanceof URLSearchParams) {\n    return serializeSearchParams(value);\n  }\n\n  if (isPlainObject(value)) {\n    return stringifyToJsonValue(value);\n  }\n\n  return undefined;\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/security-http-bearer/core/serverSentEvents.gen.ts",
    "content": "// 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 const 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            // Normalize line endings: CRLF -> LF, then CR -> LF\n            buffer = buffer.replace(/\\r\\n/g, '\\n').replace(/\\r/g, '\\n');\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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/security-http-bearer/core/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { Auth, AuthToken } from './auth.gen';\nimport type { BodySerializer, QuerySerializer, QuerySerializerOptions } from './bodySerializer.gen';\n\nexport type HttpMethod =\n  | 'connect'\n  | 'delete'\n  | 'get'\n  | 'head'\n  | 'options'\n  | 'patch'\n  | 'post'\n  | 'put'\n  | 'trace';\n\nexport type Client<\n  RequestFn = never,\n  Config = unknown,\n  MethodFn = never,\n  BuildUrlFn = never,\n  SseFn = never,\n> = {\n  /**\n   * Returns the final request URL.\n   */\n  buildUrl: BuildUrlFn;\n  getConfig: () => Config;\n  request: RequestFn;\n  setConfig: (config: Config) => Config;\n} & {\n  [K in HttpMethod]: MethodFn;\n} & ([SseFn] extends [never] ? { sse?: never } : { sse: { [K in HttpMethod]: SseFn } });\n\nexport interface Config {\n  /**\n   * Auth token or a function returning auth token. The resolved value will be\n   * added to the request payload as defined by its `security` array.\n   */\n  auth?: ((auth: Auth) => Promise<AuthToken> | AuthToken) | AuthToken;\n  /**\n   * A function for serializing request body parameter. By default,\n   * {@link JSON.stringify()} will be used.\n   */\n  bodySerializer?: BodySerializer | null;\n  /**\n   * An object containing any HTTP headers that you want to pre-populate your\n   * `Headers` object with.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/Headers/Headers#init See more}\n   */\n  headers?:\n    | RequestInit['headers']\n    | Record<\n        string,\n        string | number | boolean | (string | number | boolean)[] | null | undefined | unknown\n      >;\n  /**\n   * The request method.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/fetch#method See more}\n   */\n  method?: Uppercase<HttpMethod>;\n  /**\n   * A function for serializing request query parameters. By default, arrays\n   * will be exploded in form style, objects will be exploded in deepObject\n   * style, and reserved characters are percent-encoded.\n   *\n   * This method will have no effect if the native `paramsSerializer()` Axios\n   * API function is used.\n   *\n   * {@link https://swagger.io/docs/specification/serialization/#query View examples}\n   */\n  querySerializer?: QuerySerializer | QuerySerializerOptions;\n  /**\n   * A function validating request data. This is useful if you want to ensure\n   * the request conforms to the desired shape, so it can be safely sent to\n   * the server.\n   */\n  requestValidator?: (data: unknown) => Promise<unknown>;\n  /**\n   * A function transforming response data before it's returned. This is useful\n   * for post-processing data, e.g. converting ISO strings into Date objects.\n   */\n  responseTransformer?: (data: unknown) => Promise<unknown>;\n  /**\n   * A function validating response data. This is useful if you want to ensure\n   * the response conforms to the desired shape, so it can be safely passed to\n   * the transformers and returned to the user.\n   */\n  responseValidator?: (data: unknown) => Promise<unknown>;\n}\n\ntype IsExactlyNeverOrNeverUndefined<T> = [T] extends [never]\n  ? true\n  : [T] extends [never | undefined]\n    ? [undefined] extends [T]\n      ? false\n      : true\n    : false;\n\nexport type OmitNever<T extends Record<string, unknown>> = {\n  [K in keyof T as IsExactlyNeverOrNeverUndefined<T[K]> extends true ? never : K]: T[K];\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/security-http-bearer/core/utils.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/security-http-bearer/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport { getFoo, type Options } from './sdk.gen';\nexport type { ClientOptions, GetFooData, GetFooResponses } from './types.gen';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/security-http-bearer/sdk.gen.ts",
    "content": "// 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 { GetFooData, GetFooResponses } from './types.gen';\n\nexport type Options<TData extends TDataShape = TDataShape, ThrowOnError extends boolean = boolean> = Options2<TData, ThrowOnError> & {\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\nexport const getFoo = <ThrowOnError extends boolean = false>(options?: Options<GetFooData, ThrowOnError>) => (options?.client ?? client).get<GetFooResponses, unknown, ThrowOnError>({\n    security: [{ scheme: 'bearer', type: 'http' }],\n    url: '/foo',\n    ...options\n});\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/security-http-bearer/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type ClientOptions = {\n    baseUrl: `${string}://${string}` | (string & {});\n};\n\nexport type GetFooData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/foo';\n};\n\nexport type GetFooResponses = {\n    /**\n     * OK\n     */\n    200: unknown;\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/security-oauth2/client/client.gen.ts",
    "content": "// 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 (options: RequestOptions) => {\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 url = buildUrl(opts);\n\n    return { opts, url };\n  };\n\n  const request: Client['request'] = async (options) => {\n    // @ts-expect-error\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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/security-oauth2/client/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type { Auth } from '../core/auth.gen';\nexport type { QuerySerializerOptions } from '../core/bodySerializer.gen';\nexport {\n  formDataBodySerializer,\n  jsonBodySerializer,\n  urlSearchParamsBodySerializer,\n} from '../core/bodySerializer.gen';\nexport { buildClientParams } from '../core/params.gen';\nexport { serializeQueryKeyValue } from '../core/queryKeySerializer.gen';\nexport { createClient } from './client.gen';\nexport type {\n  Client,\n  ClientOptions,\n  Config,\n  CreateClientConfig,\n  Options,\n  RequestOptions,\n  RequestResult,\n  ResolvedRequestOptions,\n  ResponseStyle,\n  TDataShape,\n} from './types.gen';\nexport { createConfig, mergeHeaders } from './utils.gen';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/security-oauth2/client/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { Auth } from '../core/auth.gen';\nimport type {\n  ServerSentEventsOptions,\n  ServerSentEventsResult,\n} from '../core/serverSentEvents.gen';\nimport type { Client as CoreClient, Config as CoreConfig } from '../core/types.gen';\nimport type { Middleware } from './utils.gen';\n\nexport type ResponseStyle = 'data' | 'fields';\n\nexport interface Config<T extends ClientOptions = ClientOptions>\n  extends Omit<RequestInit, 'body' | 'headers' | 'method'>, CoreConfig {\n  /**\n   * Base URL for all requests made by this client.\n   */\n  baseUrl?: T['baseUrl'];\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   * Please don't use the Fetch client for Next.js applications. The `next`\n   * options won't have any effect.\n   *\n   * Install {@link https://www.npmjs.com/package/@hey-api/client-next `@hey-api/client-next`} instead.\n   */\n  next?: never;\n  /**\n   * Return the response data parsed in a specified format. By default, `auto`\n   * will infer the appropriate method from the `Content-Type` response header.\n   * You can override this behavior with any of the {@link Body} methods.\n   * Select `stream` if you don't want to parse response data at all.\n   *\n   * @default 'auto'\n   */\n  parseAs?: 'arrayBuffer' | 'auto' | 'blob' | 'formData' | 'json' | 'stream' | 'text';\n  /**\n   * Should we return only data or multiple fields (data, error, response, etc.)?\n   *\n   * @default 'fields'\n   */\n  responseStyle?: ResponseStyle;\n  /**\n   * Throw an error instead of returning it in the response?\n   *\n   * @default false\n   */\n  throwOnError?: T['throwOnError'];\n}\n\nexport interface RequestOptions<\n  TData = unknown,\n  TResponseStyle extends ResponseStyle = 'fields',\n  ThrowOnError extends boolean = boolean,\n  Url extends string = string,\n>\n  extends\n    Config<{\n      responseStyle: TResponseStyle;\n      throwOnError: ThrowOnError;\n    }>,\n    Pick<\n      ServerSentEventsOptions<TData>,\n      | 'onRequest'\n      | 'onSseError'\n      | 'onSseEvent'\n      | 'sseDefaultRetryDelay'\n      | 'sseMaxRetryAttempts'\n      | 'sseMaxRetryDelay'\n    > {\n  /**\n   * Any body that you want to add to your request.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/fetch#body}\n   */\n  body?: unknown;\n  path?: Record<string, unknown>;\n  query?: Record<string, unknown>;\n  /**\n   * Security mechanism(s) to use for the request.\n   */\n  security?: ReadonlyArray<Auth>;\n  url: Url;\n}\n\nexport interface ResolvedRequestOptions<\n  TResponseStyle extends ResponseStyle = 'fields',\n  ThrowOnError extends boolean = boolean,\n  Url extends string = string,\n> extends RequestOptions<unknown, TResponseStyle, ThrowOnError, Url> {\n  serializedBody?: string;\n}\n\nexport type RequestResult<\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = boolean,\n  TResponseStyle extends ResponseStyle = 'fields',\n> = ThrowOnError extends true\n  ? Promise<\n      TResponseStyle extends 'data'\n        ? TData extends Record<string, unknown>\n          ? TData[keyof TData]\n          : TData\n        : {\n            data: TData extends Record<string, unknown> ? TData[keyof TData] : TData;\n            request: Request;\n            response: Response;\n          }\n    >\n  : Promise<\n      TResponseStyle extends 'data'\n        ? (TData extends Record<string, unknown> ? TData[keyof TData] : TData) | undefined\n        : (\n            | {\n                data: TData extends Record<string, unknown> ? TData[keyof TData] : TData;\n                error: undefined;\n              }\n            | {\n                data: undefined;\n                error: TError extends Record<string, unknown> ? TError[keyof TError] : TError;\n              }\n          ) & {\n            request: Request;\n            response: Response;\n          }\n    >;\n\nexport interface ClientOptions {\n  baseUrl?: string;\n  responseStyle?: ResponseStyle;\n  throwOnError?: boolean;\n}\n\ntype MethodFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'>,\n) => RequestResult<TData, TError, ThrowOnError, TResponseStyle>;\n\ntype SseFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'>,\n) => Promise<ServerSentEventsResult<TData, TError>>;\n\ntype RequestFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'> &\n    Pick<Required<RequestOptions<TData, TResponseStyle, ThrowOnError>>, 'method'>,\n) => RequestResult<TData, TError, ThrowOnError, TResponseStyle>;\n\ntype BuildUrlFn = <\n  TData extends {\n    body?: unknown;\n    path?: Record<string, unknown>;\n    query?: Record<string, unknown>;\n    url: string;\n  },\n>(\n  options: TData & Options<TData>,\n) => string;\n\nexport type Client = CoreClient<RequestFn, Config, MethodFn, BuildUrlFn, SseFn> & {\n  interceptors: Middleware<Request, Response, unknown, ResolvedRequestOptions>;\n};\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 = ClientOptions> = (\n  override?: Config<ClientOptions & T>,\n) => Config<Required<ClientOptions> & T>;\n\nexport interface TDataShape {\n  body?: unknown;\n  headers?: unknown;\n  path?: unknown;\n  query?: unknown;\n  url: string;\n}\n\ntype OmitKeys<T, K> = Pick<T, Exclude<keyof T, K>>;\n\nexport type Options<\n  TData extends TDataShape = TDataShape,\n  ThrowOnError extends boolean = boolean,\n  TResponse = unknown,\n  TResponseStyle extends ResponseStyle = 'fields',\n> = OmitKeys<\n  RequestOptions<TResponse, TResponseStyle, ThrowOnError>,\n  'body' | 'path' | 'query' | 'url'\n> &\n  ([TData] extends [never] ? unknown : Omit<TData, 'url'>);\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/security-oauth2/client/utils.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/security-oauth2/client.gen.ts",
    "content": "// 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>());\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/security-oauth2/core/auth.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/security-oauth2/core/bodySerializer.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/security-oauth2/core/params.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/security-oauth2/core/pathSerializer.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/security-oauth2/core/queryKeySerializer.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\n/**\n * JSON-friendly union that mirrors what Pinia Colada can hash.\n */\nexport type JsonValue =\n  | null\n  | string\n  | number\n  | boolean\n  | JsonValue[]\n  | { [key: string]: JsonValue };\n\n/**\n * Replacer that converts non-JSON values (bigint, Date, etc.) to safe substitutes.\n */\nexport const queryKeyJsonReplacer = (_key: string, value: unknown) => {\n  if (value === undefined || typeof value === 'function' || typeof value === 'symbol') {\n    return undefined;\n  }\n  if (typeof value === 'bigint') {\n    return value.toString();\n  }\n  if (value instanceof Date) {\n    return value.toISOString();\n  }\n  return value;\n};\n\n/**\n * Safely stringifies a value and parses it back into a JsonValue.\n */\nexport const stringifyToJsonValue = (input: unknown): JsonValue | undefined => {\n  try {\n    const json = JSON.stringify(input, queryKeyJsonReplacer);\n    if (json === undefined) {\n      return undefined;\n    }\n    return JSON.parse(json) as JsonValue;\n  } catch {\n    return undefined;\n  }\n};\n\n/**\n * Detects plain objects (including objects with a null prototype).\n */\nconst isPlainObject = (value: unknown): value is Record<string, unknown> => {\n  if (value === null || typeof value !== 'object') {\n    return false;\n  }\n  const prototype = Object.getPrototypeOf(value as object);\n  return prototype === Object.prototype || prototype === null;\n};\n\n/**\n * Turns URLSearchParams into a sorted JSON object for deterministic keys.\n */\nconst serializeSearchParams = (params: URLSearchParams): JsonValue => {\n  const entries = Array.from(params.entries()).sort(([a], [b]) => a.localeCompare(b));\n  const result: Record<string, JsonValue> = {};\n\n  for (const [key, value] of entries) {\n    const existing = result[key];\n    if (existing === undefined) {\n      result[key] = value;\n      continue;\n    }\n\n    if (Array.isArray(existing)) {\n      (existing as string[]).push(value);\n    } else {\n      result[key] = [existing, value];\n    }\n  }\n\n  return result;\n};\n\n/**\n * Normalizes any accepted value into a JSON-friendly shape for query keys.\n */\nexport const serializeQueryKeyValue = (value: unknown): JsonValue | undefined => {\n  if (value === null) {\n    return null;\n  }\n\n  if (typeof value === 'string' || typeof value === 'number' || typeof value === 'boolean') {\n    return value;\n  }\n\n  if (value === undefined || typeof value === 'function' || typeof value === 'symbol') {\n    return undefined;\n  }\n\n  if (typeof value === 'bigint') {\n    return value.toString();\n  }\n\n  if (value instanceof Date) {\n    return value.toISOString();\n  }\n\n  if (Array.isArray(value)) {\n    return stringifyToJsonValue(value);\n  }\n\n  if (typeof URLSearchParams !== 'undefined' && value instanceof URLSearchParams) {\n    return serializeSearchParams(value);\n  }\n\n  if (isPlainObject(value)) {\n    return stringifyToJsonValue(value);\n  }\n\n  return undefined;\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/security-oauth2/core/serverSentEvents.gen.ts",
    "content": "// 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 const 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            // Normalize line endings: CRLF -> LF, then CR -> LF\n            buffer = buffer.replace(/\\r\\n/g, '\\n').replace(/\\r/g, '\\n');\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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/security-oauth2/core/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { Auth, AuthToken } from './auth.gen';\nimport type { BodySerializer, QuerySerializer, QuerySerializerOptions } from './bodySerializer.gen';\n\nexport type HttpMethod =\n  | 'connect'\n  | 'delete'\n  | 'get'\n  | 'head'\n  | 'options'\n  | 'patch'\n  | 'post'\n  | 'put'\n  | 'trace';\n\nexport type Client<\n  RequestFn = never,\n  Config = unknown,\n  MethodFn = never,\n  BuildUrlFn = never,\n  SseFn = never,\n> = {\n  /**\n   * Returns the final request URL.\n   */\n  buildUrl: BuildUrlFn;\n  getConfig: () => Config;\n  request: RequestFn;\n  setConfig: (config: Config) => Config;\n} & {\n  [K in HttpMethod]: MethodFn;\n} & ([SseFn] extends [never] ? { sse?: never } : { sse: { [K in HttpMethod]: SseFn } });\n\nexport interface Config {\n  /**\n   * Auth token or a function returning auth token. The resolved value will be\n   * added to the request payload as defined by its `security` array.\n   */\n  auth?: ((auth: Auth) => Promise<AuthToken> | AuthToken) | AuthToken;\n  /**\n   * A function for serializing request body parameter. By default,\n   * {@link JSON.stringify()} will be used.\n   */\n  bodySerializer?: BodySerializer | null;\n  /**\n   * An object containing any HTTP headers that you want to pre-populate your\n   * `Headers` object with.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/Headers/Headers#init See more}\n   */\n  headers?:\n    | RequestInit['headers']\n    | Record<\n        string,\n        string | number | boolean | (string | number | boolean)[] | null | undefined | unknown\n      >;\n  /**\n   * The request method.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/fetch#method See more}\n   */\n  method?: Uppercase<HttpMethod>;\n  /**\n   * A function for serializing request query parameters. By default, arrays\n   * will be exploded in form style, objects will be exploded in deepObject\n   * style, and reserved characters are percent-encoded.\n   *\n   * This method will have no effect if the native `paramsSerializer()` Axios\n   * API function is used.\n   *\n   * {@link https://swagger.io/docs/specification/serialization/#query View examples}\n   */\n  querySerializer?: QuerySerializer | QuerySerializerOptions;\n  /**\n   * A function validating request data. This is useful if you want to ensure\n   * the request conforms to the desired shape, so it can be safely sent to\n   * the server.\n   */\n  requestValidator?: (data: unknown) => Promise<unknown>;\n  /**\n   * A function transforming response data before it's returned. This is useful\n   * for post-processing data, e.g. converting ISO strings into Date objects.\n   */\n  responseTransformer?: (data: unknown) => Promise<unknown>;\n  /**\n   * A function validating response data. This is useful if you want to ensure\n   * the response conforms to the desired shape, so it can be safely passed to\n   * the transformers and returned to the user.\n   */\n  responseValidator?: (data: unknown) => Promise<unknown>;\n}\n\ntype IsExactlyNeverOrNeverUndefined<T> = [T] extends [never]\n  ? true\n  : [T] extends [never | undefined]\n    ? [undefined] extends [T]\n      ? false\n      : true\n    : false;\n\nexport type OmitNever<T extends Record<string, unknown>> = {\n  [K in keyof T as IsExactlyNeverOrNeverUndefined<T[K]> extends true ? never : K]: T[K];\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/security-oauth2/core/utils.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/security-oauth2/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport { getFoo, type Options } from './sdk.gen';\nexport type { ClientOptions, GetFooData, GetFooResponses } from './types.gen';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/security-oauth2/sdk.gen.ts",
    "content": "// 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 { GetFooData, GetFooResponses } from './types.gen';\n\nexport type Options<TData extends TDataShape = TDataShape, ThrowOnError extends boolean = boolean> = Options2<TData, ThrowOnError> & {\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\nexport const getFoo = <ThrowOnError extends boolean = false>(options?: Options<GetFooData, ThrowOnError>) => (options?.client ?? client).get<GetFooResponses, unknown, ThrowOnError>({\n    security: [{ scheme: 'bearer', type: 'http' }],\n    url: '/foo',\n    ...options\n});\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/security-oauth2/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type ClientOptions = {\n    baseUrl: `${string}://${string}` | (string & {});\n};\n\nexport type GetFooData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/foo';\n};\n\nexport type GetFooResponses = {\n    /**\n     * OK\n     */\n    200: unknown;\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/security-open-id-connect/client/client.gen.ts",
    "content": "// 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 (options: RequestOptions) => {\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 url = buildUrl(opts);\n\n    return { opts, url };\n  };\n\n  const request: Client['request'] = async (options) => {\n    // @ts-expect-error\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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/security-open-id-connect/client/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type { Auth } from '../core/auth.gen';\nexport type { QuerySerializerOptions } from '../core/bodySerializer.gen';\nexport {\n  formDataBodySerializer,\n  jsonBodySerializer,\n  urlSearchParamsBodySerializer,\n} from '../core/bodySerializer.gen';\nexport { buildClientParams } from '../core/params.gen';\nexport { serializeQueryKeyValue } from '../core/queryKeySerializer.gen';\nexport { createClient } from './client.gen';\nexport type {\n  Client,\n  ClientOptions,\n  Config,\n  CreateClientConfig,\n  Options,\n  RequestOptions,\n  RequestResult,\n  ResolvedRequestOptions,\n  ResponseStyle,\n  TDataShape,\n} from './types.gen';\nexport { createConfig, mergeHeaders } from './utils.gen';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/security-open-id-connect/client/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { Auth } from '../core/auth.gen';\nimport type {\n  ServerSentEventsOptions,\n  ServerSentEventsResult,\n} from '../core/serverSentEvents.gen';\nimport type { Client as CoreClient, Config as CoreConfig } from '../core/types.gen';\nimport type { Middleware } from './utils.gen';\n\nexport type ResponseStyle = 'data' | 'fields';\n\nexport interface Config<T extends ClientOptions = ClientOptions>\n  extends Omit<RequestInit, 'body' | 'headers' | 'method'>, CoreConfig {\n  /**\n   * Base URL for all requests made by this client.\n   */\n  baseUrl?: T['baseUrl'];\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   * Please don't use the Fetch client for Next.js applications. The `next`\n   * options won't have any effect.\n   *\n   * Install {@link https://www.npmjs.com/package/@hey-api/client-next `@hey-api/client-next`} instead.\n   */\n  next?: never;\n  /**\n   * Return the response data parsed in a specified format. By default, `auto`\n   * will infer the appropriate method from the `Content-Type` response header.\n   * You can override this behavior with any of the {@link Body} methods.\n   * Select `stream` if you don't want to parse response data at all.\n   *\n   * @default 'auto'\n   */\n  parseAs?: 'arrayBuffer' | 'auto' | 'blob' | 'formData' | 'json' | 'stream' | 'text';\n  /**\n   * Should we return only data or multiple fields (data, error, response, etc.)?\n   *\n   * @default 'fields'\n   */\n  responseStyle?: ResponseStyle;\n  /**\n   * Throw an error instead of returning it in the response?\n   *\n   * @default false\n   */\n  throwOnError?: T['throwOnError'];\n}\n\nexport interface RequestOptions<\n  TData = unknown,\n  TResponseStyle extends ResponseStyle = 'fields',\n  ThrowOnError extends boolean = boolean,\n  Url extends string = string,\n>\n  extends\n    Config<{\n      responseStyle: TResponseStyle;\n      throwOnError: ThrowOnError;\n    }>,\n    Pick<\n      ServerSentEventsOptions<TData>,\n      | 'onRequest'\n      | 'onSseError'\n      | 'onSseEvent'\n      | 'sseDefaultRetryDelay'\n      | 'sseMaxRetryAttempts'\n      | 'sseMaxRetryDelay'\n    > {\n  /**\n   * Any body that you want to add to your request.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/fetch#body}\n   */\n  body?: unknown;\n  path?: Record<string, unknown>;\n  query?: Record<string, unknown>;\n  /**\n   * Security mechanism(s) to use for the request.\n   */\n  security?: ReadonlyArray<Auth>;\n  url: Url;\n}\n\nexport interface ResolvedRequestOptions<\n  TResponseStyle extends ResponseStyle = 'fields',\n  ThrowOnError extends boolean = boolean,\n  Url extends string = string,\n> extends RequestOptions<unknown, TResponseStyle, ThrowOnError, Url> {\n  serializedBody?: string;\n}\n\nexport type RequestResult<\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = boolean,\n  TResponseStyle extends ResponseStyle = 'fields',\n> = ThrowOnError extends true\n  ? Promise<\n      TResponseStyle extends 'data'\n        ? TData extends Record<string, unknown>\n          ? TData[keyof TData]\n          : TData\n        : {\n            data: TData extends Record<string, unknown> ? TData[keyof TData] : TData;\n            request: Request;\n            response: Response;\n          }\n    >\n  : Promise<\n      TResponseStyle extends 'data'\n        ? (TData extends Record<string, unknown> ? TData[keyof TData] : TData) | undefined\n        : (\n            | {\n                data: TData extends Record<string, unknown> ? TData[keyof TData] : TData;\n                error: undefined;\n              }\n            | {\n                data: undefined;\n                error: TError extends Record<string, unknown> ? TError[keyof TError] : TError;\n              }\n          ) & {\n            request: Request;\n            response: Response;\n          }\n    >;\n\nexport interface ClientOptions {\n  baseUrl?: string;\n  responseStyle?: ResponseStyle;\n  throwOnError?: boolean;\n}\n\ntype MethodFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'>,\n) => RequestResult<TData, TError, ThrowOnError, TResponseStyle>;\n\ntype SseFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'>,\n) => Promise<ServerSentEventsResult<TData, TError>>;\n\ntype RequestFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'> &\n    Pick<Required<RequestOptions<TData, TResponseStyle, ThrowOnError>>, 'method'>,\n) => RequestResult<TData, TError, ThrowOnError, TResponseStyle>;\n\ntype BuildUrlFn = <\n  TData extends {\n    body?: unknown;\n    path?: Record<string, unknown>;\n    query?: Record<string, unknown>;\n    url: string;\n  },\n>(\n  options: TData & Options<TData>,\n) => string;\n\nexport type Client = CoreClient<RequestFn, Config, MethodFn, BuildUrlFn, SseFn> & {\n  interceptors: Middleware<Request, Response, unknown, ResolvedRequestOptions>;\n};\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 = ClientOptions> = (\n  override?: Config<ClientOptions & T>,\n) => Config<Required<ClientOptions> & T>;\n\nexport interface TDataShape {\n  body?: unknown;\n  headers?: unknown;\n  path?: unknown;\n  query?: unknown;\n  url: string;\n}\n\ntype OmitKeys<T, K> = Pick<T, Exclude<keyof T, K>>;\n\nexport type Options<\n  TData extends TDataShape = TDataShape,\n  ThrowOnError extends boolean = boolean,\n  TResponse = unknown,\n  TResponseStyle extends ResponseStyle = 'fields',\n> = OmitKeys<\n  RequestOptions<TResponse, TResponseStyle, ThrowOnError>,\n  'body' | 'path' | 'query' | 'url'\n> &\n  ([TData] extends [never] ? unknown : Omit<TData, 'url'>);\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/security-open-id-connect/client/utils.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/security-open-id-connect/client.gen.ts",
    "content": "// 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>());\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/security-open-id-connect/core/auth.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/security-open-id-connect/core/bodySerializer.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/security-open-id-connect/core/params.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/security-open-id-connect/core/pathSerializer.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/security-open-id-connect/core/queryKeySerializer.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\n/**\n * JSON-friendly union that mirrors what Pinia Colada can hash.\n */\nexport type JsonValue =\n  | null\n  | string\n  | number\n  | boolean\n  | JsonValue[]\n  | { [key: string]: JsonValue };\n\n/**\n * Replacer that converts non-JSON values (bigint, Date, etc.) to safe substitutes.\n */\nexport const queryKeyJsonReplacer = (_key: string, value: unknown) => {\n  if (value === undefined || typeof value === 'function' || typeof value === 'symbol') {\n    return undefined;\n  }\n  if (typeof value === 'bigint') {\n    return value.toString();\n  }\n  if (value instanceof Date) {\n    return value.toISOString();\n  }\n  return value;\n};\n\n/**\n * Safely stringifies a value and parses it back into a JsonValue.\n */\nexport const stringifyToJsonValue = (input: unknown): JsonValue | undefined => {\n  try {\n    const json = JSON.stringify(input, queryKeyJsonReplacer);\n    if (json === undefined) {\n      return undefined;\n    }\n    return JSON.parse(json) as JsonValue;\n  } catch {\n    return undefined;\n  }\n};\n\n/**\n * Detects plain objects (including objects with a null prototype).\n */\nconst isPlainObject = (value: unknown): value is Record<string, unknown> => {\n  if (value === null || typeof value !== 'object') {\n    return false;\n  }\n  const prototype = Object.getPrototypeOf(value as object);\n  return prototype === Object.prototype || prototype === null;\n};\n\n/**\n * Turns URLSearchParams into a sorted JSON object for deterministic keys.\n */\nconst serializeSearchParams = (params: URLSearchParams): JsonValue => {\n  const entries = Array.from(params.entries()).sort(([a], [b]) => a.localeCompare(b));\n  const result: Record<string, JsonValue> = {};\n\n  for (const [key, value] of entries) {\n    const existing = result[key];\n    if (existing === undefined) {\n      result[key] = value;\n      continue;\n    }\n\n    if (Array.isArray(existing)) {\n      (existing as string[]).push(value);\n    } else {\n      result[key] = [existing, value];\n    }\n  }\n\n  return result;\n};\n\n/**\n * Normalizes any accepted value into a JSON-friendly shape for query keys.\n */\nexport const serializeQueryKeyValue = (value: unknown): JsonValue | undefined => {\n  if (value === null) {\n    return null;\n  }\n\n  if (typeof value === 'string' || typeof value === 'number' || typeof value === 'boolean') {\n    return value;\n  }\n\n  if (value === undefined || typeof value === 'function' || typeof value === 'symbol') {\n    return undefined;\n  }\n\n  if (typeof value === 'bigint') {\n    return value.toString();\n  }\n\n  if (value instanceof Date) {\n    return value.toISOString();\n  }\n\n  if (Array.isArray(value)) {\n    return stringifyToJsonValue(value);\n  }\n\n  if (typeof URLSearchParams !== 'undefined' && value instanceof URLSearchParams) {\n    return serializeSearchParams(value);\n  }\n\n  if (isPlainObject(value)) {\n    return stringifyToJsonValue(value);\n  }\n\n  return undefined;\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/security-open-id-connect/core/serverSentEvents.gen.ts",
    "content": "// 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 const 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            // Normalize line endings: CRLF -> LF, then CR -> LF\n            buffer = buffer.replace(/\\r\\n/g, '\\n').replace(/\\r/g, '\\n');\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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/security-open-id-connect/core/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { Auth, AuthToken } from './auth.gen';\nimport type { BodySerializer, QuerySerializer, QuerySerializerOptions } from './bodySerializer.gen';\n\nexport type HttpMethod =\n  | 'connect'\n  | 'delete'\n  | 'get'\n  | 'head'\n  | 'options'\n  | 'patch'\n  | 'post'\n  | 'put'\n  | 'trace';\n\nexport type Client<\n  RequestFn = never,\n  Config = unknown,\n  MethodFn = never,\n  BuildUrlFn = never,\n  SseFn = never,\n> = {\n  /**\n   * Returns the final request URL.\n   */\n  buildUrl: BuildUrlFn;\n  getConfig: () => Config;\n  request: RequestFn;\n  setConfig: (config: Config) => Config;\n} & {\n  [K in HttpMethod]: MethodFn;\n} & ([SseFn] extends [never] ? { sse?: never } : { sse: { [K in HttpMethod]: SseFn } });\n\nexport interface Config {\n  /**\n   * Auth token or a function returning auth token. The resolved value will be\n   * added to the request payload as defined by its `security` array.\n   */\n  auth?: ((auth: Auth) => Promise<AuthToken> | AuthToken) | AuthToken;\n  /**\n   * A function for serializing request body parameter. By default,\n   * {@link JSON.stringify()} will be used.\n   */\n  bodySerializer?: BodySerializer | null;\n  /**\n   * An object containing any HTTP headers that you want to pre-populate your\n   * `Headers` object with.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/Headers/Headers#init See more}\n   */\n  headers?:\n    | RequestInit['headers']\n    | Record<\n        string,\n        string | number | boolean | (string | number | boolean)[] | null | undefined | unknown\n      >;\n  /**\n   * The request method.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/fetch#method See more}\n   */\n  method?: Uppercase<HttpMethod>;\n  /**\n   * A function for serializing request query parameters. By default, arrays\n   * will be exploded in form style, objects will be exploded in deepObject\n   * style, and reserved characters are percent-encoded.\n   *\n   * This method will have no effect if the native `paramsSerializer()` Axios\n   * API function is used.\n   *\n   * {@link https://swagger.io/docs/specification/serialization/#query View examples}\n   */\n  querySerializer?: QuerySerializer | QuerySerializerOptions;\n  /**\n   * A function validating request data. This is useful if you want to ensure\n   * the request conforms to the desired shape, so it can be safely sent to\n   * the server.\n   */\n  requestValidator?: (data: unknown) => Promise<unknown>;\n  /**\n   * A function transforming response data before it's returned. This is useful\n   * for post-processing data, e.g. converting ISO strings into Date objects.\n   */\n  responseTransformer?: (data: unknown) => Promise<unknown>;\n  /**\n   * A function validating response data. This is useful if you want to ensure\n   * the response conforms to the desired shape, so it can be safely passed to\n   * the transformers and returned to the user.\n   */\n  responseValidator?: (data: unknown) => Promise<unknown>;\n}\n\ntype IsExactlyNeverOrNeverUndefined<T> = [T] extends [never]\n  ? true\n  : [T] extends [never | undefined]\n    ? [undefined] extends [T]\n      ? false\n      : true\n    : false;\n\nexport type OmitNever<T extends Record<string, unknown>> = {\n  [K in keyof T as IsExactlyNeverOrNeverUndefined<T[K]> extends true ? never : K]: T[K];\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/security-open-id-connect/core/utils.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/security-open-id-connect/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport { getFoo, type Options } from './sdk.gen';\nexport type { ClientOptions, GetFooData, GetFooResponses } from './types.gen';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/security-open-id-connect/sdk.gen.ts",
    "content": "// 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 { GetFooData, GetFooResponses } from './types.gen';\n\nexport type Options<TData extends TDataShape = TDataShape, ThrowOnError extends boolean = boolean> = Options2<TData, ThrowOnError> & {\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\nexport const getFoo = <ThrowOnError extends boolean = false>(options?: Options<GetFooData, ThrowOnError>) => (options?.client ?? client).get<GetFooResponses, unknown, ThrowOnError>({\n    security: [{ scheme: 'bearer', type: 'http' }],\n    url: '/foo',\n    ...options\n});\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/security-open-id-connect/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type ClientOptions = {\n    baseUrl: `${string}://${string}` | (string & {});\n};\n\nexport type GetFooData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/foo';\n};\n\nexport type GetFooResponses = {\n    /**\n     * OK\n     */\n    200: unknown;\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/servers/client/client.gen.ts",
    "content": "// 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 (options: RequestOptions) => {\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 url = buildUrl(opts);\n\n    return { opts, url };\n  };\n\n  const request: Client['request'] = async (options) => {\n    // @ts-expect-error\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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/servers/client/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type { Auth } from '../core/auth.gen';\nexport type { QuerySerializerOptions } from '../core/bodySerializer.gen';\nexport {\n  formDataBodySerializer,\n  jsonBodySerializer,\n  urlSearchParamsBodySerializer,\n} from '../core/bodySerializer.gen';\nexport { buildClientParams } from '../core/params.gen';\nexport { serializeQueryKeyValue } from '../core/queryKeySerializer.gen';\nexport { createClient } from './client.gen';\nexport type {\n  Client,\n  ClientOptions,\n  Config,\n  CreateClientConfig,\n  Options,\n  RequestOptions,\n  RequestResult,\n  ResolvedRequestOptions,\n  ResponseStyle,\n  TDataShape,\n} from './types.gen';\nexport { createConfig, mergeHeaders } from './utils.gen';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/servers/client/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { Auth } from '../core/auth.gen';\nimport type {\n  ServerSentEventsOptions,\n  ServerSentEventsResult,\n} from '../core/serverSentEvents.gen';\nimport type { Client as CoreClient, Config as CoreConfig } from '../core/types.gen';\nimport type { Middleware } from './utils.gen';\n\nexport type ResponseStyle = 'data' | 'fields';\n\nexport interface Config<T extends ClientOptions = ClientOptions>\n  extends Omit<RequestInit, 'body' | 'headers' | 'method'>, CoreConfig {\n  /**\n   * Base URL for all requests made by this client.\n   */\n  baseUrl?: T['baseUrl'];\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   * Please don't use the Fetch client for Next.js applications. The `next`\n   * options won't have any effect.\n   *\n   * Install {@link https://www.npmjs.com/package/@hey-api/client-next `@hey-api/client-next`} instead.\n   */\n  next?: never;\n  /**\n   * Return the response data parsed in a specified format. By default, `auto`\n   * will infer the appropriate method from the `Content-Type` response header.\n   * You can override this behavior with any of the {@link Body} methods.\n   * Select `stream` if you don't want to parse response data at all.\n   *\n   * @default 'auto'\n   */\n  parseAs?: 'arrayBuffer' | 'auto' | 'blob' | 'formData' | 'json' | 'stream' | 'text';\n  /**\n   * Should we return only data or multiple fields (data, error, response, etc.)?\n   *\n   * @default 'fields'\n   */\n  responseStyle?: ResponseStyle;\n  /**\n   * Throw an error instead of returning it in the response?\n   *\n   * @default false\n   */\n  throwOnError?: T['throwOnError'];\n}\n\nexport interface RequestOptions<\n  TData = unknown,\n  TResponseStyle extends ResponseStyle = 'fields',\n  ThrowOnError extends boolean = boolean,\n  Url extends string = string,\n>\n  extends\n    Config<{\n      responseStyle: TResponseStyle;\n      throwOnError: ThrowOnError;\n    }>,\n    Pick<\n      ServerSentEventsOptions<TData>,\n      | 'onRequest'\n      | 'onSseError'\n      | 'onSseEvent'\n      | 'sseDefaultRetryDelay'\n      | 'sseMaxRetryAttempts'\n      | 'sseMaxRetryDelay'\n    > {\n  /**\n   * Any body that you want to add to your request.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/fetch#body}\n   */\n  body?: unknown;\n  path?: Record<string, unknown>;\n  query?: Record<string, unknown>;\n  /**\n   * Security mechanism(s) to use for the request.\n   */\n  security?: ReadonlyArray<Auth>;\n  url: Url;\n}\n\nexport interface ResolvedRequestOptions<\n  TResponseStyle extends ResponseStyle = 'fields',\n  ThrowOnError extends boolean = boolean,\n  Url extends string = string,\n> extends RequestOptions<unknown, TResponseStyle, ThrowOnError, Url> {\n  serializedBody?: string;\n}\n\nexport type RequestResult<\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = boolean,\n  TResponseStyle extends ResponseStyle = 'fields',\n> = ThrowOnError extends true\n  ? Promise<\n      TResponseStyle extends 'data'\n        ? TData extends Record<string, unknown>\n          ? TData[keyof TData]\n          : TData\n        : {\n            data: TData extends Record<string, unknown> ? TData[keyof TData] : TData;\n            request: Request;\n            response: Response;\n          }\n    >\n  : Promise<\n      TResponseStyle extends 'data'\n        ? (TData extends Record<string, unknown> ? TData[keyof TData] : TData) | undefined\n        : (\n            | {\n                data: TData extends Record<string, unknown> ? TData[keyof TData] : TData;\n                error: undefined;\n              }\n            | {\n                data: undefined;\n                error: TError extends Record<string, unknown> ? TError[keyof TError] : TError;\n              }\n          ) & {\n            request: Request;\n            response: Response;\n          }\n    >;\n\nexport interface ClientOptions {\n  baseUrl?: string;\n  responseStyle?: ResponseStyle;\n  throwOnError?: boolean;\n}\n\ntype MethodFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'>,\n) => RequestResult<TData, TError, ThrowOnError, TResponseStyle>;\n\ntype SseFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'>,\n) => Promise<ServerSentEventsResult<TData, TError>>;\n\ntype RequestFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'> &\n    Pick<Required<RequestOptions<TData, TResponseStyle, ThrowOnError>>, 'method'>,\n) => RequestResult<TData, TError, ThrowOnError, TResponseStyle>;\n\ntype BuildUrlFn = <\n  TData extends {\n    body?: unknown;\n    path?: Record<string, unknown>;\n    query?: Record<string, unknown>;\n    url: string;\n  },\n>(\n  options: TData & Options<TData>,\n) => string;\n\nexport type Client = CoreClient<RequestFn, Config, MethodFn, BuildUrlFn, SseFn> & {\n  interceptors: Middleware<Request, Response, unknown, ResolvedRequestOptions>;\n};\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 = ClientOptions> = (\n  override?: Config<ClientOptions & T>,\n) => Config<Required<ClientOptions> & T>;\n\nexport interface TDataShape {\n  body?: unknown;\n  headers?: unknown;\n  path?: unknown;\n  query?: unknown;\n  url: string;\n}\n\ntype OmitKeys<T, K> = Pick<T, Exclude<keyof T, K>>;\n\nexport type Options<\n  TData extends TDataShape = TDataShape,\n  ThrowOnError extends boolean = boolean,\n  TResponse = unknown,\n  TResponseStyle extends ResponseStyle = 'fields',\n> = OmitKeys<\n  RequestOptions<TResponse, TResponseStyle, ThrowOnError>,\n  'body' | 'path' | 'query' | 'url'\n> &\n  ([TData] extends [never] ? unknown : Omit<TData, 'url'>);\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/servers/client/utils.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/servers/client.gen.ts",
    "content": "// 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://foo.com/v1' }));\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/servers/core/auth.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/servers/core/bodySerializer.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/servers/core/params.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/servers/core/pathSerializer.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/servers/core/queryKeySerializer.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\n/**\n * JSON-friendly union that mirrors what Pinia Colada can hash.\n */\nexport type JsonValue =\n  | null\n  | string\n  | number\n  | boolean\n  | JsonValue[]\n  | { [key: string]: JsonValue };\n\n/**\n * Replacer that converts non-JSON values (bigint, Date, etc.) to safe substitutes.\n */\nexport const queryKeyJsonReplacer = (_key: string, value: unknown) => {\n  if (value === undefined || typeof value === 'function' || typeof value === 'symbol') {\n    return undefined;\n  }\n  if (typeof value === 'bigint') {\n    return value.toString();\n  }\n  if (value instanceof Date) {\n    return value.toISOString();\n  }\n  return value;\n};\n\n/**\n * Safely stringifies a value and parses it back into a JsonValue.\n */\nexport const stringifyToJsonValue = (input: unknown): JsonValue | undefined => {\n  try {\n    const json = JSON.stringify(input, queryKeyJsonReplacer);\n    if (json === undefined) {\n      return undefined;\n    }\n    return JSON.parse(json) as JsonValue;\n  } catch {\n    return undefined;\n  }\n};\n\n/**\n * Detects plain objects (including objects with a null prototype).\n */\nconst isPlainObject = (value: unknown): value is Record<string, unknown> => {\n  if (value === null || typeof value !== 'object') {\n    return false;\n  }\n  const prototype = Object.getPrototypeOf(value as object);\n  return prototype === Object.prototype || prototype === null;\n};\n\n/**\n * Turns URLSearchParams into a sorted JSON object for deterministic keys.\n */\nconst serializeSearchParams = (params: URLSearchParams): JsonValue => {\n  const entries = Array.from(params.entries()).sort(([a], [b]) => a.localeCompare(b));\n  const result: Record<string, JsonValue> = {};\n\n  for (const [key, value] of entries) {\n    const existing = result[key];\n    if (existing === undefined) {\n      result[key] = value;\n      continue;\n    }\n\n    if (Array.isArray(existing)) {\n      (existing as string[]).push(value);\n    } else {\n      result[key] = [existing, value];\n    }\n  }\n\n  return result;\n};\n\n/**\n * Normalizes any accepted value into a JSON-friendly shape for query keys.\n */\nexport const serializeQueryKeyValue = (value: unknown): JsonValue | undefined => {\n  if (value === null) {\n    return null;\n  }\n\n  if (typeof value === 'string' || typeof value === 'number' || typeof value === 'boolean') {\n    return value;\n  }\n\n  if (value === undefined || typeof value === 'function' || typeof value === 'symbol') {\n    return undefined;\n  }\n\n  if (typeof value === 'bigint') {\n    return value.toString();\n  }\n\n  if (value instanceof Date) {\n    return value.toISOString();\n  }\n\n  if (Array.isArray(value)) {\n    return stringifyToJsonValue(value);\n  }\n\n  if (typeof URLSearchParams !== 'undefined' && value instanceof URLSearchParams) {\n    return serializeSearchParams(value);\n  }\n\n  if (isPlainObject(value)) {\n    return stringifyToJsonValue(value);\n  }\n\n  return undefined;\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/servers/core/serverSentEvents.gen.ts",
    "content": "// 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 const 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            // Normalize line endings: CRLF -> LF, then CR -> LF\n            buffer = buffer.replace(/\\r\\n/g, '\\n').replace(/\\r/g, '\\n');\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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/servers/core/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { Auth, AuthToken } from './auth.gen';\nimport type { BodySerializer, QuerySerializer, QuerySerializerOptions } from './bodySerializer.gen';\n\nexport type HttpMethod =\n  | 'connect'\n  | 'delete'\n  | 'get'\n  | 'head'\n  | 'options'\n  | 'patch'\n  | 'post'\n  | 'put'\n  | 'trace';\n\nexport type Client<\n  RequestFn = never,\n  Config = unknown,\n  MethodFn = never,\n  BuildUrlFn = never,\n  SseFn = never,\n> = {\n  /**\n   * Returns the final request URL.\n   */\n  buildUrl: BuildUrlFn;\n  getConfig: () => Config;\n  request: RequestFn;\n  setConfig: (config: Config) => Config;\n} & {\n  [K in HttpMethod]: MethodFn;\n} & ([SseFn] extends [never] ? { sse?: never } : { sse: { [K in HttpMethod]: SseFn } });\n\nexport interface Config {\n  /**\n   * Auth token or a function returning auth token. The resolved value will be\n   * added to the request payload as defined by its `security` array.\n   */\n  auth?: ((auth: Auth) => Promise<AuthToken> | AuthToken) | AuthToken;\n  /**\n   * A function for serializing request body parameter. By default,\n   * {@link JSON.stringify()} will be used.\n   */\n  bodySerializer?: BodySerializer | null;\n  /**\n   * An object containing any HTTP headers that you want to pre-populate your\n   * `Headers` object with.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/Headers/Headers#init See more}\n   */\n  headers?:\n    | RequestInit['headers']\n    | Record<\n        string,\n        string | number | boolean | (string | number | boolean)[] | null | undefined | unknown\n      >;\n  /**\n   * The request method.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/fetch#method See more}\n   */\n  method?: Uppercase<HttpMethod>;\n  /**\n   * A function for serializing request query parameters. By default, arrays\n   * will be exploded in form style, objects will be exploded in deepObject\n   * style, and reserved characters are percent-encoded.\n   *\n   * This method will have no effect if the native `paramsSerializer()` Axios\n   * API function is used.\n   *\n   * {@link https://swagger.io/docs/specification/serialization/#query View examples}\n   */\n  querySerializer?: QuerySerializer | QuerySerializerOptions;\n  /**\n   * A function validating request data. This is useful if you want to ensure\n   * the request conforms to the desired shape, so it can be safely sent to\n   * the server.\n   */\n  requestValidator?: (data: unknown) => Promise<unknown>;\n  /**\n   * A function transforming response data before it's returned. This is useful\n   * for post-processing data, e.g. converting ISO strings into Date objects.\n   */\n  responseTransformer?: (data: unknown) => Promise<unknown>;\n  /**\n   * A function validating response data. This is useful if you want to ensure\n   * the response conforms to the desired shape, so it can be safely passed to\n   * the transformers and returned to the user.\n   */\n  responseValidator?: (data: unknown) => Promise<unknown>;\n}\n\ntype IsExactlyNeverOrNeverUndefined<T> = [T] extends [never]\n  ? true\n  : [T] extends [never | undefined]\n    ? [undefined] extends [T]\n      ? false\n      : true\n    : false;\n\nexport type OmitNever<T extends Record<string, unknown>> = {\n  [K in keyof T as IsExactlyNeverOrNeverUndefined<T[K]> extends true ? never : K]: T[K];\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/servers/core/utils.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/servers/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type { ClientOptions, GetFooData, GetFooResponse, GetFooResponses } from './types.gen';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/servers/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type ClientOptions = {\n    baseUrl: 'https://foo.com/v1' | `${string}://${string}/v1` | (string & {});\n};\n\nexport type GetFooData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/foo';\n};\n\nexport type GetFooResponses = {\n    /**\n     * OK\n     */\n    200: string;\n};\n\nexport type GetFooResponse = GetFooResponses[keyof GetFooResponses];\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/sse-angular/client/client.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { HttpResponse } from '@angular/common/http';\nimport { HttpClient, HttpErrorResponse, HttpEventType, HttpRequest } from '@angular/common/http';\nimport {\n  assertInInjectionContext,\n  inject,\n  provideAppInitializer,\n  runInInjectionContext,\n} from '@angular/core';\nimport { firstValueFrom } from 'rxjs';\nimport { filter } from 'rxjs/operators';\n\nimport { createSseClient } from '../core/serverSentEvents.gen';\nimport type { HttpMethod } from '../core/types.gen';\nimport { getValidRequestBody } from '../core/utils.gen';\nimport type {\n  Client,\n  Config,\n  RequestOptions,\n  ResolvedRequestOptions,\n  ResponseStyle,\n} from './types.gen';\nimport {\n  buildUrl,\n  createConfig,\n  createInterceptors,\n  mergeConfigs,\n  mergeHeaders,\n  setAuthParams,\n} from './utils.gen';\n\nexport function provideHeyApiClient(client: Client) {\n  return provideAppInitializer(() => {\n    const httpClient = inject(HttpClient);\n    client.setConfig({ httpClient });\n  });\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<\n    HttpRequest<unknown>,\n    HttpResponse<unknown>,\n    unknown,\n    ResolvedRequestOptions\n  >();\n\n  const requestOptions = <\n    TData = unknown,\n    ThrowOnError extends boolean = false,\n    TResponseStyle extends ResponseStyle = 'fields',\n  >(\n    options: RequestOptions<TData, TResponseStyle, ThrowOnError>,\n  ) => {\n    const opts = {\n      ..._config,\n      ...options,\n      headers: mergeHeaders(_config.headers, options.headers),\n      httpClient: options.httpClient ?? _config.httpClient,\n      serializedBody: undefined as string | undefined,\n    };\n\n    if (!opts.httpClient) {\n      if (opts.injector) {\n        opts.httpClient = runInInjectionContext(opts.injector, () => inject(HttpClient));\n      } else {\n        assertInInjectionContext(requestOptions);\n        opts.httpClient = inject(HttpClient);\n      }\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 url = buildUrl(opts as any);\n\n    const req = new HttpRequest<unknown>(opts.method ?? 'GET', url, getValidRequestBody(opts), {\n      redirect: 'follow',\n      ...opts,\n    });\n\n    return { opts, req, url };\n  };\n\n  const beforeRequest = async (options: RequestOptions) => {\n    const { opts, req, url } = requestOptions(options);\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    return { opts, req, url };\n  };\n\n  const request: Client['request'] = async (options) => {\n    // @ts-expect-error\n    const { opts, req: initialReq } = await beforeRequest(options);\n\n    let req = initialReq;\n\n    for (const fn of interceptors.request.fns) {\n      if (fn) {\n        req = await fn(req, opts as any);\n      }\n    }\n\n    const result: {\n      request: HttpRequest<unknown>;\n      response: any;\n    } = {\n      request: req,\n      response: null,\n    };\n\n    try {\n      result.response = (await firstValueFrom(\n        opts\n          .httpClient!.request(req)\n          .pipe(filter((event) => event.type === HttpEventType.Response)),\n      )) as HttpResponse<unknown>;\n\n      for (const fn of interceptors.response.fns) {\n        if (fn) {\n          result.response = await fn(result.response, req, opts as any);\n        }\n      }\n\n      let bodyResponse = result.response.body;\n\n      if (opts.responseValidator) {\n        await opts.responseValidator(bodyResponse);\n      }\n\n      if (opts.responseTransformer) {\n        bodyResponse = await opts.responseTransformer(bodyResponse);\n      }\n\n      return opts.responseStyle === 'data' ? bodyResponse : { data: bodyResponse, ...result };\n    } catch (error) {\n      if (error instanceof HttpErrorResponse) {\n        result.response = error;\n      }\n\n      let finalError = error instanceof HttpErrorResponse ? error.error : error;\n\n      for (const fn of interceptors.error.fns) {\n        if (fn) {\n          finalError = (await fn(finalError, result.response as any, req, opts as any)) as string;\n        }\n      }\n\n      if (opts.throwOnError) {\n        throw finalError;\n      }\n\n      return opts.responseStyle === 'data'\n        ? undefined\n        : {\n            error: finalError,\n            ...result,\n          };\n    }\n  };\n\n  const makeMethodFn = (method: Uppercase<HttpMethod>) => (options: RequestOptions) =>\n    request({ ...options, method });\n\n  const makeSseFn = (method: Uppercase<HttpMethod>) => async (options: RequestOptions) => {\n    const { opts, url } = await beforeRequest(options);\n    return createSseClient({\n      ...opts,\n      body: opts.body as BodyInit | null | undefined,\n      headers: opts.headers as unknown as Record<string, string>,\n      method,\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    requestOptions: (options) => {\n      if (options.security) {\n        throw new Error('Security is not supported in requestOptions');\n      }\n\n      if (options.requestValidator) {\n        throw new Error('Request validation is not supported in requestOptions');\n      }\n\n      return requestOptions(options).req;\n    },\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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/sse-angular/client/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type { Auth } from '../core/auth.gen';\nexport type { QuerySerializerOptions } from '../core/bodySerializer.gen';\nexport {\n  formDataBodySerializer,\n  jsonBodySerializer,\n  urlSearchParamsBodySerializer,\n} from '../core/bodySerializer.gen';\nexport { buildClientParams } from '../core/params.gen';\nexport { serializeQueryKeyValue } from '../core/queryKeySerializer.gen';\nexport { createClient } from './client.gen';\nexport type {\n  Client,\n  ClientOptions,\n  Config,\n  CreateClientConfig,\n  Options,\n  RequestOptions,\n  RequestResult,\n  ResolvedRequestOptions,\n  ResponseStyle,\n  TDataShape,\n} from './types.gen';\nexport { createConfig, mergeHeaders } from './utils.gen';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/sse-angular/client/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type {\n  HttpClient,\n  HttpErrorResponse,\n  HttpHeaders,\n  HttpRequest,\n  HttpResponse,\n} from '@angular/common/http';\nimport type { Injector } from '@angular/core';\n\nimport type { Auth } from '../core/auth.gen';\nimport type {\n  ServerSentEventsOptions,\n  ServerSentEventsResult,\n} from '../core/serverSentEvents.gen';\nimport type { Client as CoreClient, Config as CoreConfig } from '../core/types.gen';\nimport type { Middleware } from './utils.gen';\n\nexport type ResponseStyle = 'data' | 'fields';\n\nexport interface Config<T extends ClientOptions = ClientOptions>\n  extends Omit<RequestInit, 'body' | 'headers' | 'method'>, Omit<CoreConfig, 'headers'> {\n  /**\n   * Base URL for all requests made by this client.\n   */\n  baseUrl?: T['baseUrl'];\n  /**\n   * An object containing any HTTP headers that you want to pre-populate your\n   * `HttpHeaders` object with.\n   *\n   * {@link https://angular.dev/api/common/http/HttpHeaders#constructor See more}\n   */\n  headers?:\n    | HttpHeaders\n    | Record<\n        string,\n        string | number | boolean | (string | number | boolean)[] | null | undefined | unknown\n      >;\n  /**\n   * The HTTP client to use for making requests.\n   */\n  httpClient?: HttpClient;\n  /**\n   * Should we return only data or multiple fields (data, error, response, etc.)?\n   *\n   * @default 'fields'\n   */\n  responseStyle?: ResponseStyle;\n\n  /**\n   * Throw an error instead of returning it in the response?\n   *\n   * @default false\n   */\n  throwOnError?: T['throwOnError'];\n}\n\nexport interface RequestOptions<\n  TData = unknown,\n  TResponseStyle extends ResponseStyle = 'fields',\n  ThrowOnError extends boolean = boolean,\n  Url extends string = string,\n>\n  extends\n    Config<{\n      responseStyle: TResponseStyle;\n      throwOnError: ThrowOnError;\n    }>,\n    Pick<\n      ServerSentEventsOptions<TData>,\n      | 'onRequest'\n      | 'onSseError'\n      | 'onSseEvent'\n      | 'sseDefaultRetryDelay'\n      | 'sseMaxRetryAttempts'\n      | 'sseMaxRetryDelay'\n    > {\n  /**\n   * Any body that you want to add to your request.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/fetch#body}\n   */\n  body?: unknown;\n  /**\n   * Optional custom injector for dependency resolution if you don't implicitly or explicitly provide one.\n   */\n  injector?: Injector;\n  path?: Record<string, unknown>;\n  query?: Record<string, unknown>;\n  /**\n   * Security mechanism(s) to use for the request.\n   */\n  security?: ReadonlyArray<Auth>;\n  url: Url;\n}\n\nexport interface ResolvedRequestOptions<\n  TResponseStyle extends ResponseStyle = 'fields',\n  ThrowOnError extends boolean = boolean,\n  Url extends string = string,\n> extends RequestOptions<unknown, TResponseStyle, ThrowOnError, Url> {\n  serializedBody?: string;\n}\n\nexport type RequestResult<\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = boolean,\n  TResponseStyle extends ResponseStyle = 'fields',\n> = Promise<\n  ThrowOnError extends true\n    ? TResponseStyle extends 'data'\n      ? TData extends Record<string, unknown>\n        ? TData[keyof TData]\n        : TData\n      : {\n          data: TData extends Record<string, unknown> ? TData[keyof TData] : TData;\n          request: HttpRequest<unknown>;\n          response: HttpResponse<TData>;\n        }\n    : TResponseStyle extends 'data'\n      ? (TData extends Record<string, unknown> ? TData[keyof TData] : TData) | undefined\n      :\n          | {\n              data: TData extends Record<string, unknown> ? TData[keyof TData] : TData;\n              error: undefined;\n              request: HttpRequest<unknown>;\n              response: HttpResponse<TData>;\n            }\n          | {\n              data: undefined;\n              error: TError[keyof TError];\n              request: HttpRequest<unknown>;\n              response: HttpErrorResponse & {\n                error: TError[keyof TError] | null;\n              };\n            }\n>;\n\nexport interface ClientOptions {\n  baseUrl?: string;\n  responseStyle?: ResponseStyle;\n  throwOnError?: boolean;\n}\n\ntype MethodFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'>,\n) => RequestResult<TData, TError, ThrowOnError, TResponseStyle>;\n\ntype SseFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'>,\n) => Promise<ServerSentEventsResult<TData, TError>>;\n\ntype RequestFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'> &\n    Pick<Required<RequestOptions<TData, TResponseStyle, ThrowOnError>>, 'method'>,\n) => RequestResult<TData, TError, ThrowOnError, TResponseStyle>;\n\ntype RequestOptionsFn = <\n  T,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: RequestOptions<T, TResponseStyle, ThrowOnError>,\n) => HttpRequest<T>;\n\ntype BuildUrlFn = <\n  TData extends {\n    body?: unknown;\n    path?: Record<string, unknown>;\n    query?: Record<string, unknown>;\n    url: string;\n  },\n>(\n  options: TData & Options<TData>,\n) => string;\n\nexport type Client = CoreClient<RequestFn, Config, MethodFn, BuildUrlFn, SseFn> & {\n  interceptors: Middleware<\n    HttpRequest<unknown>,\n    HttpResponse<unknown>,\n    unknown,\n    ResolvedRequestOptions\n  >;\n  requestOptions: RequestOptionsFn;\n};\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 = ClientOptions> = (\n  override?: Config<ClientOptions & T>,\n) => Config<Required<ClientOptions> & T>;\n\nexport interface TDataShape {\n  body?: unknown;\n  headers?: unknown;\n  path?: unknown;\n  query?: unknown;\n  url: string;\n}\n\ntype OmitKeys<T, K> = Pick<T, Exclude<keyof T, K>>;\n\nexport type Options<\n  TData extends TDataShape = TDataShape,\n  ThrowOnError extends boolean = boolean,\n  TResponse = unknown,\n  TResponseStyle extends ResponseStyle = 'fields',\n> = OmitKeys<\n  RequestOptions<TResponse, TResponseStyle, ThrowOnError>,\n  'body' | 'path' | 'query' | 'url'\n> &\n  ([TData] extends [never] ? unknown : Omit<TData, 'url'>);\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/sse-angular/client/utils.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport { HttpHeaders } from '@angular/common/http';\n\nimport { getAuthToken } from '../core/auth.gen';\nimport type {\n  QuerySerializer,\n  QuerySerializerOptions,\n} from '../core/bodySerializer.gen';\nimport {\n  serializeArrayParam,\n  serializeObjectParam,\n  serializePrimitiveParam,\n} from '../core/pathSerializer.gen';\nimport type { Client, ClientOptions, Config, RequestOptions } from './types.gen';\n\ninterface PathSerializer {\n  path: Record<string, unknown>;\n  url: string;\n}\n\nconst PATH_PARAM_RE = /\\{[^{}]+\\}/g;\n\ntype ArrayStyle = 'form' | 'spaceDelimited' | 'pipeDelimited';\ntype MatrixStyle = 'label' | 'matrix' | 'simple';\ntype ArraySeparatorStyle = ArrayStyle | MatrixStyle;\n\nconst 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 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 = (\n  contentType: string | null,\n): 'blob' | 'formData' | 'json' | 'stream' | 'text' | undefined => {\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\nexport const setAuthParams = async (\n  options: Pick<Required<RequestOptions>, 'security'> &\n    Pick<RequestOptions, 'auth' | 'query'> & {\n      headers: HttpHeaders;\n    },\n) => {\n  for (const auth of options.security) {\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 = options.headers.append('Cookie', `${name}=${token}`);\n        break;\n      case 'header':\n      default:\n        options.headers = options.headers.set(name, token);\n        break;\n    }\n\n    return;\n  }\n};\n\nexport const buildUrl: Client['buildUrl'] = (options) => {\n  const url = 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  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 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\nexport const mergeHeaders = (\n  ...headers: Array<Required<Config>['headers'] | undefined>\n): HttpHeaders => {\n  let mergedHeaders = new HttpHeaders();\n\n  for (const header of headers) {\n    if (!header || typeof header !== 'object') {\n      continue;\n    }\n\n    if (header instanceof HttpHeaders) {\n      // Merge HttpHeaders instance\n      header.keys().forEach((key) => {\n        const values = header.getAll(key);\n        if (values) {\n          values.forEach((value) => {\n            mergedHeaders = mergedHeaders.append(key, value);\n          });\n        }\n      });\n    } else {\n      // Merge plain object headers\n      for (const [key, value] of Object.entries(header)) {\n        if (value === null) {\n          mergedHeaders = mergedHeaders.delete(key);\n        } else if (Array.isArray(value)) {\n          for (const v of value) {\n            mergedHeaders = 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 = mergedHeaders.set(\n            key,\n            typeof value === 'object' ? JSON.stringify(value) : (value as string),\n          );\n        }\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  headers: defaultHeaders,\n  querySerializer: defaultQuerySerializer,\n  ...override,\n});\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/sse-angular/client.gen.ts",
    "content": "// 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>());\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/sse-angular/core/auth.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/sse-angular/core/bodySerializer.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/sse-angular/core/params.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/sse-angular/core/pathSerializer.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/sse-angular/core/queryKeySerializer.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\n/**\n * JSON-friendly union that mirrors what Pinia Colada can hash.\n */\nexport type JsonValue =\n  | null\n  | string\n  | number\n  | boolean\n  | JsonValue[]\n  | { [key: string]: JsonValue };\n\n/**\n * Replacer that converts non-JSON values (bigint, Date, etc.) to safe substitutes.\n */\nexport const queryKeyJsonReplacer = (_key: string, value: unknown) => {\n  if (value === undefined || typeof value === 'function' || typeof value === 'symbol') {\n    return undefined;\n  }\n  if (typeof value === 'bigint') {\n    return value.toString();\n  }\n  if (value instanceof Date) {\n    return value.toISOString();\n  }\n  return value;\n};\n\n/**\n * Safely stringifies a value and parses it back into a JsonValue.\n */\nexport const stringifyToJsonValue = (input: unknown): JsonValue | undefined => {\n  try {\n    const json = JSON.stringify(input, queryKeyJsonReplacer);\n    if (json === undefined) {\n      return undefined;\n    }\n    return JSON.parse(json) as JsonValue;\n  } catch {\n    return undefined;\n  }\n};\n\n/**\n * Detects plain objects (including objects with a null prototype).\n */\nconst isPlainObject = (value: unknown): value is Record<string, unknown> => {\n  if (value === null || typeof value !== 'object') {\n    return false;\n  }\n  const prototype = Object.getPrototypeOf(value as object);\n  return prototype === Object.prototype || prototype === null;\n};\n\n/**\n * Turns URLSearchParams into a sorted JSON object for deterministic keys.\n */\nconst serializeSearchParams = (params: URLSearchParams): JsonValue => {\n  const entries = Array.from(params.entries()).sort(([a], [b]) => a.localeCompare(b));\n  const result: Record<string, JsonValue> = {};\n\n  for (const [key, value] of entries) {\n    const existing = result[key];\n    if (existing === undefined) {\n      result[key] = value;\n      continue;\n    }\n\n    if (Array.isArray(existing)) {\n      (existing as string[]).push(value);\n    } else {\n      result[key] = [existing, value];\n    }\n  }\n\n  return result;\n};\n\n/**\n * Normalizes any accepted value into a JSON-friendly shape for query keys.\n */\nexport const serializeQueryKeyValue = (value: unknown): JsonValue | undefined => {\n  if (value === null) {\n    return null;\n  }\n\n  if (typeof value === 'string' || typeof value === 'number' || typeof value === 'boolean') {\n    return value;\n  }\n\n  if (value === undefined || typeof value === 'function' || typeof value === 'symbol') {\n    return undefined;\n  }\n\n  if (typeof value === 'bigint') {\n    return value.toString();\n  }\n\n  if (value instanceof Date) {\n    return value.toISOString();\n  }\n\n  if (Array.isArray(value)) {\n    return stringifyToJsonValue(value);\n  }\n\n  if (typeof URLSearchParams !== 'undefined' && value instanceof URLSearchParams) {\n    return serializeSearchParams(value);\n  }\n\n  if (isPlainObject(value)) {\n    return stringifyToJsonValue(value);\n  }\n\n  return undefined;\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/sse-angular/core/serverSentEvents.gen.ts",
    "content": "// 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 const 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            // Normalize line endings: CRLF -> LF, then CR -> LF\n            buffer = buffer.replace(/\\r\\n/g, '\\n').replace(/\\r/g, '\\n');\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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/sse-angular/core/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { Auth, AuthToken } from './auth.gen';\nimport type { BodySerializer, QuerySerializer, QuerySerializerOptions } from './bodySerializer.gen';\n\nexport type HttpMethod =\n  | 'connect'\n  | 'delete'\n  | 'get'\n  | 'head'\n  | 'options'\n  | 'patch'\n  | 'post'\n  | 'put'\n  | 'trace';\n\nexport type Client<\n  RequestFn = never,\n  Config = unknown,\n  MethodFn = never,\n  BuildUrlFn = never,\n  SseFn = never,\n> = {\n  /**\n   * Returns the final request URL.\n   */\n  buildUrl: BuildUrlFn;\n  getConfig: () => Config;\n  request: RequestFn;\n  setConfig: (config: Config) => Config;\n} & {\n  [K in HttpMethod]: MethodFn;\n} & ([SseFn] extends [never] ? { sse?: never } : { sse: { [K in HttpMethod]: SseFn } });\n\nexport interface Config {\n  /**\n   * Auth token or a function returning auth token. The resolved value will be\n   * added to the request payload as defined by its `security` array.\n   */\n  auth?: ((auth: Auth) => Promise<AuthToken> | AuthToken) | AuthToken;\n  /**\n   * A function for serializing request body parameter. By default,\n   * {@link JSON.stringify()} will be used.\n   */\n  bodySerializer?: BodySerializer | null;\n  /**\n   * An object containing any HTTP headers that you want to pre-populate your\n   * `Headers` object with.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/Headers/Headers#init See more}\n   */\n  headers?:\n    | RequestInit['headers']\n    | Record<\n        string,\n        string | number | boolean | (string | number | boolean)[] | null | undefined | unknown\n      >;\n  /**\n   * The request method.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/fetch#method See more}\n   */\n  method?: Uppercase<HttpMethod>;\n  /**\n   * A function for serializing request query parameters. By default, arrays\n   * will be exploded in form style, objects will be exploded in deepObject\n   * style, and reserved characters are percent-encoded.\n   *\n   * This method will have no effect if the native `paramsSerializer()` Axios\n   * API function is used.\n   *\n   * {@link https://swagger.io/docs/specification/serialization/#query View examples}\n   */\n  querySerializer?: QuerySerializer | QuerySerializerOptions;\n  /**\n   * A function validating request data. This is useful if you want to ensure\n   * the request conforms to the desired shape, so it can be safely sent to\n   * the server.\n   */\n  requestValidator?: (data: unknown) => Promise<unknown>;\n  /**\n   * A function transforming response data before it's returned. This is useful\n   * for post-processing data, e.g. converting ISO strings into Date objects.\n   */\n  responseTransformer?: (data: unknown) => Promise<unknown>;\n  /**\n   * A function validating response data. This is useful if you want to ensure\n   * the response conforms to the desired shape, so it can be safely passed to\n   * the transformers and returned to the user.\n   */\n  responseValidator?: (data: unknown) => Promise<unknown>;\n}\n\ntype IsExactlyNeverOrNeverUndefined<T> = [T] extends [never]\n  ? true\n  : [T] extends [never | undefined]\n    ? [undefined] extends [T]\n      ? false\n      : true\n    : false;\n\nexport type OmitNever<T extends Record<string, unknown>> = {\n  [K in keyof T as IsExactlyNeverOrNeverUndefined<T[K]> extends true ? never : K]: T[K];\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/sse-angular/core/utils.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/sse-angular/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport { eventSubscribe, type Options } from './sdk.gen';\nexport type { AgentPart, ApiError, AssistantMessage, ClientOptions, CompactionPart, Event, EventCommandExecuted, EventFileEdited, EventFileWatcherUpdated, EventGlobalDisposed, EventInstallationUpdateAvailable, EventInstallationUpdated, EventLspClientDiagnostics, EventLspUpdated, EventMcpToolsChanged, EventMessagePartRemoved, EventMessagePartUpdated, EventMessageRemoved, EventMessageUpdated, EventPermissionAsked, EventPermissionReplied, EventProjectUpdated, EventPtyCreated, EventPtyDeleted, EventPtyExited, EventPtyUpdated, EventServerConnected, EventServerInstanceDisposed, EventSessionCompacted, EventSessionCreated, EventSessionDeleted, EventSessionDiff, EventSessionError, EventSessionIdle, EventSessionStatus, EventSessionUpdated, EventSubscribeData, EventSubscribeResponse, EventSubscribeResponses, EventTodoUpdated, EventTuiCommandExecute, EventTuiPromptAppend, EventTuiToastShow, EventVcsBranchUpdated, FileDiff, FilePart, FilePartSource, FilePartSourceText, FileSource, Message, MessageAbortedError, MessageOutputLengthError, Part, PatchPart, PermissionAction, PermissionRequest, PermissionRule, PermissionRuleset, Project, ProviderAuthError, Pty, Range, ReasoningPart, RetryPart, Session, SessionStatus, SnapshotPart, StepFinishPart, StepStartPart, SymbolSource, TextPart, Todo, ToolPart, ToolState, ToolStateCompleted, ToolStateError, ToolStatePending, ToolStateRunning, UnknownError, UserMessage } from './types.gen';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/sse-angular/sdk.gen.ts",
    "content": "// 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 { EventSubscribeData, EventSubscribeResponses } from './types.gen';\n\nexport type Options<TData extends TDataShape = TDataShape, ThrowOnError extends boolean = boolean> = Options2<TData, ThrowOnError> & {\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 * Subscribe to events\n *\n * Get events\n */\nexport const eventSubscribe = <ThrowOnError extends boolean = false>(options?: Options<EventSubscribeData, ThrowOnError>) => (options?.client ?? client).sse.get<EventSubscribeResponses, unknown, ThrowOnError>({ url: '/event', ...options });\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/sse-angular/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type ClientOptions = {\n    baseUrl: `${string}://${string}` | (string & {});\n};\n\nexport type PermissionAction = 'allow' | 'deny' | 'ask';\n\nexport type PermissionRule = {\n    permission: string;\n    pattern: string;\n    action: PermissionAction;\n};\n\nexport type PermissionRuleset = Array<PermissionRule>;\n\nexport type Range = {\n    start: {\n        line: number;\n        character: number;\n    };\n    end: {\n        line: number;\n        character: number;\n    };\n};\n\nexport type SymbolSource = {\n    text: FilePartSourceText;\n    type: 'symbol';\n    path: string;\n    range: Range;\n    name: string;\n    kind: number;\n};\n\nexport type FilePartSourceText = {\n    value: string;\n    start: number;\n    end: number;\n};\n\nexport type FileSource = {\n    text: FilePartSourceText;\n    type: 'file';\n    path: string;\n};\n\nexport type FilePartSource = FileSource | SymbolSource;\n\nexport type EventGlobalDisposed = {\n    type: 'global.disposed';\n    properties: {\n        [key: string]: unknown;\n    };\n};\n\nexport type EventServerConnected = {\n    type: 'server.connected';\n    properties: {\n        [key: string]: unknown;\n    };\n};\n\nexport type EventPtyDeleted = {\n    type: 'pty.deleted';\n    properties: {\n        id: string;\n    };\n};\n\nexport type EventPtyExited = {\n    type: 'pty.exited';\n    properties: {\n        id: string;\n        exitCode: number;\n    };\n};\n\nexport type EventPtyUpdated = {\n    type: 'pty.updated';\n    properties: {\n        info: Pty;\n    };\n};\n\nexport type Pty = {\n    id: string;\n    title: string;\n    command: string;\n    args: Array<string>;\n    cwd: string;\n    status: 'running' | 'exited';\n    pid: number;\n};\n\nexport type EventPtyCreated = {\n    type: 'pty.created';\n    properties: {\n        info: Pty;\n    };\n};\n\nexport type EventVcsBranchUpdated = {\n    type: 'vcs.branch.updated';\n    properties: {\n        branch?: string;\n    };\n};\n\nexport type EventFileWatcherUpdated = {\n    type: 'file.watcher.updated';\n    properties: {\n        file: string;\n        event: 'add' | 'change' | 'unlink';\n    };\n};\n\nexport type EventSessionError = {\n    type: 'session.error';\n    properties: {\n        sessionID?: string;\n        error?: ProviderAuthError | UnknownError | MessageOutputLengthError | MessageAbortedError | ApiError;\n    };\n};\n\nexport type ApiError = {\n    name: 'APIError';\n    data: {\n        message: string;\n        statusCode?: number;\n        isRetryable: boolean;\n        responseHeaders?: {\n            [key: string]: string;\n        };\n        responseBody?: string;\n        metadata?: {\n            [key: string]: string;\n        };\n    };\n};\n\nexport type MessageAbortedError = {\n    name: 'MessageAbortedError';\n    data: {\n        message: string;\n    };\n};\n\nexport type MessageOutputLengthError = {\n    name: 'MessageOutputLengthError';\n    data: {\n        [key: string]: unknown;\n    };\n};\n\nexport type UnknownError = {\n    name: 'UnknownError';\n    data: {\n        message: string;\n    };\n};\n\nexport type ProviderAuthError = {\n    name: 'ProviderAuthError';\n    data: {\n        providerID: string;\n        message: string;\n    };\n};\n\nexport type EventSessionDiff = {\n    type: 'session.diff';\n    properties: {\n        sessionID: string;\n        diff: Array<FileDiff>;\n    };\n};\n\nexport type FileDiff = {\n    file: string;\n    before: string;\n    after: string;\n    additions: number;\n    deletions: number;\n};\n\nexport type EventSessionDeleted = {\n    type: 'session.deleted';\n    properties: {\n        info: Session;\n    };\n};\n\nexport type Session = {\n    id: string;\n    projectID: string;\n    directory: string;\n    parentID?: string;\n    summary?: {\n        additions: number;\n        deletions: number;\n        files: number;\n        diffs?: Array<FileDiff>;\n    };\n    share?: {\n        url: string;\n    };\n    title: string;\n    version: string;\n    time: {\n        created: number;\n        updated: number;\n        compacting?: number;\n        archived?: number;\n    };\n    permission?: PermissionRuleset;\n    revert?: {\n        messageID: string;\n        partID?: string;\n        snapshot?: string;\n        diff?: string;\n    };\n};\n\nexport type EventSessionUpdated = {\n    type: 'session.updated';\n    properties: {\n        info: Session;\n    };\n};\n\nexport type EventSessionCreated = {\n    type: 'session.created';\n    properties: {\n        info: Session;\n    };\n};\n\nexport type EventCommandExecuted = {\n    type: 'command.executed';\n    properties: {\n        name: string;\n        sessionID: string;\n        arguments: string;\n        messageID: string;\n    };\n};\n\nexport type EventMcpToolsChanged = {\n    type: 'mcp.tools.changed';\n    properties: {\n        server: string;\n    };\n};\n\nexport type EventTuiToastShow = {\n    type: 'tui.toast.show';\n    properties: {\n        title?: string;\n        message: string;\n        variant: 'info' | 'success' | 'warning' | 'error';\n        /**\n         * Duration in milliseconds\n         */\n        duration?: number;\n    };\n};\n\nexport type EventTuiCommandExecute = {\n    type: 'tui.command.execute';\n    properties: {\n        command: 'session.list' | 'session.new' | 'session.share' | 'session.interrupt' | 'session.compact' | 'session.page.up' | 'session.page.down' | 'session.half.page.up' | 'session.half.page.down' | 'session.first' | 'session.last' | 'prompt.clear' | 'prompt.submit' | 'agent.cycle' | string;\n    };\n};\n\nexport type EventTuiPromptAppend = {\n    type: 'tui.prompt.append';\n    properties: {\n        text: string;\n    };\n};\n\nexport type Todo = {\n    /**\n     * Brief description of the task\n     */\n    content: string;\n    /**\n     * Current status of the task: pending, in_progress, completed, cancelled\n     */\n    status: string;\n    /**\n     * Priority level of the task: high, medium, low\n     */\n    priority: string;\n    /**\n     * Unique identifier for the todo item\n     */\n    id: string;\n};\n\nexport type EventTodoUpdated = {\n    type: 'todo.updated';\n    properties: {\n        sessionID: string;\n        todos: Array<Todo>;\n    };\n};\n\nexport type EventFileEdited = {\n    type: 'file.edited';\n    properties: {\n        file: string;\n    };\n};\n\nexport type EventSessionCompacted = {\n    type: 'session.compacted';\n    properties: {\n        sessionID: string;\n    };\n};\n\nexport type EventSessionIdle = {\n    type: 'session.idle';\n    properties: {\n        sessionID: string;\n    };\n};\n\nexport type SessionStatus = {\n    type: 'idle';\n} | {\n    type: 'retry';\n    attempt: number;\n    message: string;\n    next: number;\n} | {\n    type: 'busy';\n};\n\nexport type EventSessionStatus = {\n    type: 'session.status';\n    properties: {\n        sessionID: string;\n        status: SessionStatus;\n    };\n};\n\nexport type EventPermissionReplied = {\n    type: 'permission.replied';\n    properties: {\n        sessionID: string;\n        requestID: string;\n        reply: 'once' | 'always' | 'reject';\n    };\n};\n\nexport type PermissionRequest = {\n    id: string;\n    sessionID: string;\n    permission: string;\n    patterns: Array<string>;\n    metadata: {\n        [key: string]: unknown;\n    };\n    always: Array<string>;\n    tool?: {\n        messageID: string;\n        callID: string;\n    };\n};\n\nexport type EventPermissionAsked = {\n    type: 'permission.asked';\n    properties: PermissionRequest;\n};\n\nexport type EventMessagePartRemoved = {\n    type: 'message.part.removed';\n    properties: {\n        sessionID: string;\n        messageID: string;\n        partID: string;\n    };\n};\n\nexport type CompactionPart = {\n    id: string;\n    sessionID: string;\n    messageID: string;\n    type: 'compaction';\n    auto: boolean;\n};\n\nexport type RetryPart = {\n    id: string;\n    sessionID: string;\n    messageID: string;\n    type: 'retry';\n    attempt: number;\n    error: ApiError;\n    time: {\n        created: number;\n    };\n};\n\nexport type AgentPart = {\n    id: string;\n    sessionID: string;\n    messageID: string;\n    type: 'agent';\n    name: string;\n    source?: {\n        value: string;\n        start: number;\n        end: number;\n    };\n};\n\nexport type PatchPart = {\n    id: string;\n    sessionID: string;\n    messageID: string;\n    type: 'patch';\n    hash: string;\n    files: Array<string>;\n};\n\nexport type SnapshotPart = {\n    id: string;\n    sessionID: string;\n    messageID: string;\n    type: 'snapshot';\n    snapshot: string;\n};\n\nexport type StepFinishPart = {\n    id: string;\n    sessionID: string;\n    messageID: string;\n    type: 'step-finish';\n    reason: string;\n    snapshot?: string;\n    cost: number;\n    tokens: {\n        input: number;\n        output: number;\n        reasoning: number;\n        cache: {\n            read: number;\n            write: number;\n        };\n    };\n};\n\nexport type StepStartPart = {\n    id: string;\n    sessionID: string;\n    messageID: string;\n    type: 'step-start';\n    snapshot?: string;\n};\n\nexport type ToolStateError = {\n    status: 'error';\n    input: {\n        [key: string]: unknown;\n    };\n    error: string;\n    metadata?: {\n        [key: string]: unknown;\n    };\n    time: {\n        start: number;\n        end: number;\n    };\n};\n\nexport type ToolStateCompleted = {\n    status: 'completed';\n    input: {\n        [key: string]: unknown;\n    };\n    output: string;\n    title: string;\n    metadata: {\n        [key: string]: unknown;\n    };\n    time: {\n        start: number;\n        end: number;\n        compacted?: number;\n    };\n    attachments?: Array<FilePart>;\n};\n\nexport type FilePart = {\n    id: string;\n    sessionID: string;\n    messageID: string;\n    type: 'file';\n    mime: string;\n    filename?: string;\n    url: string;\n    source?: FilePartSource;\n};\n\nexport type ToolStateRunning = {\n    status: 'running';\n    input: {\n        [key: string]: unknown;\n    };\n    title?: string;\n    metadata?: {\n        [key: string]: unknown;\n    };\n    time: {\n        start: number;\n    };\n};\n\nexport type ToolStatePending = {\n    status: 'pending';\n    input: {\n        [key: string]: unknown;\n    };\n    raw: string;\n};\n\nexport type ToolState = ToolStatePending | ToolStateRunning | ToolStateCompleted | ToolStateError;\n\nexport type ToolPart = {\n    id: string;\n    sessionID: string;\n    messageID: string;\n    type: 'tool';\n    callID: string;\n    tool: string;\n    state: ToolState;\n    metadata?: {\n        [key: string]: unknown;\n    };\n};\n\nexport type ReasoningPart = {\n    id: string;\n    sessionID: string;\n    messageID: string;\n    type: 'reasoning';\n    text: string;\n    metadata?: {\n        [key: string]: unknown;\n    };\n    time: {\n        start: number;\n        end?: number;\n    };\n};\n\nexport type TextPart = {\n    id: string;\n    sessionID: string;\n    messageID: string;\n    type: 'text';\n    text: string;\n    synthetic?: boolean;\n    ignored?: boolean;\n    time?: {\n        start: number;\n        end?: number;\n    };\n    metadata?: {\n        [key: string]: unknown;\n    };\n};\n\nexport type Part = TextPart | {\n    id: string;\n    sessionID: string;\n    messageID: string;\n    type: 'subtask';\n    prompt: string;\n    description: string;\n    agent: string;\n    command?: string;\n} | ReasoningPart | FilePart | ToolPart | StepStartPart | StepFinishPart | SnapshotPart | PatchPart | AgentPart | RetryPart | CompactionPart;\n\nexport type EventMessagePartUpdated = {\n    type: 'message.part.updated';\n    properties: {\n        part: Part;\n        delta?: string;\n    };\n};\n\nexport type EventMessageRemoved = {\n    type: 'message.removed';\n    properties: {\n        sessionID: string;\n        messageID: string;\n    };\n};\n\nexport type AssistantMessage = {\n    id: string;\n    sessionID: string;\n    role: 'assistant';\n    time: {\n        created: number;\n        completed?: number;\n    };\n    error?: ProviderAuthError | UnknownError | MessageOutputLengthError | MessageAbortedError | ApiError;\n    parentID: string;\n    modelID: string;\n    providerID: string;\n    mode: string;\n    agent: string;\n    path: {\n        cwd: string;\n        root: string;\n    };\n    summary?: boolean;\n    cost: number;\n    tokens: {\n        input: number;\n        output: number;\n        reasoning: number;\n        cache: {\n            read: number;\n            write: number;\n        };\n    };\n    finish?: string;\n};\n\nexport type UserMessage = {\n    id: string;\n    sessionID: string;\n    role: 'user';\n    time: {\n        created: number;\n    };\n    summary?: {\n        title?: string;\n        body?: string;\n        diffs: Array<FileDiff>;\n    };\n    agent: string;\n    model: {\n        providerID: string;\n        modelID: string;\n    };\n    system?: string;\n    tools?: {\n        [key: string]: boolean;\n    };\n    variant?: string;\n};\n\nexport type Message = UserMessage | AssistantMessage;\n\nexport type EventMessageUpdated = {\n    type: 'message.updated';\n    properties: {\n        info: Message;\n    };\n};\n\nexport type EventLspUpdated = {\n    type: 'lsp.updated';\n    properties: {\n        [key: string]: unknown;\n    };\n};\n\nexport type EventLspClientDiagnostics = {\n    type: 'lsp.client.diagnostics';\n    properties: {\n        serverID: string;\n        path: string;\n    };\n};\n\nexport type EventServerInstanceDisposed = {\n    type: 'server.instance.disposed';\n    properties: {\n        directory: string;\n    };\n};\n\nexport type Project = {\n    id: string;\n    worktree: string;\n    vcs?: 'git';\n    name?: string;\n    icon?: {\n        url?: string;\n        color?: string;\n    };\n    time: {\n        created: number;\n        updated: number;\n        initialized?: number;\n    };\n};\n\nexport type EventProjectUpdated = {\n    type: 'project.updated';\n    properties: Project;\n};\n\nexport type EventInstallationUpdateAvailable = {\n    type: 'installation.update-available';\n    properties: {\n        version: string;\n    };\n};\n\nexport type EventInstallationUpdated = {\n    type: 'installation.updated';\n    properties: {\n        version: string;\n    };\n};\n\nexport type Event = EventInstallationUpdated | EventInstallationUpdateAvailable | EventProjectUpdated | EventServerInstanceDisposed | EventLspClientDiagnostics | EventLspUpdated | EventMessageUpdated | EventMessageRemoved | EventMessagePartUpdated | EventMessagePartRemoved | EventPermissionAsked | EventPermissionReplied | EventSessionStatus | EventSessionIdle | EventSessionCompacted | EventFileEdited | EventTodoUpdated | EventTuiPromptAppend | EventTuiCommandExecute | EventTuiToastShow | EventMcpToolsChanged | EventCommandExecuted | EventSessionCreated | EventSessionUpdated | EventSessionDeleted | EventSessionDiff | EventSessionError | EventFileWatcherUpdated | EventVcsBranchUpdated | EventPtyCreated | EventPtyUpdated | EventPtyExited | EventPtyDeleted | EventServerConnected | EventGlobalDisposed;\n\nexport type EventSubscribeData = {\n    body?: never;\n    path?: never;\n    query?: {\n        directory?: string;\n    };\n    url: '/event';\n};\n\nexport type EventSubscribeResponses = {\n    /**\n     * Event stream\n     */\n    200: Event;\n};\n\nexport type EventSubscribeResponse = EventSubscribeResponses[keyof EventSubscribeResponses];\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/sse-axios/client/client.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { AxiosError, AxiosInstance, RawAxiosRequestHeaders } from 'axios';\nimport axios from 'axios';\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 } from './types.gen';\nimport { buildUrl, createConfig, mergeConfigs, mergeHeaders, setAuthParams } from './utils.gen';\n\nexport const createClient = (config: Config = {}): Client => {\n  let _config = mergeConfigs(createConfig(), config);\n\n  let instance: AxiosInstance;\n\n  if (_config.axios && !('Axios' in _config.axios)) {\n    instance = _config.axios;\n  } else {\n    // eslint-disable-next-line @typescript-eslint/no-unused-vars\n    const { auth, ...configWithoutAuth } = _config;\n    instance = axios.create(configWithoutAuth);\n  }\n\n  const getConfig = (): Config => ({ ..._config });\n\n  const setConfig = (config: Config): Config => {\n    _config = mergeConfigs(_config, config);\n    instance.defaults = {\n      ...instance.defaults,\n      ..._config,\n      // @ts-expect-error\n      headers: mergeHeaders(instance.defaults.headers, _config.headers),\n    };\n    return getConfig();\n  };\n\n  const beforeRequest = async (options: RequestOptions) => {\n    const opts = {\n      ..._config,\n      ...options,\n      axios: options.axios ?? _config.axios ?? instance,\n      headers: mergeHeaders(_config.headers, options.headers),\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.body = opts.bodySerializer(opts.body);\n    }\n\n    const url = buildUrl(opts);\n\n    return { opts, url };\n  };\n\n  // @ts-expect-error\n  const request: Client['request'] = async (options) => {\n    // @ts-expect-error\n    const { opts, url } = await beforeRequest(options);\n    try {\n      // assign Axios here for consistency with fetch\n      const _axios = opts.axios!;\n      // eslint-disable-next-line @typescript-eslint/no-unused-vars\n      const { auth, ...optsWithoutAuth } = opts;\n      const response = await _axios({\n        ...optsWithoutAuth,\n        baseURL: '', // the baseURL is already included in `url`\n        data: getValidRequestBody(opts),\n        headers: opts.headers as RawAxiosRequestHeaders,\n        // let `paramsSerializer()` handle query params if it exists\n        params: opts.paramsSerializer ? opts.query : undefined,\n        url,\n      });\n\n      let { data } = response;\n\n      if (opts.responseType === '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 {\n        ...response,\n        data: data ?? {},\n      };\n    } catch (error) {\n      const e = error as AxiosError;\n      if (opts.throwOnError) {\n        throw e;\n      }\n      // @ts-expect-error\n      e.error = e.response?.data ?? {};\n      return e;\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 Record<string, string>,\n      method,\n      serializedBody: getValidRequestBody(opts) as BodyInit | null | undefined,\n      // @ts-expect-error\n      signal: opts.signal,\n      url,\n    });\n  };\n\n  const _buildUrl: Client['buildUrl'] = (options) =>\n    buildUrl({ axios: instance, ..._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    instance,\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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/sse-axios/client/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type { Auth } from '../core/auth.gen';\nexport type { QuerySerializerOptions } from '../core/bodySerializer.gen';\nexport {\n  formDataBodySerializer,\n  jsonBodySerializer,\n  urlSearchParamsBodySerializer,\n} from '../core/bodySerializer.gen';\nexport { buildClientParams } from '../core/params.gen';\nexport { serializeQueryKeyValue } from '../core/queryKeySerializer.gen';\nexport { createClient } from './client.gen';\nexport type {\n  Client,\n  ClientOptions,\n  Config,\n  CreateClientConfig,\n  Options,\n  RequestOptions,\n  RequestResult,\n  TDataShape,\n} from './types.gen';\nexport { createConfig } from './utils.gen';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/sse-axios/client/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type {\n  AxiosError,\n  AxiosInstance,\n  AxiosRequestHeaders,\n  AxiosResponse,\n  AxiosStatic,\n  CreateAxiosDefaults,\n} from 'axios';\n\nimport type { Auth } from '../core/auth.gen';\nimport type {\n  ServerSentEventsOptions,\n  ServerSentEventsResult,\n} from '../core/serverSentEvents.gen';\nimport type { Client as CoreClient, Config as CoreConfig } from '../core/types.gen';\n\nexport interface Config<T extends ClientOptions = ClientOptions>\n  extends Omit<CreateAxiosDefaults, 'auth' | 'baseURL' | 'headers' | 'method'>, CoreConfig {\n  /**\n   * Axios implementation. You can use this option to provide either an\n   * `AxiosStatic` or an `AxiosInstance`.\n   *\n   * @default axios\n   */\n  axios?: AxiosStatic | AxiosInstance;\n  /**\n   * Base URL for all requests made by this client.\n   */\n  baseURL?: T['baseURL'];\n  /**\n   * An object containing any HTTP headers that you want to pre-populate your\n   * `Headers` object with.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/Headers/Headers#init See more}\n   */\n  headers?:\n    | AxiosRequestHeaders\n    | Record<\n        string,\n        string | number | boolean | (string | number | boolean)[] | null | undefined | unknown\n      >;\n  /**\n   * Throw an error instead of returning it in the response?\n   *\n   * @default false\n   */\n  throwOnError?: T['throwOnError'];\n}\n\nexport interface RequestOptions<\n  TData = unknown,\n  ThrowOnError extends boolean = boolean,\n  Url extends string = string,\n>\n  extends\n    Config<{\n      throwOnError: ThrowOnError;\n    }>,\n    Pick<\n      ServerSentEventsOptions<TData>,\n      | 'onRequest'\n      | 'onSseError'\n      | 'onSseEvent'\n      | 'sseDefaultRetryDelay'\n      | 'sseMaxRetryAttempts'\n      | 'sseMaxRetryDelay'\n    > {\n  /**\n   * Any body that you want to add to your request.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/fetch#body}\n   */\n  body?: unknown;\n  path?: Record<string, unknown>;\n  query?: Record<string, unknown>;\n  /**\n   * Security mechanism(s) to use for the request.\n   */\n  security?: ReadonlyArray<Auth>;\n  url: Url;\n}\n\nexport interface ClientOptions {\n  baseURL?: string;\n  throwOnError?: boolean;\n}\n\nexport type RequestResult<\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = boolean,\n> = ThrowOnError extends true\n  ? Promise<AxiosResponse<TData extends Record<string, unknown> ? TData[keyof TData] : TData>>\n  : Promise<\n      | (AxiosResponse<TData extends Record<string, unknown> ? TData[keyof TData] : TData> & {\n          error: undefined;\n        })\n      | (AxiosError<TError extends Record<string, unknown> ? TError[keyof TError] : TError> & {\n          data: undefined;\n          error: TError extends Record<string, unknown> ? TError[keyof TError] : TError;\n        })\n    >;\n\ntype MethodFn = <TData = unknown, TError = unknown, ThrowOnError extends boolean = false>(\n  options: Omit<RequestOptions<TData, ThrowOnError>, 'method'>,\n) => RequestResult<TData, TError, ThrowOnError>;\n\ntype SseFn = <TData = unknown, TError = unknown, ThrowOnError extends boolean = false>(\n  options: Omit<RequestOptions<TData, ThrowOnError>, 'method'>,\n) => Promise<ServerSentEventsResult<TData, TError>>;\n\ntype RequestFn = <TData = unknown, TError = unknown, ThrowOnError extends boolean = false>(\n  options: Omit<RequestOptions<TData, ThrowOnError>, 'method'> &\n    Pick<Required<RequestOptions<TData, ThrowOnError>>, 'method'>,\n) => RequestResult<TData, TError, ThrowOnError>;\n\ntype BuildUrlFn = <\n  TData extends {\n    body?: unknown;\n    path?: Record<string, unknown>;\n    query?: Record<string, unknown>;\n    url: string;\n  },\n>(\n  options: TData & Options<TData>,\n) => string;\n\nexport type Client = CoreClient<RequestFn, Config, MethodFn, BuildUrlFn, SseFn> & {\n  instance: AxiosInstance;\n};\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 = ClientOptions> = (\n  override?: Config<ClientOptions & T>,\n) => Config<Required<ClientOptions> & T>;\n\nexport interface TDataShape {\n  body?: unknown;\n  headers?: unknown;\n  path?: unknown;\n  query?: unknown;\n  url: string;\n}\n\ntype OmitKeys<T, K> = Pick<T, Exclude<keyof T, K>>;\n\nexport type Options<\n  TData extends TDataShape = TDataShape,\n  ThrowOnError extends boolean = boolean,\n  TResponse = unknown,\n> = OmitKeys<RequestOptions<TResponse, ThrowOnError>, 'body' | 'path' | 'query' | 'url'> &\n  ([TData] extends [never] ? unknown : Omit<TData, 'url'>);\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/sse-axios/client/utils.gen.ts",
    "content": "// 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 {\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\nconst checkForExistence = (\n  options: Pick<RequestOptions, 'auth' | 'query'> & {\n    headers: Record<any, unknown>;\n  },\n  name?: string,\n): boolean => {\n  if (!name) {\n    return false;\n  }\n  if (name in options.headers || options.query?.[name]) {\n    return true;\n  }\n  if (\n    'Cookie' in options.headers &&\n    options.headers['Cookie'] &&\n    typeof options.headers['Cookie'] === 'string'\n  ) {\n    return options.headers['Cookie'].includes(`${name}=`);\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: Record<any, unknown>;\n  }) => {\n  for (const auth of security) {\n    if (checkForExistence(options, auth.name)) {\n      continue;\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        const value = `${name}=${token}`;\n        if ('Cookie' in options.headers && options.headers['Cookie']) {\n          options.headers['Cookie'] = `${options.headers['Cookie']}; ${value}`;\n        } else {\n          options.headers['Cookie'] = value;\n        }\n        break;\n      }\n      case 'header':\n      default:\n        options.headers[name] = token;\n        break;\n    }\n  }\n};\n\nexport const buildUrl: Client['buildUrl'] = (options) => {\n  const instanceBaseUrl = options.axios?.defaults?.baseURL;\n\n  const baseUrl =\n    !!options.baseURL && typeof options.baseURL === 'string' ? options.baseURL : instanceBaseUrl;\n\n  return getUrl({\n    baseUrl: baseUrl as string,\n    path: options.path,\n    // let `paramsSerializer()` handle query params if it exists\n    query: !options.paramsSerializer ? options.query : undefined,\n    querySerializer:\n      typeof options.querySerializer === 'function'\n        ? options.querySerializer\n        : createQuerySerializer(options.querySerializer),\n    url: options.url,\n  });\n};\n\nexport const mergeConfigs = (a: Config, b: Config): Config => {\n  const config = { ...a, ...b };\n  config.headers = mergeHeaders(a.headers, b.headers);\n  return config;\n};\n\n/**\n * Special Axios headers keywords allowing to set headers by request method.\n */\nexport const axiosHeadersKeywords = [\n  'common',\n  'delete',\n  'get',\n  'head',\n  'patch',\n  'post',\n  'put',\n] as const;\n\nexport const mergeHeaders = (\n  ...headers: Array<Required<Config>['headers'] | undefined>\n): Record<any, unknown> => {\n  const mergedHeaders: Record<any, unknown> = {};\n  for (const header of headers) {\n    if (!header || typeof header !== 'object') {\n      continue;\n    }\n\n    const iterator = Object.entries(header);\n\n    for (const [key, value] of iterator) {\n      if (\n        axiosHeadersKeywords.includes(key as (typeof axiosHeadersKeywords)[number]) &&\n        typeof value === 'object'\n      ) {\n        mergedHeaders[key] = {\n          ...(mergedHeaders[key] as Record<any, unknown>),\n          ...value,\n        };\n      } else if (value === null) {\n        delete mergedHeaders[key];\n      } else if (Array.isArray(value)) {\n        for (const v of value) {\n          // @ts-expect-error\n          mergedHeaders[key] = [...(mergedHeaders[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[key] = typeof value === 'object' ? JSON.stringify(value) : (value as string);\n      }\n    }\n  }\n  return mergedHeaders;\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  ...override,\n});\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/sse-axios/client.gen.ts",
    "content": "// 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>());\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/sse-axios/core/auth.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/sse-axios/core/bodySerializer.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/sse-axios/core/params.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/sse-axios/core/pathSerializer.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/sse-axios/core/queryKeySerializer.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\n/**\n * JSON-friendly union that mirrors what Pinia Colada can hash.\n */\nexport type JsonValue =\n  | null\n  | string\n  | number\n  | boolean\n  | JsonValue[]\n  | { [key: string]: JsonValue };\n\n/**\n * Replacer that converts non-JSON values (bigint, Date, etc.) to safe substitutes.\n */\nexport const queryKeyJsonReplacer = (_key: string, value: unknown) => {\n  if (value === undefined || typeof value === 'function' || typeof value === 'symbol') {\n    return undefined;\n  }\n  if (typeof value === 'bigint') {\n    return value.toString();\n  }\n  if (value instanceof Date) {\n    return value.toISOString();\n  }\n  return value;\n};\n\n/**\n * Safely stringifies a value and parses it back into a JsonValue.\n */\nexport const stringifyToJsonValue = (input: unknown): JsonValue | undefined => {\n  try {\n    const json = JSON.stringify(input, queryKeyJsonReplacer);\n    if (json === undefined) {\n      return undefined;\n    }\n    return JSON.parse(json) as JsonValue;\n  } catch {\n    return undefined;\n  }\n};\n\n/**\n * Detects plain objects (including objects with a null prototype).\n */\nconst isPlainObject = (value: unknown): value is Record<string, unknown> => {\n  if (value === null || typeof value !== 'object') {\n    return false;\n  }\n  const prototype = Object.getPrototypeOf(value as object);\n  return prototype === Object.prototype || prototype === null;\n};\n\n/**\n * Turns URLSearchParams into a sorted JSON object for deterministic keys.\n */\nconst serializeSearchParams = (params: URLSearchParams): JsonValue => {\n  const entries = Array.from(params.entries()).sort(([a], [b]) => a.localeCompare(b));\n  const result: Record<string, JsonValue> = {};\n\n  for (const [key, value] of entries) {\n    const existing = result[key];\n    if (existing === undefined) {\n      result[key] = value;\n      continue;\n    }\n\n    if (Array.isArray(existing)) {\n      (existing as string[]).push(value);\n    } else {\n      result[key] = [existing, value];\n    }\n  }\n\n  return result;\n};\n\n/**\n * Normalizes any accepted value into a JSON-friendly shape for query keys.\n */\nexport const serializeQueryKeyValue = (value: unknown): JsonValue | undefined => {\n  if (value === null) {\n    return null;\n  }\n\n  if (typeof value === 'string' || typeof value === 'number' || typeof value === 'boolean') {\n    return value;\n  }\n\n  if (value === undefined || typeof value === 'function' || typeof value === 'symbol') {\n    return undefined;\n  }\n\n  if (typeof value === 'bigint') {\n    return value.toString();\n  }\n\n  if (value instanceof Date) {\n    return value.toISOString();\n  }\n\n  if (Array.isArray(value)) {\n    return stringifyToJsonValue(value);\n  }\n\n  if (typeof URLSearchParams !== 'undefined' && value instanceof URLSearchParams) {\n    return serializeSearchParams(value);\n  }\n\n  if (isPlainObject(value)) {\n    return stringifyToJsonValue(value);\n  }\n\n  return undefined;\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/sse-axios/core/serverSentEvents.gen.ts",
    "content": "// 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 const 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            // Normalize line endings: CRLF -> LF, then CR -> LF\n            buffer = buffer.replace(/\\r\\n/g, '\\n').replace(/\\r/g, '\\n');\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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/sse-axios/core/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { Auth, AuthToken } from './auth.gen';\nimport type { BodySerializer, QuerySerializer, QuerySerializerOptions } from './bodySerializer.gen';\n\nexport type HttpMethod =\n  | 'connect'\n  | 'delete'\n  | 'get'\n  | 'head'\n  | 'options'\n  | 'patch'\n  | 'post'\n  | 'put'\n  | 'trace';\n\nexport type Client<\n  RequestFn = never,\n  Config = unknown,\n  MethodFn = never,\n  BuildUrlFn = never,\n  SseFn = never,\n> = {\n  /**\n   * Returns the final request URL.\n   */\n  buildUrl: BuildUrlFn;\n  getConfig: () => Config;\n  request: RequestFn;\n  setConfig: (config: Config) => Config;\n} & {\n  [K in HttpMethod]: MethodFn;\n} & ([SseFn] extends [never] ? { sse?: never } : { sse: { [K in HttpMethod]: SseFn } });\n\nexport interface Config {\n  /**\n   * Auth token or a function returning auth token. The resolved value will be\n   * added to the request payload as defined by its `security` array.\n   */\n  auth?: ((auth: Auth) => Promise<AuthToken> | AuthToken) | AuthToken;\n  /**\n   * A function for serializing request body parameter. By default,\n   * {@link JSON.stringify()} will be used.\n   */\n  bodySerializer?: BodySerializer | null;\n  /**\n   * An object containing any HTTP headers that you want to pre-populate your\n   * `Headers` object with.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/Headers/Headers#init See more}\n   */\n  headers?:\n    | RequestInit['headers']\n    | Record<\n        string,\n        string | number | boolean | (string | number | boolean)[] | null | undefined | unknown\n      >;\n  /**\n   * The request method.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/fetch#method See more}\n   */\n  method?: Uppercase<HttpMethod>;\n  /**\n   * A function for serializing request query parameters. By default, arrays\n   * will be exploded in form style, objects will be exploded in deepObject\n   * style, and reserved characters are percent-encoded.\n   *\n   * This method will have no effect if the native `paramsSerializer()` Axios\n   * API function is used.\n   *\n   * {@link https://swagger.io/docs/specification/serialization/#query View examples}\n   */\n  querySerializer?: QuerySerializer | QuerySerializerOptions;\n  /**\n   * A function validating request data. This is useful if you want to ensure\n   * the request conforms to the desired shape, so it can be safely sent to\n   * the server.\n   */\n  requestValidator?: (data: unknown) => Promise<unknown>;\n  /**\n   * A function transforming response data before it's returned. This is useful\n   * for post-processing data, e.g. converting ISO strings into Date objects.\n   */\n  responseTransformer?: (data: unknown) => Promise<unknown>;\n  /**\n   * A function validating response data. This is useful if you want to ensure\n   * the response conforms to the desired shape, so it can be safely passed to\n   * the transformers and returned to the user.\n   */\n  responseValidator?: (data: unknown) => Promise<unknown>;\n}\n\ntype IsExactlyNeverOrNeverUndefined<T> = [T] extends [never]\n  ? true\n  : [T] extends [never | undefined]\n    ? [undefined] extends [T]\n      ? false\n      : true\n    : false;\n\nexport type OmitNever<T extends Record<string, unknown>> = {\n  [K in keyof T as IsExactlyNeverOrNeverUndefined<T[K]> extends true ? never : K]: T[K];\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/sse-axios/core/utils.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/sse-axios/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport { eventSubscribe, type Options } from './sdk.gen';\nexport type { AgentPart, ApiError, AssistantMessage, ClientOptions, CompactionPart, Event, EventCommandExecuted, EventFileEdited, EventFileWatcherUpdated, EventGlobalDisposed, EventInstallationUpdateAvailable, EventInstallationUpdated, EventLspClientDiagnostics, EventLspUpdated, EventMcpToolsChanged, EventMessagePartRemoved, EventMessagePartUpdated, EventMessageRemoved, EventMessageUpdated, EventPermissionAsked, EventPermissionReplied, EventProjectUpdated, EventPtyCreated, EventPtyDeleted, EventPtyExited, EventPtyUpdated, EventServerConnected, EventServerInstanceDisposed, EventSessionCompacted, EventSessionCreated, EventSessionDeleted, EventSessionDiff, EventSessionError, EventSessionIdle, EventSessionStatus, EventSessionUpdated, EventSubscribeData, EventSubscribeResponse, EventSubscribeResponses, EventTodoUpdated, EventTuiCommandExecute, EventTuiPromptAppend, EventTuiToastShow, EventVcsBranchUpdated, FileDiff, FilePart, FilePartSource, FilePartSourceText, FileSource, Message, MessageAbortedError, MessageOutputLengthError, Part, PatchPart, PermissionAction, PermissionRequest, PermissionRule, PermissionRuleset, Project, ProviderAuthError, Pty, Range, ReasoningPart, RetryPart, Session, SessionStatus, SnapshotPart, StepFinishPart, StepStartPart, SymbolSource, TextPart, Todo, ToolPart, ToolState, ToolStateCompleted, ToolStateError, ToolStatePending, ToolStateRunning, UnknownError, UserMessage } from './types.gen';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/sse-axios/sdk.gen.ts",
    "content": "// 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 { EventSubscribeData, EventSubscribeResponses } from './types.gen';\n\nexport type Options<TData extends TDataShape = TDataShape, ThrowOnError extends boolean = boolean> = Options2<TData, ThrowOnError> & {\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 * Subscribe to events\n *\n * Get events\n */\nexport const eventSubscribe = <ThrowOnError extends boolean = false>(options?: Options<EventSubscribeData, ThrowOnError>) => (options?.client ?? client).sse.get<EventSubscribeResponses, unknown, ThrowOnError>({\n    responseType: 'text',\n    url: '/event',\n    ...options\n});\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/sse-axios/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type ClientOptions = {\n    baseURL: `${string}://${string}` | (string & {});\n};\n\nexport type PermissionAction = 'allow' | 'deny' | 'ask';\n\nexport type PermissionRule = {\n    permission: string;\n    pattern: string;\n    action: PermissionAction;\n};\n\nexport type PermissionRuleset = Array<PermissionRule>;\n\nexport type Range = {\n    start: {\n        line: number;\n        character: number;\n    };\n    end: {\n        line: number;\n        character: number;\n    };\n};\n\nexport type SymbolSource = {\n    text: FilePartSourceText;\n    type: 'symbol';\n    path: string;\n    range: Range;\n    name: string;\n    kind: number;\n};\n\nexport type FilePartSourceText = {\n    value: string;\n    start: number;\n    end: number;\n};\n\nexport type FileSource = {\n    text: FilePartSourceText;\n    type: 'file';\n    path: string;\n};\n\nexport type FilePartSource = FileSource | SymbolSource;\n\nexport type EventGlobalDisposed = {\n    type: 'global.disposed';\n    properties: {\n        [key: string]: unknown;\n    };\n};\n\nexport type EventServerConnected = {\n    type: 'server.connected';\n    properties: {\n        [key: string]: unknown;\n    };\n};\n\nexport type EventPtyDeleted = {\n    type: 'pty.deleted';\n    properties: {\n        id: string;\n    };\n};\n\nexport type EventPtyExited = {\n    type: 'pty.exited';\n    properties: {\n        id: string;\n        exitCode: number;\n    };\n};\n\nexport type EventPtyUpdated = {\n    type: 'pty.updated';\n    properties: {\n        info: Pty;\n    };\n};\n\nexport type Pty = {\n    id: string;\n    title: string;\n    command: string;\n    args: Array<string>;\n    cwd: string;\n    status: 'running' | 'exited';\n    pid: number;\n};\n\nexport type EventPtyCreated = {\n    type: 'pty.created';\n    properties: {\n        info: Pty;\n    };\n};\n\nexport type EventVcsBranchUpdated = {\n    type: 'vcs.branch.updated';\n    properties: {\n        branch?: string;\n    };\n};\n\nexport type EventFileWatcherUpdated = {\n    type: 'file.watcher.updated';\n    properties: {\n        file: string;\n        event: 'add' | 'change' | 'unlink';\n    };\n};\n\nexport type EventSessionError = {\n    type: 'session.error';\n    properties: {\n        sessionID?: string;\n        error?: ProviderAuthError | UnknownError | MessageOutputLengthError | MessageAbortedError | ApiError;\n    };\n};\n\nexport type ApiError = {\n    name: 'APIError';\n    data: {\n        message: string;\n        statusCode?: number;\n        isRetryable: boolean;\n        responseHeaders?: {\n            [key: string]: string;\n        };\n        responseBody?: string;\n        metadata?: {\n            [key: string]: string;\n        };\n    };\n};\n\nexport type MessageAbortedError = {\n    name: 'MessageAbortedError';\n    data: {\n        message: string;\n    };\n};\n\nexport type MessageOutputLengthError = {\n    name: 'MessageOutputLengthError';\n    data: {\n        [key: string]: unknown;\n    };\n};\n\nexport type UnknownError = {\n    name: 'UnknownError';\n    data: {\n        message: string;\n    };\n};\n\nexport type ProviderAuthError = {\n    name: 'ProviderAuthError';\n    data: {\n        providerID: string;\n        message: string;\n    };\n};\n\nexport type EventSessionDiff = {\n    type: 'session.diff';\n    properties: {\n        sessionID: string;\n        diff: Array<FileDiff>;\n    };\n};\n\nexport type FileDiff = {\n    file: string;\n    before: string;\n    after: string;\n    additions: number;\n    deletions: number;\n};\n\nexport type EventSessionDeleted = {\n    type: 'session.deleted';\n    properties: {\n        info: Session;\n    };\n};\n\nexport type Session = {\n    id: string;\n    projectID: string;\n    directory: string;\n    parentID?: string;\n    summary?: {\n        additions: number;\n        deletions: number;\n        files: number;\n        diffs?: Array<FileDiff>;\n    };\n    share?: {\n        url: string;\n    };\n    title: string;\n    version: string;\n    time: {\n        created: number;\n        updated: number;\n        compacting?: number;\n        archived?: number;\n    };\n    permission?: PermissionRuleset;\n    revert?: {\n        messageID: string;\n        partID?: string;\n        snapshot?: string;\n        diff?: string;\n    };\n};\n\nexport type EventSessionUpdated = {\n    type: 'session.updated';\n    properties: {\n        info: Session;\n    };\n};\n\nexport type EventSessionCreated = {\n    type: 'session.created';\n    properties: {\n        info: Session;\n    };\n};\n\nexport type EventCommandExecuted = {\n    type: 'command.executed';\n    properties: {\n        name: string;\n        sessionID: string;\n        arguments: string;\n        messageID: string;\n    };\n};\n\nexport type EventMcpToolsChanged = {\n    type: 'mcp.tools.changed';\n    properties: {\n        server: string;\n    };\n};\n\nexport type EventTuiToastShow = {\n    type: 'tui.toast.show';\n    properties: {\n        title?: string;\n        message: string;\n        variant: 'info' | 'success' | 'warning' | 'error';\n        /**\n         * Duration in milliseconds\n         */\n        duration?: number;\n    };\n};\n\nexport type EventTuiCommandExecute = {\n    type: 'tui.command.execute';\n    properties: {\n        command: 'session.list' | 'session.new' | 'session.share' | 'session.interrupt' | 'session.compact' | 'session.page.up' | 'session.page.down' | 'session.half.page.up' | 'session.half.page.down' | 'session.first' | 'session.last' | 'prompt.clear' | 'prompt.submit' | 'agent.cycle' | string;\n    };\n};\n\nexport type EventTuiPromptAppend = {\n    type: 'tui.prompt.append';\n    properties: {\n        text: string;\n    };\n};\n\nexport type Todo = {\n    /**\n     * Brief description of the task\n     */\n    content: string;\n    /**\n     * Current status of the task: pending, in_progress, completed, cancelled\n     */\n    status: string;\n    /**\n     * Priority level of the task: high, medium, low\n     */\n    priority: string;\n    /**\n     * Unique identifier for the todo item\n     */\n    id: string;\n};\n\nexport type EventTodoUpdated = {\n    type: 'todo.updated';\n    properties: {\n        sessionID: string;\n        todos: Array<Todo>;\n    };\n};\n\nexport type EventFileEdited = {\n    type: 'file.edited';\n    properties: {\n        file: string;\n    };\n};\n\nexport type EventSessionCompacted = {\n    type: 'session.compacted';\n    properties: {\n        sessionID: string;\n    };\n};\n\nexport type EventSessionIdle = {\n    type: 'session.idle';\n    properties: {\n        sessionID: string;\n    };\n};\n\nexport type SessionStatus = {\n    type: 'idle';\n} | {\n    type: 'retry';\n    attempt: number;\n    message: string;\n    next: number;\n} | {\n    type: 'busy';\n};\n\nexport type EventSessionStatus = {\n    type: 'session.status';\n    properties: {\n        sessionID: string;\n        status: SessionStatus;\n    };\n};\n\nexport type EventPermissionReplied = {\n    type: 'permission.replied';\n    properties: {\n        sessionID: string;\n        requestID: string;\n        reply: 'once' | 'always' | 'reject';\n    };\n};\n\nexport type PermissionRequest = {\n    id: string;\n    sessionID: string;\n    permission: string;\n    patterns: Array<string>;\n    metadata: {\n        [key: string]: unknown;\n    };\n    always: Array<string>;\n    tool?: {\n        messageID: string;\n        callID: string;\n    };\n};\n\nexport type EventPermissionAsked = {\n    type: 'permission.asked';\n    properties: PermissionRequest;\n};\n\nexport type EventMessagePartRemoved = {\n    type: 'message.part.removed';\n    properties: {\n        sessionID: string;\n        messageID: string;\n        partID: string;\n    };\n};\n\nexport type CompactionPart = {\n    id: string;\n    sessionID: string;\n    messageID: string;\n    type: 'compaction';\n    auto: boolean;\n};\n\nexport type RetryPart = {\n    id: string;\n    sessionID: string;\n    messageID: string;\n    type: 'retry';\n    attempt: number;\n    error: ApiError;\n    time: {\n        created: number;\n    };\n};\n\nexport type AgentPart = {\n    id: string;\n    sessionID: string;\n    messageID: string;\n    type: 'agent';\n    name: string;\n    source?: {\n        value: string;\n        start: number;\n        end: number;\n    };\n};\n\nexport type PatchPart = {\n    id: string;\n    sessionID: string;\n    messageID: string;\n    type: 'patch';\n    hash: string;\n    files: Array<string>;\n};\n\nexport type SnapshotPart = {\n    id: string;\n    sessionID: string;\n    messageID: string;\n    type: 'snapshot';\n    snapshot: string;\n};\n\nexport type StepFinishPart = {\n    id: string;\n    sessionID: string;\n    messageID: string;\n    type: 'step-finish';\n    reason: string;\n    snapshot?: string;\n    cost: number;\n    tokens: {\n        input: number;\n        output: number;\n        reasoning: number;\n        cache: {\n            read: number;\n            write: number;\n        };\n    };\n};\n\nexport type StepStartPart = {\n    id: string;\n    sessionID: string;\n    messageID: string;\n    type: 'step-start';\n    snapshot?: string;\n};\n\nexport type ToolStateError = {\n    status: 'error';\n    input: {\n        [key: string]: unknown;\n    };\n    error: string;\n    metadata?: {\n        [key: string]: unknown;\n    };\n    time: {\n        start: number;\n        end: number;\n    };\n};\n\nexport type ToolStateCompleted = {\n    status: 'completed';\n    input: {\n        [key: string]: unknown;\n    };\n    output: string;\n    title: string;\n    metadata: {\n        [key: string]: unknown;\n    };\n    time: {\n        start: number;\n        end: number;\n        compacted?: number;\n    };\n    attachments?: Array<FilePart>;\n};\n\nexport type FilePart = {\n    id: string;\n    sessionID: string;\n    messageID: string;\n    type: 'file';\n    mime: string;\n    filename?: string;\n    url: string;\n    source?: FilePartSource;\n};\n\nexport type ToolStateRunning = {\n    status: 'running';\n    input: {\n        [key: string]: unknown;\n    };\n    title?: string;\n    metadata?: {\n        [key: string]: unknown;\n    };\n    time: {\n        start: number;\n    };\n};\n\nexport type ToolStatePending = {\n    status: 'pending';\n    input: {\n        [key: string]: unknown;\n    };\n    raw: string;\n};\n\nexport type ToolState = ToolStatePending | ToolStateRunning | ToolStateCompleted | ToolStateError;\n\nexport type ToolPart = {\n    id: string;\n    sessionID: string;\n    messageID: string;\n    type: 'tool';\n    callID: string;\n    tool: string;\n    state: ToolState;\n    metadata?: {\n        [key: string]: unknown;\n    };\n};\n\nexport type ReasoningPart = {\n    id: string;\n    sessionID: string;\n    messageID: string;\n    type: 'reasoning';\n    text: string;\n    metadata?: {\n        [key: string]: unknown;\n    };\n    time: {\n        start: number;\n        end?: number;\n    };\n};\n\nexport type TextPart = {\n    id: string;\n    sessionID: string;\n    messageID: string;\n    type: 'text';\n    text: string;\n    synthetic?: boolean;\n    ignored?: boolean;\n    time?: {\n        start: number;\n        end?: number;\n    };\n    metadata?: {\n        [key: string]: unknown;\n    };\n};\n\nexport type Part = TextPart | {\n    id: string;\n    sessionID: string;\n    messageID: string;\n    type: 'subtask';\n    prompt: string;\n    description: string;\n    agent: string;\n    command?: string;\n} | ReasoningPart | FilePart | ToolPart | StepStartPart | StepFinishPart | SnapshotPart | PatchPart | AgentPart | RetryPart | CompactionPart;\n\nexport type EventMessagePartUpdated = {\n    type: 'message.part.updated';\n    properties: {\n        part: Part;\n        delta?: string;\n    };\n};\n\nexport type EventMessageRemoved = {\n    type: 'message.removed';\n    properties: {\n        sessionID: string;\n        messageID: string;\n    };\n};\n\nexport type AssistantMessage = {\n    id: string;\n    sessionID: string;\n    role: 'assistant';\n    time: {\n        created: number;\n        completed?: number;\n    };\n    error?: ProviderAuthError | UnknownError | MessageOutputLengthError | MessageAbortedError | ApiError;\n    parentID: string;\n    modelID: string;\n    providerID: string;\n    mode: string;\n    agent: string;\n    path: {\n        cwd: string;\n        root: string;\n    };\n    summary?: boolean;\n    cost: number;\n    tokens: {\n        input: number;\n        output: number;\n        reasoning: number;\n        cache: {\n            read: number;\n            write: number;\n        };\n    };\n    finish?: string;\n};\n\nexport type UserMessage = {\n    id: string;\n    sessionID: string;\n    role: 'user';\n    time: {\n        created: number;\n    };\n    summary?: {\n        title?: string;\n        body?: string;\n        diffs: Array<FileDiff>;\n    };\n    agent: string;\n    model: {\n        providerID: string;\n        modelID: string;\n    };\n    system?: string;\n    tools?: {\n        [key: string]: boolean;\n    };\n    variant?: string;\n};\n\nexport type Message = UserMessage | AssistantMessage;\n\nexport type EventMessageUpdated = {\n    type: 'message.updated';\n    properties: {\n        info: Message;\n    };\n};\n\nexport type EventLspUpdated = {\n    type: 'lsp.updated';\n    properties: {\n        [key: string]: unknown;\n    };\n};\n\nexport type EventLspClientDiagnostics = {\n    type: 'lsp.client.diagnostics';\n    properties: {\n        serverID: string;\n        path: string;\n    };\n};\n\nexport type EventServerInstanceDisposed = {\n    type: 'server.instance.disposed';\n    properties: {\n        directory: string;\n    };\n};\n\nexport type Project = {\n    id: string;\n    worktree: string;\n    vcs?: 'git';\n    name?: string;\n    icon?: {\n        url?: string;\n        color?: string;\n    };\n    time: {\n        created: number;\n        updated: number;\n        initialized?: number;\n    };\n};\n\nexport type EventProjectUpdated = {\n    type: 'project.updated';\n    properties: Project;\n};\n\nexport type EventInstallationUpdateAvailable = {\n    type: 'installation.update-available';\n    properties: {\n        version: string;\n    };\n};\n\nexport type EventInstallationUpdated = {\n    type: 'installation.updated';\n    properties: {\n        version: string;\n    };\n};\n\nexport type Event = EventInstallationUpdated | EventInstallationUpdateAvailable | EventProjectUpdated | EventServerInstanceDisposed | EventLspClientDiagnostics | EventLspUpdated | EventMessageUpdated | EventMessageRemoved | EventMessagePartUpdated | EventMessagePartRemoved | EventPermissionAsked | EventPermissionReplied | EventSessionStatus | EventSessionIdle | EventSessionCompacted | EventFileEdited | EventTodoUpdated | EventTuiPromptAppend | EventTuiCommandExecute | EventTuiToastShow | EventMcpToolsChanged | EventCommandExecuted | EventSessionCreated | EventSessionUpdated | EventSessionDeleted | EventSessionDiff | EventSessionError | EventFileWatcherUpdated | EventVcsBranchUpdated | EventPtyCreated | EventPtyUpdated | EventPtyExited | EventPtyDeleted | EventServerConnected | EventGlobalDisposed;\n\nexport type EventSubscribeData = {\n    body?: never;\n    path?: never;\n    query?: {\n        directory?: string;\n    };\n    url: '/event';\n};\n\nexport type EventSubscribeResponses = {\n    /**\n     * Event stream\n     */\n    200: Event;\n};\n\nexport type EventSubscribeResponse = EventSubscribeResponses[keyof EventSubscribeResponses];\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/sse-fetch/client/client.gen.ts",
    "content": "// 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 (options: RequestOptions) => {\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 url = buildUrl(opts);\n\n    return { opts, url };\n  };\n\n  const request: Client['request'] = async (options) => {\n    // @ts-expect-error\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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/sse-fetch/client/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type { Auth } from '../core/auth.gen';\nexport type { QuerySerializerOptions } from '../core/bodySerializer.gen';\nexport {\n  formDataBodySerializer,\n  jsonBodySerializer,\n  urlSearchParamsBodySerializer,\n} from '../core/bodySerializer.gen';\nexport { buildClientParams } from '../core/params.gen';\nexport { serializeQueryKeyValue } from '../core/queryKeySerializer.gen';\nexport { createClient } from './client.gen';\nexport type {\n  Client,\n  ClientOptions,\n  Config,\n  CreateClientConfig,\n  Options,\n  RequestOptions,\n  RequestResult,\n  ResolvedRequestOptions,\n  ResponseStyle,\n  TDataShape,\n} from './types.gen';\nexport { createConfig, mergeHeaders } from './utils.gen';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/sse-fetch/client/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { Auth } from '../core/auth.gen';\nimport type {\n  ServerSentEventsOptions,\n  ServerSentEventsResult,\n} from '../core/serverSentEvents.gen';\nimport type { Client as CoreClient, Config as CoreConfig } from '../core/types.gen';\nimport type { Middleware } from './utils.gen';\n\nexport type ResponseStyle = 'data' | 'fields';\n\nexport interface Config<T extends ClientOptions = ClientOptions>\n  extends Omit<RequestInit, 'body' | 'headers' | 'method'>, CoreConfig {\n  /**\n   * Base URL for all requests made by this client.\n   */\n  baseUrl?: T['baseUrl'];\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   * Please don't use the Fetch client for Next.js applications. The `next`\n   * options won't have any effect.\n   *\n   * Install {@link https://www.npmjs.com/package/@hey-api/client-next `@hey-api/client-next`} instead.\n   */\n  next?: never;\n  /**\n   * Return the response data parsed in a specified format. By default, `auto`\n   * will infer the appropriate method from the `Content-Type` response header.\n   * You can override this behavior with any of the {@link Body} methods.\n   * Select `stream` if you don't want to parse response data at all.\n   *\n   * @default 'auto'\n   */\n  parseAs?: 'arrayBuffer' | 'auto' | 'blob' | 'formData' | 'json' | 'stream' | 'text';\n  /**\n   * Should we return only data or multiple fields (data, error, response, etc.)?\n   *\n   * @default 'fields'\n   */\n  responseStyle?: ResponseStyle;\n  /**\n   * Throw an error instead of returning it in the response?\n   *\n   * @default false\n   */\n  throwOnError?: T['throwOnError'];\n}\n\nexport interface RequestOptions<\n  TData = unknown,\n  TResponseStyle extends ResponseStyle = 'fields',\n  ThrowOnError extends boolean = boolean,\n  Url extends string = string,\n>\n  extends\n    Config<{\n      responseStyle: TResponseStyle;\n      throwOnError: ThrowOnError;\n    }>,\n    Pick<\n      ServerSentEventsOptions<TData>,\n      | 'onRequest'\n      | 'onSseError'\n      | 'onSseEvent'\n      | 'sseDefaultRetryDelay'\n      | 'sseMaxRetryAttempts'\n      | 'sseMaxRetryDelay'\n    > {\n  /**\n   * Any body that you want to add to your request.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/fetch#body}\n   */\n  body?: unknown;\n  path?: Record<string, unknown>;\n  query?: Record<string, unknown>;\n  /**\n   * Security mechanism(s) to use for the request.\n   */\n  security?: ReadonlyArray<Auth>;\n  url: Url;\n}\n\nexport interface ResolvedRequestOptions<\n  TResponseStyle extends ResponseStyle = 'fields',\n  ThrowOnError extends boolean = boolean,\n  Url extends string = string,\n> extends RequestOptions<unknown, TResponseStyle, ThrowOnError, Url> {\n  serializedBody?: string;\n}\n\nexport type RequestResult<\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = boolean,\n  TResponseStyle extends ResponseStyle = 'fields',\n> = ThrowOnError extends true\n  ? Promise<\n      TResponseStyle extends 'data'\n        ? TData extends Record<string, unknown>\n          ? TData[keyof TData]\n          : TData\n        : {\n            data: TData extends Record<string, unknown> ? TData[keyof TData] : TData;\n            request: Request;\n            response: Response;\n          }\n    >\n  : Promise<\n      TResponseStyle extends 'data'\n        ? (TData extends Record<string, unknown> ? TData[keyof TData] : TData) | undefined\n        : (\n            | {\n                data: TData extends Record<string, unknown> ? TData[keyof TData] : TData;\n                error: undefined;\n              }\n            | {\n                data: undefined;\n                error: TError extends Record<string, unknown> ? TError[keyof TError] : TError;\n              }\n          ) & {\n            request: Request;\n            response: Response;\n          }\n    >;\n\nexport interface ClientOptions {\n  baseUrl?: string;\n  responseStyle?: ResponseStyle;\n  throwOnError?: boolean;\n}\n\ntype MethodFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'>,\n) => RequestResult<TData, TError, ThrowOnError, TResponseStyle>;\n\ntype SseFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'>,\n) => Promise<ServerSentEventsResult<TData, TError>>;\n\ntype RequestFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'> &\n    Pick<Required<RequestOptions<TData, TResponseStyle, ThrowOnError>>, 'method'>,\n) => RequestResult<TData, TError, ThrowOnError, TResponseStyle>;\n\ntype BuildUrlFn = <\n  TData extends {\n    body?: unknown;\n    path?: Record<string, unknown>;\n    query?: Record<string, unknown>;\n    url: string;\n  },\n>(\n  options: TData & Options<TData>,\n) => string;\n\nexport type Client = CoreClient<RequestFn, Config, MethodFn, BuildUrlFn, SseFn> & {\n  interceptors: Middleware<Request, Response, unknown, ResolvedRequestOptions>;\n};\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 = ClientOptions> = (\n  override?: Config<ClientOptions & T>,\n) => Config<Required<ClientOptions> & T>;\n\nexport interface TDataShape {\n  body?: unknown;\n  headers?: unknown;\n  path?: unknown;\n  query?: unknown;\n  url: string;\n}\n\ntype OmitKeys<T, K> = Pick<T, Exclude<keyof T, K>>;\n\nexport type Options<\n  TData extends TDataShape = TDataShape,\n  ThrowOnError extends boolean = boolean,\n  TResponse = unknown,\n  TResponseStyle extends ResponseStyle = 'fields',\n> = OmitKeys<\n  RequestOptions<TResponse, TResponseStyle, ThrowOnError>,\n  'body' | 'path' | 'query' | 'url'\n> &\n  ([TData] extends [never] ? unknown : Omit<TData, 'url'>);\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/sse-fetch/client/utils.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/sse-fetch/client.gen.ts",
    "content": "// 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>());\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/sse-fetch/core/auth.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/sse-fetch/core/bodySerializer.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/sse-fetch/core/params.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/sse-fetch/core/pathSerializer.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/sse-fetch/core/queryKeySerializer.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\n/**\n * JSON-friendly union that mirrors what Pinia Colada can hash.\n */\nexport type JsonValue =\n  | null\n  | string\n  | number\n  | boolean\n  | JsonValue[]\n  | { [key: string]: JsonValue };\n\n/**\n * Replacer that converts non-JSON values (bigint, Date, etc.) to safe substitutes.\n */\nexport const queryKeyJsonReplacer = (_key: string, value: unknown) => {\n  if (value === undefined || typeof value === 'function' || typeof value === 'symbol') {\n    return undefined;\n  }\n  if (typeof value === 'bigint') {\n    return value.toString();\n  }\n  if (value instanceof Date) {\n    return value.toISOString();\n  }\n  return value;\n};\n\n/**\n * Safely stringifies a value and parses it back into a JsonValue.\n */\nexport const stringifyToJsonValue = (input: unknown): JsonValue | undefined => {\n  try {\n    const json = JSON.stringify(input, queryKeyJsonReplacer);\n    if (json === undefined) {\n      return undefined;\n    }\n    return JSON.parse(json) as JsonValue;\n  } catch {\n    return undefined;\n  }\n};\n\n/**\n * Detects plain objects (including objects with a null prototype).\n */\nconst isPlainObject = (value: unknown): value is Record<string, unknown> => {\n  if (value === null || typeof value !== 'object') {\n    return false;\n  }\n  const prototype = Object.getPrototypeOf(value as object);\n  return prototype === Object.prototype || prototype === null;\n};\n\n/**\n * Turns URLSearchParams into a sorted JSON object for deterministic keys.\n */\nconst serializeSearchParams = (params: URLSearchParams): JsonValue => {\n  const entries = Array.from(params.entries()).sort(([a], [b]) => a.localeCompare(b));\n  const result: Record<string, JsonValue> = {};\n\n  for (const [key, value] of entries) {\n    const existing = result[key];\n    if (existing === undefined) {\n      result[key] = value;\n      continue;\n    }\n\n    if (Array.isArray(existing)) {\n      (existing as string[]).push(value);\n    } else {\n      result[key] = [existing, value];\n    }\n  }\n\n  return result;\n};\n\n/**\n * Normalizes any accepted value into a JSON-friendly shape for query keys.\n */\nexport const serializeQueryKeyValue = (value: unknown): JsonValue | undefined => {\n  if (value === null) {\n    return null;\n  }\n\n  if (typeof value === 'string' || typeof value === 'number' || typeof value === 'boolean') {\n    return value;\n  }\n\n  if (value === undefined || typeof value === 'function' || typeof value === 'symbol') {\n    return undefined;\n  }\n\n  if (typeof value === 'bigint') {\n    return value.toString();\n  }\n\n  if (value instanceof Date) {\n    return value.toISOString();\n  }\n\n  if (Array.isArray(value)) {\n    return stringifyToJsonValue(value);\n  }\n\n  if (typeof URLSearchParams !== 'undefined' && value instanceof URLSearchParams) {\n    return serializeSearchParams(value);\n  }\n\n  if (isPlainObject(value)) {\n    return stringifyToJsonValue(value);\n  }\n\n  return undefined;\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/sse-fetch/core/serverSentEvents.gen.ts",
    "content": "// 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 const 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            // Normalize line endings: CRLF -> LF, then CR -> LF\n            buffer = buffer.replace(/\\r\\n/g, '\\n').replace(/\\r/g, '\\n');\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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/sse-fetch/core/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { Auth, AuthToken } from './auth.gen';\nimport type { BodySerializer, QuerySerializer, QuerySerializerOptions } from './bodySerializer.gen';\n\nexport type HttpMethod =\n  | 'connect'\n  | 'delete'\n  | 'get'\n  | 'head'\n  | 'options'\n  | 'patch'\n  | 'post'\n  | 'put'\n  | 'trace';\n\nexport type Client<\n  RequestFn = never,\n  Config = unknown,\n  MethodFn = never,\n  BuildUrlFn = never,\n  SseFn = never,\n> = {\n  /**\n   * Returns the final request URL.\n   */\n  buildUrl: BuildUrlFn;\n  getConfig: () => Config;\n  request: RequestFn;\n  setConfig: (config: Config) => Config;\n} & {\n  [K in HttpMethod]: MethodFn;\n} & ([SseFn] extends [never] ? { sse?: never } : { sse: { [K in HttpMethod]: SseFn } });\n\nexport interface Config {\n  /**\n   * Auth token or a function returning auth token. The resolved value will be\n   * added to the request payload as defined by its `security` array.\n   */\n  auth?: ((auth: Auth) => Promise<AuthToken> | AuthToken) | AuthToken;\n  /**\n   * A function for serializing request body parameter. By default,\n   * {@link JSON.stringify()} will be used.\n   */\n  bodySerializer?: BodySerializer | null;\n  /**\n   * An object containing any HTTP headers that you want to pre-populate your\n   * `Headers` object with.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/Headers/Headers#init See more}\n   */\n  headers?:\n    | RequestInit['headers']\n    | Record<\n        string,\n        string | number | boolean | (string | number | boolean)[] | null | undefined | unknown\n      >;\n  /**\n   * The request method.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/fetch#method See more}\n   */\n  method?: Uppercase<HttpMethod>;\n  /**\n   * A function for serializing request query parameters. By default, arrays\n   * will be exploded in form style, objects will be exploded in deepObject\n   * style, and reserved characters are percent-encoded.\n   *\n   * This method will have no effect if the native `paramsSerializer()` Axios\n   * API function is used.\n   *\n   * {@link https://swagger.io/docs/specification/serialization/#query View examples}\n   */\n  querySerializer?: QuerySerializer | QuerySerializerOptions;\n  /**\n   * A function validating request data. This is useful if you want to ensure\n   * the request conforms to the desired shape, so it can be safely sent to\n   * the server.\n   */\n  requestValidator?: (data: unknown) => Promise<unknown>;\n  /**\n   * A function transforming response data before it's returned. This is useful\n   * for post-processing data, e.g. converting ISO strings into Date objects.\n   */\n  responseTransformer?: (data: unknown) => Promise<unknown>;\n  /**\n   * A function validating response data. This is useful if you want to ensure\n   * the response conforms to the desired shape, so it can be safely passed to\n   * the transformers and returned to the user.\n   */\n  responseValidator?: (data: unknown) => Promise<unknown>;\n}\n\ntype IsExactlyNeverOrNeverUndefined<T> = [T] extends [never]\n  ? true\n  : [T] extends [never | undefined]\n    ? [undefined] extends [T]\n      ? false\n      : true\n    : false;\n\nexport type OmitNever<T extends Record<string, unknown>> = {\n  [K in keyof T as IsExactlyNeverOrNeverUndefined<T[K]> extends true ? never : K]: T[K];\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/sse-fetch/core/utils.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/sse-fetch/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport { eventSubscribe, type Options } from './sdk.gen';\nexport type { AgentPart, ApiError, AssistantMessage, ClientOptions, CompactionPart, Event, EventCommandExecuted, EventFileEdited, EventFileWatcherUpdated, EventGlobalDisposed, EventInstallationUpdateAvailable, EventInstallationUpdated, EventLspClientDiagnostics, EventLspUpdated, EventMcpToolsChanged, EventMessagePartRemoved, EventMessagePartUpdated, EventMessageRemoved, EventMessageUpdated, EventPermissionAsked, EventPermissionReplied, EventProjectUpdated, EventPtyCreated, EventPtyDeleted, EventPtyExited, EventPtyUpdated, EventServerConnected, EventServerInstanceDisposed, EventSessionCompacted, EventSessionCreated, EventSessionDeleted, EventSessionDiff, EventSessionError, EventSessionIdle, EventSessionStatus, EventSessionUpdated, EventSubscribeData, EventSubscribeResponse, EventSubscribeResponses, EventTodoUpdated, EventTuiCommandExecute, EventTuiPromptAppend, EventTuiToastShow, EventVcsBranchUpdated, FileDiff, FilePart, FilePartSource, FilePartSourceText, FileSource, Message, MessageAbortedError, MessageOutputLengthError, Part, PatchPart, PermissionAction, PermissionRequest, PermissionRule, PermissionRuleset, Project, ProviderAuthError, Pty, Range, ReasoningPart, RetryPart, Session, SessionStatus, SnapshotPart, StepFinishPart, StepStartPart, SymbolSource, TextPart, Todo, ToolPart, ToolState, ToolStateCompleted, ToolStateError, ToolStatePending, ToolStateRunning, UnknownError, UserMessage } from './types.gen';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/sse-fetch/sdk.gen.ts",
    "content": "// 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 { EventSubscribeData, EventSubscribeResponses } from './types.gen';\n\nexport type Options<TData extends TDataShape = TDataShape, ThrowOnError extends boolean = boolean> = Options2<TData, ThrowOnError> & {\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 * Subscribe to events\n *\n * Get events\n */\nexport const eventSubscribe = <ThrowOnError extends boolean = false>(options?: Options<EventSubscribeData, ThrowOnError>) => (options?.client ?? client).sse.get<EventSubscribeResponses, unknown, ThrowOnError>({ url: '/event', ...options });\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/sse-fetch/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type ClientOptions = {\n    baseUrl: `${string}://${string}` | (string & {});\n};\n\nexport type PermissionAction = 'allow' | 'deny' | 'ask';\n\nexport type PermissionRule = {\n    permission: string;\n    pattern: string;\n    action: PermissionAction;\n};\n\nexport type PermissionRuleset = Array<PermissionRule>;\n\nexport type Range = {\n    start: {\n        line: number;\n        character: number;\n    };\n    end: {\n        line: number;\n        character: number;\n    };\n};\n\nexport type SymbolSource = {\n    text: FilePartSourceText;\n    type: 'symbol';\n    path: string;\n    range: Range;\n    name: string;\n    kind: number;\n};\n\nexport type FilePartSourceText = {\n    value: string;\n    start: number;\n    end: number;\n};\n\nexport type FileSource = {\n    text: FilePartSourceText;\n    type: 'file';\n    path: string;\n};\n\nexport type FilePartSource = FileSource | SymbolSource;\n\nexport type EventGlobalDisposed = {\n    type: 'global.disposed';\n    properties: {\n        [key: string]: unknown;\n    };\n};\n\nexport type EventServerConnected = {\n    type: 'server.connected';\n    properties: {\n        [key: string]: unknown;\n    };\n};\n\nexport type EventPtyDeleted = {\n    type: 'pty.deleted';\n    properties: {\n        id: string;\n    };\n};\n\nexport type EventPtyExited = {\n    type: 'pty.exited';\n    properties: {\n        id: string;\n        exitCode: number;\n    };\n};\n\nexport type EventPtyUpdated = {\n    type: 'pty.updated';\n    properties: {\n        info: Pty;\n    };\n};\n\nexport type Pty = {\n    id: string;\n    title: string;\n    command: string;\n    args: Array<string>;\n    cwd: string;\n    status: 'running' | 'exited';\n    pid: number;\n};\n\nexport type EventPtyCreated = {\n    type: 'pty.created';\n    properties: {\n        info: Pty;\n    };\n};\n\nexport type EventVcsBranchUpdated = {\n    type: 'vcs.branch.updated';\n    properties: {\n        branch?: string;\n    };\n};\n\nexport type EventFileWatcherUpdated = {\n    type: 'file.watcher.updated';\n    properties: {\n        file: string;\n        event: 'add' | 'change' | 'unlink';\n    };\n};\n\nexport type EventSessionError = {\n    type: 'session.error';\n    properties: {\n        sessionID?: string;\n        error?: ProviderAuthError | UnknownError | MessageOutputLengthError | MessageAbortedError | ApiError;\n    };\n};\n\nexport type ApiError = {\n    name: 'APIError';\n    data: {\n        message: string;\n        statusCode?: number;\n        isRetryable: boolean;\n        responseHeaders?: {\n            [key: string]: string;\n        };\n        responseBody?: string;\n        metadata?: {\n            [key: string]: string;\n        };\n    };\n};\n\nexport type MessageAbortedError = {\n    name: 'MessageAbortedError';\n    data: {\n        message: string;\n    };\n};\n\nexport type MessageOutputLengthError = {\n    name: 'MessageOutputLengthError';\n    data: {\n        [key: string]: unknown;\n    };\n};\n\nexport type UnknownError = {\n    name: 'UnknownError';\n    data: {\n        message: string;\n    };\n};\n\nexport type ProviderAuthError = {\n    name: 'ProviderAuthError';\n    data: {\n        providerID: string;\n        message: string;\n    };\n};\n\nexport type EventSessionDiff = {\n    type: 'session.diff';\n    properties: {\n        sessionID: string;\n        diff: Array<FileDiff>;\n    };\n};\n\nexport type FileDiff = {\n    file: string;\n    before: string;\n    after: string;\n    additions: number;\n    deletions: number;\n};\n\nexport type EventSessionDeleted = {\n    type: 'session.deleted';\n    properties: {\n        info: Session;\n    };\n};\n\nexport type Session = {\n    id: string;\n    projectID: string;\n    directory: string;\n    parentID?: string;\n    summary?: {\n        additions: number;\n        deletions: number;\n        files: number;\n        diffs?: Array<FileDiff>;\n    };\n    share?: {\n        url: string;\n    };\n    title: string;\n    version: string;\n    time: {\n        created: number;\n        updated: number;\n        compacting?: number;\n        archived?: number;\n    };\n    permission?: PermissionRuleset;\n    revert?: {\n        messageID: string;\n        partID?: string;\n        snapshot?: string;\n        diff?: string;\n    };\n};\n\nexport type EventSessionUpdated = {\n    type: 'session.updated';\n    properties: {\n        info: Session;\n    };\n};\n\nexport type EventSessionCreated = {\n    type: 'session.created';\n    properties: {\n        info: Session;\n    };\n};\n\nexport type EventCommandExecuted = {\n    type: 'command.executed';\n    properties: {\n        name: string;\n        sessionID: string;\n        arguments: string;\n        messageID: string;\n    };\n};\n\nexport type EventMcpToolsChanged = {\n    type: 'mcp.tools.changed';\n    properties: {\n        server: string;\n    };\n};\n\nexport type EventTuiToastShow = {\n    type: 'tui.toast.show';\n    properties: {\n        title?: string;\n        message: string;\n        variant: 'info' | 'success' | 'warning' | 'error';\n        /**\n         * Duration in milliseconds\n         */\n        duration?: number;\n    };\n};\n\nexport type EventTuiCommandExecute = {\n    type: 'tui.command.execute';\n    properties: {\n        command: 'session.list' | 'session.new' | 'session.share' | 'session.interrupt' | 'session.compact' | 'session.page.up' | 'session.page.down' | 'session.half.page.up' | 'session.half.page.down' | 'session.first' | 'session.last' | 'prompt.clear' | 'prompt.submit' | 'agent.cycle' | string;\n    };\n};\n\nexport type EventTuiPromptAppend = {\n    type: 'tui.prompt.append';\n    properties: {\n        text: string;\n    };\n};\n\nexport type Todo = {\n    /**\n     * Brief description of the task\n     */\n    content: string;\n    /**\n     * Current status of the task: pending, in_progress, completed, cancelled\n     */\n    status: string;\n    /**\n     * Priority level of the task: high, medium, low\n     */\n    priority: string;\n    /**\n     * Unique identifier for the todo item\n     */\n    id: string;\n};\n\nexport type EventTodoUpdated = {\n    type: 'todo.updated';\n    properties: {\n        sessionID: string;\n        todos: Array<Todo>;\n    };\n};\n\nexport type EventFileEdited = {\n    type: 'file.edited';\n    properties: {\n        file: string;\n    };\n};\n\nexport type EventSessionCompacted = {\n    type: 'session.compacted';\n    properties: {\n        sessionID: string;\n    };\n};\n\nexport type EventSessionIdle = {\n    type: 'session.idle';\n    properties: {\n        sessionID: string;\n    };\n};\n\nexport type SessionStatus = {\n    type: 'idle';\n} | {\n    type: 'retry';\n    attempt: number;\n    message: string;\n    next: number;\n} | {\n    type: 'busy';\n};\n\nexport type EventSessionStatus = {\n    type: 'session.status';\n    properties: {\n        sessionID: string;\n        status: SessionStatus;\n    };\n};\n\nexport type EventPermissionReplied = {\n    type: 'permission.replied';\n    properties: {\n        sessionID: string;\n        requestID: string;\n        reply: 'once' | 'always' | 'reject';\n    };\n};\n\nexport type PermissionRequest = {\n    id: string;\n    sessionID: string;\n    permission: string;\n    patterns: Array<string>;\n    metadata: {\n        [key: string]: unknown;\n    };\n    always: Array<string>;\n    tool?: {\n        messageID: string;\n        callID: string;\n    };\n};\n\nexport type EventPermissionAsked = {\n    type: 'permission.asked';\n    properties: PermissionRequest;\n};\n\nexport type EventMessagePartRemoved = {\n    type: 'message.part.removed';\n    properties: {\n        sessionID: string;\n        messageID: string;\n        partID: string;\n    };\n};\n\nexport type CompactionPart = {\n    id: string;\n    sessionID: string;\n    messageID: string;\n    type: 'compaction';\n    auto: boolean;\n};\n\nexport type RetryPart = {\n    id: string;\n    sessionID: string;\n    messageID: string;\n    type: 'retry';\n    attempt: number;\n    error: ApiError;\n    time: {\n        created: number;\n    };\n};\n\nexport type AgentPart = {\n    id: string;\n    sessionID: string;\n    messageID: string;\n    type: 'agent';\n    name: string;\n    source?: {\n        value: string;\n        start: number;\n        end: number;\n    };\n};\n\nexport type PatchPart = {\n    id: string;\n    sessionID: string;\n    messageID: string;\n    type: 'patch';\n    hash: string;\n    files: Array<string>;\n};\n\nexport type SnapshotPart = {\n    id: string;\n    sessionID: string;\n    messageID: string;\n    type: 'snapshot';\n    snapshot: string;\n};\n\nexport type StepFinishPart = {\n    id: string;\n    sessionID: string;\n    messageID: string;\n    type: 'step-finish';\n    reason: string;\n    snapshot?: string;\n    cost: number;\n    tokens: {\n        input: number;\n        output: number;\n        reasoning: number;\n        cache: {\n            read: number;\n            write: number;\n        };\n    };\n};\n\nexport type StepStartPart = {\n    id: string;\n    sessionID: string;\n    messageID: string;\n    type: 'step-start';\n    snapshot?: string;\n};\n\nexport type ToolStateError = {\n    status: 'error';\n    input: {\n        [key: string]: unknown;\n    };\n    error: string;\n    metadata?: {\n        [key: string]: unknown;\n    };\n    time: {\n        start: number;\n        end: number;\n    };\n};\n\nexport type ToolStateCompleted = {\n    status: 'completed';\n    input: {\n        [key: string]: unknown;\n    };\n    output: string;\n    title: string;\n    metadata: {\n        [key: string]: unknown;\n    };\n    time: {\n        start: number;\n        end: number;\n        compacted?: number;\n    };\n    attachments?: Array<FilePart>;\n};\n\nexport type FilePart = {\n    id: string;\n    sessionID: string;\n    messageID: string;\n    type: 'file';\n    mime: string;\n    filename?: string;\n    url: string;\n    source?: FilePartSource;\n};\n\nexport type ToolStateRunning = {\n    status: 'running';\n    input: {\n        [key: string]: unknown;\n    };\n    title?: string;\n    metadata?: {\n        [key: string]: unknown;\n    };\n    time: {\n        start: number;\n    };\n};\n\nexport type ToolStatePending = {\n    status: 'pending';\n    input: {\n        [key: string]: unknown;\n    };\n    raw: string;\n};\n\nexport type ToolState = ToolStatePending | ToolStateRunning | ToolStateCompleted | ToolStateError;\n\nexport type ToolPart = {\n    id: string;\n    sessionID: string;\n    messageID: string;\n    type: 'tool';\n    callID: string;\n    tool: string;\n    state: ToolState;\n    metadata?: {\n        [key: string]: unknown;\n    };\n};\n\nexport type ReasoningPart = {\n    id: string;\n    sessionID: string;\n    messageID: string;\n    type: 'reasoning';\n    text: string;\n    metadata?: {\n        [key: string]: unknown;\n    };\n    time: {\n        start: number;\n        end?: number;\n    };\n};\n\nexport type TextPart = {\n    id: string;\n    sessionID: string;\n    messageID: string;\n    type: 'text';\n    text: string;\n    synthetic?: boolean;\n    ignored?: boolean;\n    time?: {\n        start: number;\n        end?: number;\n    };\n    metadata?: {\n        [key: string]: unknown;\n    };\n};\n\nexport type Part = TextPart | {\n    id: string;\n    sessionID: string;\n    messageID: string;\n    type: 'subtask';\n    prompt: string;\n    description: string;\n    agent: string;\n    command?: string;\n} | ReasoningPart | FilePart | ToolPart | StepStartPart | StepFinishPart | SnapshotPart | PatchPart | AgentPart | RetryPart | CompactionPart;\n\nexport type EventMessagePartUpdated = {\n    type: 'message.part.updated';\n    properties: {\n        part: Part;\n        delta?: string;\n    };\n};\n\nexport type EventMessageRemoved = {\n    type: 'message.removed';\n    properties: {\n        sessionID: string;\n        messageID: string;\n    };\n};\n\nexport type AssistantMessage = {\n    id: string;\n    sessionID: string;\n    role: 'assistant';\n    time: {\n        created: number;\n        completed?: number;\n    };\n    error?: ProviderAuthError | UnknownError | MessageOutputLengthError | MessageAbortedError | ApiError;\n    parentID: string;\n    modelID: string;\n    providerID: string;\n    mode: string;\n    agent: string;\n    path: {\n        cwd: string;\n        root: string;\n    };\n    summary?: boolean;\n    cost: number;\n    tokens: {\n        input: number;\n        output: number;\n        reasoning: number;\n        cache: {\n            read: number;\n            write: number;\n        };\n    };\n    finish?: string;\n};\n\nexport type UserMessage = {\n    id: string;\n    sessionID: string;\n    role: 'user';\n    time: {\n        created: number;\n    };\n    summary?: {\n        title?: string;\n        body?: string;\n        diffs: Array<FileDiff>;\n    };\n    agent: string;\n    model: {\n        providerID: string;\n        modelID: string;\n    };\n    system?: string;\n    tools?: {\n        [key: string]: boolean;\n    };\n    variant?: string;\n};\n\nexport type Message = UserMessage | AssistantMessage;\n\nexport type EventMessageUpdated = {\n    type: 'message.updated';\n    properties: {\n        info: Message;\n    };\n};\n\nexport type EventLspUpdated = {\n    type: 'lsp.updated';\n    properties: {\n        [key: string]: unknown;\n    };\n};\n\nexport type EventLspClientDiagnostics = {\n    type: 'lsp.client.diagnostics';\n    properties: {\n        serverID: string;\n        path: string;\n    };\n};\n\nexport type EventServerInstanceDisposed = {\n    type: 'server.instance.disposed';\n    properties: {\n        directory: string;\n    };\n};\n\nexport type Project = {\n    id: string;\n    worktree: string;\n    vcs?: 'git';\n    name?: string;\n    icon?: {\n        url?: string;\n        color?: string;\n    };\n    time: {\n        created: number;\n        updated: number;\n        initialized?: number;\n    };\n};\n\nexport type EventProjectUpdated = {\n    type: 'project.updated';\n    properties: Project;\n};\n\nexport type EventInstallationUpdateAvailable = {\n    type: 'installation.update-available';\n    properties: {\n        version: string;\n    };\n};\n\nexport type EventInstallationUpdated = {\n    type: 'installation.updated';\n    properties: {\n        version: string;\n    };\n};\n\nexport type Event = EventInstallationUpdated | EventInstallationUpdateAvailable | EventProjectUpdated | EventServerInstanceDisposed | EventLspClientDiagnostics | EventLspUpdated | EventMessageUpdated | EventMessageRemoved | EventMessagePartUpdated | EventMessagePartRemoved | EventPermissionAsked | EventPermissionReplied | EventSessionStatus | EventSessionIdle | EventSessionCompacted | EventFileEdited | EventTodoUpdated | EventTuiPromptAppend | EventTuiCommandExecute | EventTuiToastShow | EventMcpToolsChanged | EventCommandExecuted | EventSessionCreated | EventSessionUpdated | EventSessionDeleted | EventSessionDiff | EventSessionError | EventFileWatcherUpdated | EventVcsBranchUpdated | EventPtyCreated | EventPtyUpdated | EventPtyExited | EventPtyDeleted | EventServerConnected | EventGlobalDisposed;\n\nexport type EventSubscribeData = {\n    body?: never;\n    path?: never;\n    query?: {\n        directory?: string;\n    };\n    url: '/event';\n};\n\nexport type EventSubscribeResponses = {\n    /**\n     * Event stream\n     */\n    200: Event;\n};\n\nexport type EventSubscribeResponse = EventSubscribeResponses[keyof EventSubscribeResponses];\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/sse-next/client/client.gen.ts",
    "content": "// 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<Response, unknown, ResolvedRequestOptions>();\n\n  const beforeRequest = async (options: RequestOptions) => {\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 url = buildUrl(opts);\n\n    return { opts, url };\n  };\n\n  // @ts-expect-error\n  const request: Client['request'] = async (options) => {\n    // @ts-expect-error\n    const { opts, url } = await beforeRequest(options);\n\n    for (const fn of interceptors.request.fns) {\n      if (fn) {\n        await fn(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    const requestInit: ReqInit = {\n      ...opts,\n      body: getValidRequestBody(opts),\n    };\n\n    let response = await _fetch(url, requestInit);\n\n    for (const fn of interceptors.response.fns) {\n      if (fn) {\n        response = await fn(response, opts);\n      }\n    }\n\n    const result = {\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 {\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 {\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 {\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, opts)) as string;\n      }\n    }\n\n    finalError = finalError || ({} as string);\n\n    if (opts.throwOnError) {\n      throw finalError;\n    }\n\n    return {\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        const requestInit = {\n          ...init,\n          method: init.method as Config['method'],\n          url,\n        };\n        for (const fn of interceptors.request.fns) {\n          if (fn) {\n            await fn(requestInit);\n            request = new Request(requestInit.url, requestInit);\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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/sse-next/client/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type { Auth } from '../core/auth.gen';\nexport type { QuerySerializerOptions } from '../core/bodySerializer.gen';\nexport {\n  formDataBodySerializer,\n  jsonBodySerializer,\n  urlSearchParamsBodySerializer,\n} from '../core/bodySerializer.gen';\nexport { buildClientParams } from '../core/params.gen';\nexport { serializeQueryKeyValue } from '../core/queryKeySerializer.gen';\nexport { createClient } from './client.gen';\nexport type {\n  Client,\n  ClientOptions,\n  Config,\n  CreateClientConfig,\n  Options,\n  RequestOptions,\n  RequestResult,\n  TDataShape,\n} from './types.gen';\nexport { createConfig } from './utils.gen';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/sse-next/client/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { Auth } from '../core/auth.gen';\nimport type {\n  ServerSentEventsOptions,\n  ServerSentEventsResult,\n} from '../core/serverSentEvents.gen';\nimport type { Client as CoreClient, Config as CoreConfig } from '../core/types.gen';\nimport type { Middleware } from './utils.gen';\n\nexport interface Config<T extends ClientOptions = ClientOptions>\n  extends Omit<RequestInit, 'body' | 'headers' | 'method'>, CoreConfig {\n  /**\n   * Base URL for all requests made by this client.\n   */\n  baseUrl?: T['baseUrl'];\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   * Return the response data parsed in a specified format. By default, `auto`\n   * will infer the appropriate method from the `Content-Type` response header.\n   * You can override this behavior with any of the {@link Body} methods.\n   * Select `stream` if you don't want to parse response data at all.\n   *\n   * @default 'auto'\n   */\n  parseAs?: 'arrayBuffer' | 'auto' | 'blob' | 'formData' | 'json' | 'stream' | 'text';\n  /**\n   * Throw an error instead of returning it in the response?\n   *\n   * @default false\n   */\n  throwOnError?: T['throwOnError'];\n}\n\nexport interface RequestOptions<\n  TData = unknown,\n  ThrowOnError extends boolean = boolean,\n  Url extends string = string,\n>\n  extends\n    Config<{\n      throwOnError: ThrowOnError;\n    }>,\n    Pick<\n      ServerSentEventsOptions<TData>,\n      | 'onRequest'\n      | 'onSseError'\n      | 'onSseEvent'\n      | 'sseDefaultRetryDelay'\n      | 'sseMaxRetryAttempts'\n      | 'sseMaxRetryDelay'\n    > {\n  /**\n   * Any body that you want to add to your request.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/fetch#body}\n   */\n  body?: unknown;\n  path?: Record<string, unknown>;\n  query?: Record<string, unknown>;\n  /**\n   * Security mechanism(s) to use for the request.\n   */\n  security?: ReadonlyArray<Auth>;\n  url: Url;\n}\n\nexport interface ResolvedRequestOptions<\n  ThrowOnError extends boolean = boolean,\n  Url extends string = string,\n> extends RequestOptions<unknown, ThrowOnError, Url> {\n  serializedBody?: string;\n}\n\nexport type RequestResult<\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = boolean,\n> = ThrowOnError extends true\n  ? Promise<{\n      data: TData extends Record<string, unknown> ? TData[keyof TData] : TData;\n      response: Response;\n    }>\n  : Promise<\n      (\n        | {\n            data: TData extends Record<string, unknown> ? TData[keyof TData] : TData;\n            error: undefined;\n          }\n        | {\n            data: undefined;\n            error: TError extends Record<string, unknown> ? TError[keyof TError] : TError;\n          }\n      ) & {\n        response: Response;\n      }\n    >;\n\nexport interface ClientOptions {\n  baseUrl?: string;\n  throwOnError?: boolean;\n}\n\ntype MethodFn = <TData = unknown, TError = unknown, ThrowOnError extends boolean = false>(\n  options: Omit<RequestOptions<TData, ThrowOnError>, 'method'>,\n) => RequestResult<TData, TError, ThrowOnError>;\n\ntype SseFn = <TData = unknown, TError = unknown, ThrowOnError extends boolean = false>(\n  options: Omit<RequestOptions<TData, ThrowOnError>, 'method'>,\n) => Promise<ServerSentEventsResult<TData, TError>>;\n\ntype RequestFn = <TData = unknown, TError = unknown, ThrowOnError extends boolean = false>(\n  options: Omit<RequestOptions<TData, ThrowOnError>, 'method'> &\n    Pick<Required<RequestOptions<TData, ThrowOnError>>, 'method'>,\n) => RequestResult<TData, TError, ThrowOnError>;\n\ntype BuildUrlFn = <\n  TData extends {\n    body?: unknown;\n    path?: Record<string, unknown>;\n    query?: Record<string, unknown>;\n    url: string;\n  },\n>(\n  options: TData & Options<TData>,\n) => string;\n\nexport type Client = CoreClient<RequestFn, Config, MethodFn, BuildUrlFn, SseFn> & {\n  interceptors: Middleware<Response, unknown, ResolvedRequestOptions>;\n};\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 = ClientOptions> = (\n  override?: Config<ClientOptions & T>,\n) => Config<Required<ClientOptions> & T>;\n\nexport interface TDataShape {\n  body?: unknown;\n  headers?: unknown;\n  path?: unknown;\n  query?: unknown;\n  url: string;\n}\n\ntype OmitKeys<T, K> = Pick<T, Exclude<keyof T, K>>;\n\nexport type Options<\n  TData extends TDataShape = TDataShape,\n  ThrowOnError extends boolean = boolean,\n  TResponse = unknown,\n> = OmitKeys<RequestOptions<TResponse, ThrowOnError>, 'body' | 'path' | 'query' | 'url'> &\n  ([TData] extends [never] ? unknown : Omit<TData, 'url'>);\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/sse-next/client/utils.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport { getAuthToken } from '../core/auth.gen';\nimport type {\n  QuerySerializer,\n  QuerySerializerOptions,\n} from '../core/bodySerializer.gen';\nimport { jsonBodySerializer } from '../core/bodySerializer.gen';\nimport {\n  serializeArrayParam,\n  serializeObjectParam,\n  serializePrimitiveParam,\n} from '../core/pathSerializer.gen';\nimport type { Client, ClientOptions, Config, RequestOptions } from './types.gen';\n\ninterface PathSerializer {\n  path: Record<string, unknown>;\n  url: string;\n}\n\nconst PATH_PARAM_RE = /\\{[^{}]+\\}/g;\n\ntype ArrayStyle = 'form' | 'spaceDelimited' | 'pipeDelimited';\ntype MatrixStyle = 'label' | 'matrix' | 'simple';\ntype ArraySeparatorStyle = ArrayStyle | MatrixStyle;\n\nconst 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 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    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  const url = 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  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 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 || typeof header !== 'object') {\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, Options> = (\n  error: Err,\n  response: Res,\n  options: Options,\n) => Err | Promise<Err>;\n\ntype ReqInterceptor<Options> = (options: Options) => void | Promise<void>;\n\ntype ResInterceptor<Res, Options> = (response: Res, options: Options) => 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<Res, Err, Options> {\n  error: Interceptors<ErrInterceptor<Err, Res, Options>>;\n  request: Interceptors<ReqInterceptor<Options>>;\n  response: Interceptors<ResInterceptor<Res, Options>>;\n}\n\nexport const createInterceptors = <Res, Err, Options>(): Middleware<Res, Err, Options> => ({\n  error: new Interceptors<ErrInterceptor<Err, Res, Options>>(),\n  request: new Interceptors<ReqInterceptor<Options>>(),\n  response: new Interceptors<ResInterceptor<Res, 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/sse-next/client.gen.ts",
    "content": "// 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>());\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/sse-next/core/auth.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/sse-next/core/bodySerializer.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/sse-next/core/params.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/sse-next/core/pathSerializer.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/sse-next/core/queryKeySerializer.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\n/**\n * JSON-friendly union that mirrors what Pinia Colada can hash.\n */\nexport type JsonValue =\n  | null\n  | string\n  | number\n  | boolean\n  | JsonValue[]\n  | { [key: string]: JsonValue };\n\n/**\n * Replacer that converts non-JSON values (bigint, Date, etc.) to safe substitutes.\n */\nexport const queryKeyJsonReplacer = (_key: string, value: unknown) => {\n  if (value === undefined || typeof value === 'function' || typeof value === 'symbol') {\n    return undefined;\n  }\n  if (typeof value === 'bigint') {\n    return value.toString();\n  }\n  if (value instanceof Date) {\n    return value.toISOString();\n  }\n  return value;\n};\n\n/**\n * Safely stringifies a value and parses it back into a JsonValue.\n */\nexport const stringifyToJsonValue = (input: unknown): JsonValue | undefined => {\n  try {\n    const json = JSON.stringify(input, queryKeyJsonReplacer);\n    if (json === undefined) {\n      return undefined;\n    }\n    return JSON.parse(json) as JsonValue;\n  } catch {\n    return undefined;\n  }\n};\n\n/**\n * Detects plain objects (including objects with a null prototype).\n */\nconst isPlainObject = (value: unknown): value is Record<string, unknown> => {\n  if (value === null || typeof value !== 'object') {\n    return false;\n  }\n  const prototype = Object.getPrototypeOf(value as object);\n  return prototype === Object.prototype || prototype === null;\n};\n\n/**\n * Turns URLSearchParams into a sorted JSON object for deterministic keys.\n */\nconst serializeSearchParams = (params: URLSearchParams): JsonValue => {\n  const entries = Array.from(params.entries()).sort(([a], [b]) => a.localeCompare(b));\n  const result: Record<string, JsonValue> = {};\n\n  for (const [key, value] of entries) {\n    const existing = result[key];\n    if (existing === undefined) {\n      result[key] = value;\n      continue;\n    }\n\n    if (Array.isArray(existing)) {\n      (existing as string[]).push(value);\n    } else {\n      result[key] = [existing, value];\n    }\n  }\n\n  return result;\n};\n\n/**\n * Normalizes any accepted value into a JSON-friendly shape for query keys.\n */\nexport const serializeQueryKeyValue = (value: unknown): JsonValue | undefined => {\n  if (value === null) {\n    return null;\n  }\n\n  if (typeof value === 'string' || typeof value === 'number' || typeof value === 'boolean') {\n    return value;\n  }\n\n  if (value === undefined || typeof value === 'function' || typeof value === 'symbol') {\n    return undefined;\n  }\n\n  if (typeof value === 'bigint') {\n    return value.toString();\n  }\n\n  if (value instanceof Date) {\n    return value.toISOString();\n  }\n\n  if (Array.isArray(value)) {\n    return stringifyToJsonValue(value);\n  }\n\n  if (typeof URLSearchParams !== 'undefined' && value instanceof URLSearchParams) {\n    return serializeSearchParams(value);\n  }\n\n  if (isPlainObject(value)) {\n    return stringifyToJsonValue(value);\n  }\n\n  return undefined;\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/sse-next/core/serverSentEvents.gen.ts",
    "content": "// 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 const 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            // Normalize line endings: CRLF -> LF, then CR -> LF\n            buffer = buffer.replace(/\\r\\n/g, '\\n').replace(/\\r/g, '\\n');\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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/sse-next/core/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { Auth, AuthToken } from './auth.gen';\nimport type { BodySerializer, QuerySerializer, QuerySerializerOptions } from './bodySerializer.gen';\n\nexport type HttpMethod =\n  | 'connect'\n  | 'delete'\n  | 'get'\n  | 'head'\n  | 'options'\n  | 'patch'\n  | 'post'\n  | 'put'\n  | 'trace';\n\nexport type Client<\n  RequestFn = never,\n  Config = unknown,\n  MethodFn = never,\n  BuildUrlFn = never,\n  SseFn = never,\n> = {\n  /**\n   * Returns the final request URL.\n   */\n  buildUrl: BuildUrlFn;\n  getConfig: () => Config;\n  request: RequestFn;\n  setConfig: (config: Config) => Config;\n} & {\n  [K in HttpMethod]: MethodFn;\n} & ([SseFn] extends [never] ? { sse?: never } : { sse: { [K in HttpMethod]: SseFn } });\n\nexport interface Config {\n  /**\n   * Auth token or a function returning auth token. The resolved value will be\n   * added to the request payload as defined by its `security` array.\n   */\n  auth?: ((auth: Auth) => Promise<AuthToken> | AuthToken) | AuthToken;\n  /**\n   * A function for serializing request body parameter. By default,\n   * {@link JSON.stringify()} will be used.\n   */\n  bodySerializer?: BodySerializer | null;\n  /**\n   * An object containing any HTTP headers that you want to pre-populate your\n   * `Headers` object with.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/Headers/Headers#init See more}\n   */\n  headers?:\n    | RequestInit['headers']\n    | Record<\n        string,\n        string | number | boolean | (string | number | boolean)[] | null | undefined | unknown\n      >;\n  /**\n   * The request method.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/fetch#method See more}\n   */\n  method?: Uppercase<HttpMethod>;\n  /**\n   * A function for serializing request query parameters. By default, arrays\n   * will be exploded in form style, objects will be exploded in deepObject\n   * style, and reserved characters are percent-encoded.\n   *\n   * This method will have no effect if the native `paramsSerializer()` Axios\n   * API function is used.\n   *\n   * {@link https://swagger.io/docs/specification/serialization/#query View examples}\n   */\n  querySerializer?: QuerySerializer | QuerySerializerOptions;\n  /**\n   * A function validating request data. This is useful if you want to ensure\n   * the request conforms to the desired shape, so it can be safely sent to\n   * the server.\n   */\n  requestValidator?: (data: unknown) => Promise<unknown>;\n  /**\n   * A function transforming response data before it's returned. This is useful\n   * for post-processing data, e.g. converting ISO strings into Date objects.\n   */\n  responseTransformer?: (data: unknown) => Promise<unknown>;\n  /**\n   * A function validating response data. This is useful if you want to ensure\n   * the response conforms to the desired shape, so it can be safely passed to\n   * the transformers and returned to the user.\n   */\n  responseValidator?: (data: unknown) => Promise<unknown>;\n}\n\ntype IsExactlyNeverOrNeverUndefined<T> = [T] extends [never]\n  ? true\n  : [T] extends [never | undefined]\n    ? [undefined] extends [T]\n      ? false\n      : true\n    : false;\n\nexport type OmitNever<T extends Record<string, unknown>> = {\n  [K in keyof T as IsExactlyNeverOrNeverUndefined<T[K]> extends true ? never : K]: T[K];\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/sse-next/core/utils.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/sse-next/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport { eventSubscribe, type Options } from './sdk.gen';\nexport type { AgentPart, ApiError, AssistantMessage, ClientOptions, CompactionPart, Event, EventCommandExecuted, EventFileEdited, EventFileWatcherUpdated, EventGlobalDisposed, EventInstallationUpdateAvailable, EventInstallationUpdated, EventLspClientDiagnostics, EventLspUpdated, EventMcpToolsChanged, EventMessagePartRemoved, EventMessagePartUpdated, EventMessageRemoved, EventMessageUpdated, EventPermissionAsked, EventPermissionReplied, EventProjectUpdated, EventPtyCreated, EventPtyDeleted, EventPtyExited, EventPtyUpdated, EventServerConnected, EventServerInstanceDisposed, EventSessionCompacted, EventSessionCreated, EventSessionDeleted, EventSessionDiff, EventSessionError, EventSessionIdle, EventSessionStatus, EventSessionUpdated, EventSubscribeData, EventSubscribeResponse, EventSubscribeResponses, EventTodoUpdated, EventTuiCommandExecute, EventTuiPromptAppend, EventTuiToastShow, EventVcsBranchUpdated, FileDiff, FilePart, FilePartSource, FilePartSourceText, FileSource, Message, MessageAbortedError, MessageOutputLengthError, Part, PatchPart, PermissionAction, PermissionRequest, PermissionRule, PermissionRuleset, Project, ProviderAuthError, Pty, Range, ReasoningPart, RetryPart, Session, SessionStatus, SnapshotPart, StepFinishPart, StepStartPart, SymbolSource, TextPart, Todo, ToolPart, ToolState, ToolStateCompleted, ToolStateError, ToolStatePending, ToolStateRunning, UnknownError, UserMessage } from './types.gen';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/sse-next/sdk.gen.ts",
    "content": "// 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 { EventSubscribeData, EventSubscribeResponses } from './types.gen';\n\nexport type Options<TData extends TDataShape = TDataShape, ThrowOnError extends boolean = boolean> = Options2<TData, ThrowOnError> & {\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 * Subscribe to events\n *\n * Get events\n */\nexport const eventSubscribe = <ThrowOnError extends boolean = false>(options?: Options<EventSubscribeData, ThrowOnError>) => (options?.client ?? client).sse.get<EventSubscribeResponses, unknown, ThrowOnError>({ url: '/event', ...options });\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/sse-next/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type ClientOptions = {\n    baseUrl: `${string}://${string}` | (string & {});\n};\n\nexport type PermissionAction = 'allow' | 'deny' | 'ask';\n\nexport type PermissionRule = {\n    permission: string;\n    pattern: string;\n    action: PermissionAction;\n};\n\nexport type PermissionRuleset = Array<PermissionRule>;\n\nexport type Range = {\n    start: {\n        line: number;\n        character: number;\n    };\n    end: {\n        line: number;\n        character: number;\n    };\n};\n\nexport type SymbolSource = {\n    text: FilePartSourceText;\n    type: 'symbol';\n    path: string;\n    range: Range;\n    name: string;\n    kind: number;\n};\n\nexport type FilePartSourceText = {\n    value: string;\n    start: number;\n    end: number;\n};\n\nexport type FileSource = {\n    text: FilePartSourceText;\n    type: 'file';\n    path: string;\n};\n\nexport type FilePartSource = FileSource | SymbolSource;\n\nexport type EventGlobalDisposed = {\n    type: 'global.disposed';\n    properties: {\n        [key: string]: unknown;\n    };\n};\n\nexport type EventServerConnected = {\n    type: 'server.connected';\n    properties: {\n        [key: string]: unknown;\n    };\n};\n\nexport type EventPtyDeleted = {\n    type: 'pty.deleted';\n    properties: {\n        id: string;\n    };\n};\n\nexport type EventPtyExited = {\n    type: 'pty.exited';\n    properties: {\n        id: string;\n        exitCode: number;\n    };\n};\n\nexport type EventPtyUpdated = {\n    type: 'pty.updated';\n    properties: {\n        info: Pty;\n    };\n};\n\nexport type Pty = {\n    id: string;\n    title: string;\n    command: string;\n    args: Array<string>;\n    cwd: string;\n    status: 'running' | 'exited';\n    pid: number;\n};\n\nexport type EventPtyCreated = {\n    type: 'pty.created';\n    properties: {\n        info: Pty;\n    };\n};\n\nexport type EventVcsBranchUpdated = {\n    type: 'vcs.branch.updated';\n    properties: {\n        branch?: string;\n    };\n};\n\nexport type EventFileWatcherUpdated = {\n    type: 'file.watcher.updated';\n    properties: {\n        file: string;\n        event: 'add' | 'change' | 'unlink';\n    };\n};\n\nexport type EventSessionError = {\n    type: 'session.error';\n    properties: {\n        sessionID?: string;\n        error?: ProviderAuthError | UnknownError | MessageOutputLengthError | MessageAbortedError | ApiError;\n    };\n};\n\nexport type ApiError = {\n    name: 'APIError';\n    data: {\n        message: string;\n        statusCode?: number;\n        isRetryable: boolean;\n        responseHeaders?: {\n            [key: string]: string;\n        };\n        responseBody?: string;\n        metadata?: {\n            [key: string]: string;\n        };\n    };\n};\n\nexport type MessageAbortedError = {\n    name: 'MessageAbortedError';\n    data: {\n        message: string;\n    };\n};\n\nexport type MessageOutputLengthError = {\n    name: 'MessageOutputLengthError';\n    data: {\n        [key: string]: unknown;\n    };\n};\n\nexport type UnknownError = {\n    name: 'UnknownError';\n    data: {\n        message: string;\n    };\n};\n\nexport type ProviderAuthError = {\n    name: 'ProviderAuthError';\n    data: {\n        providerID: string;\n        message: string;\n    };\n};\n\nexport type EventSessionDiff = {\n    type: 'session.diff';\n    properties: {\n        sessionID: string;\n        diff: Array<FileDiff>;\n    };\n};\n\nexport type FileDiff = {\n    file: string;\n    before: string;\n    after: string;\n    additions: number;\n    deletions: number;\n};\n\nexport type EventSessionDeleted = {\n    type: 'session.deleted';\n    properties: {\n        info: Session;\n    };\n};\n\nexport type Session = {\n    id: string;\n    projectID: string;\n    directory: string;\n    parentID?: string;\n    summary?: {\n        additions: number;\n        deletions: number;\n        files: number;\n        diffs?: Array<FileDiff>;\n    };\n    share?: {\n        url: string;\n    };\n    title: string;\n    version: string;\n    time: {\n        created: number;\n        updated: number;\n        compacting?: number;\n        archived?: number;\n    };\n    permission?: PermissionRuleset;\n    revert?: {\n        messageID: string;\n        partID?: string;\n        snapshot?: string;\n        diff?: string;\n    };\n};\n\nexport type EventSessionUpdated = {\n    type: 'session.updated';\n    properties: {\n        info: Session;\n    };\n};\n\nexport type EventSessionCreated = {\n    type: 'session.created';\n    properties: {\n        info: Session;\n    };\n};\n\nexport type EventCommandExecuted = {\n    type: 'command.executed';\n    properties: {\n        name: string;\n        sessionID: string;\n        arguments: string;\n        messageID: string;\n    };\n};\n\nexport type EventMcpToolsChanged = {\n    type: 'mcp.tools.changed';\n    properties: {\n        server: string;\n    };\n};\n\nexport type EventTuiToastShow = {\n    type: 'tui.toast.show';\n    properties: {\n        title?: string;\n        message: string;\n        variant: 'info' | 'success' | 'warning' | 'error';\n        /**\n         * Duration in milliseconds\n         */\n        duration?: number;\n    };\n};\n\nexport type EventTuiCommandExecute = {\n    type: 'tui.command.execute';\n    properties: {\n        command: 'session.list' | 'session.new' | 'session.share' | 'session.interrupt' | 'session.compact' | 'session.page.up' | 'session.page.down' | 'session.half.page.up' | 'session.half.page.down' | 'session.first' | 'session.last' | 'prompt.clear' | 'prompt.submit' | 'agent.cycle' | string;\n    };\n};\n\nexport type EventTuiPromptAppend = {\n    type: 'tui.prompt.append';\n    properties: {\n        text: string;\n    };\n};\n\nexport type Todo = {\n    /**\n     * Brief description of the task\n     */\n    content: string;\n    /**\n     * Current status of the task: pending, in_progress, completed, cancelled\n     */\n    status: string;\n    /**\n     * Priority level of the task: high, medium, low\n     */\n    priority: string;\n    /**\n     * Unique identifier for the todo item\n     */\n    id: string;\n};\n\nexport type EventTodoUpdated = {\n    type: 'todo.updated';\n    properties: {\n        sessionID: string;\n        todos: Array<Todo>;\n    };\n};\n\nexport type EventFileEdited = {\n    type: 'file.edited';\n    properties: {\n        file: string;\n    };\n};\n\nexport type EventSessionCompacted = {\n    type: 'session.compacted';\n    properties: {\n        sessionID: string;\n    };\n};\n\nexport type EventSessionIdle = {\n    type: 'session.idle';\n    properties: {\n        sessionID: string;\n    };\n};\n\nexport type SessionStatus = {\n    type: 'idle';\n} | {\n    type: 'retry';\n    attempt: number;\n    message: string;\n    next: number;\n} | {\n    type: 'busy';\n};\n\nexport type EventSessionStatus = {\n    type: 'session.status';\n    properties: {\n        sessionID: string;\n        status: SessionStatus;\n    };\n};\n\nexport type EventPermissionReplied = {\n    type: 'permission.replied';\n    properties: {\n        sessionID: string;\n        requestID: string;\n        reply: 'once' | 'always' | 'reject';\n    };\n};\n\nexport type PermissionRequest = {\n    id: string;\n    sessionID: string;\n    permission: string;\n    patterns: Array<string>;\n    metadata: {\n        [key: string]: unknown;\n    };\n    always: Array<string>;\n    tool?: {\n        messageID: string;\n        callID: string;\n    };\n};\n\nexport type EventPermissionAsked = {\n    type: 'permission.asked';\n    properties: PermissionRequest;\n};\n\nexport type EventMessagePartRemoved = {\n    type: 'message.part.removed';\n    properties: {\n        sessionID: string;\n        messageID: string;\n        partID: string;\n    };\n};\n\nexport type CompactionPart = {\n    id: string;\n    sessionID: string;\n    messageID: string;\n    type: 'compaction';\n    auto: boolean;\n};\n\nexport type RetryPart = {\n    id: string;\n    sessionID: string;\n    messageID: string;\n    type: 'retry';\n    attempt: number;\n    error: ApiError;\n    time: {\n        created: number;\n    };\n};\n\nexport type AgentPart = {\n    id: string;\n    sessionID: string;\n    messageID: string;\n    type: 'agent';\n    name: string;\n    source?: {\n        value: string;\n        start: number;\n        end: number;\n    };\n};\n\nexport type PatchPart = {\n    id: string;\n    sessionID: string;\n    messageID: string;\n    type: 'patch';\n    hash: string;\n    files: Array<string>;\n};\n\nexport type SnapshotPart = {\n    id: string;\n    sessionID: string;\n    messageID: string;\n    type: 'snapshot';\n    snapshot: string;\n};\n\nexport type StepFinishPart = {\n    id: string;\n    sessionID: string;\n    messageID: string;\n    type: 'step-finish';\n    reason: string;\n    snapshot?: string;\n    cost: number;\n    tokens: {\n        input: number;\n        output: number;\n        reasoning: number;\n        cache: {\n            read: number;\n            write: number;\n        };\n    };\n};\n\nexport type StepStartPart = {\n    id: string;\n    sessionID: string;\n    messageID: string;\n    type: 'step-start';\n    snapshot?: string;\n};\n\nexport type ToolStateError = {\n    status: 'error';\n    input: {\n        [key: string]: unknown;\n    };\n    error: string;\n    metadata?: {\n        [key: string]: unknown;\n    };\n    time: {\n        start: number;\n        end: number;\n    };\n};\n\nexport type ToolStateCompleted = {\n    status: 'completed';\n    input: {\n        [key: string]: unknown;\n    };\n    output: string;\n    title: string;\n    metadata: {\n        [key: string]: unknown;\n    };\n    time: {\n        start: number;\n        end: number;\n        compacted?: number;\n    };\n    attachments?: Array<FilePart>;\n};\n\nexport type FilePart = {\n    id: string;\n    sessionID: string;\n    messageID: string;\n    type: 'file';\n    mime: string;\n    filename?: string;\n    url: string;\n    source?: FilePartSource;\n};\n\nexport type ToolStateRunning = {\n    status: 'running';\n    input: {\n        [key: string]: unknown;\n    };\n    title?: string;\n    metadata?: {\n        [key: string]: unknown;\n    };\n    time: {\n        start: number;\n    };\n};\n\nexport type ToolStatePending = {\n    status: 'pending';\n    input: {\n        [key: string]: unknown;\n    };\n    raw: string;\n};\n\nexport type ToolState = ToolStatePending | ToolStateRunning | ToolStateCompleted | ToolStateError;\n\nexport type ToolPart = {\n    id: string;\n    sessionID: string;\n    messageID: string;\n    type: 'tool';\n    callID: string;\n    tool: string;\n    state: ToolState;\n    metadata?: {\n        [key: string]: unknown;\n    };\n};\n\nexport type ReasoningPart = {\n    id: string;\n    sessionID: string;\n    messageID: string;\n    type: 'reasoning';\n    text: string;\n    metadata?: {\n        [key: string]: unknown;\n    };\n    time: {\n        start: number;\n        end?: number;\n    };\n};\n\nexport type TextPart = {\n    id: string;\n    sessionID: string;\n    messageID: string;\n    type: 'text';\n    text: string;\n    synthetic?: boolean;\n    ignored?: boolean;\n    time?: {\n        start: number;\n        end?: number;\n    };\n    metadata?: {\n        [key: string]: unknown;\n    };\n};\n\nexport type Part = TextPart | {\n    id: string;\n    sessionID: string;\n    messageID: string;\n    type: 'subtask';\n    prompt: string;\n    description: string;\n    agent: string;\n    command?: string;\n} | ReasoningPart | FilePart | ToolPart | StepStartPart | StepFinishPart | SnapshotPart | PatchPart | AgentPart | RetryPart | CompactionPart;\n\nexport type EventMessagePartUpdated = {\n    type: 'message.part.updated';\n    properties: {\n        part: Part;\n        delta?: string;\n    };\n};\n\nexport type EventMessageRemoved = {\n    type: 'message.removed';\n    properties: {\n        sessionID: string;\n        messageID: string;\n    };\n};\n\nexport type AssistantMessage = {\n    id: string;\n    sessionID: string;\n    role: 'assistant';\n    time: {\n        created: number;\n        completed?: number;\n    };\n    error?: ProviderAuthError | UnknownError | MessageOutputLengthError | MessageAbortedError | ApiError;\n    parentID: string;\n    modelID: string;\n    providerID: string;\n    mode: string;\n    agent: string;\n    path: {\n        cwd: string;\n        root: string;\n    };\n    summary?: boolean;\n    cost: number;\n    tokens: {\n        input: number;\n        output: number;\n        reasoning: number;\n        cache: {\n            read: number;\n            write: number;\n        };\n    };\n    finish?: string;\n};\n\nexport type UserMessage = {\n    id: string;\n    sessionID: string;\n    role: 'user';\n    time: {\n        created: number;\n    };\n    summary?: {\n        title?: string;\n        body?: string;\n        diffs: Array<FileDiff>;\n    };\n    agent: string;\n    model: {\n        providerID: string;\n        modelID: string;\n    };\n    system?: string;\n    tools?: {\n        [key: string]: boolean;\n    };\n    variant?: string;\n};\n\nexport type Message = UserMessage | AssistantMessage;\n\nexport type EventMessageUpdated = {\n    type: 'message.updated';\n    properties: {\n        info: Message;\n    };\n};\n\nexport type EventLspUpdated = {\n    type: 'lsp.updated';\n    properties: {\n        [key: string]: unknown;\n    };\n};\n\nexport type EventLspClientDiagnostics = {\n    type: 'lsp.client.diagnostics';\n    properties: {\n        serverID: string;\n        path: string;\n    };\n};\n\nexport type EventServerInstanceDisposed = {\n    type: 'server.instance.disposed';\n    properties: {\n        directory: string;\n    };\n};\n\nexport type Project = {\n    id: string;\n    worktree: string;\n    vcs?: 'git';\n    name?: string;\n    icon?: {\n        url?: string;\n        color?: string;\n    };\n    time: {\n        created: number;\n        updated: number;\n        initialized?: number;\n    };\n};\n\nexport type EventProjectUpdated = {\n    type: 'project.updated';\n    properties: Project;\n};\n\nexport type EventInstallationUpdateAvailable = {\n    type: 'installation.update-available';\n    properties: {\n        version: string;\n    };\n};\n\nexport type EventInstallationUpdated = {\n    type: 'installation.updated';\n    properties: {\n        version: string;\n    };\n};\n\nexport type Event = EventInstallationUpdated | EventInstallationUpdateAvailable | EventProjectUpdated | EventServerInstanceDisposed | EventLspClientDiagnostics | EventLspUpdated | EventMessageUpdated | EventMessageRemoved | EventMessagePartUpdated | EventMessagePartRemoved | EventPermissionAsked | EventPermissionReplied | EventSessionStatus | EventSessionIdle | EventSessionCompacted | EventFileEdited | EventTodoUpdated | EventTuiPromptAppend | EventTuiCommandExecute | EventTuiToastShow | EventMcpToolsChanged | EventCommandExecuted | EventSessionCreated | EventSessionUpdated | EventSessionDeleted | EventSessionDiff | EventSessionError | EventFileWatcherUpdated | EventVcsBranchUpdated | EventPtyCreated | EventPtyUpdated | EventPtyExited | EventPtyDeleted | EventServerConnected | EventGlobalDisposed;\n\nexport type EventSubscribeData = {\n    body?: never;\n    path?: never;\n    query?: {\n        directory?: string;\n    };\n    url: '/event';\n};\n\nexport type EventSubscribeResponses = {\n    /**\n     * Event stream\n     */\n    200: Event;\n};\n\nexport type EventSubscribeResponse = EventSubscribeResponses[keyof EventSubscribeResponses];\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/sse-nuxt/client/client.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport { useAsyncData, useFetch, useLazyAsyncData, useLazyFetch } from 'nuxt/app';\nimport { reactive, ref, toValue, watch } from 'vue';\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 } from './types.gen';\nimport {\n  buildUrl,\n  createConfig,\n  executeFetchFn,\n  mergeConfigs,\n  mergeHeaders,\n  mergeInterceptors,\n  serializeBody,\n  setAuthParams,\n  unwrapRefs,\n} from './utils.gen';\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 beforeRequest = async (options: RequestOptions) => {\n    const opts = {\n      ..._config,\n      ...options,\n      $fetch: options.$fetch ?? _config.$fetch ?? $fetch,\n      headers: mergeHeaders(_config.headers, options.headers),\n      onRequest: mergeInterceptors(_config.onRequest, options.onRequest),\n      onResponse: mergeInterceptors(_config.onResponse, options.onResponse),\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    const url = buildUrl(opts);\n\n    return { opts, url };\n  };\n\n  const request: Client['request'] = ({ asyncDataOptions, composable = '$fetch', ...options }) => {\n    const key = options.key;\n    const opts = {\n      ..._config,\n      ...options,\n      $fetch: options.$fetch ?? _config.$fetch ?? $fetch,\n      headers: mergeHeaders(_config.headers, options.headers),\n      onRequest: mergeInterceptors(_config.onRequest, options.onRequest),\n      onResponse: mergeInterceptors(_config.onResponse, options.onResponse),\n    };\n\n    const { requestValidator, responseTransformer, responseValidator, security } = opts;\n    if (requestValidator || security) {\n      // auth must happen in interceptors otherwise we'd need to require\n      // asyncContext enabled\n      // https://nuxt.com/docs/guide/going-further/experimental-features#asynccontext\n      opts.onRequest = [\n        async ({ options }) => {\n          if (security) {\n            await setAuthParams({\n              auth: opts.auth,\n              headers: options.headers,\n              query: options.query,\n              security,\n            });\n          }\n\n          if (requestValidator) {\n            await requestValidator({\n              ...options,\n              // @ts-expect-error\n              body: options.rawBody,\n            });\n          }\n        },\n        ...opts.onRequest,\n      ];\n    }\n\n    if (responseTransformer || responseValidator) {\n      opts.onResponse = [\n        ...opts.onResponse,\n        async ({ options, response }) => {\n          if (options.responseType && options.responseType !== 'json') {\n            return;\n          }\n\n          if (!response.ok) {\n            return;\n          }\n\n          if (responseValidator) {\n            await responseValidator(response._data);\n          }\n\n          if (responseTransformer) {\n            response._data = await responseTransformer(response._data);\n          }\n        },\n      ];\n    }\n\n    // remove Content-Type header if body is empty to avoid sending invalid requests\n    if (opts.body === undefined || opts.body === '') {\n      opts.headers.delete('Content-Type');\n    }\n\n    const fetchFn = opts.$fetch;\n\n    if (composable === '$fetch') {\n      return executeFetchFn(\n        // @ts-expect-error\n        opts,\n        fetchFn,\n      );\n    }\n\n    if (composable === 'useFetch' || composable === 'useLazyFetch') {\n      opts.rawBody = opts.body;\n      const bodyParams = reactive({\n        body: opts.body,\n        bodySerializer: opts.bodySerializer,\n      });\n      const body = ref(serializeBody({ ...opts, body: toValue(opts.body) }));\n      opts.body = body;\n      watch(bodyParams, (changed) => {\n        body.value = serializeBody(changed);\n      });\n      return composable === 'useLazyFetch'\n        ? useLazyFetch(() => buildUrl(opts), { ...opts, ...asyncDataOptions })\n        : useFetch(() => buildUrl(opts), { ...opts, ...asyncDataOptions });\n    }\n\n    const handler: any = () =>\n      executeFetchFn(\n        // @ts-expect-error\n        opts,\n        fetchFn,\n      );\n\n    if (composable === 'useAsyncData') {\n      return key\n        ? useAsyncData(key, handler, asyncDataOptions)\n        : useAsyncData(handler, asyncDataOptions);\n    }\n\n    if (composable === 'useLazyAsyncData') {\n      return key\n        ? useLazyAsyncData(key, handler, asyncDataOptions)\n        : useLazyAsyncData(handler, asyncDataOptions);\n    }\n\n    return undefined as any;\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      ...unwrapRefs(opts),\n      body: opts.body as BodyInit | null | undefined,\n      method,\n      onRequest: undefined,\n      serializedBody: getValidRequestBody(opts) as BodyInit | null | undefined,\n      signal: unwrapRefs(opts.signal) as AbortSignal,\n      url,\n    });\n  };\n\n  const _buildUrl: Client['buildUrl'] = (options) =>\n    buildUrl({ ..._config, ...options } as typeof 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    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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/sse-nuxt/client/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type { Auth } from '../core/auth.gen';\nexport type { QuerySerializerOptions } from '../core/bodySerializer.gen';\nexport {\n  formDataBodySerializer,\n  jsonBodySerializer,\n  urlSearchParamsBodySerializer,\n} from '../core/bodySerializer.gen';\nexport { buildClientParams } from '../core/params.gen';\nexport { serializeQueryKeyValue } from '../core/queryKeySerializer.gen';\nexport { createClient } from './client.gen';\nexport type {\n  Client,\n  ClientOptions,\n  Composable,\n  Config,\n  CreateClientConfig,\n  Options,\n  RequestOptions,\n  RequestResult,\n  TDataShape,\n} from './types.gen';\nexport { createConfig } from './utils.gen';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/sse-nuxt/client/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type {\n  AsyncDataOptions,\n  useAsyncData,\n  useFetch,\n  UseFetchOptions,\n  useLazyAsyncData,\n  useLazyFetch,\n} from 'nuxt/app';\nimport type { Ref } from 'vue';\n\nimport type { Auth } from '../core/auth.gen';\nimport type { QuerySerializerOptions } from '../core/bodySerializer.gen';\nimport type {\n  ServerSentEventsOptions,\n  ServerSentEventsResult,\n} from '../core/serverSentEvents.gen';\nimport type { Client as CoreClient, Config as CoreConfig } from '../core/types.gen';\n\nexport type ArraySeparatorStyle = ArrayStyle | MatrixStyle;\ntype ArrayStyle = 'form' | 'spaceDelimited' | 'pipeDelimited';\ntype MatrixStyle = 'label' | 'matrix' | 'simple';\nexport type ObjectSeparatorStyle = ObjectStyle | MatrixStyle;\ntype ObjectStyle = 'form' | 'deepObject';\n\nexport type QuerySerializer = (query: Parameters<Client['buildUrl']>[0]['query']) => string;\n\ntype WithRefs<TData> = {\n  [K in keyof TData]: NonNullable<TData[K]> extends object\n    ? WithRefs<NonNullable<TData[K]>> | Ref<NonNullable<TData[K]>> | Extract<TData[K], null>\n    : NonNullable<TData[K]> | Ref<NonNullable<TData[K]>> | Extract<TData[K], null>;\n};\n\n// copied from Nuxt\nexport type KeysOf<T> = Array<T extends T ? (keyof T extends string ? keyof T : never) : never>;\n\nexport interface Config<T extends ClientOptions = ClientOptions>\n  extends\n    Omit<FetchOptions<unknown>, 'baseURL' | 'body' | 'headers' | 'method' | 'query'>,\n    WithRefs<Pick<FetchOptions<unknown>, 'query'>>,\n    Omit<CoreConfig, 'querySerializer'> {\n  /**\n   * Base URL for all requests made by this client.\n   */\n  baseURL?: T['baseURL'];\n  /**\n   * A function for serializing request query parameters. By default, arrays\n   * will be exploded in form style, objects will be exploded in deepObject\n   * style, and reserved characters are percent-encoded.\n   *\n   * {@link https://swagger.io/docs/specification/serialization/#query View examples}\n   */\n  querySerializer?: QuerySerializer | QuerySerializerOptions;\n}\n\nexport interface RequestOptions<\n  TComposable extends Composable = '$fetch',\n  ResT = unknown,\n  DefaultT = undefined,\n  Url extends string = string,\n>\n  extends\n    Config,\n    WithRefs<{\n      path?: FetchOptions<unknown>['query'];\n      query?: FetchOptions<unknown>['query'];\n    }>,\n    Pick<\n      ServerSentEventsOptions<ResT>,\n      | 'onSseError'\n      | 'onSseEvent'\n      | 'sseDefaultRetryDelay'\n      | 'sseMaxRetryAttempts'\n      | 'sseMaxRetryDelay'\n    > {\n  asyncDataOptions?: AsyncDataOptions<ResT, ResT, KeysOf<ResT>, DefaultT>;\n  /**\n   * Any body that you want to add to your request.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/fetch#body}\n   */\n  body?: NonNullable<unknown> | Ref<NonNullable<unknown>> | null;\n  composable?: TComposable;\n  key?: string;\n  rawBody?: NonNullable<unknown> | Ref<NonNullable<unknown>> | null;\n  /**\n   * Security mechanism(s) to use for the request.\n   */\n  security?: ReadonlyArray<Auth>;\n  url: Url;\n}\n\nexport type RequestResult<\n  TComposable extends Composable,\n  ResT,\n  TError,\n> = TComposable extends '$fetch'\n  ? ReturnType<typeof $fetch<ResT>>\n  : TComposable extends 'useAsyncData'\n    ? ReturnType<typeof useAsyncData<ResT | null, TError>>\n    : TComposable extends 'useFetch'\n      ? ReturnType<typeof useFetch<ResT | null, TError>>\n      : TComposable extends 'useLazyAsyncData'\n        ? ReturnType<typeof useLazyAsyncData<ResT | null, TError>>\n        : TComposable extends 'useLazyFetch'\n          ? ReturnType<typeof useLazyFetch<ResT | null, TError>>\n          : never;\n\nexport interface ClientOptions {\n  baseURL?: string;\n}\n\ntype MethodFn = <\n  TComposable extends Composable = '$fetch',\n  ResT = unknown,\n  TError = unknown,\n  DefaultT = undefined,\n>(\n  options: Omit<RequestOptions<TComposable, ResT, DefaultT>, 'method'>,\n) => RequestResult<TComposable, ResT, TError>;\n\ntype SseFn = <\n  TComposable extends Composable = '$fetch',\n  ResT = unknown,\n  TError = unknown,\n  DefaultT = undefined,\n>(\n  options: Omit<RequestOptions<TComposable, ResT, DefaultT>, 'method'>,\n) => Promise<ServerSentEventsResult<RequestResult<TComposable, ResT, TError>>>;\n\ntype RequestFn = <\n  TComposable extends Composable = '$fetch',\n  ResT = unknown,\n  TError = unknown,\n  DefaultT = undefined,\n>(\n  options: Omit<RequestOptions<TComposable, ResT, DefaultT>, 'method'> &\n    Pick<Required<RequestOptions<TComposable, ResT, DefaultT>>, 'method'>,\n) => RequestResult<TComposable, ResT, TError>;\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 = ClientOptions> = (\n  override?: Config<ClientOptions & T>,\n) => Config<Required<ClientOptions> & T>;\n\nexport interface TDataShape {\n  body?: unknown;\n  headers?: unknown;\n  path?: FetchOptions<unknown>['query'];\n  query?: FetchOptions<unknown>['query'];\n  url: string;\n}\n\nexport type BuildUrlOptions<\n  TData extends Omit<TDataShape, 'headers'> = Omit<TDataShape, 'headers'>,\n> = Pick<WithRefs<TData>, 'path' | 'query'> &\n  Pick<TData, 'url'> &\n  Pick<Options<'$fetch', TData>, 'baseURL' | 'querySerializer'>;\n\ntype BuildUrlFn = <TData extends Omit<TDataShape, 'headers'>>(\n  options: BuildUrlOptions<TData>,\n) => string;\n\nexport type Client = CoreClient<RequestFn, Config, MethodFn, BuildUrlFn, SseFn>;\n\ntype OmitKeys<T, K> = Pick<T, Exclude<keyof T, K>>;\n\nexport type Options<\n  TComposable extends Composable = '$fetch',\n  TData extends TDataShape = TDataShape,\n  ResT = unknown,\n  DefaultT = undefined,\n> = OmitKeys<RequestOptions<TComposable, ResT, DefaultT>, 'body' | 'path' | 'query' | 'url'> &\n  ([TData] extends [never] ? unknown : WithRefs<Omit<TData, 'url'>>);\n\ntype FetchOptions<TData> = Omit<UseFetchOptions<TData, TData>, keyof AsyncDataOptions<TData>>;\n\nexport type Composable =\n  | '$fetch'\n  | 'useAsyncData'\n  | 'useFetch'\n  | 'useLazyAsyncData'\n  | 'useLazyFetch';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/sse-nuxt/client/utils.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { ComputedRef, Ref } from 'vue';\nimport { isRef, toValue, unref } from 'vue';\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 type {\n  ArraySeparatorStyle,\n  BuildUrlOptions,\n  Client,\n  ClientOptions,\n  Config,\n  QuerySerializer,\n  RequestOptions,\n} from './types.gen';\n\ntype PathSerializer = Pick<Required<BuildUrlOptions>, 'path' | 'url'>;\n\nconst PATH_PARAM_RE = /\\{[^{}]+\\}/g;\n\ntype MaybeArray<T> = T | T[];\n\nconst 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 = toValue((toValue(path) as Record<string, unknown> | undefined)?.[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 createQuerySerializer = <T = unknown>({\n  parameters = {},\n  ...args\n}: QuerySerializerOptions = {}) => {\n  const querySerializer = (queryParams: T) => {\n    const search: string[] = [];\n    const qParams = toValue(queryParams);\n    if (qParams && typeof qParams === 'object') {\n      for (const name in qParams) {\n        const value = toValue(qParams[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\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    (toValue(options.query) as Record<string, unknown> | undefined)?.[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    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        const queryValue = toValue(options.query) as Record<string, unknown> | undefined;\n        if (queryValue) {\n          queryValue[name] = token;\n        }\n        break;\n      }\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  const url = 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  return url;\n};\n\nexport const getUrl = ({\n  baseUrl,\n  path,\n  query,\n  querySerializer,\n  url: _url,\n}: Pick<BuildUrlOptions, 'path' | 'query' | 'url'> & {\n  baseUrl?: string;\n  querySerializer: QuerySerializer;\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 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 || typeof header !== 'object') {\n      continue;\n    }\n\n    let h: unknown = header;\n    if (isRef(h)) {\n      h = unref(h);\n    }\n\n    const iterator =\n      h instanceof Headers ? headersEntries(h) : Object.entries(h as Record<string, unknown>);\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, unwrapRefs(v) as string);\n        }\n      } else if (value !== undefined) {\n        const v = unwrapRefs(value);\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(key, typeof v === 'object' ? JSON.stringify(v) : (v as string));\n      }\n    }\n  }\n  return mergedHeaders;\n};\n\nexport const mergeInterceptors = <T>(...args: Array<MaybeArray<T>>): Array<T> =>\n  args.reduce<Array<T>>((acc, item) => {\n    if (typeof item === 'function') {\n      acc.push(item);\n    } else if (Array.isArray(item)) {\n      return acc.concat(item);\n    }\n    return acc;\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  querySerializer: defaultQuerySerializer,\n  ...override,\n});\n\ntype UnwrapRefs<T> =\n  T extends Ref<infer V>\n    ? V\n    : T extends ComputedRef<infer V>\n      ? V\n      : T extends Record<string, unknown> // this doesn't handle functions well\n        ? { [K in keyof T]: UnwrapRefs<T[K]> }\n        : T;\n\nexport const unwrapRefs = <T>(value: T): UnwrapRefs<T> => {\n  if (value === null || typeof value !== 'object' || value instanceof Headers) {\n    return (isRef(value) ? unref(value) : value) as UnwrapRefs<T>;\n  }\n\n  if (\n    value instanceof Blob ||\n    value instanceof FormData ||\n    value instanceof ReadableStream ||\n    value instanceof AbortSignal\n  ) {\n    return value as UnwrapRefs<T>;\n  }\n\n  if (Array.isArray(value)) {\n    return value.map((item) => unwrapRefs(item)) as UnwrapRefs<T>;\n  }\n\n  if (isRef(value)) {\n    return unwrapRefs(unref(value) as T);\n  }\n\n  // unwrap into new object to avoid modifying the source\n  const result: Record<string, unknown> = {};\n  for (const key in value) {\n    result[key] = unwrapRefs(value[key] as T);\n  }\n  return result as UnwrapRefs<T>;\n};\n\nexport const serializeBody = (\n  opts: Pick<Parameters<Client['request']>[0], 'body' | 'bodySerializer'>,\n) => {\n  if (opts.body && opts.bodySerializer) {\n    return opts.bodySerializer(opts.body);\n  }\n  return opts.body;\n};\n\nexport const executeFetchFn = (\n  opts: Omit<Parameters<Client['request']>[0], 'composable'>,\n  fetchFn: Required<Config>['$fetch'],\n) => {\n  const unwrappedOpts = unwrapRefs(opts);\n  unwrappedOpts.rawBody = unwrappedOpts.body;\n  unwrappedOpts.body = serializeBody(unwrappedOpts);\n  return fetchFn(\n    buildUrl(opts),\n    // @ts-expect-error\n    unwrappedOpts,\n  );\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/sse-nuxt/client.gen.ts",
    "content": "// 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>());\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/sse-nuxt/core/auth.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/sse-nuxt/core/bodySerializer.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/sse-nuxt/core/params.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/sse-nuxt/core/pathSerializer.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/sse-nuxt/core/queryKeySerializer.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\n/**\n * JSON-friendly union that mirrors what Pinia Colada can hash.\n */\nexport type JsonValue =\n  | null\n  | string\n  | number\n  | boolean\n  | JsonValue[]\n  | { [key: string]: JsonValue };\n\n/**\n * Replacer that converts non-JSON values (bigint, Date, etc.) to safe substitutes.\n */\nexport const queryKeyJsonReplacer = (_key: string, value: unknown) => {\n  if (value === undefined || typeof value === 'function' || typeof value === 'symbol') {\n    return undefined;\n  }\n  if (typeof value === 'bigint') {\n    return value.toString();\n  }\n  if (value instanceof Date) {\n    return value.toISOString();\n  }\n  return value;\n};\n\n/**\n * Safely stringifies a value and parses it back into a JsonValue.\n */\nexport const stringifyToJsonValue = (input: unknown): JsonValue | undefined => {\n  try {\n    const json = JSON.stringify(input, queryKeyJsonReplacer);\n    if (json === undefined) {\n      return undefined;\n    }\n    return JSON.parse(json) as JsonValue;\n  } catch {\n    return undefined;\n  }\n};\n\n/**\n * Detects plain objects (including objects with a null prototype).\n */\nconst isPlainObject = (value: unknown): value is Record<string, unknown> => {\n  if (value === null || typeof value !== 'object') {\n    return false;\n  }\n  const prototype = Object.getPrototypeOf(value as object);\n  return prototype === Object.prototype || prototype === null;\n};\n\n/**\n * Turns URLSearchParams into a sorted JSON object for deterministic keys.\n */\nconst serializeSearchParams = (params: URLSearchParams): JsonValue => {\n  const entries = Array.from(params.entries()).sort(([a], [b]) => a.localeCompare(b));\n  const result: Record<string, JsonValue> = {};\n\n  for (const [key, value] of entries) {\n    const existing = result[key];\n    if (existing === undefined) {\n      result[key] = value;\n      continue;\n    }\n\n    if (Array.isArray(existing)) {\n      (existing as string[]).push(value);\n    } else {\n      result[key] = [existing, value];\n    }\n  }\n\n  return result;\n};\n\n/**\n * Normalizes any accepted value into a JSON-friendly shape for query keys.\n */\nexport const serializeQueryKeyValue = (value: unknown): JsonValue | undefined => {\n  if (value === null) {\n    return null;\n  }\n\n  if (typeof value === 'string' || typeof value === 'number' || typeof value === 'boolean') {\n    return value;\n  }\n\n  if (value === undefined || typeof value === 'function' || typeof value === 'symbol') {\n    return undefined;\n  }\n\n  if (typeof value === 'bigint') {\n    return value.toString();\n  }\n\n  if (value instanceof Date) {\n    return value.toISOString();\n  }\n\n  if (Array.isArray(value)) {\n    return stringifyToJsonValue(value);\n  }\n\n  if (typeof URLSearchParams !== 'undefined' && value instanceof URLSearchParams) {\n    return serializeSearchParams(value);\n  }\n\n  if (isPlainObject(value)) {\n    return stringifyToJsonValue(value);\n  }\n\n  return undefined;\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/sse-nuxt/core/serverSentEvents.gen.ts",
    "content": "// 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 const 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            // Normalize line endings: CRLF -> LF, then CR -> LF\n            buffer = buffer.replace(/\\r\\n/g, '\\n').replace(/\\r/g, '\\n');\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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/sse-nuxt/core/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { Auth, AuthToken } from './auth.gen';\nimport type { BodySerializer, QuerySerializer, QuerySerializerOptions } from './bodySerializer.gen';\n\nexport type HttpMethod =\n  | 'connect'\n  | 'delete'\n  | 'get'\n  | 'head'\n  | 'options'\n  | 'patch'\n  | 'post'\n  | 'put'\n  | 'trace';\n\nexport type Client<\n  RequestFn = never,\n  Config = unknown,\n  MethodFn = never,\n  BuildUrlFn = never,\n  SseFn = never,\n> = {\n  /**\n   * Returns the final request URL.\n   */\n  buildUrl: BuildUrlFn;\n  getConfig: () => Config;\n  request: RequestFn;\n  setConfig: (config: Config) => Config;\n} & {\n  [K in HttpMethod]: MethodFn;\n} & ([SseFn] extends [never] ? { sse?: never } : { sse: { [K in HttpMethod]: SseFn } });\n\nexport interface Config {\n  /**\n   * Auth token or a function returning auth token. The resolved value will be\n   * added to the request payload as defined by its `security` array.\n   */\n  auth?: ((auth: Auth) => Promise<AuthToken> | AuthToken) | AuthToken;\n  /**\n   * A function for serializing request body parameter. By default,\n   * {@link JSON.stringify()} will be used.\n   */\n  bodySerializer?: BodySerializer | null;\n  /**\n   * An object containing any HTTP headers that you want to pre-populate your\n   * `Headers` object with.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/Headers/Headers#init See more}\n   */\n  headers?:\n    | RequestInit['headers']\n    | Record<\n        string,\n        string | number | boolean | (string | number | boolean)[] | null | undefined | unknown\n      >;\n  /**\n   * The request method.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/fetch#method See more}\n   */\n  method?: Uppercase<HttpMethod>;\n  /**\n   * A function for serializing request query parameters. By default, arrays\n   * will be exploded in form style, objects will be exploded in deepObject\n   * style, and reserved characters are percent-encoded.\n   *\n   * This method will have no effect if the native `paramsSerializer()` Axios\n   * API function is used.\n   *\n   * {@link https://swagger.io/docs/specification/serialization/#query View examples}\n   */\n  querySerializer?: QuerySerializer | QuerySerializerOptions;\n  /**\n   * A function validating request data. This is useful if you want to ensure\n   * the request conforms to the desired shape, so it can be safely sent to\n   * the server.\n   */\n  requestValidator?: (data: unknown) => Promise<unknown>;\n  /**\n   * A function transforming response data before it's returned. This is useful\n   * for post-processing data, e.g. converting ISO strings into Date objects.\n   */\n  responseTransformer?: (data: unknown) => Promise<unknown>;\n  /**\n   * A function validating response data. This is useful if you want to ensure\n   * the response conforms to the desired shape, so it can be safely passed to\n   * the transformers and returned to the user.\n   */\n  responseValidator?: (data: unknown) => Promise<unknown>;\n}\n\ntype IsExactlyNeverOrNeverUndefined<T> = [T] extends [never]\n  ? true\n  : [T] extends [never | undefined]\n    ? [undefined] extends [T]\n      ? false\n      : true\n    : false;\n\nexport type OmitNever<T extends Record<string, unknown>> = {\n  [K in keyof T as IsExactlyNeverOrNeverUndefined<T[K]> extends true ? never : K]: T[K];\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/sse-nuxt/core/utils.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/sse-nuxt/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport { eventSubscribe, type Options } from './sdk.gen';\nexport type { AgentPart, ApiError, AssistantMessage, ClientOptions, CompactionPart, Event, EventCommandExecuted, EventFileEdited, EventFileWatcherUpdated, EventGlobalDisposed, EventInstallationUpdateAvailable, EventInstallationUpdated, EventLspClientDiagnostics, EventLspUpdated, EventMcpToolsChanged, EventMessagePartRemoved, EventMessagePartUpdated, EventMessageRemoved, EventMessageUpdated, EventPermissionAsked, EventPermissionReplied, EventProjectUpdated, EventPtyCreated, EventPtyDeleted, EventPtyExited, EventPtyUpdated, EventServerConnected, EventServerInstanceDisposed, EventSessionCompacted, EventSessionCreated, EventSessionDeleted, EventSessionDiff, EventSessionError, EventSessionIdle, EventSessionStatus, EventSessionUpdated, EventSubscribeData, EventSubscribeResponse, EventSubscribeResponses, EventTodoUpdated, EventTuiCommandExecute, EventTuiPromptAppend, EventTuiToastShow, EventVcsBranchUpdated, FileDiff, FilePart, FilePartSource, FilePartSourceText, FileSource, Message, MessageAbortedError, MessageOutputLengthError, Part, PatchPart, PermissionAction, PermissionRequest, PermissionRule, PermissionRuleset, Project, ProviderAuthError, Pty, Range, ReasoningPart, RetryPart, Session, SessionStatus, SnapshotPart, StepFinishPart, StepStartPart, SymbolSource, TextPart, Todo, ToolPart, ToolState, ToolStateCompleted, ToolStateError, ToolStatePending, ToolStateRunning, UnknownError, UserMessage } from './types.gen';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/sse-nuxt/sdk.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { Client, Composable, Options as Options2, TDataShape } from './client';\nimport { client } from './client.gen';\nimport type { EventSubscribeData, EventSubscribeResponse } from './types.gen';\n\nexport type Options<TComposable extends Composable = '$fetch', TData extends TDataShape = TDataShape, ResT = unknown, DefaultT = undefined> = Options2<TComposable, TData, ResT, DefaultT> & {\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 * Subscribe to events\n *\n * Get events\n */\nexport const eventSubscribe = <TComposable extends Composable = '$fetch', DefaultT extends EventSubscribeResponse = EventSubscribeResponse>(options: Options<TComposable, EventSubscribeData, EventSubscribeResponse, DefaultT>) => (options.client ?? client).sse.get<TComposable, EventSubscribeResponse | DefaultT, unknown, DefaultT>({ url: '/event', ...options });\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/sse-nuxt/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type ClientOptions = {\n    baseURL: `${string}://${string}` | (string & {});\n};\n\nexport type PermissionAction = 'allow' | 'deny' | 'ask';\n\nexport type PermissionRule = {\n    permission: string;\n    pattern: string;\n    action: PermissionAction;\n};\n\nexport type PermissionRuleset = Array<PermissionRule>;\n\nexport type Range = {\n    start: {\n        line: number;\n        character: number;\n    };\n    end: {\n        line: number;\n        character: number;\n    };\n};\n\nexport type SymbolSource = {\n    text: FilePartSourceText;\n    type: 'symbol';\n    path: string;\n    range: Range;\n    name: string;\n    kind: number;\n};\n\nexport type FilePartSourceText = {\n    value: string;\n    start: number;\n    end: number;\n};\n\nexport type FileSource = {\n    text: FilePartSourceText;\n    type: 'file';\n    path: string;\n};\n\nexport type FilePartSource = FileSource | SymbolSource;\n\nexport type EventGlobalDisposed = {\n    type: 'global.disposed';\n    properties: {\n        [key: string]: unknown;\n    };\n};\n\nexport type EventServerConnected = {\n    type: 'server.connected';\n    properties: {\n        [key: string]: unknown;\n    };\n};\n\nexport type EventPtyDeleted = {\n    type: 'pty.deleted';\n    properties: {\n        id: string;\n    };\n};\n\nexport type EventPtyExited = {\n    type: 'pty.exited';\n    properties: {\n        id: string;\n        exitCode: number;\n    };\n};\n\nexport type EventPtyUpdated = {\n    type: 'pty.updated';\n    properties: {\n        info: Pty;\n    };\n};\n\nexport type Pty = {\n    id: string;\n    title: string;\n    command: string;\n    args: Array<string>;\n    cwd: string;\n    status: 'running' | 'exited';\n    pid: number;\n};\n\nexport type EventPtyCreated = {\n    type: 'pty.created';\n    properties: {\n        info: Pty;\n    };\n};\n\nexport type EventVcsBranchUpdated = {\n    type: 'vcs.branch.updated';\n    properties: {\n        branch?: string;\n    };\n};\n\nexport type EventFileWatcherUpdated = {\n    type: 'file.watcher.updated';\n    properties: {\n        file: string;\n        event: 'add' | 'change' | 'unlink';\n    };\n};\n\nexport type EventSessionError = {\n    type: 'session.error';\n    properties: {\n        sessionID?: string;\n        error?: ProviderAuthError | UnknownError | MessageOutputLengthError | MessageAbortedError | ApiError;\n    };\n};\n\nexport type ApiError = {\n    name: 'APIError';\n    data: {\n        message: string;\n        statusCode?: number;\n        isRetryable: boolean;\n        responseHeaders?: {\n            [key: string]: string;\n        };\n        responseBody?: string;\n        metadata?: {\n            [key: string]: string;\n        };\n    };\n};\n\nexport type MessageAbortedError = {\n    name: 'MessageAbortedError';\n    data: {\n        message: string;\n    };\n};\n\nexport type MessageOutputLengthError = {\n    name: 'MessageOutputLengthError';\n    data: {\n        [key: string]: unknown;\n    };\n};\n\nexport type UnknownError = {\n    name: 'UnknownError';\n    data: {\n        message: string;\n    };\n};\n\nexport type ProviderAuthError = {\n    name: 'ProviderAuthError';\n    data: {\n        providerID: string;\n        message: string;\n    };\n};\n\nexport type EventSessionDiff = {\n    type: 'session.diff';\n    properties: {\n        sessionID: string;\n        diff: Array<FileDiff>;\n    };\n};\n\nexport type FileDiff = {\n    file: string;\n    before: string;\n    after: string;\n    additions: number;\n    deletions: number;\n};\n\nexport type EventSessionDeleted = {\n    type: 'session.deleted';\n    properties: {\n        info: Session;\n    };\n};\n\nexport type Session = {\n    id: string;\n    projectID: string;\n    directory: string;\n    parentID?: string;\n    summary?: {\n        additions: number;\n        deletions: number;\n        files: number;\n        diffs?: Array<FileDiff>;\n    };\n    share?: {\n        url: string;\n    };\n    title: string;\n    version: string;\n    time: {\n        created: number;\n        updated: number;\n        compacting?: number;\n        archived?: number;\n    };\n    permission?: PermissionRuleset;\n    revert?: {\n        messageID: string;\n        partID?: string;\n        snapshot?: string;\n        diff?: string;\n    };\n};\n\nexport type EventSessionUpdated = {\n    type: 'session.updated';\n    properties: {\n        info: Session;\n    };\n};\n\nexport type EventSessionCreated = {\n    type: 'session.created';\n    properties: {\n        info: Session;\n    };\n};\n\nexport type EventCommandExecuted = {\n    type: 'command.executed';\n    properties: {\n        name: string;\n        sessionID: string;\n        arguments: string;\n        messageID: string;\n    };\n};\n\nexport type EventMcpToolsChanged = {\n    type: 'mcp.tools.changed';\n    properties: {\n        server: string;\n    };\n};\n\nexport type EventTuiToastShow = {\n    type: 'tui.toast.show';\n    properties: {\n        title?: string;\n        message: string;\n        variant: 'info' | 'success' | 'warning' | 'error';\n        /**\n         * Duration in milliseconds\n         */\n        duration?: number;\n    };\n};\n\nexport type EventTuiCommandExecute = {\n    type: 'tui.command.execute';\n    properties: {\n        command: 'session.list' | 'session.new' | 'session.share' | 'session.interrupt' | 'session.compact' | 'session.page.up' | 'session.page.down' | 'session.half.page.up' | 'session.half.page.down' | 'session.first' | 'session.last' | 'prompt.clear' | 'prompt.submit' | 'agent.cycle' | string;\n    };\n};\n\nexport type EventTuiPromptAppend = {\n    type: 'tui.prompt.append';\n    properties: {\n        text: string;\n    };\n};\n\nexport type Todo = {\n    /**\n     * Brief description of the task\n     */\n    content: string;\n    /**\n     * Current status of the task: pending, in_progress, completed, cancelled\n     */\n    status: string;\n    /**\n     * Priority level of the task: high, medium, low\n     */\n    priority: string;\n    /**\n     * Unique identifier for the todo item\n     */\n    id: string;\n};\n\nexport type EventTodoUpdated = {\n    type: 'todo.updated';\n    properties: {\n        sessionID: string;\n        todos: Array<Todo>;\n    };\n};\n\nexport type EventFileEdited = {\n    type: 'file.edited';\n    properties: {\n        file: string;\n    };\n};\n\nexport type EventSessionCompacted = {\n    type: 'session.compacted';\n    properties: {\n        sessionID: string;\n    };\n};\n\nexport type EventSessionIdle = {\n    type: 'session.idle';\n    properties: {\n        sessionID: string;\n    };\n};\n\nexport type SessionStatus = {\n    type: 'idle';\n} | {\n    type: 'retry';\n    attempt: number;\n    message: string;\n    next: number;\n} | {\n    type: 'busy';\n};\n\nexport type EventSessionStatus = {\n    type: 'session.status';\n    properties: {\n        sessionID: string;\n        status: SessionStatus;\n    };\n};\n\nexport type EventPermissionReplied = {\n    type: 'permission.replied';\n    properties: {\n        sessionID: string;\n        requestID: string;\n        reply: 'once' | 'always' | 'reject';\n    };\n};\n\nexport type PermissionRequest = {\n    id: string;\n    sessionID: string;\n    permission: string;\n    patterns: Array<string>;\n    metadata: {\n        [key: string]: unknown;\n    };\n    always: Array<string>;\n    tool?: {\n        messageID: string;\n        callID: string;\n    };\n};\n\nexport type EventPermissionAsked = {\n    type: 'permission.asked';\n    properties: PermissionRequest;\n};\n\nexport type EventMessagePartRemoved = {\n    type: 'message.part.removed';\n    properties: {\n        sessionID: string;\n        messageID: string;\n        partID: string;\n    };\n};\n\nexport type CompactionPart = {\n    id: string;\n    sessionID: string;\n    messageID: string;\n    type: 'compaction';\n    auto: boolean;\n};\n\nexport type RetryPart = {\n    id: string;\n    sessionID: string;\n    messageID: string;\n    type: 'retry';\n    attempt: number;\n    error: ApiError;\n    time: {\n        created: number;\n    };\n};\n\nexport type AgentPart = {\n    id: string;\n    sessionID: string;\n    messageID: string;\n    type: 'agent';\n    name: string;\n    source?: {\n        value: string;\n        start: number;\n        end: number;\n    };\n};\n\nexport type PatchPart = {\n    id: string;\n    sessionID: string;\n    messageID: string;\n    type: 'patch';\n    hash: string;\n    files: Array<string>;\n};\n\nexport type SnapshotPart = {\n    id: string;\n    sessionID: string;\n    messageID: string;\n    type: 'snapshot';\n    snapshot: string;\n};\n\nexport type StepFinishPart = {\n    id: string;\n    sessionID: string;\n    messageID: string;\n    type: 'step-finish';\n    reason: string;\n    snapshot?: string;\n    cost: number;\n    tokens: {\n        input: number;\n        output: number;\n        reasoning: number;\n        cache: {\n            read: number;\n            write: number;\n        };\n    };\n};\n\nexport type StepStartPart = {\n    id: string;\n    sessionID: string;\n    messageID: string;\n    type: 'step-start';\n    snapshot?: string;\n};\n\nexport type ToolStateError = {\n    status: 'error';\n    input: {\n        [key: string]: unknown;\n    };\n    error: string;\n    metadata?: {\n        [key: string]: unknown;\n    };\n    time: {\n        start: number;\n        end: number;\n    };\n};\n\nexport type ToolStateCompleted = {\n    status: 'completed';\n    input: {\n        [key: string]: unknown;\n    };\n    output: string;\n    title: string;\n    metadata: {\n        [key: string]: unknown;\n    };\n    time: {\n        start: number;\n        end: number;\n        compacted?: number;\n    };\n    attachments?: Array<FilePart>;\n};\n\nexport type FilePart = {\n    id: string;\n    sessionID: string;\n    messageID: string;\n    type: 'file';\n    mime: string;\n    filename?: string;\n    url: string;\n    source?: FilePartSource;\n};\n\nexport type ToolStateRunning = {\n    status: 'running';\n    input: {\n        [key: string]: unknown;\n    };\n    title?: string;\n    metadata?: {\n        [key: string]: unknown;\n    };\n    time: {\n        start: number;\n    };\n};\n\nexport type ToolStatePending = {\n    status: 'pending';\n    input: {\n        [key: string]: unknown;\n    };\n    raw: string;\n};\n\nexport type ToolState = ToolStatePending | ToolStateRunning | ToolStateCompleted | ToolStateError;\n\nexport type ToolPart = {\n    id: string;\n    sessionID: string;\n    messageID: string;\n    type: 'tool';\n    callID: string;\n    tool: string;\n    state: ToolState;\n    metadata?: {\n        [key: string]: unknown;\n    };\n};\n\nexport type ReasoningPart = {\n    id: string;\n    sessionID: string;\n    messageID: string;\n    type: 'reasoning';\n    text: string;\n    metadata?: {\n        [key: string]: unknown;\n    };\n    time: {\n        start: number;\n        end?: number;\n    };\n};\n\nexport type TextPart = {\n    id: string;\n    sessionID: string;\n    messageID: string;\n    type: 'text';\n    text: string;\n    synthetic?: boolean;\n    ignored?: boolean;\n    time?: {\n        start: number;\n        end?: number;\n    };\n    metadata?: {\n        [key: string]: unknown;\n    };\n};\n\nexport type Part = TextPart | {\n    id: string;\n    sessionID: string;\n    messageID: string;\n    type: 'subtask';\n    prompt: string;\n    description: string;\n    agent: string;\n    command?: string;\n} | ReasoningPart | FilePart | ToolPart | StepStartPart | StepFinishPart | SnapshotPart | PatchPart | AgentPart | RetryPart | CompactionPart;\n\nexport type EventMessagePartUpdated = {\n    type: 'message.part.updated';\n    properties: {\n        part: Part;\n        delta?: string;\n    };\n};\n\nexport type EventMessageRemoved = {\n    type: 'message.removed';\n    properties: {\n        sessionID: string;\n        messageID: string;\n    };\n};\n\nexport type AssistantMessage = {\n    id: string;\n    sessionID: string;\n    role: 'assistant';\n    time: {\n        created: number;\n        completed?: number;\n    };\n    error?: ProviderAuthError | UnknownError | MessageOutputLengthError | MessageAbortedError | ApiError;\n    parentID: string;\n    modelID: string;\n    providerID: string;\n    mode: string;\n    agent: string;\n    path: {\n        cwd: string;\n        root: string;\n    };\n    summary?: boolean;\n    cost: number;\n    tokens: {\n        input: number;\n        output: number;\n        reasoning: number;\n        cache: {\n            read: number;\n            write: number;\n        };\n    };\n    finish?: string;\n};\n\nexport type UserMessage = {\n    id: string;\n    sessionID: string;\n    role: 'user';\n    time: {\n        created: number;\n    };\n    summary?: {\n        title?: string;\n        body?: string;\n        diffs: Array<FileDiff>;\n    };\n    agent: string;\n    model: {\n        providerID: string;\n        modelID: string;\n    };\n    system?: string;\n    tools?: {\n        [key: string]: boolean;\n    };\n    variant?: string;\n};\n\nexport type Message = UserMessage | AssistantMessage;\n\nexport type EventMessageUpdated = {\n    type: 'message.updated';\n    properties: {\n        info: Message;\n    };\n};\n\nexport type EventLspUpdated = {\n    type: 'lsp.updated';\n    properties: {\n        [key: string]: unknown;\n    };\n};\n\nexport type EventLspClientDiagnostics = {\n    type: 'lsp.client.diagnostics';\n    properties: {\n        serverID: string;\n        path: string;\n    };\n};\n\nexport type EventServerInstanceDisposed = {\n    type: 'server.instance.disposed';\n    properties: {\n        directory: string;\n    };\n};\n\nexport type Project = {\n    id: string;\n    worktree: string;\n    vcs?: 'git';\n    name?: string;\n    icon?: {\n        url?: string;\n        color?: string;\n    };\n    time: {\n        created: number;\n        updated: number;\n        initialized?: number;\n    };\n};\n\nexport type EventProjectUpdated = {\n    type: 'project.updated';\n    properties: Project;\n};\n\nexport type EventInstallationUpdateAvailable = {\n    type: 'installation.update-available';\n    properties: {\n        version: string;\n    };\n};\n\nexport type EventInstallationUpdated = {\n    type: 'installation.updated';\n    properties: {\n        version: string;\n    };\n};\n\nexport type Event = EventInstallationUpdated | EventInstallationUpdateAvailable | EventProjectUpdated | EventServerInstanceDisposed | EventLspClientDiagnostics | EventLspUpdated | EventMessageUpdated | EventMessageRemoved | EventMessagePartUpdated | EventMessagePartRemoved | EventPermissionAsked | EventPermissionReplied | EventSessionStatus | EventSessionIdle | EventSessionCompacted | EventFileEdited | EventTodoUpdated | EventTuiPromptAppend | EventTuiCommandExecute | EventTuiToastShow | EventMcpToolsChanged | EventCommandExecuted | EventSessionCreated | EventSessionUpdated | EventSessionDeleted | EventSessionDiff | EventSessionError | EventFileWatcherUpdated | EventVcsBranchUpdated | EventPtyCreated | EventPtyUpdated | EventPtyExited | EventPtyDeleted | EventServerConnected | EventGlobalDisposed;\n\nexport type EventSubscribeData = {\n    body?: never;\n    path?: never;\n    query?: {\n        directory?: string;\n    };\n    url: '/event';\n};\n\nexport type EventSubscribeResponses = {\n    /**\n     * Event stream\n     */\n    200: Event;\n};\n\nexport type EventSubscribeResponse = EventSubscribeResponses[keyof EventSubscribeResponses];\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/sse-ofetch/client/client.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport { ofetch, type ResponseType as OfetchResponseType } from 'ofetch';\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  buildOfetchOptions,\n  buildUrl,\n  createConfig,\n  createInterceptors,\n  isRepeatableBody,\n  mapParseAsToResponseType,\n  mergeConfigs,\n  mergeHeaders,\n  parseError,\n  parseSuccess,\n  setAuthParams,\n  wrapDataReturn,\n  wrapErrorReturn,\n} from './utils.gen';\n\ntype ReqInit = Omit<RequestInit, 'body' | 'headers'> & {\n  body?: BodyInit | null | undefined;\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  // precompute serialized / network body\n  const resolveOptions = async (options: RequestOptions) => {\n    const opts = {\n      ..._config,\n      ...options,\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 if body is empty to avoid invalid requests\n    if (opts.body === undefined || opts.serializedBody === '') {\n      opts.headers.delete('Content-Type');\n    }\n\n    // if a raw body is provided (no serializer), adjust Content-Type only when it\n    // equals the default JSON value to better match the concrete body type\n    if (\n      opts.body !== undefined &&\n      opts.bodySerializer === null &&\n      (opts.headers.get('Content-Type') || '').toLowerCase() === 'application/json'\n    ) {\n      const b: unknown = opts.body;\n      if (typeof FormData !== 'undefined' && b instanceof FormData) {\n        // let the runtime set the multipart boundary\n        opts.headers.delete('Content-Type');\n      } else if (typeof URLSearchParams !== 'undefined' && b instanceof URLSearchParams) {\n        // standard urlencoded content type (+ charset)\n        opts.headers.set('Content-Type', 'application/x-www-form-urlencoded;charset=UTF-8');\n      } else if (typeof Blob !== 'undefined' && b instanceof Blob) {\n        const t = b.type?.trim();\n        if (t) {\n          opts.headers.set('Content-Type', t);\n        } else {\n          // unknown blob type: avoid sending a misleading JSON header\n          opts.headers.delete('Content-Type');\n        }\n      }\n    }\n\n    // precompute network body (stability for retries and interceptors)\n    const networkBody = getValidRequestBody(opts) as RequestInit['body'] | null | undefined;\n\n    const url = buildUrl(opts);\n\n    return { networkBody, opts, url };\n  };\n\n  // apply request interceptors and mirror header/method/signal back to opts\n  const applyRequestInterceptors = async (\n    request: Request,\n    opts: ResolvedRequestOptions,\n    body: BodyInit | null | undefined,\n  ) => {\n    for (const fn of interceptors.request.fns) {\n      if (fn) {\n        request = await fn(request, opts);\n      }\n    }\n    // reflect interceptor changes into opts used by the network layer\n    opts.headers = request.headers;\n    opts.method = request.method as Uppercase<HttpMethod>;\n    // ignore request.body changes to avoid turning serialized bodies into streams\n    // body comes only from getValidRequestBody(options)\n    // reflect signal if present\n    opts.signal = (request as any).signal as AbortSignal | undefined;\n\n    // When body is FormData, remove Content-Type header to avoid boundary mismatch.\n    // Note: We already delete Content-Type in resolveOptions for FormData, but the\n    // Request constructor (line 175) re-adds it with an auto-generated boundary.\n    // Since we pass the original FormData (not the Request's body) to ofetch, and\n    // ofetch will generate its own boundary, we must remove the Request's Content-Type\n    // to let ofetch set the correct one. Otherwise the boundary in the header won't\n    // match the boundary in the actual multipart body sent by ofetch.\n    if (typeof FormData !== 'undefined' && body instanceof FormData) {\n      opts.headers.delete('Content-Type');\n    }\n\n    return request;\n  };\n\n  // build ofetch options with stable retry logic based on body repeatability\n  const buildNetworkOptions = (\n    opts: ResolvedRequestOptions,\n    body: BodyInit | null | undefined,\n    responseType: OfetchResponseType | undefined,\n  ) => {\n    const effectiveRetry = isRepeatableBody(body) ? (opts.retry as any) : (0 as any);\n    return buildOfetchOptions(opts, body, responseType, effectiveRetry);\n  };\n\n  const request: Client['request'] = async (options) => {\n    const { networkBody: initialNetworkBody, opts, url } = await resolveOptions(options as any);\n    // map parseAs -> ofetch responseType once per request\n    const ofetchResponseType: OfetchResponseType | undefined = mapParseAsToResponseType(\n      opts.parseAs,\n      opts.responseType,\n    );\n\n    const $ofetch = opts.ofetch ?? ofetch;\n\n    // create Request before network to run middleware consistently\n    const networkBody = initialNetworkBody;\n    const requestInit: ReqInit = {\n      body: networkBody,\n      headers: opts.headers as Headers,\n      method: opts.method,\n      redirect: 'follow',\n      signal: opts.signal,\n    };\n    let request = new Request(url, requestInit);\n\n    request = await applyRequestInterceptors(request, opts, networkBody);\n    const finalUrl = request.url;\n\n    // build ofetch options and perform the request (.raw keeps the Response)\n    const responseOptions = buildNetworkOptions(\n      opts as ResolvedRequestOptions,\n      networkBody,\n      ofetchResponseType,\n    );\n\n    let response = await $ofetch.raw(finalUrl, responseOptions);\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 = { request, response };\n\n    if (response.ok) {\n      const data = await parseSuccess(response, opts, ofetchResponseType);\n      return wrapDataReturn(data, result, opts.responseStyle);\n    }\n\n    let finalError = await parseError(response);\n\n    for (const fn of interceptors.error.fns) {\n      if (fn) {\n        finalError = await fn(finalError, response, request, opts);\n      }\n    }\n\n    // ensure error is never undefined after interceptors\n    finalError = (finalError as any) || ({} as string);\n\n    if (opts.throwOnError) {\n      throw finalError;\n    }\n\n    return wrapErrorReturn(finalError, result, opts.responseStyle) as any;\n  };\n\n  const makeMethodFn = (method: Uppercase<HttpMethod>) => (options: RequestOptions) =>\n    request({ ...options, method } as any);\n\n  const makeSseFn = (method: Uppercase<HttpMethod>) => async (options: RequestOptions) => {\n    const { networkBody, opts, url } = await resolveOptions(options);\n    const optsForSse: any = { ...opts };\n    delete optsForSse.body; // body is provided via serializedBody below\n    return createSseClient({\n      ...optsForSse,\n      fetch: opts.fetch,\n      headers: opts.headers as Headers,\n      method,\n      onRequest: async (url, init) => {\n        let request = new Request(url, init);\n        request = await applyRequestInterceptors(request, opts, networkBody);\n        return request;\n      },\n      serializedBody: networkBody as BodyInit | null | undefined,\n      signal: opts.signal,\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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/sse-ofetch/client/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type { Auth } from '../core/auth.gen';\nexport type { QuerySerializerOptions } from '../core/bodySerializer.gen';\nexport {\n  formDataBodySerializer,\n  jsonBodySerializer,\n  urlSearchParamsBodySerializer,\n} from '../core/bodySerializer.gen';\nexport { buildClientParams } from '../core/params.gen';\nexport { serializeQueryKeyValue } from '../core/queryKeySerializer.gen';\nexport { createClient } from './client.gen';\nexport type {\n  Client,\n  ClientOptions,\n  Config,\n  CreateClientConfig,\n  Options,\n  RequestOptions,\n  RequestResult,\n  ResolvedRequestOptions,\n  ResponseStyle,\n  TDataShape,\n} from './types.gen';\nexport { createConfig, mergeHeaders } from './utils.gen';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/sse-ofetch/client/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { FetchOptions as OfetchOptions, ResponseType as OfetchResponseType } from 'ofetch';\nimport type { ofetch } from 'ofetch';\n\nimport type { Auth } from '../core/auth.gen';\nimport type {\n  ServerSentEventsOptions,\n  ServerSentEventsResult,\n} from '../core/serverSentEvents.gen';\nimport type { Client as CoreClient, Config as CoreConfig } from '../core/types.gen';\nimport type { Middleware } from './utils.gen';\n\nexport type ResponseStyle = 'data' | 'fields';\n\nexport interface Config<T extends ClientOptions = ClientOptions>\n  extends Omit<RequestInit, 'body' | 'headers' | 'method'>, CoreConfig {\n  /**\n   * HTTP(S) agent configuration (Node.js only). Passed through to ofetch.\n   */\n  agent?: OfetchOptions['agent'];\n  /**\n   * Base URL for all requests made by this client.\n   */\n  baseUrl?: T['baseUrl'];\n  /**\n   * Node-only proxy/agent options.\n   */\n  dispatcher?: OfetchOptions['dispatcher'];\n  /**\n   * Fetch API implementation. Used for SSE streaming. You can use this option\n   * to provide a custom fetch instance.\n   *\n   * @default globalThis.fetch\n   */\n  fetch?: typeof fetch;\n  /**\n   * Controls the native ofetch behaviour that throws `FetchError` when\n   * `response.ok === false`. We default to suppressing it to match the fetch\n   * client semantics and let `throwOnError` drive the outcome.\n   */\n  ignoreResponseError?: OfetchOptions['ignoreResponseError'];\n  // No custom fetch option: provide custom instance via `ofetch` instead\n  /**\n   * Please don't use the Fetch client for Next.js applications. The `next`\n   * options won't have any effect.\n   *\n   * Install {@link https://www.npmjs.com/package/@hey-api/client-next `@hey-api/client-next`} instead.\n   */\n  next?: never;\n  /**\n   * Custom ofetch instance created via `ofetch.create()`. If provided, it will\n   * be used for requests instead of the default `ofetch` export.\n   */\n  ofetch?: typeof ofetch;\n  /**\n   * ofetch hook called before a request is sent.\n   */\n  onRequest?: OfetchOptions['onRequest'];\n  /**\n   * ofetch hook called when a request fails before receiving a response\n   * (e.g., network errors or aborted requests).\n   */\n  onRequestError?: OfetchOptions['onRequestError'];\n  /**\n   * ofetch hook called after a successful response is received and parsed.\n   */\n  onResponse?: OfetchOptions['onResponse'];\n  /**\n   * ofetch hook called when the response indicates an error (non-ok status)\n   * or when response parsing fails.\n   */\n  onResponseError?: OfetchOptions['onResponseError'];\n  /**\n   * Return the response data parsed in a specified format. By default, `auto`\n   * will infer the appropriate method from the `Content-Type` response header.\n   * You can override this behavior with any of the {@link Body} methods.\n   * Select `stream` if you don't want to parse response data at all.\n   *\n   * @default 'auto'\n   */\n  parseAs?: 'arrayBuffer' | 'auto' | 'blob' | 'formData' | 'json' | 'stream' | 'text';\n  /** Custom response parser (ofetch). */\n  parseResponse?: OfetchOptions['parseResponse'];\n  /**\n   * Should we return only data or multiple fields (data, error, response, etc.)?\n   *\n   * @default 'fields'\n   */\n  responseStyle?: ResponseStyle;\n  /**\n   * ofetch responseType override. If provided, it will be passed directly to\n   * ofetch and take precedence over `parseAs`.\n   */\n  responseType?: OfetchResponseType;\n  /**\n   * Automatically retry failed requests.\n   */\n  retry?: OfetchOptions['retry'];\n  /**\n   * Delay (in ms) between retry attempts.\n   */\n  retryDelay?: OfetchOptions['retryDelay'];\n  /**\n   * HTTP status codes that should trigger a retry.\n   */\n  retryStatusCodes?: OfetchOptions['retryStatusCodes'];\n  /**\n   * Throw an error instead of returning it in the response?\n   *\n   * @default false\n   */\n  throwOnError?: T['throwOnError'];\n  /**\n   * Abort the request after the given milliseconds.\n   */\n  timeout?: number;\n}\n\nexport interface RequestOptions<\n  TData = unknown,\n  TResponseStyle extends ResponseStyle = 'fields',\n  ThrowOnError extends boolean = boolean,\n  Url extends string = string,\n>\n  extends\n    Config<{\n      responseStyle: TResponseStyle;\n      throwOnError: ThrowOnError;\n    }>,\n    Pick<\n      ServerSentEventsOptions<TData>,\n      | 'onSseError'\n      | 'onSseEvent'\n      | 'sseDefaultRetryDelay'\n      | 'sseMaxRetryAttempts'\n      | 'sseMaxRetryDelay'\n    > {\n  /**\n   * Any body that you want to add to your request.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/fetch#body}\n   */\n  body?: unknown;\n  path?: Record<string, unknown>;\n  query?: Record<string, unknown>;\n  /**\n   * Security mechanism(s) to use for the request.\n   */\n  security?: ReadonlyArray<Auth>;\n  url: Url;\n}\n\nexport interface ResolvedRequestOptions<\n  TResponseStyle extends ResponseStyle = 'fields',\n  ThrowOnError extends boolean = boolean,\n  Url extends string = string,\n> extends RequestOptions<unknown, TResponseStyle, ThrowOnError, Url> {\n  serializedBody?: string;\n}\n\nexport type RequestResult<\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = boolean,\n  TResponseStyle extends ResponseStyle = 'fields',\n> = ThrowOnError extends true\n  ? Promise<\n      TResponseStyle extends 'data'\n        ? TData extends Record<string, unknown>\n          ? TData[keyof TData]\n          : TData\n        : {\n            data: TData extends Record<string, unknown> ? TData[keyof TData] : TData;\n            request: Request;\n            response: Response;\n          }\n    >\n  : Promise<\n      TResponseStyle extends 'data'\n        ? (TData extends Record<string, unknown> ? TData[keyof TData] : TData) | undefined\n        : (\n            | {\n                data: TData extends Record<string, unknown> ? TData[keyof TData] : TData;\n                error: undefined;\n              }\n            | {\n                data: undefined;\n                error: TError extends Record<string, unknown> ? TError[keyof TError] : TError;\n              }\n          ) & {\n            request: Request;\n            response: Response;\n          }\n    >;\n\nexport interface ClientOptions {\n  baseUrl?: string;\n  responseStyle?: ResponseStyle;\n  throwOnError?: boolean;\n}\n\ntype MethodFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'>,\n) => RequestResult<TData, TError, ThrowOnError, TResponseStyle>;\n\ntype SseFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'>,\n) => Promise<ServerSentEventsResult<TData, TError>>;\n\ntype RequestFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'> &\n    Pick<Required<RequestOptions<TData, TResponseStyle, ThrowOnError>>, 'method'>,\n) => RequestResult<TData, TError, ThrowOnError, TResponseStyle>;\n\ntype BuildUrlFn = <\n  TData extends {\n    body?: unknown;\n    path?: Record<string, unknown>;\n    query?: Record<string, unknown>;\n    url: string;\n  },\n>(\n  options: TData & Options<TData>,\n) => string;\n\nexport type Client = CoreClient<RequestFn, Config, MethodFn, BuildUrlFn, SseFn> & {\n  interceptors: Middleware<Request, Response, unknown, ResolvedRequestOptions>;\n};\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 = ClientOptions> = (\n  override?: Config<ClientOptions & T>,\n) => Config<Required<ClientOptions> & T>;\n\nexport interface TDataShape {\n  body?: unknown;\n  headers?: unknown;\n  path?: unknown;\n  query?: unknown;\n  url: string;\n}\n\ntype OmitKeys<T, K> = Pick<T, Exclude<keyof T, K>>;\n\nexport type Options<\n  TData extends TDataShape = TDataShape,\n  ThrowOnError extends boolean = boolean,\n  TResponse = unknown,\n  TResponseStyle extends ResponseStyle = 'fields',\n> = OmitKeys<\n  RequestOptions<TResponse, TResponseStyle, ThrowOnError>,\n  'body' | 'path' | 'query' | 'url'\n> &\n  ([TData] extends [never] ? unknown : Omit<TData, 'url'>);\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/sse-ofetch/client/utils.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { FetchOptions as OfetchOptions, ResponseType as OfetchResponseType } from 'ofetch';\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 {\n  Client,\n  ClientOptions,\n  Config,\n  RequestOptions,\n  ResolvedRequestOptions,\n  ResponseStyle,\n} 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\n/**\n * Map our parseAs value to ofetch responseType when not explicitly provided.\n */\nexport const mapParseAsToResponseType = (\n  parseAs: Config['parseAs'] | undefined,\n  explicit?: OfetchResponseType,\n): OfetchResponseType | undefined => {\n  if (explicit) return explicit;\n  switch (parseAs) {\n    case 'arrayBuffer':\n    case 'blob':\n    case 'json':\n    case 'text':\n    case 'stream':\n      return parseAs;\n    case 'formData':\n    case 'auto':\n    default:\n      return undefined; // let ofetch auto-detect\n  }\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\n/**\n * Heuristic to detect whether a request body can be safely retried.\n */\nexport const isRepeatableBody = (body: unknown): boolean => {\n  if (body == null) return true; // undefined/null treated as no-body\n  if (typeof body === 'string') return true;\n  if (typeof URLSearchParams !== 'undefined' && body instanceof URLSearchParams) return true;\n  if (typeof Uint8Array !== 'undefined' && body instanceof Uint8Array) return true;\n  if (typeof ArrayBuffer !== 'undefined' && body instanceof ArrayBuffer) return true;\n  if (typeof Blob !== 'undefined' && body instanceof Blob) return true;\n  if (typeof FormData !== 'undefined' && body instanceof FormData) return true;\n  // Streams are not repeatable\n  if (typeof ReadableStream !== 'undefined' && body instanceof ReadableStream) return false;\n  // Default: assume non-repeatable for unknown structured bodies\n  return false;\n};\n\n/**\n * Small helper to unify data vs fields return style.\n */\nexport const wrapDataReturn = <T>(\n  data: T,\n  result: { request: Request; response: Response },\n  responseStyle: ResponseStyle | undefined,\n): T | ((T extends Record<string, unknown> ? { data: T } : { data: T }) & typeof result) =>\n  (responseStyle ?? 'fields') === 'data' ? (data as any) : ({ data, ...result } as any);\n\n/**\n * Small helper to unify error vs fields return style.\n */\nexport const wrapErrorReturn = <E>(\n  error: E,\n  result: { request: Request; response: Response },\n  responseStyle: ResponseStyle | undefined,\n):\n  | undefined\n  | ((E extends Record<string, unknown> ? { error: E } : { error: E }) & typeof result) =>\n  (responseStyle ?? 'fields') === 'data' ? undefined : ({ error, ...result } as any);\n\n/**\n * Build options for $ofetch.raw from our resolved opts and body.\n */\nexport const buildOfetchOptions = (\n  opts: ResolvedRequestOptions,\n  body: BodyInit | null | undefined,\n  responseType: OfetchResponseType | undefined,\n  retryOverride?: OfetchOptions['retry'],\n): OfetchOptions =>\n  ({\n    agent: opts.agent as OfetchOptions['agent'],\n    body,\n    credentials: opts.credentials as OfetchOptions['credentials'],\n    dispatcher: opts.dispatcher as OfetchOptions['dispatcher'],\n    headers: opts.headers as Headers,\n    ignoreResponseError: (opts.ignoreResponseError as OfetchOptions['ignoreResponseError']) ?? true,\n    method: opts.method,\n    onRequest: opts.onRequest as OfetchOptions['onRequest'],\n    onRequestError: opts.onRequestError as OfetchOptions['onRequestError'],\n    onResponse: opts.onResponse as OfetchOptions['onResponse'],\n    onResponseError: opts.onResponseError as OfetchOptions['onResponseError'],\n    parseResponse: opts.parseResponse as OfetchOptions['parseResponse'],\n    // URL already includes query\n    query: undefined,\n    responseType,\n    retry: retryOverride ?? (opts.retry as OfetchOptions['retry']),\n    retryDelay: opts.retryDelay as OfetchOptions['retryDelay'],\n    retryStatusCodes: opts.retryStatusCodes as OfetchOptions['retryStatusCodes'],\n    signal: opts.signal,\n    timeout: opts.timeout as number | undefined,\n  }) as OfetchOptions;\n\n/**\n * Parse a successful response, handling empty bodies and stream cases.\n */\nexport const parseSuccess = async (\n  response: Response,\n  opts: ResolvedRequestOptions,\n  ofetchResponseType?: OfetchResponseType,\n): Promise<unknown> => {\n  // Stream requested: return stream body\n  if (ofetchResponseType === 'stream') {\n    return response.body;\n  }\n\n  const inferredParseAs =\n    (opts.parseAs === 'auto' ? getParseAs(response.headers.get('Content-Type')) : opts.parseAs) ??\n    'json';\n\n  // Handle empty responses\n  if (response.status === 204 || response.headers.get('Content-Length') === '0') {\n    switch (inferredParseAs) {\n      case 'arrayBuffer':\n      case 'blob':\n      case 'text':\n        return await (response as any)[inferredParseAs]();\n      case 'formData':\n        return new FormData();\n      case 'stream':\n        return response.body;\n      default:\n        return {};\n    }\n  }\n\n  // Prefer ofetch-populated data unless we explicitly need raw `formData`\n  let data: unknown = (response as any)._data;\n  if (inferredParseAs === 'formData' || typeof data === 'undefined') {\n    switch (inferredParseAs) {\n      case 'arrayBuffer':\n      case 'blob':\n      case 'formData':\n      case 'text':\n        data = await (response as any)[inferredParseAs]();\n        break;\n      case 'json': {\n        // Some servers return 200 with no Content-Length and empty body.\n        // response.json() would throw; detect empty via clone().text() first.\n        const txt = await response.clone().text();\n        if (!txt) {\n          data = {};\n        } else {\n          data = await (response as any).json();\n        }\n        break;\n      }\n      case 'stream':\n        return response.body;\n    }\n  }\n\n  if (inferredParseAs === 'json') {\n    if (opts.responseValidator) {\n      await opts.responseValidator(data);\n    }\n    if (opts.responseTransformer) {\n      data = await opts.responseTransformer(data);\n    }\n  }\n\n  return data;\n};\n\n/**\n * Parse an error response payload.\n */\nexport const parseError = async (response: Response): Promise<unknown> => {\n  let error: unknown = (response as any)._data;\n  if (typeof error === 'undefined') {\n    const textError = await response.text();\n    try {\n      error = JSON.parse(textError);\n    } catch {\n      error = textError;\n    }\n  }\n  return error ?? ({} as string);\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  ignoreResponseError: true,\n  parseAs: 'auto',\n  querySerializer: defaultQuerySerializer,\n  ...override,\n});\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/sse-ofetch/client.gen.ts",
    "content": "// 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>());\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/sse-ofetch/core/auth.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/sse-ofetch/core/bodySerializer.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/sse-ofetch/core/params.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/sse-ofetch/core/pathSerializer.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/sse-ofetch/core/queryKeySerializer.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\n/**\n * JSON-friendly union that mirrors what Pinia Colada can hash.\n */\nexport type JsonValue =\n  | null\n  | string\n  | number\n  | boolean\n  | JsonValue[]\n  | { [key: string]: JsonValue };\n\n/**\n * Replacer that converts non-JSON values (bigint, Date, etc.) to safe substitutes.\n */\nexport const queryKeyJsonReplacer = (_key: string, value: unknown) => {\n  if (value === undefined || typeof value === 'function' || typeof value === 'symbol') {\n    return undefined;\n  }\n  if (typeof value === 'bigint') {\n    return value.toString();\n  }\n  if (value instanceof Date) {\n    return value.toISOString();\n  }\n  return value;\n};\n\n/**\n * Safely stringifies a value and parses it back into a JsonValue.\n */\nexport const stringifyToJsonValue = (input: unknown): JsonValue | undefined => {\n  try {\n    const json = JSON.stringify(input, queryKeyJsonReplacer);\n    if (json === undefined) {\n      return undefined;\n    }\n    return JSON.parse(json) as JsonValue;\n  } catch {\n    return undefined;\n  }\n};\n\n/**\n * Detects plain objects (including objects with a null prototype).\n */\nconst isPlainObject = (value: unknown): value is Record<string, unknown> => {\n  if (value === null || typeof value !== 'object') {\n    return false;\n  }\n  const prototype = Object.getPrototypeOf(value as object);\n  return prototype === Object.prototype || prototype === null;\n};\n\n/**\n * Turns URLSearchParams into a sorted JSON object for deterministic keys.\n */\nconst serializeSearchParams = (params: URLSearchParams): JsonValue => {\n  const entries = Array.from(params.entries()).sort(([a], [b]) => a.localeCompare(b));\n  const result: Record<string, JsonValue> = {};\n\n  for (const [key, value] of entries) {\n    const existing = result[key];\n    if (existing === undefined) {\n      result[key] = value;\n      continue;\n    }\n\n    if (Array.isArray(existing)) {\n      (existing as string[]).push(value);\n    } else {\n      result[key] = [existing, value];\n    }\n  }\n\n  return result;\n};\n\n/**\n * Normalizes any accepted value into a JSON-friendly shape for query keys.\n */\nexport const serializeQueryKeyValue = (value: unknown): JsonValue | undefined => {\n  if (value === null) {\n    return null;\n  }\n\n  if (typeof value === 'string' || typeof value === 'number' || typeof value === 'boolean') {\n    return value;\n  }\n\n  if (value === undefined || typeof value === 'function' || typeof value === 'symbol') {\n    return undefined;\n  }\n\n  if (typeof value === 'bigint') {\n    return value.toString();\n  }\n\n  if (value instanceof Date) {\n    return value.toISOString();\n  }\n\n  if (Array.isArray(value)) {\n    return stringifyToJsonValue(value);\n  }\n\n  if (typeof URLSearchParams !== 'undefined' && value instanceof URLSearchParams) {\n    return serializeSearchParams(value);\n  }\n\n  if (isPlainObject(value)) {\n    return stringifyToJsonValue(value);\n  }\n\n  return undefined;\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/sse-ofetch/core/serverSentEvents.gen.ts",
    "content": "// 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 const 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            // Normalize line endings: CRLF -> LF, then CR -> LF\n            buffer = buffer.replace(/\\r\\n/g, '\\n').replace(/\\r/g, '\\n');\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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/sse-ofetch/core/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { Auth, AuthToken } from './auth.gen';\nimport type { BodySerializer, QuerySerializer, QuerySerializerOptions } from './bodySerializer.gen';\n\nexport type HttpMethod =\n  | 'connect'\n  | 'delete'\n  | 'get'\n  | 'head'\n  | 'options'\n  | 'patch'\n  | 'post'\n  | 'put'\n  | 'trace';\n\nexport type Client<\n  RequestFn = never,\n  Config = unknown,\n  MethodFn = never,\n  BuildUrlFn = never,\n  SseFn = never,\n> = {\n  /**\n   * Returns the final request URL.\n   */\n  buildUrl: BuildUrlFn;\n  getConfig: () => Config;\n  request: RequestFn;\n  setConfig: (config: Config) => Config;\n} & {\n  [K in HttpMethod]: MethodFn;\n} & ([SseFn] extends [never] ? { sse?: never } : { sse: { [K in HttpMethod]: SseFn } });\n\nexport interface Config {\n  /**\n   * Auth token or a function returning auth token. The resolved value will be\n   * added to the request payload as defined by its `security` array.\n   */\n  auth?: ((auth: Auth) => Promise<AuthToken> | AuthToken) | AuthToken;\n  /**\n   * A function for serializing request body parameter. By default,\n   * {@link JSON.stringify()} will be used.\n   */\n  bodySerializer?: BodySerializer | null;\n  /**\n   * An object containing any HTTP headers that you want to pre-populate your\n   * `Headers` object with.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/Headers/Headers#init See more}\n   */\n  headers?:\n    | RequestInit['headers']\n    | Record<\n        string,\n        string | number | boolean | (string | number | boolean)[] | null | undefined | unknown\n      >;\n  /**\n   * The request method.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/fetch#method See more}\n   */\n  method?: Uppercase<HttpMethod>;\n  /**\n   * A function for serializing request query parameters. By default, arrays\n   * will be exploded in form style, objects will be exploded in deepObject\n   * style, and reserved characters are percent-encoded.\n   *\n   * This method will have no effect if the native `paramsSerializer()` Axios\n   * API function is used.\n   *\n   * {@link https://swagger.io/docs/specification/serialization/#query View examples}\n   */\n  querySerializer?: QuerySerializer | QuerySerializerOptions;\n  /**\n   * A function validating request data. This is useful if you want to ensure\n   * the request conforms to the desired shape, so it can be safely sent to\n   * the server.\n   */\n  requestValidator?: (data: unknown) => Promise<unknown>;\n  /**\n   * A function transforming response data before it's returned. This is useful\n   * for post-processing data, e.g. converting ISO strings into Date objects.\n   */\n  responseTransformer?: (data: unknown) => Promise<unknown>;\n  /**\n   * A function validating response data. This is useful if you want to ensure\n   * the response conforms to the desired shape, so it can be safely passed to\n   * the transformers and returned to the user.\n   */\n  responseValidator?: (data: unknown) => Promise<unknown>;\n}\n\ntype IsExactlyNeverOrNeverUndefined<T> = [T] extends [never]\n  ? true\n  : [T] extends [never | undefined]\n    ? [undefined] extends [T]\n      ? false\n      : true\n    : false;\n\nexport type OmitNever<T extends Record<string, unknown>> = {\n  [K in keyof T as IsExactlyNeverOrNeverUndefined<T[K]> extends true ? never : K]: T[K];\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/sse-ofetch/core/utils.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/sse-ofetch/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport { eventSubscribe, type Options } from './sdk.gen';\nexport type { AgentPart, ApiError, AssistantMessage, ClientOptions, CompactionPart, Event, EventCommandExecuted, EventFileEdited, EventFileWatcherUpdated, EventGlobalDisposed, EventInstallationUpdateAvailable, EventInstallationUpdated, EventLspClientDiagnostics, EventLspUpdated, EventMcpToolsChanged, EventMessagePartRemoved, EventMessagePartUpdated, EventMessageRemoved, EventMessageUpdated, EventPermissionAsked, EventPermissionReplied, EventProjectUpdated, EventPtyCreated, EventPtyDeleted, EventPtyExited, EventPtyUpdated, EventServerConnected, EventServerInstanceDisposed, EventSessionCompacted, EventSessionCreated, EventSessionDeleted, EventSessionDiff, EventSessionError, EventSessionIdle, EventSessionStatus, EventSessionUpdated, EventSubscribeData, EventSubscribeResponse, EventSubscribeResponses, EventTodoUpdated, EventTuiCommandExecute, EventTuiPromptAppend, EventTuiToastShow, EventVcsBranchUpdated, FileDiff, FilePart, FilePartSource, FilePartSourceText, FileSource, Message, MessageAbortedError, MessageOutputLengthError, Part, PatchPart, PermissionAction, PermissionRequest, PermissionRule, PermissionRuleset, Project, ProviderAuthError, Pty, Range, ReasoningPart, RetryPart, Session, SessionStatus, SnapshotPart, StepFinishPart, StepStartPart, SymbolSource, TextPart, Todo, ToolPart, ToolState, ToolStateCompleted, ToolStateError, ToolStatePending, ToolStateRunning, UnknownError, UserMessage } from './types.gen';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/sse-ofetch/sdk.gen.ts",
    "content": "// 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 { EventSubscribeData, EventSubscribeResponses } from './types.gen';\n\nexport type Options<TData extends TDataShape = TDataShape, ThrowOnError extends boolean = boolean> = Options2<TData, ThrowOnError> & {\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 * Subscribe to events\n *\n * Get events\n */\nexport const eventSubscribe = <ThrowOnError extends boolean = false>(options?: Options<EventSubscribeData, ThrowOnError>) => (options?.client ?? client).sse.get<EventSubscribeResponses, unknown, ThrowOnError>({ url: '/event', ...options });\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/sse-ofetch/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type ClientOptions = {\n    baseUrl: `${string}://${string}` | (string & {});\n};\n\nexport type PermissionAction = 'allow' | 'deny' | 'ask';\n\nexport type PermissionRule = {\n    permission: string;\n    pattern: string;\n    action: PermissionAction;\n};\n\nexport type PermissionRuleset = Array<PermissionRule>;\n\nexport type Range = {\n    start: {\n        line: number;\n        character: number;\n    };\n    end: {\n        line: number;\n        character: number;\n    };\n};\n\nexport type SymbolSource = {\n    text: FilePartSourceText;\n    type: 'symbol';\n    path: string;\n    range: Range;\n    name: string;\n    kind: number;\n};\n\nexport type FilePartSourceText = {\n    value: string;\n    start: number;\n    end: number;\n};\n\nexport type FileSource = {\n    text: FilePartSourceText;\n    type: 'file';\n    path: string;\n};\n\nexport type FilePartSource = FileSource | SymbolSource;\n\nexport type EventGlobalDisposed = {\n    type: 'global.disposed';\n    properties: {\n        [key: string]: unknown;\n    };\n};\n\nexport type EventServerConnected = {\n    type: 'server.connected';\n    properties: {\n        [key: string]: unknown;\n    };\n};\n\nexport type EventPtyDeleted = {\n    type: 'pty.deleted';\n    properties: {\n        id: string;\n    };\n};\n\nexport type EventPtyExited = {\n    type: 'pty.exited';\n    properties: {\n        id: string;\n        exitCode: number;\n    };\n};\n\nexport type EventPtyUpdated = {\n    type: 'pty.updated';\n    properties: {\n        info: Pty;\n    };\n};\n\nexport type Pty = {\n    id: string;\n    title: string;\n    command: string;\n    args: Array<string>;\n    cwd: string;\n    status: 'running' | 'exited';\n    pid: number;\n};\n\nexport type EventPtyCreated = {\n    type: 'pty.created';\n    properties: {\n        info: Pty;\n    };\n};\n\nexport type EventVcsBranchUpdated = {\n    type: 'vcs.branch.updated';\n    properties: {\n        branch?: string;\n    };\n};\n\nexport type EventFileWatcherUpdated = {\n    type: 'file.watcher.updated';\n    properties: {\n        file: string;\n        event: 'add' | 'change' | 'unlink';\n    };\n};\n\nexport type EventSessionError = {\n    type: 'session.error';\n    properties: {\n        sessionID?: string;\n        error?: ProviderAuthError | UnknownError | MessageOutputLengthError | MessageAbortedError | ApiError;\n    };\n};\n\nexport type ApiError = {\n    name: 'APIError';\n    data: {\n        message: string;\n        statusCode?: number;\n        isRetryable: boolean;\n        responseHeaders?: {\n            [key: string]: string;\n        };\n        responseBody?: string;\n        metadata?: {\n            [key: string]: string;\n        };\n    };\n};\n\nexport type MessageAbortedError = {\n    name: 'MessageAbortedError';\n    data: {\n        message: string;\n    };\n};\n\nexport type MessageOutputLengthError = {\n    name: 'MessageOutputLengthError';\n    data: {\n        [key: string]: unknown;\n    };\n};\n\nexport type UnknownError = {\n    name: 'UnknownError';\n    data: {\n        message: string;\n    };\n};\n\nexport type ProviderAuthError = {\n    name: 'ProviderAuthError';\n    data: {\n        providerID: string;\n        message: string;\n    };\n};\n\nexport type EventSessionDiff = {\n    type: 'session.diff';\n    properties: {\n        sessionID: string;\n        diff: Array<FileDiff>;\n    };\n};\n\nexport type FileDiff = {\n    file: string;\n    before: string;\n    after: string;\n    additions: number;\n    deletions: number;\n};\n\nexport type EventSessionDeleted = {\n    type: 'session.deleted';\n    properties: {\n        info: Session;\n    };\n};\n\nexport type Session = {\n    id: string;\n    projectID: string;\n    directory: string;\n    parentID?: string;\n    summary?: {\n        additions: number;\n        deletions: number;\n        files: number;\n        diffs?: Array<FileDiff>;\n    };\n    share?: {\n        url: string;\n    };\n    title: string;\n    version: string;\n    time: {\n        created: number;\n        updated: number;\n        compacting?: number;\n        archived?: number;\n    };\n    permission?: PermissionRuleset;\n    revert?: {\n        messageID: string;\n        partID?: string;\n        snapshot?: string;\n        diff?: string;\n    };\n};\n\nexport type EventSessionUpdated = {\n    type: 'session.updated';\n    properties: {\n        info: Session;\n    };\n};\n\nexport type EventSessionCreated = {\n    type: 'session.created';\n    properties: {\n        info: Session;\n    };\n};\n\nexport type EventCommandExecuted = {\n    type: 'command.executed';\n    properties: {\n        name: string;\n        sessionID: string;\n        arguments: string;\n        messageID: string;\n    };\n};\n\nexport type EventMcpToolsChanged = {\n    type: 'mcp.tools.changed';\n    properties: {\n        server: string;\n    };\n};\n\nexport type EventTuiToastShow = {\n    type: 'tui.toast.show';\n    properties: {\n        title?: string;\n        message: string;\n        variant: 'info' | 'success' | 'warning' | 'error';\n        /**\n         * Duration in milliseconds\n         */\n        duration?: number;\n    };\n};\n\nexport type EventTuiCommandExecute = {\n    type: 'tui.command.execute';\n    properties: {\n        command: 'session.list' | 'session.new' | 'session.share' | 'session.interrupt' | 'session.compact' | 'session.page.up' | 'session.page.down' | 'session.half.page.up' | 'session.half.page.down' | 'session.first' | 'session.last' | 'prompt.clear' | 'prompt.submit' | 'agent.cycle' | string;\n    };\n};\n\nexport type EventTuiPromptAppend = {\n    type: 'tui.prompt.append';\n    properties: {\n        text: string;\n    };\n};\n\nexport type Todo = {\n    /**\n     * Brief description of the task\n     */\n    content: string;\n    /**\n     * Current status of the task: pending, in_progress, completed, cancelled\n     */\n    status: string;\n    /**\n     * Priority level of the task: high, medium, low\n     */\n    priority: string;\n    /**\n     * Unique identifier for the todo item\n     */\n    id: string;\n};\n\nexport type EventTodoUpdated = {\n    type: 'todo.updated';\n    properties: {\n        sessionID: string;\n        todos: Array<Todo>;\n    };\n};\n\nexport type EventFileEdited = {\n    type: 'file.edited';\n    properties: {\n        file: string;\n    };\n};\n\nexport type EventSessionCompacted = {\n    type: 'session.compacted';\n    properties: {\n        sessionID: string;\n    };\n};\n\nexport type EventSessionIdle = {\n    type: 'session.idle';\n    properties: {\n        sessionID: string;\n    };\n};\n\nexport type SessionStatus = {\n    type: 'idle';\n} | {\n    type: 'retry';\n    attempt: number;\n    message: string;\n    next: number;\n} | {\n    type: 'busy';\n};\n\nexport type EventSessionStatus = {\n    type: 'session.status';\n    properties: {\n        sessionID: string;\n        status: SessionStatus;\n    };\n};\n\nexport type EventPermissionReplied = {\n    type: 'permission.replied';\n    properties: {\n        sessionID: string;\n        requestID: string;\n        reply: 'once' | 'always' | 'reject';\n    };\n};\n\nexport type PermissionRequest = {\n    id: string;\n    sessionID: string;\n    permission: string;\n    patterns: Array<string>;\n    metadata: {\n        [key: string]: unknown;\n    };\n    always: Array<string>;\n    tool?: {\n        messageID: string;\n        callID: string;\n    };\n};\n\nexport type EventPermissionAsked = {\n    type: 'permission.asked';\n    properties: PermissionRequest;\n};\n\nexport type EventMessagePartRemoved = {\n    type: 'message.part.removed';\n    properties: {\n        sessionID: string;\n        messageID: string;\n        partID: string;\n    };\n};\n\nexport type CompactionPart = {\n    id: string;\n    sessionID: string;\n    messageID: string;\n    type: 'compaction';\n    auto: boolean;\n};\n\nexport type RetryPart = {\n    id: string;\n    sessionID: string;\n    messageID: string;\n    type: 'retry';\n    attempt: number;\n    error: ApiError;\n    time: {\n        created: number;\n    };\n};\n\nexport type AgentPart = {\n    id: string;\n    sessionID: string;\n    messageID: string;\n    type: 'agent';\n    name: string;\n    source?: {\n        value: string;\n        start: number;\n        end: number;\n    };\n};\n\nexport type PatchPart = {\n    id: string;\n    sessionID: string;\n    messageID: string;\n    type: 'patch';\n    hash: string;\n    files: Array<string>;\n};\n\nexport type SnapshotPart = {\n    id: string;\n    sessionID: string;\n    messageID: string;\n    type: 'snapshot';\n    snapshot: string;\n};\n\nexport type StepFinishPart = {\n    id: string;\n    sessionID: string;\n    messageID: string;\n    type: 'step-finish';\n    reason: string;\n    snapshot?: string;\n    cost: number;\n    tokens: {\n        input: number;\n        output: number;\n        reasoning: number;\n        cache: {\n            read: number;\n            write: number;\n        };\n    };\n};\n\nexport type StepStartPart = {\n    id: string;\n    sessionID: string;\n    messageID: string;\n    type: 'step-start';\n    snapshot?: string;\n};\n\nexport type ToolStateError = {\n    status: 'error';\n    input: {\n        [key: string]: unknown;\n    };\n    error: string;\n    metadata?: {\n        [key: string]: unknown;\n    };\n    time: {\n        start: number;\n        end: number;\n    };\n};\n\nexport type ToolStateCompleted = {\n    status: 'completed';\n    input: {\n        [key: string]: unknown;\n    };\n    output: string;\n    title: string;\n    metadata: {\n        [key: string]: unknown;\n    };\n    time: {\n        start: number;\n        end: number;\n        compacted?: number;\n    };\n    attachments?: Array<FilePart>;\n};\n\nexport type FilePart = {\n    id: string;\n    sessionID: string;\n    messageID: string;\n    type: 'file';\n    mime: string;\n    filename?: string;\n    url: string;\n    source?: FilePartSource;\n};\n\nexport type ToolStateRunning = {\n    status: 'running';\n    input: {\n        [key: string]: unknown;\n    };\n    title?: string;\n    metadata?: {\n        [key: string]: unknown;\n    };\n    time: {\n        start: number;\n    };\n};\n\nexport type ToolStatePending = {\n    status: 'pending';\n    input: {\n        [key: string]: unknown;\n    };\n    raw: string;\n};\n\nexport type ToolState = ToolStatePending | ToolStateRunning | ToolStateCompleted | ToolStateError;\n\nexport type ToolPart = {\n    id: string;\n    sessionID: string;\n    messageID: string;\n    type: 'tool';\n    callID: string;\n    tool: string;\n    state: ToolState;\n    metadata?: {\n        [key: string]: unknown;\n    };\n};\n\nexport type ReasoningPart = {\n    id: string;\n    sessionID: string;\n    messageID: string;\n    type: 'reasoning';\n    text: string;\n    metadata?: {\n        [key: string]: unknown;\n    };\n    time: {\n        start: number;\n        end?: number;\n    };\n};\n\nexport type TextPart = {\n    id: string;\n    sessionID: string;\n    messageID: string;\n    type: 'text';\n    text: string;\n    synthetic?: boolean;\n    ignored?: boolean;\n    time?: {\n        start: number;\n        end?: number;\n    };\n    metadata?: {\n        [key: string]: unknown;\n    };\n};\n\nexport type Part = TextPart | {\n    id: string;\n    sessionID: string;\n    messageID: string;\n    type: 'subtask';\n    prompt: string;\n    description: string;\n    agent: string;\n    command?: string;\n} | ReasoningPart | FilePart | ToolPart | StepStartPart | StepFinishPart | SnapshotPart | PatchPart | AgentPart | RetryPart | CompactionPart;\n\nexport type EventMessagePartUpdated = {\n    type: 'message.part.updated';\n    properties: {\n        part: Part;\n        delta?: string;\n    };\n};\n\nexport type EventMessageRemoved = {\n    type: 'message.removed';\n    properties: {\n        sessionID: string;\n        messageID: string;\n    };\n};\n\nexport type AssistantMessage = {\n    id: string;\n    sessionID: string;\n    role: 'assistant';\n    time: {\n        created: number;\n        completed?: number;\n    };\n    error?: ProviderAuthError | UnknownError | MessageOutputLengthError | MessageAbortedError | ApiError;\n    parentID: string;\n    modelID: string;\n    providerID: string;\n    mode: string;\n    agent: string;\n    path: {\n        cwd: string;\n        root: string;\n    };\n    summary?: boolean;\n    cost: number;\n    tokens: {\n        input: number;\n        output: number;\n        reasoning: number;\n        cache: {\n            read: number;\n            write: number;\n        };\n    };\n    finish?: string;\n};\n\nexport type UserMessage = {\n    id: string;\n    sessionID: string;\n    role: 'user';\n    time: {\n        created: number;\n    };\n    summary?: {\n        title?: string;\n        body?: string;\n        diffs: Array<FileDiff>;\n    };\n    agent: string;\n    model: {\n        providerID: string;\n        modelID: string;\n    };\n    system?: string;\n    tools?: {\n        [key: string]: boolean;\n    };\n    variant?: string;\n};\n\nexport type Message = UserMessage | AssistantMessage;\n\nexport type EventMessageUpdated = {\n    type: 'message.updated';\n    properties: {\n        info: Message;\n    };\n};\n\nexport type EventLspUpdated = {\n    type: 'lsp.updated';\n    properties: {\n        [key: string]: unknown;\n    };\n};\n\nexport type EventLspClientDiagnostics = {\n    type: 'lsp.client.diagnostics';\n    properties: {\n        serverID: string;\n        path: string;\n    };\n};\n\nexport type EventServerInstanceDisposed = {\n    type: 'server.instance.disposed';\n    properties: {\n        directory: string;\n    };\n};\n\nexport type Project = {\n    id: string;\n    worktree: string;\n    vcs?: 'git';\n    name?: string;\n    icon?: {\n        url?: string;\n        color?: string;\n    };\n    time: {\n        created: number;\n        updated: number;\n        initialized?: number;\n    };\n};\n\nexport type EventProjectUpdated = {\n    type: 'project.updated';\n    properties: Project;\n};\n\nexport type EventInstallationUpdateAvailable = {\n    type: 'installation.update-available';\n    properties: {\n        version: string;\n    };\n};\n\nexport type EventInstallationUpdated = {\n    type: 'installation.updated';\n    properties: {\n        version: string;\n    };\n};\n\nexport type Event = EventInstallationUpdated | EventInstallationUpdateAvailable | EventProjectUpdated | EventServerInstanceDisposed | EventLspClientDiagnostics | EventLspUpdated | EventMessageUpdated | EventMessageRemoved | EventMessagePartUpdated | EventMessagePartRemoved | EventPermissionAsked | EventPermissionReplied | EventSessionStatus | EventSessionIdle | EventSessionCompacted | EventFileEdited | EventTodoUpdated | EventTuiPromptAppend | EventTuiCommandExecute | EventTuiToastShow | EventMcpToolsChanged | EventCommandExecuted | EventSessionCreated | EventSessionUpdated | EventSessionDeleted | EventSessionDiff | EventSessionError | EventFileWatcherUpdated | EventVcsBranchUpdated | EventPtyCreated | EventPtyUpdated | EventPtyExited | EventPtyDeleted | EventServerConnected | EventGlobalDisposed;\n\nexport type EventSubscribeData = {\n    body?: never;\n    path?: never;\n    query?: {\n        directory?: string;\n    };\n    url: '/event';\n};\n\nexport type EventSubscribeResponses = {\n    /**\n     * Event stream\n     */\n    200: Event;\n};\n\nexport type EventSubscribeResponse = EventSubscribeResponses[keyof EventSubscribeResponses];\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/sse-tanstack-react-query/@tanstack/react-query.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport { type DefaultError, queryOptions } from '@tanstack/react-query';\n\nimport { client } from '../client.gen';\nimport { listEvents, type Options } from '../sdk.gen';\nimport type { ListEventsData, ListEventsResponse } from '../types.gen';\n\nexport type QueryKey<TOptions extends Options> = [\n    Pick<TOptions, 'baseUrl' | 'body' | 'headers' | 'path' | 'query'> & {\n        _id: string;\n        _infinite?: boolean;\n        tags?: ReadonlyArray<string>;\n    }\n];\n\nconst createQueryKey = <TOptions extends Options>(id: string, options?: TOptions, infinite?: boolean, tags?: ReadonlyArray<string>): [\n    QueryKey<TOptions>[0]\n] => {\n    const params: QueryKey<TOptions>[0] = { _id: id, baseUrl: options?.baseUrl || (options?.client ?? client).getConfig().baseUrl } as QueryKey<TOptions>[0];\n    if (infinite) {\n        params._infinite = infinite;\n    }\n    if (tags) {\n        params.tags = tags;\n    }\n    if (options?.body) {\n        params.body = options.body;\n    }\n    if (options?.headers) {\n        params.headers = options.headers;\n    }\n    if (options?.path) {\n        params.path = options.path;\n    }\n    if (options?.query) {\n        params.query = options.query;\n    }\n    return [params];\n};\n\nexport const listEventsQueryKey = (options?: Options<ListEventsData>) => createQueryKey('listEvents', options);\n\n/**\n * List events\n */\nexport const listEventsOptions = (options?: Options<ListEventsData>) => queryOptions<ListEventsResponse, DefaultError, ListEventsResponse, ReturnType<typeof listEventsQueryKey>>({\n    queryFn: async ({ queryKey, signal }) => {\n        const { data } = await listEvents({\n            ...options,\n            ...queryKey[0],\n            signal,\n            throwOnError: true\n        });\n        return data;\n    },\n    queryKey: listEventsQueryKey(options)\n});\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/sse-tanstack-react-query/client/client.gen.ts",
    "content": "// 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 (options: RequestOptions) => {\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 url = buildUrl(opts);\n\n    return { opts, url };\n  };\n\n  const request: Client['request'] = async (options) => {\n    // @ts-expect-error\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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/sse-tanstack-react-query/client/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type { Auth } from '../core/auth.gen';\nexport type { QuerySerializerOptions } from '../core/bodySerializer.gen';\nexport {\n  formDataBodySerializer,\n  jsonBodySerializer,\n  urlSearchParamsBodySerializer,\n} from '../core/bodySerializer.gen';\nexport { buildClientParams } from '../core/params.gen';\nexport { serializeQueryKeyValue } from '../core/queryKeySerializer.gen';\nexport { createClient } from './client.gen';\nexport type {\n  Client,\n  ClientOptions,\n  Config,\n  CreateClientConfig,\n  Options,\n  RequestOptions,\n  RequestResult,\n  ResolvedRequestOptions,\n  ResponseStyle,\n  TDataShape,\n} from './types.gen';\nexport { createConfig, mergeHeaders } from './utils.gen';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/sse-tanstack-react-query/client/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { Auth } from '../core/auth.gen';\nimport type {\n  ServerSentEventsOptions,\n  ServerSentEventsResult,\n} from '../core/serverSentEvents.gen';\nimport type { Client as CoreClient, Config as CoreConfig } from '../core/types.gen';\nimport type { Middleware } from './utils.gen';\n\nexport type ResponseStyle = 'data' | 'fields';\n\nexport interface Config<T extends ClientOptions = ClientOptions>\n  extends Omit<RequestInit, 'body' | 'headers' | 'method'>, CoreConfig {\n  /**\n   * Base URL for all requests made by this client.\n   */\n  baseUrl?: T['baseUrl'];\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   * Please don't use the Fetch client for Next.js applications. The `next`\n   * options won't have any effect.\n   *\n   * Install {@link https://www.npmjs.com/package/@hey-api/client-next `@hey-api/client-next`} instead.\n   */\n  next?: never;\n  /**\n   * Return the response data parsed in a specified format. By default, `auto`\n   * will infer the appropriate method from the `Content-Type` response header.\n   * You can override this behavior with any of the {@link Body} methods.\n   * Select `stream` if you don't want to parse response data at all.\n   *\n   * @default 'auto'\n   */\n  parseAs?: 'arrayBuffer' | 'auto' | 'blob' | 'formData' | 'json' | 'stream' | 'text';\n  /**\n   * Should we return only data or multiple fields (data, error, response, etc.)?\n   *\n   * @default 'fields'\n   */\n  responseStyle?: ResponseStyle;\n  /**\n   * Throw an error instead of returning it in the response?\n   *\n   * @default false\n   */\n  throwOnError?: T['throwOnError'];\n}\n\nexport interface RequestOptions<\n  TData = unknown,\n  TResponseStyle extends ResponseStyle = 'fields',\n  ThrowOnError extends boolean = boolean,\n  Url extends string = string,\n>\n  extends\n    Config<{\n      responseStyle: TResponseStyle;\n      throwOnError: ThrowOnError;\n    }>,\n    Pick<\n      ServerSentEventsOptions<TData>,\n      | 'onRequest'\n      | 'onSseError'\n      | 'onSseEvent'\n      | 'sseDefaultRetryDelay'\n      | 'sseMaxRetryAttempts'\n      | 'sseMaxRetryDelay'\n    > {\n  /**\n   * Any body that you want to add to your request.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/fetch#body}\n   */\n  body?: unknown;\n  path?: Record<string, unknown>;\n  query?: Record<string, unknown>;\n  /**\n   * Security mechanism(s) to use for the request.\n   */\n  security?: ReadonlyArray<Auth>;\n  url: Url;\n}\n\nexport interface ResolvedRequestOptions<\n  TResponseStyle extends ResponseStyle = 'fields',\n  ThrowOnError extends boolean = boolean,\n  Url extends string = string,\n> extends RequestOptions<unknown, TResponseStyle, ThrowOnError, Url> {\n  serializedBody?: string;\n}\n\nexport type RequestResult<\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = boolean,\n  TResponseStyle extends ResponseStyle = 'fields',\n> = ThrowOnError extends true\n  ? Promise<\n      TResponseStyle extends 'data'\n        ? TData extends Record<string, unknown>\n          ? TData[keyof TData]\n          : TData\n        : {\n            data: TData extends Record<string, unknown> ? TData[keyof TData] : TData;\n            request: Request;\n            response: Response;\n          }\n    >\n  : Promise<\n      TResponseStyle extends 'data'\n        ? (TData extends Record<string, unknown> ? TData[keyof TData] : TData) | undefined\n        : (\n            | {\n                data: TData extends Record<string, unknown> ? TData[keyof TData] : TData;\n                error: undefined;\n              }\n            | {\n                data: undefined;\n                error: TError extends Record<string, unknown> ? TError[keyof TError] : TError;\n              }\n          ) & {\n            request: Request;\n            response: Response;\n          }\n    >;\n\nexport interface ClientOptions {\n  baseUrl?: string;\n  responseStyle?: ResponseStyle;\n  throwOnError?: boolean;\n}\n\ntype MethodFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'>,\n) => RequestResult<TData, TError, ThrowOnError, TResponseStyle>;\n\ntype SseFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'>,\n) => Promise<ServerSentEventsResult<TData, TError>>;\n\ntype RequestFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'> &\n    Pick<Required<RequestOptions<TData, TResponseStyle, ThrowOnError>>, 'method'>,\n) => RequestResult<TData, TError, ThrowOnError, TResponseStyle>;\n\ntype BuildUrlFn = <\n  TData extends {\n    body?: unknown;\n    path?: Record<string, unknown>;\n    query?: Record<string, unknown>;\n    url: string;\n  },\n>(\n  options: TData & Options<TData>,\n) => string;\n\nexport type Client = CoreClient<RequestFn, Config, MethodFn, BuildUrlFn, SseFn> & {\n  interceptors: Middleware<Request, Response, unknown, ResolvedRequestOptions>;\n};\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 = ClientOptions> = (\n  override?: Config<ClientOptions & T>,\n) => Config<Required<ClientOptions> & T>;\n\nexport interface TDataShape {\n  body?: unknown;\n  headers?: unknown;\n  path?: unknown;\n  query?: unknown;\n  url: string;\n}\n\ntype OmitKeys<T, K> = Pick<T, Exclude<keyof T, K>>;\n\nexport type Options<\n  TData extends TDataShape = TDataShape,\n  ThrowOnError extends boolean = boolean,\n  TResponse = unknown,\n  TResponseStyle extends ResponseStyle = 'fields',\n> = OmitKeys<\n  RequestOptions<TResponse, TResponseStyle, ThrowOnError>,\n  'body' | 'path' | 'query' | 'url'\n> &\n  ([TData] extends [never] ? unknown : Omit<TData, 'url'>);\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/sse-tanstack-react-query/client/utils.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/sse-tanstack-react-query/client.gen.ts",
    "content": "// 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>());\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/sse-tanstack-react-query/core/auth.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/sse-tanstack-react-query/core/bodySerializer.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/sse-tanstack-react-query/core/params.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/sse-tanstack-react-query/core/pathSerializer.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/sse-tanstack-react-query/core/queryKeySerializer.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\n/**\n * JSON-friendly union that mirrors what Pinia Colada can hash.\n */\nexport type JsonValue =\n  | null\n  | string\n  | number\n  | boolean\n  | JsonValue[]\n  | { [key: string]: JsonValue };\n\n/**\n * Replacer that converts non-JSON values (bigint, Date, etc.) to safe substitutes.\n */\nexport const queryKeyJsonReplacer = (_key: string, value: unknown) => {\n  if (value === undefined || typeof value === 'function' || typeof value === 'symbol') {\n    return undefined;\n  }\n  if (typeof value === 'bigint') {\n    return value.toString();\n  }\n  if (value instanceof Date) {\n    return value.toISOString();\n  }\n  return value;\n};\n\n/**\n * Safely stringifies a value and parses it back into a JsonValue.\n */\nexport const stringifyToJsonValue = (input: unknown): JsonValue | undefined => {\n  try {\n    const json = JSON.stringify(input, queryKeyJsonReplacer);\n    if (json === undefined) {\n      return undefined;\n    }\n    return JSON.parse(json) as JsonValue;\n  } catch {\n    return undefined;\n  }\n};\n\n/**\n * Detects plain objects (including objects with a null prototype).\n */\nconst isPlainObject = (value: unknown): value is Record<string, unknown> => {\n  if (value === null || typeof value !== 'object') {\n    return false;\n  }\n  const prototype = Object.getPrototypeOf(value as object);\n  return prototype === Object.prototype || prototype === null;\n};\n\n/**\n * Turns URLSearchParams into a sorted JSON object for deterministic keys.\n */\nconst serializeSearchParams = (params: URLSearchParams): JsonValue => {\n  const entries = Array.from(params.entries()).sort(([a], [b]) => a.localeCompare(b));\n  const result: Record<string, JsonValue> = {};\n\n  for (const [key, value] of entries) {\n    const existing = result[key];\n    if (existing === undefined) {\n      result[key] = value;\n      continue;\n    }\n\n    if (Array.isArray(existing)) {\n      (existing as string[]).push(value);\n    } else {\n      result[key] = [existing, value];\n    }\n  }\n\n  return result;\n};\n\n/**\n * Normalizes any accepted value into a JSON-friendly shape for query keys.\n */\nexport const serializeQueryKeyValue = (value: unknown): JsonValue | undefined => {\n  if (value === null) {\n    return null;\n  }\n\n  if (typeof value === 'string' || typeof value === 'number' || typeof value === 'boolean') {\n    return value;\n  }\n\n  if (value === undefined || typeof value === 'function' || typeof value === 'symbol') {\n    return undefined;\n  }\n\n  if (typeof value === 'bigint') {\n    return value.toString();\n  }\n\n  if (value instanceof Date) {\n    return value.toISOString();\n  }\n\n  if (Array.isArray(value)) {\n    return stringifyToJsonValue(value);\n  }\n\n  if (typeof URLSearchParams !== 'undefined' && value instanceof URLSearchParams) {\n    return serializeSearchParams(value);\n  }\n\n  if (isPlainObject(value)) {\n    return stringifyToJsonValue(value);\n  }\n\n  return undefined;\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/sse-tanstack-react-query/core/serverSentEvents.gen.ts",
    "content": "// 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 const 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            // Normalize line endings: CRLF -> LF, then CR -> LF\n            buffer = buffer.replace(/\\r\\n/g, '\\n').replace(/\\r/g, '\\n');\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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/sse-tanstack-react-query/core/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { Auth, AuthToken } from './auth.gen';\nimport type { BodySerializer, QuerySerializer, QuerySerializerOptions } from './bodySerializer.gen';\n\nexport type HttpMethod =\n  | 'connect'\n  | 'delete'\n  | 'get'\n  | 'head'\n  | 'options'\n  | 'patch'\n  | 'post'\n  | 'put'\n  | 'trace';\n\nexport type Client<\n  RequestFn = never,\n  Config = unknown,\n  MethodFn = never,\n  BuildUrlFn = never,\n  SseFn = never,\n> = {\n  /**\n   * Returns the final request URL.\n   */\n  buildUrl: BuildUrlFn;\n  getConfig: () => Config;\n  request: RequestFn;\n  setConfig: (config: Config) => Config;\n} & {\n  [K in HttpMethod]: MethodFn;\n} & ([SseFn] extends [never] ? { sse?: never } : { sse: { [K in HttpMethod]: SseFn } });\n\nexport interface Config {\n  /**\n   * Auth token or a function returning auth token. The resolved value will be\n   * added to the request payload as defined by its `security` array.\n   */\n  auth?: ((auth: Auth) => Promise<AuthToken> | AuthToken) | AuthToken;\n  /**\n   * A function for serializing request body parameter. By default,\n   * {@link JSON.stringify()} will be used.\n   */\n  bodySerializer?: BodySerializer | null;\n  /**\n   * An object containing any HTTP headers that you want to pre-populate your\n   * `Headers` object with.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/Headers/Headers#init See more}\n   */\n  headers?:\n    | RequestInit['headers']\n    | Record<\n        string,\n        string | number | boolean | (string | number | boolean)[] | null | undefined | unknown\n      >;\n  /**\n   * The request method.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/fetch#method See more}\n   */\n  method?: Uppercase<HttpMethod>;\n  /**\n   * A function for serializing request query parameters. By default, arrays\n   * will be exploded in form style, objects will be exploded in deepObject\n   * style, and reserved characters are percent-encoded.\n   *\n   * This method will have no effect if the native `paramsSerializer()` Axios\n   * API function is used.\n   *\n   * {@link https://swagger.io/docs/specification/serialization/#query View examples}\n   */\n  querySerializer?: QuerySerializer | QuerySerializerOptions;\n  /**\n   * A function validating request data. This is useful if you want to ensure\n   * the request conforms to the desired shape, so it can be safely sent to\n   * the server.\n   */\n  requestValidator?: (data: unknown) => Promise<unknown>;\n  /**\n   * A function transforming response data before it's returned. This is useful\n   * for post-processing data, e.g. converting ISO strings into Date objects.\n   */\n  responseTransformer?: (data: unknown) => Promise<unknown>;\n  /**\n   * A function validating response data. This is useful if you want to ensure\n   * the response conforms to the desired shape, so it can be safely passed to\n   * the transformers and returned to the user.\n   */\n  responseValidator?: (data: unknown) => Promise<unknown>;\n}\n\ntype IsExactlyNeverOrNeverUndefined<T> = [T] extends [never]\n  ? true\n  : [T] extends [never | undefined]\n    ? [undefined] extends [T]\n      ? false\n      : true\n    : false;\n\nexport type OmitNever<T extends Record<string, unknown>> = {\n  [K in keyof T as IsExactlyNeverOrNeverUndefined<T[K]> extends true ? never : K]: T[K];\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/sse-tanstack-react-query/core/utils.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/sse-tanstack-react-query/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport { listEvents, type Options, subscribeToEventStream } from './sdk.gen';\nexport type { ClientOptions, ListEventsData, ListEventsResponse, ListEventsResponses, SubscribeToEventStreamData, SubscribeToEventStreamResponse, SubscribeToEventStreamResponses } from './types.gen';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/sse-tanstack-react-query/sdk.gen.ts",
    "content": "// 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 { ListEventsData, ListEventsResponses, SubscribeToEventStreamData, SubscribeToEventStreamResponses } from './types.gen';\n\nexport type Options<TData extends TDataShape = TDataShape, ThrowOnError extends boolean = boolean> = Options2<TData, ThrowOnError> & {\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 * Subscribe to event stream\n */\nexport const subscribeToEventStream = <ThrowOnError extends boolean = false>(options?: Options<SubscribeToEventStreamData, ThrowOnError>) => (options?.client ?? client).sse.post<SubscribeToEventStreamResponses, unknown, ThrowOnError>({ url: '/events/subscribe', ...options });\n\n/**\n * List events\n */\nexport const listEvents = <ThrowOnError extends boolean = false>(options?: Options<ListEventsData, ThrowOnError>) => (options?.client ?? client).get<ListEventsResponses, unknown, ThrowOnError>({ url: '/events/list', ...options });\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/sse-tanstack-react-query/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type ClientOptions = {\n    baseUrl: `${string}://${string}` | (string & {});\n};\n\nexport type SubscribeToEventStreamData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/events/subscribe';\n};\n\nexport type SubscribeToEventStreamResponses = {\n    /**\n     * Event stream\n     */\n    200: {\n        [key: string]: unknown;\n    };\n};\n\nexport type SubscribeToEventStreamResponse = SubscribeToEventStreamResponses[keyof SubscribeToEventStreamResponses];\n\nexport type ListEventsData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/events/list';\n};\n\nexport type ListEventsResponses = {\n    /**\n     * OK\n     */\n    200: Array<string>;\n};\n\nexport type ListEventsResponse = ListEventsResponses[keyof ListEventsResponses];\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/string-with-format/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type { ClientOptions, Foo } from './types.gen';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/string-with-format/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type ClientOptions = {\n    baseUrl: `${string}://${string}` | (string & {});\n};\n\nexport type Foo = {\n    foo?: Array<Blob | File | string>;\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/transformers-all-of/client/client.gen.ts",
    "content": "// 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 (options: RequestOptions) => {\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 url = buildUrl(opts);\n\n    return { opts, url };\n  };\n\n  const request: Client['request'] = async (options) => {\n    // @ts-expect-error\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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/transformers-all-of/client/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type { Auth } from '../core/auth.gen';\nexport type { QuerySerializerOptions } from '../core/bodySerializer.gen';\nexport {\n  formDataBodySerializer,\n  jsonBodySerializer,\n  urlSearchParamsBodySerializer,\n} from '../core/bodySerializer.gen';\nexport { buildClientParams } from '../core/params.gen';\nexport { serializeQueryKeyValue } from '../core/queryKeySerializer.gen';\nexport { createClient } from './client.gen';\nexport type {\n  Client,\n  ClientOptions,\n  Config,\n  CreateClientConfig,\n  Options,\n  RequestOptions,\n  RequestResult,\n  ResolvedRequestOptions,\n  ResponseStyle,\n  TDataShape,\n} from './types.gen';\nexport { createConfig, mergeHeaders } from './utils.gen';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/transformers-all-of/client/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { Auth } from '../core/auth.gen';\nimport type {\n  ServerSentEventsOptions,\n  ServerSentEventsResult,\n} from '../core/serverSentEvents.gen';\nimport type { Client as CoreClient, Config as CoreConfig } from '../core/types.gen';\nimport type { Middleware } from './utils.gen';\n\nexport type ResponseStyle = 'data' | 'fields';\n\nexport interface Config<T extends ClientOptions = ClientOptions>\n  extends Omit<RequestInit, 'body' | 'headers' | 'method'>, CoreConfig {\n  /**\n   * Base URL for all requests made by this client.\n   */\n  baseUrl?: T['baseUrl'];\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   * Please don't use the Fetch client for Next.js applications. The `next`\n   * options won't have any effect.\n   *\n   * Install {@link https://www.npmjs.com/package/@hey-api/client-next `@hey-api/client-next`} instead.\n   */\n  next?: never;\n  /**\n   * Return the response data parsed in a specified format. By default, `auto`\n   * will infer the appropriate method from the `Content-Type` response header.\n   * You can override this behavior with any of the {@link Body} methods.\n   * Select `stream` if you don't want to parse response data at all.\n   *\n   * @default 'auto'\n   */\n  parseAs?: 'arrayBuffer' | 'auto' | 'blob' | 'formData' | 'json' | 'stream' | 'text';\n  /**\n   * Should we return only data or multiple fields (data, error, response, etc.)?\n   *\n   * @default 'fields'\n   */\n  responseStyle?: ResponseStyle;\n  /**\n   * Throw an error instead of returning it in the response?\n   *\n   * @default false\n   */\n  throwOnError?: T['throwOnError'];\n}\n\nexport interface RequestOptions<\n  TData = unknown,\n  TResponseStyle extends ResponseStyle = 'fields',\n  ThrowOnError extends boolean = boolean,\n  Url extends string = string,\n>\n  extends\n    Config<{\n      responseStyle: TResponseStyle;\n      throwOnError: ThrowOnError;\n    }>,\n    Pick<\n      ServerSentEventsOptions<TData>,\n      | 'onRequest'\n      | 'onSseError'\n      | 'onSseEvent'\n      | 'sseDefaultRetryDelay'\n      | 'sseMaxRetryAttempts'\n      | 'sseMaxRetryDelay'\n    > {\n  /**\n   * Any body that you want to add to your request.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/fetch#body}\n   */\n  body?: unknown;\n  path?: Record<string, unknown>;\n  query?: Record<string, unknown>;\n  /**\n   * Security mechanism(s) to use for the request.\n   */\n  security?: ReadonlyArray<Auth>;\n  url: Url;\n}\n\nexport interface ResolvedRequestOptions<\n  TResponseStyle extends ResponseStyle = 'fields',\n  ThrowOnError extends boolean = boolean,\n  Url extends string = string,\n> extends RequestOptions<unknown, TResponseStyle, ThrowOnError, Url> {\n  serializedBody?: string;\n}\n\nexport type RequestResult<\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = boolean,\n  TResponseStyle extends ResponseStyle = 'fields',\n> = ThrowOnError extends true\n  ? Promise<\n      TResponseStyle extends 'data'\n        ? TData extends Record<string, unknown>\n          ? TData[keyof TData]\n          : TData\n        : {\n            data: TData extends Record<string, unknown> ? TData[keyof TData] : TData;\n            request: Request;\n            response: Response;\n          }\n    >\n  : Promise<\n      TResponseStyle extends 'data'\n        ? (TData extends Record<string, unknown> ? TData[keyof TData] : TData) | undefined\n        : (\n            | {\n                data: TData extends Record<string, unknown> ? TData[keyof TData] : TData;\n                error: undefined;\n              }\n            | {\n                data: undefined;\n                error: TError extends Record<string, unknown> ? TError[keyof TError] : TError;\n              }\n          ) & {\n            request: Request;\n            response: Response;\n          }\n    >;\n\nexport interface ClientOptions {\n  baseUrl?: string;\n  responseStyle?: ResponseStyle;\n  throwOnError?: boolean;\n}\n\ntype MethodFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'>,\n) => RequestResult<TData, TError, ThrowOnError, TResponseStyle>;\n\ntype SseFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'>,\n) => Promise<ServerSentEventsResult<TData, TError>>;\n\ntype RequestFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'> &\n    Pick<Required<RequestOptions<TData, TResponseStyle, ThrowOnError>>, 'method'>,\n) => RequestResult<TData, TError, ThrowOnError, TResponseStyle>;\n\ntype BuildUrlFn = <\n  TData extends {\n    body?: unknown;\n    path?: Record<string, unknown>;\n    query?: Record<string, unknown>;\n    url: string;\n  },\n>(\n  options: TData & Options<TData>,\n) => string;\n\nexport type Client = CoreClient<RequestFn, Config, MethodFn, BuildUrlFn, SseFn> & {\n  interceptors: Middleware<Request, Response, unknown, ResolvedRequestOptions>;\n};\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 = ClientOptions> = (\n  override?: Config<ClientOptions & T>,\n) => Config<Required<ClientOptions> & T>;\n\nexport interface TDataShape {\n  body?: unknown;\n  headers?: unknown;\n  path?: unknown;\n  query?: unknown;\n  url: string;\n}\n\ntype OmitKeys<T, K> = Pick<T, Exclude<keyof T, K>>;\n\nexport type Options<\n  TData extends TDataShape = TDataShape,\n  ThrowOnError extends boolean = boolean,\n  TResponse = unknown,\n  TResponseStyle extends ResponseStyle = 'fields',\n> = OmitKeys<\n  RequestOptions<TResponse, TResponseStyle, ThrowOnError>,\n  'body' | 'path' | 'query' | 'url'\n> &\n  ([TData] extends [never] ? unknown : Omit<TData, 'url'>);\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/transformers-all-of/client/utils.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/transformers-all-of/client.gen.ts",
    "content": "// 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>());\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/transformers-all-of/core/auth.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/transformers-all-of/core/bodySerializer.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/transformers-all-of/core/params.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/transformers-all-of/core/pathSerializer.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/transformers-all-of/core/queryKeySerializer.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\n/**\n * JSON-friendly union that mirrors what Pinia Colada can hash.\n */\nexport type JsonValue =\n  | null\n  | string\n  | number\n  | boolean\n  | JsonValue[]\n  | { [key: string]: JsonValue };\n\n/**\n * Replacer that converts non-JSON values (bigint, Date, etc.) to safe substitutes.\n */\nexport const queryKeyJsonReplacer = (_key: string, value: unknown) => {\n  if (value === undefined || typeof value === 'function' || typeof value === 'symbol') {\n    return undefined;\n  }\n  if (typeof value === 'bigint') {\n    return value.toString();\n  }\n  if (value instanceof Date) {\n    return value.toISOString();\n  }\n  return value;\n};\n\n/**\n * Safely stringifies a value and parses it back into a JsonValue.\n */\nexport const stringifyToJsonValue = (input: unknown): JsonValue | undefined => {\n  try {\n    const json = JSON.stringify(input, queryKeyJsonReplacer);\n    if (json === undefined) {\n      return undefined;\n    }\n    return JSON.parse(json) as JsonValue;\n  } catch {\n    return undefined;\n  }\n};\n\n/**\n * Detects plain objects (including objects with a null prototype).\n */\nconst isPlainObject = (value: unknown): value is Record<string, unknown> => {\n  if (value === null || typeof value !== 'object') {\n    return false;\n  }\n  const prototype = Object.getPrototypeOf(value as object);\n  return prototype === Object.prototype || prototype === null;\n};\n\n/**\n * Turns URLSearchParams into a sorted JSON object for deterministic keys.\n */\nconst serializeSearchParams = (params: URLSearchParams): JsonValue => {\n  const entries = Array.from(params.entries()).sort(([a], [b]) => a.localeCompare(b));\n  const result: Record<string, JsonValue> = {};\n\n  for (const [key, value] of entries) {\n    const existing = result[key];\n    if (existing === undefined) {\n      result[key] = value;\n      continue;\n    }\n\n    if (Array.isArray(existing)) {\n      (existing as string[]).push(value);\n    } else {\n      result[key] = [existing, value];\n    }\n  }\n\n  return result;\n};\n\n/**\n * Normalizes any accepted value into a JSON-friendly shape for query keys.\n */\nexport const serializeQueryKeyValue = (value: unknown): JsonValue | undefined => {\n  if (value === null) {\n    return null;\n  }\n\n  if (typeof value === 'string' || typeof value === 'number' || typeof value === 'boolean') {\n    return value;\n  }\n\n  if (value === undefined || typeof value === 'function' || typeof value === 'symbol') {\n    return undefined;\n  }\n\n  if (typeof value === 'bigint') {\n    return value.toString();\n  }\n\n  if (value instanceof Date) {\n    return value.toISOString();\n  }\n\n  if (Array.isArray(value)) {\n    return stringifyToJsonValue(value);\n  }\n\n  if (typeof URLSearchParams !== 'undefined' && value instanceof URLSearchParams) {\n    return serializeSearchParams(value);\n  }\n\n  if (isPlainObject(value)) {\n    return stringifyToJsonValue(value);\n  }\n\n  return undefined;\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/transformers-all-of/core/serverSentEvents.gen.ts",
    "content": "// 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 const 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            // Normalize line endings: CRLF -> LF, then CR -> LF\n            buffer = buffer.replace(/\\r\\n/g, '\\n').replace(/\\r/g, '\\n');\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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/transformers-all-of/core/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { Auth, AuthToken } from './auth.gen';\nimport type { BodySerializer, QuerySerializer, QuerySerializerOptions } from './bodySerializer.gen';\n\nexport type HttpMethod =\n  | 'connect'\n  | 'delete'\n  | 'get'\n  | 'head'\n  | 'options'\n  | 'patch'\n  | 'post'\n  | 'put'\n  | 'trace';\n\nexport type Client<\n  RequestFn = never,\n  Config = unknown,\n  MethodFn = never,\n  BuildUrlFn = never,\n  SseFn = never,\n> = {\n  /**\n   * Returns the final request URL.\n   */\n  buildUrl: BuildUrlFn;\n  getConfig: () => Config;\n  request: RequestFn;\n  setConfig: (config: Config) => Config;\n} & {\n  [K in HttpMethod]: MethodFn;\n} & ([SseFn] extends [never] ? { sse?: never } : { sse: { [K in HttpMethod]: SseFn } });\n\nexport interface Config {\n  /**\n   * Auth token or a function returning auth token. The resolved value will be\n   * added to the request payload as defined by its `security` array.\n   */\n  auth?: ((auth: Auth) => Promise<AuthToken> | AuthToken) | AuthToken;\n  /**\n   * A function for serializing request body parameter. By default,\n   * {@link JSON.stringify()} will be used.\n   */\n  bodySerializer?: BodySerializer | null;\n  /**\n   * An object containing any HTTP headers that you want to pre-populate your\n   * `Headers` object with.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/Headers/Headers#init See more}\n   */\n  headers?:\n    | RequestInit['headers']\n    | Record<\n        string,\n        string | number | boolean | (string | number | boolean)[] | null | undefined | unknown\n      >;\n  /**\n   * The request method.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/fetch#method See more}\n   */\n  method?: Uppercase<HttpMethod>;\n  /**\n   * A function for serializing request query parameters. By default, arrays\n   * will be exploded in form style, objects will be exploded in deepObject\n   * style, and reserved characters are percent-encoded.\n   *\n   * This method will have no effect if the native `paramsSerializer()` Axios\n   * API function is used.\n   *\n   * {@link https://swagger.io/docs/specification/serialization/#query View examples}\n   */\n  querySerializer?: QuerySerializer | QuerySerializerOptions;\n  /**\n   * A function validating request data. This is useful if you want to ensure\n   * the request conforms to the desired shape, so it can be safely sent to\n   * the server.\n   */\n  requestValidator?: (data: unknown) => Promise<unknown>;\n  /**\n   * A function transforming response data before it's returned. This is useful\n   * for post-processing data, e.g. converting ISO strings into Date objects.\n   */\n  responseTransformer?: (data: unknown) => Promise<unknown>;\n  /**\n   * A function validating response data. This is useful if you want to ensure\n   * the response conforms to the desired shape, so it can be safely passed to\n   * the transformers and returned to the user.\n   */\n  responseValidator?: (data: unknown) => Promise<unknown>;\n}\n\ntype IsExactlyNeverOrNeverUndefined<T> = [T] extends [never]\n  ? true\n  : [T] extends [never | undefined]\n    ? [undefined] extends [T]\n      ? false\n      : true\n    : false;\n\nexport type OmitNever<T extends Record<string, unknown>> = {\n  [K in keyof T as IsExactlyNeverOrNeverUndefined<T[K]> extends true ? never : K]: T[K];\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/transformers-all-of/core/utils.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/transformers-all-of/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type { Bar, Baz, ClientOptions, Foo, GetFooData, GetFooResponse, GetFooResponses, Qux } from './types.gen';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/transformers-all-of/transformers.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { GetFooResponse } from './types.gen';\n\nconst quxSchemaResponseTransformer = (data: any) => {\n    if (data.baz) {\n        data.baz = new Date(data.baz);\n    }\n    return data;\n};\n\nconst bazSchemaResponseTransformer = (data: any) => {\n    data = quxSchemaResponseTransformer(data);\n    data.bar = new Date(data.bar);\n    return data;\n};\n\nconst barSchemaResponseTransformer = (data: any) => {\n    data.foo = data.foo.map((item: any) => bazSchemaResponseTransformer(item));\n    return data;\n};\n\nconst fooSchemaResponseTransformer = (data: any) => {\n    data.foo = data.foo.map((item: any) => barSchemaResponseTransformer(item));\n    return data;\n};\n\nexport const getFooResponseTransformer = async (data: any): Promise<GetFooResponse> => {\n    data = fooSchemaResponseTransformer(data);\n    return data;\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/transformers-all-of/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type ClientOptions = {\n    baseUrl: `${string}://${string}` | (string & {});\n};\n\nexport type Foo = {\n    foo: Array<Bar>;\n};\n\nexport type Bar = {\n    foo: Array<Baz>;\n    bar: 'foo' | 'bar' | 'baz';\n};\n\nexport type Baz = Omit<Qux, 'id'> & {\n    foo: number;\n    bar: Date;\n    baz: 'foo' | 'bar' | 'baz';\n    qux: number;\n    id: 'Baz';\n};\n\nexport type Qux = {\n    foo: number;\n    bar: number;\n    baz?: Date;\n    id: string;\n};\n\nexport type GetFooData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/foo';\n};\n\nexport type GetFooResponses = {\n    /**\n     * OK\n     */\n    200: Foo;\n};\n\nexport type GetFooResponse = GetFooResponses[keyof GetFooResponses];\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/transformers-allof-response-wrapper/client/client.gen.ts",
    "content": "// 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 (options: RequestOptions) => {\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 url = buildUrl(opts);\n\n    return { opts, url };\n  };\n\n  const request: Client['request'] = async (options) => {\n    // @ts-expect-error\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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/transformers-allof-response-wrapper/client/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type { Auth } from '../core/auth.gen';\nexport type { QuerySerializerOptions } from '../core/bodySerializer.gen';\nexport {\n  formDataBodySerializer,\n  jsonBodySerializer,\n  urlSearchParamsBodySerializer,\n} from '../core/bodySerializer.gen';\nexport { buildClientParams } from '../core/params.gen';\nexport { serializeQueryKeyValue } from '../core/queryKeySerializer.gen';\nexport { createClient } from './client.gen';\nexport type {\n  Client,\n  ClientOptions,\n  Config,\n  CreateClientConfig,\n  Options,\n  RequestOptions,\n  RequestResult,\n  ResolvedRequestOptions,\n  ResponseStyle,\n  TDataShape,\n} from './types.gen';\nexport { createConfig, mergeHeaders } from './utils.gen';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/transformers-allof-response-wrapper/client/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { Auth } from '../core/auth.gen';\nimport type {\n  ServerSentEventsOptions,\n  ServerSentEventsResult,\n} from '../core/serverSentEvents.gen';\nimport type { Client as CoreClient, Config as CoreConfig } from '../core/types.gen';\nimport type { Middleware } from './utils.gen';\n\nexport type ResponseStyle = 'data' | 'fields';\n\nexport interface Config<T extends ClientOptions = ClientOptions>\n  extends Omit<RequestInit, 'body' | 'headers' | 'method'>, CoreConfig {\n  /**\n   * Base URL for all requests made by this client.\n   */\n  baseUrl?: T['baseUrl'];\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   * Please don't use the Fetch client for Next.js applications. The `next`\n   * options won't have any effect.\n   *\n   * Install {@link https://www.npmjs.com/package/@hey-api/client-next `@hey-api/client-next`} instead.\n   */\n  next?: never;\n  /**\n   * Return the response data parsed in a specified format. By default, `auto`\n   * will infer the appropriate method from the `Content-Type` response header.\n   * You can override this behavior with any of the {@link Body} methods.\n   * Select `stream` if you don't want to parse response data at all.\n   *\n   * @default 'auto'\n   */\n  parseAs?: 'arrayBuffer' | 'auto' | 'blob' | 'formData' | 'json' | 'stream' | 'text';\n  /**\n   * Should we return only data or multiple fields (data, error, response, etc.)?\n   *\n   * @default 'fields'\n   */\n  responseStyle?: ResponseStyle;\n  /**\n   * Throw an error instead of returning it in the response?\n   *\n   * @default false\n   */\n  throwOnError?: T['throwOnError'];\n}\n\nexport interface RequestOptions<\n  TData = unknown,\n  TResponseStyle extends ResponseStyle = 'fields',\n  ThrowOnError extends boolean = boolean,\n  Url extends string = string,\n>\n  extends\n    Config<{\n      responseStyle: TResponseStyle;\n      throwOnError: ThrowOnError;\n    }>,\n    Pick<\n      ServerSentEventsOptions<TData>,\n      | 'onRequest'\n      | 'onSseError'\n      | 'onSseEvent'\n      | 'sseDefaultRetryDelay'\n      | 'sseMaxRetryAttempts'\n      | 'sseMaxRetryDelay'\n    > {\n  /**\n   * Any body that you want to add to your request.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/fetch#body}\n   */\n  body?: unknown;\n  path?: Record<string, unknown>;\n  query?: Record<string, unknown>;\n  /**\n   * Security mechanism(s) to use for the request.\n   */\n  security?: ReadonlyArray<Auth>;\n  url: Url;\n}\n\nexport interface ResolvedRequestOptions<\n  TResponseStyle extends ResponseStyle = 'fields',\n  ThrowOnError extends boolean = boolean,\n  Url extends string = string,\n> extends RequestOptions<unknown, TResponseStyle, ThrowOnError, Url> {\n  serializedBody?: string;\n}\n\nexport type RequestResult<\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = boolean,\n  TResponseStyle extends ResponseStyle = 'fields',\n> = ThrowOnError extends true\n  ? Promise<\n      TResponseStyle extends 'data'\n        ? TData extends Record<string, unknown>\n          ? TData[keyof TData]\n          : TData\n        : {\n            data: TData extends Record<string, unknown> ? TData[keyof TData] : TData;\n            request: Request;\n            response: Response;\n          }\n    >\n  : Promise<\n      TResponseStyle extends 'data'\n        ? (TData extends Record<string, unknown> ? TData[keyof TData] : TData) | undefined\n        : (\n            | {\n                data: TData extends Record<string, unknown> ? TData[keyof TData] : TData;\n                error: undefined;\n              }\n            | {\n                data: undefined;\n                error: TError extends Record<string, unknown> ? TError[keyof TError] : TError;\n              }\n          ) & {\n            request: Request;\n            response: Response;\n          }\n    >;\n\nexport interface ClientOptions {\n  baseUrl?: string;\n  responseStyle?: ResponseStyle;\n  throwOnError?: boolean;\n}\n\ntype MethodFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'>,\n) => RequestResult<TData, TError, ThrowOnError, TResponseStyle>;\n\ntype SseFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'>,\n) => Promise<ServerSentEventsResult<TData, TError>>;\n\ntype RequestFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'> &\n    Pick<Required<RequestOptions<TData, TResponseStyle, ThrowOnError>>, 'method'>,\n) => RequestResult<TData, TError, ThrowOnError, TResponseStyle>;\n\ntype BuildUrlFn = <\n  TData extends {\n    body?: unknown;\n    path?: Record<string, unknown>;\n    query?: Record<string, unknown>;\n    url: string;\n  },\n>(\n  options: TData & Options<TData>,\n) => string;\n\nexport type Client = CoreClient<RequestFn, Config, MethodFn, BuildUrlFn, SseFn> & {\n  interceptors: Middleware<Request, Response, unknown, ResolvedRequestOptions>;\n};\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 = ClientOptions> = (\n  override?: Config<ClientOptions & T>,\n) => Config<Required<ClientOptions> & T>;\n\nexport interface TDataShape {\n  body?: unknown;\n  headers?: unknown;\n  path?: unknown;\n  query?: unknown;\n  url: string;\n}\n\ntype OmitKeys<T, K> = Pick<T, Exclude<keyof T, K>>;\n\nexport type Options<\n  TData extends TDataShape = TDataShape,\n  ThrowOnError extends boolean = boolean,\n  TResponse = unknown,\n  TResponseStyle extends ResponseStyle = 'fields',\n> = OmitKeys<\n  RequestOptions<TResponse, TResponseStyle, ThrowOnError>,\n  'body' | 'path' | 'query' | 'url'\n> &\n  ([TData] extends [never] ? unknown : Omit<TData, 'url'>);\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/transformers-allof-response-wrapper/client/utils.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/transformers-allof-response-wrapper/client.gen.ts",
    "content": "// 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>());\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/transformers-allof-response-wrapper/core/auth.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/transformers-allof-response-wrapper/core/bodySerializer.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/transformers-allof-response-wrapper/core/params.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/transformers-allof-response-wrapper/core/pathSerializer.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/transformers-allof-response-wrapper/core/queryKeySerializer.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\n/**\n * JSON-friendly union that mirrors what Pinia Colada can hash.\n */\nexport type JsonValue =\n  | null\n  | string\n  | number\n  | boolean\n  | JsonValue[]\n  | { [key: string]: JsonValue };\n\n/**\n * Replacer that converts non-JSON values (bigint, Date, etc.) to safe substitutes.\n */\nexport const queryKeyJsonReplacer = (_key: string, value: unknown) => {\n  if (value === undefined || typeof value === 'function' || typeof value === 'symbol') {\n    return undefined;\n  }\n  if (typeof value === 'bigint') {\n    return value.toString();\n  }\n  if (value instanceof Date) {\n    return value.toISOString();\n  }\n  return value;\n};\n\n/**\n * Safely stringifies a value and parses it back into a JsonValue.\n */\nexport const stringifyToJsonValue = (input: unknown): JsonValue | undefined => {\n  try {\n    const json = JSON.stringify(input, queryKeyJsonReplacer);\n    if (json === undefined) {\n      return undefined;\n    }\n    return JSON.parse(json) as JsonValue;\n  } catch {\n    return undefined;\n  }\n};\n\n/**\n * Detects plain objects (including objects with a null prototype).\n */\nconst isPlainObject = (value: unknown): value is Record<string, unknown> => {\n  if (value === null || typeof value !== 'object') {\n    return false;\n  }\n  const prototype = Object.getPrototypeOf(value as object);\n  return prototype === Object.prototype || prototype === null;\n};\n\n/**\n * Turns URLSearchParams into a sorted JSON object for deterministic keys.\n */\nconst serializeSearchParams = (params: URLSearchParams): JsonValue => {\n  const entries = Array.from(params.entries()).sort(([a], [b]) => a.localeCompare(b));\n  const result: Record<string, JsonValue> = {};\n\n  for (const [key, value] of entries) {\n    const existing = result[key];\n    if (existing === undefined) {\n      result[key] = value;\n      continue;\n    }\n\n    if (Array.isArray(existing)) {\n      (existing as string[]).push(value);\n    } else {\n      result[key] = [existing, value];\n    }\n  }\n\n  return result;\n};\n\n/**\n * Normalizes any accepted value into a JSON-friendly shape for query keys.\n */\nexport const serializeQueryKeyValue = (value: unknown): JsonValue | undefined => {\n  if (value === null) {\n    return null;\n  }\n\n  if (typeof value === 'string' || typeof value === 'number' || typeof value === 'boolean') {\n    return value;\n  }\n\n  if (value === undefined || typeof value === 'function' || typeof value === 'symbol') {\n    return undefined;\n  }\n\n  if (typeof value === 'bigint') {\n    return value.toString();\n  }\n\n  if (value instanceof Date) {\n    return value.toISOString();\n  }\n\n  if (Array.isArray(value)) {\n    return stringifyToJsonValue(value);\n  }\n\n  if (typeof URLSearchParams !== 'undefined' && value instanceof URLSearchParams) {\n    return serializeSearchParams(value);\n  }\n\n  if (isPlainObject(value)) {\n    return stringifyToJsonValue(value);\n  }\n\n  return undefined;\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/transformers-allof-response-wrapper/core/serverSentEvents.gen.ts",
    "content": "// 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 const 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            // Normalize line endings: CRLF -> LF, then CR -> LF\n            buffer = buffer.replace(/\\r\\n/g, '\\n').replace(/\\r/g, '\\n');\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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/transformers-allof-response-wrapper/core/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { Auth, AuthToken } from './auth.gen';\nimport type { BodySerializer, QuerySerializer, QuerySerializerOptions } from './bodySerializer.gen';\n\nexport type HttpMethod =\n  | 'connect'\n  | 'delete'\n  | 'get'\n  | 'head'\n  | 'options'\n  | 'patch'\n  | 'post'\n  | 'put'\n  | 'trace';\n\nexport type Client<\n  RequestFn = never,\n  Config = unknown,\n  MethodFn = never,\n  BuildUrlFn = never,\n  SseFn = never,\n> = {\n  /**\n   * Returns the final request URL.\n   */\n  buildUrl: BuildUrlFn;\n  getConfig: () => Config;\n  request: RequestFn;\n  setConfig: (config: Config) => Config;\n} & {\n  [K in HttpMethod]: MethodFn;\n} & ([SseFn] extends [never] ? { sse?: never } : { sse: { [K in HttpMethod]: SseFn } });\n\nexport interface Config {\n  /**\n   * Auth token or a function returning auth token. The resolved value will be\n   * added to the request payload as defined by its `security` array.\n   */\n  auth?: ((auth: Auth) => Promise<AuthToken> | AuthToken) | AuthToken;\n  /**\n   * A function for serializing request body parameter. By default,\n   * {@link JSON.stringify()} will be used.\n   */\n  bodySerializer?: BodySerializer | null;\n  /**\n   * An object containing any HTTP headers that you want to pre-populate your\n   * `Headers` object with.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/Headers/Headers#init See more}\n   */\n  headers?:\n    | RequestInit['headers']\n    | Record<\n        string,\n        string | number | boolean | (string | number | boolean)[] | null | undefined | unknown\n      >;\n  /**\n   * The request method.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/fetch#method See more}\n   */\n  method?: Uppercase<HttpMethod>;\n  /**\n   * A function for serializing request query parameters. By default, arrays\n   * will be exploded in form style, objects will be exploded in deepObject\n   * style, and reserved characters are percent-encoded.\n   *\n   * This method will have no effect if the native `paramsSerializer()` Axios\n   * API function is used.\n   *\n   * {@link https://swagger.io/docs/specification/serialization/#query View examples}\n   */\n  querySerializer?: QuerySerializer | QuerySerializerOptions;\n  /**\n   * A function validating request data. This is useful if you want to ensure\n   * the request conforms to the desired shape, so it can be safely sent to\n   * the server.\n   */\n  requestValidator?: (data: unknown) => Promise<unknown>;\n  /**\n   * A function transforming response data before it's returned. This is useful\n   * for post-processing data, e.g. converting ISO strings into Date objects.\n   */\n  responseTransformer?: (data: unknown) => Promise<unknown>;\n  /**\n   * A function validating response data. This is useful if you want to ensure\n   * the response conforms to the desired shape, so it can be safely passed to\n   * the transformers and returned to the user.\n   */\n  responseValidator?: (data: unknown) => Promise<unknown>;\n}\n\ntype IsExactlyNeverOrNeverUndefined<T> = [T] extends [never]\n  ? true\n  : [T] extends [never | undefined]\n    ? [undefined] extends [T]\n      ? false\n      : true\n    : false;\n\nexport type OmitNever<T extends Record<string, unknown>> = {\n  [K in keyof T as IsExactlyNeverOrNeverUndefined<T[K]> extends true ? never : K]: T[K];\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/transformers-allof-response-wrapper/core/utils.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/transformers-allof-response-wrapper/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type { ClientOptions, CreateSecretData, CreateSecretResponse, CreateSecretResponses, ListSecretsData, ListSecretsResponse, ListSecretsResponses, PaginatedResponse, RepositorySecret } from './types.gen';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/transformers-allof-response-wrapper/transformers.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { CreateSecretResponse, ListSecretsResponse } from './types.gen';\n\nconst repositorySecretSchemaResponseTransformer = (data: any) => {\n    data.createdAt = new Date(data.createdAt);\n    data.updatedAt = new Date(data.updatedAt);\n    return data;\n};\n\nexport const listSecretsResponseTransformer = async (data: any): Promise<ListSecretsResponse> => {\n    if (data.data) {\n        data.data = data.data.map((item: any) => repositorySecretSchemaResponseTransformer(item));\n    }\n    return data;\n};\n\nexport const createSecretResponseTransformer = async (data: any): Promise<CreateSecretResponse> => {\n    data = repositorySecretSchemaResponseTransformer(data);\n    return data;\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/transformers-allof-response-wrapper/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type ClientOptions = {\n    baseUrl: '{protocol}://specs' | (string & {});\n};\n\nexport type PaginatedResponse = {\n    meta?: {\n        page?: number;\n        limit?: number;\n        total?: number;\n        totalPages?: number;\n    };\n};\n\nexport type RepositorySecret = {\n    id: number;\n    name: string;\n    createdAt: Date;\n    updatedAt: Date;\n};\n\nexport type ListSecretsData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/secrets';\n};\n\nexport type ListSecretsResponses = {\n    /**\n     * PaginatedResponseRepositorySecret\n     *\n     * OK\n     */\n    200: PaginatedResponse & {\n        data?: Array<RepositorySecret>;\n    };\n};\n\nexport type ListSecretsResponse = ListSecretsResponses[keyof ListSecretsResponses];\n\nexport type CreateSecretData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/secrets/{id}';\n};\n\nexport type CreateSecretResponses = {\n    /**\n     * Created\n     */\n    201: RepositorySecret;\n};\n\nexport type CreateSecretResponse = CreateSecretResponses[keyof CreateSecretResponses];\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/transformers-any-of-null/client/client.gen.ts",
    "content": "// 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 (options: RequestOptions) => {\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 url = buildUrl(opts);\n\n    return { opts, url };\n  };\n\n  const request: Client['request'] = async (options) => {\n    // @ts-expect-error\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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/transformers-any-of-null/client/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type { Auth } from '../core/auth.gen';\nexport type { QuerySerializerOptions } from '../core/bodySerializer.gen';\nexport {\n  formDataBodySerializer,\n  jsonBodySerializer,\n  urlSearchParamsBodySerializer,\n} from '../core/bodySerializer.gen';\nexport { buildClientParams } from '../core/params.gen';\nexport { serializeQueryKeyValue } from '../core/queryKeySerializer.gen';\nexport { createClient } from './client.gen';\nexport type {\n  Client,\n  ClientOptions,\n  Config,\n  CreateClientConfig,\n  Options,\n  RequestOptions,\n  RequestResult,\n  ResolvedRequestOptions,\n  ResponseStyle,\n  TDataShape,\n} from './types.gen';\nexport { createConfig, mergeHeaders } from './utils.gen';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/transformers-any-of-null/client/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { Auth } from '../core/auth.gen';\nimport type {\n  ServerSentEventsOptions,\n  ServerSentEventsResult,\n} from '../core/serverSentEvents.gen';\nimport type { Client as CoreClient, Config as CoreConfig } from '../core/types.gen';\nimport type { Middleware } from './utils.gen';\n\nexport type ResponseStyle = 'data' | 'fields';\n\nexport interface Config<T extends ClientOptions = ClientOptions>\n  extends Omit<RequestInit, 'body' | 'headers' | 'method'>, CoreConfig {\n  /**\n   * Base URL for all requests made by this client.\n   */\n  baseUrl?: T['baseUrl'];\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   * Please don't use the Fetch client for Next.js applications. The `next`\n   * options won't have any effect.\n   *\n   * Install {@link https://www.npmjs.com/package/@hey-api/client-next `@hey-api/client-next`} instead.\n   */\n  next?: never;\n  /**\n   * Return the response data parsed in a specified format. By default, `auto`\n   * will infer the appropriate method from the `Content-Type` response header.\n   * You can override this behavior with any of the {@link Body} methods.\n   * Select `stream` if you don't want to parse response data at all.\n   *\n   * @default 'auto'\n   */\n  parseAs?: 'arrayBuffer' | 'auto' | 'blob' | 'formData' | 'json' | 'stream' | 'text';\n  /**\n   * Should we return only data or multiple fields (data, error, response, etc.)?\n   *\n   * @default 'fields'\n   */\n  responseStyle?: ResponseStyle;\n  /**\n   * Throw an error instead of returning it in the response?\n   *\n   * @default false\n   */\n  throwOnError?: T['throwOnError'];\n}\n\nexport interface RequestOptions<\n  TData = unknown,\n  TResponseStyle extends ResponseStyle = 'fields',\n  ThrowOnError extends boolean = boolean,\n  Url extends string = string,\n>\n  extends\n    Config<{\n      responseStyle: TResponseStyle;\n      throwOnError: ThrowOnError;\n    }>,\n    Pick<\n      ServerSentEventsOptions<TData>,\n      | 'onRequest'\n      | 'onSseError'\n      | 'onSseEvent'\n      | 'sseDefaultRetryDelay'\n      | 'sseMaxRetryAttempts'\n      | 'sseMaxRetryDelay'\n    > {\n  /**\n   * Any body that you want to add to your request.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/fetch#body}\n   */\n  body?: unknown;\n  path?: Record<string, unknown>;\n  query?: Record<string, unknown>;\n  /**\n   * Security mechanism(s) to use for the request.\n   */\n  security?: ReadonlyArray<Auth>;\n  url: Url;\n}\n\nexport interface ResolvedRequestOptions<\n  TResponseStyle extends ResponseStyle = 'fields',\n  ThrowOnError extends boolean = boolean,\n  Url extends string = string,\n> extends RequestOptions<unknown, TResponseStyle, ThrowOnError, Url> {\n  serializedBody?: string;\n}\n\nexport type RequestResult<\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = boolean,\n  TResponseStyle extends ResponseStyle = 'fields',\n> = ThrowOnError extends true\n  ? Promise<\n      TResponseStyle extends 'data'\n        ? TData extends Record<string, unknown>\n          ? TData[keyof TData]\n          : TData\n        : {\n            data: TData extends Record<string, unknown> ? TData[keyof TData] : TData;\n            request: Request;\n            response: Response;\n          }\n    >\n  : Promise<\n      TResponseStyle extends 'data'\n        ? (TData extends Record<string, unknown> ? TData[keyof TData] : TData) | undefined\n        : (\n            | {\n                data: TData extends Record<string, unknown> ? TData[keyof TData] : TData;\n                error: undefined;\n              }\n            | {\n                data: undefined;\n                error: TError extends Record<string, unknown> ? TError[keyof TError] : TError;\n              }\n          ) & {\n            request: Request;\n            response: Response;\n          }\n    >;\n\nexport interface ClientOptions {\n  baseUrl?: string;\n  responseStyle?: ResponseStyle;\n  throwOnError?: boolean;\n}\n\ntype MethodFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'>,\n) => RequestResult<TData, TError, ThrowOnError, TResponseStyle>;\n\ntype SseFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'>,\n) => Promise<ServerSentEventsResult<TData, TError>>;\n\ntype RequestFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'> &\n    Pick<Required<RequestOptions<TData, TResponseStyle, ThrowOnError>>, 'method'>,\n) => RequestResult<TData, TError, ThrowOnError, TResponseStyle>;\n\ntype BuildUrlFn = <\n  TData extends {\n    body?: unknown;\n    path?: Record<string, unknown>;\n    query?: Record<string, unknown>;\n    url: string;\n  },\n>(\n  options: TData & Options<TData>,\n) => string;\n\nexport type Client = CoreClient<RequestFn, Config, MethodFn, BuildUrlFn, SseFn> & {\n  interceptors: Middleware<Request, Response, unknown, ResolvedRequestOptions>;\n};\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 = ClientOptions> = (\n  override?: Config<ClientOptions & T>,\n) => Config<Required<ClientOptions> & T>;\n\nexport interface TDataShape {\n  body?: unknown;\n  headers?: unknown;\n  path?: unknown;\n  query?: unknown;\n  url: string;\n}\n\ntype OmitKeys<T, K> = Pick<T, Exclude<keyof T, K>>;\n\nexport type Options<\n  TData extends TDataShape = TDataShape,\n  ThrowOnError extends boolean = boolean,\n  TResponse = unknown,\n  TResponseStyle extends ResponseStyle = 'fields',\n> = OmitKeys<\n  RequestOptions<TResponse, TResponseStyle, ThrowOnError>,\n  'body' | 'path' | 'query' | 'url'\n> &\n  ([TData] extends [never] ? unknown : Omit<TData, 'url'>);\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/transformers-any-of-null/client/utils.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/transformers-any-of-null/client.gen.ts",
    "content": "// 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>());\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/transformers-any-of-null/core/auth.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/transformers-any-of-null/core/bodySerializer.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/transformers-any-of-null/core/params.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/transformers-any-of-null/core/pathSerializer.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/transformers-any-of-null/core/queryKeySerializer.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\n/**\n * JSON-friendly union that mirrors what Pinia Colada can hash.\n */\nexport type JsonValue =\n  | null\n  | string\n  | number\n  | boolean\n  | JsonValue[]\n  | { [key: string]: JsonValue };\n\n/**\n * Replacer that converts non-JSON values (bigint, Date, etc.) to safe substitutes.\n */\nexport const queryKeyJsonReplacer = (_key: string, value: unknown) => {\n  if (value === undefined || typeof value === 'function' || typeof value === 'symbol') {\n    return undefined;\n  }\n  if (typeof value === 'bigint') {\n    return value.toString();\n  }\n  if (value instanceof Date) {\n    return value.toISOString();\n  }\n  return value;\n};\n\n/**\n * Safely stringifies a value and parses it back into a JsonValue.\n */\nexport const stringifyToJsonValue = (input: unknown): JsonValue | undefined => {\n  try {\n    const json = JSON.stringify(input, queryKeyJsonReplacer);\n    if (json === undefined) {\n      return undefined;\n    }\n    return JSON.parse(json) as JsonValue;\n  } catch {\n    return undefined;\n  }\n};\n\n/**\n * Detects plain objects (including objects with a null prototype).\n */\nconst isPlainObject = (value: unknown): value is Record<string, unknown> => {\n  if (value === null || typeof value !== 'object') {\n    return false;\n  }\n  const prototype = Object.getPrototypeOf(value as object);\n  return prototype === Object.prototype || prototype === null;\n};\n\n/**\n * Turns URLSearchParams into a sorted JSON object for deterministic keys.\n */\nconst serializeSearchParams = (params: URLSearchParams): JsonValue => {\n  const entries = Array.from(params.entries()).sort(([a], [b]) => a.localeCompare(b));\n  const result: Record<string, JsonValue> = {};\n\n  for (const [key, value] of entries) {\n    const existing = result[key];\n    if (existing === undefined) {\n      result[key] = value;\n      continue;\n    }\n\n    if (Array.isArray(existing)) {\n      (existing as string[]).push(value);\n    } else {\n      result[key] = [existing, value];\n    }\n  }\n\n  return result;\n};\n\n/**\n * Normalizes any accepted value into a JSON-friendly shape for query keys.\n */\nexport const serializeQueryKeyValue = (value: unknown): JsonValue | undefined => {\n  if (value === null) {\n    return null;\n  }\n\n  if (typeof value === 'string' || typeof value === 'number' || typeof value === 'boolean') {\n    return value;\n  }\n\n  if (value === undefined || typeof value === 'function' || typeof value === 'symbol') {\n    return undefined;\n  }\n\n  if (typeof value === 'bigint') {\n    return value.toString();\n  }\n\n  if (value instanceof Date) {\n    return value.toISOString();\n  }\n\n  if (Array.isArray(value)) {\n    return stringifyToJsonValue(value);\n  }\n\n  if (typeof URLSearchParams !== 'undefined' && value instanceof URLSearchParams) {\n    return serializeSearchParams(value);\n  }\n\n  if (isPlainObject(value)) {\n    return stringifyToJsonValue(value);\n  }\n\n  return undefined;\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/transformers-any-of-null/core/serverSentEvents.gen.ts",
    "content": "// 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 const 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            // Normalize line endings: CRLF -> LF, then CR -> LF\n            buffer = buffer.replace(/\\r\\n/g, '\\n').replace(/\\r/g, '\\n');\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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/transformers-any-of-null/core/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { Auth, AuthToken } from './auth.gen';\nimport type { BodySerializer, QuerySerializer, QuerySerializerOptions } from './bodySerializer.gen';\n\nexport type HttpMethod =\n  | 'connect'\n  | 'delete'\n  | 'get'\n  | 'head'\n  | 'options'\n  | 'patch'\n  | 'post'\n  | 'put'\n  | 'trace';\n\nexport type Client<\n  RequestFn = never,\n  Config = unknown,\n  MethodFn = never,\n  BuildUrlFn = never,\n  SseFn = never,\n> = {\n  /**\n   * Returns the final request URL.\n   */\n  buildUrl: BuildUrlFn;\n  getConfig: () => Config;\n  request: RequestFn;\n  setConfig: (config: Config) => Config;\n} & {\n  [K in HttpMethod]: MethodFn;\n} & ([SseFn] extends [never] ? { sse?: never } : { sse: { [K in HttpMethod]: SseFn } });\n\nexport interface Config {\n  /**\n   * Auth token or a function returning auth token. The resolved value will be\n   * added to the request payload as defined by its `security` array.\n   */\n  auth?: ((auth: Auth) => Promise<AuthToken> | AuthToken) | AuthToken;\n  /**\n   * A function for serializing request body parameter. By default,\n   * {@link JSON.stringify()} will be used.\n   */\n  bodySerializer?: BodySerializer | null;\n  /**\n   * An object containing any HTTP headers that you want to pre-populate your\n   * `Headers` object with.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/Headers/Headers#init See more}\n   */\n  headers?:\n    | RequestInit['headers']\n    | Record<\n        string,\n        string | number | boolean | (string | number | boolean)[] | null | undefined | unknown\n      >;\n  /**\n   * The request method.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/fetch#method See more}\n   */\n  method?: Uppercase<HttpMethod>;\n  /**\n   * A function for serializing request query parameters. By default, arrays\n   * will be exploded in form style, objects will be exploded in deepObject\n   * style, and reserved characters are percent-encoded.\n   *\n   * This method will have no effect if the native `paramsSerializer()` Axios\n   * API function is used.\n   *\n   * {@link https://swagger.io/docs/specification/serialization/#query View examples}\n   */\n  querySerializer?: QuerySerializer | QuerySerializerOptions;\n  /**\n   * A function validating request data. This is useful if you want to ensure\n   * the request conforms to the desired shape, so it can be safely sent to\n   * the server.\n   */\n  requestValidator?: (data: unknown) => Promise<unknown>;\n  /**\n   * A function transforming response data before it's returned. This is useful\n   * for post-processing data, e.g. converting ISO strings into Date objects.\n   */\n  responseTransformer?: (data: unknown) => Promise<unknown>;\n  /**\n   * A function validating response data. This is useful if you want to ensure\n   * the response conforms to the desired shape, so it can be safely passed to\n   * the transformers and returned to the user.\n   */\n  responseValidator?: (data: unknown) => Promise<unknown>;\n}\n\ntype IsExactlyNeverOrNeverUndefined<T> = [T] extends [never]\n  ? true\n  : [T] extends [never | undefined]\n    ? [undefined] extends [T]\n      ? false\n      : true\n    : false;\n\nexport type OmitNever<T extends Record<string, unknown>> = {\n  [K in keyof T as IsExactlyNeverOrNeverUndefined<T[K]> extends true ? never : K]: T[K];\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/transformers-any-of-null/core/utils.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/transformers-any-of-null/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type { ClientOptions, Foo, GetFooData, GetFooResponse, GetFooResponses, GetNullablePollData, GetNullablePollResponse, GetNullablePollResponses, GetPollData, GetPollResponse, GetPollResponses, NestedDateObject, NestedDateObjectData, NestedDateObjectResponse, NestedDateObjectResponses, Poll } from './types.gen';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/transformers-any-of-null/transformers.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { GetFooResponse, GetNullablePollResponse, GetPollResponse, NestedDateObjectResponse } from './types.gen';\n\nconst fooSchemaResponseTransformer = (data: any) => {\n    if (data.foo) {\n        data.foo = new Date(data.foo);\n    }\n    if (data.bar) {\n        data.bar = new Date(data.bar);\n    }\n    if (data.baz) {\n        data.baz = new Date(data.baz);\n    }\n    if (data.requiredQux) {\n        data.requiredQux = new Date(data.requiredQux);\n    }\n    return data;\n};\n\nexport const getFooResponseTransformer = async (data: any): Promise<GetFooResponse> => {\n    data = data.map((item: any) => fooSchemaResponseTransformer(item));\n    return data;\n};\n\nconst pollSchemaResponseTransformer = (data: any) => {\n    data.createdAt = new Date(data.createdAt);\n    return data;\n};\n\nexport const getPollResponseTransformer = async (data: any): Promise<GetPollResponse> => {\n    data = pollSchemaResponseTransformer(data);\n    return data;\n};\n\nexport const getNullablePollResponseTransformer = async (data: any): Promise<GetNullablePollResponse> => {\n    if (data) {\n        data = pollSchemaResponseTransformer(data);\n    }\n    return data;\n};\n\nconst nestedDateObjectSchemaResponseTransformer = (data: any) => {\n    if (data.foo) {\n        if (data.foo.bar) {\n            data.foo.bar = new Date(data.foo.bar);\n        }\n    }\n    return data;\n};\n\nexport const nestedDateObjectResponseTransformer = async (data: any): Promise<NestedDateObjectResponse> => {\n    data = nestedDateObjectSchemaResponseTransformer(data);\n    return data;\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/transformers-any-of-null/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type ClientOptions = {\n    baseUrl: `${string}://${string}` | (string & {});\n};\n\nexport type Poll = {\n    id: number;\n    createdAt: Date;\n};\n\n/**\n * Object with a nested date structure\n */\nexport type NestedDateObject = {\n    foo?: {\n        bar?: Date;\n    };\n};\n\nexport type Foo = {\n    foo?: Date;\n    bar?: Date | null;\n    baz?: Date | null;\n    requiredQux: Date | null;\n};\n\nexport type GetFooData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/foo';\n};\n\nexport type GetFooResponses = {\n    /**\n     * OK\n     */\n    200: Array<Foo>;\n};\n\nexport type GetFooResponse = GetFooResponses[keyof GetFooResponses];\n\nexport type GetPollData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/polls';\n};\n\nexport type GetPollResponses = {\n    /**\n     * OK\n     */\n    200: Poll;\n};\n\nexport type GetPollResponse = GetPollResponses[keyof GetPollResponses];\n\nexport type GetNullablePollData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/polls/nullable';\n};\n\nexport type GetNullablePollResponses = {\n    /**\n     * OK\n     */\n    200: Poll | null;\n};\n\nexport type GetNullablePollResponse = GetNullablePollResponses[keyof GetNullablePollResponses];\n\nexport type NestedDateObjectData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/nested-date-object';\n};\n\nexport type NestedDateObjectResponses = {\n    /**\n     * Object with nested date\n     */\n    200: NestedDateObject;\n};\n\nexport type NestedDateObjectResponse = NestedDateObjectResponses[keyof NestedDateObjectResponses];\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/transformers-array/client/client.gen.ts",
    "content": "// 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 (options: RequestOptions) => {\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 url = buildUrl(opts);\n\n    return { opts, url };\n  };\n\n  const request: Client['request'] = async (options) => {\n    // @ts-expect-error\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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/transformers-array/client/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type { Auth } from '../core/auth.gen';\nexport type { QuerySerializerOptions } from '../core/bodySerializer.gen';\nexport {\n  formDataBodySerializer,\n  jsonBodySerializer,\n  urlSearchParamsBodySerializer,\n} from '../core/bodySerializer.gen';\nexport { buildClientParams } from '../core/params.gen';\nexport { serializeQueryKeyValue } from '../core/queryKeySerializer.gen';\nexport { createClient } from './client.gen';\nexport type {\n  Client,\n  ClientOptions,\n  Config,\n  CreateClientConfig,\n  Options,\n  RequestOptions,\n  RequestResult,\n  ResolvedRequestOptions,\n  ResponseStyle,\n  TDataShape,\n} from './types.gen';\nexport { createConfig, mergeHeaders } from './utils.gen';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/transformers-array/client/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { Auth } from '../core/auth.gen';\nimport type {\n  ServerSentEventsOptions,\n  ServerSentEventsResult,\n} from '../core/serverSentEvents.gen';\nimport type { Client as CoreClient, Config as CoreConfig } from '../core/types.gen';\nimport type { Middleware } from './utils.gen';\n\nexport type ResponseStyle = 'data' | 'fields';\n\nexport interface Config<T extends ClientOptions = ClientOptions>\n  extends Omit<RequestInit, 'body' | 'headers' | 'method'>, CoreConfig {\n  /**\n   * Base URL for all requests made by this client.\n   */\n  baseUrl?: T['baseUrl'];\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   * Please don't use the Fetch client for Next.js applications. The `next`\n   * options won't have any effect.\n   *\n   * Install {@link https://www.npmjs.com/package/@hey-api/client-next `@hey-api/client-next`} instead.\n   */\n  next?: never;\n  /**\n   * Return the response data parsed in a specified format. By default, `auto`\n   * will infer the appropriate method from the `Content-Type` response header.\n   * You can override this behavior with any of the {@link Body} methods.\n   * Select `stream` if you don't want to parse response data at all.\n   *\n   * @default 'auto'\n   */\n  parseAs?: 'arrayBuffer' | 'auto' | 'blob' | 'formData' | 'json' | 'stream' | 'text';\n  /**\n   * Should we return only data or multiple fields (data, error, response, etc.)?\n   *\n   * @default 'fields'\n   */\n  responseStyle?: ResponseStyle;\n  /**\n   * Throw an error instead of returning it in the response?\n   *\n   * @default false\n   */\n  throwOnError?: T['throwOnError'];\n}\n\nexport interface RequestOptions<\n  TData = unknown,\n  TResponseStyle extends ResponseStyle = 'fields',\n  ThrowOnError extends boolean = boolean,\n  Url extends string = string,\n>\n  extends\n    Config<{\n      responseStyle: TResponseStyle;\n      throwOnError: ThrowOnError;\n    }>,\n    Pick<\n      ServerSentEventsOptions<TData>,\n      | 'onRequest'\n      | 'onSseError'\n      | 'onSseEvent'\n      | 'sseDefaultRetryDelay'\n      | 'sseMaxRetryAttempts'\n      | 'sseMaxRetryDelay'\n    > {\n  /**\n   * Any body that you want to add to your request.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/fetch#body}\n   */\n  body?: unknown;\n  path?: Record<string, unknown>;\n  query?: Record<string, unknown>;\n  /**\n   * Security mechanism(s) to use for the request.\n   */\n  security?: ReadonlyArray<Auth>;\n  url: Url;\n}\n\nexport interface ResolvedRequestOptions<\n  TResponseStyle extends ResponseStyle = 'fields',\n  ThrowOnError extends boolean = boolean,\n  Url extends string = string,\n> extends RequestOptions<unknown, TResponseStyle, ThrowOnError, Url> {\n  serializedBody?: string;\n}\n\nexport type RequestResult<\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = boolean,\n  TResponseStyle extends ResponseStyle = 'fields',\n> = ThrowOnError extends true\n  ? Promise<\n      TResponseStyle extends 'data'\n        ? TData extends Record<string, unknown>\n          ? TData[keyof TData]\n          : TData\n        : {\n            data: TData extends Record<string, unknown> ? TData[keyof TData] : TData;\n            request: Request;\n            response: Response;\n          }\n    >\n  : Promise<\n      TResponseStyle extends 'data'\n        ? (TData extends Record<string, unknown> ? TData[keyof TData] : TData) | undefined\n        : (\n            | {\n                data: TData extends Record<string, unknown> ? TData[keyof TData] : TData;\n                error: undefined;\n              }\n            | {\n                data: undefined;\n                error: TError extends Record<string, unknown> ? TError[keyof TError] : TError;\n              }\n          ) & {\n            request: Request;\n            response: Response;\n          }\n    >;\n\nexport interface ClientOptions {\n  baseUrl?: string;\n  responseStyle?: ResponseStyle;\n  throwOnError?: boolean;\n}\n\ntype MethodFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'>,\n) => RequestResult<TData, TError, ThrowOnError, TResponseStyle>;\n\ntype SseFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'>,\n) => Promise<ServerSentEventsResult<TData, TError>>;\n\ntype RequestFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'> &\n    Pick<Required<RequestOptions<TData, TResponseStyle, ThrowOnError>>, 'method'>,\n) => RequestResult<TData, TError, ThrowOnError, TResponseStyle>;\n\ntype BuildUrlFn = <\n  TData extends {\n    body?: unknown;\n    path?: Record<string, unknown>;\n    query?: Record<string, unknown>;\n    url: string;\n  },\n>(\n  options: TData & Options<TData>,\n) => string;\n\nexport type Client = CoreClient<RequestFn, Config, MethodFn, BuildUrlFn, SseFn> & {\n  interceptors: Middleware<Request, Response, unknown, ResolvedRequestOptions>;\n};\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 = ClientOptions> = (\n  override?: Config<ClientOptions & T>,\n) => Config<Required<ClientOptions> & T>;\n\nexport interface TDataShape {\n  body?: unknown;\n  headers?: unknown;\n  path?: unknown;\n  query?: unknown;\n  url: string;\n}\n\ntype OmitKeys<T, K> = Pick<T, Exclude<keyof T, K>>;\n\nexport type Options<\n  TData extends TDataShape = TDataShape,\n  ThrowOnError extends boolean = boolean,\n  TResponse = unknown,\n  TResponseStyle extends ResponseStyle = 'fields',\n> = OmitKeys<\n  RequestOptions<TResponse, TResponseStyle, ThrowOnError>,\n  'body' | 'path' | 'query' | 'url'\n> &\n  ([TData] extends [never] ? unknown : Omit<TData, 'url'>);\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/transformers-array/client/utils.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/transformers-array/client.gen.ts",
    "content": "// 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>());\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/transformers-array/core/auth.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/transformers-array/core/bodySerializer.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/transformers-array/core/params.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/transformers-array/core/pathSerializer.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/transformers-array/core/queryKeySerializer.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\n/**\n * JSON-friendly union that mirrors what Pinia Colada can hash.\n */\nexport type JsonValue =\n  | null\n  | string\n  | number\n  | boolean\n  | JsonValue[]\n  | { [key: string]: JsonValue };\n\n/**\n * Replacer that converts non-JSON values (bigint, Date, etc.) to safe substitutes.\n */\nexport const queryKeyJsonReplacer = (_key: string, value: unknown) => {\n  if (value === undefined || typeof value === 'function' || typeof value === 'symbol') {\n    return undefined;\n  }\n  if (typeof value === 'bigint') {\n    return value.toString();\n  }\n  if (value instanceof Date) {\n    return value.toISOString();\n  }\n  return value;\n};\n\n/**\n * Safely stringifies a value and parses it back into a JsonValue.\n */\nexport const stringifyToJsonValue = (input: unknown): JsonValue | undefined => {\n  try {\n    const json = JSON.stringify(input, queryKeyJsonReplacer);\n    if (json === undefined) {\n      return undefined;\n    }\n    return JSON.parse(json) as JsonValue;\n  } catch {\n    return undefined;\n  }\n};\n\n/**\n * Detects plain objects (including objects with a null prototype).\n */\nconst isPlainObject = (value: unknown): value is Record<string, unknown> => {\n  if (value === null || typeof value !== 'object') {\n    return false;\n  }\n  const prototype = Object.getPrototypeOf(value as object);\n  return prototype === Object.prototype || prototype === null;\n};\n\n/**\n * Turns URLSearchParams into a sorted JSON object for deterministic keys.\n */\nconst serializeSearchParams = (params: URLSearchParams): JsonValue => {\n  const entries = Array.from(params.entries()).sort(([a], [b]) => a.localeCompare(b));\n  const result: Record<string, JsonValue> = {};\n\n  for (const [key, value] of entries) {\n    const existing = result[key];\n    if (existing === undefined) {\n      result[key] = value;\n      continue;\n    }\n\n    if (Array.isArray(existing)) {\n      (existing as string[]).push(value);\n    } else {\n      result[key] = [existing, value];\n    }\n  }\n\n  return result;\n};\n\n/**\n * Normalizes any accepted value into a JSON-friendly shape for query keys.\n */\nexport const serializeQueryKeyValue = (value: unknown): JsonValue | undefined => {\n  if (value === null) {\n    return null;\n  }\n\n  if (typeof value === 'string' || typeof value === 'number' || typeof value === 'boolean') {\n    return value;\n  }\n\n  if (value === undefined || typeof value === 'function' || typeof value === 'symbol') {\n    return undefined;\n  }\n\n  if (typeof value === 'bigint') {\n    return value.toString();\n  }\n\n  if (value instanceof Date) {\n    return value.toISOString();\n  }\n\n  if (Array.isArray(value)) {\n    return stringifyToJsonValue(value);\n  }\n\n  if (typeof URLSearchParams !== 'undefined' && value instanceof URLSearchParams) {\n    return serializeSearchParams(value);\n  }\n\n  if (isPlainObject(value)) {\n    return stringifyToJsonValue(value);\n  }\n\n  return undefined;\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/transformers-array/core/serverSentEvents.gen.ts",
    "content": "// 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 const 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            // Normalize line endings: CRLF -> LF, then CR -> LF\n            buffer = buffer.replace(/\\r\\n/g, '\\n').replace(/\\r/g, '\\n');\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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/transformers-array/core/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { Auth, AuthToken } from './auth.gen';\nimport type { BodySerializer, QuerySerializer, QuerySerializerOptions } from './bodySerializer.gen';\n\nexport type HttpMethod =\n  | 'connect'\n  | 'delete'\n  | 'get'\n  | 'head'\n  | 'options'\n  | 'patch'\n  | 'post'\n  | 'put'\n  | 'trace';\n\nexport type Client<\n  RequestFn = never,\n  Config = unknown,\n  MethodFn = never,\n  BuildUrlFn = never,\n  SseFn = never,\n> = {\n  /**\n   * Returns the final request URL.\n   */\n  buildUrl: BuildUrlFn;\n  getConfig: () => Config;\n  request: RequestFn;\n  setConfig: (config: Config) => Config;\n} & {\n  [K in HttpMethod]: MethodFn;\n} & ([SseFn] extends [never] ? { sse?: never } : { sse: { [K in HttpMethod]: SseFn } });\n\nexport interface Config {\n  /**\n   * Auth token or a function returning auth token. The resolved value will be\n   * added to the request payload as defined by its `security` array.\n   */\n  auth?: ((auth: Auth) => Promise<AuthToken> | AuthToken) | AuthToken;\n  /**\n   * A function for serializing request body parameter. By default,\n   * {@link JSON.stringify()} will be used.\n   */\n  bodySerializer?: BodySerializer | null;\n  /**\n   * An object containing any HTTP headers that you want to pre-populate your\n   * `Headers` object with.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/Headers/Headers#init See more}\n   */\n  headers?:\n    | RequestInit['headers']\n    | Record<\n        string,\n        string | number | boolean | (string | number | boolean)[] | null | undefined | unknown\n      >;\n  /**\n   * The request method.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/fetch#method See more}\n   */\n  method?: Uppercase<HttpMethod>;\n  /**\n   * A function for serializing request query parameters. By default, arrays\n   * will be exploded in form style, objects will be exploded in deepObject\n   * style, and reserved characters are percent-encoded.\n   *\n   * This method will have no effect if the native `paramsSerializer()` Axios\n   * API function is used.\n   *\n   * {@link https://swagger.io/docs/specification/serialization/#query View examples}\n   */\n  querySerializer?: QuerySerializer | QuerySerializerOptions;\n  /**\n   * A function validating request data. This is useful if you want to ensure\n   * the request conforms to the desired shape, so it can be safely sent to\n   * the server.\n   */\n  requestValidator?: (data: unknown) => Promise<unknown>;\n  /**\n   * A function transforming response data before it's returned. This is useful\n   * for post-processing data, e.g. converting ISO strings into Date objects.\n   */\n  responseTransformer?: (data: unknown) => Promise<unknown>;\n  /**\n   * A function validating response data. This is useful if you want to ensure\n   * the response conforms to the desired shape, so it can be safely passed to\n   * the transformers and returned to the user.\n   */\n  responseValidator?: (data: unknown) => Promise<unknown>;\n}\n\ntype IsExactlyNeverOrNeverUndefined<T> = [T] extends [never]\n  ? true\n  : [T] extends [never | undefined]\n    ? [undefined] extends [T]\n      ? false\n      : true\n    : false;\n\nexport type OmitNever<T extends Record<string, unknown>> = {\n  [K in keyof T as IsExactlyNeverOrNeverUndefined<T[K]> extends true ? never : K]: T[K];\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/transformers-array/core/utils.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/transformers-array/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type { ClientOptions, GetFooData, GetFooResponse, GetFooResponses } from './types.gen';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/transformers-array/transformers.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { GetFooResponse } from './types.gen';\n\nexport const getFooResponseTransformer = async (data: any): Promise<GetFooResponse> => {\n    data.foo = data.foo.map((item: any) => {\n        item.baz = new Date(item.baz);\n        return item;\n    });\n    return data;\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/transformers-array/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type ClientOptions = {\n    baseUrl: `${string}://${string}` | (string & {});\n};\n\nexport type GetFooData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/foo';\n};\n\nexport type GetFooResponses = {\n    /**\n     * OK\n     */\n    200: {\n        foo: Array<{\n            baz: Date;\n        }>;\n    };\n};\n\nexport type GetFooResponse = GetFooResponses[keyof GetFooResponses];\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/transformers-one-of-discriminated/client/client.gen.ts",
    "content": "// 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 (options: RequestOptions) => {\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 url = buildUrl(opts);\n\n    return { opts, url };\n  };\n\n  const request: Client['request'] = async (options) => {\n    // @ts-expect-error\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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/transformers-one-of-discriminated/client/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type { Auth } from '../core/auth.gen';\nexport type { QuerySerializerOptions } from '../core/bodySerializer.gen';\nexport {\n  formDataBodySerializer,\n  jsonBodySerializer,\n  urlSearchParamsBodySerializer,\n} from '../core/bodySerializer.gen';\nexport { buildClientParams } from '../core/params.gen';\nexport { serializeQueryKeyValue } from '../core/queryKeySerializer.gen';\nexport { createClient } from './client.gen';\nexport type {\n  Client,\n  ClientOptions,\n  Config,\n  CreateClientConfig,\n  Options,\n  RequestOptions,\n  RequestResult,\n  ResolvedRequestOptions,\n  ResponseStyle,\n  TDataShape,\n} from './types.gen';\nexport { createConfig, mergeHeaders } from './utils.gen';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/transformers-one-of-discriminated/client/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { Auth } from '../core/auth.gen';\nimport type {\n  ServerSentEventsOptions,\n  ServerSentEventsResult,\n} from '../core/serverSentEvents.gen';\nimport type { Client as CoreClient, Config as CoreConfig } from '../core/types.gen';\nimport type { Middleware } from './utils.gen';\n\nexport type ResponseStyle = 'data' | 'fields';\n\nexport interface Config<T extends ClientOptions = ClientOptions>\n  extends Omit<RequestInit, 'body' | 'headers' | 'method'>, CoreConfig {\n  /**\n   * Base URL for all requests made by this client.\n   */\n  baseUrl?: T['baseUrl'];\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   * Please don't use the Fetch client for Next.js applications. The `next`\n   * options won't have any effect.\n   *\n   * Install {@link https://www.npmjs.com/package/@hey-api/client-next `@hey-api/client-next`} instead.\n   */\n  next?: never;\n  /**\n   * Return the response data parsed in a specified format. By default, `auto`\n   * will infer the appropriate method from the `Content-Type` response header.\n   * You can override this behavior with any of the {@link Body} methods.\n   * Select `stream` if you don't want to parse response data at all.\n   *\n   * @default 'auto'\n   */\n  parseAs?: 'arrayBuffer' | 'auto' | 'blob' | 'formData' | 'json' | 'stream' | 'text';\n  /**\n   * Should we return only data or multiple fields (data, error, response, etc.)?\n   *\n   * @default 'fields'\n   */\n  responseStyle?: ResponseStyle;\n  /**\n   * Throw an error instead of returning it in the response?\n   *\n   * @default false\n   */\n  throwOnError?: T['throwOnError'];\n}\n\nexport interface RequestOptions<\n  TData = unknown,\n  TResponseStyle extends ResponseStyle = 'fields',\n  ThrowOnError extends boolean = boolean,\n  Url extends string = string,\n>\n  extends\n    Config<{\n      responseStyle: TResponseStyle;\n      throwOnError: ThrowOnError;\n    }>,\n    Pick<\n      ServerSentEventsOptions<TData>,\n      | 'onRequest'\n      | 'onSseError'\n      | 'onSseEvent'\n      | 'sseDefaultRetryDelay'\n      | 'sseMaxRetryAttempts'\n      | 'sseMaxRetryDelay'\n    > {\n  /**\n   * Any body that you want to add to your request.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/fetch#body}\n   */\n  body?: unknown;\n  path?: Record<string, unknown>;\n  query?: Record<string, unknown>;\n  /**\n   * Security mechanism(s) to use for the request.\n   */\n  security?: ReadonlyArray<Auth>;\n  url: Url;\n}\n\nexport interface ResolvedRequestOptions<\n  TResponseStyle extends ResponseStyle = 'fields',\n  ThrowOnError extends boolean = boolean,\n  Url extends string = string,\n> extends RequestOptions<unknown, TResponseStyle, ThrowOnError, Url> {\n  serializedBody?: string;\n}\n\nexport type RequestResult<\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = boolean,\n  TResponseStyle extends ResponseStyle = 'fields',\n> = ThrowOnError extends true\n  ? Promise<\n      TResponseStyle extends 'data'\n        ? TData extends Record<string, unknown>\n          ? TData[keyof TData]\n          : TData\n        : {\n            data: TData extends Record<string, unknown> ? TData[keyof TData] : TData;\n            request: Request;\n            response: Response;\n          }\n    >\n  : Promise<\n      TResponseStyle extends 'data'\n        ? (TData extends Record<string, unknown> ? TData[keyof TData] : TData) | undefined\n        : (\n            | {\n                data: TData extends Record<string, unknown> ? TData[keyof TData] : TData;\n                error: undefined;\n              }\n            | {\n                data: undefined;\n                error: TError extends Record<string, unknown> ? TError[keyof TError] : TError;\n              }\n          ) & {\n            request: Request;\n            response: Response;\n          }\n    >;\n\nexport interface ClientOptions {\n  baseUrl?: string;\n  responseStyle?: ResponseStyle;\n  throwOnError?: boolean;\n}\n\ntype MethodFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'>,\n) => RequestResult<TData, TError, ThrowOnError, TResponseStyle>;\n\ntype SseFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'>,\n) => Promise<ServerSentEventsResult<TData, TError>>;\n\ntype RequestFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'> &\n    Pick<Required<RequestOptions<TData, TResponseStyle, ThrowOnError>>, 'method'>,\n) => RequestResult<TData, TError, ThrowOnError, TResponseStyle>;\n\ntype BuildUrlFn = <\n  TData extends {\n    body?: unknown;\n    path?: Record<string, unknown>;\n    query?: Record<string, unknown>;\n    url: string;\n  },\n>(\n  options: TData & Options<TData>,\n) => string;\n\nexport type Client = CoreClient<RequestFn, Config, MethodFn, BuildUrlFn, SseFn> & {\n  interceptors: Middleware<Request, Response, unknown, ResolvedRequestOptions>;\n};\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 = ClientOptions> = (\n  override?: Config<ClientOptions & T>,\n) => Config<Required<ClientOptions> & T>;\n\nexport interface TDataShape {\n  body?: unknown;\n  headers?: unknown;\n  path?: unknown;\n  query?: unknown;\n  url: string;\n}\n\ntype OmitKeys<T, K> = Pick<T, Exclude<keyof T, K>>;\n\nexport type Options<\n  TData extends TDataShape = TDataShape,\n  ThrowOnError extends boolean = boolean,\n  TResponse = unknown,\n  TResponseStyle extends ResponseStyle = 'fields',\n> = OmitKeys<\n  RequestOptions<TResponse, TResponseStyle, ThrowOnError>,\n  'body' | 'path' | 'query' | 'url'\n> &\n  ([TData] extends [never] ? unknown : Omit<TData, 'url'>);\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/transformers-one-of-discriminated/client/utils.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/transformers-one-of-discriminated/client.gen.ts",
    "content": "// 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>());\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/transformers-one-of-discriminated/core/auth.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/transformers-one-of-discriminated/core/bodySerializer.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/transformers-one-of-discriminated/core/params.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/transformers-one-of-discriminated/core/pathSerializer.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/transformers-one-of-discriminated/core/queryKeySerializer.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\n/**\n * JSON-friendly union that mirrors what Pinia Colada can hash.\n */\nexport type JsonValue =\n  | null\n  | string\n  | number\n  | boolean\n  | JsonValue[]\n  | { [key: string]: JsonValue };\n\n/**\n * Replacer that converts non-JSON values (bigint, Date, etc.) to safe substitutes.\n */\nexport const queryKeyJsonReplacer = (_key: string, value: unknown) => {\n  if (value === undefined || typeof value === 'function' || typeof value === 'symbol') {\n    return undefined;\n  }\n  if (typeof value === 'bigint') {\n    return value.toString();\n  }\n  if (value instanceof Date) {\n    return value.toISOString();\n  }\n  return value;\n};\n\n/**\n * Safely stringifies a value and parses it back into a JsonValue.\n */\nexport const stringifyToJsonValue = (input: unknown): JsonValue | undefined => {\n  try {\n    const json = JSON.stringify(input, queryKeyJsonReplacer);\n    if (json === undefined) {\n      return undefined;\n    }\n    return JSON.parse(json) as JsonValue;\n  } catch {\n    return undefined;\n  }\n};\n\n/**\n * Detects plain objects (including objects with a null prototype).\n */\nconst isPlainObject = (value: unknown): value is Record<string, unknown> => {\n  if (value === null || typeof value !== 'object') {\n    return false;\n  }\n  const prototype = Object.getPrototypeOf(value as object);\n  return prototype === Object.prototype || prototype === null;\n};\n\n/**\n * Turns URLSearchParams into a sorted JSON object for deterministic keys.\n */\nconst serializeSearchParams = (params: URLSearchParams): JsonValue => {\n  const entries = Array.from(params.entries()).sort(([a], [b]) => a.localeCompare(b));\n  const result: Record<string, JsonValue> = {};\n\n  for (const [key, value] of entries) {\n    const existing = result[key];\n    if (existing === undefined) {\n      result[key] = value;\n      continue;\n    }\n\n    if (Array.isArray(existing)) {\n      (existing as string[]).push(value);\n    } else {\n      result[key] = [existing, value];\n    }\n  }\n\n  return result;\n};\n\n/**\n * Normalizes any accepted value into a JSON-friendly shape for query keys.\n */\nexport const serializeQueryKeyValue = (value: unknown): JsonValue | undefined => {\n  if (value === null) {\n    return null;\n  }\n\n  if (typeof value === 'string' || typeof value === 'number' || typeof value === 'boolean') {\n    return value;\n  }\n\n  if (value === undefined || typeof value === 'function' || typeof value === 'symbol') {\n    return undefined;\n  }\n\n  if (typeof value === 'bigint') {\n    return value.toString();\n  }\n\n  if (value instanceof Date) {\n    return value.toISOString();\n  }\n\n  if (Array.isArray(value)) {\n    return stringifyToJsonValue(value);\n  }\n\n  if (typeof URLSearchParams !== 'undefined' && value instanceof URLSearchParams) {\n    return serializeSearchParams(value);\n  }\n\n  if (isPlainObject(value)) {\n    return stringifyToJsonValue(value);\n  }\n\n  return undefined;\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/transformers-one-of-discriminated/core/serverSentEvents.gen.ts",
    "content": "// 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 const 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            // Normalize line endings: CRLF -> LF, then CR -> LF\n            buffer = buffer.replace(/\\r\\n/g, '\\n').replace(/\\r/g, '\\n');\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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/transformers-one-of-discriminated/core/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { Auth, AuthToken } from './auth.gen';\nimport type { BodySerializer, QuerySerializer, QuerySerializerOptions } from './bodySerializer.gen';\n\nexport type HttpMethod =\n  | 'connect'\n  | 'delete'\n  | 'get'\n  | 'head'\n  | 'options'\n  | 'patch'\n  | 'post'\n  | 'put'\n  | 'trace';\n\nexport type Client<\n  RequestFn = never,\n  Config = unknown,\n  MethodFn = never,\n  BuildUrlFn = never,\n  SseFn = never,\n> = {\n  /**\n   * Returns the final request URL.\n   */\n  buildUrl: BuildUrlFn;\n  getConfig: () => Config;\n  request: RequestFn;\n  setConfig: (config: Config) => Config;\n} & {\n  [K in HttpMethod]: MethodFn;\n} & ([SseFn] extends [never] ? { sse?: never } : { sse: { [K in HttpMethod]: SseFn } });\n\nexport interface Config {\n  /**\n   * Auth token or a function returning auth token. The resolved value will be\n   * added to the request payload as defined by its `security` array.\n   */\n  auth?: ((auth: Auth) => Promise<AuthToken> | AuthToken) | AuthToken;\n  /**\n   * A function for serializing request body parameter. By default,\n   * {@link JSON.stringify()} will be used.\n   */\n  bodySerializer?: BodySerializer | null;\n  /**\n   * An object containing any HTTP headers that you want to pre-populate your\n   * `Headers` object with.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/Headers/Headers#init See more}\n   */\n  headers?:\n    | RequestInit['headers']\n    | Record<\n        string,\n        string | number | boolean | (string | number | boolean)[] | null | undefined | unknown\n      >;\n  /**\n   * The request method.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/fetch#method See more}\n   */\n  method?: Uppercase<HttpMethod>;\n  /**\n   * A function for serializing request query parameters. By default, arrays\n   * will be exploded in form style, objects will be exploded in deepObject\n   * style, and reserved characters are percent-encoded.\n   *\n   * This method will have no effect if the native `paramsSerializer()` Axios\n   * API function is used.\n   *\n   * {@link https://swagger.io/docs/specification/serialization/#query View examples}\n   */\n  querySerializer?: QuerySerializer | QuerySerializerOptions;\n  /**\n   * A function validating request data. This is useful if you want to ensure\n   * the request conforms to the desired shape, so it can be safely sent to\n   * the server.\n   */\n  requestValidator?: (data: unknown) => Promise<unknown>;\n  /**\n   * A function transforming response data before it's returned. This is useful\n   * for post-processing data, e.g. converting ISO strings into Date objects.\n   */\n  responseTransformer?: (data: unknown) => Promise<unknown>;\n  /**\n   * A function validating response data. This is useful if you want to ensure\n   * the response conforms to the desired shape, so it can be safely passed to\n   * the transformers and returned to the user.\n   */\n  responseValidator?: (data: unknown) => Promise<unknown>;\n}\n\ntype IsExactlyNeverOrNeverUndefined<T> = [T] extends [never]\n  ? true\n  : [T] extends [never | undefined]\n    ? [undefined] extends [T]\n      ? false\n      : true\n    : false;\n\nexport type OmitNever<T extends Record<string, unknown>> = {\n  [K in keyof T as IsExactlyNeverOrNeverUndefined<T[K]> extends true ? never : K]: T[K];\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/transformers-one-of-discriminated/core/utils.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/transformers-one-of-discriminated/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type { CategoryAction, ClientOptions, DirectAction, ListRulesData, ListRulesResponse, ListRulesResponses, RoundRobinAction, Rule, StatusAction, Then } from './types.gen';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/transformers-one-of-discriminated/transformers.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { ListRulesResponse } from './types.gen';\n\nconst ruleSchemaResponseTransformer = (data: any) => {\n    if (data.createdAt) {\n        data.createdAt = new Date(data.createdAt);\n    }\n    return data;\n};\n\nexport const listRulesResponseTransformer = async (data: any): Promise<ListRulesResponse> => {\n    data.rules = data.rules.map((item: any) => ruleSchemaResponseTransformer(item));\n    return data;\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/transformers-one-of-discriminated/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type ClientOptions = {\n    baseUrl: `${string}://${string}` | (string & {});\n};\n\nexport type Rule = {\n    id: string;\n    createdAt?: Date;\n    then: Then;\n};\n\n/**\n * Action to take when rule conditions are met\n */\nexport type Then = ({\n    type: 'direct';\n} & DirectAction) | ({\n    type: 'round-robin';\n} & RoundRobinAction) | ({\n    type: 'category';\n} & CategoryAction) | ({\n    type: 'status';\n} & StatusAction);\n\nexport type DirectAction = {\n    type: 'direct';\n    assignee: string;\n};\n\nexport type RoundRobinAction = {\n    type: 'round-robin';\n    id: string;\n    items: Array<string>;\n};\n\nexport type CategoryAction = {\n    type: 'category';\n    category: string;\n};\n\nexport type StatusAction = {\n    type: 'status';\n    status: string;\n};\n\nexport type ListRulesData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/rules';\n};\n\nexport type ListRulesResponses = {\n    /**\n     * Rules response\n     */\n    200: {\n        rules: Array<Rule>;\n    };\n};\n\nexport type ListRulesResponse = ListRulesResponses[keyof ListRulesResponses];\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/transformers-recursive/client/client.gen.ts",
    "content": "// 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 (options: RequestOptions) => {\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 url = buildUrl(opts);\n\n    return { opts, url };\n  };\n\n  const request: Client['request'] = async (options) => {\n    // @ts-expect-error\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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/transformers-recursive/client/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type { Auth } from '../core/auth.gen';\nexport type { QuerySerializerOptions } from '../core/bodySerializer.gen';\nexport {\n  formDataBodySerializer,\n  jsonBodySerializer,\n  urlSearchParamsBodySerializer,\n} from '../core/bodySerializer.gen';\nexport { buildClientParams } from '../core/params.gen';\nexport { serializeQueryKeyValue } from '../core/queryKeySerializer.gen';\nexport { createClient } from './client.gen';\nexport type {\n  Client,\n  ClientOptions,\n  Config,\n  CreateClientConfig,\n  Options,\n  RequestOptions,\n  RequestResult,\n  ResolvedRequestOptions,\n  ResponseStyle,\n  TDataShape,\n} from './types.gen';\nexport { createConfig, mergeHeaders } from './utils.gen';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/transformers-recursive/client/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { Auth } from '../core/auth.gen';\nimport type {\n  ServerSentEventsOptions,\n  ServerSentEventsResult,\n} from '../core/serverSentEvents.gen';\nimport type { Client as CoreClient, Config as CoreConfig } from '../core/types.gen';\nimport type { Middleware } from './utils.gen';\n\nexport type ResponseStyle = 'data' | 'fields';\n\nexport interface Config<T extends ClientOptions = ClientOptions>\n  extends Omit<RequestInit, 'body' | 'headers' | 'method'>, CoreConfig {\n  /**\n   * Base URL for all requests made by this client.\n   */\n  baseUrl?: T['baseUrl'];\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   * Please don't use the Fetch client for Next.js applications. The `next`\n   * options won't have any effect.\n   *\n   * Install {@link https://www.npmjs.com/package/@hey-api/client-next `@hey-api/client-next`} instead.\n   */\n  next?: never;\n  /**\n   * Return the response data parsed in a specified format. By default, `auto`\n   * will infer the appropriate method from the `Content-Type` response header.\n   * You can override this behavior with any of the {@link Body} methods.\n   * Select `stream` if you don't want to parse response data at all.\n   *\n   * @default 'auto'\n   */\n  parseAs?: 'arrayBuffer' | 'auto' | 'blob' | 'formData' | 'json' | 'stream' | 'text';\n  /**\n   * Should we return only data or multiple fields (data, error, response, etc.)?\n   *\n   * @default 'fields'\n   */\n  responseStyle?: ResponseStyle;\n  /**\n   * Throw an error instead of returning it in the response?\n   *\n   * @default false\n   */\n  throwOnError?: T['throwOnError'];\n}\n\nexport interface RequestOptions<\n  TData = unknown,\n  TResponseStyle extends ResponseStyle = 'fields',\n  ThrowOnError extends boolean = boolean,\n  Url extends string = string,\n>\n  extends\n    Config<{\n      responseStyle: TResponseStyle;\n      throwOnError: ThrowOnError;\n    }>,\n    Pick<\n      ServerSentEventsOptions<TData>,\n      | 'onRequest'\n      | 'onSseError'\n      | 'onSseEvent'\n      | 'sseDefaultRetryDelay'\n      | 'sseMaxRetryAttempts'\n      | 'sseMaxRetryDelay'\n    > {\n  /**\n   * Any body that you want to add to your request.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/fetch#body}\n   */\n  body?: unknown;\n  path?: Record<string, unknown>;\n  query?: Record<string, unknown>;\n  /**\n   * Security mechanism(s) to use for the request.\n   */\n  security?: ReadonlyArray<Auth>;\n  url: Url;\n}\n\nexport interface ResolvedRequestOptions<\n  TResponseStyle extends ResponseStyle = 'fields',\n  ThrowOnError extends boolean = boolean,\n  Url extends string = string,\n> extends RequestOptions<unknown, TResponseStyle, ThrowOnError, Url> {\n  serializedBody?: string;\n}\n\nexport type RequestResult<\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = boolean,\n  TResponseStyle extends ResponseStyle = 'fields',\n> = ThrowOnError extends true\n  ? Promise<\n      TResponseStyle extends 'data'\n        ? TData extends Record<string, unknown>\n          ? TData[keyof TData]\n          : TData\n        : {\n            data: TData extends Record<string, unknown> ? TData[keyof TData] : TData;\n            request: Request;\n            response: Response;\n          }\n    >\n  : Promise<\n      TResponseStyle extends 'data'\n        ? (TData extends Record<string, unknown> ? TData[keyof TData] : TData) | undefined\n        : (\n            | {\n                data: TData extends Record<string, unknown> ? TData[keyof TData] : TData;\n                error: undefined;\n              }\n            | {\n                data: undefined;\n                error: TError extends Record<string, unknown> ? TError[keyof TError] : TError;\n              }\n          ) & {\n            request: Request;\n            response: Response;\n          }\n    >;\n\nexport interface ClientOptions {\n  baseUrl?: string;\n  responseStyle?: ResponseStyle;\n  throwOnError?: boolean;\n}\n\ntype MethodFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'>,\n) => RequestResult<TData, TError, ThrowOnError, TResponseStyle>;\n\ntype SseFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'>,\n) => Promise<ServerSentEventsResult<TData, TError>>;\n\ntype RequestFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'> &\n    Pick<Required<RequestOptions<TData, TResponseStyle, ThrowOnError>>, 'method'>,\n) => RequestResult<TData, TError, ThrowOnError, TResponseStyle>;\n\ntype BuildUrlFn = <\n  TData extends {\n    body?: unknown;\n    path?: Record<string, unknown>;\n    query?: Record<string, unknown>;\n    url: string;\n  },\n>(\n  options: TData & Options<TData>,\n) => string;\n\nexport type Client = CoreClient<RequestFn, Config, MethodFn, BuildUrlFn, SseFn> & {\n  interceptors: Middleware<Request, Response, unknown, ResolvedRequestOptions>;\n};\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 = ClientOptions> = (\n  override?: Config<ClientOptions & T>,\n) => Config<Required<ClientOptions> & T>;\n\nexport interface TDataShape {\n  body?: unknown;\n  headers?: unknown;\n  path?: unknown;\n  query?: unknown;\n  url: string;\n}\n\ntype OmitKeys<T, K> = Pick<T, Exclude<keyof T, K>>;\n\nexport type Options<\n  TData extends TDataShape = TDataShape,\n  ThrowOnError extends boolean = boolean,\n  TResponse = unknown,\n  TResponseStyle extends ResponseStyle = 'fields',\n> = OmitKeys<\n  RequestOptions<TResponse, TResponseStyle, ThrowOnError>,\n  'body' | 'path' | 'query' | 'url'\n> &\n  ([TData] extends [never] ? unknown : Omit<TData, 'url'>);\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/transformers-recursive/client/utils.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/transformers-recursive/client.gen.ts",
    "content": "// 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>());\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/transformers-recursive/core/auth.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/transformers-recursive/core/bodySerializer.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/transformers-recursive/core/params.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/transformers-recursive/core/pathSerializer.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/transformers-recursive/core/queryKeySerializer.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\n/**\n * JSON-friendly union that mirrors what Pinia Colada can hash.\n */\nexport type JsonValue =\n  | null\n  | string\n  | number\n  | boolean\n  | JsonValue[]\n  | { [key: string]: JsonValue };\n\n/**\n * Replacer that converts non-JSON values (bigint, Date, etc.) to safe substitutes.\n */\nexport const queryKeyJsonReplacer = (_key: string, value: unknown) => {\n  if (value === undefined || typeof value === 'function' || typeof value === 'symbol') {\n    return undefined;\n  }\n  if (typeof value === 'bigint') {\n    return value.toString();\n  }\n  if (value instanceof Date) {\n    return value.toISOString();\n  }\n  return value;\n};\n\n/**\n * Safely stringifies a value and parses it back into a JsonValue.\n */\nexport const stringifyToJsonValue = (input: unknown): JsonValue | undefined => {\n  try {\n    const json = JSON.stringify(input, queryKeyJsonReplacer);\n    if (json === undefined) {\n      return undefined;\n    }\n    return JSON.parse(json) as JsonValue;\n  } catch {\n    return undefined;\n  }\n};\n\n/**\n * Detects plain objects (including objects with a null prototype).\n */\nconst isPlainObject = (value: unknown): value is Record<string, unknown> => {\n  if (value === null || typeof value !== 'object') {\n    return false;\n  }\n  const prototype = Object.getPrototypeOf(value as object);\n  return prototype === Object.prototype || prototype === null;\n};\n\n/**\n * Turns URLSearchParams into a sorted JSON object for deterministic keys.\n */\nconst serializeSearchParams = (params: URLSearchParams): JsonValue => {\n  const entries = Array.from(params.entries()).sort(([a], [b]) => a.localeCompare(b));\n  const result: Record<string, JsonValue> = {};\n\n  for (const [key, value] of entries) {\n    const existing = result[key];\n    if (existing === undefined) {\n      result[key] = value;\n      continue;\n    }\n\n    if (Array.isArray(existing)) {\n      (existing as string[]).push(value);\n    } else {\n      result[key] = [existing, value];\n    }\n  }\n\n  return result;\n};\n\n/**\n * Normalizes any accepted value into a JSON-friendly shape for query keys.\n */\nexport const serializeQueryKeyValue = (value: unknown): JsonValue | undefined => {\n  if (value === null) {\n    return null;\n  }\n\n  if (typeof value === 'string' || typeof value === 'number' || typeof value === 'boolean') {\n    return value;\n  }\n\n  if (value === undefined || typeof value === 'function' || typeof value === 'symbol') {\n    return undefined;\n  }\n\n  if (typeof value === 'bigint') {\n    return value.toString();\n  }\n\n  if (value instanceof Date) {\n    return value.toISOString();\n  }\n\n  if (Array.isArray(value)) {\n    return stringifyToJsonValue(value);\n  }\n\n  if (typeof URLSearchParams !== 'undefined' && value instanceof URLSearchParams) {\n    return serializeSearchParams(value);\n  }\n\n  if (isPlainObject(value)) {\n    return stringifyToJsonValue(value);\n  }\n\n  return undefined;\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/transformers-recursive/core/serverSentEvents.gen.ts",
    "content": "// 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 const 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            // Normalize line endings: CRLF -> LF, then CR -> LF\n            buffer = buffer.replace(/\\r\\n/g, '\\n').replace(/\\r/g, '\\n');\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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/transformers-recursive/core/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { Auth, AuthToken } from './auth.gen';\nimport type { BodySerializer, QuerySerializer, QuerySerializerOptions } from './bodySerializer.gen';\n\nexport type HttpMethod =\n  | 'connect'\n  | 'delete'\n  | 'get'\n  | 'head'\n  | 'options'\n  | 'patch'\n  | 'post'\n  | 'put'\n  | 'trace';\n\nexport type Client<\n  RequestFn = never,\n  Config = unknown,\n  MethodFn = never,\n  BuildUrlFn = never,\n  SseFn = never,\n> = {\n  /**\n   * Returns the final request URL.\n   */\n  buildUrl: BuildUrlFn;\n  getConfig: () => Config;\n  request: RequestFn;\n  setConfig: (config: Config) => Config;\n} & {\n  [K in HttpMethod]: MethodFn;\n} & ([SseFn] extends [never] ? { sse?: never } : { sse: { [K in HttpMethod]: SseFn } });\n\nexport interface Config {\n  /**\n   * Auth token or a function returning auth token. The resolved value will be\n   * added to the request payload as defined by its `security` array.\n   */\n  auth?: ((auth: Auth) => Promise<AuthToken> | AuthToken) | AuthToken;\n  /**\n   * A function for serializing request body parameter. By default,\n   * {@link JSON.stringify()} will be used.\n   */\n  bodySerializer?: BodySerializer | null;\n  /**\n   * An object containing any HTTP headers that you want to pre-populate your\n   * `Headers` object with.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/Headers/Headers#init See more}\n   */\n  headers?:\n    | RequestInit['headers']\n    | Record<\n        string,\n        string | number | boolean | (string | number | boolean)[] | null | undefined | unknown\n      >;\n  /**\n   * The request method.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/fetch#method See more}\n   */\n  method?: Uppercase<HttpMethod>;\n  /**\n   * A function for serializing request query parameters. By default, arrays\n   * will be exploded in form style, objects will be exploded in deepObject\n   * style, and reserved characters are percent-encoded.\n   *\n   * This method will have no effect if the native `paramsSerializer()` Axios\n   * API function is used.\n   *\n   * {@link https://swagger.io/docs/specification/serialization/#query View examples}\n   */\n  querySerializer?: QuerySerializer | QuerySerializerOptions;\n  /**\n   * A function validating request data. This is useful if you want to ensure\n   * the request conforms to the desired shape, so it can be safely sent to\n   * the server.\n   */\n  requestValidator?: (data: unknown) => Promise<unknown>;\n  /**\n   * A function transforming response data before it's returned. This is useful\n   * for post-processing data, e.g. converting ISO strings into Date objects.\n   */\n  responseTransformer?: (data: unknown) => Promise<unknown>;\n  /**\n   * A function validating response data. This is useful if you want to ensure\n   * the response conforms to the desired shape, so it can be safely passed to\n   * the transformers and returned to the user.\n   */\n  responseValidator?: (data: unknown) => Promise<unknown>;\n}\n\ntype IsExactlyNeverOrNeverUndefined<T> = [T] extends [never]\n  ? true\n  : [T] extends [never | undefined]\n    ? [undefined] extends [T]\n      ? false\n      : true\n    : false;\n\nexport type OmitNever<T extends Record<string, unknown>> = {\n  [K in keyof T as IsExactlyNeverOrNeverUndefined<T[K]> extends true ? never : K]: T[K];\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/transformers-recursive/core/utils.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/transformers-recursive/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type { ClientOptions, GetTreeData, GetTreeResponse, GetTreeResponses, TreeNode } from './types.gen';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/transformers-recursive/transformers.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { GetTreeResponse } from './types.gen';\n\nconst treeNodeSchemaResponseTransformer = (data: any) => {\n    if (data.createdAt) {\n        data.createdAt = new Date(data.createdAt);\n    }\n    if (data.children) {\n        data.children = data.children.map((item: any) => treeNodeSchemaResponseTransformer(item));\n    }\n    return data;\n};\n\nexport const getTreeResponseTransformer = async (data: any): Promise<GetTreeResponse> => {\n    data = data.map((item: any) => treeNodeSchemaResponseTransformer(item));\n    return data;\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/transformers-recursive/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type ClientOptions = {\n    baseUrl: `${string}://${string}` | (string & {});\n};\n\nexport type TreeNode = {\n    id?: string;\n    name?: string;\n    createdAt?: Date;\n    children?: Array<TreeNode>;\n};\n\nexport type GetTreeData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/tree';\n};\n\nexport type GetTreeResponses = {\n    /**\n     * Success\n     */\n    200: Array<TreeNode>;\n};\n\nexport type GetTreeResponse = GetTreeResponses[keyof GetTreeResponses];\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/transforms-read-write/client/client.gen.ts",
    "content": "// 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 (options: RequestOptions) => {\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 url = buildUrl(opts);\n\n    return { opts, url };\n  };\n\n  const request: Client['request'] = async (options) => {\n    // @ts-expect-error\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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/transforms-read-write/client/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type { Auth } from '../core/auth.gen';\nexport type { QuerySerializerOptions } from '../core/bodySerializer.gen';\nexport {\n  formDataBodySerializer,\n  jsonBodySerializer,\n  urlSearchParamsBodySerializer,\n} from '../core/bodySerializer.gen';\nexport { buildClientParams } from '../core/params.gen';\nexport { serializeQueryKeyValue } from '../core/queryKeySerializer.gen';\nexport { createClient } from './client.gen';\nexport type {\n  Client,\n  ClientOptions,\n  Config,\n  CreateClientConfig,\n  Options,\n  RequestOptions,\n  RequestResult,\n  ResolvedRequestOptions,\n  ResponseStyle,\n  TDataShape,\n} from './types.gen';\nexport { createConfig, mergeHeaders } from './utils.gen';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/transforms-read-write/client/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { Auth } from '../core/auth.gen';\nimport type {\n  ServerSentEventsOptions,\n  ServerSentEventsResult,\n} from '../core/serverSentEvents.gen';\nimport type { Client as CoreClient, Config as CoreConfig } from '../core/types.gen';\nimport type { Middleware } from './utils.gen';\n\nexport type ResponseStyle = 'data' | 'fields';\n\nexport interface Config<T extends ClientOptions = ClientOptions>\n  extends Omit<RequestInit, 'body' | 'headers' | 'method'>, CoreConfig {\n  /**\n   * Base URL for all requests made by this client.\n   */\n  baseUrl?: T['baseUrl'];\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   * Please don't use the Fetch client for Next.js applications. The `next`\n   * options won't have any effect.\n   *\n   * Install {@link https://www.npmjs.com/package/@hey-api/client-next `@hey-api/client-next`} instead.\n   */\n  next?: never;\n  /**\n   * Return the response data parsed in a specified format. By default, `auto`\n   * will infer the appropriate method from the `Content-Type` response header.\n   * You can override this behavior with any of the {@link Body} methods.\n   * Select `stream` if you don't want to parse response data at all.\n   *\n   * @default 'auto'\n   */\n  parseAs?: 'arrayBuffer' | 'auto' | 'blob' | 'formData' | 'json' | 'stream' | 'text';\n  /**\n   * Should we return only data or multiple fields (data, error, response, etc.)?\n   *\n   * @default 'fields'\n   */\n  responseStyle?: ResponseStyle;\n  /**\n   * Throw an error instead of returning it in the response?\n   *\n   * @default false\n   */\n  throwOnError?: T['throwOnError'];\n}\n\nexport interface RequestOptions<\n  TData = unknown,\n  TResponseStyle extends ResponseStyle = 'fields',\n  ThrowOnError extends boolean = boolean,\n  Url extends string = string,\n>\n  extends\n    Config<{\n      responseStyle: TResponseStyle;\n      throwOnError: ThrowOnError;\n    }>,\n    Pick<\n      ServerSentEventsOptions<TData>,\n      | 'onRequest'\n      | 'onSseError'\n      | 'onSseEvent'\n      | 'sseDefaultRetryDelay'\n      | 'sseMaxRetryAttempts'\n      | 'sseMaxRetryDelay'\n    > {\n  /**\n   * Any body that you want to add to your request.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/fetch#body}\n   */\n  body?: unknown;\n  path?: Record<string, unknown>;\n  query?: Record<string, unknown>;\n  /**\n   * Security mechanism(s) to use for the request.\n   */\n  security?: ReadonlyArray<Auth>;\n  url: Url;\n}\n\nexport interface ResolvedRequestOptions<\n  TResponseStyle extends ResponseStyle = 'fields',\n  ThrowOnError extends boolean = boolean,\n  Url extends string = string,\n> extends RequestOptions<unknown, TResponseStyle, ThrowOnError, Url> {\n  serializedBody?: string;\n}\n\nexport type RequestResult<\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = boolean,\n  TResponseStyle extends ResponseStyle = 'fields',\n> = ThrowOnError extends true\n  ? Promise<\n      TResponseStyle extends 'data'\n        ? TData extends Record<string, unknown>\n          ? TData[keyof TData]\n          : TData\n        : {\n            data: TData extends Record<string, unknown> ? TData[keyof TData] : TData;\n            request: Request;\n            response: Response;\n          }\n    >\n  : Promise<\n      TResponseStyle extends 'data'\n        ? (TData extends Record<string, unknown> ? TData[keyof TData] : TData) | undefined\n        : (\n            | {\n                data: TData extends Record<string, unknown> ? TData[keyof TData] : TData;\n                error: undefined;\n              }\n            | {\n                data: undefined;\n                error: TError extends Record<string, unknown> ? TError[keyof TError] : TError;\n              }\n          ) & {\n            request: Request;\n            response: Response;\n          }\n    >;\n\nexport interface ClientOptions {\n  baseUrl?: string;\n  responseStyle?: ResponseStyle;\n  throwOnError?: boolean;\n}\n\ntype MethodFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'>,\n) => RequestResult<TData, TError, ThrowOnError, TResponseStyle>;\n\ntype SseFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'>,\n) => Promise<ServerSentEventsResult<TData, TError>>;\n\ntype RequestFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'> &\n    Pick<Required<RequestOptions<TData, TResponseStyle, ThrowOnError>>, 'method'>,\n) => RequestResult<TData, TError, ThrowOnError, TResponseStyle>;\n\ntype BuildUrlFn = <\n  TData extends {\n    body?: unknown;\n    path?: Record<string, unknown>;\n    query?: Record<string, unknown>;\n    url: string;\n  },\n>(\n  options: TData & Options<TData>,\n) => string;\n\nexport type Client = CoreClient<RequestFn, Config, MethodFn, BuildUrlFn, SseFn> & {\n  interceptors: Middleware<Request, Response, unknown, ResolvedRequestOptions>;\n};\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 = ClientOptions> = (\n  override?: Config<ClientOptions & T>,\n) => Config<Required<ClientOptions> & T>;\n\nexport interface TDataShape {\n  body?: unknown;\n  headers?: unknown;\n  path?: unknown;\n  query?: unknown;\n  url: string;\n}\n\ntype OmitKeys<T, K> = Pick<T, Exclude<keyof T, K>>;\n\nexport type Options<\n  TData extends TDataShape = TDataShape,\n  ThrowOnError extends boolean = boolean,\n  TResponse = unknown,\n  TResponseStyle extends ResponseStyle = 'fields',\n> = OmitKeys<\n  RequestOptions<TResponse, TResponseStyle, ThrowOnError>,\n  'body' | 'path' | 'query' | 'url'\n> &\n  ([TData] extends [never] ? unknown : Omit<TData, 'url'>);\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/transforms-read-write/client/utils.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/transforms-read-write/client.gen.ts",
    "content": "// 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>());\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/transforms-read-write/core/auth.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/transforms-read-write/core/bodySerializer.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/transforms-read-write/core/params.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/transforms-read-write/core/pathSerializer.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/transforms-read-write/core/queryKeySerializer.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\n/**\n * JSON-friendly union that mirrors what Pinia Colada can hash.\n */\nexport type JsonValue =\n  | null\n  | string\n  | number\n  | boolean\n  | JsonValue[]\n  | { [key: string]: JsonValue };\n\n/**\n * Replacer that converts non-JSON values (bigint, Date, etc.) to safe substitutes.\n */\nexport const queryKeyJsonReplacer = (_key: string, value: unknown) => {\n  if (value === undefined || typeof value === 'function' || typeof value === 'symbol') {\n    return undefined;\n  }\n  if (typeof value === 'bigint') {\n    return value.toString();\n  }\n  if (value instanceof Date) {\n    return value.toISOString();\n  }\n  return value;\n};\n\n/**\n * Safely stringifies a value and parses it back into a JsonValue.\n */\nexport const stringifyToJsonValue = (input: unknown): JsonValue | undefined => {\n  try {\n    const json = JSON.stringify(input, queryKeyJsonReplacer);\n    if (json === undefined) {\n      return undefined;\n    }\n    return JSON.parse(json) as JsonValue;\n  } catch {\n    return undefined;\n  }\n};\n\n/**\n * Detects plain objects (including objects with a null prototype).\n */\nconst isPlainObject = (value: unknown): value is Record<string, unknown> => {\n  if (value === null || typeof value !== 'object') {\n    return false;\n  }\n  const prototype = Object.getPrototypeOf(value as object);\n  return prototype === Object.prototype || prototype === null;\n};\n\n/**\n * Turns URLSearchParams into a sorted JSON object for deterministic keys.\n */\nconst serializeSearchParams = (params: URLSearchParams): JsonValue => {\n  const entries = Array.from(params.entries()).sort(([a], [b]) => a.localeCompare(b));\n  const result: Record<string, JsonValue> = {};\n\n  for (const [key, value] of entries) {\n    const existing = result[key];\n    if (existing === undefined) {\n      result[key] = value;\n      continue;\n    }\n\n    if (Array.isArray(existing)) {\n      (existing as string[]).push(value);\n    } else {\n      result[key] = [existing, value];\n    }\n  }\n\n  return result;\n};\n\n/**\n * Normalizes any accepted value into a JSON-friendly shape for query keys.\n */\nexport const serializeQueryKeyValue = (value: unknown): JsonValue | undefined => {\n  if (value === null) {\n    return null;\n  }\n\n  if (typeof value === 'string' || typeof value === 'number' || typeof value === 'boolean') {\n    return value;\n  }\n\n  if (value === undefined || typeof value === 'function' || typeof value === 'symbol') {\n    return undefined;\n  }\n\n  if (typeof value === 'bigint') {\n    return value.toString();\n  }\n\n  if (value instanceof Date) {\n    return value.toISOString();\n  }\n\n  if (Array.isArray(value)) {\n    return stringifyToJsonValue(value);\n  }\n\n  if (typeof URLSearchParams !== 'undefined' && value instanceof URLSearchParams) {\n    return serializeSearchParams(value);\n  }\n\n  if (isPlainObject(value)) {\n    return stringifyToJsonValue(value);\n  }\n\n  return undefined;\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/transforms-read-write/core/serverSentEvents.gen.ts",
    "content": "// 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 const 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            // Normalize line endings: CRLF -> LF, then CR -> LF\n            buffer = buffer.replace(/\\r\\n/g, '\\n').replace(/\\r/g, '\\n');\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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/transforms-read-write/core/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { Auth, AuthToken } from './auth.gen';\nimport type { BodySerializer, QuerySerializer, QuerySerializerOptions } from './bodySerializer.gen';\n\nexport type HttpMethod =\n  | 'connect'\n  | 'delete'\n  | 'get'\n  | 'head'\n  | 'options'\n  | 'patch'\n  | 'post'\n  | 'put'\n  | 'trace';\n\nexport type Client<\n  RequestFn = never,\n  Config = unknown,\n  MethodFn = never,\n  BuildUrlFn = never,\n  SseFn = never,\n> = {\n  /**\n   * Returns the final request URL.\n   */\n  buildUrl: BuildUrlFn;\n  getConfig: () => Config;\n  request: RequestFn;\n  setConfig: (config: Config) => Config;\n} & {\n  [K in HttpMethod]: MethodFn;\n} & ([SseFn] extends [never] ? { sse?: never } : { sse: { [K in HttpMethod]: SseFn } });\n\nexport interface Config {\n  /**\n   * Auth token or a function returning auth token. The resolved value will be\n   * added to the request payload as defined by its `security` array.\n   */\n  auth?: ((auth: Auth) => Promise<AuthToken> | AuthToken) | AuthToken;\n  /**\n   * A function for serializing request body parameter. By default,\n   * {@link JSON.stringify()} will be used.\n   */\n  bodySerializer?: BodySerializer | null;\n  /**\n   * An object containing any HTTP headers that you want to pre-populate your\n   * `Headers` object with.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/Headers/Headers#init See more}\n   */\n  headers?:\n    | RequestInit['headers']\n    | Record<\n        string,\n        string | number | boolean | (string | number | boolean)[] | null | undefined | unknown\n      >;\n  /**\n   * The request method.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/fetch#method See more}\n   */\n  method?: Uppercase<HttpMethod>;\n  /**\n   * A function for serializing request query parameters. By default, arrays\n   * will be exploded in form style, objects will be exploded in deepObject\n   * style, and reserved characters are percent-encoded.\n   *\n   * This method will have no effect if the native `paramsSerializer()` Axios\n   * API function is used.\n   *\n   * {@link https://swagger.io/docs/specification/serialization/#query View examples}\n   */\n  querySerializer?: QuerySerializer | QuerySerializerOptions;\n  /**\n   * A function validating request data. This is useful if you want to ensure\n   * the request conforms to the desired shape, so it can be safely sent to\n   * the server.\n   */\n  requestValidator?: (data: unknown) => Promise<unknown>;\n  /**\n   * A function transforming response data before it's returned. This is useful\n   * for post-processing data, e.g. converting ISO strings into Date objects.\n   */\n  responseTransformer?: (data: unknown) => Promise<unknown>;\n  /**\n   * A function validating response data. This is useful if you want to ensure\n   * the response conforms to the desired shape, so it can be safely passed to\n   * the transformers and returned to the user.\n   */\n  responseValidator?: (data: unknown) => Promise<unknown>;\n}\n\ntype IsExactlyNeverOrNeverUndefined<T> = [T] extends [never]\n  ? true\n  : [T] extends [never | undefined]\n    ? [undefined] extends [T]\n      ? false\n      : true\n    : false;\n\nexport type OmitNever<T extends Record<string, unknown>> = {\n  [K in keyof T as IsExactlyNeverOrNeverUndefined<T[K]> extends true ? never : K]: T[K];\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/transforms-read-write/core/utils.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/transforms-read-write/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type { BarRead, BarReadWritable, BarWrite, BarWriteWritable, Baz, ClientOptions, Corge, CorgeWritable, Foo, Foo2, FooRead, FooReadWritable, FooReadWrite, FooReadWriteRef, FooReadWriteRef2, FooReadWriteRef2Writable, FooReadWriteRefWritable, FooReadWriteWritable, FooWrite, FooWriteWritable, PostFooReadData, PostFooReadResponse, PostFooReadResponses, PostFooReadWriteData, PostFooReadWriteResponse, PostFooReadWriteResponses, PostFooWriteData, PostFooWriteResponse, PostFooWriteResponses, PutFooWriteData, PutFooWriteResponse, PutFooWriteResponses, Quux, QuuxWritable, QuxAllRead, QuxAllWrite } from './types.gen';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/transforms-read-write/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type ClientOptions = {\n    baseUrl: `${string}://${string}` | (string & {});\n};\n\nexport type FooReadWrite = BarRead;\n\nexport type FooRead = BarRead & {\n    readonly foo?: string;\n};\n\nexport type FooWrite = BarWrite;\n\nexport type BarRead = Baz | QuxAllRead | {\n    readonly bar?: string;\n};\n\nexport type BarWrite = Baz | QuxAllRead;\n\nexport type Baz = {\n    baz?: string;\n};\n\nexport type QuxAllWrite = {\n    baz?: string;\n};\n\nexport type QuxAllRead = {\n    readonly baz?: string;\n};\n\nexport type Quux = {\n    baz?: Array<Baz>;\n    qux?: QuxAllRead;\n};\n\nexport type Corge = {\n    bar?: {\n        readonly baz?: boolean;\n    };\n};\n\nexport type FooReadWriteRef = {\n    foo?: FooReadWrite;\n    bar?: FooReadWriteRef;\n};\n\nexport type FooReadWriteRef2 = FooReadWrite;\n\nexport type FooReadWriteWritable = BarReadWritable & {\n    foo?: string;\n};\n\nexport type FooReadWritable = BarReadWritable;\n\nexport type FooWriteWritable = BarWriteWritable & {\n    foo?: string;\n};\n\nexport type BarReadWritable = Baz | QuxAllWrite;\n\nexport type BarWriteWritable = Baz | QuxAllWrite | {\n    bar?: string;\n};\n\nexport type QuuxWritable = {\n    baz?: Array<Baz>;\n};\n\nexport type CorgeWritable = {\n    foo?: {\n        baz?: boolean;\n    };\n};\n\nexport type FooReadWriteRefWritable = {\n    foo?: FooReadWriteWritable;\n    bar?: FooReadWriteRefWritable;\n};\n\nexport type FooReadWriteRef2Writable = FooReadWriteWritable;\n\n/**\n * Query parameter\n */\nexport type Foo = string;\n\n/**\n * PUT /foo-write payload\n */\nexport type Foo2 = {\n    foo?: BarReadWritable;\n};\n\nexport type PostFooReadWriteData = {\n    body: FooReadWriteWritable;\n    path?: never;\n    query?: never;\n    url: '/foo-read-write';\n};\n\nexport type PostFooReadWriteResponses = {\n    /**\n     * OK\n     */\n    200: FooReadWrite;\n};\n\nexport type PostFooReadWriteResponse = PostFooReadWriteResponses[keyof PostFooReadWriteResponses];\n\nexport type PostFooReadData = {\n    body: FooReadWritable;\n    path?: never;\n    query?: never;\n    url: '/foo-read';\n};\n\nexport type PostFooReadResponses = {\n    /**\n     * OK\n     */\n    200: FooRead;\n};\n\nexport type PostFooReadResponse = PostFooReadResponses[keyof PostFooReadResponses];\n\nexport type PostFooWriteData = {\n    body: FooWriteWritable;\n    path?: never;\n    query?: never;\n    url: '/foo-write';\n};\n\nexport type PostFooWriteResponses = {\n    /**\n     * OK\n     */\n    200: FooWrite;\n};\n\nexport type PostFooWriteResponse = PostFooWriteResponses[keyof PostFooWriteResponses];\n\nexport type PutFooWriteData = {\n    /**\n     * PUT /foo-write payload\n     */\n    body: Foo2;\n    path?: never;\n    query?: {\n        /**\n         * Query parameter\n         */\n        foo?: string;\n    };\n    url: '/foo-write';\n};\n\nexport type PutFooWriteResponses = {\n    /**\n     * OK\n     */\n    200: FooWrite;\n};\n\nexport type PutFooWriteResponse = PutFooWriteResponses[keyof PutFooWriteResponses];\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/transforms-read-write-nested/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type { ClientOptions, CreateItemRequest, CreateItemRequestWritable, ItemCreateData, ItemCreateResponses, Payload, PayloadWritable } from './types.gen';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/transforms-read-write-nested/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type ClientOptions = {\n    baseUrl: `${string}://${string}` | (string & {});\n};\n\nexport type CreateItemRequest = {\n    payload: Payload;\n};\n\nexport type Payload = {\n    kind: 'jpeg';\n};\n\nexport type CreateItemRequestWritable = {\n    payload: PayloadWritable;\n};\n\nexport type PayloadWritable = {\n    kind: 'jpeg';\n    /**\n     * Data required on write\n     */\n    encoded: string;\n};\n\nexport type ItemCreateData = {\n    body: CreateItemRequestWritable;\n    path?: never;\n    query?: never;\n    url: '/items';\n};\n\nexport type ItemCreateResponses = {\n    /**\n     * Created\n     */\n    201: unknown;\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/transforms-read-write-response/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type { ClientOptions, Item, ItemListData, ItemListResponse, ItemListResponse2, ItemListResponses, ItemListResponseWritable, ItemWritable } from './types.gen';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/transforms-read-write-response/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type ClientOptions = {\n    baseUrl: `${string}://${string}` | (string & {});\n};\n\nexport type ItemListResponse = {\n    items: Array<Item>;\n};\n\nexport type Item = {\n    /**\n     * Server-generated ID\n     */\n    readonly id: string;\n    name: string;\n    /**\n     * Server-generated timestamp\n     */\n    readonly created_at?: string;\n};\n\nexport type ItemListResponseWritable = {\n    items: Array<ItemWritable>;\n};\n\nexport type ItemWritable = {\n    name: string;\n};\n\nexport type ItemListData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/items';\n};\n\nexport type ItemListResponses = {\n    /**\n     * Success\n     */\n    200: ItemListResponse;\n};\n\nexport type ItemListResponse2 = ItemListResponses[keyof ItemListResponses];\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/transforms-read-write-unevaluated/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type { ClientOptions, CreateXData, CreateXResponse, CreateXResponses, DisposableEmail, DisposableEmailWritable, GetXData, GetXResponse, GetXResponses } from './types.gen';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/transforms-read-write-unevaluated/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type ClientOptions = {\n    baseUrl: `${string}://${string}` | (string & {});\n};\n\nexport type DisposableEmail = {\n    domain: string;\n    readonly disposable: boolean;\n    metadata: {\n        [key: string]: unknown;\n    };\n};\n\nexport type DisposableEmailWritable = {\n    domain: string;\n    metadata: {\n        [key: string]: unknown;\n    };\n};\n\nexport type GetXData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/x';\n};\n\nexport type GetXResponses = {\n    /**\n     * ok\n     */\n    200: DisposableEmail;\n};\n\nexport type GetXResponse = GetXResponses[keyof GetXResponses];\n\nexport type CreateXData = {\n    body: DisposableEmailWritable;\n    path?: never;\n    query?: never;\n    url: '/x';\n};\n\nexport type CreateXResponses = {\n    /**\n     * ok\n     */\n    200: DisposableEmail;\n};\n\nexport type CreateXResponse = CreateXResponses[keyof CreateXResponses];\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/transforms-schemas-name/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type { ClientOptions, Comment, GetUsersData, GetUsersResponse, GetUsersResponses, Post, PostPostsData, PostPostsResponse, PostPostsResponses, User, UserProfile } from './types.gen';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/transforms-schemas-name/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type ClientOptions = {\n    baseUrl: `${string}://${string}` | (string & {});\n};\n\nexport type User = {\n    id?: string;\n    name?: string;\n    profile?: UserProfile;\n};\n\nexport type UserProfile = {\n    bio?: string;\n    avatar?: string;\n};\n\nexport type Post = {\n    id?: string;\n    title?: string;\n    author?: User;\n    comments?: Array<Comment>;\n};\n\nexport type Comment = {\n    id?: string;\n    text?: string;\n    author?: User;\n};\n\nexport type GetUsersData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/users';\n};\n\nexport type GetUsersResponses = {\n    /**\n     * Success\n     */\n    200: User;\n};\n\nexport type GetUsersResponse = GetUsersResponses[keyof GetUsersResponses];\n\nexport type PostPostsData = {\n    body?: Post;\n    path?: never;\n    query?: never;\n    url: '/posts';\n};\n\nexport type PostPostsResponses = {\n    /**\n     * Created\n     */\n    201: Post;\n};\n\nexport type PostPostsResponse = PostPostsResponses[keyof PostPostsResponses];\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/type-invalid/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type { ClientOptions, Foo } from './types.gen';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/type-invalid/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type ClientOptions = {\n    baseUrl: `${string}://${string}` | (string & {});\n};\n\nexport type Foo = unknown;\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/union-types/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type { ClientOptions, Foo } from './types.gen';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/union-types/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type ClientOptions = {\n    baseUrl: `${string}://${string}` | (string & {});\n};\n\nexport type Foo = {\n    bar?: number | boolean | string;\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/webhooks/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type { ClientOptions, SessionAlertWebhookPayload, SessionAlertWebhookRequest, SessionEndedWebhookPayload, SessionEndedWebhookRequest, SessionLiveStreamingStartedWebhookPayload, SessionLiveStreamingStartedWebhookRequest, SessionLiveStreamingStoppedWebhookPayload, SessionLiveStreamingStoppedWebhookRequest, SessionRecordingCompletedWebhookPayload, SessionRecordingCompletedWebhookRequest, SessionRecordingDeletedWebhookPayload, SessionRecordingDeletedWebhookRequest, SessionRecordingPausedWebhookPayload, SessionRecordingPausedWebhookRequest, SessionRecordingRecoveredWebhookPayload, SessionRecordingRecoveredWebhookRequest, SessionRecordingResumedWebhookPayload, SessionRecordingResumedWebhookRequest, SessionRecordingStartedWebhookPayload, SessionRecordingStartedWebhookRequest, SessionRecordingStoppedWebhookPayload, SessionRecordingStoppedWebhookRequest, SessionRecordingTranscriptCompletedWebhookPayload, SessionRecordingTranscriptCompletedWebhookRequest, SessionRecordingTranscriptFailedWebhookPayload, SessionRecordingTranscriptFailedWebhookRequest, SessionRecordingTrashedWebhookPayload, SessionRecordingTrashedWebhookRequest, SessionSharingEndedWebhookPayload, SessionSharingEndedWebhookRequest, SessionSharingStartedWebhookPayload, SessionSharingStartedWebhookRequest, SessionStartedWebhookPayload, SessionStartedWebhookRequest, SessionStreamIngestionConnectedWebhookPayload, SessionStreamIngestionConnectedWebhookRequest, SessionStreamIngestionDisconnectedWebhookPayload, SessionStreamIngestionDisconnectedWebhookRequest, SessionStreamIngestionStartedWebhookPayload, SessionStreamIngestionStartedWebhookRequest, SessionStreamIngestionStoppedWebhookPayload, SessionStreamIngestionStoppedWebhookRequest, SessionStreamIngestionUnbindWebhookPayload, SessionStreamIngestionUnbindWebhookRequest, SessionUserJoinedWebhookPayload, SessionUserJoinedWebhookRequest, SessionUserLeftWebhookPayload, SessionUserLeftWebhookRequest, SessionUserPhoneCalloutAcceptedWebhookPayload, SessionUserPhoneCalloutAcceptedWebhookRequest, SessionUserPhoneCalloutCanceledWebhookPayload, SessionUserPhoneCalloutCanceledWebhookRequest, SessionUserPhoneCalloutMissedWebhookPayload, SessionUserPhoneCalloutMissedWebhookRequest, SessionUserPhoneCalloutRejectedWebhookPayload, SessionUserPhoneCalloutRejectedWebhookRequest, SessionUserPhoneCalloutRingingWebhookPayload, SessionUserPhoneCalloutRingingWebhookRequest, SessionUserRoomSystemCalloutAcceptedWebhookPayload, SessionUserRoomSystemCalloutAcceptedWebhookRequest, SessionUserRoomSystemCalloutFailedWebhookPayload, SessionUserRoomSystemCalloutFailedWebhookRequest, SessionUserRoomSystemCalloutMissedWebhookPayload, SessionUserRoomSystemCalloutMissedWebhookRequest, SessionUserRoomSystemCalloutRejectedWebhookPayload, SessionUserRoomSystemCalloutRejectedWebhookRequest, SessionUserRoomSystemCalloutRingingWebhookPayload, SessionUserRoomSystemCalloutRingingWebhookRequest, Webhooks } from './types.gen';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/webhooks/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type ClientOptions = {\n    baseUrl: `${string}://${string}` | (string & {});\n};\n\nexport type Webhooks = SessionUserPhoneCalloutRingingWebhookRequest | SessionUserRoomSystemCalloutRingingWebhookRequest | SessionRecordingStartedWebhookRequest | SessionRecordingResumedWebhookRequest | SessionLiveStreamingStoppedWebhookRequest | SessionStreamIngestionStoppedWebhookRequest | SessionUserRoomSystemCalloutRejectedWebhookRequest | SessionAlertWebhookRequest | SessionSharingEndedWebhookRequest | SessionRecordingPausedWebhookRequest | SessionEndedWebhookRequest | SessionStartedWebhookRequest | SessionStreamIngestionUnbindWebhookRequest | SessionLiveStreamingStartedWebhookRequest | SessionUserRoomSystemCalloutMissedWebhookRequest | SessionUserPhoneCalloutAcceptedWebhookRequest | SessionUserLeftWebhookRequest | SessionSharingStartedWebhookRequest | SessionUserPhoneCalloutCanceledWebhookRequest | SessionRecordingTranscriptCompletedWebhookRequest | SessionRecordingDeletedWebhookRequest | SessionUserRoomSystemCalloutFailedWebhookRequest | SessionRecordingCompletedWebhookRequest | SessionRecordingTranscriptFailedWebhookRequest | SessionRecordingTrashedWebhookRequest | SessionUserJoinedWebhookRequest | SessionStreamIngestionStartedWebhookRequest | SessionStreamIngestionConnectedWebhookRequest | SessionStreamIngestionDisconnectedWebhookRequest | SessionRecordingRecoveredWebhookRequest | SessionUserPhoneCalloutMissedWebhookRequest | SessionUserPhoneCalloutRejectedWebhookRequest | SessionUserRoomSystemCalloutAcceptedWebhookRequest | SessionRecordingStoppedWebhookRequest;\n\n/**\n * # session.user_phone_callout_ringing\n *\n * The **Invited party's phone (call out) ringing** event is triggered every time a user's phone is ringing when they were invited to join a session through phone (call out). Video SDK call out operates in a similar manner as [Zoom meeting call out](https://support.zoom.com/hc/article?id=zm_kb&sysparm_article=KB0062038).\n *\n * ## Prerequisites\n *\n * * **Event Subscriptions** must be enabled for your app with the following configurations:\n * * A valid **Event Notification Endpoint URL**.\n * * The **Invited party's phone (call out) ringing** subscription enabled under the **Session** event.\n *\n *\n *\n *\n * **Event type**: `session.user_phone_callout_ringing`\n *\n */\nexport type SessionUserPhoneCalloutRingingWebhookPayload = {\n    /**\n     * The name of the event.\n     */\n    event: string;\n    /**\n     * A timestamp at which the event occurred.\n     */\n    event_ts: number;\n    payload: {\n        /**\n         * The account ID of the session host.\n         */\n        account_id: string;\n        /**\n         * Information about the session.\n         */\n        object: {\n            /**\n             * The session ID.\n             *\n             * @deprecated\n             */\n            id?: number;\n            /**\n             * The session's universally unique identifier (UUID). Each session instance generates a session UUID.\n             *\n             * @deprecated\n             */\n            uuid?: string;\n            /**\n             * Unique session identifier. Each instance of the session will have its own session_id.\n             */\n            session_id: string;\n            /**\n             * Session name.\n             */\n            session_name: string;\n            /**\n             * The Video SDK custom session ID.\n             */\n            session_key: string;\n            /**\n             * Another identifier for the inviter. Can be a number or characters.\n             */\n            user_key: string;\n            /**\n             * The user ID of the session host.\n             */\n            host_id: string;\n            /**\n             * Information about the invited user.\n             */\n            participant: {\n                /**\n                 * The user's name to display in the session.\n                 */\n                invitee_name: string;\n                /**\n                 * The user's phone number.\n                 */\n                phone_number: number;\n                /**\n                 * The number used to call out to the invited user.\n                 */\n                from_number: number;\n            };\n        };\n    };\n};\n\nexport type SessionUserPhoneCalloutRingingWebhookRequest = {\n    body: SessionUserPhoneCalloutRingingWebhookPayload;\n    key: 'session.user_phone_callout_ringing';\n    path?: never;\n    query?: never;\n};\n\n/**\n * # session.user_room_system_callout_ringing\n *\n * The **Invited party's phone (call out) ringing in Zoom room** event is triggered every time a user's phone is ringing when they were invited to [join a session through phone (call out) from a Zoom room](https://support.zoom.us/hc/en-us/articles/205369035).\n *\n * ## Prerequisites\n *\n * * **Event Subscriptions** must be enabled for your app with the following configurations:\n * * A valid **Event Notification Endpoint URL**.\n * * The **Invited party's phone (call out) ringing in Zoom room** subscription enabled under the **Session** event.\n *\n *\n *\n * **Event type**: `session.user_room_system_callout_ringing`\n *\n */\nexport type SessionUserRoomSystemCalloutRingingWebhookPayload = {\n    /**\n     * The name of the event.\n     */\n    event: string;\n    /**\n     * A timestamp at which the event occurred.\n     */\n    event_ts: number;\n    payload: {\n        /**\n         * The account ID of the session host.\n         */\n        account_id: string;\n        /**\n         * Information about the session.\n         */\n        object: {\n            /**\n             * The session ID.\n             *\n             * @deprecated\n             */\n            id?: number;\n            /**\n             * The session's universally unique identifier (UUID). Each session instance generates a session UUID.\n             *\n             * @deprecated\n             */\n            uuid?: string;\n            /**\n             * Unique session identifier. Each instance of the session will have its own session_id.\n             */\n            session_id: string;\n            /**\n             * Session name.\n             */\n            session_name: string;\n            /**\n             * The user ID of the session host.\n             */\n            host_id: string;\n            /**\n             * The request unique identifier (UUID).\n             */\n            message_id: string;\n            /**\n             * The user name of the event's trigger.\n             */\n            inviter_name: string;\n            /**\n             * Information about the invited participant.\n             */\n            participant: {\n                /**\n                 * The type of call out. Use a value of h323 or sip.\n                 */\n                call_type: string;\n                /**\n                 * The user's device IP address.\n                 */\n                device_ip: string;\n                [key: string]: unknown;\n            };\n        };\n    };\n};\n\nexport type SessionUserRoomSystemCalloutRingingWebhookRequest = {\n    body: SessionUserRoomSystemCalloutRingingWebhookPayload;\n    key: 'session.user_room_system_callout_ringing';\n    path?: never;\n    query?: never;\n};\n\n/**\n * # session.recording_started\n * ---\n *\n * Event: `session.recording_started`\n *\n * ## Event description\n *\n * The **Session recording started** event is triggered every time a recording is started by one of your app users or account users.\n *\n * Only a session host or co-host can start, pause, resume, or stop a cloud recording. A recording is considered complete **after** the host or co-host ends the session. See [Enable cloud recording](https://developers.zoom.us/docs/video-sdk/account/#enable-cloud-recording) for details.\n *\n * ## Prerequisites\n *\n * * Cloud Recording must be enabled on the Video SDK account.\n * * Event Subscriptions must be enabled for your app with the following configurations:\n * * A valid Event Notification Endpoint URL.\n * * **Session recording started** subscription enabled under the **Recording** event.\n *\n * The tabs below display the complete schema, payload with data types, and an example of the `session.recording_started` event notification:\n *\n *\n *\n * **Event type**: `session.recording_started`\n *\n */\nexport type SessionRecordingStartedWebhookPayload = {\n    /**\n     * The event's name.\n     */\n    event: 'session.recording_started';\n    /**\n     * A timestamp, in milliseconds since epoch, at which the event occurred.\n     */\n    event_ts: number;\n    payload: {\n        /**\n         * The Video SDK account ID.\n         */\n        account_id: string;\n        /**\n         * Information about the session. This object only returns updated properties.\n         */\n        object: {\n            /**\n             * Unique session identifier. Each instance of the session will have its own session_id.\n             */\n            session_id: string;\n            /**\n             * Session name.\n             */\n            session_name: string;\n            /**\n             * The Video SDK custom session ID.\n             */\n            session_key: string;\n            /**\n             * The time at which the session started.\n             */\n            start_time: string;\n            /**\n             * The user's timezone.\n             */\n            timezone: string;\n            recording_file: {\n                /**\n                 * The recording start time.\n                 */\n                recording_start?: string;\n                /**\n                 * The recording end time. Response in general query.\n                 */\n                recording_end?: string;\n            };\n        };\n    };\n};\n\nexport type SessionRecordingStartedWebhookRequest = {\n    body: SessionRecordingStartedWebhookPayload;\n    key: 'session.recording_started';\n    path?: never;\n    query?: never;\n};\n\n/**\n * # session.recording_resumed\n * ---\n *\n * Event: `session.recording_resumed`\n *\n * ## Event description\n *\n * The **Session recording resumed** event is triggered every time a previously paused recording of a session is resumed.\n *\n * Only a session host or co-host can start, pause, resume, or stop a cloud recording. A recording is considered complete **after** the host or co-host ends the session. See [Enable cloud recording](https://developers.zoom.us/docs/video-sdk/account/#enable-cloud-recording) for details.\n *\n * ## Prerequisites\n *\n * * Cloud Recording must be enabled on the Video SDK account.\n * * Event Subscriptions must be enabled for your app with the following configurations:\n * * A valid Event Notification Endpoint URL.\n * * **Session recording resumed** subscription enabled under the **Recording** event.\n *\n * The tabs below display the complete schema, payload with data types, and an example of the `session.recording_resumed` event notification:\n *\n *\n *\n * **Event type**: `session.recording_resumed`\n *\n */\nexport type SessionRecordingResumedWebhookPayload = {\n    /**\n     * The event's name.\n     */\n    event: 'session.recording_resumed';\n    /**\n     * A timestamp, in milliseconds since epoch, at which the event occurred.\n     */\n    event_ts: number;\n    payload: {\n        /**\n         * The Video SDK account ID.\n         */\n        account_id: string;\n        /**\n         * Information about the session. This object only returns updated properties.\n         */\n        object: {\n            /**\n             * Unique session identifier. Each instance of the session will have its own session_id.\n             */\n            session_id: string;\n            /**\n             * Session name.\n             */\n            session_name: string;\n            /**\n             * The Video SDK custom session ID.\n             */\n            session_key: string;\n            /**\n             * The time at which the session started.\n             */\n            start_time: string;\n            /**\n             * The user's timezone.\n             */\n            timezone: string;\n            recording_file: {\n                /**\n                 * The recording start time.\n                 */\n                recording_start?: string;\n                /**\n                 * The recording end time. Response in general query.\n                 */\n                recording_end?: string;\n            };\n        };\n    };\n};\n\nexport type SessionRecordingResumedWebhookRequest = {\n    body: SessionRecordingResumedWebhookPayload;\n    key: 'session.recording_resumed';\n    path?: never;\n    query?: never;\n};\n\n/**\n * # session.live_streaming_stopped\n * ---\n *\n *\n * The Session Live Streaming Stopped event is triggered every time a user stops a live stream.\n *\n * ## Prerequisites\n * Event Subscriptions must be enabled for your app with the following configurations:\n *\n * * A valid Event Notification Endpoint URL.\n * * **Session Live Streaming Stopped** subscription enabled under the **Video SDK** event.\n *\n * The tabs below display the complete schema, payload with data types, and an example of the `session.live_streaming_stopped` event notification:\n *\n *\n *\n * **Event type**: `session.live_streaming_stopped`\n *\n */\nexport type SessionLiveStreamingStoppedWebhookPayload = {\n    /**\n     * The name of the event.\n     */\n    event: 'session.live_streaming_stopped';\n    /**\n     * Timestamp (in milliseconds since epoch) at which the event occurred. The value of this field is returned in long(int64) format.\n     */\n    event_ts: number;\n    payload: {\n        /**\n         * The Video SDK account ID.\n         */\n        account_id: string;\n        /**\n         * Information about the session.\n         */\n        object: {\n            /**\n             * The session ID.\n             *\n             * @deprecated\n             */\n            id: string;\n            /**\n             * Unique session identifier. Each instance of the session will have its own session_id.\n             */\n            session_id: string;\n            /**\n             * Session name.\n             */\n            session_name: string;\n            /**\n             * The Video SDK custom session ID.\n             */\n            session_key?: string;\n            /**\n             * The session's start time.\n             */\n            start_time: string;\n            /**\n             * Information about the participant.\n             */\n            live_streaming: {\n                /**\n                 * The name of the Live Streaming service.\n                 */\n                service: 'Facebook' | 'Workplace_by_Facebook' | 'YouTube' | 'Custom_Live_Streaming_Service';\n                /**\n                 * The live stream settings.\n                 */\n                custom_live_streaming_settings: {\n                    /**\n                     * The stream's URL.\n                     */\n                    stream_url: string;\n                    /**\n                     * The stream's Key.\n                     */\n                    stream_key: string;\n                    /**\n                     * The live stream's page URL.\n                     */\n                    page_url: string;\n                    /**\n                     * The number of pixels in each dimension that the video camera can display.\n                     */\n                    resolution?: string;\n                };\n                /**\n                 * The live stream's stop time.\n                 */\n                date_time: string;\n            };\n        };\n    };\n};\n\nexport type SessionLiveStreamingStoppedWebhookRequest = {\n    body: SessionLiveStreamingStoppedWebhookPayload;\n    key: 'session.live_streaming_stopped';\n    path?: never;\n    query?: never;\n};\n\n/**\n * # session.stream_ingestion_stopped\n * Zoom triggers the **Session stream ingestion stopped** event every time a user stops sending live incoming streams.\n *\n * ## Prerequisites\n *\n * * **Event Subscriptions** must be enabled for your app with the following configurations:\n * * A valid **Event Notification Endpoint URL**.\n * * The **Session stream ingestion stopped** subscription enabled under the **Video SDK** event.\n *\n *\n * **Event type**: `session.stream_ingestion_stopped`\n *\n */\nexport type SessionStreamIngestionStoppedWebhookPayload = {\n    /**\n     * Event name.\n     */\n    event: 'session.stream_ingestion_stopped';\n    /**\n     * Timestamp (in milliseconds since epoch) when the event occurred. The value of this field is returned in long (int64) format.\n     */\n    event_ts: number;\n    payload: {\n        /**\n         * The Video SDK account ID.\n         */\n        account_id: string;\n        /**\n         * Information about the session.\n         */\n        object: {\n            /**\n             * Unique session identifier. Each instance of the session will have its own session_id.\n             */\n            session_id: string;\n            /**\n             * Session name.\n             */\n            session_name: string;\n            /**\n             * The Video SDK custom session ID.\n             */\n            session_key?: string;\n            /**\n             * Information about the stream ingestion.\n             */\n            stream_ingestion: {\n                /**\n                 * The stream ingestion ID.\n                 */\n                stream_id: string;\n                /**\n                 * The stream ingestion name.\n                 */\n                stream_name: string;\n                /**\n                 * The stream ingestion description.\n                 */\n                stream_description?: string;\n                /**\n                 * The stream ingestion key.\n                 */\n                stream_key: string;\n                /**\n                 * The stream URL.\n                 */\n                stream_url: string;\n                /**\n                 * The backup stream URL.\n                 */\n                backup_stream_url: string;\n            };\n        };\n    };\n};\n\nexport type SessionStreamIngestionStoppedWebhookRequest = {\n    body: SessionStreamIngestionStoppedWebhookPayload;\n    key: 'session.stream_ingestion_stopped';\n    path?: never;\n    query?: never;\n};\n\n/**\n * # session.user_room_system_callout_rejected\n *\n * The **Invited party rejected a session invitation through phone (call out) via Zoom room** event is triggered every time a user rejects an invitation to [join a session through phone (call out) from a Zoom room](https://support.zoom.us/hc/en-us/articles/205369035).\n *\n * ## Prerequisites\n *\n * * **Event Subscriptions** must be enabled for your app with the following configurations:\n * * A valid **Event Notification Endpoint URL**.\n * * The **Invited party rejected a session invitation through phone (call out) via Zoom room** subscription enabled under the **Session** event.\n *\n *\n *\n * **Event type**: `session.user_room_system_callout_rejected`\n *\n */\nexport type SessionUserRoomSystemCalloutRejectedWebhookPayload = {\n    /**\n     * The name of the event.\n     */\n    event: string;\n    /**\n     * A timestamp at which the event occurred.\n     */\n    event_ts: number;\n    payload: {\n        /**\n         * The account ID of the session host.\n         */\n        account_id: string;\n        /**\n         * Information about the session.\n         */\n        object: {\n            /**\n             * The session ID.\n             *\n             * @deprecated\n             */\n            id?: number;\n            /**\n             * The session's universally unique identifier (UUID). Each session instance generates a session UUID.\n             *\n             * @deprecated\n             */\n            uuid?: string;\n            /**\n             * Unique session identifier. Each instance of the session will have its own session_id.\n             */\n            session_id: string;\n            /**\n             * Session name.\n             */\n            session_name: string;\n            /**\n             * The user ID of the session host.\n             */\n            host_id: string;\n            /**\n             * The request unique identifier (UUID).\n             */\n            message_id: string;\n            /**\n             * The user name of the event's trigger.\n             */\n            inviter_name: string;\n            /**\n             * Information about the invited participant.\n             */\n            participant: {\n                /**\n                 * The type of call out. Use a value of h323 or sip.\n                 */\n                call_type: string;\n                /**\n                 * The user's device IP address.\n                 */\n                device_ip: string;\n                [key: string]: unknown;\n            };\n        };\n    };\n};\n\nexport type SessionUserRoomSystemCalloutRejectedWebhookRequest = {\n    body: SessionUserRoomSystemCalloutRejectedWebhookPayload;\n    key: 'session.user_room_system_callout_rejected';\n    path?: never;\n    query?: never;\n};\n\n/**\n * # session.alert\n * ---\n *\n *\n * The Session Alert event is triggered every time a service issue is encountered during a session in your account.\n *\n * The following quality metrics can trigger an alert:\n *\n * * Unstable audio quality\n * * Unstable video quality\n * * Unstable screen share quality\n * * High CPU occupation\n * * Call Reconnection\n *\n * ## Prerequisites\n * Event Subscriptions must be enabled for your [Marketplace app](https://marketplace.zoom.us/user/build) with the following configurations:\n *\n * * A valid Event Notification Endpoint URL.\n * * Session Alert subscription enabled under the Video SDK event.\n *\n * The tabs below display the complete schema, payload with data types, and an example of the `session.alert` event notification:\n *\n *\n * **Event type**: `session.alert`\n *\n */\nexport type SessionAlertWebhookPayload = {\n    /**\n     * The event's name.\n     */\n    event: 'session.alert';\n    /**\n     * A timestamp, in milliseconds since epoch, at which the event occurred.\n     */\n    event_ts: number;\n    payload: {\n        /**\n         * The Video SDK account ID.\n         */\n        account_id: string;\n        /**\n         * Information about the session. This object only returns updated properties.\n         */\n        object: {\n            /**\n             * The session ID.\n             */\n            id: string;\n            /**\n             * Unique session identifier. Each instance of the session will have its own session_id.\n             */\n            session_id: string;\n            /**\n             * Session name.\n             */\n            session_name: string;\n            /**\n             * The Video SDK custom session ID.\n             */\n            session_key?: string;\n            /**\n             * Issues that occurred during the session.\n             */\n            issues: Array<'Unstable audio quality' | 'Unstable video quality' | 'Unstable screen share quality' | 'High CPU occupation' | 'Call Reconnection'>;\n        };\n    };\n};\n\nexport type SessionAlertWebhookRequest = {\n    body: SessionAlertWebhookPayload;\n    key: 'session.alert';\n    path?: never;\n    query?: never;\n};\n\n/**\n * # session.sharing_ended\n * ---\n *\n *\n * The Session Sharing Ended event is triggered every time a user stops sharing the screen during a session.\n *\n * ## Prerequisites\n * Event Subscriptions must be enabled for your [Marketplace app](https://marketplace.zoom.us/user/build) with the following configurations:\n *\n * * A valid Event Notification Endpoint URL.\n * * **Session Sharing Ended** subscription enabled under the **Video SDK** event.\n *\n * The tabs below display the complete schema, payload with data types, and an example of the `session.sharing_ended` event notification:\n *\n *\n *\n * **Event type**: `session.sharing_ended`\n *\n */\nexport type SessionSharingEndedWebhookPayload = {\n    /**\n     * The event's name.\n     */\n    event: 'session.sharing_ended';\n    /**\n     * A timestamp, in milliseconds since epoch, at which the event occurred.\n     */\n    event_ts: number;\n    payload: {\n        /**\n         * The Video SDK account ID.\n         */\n        account_id: string;\n        /**\n         * Information about the session. This object only returns updated properties.\n         */\n        object: {\n            /**\n             * The session ID.\n             *\n             * @deprecated\n             */\n            id: string;\n            /**\n             * Unique session identifier. Each instance of the session will have its own session_id.\n             */\n            session_id: string;\n            /**\n             * Session name.\n             */\n            session_name: string;\n            /**\n             * The Video SDK custom session ID.\n             */\n            session_key?: string;\n            /**\n             * Information about the user.\n             */\n            user: {\n                /**\n                 * The user's unique ID. This value is assigned to the user upon joining a session and is only valid for that session.\n                 */\n                id: string;\n                /**\n                 * The user's username.\n                 */\n                name: string;\n                /**\n                 * Another identifier for the user. Can be a number or characters.\n                 */\n                user_key?: string;\n                /**\n                 * Information about the session's screen sharing.\n                 */\n                sharing_details: {\n                    /**\n                     * The type of shared content:\n                     * * application — An application. For example, a web browser.\n                     * * whiteboard — The Zoom [whiteboard](https://support.zoom.us/hc/en-us/articles/205677665-Sharing-a-whiteboard).\n                     * * desktop — A user's desktop.\n                     * * unknown — An unrecognized application, such as a third party app.\n                     */\n                    content: 'application' | 'whiteboard' | 'desktop' | 'unknown';\n                    /**\n                     * The session's screen sharing date and time.\n                     */\n                    date_time: string;\n                };\n            };\n        };\n    };\n};\n\nexport type SessionSharingEndedWebhookRequest = {\n    body: SessionSharingEndedWebhookPayload;\n    key: 'session.sharing_ended';\n    path?: never;\n    query?: never;\n};\n\n/**\n * # session.recording_paused\n * ---\n *\n * Event: `session.recording_paused`\n *\n * ## Event description\n *\n * The **Session recording paused** event is triggered every time a recording is paused by one of your app or account users.\n *\n * Only a session host or co-host can start, pause, resume, or stop a cloud recording. A recording is considered complete **after** the host or co-host ends the session. See [Enable cloud recording](https://developers.zoom.us/docs/video-sdk/account/#enable-cloud-recording) for details.\n *\n * ## Prerequisites\n *\n * * Cloud Recording must be enabled on the Video SDK account.\n * * Event Subscriptions must be enabled for your app with the following configurations:\n * * A valid Event Notification Endpoint URL.\n * * \"**Session recording paused**\" subscription enabled under the **Recording** event.\n *\n * The tabs below display the complete schema, payload with data types, and an example of the `session.recording_paused` event notification:\n *\n *\n *\n * **Event type**: `session.recording_paused`\n *\n */\nexport type SessionRecordingPausedWebhookPayload = {\n    /**\n     * The event's name.\n     */\n    event: 'session.recording_paused';\n    /**\n     * A timestamp, in milliseconds since epoch, at which the event occurred.\n     */\n    event_ts: number;\n    payload: {\n        /**\n         * The Video SDK account ID.\n         */\n        account_id: string;\n        /**\n         * Information about the session. This object only returns updated properties.\n         */\n        object: {\n            /**\n             * Unique session identifier. Each instance of the session will have its own session_id.\n             */\n            session_id: string;\n            /**\n             * Session name.\n             */\n            session_name: string;\n            /**\n             * The Video SDK custom session ID.\n             */\n            session_key: string;\n            /**\n             * The time at which the session started.\n             */\n            start_time: string;\n            /**\n             * The user's timezone.\n             */\n            timezone: string;\n            recording_file: {\n                /**\n                 * The recording start time.\n                 */\n                recording_start?: string;\n                /**\n                 * The recording end time. Response in general query.\n                 */\n                recording_end?: string;\n            };\n        };\n    };\n};\n\nexport type SessionRecordingPausedWebhookRequest = {\n    body: SessionRecordingPausedWebhookPayload;\n    key: 'session.recording_paused';\n    path?: never;\n    query?: never;\n};\n\n/**\n * # session.ended\n * ---\n *\n *\n * The Session Ended event is triggered when the host ends the session, or when all users have left the session.\n *\n * ## Prerequisites\n * Event Subscriptions must be enabled for your app with the following configurations:\n *\n * * A valid Event Notification Endpoint URL.\n * * **Session Ended** subscription enabled under the **Video SDK** event.\n *\n * The tabs below display the complete schema, payload with data types, and an example of the `session.ended` event notification:\n *\n *\n *\n * **Event type**: `session.ended`\n *\n */\nexport type SessionEndedWebhookPayload = {\n    /**\n     * The name of the event.\n     */\n    event: 'session.ended';\n    /**\n     * Timestamp at which the event occurred, in milliseconds since epoch. The value of this field is returned in long(int64) format.\n     */\n    event_ts: number;\n    payload: {\n        /**\n         * The Video SDK account ID.\n         */\n        account_id: string;\n        /**\n         * Information about the session.\n         */\n        object: {\n            /**\n             * The session ID.\n             *\n             * @deprecated\n             */\n            id: string;\n            /**\n             * Unique session identifier. Each instance of the session will have its own session_id.\n             */\n            session_id: string;\n            /**\n             * Session name.\n             */\n            session_name: string;\n            /**\n             * The Video SDK custom session ID.\n             */\n            session_key?: string;\n            /**\n             * The session's start time.\n             */\n            start_time: string;\n            /**\n             * The session's end time.\n             */\n            end_time: string;\n        };\n    };\n};\n\nexport type SessionEndedWebhookRequest = {\n    body: SessionEndedWebhookPayload;\n    key: 'session.ended';\n    path?: never;\n    query?: never;\n};\n\n/**\n * # session.started\n * ---\n *\n *\n * The Session Start event is triggered when the first user (including host and co-host) joins.\n *\n * ## Prerequisites\n * Event Subscriptions must be enabled for your app with the following configurations:\n *\n * * A valid Event Notification Endpoint URL.\n * * **Session Started** subscription enabled under the **Video SDK** event.\n *\n * The tabs below display the complete schema, payload with data types, and an example of the `session.started` event notification:\n *\n *\n *\n * **Event type**: `session.started`\n *\n */\nexport type SessionStartedWebhookPayload = {\n    /**\n     * The name of the event.\n     */\n    event: 'session.started';\n    /**\n     * Timestamp (in milliseconds since epoch) at which the event occurred. The value of this field is returned in long(int64) format.\n     */\n    event_ts: number;\n    payload: {\n        /**\n         * The Video SDK account ID.\n         */\n        account_id: string;\n        /**\n         * Information about the session.\n         */\n        object: {\n            /**\n             * The session's ID.\n             *\n             * @deprecated\n             */\n            id: string;\n            /**\n             * Unique session identifier. Each instance of the session will have its own session_id.\n             */\n            session_id: string;\n            /**\n             * Session name.\n             */\n            session_name: string;\n            /**\n             * The Video SDK custom session ID.\n             */\n            session_key?: string;\n            /**\n             * The session's start time.\n             */\n            start_time: string;\n        };\n    };\n};\n\nexport type SessionStartedWebhookRequest = {\n    body: SessionStartedWebhookPayload;\n    key: 'session.started';\n    path?: never;\n    query?: never;\n};\n\n/**\n * # session.stream_ingestion_unbind\n * Zoom triggers the **Session stream ingestion unbind** event every time a session unbinds a stream key.\n *\n * ## Prerequisites\n *\n * * **Event Subscriptions** must be enabled for your app with the following configurations:\n * * A valid **Event Notification Endpoint URL**.\n * * The **Session stream ingestion unbind** subscription enabled under the **Video SDK** event.\n *\n *\n * **Event type**: `session.stream_ingestion_unbind`\n *\n */\nexport type SessionStreamIngestionUnbindWebhookPayload = {\n    /**\n     * Event name.\n     */\n    event: 'session.stream_ingestion_unbind';\n    /**\n     * Timestamp (in milliseconds since epoch) at which the event occurred. The value of this field is returned in long (int64) format.\n     */\n    event_ts: number;\n    payload: {\n        /**\n         * The Video SDK account ID.\n         */\n        account_id: string;\n        /**\n         * Information about the session.\n         */\n        object: {\n            /**\n             * Unique session identifier. Each instance of the session will have its own session_id.\n             */\n            session_id: string;\n            /**\n             * Session name.\n             */\n            session_name: string;\n            /**\n             * The Video SDK custom session ID.\n             */\n            session_key?: string;\n            /**\n             * Information about the stream ingestion.\n             */\n            stream_ingestion: {\n                /**\n                 * The stream ingestion ID.\n                 */\n                stream_id: string;\n                /**\n                 * The stream ingestion name.\n                 */\n                stream_name: string;\n                /**\n                 * The stream ingestion description.\n                 */\n                stream_description?: string;\n                /**\n                 * The stream ingestion key.\n                 */\n                stream_key: string;\n                /**\n                 * The stream URL.\n                 */\n                stream_url: string;\n                /**\n                 * The backup stream URL.\n                 */\n                backup_stream_url: string;\n            };\n        };\n    };\n};\n\nexport type SessionStreamIngestionUnbindWebhookRequest = {\n    body: SessionStreamIngestionUnbindWebhookPayload;\n    key: 'session.stream_ingestion_unbind';\n    path?: never;\n    query?: never;\n};\n\n/**\n * # session.live_streaming_started\n * ---\n *\n *\n * The Session Live Streaming Started event is triggered every time a user starts a live stream.\n *\n * ## Prerequisites\n * Event Subscriptions must be enabled for your app with the following configurations:\n *\n * * A valid Event Notification Endpoint URL.\n * * **Session Live Streaming Started** subscription enabled under the **Video SDK** event.\n *\n * The tabs below display the complete schema, payload with data types, and an example of the `session.live_streaming_started` event notification:\n *\n *\n *\n * **Event type**: `session.live_streaming_started`\n *\n */\nexport type SessionLiveStreamingStartedWebhookPayload = {\n    /**\n     * Name of the event.\n     */\n    event: 'session.live_streaming_started';\n    /**\n     * Timestamp (in milliseconds since epoch) at which the event occurred. The value of this field is returned in long(int64) format.\n     */\n    event_ts: number;\n    payload: {\n        /**\n         * The Video SDK account ID.\n         */\n        account_id: string;\n        /**\n         * Information about the session.\n         */\n        object: {\n            /**\n             * The session ID.\n             *\n             * @deprecated\n             */\n            id: string;\n            /**\n             * Unique session identifier. Each instance of the session will have its own session_id.\n             */\n            session_id: string;\n            /**\n             * Session name.\n             */\n            session_name: string;\n            /**\n             * The Video SDK custom session ID.\n             */\n            session_key?: string;\n            /**\n             * The session's start time.\n             */\n            start_time: string;\n            /**\n             * Information about the participant.\n             */\n            live_streaming: {\n                /**\n                 * The name of the Live Streaming service.\n                 */\n                service: 'Facebook' | 'Workplace_by_Facebook' | 'YouTube' | 'Custom_Live_Streaming_Service';\n                /**\n                 * The live stream settings.\n                 */\n                custom_live_streaming_settings: {\n                    /**\n                     * The stream's URL.\n                     */\n                    stream_url: string;\n                    /**\n                     * The stream's key.\n                     */\n                    stream_key: string;\n                    /**\n                     * The live stream's page URL.\n                     */\n                    page_url: string;\n                    /**\n                     * The number of pixels in each dimension that the video camera can display.\n                     */\n                    resolution?: string;\n                };\n                /**\n                 * The live stream's start time.\n                 */\n                date_time: string;\n            };\n        };\n    };\n};\n\nexport type SessionLiveStreamingStartedWebhookRequest = {\n    body: SessionLiveStreamingStartedWebhookPayload;\n    key: 'session.live_streaming_started';\n    path?: never;\n    query?: never;\n};\n\n/**\n * # session.user_room_system_callout_missed\n *\n * The **Invited party missed a session invitation through phone (call out) via Zoom room** event is triggered every time an invitation to [join a session through phone (call out) from a Zoom room](https://support.zoom.us/hc/en-us/articles/205369035) times out.\n *\n * ## Prerequisites\n *\n * * **Event Subscriptions** must be enabled for your app with the following configurations:\n * * A valid **Event Notification Endpoint URL**.\n * * The **Invited party missed a session invitation through phone (call out) via Zoom room** subscription enabled under the **Session** event.\n *\n *\n *\n * **Event type**: `session.user_room_system_callout_missed`\n *\n */\nexport type SessionUserRoomSystemCalloutMissedWebhookPayload = {\n    /**\n     * The name of the event.\n     */\n    event: string;\n    /**\n     * A timestamp at which the event occurred.\n     */\n    event_ts: number;\n    payload: {\n        /**\n         * The account ID of the session host.\n         */\n        account_id: string;\n        /**\n         * Information about the session.\n         */\n        object: {\n            /**\n             * The session ID.\n             *\n             * @deprecated\n             */\n            id?: number;\n            /**\n             * The session's universally unique identifier (UUID). Each session instance generates a session UUID.\n             *\n             * @deprecated\n             */\n            uuid?: string;\n            /**\n             * Unique session identifier. Each instance of the session will have its own session_id.\n             */\n            session_id: string;\n            /**\n             * Session name.\n             */\n            session_name: string;\n            /**\n             * The user ID of the session host.\n             */\n            host_id: string;\n            /**\n             * The request unique identifier (UUID).\n             */\n            message_id: string;\n            /**\n             * The user name of the event's trigger.\n             */\n            inviter_name: string;\n            /**\n             * Information about the invited participant.\n             */\n            participant: {\n                /**\n                 * The type of call out. Use a value of h323 or sip.\n                 */\n                call_type: string;\n                /**\n                 * The user's device IP address.\n                 */\n                device_ip: string;\n                [key: string]: unknown;\n            };\n        };\n    };\n};\n\nexport type SessionUserRoomSystemCalloutMissedWebhookRequest = {\n    body: SessionUserRoomSystemCalloutMissedWebhookPayload;\n    key: 'session.user_room_system_callout_missed';\n    path?: never;\n    query?: never;\n};\n\n/**\n * # session.user_phone_callout_accepted\n *\n * The **Invited party answered a session invitation through phone (call out)** event is triggered every time a user accepts an invitation to join a session through phone (call out). Video SDK call out operates in a similar manner as [Zoom meeting call out](https://support.zoom.com/hc/article?id=zm_kb&sysparm_article=KB0062038).\n *\n * ## Prerequisites\n *\n * * **Event Subscriptions** must be enabled for your app with the following configurations:\n * * A valid **Event Notification Endpoint URL**.\n * * The **Invited party answered a session invitation through phone (call out)** subscription enabled under the **Session** event.\n *\n *\n *\n * **Event type**: `session.user_phone_callout_accepted`\n *\n */\nexport type SessionUserPhoneCalloutAcceptedWebhookPayload = {\n    /**\n     * The name of the event.\n     */\n    event: string;\n    /**\n     * A timestamp at which the event occurred.\n     */\n    event_ts: number;\n    payload: {\n        /**\n         * The account ID of the session host.\n         */\n        account_id: string;\n        /**\n         * Information about the session.\n         */\n        object: {\n            /**\n             * The session ID.\n             *\n             * @deprecated\n             */\n            id?: number;\n            /**\n             * The session's universally unique identifier (UUID). Each session instance generates a session UUID.\n             *\n             * @deprecated\n             */\n            uuid?: string;\n            /**\n             * Unique session identifier. Each instance of the session will have its own session_id.\n             */\n            session_id: string;\n            /**\n             * Session name.\n             */\n            session_name: string;\n            /**\n             * The Video SDK custom session ID.\n             */\n            session_key: string;\n            /**\n             * Another identifier for the inviter. Can be a number or characters.\n             */\n            user_key: string;\n            /**\n             * The user ID of the session host.\n             */\n            host_id: string;\n            /**\n             * Information about the invited participant.\n             */\n            participant: {\n                /**\n                 * The user's name to display in the session.\n                 */\n                invitee_name: string;\n                /**\n                 * The user's phone number.\n                 */\n                phone_number: number;\n                /**\n                 * The number used to call out to the invited user.\n                 */\n                from_number: number;\n            };\n        };\n    };\n};\n\nexport type SessionUserPhoneCalloutAcceptedWebhookRequest = {\n    body: SessionUserPhoneCalloutAcceptedWebhookPayload;\n    key: 'session.user_phone_callout_accepted';\n    path?: never;\n    query?: never;\n};\n\n/**\n * # session.user_left\n *\n *\n * The Session User Left event is triggered every time a user (including host and co-host) leaves a session.\n *\n * ## Prerequisites\n * Event Subscriptions must be enabled for your [Marketplace app](https://marketplace.zoom.us/user/build) with the following configurations:\n *\n * * A valid Event Notification Endpoint URL.\n * * Session User Left subscription enabled under the Video SDK event.\n *\n *\n *\n * **Event type**: `session.user_left`\n *\n */\nexport type SessionUserLeftWebhookPayload = {\n    /**\n     * The event's name.\n     */\n    event: 'session.user_left';\n    /**\n     * A timestamp, in milliseconds since epoch, at which the event occurred.\n     */\n    event_ts: number;\n    payload: {\n        /**\n         * The Video SDK account ID.\n         */\n        account_id: string;\n        /**\n         * Information about the session. This object only returns updated properties.\n         */\n        object: {\n            /**\n             * The session ID.\n             */\n            id: string;\n            /**\n             * Unique session identifier. Each instance of the session will have its own session_id.\n             */\n            session_id: string;\n            /**\n             * Session name.\n             */\n            session_name: string;\n            /**\n             * The Video SDK custom session ID.\n             */\n            session_key?: string;\n            /**\n             * Information about the user.\n             */\n            user: {\n                /**\n                 * The user's unique ID. This value is assigned to the user upon joining a session and is only valid for that session.\n                 */\n                id: string;\n                /**\n                 * The user's username.\n                 */\n                name: string;\n                /**\n                 * The time at which the user left the session.\n                 */\n                leave_time: string;\n                /**\n                 * The reason why the user left the session, where $name is the participant's username:\n                 * * $name left the session.\n                 * * $name got disconnected from the session.\n                 * * Host ended the session.\n                 * * Host closed the session.\n                 * * Host started a new session.\n                 * * Network connection error.\n                 * * Host did not join.\n                 * * Exceeded free session minutes limit.\n                 * * Removed by host.\n                 * * Unknown reason.\n                 * * Leave waiting room.\n                 * * Removed by host from waiting room.\n                 */\n                leave_reason?: string;\n                /**\n                 * Another identifier for the user. Can be a number or characters.\n                 */\n                user_key?: string;\n                /**\n                 * Phone number of participant joined via PSTN.\n                 */\n                phone_number?: string;\n                /**\n                 * The participant's UUID. This value is assigned to a participant upon joining a session and is only valid for the session's duration.\n                 */\n                participant_uuid: string;\n            };\n        };\n    };\n};\n\nexport type SessionUserLeftWebhookRequest = {\n    body: SessionUserLeftWebhookPayload;\n    key: 'session.user_left';\n    path?: never;\n    query?: never;\n};\n\n/**\n * # session.sharing_started\n *\n *\n * The Session Sharing Started event is triggered every time a user starts sharing the screen during a session.\n *\n * ## Prerequisites\n * Event Subscriptions must be enabled for your [Marketplace app](https://marketplace.zoom.us/user/build) with the following configurations:\n *\n * * A valid Event Notification Endpoint URL.\n * * **Session Sharing Started** subscription enabled under the **Video SDK** event.\n *\n * The tabs below display the complete schema, payload with data types, and an example of the `session.sharing_started` event notification:\n *\n *\n *\n * **Event type**: `session.sharing_started`\n *\n */\nexport type SessionSharingStartedWebhookPayload = {\n    /**\n     * The event's name.\n     */\n    event: 'session.sharing_started';\n    /**\n     * A timestamp, in milliseconds since epoch, at which the event occurred.\n     */\n    event_ts: number;\n    payload: {\n        /**\n         * The Video SDK account ID.\n         */\n        account_id: string;\n        /**\n         * Information about the session. This object only returns updated properties.\n         */\n        object: {\n            /**\n             * The session ID.\n             */\n            id: string;\n            /**\n             * Unique session identifier. Each instance of the session will have its own session_id.\n             */\n            session_id: string;\n            /**\n             * Session name.\n             */\n            session_name: string;\n            /**\n             * The Video SDK custom session ID.\n             */\n            session_key?: string;\n            /**\n             * Information about the user.\n             */\n            user: {\n                /**\n                 * The user's unique ID. This value is assigned to the user upon joining a session and is only valid for that session.\n                 */\n                id: string;\n                /**\n                 * The user's username.\n                 */\n                name: string;\n                /**\n                 * Another identifier for the user. Can be a number or characters.\n                 */\n                user_key?: string;\n                /**\n                 * Information about the session's screen sharing.\n                 */\n                sharing_details: {\n                    /**\n                     * The type of shared content:\n                     * * application — An application. For example, a web browser.\n                     * * whiteboard — The Zoom [whiteboard](https://support.zoom.us/hc/en-us/articles/205677665-Sharing-a-whiteboard).\n                     * * desktop — A user's desktop.\n                     * * unknown — An unrecognized application, such as a third party app.\n                     */\n                    content: 'application' | 'whiteboard' | 'desktop' | 'unknown';\n                    /**\n                     * The session's screen sharing date and time.\n                     */\n                    date_time: string;\n                };\n            };\n        };\n    };\n};\n\nexport type SessionSharingStartedWebhookRequest = {\n    body: SessionSharingStartedWebhookPayload;\n    key: 'session.sharing_started';\n    path?: never;\n    query?: never;\n};\n\n/**\n * # session.user_phone_callout_canceled\n * The **Invited party's phone (call out) canceled** event is triggered every time the inviter cancels the call out when they were invited to join a session through phone (call out). Video SDK call out operates in a similar manner as [Zoom meeting call out](https://support.zoom.com/hc/article?id=zm_kb&sysparm_article=KB0062038).\n *\n * ## Prerequisites\n *\n * * **Event Subscriptions** must be enabled for your app with the following configurations:\n * * A valid **Event Notification Endpoint URL**.\n * * The **Invited party's phone (call out) canceled** subscription enabled under the **Session** event.\n *\n *\n * **Event type**: `session.user_phone_callout_canceled`\n *\n */\nexport type SessionUserPhoneCalloutCanceledWebhookPayload = {\n    /**\n     * The name of the event.\n     */\n    event: string;\n    /**\n     * A timestamp at which the event occurred.\n     */\n    event_ts: number;\n    payload: {\n        /**\n         * The account ID of the session host.\n         */\n        account_id: string;\n        /**\n         * Information about the session.\n         */\n        object: {\n            /**\n             * Unique session identifier. Each instance of the session will have its own session_id.\n             */\n            session_id: string;\n            /**\n             * Session name.\n             */\n            session_name: string;\n            /**\n             * The Video SDK custom session ID.\n             */\n            session_key: string;\n            /**\n             * Another identifier for the inviter. Can be a number or characters.\n             */\n            user_key: string;\n            /**\n             * Information about the invited participant.\n             */\n            participant: {\n                /**\n                 * The user's name to display in the session.\n                 */\n                invitee_name: string;\n                /**\n                 * The user's phone number.\n                 */\n                phone_number: number;\n                /**\n                 * The number used to call out to the invited user.\n                 */\n                from_number: number;\n            };\n        };\n    };\n};\n\nexport type SessionUserPhoneCalloutCanceledWebhookRequest = {\n    body: SessionUserPhoneCalloutCanceledWebhookPayload;\n    key: 'session.user_phone_callout_canceled';\n    path?: never;\n    query?: never;\n};\n\n/**\n * # session.recording_transcript_completed\n * ---\n *\n * Event: `session.recording_transcript_completed`\n *\n * ## Event description\n *\n * The **Session recording transcript completed** event is triggered every time the transcript of the recording of a session becomes available to view or download.\n *\n * Only a session host or co-host can start, pause, resume, or stop a cloud recording. A recording is considered complete **after** the host or co-host ends the session. See [Enable cloud recording](https://developers.zoom.us/docs/video-sdk/account/#enable-cloud-recording) for details.\n *\n * ## Prerequisites\n *\n * * Cloud Recording must be enabled on the Video SDK account.\n * * Event Subscriptions must be enabled for your app with the following configurations:\n * * A valid Event Notification Endpoint URL.\n * * Session recording transcript completed subscription enabled under the Recording event.\n *\n * The tabs below display the complete schema, payload with data types, and an example of the `session.recording_transcript_completed` event notification:\n *\n *\n *\n * **Event type**: `session.recording_transcript_completed`\n *\n */\nexport type SessionRecordingTranscriptCompletedWebhookPayload = {\n    /**\n     * The event's name.\n     */\n    event: 'session.recording_transcript_completed';\n    /**\n     * A timestamp, in milliseconds since epoch, at which the event occurred.\n     */\n    event_ts: number;\n    /**\n     * A generated token used to download the recording. The download token only lasts for 24 hours after its creation and you can only download the file within 24 hours of receiving the event notification. You can either pass the download_token as a Bearer token in the Authorization header of your HTTP request (recommended) or include it as a query parameter. See the following for examples.\n     *\n     * **Using an Authorization header (Recommended)**\n     *\n     *\n     * curl --request GET \\\n     * --url {download_url} \\\n     * --header 'authorization: Bearer {download_token} \\\n     * --header 'content-type: application/json'\n     *\n     *\n     * **Using a query parameter**\n     *\n     *\n     * {download_url}/?access_token={download_token}\n     *\n     *\n     * For example: https://zoom.us/recording/download/123456?access_token=abcdefgh\n     */\n    download_token: string;\n    payload: {\n        /**\n         * The Video SDK account ID.\n         */\n        account_id: string;\n        /**\n         * Information about the session. This object only returns updated properties.\n         */\n        object: {\n            /**\n             * Unique session identifier. Each instance of the session will have its own session_id.\n             */\n            session_id: string;\n            /**\n             * Session name.\n             */\n            session_name: string;\n            /**\n             * The Video SDK custom session ID.\n             */\n            session_key: string;\n            /**\n             * The time at which the session started.\n             */\n            start_time: string;\n            /**\n             * The user's timezone.\n             */\n            timezone: string;\n            /**\n             * Recording file List\n             *\n             * List of recording file.\n             */\n            recording_files: Array<{\n                /**\n                 * The recording file ID. Included in the response of general query.\n                 */\n                id?: string;\n                /**\n                 * The recording start time.\n                 */\n                recording_start?: string;\n                /**\n                 * The recording end time. Response in general query.\n                 */\n                recording_end?: string;\n                /**\n                 * Name of the file.\n                 */\n                file_name?: string;\n                /**\n                 * The file path to the On-Premise account recording.\n                 *\n                 * **Note:** This API only returns this field for [Zoom On-Premise accounts](https://support.zoom.us/hc/en-us/articles/360034064852-Zoom-On-Premise-Deployment). It does **not** return the download_url field.\n                 */\n                file_path?: string;\n                /**\n                 * The recording file type. The value of this field could be one of the following:<br>\n                 * MP4: Video file of the recording.<br>M4A Audio-only file of the recording.<br>TIMELINE: Timestamp file of the recording in JSON file format. To get a timeline file, the \"Add a timestamp to the recording\" setting must be enabled in the [recording settings](https://support.zoom.us/hc/en-us/articles/360060316092). The time will display in the host's timezone, set on their Zoom profile.\n                 * <br> TRANSCRIPT: Transcription file of the recording in VTT format.<br> CHAT: A TXT file containing in-session chat messages that were sent during the session.<br>CC: File containing closed captions of the recording in VTT file format.<br>CSV: File containing polling data in csv format.\n                 *\n                 * <br>\n                 *\n                 * A recording file object with file type of either CC or TIMELINE **does not have** the following properties:<br>\n                 * id, status, file_size, recording_type.\n                 */\n                file_type?: 'MP4' | 'M4A' | 'CHAT' | 'TRANSCRIPT' | 'CSV' | 'CC' | 'TB' | 'CHAT_MESSAGE' | 'TIMELINE';\n                /**\n                 * The recording file size.\n                 */\n                file_size?: number;\n                /**\n                 * The archived file's file extension.\n                 */\n                file_extension?: 'MP4' | 'M4A' | 'TXT' | 'VTT' | 'CSV' | 'JSON' | 'JPG';\n                /**\n                 * The URL at which to download the the recording.\n                 *\n                 * To access a private or password-protected cloud recording of a user in your account, use your [Video SDK API JWT](https://marketplace.zoom.us/docs/guides/build/video-sdk-app/#video-sdk-and-api-credentials). You can either pass the generated JWT as a Bearer token in the Authorization header of your HTTP request (recommended) or include it as a query parameter at the end of the URL. See the following for examples.\n                 *\n                 * **Using an Authorization header (Recommended)**\n                 *\n                 *\n                 * curl --request GET \\\n                 * --url {download_url} \\\n                 * --header 'authorization: Bearer {JWT} \\\n                 * --header 'content-type: application/json'\n                 *\n                 *\n                 * **Using a query parameter**\n                 *\n                 *\n                 * {download_url}/?access_token={download_token}\n                 *\n                 *\n                 * For example: https://{base-domain}/recording/download/{path-to-file-download}?access_token={JWT}.\n                 */\n                download_url?: string;\n                /**\n                 * The recording status.\n                 */\n                status?: 'completed';\n                /**\n                 * The recording type. The value of this field can be one of the following:<br>shared_screen_with_speaker_view(CC)<br>shared_screen_with_speaker_view<br>shared_screen_with_gallery_view<br>speaker_view<br>gallery_view<br>shared_screen<br>audio_only<br>audio_transcript<br>chat_file<br>active_speaker<br>poll<br>timeline<br>closed_caption\n                 */\n                recording_type?: 'shared_screen_with_speaker_view(CC)' | 'shared_screen_with_speaker_view' | 'shared_screen_with_gallery_view' | 'gallery_view' | 'shared_screen' | 'audio_only' | 'audio_transcript' | 'chat_file' | 'active_speaker' | 'host_video' | 'audio_only_each_participant' | 'cc_transcript' | 'closed_caption' | 'poll' | 'timeline' | 'thumbnail' | 'chat_message';\n            }>;\n        };\n    };\n};\n\nexport type SessionRecordingTranscriptCompletedWebhookRequest = {\n    body: SessionRecordingTranscriptCompletedWebhookPayload;\n    key: 'session.recording_transcript_completed';\n    path?: never;\n    query?: never;\n};\n\n/**\n * # session.recording_deleted\n * ---\n *\n * Event: `session.recording_deleted`\n *\n * ## Event description\n *\n * The **Session recording permanently deleted** event is triggered every time one of your app users or account users permanently deletes a cloud recording.\n *\n * When a user initially deletes a recording, it is sent to the trash. At this stage, the recording can still be recovered for up to 30 days after deletion. To permanently delete a recording, users must delete it from the trash. Users can permanently delete a recording using:\n *\n * * The [Delete session's recording API](https://developers.zoom.us/docs/api/rest/reference/video-sdk/methods/#operation/recordingDelete) **with the delete query parameter** or\n * * The Zoom web portal. See [Video SDK account](https://developers.zoom.us/docs/video-sdk/account/) for details.\n *\n * ## Prerequisites\n *\n * * Cloud Recording must be enabled on the Video SDK account.\n * * Event Subscriptions must be enabled for your app with the following configurations:\n * * A valid Event Notification Endpoint URL.\n * * \"**Session recording permanently deleted**\" subscription enabled under the **Recording** event.\n *\n * The tabs below display the complete schema, payload with data types, and an example of the `session.recording_deleted` event notification:\n *\n *\n *\n * **Event type**: `session.recording_deleted`\n *\n */\nexport type SessionRecordingDeletedWebhookPayload = {\n    /**\n     * The event's name.\n     */\n    event: 'session.recording_deleted';\n    /**\n     * A timestamp, in milliseconds since epoch, at which the event occurred.\n     */\n    event_ts: number;\n    payload: {\n        /**\n         * The Video SDK account ID.\n         */\n        account_id: string;\n        /**\n         * The email address of the user who deleted the recording.\n         */\n        operator: string;\n        /**\n         * The user ID of the user who deleted the recording.\n         */\n        operator_id: string;\n        /**\n         * Information about the session. This object only returns updated properties.\n         */\n        object: {\n            /**\n             * Unique session identifier. Each instance of the session will have its own session_id.\n             */\n            session_id: string;\n            /**\n             * Session name.\n             */\n            session_name: string;\n            /**\n             * The Video SDK custom session ID.\n             */\n            session_key: string;\n            /**\n             * The time at which the session started.\n             */\n            start_time: string;\n            /**\n             * The user's timezone.\n             */\n            timezone: string;\n        };\n    };\n};\n\nexport type SessionRecordingDeletedWebhookRequest = {\n    body: SessionRecordingDeletedWebhookPayload;\n    key: 'session.recording_deleted';\n    path?: never;\n    query?: never;\n};\n\n/**\n * # session.user_room_system_callout_failed\n *\n * The **Session invitation through phone (call out) via Zoom room failed** event is triggered every time an invitation to [join a session through phone (call out) from a Zoom room](https://support.zoom.us/hc/en-us/articles/205369035) fails.\n *\n * ## Prerequisites\n *\n * * **Event Subscriptions** must be enabled for your app with the following configurations:\n * * A valid **Event Notification Endpoint URL**.\n * * The **Session invitation through phone (call out) via Zoom room failed** subscription enabled under the **Session** event.\n *\n *\n *\n * **Event type**: `session.user_room_system_callout_failed`\n *\n */\nexport type SessionUserRoomSystemCalloutFailedWebhookPayload = {\n    /**\n     * The name of the event.\n     */\n    event: string;\n    /**\n     * A timestamp at which the event occurred.\n     */\n    event_ts: number;\n    payload: {\n        /**\n         * The account ID of the session host.\n         */\n        account_id: string;\n        /**\n         * Information about the session.\n         */\n        object: {\n            /**\n             * The session ID.\n             *\n             * @deprecated\n             */\n            id?: number;\n            /**\n             * The session's universally unique identifier (UUID). Each session instance generates a session UUID.\n             *\n             * @deprecated\n             */\n            uuid?: string;\n            /**\n             * Unique session identifier. Each instance of the session will have its own session_id.\n             */\n            session_id: string;\n            /**\n             * Session name.\n             */\n            session_name: string;\n            /**\n             * The user ID of the session host.\n             */\n            host_id: string;\n            /**\n             * The request unique identifier (UUID).\n             */\n            message_id: string;\n            /**\n             * The user name of the event's trigger.\n             */\n            inviter_name: string;\n            /**\n             * reason type for failure:\n             * * 1 — Encryption_Fail.\n             * * 2 — Disconnected_By_Remote.\n             * * 3 — Retry.\n             * * 4 — Bad_Seq.\n             * * 5 — Call_Limit.\n             * * 6 — Not_Registered.\n             * * 7 — Timeout.\n             * * 8 — Bad_Addr.\n             * * 9 — Unreachable\n             * * 10 — Disconnect_By_Local\n             * * 11 — Server_Internal_Error\n             * * 12 — Exceed_Free_Port\n             * * 13 — Connect_Error\n             * * 14 — Proxy_Connect_Error\n             * * 0 — Other_Failed_Reason.\n             */\n            reason_type: 0 | 1 | 2 | 3 | 4 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14;\n            /**\n             * Information about the invited participant.\n             */\n            participant: {\n                /**\n                 * The type of call out. Use a value of h323 or sip.\n                 */\n                call_type: string;\n                /**\n                 * The user's device IP address.\n                 */\n                device_ip: string;\n                [key: string]: unknown;\n            };\n        };\n    };\n};\n\nexport type SessionUserRoomSystemCalloutFailedWebhookRequest = {\n    body: SessionUserRoomSystemCalloutFailedWebhookPayload;\n    key: 'session.user_room_system_callout_failed';\n    path?: never;\n    query?: never;\n};\n\n/**\n * # session.recording_completed\n * ---\n *\n * Event: `session.recording_completed`\n *\n * ## Event description\n *\n * The **Session recording completed** event is triggered every time a recording of a session becomes available to view and/or download.\n *\n * Only a session host or co-host can start, pause, resume, or stop a cloud recording. A recording is considered complete **after** the host or co-host ends the session. See [Enable cloud recording](https://developers.zoom.us/docs/video-sdk/account/#enable-cloud-recording) for details.\n *\n * ## Prerequisites\n *\n * * Cloud Recording must be enabled on the Video SDK account.\n * * Event Subscriptions must be enabled for your app with the following configurations:\n * * A valid Event Notification Endpoint URL.\n * * Session recording completed subscription enabled under the Recording event.\n *\n * The tabs below display the complete schema, payload with data types, and an example of the `session.recording_completed` event notification:\n *\n *\n *\n * **Event type**: `session.recording_completed`\n *\n */\nexport type SessionRecordingCompletedWebhookPayload = {\n    /**\n     * The event's name.\n     */\n    event: 'session.recording_completed';\n    /**\n     * A timestamp, in milliseconds since epoch, at which the event occurred.\n     */\n    event_ts: number;\n    /**\n     * A generated token used to download the recording. The download token only lasts for 24 hours after its creation and you can only download the file within 24 hours of receiving the event notification. Pass the download_token as a Bearer token in the Authorization header of your HTTP request. For example:\n     *\n     *\n     * curl --request GET \\\n     * --url {download_url} \\\n     * --header 'authorization: Bearer {download_token} \\\n     * --header 'content-type: application/json'\n     *\n     */\n    download_token: string;\n    payload: {\n        /**\n         * The Video SDK account ID.\n         */\n        account_id: string;\n        /**\n         * Information about the session. This object only returns updated properties.\n         */\n        object: {\n            /**\n             * Unique session identifier. Each instance of the session will have its own session_id.\n             */\n            session_id: string;\n            /**\n             * Session name.\n             */\n            session_name: string;\n            /**\n             * The Video SDK custom session ID.\n             */\n            session_key: string;\n            /**\n             * The time at which the session started.\n             */\n            start_time: string;\n            /**\n             * The user's timezone.\n             */\n            timezone: string;\n            /**\n             * Recording file List\n             *\n             * List of recording file.\n             */\n            recording_files: Array<{\n                /**\n                 * The recording file ID. Included in the response of general query.\n                 */\n                id?: string;\n                /**\n                 * The recording start time.\n                 */\n                recording_start?: string;\n                /**\n                 * The recording end time. Response in general query.\n                 */\n                recording_end?: string;\n                /**\n                 * Name of the file.\n                 */\n                file_name?: string;\n                /**\n                 * The file path to the On-Premise account recording.\n                 *\n                 * **Note:** This API only returns this field for [Zoom On-Premise accounts](https://support.zoom.us/hc/en-us/articles/360034064852-Zoom-On-Premise-Deployment). It does **not** return the download_url field.\n                 */\n                file_path?: string;\n                /**\n                 * The recording file type. The value of this field could be one of the following:<br>\n                 * MP4: Video file of the recording.<br>M4A Audio-only file of the recording.<br>TIMELINE: Timestamp file of the recording in JSON file format. To get a timeline file, the \"Add a timestamp to the recording\" setting must be enabled in the [recording settings](https://support.zoom.us/hc/en-us/articles/360060316092). The time will display in the host's timezone, set on their Zoom profile.\n                 * <br> TRANSCRIPT: Transcription file of the recording in VTT format.<br> CHAT: A TXT file containing in-session chat messages that were sent during the session.<br>CC: File containing closed captions of the recording in VTT file format.<br>CSV: File containing polling data in csv format.\n                 *\n                 * <br>\n                 *\n                 * A recording file object with file type of either CC or TIMELINE **does not have** the following properties:<br>\n                 * id, status, file_size, recording_type.\n                 */\n                file_type?: 'MP4' | 'M4A' | 'CHAT' | 'TRANSCRIPT' | 'CSV' | 'CC' | 'TB' | 'CHAT_MESSAGE';\n                /**\n                 * The recording file size.\n                 */\n                file_size?: number;\n                /**\n                 * The archived file's file extension.\n                 */\n                file_extension?: 'MP4' | 'M4A' | 'TXT' | 'VTT' | 'CSV' | 'JSON' | 'JPG';\n                /**\n                 * The URL at which to download the the recording.\n                 *\n                 * To access a private or password-protected cloud recording of a user in your account, use your [Video SDK API JWT](https://marketplace.zoom.us/docs/guides/build/video-sdk-app/#video-sdk-and-api-credentials). Pass the generated JWT as a Bearer token in the Authorization header of your HTTP request. For example:\n                 *\n                 *\n                 * curl --request GET \\\n                 * --url {download_url} \\\n                 * --header 'authorization: Bearer {JWT} \\\n                 * --header 'content-type: application/json'\n                 *\n                 */\n                download_url?: string;\n                /**\n                 * The recording status.\n                 */\n                status?: 'completed';\n                /**\n                 * The recording type. The value of this field can be one of the following:<br>shared_screen_with_speaker_view(CC)<br>shared_screen_with_speaker_view<br>shared_screen_with_gallery_view<br>speaker_view<br>gallery_view<br>shared_screen<br>audio_only<br>audio_transcript<br>chat_file<br>active_speaker<br>poll<br>timeline<br>closed_caption\n                 */\n                recording_type?: 'shared_screen_with_speaker_view(CC)' | 'shared_screen_with_speaker_view' | 'shared_screen_with_gallery_view' | 'gallery_view' | 'shared_screen' | 'audio_only' | 'audio_transcript' | 'chat_file' | 'active_speaker' | 'host_video' | 'audio_only_each_participant' | 'cc_transcript' | 'closed_caption' | 'poll' | 'timeline' | 'thumbnail' | 'chat_message';\n            }>;\n            /**\n             * Recording file List\n             *\n             * List of recording file.\n             */\n            participant_audio_files?: Array<{\n                /**\n                 * The recording file ID. Included in the response of general query.\n                 */\n                id?: string;\n                /**\n                 * The recording start time.\n                 */\n                recording_start?: string;\n                /**\n                 * The recording end time. Response in general query.\n                 */\n                recording_end?: string;\n                /**\n                 * Name of the file.\n                 */\n                file_name?: string;\n                /**\n                 * The file path to the On-Premise account recording.\n                 *\n                 * **Note:** This API only returns this field for [Zoom On-Premise accounts](https://support.zoom.us/hc/en-us/articles/360034064852-Zoom-On-Premise-Deployment). It does **not** return the download_url field.\n                 */\n                file_path?: string;\n                /**\n                 * The recording file type. The value of this field could be one of the following:<br>\n                 * MP4: Video file of the recording.<br>M4A Audio-only file of the recording.<br>TIMELINE: Timestamp file of the recording in JSON file format. To get a timeline file, the \"Add a timestamp to the recording\" setting must be enabled in the [recording settings](https://support.zoom.us/hc/en-us/articles/360060316092). The time will display in the host's timezone, set on their Zoom profile.\n                 * <br> TRANSCRIPT: Transcription file of the recording in VTT format.<br> CHAT: A TXT file containing in-session chat messages that were sent during the session.<br>CC: File containing closed captions of the recording in VTT file format.<br>CSV: File containing polling data in csv format.\n                 *\n                 * <br>\n                 *\n                 * A recording file object with file type of either CC or TIMELINE **does not have** the following properties:<br>\n                 * id, status, file_size, recording_type.\n                 */\n                file_type?: 'MP4' | 'M4A' | 'CHAT' | 'TRANSCRIPT' | 'CSV' | 'CC' | 'TB' | 'CHAT_MESSAGE';\n                /**\n                 * The recording file size.\n                 */\n                file_size?: number;\n                /**\n                 * The archived file's file extension.\n                 */\n                file_extension?: 'MP4' | 'M4A' | 'TXT' | 'VTT' | 'CSV' | 'JSON' | 'JPG';\n                /**\n                 * The URL at which to download the the recording.\n                 *\n                 * To access a private or password-protected cloud recording of a user in your account, use your [Video SDK API JWT](https://marketplace.zoom.us/docs/guides/build/video-sdk-app/#video-sdk-and-api-credentials). Pass the generated JWT as a Bearer token in the Authorization header of your HTTP request. For example:\n                 *\n                 *\n                 * curl --request GET \\\n                 * --url {download_url} \\\n                 * --header 'authorization: Bearer {JWT} \\\n                 * --header 'content-type: application/json'\n                 *\n                 */\n                download_url?: string;\n                /**\n                 * The recording status.\n                 */\n                status?: 'completed';\n                /**\n                 * The recording type. The value of this field can be one of the following:<br>shared_screen_with_speaker_view(CC)<br>shared_screen_with_speaker_view<br>shared_screen_with_gallery_view<br>speaker_view<br>gallery_view<br>shared_screen<br>audio_only<br>audio_transcript<br>chat_file<br>active_speaker<br>poll<br>timeline<br>closed_caption\n                 */\n                recording_type?: 'shared_screen_with_speaker_view(CC)' | 'shared_screen_with_speaker_view' | 'shared_screen_with_gallery_view' | 'gallery_view' | 'shared_screen' | 'audio_only' | 'audio_transcript' | 'chat_file' | 'active_speaker' | 'host_video' | 'audio_only_each_participant' | 'cc_transcript' | 'closed_caption' | 'poll' | 'timeline' | 'thumbnail' | 'chat_message';\n                /**\n                 * The participant's session user ID. This value is assigned to a participant upon joining a session and is only valid for the duration of the session.\n                 */\n                user_id?: string;\n                /**\n                 * The participant's SDK identifier. Set with the user_identity key in the Video SDK JWT payload. This value can be alphanumeric, up to a maximum length of 35 characters.\n                 */\n                user_key?: string;\n            }>;\n            /**\n             * Recording file List\n             *\n             * List of recording file.\n             */\n            participant_video_files?: Array<{\n                /**\n                 * The recording file ID. Included in the response of general query.\n                 */\n                id?: string;\n                /**\n                 * The recording start time.\n                 */\n                recording_start?: string;\n                /**\n                 * The recording end time. Response in general query.\n                 */\n                recording_end?: string;\n                /**\n                 * Name of the file.\n                 */\n                file_name?: string;\n                /**\n                 * The file path to the On-Premise account recording.\n                 *\n                 * **Note:** This API only returns this field for [Zoom On-Premise accounts](https://support.zoom.us/hc/en-us/articles/360034064852-Zoom-On-Premise-Deployment). It does **not** return the download_url field.\n                 */\n                file_path?: string;\n                /**\n                 * The recording file type. The value of this field could be one of the following:<br>\n                 * MP4: Video file of the recording.\n                 */\n                file_type?: 'MP4';\n                /**\n                 * The recording file size.\n                 */\n                file_size?: number;\n                /**\n                 * The archived file's file extension.\n                 */\n                file_extension?: 'MP4';\n                /**\n                 * The URL at which to download the the recording.\n                 *\n                 * To access a private or password-protected cloud recording of a user in your account, use your [Video SDK API JWT](https://marketplace.zoom.us/docs/guides/build/video-sdk-app/#video-sdk-and-api-credentials). Pass the generated JWT as a Bearer token in the Authorization header of your HTTP request. For example:\n                 *\n                 *\n                 * curl --request GET \\\n                 * --url {download_url} \\\n                 * --header 'authorization: Bearer {JWT} \\\n                 * --header 'content-type: application/json'\n                 *\n                 */\n                download_url?: string;\n                /**\n                 * The recording status.\n                 */\n                status?: 'completed';\n                /**\n                 * The recording type. The value of this field can be one of the following:<br>shared_screen_with_speaker_view(CC)<br>shared_screen_with_speaker_view<br>shared_screen_with_gallery_view<br>speaker_view<br>gallery_view<br>shared_screen<br>audio_only<br>audio_transcript<br>chat_file<br>active_speaker<br>poll<br>timeline<br>closed_caption\n                 */\n                recording_type?: 'individual_user' | 'individual_shared_screen';\n                /**\n                 * The participant's session user ID. This value is assigned to a participant upon joining a session and is only valid for the duration of the session.\n                 */\n                user_id?: string;\n                /**\n                 * The participant's SDK identifier. Set with the user_identity key in the Video SDK JWT payload. This value can be alphanumeric, up to a maximum length of 35 characters.\n                 */\n                user_key?: string;\n            }>;\n        };\n    };\n};\n\nexport type SessionRecordingCompletedWebhookRequest = {\n    body: SessionRecordingCompletedWebhookPayload;\n    key: 'session.recording_completed';\n    path?: never;\n    query?: never;\n};\n\n/**\n * # session.recording_transcript_failed\n * ---\n *\n * Event: `session.recording_transcript_failed`\n *\n * ## Event description\n *\n * The **Session recording transcript failed** event is triggered every time the transcript of the recording of a session generated failed.\n *\n * Only a session host or co-host can start, pause, resume, or stop a cloud recording. A recording is considered complete **after** the host or co-host ends the session. See [Enable cloud recording](https://developers.zoom.us/docs/video-sdk/account/#enable-cloud-recording) for details.\n *\n * ## Prerequisites\n *\n * * Enable Cloud Recording on the Video SDK account.\n * * Enable Event Subscriptions for your app with the following configurations:\n * * A valid Event Notification Endpoint URL.\n * * Enable session recording transcript completed subscription under the Recording event.\n *\n * The tabs below display the complete schema, payload with data types, and an example of the `session.recording_transcript_completed` event notification:\n *\n *\n *\n * **Event type**: `session.recording_transcript_failed`\n *\n */\nexport type SessionRecordingTranscriptFailedWebhookPayload = {\n    /**\n     * The event's name.\n     */\n    event: 'session.recording_transcript_failed';\n    /**\n     * A timestamp, in milliseconds since epoch, when the event occurred.\n     */\n    event_ts: number;\n    payload: {\n        /**\n         * The Video SDK account ID.\n         */\n        account_id: string;\n        /**\n         * Information about the session. This object only returns updated properties.\n         */\n        object: {\n            /**\n             * Unique session identifier. Each instance of the session will have its own session_id.\n             */\n            session_id: string;\n            /**\n             * Session name.\n             */\n            session_name: string;\n            /**\n             * The Video SDK custom session ID.\n             */\n            session_key: string;\n            /**\n             * The time when the session started.\n             */\n            start_time: string;\n            /**\n             * The user's timezone.\n             */\n            timezone: string;\n        };\n    };\n};\n\nexport type SessionRecordingTranscriptFailedWebhookRequest = {\n    body: SessionRecordingTranscriptFailedWebhookPayload;\n    key: 'session.recording_transcript_failed';\n    path?: never;\n    query?: never;\n};\n\n/**\n * # session.recording_trashed\n * ---\n *\n * Event: `session.recording_trashed`\n *\n * ## Event description\n *\n * The **Session recording deleted to trash** event is triggered every time one of your app users or account users temporarily delete a cloud recording.\n *\n * When a user initially deletes a recording, it is deleted to the trash. Recordings deleted to the trash can be recovered up to 30 days after deletion. Users can move a recording to the trash using:\n *\n * * The [Delete session's recording](https://developers.zoom.us/docs/api/rest/reference/video-sdk/methods/#operation/recordingDelete) API **with the trash query parameter** or\n * * The Zoom web portal. See [Video SDK account](https://developers.zoom.us/docs/video-sdk/account/) for details.\n *\n * ## Prerequisites\n *\n * * Cloud Recording must be enabled on the Video SDK account.\n * * Event Subscriptions must be enabled for your app with the following configurations:\n * * A valid Event Notification Endpoint URL.\n * * **Session recording deleted to trash** subscription enabled under the **Recording** event.\n *\n * The tabs below display the complete schema, payload with data types, and an example of the `session.recording_trashed` event notification:\n *\n *\n *\n * **Event type**: `session.recording_trashed`\n *\n */\nexport type SessionRecordingTrashedWebhookPayload = {\n    /**\n     * The event's name.\n     */\n    event: 'session.recording_trashed';\n    /**\n     * A timestamp, in milliseconds since epoch, at which the event occurred.\n     */\n    event_ts: number;\n    payload: {\n        /**\n         * The Video SDK account ID.\n         */\n        account_id: string;\n        /**\n         * The email address of the user who deleted the recording.\n         */\n        operator: string;\n        /**\n         * The user ID of the user who deleted the recording.\n         */\n        operator_id: string;\n        /**\n         * Information about the session. This object only returns updated properties.\n         */\n        object: {\n            /**\n             * Unique session identifier. Each instance of the session will have its own session_id.\n             */\n            session_id: string;\n            /**\n             * Session name.\n             */\n            session_name: string;\n            /**\n             * The Video SDK custom session ID.\n             */\n            session_key: string;\n            /**\n             * The time at which the session started.\n             */\n            start_time: string;\n            /**\n             * The user's timezone.\n             */\n            timezone: string;\n        };\n    };\n};\n\nexport type SessionRecordingTrashedWebhookRequest = {\n    body: SessionRecordingTrashedWebhookPayload;\n    key: 'session.recording_trashed';\n    path?: never;\n    query?: never;\n};\n\n/**\n * # session.user_joined\n * ---\n *\n *\n * The Session User Joined event is triggered every time a user (including host and co-host) joins a session.\n *\n * ## Prerequisites\n * Event Subscriptions must be enabled for your [Marketplace app](https://marketplace.zoom.us/user/build) with the following configurations:\n *\n * * A valid Event Notification Endpoint URL.\n * * Session User Joined subscription enabled under the Video SDK event.\n *\n * The tabs below display the complete schema, payload with data types, and an example of the `session.user_joined` event notification:\n *\n *\n *\n * **Event type**: `session.user_joined`\n *\n */\nexport type SessionUserJoinedWebhookPayload = {\n    /**\n     * The event's name.\n     */\n    event: 'session.user_joined';\n    /**\n     * A timestamp, in milliseconds since epoch, at which the event occurred.\n     */\n    event_ts: number;\n    payload: {\n        /**\n         * The Video SDK account ID.\n         */\n        account_id: string;\n        /**\n         * Information about the session. This object only returns updated properties.\n         */\n        object: {\n            /**\n             * The session ID.\n             */\n            id: string;\n            /**\n             * Unique session identifier. Each instance of the session will have its own session_id.\n             */\n            session_id: string;\n            /**\n             * Session name.\n             */\n            session_name: string;\n            /**\n             * The Video SDK custom session ID.\n             */\n            session_key?: string;\n            /**\n             * Information about the user.\n             */\n            user: {\n                /**\n                 * The user's unique ID. This value is assigned to the user upon joining a session and is only valid for that session.\n                 */\n                id: string;\n                /**\n                 * The user's username.\n                 */\n                name: string;\n                /**\n                 * The time at which the user joined the session.\n                 */\n                join_time: string;\n                /**\n                 * Another identifier for the user. Can be a number or characters.\n                 */\n                user_key?: string;\n                /**\n                 * Phone number of participant joined via PSTN.\n                 */\n                phone_number?: string;\n                /**\n                 * The participant's UUID. This value is assigned to a participant upon joining a session and is only valid for the session's duration.\n                 */\n                participant_uuid: string;\n            };\n        };\n    };\n};\n\nexport type SessionUserJoinedWebhookRequest = {\n    body: SessionUserJoinedWebhookPayload;\n    key: 'session.user_joined';\n    path?: never;\n    query?: never;\n};\n\n/**\n * # session.stream_ingestion_started\n * Zoom triggers the **Session stream ingestion started** event every time a host starts sending an incoming live stream to a session. The session user can subscribe to it to see what's being streamed live into this session.\n *\n * ## Prerequisites\n *\n * * **Event Subscriptions** must be enabled for your app with the following configurations:\n * * A valid **Event Notification Endpoint URL**.\n * * The **Session stream ingestion started** subscription enabled under the **Video SDK** event.\n *\n *\n * **Event type**: `session.stream_ingestion_started`\n *\n */\nexport type SessionStreamIngestionStartedWebhookPayload = {\n    /**\n     * Event name.\n     */\n    event: 'session.stream_ingestion_started';\n    /**\n     * Timestamp (in milliseconds since epoch) when the event occurred. The value of this field is returned in long (int64) format.\n     */\n    event_ts: number;\n    payload: {\n        /**\n         * The Video SDK account ID.\n         */\n        account_id: string;\n        /**\n         * Information about the session.\n         */\n        object: {\n            /**\n             * Unique session identifier. Each instance of the session will have its own session_id.\n             */\n            session_id: string;\n            /**\n             * Session name.\n             */\n            session_name: string;\n            /**\n             * The Video SDK custom session ID.\n             */\n            session_key?: string;\n            /**\n             * Information about the stream ingestion.\n             */\n            stream_ingestion: {\n                /**\n                 * The stream ingestion ID.\n                 */\n                stream_id: string;\n                /**\n                 * The stream ingestion name.\n                 */\n                stream_name: string;\n                /**\n                 * The stream ingestion description.\n                 */\n                stream_description?: string;\n                /**\n                 * The stream ingestion key.\n                 */\n                stream_key: string;\n                /**\n                 * The stream URL.\n                 */\n                stream_url: string;\n                /**\n                 * The backup stream URL.\n                 */\n                backup_stream_url: string;\n            };\n        };\n    };\n};\n\nexport type SessionStreamIngestionStartedWebhookRequest = {\n    body: SessionStreamIngestionStartedWebhookPayload;\n    key: 'session.stream_ingestion_started';\n    path?: never;\n    query?: never;\n};\n\n/**\n * # session.stream_ingestion_connected\n * Zoom triggers the **Session stream ingestion connected** event every time live streaming software connects to the Zoom Video SDK session. This indicates that the Zoom streaming platform is receiving data from the streaming software, but the received Real-Time Messaging Protocol (RTMP) data is not sent to the session yet.\n *\n * ## Prerequisites\n *\n * * **Event Subscriptions** must be enabled for your app with the following configurations:\n * * A valid **Event Notification Endpoint URL**.\n * * The **Session stream ingestion connected** subscription enabled under the **Video SDK** event.\n *\n *\n * **Event type**: `session.stream_ingestion_connected`\n *\n */\nexport type SessionStreamIngestionConnectedWebhookPayload = {\n    /**\n     * Name of the event.\n     */\n    event: 'session.stream_ingestion_connected';\n    /**\n     * Timestamp (in milliseconds since epoch) when the event occurred. The value of this field is returned in long (int64) format.\n     */\n    event_ts: number;\n    payload: {\n        /**\n         * The Video SDK account ID.\n         */\n        account_id: string;\n        /**\n         * Information about the session.\n         */\n        object: {\n            /**\n             * Unique session identifier. Each instance of the session will have its own session_id.\n             */\n            session_id: string;\n            /**\n             * Session name.\n             */\n            session_name: string;\n            /**\n             * The Video SDK custom session ID.\n             */\n            session_key?: string;\n            /**\n             * Information about the stream ingestion.\n             */\n            stream_ingestion: {\n                /**\n                 * The stream ingestion ID.\n                 */\n                stream_id: string;\n                /**\n                 * The stream ingestion name.\n                 */\n                stream_name: string;\n                /**\n                 * The stream ingestion description.\n                 */\n                stream_description?: string;\n                /**\n                 * The stream ingestion key.\n                 */\n                stream_key: string;\n                /**\n                 * The stream URL.\n                 */\n                stream_url: string;\n                /**\n                 * The backup stream URL.\n                 */\n                backup_stream_url: string;\n            };\n        };\n    };\n};\n\nexport type SessionStreamIngestionConnectedWebhookRequest = {\n    body: SessionStreamIngestionConnectedWebhookPayload;\n    key: 'session.stream_ingestion_connected';\n    path?: never;\n    query?: never;\n};\n\n/**\n * # session.stream_ingestion_disconnected\n * Zoom triggers the **Session stream ingestion disconnected** event every time a Real-Time Messaging Protocol (RTMP) software program disconnects.\n *\n * ## Prerequisites\n *\n * * **Event Subscriptions** must be enabled for your app with the following configurations:\n * * A valid **Event Notification Endpoint URL**.\n * * The **Session stream ingestion disconnected** subscription enabled under the **Video SDK** event.\n *\n *\n * **Event type**: `session.stream_ingestion_disconnected`\n *\n */\nexport type SessionStreamIngestionDisconnectedWebhookPayload = {\n    /**\n     * Name of the event.\n     */\n    event: 'session.stream_ingestion_disconnected';\n    /**\n     * Timestamp (in milliseconds since epoch) when the event occurred. The value of this field is returned in long (int64) format.\n     */\n    event_ts: number;\n    payload: {\n        /**\n         * The Video SDK account ID.\n         */\n        account_id: string;\n        /**\n         * Information about the session.\n         */\n        object: {\n            /**\n             * Unique session identifier. Each instance of the session will have its own session_id.\n             */\n            session_id: string;\n            /**\n             * Session name.\n             */\n            session_name: string;\n            /**\n             * The Video SDK custom session ID.\n             */\n            session_key?: string;\n            /**\n             * Information about the stream ingestion.\n             */\n            stream_ingestion: {\n                /**\n                 * The stream ingestion ID.\n                 */\n                stream_id: string;\n                /**\n                 * The stream ingestion name.\n                 */\n                stream_name: string;\n                /**\n                 * The stream ingestion description.\n                 */\n                stream_description?: string;\n                /**\n                 * The stream ingestion key.\n                 */\n                stream_key: string;\n                /**\n                 * The stream URL.\n                 */\n                stream_url: string;\n                /**\n                 * The backup stream URL.\n                 */\n                backup_stream_url: string;\n            };\n        };\n    };\n};\n\nexport type SessionStreamIngestionDisconnectedWebhookRequest = {\n    body: SessionStreamIngestionDisconnectedWebhookPayload;\n    key: 'session.stream_ingestion_disconnected';\n    path?: never;\n    query?: never;\n};\n\n/**\n * # session.recording_recovered\n * ---\n *\n * Event: `session.recording_recovered`\n *\n * ## Event description\n *\n * The **Session recording recovered** event is triggered every time one of your app users or account users recover a recording from the trash.\n *\n * Zoom allows users to recover their cloud recordings from trash within 30 days of deletion. You can recover a deleted cloud recording with:\n *\n * * The tab in the Zoom web client. See [Video SDK recordings and reports](https://developers.zoom.us/docs/video-sdk/reports/) for details.\n * * The [Recover a single recording](https://developers.zoom.us/docs/api/rest/reference/video-sdk/methods/#operation/recordingStatusUpdateOne) or [Recover session's recordings](https://developers.zoom.us/docs/api/rest/reference/video-sdk/methods/#operation/recordingStatusUpdate) API.\n *\n * ## Prerequisites\n *\n * * Cloud Recording must be enabled on the Video SDK account.\n * * Event Subscriptions must be enabled for your app with the following configurations:\n * * A valid Event Notification Endpoint URL.\n * * \"**Session recording recovered**\" subscription enabled under the **Recording** event.\n *\n * The tabs below display the complete schema, payload with data types, and an example of the `session.recording_recovered` event notification:\n *\n *\n *\n * **Event type**: `session.recording_recovered`\n *\n */\nexport type SessionRecordingRecoveredWebhookPayload = {\n    /**\n     * The event's name.\n     */\n    event: 'session.recording_recovered';\n    /**\n     * A timestamp, in milliseconds since epoch, at which the event occurred.\n     */\n    event_ts: number;\n    payload: {\n        /**\n         * The Video SDK account ID.\n         */\n        account_id: string;\n        /**\n         * The email address of the user who deleted the recording.\n         */\n        operator: string;\n        /**\n         * The user ID of the user who deleted the recording.\n         */\n        operator_id: string;\n        /**\n         * Information about the session. This object only returns updated properties.\n         */\n        object: {\n            /**\n             * Unique session identifier. Each instance of the session will have its own session_id.\n             */\n            session_id: string;\n            /**\n             * Session name.\n             */\n            session_name: string;\n            /**\n             * The Video SDK custom session ID.\n             */\n            session_key: string;\n            /**\n             * The time at which the session started.\n             */\n            start_time: string;\n            /**\n             * The user's timezone.\n             */\n            timezone: string;\n        };\n    };\n};\n\nexport type SessionRecordingRecoveredWebhookRequest = {\n    body: SessionRecordingRecoveredWebhookPayload;\n    key: 'session.recording_recovered';\n    path?: never;\n    query?: never;\n};\n\n/**\n * # session.user_phone_callout_missed\n *\n * The **Invited party missed a session invitation through phone (call out)** event is triggered every time an invitation to join a session through phone (call out) times out. Video SDK call out operates in a similar manner as [Zoom meeting call out](https://support.zoom.com/hc/article?id=zm_kb&sysparm_article=KB0062038).\n *\n * ## Prerequisites\n *\n * * **Event Subscriptions** must be enabled for your app with the following configurations:\n * * A valid **Event Notification Endpoint URL**.\n * * The **Invited party missed a session invitation through phone (call out)** subscription enabled under the **Session** event.\n *\n *\n *\n *\n * **Event type**: `session.user_phone_callout_missed`\n *\n */\nexport type SessionUserPhoneCalloutMissedWebhookPayload = {\n    /**\n     * The name of the event.\n     */\n    event: string;\n    /**\n     * A timestamp at which the event occurred.\n     */\n    event_ts: number;\n    payload: {\n        /**\n         * The account ID of the session host.\n         */\n        account_id: string;\n        /**\n         * Information about the session.\n         */\n        object: {\n            /**\n             * The session ID.\n             *\n             * @deprecated\n             */\n            id?: number;\n            /**\n             * The session's universally unique identifier (UUID). Each session instance generates a session UUID.\n             *\n             * @deprecated\n             */\n            uuid?: string;\n            /**\n             * Unique session identifier. Each instance of the session will have its own session_id.\n             */\n            session_id: string;\n            /**\n             * Session name.\n             */\n            session_name: string;\n            /**\n             * The Video SDK custom session ID.\n             */\n            session_key: string;\n            /**\n             * Another identifier for the inviter. Can be a number or characters.\n             */\n            user_key: string;\n            /**\n             * The user ID of the session host.\n             */\n            host_id: string;\n            /**\n             * Information about the invited user.\n             */\n            participant: {\n                /**\n                 * The user's name to display in the session.\n                 */\n                invitee_name: string;\n                /**\n                 * The user's phone number.\n                 */\n                phone_number: number;\n                /**\n                 * The number used to call out to the invited user.\n                 */\n                from_number: number;\n            };\n        };\n    };\n};\n\nexport type SessionUserPhoneCalloutMissedWebhookRequest = {\n    body: SessionUserPhoneCalloutMissedWebhookPayload;\n    key: 'session.user_phone_callout_missed';\n    path?: never;\n    query?: never;\n};\n\n/**\n * # session.user_phone_callout_rejected\n *\n * The **Invited party rejected a session invitation through phone (call out)** event is triggered every time a user rejects an invitation to join a session through phone (call out). Video SDK call out operates in a similar manner as [Zoom meeting call out](https://support.zoom.com/hc/article?id=zm_kb&sysparm_article=KB0062038).\n *\n * ## Prerequisites\n *\n * * **Event Subscriptions** must be enabled for your app with the following configurations:\n * * A valid **Event Notification Endpoint URL**.\n * * The **Invited party rejected a session invitation through phone (call out)** subscription enabled under the **Session** event.\n *\n *\n *\n *\n * **Event type**: `session.user_phone_callout_rejected`\n *\n */\nexport type SessionUserPhoneCalloutRejectedWebhookPayload = {\n    /**\n     * The name of the event.\n     */\n    event: string;\n    /**\n     * A timestamp at which the event occurred.\n     */\n    event_ts: number;\n    payload: {\n        /**\n         * The account ID of the session host.\n         */\n        account_id: string;\n        /**\n         * Information about the session.\n         */\n        object: {\n            /**\n             * The session ID.\n             *\n             * @deprecated\n             */\n            id?: number;\n            /**\n             * The session's universally unique identifier (UUID). Each session instance generates a session UUID.\n             *\n             * @deprecated\n             */\n            uuid?: string;\n            /**\n             * Unique session identifier. Each instance of the session will have its own session_id.\n             */\n            session_id: string;\n            /**\n             * Session name.\n             */\n            session_name: string;\n            /**\n             * The Video SDK custom session ID.\n             */\n            session_key: string;\n            /**\n             * Another identifier for the inviter. Can be a number or characters.\n             */\n            user_key: string;\n            /**\n             * The user ID of the session host.\n             */\n            host_id: string;\n            /**\n             * Information about the invited user.\n             */\n            participant: {\n                /**\n                 * The user's name to display in the session.\n                 */\n                invitee_name: string;\n                /**\n                 * The user's phone number.\n                 */\n                phone_number: number;\n                /**\n                 * The number used to call out to the invited user.\n                 */\n                from_number: number;\n            };\n        };\n    };\n};\n\nexport type SessionUserPhoneCalloutRejectedWebhookRequest = {\n    body: SessionUserPhoneCalloutRejectedWebhookPayload;\n    key: 'session.user_phone_callout_rejected';\n    path?: never;\n    query?: never;\n};\n\n/**\n * # session.user_room_system_callout_accepted\n *\n * The **Invited party answered a session invitation through phone (call out) via Zoom room** event is triggered every time a user [joins a session through phone (call out) from a Zoom room](https://support.zoom.us/hc/en-us/articles/205369035).\n *\n * ## Prerequisites\n *\n * * **Event Subscriptions** must be enabled for your app with the following configurations:\n * * A valid **Event Notification Endpoint URL**.\n * * The **Invited party answered a session invitation through phone (call out) via Zoom room** subscription enabled under the **Session** event.\n *\n *\n *\n * **Event type**: `session.user_room_system_callout_accepted`\n *\n */\nexport type SessionUserRoomSystemCalloutAcceptedWebhookPayload = {\n    /**\n     * The name of the event.\n     */\n    event: string;\n    /**\n     * A timestamp at which the event occurred.\n     */\n    event_ts: number;\n    payload: {\n        /**\n         * The account ID of the session host.\n         */\n        account_id: string;\n        /**\n         * Information about the session.\n         */\n        object: {\n            /**\n             * The session ID.\n             *\n             * @deprecated\n             */\n            id?: number;\n            /**\n             * The session's universally unique identifier (UUID). Each session instance generates a session UUID.\n             *\n             * @deprecated\n             */\n            uuid?: string;\n            /**\n             * Unique session identifier. Each instance of the session will have its own session_id.\n             */\n            session_id: string;\n            /**\n             * Session name.\n             */\n            session_name: string;\n            /**\n             * The user ID of the session host.\n             */\n            host_id: string;\n            /**\n             * The request unique identifier (UUID).\n             */\n            message_id: string;\n            /**\n             * The user name of the event's trigger.\n             */\n            inviter_name: string;\n            /**\n             * Information about the invited participant.\n             */\n            participant: {\n                /**\n                 * The type of call out. Use a value of h323 or sip.\n                 */\n                call_type: string;\n                /**\n                 * The user's device IP address.\n                 */\n                device_ip: string;\n                [key: string]: unknown;\n            };\n        };\n    };\n};\n\nexport type SessionUserRoomSystemCalloutAcceptedWebhookRequest = {\n    body: SessionUserRoomSystemCalloutAcceptedWebhookPayload;\n    key: 'session.user_room_system_callout_accepted';\n    path?: never;\n    query?: never;\n};\n\n/**\n * # session.recording_stopped\n * ---\n *\n * Event: `session.recording_stopped`\n *\n * ## Event description\n *\n * The **Session recording stopped** event is triggered every time a previously paused recording of a session is resumed.\n *\n * Only a session host or co-host can start, pause, resume, or stop a cloud recording. A recording is considered complete **after** the host or co-host ends the session. See [Enable cloud recording](https://developers.zoom.us/docs/video-sdk/account/#enable-cloud-recording) for details.\n *\n * ## Prerequisites\n *\n * * Cloud Recording must be enabled on the Video SDK account.\n * * Event Subscriptions must be enabled for your app with the following configurations:\n * * A valid Event Notification Endpoint URL.\n * * **Session recording stopped** subscription enabled under the **Recording** event.\n *\n * The tabs below display the complete schema, payload with data types, and an example of the `session.recording_stopped` event notification:\n *\n *\n *\n * **Event type**: `session.recording_stopped`\n *\n */\nexport type SessionRecordingStoppedWebhookPayload = {\n    /**\n     * The event's name.\n     */\n    event: 'session.recording_stopped';\n    /**\n     * A timestamp, in milliseconds since epoch, at which the event occurred.\n     */\n    event_ts: number;\n    payload: {\n        /**\n         * The Video SDK account ID.\n         */\n        account_id: string;\n        /**\n         * Information about the session. This object only returns updated properties.\n         */\n        object: {\n            /**\n             * Unique session identifier. Each instance of the session will have its own session_id.\n             */\n            session_id: string;\n            /**\n             * Session name.\n             */\n            session_name: string;\n            /**\n             * The Video SDK custom session ID.\n             */\n            session_key: string;\n            /**\n             * The time at which the session started.\n             */\n            start_time: string;\n            /**\n             * The user's timezone.\n             */\n            timezone: string;\n            recording_file: {\n                /**\n                 * The recording start time.\n                 */\n                recording_start?: string;\n                /**\n                 * The recording end time. Response in general query.\n                 */\n                recording_end?: string;\n            };\n        };\n    };\n};\n\nexport type SessionRecordingStoppedWebhookRequest = {\n    body: SessionRecordingStoppedWebhookPayload;\n    key: 'session.recording_stopped';\n    path?: never;\n    query?: never;\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/cli.test.ts",
    "content": "import path from 'node:path';\n\nimport { sync } from 'cross-spawn';\n\nimport { getSpecsPath } from '../../utils';\n\nconst specs = getSpecsPath();\n\ndescribe('bin', () => {\n  it('openapi-ts works', () => {\n    const result = sync('openapi-ts', [\n      '--input',\n      path.resolve(specs, '3.1.x', 'full.yaml'),\n      '--output',\n      path.resolve(__dirname, '.gen'),\n      '--dry-run',\n    ]);\n    expect(result.error).toBeFalsy();\n    expect(result.status).toBe(0);\n  });\n});\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/clients.test.ts",
    "content": "import fs from 'node:fs';\nimport path from 'node:path';\nimport { fileURLToPath } from 'node:url';\n\nimport { customClientPlugin } from '@hey-api/custom-client/plugin';\nimport { createClient, type UserConfig } from '@hey-api/openapi-ts';\n\nimport { getFilePaths, getSpecsPath } from '../../utils';\nimport { myClientPlugin } from './custom/client/plugin';\n\nconst __filename = fileURLToPath(import.meta.url);\nconst __dirname = path.dirname(__filename);\n\nconst clients = [\n  '@hey-api/client-angular',\n  '@hey-api/client-axios',\n  '@hey-api/client-fetch',\n  '@hey-api/client-ky',\n  '@hey-api/client-next',\n  '@hey-api/client-nuxt',\n  '@hey-api/client-ofetch',\n] satisfies UserConfig['plugins'];\n\nfor (const client of clients) {\n  const namespace = 'clients';\n\n  const outputDir = path.join(__dirname, 'generated', '3.1.x', namespace, client);\n\n  describe(client, () => {\n    const createConfig = (\n      userConfig: Omit<UserConfig, 'input'> & Pick<Partial<UserConfig>, 'input'>,\n    ) => {\n      const output = userConfig.output instanceof Array ? userConfig.output[0] : userConfig.output;\n      return {\n        ...userConfig,\n        input: path.join(getSpecsPath(), '3.1.x', 'full.yaml'),\n        logs: {\n          level: 'silent',\n        },\n        output:\n          typeof output === 'string'\n            ? path.join(outputDir, output)\n            : {\n                ...output,\n                path: path.join(outputDir, output?.path ?? ''),\n              },\n      } as const satisfies UserConfig;\n    };\n\n    const scenarios = [\n      {\n        config: createConfig({\n          output: 'default',\n          plugins: [client],\n        }),\n        description: 'default output',\n      },\n      {\n        config: createConfig({\n          output: 'sdk-client-optional',\n          plugins: [\n            client,\n            {\n              client: true,\n              name: '@hey-api/sdk',\n            },\n          ],\n        }),\n        description: 'SDK with optional client option',\n      },\n      {\n        config: createConfig({\n          output: 'sdk-client-required',\n          plugins: [\n            client,\n            {\n              client: false,\n              name: '@hey-api/sdk',\n            },\n          ],\n        }),\n        description: 'SDK with required client option',\n      },\n      {\n        config: createConfig({\n          output: 'base-url-false',\n          plugins: [\n            {\n              baseUrl: false,\n              name: client,\n            },\n            '@hey-api/typescript',\n          ],\n        }),\n        description: 'client without base URL',\n      },\n      {\n        config: createConfig({\n          output: 'base-url-number',\n          plugins: [\n            {\n              baseUrl: 0,\n              name: client,\n            },\n            '@hey-api/typescript',\n          ],\n        }),\n        description: 'client with numeric base URL',\n      },\n      {\n        config: createConfig({\n          output: 'base-url-string',\n          plugins: [\n            {\n              baseUrl: 'https://foo.com',\n              name: client,\n            },\n            '@hey-api/typescript',\n          ],\n        }),\n        description: 'client with custom string base URL',\n      },\n      {\n        config: createConfig({\n          output: 'base-url-strict',\n          plugins: [\n            {\n              name: client,\n              strictBaseUrl: true,\n            },\n            '@hey-api/typescript',\n          ],\n        }),\n        description: 'client with strict base URL',\n      },\n      {\n        config: createConfig({\n          output: {\n            path: 'tsconfig-nodenext-sdk',\n            tsConfigPath: path.join(__dirname, 'tsconfig', 'tsconfig.nodenext.json'),\n          },\n          plugins: [client, '@hey-api/sdk'],\n        }),\n        description: 'SDK with NodeNext tsconfig',\n      },\n      {\n        config: createConfig({\n          output: {\n            path: 'tsconfig-node16-sdk',\n            tsConfigPath: path.join(__dirname, 'tsconfig', 'tsconfig.node16.json'),\n          },\n          plugins: [client, '@hey-api/sdk'],\n        }),\n        description: 'SDK with Node16 tsconfig',\n      },\n      {\n        config: createConfig({\n          output: {\n            importFileExtension: '.ts',\n            path: 'import-file-extension-ts',\n          },\n          plugins: [client, '@hey-api/sdk'],\n        }),\n        description: 'SDK with .ts import file extensions',\n      },\n      {\n        config: createConfig({\n          output: {\n            clean: false,\n            path: 'clean-false',\n          },\n          plugins: [client, '@hey-api/sdk'],\n        }),\n        description: 'avoid appending extension multiple times | twice',\n      },\n    ];\n\n    it.each(scenarios)('$description', async ({ config, description }) => {\n      await createClient(config);\n      if (description.endsWith('twice')) {\n        await createClient(config);\n      }\n\n      const outputPath = typeof config.output === 'string' ? config.output : config.output.path;\n      const filePaths = getFilePaths(outputPath);\n\n      await Promise.all(\n        filePaths.map(async (filePath) => {\n          const fileContent = fs.readFileSync(filePath, 'utf-8');\n\n          // flaky test reordering client imports, skip\n          if (\n            client === '@hey-api/client-nuxt' &&\n            typeof config.output === 'string' &&\n            config.output.includes('bundle')\n          ) {\n            expect(1).toBe(1);\n            return;\n          }\n\n          await expect(fileContent).toMatchFileSnapshot(\n            path.join(\n              __dirname,\n              '__snapshots__',\n              '3.1.x',\n              namespace,\n              client,\n              filePath.slice(outputDir.length + 1),\n            ),\n          );\n        }),\n      );\n    });\n  });\n}\n\ndescribe('custom-client', () => {\n  const namespace = 'clients';\n\n  const outputDir = path.join(__dirname, 'generated', '3.1.x', namespace, 'client-custom');\n\n  const createConfig = (\n    userConfig: Omit<UserConfig, 'input'> & Pick<Partial<UserConfig>, 'input'>,\n  ) =>\n    ({\n      ...userConfig,\n      input: path.join(getSpecsPath(), '3.1.x', 'full.yaml'),\n      logs: {\n        level: 'silent',\n      },\n      output: path.join(outputDir, typeof userConfig.output === 'string' ? userConfig.output : ''),\n    }) as const satisfies UserConfig;\n\n  const scenarios = [\n    {\n      config: createConfig({\n        output: 'default',\n        plugins: [customClientPlugin()],\n      }),\n      description: 'default output',\n    },\n    // TODO: enable custom client bundle, it's currently producing CJS output which fails typecheck\n    // {\n    //   config: createConfig({\n    //     output: 'bundle',\n    //     plugins: [\n    //       customClientPlugin({\n    //         bundle: true,\n    //       }),\n    //     ],\n    //   }),\n    //   description: 'default output with bundled client',\n    // },\n    {\n      config: createConfig({\n        output: 'sdk-client-optional',\n        plugins: [\n          customClientPlugin(),\n          {\n            client: true,\n            name: '@hey-api/sdk',\n          },\n        ],\n      }),\n      description: 'SDK with optional client option',\n    },\n    {\n      config: createConfig({\n        output: 'sdk-client-required',\n        plugins: [\n          customClientPlugin(),\n          {\n            client: false,\n            name: '@hey-api/sdk',\n          },\n        ],\n      }),\n      description: 'SDK with required client option',\n    },\n    {\n      config: createConfig({\n        output: 'base-url-false',\n        plugins: [\n          customClientPlugin({\n            baseUrl: false,\n          }),\n          '@hey-api/typescript',\n        ],\n      }),\n      description: 'client without base URL',\n    },\n    {\n      config: createConfig({\n        output: 'base-url-number',\n        plugins: [\n          customClientPlugin({\n            baseUrl: 0,\n          }),\n          '@hey-api/typescript',\n        ],\n      }),\n      description: 'client with numeric base URL',\n    },\n    {\n      config: createConfig({\n        output: 'base-url-string',\n        plugins: [\n          customClientPlugin({\n            baseUrl: 'https://foo.com',\n          }),\n          '@hey-api/typescript',\n        ],\n      }),\n      description: 'client with custom string base URL',\n    },\n    {\n      config: createConfig({\n        output: 'base-url-strict',\n        plugins: [\n          customClientPlugin({\n            strictBaseUrl: true,\n          }),\n          '@hey-api/typescript',\n        ],\n      }),\n      description: 'client with strict base URL',\n    },\n  ];\n\n  it.each(scenarios)('$description', async ({ config }) => {\n    await createClient(config);\n\n    const filePaths = getFilePaths(config.output);\n\n    await Promise.all(\n      filePaths.map(async (filePath) => {\n        const fileContent = fs.readFileSync(filePath, 'utf-8');\n\n        await expect(fileContent).toMatchFileSnapshot(\n          path.join(\n            __dirname,\n            '__snapshots__',\n            '3.1.x',\n            namespace,\n            'client-custom',\n            filePath.slice(outputDir.length + 1),\n          ),\n        );\n      }),\n    );\n  });\n});\n\ndescribe('my-client', () => {\n  const namespace = 'clients';\n\n  const outputDir = path.join(__dirname, 'generated', '3.1.x', namespace, 'my-client');\n\n  const createConfig = (\n    userConfig: Omit<UserConfig, 'input'> & Pick<Partial<UserConfig>, 'input'>,\n  ) =>\n    ({\n      ...userConfig,\n      input: path.join(getSpecsPath(), '3.1.x', 'full.yaml'),\n      logs: {\n        level: 'silent',\n      },\n      output: path.join(outputDir, typeof userConfig.output === 'string' ? userConfig.output : ''),\n    }) as const satisfies UserConfig;\n\n  const scenarios = [\n    {\n      config: createConfig({\n        output: 'default',\n        plugins: [myClientPlugin()],\n      }),\n      description: 'default output',\n    },\n    {\n      config: createConfig({\n        output: 'bundle',\n        plugins: [\n          myClientPlugin({\n            bundle: true,\n          }),\n        ],\n      }),\n      description: 'default output with bundled client',\n    },\n    {\n      config: createConfig({\n        output: 'sdk-client-optional',\n        plugins: [\n          myClientPlugin(),\n          {\n            client: true,\n            name: '@hey-api/sdk',\n          },\n        ],\n      }),\n      description: 'SDK with optional client option',\n    },\n    {\n      config: createConfig({\n        output: 'sdk-client-required',\n        plugins: [\n          myClientPlugin(),\n          {\n            client: false,\n            name: '@hey-api/sdk',\n          },\n        ],\n      }),\n      description: 'SDK with required client option',\n    },\n    {\n      config: createConfig({\n        output: 'base-url-false',\n        plugins: [\n          myClientPlugin({\n            baseUrl: false,\n          }),\n          '@hey-api/typescript',\n        ],\n      }),\n      description: 'client without base URL',\n    },\n    {\n      config: createConfig({\n        output: 'base-url-number',\n        plugins: [\n          myClientPlugin({\n            baseUrl: 0,\n          }),\n          '@hey-api/typescript',\n        ],\n      }),\n      description: 'client with numeric base URL',\n    },\n    {\n      config: createConfig({\n        output: 'base-url-string',\n        plugins: [\n          myClientPlugin({\n            baseUrl: 'https://foo.com',\n          }),\n          '@hey-api/typescript',\n        ],\n      }),\n      description: 'client with custom string base URL',\n    },\n    {\n      config: createConfig({\n        output: 'base-url-strict',\n        plugins: [\n          myClientPlugin({\n            strictBaseUrl: true,\n          }),\n          '@hey-api/typescript',\n        ],\n      }),\n      description: 'client with strict base URL',\n    },\n  ];\n\n  it.each(scenarios)('$description', async ({ config }) => {\n    await createClient(config);\n\n    const filePaths = getFilePaths(config.output);\n\n    await Promise.all(\n      filePaths.map(async (filePath) => {\n        const fileContent = fs.readFileSync(filePath, 'utf-8');\n\n        await expect(fileContent).toMatchFileSnapshot(\n          path.join(\n            __dirname,\n            '__snapshots__',\n            '3.1.x',\n            namespace,\n            'my-client',\n            filePath.slice(outputDir.length + 1),\n          ),\n        );\n      }),\n    );\n  });\n});\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/custom/client/client.ts",
    "content": "import type { Client, Config, RequestOptions } from './types';\nimport {\n  buildUrl,\n  createConfig,\n  createInterceptors,\n  getParseAs,\n  mergeConfigs,\n  mergeHeaders,\n  setAuthParams,\n} from './utils';\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, RequestOptions>();\n\n  // @ts-expect-error\n  const request: Client['request'] = async (options) => {\n    const opts = {\n      ..._config,\n      ...options,\n      fetch: options.fetch ?? _config.fetch ?? globalThis.fetch,\n      headers: mergeHeaders(_config.headers, options.headers),\n    };\n\n    if (opts.security) {\n      await setAuthParams({\n        ...opts,\n        security: opts.security,\n      });\n    }\n\n    if (opts.body && opts.bodySerializer) {\n      opts.body = opts.bodySerializer(opts.body);\n    }\n\n    // remove Content-Type header if body is empty to avoid sending invalid requests\n    if (opts.body === undefined || opts.body === '') {\n      opts.headers.delete('Content-Type');\n    }\n\n    const url = buildUrl(opts);\n    const requestInit: ReqInit = {\n      redirect: 'follow',\n      ...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 = await _fetch(request);\n\n    for (const fn of interceptors.response.fns) {\n      if (fn) {\n        response = await fn(response, request, opts);\n      }\n    }\n\n    const result = {\n      request,\n      response,\n    };\n\n    if (response.ok) {\n      if (response.status === 204 || response.headers.get('Content-Length') === '0') {\n        return {\n          data: {},\n          ...result,\n        };\n      }\n\n      const parseAs =\n        (opts.parseAs === 'auto'\n          ? getParseAs(response.headers.get('Content-Type'))\n          : opts.parseAs) ?? 'json';\n\n      if (parseAs === 'stream') {\n        return {\n          data: response.body,\n          ...result,\n        };\n      }\n\n      let data = await response[parseAs]();\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 {\n        data,\n        ...result,\n      };\n    }\n\n    let error = await response.text();\n\n    try {\n      error = JSON.parse(error);\n    } catch {\n      // noop\n    }\n\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    return {\n      error: finalError,\n      ...result,\n    };\n  };\n\n  return {\n    buildUrl,\n    connect: (options) => request({ ...options, method: 'CONNECT' }),\n    delete: (options) => request({ ...options, method: 'DELETE' }),\n    get: (options) => request({ ...options, method: 'GET' }),\n    getConfig,\n    head: (options) => request({ ...options, method: 'HEAD' }),\n    interceptors,\n    options: (options) => request({ ...options, method: 'OPTIONS' }),\n    patch: (options) => request({ ...options, method: 'PATCH' }),\n    post: (options) => request({ ...options, method: 'POST' }),\n    put: (options) => request({ ...options, method: 'PUT' }),\n    request,\n    setConfig,\n    trace: (options) => request({ ...options, method: 'TRACE' }),\n  };\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/custom/client/core/auth.ts",
    "content": "export 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/custom/client/core/bodySerializer.ts",
    "content": "import type { ArrayStyle, ObjectStyle, SerializerOptions } from './pathSerializer';\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) => {\n  if (typeof value === 'string' || value instanceof Blob) {\n    data.append(key, value);\n  } else {\n    data.append(key, JSON.stringify(value));\n  }\n};\n\nconst serializeUrlSearchParamsPair = (data: URLSearchParams, key: string, value: unknown) => {\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) => {\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) =>\n    JSON.stringify(body, (_key, value) => (typeof value === 'bigint' ? value.toString() : value)),\n};\n\nexport const urlSearchParamsBodySerializer = {\n  bodySerializer: (body: unknown) => {\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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/custom/client/core/params.ts",
    "content": "type Slot = 'body' | 'headers' | 'path' | 'query';\n\nexport type Field =\n  | {\n      in: Exclude<Slot, 'body'>;\n      key: string;\n      map?: string;\n    }\n  | {\n      in: Extract<Slot, 'body'>;\n      key?: string;\n      map?: string;\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\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 (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' && !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        (params[field.in] as Record<string, unknown>)[name] = arg;\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          const name = field.map || key;\n          (params[field.in] as Record<string, unknown>)[name] = value;\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 {\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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/custom/client/core/pathSerializer.ts",
    "content": "interface 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/custom/client/core/types.ts",
    "content": "import type { Auth, AuthToken } from './auth';\nimport type { BodySerializer, QuerySerializer, QuerySerializerOptions } from './bodySerializer';\n\nexport interface Client<RequestFn = never, Config = unknown, MethodFn = never, BuildUrlFn = never> {\n  /**\n   * Returns the final request URL.\n   */\n  buildUrl: BuildUrlFn;\n  connect: MethodFn;\n  delete: MethodFn;\n  get: MethodFn;\n  getConfig: () => Config;\n  head: MethodFn;\n  options: MethodFn;\n  patch: MethodFn;\n  post: MethodFn;\n  put: MethodFn;\n  request: RequestFn;\n  setConfig: (config: Config) => Config;\n  trace: MethodFn;\n}\n\nexport interface Config {\n  /**\n   * Auth token or a function returning auth token. The resolved value will be\n   * added to the request payload as defined by its `security` array.\n   */\n  auth?: ((auth: Auth) => Promise<AuthToken> | AuthToken) | AuthToken;\n  /**\n   * A function for serializing request body parameter. By default,\n   * {@link JSON.stringify()} will be used.\n   */\n  bodySerializer?: BodySerializer | null;\n  /**\n   * An object containing any HTTP headers that you want to pre-populate your\n   * `Headers` object with.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/Headers/Headers#init See more}\n   */\n  headers?:\n    | RequestInit['headers']\n    | Record<\n        string,\n        string | number | boolean | (string | number | boolean)[] | null | undefined | unknown\n      >;\n  /**\n   * The request method.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/fetch#method See more}\n   */\n  method?: 'CONNECT' | 'DELETE' | 'GET' | 'HEAD' | 'OPTIONS' | 'PATCH' | 'POST' | 'PUT' | 'TRACE';\n  /**\n   * A function for serializing request query parameters. By default, arrays\n   * will be exploded in form style, objects will be exploded in deepObject\n   * style, and reserved characters are percent-encoded.\n   *\n   * This method will have no effect if the native `paramsSerializer()` Axios\n   * API function is used.\n   *\n   * {@link https://swagger.io/docs/specification/serialization/#query View examples}\n   */\n  querySerializer?: QuerySerializer | QuerySerializerOptions;\n  /**\n   * A function transforming response data before it's returned. This is useful\n   * for post-processing data, e.g. converting ISO strings into Date objects.\n   */\n  responseTransformer?: (data: unknown) => Promise<unknown>;\n  /**\n   * A function validating response data. This is useful if you want to ensure\n   * the response conforms to the desired shape, so it can be safely passed to\n   * the transformers and returned to the user.\n   */\n  responseValidator?: (data: unknown) => Promise<unknown>;\n}\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/custom/client/index.ts",
    "content": "export { createClient } from './client';\nexport type { Auth } from './core/auth';\nexport type { QuerySerializerOptions } from './core/bodySerializer';\nexport {\n  formDataBodySerializer,\n  jsonBodySerializer,\n  urlSearchParamsBodySerializer,\n} from './core/bodySerializer';\nexport type {\n  Client,\n  ClientOptions,\n  Config,\n  CreateClientConfig,\n  Options,\n  RequestOptions,\n  RequestResult,\n  TDataShape,\n} from './types';\nexport { createConfig } from './utils';\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/custom/client/plugin.ts",
    "content": "import {\n  type Client,\n  clientDefaultConfig,\n  clientDefaultMeta,\n  clientPluginHandler,\n  type DefinePlugin,\n  definePluginConfig,\n} from '@hey-api/openapi-ts';\n\nexport type Config = Client.Config & {\n  /**\n   * Plugin name. Must be unique.\n   */\n  name: string;\n};\n\nexport type MyClientPlugin = DefinePlugin<Config, Config>;\n\nexport const defaultConfig: MyClientPlugin['Config'] = {\n  ...clientDefaultMeta,\n  config: clientDefaultConfig,\n  handler: clientPluginHandler as MyClientPlugin['Handler'],\n  name: __filename,\n};\n\n/**\n * Type helper for `my-client` plugin, returns {@link Plugin.Config} object\n */\nexport const myClientPlugin = definePluginConfig(defaultConfig);\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/custom/client/types.ts",
    "content": "import type { Auth } from './core/auth';\nimport type { Client as CoreClient, Config as CoreConfig } from './core/types';\nimport type { Middleware } from './utils';\n\nexport interface Config<T extends ClientOptions = ClientOptions>\n  extends Omit<RequestInit, 'body' | 'headers' | 'method'>, CoreConfig {\n  /**\n   * Base URL for all requests made by this client.\n   */\n  baseUrl?: T['baseUrl'];\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?: (request: Request) => ReturnType<typeof fetch>;\n  /**\n   * Return the response data parsed in a specified format. By default, `auto`\n   * will infer the appropriate method from the `Content-Type` response header.\n   * You can override this behavior with any of the {@link Body} methods.\n   * Select `stream` if you don't want to parse response data at all.\n   *\n   * @default 'auto'\n   */\n  parseAs?: 'arrayBuffer' | 'auto' | 'blob' | 'formData' | 'json' | 'stream' | 'text';\n  /**\n   * Throw an error instead of returning it in the response?\n   *\n   * @default false\n   */\n  throwOnError?: T['throwOnError'];\n}\n\nexport interface RequestOptions<\n  ThrowOnError extends boolean = boolean,\n  Url extends string = string,\n> extends Config<{\n  throwOnError: ThrowOnError;\n}> {\n  /**\n   * Any body that you want to add to your request.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/fetch#body}\n   */\n  body?: unknown;\n  path?: Record<string, unknown>;\n  query?: Record<string, unknown>;\n  /**\n   * Security mechanism(s) to use for the request.\n   */\n  security?: ReadonlyArray<Auth>;\n  url: Url;\n}\n\nexport type RequestResult<\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = boolean,\n> = ThrowOnError extends true\n  ? Promise<{\n      data: TData;\n      request: Request;\n      response: Response;\n    }>\n  : Promise<\n      ({ data: TData; error: undefined } | { data: undefined; error: TError }) & {\n        request: Request;\n        response: Response;\n      }\n    >;\n\nexport interface ClientOptions {\n  baseUrl?: string;\n  throwOnError?: boolean;\n}\n\ntype MethodFn = <TData = unknown, TError = unknown, ThrowOnError extends boolean = false>(\n  options: Omit<RequestOptions<ThrowOnError>, 'method'>,\n) => RequestResult<TData, TError, ThrowOnError>;\n\ntype RequestFn = <TData = unknown, TError = unknown, ThrowOnError extends boolean = false>(\n  options: Omit<RequestOptions<ThrowOnError>, 'method'> &\n    Pick<Required<RequestOptions<ThrowOnError>>, 'method'>,\n) => RequestResult<TData, TError, ThrowOnError>;\n\ntype BuildUrlFn = <\n  TData extends {\n    body?: unknown;\n    path?: Record<string, unknown>;\n    query?: Record<string, unknown>;\n    url: string;\n  },\n>(\n  options: TData & Options<TData>,\n) => string;\n\nexport type Client = CoreClient<RequestFn, Config, MethodFn, BuildUrlFn> & {\n  interceptors: Middleware<Request, Response, unknown, RequestOptions>;\n};\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 = ClientOptions> = (\n  override?: Config<ClientOptions & T>,\n) => Config<Required<ClientOptions> & T>;\n\nexport interface TDataShape {\n  body?: unknown;\n  headers?: unknown;\n  path?: unknown;\n  query?: unknown;\n  url: string;\n}\n\ntype OmitKeys<T, K> = Pick<T, Exclude<keyof T, K>>;\n\nexport type Options<\n  TData extends TDataShape = TDataShape,\n  ThrowOnError extends boolean = boolean,\n> = OmitKeys<RequestOptions<ThrowOnError>, 'body' | 'path' | 'query' | 'url'> & Omit<TData, 'url'>;\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/custom/client/utils.ts",
    "content": "import { getAuthToken } from './core/auth';\nimport type { QuerySerializer, QuerySerializerOptions } from './core/bodySerializer';\nimport { jsonBodySerializer } from './core/bodySerializer';\nimport {\n  serializeArrayParam,\n  serializeObjectParam,\n  serializePrimitiveParam,\n} from './core/pathSerializer';\nimport type { Client, ClientOptions, Config, RequestOptions } from './types';\n\ninterface PathSerializer {\n  path: Record<string, unknown>;\n  url: string;\n}\n\nconst PATH_PARAM_RE = /\\{[^{}]+\\}/g;\n\ntype ArrayStyle = 'form' | 'spaceDelimited' | 'pipeDelimited';\ntype MatrixStyle = 'label' | 'matrix' | 'simple';\ntype ArraySeparatorStyle = ArrayStyle | MatrixStyle;\n\nconst 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 createQuerySerializer = <T = unknown>({\n  allowReserved,\n  array,\n  object,\n}: QuerySerializerOptions = {}) => {\n  const querySerializer = (queryParams: T) => {\n    let 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        if (Array.isArray(value)) {\n          search = [\n            ...search,\n            serializeArrayParam({\n              allowReserved,\n              explode: true,\n              name,\n              style: 'form',\n              value,\n              ...array,\n            }),\n          ];\n          continue;\n        }\n\n        if (typeof value === 'object') {\n          search = [\n            ...search,\n            serializeObjectParam({\n              allowReserved,\n              explode: true,\n              name,\n              style: 'deepObject',\n              value: value as Record<string, unknown>,\n              ...object,\n            }),\n          ];\n          continue;\n        }\n\n        search = [\n          ...search,\n          serializePrimitiveParam({\n            allowReserved,\n            name,\n            value: value as string,\n          }),\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\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    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    return;\n  }\n};\n\nexport const buildUrl: Client['buildUrl'] = (options) => {\n  const url = 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  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 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\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 || typeof header !== 'object') {\n      continue;\n    }\n\n    const iterator = header instanceof Headers ? header.entries() : 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"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/custom/request.ts",
    "content": "import type { ApiRequestOptions } from './ApiRequestOptions';\nimport { CancelablePromise } from './CancelablePromise';\nimport type { OpenAPIConfig } from './OpenAPI';\n\nexport const request = <T>(\n  config: OpenAPIConfig,\n  options: ApiRequestOptions<T>,\n): CancelablePromise<T> =>\n  new CancelablePromise((resolve, reject, onCancel) => {\n    const url = `${config.BASE}${options.path}`.replace('{api-version}', config.VERSION);\n\n    try {\n      // Do your request...\n      const timeout = setTimeout(() => {\n        resolve({\n          body: {\n            ...options,\n          },\n          ok: true,\n          status: 200,\n          statusText: 'dummy',\n          url,\n        });\n      }, 500);\n\n      // Cancel your request...\n      onCancel(() => {\n        clearTimeout(timeout);\n      });\n    } catch (error) {\n      reject(error);\n    }\n  });\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/meta-function.test.ts",
    "content": "import fs from 'node:fs';\nimport path from 'node:path';\nimport { fileURLToPath } from 'node:url';\n\nimport { createClient, type UserConfig } from '@hey-api/openapi-ts';\n\nimport { getFilePaths, getSpecsPath } from '../../utils';\n\nconst __filename = fileURLToPath(import.meta.url);\nconst __dirname = path.dirname(__filename);\n\nconst version = '3.1.x';\nconst namespace = 'plugins';\nconst outputDir = path.join(__dirname, 'generated', version, namespace);\n\n// TODO: further clean up\ndescribe('TanStack Query Meta Function Customization', () => {\n  const createConfig = (\n    userConfig: Omit<UserConfig, 'input'> & Pick<Partial<UserConfig>, 'input'>,\n  ): UserConfig => ({\n    input: path.join(getSpecsPath(), version, 'security-api-key.yaml'),\n    logs: {\n      level: 'silent',\n    },\n    ...userConfig,\n  });\n\n  // Framework configurations\n  const frameworks = [\n    {\n      description: 'React Query',\n      name: '@tanstack/react-query',\n      output: 'react-query',\n    },\n    {\n      description: 'Vue Query',\n      name: '@tanstack/vue-query',\n      output: 'vue-query',\n    },\n    {\n      description: 'Svelte Query',\n      name: '@tanstack/svelte-query',\n      output: 'svelte-query',\n    },\n    {\n      description: 'Solid Query',\n      name: '@tanstack/solid-query',\n      output: 'solid-query',\n    },\n    {\n      description: 'Angular Query',\n      name: '@tanstack/angular-query-experimental',\n      output: 'angular-query-experimental',\n    },\n    {\n      description: 'Preact Query',\n      name: '@tanstack/preact-query',\n      output: 'preact-query',\n    },\n  ] as const;\n\n  // Generate scenarios for each framework\n  const scenarios = frameworks.map((framework) => ({\n    config: createConfig({\n      output: path.join(outputDir, '@tanstack', framework.output, 'meta-function'),\n      plugins: [\n        {\n          infiniteQueryOptions: {\n            meta: (operation) => ({\n              id: operation.id,\n              method: operation.method,\n              path: operation.path,\n            }),\n          },\n          mutationOptions: {\n            meta: (operation) => ({\n              id: operation.id,\n              method: operation.method,\n              path: operation.path,\n            }),\n          },\n          name: framework.name,\n          queryOptions: {\n            meta: (operation) => ({\n              id: operation.id,\n              method: operation.method,\n              path: operation.path,\n            }),\n          },\n        },\n        '@hey-api/client-fetch',\n      ],\n    }),\n    description: `generates ${framework.description} options with custom meta function`,\n  }));\n\n  it.each(scenarios)('$description', async ({ config }) => {\n    await createClient(config);\n\n    const outputPath = config.output as string;\n    const filePaths = getFilePaths(outputPath);\n\n    // Create snapshots for all generated files\n    await Promise.all(\n      filePaths.map(async (filePath) => {\n        const fileContent = fs.readFileSync(filePath, 'utf-8');\n        const relativePath = filePath.slice(outputPath.length + 1);\n        const fileName = path.basename(relativePath);\n        const frameworkDir = path.dirname(relativePath).split(path.sep).pop()!;\n        await expect(fileContent).toMatchFileSnapshot(\n          path.join(\n            __dirname,\n            '..',\n            '..',\n            '__snapshots__',\n            'plugins',\n            '@tanstack',\n            'meta',\n            frameworkDir,\n            fileName,\n          ),\n        );\n      }),\n    );\n  });\n});\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/plugins.test.ts",
    "content": "import fs from 'node:fs';\nimport path from 'node:path';\nimport { fileURLToPath } from 'node:url';\n\nimport { createClient, type DefinePlugin, type UserConfig } from '@hey-api/openapi-ts';\n\nimport { getFilePaths, getSpecsPath } from '../../utils';\n\nconst __filename = fileURLToPath(import.meta.url);\nconst __dirname = path.dirname(__filename);\n\nconst versions = ['2.0.x', '3.0.x', '3.1.x'];\n\nfor (const version of versions) {\n  const namespace = 'plugins';\n\n  const outputDir = path.join(__dirname, 'generated', version, namespace);\n\n  describe(`OpenAPI ${version} ${namespace}`, () => {\n    const createConfig = (\n      userConfig: Omit<UserConfig, 'input'> &\n        Pick<Required<UserConfig>, 'plugins'> &\n        Pick<Partial<UserConfig>, 'input'>,\n    ) =>\n      ({\n        ...userConfig,\n        input: path.join(\n          getSpecsPath(),\n          version,\n          typeof userConfig.input === 'string' ? userConfig.input : 'full.yaml',\n        ),\n        logs: {\n          level: 'silent',\n        },\n        output: path.join(\n          outputDir,\n          typeof userConfig.plugins[0] === 'string'\n            ? userConfig.plugins[0]\n            : userConfig.plugins[0]!.name,\n          typeof userConfig.output === 'string' ? userConfig.output : '',\n        ),\n        plugins: userConfig.plugins ?? ['@hey-api/client-fetch'],\n      }) as const satisfies UserConfig;\n\n    const scenarios = [\n      {\n        config: createConfig({\n          output: 'fetch',\n          plugins: ['@tanstack/angular-query-experimental', '@hey-api/client-fetch'],\n        }),\n        description: 'generate Fetch API client with TanStack Angular Query Experimental plugin',\n      },\n      {\n        config: createConfig({\n          output: 'fetch',\n          plugins: ['@tanstack/preact-query', '@hey-api/client-fetch'],\n        }),\n        description: 'generate Fetch API client with TanStack Preact Query plugin',\n      },\n      {\n        config: createConfig({\n          output: 'fetch',\n          plugins: ['@tanstack/react-query', '@hey-api/client-fetch'],\n        }),\n        description: 'generate Fetch API client with TanStack React Query plugin',\n      },\n      {\n        config: createConfig({\n          output: 'fetch',\n          plugins: ['@tanstack/solid-query', '@hey-api/client-fetch'],\n        }),\n        description: 'generate Fetch API client with TanStack Solid Query plugin',\n      },\n      {\n        config: createConfig({\n          output: 'fetch',\n          plugins: ['@tanstack/svelte-query', '@hey-api/client-fetch'],\n        }),\n        description: 'generate Fetch API client with TanStack Svelte Query plugin',\n      },\n      {\n        config: createConfig({\n          output: 'fetch',\n          plugins: ['@tanstack/vue-query', '@hey-api/client-fetch'],\n        }),\n        description: 'generate Fetch API client with TanStack Vue Query plugin',\n      },\n      {\n        config: createConfig({\n          output: 'axios',\n          plugins: ['@tanstack/angular-query-experimental', '@hey-api/client-axios'],\n        }),\n        description: 'generate Axios client with TanStack Angular Query Experimental plugin',\n      },\n      {\n        config: createConfig({\n          output: 'axios',\n          plugins: ['@tanstack/preact-query', '@hey-api/client-axios'],\n        }),\n        description: 'generate Axios client with TanStack Preact Query plugin',\n      },\n      {\n        config: createConfig({\n          output: 'axios',\n          plugins: ['@tanstack/react-query', '@hey-api/client-axios'],\n        }),\n        description: 'generate Axios client with TanStack React Query plugin',\n      },\n      {\n        config: createConfig({\n          output: 'axios',\n          plugins: ['@tanstack/solid-query', '@hey-api/client-axios'],\n        }),\n        description: 'generate Axios client with TanStack Solid Query plugin',\n      },\n      {\n        config: createConfig({\n          output: 'axios',\n          plugins: ['@tanstack/svelte-query', '@hey-api/client-axios'],\n        }),\n        description: 'generate Axios client with TanStack Svelte Query plugin',\n      },\n      {\n        config: createConfig({\n          output: 'axios',\n          plugins: ['@tanstack/vue-query', '@hey-api/client-axios'],\n        }),\n        description: 'generate Axios client with TanStack Vue Query plugin',\n      },\n      {\n        config: createConfig({\n          input: 'sdk-instance.yaml',\n          output: 'asClass',\n          plugins: [\n            '@tanstack/angular-query-experimental',\n            '@hey-api/client-fetch',\n            {\n              asClass: true,\n              classNameBuilder: '{{name}}Service',\n              name: '@hey-api/sdk',\n            },\n          ],\n        }),\n        description:\n          'generate Fetch API client with TanStack Angular Query Experimental plugin using class-based SDKs',\n      },\n      {\n        config: createConfig({\n          input: 'sdk-instance.yaml',\n          output: 'asClass',\n          plugins: [\n            '@tanstack/preact-query',\n            '@hey-api/client-fetch',\n            {\n              asClass: true,\n              classNameBuilder: '{{name}}Service',\n              name: '@hey-api/sdk',\n            },\n          ],\n        }),\n        description:\n          'generate Fetch API client with TanStack Preact Query plugin using class-based SDKs',\n      },\n      {\n        config: createConfig({\n          input: 'sdk-instance.yaml',\n          output: 'asClass',\n          plugins: [\n            '@tanstack/react-query',\n            '@hey-api/client-fetch',\n            {\n              asClass: true,\n              classNameBuilder: '{{name}}Service',\n              name: '@hey-api/sdk',\n            },\n          ],\n        }),\n        description:\n          'generate Fetch API client with TanStack React Query plugin using class-based SDKs',\n      },\n      {\n        config: createConfig({\n          input: 'sdk-instance.yaml',\n          output: 'asClass',\n          plugins: [\n            '@tanstack/solid-query',\n            '@hey-api/client-fetch',\n            {\n              asClass: true,\n              classNameBuilder: '{{name}}Service',\n              name: '@hey-api/sdk',\n            },\n          ],\n        }),\n        description:\n          'generate Fetch API client with TanStack Solid Query plugin using class-based SDKs',\n      },\n      {\n        config: createConfig({\n          input: 'sdk-instance.yaml',\n          output: 'asClass',\n          plugins: [\n            '@tanstack/svelte-query',\n            '@hey-api/client-fetch',\n            {\n              asClass: true,\n              classNameBuilder: '{{name}}Service',\n              name: '@hey-api/sdk',\n            },\n          ],\n        }),\n        description:\n          'generate Fetch API client with TanStack Svelte Query plugin using class-based SDKs',\n      },\n      {\n        config: createConfig({\n          input: 'sdk-instance.yaml',\n          output: 'asClass',\n          plugins: [\n            '@tanstack/vue-query',\n            '@hey-api/client-fetch',\n            {\n              asClass: true,\n              classNameBuilder: '{{name}}Service',\n              name: '@hey-api/sdk',\n            },\n          ],\n        }),\n        description:\n          'generate Fetch API client with TanStack Vue Query plugin using class-based SDKs',\n      },\n      {\n        config: createConfig({\n          input: 'sdk-instance.yaml',\n          output: 'name-builder',\n          plugins: [\n            {\n              infiniteQueryKeys: {\n                name: '{{name}}A',\n              },\n              infiniteQueryOptions: {\n                name: '{{name}}B',\n              },\n              mutationOptions: {\n                name: '{{name}}C',\n              },\n              name: '@tanstack/angular-query-experimental',\n              queryKeys: {\n                name: '{{name}}D',\n              },\n              queryOptions: {\n                name: '{{name}}E',\n              },\n            },\n            '@hey-api/client-fetch',\n            '@hey-api/sdk',\n          ],\n        }),\n        description:\n          'generate Fetch API client with TanStack Angular Query Experimental plugin with custom names',\n      },\n      {\n        config: createConfig({\n          input: 'sdk-instance.yaml',\n          output: 'name-builder',\n          plugins: [\n            {\n              infiniteQueryKeys: {\n                name: '{{name}}A',\n              },\n              infiniteQueryOptions: {\n                name: '{{name}}B',\n              },\n              mutationOptions: {\n                name: '{{name}}C',\n              },\n              name: '@tanstack/preact-query',\n              queryKeys: {\n                name: '{{name}}D',\n              },\n              queryOptions: {\n                name: '{{name}}E',\n              },\n            },\n            '@hey-api/client-fetch',\n            '@hey-api/sdk',\n          ],\n        }),\n        description:\n          'generate Fetch API client with TanStack Preact Query plugin with custom names',\n      },\n      {\n        config: createConfig({\n          input: 'sdk-instance.yaml',\n          output: 'name-builder',\n          plugins: [\n            {\n              infiniteQueryKeys: {\n                name: '{{name}}A',\n              },\n              infiniteQueryOptions: {\n                name: '{{name}}B',\n              },\n              mutationOptions: {\n                name: '{{name}}C',\n              },\n              name: '@tanstack/react-query',\n              queryKeys: {\n                name: '{{name}}D',\n              },\n              queryOptions: {\n                name: '{{name}}E',\n              },\n            },\n            '@hey-api/client-fetch',\n            '@hey-api/sdk',\n          ],\n        }),\n        description: 'generate Fetch API client with TanStack React Query plugin with custom names',\n      },\n      {\n        config: createConfig({\n          output: 'useMutation',\n          plugins: [\n            {\n              name: '@tanstack/react-query',\n              useMutation: true,\n            },\n            '@hey-api/client-fetch',\n          ],\n        }),\n        description:\n          'generate Fetch API client with TanStack React Query plugin with useMutation hooks',\n      },\n      {\n        config: createConfig({\n          input: 'sdk-instance.yaml',\n          output: 'name-builder',\n          plugins: [\n            {\n              infiniteQueryKeys: {\n                name: '{{name}}A',\n              },\n              infiniteQueryOptions: {\n                name: '{{name}}B',\n              },\n              mutationOptions: {\n                name: '{{name}}C',\n              },\n              name: '@tanstack/solid-query',\n              queryKeys: {\n                name: '{{name}}D',\n              },\n              queryOptions: {\n                name: '{{name}}E',\n              },\n            },\n            '@hey-api/client-fetch',\n            '@hey-api/sdk',\n          ],\n        }),\n        description: 'generate Fetch API client with TanStack Solid Query plugin with custom names',\n      },\n      {\n        config: createConfig({\n          input: 'sdk-instance.yaml',\n          output: 'name-builder',\n          plugins: [\n            {\n              infiniteQueryKeys: {\n                name: '{{name}}A',\n              },\n              infiniteQueryOptions: {\n                name: '{{name}}B',\n              },\n              mutationOptions: {\n                name: '{{name}}C',\n              },\n              name: '@tanstack/svelte-query',\n              queryKeys: {\n                name: '{{name}}D',\n              },\n              queryOptions: {\n                name: '{{name}}E',\n              },\n            },\n            '@hey-api/client-fetch',\n            '@hey-api/sdk',\n          ],\n        }),\n        description:\n          'generate Fetch API client with TanStack Svelte Query plugin with custom names',\n      },\n      {\n        config: createConfig({\n          input: 'sdk-instance.yaml',\n          output: 'name-builder',\n          plugins: [\n            {\n              infiniteQueryKeys: {\n                name: '{{name}}A',\n              },\n              infiniteQueryOptions: {\n                name: '{{name}}B',\n              },\n              mutationOptions: {\n                name: '{{name}}C',\n              },\n              name: '@tanstack/vue-query',\n              queryKeys: {\n                name: '{{name}}D',\n              },\n              queryOptions: {\n                name: '{{name}}E',\n              },\n            },\n            '@hey-api/client-fetch',\n            '@hey-api/sdk',\n          ],\n        }),\n        description: 'generate Fetch API client with TanStack Vue Query plugin with custom names',\n      },\n      {\n        config: createConfig({\n          output: 'default',\n          plugins: ['@hey-api/schemas'],\n        }),\n        description: 'generate schemas',\n      },\n      {\n        config: createConfig({\n          output: 'default',\n          plugins: ['@hey-api/sdk', '@hey-api/client-fetch'],\n        }),\n        description: 'generate SDK',\n      },\n      {\n        config: createConfig({\n          output: 'throwOnError',\n          plugins: [\n            '@hey-api/sdk',\n            {\n              name: '@hey-api/client-fetch',\n              throwOnError: true,\n            },\n          ],\n        }),\n        description: 'generate SDK that throws on error',\n      },\n      {\n        config: createConfig({\n          input: 'sdk-instance.yaml',\n          output: 'instance',\n          plugins: [\n            {\n              instance: true,\n              name: '@hey-api/sdk',\n            },\n            '@hey-api/client-fetch',\n          ],\n        }),\n        description: 'generate SDK instance',\n      },\n      {\n        config: createConfig({\n          output: 'default',\n          plugins: ['fastify'],\n        }),\n        description: 'generate Fastify types with Fastify plugin',\n      },\n      {\n        config: createConfig({\n          input: 'transforms-read-write.yaml',\n          output: 'transforms-read-write-ignore',\n          parser: {\n            transforms: {\n              readWrite: false,\n            },\n          },\n          plugins: ['@hey-api/typescript', '@hey-api/client-fetch'],\n        }),\n        description: 'ignores read-only and write-only handling',\n      },\n      {\n        config: createConfig({\n          input: 'transforms-read-write.yaml',\n          output: 'transforms-read-write-custom-name',\n          parser: {\n            transforms: {\n              readWrite: {\n                requests: 'Writable{{name}}',\n                responses: 'Readable{{name}}',\n              },\n            },\n          },\n          plugins: ['@hey-api/typescript', '@hey-api/client-fetch'],\n        }),\n        description: 'custom read-only and write-only naming',\n      },\n      {\n        config: createConfig({\n          input: 'sdk-nested-classes.yaml',\n          output: 'sdk-nested-classes',\n          plugins: [\n            '@hey-api/client-fetch',\n            {\n              asClass: true,\n              classStructure: 'auto',\n              name: '@hey-api/sdk',\n            },\n          ],\n        }),\n        description: 'generate nested classes with auto class structure',\n      },\n      {\n        config: createConfig({\n          input: 'sdk-nested-classes.yaml',\n          output: 'sdk-nested-classes-instance',\n          plugins: [\n            '@hey-api/client-fetch',\n            {\n              asClass: true,\n              classStructure: 'auto',\n              instance: 'NestedSdkWithInstance',\n              name: '@hey-api/sdk',\n            },\n          ],\n        }),\n        description: 'generate nested classes with auto class structure',\n      },\n      {\n        config: createConfig({\n          output: 'fetch',\n          plugins: ['@pinia/colada', '@hey-api/client-fetch'],\n        }),\n        description: 'generate Fetch API client with Pinia Colada plugin',\n      },\n      {\n        config: createConfig({\n          input: 'sdk-instance.yaml',\n          output: 'asClass',\n          plugins: [\n            '@pinia/colada',\n            '@hey-api/client-fetch',\n            {\n              asClass: true,\n              classNameBuilder: '{{name}}Service',\n              name: '@hey-api/sdk',\n            },\n          ],\n        }),\n        description: 'generate Fetch API client with Pinia Colada plugin using class-based SDKs',\n      },\n      {\n        config: createConfig({\n          output: 'default',\n          plugins: ['@angular/common', '@hey-api/client-angular'],\n        }),\n        description: 'generate Angular requests and resources',\n      },\n      {\n        config: createConfig({\n          output: 'default-class',\n          plugins: [\n            {\n              httpRequests: {\n                containerName: '{{name}}ServiceRequests',\n                segmentName: '{{name}}Service',\n                strategy: 'byTags',\n              },\n              httpResources: {\n                containerName: '{{name}}ServiceResources',\n                segmentName: '{{name}}Service',\n                strategy: 'byTags',\n              },\n              name: '@angular/common',\n            },\n            '@hey-api/client-angular',\n          ],\n        }),\n        description: 'generate Angular requests and resources (class)',\n      },\n    ];\n\n    it.each(scenarios)('$description', async ({ config }) => {\n      await createClient(config);\n\n      const filePaths = getFilePaths(config.output);\n\n      await Promise.all(\n        filePaths.map(async (filePath) => {\n          const fileContent = fs.readFileSync(filePath, 'utf-8');\n          await expect(fileContent).toMatchFileSnapshot(\n            path.join(\n              __dirname,\n              '__snapshots__',\n              version,\n              namespace,\n              filePath.slice(outputDir.length + 1),\n            ),\n          );\n        }),\n      );\n    });\n  });\n\n  describe('custom plugin', () => {\n    it('handles a custom plugin', async () => {\n      const myPlugin: DefinePlugin<{\n        customOption: boolean;\n        name: any;\n      }>['Config'] = {\n        api: undefined,\n        config: {\n          customOption: true,\n        },\n        dependencies: ['@hey-api/typescript'],\n        handler: vi.fn(),\n        name: 'my-plugin',\n      };\n\n      await createClient({\n        input: path.join(getSpecsPath(), '3.1.x', 'full.yaml'),\n        logs: {\n          level: 'silent',\n        },\n        output: path.join(outputDir, myPlugin.name, 'default'),\n        plugins: [myPlugin, '@hey-api/client-fetch'],\n      });\n\n      expect(myPlugin.handler).toHaveBeenCalled();\n    });\n\n    // TODO: fix test\n    it.skip('throws on invalid dependency', async () => {\n      const myPlugin: DefinePlugin<{\n        name: any;\n      }>['Config'] = {\n        api: undefined,\n        config: {},\n        dependencies: ['@hey-api/oops'],\n        handler: vi.fn(),\n        name: 'my-plugin',\n      };\n\n      await expect(() =>\n        createClient({\n          input: path.join(getSpecsPath(), '3.1.x', 'full.yaml'),\n          logs: {\n            level: 'silent',\n          },\n          output: path.join(outputDir, myPlugin.name, 'default'),\n          plugins: [myPlugin, '@hey-api/client-fetch'],\n        }),\n      ).rejects.toThrowError(/Found 1 configuration error./g);\n\n      expect(myPlugin.handler).not.toHaveBeenCalled();\n    });\n  });\n}\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/tsconfig/tsconfig.node16.json",
    "content": "{\n  \"extends\": \"../../../tsconfig.base.json\",\n  \"compilerOptions\": {\n    \"declaration\": false,\n    \"moduleResolution\": \"node16\",\n    \"resolveJsonModule\": true,\n    \"skipLibCheck\": true\n  }\n}\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/test/tsconfig/tsconfig.nodenext.json",
    "content": "{\n  \"extends\": \"../../../tsconfig.base.json\",\n  \"compilerOptions\": {\n    \"declaration\": false,\n    \"moduleResolution\": \"nodenext\",\n    \"resolveJsonModule\": true,\n    \"skipLibCheck\": true\n  }\n}\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/tsconfig.json",
    "content": "{\n  \"extends\": \"../tsconfig.base.json\",\n  \"compilerOptions\": {\n    \"allowImportingTsExtensions\": true,\n    \"resolveJsonModule\": true\n  },\n  \"exclude\": [\"test/custom/request.ts\", \"test/generated/**\"],\n  \"references\": [{ \"path\": \"../../openapi-ts\" }]\n}\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/turbo.json",
    "content": "{\n  \"$schema\": \"../../../node_modules/turbo/schema.json\",\n  \"extends\": [\"//\"],\n  \"tasks\": {\n    \"build\": {\n      \"dependsOn\": [],\n      \"outputs\": [\"dist/**\"]\n    }\n  }\n}\n"
  },
  {
    "path": "packages/openapi-ts-tests/main/vitest.setup.ts",
    "content": "import { fileURLToPath } from 'node:url';\n\nimport { beforeAll } from 'vitest';\n\nbeforeAll(() => {\n  process.chdir(fileURLToPath(new URL('.', import.meta.url)));\n});\n"
  },
  {
    "path": "packages/openapi-ts-tests/nestjs/v11/__snapshots__/2.0.x/default/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type { ArrayWithArray, ArrayWithBooleans, ArrayWithNumbers, ArrayWithProperties, ArrayWithReferences, ArrayWithStrings, CallToTestOrderOfParamsData, CallWithDefaultOptionalParametersData, CallWithDefaultParametersData, CallWithDescriptionsData, CallWithDuplicateResponsesData, CallWithDuplicateResponsesError, CallWithDuplicateResponsesErrors, CallWithDuplicateResponsesResponse, CallWithDuplicateResponsesResponses, CallWithNoContentResponseData, CallWithNoContentResponseResponses, CallWithParametersData, CallWithResponseAndNoContentResponseData, CallWithResponseAndNoContentResponseResponse, CallWithResponseAndNoContentResponseResponses, CallWithResponseData, CallWithResponseResponse, CallWithResponseResponses, CallWithResponsesData, CallWithResponsesError, CallWithResponsesErrors, CallWithResponsesResponse, CallWithResponsesResponses, CallWithResultFromHeaderData, CallWithResultFromHeaderErrors, CallWithResultFromHeaderResponses, CallWithWeirdParameterNamesData, ClientOptions, CollectionFormatData, CommentWithBackticks, CommentWithBackticksAndQuotes, CommentWithBreaks, CommentWithExpressionPlaceholders, CommentWithQuotes, CommentWithReservedCharacters, CommentWithSlashes, ComplexTypesData, ComplexTypesErrors, ComplexTypesResponse, ComplexTypesResponses, Date, Default, DeleteCallWithoutParametersAndResponseData, DictionaryWithArray, DictionaryWithDictionary, DictionaryWithProperties, DictionaryWithReference, DictionaryWithString, DummyAData, DummyAResponses, DummyBData, DummyBResponses, DuplicateName2Data, DuplicateName3Data, DuplicateName4Data, DuplicateNameData, EnumFromDescription, EnumWithExtensions, EnumWithNumbers, EnumWithStrings, ExternalRefA, ExternalRefB, ExternalSharedModel, FailureFailure, FooWowData, FooWowResponses, GetCallWithoutParametersAndResponseData, HeadCallWithoutParametersAndResponseData, ModelThatExtends, ModelThatExtendsExtends, ModelWithArray, ModelWithBoolean, ModelWithCircularReference, ModelWithDictionary, ModelWithDuplicateImports, ModelWithDuplicateProperties, ModelWithEnum, ModelWithEnumFromDescription, ModelWithInteger, ModelWithNestedEnums, ModelWithNestedProperties, ModelWithNullableString, ModelWithOrderedProperties, ModelWithPattern, ModelWithPatternWritable, ModelWithProperties, ModelWithPropertiesWritable, ModelWithReference, ModelWithReferenceWritable, ModelWithString, ModelWithStringError, NonAsciiæøåÆøÅöôêÊ字符串Data, NonAsciiæøåÆøÅöôêÊ字符串Response, NonAsciiæøåÆøÅöôêÊ字符串Responses, NonAsciiStringæøåÆøÅöôêÊ字符串, OptionsCallWithoutParametersAndResponseData, ParameterActivityParams, PatchApiVbyApiVersionNoTagData, PatchApiVbyApiVersionNoTagResponses, PatchCallWithoutParametersAndResponseData, PostApiVbyApiVersionBodyData, PostApiVbyApiVersionBodyError, PostApiVbyApiVersionBodyErrors, PostApiVbyApiVersionBodyResponse, PostApiVbyApiVersionBodyResponses, PostCallWithoutParametersAndResponseData, PutCallWithoutParametersAndResponseData, ResponsePostActivityResponse, ServiceWithEmptyTagData, SimpleBoolean, SimpleFile, SimpleInteger, SimpleReference, SimpleString, SimpleStringWithPattern, TestErrorCodeData, TestErrorCodeErrors, TestErrorCodeResponses, TypesData, TypesResponse, TypesResponses } from './types.gen';\n"
  },
  {
    "path": "packages/openapi-ts-tests/nestjs/v11/__snapshots__/2.0.x/default/nestjs.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { CallToTestOrderOfParamsData, CallWithDefaultOptionalParametersData, CallWithDefaultParametersData, CallWithDescriptionsData, CallWithDuplicateResponsesResponse, CallWithParametersData, CallWithResponseAndNoContentResponseResponse, CallWithResponseResponse, CallWithResponsesResponse, CallWithWeirdParameterNamesData, CollectionFormatData, ComplexTypesData, ComplexTypesResponse, NonAsciiæøåÆøÅöôêÊ字符串Data, NonAsciiæøåÆøÅöôêÊ字符串Response, PostApiVbyApiVersionBodyData, PostApiVbyApiVersionBodyResponse, TestErrorCodeData, TypesData, TypesResponse } from './types.gen';\n\nexport type DefaultControllerMethods = {\n    serviceWithEmptyTag: () => Promise<void>;\n    patchApiVbyApiVersionNoTag: () => Promise<void>;\n    fooWow: () => Promise<void>;\n    postApiVbyApiVersionBody: (body: PostApiVbyApiVersionBodyData['body']) => Promise<PostApiVbyApiVersionBodyResponse>;\n};\n\nexport type SimpleControllerMethods = {\n    deleteCallWithoutParametersAndResponse: () => Promise<void>;\n    getCallWithoutParametersAndResponse: () => Promise<void>;\n    headCallWithoutParametersAndResponse: () => Promise<void>;\n    optionsCallWithoutParametersAndResponse: () => Promise<void>;\n    patchCallWithoutParametersAndResponse: () => Promise<void>;\n    postCallWithoutParametersAndResponse: () => Promise<void>;\n    putCallWithoutParametersAndResponse: () => Promise<void>;\n};\n\nexport type DescriptionsControllerMethods = {\n    callWithDescriptions: (query?: CallWithDescriptionsData['query']) => Promise<void>;\n};\n\nexport type ParametersControllerMethods = {\n    callWithParameters: (path: CallWithParametersData['path'], query: CallWithParametersData['query'], headers: CallWithParametersData['headers']) => Promise<void>;\n    callWithWeirdParameterNames: (path: CallWithWeirdParameterNamesData['path'], query: CallWithWeirdParameterNamesData['query'], body: CallWithWeirdParameterNamesData['body'], headers: CallWithWeirdParameterNamesData['headers']) => Promise<void>;\n};\n\nexport type DefaultsControllerMethods = {\n    callWithDefaultParameters: (query: CallWithDefaultParametersData['query']) => Promise<void>;\n    callWithDefaultOptionalParameters: (query?: CallWithDefaultOptionalParametersData['query']) => Promise<void>;\n    callToTestOrderOfParams: (query: CallToTestOrderOfParamsData['query']) => Promise<void>;\n};\n\nexport type DuplicateControllerMethods = {\n    duplicateName: () => Promise<void>;\n    duplicateName2: () => Promise<void>;\n    duplicateName3: () => Promise<void>;\n    duplicateName4: () => Promise<void>;\n};\n\nexport type NoContentControllerMethods = {\n    callWithNoContentResponse: () => Promise<void>;\n};\n\nexport type ResponseControllerMethods = {\n    callWithResponseAndNoContentResponse: () => Promise<CallWithResponseAndNoContentResponseResponse>;\n    callWithResponse: () => Promise<CallWithResponseResponse>;\n    callWithDuplicateResponses: () => Promise<CallWithDuplicateResponsesResponse>;\n    callWithResponses: () => Promise<CallWithResponsesResponse>;\n};\n\nexport type MultipleTags1ControllerMethods = {\n    dummyA: () => Promise<void>;\n    dummyB: () => Promise<void>;\n};\n\nexport type CollectionFormatControllerMethods = {\n    collectionFormat: (query: CollectionFormatData['query']) => Promise<void>;\n};\n\nexport type TypesControllerMethods = {\n    types: (query: TypesData['query'], path?: TypesData['path']) => Promise<TypesResponse>;\n};\n\nexport type ComplexControllerMethods = {\n    complexTypes: (query: ComplexTypesData['query']) => Promise<ComplexTypesResponse>;\n};\n\nexport type HeaderControllerMethods = {\n    callWithResultFromHeader: () => Promise<void>;\n};\n\nexport type ErrorControllerMethods = {\n    testErrorCode: (query: TestErrorCodeData['query']) => Promise<void>;\n};\n\nexport type NonAsciiÆøåÆøÅöôêÊControllerMethods = {\n    nonAsciiæøåÆøÅöôêÊ字符串: (query: NonAsciiæøåÆøÅöôêÊ字符串Data['query']) => Promise<NonAsciiæøåÆøÅöôêÊ字符串Response>;\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/nestjs/v11/__snapshots__/2.0.x/default/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type ClientOptions = {\n    baseUrl: 'http://localhost:3000/base' | (string & {});\n};\n\nexport type ExternalRefA = ExternalSharedModel;\n\nexport type ExternalRefB = ExternalSharedModel;\n\n/**\n * Testing multiline comments in string: First line\n * Second line\n *\n * Fourth line\n */\nexport type CommentWithBreaks = number;\n\n/**\n * Testing backticks in string: `backticks` and ```multiple backticks``` should work\n */\nexport type CommentWithBackticks = number;\n\n/**\n * Testing backticks and quotes in string: `backticks`, 'quotes', \"double quotes\" and ```multiple backticks``` should work\n */\nexport type CommentWithBackticksAndQuotes = number;\n\n/**\n * Testing slashes in string: \\backwards\\\\\\ and /forwards/// should work\n */\nexport type CommentWithSlashes = number;\n\n/**\n * Testing expression placeholders in string: ${expression} should work\n */\nexport type CommentWithExpressionPlaceholders = number;\n\n/**\n * Testing quotes in string: 'single quote''' and \"double quotes\"\"\" should work\n */\nexport type CommentWithQuotes = number;\n\n/**\n * Testing reserved characters in string: * inline * and ** inline ** should work\n */\nexport type CommentWithReservedCharacters = number;\n\n/**\n * This is a simple number\n */\nexport type SimpleInteger = number;\n\n/**\n * This is a simple boolean\n */\nexport type SimpleBoolean = boolean;\n\n/**\n * This is a simple string\n */\nexport type SimpleString = string;\n\n/**\n * A string with non-ascii (unicode) characters valid in typescript identifiers (æøåÆØÅöÔèÈ字符串)\n */\nexport type NonAsciiStringæøåÆøÅöôêÊ字符串 = string;\n\n/**\n * This is a simple file\n */\nexport type SimpleFile = Blob | File;\n\nexport type SimpleReference = ModelWithString;\n\n/**\n * This is a simple string\n */\nexport type SimpleStringWithPattern = string;\n\n/**\n * This is a simple enum with strings\n */\nexport type EnumWithStrings = 'Success' | 'Warning' | 'Error' | '\\'Single Quote\\'' | '\"Double Quotes\"' | 'Non-ascii: øæåôöØÆÅÔÖ字符串';\n\n/**\n * This is a simple enum with numbers\n */\nexport type EnumWithNumbers = 1 | 2 | 3 | 1.1 | 1.2 | 1.3 | 100 | 200 | 300 | -100 | -200 | -300 | -1.1 | -1.2 | -1.3;\n\n/**\n * Success=1,Warning=2,Error=3\n */\nexport type EnumFromDescription = number;\n\n/**\n * This is a simple enum with numbers\n */\nexport type EnumWithExtensions = 200 | 400 | 500;\n\n/**\n * This is a simple array with numbers\n */\nexport type ArrayWithNumbers = Array<number>;\n\n/**\n * This is a simple array with booleans\n */\nexport type ArrayWithBooleans = Array<boolean>;\n\n/**\n * This is a simple array with strings\n */\nexport type ArrayWithStrings = Array<string>;\n\n/**\n * This is a simple array with references\n */\nexport type ArrayWithReferences = Array<ModelWithString>;\n\n/**\n * This is a simple array containing an array\n */\nexport type ArrayWithArray = Array<Array<ModelWithString>>;\n\n/**\n * This is a simple array with properties\n */\nexport type ArrayWithProperties = Array<{\n    foo?: string;\n    bar?: string;\n}>;\n\n/**\n * This is a string dictionary\n */\nexport type DictionaryWithString = {\n    [key: string]: string;\n};\n\n/**\n * This is a string reference\n */\nexport type DictionaryWithReference = {\n    [key: string]: ModelWithString;\n};\n\n/**\n * This is a complex dictionary\n */\nexport type DictionaryWithArray = {\n    [key: string]: Array<ModelWithString>;\n};\n\n/**\n * This is a string dictionary\n */\nexport type DictionaryWithDictionary = {\n    [key: string]: {\n        [key: string]: string;\n    };\n};\n\n/**\n * This is a complex dictionary\n */\nexport type DictionaryWithProperties = {\n    [key: string]: {\n        foo?: string;\n        bar?: string;\n    };\n};\n\n/**\n * This is a type-only model that defines Date as a string\n */\nexport type Date = string;\n\n/**\n * This is a model with one number property\n */\nexport type ModelWithInteger = {\n    /**\n     * This is a simple number property\n     */\n    prop?: number;\n};\n\n/**\n * This is a model with one boolean property\n */\nexport type ModelWithBoolean = {\n    /**\n     * This is a simple boolean property\n     */\n    prop?: boolean;\n};\n\n/**\n * This is a model with one string property\n */\nexport type ModelWithString = {\n    /**\n     * This is a simple string property\n     */\n    prop?: string;\n};\n\n/**\n * This is a model with one string property\n */\nexport type ModelWithStringError = {\n    /**\n     * This is a simple string property\n     */\n    prop?: string;\n};\n\n/**\n * This is a model with one string property\n */\nexport type ModelWithNullableString = {\n    /**\n     * This is a simple string property\n     */\n    nullableProp?: string | null;\n    /**\n     * This is a simple string property\n     */\n    nullableRequiredProp: string | null;\n};\n\n/**\n * This is a model with one enum\n */\nexport type ModelWithEnum = {\n    /**\n     * This is a simple enum with strings\n     */\n    test?: 'Success' | 'Warning' | 'Error' | 'ØÆÅ字符串';\n    /**\n     * These are the HTTP error code enums\n     */\n    statusCode?: '100' | '200 FOO' | '300 FOO_BAR' | '400 foo-bar' | '500 foo.bar' | '600 foo&bar';\n    /**\n     * Simple boolean enum\n     */\n    bool?: true;\n};\n\n/**\n * This is a model with one enum\n */\nexport type ModelWithEnumFromDescription = {\n    /**\n     * Success=1,Warning=2,Error=3\n     */\n    test?: number;\n};\n\n/**\n * This is a model with nested enums\n */\nexport type ModelWithNestedEnums = {\n    dictionaryWithEnum?: {\n        [key: string]: 'Success' | 'Warning' | 'Error';\n    };\n    dictionaryWithEnumFromDescription?: {\n        [key: string]: number;\n    };\n    arrayWithEnum?: Array<'Success' | 'Warning' | 'Error'>;\n    arrayWithDescription?: Array<number>;\n};\n\n/**\n * This is a model with one property containing a reference\n */\nexport type ModelWithReference = {\n    prop?: ModelWithProperties;\n};\n\n/**\n * This is a model with one property containing an array\n */\nexport type ModelWithArray = {\n    prop?: Array<ModelWithString>;\n    propWithFile?: Array<Blob | File>;\n    propWithNumber?: Array<number>;\n};\n\n/**\n * This is a model with one property containing a dictionary\n */\nexport type ModelWithDictionary = {\n    prop?: {\n        [key: string]: string;\n    };\n};\n\n/**\n * This is a model with one property containing a circular reference\n */\nexport type ModelWithCircularReference = {\n    prop?: ModelWithCircularReference;\n};\n\n/**\n * This is a model with one nested property\n */\nexport type ModelWithProperties = {\n    required: string;\n    readonly requiredAndReadOnly: string;\n    string?: string;\n    number?: number;\n    boolean?: boolean;\n    reference?: ModelWithString;\n    'property with space'?: string;\n    default?: string;\n    try?: string;\n    readonly '@namespace.string'?: string;\n    readonly '@namespace.integer'?: number;\n};\n\n/**\n * This is a model with one nested property\n */\nexport type ModelWithNestedProperties = {\n    readonly first: {\n        readonly second: {\n            readonly third: string;\n        };\n    };\n};\n\n/**\n * This is a model with duplicated properties\n */\nexport type ModelWithDuplicateProperties = {\n    prop?: ModelWithString;\n};\n\n/**\n * This is a model with ordered properties\n */\nexport type ModelWithOrderedProperties = {\n    zebra?: string;\n    apple?: string;\n    hawaii?: string;\n};\n\n/**\n * This is a model with duplicated imports\n */\nexport type ModelWithDuplicateImports = {\n    propA?: ModelWithString;\n    propB?: ModelWithString;\n    propC?: ModelWithString;\n};\n\n/**\n * This is a model that extends another model\n */\nexport type ModelThatExtends = ModelWithString & {\n    propExtendsA?: string;\n    propExtendsB?: ModelWithString;\n};\n\n/**\n * This is a model that extends another model\n */\nexport type ModelThatExtendsExtends = ModelWithString & ModelThatExtends & {\n    propExtendsC?: string;\n    propExtendsD?: ModelWithString;\n};\n\nexport type Default = {\n    name?: string;\n};\n\n/**\n * This is a model that contains a some patterns\n */\nexport type ModelWithPattern = {\n    key: string;\n    name: string;\n    readonly enabled?: boolean;\n    readonly modified?: string;\n    id?: string;\n    text?: string;\n    patternWithSingleQuotes?: string;\n    patternWithNewline?: string;\n    patternWithBacktick?: string;\n    patternWithUnicode?: string;\n};\n\nexport type ParameterActivityParams = {\n    description?: string;\n    graduate_id?: number;\n    organization_id?: number;\n    parent_activity?: number;\n    post_id?: number;\n};\n\nexport type ResponsePostActivityResponse = {\n    description?: string;\n    graduate_id?: number;\n    organization_id?: number;\n    parent_activity_id?: number;\n    post_id?: number;\n};\n\nexport type FailureFailure = {\n    error?: string;\n    message?: string;\n    reference_code?: string;\n};\n\nexport type ExternalSharedModel = {\n    id: string;\n    name?: string;\n};\n\n/**\n * This is a model with one property containing a reference\n */\nexport type ModelWithReferenceWritable = {\n    prop?: ModelWithPropertiesWritable;\n};\n\n/**\n * This is a model with one nested property\n */\nexport type ModelWithPropertiesWritable = {\n    required: string;\n    string?: string;\n    number?: number;\n    boolean?: boolean;\n    reference?: ModelWithString;\n    'property with space'?: string;\n    default?: string;\n    try?: string;\n};\n\n/**\n * This is a model that contains a some patterns\n */\nexport type ModelWithPatternWritable = {\n    key: string;\n    name: string;\n    id?: string;\n    text?: string;\n    patternWithSingleQuotes?: string;\n    patternWithNewline?: string;\n    patternWithBacktick?: string;\n    patternWithUnicode?: string;\n};\n\nexport type ServiceWithEmptyTagData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no+tag';\n};\n\nexport type PatchApiVbyApiVersionNoTagData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no+tag';\n};\n\nexport type PatchApiVbyApiVersionNoTagResponses = {\n    /**\n     * OK\n     */\n    default: unknown;\n};\n\nexport type FooWowData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no+tag';\n};\n\nexport type FooWowResponses = {\n    /**\n     * OK\n     */\n    default: unknown;\n};\n\nexport type DeleteCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type GetCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type HeadCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type OptionsCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type PatchCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type PostCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type PutCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type CallWithDescriptionsData = {\n    body?: never;\n    path?: never;\n    query?: {\n        /**\n         * Testing multiline comments in string: First line\n         * Second line\n         *\n         * Fourth line\n         */\n        parameterWithBreaks?: string;\n        /**\n         * Testing backticks in string: `backticks` and ```multiple backticks``` should work\n         */\n        parameterWithBackticks?: string;\n        /**\n         * Testing slashes in string: \\backwards\\\\\\ and /forwards/// should work\n         */\n        parameterWithSlashes?: string;\n        /**\n         * Testing expression placeholders in string: ${expression} should work\n         */\n        parameterWithExpressionPlaceholders?: string;\n        /**\n         * Testing quotes in string: 'single quote''' and \"double quotes\"\"\" should work\n         */\n        parameterWithQuotes?: string;\n        /**\n         * Testing reserved characters in string: * inline * and ** inline ** should work\n         */\n        parameterWithReservedCharacters?: string;\n    };\n    url: '/api/v{api-version}/descriptions/';\n};\n\nexport type CallWithParametersData = {\n    body?: never;\n    headers: {\n        /**\n         * This is the parameter that goes into the header\n         */\n        parameterHeader: string;\n    };\n    path: {\n        /**\n         * This is the parameter that goes into the path\n         */\n        parameterPath: string;\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string;\n    };\n    query: {\n        /**\n         * This is the parameter that goes into the query params\n         */\n        parameterQuery: string;\n    };\n    url: '/api/v{api-version}/parameters/{parameterPath}';\n};\n\nexport type CallWithWeirdParameterNamesData = {\n    /**\n     * This is the parameter that is sent as request body\n     */\n    body: string;\n    headers: {\n        /**\n         * This is the parameter that goes into the request header\n         */\n        'parameter.header': string;\n    };\n    path: {\n        /**\n         * This is the parameter that goes into the path\n         */\n        'parameter.path.1'?: string;\n        /**\n         * This is the parameter that goes into the path\n         */\n        'parameter-path-2'?: string;\n        /**\n         * This is the parameter that goes into the path\n         */\n        'PARAMETER-PATH-3'?: string;\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string;\n    };\n    query: {\n        /**\n         * This is the parameter with a reserved keyword\n         */\n        default?: string;\n        /**\n         * This is the parameter that goes into the request query params\n         */\n        'parameter-query': string;\n    };\n    url: '/api/v{api-version}/parameters/{parameter.path.1}/{parameter-path-2}/{PARAMETER-PATH-3}';\n};\n\nexport type CallWithDefaultParametersData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * This is a simple string with default value\n         */\n        parameterString: string;\n        /**\n         * This is a simple number with default value\n         */\n        parameterNumber: number;\n        /**\n         * This is a simple boolean with default value\n         */\n        parameterBoolean: boolean;\n        /**\n         * This is a simple enum with default value\n         */\n        parameterEnum: 'Success' | 'Warning' | 'Error';\n        /**\n         * This is a model with one string property\n         */\n        parameterModel: {\n            /**\n             * This is a simple string property\n             */\n            prop?: string;\n        };\n    };\n    url: '/api/v{api-version}/defaults';\n};\n\nexport type CallWithDefaultOptionalParametersData = {\n    body?: never;\n    path?: never;\n    query?: {\n        /**\n         * This is a simple string that is optional with default value\n         */\n        parameterString?: string;\n        /**\n         * This is a simple number that is optional with default value\n         */\n        parameterNumber?: number;\n        /**\n         * This is a simple boolean that is optional with default value\n         */\n        parameterBoolean?: boolean;\n        /**\n         * This is a simple enum that is optional with default value\n         */\n        parameterEnum?: 'Success' | 'Warning' | 'Error';\n    };\n    url: '/api/v{api-version}/defaults';\n};\n\nexport type CallToTestOrderOfParamsData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * This is a optional string with default\n         */\n        parameterOptionalStringWithDefault?: string;\n        /**\n         * This is a optional string with empty default\n         */\n        parameterOptionalStringWithEmptyDefault?: string;\n        /**\n         * This is a optional string with no default\n         */\n        parameterOptionalStringWithNoDefault?: string;\n        /**\n         * This is a string with default\n         */\n        parameterStringWithDefault: string;\n        /**\n         * This is a string with empty default\n         */\n        parameterStringWithEmptyDefault: string;\n        /**\n         * This is a string with no default\n         */\n        parameterStringWithNoDefault: string;\n        /**\n         * This is a string that can be null with no default\n         */\n        parameterStringNullableWithNoDefault?: string | null;\n        /**\n         * This is a string that can be null with default\n         */\n        parameterStringNullableWithDefault?: string | null;\n    };\n    url: '/api/v{api-version}/defaults';\n};\n\nexport type DuplicateNameData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/duplicate';\n};\n\nexport type DuplicateName2Data = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/duplicate';\n};\n\nexport type DuplicateName3Data = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/duplicate';\n};\n\nexport type DuplicateName4Data = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/duplicate';\n};\n\nexport type CallWithNoContentResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no-content';\n};\n\nexport type CallWithNoContentResponseResponses = {\n    /**\n     * Success\n     */\n    204: unknown;\n};\n\nexport type CallWithResponseAndNoContentResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multiple-tags/response-and-no-content';\n};\n\nexport type CallWithResponseAndNoContentResponseResponses = {\n    /**\n     * Response is a simple number\n     */\n    200: number;\n    /**\n     * Success\n     */\n    204: unknown;\n};\n\nexport type CallWithResponseAndNoContentResponseResponse = CallWithResponseAndNoContentResponseResponses[keyof CallWithResponseAndNoContentResponseResponses];\n\nexport type DummyAData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multiple-tags/a';\n};\n\nexport type DummyAResponses = {\n    /**\n     * Success\n     */\n    204: unknown;\n};\n\nexport type DummyBData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multiple-tags/b';\n};\n\nexport type DummyBResponses = {\n    /**\n     * Success\n     */\n    204: unknown;\n};\n\nexport type CallWithResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/response';\n};\n\nexport type CallWithResponseResponses = {\n    /**\n     * Message for default response\n     */\n    default: ModelWithString;\n};\n\nexport type CallWithResponseResponse = CallWithResponseResponses[keyof CallWithResponseResponses];\n\nexport type CallWithDuplicateResponsesData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/response';\n};\n\nexport type CallWithDuplicateResponsesErrors = {\n    /**\n     * Message for 500 error\n     */\n    500: ModelWithStringError;\n    /**\n     * Message for 501 error\n     */\n    501: ModelWithStringError;\n    /**\n     * Message for 502 error\n     */\n    502: ModelWithStringError;\n    /**\n     * Message for default response\n     */\n    default: ModelWithString;\n};\n\nexport type CallWithDuplicateResponsesError = CallWithDuplicateResponsesErrors[keyof CallWithDuplicateResponsesErrors];\n\nexport type CallWithDuplicateResponsesResponses = {\n    /**\n     * Message for 201 response\n     */\n    201: ModelWithString;\n    /**\n     * Message for 202 response\n     */\n    202: ModelWithString;\n};\n\nexport type CallWithDuplicateResponsesResponse = CallWithDuplicateResponsesResponses[keyof CallWithDuplicateResponsesResponses];\n\nexport type CallWithResponsesData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/response';\n};\n\nexport type CallWithResponsesErrors = {\n    /**\n     * Message for 500 error\n     */\n    500: ModelWithStringError;\n    /**\n     * Message for 501 error\n     */\n    501: ModelWithStringError;\n    /**\n     * Message for 502 error\n     */\n    502: ModelWithStringError;\n    /**\n     * Message for default response\n     */\n    default: ModelWithString;\n};\n\nexport type CallWithResponsesError = CallWithResponsesErrors[keyof CallWithResponsesErrors];\n\nexport type CallWithResponsesResponses = {\n    /**\n     * Message for 200 response\n     */\n    200: {\n        readonly '@namespace.string'?: string;\n        readonly '@namespace.integer'?: number;\n        readonly value?: Array<ModelWithString>;\n    };\n    /**\n     * Message for 201 response\n     */\n    201: ModelThatExtends;\n    /**\n     * Message for 202 response\n     */\n    202: ModelThatExtendsExtends;\n};\n\nexport type CallWithResponsesResponse = CallWithResponsesResponses[keyof CallWithResponsesResponses];\n\nexport type CollectionFormatData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * This is an array parameter that is sent as csv format (comma-separated values)\n         */\n        parameterArrayCSV: Array<string>;\n        /**\n         * This is an array parameter that is sent as ssv format (space-separated values)\n         */\n        parameterArraySSV: Array<string>;\n        /**\n         * This is an array parameter that is sent as tsv format (tab-separated values)\n         */\n        parameterArrayTSV: Array<string>;\n        /**\n         * This is an array parameter that is sent as pipes format (pipe-separated values)\n         */\n        parameterArrayPipes: Array<string>;\n        /**\n         * This is an array parameter that is sent as multi format (multiple parameter instances)\n         */\n        parameterArrayMulti: Array<string>;\n    };\n    url: '/api/v{api-version}/collectionFormat';\n};\n\nexport type TypesData = {\n    body?: never;\n    path?: {\n        /**\n         * This is a number parameter\n         */\n        id?: number;\n    };\n    query: {\n        /**\n         * This is a number parameter\n         */\n        parameterNumber: number;\n        /**\n         * This is a string parameter\n         */\n        parameterString: string;\n        /**\n         * This is a boolean parameter\n         */\n        parameterBoolean: boolean;\n        /**\n         * This is an array parameter\n         */\n        parameterArray: Array<string>;\n        /**\n         * This is a dictionary parameter\n         */\n        parameterDictionary: {\n            [key: string]: unknown;\n        };\n        /**\n         * This is an enum parameter\n         */\n        parameterEnum: 'Success' | 'Warning' | 'Error';\n    };\n    url: '/api/v{api-version}/types';\n};\n\nexport type TypesResponses = {\n    /**\n     * Response is a simple number\n     */\n    200: number;\n    /**\n     * Response is a simple string\n     */\n    201: string;\n    /**\n     * Response is a simple boolean\n     */\n    202: boolean;\n    /**\n     * Response is a simple object\n     */\n    203: {\n        [key: string]: unknown;\n    };\n};\n\nexport type TypesResponse = TypesResponses[keyof TypesResponses];\n\nexport type ComplexTypesData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * Parameter containing object\n         */\n        parameterObject: {\n            first?: {\n                second?: {\n                    third?: string;\n                };\n            };\n        };\n        /**\n         * This is a model with one string property\n         */\n        parameterReference: {\n            /**\n             * This is a simple string property\n             */\n            prop?: string;\n        };\n    };\n    url: '/api/v{api-version}/complex';\n};\n\nexport type ComplexTypesErrors = {\n    /**\n     * 400 server error\n     */\n    400: unknown;\n    /**\n     * 500 server error\n     */\n    500: unknown;\n};\n\nexport type ComplexTypesResponses = {\n    /**\n     * Successful response\n     */\n    200: Array<ModelWithString>;\n};\n\nexport type ComplexTypesResponse = ComplexTypesResponses[keyof ComplexTypesResponses];\n\nexport type CallWithResultFromHeaderData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/header';\n};\n\nexport type CallWithResultFromHeaderErrors = {\n    /**\n     * 400 server error\n     */\n    400: unknown;\n    /**\n     * 500 server error\n     */\n    500: unknown;\n};\n\nexport type CallWithResultFromHeaderResponses = {\n    /**\n     * Successful response\n     */\n    200: unknown;\n};\n\nexport type TestErrorCodeData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * Status code to return\n         */\n        status: string;\n    };\n    url: '/api/v{api-version}/error';\n};\n\nexport type TestErrorCodeErrors = {\n    /**\n     * Custom message: Internal Server Error\n     */\n    500: unknown;\n    /**\n     * Custom message: Not Implemented\n     */\n    501: unknown;\n    /**\n     * Custom message: Bad Gateway\n     */\n    502: unknown;\n    /**\n     * Custom message: Service Unavailable\n     */\n    503: unknown;\n};\n\nexport type TestErrorCodeResponses = {\n    /**\n     * Custom message: Successful response\n     */\n    200: unknown;\n};\n\nexport type NonAsciiæøåÆøÅöôêÊ字符串Data = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * Dummy input param\n         */\n        nonAsciiParamæøåÆØÅöôêÊ: number;\n    };\n    url: '/api/v{api-version}/non-ascii-æøåÆØÅöôêÊ字符串';\n};\n\nexport type NonAsciiæøåÆøÅöôêÊ字符串Responses = {\n    /**\n     * Successful response\n     */\n    200: NonAsciiStringæøåÆøÅöôêÊ字符串;\n};\n\nexport type NonAsciiæøåÆøÅöôêÊ字符串Response = NonAsciiæøåÆøÅöôêÊ字符串Responses[keyof NonAsciiæøåÆøÅöôêÊ字符串Responses];\n\nexport type PostApiVbyApiVersionBodyData = {\n    /**\n     * Body should not be unknown\n     */\n    body: ParameterActivityParams;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/body';\n};\n\nexport type PostApiVbyApiVersionBodyErrors = {\n    /**\n     * Bad Request\n     */\n    400: FailureFailure;\n    /**\n     * Internal Server Error\n     */\n    500: FailureFailure;\n};\n\nexport type PostApiVbyApiVersionBodyError = PostApiVbyApiVersionBodyErrors[keyof PostApiVbyApiVersionBodyErrors];\n\nexport type PostApiVbyApiVersionBodyResponses = {\n    /**\n     * OK\n     */\n    200: ResponsePostActivityResponse;\n};\n\nexport type PostApiVbyApiVersionBodyResponse = PostApiVbyApiVersionBodyResponses[keyof PostApiVbyApiVersionBodyResponses];\n"
  },
  {
    "path": "packages/openapi-ts-tests/nestjs/v11/__snapshots__/3.0.x/default/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type { _3eNum1Период, _400, AdditionalPropertiesIntegerIssue, AdditionalPropertiesUnknownIssue, AdditionalPropertiesUnknownIssue2, AdditionalPropertiesUnknownIssue3, AdditionalPropertiesUnknownIssueWritable, AnyOfAnyAndNull, AnyOfArrays, ApiVVersionODataControllerCountData, ApiVVersionODataControllerCountResponse, ApiVVersionODataControllerCountResponses, ArrayWithAnyOfProperties, ArrayWithArray, ArrayWithBooleans, ArrayWithNumbers, ArrayWithProperties, ArrayWithReferences, ArrayWithStrings, CallToTestOrderOfParamsData, CallWithDefaultOptionalParametersData, CallWithDefaultParametersData, CallWithDescriptionsData, CallWithDuplicateResponsesData, CallWithDuplicateResponsesError, CallWithDuplicateResponsesErrors, CallWithDuplicateResponsesResponse, CallWithDuplicateResponsesResponses, CallWithNoContentResponseData, CallWithNoContentResponseResponse, CallWithNoContentResponseResponses, CallWithParametersData, CallWithResponseAndNoContentResponseData, CallWithResponseAndNoContentResponseResponse, CallWithResponseAndNoContentResponseResponses, CallWithResponseData, CallWithResponseResponse, CallWithResponseResponses, CallWithResponsesData, CallWithResponsesError, CallWithResponsesErrors, CallWithResponsesResponse, CallWithResponsesResponses, CallWithResultFromHeaderData, CallWithResultFromHeaderErrors, CallWithResultFromHeaderResponses, CallWithWeirdParameterNamesData, CamelCaseCommentWithBreaks, CharactersInDescription, ClientOptions, CollectionFormatData, CommentWithBackticks, CommentWithBackticksAndQuotes, CommentWithBreaks, CommentWithExpressionPlaceholders, CommentWithQuotes, CommentWithReservedCharacters, CommentWithSlashes, ComplexParamsData, ComplexParamsResponse, ComplexParamsResponses, ComplexTypesData, ComplexTypesErrors, ComplexTypesResponse, ComplexTypesResponses, CompositionBaseModel, CompositionExtendedModel, CompositionWithAllOfAndNullable, CompositionWithAnyOf, CompositionWithAnyOfAndNullable, CompositionWithAnyOfAnonymous, CompositionWithNestedAnyAndTypeNull, CompositionWithNestedAnyOfAndNull, CompositionWithOneOf, CompositionWithOneOfAndComplexArrayDictionary, CompositionWithOneOfAndNullable, CompositionWithOneOfAndProperties, CompositionWithOneOfAndSimpleArrayDictionary, CompositionWithOneOfAndSimpleDictionary, CompositionWithOneOfAnonymous, CompositionWithOneOfDiscriminator, ConstValue, Default, DeleteCallWithoutParametersAndResponseData, DeleteFooData, DeleteFooData2, DeleteFooData3, DeprecatedCallData, DeprecatedModel, DictionaryWithArray, DictionaryWithDictionary, DictionaryWithProperties, DictionaryWithPropertiesAndAdditionalProperties, DictionaryWithReference, DictionaryWithString, DummyAData, DummyAResponse, DummyAResponses, DummyBData, DummyBResponse, DummyBResponses, DuplicateName2Data, DuplicateName3Data, DuplicateName4Data, DuplicateNameData, EnumFromDescription, EnumWithExtensions, EnumWithNumbers, EnumWithReplacedCharacters, EnumWithStrings, EnumWithXEnumNames, ExportData, ExternalRefA, ExternalRefB, ExternalSharedModel, File, FileResponseData, FileResponseResponse, FileResponseResponses, FileWritable, FooWowData, FooWowResponses, FreeFormObjectWithAdditionalPropertiesEqEmptyObject, FreeFormObjectWithAdditionalPropertiesEqTrue, FreeFormObjectWithoutAdditionalProperties, GenericSchemaDuplicateIssue1SystemBoolean, GenericSchemaDuplicateIssue1SystemBooleanWritable, GenericSchemaDuplicateIssue1SystemString, GenericSchemaDuplicateIssue1SystemStringWritable, GetApiVbyApiVersionSimpleOperationData, GetApiVbyApiVersionSimpleOperationError, GetApiVbyApiVersionSimpleOperationErrors, GetApiVbyApiVersionSimpleOperationResponse, GetApiVbyApiVersionSimpleOperationResponses, GetCallWithOptionalParamData, GetCallWithoutParametersAndResponseData, HeadCallWithoutParametersAndResponseData, Import, ImportData, ImportResponse, ImportResponses, IoK8sApimachineryPkgApisMetaV1DeleteOptions, IoK8sApimachineryPkgApisMetaV1Preconditions, ModelCircle, ModelFromZendesk, ModelSquare, ModelThatExtends, ModelThatExtendsExtends, ModelWithAdditionalPropertiesEqTrue, ModelWithAdditionalPropertiesRef, ModelWithAnyOfConstantSizeArray, ModelWithAnyOfConstantSizeArrayAndIntersect, ModelWithAnyOfConstantSizeArrayNullable, ModelWithAnyOfConstantSizeArrayWithNSizeAndOptions, ModelWithAnyOfConstantSizeArrayWithNSizeAndOptionsWritable, ModelWithArray, ModelWithArrayReadOnlyAndWriteOnly, ModelWithArrayReadOnlyAndWriteOnlyWritable, ModelWithBackticksInDescription, ModelWithBoolean, ModelWithCircularReference, ModelWithConst, ModelWithConstantSizeArray, ModelWithDictionary, ModelWithDuplicateImports, ModelWithDuplicateProperties, ModelWithEnum, ModelWithEnumFromDescription, ModelWithEnumWithHyphen, ModelWithInteger, ModelWithNestedArrayEnums, ModelWithNestedArrayEnumsData, ModelWithNestedArrayEnumsDataBar, ModelWithNestedArrayEnumsDataFoo, ModelWithNestedCompositionEnums, ModelWithNestedEnums, ModelWithNestedProperties, ModelWithNullableObject, ModelWithNullableString, ModelWithNumericEnumUnion, ModelWithOneOfAndProperties, ModelWithOneOfEnum, ModelWithOrderedProperties, ModelWithPattern, ModelWithPatternWritable, ModelWithPrefixItemsConstantSizeArray, ModelWithProperties, ModelWithPropertiesWritable, ModelWithReadOnlyAndWriteOnly, ModelWithReadOnlyAndWriteOnlyWritable, ModelWithReference, ModelWithReferenceWritable, ModelWithString, ModelWithStringError, MultipartRequestData, MultipartResponseData, MultipartResponseResponse, MultipartResponseResponses, NestedAnyOfArraysNullable, NonAsciiæøåÆøÅöôêÊ字符串Data, NonAsciiæøåÆøÅöôêÊ字符串Response, NonAsciiæøåÆøÅöôêÊ字符串Responses, NonAsciiStringæøåÆøÅöôêÊ字符串, NullableObject, OneOfAllOfIssue, OneOfAllOfIssueWritable, OptionsCallWithoutParametersAndResponseData, Pageable, ParameterSimpleParameterUnused, PatchApiVbyApiVersionNoTagData, PatchApiVbyApiVersionNoTagResponses, PatchCallWithoutParametersAndResponseData, PostApiVbyApiVersionFormDataData, PostApiVbyApiVersionRequestBodyData, PostCallWithOptionalParamData, PostCallWithOptionalParamResponse, PostCallWithOptionalParamResponses, PostCallWithoutParametersAndResponseData, PostServiceWithEmptyTagResponse, PostServiceWithEmptyTagResponse2, PutCallWithoutParametersAndResponseData, PutWithFormUrlEncodedData, SchemaWithFormRestrictedKeys, SimpleBoolean, SimpleFile, SimpleFormData, SimpleInteger, SimpleParameter, SimpleReference, SimpleRequestBody, SimpleString, SimpleStringWithPattern, TestErrorCodeData, TestErrorCodeErrors, TestErrorCodeResponses, TypesData, TypesResponse, TypesResponses, UploadFileData, UploadFileResponse, UploadFileResponses, XFooBar } from './types.gen';\n"
  },
  {
    "path": "packages/openapi-ts-tests/nestjs/v11/__snapshots__/3.0.x/default/nestjs.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { ApiVVersionODataControllerCountResponse, CallToTestOrderOfParamsData, CallWithDefaultOptionalParametersData, CallWithDefaultParametersData, CallWithDescriptionsData, CallWithDuplicateResponsesResponse, CallWithNoContentResponseResponse, CallWithParametersData, CallWithResponseAndNoContentResponseResponse, CallWithResponseResponse, CallWithResponsesResponse, CallWithWeirdParameterNamesData, CollectionFormatData, ComplexParamsData, ComplexParamsResponse, ComplexTypesData, ComplexTypesResponse, DeleteFooData3, DeprecatedCallData, DummyAResponse, DummyBResponse, FileResponseData, FileResponseResponse, GetApiVbyApiVersionSimpleOperationData, GetApiVbyApiVersionSimpleOperationResponse, GetCallWithOptionalParamData, ImportData, ImportResponse, MultipartRequestData, MultipartResponseResponse, NonAsciiæøåÆøÅöôêÊ字符串Data, NonAsciiæøåÆøÅöôêÊ字符串Response, PostApiVbyApiVersionFormDataData, PostApiVbyApiVersionRequestBodyData, PostCallWithOptionalParamData, PostCallWithOptionalParamResponse, PutWithFormUrlEncodedData, TestErrorCodeData, TypesData, TypesResponse, UploadFileData, UploadFileResponse } from './types.gen';\n\nexport type DefaultControllerMethods = {\n    export: () => Promise<void>;\n    patchApiVbyApiVersionNoTag: () => Promise<void>;\n    import: (body: ImportData['body']) => Promise<ImportResponse>;\n    fooWow: () => Promise<void>;\n    getApiVbyApiVersionSimpleOperation: (path: GetApiVbyApiVersionSimpleOperationData['path']) => Promise<GetApiVbyApiVersionSimpleOperationResponse>;\n};\n\nexport type SimpleControllerMethods = {\n    apiVVersionODataControllerCount: () => Promise<ApiVVersionODataControllerCountResponse>;\n    deleteCallWithoutParametersAndResponse: () => Promise<void>;\n    getCallWithoutParametersAndResponse: () => Promise<void>;\n    headCallWithoutParametersAndResponse: () => Promise<void>;\n    optionsCallWithoutParametersAndResponse: () => Promise<void>;\n    patchCallWithoutParametersAndResponse: () => Promise<void>;\n    postCallWithoutParametersAndResponse: () => Promise<void>;\n    putCallWithoutParametersAndResponse: () => Promise<void>;\n};\n\nexport type ParametersControllerMethods = {\n    deleteFoo: (path: DeleteFooData3['path'], headers: DeleteFooData3['headers']) => Promise<void>;\n    callWithParameters: (path: CallWithParametersData['path'], query: CallWithParametersData['query'], body: CallWithParametersData['body'], headers: CallWithParametersData['headers']) => Promise<void>;\n    callWithWeirdParameterNames: (path: CallWithWeirdParameterNamesData['path'], query: CallWithWeirdParameterNamesData['query'], body: CallWithWeirdParameterNamesData['body'], headers: CallWithWeirdParameterNamesData['headers']) => Promise<void>;\n    getCallWithOptionalParam: (body: GetCallWithOptionalParamData['body'], query?: GetCallWithOptionalParamData['query']) => Promise<void>;\n    postCallWithOptionalParam: (query: PostCallWithOptionalParamData['query'], body?: PostCallWithOptionalParamData['body']) => Promise<PostCallWithOptionalParamResponse>;\n};\n\nexport type DescriptionsControllerMethods = {\n    callWithDescriptions: (query?: CallWithDescriptionsData['query']) => Promise<void>;\n};\n\nexport type DeprecatedControllerMethods = {\n    deprecatedCall: (headers: DeprecatedCallData['headers']) => Promise<void>;\n};\n\nexport type RequestBodyControllerMethods = {\n    postApiVbyApiVersionRequestBody: (query?: PostApiVbyApiVersionRequestBodyData['query'], body?: PostApiVbyApiVersionRequestBodyData['body']) => Promise<void>;\n};\n\nexport type FormDataControllerMethods = {\n    postApiVbyApiVersionFormData: (query?: PostApiVbyApiVersionFormDataData['query'], body?: PostApiVbyApiVersionFormDataData['body']) => Promise<void>;\n};\n\nexport type DefaultsControllerMethods = {\n    callWithDefaultParameters: (query?: CallWithDefaultParametersData['query']) => Promise<void>;\n    callWithDefaultOptionalParameters: (query?: CallWithDefaultOptionalParametersData['query']) => Promise<void>;\n    callToTestOrderOfParams: (query: CallToTestOrderOfParamsData['query']) => Promise<void>;\n};\n\nexport type DuplicateControllerMethods = {\n    duplicateName: () => Promise<void>;\n    duplicateName2: () => Promise<void>;\n    duplicateName3: () => Promise<void>;\n    duplicateName4: () => Promise<void>;\n};\n\nexport type NoContentControllerMethods = {\n    callWithNoContentResponse: () => Promise<CallWithNoContentResponseResponse>;\n};\n\nexport type ResponseControllerMethods = {\n    callWithResponseAndNoContentResponse: () => Promise<CallWithResponseAndNoContentResponseResponse>;\n    callWithResponse: () => Promise<CallWithResponseResponse>;\n    callWithDuplicateResponses: () => Promise<CallWithDuplicateResponsesResponse>;\n    callWithResponses: () => Promise<CallWithResponsesResponse>;\n};\n\nexport type MultipleTags1ControllerMethods = {\n    dummyA: () => Promise<DummyAResponse>;\n    dummyB: () => Promise<DummyBResponse>;\n};\n\nexport type CollectionFormatControllerMethods = {\n    collectionFormat: (query: CollectionFormatData['query']) => Promise<void>;\n};\n\nexport type TypesControllerMethods = {\n    types: (query: TypesData['query'], path?: TypesData['path']) => Promise<TypesResponse>;\n};\n\nexport type UploadControllerMethods = {\n    uploadFile: (path: UploadFileData['path'], body: UploadFileData['body']) => Promise<UploadFileResponse>;\n};\n\nexport type FileResponseControllerMethods = {\n    fileResponse: (path: FileResponseData['path']) => Promise<FileResponseResponse>;\n};\n\nexport type ComplexControllerMethods = {\n    complexTypes: (query: ComplexTypesData['query']) => Promise<ComplexTypesResponse>;\n    complexParams: (path: ComplexParamsData['path'], body?: ComplexParamsData['body']) => Promise<ComplexParamsResponse>;\n};\n\nexport type MultipartControllerMethods = {\n    multipartResponse: () => Promise<MultipartResponseResponse>;\n    multipartRequest: (body?: MultipartRequestData['body']) => Promise<void>;\n};\n\nexport type HeaderControllerMethods = {\n    callWithResultFromHeader: () => Promise<void>;\n};\n\nexport type ErrorControllerMethods = {\n    testErrorCode: (query: TestErrorCodeData['query']) => Promise<void>;\n};\n\nexport type NonAsciiÆøåÆøÅöôêÊControllerMethods = {\n    nonAsciiæøåÆøÅöôêÊ字符串: (query: NonAsciiæøåÆøÅöôêÊ字符串Data['query']) => Promise<NonAsciiæøåÆøÅöôêÊ字符串Response>;\n    putWithFormUrlEncoded: (body: PutWithFormUrlEncodedData['body']) => Promise<void>;\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/nestjs/v11/__snapshots__/3.0.x/default/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type ClientOptions = {\n    baseUrl: 'http://localhost:3000/base' | (string & {});\n};\n\n/**\n * Model with number-only name\n */\nexport type _400 = string;\n\nexport type ExternalRefA = ExternalSharedModel;\n\nexport type ExternalRefB = ExternalSharedModel;\n\n/**\n * Testing multiline comments in string: First line\n * Second line\n *\n * Fourth line\n */\nexport type CamelCaseCommentWithBreaks = number;\n\n/**\n * Testing multiline comments in string: First line\n * Second line\n *\n * Fourth line\n */\nexport type CommentWithBreaks = number;\n\n/**\n * Testing backticks in string: `backticks` and ```multiple backticks``` should work\n */\nexport type CommentWithBackticks = number;\n\n/**\n * Testing backticks and quotes in string: `backticks`, 'quotes', \"double quotes\" and ```multiple backticks``` should work\n */\nexport type CommentWithBackticksAndQuotes = number;\n\n/**\n * Testing slashes in string: \\backwards\\\\\\ and /forwards/// should work\n */\nexport type CommentWithSlashes = number;\n\n/**\n * Testing expression placeholders in string: ${expression} should work\n */\nexport type CommentWithExpressionPlaceholders = number;\n\n/**\n * Testing quotes in string: 'single quote''' and \"double quotes\"\"\" should work\n */\nexport type CommentWithQuotes = number;\n\n/**\n * Testing reserved characters in string: * inline * and ** inline ** should work\n */\nexport type CommentWithReservedCharacters = number;\n\n/**\n * This is a simple number\n */\nexport type SimpleInteger = number;\n\n/**\n * This is a simple boolean\n */\nexport type SimpleBoolean = boolean;\n\n/**\n * This is a simple string\n */\nexport type SimpleString = string;\n\n/**\n * A string with non-ascii (unicode) characters valid in typescript identifiers (æøåÆØÅöÔèÈ字符串)\n */\nexport type NonAsciiStringæøåÆøÅöôêÊ字符串 = string;\n\n/**\n * This is a simple file\n */\nexport type SimpleFile = Blob | File;\n\n/**\n * This is a simple reference\n */\nexport type SimpleReference = ModelWithString;\n\n/**\n * This is a simple string\n */\nexport type SimpleStringWithPattern = string | null;\n\n/**\n * This is a simple enum with strings\n */\nexport type EnumWithStrings = 'Success' | 'Warning' | 'Error' | '\\'Single Quote\\'' | '\"Double Quotes\"' | 'Non-ascii: øæåôöØÆÅÔÖ字符串';\n\nexport type EnumWithReplacedCharacters = '\\'Single Quote\\'' | '\"Double Quotes\"' | 'øæåôöØÆÅÔÖ字符串' | 3.1 | '';\n\n/**\n * This is a simple enum with numbers\n */\nexport type EnumWithNumbers = 1 | 2 | 3 | 1.1 | 1.2 | 1.3 | 100 | 200 | 300 | -100 | -200 | -300 | -1.1 | -1.2 | -1.3;\n\n/**\n * Success=1,Warning=2,Error=3\n */\nexport type EnumFromDescription = number;\n\n/**\n * This is a simple enum with numbers\n */\nexport type EnumWithExtensions = 200 | 400 | 500;\n\nexport type EnumWithXEnumNames = 0 | 1 | 2;\n\n/**\n * This is a simple array with numbers\n */\nexport type ArrayWithNumbers = Array<number>;\n\n/**\n * This is a simple array with booleans\n */\nexport type ArrayWithBooleans = Array<boolean>;\n\n/**\n * This is a simple array with strings\n */\nexport type ArrayWithStrings = Array<string>;\n\n/**\n * This is a simple array with references\n */\nexport type ArrayWithReferences = Array<ModelWithString>;\n\n/**\n * This is a simple array containing an array\n */\nexport type ArrayWithArray = Array<Array<ModelWithString>>;\n\n/**\n * This is a simple array with properties\n */\nexport type ArrayWithProperties = Array<{\n    '16x16'?: CamelCaseCommentWithBreaks;\n    bar?: string;\n}>;\n\n/**\n * This is a simple array with any of properties\n */\nexport type ArrayWithAnyOfProperties = Array<{\n    foo?: string;\n} | {\n    bar?: string;\n}>;\n\nexport type AnyOfAnyAndNull = {\n    data?: unknown;\n};\n\n/**\n * This is a simple array with any of properties\n */\nexport type AnyOfArrays = {\n    results?: Array<{\n        foo?: string;\n    } | {\n        bar?: string;\n    }>;\n};\n\n/**\n * This is a string dictionary\n */\nexport type DictionaryWithString = {\n    [key: string]: string;\n};\n\nexport type DictionaryWithPropertiesAndAdditionalProperties = {\n    foo?: number;\n    bar?: boolean;\n    [key: string]: string | number | boolean | undefined;\n};\n\n/**\n * This is a string reference\n */\nexport type DictionaryWithReference = {\n    [key: string]: ModelWithString;\n};\n\n/**\n * This is a complex dictionary\n */\nexport type DictionaryWithArray = {\n    [key: string]: Array<ModelWithString>;\n};\n\n/**\n * This is a string dictionary\n */\nexport type DictionaryWithDictionary = {\n    [key: string]: {\n        [key: string]: string;\n    };\n};\n\n/**\n * This is a complex dictionary\n */\nexport type DictionaryWithProperties = {\n    [key: string]: {\n        foo?: string;\n        bar?: string;\n    };\n};\n\n/**\n * This is a model with one number property\n */\nexport type ModelWithInteger = {\n    /**\n     * This is a simple number property\n     */\n    prop?: number;\n};\n\n/**\n * This is a model with one boolean property\n */\nexport type ModelWithBoolean = {\n    /**\n     * This is a simple boolean property\n     */\n    prop?: boolean;\n};\n\n/**\n * This is a model with one string property\n */\nexport type ModelWithString = {\n    /**\n     * This is a simple string property\n     */\n    prop?: string;\n};\n\n/**\n * This is a model with one string property\n */\nexport type ModelWithStringError = {\n    /**\n     * This is a simple string property\n     */\n    prop?: string;\n};\n\n/**\n * `Comment` or `VoiceComment`. The JSON object for adding voice comments to tickets is different. See [Adding voice comments to tickets](/documentation/ticketing/managing-tickets/adding-voice-comments-to-tickets)\n */\nexport type ModelFromZendesk = string;\n\n/**\n * This is a model with one string property\n */\nexport type ModelWithNullableString = {\n    /**\n     * This is a simple string property\n     */\n    nullableProp1?: string | null;\n    /**\n     * This is a simple string property\n     */\n    nullableRequiredProp1: string | null;\n    /**\n     * This is a simple string property\n     */\n    nullableProp2?: string | null;\n    /**\n     * This is a simple string property\n     */\n    nullableRequiredProp2: string | null;\n    /**\n     * This is a simple enum with strings\n     */\n    'foo_bar-enum'?: 'Success' | 'Warning' | 'Error' | 'ØÆÅ字符串';\n};\n\n/**\n * This is a model with one enum\n */\nexport type ModelWithEnum = {\n    /**\n     * This is a simple enum with strings\n     */\n    'foo_bar-enum'?: 'Success' | 'Warning' | 'Error' | 'ØÆÅ字符串';\n    /**\n     * These are the HTTP error code enums\n     */\n    statusCode?: '100' | '200 FOO' | '300 FOO_BAR' | '400 foo-bar' | '500 foo.bar' | '600 foo&bar';\n    /**\n     * Simple boolean enum\n     */\n    bool?: true;\n};\n\n/**\n * This is a model with one enum with escaped name\n */\nexport type ModelWithEnumWithHyphen = {\n    /**\n     * Foo-Bar-Baz-Qux\n     */\n    'foo-bar-baz-qux'?: '3.0';\n};\n\n/**\n * This is a model with one enum\n */\nexport type ModelWithEnumFromDescription = {\n    /**\n     * Success=1,Warning=2,Error=3\n     */\n    test?: number;\n};\n\n/**\n * This is a model with nested enums\n */\nexport type ModelWithNestedEnums = {\n    dictionaryWithEnum?: {\n        [key: string]: 'Success' | 'Warning' | 'Error';\n    };\n    dictionaryWithEnumFromDescription?: {\n        [key: string]: number;\n    };\n    arrayWithEnum?: Array<'Success' | 'Warning' | 'Error'>;\n    arrayWithDescription?: Array<number>;\n    /**\n     * This is a simple enum with strings\n     */\n    'foo_bar-enum'?: 'Success' | 'Warning' | 'Error' | 'ØÆÅ字符串';\n};\n\n/**\n * This is a model with one property containing a reference\n */\nexport type ModelWithReference = {\n    prop?: ModelWithProperties;\n};\n\n/**\n * This is a model with one property containing an array\n */\nexport type ModelWithArrayReadOnlyAndWriteOnly = {\n    prop?: Array<ModelWithReadOnlyAndWriteOnly>;\n    propWithFile?: Array<Blob | File>;\n    propWithNumber?: Array<number>;\n};\n\n/**\n * This is a model with one property containing an array\n */\nexport type ModelWithArray = {\n    prop?: Array<ModelWithString>;\n    propWithFile?: Array<Blob | File>;\n    propWithNumber?: Array<number>;\n};\n\n/**\n * This is a model with one property containing a dictionary\n */\nexport type ModelWithDictionary = {\n    prop?: {\n        [key: string]: string;\n    };\n};\n\n/**\n * This is a deprecated model with a deprecated property\n *\n * @deprecated\n */\nexport type DeprecatedModel = {\n    /**\n     * This is a deprecated property\n     *\n     * @deprecated\n     */\n    prop?: string;\n};\n\n/**\n * This is a model with one property containing a circular reference\n */\nexport type ModelWithCircularReference = {\n    prop?: ModelWithCircularReference;\n};\n\n/**\n * This is a model with one property with a 'one of' relationship\n */\nexport type CompositionWithOneOf = {\n    propA?: ModelWithString | ModelWithEnum | ModelWithArray | ModelWithDictionary;\n};\n\n/**\n * This is a model with one property with a 'one of' relationship where the options are not $ref\n */\nexport type CompositionWithOneOfAnonymous = {\n    propA?: {\n        propA?: string;\n    } | string | number;\n};\n\n/**\n * Circle\n */\nexport type ModelCircle = {\n    kind: string;\n    radius?: number;\n};\n\n/**\n * Square\n */\nexport type ModelSquare = {\n    kind: string;\n    sideLength?: number;\n};\n\n/**\n * This is a model with one property with a 'one of' relationship where the options are not $ref\n */\nexport type CompositionWithOneOfDiscriminator = ({\n    kind: 'circle';\n} & ModelCircle) | ({\n    kind: 'square';\n} & ModelSquare);\n\n/**\n * This is a model with one property with a 'any of' relationship\n */\nexport type CompositionWithAnyOf = {\n    propA?: ModelWithString | ModelWithEnum | ModelWithArray | ModelWithDictionary;\n};\n\n/**\n * This is a model with one property with a 'any of' relationship where the options are not $ref\n */\nexport type CompositionWithAnyOfAnonymous = {\n    propA?: {\n        propA?: string;\n    } | string | number;\n};\n\n/**\n * This is a model with nested 'any of' property with a type null\n */\nexport type CompositionWithNestedAnyAndTypeNull = {\n    propA?: Array<ModelWithDictionary | null> | Array<ModelWithArray | null>;\n};\n\nexport type _3eNum1Период = 'Bird' | 'Dog';\n\nexport type ConstValue = 'ConstValue';\n\n/**\n * This is a model with one property with a 'any of' relationship where the options are not $ref\n */\nexport type CompositionWithNestedAnyOfAndNull = {\n    propA?: Array<_3eNum1Период | ConstValue> | null;\n};\n\n/**\n * This is a model with one property with a 'one of' relationship\n */\nexport type CompositionWithOneOfAndNullable = {\n    propA?: {\n        boolean?: boolean;\n    } | ModelWithEnum | ModelWithArray | ModelWithDictionary | null;\n};\n\n/**\n * This is a model that contains a simple dictionary within composition\n */\nexport type CompositionWithOneOfAndSimpleDictionary = {\n    propA?: boolean | {\n        [key: string]: number;\n    };\n};\n\n/**\n * This is a model that contains a dictionary of simple arrays within composition\n */\nexport type CompositionWithOneOfAndSimpleArrayDictionary = {\n    propA?: boolean | {\n        [key: string]: Array<boolean>;\n    };\n};\n\n/**\n * This is a model that contains a dictionary of complex arrays (composited) within composition\n */\nexport type CompositionWithOneOfAndComplexArrayDictionary = {\n    propA?: boolean | {\n        [key: string]: Array<number | string>;\n    };\n};\n\n/**\n * This is a model with one property with a 'all of' relationship\n */\nexport type CompositionWithAllOfAndNullable = {\n    propA?: ({\n        boolean?: boolean;\n    } & ModelWithEnum & ModelWithArray & ModelWithDictionary) | null;\n};\n\n/**\n * This is a model with one property with a 'any of' relationship\n */\nexport type CompositionWithAnyOfAndNullable = {\n    propA?: {\n        boolean?: boolean;\n    } | ModelWithEnum | ModelWithArray | ModelWithDictionary | null;\n};\n\n/**\n * This is a base model with two simple optional properties\n */\nexport type CompositionBaseModel = {\n    firstName?: string;\n    lastname?: string;\n};\n\n/**\n * This is a model that extends the base model\n */\nexport type CompositionExtendedModel = CompositionBaseModel & {\n    age: number;\n    firstName: string;\n    lastname: string;\n};\n\n/**\n * This is a model with one nested property\n */\nexport type ModelWithProperties = {\n    required: string;\n    readonly requiredAndReadOnly: string;\n    requiredAndNullable: string | null;\n    string?: string;\n    number?: number;\n    boolean?: boolean;\n    reference?: ModelWithString;\n    'property with space'?: string;\n    default?: string;\n    try?: string;\n    readonly '@namespace.string'?: string;\n    readonly '@namespace.integer'?: number;\n};\n\n/**\n * This is a model with one nested property\n */\nexport type ModelWithNestedProperties = {\n    readonly first: {\n        readonly second: {\n            readonly third: string | null;\n        } | null;\n    } | null;\n};\n\n/**\n * This is a model with duplicated properties\n */\nexport type ModelWithDuplicateProperties = {\n    prop?: ModelWithString;\n};\n\n/**\n * This is a model with ordered properties\n */\nexport type ModelWithOrderedProperties = {\n    zebra?: string;\n    apple?: string;\n    hawaii?: string;\n};\n\n/**\n * This is a model with duplicated imports\n */\nexport type ModelWithDuplicateImports = {\n    propA?: ModelWithString;\n    propB?: ModelWithString;\n    propC?: ModelWithString;\n};\n\n/**\n * This is a model that extends another model\n */\nexport type ModelThatExtends = ModelWithString & {\n    propExtendsA?: string;\n    propExtendsB?: ModelWithString;\n};\n\n/**\n * This is a model that extends another model\n */\nexport type ModelThatExtendsExtends = ModelWithString & ModelThatExtends & {\n    propExtendsC?: string;\n    propExtendsD?: ModelWithString;\n};\n\n/**\n * This is a model that contains a some patterns\n */\nexport type ModelWithPattern = {\n    key: string;\n    name: string;\n    readonly enabled?: boolean;\n    readonly modified?: string;\n    id?: string;\n    text?: string;\n    patternWithSingleQuotes?: string;\n    patternWithNewline?: string;\n    patternWithBacktick?: string;\n    patternWithUnicode?: string;\n};\n\nexport type File = {\n    /**\n     * Id\n     */\n    readonly id?: string;\n    /**\n     * Updated at\n     */\n    readonly updated_at?: string;\n    /**\n     * Created at\n     */\n    readonly created_at?: string;\n    /**\n     * Mime\n     */\n    mime: string;\n    /**\n     * File\n     */\n    readonly file?: string;\n};\n\nexport type Default = {\n    name?: string;\n};\n\nexport type Pageable = {\n    page?: number;\n    size?: number;\n    sort?: Array<string>;\n};\n\n/**\n * This is a free-form object without additionalProperties.\n */\nexport type FreeFormObjectWithoutAdditionalProperties = {\n    [key: string]: unknown;\n};\n\n/**\n * This is a free-form object with additionalProperties: true.\n */\nexport type FreeFormObjectWithAdditionalPropertiesEqTrue = {\n    [key: string]: unknown;\n};\n\n/**\n * This is a free-form object with additionalProperties: {}.\n */\nexport type FreeFormObjectWithAdditionalPropertiesEqEmptyObject = {\n    [key: string]: unknown;\n};\n\nexport type ModelWithConst = {\n    String?: 'String';\n    number?: 0;\n    null?: unknown;\n    withType?: 'Some string';\n};\n\n/**\n * This is a model with one property and additionalProperties: true\n */\nexport type ModelWithAdditionalPropertiesEqTrue = {\n    /**\n     * This is a simple string property\n     */\n    prop?: string;\n    [key: string]: unknown;\n};\n\nexport type NestedAnyOfArraysNullable = {\n    nullableArray?: Array<string | boolean> | null;\n};\n\nexport type CompositionWithOneOfAndProperties = ({\n    foo: SimpleParameter;\n} | {\n    bar: NonAsciiStringæøåÆøÅöôêÊ字符串;\n}) & {\n    baz: number | null;\n    qux: number;\n};\n\n/**\n * An object that can be null\n */\nexport type NullableObject = {\n    foo?: string;\n} | null;\n\n/**\n * Some % character\n */\nexport type CharactersInDescription = string;\n\nexport type ModelWithNullableObject = {\n    data?: NullableObject;\n};\n\n/**\n * An object with additional properties that can be null\n */\nexport type ModelWithAdditionalPropertiesRef = {\n    [key: string]: NullableObject | null;\n};\n\nexport type ModelWithOneOfEnum = {\n    foo: 'Bar';\n} | {\n    foo: 'Baz';\n} | {\n    foo: 'Qux';\n} | {\n    content: string;\n    foo: 'Quux';\n} | {\n    content: [\n        string,\n        string\n    ];\n    foo: 'Corge';\n};\n\nexport type ModelWithNestedArrayEnumsDataFoo = 'foo' | 'bar';\n\nexport type ModelWithNestedArrayEnumsDataBar = 'baz' | 'qux';\n\nexport type ModelWithNestedArrayEnumsData = {\n    foo?: Array<ModelWithNestedArrayEnumsDataFoo>;\n    bar?: Array<ModelWithNestedArrayEnumsDataBar>;\n};\n\nexport type ModelWithNestedArrayEnums = {\n    array_strings?: Array<string>;\n    data?: ModelWithNestedArrayEnumsData;\n};\n\nexport type ModelWithNestedCompositionEnums = {\n    foo?: ModelWithNestedArrayEnumsDataFoo;\n};\n\nexport type ModelWithReadOnlyAndWriteOnly = {\n    foo: string;\n    readonly bar: string;\n};\n\nexport type ModelWithConstantSizeArray = [\n    number,\n    number\n];\n\nexport type ModelWithAnyOfConstantSizeArray = [\n    number | string,\n    number | string,\n    number | string\n];\n\nexport type ModelWithPrefixItemsConstantSizeArray = Array<ModelWithInteger | number | string>;\n\nexport type ModelWithAnyOfConstantSizeArrayNullable = [\n    number | null | string,\n    number | null | string,\n    number | null | string\n];\n\nexport type ModelWithAnyOfConstantSizeArrayWithNSizeAndOptions = [\n    number | Import,\n    number | Import\n];\n\nexport type ModelWithAnyOfConstantSizeArrayAndIntersect = [\n    number & string,\n    number & string\n];\n\nexport type ModelWithNumericEnumUnion = {\n    /**\n     * Период\n     */\n    value?: -10 | -1 | 0 | 1 | 3 | 6 | 12;\n};\n\n/**\n * Some description with `back ticks`\n */\nexport type ModelWithBackticksInDescription = {\n    /**\n     * The template `that` should be used for parsing and importing the contents of the CSV file.\n     *\n     * <br/><p>There is one placeholder currently supported:<ul>     <li><b>${x}</b> - refers to the n-th column in the CSV file, e.g. ${1}, ${2}, ...)</li></ul><p>Example of a correct JSON template:</p>\n     * <pre>\n     * [\n     * {\n     * \"resourceType\": \"Asset\",\n     * \"identifier\": {\n     * \"name\": \"${1}\",\n     * \"domain\": {\n     * \"name\": \"${2}\",\n     * \"community\": {\n     * \"name\": \"Some Community\"\n     * }\n     * }\n     * },\n     * \"attributes\" : {\n     * \"00000000-0000-0000-0000-000000003115\" : [ {\n     * \"value\" : \"${3}\"\n     * } ],\n     * \"00000000-0000-0000-0000-000000000222\" : [ {\n     * \"value\" : \"${4}\"\n     * } ]\n     * }\n     * }\n     * ]\n     * </pre>\n     */\n    template?: string;\n};\n\nexport type ModelWithOneOfAndProperties = (SimpleParameter | NonAsciiStringæøåÆøÅöôêÊ字符串) & {\n    baz: number | null;\n    qux: number;\n};\n\n/**\n * Model used to test deduplication strategy (unused)\n */\nexport type ParameterSimpleParameterUnused = string;\n\n/**\n * Model used to test deduplication strategy\n */\nexport type PostServiceWithEmptyTagResponse = string;\n\n/**\n * Model used to test deduplication strategy\n */\nexport type PostServiceWithEmptyTagResponse2 = string;\n\n/**\n * Model used to test deduplication strategy\n */\nexport type DeleteFooData = string;\n\n/**\n * Model used to test deduplication strategy\n */\nexport type DeleteFooData2 = string;\n\n/**\n * Model with restricted keyword name\n */\nexport type Import = string;\n\nexport type SchemaWithFormRestrictedKeys = {\n    description?: string;\n    'x-enum-descriptions'?: string;\n    'x-enum-varnames'?: string;\n    'x-enumNames'?: string;\n    title?: string;\n    object?: {\n        description?: string;\n        'x-enum-descriptions'?: string;\n        'x-enum-varnames'?: string;\n        'x-enumNames'?: string;\n        title?: string;\n    };\n    array?: Array<{\n        description?: string;\n        'x-enum-descriptions'?: string;\n        'x-enum-varnames'?: string;\n        'x-enumNames'?: string;\n        title?: string;\n    }>;\n};\n\n/**\n * This schema was giving PascalCase transformations a hard time\n */\nexport type IoK8sApimachineryPkgApisMetaV1DeleteOptions = {\n    /**\n     * Must be fulfilled before a deletion is carried out. If not possible, a 409 Conflict status will be returned.\n     */\n    preconditions?: IoK8sApimachineryPkgApisMetaV1Preconditions;\n};\n\n/**\n * This schema was giving PascalCase transformations a hard time\n */\nexport type IoK8sApimachineryPkgApisMetaV1Preconditions = {\n    /**\n     * Specifies the target ResourceVersion\n     */\n    resourceVersion?: string;\n    /**\n     * Specifies the target UID.\n     */\n    uid?: string;\n};\n\nexport type AdditionalPropertiesUnknownIssue = {\n    [key: string]: string | number;\n};\n\nexport type AdditionalPropertiesUnknownIssue2 = {\n    [key: string]: string | number;\n};\n\nexport type AdditionalPropertiesUnknownIssue3 = string & {\n    entries: {\n        [key: string]: AdditionalPropertiesUnknownIssue;\n    };\n};\n\nexport type AdditionalPropertiesIntegerIssue = {\n    value: number;\n    [key: string]: number;\n};\n\nexport type OneOfAllOfIssue = ((ConstValue | GenericSchemaDuplicateIssue1SystemBoolean) & _3eNum1Период) | GenericSchemaDuplicateIssue1SystemString;\n\nexport type GenericSchemaDuplicateIssue1SystemBoolean = {\n    item?: boolean;\n    error?: string | null;\n    readonly hasError?: boolean;\n    data?: {\n        [key: string]: never;\n    };\n};\n\nexport type GenericSchemaDuplicateIssue1SystemString = {\n    item?: string | null;\n    error?: string | null;\n    readonly hasError?: boolean;\n};\n\nexport type ExternalSharedModel = {\n    id: string;\n    name?: string;\n};\n\n/**\n * This is a model with one property containing a reference\n */\nexport type ModelWithReferenceWritable = {\n    prop?: ModelWithPropertiesWritable;\n};\n\n/**\n * This is a model with one property containing an array\n */\nexport type ModelWithArrayReadOnlyAndWriteOnlyWritable = {\n    prop?: Array<ModelWithReadOnlyAndWriteOnlyWritable>;\n    propWithFile?: Array<Blob | File>;\n    propWithNumber?: Array<number>;\n};\n\n/**\n * This is a model with one nested property\n */\nexport type ModelWithPropertiesWritable = {\n    required: string;\n    requiredAndNullable: string | null;\n    string?: string;\n    number?: number;\n    boolean?: boolean;\n    reference?: ModelWithString;\n    'property with space'?: string;\n    default?: string;\n    try?: string;\n};\n\n/**\n * This is a model that contains a some patterns\n */\nexport type ModelWithPatternWritable = {\n    key: string;\n    name: string;\n    id?: string;\n    text?: string;\n    patternWithSingleQuotes?: string;\n    patternWithNewline?: string;\n    patternWithBacktick?: string;\n    patternWithUnicode?: string;\n};\n\nexport type FileWritable = {\n    /**\n     * Mime\n     */\n    mime: string;\n};\n\nexport type ModelWithReadOnlyAndWriteOnlyWritable = {\n    foo: string;\n    baz: string;\n};\n\nexport type ModelWithAnyOfConstantSizeArrayWithNSizeAndOptionsWritable = [\n    number | Import,\n    number | Import\n];\n\nexport type AdditionalPropertiesUnknownIssueWritable = {\n    [key: string]: string | number;\n};\n\nexport type OneOfAllOfIssueWritable = ((ConstValue | GenericSchemaDuplicateIssue1SystemBoolean) & _3eNum1Период) | GenericSchemaDuplicateIssue1SystemString;\n\nexport type GenericSchemaDuplicateIssue1SystemBooleanWritable = {\n    item?: boolean;\n    error?: string | null;\n    data?: {\n        [key: string]: never;\n    };\n};\n\nexport type GenericSchemaDuplicateIssue1SystemStringWritable = {\n    item?: string | null;\n    error?: string | null;\n};\n\n/**\n * This is a reusable parameter\n */\nexport type SimpleParameter = string;\n\n/**\n * Parameter with illegal characters\n */\nexport type XFooBar = ModelWithString;\n\nexport type SimpleRequestBody = ModelWithString;\n\nexport type SimpleFormData = ModelWithString;\n\nexport type ExportData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no+tag';\n};\n\nexport type PatchApiVbyApiVersionNoTagData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no+tag';\n};\n\nexport type PatchApiVbyApiVersionNoTagResponses = {\n    /**\n     * OK\n     */\n    default: unknown;\n};\n\nexport type ImportData = {\n    body: ModelWithReadOnlyAndWriteOnlyWritable | ModelWithArrayReadOnlyAndWriteOnlyWritable;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no+tag';\n};\n\nexport type ImportResponses = {\n    /**\n     * Success\n     */\n    200: ModelFromZendesk;\n    /**\n     * Default success response\n     */\n    default: ModelWithReadOnlyAndWriteOnly;\n};\n\nexport type ImportResponse = ImportResponses[keyof ImportResponses];\n\nexport type FooWowData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no+tag';\n};\n\nexport type FooWowResponses = {\n    /**\n     * OK\n     */\n    default: unknown;\n};\n\nexport type ApiVVersionODataControllerCountData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple/$count';\n};\n\nexport type ApiVVersionODataControllerCountResponses = {\n    /**\n     * Success\n     */\n    200: ModelFromZendesk;\n};\n\nexport type ApiVVersionODataControllerCountResponse = ApiVVersionODataControllerCountResponses[keyof ApiVVersionODataControllerCountResponses];\n\nexport type GetApiVbyApiVersionSimpleOperationData = {\n    body?: never;\n    path: {\n        /**\n         * foo in method\n         */\n        foo_param: string;\n    };\n    query?: never;\n    url: '/api/v{api-version}/simple:operation';\n};\n\nexport type GetApiVbyApiVersionSimpleOperationErrors = {\n    /**\n     * Default error response\n     */\n    default: ModelWithBoolean;\n};\n\nexport type GetApiVbyApiVersionSimpleOperationError = GetApiVbyApiVersionSimpleOperationErrors[keyof GetApiVbyApiVersionSimpleOperationErrors];\n\nexport type GetApiVbyApiVersionSimpleOperationResponses = {\n    /**\n     * Response is a simple number\n     */\n    200: number;\n};\n\nexport type GetApiVbyApiVersionSimpleOperationResponse = GetApiVbyApiVersionSimpleOperationResponses[keyof GetApiVbyApiVersionSimpleOperationResponses];\n\nexport type DeleteCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type GetCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type HeadCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type OptionsCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type PatchCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type PostCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type PutCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type DeleteFooData3 = {\n    body?: never;\n    headers: {\n        /**\n         * Parameter with illegal characters\n         */\n        'x-Foo-Bar': ModelWithString;\n    };\n    path: {\n        /**\n         * foo in method\n         */\n        foo_param: string;\n        /**\n         * bar in method\n         */\n        BarParam: string;\n    };\n    query?: never;\n    url: '/api/v{api-version}/foo/{foo_param}/bar/{BarParam}';\n};\n\nexport type CallWithDescriptionsData = {\n    body?: never;\n    path?: never;\n    query?: {\n        /**\n         * Testing multiline comments in string: First line\n         * Second line\n         *\n         * Fourth line\n         */\n        parameterWithBreaks?: string;\n        /**\n         * Testing backticks in string: `backticks` and ```multiple backticks``` should work\n         */\n        parameterWithBackticks?: string;\n        /**\n         * Testing slashes in string: \\backwards\\\\\\ and /forwards/// should work\n         */\n        parameterWithSlashes?: string;\n        /**\n         * Testing expression placeholders in string: ${expression} should work\n         */\n        parameterWithExpressionPlaceholders?: string;\n        /**\n         * Testing quotes in string: 'single quote''' and \"double quotes\"\"\" should work\n         */\n        parameterWithQuotes?: string;\n        /**\n         * Testing reserved characters in string: * inline * and ** inline ** should work\n         */\n        parameterWithReservedCharacters?: string;\n    };\n    url: '/api/v{api-version}/descriptions';\n};\n\nexport type DeprecatedCallData = {\n    body?: never;\n    headers: {\n        /**\n         * This parameter is deprecated\n         *\n         * @deprecated\n         */\n        parameter: DeprecatedModel | null;\n    };\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/parameters/deprecated';\n};\n\nexport type CallWithParametersData = {\n    /**\n     * This is the parameter that goes into the body\n     */\n    body: {\n        [key: string]: unknown;\n    } | null;\n    headers: {\n        /**\n         * This is the parameter that goes into the header\n         */\n        parameterHeader: string | null;\n    };\n    path: {\n        /**\n         * This is the parameter that goes into the path\n         */\n        parameterPath: string | null;\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string | null;\n    };\n    query: {\n        foo_ref_enum?: ModelWithNestedArrayEnumsDataFoo;\n        foo_all_of_enum: ModelWithNestedArrayEnumsDataFoo;\n        /**\n         * This is the parameter that goes into the query params\n         */\n        cursor: string | null;\n    };\n    url: '/api/v{api-version}/parameters/{parameterPath}';\n};\n\nexport type CallWithWeirdParameterNamesData = {\n    /**\n     * This is the parameter that goes into the body\n     */\n    body: ModelWithString | null;\n    headers: {\n        /**\n         * This is the parameter that goes into the request header\n         */\n        'parameter.header': string | null;\n    };\n    path: {\n        /**\n         * This is the parameter that goes into the path\n         */\n        'parameter.path.1'?: string;\n        /**\n         * This is the parameter that goes into the path\n         */\n        'parameter-path-2'?: string;\n        /**\n         * This is the parameter that goes into the path\n         */\n        'PARAMETER-PATH-3'?: string;\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string | null;\n    };\n    query: {\n        /**\n         * This is the parameter with a reserved keyword\n         */\n        default?: string;\n        /**\n         * This is the parameter that goes into the request query params\n         */\n        'parameter-query': string | null;\n    };\n    url: '/api/v{api-version}/parameters/{parameter.path.1}/{parameter-path-2}/{PARAMETER-PATH-3}';\n};\n\nexport type GetCallWithOptionalParamData = {\n    /**\n     * This is a required parameter\n     */\n    body: ModelWithOneOfEnum;\n    path?: never;\n    query?: {\n        /**\n         * This is an optional parameter\n         */\n        page?: number;\n    };\n    url: '/api/v{api-version}/parameters';\n};\n\nexport type PostCallWithOptionalParamData = {\n    /**\n     * This is an optional parameter\n     */\n    body?: {\n        offset?: number | null;\n    };\n    path?: never;\n    query: {\n        /**\n         * This is a required parameter\n         */\n        parameter: Pageable;\n    };\n    url: '/api/v{api-version}/parameters';\n};\n\nexport type PostCallWithOptionalParamResponses = {\n    /**\n     * Response is a simple number\n     */\n    200: number;\n    /**\n     * Success\n     */\n    204: void;\n};\n\nexport type PostCallWithOptionalParamResponse = PostCallWithOptionalParamResponses[keyof PostCallWithOptionalParamResponses];\n\nexport type PostApiVbyApiVersionRequestBodyData = {\n    /**\n     * A reusable request body\n     */\n    body?: SimpleRequestBody;\n    path?: never;\n    query?: {\n        /**\n         * This is a reusable parameter\n         */\n        parameter?: string;\n    };\n    url: '/api/v{api-version}/requestBody';\n};\n\nexport type PostApiVbyApiVersionFormDataData = {\n    /**\n     * A reusable request body\n     */\n    body?: SimpleFormData;\n    path?: never;\n    query?: {\n        /**\n         * This is a reusable parameter\n         */\n        parameter?: string;\n    };\n    url: '/api/v{api-version}/formData';\n};\n\nexport type CallWithDefaultParametersData = {\n    body?: never;\n    path?: never;\n    query?: {\n        /**\n         * This is a simple string with default value\n         */\n        parameterString?: string | null;\n        /**\n         * This is a simple number with default value\n         */\n        parameterNumber?: number | null;\n        /**\n         * This is a simple boolean with default value\n         */\n        parameterBoolean?: boolean | null;\n        /**\n         * This is a simple enum with default value\n         */\n        parameterEnum?: 'Success' | 'Warning' | 'Error';\n        /**\n         * This is a simple model with default value\n         */\n        parameterModel?: ModelWithString | null;\n    };\n    url: '/api/v{api-version}/defaults';\n};\n\nexport type CallWithDefaultOptionalParametersData = {\n    body?: never;\n    path?: never;\n    query?: {\n        /**\n         * This is a simple string that is optional with default value\n         */\n        parameterString?: string;\n        /**\n         * This is a simple number that is optional with default value\n         */\n        parameterNumber?: number;\n        /**\n         * This is a simple boolean that is optional with default value\n         */\n        parameterBoolean?: boolean;\n        /**\n         * This is a simple enum that is optional with default value\n         */\n        parameterEnum?: 'Success' | 'Warning' | 'Error';\n        /**\n         * This is a simple model that is optional with default value\n         */\n        parameterModel?: ModelWithString;\n    };\n    url: '/api/v{api-version}/defaults';\n};\n\nexport type CallToTestOrderOfParamsData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * This is a optional string with default\n         */\n        parameterOptionalStringWithDefault?: string;\n        /**\n         * This is a optional string with empty default\n         */\n        parameterOptionalStringWithEmptyDefault?: string;\n        /**\n         * This is a optional string with no default\n         */\n        parameterOptionalStringWithNoDefault?: string;\n        /**\n         * This is a string with default\n         */\n        parameterStringWithDefault: string;\n        /**\n         * This is a string with empty default\n         */\n        parameterStringWithEmptyDefault: string;\n        /**\n         * This is a string with no default\n         */\n        parameterStringWithNoDefault: string;\n        /**\n         * This is a string that can be null with no default\n         */\n        parameterStringNullableWithNoDefault?: string | null;\n        /**\n         * This is a string that can be null with default\n         */\n        parameterStringNullableWithDefault?: string | null;\n    };\n    url: '/api/v{api-version}/defaults';\n};\n\nexport type DuplicateNameData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/duplicate';\n};\n\nexport type DuplicateName2Data = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/duplicate';\n};\n\nexport type DuplicateName3Data = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/duplicate';\n};\n\nexport type DuplicateName4Data = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/duplicate';\n};\n\nexport type CallWithNoContentResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no-content';\n};\n\nexport type CallWithNoContentResponseResponses = {\n    /**\n     * Success\n     */\n    204: void;\n};\n\nexport type CallWithNoContentResponseResponse = CallWithNoContentResponseResponses[keyof CallWithNoContentResponseResponses];\n\nexport type CallWithResponseAndNoContentResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multiple-tags/response-and-no-content';\n};\n\nexport type CallWithResponseAndNoContentResponseResponses = {\n    /**\n     * Response is a simple number\n     */\n    200: number;\n    /**\n     * Success\n     */\n    204: void;\n};\n\nexport type CallWithResponseAndNoContentResponseResponse = CallWithResponseAndNoContentResponseResponses[keyof CallWithResponseAndNoContentResponseResponses];\n\nexport type DummyAData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multiple-tags/a';\n};\n\nexport type DummyAResponses = {\n    200: _400;\n};\n\nexport type DummyAResponse = DummyAResponses[keyof DummyAResponses];\n\nexport type DummyBData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multiple-tags/b';\n};\n\nexport type DummyBResponses = {\n    /**\n     * Success\n     */\n    204: void;\n};\n\nexport type DummyBResponse = DummyBResponses[keyof DummyBResponses];\n\nexport type CallWithResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/response';\n};\n\nexport type CallWithResponseResponses = {\n    default: Import;\n};\n\nexport type CallWithResponseResponse = CallWithResponseResponses[keyof CallWithResponseResponses];\n\nexport type CallWithDuplicateResponsesData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/response';\n};\n\nexport type CallWithDuplicateResponsesErrors = {\n    /**\n     * Message for 500 error\n     */\n    500: ModelWithStringError;\n    /**\n     * Message for 501 error\n     */\n    501: ModelWithStringError;\n    /**\n     * Message for 502 error\n     */\n    502: ModelWithStringError;\n    /**\n     * Message for 4XX errors\n     */\n    '4XX': DictionaryWithArray;\n    /**\n     * Default error response\n     */\n    default: ModelWithBoolean;\n};\n\nexport type CallWithDuplicateResponsesError = CallWithDuplicateResponsesErrors[keyof CallWithDuplicateResponsesErrors];\n\nexport type CallWithDuplicateResponsesResponses = {\n    /**\n     * Message for 200 response\n     */\n    200: ModelWithBoolean & ModelWithInteger;\n    /**\n     * Message for 201 response\n     */\n    201: ModelWithString;\n    /**\n     * Message for 202 response\n     */\n    202: ModelWithString;\n};\n\nexport type CallWithDuplicateResponsesResponse = CallWithDuplicateResponsesResponses[keyof CallWithDuplicateResponsesResponses];\n\nexport type CallWithResponsesData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/response';\n};\n\nexport type CallWithResponsesErrors = {\n    /**\n     * Message for 500 error\n     */\n    500: ModelWithStringError;\n    /**\n     * Message for 501 error\n     */\n    501: ModelWithStringError;\n    /**\n     * Message for 502 error\n     */\n    502: ModelWithStringError;\n    /**\n     * Message for default response\n     */\n    default: ModelWithStringError;\n};\n\nexport type CallWithResponsesError = CallWithResponsesErrors[keyof CallWithResponsesErrors];\n\nexport type CallWithResponsesResponses = {\n    /**\n     * Message for 200 response\n     */\n    200: {\n        readonly '@namespace.string'?: string;\n        readonly '@namespace.integer'?: number;\n        readonly value?: Array<ModelWithString>;\n    };\n    /**\n     * Message for 201 response\n     */\n    201: ModelThatExtends;\n    /**\n     * Message for 202 response\n     */\n    202: ModelThatExtendsExtends;\n};\n\nexport type CallWithResponsesResponse = CallWithResponsesResponses[keyof CallWithResponsesResponses];\n\nexport type CollectionFormatData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * This is an array parameter that is sent as csv format (comma-separated values)\n         */\n        parameterArrayCSV: Array<string> | null;\n        /**\n         * This is an array parameter that is sent as ssv format (space-separated values)\n         */\n        parameterArraySSV: Array<string> | null;\n        /**\n         * This is an array parameter that is sent as tsv format (tab-separated values)\n         */\n        parameterArrayTSV: Array<string> | null;\n        /**\n         * This is an array parameter that is sent as pipes format (pipe-separated values)\n         */\n        parameterArrayPipes: Array<string> | null;\n        /**\n         * This is an array parameter that is sent as multi format (multiple parameter instances)\n         */\n        parameterArrayMulti: Array<string> | null;\n    };\n    url: '/api/v{api-version}/collectionFormat';\n};\n\nexport type TypesData = {\n    body?: never;\n    path?: {\n        /**\n         * This is a number parameter\n         */\n        id?: number;\n    };\n    query: {\n        /**\n         * This is a number parameter\n         */\n        parameterNumber: number;\n        /**\n         * This is a string parameter\n         */\n        parameterString: string | null;\n        /**\n         * This is a boolean parameter\n         */\n        parameterBoolean: boolean | null;\n        /**\n         * This is an object parameter\n         */\n        parameterObject: {\n            [key: string]: unknown;\n        } | null;\n        /**\n         * This is an array parameter\n         */\n        parameterArray: Array<string> | null;\n        /**\n         * This is a dictionary parameter\n         */\n        parameterDictionary: {\n            [key: string]: unknown;\n        } | null;\n        /**\n         * This is an enum parameter\n         */\n        parameterEnum: 'Success' | 'Warning' | 'Error';\n    };\n    url: '/api/v{api-version}/types';\n};\n\nexport type TypesResponses = {\n    /**\n     * Response is a simple number\n     */\n    200: number;\n    /**\n     * Response is a simple string\n     */\n    201: string;\n    /**\n     * Response is a simple boolean\n     */\n    202: boolean;\n    /**\n     * Response is a simple object\n     */\n    203: {\n        [key: string]: unknown;\n    };\n};\n\nexport type TypesResponse = TypesResponses[keyof TypesResponses];\n\nexport type UploadFileData = {\n    body: Blob | File;\n    path: {\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string | null;\n    };\n    query?: never;\n    url: '/api/v{api-version}/upload';\n};\n\nexport type UploadFileResponses = {\n    200: boolean;\n};\n\nexport type UploadFileResponse = UploadFileResponses[keyof UploadFileResponses];\n\nexport type FileResponseData = {\n    body?: never;\n    path: {\n        id: string;\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string;\n    };\n    query?: never;\n    url: '/api/v{api-version}/file/{id}';\n};\n\nexport type FileResponseResponses = {\n    /**\n     * Success\n     */\n    200: Blob | File;\n};\n\nexport type FileResponseResponse = FileResponseResponses[keyof FileResponseResponses];\n\nexport type ComplexTypesData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * Parameter containing object\n         */\n        parameterObject: {\n            first?: {\n                second?: {\n                    third?: string;\n                };\n            };\n        };\n        /**\n         * Parameter containing reference\n         */\n        parameterReference: ModelWithString;\n    };\n    url: '/api/v{api-version}/complex';\n};\n\nexport type ComplexTypesErrors = {\n    /**\n     * 400 `server` error\n     */\n    400: unknown;\n    /**\n     * 500 server error\n     */\n    500: unknown;\n};\n\nexport type ComplexTypesResponses = {\n    /**\n     * Successful response\n     */\n    200: Array<ModelWithString>;\n};\n\nexport type ComplexTypesResponse = ComplexTypesResponses[keyof ComplexTypesResponses];\n\nexport type MultipartResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multipart';\n};\n\nexport type MultipartResponseResponses = {\n    /**\n     * OK\n     */\n    200: {\n        file?: Blob | File;\n        metadata?: {\n            foo?: string;\n            bar?: string;\n        };\n    };\n};\n\nexport type MultipartResponseResponse = MultipartResponseResponses[keyof MultipartResponseResponses];\n\nexport type MultipartRequestData = {\n    body?: {\n        content?: Blob | File;\n        data?: ModelWithString | null;\n    };\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multipart';\n};\n\nexport type ComplexParamsData = {\n    body?: {\n        readonly key: string | null;\n        name: string | null;\n        enabled?: boolean;\n        type: 'Monkey' | 'Horse' | 'Bird';\n        listOfModels?: Array<ModelWithString> | null;\n        listOfStrings?: Array<string> | null;\n        parameters: ModelWithString | ModelWithEnum | ModelWithArray | ModelWithDictionary;\n        readonly user?: {\n            readonly id?: number;\n            readonly name?: string | null;\n        };\n    };\n    path: {\n        id: number;\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string;\n    };\n    query?: never;\n    url: '/api/v{api-version}/complex/{id}';\n};\n\nexport type ComplexParamsResponses = {\n    /**\n     * Success\n     */\n    200: ModelWithString;\n};\n\nexport type ComplexParamsResponse = ComplexParamsResponses[keyof ComplexParamsResponses];\n\nexport type CallWithResultFromHeaderData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/header';\n};\n\nexport type CallWithResultFromHeaderErrors = {\n    /**\n     * 400 server error\n     */\n    400: unknown;\n    /**\n     * 500 server error\n     */\n    500: unknown;\n};\n\nexport type CallWithResultFromHeaderResponses = {\n    /**\n     * Successful response\n     */\n    200: unknown;\n};\n\nexport type TestErrorCodeData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * Status code to return\n         */\n        status: number;\n    };\n    url: '/api/v{api-version}/error';\n};\n\nexport type TestErrorCodeErrors = {\n    /**\n     * Custom message: Internal Server Error\n     */\n    500: unknown;\n    /**\n     * Custom message: Not Implemented\n     */\n    501: unknown;\n    /**\n     * Custom message: Bad Gateway\n     */\n    502: unknown;\n    /**\n     * Custom message: Service Unavailable\n     */\n    503: unknown;\n};\n\nexport type TestErrorCodeResponses = {\n    /**\n     * Custom message: Successful response\n     */\n    200: unknown;\n};\n\nexport type NonAsciiæøåÆøÅöôêÊ字符串Data = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * Dummy input param\n         */\n        nonAsciiParamæøåÆØÅöôêÊ: number;\n    };\n    url: '/api/v{api-version}/non-ascii-æøåÆØÅöôêÊ字符串';\n};\n\nexport type NonAsciiæøåÆøÅöôêÊ字符串Responses = {\n    /**\n     * Successful response\n     */\n    200: Array<NonAsciiStringæøåÆøÅöôêÊ字符串>;\n};\n\nexport type NonAsciiæøåÆøÅöôêÊ字符串Response = NonAsciiæøåÆøÅöôêÊ字符串Responses[keyof NonAsciiæøåÆøÅöôêÊ字符串Responses];\n\nexport type PutWithFormUrlEncodedData = {\n    body: ArrayWithStrings;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/non-ascii-æøåÆØÅöôêÊ字符串';\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/nestjs/v11/__snapshots__/3.1.x/default/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type { _3eNum1Период, _400, AdditionalPropertiesIntegerIssue, AdditionalPropertiesUnknownIssue, AdditionalPropertiesUnknownIssue2, AdditionalPropertiesUnknownIssue3, AdditionalPropertiesUnknownIssueWritable, AnyOfAnyAndNull, AnyOfArrays, ApiVVersionODataControllerCountData, ApiVVersionODataControllerCountResponse, ApiVVersionODataControllerCountResponses, ArrayWithAnyOfProperties, ArrayWithArray, ArrayWithBooleans, ArrayWithNumbers, ArrayWithProperties, ArrayWithReferences, ArrayWithStrings, CallToTestOrderOfParamsData, CallWithDefaultOptionalParametersData, CallWithDefaultParametersData, CallWithDescriptionsData, CallWithDuplicateResponsesData, CallWithDuplicateResponsesError, CallWithDuplicateResponsesErrors, CallWithDuplicateResponsesResponse, CallWithDuplicateResponsesResponses, CallWithNoContentResponseData, CallWithNoContentResponseResponse, CallWithNoContentResponseResponses, CallWithParametersData, CallWithResponseAndNoContentResponseData, CallWithResponseAndNoContentResponseResponse, CallWithResponseAndNoContentResponseResponses, CallWithResponseData, CallWithResponseResponse, CallWithResponseResponses, CallWithResponsesData, CallWithResponsesError, CallWithResponsesErrors, CallWithResponsesResponse, CallWithResponsesResponses, CallWithResultFromHeaderData, CallWithResultFromHeaderErrors, CallWithResultFromHeaderResponses, CallWithWeirdParameterNamesData, CamelCaseCommentWithBreaks, CharactersInDescription, ClientOptions, CollectionFormatData, CommentWithBackticks, CommentWithBackticksAndQuotes, CommentWithBreaks, CommentWithExpressionPlaceholders, CommentWithQuotes, CommentWithReservedCharacters, CommentWithSlashes, ComplexParamsData, ComplexParamsResponse, ComplexParamsResponses, ComplexTypesData, ComplexTypesErrors, ComplexTypesResponse, ComplexTypesResponses, CompositionBaseModel, CompositionExtendedModel, CompositionWithAllOfAndNullable, CompositionWithAnyOf, CompositionWithAnyOfAndNullable, CompositionWithAnyOfAnonymous, CompositionWithNestedAnyAndTypeNull, CompositionWithNestedAnyOfAndNull, CompositionWithOneOf, CompositionWithOneOfAndComplexArrayDictionary, CompositionWithOneOfAndNullable, CompositionWithOneOfAndProperties, CompositionWithOneOfAndSimpleArrayDictionary, CompositionWithOneOfAndSimpleDictionary, CompositionWithOneOfAnonymous, CompositionWithOneOfDiscriminator, ConstValue, Default, DeleteCallWithoutParametersAndResponseData, DeleteFooData, DeleteFooData2, DeleteFooData3, DeprecatedCallData, DeprecatedModel, DictionaryWithArray, DictionaryWithDictionary, DictionaryWithProperties, DictionaryWithPropertiesAndAdditionalProperties, DictionaryWithReference, DictionaryWithString, DummyAData, DummyAResponse, DummyAResponses, DummyBData, DummyBResponse, DummyBResponses, DuplicateName2Data, DuplicateName3Data, DuplicateName4Data, DuplicateNameData, EnumFromDescription, EnumWithExtensions, EnumWithNumbers, EnumWithReplacedCharacters, EnumWithStrings, EnumWithXEnumNames, ExportData, ExternalRefA, ExternalRefB, ExternalSharedModel, File, FileResponseData, FileResponseResponse, FileResponseResponses, FileWritable, FooWowData, FooWowResponses, FreeFormObjectWithAdditionalPropertiesEqEmptyObject, FreeFormObjectWithAdditionalPropertiesEqTrue, FreeFormObjectWithoutAdditionalProperties, GenericSchemaDuplicateIssue1SystemBoolean, GenericSchemaDuplicateIssue1SystemBooleanWritable, GenericSchemaDuplicateIssue1SystemString, GenericSchemaDuplicateIssue1SystemStringWritable, GetApiVbyApiVersionSimpleOperationData, GetApiVbyApiVersionSimpleOperationError, GetApiVbyApiVersionSimpleOperationErrors, GetApiVbyApiVersionSimpleOperationResponse, GetApiVbyApiVersionSimpleOperationResponses, GetCallWithOptionalParamData, GetCallWithoutParametersAndResponseData, HeadCallWithoutParametersAndResponseData, Import, ImportData, ImportResponse, ImportResponses, IoK8sApimachineryPkgApisMetaV1DeleteOptions, IoK8sApimachineryPkgApisMetaV1Preconditions, ModelCircle, ModelFromZendesk, ModelSquare, ModelThatExtends, ModelThatExtendsExtends, ModelWithAdditionalPropertiesEqTrue, ModelWithAdditionalPropertiesRef, ModelWithAnyOfConstantSizeArray, ModelWithAnyOfConstantSizeArrayAndIntersect, ModelWithAnyOfConstantSizeArrayNullable, ModelWithAnyOfConstantSizeArrayWithNSizeAndOptions, ModelWithAnyOfConstantSizeArrayWithNSizeAndOptionsWritable, ModelWithArray, ModelWithArrayReadOnlyAndWriteOnly, ModelWithArrayReadOnlyAndWriteOnlyWritable, ModelWithBackticksInDescription, ModelWithBoolean, ModelWithCircularReference, ModelWithConst, ModelWithConstantSizeArray, ModelWithDictionary, ModelWithDuplicateImports, ModelWithDuplicateProperties, ModelWithEnum, ModelWithEnumFromDescription, ModelWithEnumWithHyphen, ModelWithInteger, ModelWithNestedArrayEnums, ModelWithNestedArrayEnumsData, ModelWithNestedArrayEnumsDataBar, ModelWithNestedArrayEnumsDataFoo, ModelWithNestedCompositionEnums, ModelWithNestedEnums, ModelWithNestedProperties, ModelWithNullableObject, ModelWithNullableString, ModelWithNumericEnumUnion, ModelWithOneOfAndProperties, ModelWithOneOfEnum, ModelWithOrderedProperties, ModelWithPattern, ModelWithPatternWritable, ModelWithPrefixItemsConstantSizeArray, ModelWithProperties, ModelWithPropertiesWritable, ModelWithReadOnlyAndWriteOnly, ModelWithReadOnlyAndWriteOnlyWritable, ModelWithReference, ModelWithReferenceWritable, ModelWithString, ModelWithStringError, MultipartRequestData, MultipartResponseData, MultipartResponseResponse, MultipartResponseResponses, NestedAnyOfArraysNullable, NonAsciiæøåÆøÅöôêÊ字符串Data, NonAsciiæøåÆøÅöôêÊ字符串Response, NonAsciiæøåÆøÅöôêÊ字符串Responses, NonAsciiStringæøåÆøÅöôêÊ字符串, NullableObject, OneOfAllOfIssue, OneOfAllOfIssueWritable, OptionsCallWithoutParametersAndResponseData, Pageable, ParameterSimpleParameterUnused, PatchApiVbyApiVersionNoTagData, PatchApiVbyApiVersionNoTagResponses, PatchCallWithoutParametersAndResponseData, PostApiVbyApiVersionFormDataData, PostApiVbyApiVersionRequestBodyData, PostCallWithOptionalParamData, PostCallWithOptionalParamResponse, PostCallWithOptionalParamResponses, PostCallWithoutParametersAndResponseData, PostServiceWithEmptyTagResponse, PostServiceWithEmptyTagResponse2, PutCallWithoutParametersAndResponseData, PutWithFormUrlEncodedData, SchemaWithFormRestrictedKeys, SimpleBoolean, SimpleFile, SimpleFormData, SimpleInteger, SimpleParameter, SimpleReference, SimpleRequestBody, SimpleString, SimpleStringWithPattern, TestErrorCodeData, TestErrorCodeErrors, TestErrorCodeResponses, TypesData, TypesResponse, TypesResponses, UploadFileData, UploadFileResponse, UploadFileResponses, XFooBar } from './types.gen';\n"
  },
  {
    "path": "packages/openapi-ts-tests/nestjs/v11/__snapshots__/3.1.x/default/nestjs.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { ApiVVersionODataControllerCountResponse, CallToTestOrderOfParamsData, CallWithDefaultOptionalParametersData, CallWithDefaultParametersData, CallWithDescriptionsData, CallWithDuplicateResponsesResponse, CallWithNoContentResponseResponse, CallWithParametersData, CallWithResponseAndNoContentResponseResponse, CallWithResponseResponse, CallWithResponsesResponse, CallWithWeirdParameterNamesData, CollectionFormatData, ComplexParamsData, ComplexParamsResponse, ComplexTypesData, ComplexTypesResponse, DeleteFooData3, DeprecatedCallData, DummyAResponse, DummyBResponse, FileResponseData, FileResponseResponse, GetApiVbyApiVersionSimpleOperationData, GetApiVbyApiVersionSimpleOperationResponse, GetCallWithOptionalParamData, ImportData, ImportResponse, MultipartRequestData, MultipartResponseResponse, NonAsciiæøåÆøÅöôêÊ字符串Data, NonAsciiæøåÆøÅöôêÊ字符串Response, PostApiVbyApiVersionFormDataData, PostApiVbyApiVersionRequestBodyData, PostCallWithOptionalParamData, PostCallWithOptionalParamResponse, PutWithFormUrlEncodedData, TestErrorCodeData, TypesData, TypesResponse, UploadFileData, UploadFileResponse } from './types.gen';\n\nexport type DefaultControllerMethods = {\n    export: () => Promise<void>;\n    patchApiVbyApiVersionNoTag: () => Promise<void>;\n    import: (body: ImportData['body']) => Promise<ImportResponse>;\n    fooWow: () => Promise<void>;\n    getApiVbyApiVersionSimpleOperation: (path: GetApiVbyApiVersionSimpleOperationData['path']) => Promise<GetApiVbyApiVersionSimpleOperationResponse>;\n};\n\nexport type SimpleControllerMethods = {\n    apiVVersionODataControllerCount: () => Promise<ApiVVersionODataControllerCountResponse>;\n    deleteCallWithoutParametersAndResponse: () => Promise<void>;\n    getCallWithoutParametersAndResponse: () => Promise<void>;\n    headCallWithoutParametersAndResponse: () => Promise<void>;\n    optionsCallWithoutParametersAndResponse: () => Promise<void>;\n    patchCallWithoutParametersAndResponse: () => Promise<void>;\n    postCallWithoutParametersAndResponse: () => Promise<void>;\n    putCallWithoutParametersAndResponse: () => Promise<void>;\n};\n\nexport type ParametersControllerMethods = {\n    deleteFoo: (path: DeleteFooData3['path'], headers: DeleteFooData3['headers']) => Promise<void>;\n    callWithParameters: (path: CallWithParametersData['path'], query: CallWithParametersData['query'], body: CallWithParametersData['body'], headers: CallWithParametersData['headers']) => Promise<void>;\n    callWithWeirdParameterNames: (path: CallWithWeirdParameterNamesData['path'], query: CallWithWeirdParameterNamesData['query'], body: CallWithWeirdParameterNamesData['body'], headers: CallWithWeirdParameterNamesData['headers']) => Promise<void>;\n    getCallWithOptionalParam: (body: GetCallWithOptionalParamData['body'], query?: GetCallWithOptionalParamData['query']) => Promise<void>;\n    postCallWithOptionalParam: (query: PostCallWithOptionalParamData['query'], body?: PostCallWithOptionalParamData['body']) => Promise<PostCallWithOptionalParamResponse>;\n};\n\nexport type DescriptionsControllerMethods = {\n    callWithDescriptions: (query?: CallWithDescriptionsData['query']) => Promise<void>;\n};\n\nexport type DeprecatedControllerMethods = {\n    deprecatedCall: (headers: DeprecatedCallData['headers']) => Promise<void>;\n};\n\nexport type RequestBodyControllerMethods = {\n    postApiVbyApiVersionRequestBody: (query?: PostApiVbyApiVersionRequestBodyData['query'], body?: PostApiVbyApiVersionRequestBodyData['body']) => Promise<void>;\n};\n\nexport type FormDataControllerMethods = {\n    postApiVbyApiVersionFormData: (query?: PostApiVbyApiVersionFormDataData['query'], body?: PostApiVbyApiVersionFormDataData['body']) => Promise<void>;\n};\n\nexport type DefaultsControllerMethods = {\n    callWithDefaultParameters: (query?: CallWithDefaultParametersData['query']) => Promise<void>;\n    callWithDefaultOptionalParameters: (query?: CallWithDefaultOptionalParametersData['query']) => Promise<void>;\n    callToTestOrderOfParams: (query: CallToTestOrderOfParamsData['query']) => Promise<void>;\n};\n\nexport type DuplicateControllerMethods = {\n    duplicateName: () => Promise<void>;\n    duplicateName2: () => Promise<void>;\n    duplicateName3: () => Promise<void>;\n    duplicateName4: () => Promise<void>;\n};\n\nexport type NoContentControllerMethods = {\n    callWithNoContentResponse: () => Promise<CallWithNoContentResponseResponse>;\n};\n\nexport type ResponseControllerMethods = {\n    callWithResponseAndNoContentResponse: () => Promise<CallWithResponseAndNoContentResponseResponse>;\n    callWithResponse: () => Promise<CallWithResponseResponse>;\n    callWithDuplicateResponses: () => Promise<CallWithDuplicateResponsesResponse>;\n    callWithResponses: () => Promise<CallWithResponsesResponse>;\n};\n\nexport type MultipleTags1ControllerMethods = {\n    dummyA: () => Promise<DummyAResponse>;\n    dummyB: () => Promise<DummyBResponse>;\n};\n\nexport type CollectionFormatControllerMethods = {\n    collectionFormat: (query: CollectionFormatData['query']) => Promise<void>;\n};\n\nexport type TypesControllerMethods = {\n    types: (query: TypesData['query'], path?: TypesData['path']) => Promise<TypesResponse>;\n};\n\nexport type UploadControllerMethods = {\n    uploadFile: (path: UploadFileData['path'], body: UploadFileData['body']) => Promise<UploadFileResponse>;\n};\n\nexport type FileResponseControllerMethods = {\n    fileResponse: (path: FileResponseData['path']) => Promise<FileResponseResponse>;\n};\n\nexport type ComplexControllerMethods = {\n    complexTypes: (query: ComplexTypesData['query']) => Promise<ComplexTypesResponse>;\n    complexParams: (path: ComplexParamsData['path'], body?: ComplexParamsData['body']) => Promise<ComplexParamsResponse>;\n};\n\nexport type MultipartControllerMethods = {\n    multipartResponse: () => Promise<MultipartResponseResponse>;\n    multipartRequest: (body?: MultipartRequestData['body']) => Promise<void>;\n};\n\nexport type HeaderControllerMethods = {\n    callWithResultFromHeader: () => Promise<void>;\n};\n\nexport type ErrorControllerMethods = {\n    testErrorCode: (query: TestErrorCodeData['query']) => Promise<void>;\n};\n\nexport type NonAsciiÆøåÆøÅöôêÊControllerMethods = {\n    nonAsciiæøåÆøÅöôêÊ字符串: (query: NonAsciiæøåÆøÅöôêÊ字符串Data['query']) => Promise<NonAsciiæøåÆøÅöôêÊ字符串Response>;\n    putWithFormUrlEncoded: (body: PutWithFormUrlEncodedData['body']) => Promise<void>;\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/nestjs/v11/__snapshots__/3.1.x/default/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type ClientOptions = {\n    baseUrl: 'http://localhost:3000/base' | (string & {});\n};\n\n/**\n * Model with number-only name\n */\nexport type _400 = string;\n\n/**\n * External ref to shared model (A)\n */\nexport type ExternalRefA = ExternalSharedModel;\n\n/**\n * External ref to shared model (B)\n */\nexport type ExternalRefB = ExternalSharedModel;\n\n/**\n * Testing multiline comments in string: First line\n * Second line\n *\n * Fourth line\n */\nexport type CamelCaseCommentWithBreaks = number;\n\n/**\n * Testing multiline comments in string: First line\n * Second line\n *\n * Fourth line\n */\nexport type CommentWithBreaks = number;\n\n/**\n * Testing backticks in string: `backticks` and ```multiple backticks``` should work\n */\nexport type CommentWithBackticks = number;\n\n/**\n * Testing backticks and quotes in string: `backticks`, 'quotes', \"double quotes\" and ```multiple backticks``` should work\n */\nexport type CommentWithBackticksAndQuotes = number;\n\n/**\n * Testing slashes in string: \\backwards\\\\\\ and /forwards/// should work\n */\nexport type CommentWithSlashes = number;\n\n/**\n * Testing expression placeholders in string: ${expression} should work\n */\nexport type CommentWithExpressionPlaceholders = number;\n\n/**\n * Testing quotes in string: 'single quote''' and \"double quotes\"\"\" should work\n */\nexport type CommentWithQuotes = number;\n\n/**\n * Testing reserved characters in string: * inline * and ** inline ** should work\n */\nexport type CommentWithReservedCharacters = number;\n\n/**\n * This is a simple number\n */\nexport type SimpleInteger = number;\n\n/**\n * This is a simple boolean\n */\nexport type SimpleBoolean = boolean;\n\n/**\n * This is a simple string\n */\nexport type SimpleString = string;\n\n/**\n * A string with non-ascii (unicode) characters valid in typescript identifiers (æøåÆØÅöÔèÈ字符串)\n */\nexport type NonAsciiStringæøåÆøÅöôêÊ字符串 = string;\n\n/**\n * This is a simple file\n */\nexport type SimpleFile = Blob | File;\n\n/**\n * This is a simple reference\n */\nexport type SimpleReference = ModelWithString;\n\n/**\n * This is a simple string\n */\nexport type SimpleStringWithPattern = string | null;\n\n/**\n * This is a simple enum with strings\n */\nexport type EnumWithStrings = 'Success' | 'Warning' | 'Error' | '\\'Single Quote\\'' | '\"Double Quotes\"' | 'Non-ascii: øæåôöØÆÅÔÖ字符串';\n\nexport type EnumWithReplacedCharacters = '\\'Single Quote\\'' | '\"Double Quotes\"' | 'øæåôöØÆÅÔÖ字符串' | 3.1 | '';\n\n/**\n * This is a simple enum with numbers\n */\nexport type EnumWithNumbers = 1 | 2 | 3 | 1.1 | 1.2 | 1.3 | 100 | 200 | 300 | -100 | -200 | -300 | -1.1 | -1.2 | -1.3;\n\n/**\n * Success=1,Warning=2,Error=3\n */\nexport type EnumFromDescription = number;\n\n/**\n * This is a simple enum with numbers\n */\nexport type EnumWithExtensions = 200 | 400 | 500;\n\nexport type EnumWithXEnumNames = 0 | 1 | 2;\n\n/**\n * This is a simple array with numbers\n */\nexport type ArrayWithNumbers = Array<number>;\n\n/**\n * This is a simple array with booleans\n */\nexport type ArrayWithBooleans = Array<boolean>;\n\n/**\n * This is a simple array with strings\n */\nexport type ArrayWithStrings = Array<string>;\n\n/**\n * This is a simple array with references\n */\nexport type ArrayWithReferences = Array<ModelWithString>;\n\n/**\n * This is a simple array containing an array\n */\nexport type ArrayWithArray = Array<Array<ModelWithString>>;\n\n/**\n * This is a simple array with properties\n */\nexport type ArrayWithProperties = Array<{\n    '16x16'?: CamelCaseCommentWithBreaks;\n    bar?: string;\n}>;\n\n/**\n * This is a simple array with any of properties\n */\nexport type ArrayWithAnyOfProperties = Array<{\n    foo?: string;\n} | {\n    bar?: string;\n}>;\n\nexport type AnyOfAnyAndNull = {\n    data?: unknown | null;\n};\n\n/**\n * This is a simple array with any of properties\n */\nexport type AnyOfArrays = {\n    results?: Array<{\n        foo?: string;\n    } | {\n        bar?: string;\n    }>;\n};\n\n/**\n * This is a string dictionary\n */\nexport type DictionaryWithString = {\n    [key: string]: string;\n};\n\nexport type DictionaryWithPropertiesAndAdditionalProperties = {\n    foo?: number;\n    bar?: boolean;\n    [key: string]: string | number | boolean | undefined;\n};\n\n/**\n * This is a string reference\n */\nexport type DictionaryWithReference = {\n    [key: string]: ModelWithString;\n};\n\n/**\n * This is a complex dictionary\n */\nexport type DictionaryWithArray = {\n    [key: string]: Array<ModelWithString>;\n};\n\n/**\n * This is a string dictionary\n */\nexport type DictionaryWithDictionary = {\n    [key: string]: {\n        [key: string]: string;\n    };\n};\n\n/**\n * This is a complex dictionary\n */\nexport type DictionaryWithProperties = {\n    [key: string]: {\n        foo?: string;\n        bar?: string;\n    };\n};\n\n/**\n * This is a model with one number property\n */\nexport type ModelWithInteger = {\n    /**\n     * This is a simple number property\n     */\n    prop?: number;\n};\n\n/**\n * This is a model with one boolean property\n */\nexport type ModelWithBoolean = {\n    /**\n     * This is a simple boolean property\n     */\n    prop?: boolean;\n};\n\n/**\n * This is a model with one string property\n */\nexport type ModelWithString = {\n    /**\n     * This is a simple string property\n     */\n    prop?: string;\n};\n\n/**\n * This is a model with one string property\n */\nexport type ModelWithStringError = {\n    /**\n     * This is a simple string property\n     */\n    prop?: string;\n};\n\n/**\n * `Comment` or `VoiceComment`. The JSON object for adding voice comments to tickets is different. See [Adding voice comments to tickets](/documentation/ticketing/managing-tickets/adding-voice-comments-to-tickets)\n */\nexport type ModelFromZendesk = string;\n\n/**\n * This is a model with one string property\n */\nexport type ModelWithNullableString = {\n    /**\n     * This is a simple string property\n     */\n    nullableProp1?: string | null;\n    /**\n     * This is a simple string property\n     */\n    nullableRequiredProp1: string | null;\n    /**\n     * This is a simple string property\n     */\n    nullableProp2?: string | null;\n    /**\n     * This is a simple string property\n     */\n    nullableRequiredProp2: string | null;\n    /**\n     * This is a simple enum with strings\n     */\n    'foo_bar-enum'?: 'Success' | 'Warning' | 'Error' | 'ØÆÅ字符串';\n};\n\n/**\n * This is a model with one enum\n */\nexport type ModelWithEnum = {\n    /**\n     * This is a simple enum with strings\n     */\n    'foo_bar-enum'?: 'Success' | 'Warning' | 'Error' | 'ØÆÅ字符串';\n    /**\n     * These are the HTTP error code enums\n     */\n    statusCode?: '100' | '200 FOO' | '300 FOO_BAR' | '400 foo-bar' | '500 foo.bar' | '600 foo&bar';\n    /**\n     * Simple boolean enum\n     */\n    bool?: true;\n};\n\n/**\n * This is a model with one enum with escaped name\n */\nexport type ModelWithEnumWithHyphen = {\n    /**\n     * Foo-Bar-Baz-Qux\n     */\n    'foo-bar-baz-qux'?: '3.0';\n};\n\n/**\n * This is a model with one enum\n */\nexport type ModelWithEnumFromDescription = {\n    /**\n     * Success=1,Warning=2,Error=3\n     */\n    test?: number;\n};\n\n/**\n * This is a model with nested enums\n */\nexport type ModelWithNestedEnums = {\n    dictionaryWithEnum?: {\n        [key: string]: 'Success' | 'Warning' | 'Error';\n    };\n    dictionaryWithEnumFromDescription?: {\n        [key: string]: number;\n    };\n    arrayWithEnum?: Array<'Success' | 'Warning' | 'Error'>;\n    arrayWithDescription?: Array<number>;\n    /**\n     * This is a simple enum with strings\n     */\n    'foo_bar-enum'?: 'Success' | 'Warning' | 'Error' | 'ØÆÅ字符串';\n};\n\n/**\n * This is a model with one property containing a reference\n */\nexport type ModelWithReference = {\n    prop?: ModelWithProperties;\n};\n\n/**\n * This is a model with one property containing an array\n */\nexport type ModelWithArrayReadOnlyAndWriteOnly = {\n    prop?: Array<ModelWithReadOnlyAndWriteOnly>;\n    propWithFile?: Array<Blob | File>;\n    propWithNumber?: Array<number>;\n};\n\n/**\n * This is a model with one property containing an array\n */\nexport type ModelWithArray = {\n    prop?: Array<ModelWithString>;\n    propWithFile?: Array<Blob | File>;\n    propWithNumber?: Array<number>;\n};\n\n/**\n * This is a model with one property containing a dictionary\n */\nexport type ModelWithDictionary = {\n    prop?: {\n        [key: string]: string;\n    };\n};\n\n/**\n * This is a deprecated model with a deprecated property\n *\n * @deprecated\n */\nexport type DeprecatedModel = {\n    /**\n     * This is a deprecated property\n     *\n     * @deprecated\n     */\n    prop?: string;\n};\n\n/**\n * This is a model with one property containing a circular reference\n */\nexport type ModelWithCircularReference = {\n    prop?: ModelWithCircularReference;\n};\n\n/**\n * This is a model with one property with a 'one of' relationship\n */\nexport type CompositionWithOneOf = {\n    propA?: ModelWithString | ModelWithEnum | ModelWithArray | ModelWithDictionary;\n};\n\n/**\n * This is a model with one property with a 'one of' relationship where the options are not $ref\n */\nexport type CompositionWithOneOfAnonymous = {\n    propA?: {\n        propA?: string;\n    } | string | number;\n};\n\n/**\n * Circle\n */\nexport type ModelCircle = {\n    kind: string;\n    radius?: number;\n};\n\n/**\n * Square\n */\nexport type ModelSquare = {\n    kind: string;\n    sideLength?: number;\n};\n\n/**\n * This is a model with one property with a 'one of' relationship where the options are not $ref\n */\nexport type CompositionWithOneOfDiscriminator = ({\n    kind: 'circle';\n} & ModelCircle) | ({\n    kind: 'square';\n} & ModelSquare);\n\n/**\n * This is a model with one property with a 'any of' relationship\n */\nexport type CompositionWithAnyOf = {\n    propA?: ModelWithString | ModelWithEnum | ModelWithArray | ModelWithDictionary;\n};\n\n/**\n * This is a model with one property with a 'any of' relationship where the options are not $ref\n */\nexport type CompositionWithAnyOfAnonymous = {\n    propA?: {\n        propA?: string;\n    } | string | number;\n};\n\n/**\n * This is a model with nested 'any of' property with a type null\n */\nexport type CompositionWithNestedAnyAndTypeNull = {\n    propA?: Array<ModelWithDictionary | null> | Array<ModelWithArray | null>;\n};\n\nexport type _3eNum1Период = 'Bird' | 'Dog';\n\nexport type ConstValue = 'ConstValue';\n\n/**\n * This is a model with one property with a 'any of' relationship where the options are not $ref\n */\nexport type CompositionWithNestedAnyOfAndNull = {\n    /**\n     * Scopes\n     */\n    propA?: Array<_3eNum1Период | ConstValue> | null;\n};\n\n/**\n * This is a model with one property with a 'one of' relationship\n */\nexport type CompositionWithOneOfAndNullable = {\n    propA?: {\n        boolean?: boolean;\n    } | ModelWithEnum | ModelWithArray | ModelWithDictionary | null;\n};\n\n/**\n * This is a model that contains a simple dictionary within composition\n */\nexport type CompositionWithOneOfAndSimpleDictionary = {\n    propA?: boolean | {\n        [key: string]: number;\n    };\n};\n\n/**\n * This is a model that contains a dictionary of simple arrays within composition\n */\nexport type CompositionWithOneOfAndSimpleArrayDictionary = {\n    propA?: boolean | {\n        [key: string]: Array<boolean>;\n    };\n};\n\n/**\n * This is a model that contains a dictionary of complex arrays (composited) within composition\n */\nexport type CompositionWithOneOfAndComplexArrayDictionary = {\n    propA?: boolean | {\n        [key: string]: Array<number | string>;\n    };\n};\n\n/**\n * This is a model with one property with a 'all of' relationship\n */\nexport type CompositionWithAllOfAndNullable = {\n    propA?: ({\n        boolean?: boolean;\n    } & ModelWithEnum & ModelWithArray & ModelWithDictionary) | null;\n};\n\n/**\n * This is a model with one property with a 'any of' relationship\n */\nexport type CompositionWithAnyOfAndNullable = {\n    propA?: {\n        boolean?: boolean;\n    } | ModelWithEnum | ModelWithArray | ModelWithDictionary | null;\n};\n\n/**\n * This is a base model with two simple optional properties\n */\nexport type CompositionBaseModel = {\n    firstName?: string;\n    lastname?: string;\n};\n\n/**\n * This is a model that extends the base model\n */\nexport type CompositionExtendedModel = CompositionBaseModel & {\n    age: number;\n    firstName: string;\n    lastname: string;\n};\n\n/**\n * This is a model with one nested property\n */\nexport type ModelWithProperties = {\n    required: string;\n    readonly requiredAndReadOnly: string;\n    requiredAndNullable: string | null;\n    string?: string;\n    number?: number;\n    boolean?: boolean;\n    reference?: ModelWithString;\n    'property with space'?: string;\n    default?: string;\n    try?: string;\n    readonly '@namespace.string'?: string;\n    readonly '@namespace.integer'?: number;\n};\n\n/**\n * This is a model with one nested property\n */\nexport type ModelWithNestedProperties = {\n    readonly first: {\n        readonly second: {\n            readonly third: string | null;\n        } | null;\n    } | null;\n};\n\n/**\n * This is a model with duplicated properties\n */\nexport type ModelWithDuplicateProperties = {\n    prop?: ModelWithString;\n};\n\n/**\n * This is a model with ordered properties\n */\nexport type ModelWithOrderedProperties = {\n    zebra?: string;\n    apple?: string;\n    hawaii?: string;\n};\n\n/**\n * This is a model with duplicated imports\n */\nexport type ModelWithDuplicateImports = {\n    propA?: ModelWithString;\n    propB?: ModelWithString;\n    propC?: ModelWithString;\n};\n\n/**\n * This is a model that extends another model\n */\nexport type ModelThatExtends = ModelWithString & {\n    propExtendsA?: string;\n    propExtendsB?: ModelWithString;\n};\n\n/**\n * This is a model that extends another model\n */\nexport type ModelThatExtendsExtends = ModelWithString & ModelThatExtends & {\n    propExtendsC?: string;\n    propExtendsD?: ModelWithString;\n};\n\n/**\n * This is a model that contains a some patterns\n */\nexport type ModelWithPattern = {\n    key: string;\n    name: string;\n    readonly enabled?: boolean;\n    readonly modified?: string;\n    id?: string;\n    text?: string;\n    patternWithSingleQuotes?: string;\n    patternWithNewline?: string;\n    patternWithBacktick?: string;\n    patternWithUnicode?: string;\n};\n\nexport type File = {\n    /**\n     * Id\n     */\n    readonly id?: string;\n    /**\n     * Updated at\n     */\n    readonly updated_at?: string;\n    /**\n     * Created at\n     */\n    readonly created_at?: string;\n    /**\n     * Mime\n     */\n    mime: string;\n    /**\n     * File\n     */\n    readonly file?: string;\n};\n\nexport type Default = {\n    name?: string;\n};\n\nexport type Pageable = {\n    page?: number;\n    size?: number;\n    sort?: Array<string>;\n};\n\n/**\n * This is a free-form object without additionalProperties.\n */\nexport type FreeFormObjectWithoutAdditionalProperties = {\n    [key: string]: unknown;\n};\n\n/**\n * This is a free-form object with additionalProperties: true.\n */\nexport type FreeFormObjectWithAdditionalPropertiesEqTrue = {\n    [key: string]: unknown;\n};\n\n/**\n * This is a free-form object with additionalProperties: {}.\n */\nexport type FreeFormObjectWithAdditionalPropertiesEqEmptyObject = {\n    [key: string]: unknown;\n};\n\nexport type ModelWithConst = {\n    String?: 'String';\n    number?: 0;\n    null?: null;\n    withType?: 'Some string';\n};\n\n/**\n * This is a model with one property and additionalProperties: true\n */\nexport type ModelWithAdditionalPropertiesEqTrue = {\n    /**\n     * This is a simple string property\n     */\n    prop?: string;\n    [key: string]: unknown;\n};\n\nexport type NestedAnyOfArraysNullable = {\n    nullableArray?: Array<string | boolean> | null;\n};\n\nexport type CompositionWithOneOfAndProperties = ({\n    foo: SimpleParameter;\n} | {\n    bar: NonAsciiStringæøåÆøÅöôêÊ字符串;\n}) & {\n    baz: number | null;\n    qux: number;\n};\n\n/**\n * An object that can be null\n */\nexport type NullableObject = {\n    foo?: string;\n} | null;\n\n/**\n * Some % character\n */\nexport type CharactersInDescription = string;\n\nexport type ModelWithNullableObject = {\n    data?: NullableObject;\n};\n\n/**\n * An object with additional properties that can be null (anyOf ref + null)\n */\nexport type ModelWithAdditionalPropertiesRef = {\n    [key: string]: NullableObject | null;\n};\n\nexport type ModelWithOneOfEnum = {\n    foo: 'Bar';\n} | {\n    foo: 'Baz';\n} | {\n    foo: 'Qux';\n} | {\n    content: string;\n    foo: 'Quux';\n} | {\n    content: [\n        string,\n        string\n    ];\n    foo: 'Corge';\n};\n\nexport type ModelWithNestedArrayEnumsDataFoo = 'foo' | 'bar';\n\nexport type ModelWithNestedArrayEnumsDataBar = 'baz' | 'qux';\n\nexport type ModelWithNestedArrayEnumsData = {\n    foo?: Array<ModelWithNestedArrayEnumsDataFoo>;\n    bar?: Array<ModelWithNestedArrayEnumsDataBar>;\n};\n\nexport type ModelWithNestedArrayEnums = {\n    array_strings?: Array<string>;\n    data?: ModelWithNestedArrayEnumsData;\n};\n\nexport type ModelWithNestedCompositionEnums = {\n    foo?: ModelWithNestedArrayEnumsDataFoo;\n};\n\nexport type ModelWithReadOnlyAndWriteOnly = {\n    foo: string;\n    readonly bar: string;\n};\n\nexport type ModelWithConstantSizeArray = [\n    number,\n    number\n];\n\nexport type ModelWithAnyOfConstantSizeArray = [\n    number | string,\n    number | string,\n    number | string\n];\n\nexport type ModelWithPrefixItemsConstantSizeArray = [\n    ModelWithInteger,\n    number | string,\n    string\n];\n\nexport type ModelWithAnyOfConstantSizeArrayNullable = [\n    number | null | string,\n    number | null | string,\n    number | null | string\n];\n\nexport type ModelWithAnyOfConstantSizeArrayWithNSizeAndOptions = [\n    number | Import,\n    number | Import\n];\n\nexport type ModelWithAnyOfConstantSizeArrayAndIntersect = [\n    number & string,\n    number & string\n];\n\nexport type ModelWithNumericEnumUnion = {\n    /**\n     * Период\n     */\n    value?: -10 | -1 | 0 | 1 | 3 | 6 | 12;\n};\n\n/**\n * Some description with `back ticks`\n */\nexport type ModelWithBackticksInDescription = {\n    /**\n     * The template `that` should be used for parsing and importing the contents of the CSV file.\n     *\n     * <br/><p>There is one placeholder currently supported:<ul>     <li><b>${x}</b> - refers to the n-th column in the CSV file, e.g. ${1}, ${2}, ...)</li></ul><p>Example of a correct JSON template:</p>\n     * <pre>\n     * [\n     * {\n     * \"resourceType\": \"Asset\",\n     * \"identifier\": {\n     * \"name\": \"${1}\",\n     * \"domain\": {\n     * \"name\": \"${2}\",\n     * \"community\": {\n     * \"name\": \"Some Community\"\n     * }\n     * }\n     * },\n     * \"attributes\" : {\n     * \"00000000-0000-0000-0000-000000003115\" : [ {\n     * \"value\" : \"${3}\"\n     * } ],\n     * \"00000000-0000-0000-0000-000000000222\" : [ {\n     * \"value\" : \"${4}\"\n     * } ]\n     * }\n     * }\n     * ]\n     * </pre>\n     */\n    template?: string;\n};\n\nexport type ModelWithOneOfAndProperties = (SimpleParameter | NonAsciiStringæøåÆøÅöôêÊ字符串) & {\n    baz: number | null;\n    qux: number;\n};\n\n/**\n * Model used to test deduplication strategy (unused)\n */\nexport type ParameterSimpleParameterUnused = string;\n\n/**\n * Model used to test deduplication strategy\n */\nexport type PostServiceWithEmptyTagResponse = string;\n\n/**\n * Model used to test deduplication strategy\n */\nexport type PostServiceWithEmptyTagResponse2 = string;\n\n/**\n * Model used to test deduplication strategy\n */\nexport type DeleteFooData = string;\n\n/**\n * Model used to test deduplication strategy\n */\nexport type DeleteFooData2 = string;\n\n/**\n * Model with restricted keyword name\n */\nexport type Import = string;\n\nexport type SchemaWithFormRestrictedKeys = {\n    description?: string;\n    'x-enum-descriptions'?: string;\n    'x-enum-varnames'?: string;\n    'x-enumNames'?: string;\n    title?: string;\n    object?: {\n        description?: string;\n        'x-enum-descriptions'?: string;\n        'x-enum-varnames'?: string;\n        'x-enumNames'?: string;\n        title?: string;\n    };\n    array?: Array<{\n        description?: string;\n        'x-enum-descriptions'?: string;\n        'x-enum-varnames'?: string;\n        'x-enumNames'?: string;\n        title?: string;\n    }>;\n};\n\n/**\n * This schema was giving PascalCase transformations a hard time\n */\nexport type IoK8sApimachineryPkgApisMetaV1DeleteOptions = {\n    /**\n     * Must be fulfilled before a deletion is carried out. If not possible, a 409 Conflict status will be returned.\n     */\n    preconditions?: IoK8sApimachineryPkgApisMetaV1Preconditions;\n};\n\n/**\n * This schema was giving PascalCase transformations a hard time\n */\nexport type IoK8sApimachineryPkgApisMetaV1Preconditions = {\n    /**\n     * Specifies the target ResourceVersion\n     */\n    resourceVersion?: string;\n    /**\n     * Specifies the target UID.\n     */\n    uid?: string;\n};\n\nexport type AdditionalPropertiesUnknownIssue = {\n    [key: string]: string | number;\n};\n\nexport type AdditionalPropertiesUnknownIssue2 = {\n    [key: string]: string | number;\n};\n\nexport type AdditionalPropertiesUnknownIssue3 = string & {\n    entries: {\n        [key: string]: AdditionalPropertiesUnknownIssue;\n    };\n};\n\nexport type AdditionalPropertiesIntegerIssue = {\n    value: number;\n    [key: string]: number;\n};\n\nexport type OneOfAllOfIssue = ((ConstValue | GenericSchemaDuplicateIssue1SystemBoolean) & _3eNum1Период) | GenericSchemaDuplicateIssue1SystemString;\n\nexport type GenericSchemaDuplicateIssue1SystemBoolean = {\n    item?: boolean;\n    error?: string | null;\n    readonly hasError?: boolean;\n    data?: {\n        [key: string]: never;\n    };\n};\n\nexport type GenericSchemaDuplicateIssue1SystemString = {\n    item?: string | null;\n    error?: string | null;\n    readonly hasError?: boolean;\n};\n\nexport type ExternalSharedModel = {\n    id: string;\n    name?: string;\n};\n\n/**\n * This is a model with one property containing a reference\n */\nexport type ModelWithReferenceWritable = {\n    prop?: ModelWithPropertiesWritable;\n};\n\n/**\n * This is a model with one property containing an array\n */\nexport type ModelWithArrayReadOnlyAndWriteOnlyWritable = {\n    prop?: Array<ModelWithReadOnlyAndWriteOnlyWritable>;\n    propWithFile?: Array<Blob | File>;\n    propWithNumber?: Array<number>;\n};\n\n/**\n * This is a model with one nested property\n */\nexport type ModelWithPropertiesWritable = {\n    required: string;\n    requiredAndNullable: string | null;\n    string?: string;\n    number?: number;\n    boolean?: boolean;\n    reference?: ModelWithString;\n    'property with space'?: string;\n    default?: string;\n    try?: string;\n};\n\n/**\n * This is a model that contains a some patterns\n */\nexport type ModelWithPatternWritable = {\n    key: string;\n    name: string;\n    id?: string;\n    text?: string;\n    patternWithSingleQuotes?: string;\n    patternWithNewline?: string;\n    patternWithBacktick?: string;\n    patternWithUnicode?: string;\n};\n\nexport type FileWritable = {\n    /**\n     * Mime\n     */\n    mime: string;\n};\n\nexport type ModelWithReadOnlyAndWriteOnlyWritable = {\n    foo: string;\n    baz: string;\n};\n\nexport type ModelWithAnyOfConstantSizeArrayWithNSizeAndOptionsWritable = [\n    number | Import,\n    number | Import\n];\n\nexport type AdditionalPropertiesUnknownIssueWritable = {\n    [key: string]: string | number;\n};\n\nexport type OneOfAllOfIssueWritable = ((ConstValue | GenericSchemaDuplicateIssue1SystemBoolean) & _3eNum1Период) | GenericSchemaDuplicateIssue1SystemString;\n\nexport type GenericSchemaDuplicateIssue1SystemBooleanWritable = {\n    item?: boolean;\n    error?: string | null;\n    data?: {\n        [key: string]: never;\n    };\n};\n\nexport type GenericSchemaDuplicateIssue1SystemStringWritable = {\n    item?: string | null;\n    error?: string | null;\n};\n\n/**\n * This is a reusable parameter\n */\nexport type SimpleParameter = string;\n\n/**\n * Parameter with illegal characters\n */\nexport type XFooBar = ModelWithString;\n\n/**\n * A reusable request body\n */\nexport type SimpleRequestBody = ModelWithString;\n\n/**\n * A reusable request body\n */\nexport type SimpleFormData = ModelWithString;\n\nexport type ExportData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no+tag';\n};\n\nexport type PatchApiVbyApiVersionNoTagData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no+tag';\n};\n\nexport type PatchApiVbyApiVersionNoTagResponses = {\n    /**\n     * OK\n     */\n    default: unknown;\n};\n\nexport type ImportData = {\n    body: ModelWithReadOnlyAndWriteOnlyWritable | ModelWithArrayReadOnlyAndWriteOnlyWritable;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no+tag';\n};\n\nexport type ImportResponses = {\n    /**\n     * Success\n     */\n    200: ModelFromZendesk;\n    /**\n     * Default success response\n     */\n    default: ModelWithReadOnlyAndWriteOnly;\n};\n\nexport type ImportResponse = ImportResponses[keyof ImportResponses];\n\nexport type FooWowData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no+tag';\n};\n\nexport type FooWowResponses = {\n    /**\n     * OK\n     */\n    default: unknown;\n};\n\nexport type ApiVVersionODataControllerCountData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple/$count';\n};\n\nexport type ApiVVersionODataControllerCountResponses = {\n    /**\n     * Success\n     */\n    200: ModelFromZendesk;\n};\n\nexport type ApiVVersionODataControllerCountResponse = ApiVVersionODataControllerCountResponses[keyof ApiVVersionODataControllerCountResponses];\n\nexport type GetApiVbyApiVersionSimpleOperationData = {\n    body?: never;\n    path: {\n        /**\n         * foo in method\n         */\n        foo_param: string;\n    };\n    query?: never;\n    url: '/api/v{api-version}/simple:operation';\n};\n\nexport type GetApiVbyApiVersionSimpleOperationErrors = {\n    /**\n     * Default error response\n     */\n    default: ModelWithBoolean;\n};\n\nexport type GetApiVbyApiVersionSimpleOperationError = GetApiVbyApiVersionSimpleOperationErrors[keyof GetApiVbyApiVersionSimpleOperationErrors];\n\nexport type GetApiVbyApiVersionSimpleOperationResponses = {\n    /**\n     * Response is a simple number\n     */\n    200: number;\n};\n\nexport type GetApiVbyApiVersionSimpleOperationResponse = GetApiVbyApiVersionSimpleOperationResponses[keyof GetApiVbyApiVersionSimpleOperationResponses];\n\nexport type DeleteCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type GetCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type HeadCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type OptionsCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type PatchCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type PostCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type PutCallWithoutParametersAndResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/simple';\n};\n\nexport type DeleteFooData3 = {\n    body?: never;\n    headers: {\n        /**\n         * Parameter with illegal characters\n         */\n        'x-Foo-Bar': ModelWithString;\n    };\n    path: {\n        /**\n         * foo in method\n         */\n        foo_param: string;\n        /**\n         * bar in method\n         */\n        BarParam: string;\n    };\n    query?: never;\n    url: '/api/v{api-version}/foo/{foo_param}/bar/{BarParam}';\n};\n\nexport type CallWithDescriptionsData = {\n    body?: never;\n    path?: never;\n    query?: {\n        /**\n         * Testing multiline comments in string: First line\n         * Second line\n         *\n         * Fourth line\n         */\n        parameterWithBreaks?: string;\n        /**\n         * Testing backticks in string: `backticks` and ```multiple backticks``` should work\n         */\n        parameterWithBackticks?: string;\n        /**\n         * Testing slashes in string: \\backwards\\\\\\ and /forwards/// should work\n         */\n        parameterWithSlashes?: string;\n        /**\n         * Testing expression placeholders in string: ${expression} should work\n         */\n        parameterWithExpressionPlaceholders?: string;\n        /**\n         * Testing quotes in string: 'single quote''' and \"double quotes\"\"\" should work\n         */\n        parameterWithQuotes?: string;\n        /**\n         * Testing reserved characters in string: * inline * and ** inline ** should work\n         */\n        parameterWithReservedCharacters?: string;\n    };\n    url: '/api/v{api-version}/descriptions';\n};\n\nexport type DeprecatedCallData = {\n    body?: never;\n    headers: {\n        /**\n         * This parameter is deprecated\n         *\n         * @deprecated\n         */\n        parameter: DeprecatedModel | null;\n    };\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/parameters/deprecated';\n};\n\nexport type CallWithParametersData = {\n    /**\n     * This is the parameter that goes into the body\n     */\n    body: {\n        [key: string]: unknown;\n    } | null;\n    headers: {\n        /**\n         * This is the parameter that goes into the header\n         */\n        parameterHeader: string | null;\n    };\n    path: {\n        /**\n         * This is the parameter that goes into the path\n         */\n        parameterPath: string | null;\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string | null;\n    };\n    query: {\n        foo_ref_enum?: ModelWithNestedArrayEnumsDataFoo;\n        foo_all_of_enum: ModelWithNestedArrayEnumsDataFoo;\n        /**\n         * This is the parameter that goes into the query params\n         */\n        cursor: string | null;\n    };\n    url: '/api/v{api-version}/parameters/{parameterPath}';\n};\n\nexport type CallWithWeirdParameterNamesData = {\n    /**\n     * This is the parameter that goes into the body\n     */\n    body: ModelWithString | null;\n    headers: {\n        /**\n         * This is the parameter that goes into the request header\n         */\n        'parameter.header': string | null;\n    };\n    path: {\n        /**\n         * This is the parameter that goes into the path\n         */\n        'parameter.path.1'?: string;\n        /**\n         * This is the parameter that goes into the path\n         */\n        'parameter-path-2'?: string;\n        /**\n         * This is the parameter that goes into the path\n         */\n        'PARAMETER-PATH-3'?: string;\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string | null;\n    };\n    query: {\n        /**\n         * This is the parameter with a reserved keyword\n         */\n        default?: string;\n        /**\n         * This is the parameter that goes into the request query params\n         */\n        'parameter-query': string | null;\n    };\n    url: '/api/v{api-version}/parameters/{parameter.path.1}/{parameter-path-2}/{PARAMETER-PATH-3}';\n};\n\nexport type GetCallWithOptionalParamData = {\n    /**\n     * This is a required parameter\n     */\n    body: ModelWithOneOfEnum;\n    path?: never;\n    query?: {\n        /**\n         * This is an optional parameter\n         */\n        page?: number;\n    };\n    url: '/api/v{api-version}/parameters';\n};\n\nexport type PostCallWithOptionalParamData = {\n    /**\n     * This is an optional parameter\n     */\n    body?: {\n        offset?: number | null;\n    };\n    path?: never;\n    query: {\n        /**\n         * This is a required parameter\n         */\n        parameter: Pageable;\n    };\n    url: '/api/v{api-version}/parameters';\n};\n\nexport type PostCallWithOptionalParamResponses = {\n    /**\n     * Response is a simple number\n     */\n    200: number;\n    /**\n     * Success\n     */\n    204: void;\n};\n\nexport type PostCallWithOptionalParamResponse = PostCallWithOptionalParamResponses[keyof PostCallWithOptionalParamResponses];\n\nexport type PostApiVbyApiVersionRequestBodyData = {\n    /**\n     * A reusable request body\n     */\n    body?: SimpleRequestBody;\n    path?: never;\n    query?: {\n        /**\n         * This is a reusable parameter\n         */\n        parameter?: string;\n    };\n    url: '/api/v{api-version}/requestBody';\n};\n\nexport type PostApiVbyApiVersionFormDataData = {\n    /**\n     * A reusable request body\n     */\n    body?: SimpleFormData;\n    path?: never;\n    query?: {\n        /**\n         * This is a reusable parameter\n         */\n        parameter?: string;\n    };\n    url: '/api/v{api-version}/formData';\n};\n\nexport type CallWithDefaultParametersData = {\n    body?: never;\n    path?: never;\n    query?: {\n        /**\n         * This is a simple string with default value\n         */\n        parameterString?: string | null;\n        /**\n         * This is a simple number with default value\n         */\n        parameterNumber?: number | null;\n        /**\n         * This is a simple boolean with default value\n         */\n        parameterBoolean?: boolean | null;\n        /**\n         * This is a simple enum with default value\n         */\n        parameterEnum?: 'Success' | 'Warning' | 'Error';\n        /**\n         * This is a simple model with default value\n         */\n        parameterModel?: ModelWithString | null;\n    };\n    url: '/api/v{api-version}/defaults';\n};\n\nexport type CallWithDefaultOptionalParametersData = {\n    body?: never;\n    path?: never;\n    query?: {\n        /**\n         * This is a simple string that is optional with default value\n         */\n        parameterString?: string;\n        /**\n         * This is a simple number that is optional with default value\n         */\n        parameterNumber?: number;\n        /**\n         * This is a simple boolean that is optional with default value\n         */\n        parameterBoolean?: boolean;\n        /**\n         * This is a simple enum that is optional with default value\n         */\n        parameterEnum?: 'Success' | 'Warning' | 'Error';\n        /**\n         * This is a simple model that is optional with default value\n         */\n        parameterModel?: ModelWithString;\n    };\n    url: '/api/v{api-version}/defaults';\n};\n\nexport type CallToTestOrderOfParamsData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * This is a optional string with default\n         */\n        parameterOptionalStringWithDefault?: string;\n        /**\n         * This is a optional string with empty default\n         */\n        parameterOptionalStringWithEmptyDefault?: string;\n        /**\n         * This is a optional string with no default\n         */\n        parameterOptionalStringWithNoDefault?: string;\n        /**\n         * This is a string with default\n         */\n        parameterStringWithDefault: string;\n        /**\n         * This is a string with empty default\n         */\n        parameterStringWithEmptyDefault: string;\n        /**\n         * This is a string with no default\n         */\n        parameterStringWithNoDefault: string;\n        /**\n         * This is a string that can be null with no default\n         */\n        parameterStringNullableWithNoDefault?: string | null;\n        /**\n         * This is a string that can be null with default\n         */\n        parameterStringNullableWithDefault?: string | null;\n    };\n    url: '/api/v{api-version}/defaults';\n};\n\nexport type DuplicateNameData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/duplicate';\n};\n\nexport type DuplicateName2Data = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/duplicate';\n};\n\nexport type DuplicateName3Data = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/duplicate';\n};\n\nexport type DuplicateName4Data = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/duplicate';\n};\n\nexport type CallWithNoContentResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/no-content';\n};\n\nexport type CallWithNoContentResponseResponses = {\n    /**\n     * Success\n     */\n    204: void;\n};\n\nexport type CallWithNoContentResponseResponse = CallWithNoContentResponseResponses[keyof CallWithNoContentResponseResponses];\n\nexport type CallWithResponseAndNoContentResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multiple-tags/response-and-no-content';\n};\n\nexport type CallWithResponseAndNoContentResponseResponses = {\n    /**\n     * Response is a simple number\n     */\n    200: number;\n    /**\n     * Success\n     */\n    204: void;\n};\n\nexport type CallWithResponseAndNoContentResponseResponse = CallWithResponseAndNoContentResponseResponses[keyof CallWithResponseAndNoContentResponseResponses];\n\nexport type DummyAData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multiple-tags/a';\n};\n\nexport type DummyAResponses = {\n    200: _400;\n};\n\nexport type DummyAResponse = DummyAResponses[keyof DummyAResponses];\n\nexport type DummyBData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multiple-tags/b';\n};\n\nexport type DummyBResponses = {\n    /**\n     * Success\n     */\n    204: void;\n};\n\nexport type DummyBResponse = DummyBResponses[keyof DummyBResponses];\n\nexport type CallWithResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/response';\n};\n\nexport type CallWithResponseResponses = {\n    default: Import;\n};\n\nexport type CallWithResponseResponse = CallWithResponseResponses[keyof CallWithResponseResponses];\n\nexport type CallWithDuplicateResponsesData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/response';\n};\n\nexport type CallWithDuplicateResponsesErrors = {\n    /**\n     * Message for 500 error\n     */\n    500: ModelWithStringError;\n    /**\n     * Message for 501 error\n     */\n    501: ModelWithStringError;\n    /**\n     * Message for 502 error\n     */\n    502: ModelWithStringError;\n    /**\n     * Message for 4XX errors\n     */\n    '4XX': DictionaryWithArray;\n    /**\n     * Default error response\n     */\n    default: ModelWithBoolean;\n};\n\nexport type CallWithDuplicateResponsesError = CallWithDuplicateResponsesErrors[keyof CallWithDuplicateResponsesErrors];\n\nexport type CallWithDuplicateResponsesResponses = {\n    /**\n     * Message for 200 response\n     */\n    200: ModelWithBoolean & ModelWithInteger;\n    /**\n     * Message for 201 response\n     */\n    201: ModelWithString;\n    /**\n     * Message for 202 response\n     */\n    202: ModelWithString;\n};\n\nexport type CallWithDuplicateResponsesResponse = CallWithDuplicateResponsesResponses[keyof CallWithDuplicateResponsesResponses];\n\nexport type CallWithResponsesData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/response';\n};\n\nexport type CallWithResponsesErrors = {\n    /**\n     * Message for 500 error\n     */\n    500: ModelWithStringError;\n    /**\n     * Message for 501 error\n     */\n    501: ModelWithStringError;\n    /**\n     * Message for 502 error\n     */\n    502: ModelWithStringError;\n    /**\n     * Message for default response\n     */\n    default: ModelWithStringError;\n};\n\nexport type CallWithResponsesError = CallWithResponsesErrors[keyof CallWithResponsesErrors];\n\nexport type CallWithResponsesResponses = {\n    /**\n     * Message for 200 response\n     */\n    200: {\n        readonly '@namespace.string'?: string;\n        readonly '@namespace.integer'?: number;\n        readonly value?: Array<ModelWithString>;\n    };\n    /**\n     * Message for 201 response\n     */\n    201: ModelThatExtends;\n    /**\n     * Message for 202 response\n     */\n    202: ModelThatExtendsExtends;\n};\n\nexport type CallWithResponsesResponse = CallWithResponsesResponses[keyof CallWithResponsesResponses];\n\nexport type CollectionFormatData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * This is an array parameter that is sent as csv format (comma-separated values)\n         */\n        parameterArrayCSV: Array<string> | null;\n        /**\n         * This is an array parameter that is sent as ssv format (space-separated values)\n         */\n        parameterArraySSV: Array<string> | null;\n        /**\n         * This is an array parameter that is sent as tsv format (tab-separated values)\n         */\n        parameterArrayTSV: Array<string> | null;\n        /**\n         * This is an array parameter that is sent as pipes format (pipe-separated values)\n         */\n        parameterArrayPipes: Array<string> | null;\n        /**\n         * This is an array parameter that is sent as multi format (multiple parameter instances)\n         */\n        parameterArrayMulti: Array<string> | null;\n    };\n    url: '/api/v{api-version}/collectionFormat';\n};\n\nexport type TypesData = {\n    body?: never;\n    path?: {\n        /**\n         * This is a number parameter\n         */\n        id?: number;\n    };\n    query: {\n        /**\n         * This is a number parameter\n         */\n        parameterNumber: number;\n        /**\n         * This is a string parameter\n         */\n        parameterString: string | null;\n        /**\n         * This is a boolean parameter\n         */\n        parameterBoolean: boolean | null;\n        /**\n         * This is an object parameter\n         */\n        parameterObject: {\n            [key: string]: unknown;\n        } | null;\n        /**\n         * This is an array parameter\n         */\n        parameterArray: Array<string> | null;\n        /**\n         * This is a dictionary parameter\n         */\n        parameterDictionary: {\n            [key: string]: unknown;\n        } | null;\n        /**\n         * This is an enum parameter\n         */\n        parameterEnum: 'Success' | 'Warning' | 'Error' | null;\n    };\n    url: '/api/v{api-version}/types';\n};\n\nexport type TypesResponses = {\n    /**\n     * Response is a simple number\n     */\n    200: number;\n    /**\n     * Response is a simple string\n     */\n    201: string;\n    /**\n     * Response is a simple boolean\n     */\n    202: boolean;\n    /**\n     * Response is a simple object\n     */\n    203: {\n        [key: string]: unknown;\n    };\n};\n\nexport type TypesResponse = TypesResponses[keyof TypesResponses];\n\nexport type UploadFileData = {\n    body: Blob | File;\n    path: {\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string | null;\n    };\n    query?: never;\n    url: '/api/v{api-version}/upload';\n};\n\nexport type UploadFileResponses = {\n    200: boolean;\n};\n\nexport type UploadFileResponse = UploadFileResponses[keyof UploadFileResponses];\n\nexport type FileResponseData = {\n    body?: never;\n    path: {\n        id: string;\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string;\n    };\n    query?: never;\n    url: '/api/v{api-version}/file/{id}';\n};\n\nexport type FileResponseResponses = {\n    /**\n     * Success\n     */\n    200: Blob | File;\n};\n\nexport type FileResponseResponse = FileResponseResponses[keyof FileResponseResponses];\n\nexport type ComplexTypesData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * Parameter containing object\n         */\n        parameterObject: {\n            first?: {\n                second?: {\n                    third?: string;\n                };\n            };\n        };\n        /**\n         * Parameter containing reference\n         */\n        parameterReference: ModelWithString;\n    };\n    url: '/api/v{api-version}/complex';\n};\n\nexport type ComplexTypesErrors = {\n    /**\n     * 400 `server` error\n     */\n    400: unknown;\n    /**\n     * 500 server error\n     */\n    500: unknown;\n};\n\nexport type ComplexTypesResponses = {\n    /**\n     * Successful response\n     */\n    200: Array<ModelWithString>;\n};\n\nexport type ComplexTypesResponse = ComplexTypesResponses[keyof ComplexTypesResponses];\n\nexport type MultipartResponseData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multipart';\n};\n\nexport type MultipartResponseResponses = {\n    /**\n     * OK\n     */\n    200: {\n        file?: Blob | File;\n        metadata?: {\n            foo?: string;\n            bar?: string;\n        };\n    };\n};\n\nexport type MultipartResponseResponse = MultipartResponseResponses[keyof MultipartResponseResponses];\n\nexport type MultipartRequestData = {\n    body?: {\n        content?: Blob | File;\n        data?: ModelWithString | null;\n    };\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/multipart';\n};\n\nexport type ComplexParamsData = {\n    body?: {\n        readonly key: string | null;\n        name: string | null;\n        enabled?: boolean;\n        type: 'Monkey' | 'Horse' | 'Bird';\n        listOfModels?: Array<ModelWithString> | null;\n        listOfStrings?: Array<string> | null;\n        parameters: ModelWithString | ModelWithEnum | ModelWithArray | ModelWithDictionary;\n        readonly user?: {\n            readonly id?: number;\n            readonly name?: string | null;\n        };\n    };\n    path: {\n        id: number;\n        /**\n         * api-version should be required in standalone clients\n         */\n        'api-version': string;\n    };\n    query?: never;\n    url: '/api/v{api-version}/complex/{id}';\n};\n\nexport type ComplexParamsResponses = {\n    /**\n     * Success\n     */\n    200: ModelWithString;\n};\n\nexport type ComplexParamsResponse = ComplexParamsResponses[keyof ComplexParamsResponses];\n\nexport type CallWithResultFromHeaderData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/header';\n};\n\nexport type CallWithResultFromHeaderErrors = {\n    /**\n     * 400 server error\n     */\n    400: unknown;\n    /**\n     * 500 server error\n     */\n    500: unknown;\n};\n\nexport type CallWithResultFromHeaderResponses = {\n    /**\n     * Successful response\n     */\n    200: unknown;\n};\n\nexport type TestErrorCodeData = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * Status code to return\n         */\n        status: number;\n    };\n    url: '/api/v{api-version}/error';\n};\n\nexport type TestErrorCodeErrors = {\n    /**\n     * Custom message: Internal Server Error\n     */\n    500: unknown;\n    /**\n     * Custom message: Not Implemented\n     */\n    501: unknown;\n    /**\n     * Custom message: Bad Gateway\n     */\n    502: unknown;\n    /**\n     * Custom message: Service Unavailable\n     */\n    503: unknown;\n};\n\nexport type TestErrorCodeResponses = {\n    /**\n     * Custom message: Successful response\n     */\n    200: unknown;\n};\n\nexport type NonAsciiæøåÆøÅöôêÊ字符串Data = {\n    body?: never;\n    path?: never;\n    query: {\n        /**\n         * Dummy input param\n         */\n        nonAsciiParamæøåÆØÅöôêÊ: number;\n    };\n    url: '/api/v{api-version}/non-ascii-æøåÆØÅöôêÊ字符串';\n};\n\nexport type NonAsciiæøåÆøÅöôêÊ字符串Responses = {\n    /**\n     * Successful response\n     */\n    200: Array<NonAsciiStringæøåÆøÅöôêÊ字符串>;\n};\n\nexport type NonAsciiæøåÆøÅöôêÊ字符串Response = NonAsciiæøåÆøÅöôêÊ字符串Responses[keyof NonAsciiæøåÆøÅöôêÊ字符串Responses];\n\nexport type PutWithFormUrlEncodedData = {\n    body: ArrayWithStrings;\n    path?: never;\n    query?: never;\n    url: '/api/v{api-version}/non-ascii-æøåÆØÅöôêÊ字符串';\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/nestjs/v11/package.json",
    "content": "{\n  \"name\": \"@test/openapi-ts-nestjs-v11\",\n  \"version\": \"0.0.0\",\n  \"private\": true,\n  \"type\": \"module\",\n  \"scripts\": {\n    \"typecheck\": \"tsgo --noEmit\"\n  },\n  \"devDependencies\": {\n    \"@hey-api/openapi-ts\": \"workspace:*\",\n    \"typescript\": \"5.9.3\"\n  },\n  \"engines\": {\n    \"node\": \">=20.19.0\"\n  }\n}\n"
  },
  {
    "path": "packages/openapi-ts-tests/nestjs/v11/test/plugins.test.ts",
    "content": "import fs from 'node:fs';\nimport path from 'node:path';\nimport { fileURLToPath } from 'node:url';\n\nimport { createClient, type UserConfig } from '@hey-api/openapi-ts';\n\nimport { getFilePaths, getSpecsPath } from '../../../utils';\n\nconst __filename = fileURLToPath(import.meta.url);\nconst __dirname = path.dirname(__filename);\n\nconst versions = ['2.0.x', '3.0.x', '3.1.x'];\n\nfor (const version of versions) {\n  const outputDir = path.join(__dirname, '..', '.gen', 'snapshots', version);\n  const snapshotsDir = path.join(__dirname, '..', '__snapshots__', version);\n\n  describe(`OpenAPI ${version} nestjs`, () => {\n    const createConfig = (\n      userConfig: Omit<UserConfig, 'input'> &\n        Pick<Required<UserConfig>, 'plugins'> &\n        Pick<Partial<UserConfig>, 'input'>,\n    ) =>\n      ({\n        ...userConfig,\n        input: path.join(\n          getSpecsPath(),\n          version,\n          typeof userConfig.input === 'string' ? userConfig.input : 'full.yaml',\n        ),\n        logs: {\n          level: 'silent',\n        },\n        output: path.join(\n          outputDir,\n          typeof userConfig.output === 'string' ? userConfig.output : '',\n        ),\n        plugins: userConfig.plugins ?? ['@hey-api/client-fetch'],\n      }) as const satisfies UserConfig;\n\n    const scenarios = [\n      {\n        config: createConfig({\n          output: 'default',\n          plugins: ['nestjs'],\n        }),\n        description: 'generate NestJS types with NestJS plugin',\n      },\n    ];\n\n    it.each(scenarios)('$description', async ({ config }) => {\n      await createClient(config);\n\n      const filePaths = getFilePaths(config.output);\n\n      await Promise.all(\n        filePaths.map(async (filePath) => {\n          const fileContent = fs.readFileSync(filePath, 'utf-8');\n          await expect(fileContent).toMatchFileSnapshot(\n            path.join(snapshotsDir, filePath.slice(outputDir.length + 1)),\n          );\n        }),\n      );\n    });\n  });\n}\n"
  },
  {
    "path": "packages/openapi-ts-tests/nestjs/v11/tsconfig.json",
    "content": "{\n  \"extends\": \"../../tsconfig.base.json\",\n  \"include\": [\"test/**/*\", \"__snapshots__/**/*\"],\n  \"exclude\": [\".gen/**/*\"],\n  \"references\": [{ \"path\": \"../../../openapi-ts\" }]\n}\n"
  },
  {
    "path": "packages/openapi-ts-tests/nestjs/v11/turbo.json",
    "content": "{\n  \"$schema\": \"../../../../node_modules/turbo/schema.json\",\n  \"extends\": [\"//\"],\n  \"tasks\": {\n    \"build\": {\n      \"dependsOn\": [],\n      \"outputs\": [\"dist/**\"]\n    }\n  }\n}\n"
  },
  {
    "path": "packages/openapi-ts-tests/nestjs/v11/vitest.setup.ts",
    "content": "import { fileURLToPath } from 'node:url';\n\nimport { beforeAll } from 'vitest';\n\nbeforeAll(() => {\n  process.chdir(fileURLToPath(new URL('.', import.meta.url)));\n});\n"
  },
  {
    "path": "packages/openapi-ts-tests/orpc/v1/.gitignore",
    "content": ".DS_Store\n.idea\n.tmp\nlogs\nnode_modules\n\n.env\ncoverage\ndist\n"
  },
  {
    "path": "packages/openapi-ts-tests/orpc/v1/__snapshots__/3.0.x/custom-names/orpc.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport { oc } from '@orpc/contract';\n\nimport { vCreatePostData, vCreatePostResponse, vCreateUserData, vCreateUserResponse, vDeleteUserData, vGetPostByIdData, vGetPostByIdResponse, vGetPostsData, vGetPostsResponse, vGetUserByIdData, vGetUserByIdResponse, vGetUsersData, vGetUsersResponse, vUpdateUserData, vUpdateUserResponse } from './valibot.gen';\n\nexport const base = oc.$route({ inputStructure: 'detailed' });\n\n/**\n * Get all users\n */\nexport const getUsersRpc = base.route({\n    method: 'GET',\n    operationId: 'getUsers',\n    path: '/users',\n    summary: 'Get all users',\n    tags: ['users']\n}).input(vGetUsersData).output(vGetUsersResponse);\n\n/**\n * Create a new user\n */\nexport const createUserRpc = base.route({\n    method: 'POST',\n    operationId: 'createUser',\n    path: '/users',\n    successStatus: 201,\n    summary: 'Create a new user',\n    tags: ['users']\n}).input(vCreateUserData).output(vCreateUserResponse);\n\n/**\n * Delete a user\n */\nexport const deleteUserRpc = base.route({\n    method: 'DELETE',\n    operationId: 'deleteUser',\n    path: '/users/{userId}',\n    summary: 'Delete a user',\n    tags: ['users']\n}).input(vDeleteUserData);\n\n/**\n * Get a user by ID\n */\nexport const getUserByIdRpc = base.route({\n    method: 'GET',\n    operationId: 'getUserById',\n    path: '/users/{userId}',\n    summary: 'Get a user by ID',\n    tags: ['users']\n}).input(vGetUserByIdData).output(vGetUserByIdResponse);\n\n/**\n * Update a user\n */\nexport const updateUserRpc = base.route({\n    method: 'PUT',\n    operationId: 'updateUser',\n    path: '/users/{userId}',\n    summary: 'Update a user',\n    tags: ['users']\n}).input(vUpdateUserData).output(vUpdateUserResponse);\n\n/**\n * Get all posts\n */\nexport const getPostsRpc = base.route({\n    method: 'GET',\n    operationId: 'getPosts',\n    path: '/posts',\n    summary: 'Get all posts',\n    tags: ['posts']\n}).input(vGetPostsData).output(vGetPostsResponse);\n\n/**\n * Create a new post\n */\nexport const createPostRpc = base.route({\n    method: 'POST',\n    operationId: 'createPost',\n    path: '/posts',\n    successStatus: 201,\n    summary: 'Create a new post',\n    tags: ['posts']\n}).input(vCreatePostData).output(vCreatePostResponse);\n\n/**\n * Get a post by ID\n */\nexport const getPostByIdRpc = base.route({\n    method: 'GET',\n    operationId: 'getPostById',\n    path: '/posts/{postId}',\n    summary: 'Get a post by ID',\n    tags: ['posts']\n}).input(vGetPostByIdData).output(vGetPostByIdResponse);\n\nexport const rpcContract = {\n    getUsersRpc,\n    createUserRpc,\n    deleteUserRpc,\n    getUserByIdRpc,\n    updateUserRpc,\n    getPostsRpc,\n    createPostRpc,\n    getPostByIdRpc\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/orpc/v1/__snapshots__/3.0.x/custom-names/valibot.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport * as v from 'valibot';\n\nexport const vUser = v.object({\n    id: v.string(),\n    email: v.pipe(v.string(), v.email()),\n    name: v.string(),\n    createdAt: v.optional(v.pipe(v.string(), v.isoTimestamp()))\n});\n\nexport const vCreateUserInput = v.object({\n    email: v.pipe(v.string(), v.email()),\n    name: v.string(),\n    password: v.optional(v.pipe(v.string(), v.minLength(8)))\n});\n\nexport const vUpdateUserInput = v.object({\n    email: v.optional(v.pipe(v.string(), v.email())),\n    name: v.optional(v.string())\n});\n\nexport const vPost = v.object({\n    id: v.string(),\n    title: v.string(),\n    content: v.string(),\n    authorId: v.string(),\n    status: v.optional(v.picklist([\n        'draft',\n        'published',\n        'archived'\n    ])),\n    createdAt: v.optional(v.pipe(v.string(), v.isoTimestamp()))\n});\n\nexport const vCreatePostInput = v.object({\n    title: v.string(),\n    content: v.string(),\n    status: v.optional(v.picklist(['draft', 'published']))\n});\n\nexport const vGetUsersData = v.object({\n    body: v.optional(v.never()),\n    path: v.optional(v.never()),\n    query: v.optional(v.object({\n        limit: v.optional(v.pipe(v.number(), v.integer()), 10),\n        offset: v.optional(v.pipe(v.number(), v.integer()), 0)\n    }))\n});\n\n/**\n * List of users\n */\nexport const vGetUsersResponse = v.array(vUser);\n\nexport const vCreateUserData = v.object({\n    body: vCreateUserInput,\n    path: v.optional(v.never()),\n    query: v.optional(v.never())\n});\n\n/**\n * User created\n */\nexport const vCreateUserResponse = vUser;\n\nexport const vDeleteUserData = v.object({\n    body: v.optional(v.never()),\n    path: v.object({\n        userId: v.string()\n    }),\n    query: v.optional(v.never()),\n    headers: v.optional(v.object({\n        'X-Request-Id': v.optional(v.string())\n    }))\n});\n\n/**\n * User deleted\n */\nexport const vDeleteUserResponse = v.void();\n\nexport const vGetUserByIdData = v.object({\n    body: v.optional(v.never()),\n    path: v.object({\n        userId: v.string()\n    }),\n    query: v.optional(v.never())\n});\n\n/**\n * User found\n */\nexport const vGetUserByIdResponse = vUser;\n\nexport const vUpdateUserData = v.object({\n    body: vUpdateUserInput,\n    path: v.object({\n        userId: v.string()\n    }),\n    query: v.optional(v.never())\n});\n\n/**\n * User updated\n */\nexport const vUpdateUserResponse = vUser;\n\nexport const vGetPostsData = v.object({\n    body: v.optional(v.never()),\n    path: v.optional(v.never()),\n    query: v.optional(v.object({\n        authorId: v.optional(v.string()),\n        status: v.optional(v.picklist([\n            'draft',\n            'published',\n            'archived'\n        ]))\n    }))\n});\n\n/**\n * List of posts\n */\nexport const vGetPostsResponse = v.array(vPost);\n\nexport const vCreatePostData = v.object({\n    body: vCreatePostInput,\n    path: v.optional(v.never()),\n    query: v.optional(v.never()),\n    headers: v.object({\n        'X-Author-Id': v.string()\n    })\n});\n\n/**\n * Post created\n */\nexport const vCreatePostResponse = vPost;\n\nexport const vGetPostByIdData = v.object({\n    body: v.optional(v.never()),\n    path: v.object({\n        postId: v.string()\n    }),\n    query: v.optional(v.object({\n        includeComments: v.optional(v.boolean(), false)\n    }))\n});\n\n/**\n * Post found\n */\nexport const vGetPostByIdResponse = vPost;\n"
  },
  {
    "path": "packages/openapi-ts-tests/orpc/v1/__snapshots__/3.0.x/default/orpc.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport { oc } from '@orpc/contract';\n\nimport { zCreatePostData, zCreatePostResponse, zCreateUserData, zCreateUserResponse, zDeleteUserData, zGetPostByIdData, zGetPostByIdResponse, zGetPostsData, zGetPostsResponse, zGetUserByIdData, zGetUserByIdResponse, zGetUsersData, zGetUsersResponse, zUpdateUserData, zUpdateUserResponse } from './zod.gen';\n\nexport const base = oc.$route({ inputStructure: 'detailed' });\n\n/**\n * Get all users\n */\nexport const getUsers = base.route({\n    method: 'GET',\n    operationId: 'getUsers',\n    path: '/users',\n    summary: 'Get all users',\n    tags: ['users']\n}).input(zGetUsersData).output(zGetUsersResponse);\n\n/**\n * Create a new user\n */\nexport const createUser = base.route({\n    method: 'POST',\n    operationId: 'createUser',\n    path: '/users',\n    successStatus: 201,\n    summary: 'Create a new user',\n    tags: ['users']\n}).input(zCreateUserData).output(zCreateUserResponse);\n\n/**\n * Delete a user\n */\nexport const deleteUser = base.route({\n    method: 'DELETE',\n    operationId: 'deleteUser',\n    path: '/users/{userId}',\n    summary: 'Delete a user',\n    tags: ['users']\n}).input(zDeleteUserData);\n\n/**\n * Get a user by ID\n */\nexport const getUserById = base.route({\n    method: 'GET',\n    operationId: 'getUserById',\n    path: '/users/{userId}',\n    summary: 'Get a user by ID',\n    tags: ['users']\n}).input(zGetUserByIdData).output(zGetUserByIdResponse);\n\n/**\n * Update a user\n */\nexport const updateUser = base.route({\n    method: 'PUT',\n    operationId: 'updateUser',\n    path: '/users/{userId}',\n    summary: 'Update a user',\n    tags: ['users']\n}).input(zUpdateUserData).output(zUpdateUserResponse);\n\n/**\n * Get all posts\n */\nexport const getPosts = base.route({\n    method: 'GET',\n    operationId: 'getPosts',\n    path: '/posts',\n    summary: 'Get all posts',\n    tags: ['posts']\n}).input(zGetPostsData).output(zGetPostsResponse);\n\n/**\n * Create a new post\n */\nexport const createPost = base.route({\n    method: 'POST',\n    operationId: 'createPost',\n    path: '/posts',\n    successStatus: 201,\n    summary: 'Create a new post',\n    tags: ['posts']\n}).input(zCreatePostData).output(zCreatePostResponse);\n\n/**\n * Get a post by ID\n */\nexport const getPostById = base.route({\n    method: 'GET',\n    operationId: 'getPostById',\n    path: '/posts/{postId}',\n    summary: 'Get a post by ID',\n    tags: ['posts']\n}).input(zGetPostByIdData).output(zGetPostByIdResponse);\n\nexport const contract = {\n    getUsers,\n    createUser,\n    deleteUser,\n    getUserById,\n    updateUser,\n    getPosts,\n    createPost,\n    getPostById\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/orpc/v1/__snapshots__/3.0.x/default/zod.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport * as z from 'zod';\n\nexport const zUser = z.object({\n    id: z.string(),\n    email: z.email(),\n    name: z.string(),\n    createdAt: z.iso.datetime().optional()\n});\n\nexport const zCreateUserInput = z.object({\n    email: z.email(),\n    name: z.string(),\n    password: z.string().min(8).optional()\n});\n\nexport const zUpdateUserInput = z.object({\n    email: z.email().optional(),\n    name: z.string().optional()\n});\n\nexport const zPost = z.object({\n    id: z.string(),\n    title: z.string(),\n    content: z.string(),\n    authorId: z.string(),\n    status: z.enum([\n        'draft',\n        'published',\n        'archived'\n    ]).optional(),\n    createdAt: z.iso.datetime().optional()\n});\n\nexport const zCreatePostInput = z.object({\n    title: z.string(),\n    content: z.string(),\n    status: z.enum(['draft', 'published']).optional()\n});\n\nexport const zGetUsersData = z.object({\n    body: z.never().optional(),\n    path: z.never().optional(),\n    query: z.object({\n        limit: z.int().optional().default(10),\n        offset: z.int().optional().default(0)\n    }).optional()\n});\n\n/**\n * List of users\n */\nexport const zGetUsersResponse = z.array(zUser);\n\nexport const zCreateUserData = z.object({\n    body: zCreateUserInput,\n    path: z.never().optional(),\n    query: z.never().optional()\n});\n\n/**\n * User created\n */\nexport const zCreateUserResponse = zUser;\n\nexport const zDeleteUserData = z.object({\n    body: z.never().optional(),\n    path: z.object({\n        userId: z.string()\n    }),\n    query: z.never().optional(),\n    headers: z.object({\n        'X-Request-Id': z.string().optional()\n    }).optional()\n});\n\n/**\n * User deleted\n */\nexport const zDeleteUserResponse = z.void();\n\nexport const zGetUserByIdData = z.object({\n    body: z.never().optional(),\n    path: z.object({\n        userId: z.string()\n    }),\n    query: z.never().optional()\n});\n\n/**\n * User found\n */\nexport const zGetUserByIdResponse = zUser;\n\nexport const zUpdateUserData = z.object({\n    body: zUpdateUserInput,\n    path: z.object({\n        userId: z.string()\n    }),\n    query: z.never().optional()\n});\n\n/**\n * User updated\n */\nexport const zUpdateUserResponse = zUser;\n\nexport const zGetPostsData = z.object({\n    body: z.never().optional(),\n    path: z.never().optional(),\n    query: z.object({\n        authorId: z.string().optional(),\n        status: z.enum([\n            'draft',\n            'published',\n            'archived'\n        ]).optional()\n    }).optional()\n});\n\n/**\n * List of posts\n */\nexport const zGetPostsResponse = z.array(zPost);\n\nexport const zCreatePostData = z.object({\n    body: zCreatePostInput,\n    path: z.never().optional(),\n    query: z.never().optional(),\n    headers: z.object({\n        'X-Author-Id': z.string()\n    })\n});\n\n/**\n * Post created\n */\nexport const zCreatePostResponse = zPost;\n\nexport const zGetPostByIdData = z.object({\n    body: z.never().optional(),\n    path: z.object({\n        postId: z.string()\n    }),\n    query: z.object({\n        includeComments: z.boolean().optional().default(false)\n    }).optional()\n});\n\n/**\n * Post found\n */\nexport const zGetPostByIdResponse = zPost;\n"
  },
  {
    "path": "packages/openapi-ts-tests/orpc/v1/__snapshots__/3.1.x/contracts-custom-naming/orpc.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport { oc } from '@orpc/contract';\n\nimport { zCreatePostData, zCreatePostResponse, zCreateUserData, zCreateUserResponse, zDeleteUserData, zGetPostByIdData, zGetPostByIdResponse, zGetPostsData, zGetPostsResponse, zGetUserByIdData, zGetUserByIdResponse, zGetUsersData, zGetUsersResponse, zUpdateUserData, zUpdateUserResponse } from './zod.gen';\n\nexport const base = oc.$route({ inputStructure: 'detailed' });\n\n/**\n * Get all users\n */\nexport const GetUsers = base.route({\n    method: 'GET',\n    operationId: 'getUsers',\n    path: '/users',\n    summary: 'Get all users',\n    tags: ['users']\n}).input(zGetUsersData).output(zGetUsersResponse);\n\n/**\n * Create a new user\n */\nexport const CreateUser = base.route({\n    method: 'POST',\n    operationId: 'createUser',\n    path: '/users',\n    successStatus: 201,\n    summary: 'Create a new user',\n    tags: ['users']\n}).input(zCreateUserData).output(zCreateUserResponse);\n\n/**\n * Delete a user\n */\nexport const DeleteUser = base.route({\n    method: 'DELETE',\n    operationId: 'deleteUser',\n    path: '/users/{userId}',\n    summary: 'Delete a user',\n    tags: ['users']\n}).input(zDeleteUserData);\n\n/**\n * Get a user by ID\n */\nexport const GetUserById = base.route({\n    method: 'GET',\n    operationId: 'getUserById',\n    path: '/users/{userId}',\n    summary: 'Get a user by ID',\n    tags: ['users']\n}).input(zGetUserByIdData).output(zGetUserByIdResponse);\n\n/**\n * Update a user\n */\nexport const UpdateUser = base.route({\n    method: 'PUT',\n    operationId: 'updateUser',\n    path: '/users/{userId}',\n    summary: 'Update a user',\n    tags: ['users']\n}).input(zUpdateUserData).output(zUpdateUserResponse);\n\nexport const usersContracts = {\n    GetUsers,\n    CreateUser,\n    DeleteUser,\n    GetUserById,\n    UpdateUser\n};\n\n/**\n * Get all posts\n */\nexport const GetPosts = base.route({\n    method: 'GET',\n    operationId: 'getPosts',\n    path: '/posts',\n    summary: 'Get all posts',\n    tags: ['posts']\n}).input(zGetPostsData).output(zGetPostsResponse);\n\n/**\n * Create a new post\n */\nexport const CreatePost = base.route({\n    method: 'POST',\n    operationId: 'createPost',\n    path: '/posts',\n    successStatus: 201,\n    summary: 'Create a new post',\n    tags: ['posts']\n}).input(zCreatePostData).output(zCreatePostResponse);\n\n/**\n * Get a post by ID\n */\nexport const GetPostById = base.route({\n    method: 'GET',\n    operationId: 'getPostById',\n    path: '/posts/{postId}',\n    summary: 'Get a post by ID',\n    tags: ['posts']\n}).input(zGetPostByIdData).output(zGetPostByIdResponse);\n\nexport const postsContracts = {\n    GetPosts,\n    CreatePost,\n    GetPostById\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/orpc/v1/__snapshots__/3.1.x/contracts-custom-naming/zod.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport * as z from 'zod';\n\nexport const zUser = z.object({\n    id: z.string(),\n    email: z.email(),\n    name: z.string(),\n    createdAt: z.iso.datetime().optional()\n});\n\nexport const zCreateUserInput = z.object({\n    email: z.email(),\n    name: z.string(),\n    password: z.string().min(8).optional()\n});\n\nexport const zUpdateUserInput = z.object({\n    email: z.email().optional(),\n    name: z.string().optional()\n});\n\nexport const zPost = z.object({\n    id: z.string(),\n    title: z.string(),\n    content: z.string(),\n    authorId: z.string(),\n    status: z.enum([\n        'draft',\n        'published',\n        'archived'\n    ]).optional(),\n    createdAt: z.iso.datetime().optional()\n});\n\nexport const zCreatePostInput = z.object({\n    title: z.string(),\n    content: z.string(),\n    status: z.enum(['draft', 'published']).optional()\n});\n\nexport const zGetUsersData = z.object({\n    body: z.never().optional(),\n    path: z.never().optional(),\n    query: z.object({\n        limit: z.int().optional().default(10),\n        offset: z.int().optional().default(0)\n    }).optional()\n});\n\n/**\n * List of users\n */\nexport const zGetUsersResponse = z.array(zUser);\n\nexport const zCreateUserData = z.object({\n    body: zCreateUserInput,\n    path: z.never().optional(),\n    query: z.never().optional()\n});\n\n/**\n * User created\n */\nexport const zCreateUserResponse = zUser;\n\nexport const zDeleteUserData = z.object({\n    body: z.never().optional(),\n    path: z.object({\n        userId: z.string()\n    }),\n    query: z.never().optional(),\n    headers: z.object({\n        'X-Request-Id': z.string().optional()\n    }).optional()\n});\n\n/**\n * User deleted\n */\nexport const zDeleteUserResponse = z.void();\n\nexport const zGetUserByIdData = z.object({\n    body: z.never().optional(),\n    path: z.object({\n        userId: z.string()\n    }),\n    query: z.never().optional()\n});\n\n/**\n * User found\n */\nexport const zGetUserByIdResponse = zUser;\n\nexport const zUpdateUserData = z.object({\n    body: zUpdateUserInput,\n    path: z.object({\n        userId: z.string()\n    }),\n    query: z.never().optional()\n});\n\n/**\n * User updated\n */\nexport const zUpdateUserResponse = zUser;\n\nexport const zGetPostsData = z.object({\n    body: z.never().optional(),\n    path: z.never().optional(),\n    query: z.object({\n        authorId: z.string().optional(),\n        status: z.enum([\n            'draft',\n            'published',\n            'archived'\n        ]).optional()\n    }).optional()\n});\n\n/**\n * List of posts\n */\nexport const zGetPostsResponse = z.array(zPost);\n\nexport const zCreatePostData = z.object({\n    body: zCreatePostInput,\n    path: z.never().optional(),\n    query: z.never().optional(),\n    headers: z.object({\n        'X-Author-Id': z.string()\n    })\n});\n\n/**\n * Post created\n */\nexport const zCreatePostResponse = zPost;\n\nexport const zGetPostByIdData = z.object({\n    body: z.never().optional(),\n    path: z.object({\n        postId: z.string()\n    }),\n    query: z.object({\n        includeComments: z.boolean().optional().default(false)\n    }).optional()\n});\n\n/**\n * Post found\n */\nexport const zGetPostByIdResponse = zPost;\n"
  },
  {
    "path": "packages/openapi-ts-tests/orpc/v1/__snapshots__/3.1.x/contracts-nesting-id/orpc.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport { oc } from '@orpc/contract';\n\nimport { zCreatePostData, zCreatePostResponse, zCreateUserData, zCreateUserResponse, zDeleteUserData, zGetPostByIdData, zGetPostByIdResponse, zGetPostsData, zGetPostsResponse, zGetUserByIdData, zGetUserByIdResponse, zGetUsersData, zGetUsersResponse, zUpdateUserData, zUpdateUserResponse } from './zod.gen';\n\nexport const base = oc.$route({ inputStructure: 'detailed' });\n\n/**\n * Get all users\n */\nexport const getUsers = base.route({\n    method: 'GET',\n    operationId: 'getUsers',\n    path: '/users',\n    summary: 'Get all users',\n    tags: ['users']\n}).input(zGetUsersData).output(zGetUsersResponse);\n\n/**\n * Create a new user\n */\nexport const createUser = base.route({\n    method: 'POST',\n    operationId: 'createUser',\n    path: '/users',\n    successStatus: 201,\n    summary: 'Create a new user',\n    tags: ['users']\n}).input(zCreateUserData).output(zCreateUserResponse);\n\n/**\n * Delete a user\n */\nexport const deleteUser = base.route({\n    method: 'DELETE',\n    operationId: 'deleteUser',\n    path: '/users/{userId}',\n    summary: 'Delete a user',\n    tags: ['users']\n}).input(zDeleteUserData);\n\n/**\n * Get a user by ID\n */\nexport const getUserById = base.route({\n    method: 'GET',\n    operationId: 'getUserById',\n    path: '/users/{userId}',\n    summary: 'Get a user by ID',\n    tags: ['users']\n}).input(zGetUserByIdData).output(zGetUserByIdResponse);\n\n/**\n * Update a user\n */\nexport const updateUser = base.route({\n    method: 'PUT',\n    operationId: 'updateUser',\n    path: '/users/{userId}',\n    summary: 'Update a user',\n    tags: ['users']\n}).input(zUpdateUserData).output(zUpdateUserResponse);\n\nexport const users = {\n    getUsers,\n    createUser,\n    deleteUser,\n    getUserById,\n    updateUser\n};\n\n/**\n * Get all posts\n */\nexport const getPosts = base.route({\n    method: 'GET',\n    operationId: 'getPosts',\n    path: '/posts',\n    summary: 'Get all posts',\n    tags: ['posts']\n}).input(zGetPostsData).output(zGetPostsResponse);\n\n/**\n * Create a new post\n */\nexport const createPost = base.route({\n    method: 'POST',\n    operationId: 'createPost',\n    path: '/posts',\n    successStatus: 201,\n    summary: 'Create a new post',\n    tags: ['posts']\n}).input(zCreatePostData).output(zCreatePostResponse);\n\n/**\n * Get a post by ID\n */\nexport const getPostById = base.route({\n    method: 'GET',\n    operationId: 'getPostById',\n    path: '/posts/{postId}',\n    summary: 'Get a post by ID',\n    tags: ['posts']\n}).input(zGetPostByIdData).output(zGetPostByIdResponse);\n\nexport const posts = {\n    getPosts,\n    createPost,\n    getPostById\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/orpc/v1/__snapshots__/3.1.x/contracts-nesting-id/zod.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport * as z from 'zod';\n\nexport const zUser = z.object({\n    id: z.string(),\n    email: z.email(),\n    name: z.string(),\n    createdAt: z.iso.datetime().optional()\n});\n\nexport const zCreateUserInput = z.object({\n    email: z.email(),\n    name: z.string(),\n    password: z.string().min(8).optional()\n});\n\nexport const zUpdateUserInput = z.object({\n    email: z.email().optional(),\n    name: z.string().optional()\n});\n\nexport const zPost = z.object({\n    id: z.string(),\n    title: z.string(),\n    content: z.string(),\n    authorId: z.string(),\n    status: z.enum([\n        'draft',\n        'published',\n        'archived'\n    ]).optional(),\n    createdAt: z.iso.datetime().optional()\n});\n\nexport const zCreatePostInput = z.object({\n    title: z.string(),\n    content: z.string(),\n    status: z.enum(['draft', 'published']).optional()\n});\n\nexport const zGetUsersData = z.object({\n    body: z.never().optional(),\n    path: z.never().optional(),\n    query: z.object({\n        limit: z.int().optional().default(10),\n        offset: z.int().optional().default(0)\n    }).optional()\n});\n\n/**\n * List of users\n */\nexport const zGetUsersResponse = z.array(zUser);\n\nexport const zCreateUserData = z.object({\n    body: zCreateUserInput,\n    path: z.never().optional(),\n    query: z.never().optional()\n});\n\n/**\n * User created\n */\nexport const zCreateUserResponse = zUser;\n\nexport const zDeleteUserData = z.object({\n    body: z.never().optional(),\n    path: z.object({\n        userId: z.string()\n    }),\n    query: z.never().optional(),\n    headers: z.object({\n        'X-Request-Id': z.string().optional()\n    }).optional()\n});\n\n/**\n * User deleted\n */\nexport const zDeleteUserResponse = z.void();\n\nexport const zGetUserByIdData = z.object({\n    body: z.never().optional(),\n    path: z.object({\n        userId: z.string()\n    }),\n    query: z.never().optional()\n});\n\n/**\n * User found\n */\nexport const zGetUserByIdResponse = zUser;\n\nexport const zUpdateUserData = z.object({\n    body: zUpdateUserInput,\n    path: z.object({\n        userId: z.string()\n    }),\n    query: z.never().optional()\n});\n\n/**\n * User updated\n */\nexport const zUpdateUserResponse = zUser;\n\nexport const zGetPostsData = z.object({\n    body: z.never().optional(),\n    path: z.never().optional(),\n    query: z.object({\n        authorId: z.string().optional(),\n        status: z.enum([\n            'draft',\n            'published',\n            'archived'\n        ]).optional()\n    }).optional()\n});\n\n/**\n * List of posts\n */\nexport const zGetPostsResponse = z.array(zPost);\n\nexport const zCreatePostData = z.object({\n    body: zCreatePostInput,\n    path: z.never().optional(),\n    query: z.never().optional(),\n    headers: z.object({\n        'X-Author-Id': z.string()\n    })\n});\n\n/**\n * Post created\n */\nexport const zCreatePostResponse = zPost;\n\nexport const zGetPostByIdData = z.object({\n    body: z.never().optional(),\n    path: z.object({\n        postId: z.string()\n    }),\n    query: z.object({\n        includeComments: z.boolean().optional().default(false)\n    }).optional()\n});\n\n/**\n * Post found\n */\nexport const zGetPostByIdResponse = zPost;\n"
  },
  {
    "path": "packages/openapi-ts-tests/orpc/v1/__snapshots__/3.1.x/contracts-strategy-by-tags/orpc.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport { oc } from '@orpc/contract';\n\nimport { zCreatePostData, zCreatePostResponse, zCreateUserData, zCreateUserResponse, zDeleteUserData, zGetPostByIdData, zGetPostByIdResponse, zGetPostsData, zGetPostsResponse, zGetUserByIdData, zGetUserByIdResponse, zGetUsersData, zGetUsersResponse, zUpdateUserData, zUpdateUserResponse } from './zod.gen';\n\nexport const base = oc.$route({ inputStructure: 'detailed' });\n\n/**\n * Get all users\n */\nexport const getUsers = base.route({\n    method: 'GET',\n    operationId: 'getUsers',\n    path: '/users',\n    summary: 'Get all users',\n    tags: ['users']\n}).input(zGetUsersData).output(zGetUsersResponse);\n\n/**\n * Create a new user\n */\nexport const createUser = base.route({\n    method: 'POST',\n    operationId: 'createUser',\n    path: '/users',\n    successStatus: 201,\n    summary: 'Create a new user',\n    tags: ['users']\n}).input(zCreateUserData).output(zCreateUserResponse);\n\n/**\n * Delete a user\n */\nexport const deleteUser = base.route({\n    method: 'DELETE',\n    operationId: 'deleteUser',\n    path: '/users/{userId}',\n    summary: 'Delete a user',\n    tags: ['users']\n}).input(zDeleteUserData);\n\n/**\n * Get a user by ID\n */\nexport const getUserById = base.route({\n    method: 'GET',\n    operationId: 'getUserById',\n    path: '/users/{userId}',\n    summary: 'Get a user by ID',\n    tags: ['users']\n}).input(zGetUserByIdData).output(zGetUserByIdResponse);\n\n/**\n * Update a user\n */\nexport const updateUser = base.route({\n    method: 'PUT',\n    operationId: 'updateUser',\n    path: '/users/{userId}',\n    summary: 'Update a user',\n    tags: ['users']\n}).input(zUpdateUserData).output(zUpdateUserResponse);\n\nexport const users = {\n    getUsers,\n    createUser,\n    deleteUser,\n    getUserById,\n    updateUser\n};\n\n/**\n * Get all posts\n */\nexport const getPosts = base.route({\n    method: 'GET',\n    operationId: 'getPosts',\n    path: '/posts',\n    summary: 'Get all posts',\n    tags: ['posts']\n}).input(zGetPostsData).output(zGetPostsResponse);\n\n/**\n * Create a new post\n */\nexport const createPost = base.route({\n    method: 'POST',\n    operationId: 'createPost',\n    path: '/posts',\n    successStatus: 201,\n    summary: 'Create a new post',\n    tags: ['posts']\n}).input(zCreatePostData).output(zCreatePostResponse);\n\n/**\n * Get a post by ID\n */\nexport const getPostById = base.route({\n    method: 'GET',\n    operationId: 'getPostById',\n    path: '/posts/{postId}',\n    summary: 'Get a post by ID',\n    tags: ['posts']\n}).input(zGetPostByIdData).output(zGetPostByIdResponse);\n\nexport const posts = {\n    getPosts,\n    createPost,\n    getPostById\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/orpc/v1/__snapshots__/3.1.x/contracts-strategy-by-tags/zod.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport * as z from 'zod';\n\nexport const zUser = z.object({\n    id: z.string(),\n    email: z.email(),\n    name: z.string(),\n    createdAt: z.iso.datetime().optional()\n});\n\nexport const zCreateUserInput = z.object({\n    email: z.email(),\n    name: z.string(),\n    password: z.string().min(8).optional()\n});\n\nexport const zUpdateUserInput = z.object({\n    email: z.email().optional(),\n    name: z.string().optional()\n});\n\nexport const zPost = z.object({\n    id: z.string(),\n    title: z.string(),\n    content: z.string(),\n    authorId: z.string(),\n    status: z.enum([\n        'draft',\n        'published',\n        'archived'\n    ]).optional(),\n    createdAt: z.iso.datetime().optional()\n});\n\nexport const zCreatePostInput = z.object({\n    title: z.string(),\n    content: z.string(),\n    status: z.enum(['draft', 'published']).optional()\n});\n\nexport const zGetUsersData = z.object({\n    body: z.never().optional(),\n    path: z.never().optional(),\n    query: z.object({\n        limit: z.int().optional().default(10),\n        offset: z.int().optional().default(0)\n    }).optional()\n});\n\n/**\n * List of users\n */\nexport const zGetUsersResponse = z.array(zUser);\n\nexport const zCreateUserData = z.object({\n    body: zCreateUserInput,\n    path: z.never().optional(),\n    query: z.never().optional()\n});\n\n/**\n * User created\n */\nexport const zCreateUserResponse = zUser;\n\nexport const zDeleteUserData = z.object({\n    body: z.never().optional(),\n    path: z.object({\n        userId: z.string()\n    }),\n    query: z.never().optional(),\n    headers: z.object({\n        'X-Request-Id': z.string().optional()\n    }).optional()\n});\n\n/**\n * User deleted\n */\nexport const zDeleteUserResponse = z.void();\n\nexport const zGetUserByIdData = z.object({\n    body: z.never().optional(),\n    path: z.object({\n        userId: z.string()\n    }),\n    query: z.never().optional()\n});\n\n/**\n * User found\n */\nexport const zGetUserByIdResponse = zUser;\n\nexport const zUpdateUserData = z.object({\n    body: zUpdateUserInput,\n    path: z.object({\n        userId: z.string()\n    }),\n    query: z.never().optional()\n});\n\n/**\n * User updated\n */\nexport const zUpdateUserResponse = zUser;\n\nexport const zGetPostsData = z.object({\n    body: z.never().optional(),\n    path: z.never().optional(),\n    query: z.object({\n        authorId: z.string().optional(),\n        status: z.enum([\n            'draft',\n            'published',\n            'archived'\n        ]).optional()\n    }).optional()\n});\n\n/**\n * List of posts\n */\nexport const zGetPostsResponse = z.array(zPost);\n\nexport const zCreatePostData = z.object({\n    body: zCreatePostInput,\n    path: z.never().optional(),\n    query: z.never().optional(),\n    headers: z.object({\n        'X-Author-Id': z.string()\n    })\n});\n\n/**\n * Post created\n */\nexport const zCreatePostResponse = zPost;\n\nexport const zGetPostByIdData = z.object({\n    body: z.never().optional(),\n    path: z.object({\n        postId: z.string()\n    }),\n    query: z.object({\n        includeComments: z.boolean().optional().default(false)\n    }).optional()\n});\n\n/**\n * Post found\n */\nexport const zGetPostByIdResponse = zPost;\n"
  },
  {
    "path": "packages/openapi-ts-tests/orpc/v1/__snapshots__/3.1.x/contracts-strategy-single/orpc.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport { oc } from '@orpc/contract';\n\nimport { zCreatePostData, zCreatePostResponse, zCreateUserData, zCreateUserResponse, zDeleteUserData, zGetPostByIdData, zGetPostByIdResponse, zGetPostsData, zGetPostsResponse, zGetUserByIdData, zGetUserByIdResponse, zGetUsersData, zGetUsersResponse, zUpdateUserData, zUpdateUserResponse } from './zod.gen';\n\nexport const base = oc.$route({ inputStructure: 'detailed' });\n\n/**\n * Get all users\n */\nexport const getUsers = base.route({\n    method: 'GET',\n    operationId: 'getUsers',\n    path: '/users',\n    summary: 'Get all users',\n    tags: ['users']\n}).input(zGetUsersData).output(zGetUsersResponse);\n\n/**\n * Create a new user\n */\nexport const createUser = base.route({\n    method: 'POST',\n    operationId: 'createUser',\n    path: '/users',\n    successStatus: 201,\n    summary: 'Create a new user',\n    tags: ['users']\n}).input(zCreateUserData).output(zCreateUserResponse);\n\n/**\n * Delete a user\n */\nexport const deleteUser = base.route({\n    method: 'DELETE',\n    operationId: 'deleteUser',\n    path: '/users/{userId}',\n    summary: 'Delete a user',\n    tags: ['users']\n}).input(zDeleteUserData);\n\n/**\n * Get a user by ID\n */\nexport const getUserById = base.route({\n    method: 'GET',\n    operationId: 'getUserById',\n    path: '/users/{userId}',\n    summary: 'Get a user by ID',\n    tags: ['users']\n}).input(zGetUserByIdData).output(zGetUserByIdResponse);\n\n/**\n * Update a user\n */\nexport const updateUser = base.route({\n    method: 'PUT',\n    operationId: 'updateUser',\n    path: '/users/{userId}',\n    summary: 'Update a user',\n    tags: ['users']\n}).input(zUpdateUserData).output(zUpdateUserResponse);\n\n/**\n * Get all posts\n */\nexport const getPosts = base.route({\n    method: 'GET',\n    operationId: 'getPosts',\n    path: '/posts',\n    summary: 'Get all posts',\n    tags: ['posts']\n}).input(zGetPostsData).output(zGetPostsResponse);\n\n/**\n * Create a new post\n */\nexport const createPost = base.route({\n    method: 'POST',\n    operationId: 'createPost',\n    path: '/posts',\n    successStatus: 201,\n    summary: 'Create a new post',\n    tags: ['posts']\n}).input(zCreatePostData).output(zCreatePostResponse);\n\n/**\n * Get a post by ID\n */\nexport const getPostById = base.route({\n    method: 'GET',\n    operationId: 'getPostById',\n    path: '/posts/{postId}',\n    summary: 'Get a post by ID',\n    tags: ['posts']\n}).input(zGetPostByIdData).output(zGetPostByIdResponse);\n\nexport const api = {\n    getUsers,\n    createUser,\n    deleteUser,\n    getUserById,\n    updateUser,\n    getPosts,\n    createPost,\n    getPostById\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/orpc/v1/__snapshots__/3.1.x/contracts-strategy-single/zod.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport * as z from 'zod';\n\nexport const zUser = z.object({\n    id: z.string(),\n    email: z.email(),\n    name: z.string(),\n    createdAt: z.iso.datetime().optional()\n});\n\nexport const zCreateUserInput = z.object({\n    email: z.email(),\n    name: z.string(),\n    password: z.string().min(8).optional()\n});\n\nexport const zUpdateUserInput = z.object({\n    email: z.email().optional(),\n    name: z.string().optional()\n});\n\nexport const zPost = z.object({\n    id: z.string(),\n    title: z.string(),\n    content: z.string(),\n    authorId: z.string(),\n    status: z.enum([\n        'draft',\n        'published',\n        'archived'\n    ]).optional(),\n    createdAt: z.iso.datetime().optional()\n});\n\nexport const zCreatePostInput = z.object({\n    title: z.string(),\n    content: z.string(),\n    status: z.enum(['draft', 'published']).optional()\n});\n\nexport const zGetUsersData = z.object({\n    body: z.never().optional(),\n    path: z.never().optional(),\n    query: z.object({\n        limit: z.int().optional().default(10),\n        offset: z.int().optional().default(0)\n    }).optional()\n});\n\n/**\n * List of users\n */\nexport const zGetUsersResponse = z.array(zUser);\n\nexport const zCreateUserData = z.object({\n    body: zCreateUserInput,\n    path: z.never().optional(),\n    query: z.never().optional()\n});\n\n/**\n * User created\n */\nexport const zCreateUserResponse = zUser;\n\nexport const zDeleteUserData = z.object({\n    body: z.never().optional(),\n    path: z.object({\n        userId: z.string()\n    }),\n    query: z.never().optional(),\n    headers: z.object({\n        'X-Request-Id': z.string().optional()\n    }).optional()\n});\n\n/**\n * User deleted\n */\nexport const zDeleteUserResponse = z.void();\n\nexport const zGetUserByIdData = z.object({\n    body: z.never().optional(),\n    path: z.object({\n        userId: z.string()\n    }),\n    query: z.never().optional()\n});\n\n/**\n * User found\n */\nexport const zGetUserByIdResponse = zUser;\n\nexport const zUpdateUserData = z.object({\n    body: zUpdateUserInput,\n    path: z.object({\n        userId: z.string()\n    }),\n    query: z.never().optional()\n});\n\n/**\n * User updated\n */\nexport const zUpdateUserResponse = zUser;\n\nexport const zGetPostsData = z.object({\n    body: z.never().optional(),\n    path: z.never().optional(),\n    query: z.object({\n        authorId: z.string().optional(),\n        status: z.enum([\n            'draft',\n            'published',\n            'archived'\n        ]).optional()\n    }).optional()\n});\n\n/**\n * List of posts\n */\nexport const zGetPostsResponse = z.array(zPost);\n\nexport const zCreatePostData = z.object({\n    body: zCreatePostInput,\n    path: z.never().optional(),\n    query: z.never().optional(),\n    headers: z.object({\n        'X-Author-Id': z.string()\n    })\n});\n\n/**\n * Post created\n */\nexport const zCreatePostResponse = zPost;\n\nexport const zGetPostByIdData = z.object({\n    body: z.never().optional(),\n    path: z.object({\n        postId: z.string()\n    }),\n    query: z.object({\n        includeComments: z.boolean().optional().default(false)\n    }).optional()\n});\n\n/**\n * Post found\n */\nexport const zGetPostByIdResponse = zPost;\n"
  },
  {
    "path": "packages/openapi-ts-tests/orpc/v1/__snapshots__/3.1.x/custom-names/orpc.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport { oc } from '@orpc/contract';\n\nimport { vCreatePostData, vCreatePostResponse, vCreateUserData, vCreateUserResponse, vDeleteUserData, vGetPostByIdData, vGetPostByIdResponse, vGetPostsData, vGetPostsResponse, vGetUserByIdData, vGetUserByIdResponse, vGetUsersData, vGetUsersResponse, vUpdateUserData, vUpdateUserResponse } from './valibot.gen';\n\nexport const base = oc.$route({ inputStructure: 'detailed' });\n\n/**\n * Get all users\n */\nexport const getUsersRpc = base.route({\n    method: 'GET',\n    operationId: 'getUsers',\n    path: '/users',\n    summary: 'Get all users',\n    tags: ['users']\n}).input(vGetUsersData).output(vGetUsersResponse);\n\n/**\n * Create a new user\n */\nexport const createUserRpc = base.route({\n    method: 'POST',\n    operationId: 'createUser',\n    path: '/users',\n    successStatus: 201,\n    summary: 'Create a new user',\n    tags: ['users']\n}).input(vCreateUserData).output(vCreateUserResponse);\n\n/**\n * Delete a user\n */\nexport const deleteUserRpc = base.route({\n    method: 'DELETE',\n    operationId: 'deleteUser',\n    path: '/users/{userId}',\n    summary: 'Delete a user',\n    tags: ['users']\n}).input(vDeleteUserData);\n\n/**\n * Get a user by ID\n */\nexport const getUserByIdRpc = base.route({\n    method: 'GET',\n    operationId: 'getUserById',\n    path: '/users/{userId}',\n    summary: 'Get a user by ID',\n    tags: ['users']\n}).input(vGetUserByIdData).output(vGetUserByIdResponse);\n\n/**\n * Update a user\n */\nexport const updateUserRpc = base.route({\n    method: 'PUT',\n    operationId: 'updateUser',\n    path: '/users/{userId}',\n    summary: 'Update a user',\n    tags: ['users']\n}).input(vUpdateUserData).output(vUpdateUserResponse);\n\n/**\n * Get all posts\n */\nexport const getPostsRpc = base.route({\n    method: 'GET',\n    operationId: 'getPosts',\n    path: '/posts',\n    summary: 'Get all posts',\n    tags: ['posts']\n}).input(vGetPostsData).output(vGetPostsResponse);\n\n/**\n * Create a new post\n */\nexport const createPostRpc = base.route({\n    method: 'POST',\n    operationId: 'createPost',\n    path: '/posts',\n    successStatus: 201,\n    summary: 'Create a new post',\n    tags: ['posts']\n}).input(vCreatePostData).output(vCreatePostResponse);\n\n/**\n * Get a post by ID\n */\nexport const getPostByIdRpc = base.route({\n    method: 'GET',\n    operationId: 'getPostById',\n    path: '/posts/{postId}',\n    summary: 'Get a post by ID',\n    tags: ['posts']\n}).input(vGetPostByIdData).output(vGetPostByIdResponse);\n\nexport const rpcContract = {\n    getUsersRpc,\n    createUserRpc,\n    deleteUserRpc,\n    getUserByIdRpc,\n    updateUserRpc,\n    getPostsRpc,\n    createPostRpc,\n    getPostByIdRpc\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/orpc/v1/__snapshots__/3.1.x/custom-names/valibot.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport * as v from 'valibot';\n\nexport const vUser = v.object({\n    id: v.string(),\n    email: v.pipe(v.string(), v.email()),\n    name: v.string(),\n    createdAt: v.optional(v.pipe(v.string(), v.isoTimestamp()))\n});\n\nexport const vCreateUserInput = v.object({\n    email: v.pipe(v.string(), v.email()),\n    name: v.string(),\n    password: v.optional(v.pipe(v.string(), v.minLength(8)))\n});\n\nexport const vUpdateUserInput = v.object({\n    email: v.optional(v.pipe(v.string(), v.email())),\n    name: v.optional(v.string())\n});\n\nexport const vPost = v.object({\n    id: v.string(),\n    title: v.string(),\n    content: v.string(),\n    authorId: v.string(),\n    status: v.optional(v.picklist([\n        'draft',\n        'published',\n        'archived'\n    ])),\n    createdAt: v.optional(v.pipe(v.string(), v.isoTimestamp()))\n});\n\nexport const vCreatePostInput = v.object({\n    title: v.string(),\n    content: v.string(),\n    status: v.optional(v.picklist(['draft', 'published']))\n});\n\nexport const vGetUsersData = v.object({\n    body: v.optional(v.never()),\n    path: v.optional(v.never()),\n    query: v.optional(v.object({\n        limit: v.optional(v.pipe(v.number(), v.integer()), 10),\n        offset: v.optional(v.pipe(v.number(), v.integer()), 0)\n    }))\n});\n\n/**\n * List of users\n */\nexport const vGetUsersResponse = v.array(vUser);\n\nexport const vCreateUserData = v.object({\n    body: vCreateUserInput,\n    path: v.optional(v.never()),\n    query: v.optional(v.never())\n});\n\n/**\n * User created\n */\nexport const vCreateUserResponse = vUser;\n\nexport const vDeleteUserData = v.object({\n    body: v.optional(v.never()),\n    path: v.object({\n        userId: v.string()\n    }),\n    query: v.optional(v.never()),\n    headers: v.optional(v.object({\n        'X-Request-Id': v.optional(v.string())\n    }))\n});\n\n/**\n * User deleted\n */\nexport const vDeleteUserResponse = v.void();\n\nexport const vGetUserByIdData = v.object({\n    body: v.optional(v.never()),\n    path: v.object({\n        userId: v.string()\n    }),\n    query: v.optional(v.never())\n});\n\n/**\n * User found\n */\nexport const vGetUserByIdResponse = vUser;\n\nexport const vUpdateUserData = v.object({\n    body: vUpdateUserInput,\n    path: v.object({\n        userId: v.string()\n    }),\n    query: v.optional(v.never())\n});\n\n/**\n * User updated\n */\nexport const vUpdateUserResponse = vUser;\n\nexport const vGetPostsData = v.object({\n    body: v.optional(v.never()),\n    path: v.optional(v.never()),\n    query: v.optional(v.object({\n        authorId: v.optional(v.string()),\n        status: v.optional(v.picklist([\n            'draft',\n            'published',\n            'archived'\n        ]))\n    }))\n});\n\n/**\n * List of posts\n */\nexport const vGetPostsResponse = v.array(vPost);\n\nexport const vCreatePostData = v.object({\n    body: vCreatePostInput,\n    path: v.optional(v.never()),\n    query: v.optional(v.never()),\n    headers: v.object({\n        'X-Author-Id': v.string()\n    })\n});\n\n/**\n * Post created\n */\nexport const vCreatePostResponse = vPost;\n\nexport const vGetPostByIdData = v.object({\n    body: v.optional(v.never()),\n    path: v.object({\n        postId: v.string()\n    }),\n    query: v.optional(v.object({\n        includeComments: v.optional(v.boolean(), false)\n    }))\n});\n\n/**\n * Post found\n */\nexport const vGetPostByIdResponse = vPost;\n"
  },
  {
    "path": "packages/openapi-ts-tests/orpc/v1/__snapshots__/3.1.x/default/orpc.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport { oc } from '@orpc/contract';\n\nimport { zCreatePostData, zCreatePostResponse, zCreateUserData, zCreateUserResponse, zDeleteUserData, zGetPostByIdData, zGetPostByIdResponse, zGetPostsData, zGetPostsResponse, zGetUserByIdData, zGetUserByIdResponse, zGetUsersData, zGetUsersResponse, zUpdateUserData, zUpdateUserResponse } from './zod.gen';\n\nexport const base = oc.$route({ inputStructure: 'detailed' });\n\n/**\n * Get all users\n */\nexport const getUsers = base.route({\n    method: 'GET',\n    operationId: 'getUsers',\n    path: '/users',\n    summary: 'Get all users',\n    tags: ['users']\n}).input(zGetUsersData).output(zGetUsersResponse);\n\n/**\n * Create a new user\n */\nexport const createUser = base.route({\n    method: 'POST',\n    operationId: 'createUser',\n    path: '/users',\n    successStatus: 201,\n    summary: 'Create a new user',\n    tags: ['users']\n}).input(zCreateUserData).output(zCreateUserResponse);\n\n/**\n * Delete a user\n */\nexport const deleteUser = base.route({\n    method: 'DELETE',\n    operationId: 'deleteUser',\n    path: '/users/{userId}',\n    summary: 'Delete a user',\n    tags: ['users']\n}).input(zDeleteUserData);\n\n/**\n * Get a user by ID\n */\nexport const getUserById = base.route({\n    method: 'GET',\n    operationId: 'getUserById',\n    path: '/users/{userId}',\n    summary: 'Get a user by ID',\n    tags: ['users']\n}).input(zGetUserByIdData).output(zGetUserByIdResponse);\n\n/**\n * Update a user\n */\nexport const updateUser = base.route({\n    method: 'PUT',\n    operationId: 'updateUser',\n    path: '/users/{userId}',\n    summary: 'Update a user',\n    tags: ['users']\n}).input(zUpdateUserData).output(zUpdateUserResponse);\n\n/**\n * Get all posts\n */\nexport const getPosts = base.route({\n    method: 'GET',\n    operationId: 'getPosts',\n    path: '/posts',\n    summary: 'Get all posts',\n    tags: ['posts']\n}).input(zGetPostsData).output(zGetPostsResponse);\n\n/**\n * Create a new post\n */\nexport const createPost = base.route({\n    method: 'POST',\n    operationId: 'createPost',\n    path: '/posts',\n    successStatus: 201,\n    summary: 'Create a new post',\n    tags: ['posts']\n}).input(zCreatePostData).output(zCreatePostResponse);\n\n/**\n * Get a post by ID\n */\nexport const getPostById = base.route({\n    method: 'GET',\n    operationId: 'getPostById',\n    path: '/posts/{postId}',\n    summary: 'Get a post by ID',\n    tags: ['posts']\n}).input(zGetPostByIdData).output(zGetPostByIdResponse);\n\nexport const contract = {\n    getUsers,\n    createUser,\n    deleteUser,\n    getUserById,\n    updateUser,\n    getPosts,\n    createPost,\n    getPostById\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/orpc/v1/__snapshots__/3.1.x/default/zod.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport * as z from 'zod';\n\nexport const zUser = z.object({\n    id: z.string(),\n    email: z.email(),\n    name: z.string(),\n    createdAt: z.iso.datetime().optional()\n});\n\nexport const zCreateUserInput = z.object({\n    email: z.email(),\n    name: z.string(),\n    password: z.string().min(8).optional()\n});\n\nexport const zUpdateUserInput = z.object({\n    email: z.email().optional(),\n    name: z.string().optional()\n});\n\nexport const zPost = z.object({\n    id: z.string(),\n    title: z.string(),\n    content: z.string(),\n    authorId: z.string(),\n    status: z.enum([\n        'draft',\n        'published',\n        'archived'\n    ]).optional(),\n    createdAt: z.iso.datetime().optional()\n});\n\nexport const zCreatePostInput = z.object({\n    title: z.string(),\n    content: z.string(),\n    status: z.enum(['draft', 'published']).optional()\n});\n\nexport const zGetUsersData = z.object({\n    body: z.never().optional(),\n    path: z.never().optional(),\n    query: z.object({\n        limit: z.int().optional().default(10),\n        offset: z.int().optional().default(0)\n    }).optional()\n});\n\n/**\n * List of users\n */\nexport const zGetUsersResponse = z.array(zUser);\n\nexport const zCreateUserData = z.object({\n    body: zCreateUserInput,\n    path: z.never().optional(),\n    query: z.never().optional()\n});\n\n/**\n * User created\n */\nexport const zCreateUserResponse = zUser;\n\nexport const zDeleteUserData = z.object({\n    body: z.never().optional(),\n    path: z.object({\n        userId: z.string()\n    }),\n    query: z.never().optional(),\n    headers: z.object({\n        'X-Request-Id': z.string().optional()\n    }).optional()\n});\n\n/**\n * User deleted\n */\nexport const zDeleteUserResponse = z.void();\n\nexport const zGetUserByIdData = z.object({\n    body: z.never().optional(),\n    path: z.object({\n        userId: z.string()\n    }),\n    query: z.never().optional()\n});\n\n/**\n * User found\n */\nexport const zGetUserByIdResponse = zUser;\n\nexport const zUpdateUserData = z.object({\n    body: zUpdateUserInput,\n    path: z.object({\n        userId: z.string()\n    }),\n    query: z.never().optional()\n});\n\n/**\n * User updated\n */\nexport const zUpdateUserResponse = zUser;\n\nexport const zGetPostsData = z.object({\n    body: z.never().optional(),\n    path: z.never().optional(),\n    query: z.object({\n        authorId: z.string().optional(),\n        status: z.enum([\n            'draft',\n            'published',\n            'archived'\n        ]).optional()\n    }).optional()\n});\n\n/**\n * List of posts\n */\nexport const zGetPostsResponse = z.array(zPost);\n\nexport const zCreatePostData = z.object({\n    body: zCreatePostInput,\n    path: z.never().optional(),\n    query: z.never().optional(),\n    headers: z.object({\n        'X-Author-Id': z.string()\n    })\n});\n\n/**\n * Post created\n */\nexport const zCreatePostResponse = zPost;\n\nexport const zGetPostByIdData = z.object({\n    body: z.never().optional(),\n    path: z.object({\n        postId: z.string()\n    }),\n    query: z.object({\n        includeComments: z.boolean().optional().default(false)\n    }).optional()\n});\n\n/**\n * Post found\n */\nexport const zGetPostByIdResponse = zPost;\n"
  },
  {
    "path": "packages/openapi-ts-tests/orpc/v1/package.json",
    "content": "{\n  \"name\": \"@test/openapi-ts-orpc-v1\",\n  \"version\": \"0.0.0\",\n  \"private\": true,\n  \"type\": \"module\",\n  \"scripts\": {\n    \"typecheck\": \"tsgo --noEmit\"\n  },\n  \"devDependencies\": {\n    \"@hey-api/openapi-ts\": \"workspace:*\",\n    \"@orpc/contract\": \"1.13.4\",\n    \"typescript\": \"5.9.3\",\n    \"valibot\": \"1.2.0\",\n    \"zod\": \"4.3.6\"\n  },\n  \"engines\": {\n    \"node\": \">=20.19.0\"\n  }\n}\n"
  },
  {
    "path": "packages/openapi-ts-tests/orpc/v1/test/3.0.x.test.ts",
    "content": "import fs from 'node:fs';\nimport path from 'node:path';\n\nimport { createClient } from '@hey-api/openapi-ts';\n\nimport { getFilePaths } from '../../../utils';\nimport { snapshotsDir, tmpDir } from './constants';\nimport { createOrpcConfig } from './utils';\n\nconst version = '3.0.x';\n\nconst outputDir = path.join(tmpDir, version);\n\ndescribe(`OpenAPI ${version}`, () => {\n  const createConfig = createOrpcConfig({ openApiVersion: version, outputDir });\n\n  const scenarios = [\n    {\n      config: createConfig({\n        input: 'orpc.yaml',\n        output: 'default',\n        plugins: ['orpc', 'zod'],\n      }),\n      description: 'generate oRPC contracts with Zod schemas',\n    },\n    {\n      config: createConfig({\n        input: 'orpc.yaml',\n        output: 'custom-names',\n        plugins: [\n          'valibot',\n          {\n            contracts: {\n              containerName: 'rpcContract',\n              contractName: '{{name}}Rpc',\n            },\n            name: 'orpc',\n          },\n        ],\n      }),\n      description: 'generate oRPC contracts with custom names and Valibot schemas',\n    },\n  ];\n\n  it.each(scenarios)('$description', async ({ config }) => {\n    await createClient(config);\n\n    const outputString = config.output as string;\n    const filePaths = getFilePaths(outputString);\n\n    await Promise.all(\n      filePaths.map(async (filePath) => {\n        const fileContent = fs.readFileSync(filePath, 'utf-8');\n        await expect(fileContent).toMatchFileSnapshot(\n          path.join(snapshotsDir, version, filePath.slice(outputDir.length + 1)),\n        );\n      }),\n    );\n  });\n});\n"
  },
  {
    "path": "packages/openapi-ts-tests/orpc/v1/test/3.1.x.test.ts",
    "content": "import fs from 'node:fs';\nimport path from 'node:path';\n\nimport { createClient } from '@hey-api/openapi-ts';\n\nimport { getFilePaths } from '../../../utils';\nimport { snapshotsDir, tmpDir } from './constants';\nimport { createOrpcConfig } from './utils';\n\nconst version = '3.1.x';\n\nconst outputDir = path.join(tmpDir, version);\n\ndescribe(`OpenAPI ${version}`, () => {\n  const createConfig = createOrpcConfig({ openApiVersion: version, outputDir });\n\n  const scenarios = [\n    {\n      config: createConfig({\n        input: 'orpc.yaml',\n        output: 'default',\n        plugins: ['orpc', 'zod'],\n      }),\n      description: 'generate oRPC contracts with Zod schemas',\n    },\n    {\n      config: createConfig({\n        input: 'orpc.yaml',\n        output: 'custom-names',\n        plugins: [\n          'valibot',\n          {\n            contracts: {\n              containerName: 'rpcContract',\n              contractName: '{{name}}Rpc',\n            },\n            name: 'orpc',\n          },\n        ],\n      }),\n      description: 'generate oRPC contracts with custom names and Valibot schemas',\n    },\n    {\n      config: createConfig({\n        input: 'orpc.yaml',\n        output: 'contracts-strategy-by-tags',\n        plugins: [\n          'zod',\n          {\n            contracts: {\n              strategy: 'byTags',\n            },\n            name: 'orpc',\n          },\n        ],\n      }),\n      description: 'generate oRPC contracts grouped by tags',\n    },\n    {\n      config: createConfig({\n        input: 'orpc.yaml',\n        output: 'contracts-strategy-single',\n        plugins: [\n          'zod',\n          {\n            contracts: {\n              containerName: 'api',\n              strategy: 'single',\n            },\n            name: 'orpc',\n          },\n        ],\n      }),\n      description: 'generate oRPC contracts in a single container',\n    },\n    {\n      config: createConfig({\n        input: 'orpc.yaml',\n        output: 'contracts-nesting-id',\n        plugins: [\n          'zod',\n          {\n            contracts: {\n              nesting: 'id',\n              strategy: 'byTags',\n            },\n            name: 'orpc',\n          },\n        ],\n      }),\n      description: 'generate oRPC contracts without operationId nesting',\n    },\n    {\n      config: createConfig({\n        input: 'orpc.yaml',\n        output: 'contracts-custom-naming',\n        plugins: [\n          'zod',\n          {\n            contracts: {\n              containerName: '{{name}}Contracts',\n              contractName: { casing: 'PascalCase' },\n              segmentName: { casing: 'PascalCase' },\n              strategy: 'byTags',\n            },\n            name: 'orpc',\n          },\n        ],\n      }),\n      description: 'generate oRPC contracts with custom naming',\n    },\n  ];\n\n  it.each(scenarios)('$description', async ({ config }) => {\n    await createClient(config);\n\n    const filePaths = getFilePaths(config.output as string);\n\n    await Promise.all(\n      filePaths.map(async (filePath) => {\n        const fileContent = fs.readFileSync(filePath, 'utf-8');\n        await expect(fileContent).toMatchFileSnapshot(\n          path.join(snapshotsDir, version, filePath.slice(outputDir.length + 1)),\n        );\n      }),\n    );\n  });\n});\n"
  },
  {
    "path": "packages/openapi-ts-tests/orpc/v1/test/constants.ts",
    "content": "import path from 'node:path';\n\nexport const snapshotsDir = path.join(__dirname, '..', '__snapshots__');\nexport const tmpDir = path.join(__dirname, '..', '.tmp');\n"
  },
  {
    "path": "packages/openapi-ts-tests/orpc/v1/test/globalTeardown.ts",
    "content": "import fs from 'node:fs';\n\nimport { tmpDir } from './constants';\n\nexport function teardown() {\n  fs.rmSync(tmpDir, { force: true, recursive: true });\n}\n"
  },
  {
    "path": "packages/openapi-ts-tests/orpc/v1/test/utils.ts",
    "content": "import path from 'node:path';\n\nimport type { UserConfig } from '@hey-api/openapi-ts';\n\nimport { getSpecsPath } from '../../../utils';\n\nexport const createOrpcConfig =\n  ({ openApiVersion, outputDir }: { openApiVersion: string; outputDir: string }) =>\n  (userConfig: UserConfig) => {\n    const input = userConfig.input instanceof Array ? userConfig.input[0]! : userConfig.input;\n    const inputPath = path.join(\n      getSpecsPath(),\n      openApiVersion,\n      typeof input === 'string' ? input : (input.path as string),\n    );\n    const output = userConfig.output instanceof Array ? userConfig.output[0]! : userConfig.output;\n    const outputPath = typeof output === 'string' ? output : (output?.path ?? '');\n    return {\n      plugins: ['orpc'],\n      ...userConfig,\n      input:\n        typeof userConfig.input === 'string'\n          ? inputPath\n          : {\n              ...userConfig.input,\n              path: inputPath,\n            },\n      logs: { level: 'silent', path: './logs' },\n      output: path.join(outputDir, outputPath),\n    } as UserConfig;\n  };\n"
  },
  {
    "path": "packages/openapi-ts-tests/orpc/v1/tsconfig.json",
    "content": "{\n  \"extends\": \"../../tsconfig.base.json\",\n  \"include\": [\"test/**/*\", \"__snapshots__/**/*\"],\n  \"references\": [{ \"path\": \"../../../openapi-ts\" }]\n}\n"
  },
  {
    "path": "packages/openapi-ts-tests/orpc/v1/turbo.json",
    "content": "{\n  \"$schema\": \"../../../../node_modules/turbo/schema.json\",\n  \"extends\": [\"//\"],\n  \"tasks\": {\n    \"build\": {\n      \"dependsOn\": [],\n      \"outputs\": [\"dist/**\"]\n    }\n  }\n}\n"
  },
  {
    "path": "packages/openapi-ts-tests/orpc/v1/vitest.setup.ts",
    "content": "import { fileURLToPath } from 'node:url';\n\nimport { beforeAll } from 'vitest';\n\nbeforeAll(() => {\n  process.chdir(fileURLToPath(new URL('.', import.meta.url)));\n});\n"
  },
  {
    "path": "packages/openapi-ts-tests/sdks/.gitignore",
    "content": ".DS_Store\n.idea\n.tmp\n.tsdown\nlogs\nnode_modules\ntemp\n\n.env\ncoverage\ndist\n\n# test files\n.gen\n"
  },
  {
    "path": "packages/openapi-ts-tests/sdks/__snapshots__/method-class-conflict/class/client/client.gen.ts",
    "content": "// 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 (options: RequestOptions) => {\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 url = buildUrl(opts);\n\n    return { opts, url };\n  };\n\n  const request: Client['request'] = async (options) => {\n    // @ts-expect-error\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"
  },
  {
    "path": "packages/openapi-ts-tests/sdks/__snapshots__/method-class-conflict/class/client/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type { Auth } from '../core/auth.gen';\nexport type { QuerySerializerOptions } from '../core/bodySerializer.gen';\nexport {\n  formDataBodySerializer,\n  jsonBodySerializer,\n  urlSearchParamsBodySerializer,\n} from '../core/bodySerializer.gen';\nexport { buildClientParams } from '../core/params.gen';\nexport { serializeQueryKeyValue } from '../core/queryKeySerializer.gen';\nexport { createClient } from './client.gen';\nexport type {\n  Client,\n  ClientOptions,\n  Config,\n  CreateClientConfig,\n  Options,\n  RequestOptions,\n  RequestResult,\n  ResolvedRequestOptions,\n  ResponseStyle,\n  TDataShape,\n} from './types.gen';\nexport { createConfig, mergeHeaders } from './utils.gen';\n"
  },
  {
    "path": "packages/openapi-ts-tests/sdks/__snapshots__/method-class-conflict/class/client/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { Auth } from '../core/auth.gen';\nimport type {\n  ServerSentEventsOptions,\n  ServerSentEventsResult,\n} from '../core/serverSentEvents.gen';\nimport type { Client as CoreClient, Config as CoreConfig } from '../core/types.gen';\nimport type { Middleware } from './utils.gen';\n\nexport type ResponseStyle = 'data' | 'fields';\n\nexport interface Config<T extends ClientOptions = ClientOptions>\n  extends Omit<RequestInit, 'body' | 'headers' | 'method'>, CoreConfig {\n  /**\n   * Base URL for all requests made by this client.\n   */\n  baseUrl?: T['baseUrl'];\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   * Please don't use the Fetch client for Next.js applications. The `next`\n   * options won't have any effect.\n   *\n   * Install {@link https://www.npmjs.com/package/@hey-api/client-next `@hey-api/client-next`} instead.\n   */\n  next?: never;\n  /**\n   * Return the response data parsed in a specified format. By default, `auto`\n   * will infer the appropriate method from the `Content-Type` response header.\n   * You can override this behavior with any of the {@link Body} methods.\n   * Select `stream` if you don't want to parse response data at all.\n   *\n   * @default 'auto'\n   */\n  parseAs?: 'arrayBuffer' | 'auto' | 'blob' | 'formData' | 'json' | 'stream' | 'text';\n  /**\n   * Should we return only data or multiple fields (data, error, response, etc.)?\n   *\n   * @default 'fields'\n   */\n  responseStyle?: ResponseStyle;\n  /**\n   * Throw an error instead of returning it in the response?\n   *\n   * @default false\n   */\n  throwOnError?: T['throwOnError'];\n}\n\nexport interface RequestOptions<\n  TData = unknown,\n  TResponseStyle extends ResponseStyle = 'fields',\n  ThrowOnError extends boolean = boolean,\n  Url extends string = string,\n>\n  extends\n    Config<{\n      responseStyle: TResponseStyle;\n      throwOnError: ThrowOnError;\n    }>,\n    Pick<\n      ServerSentEventsOptions<TData>,\n      | 'onRequest'\n      | 'onSseError'\n      | 'onSseEvent'\n      | 'sseDefaultRetryDelay'\n      | 'sseMaxRetryAttempts'\n      | 'sseMaxRetryDelay'\n    > {\n  /**\n   * Any body that you want to add to your request.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/fetch#body}\n   */\n  body?: unknown;\n  path?: Record<string, unknown>;\n  query?: Record<string, unknown>;\n  /**\n   * Security mechanism(s) to use for the request.\n   */\n  security?: ReadonlyArray<Auth>;\n  url: Url;\n}\n\nexport interface ResolvedRequestOptions<\n  TResponseStyle extends ResponseStyle = 'fields',\n  ThrowOnError extends boolean = boolean,\n  Url extends string = string,\n> extends RequestOptions<unknown, TResponseStyle, ThrowOnError, Url> {\n  serializedBody?: string;\n}\n\nexport type RequestResult<\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = boolean,\n  TResponseStyle extends ResponseStyle = 'fields',\n> = ThrowOnError extends true\n  ? Promise<\n      TResponseStyle extends 'data'\n        ? TData extends Record<string, unknown>\n          ? TData[keyof TData]\n          : TData\n        : {\n            data: TData extends Record<string, unknown> ? TData[keyof TData] : TData;\n            request: Request;\n            response: Response;\n          }\n    >\n  : Promise<\n      TResponseStyle extends 'data'\n        ? (TData extends Record<string, unknown> ? TData[keyof TData] : TData) | undefined\n        : (\n            | {\n                data: TData extends Record<string, unknown> ? TData[keyof TData] : TData;\n                error: undefined;\n              }\n            | {\n                data: undefined;\n                error: TError extends Record<string, unknown> ? TError[keyof TError] : TError;\n              }\n          ) & {\n            request: Request;\n            response: Response;\n          }\n    >;\n\nexport interface ClientOptions {\n  baseUrl?: string;\n  responseStyle?: ResponseStyle;\n  throwOnError?: boolean;\n}\n\ntype MethodFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'>,\n) => RequestResult<TData, TError, ThrowOnError, TResponseStyle>;\n\ntype SseFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'>,\n) => Promise<ServerSentEventsResult<TData, TError>>;\n\ntype RequestFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'> &\n    Pick<Required<RequestOptions<TData, TResponseStyle, ThrowOnError>>, 'method'>,\n) => RequestResult<TData, TError, ThrowOnError, TResponseStyle>;\n\ntype BuildUrlFn = <\n  TData extends {\n    body?: unknown;\n    path?: Record<string, unknown>;\n    query?: Record<string, unknown>;\n    url: string;\n  },\n>(\n  options: TData & Options<TData>,\n) => string;\n\nexport type Client = CoreClient<RequestFn, Config, MethodFn, BuildUrlFn, SseFn> & {\n  interceptors: Middleware<Request, Response, unknown, ResolvedRequestOptions>;\n};\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 = ClientOptions> = (\n  override?: Config<ClientOptions & T>,\n) => Config<Required<ClientOptions> & T>;\n\nexport interface TDataShape {\n  body?: unknown;\n  headers?: unknown;\n  path?: unknown;\n  query?: unknown;\n  url: string;\n}\n\ntype OmitKeys<T, K> = Pick<T, Exclude<keyof T, K>>;\n\nexport type Options<\n  TData extends TDataShape = TDataShape,\n  ThrowOnError extends boolean = boolean,\n  TResponse = unknown,\n  TResponseStyle extends ResponseStyle = 'fields',\n> = OmitKeys<\n  RequestOptions<TResponse, TResponseStyle, ThrowOnError>,\n  'body' | 'path' | 'query' | 'url'\n> &\n  ([TData] extends [never] ? unknown : Omit<TData, 'url'>);\n"
  },
  {
    "path": "packages/openapi-ts-tests/sdks/__snapshots__/method-class-conflict/class/client/utils.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/sdks/__snapshots__/method-class-conflict/class/client.gen.ts",
    "content": "// 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>());\n"
  },
  {
    "path": "packages/openapi-ts-tests/sdks/__snapshots__/method-class-conflict/class/core/auth.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/sdks/__snapshots__/method-class-conflict/class/core/bodySerializer.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/sdks/__snapshots__/method-class-conflict/class/core/params.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/sdks/__snapshots__/method-class-conflict/class/core/pathSerializer.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/sdks/__snapshots__/method-class-conflict/class/core/queryKeySerializer.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\n/**\n * JSON-friendly union that mirrors what Pinia Colada can hash.\n */\nexport type JsonValue =\n  | null\n  | string\n  | number\n  | boolean\n  | JsonValue[]\n  | { [key: string]: JsonValue };\n\n/**\n * Replacer that converts non-JSON values (bigint, Date, etc.) to safe substitutes.\n */\nexport const queryKeyJsonReplacer = (_key: string, value: unknown) => {\n  if (value === undefined || typeof value === 'function' || typeof value === 'symbol') {\n    return undefined;\n  }\n  if (typeof value === 'bigint') {\n    return value.toString();\n  }\n  if (value instanceof Date) {\n    return value.toISOString();\n  }\n  return value;\n};\n\n/**\n * Safely stringifies a value and parses it back into a JsonValue.\n */\nexport const stringifyToJsonValue = (input: unknown): JsonValue | undefined => {\n  try {\n    const json = JSON.stringify(input, queryKeyJsonReplacer);\n    if (json === undefined) {\n      return undefined;\n    }\n    return JSON.parse(json) as JsonValue;\n  } catch {\n    return undefined;\n  }\n};\n\n/**\n * Detects plain objects (including objects with a null prototype).\n */\nconst isPlainObject = (value: unknown): value is Record<string, unknown> => {\n  if (value === null || typeof value !== 'object') {\n    return false;\n  }\n  const prototype = Object.getPrototypeOf(value as object);\n  return prototype === Object.prototype || prototype === null;\n};\n\n/**\n * Turns URLSearchParams into a sorted JSON object for deterministic keys.\n */\nconst serializeSearchParams = (params: URLSearchParams): JsonValue => {\n  const entries = Array.from(params.entries()).sort(([a], [b]) => a.localeCompare(b));\n  const result: Record<string, JsonValue> = {};\n\n  for (const [key, value] of entries) {\n    const existing = result[key];\n    if (existing === undefined) {\n      result[key] = value;\n      continue;\n    }\n\n    if (Array.isArray(existing)) {\n      (existing as string[]).push(value);\n    } else {\n      result[key] = [existing, value];\n    }\n  }\n\n  return result;\n};\n\n/**\n * Normalizes any accepted value into a JSON-friendly shape for query keys.\n */\nexport const serializeQueryKeyValue = (value: unknown): JsonValue | undefined => {\n  if (value === null) {\n    return null;\n  }\n\n  if (typeof value === 'string' || typeof value === 'number' || typeof value === 'boolean') {\n    return value;\n  }\n\n  if (value === undefined || typeof value === 'function' || typeof value === 'symbol') {\n    return undefined;\n  }\n\n  if (typeof value === 'bigint') {\n    return value.toString();\n  }\n\n  if (value instanceof Date) {\n    return value.toISOString();\n  }\n\n  if (Array.isArray(value)) {\n    return stringifyToJsonValue(value);\n  }\n\n  if (typeof URLSearchParams !== 'undefined' && value instanceof URLSearchParams) {\n    return serializeSearchParams(value);\n  }\n\n  if (isPlainObject(value)) {\n    return stringifyToJsonValue(value);\n  }\n\n  return undefined;\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/sdks/__snapshots__/method-class-conflict/class/core/serverSentEvents.gen.ts",
    "content": "// 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 const 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            // Normalize line endings: CRLF -> LF, then CR -> LF\n            buffer = buffer.replace(/\\r\\n/g, '\\n').replace(/\\r/g, '\\n');\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"
  },
  {
    "path": "packages/openapi-ts-tests/sdks/__snapshots__/method-class-conflict/class/core/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { Auth, AuthToken } from './auth.gen';\nimport type { BodySerializer, QuerySerializer, QuerySerializerOptions } from './bodySerializer.gen';\n\nexport type HttpMethod =\n  | 'connect'\n  | 'delete'\n  | 'get'\n  | 'head'\n  | 'options'\n  | 'patch'\n  | 'post'\n  | 'put'\n  | 'trace';\n\nexport type Client<\n  RequestFn = never,\n  Config = unknown,\n  MethodFn = never,\n  BuildUrlFn = never,\n  SseFn = never,\n> = {\n  /**\n   * Returns the final request URL.\n   */\n  buildUrl: BuildUrlFn;\n  getConfig: () => Config;\n  request: RequestFn;\n  setConfig: (config: Config) => Config;\n} & {\n  [K in HttpMethod]: MethodFn;\n} & ([SseFn] extends [never] ? { sse?: never } : { sse: { [K in HttpMethod]: SseFn } });\n\nexport interface Config {\n  /**\n   * Auth token or a function returning auth token. The resolved value will be\n   * added to the request payload as defined by its `security` array.\n   */\n  auth?: ((auth: Auth) => Promise<AuthToken> | AuthToken) | AuthToken;\n  /**\n   * A function for serializing request body parameter. By default,\n   * {@link JSON.stringify()} will be used.\n   */\n  bodySerializer?: BodySerializer | null;\n  /**\n   * An object containing any HTTP headers that you want to pre-populate your\n   * `Headers` object with.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/Headers/Headers#init See more}\n   */\n  headers?:\n    | RequestInit['headers']\n    | Record<\n        string,\n        string | number | boolean | (string | number | boolean)[] | null | undefined | unknown\n      >;\n  /**\n   * The request method.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/fetch#method See more}\n   */\n  method?: Uppercase<HttpMethod>;\n  /**\n   * A function for serializing request query parameters. By default, arrays\n   * will be exploded in form style, objects will be exploded in deepObject\n   * style, and reserved characters are percent-encoded.\n   *\n   * This method will have no effect if the native `paramsSerializer()` Axios\n   * API function is used.\n   *\n   * {@link https://swagger.io/docs/specification/serialization/#query View examples}\n   */\n  querySerializer?: QuerySerializer | QuerySerializerOptions;\n  /**\n   * A function validating request data. This is useful if you want to ensure\n   * the request conforms to the desired shape, so it can be safely sent to\n   * the server.\n   */\n  requestValidator?: (data: unknown) => Promise<unknown>;\n  /**\n   * A function transforming response data before it's returned. This is useful\n   * for post-processing data, e.g. converting ISO strings into Date objects.\n   */\n  responseTransformer?: (data: unknown) => Promise<unknown>;\n  /**\n   * A function validating response data. This is useful if you want to ensure\n   * the response conforms to the desired shape, so it can be safely passed to\n   * the transformers and returned to the user.\n   */\n  responseValidator?: (data: unknown) => Promise<unknown>;\n}\n\ntype IsExactlyNeverOrNeverUndefined<T> = [T] extends [never]\n  ? true\n  : [T] extends [never | undefined]\n    ? [undefined] extends [T]\n      ? false\n      : true\n    : false;\n\nexport type OmitNever<T extends Record<string, unknown>> = {\n  [K in keyof T as IsExactlyNeverOrNeverUndefined<T[K]> extends true ? never : K]: T[K];\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/sdks/__snapshots__/method-class-conflict/class/core/utils.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/sdks/__snapshots__/method-class-conflict/class/sdk.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport { type Client, formDataBodySerializer, type Options as Options2, type TDataShape } from './client';\nimport { client } from './client.gen';\nimport type { ApiVVersionApiVersionOdataAccountingCompaniesCountData, ApiVVersionApiVersionOdataAccountingCompaniesCountResponses, ApiVVersionApiVersionOdataAccountingCompaniesData, ApiVVersionApiVersionOdataAccountingCompaniesResponses, ApiVVersionApiVersionOdataAccountingCompanyMembershipsCountData, ApiVVersionApiVersionOdataAccountingCompanyMembershipsCountResponses, ApiVVersionApiVersionOdataAccountingCompanyMembershipsData, ApiVVersionApiVersionOdataAccountingCompanyMembershipsResponses, ApiVVersionApiVersionOdataBankAccountsCountData, ApiVVersionApiVersionOdataBankAccountsCountResponses, ApiVVersionApiVersionOdataBankAccountsData, ApiVVersionApiVersionOdataBankAccountsResponses, ApiVVersionApiVersionOdataBusinessAccountantAssignmentsCountData, ApiVVersionApiVersionOdataBusinessAccountantAssignmentsCountResponses, ApiVVersionApiVersionOdataBusinessAccountantAssignmentsData, ApiVVersionApiVersionOdataBusinessAccountantAssignmentsResponses, ApiVVersionApiVersionOdataBusinessDocumentActivitiesCountData, ApiVVersionApiVersionOdataBusinessDocumentActivitiesCountResponses, ApiVVersionApiVersionOdataBusinessDocumentActivitiesData, ApiVVersionApiVersionOdataBusinessDocumentActivitiesResponses, ApiVVersionApiVersionOdataBusinessDocumentsCountData, ApiVVersionApiVersionOdataBusinessDocumentsCountResponses, ApiVVersionApiVersionOdataBusinessDocumentsData, ApiVVersionApiVersionOdataBusinessDocumentsResponses, ApiVVersionApiVersionOdataBusinessDocumentsSummariesCountData, ApiVVersionApiVersionOdataBusinessDocumentsSummariesCountResponses, ApiVVersionApiVersionOdataBusinessDocumentsSummariesData, ApiVVersionApiVersionOdataBusinessDocumentsSummariesResponses, ApiVVersionApiVersionOdataBusinessesCountData, ApiVVersionApiVersionOdataBusinessesCountResponses, ApiVVersionApiVersionOdataBusinessesData, ApiVVersionApiVersionOdataBusinessesKey2Data, ApiVVersionApiVersionOdataBusinessesKey2Responses, ApiVVersionApiVersionOdataBusinessesKeyData, ApiVVersionApiVersionOdataBusinessesKeyResponses, ApiVVersionApiVersionOdataBusinessesResponses, ApiVVersionApiVersionOdataBusinessSummariesCountData, ApiVVersionApiVersionOdataBusinessSummariesCountResponses, ApiVVersionApiVersionOdataBusinessSummariesData, ApiVVersionApiVersionOdataBusinessSummariesResponses, ApiVVersionApiVersionOdataCounterpartiesCountData, ApiVVersionApiVersionOdataCounterpartiesCountResponses, ApiVVersionApiVersionOdataCounterpartiesData, ApiVVersionApiVersionOdataCounterpartiesResponses, ApiVVersionApiVersionOdataDataBoxCredentialsCountData, ApiVVersionApiVersionOdataDataBoxCredentialsCountResponses, ApiVVersionApiVersionOdataDataBoxCredentialsData, ApiVVersionApiVersionOdataDataBoxCredentialsResponses, ApiVVersionApiVersionOdataDocumentTypesCountData, ApiVVersionApiVersionOdataDocumentTypesCountResponses, ApiVVersionApiVersionOdataDocumentTypesData, ApiVVersionApiVersionOdataDocumentTypesResponses, ApiVVersionApiVersionOdataInvitationsCountData, ApiVVersionApiVersionOdataInvitationsCountResponses, ApiVVersionApiVersionOdataInvitationsData, ApiVVersionApiVersionOdataInvitationsResponses, ApiVVersionApiVersionOdataInvoicesCountData, ApiVVersionApiVersionOdataInvoicesCountResponses, ApiVVersionApiVersionOdataInvoicesData, ApiVVersionApiVersionOdataInvoiceSettingsCountData, ApiVVersionApiVersionOdataInvoiceSettingsCountResponses, ApiVVersionApiVersionOdataInvoiceSettingsData, ApiVVersionApiVersionOdataInvoiceSettingsResponses, ApiVVersionApiVersionOdataInvoicesResponses, ApiVVersionApiVersionOdataLicensesCountData, ApiVVersionApiVersionOdataLicensesCountResponses, ApiVVersionApiVersionOdataLicensesData, ApiVVersionApiVersionOdataLicensesResponses, ApiVVersionApiVersionOdataPersonalDocumentsCountData, ApiVVersionApiVersionOdataPersonalDocumentsCountResponses, ApiVVersionApiVersionOdataPersonalDocumentsData, ApiVVersionApiVersionOdataPersonalDocumentsResponses, ApiVVersionApiVersionOdataRecurringTasksCountData, ApiVVersionApiVersionOdataRecurringTasksCountResponses, ApiVVersionApiVersionOdataRecurringTasksData, ApiVVersionApiVersionOdataRecurringTasksResponses, ApiVVersionApiVersionOdataTasksCountData, ApiVVersionApiVersionOdataTasksCountResponses, ApiVVersionApiVersionOdataTasksData, ApiVVersionApiVersionOdataTasksKey2Data, ApiVVersionApiVersionOdataTasksKey2Responses, ApiVVersionApiVersionOdataTasksKeyData, ApiVVersionApiVersionOdataTasksKeyResponses, ApiVVersionApiVersionOdataTasksResponses, DeleteApiV1AccountingCompaniesByIdData, DeleteApiV1AccountingCompaniesByIdResponses, DeleteApiV1AccountingCompanyMembershipsByIdData, DeleteApiV1AccountingCompanyMembershipsByIdResponses, DeleteApiV1BankAccountsByIdData, DeleteApiV1BankAccountsByIdResponses, DeleteApiV1BusinessAccountantAssignmentsByIdData, DeleteApiV1BusinessAccountantAssignmentsByIdResponses, DeleteApiV1BusinessDocumentsByIdData, DeleteApiV1BusinessDocumentsByIdResponses, DeleteApiV1BusinessesByIdData, DeleteApiV1BusinessesByIdResponses, DeleteApiV1CounterpartiesByIdData, DeleteApiV1CounterpartiesByIdResponses, DeleteApiV1DataBoxCredentialsByIdData, DeleteApiV1DataBoxCredentialsByIdResponses, DeleteApiV1InvitationsByIdData, DeleteApiV1InvitationsByIdResponses, DeleteApiV1InvoicesByIdData, DeleteApiV1InvoicesByIdResponses, DeleteApiV1NotificationsDeviceTokensData, DeleteApiV1NotificationsDeviceTokensResponses, DeleteApiV1PersonalDocumentsByIdData, DeleteApiV1PersonalDocumentsByIdResponses, DeleteApiV1RecurringTasksByIdData, DeleteApiV1RecurringTasksByIdResponses, DeleteApiV1UserData, DeleteApiV1UserResponses, GetApiDevConfirmEmailData, GetApiDevConfirmEmailResponses, GetApiDevData, GetApiDevDbCreateData, GetApiDevDbCreateResponses, GetApiDevDbReset2Data, GetApiDevDbReset2Responses, GetApiDevDbResetData, GetApiDevDbResetResponses, GetApiDevDbTouchData, GetApiDevDbTouchResponses, GetApiDevEmailSendTestData, GetApiDevEmailSendTestResponses, GetApiDevJobProcessRecurringTasksData, GetApiDevJobProcessRecurringTasksResponses, GetApiDevNotificationsSendTestData, GetApiDevNotificationsSendTestResponses, GetApiDevReseedDbData, GetApiDevReseedDbResponses, GetApiDevResponses, GetApiDevSeedAllData, GetApiDevSeedAllResponses, GetApiDevSeedData, GetApiDevSeedProdData, GetApiDevSeedProdResponses, GetApiDevSeedResponses, GetApiV1BusinessDocumentsByIdRawData, GetApiV1BusinessDocumentsByIdRawResponses, GetApiV1BusinessesByIdDocumentTypesSummaryData, GetApiV1BusinessesByIdDocumentTypesSummaryResponses, GetApiV1InvoicesByIdPreviewData, GetApiV1InvoicesByIdPreviewResponses, GetApiV1PersonalDocumentsByIdRawData, GetApiV1PersonalDocumentsByIdRawResponses, GetApiV1PersonalDocumentsSummaryData, GetApiV1PersonalDocumentsSummaryResponses, GetApiV1TasksByIdCommentsData, GetApiV1TasksByIdCommentsResponses, GetApiV1TasksByIdDocumentsData, GetApiV1TasksByIdDocumentsResponses, GetApiV1UserDocumentsSummaryData, GetApiV1UserDocumentsSummaryResponses, GetApiV1UserManageInfoData, GetApiV1UserManageInfoErrors, GetApiV1UserManageInfoResponses, GetApiV1UsersMeData, GetApiV1UsersMeResponses, GetData, GetResponses, MapIdentityApiApiVVersionApiVersionUserConfirmEmailData, MapIdentityApiApiVVersionApiVersionUserConfirmEmailResponses, PatchApiV1CounterpartiesByIdData, PatchApiV1CounterpartiesByIdResponses, PatchApiV1InvitationsByIdData, PatchApiV1InvitationsByIdResponses, PatchApiV1InvoicesByIdData, PatchApiV1InvoicesByIdResponses, PatchApiV1RecurringTasksByIdData, PatchApiV1RecurringTasksByIdResponses, PatchApiV1UsersByIdData, PatchApiV1UsersByIdResponses, PostApiV1AccountingCompaniesByIdData, PostApiV1AccountingCompaniesByIdResponses, PostApiV1AccountingCompaniesData, PostApiV1AccountingCompaniesResponses, PostApiV1BusinessDocumentsByIdApproveData, PostApiV1BusinessDocumentsByIdApproveResponses, PostApiV1BusinessDocumentsByIdMoveToBusinessData, PostApiV1BusinessDocumentsByIdMoveToBusinessResponses, PostApiV1BusinessDocumentsByIdMoveToPersonalData, PostApiV1BusinessDocumentsByIdMoveToPersonalResponses, PostApiV1BusinessDocumentsByIdUnapproveData, PostApiV1BusinessDocumentsByIdUnapproveResponses, PostApiV1BusinessDocumentsData, PostApiV1BusinessDocumentsResponses, PostApiV1BusinessesByIdDisconnectData, PostApiV1BusinessesByIdDisconnectResponses, PostApiV1BusinessesData, PostApiV1BusinessesResponses, PostApiV1CounterpartiesData, PostApiV1CounterpartiesResponses, PostApiV1FeedbackData, PostApiV1FeedbackResponses, PostApiV1InvitationsByIdAcceptData, PostApiV1InvitationsByIdAcceptResponses, PostApiV1InvitationsByIdRejectData, PostApiV1InvitationsByIdRejectResponses, PostApiV1InvitationsData, PostApiV1InvitationsResponses, PostApiV1InvoicesByIdSendData, PostApiV1InvoicesByIdSendResponses, PostApiV1InvoicesByIdSnapshotData, PostApiV1InvoicesByIdSnapshotResponses, PostApiV1InvoicesData, PostApiV1InvoicesResponses, PostApiV1NotificationsTestData, PostApiV1NotificationsTestResponses, PostApiV1PersonalDocumentsByIdMoveToBusinessData, PostApiV1PersonalDocumentsByIdMoveToBusinessResponses, PostApiV1PersonalDocumentsData, PostApiV1PersonalDocumentsResponses, PostApiV1RecurringTasksData, PostApiV1RecurringTasksResponses, PostApiV1TasksByIdApproveData, PostApiV1TasksByIdApproveResponses, PostApiV1TasksByIdRejectData, PostApiV1TasksByIdRejectResponses, PostApiV1TasksByIdSubmitData, PostApiV1TasksByIdSubmitResponses, PostApiV1TasksData, PostApiV1TasksResponses, PostApiV1UserForgotPasswordData, PostApiV1UserForgotPasswordErrors, PostApiV1UserForgotPasswordResponses, PostApiV1UserLoginData, PostApiV1UserLoginResponses, PostApiV1UserLogoutData, PostApiV1UserLogoutResponses, PostApiV1UserManage2FaData, PostApiV1UserManage2FaErrors, PostApiV1UserManage2FaResponses, PostApiV1UserManageInfoData, PostApiV1UserManageInfoErrors, PostApiV1UserManageInfoResponses, PostApiV1UserRefreshData, PostApiV1UserRefreshResponses, PostApiV1UserRegisterData, PostApiV1UserRegisterErrors, PostApiV1UserRegisterResponses, PostApiV1UserResendConfirmationEmailData, PostApiV1UserResendConfirmationEmailResponses, PostApiV1UserResetPasswordData, PostApiV1UserResetPasswordErrors, PostApiV1UserResetPasswordResponses, PutApiV1AccountingCompanyMembershipsData, PutApiV1AccountingCompanyMembershipsResponses, PutApiV1BankAccountsData, PutApiV1BankAccountsResponses, PutApiV1BusinessAccountantAssignmentsData, PutApiV1BusinessAccountantAssignmentsResponses, PutApiV1BusinessDocumentsByIdData, PutApiV1BusinessDocumentsByIdResponses, PutApiV1BusinessesByIdContactData, PutApiV1BusinessesByIdContactResponses, PutApiV1BusinessesByIdData, PutApiV1BusinessesByIdResponses, PutApiV1BusinessMembershipsData, PutApiV1BusinessMembershipsResponses, PutApiV1DataBoxCredentialsData, PutApiV1DataBoxCredentialsResponses, PutApiV1InvoiceSettingsData, PutApiV1InvoiceSettingsResponses, PutApiV1NotificationsDeviceTokensData, PutApiV1NotificationsDeviceTokensResponses, PutApiV1TasksByIdData, PutApiV1TasksByIdResponses } from './types.gen';\n\nexport type Options<TData extends TDataShape = TDataShape, ThrowOnError extends boolean = boolean> = Options2<TData, ThrowOnError> & {\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\nexport class AccountingCompanies {\n    public static count<ThrowOnError extends boolean = false>(options?: Options<ApiVVersionApiVersionOdataAccountingCompaniesCountData, ThrowOnError>) {\n        return (options?.client ?? client).get<ApiVVersionApiVersionOdataAccountingCompaniesCountResponses, unknown, ThrowOnError>({ url: '/api/v1/odata/AccountingCompanies/$count', ...options });\n    }\n}\n\nexport class Odata {\n    public static accountingCompanies<ThrowOnError extends boolean = false>(options?: Options<ApiVVersionApiVersionOdataAccountingCompaniesData, ThrowOnError>) {\n        return (options?.client ?? client).get<ApiVVersionApiVersionOdataAccountingCompaniesResponses, unknown, ThrowOnError>({ url: '/api/v1/odata/AccountingCompanies', ...options });\n    }\n    \n    static accountingCompanies2 = AccountingCompanies;\n}\n\nexport class VVersionApiVersion {\n    static odata = Odata;\n}\n\nexport class Api {\n    static vVersionApiVersion = VVersionApiVersion;\n}\n\nexport class AccountingCompanies2 {\n    public static postApiV1AccountingCompanies<ThrowOnError extends boolean = false>(options?: Options<PostApiV1AccountingCompaniesData, ThrowOnError>) {\n        return (options?.client ?? client).post<PostApiV1AccountingCompaniesResponses, unknown, ThrowOnError>({\n            url: '/api/v1/accounting-companies',\n            ...options,\n            headers: {\n                'Content-Type': 'application/json;odata.metadata=minimal;odata.streaming=true',\n                ...options?.headers\n            }\n        });\n    }\n    \n    public static deleteApiV1AccountingCompaniesById<ThrowOnError extends boolean = false>(options: Options<DeleteApiV1AccountingCompaniesByIdData, ThrowOnError>) {\n        return (options.client ?? client).delete<DeleteApiV1AccountingCompaniesByIdResponses, unknown, ThrowOnError>({ url: '/api/v1/accounting-companies/{id}', ...options });\n    }\n    \n    public static postApiV1AccountingCompaniesById<ThrowOnError extends boolean = false>(options: Options<PostApiV1AccountingCompaniesByIdData, ThrowOnError>) {\n        return (options.client ?? client).post<PostApiV1AccountingCompaniesByIdResponses, unknown, ThrowOnError>({\n            url: '/api/v1/accounting-companies/{id}',\n            ...options,\n            headers: {\n                'Content-Type': 'application/json;odata.metadata=minimal;odata.streaming=true',\n                ...options.headers\n            }\n        });\n    }\n    \n    static api = Api;\n}\n\nexport class AccountingCompanyMemberships {\n    public static count<ThrowOnError extends boolean = false>(options?: Options<ApiVVersionApiVersionOdataAccountingCompanyMembershipsCountData, ThrowOnError>) {\n        return (options?.client ?? client).get<ApiVVersionApiVersionOdataAccountingCompanyMembershipsCountResponses, unknown, ThrowOnError>({ url: '/api/v1/odata/AccountingCompanyMemberships/$count', ...options });\n    }\n}\n\nexport class Odata2 {\n    public static accountingCompanyMemberships<ThrowOnError extends boolean = false>(options?: Options<ApiVVersionApiVersionOdataAccountingCompanyMembershipsData, ThrowOnError>) {\n        return (options?.client ?? client).get<ApiVVersionApiVersionOdataAccountingCompanyMembershipsResponses, unknown, ThrowOnError>({ url: '/api/v1/odata/AccountingCompanyMemberships', ...options });\n    }\n    \n    static accountingCompanyMemberships2 = AccountingCompanyMemberships;\n}\n\nexport class VVersionApiVersion2 {\n    static odata = Odata2;\n}\n\nexport class Api2 {\n    static vVersionApiVersion = VVersionApiVersion2;\n}\n\nexport class AccountingCompanyMemberships2 {\n    public static putApiV1AccountingCompanyMemberships<ThrowOnError extends boolean = false>(options?: Options<PutApiV1AccountingCompanyMembershipsData, ThrowOnError>) {\n        return (options?.client ?? client).put<PutApiV1AccountingCompanyMembershipsResponses, unknown, ThrowOnError>({\n            url: '/api/v1/accounting-company-memberships',\n            ...options,\n            headers: {\n                'Content-Type': 'application/json;odata.metadata=minimal;odata.streaming=true',\n                ...options?.headers\n            }\n        });\n    }\n    \n    public static deleteApiV1AccountingCompanyMembershipsById<ThrowOnError extends boolean = false>(options: Options<DeleteApiV1AccountingCompanyMembershipsByIdData, ThrowOnError>) {\n        return (options.client ?? client).delete<DeleteApiV1AccountingCompanyMembershipsByIdResponses, unknown, ThrowOnError>({ url: '/api/v1/accounting-company-memberships/{id}', ...options });\n    }\n    \n    static api = Api2;\n}\n\nexport class BankAccounts {\n    public static count<ThrowOnError extends boolean = false>(options?: Options<ApiVVersionApiVersionOdataBankAccountsCountData, ThrowOnError>) {\n        return (options?.client ?? client).get<ApiVVersionApiVersionOdataBankAccountsCountResponses, unknown, ThrowOnError>({ url: '/api/v1/odata/BankAccounts/$count', ...options });\n    }\n}\n\nexport class Odata3 {\n    public static bankAccounts<ThrowOnError extends boolean = false>(options?: Options<ApiVVersionApiVersionOdataBankAccountsData, ThrowOnError>) {\n        return (options?.client ?? client).get<ApiVVersionApiVersionOdataBankAccountsResponses, unknown, ThrowOnError>({ url: '/api/v1/odata/BankAccounts', ...options });\n    }\n    \n    static bankAccounts2 = BankAccounts;\n}\n\nexport class VVersionApiVersion3 {\n    static odata = Odata3;\n}\n\nexport class Api3 {\n    static vVersionApiVersion = VVersionApiVersion3;\n}\n\nexport class BankAccounts2 {\n    public static putApiV1BankAccounts<ThrowOnError extends boolean = false>(options?: Options<PutApiV1BankAccountsData, ThrowOnError>) {\n        return (options?.client ?? client).put<PutApiV1BankAccountsResponses, unknown, ThrowOnError>({\n            url: '/api/v1/bank-accounts',\n            ...options,\n            headers: {\n                'Content-Type': 'application/json;odata.metadata=minimal;odata.streaming=true',\n                ...options?.headers\n            }\n        });\n    }\n    \n    public static deleteApiV1BankAccountsById<ThrowOnError extends boolean = false>(options: Options<DeleteApiV1BankAccountsByIdData, ThrowOnError>) {\n        return (options.client ?? client).delete<DeleteApiV1BankAccountsByIdResponses, unknown, ThrowOnError>({ url: '/api/v1/bank-accounts/{id}', ...options });\n    }\n    \n    static api = Api3;\n}\n\nexport class BusinessAccountantAssignments {\n    public static count<ThrowOnError extends boolean = false>(options?: Options<ApiVVersionApiVersionOdataBusinessAccountantAssignmentsCountData, ThrowOnError>) {\n        return (options?.client ?? client).get<ApiVVersionApiVersionOdataBusinessAccountantAssignmentsCountResponses, unknown, ThrowOnError>({ url: '/api/v1/odata/BusinessAccountantAssignments/$count', ...options });\n    }\n}\n\nexport class Odata4 {\n    public static businessAccountantAssignments<ThrowOnError extends boolean = false>(options?: Options<ApiVVersionApiVersionOdataBusinessAccountantAssignmentsData, ThrowOnError>) {\n        return (options?.client ?? client).get<ApiVVersionApiVersionOdataBusinessAccountantAssignmentsResponses, unknown, ThrowOnError>({ url: '/api/v1/odata/BusinessAccountantAssignments', ...options });\n    }\n    \n    static businessAccountantAssignments2 = BusinessAccountantAssignments;\n}\n\nexport class VVersionApiVersion4 {\n    static odata = Odata4;\n}\n\nexport class Api4 {\n    static vVersionApiVersion = VVersionApiVersion4;\n}\n\nexport class BusinessAccountantAssignments2 {\n    public static putApiV1BusinessAccountantAssignments<ThrowOnError extends boolean = false>(options?: Options<PutApiV1BusinessAccountantAssignmentsData, ThrowOnError>) {\n        return (options?.client ?? client).put<PutApiV1BusinessAccountantAssignmentsResponses, unknown, ThrowOnError>({\n            url: '/api/v1/business-accountant-assignments',\n            ...options,\n            headers: {\n                'Content-Type': 'application/json;odata.metadata=minimal;odata.streaming=true',\n                ...options?.headers\n            }\n        });\n    }\n    \n    public static deleteApiV1BusinessAccountantAssignmentsById<ThrowOnError extends boolean = false>(options: Options<DeleteApiV1BusinessAccountantAssignmentsByIdData, ThrowOnError>) {\n        return (options.client ?? client).delete<DeleteApiV1BusinessAccountantAssignmentsByIdResponses, unknown, ThrowOnError>({ url: '/api/v1/business-accountant-assignments/{id}', ...options });\n    }\n    \n    static api = Api4;\n}\n\nexport class BusinessDocumentActivities {\n    public static count<ThrowOnError extends boolean = false>(options?: Options<ApiVVersionApiVersionOdataBusinessDocumentActivitiesCountData, ThrowOnError>) {\n        return (options?.client ?? client).get<ApiVVersionApiVersionOdataBusinessDocumentActivitiesCountResponses, unknown, ThrowOnError>({ url: '/api/v1/odata/BusinessDocumentActivities/$count', ...options });\n    }\n}\n\nexport class BusinessDocuments {\n    public static count<ThrowOnError extends boolean = false>(options?: Options<ApiVVersionApiVersionOdataBusinessDocumentsCountData, ThrowOnError>) {\n        return (options?.client ?? client).get<ApiVVersionApiVersionOdataBusinessDocumentsCountResponses, unknown, ThrowOnError>({ url: '/api/v1/odata/BusinessDocuments/$count', ...options });\n    }\n}\n\nexport class Odata5 {\n    public static businessDocumentActivities<ThrowOnError extends boolean = false>(options?: Options<ApiVVersionApiVersionOdataBusinessDocumentActivitiesData, ThrowOnError>) {\n        return (options?.client ?? client).get<ApiVVersionApiVersionOdataBusinessDocumentActivitiesResponses, unknown, ThrowOnError>({ url: '/api/v1/odata/BusinessDocumentActivities', ...options });\n    }\n    \n    public static businessDocuments<ThrowOnError extends boolean = false>(options?: Options<ApiVVersionApiVersionOdataBusinessDocumentsData, ThrowOnError>) {\n        return (options?.client ?? client).get<ApiVVersionApiVersionOdataBusinessDocumentsResponses, unknown, ThrowOnError>({ url: '/api/v1/odata/BusinessDocuments', ...options });\n    }\n    \n    static businessDocumentActivities2 = BusinessDocumentActivities;\n    \n    static businessDocuments2 = BusinessDocuments;\n}\n\nexport class VVersionApiVersion5 {\n    static odata = Odata5;\n}\n\nexport class Api5 {\n    static vVersionApiVersion = VVersionApiVersion5;\n}\n\nexport class BusinessDocuments2 {\n    public static getApiV1BusinessDocumentsByIdRaw<ThrowOnError extends boolean = false>(options: Options<GetApiV1BusinessDocumentsByIdRawData, ThrowOnError>) {\n        return (options.client ?? client).get<GetApiV1BusinessDocumentsByIdRawResponses, unknown, ThrowOnError>({ url: '/api/v1/business-documents/{id}/raw', ...options });\n    }\n    \n    public static postApiV1BusinessDocuments<ThrowOnError extends boolean = false>(options?: Options<PostApiV1BusinessDocumentsData, ThrowOnError>) {\n        return (options?.client ?? client).post<PostApiV1BusinessDocumentsResponses, unknown, ThrowOnError>({\n            ...formDataBodySerializer,\n            url: '/api/v1/business-documents',\n            ...options,\n            headers: {\n                'Content-Type': null,\n                ...options?.headers\n            }\n        });\n    }\n    \n    public static deleteApiV1BusinessDocumentsById<ThrowOnError extends boolean = false>(options: Options<DeleteApiV1BusinessDocumentsByIdData, ThrowOnError>) {\n        return (options.client ?? client).delete<DeleteApiV1BusinessDocumentsByIdResponses, unknown, ThrowOnError>({ url: '/api/v1/business-documents/{id}', ...options });\n    }\n    \n    public static putApiV1BusinessDocumentsById<ThrowOnError extends boolean = false>(options: Options<PutApiV1BusinessDocumentsByIdData, ThrowOnError>) {\n        return (options.client ?? client).put<PutApiV1BusinessDocumentsByIdResponses, unknown, ThrowOnError>({\n            url: '/api/v1/business-documents/{id}',\n            ...options,\n            headers: {\n                'Content-Type': 'application/json;odata.metadata=minimal;odata.streaming=true',\n                ...options.headers\n            }\n        });\n    }\n    \n    public static postApiV1BusinessDocumentsByIdApprove<ThrowOnError extends boolean = false>(options: Options<PostApiV1BusinessDocumentsByIdApproveData, ThrowOnError>) {\n        return (options.client ?? client).post<PostApiV1BusinessDocumentsByIdApproveResponses, unknown, ThrowOnError>({ url: '/api/v1/business-documents/{id}/approve', ...options });\n    }\n    \n    public static postApiV1BusinessDocumentsByIdUnapprove<ThrowOnError extends boolean = false>(options: Options<PostApiV1BusinessDocumentsByIdUnapproveData, ThrowOnError>) {\n        return (options.client ?? client).post<PostApiV1BusinessDocumentsByIdUnapproveResponses, unknown, ThrowOnError>({ url: '/api/v1/business-documents/{id}/unapprove', ...options });\n    }\n    \n    public static postApiV1BusinessDocumentsByIdMoveToPersonal<ThrowOnError extends boolean = false>(options: Options<PostApiV1BusinessDocumentsByIdMoveToPersonalData, ThrowOnError>) {\n        return (options.client ?? client).post<PostApiV1BusinessDocumentsByIdMoveToPersonalResponses, unknown, ThrowOnError>({ url: '/api/v1/business-documents/{id}/move-to-personal', ...options });\n    }\n    \n    public static postApiV1BusinessDocumentsByIdMoveToBusiness<ThrowOnError extends boolean = false>(options: Options<PostApiV1BusinessDocumentsByIdMoveToBusinessData, ThrowOnError>) {\n        return (options.client ?? client).post<PostApiV1BusinessDocumentsByIdMoveToBusinessResponses, unknown, ThrowOnError>({\n            url: '/api/v1/business-documents/{id}/move-to-business',\n            ...options,\n            headers: {\n                'Content-Type': 'application/json;odata.metadata=minimal;odata.streaming=true',\n                ...options.headers\n            }\n        });\n    }\n    \n    static api = Api5;\n}\n\nexport class BusinessDocumentsSummaries {\n    /**\n     * @deprecated\n     */\n    public static count<ThrowOnError extends boolean = false>(options?: Options<ApiVVersionApiVersionOdataBusinessDocumentsSummariesCountData, ThrowOnError>) {\n        return (options?.client ?? client).get<ApiVVersionApiVersionOdataBusinessDocumentsSummariesCountResponses, unknown, ThrowOnError>({ url: '/api/v1/odata/BusinessDocumentsSummaries/$count', ...options });\n    }\n}\n\nexport class Odata6 {\n    /**\n     * @deprecated\n     */\n    public static businessDocumentsSummaries<ThrowOnError extends boolean = false>(options?: Options<ApiVVersionApiVersionOdataBusinessDocumentsSummariesData, ThrowOnError>) {\n        return (options?.client ?? client).get<ApiVVersionApiVersionOdataBusinessDocumentsSummariesResponses, unknown, ThrowOnError>({ url: '/api/v1/odata/BusinessDocumentsSummaries', ...options });\n    }\n    \n    static businessDocumentsSummaries2 = BusinessDocumentsSummaries;\n}\n\nexport class VVersionApiVersion6 {\n    static odata = Odata6;\n}\n\nexport class Api6 {\n    static vVersionApiVersion = VVersionApiVersion6;\n}\n\nexport class BusinessDocumentsSummaries2 {\n    static api = Api6;\n}\n\nexport class Businesses {\n    public static count<ThrowOnError extends boolean = false>(options?: Options<ApiVVersionApiVersionOdataBusinessesCountData, ThrowOnError>) {\n        return (options?.client ?? client).get<ApiVVersionApiVersionOdataBusinessesCountResponses, unknown, ThrowOnError>({ url: '/api/v1/odata/Businesses/$count', ...options });\n    }\n    \n    public static key<ThrowOnError extends boolean = false>(options?: Options<ApiVVersionApiVersionOdataBusinessesKey2Data, ThrowOnError>) {\n        return (options?.client ?? client).get<ApiVVersionApiVersionOdataBusinessesKey2Responses, unknown, ThrowOnError>({ url: '/api/v1/odata/Businesses/{key}', ...options });\n    }\n}\n\nexport class Odata7 {\n    public static businesses<ThrowOnError extends boolean = false>(options?: Options<ApiVVersionApiVersionOdataBusinessesData, ThrowOnError>) {\n        return (options?.client ?? client).get<ApiVVersionApiVersionOdataBusinessesResponses, unknown, ThrowOnError>({ url: '/api/v1/odata/Businesses', ...options });\n    }\n    \n    public static businessesKey<ThrowOnError extends boolean = false>(options?: Options<ApiVVersionApiVersionOdataBusinessesKeyData, ThrowOnError>) {\n        return (options?.client ?? client).get<ApiVVersionApiVersionOdataBusinessesKeyResponses, unknown, ThrowOnError>({ url: '/api/v1/odata/Businesses({key})', ...options });\n    }\n    \n    static businesses2 = Businesses;\n}\n\nexport class VVersionApiVersion7 {\n    static odata = Odata7;\n}\n\nexport class Api7 {\n    static vVersionApiVersion = VVersionApiVersion7;\n}\n\nexport class Businesses2 {\n    public static getApiV1BusinessesByIdDocumentTypesSummary<ThrowOnError extends boolean = false>(options: Options<GetApiV1BusinessesByIdDocumentTypesSummaryData, ThrowOnError>) {\n        return (options.client ?? client).get<GetApiV1BusinessesByIdDocumentTypesSummaryResponses, unknown, ThrowOnError>({ url: '/api/v1/businesses/{id}/document-types-summary', ...options });\n    }\n    \n    public static postApiV1Businesses<ThrowOnError extends boolean = false>(options?: Options<PostApiV1BusinessesData, ThrowOnError>) {\n        return (options?.client ?? client).post<PostApiV1BusinessesResponses, unknown, ThrowOnError>({\n            url: '/api/v1/businesses',\n            ...options,\n            headers: {\n                'Content-Type': 'application/json;odata.metadata=minimal;odata.streaming=true',\n                ...options?.headers\n            }\n        });\n    }\n    \n    public static deleteApiV1BusinessesById<ThrowOnError extends boolean = false>(options: Options<DeleteApiV1BusinessesByIdData, ThrowOnError>) {\n        return (options.client ?? client).delete<DeleteApiV1BusinessesByIdResponses, unknown, ThrowOnError>({ url: '/api/v1/businesses/{id}', ...options });\n    }\n    \n    public static putApiV1BusinessesById<ThrowOnError extends boolean = false>(options: Options<PutApiV1BusinessesByIdData, ThrowOnError>) {\n        return (options.client ?? client).put<PutApiV1BusinessesByIdResponses, unknown, ThrowOnError>({\n            url: '/api/v1/businesses/{id}',\n            ...options,\n            headers: {\n                'Content-Type': 'application/json;odata.metadata=minimal;odata.streaming=true',\n                ...options.headers\n            }\n        });\n    }\n    \n    public static putApiV1BusinessesByIdContact<ThrowOnError extends boolean = false>(options: Options<PutApiV1BusinessesByIdContactData, ThrowOnError>) {\n        return (options.client ?? client).put<PutApiV1BusinessesByIdContactResponses, unknown, ThrowOnError>({\n            url: '/api/v1/businesses/{id}/contact',\n            ...options,\n            headers: {\n                'Content-Type': 'application/json;odata.metadata=minimal;odata.streaming=true',\n                ...options.headers\n            }\n        });\n    }\n    \n    public static postApiV1BusinessesByIdDisconnect<ThrowOnError extends boolean = false>(options: Options<PostApiV1BusinessesByIdDisconnectData, ThrowOnError>) {\n        return (options.client ?? client).post<PostApiV1BusinessesByIdDisconnectResponses, unknown, ThrowOnError>({ url: '/api/v1/businesses/{id}/disconnect', ...options });\n    }\n    \n    static api = Api7;\n}\n\nexport class BusinessesMemberships {\n    public static putApiV1BusinessMemberships<ThrowOnError extends boolean = false>(options?: Options<PutApiV1BusinessMembershipsData, ThrowOnError>) {\n        return (options?.client ?? client).put<PutApiV1BusinessMembershipsResponses, unknown, ThrowOnError>({\n            url: '/api/v1/business-memberships',\n            ...options,\n            headers: {\n                'Content-Type': 'application/json;odata.metadata=minimal;odata.streaming=true',\n                ...options?.headers\n            }\n        });\n    }\n}\n\nexport class BusinessSummaries {\n    public static count<ThrowOnError extends boolean = false>(options?: Options<ApiVVersionApiVersionOdataBusinessSummariesCountData, ThrowOnError>) {\n        return (options?.client ?? client).get<ApiVVersionApiVersionOdataBusinessSummariesCountResponses, unknown, ThrowOnError>({ url: '/api/v1/odata/BusinessSummaries/$count', ...options });\n    }\n}\n\nexport class Odata8 {\n    public static businessSummaries<ThrowOnError extends boolean = false>(options?: Options<ApiVVersionApiVersionOdataBusinessSummariesData, ThrowOnError>) {\n        return (options?.client ?? client).get<ApiVVersionApiVersionOdataBusinessSummariesResponses, unknown, ThrowOnError>({ url: '/api/v1/odata/BusinessSummaries', ...options });\n    }\n    \n    static businessSummaries2 = BusinessSummaries;\n}\n\nexport class VVersionApiVersion8 {\n    static odata = Odata8;\n}\n\nexport class Api8 {\n    static vVersionApiVersion = VVersionApiVersion8;\n}\n\nexport class BusinessSummaries2 {\n    static api = Api8;\n}\n\nexport class Counterparties {\n    public static count<ThrowOnError extends boolean = false>(options?: Options<ApiVVersionApiVersionOdataCounterpartiesCountData, ThrowOnError>) {\n        return (options?.client ?? client).get<ApiVVersionApiVersionOdataCounterpartiesCountResponses, unknown, ThrowOnError>({ url: '/api/v1/odata/Counterparties/$count', ...options });\n    }\n}\n\nexport class Odata9 {\n    public static counterparties<ThrowOnError extends boolean = false>(options?: Options<ApiVVersionApiVersionOdataCounterpartiesData, ThrowOnError>) {\n        return (options?.client ?? client).get<ApiVVersionApiVersionOdataCounterpartiesResponses, unknown, ThrowOnError>({ url: '/api/v1/odata/Counterparties', ...options });\n    }\n    \n    static counterparties2 = Counterparties;\n}\n\nexport class VVersionApiVersion9 {\n    static odata = Odata9;\n}\n\nexport class Api9 {\n    static vVersionApiVersion = VVersionApiVersion9;\n}\n\nexport class Counterparties2 {\n    public static postApiV1Counterparties<ThrowOnError extends boolean = false>(options?: Options<PostApiV1CounterpartiesData, ThrowOnError>) {\n        return (options?.client ?? client).post<PostApiV1CounterpartiesResponses, unknown, ThrowOnError>({\n            url: '/api/v1/counterparties',\n            ...options,\n            headers: {\n                'Content-Type': 'application/json;odata.metadata=minimal;odata.streaming=true',\n                ...options?.headers\n            }\n        });\n    }\n    \n    public static deleteApiV1CounterpartiesById<ThrowOnError extends boolean = false>(options: Options<DeleteApiV1CounterpartiesByIdData, ThrowOnError>) {\n        return (options.client ?? client).delete<DeleteApiV1CounterpartiesByIdResponses, unknown, ThrowOnError>({ url: '/api/v1/counterparties/{id}', ...options });\n    }\n    \n    public static patchApiV1CounterpartiesById<ThrowOnError extends boolean = false>(options: Options<PatchApiV1CounterpartiesByIdData, ThrowOnError>) {\n        return (options.client ?? client).patch<PatchApiV1CounterpartiesByIdResponses, unknown, ThrowOnError>({\n            url: '/api/v1/counterparties/{id}',\n            ...options,\n            headers: {\n                'Content-Type': 'application/json;odata.metadata=minimal;odata.streaming=true',\n                ...options.headers\n            }\n        });\n    }\n    \n    static api = Api9;\n}\n\nexport class DataBoxCredentials {\n    public static count<ThrowOnError extends boolean = false>(options?: Options<ApiVVersionApiVersionOdataDataBoxCredentialsCountData, ThrowOnError>) {\n        return (options?.client ?? client).get<ApiVVersionApiVersionOdataDataBoxCredentialsCountResponses, unknown, ThrowOnError>({ url: '/api/v1/odata/DataBoxCredentials/$count', ...options });\n    }\n}\n\nexport class Odata10 {\n    public static dataBoxCredentials<ThrowOnError extends boolean = false>(options?: Options<ApiVVersionApiVersionOdataDataBoxCredentialsData, ThrowOnError>) {\n        return (options?.client ?? client).get<ApiVVersionApiVersionOdataDataBoxCredentialsResponses, unknown, ThrowOnError>({ url: '/api/v1/odata/DataBoxCredentials', ...options });\n    }\n    \n    static dataBoxCredentials2 = DataBoxCredentials;\n}\n\nexport class VVersionApiVersion10 {\n    static odata = Odata10;\n}\n\nexport class Api10 {\n    static vVersionApiVersion = VVersionApiVersion10;\n}\n\nexport class DataBoxCredentials2 {\n    public static putApiV1DataBoxCredentials<ThrowOnError extends boolean = false>(options?: Options<PutApiV1DataBoxCredentialsData, ThrowOnError>) {\n        return (options?.client ?? client).put<PutApiV1DataBoxCredentialsResponses, unknown, ThrowOnError>({\n            url: '/api/v1/data-box-credentials',\n            ...options,\n            headers: {\n                'Content-Type': 'application/json;odata.metadata=minimal;odata.streaming=true',\n                ...options?.headers\n            }\n        });\n    }\n    \n    public static deleteApiV1DataBoxCredentialsById<ThrowOnError extends boolean = false>(options: Options<DeleteApiV1DataBoxCredentialsByIdData, ThrowOnError>) {\n        return (options.client ?? client).delete<DeleteApiV1DataBoxCredentialsByIdResponses, unknown, ThrowOnError>({ url: '/api/v1/data-box-credentials/{id}', ...options });\n    }\n    \n    static api = Api10;\n}\n\nexport class Dev {\n    public static getApiDev<ThrowOnError extends boolean = false>(options?: Options<GetApiDevData, ThrowOnError>) {\n        return (options?.client ?? client).get<GetApiDevResponses, unknown, ThrowOnError>({ url: '/api/dev', ...options });\n    }\n    \n    public static getApiDevReseedDb<ThrowOnError extends boolean = false>(options?: Options<GetApiDevReseedDbData, ThrowOnError>) {\n        return (options?.client ?? client).get<GetApiDevReseedDbResponses, unknown, ThrowOnError>({ url: '/api/dev/reseed-db', ...options });\n    }\n    \n    public static getApiDevDbReset<ThrowOnError extends boolean = false>(options?: Options<GetApiDevDbResetData, ThrowOnError>) {\n        return (options?.client ?? client).get<GetApiDevDbResetResponses, unknown, ThrowOnError>({ url: '/api/dev/db-reset', ...options });\n    }\n    \n    public static getApiDevDbReset2<ThrowOnError extends boolean = false>(options?: Options<GetApiDevDbReset2Data, ThrowOnError>) {\n        return (options?.client ?? client).get<GetApiDevDbReset2Responses, unknown, ThrowOnError>({ url: '/api/dev/db/reset', ...options });\n    }\n    \n    public static getApiDevDbCreate<ThrowOnError extends boolean = false>(options?: Options<GetApiDevDbCreateData, ThrowOnError>) {\n        return (options?.client ?? client).get<GetApiDevDbCreateResponses, unknown, ThrowOnError>({ url: '/api/dev/db/create', ...options });\n    }\n    \n    public static getApiDevDbTouch<ThrowOnError extends boolean = false>(options?: Options<GetApiDevDbTouchData, ThrowOnError>) {\n        return (options?.client ?? client).get<GetApiDevDbTouchResponses, unknown, ThrowOnError>({ url: '/api/dev/db/touch', ...options });\n    }\n    \n    public static getApiDevSeed<ThrowOnError extends boolean = false>(options?: Options<GetApiDevSeedData, ThrowOnError>) {\n        return (options?.client ?? client).get<GetApiDevSeedResponses, unknown, ThrowOnError>({ url: '/api/dev/seed', ...options });\n    }\n    \n    public static getApiDevSeedAll<ThrowOnError extends boolean = false>(options?: Options<GetApiDevSeedAllData, ThrowOnError>) {\n        return (options?.client ?? client).get<GetApiDevSeedAllResponses, unknown, ThrowOnError>({ url: '/api/dev/seed-all', ...options });\n    }\n    \n    public static getApiDevSeedProd<ThrowOnError extends boolean = false>(options?: Options<GetApiDevSeedProdData, ThrowOnError>) {\n        return (options?.client ?? client).get<GetApiDevSeedProdResponses, unknown, ThrowOnError>({ url: '/api/dev/seed-prod', ...options });\n    }\n    \n    public static getApiDevJobProcessRecurringTasks<ThrowOnError extends boolean = false>(options?: Options<GetApiDevJobProcessRecurringTasksData, ThrowOnError>) {\n        return (options?.client ?? client).get<GetApiDevJobProcessRecurringTasksResponses, unknown, ThrowOnError>({ url: '/api/dev/job/process-recurring-tasks', ...options });\n    }\n    \n    public static getApiDevNotificationsSendTest<ThrowOnError extends boolean = false>(options?: Options<GetApiDevNotificationsSendTestData, ThrowOnError>) {\n        return (options?.client ?? client).get<GetApiDevNotificationsSendTestResponses, unknown, ThrowOnError>({ url: '/api/dev/notifications/send-test', ...options });\n    }\n    \n    public static getApiDevConfirmEmail<ThrowOnError extends boolean = false>(options?: Options<GetApiDevConfirmEmailData, ThrowOnError>) {\n        return (options?.client ?? client).get<GetApiDevConfirmEmailResponses, unknown, ThrowOnError>({ url: '/api/dev/confirm-email', ...options });\n    }\n    \n    public static getApiDevEmailSendTest<ThrowOnError extends boolean = false>(options?: Options<GetApiDevEmailSendTestData, ThrowOnError>) {\n        return (options?.client ?? client).get<GetApiDevEmailSendTestResponses, unknown, ThrowOnError>({ url: '/api/dev/email/send-test', ...options });\n    }\n}\n\nexport class DeviceTokens {\n    public static deleteApiV1NotificationsDeviceTokens<ThrowOnError extends boolean = false>(options?: Options<DeleteApiV1NotificationsDeviceTokensData, ThrowOnError>) {\n        return (options?.client ?? client).delete<DeleteApiV1NotificationsDeviceTokensResponses, unknown, ThrowOnError>({\n            url: '/api/v1/notifications/device-tokens',\n            ...options,\n            headers: {\n                'Content-Type': 'application/json;odata.metadata=minimal;odata.streaming=true',\n                ...options?.headers\n            }\n        });\n    }\n    \n    public static putApiV1NotificationsDeviceTokens<ThrowOnError extends boolean = false>(options?: Options<PutApiV1NotificationsDeviceTokensData, ThrowOnError>) {\n        return (options?.client ?? client).put<PutApiV1NotificationsDeviceTokensResponses, unknown, ThrowOnError>({\n            url: '/api/v1/notifications/device-tokens',\n            ...options,\n            headers: {\n                'Content-Type': 'application/json;odata.metadata=minimal;odata.streaming=true',\n                ...options?.headers\n            }\n        });\n    }\n}\n\nexport class DocumentTypes {\n    public static count<ThrowOnError extends boolean = false>(options?: Options<ApiVVersionApiVersionOdataDocumentTypesCountData, ThrowOnError>) {\n        return (options?.client ?? client).get<ApiVVersionApiVersionOdataDocumentTypesCountResponses, unknown, ThrowOnError>({ url: '/api/v1/odata/DocumentTypes/$count', ...options });\n    }\n}\n\nexport class Odata11 {\n    public static documentTypes<ThrowOnError extends boolean = false>(options?: Options<ApiVVersionApiVersionOdataDocumentTypesData, ThrowOnError>) {\n        return (options?.client ?? client).get<ApiVVersionApiVersionOdataDocumentTypesResponses, unknown, ThrowOnError>({ url: '/api/v1/odata/DocumentTypes', ...options });\n    }\n    \n    static documentTypes2 = DocumentTypes;\n}\n\nexport class VVersionApiVersion11 {\n    static odata = Odata11;\n}\n\nexport class Api11 {\n    static vVersionApiVersion = VVersionApiVersion11;\n}\n\nexport class DocumentTypes2 {\n    static api = Api11;\n}\n\nexport class Feedback {\n    public static postApiV1Feedback<ThrowOnError extends boolean = false>(options?: Options<PostApiV1FeedbackData, ThrowOnError>) {\n        return (options?.client ?? client).post<PostApiV1FeedbackResponses, unknown, ThrowOnError>({\n            url: '/api/v1/feedback',\n            ...options,\n            headers: {\n                'Content-Type': 'application/json;odata.metadata=minimal;odata.streaming=true',\n                ...options?.headers\n            }\n        });\n    }\n}\n\nexport class Invitations {\n    public static count<ThrowOnError extends boolean = false>(options?: Options<ApiVVersionApiVersionOdataInvitationsCountData, ThrowOnError>) {\n        return (options?.client ?? client).get<ApiVVersionApiVersionOdataInvitationsCountResponses, unknown, ThrowOnError>({ url: '/api/v1/odata/Invitations/$count', ...options });\n    }\n}\n\nexport class Odata12 {\n    public static invitations<ThrowOnError extends boolean = false>(options?: Options<ApiVVersionApiVersionOdataInvitationsData, ThrowOnError>) {\n        return (options?.client ?? client).get<ApiVVersionApiVersionOdataInvitationsResponses, unknown, ThrowOnError>({ url: '/api/v1/odata/Invitations', ...options });\n    }\n    \n    static invitations2 = Invitations;\n}\n\nexport class VVersionApiVersion12 {\n    static odata = Odata12;\n}\n\nexport class Api12 {\n    static vVersionApiVersion = VVersionApiVersion12;\n}\n\nexport class Invitations2 {\n    public static postApiV1Invitations<ThrowOnError extends boolean = false>(options?: Options<PostApiV1InvitationsData, ThrowOnError>) {\n        return (options?.client ?? client).post<PostApiV1InvitationsResponses, unknown, ThrowOnError>({\n            url: '/api/v1/invitations',\n            ...options,\n            headers: {\n                'Content-Type': 'application/json;odata.metadata=minimal;odata.streaming=true',\n                ...options?.headers\n            }\n        });\n    }\n    \n    public static postApiV1InvitationsByIdAccept<ThrowOnError extends boolean = false>(options: Options<PostApiV1InvitationsByIdAcceptData, ThrowOnError>) {\n        return (options.client ?? client).post<PostApiV1InvitationsByIdAcceptResponses, unknown, ThrowOnError>({\n            url: '/api/v1/invitations/{id}/accept',\n            ...options,\n            headers: {\n                'Content-Type': 'application/json;odata.metadata=minimal;odata.streaming=true',\n                ...options.headers\n            }\n        });\n    }\n    \n    public static postApiV1InvitationsByIdReject<ThrowOnError extends boolean = false>(options: Options<PostApiV1InvitationsByIdRejectData, ThrowOnError>) {\n        return (options.client ?? client).post<PostApiV1InvitationsByIdRejectResponses, unknown, ThrowOnError>({ url: '/api/v1/invitations/{id}/reject', ...options });\n    }\n    \n    public static deleteApiV1InvitationsById<ThrowOnError extends boolean = false>(options: Options<DeleteApiV1InvitationsByIdData, ThrowOnError>) {\n        return (options.client ?? client).delete<DeleteApiV1InvitationsByIdResponses, unknown, ThrowOnError>({ url: '/api/v1/invitations/{id}', ...options });\n    }\n    \n    public static patchApiV1InvitationsById<ThrowOnError extends boolean = false>(options: Options<PatchApiV1InvitationsByIdData, ThrowOnError>) {\n        return (options.client ?? client).patch<PatchApiV1InvitationsByIdResponses, unknown, ThrowOnError>({\n            url: '/api/v1/invitations/{id}',\n            ...options,\n            headers: {\n                'Content-Type': 'application/json;odata.metadata=minimal;odata.streaming=true',\n                ...options.headers\n            }\n        });\n    }\n    \n    static api = Api12;\n}\n\nexport class Invoices {\n    public static count<ThrowOnError extends boolean = false>(options?: Options<ApiVVersionApiVersionOdataInvoicesCountData, ThrowOnError>) {\n        return (options?.client ?? client).get<ApiVVersionApiVersionOdataInvoicesCountResponses, unknown, ThrowOnError>({ url: '/api/v1/odata/Invoices/$count', ...options });\n    }\n}\n\nexport class Odata13 {\n    public static invoices<ThrowOnError extends boolean = false>(options?: Options<ApiVVersionApiVersionOdataInvoicesData, ThrowOnError>) {\n        return (options?.client ?? client).get<ApiVVersionApiVersionOdataInvoicesResponses, unknown, ThrowOnError>({ url: '/api/v1/odata/Invoices', ...options });\n    }\n    \n    static invoices2 = Invoices;\n}\n\nexport class VVersionApiVersion13 {\n    static odata = Odata13;\n}\n\nexport class Api13 {\n    static vVersionApiVersion = VVersionApiVersion13;\n}\n\nexport class Invoices2 {\n    public static postApiV1Invoices<ThrowOnError extends boolean = false>(options?: Options<PostApiV1InvoicesData, ThrowOnError>) {\n        return (options?.client ?? client).post<PostApiV1InvoicesResponses, unknown, ThrowOnError>({\n            url: '/api/v1/invoices',\n            ...options,\n            headers: {\n                'Content-Type': 'application/json;odata.metadata=minimal;odata.streaming=true',\n                ...options?.headers\n            }\n        });\n    }\n    \n    public static deleteApiV1InvoicesById<ThrowOnError extends boolean = false>(options: Options<DeleteApiV1InvoicesByIdData, ThrowOnError>) {\n        return (options.client ?? client).delete<DeleteApiV1InvoicesByIdResponses, unknown, ThrowOnError>({ url: '/api/v1/invoices/{id}', ...options });\n    }\n    \n    public static patchApiV1InvoicesById<ThrowOnError extends boolean = false>(options: Options<PatchApiV1InvoicesByIdData, ThrowOnError>) {\n        return (options.client ?? client).patch<PatchApiV1InvoicesByIdResponses, unknown, ThrowOnError>({\n            url: '/api/v1/invoices/{id}',\n            ...options,\n            headers: {\n                'Content-Type': 'application/json;odata.metadata=minimal;odata.streaming=true',\n                ...options.headers\n            }\n        });\n    }\n    \n    public static getApiV1InvoicesByIdPreview<ThrowOnError extends boolean = false>(options: Options<GetApiV1InvoicesByIdPreviewData, ThrowOnError>) {\n        return (options.client ?? client).get<GetApiV1InvoicesByIdPreviewResponses, unknown, ThrowOnError>({ url: '/api/v1/invoices/{id}/preview', ...options });\n    }\n    \n    public static postApiV1InvoicesByIdSend<ThrowOnError extends boolean = false>(options: Options<PostApiV1InvoicesByIdSendData, ThrowOnError>) {\n        return (options.client ?? client).post<PostApiV1InvoicesByIdSendResponses, unknown, ThrowOnError>({\n            url: '/api/v1/invoices/{id}/send',\n            ...options,\n            headers: {\n                'Content-Type': 'application/json;odata.metadata=minimal;odata.streaming=true',\n                ...options.headers\n            }\n        });\n    }\n    \n    public static postApiV1InvoicesByIdSnapshot<ThrowOnError extends boolean = false>(options: Options<PostApiV1InvoicesByIdSnapshotData, ThrowOnError>) {\n        return (options.client ?? client).post<PostApiV1InvoicesByIdSnapshotResponses, unknown, ThrowOnError>({ url: '/api/v1/invoices/{id}/snapshot', ...options });\n    }\n    \n    static api = Api13;\n}\n\nexport class InvoiceSettings {\n    public static count<ThrowOnError extends boolean = false>(options?: Options<ApiVVersionApiVersionOdataInvoiceSettingsCountData, ThrowOnError>) {\n        return (options?.client ?? client).get<ApiVVersionApiVersionOdataInvoiceSettingsCountResponses, unknown, ThrowOnError>({ url: '/api/v1/odata/InvoiceSettings/$count', ...options });\n    }\n}\n\nexport class Odata14 {\n    public static invoiceSettings<ThrowOnError extends boolean = false>(options?: Options<ApiVVersionApiVersionOdataInvoiceSettingsData, ThrowOnError>) {\n        return (options?.client ?? client).get<ApiVVersionApiVersionOdataInvoiceSettingsResponses, unknown, ThrowOnError>({ url: '/api/v1/odata/InvoiceSettings', ...options });\n    }\n    \n    static invoiceSettings2 = InvoiceSettings;\n}\n\nexport class VVersionApiVersion14 {\n    static odata = Odata14;\n}\n\nexport class Api14 {\n    static vVersionApiVersion = VVersionApiVersion14;\n}\n\nexport class InvoiceSettings2 {\n    public static putApiV1InvoiceSettings<ThrowOnError extends boolean = false>(options?: Options<PutApiV1InvoiceSettingsData, ThrowOnError>) {\n        return (options?.client ?? client).put<PutApiV1InvoiceSettingsResponses, unknown, ThrowOnError>({\n            url: '/api/v1/invoice-settings',\n            ...options,\n            headers: {\n                'Content-Type': 'application/json;odata.metadata=minimal;odata.streaming=true',\n                ...options?.headers\n            }\n        });\n    }\n    \n    static api = Api14;\n}\n\nexport class Licenses {\n    public static count<ThrowOnError extends boolean = false>(options?: Options<ApiVVersionApiVersionOdataLicensesCountData, ThrowOnError>) {\n        return (options?.client ?? client).get<ApiVVersionApiVersionOdataLicensesCountResponses, unknown, ThrowOnError>({ url: '/api/v1/odata/Licenses/$count', ...options });\n    }\n}\n\nexport class Odata15 {\n    public static licenses<ThrowOnError extends boolean = false>(options?: Options<ApiVVersionApiVersionOdataLicensesData, ThrowOnError>) {\n        return (options?.client ?? client).get<ApiVVersionApiVersionOdataLicensesResponses, unknown, ThrowOnError>({ url: '/api/v1/odata/Licenses', ...options });\n    }\n    \n    static licenses2 = Licenses;\n}\n\nexport class VVersionApiVersion15 {\n    static odata = Odata15;\n}\n\nexport class Api15 {\n    static vVersionApiVersion = VVersionApiVersion15;\n}\n\nexport class Licenses2 {\n    static api = Api15;\n}\n\nexport class Notifications {\n    public static postApiV1NotificationsTest<ThrowOnError extends boolean = false>(options?: Options<PostApiV1NotificationsTestData, ThrowOnError>) {\n        return (options?.client ?? client).post<PostApiV1NotificationsTestResponses, unknown, ThrowOnError>({\n            url: '/api/v1/notifications/test',\n            ...options,\n            headers: {\n                'Content-Type': 'application/json;odata.metadata=minimal;odata.streaming=true',\n                ...options?.headers\n            }\n        });\n    }\n}\n\nexport class PersonalDocuments {\n    public static count<ThrowOnError extends boolean = false>(options?: Options<ApiVVersionApiVersionOdataPersonalDocumentsCountData, ThrowOnError>) {\n        return (options?.client ?? client).get<ApiVVersionApiVersionOdataPersonalDocumentsCountResponses, unknown, ThrowOnError>({ url: '/api/v1/odata/PersonalDocuments/$count', ...options });\n    }\n}\n\nexport class Odata16 {\n    public static personalDocuments<ThrowOnError extends boolean = false>(options?: Options<ApiVVersionApiVersionOdataPersonalDocumentsData, ThrowOnError>) {\n        return (options?.client ?? client).get<ApiVVersionApiVersionOdataPersonalDocumentsResponses, unknown, ThrowOnError>({ url: '/api/v1/odata/PersonalDocuments', ...options });\n    }\n    \n    static personalDocuments2 = PersonalDocuments;\n}\n\nexport class VVersionApiVersion16 {\n    static odata = Odata16;\n}\n\nexport class Api16 {\n    static vVersionApiVersion = VVersionApiVersion16;\n}\n\nexport class PersonalDocuments2 {\n    public static getApiV1PersonalDocumentsByIdRaw<ThrowOnError extends boolean = false>(options: Options<GetApiV1PersonalDocumentsByIdRawData, ThrowOnError>) {\n        return (options.client ?? client).get<GetApiV1PersonalDocumentsByIdRawResponses, unknown, ThrowOnError>({ url: '/api/v1/personal-documents/{id}/raw', ...options });\n    }\n    \n    public static postApiV1PersonalDocuments<ThrowOnError extends boolean = false>(options?: Options<PostApiV1PersonalDocumentsData, ThrowOnError>) {\n        return (options?.client ?? client).post<PostApiV1PersonalDocumentsResponses, unknown, ThrowOnError>({\n            ...formDataBodySerializer,\n            url: '/api/v1/personal-documents',\n            ...options,\n            headers: {\n                'Content-Type': null,\n                ...options?.headers\n            }\n        });\n    }\n    \n    public static postApiV1PersonalDocumentsByIdMoveToBusiness<ThrowOnError extends boolean = false>(options: Options<PostApiV1PersonalDocumentsByIdMoveToBusinessData, ThrowOnError>) {\n        return (options.client ?? client).post<PostApiV1PersonalDocumentsByIdMoveToBusinessResponses, unknown, ThrowOnError>({\n            url: '/api/v1/personal-documents/{id}/move-to-business',\n            ...options,\n            headers: {\n                'Content-Type': 'application/json;odata.metadata=minimal;odata.streaming=true',\n                ...options.headers\n            }\n        });\n    }\n    \n    public static deleteApiV1PersonalDocumentsById<ThrowOnError extends boolean = false>(options: Options<DeleteApiV1PersonalDocumentsByIdData, ThrowOnError>) {\n        return (options.client ?? client).delete<DeleteApiV1PersonalDocumentsByIdResponses, unknown, ThrowOnError>({ url: '/api/v1/personal-documents/{id}', ...options });\n    }\n    \n    public static getApiV1PersonalDocumentsSummary<ThrowOnError extends boolean = false>(options?: Options<GetApiV1PersonalDocumentsSummaryData, ThrowOnError>) {\n        return (options?.client ?? client).get<GetApiV1PersonalDocumentsSummaryResponses, unknown, ThrowOnError>({ url: '/api/v1/personal-documents/summary', ...options });\n    }\n    \n    static api = Api16;\n}\n\nexport class RecurringTasks {\n    public static count<ThrowOnError extends boolean = false>(options?: Options<ApiVVersionApiVersionOdataRecurringTasksCountData, ThrowOnError>) {\n        return (options?.client ?? client).get<ApiVVersionApiVersionOdataRecurringTasksCountResponses, unknown, ThrowOnError>({ url: '/api/v1/odata/RecurringTasks/$count', ...options });\n    }\n}\n\nexport class Odata17 {\n    public static recurringTasks<ThrowOnError extends boolean = false>(options?: Options<ApiVVersionApiVersionOdataRecurringTasksData, ThrowOnError>) {\n        return (options?.client ?? client).get<ApiVVersionApiVersionOdataRecurringTasksResponses, unknown, ThrowOnError>({ url: '/api/v1/odata/RecurringTasks', ...options });\n    }\n    \n    static recurringTasks2 = RecurringTasks;\n}\n\nexport class VVersionApiVersion17 {\n    static odata = Odata17;\n}\n\nexport class Api17 {\n    static vVersionApiVersion = VVersionApiVersion17;\n}\n\nexport class RecurringTasks2 {\n    public static postApiV1RecurringTasks<ThrowOnError extends boolean = false>(options?: Options<PostApiV1RecurringTasksData, ThrowOnError>) {\n        return (options?.client ?? client).post<PostApiV1RecurringTasksResponses, unknown, ThrowOnError>({\n            url: '/api/v1/recurring-tasks',\n            ...options,\n            headers: {\n                'Content-Type': 'application/json;odata.metadata=minimal;odata.streaming=true',\n                ...options?.headers\n            }\n        });\n    }\n    \n    public static deleteApiV1RecurringTasksById<ThrowOnError extends boolean = false>(options: Options<DeleteApiV1RecurringTasksByIdData, ThrowOnError>) {\n        return (options.client ?? client).delete<DeleteApiV1RecurringTasksByIdResponses, unknown, ThrowOnError>({ url: '/api/v1/recurring-tasks/{id}', ...options });\n    }\n    \n    public static patchApiV1RecurringTasksById<ThrowOnError extends boolean = false>(options: Options<PatchApiV1RecurringTasksByIdData, ThrowOnError>) {\n        return (options.client ?? client).patch<PatchApiV1RecurringTasksByIdResponses, unknown, ThrowOnError>({\n            url: '/api/v1/recurring-tasks/{id}',\n            ...options,\n            headers: {\n                'Content-Type': 'application/json;odata.metadata=minimal;odata.streaming=true',\n                ...options.headers\n            }\n        });\n    }\n    \n    static api = Api17;\n}\n\nexport class Root {\n    public static get<ThrowOnError extends boolean = false>(options?: Options<GetData, ThrowOnError>) {\n        return (options?.client ?? client).get<GetResponses, unknown, ThrowOnError>({ url: '/', ...options });\n    }\n}\n\nexport class Tasks {\n    public static count<ThrowOnError extends boolean = false>(options?: Options<ApiVVersionApiVersionOdataTasksCountData, ThrowOnError>) {\n        return (options?.client ?? client).get<ApiVVersionApiVersionOdataTasksCountResponses, unknown, ThrowOnError>({ url: '/api/v1/odata/Tasks/$count', ...options });\n    }\n    \n    public static key<ThrowOnError extends boolean = false>(options?: Options<ApiVVersionApiVersionOdataTasksKey2Data, ThrowOnError>) {\n        return (options?.client ?? client).get<ApiVVersionApiVersionOdataTasksKey2Responses, unknown, ThrowOnError>({ url: '/api/v1/odata/Tasks/{key}', ...options });\n    }\n}\n\nexport class Odata18 {\n    public static tasks<ThrowOnError extends boolean = false>(options?: Options<ApiVVersionApiVersionOdataTasksData, ThrowOnError>) {\n        return (options?.client ?? client).get<ApiVVersionApiVersionOdataTasksResponses, unknown, ThrowOnError>({ url: '/api/v1/odata/Tasks', ...options });\n    }\n    \n    public static tasksKey<ThrowOnError extends boolean = false>(options?: Options<ApiVVersionApiVersionOdataTasksKeyData, ThrowOnError>) {\n        return (options?.client ?? client).get<ApiVVersionApiVersionOdataTasksKeyResponses, unknown, ThrowOnError>({ url: '/api/v1/odata/Tasks({key})', ...options });\n    }\n    \n    static tasks2 = Tasks;\n}\n\nexport class VVersionApiVersion18 {\n    static odata = Odata18;\n}\n\nexport class Api18 {\n    static vVersionApiVersion = VVersionApiVersion18;\n}\n\nexport class Tasks2 {\n    public static postApiV1Tasks<ThrowOnError extends boolean = false>(options?: Options<PostApiV1TasksData, ThrowOnError>) {\n        return (options?.client ?? client).post<PostApiV1TasksResponses, unknown, ThrowOnError>({\n            url: '/api/v1/tasks',\n            ...options,\n            headers: {\n                'Content-Type': 'application/json;odata.metadata=minimal;odata.streaming=true',\n                ...options?.headers\n            }\n        });\n    }\n    \n    public static putApiV1TasksById<ThrowOnError extends boolean = false>(options: Options<PutApiV1TasksByIdData, ThrowOnError>) {\n        return (options.client ?? client).put<PutApiV1TasksByIdResponses, unknown, ThrowOnError>({\n            url: '/api/v1/tasks/{id}',\n            ...options,\n            headers: {\n                'Content-Type': 'application/json;odata.metadata=minimal;odata.streaming=true',\n                ...options.headers\n            }\n        });\n    }\n    \n    public static postApiV1TasksByIdSubmit<ThrowOnError extends boolean = false>(options: Options<PostApiV1TasksByIdSubmitData, ThrowOnError>) {\n        return (options.client ?? client).post<PostApiV1TasksByIdSubmitResponses, unknown, ThrowOnError>({\n            url: '/api/v1/tasks/{id}/submit',\n            ...options,\n            headers: {\n                'Content-Type': 'application/json;odata.metadata=minimal;odata.streaming=true',\n                ...options.headers\n            }\n        });\n    }\n    \n    public static postApiV1TasksByIdApprove<ThrowOnError extends boolean = false>(options: Options<PostApiV1TasksByIdApproveData, ThrowOnError>) {\n        return (options.client ?? client).post<PostApiV1TasksByIdApproveResponses, unknown, ThrowOnError>({ url: '/api/v1/tasks/{id}/approve', ...options });\n    }\n    \n    public static postApiV1TasksByIdReject<ThrowOnError extends boolean = false>(options: Options<PostApiV1TasksByIdRejectData, ThrowOnError>) {\n        return (options.client ?? client).post<PostApiV1TasksByIdRejectResponses, unknown, ThrowOnError>({\n            url: '/api/v1/tasks/{id}/reject',\n            ...options,\n            headers: {\n                'Content-Type': 'application/json;odata.metadata=minimal;odata.streaming=true',\n                ...options.headers\n            }\n        });\n    }\n    \n    public static getApiV1TasksByIdComments<ThrowOnError extends boolean = false>(options: Options<GetApiV1TasksByIdCommentsData, ThrowOnError>) {\n        return (options.client ?? client).get<GetApiV1TasksByIdCommentsResponses, unknown, ThrowOnError>({ url: '/api/v1/tasks/{id}/comments', ...options });\n    }\n    \n    public static getApiV1TasksByIdDocuments<ThrowOnError extends boolean = false>(options: Options<GetApiV1TasksByIdDocumentsData, ThrowOnError>) {\n        return (options.client ?? client).get<GetApiV1TasksByIdDocumentsResponses, unknown, ThrowOnError>({ url: '/api/v1/tasks/{id}/documents', ...options });\n    }\n    \n    static api = Api18;\n}\n\nexport class User {\n    public static confirmEmail<ThrowOnError extends boolean = false>(options: Options<MapIdentityApiApiVVersionApiVersionUserConfirmEmailData, ThrowOnError>) {\n        return (options.client ?? client).get<MapIdentityApiApiVVersionApiVersionUserConfirmEmailResponses, unknown, ThrowOnError>({ url: '/api/v1/user/confirmEmail', ...options });\n    }\n}\n\nexport class VVersionApiVersion19 {\n    static user = User;\n}\n\nexport class Api19 {\n    static vVersionApiVersion = VVersionApiVersion19;\n}\n\nexport class MapIdentityApi {\n    static api = Api19;\n}\n\nexport class User2 {\n    public static postApiV1UserRegister<ThrowOnError extends boolean = false>(options: Options<PostApiV1UserRegisterData, ThrowOnError>) {\n        return (options.client ?? client).post<PostApiV1UserRegisterResponses, PostApiV1UserRegisterErrors, ThrowOnError>({\n            url: '/api/v1/user/register',\n            ...options,\n            headers: {\n                'Content-Type': 'application/json',\n                ...options.headers\n            }\n        });\n    }\n    \n    public static postApiV1UserLogin<ThrowOnError extends boolean = false>(options: Options<PostApiV1UserLoginData, ThrowOnError>) {\n        return (options.client ?? client).post<PostApiV1UserLoginResponses, unknown, ThrowOnError>({\n            url: '/api/v1/user/login',\n            ...options,\n            headers: {\n                'Content-Type': 'application/json',\n                ...options.headers\n            }\n        });\n    }\n    \n    public static postApiV1UserRefresh<ThrowOnError extends boolean = false>(options: Options<PostApiV1UserRefreshData, ThrowOnError>) {\n        return (options.client ?? client).post<PostApiV1UserRefreshResponses, unknown, ThrowOnError>({\n            url: '/api/v1/user/refresh',\n            ...options,\n            headers: {\n                'Content-Type': 'application/json',\n                ...options.headers\n            }\n        });\n    }\n    \n    public static postApiV1UserResendConfirmationEmail<ThrowOnError extends boolean = false>(options: Options<PostApiV1UserResendConfirmationEmailData, ThrowOnError>) {\n        return (options.client ?? client).post<PostApiV1UserResendConfirmationEmailResponses, unknown, ThrowOnError>({\n            url: '/api/v1/user/resendConfirmationEmail',\n            ...options,\n            headers: {\n                'Content-Type': 'application/json',\n                ...options.headers\n            }\n        });\n    }\n    \n    public static postApiV1UserForgotPassword<ThrowOnError extends boolean = false>(options: Options<PostApiV1UserForgotPasswordData, ThrowOnError>) {\n        return (options.client ?? client).post<PostApiV1UserForgotPasswordResponses, PostApiV1UserForgotPasswordErrors, ThrowOnError>({\n            url: '/api/v1/user/forgotPassword',\n            ...options,\n            headers: {\n                'Content-Type': 'application/json',\n                ...options.headers\n            }\n        });\n    }\n    \n    public static postApiV1UserResetPassword<ThrowOnError extends boolean = false>(options: Options<PostApiV1UserResetPasswordData, ThrowOnError>) {\n        return (options.client ?? client).post<PostApiV1UserResetPasswordResponses, PostApiV1UserResetPasswordErrors, ThrowOnError>({\n            url: '/api/v1/user/resetPassword',\n            ...options,\n            headers: {\n                'Content-Type': 'application/json',\n                ...options.headers\n            }\n        });\n    }\n    \n    public static postApiV1UserManage2Fa<ThrowOnError extends boolean = false>(options: Options<PostApiV1UserManage2FaData, ThrowOnError>) {\n        return (options.client ?? client).post<PostApiV1UserManage2FaResponses, PostApiV1UserManage2FaErrors, ThrowOnError>({\n            url: '/api/v1/user/manage/2fa',\n            ...options,\n            headers: {\n                'Content-Type': 'application/json',\n                ...options.headers\n            }\n        });\n    }\n    \n    public static getApiV1UserManageInfo<ThrowOnError extends boolean = false>(options?: Options<GetApiV1UserManageInfoData, ThrowOnError>) {\n        return (options?.client ?? client).get<GetApiV1UserManageInfoResponses, GetApiV1UserManageInfoErrors, ThrowOnError>({ url: '/api/v1/user/manage/info', ...options });\n    }\n    \n    public static postApiV1UserManageInfo<ThrowOnError extends boolean = false>(options: Options<PostApiV1UserManageInfoData, ThrowOnError>) {\n        return (options.client ?? client).post<PostApiV1UserManageInfoResponses, PostApiV1UserManageInfoErrors, ThrowOnError>({\n            url: '/api/v1/user/manage/info',\n            ...options,\n            headers: {\n                'Content-Type': 'application/json',\n                ...options.headers\n            }\n        });\n    }\n    \n    public static postApiV1UserLogout<ThrowOnError extends boolean = false>(options?: Options<PostApiV1UserLogoutData, ThrowOnError>) {\n        return (options?.client ?? client).post<PostApiV1UserLogoutResponses, unknown, ThrowOnError>({\n            url: '/api/v1/user/logout',\n            ...options,\n            headers: {\n                'Content-Type': 'application/json;odata.metadata=minimal;odata.streaming=true',\n                ...options?.headers\n            }\n        });\n    }\n    \n    /**\n     * @deprecated\n     */\n    public static getApiV1UserDocumentsSummary<ThrowOnError extends boolean = false>(options?: Options<GetApiV1UserDocumentsSummaryData, ThrowOnError>) {\n        return (options?.client ?? client).get<GetApiV1UserDocumentsSummaryResponses, unknown, ThrowOnError>({ url: '/api/v1/user/documents-summary', ...options });\n    }\n    \n    public static deleteApiV1User<ThrowOnError extends boolean = false>(options?: Options<DeleteApiV1UserData, ThrowOnError>) {\n        return (options?.client ?? client).delete<DeleteApiV1UserResponses, unknown, ThrowOnError>({ url: '/api/v1/user', ...options });\n    }\n    \n    static mapIdentityApi = MapIdentityApi;\n}\n\nexport class Users {\n    public static getApiV1UsersMe<ThrowOnError extends boolean = false>(options?: Options<GetApiV1UsersMeData, ThrowOnError>) {\n        return (options?.client ?? client).get<GetApiV1UsersMeResponses, unknown, ThrowOnError>({ url: '/api/v1/users/me', ...options });\n    }\n    \n    public static patchApiV1UsersById<ThrowOnError extends boolean = false>(options: Options<PatchApiV1UsersByIdData, ThrowOnError>) {\n        return (options.client ?? client).patch<PatchApiV1UsersByIdResponses, unknown, ThrowOnError>({\n            url: '/api/v1/users/{id}',\n            ...options,\n            headers: {\n                'Content-Type': 'application/json;odata.metadata=minimal;odata.streaming=true',\n                ...options.headers\n            }\n        });\n    }\n}\n"
  },
  {
    "path": "packages/openapi-ts-tests/sdks/__snapshots__/method-class-conflict/class/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type ClientOptions = {\n    baseUrl: `${string}://${string}` | (string & {});\n};\n\nexport type AccessTokenResponse = {\n    readonly tokenType?: string;\n    accessToken: string;\n    expiresIn: number;\n    refreshToken: string;\n};\n\nexport type AccountingCompany = {\n    id: number;\n    name: string;\n    identificationNumber: string;\n    /**\n     * @deprecated\n     */\n    countryCode?: string;\n    country: Country;\n};\n\nexport type AccountingCompanyCreateDto = {\n    name: string;\n    identificationNumber: string;\n};\n\nexport type AccountingCompanyMembership = {\n    id: number;\n    accountingCompanyId: number;\n    accountingCompanyName: string;\n    userId: number;\n    userFullName: string;\n    roleName: string;\n};\n\nexport type AccountingCompanyMembershipUpsertDto = {\n    accountingCompanyId: number;\n    email: string;\n    roleName: string;\n};\n\nexport type AccountingCompanyUpdateDto = {\n    name: string;\n    identificationNumber: string;\n};\n\nexport type AddressDto = {\n    street: string;\n    city: string;\n    postalCode: string;\n    country: string;\n};\n\nexport type AnnualInvoicesCount = 'Tens' | 'Hundred' | 'Thousands' | 'TenThousands' | 'HundredThousands';\n\nexport type BankAccount = {\n    id: number;\n    businessId: number;\n    accountNumber: string;\n    bankCode: string;\n    swift: string;\n    iban: string;\n    currency: Currency;\n    createdAt: string;\n    updatedAt?: string | null;\n};\n\nexport type BankAccountUpsertDto = {\n    businessId: number;\n    accountNumber: string;\n    bankCode: string;\n    swift: string;\n    iban: string;\n    currency: Currency;\n};\n\nexport type Business = {\n    id: number;\n    name: string;\n    identificationNumber: string;\n    vatNumber: string | null;\n    country: Country;\n    /**\n     * @deprecated\n     */\n    countryCode?: string;\n    deletedAt: string | null;\n    fullAddress: string | null;\n    accountingCompany: BusinessAccountingCompany;\n    contactPerson: BusinessContactPerson;\n};\n\nexport type BusinessAccountantAssignment = {\n    id: number;\n    businessId: number;\n    businessName: string;\n    accountantId: number;\n    accountantName: string;\n};\n\nexport type BusinessAccountantAssignmentUpsert = {\n    businessId: number;\n    accountantId: number;\n};\n\nexport type BusinessAccountingCompany = {\n    id: number;\n    name: string;\n};\n\nexport type BusinessAresAddress = {\n    street: string;\n    houseNumber: number;\n    guidanceNumber?: number | null;\n    city: string;\n    postalCode: number;\n};\n\nexport type BusinessChangeContactDto = {\n    userId: number | null;\n};\n\nexport type BusinessContactPerson = {\n    id: number;\n    fullName: string;\n    email: string | null;\n    phoneNumber: string | null;\n};\n\nexport type BusinessCreateDto = {\n    name: string;\n    identificationNumber: string;\n    vatNumber?: string | null;\n    address?: BusinessAresAddress;\n};\n\nexport type BusinessDocumentMoveToBusinessDocumentsDto = {\n    businessId: number;\n    documentTypeId?: number | null;\n};\n\nexport type BusinessDocumentUpdateDto = {\n    name: string | null;\n    documentTypeId: number | null;\n};\n\nexport type BusinessDocumentsSummary = {\n    id: number;\n    name: string;\n    documentsCount: number;\n    documentsSize: number;\n    lastUploadAt: string | null;\n    maxStorageSize: number;\n};\n\nexport type BusinessMembershipDto = {\n    id: number;\n    userId: number;\n    userFullName: string;\n    businessId: number;\n    businessName: string;\n    roleId: number;\n    roleName: string;\n};\n\nexport type BusinessMembershipUpsertDto = {\n    businessId: number;\n    email: string;\n    roleName: string;\n};\n\nexport type BusinessSummary = {\n    id: number;\n    name: string;\n    documentsCount: number;\n    documentsSize: number;\n    lastUploadAt: string | null;\n    /**\n     * @deprecated\n     */\n    maxStorageSize?: number;\n    pendingTasksCount: number;\n    pendingDocumentsCount: number;\n};\n\nexport type BusinessUpdateDto = {\n    name: string;\n    identificationNumber: string;\n    vatNumber?: string | null;\n    address?: BusinessAresAddress;\n};\n\nexport type Counterparty = {\n    id: number;\n    businessId: number;\n    name: string;\n    identificationNumber: string | null;\n    vatNumber: string | null;\n    address: AddressDto;\n    email: string | null;\n    privateNote: string | null;\n    isFavourite: boolean | null;\n    createdAt: string;\n    updatedAt?: string | null;\n};\n\nexport type CounterpartyCreateDto = {\n    businessId: number;\n    identificationNumber: string;\n    name: string;\n    vatNumber: string | null;\n    address: AddressDto;\n    email: string | null;\n    privateNote?: string | null;\n    isFavourite?: boolean | null;\n};\n\nexport type CounterpartyUpdateDto = {\n    identificationNumber?: string | null;\n    name?: string | null;\n    vatNumber?: string | null;\n    address?: AddressDto;\n    email?: string | null;\n    privateNote?: string | null;\n    isFavourite?: boolean | null;\n};\n\nexport type Country = 'Czechia' | 'Slovakia';\n\nexport type CreateInvoiceClientDto = {\n    counterpartyId: number;\n};\n\nexport type Currency = 'CZK' | 'EUR' | 'USD' | 'GBP';\n\nexport type DataBoxCredentials = {\n    id?: number;\n    username: string;\n    password: string | null;\n    businessId: number;\n    businessName: string;\n    userId: number;\n};\n\nexport type DataBoxCredentialsUpsertDto = {\n    businessId: number;\n    username: string | null;\n    password: string | null;\n};\n\nexport type DocumentAction = 'Uploaded';\n\nexport type DocumentBusiness = {\n    id: number;\n    /**\n     * @deprecated\n     */\n    name?: string;\n    documentName: string;\n    originalFileName: string;\n    extension: string | null;\n    size: number;\n    businessId: number | null;\n    businessName: string | null;\n    documentTypeId: number;\n    documentTypeName: string;\n    approvedAt: string | null;\n    approverId: number | null;\n    approverFullName: string | null;\n    taskId: number | null;\n    uploadedAt: string;\n    uploaderId: number | null;\n    deletedAt?: string | null;\n};\n\nexport type DocumentBusinessActivity = {\n    documentId: number;\n    documentName: string;\n    businessId: number;\n    businessName: string;\n    action: DocumentAction;\n    happenedAt: string;\n    performedByUserId: number | null;\n    performedByUserFullName: string | null;\n};\n\nexport type DocumentPersonal = {\n    id: number;\n    name: string;\n    extension: string | null;\n    size: number;\n    userId: number;\n    userFullName: string;\n    uploadedAt?: string;\n    deletedAt?: string | null;\n};\n\nexport type DocumentPersonalMoveToBusinessDocumentsDto = {\n    businessId: number;\n    documentTypeId?: number;\n};\n\nexport type DocumentType = {\n    id: number;\n    name: string;\n};\n\nexport type DocumentTypesSummary = {\n    documentTypeId: number;\n    documentTypeName: string;\n    documentsCount: number;\n};\n\nexport type FeedbackType = 'Feedback' | 'Bug';\n\nexport type ForgotPasswordRequest = {\n    email: string;\n};\n\nexport type HttpValidationProblemDetails = {\n    type?: string | null;\n    title?: string | null;\n    status?: number | null;\n    detail?: string | null;\n    instance?: string | null;\n    errors?: {\n        [key: string]: Array<string>;\n    };\n    [key: string]: unknown;\n};\n\nexport type InfoRequest = {\n    newEmail?: string | null;\n    newPassword?: string | null;\n    oldPassword?: string | null;\n};\n\nexport type InfoResponse = {\n    email: string;\n    isEmailConfirmed: boolean;\n};\n\nexport type Invitation = {\n    id: number;\n    accountingCompanyName: string;\n    status: InvitationStatus;\n    expiresAt: string;\n    email: string;\n};\n\nexport type InvitationAcceptDto = {\n    businessId: number;\n};\n\nexport type InvitationCreateDto = {\n    accountingCompanyId: number;\n    email: string;\n};\n\nexport type InvitationStatus = 'Pending' | 'Expired' | 'Rejected';\n\nexport type InvitationUpdateDto = {\n    email?: string | null;\n};\n\nexport type Invoice = {\n    id: number;\n    businessId: number;\n    supplier: InvoiceSupplier;\n    client: InvoiceClient;\n    bankAccount: InvoiceBankAccount;\n    hideBankAccount: boolean;\n    type: InvoiceType;\n    number: string;\n    status: InvoiceStatus;\n    paymentMethod: PaymentMethod;\n    currency: Currency;\n    reversedVatCharge: boolean;\n    variableSymbol: string | null;\n    constantSymbol: string | null;\n    issuedAt: string;\n    dueAt: string;\n    taxPointAt: string | null;\n    sentAt: string | null;\n    snapshotAt: string | null;\n    noteBeforeLines: string | null;\n    lines: Array<InvoiceLine>;\n    footerNote: string | null;\n    totalPriceExcludingVat: number;\n    totalVatAmount: number;\n    totalPriceIncludingVat: number;\n    createdAt: string;\n    updatedAt: string | null;\n};\n\nexport type InvoiceBankAccount = {\n    swift: string;\n    iban: string;\n    accountNumber: string;\n    bankCode: string;\n    currency: Currency;\n};\n\nexport type InvoiceBankAccountUpdateDto = {\n    swift: string;\n    iban: string;\n    accountNumber: string;\n    bankCode: string;\n    currency: Currency;\n};\n\nexport type InvoiceClient = {\n    /**\n     * @deprecated\n     */\n    id?: number | null;\n    counterpartyId: number | null;\n    name: string;\n    registrationNumber: string | null;\n    identificationNumber: string | null;\n    vatNumber: string | null;\n    email: string | null;\n    address: InvoiceClientAddress;\n    deliveryName: string | null;\n    deliveryAddress: InvoiceClientDeliveryAddress;\n};\n\nexport type InvoiceClientAddress = {\n    street: string;\n    city: string;\n    postalCode: string;\n    country: string;\n};\n\nexport type InvoiceClientDeliveryAddress = {\n    street: string;\n    city: string;\n    postalCode: string;\n    country: string;\n};\n\nexport type InvoiceCreateDto = {\n    client: CreateInvoiceClientDto;\n    type: InvoiceType;\n    number: string;\n    status: InvoiceStatus;\n    paymentMethod: PaymentMethod;\n    hideBankAccount: boolean;\n    reversedVatCharge: boolean;\n    variableSymbol?: string | null;\n    constantSymbol?: string | null;\n    issuedAt: string;\n    dueAt: string;\n    taxPointAt: string;\n    noteBeforeLines?: string | null;\n    lines: Array<InvoiceLineCreateDto>;\n    footerNote?: string | null;\n    businessId: number;\n};\n\nexport type InvoiceLine = {\n    id?: number;\n    description: string;\n    quantity: number;\n    unit: string;\n    unitPrice: number;\n    vatRate: number;\n    totalPriceExcludingVat: number;\n    vatAmount: number;\n    totalPriceIncludingVat: number;\n};\n\nexport type InvoiceLineCreateDto = {\n    description: string;\n    quantity: number;\n    unit: string;\n    unitPrice: number;\n    vatRate: number;\n};\n\nexport type InvoiceLineUpdateDto = {\n    id: number | null;\n    description: string;\n    quantity: number;\n    unit: string;\n    unitPrice: number;\n    vatRate: number;\n};\n\nexport type InvoiceSendDto = {\n    customRecipientEmail: string | null;\n    message: string;\n};\n\nexport type InvoiceSetting = {\n    businessId: number;\n    isVatPayer: boolean;\n    template: InvoiceTemplate;\n    bankAccount?: InvoiceSettingsBankAccount;\n    numberingSetting: NumberingSetting;\n    createdAt: string;\n    updatedAt?: string | null;\n};\n\nexport type InvoiceSettingUpsertDto = {\n    businessId: number;\n    isVatPayer: boolean;\n    template: InvoiceTemplateUpsertDto;\n    bankAccount?: InvoiceSettingsBankAccountUpsertDto;\n    numberingSetting: NumberingSettingUpsertDto;\n};\n\nexport type InvoiceSettingsBankAccount = {\n    id: number;\n    businessId: number;\n    /**\n     * @deprecated\n     */\n    number: string;\n    accountNumber: string;\n    bankCode: string;\n    swift: string;\n    iban: string;\n    currency: Currency;\n    createdAt: string;\n    updatedAt?: string | null;\n};\n\nexport type InvoiceSettingsBankAccountUpsertDto = {\n    accountNumber: string;\n    bankCode: string;\n    swift: string;\n    iban: string;\n    currency: Currency;\n};\n\nexport type InvoiceStatus = 'Draft' | 'Issued' | 'Paid' | 'Overdue' | 'Cancelled' | 'Snapshot';\n\nexport type InvoiceSupplier = {\n    name: string;\n    registrationNumber: string;\n    identificationNumber: string;\n    vatNumber: string | null;\n    address: InvoiceSupplierAddress;\n};\n\nexport type InvoiceSupplierAddress = {\n    street: string;\n    city: string;\n    postalCode: string;\n    country: string;\n};\n\nexport type InvoiceTemplate = {\n    currency: Currency;\n    textBeforeLines: string | null;\n    footerText: string | null;\n};\n\nexport type InvoiceTemplateUpsertDto = {\n    currency: Currency;\n    textBeforeLines: string | null;\n    footerText: string | null;\n};\n\nexport type InvoiceType = 'Regular' | 'Corrective' | 'Advance';\n\nexport type InvoiceUpdateClientDto = {\n    counterpartyId: number | null;\n    name: string | null;\n    registrationNumber: string | null;\n    vatNumber: string | null;\n    email: string | null;\n    address: AddressDto;\n    deliveryName: string | null;\n    deliveryAddress: AddressDto;\n};\n\nexport type InvoiceUpdateDto = {\n    client: InvoiceUpdateClientDto;\n    bankAccount: InvoiceBankAccountUpdateDto;\n    hideBankAccount: boolean | null;\n    type: InvoiceType;\n    number: string | null;\n    status: InvoiceStatus;\n    paymentMethod: PaymentMethod;\n    currency: Currency;\n    reversedVatCharge: boolean | null;\n    variableSymbol: string | null;\n    constantSymbol: string | null;\n    issuedAt: string | null;\n    dueAt: string | null;\n    taxPointAt: string | null;\n    noteBeforeLines: string | null;\n    lines: Array<InvoiceLineUpdateDto> | null;\n    footerNote: string | null;\n};\n\nexport type LicenseDto = {\n    id: number;\n    tierId: number;\n    tierName: string;\n    businessId: number | null;\n    /**\n     * @deprecated\n     */\n    maxStorageSize?: number;\n    maxBusinessStorageSize: number;\n    maxBusinessMembersCount: number;\n    maxContactsCount: number;\n};\n\nexport type LoginRequest = {\n    email: string;\n    password: string;\n    twoFactorCode?: string | null;\n    twoFactorRecoveryCode?: string | null;\n};\n\nexport type NotificationsDeviceTokenDeleteDto = {\n    token: string;\n};\n\nexport type NotificationsDeviceTokenUpsertDto = {\n    provider: PushNotificationsProvider;\n    token: string;\n};\n\nexport type NotificationsTestSendDto = {\n    token: string | null;\n};\n\nexport type NumberingSetting = {\n    id: number;\n    businessId: number;\n    yearFormat: YearFormat;\n    isMonthIncluded: boolean;\n    useHyphen: boolean;\n    prefix?: string | null;\n    suffix?: string | null;\n    sequencePosition: SequencePosition;\n    annualInvoicesCount: AnnualInvoicesCount;\n    format: string;\n    lastExternalInvoiceSequenceNumber: number | null;\n    createdAt: string;\n    updatedAt?: string | null;\n};\n\nexport type NumberingSettingUpsertDto = {\n    yearFormat: YearFormat;\n    isMonthIncluded: boolean;\n    useHyphen: boolean;\n    prefix: string | null;\n    suffix: string | null;\n    sequencePosition: SequencePosition;\n    annualInvoicesCount: AnnualInvoicesCount;\n    lastExternalInvoiceSequenceNumber?: number | null;\n};\n\nexport type PaymentMethod = 'Cash' | 'BankTransfer';\n\nexport type PersonalDocumentsSummary = {\n    documentsCount: number;\n    documentsSize: number;\n    maxStorageSize: number;\n};\n\nexport type PushNotificationsProvider = 1 | 2;\n\nexport type RecurrenceType = 'Daily' | 'Weekly' | 'Monthly' | 'Yearly';\n\nexport type RecurringTask = {\n    id: number;\n    title: string;\n    details: string;\n    accountingCompanyId: number;\n    accountingCompanyName: string;\n    accountantId: number | null;\n    accountantFullName: string | null;\n    recurrenceType?: RecurrenceType;\n    period: RecurrenceType;\n    interval: number;\n    executeAt: string;\n    isActive: boolean;\n    businesses: Array<RecurringTaskBusiness>;\n    documentTypeId: number;\n    documentTypeName: string;\n};\n\nexport type RecurringTaskBusiness = {\n    id: number;\n    name: string;\n};\n\nexport type RecurringTaskCreateDto = {\n    title: string;\n    details: string;\n    recurrenceType: RecurrenceType;\n    interval?: number;\n    firstTaskDueAt: string;\n    accountingCompanyId: number;\n    businessIds: Array<number>;\n    documentTypeId: number;\n};\n\nexport type RecurringTaskUpdateDto = {\n    title?: string | null;\n    details?: string | null;\n    isActive?: boolean | null;\n    recurrenceType?: RecurrenceType;\n    interval?: number | null;\n    nextTasksCreateAt?: string | null;\n    documentTypeId?: number | null;\n};\n\nexport type RefreshRequest = {\n    refreshToken: string;\n};\n\nexport type RegisterRequest = {\n    email: string;\n    password: string;\n};\n\nexport type ResendConfirmationEmailRequest = {\n    email: string;\n};\n\nexport type ResetPasswordRequest = {\n    email: string;\n    resetCode: string;\n    newPassword: string;\n};\n\nexport type SendFeedbackRequest = {\n    type: FeedbackType;\n    subject: string;\n    message: string;\n    platform: string;\n    deviceInfo?: string | null;\n    appVersion?: string | null;\n    traceId?: string | null;\n};\n\nexport type SequencePosition = 'Start' | 'End';\n\nexport type Task = {\n    id: number;\n    title: string;\n    details: string;\n    dueAt: string;\n    status: TaskStatus;\n    businessId: number;\n    businessName: string;\n    documentTypeId: number;\n    documentTypeName: string;\n};\n\nexport type TaskComment = {\n    id: number;\n    taskId: number | null;\n    content: string;\n    authorId: number | null;\n    authorFullName: string | null;\n    createdAt: string;\n};\n\nexport type TaskRejectDto = {\n    reason: string;\n};\n\nexport type TaskStatus = 'PendingClient' | 'PendingAccountant' | 'Completed' | 'Canceled';\n\nexport type TaskSubmitDto = {\n    answer: string | null;\n};\n\nexport type TaskUpdateDto = {\n    title: string;\n    details: string;\n    dueAt: string;\n    documentTypeId?: number | null;\n};\n\nexport type TasksCreateDto = {\n    businessIds: Array<number>;\n    documentTypeId?: number;\n    title: string;\n    details: string;\n    dueAt: string;\n};\n\nexport type TwoFactorRequest = {\n    enable?: boolean | null;\n    twoFactorCode?: string | null;\n    resetSharedKey?: boolean;\n    resetRecoveryCodes?: boolean;\n    forgetMachine?: boolean;\n};\n\nexport type TwoFactorResponse = {\n    sharedKey: string;\n    recoveryCodesLeft: number;\n    recoveryCodes?: Array<string> | null;\n    isTwoFactorEnabled: boolean;\n    isMachineRemembered: boolean;\n};\n\nexport type User = {\n    id: number;\n    email: string | null;\n    emailConfirmed: boolean;\n    fullName: string;\n    phoneNumber: string | null;\n    isAccountant: boolean;\n};\n\nexport type UserUpdateDto = {\n    firstName?: string | null;\n    lastName?: string | null;\n    phoneNumber?: string | null;\n};\n\nexport type YearFormat = 'Full' | 'Short';\n\nexport type AccessTokenResponseWritable = {\n    accessToken: string;\n    expiresIn: number;\n    refreshToken: string;\n};\n\nexport type PostApiV1AccountingCompaniesData = {\n    body?: AccountingCompanyCreateDto;\n    path?: never;\n    query?: never;\n    url: '/api/v1/accounting-companies';\n};\n\nexport type PostApiV1AccountingCompaniesResponses = {\n    /**\n     * OK\n     */\n    200: AccountingCompany;\n};\n\nexport type PostApiV1AccountingCompaniesResponse = PostApiV1AccountingCompaniesResponses[keyof PostApiV1AccountingCompaniesResponses];\n\nexport type DeleteApiV1AccountingCompaniesByIdData = {\n    body?: never;\n    path: {\n        id: number;\n    };\n    query?: never;\n    url: '/api/v1/accounting-companies/{id}';\n};\n\nexport type DeleteApiV1AccountingCompaniesByIdResponses = {\n    /**\n     * OK\n     */\n    200: unknown;\n};\n\nexport type PostApiV1AccountingCompaniesByIdData = {\n    body?: AccountingCompanyUpdateDto;\n    path: {\n        id: number;\n    };\n    query?: never;\n    url: '/api/v1/accounting-companies/{id}';\n};\n\nexport type PostApiV1AccountingCompaniesByIdResponses = {\n    /**\n     * OK\n     */\n    200: AccountingCompany;\n};\n\nexport type PostApiV1AccountingCompaniesByIdResponse = PostApiV1AccountingCompaniesByIdResponses[keyof PostApiV1AccountingCompaniesByIdResponses];\n\nexport type ApiVVersionApiVersionOdataAccountingCompaniesData = {\n    body?: never;\n    path?: never;\n    query?: {\n        /**\n         * Limits the properties returned in the result.\n         */\n        select?: string;\n        /**\n         * Indicates the related entities to be represented inline. The maximum depth is 2.\n         */\n        expand?: string;\n        /**\n         * Restricts the set of items returned. The maximum number of expressions is 100. The allowed functions are: allfunctions.\n         */\n        filter?: string;\n        /**\n         * Specifies the order in which items are returned. The maximum number of expressions is 5.\n         */\n        orderby?: string;\n        /**\n         * Limits the number of items returned from a collection. The maximum value is 100.\n         */\n        top?: number;\n        /**\n         * Excludes the specified number of items of the queried collection from the result.\n         */\n        skip?: number;\n        /**\n         * Indicates whether the total count of items within a collection are returned in the result.\n         */\n        count?: boolean;\n    };\n    url: '/api/v1/odata/AccountingCompanies';\n};\n\nexport type ApiVVersionApiVersionOdataAccountingCompaniesResponses = {\n    /**\n     * OK\n     */\n    200: Array<AccountingCompany>;\n};\n\nexport type ApiVVersionApiVersionOdataAccountingCompaniesResponse = ApiVVersionApiVersionOdataAccountingCompaniesResponses[keyof ApiVVersionApiVersionOdataAccountingCompaniesResponses];\n\nexport type ApiVVersionApiVersionOdataAccountingCompaniesCountData = {\n    body?: never;\n    path?: never;\n    query?: {\n        /**\n         * Limits the properties returned in the result.\n         */\n        select?: string;\n        /**\n         * Indicates the related entities to be represented inline. The maximum depth is 2.\n         */\n        expand?: string;\n        /**\n         * Restricts the set of items returned. The maximum number of expressions is 100. The allowed functions are: allfunctions.\n         */\n        filter?: string;\n        /**\n         * Specifies the order in which items are returned. The maximum number of expressions is 5.\n         */\n        orderby?: string;\n        /**\n         * Limits the number of items returned from a collection. The maximum value is 100.\n         */\n        top?: number;\n        /**\n         * Excludes the specified number of items of the queried collection from the result.\n         */\n        skip?: number;\n        /**\n         * Indicates whether the total count of items within a collection are returned in the result.\n         */\n        count?: boolean;\n    };\n    url: '/api/v1/odata/AccountingCompanies/$count';\n};\n\nexport type ApiVVersionApiVersionOdataAccountingCompaniesCountResponses = {\n    /**\n     * OK\n     */\n    200: Array<AccountingCompany>;\n};\n\nexport type ApiVVersionApiVersionOdataAccountingCompaniesCountResponse = ApiVVersionApiVersionOdataAccountingCompaniesCountResponses[keyof ApiVVersionApiVersionOdataAccountingCompaniesCountResponses];\n\nexport type PutApiV1AccountingCompanyMembershipsData = {\n    body?: AccountingCompanyMembershipUpsertDto;\n    path?: never;\n    query?: never;\n    url: '/api/v1/accounting-company-memberships';\n};\n\nexport type PutApiV1AccountingCompanyMembershipsResponses = {\n    /**\n     * OK\n     */\n    200: AccountingCompanyMembership;\n};\n\nexport type PutApiV1AccountingCompanyMembershipsResponse = PutApiV1AccountingCompanyMembershipsResponses[keyof PutApiV1AccountingCompanyMembershipsResponses];\n\nexport type DeleteApiV1AccountingCompanyMembershipsByIdData = {\n    body?: never;\n    path: {\n        id: number;\n    };\n    query?: never;\n    url: '/api/v1/accounting-company-memberships/{id}';\n};\n\nexport type DeleteApiV1AccountingCompanyMembershipsByIdResponses = {\n    /**\n     * OK\n     */\n    200: unknown;\n};\n\nexport type ApiVVersionApiVersionOdataAccountingCompanyMembershipsData = {\n    body?: never;\n    path?: never;\n    query?: {\n        /**\n         * Limits the properties returned in the result.\n         */\n        select?: string;\n        /**\n         * Indicates the related entities to be represented inline. The maximum depth is 2.\n         */\n        expand?: string;\n        /**\n         * Restricts the set of items returned. The maximum number of expressions is 100. The allowed functions are: allfunctions.\n         */\n        filter?: string;\n        /**\n         * Specifies the order in which items are returned. The maximum number of expressions is 5.\n         */\n        orderby?: string;\n        /**\n         * Limits the number of items returned from a collection. The maximum value is 100.\n         */\n        top?: number;\n        /**\n         * Excludes the specified number of items of the queried collection from the result.\n         */\n        skip?: number;\n        /**\n         * Indicates whether the total count of items within a collection are returned in the result.\n         */\n        count?: boolean;\n    };\n    url: '/api/v1/odata/AccountingCompanyMemberships';\n};\n\nexport type ApiVVersionApiVersionOdataAccountingCompanyMembershipsResponses = {\n    /**\n     * OK\n     */\n    200: Array<AccountingCompanyMembership>;\n};\n\nexport type ApiVVersionApiVersionOdataAccountingCompanyMembershipsResponse = ApiVVersionApiVersionOdataAccountingCompanyMembershipsResponses[keyof ApiVVersionApiVersionOdataAccountingCompanyMembershipsResponses];\n\nexport type ApiVVersionApiVersionOdataAccountingCompanyMembershipsCountData = {\n    body?: never;\n    path?: never;\n    query?: {\n        /**\n         * Limits the properties returned in the result.\n         */\n        select?: string;\n        /**\n         * Indicates the related entities to be represented inline. The maximum depth is 2.\n         */\n        expand?: string;\n        /**\n         * Restricts the set of items returned. The maximum number of expressions is 100. The allowed functions are: allfunctions.\n         */\n        filter?: string;\n        /**\n         * Specifies the order in which items are returned. The maximum number of expressions is 5.\n         */\n        orderby?: string;\n        /**\n         * Limits the number of items returned from a collection. The maximum value is 100.\n         */\n        top?: number;\n        /**\n         * Excludes the specified number of items of the queried collection from the result.\n         */\n        skip?: number;\n        /**\n         * Indicates whether the total count of items within a collection are returned in the result.\n         */\n        count?: boolean;\n    };\n    url: '/api/v1/odata/AccountingCompanyMemberships/$count';\n};\n\nexport type ApiVVersionApiVersionOdataAccountingCompanyMembershipsCountResponses = {\n    /**\n     * OK\n     */\n    200: Array<AccountingCompanyMembership>;\n};\n\nexport type ApiVVersionApiVersionOdataAccountingCompanyMembershipsCountResponse = ApiVVersionApiVersionOdataAccountingCompanyMembershipsCountResponses[keyof ApiVVersionApiVersionOdataAccountingCompanyMembershipsCountResponses];\n\nexport type PutApiV1BankAccountsData = {\n    body?: BankAccountUpsertDto;\n    path?: never;\n    query?: never;\n    url: '/api/v1/bank-accounts';\n};\n\nexport type PutApiV1BankAccountsResponses = {\n    /**\n     * OK\n     */\n    200: BankAccount;\n};\n\nexport type PutApiV1BankAccountsResponse = PutApiV1BankAccountsResponses[keyof PutApiV1BankAccountsResponses];\n\nexport type DeleteApiV1BankAccountsByIdData = {\n    body?: never;\n    path: {\n        id: number;\n    };\n    query?: never;\n    url: '/api/v1/bank-accounts/{id}';\n};\n\nexport type DeleteApiV1BankAccountsByIdResponses = {\n    /**\n     * OK\n     */\n    200: unknown;\n};\n\nexport type ApiVVersionApiVersionOdataBankAccountsData = {\n    body?: never;\n    path?: never;\n    query?: {\n        /**\n         * Limits the properties returned in the result.\n         */\n        select?: string;\n        /**\n         * Indicates the related entities to be represented inline. The maximum depth is 2.\n         */\n        expand?: string;\n        /**\n         * Restricts the set of items returned. The maximum number of expressions is 100. The allowed functions are: allfunctions.\n         */\n        filter?: string;\n        /**\n         * Specifies the order in which items are returned. The maximum number of expressions is 5.\n         */\n        orderby?: string;\n        /**\n         * Limits the number of items returned from a collection. The maximum value is 100.\n         */\n        top?: number;\n        /**\n         * Excludes the specified number of items of the queried collection from the result.\n         */\n        skip?: number;\n        /**\n         * Indicates whether the total count of items within a collection are returned in the result.\n         */\n        count?: boolean;\n    };\n    url: '/api/v1/odata/BankAccounts';\n};\n\nexport type ApiVVersionApiVersionOdataBankAccountsResponses = {\n    /**\n     * OK\n     */\n    200: Array<BankAccount>;\n};\n\nexport type ApiVVersionApiVersionOdataBankAccountsResponse = ApiVVersionApiVersionOdataBankAccountsResponses[keyof ApiVVersionApiVersionOdataBankAccountsResponses];\n\nexport type ApiVVersionApiVersionOdataBankAccountsCountData = {\n    body?: never;\n    path?: never;\n    query?: {\n        /**\n         * Limits the properties returned in the result.\n         */\n        select?: string;\n        /**\n         * Indicates the related entities to be represented inline. The maximum depth is 2.\n         */\n        expand?: string;\n        /**\n         * Restricts the set of items returned. The maximum number of expressions is 100. The allowed functions are: allfunctions.\n         */\n        filter?: string;\n        /**\n         * Specifies the order in which items are returned. The maximum number of expressions is 5.\n         */\n        orderby?: string;\n        /**\n         * Limits the number of items returned from a collection. The maximum value is 100.\n         */\n        top?: number;\n        /**\n         * Excludes the specified number of items of the queried collection from the result.\n         */\n        skip?: number;\n        /**\n         * Indicates whether the total count of items within a collection are returned in the result.\n         */\n        count?: boolean;\n    };\n    url: '/api/v1/odata/BankAccounts/$count';\n};\n\nexport type ApiVVersionApiVersionOdataBankAccountsCountResponses = {\n    /**\n     * OK\n     */\n    200: Array<BankAccount>;\n};\n\nexport type ApiVVersionApiVersionOdataBankAccountsCountResponse = ApiVVersionApiVersionOdataBankAccountsCountResponses[keyof ApiVVersionApiVersionOdataBankAccountsCountResponses];\n\nexport type PutApiV1BusinessAccountantAssignmentsData = {\n    body?: BusinessAccountantAssignmentUpsert;\n    path?: never;\n    query?: never;\n    url: '/api/v1/business-accountant-assignments';\n};\n\nexport type PutApiV1BusinessAccountantAssignmentsResponses = {\n    /**\n     * OK\n     */\n    200: BusinessAccountantAssignment;\n};\n\nexport type PutApiV1BusinessAccountantAssignmentsResponse = PutApiV1BusinessAccountantAssignmentsResponses[keyof PutApiV1BusinessAccountantAssignmentsResponses];\n\nexport type DeleteApiV1BusinessAccountantAssignmentsByIdData = {\n    body?: never;\n    path: {\n        id: number;\n    };\n    query?: never;\n    url: '/api/v1/business-accountant-assignments/{id}';\n};\n\nexport type DeleteApiV1BusinessAccountantAssignmentsByIdResponses = {\n    /**\n     * OK\n     */\n    200: unknown;\n};\n\nexport type ApiVVersionApiVersionOdataBusinessAccountantAssignmentsData = {\n    body?: never;\n    path?: never;\n    query?: {\n        /**\n         * Limits the properties returned in the result.\n         */\n        select?: string;\n        /**\n         * Indicates the related entities to be represented inline. The maximum depth is 2.\n         */\n        expand?: string;\n        /**\n         * Restricts the set of items returned. The maximum number of expressions is 100. The allowed functions are: allfunctions.\n         */\n        filter?: string;\n        /**\n         * Specifies the order in which items are returned. The maximum number of expressions is 5.\n         */\n        orderby?: string;\n        /**\n         * Limits the number of items returned from a collection. The maximum value is 100.\n         */\n        top?: number;\n        /**\n         * Excludes the specified number of items of the queried collection from the result.\n         */\n        skip?: number;\n        /**\n         * Indicates whether the total count of items within a collection are returned in the result.\n         */\n        count?: boolean;\n    };\n    url: '/api/v1/odata/BusinessAccountantAssignments';\n};\n\nexport type ApiVVersionApiVersionOdataBusinessAccountantAssignmentsResponses = {\n    /**\n     * OK\n     */\n    200: Array<BusinessAccountantAssignment>;\n};\n\nexport type ApiVVersionApiVersionOdataBusinessAccountantAssignmentsResponse = ApiVVersionApiVersionOdataBusinessAccountantAssignmentsResponses[keyof ApiVVersionApiVersionOdataBusinessAccountantAssignmentsResponses];\n\nexport type ApiVVersionApiVersionOdataBusinessAccountantAssignmentsCountData = {\n    body?: never;\n    path?: never;\n    query?: {\n        /**\n         * Limits the properties returned in the result.\n         */\n        select?: string;\n        /**\n         * Indicates the related entities to be represented inline. The maximum depth is 2.\n         */\n        expand?: string;\n        /**\n         * Restricts the set of items returned. The maximum number of expressions is 100. The allowed functions are: allfunctions.\n         */\n        filter?: string;\n        /**\n         * Specifies the order in which items are returned. The maximum number of expressions is 5.\n         */\n        orderby?: string;\n        /**\n         * Limits the number of items returned from a collection. The maximum value is 100.\n         */\n        top?: number;\n        /**\n         * Excludes the specified number of items of the queried collection from the result.\n         */\n        skip?: number;\n        /**\n         * Indicates whether the total count of items within a collection are returned in the result.\n         */\n        count?: boolean;\n    };\n    url: '/api/v1/odata/BusinessAccountantAssignments/$count';\n};\n\nexport type ApiVVersionApiVersionOdataBusinessAccountantAssignmentsCountResponses = {\n    /**\n     * OK\n     */\n    200: Array<BusinessAccountantAssignment>;\n};\n\nexport type ApiVVersionApiVersionOdataBusinessAccountantAssignmentsCountResponse = ApiVVersionApiVersionOdataBusinessAccountantAssignmentsCountResponses[keyof ApiVVersionApiVersionOdataBusinessAccountantAssignmentsCountResponses];\n\nexport type GetApiV1BusinessDocumentsByIdRawData = {\n    body?: never;\n    path: {\n        id: number;\n    };\n    query?: never;\n    url: '/api/v1/business-documents/{id}/raw';\n};\n\nexport type GetApiV1BusinessDocumentsByIdRawResponses = {\n    /**\n     * OK\n     */\n    200: unknown;\n    /**\n     * No Content\n     */\n    204: void;\n};\n\nexport type GetApiV1BusinessDocumentsByIdRawResponse = GetApiV1BusinessDocumentsByIdRawResponses[keyof GetApiV1BusinessDocumentsByIdRawResponses];\n\nexport type PostApiV1BusinessDocumentsData = {\n    body?: {\n        BusinessId: number;\n        DocumentTypeId: number;\n        File: Blob | File;\n        DocumentName: string;\n        TaskId: number;\n    };\n    path?: never;\n    query?: never;\n    url: '/api/v1/business-documents';\n};\n\nexport type PostApiV1BusinessDocumentsResponses = {\n    /**\n     * OK\n     */\n    200: DocumentBusiness;\n};\n\nexport type PostApiV1BusinessDocumentsResponse = PostApiV1BusinessDocumentsResponses[keyof PostApiV1BusinessDocumentsResponses];\n\nexport type DeleteApiV1BusinessDocumentsByIdData = {\n    body?: never;\n    path: {\n        id: number;\n    };\n    query?: never;\n    url: '/api/v1/business-documents/{id}';\n};\n\nexport type DeleteApiV1BusinessDocumentsByIdResponses = {\n    /**\n     * OK\n     */\n    200: DocumentBusiness;\n};\n\nexport type DeleteApiV1BusinessDocumentsByIdResponse = DeleteApiV1BusinessDocumentsByIdResponses[keyof DeleteApiV1BusinessDocumentsByIdResponses];\n\nexport type PutApiV1BusinessDocumentsByIdData = {\n    body?: BusinessDocumentUpdateDto;\n    path: {\n        id: number;\n    };\n    query?: never;\n    url: '/api/v1/business-documents/{id}';\n};\n\nexport type PutApiV1BusinessDocumentsByIdResponses = {\n    /**\n     * OK\n     */\n    200: DocumentBusiness;\n};\n\nexport type PutApiV1BusinessDocumentsByIdResponse = PutApiV1BusinessDocumentsByIdResponses[keyof PutApiV1BusinessDocumentsByIdResponses];\n\nexport type PostApiV1BusinessDocumentsByIdApproveData = {\n    body?: never;\n    path: {\n        id: number;\n    };\n    query?: never;\n    url: '/api/v1/business-documents/{id}/approve';\n};\n\nexport type PostApiV1BusinessDocumentsByIdApproveResponses = {\n    /**\n     * OK\n     */\n    200: DocumentBusiness;\n};\n\nexport type PostApiV1BusinessDocumentsByIdApproveResponse = PostApiV1BusinessDocumentsByIdApproveResponses[keyof PostApiV1BusinessDocumentsByIdApproveResponses];\n\nexport type PostApiV1BusinessDocumentsByIdUnapproveData = {\n    body?: never;\n    path: {\n        id: number;\n    };\n    query?: never;\n    url: '/api/v1/business-documents/{id}/unapprove';\n};\n\nexport type PostApiV1BusinessDocumentsByIdUnapproveResponses = {\n    /**\n     * OK\n     */\n    200: DocumentBusiness;\n};\n\nexport type PostApiV1BusinessDocumentsByIdUnapproveResponse = PostApiV1BusinessDocumentsByIdUnapproveResponses[keyof PostApiV1BusinessDocumentsByIdUnapproveResponses];\n\nexport type PostApiV1BusinessDocumentsByIdMoveToPersonalData = {\n    body?: never;\n    path: {\n        id: number;\n    };\n    query?: never;\n    url: '/api/v1/business-documents/{id}/move-to-personal';\n};\n\nexport type PostApiV1BusinessDocumentsByIdMoveToPersonalResponses = {\n    /**\n     * OK\n     */\n    200: unknown;\n};\n\nexport type PostApiV1BusinessDocumentsByIdMoveToBusinessData = {\n    body?: BusinessDocumentMoveToBusinessDocumentsDto;\n    path: {\n        id: number;\n    };\n    query?: never;\n    url: '/api/v1/business-documents/{id}/move-to-business';\n};\n\nexport type PostApiV1BusinessDocumentsByIdMoveToBusinessResponses = {\n    /**\n     * OK\n     */\n    200: DocumentBusiness;\n};\n\nexport type PostApiV1BusinessDocumentsByIdMoveToBusinessResponse = PostApiV1BusinessDocumentsByIdMoveToBusinessResponses[keyof PostApiV1BusinessDocumentsByIdMoveToBusinessResponses];\n\nexport type ApiVVersionApiVersionOdataBusinessDocumentActivitiesData = {\n    body?: never;\n    path?: never;\n    query?: {\n        accountants?: Array<number>;\n        /**\n         * Limits the properties returned in the result.\n         */\n        select?: string;\n        /**\n         * Indicates the related entities to be represented inline. The maximum depth is 2.\n         */\n        expand?: string;\n        /**\n         * Restricts the set of items returned. The maximum number of expressions is 100. The allowed functions are: allfunctions.\n         */\n        filter?: string;\n        /**\n         * Specifies the order in which items are returned. The maximum number of expressions is 5.\n         */\n        orderby?: string;\n        /**\n         * Limits the number of items returned from a collection. The maximum value is 100.\n         */\n        top?: number;\n        /**\n         * Excludes the specified number of items of the queried collection from the result.\n         */\n        skip?: number;\n        /**\n         * Indicates whether the total count of items within a collection are returned in the result.\n         */\n        count?: boolean;\n    };\n    url: '/api/v1/odata/BusinessDocumentActivities';\n};\n\nexport type ApiVVersionApiVersionOdataBusinessDocumentActivitiesResponses = {\n    /**\n     * OK\n     */\n    200: Array<DocumentBusinessActivity>;\n};\n\nexport type ApiVVersionApiVersionOdataBusinessDocumentActivitiesResponse = ApiVVersionApiVersionOdataBusinessDocumentActivitiesResponses[keyof ApiVVersionApiVersionOdataBusinessDocumentActivitiesResponses];\n\nexport type ApiVVersionApiVersionOdataBusinessDocumentActivitiesCountData = {\n    body?: never;\n    path?: never;\n    query?: {\n        accountants?: Array<number>;\n        /**\n         * Limits the properties returned in the result.\n         */\n        select?: string;\n        /**\n         * Indicates the related entities to be represented inline. The maximum depth is 2.\n         */\n        expand?: string;\n        /**\n         * Restricts the set of items returned. The maximum number of expressions is 100. The allowed functions are: allfunctions.\n         */\n        filter?: string;\n        /**\n         * Specifies the order in which items are returned. The maximum number of expressions is 5.\n         */\n        orderby?: string;\n        /**\n         * Limits the number of items returned from a collection. The maximum value is 100.\n         */\n        top?: number;\n        /**\n         * Excludes the specified number of items of the queried collection from the result.\n         */\n        skip?: number;\n        /**\n         * Indicates whether the total count of items within a collection are returned in the result.\n         */\n        count?: boolean;\n    };\n    url: '/api/v1/odata/BusinessDocumentActivities/$count';\n};\n\nexport type ApiVVersionApiVersionOdataBusinessDocumentActivitiesCountResponses = {\n    /**\n     * OK\n     */\n    200: Array<DocumentBusinessActivity>;\n};\n\nexport type ApiVVersionApiVersionOdataBusinessDocumentActivitiesCountResponse = ApiVVersionApiVersionOdataBusinessDocumentActivitiesCountResponses[keyof ApiVVersionApiVersionOdataBusinessDocumentActivitiesCountResponses];\n\nexport type ApiVVersionApiVersionOdataBusinessDocumentsData = {\n    body?: never;\n    path?: never;\n    query?: {\n        accountants?: Array<number>;\n        /**\n         * Limits the properties returned in the result.\n         */\n        select?: string;\n        /**\n         * Indicates the related entities to be represented inline. The maximum depth is 2.\n         */\n        expand?: string;\n        /**\n         * Restricts the set of items returned. The maximum number of expressions is 100. The allowed functions are: allfunctions.\n         */\n        filter?: string;\n        /**\n         * Specifies the order in which items are returned. The maximum number of expressions is 5.\n         */\n        orderby?: string;\n        /**\n         * Limits the number of items returned from a collection. The maximum value is 100.\n         */\n        top?: number;\n        /**\n         * Excludes the specified number of items of the queried collection from the result.\n         */\n        skip?: number;\n        /**\n         * Indicates whether the total count of items within a collection are returned in the result.\n         */\n        count?: boolean;\n    };\n    url: '/api/v1/odata/BusinessDocuments';\n};\n\nexport type ApiVVersionApiVersionOdataBusinessDocumentsResponses = {\n    /**\n     * OK\n     */\n    200: Array<DocumentBusiness>;\n};\n\nexport type ApiVVersionApiVersionOdataBusinessDocumentsResponse = ApiVVersionApiVersionOdataBusinessDocumentsResponses[keyof ApiVVersionApiVersionOdataBusinessDocumentsResponses];\n\nexport type ApiVVersionApiVersionOdataBusinessDocumentsCountData = {\n    body?: never;\n    path?: never;\n    query?: {\n        accountants?: Array<number>;\n        /**\n         * Limits the properties returned in the result.\n         */\n        select?: string;\n        /**\n         * Indicates the related entities to be represented inline. The maximum depth is 2.\n         */\n        expand?: string;\n        /**\n         * Restricts the set of items returned. The maximum number of expressions is 100. The allowed functions are: allfunctions.\n         */\n        filter?: string;\n        /**\n         * Specifies the order in which items are returned. The maximum number of expressions is 5.\n         */\n        orderby?: string;\n        /**\n         * Limits the number of items returned from a collection. The maximum value is 100.\n         */\n        top?: number;\n        /**\n         * Excludes the specified number of items of the queried collection from the result.\n         */\n        skip?: number;\n        /**\n         * Indicates whether the total count of items within a collection are returned in the result.\n         */\n        count?: boolean;\n    };\n    url: '/api/v1/odata/BusinessDocuments/$count';\n};\n\nexport type ApiVVersionApiVersionOdataBusinessDocumentsCountResponses = {\n    /**\n     * OK\n     */\n    200: Array<DocumentBusiness>;\n};\n\nexport type ApiVVersionApiVersionOdataBusinessDocumentsCountResponse = ApiVVersionApiVersionOdataBusinessDocumentsCountResponses[keyof ApiVVersionApiVersionOdataBusinessDocumentsCountResponses];\n\nexport type ApiVVersionApiVersionOdataBusinessDocumentsSummariesData = {\n    body?: never;\n    path?: never;\n    query?: {\n        accountants?: Array<number>;\n        /**\n         * Limits the properties returned in the result.\n         */\n        select?: string;\n        /**\n         * Indicates the related entities to be represented inline. The maximum depth is 2.\n         */\n        expand?: string;\n        /**\n         * Restricts the set of items returned. The maximum number of expressions is 100. The allowed functions are: allfunctions.\n         */\n        filter?: string;\n        /**\n         * Specifies the order in which items are returned. The maximum number of expressions is 5.\n         */\n        orderby?: string;\n        /**\n         * Limits the number of items returned from a collection. The maximum value is 100.\n         */\n        top?: number;\n        /**\n         * Excludes the specified number of items of the queried collection from the result.\n         */\n        skip?: number;\n        /**\n         * Indicates whether the total count of items within a collection are returned in the result.\n         */\n        count?: boolean;\n    };\n    url: '/api/v1/odata/BusinessDocumentsSummaries';\n};\n\nexport type ApiVVersionApiVersionOdataBusinessDocumentsSummariesResponses = {\n    /**\n     * OK\n     */\n    200: Array<BusinessDocumentsSummary>;\n};\n\nexport type ApiVVersionApiVersionOdataBusinessDocumentsSummariesResponse = ApiVVersionApiVersionOdataBusinessDocumentsSummariesResponses[keyof ApiVVersionApiVersionOdataBusinessDocumentsSummariesResponses];\n\nexport type ApiVVersionApiVersionOdataBusinessDocumentsSummariesCountData = {\n    body?: never;\n    path?: never;\n    query?: {\n        accountants?: Array<number>;\n        /**\n         * Limits the properties returned in the result.\n         */\n        select?: string;\n        /**\n         * Indicates the related entities to be represented inline. The maximum depth is 2.\n         */\n        expand?: string;\n        /**\n         * Restricts the set of items returned. The maximum number of expressions is 100. The allowed functions are: allfunctions.\n         */\n        filter?: string;\n        /**\n         * Specifies the order in which items are returned. The maximum number of expressions is 5.\n         */\n        orderby?: string;\n        /**\n         * Limits the number of items returned from a collection. The maximum value is 100.\n         */\n        top?: number;\n        /**\n         * Excludes the specified number of items of the queried collection from the result.\n         */\n        skip?: number;\n        /**\n         * Indicates whether the total count of items within a collection are returned in the result.\n         */\n        count?: boolean;\n    };\n    url: '/api/v1/odata/BusinessDocumentsSummaries/$count';\n};\n\nexport type ApiVVersionApiVersionOdataBusinessDocumentsSummariesCountResponses = {\n    /**\n     * OK\n     */\n    200: Array<BusinessDocumentsSummary>;\n};\n\nexport type ApiVVersionApiVersionOdataBusinessDocumentsSummariesCountResponse = ApiVVersionApiVersionOdataBusinessDocumentsSummariesCountResponses[keyof ApiVVersionApiVersionOdataBusinessDocumentsSummariesCountResponses];\n\nexport type GetApiV1BusinessesByIdDocumentTypesSummaryData = {\n    body?: never;\n    path: {\n        id: number;\n    };\n    query?: never;\n    url: '/api/v1/businesses/{id}/document-types-summary';\n};\n\nexport type GetApiV1BusinessesByIdDocumentTypesSummaryResponses = {\n    /**\n     * OK\n     */\n    200: Array<DocumentTypesSummary>;\n};\n\nexport type GetApiV1BusinessesByIdDocumentTypesSummaryResponse = GetApiV1BusinessesByIdDocumentTypesSummaryResponses[keyof GetApiV1BusinessesByIdDocumentTypesSummaryResponses];\n\nexport type PostApiV1BusinessesData = {\n    body?: BusinessCreateDto;\n    path?: never;\n    query?: never;\n    url: '/api/v1/businesses';\n};\n\nexport type PostApiV1BusinessesResponses = {\n    /**\n     * OK\n     */\n    200: Business;\n};\n\nexport type PostApiV1BusinessesResponse = PostApiV1BusinessesResponses[keyof PostApiV1BusinessesResponses];\n\nexport type DeleteApiV1BusinessesByIdData = {\n    body?: never;\n    path: {\n        id: number;\n    };\n    query?: never;\n    url: '/api/v1/businesses/{id}';\n};\n\nexport type DeleteApiV1BusinessesByIdResponses = {\n    /**\n     * OK\n     */\n    200: unknown;\n};\n\nexport type PutApiV1BusinessesByIdData = {\n    body?: BusinessUpdateDto;\n    path: {\n        id: number;\n    };\n    query?: never;\n    url: '/api/v1/businesses/{id}';\n};\n\nexport type PutApiV1BusinessesByIdResponses = {\n    /**\n     * OK\n     */\n    200: Business;\n};\n\nexport type PutApiV1BusinessesByIdResponse = PutApiV1BusinessesByIdResponses[keyof PutApiV1BusinessesByIdResponses];\n\nexport type PutApiV1BusinessesByIdContactData = {\n    body?: BusinessChangeContactDto;\n    path: {\n        id: number;\n    };\n    query?: never;\n    url: '/api/v1/businesses/{id}/contact';\n};\n\nexport type PutApiV1BusinessesByIdContactResponses = {\n    /**\n     * OK\n     */\n    200: unknown;\n};\n\nexport type PostApiV1BusinessesByIdDisconnectData = {\n    body?: never;\n    path: {\n        id: number;\n    };\n    query?: never;\n    url: '/api/v1/businesses/{id}/disconnect';\n};\n\nexport type PostApiV1BusinessesByIdDisconnectResponses = {\n    /**\n     * OK\n     */\n    200: Business;\n};\n\nexport type PostApiV1BusinessesByIdDisconnectResponse = PostApiV1BusinessesByIdDisconnectResponses[keyof PostApiV1BusinessesByIdDisconnectResponses];\n\nexport type ApiVVersionApiVersionOdataBusinessesData = {\n    body?: never;\n    path?: never;\n    query?: {\n        accountants?: Array<number>;\n        /**\n         * Limits the properties returned in the result.\n         */\n        select?: string;\n        /**\n         * Indicates the related entities to be represented inline. The maximum depth is 2.\n         */\n        expand?: string;\n        /**\n         * Restricts the set of items returned. The maximum number of expressions is 100. The allowed functions are: allfunctions.\n         */\n        filter?: string;\n        /**\n         * Specifies the order in which items are returned. The maximum number of expressions is 5.\n         */\n        orderby?: string;\n        /**\n         * Limits the number of items returned from a collection. The maximum value is 100.\n         */\n        top?: number;\n        /**\n         * Excludes the specified number of items of the queried collection from the result.\n         */\n        skip?: number;\n        /**\n         * Indicates whether the total count of items within a collection are returned in the result.\n         */\n        count?: boolean;\n    };\n    url: '/api/v1/odata/Businesses';\n};\n\nexport type ApiVVersionApiVersionOdataBusinessesResponses = {\n    /**\n     * OK\n     */\n    200: Array<Business>;\n};\n\nexport type ApiVVersionApiVersionOdataBusinessesResponse = ApiVVersionApiVersionOdataBusinessesResponses[keyof ApiVVersionApiVersionOdataBusinessesResponses];\n\nexport type ApiVVersionApiVersionOdataBusinessesCountData = {\n    body?: never;\n    path?: never;\n    query?: {\n        accountants?: Array<number>;\n        /**\n         * Limits the properties returned in the result.\n         */\n        select?: string;\n        /**\n         * Indicates the related entities to be represented inline. The maximum depth is 2.\n         */\n        expand?: string;\n        /**\n         * Restricts the set of items returned. The maximum number of expressions is 100. The allowed functions are: allfunctions.\n         */\n        filter?: string;\n        /**\n         * Specifies the order in which items are returned. The maximum number of expressions is 5.\n         */\n        orderby?: string;\n        /**\n         * Limits the number of items returned from a collection. The maximum value is 100.\n         */\n        top?: number;\n        /**\n         * Excludes the specified number of items of the queried collection from the result.\n         */\n        skip?: number;\n        /**\n         * Indicates whether the total count of items within a collection are returned in the result.\n         */\n        count?: boolean;\n    };\n    url: '/api/v1/odata/Businesses/$count';\n};\n\nexport type ApiVVersionApiVersionOdataBusinessesCountResponses = {\n    /**\n     * OK\n     */\n    200: Array<Business>;\n};\n\nexport type ApiVVersionApiVersionOdataBusinessesCountResponse = ApiVVersionApiVersionOdataBusinessesCountResponses[keyof ApiVVersionApiVersionOdataBusinessesCountResponses];\n\nexport type ApiVVersionApiVersionOdataBusinessesKeyData = {\n    body?: never;\n    path?: never;\n    query?: {\n        key?: number;\n        /**\n         * Limits the properties returned in the result.\n         */\n        select?: string;\n        /**\n         * Indicates the related entities to be represented inline. The maximum depth is 2.\n         */\n        expand?: string;\n    };\n    url: '/api/v1/odata/Businesses({key})';\n};\n\nexport type ApiVVersionApiVersionOdataBusinessesKeyResponses = {\n    /**\n     * OK\n     */\n    200: Business;\n};\n\nexport type ApiVVersionApiVersionOdataBusinessesKeyResponse = ApiVVersionApiVersionOdataBusinessesKeyResponses[keyof ApiVVersionApiVersionOdataBusinessesKeyResponses];\n\nexport type ApiVVersionApiVersionOdataBusinessesKey2Data = {\n    body?: never;\n    path?: never;\n    query?: {\n        key?: number;\n        /**\n         * Limits the properties returned in the result.\n         */\n        select?: string;\n        /**\n         * Indicates the related entities to be represented inline. The maximum depth is 2.\n         */\n        expand?: string;\n    };\n    url: '/api/v1/odata/Businesses/{key}';\n};\n\nexport type ApiVVersionApiVersionOdataBusinessesKey2Responses = {\n    /**\n     * OK\n     */\n    200: Business;\n};\n\nexport type ApiVVersionApiVersionOdataBusinessesKey2Response = ApiVVersionApiVersionOdataBusinessesKey2Responses[keyof ApiVVersionApiVersionOdataBusinessesKey2Responses];\n\nexport type PutApiV1BusinessMembershipsData = {\n    body?: BusinessMembershipUpsertDto;\n    path?: never;\n    query?: never;\n    url: '/api/v1/business-memberships';\n};\n\nexport type PutApiV1BusinessMembershipsResponses = {\n    /**\n     * OK\n     */\n    200: BusinessMembershipDto;\n};\n\nexport type PutApiV1BusinessMembershipsResponse = PutApiV1BusinessMembershipsResponses[keyof PutApiV1BusinessMembershipsResponses];\n\nexport type ApiVVersionApiVersionOdataBusinessSummariesData = {\n    body?: never;\n    path?: never;\n    query?: {\n        role?: string;\n        accountants?: Array<number>;\n        /**\n         * Limits the properties returned in the result.\n         */\n        select?: string;\n        /**\n         * Indicates the related entities to be represented inline. The maximum depth is 2.\n         */\n        expand?: string;\n        /**\n         * Restricts the set of items returned. The maximum number of expressions is 100. The allowed functions are: allfunctions.\n         */\n        filter?: string;\n        /**\n         * Specifies the order in which items are returned. The maximum number of expressions is 5.\n         */\n        orderby?: string;\n        /**\n         * Limits the number of items returned from a collection. The maximum value is 100.\n         */\n        top?: number;\n        /**\n         * Excludes the specified number of items of the queried collection from the result.\n         */\n        skip?: number;\n        /**\n         * Indicates whether the total count of items within a collection are returned in the result.\n         */\n        count?: boolean;\n    };\n    url: '/api/v1/odata/BusinessSummaries';\n};\n\nexport type ApiVVersionApiVersionOdataBusinessSummariesResponses = {\n    /**\n     * OK\n     */\n    200: Array<BusinessSummary>;\n};\n\nexport type ApiVVersionApiVersionOdataBusinessSummariesResponse = ApiVVersionApiVersionOdataBusinessSummariesResponses[keyof ApiVVersionApiVersionOdataBusinessSummariesResponses];\n\nexport type ApiVVersionApiVersionOdataBusinessSummariesCountData = {\n    body?: never;\n    path?: never;\n    query?: {\n        role?: string;\n        accountants?: Array<number>;\n        /**\n         * Limits the properties returned in the result.\n         */\n        select?: string;\n        /**\n         * Indicates the related entities to be represented inline. The maximum depth is 2.\n         */\n        expand?: string;\n        /**\n         * Restricts the set of items returned. The maximum number of expressions is 100. The allowed functions are: allfunctions.\n         */\n        filter?: string;\n        /**\n         * Specifies the order in which items are returned. The maximum number of expressions is 5.\n         */\n        orderby?: string;\n        /**\n         * Limits the number of items returned from a collection. The maximum value is 100.\n         */\n        top?: number;\n        /**\n         * Excludes the specified number of items of the queried collection from the result.\n         */\n        skip?: number;\n        /**\n         * Indicates whether the total count of items within a collection are returned in the result.\n         */\n        count?: boolean;\n    };\n    url: '/api/v1/odata/BusinessSummaries/$count';\n};\n\nexport type ApiVVersionApiVersionOdataBusinessSummariesCountResponses = {\n    /**\n     * OK\n     */\n    200: Array<BusinessSummary>;\n};\n\nexport type ApiVVersionApiVersionOdataBusinessSummariesCountResponse = ApiVVersionApiVersionOdataBusinessSummariesCountResponses[keyof ApiVVersionApiVersionOdataBusinessSummariesCountResponses];\n\nexport type PostApiV1CounterpartiesData = {\n    body?: CounterpartyCreateDto;\n    path?: never;\n    query?: never;\n    url: '/api/v1/counterparties';\n};\n\nexport type PostApiV1CounterpartiesResponses = {\n    /**\n     * OK\n     */\n    200: Counterparty;\n};\n\nexport type PostApiV1CounterpartiesResponse = PostApiV1CounterpartiesResponses[keyof PostApiV1CounterpartiesResponses];\n\nexport type DeleteApiV1CounterpartiesByIdData = {\n    body?: never;\n    path: {\n        id: number;\n    };\n    query?: never;\n    url: '/api/v1/counterparties/{id}';\n};\n\nexport type DeleteApiV1CounterpartiesByIdResponses = {\n    /**\n     * OK\n     */\n    200: unknown;\n};\n\nexport type PatchApiV1CounterpartiesByIdData = {\n    body?: CounterpartyUpdateDto;\n    path: {\n        id: number;\n    };\n    query?: never;\n    url: '/api/v1/counterparties/{id}';\n};\n\nexport type PatchApiV1CounterpartiesByIdResponses = {\n    /**\n     * OK\n     */\n    200: Counterparty;\n};\n\nexport type PatchApiV1CounterpartiesByIdResponse = PatchApiV1CounterpartiesByIdResponses[keyof PatchApiV1CounterpartiesByIdResponses];\n\nexport type ApiVVersionApiVersionOdataCounterpartiesData = {\n    body?: never;\n    path?: never;\n    query?: {\n        /**\n         * Limits the properties returned in the result.\n         */\n        select?: string;\n        /**\n         * Indicates the related entities to be represented inline. The maximum depth is 2.\n         */\n        expand?: string;\n        /**\n         * Restricts the set of items returned. The maximum number of expressions is 100. The allowed functions are: allfunctions.\n         */\n        filter?: string;\n        /**\n         * Specifies the order in which items are returned. The maximum number of expressions is 5.\n         */\n        orderby?: string;\n        /**\n         * Limits the number of items returned from a collection. The maximum value is 100.\n         */\n        top?: number;\n        /**\n         * Excludes the specified number of items of the queried collection from the result.\n         */\n        skip?: number;\n        /**\n         * Indicates whether the total count of items within a collection are returned in the result.\n         */\n        count?: boolean;\n    };\n    url: '/api/v1/odata/Counterparties';\n};\n\nexport type ApiVVersionApiVersionOdataCounterpartiesResponses = {\n    /**\n     * OK\n     */\n    200: Array<Counterparty>;\n};\n\nexport type ApiVVersionApiVersionOdataCounterpartiesResponse = ApiVVersionApiVersionOdataCounterpartiesResponses[keyof ApiVVersionApiVersionOdataCounterpartiesResponses];\n\nexport type ApiVVersionApiVersionOdataCounterpartiesCountData = {\n    body?: never;\n    path?: never;\n    query?: {\n        /**\n         * Limits the properties returned in the result.\n         */\n        select?: string;\n        /**\n         * Indicates the related entities to be represented inline. The maximum depth is 2.\n         */\n        expand?: string;\n        /**\n         * Restricts the set of items returned. The maximum number of expressions is 100. The allowed functions are: allfunctions.\n         */\n        filter?: string;\n        /**\n         * Specifies the order in which items are returned. The maximum number of expressions is 5.\n         */\n        orderby?: string;\n        /**\n         * Limits the number of items returned from a collection. The maximum value is 100.\n         */\n        top?: number;\n        /**\n         * Excludes the specified number of items of the queried collection from the result.\n         */\n        skip?: number;\n        /**\n         * Indicates whether the total count of items within a collection are returned in the result.\n         */\n        count?: boolean;\n    };\n    url: '/api/v1/odata/Counterparties/$count';\n};\n\nexport type ApiVVersionApiVersionOdataCounterpartiesCountResponses = {\n    /**\n     * OK\n     */\n    200: Array<Counterparty>;\n};\n\nexport type ApiVVersionApiVersionOdataCounterpartiesCountResponse = ApiVVersionApiVersionOdataCounterpartiesCountResponses[keyof ApiVVersionApiVersionOdataCounterpartiesCountResponses];\n\nexport type PutApiV1DataBoxCredentialsData = {\n    body?: DataBoxCredentialsUpsertDto;\n    path?: never;\n    query?: never;\n    url: '/api/v1/data-box-credentials';\n};\n\nexport type PutApiV1DataBoxCredentialsResponses = {\n    /**\n     * OK\n     */\n    200: DataBoxCredentials;\n};\n\nexport type PutApiV1DataBoxCredentialsResponse = PutApiV1DataBoxCredentialsResponses[keyof PutApiV1DataBoxCredentialsResponses];\n\nexport type DeleteApiV1DataBoxCredentialsByIdData = {\n    body?: never;\n    path: {\n        id: number;\n    };\n    query?: never;\n    url: '/api/v1/data-box-credentials/{id}';\n};\n\nexport type DeleteApiV1DataBoxCredentialsByIdResponses = {\n    /**\n     * OK\n     */\n    200: unknown;\n};\n\nexport type ApiVVersionApiVersionOdataDataBoxCredentialsData = {\n    body?: never;\n    path?: never;\n    query?: {\n        includePassword?: boolean;\n        /**\n         * Limits the properties returned in the result.\n         */\n        select?: string;\n        /**\n         * Indicates the related entities to be represented inline. The maximum depth is 2.\n         */\n        expand?: string;\n        /**\n         * Restricts the set of items returned. The maximum number of expressions is 100. The allowed functions are: allfunctions.\n         */\n        filter?: string;\n        /**\n         * Specifies the order in which items are returned. The maximum number of expressions is 5.\n         */\n        orderby?: string;\n        /**\n         * Limits the number of items returned from a collection. The maximum value is 100.\n         */\n        top?: number;\n        /**\n         * Excludes the specified number of items of the queried collection from the result.\n         */\n        skip?: number;\n        /**\n         * Indicates whether the total count of items within a collection are returned in the result.\n         */\n        count?: boolean;\n    };\n    url: '/api/v1/odata/DataBoxCredentials';\n};\n\nexport type ApiVVersionApiVersionOdataDataBoxCredentialsResponses = {\n    /**\n     * OK\n     */\n    200: Array<DataBoxCredentials>;\n};\n\nexport type ApiVVersionApiVersionOdataDataBoxCredentialsResponse = ApiVVersionApiVersionOdataDataBoxCredentialsResponses[keyof ApiVVersionApiVersionOdataDataBoxCredentialsResponses];\n\nexport type ApiVVersionApiVersionOdataDataBoxCredentialsCountData = {\n    body?: never;\n    path?: never;\n    query?: {\n        includePassword?: boolean;\n        /**\n         * Limits the properties returned in the result.\n         */\n        select?: string;\n        /**\n         * Indicates the related entities to be represented inline. The maximum depth is 2.\n         */\n        expand?: string;\n        /**\n         * Restricts the set of items returned. The maximum number of expressions is 100. The allowed functions are: allfunctions.\n         */\n        filter?: string;\n        /**\n         * Specifies the order in which items are returned. The maximum number of expressions is 5.\n         */\n        orderby?: string;\n        /**\n         * Limits the number of items returned from a collection. The maximum value is 100.\n         */\n        top?: number;\n        /**\n         * Excludes the specified number of items of the queried collection from the result.\n         */\n        skip?: number;\n        /**\n         * Indicates whether the total count of items within a collection are returned in the result.\n         */\n        count?: boolean;\n    };\n    url: '/api/v1/odata/DataBoxCredentials/$count';\n};\n\nexport type ApiVVersionApiVersionOdataDataBoxCredentialsCountResponses = {\n    /**\n     * OK\n     */\n    200: Array<DataBoxCredentials>;\n};\n\nexport type ApiVVersionApiVersionOdataDataBoxCredentialsCountResponse = ApiVVersionApiVersionOdataDataBoxCredentialsCountResponses[keyof ApiVVersionApiVersionOdataDataBoxCredentialsCountResponses];\n\nexport type GetApiDevData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/dev';\n};\n\nexport type GetApiDevResponses = {\n    /**\n     * OK\n     */\n    200: unknown;\n};\n\nexport type GetApiDevReseedDbData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/dev/reseed-db';\n};\n\nexport type GetApiDevReseedDbResponses = {\n    /**\n     * OK\n     */\n    200: unknown;\n};\n\nexport type GetApiDevDbResetData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/dev/db-reset';\n};\n\nexport type GetApiDevDbResetResponses = {\n    /**\n     * OK\n     */\n    200: unknown;\n};\n\nexport type GetApiDevDbReset2Data = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/dev/db/reset';\n};\n\nexport type GetApiDevDbReset2Responses = {\n    /**\n     * OK\n     */\n    200: unknown;\n};\n\nexport type GetApiDevDbCreateData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/dev/db/create';\n};\n\nexport type GetApiDevDbCreateResponses = {\n    /**\n     * OK\n     */\n    200: unknown;\n};\n\nexport type GetApiDevDbTouchData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/dev/db/touch';\n};\n\nexport type GetApiDevDbTouchResponses = {\n    /**\n     * OK\n     */\n    200: unknown;\n};\n\nexport type GetApiDevSeedData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/dev/seed';\n};\n\nexport type GetApiDevSeedResponses = {\n    /**\n     * OK\n     */\n    200: unknown;\n};\n\nexport type GetApiDevSeedAllData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/dev/seed-all';\n};\n\nexport type GetApiDevSeedAllResponses = {\n    /**\n     * OK\n     */\n    200: unknown;\n};\n\nexport type GetApiDevSeedProdData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/dev/seed-prod';\n};\n\nexport type GetApiDevSeedProdResponses = {\n    /**\n     * OK\n     */\n    200: unknown;\n};\n\nexport type GetApiDevJobProcessRecurringTasksData = {\n    body?: never;\n    path?: never;\n    query?: {\n        refDay?: string;\n    };\n    url: '/api/dev/job/process-recurring-tasks';\n};\n\nexport type GetApiDevJobProcessRecurringTasksResponses = {\n    /**\n     * OK\n     */\n    200: unknown;\n};\n\nexport type GetApiDevNotificationsSendTestData = {\n    body?: never;\n    path?: never;\n    query?: {\n        userId?: number;\n    };\n    url: '/api/dev/notifications/send-test';\n};\n\nexport type GetApiDevNotificationsSendTestResponses = {\n    /**\n     * OK\n     */\n    200: unknown;\n};\n\nexport type GetApiDevConfirmEmailData = {\n    body?: never;\n    path?: never;\n    query?: {\n        email?: string;\n    };\n    url: '/api/dev/confirm-email';\n};\n\nexport type GetApiDevConfirmEmailResponses = {\n    /**\n     * OK\n     */\n    200: unknown;\n};\n\nexport type GetApiDevEmailSendTestData = {\n    body?: never;\n    path?: never;\n    query?: {\n        to?: string;\n        subject?: string;\n        message?: string;\n    };\n    url: '/api/dev/email/send-test';\n};\n\nexport type GetApiDevEmailSendTestResponses = {\n    /**\n     * OK\n     */\n    200: unknown;\n};\n\nexport type DeleteApiV1NotificationsDeviceTokensData = {\n    body?: NotificationsDeviceTokenDeleteDto;\n    path?: never;\n    query?: never;\n    url: '/api/v1/notifications/device-tokens';\n};\n\nexport type DeleteApiV1NotificationsDeviceTokensResponses = {\n    /**\n     * OK\n     */\n    200: unknown;\n};\n\nexport type PutApiV1NotificationsDeviceTokensData = {\n    body?: NotificationsDeviceTokenUpsertDto;\n    path?: never;\n    query?: never;\n    url: '/api/v1/notifications/device-tokens';\n};\n\nexport type PutApiV1NotificationsDeviceTokensResponses = {\n    /**\n     * OK\n     */\n    200: unknown;\n};\n\nexport type ApiVVersionApiVersionOdataDocumentTypesData = {\n    body?: never;\n    path?: never;\n    query?: {\n        /**\n         * Limits the properties returned in the result.\n         */\n        select?: string;\n        /**\n         * Indicates the related entities to be represented inline. The maximum depth is 2.\n         */\n        expand?: string;\n        /**\n         * Restricts the set of items returned. The maximum number of expressions is 100. The allowed functions are: allfunctions.\n         */\n        filter?: string;\n        /**\n         * Specifies the order in which items are returned. The maximum number of expressions is 5.\n         */\n        orderby?: string;\n        /**\n         * Limits the number of items returned from a collection. The maximum value is 100.\n         */\n        top?: number;\n        /**\n         * Excludes the specified number of items of the queried collection from the result.\n         */\n        skip?: number;\n        /**\n         * Indicates whether the total count of items within a collection are returned in the result.\n         */\n        count?: boolean;\n    };\n    url: '/api/v1/odata/DocumentTypes';\n};\n\nexport type ApiVVersionApiVersionOdataDocumentTypesResponses = {\n    /**\n     * OK\n     */\n    200: Array<DocumentType>;\n};\n\nexport type ApiVVersionApiVersionOdataDocumentTypesResponse = ApiVVersionApiVersionOdataDocumentTypesResponses[keyof ApiVVersionApiVersionOdataDocumentTypesResponses];\n\nexport type ApiVVersionApiVersionOdataDocumentTypesCountData = {\n    body?: never;\n    path?: never;\n    query?: {\n        /**\n         * Limits the properties returned in the result.\n         */\n        select?: string;\n        /**\n         * Indicates the related entities to be represented inline. The maximum depth is 2.\n         */\n        expand?: string;\n        /**\n         * Restricts the set of items returned. The maximum number of expressions is 100. The allowed functions are: allfunctions.\n         */\n        filter?: string;\n        /**\n         * Specifies the order in which items are returned. The maximum number of expressions is 5.\n         */\n        orderby?: string;\n        /**\n         * Limits the number of items returned from a collection. The maximum value is 100.\n         */\n        top?: number;\n        /**\n         * Excludes the specified number of items of the queried collection from the result.\n         */\n        skip?: number;\n        /**\n         * Indicates whether the total count of items within a collection are returned in the result.\n         */\n        count?: boolean;\n    };\n    url: '/api/v1/odata/DocumentTypes/$count';\n};\n\nexport type ApiVVersionApiVersionOdataDocumentTypesCountResponses = {\n    /**\n     * OK\n     */\n    200: Array<DocumentType>;\n};\n\nexport type ApiVVersionApiVersionOdataDocumentTypesCountResponse = ApiVVersionApiVersionOdataDocumentTypesCountResponses[keyof ApiVVersionApiVersionOdataDocumentTypesCountResponses];\n\nexport type PostApiV1FeedbackData = {\n    body?: SendFeedbackRequest;\n    path?: never;\n    query?: never;\n    url: '/api/v1/feedback';\n};\n\nexport type PostApiV1FeedbackResponses = {\n    /**\n     * OK\n     */\n    200: unknown;\n};\n\nexport type PostApiV1InvitationsData = {\n    body?: InvitationCreateDto;\n    path?: never;\n    query?: never;\n    url: '/api/v1/invitations';\n};\n\nexport type PostApiV1InvitationsResponses = {\n    /**\n     * OK\n     */\n    200: Invitation;\n};\n\nexport type PostApiV1InvitationsResponse = PostApiV1InvitationsResponses[keyof PostApiV1InvitationsResponses];\n\nexport type PostApiV1InvitationsByIdAcceptData = {\n    body?: InvitationAcceptDto;\n    path: {\n        id: number;\n    };\n    query?: never;\n    url: '/api/v1/invitations/{id}/accept';\n};\n\nexport type PostApiV1InvitationsByIdAcceptResponses = {\n    /**\n     * OK\n     */\n    200: unknown;\n};\n\nexport type PostApiV1InvitationsByIdRejectData = {\n    body?: never;\n    path: {\n        id: number;\n    };\n    query?: never;\n    url: '/api/v1/invitations/{id}/reject';\n};\n\nexport type PostApiV1InvitationsByIdRejectResponses = {\n    /**\n     * OK\n     */\n    200: unknown;\n};\n\nexport type DeleteApiV1InvitationsByIdData = {\n    body?: never;\n    path: {\n        id: number;\n    };\n    query?: never;\n    url: '/api/v1/invitations/{id}';\n};\n\nexport type DeleteApiV1InvitationsByIdResponses = {\n    /**\n     * OK\n     */\n    200: unknown;\n};\n\nexport type PatchApiV1InvitationsByIdData = {\n    body?: InvitationUpdateDto;\n    path: {\n        id: number;\n    };\n    query?: never;\n    url: '/api/v1/invitations/{id}';\n};\n\nexport type PatchApiV1InvitationsByIdResponses = {\n    /**\n     * OK\n     */\n    200: Invitation;\n};\n\nexport type PatchApiV1InvitationsByIdResponse = PatchApiV1InvitationsByIdResponses[keyof PatchApiV1InvitationsByIdResponses];\n\nexport type ApiVVersionApiVersionOdataInvitationsData = {\n    body?: never;\n    path?: never;\n    query?: {\n        /**\n         * Limits the properties returned in the result.\n         */\n        select?: string;\n        /**\n         * Indicates the related entities to be represented inline. The maximum depth is 2.\n         */\n        expand?: string;\n        /**\n         * Restricts the set of items returned. The maximum number of expressions is 100. The allowed functions are: allfunctions.\n         */\n        filter?: string;\n        /**\n         * Specifies the order in which items are returned. The maximum number of expressions is 5.\n         */\n        orderby?: string;\n        /**\n         * Limits the number of items returned from a collection. The maximum value is 100.\n         */\n        top?: number;\n        /**\n         * Excludes the specified number of items of the queried collection from the result.\n         */\n        skip?: number;\n        /**\n         * Indicates whether the total count of items within a collection are returned in the result.\n         */\n        count?: boolean;\n    };\n    url: '/api/v1/odata/Invitations';\n};\n\nexport type ApiVVersionApiVersionOdataInvitationsResponses = {\n    /**\n     * OK\n     */\n    200: Array<Invitation>;\n};\n\nexport type ApiVVersionApiVersionOdataInvitationsResponse = ApiVVersionApiVersionOdataInvitationsResponses[keyof ApiVVersionApiVersionOdataInvitationsResponses];\n\nexport type ApiVVersionApiVersionOdataInvitationsCountData = {\n    body?: never;\n    path?: never;\n    query?: {\n        /**\n         * Limits the properties returned in the result.\n         */\n        select?: string;\n        /**\n         * Indicates the related entities to be represented inline. The maximum depth is 2.\n         */\n        expand?: string;\n        /**\n         * Restricts the set of items returned. The maximum number of expressions is 100. The allowed functions are: allfunctions.\n         */\n        filter?: string;\n        /**\n         * Specifies the order in which items are returned. The maximum number of expressions is 5.\n         */\n        orderby?: string;\n        /**\n         * Limits the number of items returned from a collection. The maximum value is 100.\n         */\n        top?: number;\n        /**\n         * Excludes the specified number of items of the queried collection from the result.\n         */\n        skip?: number;\n        /**\n         * Indicates whether the total count of items within a collection are returned in the result.\n         */\n        count?: boolean;\n    };\n    url: '/api/v1/odata/Invitations/$count';\n};\n\nexport type ApiVVersionApiVersionOdataInvitationsCountResponses = {\n    /**\n     * OK\n     */\n    200: Array<Invitation>;\n};\n\nexport type ApiVVersionApiVersionOdataInvitationsCountResponse = ApiVVersionApiVersionOdataInvitationsCountResponses[keyof ApiVVersionApiVersionOdataInvitationsCountResponses];\n\nexport type PostApiV1InvoicesData = {\n    body?: InvoiceCreateDto;\n    path?: never;\n    query?: never;\n    url: '/api/v1/invoices';\n};\n\nexport type PostApiV1InvoicesResponses = {\n    /**\n     * OK\n     */\n    200: Invoice;\n};\n\nexport type PostApiV1InvoicesResponse = PostApiV1InvoicesResponses[keyof PostApiV1InvoicesResponses];\n\nexport type DeleteApiV1InvoicesByIdData = {\n    body?: never;\n    path: {\n        id: number;\n    };\n    query?: never;\n    url: '/api/v1/invoices/{id}';\n};\n\nexport type DeleteApiV1InvoicesByIdResponses = {\n    /**\n     * OK\n     */\n    200: unknown;\n};\n\nexport type PatchApiV1InvoicesByIdData = {\n    body?: InvoiceUpdateDto;\n    path: {\n        id: number;\n    };\n    query?: never;\n    url: '/api/v1/invoices/{id}';\n};\n\nexport type PatchApiV1InvoicesByIdResponses = {\n    /**\n     * OK\n     */\n    200: Invoice;\n};\n\nexport type PatchApiV1InvoicesByIdResponse = PatchApiV1InvoicesByIdResponses[keyof PatchApiV1InvoicesByIdResponses];\n\nexport type GetApiV1InvoicesByIdPreviewData = {\n    body?: never;\n    path: {\n        id: number;\n    };\n    query?: never;\n    url: '/api/v1/invoices/{id}/preview';\n};\n\nexport type GetApiV1InvoicesByIdPreviewResponses = {\n    /**\n     * OK\n     */\n    200: unknown;\n};\n\nexport type PostApiV1InvoicesByIdSendData = {\n    body?: InvoiceSendDto;\n    path: {\n        id: number;\n    };\n    query?: never;\n    url: '/api/v1/invoices/{id}/send';\n};\n\nexport type PostApiV1InvoicesByIdSendResponses = {\n    /**\n     * OK\n     */\n    200: Invoice;\n};\n\nexport type PostApiV1InvoicesByIdSendResponse = PostApiV1InvoicesByIdSendResponses[keyof PostApiV1InvoicesByIdSendResponses];\n\nexport type PostApiV1InvoicesByIdSnapshotData = {\n    body?: never;\n    path: {\n        id: number;\n    };\n    query?: never;\n    url: '/api/v1/invoices/{id}/snapshot';\n};\n\nexport type PostApiV1InvoicesByIdSnapshotResponses = {\n    /**\n     * OK\n     */\n    200: Invoice;\n};\n\nexport type PostApiV1InvoicesByIdSnapshotResponse = PostApiV1InvoicesByIdSnapshotResponses[keyof PostApiV1InvoicesByIdSnapshotResponses];\n\nexport type ApiVVersionApiVersionOdataInvoicesData = {\n    body?: never;\n    path?: never;\n    query?: {\n        /**\n         * Limits the properties returned in the result.\n         */\n        select?: string;\n        /**\n         * Indicates the related entities to be represented inline. The maximum depth is 2.\n         */\n        expand?: string;\n        /**\n         * Restricts the set of items returned. The maximum number of expressions is 100. The allowed functions are: allfunctions.\n         */\n        filter?: string;\n        /**\n         * Specifies the order in which items are returned. The maximum number of expressions is 5.\n         */\n        orderby?: string;\n        /**\n         * Limits the number of items returned from a collection. The maximum value is 100.\n         */\n        top?: number;\n        /**\n         * Excludes the specified number of items of the queried collection from the result.\n         */\n        skip?: number;\n        /**\n         * Indicates whether the total count of items within a collection are returned in the result.\n         */\n        count?: boolean;\n    };\n    url: '/api/v1/odata/Invoices';\n};\n\nexport type ApiVVersionApiVersionOdataInvoicesResponses = {\n    /**\n     * OK\n     */\n    200: Array<Invoice>;\n};\n\nexport type ApiVVersionApiVersionOdataInvoicesResponse = ApiVVersionApiVersionOdataInvoicesResponses[keyof ApiVVersionApiVersionOdataInvoicesResponses];\n\nexport type ApiVVersionApiVersionOdataInvoicesCountData = {\n    body?: never;\n    path?: never;\n    query?: {\n        /**\n         * Limits the properties returned in the result.\n         */\n        select?: string;\n        /**\n         * Indicates the related entities to be represented inline. The maximum depth is 2.\n         */\n        expand?: string;\n        /**\n         * Restricts the set of items returned. The maximum number of expressions is 100. The allowed functions are: allfunctions.\n         */\n        filter?: string;\n        /**\n         * Specifies the order in which items are returned. The maximum number of expressions is 5.\n         */\n        orderby?: string;\n        /**\n         * Limits the number of items returned from a collection. The maximum value is 100.\n         */\n        top?: number;\n        /**\n         * Excludes the specified number of items of the queried collection from the result.\n         */\n        skip?: number;\n        /**\n         * Indicates whether the total count of items within a collection are returned in the result.\n         */\n        count?: boolean;\n    };\n    url: '/api/v1/odata/Invoices/$count';\n};\n\nexport type ApiVVersionApiVersionOdataInvoicesCountResponses = {\n    /**\n     * OK\n     */\n    200: Array<Invoice>;\n};\n\nexport type ApiVVersionApiVersionOdataInvoicesCountResponse = ApiVVersionApiVersionOdataInvoicesCountResponses[keyof ApiVVersionApiVersionOdataInvoicesCountResponses];\n\nexport type PutApiV1InvoiceSettingsData = {\n    body?: InvoiceSettingUpsertDto;\n    path?: never;\n    query?: never;\n    url: '/api/v1/invoice-settings';\n};\n\nexport type PutApiV1InvoiceSettingsResponses = {\n    /**\n     * OK\n     */\n    200: InvoiceSetting;\n};\n\nexport type PutApiV1InvoiceSettingsResponse = PutApiV1InvoiceSettingsResponses[keyof PutApiV1InvoiceSettingsResponses];\n\nexport type ApiVVersionApiVersionOdataInvoiceSettingsData = {\n    body?: never;\n    path?: never;\n    query?: {\n        /**\n         * Limits the properties returned in the result.\n         */\n        select?: string;\n        /**\n         * Indicates the related entities to be represented inline. The maximum depth is 2.\n         */\n        expand?: string;\n        /**\n         * Restricts the set of items returned. The maximum number of expressions is 100. The allowed functions are: allfunctions.\n         */\n        filter?: string;\n        /**\n         * Specifies the order in which items are returned. The maximum number of expressions is 5.\n         */\n        orderby?: string;\n        /**\n         * Limits the number of items returned from a collection. The maximum value is 100.\n         */\n        top?: number;\n        /**\n         * Excludes the specified number of items of the queried collection from the result.\n         */\n        skip?: number;\n        /**\n         * Indicates whether the total count of items within a collection are returned in the result.\n         */\n        count?: boolean;\n    };\n    url: '/api/v1/odata/InvoiceSettings';\n};\n\nexport type ApiVVersionApiVersionOdataInvoiceSettingsResponses = {\n    /**\n     * OK\n     */\n    200: Array<InvoiceSetting>;\n};\n\nexport type ApiVVersionApiVersionOdataInvoiceSettingsResponse = ApiVVersionApiVersionOdataInvoiceSettingsResponses[keyof ApiVVersionApiVersionOdataInvoiceSettingsResponses];\n\nexport type ApiVVersionApiVersionOdataInvoiceSettingsCountData = {\n    body?: never;\n    path?: never;\n    query?: {\n        /**\n         * Limits the properties returned in the result.\n         */\n        select?: string;\n        /**\n         * Indicates the related entities to be represented inline. The maximum depth is 2.\n         */\n        expand?: string;\n        /**\n         * Restricts the set of items returned. The maximum number of expressions is 100. The allowed functions are: allfunctions.\n         */\n        filter?: string;\n        /**\n         * Specifies the order in which items are returned. The maximum number of expressions is 5.\n         */\n        orderby?: string;\n        /**\n         * Limits the number of items returned from a collection. The maximum value is 100.\n         */\n        top?: number;\n        /**\n         * Excludes the specified number of items of the queried collection from the result.\n         */\n        skip?: number;\n        /**\n         * Indicates whether the total count of items within a collection are returned in the result.\n         */\n        count?: boolean;\n    };\n    url: '/api/v1/odata/InvoiceSettings/$count';\n};\n\nexport type ApiVVersionApiVersionOdataInvoiceSettingsCountResponses = {\n    /**\n     * OK\n     */\n    200: Array<InvoiceSetting>;\n};\n\nexport type ApiVVersionApiVersionOdataInvoiceSettingsCountResponse = ApiVVersionApiVersionOdataInvoiceSettingsCountResponses[keyof ApiVVersionApiVersionOdataInvoiceSettingsCountResponses];\n\nexport type ApiVVersionApiVersionOdataLicensesData = {\n    body?: never;\n    path?: never;\n    query?: {\n        /**\n         * Limits the properties returned in the result.\n         */\n        select?: string;\n        /**\n         * Indicates the related entities to be represented inline. The maximum depth is 2.\n         */\n        expand?: string;\n        /**\n         * Restricts the set of items returned. The maximum number of expressions is 100. The allowed functions are: allfunctions.\n         */\n        filter?: string;\n        /**\n         * Specifies the order in which items are returned. The maximum number of expressions is 5.\n         */\n        orderby?: string;\n        /**\n         * Limits the number of items returned from a collection. The maximum value is 100.\n         */\n        top?: number;\n        /**\n         * Excludes the specified number of items of the queried collection from the result.\n         */\n        skip?: number;\n        /**\n         * Indicates whether the total count of items within a collection are returned in the result.\n         */\n        count?: boolean;\n    };\n    url: '/api/v1/odata/Licenses';\n};\n\nexport type ApiVVersionApiVersionOdataLicensesResponses = {\n    /**\n     * OK\n     */\n    200: Array<LicenseDto>;\n};\n\nexport type ApiVVersionApiVersionOdataLicensesResponse = ApiVVersionApiVersionOdataLicensesResponses[keyof ApiVVersionApiVersionOdataLicensesResponses];\n\nexport type ApiVVersionApiVersionOdataLicensesCountData = {\n    body?: never;\n    path?: never;\n    query?: {\n        /**\n         * Limits the properties returned in the result.\n         */\n        select?: string;\n        /**\n         * Indicates the related entities to be represented inline. The maximum depth is 2.\n         */\n        expand?: string;\n        /**\n         * Restricts the set of items returned. The maximum number of expressions is 100. The allowed functions are: allfunctions.\n         */\n        filter?: string;\n        /**\n         * Specifies the order in which items are returned. The maximum number of expressions is 5.\n         */\n        orderby?: string;\n        /**\n         * Limits the number of items returned from a collection. The maximum value is 100.\n         */\n        top?: number;\n        /**\n         * Excludes the specified number of items of the queried collection from the result.\n         */\n        skip?: number;\n        /**\n         * Indicates whether the total count of items within a collection are returned in the result.\n         */\n        count?: boolean;\n    };\n    url: '/api/v1/odata/Licenses/$count';\n};\n\nexport type ApiVVersionApiVersionOdataLicensesCountResponses = {\n    /**\n     * OK\n     */\n    200: Array<LicenseDto>;\n};\n\nexport type ApiVVersionApiVersionOdataLicensesCountResponse = ApiVVersionApiVersionOdataLicensesCountResponses[keyof ApiVVersionApiVersionOdataLicensesCountResponses];\n\nexport type PostApiV1NotificationsTestData = {\n    body?: NotificationsTestSendDto;\n    path?: never;\n    query?: never;\n    url: '/api/v1/notifications/test';\n};\n\nexport type PostApiV1NotificationsTestResponses = {\n    /**\n     * OK\n     */\n    200: unknown;\n};\n\nexport type GetApiV1PersonalDocumentsByIdRawData = {\n    body?: never;\n    path: {\n        id: number;\n    };\n    query?: never;\n    url: '/api/v1/personal-documents/{id}/raw';\n};\n\nexport type GetApiV1PersonalDocumentsByIdRawResponses = {\n    /**\n     * OK\n     */\n    200: unknown;\n    /**\n     * No Content\n     */\n    204: void;\n};\n\nexport type GetApiV1PersonalDocumentsByIdRawResponse = GetApiV1PersonalDocumentsByIdRawResponses[keyof GetApiV1PersonalDocumentsByIdRawResponses];\n\nexport type PostApiV1PersonalDocumentsData = {\n    body?: {\n        File: Blob | File;\n        DocumentName: string;\n    };\n    path?: never;\n    query?: never;\n    url: '/api/v1/personal-documents';\n};\n\nexport type PostApiV1PersonalDocumentsResponses = {\n    /**\n     * OK\n     */\n    200: DocumentPersonal;\n};\n\nexport type PostApiV1PersonalDocumentsResponse = PostApiV1PersonalDocumentsResponses[keyof PostApiV1PersonalDocumentsResponses];\n\nexport type PostApiV1PersonalDocumentsByIdMoveToBusinessData = {\n    body?: DocumentPersonalMoveToBusinessDocumentsDto;\n    path: {\n        id: number;\n    };\n    query?: never;\n    url: '/api/v1/personal-documents/{id}/move-to-business';\n};\n\nexport type PostApiV1PersonalDocumentsByIdMoveToBusinessResponses = {\n    /**\n     * OK\n     */\n    200: unknown;\n};\n\nexport type DeleteApiV1PersonalDocumentsByIdData = {\n    body?: never;\n    path: {\n        id: number;\n    };\n    query?: never;\n    url: '/api/v1/personal-documents/{id}';\n};\n\nexport type DeleteApiV1PersonalDocumentsByIdResponses = {\n    /**\n     * OK\n     */\n    200: DocumentPersonal;\n};\n\nexport type DeleteApiV1PersonalDocumentsByIdResponse = DeleteApiV1PersonalDocumentsByIdResponses[keyof DeleteApiV1PersonalDocumentsByIdResponses];\n\nexport type GetApiV1PersonalDocumentsSummaryData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v1/personal-documents/summary';\n};\n\nexport type GetApiV1PersonalDocumentsSummaryResponses = {\n    /**\n     * OK\n     */\n    200: PersonalDocumentsSummary;\n};\n\nexport type GetApiV1PersonalDocumentsSummaryResponse = GetApiV1PersonalDocumentsSummaryResponses[keyof GetApiV1PersonalDocumentsSummaryResponses];\n\nexport type ApiVVersionApiVersionOdataPersonalDocumentsData = {\n    body?: never;\n    path?: never;\n    query?: {\n        /**\n         * Limits the properties returned in the result.\n         */\n        select?: string;\n        /**\n         * Indicates the related entities to be represented inline. The maximum depth is 2.\n         */\n        expand?: string;\n        /**\n         * Restricts the set of items returned. The maximum number of expressions is 100. The allowed functions are: allfunctions.\n         */\n        filter?: string;\n        /**\n         * Specifies the order in which items are returned. The maximum number of expressions is 5.\n         */\n        orderby?: string;\n        /**\n         * Limits the number of items returned from a collection. The maximum value is 100.\n         */\n        top?: number;\n        /**\n         * Excludes the specified number of items of the queried collection from the result.\n         */\n        skip?: number;\n        /**\n         * Indicates whether the total count of items within a collection are returned in the result.\n         */\n        count?: boolean;\n    };\n    url: '/api/v1/odata/PersonalDocuments';\n};\n\nexport type ApiVVersionApiVersionOdataPersonalDocumentsResponses = {\n    /**\n     * OK\n     */\n    200: Array<DocumentPersonal>;\n};\n\nexport type ApiVVersionApiVersionOdataPersonalDocumentsResponse = ApiVVersionApiVersionOdataPersonalDocumentsResponses[keyof ApiVVersionApiVersionOdataPersonalDocumentsResponses];\n\nexport type ApiVVersionApiVersionOdataPersonalDocumentsCountData = {\n    body?: never;\n    path?: never;\n    query?: {\n        /**\n         * Limits the properties returned in the result.\n         */\n        select?: string;\n        /**\n         * Indicates the related entities to be represented inline. The maximum depth is 2.\n         */\n        expand?: string;\n        /**\n         * Restricts the set of items returned. The maximum number of expressions is 100. The allowed functions are: allfunctions.\n         */\n        filter?: string;\n        /**\n         * Specifies the order in which items are returned. The maximum number of expressions is 5.\n         */\n        orderby?: string;\n        /**\n         * Limits the number of items returned from a collection. The maximum value is 100.\n         */\n        top?: number;\n        /**\n         * Excludes the specified number of items of the queried collection from the result.\n         */\n        skip?: number;\n        /**\n         * Indicates whether the total count of items within a collection are returned in the result.\n         */\n        count?: boolean;\n    };\n    url: '/api/v1/odata/PersonalDocuments/$count';\n};\n\nexport type ApiVVersionApiVersionOdataPersonalDocumentsCountResponses = {\n    /**\n     * OK\n     */\n    200: Array<DocumentPersonal>;\n};\n\nexport type ApiVVersionApiVersionOdataPersonalDocumentsCountResponse = ApiVVersionApiVersionOdataPersonalDocumentsCountResponses[keyof ApiVVersionApiVersionOdataPersonalDocumentsCountResponses];\n\nexport type PostApiV1RecurringTasksData = {\n    body?: RecurringTaskCreateDto;\n    path?: never;\n    query?: never;\n    url: '/api/v1/recurring-tasks';\n};\n\nexport type PostApiV1RecurringTasksResponses = {\n    /**\n     * OK\n     */\n    200: RecurringTask;\n};\n\nexport type PostApiV1RecurringTasksResponse = PostApiV1RecurringTasksResponses[keyof PostApiV1RecurringTasksResponses];\n\nexport type DeleteApiV1RecurringTasksByIdData = {\n    body?: never;\n    path: {\n        id: number;\n    };\n    query?: never;\n    url: '/api/v1/recurring-tasks/{id}';\n};\n\nexport type DeleteApiV1RecurringTasksByIdResponses = {\n    /**\n     * OK\n     */\n    200: unknown;\n};\n\nexport type PatchApiV1RecurringTasksByIdData = {\n    body?: RecurringTaskUpdateDto;\n    path: {\n        id: number;\n    };\n    query?: never;\n    url: '/api/v1/recurring-tasks/{id}';\n};\n\nexport type PatchApiV1RecurringTasksByIdResponses = {\n    /**\n     * OK\n     */\n    200: RecurringTask;\n};\n\nexport type PatchApiV1RecurringTasksByIdResponse = PatchApiV1RecurringTasksByIdResponses[keyof PatchApiV1RecurringTasksByIdResponses];\n\nexport type ApiVVersionApiVersionOdataRecurringTasksData = {\n    body?: never;\n    path?: never;\n    query?: {\n        /**\n         * Limits the properties returned in the result.\n         */\n        select?: string;\n        /**\n         * Indicates the related entities to be represented inline. The maximum depth is 2.\n         */\n        expand?: string;\n        /**\n         * Restricts the set of items returned. The maximum number of expressions is 100. The allowed functions are: allfunctions.\n         */\n        filter?: string;\n        /**\n         * Specifies the order in which items are returned. The maximum number of expressions is 5.\n         */\n        orderby?: string;\n        /**\n         * Limits the number of items returned from a collection. The maximum value is 100.\n         */\n        top?: number;\n        /**\n         * Excludes the specified number of items of the queried collection from the result.\n         */\n        skip?: number;\n        /**\n         * Indicates whether the total count of items within a collection are returned in the result.\n         */\n        count?: boolean;\n    };\n    url: '/api/v1/odata/RecurringTasks';\n};\n\nexport type ApiVVersionApiVersionOdataRecurringTasksResponses = {\n    /**\n     * OK\n     */\n    200: Array<RecurringTask>;\n};\n\nexport type ApiVVersionApiVersionOdataRecurringTasksResponse = ApiVVersionApiVersionOdataRecurringTasksResponses[keyof ApiVVersionApiVersionOdataRecurringTasksResponses];\n\nexport type ApiVVersionApiVersionOdataRecurringTasksCountData = {\n    body?: never;\n    path?: never;\n    query?: {\n        /**\n         * Limits the properties returned in the result.\n         */\n        select?: string;\n        /**\n         * Indicates the related entities to be represented inline. The maximum depth is 2.\n         */\n        expand?: string;\n        /**\n         * Restricts the set of items returned. The maximum number of expressions is 100. The allowed functions are: allfunctions.\n         */\n        filter?: string;\n        /**\n         * Specifies the order in which items are returned. The maximum number of expressions is 5.\n         */\n        orderby?: string;\n        /**\n         * Limits the number of items returned from a collection. The maximum value is 100.\n         */\n        top?: number;\n        /**\n         * Excludes the specified number of items of the queried collection from the result.\n         */\n        skip?: number;\n        /**\n         * Indicates whether the total count of items within a collection are returned in the result.\n         */\n        count?: boolean;\n    };\n    url: '/api/v1/odata/RecurringTasks/$count';\n};\n\nexport type ApiVVersionApiVersionOdataRecurringTasksCountResponses = {\n    /**\n     * OK\n     */\n    200: Array<RecurringTask>;\n};\n\nexport type ApiVVersionApiVersionOdataRecurringTasksCountResponse = ApiVVersionApiVersionOdataRecurringTasksCountResponses[keyof ApiVVersionApiVersionOdataRecurringTasksCountResponses];\n\nexport type GetData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/';\n};\n\nexport type GetResponses = {\n    /**\n     * OK\n     */\n    200: unknown;\n};\n\nexport type PostApiV1TasksData = {\n    body?: TasksCreateDto;\n    path?: never;\n    query?: never;\n    url: '/api/v1/tasks';\n};\n\nexport type PostApiV1TasksResponses = {\n    /**\n     * OK\n     */\n    200: Array<Task>;\n};\n\nexport type PostApiV1TasksResponse = PostApiV1TasksResponses[keyof PostApiV1TasksResponses];\n\nexport type PutApiV1TasksByIdData = {\n    body?: TaskUpdateDto;\n    path: {\n        id: number;\n    };\n    query?: never;\n    url: '/api/v1/tasks/{id}';\n};\n\nexport type PutApiV1TasksByIdResponses = {\n    /**\n     * OK\n     */\n    200: Task;\n};\n\nexport type PutApiV1TasksByIdResponse = PutApiV1TasksByIdResponses[keyof PutApiV1TasksByIdResponses];\n\nexport type PostApiV1TasksByIdSubmitData = {\n    body?: TaskSubmitDto;\n    path: {\n        id: number;\n    };\n    query?: never;\n    url: '/api/v1/tasks/{id}/submit';\n};\n\nexport type PostApiV1TasksByIdSubmitResponses = {\n    /**\n     * OK\n     */\n    200: Task;\n};\n\nexport type PostApiV1TasksByIdSubmitResponse = PostApiV1TasksByIdSubmitResponses[keyof PostApiV1TasksByIdSubmitResponses];\n\nexport type PostApiV1TasksByIdApproveData = {\n    body?: never;\n    path: {\n        id: number;\n    };\n    query?: never;\n    url: '/api/v1/tasks/{id}/approve';\n};\n\nexport type PostApiV1TasksByIdApproveResponses = {\n    /**\n     * OK\n     */\n    200: Task;\n};\n\nexport type PostApiV1TasksByIdApproveResponse = PostApiV1TasksByIdApproveResponses[keyof PostApiV1TasksByIdApproveResponses];\n\nexport type PostApiV1TasksByIdRejectData = {\n    body?: TaskRejectDto;\n    path: {\n        id: number;\n    };\n    query?: never;\n    url: '/api/v1/tasks/{id}/reject';\n};\n\nexport type PostApiV1TasksByIdRejectResponses = {\n    /**\n     * OK\n     */\n    200: Task;\n};\n\nexport type PostApiV1TasksByIdRejectResponse = PostApiV1TasksByIdRejectResponses[keyof PostApiV1TasksByIdRejectResponses];\n\nexport type GetApiV1TasksByIdCommentsData = {\n    body?: never;\n    path: {\n        id: number;\n    };\n    query?: never;\n    url: '/api/v1/tasks/{id}/comments';\n};\n\nexport type GetApiV1TasksByIdCommentsResponses = {\n    /**\n     * OK\n     */\n    200: Array<TaskComment>;\n};\n\nexport type GetApiV1TasksByIdCommentsResponse = GetApiV1TasksByIdCommentsResponses[keyof GetApiV1TasksByIdCommentsResponses];\n\nexport type GetApiV1TasksByIdDocumentsData = {\n    body?: never;\n    path: {\n        id: number;\n    };\n    query?: never;\n    url: '/api/v1/tasks/{id}/documents';\n};\n\nexport type GetApiV1TasksByIdDocumentsResponses = {\n    /**\n     * OK\n     */\n    200: Array<DocumentBusiness>;\n};\n\nexport type GetApiV1TasksByIdDocumentsResponse = GetApiV1TasksByIdDocumentsResponses[keyof GetApiV1TasksByIdDocumentsResponses];\n\nexport type ApiVVersionApiVersionOdataTasksData = {\n    body?: never;\n    path?: never;\n    query?: {\n        accountants?: Array<number>;\n        /**\n         * Limits the properties returned in the result.\n         */\n        select?: string;\n        /**\n         * Indicates the related entities to be represented inline. The maximum depth is 2.\n         */\n        expand?: string;\n        /**\n         * Restricts the set of items returned. The maximum number of expressions is 100. The allowed functions are: allfunctions.\n         */\n        filter?: string;\n        /**\n         * Specifies the order in which items are returned. The maximum number of expressions is 5.\n         */\n        orderby?: string;\n        /**\n         * Limits the number of items returned from a collection. The maximum value is 100.\n         */\n        top?: number;\n        /**\n         * Excludes the specified number of items of the queried collection from the result.\n         */\n        skip?: number;\n        /**\n         * Indicates whether the total count of items within a collection are returned in the result.\n         */\n        count?: boolean;\n    };\n    url: '/api/v1/odata/Tasks';\n};\n\nexport type ApiVVersionApiVersionOdataTasksResponses = {\n    /**\n     * OK\n     */\n    200: Array<Task>;\n};\n\nexport type ApiVVersionApiVersionOdataTasksResponse = ApiVVersionApiVersionOdataTasksResponses[keyof ApiVVersionApiVersionOdataTasksResponses];\n\nexport type ApiVVersionApiVersionOdataTasksCountData = {\n    body?: never;\n    path?: never;\n    query?: {\n        accountants?: Array<number>;\n        /**\n         * Limits the properties returned in the result.\n         */\n        select?: string;\n        /**\n         * Indicates the related entities to be represented inline. The maximum depth is 2.\n         */\n        expand?: string;\n        /**\n         * Restricts the set of items returned. The maximum number of expressions is 100. The allowed functions are: allfunctions.\n         */\n        filter?: string;\n        /**\n         * Specifies the order in which items are returned. The maximum number of expressions is 5.\n         */\n        orderby?: string;\n        /**\n         * Limits the number of items returned from a collection. The maximum value is 100.\n         */\n        top?: number;\n        /**\n         * Excludes the specified number of items of the queried collection from the result.\n         */\n        skip?: number;\n        /**\n         * Indicates whether the total count of items within a collection are returned in the result.\n         */\n        count?: boolean;\n    };\n    url: '/api/v1/odata/Tasks/$count';\n};\n\nexport type ApiVVersionApiVersionOdataTasksCountResponses = {\n    /**\n     * OK\n     */\n    200: Array<Task>;\n};\n\nexport type ApiVVersionApiVersionOdataTasksCountResponse = ApiVVersionApiVersionOdataTasksCountResponses[keyof ApiVVersionApiVersionOdataTasksCountResponses];\n\nexport type ApiVVersionApiVersionOdataTasksKeyData = {\n    body?: never;\n    path?: never;\n    query?: {\n        key?: number;\n        /**\n         * Limits the properties returned in the result.\n         */\n        select?: string;\n        /**\n         * Indicates the related entities to be represented inline. The maximum depth is 2.\n         */\n        expand?: string;\n    };\n    url: '/api/v1/odata/Tasks({key})';\n};\n\nexport type ApiVVersionApiVersionOdataTasksKeyResponses = {\n    /**\n     * OK\n     */\n    200: Task;\n};\n\nexport type ApiVVersionApiVersionOdataTasksKeyResponse = ApiVVersionApiVersionOdataTasksKeyResponses[keyof ApiVVersionApiVersionOdataTasksKeyResponses];\n\nexport type ApiVVersionApiVersionOdataTasksKey2Data = {\n    body?: never;\n    path?: never;\n    query?: {\n        key?: number;\n        /**\n         * Limits the properties returned in the result.\n         */\n        select?: string;\n        /**\n         * Indicates the related entities to be represented inline. The maximum depth is 2.\n         */\n        expand?: string;\n    };\n    url: '/api/v1/odata/Tasks/{key}';\n};\n\nexport type ApiVVersionApiVersionOdataTasksKey2Responses = {\n    /**\n     * OK\n     */\n    200: Task;\n};\n\nexport type ApiVVersionApiVersionOdataTasksKey2Response = ApiVVersionApiVersionOdataTasksKey2Responses[keyof ApiVVersionApiVersionOdataTasksKey2Responses];\n\nexport type PostApiV1UserRegisterData = {\n    body: RegisterRequest;\n    path?: never;\n    query?: never;\n    url: '/api/v1/user/register';\n};\n\nexport type PostApiV1UserRegisterErrors = {\n    /**\n     * Bad Request\n     */\n    400: HttpValidationProblemDetails;\n};\n\nexport type PostApiV1UserRegisterError = PostApiV1UserRegisterErrors[keyof PostApiV1UserRegisterErrors];\n\nexport type PostApiV1UserRegisterResponses = {\n    /**\n     * OK\n     */\n    200: unknown;\n};\n\nexport type PostApiV1UserLoginData = {\n    body: LoginRequest;\n    path?: never;\n    query?: {\n        useCookies?: boolean;\n        useSessionCookies?: boolean;\n    };\n    url: '/api/v1/user/login';\n};\n\nexport type PostApiV1UserLoginResponses = {\n    /**\n     * OK\n     */\n    200: AccessTokenResponse;\n};\n\nexport type PostApiV1UserLoginResponse = PostApiV1UserLoginResponses[keyof PostApiV1UserLoginResponses];\n\nexport type PostApiV1UserRefreshData = {\n    body: RefreshRequest;\n    path?: never;\n    query?: never;\n    url: '/api/v1/user/refresh';\n};\n\nexport type PostApiV1UserRefreshResponses = {\n    /**\n     * OK\n     */\n    200: AccessTokenResponse;\n};\n\nexport type PostApiV1UserRefreshResponse = PostApiV1UserRefreshResponses[keyof PostApiV1UserRefreshResponses];\n\nexport type MapIdentityApiApiVVersionApiVersionUserConfirmEmailData = {\n    body?: never;\n    path?: never;\n    query: {\n        userId: string;\n        code: string;\n        changedEmail?: string;\n    };\n    url: '/api/v1/user/confirmEmail';\n};\n\nexport type MapIdentityApiApiVVersionApiVersionUserConfirmEmailResponses = {\n    /**\n     * OK\n     */\n    200: unknown;\n};\n\nexport type PostApiV1UserResendConfirmationEmailData = {\n    body: ResendConfirmationEmailRequest;\n    path?: never;\n    query?: never;\n    url: '/api/v1/user/resendConfirmationEmail';\n};\n\nexport type PostApiV1UserResendConfirmationEmailResponses = {\n    /**\n     * OK\n     */\n    200: unknown;\n};\n\nexport type PostApiV1UserForgotPasswordData = {\n    body: ForgotPasswordRequest;\n    path?: never;\n    query?: never;\n    url: '/api/v1/user/forgotPassword';\n};\n\nexport type PostApiV1UserForgotPasswordErrors = {\n    /**\n     * Bad Request\n     */\n    400: HttpValidationProblemDetails;\n};\n\nexport type PostApiV1UserForgotPasswordError = PostApiV1UserForgotPasswordErrors[keyof PostApiV1UserForgotPasswordErrors];\n\nexport type PostApiV1UserForgotPasswordResponses = {\n    /**\n     * OK\n     */\n    200: unknown;\n};\n\nexport type PostApiV1UserResetPasswordData = {\n    body: ResetPasswordRequest;\n    path?: never;\n    query?: never;\n    url: '/api/v1/user/resetPassword';\n};\n\nexport type PostApiV1UserResetPasswordErrors = {\n    /**\n     * Bad Request\n     */\n    400: HttpValidationProblemDetails;\n};\n\nexport type PostApiV1UserResetPasswordError = PostApiV1UserResetPasswordErrors[keyof PostApiV1UserResetPasswordErrors];\n\nexport type PostApiV1UserResetPasswordResponses = {\n    /**\n     * OK\n     */\n    200: unknown;\n};\n\nexport type PostApiV1UserManage2FaData = {\n    body: TwoFactorRequest;\n    path?: never;\n    query?: never;\n    url: '/api/v1/user/manage/2fa';\n};\n\nexport type PostApiV1UserManage2FaErrors = {\n    /**\n     * Bad Request\n     */\n    400: HttpValidationProblemDetails;\n    /**\n     * Not Found\n     */\n    404: unknown;\n};\n\nexport type PostApiV1UserManage2FaError = PostApiV1UserManage2FaErrors[keyof PostApiV1UserManage2FaErrors];\n\nexport type PostApiV1UserManage2FaResponses = {\n    /**\n     * OK\n     */\n    200: TwoFactorResponse;\n};\n\nexport type PostApiV1UserManage2FaResponse = PostApiV1UserManage2FaResponses[keyof PostApiV1UserManage2FaResponses];\n\nexport type GetApiV1UserManageInfoData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v1/user/manage/info';\n};\n\nexport type GetApiV1UserManageInfoErrors = {\n    /**\n     * Bad Request\n     */\n    400: HttpValidationProblemDetails;\n    /**\n     * Not Found\n     */\n    404: unknown;\n};\n\nexport type GetApiV1UserManageInfoError = GetApiV1UserManageInfoErrors[keyof GetApiV1UserManageInfoErrors];\n\nexport type GetApiV1UserManageInfoResponses = {\n    /**\n     * OK\n     */\n    200: InfoResponse;\n};\n\nexport type GetApiV1UserManageInfoResponse = GetApiV1UserManageInfoResponses[keyof GetApiV1UserManageInfoResponses];\n\nexport type PostApiV1UserManageInfoData = {\n    body: InfoRequest;\n    path?: never;\n    query?: never;\n    url: '/api/v1/user/manage/info';\n};\n\nexport type PostApiV1UserManageInfoErrors = {\n    /**\n     * Bad Request\n     */\n    400: HttpValidationProblemDetails;\n    /**\n     * Not Found\n     */\n    404: unknown;\n};\n\nexport type PostApiV1UserManageInfoError = PostApiV1UserManageInfoErrors[keyof PostApiV1UserManageInfoErrors];\n\nexport type PostApiV1UserManageInfoResponses = {\n    /**\n     * OK\n     */\n    200: InfoResponse;\n};\n\nexport type PostApiV1UserManageInfoResponse = PostApiV1UserManageInfoResponses[keyof PostApiV1UserManageInfoResponses];\n\nexport type PostApiV1UserLogoutData = {\n    body?: unknown;\n    path?: never;\n    query?: never;\n    url: '/api/v1/user/logout';\n};\n\nexport type PostApiV1UserLogoutResponses = {\n    /**\n     * OK\n     */\n    200: unknown;\n};\n\nexport type GetApiV1UserDocumentsSummaryData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v1/user/documents-summary';\n};\n\nexport type GetApiV1UserDocumentsSummaryResponses = {\n    /**\n     * OK\n     */\n    200: PersonalDocumentsSummary;\n};\n\nexport type GetApiV1UserDocumentsSummaryResponse = GetApiV1UserDocumentsSummaryResponses[keyof GetApiV1UserDocumentsSummaryResponses];\n\nexport type DeleteApiV1UserData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v1/user';\n};\n\nexport type DeleteApiV1UserResponses = {\n    /**\n     * OK\n     */\n    200: unknown;\n};\n\nexport type GetApiV1UsersMeData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v1/users/me';\n};\n\nexport type GetApiV1UsersMeResponses = {\n    /**\n     * OK\n     */\n    200: User;\n};\n\nexport type GetApiV1UsersMeResponse = GetApiV1UsersMeResponses[keyof GetApiV1UsersMeResponses];\n\nexport type PatchApiV1UsersByIdData = {\n    body?: UserUpdateDto;\n    path: {\n        id: number;\n    };\n    query?: never;\n    url: '/api/v1/users/{id}';\n};\n\nexport type PatchApiV1UsersByIdResponses = {\n    /**\n     * OK\n     */\n    200: User;\n};\n\nexport type PatchApiV1UsersByIdResponse = PatchApiV1UsersByIdResponses[keyof PatchApiV1UsersByIdResponses];\n"
  },
  {
    "path": "packages/openapi-ts-tests/sdks/__snapshots__/method-class-conflict/flat/client/client.gen.ts",
    "content": "// 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 (options: RequestOptions) => {\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 url = buildUrl(opts);\n\n    return { opts, url };\n  };\n\n  const request: Client['request'] = async (options) => {\n    // @ts-expect-error\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"
  },
  {
    "path": "packages/openapi-ts-tests/sdks/__snapshots__/method-class-conflict/flat/client/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type { Auth } from '../core/auth.gen';\nexport type { QuerySerializerOptions } from '../core/bodySerializer.gen';\nexport {\n  formDataBodySerializer,\n  jsonBodySerializer,\n  urlSearchParamsBodySerializer,\n} from '../core/bodySerializer.gen';\nexport { buildClientParams } from '../core/params.gen';\nexport { serializeQueryKeyValue } from '../core/queryKeySerializer.gen';\nexport { createClient } from './client.gen';\nexport type {\n  Client,\n  ClientOptions,\n  Config,\n  CreateClientConfig,\n  Options,\n  RequestOptions,\n  RequestResult,\n  ResolvedRequestOptions,\n  ResponseStyle,\n  TDataShape,\n} from './types.gen';\nexport { createConfig, mergeHeaders } from './utils.gen';\n"
  },
  {
    "path": "packages/openapi-ts-tests/sdks/__snapshots__/method-class-conflict/flat/client/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { Auth } from '../core/auth.gen';\nimport type {\n  ServerSentEventsOptions,\n  ServerSentEventsResult,\n} from '../core/serverSentEvents.gen';\nimport type { Client as CoreClient, Config as CoreConfig } from '../core/types.gen';\nimport type { Middleware } from './utils.gen';\n\nexport type ResponseStyle = 'data' | 'fields';\n\nexport interface Config<T extends ClientOptions = ClientOptions>\n  extends Omit<RequestInit, 'body' | 'headers' | 'method'>, CoreConfig {\n  /**\n   * Base URL for all requests made by this client.\n   */\n  baseUrl?: T['baseUrl'];\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   * Please don't use the Fetch client for Next.js applications. The `next`\n   * options won't have any effect.\n   *\n   * Install {@link https://www.npmjs.com/package/@hey-api/client-next `@hey-api/client-next`} instead.\n   */\n  next?: never;\n  /**\n   * Return the response data parsed in a specified format. By default, `auto`\n   * will infer the appropriate method from the `Content-Type` response header.\n   * You can override this behavior with any of the {@link Body} methods.\n   * Select `stream` if you don't want to parse response data at all.\n   *\n   * @default 'auto'\n   */\n  parseAs?: 'arrayBuffer' | 'auto' | 'blob' | 'formData' | 'json' | 'stream' | 'text';\n  /**\n   * Should we return only data or multiple fields (data, error, response, etc.)?\n   *\n   * @default 'fields'\n   */\n  responseStyle?: ResponseStyle;\n  /**\n   * Throw an error instead of returning it in the response?\n   *\n   * @default false\n   */\n  throwOnError?: T['throwOnError'];\n}\n\nexport interface RequestOptions<\n  TData = unknown,\n  TResponseStyle extends ResponseStyle = 'fields',\n  ThrowOnError extends boolean = boolean,\n  Url extends string = string,\n>\n  extends\n    Config<{\n      responseStyle: TResponseStyle;\n      throwOnError: ThrowOnError;\n    }>,\n    Pick<\n      ServerSentEventsOptions<TData>,\n      | 'onRequest'\n      | 'onSseError'\n      | 'onSseEvent'\n      | 'sseDefaultRetryDelay'\n      | 'sseMaxRetryAttempts'\n      | 'sseMaxRetryDelay'\n    > {\n  /**\n   * Any body that you want to add to your request.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/fetch#body}\n   */\n  body?: unknown;\n  path?: Record<string, unknown>;\n  query?: Record<string, unknown>;\n  /**\n   * Security mechanism(s) to use for the request.\n   */\n  security?: ReadonlyArray<Auth>;\n  url: Url;\n}\n\nexport interface ResolvedRequestOptions<\n  TResponseStyle extends ResponseStyle = 'fields',\n  ThrowOnError extends boolean = boolean,\n  Url extends string = string,\n> extends RequestOptions<unknown, TResponseStyle, ThrowOnError, Url> {\n  serializedBody?: string;\n}\n\nexport type RequestResult<\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = boolean,\n  TResponseStyle extends ResponseStyle = 'fields',\n> = ThrowOnError extends true\n  ? Promise<\n      TResponseStyle extends 'data'\n        ? TData extends Record<string, unknown>\n          ? TData[keyof TData]\n          : TData\n        : {\n            data: TData extends Record<string, unknown> ? TData[keyof TData] : TData;\n            request: Request;\n            response: Response;\n          }\n    >\n  : Promise<\n      TResponseStyle extends 'data'\n        ? (TData extends Record<string, unknown> ? TData[keyof TData] : TData) | undefined\n        : (\n            | {\n                data: TData extends Record<string, unknown> ? TData[keyof TData] : TData;\n                error: undefined;\n              }\n            | {\n                data: undefined;\n                error: TError extends Record<string, unknown> ? TError[keyof TError] : TError;\n              }\n          ) & {\n            request: Request;\n            response: Response;\n          }\n    >;\n\nexport interface ClientOptions {\n  baseUrl?: string;\n  responseStyle?: ResponseStyle;\n  throwOnError?: boolean;\n}\n\ntype MethodFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'>,\n) => RequestResult<TData, TError, ThrowOnError, TResponseStyle>;\n\ntype SseFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'>,\n) => Promise<ServerSentEventsResult<TData, TError>>;\n\ntype RequestFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'> &\n    Pick<Required<RequestOptions<TData, TResponseStyle, ThrowOnError>>, 'method'>,\n) => RequestResult<TData, TError, ThrowOnError, TResponseStyle>;\n\ntype BuildUrlFn = <\n  TData extends {\n    body?: unknown;\n    path?: Record<string, unknown>;\n    query?: Record<string, unknown>;\n    url: string;\n  },\n>(\n  options: TData & Options<TData>,\n) => string;\n\nexport type Client = CoreClient<RequestFn, Config, MethodFn, BuildUrlFn, SseFn> & {\n  interceptors: Middleware<Request, Response, unknown, ResolvedRequestOptions>;\n};\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 = ClientOptions> = (\n  override?: Config<ClientOptions & T>,\n) => Config<Required<ClientOptions> & T>;\n\nexport interface TDataShape {\n  body?: unknown;\n  headers?: unknown;\n  path?: unknown;\n  query?: unknown;\n  url: string;\n}\n\ntype OmitKeys<T, K> = Pick<T, Exclude<keyof T, K>>;\n\nexport type Options<\n  TData extends TDataShape = TDataShape,\n  ThrowOnError extends boolean = boolean,\n  TResponse = unknown,\n  TResponseStyle extends ResponseStyle = 'fields',\n> = OmitKeys<\n  RequestOptions<TResponse, TResponseStyle, ThrowOnError>,\n  'body' | 'path' | 'query' | 'url'\n> &\n  ([TData] extends [never] ? unknown : Omit<TData, 'url'>);\n"
  },
  {
    "path": "packages/openapi-ts-tests/sdks/__snapshots__/method-class-conflict/flat/client/utils.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/sdks/__snapshots__/method-class-conflict/flat/client.gen.ts",
    "content": "// 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>());\n"
  },
  {
    "path": "packages/openapi-ts-tests/sdks/__snapshots__/method-class-conflict/flat/core/auth.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/sdks/__snapshots__/method-class-conflict/flat/core/bodySerializer.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/sdks/__snapshots__/method-class-conflict/flat/core/params.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/sdks/__snapshots__/method-class-conflict/flat/core/pathSerializer.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/sdks/__snapshots__/method-class-conflict/flat/core/queryKeySerializer.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\n/**\n * JSON-friendly union that mirrors what Pinia Colada can hash.\n */\nexport type JsonValue =\n  | null\n  | string\n  | number\n  | boolean\n  | JsonValue[]\n  | { [key: string]: JsonValue };\n\n/**\n * Replacer that converts non-JSON values (bigint, Date, etc.) to safe substitutes.\n */\nexport const queryKeyJsonReplacer = (_key: string, value: unknown) => {\n  if (value === undefined || typeof value === 'function' || typeof value === 'symbol') {\n    return undefined;\n  }\n  if (typeof value === 'bigint') {\n    return value.toString();\n  }\n  if (value instanceof Date) {\n    return value.toISOString();\n  }\n  return value;\n};\n\n/**\n * Safely stringifies a value and parses it back into a JsonValue.\n */\nexport const stringifyToJsonValue = (input: unknown): JsonValue | undefined => {\n  try {\n    const json = JSON.stringify(input, queryKeyJsonReplacer);\n    if (json === undefined) {\n      return undefined;\n    }\n    return JSON.parse(json) as JsonValue;\n  } catch {\n    return undefined;\n  }\n};\n\n/**\n * Detects plain objects (including objects with a null prototype).\n */\nconst isPlainObject = (value: unknown): value is Record<string, unknown> => {\n  if (value === null || typeof value !== 'object') {\n    return false;\n  }\n  const prototype = Object.getPrototypeOf(value as object);\n  return prototype === Object.prototype || prototype === null;\n};\n\n/**\n * Turns URLSearchParams into a sorted JSON object for deterministic keys.\n */\nconst serializeSearchParams = (params: URLSearchParams): JsonValue => {\n  const entries = Array.from(params.entries()).sort(([a], [b]) => a.localeCompare(b));\n  const result: Record<string, JsonValue> = {};\n\n  for (const [key, value] of entries) {\n    const existing = result[key];\n    if (existing === undefined) {\n      result[key] = value;\n      continue;\n    }\n\n    if (Array.isArray(existing)) {\n      (existing as string[]).push(value);\n    } else {\n      result[key] = [existing, value];\n    }\n  }\n\n  return result;\n};\n\n/**\n * Normalizes any accepted value into a JSON-friendly shape for query keys.\n */\nexport const serializeQueryKeyValue = (value: unknown): JsonValue | undefined => {\n  if (value === null) {\n    return null;\n  }\n\n  if (typeof value === 'string' || typeof value === 'number' || typeof value === 'boolean') {\n    return value;\n  }\n\n  if (value === undefined || typeof value === 'function' || typeof value === 'symbol') {\n    return undefined;\n  }\n\n  if (typeof value === 'bigint') {\n    return value.toString();\n  }\n\n  if (value instanceof Date) {\n    return value.toISOString();\n  }\n\n  if (Array.isArray(value)) {\n    return stringifyToJsonValue(value);\n  }\n\n  if (typeof URLSearchParams !== 'undefined' && value instanceof URLSearchParams) {\n    return serializeSearchParams(value);\n  }\n\n  if (isPlainObject(value)) {\n    return stringifyToJsonValue(value);\n  }\n\n  return undefined;\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/sdks/__snapshots__/method-class-conflict/flat/core/serverSentEvents.gen.ts",
    "content": "// 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 const 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            // Normalize line endings: CRLF -> LF, then CR -> LF\n            buffer = buffer.replace(/\\r\\n/g, '\\n').replace(/\\r/g, '\\n');\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"
  },
  {
    "path": "packages/openapi-ts-tests/sdks/__snapshots__/method-class-conflict/flat/core/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { Auth, AuthToken } from './auth.gen';\nimport type { BodySerializer, QuerySerializer, QuerySerializerOptions } from './bodySerializer.gen';\n\nexport type HttpMethod =\n  | 'connect'\n  | 'delete'\n  | 'get'\n  | 'head'\n  | 'options'\n  | 'patch'\n  | 'post'\n  | 'put'\n  | 'trace';\n\nexport type Client<\n  RequestFn = never,\n  Config = unknown,\n  MethodFn = never,\n  BuildUrlFn = never,\n  SseFn = never,\n> = {\n  /**\n   * Returns the final request URL.\n   */\n  buildUrl: BuildUrlFn;\n  getConfig: () => Config;\n  request: RequestFn;\n  setConfig: (config: Config) => Config;\n} & {\n  [K in HttpMethod]: MethodFn;\n} & ([SseFn] extends [never] ? { sse?: never } : { sse: { [K in HttpMethod]: SseFn } });\n\nexport interface Config {\n  /**\n   * Auth token or a function returning auth token. The resolved value will be\n   * added to the request payload as defined by its `security` array.\n   */\n  auth?: ((auth: Auth) => Promise<AuthToken> | AuthToken) | AuthToken;\n  /**\n   * A function for serializing request body parameter. By default,\n   * {@link JSON.stringify()} will be used.\n   */\n  bodySerializer?: BodySerializer | null;\n  /**\n   * An object containing any HTTP headers that you want to pre-populate your\n   * `Headers` object with.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/Headers/Headers#init See more}\n   */\n  headers?:\n    | RequestInit['headers']\n    | Record<\n        string,\n        string | number | boolean | (string | number | boolean)[] | null | undefined | unknown\n      >;\n  /**\n   * The request method.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/fetch#method See more}\n   */\n  method?: Uppercase<HttpMethod>;\n  /**\n   * A function for serializing request query parameters. By default, arrays\n   * will be exploded in form style, objects will be exploded in deepObject\n   * style, and reserved characters are percent-encoded.\n   *\n   * This method will have no effect if the native `paramsSerializer()` Axios\n   * API function is used.\n   *\n   * {@link https://swagger.io/docs/specification/serialization/#query View examples}\n   */\n  querySerializer?: QuerySerializer | QuerySerializerOptions;\n  /**\n   * A function validating request data. This is useful if you want to ensure\n   * the request conforms to the desired shape, so it can be safely sent to\n   * the server.\n   */\n  requestValidator?: (data: unknown) => Promise<unknown>;\n  /**\n   * A function transforming response data before it's returned. This is useful\n   * for post-processing data, e.g. converting ISO strings into Date objects.\n   */\n  responseTransformer?: (data: unknown) => Promise<unknown>;\n  /**\n   * A function validating response data. This is useful if you want to ensure\n   * the response conforms to the desired shape, so it can be safely passed to\n   * the transformers and returned to the user.\n   */\n  responseValidator?: (data: unknown) => Promise<unknown>;\n}\n\ntype IsExactlyNeverOrNeverUndefined<T> = [T] extends [never]\n  ? true\n  : [T] extends [never | undefined]\n    ? [undefined] extends [T]\n      ? false\n      : true\n    : false;\n\nexport type OmitNever<T extends Record<string, unknown>> = {\n  [K in keyof T as IsExactlyNeverOrNeverUndefined<T[K]> extends true ? never : K]: T[K];\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/sdks/__snapshots__/method-class-conflict/flat/core/utils.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/sdks/__snapshots__/method-class-conflict/flat/sdk.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport { type Client, formDataBodySerializer, type Options as Options2, type TDataShape } from './client';\nimport { client } from './client.gen';\nimport type { ApiVVersionApiVersionOdataAccountingCompaniesCountData, ApiVVersionApiVersionOdataAccountingCompaniesCountResponses, ApiVVersionApiVersionOdataAccountingCompaniesData, ApiVVersionApiVersionOdataAccountingCompaniesResponses, ApiVVersionApiVersionOdataAccountingCompanyMembershipsCountData, ApiVVersionApiVersionOdataAccountingCompanyMembershipsCountResponses, ApiVVersionApiVersionOdataAccountingCompanyMembershipsData, ApiVVersionApiVersionOdataAccountingCompanyMembershipsResponses, ApiVVersionApiVersionOdataBankAccountsCountData, ApiVVersionApiVersionOdataBankAccountsCountResponses, ApiVVersionApiVersionOdataBankAccountsData, ApiVVersionApiVersionOdataBankAccountsResponses, ApiVVersionApiVersionOdataBusinessAccountantAssignmentsCountData, ApiVVersionApiVersionOdataBusinessAccountantAssignmentsCountResponses, ApiVVersionApiVersionOdataBusinessAccountantAssignmentsData, ApiVVersionApiVersionOdataBusinessAccountantAssignmentsResponses, ApiVVersionApiVersionOdataBusinessDocumentActivitiesCountData, ApiVVersionApiVersionOdataBusinessDocumentActivitiesCountResponses, ApiVVersionApiVersionOdataBusinessDocumentActivitiesData, ApiVVersionApiVersionOdataBusinessDocumentActivitiesResponses, ApiVVersionApiVersionOdataBusinessDocumentsCountData, ApiVVersionApiVersionOdataBusinessDocumentsCountResponses, ApiVVersionApiVersionOdataBusinessDocumentsData, ApiVVersionApiVersionOdataBusinessDocumentsResponses, ApiVVersionApiVersionOdataBusinessDocumentsSummariesCountData, ApiVVersionApiVersionOdataBusinessDocumentsSummariesCountResponses, ApiVVersionApiVersionOdataBusinessDocumentsSummariesData, ApiVVersionApiVersionOdataBusinessDocumentsSummariesResponses, ApiVVersionApiVersionOdataBusinessesCountData, ApiVVersionApiVersionOdataBusinessesCountResponses, ApiVVersionApiVersionOdataBusinessesData, ApiVVersionApiVersionOdataBusinessesKey2Data, ApiVVersionApiVersionOdataBusinessesKey2Responses, ApiVVersionApiVersionOdataBusinessesKeyData, ApiVVersionApiVersionOdataBusinessesKeyResponses, ApiVVersionApiVersionOdataBusinessesResponses, ApiVVersionApiVersionOdataBusinessSummariesCountData, ApiVVersionApiVersionOdataBusinessSummariesCountResponses, ApiVVersionApiVersionOdataBusinessSummariesData, ApiVVersionApiVersionOdataBusinessSummariesResponses, ApiVVersionApiVersionOdataCounterpartiesCountData, ApiVVersionApiVersionOdataCounterpartiesCountResponses, ApiVVersionApiVersionOdataCounterpartiesData, ApiVVersionApiVersionOdataCounterpartiesResponses, ApiVVersionApiVersionOdataDataBoxCredentialsCountData, ApiVVersionApiVersionOdataDataBoxCredentialsCountResponses, ApiVVersionApiVersionOdataDataBoxCredentialsData, ApiVVersionApiVersionOdataDataBoxCredentialsResponses, ApiVVersionApiVersionOdataDocumentTypesCountData, ApiVVersionApiVersionOdataDocumentTypesCountResponses, ApiVVersionApiVersionOdataDocumentTypesData, ApiVVersionApiVersionOdataDocumentTypesResponses, ApiVVersionApiVersionOdataInvitationsCountData, ApiVVersionApiVersionOdataInvitationsCountResponses, ApiVVersionApiVersionOdataInvitationsData, ApiVVersionApiVersionOdataInvitationsResponses, ApiVVersionApiVersionOdataInvoicesCountData, ApiVVersionApiVersionOdataInvoicesCountResponses, ApiVVersionApiVersionOdataInvoicesData, ApiVVersionApiVersionOdataInvoiceSettingsCountData, ApiVVersionApiVersionOdataInvoiceSettingsCountResponses, ApiVVersionApiVersionOdataInvoiceSettingsData, ApiVVersionApiVersionOdataInvoiceSettingsResponses, ApiVVersionApiVersionOdataInvoicesResponses, ApiVVersionApiVersionOdataLicensesCountData, ApiVVersionApiVersionOdataLicensesCountResponses, ApiVVersionApiVersionOdataLicensesData, ApiVVersionApiVersionOdataLicensesResponses, ApiVVersionApiVersionOdataPersonalDocumentsCountData, ApiVVersionApiVersionOdataPersonalDocumentsCountResponses, ApiVVersionApiVersionOdataPersonalDocumentsData, ApiVVersionApiVersionOdataPersonalDocumentsResponses, ApiVVersionApiVersionOdataRecurringTasksCountData, ApiVVersionApiVersionOdataRecurringTasksCountResponses, ApiVVersionApiVersionOdataRecurringTasksData, ApiVVersionApiVersionOdataRecurringTasksResponses, ApiVVersionApiVersionOdataTasksCountData, ApiVVersionApiVersionOdataTasksCountResponses, ApiVVersionApiVersionOdataTasksData, ApiVVersionApiVersionOdataTasksKey2Data, ApiVVersionApiVersionOdataTasksKey2Responses, ApiVVersionApiVersionOdataTasksKeyData, ApiVVersionApiVersionOdataTasksKeyResponses, ApiVVersionApiVersionOdataTasksResponses, DeleteApiV1AccountingCompaniesByIdData, DeleteApiV1AccountingCompaniesByIdResponses, DeleteApiV1AccountingCompanyMembershipsByIdData, DeleteApiV1AccountingCompanyMembershipsByIdResponses, DeleteApiV1BankAccountsByIdData, DeleteApiV1BankAccountsByIdResponses, DeleteApiV1BusinessAccountantAssignmentsByIdData, DeleteApiV1BusinessAccountantAssignmentsByIdResponses, DeleteApiV1BusinessDocumentsByIdData, DeleteApiV1BusinessDocumentsByIdResponses, DeleteApiV1BusinessesByIdData, DeleteApiV1BusinessesByIdResponses, DeleteApiV1CounterpartiesByIdData, DeleteApiV1CounterpartiesByIdResponses, DeleteApiV1DataBoxCredentialsByIdData, DeleteApiV1DataBoxCredentialsByIdResponses, DeleteApiV1InvitationsByIdData, DeleteApiV1InvitationsByIdResponses, DeleteApiV1InvoicesByIdData, DeleteApiV1InvoicesByIdResponses, DeleteApiV1NotificationsDeviceTokensData, DeleteApiV1NotificationsDeviceTokensResponses, DeleteApiV1PersonalDocumentsByIdData, DeleteApiV1PersonalDocumentsByIdResponses, DeleteApiV1RecurringTasksByIdData, DeleteApiV1RecurringTasksByIdResponses, DeleteApiV1UserData, DeleteApiV1UserResponses, GetApiDevConfirmEmailData, GetApiDevConfirmEmailResponses, GetApiDevData, GetApiDevDbCreateData, GetApiDevDbCreateResponses, GetApiDevDbReset2Data, GetApiDevDbReset2Responses, GetApiDevDbResetData, GetApiDevDbResetResponses, GetApiDevDbTouchData, GetApiDevDbTouchResponses, GetApiDevEmailSendTestData, GetApiDevEmailSendTestResponses, GetApiDevJobProcessRecurringTasksData, GetApiDevJobProcessRecurringTasksResponses, GetApiDevNotificationsSendTestData, GetApiDevNotificationsSendTestResponses, GetApiDevReseedDbData, GetApiDevReseedDbResponses, GetApiDevResponses, GetApiDevSeedAllData, GetApiDevSeedAllResponses, GetApiDevSeedData, GetApiDevSeedProdData, GetApiDevSeedProdResponses, GetApiDevSeedResponses, GetApiV1BusinessDocumentsByIdRawData, GetApiV1BusinessDocumentsByIdRawResponses, GetApiV1BusinessesByIdDocumentTypesSummaryData, GetApiV1BusinessesByIdDocumentTypesSummaryResponses, GetApiV1InvoicesByIdPreviewData, GetApiV1InvoicesByIdPreviewResponses, GetApiV1PersonalDocumentsByIdRawData, GetApiV1PersonalDocumentsByIdRawResponses, GetApiV1PersonalDocumentsSummaryData, GetApiV1PersonalDocumentsSummaryResponses, GetApiV1TasksByIdCommentsData, GetApiV1TasksByIdCommentsResponses, GetApiV1TasksByIdDocumentsData, GetApiV1TasksByIdDocumentsResponses, GetApiV1UserDocumentsSummaryData, GetApiV1UserDocumentsSummaryResponses, GetApiV1UserManageInfoData, GetApiV1UserManageInfoErrors, GetApiV1UserManageInfoResponses, GetApiV1UsersMeData, GetApiV1UsersMeResponses, GetData, GetResponses, MapIdentityApiApiVVersionApiVersionUserConfirmEmailData, MapIdentityApiApiVVersionApiVersionUserConfirmEmailResponses, PatchApiV1CounterpartiesByIdData, PatchApiV1CounterpartiesByIdResponses, PatchApiV1InvitationsByIdData, PatchApiV1InvitationsByIdResponses, PatchApiV1InvoicesByIdData, PatchApiV1InvoicesByIdResponses, PatchApiV1RecurringTasksByIdData, PatchApiV1RecurringTasksByIdResponses, PatchApiV1UsersByIdData, PatchApiV1UsersByIdResponses, PostApiV1AccountingCompaniesByIdData, PostApiV1AccountingCompaniesByIdResponses, PostApiV1AccountingCompaniesData, PostApiV1AccountingCompaniesResponses, PostApiV1BusinessDocumentsByIdApproveData, PostApiV1BusinessDocumentsByIdApproveResponses, PostApiV1BusinessDocumentsByIdMoveToBusinessData, PostApiV1BusinessDocumentsByIdMoveToBusinessResponses, PostApiV1BusinessDocumentsByIdMoveToPersonalData, PostApiV1BusinessDocumentsByIdMoveToPersonalResponses, PostApiV1BusinessDocumentsByIdUnapproveData, PostApiV1BusinessDocumentsByIdUnapproveResponses, PostApiV1BusinessDocumentsData, PostApiV1BusinessDocumentsResponses, PostApiV1BusinessesByIdDisconnectData, PostApiV1BusinessesByIdDisconnectResponses, PostApiV1BusinessesData, PostApiV1BusinessesResponses, PostApiV1CounterpartiesData, PostApiV1CounterpartiesResponses, PostApiV1FeedbackData, PostApiV1FeedbackResponses, PostApiV1InvitationsByIdAcceptData, PostApiV1InvitationsByIdAcceptResponses, PostApiV1InvitationsByIdRejectData, PostApiV1InvitationsByIdRejectResponses, PostApiV1InvitationsData, PostApiV1InvitationsResponses, PostApiV1InvoicesByIdSendData, PostApiV1InvoicesByIdSendResponses, PostApiV1InvoicesByIdSnapshotData, PostApiV1InvoicesByIdSnapshotResponses, PostApiV1InvoicesData, PostApiV1InvoicesResponses, PostApiV1NotificationsTestData, PostApiV1NotificationsTestResponses, PostApiV1PersonalDocumentsByIdMoveToBusinessData, PostApiV1PersonalDocumentsByIdMoveToBusinessResponses, PostApiV1PersonalDocumentsData, PostApiV1PersonalDocumentsResponses, PostApiV1RecurringTasksData, PostApiV1RecurringTasksResponses, PostApiV1TasksByIdApproveData, PostApiV1TasksByIdApproveResponses, PostApiV1TasksByIdRejectData, PostApiV1TasksByIdRejectResponses, PostApiV1TasksByIdSubmitData, PostApiV1TasksByIdSubmitResponses, PostApiV1TasksData, PostApiV1TasksResponses, PostApiV1UserForgotPasswordData, PostApiV1UserForgotPasswordErrors, PostApiV1UserForgotPasswordResponses, PostApiV1UserLoginData, PostApiV1UserLoginResponses, PostApiV1UserLogoutData, PostApiV1UserLogoutResponses, PostApiV1UserManage2FaData, PostApiV1UserManage2FaErrors, PostApiV1UserManage2FaResponses, PostApiV1UserManageInfoData, PostApiV1UserManageInfoErrors, PostApiV1UserManageInfoResponses, PostApiV1UserRefreshData, PostApiV1UserRefreshResponses, PostApiV1UserRegisterData, PostApiV1UserRegisterErrors, PostApiV1UserRegisterResponses, PostApiV1UserResendConfirmationEmailData, PostApiV1UserResendConfirmationEmailResponses, PostApiV1UserResetPasswordData, PostApiV1UserResetPasswordErrors, PostApiV1UserResetPasswordResponses, PutApiV1AccountingCompanyMembershipsData, PutApiV1AccountingCompanyMembershipsResponses, PutApiV1BankAccountsData, PutApiV1BankAccountsResponses, PutApiV1BusinessAccountantAssignmentsData, PutApiV1BusinessAccountantAssignmentsResponses, PutApiV1BusinessDocumentsByIdData, PutApiV1BusinessDocumentsByIdResponses, PutApiV1BusinessesByIdContactData, PutApiV1BusinessesByIdContactResponses, PutApiV1BusinessesByIdData, PutApiV1BusinessesByIdResponses, PutApiV1BusinessMembershipsData, PutApiV1BusinessMembershipsResponses, PutApiV1DataBoxCredentialsData, PutApiV1DataBoxCredentialsResponses, PutApiV1InvoiceSettingsData, PutApiV1InvoiceSettingsResponses, PutApiV1NotificationsDeviceTokensData, PutApiV1NotificationsDeviceTokensResponses, PutApiV1TasksByIdData, PutApiV1TasksByIdResponses } from './types.gen';\n\nexport type Options<TData extends TDataShape = TDataShape, ThrowOnError extends boolean = boolean> = Options2<TData, ThrowOnError> & {\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\nexport const postApiV1AccountingCompanies = <ThrowOnError extends boolean = false>(options?: Options<PostApiV1AccountingCompaniesData, ThrowOnError>) => (options?.client ?? client).post<PostApiV1AccountingCompaniesResponses, unknown, ThrowOnError>({\n    url: '/api/v1/accounting-companies',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json;odata.metadata=minimal;odata.streaming=true',\n        ...options?.headers\n    }\n});\n\nexport const deleteApiV1AccountingCompaniesById = <ThrowOnError extends boolean = false>(options: Options<DeleteApiV1AccountingCompaniesByIdData, ThrowOnError>) => (options.client ?? client).delete<DeleteApiV1AccountingCompaniesByIdResponses, unknown, ThrowOnError>({ url: '/api/v1/accounting-companies/{id}', ...options });\n\nexport const postApiV1AccountingCompaniesById = <ThrowOnError extends boolean = false>(options: Options<PostApiV1AccountingCompaniesByIdData, ThrowOnError>) => (options.client ?? client).post<PostApiV1AccountingCompaniesByIdResponses, unknown, ThrowOnError>({\n    url: '/api/v1/accounting-companies/{id}',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json;odata.metadata=minimal;odata.streaming=true',\n        ...options.headers\n    }\n});\n\nexport const apiVVersionApiVersionOdataAccountingCompanies = <ThrowOnError extends boolean = false>(options?: Options<ApiVVersionApiVersionOdataAccountingCompaniesData, ThrowOnError>) => (options?.client ?? client).get<ApiVVersionApiVersionOdataAccountingCompaniesResponses, unknown, ThrowOnError>({ url: '/api/v1/odata/AccountingCompanies', ...options });\n\nexport const apiVVersionApiVersionOdataAccountingCompaniesCount = <ThrowOnError extends boolean = false>(options?: Options<ApiVVersionApiVersionOdataAccountingCompaniesCountData, ThrowOnError>) => (options?.client ?? client).get<ApiVVersionApiVersionOdataAccountingCompaniesCountResponses, unknown, ThrowOnError>({ url: '/api/v1/odata/AccountingCompanies/$count', ...options });\n\nexport const putApiV1AccountingCompanyMemberships = <ThrowOnError extends boolean = false>(options?: Options<PutApiV1AccountingCompanyMembershipsData, ThrowOnError>) => (options?.client ?? client).put<PutApiV1AccountingCompanyMembershipsResponses, unknown, ThrowOnError>({\n    url: '/api/v1/accounting-company-memberships',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json;odata.metadata=minimal;odata.streaming=true',\n        ...options?.headers\n    }\n});\n\nexport const deleteApiV1AccountingCompanyMembershipsById = <ThrowOnError extends boolean = false>(options: Options<DeleteApiV1AccountingCompanyMembershipsByIdData, ThrowOnError>) => (options.client ?? client).delete<DeleteApiV1AccountingCompanyMembershipsByIdResponses, unknown, ThrowOnError>({ url: '/api/v1/accounting-company-memberships/{id}', ...options });\n\nexport const apiVVersionApiVersionOdataAccountingCompanyMemberships = <ThrowOnError extends boolean = false>(options?: Options<ApiVVersionApiVersionOdataAccountingCompanyMembershipsData, ThrowOnError>) => (options?.client ?? client).get<ApiVVersionApiVersionOdataAccountingCompanyMembershipsResponses, unknown, ThrowOnError>({ url: '/api/v1/odata/AccountingCompanyMemberships', ...options });\n\nexport const apiVVersionApiVersionOdataAccountingCompanyMembershipsCount = <ThrowOnError extends boolean = false>(options?: Options<ApiVVersionApiVersionOdataAccountingCompanyMembershipsCountData, ThrowOnError>) => (options?.client ?? client).get<ApiVVersionApiVersionOdataAccountingCompanyMembershipsCountResponses, unknown, ThrowOnError>({ url: '/api/v1/odata/AccountingCompanyMemberships/$count', ...options });\n\nexport const putApiV1BankAccounts = <ThrowOnError extends boolean = false>(options?: Options<PutApiV1BankAccountsData, ThrowOnError>) => (options?.client ?? client).put<PutApiV1BankAccountsResponses, unknown, ThrowOnError>({\n    url: '/api/v1/bank-accounts',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json;odata.metadata=minimal;odata.streaming=true',\n        ...options?.headers\n    }\n});\n\nexport const deleteApiV1BankAccountsById = <ThrowOnError extends boolean = false>(options: Options<DeleteApiV1BankAccountsByIdData, ThrowOnError>) => (options.client ?? client).delete<DeleteApiV1BankAccountsByIdResponses, unknown, ThrowOnError>({ url: '/api/v1/bank-accounts/{id}', ...options });\n\nexport const apiVVersionApiVersionOdataBankAccounts = <ThrowOnError extends boolean = false>(options?: Options<ApiVVersionApiVersionOdataBankAccountsData, ThrowOnError>) => (options?.client ?? client).get<ApiVVersionApiVersionOdataBankAccountsResponses, unknown, ThrowOnError>({ url: '/api/v1/odata/BankAccounts', ...options });\n\nexport const apiVVersionApiVersionOdataBankAccountsCount = <ThrowOnError extends boolean = false>(options?: Options<ApiVVersionApiVersionOdataBankAccountsCountData, ThrowOnError>) => (options?.client ?? client).get<ApiVVersionApiVersionOdataBankAccountsCountResponses, unknown, ThrowOnError>({ url: '/api/v1/odata/BankAccounts/$count', ...options });\n\nexport const putApiV1BusinessAccountantAssignments = <ThrowOnError extends boolean = false>(options?: Options<PutApiV1BusinessAccountantAssignmentsData, ThrowOnError>) => (options?.client ?? client).put<PutApiV1BusinessAccountantAssignmentsResponses, unknown, ThrowOnError>({\n    url: '/api/v1/business-accountant-assignments',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json;odata.metadata=minimal;odata.streaming=true',\n        ...options?.headers\n    }\n});\n\nexport const deleteApiV1BusinessAccountantAssignmentsById = <ThrowOnError extends boolean = false>(options: Options<DeleteApiV1BusinessAccountantAssignmentsByIdData, ThrowOnError>) => (options.client ?? client).delete<DeleteApiV1BusinessAccountantAssignmentsByIdResponses, unknown, ThrowOnError>({ url: '/api/v1/business-accountant-assignments/{id}', ...options });\n\nexport const apiVVersionApiVersionOdataBusinessAccountantAssignments = <ThrowOnError extends boolean = false>(options?: Options<ApiVVersionApiVersionOdataBusinessAccountantAssignmentsData, ThrowOnError>) => (options?.client ?? client).get<ApiVVersionApiVersionOdataBusinessAccountantAssignmentsResponses, unknown, ThrowOnError>({ url: '/api/v1/odata/BusinessAccountantAssignments', ...options });\n\nexport const apiVVersionApiVersionOdataBusinessAccountantAssignmentsCount = <ThrowOnError extends boolean = false>(options?: Options<ApiVVersionApiVersionOdataBusinessAccountantAssignmentsCountData, ThrowOnError>) => (options?.client ?? client).get<ApiVVersionApiVersionOdataBusinessAccountantAssignmentsCountResponses, unknown, ThrowOnError>({ url: '/api/v1/odata/BusinessAccountantAssignments/$count', ...options });\n\nexport const getApiV1BusinessDocumentsByIdRaw = <ThrowOnError extends boolean = false>(options: Options<GetApiV1BusinessDocumentsByIdRawData, ThrowOnError>) => (options.client ?? client).get<GetApiV1BusinessDocumentsByIdRawResponses, unknown, ThrowOnError>({ url: '/api/v1/business-documents/{id}/raw', ...options });\n\nexport const postApiV1BusinessDocuments = <ThrowOnError extends boolean = false>(options?: Options<PostApiV1BusinessDocumentsData, ThrowOnError>) => (options?.client ?? client).post<PostApiV1BusinessDocumentsResponses, unknown, ThrowOnError>({\n    ...formDataBodySerializer,\n    url: '/api/v1/business-documents',\n    ...options,\n    headers: {\n        'Content-Type': null,\n        ...options?.headers\n    }\n});\n\nexport const deleteApiV1BusinessDocumentsById = <ThrowOnError extends boolean = false>(options: Options<DeleteApiV1BusinessDocumentsByIdData, ThrowOnError>) => (options.client ?? client).delete<DeleteApiV1BusinessDocumentsByIdResponses, unknown, ThrowOnError>({ url: '/api/v1/business-documents/{id}', ...options });\n\nexport const putApiV1BusinessDocumentsById = <ThrowOnError extends boolean = false>(options: Options<PutApiV1BusinessDocumentsByIdData, ThrowOnError>) => (options.client ?? client).put<PutApiV1BusinessDocumentsByIdResponses, unknown, ThrowOnError>({\n    url: '/api/v1/business-documents/{id}',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json;odata.metadata=minimal;odata.streaming=true',\n        ...options.headers\n    }\n});\n\nexport const postApiV1BusinessDocumentsByIdApprove = <ThrowOnError extends boolean = false>(options: Options<PostApiV1BusinessDocumentsByIdApproveData, ThrowOnError>) => (options.client ?? client).post<PostApiV1BusinessDocumentsByIdApproveResponses, unknown, ThrowOnError>({ url: '/api/v1/business-documents/{id}/approve', ...options });\n\nexport const postApiV1BusinessDocumentsByIdUnapprove = <ThrowOnError extends boolean = false>(options: Options<PostApiV1BusinessDocumentsByIdUnapproveData, ThrowOnError>) => (options.client ?? client).post<PostApiV1BusinessDocumentsByIdUnapproveResponses, unknown, ThrowOnError>({ url: '/api/v1/business-documents/{id}/unapprove', ...options });\n\nexport const postApiV1BusinessDocumentsByIdMoveToPersonal = <ThrowOnError extends boolean = false>(options: Options<PostApiV1BusinessDocumentsByIdMoveToPersonalData, ThrowOnError>) => (options.client ?? client).post<PostApiV1BusinessDocumentsByIdMoveToPersonalResponses, unknown, ThrowOnError>({ url: '/api/v1/business-documents/{id}/move-to-personal', ...options });\n\nexport const postApiV1BusinessDocumentsByIdMoveToBusiness = <ThrowOnError extends boolean = false>(options: Options<PostApiV1BusinessDocumentsByIdMoveToBusinessData, ThrowOnError>) => (options.client ?? client).post<PostApiV1BusinessDocumentsByIdMoveToBusinessResponses, unknown, ThrowOnError>({\n    url: '/api/v1/business-documents/{id}/move-to-business',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json;odata.metadata=minimal;odata.streaming=true',\n        ...options.headers\n    }\n});\n\nexport const apiVVersionApiVersionOdataBusinessDocumentActivities = <ThrowOnError extends boolean = false>(options?: Options<ApiVVersionApiVersionOdataBusinessDocumentActivitiesData, ThrowOnError>) => (options?.client ?? client).get<ApiVVersionApiVersionOdataBusinessDocumentActivitiesResponses, unknown, ThrowOnError>({ url: '/api/v1/odata/BusinessDocumentActivities', ...options });\n\nexport const apiVVersionApiVersionOdataBusinessDocumentActivitiesCount = <ThrowOnError extends boolean = false>(options?: Options<ApiVVersionApiVersionOdataBusinessDocumentActivitiesCountData, ThrowOnError>) => (options?.client ?? client).get<ApiVVersionApiVersionOdataBusinessDocumentActivitiesCountResponses, unknown, ThrowOnError>({ url: '/api/v1/odata/BusinessDocumentActivities/$count', ...options });\n\nexport const apiVVersionApiVersionOdataBusinessDocuments = <ThrowOnError extends boolean = false>(options?: Options<ApiVVersionApiVersionOdataBusinessDocumentsData, ThrowOnError>) => (options?.client ?? client).get<ApiVVersionApiVersionOdataBusinessDocumentsResponses, unknown, ThrowOnError>({ url: '/api/v1/odata/BusinessDocuments', ...options });\n\nexport const apiVVersionApiVersionOdataBusinessDocumentsCount = <ThrowOnError extends boolean = false>(options?: Options<ApiVVersionApiVersionOdataBusinessDocumentsCountData, ThrowOnError>) => (options?.client ?? client).get<ApiVVersionApiVersionOdataBusinessDocumentsCountResponses, unknown, ThrowOnError>({ url: '/api/v1/odata/BusinessDocuments/$count', ...options });\n\n/**\n * @deprecated\n */\nexport const apiVVersionApiVersionOdataBusinessDocumentsSummaries = <ThrowOnError extends boolean = false>(options?: Options<ApiVVersionApiVersionOdataBusinessDocumentsSummariesData, ThrowOnError>) => (options?.client ?? client).get<ApiVVersionApiVersionOdataBusinessDocumentsSummariesResponses, unknown, ThrowOnError>({ url: '/api/v1/odata/BusinessDocumentsSummaries', ...options });\n\n/**\n * @deprecated\n */\nexport const apiVVersionApiVersionOdataBusinessDocumentsSummariesCount = <ThrowOnError extends boolean = false>(options?: Options<ApiVVersionApiVersionOdataBusinessDocumentsSummariesCountData, ThrowOnError>) => (options?.client ?? client).get<ApiVVersionApiVersionOdataBusinessDocumentsSummariesCountResponses, unknown, ThrowOnError>({ url: '/api/v1/odata/BusinessDocumentsSummaries/$count', ...options });\n\nexport const getApiV1BusinessesByIdDocumentTypesSummary = <ThrowOnError extends boolean = false>(options: Options<GetApiV1BusinessesByIdDocumentTypesSummaryData, ThrowOnError>) => (options.client ?? client).get<GetApiV1BusinessesByIdDocumentTypesSummaryResponses, unknown, ThrowOnError>({ url: '/api/v1/businesses/{id}/document-types-summary', ...options });\n\nexport const postApiV1Businesses = <ThrowOnError extends boolean = false>(options?: Options<PostApiV1BusinessesData, ThrowOnError>) => (options?.client ?? client).post<PostApiV1BusinessesResponses, unknown, ThrowOnError>({\n    url: '/api/v1/businesses',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json;odata.metadata=minimal;odata.streaming=true',\n        ...options?.headers\n    }\n});\n\nexport const deleteApiV1BusinessesById = <ThrowOnError extends boolean = false>(options: Options<DeleteApiV1BusinessesByIdData, ThrowOnError>) => (options.client ?? client).delete<DeleteApiV1BusinessesByIdResponses, unknown, ThrowOnError>({ url: '/api/v1/businesses/{id}', ...options });\n\nexport const putApiV1BusinessesById = <ThrowOnError extends boolean = false>(options: Options<PutApiV1BusinessesByIdData, ThrowOnError>) => (options.client ?? client).put<PutApiV1BusinessesByIdResponses, unknown, ThrowOnError>({\n    url: '/api/v1/businesses/{id}',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json;odata.metadata=minimal;odata.streaming=true',\n        ...options.headers\n    }\n});\n\nexport const putApiV1BusinessesByIdContact = <ThrowOnError extends boolean = false>(options: Options<PutApiV1BusinessesByIdContactData, ThrowOnError>) => (options.client ?? client).put<PutApiV1BusinessesByIdContactResponses, unknown, ThrowOnError>({\n    url: '/api/v1/businesses/{id}/contact',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json;odata.metadata=minimal;odata.streaming=true',\n        ...options.headers\n    }\n});\n\nexport const postApiV1BusinessesByIdDisconnect = <ThrowOnError extends boolean = false>(options: Options<PostApiV1BusinessesByIdDisconnectData, ThrowOnError>) => (options.client ?? client).post<PostApiV1BusinessesByIdDisconnectResponses, unknown, ThrowOnError>({ url: '/api/v1/businesses/{id}/disconnect', ...options });\n\nexport const apiVVersionApiVersionOdataBusinesses = <ThrowOnError extends boolean = false>(options?: Options<ApiVVersionApiVersionOdataBusinessesData, ThrowOnError>) => (options?.client ?? client).get<ApiVVersionApiVersionOdataBusinessesResponses, unknown, ThrowOnError>({ url: '/api/v1/odata/Businesses', ...options });\n\nexport const apiVVersionApiVersionOdataBusinessesCount = <ThrowOnError extends boolean = false>(options?: Options<ApiVVersionApiVersionOdataBusinessesCountData, ThrowOnError>) => (options?.client ?? client).get<ApiVVersionApiVersionOdataBusinessesCountResponses, unknown, ThrowOnError>({ url: '/api/v1/odata/Businesses/$count', ...options });\n\nexport const apiVVersionApiVersionOdataBusinessesKey = <ThrowOnError extends boolean = false>(options?: Options<ApiVVersionApiVersionOdataBusinessesKeyData, ThrowOnError>) => (options?.client ?? client).get<ApiVVersionApiVersionOdataBusinessesKeyResponses, unknown, ThrowOnError>({ url: '/api/v1/odata/Businesses({key})', ...options });\n\nexport const apiVVersionApiVersionOdataBusinessesKey2 = <ThrowOnError extends boolean = false>(options?: Options<ApiVVersionApiVersionOdataBusinessesKey2Data, ThrowOnError>) => (options?.client ?? client).get<ApiVVersionApiVersionOdataBusinessesKey2Responses, unknown, ThrowOnError>({ url: '/api/v1/odata/Businesses/{key}', ...options });\n\nexport const putApiV1BusinessMemberships = <ThrowOnError extends boolean = false>(options?: Options<PutApiV1BusinessMembershipsData, ThrowOnError>) => (options?.client ?? client).put<PutApiV1BusinessMembershipsResponses, unknown, ThrowOnError>({\n    url: '/api/v1/business-memberships',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json;odata.metadata=minimal;odata.streaming=true',\n        ...options?.headers\n    }\n});\n\nexport const apiVVersionApiVersionOdataBusinessSummaries = <ThrowOnError extends boolean = false>(options?: Options<ApiVVersionApiVersionOdataBusinessSummariesData, ThrowOnError>) => (options?.client ?? client).get<ApiVVersionApiVersionOdataBusinessSummariesResponses, unknown, ThrowOnError>({ url: '/api/v1/odata/BusinessSummaries', ...options });\n\nexport const apiVVersionApiVersionOdataBusinessSummariesCount = <ThrowOnError extends boolean = false>(options?: Options<ApiVVersionApiVersionOdataBusinessSummariesCountData, ThrowOnError>) => (options?.client ?? client).get<ApiVVersionApiVersionOdataBusinessSummariesCountResponses, unknown, ThrowOnError>({ url: '/api/v1/odata/BusinessSummaries/$count', ...options });\n\nexport const postApiV1Counterparties = <ThrowOnError extends boolean = false>(options?: Options<PostApiV1CounterpartiesData, ThrowOnError>) => (options?.client ?? client).post<PostApiV1CounterpartiesResponses, unknown, ThrowOnError>({\n    url: '/api/v1/counterparties',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json;odata.metadata=minimal;odata.streaming=true',\n        ...options?.headers\n    }\n});\n\nexport const deleteApiV1CounterpartiesById = <ThrowOnError extends boolean = false>(options: Options<DeleteApiV1CounterpartiesByIdData, ThrowOnError>) => (options.client ?? client).delete<DeleteApiV1CounterpartiesByIdResponses, unknown, ThrowOnError>({ url: '/api/v1/counterparties/{id}', ...options });\n\nexport const patchApiV1CounterpartiesById = <ThrowOnError extends boolean = false>(options: Options<PatchApiV1CounterpartiesByIdData, ThrowOnError>) => (options.client ?? client).patch<PatchApiV1CounterpartiesByIdResponses, unknown, ThrowOnError>({\n    url: '/api/v1/counterparties/{id}',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json;odata.metadata=minimal;odata.streaming=true',\n        ...options.headers\n    }\n});\n\nexport const apiVVersionApiVersionOdataCounterparties = <ThrowOnError extends boolean = false>(options?: Options<ApiVVersionApiVersionOdataCounterpartiesData, ThrowOnError>) => (options?.client ?? client).get<ApiVVersionApiVersionOdataCounterpartiesResponses, unknown, ThrowOnError>({ url: '/api/v1/odata/Counterparties', ...options });\n\nexport const apiVVersionApiVersionOdataCounterpartiesCount = <ThrowOnError extends boolean = false>(options?: Options<ApiVVersionApiVersionOdataCounterpartiesCountData, ThrowOnError>) => (options?.client ?? client).get<ApiVVersionApiVersionOdataCounterpartiesCountResponses, unknown, ThrowOnError>({ url: '/api/v1/odata/Counterparties/$count', ...options });\n\nexport const putApiV1DataBoxCredentials = <ThrowOnError extends boolean = false>(options?: Options<PutApiV1DataBoxCredentialsData, ThrowOnError>) => (options?.client ?? client).put<PutApiV1DataBoxCredentialsResponses, unknown, ThrowOnError>({\n    url: '/api/v1/data-box-credentials',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json;odata.metadata=minimal;odata.streaming=true',\n        ...options?.headers\n    }\n});\n\nexport const deleteApiV1DataBoxCredentialsById = <ThrowOnError extends boolean = false>(options: Options<DeleteApiV1DataBoxCredentialsByIdData, ThrowOnError>) => (options.client ?? client).delete<DeleteApiV1DataBoxCredentialsByIdResponses, unknown, ThrowOnError>({ url: '/api/v1/data-box-credentials/{id}', ...options });\n\nexport const apiVVersionApiVersionOdataDataBoxCredentials = <ThrowOnError extends boolean = false>(options?: Options<ApiVVersionApiVersionOdataDataBoxCredentialsData, ThrowOnError>) => (options?.client ?? client).get<ApiVVersionApiVersionOdataDataBoxCredentialsResponses, unknown, ThrowOnError>({ url: '/api/v1/odata/DataBoxCredentials', ...options });\n\nexport const apiVVersionApiVersionOdataDataBoxCredentialsCount = <ThrowOnError extends boolean = false>(options?: Options<ApiVVersionApiVersionOdataDataBoxCredentialsCountData, ThrowOnError>) => (options?.client ?? client).get<ApiVVersionApiVersionOdataDataBoxCredentialsCountResponses, unknown, ThrowOnError>({ url: '/api/v1/odata/DataBoxCredentials/$count', ...options });\n\nexport const getApiDev = <ThrowOnError extends boolean = false>(options?: Options<GetApiDevData, ThrowOnError>) => (options?.client ?? client).get<GetApiDevResponses, unknown, ThrowOnError>({ url: '/api/dev', ...options });\n\nexport const getApiDevReseedDb = <ThrowOnError extends boolean = false>(options?: Options<GetApiDevReseedDbData, ThrowOnError>) => (options?.client ?? client).get<GetApiDevReseedDbResponses, unknown, ThrowOnError>({ url: '/api/dev/reseed-db', ...options });\n\nexport const getApiDevDbReset = <ThrowOnError extends boolean = false>(options?: Options<GetApiDevDbResetData, ThrowOnError>) => (options?.client ?? client).get<GetApiDevDbResetResponses, unknown, ThrowOnError>({ url: '/api/dev/db-reset', ...options });\n\nexport const getApiDevDbReset2 = <ThrowOnError extends boolean = false>(options?: Options<GetApiDevDbReset2Data, ThrowOnError>) => (options?.client ?? client).get<GetApiDevDbReset2Responses, unknown, ThrowOnError>({ url: '/api/dev/db/reset', ...options });\n\nexport const getApiDevDbCreate = <ThrowOnError extends boolean = false>(options?: Options<GetApiDevDbCreateData, ThrowOnError>) => (options?.client ?? client).get<GetApiDevDbCreateResponses, unknown, ThrowOnError>({ url: '/api/dev/db/create', ...options });\n\nexport const getApiDevDbTouch = <ThrowOnError extends boolean = false>(options?: Options<GetApiDevDbTouchData, ThrowOnError>) => (options?.client ?? client).get<GetApiDevDbTouchResponses, unknown, ThrowOnError>({ url: '/api/dev/db/touch', ...options });\n\nexport const getApiDevSeed = <ThrowOnError extends boolean = false>(options?: Options<GetApiDevSeedData, ThrowOnError>) => (options?.client ?? client).get<GetApiDevSeedResponses, unknown, ThrowOnError>({ url: '/api/dev/seed', ...options });\n\nexport const getApiDevSeedAll = <ThrowOnError extends boolean = false>(options?: Options<GetApiDevSeedAllData, ThrowOnError>) => (options?.client ?? client).get<GetApiDevSeedAllResponses, unknown, ThrowOnError>({ url: '/api/dev/seed-all', ...options });\n\nexport const getApiDevSeedProd = <ThrowOnError extends boolean = false>(options?: Options<GetApiDevSeedProdData, ThrowOnError>) => (options?.client ?? client).get<GetApiDevSeedProdResponses, unknown, ThrowOnError>({ url: '/api/dev/seed-prod', ...options });\n\nexport const getApiDevJobProcessRecurringTasks = <ThrowOnError extends boolean = false>(options?: Options<GetApiDevJobProcessRecurringTasksData, ThrowOnError>) => (options?.client ?? client).get<GetApiDevJobProcessRecurringTasksResponses, unknown, ThrowOnError>({ url: '/api/dev/job/process-recurring-tasks', ...options });\n\nexport const getApiDevNotificationsSendTest = <ThrowOnError extends boolean = false>(options?: Options<GetApiDevNotificationsSendTestData, ThrowOnError>) => (options?.client ?? client).get<GetApiDevNotificationsSendTestResponses, unknown, ThrowOnError>({ url: '/api/dev/notifications/send-test', ...options });\n\nexport const getApiDevConfirmEmail = <ThrowOnError extends boolean = false>(options?: Options<GetApiDevConfirmEmailData, ThrowOnError>) => (options?.client ?? client).get<GetApiDevConfirmEmailResponses, unknown, ThrowOnError>({ url: '/api/dev/confirm-email', ...options });\n\nexport const getApiDevEmailSendTest = <ThrowOnError extends boolean = false>(options?: Options<GetApiDevEmailSendTestData, ThrowOnError>) => (options?.client ?? client).get<GetApiDevEmailSendTestResponses, unknown, ThrowOnError>({ url: '/api/dev/email/send-test', ...options });\n\nexport const deleteApiV1NotificationsDeviceTokens = <ThrowOnError extends boolean = false>(options?: Options<DeleteApiV1NotificationsDeviceTokensData, ThrowOnError>) => (options?.client ?? client).delete<DeleteApiV1NotificationsDeviceTokensResponses, unknown, ThrowOnError>({\n    url: '/api/v1/notifications/device-tokens',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json;odata.metadata=minimal;odata.streaming=true',\n        ...options?.headers\n    }\n});\n\nexport const putApiV1NotificationsDeviceTokens = <ThrowOnError extends boolean = false>(options?: Options<PutApiV1NotificationsDeviceTokensData, ThrowOnError>) => (options?.client ?? client).put<PutApiV1NotificationsDeviceTokensResponses, unknown, ThrowOnError>({\n    url: '/api/v1/notifications/device-tokens',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json;odata.metadata=minimal;odata.streaming=true',\n        ...options?.headers\n    }\n});\n\nexport const apiVVersionApiVersionOdataDocumentTypes = <ThrowOnError extends boolean = false>(options?: Options<ApiVVersionApiVersionOdataDocumentTypesData, ThrowOnError>) => (options?.client ?? client).get<ApiVVersionApiVersionOdataDocumentTypesResponses, unknown, ThrowOnError>({ url: '/api/v1/odata/DocumentTypes', ...options });\n\nexport const apiVVersionApiVersionOdataDocumentTypesCount = <ThrowOnError extends boolean = false>(options?: Options<ApiVVersionApiVersionOdataDocumentTypesCountData, ThrowOnError>) => (options?.client ?? client).get<ApiVVersionApiVersionOdataDocumentTypesCountResponses, unknown, ThrowOnError>({ url: '/api/v1/odata/DocumentTypes/$count', ...options });\n\nexport const postApiV1Feedback = <ThrowOnError extends boolean = false>(options?: Options<PostApiV1FeedbackData, ThrowOnError>) => (options?.client ?? client).post<PostApiV1FeedbackResponses, unknown, ThrowOnError>({\n    url: '/api/v1/feedback',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json;odata.metadata=minimal;odata.streaming=true',\n        ...options?.headers\n    }\n});\n\nexport const postApiV1Invitations = <ThrowOnError extends boolean = false>(options?: Options<PostApiV1InvitationsData, ThrowOnError>) => (options?.client ?? client).post<PostApiV1InvitationsResponses, unknown, ThrowOnError>({\n    url: '/api/v1/invitations',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json;odata.metadata=minimal;odata.streaming=true',\n        ...options?.headers\n    }\n});\n\nexport const postApiV1InvitationsByIdAccept = <ThrowOnError extends boolean = false>(options: Options<PostApiV1InvitationsByIdAcceptData, ThrowOnError>) => (options.client ?? client).post<PostApiV1InvitationsByIdAcceptResponses, unknown, ThrowOnError>({\n    url: '/api/v1/invitations/{id}/accept',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json;odata.metadata=minimal;odata.streaming=true',\n        ...options.headers\n    }\n});\n\nexport const postApiV1InvitationsByIdReject = <ThrowOnError extends boolean = false>(options: Options<PostApiV1InvitationsByIdRejectData, ThrowOnError>) => (options.client ?? client).post<PostApiV1InvitationsByIdRejectResponses, unknown, ThrowOnError>({ url: '/api/v1/invitations/{id}/reject', ...options });\n\nexport const deleteApiV1InvitationsById = <ThrowOnError extends boolean = false>(options: Options<DeleteApiV1InvitationsByIdData, ThrowOnError>) => (options.client ?? client).delete<DeleteApiV1InvitationsByIdResponses, unknown, ThrowOnError>({ url: '/api/v1/invitations/{id}', ...options });\n\nexport const patchApiV1InvitationsById = <ThrowOnError extends boolean = false>(options: Options<PatchApiV1InvitationsByIdData, ThrowOnError>) => (options.client ?? client).patch<PatchApiV1InvitationsByIdResponses, unknown, ThrowOnError>({\n    url: '/api/v1/invitations/{id}',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json;odata.metadata=minimal;odata.streaming=true',\n        ...options.headers\n    }\n});\n\nexport const apiVVersionApiVersionOdataInvitations = <ThrowOnError extends boolean = false>(options?: Options<ApiVVersionApiVersionOdataInvitationsData, ThrowOnError>) => (options?.client ?? client).get<ApiVVersionApiVersionOdataInvitationsResponses, unknown, ThrowOnError>({ url: '/api/v1/odata/Invitations', ...options });\n\nexport const apiVVersionApiVersionOdataInvitationsCount = <ThrowOnError extends boolean = false>(options?: Options<ApiVVersionApiVersionOdataInvitationsCountData, ThrowOnError>) => (options?.client ?? client).get<ApiVVersionApiVersionOdataInvitationsCountResponses, unknown, ThrowOnError>({ url: '/api/v1/odata/Invitations/$count', ...options });\n\nexport const postApiV1Invoices = <ThrowOnError extends boolean = false>(options?: Options<PostApiV1InvoicesData, ThrowOnError>) => (options?.client ?? client).post<PostApiV1InvoicesResponses, unknown, ThrowOnError>({\n    url: '/api/v1/invoices',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json;odata.metadata=minimal;odata.streaming=true',\n        ...options?.headers\n    }\n});\n\nexport const deleteApiV1InvoicesById = <ThrowOnError extends boolean = false>(options: Options<DeleteApiV1InvoicesByIdData, ThrowOnError>) => (options.client ?? client).delete<DeleteApiV1InvoicesByIdResponses, unknown, ThrowOnError>({ url: '/api/v1/invoices/{id}', ...options });\n\nexport const patchApiV1InvoicesById = <ThrowOnError extends boolean = false>(options: Options<PatchApiV1InvoicesByIdData, ThrowOnError>) => (options.client ?? client).patch<PatchApiV1InvoicesByIdResponses, unknown, ThrowOnError>({\n    url: '/api/v1/invoices/{id}',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json;odata.metadata=minimal;odata.streaming=true',\n        ...options.headers\n    }\n});\n\nexport const getApiV1InvoicesByIdPreview = <ThrowOnError extends boolean = false>(options: Options<GetApiV1InvoicesByIdPreviewData, ThrowOnError>) => (options.client ?? client).get<GetApiV1InvoicesByIdPreviewResponses, unknown, ThrowOnError>({ url: '/api/v1/invoices/{id}/preview', ...options });\n\nexport const postApiV1InvoicesByIdSend = <ThrowOnError extends boolean = false>(options: Options<PostApiV1InvoicesByIdSendData, ThrowOnError>) => (options.client ?? client).post<PostApiV1InvoicesByIdSendResponses, unknown, ThrowOnError>({\n    url: '/api/v1/invoices/{id}/send',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json;odata.metadata=minimal;odata.streaming=true',\n        ...options.headers\n    }\n});\n\nexport const postApiV1InvoicesByIdSnapshot = <ThrowOnError extends boolean = false>(options: Options<PostApiV1InvoicesByIdSnapshotData, ThrowOnError>) => (options.client ?? client).post<PostApiV1InvoicesByIdSnapshotResponses, unknown, ThrowOnError>({ url: '/api/v1/invoices/{id}/snapshot', ...options });\n\nexport const apiVVersionApiVersionOdataInvoices = <ThrowOnError extends boolean = false>(options?: Options<ApiVVersionApiVersionOdataInvoicesData, ThrowOnError>) => (options?.client ?? client).get<ApiVVersionApiVersionOdataInvoicesResponses, unknown, ThrowOnError>({ url: '/api/v1/odata/Invoices', ...options });\n\nexport const apiVVersionApiVersionOdataInvoicesCount = <ThrowOnError extends boolean = false>(options?: Options<ApiVVersionApiVersionOdataInvoicesCountData, ThrowOnError>) => (options?.client ?? client).get<ApiVVersionApiVersionOdataInvoicesCountResponses, unknown, ThrowOnError>({ url: '/api/v1/odata/Invoices/$count', ...options });\n\nexport const putApiV1InvoiceSettings = <ThrowOnError extends boolean = false>(options?: Options<PutApiV1InvoiceSettingsData, ThrowOnError>) => (options?.client ?? client).put<PutApiV1InvoiceSettingsResponses, unknown, ThrowOnError>({\n    url: '/api/v1/invoice-settings',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json;odata.metadata=minimal;odata.streaming=true',\n        ...options?.headers\n    }\n});\n\nexport const apiVVersionApiVersionOdataInvoiceSettings = <ThrowOnError extends boolean = false>(options?: Options<ApiVVersionApiVersionOdataInvoiceSettingsData, ThrowOnError>) => (options?.client ?? client).get<ApiVVersionApiVersionOdataInvoiceSettingsResponses, unknown, ThrowOnError>({ url: '/api/v1/odata/InvoiceSettings', ...options });\n\nexport const apiVVersionApiVersionOdataInvoiceSettingsCount = <ThrowOnError extends boolean = false>(options?: Options<ApiVVersionApiVersionOdataInvoiceSettingsCountData, ThrowOnError>) => (options?.client ?? client).get<ApiVVersionApiVersionOdataInvoiceSettingsCountResponses, unknown, ThrowOnError>({ url: '/api/v1/odata/InvoiceSettings/$count', ...options });\n\nexport const apiVVersionApiVersionOdataLicenses = <ThrowOnError extends boolean = false>(options?: Options<ApiVVersionApiVersionOdataLicensesData, ThrowOnError>) => (options?.client ?? client).get<ApiVVersionApiVersionOdataLicensesResponses, unknown, ThrowOnError>({ url: '/api/v1/odata/Licenses', ...options });\n\nexport const apiVVersionApiVersionOdataLicensesCount = <ThrowOnError extends boolean = false>(options?: Options<ApiVVersionApiVersionOdataLicensesCountData, ThrowOnError>) => (options?.client ?? client).get<ApiVVersionApiVersionOdataLicensesCountResponses, unknown, ThrowOnError>({ url: '/api/v1/odata/Licenses/$count', ...options });\n\nexport const postApiV1NotificationsTest = <ThrowOnError extends boolean = false>(options?: Options<PostApiV1NotificationsTestData, ThrowOnError>) => (options?.client ?? client).post<PostApiV1NotificationsTestResponses, unknown, ThrowOnError>({\n    url: '/api/v1/notifications/test',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json;odata.metadata=minimal;odata.streaming=true',\n        ...options?.headers\n    }\n});\n\nexport const getApiV1PersonalDocumentsByIdRaw = <ThrowOnError extends boolean = false>(options: Options<GetApiV1PersonalDocumentsByIdRawData, ThrowOnError>) => (options.client ?? client).get<GetApiV1PersonalDocumentsByIdRawResponses, unknown, ThrowOnError>({ url: '/api/v1/personal-documents/{id}/raw', ...options });\n\nexport const postApiV1PersonalDocuments = <ThrowOnError extends boolean = false>(options?: Options<PostApiV1PersonalDocumentsData, ThrowOnError>) => (options?.client ?? client).post<PostApiV1PersonalDocumentsResponses, unknown, ThrowOnError>({\n    ...formDataBodySerializer,\n    url: '/api/v1/personal-documents',\n    ...options,\n    headers: {\n        'Content-Type': null,\n        ...options?.headers\n    }\n});\n\nexport const postApiV1PersonalDocumentsByIdMoveToBusiness = <ThrowOnError extends boolean = false>(options: Options<PostApiV1PersonalDocumentsByIdMoveToBusinessData, ThrowOnError>) => (options.client ?? client).post<PostApiV1PersonalDocumentsByIdMoveToBusinessResponses, unknown, ThrowOnError>({\n    url: '/api/v1/personal-documents/{id}/move-to-business',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json;odata.metadata=minimal;odata.streaming=true',\n        ...options.headers\n    }\n});\n\nexport const deleteApiV1PersonalDocumentsById = <ThrowOnError extends boolean = false>(options: Options<DeleteApiV1PersonalDocumentsByIdData, ThrowOnError>) => (options.client ?? client).delete<DeleteApiV1PersonalDocumentsByIdResponses, unknown, ThrowOnError>({ url: '/api/v1/personal-documents/{id}', ...options });\n\nexport const getApiV1PersonalDocumentsSummary = <ThrowOnError extends boolean = false>(options?: Options<GetApiV1PersonalDocumentsSummaryData, ThrowOnError>) => (options?.client ?? client).get<GetApiV1PersonalDocumentsSummaryResponses, unknown, ThrowOnError>({ url: '/api/v1/personal-documents/summary', ...options });\n\nexport const apiVVersionApiVersionOdataPersonalDocuments = <ThrowOnError extends boolean = false>(options?: Options<ApiVVersionApiVersionOdataPersonalDocumentsData, ThrowOnError>) => (options?.client ?? client).get<ApiVVersionApiVersionOdataPersonalDocumentsResponses, unknown, ThrowOnError>({ url: '/api/v1/odata/PersonalDocuments', ...options });\n\nexport const apiVVersionApiVersionOdataPersonalDocumentsCount = <ThrowOnError extends boolean = false>(options?: Options<ApiVVersionApiVersionOdataPersonalDocumentsCountData, ThrowOnError>) => (options?.client ?? client).get<ApiVVersionApiVersionOdataPersonalDocumentsCountResponses, unknown, ThrowOnError>({ url: '/api/v1/odata/PersonalDocuments/$count', ...options });\n\nexport const postApiV1RecurringTasks = <ThrowOnError extends boolean = false>(options?: Options<PostApiV1RecurringTasksData, ThrowOnError>) => (options?.client ?? client).post<PostApiV1RecurringTasksResponses, unknown, ThrowOnError>({\n    url: '/api/v1/recurring-tasks',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json;odata.metadata=minimal;odata.streaming=true',\n        ...options?.headers\n    }\n});\n\nexport const deleteApiV1RecurringTasksById = <ThrowOnError extends boolean = false>(options: Options<DeleteApiV1RecurringTasksByIdData, ThrowOnError>) => (options.client ?? client).delete<DeleteApiV1RecurringTasksByIdResponses, unknown, ThrowOnError>({ url: '/api/v1/recurring-tasks/{id}', ...options });\n\nexport const patchApiV1RecurringTasksById = <ThrowOnError extends boolean = false>(options: Options<PatchApiV1RecurringTasksByIdData, ThrowOnError>) => (options.client ?? client).patch<PatchApiV1RecurringTasksByIdResponses, unknown, ThrowOnError>({\n    url: '/api/v1/recurring-tasks/{id}',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json;odata.metadata=minimal;odata.streaming=true',\n        ...options.headers\n    }\n});\n\nexport const apiVVersionApiVersionOdataRecurringTasks = <ThrowOnError extends boolean = false>(options?: Options<ApiVVersionApiVersionOdataRecurringTasksData, ThrowOnError>) => (options?.client ?? client).get<ApiVVersionApiVersionOdataRecurringTasksResponses, unknown, ThrowOnError>({ url: '/api/v1/odata/RecurringTasks', ...options });\n\nexport const apiVVersionApiVersionOdataRecurringTasksCount = <ThrowOnError extends boolean = false>(options?: Options<ApiVVersionApiVersionOdataRecurringTasksCountData, ThrowOnError>) => (options?.client ?? client).get<ApiVVersionApiVersionOdataRecurringTasksCountResponses, unknown, ThrowOnError>({ url: '/api/v1/odata/RecurringTasks/$count', ...options });\n\nexport const get = <ThrowOnError extends boolean = false>(options?: Options<GetData, ThrowOnError>) => (options?.client ?? client).get<GetResponses, unknown, ThrowOnError>({ url: '/', ...options });\n\nexport const postApiV1Tasks = <ThrowOnError extends boolean = false>(options?: Options<PostApiV1TasksData, ThrowOnError>) => (options?.client ?? client).post<PostApiV1TasksResponses, unknown, ThrowOnError>({\n    url: '/api/v1/tasks',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json;odata.metadata=minimal;odata.streaming=true',\n        ...options?.headers\n    }\n});\n\nexport const putApiV1TasksById = <ThrowOnError extends boolean = false>(options: Options<PutApiV1TasksByIdData, ThrowOnError>) => (options.client ?? client).put<PutApiV1TasksByIdResponses, unknown, ThrowOnError>({\n    url: '/api/v1/tasks/{id}',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json;odata.metadata=minimal;odata.streaming=true',\n        ...options.headers\n    }\n});\n\nexport const postApiV1TasksByIdSubmit = <ThrowOnError extends boolean = false>(options: Options<PostApiV1TasksByIdSubmitData, ThrowOnError>) => (options.client ?? client).post<PostApiV1TasksByIdSubmitResponses, unknown, ThrowOnError>({\n    url: '/api/v1/tasks/{id}/submit',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json;odata.metadata=minimal;odata.streaming=true',\n        ...options.headers\n    }\n});\n\nexport const postApiV1TasksByIdApprove = <ThrowOnError extends boolean = false>(options: Options<PostApiV1TasksByIdApproveData, ThrowOnError>) => (options.client ?? client).post<PostApiV1TasksByIdApproveResponses, unknown, ThrowOnError>({ url: '/api/v1/tasks/{id}/approve', ...options });\n\nexport const postApiV1TasksByIdReject = <ThrowOnError extends boolean = false>(options: Options<PostApiV1TasksByIdRejectData, ThrowOnError>) => (options.client ?? client).post<PostApiV1TasksByIdRejectResponses, unknown, ThrowOnError>({\n    url: '/api/v1/tasks/{id}/reject',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json;odata.metadata=minimal;odata.streaming=true',\n        ...options.headers\n    }\n});\n\nexport const getApiV1TasksByIdComments = <ThrowOnError extends boolean = false>(options: Options<GetApiV1TasksByIdCommentsData, ThrowOnError>) => (options.client ?? client).get<GetApiV1TasksByIdCommentsResponses, unknown, ThrowOnError>({ url: '/api/v1/tasks/{id}/comments', ...options });\n\nexport const getApiV1TasksByIdDocuments = <ThrowOnError extends boolean = false>(options: Options<GetApiV1TasksByIdDocumentsData, ThrowOnError>) => (options.client ?? client).get<GetApiV1TasksByIdDocumentsResponses, unknown, ThrowOnError>({ url: '/api/v1/tasks/{id}/documents', ...options });\n\nexport const apiVVersionApiVersionOdataTasks = <ThrowOnError extends boolean = false>(options?: Options<ApiVVersionApiVersionOdataTasksData, ThrowOnError>) => (options?.client ?? client).get<ApiVVersionApiVersionOdataTasksResponses, unknown, ThrowOnError>({ url: '/api/v1/odata/Tasks', ...options });\n\nexport const apiVVersionApiVersionOdataTasksCount = <ThrowOnError extends boolean = false>(options?: Options<ApiVVersionApiVersionOdataTasksCountData, ThrowOnError>) => (options?.client ?? client).get<ApiVVersionApiVersionOdataTasksCountResponses, unknown, ThrowOnError>({ url: '/api/v1/odata/Tasks/$count', ...options });\n\nexport const apiVVersionApiVersionOdataTasksKey = <ThrowOnError extends boolean = false>(options?: Options<ApiVVersionApiVersionOdataTasksKeyData, ThrowOnError>) => (options?.client ?? client).get<ApiVVersionApiVersionOdataTasksKeyResponses, unknown, ThrowOnError>({ url: '/api/v1/odata/Tasks({key})', ...options });\n\nexport const apiVVersionApiVersionOdataTasksKey2 = <ThrowOnError extends boolean = false>(options?: Options<ApiVVersionApiVersionOdataTasksKey2Data, ThrowOnError>) => (options?.client ?? client).get<ApiVVersionApiVersionOdataTasksKey2Responses, unknown, ThrowOnError>({ url: '/api/v1/odata/Tasks/{key}', ...options });\n\nexport const postApiV1UserRegister = <ThrowOnError extends boolean = false>(options: Options<PostApiV1UserRegisterData, ThrowOnError>) => (options.client ?? client).post<PostApiV1UserRegisterResponses, PostApiV1UserRegisterErrors, ThrowOnError>({\n    url: '/api/v1/user/register',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options.headers\n    }\n});\n\nexport const postApiV1UserLogin = <ThrowOnError extends boolean = false>(options: Options<PostApiV1UserLoginData, ThrowOnError>) => (options.client ?? client).post<PostApiV1UserLoginResponses, unknown, ThrowOnError>({\n    url: '/api/v1/user/login',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options.headers\n    }\n});\n\nexport const postApiV1UserRefresh = <ThrowOnError extends boolean = false>(options: Options<PostApiV1UserRefreshData, ThrowOnError>) => (options.client ?? client).post<PostApiV1UserRefreshResponses, unknown, ThrowOnError>({\n    url: '/api/v1/user/refresh',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options.headers\n    }\n});\n\nexport const mapIdentityApiApiVVersionApiVersionUserConfirmEmail = <ThrowOnError extends boolean = false>(options: Options<MapIdentityApiApiVVersionApiVersionUserConfirmEmailData, ThrowOnError>) => (options.client ?? client).get<MapIdentityApiApiVVersionApiVersionUserConfirmEmailResponses, unknown, ThrowOnError>({ url: '/api/v1/user/confirmEmail', ...options });\n\nexport const postApiV1UserResendConfirmationEmail = <ThrowOnError extends boolean = false>(options: Options<PostApiV1UserResendConfirmationEmailData, ThrowOnError>) => (options.client ?? client).post<PostApiV1UserResendConfirmationEmailResponses, unknown, ThrowOnError>({\n    url: '/api/v1/user/resendConfirmationEmail',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options.headers\n    }\n});\n\nexport const postApiV1UserForgotPassword = <ThrowOnError extends boolean = false>(options: Options<PostApiV1UserForgotPasswordData, ThrowOnError>) => (options.client ?? client).post<PostApiV1UserForgotPasswordResponses, PostApiV1UserForgotPasswordErrors, ThrowOnError>({\n    url: '/api/v1/user/forgotPassword',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options.headers\n    }\n});\n\nexport const postApiV1UserResetPassword = <ThrowOnError extends boolean = false>(options: Options<PostApiV1UserResetPasswordData, ThrowOnError>) => (options.client ?? client).post<PostApiV1UserResetPasswordResponses, PostApiV1UserResetPasswordErrors, ThrowOnError>({\n    url: '/api/v1/user/resetPassword',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options.headers\n    }\n});\n\nexport const postApiV1UserManage2Fa = <ThrowOnError extends boolean = false>(options: Options<PostApiV1UserManage2FaData, ThrowOnError>) => (options.client ?? client).post<PostApiV1UserManage2FaResponses, PostApiV1UserManage2FaErrors, ThrowOnError>({\n    url: '/api/v1/user/manage/2fa',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options.headers\n    }\n});\n\nexport const getApiV1UserManageInfo = <ThrowOnError extends boolean = false>(options?: Options<GetApiV1UserManageInfoData, ThrowOnError>) => (options?.client ?? client).get<GetApiV1UserManageInfoResponses, GetApiV1UserManageInfoErrors, ThrowOnError>({ url: '/api/v1/user/manage/info', ...options });\n\nexport const postApiV1UserManageInfo = <ThrowOnError extends boolean = false>(options: Options<PostApiV1UserManageInfoData, ThrowOnError>) => (options.client ?? client).post<PostApiV1UserManageInfoResponses, PostApiV1UserManageInfoErrors, ThrowOnError>({\n    url: '/api/v1/user/manage/info',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options.headers\n    }\n});\n\nexport const postApiV1UserLogout = <ThrowOnError extends boolean = false>(options?: Options<PostApiV1UserLogoutData, ThrowOnError>) => (options?.client ?? client).post<PostApiV1UserLogoutResponses, unknown, ThrowOnError>({\n    url: '/api/v1/user/logout',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json;odata.metadata=minimal;odata.streaming=true',\n        ...options?.headers\n    }\n});\n\n/**\n * @deprecated\n */\nexport const getApiV1UserDocumentsSummary = <ThrowOnError extends boolean = false>(options?: Options<GetApiV1UserDocumentsSummaryData, ThrowOnError>) => (options?.client ?? client).get<GetApiV1UserDocumentsSummaryResponses, unknown, ThrowOnError>({ url: '/api/v1/user/documents-summary', ...options });\n\nexport const deleteApiV1User = <ThrowOnError extends boolean = false>(options?: Options<DeleteApiV1UserData, ThrowOnError>) => (options?.client ?? client).delete<DeleteApiV1UserResponses, unknown, ThrowOnError>({ url: '/api/v1/user', ...options });\n\nexport const getApiV1UsersMe = <ThrowOnError extends boolean = false>(options?: Options<GetApiV1UsersMeData, ThrowOnError>) => (options?.client ?? client).get<GetApiV1UsersMeResponses, unknown, ThrowOnError>({ url: '/api/v1/users/me', ...options });\n\nexport const patchApiV1UsersById = <ThrowOnError extends boolean = false>(options: Options<PatchApiV1UsersByIdData, ThrowOnError>) => (options.client ?? client).patch<PatchApiV1UsersByIdResponses, unknown, ThrowOnError>({\n    url: '/api/v1/users/{id}',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json;odata.metadata=minimal;odata.streaming=true',\n        ...options.headers\n    }\n});\n"
  },
  {
    "path": "packages/openapi-ts-tests/sdks/__snapshots__/method-class-conflict/flat/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type ClientOptions = {\n    baseUrl: `${string}://${string}` | (string & {});\n};\n\nexport type AccessTokenResponse = {\n    readonly tokenType?: string;\n    accessToken: string;\n    expiresIn: number;\n    refreshToken: string;\n};\n\nexport type AccountingCompany = {\n    id: number;\n    name: string;\n    identificationNumber: string;\n    /**\n     * @deprecated\n     */\n    countryCode?: string;\n    country: Country;\n};\n\nexport type AccountingCompanyCreateDto = {\n    name: string;\n    identificationNumber: string;\n};\n\nexport type AccountingCompanyMembership = {\n    id: number;\n    accountingCompanyId: number;\n    accountingCompanyName: string;\n    userId: number;\n    userFullName: string;\n    roleName: string;\n};\n\nexport type AccountingCompanyMembershipUpsertDto = {\n    accountingCompanyId: number;\n    email: string;\n    roleName: string;\n};\n\nexport type AccountingCompanyUpdateDto = {\n    name: string;\n    identificationNumber: string;\n};\n\nexport type AddressDto = {\n    street: string;\n    city: string;\n    postalCode: string;\n    country: string;\n};\n\nexport type AnnualInvoicesCount = 'Tens' | 'Hundred' | 'Thousands' | 'TenThousands' | 'HundredThousands';\n\nexport type BankAccount = {\n    id: number;\n    businessId: number;\n    accountNumber: string;\n    bankCode: string;\n    swift: string;\n    iban: string;\n    currency: Currency;\n    createdAt: string;\n    updatedAt?: string | null;\n};\n\nexport type BankAccountUpsertDto = {\n    businessId: number;\n    accountNumber: string;\n    bankCode: string;\n    swift: string;\n    iban: string;\n    currency: Currency;\n};\n\nexport type Business = {\n    id: number;\n    name: string;\n    identificationNumber: string;\n    vatNumber: string | null;\n    country: Country;\n    /**\n     * @deprecated\n     */\n    countryCode?: string;\n    deletedAt: string | null;\n    fullAddress: string | null;\n    accountingCompany: BusinessAccountingCompany;\n    contactPerson: BusinessContactPerson;\n};\n\nexport type BusinessAccountantAssignment = {\n    id: number;\n    businessId: number;\n    businessName: string;\n    accountantId: number;\n    accountantName: string;\n};\n\nexport type BusinessAccountantAssignmentUpsert = {\n    businessId: number;\n    accountantId: number;\n};\n\nexport type BusinessAccountingCompany = {\n    id: number;\n    name: string;\n};\n\nexport type BusinessAresAddress = {\n    street: string;\n    houseNumber: number;\n    guidanceNumber?: number | null;\n    city: string;\n    postalCode: number;\n};\n\nexport type BusinessChangeContactDto = {\n    userId: number | null;\n};\n\nexport type BusinessContactPerson = {\n    id: number;\n    fullName: string;\n    email: string | null;\n    phoneNumber: string | null;\n};\n\nexport type BusinessCreateDto = {\n    name: string;\n    identificationNumber: string;\n    vatNumber?: string | null;\n    address?: BusinessAresAddress;\n};\n\nexport type BusinessDocumentMoveToBusinessDocumentsDto = {\n    businessId: number;\n    documentTypeId?: number | null;\n};\n\nexport type BusinessDocumentUpdateDto = {\n    name: string | null;\n    documentTypeId: number | null;\n};\n\nexport type BusinessDocumentsSummary = {\n    id: number;\n    name: string;\n    documentsCount: number;\n    documentsSize: number;\n    lastUploadAt: string | null;\n    maxStorageSize: number;\n};\n\nexport type BusinessMembershipDto = {\n    id: number;\n    userId: number;\n    userFullName: string;\n    businessId: number;\n    businessName: string;\n    roleId: number;\n    roleName: string;\n};\n\nexport type BusinessMembershipUpsertDto = {\n    businessId: number;\n    email: string;\n    roleName: string;\n};\n\nexport type BusinessSummary = {\n    id: number;\n    name: string;\n    documentsCount: number;\n    documentsSize: number;\n    lastUploadAt: string | null;\n    /**\n     * @deprecated\n     */\n    maxStorageSize?: number;\n    pendingTasksCount: number;\n    pendingDocumentsCount: number;\n};\n\nexport type BusinessUpdateDto = {\n    name: string;\n    identificationNumber: string;\n    vatNumber?: string | null;\n    address?: BusinessAresAddress;\n};\n\nexport type Counterparty = {\n    id: number;\n    businessId: number;\n    name: string;\n    identificationNumber: string | null;\n    vatNumber: string | null;\n    address: AddressDto;\n    email: string | null;\n    privateNote: string | null;\n    isFavourite: boolean | null;\n    createdAt: string;\n    updatedAt?: string | null;\n};\n\nexport type CounterpartyCreateDto = {\n    businessId: number;\n    identificationNumber: string;\n    name: string;\n    vatNumber: string | null;\n    address: AddressDto;\n    email: string | null;\n    privateNote?: string | null;\n    isFavourite?: boolean | null;\n};\n\nexport type CounterpartyUpdateDto = {\n    identificationNumber?: string | null;\n    name?: string | null;\n    vatNumber?: string | null;\n    address?: AddressDto;\n    email?: string | null;\n    privateNote?: string | null;\n    isFavourite?: boolean | null;\n};\n\nexport type Country = 'Czechia' | 'Slovakia';\n\nexport type CreateInvoiceClientDto = {\n    counterpartyId: number;\n};\n\nexport type Currency = 'CZK' | 'EUR' | 'USD' | 'GBP';\n\nexport type DataBoxCredentials = {\n    id?: number;\n    username: string;\n    password: string | null;\n    businessId: number;\n    businessName: string;\n    userId: number;\n};\n\nexport type DataBoxCredentialsUpsertDto = {\n    businessId: number;\n    username: string | null;\n    password: string | null;\n};\n\nexport type DocumentAction = 'Uploaded';\n\nexport type DocumentBusiness = {\n    id: number;\n    /**\n     * @deprecated\n     */\n    name?: string;\n    documentName: string;\n    originalFileName: string;\n    extension: string | null;\n    size: number;\n    businessId: number | null;\n    businessName: string | null;\n    documentTypeId: number;\n    documentTypeName: string;\n    approvedAt: string | null;\n    approverId: number | null;\n    approverFullName: string | null;\n    taskId: number | null;\n    uploadedAt: string;\n    uploaderId: number | null;\n    deletedAt?: string | null;\n};\n\nexport type DocumentBusinessActivity = {\n    documentId: number;\n    documentName: string;\n    businessId: number;\n    businessName: string;\n    action: DocumentAction;\n    happenedAt: string;\n    performedByUserId: number | null;\n    performedByUserFullName: string | null;\n};\n\nexport type DocumentPersonal = {\n    id: number;\n    name: string;\n    extension: string | null;\n    size: number;\n    userId: number;\n    userFullName: string;\n    uploadedAt?: string;\n    deletedAt?: string | null;\n};\n\nexport type DocumentPersonalMoveToBusinessDocumentsDto = {\n    businessId: number;\n    documentTypeId?: number;\n};\n\nexport type DocumentType = {\n    id: number;\n    name: string;\n};\n\nexport type DocumentTypesSummary = {\n    documentTypeId: number;\n    documentTypeName: string;\n    documentsCount: number;\n};\n\nexport type FeedbackType = 'Feedback' | 'Bug';\n\nexport type ForgotPasswordRequest = {\n    email: string;\n};\n\nexport type HttpValidationProblemDetails = {\n    type?: string | null;\n    title?: string | null;\n    status?: number | null;\n    detail?: string | null;\n    instance?: string | null;\n    errors?: {\n        [key: string]: Array<string>;\n    };\n    [key: string]: unknown;\n};\n\nexport type InfoRequest = {\n    newEmail?: string | null;\n    newPassword?: string | null;\n    oldPassword?: string | null;\n};\n\nexport type InfoResponse = {\n    email: string;\n    isEmailConfirmed: boolean;\n};\n\nexport type Invitation = {\n    id: number;\n    accountingCompanyName: string;\n    status: InvitationStatus;\n    expiresAt: string;\n    email: string;\n};\n\nexport type InvitationAcceptDto = {\n    businessId: number;\n};\n\nexport type InvitationCreateDto = {\n    accountingCompanyId: number;\n    email: string;\n};\n\nexport type InvitationStatus = 'Pending' | 'Expired' | 'Rejected';\n\nexport type InvitationUpdateDto = {\n    email?: string | null;\n};\n\nexport type Invoice = {\n    id: number;\n    businessId: number;\n    supplier: InvoiceSupplier;\n    client: InvoiceClient;\n    bankAccount: InvoiceBankAccount;\n    hideBankAccount: boolean;\n    type: InvoiceType;\n    number: string;\n    status: InvoiceStatus;\n    paymentMethod: PaymentMethod;\n    currency: Currency;\n    reversedVatCharge: boolean;\n    variableSymbol: string | null;\n    constantSymbol: string | null;\n    issuedAt: string;\n    dueAt: string;\n    taxPointAt: string | null;\n    sentAt: string | null;\n    snapshotAt: string | null;\n    noteBeforeLines: string | null;\n    lines: Array<InvoiceLine>;\n    footerNote: string | null;\n    totalPriceExcludingVat: number;\n    totalVatAmount: number;\n    totalPriceIncludingVat: number;\n    createdAt: string;\n    updatedAt: string | null;\n};\n\nexport type InvoiceBankAccount = {\n    swift: string;\n    iban: string;\n    accountNumber: string;\n    bankCode: string;\n    currency: Currency;\n};\n\nexport type InvoiceBankAccountUpdateDto = {\n    swift: string;\n    iban: string;\n    accountNumber: string;\n    bankCode: string;\n    currency: Currency;\n};\n\nexport type InvoiceClient = {\n    /**\n     * @deprecated\n     */\n    id?: number | null;\n    counterpartyId: number | null;\n    name: string;\n    registrationNumber: string | null;\n    identificationNumber: string | null;\n    vatNumber: string | null;\n    email: string | null;\n    address: InvoiceClientAddress;\n    deliveryName: string | null;\n    deliveryAddress: InvoiceClientDeliveryAddress;\n};\n\nexport type InvoiceClientAddress = {\n    street: string;\n    city: string;\n    postalCode: string;\n    country: string;\n};\n\nexport type InvoiceClientDeliveryAddress = {\n    street: string;\n    city: string;\n    postalCode: string;\n    country: string;\n};\n\nexport type InvoiceCreateDto = {\n    client: CreateInvoiceClientDto;\n    type: InvoiceType;\n    number: string;\n    status: InvoiceStatus;\n    paymentMethod: PaymentMethod;\n    hideBankAccount: boolean;\n    reversedVatCharge: boolean;\n    variableSymbol?: string | null;\n    constantSymbol?: string | null;\n    issuedAt: string;\n    dueAt: string;\n    taxPointAt: string;\n    noteBeforeLines?: string | null;\n    lines: Array<InvoiceLineCreateDto>;\n    footerNote?: string | null;\n    businessId: number;\n};\n\nexport type InvoiceLine = {\n    id?: number;\n    description: string;\n    quantity: number;\n    unit: string;\n    unitPrice: number;\n    vatRate: number;\n    totalPriceExcludingVat: number;\n    vatAmount: number;\n    totalPriceIncludingVat: number;\n};\n\nexport type InvoiceLineCreateDto = {\n    description: string;\n    quantity: number;\n    unit: string;\n    unitPrice: number;\n    vatRate: number;\n};\n\nexport type InvoiceLineUpdateDto = {\n    id: number | null;\n    description: string;\n    quantity: number;\n    unit: string;\n    unitPrice: number;\n    vatRate: number;\n};\n\nexport type InvoiceSendDto = {\n    customRecipientEmail: string | null;\n    message: string;\n};\n\nexport type InvoiceSetting = {\n    businessId: number;\n    isVatPayer: boolean;\n    template: InvoiceTemplate;\n    bankAccount?: InvoiceSettingsBankAccount;\n    numberingSetting: NumberingSetting;\n    createdAt: string;\n    updatedAt?: string | null;\n};\n\nexport type InvoiceSettingUpsertDto = {\n    businessId: number;\n    isVatPayer: boolean;\n    template: InvoiceTemplateUpsertDto;\n    bankAccount?: InvoiceSettingsBankAccountUpsertDto;\n    numberingSetting: NumberingSettingUpsertDto;\n};\n\nexport type InvoiceSettingsBankAccount = {\n    id: number;\n    businessId: number;\n    /**\n     * @deprecated\n     */\n    number: string;\n    accountNumber: string;\n    bankCode: string;\n    swift: string;\n    iban: string;\n    currency: Currency;\n    createdAt: string;\n    updatedAt?: string | null;\n};\n\nexport type InvoiceSettingsBankAccountUpsertDto = {\n    accountNumber: string;\n    bankCode: string;\n    swift: string;\n    iban: string;\n    currency: Currency;\n};\n\nexport type InvoiceStatus = 'Draft' | 'Issued' | 'Paid' | 'Overdue' | 'Cancelled' | 'Snapshot';\n\nexport type InvoiceSupplier = {\n    name: string;\n    registrationNumber: string;\n    identificationNumber: string;\n    vatNumber: string | null;\n    address: InvoiceSupplierAddress;\n};\n\nexport type InvoiceSupplierAddress = {\n    street: string;\n    city: string;\n    postalCode: string;\n    country: string;\n};\n\nexport type InvoiceTemplate = {\n    currency: Currency;\n    textBeforeLines: string | null;\n    footerText: string | null;\n};\n\nexport type InvoiceTemplateUpsertDto = {\n    currency: Currency;\n    textBeforeLines: string | null;\n    footerText: string | null;\n};\n\nexport type InvoiceType = 'Regular' | 'Corrective' | 'Advance';\n\nexport type InvoiceUpdateClientDto = {\n    counterpartyId: number | null;\n    name: string | null;\n    registrationNumber: string | null;\n    vatNumber: string | null;\n    email: string | null;\n    address: AddressDto;\n    deliveryName: string | null;\n    deliveryAddress: AddressDto;\n};\n\nexport type InvoiceUpdateDto = {\n    client: InvoiceUpdateClientDto;\n    bankAccount: InvoiceBankAccountUpdateDto;\n    hideBankAccount: boolean | null;\n    type: InvoiceType;\n    number: string | null;\n    status: InvoiceStatus;\n    paymentMethod: PaymentMethod;\n    currency: Currency;\n    reversedVatCharge: boolean | null;\n    variableSymbol: string | null;\n    constantSymbol: string | null;\n    issuedAt: string | null;\n    dueAt: string | null;\n    taxPointAt: string | null;\n    noteBeforeLines: string | null;\n    lines: Array<InvoiceLineUpdateDto> | null;\n    footerNote: string | null;\n};\n\nexport type LicenseDto = {\n    id: number;\n    tierId: number;\n    tierName: string;\n    businessId: number | null;\n    /**\n     * @deprecated\n     */\n    maxStorageSize?: number;\n    maxBusinessStorageSize: number;\n    maxBusinessMembersCount: number;\n    maxContactsCount: number;\n};\n\nexport type LoginRequest = {\n    email: string;\n    password: string;\n    twoFactorCode?: string | null;\n    twoFactorRecoveryCode?: string | null;\n};\n\nexport type NotificationsDeviceTokenDeleteDto = {\n    token: string;\n};\n\nexport type NotificationsDeviceTokenUpsertDto = {\n    provider: PushNotificationsProvider;\n    token: string;\n};\n\nexport type NotificationsTestSendDto = {\n    token: string | null;\n};\n\nexport type NumberingSetting = {\n    id: number;\n    businessId: number;\n    yearFormat: YearFormat;\n    isMonthIncluded: boolean;\n    useHyphen: boolean;\n    prefix?: string | null;\n    suffix?: string | null;\n    sequencePosition: SequencePosition;\n    annualInvoicesCount: AnnualInvoicesCount;\n    format: string;\n    lastExternalInvoiceSequenceNumber: number | null;\n    createdAt: string;\n    updatedAt?: string | null;\n};\n\nexport type NumberingSettingUpsertDto = {\n    yearFormat: YearFormat;\n    isMonthIncluded: boolean;\n    useHyphen: boolean;\n    prefix: string | null;\n    suffix: string | null;\n    sequencePosition: SequencePosition;\n    annualInvoicesCount: AnnualInvoicesCount;\n    lastExternalInvoiceSequenceNumber?: number | null;\n};\n\nexport type PaymentMethod = 'Cash' | 'BankTransfer';\n\nexport type PersonalDocumentsSummary = {\n    documentsCount: number;\n    documentsSize: number;\n    maxStorageSize: number;\n};\n\nexport type PushNotificationsProvider = 1 | 2;\n\nexport type RecurrenceType = 'Daily' | 'Weekly' | 'Monthly' | 'Yearly';\n\nexport type RecurringTask = {\n    id: number;\n    title: string;\n    details: string;\n    accountingCompanyId: number;\n    accountingCompanyName: string;\n    accountantId: number | null;\n    accountantFullName: string | null;\n    recurrenceType?: RecurrenceType;\n    period: RecurrenceType;\n    interval: number;\n    executeAt: string;\n    isActive: boolean;\n    businesses: Array<RecurringTaskBusiness>;\n    documentTypeId: number;\n    documentTypeName: string;\n};\n\nexport type RecurringTaskBusiness = {\n    id: number;\n    name: string;\n};\n\nexport type RecurringTaskCreateDto = {\n    title: string;\n    details: string;\n    recurrenceType: RecurrenceType;\n    interval?: number;\n    firstTaskDueAt: string;\n    accountingCompanyId: number;\n    businessIds: Array<number>;\n    documentTypeId: number;\n};\n\nexport type RecurringTaskUpdateDto = {\n    title?: string | null;\n    details?: string | null;\n    isActive?: boolean | null;\n    recurrenceType?: RecurrenceType;\n    interval?: number | null;\n    nextTasksCreateAt?: string | null;\n    documentTypeId?: number | null;\n};\n\nexport type RefreshRequest = {\n    refreshToken: string;\n};\n\nexport type RegisterRequest = {\n    email: string;\n    password: string;\n};\n\nexport type ResendConfirmationEmailRequest = {\n    email: string;\n};\n\nexport type ResetPasswordRequest = {\n    email: string;\n    resetCode: string;\n    newPassword: string;\n};\n\nexport type SendFeedbackRequest = {\n    type: FeedbackType;\n    subject: string;\n    message: string;\n    platform: string;\n    deviceInfo?: string | null;\n    appVersion?: string | null;\n    traceId?: string | null;\n};\n\nexport type SequencePosition = 'Start' | 'End';\n\nexport type Task = {\n    id: number;\n    title: string;\n    details: string;\n    dueAt: string;\n    status: TaskStatus;\n    businessId: number;\n    businessName: string;\n    documentTypeId: number;\n    documentTypeName: string;\n};\n\nexport type TaskComment = {\n    id: number;\n    taskId: number | null;\n    content: string;\n    authorId: number | null;\n    authorFullName: string | null;\n    createdAt: string;\n};\n\nexport type TaskRejectDto = {\n    reason: string;\n};\n\nexport type TaskStatus = 'PendingClient' | 'PendingAccountant' | 'Completed' | 'Canceled';\n\nexport type TaskSubmitDto = {\n    answer: string | null;\n};\n\nexport type TaskUpdateDto = {\n    title: string;\n    details: string;\n    dueAt: string;\n    documentTypeId?: number | null;\n};\n\nexport type TasksCreateDto = {\n    businessIds: Array<number>;\n    documentTypeId?: number;\n    title: string;\n    details: string;\n    dueAt: string;\n};\n\nexport type TwoFactorRequest = {\n    enable?: boolean | null;\n    twoFactorCode?: string | null;\n    resetSharedKey?: boolean;\n    resetRecoveryCodes?: boolean;\n    forgetMachine?: boolean;\n};\n\nexport type TwoFactorResponse = {\n    sharedKey: string;\n    recoveryCodesLeft: number;\n    recoveryCodes?: Array<string> | null;\n    isTwoFactorEnabled: boolean;\n    isMachineRemembered: boolean;\n};\n\nexport type User = {\n    id: number;\n    email: string | null;\n    emailConfirmed: boolean;\n    fullName: string;\n    phoneNumber: string | null;\n    isAccountant: boolean;\n};\n\nexport type UserUpdateDto = {\n    firstName?: string | null;\n    lastName?: string | null;\n    phoneNumber?: string | null;\n};\n\nexport type YearFormat = 'Full' | 'Short';\n\nexport type AccessTokenResponseWritable = {\n    accessToken: string;\n    expiresIn: number;\n    refreshToken: string;\n};\n\nexport type PostApiV1AccountingCompaniesData = {\n    body?: AccountingCompanyCreateDto;\n    path?: never;\n    query?: never;\n    url: '/api/v1/accounting-companies';\n};\n\nexport type PostApiV1AccountingCompaniesResponses = {\n    /**\n     * OK\n     */\n    200: AccountingCompany;\n};\n\nexport type PostApiV1AccountingCompaniesResponse = PostApiV1AccountingCompaniesResponses[keyof PostApiV1AccountingCompaniesResponses];\n\nexport type DeleteApiV1AccountingCompaniesByIdData = {\n    body?: never;\n    path: {\n        id: number;\n    };\n    query?: never;\n    url: '/api/v1/accounting-companies/{id}';\n};\n\nexport type DeleteApiV1AccountingCompaniesByIdResponses = {\n    /**\n     * OK\n     */\n    200: unknown;\n};\n\nexport type PostApiV1AccountingCompaniesByIdData = {\n    body?: AccountingCompanyUpdateDto;\n    path: {\n        id: number;\n    };\n    query?: never;\n    url: '/api/v1/accounting-companies/{id}';\n};\n\nexport type PostApiV1AccountingCompaniesByIdResponses = {\n    /**\n     * OK\n     */\n    200: AccountingCompany;\n};\n\nexport type PostApiV1AccountingCompaniesByIdResponse = PostApiV1AccountingCompaniesByIdResponses[keyof PostApiV1AccountingCompaniesByIdResponses];\n\nexport type ApiVVersionApiVersionOdataAccountingCompaniesData = {\n    body?: never;\n    path?: never;\n    query?: {\n        /**\n         * Limits the properties returned in the result.\n         */\n        select?: string;\n        /**\n         * Indicates the related entities to be represented inline. The maximum depth is 2.\n         */\n        expand?: string;\n        /**\n         * Restricts the set of items returned. The maximum number of expressions is 100. The allowed functions are: allfunctions.\n         */\n        filter?: string;\n        /**\n         * Specifies the order in which items are returned. The maximum number of expressions is 5.\n         */\n        orderby?: string;\n        /**\n         * Limits the number of items returned from a collection. The maximum value is 100.\n         */\n        top?: number;\n        /**\n         * Excludes the specified number of items of the queried collection from the result.\n         */\n        skip?: number;\n        /**\n         * Indicates whether the total count of items within a collection are returned in the result.\n         */\n        count?: boolean;\n    };\n    url: '/api/v1/odata/AccountingCompanies';\n};\n\nexport type ApiVVersionApiVersionOdataAccountingCompaniesResponses = {\n    /**\n     * OK\n     */\n    200: Array<AccountingCompany>;\n};\n\nexport type ApiVVersionApiVersionOdataAccountingCompaniesResponse = ApiVVersionApiVersionOdataAccountingCompaniesResponses[keyof ApiVVersionApiVersionOdataAccountingCompaniesResponses];\n\nexport type ApiVVersionApiVersionOdataAccountingCompaniesCountData = {\n    body?: never;\n    path?: never;\n    query?: {\n        /**\n         * Limits the properties returned in the result.\n         */\n        select?: string;\n        /**\n         * Indicates the related entities to be represented inline. The maximum depth is 2.\n         */\n        expand?: string;\n        /**\n         * Restricts the set of items returned. The maximum number of expressions is 100. The allowed functions are: allfunctions.\n         */\n        filter?: string;\n        /**\n         * Specifies the order in which items are returned. The maximum number of expressions is 5.\n         */\n        orderby?: string;\n        /**\n         * Limits the number of items returned from a collection. The maximum value is 100.\n         */\n        top?: number;\n        /**\n         * Excludes the specified number of items of the queried collection from the result.\n         */\n        skip?: number;\n        /**\n         * Indicates whether the total count of items within a collection are returned in the result.\n         */\n        count?: boolean;\n    };\n    url: '/api/v1/odata/AccountingCompanies/$count';\n};\n\nexport type ApiVVersionApiVersionOdataAccountingCompaniesCountResponses = {\n    /**\n     * OK\n     */\n    200: Array<AccountingCompany>;\n};\n\nexport type ApiVVersionApiVersionOdataAccountingCompaniesCountResponse = ApiVVersionApiVersionOdataAccountingCompaniesCountResponses[keyof ApiVVersionApiVersionOdataAccountingCompaniesCountResponses];\n\nexport type PutApiV1AccountingCompanyMembershipsData = {\n    body?: AccountingCompanyMembershipUpsertDto;\n    path?: never;\n    query?: never;\n    url: '/api/v1/accounting-company-memberships';\n};\n\nexport type PutApiV1AccountingCompanyMembershipsResponses = {\n    /**\n     * OK\n     */\n    200: AccountingCompanyMembership;\n};\n\nexport type PutApiV1AccountingCompanyMembershipsResponse = PutApiV1AccountingCompanyMembershipsResponses[keyof PutApiV1AccountingCompanyMembershipsResponses];\n\nexport type DeleteApiV1AccountingCompanyMembershipsByIdData = {\n    body?: never;\n    path: {\n        id: number;\n    };\n    query?: never;\n    url: '/api/v1/accounting-company-memberships/{id}';\n};\n\nexport type DeleteApiV1AccountingCompanyMembershipsByIdResponses = {\n    /**\n     * OK\n     */\n    200: unknown;\n};\n\nexport type ApiVVersionApiVersionOdataAccountingCompanyMembershipsData = {\n    body?: never;\n    path?: never;\n    query?: {\n        /**\n         * Limits the properties returned in the result.\n         */\n        select?: string;\n        /**\n         * Indicates the related entities to be represented inline. The maximum depth is 2.\n         */\n        expand?: string;\n        /**\n         * Restricts the set of items returned. The maximum number of expressions is 100. The allowed functions are: allfunctions.\n         */\n        filter?: string;\n        /**\n         * Specifies the order in which items are returned. The maximum number of expressions is 5.\n         */\n        orderby?: string;\n        /**\n         * Limits the number of items returned from a collection. The maximum value is 100.\n         */\n        top?: number;\n        /**\n         * Excludes the specified number of items of the queried collection from the result.\n         */\n        skip?: number;\n        /**\n         * Indicates whether the total count of items within a collection are returned in the result.\n         */\n        count?: boolean;\n    };\n    url: '/api/v1/odata/AccountingCompanyMemberships';\n};\n\nexport type ApiVVersionApiVersionOdataAccountingCompanyMembershipsResponses = {\n    /**\n     * OK\n     */\n    200: Array<AccountingCompanyMembership>;\n};\n\nexport type ApiVVersionApiVersionOdataAccountingCompanyMembershipsResponse = ApiVVersionApiVersionOdataAccountingCompanyMembershipsResponses[keyof ApiVVersionApiVersionOdataAccountingCompanyMembershipsResponses];\n\nexport type ApiVVersionApiVersionOdataAccountingCompanyMembershipsCountData = {\n    body?: never;\n    path?: never;\n    query?: {\n        /**\n         * Limits the properties returned in the result.\n         */\n        select?: string;\n        /**\n         * Indicates the related entities to be represented inline. The maximum depth is 2.\n         */\n        expand?: string;\n        /**\n         * Restricts the set of items returned. The maximum number of expressions is 100. The allowed functions are: allfunctions.\n         */\n        filter?: string;\n        /**\n         * Specifies the order in which items are returned. The maximum number of expressions is 5.\n         */\n        orderby?: string;\n        /**\n         * Limits the number of items returned from a collection. The maximum value is 100.\n         */\n        top?: number;\n        /**\n         * Excludes the specified number of items of the queried collection from the result.\n         */\n        skip?: number;\n        /**\n         * Indicates whether the total count of items within a collection are returned in the result.\n         */\n        count?: boolean;\n    };\n    url: '/api/v1/odata/AccountingCompanyMemberships/$count';\n};\n\nexport type ApiVVersionApiVersionOdataAccountingCompanyMembershipsCountResponses = {\n    /**\n     * OK\n     */\n    200: Array<AccountingCompanyMembership>;\n};\n\nexport type ApiVVersionApiVersionOdataAccountingCompanyMembershipsCountResponse = ApiVVersionApiVersionOdataAccountingCompanyMembershipsCountResponses[keyof ApiVVersionApiVersionOdataAccountingCompanyMembershipsCountResponses];\n\nexport type PutApiV1BankAccountsData = {\n    body?: BankAccountUpsertDto;\n    path?: never;\n    query?: never;\n    url: '/api/v1/bank-accounts';\n};\n\nexport type PutApiV1BankAccountsResponses = {\n    /**\n     * OK\n     */\n    200: BankAccount;\n};\n\nexport type PutApiV1BankAccountsResponse = PutApiV1BankAccountsResponses[keyof PutApiV1BankAccountsResponses];\n\nexport type DeleteApiV1BankAccountsByIdData = {\n    body?: never;\n    path: {\n        id: number;\n    };\n    query?: never;\n    url: '/api/v1/bank-accounts/{id}';\n};\n\nexport type DeleteApiV1BankAccountsByIdResponses = {\n    /**\n     * OK\n     */\n    200: unknown;\n};\n\nexport type ApiVVersionApiVersionOdataBankAccountsData = {\n    body?: never;\n    path?: never;\n    query?: {\n        /**\n         * Limits the properties returned in the result.\n         */\n        select?: string;\n        /**\n         * Indicates the related entities to be represented inline. The maximum depth is 2.\n         */\n        expand?: string;\n        /**\n         * Restricts the set of items returned. The maximum number of expressions is 100. The allowed functions are: allfunctions.\n         */\n        filter?: string;\n        /**\n         * Specifies the order in which items are returned. The maximum number of expressions is 5.\n         */\n        orderby?: string;\n        /**\n         * Limits the number of items returned from a collection. The maximum value is 100.\n         */\n        top?: number;\n        /**\n         * Excludes the specified number of items of the queried collection from the result.\n         */\n        skip?: number;\n        /**\n         * Indicates whether the total count of items within a collection are returned in the result.\n         */\n        count?: boolean;\n    };\n    url: '/api/v1/odata/BankAccounts';\n};\n\nexport type ApiVVersionApiVersionOdataBankAccountsResponses = {\n    /**\n     * OK\n     */\n    200: Array<BankAccount>;\n};\n\nexport type ApiVVersionApiVersionOdataBankAccountsResponse = ApiVVersionApiVersionOdataBankAccountsResponses[keyof ApiVVersionApiVersionOdataBankAccountsResponses];\n\nexport type ApiVVersionApiVersionOdataBankAccountsCountData = {\n    body?: never;\n    path?: never;\n    query?: {\n        /**\n         * Limits the properties returned in the result.\n         */\n        select?: string;\n        /**\n         * Indicates the related entities to be represented inline. The maximum depth is 2.\n         */\n        expand?: string;\n        /**\n         * Restricts the set of items returned. The maximum number of expressions is 100. The allowed functions are: allfunctions.\n         */\n        filter?: string;\n        /**\n         * Specifies the order in which items are returned. The maximum number of expressions is 5.\n         */\n        orderby?: string;\n        /**\n         * Limits the number of items returned from a collection. The maximum value is 100.\n         */\n        top?: number;\n        /**\n         * Excludes the specified number of items of the queried collection from the result.\n         */\n        skip?: number;\n        /**\n         * Indicates whether the total count of items within a collection are returned in the result.\n         */\n        count?: boolean;\n    };\n    url: '/api/v1/odata/BankAccounts/$count';\n};\n\nexport type ApiVVersionApiVersionOdataBankAccountsCountResponses = {\n    /**\n     * OK\n     */\n    200: Array<BankAccount>;\n};\n\nexport type ApiVVersionApiVersionOdataBankAccountsCountResponse = ApiVVersionApiVersionOdataBankAccountsCountResponses[keyof ApiVVersionApiVersionOdataBankAccountsCountResponses];\n\nexport type PutApiV1BusinessAccountantAssignmentsData = {\n    body?: BusinessAccountantAssignmentUpsert;\n    path?: never;\n    query?: never;\n    url: '/api/v1/business-accountant-assignments';\n};\n\nexport type PutApiV1BusinessAccountantAssignmentsResponses = {\n    /**\n     * OK\n     */\n    200: BusinessAccountantAssignment;\n};\n\nexport type PutApiV1BusinessAccountantAssignmentsResponse = PutApiV1BusinessAccountantAssignmentsResponses[keyof PutApiV1BusinessAccountantAssignmentsResponses];\n\nexport type DeleteApiV1BusinessAccountantAssignmentsByIdData = {\n    body?: never;\n    path: {\n        id: number;\n    };\n    query?: never;\n    url: '/api/v1/business-accountant-assignments/{id}';\n};\n\nexport type DeleteApiV1BusinessAccountantAssignmentsByIdResponses = {\n    /**\n     * OK\n     */\n    200: unknown;\n};\n\nexport type ApiVVersionApiVersionOdataBusinessAccountantAssignmentsData = {\n    body?: never;\n    path?: never;\n    query?: {\n        /**\n         * Limits the properties returned in the result.\n         */\n        select?: string;\n        /**\n         * Indicates the related entities to be represented inline. The maximum depth is 2.\n         */\n        expand?: string;\n        /**\n         * Restricts the set of items returned. The maximum number of expressions is 100. The allowed functions are: allfunctions.\n         */\n        filter?: string;\n        /**\n         * Specifies the order in which items are returned. The maximum number of expressions is 5.\n         */\n        orderby?: string;\n        /**\n         * Limits the number of items returned from a collection. The maximum value is 100.\n         */\n        top?: number;\n        /**\n         * Excludes the specified number of items of the queried collection from the result.\n         */\n        skip?: number;\n        /**\n         * Indicates whether the total count of items within a collection are returned in the result.\n         */\n        count?: boolean;\n    };\n    url: '/api/v1/odata/BusinessAccountantAssignments';\n};\n\nexport type ApiVVersionApiVersionOdataBusinessAccountantAssignmentsResponses = {\n    /**\n     * OK\n     */\n    200: Array<BusinessAccountantAssignment>;\n};\n\nexport type ApiVVersionApiVersionOdataBusinessAccountantAssignmentsResponse = ApiVVersionApiVersionOdataBusinessAccountantAssignmentsResponses[keyof ApiVVersionApiVersionOdataBusinessAccountantAssignmentsResponses];\n\nexport type ApiVVersionApiVersionOdataBusinessAccountantAssignmentsCountData = {\n    body?: never;\n    path?: never;\n    query?: {\n        /**\n         * Limits the properties returned in the result.\n         */\n        select?: string;\n        /**\n         * Indicates the related entities to be represented inline. The maximum depth is 2.\n         */\n        expand?: string;\n        /**\n         * Restricts the set of items returned. The maximum number of expressions is 100. The allowed functions are: allfunctions.\n         */\n        filter?: string;\n        /**\n         * Specifies the order in which items are returned. The maximum number of expressions is 5.\n         */\n        orderby?: string;\n        /**\n         * Limits the number of items returned from a collection. The maximum value is 100.\n         */\n        top?: number;\n        /**\n         * Excludes the specified number of items of the queried collection from the result.\n         */\n        skip?: number;\n        /**\n         * Indicates whether the total count of items within a collection are returned in the result.\n         */\n        count?: boolean;\n    };\n    url: '/api/v1/odata/BusinessAccountantAssignments/$count';\n};\n\nexport type ApiVVersionApiVersionOdataBusinessAccountantAssignmentsCountResponses = {\n    /**\n     * OK\n     */\n    200: Array<BusinessAccountantAssignment>;\n};\n\nexport type ApiVVersionApiVersionOdataBusinessAccountantAssignmentsCountResponse = ApiVVersionApiVersionOdataBusinessAccountantAssignmentsCountResponses[keyof ApiVVersionApiVersionOdataBusinessAccountantAssignmentsCountResponses];\n\nexport type GetApiV1BusinessDocumentsByIdRawData = {\n    body?: never;\n    path: {\n        id: number;\n    };\n    query?: never;\n    url: '/api/v1/business-documents/{id}/raw';\n};\n\nexport type GetApiV1BusinessDocumentsByIdRawResponses = {\n    /**\n     * OK\n     */\n    200: unknown;\n    /**\n     * No Content\n     */\n    204: void;\n};\n\nexport type GetApiV1BusinessDocumentsByIdRawResponse = GetApiV1BusinessDocumentsByIdRawResponses[keyof GetApiV1BusinessDocumentsByIdRawResponses];\n\nexport type PostApiV1BusinessDocumentsData = {\n    body?: {\n        BusinessId: number;\n        DocumentTypeId: number;\n        File: Blob | File;\n        DocumentName: string;\n        TaskId: number;\n    };\n    path?: never;\n    query?: never;\n    url: '/api/v1/business-documents';\n};\n\nexport type PostApiV1BusinessDocumentsResponses = {\n    /**\n     * OK\n     */\n    200: DocumentBusiness;\n};\n\nexport type PostApiV1BusinessDocumentsResponse = PostApiV1BusinessDocumentsResponses[keyof PostApiV1BusinessDocumentsResponses];\n\nexport type DeleteApiV1BusinessDocumentsByIdData = {\n    body?: never;\n    path: {\n        id: number;\n    };\n    query?: never;\n    url: '/api/v1/business-documents/{id}';\n};\n\nexport type DeleteApiV1BusinessDocumentsByIdResponses = {\n    /**\n     * OK\n     */\n    200: DocumentBusiness;\n};\n\nexport type DeleteApiV1BusinessDocumentsByIdResponse = DeleteApiV1BusinessDocumentsByIdResponses[keyof DeleteApiV1BusinessDocumentsByIdResponses];\n\nexport type PutApiV1BusinessDocumentsByIdData = {\n    body?: BusinessDocumentUpdateDto;\n    path: {\n        id: number;\n    };\n    query?: never;\n    url: '/api/v1/business-documents/{id}';\n};\n\nexport type PutApiV1BusinessDocumentsByIdResponses = {\n    /**\n     * OK\n     */\n    200: DocumentBusiness;\n};\n\nexport type PutApiV1BusinessDocumentsByIdResponse = PutApiV1BusinessDocumentsByIdResponses[keyof PutApiV1BusinessDocumentsByIdResponses];\n\nexport type PostApiV1BusinessDocumentsByIdApproveData = {\n    body?: never;\n    path: {\n        id: number;\n    };\n    query?: never;\n    url: '/api/v1/business-documents/{id}/approve';\n};\n\nexport type PostApiV1BusinessDocumentsByIdApproveResponses = {\n    /**\n     * OK\n     */\n    200: DocumentBusiness;\n};\n\nexport type PostApiV1BusinessDocumentsByIdApproveResponse = PostApiV1BusinessDocumentsByIdApproveResponses[keyof PostApiV1BusinessDocumentsByIdApproveResponses];\n\nexport type PostApiV1BusinessDocumentsByIdUnapproveData = {\n    body?: never;\n    path: {\n        id: number;\n    };\n    query?: never;\n    url: '/api/v1/business-documents/{id}/unapprove';\n};\n\nexport type PostApiV1BusinessDocumentsByIdUnapproveResponses = {\n    /**\n     * OK\n     */\n    200: DocumentBusiness;\n};\n\nexport type PostApiV1BusinessDocumentsByIdUnapproveResponse = PostApiV1BusinessDocumentsByIdUnapproveResponses[keyof PostApiV1BusinessDocumentsByIdUnapproveResponses];\n\nexport type PostApiV1BusinessDocumentsByIdMoveToPersonalData = {\n    body?: never;\n    path: {\n        id: number;\n    };\n    query?: never;\n    url: '/api/v1/business-documents/{id}/move-to-personal';\n};\n\nexport type PostApiV1BusinessDocumentsByIdMoveToPersonalResponses = {\n    /**\n     * OK\n     */\n    200: unknown;\n};\n\nexport type PostApiV1BusinessDocumentsByIdMoveToBusinessData = {\n    body?: BusinessDocumentMoveToBusinessDocumentsDto;\n    path: {\n        id: number;\n    };\n    query?: never;\n    url: '/api/v1/business-documents/{id}/move-to-business';\n};\n\nexport type PostApiV1BusinessDocumentsByIdMoveToBusinessResponses = {\n    /**\n     * OK\n     */\n    200: DocumentBusiness;\n};\n\nexport type PostApiV1BusinessDocumentsByIdMoveToBusinessResponse = PostApiV1BusinessDocumentsByIdMoveToBusinessResponses[keyof PostApiV1BusinessDocumentsByIdMoveToBusinessResponses];\n\nexport type ApiVVersionApiVersionOdataBusinessDocumentActivitiesData = {\n    body?: never;\n    path?: never;\n    query?: {\n        accountants?: Array<number>;\n        /**\n         * Limits the properties returned in the result.\n         */\n        select?: string;\n        /**\n         * Indicates the related entities to be represented inline. The maximum depth is 2.\n         */\n        expand?: string;\n        /**\n         * Restricts the set of items returned. The maximum number of expressions is 100. The allowed functions are: allfunctions.\n         */\n        filter?: string;\n        /**\n         * Specifies the order in which items are returned. The maximum number of expressions is 5.\n         */\n        orderby?: string;\n        /**\n         * Limits the number of items returned from a collection. The maximum value is 100.\n         */\n        top?: number;\n        /**\n         * Excludes the specified number of items of the queried collection from the result.\n         */\n        skip?: number;\n        /**\n         * Indicates whether the total count of items within a collection are returned in the result.\n         */\n        count?: boolean;\n    };\n    url: '/api/v1/odata/BusinessDocumentActivities';\n};\n\nexport type ApiVVersionApiVersionOdataBusinessDocumentActivitiesResponses = {\n    /**\n     * OK\n     */\n    200: Array<DocumentBusinessActivity>;\n};\n\nexport type ApiVVersionApiVersionOdataBusinessDocumentActivitiesResponse = ApiVVersionApiVersionOdataBusinessDocumentActivitiesResponses[keyof ApiVVersionApiVersionOdataBusinessDocumentActivitiesResponses];\n\nexport type ApiVVersionApiVersionOdataBusinessDocumentActivitiesCountData = {\n    body?: never;\n    path?: never;\n    query?: {\n        accountants?: Array<number>;\n        /**\n         * Limits the properties returned in the result.\n         */\n        select?: string;\n        /**\n         * Indicates the related entities to be represented inline. The maximum depth is 2.\n         */\n        expand?: string;\n        /**\n         * Restricts the set of items returned. The maximum number of expressions is 100. The allowed functions are: allfunctions.\n         */\n        filter?: string;\n        /**\n         * Specifies the order in which items are returned. The maximum number of expressions is 5.\n         */\n        orderby?: string;\n        /**\n         * Limits the number of items returned from a collection. The maximum value is 100.\n         */\n        top?: number;\n        /**\n         * Excludes the specified number of items of the queried collection from the result.\n         */\n        skip?: number;\n        /**\n         * Indicates whether the total count of items within a collection are returned in the result.\n         */\n        count?: boolean;\n    };\n    url: '/api/v1/odata/BusinessDocumentActivities/$count';\n};\n\nexport type ApiVVersionApiVersionOdataBusinessDocumentActivitiesCountResponses = {\n    /**\n     * OK\n     */\n    200: Array<DocumentBusinessActivity>;\n};\n\nexport type ApiVVersionApiVersionOdataBusinessDocumentActivitiesCountResponse = ApiVVersionApiVersionOdataBusinessDocumentActivitiesCountResponses[keyof ApiVVersionApiVersionOdataBusinessDocumentActivitiesCountResponses];\n\nexport type ApiVVersionApiVersionOdataBusinessDocumentsData = {\n    body?: never;\n    path?: never;\n    query?: {\n        accountants?: Array<number>;\n        /**\n         * Limits the properties returned in the result.\n         */\n        select?: string;\n        /**\n         * Indicates the related entities to be represented inline. The maximum depth is 2.\n         */\n        expand?: string;\n        /**\n         * Restricts the set of items returned. The maximum number of expressions is 100. The allowed functions are: allfunctions.\n         */\n        filter?: string;\n        /**\n         * Specifies the order in which items are returned. The maximum number of expressions is 5.\n         */\n        orderby?: string;\n        /**\n         * Limits the number of items returned from a collection. The maximum value is 100.\n         */\n        top?: number;\n        /**\n         * Excludes the specified number of items of the queried collection from the result.\n         */\n        skip?: number;\n        /**\n         * Indicates whether the total count of items within a collection are returned in the result.\n         */\n        count?: boolean;\n    };\n    url: '/api/v1/odata/BusinessDocuments';\n};\n\nexport type ApiVVersionApiVersionOdataBusinessDocumentsResponses = {\n    /**\n     * OK\n     */\n    200: Array<DocumentBusiness>;\n};\n\nexport type ApiVVersionApiVersionOdataBusinessDocumentsResponse = ApiVVersionApiVersionOdataBusinessDocumentsResponses[keyof ApiVVersionApiVersionOdataBusinessDocumentsResponses];\n\nexport type ApiVVersionApiVersionOdataBusinessDocumentsCountData = {\n    body?: never;\n    path?: never;\n    query?: {\n        accountants?: Array<number>;\n        /**\n         * Limits the properties returned in the result.\n         */\n        select?: string;\n        /**\n         * Indicates the related entities to be represented inline. The maximum depth is 2.\n         */\n        expand?: string;\n        /**\n         * Restricts the set of items returned. The maximum number of expressions is 100. The allowed functions are: allfunctions.\n         */\n        filter?: string;\n        /**\n         * Specifies the order in which items are returned. The maximum number of expressions is 5.\n         */\n        orderby?: string;\n        /**\n         * Limits the number of items returned from a collection. The maximum value is 100.\n         */\n        top?: number;\n        /**\n         * Excludes the specified number of items of the queried collection from the result.\n         */\n        skip?: number;\n        /**\n         * Indicates whether the total count of items within a collection are returned in the result.\n         */\n        count?: boolean;\n    };\n    url: '/api/v1/odata/BusinessDocuments/$count';\n};\n\nexport type ApiVVersionApiVersionOdataBusinessDocumentsCountResponses = {\n    /**\n     * OK\n     */\n    200: Array<DocumentBusiness>;\n};\n\nexport type ApiVVersionApiVersionOdataBusinessDocumentsCountResponse = ApiVVersionApiVersionOdataBusinessDocumentsCountResponses[keyof ApiVVersionApiVersionOdataBusinessDocumentsCountResponses];\n\nexport type ApiVVersionApiVersionOdataBusinessDocumentsSummariesData = {\n    body?: never;\n    path?: never;\n    query?: {\n        accountants?: Array<number>;\n        /**\n         * Limits the properties returned in the result.\n         */\n        select?: string;\n        /**\n         * Indicates the related entities to be represented inline. The maximum depth is 2.\n         */\n        expand?: string;\n        /**\n         * Restricts the set of items returned. The maximum number of expressions is 100. The allowed functions are: allfunctions.\n         */\n        filter?: string;\n        /**\n         * Specifies the order in which items are returned. The maximum number of expressions is 5.\n         */\n        orderby?: string;\n        /**\n         * Limits the number of items returned from a collection. The maximum value is 100.\n         */\n        top?: number;\n        /**\n         * Excludes the specified number of items of the queried collection from the result.\n         */\n        skip?: number;\n        /**\n         * Indicates whether the total count of items within a collection are returned in the result.\n         */\n        count?: boolean;\n    };\n    url: '/api/v1/odata/BusinessDocumentsSummaries';\n};\n\nexport type ApiVVersionApiVersionOdataBusinessDocumentsSummariesResponses = {\n    /**\n     * OK\n     */\n    200: Array<BusinessDocumentsSummary>;\n};\n\nexport type ApiVVersionApiVersionOdataBusinessDocumentsSummariesResponse = ApiVVersionApiVersionOdataBusinessDocumentsSummariesResponses[keyof ApiVVersionApiVersionOdataBusinessDocumentsSummariesResponses];\n\nexport type ApiVVersionApiVersionOdataBusinessDocumentsSummariesCountData = {\n    body?: never;\n    path?: never;\n    query?: {\n        accountants?: Array<number>;\n        /**\n         * Limits the properties returned in the result.\n         */\n        select?: string;\n        /**\n         * Indicates the related entities to be represented inline. The maximum depth is 2.\n         */\n        expand?: string;\n        /**\n         * Restricts the set of items returned. The maximum number of expressions is 100. The allowed functions are: allfunctions.\n         */\n        filter?: string;\n        /**\n         * Specifies the order in which items are returned. The maximum number of expressions is 5.\n         */\n        orderby?: string;\n        /**\n         * Limits the number of items returned from a collection. The maximum value is 100.\n         */\n        top?: number;\n        /**\n         * Excludes the specified number of items of the queried collection from the result.\n         */\n        skip?: number;\n        /**\n         * Indicates whether the total count of items within a collection are returned in the result.\n         */\n        count?: boolean;\n    };\n    url: '/api/v1/odata/BusinessDocumentsSummaries/$count';\n};\n\nexport type ApiVVersionApiVersionOdataBusinessDocumentsSummariesCountResponses = {\n    /**\n     * OK\n     */\n    200: Array<BusinessDocumentsSummary>;\n};\n\nexport type ApiVVersionApiVersionOdataBusinessDocumentsSummariesCountResponse = ApiVVersionApiVersionOdataBusinessDocumentsSummariesCountResponses[keyof ApiVVersionApiVersionOdataBusinessDocumentsSummariesCountResponses];\n\nexport type GetApiV1BusinessesByIdDocumentTypesSummaryData = {\n    body?: never;\n    path: {\n        id: number;\n    };\n    query?: never;\n    url: '/api/v1/businesses/{id}/document-types-summary';\n};\n\nexport type GetApiV1BusinessesByIdDocumentTypesSummaryResponses = {\n    /**\n     * OK\n     */\n    200: Array<DocumentTypesSummary>;\n};\n\nexport type GetApiV1BusinessesByIdDocumentTypesSummaryResponse = GetApiV1BusinessesByIdDocumentTypesSummaryResponses[keyof GetApiV1BusinessesByIdDocumentTypesSummaryResponses];\n\nexport type PostApiV1BusinessesData = {\n    body?: BusinessCreateDto;\n    path?: never;\n    query?: never;\n    url: '/api/v1/businesses';\n};\n\nexport type PostApiV1BusinessesResponses = {\n    /**\n     * OK\n     */\n    200: Business;\n};\n\nexport type PostApiV1BusinessesResponse = PostApiV1BusinessesResponses[keyof PostApiV1BusinessesResponses];\n\nexport type DeleteApiV1BusinessesByIdData = {\n    body?: never;\n    path: {\n        id: number;\n    };\n    query?: never;\n    url: '/api/v1/businesses/{id}';\n};\n\nexport type DeleteApiV1BusinessesByIdResponses = {\n    /**\n     * OK\n     */\n    200: unknown;\n};\n\nexport type PutApiV1BusinessesByIdData = {\n    body?: BusinessUpdateDto;\n    path: {\n        id: number;\n    };\n    query?: never;\n    url: '/api/v1/businesses/{id}';\n};\n\nexport type PutApiV1BusinessesByIdResponses = {\n    /**\n     * OK\n     */\n    200: Business;\n};\n\nexport type PutApiV1BusinessesByIdResponse = PutApiV1BusinessesByIdResponses[keyof PutApiV1BusinessesByIdResponses];\n\nexport type PutApiV1BusinessesByIdContactData = {\n    body?: BusinessChangeContactDto;\n    path: {\n        id: number;\n    };\n    query?: never;\n    url: '/api/v1/businesses/{id}/contact';\n};\n\nexport type PutApiV1BusinessesByIdContactResponses = {\n    /**\n     * OK\n     */\n    200: unknown;\n};\n\nexport type PostApiV1BusinessesByIdDisconnectData = {\n    body?: never;\n    path: {\n        id: number;\n    };\n    query?: never;\n    url: '/api/v1/businesses/{id}/disconnect';\n};\n\nexport type PostApiV1BusinessesByIdDisconnectResponses = {\n    /**\n     * OK\n     */\n    200: Business;\n};\n\nexport type PostApiV1BusinessesByIdDisconnectResponse = PostApiV1BusinessesByIdDisconnectResponses[keyof PostApiV1BusinessesByIdDisconnectResponses];\n\nexport type ApiVVersionApiVersionOdataBusinessesData = {\n    body?: never;\n    path?: never;\n    query?: {\n        accountants?: Array<number>;\n        /**\n         * Limits the properties returned in the result.\n         */\n        select?: string;\n        /**\n         * Indicates the related entities to be represented inline. The maximum depth is 2.\n         */\n        expand?: string;\n        /**\n         * Restricts the set of items returned. The maximum number of expressions is 100. The allowed functions are: allfunctions.\n         */\n        filter?: string;\n        /**\n         * Specifies the order in which items are returned. The maximum number of expressions is 5.\n         */\n        orderby?: string;\n        /**\n         * Limits the number of items returned from a collection. The maximum value is 100.\n         */\n        top?: number;\n        /**\n         * Excludes the specified number of items of the queried collection from the result.\n         */\n        skip?: number;\n        /**\n         * Indicates whether the total count of items within a collection are returned in the result.\n         */\n        count?: boolean;\n    };\n    url: '/api/v1/odata/Businesses';\n};\n\nexport type ApiVVersionApiVersionOdataBusinessesResponses = {\n    /**\n     * OK\n     */\n    200: Array<Business>;\n};\n\nexport type ApiVVersionApiVersionOdataBusinessesResponse = ApiVVersionApiVersionOdataBusinessesResponses[keyof ApiVVersionApiVersionOdataBusinessesResponses];\n\nexport type ApiVVersionApiVersionOdataBusinessesCountData = {\n    body?: never;\n    path?: never;\n    query?: {\n        accountants?: Array<number>;\n        /**\n         * Limits the properties returned in the result.\n         */\n        select?: string;\n        /**\n         * Indicates the related entities to be represented inline. The maximum depth is 2.\n         */\n        expand?: string;\n        /**\n         * Restricts the set of items returned. The maximum number of expressions is 100. The allowed functions are: allfunctions.\n         */\n        filter?: string;\n        /**\n         * Specifies the order in which items are returned. The maximum number of expressions is 5.\n         */\n        orderby?: string;\n        /**\n         * Limits the number of items returned from a collection. The maximum value is 100.\n         */\n        top?: number;\n        /**\n         * Excludes the specified number of items of the queried collection from the result.\n         */\n        skip?: number;\n        /**\n         * Indicates whether the total count of items within a collection are returned in the result.\n         */\n        count?: boolean;\n    };\n    url: '/api/v1/odata/Businesses/$count';\n};\n\nexport type ApiVVersionApiVersionOdataBusinessesCountResponses = {\n    /**\n     * OK\n     */\n    200: Array<Business>;\n};\n\nexport type ApiVVersionApiVersionOdataBusinessesCountResponse = ApiVVersionApiVersionOdataBusinessesCountResponses[keyof ApiVVersionApiVersionOdataBusinessesCountResponses];\n\nexport type ApiVVersionApiVersionOdataBusinessesKeyData = {\n    body?: never;\n    path?: never;\n    query?: {\n        key?: number;\n        /**\n         * Limits the properties returned in the result.\n         */\n        select?: string;\n        /**\n         * Indicates the related entities to be represented inline. The maximum depth is 2.\n         */\n        expand?: string;\n    };\n    url: '/api/v1/odata/Businesses({key})';\n};\n\nexport type ApiVVersionApiVersionOdataBusinessesKeyResponses = {\n    /**\n     * OK\n     */\n    200: Business;\n};\n\nexport type ApiVVersionApiVersionOdataBusinessesKeyResponse = ApiVVersionApiVersionOdataBusinessesKeyResponses[keyof ApiVVersionApiVersionOdataBusinessesKeyResponses];\n\nexport type ApiVVersionApiVersionOdataBusinessesKey2Data = {\n    body?: never;\n    path?: never;\n    query?: {\n        key?: number;\n        /**\n         * Limits the properties returned in the result.\n         */\n        select?: string;\n        /**\n         * Indicates the related entities to be represented inline. The maximum depth is 2.\n         */\n        expand?: string;\n    };\n    url: '/api/v1/odata/Businesses/{key}';\n};\n\nexport type ApiVVersionApiVersionOdataBusinessesKey2Responses = {\n    /**\n     * OK\n     */\n    200: Business;\n};\n\nexport type ApiVVersionApiVersionOdataBusinessesKey2Response = ApiVVersionApiVersionOdataBusinessesKey2Responses[keyof ApiVVersionApiVersionOdataBusinessesKey2Responses];\n\nexport type PutApiV1BusinessMembershipsData = {\n    body?: BusinessMembershipUpsertDto;\n    path?: never;\n    query?: never;\n    url: '/api/v1/business-memberships';\n};\n\nexport type PutApiV1BusinessMembershipsResponses = {\n    /**\n     * OK\n     */\n    200: BusinessMembershipDto;\n};\n\nexport type PutApiV1BusinessMembershipsResponse = PutApiV1BusinessMembershipsResponses[keyof PutApiV1BusinessMembershipsResponses];\n\nexport type ApiVVersionApiVersionOdataBusinessSummariesData = {\n    body?: never;\n    path?: never;\n    query?: {\n        role?: string;\n        accountants?: Array<number>;\n        /**\n         * Limits the properties returned in the result.\n         */\n        select?: string;\n        /**\n         * Indicates the related entities to be represented inline. The maximum depth is 2.\n         */\n        expand?: string;\n        /**\n         * Restricts the set of items returned. The maximum number of expressions is 100. The allowed functions are: allfunctions.\n         */\n        filter?: string;\n        /**\n         * Specifies the order in which items are returned. The maximum number of expressions is 5.\n         */\n        orderby?: string;\n        /**\n         * Limits the number of items returned from a collection. The maximum value is 100.\n         */\n        top?: number;\n        /**\n         * Excludes the specified number of items of the queried collection from the result.\n         */\n        skip?: number;\n        /**\n         * Indicates whether the total count of items within a collection are returned in the result.\n         */\n        count?: boolean;\n    };\n    url: '/api/v1/odata/BusinessSummaries';\n};\n\nexport type ApiVVersionApiVersionOdataBusinessSummariesResponses = {\n    /**\n     * OK\n     */\n    200: Array<BusinessSummary>;\n};\n\nexport type ApiVVersionApiVersionOdataBusinessSummariesResponse = ApiVVersionApiVersionOdataBusinessSummariesResponses[keyof ApiVVersionApiVersionOdataBusinessSummariesResponses];\n\nexport type ApiVVersionApiVersionOdataBusinessSummariesCountData = {\n    body?: never;\n    path?: never;\n    query?: {\n        role?: string;\n        accountants?: Array<number>;\n        /**\n         * Limits the properties returned in the result.\n         */\n        select?: string;\n        /**\n         * Indicates the related entities to be represented inline. The maximum depth is 2.\n         */\n        expand?: string;\n        /**\n         * Restricts the set of items returned. The maximum number of expressions is 100. The allowed functions are: allfunctions.\n         */\n        filter?: string;\n        /**\n         * Specifies the order in which items are returned. The maximum number of expressions is 5.\n         */\n        orderby?: string;\n        /**\n         * Limits the number of items returned from a collection. The maximum value is 100.\n         */\n        top?: number;\n        /**\n         * Excludes the specified number of items of the queried collection from the result.\n         */\n        skip?: number;\n        /**\n         * Indicates whether the total count of items within a collection are returned in the result.\n         */\n        count?: boolean;\n    };\n    url: '/api/v1/odata/BusinessSummaries/$count';\n};\n\nexport type ApiVVersionApiVersionOdataBusinessSummariesCountResponses = {\n    /**\n     * OK\n     */\n    200: Array<BusinessSummary>;\n};\n\nexport type ApiVVersionApiVersionOdataBusinessSummariesCountResponse = ApiVVersionApiVersionOdataBusinessSummariesCountResponses[keyof ApiVVersionApiVersionOdataBusinessSummariesCountResponses];\n\nexport type PostApiV1CounterpartiesData = {\n    body?: CounterpartyCreateDto;\n    path?: never;\n    query?: never;\n    url: '/api/v1/counterparties';\n};\n\nexport type PostApiV1CounterpartiesResponses = {\n    /**\n     * OK\n     */\n    200: Counterparty;\n};\n\nexport type PostApiV1CounterpartiesResponse = PostApiV1CounterpartiesResponses[keyof PostApiV1CounterpartiesResponses];\n\nexport type DeleteApiV1CounterpartiesByIdData = {\n    body?: never;\n    path: {\n        id: number;\n    };\n    query?: never;\n    url: '/api/v1/counterparties/{id}';\n};\n\nexport type DeleteApiV1CounterpartiesByIdResponses = {\n    /**\n     * OK\n     */\n    200: unknown;\n};\n\nexport type PatchApiV1CounterpartiesByIdData = {\n    body?: CounterpartyUpdateDto;\n    path: {\n        id: number;\n    };\n    query?: never;\n    url: '/api/v1/counterparties/{id}';\n};\n\nexport type PatchApiV1CounterpartiesByIdResponses = {\n    /**\n     * OK\n     */\n    200: Counterparty;\n};\n\nexport type PatchApiV1CounterpartiesByIdResponse = PatchApiV1CounterpartiesByIdResponses[keyof PatchApiV1CounterpartiesByIdResponses];\n\nexport type ApiVVersionApiVersionOdataCounterpartiesData = {\n    body?: never;\n    path?: never;\n    query?: {\n        /**\n         * Limits the properties returned in the result.\n         */\n        select?: string;\n        /**\n         * Indicates the related entities to be represented inline. The maximum depth is 2.\n         */\n        expand?: string;\n        /**\n         * Restricts the set of items returned. The maximum number of expressions is 100. The allowed functions are: allfunctions.\n         */\n        filter?: string;\n        /**\n         * Specifies the order in which items are returned. The maximum number of expressions is 5.\n         */\n        orderby?: string;\n        /**\n         * Limits the number of items returned from a collection. The maximum value is 100.\n         */\n        top?: number;\n        /**\n         * Excludes the specified number of items of the queried collection from the result.\n         */\n        skip?: number;\n        /**\n         * Indicates whether the total count of items within a collection are returned in the result.\n         */\n        count?: boolean;\n    };\n    url: '/api/v1/odata/Counterparties';\n};\n\nexport type ApiVVersionApiVersionOdataCounterpartiesResponses = {\n    /**\n     * OK\n     */\n    200: Array<Counterparty>;\n};\n\nexport type ApiVVersionApiVersionOdataCounterpartiesResponse = ApiVVersionApiVersionOdataCounterpartiesResponses[keyof ApiVVersionApiVersionOdataCounterpartiesResponses];\n\nexport type ApiVVersionApiVersionOdataCounterpartiesCountData = {\n    body?: never;\n    path?: never;\n    query?: {\n        /**\n         * Limits the properties returned in the result.\n         */\n        select?: string;\n        /**\n         * Indicates the related entities to be represented inline. The maximum depth is 2.\n         */\n        expand?: string;\n        /**\n         * Restricts the set of items returned. The maximum number of expressions is 100. The allowed functions are: allfunctions.\n         */\n        filter?: string;\n        /**\n         * Specifies the order in which items are returned. The maximum number of expressions is 5.\n         */\n        orderby?: string;\n        /**\n         * Limits the number of items returned from a collection. The maximum value is 100.\n         */\n        top?: number;\n        /**\n         * Excludes the specified number of items of the queried collection from the result.\n         */\n        skip?: number;\n        /**\n         * Indicates whether the total count of items within a collection are returned in the result.\n         */\n        count?: boolean;\n    };\n    url: '/api/v1/odata/Counterparties/$count';\n};\n\nexport type ApiVVersionApiVersionOdataCounterpartiesCountResponses = {\n    /**\n     * OK\n     */\n    200: Array<Counterparty>;\n};\n\nexport type ApiVVersionApiVersionOdataCounterpartiesCountResponse = ApiVVersionApiVersionOdataCounterpartiesCountResponses[keyof ApiVVersionApiVersionOdataCounterpartiesCountResponses];\n\nexport type PutApiV1DataBoxCredentialsData = {\n    body?: DataBoxCredentialsUpsertDto;\n    path?: never;\n    query?: never;\n    url: '/api/v1/data-box-credentials';\n};\n\nexport type PutApiV1DataBoxCredentialsResponses = {\n    /**\n     * OK\n     */\n    200: DataBoxCredentials;\n};\n\nexport type PutApiV1DataBoxCredentialsResponse = PutApiV1DataBoxCredentialsResponses[keyof PutApiV1DataBoxCredentialsResponses];\n\nexport type DeleteApiV1DataBoxCredentialsByIdData = {\n    body?: never;\n    path: {\n        id: number;\n    };\n    query?: never;\n    url: '/api/v1/data-box-credentials/{id}';\n};\n\nexport type DeleteApiV1DataBoxCredentialsByIdResponses = {\n    /**\n     * OK\n     */\n    200: unknown;\n};\n\nexport type ApiVVersionApiVersionOdataDataBoxCredentialsData = {\n    body?: never;\n    path?: never;\n    query?: {\n        includePassword?: boolean;\n        /**\n         * Limits the properties returned in the result.\n         */\n        select?: string;\n        /**\n         * Indicates the related entities to be represented inline. The maximum depth is 2.\n         */\n        expand?: string;\n        /**\n         * Restricts the set of items returned. The maximum number of expressions is 100. The allowed functions are: allfunctions.\n         */\n        filter?: string;\n        /**\n         * Specifies the order in which items are returned. The maximum number of expressions is 5.\n         */\n        orderby?: string;\n        /**\n         * Limits the number of items returned from a collection. The maximum value is 100.\n         */\n        top?: number;\n        /**\n         * Excludes the specified number of items of the queried collection from the result.\n         */\n        skip?: number;\n        /**\n         * Indicates whether the total count of items within a collection are returned in the result.\n         */\n        count?: boolean;\n    };\n    url: '/api/v1/odata/DataBoxCredentials';\n};\n\nexport type ApiVVersionApiVersionOdataDataBoxCredentialsResponses = {\n    /**\n     * OK\n     */\n    200: Array<DataBoxCredentials>;\n};\n\nexport type ApiVVersionApiVersionOdataDataBoxCredentialsResponse = ApiVVersionApiVersionOdataDataBoxCredentialsResponses[keyof ApiVVersionApiVersionOdataDataBoxCredentialsResponses];\n\nexport type ApiVVersionApiVersionOdataDataBoxCredentialsCountData = {\n    body?: never;\n    path?: never;\n    query?: {\n        includePassword?: boolean;\n        /**\n         * Limits the properties returned in the result.\n         */\n        select?: string;\n        /**\n         * Indicates the related entities to be represented inline. The maximum depth is 2.\n         */\n        expand?: string;\n        /**\n         * Restricts the set of items returned. The maximum number of expressions is 100. The allowed functions are: allfunctions.\n         */\n        filter?: string;\n        /**\n         * Specifies the order in which items are returned. The maximum number of expressions is 5.\n         */\n        orderby?: string;\n        /**\n         * Limits the number of items returned from a collection. The maximum value is 100.\n         */\n        top?: number;\n        /**\n         * Excludes the specified number of items of the queried collection from the result.\n         */\n        skip?: number;\n        /**\n         * Indicates whether the total count of items within a collection are returned in the result.\n         */\n        count?: boolean;\n    };\n    url: '/api/v1/odata/DataBoxCredentials/$count';\n};\n\nexport type ApiVVersionApiVersionOdataDataBoxCredentialsCountResponses = {\n    /**\n     * OK\n     */\n    200: Array<DataBoxCredentials>;\n};\n\nexport type ApiVVersionApiVersionOdataDataBoxCredentialsCountResponse = ApiVVersionApiVersionOdataDataBoxCredentialsCountResponses[keyof ApiVVersionApiVersionOdataDataBoxCredentialsCountResponses];\n\nexport type GetApiDevData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/dev';\n};\n\nexport type GetApiDevResponses = {\n    /**\n     * OK\n     */\n    200: unknown;\n};\n\nexport type GetApiDevReseedDbData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/dev/reseed-db';\n};\n\nexport type GetApiDevReseedDbResponses = {\n    /**\n     * OK\n     */\n    200: unknown;\n};\n\nexport type GetApiDevDbResetData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/dev/db-reset';\n};\n\nexport type GetApiDevDbResetResponses = {\n    /**\n     * OK\n     */\n    200: unknown;\n};\n\nexport type GetApiDevDbReset2Data = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/dev/db/reset';\n};\n\nexport type GetApiDevDbReset2Responses = {\n    /**\n     * OK\n     */\n    200: unknown;\n};\n\nexport type GetApiDevDbCreateData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/dev/db/create';\n};\n\nexport type GetApiDevDbCreateResponses = {\n    /**\n     * OK\n     */\n    200: unknown;\n};\n\nexport type GetApiDevDbTouchData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/dev/db/touch';\n};\n\nexport type GetApiDevDbTouchResponses = {\n    /**\n     * OK\n     */\n    200: unknown;\n};\n\nexport type GetApiDevSeedData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/dev/seed';\n};\n\nexport type GetApiDevSeedResponses = {\n    /**\n     * OK\n     */\n    200: unknown;\n};\n\nexport type GetApiDevSeedAllData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/dev/seed-all';\n};\n\nexport type GetApiDevSeedAllResponses = {\n    /**\n     * OK\n     */\n    200: unknown;\n};\n\nexport type GetApiDevSeedProdData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/dev/seed-prod';\n};\n\nexport type GetApiDevSeedProdResponses = {\n    /**\n     * OK\n     */\n    200: unknown;\n};\n\nexport type GetApiDevJobProcessRecurringTasksData = {\n    body?: never;\n    path?: never;\n    query?: {\n        refDay?: string;\n    };\n    url: '/api/dev/job/process-recurring-tasks';\n};\n\nexport type GetApiDevJobProcessRecurringTasksResponses = {\n    /**\n     * OK\n     */\n    200: unknown;\n};\n\nexport type GetApiDevNotificationsSendTestData = {\n    body?: never;\n    path?: never;\n    query?: {\n        userId?: number;\n    };\n    url: '/api/dev/notifications/send-test';\n};\n\nexport type GetApiDevNotificationsSendTestResponses = {\n    /**\n     * OK\n     */\n    200: unknown;\n};\n\nexport type GetApiDevConfirmEmailData = {\n    body?: never;\n    path?: never;\n    query?: {\n        email?: string;\n    };\n    url: '/api/dev/confirm-email';\n};\n\nexport type GetApiDevConfirmEmailResponses = {\n    /**\n     * OK\n     */\n    200: unknown;\n};\n\nexport type GetApiDevEmailSendTestData = {\n    body?: never;\n    path?: never;\n    query?: {\n        to?: string;\n        subject?: string;\n        message?: string;\n    };\n    url: '/api/dev/email/send-test';\n};\n\nexport type GetApiDevEmailSendTestResponses = {\n    /**\n     * OK\n     */\n    200: unknown;\n};\n\nexport type DeleteApiV1NotificationsDeviceTokensData = {\n    body?: NotificationsDeviceTokenDeleteDto;\n    path?: never;\n    query?: never;\n    url: '/api/v1/notifications/device-tokens';\n};\n\nexport type DeleteApiV1NotificationsDeviceTokensResponses = {\n    /**\n     * OK\n     */\n    200: unknown;\n};\n\nexport type PutApiV1NotificationsDeviceTokensData = {\n    body?: NotificationsDeviceTokenUpsertDto;\n    path?: never;\n    query?: never;\n    url: '/api/v1/notifications/device-tokens';\n};\n\nexport type PutApiV1NotificationsDeviceTokensResponses = {\n    /**\n     * OK\n     */\n    200: unknown;\n};\n\nexport type ApiVVersionApiVersionOdataDocumentTypesData = {\n    body?: never;\n    path?: never;\n    query?: {\n        /**\n         * Limits the properties returned in the result.\n         */\n        select?: string;\n        /**\n         * Indicates the related entities to be represented inline. The maximum depth is 2.\n         */\n        expand?: string;\n        /**\n         * Restricts the set of items returned. The maximum number of expressions is 100. The allowed functions are: allfunctions.\n         */\n        filter?: string;\n        /**\n         * Specifies the order in which items are returned. The maximum number of expressions is 5.\n         */\n        orderby?: string;\n        /**\n         * Limits the number of items returned from a collection. The maximum value is 100.\n         */\n        top?: number;\n        /**\n         * Excludes the specified number of items of the queried collection from the result.\n         */\n        skip?: number;\n        /**\n         * Indicates whether the total count of items within a collection are returned in the result.\n         */\n        count?: boolean;\n    };\n    url: '/api/v1/odata/DocumentTypes';\n};\n\nexport type ApiVVersionApiVersionOdataDocumentTypesResponses = {\n    /**\n     * OK\n     */\n    200: Array<DocumentType>;\n};\n\nexport type ApiVVersionApiVersionOdataDocumentTypesResponse = ApiVVersionApiVersionOdataDocumentTypesResponses[keyof ApiVVersionApiVersionOdataDocumentTypesResponses];\n\nexport type ApiVVersionApiVersionOdataDocumentTypesCountData = {\n    body?: never;\n    path?: never;\n    query?: {\n        /**\n         * Limits the properties returned in the result.\n         */\n        select?: string;\n        /**\n         * Indicates the related entities to be represented inline. The maximum depth is 2.\n         */\n        expand?: string;\n        /**\n         * Restricts the set of items returned. The maximum number of expressions is 100. The allowed functions are: allfunctions.\n         */\n        filter?: string;\n        /**\n         * Specifies the order in which items are returned. The maximum number of expressions is 5.\n         */\n        orderby?: string;\n        /**\n         * Limits the number of items returned from a collection. The maximum value is 100.\n         */\n        top?: number;\n        /**\n         * Excludes the specified number of items of the queried collection from the result.\n         */\n        skip?: number;\n        /**\n         * Indicates whether the total count of items within a collection are returned in the result.\n         */\n        count?: boolean;\n    };\n    url: '/api/v1/odata/DocumentTypes/$count';\n};\n\nexport type ApiVVersionApiVersionOdataDocumentTypesCountResponses = {\n    /**\n     * OK\n     */\n    200: Array<DocumentType>;\n};\n\nexport type ApiVVersionApiVersionOdataDocumentTypesCountResponse = ApiVVersionApiVersionOdataDocumentTypesCountResponses[keyof ApiVVersionApiVersionOdataDocumentTypesCountResponses];\n\nexport type PostApiV1FeedbackData = {\n    body?: SendFeedbackRequest;\n    path?: never;\n    query?: never;\n    url: '/api/v1/feedback';\n};\n\nexport type PostApiV1FeedbackResponses = {\n    /**\n     * OK\n     */\n    200: unknown;\n};\n\nexport type PostApiV1InvitationsData = {\n    body?: InvitationCreateDto;\n    path?: never;\n    query?: never;\n    url: '/api/v1/invitations';\n};\n\nexport type PostApiV1InvitationsResponses = {\n    /**\n     * OK\n     */\n    200: Invitation;\n};\n\nexport type PostApiV1InvitationsResponse = PostApiV1InvitationsResponses[keyof PostApiV1InvitationsResponses];\n\nexport type PostApiV1InvitationsByIdAcceptData = {\n    body?: InvitationAcceptDto;\n    path: {\n        id: number;\n    };\n    query?: never;\n    url: '/api/v1/invitations/{id}/accept';\n};\n\nexport type PostApiV1InvitationsByIdAcceptResponses = {\n    /**\n     * OK\n     */\n    200: unknown;\n};\n\nexport type PostApiV1InvitationsByIdRejectData = {\n    body?: never;\n    path: {\n        id: number;\n    };\n    query?: never;\n    url: '/api/v1/invitations/{id}/reject';\n};\n\nexport type PostApiV1InvitationsByIdRejectResponses = {\n    /**\n     * OK\n     */\n    200: unknown;\n};\n\nexport type DeleteApiV1InvitationsByIdData = {\n    body?: never;\n    path: {\n        id: number;\n    };\n    query?: never;\n    url: '/api/v1/invitations/{id}';\n};\n\nexport type DeleteApiV1InvitationsByIdResponses = {\n    /**\n     * OK\n     */\n    200: unknown;\n};\n\nexport type PatchApiV1InvitationsByIdData = {\n    body?: InvitationUpdateDto;\n    path: {\n        id: number;\n    };\n    query?: never;\n    url: '/api/v1/invitations/{id}';\n};\n\nexport type PatchApiV1InvitationsByIdResponses = {\n    /**\n     * OK\n     */\n    200: Invitation;\n};\n\nexport type PatchApiV1InvitationsByIdResponse = PatchApiV1InvitationsByIdResponses[keyof PatchApiV1InvitationsByIdResponses];\n\nexport type ApiVVersionApiVersionOdataInvitationsData = {\n    body?: never;\n    path?: never;\n    query?: {\n        /**\n         * Limits the properties returned in the result.\n         */\n        select?: string;\n        /**\n         * Indicates the related entities to be represented inline. The maximum depth is 2.\n         */\n        expand?: string;\n        /**\n         * Restricts the set of items returned. The maximum number of expressions is 100. The allowed functions are: allfunctions.\n         */\n        filter?: string;\n        /**\n         * Specifies the order in which items are returned. The maximum number of expressions is 5.\n         */\n        orderby?: string;\n        /**\n         * Limits the number of items returned from a collection. The maximum value is 100.\n         */\n        top?: number;\n        /**\n         * Excludes the specified number of items of the queried collection from the result.\n         */\n        skip?: number;\n        /**\n         * Indicates whether the total count of items within a collection are returned in the result.\n         */\n        count?: boolean;\n    };\n    url: '/api/v1/odata/Invitations';\n};\n\nexport type ApiVVersionApiVersionOdataInvitationsResponses = {\n    /**\n     * OK\n     */\n    200: Array<Invitation>;\n};\n\nexport type ApiVVersionApiVersionOdataInvitationsResponse = ApiVVersionApiVersionOdataInvitationsResponses[keyof ApiVVersionApiVersionOdataInvitationsResponses];\n\nexport type ApiVVersionApiVersionOdataInvitationsCountData = {\n    body?: never;\n    path?: never;\n    query?: {\n        /**\n         * Limits the properties returned in the result.\n         */\n        select?: string;\n        /**\n         * Indicates the related entities to be represented inline. The maximum depth is 2.\n         */\n        expand?: string;\n        /**\n         * Restricts the set of items returned. The maximum number of expressions is 100. The allowed functions are: allfunctions.\n         */\n        filter?: string;\n        /**\n         * Specifies the order in which items are returned. The maximum number of expressions is 5.\n         */\n        orderby?: string;\n        /**\n         * Limits the number of items returned from a collection. The maximum value is 100.\n         */\n        top?: number;\n        /**\n         * Excludes the specified number of items of the queried collection from the result.\n         */\n        skip?: number;\n        /**\n         * Indicates whether the total count of items within a collection are returned in the result.\n         */\n        count?: boolean;\n    };\n    url: '/api/v1/odata/Invitations/$count';\n};\n\nexport type ApiVVersionApiVersionOdataInvitationsCountResponses = {\n    /**\n     * OK\n     */\n    200: Array<Invitation>;\n};\n\nexport type ApiVVersionApiVersionOdataInvitationsCountResponse = ApiVVersionApiVersionOdataInvitationsCountResponses[keyof ApiVVersionApiVersionOdataInvitationsCountResponses];\n\nexport type PostApiV1InvoicesData = {\n    body?: InvoiceCreateDto;\n    path?: never;\n    query?: never;\n    url: '/api/v1/invoices';\n};\n\nexport type PostApiV1InvoicesResponses = {\n    /**\n     * OK\n     */\n    200: Invoice;\n};\n\nexport type PostApiV1InvoicesResponse = PostApiV1InvoicesResponses[keyof PostApiV1InvoicesResponses];\n\nexport type DeleteApiV1InvoicesByIdData = {\n    body?: never;\n    path: {\n        id: number;\n    };\n    query?: never;\n    url: '/api/v1/invoices/{id}';\n};\n\nexport type DeleteApiV1InvoicesByIdResponses = {\n    /**\n     * OK\n     */\n    200: unknown;\n};\n\nexport type PatchApiV1InvoicesByIdData = {\n    body?: InvoiceUpdateDto;\n    path: {\n        id: number;\n    };\n    query?: never;\n    url: '/api/v1/invoices/{id}';\n};\n\nexport type PatchApiV1InvoicesByIdResponses = {\n    /**\n     * OK\n     */\n    200: Invoice;\n};\n\nexport type PatchApiV1InvoicesByIdResponse = PatchApiV1InvoicesByIdResponses[keyof PatchApiV1InvoicesByIdResponses];\n\nexport type GetApiV1InvoicesByIdPreviewData = {\n    body?: never;\n    path: {\n        id: number;\n    };\n    query?: never;\n    url: '/api/v1/invoices/{id}/preview';\n};\n\nexport type GetApiV1InvoicesByIdPreviewResponses = {\n    /**\n     * OK\n     */\n    200: unknown;\n};\n\nexport type PostApiV1InvoicesByIdSendData = {\n    body?: InvoiceSendDto;\n    path: {\n        id: number;\n    };\n    query?: never;\n    url: '/api/v1/invoices/{id}/send';\n};\n\nexport type PostApiV1InvoicesByIdSendResponses = {\n    /**\n     * OK\n     */\n    200: Invoice;\n};\n\nexport type PostApiV1InvoicesByIdSendResponse = PostApiV1InvoicesByIdSendResponses[keyof PostApiV1InvoicesByIdSendResponses];\n\nexport type PostApiV1InvoicesByIdSnapshotData = {\n    body?: never;\n    path: {\n        id: number;\n    };\n    query?: never;\n    url: '/api/v1/invoices/{id}/snapshot';\n};\n\nexport type PostApiV1InvoicesByIdSnapshotResponses = {\n    /**\n     * OK\n     */\n    200: Invoice;\n};\n\nexport type PostApiV1InvoicesByIdSnapshotResponse = PostApiV1InvoicesByIdSnapshotResponses[keyof PostApiV1InvoicesByIdSnapshotResponses];\n\nexport type ApiVVersionApiVersionOdataInvoicesData = {\n    body?: never;\n    path?: never;\n    query?: {\n        /**\n         * Limits the properties returned in the result.\n         */\n        select?: string;\n        /**\n         * Indicates the related entities to be represented inline. The maximum depth is 2.\n         */\n        expand?: string;\n        /**\n         * Restricts the set of items returned. The maximum number of expressions is 100. The allowed functions are: allfunctions.\n         */\n        filter?: string;\n        /**\n         * Specifies the order in which items are returned. The maximum number of expressions is 5.\n         */\n        orderby?: string;\n        /**\n         * Limits the number of items returned from a collection. The maximum value is 100.\n         */\n        top?: number;\n        /**\n         * Excludes the specified number of items of the queried collection from the result.\n         */\n        skip?: number;\n        /**\n         * Indicates whether the total count of items within a collection are returned in the result.\n         */\n        count?: boolean;\n    };\n    url: '/api/v1/odata/Invoices';\n};\n\nexport type ApiVVersionApiVersionOdataInvoicesResponses = {\n    /**\n     * OK\n     */\n    200: Array<Invoice>;\n};\n\nexport type ApiVVersionApiVersionOdataInvoicesResponse = ApiVVersionApiVersionOdataInvoicesResponses[keyof ApiVVersionApiVersionOdataInvoicesResponses];\n\nexport type ApiVVersionApiVersionOdataInvoicesCountData = {\n    body?: never;\n    path?: never;\n    query?: {\n        /**\n         * Limits the properties returned in the result.\n         */\n        select?: string;\n        /**\n         * Indicates the related entities to be represented inline. The maximum depth is 2.\n         */\n        expand?: string;\n        /**\n         * Restricts the set of items returned. The maximum number of expressions is 100. The allowed functions are: allfunctions.\n         */\n        filter?: string;\n        /**\n         * Specifies the order in which items are returned. The maximum number of expressions is 5.\n         */\n        orderby?: string;\n        /**\n         * Limits the number of items returned from a collection. The maximum value is 100.\n         */\n        top?: number;\n        /**\n         * Excludes the specified number of items of the queried collection from the result.\n         */\n        skip?: number;\n        /**\n         * Indicates whether the total count of items within a collection are returned in the result.\n         */\n        count?: boolean;\n    };\n    url: '/api/v1/odata/Invoices/$count';\n};\n\nexport type ApiVVersionApiVersionOdataInvoicesCountResponses = {\n    /**\n     * OK\n     */\n    200: Array<Invoice>;\n};\n\nexport type ApiVVersionApiVersionOdataInvoicesCountResponse = ApiVVersionApiVersionOdataInvoicesCountResponses[keyof ApiVVersionApiVersionOdataInvoicesCountResponses];\n\nexport type PutApiV1InvoiceSettingsData = {\n    body?: InvoiceSettingUpsertDto;\n    path?: never;\n    query?: never;\n    url: '/api/v1/invoice-settings';\n};\n\nexport type PutApiV1InvoiceSettingsResponses = {\n    /**\n     * OK\n     */\n    200: InvoiceSetting;\n};\n\nexport type PutApiV1InvoiceSettingsResponse = PutApiV1InvoiceSettingsResponses[keyof PutApiV1InvoiceSettingsResponses];\n\nexport type ApiVVersionApiVersionOdataInvoiceSettingsData = {\n    body?: never;\n    path?: never;\n    query?: {\n        /**\n         * Limits the properties returned in the result.\n         */\n        select?: string;\n        /**\n         * Indicates the related entities to be represented inline. The maximum depth is 2.\n         */\n        expand?: string;\n        /**\n         * Restricts the set of items returned. The maximum number of expressions is 100. The allowed functions are: allfunctions.\n         */\n        filter?: string;\n        /**\n         * Specifies the order in which items are returned. The maximum number of expressions is 5.\n         */\n        orderby?: string;\n        /**\n         * Limits the number of items returned from a collection. The maximum value is 100.\n         */\n        top?: number;\n        /**\n         * Excludes the specified number of items of the queried collection from the result.\n         */\n        skip?: number;\n        /**\n         * Indicates whether the total count of items within a collection are returned in the result.\n         */\n        count?: boolean;\n    };\n    url: '/api/v1/odata/InvoiceSettings';\n};\n\nexport type ApiVVersionApiVersionOdataInvoiceSettingsResponses = {\n    /**\n     * OK\n     */\n    200: Array<InvoiceSetting>;\n};\n\nexport type ApiVVersionApiVersionOdataInvoiceSettingsResponse = ApiVVersionApiVersionOdataInvoiceSettingsResponses[keyof ApiVVersionApiVersionOdataInvoiceSettingsResponses];\n\nexport type ApiVVersionApiVersionOdataInvoiceSettingsCountData = {\n    body?: never;\n    path?: never;\n    query?: {\n        /**\n         * Limits the properties returned in the result.\n         */\n        select?: string;\n        /**\n         * Indicates the related entities to be represented inline. The maximum depth is 2.\n         */\n        expand?: string;\n        /**\n         * Restricts the set of items returned. The maximum number of expressions is 100. The allowed functions are: allfunctions.\n         */\n        filter?: string;\n        /**\n         * Specifies the order in which items are returned. The maximum number of expressions is 5.\n         */\n        orderby?: string;\n        /**\n         * Limits the number of items returned from a collection. The maximum value is 100.\n         */\n        top?: number;\n        /**\n         * Excludes the specified number of items of the queried collection from the result.\n         */\n        skip?: number;\n        /**\n         * Indicates whether the total count of items within a collection are returned in the result.\n         */\n        count?: boolean;\n    };\n    url: '/api/v1/odata/InvoiceSettings/$count';\n};\n\nexport type ApiVVersionApiVersionOdataInvoiceSettingsCountResponses = {\n    /**\n     * OK\n     */\n    200: Array<InvoiceSetting>;\n};\n\nexport type ApiVVersionApiVersionOdataInvoiceSettingsCountResponse = ApiVVersionApiVersionOdataInvoiceSettingsCountResponses[keyof ApiVVersionApiVersionOdataInvoiceSettingsCountResponses];\n\nexport type ApiVVersionApiVersionOdataLicensesData = {\n    body?: never;\n    path?: never;\n    query?: {\n        /**\n         * Limits the properties returned in the result.\n         */\n        select?: string;\n        /**\n         * Indicates the related entities to be represented inline. The maximum depth is 2.\n         */\n        expand?: string;\n        /**\n         * Restricts the set of items returned. The maximum number of expressions is 100. The allowed functions are: allfunctions.\n         */\n        filter?: string;\n        /**\n         * Specifies the order in which items are returned. The maximum number of expressions is 5.\n         */\n        orderby?: string;\n        /**\n         * Limits the number of items returned from a collection. The maximum value is 100.\n         */\n        top?: number;\n        /**\n         * Excludes the specified number of items of the queried collection from the result.\n         */\n        skip?: number;\n        /**\n         * Indicates whether the total count of items within a collection are returned in the result.\n         */\n        count?: boolean;\n    };\n    url: '/api/v1/odata/Licenses';\n};\n\nexport type ApiVVersionApiVersionOdataLicensesResponses = {\n    /**\n     * OK\n     */\n    200: Array<LicenseDto>;\n};\n\nexport type ApiVVersionApiVersionOdataLicensesResponse = ApiVVersionApiVersionOdataLicensesResponses[keyof ApiVVersionApiVersionOdataLicensesResponses];\n\nexport type ApiVVersionApiVersionOdataLicensesCountData = {\n    body?: never;\n    path?: never;\n    query?: {\n        /**\n         * Limits the properties returned in the result.\n         */\n        select?: string;\n        /**\n         * Indicates the related entities to be represented inline. The maximum depth is 2.\n         */\n        expand?: string;\n        /**\n         * Restricts the set of items returned. The maximum number of expressions is 100. The allowed functions are: allfunctions.\n         */\n        filter?: string;\n        /**\n         * Specifies the order in which items are returned. The maximum number of expressions is 5.\n         */\n        orderby?: string;\n        /**\n         * Limits the number of items returned from a collection. The maximum value is 100.\n         */\n        top?: number;\n        /**\n         * Excludes the specified number of items of the queried collection from the result.\n         */\n        skip?: number;\n        /**\n         * Indicates whether the total count of items within a collection are returned in the result.\n         */\n        count?: boolean;\n    };\n    url: '/api/v1/odata/Licenses/$count';\n};\n\nexport type ApiVVersionApiVersionOdataLicensesCountResponses = {\n    /**\n     * OK\n     */\n    200: Array<LicenseDto>;\n};\n\nexport type ApiVVersionApiVersionOdataLicensesCountResponse = ApiVVersionApiVersionOdataLicensesCountResponses[keyof ApiVVersionApiVersionOdataLicensesCountResponses];\n\nexport type PostApiV1NotificationsTestData = {\n    body?: NotificationsTestSendDto;\n    path?: never;\n    query?: never;\n    url: '/api/v1/notifications/test';\n};\n\nexport type PostApiV1NotificationsTestResponses = {\n    /**\n     * OK\n     */\n    200: unknown;\n};\n\nexport type GetApiV1PersonalDocumentsByIdRawData = {\n    body?: never;\n    path: {\n        id: number;\n    };\n    query?: never;\n    url: '/api/v1/personal-documents/{id}/raw';\n};\n\nexport type GetApiV1PersonalDocumentsByIdRawResponses = {\n    /**\n     * OK\n     */\n    200: unknown;\n    /**\n     * No Content\n     */\n    204: void;\n};\n\nexport type GetApiV1PersonalDocumentsByIdRawResponse = GetApiV1PersonalDocumentsByIdRawResponses[keyof GetApiV1PersonalDocumentsByIdRawResponses];\n\nexport type PostApiV1PersonalDocumentsData = {\n    body?: {\n        File: Blob | File;\n        DocumentName: string;\n    };\n    path?: never;\n    query?: never;\n    url: '/api/v1/personal-documents';\n};\n\nexport type PostApiV1PersonalDocumentsResponses = {\n    /**\n     * OK\n     */\n    200: DocumentPersonal;\n};\n\nexport type PostApiV1PersonalDocumentsResponse = PostApiV1PersonalDocumentsResponses[keyof PostApiV1PersonalDocumentsResponses];\n\nexport type PostApiV1PersonalDocumentsByIdMoveToBusinessData = {\n    body?: DocumentPersonalMoveToBusinessDocumentsDto;\n    path: {\n        id: number;\n    };\n    query?: never;\n    url: '/api/v1/personal-documents/{id}/move-to-business';\n};\n\nexport type PostApiV1PersonalDocumentsByIdMoveToBusinessResponses = {\n    /**\n     * OK\n     */\n    200: unknown;\n};\n\nexport type DeleteApiV1PersonalDocumentsByIdData = {\n    body?: never;\n    path: {\n        id: number;\n    };\n    query?: never;\n    url: '/api/v1/personal-documents/{id}';\n};\n\nexport type DeleteApiV1PersonalDocumentsByIdResponses = {\n    /**\n     * OK\n     */\n    200: DocumentPersonal;\n};\n\nexport type DeleteApiV1PersonalDocumentsByIdResponse = DeleteApiV1PersonalDocumentsByIdResponses[keyof DeleteApiV1PersonalDocumentsByIdResponses];\n\nexport type GetApiV1PersonalDocumentsSummaryData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v1/personal-documents/summary';\n};\n\nexport type GetApiV1PersonalDocumentsSummaryResponses = {\n    /**\n     * OK\n     */\n    200: PersonalDocumentsSummary;\n};\n\nexport type GetApiV1PersonalDocumentsSummaryResponse = GetApiV1PersonalDocumentsSummaryResponses[keyof GetApiV1PersonalDocumentsSummaryResponses];\n\nexport type ApiVVersionApiVersionOdataPersonalDocumentsData = {\n    body?: never;\n    path?: never;\n    query?: {\n        /**\n         * Limits the properties returned in the result.\n         */\n        select?: string;\n        /**\n         * Indicates the related entities to be represented inline. The maximum depth is 2.\n         */\n        expand?: string;\n        /**\n         * Restricts the set of items returned. The maximum number of expressions is 100. The allowed functions are: allfunctions.\n         */\n        filter?: string;\n        /**\n         * Specifies the order in which items are returned. The maximum number of expressions is 5.\n         */\n        orderby?: string;\n        /**\n         * Limits the number of items returned from a collection. The maximum value is 100.\n         */\n        top?: number;\n        /**\n         * Excludes the specified number of items of the queried collection from the result.\n         */\n        skip?: number;\n        /**\n         * Indicates whether the total count of items within a collection are returned in the result.\n         */\n        count?: boolean;\n    };\n    url: '/api/v1/odata/PersonalDocuments';\n};\n\nexport type ApiVVersionApiVersionOdataPersonalDocumentsResponses = {\n    /**\n     * OK\n     */\n    200: Array<DocumentPersonal>;\n};\n\nexport type ApiVVersionApiVersionOdataPersonalDocumentsResponse = ApiVVersionApiVersionOdataPersonalDocumentsResponses[keyof ApiVVersionApiVersionOdataPersonalDocumentsResponses];\n\nexport type ApiVVersionApiVersionOdataPersonalDocumentsCountData = {\n    body?: never;\n    path?: never;\n    query?: {\n        /**\n         * Limits the properties returned in the result.\n         */\n        select?: string;\n        /**\n         * Indicates the related entities to be represented inline. The maximum depth is 2.\n         */\n        expand?: string;\n        /**\n         * Restricts the set of items returned. The maximum number of expressions is 100. The allowed functions are: allfunctions.\n         */\n        filter?: string;\n        /**\n         * Specifies the order in which items are returned. The maximum number of expressions is 5.\n         */\n        orderby?: string;\n        /**\n         * Limits the number of items returned from a collection. The maximum value is 100.\n         */\n        top?: number;\n        /**\n         * Excludes the specified number of items of the queried collection from the result.\n         */\n        skip?: number;\n        /**\n         * Indicates whether the total count of items within a collection are returned in the result.\n         */\n        count?: boolean;\n    };\n    url: '/api/v1/odata/PersonalDocuments/$count';\n};\n\nexport type ApiVVersionApiVersionOdataPersonalDocumentsCountResponses = {\n    /**\n     * OK\n     */\n    200: Array<DocumentPersonal>;\n};\n\nexport type ApiVVersionApiVersionOdataPersonalDocumentsCountResponse = ApiVVersionApiVersionOdataPersonalDocumentsCountResponses[keyof ApiVVersionApiVersionOdataPersonalDocumentsCountResponses];\n\nexport type PostApiV1RecurringTasksData = {\n    body?: RecurringTaskCreateDto;\n    path?: never;\n    query?: never;\n    url: '/api/v1/recurring-tasks';\n};\n\nexport type PostApiV1RecurringTasksResponses = {\n    /**\n     * OK\n     */\n    200: RecurringTask;\n};\n\nexport type PostApiV1RecurringTasksResponse = PostApiV1RecurringTasksResponses[keyof PostApiV1RecurringTasksResponses];\n\nexport type DeleteApiV1RecurringTasksByIdData = {\n    body?: never;\n    path: {\n        id: number;\n    };\n    query?: never;\n    url: '/api/v1/recurring-tasks/{id}';\n};\n\nexport type DeleteApiV1RecurringTasksByIdResponses = {\n    /**\n     * OK\n     */\n    200: unknown;\n};\n\nexport type PatchApiV1RecurringTasksByIdData = {\n    body?: RecurringTaskUpdateDto;\n    path: {\n        id: number;\n    };\n    query?: never;\n    url: '/api/v1/recurring-tasks/{id}';\n};\n\nexport type PatchApiV1RecurringTasksByIdResponses = {\n    /**\n     * OK\n     */\n    200: RecurringTask;\n};\n\nexport type PatchApiV1RecurringTasksByIdResponse = PatchApiV1RecurringTasksByIdResponses[keyof PatchApiV1RecurringTasksByIdResponses];\n\nexport type ApiVVersionApiVersionOdataRecurringTasksData = {\n    body?: never;\n    path?: never;\n    query?: {\n        /**\n         * Limits the properties returned in the result.\n         */\n        select?: string;\n        /**\n         * Indicates the related entities to be represented inline. The maximum depth is 2.\n         */\n        expand?: string;\n        /**\n         * Restricts the set of items returned. The maximum number of expressions is 100. The allowed functions are: allfunctions.\n         */\n        filter?: string;\n        /**\n         * Specifies the order in which items are returned. The maximum number of expressions is 5.\n         */\n        orderby?: string;\n        /**\n         * Limits the number of items returned from a collection. The maximum value is 100.\n         */\n        top?: number;\n        /**\n         * Excludes the specified number of items of the queried collection from the result.\n         */\n        skip?: number;\n        /**\n         * Indicates whether the total count of items within a collection are returned in the result.\n         */\n        count?: boolean;\n    };\n    url: '/api/v1/odata/RecurringTasks';\n};\n\nexport type ApiVVersionApiVersionOdataRecurringTasksResponses = {\n    /**\n     * OK\n     */\n    200: Array<RecurringTask>;\n};\n\nexport type ApiVVersionApiVersionOdataRecurringTasksResponse = ApiVVersionApiVersionOdataRecurringTasksResponses[keyof ApiVVersionApiVersionOdataRecurringTasksResponses];\n\nexport type ApiVVersionApiVersionOdataRecurringTasksCountData = {\n    body?: never;\n    path?: never;\n    query?: {\n        /**\n         * Limits the properties returned in the result.\n         */\n        select?: string;\n        /**\n         * Indicates the related entities to be represented inline. The maximum depth is 2.\n         */\n        expand?: string;\n        /**\n         * Restricts the set of items returned. The maximum number of expressions is 100. The allowed functions are: allfunctions.\n         */\n        filter?: string;\n        /**\n         * Specifies the order in which items are returned. The maximum number of expressions is 5.\n         */\n        orderby?: string;\n        /**\n         * Limits the number of items returned from a collection. The maximum value is 100.\n         */\n        top?: number;\n        /**\n         * Excludes the specified number of items of the queried collection from the result.\n         */\n        skip?: number;\n        /**\n         * Indicates whether the total count of items within a collection are returned in the result.\n         */\n        count?: boolean;\n    };\n    url: '/api/v1/odata/RecurringTasks/$count';\n};\n\nexport type ApiVVersionApiVersionOdataRecurringTasksCountResponses = {\n    /**\n     * OK\n     */\n    200: Array<RecurringTask>;\n};\n\nexport type ApiVVersionApiVersionOdataRecurringTasksCountResponse = ApiVVersionApiVersionOdataRecurringTasksCountResponses[keyof ApiVVersionApiVersionOdataRecurringTasksCountResponses];\n\nexport type GetData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/';\n};\n\nexport type GetResponses = {\n    /**\n     * OK\n     */\n    200: unknown;\n};\n\nexport type PostApiV1TasksData = {\n    body?: TasksCreateDto;\n    path?: never;\n    query?: never;\n    url: '/api/v1/tasks';\n};\n\nexport type PostApiV1TasksResponses = {\n    /**\n     * OK\n     */\n    200: Array<Task>;\n};\n\nexport type PostApiV1TasksResponse = PostApiV1TasksResponses[keyof PostApiV1TasksResponses];\n\nexport type PutApiV1TasksByIdData = {\n    body?: TaskUpdateDto;\n    path: {\n        id: number;\n    };\n    query?: never;\n    url: '/api/v1/tasks/{id}';\n};\n\nexport type PutApiV1TasksByIdResponses = {\n    /**\n     * OK\n     */\n    200: Task;\n};\n\nexport type PutApiV1TasksByIdResponse = PutApiV1TasksByIdResponses[keyof PutApiV1TasksByIdResponses];\n\nexport type PostApiV1TasksByIdSubmitData = {\n    body?: TaskSubmitDto;\n    path: {\n        id: number;\n    };\n    query?: never;\n    url: '/api/v1/tasks/{id}/submit';\n};\n\nexport type PostApiV1TasksByIdSubmitResponses = {\n    /**\n     * OK\n     */\n    200: Task;\n};\n\nexport type PostApiV1TasksByIdSubmitResponse = PostApiV1TasksByIdSubmitResponses[keyof PostApiV1TasksByIdSubmitResponses];\n\nexport type PostApiV1TasksByIdApproveData = {\n    body?: never;\n    path: {\n        id: number;\n    };\n    query?: never;\n    url: '/api/v1/tasks/{id}/approve';\n};\n\nexport type PostApiV1TasksByIdApproveResponses = {\n    /**\n     * OK\n     */\n    200: Task;\n};\n\nexport type PostApiV1TasksByIdApproveResponse = PostApiV1TasksByIdApproveResponses[keyof PostApiV1TasksByIdApproveResponses];\n\nexport type PostApiV1TasksByIdRejectData = {\n    body?: TaskRejectDto;\n    path: {\n        id: number;\n    };\n    query?: never;\n    url: '/api/v1/tasks/{id}/reject';\n};\n\nexport type PostApiV1TasksByIdRejectResponses = {\n    /**\n     * OK\n     */\n    200: Task;\n};\n\nexport type PostApiV1TasksByIdRejectResponse = PostApiV1TasksByIdRejectResponses[keyof PostApiV1TasksByIdRejectResponses];\n\nexport type GetApiV1TasksByIdCommentsData = {\n    body?: never;\n    path: {\n        id: number;\n    };\n    query?: never;\n    url: '/api/v1/tasks/{id}/comments';\n};\n\nexport type GetApiV1TasksByIdCommentsResponses = {\n    /**\n     * OK\n     */\n    200: Array<TaskComment>;\n};\n\nexport type GetApiV1TasksByIdCommentsResponse = GetApiV1TasksByIdCommentsResponses[keyof GetApiV1TasksByIdCommentsResponses];\n\nexport type GetApiV1TasksByIdDocumentsData = {\n    body?: never;\n    path: {\n        id: number;\n    };\n    query?: never;\n    url: '/api/v1/tasks/{id}/documents';\n};\n\nexport type GetApiV1TasksByIdDocumentsResponses = {\n    /**\n     * OK\n     */\n    200: Array<DocumentBusiness>;\n};\n\nexport type GetApiV1TasksByIdDocumentsResponse = GetApiV1TasksByIdDocumentsResponses[keyof GetApiV1TasksByIdDocumentsResponses];\n\nexport type ApiVVersionApiVersionOdataTasksData = {\n    body?: never;\n    path?: never;\n    query?: {\n        accountants?: Array<number>;\n        /**\n         * Limits the properties returned in the result.\n         */\n        select?: string;\n        /**\n         * Indicates the related entities to be represented inline. The maximum depth is 2.\n         */\n        expand?: string;\n        /**\n         * Restricts the set of items returned. The maximum number of expressions is 100. The allowed functions are: allfunctions.\n         */\n        filter?: string;\n        /**\n         * Specifies the order in which items are returned. The maximum number of expressions is 5.\n         */\n        orderby?: string;\n        /**\n         * Limits the number of items returned from a collection. The maximum value is 100.\n         */\n        top?: number;\n        /**\n         * Excludes the specified number of items of the queried collection from the result.\n         */\n        skip?: number;\n        /**\n         * Indicates whether the total count of items within a collection are returned in the result.\n         */\n        count?: boolean;\n    };\n    url: '/api/v1/odata/Tasks';\n};\n\nexport type ApiVVersionApiVersionOdataTasksResponses = {\n    /**\n     * OK\n     */\n    200: Array<Task>;\n};\n\nexport type ApiVVersionApiVersionOdataTasksResponse = ApiVVersionApiVersionOdataTasksResponses[keyof ApiVVersionApiVersionOdataTasksResponses];\n\nexport type ApiVVersionApiVersionOdataTasksCountData = {\n    body?: never;\n    path?: never;\n    query?: {\n        accountants?: Array<number>;\n        /**\n         * Limits the properties returned in the result.\n         */\n        select?: string;\n        /**\n         * Indicates the related entities to be represented inline. The maximum depth is 2.\n         */\n        expand?: string;\n        /**\n         * Restricts the set of items returned. The maximum number of expressions is 100. The allowed functions are: allfunctions.\n         */\n        filter?: string;\n        /**\n         * Specifies the order in which items are returned. The maximum number of expressions is 5.\n         */\n        orderby?: string;\n        /**\n         * Limits the number of items returned from a collection. The maximum value is 100.\n         */\n        top?: number;\n        /**\n         * Excludes the specified number of items of the queried collection from the result.\n         */\n        skip?: number;\n        /**\n         * Indicates whether the total count of items within a collection are returned in the result.\n         */\n        count?: boolean;\n    };\n    url: '/api/v1/odata/Tasks/$count';\n};\n\nexport type ApiVVersionApiVersionOdataTasksCountResponses = {\n    /**\n     * OK\n     */\n    200: Array<Task>;\n};\n\nexport type ApiVVersionApiVersionOdataTasksCountResponse = ApiVVersionApiVersionOdataTasksCountResponses[keyof ApiVVersionApiVersionOdataTasksCountResponses];\n\nexport type ApiVVersionApiVersionOdataTasksKeyData = {\n    body?: never;\n    path?: never;\n    query?: {\n        key?: number;\n        /**\n         * Limits the properties returned in the result.\n         */\n        select?: string;\n        /**\n         * Indicates the related entities to be represented inline. The maximum depth is 2.\n         */\n        expand?: string;\n    };\n    url: '/api/v1/odata/Tasks({key})';\n};\n\nexport type ApiVVersionApiVersionOdataTasksKeyResponses = {\n    /**\n     * OK\n     */\n    200: Task;\n};\n\nexport type ApiVVersionApiVersionOdataTasksKeyResponse = ApiVVersionApiVersionOdataTasksKeyResponses[keyof ApiVVersionApiVersionOdataTasksKeyResponses];\n\nexport type ApiVVersionApiVersionOdataTasksKey2Data = {\n    body?: never;\n    path?: never;\n    query?: {\n        key?: number;\n        /**\n         * Limits the properties returned in the result.\n         */\n        select?: string;\n        /**\n         * Indicates the related entities to be represented inline. The maximum depth is 2.\n         */\n        expand?: string;\n    };\n    url: '/api/v1/odata/Tasks/{key}';\n};\n\nexport type ApiVVersionApiVersionOdataTasksKey2Responses = {\n    /**\n     * OK\n     */\n    200: Task;\n};\n\nexport type ApiVVersionApiVersionOdataTasksKey2Response = ApiVVersionApiVersionOdataTasksKey2Responses[keyof ApiVVersionApiVersionOdataTasksKey2Responses];\n\nexport type PostApiV1UserRegisterData = {\n    body: RegisterRequest;\n    path?: never;\n    query?: never;\n    url: '/api/v1/user/register';\n};\n\nexport type PostApiV1UserRegisterErrors = {\n    /**\n     * Bad Request\n     */\n    400: HttpValidationProblemDetails;\n};\n\nexport type PostApiV1UserRegisterError = PostApiV1UserRegisterErrors[keyof PostApiV1UserRegisterErrors];\n\nexport type PostApiV1UserRegisterResponses = {\n    /**\n     * OK\n     */\n    200: unknown;\n};\n\nexport type PostApiV1UserLoginData = {\n    body: LoginRequest;\n    path?: never;\n    query?: {\n        useCookies?: boolean;\n        useSessionCookies?: boolean;\n    };\n    url: '/api/v1/user/login';\n};\n\nexport type PostApiV1UserLoginResponses = {\n    /**\n     * OK\n     */\n    200: AccessTokenResponse;\n};\n\nexport type PostApiV1UserLoginResponse = PostApiV1UserLoginResponses[keyof PostApiV1UserLoginResponses];\n\nexport type PostApiV1UserRefreshData = {\n    body: RefreshRequest;\n    path?: never;\n    query?: never;\n    url: '/api/v1/user/refresh';\n};\n\nexport type PostApiV1UserRefreshResponses = {\n    /**\n     * OK\n     */\n    200: AccessTokenResponse;\n};\n\nexport type PostApiV1UserRefreshResponse = PostApiV1UserRefreshResponses[keyof PostApiV1UserRefreshResponses];\n\nexport type MapIdentityApiApiVVersionApiVersionUserConfirmEmailData = {\n    body?: never;\n    path?: never;\n    query: {\n        userId: string;\n        code: string;\n        changedEmail?: string;\n    };\n    url: '/api/v1/user/confirmEmail';\n};\n\nexport type MapIdentityApiApiVVersionApiVersionUserConfirmEmailResponses = {\n    /**\n     * OK\n     */\n    200: unknown;\n};\n\nexport type PostApiV1UserResendConfirmationEmailData = {\n    body: ResendConfirmationEmailRequest;\n    path?: never;\n    query?: never;\n    url: '/api/v1/user/resendConfirmationEmail';\n};\n\nexport type PostApiV1UserResendConfirmationEmailResponses = {\n    /**\n     * OK\n     */\n    200: unknown;\n};\n\nexport type PostApiV1UserForgotPasswordData = {\n    body: ForgotPasswordRequest;\n    path?: never;\n    query?: never;\n    url: '/api/v1/user/forgotPassword';\n};\n\nexport type PostApiV1UserForgotPasswordErrors = {\n    /**\n     * Bad Request\n     */\n    400: HttpValidationProblemDetails;\n};\n\nexport type PostApiV1UserForgotPasswordError = PostApiV1UserForgotPasswordErrors[keyof PostApiV1UserForgotPasswordErrors];\n\nexport type PostApiV1UserForgotPasswordResponses = {\n    /**\n     * OK\n     */\n    200: unknown;\n};\n\nexport type PostApiV1UserResetPasswordData = {\n    body: ResetPasswordRequest;\n    path?: never;\n    query?: never;\n    url: '/api/v1/user/resetPassword';\n};\n\nexport type PostApiV1UserResetPasswordErrors = {\n    /**\n     * Bad Request\n     */\n    400: HttpValidationProblemDetails;\n};\n\nexport type PostApiV1UserResetPasswordError = PostApiV1UserResetPasswordErrors[keyof PostApiV1UserResetPasswordErrors];\n\nexport type PostApiV1UserResetPasswordResponses = {\n    /**\n     * OK\n     */\n    200: unknown;\n};\n\nexport type PostApiV1UserManage2FaData = {\n    body: TwoFactorRequest;\n    path?: never;\n    query?: never;\n    url: '/api/v1/user/manage/2fa';\n};\n\nexport type PostApiV1UserManage2FaErrors = {\n    /**\n     * Bad Request\n     */\n    400: HttpValidationProblemDetails;\n    /**\n     * Not Found\n     */\n    404: unknown;\n};\n\nexport type PostApiV1UserManage2FaError = PostApiV1UserManage2FaErrors[keyof PostApiV1UserManage2FaErrors];\n\nexport type PostApiV1UserManage2FaResponses = {\n    /**\n     * OK\n     */\n    200: TwoFactorResponse;\n};\n\nexport type PostApiV1UserManage2FaResponse = PostApiV1UserManage2FaResponses[keyof PostApiV1UserManage2FaResponses];\n\nexport type GetApiV1UserManageInfoData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v1/user/manage/info';\n};\n\nexport type GetApiV1UserManageInfoErrors = {\n    /**\n     * Bad Request\n     */\n    400: HttpValidationProblemDetails;\n    /**\n     * Not Found\n     */\n    404: unknown;\n};\n\nexport type GetApiV1UserManageInfoError = GetApiV1UserManageInfoErrors[keyof GetApiV1UserManageInfoErrors];\n\nexport type GetApiV1UserManageInfoResponses = {\n    /**\n     * OK\n     */\n    200: InfoResponse;\n};\n\nexport type GetApiV1UserManageInfoResponse = GetApiV1UserManageInfoResponses[keyof GetApiV1UserManageInfoResponses];\n\nexport type PostApiV1UserManageInfoData = {\n    body: InfoRequest;\n    path?: never;\n    query?: never;\n    url: '/api/v1/user/manage/info';\n};\n\nexport type PostApiV1UserManageInfoErrors = {\n    /**\n     * Bad Request\n     */\n    400: HttpValidationProblemDetails;\n    /**\n     * Not Found\n     */\n    404: unknown;\n};\n\nexport type PostApiV1UserManageInfoError = PostApiV1UserManageInfoErrors[keyof PostApiV1UserManageInfoErrors];\n\nexport type PostApiV1UserManageInfoResponses = {\n    /**\n     * OK\n     */\n    200: InfoResponse;\n};\n\nexport type PostApiV1UserManageInfoResponse = PostApiV1UserManageInfoResponses[keyof PostApiV1UserManageInfoResponses];\n\nexport type PostApiV1UserLogoutData = {\n    body?: unknown;\n    path?: never;\n    query?: never;\n    url: '/api/v1/user/logout';\n};\n\nexport type PostApiV1UserLogoutResponses = {\n    /**\n     * OK\n     */\n    200: unknown;\n};\n\nexport type GetApiV1UserDocumentsSummaryData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v1/user/documents-summary';\n};\n\nexport type GetApiV1UserDocumentsSummaryResponses = {\n    /**\n     * OK\n     */\n    200: PersonalDocumentsSummary;\n};\n\nexport type GetApiV1UserDocumentsSummaryResponse = GetApiV1UserDocumentsSummaryResponses[keyof GetApiV1UserDocumentsSummaryResponses];\n\nexport type DeleteApiV1UserData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v1/user';\n};\n\nexport type DeleteApiV1UserResponses = {\n    /**\n     * OK\n     */\n    200: unknown;\n};\n\nexport type GetApiV1UsersMeData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v1/users/me';\n};\n\nexport type GetApiV1UsersMeResponses = {\n    /**\n     * OK\n     */\n    200: User;\n};\n\nexport type GetApiV1UsersMeResponse = GetApiV1UsersMeResponses[keyof GetApiV1UsersMeResponses];\n\nexport type PatchApiV1UsersByIdData = {\n    body?: UserUpdateDto;\n    path: {\n        id: number;\n    };\n    query?: never;\n    url: '/api/v1/users/{id}';\n};\n\nexport type PatchApiV1UsersByIdResponses = {\n    /**\n     * OK\n     */\n    200: User;\n};\n\nexport type PatchApiV1UsersByIdResponse = PatchApiV1UsersByIdResponses[keyof PatchApiV1UsersByIdResponses];\n"
  },
  {
    "path": "packages/openapi-ts-tests/sdks/__snapshots__/method-class-conflict/instance/client/client.gen.ts",
    "content": "// 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 (options: RequestOptions) => {\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 url = buildUrl(opts);\n\n    return { opts, url };\n  };\n\n  const request: Client['request'] = async (options) => {\n    // @ts-expect-error\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"
  },
  {
    "path": "packages/openapi-ts-tests/sdks/__snapshots__/method-class-conflict/instance/client/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type { Auth } from '../core/auth.gen';\nexport type { QuerySerializerOptions } from '../core/bodySerializer.gen';\nexport {\n  formDataBodySerializer,\n  jsonBodySerializer,\n  urlSearchParamsBodySerializer,\n} from '../core/bodySerializer.gen';\nexport { buildClientParams } from '../core/params.gen';\nexport { serializeQueryKeyValue } from '../core/queryKeySerializer.gen';\nexport { createClient } from './client.gen';\nexport type {\n  Client,\n  ClientOptions,\n  Config,\n  CreateClientConfig,\n  Options,\n  RequestOptions,\n  RequestResult,\n  ResolvedRequestOptions,\n  ResponseStyle,\n  TDataShape,\n} from './types.gen';\nexport { createConfig, mergeHeaders } from './utils.gen';\n"
  },
  {
    "path": "packages/openapi-ts-tests/sdks/__snapshots__/method-class-conflict/instance/client/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { Auth } from '../core/auth.gen';\nimport type {\n  ServerSentEventsOptions,\n  ServerSentEventsResult,\n} from '../core/serverSentEvents.gen';\nimport type { Client as CoreClient, Config as CoreConfig } from '../core/types.gen';\nimport type { Middleware } from './utils.gen';\n\nexport type ResponseStyle = 'data' | 'fields';\n\nexport interface Config<T extends ClientOptions = ClientOptions>\n  extends Omit<RequestInit, 'body' | 'headers' | 'method'>, CoreConfig {\n  /**\n   * Base URL for all requests made by this client.\n   */\n  baseUrl?: T['baseUrl'];\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   * Please don't use the Fetch client for Next.js applications. The `next`\n   * options won't have any effect.\n   *\n   * Install {@link https://www.npmjs.com/package/@hey-api/client-next `@hey-api/client-next`} instead.\n   */\n  next?: never;\n  /**\n   * Return the response data parsed in a specified format. By default, `auto`\n   * will infer the appropriate method from the `Content-Type` response header.\n   * You can override this behavior with any of the {@link Body} methods.\n   * Select `stream` if you don't want to parse response data at all.\n   *\n   * @default 'auto'\n   */\n  parseAs?: 'arrayBuffer' | 'auto' | 'blob' | 'formData' | 'json' | 'stream' | 'text';\n  /**\n   * Should we return only data or multiple fields (data, error, response, etc.)?\n   *\n   * @default 'fields'\n   */\n  responseStyle?: ResponseStyle;\n  /**\n   * Throw an error instead of returning it in the response?\n   *\n   * @default false\n   */\n  throwOnError?: T['throwOnError'];\n}\n\nexport interface RequestOptions<\n  TData = unknown,\n  TResponseStyle extends ResponseStyle = 'fields',\n  ThrowOnError extends boolean = boolean,\n  Url extends string = string,\n>\n  extends\n    Config<{\n      responseStyle: TResponseStyle;\n      throwOnError: ThrowOnError;\n    }>,\n    Pick<\n      ServerSentEventsOptions<TData>,\n      | 'onRequest'\n      | 'onSseError'\n      | 'onSseEvent'\n      | 'sseDefaultRetryDelay'\n      | 'sseMaxRetryAttempts'\n      | 'sseMaxRetryDelay'\n    > {\n  /**\n   * Any body that you want to add to your request.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/fetch#body}\n   */\n  body?: unknown;\n  path?: Record<string, unknown>;\n  query?: Record<string, unknown>;\n  /**\n   * Security mechanism(s) to use for the request.\n   */\n  security?: ReadonlyArray<Auth>;\n  url: Url;\n}\n\nexport interface ResolvedRequestOptions<\n  TResponseStyle extends ResponseStyle = 'fields',\n  ThrowOnError extends boolean = boolean,\n  Url extends string = string,\n> extends RequestOptions<unknown, TResponseStyle, ThrowOnError, Url> {\n  serializedBody?: string;\n}\n\nexport type RequestResult<\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = boolean,\n  TResponseStyle extends ResponseStyle = 'fields',\n> = ThrowOnError extends true\n  ? Promise<\n      TResponseStyle extends 'data'\n        ? TData extends Record<string, unknown>\n          ? TData[keyof TData]\n          : TData\n        : {\n            data: TData extends Record<string, unknown> ? TData[keyof TData] : TData;\n            request: Request;\n            response: Response;\n          }\n    >\n  : Promise<\n      TResponseStyle extends 'data'\n        ? (TData extends Record<string, unknown> ? TData[keyof TData] : TData) | undefined\n        : (\n            | {\n                data: TData extends Record<string, unknown> ? TData[keyof TData] : TData;\n                error: undefined;\n              }\n            | {\n                data: undefined;\n                error: TError extends Record<string, unknown> ? TError[keyof TError] : TError;\n              }\n          ) & {\n            request: Request;\n            response: Response;\n          }\n    >;\n\nexport interface ClientOptions {\n  baseUrl?: string;\n  responseStyle?: ResponseStyle;\n  throwOnError?: boolean;\n}\n\ntype MethodFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'>,\n) => RequestResult<TData, TError, ThrowOnError, TResponseStyle>;\n\ntype SseFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'>,\n) => Promise<ServerSentEventsResult<TData, TError>>;\n\ntype RequestFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'> &\n    Pick<Required<RequestOptions<TData, TResponseStyle, ThrowOnError>>, 'method'>,\n) => RequestResult<TData, TError, ThrowOnError, TResponseStyle>;\n\ntype BuildUrlFn = <\n  TData extends {\n    body?: unknown;\n    path?: Record<string, unknown>;\n    query?: Record<string, unknown>;\n    url: string;\n  },\n>(\n  options: TData & Options<TData>,\n) => string;\n\nexport type Client = CoreClient<RequestFn, Config, MethodFn, BuildUrlFn, SseFn> & {\n  interceptors: Middleware<Request, Response, unknown, ResolvedRequestOptions>;\n};\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 = ClientOptions> = (\n  override?: Config<ClientOptions & T>,\n) => Config<Required<ClientOptions> & T>;\n\nexport interface TDataShape {\n  body?: unknown;\n  headers?: unknown;\n  path?: unknown;\n  query?: unknown;\n  url: string;\n}\n\ntype OmitKeys<T, K> = Pick<T, Exclude<keyof T, K>>;\n\nexport type Options<\n  TData extends TDataShape = TDataShape,\n  ThrowOnError extends boolean = boolean,\n  TResponse = unknown,\n  TResponseStyle extends ResponseStyle = 'fields',\n> = OmitKeys<\n  RequestOptions<TResponse, TResponseStyle, ThrowOnError>,\n  'body' | 'path' | 'query' | 'url'\n> &\n  ([TData] extends [never] ? unknown : Omit<TData, 'url'>);\n"
  },
  {
    "path": "packages/openapi-ts-tests/sdks/__snapshots__/method-class-conflict/instance/client/utils.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/sdks/__snapshots__/method-class-conflict/instance/client.gen.ts",
    "content": "// 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>());\n"
  },
  {
    "path": "packages/openapi-ts-tests/sdks/__snapshots__/method-class-conflict/instance/core/auth.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/sdks/__snapshots__/method-class-conflict/instance/core/bodySerializer.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/sdks/__snapshots__/method-class-conflict/instance/core/params.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/sdks/__snapshots__/method-class-conflict/instance/core/pathSerializer.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/sdks/__snapshots__/method-class-conflict/instance/core/queryKeySerializer.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\n/**\n * JSON-friendly union that mirrors what Pinia Colada can hash.\n */\nexport type JsonValue =\n  | null\n  | string\n  | number\n  | boolean\n  | JsonValue[]\n  | { [key: string]: JsonValue };\n\n/**\n * Replacer that converts non-JSON values (bigint, Date, etc.) to safe substitutes.\n */\nexport const queryKeyJsonReplacer = (_key: string, value: unknown) => {\n  if (value === undefined || typeof value === 'function' || typeof value === 'symbol') {\n    return undefined;\n  }\n  if (typeof value === 'bigint') {\n    return value.toString();\n  }\n  if (value instanceof Date) {\n    return value.toISOString();\n  }\n  return value;\n};\n\n/**\n * Safely stringifies a value and parses it back into a JsonValue.\n */\nexport const stringifyToJsonValue = (input: unknown): JsonValue | undefined => {\n  try {\n    const json = JSON.stringify(input, queryKeyJsonReplacer);\n    if (json === undefined) {\n      return undefined;\n    }\n    return JSON.parse(json) as JsonValue;\n  } catch {\n    return undefined;\n  }\n};\n\n/**\n * Detects plain objects (including objects with a null prototype).\n */\nconst isPlainObject = (value: unknown): value is Record<string, unknown> => {\n  if (value === null || typeof value !== 'object') {\n    return false;\n  }\n  const prototype = Object.getPrototypeOf(value as object);\n  return prototype === Object.prototype || prototype === null;\n};\n\n/**\n * Turns URLSearchParams into a sorted JSON object for deterministic keys.\n */\nconst serializeSearchParams = (params: URLSearchParams): JsonValue => {\n  const entries = Array.from(params.entries()).sort(([a], [b]) => a.localeCompare(b));\n  const result: Record<string, JsonValue> = {};\n\n  for (const [key, value] of entries) {\n    const existing = result[key];\n    if (existing === undefined) {\n      result[key] = value;\n      continue;\n    }\n\n    if (Array.isArray(existing)) {\n      (existing as string[]).push(value);\n    } else {\n      result[key] = [existing, value];\n    }\n  }\n\n  return result;\n};\n\n/**\n * Normalizes any accepted value into a JSON-friendly shape for query keys.\n */\nexport const serializeQueryKeyValue = (value: unknown): JsonValue | undefined => {\n  if (value === null) {\n    return null;\n  }\n\n  if (typeof value === 'string' || typeof value === 'number' || typeof value === 'boolean') {\n    return value;\n  }\n\n  if (value === undefined || typeof value === 'function' || typeof value === 'symbol') {\n    return undefined;\n  }\n\n  if (typeof value === 'bigint') {\n    return value.toString();\n  }\n\n  if (value instanceof Date) {\n    return value.toISOString();\n  }\n\n  if (Array.isArray(value)) {\n    return stringifyToJsonValue(value);\n  }\n\n  if (typeof URLSearchParams !== 'undefined' && value instanceof URLSearchParams) {\n    return serializeSearchParams(value);\n  }\n\n  if (isPlainObject(value)) {\n    return stringifyToJsonValue(value);\n  }\n\n  return undefined;\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/sdks/__snapshots__/method-class-conflict/instance/core/serverSentEvents.gen.ts",
    "content": "// 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 const 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            // Normalize line endings: CRLF -> LF, then CR -> LF\n            buffer = buffer.replace(/\\r\\n/g, '\\n').replace(/\\r/g, '\\n');\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"
  },
  {
    "path": "packages/openapi-ts-tests/sdks/__snapshots__/method-class-conflict/instance/core/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { Auth, AuthToken } from './auth.gen';\nimport type { BodySerializer, QuerySerializer, QuerySerializerOptions } from './bodySerializer.gen';\n\nexport type HttpMethod =\n  | 'connect'\n  | 'delete'\n  | 'get'\n  | 'head'\n  | 'options'\n  | 'patch'\n  | 'post'\n  | 'put'\n  | 'trace';\n\nexport type Client<\n  RequestFn = never,\n  Config = unknown,\n  MethodFn = never,\n  BuildUrlFn = never,\n  SseFn = never,\n> = {\n  /**\n   * Returns the final request URL.\n   */\n  buildUrl: BuildUrlFn;\n  getConfig: () => Config;\n  request: RequestFn;\n  setConfig: (config: Config) => Config;\n} & {\n  [K in HttpMethod]: MethodFn;\n} & ([SseFn] extends [never] ? { sse?: never } : { sse: { [K in HttpMethod]: SseFn } });\n\nexport interface Config {\n  /**\n   * Auth token or a function returning auth token. The resolved value will be\n   * added to the request payload as defined by its `security` array.\n   */\n  auth?: ((auth: Auth) => Promise<AuthToken> | AuthToken) | AuthToken;\n  /**\n   * A function for serializing request body parameter. By default,\n   * {@link JSON.stringify()} will be used.\n   */\n  bodySerializer?: BodySerializer | null;\n  /**\n   * An object containing any HTTP headers that you want to pre-populate your\n   * `Headers` object with.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/Headers/Headers#init See more}\n   */\n  headers?:\n    | RequestInit['headers']\n    | Record<\n        string,\n        string | number | boolean | (string | number | boolean)[] | null | undefined | unknown\n      >;\n  /**\n   * The request method.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/fetch#method See more}\n   */\n  method?: Uppercase<HttpMethod>;\n  /**\n   * A function for serializing request query parameters. By default, arrays\n   * will be exploded in form style, objects will be exploded in deepObject\n   * style, and reserved characters are percent-encoded.\n   *\n   * This method will have no effect if the native `paramsSerializer()` Axios\n   * API function is used.\n   *\n   * {@link https://swagger.io/docs/specification/serialization/#query View examples}\n   */\n  querySerializer?: QuerySerializer | QuerySerializerOptions;\n  /**\n   * A function validating request data. This is useful if you want to ensure\n   * the request conforms to the desired shape, so it can be safely sent to\n   * the server.\n   */\n  requestValidator?: (data: unknown) => Promise<unknown>;\n  /**\n   * A function transforming response data before it's returned. This is useful\n   * for post-processing data, e.g. converting ISO strings into Date objects.\n   */\n  responseTransformer?: (data: unknown) => Promise<unknown>;\n  /**\n   * A function validating response data. This is useful if you want to ensure\n   * the response conforms to the desired shape, so it can be safely passed to\n   * the transformers and returned to the user.\n   */\n  responseValidator?: (data: unknown) => Promise<unknown>;\n}\n\ntype IsExactlyNeverOrNeverUndefined<T> = [T] extends [never]\n  ? true\n  : [T] extends [never | undefined]\n    ? [undefined] extends [T]\n      ? false\n      : true\n    : false;\n\nexport type OmitNever<T extends Record<string, unknown>> = {\n  [K in keyof T as IsExactlyNeverOrNeverUndefined<T[K]> extends true ? never : K]: T[K];\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/sdks/__snapshots__/method-class-conflict/instance/core/utils.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/sdks/__snapshots__/method-class-conflict/instance/sdk.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport { type Client, formDataBodySerializer, type Options as Options2, type TDataShape } from './client';\nimport { client } from './client.gen';\nimport type { ApiVVersionApiVersionOdataAccountingCompaniesCountData, ApiVVersionApiVersionOdataAccountingCompaniesCountResponses, ApiVVersionApiVersionOdataAccountingCompaniesData, ApiVVersionApiVersionOdataAccountingCompaniesResponses, ApiVVersionApiVersionOdataAccountingCompanyMembershipsCountData, ApiVVersionApiVersionOdataAccountingCompanyMembershipsCountResponses, ApiVVersionApiVersionOdataAccountingCompanyMembershipsData, ApiVVersionApiVersionOdataAccountingCompanyMembershipsResponses, ApiVVersionApiVersionOdataBankAccountsCountData, ApiVVersionApiVersionOdataBankAccountsCountResponses, ApiVVersionApiVersionOdataBankAccountsData, ApiVVersionApiVersionOdataBankAccountsResponses, ApiVVersionApiVersionOdataBusinessAccountantAssignmentsCountData, ApiVVersionApiVersionOdataBusinessAccountantAssignmentsCountResponses, ApiVVersionApiVersionOdataBusinessAccountantAssignmentsData, ApiVVersionApiVersionOdataBusinessAccountantAssignmentsResponses, ApiVVersionApiVersionOdataBusinessDocumentActivitiesCountData, ApiVVersionApiVersionOdataBusinessDocumentActivitiesCountResponses, ApiVVersionApiVersionOdataBusinessDocumentActivitiesData, ApiVVersionApiVersionOdataBusinessDocumentActivitiesResponses, ApiVVersionApiVersionOdataBusinessDocumentsCountData, ApiVVersionApiVersionOdataBusinessDocumentsCountResponses, ApiVVersionApiVersionOdataBusinessDocumentsData, ApiVVersionApiVersionOdataBusinessDocumentsResponses, ApiVVersionApiVersionOdataBusinessDocumentsSummariesCountData, ApiVVersionApiVersionOdataBusinessDocumentsSummariesCountResponses, ApiVVersionApiVersionOdataBusinessDocumentsSummariesData, ApiVVersionApiVersionOdataBusinessDocumentsSummariesResponses, ApiVVersionApiVersionOdataBusinessesCountData, ApiVVersionApiVersionOdataBusinessesCountResponses, ApiVVersionApiVersionOdataBusinessesData, ApiVVersionApiVersionOdataBusinessesKey2Data, ApiVVersionApiVersionOdataBusinessesKey2Responses, ApiVVersionApiVersionOdataBusinessesKeyData, ApiVVersionApiVersionOdataBusinessesKeyResponses, ApiVVersionApiVersionOdataBusinessesResponses, ApiVVersionApiVersionOdataBusinessSummariesCountData, ApiVVersionApiVersionOdataBusinessSummariesCountResponses, ApiVVersionApiVersionOdataBusinessSummariesData, ApiVVersionApiVersionOdataBusinessSummariesResponses, ApiVVersionApiVersionOdataCounterpartiesCountData, ApiVVersionApiVersionOdataCounterpartiesCountResponses, ApiVVersionApiVersionOdataCounterpartiesData, ApiVVersionApiVersionOdataCounterpartiesResponses, ApiVVersionApiVersionOdataDataBoxCredentialsCountData, ApiVVersionApiVersionOdataDataBoxCredentialsCountResponses, ApiVVersionApiVersionOdataDataBoxCredentialsData, ApiVVersionApiVersionOdataDataBoxCredentialsResponses, ApiVVersionApiVersionOdataDocumentTypesCountData, ApiVVersionApiVersionOdataDocumentTypesCountResponses, ApiVVersionApiVersionOdataDocumentTypesData, ApiVVersionApiVersionOdataDocumentTypesResponses, ApiVVersionApiVersionOdataInvitationsCountData, ApiVVersionApiVersionOdataInvitationsCountResponses, ApiVVersionApiVersionOdataInvitationsData, ApiVVersionApiVersionOdataInvitationsResponses, ApiVVersionApiVersionOdataInvoicesCountData, ApiVVersionApiVersionOdataInvoicesCountResponses, ApiVVersionApiVersionOdataInvoicesData, ApiVVersionApiVersionOdataInvoiceSettingsCountData, ApiVVersionApiVersionOdataInvoiceSettingsCountResponses, ApiVVersionApiVersionOdataInvoiceSettingsData, ApiVVersionApiVersionOdataInvoiceSettingsResponses, ApiVVersionApiVersionOdataInvoicesResponses, ApiVVersionApiVersionOdataLicensesCountData, ApiVVersionApiVersionOdataLicensesCountResponses, ApiVVersionApiVersionOdataLicensesData, ApiVVersionApiVersionOdataLicensesResponses, ApiVVersionApiVersionOdataPersonalDocumentsCountData, ApiVVersionApiVersionOdataPersonalDocumentsCountResponses, ApiVVersionApiVersionOdataPersonalDocumentsData, ApiVVersionApiVersionOdataPersonalDocumentsResponses, ApiVVersionApiVersionOdataRecurringTasksCountData, ApiVVersionApiVersionOdataRecurringTasksCountResponses, ApiVVersionApiVersionOdataRecurringTasksData, ApiVVersionApiVersionOdataRecurringTasksResponses, ApiVVersionApiVersionOdataTasksCountData, ApiVVersionApiVersionOdataTasksCountResponses, ApiVVersionApiVersionOdataTasksData, ApiVVersionApiVersionOdataTasksKey2Data, ApiVVersionApiVersionOdataTasksKey2Responses, ApiVVersionApiVersionOdataTasksKeyData, ApiVVersionApiVersionOdataTasksKeyResponses, ApiVVersionApiVersionOdataTasksResponses, DeleteApiV1AccountingCompaniesByIdData, DeleteApiV1AccountingCompaniesByIdResponses, DeleteApiV1AccountingCompanyMembershipsByIdData, DeleteApiV1AccountingCompanyMembershipsByIdResponses, DeleteApiV1BankAccountsByIdData, DeleteApiV1BankAccountsByIdResponses, DeleteApiV1BusinessAccountantAssignmentsByIdData, DeleteApiV1BusinessAccountantAssignmentsByIdResponses, DeleteApiV1BusinessDocumentsByIdData, DeleteApiV1BusinessDocumentsByIdResponses, DeleteApiV1BusinessesByIdData, DeleteApiV1BusinessesByIdResponses, DeleteApiV1CounterpartiesByIdData, DeleteApiV1CounterpartiesByIdResponses, DeleteApiV1DataBoxCredentialsByIdData, DeleteApiV1DataBoxCredentialsByIdResponses, DeleteApiV1InvitationsByIdData, DeleteApiV1InvitationsByIdResponses, DeleteApiV1InvoicesByIdData, DeleteApiV1InvoicesByIdResponses, DeleteApiV1NotificationsDeviceTokensData, DeleteApiV1NotificationsDeviceTokensResponses, DeleteApiV1PersonalDocumentsByIdData, DeleteApiV1PersonalDocumentsByIdResponses, DeleteApiV1RecurringTasksByIdData, DeleteApiV1RecurringTasksByIdResponses, DeleteApiV1UserData, DeleteApiV1UserResponses, GetApiDevConfirmEmailData, GetApiDevConfirmEmailResponses, GetApiDevData, GetApiDevDbCreateData, GetApiDevDbCreateResponses, GetApiDevDbReset2Data, GetApiDevDbReset2Responses, GetApiDevDbResetData, GetApiDevDbResetResponses, GetApiDevDbTouchData, GetApiDevDbTouchResponses, GetApiDevEmailSendTestData, GetApiDevEmailSendTestResponses, GetApiDevJobProcessRecurringTasksData, GetApiDevJobProcessRecurringTasksResponses, GetApiDevNotificationsSendTestData, GetApiDevNotificationsSendTestResponses, GetApiDevReseedDbData, GetApiDevReseedDbResponses, GetApiDevResponses, GetApiDevSeedAllData, GetApiDevSeedAllResponses, GetApiDevSeedData, GetApiDevSeedProdData, GetApiDevSeedProdResponses, GetApiDevSeedResponses, GetApiV1BusinessDocumentsByIdRawData, GetApiV1BusinessDocumentsByIdRawResponses, GetApiV1BusinessesByIdDocumentTypesSummaryData, GetApiV1BusinessesByIdDocumentTypesSummaryResponses, GetApiV1InvoicesByIdPreviewData, GetApiV1InvoicesByIdPreviewResponses, GetApiV1PersonalDocumentsByIdRawData, GetApiV1PersonalDocumentsByIdRawResponses, GetApiV1PersonalDocumentsSummaryData, GetApiV1PersonalDocumentsSummaryResponses, GetApiV1TasksByIdCommentsData, GetApiV1TasksByIdCommentsResponses, GetApiV1TasksByIdDocumentsData, GetApiV1TasksByIdDocumentsResponses, GetApiV1UserDocumentsSummaryData, GetApiV1UserDocumentsSummaryResponses, GetApiV1UserManageInfoData, GetApiV1UserManageInfoErrors, GetApiV1UserManageInfoResponses, GetApiV1UsersMeData, GetApiV1UsersMeResponses, GetData, GetResponses, MapIdentityApiApiVVersionApiVersionUserConfirmEmailData, MapIdentityApiApiVVersionApiVersionUserConfirmEmailResponses, PatchApiV1CounterpartiesByIdData, PatchApiV1CounterpartiesByIdResponses, PatchApiV1InvitationsByIdData, PatchApiV1InvitationsByIdResponses, PatchApiV1InvoicesByIdData, PatchApiV1InvoicesByIdResponses, PatchApiV1RecurringTasksByIdData, PatchApiV1RecurringTasksByIdResponses, PatchApiV1UsersByIdData, PatchApiV1UsersByIdResponses, PostApiV1AccountingCompaniesByIdData, PostApiV1AccountingCompaniesByIdResponses, PostApiV1AccountingCompaniesData, PostApiV1AccountingCompaniesResponses, PostApiV1BusinessDocumentsByIdApproveData, PostApiV1BusinessDocumentsByIdApproveResponses, PostApiV1BusinessDocumentsByIdMoveToBusinessData, PostApiV1BusinessDocumentsByIdMoveToBusinessResponses, PostApiV1BusinessDocumentsByIdMoveToPersonalData, PostApiV1BusinessDocumentsByIdMoveToPersonalResponses, PostApiV1BusinessDocumentsByIdUnapproveData, PostApiV1BusinessDocumentsByIdUnapproveResponses, PostApiV1BusinessDocumentsData, PostApiV1BusinessDocumentsResponses, PostApiV1BusinessesByIdDisconnectData, PostApiV1BusinessesByIdDisconnectResponses, PostApiV1BusinessesData, PostApiV1BusinessesResponses, PostApiV1CounterpartiesData, PostApiV1CounterpartiesResponses, PostApiV1FeedbackData, PostApiV1FeedbackResponses, PostApiV1InvitationsByIdAcceptData, PostApiV1InvitationsByIdAcceptResponses, PostApiV1InvitationsByIdRejectData, PostApiV1InvitationsByIdRejectResponses, PostApiV1InvitationsData, PostApiV1InvitationsResponses, PostApiV1InvoicesByIdSendData, PostApiV1InvoicesByIdSendResponses, PostApiV1InvoicesByIdSnapshotData, PostApiV1InvoicesByIdSnapshotResponses, PostApiV1InvoicesData, PostApiV1InvoicesResponses, PostApiV1NotificationsTestData, PostApiV1NotificationsTestResponses, PostApiV1PersonalDocumentsByIdMoveToBusinessData, PostApiV1PersonalDocumentsByIdMoveToBusinessResponses, PostApiV1PersonalDocumentsData, PostApiV1PersonalDocumentsResponses, PostApiV1RecurringTasksData, PostApiV1RecurringTasksResponses, PostApiV1TasksByIdApproveData, PostApiV1TasksByIdApproveResponses, PostApiV1TasksByIdRejectData, PostApiV1TasksByIdRejectResponses, PostApiV1TasksByIdSubmitData, PostApiV1TasksByIdSubmitResponses, PostApiV1TasksData, PostApiV1TasksResponses, PostApiV1UserForgotPasswordData, PostApiV1UserForgotPasswordErrors, PostApiV1UserForgotPasswordResponses, PostApiV1UserLoginData, PostApiV1UserLoginResponses, PostApiV1UserLogoutData, PostApiV1UserLogoutResponses, PostApiV1UserManage2FaData, PostApiV1UserManage2FaErrors, PostApiV1UserManage2FaResponses, PostApiV1UserManageInfoData, PostApiV1UserManageInfoErrors, PostApiV1UserManageInfoResponses, PostApiV1UserRefreshData, PostApiV1UserRefreshResponses, PostApiV1UserRegisterData, PostApiV1UserRegisterErrors, PostApiV1UserRegisterResponses, PostApiV1UserResendConfirmationEmailData, PostApiV1UserResendConfirmationEmailResponses, PostApiV1UserResetPasswordData, PostApiV1UserResetPasswordErrors, PostApiV1UserResetPasswordResponses, PutApiV1AccountingCompanyMembershipsData, PutApiV1AccountingCompanyMembershipsResponses, PutApiV1BankAccountsData, PutApiV1BankAccountsResponses, PutApiV1BusinessAccountantAssignmentsData, PutApiV1BusinessAccountantAssignmentsResponses, PutApiV1BusinessDocumentsByIdData, PutApiV1BusinessDocumentsByIdResponses, PutApiV1BusinessesByIdContactData, PutApiV1BusinessesByIdContactResponses, PutApiV1BusinessesByIdData, PutApiV1BusinessesByIdResponses, PutApiV1BusinessMembershipsData, PutApiV1BusinessMembershipsResponses, PutApiV1DataBoxCredentialsData, PutApiV1DataBoxCredentialsResponses, PutApiV1InvoiceSettingsData, PutApiV1InvoiceSettingsResponses, PutApiV1NotificationsDeviceTokensData, PutApiV1NotificationsDeviceTokensResponses, PutApiV1TasksByIdData, PutApiV1TasksByIdResponses } from './types.gen';\n\nexport type Options<TData extends TDataShape = TDataShape, ThrowOnError extends boolean = boolean> = Options2<TData, ThrowOnError> & {\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\nclass HeyApiClient {\n    protected client: Client;\n    \n    constructor(args?: {\n        client?: Client;\n    }) {\n        this.client = args?.client ?? client;\n    }\n}\n\nclass HeyApiRegistry<T> {\n    private readonly defaultKey = 'default';\n    \n    private readonly instances: Map<string, T> = new Map();\n    \n    get(key?: string): T {\n        const instance = this.instances.get(key ?? this.defaultKey);\n        if (!instance) {\n            throw new Error(`No SDK client found. Create one with \"new Sdk()\" to fix this error.`);\n        }\n        return instance;\n    }\n    \n    set(value: T, key?: string): void {\n        this.instances.set(key ?? this.defaultKey, value);\n    }\n}\n\nexport class AccountingCompanies extends HeyApiClient {\n    public count<ThrowOnError extends boolean = false>(options?: Options<ApiVVersionApiVersionOdataAccountingCompaniesCountData, ThrowOnError>) {\n        return (options?.client ?? this.client).get<ApiVVersionApiVersionOdataAccountingCompaniesCountResponses, unknown, ThrowOnError>({ url: '/api/v1/odata/AccountingCompanies/$count', ...options });\n    }\n}\n\nexport class AccountingCompanyMemberships extends HeyApiClient {\n    public count<ThrowOnError extends boolean = false>(options?: Options<ApiVVersionApiVersionOdataAccountingCompanyMembershipsCountData, ThrowOnError>) {\n        return (options?.client ?? this.client).get<ApiVVersionApiVersionOdataAccountingCompanyMembershipsCountResponses, unknown, ThrowOnError>({ url: '/api/v1/odata/AccountingCompanyMemberships/$count', ...options });\n    }\n}\n\nexport class BankAccounts extends HeyApiClient {\n    public count<ThrowOnError extends boolean = false>(options?: Options<ApiVVersionApiVersionOdataBankAccountsCountData, ThrowOnError>) {\n        return (options?.client ?? this.client).get<ApiVVersionApiVersionOdataBankAccountsCountResponses, unknown, ThrowOnError>({ url: '/api/v1/odata/BankAccounts/$count', ...options });\n    }\n}\n\nexport class BusinessAccountantAssignments extends HeyApiClient {\n    public count<ThrowOnError extends boolean = false>(options?: Options<ApiVVersionApiVersionOdataBusinessAccountantAssignmentsCountData, ThrowOnError>) {\n        return (options?.client ?? this.client).get<ApiVVersionApiVersionOdataBusinessAccountantAssignmentsCountResponses, unknown, ThrowOnError>({ url: '/api/v1/odata/BusinessAccountantAssignments/$count', ...options });\n    }\n}\n\nexport class BusinessDocumentActivities extends HeyApiClient {\n    public count<ThrowOnError extends boolean = false>(options?: Options<ApiVVersionApiVersionOdataBusinessDocumentActivitiesCountData, ThrowOnError>) {\n        return (options?.client ?? this.client).get<ApiVVersionApiVersionOdataBusinessDocumentActivitiesCountResponses, unknown, ThrowOnError>({ url: '/api/v1/odata/BusinessDocumentActivities/$count', ...options });\n    }\n}\n\nexport class BusinessDocuments extends HeyApiClient {\n    public count<ThrowOnError extends boolean = false>(options?: Options<ApiVVersionApiVersionOdataBusinessDocumentsCountData, ThrowOnError>) {\n        return (options?.client ?? this.client).get<ApiVVersionApiVersionOdataBusinessDocumentsCountResponses, unknown, ThrowOnError>({ url: '/api/v1/odata/BusinessDocuments/$count', ...options });\n    }\n}\n\nexport class BusinessDocumentsSummaries extends HeyApiClient {\n    /**\n     * @deprecated\n     */\n    public count<ThrowOnError extends boolean = false>(options?: Options<ApiVVersionApiVersionOdataBusinessDocumentsSummariesCountData, ThrowOnError>) {\n        return (options?.client ?? this.client).get<ApiVVersionApiVersionOdataBusinessDocumentsSummariesCountResponses, unknown, ThrowOnError>({ url: '/api/v1/odata/BusinessDocumentsSummaries/$count', ...options });\n    }\n}\n\nexport class Businesses extends HeyApiClient {\n    public count<ThrowOnError extends boolean = false>(options?: Options<ApiVVersionApiVersionOdataBusinessesCountData, ThrowOnError>) {\n        return (options?.client ?? this.client).get<ApiVVersionApiVersionOdataBusinessesCountResponses, unknown, ThrowOnError>({ url: '/api/v1/odata/Businesses/$count', ...options });\n    }\n    \n    public key<ThrowOnError extends boolean = false>(options?: Options<ApiVVersionApiVersionOdataBusinessesKey2Data, ThrowOnError>) {\n        return (options?.client ?? this.client).get<ApiVVersionApiVersionOdataBusinessesKey2Responses, unknown, ThrowOnError>({ url: '/api/v1/odata/Businesses/{key}', ...options });\n    }\n}\n\nexport class BusinessSummaries extends HeyApiClient {\n    public count<ThrowOnError extends boolean = false>(options?: Options<ApiVVersionApiVersionOdataBusinessSummariesCountData, ThrowOnError>) {\n        return (options?.client ?? this.client).get<ApiVVersionApiVersionOdataBusinessSummariesCountResponses, unknown, ThrowOnError>({ url: '/api/v1/odata/BusinessSummaries/$count', ...options });\n    }\n}\n\nexport class Counterparties extends HeyApiClient {\n    public count<ThrowOnError extends boolean = false>(options?: Options<ApiVVersionApiVersionOdataCounterpartiesCountData, ThrowOnError>) {\n        return (options?.client ?? this.client).get<ApiVVersionApiVersionOdataCounterpartiesCountResponses, unknown, ThrowOnError>({ url: '/api/v1/odata/Counterparties/$count', ...options });\n    }\n}\n\nexport class DataBoxCredentials extends HeyApiClient {\n    public count<ThrowOnError extends boolean = false>(options?: Options<ApiVVersionApiVersionOdataDataBoxCredentialsCountData, ThrowOnError>) {\n        return (options?.client ?? this.client).get<ApiVVersionApiVersionOdataDataBoxCredentialsCountResponses, unknown, ThrowOnError>({ url: '/api/v1/odata/DataBoxCredentials/$count', ...options });\n    }\n}\n\nexport class DocumentTypes extends HeyApiClient {\n    public count<ThrowOnError extends boolean = false>(options?: Options<ApiVVersionApiVersionOdataDocumentTypesCountData, ThrowOnError>) {\n        return (options?.client ?? this.client).get<ApiVVersionApiVersionOdataDocumentTypesCountResponses, unknown, ThrowOnError>({ url: '/api/v1/odata/DocumentTypes/$count', ...options });\n    }\n}\n\nexport class Invitations extends HeyApiClient {\n    public count<ThrowOnError extends boolean = false>(options?: Options<ApiVVersionApiVersionOdataInvitationsCountData, ThrowOnError>) {\n        return (options?.client ?? this.client).get<ApiVVersionApiVersionOdataInvitationsCountResponses, unknown, ThrowOnError>({ url: '/api/v1/odata/Invitations/$count', ...options });\n    }\n}\n\nexport class Invoices extends HeyApiClient {\n    public count<ThrowOnError extends boolean = false>(options?: Options<ApiVVersionApiVersionOdataInvoicesCountData, ThrowOnError>) {\n        return (options?.client ?? this.client).get<ApiVVersionApiVersionOdataInvoicesCountResponses, unknown, ThrowOnError>({ url: '/api/v1/odata/Invoices/$count', ...options });\n    }\n}\n\nexport class InvoiceSettings extends HeyApiClient {\n    public count<ThrowOnError extends boolean = false>(options?: Options<ApiVVersionApiVersionOdataInvoiceSettingsCountData, ThrowOnError>) {\n        return (options?.client ?? this.client).get<ApiVVersionApiVersionOdataInvoiceSettingsCountResponses, unknown, ThrowOnError>({ url: '/api/v1/odata/InvoiceSettings/$count', ...options });\n    }\n}\n\nexport class Licenses extends HeyApiClient {\n    public count<ThrowOnError extends boolean = false>(options?: Options<ApiVVersionApiVersionOdataLicensesCountData, ThrowOnError>) {\n        return (options?.client ?? this.client).get<ApiVVersionApiVersionOdataLicensesCountResponses, unknown, ThrowOnError>({ url: '/api/v1/odata/Licenses/$count', ...options });\n    }\n}\n\nexport class PersonalDocuments extends HeyApiClient {\n    public count<ThrowOnError extends boolean = false>(options?: Options<ApiVVersionApiVersionOdataPersonalDocumentsCountData, ThrowOnError>) {\n        return (options?.client ?? this.client).get<ApiVVersionApiVersionOdataPersonalDocumentsCountResponses, unknown, ThrowOnError>({ url: '/api/v1/odata/PersonalDocuments/$count', ...options });\n    }\n}\n\nexport class RecurringTasks extends HeyApiClient {\n    public count<ThrowOnError extends boolean = false>(options?: Options<ApiVVersionApiVersionOdataRecurringTasksCountData, ThrowOnError>) {\n        return (options?.client ?? this.client).get<ApiVVersionApiVersionOdataRecurringTasksCountResponses, unknown, ThrowOnError>({ url: '/api/v1/odata/RecurringTasks/$count', ...options });\n    }\n}\n\nexport class Tasks extends HeyApiClient {\n    public count<ThrowOnError extends boolean = false>(options?: Options<ApiVVersionApiVersionOdataTasksCountData, ThrowOnError>) {\n        return (options?.client ?? this.client).get<ApiVVersionApiVersionOdataTasksCountResponses, unknown, ThrowOnError>({ url: '/api/v1/odata/Tasks/$count', ...options });\n    }\n    \n    public key<ThrowOnError extends boolean = false>(options?: Options<ApiVVersionApiVersionOdataTasksKey2Data, ThrowOnError>) {\n        return (options?.client ?? this.client).get<ApiVVersionApiVersionOdataTasksKey2Responses, unknown, ThrowOnError>({ url: '/api/v1/odata/Tasks/{key}', ...options });\n    }\n}\n\nexport class Odata extends HeyApiClient {\n    public accountingCompanies<ThrowOnError extends boolean = false>(options?: Options<ApiVVersionApiVersionOdataAccountingCompaniesData, ThrowOnError>) {\n        return (options?.client ?? this.client).get<ApiVVersionApiVersionOdataAccountingCompaniesResponses, unknown, ThrowOnError>({ url: '/api/v1/odata/AccountingCompanies', ...options });\n    }\n    \n    public accountingCompanyMemberships<ThrowOnError extends boolean = false>(options?: Options<ApiVVersionApiVersionOdataAccountingCompanyMembershipsData, ThrowOnError>) {\n        return (options?.client ?? this.client).get<ApiVVersionApiVersionOdataAccountingCompanyMembershipsResponses, unknown, ThrowOnError>({ url: '/api/v1/odata/AccountingCompanyMemberships', ...options });\n    }\n    \n    public bankAccounts<ThrowOnError extends boolean = false>(options?: Options<ApiVVersionApiVersionOdataBankAccountsData, ThrowOnError>) {\n        return (options?.client ?? this.client).get<ApiVVersionApiVersionOdataBankAccountsResponses, unknown, ThrowOnError>({ url: '/api/v1/odata/BankAccounts', ...options });\n    }\n    \n    public businessAccountantAssignments<ThrowOnError extends boolean = false>(options?: Options<ApiVVersionApiVersionOdataBusinessAccountantAssignmentsData, ThrowOnError>) {\n        return (options?.client ?? this.client).get<ApiVVersionApiVersionOdataBusinessAccountantAssignmentsResponses, unknown, ThrowOnError>({ url: '/api/v1/odata/BusinessAccountantAssignments', ...options });\n    }\n    \n    public businessDocumentActivities<ThrowOnError extends boolean = false>(options?: Options<ApiVVersionApiVersionOdataBusinessDocumentActivitiesData, ThrowOnError>) {\n        return (options?.client ?? this.client).get<ApiVVersionApiVersionOdataBusinessDocumentActivitiesResponses, unknown, ThrowOnError>({ url: '/api/v1/odata/BusinessDocumentActivities', ...options });\n    }\n    \n    public businessDocuments<ThrowOnError extends boolean = false>(options?: Options<ApiVVersionApiVersionOdataBusinessDocumentsData, ThrowOnError>) {\n        return (options?.client ?? this.client).get<ApiVVersionApiVersionOdataBusinessDocumentsResponses, unknown, ThrowOnError>({ url: '/api/v1/odata/BusinessDocuments', ...options });\n    }\n    \n    /**\n     * @deprecated\n     */\n    public businessDocumentsSummaries<ThrowOnError extends boolean = false>(options?: Options<ApiVVersionApiVersionOdataBusinessDocumentsSummariesData, ThrowOnError>) {\n        return (options?.client ?? this.client).get<ApiVVersionApiVersionOdataBusinessDocumentsSummariesResponses, unknown, ThrowOnError>({ url: '/api/v1/odata/BusinessDocumentsSummaries', ...options });\n    }\n    \n    public businesses<ThrowOnError extends boolean = false>(options?: Options<ApiVVersionApiVersionOdataBusinessesData, ThrowOnError>) {\n        return (options?.client ?? this.client).get<ApiVVersionApiVersionOdataBusinessesResponses, unknown, ThrowOnError>({ url: '/api/v1/odata/Businesses', ...options });\n    }\n    \n    public businessesKey<ThrowOnError extends boolean = false>(options?: Options<ApiVVersionApiVersionOdataBusinessesKeyData, ThrowOnError>) {\n        return (options?.client ?? this.client).get<ApiVVersionApiVersionOdataBusinessesKeyResponses, unknown, ThrowOnError>({ url: '/api/v1/odata/Businesses({key})', ...options });\n    }\n    \n    public businessSummaries<ThrowOnError extends boolean = false>(options?: Options<ApiVVersionApiVersionOdataBusinessSummariesData, ThrowOnError>) {\n        return (options?.client ?? this.client).get<ApiVVersionApiVersionOdataBusinessSummariesResponses, unknown, ThrowOnError>({ url: '/api/v1/odata/BusinessSummaries', ...options });\n    }\n    \n    public counterparties<ThrowOnError extends boolean = false>(options?: Options<ApiVVersionApiVersionOdataCounterpartiesData, ThrowOnError>) {\n        return (options?.client ?? this.client).get<ApiVVersionApiVersionOdataCounterpartiesResponses, unknown, ThrowOnError>({ url: '/api/v1/odata/Counterparties', ...options });\n    }\n    \n    public dataBoxCredentials<ThrowOnError extends boolean = false>(options?: Options<ApiVVersionApiVersionOdataDataBoxCredentialsData, ThrowOnError>) {\n        return (options?.client ?? this.client).get<ApiVVersionApiVersionOdataDataBoxCredentialsResponses, unknown, ThrowOnError>({ url: '/api/v1/odata/DataBoxCredentials', ...options });\n    }\n    \n    public documentTypes<ThrowOnError extends boolean = false>(options?: Options<ApiVVersionApiVersionOdataDocumentTypesData, ThrowOnError>) {\n        return (options?.client ?? this.client).get<ApiVVersionApiVersionOdataDocumentTypesResponses, unknown, ThrowOnError>({ url: '/api/v1/odata/DocumentTypes', ...options });\n    }\n    \n    public invitations<ThrowOnError extends boolean = false>(options?: Options<ApiVVersionApiVersionOdataInvitationsData, ThrowOnError>) {\n        return (options?.client ?? this.client).get<ApiVVersionApiVersionOdataInvitationsResponses, unknown, ThrowOnError>({ url: '/api/v1/odata/Invitations', ...options });\n    }\n    \n    public invoices<ThrowOnError extends boolean = false>(options?: Options<ApiVVersionApiVersionOdataInvoicesData, ThrowOnError>) {\n        return (options?.client ?? this.client).get<ApiVVersionApiVersionOdataInvoicesResponses, unknown, ThrowOnError>({ url: '/api/v1/odata/Invoices', ...options });\n    }\n    \n    public invoiceSettings<ThrowOnError extends boolean = false>(options?: Options<ApiVVersionApiVersionOdataInvoiceSettingsData, ThrowOnError>) {\n        return (options?.client ?? this.client).get<ApiVVersionApiVersionOdataInvoiceSettingsResponses, unknown, ThrowOnError>({ url: '/api/v1/odata/InvoiceSettings', ...options });\n    }\n    \n    public licenses<ThrowOnError extends boolean = false>(options?: Options<ApiVVersionApiVersionOdataLicensesData, ThrowOnError>) {\n        return (options?.client ?? this.client).get<ApiVVersionApiVersionOdataLicensesResponses, unknown, ThrowOnError>({ url: '/api/v1/odata/Licenses', ...options });\n    }\n    \n    public personalDocuments<ThrowOnError extends boolean = false>(options?: Options<ApiVVersionApiVersionOdataPersonalDocumentsData, ThrowOnError>) {\n        return (options?.client ?? this.client).get<ApiVVersionApiVersionOdataPersonalDocumentsResponses, unknown, ThrowOnError>({ url: '/api/v1/odata/PersonalDocuments', ...options });\n    }\n    \n    public recurringTasks<ThrowOnError extends boolean = false>(options?: Options<ApiVVersionApiVersionOdataRecurringTasksData, ThrowOnError>) {\n        return (options?.client ?? this.client).get<ApiVVersionApiVersionOdataRecurringTasksResponses, unknown, ThrowOnError>({ url: '/api/v1/odata/RecurringTasks', ...options });\n    }\n    \n    public tasks<ThrowOnError extends boolean = false>(options?: Options<ApiVVersionApiVersionOdataTasksData, ThrowOnError>) {\n        return (options?.client ?? this.client).get<ApiVVersionApiVersionOdataTasksResponses, unknown, ThrowOnError>({ url: '/api/v1/odata/Tasks', ...options });\n    }\n    \n    public tasksKey<ThrowOnError extends boolean = false>(options?: Options<ApiVVersionApiVersionOdataTasksKeyData, ThrowOnError>) {\n        return (options?.client ?? this.client).get<ApiVVersionApiVersionOdataTasksKeyResponses, unknown, ThrowOnError>({ url: '/api/v1/odata/Tasks({key})', ...options });\n    }\n    \n    private _accountingCompanies?: AccountingCompanies;\n    get accountingCompanies2(): AccountingCompanies {\n        return this._accountingCompanies ??= new AccountingCompanies({ client: this.client });\n    }\n    \n    private _accountingCompanyMemberships?: AccountingCompanyMemberships;\n    get accountingCompanyMemberships2(): AccountingCompanyMemberships {\n        return this._accountingCompanyMemberships ??= new AccountingCompanyMemberships({ client: this.client });\n    }\n    \n    private _bankAccounts?: BankAccounts;\n    get bankAccounts2(): BankAccounts {\n        return this._bankAccounts ??= new BankAccounts({ client: this.client });\n    }\n    \n    private _businessAccountantAssignments?: BusinessAccountantAssignments;\n    get businessAccountantAssignments2(): BusinessAccountantAssignments {\n        return this._businessAccountantAssignments ??= new BusinessAccountantAssignments({ client: this.client });\n    }\n    \n    private _businessDocumentActivities?: BusinessDocumentActivities;\n    get businessDocumentActivities2(): BusinessDocumentActivities {\n        return this._businessDocumentActivities ??= new BusinessDocumentActivities({ client: this.client });\n    }\n    \n    private _businessDocuments?: BusinessDocuments;\n    get businessDocuments2(): BusinessDocuments {\n        return this._businessDocuments ??= new BusinessDocuments({ client: this.client });\n    }\n    \n    private _businessDocumentsSummaries?: BusinessDocumentsSummaries;\n    get businessDocumentsSummaries2(): BusinessDocumentsSummaries {\n        return this._businessDocumentsSummaries ??= new BusinessDocumentsSummaries({ client: this.client });\n    }\n    \n    private _businesses?: Businesses;\n    get businesses2(): Businesses {\n        return this._businesses ??= new Businesses({ client: this.client });\n    }\n    \n    private _businessSummaries?: BusinessSummaries;\n    get businessSummaries2(): BusinessSummaries {\n        return this._businessSummaries ??= new BusinessSummaries({ client: this.client });\n    }\n    \n    private _counterparties?: Counterparties;\n    get counterparties2(): Counterparties {\n        return this._counterparties ??= new Counterparties({ client: this.client });\n    }\n    \n    private _dataBoxCredentials?: DataBoxCredentials;\n    get dataBoxCredentials2(): DataBoxCredentials {\n        return this._dataBoxCredentials ??= new DataBoxCredentials({ client: this.client });\n    }\n    \n    private _documentTypes?: DocumentTypes;\n    get documentTypes2(): DocumentTypes {\n        return this._documentTypes ??= new DocumentTypes({ client: this.client });\n    }\n    \n    private _invitations?: Invitations;\n    get invitations2(): Invitations {\n        return this._invitations ??= new Invitations({ client: this.client });\n    }\n    \n    private _invoices?: Invoices;\n    get invoices2(): Invoices {\n        return this._invoices ??= new Invoices({ client: this.client });\n    }\n    \n    private _invoiceSettings?: InvoiceSettings;\n    get invoiceSettings2(): InvoiceSettings {\n        return this._invoiceSettings ??= new InvoiceSettings({ client: this.client });\n    }\n    \n    private _licenses?: Licenses;\n    get licenses2(): Licenses {\n        return this._licenses ??= new Licenses({ client: this.client });\n    }\n    \n    private _personalDocuments?: PersonalDocuments;\n    get personalDocuments2(): PersonalDocuments {\n        return this._personalDocuments ??= new PersonalDocuments({ client: this.client });\n    }\n    \n    private _recurringTasks?: RecurringTasks;\n    get recurringTasks2(): RecurringTasks {\n        return this._recurringTasks ??= new RecurringTasks({ client: this.client });\n    }\n    \n    private _tasks?: Tasks;\n    get tasks2(): Tasks {\n        return this._tasks ??= new Tasks({ client: this.client });\n    }\n}\n\nexport class VVersionApiVersion extends HeyApiClient {\n    private _odata?: Odata;\n    get odata(): Odata {\n        return this._odata ??= new Odata({ client: this.client });\n    }\n}\n\nexport class Api extends HeyApiClient {\n    private _vVersionApiVersion?: VVersionApiVersion;\n    get vVersionApiVersion(): VVersionApiVersion {\n        return this._vVersionApiVersion ??= new VVersionApiVersion({ client: this.client });\n    }\n}\n\nexport class User extends HeyApiClient {\n    public confirmEmail<ThrowOnError extends boolean = false>(options: Options<MapIdentityApiApiVVersionApiVersionUserConfirmEmailData, ThrowOnError>) {\n        return (options.client ?? this.client).get<MapIdentityApiApiVVersionApiVersionUserConfirmEmailResponses, unknown, ThrowOnError>({ url: '/api/v1/user/confirmEmail', ...options });\n    }\n}\n\nexport class VVersionApiVersion2 extends HeyApiClient {\n    private _user?: User;\n    get user(): User {\n        return this._user ??= new User({ client: this.client });\n    }\n}\n\nexport class Api2 extends HeyApiClient {\n    private _vVersionApiVersion?: VVersionApiVersion2;\n    get vVersionApiVersion(): VVersionApiVersion2 {\n        return this._vVersionApiVersion ??= new VVersionApiVersion2({ client: this.client });\n    }\n}\n\nexport class MapIdentityApi extends HeyApiClient {\n    private _api?: Api2;\n    get api(): Api2 {\n        return this._api ??= new Api2({ client: this.client });\n    }\n}\n\nexport class Sdk extends HeyApiClient {\n    public static readonly __registry = new HeyApiRegistry<Sdk>();\n    \n    constructor(args?: {\n        client?: Client;\n        key?: string;\n    }) {\n        super(args);\n        Sdk.__registry.set(this, args?.key);\n    }\n    \n    public postApiV1AccountingCompanies<ThrowOnError extends boolean = false>(options?: Options<PostApiV1AccountingCompaniesData, ThrowOnError>) {\n        return (options?.client ?? this.client).post<PostApiV1AccountingCompaniesResponses, unknown, ThrowOnError>({\n            url: '/api/v1/accounting-companies',\n            ...options,\n            headers: {\n                'Content-Type': 'application/json;odata.metadata=minimal;odata.streaming=true',\n                ...options?.headers\n            }\n        });\n    }\n    \n    public deleteApiV1AccountingCompaniesById<ThrowOnError extends boolean = false>(options: Options<DeleteApiV1AccountingCompaniesByIdData, ThrowOnError>) {\n        return (options.client ?? this.client).delete<DeleteApiV1AccountingCompaniesByIdResponses, unknown, ThrowOnError>({ url: '/api/v1/accounting-companies/{id}', ...options });\n    }\n    \n    public postApiV1AccountingCompaniesById<ThrowOnError extends boolean = false>(options: Options<PostApiV1AccountingCompaniesByIdData, ThrowOnError>) {\n        return (options.client ?? this.client).post<PostApiV1AccountingCompaniesByIdResponses, unknown, ThrowOnError>({\n            url: '/api/v1/accounting-companies/{id}',\n            ...options,\n            headers: {\n                'Content-Type': 'application/json;odata.metadata=minimal;odata.streaming=true',\n                ...options.headers\n            }\n        });\n    }\n    \n    public putApiV1AccountingCompanyMemberships<ThrowOnError extends boolean = false>(options?: Options<PutApiV1AccountingCompanyMembershipsData, ThrowOnError>) {\n        return (options?.client ?? this.client).put<PutApiV1AccountingCompanyMembershipsResponses, unknown, ThrowOnError>({\n            url: '/api/v1/accounting-company-memberships',\n            ...options,\n            headers: {\n                'Content-Type': 'application/json;odata.metadata=minimal;odata.streaming=true',\n                ...options?.headers\n            }\n        });\n    }\n    \n    public deleteApiV1AccountingCompanyMembershipsById<ThrowOnError extends boolean = false>(options: Options<DeleteApiV1AccountingCompanyMembershipsByIdData, ThrowOnError>) {\n        return (options.client ?? this.client).delete<DeleteApiV1AccountingCompanyMembershipsByIdResponses, unknown, ThrowOnError>({ url: '/api/v1/accounting-company-memberships/{id}', ...options });\n    }\n    \n    public putApiV1BankAccounts<ThrowOnError extends boolean = false>(options?: Options<PutApiV1BankAccountsData, ThrowOnError>) {\n        return (options?.client ?? this.client).put<PutApiV1BankAccountsResponses, unknown, ThrowOnError>({\n            url: '/api/v1/bank-accounts',\n            ...options,\n            headers: {\n                'Content-Type': 'application/json;odata.metadata=minimal;odata.streaming=true',\n                ...options?.headers\n            }\n        });\n    }\n    \n    public deleteApiV1BankAccountsById<ThrowOnError extends boolean = false>(options: Options<DeleteApiV1BankAccountsByIdData, ThrowOnError>) {\n        return (options.client ?? this.client).delete<DeleteApiV1BankAccountsByIdResponses, unknown, ThrowOnError>({ url: '/api/v1/bank-accounts/{id}', ...options });\n    }\n    \n    public putApiV1BusinessAccountantAssignments<ThrowOnError extends boolean = false>(options?: Options<PutApiV1BusinessAccountantAssignmentsData, ThrowOnError>) {\n        return (options?.client ?? this.client).put<PutApiV1BusinessAccountantAssignmentsResponses, unknown, ThrowOnError>({\n            url: '/api/v1/business-accountant-assignments',\n            ...options,\n            headers: {\n                'Content-Type': 'application/json;odata.metadata=minimal;odata.streaming=true',\n                ...options?.headers\n            }\n        });\n    }\n    \n    public deleteApiV1BusinessAccountantAssignmentsById<ThrowOnError extends boolean = false>(options: Options<DeleteApiV1BusinessAccountantAssignmentsByIdData, ThrowOnError>) {\n        return (options.client ?? this.client).delete<DeleteApiV1BusinessAccountantAssignmentsByIdResponses, unknown, ThrowOnError>({ url: '/api/v1/business-accountant-assignments/{id}', ...options });\n    }\n    \n    public getApiV1BusinessDocumentsByIdRaw<ThrowOnError extends boolean = false>(options: Options<GetApiV1BusinessDocumentsByIdRawData, ThrowOnError>) {\n        return (options.client ?? this.client).get<GetApiV1BusinessDocumentsByIdRawResponses, unknown, ThrowOnError>({ url: '/api/v1/business-documents/{id}/raw', ...options });\n    }\n    \n    public postApiV1BusinessDocuments<ThrowOnError extends boolean = false>(options?: Options<PostApiV1BusinessDocumentsData, ThrowOnError>) {\n        return (options?.client ?? this.client).post<PostApiV1BusinessDocumentsResponses, unknown, ThrowOnError>({\n            ...formDataBodySerializer,\n            url: '/api/v1/business-documents',\n            ...options,\n            headers: {\n                'Content-Type': null,\n                ...options?.headers\n            }\n        });\n    }\n    \n    public deleteApiV1BusinessDocumentsById<ThrowOnError extends boolean = false>(options: Options<DeleteApiV1BusinessDocumentsByIdData, ThrowOnError>) {\n        return (options.client ?? this.client).delete<DeleteApiV1BusinessDocumentsByIdResponses, unknown, ThrowOnError>({ url: '/api/v1/business-documents/{id}', ...options });\n    }\n    \n    public putApiV1BusinessDocumentsById<ThrowOnError extends boolean = false>(options: Options<PutApiV1BusinessDocumentsByIdData, ThrowOnError>) {\n        return (options.client ?? this.client).put<PutApiV1BusinessDocumentsByIdResponses, unknown, ThrowOnError>({\n            url: '/api/v1/business-documents/{id}',\n            ...options,\n            headers: {\n                'Content-Type': 'application/json;odata.metadata=minimal;odata.streaming=true',\n                ...options.headers\n            }\n        });\n    }\n    \n    public postApiV1BusinessDocumentsByIdApprove<ThrowOnError extends boolean = false>(options: Options<PostApiV1BusinessDocumentsByIdApproveData, ThrowOnError>) {\n        return (options.client ?? this.client).post<PostApiV1BusinessDocumentsByIdApproveResponses, unknown, ThrowOnError>({ url: '/api/v1/business-documents/{id}/approve', ...options });\n    }\n    \n    public postApiV1BusinessDocumentsByIdUnapprove<ThrowOnError extends boolean = false>(options: Options<PostApiV1BusinessDocumentsByIdUnapproveData, ThrowOnError>) {\n        return (options.client ?? this.client).post<PostApiV1BusinessDocumentsByIdUnapproveResponses, unknown, ThrowOnError>({ url: '/api/v1/business-documents/{id}/unapprove', ...options });\n    }\n    \n    public postApiV1BusinessDocumentsByIdMoveToPersonal<ThrowOnError extends boolean = false>(options: Options<PostApiV1BusinessDocumentsByIdMoveToPersonalData, ThrowOnError>) {\n        return (options.client ?? this.client).post<PostApiV1BusinessDocumentsByIdMoveToPersonalResponses, unknown, ThrowOnError>({ url: '/api/v1/business-documents/{id}/move-to-personal', ...options });\n    }\n    \n    public postApiV1BusinessDocumentsByIdMoveToBusiness<ThrowOnError extends boolean = false>(options: Options<PostApiV1BusinessDocumentsByIdMoveToBusinessData, ThrowOnError>) {\n        return (options.client ?? this.client).post<PostApiV1BusinessDocumentsByIdMoveToBusinessResponses, unknown, ThrowOnError>({\n            url: '/api/v1/business-documents/{id}/move-to-business',\n            ...options,\n            headers: {\n                'Content-Type': 'application/json;odata.metadata=minimal;odata.streaming=true',\n                ...options.headers\n            }\n        });\n    }\n    \n    public getApiV1BusinessesByIdDocumentTypesSummary<ThrowOnError extends boolean = false>(options: Options<GetApiV1BusinessesByIdDocumentTypesSummaryData, ThrowOnError>) {\n        return (options.client ?? this.client).get<GetApiV1BusinessesByIdDocumentTypesSummaryResponses, unknown, ThrowOnError>({ url: '/api/v1/businesses/{id}/document-types-summary', ...options });\n    }\n    \n    public postApiV1Businesses<ThrowOnError extends boolean = false>(options?: Options<PostApiV1BusinessesData, ThrowOnError>) {\n        return (options?.client ?? this.client).post<PostApiV1BusinessesResponses, unknown, ThrowOnError>({\n            url: '/api/v1/businesses',\n            ...options,\n            headers: {\n                'Content-Type': 'application/json;odata.metadata=minimal;odata.streaming=true',\n                ...options?.headers\n            }\n        });\n    }\n    \n    public deleteApiV1BusinessesById<ThrowOnError extends boolean = false>(options: Options<DeleteApiV1BusinessesByIdData, ThrowOnError>) {\n        return (options.client ?? this.client).delete<DeleteApiV1BusinessesByIdResponses, unknown, ThrowOnError>({ url: '/api/v1/businesses/{id}', ...options });\n    }\n    \n    public putApiV1BusinessesById<ThrowOnError extends boolean = false>(options: Options<PutApiV1BusinessesByIdData, ThrowOnError>) {\n        return (options.client ?? this.client).put<PutApiV1BusinessesByIdResponses, unknown, ThrowOnError>({\n            url: '/api/v1/businesses/{id}',\n            ...options,\n            headers: {\n                'Content-Type': 'application/json;odata.metadata=minimal;odata.streaming=true',\n                ...options.headers\n            }\n        });\n    }\n    \n    public putApiV1BusinessesByIdContact<ThrowOnError extends boolean = false>(options: Options<PutApiV1BusinessesByIdContactData, ThrowOnError>) {\n        return (options.client ?? this.client).put<PutApiV1BusinessesByIdContactResponses, unknown, ThrowOnError>({\n            url: '/api/v1/businesses/{id}/contact',\n            ...options,\n            headers: {\n                'Content-Type': 'application/json;odata.metadata=minimal;odata.streaming=true',\n                ...options.headers\n            }\n        });\n    }\n    \n    public postApiV1BusinessesByIdDisconnect<ThrowOnError extends boolean = false>(options: Options<PostApiV1BusinessesByIdDisconnectData, ThrowOnError>) {\n        return (options.client ?? this.client).post<PostApiV1BusinessesByIdDisconnectResponses, unknown, ThrowOnError>({ url: '/api/v1/businesses/{id}/disconnect', ...options });\n    }\n    \n    public putApiV1BusinessMemberships<ThrowOnError extends boolean = false>(options?: Options<PutApiV1BusinessMembershipsData, ThrowOnError>) {\n        return (options?.client ?? this.client).put<PutApiV1BusinessMembershipsResponses, unknown, ThrowOnError>({\n            url: '/api/v1/business-memberships',\n            ...options,\n            headers: {\n                'Content-Type': 'application/json;odata.metadata=minimal;odata.streaming=true',\n                ...options?.headers\n            }\n        });\n    }\n    \n    public postApiV1Counterparties<ThrowOnError extends boolean = false>(options?: Options<PostApiV1CounterpartiesData, ThrowOnError>) {\n        return (options?.client ?? this.client).post<PostApiV1CounterpartiesResponses, unknown, ThrowOnError>({\n            url: '/api/v1/counterparties',\n            ...options,\n            headers: {\n                'Content-Type': 'application/json;odata.metadata=minimal;odata.streaming=true',\n                ...options?.headers\n            }\n        });\n    }\n    \n    public deleteApiV1CounterpartiesById<ThrowOnError extends boolean = false>(options: Options<DeleteApiV1CounterpartiesByIdData, ThrowOnError>) {\n        return (options.client ?? this.client).delete<DeleteApiV1CounterpartiesByIdResponses, unknown, ThrowOnError>({ url: '/api/v1/counterparties/{id}', ...options });\n    }\n    \n    public patchApiV1CounterpartiesById<ThrowOnError extends boolean = false>(options: Options<PatchApiV1CounterpartiesByIdData, ThrowOnError>) {\n        return (options.client ?? this.client).patch<PatchApiV1CounterpartiesByIdResponses, unknown, ThrowOnError>({\n            url: '/api/v1/counterparties/{id}',\n            ...options,\n            headers: {\n                'Content-Type': 'application/json;odata.metadata=minimal;odata.streaming=true',\n                ...options.headers\n            }\n        });\n    }\n    \n    public putApiV1DataBoxCredentials<ThrowOnError extends boolean = false>(options?: Options<PutApiV1DataBoxCredentialsData, ThrowOnError>) {\n        return (options?.client ?? this.client).put<PutApiV1DataBoxCredentialsResponses, unknown, ThrowOnError>({\n            url: '/api/v1/data-box-credentials',\n            ...options,\n            headers: {\n                'Content-Type': 'application/json;odata.metadata=minimal;odata.streaming=true',\n                ...options?.headers\n            }\n        });\n    }\n    \n    public deleteApiV1DataBoxCredentialsById<ThrowOnError extends boolean = false>(options: Options<DeleteApiV1DataBoxCredentialsByIdData, ThrowOnError>) {\n        return (options.client ?? this.client).delete<DeleteApiV1DataBoxCredentialsByIdResponses, unknown, ThrowOnError>({ url: '/api/v1/data-box-credentials/{id}', ...options });\n    }\n    \n    public getApiDev<ThrowOnError extends boolean = false>(options?: Options<GetApiDevData, ThrowOnError>) {\n        return (options?.client ?? this.client).get<GetApiDevResponses, unknown, ThrowOnError>({ url: '/api/dev', ...options });\n    }\n    \n    public getApiDevReseedDb<ThrowOnError extends boolean = false>(options?: Options<GetApiDevReseedDbData, ThrowOnError>) {\n        return (options?.client ?? this.client).get<GetApiDevReseedDbResponses, unknown, ThrowOnError>({ url: '/api/dev/reseed-db', ...options });\n    }\n    \n    public getApiDevDbReset<ThrowOnError extends boolean = false>(options?: Options<GetApiDevDbResetData, ThrowOnError>) {\n        return (options?.client ?? this.client).get<GetApiDevDbResetResponses, unknown, ThrowOnError>({ url: '/api/dev/db-reset', ...options });\n    }\n    \n    public getApiDevDbReset2<ThrowOnError extends boolean = false>(options?: Options<GetApiDevDbReset2Data, ThrowOnError>) {\n        return (options?.client ?? this.client).get<GetApiDevDbReset2Responses, unknown, ThrowOnError>({ url: '/api/dev/db/reset', ...options });\n    }\n    \n    public getApiDevDbCreate<ThrowOnError extends boolean = false>(options?: Options<GetApiDevDbCreateData, ThrowOnError>) {\n        return (options?.client ?? this.client).get<GetApiDevDbCreateResponses, unknown, ThrowOnError>({ url: '/api/dev/db/create', ...options });\n    }\n    \n    public getApiDevDbTouch<ThrowOnError extends boolean = false>(options?: Options<GetApiDevDbTouchData, ThrowOnError>) {\n        return (options?.client ?? this.client).get<GetApiDevDbTouchResponses, unknown, ThrowOnError>({ url: '/api/dev/db/touch', ...options });\n    }\n    \n    public getApiDevSeed<ThrowOnError extends boolean = false>(options?: Options<GetApiDevSeedData, ThrowOnError>) {\n        return (options?.client ?? this.client).get<GetApiDevSeedResponses, unknown, ThrowOnError>({ url: '/api/dev/seed', ...options });\n    }\n    \n    public getApiDevSeedAll<ThrowOnError extends boolean = false>(options?: Options<GetApiDevSeedAllData, ThrowOnError>) {\n        return (options?.client ?? this.client).get<GetApiDevSeedAllResponses, unknown, ThrowOnError>({ url: '/api/dev/seed-all', ...options });\n    }\n    \n    public getApiDevSeedProd<ThrowOnError extends boolean = false>(options?: Options<GetApiDevSeedProdData, ThrowOnError>) {\n        return (options?.client ?? this.client).get<GetApiDevSeedProdResponses, unknown, ThrowOnError>({ url: '/api/dev/seed-prod', ...options });\n    }\n    \n    public getApiDevJobProcessRecurringTasks<ThrowOnError extends boolean = false>(options?: Options<GetApiDevJobProcessRecurringTasksData, ThrowOnError>) {\n        return (options?.client ?? this.client).get<GetApiDevJobProcessRecurringTasksResponses, unknown, ThrowOnError>({ url: '/api/dev/job/process-recurring-tasks', ...options });\n    }\n    \n    public getApiDevNotificationsSendTest<ThrowOnError extends boolean = false>(options?: Options<GetApiDevNotificationsSendTestData, ThrowOnError>) {\n        return (options?.client ?? this.client).get<GetApiDevNotificationsSendTestResponses, unknown, ThrowOnError>({ url: '/api/dev/notifications/send-test', ...options });\n    }\n    \n    public getApiDevConfirmEmail<ThrowOnError extends boolean = false>(options?: Options<GetApiDevConfirmEmailData, ThrowOnError>) {\n        return (options?.client ?? this.client).get<GetApiDevConfirmEmailResponses, unknown, ThrowOnError>({ url: '/api/dev/confirm-email', ...options });\n    }\n    \n    public getApiDevEmailSendTest<ThrowOnError extends boolean = false>(options?: Options<GetApiDevEmailSendTestData, ThrowOnError>) {\n        return (options?.client ?? this.client).get<GetApiDevEmailSendTestResponses, unknown, ThrowOnError>({ url: '/api/dev/email/send-test', ...options });\n    }\n    \n    public deleteApiV1NotificationsDeviceTokens<ThrowOnError extends boolean = false>(options?: Options<DeleteApiV1NotificationsDeviceTokensData, ThrowOnError>) {\n        return (options?.client ?? this.client).delete<DeleteApiV1NotificationsDeviceTokensResponses, unknown, ThrowOnError>({\n            url: '/api/v1/notifications/device-tokens',\n            ...options,\n            headers: {\n                'Content-Type': 'application/json;odata.metadata=minimal;odata.streaming=true',\n                ...options?.headers\n            }\n        });\n    }\n    \n    public putApiV1NotificationsDeviceTokens<ThrowOnError extends boolean = false>(options?: Options<PutApiV1NotificationsDeviceTokensData, ThrowOnError>) {\n        return (options?.client ?? this.client).put<PutApiV1NotificationsDeviceTokensResponses, unknown, ThrowOnError>({\n            url: '/api/v1/notifications/device-tokens',\n            ...options,\n            headers: {\n                'Content-Type': 'application/json;odata.metadata=minimal;odata.streaming=true',\n                ...options?.headers\n            }\n        });\n    }\n    \n    public postApiV1Feedback<ThrowOnError extends boolean = false>(options?: Options<PostApiV1FeedbackData, ThrowOnError>) {\n        return (options?.client ?? this.client).post<PostApiV1FeedbackResponses, unknown, ThrowOnError>({\n            url: '/api/v1/feedback',\n            ...options,\n            headers: {\n                'Content-Type': 'application/json;odata.metadata=minimal;odata.streaming=true',\n                ...options?.headers\n            }\n        });\n    }\n    \n    public postApiV1Invitations<ThrowOnError extends boolean = false>(options?: Options<PostApiV1InvitationsData, ThrowOnError>) {\n        return (options?.client ?? this.client).post<PostApiV1InvitationsResponses, unknown, ThrowOnError>({\n            url: '/api/v1/invitations',\n            ...options,\n            headers: {\n                'Content-Type': 'application/json;odata.metadata=minimal;odata.streaming=true',\n                ...options?.headers\n            }\n        });\n    }\n    \n    public postApiV1InvitationsByIdAccept<ThrowOnError extends boolean = false>(options: Options<PostApiV1InvitationsByIdAcceptData, ThrowOnError>) {\n        return (options.client ?? this.client).post<PostApiV1InvitationsByIdAcceptResponses, unknown, ThrowOnError>({\n            url: '/api/v1/invitations/{id}/accept',\n            ...options,\n            headers: {\n                'Content-Type': 'application/json;odata.metadata=minimal;odata.streaming=true',\n                ...options.headers\n            }\n        });\n    }\n    \n    public postApiV1InvitationsByIdReject<ThrowOnError extends boolean = false>(options: Options<PostApiV1InvitationsByIdRejectData, ThrowOnError>) {\n        return (options.client ?? this.client).post<PostApiV1InvitationsByIdRejectResponses, unknown, ThrowOnError>({ url: '/api/v1/invitations/{id}/reject', ...options });\n    }\n    \n    public deleteApiV1InvitationsById<ThrowOnError extends boolean = false>(options: Options<DeleteApiV1InvitationsByIdData, ThrowOnError>) {\n        return (options.client ?? this.client).delete<DeleteApiV1InvitationsByIdResponses, unknown, ThrowOnError>({ url: '/api/v1/invitations/{id}', ...options });\n    }\n    \n    public patchApiV1InvitationsById<ThrowOnError extends boolean = false>(options: Options<PatchApiV1InvitationsByIdData, ThrowOnError>) {\n        return (options.client ?? this.client).patch<PatchApiV1InvitationsByIdResponses, unknown, ThrowOnError>({\n            url: '/api/v1/invitations/{id}',\n            ...options,\n            headers: {\n                'Content-Type': 'application/json;odata.metadata=minimal;odata.streaming=true',\n                ...options.headers\n            }\n        });\n    }\n    \n    public postApiV1Invoices<ThrowOnError extends boolean = false>(options?: Options<PostApiV1InvoicesData, ThrowOnError>) {\n        return (options?.client ?? this.client).post<PostApiV1InvoicesResponses, unknown, ThrowOnError>({\n            url: '/api/v1/invoices',\n            ...options,\n            headers: {\n                'Content-Type': 'application/json;odata.metadata=minimal;odata.streaming=true',\n                ...options?.headers\n            }\n        });\n    }\n    \n    public deleteApiV1InvoicesById<ThrowOnError extends boolean = false>(options: Options<DeleteApiV1InvoicesByIdData, ThrowOnError>) {\n        return (options.client ?? this.client).delete<DeleteApiV1InvoicesByIdResponses, unknown, ThrowOnError>({ url: '/api/v1/invoices/{id}', ...options });\n    }\n    \n    public patchApiV1InvoicesById<ThrowOnError extends boolean = false>(options: Options<PatchApiV1InvoicesByIdData, ThrowOnError>) {\n        return (options.client ?? this.client).patch<PatchApiV1InvoicesByIdResponses, unknown, ThrowOnError>({\n            url: '/api/v1/invoices/{id}',\n            ...options,\n            headers: {\n                'Content-Type': 'application/json;odata.metadata=minimal;odata.streaming=true',\n                ...options.headers\n            }\n        });\n    }\n    \n    public getApiV1InvoicesByIdPreview<ThrowOnError extends boolean = false>(options: Options<GetApiV1InvoicesByIdPreviewData, ThrowOnError>) {\n        return (options.client ?? this.client).get<GetApiV1InvoicesByIdPreviewResponses, unknown, ThrowOnError>({ url: '/api/v1/invoices/{id}/preview', ...options });\n    }\n    \n    public postApiV1InvoicesByIdSend<ThrowOnError extends boolean = false>(options: Options<PostApiV1InvoicesByIdSendData, ThrowOnError>) {\n        return (options.client ?? this.client).post<PostApiV1InvoicesByIdSendResponses, unknown, ThrowOnError>({\n            url: '/api/v1/invoices/{id}/send',\n            ...options,\n            headers: {\n                'Content-Type': 'application/json;odata.metadata=minimal;odata.streaming=true',\n                ...options.headers\n            }\n        });\n    }\n    \n    public postApiV1InvoicesByIdSnapshot<ThrowOnError extends boolean = false>(options: Options<PostApiV1InvoicesByIdSnapshotData, ThrowOnError>) {\n        return (options.client ?? this.client).post<PostApiV1InvoicesByIdSnapshotResponses, unknown, ThrowOnError>({ url: '/api/v1/invoices/{id}/snapshot', ...options });\n    }\n    \n    public putApiV1InvoiceSettings<ThrowOnError extends boolean = false>(options?: Options<PutApiV1InvoiceSettingsData, ThrowOnError>) {\n        return (options?.client ?? this.client).put<PutApiV1InvoiceSettingsResponses, unknown, ThrowOnError>({\n            url: '/api/v1/invoice-settings',\n            ...options,\n            headers: {\n                'Content-Type': 'application/json;odata.metadata=minimal;odata.streaming=true',\n                ...options?.headers\n            }\n        });\n    }\n    \n    public postApiV1NotificationsTest<ThrowOnError extends boolean = false>(options?: Options<PostApiV1NotificationsTestData, ThrowOnError>) {\n        return (options?.client ?? this.client).post<PostApiV1NotificationsTestResponses, unknown, ThrowOnError>({\n            url: '/api/v1/notifications/test',\n            ...options,\n            headers: {\n                'Content-Type': 'application/json;odata.metadata=minimal;odata.streaming=true',\n                ...options?.headers\n            }\n        });\n    }\n    \n    public getApiV1PersonalDocumentsByIdRaw<ThrowOnError extends boolean = false>(options: Options<GetApiV1PersonalDocumentsByIdRawData, ThrowOnError>) {\n        return (options.client ?? this.client).get<GetApiV1PersonalDocumentsByIdRawResponses, unknown, ThrowOnError>({ url: '/api/v1/personal-documents/{id}/raw', ...options });\n    }\n    \n    public postApiV1PersonalDocuments<ThrowOnError extends boolean = false>(options?: Options<PostApiV1PersonalDocumentsData, ThrowOnError>) {\n        return (options?.client ?? this.client).post<PostApiV1PersonalDocumentsResponses, unknown, ThrowOnError>({\n            ...formDataBodySerializer,\n            url: '/api/v1/personal-documents',\n            ...options,\n            headers: {\n                'Content-Type': null,\n                ...options?.headers\n            }\n        });\n    }\n    \n    public postApiV1PersonalDocumentsByIdMoveToBusiness<ThrowOnError extends boolean = false>(options: Options<PostApiV1PersonalDocumentsByIdMoveToBusinessData, ThrowOnError>) {\n        return (options.client ?? this.client).post<PostApiV1PersonalDocumentsByIdMoveToBusinessResponses, unknown, ThrowOnError>({\n            url: '/api/v1/personal-documents/{id}/move-to-business',\n            ...options,\n            headers: {\n                'Content-Type': 'application/json;odata.metadata=minimal;odata.streaming=true',\n                ...options.headers\n            }\n        });\n    }\n    \n    public deleteApiV1PersonalDocumentsById<ThrowOnError extends boolean = false>(options: Options<DeleteApiV1PersonalDocumentsByIdData, ThrowOnError>) {\n        return (options.client ?? this.client).delete<DeleteApiV1PersonalDocumentsByIdResponses, unknown, ThrowOnError>({ url: '/api/v1/personal-documents/{id}', ...options });\n    }\n    \n    public getApiV1PersonalDocumentsSummary<ThrowOnError extends boolean = false>(options?: Options<GetApiV1PersonalDocumentsSummaryData, ThrowOnError>) {\n        return (options?.client ?? this.client).get<GetApiV1PersonalDocumentsSummaryResponses, unknown, ThrowOnError>({ url: '/api/v1/personal-documents/summary', ...options });\n    }\n    \n    public postApiV1RecurringTasks<ThrowOnError extends boolean = false>(options?: Options<PostApiV1RecurringTasksData, ThrowOnError>) {\n        return (options?.client ?? this.client).post<PostApiV1RecurringTasksResponses, unknown, ThrowOnError>({\n            url: '/api/v1/recurring-tasks',\n            ...options,\n            headers: {\n                'Content-Type': 'application/json;odata.metadata=minimal;odata.streaming=true',\n                ...options?.headers\n            }\n        });\n    }\n    \n    public deleteApiV1RecurringTasksById<ThrowOnError extends boolean = false>(options: Options<DeleteApiV1RecurringTasksByIdData, ThrowOnError>) {\n        return (options.client ?? this.client).delete<DeleteApiV1RecurringTasksByIdResponses, unknown, ThrowOnError>({ url: '/api/v1/recurring-tasks/{id}', ...options });\n    }\n    \n    public patchApiV1RecurringTasksById<ThrowOnError extends boolean = false>(options: Options<PatchApiV1RecurringTasksByIdData, ThrowOnError>) {\n        return (options.client ?? this.client).patch<PatchApiV1RecurringTasksByIdResponses, unknown, ThrowOnError>({\n            url: '/api/v1/recurring-tasks/{id}',\n            ...options,\n            headers: {\n                'Content-Type': 'application/json;odata.metadata=minimal;odata.streaming=true',\n                ...options.headers\n            }\n        });\n    }\n    \n    public get<ThrowOnError extends boolean = false>(options?: Options<GetData, ThrowOnError>) {\n        return (options?.client ?? this.client).get<GetResponses, unknown, ThrowOnError>({ url: '/', ...options });\n    }\n    \n    public postApiV1Tasks<ThrowOnError extends boolean = false>(options?: Options<PostApiV1TasksData, ThrowOnError>) {\n        return (options?.client ?? this.client).post<PostApiV1TasksResponses, unknown, ThrowOnError>({\n            url: '/api/v1/tasks',\n            ...options,\n            headers: {\n                'Content-Type': 'application/json;odata.metadata=minimal;odata.streaming=true',\n                ...options?.headers\n            }\n        });\n    }\n    \n    public putApiV1TasksById<ThrowOnError extends boolean = false>(options: Options<PutApiV1TasksByIdData, ThrowOnError>) {\n        return (options.client ?? this.client).put<PutApiV1TasksByIdResponses, unknown, ThrowOnError>({\n            url: '/api/v1/tasks/{id}',\n            ...options,\n            headers: {\n                'Content-Type': 'application/json;odata.metadata=minimal;odata.streaming=true',\n                ...options.headers\n            }\n        });\n    }\n    \n    public postApiV1TasksByIdSubmit<ThrowOnError extends boolean = false>(options: Options<PostApiV1TasksByIdSubmitData, ThrowOnError>) {\n        return (options.client ?? this.client).post<PostApiV1TasksByIdSubmitResponses, unknown, ThrowOnError>({\n            url: '/api/v1/tasks/{id}/submit',\n            ...options,\n            headers: {\n                'Content-Type': 'application/json;odata.metadata=minimal;odata.streaming=true',\n                ...options.headers\n            }\n        });\n    }\n    \n    public postApiV1TasksByIdApprove<ThrowOnError extends boolean = false>(options: Options<PostApiV1TasksByIdApproveData, ThrowOnError>) {\n        return (options.client ?? this.client).post<PostApiV1TasksByIdApproveResponses, unknown, ThrowOnError>({ url: '/api/v1/tasks/{id}/approve', ...options });\n    }\n    \n    public postApiV1TasksByIdReject<ThrowOnError extends boolean = false>(options: Options<PostApiV1TasksByIdRejectData, ThrowOnError>) {\n        return (options.client ?? this.client).post<PostApiV1TasksByIdRejectResponses, unknown, ThrowOnError>({\n            url: '/api/v1/tasks/{id}/reject',\n            ...options,\n            headers: {\n                'Content-Type': 'application/json;odata.metadata=minimal;odata.streaming=true',\n                ...options.headers\n            }\n        });\n    }\n    \n    public getApiV1TasksByIdComments<ThrowOnError extends boolean = false>(options: Options<GetApiV1TasksByIdCommentsData, ThrowOnError>) {\n        return (options.client ?? this.client).get<GetApiV1TasksByIdCommentsResponses, unknown, ThrowOnError>({ url: '/api/v1/tasks/{id}/comments', ...options });\n    }\n    \n    public getApiV1TasksByIdDocuments<ThrowOnError extends boolean = false>(options: Options<GetApiV1TasksByIdDocumentsData, ThrowOnError>) {\n        return (options.client ?? this.client).get<GetApiV1TasksByIdDocumentsResponses, unknown, ThrowOnError>({ url: '/api/v1/tasks/{id}/documents', ...options });\n    }\n    \n    public postApiV1UserRegister<ThrowOnError extends boolean = false>(options: Options<PostApiV1UserRegisterData, ThrowOnError>) {\n        return (options.client ?? this.client).post<PostApiV1UserRegisterResponses, PostApiV1UserRegisterErrors, ThrowOnError>({\n            url: '/api/v1/user/register',\n            ...options,\n            headers: {\n                'Content-Type': 'application/json',\n                ...options.headers\n            }\n        });\n    }\n    \n    public postApiV1UserLogin<ThrowOnError extends boolean = false>(options: Options<PostApiV1UserLoginData, ThrowOnError>) {\n        return (options.client ?? this.client).post<PostApiV1UserLoginResponses, unknown, ThrowOnError>({\n            url: '/api/v1/user/login',\n            ...options,\n            headers: {\n                'Content-Type': 'application/json',\n                ...options.headers\n            }\n        });\n    }\n    \n    public postApiV1UserRefresh<ThrowOnError extends boolean = false>(options: Options<PostApiV1UserRefreshData, ThrowOnError>) {\n        return (options.client ?? this.client).post<PostApiV1UserRefreshResponses, unknown, ThrowOnError>({\n            url: '/api/v1/user/refresh',\n            ...options,\n            headers: {\n                'Content-Type': 'application/json',\n                ...options.headers\n            }\n        });\n    }\n    \n    public postApiV1UserResendConfirmationEmail<ThrowOnError extends boolean = false>(options: Options<PostApiV1UserResendConfirmationEmailData, ThrowOnError>) {\n        return (options.client ?? this.client).post<PostApiV1UserResendConfirmationEmailResponses, unknown, ThrowOnError>({\n            url: '/api/v1/user/resendConfirmationEmail',\n            ...options,\n            headers: {\n                'Content-Type': 'application/json',\n                ...options.headers\n            }\n        });\n    }\n    \n    public postApiV1UserForgotPassword<ThrowOnError extends boolean = false>(options: Options<PostApiV1UserForgotPasswordData, ThrowOnError>) {\n        return (options.client ?? this.client).post<PostApiV1UserForgotPasswordResponses, PostApiV1UserForgotPasswordErrors, ThrowOnError>({\n            url: '/api/v1/user/forgotPassword',\n            ...options,\n            headers: {\n                'Content-Type': 'application/json',\n                ...options.headers\n            }\n        });\n    }\n    \n    public postApiV1UserResetPassword<ThrowOnError extends boolean = false>(options: Options<PostApiV1UserResetPasswordData, ThrowOnError>) {\n        return (options.client ?? this.client).post<PostApiV1UserResetPasswordResponses, PostApiV1UserResetPasswordErrors, ThrowOnError>({\n            url: '/api/v1/user/resetPassword',\n            ...options,\n            headers: {\n                'Content-Type': 'application/json',\n                ...options.headers\n            }\n        });\n    }\n    \n    public postApiV1UserManage2Fa<ThrowOnError extends boolean = false>(options: Options<PostApiV1UserManage2FaData, ThrowOnError>) {\n        return (options.client ?? this.client).post<PostApiV1UserManage2FaResponses, PostApiV1UserManage2FaErrors, ThrowOnError>({\n            url: '/api/v1/user/manage/2fa',\n            ...options,\n            headers: {\n                'Content-Type': 'application/json',\n                ...options.headers\n            }\n        });\n    }\n    \n    public getApiV1UserManageInfo<ThrowOnError extends boolean = false>(options?: Options<GetApiV1UserManageInfoData, ThrowOnError>) {\n        return (options?.client ?? this.client).get<GetApiV1UserManageInfoResponses, GetApiV1UserManageInfoErrors, ThrowOnError>({ url: '/api/v1/user/manage/info', ...options });\n    }\n    \n    public postApiV1UserManageInfo<ThrowOnError extends boolean = false>(options: Options<PostApiV1UserManageInfoData, ThrowOnError>) {\n        return (options.client ?? this.client).post<PostApiV1UserManageInfoResponses, PostApiV1UserManageInfoErrors, ThrowOnError>({\n            url: '/api/v1/user/manage/info',\n            ...options,\n            headers: {\n                'Content-Type': 'application/json',\n                ...options.headers\n            }\n        });\n    }\n    \n    public postApiV1UserLogout<ThrowOnError extends boolean = false>(options?: Options<PostApiV1UserLogoutData, ThrowOnError>) {\n        return (options?.client ?? this.client).post<PostApiV1UserLogoutResponses, unknown, ThrowOnError>({\n            url: '/api/v1/user/logout',\n            ...options,\n            headers: {\n                'Content-Type': 'application/json;odata.metadata=minimal;odata.streaming=true',\n                ...options?.headers\n            }\n        });\n    }\n    \n    /**\n     * @deprecated\n     */\n    public getApiV1UserDocumentsSummary<ThrowOnError extends boolean = false>(options?: Options<GetApiV1UserDocumentsSummaryData, ThrowOnError>) {\n        return (options?.client ?? this.client).get<GetApiV1UserDocumentsSummaryResponses, unknown, ThrowOnError>({ url: '/api/v1/user/documents-summary', ...options });\n    }\n    \n    public deleteApiV1User<ThrowOnError extends boolean = false>(options?: Options<DeleteApiV1UserData, ThrowOnError>) {\n        return (options?.client ?? this.client).delete<DeleteApiV1UserResponses, unknown, ThrowOnError>({ url: '/api/v1/user', ...options });\n    }\n    \n    public getApiV1UsersMe<ThrowOnError extends boolean = false>(options?: Options<GetApiV1UsersMeData, ThrowOnError>) {\n        return (options?.client ?? this.client).get<GetApiV1UsersMeResponses, unknown, ThrowOnError>({ url: '/api/v1/users/me', ...options });\n    }\n    \n    public patchApiV1UsersById<ThrowOnError extends boolean = false>(options: Options<PatchApiV1UsersByIdData, ThrowOnError>) {\n        return (options.client ?? this.client).patch<PatchApiV1UsersByIdResponses, unknown, ThrowOnError>({\n            url: '/api/v1/users/{id}',\n            ...options,\n            headers: {\n                'Content-Type': 'application/json;odata.metadata=minimal;odata.streaming=true',\n                ...options.headers\n            }\n        });\n    }\n    \n    private _api?: Api;\n    get api(): Api {\n        return this._api ??= new Api({ client: this.client });\n    }\n    \n    private _mapIdentityApi?: MapIdentityApi;\n    get mapIdentityApi(): MapIdentityApi {\n        return this._mapIdentityApi ??= new MapIdentityApi({ client: this.client });\n    }\n}\n"
  },
  {
    "path": "packages/openapi-ts-tests/sdks/__snapshots__/method-class-conflict/instance/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type ClientOptions = {\n    baseUrl: `${string}://${string}` | (string & {});\n};\n\nexport type AccessTokenResponse = {\n    readonly tokenType?: string;\n    accessToken: string;\n    expiresIn: number;\n    refreshToken: string;\n};\n\nexport type AccountingCompany = {\n    id: number;\n    name: string;\n    identificationNumber: string;\n    /**\n     * @deprecated\n     */\n    countryCode?: string;\n    country: Country;\n};\n\nexport type AccountingCompanyCreateDto = {\n    name: string;\n    identificationNumber: string;\n};\n\nexport type AccountingCompanyMembership = {\n    id: number;\n    accountingCompanyId: number;\n    accountingCompanyName: string;\n    userId: number;\n    userFullName: string;\n    roleName: string;\n};\n\nexport type AccountingCompanyMembershipUpsertDto = {\n    accountingCompanyId: number;\n    email: string;\n    roleName: string;\n};\n\nexport type AccountingCompanyUpdateDto = {\n    name: string;\n    identificationNumber: string;\n};\n\nexport type AddressDto = {\n    street: string;\n    city: string;\n    postalCode: string;\n    country: string;\n};\n\nexport type AnnualInvoicesCount = 'Tens' | 'Hundred' | 'Thousands' | 'TenThousands' | 'HundredThousands';\n\nexport type BankAccount = {\n    id: number;\n    businessId: number;\n    accountNumber: string;\n    bankCode: string;\n    swift: string;\n    iban: string;\n    currency: Currency;\n    createdAt: string;\n    updatedAt?: string | null;\n};\n\nexport type BankAccountUpsertDto = {\n    businessId: number;\n    accountNumber: string;\n    bankCode: string;\n    swift: string;\n    iban: string;\n    currency: Currency;\n};\n\nexport type Business = {\n    id: number;\n    name: string;\n    identificationNumber: string;\n    vatNumber: string | null;\n    country: Country;\n    /**\n     * @deprecated\n     */\n    countryCode?: string;\n    deletedAt: string | null;\n    fullAddress: string | null;\n    accountingCompany: BusinessAccountingCompany;\n    contactPerson: BusinessContactPerson;\n};\n\nexport type BusinessAccountantAssignment = {\n    id: number;\n    businessId: number;\n    businessName: string;\n    accountantId: number;\n    accountantName: string;\n};\n\nexport type BusinessAccountantAssignmentUpsert = {\n    businessId: number;\n    accountantId: number;\n};\n\nexport type BusinessAccountingCompany = {\n    id: number;\n    name: string;\n};\n\nexport type BusinessAresAddress = {\n    street: string;\n    houseNumber: number;\n    guidanceNumber?: number | null;\n    city: string;\n    postalCode: number;\n};\n\nexport type BusinessChangeContactDto = {\n    userId: number | null;\n};\n\nexport type BusinessContactPerson = {\n    id: number;\n    fullName: string;\n    email: string | null;\n    phoneNumber: string | null;\n};\n\nexport type BusinessCreateDto = {\n    name: string;\n    identificationNumber: string;\n    vatNumber?: string | null;\n    address?: BusinessAresAddress;\n};\n\nexport type BusinessDocumentMoveToBusinessDocumentsDto = {\n    businessId: number;\n    documentTypeId?: number | null;\n};\n\nexport type BusinessDocumentUpdateDto = {\n    name: string | null;\n    documentTypeId: number | null;\n};\n\nexport type BusinessDocumentsSummary = {\n    id: number;\n    name: string;\n    documentsCount: number;\n    documentsSize: number;\n    lastUploadAt: string | null;\n    maxStorageSize: number;\n};\n\nexport type BusinessMembershipDto = {\n    id: number;\n    userId: number;\n    userFullName: string;\n    businessId: number;\n    businessName: string;\n    roleId: number;\n    roleName: string;\n};\n\nexport type BusinessMembershipUpsertDto = {\n    businessId: number;\n    email: string;\n    roleName: string;\n};\n\nexport type BusinessSummary = {\n    id: number;\n    name: string;\n    documentsCount: number;\n    documentsSize: number;\n    lastUploadAt: string | null;\n    /**\n     * @deprecated\n     */\n    maxStorageSize?: number;\n    pendingTasksCount: number;\n    pendingDocumentsCount: number;\n};\n\nexport type BusinessUpdateDto = {\n    name: string;\n    identificationNumber: string;\n    vatNumber?: string | null;\n    address?: BusinessAresAddress;\n};\n\nexport type Counterparty = {\n    id: number;\n    businessId: number;\n    name: string;\n    identificationNumber: string | null;\n    vatNumber: string | null;\n    address: AddressDto;\n    email: string | null;\n    privateNote: string | null;\n    isFavourite: boolean | null;\n    createdAt: string;\n    updatedAt?: string | null;\n};\n\nexport type CounterpartyCreateDto = {\n    businessId: number;\n    identificationNumber: string;\n    name: string;\n    vatNumber: string | null;\n    address: AddressDto;\n    email: string | null;\n    privateNote?: string | null;\n    isFavourite?: boolean | null;\n};\n\nexport type CounterpartyUpdateDto = {\n    identificationNumber?: string | null;\n    name?: string | null;\n    vatNumber?: string | null;\n    address?: AddressDto;\n    email?: string | null;\n    privateNote?: string | null;\n    isFavourite?: boolean | null;\n};\n\nexport type Country = 'Czechia' | 'Slovakia';\n\nexport type CreateInvoiceClientDto = {\n    counterpartyId: number;\n};\n\nexport type Currency = 'CZK' | 'EUR' | 'USD' | 'GBP';\n\nexport type DataBoxCredentials = {\n    id?: number;\n    username: string;\n    password: string | null;\n    businessId: number;\n    businessName: string;\n    userId: number;\n};\n\nexport type DataBoxCredentialsUpsertDto = {\n    businessId: number;\n    username: string | null;\n    password: string | null;\n};\n\nexport type DocumentAction = 'Uploaded';\n\nexport type DocumentBusiness = {\n    id: number;\n    /**\n     * @deprecated\n     */\n    name?: string;\n    documentName: string;\n    originalFileName: string;\n    extension: string | null;\n    size: number;\n    businessId: number | null;\n    businessName: string | null;\n    documentTypeId: number;\n    documentTypeName: string;\n    approvedAt: string | null;\n    approverId: number | null;\n    approverFullName: string | null;\n    taskId: number | null;\n    uploadedAt: string;\n    uploaderId: number | null;\n    deletedAt?: string | null;\n};\n\nexport type DocumentBusinessActivity = {\n    documentId: number;\n    documentName: string;\n    businessId: number;\n    businessName: string;\n    action: DocumentAction;\n    happenedAt: string;\n    performedByUserId: number | null;\n    performedByUserFullName: string | null;\n};\n\nexport type DocumentPersonal = {\n    id: number;\n    name: string;\n    extension: string | null;\n    size: number;\n    userId: number;\n    userFullName: string;\n    uploadedAt?: string;\n    deletedAt?: string | null;\n};\n\nexport type DocumentPersonalMoveToBusinessDocumentsDto = {\n    businessId: number;\n    documentTypeId?: number;\n};\n\nexport type DocumentType = {\n    id: number;\n    name: string;\n};\n\nexport type DocumentTypesSummary = {\n    documentTypeId: number;\n    documentTypeName: string;\n    documentsCount: number;\n};\n\nexport type FeedbackType = 'Feedback' | 'Bug';\n\nexport type ForgotPasswordRequest = {\n    email: string;\n};\n\nexport type HttpValidationProblemDetails = {\n    type?: string | null;\n    title?: string | null;\n    status?: number | null;\n    detail?: string | null;\n    instance?: string | null;\n    errors?: {\n        [key: string]: Array<string>;\n    };\n    [key: string]: unknown;\n};\n\nexport type InfoRequest = {\n    newEmail?: string | null;\n    newPassword?: string | null;\n    oldPassword?: string | null;\n};\n\nexport type InfoResponse = {\n    email: string;\n    isEmailConfirmed: boolean;\n};\n\nexport type Invitation = {\n    id: number;\n    accountingCompanyName: string;\n    status: InvitationStatus;\n    expiresAt: string;\n    email: string;\n};\n\nexport type InvitationAcceptDto = {\n    businessId: number;\n};\n\nexport type InvitationCreateDto = {\n    accountingCompanyId: number;\n    email: string;\n};\n\nexport type InvitationStatus = 'Pending' | 'Expired' | 'Rejected';\n\nexport type InvitationUpdateDto = {\n    email?: string | null;\n};\n\nexport type Invoice = {\n    id: number;\n    businessId: number;\n    supplier: InvoiceSupplier;\n    client: InvoiceClient;\n    bankAccount: InvoiceBankAccount;\n    hideBankAccount: boolean;\n    type: InvoiceType;\n    number: string;\n    status: InvoiceStatus;\n    paymentMethod: PaymentMethod;\n    currency: Currency;\n    reversedVatCharge: boolean;\n    variableSymbol: string | null;\n    constantSymbol: string | null;\n    issuedAt: string;\n    dueAt: string;\n    taxPointAt: string | null;\n    sentAt: string | null;\n    snapshotAt: string | null;\n    noteBeforeLines: string | null;\n    lines: Array<InvoiceLine>;\n    footerNote: string | null;\n    totalPriceExcludingVat: number;\n    totalVatAmount: number;\n    totalPriceIncludingVat: number;\n    createdAt: string;\n    updatedAt: string | null;\n};\n\nexport type InvoiceBankAccount = {\n    swift: string;\n    iban: string;\n    accountNumber: string;\n    bankCode: string;\n    currency: Currency;\n};\n\nexport type InvoiceBankAccountUpdateDto = {\n    swift: string;\n    iban: string;\n    accountNumber: string;\n    bankCode: string;\n    currency: Currency;\n};\n\nexport type InvoiceClient = {\n    /**\n     * @deprecated\n     */\n    id?: number | null;\n    counterpartyId: number | null;\n    name: string;\n    registrationNumber: string | null;\n    identificationNumber: string | null;\n    vatNumber: string | null;\n    email: string | null;\n    address: InvoiceClientAddress;\n    deliveryName: string | null;\n    deliveryAddress: InvoiceClientDeliveryAddress;\n};\n\nexport type InvoiceClientAddress = {\n    street: string;\n    city: string;\n    postalCode: string;\n    country: string;\n};\n\nexport type InvoiceClientDeliveryAddress = {\n    street: string;\n    city: string;\n    postalCode: string;\n    country: string;\n};\n\nexport type InvoiceCreateDto = {\n    client: CreateInvoiceClientDto;\n    type: InvoiceType;\n    number: string;\n    status: InvoiceStatus;\n    paymentMethod: PaymentMethod;\n    hideBankAccount: boolean;\n    reversedVatCharge: boolean;\n    variableSymbol?: string | null;\n    constantSymbol?: string | null;\n    issuedAt: string;\n    dueAt: string;\n    taxPointAt: string;\n    noteBeforeLines?: string | null;\n    lines: Array<InvoiceLineCreateDto>;\n    footerNote?: string | null;\n    businessId: number;\n};\n\nexport type InvoiceLine = {\n    id?: number;\n    description: string;\n    quantity: number;\n    unit: string;\n    unitPrice: number;\n    vatRate: number;\n    totalPriceExcludingVat: number;\n    vatAmount: number;\n    totalPriceIncludingVat: number;\n};\n\nexport type InvoiceLineCreateDto = {\n    description: string;\n    quantity: number;\n    unit: string;\n    unitPrice: number;\n    vatRate: number;\n};\n\nexport type InvoiceLineUpdateDto = {\n    id: number | null;\n    description: string;\n    quantity: number;\n    unit: string;\n    unitPrice: number;\n    vatRate: number;\n};\n\nexport type InvoiceSendDto = {\n    customRecipientEmail: string | null;\n    message: string;\n};\n\nexport type InvoiceSetting = {\n    businessId: number;\n    isVatPayer: boolean;\n    template: InvoiceTemplate;\n    bankAccount?: InvoiceSettingsBankAccount;\n    numberingSetting: NumberingSetting;\n    createdAt: string;\n    updatedAt?: string | null;\n};\n\nexport type InvoiceSettingUpsertDto = {\n    businessId: number;\n    isVatPayer: boolean;\n    template: InvoiceTemplateUpsertDto;\n    bankAccount?: InvoiceSettingsBankAccountUpsertDto;\n    numberingSetting: NumberingSettingUpsertDto;\n};\n\nexport type InvoiceSettingsBankAccount = {\n    id: number;\n    businessId: number;\n    /**\n     * @deprecated\n     */\n    number: string;\n    accountNumber: string;\n    bankCode: string;\n    swift: string;\n    iban: string;\n    currency: Currency;\n    createdAt: string;\n    updatedAt?: string | null;\n};\n\nexport type InvoiceSettingsBankAccountUpsertDto = {\n    accountNumber: string;\n    bankCode: string;\n    swift: string;\n    iban: string;\n    currency: Currency;\n};\n\nexport type InvoiceStatus = 'Draft' | 'Issued' | 'Paid' | 'Overdue' | 'Cancelled' | 'Snapshot';\n\nexport type InvoiceSupplier = {\n    name: string;\n    registrationNumber: string;\n    identificationNumber: string;\n    vatNumber: string | null;\n    address: InvoiceSupplierAddress;\n};\n\nexport type InvoiceSupplierAddress = {\n    street: string;\n    city: string;\n    postalCode: string;\n    country: string;\n};\n\nexport type InvoiceTemplate = {\n    currency: Currency;\n    textBeforeLines: string | null;\n    footerText: string | null;\n};\n\nexport type InvoiceTemplateUpsertDto = {\n    currency: Currency;\n    textBeforeLines: string | null;\n    footerText: string | null;\n};\n\nexport type InvoiceType = 'Regular' | 'Corrective' | 'Advance';\n\nexport type InvoiceUpdateClientDto = {\n    counterpartyId: number | null;\n    name: string | null;\n    registrationNumber: string | null;\n    vatNumber: string | null;\n    email: string | null;\n    address: AddressDto;\n    deliveryName: string | null;\n    deliveryAddress: AddressDto;\n};\n\nexport type InvoiceUpdateDto = {\n    client: InvoiceUpdateClientDto;\n    bankAccount: InvoiceBankAccountUpdateDto;\n    hideBankAccount: boolean | null;\n    type: InvoiceType;\n    number: string | null;\n    status: InvoiceStatus;\n    paymentMethod: PaymentMethod;\n    currency: Currency;\n    reversedVatCharge: boolean | null;\n    variableSymbol: string | null;\n    constantSymbol: string | null;\n    issuedAt: string | null;\n    dueAt: string | null;\n    taxPointAt: string | null;\n    noteBeforeLines: string | null;\n    lines: Array<InvoiceLineUpdateDto> | null;\n    footerNote: string | null;\n};\n\nexport type LicenseDto = {\n    id: number;\n    tierId: number;\n    tierName: string;\n    businessId: number | null;\n    /**\n     * @deprecated\n     */\n    maxStorageSize?: number;\n    maxBusinessStorageSize: number;\n    maxBusinessMembersCount: number;\n    maxContactsCount: number;\n};\n\nexport type LoginRequest = {\n    email: string;\n    password: string;\n    twoFactorCode?: string | null;\n    twoFactorRecoveryCode?: string | null;\n};\n\nexport type NotificationsDeviceTokenDeleteDto = {\n    token: string;\n};\n\nexport type NotificationsDeviceTokenUpsertDto = {\n    provider: PushNotificationsProvider;\n    token: string;\n};\n\nexport type NotificationsTestSendDto = {\n    token: string | null;\n};\n\nexport type NumberingSetting = {\n    id: number;\n    businessId: number;\n    yearFormat: YearFormat;\n    isMonthIncluded: boolean;\n    useHyphen: boolean;\n    prefix?: string | null;\n    suffix?: string | null;\n    sequencePosition: SequencePosition;\n    annualInvoicesCount: AnnualInvoicesCount;\n    format: string;\n    lastExternalInvoiceSequenceNumber: number | null;\n    createdAt: string;\n    updatedAt?: string | null;\n};\n\nexport type NumberingSettingUpsertDto = {\n    yearFormat: YearFormat;\n    isMonthIncluded: boolean;\n    useHyphen: boolean;\n    prefix: string | null;\n    suffix: string | null;\n    sequencePosition: SequencePosition;\n    annualInvoicesCount: AnnualInvoicesCount;\n    lastExternalInvoiceSequenceNumber?: number | null;\n};\n\nexport type PaymentMethod = 'Cash' | 'BankTransfer';\n\nexport type PersonalDocumentsSummary = {\n    documentsCount: number;\n    documentsSize: number;\n    maxStorageSize: number;\n};\n\nexport type PushNotificationsProvider = 1 | 2;\n\nexport type RecurrenceType = 'Daily' | 'Weekly' | 'Monthly' | 'Yearly';\n\nexport type RecurringTask = {\n    id: number;\n    title: string;\n    details: string;\n    accountingCompanyId: number;\n    accountingCompanyName: string;\n    accountantId: number | null;\n    accountantFullName: string | null;\n    recurrenceType?: RecurrenceType;\n    period: RecurrenceType;\n    interval: number;\n    executeAt: string;\n    isActive: boolean;\n    businesses: Array<RecurringTaskBusiness>;\n    documentTypeId: number;\n    documentTypeName: string;\n};\n\nexport type RecurringTaskBusiness = {\n    id: number;\n    name: string;\n};\n\nexport type RecurringTaskCreateDto = {\n    title: string;\n    details: string;\n    recurrenceType: RecurrenceType;\n    interval?: number;\n    firstTaskDueAt: string;\n    accountingCompanyId: number;\n    businessIds: Array<number>;\n    documentTypeId: number;\n};\n\nexport type RecurringTaskUpdateDto = {\n    title?: string | null;\n    details?: string | null;\n    isActive?: boolean | null;\n    recurrenceType?: RecurrenceType;\n    interval?: number | null;\n    nextTasksCreateAt?: string | null;\n    documentTypeId?: number | null;\n};\n\nexport type RefreshRequest = {\n    refreshToken: string;\n};\n\nexport type RegisterRequest = {\n    email: string;\n    password: string;\n};\n\nexport type ResendConfirmationEmailRequest = {\n    email: string;\n};\n\nexport type ResetPasswordRequest = {\n    email: string;\n    resetCode: string;\n    newPassword: string;\n};\n\nexport type SendFeedbackRequest = {\n    type: FeedbackType;\n    subject: string;\n    message: string;\n    platform: string;\n    deviceInfo?: string | null;\n    appVersion?: string | null;\n    traceId?: string | null;\n};\n\nexport type SequencePosition = 'Start' | 'End';\n\nexport type Task = {\n    id: number;\n    title: string;\n    details: string;\n    dueAt: string;\n    status: TaskStatus;\n    businessId: number;\n    businessName: string;\n    documentTypeId: number;\n    documentTypeName: string;\n};\n\nexport type TaskComment = {\n    id: number;\n    taskId: number | null;\n    content: string;\n    authorId: number | null;\n    authorFullName: string | null;\n    createdAt: string;\n};\n\nexport type TaskRejectDto = {\n    reason: string;\n};\n\nexport type TaskStatus = 'PendingClient' | 'PendingAccountant' | 'Completed' | 'Canceled';\n\nexport type TaskSubmitDto = {\n    answer: string | null;\n};\n\nexport type TaskUpdateDto = {\n    title: string;\n    details: string;\n    dueAt: string;\n    documentTypeId?: number | null;\n};\n\nexport type TasksCreateDto = {\n    businessIds: Array<number>;\n    documentTypeId?: number;\n    title: string;\n    details: string;\n    dueAt: string;\n};\n\nexport type TwoFactorRequest = {\n    enable?: boolean | null;\n    twoFactorCode?: string | null;\n    resetSharedKey?: boolean;\n    resetRecoveryCodes?: boolean;\n    forgetMachine?: boolean;\n};\n\nexport type TwoFactorResponse = {\n    sharedKey: string;\n    recoveryCodesLeft: number;\n    recoveryCodes?: Array<string> | null;\n    isTwoFactorEnabled: boolean;\n    isMachineRemembered: boolean;\n};\n\nexport type User = {\n    id: number;\n    email: string | null;\n    emailConfirmed: boolean;\n    fullName: string;\n    phoneNumber: string | null;\n    isAccountant: boolean;\n};\n\nexport type UserUpdateDto = {\n    firstName?: string | null;\n    lastName?: string | null;\n    phoneNumber?: string | null;\n};\n\nexport type YearFormat = 'Full' | 'Short';\n\nexport type AccessTokenResponseWritable = {\n    accessToken: string;\n    expiresIn: number;\n    refreshToken: string;\n};\n\nexport type PostApiV1AccountingCompaniesData = {\n    body?: AccountingCompanyCreateDto;\n    path?: never;\n    query?: never;\n    url: '/api/v1/accounting-companies';\n};\n\nexport type PostApiV1AccountingCompaniesResponses = {\n    /**\n     * OK\n     */\n    200: AccountingCompany;\n};\n\nexport type PostApiV1AccountingCompaniesResponse = PostApiV1AccountingCompaniesResponses[keyof PostApiV1AccountingCompaniesResponses];\n\nexport type DeleteApiV1AccountingCompaniesByIdData = {\n    body?: never;\n    path: {\n        id: number;\n    };\n    query?: never;\n    url: '/api/v1/accounting-companies/{id}';\n};\n\nexport type DeleteApiV1AccountingCompaniesByIdResponses = {\n    /**\n     * OK\n     */\n    200: unknown;\n};\n\nexport type PostApiV1AccountingCompaniesByIdData = {\n    body?: AccountingCompanyUpdateDto;\n    path: {\n        id: number;\n    };\n    query?: never;\n    url: '/api/v1/accounting-companies/{id}';\n};\n\nexport type PostApiV1AccountingCompaniesByIdResponses = {\n    /**\n     * OK\n     */\n    200: AccountingCompany;\n};\n\nexport type PostApiV1AccountingCompaniesByIdResponse = PostApiV1AccountingCompaniesByIdResponses[keyof PostApiV1AccountingCompaniesByIdResponses];\n\nexport type ApiVVersionApiVersionOdataAccountingCompaniesData = {\n    body?: never;\n    path?: never;\n    query?: {\n        /**\n         * Limits the properties returned in the result.\n         */\n        select?: string;\n        /**\n         * Indicates the related entities to be represented inline. The maximum depth is 2.\n         */\n        expand?: string;\n        /**\n         * Restricts the set of items returned. The maximum number of expressions is 100. The allowed functions are: allfunctions.\n         */\n        filter?: string;\n        /**\n         * Specifies the order in which items are returned. The maximum number of expressions is 5.\n         */\n        orderby?: string;\n        /**\n         * Limits the number of items returned from a collection. The maximum value is 100.\n         */\n        top?: number;\n        /**\n         * Excludes the specified number of items of the queried collection from the result.\n         */\n        skip?: number;\n        /**\n         * Indicates whether the total count of items within a collection are returned in the result.\n         */\n        count?: boolean;\n    };\n    url: '/api/v1/odata/AccountingCompanies';\n};\n\nexport type ApiVVersionApiVersionOdataAccountingCompaniesResponses = {\n    /**\n     * OK\n     */\n    200: Array<AccountingCompany>;\n};\n\nexport type ApiVVersionApiVersionOdataAccountingCompaniesResponse = ApiVVersionApiVersionOdataAccountingCompaniesResponses[keyof ApiVVersionApiVersionOdataAccountingCompaniesResponses];\n\nexport type ApiVVersionApiVersionOdataAccountingCompaniesCountData = {\n    body?: never;\n    path?: never;\n    query?: {\n        /**\n         * Limits the properties returned in the result.\n         */\n        select?: string;\n        /**\n         * Indicates the related entities to be represented inline. The maximum depth is 2.\n         */\n        expand?: string;\n        /**\n         * Restricts the set of items returned. The maximum number of expressions is 100. The allowed functions are: allfunctions.\n         */\n        filter?: string;\n        /**\n         * Specifies the order in which items are returned. The maximum number of expressions is 5.\n         */\n        orderby?: string;\n        /**\n         * Limits the number of items returned from a collection. The maximum value is 100.\n         */\n        top?: number;\n        /**\n         * Excludes the specified number of items of the queried collection from the result.\n         */\n        skip?: number;\n        /**\n         * Indicates whether the total count of items within a collection are returned in the result.\n         */\n        count?: boolean;\n    };\n    url: '/api/v1/odata/AccountingCompanies/$count';\n};\n\nexport type ApiVVersionApiVersionOdataAccountingCompaniesCountResponses = {\n    /**\n     * OK\n     */\n    200: Array<AccountingCompany>;\n};\n\nexport type ApiVVersionApiVersionOdataAccountingCompaniesCountResponse = ApiVVersionApiVersionOdataAccountingCompaniesCountResponses[keyof ApiVVersionApiVersionOdataAccountingCompaniesCountResponses];\n\nexport type PutApiV1AccountingCompanyMembershipsData = {\n    body?: AccountingCompanyMembershipUpsertDto;\n    path?: never;\n    query?: never;\n    url: '/api/v1/accounting-company-memberships';\n};\n\nexport type PutApiV1AccountingCompanyMembershipsResponses = {\n    /**\n     * OK\n     */\n    200: AccountingCompanyMembership;\n};\n\nexport type PutApiV1AccountingCompanyMembershipsResponse = PutApiV1AccountingCompanyMembershipsResponses[keyof PutApiV1AccountingCompanyMembershipsResponses];\n\nexport type DeleteApiV1AccountingCompanyMembershipsByIdData = {\n    body?: never;\n    path: {\n        id: number;\n    };\n    query?: never;\n    url: '/api/v1/accounting-company-memberships/{id}';\n};\n\nexport type DeleteApiV1AccountingCompanyMembershipsByIdResponses = {\n    /**\n     * OK\n     */\n    200: unknown;\n};\n\nexport type ApiVVersionApiVersionOdataAccountingCompanyMembershipsData = {\n    body?: never;\n    path?: never;\n    query?: {\n        /**\n         * Limits the properties returned in the result.\n         */\n        select?: string;\n        /**\n         * Indicates the related entities to be represented inline. The maximum depth is 2.\n         */\n        expand?: string;\n        /**\n         * Restricts the set of items returned. The maximum number of expressions is 100. The allowed functions are: allfunctions.\n         */\n        filter?: string;\n        /**\n         * Specifies the order in which items are returned. The maximum number of expressions is 5.\n         */\n        orderby?: string;\n        /**\n         * Limits the number of items returned from a collection. The maximum value is 100.\n         */\n        top?: number;\n        /**\n         * Excludes the specified number of items of the queried collection from the result.\n         */\n        skip?: number;\n        /**\n         * Indicates whether the total count of items within a collection are returned in the result.\n         */\n        count?: boolean;\n    };\n    url: '/api/v1/odata/AccountingCompanyMemberships';\n};\n\nexport type ApiVVersionApiVersionOdataAccountingCompanyMembershipsResponses = {\n    /**\n     * OK\n     */\n    200: Array<AccountingCompanyMembership>;\n};\n\nexport type ApiVVersionApiVersionOdataAccountingCompanyMembershipsResponse = ApiVVersionApiVersionOdataAccountingCompanyMembershipsResponses[keyof ApiVVersionApiVersionOdataAccountingCompanyMembershipsResponses];\n\nexport type ApiVVersionApiVersionOdataAccountingCompanyMembershipsCountData = {\n    body?: never;\n    path?: never;\n    query?: {\n        /**\n         * Limits the properties returned in the result.\n         */\n        select?: string;\n        /**\n         * Indicates the related entities to be represented inline. The maximum depth is 2.\n         */\n        expand?: string;\n        /**\n         * Restricts the set of items returned. The maximum number of expressions is 100. The allowed functions are: allfunctions.\n         */\n        filter?: string;\n        /**\n         * Specifies the order in which items are returned. The maximum number of expressions is 5.\n         */\n        orderby?: string;\n        /**\n         * Limits the number of items returned from a collection. The maximum value is 100.\n         */\n        top?: number;\n        /**\n         * Excludes the specified number of items of the queried collection from the result.\n         */\n        skip?: number;\n        /**\n         * Indicates whether the total count of items within a collection are returned in the result.\n         */\n        count?: boolean;\n    };\n    url: '/api/v1/odata/AccountingCompanyMemberships/$count';\n};\n\nexport type ApiVVersionApiVersionOdataAccountingCompanyMembershipsCountResponses = {\n    /**\n     * OK\n     */\n    200: Array<AccountingCompanyMembership>;\n};\n\nexport type ApiVVersionApiVersionOdataAccountingCompanyMembershipsCountResponse = ApiVVersionApiVersionOdataAccountingCompanyMembershipsCountResponses[keyof ApiVVersionApiVersionOdataAccountingCompanyMembershipsCountResponses];\n\nexport type PutApiV1BankAccountsData = {\n    body?: BankAccountUpsertDto;\n    path?: never;\n    query?: never;\n    url: '/api/v1/bank-accounts';\n};\n\nexport type PutApiV1BankAccountsResponses = {\n    /**\n     * OK\n     */\n    200: BankAccount;\n};\n\nexport type PutApiV1BankAccountsResponse = PutApiV1BankAccountsResponses[keyof PutApiV1BankAccountsResponses];\n\nexport type DeleteApiV1BankAccountsByIdData = {\n    body?: never;\n    path: {\n        id: number;\n    };\n    query?: never;\n    url: '/api/v1/bank-accounts/{id}';\n};\n\nexport type DeleteApiV1BankAccountsByIdResponses = {\n    /**\n     * OK\n     */\n    200: unknown;\n};\n\nexport type ApiVVersionApiVersionOdataBankAccountsData = {\n    body?: never;\n    path?: never;\n    query?: {\n        /**\n         * Limits the properties returned in the result.\n         */\n        select?: string;\n        /**\n         * Indicates the related entities to be represented inline. The maximum depth is 2.\n         */\n        expand?: string;\n        /**\n         * Restricts the set of items returned. The maximum number of expressions is 100. The allowed functions are: allfunctions.\n         */\n        filter?: string;\n        /**\n         * Specifies the order in which items are returned. The maximum number of expressions is 5.\n         */\n        orderby?: string;\n        /**\n         * Limits the number of items returned from a collection. The maximum value is 100.\n         */\n        top?: number;\n        /**\n         * Excludes the specified number of items of the queried collection from the result.\n         */\n        skip?: number;\n        /**\n         * Indicates whether the total count of items within a collection are returned in the result.\n         */\n        count?: boolean;\n    };\n    url: '/api/v1/odata/BankAccounts';\n};\n\nexport type ApiVVersionApiVersionOdataBankAccountsResponses = {\n    /**\n     * OK\n     */\n    200: Array<BankAccount>;\n};\n\nexport type ApiVVersionApiVersionOdataBankAccountsResponse = ApiVVersionApiVersionOdataBankAccountsResponses[keyof ApiVVersionApiVersionOdataBankAccountsResponses];\n\nexport type ApiVVersionApiVersionOdataBankAccountsCountData = {\n    body?: never;\n    path?: never;\n    query?: {\n        /**\n         * Limits the properties returned in the result.\n         */\n        select?: string;\n        /**\n         * Indicates the related entities to be represented inline. The maximum depth is 2.\n         */\n        expand?: string;\n        /**\n         * Restricts the set of items returned. The maximum number of expressions is 100. The allowed functions are: allfunctions.\n         */\n        filter?: string;\n        /**\n         * Specifies the order in which items are returned. The maximum number of expressions is 5.\n         */\n        orderby?: string;\n        /**\n         * Limits the number of items returned from a collection. The maximum value is 100.\n         */\n        top?: number;\n        /**\n         * Excludes the specified number of items of the queried collection from the result.\n         */\n        skip?: number;\n        /**\n         * Indicates whether the total count of items within a collection are returned in the result.\n         */\n        count?: boolean;\n    };\n    url: '/api/v1/odata/BankAccounts/$count';\n};\n\nexport type ApiVVersionApiVersionOdataBankAccountsCountResponses = {\n    /**\n     * OK\n     */\n    200: Array<BankAccount>;\n};\n\nexport type ApiVVersionApiVersionOdataBankAccountsCountResponse = ApiVVersionApiVersionOdataBankAccountsCountResponses[keyof ApiVVersionApiVersionOdataBankAccountsCountResponses];\n\nexport type PutApiV1BusinessAccountantAssignmentsData = {\n    body?: BusinessAccountantAssignmentUpsert;\n    path?: never;\n    query?: never;\n    url: '/api/v1/business-accountant-assignments';\n};\n\nexport type PutApiV1BusinessAccountantAssignmentsResponses = {\n    /**\n     * OK\n     */\n    200: BusinessAccountantAssignment;\n};\n\nexport type PutApiV1BusinessAccountantAssignmentsResponse = PutApiV1BusinessAccountantAssignmentsResponses[keyof PutApiV1BusinessAccountantAssignmentsResponses];\n\nexport type DeleteApiV1BusinessAccountantAssignmentsByIdData = {\n    body?: never;\n    path: {\n        id: number;\n    };\n    query?: never;\n    url: '/api/v1/business-accountant-assignments/{id}';\n};\n\nexport type DeleteApiV1BusinessAccountantAssignmentsByIdResponses = {\n    /**\n     * OK\n     */\n    200: unknown;\n};\n\nexport type ApiVVersionApiVersionOdataBusinessAccountantAssignmentsData = {\n    body?: never;\n    path?: never;\n    query?: {\n        /**\n         * Limits the properties returned in the result.\n         */\n        select?: string;\n        /**\n         * Indicates the related entities to be represented inline. The maximum depth is 2.\n         */\n        expand?: string;\n        /**\n         * Restricts the set of items returned. The maximum number of expressions is 100. The allowed functions are: allfunctions.\n         */\n        filter?: string;\n        /**\n         * Specifies the order in which items are returned. The maximum number of expressions is 5.\n         */\n        orderby?: string;\n        /**\n         * Limits the number of items returned from a collection. The maximum value is 100.\n         */\n        top?: number;\n        /**\n         * Excludes the specified number of items of the queried collection from the result.\n         */\n        skip?: number;\n        /**\n         * Indicates whether the total count of items within a collection are returned in the result.\n         */\n        count?: boolean;\n    };\n    url: '/api/v1/odata/BusinessAccountantAssignments';\n};\n\nexport type ApiVVersionApiVersionOdataBusinessAccountantAssignmentsResponses = {\n    /**\n     * OK\n     */\n    200: Array<BusinessAccountantAssignment>;\n};\n\nexport type ApiVVersionApiVersionOdataBusinessAccountantAssignmentsResponse = ApiVVersionApiVersionOdataBusinessAccountantAssignmentsResponses[keyof ApiVVersionApiVersionOdataBusinessAccountantAssignmentsResponses];\n\nexport type ApiVVersionApiVersionOdataBusinessAccountantAssignmentsCountData = {\n    body?: never;\n    path?: never;\n    query?: {\n        /**\n         * Limits the properties returned in the result.\n         */\n        select?: string;\n        /**\n         * Indicates the related entities to be represented inline. The maximum depth is 2.\n         */\n        expand?: string;\n        /**\n         * Restricts the set of items returned. The maximum number of expressions is 100. The allowed functions are: allfunctions.\n         */\n        filter?: string;\n        /**\n         * Specifies the order in which items are returned. The maximum number of expressions is 5.\n         */\n        orderby?: string;\n        /**\n         * Limits the number of items returned from a collection. The maximum value is 100.\n         */\n        top?: number;\n        /**\n         * Excludes the specified number of items of the queried collection from the result.\n         */\n        skip?: number;\n        /**\n         * Indicates whether the total count of items within a collection are returned in the result.\n         */\n        count?: boolean;\n    };\n    url: '/api/v1/odata/BusinessAccountantAssignments/$count';\n};\n\nexport type ApiVVersionApiVersionOdataBusinessAccountantAssignmentsCountResponses = {\n    /**\n     * OK\n     */\n    200: Array<BusinessAccountantAssignment>;\n};\n\nexport type ApiVVersionApiVersionOdataBusinessAccountantAssignmentsCountResponse = ApiVVersionApiVersionOdataBusinessAccountantAssignmentsCountResponses[keyof ApiVVersionApiVersionOdataBusinessAccountantAssignmentsCountResponses];\n\nexport type GetApiV1BusinessDocumentsByIdRawData = {\n    body?: never;\n    path: {\n        id: number;\n    };\n    query?: never;\n    url: '/api/v1/business-documents/{id}/raw';\n};\n\nexport type GetApiV1BusinessDocumentsByIdRawResponses = {\n    /**\n     * OK\n     */\n    200: unknown;\n    /**\n     * No Content\n     */\n    204: void;\n};\n\nexport type GetApiV1BusinessDocumentsByIdRawResponse = GetApiV1BusinessDocumentsByIdRawResponses[keyof GetApiV1BusinessDocumentsByIdRawResponses];\n\nexport type PostApiV1BusinessDocumentsData = {\n    body?: {\n        BusinessId: number;\n        DocumentTypeId: number;\n        File: Blob | File;\n        DocumentName: string;\n        TaskId: number;\n    };\n    path?: never;\n    query?: never;\n    url: '/api/v1/business-documents';\n};\n\nexport type PostApiV1BusinessDocumentsResponses = {\n    /**\n     * OK\n     */\n    200: DocumentBusiness;\n};\n\nexport type PostApiV1BusinessDocumentsResponse = PostApiV1BusinessDocumentsResponses[keyof PostApiV1BusinessDocumentsResponses];\n\nexport type DeleteApiV1BusinessDocumentsByIdData = {\n    body?: never;\n    path: {\n        id: number;\n    };\n    query?: never;\n    url: '/api/v1/business-documents/{id}';\n};\n\nexport type DeleteApiV1BusinessDocumentsByIdResponses = {\n    /**\n     * OK\n     */\n    200: DocumentBusiness;\n};\n\nexport type DeleteApiV1BusinessDocumentsByIdResponse = DeleteApiV1BusinessDocumentsByIdResponses[keyof DeleteApiV1BusinessDocumentsByIdResponses];\n\nexport type PutApiV1BusinessDocumentsByIdData = {\n    body?: BusinessDocumentUpdateDto;\n    path: {\n        id: number;\n    };\n    query?: never;\n    url: '/api/v1/business-documents/{id}';\n};\n\nexport type PutApiV1BusinessDocumentsByIdResponses = {\n    /**\n     * OK\n     */\n    200: DocumentBusiness;\n};\n\nexport type PutApiV1BusinessDocumentsByIdResponse = PutApiV1BusinessDocumentsByIdResponses[keyof PutApiV1BusinessDocumentsByIdResponses];\n\nexport type PostApiV1BusinessDocumentsByIdApproveData = {\n    body?: never;\n    path: {\n        id: number;\n    };\n    query?: never;\n    url: '/api/v1/business-documents/{id}/approve';\n};\n\nexport type PostApiV1BusinessDocumentsByIdApproveResponses = {\n    /**\n     * OK\n     */\n    200: DocumentBusiness;\n};\n\nexport type PostApiV1BusinessDocumentsByIdApproveResponse = PostApiV1BusinessDocumentsByIdApproveResponses[keyof PostApiV1BusinessDocumentsByIdApproveResponses];\n\nexport type PostApiV1BusinessDocumentsByIdUnapproveData = {\n    body?: never;\n    path: {\n        id: number;\n    };\n    query?: never;\n    url: '/api/v1/business-documents/{id}/unapprove';\n};\n\nexport type PostApiV1BusinessDocumentsByIdUnapproveResponses = {\n    /**\n     * OK\n     */\n    200: DocumentBusiness;\n};\n\nexport type PostApiV1BusinessDocumentsByIdUnapproveResponse = PostApiV1BusinessDocumentsByIdUnapproveResponses[keyof PostApiV1BusinessDocumentsByIdUnapproveResponses];\n\nexport type PostApiV1BusinessDocumentsByIdMoveToPersonalData = {\n    body?: never;\n    path: {\n        id: number;\n    };\n    query?: never;\n    url: '/api/v1/business-documents/{id}/move-to-personal';\n};\n\nexport type PostApiV1BusinessDocumentsByIdMoveToPersonalResponses = {\n    /**\n     * OK\n     */\n    200: unknown;\n};\n\nexport type PostApiV1BusinessDocumentsByIdMoveToBusinessData = {\n    body?: BusinessDocumentMoveToBusinessDocumentsDto;\n    path: {\n        id: number;\n    };\n    query?: never;\n    url: '/api/v1/business-documents/{id}/move-to-business';\n};\n\nexport type PostApiV1BusinessDocumentsByIdMoveToBusinessResponses = {\n    /**\n     * OK\n     */\n    200: DocumentBusiness;\n};\n\nexport type PostApiV1BusinessDocumentsByIdMoveToBusinessResponse = PostApiV1BusinessDocumentsByIdMoveToBusinessResponses[keyof PostApiV1BusinessDocumentsByIdMoveToBusinessResponses];\n\nexport type ApiVVersionApiVersionOdataBusinessDocumentActivitiesData = {\n    body?: never;\n    path?: never;\n    query?: {\n        accountants?: Array<number>;\n        /**\n         * Limits the properties returned in the result.\n         */\n        select?: string;\n        /**\n         * Indicates the related entities to be represented inline. The maximum depth is 2.\n         */\n        expand?: string;\n        /**\n         * Restricts the set of items returned. The maximum number of expressions is 100. The allowed functions are: allfunctions.\n         */\n        filter?: string;\n        /**\n         * Specifies the order in which items are returned. The maximum number of expressions is 5.\n         */\n        orderby?: string;\n        /**\n         * Limits the number of items returned from a collection. The maximum value is 100.\n         */\n        top?: number;\n        /**\n         * Excludes the specified number of items of the queried collection from the result.\n         */\n        skip?: number;\n        /**\n         * Indicates whether the total count of items within a collection are returned in the result.\n         */\n        count?: boolean;\n    };\n    url: '/api/v1/odata/BusinessDocumentActivities';\n};\n\nexport type ApiVVersionApiVersionOdataBusinessDocumentActivitiesResponses = {\n    /**\n     * OK\n     */\n    200: Array<DocumentBusinessActivity>;\n};\n\nexport type ApiVVersionApiVersionOdataBusinessDocumentActivitiesResponse = ApiVVersionApiVersionOdataBusinessDocumentActivitiesResponses[keyof ApiVVersionApiVersionOdataBusinessDocumentActivitiesResponses];\n\nexport type ApiVVersionApiVersionOdataBusinessDocumentActivitiesCountData = {\n    body?: never;\n    path?: never;\n    query?: {\n        accountants?: Array<number>;\n        /**\n         * Limits the properties returned in the result.\n         */\n        select?: string;\n        /**\n         * Indicates the related entities to be represented inline. The maximum depth is 2.\n         */\n        expand?: string;\n        /**\n         * Restricts the set of items returned. The maximum number of expressions is 100. The allowed functions are: allfunctions.\n         */\n        filter?: string;\n        /**\n         * Specifies the order in which items are returned. The maximum number of expressions is 5.\n         */\n        orderby?: string;\n        /**\n         * Limits the number of items returned from a collection. The maximum value is 100.\n         */\n        top?: number;\n        /**\n         * Excludes the specified number of items of the queried collection from the result.\n         */\n        skip?: number;\n        /**\n         * Indicates whether the total count of items within a collection are returned in the result.\n         */\n        count?: boolean;\n    };\n    url: '/api/v1/odata/BusinessDocumentActivities/$count';\n};\n\nexport type ApiVVersionApiVersionOdataBusinessDocumentActivitiesCountResponses = {\n    /**\n     * OK\n     */\n    200: Array<DocumentBusinessActivity>;\n};\n\nexport type ApiVVersionApiVersionOdataBusinessDocumentActivitiesCountResponse = ApiVVersionApiVersionOdataBusinessDocumentActivitiesCountResponses[keyof ApiVVersionApiVersionOdataBusinessDocumentActivitiesCountResponses];\n\nexport type ApiVVersionApiVersionOdataBusinessDocumentsData = {\n    body?: never;\n    path?: never;\n    query?: {\n        accountants?: Array<number>;\n        /**\n         * Limits the properties returned in the result.\n         */\n        select?: string;\n        /**\n         * Indicates the related entities to be represented inline. The maximum depth is 2.\n         */\n        expand?: string;\n        /**\n         * Restricts the set of items returned. The maximum number of expressions is 100. The allowed functions are: allfunctions.\n         */\n        filter?: string;\n        /**\n         * Specifies the order in which items are returned. The maximum number of expressions is 5.\n         */\n        orderby?: string;\n        /**\n         * Limits the number of items returned from a collection. The maximum value is 100.\n         */\n        top?: number;\n        /**\n         * Excludes the specified number of items of the queried collection from the result.\n         */\n        skip?: number;\n        /**\n         * Indicates whether the total count of items within a collection are returned in the result.\n         */\n        count?: boolean;\n    };\n    url: '/api/v1/odata/BusinessDocuments';\n};\n\nexport type ApiVVersionApiVersionOdataBusinessDocumentsResponses = {\n    /**\n     * OK\n     */\n    200: Array<DocumentBusiness>;\n};\n\nexport type ApiVVersionApiVersionOdataBusinessDocumentsResponse = ApiVVersionApiVersionOdataBusinessDocumentsResponses[keyof ApiVVersionApiVersionOdataBusinessDocumentsResponses];\n\nexport type ApiVVersionApiVersionOdataBusinessDocumentsCountData = {\n    body?: never;\n    path?: never;\n    query?: {\n        accountants?: Array<number>;\n        /**\n         * Limits the properties returned in the result.\n         */\n        select?: string;\n        /**\n         * Indicates the related entities to be represented inline. The maximum depth is 2.\n         */\n        expand?: string;\n        /**\n         * Restricts the set of items returned. The maximum number of expressions is 100. The allowed functions are: allfunctions.\n         */\n        filter?: string;\n        /**\n         * Specifies the order in which items are returned. The maximum number of expressions is 5.\n         */\n        orderby?: string;\n        /**\n         * Limits the number of items returned from a collection. The maximum value is 100.\n         */\n        top?: number;\n        /**\n         * Excludes the specified number of items of the queried collection from the result.\n         */\n        skip?: number;\n        /**\n         * Indicates whether the total count of items within a collection are returned in the result.\n         */\n        count?: boolean;\n    };\n    url: '/api/v1/odata/BusinessDocuments/$count';\n};\n\nexport type ApiVVersionApiVersionOdataBusinessDocumentsCountResponses = {\n    /**\n     * OK\n     */\n    200: Array<DocumentBusiness>;\n};\n\nexport type ApiVVersionApiVersionOdataBusinessDocumentsCountResponse = ApiVVersionApiVersionOdataBusinessDocumentsCountResponses[keyof ApiVVersionApiVersionOdataBusinessDocumentsCountResponses];\n\nexport type ApiVVersionApiVersionOdataBusinessDocumentsSummariesData = {\n    body?: never;\n    path?: never;\n    query?: {\n        accountants?: Array<number>;\n        /**\n         * Limits the properties returned in the result.\n         */\n        select?: string;\n        /**\n         * Indicates the related entities to be represented inline. The maximum depth is 2.\n         */\n        expand?: string;\n        /**\n         * Restricts the set of items returned. The maximum number of expressions is 100. The allowed functions are: allfunctions.\n         */\n        filter?: string;\n        /**\n         * Specifies the order in which items are returned. The maximum number of expressions is 5.\n         */\n        orderby?: string;\n        /**\n         * Limits the number of items returned from a collection. The maximum value is 100.\n         */\n        top?: number;\n        /**\n         * Excludes the specified number of items of the queried collection from the result.\n         */\n        skip?: number;\n        /**\n         * Indicates whether the total count of items within a collection are returned in the result.\n         */\n        count?: boolean;\n    };\n    url: '/api/v1/odata/BusinessDocumentsSummaries';\n};\n\nexport type ApiVVersionApiVersionOdataBusinessDocumentsSummariesResponses = {\n    /**\n     * OK\n     */\n    200: Array<BusinessDocumentsSummary>;\n};\n\nexport type ApiVVersionApiVersionOdataBusinessDocumentsSummariesResponse = ApiVVersionApiVersionOdataBusinessDocumentsSummariesResponses[keyof ApiVVersionApiVersionOdataBusinessDocumentsSummariesResponses];\n\nexport type ApiVVersionApiVersionOdataBusinessDocumentsSummariesCountData = {\n    body?: never;\n    path?: never;\n    query?: {\n        accountants?: Array<number>;\n        /**\n         * Limits the properties returned in the result.\n         */\n        select?: string;\n        /**\n         * Indicates the related entities to be represented inline. The maximum depth is 2.\n         */\n        expand?: string;\n        /**\n         * Restricts the set of items returned. The maximum number of expressions is 100. The allowed functions are: allfunctions.\n         */\n        filter?: string;\n        /**\n         * Specifies the order in which items are returned. The maximum number of expressions is 5.\n         */\n        orderby?: string;\n        /**\n         * Limits the number of items returned from a collection. The maximum value is 100.\n         */\n        top?: number;\n        /**\n         * Excludes the specified number of items of the queried collection from the result.\n         */\n        skip?: number;\n        /**\n         * Indicates whether the total count of items within a collection are returned in the result.\n         */\n        count?: boolean;\n    };\n    url: '/api/v1/odata/BusinessDocumentsSummaries/$count';\n};\n\nexport type ApiVVersionApiVersionOdataBusinessDocumentsSummariesCountResponses = {\n    /**\n     * OK\n     */\n    200: Array<BusinessDocumentsSummary>;\n};\n\nexport type ApiVVersionApiVersionOdataBusinessDocumentsSummariesCountResponse = ApiVVersionApiVersionOdataBusinessDocumentsSummariesCountResponses[keyof ApiVVersionApiVersionOdataBusinessDocumentsSummariesCountResponses];\n\nexport type GetApiV1BusinessesByIdDocumentTypesSummaryData = {\n    body?: never;\n    path: {\n        id: number;\n    };\n    query?: never;\n    url: '/api/v1/businesses/{id}/document-types-summary';\n};\n\nexport type GetApiV1BusinessesByIdDocumentTypesSummaryResponses = {\n    /**\n     * OK\n     */\n    200: Array<DocumentTypesSummary>;\n};\n\nexport type GetApiV1BusinessesByIdDocumentTypesSummaryResponse = GetApiV1BusinessesByIdDocumentTypesSummaryResponses[keyof GetApiV1BusinessesByIdDocumentTypesSummaryResponses];\n\nexport type PostApiV1BusinessesData = {\n    body?: BusinessCreateDto;\n    path?: never;\n    query?: never;\n    url: '/api/v1/businesses';\n};\n\nexport type PostApiV1BusinessesResponses = {\n    /**\n     * OK\n     */\n    200: Business;\n};\n\nexport type PostApiV1BusinessesResponse = PostApiV1BusinessesResponses[keyof PostApiV1BusinessesResponses];\n\nexport type DeleteApiV1BusinessesByIdData = {\n    body?: never;\n    path: {\n        id: number;\n    };\n    query?: never;\n    url: '/api/v1/businesses/{id}';\n};\n\nexport type DeleteApiV1BusinessesByIdResponses = {\n    /**\n     * OK\n     */\n    200: unknown;\n};\n\nexport type PutApiV1BusinessesByIdData = {\n    body?: BusinessUpdateDto;\n    path: {\n        id: number;\n    };\n    query?: never;\n    url: '/api/v1/businesses/{id}';\n};\n\nexport type PutApiV1BusinessesByIdResponses = {\n    /**\n     * OK\n     */\n    200: Business;\n};\n\nexport type PutApiV1BusinessesByIdResponse = PutApiV1BusinessesByIdResponses[keyof PutApiV1BusinessesByIdResponses];\n\nexport type PutApiV1BusinessesByIdContactData = {\n    body?: BusinessChangeContactDto;\n    path: {\n        id: number;\n    };\n    query?: never;\n    url: '/api/v1/businesses/{id}/contact';\n};\n\nexport type PutApiV1BusinessesByIdContactResponses = {\n    /**\n     * OK\n     */\n    200: unknown;\n};\n\nexport type PostApiV1BusinessesByIdDisconnectData = {\n    body?: never;\n    path: {\n        id: number;\n    };\n    query?: never;\n    url: '/api/v1/businesses/{id}/disconnect';\n};\n\nexport type PostApiV1BusinessesByIdDisconnectResponses = {\n    /**\n     * OK\n     */\n    200: Business;\n};\n\nexport type PostApiV1BusinessesByIdDisconnectResponse = PostApiV1BusinessesByIdDisconnectResponses[keyof PostApiV1BusinessesByIdDisconnectResponses];\n\nexport type ApiVVersionApiVersionOdataBusinessesData = {\n    body?: never;\n    path?: never;\n    query?: {\n        accountants?: Array<number>;\n        /**\n         * Limits the properties returned in the result.\n         */\n        select?: string;\n        /**\n         * Indicates the related entities to be represented inline. The maximum depth is 2.\n         */\n        expand?: string;\n        /**\n         * Restricts the set of items returned. The maximum number of expressions is 100. The allowed functions are: allfunctions.\n         */\n        filter?: string;\n        /**\n         * Specifies the order in which items are returned. The maximum number of expressions is 5.\n         */\n        orderby?: string;\n        /**\n         * Limits the number of items returned from a collection. The maximum value is 100.\n         */\n        top?: number;\n        /**\n         * Excludes the specified number of items of the queried collection from the result.\n         */\n        skip?: number;\n        /**\n         * Indicates whether the total count of items within a collection are returned in the result.\n         */\n        count?: boolean;\n    };\n    url: '/api/v1/odata/Businesses';\n};\n\nexport type ApiVVersionApiVersionOdataBusinessesResponses = {\n    /**\n     * OK\n     */\n    200: Array<Business>;\n};\n\nexport type ApiVVersionApiVersionOdataBusinessesResponse = ApiVVersionApiVersionOdataBusinessesResponses[keyof ApiVVersionApiVersionOdataBusinessesResponses];\n\nexport type ApiVVersionApiVersionOdataBusinessesCountData = {\n    body?: never;\n    path?: never;\n    query?: {\n        accountants?: Array<number>;\n        /**\n         * Limits the properties returned in the result.\n         */\n        select?: string;\n        /**\n         * Indicates the related entities to be represented inline. The maximum depth is 2.\n         */\n        expand?: string;\n        /**\n         * Restricts the set of items returned. The maximum number of expressions is 100. The allowed functions are: allfunctions.\n         */\n        filter?: string;\n        /**\n         * Specifies the order in which items are returned. The maximum number of expressions is 5.\n         */\n        orderby?: string;\n        /**\n         * Limits the number of items returned from a collection. The maximum value is 100.\n         */\n        top?: number;\n        /**\n         * Excludes the specified number of items of the queried collection from the result.\n         */\n        skip?: number;\n        /**\n         * Indicates whether the total count of items within a collection are returned in the result.\n         */\n        count?: boolean;\n    };\n    url: '/api/v1/odata/Businesses/$count';\n};\n\nexport type ApiVVersionApiVersionOdataBusinessesCountResponses = {\n    /**\n     * OK\n     */\n    200: Array<Business>;\n};\n\nexport type ApiVVersionApiVersionOdataBusinessesCountResponse = ApiVVersionApiVersionOdataBusinessesCountResponses[keyof ApiVVersionApiVersionOdataBusinessesCountResponses];\n\nexport type ApiVVersionApiVersionOdataBusinessesKeyData = {\n    body?: never;\n    path?: never;\n    query?: {\n        key?: number;\n        /**\n         * Limits the properties returned in the result.\n         */\n        select?: string;\n        /**\n         * Indicates the related entities to be represented inline. The maximum depth is 2.\n         */\n        expand?: string;\n    };\n    url: '/api/v1/odata/Businesses({key})';\n};\n\nexport type ApiVVersionApiVersionOdataBusinessesKeyResponses = {\n    /**\n     * OK\n     */\n    200: Business;\n};\n\nexport type ApiVVersionApiVersionOdataBusinessesKeyResponse = ApiVVersionApiVersionOdataBusinessesKeyResponses[keyof ApiVVersionApiVersionOdataBusinessesKeyResponses];\n\nexport type ApiVVersionApiVersionOdataBusinessesKey2Data = {\n    body?: never;\n    path?: never;\n    query?: {\n        key?: number;\n        /**\n         * Limits the properties returned in the result.\n         */\n        select?: string;\n        /**\n         * Indicates the related entities to be represented inline. The maximum depth is 2.\n         */\n        expand?: string;\n    };\n    url: '/api/v1/odata/Businesses/{key}';\n};\n\nexport type ApiVVersionApiVersionOdataBusinessesKey2Responses = {\n    /**\n     * OK\n     */\n    200: Business;\n};\n\nexport type ApiVVersionApiVersionOdataBusinessesKey2Response = ApiVVersionApiVersionOdataBusinessesKey2Responses[keyof ApiVVersionApiVersionOdataBusinessesKey2Responses];\n\nexport type PutApiV1BusinessMembershipsData = {\n    body?: BusinessMembershipUpsertDto;\n    path?: never;\n    query?: never;\n    url: '/api/v1/business-memberships';\n};\n\nexport type PutApiV1BusinessMembershipsResponses = {\n    /**\n     * OK\n     */\n    200: BusinessMembershipDto;\n};\n\nexport type PutApiV1BusinessMembershipsResponse = PutApiV1BusinessMembershipsResponses[keyof PutApiV1BusinessMembershipsResponses];\n\nexport type ApiVVersionApiVersionOdataBusinessSummariesData = {\n    body?: never;\n    path?: never;\n    query?: {\n        role?: string;\n        accountants?: Array<number>;\n        /**\n         * Limits the properties returned in the result.\n         */\n        select?: string;\n        /**\n         * Indicates the related entities to be represented inline. The maximum depth is 2.\n         */\n        expand?: string;\n        /**\n         * Restricts the set of items returned. The maximum number of expressions is 100. The allowed functions are: allfunctions.\n         */\n        filter?: string;\n        /**\n         * Specifies the order in which items are returned. The maximum number of expressions is 5.\n         */\n        orderby?: string;\n        /**\n         * Limits the number of items returned from a collection. The maximum value is 100.\n         */\n        top?: number;\n        /**\n         * Excludes the specified number of items of the queried collection from the result.\n         */\n        skip?: number;\n        /**\n         * Indicates whether the total count of items within a collection are returned in the result.\n         */\n        count?: boolean;\n    };\n    url: '/api/v1/odata/BusinessSummaries';\n};\n\nexport type ApiVVersionApiVersionOdataBusinessSummariesResponses = {\n    /**\n     * OK\n     */\n    200: Array<BusinessSummary>;\n};\n\nexport type ApiVVersionApiVersionOdataBusinessSummariesResponse = ApiVVersionApiVersionOdataBusinessSummariesResponses[keyof ApiVVersionApiVersionOdataBusinessSummariesResponses];\n\nexport type ApiVVersionApiVersionOdataBusinessSummariesCountData = {\n    body?: never;\n    path?: never;\n    query?: {\n        role?: string;\n        accountants?: Array<number>;\n        /**\n         * Limits the properties returned in the result.\n         */\n        select?: string;\n        /**\n         * Indicates the related entities to be represented inline. The maximum depth is 2.\n         */\n        expand?: string;\n        /**\n         * Restricts the set of items returned. The maximum number of expressions is 100. The allowed functions are: allfunctions.\n         */\n        filter?: string;\n        /**\n         * Specifies the order in which items are returned. The maximum number of expressions is 5.\n         */\n        orderby?: string;\n        /**\n         * Limits the number of items returned from a collection. The maximum value is 100.\n         */\n        top?: number;\n        /**\n         * Excludes the specified number of items of the queried collection from the result.\n         */\n        skip?: number;\n        /**\n         * Indicates whether the total count of items within a collection are returned in the result.\n         */\n        count?: boolean;\n    };\n    url: '/api/v1/odata/BusinessSummaries/$count';\n};\n\nexport type ApiVVersionApiVersionOdataBusinessSummariesCountResponses = {\n    /**\n     * OK\n     */\n    200: Array<BusinessSummary>;\n};\n\nexport type ApiVVersionApiVersionOdataBusinessSummariesCountResponse = ApiVVersionApiVersionOdataBusinessSummariesCountResponses[keyof ApiVVersionApiVersionOdataBusinessSummariesCountResponses];\n\nexport type PostApiV1CounterpartiesData = {\n    body?: CounterpartyCreateDto;\n    path?: never;\n    query?: never;\n    url: '/api/v1/counterparties';\n};\n\nexport type PostApiV1CounterpartiesResponses = {\n    /**\n     * OK\n     */\n    200: Counterparty;\n};\n\nexport type PostApiV1CounterpartiesResponse = PostApiV1CounterpartiesResponses[keyof PostApiV1CounterpartiesResponses];\n\nexport type DeleteApiV1CounterpartiesByIdData = {\n    body?: never;\n    path: {\n        id: number;\n    };\n    query?: never;\n    url: '/api/v1/counterparties/{id}';\n};\n\nexport type DeleteApiV1CounterpartiesByIdResponses = {\n    /**\n     * OK\n     */\n    200: unknown;\n};\n\nexport type PatchApiV1CounterpartiesByIdData = {\n    body?: CounterpartyUpdateDto;\n    path: {\n        id: number;\n    };\n    query?: never;\n    url: '/api/v1/counterparties/{id}';\n};\n\nexport type PatchApiV1CounterpartiesByIdResponses = {\n    /**\n     * OK\n     */\n    200: Counterparty;\n};\n\nexport type PatchApiV1CounterpartiesByIdResponse = PatchApiV1CounterpartiesByIdResponses[keyof PatchApiV1CounterpartiesByIdResponses];\n\nexport type ApiVVersionApiVersionOdataCounterpartiesData = {\n    body?: never;\n    path?: never;\n    query?: {\n        /**\n         * Limits the properties returned in the result.\n         */\n        select?: string;\n        /**\n         * Indicates the related entities to be represented inline. The maximum depth is 2.\n         */\n        expand?: string;\n        /**\n         * Restricts the set of items returned. The maximum number of expressions is 100. The allowed functions are: allfunctions.\n         */\n        filter?: string;\n        /**\n         * Specifies the order in which items are returned. The maximum number of expressions is 5.\n         */\n        orderby?: string;\n        /**\n         * Limits the number of items returned from a collection. The maximum value is 100.\n         */\n        top?: number;\n        /**\n         * Excludes the specified number of items of the queried collection from the result.\n         */\n        skip?: number;\n        /**\n         * Indicates whether the total count of items within a collection are returned in the result.\n         */\n        count?: boolean;\n    };\n    url: '/api/v1/odata/Counterparties';\n};\n\nexport type ApiVVersionApiVersionOdataCounterpartiesResponses = {\n    /**\n     * OK\n     */\n    200: Array<Counterparty>;\n};\n\nexport type ApiVVersionApiVersionOdataCounterpartiesResponse = ApiVVersionApiVersionOdataCounterpartiesResponses[keyof ApiVVersionApiVersionOdataCounterpartiesResponses];\n\nexport type ApiVVersionApiVersionOdataCounterpartiesCountData = {\n    body?: never;\n    path?: never;\n    query?: {\n        /**\n         * Limits the properties returned in the result.\n         */\n        select?: string;\n        /**\n         * Indicates the related entities to be represented inline. The maximum depth is 2.\n         */\n        expand?: string;\n        /**\n         * Restricts the set of items returned. The maximum number of expressions is 100. The allowed functions are: allfunctions.\n         */\n        filter?: string;\n        /**\n         * Specifies the order in which items are returned. The maximum number of expressions is 5.\n         */\n        orderby?: string;\n        /**\n         * Limits the number of items returned from a collection. The maximum value is 100.\n         */\n        top?: number;\n        /**\n         * Excludes the specified number of items of the queried collection from the result.\n         */\n        skip?: number;\n        /**\n         * Indicates whether the total count of items within a collection are returned in the result.\n         */\n        count?: boolean;\n    };\n    url: '/api/v1/odata/Counterparties/$count';\n};\n\nexport type ApiVVersionApiVersionOdataCounterpartiesCountResponses = {\n    /**\n     * OK\n     */\n    200: Array<Counterparty>;\n};\n\nexport type ApiVVersionApiVersionOdataCounterpartiesCountResponse = ApiVVersionApiVersionOdataCounterpartiesCountResponses[keyof ApiVVersionApiVersionOdataCounterpartiesCountResponses];\n\nexport type PutApiV1DataBoxCredentialsData = {\n    body?: DataBoxCredentialsUpsertDto;\n    path?: never;\n    query?: never;\n    url: '/api/v1/data-box-credentials';\n};\n\nexport type PutApiV1DataBoxCredentialsResponses = {\n    /**\n     * OK\n     */\n    200: DataBoxCredentials;\n};\n\nexport type PutApiV1DataBoxCredentialsResponse = PutApiV1DataBoxCredentialsResponses[keyof PutApiV1DataBoxCredentialsResponses];\n\nexport type DeleteApiV1DataBoxCredentialsByIdData = {\n    body?: never;\n    path: {\n        id: number;\n    };\n    query?: never;\n    url: '/api/v1/data-box-credentials/{id}';\n};\n\nexport type DeleteApiV1DataBoxCredentialsByIdResponses = {\n    /**\n     * OK\n     */\n    200: unknown;\n};\n\nexport type ApiVVersionApiVersionOdataDataBoxCredentialsData = {\n    body?: never;\n    path?: never;\n    query?: {\n        includePassword?: boolean;\n        /**\n         * Limits the properties returned in the result.\n         */\n        select?: string;\n        /**\n         * Indicates the related entities to be represented inline. The maximum depth is 2.\n         */\n        expand?: string;\n        /**\n         * Restricts the set of items returned. The maximum number of expressions is 100. The allowed functions are: allfunctions.\n         */\n        filter?: string;\n        /**\n         * Specifies the order in which items are returned. The maximum number of expressions is 5.\n         */\n        orderby?: string;\n        /**\n         * Limits the number of items returned from a collection. The maximum value is 100.\n         */\n        top?: number;\n        /**\n         * Excludes the specified number of items of the queried collection from the result.\n         */\n        skip?: number;\n        /**\n         * Indicates whether the total count of items within a collection are returned in the result.\n         */\n        count?: boolean;\n    };\n    url: '/api/v1/odata/DataBoxCredentials';\n};\n\nexport type ApiVVersionApiVersionOdataDataBoxCredentialsResponses = {\n    /**\n     * OK\n     */\n    200: Array<DataBoxCredentials>;\n};\n\nexport type ApiVVersionApiVersionOdataDataBoxCredentialsResponse = ApiVVersionApiVersionOdataDataBoxCredentialsResponses[keyof ApiVVersionApiVersionOdataDataBoxCredentialsResponses];\n\nexport type ApiVVersionApiVersionOdataDataBoxCredentialsCountData = {\n    body?: never;\n    path?: never;\n    query?: {\n        includePassword?: boolean;\n        /**\n         * Limits the properties returned in the result.\n         */\n        select?: string;\n        /**\n         * Indicates the related entities to be represented inline. The maximum depth is 2.\n         */\n        expand?: string;\n        /**\n         * Restricts the set of items returned. The maximum number of expressions is 100. The allowed functions are: allfunctions.\n         */\n        filter?: string;\n        /**\n         * Specifies the order in which items are returned. The maximum number of expressions is 5.\n         */\n        orderby?: string;\n        /**\n         * Limits the number of items returned from a collection. The maximum value is 100.\n         */\n        top?: number;\n        /**\n         * Excludes the specified number of items of the queried collection from the result.\n         */\n        skip?: number;\n        /**\n         * Indicates whether the total count of items within a collection are returned in the result.\n         */\n        count?: boolean;\n    };\n    url: '/api/v1/odata/DataBoxCredentials/$count';\n};\n\nexport type ApiVVersionApiVersionOdataDataBoxCredentialsCountResponses = {\n    /**\n     * OK\n     */\n    200: Array<DataBoxCredentials>;\n};\n\nexport type ApiVVersionApiVersionOdataDataBoxCredentialsCountResponse = ApiVVersionApiVersionOdataDataBoxCredentialsCountResponses[keyof ApiVVersionApiVersionOdataDataBoxCredentialsCountResponses];\n\nexport type GetApiDevData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/dev';\n};\n\nexport type GetApiDevResponses = {\n    /**\n     * OK\n     */\n    200: unknown;\n};\n\nexport type GetApiDevReseedDbData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/dev/reseed-db';\n};\n\nexport type GetApiDevReseedDbResponses = {\n    /**\n     * OK\n     */\n    200: unknown;\n};\n\nexport type GetApiDevDbResetData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/dev/db-reset';\n};\n\nexport type GetApiDevDbResetResponses = {\n    /**\n     * OK\n     */\n    200: unknown;\n};\n\nexport type GetApiDevDbReset2Data = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/dev/db/reset';\n};\n\nexport type GetApiDevDbReset2Responses = {\n    /**\n     * OK\n     */\n    200: unknown;\n};\n\nexport type GetApiDevDbCreateData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/dev/db/create';\n};\n\nexport type GetApiDevDbCreateResponses = {\n    /**\n     * OK\n     */\n    200: unknown;\n};\n\nexport type GetApiDevDbTouchData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/dev/db/touch';\n};\n\nexport type GetApiDevDbTouchResponses = {\n    /**\n     * OK\n     */\n    200: unknown;\n};\n\nexport type GetApiDevSeedData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/dev/seed';\n};\n\nexport type GetApiDevSeedResponses = {\n    /**\n     * OK\n     */\n    200: unknown;\n};\n\nexport type GetApiDevSeedAllData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/dev/seed-all';\n};\n\nexport type GetApiDevSeedAllResponses = {\n    /**\n     * OK\n     */\n    200: unknown;\n};\n\nexport type GetApiDevSeedProdData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/dev/seed-prod';\n};\n\nexport type GetApiDevSeedProdResponses = {\n    /**\n     * OK\n     */\n    200: unknown;\n};\n\nexport type GetApiDevJobProcessRecurringTasksData = {\n    body?: never;\n    path?: never;\n    query?: {\n        refDay?: string;\n    };\n    url: '/api/dev/job/process-recurring-tasks';\n};\n\nexport type GetApiDevJobProcessRecurringTasksResponses = {\n    /**\n     * OK\n     */\n    200: unknown;\n};\n\nexport type GetApiDevNotificationsSendTestData = {\n    body?: never;\n    path?: never;\n    query?: {\n        userId?: number;\n    };\n    url: '/api/dev/notifications/send-test';\n};\n\nexport type GetApiDevNotificationsSendTestResponses = {\n    /**\n     * OK\n     */\n    200: unknown;\n};\n\nexport type GetApiDevConfirmEmailData = {\n    body?: never;\n    path?: never;\n    query?: {\n        email?: string;\n    };\n    url: '/api/dev/confirm-email';\n};\n\nexport type GetApiDevConfirmEmailResponses = {\n    /**\n     * OK\n     */\n    200: unknown;\n};\n\nexport type GetApiDevEmailSendTestData = {\n    body?: never;\n    path?: never;\n    query?: {\n        to?: string;\n        subject?: string;\n        message?: string;\n    };\n    url: '/api/dev/email/send-test';\n};\n\nexport type GetApiDevEmailSendTestResponses = {\n    /**\n     * OK\n     */\n    200: unknown;\n};\n\nexport type DeleteApiV1NotificationsDeviceTokensData = {\n    body?: NotificationsDeviceTokenDeleteDto;\n    path?: never;\n    query?: never;\n    url: '/api/v1/notifications/device-tokens';\n};\n\nexport type DeleteApiV1NotificationsDeviceTokensResponses = {\n    /**\n     * OK\n     */\n    200: unknown;\n};\n\nexport type PutApiV1NotificationsDeviceTokensData = {\n    body?: NotificationsDeviceTokenUpsertDto;\n    path?: never;\n    query?: never;\n    url: '/api/v1/notifications/device-tokens';\n};\n\nexport type PutApiV1NotificationsDeviceTokensResponses = {\n    /**\n     * OK\n     */\n    200: unknown;\n};\n\nexport type ApiVVersionApiVersionOdataDocumentTypesData = {\n    body?: never;\n    path?: never;\n    query?: {\n        /**\n         * Limits the properties returned in the result.\n         */\n        select?: string;\n        /**\n         * Indicates the related entities to be represented inline. The maximum depth is 2.\n         */\n        expand?: string;\n        /**\n         * Restricts the set of items returned. The maximum number of expressions is 100. The allowed functions are: allfunctions.\n         */\n        filter?: string;\n        /**\n         * Specifies the order in which items are returned. The maximum number of expressions is 5.\n         */\n        orderby?: string;\n        /**\n         * Limits the number of items returned from a collection. The maximum value is 100.\n         */\n        top?: number;\n        /**\n         * Excludes the specified number of items of the queried collection from the result.\n         */\n        skip?: number;\n        /**\n         * Indicates whether the total count of items within a collection are returned in the result.\n         */\n        count?: boolean;\n    };\n    url: '/api/v1/odata/DocumentTypes';\n};\n\nexport type ApiVVersionApiVersionOdataDocumentTypesResponses = {\n    /**\n     * OK\n     */\n    200: Array<DocumentType>;\n};\n\nexport type ApiVVersionApiVersionOdataDocumentTypesResponse = ApiVVersionApiVersionOdataDocumentTypesResponses[keyof ApiVVersionApiVersionOdataDocumentTypesResponses];\n\nexport type ApiVVersionApiVersionOdataDocumentTypesCountData = {\n    body?: never;\n    path?: never;\n    query?: {\n        /**\n         * Limits the properties returned in the result.\n         */\n        select?: string;\n        /**\n         * Indicates the related entities to be represented inline. The maximum depth is 2.\n         */\n        expand?: string;\n        /**\n         * Restricts the set of items returned. The maximum number of expressions is 100. The allowed functions are: allfunctions.\n         */\n        filter?: string;\n        /**\n         * Specifies the order in which items are returned. The maximum number of expressions is 5.\n         */\n        orderby?: string;\n        /**\n         * Limits the number of items returned from a collection. The maximum value is 100.\n         */\n        top?: number;\n        /**\n         * Excludes the specified number of items of the queried collection from the result.\n         */\n        skip?: number;\n        /**\n         * Indicates whether the total count of items within a collection are returned in the result.\n         */\n        count?: boolean;\n    };\n    url: '/api/v1/odata/DocumentTypes/$count';\n};\n\nexport type ApiVVersionApiVersionOdataDocumentTypesCountResponses = {\n    /**\n     * OK\n     */\n    200: Array<DocumentType>;\n};\n\nexport type ApiVVersionApiVersionOdataDocumentTypesCountResponse = ApiVVersionApiVersionOdataDocumentTypesCountResponses[keyof ApiVVersionApiVersionOdataDocumentTypesCountResponses];\n\nexport type PostApiV1FeedbackData = {\n    body?: SendFeedbackRequest;\n    path?: never;\n    query?: never;\n    url: '/api/v1/feedback';\n};\n\nexport type PostApiV1FeedbackResponses = {\n    /**\n     * OK\n     */\n    200: unknown;\n};\n\nexport type PostApiV1InvitationsData = {\n    body?: InvitationCreateDto;\n    path?: never;\n    query?: never;\n    url: '/api/v1/invitations';\n};\n\nexport type PostApiV1InvitationsResponses = {\n    /**\n     * OK\n     */\n    200: Invitation;\n};\n\nexport type PostApiV1InvitationsResponse = PostApiV1InvitationsResponses[keyof PostApiV1InvitationsResponses];\n\nexport type PostApiV1InvitationsByIdAcceptData = {\n    body?: InvitationAcceptDto;\n    path: {\n        id: number;\n    };\n    query?: never;\n    url: '/api/v1/invitations/{id}/accept';\n};\n\nexport type PostApiV1InvitationsByIdAcceptResponses = {\n    /**\n     * OK\n     */\n    200: unknown;\n};\n\nexport type PostApiV1InvitationsByIdRejectData = {\n    body?: never;\n    path: {\n        id: number;\n    };\n    query?: never;\n    url: '/api/v1/invitations/{id}/reject';\n};\n\nexport type PostApiV1InvitationsByIdRejectResponses = {\n    /**\n     * OK\n     */\n    200: unknown;\n};\n\nexport type DeleteApiV1InvitationsByIdData = {\n    body?: never;\n    path: {\n        id: number;\n    };\n    query?: never;\n    url: '/api/v1/invitations/{id}';\n};\n\nexport type DeleteApiV1InvitationsByIdResponses = {\n    /**\n     * OK\n     */\n    200: unknown;\n};\n\nexport type PatchApiV1InvitationsByIdData = {\n    body?: InvitationUpdateDto;\n    path: {\n        id: number;\n    };\n    query?: never;\n    url: '/api/v1/invitations/{id}';\n};\n\nexport type PatchApiV1InvitationsByIdResponses = {\n    /**\n     * OK\n     */\n    200: Invitation;\n};\n\nexport type PatchApiV1InvitationsByIdResponse = PatchApiV1InvitationsByIdResponses[keyof PatchApiV1InvitationsByIdResponses];\n\nexport type ApiVVersionApiVersionOdataInvitationsData = {\n    body?: never;\n    path?: never;\n    query?: {\n        /**\n         * Limits the properties returned in the result.\n         */\n        select?: string;\n        /**\n         * Indicates the related entities to be represented inline. The maximum depth is 2.\n         */\n        expand?: string;\n        /**\n         * Restricts the set of items returned. The maximum number of expressions is 100. The allowed functions are: allfunctions.\n         */\n        filter?: string;\n        /**\n         * Specifies the order in which items are returned. The maximum number of expressions is 5.\n         */\n        orderby?: string;\n        /**\n         * Limits the number of items returned from a collection. The maximum value is 100.\n         */\n        top?: number;\n        /**\n         * Excludes the specified number of items of the queried collection from the result.\n         */\n        skip?: number;\n        /**\n         * Indicates whether the total count of items within a collection are returned in the result.\n         */\n        count?: boolean;\n    };\n    url: '/api/v1/odata/Invitations';\n};\n\nexport type ApiVVersionApiVersionOdataInvitationsResponses = {\n    /**\n     * OK\n     */\n    200: Array<Invitation>;\n};\n\nexport type ApiVVersionApiVersionOdataInvitationsResponse = ApiVVersionApiVersionOdataInvitationsResponses[keyof ApiVVersionApiVersionOdataInvitationsResponses];\n\nexport type ApiVVersionApiVersionOdataInvitationsCountData = {\n    body?: never;\n    path?: never;\n    query?: {\n        /**\n         * Limits the properties returned in the result.\n         */\n        select?: string;\n        /**\n         * Indicates the related entities to be represented inline. The maximum depth is 2.\n         */\n        expand?: string;\n        /**\n         * Restricts the set of items returned. The maximum number of expressions is 100. The allowed functions are: allfunctions.\n         */\n        filter?: string;\n        /**\n         * Specifies the order in which items are returned. The maximum number of expressions is 5.\n         */\n        orderby?: string;\n        /**\n         * Limits the number of items returned from a collection. The maximum value is 100.\n         */\n        top?: number;\n        /**\n         * Excludes the specified number of items of the queried collection from the result.\n         */\n        skip?: number;\n        /**\n         * Indicates whether the total count of items within a collection are returned in the result.\n         */\n        count?: boolean;\n    };\n    url: '/api/v1/odata/Invitations/$count';\n};\n\nexport type ApiVVersionApiVersionOdataInvitationsCountResponses = {\n    /**\n     * OK\n     */\n    200: Array<Invitation>;\n};\n\nexport type ApiVVersionApiVersionOdataInvitationsCountResponse = ApiVVersionApiVersionOdataInvitationsCountResponses[keyof ApiVVersionApiVersionOdataInvitationsCountResponses];\n\nexport type PostApiV1InvoicesData = {\n    body?: InvoiceCreateDto;\n    path?: never;\n    query?: never;\n    url: '/api/v1/invoices';\n};\n\nexport type PostApiV1InvoicesResponses = {\n    /**\n     * OK\n     */\n    200: Invoice;\n};\n\nexport type PostApiV1InvoicesResponse = PostApiV1InvoicesResponses[keyof PostApiV1InvoicesResponses];\n\nexport type DeleteApiV1InvoicesByIdData = {\n    body?: never;\n    path: {\n        id: number;\n    };\n    query?: never;\n    url: '/api/v1/invoices/{id}';\n};\n\nexport type DeleteApiV1InvoicesByIdResponses = {\n    /**\n     * OK\n     */\n    200: unknown;\n};\n\nexport type PatchApiV1InvoicesByIdData = {\n    body?: InvoiceUpdateDto;\n    path: {\n        id: number;\n    };\n    query?: never;\n    url: '/api/v1/invoices/{id}';\n};\n\nexport type PatchApiV1InvoicesByIdResponses = {\n    /**\n     * OK\n     */\n    200: Invoice;\n};\n\nexport type PatchApiV1InvoicesByIdResponse = PatchApiV1InvoicesByIdResponses[keyof PatchApiV1InvoicesByIdResponses];\n\nexport type GetApiV1InvoicesByIdPreviewData = {\n    body?: never;\n    path: {\n        id: number;\n    };\n    query?: never;\n    url: '/api/v1/invoices/{id}/preview';\n};\n\nexport type GetApiV1InvoicesByIdPreviewResponses = {\n    /**\n     * OK\n     */\n    200: unknown;\n};\n\nexport type PostApiV1InvoicesByIdSendData = {\n    body?: InvoiceSendDto;\n    path: {\n        id: number;\n    };\n    query?: never;\n    url: '/api/v1/invoices/{id}/send';\n};\n\nexport type PostApiV1InvoicesByIdSendResponses = {\n    /**\n     * OK\n     */\n    200: Invoice;\n};\n\nexport type PostApiV1InvoicesByIdSendResponse = PostApiV1InvoicesByIdSendResponses[keyof PostApiV1InvoicesByIdSendResponses];\n\nexport type PostApiV1InvoicesByIdSnapshotData = {\n    body?: never;\n    path: {\n        id: number;\n    };\n    query?: never;\n    url: '/api/v1/invoices/{id}/snapshot';\n};\n\nexport type PostApiV1InvoicesByIdSnapshotResponses = {\n    /**\n     * OK\n     */\n    200: Invoice;\n};\n\nexport type PostApiV1InvoicesByIdSnapshotResponse = PostApiV1InvoicesByIdSnapshotResponses[keyof PostApiV1InvoicesByIdSnapshotResponses];\n\nexport type ApiVVersionApiVersionOdataInvoicesData = {\n    body?: never;\n    path?: never;\n    query?: {\n        /**\n         * Limits the properties returned in the result.\n         */\n        select?: string;\n        /**\n         * Indicates the related entities to be represented inline. The maximum depth is 2.\n         */\n        expand?: string;\n        /**\n         * Restricts the set of items returned. The maximum number of expressions is 100. The allowed functions are: allfunctions.\n         */\n        filter?: string;\n        /**\n         * Specifies the order in which items are returned. The maximum number of expressions is 5.\n         */\n        orderby?: string;\n        /**\n         * Limits the number of items returned from a collection. The maximum value is 100.\n         */\n        top?: number;\n        /**\n         * Excludes the specified number of items of the queried collection from the result.\n         */\n        skip?: number;\n        /**\n         * Indicates whether the total count of items within a collection are returned in the result.\n         */\n        count?: boolean;\n    };\n    url: '/api/v1/odata/Invoices';\n};\n\nexport type ApiVVersionApiVersionOdataInvoicesResponses = {\n    /**\n     * OK\n     */\n    200: Array<Invoice>;\n};\n\nexport type ApiVVersionApiVersionOdataInvoicesResponse = ApiVVersionApiVersionOdataInvoicesResponses[keyof ApiVVersionApiVersionOdataInvoicesResponses];\n\nexport type ApiVVersionApiVersionOdataInvoicesCountData = {\n    body?: never;\n    path?: never;\n    query?: {\n        /**\n         * Limits the properties returned in the result.\n         */\n        select?: string;\n        /**\n         * Indicates the related entities to be represented inline. The maximum depth is 2.\n         */\n        expand?: string;\n        /**\n         * Restricts the set of items returned. The maximum number of expressions is 100. The allowed functions are: allfunctions.\n         */\n        filter?: string;\n        /**\n         * Specifies the order in which items are returned. The maximum number of expressions is 5.\n         */\n        orderby?: string;\n        /**\n         * Limits the number of items returned from a collection. The maximum value is 100.\n         */\n        top?: number;\n        /**\n         * Excludes the specified number of items of the queried collection from the result.\n         */\n        skip?: number;\n        /**\n         * Indicates whether the total count of items within a collection are returned in the result.\n         */\n        count?: boolean;\n    };\n    url: '/api/v1/odata/Invoices/$count';\n};\n\nexport type ApiVVersionApiVersionOdataInvoicesCountResponses = {\n    /**\n     * OK\n     */\n    200: Array<Invoice>;\n};\n\nexport type ApiVVersionApiVersionOdataInvoicesCountResponse = ApiVVersionApiVersionOdataInvoicesCountResponses[keyof ApiVVersionApiVersionOdataInvoicesCountResponses];\n\nexport type PutApiV1InvoiceSettingsData = {\n    body?: InvoiceSettingUpsertDto;\n    path?: never;\n    query?: never;\n    url: '/api/v1/invoice-settings';\n};\n\nexport type PutApiV1InvoiceSettingsResponses = {\n    /**\n     * OK\n     */\n    200: InvoiceSetting;\n};\n\nexport type PutApiV1InvoiceSettingsResponse = PutApiV1InvoiceSettingsResponses[keyof PutApiV1InvoiceSettingsResponses];\n\nexport type ApiVVersionApiVersionOdataInvoiceSettingsData = {\n    body?: never;\n    path?: never;\n    query?: {\n        /**\n         * Limits the properties returned in the result.\n         */\n        select?: string;\n        /**\n         * Indicates the related entities to be represented inline. The maximum depth is 2.\n         */\n        expand?: string;\n        /**\n         * Restricts the set of items returned. The maximum number of expressions is 100. The allowed functions are: allfunctions.\n         */\n        filter?: string;\n        /**\n         * Specifies the order in which items are returned. The maximum number of expressions is 5.\n         */\n        orderby?: string;\n        /**\n         * Limits the number of items returned from a collection. The maximum value is 100.\n         */\n        top?: number;\n        /**\n         * Excludes the specified number of items of the queried collection from the result.\n         */\n        skip?: number;\n        /**\n         * Indicates whether the total count of items within a collection are returned in the result.\n         */\n        count?: boolean;\n    };\n    url: '/api/v1/odata/InvoiceSettings';\n};\n\nexport type ApiVVersionApiVersionOdataInvoiceSettingsResponses = {\n    /**\n     * OK\n     */\n    200: Array<InvoiceSetting>;\n};\n\nexport type ApiVVersionApiVersionOdataInvoiceSettingsResponse = ApiVVersionApiVersionOdataInvoiceSettingsResponses[keyof ApiVVersionApiVersionOdataInvoiceSettingsResponses];\n\nexport type ApiVVersionApiVersionOdataInvoiceSettingsCountData = {\n    body?: never;\n    path?: never;\n    query?: {\n        /**\n         * Limits the properties returned in the result.\n         */\n        select?: string;\n        /**\n         * Indicates the related entities to be represented inline. The maximum depth is 2.\n         */\n        expand?: string;\n        /**\n         * Restricts the set of items returned. The maximum number of expressions is 100. The allowed functions are: allfunctions.\n         */\n        filter?: string;\n        /**\n         * Specifies the order in which items are returned. The maximum number of expressions is 5.\n         */\n        orderby?: string;\n        /**\n         * Limits the number of items returned from a collection. The maximum value is 100.\n         */\n        top?: number;\n        /**\n         * Excludes the specified number of items of the queried collection from the result.\n         */\n        skip?: number;\n        /**\n         * Indicates whether the total count of items within a collection are returned in the result.\n         */\n        count?: boolean;\n    };\n    url: '/api/v1/odata/InvoiceSettings/$count';\n};\n\nexport type ApiVVersionApiVersionOdataInvoiceSettingsCountResponses = {\n    /**\n     * OK\n     */\n    200: Array<InvoiceSetting>;\n};\n\nexport type ApiVVersionApiVersionOdataInvoiceSettingsCountResponse = ApiVVersionApiVersionOdataInvoiceSettingsCountResponses[keyof ApiVVersionApiVersionOdataInvoiceSettingsCountResponses];\n\nexport type ApiVVersionApiVersionOdataLicensesData = {\n    body?: never;\n    path?: never;\n    query?: {\n        /**\n         * Limits the properties returned in the result.\n         */\n        select?: string;\n        /**\n         * Indicates the related entities to be represented inline. The maximum depth is 2.\n         */\n        expand?: string;\n        /**\n         * Restricts the set of items returned. The maximum number of expressions is 100. The allowed functions are: allfunctions.\n         */\n        filter?: string;\n        /**\n         * Specifies the order in which items are returned. The maximum number of expressions is 5.\n         */\n        orderby?: string;\n        /**\n         * Limits the number of items returned from a collection. The maximum value is 100.\n         */\n        top?: number;\n        /**\n         * Excludes the specified number of items of the queried collection from the result.\n         */\n        skip?: number;\n        /**\n         * Indicates whether the total count of items within a collection are returned in the result.\n         */\n        count?: boolean;\n    };\n    url: '/api/v1/odata/Licenses';\n};\n\nexport type ApiVVersionApiVersionOdataLicensesResponses = {\n    /**\n     * OK\n     */\n    200: Array<LicenseDto>;\n};\n\nexport type ApiVVersionApiVersionOdataLicensesResponse = ApiVVersionApiVersionOdataLicensesResponses[keyof ApiVVersionApiVersionOdataLicensesResponses];\n\nexport type ApiVVersionApiVersionOdataLicensesCountData = {\n    body?: never;\n    path?: never;\n    query?: {\n        /**\n         * Limits the properties returned in the result.\n         */\n        select?: string;\n        /**\n         * Indicates the related entities to be represented inline. The maximum depth is 2.\n         */\n        expand?: string;\n        /**\n         * Restricts the set of items returned. The maximum number of expressions is 100. The allowed functions are: allfunctions.\n         */\n        filter?: string;\n        /**\n         * Specifies the order in which items are returned. The maximum number of expressions is 5.\n         */\n        orderby?: string;\n        /**\n         * Limits the number of items returned from a collection. The maximum value is 100.\n         */\n        top?: number;\n        /**\n         * Excludes the specified number of items of the queried collection from the result.\n         */\n        skip?: number;\n        /**\n         * Indicates whether the total count of items within a collection are returned in the result.\n         */\n        count?: boolean;\n    };\n    url: '/api/v1/odata/Licenses/$count';\n};\n\nexport type ApiVVersionApiVersionOdataLicensesCountResponses = {\n    /**\n     * OK\n     */\n    200: Array<LicenseDto>;\n};\n\nexport type ApiVVersionApiVersionOdataLicensesCountResponse = ApiVVersionApiVersionOdataLicensesCountResponses[keyof ApiVVersionApiVersionOdataLicensesCountResponses];\n\nexport type PostApiV1NotificationsTestData = {\n    body?: NotificationsTestSendDto;\n    path?: never;\n    query?: never;\n    url: '/api/v1/notifications/test';\n};\n\nexport type PostApiV1NotificationsTestResponses = {\n    /**\n     * OK\n     */\n    200: unknown;\n};\n\nexport type GetApiV1PersonalDocumentsByIdRawData = {\n    body?: never;\n    path: {\n        id: number;\n    };\n    query?: never;\n    url: '/api/v1/personal-documents/{id}/raw';\n};\n\nexport type GetApiV1PersonalDocumentsByIdRawResponses = {\n    /**\n     * OK\n     */\n    200: unknown;\n    /**\n     * No Content\n     */\n    204: void;\n};\n\nexport type GetApiV1PersonalDocumentsByIdRawResponse = GetApiV1PersonalDocumentsByIdRawResponses[keyof GetApiV1PersonalDocumentsByIdRawResponses];\n\nexport type PostApiV1PersonalDocumentsData = {\n    body?: {\n        File: Blob | File;\n        DocumentName: string;\n    };\n    path?: never;\n    query?: never;\n    url: '/api/v1/personal-documents';\n};\n\nexport type PostApiV1PersonalDocumentsResponses = {\n    /**\n     * OK\n     */\n    200: DocumentPersonal;\n};\n\nexport type PostApiV1PersonalDocumentsResponse = PostApiV1PersonalDocumentsResponses[keyof PostApiV1PersonalDocumentsResponses];\n\nexport type PostApiV1PersonalDocumentsByIdMoveToBusinessData = {\n    body?: DocumentPersonalMoveToBusinessDocumentsDto;\n    path: {\n        id: number;\n    };\n    query?: never;\n    url: '/api/v1/personal-documents/{id}/move-to-business';\n};\n\nexport type PostApiV1PersonalDocumentsByIdMoveToBusinessResponses = {\n    /**\n     * OK\n     */\n    200: unknown;\n};\n\nexport type DeleteApiV1PersonalDocumentsByIdData = {\n    body?: never;\n    path: {\n        id: number;\n    };\n    query?: never;\n    url: '/api/v1/personal-documents/{id}';\n};\n\nexport type DeleteApiV1PersonalDocumentsByIdResponses = {\n    /**\n     * OK\n     */\n    200: DocumentPersonal;\n};\n\nexport type DeleteApiV1PersonalDocumentsByIdResponse = DeleteApiV1PersonalDocumentsByIdResponses[keyof DeleteApiV1PersonalDocumentsByIdResponses];\n\nexport type GetApiV1PersonalDocumentsSummaryData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v1/personal-documents/summary';\n};\n\nexport type GetApiV1PersonalDocumentsSummaryResponses = {\n    /**\n     * OK\n     */\n    200: PersonalDocumentsSummary;\n};\n\nexport type GetApiV1PersonalDocumentsSummaryResponse = GetApiV1PersonalDocumentsSummaryResponses[keyof GetApiV1PersonalDocumentsSummaryResponses];\n\nexport type ApiVVersionApiVersionOdataPersonalDocumentsData = {\n    body?: never;\n    path?: never;\n    query?: {\n        /**\n         * Limits the properties returned in the result.\n         */\n        select?: string;\n        /**\n         * Indicates the related entities to be represented inline. The maximum depth is 2.\n         */\n        expand?: string;\n        /**\n         * Restricts the set of items returned. The maximum number of expressions is 100. The allowed functions are: allfunctions.\n         */\n        filter?: string;\n        /**\n         * Specifies the order in which items are returned. The maximum number of expressions is 5.\n         */\n        orderby?: string;\n        /**\n         * Limits the number of items returned from a collection. The maximum value is 100.\n         */\n        top?: number;\n        /**\n         * Excludes the specified number of items of the queried collection from the result.\n         */\n        skip?: number;\n        /**\n         * Indicates whether the total count of items within a collection are returned in the result.\n         */\n        count?: boolean;\n    };\n    url: '/api/v1/odata/PersonalDocuments';\n};\n\nexport type ApiVVersionApiVersionOdataPersonalDocumentsResponses = {\n    /**\n     * OK\n     */\n    200: Array<DocumentPersonal>;\n};\n\nexport type ApiVVersionApiVersionOdataPersonalDocumentsResponse = ApiVVersionApiVersionOdataPersonalDocumentsResponses[keyof ApiVVersionApiVersionOdataPersonalDocumentsResponses];\n\nexport type ApiVVersionApiVersionOdataPersonalDocumentsCountData = {\n    body?: never;\n    path?: never;\n    query?: {\n        /**\n         * Limits the properties returned in the result.\n         */\n        select?: string;\n        /**\n         * Indicates the related entities to be represented inline. The maximum depth is 2.\n         */\n        expand?: string;\n        /**\n         * Restricts the set of items returned. The maximum number of expressions is 100. The allowed functions are: allfunctions.\n         */\n        filter?: string;\n        /**\n         * Specifies the order in which items are returned. The maximum number of expressions is 5.\n         */\n        orderby?: string;\n        /**\n         * Limits the number of items returned from a collection. The maximum value is 100.\n         */\n        top?: number;\n        /**\n         * Excludes the specified number of items of the queried collection from the result.\n         */\n        skip?: number;\n        /**\n         * Indicates whether the total count of items within a collection are returned in the result.\n         */\n        count?: boolean;\n    };\n    url: '/api/v1/odata/PersonalDocuments/$count';\n};\n\nexport type ApiVVersionApiVersionOdataPersonalDocumentsCountResponses = {\n    /**\n     * OK\n     */\n    200: Array<DocumentPersonal>;\n};\n\nexport type ApiVVersionApiVersionOdataPersonalDocumentsCountResponse = ApiVVersionApiVersionOdataPersonalDocumentsCountResponses[keyof ApiVVersionApiVersionOdataPersonalDocumentsCountResponses];\n\nexport type PostApiV1RecurringTasksData = {\n    body?: RecurringTaskCreateDto;\n    path?: never;\n    query?: never;\n    url: '/api/v1/recurring-tasks';\n};\n\nexport type PostApiV1RecurringTasksResponses = {\n    /**\n     * OK\n     */\n    200: RecurringTask;\n};\n\nexport type PostApiV1RecurringTasksResponse = PostApiV1RecurringTasksResponses[keyof PostApiV1RecurringTasksResponses];\n\nexport type DeleteApiV1RecurringTasksByIdData = {\n    body?: never;\n    path: {\n        id: number;\n    };\n    query?: never;\n    url: '/api/v1/recurring-tasks/{id}';\n};\n\nexport type DeleteApiV1RecurringTasksByIdResponses = {\n    /**\n     * OK\n     */\n    200: unknown;\n};\n\nexport type PatchApiV1RecurringTasksByIdData = {\n    body?: RecurringTaskUpdateDto;\n    path: {\n        id: number;\n    };\n    query?: never;\n    url: '/api/v1/recurring-tasks/{id}';\n};\n\nexport type PatchApiV1RecurringTasksByIdResponses = {\n    /**\n     * OK\n     */\n    200: RecurringTask;\n};\n\nexport type PatchApiV1RecurringTasksByIdResponse = PatchApiV1RecurringTasksByIdResponses[keyof PatchApiV1RecurringTasksByIdResponses];\n\nexport type ApiVVersionApiVersionOdataRecurringTasksData = {\n    body?: never;\n    path?: never;\n    query?: {\n        /**\n         * Limits the properties returned in the result.\n         */\n        select?: string;\n        /**\n         * Indicates the related entities to be represented inline. The maximum depth is 2.\n         */\n        expand?: string;\n        /**\n         * Restricts the set of items returned. The maximum number of expressions is 100. The allowed functions are: allfunctions.\n         */\n        filter?: string;\n        /**\n         * Specifies the order in which items are returned. The maximum number of expressions is 5.\n         */\n        orderby?: string;\n        /**\n         * Limits the number of items returned from a collection. The maximum value is 100.\n         */\n        top?: number;\n        /**\n         * Excludes the specified number of items of the queried collection from the result.\n         */\n        skip?: number;\n        /**\n         * Indicates whether the total count of items within a collection are returned in the result.\n         */\n        count?: boolean;\n    };\n    url: '/api/v1/odata/RecurringTasks';\n};\n\nexport type ApiVVersionApiVersionOdataRecurringTasksResponses = {\n    /**\n     * OK\n     */\n    200: Array<RecurringTask>;\n};\n\nexport type ApiVVersionApiVersionOdataRecurringTasksResponse = ApiVVersionApiVersionOdataRecurringTasksResponses[keyof ApiVVersionApiVersionOdataRecurringTasksResponses];\n\nexport type ApiVVersionApiVersionOdataRecurringTasksCountData = {\n    body?: never;\n    path?: never;\n    query?: {\n        /**\n         * Limits the properties returned in the result.\n         */\n        select?: string;\n        /**\n         * Indicates the related entities to be represented inline. The maximum depth is 2.\n         */\n        expand?: string;\n        /**\n         * Restricts the set of items returned. The maximum number of expressions is 100. The allowed functions are: allfunctions.\n         */\n        filter?: string;\n        /**\n         * Specifies the order in which items are returned. The maximum number of expressions is 5.\n         */\n        orderby?: string;\n        /**\n         * Limits the number of items returned from a collection. The maximum value is 100.\n         */\n        top?: number;\n        /**\n         * Excludes the specified number of items of the queried collection from the result.\n         */\n        skip?: number;\n        /**\n         * Indicates whether the total count of items within a collection are returned in the result.\n         */\n        count?: boolean;\n    };\n    url: '/api/v1/odata/RecurringTasks/$count';\n};\n\nexport type ApiVVersionApiVersionOdataRecurringTasksCountResponses = {\n    /**\n     * OK\n     */\n    200: Array<RecurringTask>;\n};\n\nexport type ApiVVersionApiVersionOdataRecurringTasksCountResponse = ApiVVersionApiVersionOdataRecurringTasksCountResponses[keyof ApiVVersionApiVersionOdataRecurringTasksCountResponses];\n\nexport type GetData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/';\n};\n\nexport type GetResponses = {\n    /**\n     * OK\n     */\n    200: unknown;\n};\n\nexport type PostApiV1TasksData = {\n    body?: TasksCreateDto;\n    path?: never;\n    query?: never;\n    url: '/api/v1/tasks';\n};\n\nexport type PostApiV1TasksResponses = {\n    /**\n     * OK\n     */\n    200: Array<Task>;\n};\n\nexport type PostApiV1TasksResponse = PostApiV1TasksResponses[keyof PostApiV1TasksResponses];\n\nexport type PutApiV1TasksByIdData = {\n    body?: TaskUpdateDto;\n    path: {\n        id: number;\n    };\n    query?: never;\n    url: '/api/v1/tasks/{id}';\n};\n\nexport type PutApiV1TasksByIdResponses = {\n    /**\n     * OK\n     */\n    200: Task;\n};\n\nexport type PutApiV1TasksByIdResponse = PutApiV1TasksByIdResponses[keyof PutApiV1TasksByIdResponses];\n\nexport type PostApiV1TasksByIdSubmitData = {\n    body?: TaskSubmitDto;\n    path: {\n        id: number;\n    };\n    query?: never;\n    url: '/api/v1/tasks/{id}/submit';\n};\n\nexport type PostApiV1TasksByIdSubmitResponses = {\n    /**\n     * OK\n     */\n    200: Task;\n};\n\nexport type PostApiV1TasksByIdSubmitResponse = PostApiV1TasksByIdSubmitResponses[keyof PostApiV1TasksByIdSubmitResponses];\n\nexport type PostApiV1TasksByIdApproveData = {\n    body?: never;\n    path: {\n        id: number;\n    };\n    query?: never;\n    url: '/api/v1/tasks/{id}/approve';\n};\n\nexport type PostApiV1TasksByIdApproveResponses = {\n    /**\n     * OK\n     */\n    200: Task;\n};\n\nexport type PostApiV1TasksByIdApproveResponse = PostApiV1TasksByIdApproveResponses[keyof PostApiV1TasksByIdApproveResponses];\n\nexport type PostApiV1TasksByIdRejectData = {\n    body?: TaskRejectDto;\n    path: {\n        id: number;\n    };\n    query?: never;\n    url: '/api/v1/tasks/{id}/reject';\n};\n\nexport type PostApiV1TasksByIdRejectResponses = {\n    /**\n     * OK\n     */\n    200: Task;\n};\n\nexport type PostApiV1TasksByIdRejectResponse = PostApiV1TasksByIdRejectResponses[keyof PostApiV1TasksByIdRejectResponses];\n\nexport type GetApiV1TasksByIdCommentsData = {\n    body?: never;\n    path: {\n        id: number;\n    };\n    query?: never;\n    url: '/api/v1/tasks/{id}/comments';\n};\n\nexport type GetApiV1TasksByIdCommentsResponses = {\n    /**\n     * OK\n     */\n    200: Array<TaskComment>;\n};\n\nexport type GetApiV1TasksByIdCommentsResponse = GetApiV1TasksByIdCommentsResponses[keyof GetApiV1TasksByIdCommentsResponses];\n\nexport type GetApiV1TasksByIdDocumentsData = {\n    body?: never;\n    path: {\n        id: number;\n    };\n    query?: never;\n    url: '/api/v1/tasks/{id}/documents';\n};\n\nexport type GetApiV1TasksByIdDocumentsResponses = {\n    /**\n     * OK\n     */\n    200: Array<DocumentBusiness>;\n};\n\nexport type GetApiV1TasksByIdDocumentsResponse = GetApiV1TasksByIdDocumentsResponses[keyof GetApiV1TasksByIdDocumentsResponses];\n\nexport type ApiVVersionApiVersionOdataTasksData = {\n    body?: never;\n    path?: never;\n    query?: {\n        accountants?: Array<number>;\n        /**\n         * Limits the properties returned in the result.\n         */\n        select?: string;\n        /**\n         * Indicates the related entities to be represented inline. The maximum depth is 2.\n         */\n        expand?: string;\n        /**\n         * Restricts the set of items returned. The maximum number of expressions is 100. The allowed functions are: allfunctions.\n         */\n        filter?: string;\n        /**\n         * Specifies the order in which items are returned. The maximum number of expressions is 5.\n         */\n        orderby?: string;\n        /**\n         * Limits the number of items returned from a collection. The maximum value is 100.\n         */\n        top?: number;\n        /**\n         * Excludes the specified number of items of the queried collection from the result.\n         */\n        skip?: number;\n        /**\n         * Indicates whether the total count of items within a collection are returned in the result.\n         */\n        count?: boolean;\n    };\n    url: '/api/v1/odata/Tasks';\n};\n\nexport type ApiVVersionApiVersionOdataTasksResponses = {\n    /**\n     * OK\n     */\n    200: Array<Task>;\n};\n\nexport type ApiVVersionApiVersionOdataTasksResponse = ApiVVersionApiVersionOdataTasksResponses[keyof ApiVVersionApiVersionOdataTasksResponses];\n\nexport type ApiVVersionApiVersionOdataTasksCountData = {\n    body?: never;\n    path?: never;\n    query?: {\n        accountants?: Array<number>;\n        /**\n         * Limits the properties returned in the result.\n         */\n        select?: string;\n        /**\n         * Indicates the related entities to be represented inline. The maximum depth is 2.\n         */\n        expand?: string;\n        /**\n         * Restricts the set of items returned. The maximum number of expressions is 100. The allowed functions are: allfunctions.\n         */\n        filter?: string;\n        /**\n         * Specifies the order in which items are returned. The maximum number of expressions is 5.\n         */\n        orderby?: string;\n        /**\n         * Limits the number of items returned from a collection. The maximum value is 100.\n         */\n        top?: number;\n        /**\n         * Excludes the specified number of items of the queried collection from the result.\n         */\n        skip?: number;\n        /**\n         * Indicates whether the total count of items within a collection are returned in the result.\n         */\n        count?: boolean;\n    };\n    url: '/api/v1/odata/Tasks/$count';\n};\n\nexport type ApiVVersionApiVersionOdataTasksCountResponses = {\n    /**\n     * OK\n     */\n    200: Array<Task>;\n};\n\nexport type ApiVVersionApiVersionOdataTasksCountResponse = ApiVVersionApiVersionOdataTasksCountResponses[keyof ApiVVersionApiVersionOdataTasksCountResponses];\n\nexport type ApiVVersionApiVersionOdataTasksKeyData = {\n    body?: never;\n    path?: never;\n    query?: {\n        key?: number;\n        /**\n         * Limits the properties returned in the result.\n         */\n        select?: string;\n        /**\n         * Indicates the related entities to be represented inline. The maximum depth is 2.\n         */\n        expand?: string;\n    };\n    url: '/api/v1/odata/Tasks({key})';\n};\n\nexport type ApiVVersionApiVersionOdataTasksKeyResponses = {\n    /**\n     * OK\n     */\n    200: Task;\n};\n\nexport type ApiVVersionApiVersionOdataTasksKeyResponse = ApiVVersionApiVersionOdataTasksKeyResponses[keyof ApiVVersionApiVersionOdataTasksKeyResponses];\n\nexport type ApiVVersionApiVersionOdataTasksKey2Data = {\n    body?: never;\n    path?: never;\n    query?: {\n        key?: number;\n        /**\n         * Limits the properties returned in the result.\n         */\n        select?: string;\n        /**\n         * Indicates the related entities to be represented inline. The maximum depth is 2.\n         */\n        expand?: string;\n    };\n    url: '/api/v1/odata/Tasks/{key}';\n};\n\nexport type ApiVVersionApiVersionOdataTasksKey2Responses = {\n    /**\n     * OK\n     */\n    200: Task;\n};\n\nexport type ApiVVersionApiVersionOdataTasksKey2Response = ApiVVersionApiVersionOdataTasksKey2Responses[keyof ApiVVersionApiVersionOdataTasksKey2Responses];\n\nexport type PostApiV1UserRegisterData = {\n    body: RegisterRequest;\n    path?: never;\n    query?: never;\n    url: '/api/v1/user/register';\n};\n\nexport type PostApiV1UserRegisterErrors = {\n    /**\n     * Bad Request\n     */\n    400: HttpValidationProblemDetails;\n};\n\nexport type PostApiV1UserRegisterError = PostApiV1UserRegisterErrors[keyof PostApiV1UserRegisterErrors];\n\nexport type PostApiV1UserRegisterResponses = {\n    /**\n     * OK\n     */\n    200: unknown;\n};\n\nexport type PostApiV1UserLoginData = {\n    body: LoginRequest;\n    path?: never;\n    query?: {\n        useCookies?: boolean;\n        useSessionCookies?: boolean;\n    };\n    url: '/api/v1/user/login';\n};\n\nexport type PostApiV1UserLoginResponses = {\n    /**\n     * OK\n     */\n    200: AccessTokenResponse;\n};\n\nexport type PostApiV1UserLoginResponse = PostApiV1UserLoginResponses[keyof PostApiV1UserLoginResponses];\n\nexport type PostApiV1UserRefreshData = {\n    body: RefreshRequest;\n    path?: never;\n    query?: never;\n    url: '/api/v1/user/refresh';\n};\n\nexport type PostApiV1UserRefreshResponses = {\n    /**\n     * OK\n     */\n    200: AccessTokenResponse;\n};\n\nexport type PostApiV1UserRefreshResponse = PostApiV1UserRefreshResponses[keyof PostApiV1UserRefreshResponses];\n\nexport type MapIdentityApiApiVVersionApiVersionUserConfirmEmailData = {\n    body?: never;\n    path?: never;\n    query: {\n        userId: string;\n        code: string;\n        changedEmail?: string;\n    };\n    url: '/api/v1/user/confirmEmail';\n};\n\nexport type MapIdentityApiApiVVersionApiVersionUserConfirmEmailResponses = {\n    /**\n     * OK\n     */\n    200: unknown;\n};\n\nexport type PostApiV1UserResendConfirmationEmailData = {\n    body: ResendConfirmationEmailRequest;\n    path?: never;\n    query?: never;\n    url: '/api/v1/user/resendConfirmationEmail';\n};\n\nexport type PostApiV1UserResendConfirmationEmailResponses = {\n    /**\n     * OK\n     */\n    200: unknown;\n};\n\nexport type PostApiV1UserForgotPasswordData = {\n    body: ForgotPasswordRequest;\n    path?: never;\n    query?: never;\n    url: '/api/v1/user/forgotPassword';\n};\n\nexport type PostApiV1UserForgotPasswordErrors = {\n    /**\n     * Bad Request\n     */\n    400: HttpValidationProblemDetails;\n};\n\nexport type PostApiV1UserForgotPasswordError = PostApiV1UserForgotPasswordErrors[keyof PostApiV1UserForgotPasswordErrors];\n\nexport type PostApiV1UserForgotPasswordResponses = {\n    /**\n     * OK\n     */\n    200: unknown;\n};\n\nexport type PostApiV1UserResetPasswordData = {\n    body: ResetPasswordRequest;\n    path?: never;\n    query?: never;\n    url: '/api/v1/user/resetPassword';\n};\n\nexport type PostApiV1UserResetPasswordErrors = {\n    /**\n     * Bad Request\n     */\n    400: HttpValidationProblemDetails;\n};\n\nexport type PostApiV1UserResetPasswordError = PostApiV1UserResetPasswordErrors[keyof PostApiV1UserResetPasswordErrors];\n\nexport type PostApiV1UserResetPasswordResponses = {\n    /**\n     * OK\n     */\n    200: unknown;\n};\n\nexport type PostApiV1UserManage2FaData = {\n    body: TwoFactorRequest;\n    path?: never;\n    query?: never;\n    url: '/api/v1/user/manage/2fa';\n};\n\nexport type PostApiV1UserManage2FaErrors = {\n    /**\n     * Bad Request\n     */\n    400: HttpValidationProblemDetails;\n    /**\n     * Not Found\n     */\n    404: unknown;\n};\n\nexport type PostApiV1UserManage2FaError = PostApiV1UserManage2FaErrors[keyof PostApiV1UserManage2FaErrors];\n\nexport type PostApiV1UserManage2FaResponses = {\n    /**\n     * OK\n     */\n    200: TwoFactorResponse;\n};\n\nexport type PostApiV1UserManage2FaResponse = PostApiV1UserManage2FaResponses[keyof PostApiV1UserManage2FaResponses];\n\nexport type GetApiV1UserManageInfoData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v1/user/manage/info';\n};\n\nexport type GetApiV1UserManageInfoErrors = {\n    /**\n     * Bad Request\n     */\n    400: HttpValidationProblemDetails;\n    /**\n     * Not Found\n     */\n    404: unknown;\n};\n\nexport type GetApiV1UserManageInfoError = GetApiV1UserManageInfoErrors[keyof GetApiV1UserManageInfoErrors];\n\nexport type GetApiV1UserManageInfoResponses = {\n    /**\n     * OK\n     */\n    200: InfoResponse;\n};\n\nexport type GetApiV1UserManageInfoResponse = GetApiV1UserManageInfoResponses[keyof GetApiV1UserManageInfoResponses];\n\nexport type PostApiV1UserManageInfoData = {\n    body: InfoRequest;\n    path?: never;\n    query?: never;\n    url: '/api/v1/user/manage/info';\n};\n\nexport type PostApiV1UserManageInfoErrors = {\n    /**\n     * Bad Request\n     */\n    400: HttpValidationProblemDetails;\n    /**\n     * Not Found\n     */\n    404: unknown;\n};\n\nexport type PostApiV1UserManageInfoError = PostApiV1UserManageInfoErrors[keyof PostApiV1UserManageInfoErrors];\n\nexport type PostApiV1UserManageInfoResponses = {\n    /**\n     * OK\n     */\n    200: InfoResponse;\n};\n\nexport type PostApiV1UserManageInfoResponse = PostApiV1UserManageInfoResponses[keyof PostApiV1UserManageInfoResponses];\n\nexport type PostApiV1UserLogoutData = {\n    body?: unknown;\n    path?: never;\n    query?: never;\n    url: '/api/v1/user/logout';\n};\n\nexport type PostApiV1UserLogoutResponses = {\n    /**\n     * OK\n     */\n    200: unknown;\n};\n\nexport type GetApiV1UserDocumentsSummaryData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v1/user/documents-summary';\n};\n\nexport type GetApiV1UserDocumentsSummaryResponses = {\n    /**\n     * OK\n     */\n    200: PersonalDocumentsSummary;\n};\n\nexport type GetApiV1UserDocumentsSummaryResponse = GetApiV1UserDocumentsSummaryResponses[keyof GetApiV1UserDocumentsSummaryResponses];\n\nexport type DeleteApiV1UserData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v1/user';\n};\n\nexport type DeleteApiV1UserResponses = {\n    /**\n     * OK\n     */\n    200: unknown;\n};\n\nexport type GetApiV1UsersMeData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/api/v1/users/me';\n};\n\nexport type GetApiV1UsersMeResponses = {\n    /**\n     * OK\n     */\n    200: User;\n};\n\nexport type GetApiV1UsersMeResponse = GetApiV1UsersMeResponses[keyof GetApiV1UsersMeResponses];\n\nexport type PatchApiV1UsersByIdData = {\n    body?: UserUpdateDto;\n    path: {\n        id: number;\n    };\n    query?: never;\n    url: '/api/v1/users/{id}';\n};\n\nexport type PatchApiV1UsersByIdResponses = {\n    /**\n     * OK\n     */\n    200: User;\n};\n\nexport type PatchApiV1UsersByIdResponse = PatchApiV1UsersByIdResponses[keyof PatchApiV1UsersByIdResponses];\n"
  },
  {
    "path": "packages/openapi-ts-tests/sdks/__snapshots__/opencode/export-all/client/client.gen.ts",
    "content": "// 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 (options: RequestOptions) => {\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 url = buildUrl(opts);\n\n    return { opts, url };\n  };\n\n  const request: Client['request'] = async (options) => {\n    // @ts-expect-error\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"
  },
  {
    "path": "packages/openapi-ts-tests/sdks/__snapshots__/opencode/export-all/client/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type { Auth } from '../core/auth.gen';\nexport type { QuerySerializerOptions } from '../core/bodySerializer.gen';\nexport {\n  formDataBodySerializer,\n  jsonBodySerializer,\n  urlSearchParamsBodySerializer,\n} from '../core/bodySerializer.gen';\nexport { buildClientParams } from '../core/params.gen';\nexport { serializeQueryKeyValue } from '../core/queryKeySerializer.gen';\nexport { createClient } from './client.gen';\nexport type {\n  Client,\n  ClientOptions,\n  Config,\n  CreateClientConfig,\n  Options,\n  RequestOptions,\n  RequestResult,\n  ResolvedRequestOptions,\n  ResponseStyle,\n  TDataShape,\n} from './types.gen';\nexport { createConfig, mergeHeaders } from './utils.gen';\n"
  },
  {
    "path": "packages/openapi-ts-tests/sdks/__snapshots__/opencode/export-all/client/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { Auth } from '../core/auth.gen';\nimport type {\n  ServerSentEventsOptions,\n  ServerSentEventsResult,\n} from '../core/serverSentEvents.gen';\nimport type { Client as CoreClient, Config as CoreConfig } from '../core/types.gen';\nimport type { Middleware } from './utils.gen';\n\nexport type ResponseStyle = 'data' | 'fields';\n\nexport interface Config<T extends ClientOptions = ClientOptions>\n  extends Omit<RequestInit, 'body' | 'headers' | 'method'>, CoreConfig {\n  /**\n   * Base URL for all requests made by this client.\n   */\n  baseUrl?: T['baseUrl'];\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   * Please don't use the Fetch client for Next.js applications. The `next`\n   * options won't have any effect.\n   *\n   * Install {@link https://www.npmjs.com/package/@hey-api/client-next `@hey-api/client-next`} instead.\n   */\n  next?: never;\n  /**\n   * Return the response data parsed in a specified format. By default, `auto`\n   * will infer the appropriate method from the `Content-Type` response header.\n   * You can override this behavior with any of the {@link Body} methods.\n   * Select `stream` if you don't want to parse response data at all.\n   *\n   * @default 'auto'\n   */\n  parseAs?: 'arrayBuffer' | 'auto' | 'blob' | 'formData' | 'json' | 'stream' | 'text';\n  /**\n   * Should we return only data or multiple fields (data, error, response, etc.)?\n   *\n   * @default 'fields'\n   */\n  responseStyle?: ResponseStyle;\n  /**\n   * Throw an error instead of returning it in the response?\n   *\n   * @default false\n   */\n  throwOnError?: T['throwOnError'];\n}\n\nexport interface RequestOptions<\n  TData = unknown,\n  TResponseStyle extends ResponseStyle = 'fields',\n  ThrowOnError extends boolean = boolean,\n  Url extends string = string,\n>\n  extends\n    Config<{\n      responseStyle: TResponseStyle;\n      throwOnError: ThrowOnError;\n    }>,\n    Pick<\n      ServerSentEventsOptions<TData>,\n      | 'onRequest'\n      | 'onSseError'\n      | 'onSseEvent'\n      | 'sseDefaultRetryDelay'\n      | 'sseMaxRetryAttempts'\n      | 'sseMaxRetryDelay'\n    > {\n  /**\n   * Any body that you want to add to your request.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/fetch#body}\n   */\n  body?: unknown;\n  path?: Record<string, unknown>;\n  query?: Record<string, unknown>;\n  /**\n   * Security mechanism(s) to use for the request.\n   */\n  security?: ReadonlyArray<Auth>;\n  url: Url;\n}\n\nexport interface ResolvedRequestOptions<\n  TResponseStyle extends ResponseStyle = 'fields',\n  ThrowOnError extends boolean = boolean,\n  Url extends string = string,\n> extends RequestOptions<unknown, TResponseStyle, ThrowOnError, Url> {\n  serializedBody?: string;\n}\n\nexport type RequestResult<\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = boolean,\n  TResponseStyle extends ResponseStyle = 'fields',\n> = ThrowOnError extends true\n  ? Promise<\n      TResponseStyle extends 'data'\n        ? TData extends Record<string, unknown>\n          ? TData[keyof TData]\n          : TData\n        : {\n            data: TData extends Record<string, unknown> ? TData[keyof TData] : TData;\n            request: Request;\n            response: Response;\n          }\n    >\n  : Promise<\n      TResponseStyle extends 'data'\n        ? (TData extends Record<string, unknown> ? TData[keyof TData] : TData) | undefined\n        : (\n            | {\n                data: TData extends Record<string, unknown> ? TData[keyof TData] : TData;\n                error: undefined;\n              }\n            | {\n                data: undefined;\n                error: TError extends Record<string, unknown> ? TError[keyof TError] : TError;\n              }\n          ) & {\n            request: Request;\n            response: Response;\n          }\n    >;\n\nexport interface ClientOptions {\n  baseUrl?: string;\n  responseStyle?: ResponseStyle;\n  throwOnError?: boolean;\n}\n\ntype MethodFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'>,\n) => RequestResult<TData, TError, ThrowOnError, TResponseStyle>;\n\ntype SseFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'>,\n) => Promise<ServerSentEventsResult<TData, TError>>;\n\ntype RequestFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'> &\n    Pick<Required<RequestOptions<TData, TResponseStyle, ThrowOnError>>, 'method'>,\n) => RequestResult<TData, TError, ThrowOnError, TResponseStyle>;\n\ntype BuildUrlFn = <\n  TData extends {\n    body?: unknown;\n    path?: Record<string, unknown>;\n    query?: Record<string, unknown>;\n    url: string;\n  },\n>(\n  options: TData & Options<TData>,\n) => string;\n\nexport type Client = CoreClient<RequestFn, Config, MethodFn, BuildUrlFn, SseFn> & {\n  interceptors: Middleware<Request, Response, unknown, ResolvedRequestOptions>;\n};\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 = ClientOptions> = (\n  override?: Config<ClientOptions & T>,\n) => Config<Required<ClientOptions> & T>;\n\nexport interface TDataShape {\n  body?: unknown;\n  headers?: unknown;\n  path?: unknown;\n  query?: unknown;\n  url: string;\n}\n\ntype OmitKeys<T, K> = Pick<T, Exclude<keyof T, K>>;\n\nexport type Options<\n  TData extends TDataShape = TDataShape,\n  ThrowOnError extends boolean = boolean,\n  TResponse = unknown,\n  TResponseStyle extends ResponseStyle = 'fields',\n> = OmitKeys<\n  RequestOptions<TResponse, TResponseStyle, ThrowOnError>,\n  'body' | 'path' | 'query' | 'url'\n> &\n  ([TData] extends [never] ? unknown : Omit<TData, 'url'>);\n"
  },
  {
    "path": "packages/openapi-ts-tests/sdks/__snapshots__/opencode/export-all/client/utils.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/sdks/__snapshots__/opencode/export-all/client.gen.ts",
    "content": "// 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>());\n"
  },
  {
    "path": "packages/openapi-ts-tests/sdks/__snapshots__/opencode/export-all/core/auth.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/sdks/__snapshots__/opencode/export-all/core/bodySerializer.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/sdks/__snapshots__/opencode/export-all/core/params.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/sdks/__snapshots__/opencode/export-all/core/pathSerializer.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/sdks/__snapshots__/opencode/export-all/core/queryKeySerializer.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\n/**\n * JSON-friendly union that mirrors what Pinia Colada can hash.\n */\nexport type JsonValue =\n  | null\n  | string\n  | number\n  | boolean\n  | JsonValue[]\n  | { [key: string]: JsonValue };\n\n/**\n * Replacer that converts non-JSON values (bigint, Date, etc.) to safe substitutes.\n */\nexport const queryKeyJsonReplacer = (_key: string, value: unknown) => {\n  if (value === undefined || typeof value === 'function' || typeof value === 'symbol') {\n    return undefined;\n  }\n  if (typeof value === 'bigint') {\n    return value.toString();\n  }\n  if (value instanceof Date) {\n    return value.toISOString();\n  }\n  return value;\n};\n\n/**\n * Safely stringifies a value and parses it back into a JsonValue.\n */\nexport const stringifyToJsonValue = (input: unknown): JsonValue | undefined => {\n  try {\n    const json = JSON.stringify(input, queryKeyJsonReplacer);\n    if (json === undefined) {\n      return undefined;\n    }\n    return JSON.parse(json) as JsonValue;\n  } catch {\n    return undefined;\n  }\n};\n\n/**\n * Detects plain objects (including objects with a null prototype).\n */\nconst isPlainObject = (value: unknown): value is Record<string, unknown> => {\n  if (value === null || typeof value !== 'object') {\n    return false;\n  }\n  const prototype = Object.getPrototypeOf(value as object);\n  return prototype === Object.prototype || prototype === null;\n};\n\n/**\n * Turns URLSearchParams into a sorted JSON object for deterministic keys.\n */\nconst serializeSearchParams = (params: URLSearchParams): JsonValue => {\n  const entries = Array.from(params.entries()).sort(([a], [b]) => a.localeCompare(b));\n  const result: Record<string, JsonValue> = {};\n\n  for (const [key, value] of entries) {\n    const existing = result[key];\n    if (existing === undefined) {\n      result[key] = value;\n      continue;\n    }\n\n    if (Array.isArray(existing)) {\n      (existing as string[]).push(value);\n    } else {\n      result[key] = [existing, value];\n    }\n  }\n\n  return result;\n};\n\n/**\n * Normalizes any accepted value into a JSON-friendly shape for query keys.\n */\nexport const serializeQueryKeyValue = (value: unknown): JsonValue | undefined => {\n  if (value === null) {\n    return null;\n  }\n\n  if (typeof value === 'string' || typeof value === 'number' || typeof value === 'boolean') {\n    return value;\n  }\n\n  if (value === undefined || typeof value === 'function' || typeof value === 'symbol') {\n    return undefined;\n  }\n\n  if (typeof value === 'bigint') {\n    return value.toString();\n  }\n\n  if (value instanceof Date) {\n    return value.toISOString();\n  }\n\n  if (Array.isArray(value)) {\n    return stringifyToJsonValue(value);\n  }\n\n  if (typeof URLSearchParams !== 'undefined' && value instanceof URLSearchParams) {\n    return serializeSearchParams(value);\n  }\n\n  if (isPlainObject(value)) {\n    return stringifyToJsonValue(value);\n  }\n\n  return undefined;\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/sdks/__snapshots__/opencode/export-all/core/serverSentEvents.gen.ts",
    "content": "// 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 const 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            // Normalize line endings: CRLF -> LF, then CR -> LF\n            buffer = buffer.replace(/\\r\\n/g, '\\n').replace(/\\r/g, '\\n');\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"
  },
  {
    "path": "packages/openapi-ts-tests/sdks/__snapshots__/opencode/export-all/core/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { Auth, AuthToken } from './auth.gen';\nimport type { BodySerializer, QuerySerializer, QuerySerializerOptions } from './bodySerializer.gen';\n\nexport type HttpMethod =\n  | 'connect'\n  | 'delete'\n  | 'get'\n  | 'head'\n  | 'options'\n  | 'patch'\n  | 'post'\n  | 'put'\n  | 'trace';\n\nexport type Client<\n  RequestFn = never,\n  Config = unknown,\n  MethodFn = never,\n  BuildUrlFn = never,\n  SseFn = never,\n> = {\n  /**\n   * Returns the final request URL.\n   */\n  buildUrl: BuildUrlFn;\n  getConfig: () => Config;\n  request: RequestFn;\n  setConfig: (config: Config) => Config;\n} & {\n  [K in HttpMethod]: MethodFn;\n} & ([SseFn] extends [never] ? { sse?: never } : { sse: { [K in HttpMethod]: SseFn } });\n\nexport interface Config {\n  /**\n   * Auth token or a function returning auth token. The resolved value will be\n   * added to the request payload as defined by its `security` array.\n   */\n  auth?: ((auth: Auth) => Promise<AuthToken> | AuthToken) | AuthToken;\n  /**\n   * A function for serializing request body parameter. By default,\n   * {@link JSON.stringify()} will be used.\n   */\n  bodySerializer?: BodySerializer | null;\n  /**\n   * An object containing any HTTP headers that you want to pre-populate your\n   * `Headers` object with.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/Headers/Headers#init See more}\n   */\n  headers?:\n    | RequestInit['headers']\n    | Record<\n        string,\n        string | number | boolean | (string | number | boolean)[] | null | undefined | unknown\n      >;\n  /**\n   * The request method.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/fetch#method See more}\n   */\n  method?: Uppercase<HttpMethod>;\n  /**\n   * A function for serializing request query parameters. By default, arrays\n   * will be exploded in form style, objects will be exploded in deepObject\n   * style, and reserved characters are percent-encoded.\n   *\n   * This method will have no effect if the native `paramsSerializer()` Axios\n   * API function is used.\n   *\n   * {@link https://swagger.io/docs/specification/serialization/#query View examples}\n   */\n  querySerializer?: QuerySerializer | QuerySerializerOptions;\n  /**\n   * A function validating request data. This is useful if you want to ensure\n   * the request conforms to the desired shape, so it can be safely sent to\n   * the server.\n   */\n  requestValidator?: (data: unknown) => Promise<unknown>;\n  /**\n   * A function transforming response data before it's returned. This is useful\n   * for post-processing data, e.g. converting ISO strings into Date objects.\n   */\n  responseTransformer?: (data: unknown) => Promise<unknown>;\n  /**\n   * A function validating response data. This is useful if you want to ensure\n   * the response conforms to the desired shape, so it can be safely passed to\n   * the transformers and returned to the user.\n   */\n  responseValidator?: (data: unknown) => Promise<unknown>;\n}\n\ntype IsExactlyNeverOrNeverUndefined<T> = [T] extends [never]\n  ? true\n  : [T] extends [never | undefined]\n    ? [undefined] extends [T]\n      ? false\n      : true\n    : false;\n\nexport type OmitNever<T extends Record<string, unknown>> = {\n  [K in keyof T as IsExactlyNeverOrNeverUndefined<T[K]> extends true ? never : K]: T[K];\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/sdks/__snapshots__/opencode/export-all/core/utils.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/sdks/__snapshots__/opencode/export-all/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport * from './sdk.gen';\nexport type * from './types.gen';\n"
  },
  {
    "path": "packages/openapi-ts-tests/sdks/__snapshots__/opencode/export-all/sdk.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport { buildClientParams, type Client, type Options as Options2, type TDataShape } from './client';\nimport { client } from './client.gen';\nimport type { AgentPartInput, AppAgentsResponses, AppLogErrors, AppLogResponses, Auth, AuthSetErrors, AuthSetResponses, CommandListResponses, Config, ConfigGetResponses, ConfigProvidersResponses, ConfigUpdateErrors, ConfigUpdateResponses, EventSubscribeResponses, EventTuiCommandExecute, EventTuiPromptAppend, EventTuiToastShow, FileListResponses, FilePartInput, FileReadResponses, FileStatusResponses, FindFilesResponses, FindSymbolsResponses, FindTextResponses, FormatterStatusResponses, GlobalDisposeResponses, GlobalEventResponses, GlobalHealthResponses, InstanceDisposeResponses, LspStatusResponses, McpAddErrors, McpAddResponses, McpAuthAuthenticateErrors, McpAuthAuthenticateResponses, McpAuthCallbackErrors, McpAuthCallbackResponses, McpAuthRemoveErrors, McpAuthRemoveResponses, McpAuthStartErrors, McpAuthStartResponses, McpConnectResponses, McpDisconnectResponses, McpLocalConfig, McpRemoteConfig, McpStatusResponses, Part, PartDeleteErrors, PartDeleteResponses, PartUpdateErrors, PartUpdateResponses, PathGetResponses, PermissionListResponses, PermissionReplyErrors, PermissionReplyResponses, PermissionRespondErrors, PermissionRespondResponses, PermissionRuleset, ProjectCurrentResponses, ProjectListResponses, ProjectUpdateErrors, ProjectUpdateResponses, ProviderAuthResponses, ProviderListResponses, ProviderOauthAuthorizeErrors, ProviderOauthAuthorizeResponses, ProviderOauthCallbackErrors, ProviderOauthCallbackResponses, PtyConnectErrors, PtyConnectResponses, PtyCreateErrors, PtyCreateResponses, PtyGetErrors, PtyGetResponses, PtyListResponses, PtyRemoveErrors, PtyRemoveResponses, PtyUpdateErrors, PtyUpdateResponses, SessionAbortErrors, SessionAbortResponses, SessionChildrenErrors, SessionChildrenResponses, SessionCommandErrors, SessionCommandResponses, SessionCreateErrors, SessionCreateResponses, SessionDeleteErrors, SessionDeleteResponses, SessionDiffErrors, SessionDiffResponses, SessionForkResponses, SessionGetErrors, SessionGetResponses, SessionInitErrors, SessionInitResponses, SessionListResponses, SessionMessageErrors, SessionMessageResponses, SessionMessagesErrors, SessionMessagesResponses, SessionPromptAsyncErrors, SessionPromptAsyncResponses, SessionPromptErrors, SessionPromptResponses, SessionRevertErrors, SessionRevertResponses, SessionShareErrors, SessionShareResponses, SessionShellErrors, SessionShellResponses, SessionStatusErrors, SessionStatusResponses, SessionSummarizeErrors, SessionSummarizeResponses, SessionTodoErrors, SessionTodoResponses, SessionUnrevertErrors, SessionUnrevertResponses, SessionUnshareErrors, SessionUnshareResponses, SessionUpdateErrors, SessionUpdateResponses, SubtaskPartInput, TextPartInput, ToolIdsErrors, ToolIdsResponses, ToolListErrors, ToolListResponses, TuiAppendPromptErrors, TuiAppendPromptResponses, TuiClearPromptResponses, TuiControlNextResponses, TuiControlResponseResponses, TuiExecuteCommandErrors, TuiExecuteCommandResponses, TuiOpenHelpResponses, TuiOpenModelsResponses, TuiOpenSessionsResponses, TuiOpenThemesResponses, TuiPublishErrors, TuiPublishResponses, TuiShowToastResponses, TuiSubmitPromptResponses, VcsGetResponses } from './types.gen';\n\nexport type Options<TData extends TDataShape = TDataShape, ThrowOnError extends boolean = boolean> = Options2<TData, ThrowOnError> & {\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 * Get health\n *\n * Get health information about the OpenCode server.\n */\nexport const globalHealth = <ThrowOnError extends boolean = false>(options?: Options<never, ThrowOnError>) => (options?.client ?? client).get<GlobalHealthResponses, unknown, ThrowOnError>({ url: '/global/health', ...options });\n\n/**\n * Get global events\n *\n * Subscribe to global events from the OpenCode system using server-sent events.\n */\nexport const globalEvent = <ThrowOnError extends boolean = false>(options?: Options<never, ThrowOnError>) => (options?.client ?? client).sse.get<GlobalEventResponses, unknown, ThrowOnError>({ url: '/global/event', ...options });\n\n/**\n * Dispose instance\n *\n * Clean up and dispose all OpenCode instances, releasing all resources.\n */\nexport const globalDispose = <ThrowOnError extends boolean = false>(options?: Options<never, ThrowOnError>) => (options?.client ?? client).post<GlobalDisposeResponses, unknown, ThrowOnError>({ url: '/global/dispose', ...options });\n\n/**\n * List all projects\n *\n * Get a list of projects that have been opened with OpenCode.\n */\nexport const projectList = <ThrowOnError extends boolean = false>(parameters?: {\n    directory?: string;\n}, options?: Options<never, ThrowOnError>) => {\n    const params = buildClientParams([parameters], [{ args: [{ in: 'query', key: 'directory' }] }]);\n    return (options?.client ?? client).get<ProjectListResponses, unknown, ThrowOnError>({\n        url: '/project',\n        ...options,\n        ...params\n    });\n};\n\n/**\n * Get current project\n *\n * Retrieve the currently active project that OpenCode is working with.\n */\nexport const projectCurrent = <ThrowOnError extends boolean = false>(parameters?: {\n    directory?: string;\n}, options?: Options<never, ThrowOnError>) => {\n    const params = buildClientParams([parameters], [{ args: [{ in: 'query', key: 'directory' }] }]);\n    return (options?.client ?? client).get<ProjectCurrentResponses, unknown, ThrowOnError>({\n        url: '/project/current',\n        ...options,\n        ...params\n    });\n};\n\n/**\n * Update project\n *\n * Update project properties such as name, icon and color.\n */\nexport const projectUpdate = <ThrowOnError extends boolean = false>(parameters: {\n    projectID: string;\n    directory?: string;\n    name?: string;\n    icon?: {\n        url?: string;\n        color?: string;\n    };\n}, options?: Options<never, ThrowOnError>) => {\n    const params = buildClientParams([parameters], [{ args: [\n                { in: 'path', key: 'projectID' },\n                { in: 'query', key: 'directory' },\n                { in: 'body', key: 'name' },\n                { in: 'body', key: 'icon' }\n            ] }]);\n    return (options?.client ?? client).patch<ProjectUpdateResponses, ProjectUpdateErrors, ThrowOnError>({\n        url: '/project/{projectID}',\n        ...options,\n        ...params,\n        headers: {\n            'Content-Type': 'application/json',\n            ...options?.headers,\n            ...params.headers\n        }\n    });\n};\n\n/**\n * List PTY sessions\n *\n * Get a list of all active pseudo-terminal (PTY) sessions managed by OpenCode.\n */\nexport const ptyList = <ThrowOnError extends boolean = false>(parameters?: {\n    directory?: string;\n}, options?: Options<never, ThrowOnError>) => {\n    const params = buildClientParams([parameters], [{ args: [{ in: 'query', key: 'directory' }] }]);\n    return (options?.client ?? client).get<PtyListResponses, unknown, ThrowOnError>({\n        url: '/pty',\n        ...options,\n        ...params\n    });\n};\n\n/**\n * Create PTY session\n *\n * Create a new pseudo-terminal (PTY) session for running shell commands and processes.\n */\nexport const ptyCreate = <ThrowOnError extends boolean = false>(parameters?: {\n    directory?: string;\n    command?: string;\n    args?: Array<string>;\n    cwd?: string;\n    title?: string;\n    env?: {\n        [key: string]: string;\n    };\n}, options?: Options<never, ThrowOnError>) => {\n    const params = buildClientParams([parameters], [{ args: [\n                { in: 'query', key: 'directory' },\n                { in: 'body', key: 'command' },\n                { in: 'body', key: 'args' },\n                { in: 'body', key: 'cwd' },\n                { in: 'body', key: 'title' },\n                { in: 'body', key: 'env' }\n            ] }]);\n    return (options?.client ?? client).post<PtyCreateResponses, PtyCreateErrors, ThrowOnError>({\n        url: '/pty',\n        ...options,\n        ...params,\n        headers: {\n            'Content-Type': 'application/json',\n            ...options?.headers,\n            ...params.headers\n        }\n    });\n};\n\n/**\n * Remove PTY session\n *\n * Remove and terminate a specific pseudo-terminal (PTY) session.\n */\nexport const ptyRemove = <ThrowOnError extends boolean = false>(parameters: {\n    ptyID: string;\n    directory?: string;\n}, options?: Options<never, ThrowOnError>) => {\n    const params = buildClientParams([parameters], [{ args: [{ in: 'path', key: 'ptyID' }, { in: 'query', key: 'directory' }] }]);\n    return (options?.client ?? client).delete<PtyRemoveResponses, PtyRemoveErrors, ThrowOnError>({\n        url: '/pty/{ptyID}',\n        ...options,\n        ...params\n    });\n};\n\n/**\n * Get PTY session\n *\n * Retrieve detailed information about a specific pseudo-terminal (PTY) session.\n */\nexport const ptyGet = <ThrowOnError extends boolean = false>(parameters: {\n    ptyID: string;\n    directory?: string;\n}, options?: Options<never, ThrowOnError>) => {\n    const params = buildClientParams([parameters], [{ args: [{ in: 'path', key: 'ptyID' }, { in: 'query', key: 'directory' }] }]);\n    return (options?.client ?? client).get<PtyGetResponses, PtyGetErrors, ThrowOnError>({\n        url: '/pty/{ptyID}',\n        ...options,\n        ...params\n    });\n};\n\n/**\n * Update PTY session\n *\n * Update properties of an existing pseudo-terminal (PTY) session.\n */\nexport const ptyUpdate = <ThrowOnError extends boolean = false>(parameters: {\n    ptyID: string;\n    directory?: string;\n    title?: string;\n    size?: {\n        rows: number;\n        cols: number;\n    };\n}, options?: Options<never, ThrowOnError>) => {\n    const params = buildClientParams([parameters], [{ args: [\n                { in: 'path', key: 'ptyID' },\n                { in: 'query', key: 'directory' },\n                { in: 'body', key: 'title' },\n                { in: 'body', key: 'size' }\n            ] }]);\n    return (options?.client ?? client).put<PtyUpdateResponses, PtyUpdateErrors, ThrowOnError>({\n        url: '/pty/{ptyID}',\n        ...options,\n        ...params,\n        headers: {\n            'Content-Type': 'application/json',\n            ...options?.headers,\n            ...params.headers\n        }\n    });\n};\n\n/**\n * Connect to PTY session\n *\n * Establish a WebSocket connection to interact with a pseudo-terminal (PTY) session in real-time.\n */\nexport const ptyConnect = <ThrowOnError extends boolean = false>(parameters: {\n    ptyID: string;\n    directory?: string;\n}, options?: Options<never, ThrowOnError>) => {\n    const params = buildClientParams([parameters], [{ args: [{ in: 'path', key: 'ptyID' }, { in: 'query', key: 'directory' }] }]);\n    return (options?.client ?? client).get<PtyConnectResponses, PtyConnectErrors, ThrowOnError>({\n        url: '/pty/{ptyID}/connect',\n        ...options,\n        ...params\n    });\n};\n\n/**\n * Get configuration\n *\n * Retrieve the current OpenCode configuration settings and preferences.\n */\nexport const configGet = <ThrowOnError extends boolean = false>(parameters?: {\n    directory?: string;\n}, options?: Options<never, ThrowOnError>) => {\n    const params = buildClientParams([parameters], [{ args: [{ in: 'query', key: 'directory' }] }]);\n    return (options?.client ?? client).get<ConfigGetResponses, unknown, ThrowOnError>({\n        url: '/config',\n        ...options,\n        ...params\n    });\n};\n\n/**\n * Update configuration\n *\n * Update OpenCode configuration settings and preferences.\n */\nexport const configUpdate = <ThrowOnError extends boolean = false>(parameters?: {\n    directory?: string;\n    config?: Config;\n}, options?: Options<never, ThrowOnError>) => {\n    const params = buildClientParams([parameters], [{ args: [{ in: 'query', key: 'directory' }, { key: 'config', map: 'body' }] }]);\n    return (options?.client ?? client).patch<ConfigUpdateResponses, ConfigUpdateErrors, ThrowOnError>({\n        url: '/config',\n        ...options,\n        ...params,\n        headers: {\n            'Content-Type': 'application/json',\n            ...options?.headers,\n            ...params.headers\n        }\n    });\n};\n\n/**\n * List tool IDs\n *\n * Get a list of all available tool IDs, including both built-in tools and dynamically registered tools.\n */\nexport const toolIds = <ThrowOnError extends boolean = false>(parameters?: {\n    directory?: string;\n}, options?: Options<never, ThrowOnError>) => {\n    const params = buildClientParams([parameters], [{ args: [{ in: 'query', key: 'directory' }] }]);\n    return (options?.client ?? client).get<ToolIdsResponses, ToolIdsErrors, ThrowOnError>({\n        url: '/experimental/tool/ids',\n        ...options,\n        ...params\n    });\n};\n\n/**\n * List tools\n *\n * Get a list of available tools with their JSON schema parameters for a specific provider and model combination.\n */\nexport const toolList = <ThrowOnError extends boolean = false>(parameters: {\n    directory?: string;\n    provider: string;\n    model: string;\n}, options?: Options<never, ThrowOnError>) => {\n    const params = buildClientParams([parameters], [{ args: [\n                { in: 'query', key: 'directory' },\n                { in: 'query', key: 'provider' },\n                { in: 'query', key: 'model' }\n            ] }]);\n    return (options?.client ?? client).get<ToolListResponses, ToolListErrors, ThrowOnError>({\n        url: '/experimental/tool',\n        ...options,\n        ...params\n    });\n};\n\n/**\n * Dispose instance\n *\n * Clean up and dispose the current OpenCode instance, releasing all resources.\n */\nexport const instanceDispose = <ThrowOnError extends boolean = false>(parameters?: {\n    directory?: string;\n}, options?: Options<never, ThrowOnError>) => {\n    const params = buildClientParams([parameters], [{ args: [{ in: 'query', key: 'directory' }] }]);\n    return (options?.client ?? client).post<InstanceDisposeResponses, unknown, ThrowOnError>({\n        url: '/instance/dispose',\n        ...options,\n        ...params\n    });\n};\n\n/**\n * Get paths\n *\n * Retrieve the current working directory and related path information for the OpenCode instance.\n */\nexport const pathGet = <ThrowOnError extends boolean = false>(parameters?: {\n    directory?: string;\n}, options?: Options<never, ThrowOnError>) => {\n    const params = buildClientParams([parameters], [{ args: [{ in: 'query', key: 'directory' }] }]);\n    return (options?.client ?? client).get<PathGetResponses, unknown, ThrowOnError>({\n        url: '/path',\n        ...options,\n        ...params\n    });\n};\n\n/**\n * Get VCS info\n *\n * Retrieve version control system (VCS) information for the current project, such as git branch.\n */\nexport const vcsGet = <ThrowOnError extends boolean = false>(parameters?: {\n    directory?: string;\n}, options?: Options<never, ThrowOnError>) => {\n    const params = buildClientParams([parameters], [{ args: [{ in: 'query', key: 'directory' }] }]);\n    return (options?.client ?? client).get<VcsGetResponses, unknown, ThrowOnError>({\n        url: '/vcs',\n        ...options,\n        ...params\n    });\n};\n\n/**\n * List sessions\n *\n * Get a list of all OpenCode sessions, sorted by most recently updated.\n */\nexport const sessionList = <ThrowOnError extends boolean = false>(parameters?: {\n    directory?: string;\n}, options?: Options<never, ThrowOnError>) => {\n    const params = buildClientParams([parameters], [{ args: [{ in: 'query', key: 'directory' }] }]);\n    return (options?.client ?? client).get<SessionListResponses, unknown, ThrowOnError>({\n        url: '/session',\n        ...options,\n        ...params\n    });\n};\n\n/**\n * Create session\n *\n * Create a new OpenCode session for interacting with AI assistants and managing conversations.\n */\nexport const sessionCreate = <ThrowOnError extends boolean = false>(parameters?: {\n    directory?: string;\n    parentID?: string;\n    title?: string;\n    permission?: PermissionRuleset;\n}, options?: Options<never, ThrowOnError>) => {\n    const params = buildClientParams([parameters], [{ args: [\n                { in: 'query', key: 'directory' },\n                { in: 'body', key: 'parentID' },\n                { in: 'body', key: 'title' },\n                { in: 'body', key: 'permission' }\n            ] }]);\n    return (options?.client ?? client).post<SessionCreateResponses, SessionCreateErrors, ThrowOnError>({\n        url: '/session',\n        ...options,\n        ...params,\n        headers: {\n            'Content-Type': 'application/json',\n            ...options?.headers,\n            ...params.headers\n        }\n    });\n};\n\n/**\n * Get session status\n *\n * Retrieve the current status of all sessions, including active, idle, and completed states.\n */\nexport const sessionStatus = <ThrowOnError extends boolean = false>(parameters?: {\n    directory?: string;\n}, options?: Options<never, ThrowOnError>) => {\n    const params = buildClientParams([parameters], [{ args: [{ in: 'query', key: 'directory' }] }]);\n    return (options?.client ?? client).get<SessionStatusResponses, SessionStatusErrors, ThrowOnError>({\n        url: '/session/status',\n        ...options,\n        ...params\n    });\n};\n\n/**\n * Delete session\n *\n * Delete a session and permanently remove all associated data, including messages and history.\n */\nexport const sessionDelete = <ThrowOnError extends boolean = false>(parameters: {\n    sessionID: string;\n    directory?: string;\n}, options?: Options<never, ThrowOnError>) => {\n    const params = buildClientParams([parameters], [{ args: [{ in: 'path', key: 'sessionID' }, { in: 'query', key: 'directory' }] }]);\n    return (options?.client ?? client).delete<SessionDeleteResponses, SessionDeleteErrors, ThrowOnError>({\n        url: '/session/{sessionID}',\n        ...options,\n        ...params\n    });\n};\n\n/**\n * Get session\n *\n * Retrieve detailed information about a specific OpenCode session.\n */\nexport const sessionGet = <ThrowOnError extends boolean = false>(parameters: {\n    sessionID: string;\n    directory?: string;\n}, options?: Options<never, ThrowOnError>) => {\n    const params = buildClientParams([parameters], [{ args: [{ in: 'path', key: 'sessionID' }, { in: 'query', key: 'directory' }] }]);\n    return (options?.client ?? client).get<SessionGetResponses, SessionGetErrors, ThrowOnError>({\n        url: '/session/{sessionID}',\n        ...options,\n        ...params\n    });\n};\n\n/**\n * Update session\n *\n * Update properties of an existing session, such as title or other metadata.\n */\nexport const sessionUpdate = <ThrowOnError extends boolean = false>(parameters: {\n    sessionID: string;\n    directory?: string;\n    title?: string;\n    time?: {\n        archived?: number;\n    };\n}, options?: Options<never, ThrowOnError>) => {\n    const params = buildClientParams([parameters], [{ args: [\n                { in: 'path', key: 'sessionID' },\n                { in: 'query', key: 'directory' },\n                { in: 'body', key: 'title' },\n                { in: 'body', key: 'time' }\n            ] }]);\n    return (options?.client ?? client).patch<SessionUpdateResponses, SessionUpdateErrors, ThrowOnError>({\n        url: '/session/{sessionID}',\n        ...options,\n        ...params,\n        headers: {\n            'Content-Type': 'application/json',\n            ...options?.headers,\n            ...params.headers\n        }\n    });\n};\n\n/**\n * Get session children\n *\n * Retrieve all child sessions that were forked from the specified parent session.\n */\nexport const sessionChildren = <ThrowOnError extends boolean = false>(parameters: {\n    sessionID: string;\n    directory?: string;\n}, options?: Options<never, ThrowOnError>) => {\n    const params = buildClientParams([parameters], [{ args: [{ in: 'path', key: 'sessionID' }, { in: 'query', key: 'directory' }] }]);\n    return (options?.client ?? client).get<SessionChildrenResponses, SessionChildrenErrors, ThrowOnError>({\n        url: '/session/{sessionID}/children',\n        ...options,\n        ...params\n    });\n};\n\n/**\n * Get session todos\n *\n * Retrieve the todo list associated with a specific session, showing tasks and action items.\n */\nexport const sessionTodo = <ThrowOnError extends boolean = false>(parameters: {\n    sessionID: string;\n    directory?: string;\n}, options?: Options<never, ThrowOnError>) => {\n    const params = buildClientParams([parameters], [{ args: [{ in: 'path', key: 'sessionID' }, { in: 'query', key: 'directory' }] }]);\n    return (options?.client ?? client).get<SessionTodoResponses, SessionTodoErrors, ThrowOnError>({\n        url: '/session/{sessionID}/todo',\n        ...options,\n        ...params\n    });\n};\n\n/**\n * Initialize session\n *\n * Analyze the current application and create an AGENTS.md file with project-specific agent configurations.\n */\nexport const sessionInit = <ThrowOnError extends boolean = false>(parameters: {\n    sessionID: string;\n    directory?: string;\n    modelID: string;\n    providerID: string;\n    messageID: string;\n}, options?: Options<never, ThrowOnError>) => {\n    const params = buildClientParams([parameters], [{ args: [\n                { in: 'path', key: 'sessionID' },\n                { in: 'query', key: 'directory' },\n                { in: 'body', key: 'modelID' },\n                { in: 'body', key: 'providerID' },\n                { in: 'body', key: 'messageID' }\n            ] }]);\n    return (options?.client ?? client).post<SessionInitResponses, SessionInitErrors, ThrowOnError>({\n        url: '/session/{sessionID}/init',\n        ...options,\n        ...params,\n        headers: {\n            'Content-Type': 'application/json',\n            ...options?.headers,\n            ...params.headers\n        }\n    });\n};\n\n/**\n * Fork session\n *\n * Create a new session by forking an existing session at a specific message point.\n */\nexport const sessionFork = <ThrowOnError extends boolean = false>(parameters: {\n    sessionID: string;\n    directory?: string;\n    messageID?: string;\n}, options?: Options<never, ThrowOnError>) => {\n    const params = buildClientParams([parameters], [{ args: [\n                { in: 'path', key: 'sessionID' },\n                { in: 'query', key: 'directory' },\n                { in: 'body', key: 'messageID' }\n            ] }]);\n    return (options?.client ?? client).post<SessionForkResponses, unknown, ThrowOnError>({\n        url: '/session/{sessionID}/fork',\n        ...options,\n        ...params,\n        headers: {\n            'Content-Type': 'application/json',\n            ...options?.headers,\n            ...params.headers\n        }\n    });\n};\n\n/**\n * Abort session\n *\n * Abort an active session and stop any ongoing AI processing or command execution.\n */\nexport const sessionAbort = <ThrowOnError extends boolean = false>(parameters: {\n    sessionID: string;\n    directory?: string;\n}, options?: Options<never, ThrowOnError>) => {\n    const params = buildClientParams([parameters], [{ args: [{ in: 'path', key: 'sessionID' }, { in: 'query', key: 'directory' }] }]);\n    return (options?.client ?? client).post<SessionAbortResponses, SessionAbortErrors, ThrowOnError>({\n        url: '/session/{sessionID}/abort',\n        ...options,\n        ...params\n    });\n};\n\n/**\n * Unshare session\n *\n * Remove the shareable link for a session, making it private again.\n */\nexport const sessionUnshare = <ThrowOnError extends boolean = false>(parameters: {\n    sessionID: string;\n    directory?: string;\n}, options?: Options<never, ThrowOnError>) => {\n    const params = buildClientParams([parameters], [{ args: [{ in: 'path', key: 'sessionID' }, { in: 'query', key: 'directory' }] }]);\n    return (options?.client ?? client).delete<SessionUnshareResponses, SessionUnshareErrors, ThrowOnError>({\n        url: '/session/{sessionID}/share',\n        ...options,\n        ...params\n    });\n};\n\n/**\n * Share session\n *\n * Create a shareable link for a session, allowing others to view the conversation.\n */\nexport const sessionShare = <ThrowOnError extends boolean = false>(parameters: {\n    sessionID: string;\n    directory?: string;\n}, options?: Options<never, ThrowOnError>) => {\n    const params = buildClientParams([parameters], [{ args: [{ in: 'path', key: 'sessionID' }, { in: 'query', key: 'directory' }] }]);\n    return (options?.client ?? client).post<SessionShareResponses, SessionShareErrors, ThrowOnError>({\n        url: '/session/{sessionID}/share',\n        ...options,\n        ...params\n    });\n};\n\n/**\n * Get session diff\n *\n * Get all file changes (diffs) made during this session.\n */\nexport const sessionDiff = <ThrowOnError extends boolean = false>(parameters: {\n    sessionID: string;\n    directory?: string;\n    messageID?: string;\n}, options?: Options<never, ThrowOnError>) => {\n    const params = buildClientParams([parameters], [{ args: [\n                { in: 'path', key: 'sessionID' },\n                { in: 'query', key: 'directory' },\n                { in: 'query', key: 'messageID' }\n            ] }]);\n    return (options?.client ?? client).get<SessionDiffResponses, SessionDiffErrors, ThrowOnError>({\n        url: '/session/{sessionID}/diff',\n        ...options,\n        ...params\n    });\n};\n\n/**\n * Summarize session\n *\n * Generate a concise summary of the session using AI compaction to preserve key information.\n */\nexport const sessionSummarize = <ThrowOnError extends boolean = false>(parameters: {\n    sessionID: string;\n    directory?: string;\n    providerID: string;\n    modelID: string;\n    auto?: boolean;\n}, options?: Options<never, ThrowOnError>) => {\n    const params = buildClientParams([parameters], [{ args: [\n                { in: 'path', key: 'sessionID' },\n                { in: 'query', key: 'directory' },\n                { in: 'body', key: 'providerID' },\n                { in: 'body', key: 'modelID' },\n                { in: 'body', key: 'auto' }\n            ] }]);\n    return (options?.client ?? client).post<SessionSummarizeResponses, SessionSummarizeErrors, ThrowOnError>({\n        url: '/session/{sessionID}/summarize',\n        ...options,\n        ...params,\n        headers: {\n            'Content-Type': 'application/json',\n            ...options?.headers,\n            ...params.headers\n        }\n    });\n};\n\n/**\n * Get session messages\n *\n * Retrieve all messages in a session, including user prompts and AI responses.\n */\nexport const sessionMessages = <ThrowOnError extends boolean = false>(parameters: {\n    sessionID: string;\n    directory?: string;\n    limit?: number;\n}, options?: Options<never, ThrowOnError>) => {\n    const params = buildClientParams([parameters], [{ args: [\n                { in: 'path', key: 'sessionID' },\n                { in: 'query', key: 'directory' },\n                { in: 'query', key: 'limit' }\n            ] }]);\n    return (options?.client ?? client).get<SessionMessagesResponses, SessionMessagesErrors, ThrowOnError>({\n        url: '/session/{sessionID}/message',\n        ...options,\n        ...params\n    });\n};\n\n/**\n * Send message\n *\n * Create and send a new message to a session, streaming the AI response.\n */\nexport const sessionPrompt = <ThrowOnError extends boolean = false>(parameters: {\n    sessionID: string;\n    directory?: string;\n    messageID?: string;\n    model?: {\n        providerID: string;\n        modelID: string;\n    };\n    agent?: string;\n    noReply?: boolean;\n    tools?: {\n        [key: string]: boolean;\n    };\n    system?: string;\n    variant?: string;\n    parts: Array<TextPartInput | FilePartInput | AgentPartInput | SubtaskPartInput>;\n}, options?: Options<never, ThrowOnError>) => {\n    const params = buildClientParams([parameters], [{ args: [\n                { in: 'path', key: 'sessionID' },\n                { in: 'query', key: 'directory' },\n                { in: 'body', key: 'messageID' },\n                { in: 'body', key: 'model' },\n                { in: 'body', key: 'agent' },\n                { in: 'body', key: 'noReply' },\n                { in: 'body', key: 'tools' },\n                { in: 'body', key: 'system' },\n                { in: 'body', key: 'variant' },\n                { in: 'body', key: 'parts' }\n            ] }]);\n    return (options?.client ?? client).post<SessionPromptResponses, SessionPromptErrors, ThrowOnError>({\n        url: '/session/{sessionID}/message',\n        ...options,\n        ...params,\n        headers: {\n            'Content-Type': 'application/json',\n            ...options?.headers,\n            ...params.headers\n        }\n    });\n};\n\n/**\n * Get message\n *\n * Retrieve a specific message from a session by its message ID.\n */\nexport const sessionMessage = <ThrowOnError extends boolean = false>(parameters: {\n    sessionID: string;\n    messageID: string;\n    directory?: string;\n}, options?: Options<never, ThrowOnError>) => {\n    const params = buildClientParams([parameters], [{ args: [\n                { in: 'path', key: 'sessionID' },\n                { in: 'path', key: 'messageID' },\n                { in: 'query', key: 'directory' }\n            ] }]);\n    return (options?.client ?? client).get<SessionMessageResponses, SessionMessageErrors, ThrowOnError>({\n        url: '/session/{sessionID}/message/{messageID}',\n        ...options,\n        ...params\n    });\n};\n\n/**\n * Delete a part from a message\n */\nexport const partDelete = <ThrowOnError extends boolean = false>(parameters: {\n    sessionID: string;\n    messageID: string;\n    partID: string;\n    directory?: string;\n}, options?: Options<never, ThrowOnError>) => {\n    const params = buildClientParams([parameters], [{ args: [\n                { in: 'path', key: 'sessionID' },\n                { in: 'path', key: 'messageID' },\n                { in: 'path', key: 'partID' },\n                { in: 'query', key: 'directory' }\n            ] }]);\n    return (options?.client ?? client).delete<PartDeleteResponses, PartDeleteErrors, ThrowOnError>({\n        url: '/session/{sessionID}/message/{messageID}/part/{partID}',\n        ...options,\n        ...params\n    });\n};\n\n/**\n * Update a part in a message\n */\nexport const partUpdate = <ThrowOnError extends boolean = false>(parameters: {\n    sessionID: string;\n    messageID: string;\n    partID: string;\n    directory?: string;\n    part?: Part;\n}, options?: Options<never, ThrowOnError>) => {\n    const params = buildClientParams([parameters], [{ args: [\n                { in: 'path', key: 'sessionID' },\n                { in: 'path', key: 'messageID' },\n                { in: 'path', key: 'partID' },\n                { in: 'query', key: 'directory' },\n                { key: 'part', map: 'body' }\n            ] }]);\n    return (options?.client ?? client).patch<PartUpdateResponses, PartUpdateErrors, ThrowOnError>({\n        url: '/session/{sessionID}/message/{messageID}/part/{partID}',\n        ...options,\n        ...params,\n        headers: {\n            'Content-Type': 'application/json',\n            ...options?.headers,\n            ...params.headers\n        }\n    });\n};\n\n/**\n * Send async message\n *\n * Create and send a new message to a session asynchronously, starting the session if needed and returning immediately.\n */\nexport const sessionPromptAsync = <ThrowOnError extends boolean = false>(parameters: {\n    sessionID: string;\n    directory?: string;\n    messageID?: string;\n    model?: {\n        providerID: string;\n        modelID: string;\n    };\n    agent?: string;\n    noReply?: boolean;\n    tools?: {\n        [key: string]: boolean;\n    };\n    system?: string;\n    variant?: string;\n    parts: Array<TextPartInput | FilePartInput | AgentPartInput | SubtaskPartInput>;\n}, options?: Options<never, ThrowOnError>) => {\n    const params = buildClientParams([parameters], [{ args: [\n                { in: 'path', key: 'sessionID' },\n                { in: 'query', key: 'directory' },\n                { in: 'body', key: 'messageID' },\n                { in: 'body', key: 'model' },\n                { in: 'body', key: 'agent' },\n                { in: 'body', key: 'noReply' },\n                { in: 'body', key: 'tools' },\n                { in: 'body', key: 'system' },\n                { in: 'body', key: 'variant' },\n                { in: 'body', key: 'parts' }\n            ] }]);\n    return (options?.client ?? client).post<SessionPromptAsyncResponses, SessionPromptAsyncErrors, ThrowOnError>({\n        url: '/session/{sessionID}/prompt_async',\n        ...options,\n        ...params,\n        headers: {\n            'Content-Type': 'application/json',\n            ...options?.headers,\n            ...params.headers\n        }\n    });\n};\n\n/**\n * Send command\n *\n * Send a new command to a session for execution by the AI assistant.\n */\nexport const sessionCommand = <ThrowOnError extends boolean = false>(parameters: {\n    sessionID: string;\n    directory?: string;\n    messageID?: string;\n    agent?: string;\n    model?: string;\n    arguments: string;\n    command: string;\n    variant?: string;\n}, options?: Options<never, ThrowOnError>) => {\n    const params = buildClientParams([parameters], [{ args: [\n                { in: 'path', key: 'sessionID' },\n                { in: 'query', key: 'directory' },\n                { in: 'body', key: 'messageID' },\n                { in: 'body', key: 'agent' },\n                { in: 'body', key: 'model' },\n                { in: 'body', key: 'arguments' },\n                { in: 'body', key: 'command' },\n                { in: 'body', key: 'variant' }\n            ] }]);\n    return (options?.client ?? client).post<SessionCommandResponses, SessionCommandErrors, ThrowOnError>({\n        url: '/session/{sessionID}/command',\n        ...options,\n        ...params,\n        headers: {\n            'Content-Type': 'application/json',\n            ...options?.headers,\n            ...params.headers\n        }\n    });\n};\n\n/**\n * Run shell command\n *\n * Execute a shell command within the session context and return the AI's response.\n */\nexport const sessionShell = <ThrowOnError extends boolean = false>(parameters: {\n    sessionID: string;\n    directory?: string;\n    agent: string;\n    model?: {\n        providerID: string;\n        modelID: string;\n    };\n    command: string;\n}, options?: Options<never, ThrowOnError>) => {\n    const params = buildClientParams([parameters], [{ args: [\n                { in: 'path', key: 'sessionID' },\n                { in: 'query', key: 'directory' },\n                { in: 'body', key: 'agent' },\n                { in: 'body', key: 'model' },\n                { in: 'body', key: 'command' }\n            ] }]);\n    return (options?.client ?? client).post<SessionShellResponses, SessionShellErrors, ThrowOnError>({\n        url: '/session/{sessionID}/shell',\n        ...options,\n        ...params,\n        headers: {\n            'Content-Type': 'application/json',\n            ...options?.headers,\n            ...params.headers\n        }\n    });\n};\n\n/**\n * Revert message\n *\n * Revert a specific message in a session, undoing its effects and restoring the previous state.\n */\nexport const sessionRevert = <ThrowOnError extends boolean = false>(parameters: {\n    sessionID: string;\n    directory?: string;\n    messageID: string;\n    partID?: string;\n}, options?: Options<never, ThrowOnError>) => {\n    const params = buildClientParams([parameters], [{ args: [\n                { in: 'path', key: 'sessionID' },\n                { in: 'query', key: 'directory' },\n                { in: 'body', key: 'messageID' },\n                { in: 'body', key: 'partID' }\n            ] }]);\n    return (options?.client ?? client).post<SessionRevertResponses, SessionRevertErrors, ThrowOnError>({\n        url: '/session/{sessionID}/revert',\n        ...options,\n        ...params,\n        headers: {\n            'Content-Type': 'application/json',\n            ...options?.headers,\n            ...params.headers\n        }\n    });\n};\n\n/**\n * Restore reverted messages\n *\n * Restore all previously reverted messages in a session.\n */\nexport const sessionUnrevert = <ThrowOnError extends boolean = false>(parameters: {\n    sessionID: string;\n    directory?: string;\n}, options?: Options<never, ThrowOnError>) => {\n    const params = buildClientParams([parameters], [{ args: [{ in: 'path', key: 'sessionID' }, { in: 'query', key: 'directory' }] }]);\n    return (options?.client ?? client).post<SessionUnrevertResponses, SessionUnrevertErrors, ThrowOnError>({\n        url: '/session/{sessionID}/unrevert',\n        ...options,\n        ...params\n    });\n};\n\n/**\n * Respond to permission\n *\n * Approve or deny a permission request from the AI assistant.\n *\n * @deprecated\n */\nexport const permissionRespond = <ThrowOnError extends boolean = false>(parameters: {\n    sessionID: string;\n    permissionID: string;\n    directory?: string;\n    response: 'once' | 'always' | 'reject';\n}, options?: Options<never, ThrowOnError>) => {\n    const params = buildClientParams([parameters], [{ args: [\n                { in: 'path', key: 'sessionID' },\n                { in: 'path', key: 'permissionID' },\n                { in: 'query', key: 'directory' },\n                { in: 'body', key: 'response' }\n            ] }]);\n    return (options?.client ?? client).post<PermissionRespondResponses, PermissionRespondErrors, ThrowOnError>({\n        url: '/session/{sessionID}/permissions/{permissionID}',\n        ...options,\n        ...params,\n        headers: {\n            'Content-Type': 'application/json',\n            ...options?.headers,\n            ...params.headers\n        }\n    });\n};\n\n/**\n * Respond to permission request\n *\n * Approve or deny a permission request from the AI assistant.\n */\nexport const permissionReply = <ThrowOnError extends boolean = false>(parameters: {\n    requestID: string;\n    directory?: string;\n    reply: 'once' | 'always' | 'reject';\n}, options?: Options<never, ThrowOnError>) => {\n    const params = buildClientParams([parameters], [{ args: [\n                { in: 'path', key: 'requestID' },\n                { in: 'query', key: 'directory' },\n                { in: 'body', key: 'reply' }\n            ] }]);\n    return (options?.client ?? client).post<PermissionReplyResponses, PermissionReplyErrors, ThrowOnError>({\n        url: '/permission/{requestID}/reply',\n        ...options,\n        ...params,\n        headers: {\n            'Content-Type': 'application/json',\n            ...options?.headers,\n            ...params.headers\n        }\n    });\n};\n\n/**\n * List pending permissions\n *\n * Get all pending permission requests across all sessions.\n */\nexport const permissionList = <ThrowOnError extends boolean = false>(parameters?: {\n    directory?: string;\n}, options?: Options<never, ThrowOnError>) => {\n    const params = buildClientParams([parameters], [{ args: [{ in: 'query', key: 'directory' }] }]);\n    return (options?.client ?? client).get<PermissionListResponses, unknown, ThrowOnError>({\n        url: '/permission',\n        ...options,\n        ...params\n    });\n};\n\n/**\n * List commands\n *\n * Get a list of all available commands in the OpenCode system.\n */\nexport const commandList = <ThrowOnError extends boolean = false>(parameters?: {\n    directory?: string;\n}, options?: Options<never, ThrowOnError>) => {\n    const params = buildClientParams([parameters], [{ args: [{ in: 'query', key: 'directory' }] }]);\n    return (options?.client ?? client).get<CommandListResponses, unknown, ThrowOnError>({\n        url: '/command',\n        ...options,\n        ...params\n    });\n};\n\n/**\n * List config providers\n *\n * Get a list of all configured AI providers and their default models.\n */\nexport const configProviders = <ThrowOnError extends boolean = false>(parameters?: {\n    directory?: string;\n}, options?: Options<never, ThrowOnError>) => {\n    const params = buildClientParams([parameters], [{ args: [{ in: 'query', key: 'directory' }] }]);\n    return (options?.client ?? client).get<ConfigProvidersResponses, unknown, ThrowOnError>({\n        url: '/config/providers',\n        ...options,\n        ...params\n    });\n};\n\n/**\n * List providers\n *\n * Get a list of all available AI providers, including both available and connected ones.\n */\nexport const providerList = <ThrowOnError extends boolean = false>(parameters?: {\n    directory?: string;\n}, options?: Options<never, ThrowOnError>) => {\n    const params = buildClientParams([parameters], [{ args: [{ in: 'query', key: 'directory' }] }]);\n    return (options?.client ?? client).get<ProviderListResponses, unknown, ThrowOnError>({\n        url: '/provider',\n        ...options,\n        ...params\n    });\n};\n\n/**\n * Get provider auth methods\n *\n * Retrieve available authentication methods for all AI providers.\n */\nexport const providerAuth = <ThrowOnError extends boolean = false>(parameters?: {\n    directory?: string;\n}, options?: Options<never, ThrowOnError>) => {\n    const params = buildClientParams([parameters], [{ args: [{ in: 'query', key: 'directory' }] }]);\n    return (options?.client ?? client).get<ProviderAuthResponses, unknown, ThrowOnError>({\n        url: '/provider/auth',\n        ...options,\n        ...params\n    });\n};\n\n/**\n * OAuth authorize\n *\n * Initiate OAuth authorization for a specific AI provider to get an authorization URL.\n */\nexport const providerOauthAuthorize = <ThrowOnError extends boolean = false>(parameters: {\n    providerID: string;\n    directory?: string;\n    method: number;\n}, options?: Options<never, ThrowOnError>) => {\n    const params = buildClientParams([parameters], [{ args: [\n                { in: 'path', key: 'providerID' },\n                { in: 'query', key: 'directory' },\n                { in: 'body', key: 'method' }\n            ] }]);\n    return (options?.client ?? client).post<ProviderOauthAuthorizeResponses, ProviderOauthAuthorizeErrors, ThrowOnError>({\n        url: '/provider/{providerID}/oauth/authorize',\n        ...options,\n        ...params,\n        headers: {\n            'Content-Type': 'application/json',\n            ...options?.headers,\n            ...params.headers\n        }\n    });\n};\n\n/**\n * OAuth callback\n *\n * Handle the OAuth callback from a provider after user authorization.\n */\nexport const providerOauthCallback = <ThrowOnError extends boolean = false>(parameters: {\n    providerID: string;\n    directory?: string;\n    method: number;\n    code?: string;\n}, options?: Options<never, ThrowOnError>) => {\n    const params = buildClientParams([parameters], [{ args: [\n                { in: 'path', key: 'providerID' },\n                { in: 'query', key: 'directory' },\n                { in: 'body', key: 'method' },\n                { in: 'body', key: 'code' }\n            ] }]);\n    return (options?.client ?? client).post<ProviderOauthCallbackResponses, ProviderOauthCallbackErrors, ThrowOnError>({\n        url: '/provider/{providerID}/oauth/callback',\n        ...options,\n        ...params,\n        headers: {\n            'Content-Type': 'application/json',\n            ...options?.headers,\n            ...params.headers\n        }\n    });\n};\n\n/**\n * Find text\n *\n * Search for text patterns across files in the project using ripgrep.\n */\nexport const findText = <ThrowOnError extends boolean = false>(parameters: {\n    directory?: string;\n    pattern: string;\n}, options?: Options<never, ThrowOnError>) => {\n    const params = buildClientParams([parameters], [{ args: [{ in: 'query', key: 'directory' }, { in: 'query', key: 'pattern' }] }]);\n    return (options?.client ?? client).get<FindTextResponses, unknown, ThrowOnError>({\n        url: '/find',\n        ...options,\n        ...params\n    });\n};\n\n/**\n * Find files\n *\n * Search for files or directories by name or pattern in the project directory.\n */\nexport const findFiles = <ThrowOnError extends boolean = false>(parameters: {\n    directory?: string;\n    query: string;\n    dirs?: 'true' | 'false';\n    type?: 'file' | 'directory';\n    limit?: number;\n}, options?: Options<never, ThrowOnError>) => {\n    const params = buildClientParams([parameters], [{ args: [\n                { in: 'query', key: 'directory' },\n                { in: 'query', key: 'query' },\n                { in: 'query', key: 'dirs' },\n                { in: 'query', key: 'type' },\n                { in: 'query', key: 'limit' }\n            ] }]);\n    return (options?.client ?? client).get<FindFilesResponses, unknown, ThrowOnError>({\n        url: '/find/file',\n        ...options,\n        ...params\n    });\n};\n\n/**\n * Find symbols\n *\n * Search for workspace symbols like functions, classes, and variables using LSP.\n */\nexport const findSymbols = <ThrowOnError extends boolean = false>(parameters: {\n    directory?: string;\n    query: string;\n}, options?: Options<never, ThrowOnError>) => {\n    const params = buildClientParams([parameters], [{ args: [{ in: 'query', key: 'directory' }, { in: 'query', key: 'query' }] }]);\n    return (options?.client ?? client).get<FindSymbolsResponses, unknown, ThrowOnError>({\n        url: '/find/symbol',\n        ...options,\n        ...params\n    });\n};\n\n/**\n * List files\n *\n * List files and directories in a specified path.\n */\nexport const fileList = <ThrowOnError extends boolean = false>(parameters: {\n    directory?: string;\n    path: string;\n}, options?: Options<never, ThrowOnError>) => {\n    const params = buildClientParams([parameters], [{ args: [{ in: 'query', key: 'directory' }, { in: 'query', key: 'path' }] }]);\n    return (options?.client ?? client).get<FileListResponses, unknown, ThrowOnError>({\n        url: '/file',\n        ...options,\n        ...params\n    });\n};\n\n/**\n * Read file\n *\n * Read the content of a specified file.\n */\nexport const fileRead = <ThrowOnError extends boolean = false>(parameters: {\n    directory?: string;\n    path: string;\n}, options?: Options<never, ThrowOnError>) => {\n    const params = buildClientParams([parameters], [{ args: [{ in: 'query', key: 'directory' }, { in: 'query', key: 'path' }] }]);\n    return (options?.client ?? client).get<FileReadResponses, unknown, ThrowOnError>({\n        url: '/file/content',\n        ...options,\n        ...params\n    });\n};\n\n/**\n * Get file status\n *\n * Get the git status of all files in the project.\n */\nexport const fileStatus = <ThrowOnError extends boolean = false>(parameters?: {\n    directory?: string;\n}, options?: Options<never, ThrowOnError>) => {\n    const params = buildClientParams([parameters], [{ args: [{ in: 'query', key: 'directory' }] }]);\n    return (options?.client ?? client).get<FileStatusResponses, unknown, ThrowOnError>({\n        url: '/file/status',\n        ...options,\n        ...params\n    });\n};\n\n/**\n * Write log\n *\n * Write a log entry to the server logs with specified level and metadata.\n */\nexport const appLog = <ThrowOnError extends boolean = false>(parameters: {\n    directory?: string;\n    service: string;\n    level: 'debug' | 'info' | 'error' | 'warn';\n    message: string;\n    extra?: {\n        [key: string]: unknown;\n    };\n}, options?: Options<never, ThrowOnError>) => {\n    const params = buildClientParams([parameters], [{ args: [\n                { in: 'query', key: 'directory' },\n                { in: 'body', key: 'service' },\n                { in: 'body', key: 'level' },\n                { in: 'body', key: 'message' },\n                { in: 'body', key: 'extra' }\n            ] }]);\n    return (options?.client ?? client).post<AppLogResponses, AppLogErrors, ThrowOnError>({\n        url: '/log',\n        ...options,\n        ...params,\n        headers: {\n            'Content-Type': 'application/json',\n            ...options?.headers,\n            ...params.headers\n        }\n    });\n};\n\n/**\n * List agents\n *\n * Get a list of all available AI agents in the OpenCode system.\n */\nexport const appAgents = <ThrowOnError extends boolean = false>(parameters?: {\n    directory?: string;\n}, options?: Options<never, ThrowOnError>) => {\n    const params = buildClientParams([parameters], [{ args: [{ in: 'query', key: 'directory' }] }]);\n    return (options?.client ?? client).get<AppAgentsResponses, unknown, ThrowOnError>({\n        url: '/agent',\n        ...options,\n        ...params\n    });\n};\n\n/**\n * Get MCP status\n *\n * Get the status of all Model Context Protocol (MCP) servers.\n */\nexport const mcpStatus = <ThrowOnError extends boolean = false>(parameters?: {\n    directory?: string;\n}, options?: Options<never, ThrowOnError>) => {\n    const params = buildClientParams([parameters], [{ args: [{ in: 'query', key: 'directory' }] }]);\n    return (options?.client ?? client).get<McpStatusResponses, unknown, ThrowOnError>({\n        url: '/mcp',\n        ...options,\n        ...params\n    });\n};\n\n/**\n * Add MCP server\n *\n * Dynamically add a new Model Context Protocol (MCP) server to the system.\n */\nexport const mcpAdd = <ThrowOnError extends boolean = false>(parameters: {\n    directory?: string;\n    name: string;\n    config: McpLocalConfig | McpRemoteConfig;\n}, options?: Options<never, ThrowOnError>) => {\n    const params = buildClientParams([parameters], [{ args: [\n                { in: 'query', key: 'directory' },\n                { in: 'body', key: 'name' },\n                { in: 'body', key: 'config' }\n            ] }]);\n    return (options?.client ?? client).post<McpAddResponses, McpAddErrors, ThrowOnError>({\n        url: '/mcp',\n        ...options,\n        ...params,\n        headers: {\n            'Content-Type': 'application/json',\n            ...options?.headers,\n            ...params.headers\n        }\n    });\n};\n\n/**\n * Remove MCP OAuth\n *\n * Remove OAuth credentials for an MCP server\n */\nexport const mcpAuthRemove = <ThrowOnError extends boolean = false>(parameters: {\n    name: string;\n    directory?: string;\n}, options?: Options<never, ThrowOnError>) => {\n    const params = buildClientParams([parameters], [{ args: [{ in: 'path', key: 'name' }, { in: 'query', key: 'directory' }] }]);\n    return (options?.client ?? client).delete<McpAuthRemoveResponses, McpAuthRemoveErrors, ThrowOnError>({\n        url: '/mcp/{name}/auth',\n        ...options,\n        ...params\n    });\n};\n\n/**\n * Start MCP OAuth\n *\n * Start OAuth authentication flow for a Model Context Protocol (MCP) server.\n */\nexport const mcpAuthStart = <ThrowOnError extends boolean = false>(parameters: {\n    name: string;\n    directory?: string;\n}, options?: Options<never, ThrowOnError>) => {\n    const params = buildClientParams([parameters], [{ args: [{ in: 'path', key: 'name' }, { in: 'query', key: 'directory' }] }]);\n    return (options?.client ?? client).post<McpAuthStartResponses, McpAuthStartErrors, ThrowOnError>({\n        url: '/mcp/{name}/auth',\n        ...options,\n        ...params\n    });\n};\n\n/**\n * Complete MCP OAuth\n *\n * Complete OAuth authentication for a Model Context Protocol (MCP) server using the authorization code.\n */\nexport const mcpAuthCallback = <ThrowOnError extends boolean = false>(parameters: {\n    name: string;\n    directory?: string;\n    code: string;\n}, options?: Options<never, ThrowOnError>) => {\n    const params = buildClientParams([parameters], [{ args: [\n                { in: 'path', key: 'name' },\n                { in: 'query', key: 'directory' },\n                { in: 'body', key: 'code' }\n            ] }]);\n    return (options?.client ?? client).post<McpAuthCallbackResponses, McpAuthCallbackErrors, ThrowOnError>({\n        url: '/mcp/{name}/auth/callback',\n        ...options,\n        ...params,\n        headers: {\n            'Content-Type': 'application/json',\n            ...options?.headers,\n            ...params.headers\n        }\n    });\n};\n\n/**\n * Authenticate MCP OAuth\n *\n * Start OAuth flow and wait for callback (opens browser)\n */\nexport const mcpAuthAuthenticate = <ThrowOnError extends boolean = false>(parameters: {\n    name: string;\n    directory?: string;\n}, options?: Options<never, ThrowOnError>) => {\n    const params = buildClientParams([parameters], [{ args: [{ in: 'path', key: 'name' }, { in: 'query', key: 'directory' }] }]);\n    return (options?.client ?? client).post<McpAuthAuthenticateResponses, McpAuthAuthenticateErrors, ThrowOnError>({\n        url: '/mcp/{name}/auth/authenticate',\n        ...options,\n        ...params\n    });\n};\n\n/**\n * Connect an MCP server\n */\nexport const mcpConnect = <ThrowOnError extends boolean = false>(parameters: {\n    name: string;\n    directory?: string;\n}, options?: Options<never, ThrowOnError>) => {\n    const params = buildClientParams([parameters], [{ args: [{ in: 'path', key: 'name' }, { in: 'query', key: 'directory' }] }]);\n    return (options?.client ?? client).post<McpConnectResponses, unknown, ThrowOnError>({\n        url: '/mcp/{name}/connect',\n        ...options,\n        ...params\n    });\n};\n\n/**\n * Disconnect an MCP server\n */\nexport const mcpDisconnect = <ThrowOnError extends boolean = false>(parameters: {\n    name: string;\n    directory?: string;\n}, options?: Options<never, ThrowOnError>) => {\n    const params = buildClientParams([parameters], [{ args: [{ in: 'path', key: 'name' }, { in: 'query', key: 'directory' }] }]);\n    return (options?.client ?? client).post<McpDisconnectResponses, unknown, ThrowOnError>({\n        url: '/mcp/{name}/disconnect',\n        ...options,\n        ...params\n    });\n};\n\n/**\n * Get LSP status\n *\n * Get LSP server status\n */\nexport const lspStatus = <ThrowOnError extends boolean = false>(parameters?: {\n    directory?: string;\n}, options?: Options<never, ThrowOnError>) => {\n    const params = buildClientParams([parameters], [{ args: [{ in: 'query', key: 'directory' }] }]);\n    return (options?.client ?? client).get<LspStatusResponses, unknown, ThrowOnError>({\n        url: '/lsp',\n        ...options,\n        ...params\n    });\n};\n\n/**\n * Get formatter status\n *\n * Get formatter status\n */\nexport const formatterStatus = <ThrowOnError extends boolean = false>(parameters?: {\n    directory?: string;\n}, options?: Options<never, ThrowOnError>) => {\n    const params = buildClientParams([parameters], [{ args: [{ in: 'query', key: 'directory' }] }]);\n    return (options?.client ?? client).get<FormatterStatusResponses, unknown, ThrowOnError>({\n        url: '/formatter',\n        ...options,\n        ...params\n    });\n};\n\n/**\n * Append TUI prompt\n *\n * Append prompt to the TUI\n */\nexport const tuiAppendPrompt = <ThrowOnError extends boolean = false>(parameters: {\n    directory?: string;\n    text: string;\n}, options?: Options<never, ThrowOnError>) => {\n    const params = buildClientParams([parameters], [{ args: [{ in: 'query', key: 'directory' }, { in: 'body', key: 'text' }] }]);\n    return (options?.client ?? client).post<TuiAppendPromptResponses, TuiAppendPromptErrors, ThrowOnError>({\n        url: '/tui/append-prompt',\n        ...options,\n        ...params,\n        headers: {\n            'Content-Type': 'application/json',\n            ...options?.headers,\n            ...params.headers\n        }\n    });\n};\n\n/**\n * Open help dialog\n *\n * Open the help dialog in the TUI to display user assistance information.\n */\nexport const tuiOpenHelp = <ThrowOnError extends boolean = false>(parameters?: {\n    directory?: string;\n}, options?: Options<never, ThrowOnError>) => {\n    const params = buildClientParams([parameters], [{ args: [{ in: 'query', key: 'directory' }] }]);\n    return (options?.client ?? client).post<TuiOpenHelpResponses, unknown, ThrowOnError>({\n        url: '/tui/open-help',\n        ...options,\n        ...params\n    });\n};\n\n/**\n * Open sessions dialog\n *\n * Open the session dialog\n */\nexport const tuiOpenSessions = <ThrowOnError extends boolean = false>(parameters?: {\n    directory?: string;\n}, options?: Options<never, ThrowOnError>) => {\n    const params = buildClientParams([parameters], [{ args: [{ in: 'query', key: 'directory' }] }]);\n    return (options?.client ?? client).post<TuiOpenSessionsResponses, unknown, ThrowOnError>({\n        url: '/tui/open-sessions',\n        ...options,\n        ...params\n    });\n};\n\n/**\n * Open themes dialog\n *\n * Open the theme dialog\n */\nexport const tuiOpenThemes = <ThrowOnError extends boolean = false>(parameters?: {\n    directory?: string;\n}, options?: Options<never, ThrowOnError>) => {\n    const params = buildClientParams([parameters], [{ args: [{ in: 'query', key: 'directory' }] }]);\n    return (options?.client ?? client).post<TuiOpenThemesResponses, unknown, ThrowOnError>({\n        url: '/tui/open-themes',\n        ...options,\n        ...params\n    });\n};\n\n/**\n * Open models dialog\n *\n * Open the model dialog\n */\nexport const tuiOpenModels = <ThrowOnError extends boolean = false>(parameters?: {\n    directory?: string;\n}, options?: Options<never, ThrowOnError>) => {\n    const params = buildClientParams([parameters], [{ args: [{ in: 'query', key: 'directory' }] }]);\n    return (options?.client ?? client).post<TuiOpenModelsResponses, unknown, ThrowOnError>({\n        url: '/tui/open-models',\n        ...options,\n        ...params\n    });\n};\n\n/**\n * Submit TUI prompt\n *\n * Submit the prompt\n */\nexport const tuiSubmitPrompt = <ThrowOnError extends boolean = false>(parameters?: {\n    directory?: string;\n}, options?: Options<never, ThrowOnError>) => {\n    const params = buildClientParams([parameters], [{ args: [{ in: 'query', key: 'directory' }] }]);\n    return (options?.client ?? client).post<TuiSubmitPromptResponses, unknown, ThrowOnError>({\n        url: '/tui/submit-prompt',\n        ...options,\n        ...params\n    });\n};\n\n/**\n * Clear TUI prompt\n *\n * Clear the prompt\n */\nexport const tuiClearPrompt = <ThrowOnError extends boolean = false>(parameters?: {\n    directory?: string;\n}, options?: Options<never, ThrowOnError>) => {\n    const params = buildClientParams([parameters], [{ args: [{ in: 'query', key: 'directory' }] }]);\n    return (options?.client ?? client).post<TuiClearPromptResponses, unknown, ThrowOnError>({\n        url: '/tui/clear-prompt',\n        ...options,\n        ...params\n    });\n};\n\n/**\n * Execute TUI command\n *\n * Execute a TUI command (e.g. agent_cycle)\n */\nexport const tuiExecuteCommand = <ThrowOnError extends boolean = false>(parameters: {\n    directory?: string;\n    command: string;\n}, options?: Options<never, ThrowOnError>) => {\n    const params = buildClientParams([parameters], [{ args: [{ in: 'query', key: 'directory' }, { in: 'body', key: 'command' }] }]);\n    return (options?.client ?? client).post<TuiExecuteCommandResponses, TuiExecuteCommandErrors, ThrowOnError>({\n        url: '/tui/execute-command',\n        ...options,\n        ...params,\n        headers: {\n            'Content-Type': 'application/json',\n            ...options?.headers,\n            ...params.headers\n        }\n    });\n};\n\n/**\n * Show TUI toast\n *\n * Show a toast notification in the TUI\n */\nexport const tuiShowToast = <ThrowOnError extends boolean = false>(parameters: {\n    directory?: string;\n    title?: string;\n    message: string;\n    variant: 'info' | 'success' | 'warning' | 'error';\n    duration?: number;\n}, options?: Options<never, ThrowOnError>) => {\n    const params = buildClientParams([parameters], [{ args: [\n                { in: 'query', key: 'directory' },\n                { in: 'body', key: 'title' },\n                { in: 'body', key: 'message' },\n                { in: 'body', key: 'variant' },\n                { in: 'body', key: 'duration' }\n            ] }]);\n    return (options?.client ?? client).post<TuiShowToastResponses, unknown, ThrowOnError>({\n        url: '/tui/show-toast',\n        ...options,\n        ...params,\n        headers: {\n            'Content-Type': 'application/json',\n            ...options?.headers,\n            ...params.headers\n        }\n    });\n};\n\n/**\n * Publish TUI event\n *\n * Publish a TUI event\n */\nexport const tuiPublish = <ThrowOnError extends boolean = false>(parameters?: {\n    directory?: string;\n    body?: EventTuiPromptAppend | EventTuiCommandExecute | EventTuiToastShow;\n}, options?: Options<never, ThrowOnError>) => {\n    const params = buildClientParams([parameters], [{ args: [{ in: 'query', key: 'directory' }, { key: 'body', map: 'body' }] }]);\n    return (options?.client ?? client).post<TuiPublishResponses, TuiPublishErrors, ThrowOnError>({\n        url: '/tui/publish',\n        ...options,\n        ...params,\n        headers: {\n            'Content-Type': 'application/json',\n            ...options?.headers,\n            ...params.headers\n        }\n    });\n};\n\n/**\n * Get next TUI request\n *\n * Retrieve the next TUI (Terminal User Interface) request from the queue for processing.\n */\nexport const tuiControlNext = <ThrowOnError extends boolean = false>(parameters?: {\n    directory?: string;\n}, options?: Options<never, ThrowOnError>) => {\n    const params = buildClientParams([parameters], [{ args: [{ in: 'query', key: 'directory' }] }]);\n    return (options?.client ?? client).get<TuiControlNextResponses, unknown, ThrowOnError>({\n        url: '/tui/control/next',\n        ...options,\n        ...params\n    });\n};\n\n/**\n * Submit TUI response\n *\n * Submit a response to the TUI request queue to complete a pending request.\n */\nexport const tuiControlResponse = <ThrowOnError extends boolean = false>(parameters?: {\n    directory?: string;\n    body?: unknown;\n}, options?: Options<never, ThrowOnError>) => {\n    const params = buildClientParams([parameters], [{ args: [{ in: 'query', key: 'directory' }, { key: 'body', map: 'body' }] }]);\n    return (options?.client ?? client).post<TuiControlResponseResponses, unknown, ThrowOnError>({\n        url: '/tui/control/response',\n        ...options,\n        ...params,\n        headers: {\n            'Content-Type': 'application/json',\n            ...options?.headers,\n            ...params.headers\n        }\n    });\n};\n\n/**\n * Set auth credentials\n *\n * Set authentication credentials\n */\nexport const authSet = <ThrowOnError extends boolean = false>(parameters: {\n    providerID: string;\n    directory?: string;\n    auth?: Auth;\n}, options?: Options<never, ThrowOnError>) => {\n    const params = buildClientParams([parameters], [{ args: [\n                { in: 'path', key: 'providerID' },\n                { in: 'query', key: 'directory' },\n                { key: 'auth', map: 'body' }\n            ] }]);\n    return (options?.client ?? client).put<AuthSetResponses, AuthSetErrors, ThrowOnError>({\n        url: '/auth/{providerID}',\n        ...options,\n        ...params,\n        headers: {\n            'Content-Type': 'application/json',\n            ...options?.headers,\n            ...params.headers\n        }\n    });\n};\n\n/**\n * Subscribe to events\n *\n * Get events\n */\nexport const eventSubscribe = <ThrowOnError extends boolean = false>(parameters?: {\n    directory?: string;\n}, options?: Options<never, ThrowOnError>) => {\n    const params = buildClientParams([parameters], [{ args: [{ in: 'query', key: 'directory' }] }]);\n    return (options?.client ?? client).sse.get<EventSubscribeResponses, unknown, ThrowOnError>({\n        url: '/event',\n        ...options,\n        ...params\n    });\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/sdks/__snapshots__/opencode/export-all/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type ClientOptions = {\n    baseUrl: `${string}://${string}` | (string & {});\n};\n\nexport type EventInstallationUpdated = {\n    type: 'installation.updated';\n    properties: {\n        version: string;\n    };\n};\n\nexport type EventInstallationUpdateAvailable = {\n    type: 'installation.update-available';\n    properties: {\n        version: string;\n    };\n};\n\nexport type Project = {\n    id: string;\n    worktree: string;\n    vcs?: 'git';\n    name?: string;\n    icon?: {\n        url?: string;\n        color?: string;\n    };\n    time: {\n        created: number;\n        updated: number;\n        initialized?: number;\n    };\n};\n\nexport type EventProjectUpdated = {\n    type: 'project.updated';\n    properties: Project;\n};\n\nexport type EventServerInstanceDisposed = {\n    type: 'server.instance.disposed';\n    properties: {\n        directory: string;\n    };\n};\n\nexport type EventLspClientDiagnostics = {\n    type: 'lsp.client.diagnostics';\n    properties: {\n        serverID: string;\n        path: string;\n    };\n};\n\nexport type EventLspUpdated = {\n    type: 'lsp.updated';\n    properties: {\n        [key: string]: unknown;\n    };\n};\n\nexport type FileDiff = {\n    file: string;\n    before: string;\n    after: string;\n    additions: number;\n    deletions: number;\n};\n\nexport type UserMessage = {\n    id: string;\n    sessionID: string;\n    role: 'user';\n    time: {\n        created: number;\n    };\n    summary?: {\n        title?: string;\n        body?: string;\n        diffs: Array<FileDiff>;\n    };\n    agent: string;\n    model: {\n        providerID: string;\n        modelID: string;\n    };\n    system?: string;\n    tools?: {\n        [key: string]: boolean;\n    };\n    variant?: string;\n};\n\nexport type ProviderAuthError = {\n    name: 'ProviderAuthError';\n    data: {\n        providerID: string;\n        message: string;\n    };\n};\n\nexport type UnknownError = {\n    name: 'UnknownError';\n    data: {\n        message: string;\n    };\n};\n\nexport type MessageOutputLengthError = {\n    name: 'MessageOutputLengthError';\n    data: {\n        [key: string]: unknown;\n    };\n};\n\nexport type MessageAbortedError = {\n    name: 'MessageAbortedError';\n    data: {\n        message: string;\n    };\n};\n\nexport type ApiError = {\n    name: 'APIError';\n    data: {\n        message: string;\n        statusCode?: number;\n        isRetryable: boolean;\n        responseHeaders?: {\n            [key: string]: string;\n        };\n        responseBody?: string;\n        metadata?: {\n            [key: string]: string;\n        };\n    };\n};\n\nexport type AssistantMessage = {\n    id: string;\n    sessionID: string;\n    role: 'assistant';\n    time: {\n        created: number;\n        completed?: number;\n    };\n    error?: ProviderAuthError | UnknownError | MessageOutputLengthError | MessageAbortedError | ApiError;\n    parentID: string;\n    modelID: string;\n    providerID: string;\n    mode: string;\n    agent: string;\n    path: {\n        cwd: string;\n        root: string;\n    };\n    summary?: boolean;\n    cost: number;\n    tokens: {\n        input: number;\n        output: number;\n        reasoning: number;\n        cache: {\n            read: number;\n            write: number;\n        };\n    };\n    finish?: string;\n};\n\nexport type Message = UserMessage | AssistantMessage;\n\nexport type EventMessageUpdated = {\n    type: 'message.updated';\n    properties: {\n        info: Message;\n    };\n};\n\nexport type EventMessageRemoved = {\n    type: 'message.removed';\n    properties: {\n        sessionID: string;\n        messageID: string;\n    };\n};\n\nexport type TextPart = {\n    id: string;\n    sessionID: string;\n    messageID: string;\n    type: 'text';\n    text: string;\n    synthetic?: boolean;\n    ignored?: boolean;\n    time?: {\n        start: number;\n        end?: number;\n    };\n    metadata?: {\n        [key: string]: unknown;\n    };\n};\n\nexport type ReasoningPart = {\n    id: string;\n    sessionID: string;\n    messageID: string;\n    type: 'reasoning';\n    text: string;\n    metadata?: {\n        [key: string]: unknown;\n    };\n    time: {\n        start: number;\n        end?: number;\n    };\n};\n\nexport type FilePartSourceText = {\n    value: string;\n    start: number;\n    end: number;\n};\n\nexport type FileSource = {\n    text: FilePartSourceText;\n    type: 'file';\n    path: string;\n};\n\nexport type Range = {\n    start: {\n        line: number;\n        character: number;\n    };\n    end: {\n        line: number;\n        character: number;\n    };\n};\n\nexport type SymbolSource = {\n    text: FilePartSourceText;\n    type: 'symbol';\n    path: string;\n    range: Range;\n    name: string;\n    kind: number;\n};\n\nexport type FilePartSource = FileSource | SymbolSource;\n\nexport type FilePart = {\n    id: string;\n    sessionID: string;\n    messageID: string;\n    type: 'file';\n    mime: string;\n    filename?: string;\n    url: string;\n    source?: FilePartSource;\n};\n\nexport type ToolStatePending = {\n    status: 'pending';\n    input: {\n        [key: string]: unknown;\n    };\n    raw: string;\n};\n\nexport type ToolStateRunning = {\n    status: 'running';\n    input: {\n        [key: string]: unknown;\n    };\n    title?: string;\n    metadata?: {\n        [key: string]: unknown;\n    };\n    time: {\n        start: number;\n    };\n};\n\nexport type ToolStateCompleted = {\n    status: 'completed';\n    input: {\n        [key: string]: unknown;\n    };\n    output: string;\n    title: string;\n    metadata: {\n        [key: string]: unknown;\n    };\n    time: {\n        start: number;\n        end: number;\n        compacted?: number;\n    };\n    attachments?: Array<FilePart>;\n};\n\nexport type ToolStateError = {\n    status: 'error';\n    input: {\n        [key: string]: unknown;\n    };\n    error: string;\n    metadata?: {\n        [key: string]: unknown;\n    };\n    time: {\n        start: number;\n        end: number;\n    };\n};\n\nexport type ToolState = ToolStatePending | ToolStateRunning | ToolStateCompleted | ToolStateError;\n\nexport type ToolPart = {\n    id: string;\n    sessionID: string;\n    messageID: string;\n    type: 'tool';\n    callID: string;\n    tool: string;\n    state: ToolState;\n    metadata?: {\n        [key: string]: unknown;\n    };\n};\n\nexport type StepStartPart = {\n    id: string;\n    sessionID: string;\n    messageID: string;\n    type: 'step-start';\n    snapshot?: string;\n};\n\nexport type StepFinishPart = {\n    id: string;\n    sessionID: string;\n    messageID: string;\n    type: 'step-finish';\n    reason: string;\n    snapshot?: string;\n    cost: number;\n    tokens: {\n        input: number;\n        output: number;\n        reasoning: number;\n        cache: {\n            read: number;\n            write: number;\n        };\n    };\n};\n\nexport type SnapshotPart = {\n    id: string;\n    sessionID: string;\n    messageID: string;\n    type: 'snapshot';\n    snapshot: string;\n};\n\nexport type PatchPart = {\n    id: string;\n    sessionID: string;\n    messageID: string;\n    type: 'patch';\n    hash: string;\n    files: Array<string>;\n};\n\nexport type AgentPart = {\n    id: string;\n    sessionID: string;\n    messageID: string;\n    type: 'agent';\n    name: string;\n    source?: {\n        value: string;\n        start: number;\n        end: number;\n    };\n};\n\nexport type RetryPart = {\n    id: string;\n    sessionID: string;\n    messageID: string;\n    type: 'retry';\n    attempt: number;\n    error: ApiError;\n    time: {\n        created: number;\n    };\n};\n\nexport type CompactionPart = {\n    id: string;\n    sessionID: string;\n    messageID: string;\n    type: 'compaction';\n    auto: boolean;\n};\n\nexport type Part = TextPart | {\n    id: string;\n    sessionID: string;\n    messageID: string;\n    type: 'subtask';\n    prompt: string;\n    description: string;\n    agent: string;\n    command?: string;\n} | ReasoningPart | FilePart | ToolPart | StepStartPart | StepFinishPart | SnapshotPart | PatchPart | AgentPart | RetryPart | CompactionPart;\n\nexport type EventMessagePartUpdated = {\n    type: 'message.part.updated';\n    properties: {\n        part: Part;\n        delta?: string;\n    };\n};\n\nexport type EventMessagePartRemoved = {\n    type: 'message.part.removed';\n    properties: {\n        sessionID: string;\n        messageID: string;\n        partID: string;\n    };\n};\n\nexport type PermissionRequest = {\n    id: string;\n    sessionID: string;\n    permission: string;\n    patterns: Array<string>;\n    metadata: {\n        [key: string]: unknown;\n    };\n    always: Array<string>;\n    tool?: {\n        messageID: string;\n        callID: string;\n    };\n};\n\nexport type EventPermissionAsked = {\n    type: 'permission.asked';\n    properties: PermissionRequest;\n};\n\nexport type EventPermissionReplied = {\n    type: 'permission.replied';\n    properties: {\n        sessionID: string;\n        requestID: string;\n        reply: 'once' | 'always' | 'reject';\n    };\n};\n\nexport type SessionStatus = {\n    type: 'idle';\n} | {\n    type: 'retry';\n    attempt: number;\n    message: string;\n    next: number;\n} | {\n    type: 'busy';\n};\n\nexport type EventSessionStatus = {\n    type: 'session.status';\n    properties: {\n        sessionID: string;\n        status: SessionStatus;\n    };\n};\n\nexport type EventSessionIdle = {\n    type: 'session.idle';\n    properties: {\n        sessionID: string;\n    };\n};\n\nexport type EventSessionCompacted = {\n    type: 'session.compacted';\n    properties: {\n        sessionID: string;\n    };\n};\n\nexport type EventFileEdited = {\n    type: 'file.edited';\n    properties: {\n        file: string;\n    };\n};\n\nexport type Todo = {\n    /**\n     * Brief description of the task\n     */\n    content: string;\n    /**\n     * Current status of the task: pending, in_progress, completed, cancelled\n     */\n    status: string;\n    /**\n     * Priority level of the task: high, medium, low\n     */\n    priority: string;\n    /**\n     * Unique identifier for the todo item\n     */\n    id: string;\n};\n\nexport type EventTodoUpdated = {\n    type: 'todo.updated';\n    properties: {\n        sessionID: string;\n        todos: Array<Todo>;\n    };\n};\n\nexport type EventTuiPromptAppend = {\n    type: 'tui.prompt.append';\n    properties: {\n        text: string;\n    };\n};\n\nexport type EventTuiCommandExecute = {\n    type: 'tui.command.execute';\n    properties: {\n        command: 'session.list' | 'session.new' | 'session.share' | 'session.interrupt' | 'session.compact' | 'session.page.up' | 'session.page.down' | 'session.half.page.up' | 'session.half.page.down' | 'session.first' | 'session.last' | 'prompt.clear' | 'prompt.submit' | 'agent.cycle' | string;\n    };\n};\n\nexport type EventTuiToastShow = {\n    type: 'tui.toast.show';\n    properties: {\n        title?: string;\n        message: string;\n        variant: 'info' | 'success' | 'warning' | 'error';\n        /**\n         * Duration in milliseconds\n         */\n        duration?: number;\n    };\n};\n\nexport type EventMcpToolsChanged = {\n    type: 'mcp.tools.changed';\n    properties: {\n        server: string;\n    };\n};\n\nexport type EventCommandExecuted = {\n    type: 'command.executed';\n    properties: {\n        name: string;\n        sessionID: string;\n        arguments: string;\n        messageID: string;\n    };\n};\n\nexport type PermissionAction = 'allow' | 'deny' | 'ask';\n\nexport type PermissionRule = {\n    permission: string;\n    pattern: string;\n    action: PermissionAction;\n};\n\nexport type PermissionRuleset = Array<PermissionRule>;\n\nexport type Session = {\n    id: string;\n    projectID: string;\n    directory: string;\n    parentID?: string;\n    summary?: {\n        additions: number;\n        deletions: number;\n        files: number;\n        diffs?: Array<FileDiff>;\n    };\n    share?: {\n        url: string;\n    };\n    title: string;\n    version: string;\n    time: {\n        created: number;\n        updated: number;\n        compacting?: number;\n        archived?: number;\n    };\n    permission?: PermissionRuleset;\n    revert?: {\n        messageID: string;\n        partID?: string;\n        snapshot?: string;\n        diff?: string;\n    };\n};\n\nexport type EventSessionCreated = {\n    type: 'session.created';\n    properties: {\n        info: Session;\n    };\n};\n\nexport type EventSessionUpdated = {\n    type: 'session.updated';\n    properties: {\n        info: Session;\n    };\n};\n\nexport type EventSessionDeleted = {\n    type: 'session.deleted';\n    properties: {\n        info: Session;\n    };\n};\n\nexport type EventSessionDiff = {\n    type: 'session.diff';\n    properties: {\n        sessionID: string;\n        diff: Array<FileDiff>;\n    };\n};\n\nexport type EventSessionError = {\n    type: 'session.error';\n    properties: {\n        sessionID?: string;\n        error?: ProviderAuthError | UnknownError | MessageOutputLengthError | MessageAbortedError | ApiError;\n    };\n};\n\nexport type EventFileWatcherUpdated = {\n    type: 'file.watcher.updated';\n    properties: {\n        file: string;\n        event: 'add' | 'change' | 'unlink';\n    };\n};\n\nexport type EventVcsBranchUpdated = {\n    type: 'vcs.branch.updated';\n    properties: {\n        branch?: string;\n    };\n};\n\nexport type Pty = {\n    id: string;\n    title: string;\n    command: string;\n    args: Array<string>;\n    cwd: string;\n    status: 'running' | 'exited';\n    pid: number;\n};\n\nexport type EventPtyCreated = {\n    type: 'pty.created';\n    properties: {\n        info: Pty;\n    };\n};\n\nexport type EventPtyUpdated = {\n    type: 'pty.updated';\n    properties: {\n        info: Pty;\n    };\n};\n\nexport type EventPtyExited = {\n    type: 'pty.exited';\n    properties: {\n        id: string;\n        exitCode: number;\n    };\n};\n\nexport type EventPtyDeleted = {\n    type: 'pty.deleted';\n    properties: {\n        id: string;\n    };\n};\n\nexport type EventServerConnected = {\n    type: 'server.connected';\n    properties: {\n        [key: string]: unknown;\n    };\n};\n\nexport type EventGlobalDisposed = {\n    type: 'global.disposed';\n    properties: {\n        [key: string]: unknown;\n    };\n};\n\nexport type Event = EventInstallationUpdated | EventInstallationUpdateAvailable | EventProjectUpdated | EventServerInstanceDisposed | EventLspClientDiagnostics | EventLspUpdated | EventMessageUpdated | EventMessageRemoved | EventMessagePartUpdated | EventMessagePartRemoved | EventPermissionAsked | EventPermissionReplied | EventSessionStatus | EventSessionIdle | EventSessionCompacted | EventFileEdited | EventTodoUpdated | EventTuiPromptAppend | EventTuiCommandExecute | EventTuiToastShow | EventMcpToolsChanged | EventCommandExecuted | EventSessionCreated | EventSessionUpdated | EventSessionDeleted | EventSessionDiff | EventSessionError | EventFileWatcherUpdated | EventVcsBranchUpdated | EventPtyCreated | EventPtyUpdated | EventPtyExited | EventPtyDeleted | EventServerConnected | EventGlobalDisposed;\n\nexport type GlobalEvent = {\n    directory: string;\n    payload: Event;\n};\n\nexport type BadRequestError = {\n    data: unknown;\n    errors: Array<{\n        [key: string]: unknown;\n    }>;\n    success: false;\n};\n\nexport type NotFoundError = {\n    name: 'NotFoundError';\n    data: {\n        message: string;\n    };\n};\n\n/**\n * Custom keybind configurations\n */\nexport type KeybindsConfig = {\n    /**\n     * Leader key for keybind combinations\n     */\n    leader?: string;\n    /**\n     * Exit the application\n     */\n    app_exit?: string;\n    /**\n     * Open external editor\n     */\n    editor_open?: string;\n    /**\n     * List available themes\n     */\n    theme_list?: string;\n    /**\n     * Toggle sidebar\n     */\n    sidebar_toggle?: string;\n    /**\n     * Toggle session scrollbar\n     */\n    scrollbar_toggle?: string;\n    /**\n     * Toggle username visibility\n     */\n    username_toggle?: string;\n    /**\n     * View status\n     */\n    status_view?: string;\n    /**\n     * Export session to editor\n     */\n    session_export?: string;\n    /**\n     * Create a new session\n     */\n    session_new?: string;\n    /**\n     * List all sessions\n     */\n    session_list?: string;\n    /**\n     * Show session timeline\n     */\n    session_timeline?: string;\n    /**\n     * Fork session from message\n     */\n    session_fork?: string;\n    /**\n     * Rename session\n     */\n    session_rename?: string;\n    /**\n     * Share current session\n     */\n    session_share?: string;\n    /**\n     * Unshare current session\n     */\n    session_unshare?: string;\n    /**\n     * Interrupt current session\n     */\n    session_interrupt?: string;\n    /**\n     * Compact the session\n     */\n    session_compact?: string;\n    /**\n     * Scroll messages up by one page\n     */\n    messages_page_up?: string;\n    /**\n     * Scroll messages down by one page\n     */\n    messages_page_down?: string;\n    /**\n     * Scroll messages up by half page\n     */\n    messages_half_page_up?: string;\n    /**\n     * Scroll messages down by half page\n     */\n    messages_half_page_down?: string;\n    /**\n     * Navigate to first message\n     */\n    messages_first?: string;\n    /**\n     * Navigate to last message\n     */\n    messages_last?: string;\n    /**\n     * Navigate to next message\n     */\n    messages_next?: string;\n    /**\n     * Navigate to previous message\n     */\n    messages_previous?: string;\n    /**\n     * Navigate to last user message\n     */\n    messages_last_user?: string;\n    /**\n     * Copy message\n     */\n    messages_copy?: string;\n    /**\n     * Undo message\n     */\n    messages_undo?: string;\n    /**\n     * Redo message\n     */\n    messages_redo?: string;\n    /**\n     * Toggle code block concealment in messages\n     */\n    messages_toggle_conceal?: string;\n    /**\n     * Toggle tool details visibility\n     */\n    tool_details?: string;\n    /**\n     * List available models\n     */\n    model_list?: string;\n    /**\n     * Next recently used model\n     */\n    model_cycle_recent?: string;\n    /**\n     * Previous recently used model\n     */\n    model_cycle_recent_reverse?: string;\n    /**\n     * Next favorite model\n     */\n    model_cycle_favorite?: string;\n    /**\n     * Previous favorite model\n     */\n    model_cycle_favorite_reverse?: string;\n    /**\n     * List available commands\n     */\n    command_list?: string;\n    /**\n     * List agents\n     */\n    agent_list?: string;\n    /**\n     * Next agent\n     */\n    agent_cycle?: string;\n    /**\n     * Previous agent\n     */\n    agent_cycle_reverse?: string;\n    /**\n     * Cycle model variants\n     */\n    variant_cycle?: string;\n    /**\n     * Clear input field\n     */\n    input_clear?: string;\n    /**\n     * Paste from clipboard\n     */\n    input_paste?: string;\n    /**\n     * Submit input\n     */\n    input_submit?: string;\n    /**\n     * Insert newline in input\n     */\n    input_newline?: string;\n    /**\n     * Move cursor left in input\n     */\n    input_move_left?: string;\n    /**\n     * Move cursor right in input\n     */\n    input_move_right?: string;\n    /**\n     * Move cursor up in input\n     */\n    input_move_up?: string;\n    /**\n     * Move cursor down in input\n     */\n    input_move_down?: string;\n    /**\n     * Select left in input\n     */\n    input_select_left?: string;\n    /**\n     * Select right in input\n     */\n    input_select_right?: string;\n    /**\n     * Select up in input\n     */\n    input_select_up?: string;\n    /**\n     * Select down in input\n     */\n    input_select_down?: string;\n    /**\n     * Move to start of line in input\n     */\n    input_line_home?: string;\n    /**\n     * Move to end of line in input\n     */\n    input_line_end?: string;\n    /**\n     * Select to start of line in input\n     */\n    input_select_line_home?: string;\n    /**\n     * Select to end of line in input\n     */\n    input_select_line_end?: string;\n    /**\n     * Move to start of visual line in input\n     */\n    input_visual_line_home?: string;\n    /**\n     * Move to end of visual line in input\n     */\n    input_visual_line_end?: string;\n    /**\n     * Select to start of visual line in input\n     */\n    input_select_visual_line_home?: string;\n    /**\n     * Select to end of visual line in input\n     */\n    input_select_visual_line_end?: string;\n    /**\n     * Move to start of buffer in input\n     */\n    input_buffer_home?: string;\n    /**\n     * Move to end of buffer in input\n     */\n    input_buffer_end?: string;\n    /**\n     * Select to start of buffer in input\n     */\n    input_select_buffer_home?: string;\n    /**\n     * Select to end of buffer in input\n     */\n    input_select_buffer_end?: string;\n    /**\n     * Delete line in input\n     */\n    input_delete_line?: string;\n    /**\n     * Delete to end of line in input\n     */\n    input_delete_to_line_end?: string;\n    /**\n     * Delete to start of line in input\n     */\n    input_delete_to_line_start?: string;\n    /**\n     * Backspace in input\n     */\n    input_backspace?: string;\n    /**\n     * Delete character in input\n     */\n    input_delete?: string;\n    /**\n     * Undo in input\n     */\n    input_undo?: string;\n    /**\n     * Redo in input\n     */\n    input_redo?: string;\n    /**\n     * Move word forward in input\n     */\n    input_word_forward?: string;\n    /**\n     * Move word backward in input\n     */\n    input_word_backward?: string;\n    /**\n     * Select word forward in input\n     */\n    input_select_word_forward?: string;\n    /**\n     * Select word backward in input\n     */\n    input_select_word_backward?: string;\n    /**\n     * Delete word forward in input\n     */\n    input_delete_word_forward?: string;\n    /**\n     * Delete word backward in input\n     */\n    input_delete_word_backward?: string;\n    /**\n     * Previous history item\n     */\n    history_previous?: string;\n    /**\n     * Next history item\n     */\n    history_next?: string;\n    /**\n     * Next child session\n     */\n    session_child_cycle?: string;\n    /**\n     * Previous child session\n     */\n    session_child_cycle_reverse?: string;\n    /**\n     * Go to parent session\n     */\n    session_parent?: string;\n    /**\n     * Suspend terminal\n     */\n    terminal_suspend?: string;\n    /**\n     * Toggle terminal title\n     */\n    terminal_title_toggle?: string;\n    /**\n     * Toggle tips on home screen\n     */\n    tips_toggle?: string;\n};\n\n/**\n * Log level\n */\nexport type LogLevel = 'DEBUG' | 'INFO' | 'WARN' | 'ERROR';\n\n/**\n * Server configuration for opencode serve and web commands\n */\nexport type ServerConfig = {\n    /**\n     * Port to listen on\n     */\n    port?: number;\n    /**\n     * Hostname to listen on\n     */\n    hostname?: string;\n    /**\n     * Enable mDNS service discovery\n     */\n    mdns?: boolean;\n    /**\n     * Additional domains to allow for CORS\n     */\n    cors?: Array<string>;\n};\n\nexport type PermissionActionConfig = 'ask' | 'allow' | 'deny';\n\nexport type PermissionObjectConfig = {\n    [key: string]: PermissionActionConfig;\n};\n\nexport type PermissionRuleConfig = PermissionActionConfig | PermissionObjectConfig;\n\nexport type PermissionConfig = {\n    read?: PermissionRuleConfig;\n    edit?: PermissionRuleConfig;\n    glob?: PermissionRuleConfig;\n    grep?: PermissionRuleConfig;\n    list?: PermissionRuleConfig;\n    bash?: PermissionRuleConfig;\n    task?: PermissionRuleConfig;\n    external_directory?: PermissionRuleConfig;\n    todowrite?: PermissionActionConfig;\n    todoread?: PermissionActionConfig;\n    webfetch?: PermissionActionConfig;\n    websearch?: PermissionActionConfig;\n    codesearch?: PermissionActionConfig;\n    lsp?: PermissionRuleConfig;\n    doom_loop?: PermissionActionConfig;\n    [key: string]: PermissionRuleConfig | PermissionActionConfig | undefined;\n} | PermissionActionConfig;\n\nexport type AgentConfig = {\n    model?: string;\n    temperature?: number;\n    top_p?: number;\n    prompt?: string;\n    /**\n     * @deprecated Use 'permission' field instead\n     */\n    tools?: {\n        [key: string]: boolean;\n    };\n    disable?: boolean;\n    /**\n     * Description of when to use the agent\n     */\n    description?: string;\n    mode?: 'subagent' | 'primary' | 'all';\n    options?: {\n        [key: string]: unknown;\n    };\n    /**\n     * Hex color code for the agent (e.g., #FF5733)\n     */\n    color?: string;\n    /**\n     * Maximum number of agentic iterations before forcing text-only response\n     */\n    steps?: number;\n    /**\n     * @deprecated Use 'steps' field instead.\n     */\n    maxSteps?: number;\n    permission?: PermissionConfig;\n    [key: string]: unknown;\n};\n\nexport type ProviderConfig = {\n    api?: string;\n    name?: string;\n    env?: Array<string>;\n    id?: string;\n    npm?: string;\n    models?: {\n        [key: string]: {\n            id?: string;\n            name?: string;\n            family?: string;\n            release_date?: string;\n            attachment?: boolean;\n            reasoning?: boolean;\n            temperature?: boolean;\n            tool_call?: boolean;\n            interleaved?: true | {\n                field: 'reasoning_content' | 'reasoning_details';\n            };\n            cost?: {\n                input: number;\n                output: number;\n                cache_read?: number;\n                cache_write?: number;\n                context_over_200k?: {\n                    input: number;\n                    output: number;\n                    cache_read?: number;\n                    cache_write?: number;\n                };\n            };\n            limit?: {\n                context: number;\n                output: number;\n            };\n            modalities?: {\n                input: Array<'text' | 'audio' | 'image' | 'video' | 'pdf'>;\n                output: Array<'text' | 'audio' | 'image' | 'video' | 'pdf'>;\n            };\n            experimental?: boolean;\n            status?: 'alpha' | 'beta' | 'deprecated';\n            options?: {\n                [key: string]: unknown;\n            };\n            headers?: {\n                [key: string]: string;\n            };\n            provider?: {\n                npm: string;\n            };\n            /**\n             * Variant-specific configuration\n             */\n            variants?: {\n                [key: string]: {\n                    /**\n                     * Disable this variant for the model\n                     */\n                    disabled?: boolean;\n                    [key: string]: unknown;\n                };\n            };\n        };\n    };\n    whitelist?: Array<string>;\n    blacklist?: Array<string>;\n    options?: {\n        apiKey?: string;\n        baseURL?: string;\n        /**\n         * GitHub Enterprise URL for copilot authentication\n         */\n        enterpriseUrl?: string;\n        /**\n         * Enable promptCacheKey for this provider (default false)\n         */\n        setCacheKey?: boolean;\n        /**\n         * Timeout in milliseconds for requests to this provider. Default is 300000 (5 minutes). Set to false to disable timeout.\n         */\n        timeout?: number | false;\n        [key: string]: unknown;\n    };\n};\n\nexport type McpLocalConfig = {\n    /**\n     * Type of MCP server connection\n     */\n    type: 'local';\n    /**\n     * Command and arguments to run the MCP server\n     */\n    command: Array<string>;\n    /**\n     * Environment variables to set when running the MCP server\n     */\n    environment?: {\n        [key: string]: string;\n    };\n    /**\n     * Enable or disable the MCP server on startup\n     */\n    enabled?: boolean;\n    /**\n     * Timeout in ms for fetching tools from the MCP server. Defaults to 5000 (5 seconds) if not specified.\n     */\n    timeout?: number;\n};\n\nexport type McpOAuthConfig = {\n    /**\n     * OAuth client ID. If not provided, dynamic client registration (RFC 7591) will be attempted.\n     */\n    clientId?: string;\n    /**\n     * OAuth client secret (if required by the authorization server)\n     */\n    clientSecret?: string;\n    /**\n     * OAuth scopes to request during authorization\n     */\n    scope?: string;\n};\n\nexport type McpRemoteConfig = {\n    /**\n     * Type of MCP server connection\n     */\n    type: 'remote';\n    /**\n     * URL of the remote MCP server\n     */\n    url: string;\n    /**\n     * Enable or disable the MCP server on startup\n     */\n    enabled?: boolean;\n    /**\n     * Headers to send with the request\n     */\n    headers?: {\n        [key: string]: string;\n    };\n    /**\n     * OAuth authentication configuration for the MCP server. Set to false to disable OAuth auto-detection.\n     */\n    oauth?: McpOAuthConfig | false;\n    /**\n     * Timeout in ms for fetching tools from the MCP server. Defaults to 5000 (5 seconds) if not specified.\n     */\n    timeout?: number;\n};\n\n/**\n * @deprecated Always uses stretch layout.\n */\nexport type LayoutConfig = 'auto' | 'stretch';\n\nexport type Config = {\n    /**\n     * JSON schema reference for configuration validation\n     */\n    $schema?: string;\n    /**\n     * Theme name to use for the interface\n     */\n    theme?: string;\n    keybinds?: KeybindsConfig;\n    logLevel?: LogLevel;\n    /**\n     * TUI specific settings\n     */\n    tui?: {\n        /**\n         * TUI scroll speed\n         */\n        scroll_speed?: number;\n        /**\n         * Scroll acceleration settings\n         */\n        scroll_acceleration?: {\n            /**\n             * Enable scroll acceleration\n             */\n            enabled: boolean;\n        };\n        /**\n         * Control diff rendering style: 'auto' adapts to terminal width, 'stacked' always shows single column\n         */\n        diff_style?: 'auto' | 'stacked';\n    };\n    server?: ServerConfig;\n    /**\n     * Command configuration, see https://opencode.ai/docs/commands\n     */\n    command?: {\n        [key: string]: {\n            template: string;\n            description?: string;\n            agent?: string;\n            model?: string;\n            subtask?: boolean;\n        };\n    };\n    watcher?: {\n        ignore?: Array<string>;\n    };\n    plugin?: Array<string>;\n    snapshot?: boolean;\n    /**\n     * Control sharing behavior:'manual' allows manual sharing via commands, 'auto' enables automatic sharing, 'disabled' disables all sharing\n     */\n    share?: 'manual' | 'auto' | 'disabled';\n    /**\n     * @deprecated Use 'share' field instead. Share newly created sessions automatically\n     */\n    autoshare?: boolean;\n    /**\n     * Automatically update to the latest version. Set to true to auto-update, false to disable, or 'notify' to show update notifications\n     */\n    autoupdate?: boolean | 'notify';\n    /**\n     * Disable providers that are loaded automatically\n     */\n    disabled_providers?: Array<string>;\n    /**\n     * When set, ONLY these providers will be enabled. All other providers will be ignored\n     */\n    enabled_providers?: Array<string>;\n    /**\n     * Model to use in the format of provider/model, eg anthropic/claude-2\n     */\n    model?: string;\n    /**\n     * Small model to use for tasks like title generation in the format of provider/model\n     */\n    small_model?: string;\n    /**\n     * Default agent to use when none is specified. Must be a primary agent. Falls back to 'build' if not set or if the specified agent is invalid.\n     */\n    default_agent?: string;\n    /**\n     * Custom username to display in conversations instead of system username\n     */\n    username?: string;\n    /**\n     * @deprecated Use `agent` field instead.\n     */\n    mode?: {\n        build?: AgentConfig;\n        plan?: AgentConfig;\n        [key: string]: AgentConfig | undefined;\n    };\n    /**\n     * Agent configuration, see https://opencode.ai/docs/agent\n     */\n    agent?: {\n        plan?: AgentConfig;\n        build?: AgentConfig;\n        general?: AgentConfig;\n        explore?: AgentConfig;\n        title?: AgentConfig;\n        summary?: AgentConfig;\n        compaction?: AgentConfig;\n        [key: string]: AgentConfig | undefined;\n    };\n    /**\n     * Custom provider configurations and model overrides\n     */\n    provider?: {\n        [key: string]: ProviderConfig;\n    };\n    /**\n     * MCP (Model Context Protocol) server configurations\n     */\n    mcp?: {\n        [key: string]: McpLocalConfig | McpRemoteConfig;\n    };\n    formatter?: false | {\n        [key: string]: {\n            disabled?: boolean;\n            command?: Array<string>;\n            environment?: {\n                [key: string]: string;\n            };\n            extensions?: Array<string>;\n        };\n    };\n    lsp?: false | {\n        [key: string]: {\n            disabled: true;\n        } | {\n            command: Array<string>;\n            extensions?: Array<string>;\n            disabled?: boolean;\n            env?: {\n                [key: string]: string;\n            };\n            initialization?: {\n                [key: string]: unknown;\n            };\n        };\n    };\n    /**\n     * Additional instruction files or patterns to include\n     */\n    instructions?: Array<string>;\n    layout?: LayoutConfig;\n    permission?: PermissionConfig;\n    tools?: {\n        [key: string]: boolean;\n    };\n    enterprise?: {\n        /**\n         * Enterprise URL\n         */\n        url?: string;\n    };\n    compaction?: {\n        /**\n         * Enable automatic compaction when context is full (default: true)\n         */\n        auto?: boolean;\n        /**\n         * Enable pruning of old tool outputs (default: true)\n         */\n        prune?: boolean;\n    };\n    experimental?: {\n        hook?: {\n            file_edited?: {\n                [key: string]: Array<{\n                    command: Array<string>;\n                    environment?: {\n                        [key: string]: string;\n                    };\n                }>;\n            };\n            session_completed?: Array<{\n                command: Array<string>;\n                environment?: {\n                    [key: string]: string;\n                };\n            }>;\n        };\n        /**\n         * Number of retries for chat completions on failure\n         */\n        chatMaxRetries?: number;\n        disable_paste_summary?: boolean;\n        /**\n         * Enable the batch tool\n         */\n        batch_tool?: boolean;\n        /**\n         * Enable OpenTelemetry spans for AI SDK calls (using the 'experimental_telemetry' flag)\n         */\n        openTelemetry?: boolean;\n        /**\n         * Tools that should only be available to primary agents.\n         */\n        primary_tools?: Array<string>;\n        /**\n         * Continue the agent loop when a tool call is denied\n         */\n        continue_loop_on_deny?: boolean;\n        /**\n         * Timeout in milliseconds for model context protocol (MCP) requests\n         */\n        mcp_timeout?: number;\n    };\n};\n\nexport type ToolIds = Array<string>;\n\nexport type ToolListItem = {\n    id: string;\n    description: string;\n    parameters: unknown;\n};\n\nexport type ToolList = Array<ToolListItem>;\n\nexport type Path = {\n    home: string;\n    state: string;\n    config: string;\n    worktree: string;\n    directory: string;\n};\n\nexport type VcsInfo = {\n    branch: string;\n};\n\nexport type TextPartInput = {\n    id?: string;\n    type: 'text';\n    text: string;\n    synthetic?: boolean;\n    ignored?: boolean;\n    time?: {\n        start: number;\n        end?: number;\n    };\n    metadata?: {\n        [key: string]: unknown;\n    };\n};\n\nexport type FilePartInput = {\n    id?: string;\n    type: 'file';\n    mime: string;\n    filename?: string;\n    url: string;\n    source?: FilePartSource;\n};\n\nexport type AgentPartInput = {\n    id?: string;\n    type: 'agent';\n    name: string;\n    source?: {\n        value: string;\n        start: number;\n        end: number;\n    };\n};\n\nexport type SubtaskPartInput = {\n    id?: string;\n    type: 'subtask';\n    prompt: string;\n    description: string;\n    agent: string;\n    command?: string;\n};\n\nexport type Command = {\n    name: string;\n    description?: string;\n    agent?: string;\n    model?: string;\n    mcp?: boolean;\n    template: string;\n    subtask?: boolean;\n    hints: Array<string>;\n};\n\nexport type Model = {\n    id: string;\n    providerID: string;\n    api: {\n        id: string;\n        url: string;\n        npm: string;\n    };\n    name: string;\n    family?: string;\n    capabilities: {\n        temperature: boolean;\n        reasoning: boolean;\n        attachment: boolean;\n        toolcall: boolean;\n        input: {\n            text: boolean;\n            audio: boolean;\n            image: boolean;\n            video: boolean;\n            pdf: boolean;\n        };\n        output: {\n            text: boolean;\n            audio: boolean;\n            image: boolean;\n            video: boolean;\n            pdf: boolean;\n        };\n        interleaved: boolean | {\n            field: 'reasoning_content' | 'reasoning_details';\n        };\n    };\n    cost: {\n        input: number;\n        output: number;\n        cache: {\n            read: number;\n            write: number;\n        };\n        experimentalOver200K?: {\n            input: number;\n            output: number;\n            cache: {\n                read: number;\n                write: number;\n            };\n        };\n    };\n    limit: {\n        context: number;\n        output: number;\n    };\n    status: 'alpha' | 'beta' | 'deprecated' | 'active';\n    options: {\n        [key: string]: unknown;\n    };\n    headers: {\n        [key: string]: string;\n    };\n    release_date: string;\n    variants?: {\n        [key: string]: {\n            [key: string]: unknown;\n        };\n    };\n};\n\nexport type Provider = {\n    id: string;\n    name: string;\n    source: 'env' | 'config' | 'custom' | 'api';\n    env: Array<string>;\n    key?: string;\n    options: {\n        [key: string]: unknown;\n    };\n    models: {\n        [key: string]: Model;\n    };\n};\n\nexport type ProviderAuthMethod = {\n    type: 'oauth' | 'api';\n    label: string;\n};\n\nexport type ProviderAuthAuthorization = {\n    url: string;\n    method: 'auto' | 'code';\n    instructions: string;\n};\n\nexport type Symbol = {\n    name: string;\n    kind: number;\n    location: {\n        uri: string;\n        range: Range;\n    };\n};\n\nexport type FileNode = {\n    name: string;\n    path: string;\n    absolute: string;\n    type: 'file' | 'directory';\n    ignored: boolean;\n};\n\nexport type FileContent = {\n    type: 'text';\n    content: string;\n    diff?: string;\n    patch?: {\n        oldFileName: string;\n        newFileName: string;\n        oldHeader?: string;\n        newHeader?: string;\n        hunks: Array<{\n            oldStart: number;\n            oldLines: number;\n            newStart: number;\n            newLines: number;\n            lines: Array<string>;\n        }>;\n        index?: string;\n    };\n    encoding?: 'base64';\n    mimeType?: string;\n};\n\nexport type File = {\n    path: string;\n    added: number;\n    removed: number;\n    status: 'added' | 'deleted' | 'modified';\n};\n\nexport type Agent = {\n    name: string;\n    description?: string;\n    mode: 'subagent' | 'primary' | 'all';\n    native?: boolean;\n    hidden?: boolean;\n    topP?: number;\n    temperature?: number;\n    color?: string;\n    permission: PermissionRuleset;\n    model?: {\n        modelID: string;\n        providerID: string;\n    };\n    prompt?: string;\n    options: {\n        [key: string]: unknown;\n    };\n    steps?: number;\n};\n\nexport type McpStatusConnected = {\n    status: 'connected';\n};\n\nexport type McpStatusDisabled = {\n    status: 'disabled';\n};\n\nexport type McpStatusFailed = {\n    status: 'failed';\n    error: string;\n};\n\nexport type McpStatusNeedsAuth = {\n    status: 'needs_auth';\n};\n\nexport type McpStatusNeedsClientRegistration = {\n    status: 'needs_client_registration';\n    error: string;\n};\n\nexport type McpStatus = McpStatusConnected | McpStatusDisabled | McpStatusFailed | McpStatusNeedsAuth | McpStatusNeedsClientRegistration;\n\nexport type LspStatus = {\n    id: string;\n    name: string;\n    root: string;\n    status: 'connected' | 'error';\n};\n\nexport type FormatterStatus = {\n    name: string;\n    extensions: Array<string>;\n    enabled: boolean;\n};\n\nexport type OAuth = {\n    type: 'oauth';\n    refresh: string;\n    access: string;\n    expires: number;\n    enterpriseUrl?: string;\n};\n\nexport type ApiAuth = {\n    type: 'api';\n    key: string;\n};\n\nexport type WellKnownAuth = {\n    type: 'wellknown';\n    key: string;\n    token: string;\n};\n\nexport type Auth = OAuth | ApiAuth | WellKnownAuth;\n\nexport type GlobalHealthData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/global/health';\n};\n\nexport type GlobalHealthResponses = {\n    /**\n     * Health information\n     */\n    200: {\n        healthy: true;\n        version: string;\n    };\n};\n\nexport type GlobalHealthResponse = GlobalHealthResponses[keyof GlobalHealthResponses];\n\nexport type GlobalEventData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/global/event';\n};\n\nexport type GlobalEventResponses = {\n    /**\n     * Event stream\n     */\n    200: GlobalEvent;\n};\n\nexport type GlobalEventResponse = GlobalEventResponses[keyof GlobalEventResponses];\n\nexport type GlobalDisposeData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/global/dispose';\n};\n\nexport type GlobalDisposeResponses = {\n    /**\n     * Global disposed\n     */\n    200: boolean;\n};\n\nexport type GlobalDisposeResponse = GlobalDisposeResponses[keyof GlobalDisposeResponses];\n\nexport type ProjectListData = {\n    body?: never;\n    path?: never;\n    query?: {\n        directory?: string;\n    };\n    url: '/project';\n};\n\nexport type ProjectListResponses = {\n    /**\n     * List of projects\n     */\n    200: Array<Project>;\n};\n\nexport type ProjectListResponse = ProjectListResponses[keyof ProjectListResponses];\n\nexport type ProjectCurrentData = {\n    body?: never;\n    path?: never;\n    query?: {\n        directory?: string;\n    };\n    url: '/project/current';\n};\n\nexport type ProjectCurrentResponses = {\n    /**\n     * Current project information\n     */\n    200: Project;\n};\n\nexport type ProjectCurrentResponse = ProjectCurrentResponses[keyof ProjectCurrentResponses];\n\nexport type ProjectUpdateData = {\n    body?: {\n        name?: string;\n        icon?: {\n            url?: string;\n            color?: string;\n        };\n    };\n    path: {\n        projectID: string;\n    };\n    query?: {\n        directory?: string;\n    };\n    url: '/project/{projectID}';\n};\n\nexport type ProjectUpdateErrors = {\n    /**\n     * Bad request\n     */\n    400: BadRequestError;\n    /**\n     * Not found\n     */\n    404: NotFoundError;\n};\n\nexport type ProjectUpdateError = ProjectUpdateErrors[keyof ProjectUpdateErrors];\n\nexport type ProjectUpdateResponses = {\n    /**\n     * Updated project information\n     */\n    200: Project;\n};\n\nexport type ProjectUpdateResponse = ProjectUpdateResponses[keyof ProjectUpdateResponses];\n\nexport type PtyListData = {\n    body?: never;\n    path?: never;\n    query?: {\n        directory?: string;\n    };\n    url: '/pty';\n};\n\nexport type PtyListResponses = {\n    /**\n     * List of sessions\n     */\n    200: Array<Pty>;\n};\n\nexport type PtyListResponse = PtyListResponses[keyof PtyListResponses];\n\nexport type PtyCreateData = {\n    body?: {\n        command?: string;\n        args?: Array<string>;\n        cwd?: string;\n        title?: string;\n        env?: {\n            [key: string]: string;\n        };\n    };\n    path?: never;\n    query?: {\n        directory?: string;\n    };\n    url: '/pty';\n};\n\nexport type PtyCreateErrors = {\n    /**\n     * Bad request\n     */\n    400: BadRequestError;\n};\n\nexport type PtyCreateError = PtyCreateErrors[keyof PtyCreateErrors];\n\nexport type PtyCreateResponses = {\n    /**\n     * Created session\n     */\n    200: Pty;\n};\n\nexport type PtyCreateResponse = PtyCreateResponses[keyof PtyCreateResponses];\n\nexport type PtyRemoveData = {\n    body?: never;\n    path: {\n        ptyID: string;\n    };\n    query?: {\n        directory?: string;\n    };\n    url: '/pty/{ptyID}';\n};\n\nexport type PtyRemoveErrors = {\n    /**\n     * Not found\n     */\n    404: NotFoundError;\n};\n\nexport type PtyRemoveError = PtyRemoveErrors[keyof PtyRemoveErrors];\n\nexport type PtyRemoveResponses = {\n    /**\n     * Session removed\n     */\n    200: boolean;\n};\n\nexport type PtyRemoveResponse = PtyRemoveResponses[keyof PtyRemoveResponses];\n\nexport type PtyGetData = {\n    body?: never;\n    path: {\n        ptyID: string;\n    };\n    query?: {\n        directory?: string;\n    };\n    url: '/pty/{ptyID}';\n};\n\nexport type PtyGetErrors = {\n    /**\n     * Not found\n     */\n    404: NotFoundError;\n};\n\nexport type PtyGetError = PtyGetErrors[keyof PtyGetErrors];\n\nexport type PtyGetResponses = {\n    /**\n     * Session info\n     */\n    200: Pty;\n};\n\nexport type PtyGetResponse = PtyGetResponses[keyof PtyGetResponses];\n\nexport type PtyUpdateData = {\n    body?: {\n        title?: string;\n        size?: {\n            rows: number;\n            cols: number;\n        };\n    };\n    path: {\n        ptyID: string;\n    };\n    query?: {\n        directory?: string;\n    };\n    url: '/pty/{ptyID}';\n};\n\nexport type PtyUpdateErrors = {\n    /**\n     * Bad request\n     */\n    400: BadRequestError;\n};\n\nexport type PtyUpdateError = PtyUpdateErrors[keyof PtyUpdateErrors];\n\nexport type PtyUpdateResponses = {\n    /**\n     * Updated session\n     */\n    200: Pty;\n};\n\nexport type PtyUpdateResponse = PtyUpdateResponses[keyof PtyUpdateResponses];\n\nexport type PtyConnectData = {\n    body?: never;\n    path: {\n        ptyID: string;\n    };\n    query?: {\n        directory?: string;\n    };\n    url: '/pty/{ptyID}/connect';\n};\n\nexport type PtyConnectErrors = {\n    /**\n     * Not found\n     */\n    404: NotFoundError;\n};\n\nexport type PtyConnectError = PtyConnectErrors[keyof PtyConnectErrors];\n\nexport type PtyConnectResponses = {\n    /**\n     * Connected session\n     */\n    200: boolean;\n};\n\nexport type PtyConnectResponse = PtyConnectResponses[keyof PtyConnectResponses];\n\nexport type ConfigGetData = {\n    body?: never;\n    path?: never;\n    query?: {\n        directory?: string;\n    };\n    url: '/config';\n};\n\nexport type ConfigGetResponses = {\n    /**\n     * Get config info\n     */\n    200: Config;\n};\n\nexport type ConfigGetResponse = ConfigGetResponses[keyof ConfigGetResponses];\n\nexport type ConfigUpdateData = {\n    body?: Config;\n    path?: never;\n    query?: {\n        directory?: string;\n    };\n    url: '/config';\n};\n\nexport type ConfigUpdateErrors = {\n    /**\n     * Bad request\n     */\n    400: BadRequestError;\n};\n\nexport type ConfigUpdateError = ConfigUpdateErrors[keyof ConfigUpdateErrors];\n\nexport type ConfigUpdateResponses = {\n    /**\n     * Successfully updated config\n     */\n    200: Config;\n};\n\nexport type ConfigUpdateResponse = ConfigUpdateResponses[keyof ConfigUpdateResponses];\n\nexport type ToolIdsData = {\n    body?: never;\n    path?: never;\n    query?: {\n        directory?: string;\n    };\n    url: '/experimental/tool/ids';\n};\n\nexport type ToolIdsErrors = {\n    /**\n     * Bad request\n     */\n    400: BadRequestError;\n};\n\nexport type ToolIdsError = ToolIdsErrors[keyof ToolIdsErrors];\n\nexport type ToolIdsResponses = {\n    /**\n     * Tool IDs\n     */\n    200: ToolIds;\n};\n\nexport type ToolIdsResponse = ToolIdsResponses[keyof ToolIdsResponses];\n\nexport type ToolListData = {\n    body?: never;\n    path?: never;\n    query: {\n        directory?: string;\n        provider: string;\n        model: string;\n    };\n    url: '/experimental/tool';\n};\n\nexport type ToolListErrors = {\n    /**\n     * Bad request\n     */\n    400: BadRequestError;\n};\n\nexport type ToolListError = ToolListErrors[keyof ToolListErrors];\n\nexport type ToolListResponses = {\n    /**\n     * Tools\n     */\n    200: ToolList;\n};\n\nexport type ToolListResponse = ToolListResponses[keyof ToolListResponses];\n\nexport type InstanceDisposeData = {\n    body?: never;\n    path?: never;\n    query?: {\n        directory?: string;\n    };\n    url: '/instance/dispose';\n};\n\nexport type InstanceDisposeResponses = {\n    /**\n     * Instance disposed\n     */\n    200: boolean;\n};\n\nexport type InstanceDisposeResponse = InstanceDisposeResponses[keyof InstanceDisposeResponses];\n\nexport type PathGetData = {\n    body?: never;\n    path?: never;\n    query?: {\n        directory?: string;\n    };\n    url: '/path';\n};\n\nexport type PathGetResponses = {\n    /**\n     * Path\n     */\n    200: Path;\n};\n\nexport type PathGetResponse = PathGetResponses[keyof PathGetResponses];\n\nexport type VcsGetData = {\n    body?: never;\n    path?: never;\n    query?: {\n        directory?: string;\n    };\n    url: '/vcs';\n};\n\nexport type VcsGetResponses = {\n    /**\n     * VCS info\n     */\n    200: VcsInfo;\n};\n\nexport type VcsGetResponse = VcsGetResponses[keyof VcsGetResponses];\n\nexport type SessionListData = {\n    body?: never;\n    path?: never;\n    query?: {\n        directory?: string;\n    };\n    url: '/session';\n};\n\nexport type SessionListResponses = {\n    /**\n     * List of sessions\n     */\n    200: Array<Session>;\n};\n\nexport type SessionListResponse = SessionListResponses[keyof SessionListResponses];\n\nexport type SessionCreateData = {\n    body?: {\n        parentID?: string;\n        title?: string;\n        permission?: PermissionRuleset;\n    };\n    path?: never;\n    query?: {\n        directory?: string;\n    };\n    url: '/session';\n};\n\nexport type SessionCreateErrors = {\n    /**\n     * Bad request\n     */\n    400: BadRequestError;\n};\n\nexport type SessionCreateError = SessionCreateErrors[keyof SessionCreateErrors];\n\nexport type SessionCreateResponses = {\n    /**\n     * Successfully created session\n     */\n    200: Session;\n};\n\nexport type SessionCreateResponse = SessionCreateResponses[keyof SessionCreateResponses];\n\nexport type SessionStatusData = {\n    body?: never;\n    path?: never;\n    query?: {\n        directory?: string;\n    };\n    url: '/session/status';\n};\n\nexport type SessionStatusErrors = {\n    /**\n     * Bad request\n     */\n    400: BadRequestError;\n};\n\nexport type SessionStatusError = SessionStatusErrors[keyof SessionStatusErrors];\n\nexport type SessionStatusResponses = {\n    /**\n     * Get session status\n     */\n    200: {\n        [key: string]: SessionStatus;\n    };\n};\n\nexport type SessionStatusResponse = SessionStatusResponses[keyof SessionStatusResponses];\n\nexport type SessionDeleteData = {\n    body?: never;\n    path: {\n        sessionID: string;\n    };\n    query?: {\n        directory?: string;\n    };\n    url: '/session/{sessionID}';\n};\n\nexport type SessionDeleteErrors = {\n    /**\n     * Bad request\n     */\n    400: BadRequestError;\n    /**\n     * Not found\n     */\n    404: NotFoundError;\n};\n\nexport type SessionDeleteError = SessionDeleteErrors[keyof SessionDeleteErrors];\n\nexport type SessionDeleteResponses = {\n    /**\n     * Successfully deleted session\n     */\n    200: boolean;\n};\n\nexport type SessionDeleteResponse = SessionDeleteResponses[keyof SessionDeleteResponses];\n\nexport type SessionGetData = {\n    body?: never;\n    path: {\n        sessionID: string;\n    };\n    query?: {\n        directory?: string;\n    };\n    url: '/session/{sessionID}';\n};\n\nexport type SessionGetErrors = {\n    /**\n     * Bad request\n     */\n    400: BadRequestError;\n    /**\n     * Not found\n     */\n    404: NotFoundError;\n};\n\nexport type SessionGetError = SessionGetErrors[keyof SessionGetErrors];\n\nexport type SessionGetResponses = {\n    /**\n     * Get session\n     */\n    200: Session;\n};\n\nexport type SessionGetResponse = SessionGetResponses[keyof SessionGetResponses];\n\nexport type SessionUpdateData = {\n    body?: {\n        title?: string;\n        time?: {\n            archived?: number;\n        };\n    };\n    path: {\n        sessionID: string;\n    };\n    query?: {\n        directory?: string;\n    };\n    url: '/session/{sessionID}';\n};\n\nexport type SessionUpdateErrors = {\n    /**\n     * Bad request\n     */\n    400: BadRequestError;\n    /**\n     * Not found\n     */\n    404: NotFoundError;\n};\n\nexport type SessionUpdateError = SessionUpdateErrors[keyof SessionUpdateErrors];\n\nexport type SessionUpdateResponses = {\n    /**\n     * Successfully updated session\n     */\n    200: Session;\n};\n\nexport type SessionUpdateResponse = SessionUpdateResponses[keyof SessionUpdateResponses];\n\nexport type SessionChildrenData = {\n    body?: never;\n    path: {\n        sessionID: string;\n    };\n    query?: {\n        directory?: string;\n    };\n    url: '/session/{sessionID}/children';\n};\n\nexport type SessionChildrenErrors = {\n    /**\n     * Bad request\n     */\n    400: BadRequestError;\n    /**\n     * Not found\n     */\n    404: NotFoundError;\n};\n\nexport type SessionChildrenError = SessionChildrenErrors[keyof SessionChildrenErrors];\n\nexport type SessionChildrenResponses = {\n    /**\n     * List of children\n     */\n    200: Array<Session>;\n};\n\nexport type SessionChildrenResponse = SessionChildrenResponses[keyof SessionChildrenResponses];\n\nexport type SessionTodoData = {\n    body?: never;\n    path: {\n        /**\n         * Session ID\n         */\n        sessionID: string;\n    };\n    query?: {\n        directory?: string;\n    };\n    url: '/session/{sessionID}/todo';\n};\n\nexport type SessionTodoErrors = {\n    /**\n     * Bad request\n     */\n    400: BadRequestError;\n    /**\n     * Not found\n     */\n    404: NotFoundError;\n};\n\nexport type SessionTodoError = SessionTodoErrors[keyof SessionTodoErrors];\n\nexport type SessionTodoResponses = {\n    /**\n     * Todo list\n     */\n    200: Array<Todo>;\n};\n\nexport type SessionTodoResponse = SessionTodoResponses[keyof SessionTodoResponses];\n\nexport type SessionInitData = {\n    body?: {\n        modelID: string;\n        providerID: string;\n        messageID: string;\n    };\n    path: {\n        /**\n         * Session ID\n         */\n        sessionID: string;\n    };\n    query?: {\n        directory?: string;\n    };\n    url: '/session/{sessionID}/init';\n};\n\nexport type SessionInitErrors = {\n    /**\n     * Bad request\n     */\n    400: BadRequestError;\n    /**\n     * Not found\n     */\n    404: NotFoundError;\n};\n\nexport type SessionInitError = SessionInitErrors[keyof SessionInitErrors];\n\nexport type SessionInitResponses = {\n    /**\n     * 200\n     */\n    200: boolean;\n};\n\nexport type SessionInitResponse = SessionInitResponses[keyof SessionInitResponses];\n\nexport type SessionForkData = {\n    body?: {\n        messageID?: string;\n    };\n    path: {\n        sessionID: string;\n    };\n    query?: {\n        directory?: string;\n    };\n    url: '/session/{sessionID}/fork';\n};\n\nexport type SessionForkResponses = {\n    /**\n     * 200\n     */\n    200: Session;\n};\n\nexport type SessionForkResponse = SessionForkResponses[keyof SessionForkResponses];\n\nexport type SessionAbortData = {\n    body?: never;\n    path: {\n        sessionID: string;\n    };\n    query?: {\n        directory?: string;\n    };\n    url: '/session/{sessionID}/abort';\n};\n\nexport type SessionAbortErrors = {\n    /**\n     * Bad request\n     */\n    400: BadRequestError;\n    /**\n     * Not found\n     */\n    404: NotFoundError;\n};\n\nexport type SessionAbortError = SessionAbortErrors[keyof SessionAbortErrors];\n\nexport type SessionAbortResponses = {\n    /**\n     * Aborted session\n     */\n    200: boolean;\n};\n\nexport type SessionAbortResponse = SessionAbortResponses[keyof SessionAbortResponses];\n\nexport type SessionUnshareData = {\n    body?: never;\n    path: {\n        sessionID: string;\n    };\n    query?: {\n        directory?: string;\n    };\n    url: '/session/{sessionID}/share';\n};\n\nexport type SessionUnshareErrors = {\n    /**\n     * Bad request\n     */\n    400: BadRequestError;\n    /**\n     * Not found\n     */\n    404: NotFoundError;\n};\n\nexport type SessionUnshareError = SessionUnshareErrors[keyof SessionUnshareErrors];\n\nexport type SessionUnshareResponses = {\n    /**\n     * Successfully unshared session\n     */\n    200: Session;\n};\n\nexport type SessionUnshareResponse = SessionUnshareResponses[keyof SessionUnshareResponses];\n\nexport type SessionShareData = {\n    body?: never;\n    path: {\n        sessionID: string;\n    };\n    query?: {\n        directory?: string;\n    };\n    url: '/session/{sessionID}/share';\n};\n\nexport type SessionShareErrors = {\n    /**\n     * Bad request\n     */\n    400: BadRequestError;\n    /**\n     * Not found\n     */\n    404: NotFoundError;\n};\n\nexport type SessionShareError = SessionShareErrors[keyof SessionShareErrors];\n\nexport type SessionShareResponses = {\n    /**\n     * Successfully shared session\n     */\n    200: Session;\n};\n\nexport type SessionShareResponse = SessionShareResponses[keyof SessionShareResponses];\n\nexport type SessionDiffData = {\n    body?: never;\n    path: {\n        /**\n         * Session ID\n         */\n        sessionID: string;\n    };\n    query?: {\n        directory?: string;\n        messageID?: string;\n    };\n    url: '/session/{sessionID}/diff';\n};\n\nexport type SessionDiffErrors = {\n    /**\n     * Bad request\n     */\n    400: BadRequestError;\n    /**\n     * Not found\n     */\n    404: NotFoundError;\n};\n\nexport type SessionDiffError = SessionDiffErrors[keyof SessionDiffErrors];\n\nexport type SessionDiffResponses = {\n    /**\n     * List of diffs\n     */\n    200: Array<FileDiff>;\n};\n\nexport type SessionDiffResponse = SessionDiffResponses[keyof SessionDiffResponses];\n\nexport type SessionSummarizeData = {\n    body?: {\n        providerID: string;\n        modelID: string;\n        auto?: boolean;\n    };\n    path: {\n        /**\n         * Session ID\n         */\n        sessionID: string;\n    };\n    query?: {\n        directory?: string;\n    };\n    url: '/session/{sessionID}/summarize';\n};\n\nexport type SessionSummarizeErrors = {\n    /**\n     * Bad request\n     */\n    400: BadRequestError;\n    /**\n     * Not found\n     */\n    404: NotFoundError;\n};\n\nexport type SessionSummarizeError = SessionSummarizeErrors[keyof SessionSummarizeErrors];\n\nexport type SessionSummarizeResponses = {\n    /**\n     * Summarized session\n     */\n    200: boolean;\n};\n\nexport type SessionSummarizeResponse = SessionSummarizeResponses[keyof SessionSummarizeResponses];\n\nexport type SessionMessagesData = {\n    body?: never;\n    path: {\n        /**\n         * Session ID\n         */\n        sessionID: string;\n    };\n    query?: {\n        directory?: string;\n        limit?: number;\n    };\n    url: '/session/{sessionID}/message';\n};\n\nexport type SessionMessagesErrors = {\n    /**\n     * Bad request\n     */\n    400: BadRequestError;\n    /**\n     * Not found\n     */\n    404: NotFoundError;\n};\n\nexport type SessionMessagesError = SessionMessagesErrors[keyof SessionMessagesErrors];\n\nexport type SessionMessagesResponses = {\n    /**\n     * List of messages\n     */\n    200: Array<{\n        info: Message;\n        parts: Array<Part>;\n    }>;\n};\n\nexport type SessionMessagesResponse = SessionMessagesResponses[keyof SessionMessagesResponses];\n\nexport type SessionPromptData = {\n    body?: {\n        messageID?: string;\n        model?: {\n            providerID: string;\n            modelID: string;\n        };\n        agent?: string;\n        noReply?: boolean;\n        /**\n         * @deprecated tools and permissions have been merged, you can set permissions on the session itself now\n         */\n        tools?: {\n            [key: string]: boolean;\n        };\n        system?: string;\n        variant?: string;\n        parts: Array<TextPartInput | FilePartInput | AgentPartInput | SubtaskPartInput>;\n    };\n    path: {\n        /**\n         * Session ID\n         */\n        sessionID: string;\n    };\n    query?: {\n        directory?: string;\n    };\n    url: '/session/{sessionID}/message';\n};\n\nexport type SessionPromptErrors = {\n    /**\n     * Bad request\n     */\n    400: BadRequestError;\n    /**\n     * Not found\n     */\n    404: NotFoundError;\n};\n\nexport type SessionPromptError = SessionPromptErrors[keyof SessionPromptErrors];\n\nexport type SessionPromptResponses = {\n    /**\n     * Created message\n     */\n    200: {\n        info: AssistantMessage;\n        parts: Array<Part>;\n    };\n};\n\nexport type SessionPromptResponse = SessionPromptResponses[keyof SessionPromptResponses];\n\nexport type SessionMessageData = {\n    body?: never;\n    path: {\n        /**\n         * Session ID\n         */\n        sessionID: string;\n        /**\n         * Message ID\n         */\n        messageID: string;\n    };\n    query?: {\n        directory?: string;\n    };\n    url: '/session/{sessionID}/message/{messageID}';\n};\n\nexport type SessionMessageErrors = {\n    /**\n     * Bad request\n     */\n    400: BadRequestError;\n    /**\n     * Not found\n     */\n    404: NotFoundError;\n};\n\nexport type SessionMessageError = SessionMessageErrors[keyof SessionMessageErrors];\n\nexport type SessionMessageResponses = {\n    /**\n     * Message\n     */\n    200: {\n        info: Message;\n        parts: Array<Part>;\n    };\n};\n\nexport type SessionMessageResponse = SessionMessageResponses[keyof SessionMessageResponses];\n\nexport type PartDeleteData = {\n    body?: never;\n    path: {\n        /**\n         * Session ID\n         */\n        sessionID: string;\n        /**\n         * Message ID\n         */\n        messageID: string;\n        /**\n         * Part ID\n         */\n        partID: string;\n    };\n    query?: {\n        directory?: string;\n    };\n    url: '/session/{sessionID}/message/{messageID}/part/{partID}';\n};\n\nexport type PartDeleteErrors = {\n    /**\n     * Bad request\n     */\n    400: BadRequestError;\n    /**\n     * Not found\n     */\n    404: NotFoundError;\n};\n\nexport type PartDeleteError = PartDeleteErrors[keyof PartDeleteErrors];\n\nexport type PartDeleteResponses = {\n    /**\n     * Successfully deleted part\n     */\n    200: boolean;\n};\n\nexport type PartDeleteResponse = PartDeleteResponses[keyof PartDeleteResponses];\n\nexport type PartUpdateData = {\n    body?: Part;\n    path: {\n        /**\n         * Session ID\n         */\n        sessionID: string;\n        /**\n         * Message ID\n         */\n        messageID: string;\n        /**\n         * Part ID\n         */\n        partID: string;\n    };\n    query?: {\n        directory?: string;\n    };\n    url: '/session/{sessionID}/message/{messageID}/part/{partID}';\n};\n\nexport type PartUpdateErrors = {\n    /**\n     * Bad request\n     */\n    400: BadRequestError;\n    /**\n     * Not found\n     */\n    404: NotFoundError;\n};\n\nexport type PartUpdateError = PartUpdateErrors[keyof PartUpdateErrors];\n\nexport type PartUpdateResponses = {\n    /**\n     * Successfully updated part\n     */\n    200: Part;\n};\n\nexport type PartUpdateResponse = PartUpdateResponses[keyof PartUpdateResponses];\n\nexport type SessionPromptAsyncData = {\n    body?: {\n        messageID?: string;\n        model?: {\n            providerID: string;\n            modelID: string;\n        };\n        agent?: string;\n        noReply?: boolean;\n        /**\n         * @deprecated tools and permissions have been merged, you can set permissions on the session itself now\n         */\n        tools?: {\n            [key: string]: boolean;\n        };\n        system?: string;\n        variant?: string;\n        parts: Array<TextPartInput | FilePartInput | AgentPartInput | SubtaskPartInput>;\n    };\n    path: {\n        /**\n         * Session ID\n         */\n        sessionID: string;\n    };\n    query?: {\n        directory?: string;\n    };\n    url: '/session/{sessionID}/prompt_async';\n};\n\nexport type SessionPromptAsyncErrors = {\n    /**\n     * Bad request\n     */\n    400: BadRequestError;\n    /**\n     * Not found\n     */\n    404: NotFoundError;\n};\n\nexport type SessionPromptAsyncError = SessionPromptAsyncErrors[keyof SessionPromptAsyncErrors];\n\nexport type SessionPromptAsyncResponses = {\n    /**\n     * Prompt accepted\n     */\n    204: void;\n};\n\nexport type SessionPromptAsyncResponse = SessionPromptAsyncResponses[keyof SessionPromptAsyncResponses];\n\nexport type SessionCommandData = {\n    body?: {\n        messageID?: string;\n        agent?: string;\n        model?: string;\n        arguments: string;\n        command: string;\n        variant?: string;\n    };\n    path: {\n        /**\n         * Session ID\n         */\n        sessionID: string;\n    };\n    query?: {\n        directory?: string;\n    };\n    url: '/session/{sessionID}/command';\n};\n\nexport type SessionCommandErrors = {\n    /**\n     * Bad request\n     */\n    400: BadRequestError;\n    /**\n     * Not found\n     */\n    404: NotFoundError;\n};\n\nexport type SessionCommandError = SessionCommandErrors[keyof SessionCommandErrors];\n\nexport type SessionCommandResponses = {\n    /**\n     * Created message\n     */\n    200: {\n        info: AssistantMessage;\n        parts: Array<Part>;\n    };\n};\n\nexport type SessionCommandResponse = SessionCommandResponses[keyof SessionCommandResponses];\n\nexport type SessionShellData = {\n    body?: {\n        agent: string;\n        model?: {\n            providerID: string;\n            modelID: string;\n        };\n        command: string;\n    };\n    path: {\n        /**\n         * Session ID\n         */\n        sessionID: string;\n    };\n    query?: {\n        directory?: string;\n    };\n    url: '/session/{sessionID}/shell';\n};\n\nexport type SessionShellErrors = {\n    /**\n     * Bad request\n     */\n    400: BadRequestError;\n    /**\n     * Not found\n     */\n    404: NotFoundError;\n};\n\nexport type SessionShellError = SessionShellErrors[keyof SessionShellErrors];\n\nexport type SessionShellResponses = {\n    /**\n     * Created message\n     */\n    200: AssistantMessage;\n};\n\nexport type SessionShellResponse = SessionShellResponses[keyof SessionShellResponses];\n\nexport type SessionRevertData = {\n    body?: {\n        messageID: string;\n        partID?: string;\n    };\n    path: {\n        sessionID: string;\n    };\n    query?: {\n        directory?: string;\n    };\n    url: '/session/{sessionID}/revert';\n};\n\nexport type SessionRevertErrors = {\n    /**\n     * Bad request\n     */\n    400: BadRequestError;\n    /**\n     * Not found\n     */\n    404: NotFoundError;\n};\n\nexport type SessionRevertError = SessionRevertErrors[keyof SessionRevertErrors];\n\nexport type SessionRevertResponses = {\n    /**\n     * Updated session\n     */\n    200: Session;\n};\n\nexport type SessionRevertResponse = SessionRevertResponses[keyof SessionRevertResponses];\n\nexport type SessionUnrevertData = {\n    body?: never;\n    path: {\n        sessionID: string;\n    };\n    query?: {\n        directory?: string;\n    };\n    url: '/session/{sessionID}/unrevert';\n};\n\nexport type SessionUnrevertErrors = {\n    /**\n     * Bad request\n     */\n    400: BadRequestError;\n    /**\n     * Not found\n     */\n    404: NotFoundError;\n};\n\nexport type SessionUnrevertError = SessionUnrevertErrors[keyof SessionUnrevertErrors];\n\nexport type SessionUnrevertResponses = {\n    /**\n     * Updated session\n     */\n    200: Session;\n};\n\nexport type SessionUnrevertResponse = SessionUnrevertResponses[keyof SessionUnrevertResponses];\n\nexport type PermissionRespondData = {\n    body?: {\n        response: 'once' | 'always' | 'reject';\n    };\n    path: {\n        sessionID: string;\n        permissionID: string;\n    };\n    query?: {\n        directory?: string;\n    };\n    url: '/session/{sessionID}/permissions/{permissionID}';\n};\n\nexport type PermissionRespondErrors = {\n    /**\n     * Bad request\n     */\n    400: BadRequestError;\n    /**\n     * Not found\n     */\n    404: NotFoundError;\n};\n\nexport type PermissionRespondError = PermissionRespondErrors[keyof PermissionRespondErrors];\n\nexport type PermissionRespondResponses = {\n    /**\n     * Permission processed successfully\n     */\n    200: boolean;\n};\n\nexport type PermissionRespondResponse = PermissionRespondResponses[keyof PermissionRespondResponses];\n\nexport type PermissionReplyData = {\n    body?: {\n        reply: 'once' | 'always' | 'reject';\n    };\n    path: {\n        requestID: string;\n    };\n    query?: {\n        directory?: string;\n    };\n    url: '/permission/{requestID}/reply';\n};\n\nexport type PermissionReplyErrors = {\n    /**\n     * Bad request\n     */\n    400: BadRequestError;\n    /**\n     * Not found\n     */\n    404: NotFoundError;\n};\n\nexport type PermissionReplyError = PermissionReplyErrors[keyof PermissionReplyErrors];\n\nexport type PermissionReplyResponses = {\n    /**\n     * Permission processed successfully\n     */\n    200: boolean;\n};\n\nexport type PermissionReplyResponse = PermissionReplyResponses[keyof PermissionReplyResponses];\n\nexport type PermissionListData = {\n    body?: never;\n    path?: never;\n    query?: {\n        directory?: string;\n    };\n    url: '/permission';\n};\n\nexport type PermissionListResponses = {\n    /**\n     * List of pending permissions\n     */\n    200: Array<PermissionRequest>;\n};\n\nexport type PermissionListResponse = PermissionListResponses[keyof PermissionListResponses];\n\nexport type CommandListData = {\n    body?: never;\n    path?: never;\n    query?: {\n        directory?: string;\n    };\n    url: '/command';\n};\n\nexport type CommandListResponses = {\n    /**\n     * List of commands\n     */\n    200: Array<Command>;\n};\n\nexport type CommandListResponse = CommandListResponses[keyof CommandListResponses];\n\nexport type ConfigProvidersData = {\n    body?: never;\n    path?: never;\n    query?: {\n        directory?: string;\n    };\n    url: '/config/providers';\n};\n\nexport type ConfigProvidersResponses = {\n    /**\n     * List of providers\n     */\n    200: {\n        providers: Array<Provider>;\n        default: {\n            [key: string]: string;\n        };\n    };\n};\n\nexport type ConfigProvidersResponse = ConfigProvidersResponses[keyof ConfigProvidersResponses];\n\nexport type ProviderListData = {\n    body?: never;\n    path?: never;\n    query?: {\n        directory?: string;\n    };\n    url: '/provider';\n};\n\nexport type ProviderListResponses = {\n    /**\n     * List of providers\n     */\n    200: {\n        all: Array<{\n            api?: string;\n            name: string;\n            env: Array<string>;\n            id: string;\n            npm?: string;\n            models: {\n                [key: string]: {\n                    id: string;\n                    name: string;\n                    family?: string;\n                    release_date: string;\n                    attachment: boolean;\n                    reasoning: boolean;\n                    temperature: boolean;\n                    tool_call: boolean;\n                    interleaved?: true | {\n                        field: 'reasoning_content' | 'reasoning_details';\n                    };\n                    cost?: {\n                        input: number;\n                        output: number;\n                        cache_read?: number;\n                        cache_write?: number;\n                        context_over_200k?: {\n                            input: number;\n                            output: number;\n                            cache_read?: number;\n                            cache_write?: number;\n                        };\n                    };\n                    limit: {\n                        context: number;\n                        output: number;\n                    };\n                    modalities?: {\n                        input: Array<'text' | 'audio' | 'image' | 'video' | 'pdf'>;\n                        output: Array<'text' | 'audio' | 'image' | 'video' | 'pdf'>;\n                    };\n                    experimental?: boolean;\n                    status?: 'alpha' | 'beta' | 'deprecated';\n                    options: {\n                        [key: string]: unknown;\n                    };\n                    headers?: {\n                        [key: string]: string;\n                    };\n                    provider?: {\n                        npm: string;\n                    };\n                    variants?: {\n                        [key: string]: {\n                            [key: string]: unknown;\n                        };\n                    };\n                };\n            };\n        }>;\n        default: {\n            [key: string]: string;\n        };\n        connected: Array<string>;\n    };\n};\n\nexport type ProviderListResponse = ProviderListResponses[keyof ProviderListResponses];\n\nexport type ProviderAuthData = {\n    body?: never;\n    path?: never;\n    query?: {\n        directory?: string;\n    };\n    url: '/provider/auth';\n};\n\nexport type ProviderAuthResponses = {\n    /**\n     * Provider auth methods\n     */\n    200: {\n        [key: string]: Array<ProviderAuthMethod>;\n    };\n};\n\nexport type ProviderAuthResponse = ProviderAuthResponses[keyof ProviderAuthResponses];\n\nexport type ProviderOauthAuthorizeData = {\n    body?: {\n        /**\n         * Auth method index\n         */\n        method: number;\n    };\n    path: {\n        /**\n         * Provider ID\n         */\n        providerID: string;\n    };\n    query?: {\n        directory?: string;\n    };\n    url: '/provider/{providerID}/oauth/authorize';\n};\n\nexport type ProviderOauthAuthorizeErrors = {\n    /**\n     * Bad request\n     */\n    400: BadRequestError;\n};\n\nexport type ProviderOauthAuthorizeError = ProviderOauthAuthorizeErrors[keyof ProviderOauthAuthorizeErrors];\n\nexport type ProviderOauthAuthorizeResponses = {\n    /**\n     * Authorization URL and method\n     */\n    200: ProviderAuthAuthorization;\n};\n\nexport type ProviderOauthAuthorizeResponse = ProviderOauthAuthorizeResponses[keyof ProviderOauthAuthorizeResponses];\n\nexport type ProviderOauthCallbackData = {\n    body?: {\n        /**\n         * Auth method index\n         */\n        method: number;\n        /**\n         * OAuth authorization code\n         */\n        code?: string;\n    };\n    path: {\n        /**\n         * Provider ID\n         */\n        providerID: string;\n    };\n    query?: {\n        directory?: string;\n    };\n    url: '/provider/{providerID}/oauth/callback';\n};\n\nexport type ProviderOauthCallbackErrors = {\n    /**\n     * Bad request\n     */\n    400: BadRequestError;\n};\n\nexport type ProviderOauthCallbackError = ProviderOauthCallbackErrors[keyof ProviderOauthCallbackErrors];\n\nexport type ProviderOauthCallbackResponses = {\n    /**\n     * OAuth callback processed successfully\n     */\n    200: boolean;\n};\n\nexport type ProviderOauthCallbackResponse = ProviderOauthCallbackResponses[keyof ProviderOauthCallbackResponses];\n\nexport type FindTextData = {\n    body?: never;\n    path?: never;\n    query: {\n        directory?: string;\n        pattern: string;\n    };\n    url: '/find';\n};\n\nexport type FindTextResponses = {\n    /**\n     * Matches\n     */\n    200: Array<{\n        path: {\n            text: string;\n        };\n        lines: {\n            text: string;\n        };\n        line_number: number;\n        absolute_offset: number;\n        submatches: Array<{\n            match: {\n                text: string;\n            };\n            start: number;\n            end: number;\n        }>;\n    }>;\n};\n\nexport type FindTextResponse = FindTextResponses[keyof FindTextResponses];\n\nexport type FindFilesData = {\n    body?: never;\n    path?: never;\n    query: {\n        directory?: string;\n        query: string;\n        dirs?: 'true' | 'false';\n        type?: 'file' | 'directory';\n        limit?: number;\n    };\n    url: '/find/file';\n};\n\nexport type FindFilesResponses = {\n    /**\n     * File paths\n     */\n    200: Array<string>;\n};\n\nexport type FindFilesResponse = FindFilesResponses[keyof FindFilesResponses];\n\nexport type FindSymbolsData = {\n    body?: never;\n    path?: never;\n    query: {\n        directory?: string;\n        query: string;\n    };\n    url: '/find/symbol';\n};\n\nexport type FindSymbolsResponses = {\n    /**\n     * Symbols\n     */\n    200: Array<Symbol>;\n};\n\nexport type FindSymbolsResponse = FindSymbolsResponses[keyof FindSymbolsResponses];\n\nexport type FileListData = {\n    body?: never;\n    path?: never;\n    query: {\n        directory?: string;\n        path: string;\n    };\n    url: '/file';\n};\n\nexport type FileListResponses = {\n    /**\n     * Files and directories\n     */\n    200: Array<FileNode>;\n};\n\nexport type FileListResponse = FileListResponses[keyof FileListResponses];\n\nexport type FileReadData = {\n    body?: never;\n    path?: never;\n    query: {\n        directory?: string;\n        path: string;\n    };\n    url: '/file/content';\n};\n\nexport type FileReadResponses = {\n    /**\n     * File content\n     */\n    200: FileContent;\n};\n\nexport type FileReadResponse = FileReadResponses[keyof FileReadResponses];\n\nexport type FileStatusData = {\n    body?: never;\n    path?: never;\n    query?: {\n        directory?: string;\n    };\n    url: '/file/status';\n};\n\nexport type FileStatusResponses = {\n    /**\n     * File status\n     */\n    200: Array<File>;\n};\n\nexport type FileStatusResponse = FileStatusResponses[keyof FileStatusResponses];\n\nexport type AppLogData = {\n    body?: {\n        /**\n         * Service name for the log entry\n         */\n        service: string;\n        /**\n         * Log level\n         */\n        level: 'debug' | 'info' | 'error' | 'warn';\n        /**\n         * Log message\n         */\n        message: string;\n        /**\n         * Additional metadata for the log entry\n         */\n        extra?: {\n            [key: string]: unknown;\n        };\n    };\n    path?: never;\n    query?: {\n        directory?: string;\n    };\n    url: '/log';\n};\n\nexport type AppLogErrors = {\n    /**\n     * Bad request\n     */\n    400: BadRequestError;\n};\n\nexport type AppLogError = AppLogErrors[keyof AppLogErrors];\n\nexport type AppLogResponses = {\n    /**\n     * Log entry written successfully\n     */\n    200: boolean;\n};\n\nexport type AppLogResponse = AppLogResponses[keyof AppLogResponses];\n\nexport type AppAgentsData = {\n    body?: never;\n    path?: never;\n    query?: {\n        directory?: string;\n    };\n    url: '/agent';\n};\n\nexport type AppAgentsResponses = {\n    /**\n     * List of agents\n     */\n    200: Array<Agent>;\n};\n\nexport type AppAgentsResponse = AppAgentsResponses[keyof AppAgentsResponses];\n\nexport type McpStatusData = {\n    body?: never;\n    path?: never;\n    query?: {\n        directory?: string;\n    };\n    url: '/mcp';\n};\n\nexport type McpStatusResponses = {\n    /**\n     * MCP server status\n     */\n    200: {\n        [key: string]: McpStatus;\n    };\n};\n\nexport type McpStatusResponse = McpStatusResponses[keyof McpStatusResponses];\n\nexport type McpAddData = {\n    body?: {\n        name: string;\n        config: McpLocalConfig | McpRemoteConfig;\n    };\n    path?: never;\n    query?: {\n        directory?: string;\n    };\n    url: '/mcp';\n};\n\nexport type McpAddErrors = {\n    /**\n     * Bad request\n     */\n    400: BadRequestError;\n};\n\nexport type McpAddError = McpAddErrors[keyof McpAddErrors];\n\nexport type McpAddResponses = {\n    /**\n     * MCP server added successfully\n     */\n    200: {\n        [key: string]: McpStatus;\n    };\n};\n\nexport type McpAddResponse = McpAddResponses[keyof McpAddResponses];\n\nexport type McpAuthRemoveData = {\n    body?: never;\n    path: {\n        name: string;\n    };\n    query?: {\n        directory?: string;\n    };\n    url: '/mcp/{name}/auth';\n};\n\nexport type McpAuthRemoveErrors = {\n    /**\n     * Not found\n     */\n    404: NotFoundError;\n};\n\nexport type McpAuthRemoveError = McpAuthRemoveErrors[keyof McpAuthRemoveErrors];\n\nexport type McpAuthRemoveResponses = {\n    /**\n     * OAuth credentials removed\n     */\n    200: {\n        success: true;\n    };\n};\n\nexport type McpAuthRemoveResponse = McpAuthRemoveResponses[keyof McpAuthRemoveResponses];\n\nexport type McpAuthStartData = {\n    body?: never;\n    path: {\n        name: string;\n    };\n    query?: {\n        directory?: string;\n    };\n    url: '/mcp/{name}/auth';\n};\n\nexport type McpAuthStartErrors = {\n    /**\n     * Bad request\n     */\n    400: BadRequestError;\n    /**\n     * Not found\n     */\n    404: NotFoundError;\n};\n\nexport type McpAuthStartError = McpAuthStartErrors[keyof McpAuthStartErrors];\n\nexport type McpAuthStartResponses = {\n    /**\n     * OAuth flow started\n     */\n    200: {\n        /**\n         * URL to open in browser for authorization\n         */\n        authorizationUrl: string;\n    };\n};\n\nexport type McpAuthStartResponse = McpAuthStartResponses[keyof McpAuthStartResponses];\n\nexport type McpAuthCallbackData = {\n    body?: {\n        /**\n         * Authorization code from OAuth callback\n         */\n        code: string;\n    };\n    path: {\n        name: string;\n    };\n    query?: {\n        directory?: string;\n    };\n    url: '/mcp/{name}/auth/callback';\n};\n\nexport type McpAuthCallbackErrors = {\n    /**\n     * Bad request\n     */\n    400: BadRequestError;\n    /**\n     * Not found\n     */\n    404: NotFoundError;\n};\n\nexport type McpAuthCallbackError = McpAuthCallbackErrors[keyof McpAuthCallbackErrors];\n\nexport type McpAuthCallbackResponses = {\n    /**\n     * OAuth authentication completed\n     */\n    200: McpStatus;\n};\n\nexport type McpAuthCallbackResponse = McpAuthCallbackResponses[keyof McpAuthCallbackResponses];\n\nexport type McpAuthAuthenticateData = {\n    body?: never;\n    path: {\n        name: string;\n    };\n    query?: {\n        directory?: string;\n    };\n    url: '/mcp/{name}/auth/authenticate';\n};\n\nexport type McpAuthAuthenticateErrors = {\n    /**\n     * Bad request\n     */\n    400: BadRequestError;\n    /**\n     * Not found\n     */\n    404: NotFoundError;\n};\n\nexport type McpAuthAuthenticateError = McpAuthAuthenticateErrors[keyof McpAuthAuthenticateErrors];\n\nexport type McpAuthAuthenticateResponses = {\n    /**\n     * OAuth authentication completed\n     */\n    200: McpStatus;\n};\n\nexport type McpAuthAuthenticateResponse = McpAuthAuthenticateResponses[keyof McpAuthAuthenticateResponses];\n\nexport type McpConnectData = {\n    body?: never;\n    path: {\n        name: string;\n    };\n    query?: {\n        directory?: string;\n    };\n    url: '/mcp/{name}/connect';\n};\n\nexport type McpConnectResponses = {\n    /**\n     * MCP server connected successfully\n     */\n    200: boolean;\n};\n\nexport type McpConnectResponse = McpConnectResponses[keyof McpConnectResponses];\n\nexport type McpDisconnectData = {\n    body?: never;\n    path: {\n        name: string;\n    };\n    query?: {\n        directory?: string;\n    };\n    url: '/mcp/{name}/disconnect';\n};\n\nexport type McpDisconnectResponses = {\n    /**\n     * MCP server disconnected successfully\n     */\n    200: boolean;\n};\n\nexport type McpDisconnectResponse = McpDisconnectResponses[keyof McpDisconnectResponses];\n\nexport type LspStatusData = {\n    body?: never;\n    path?: never;\n    query?: {\n        directory?: string;\n    };\n    url: '/lsp';\n};\n\nexport type LspStatusResponses = {\n    /**\n     * LSP server status\n     */\n    200: Array<LspStatus>;\n};\n\nexport type LspStatusResponse = LspStatusResponses[keyof LspStatusResponses];\n\nexport type FormatterStatusData = {\n    body?: never;\n    path?: never;\n    query?: {\n        directory?: string;\n    };\n    url: '/formatter';\n};\n\nexport type FormatterStatusResponses = {\n    /**\n     * Formatter status\n     */\n    200: Array<FormatterStatus>;\n};\n\nexport type FormatterStatusResponse = FormatterStatusResponses[keyof FormatterStatusResponses];\n\nexport type TuiAppendPromptData = {\n    body?: {\n        text: string;\n    };\n    path?: never;\n    query?: {\n        directory?: string;\n    };\n    url: '/tui/append-prompt';\n};\n\nexport type TuiAppendPromptErrors = {\n    /**\n     * Bad request\n     */\n    400: BadRequestError;\n};\n\nexport type TuiAppendPromptError = TuiAppendPromptErrors[keyof TuiAppendPromptErrors];\n\nexport type TuiAppendPromptResponses = {\n    /**\n     * Prompt processed successfully\n     */\n    200: boolean;\n};\n\nexport type TuiAppendPromptResponse = TuiAppendPromptResponses[keyof TuiAppendPromptResponses];\n\nexport type TuiOpenHelpData = {\n    body?: never;\n    path?: never;\n    query?: {\n        directory?: string;\n    };\n    url: '/tui/open-help';\n};\n\nexport type TuiOpenHelpResponses = {\n    /**\n     * Help dialog opened successfully\n     */\n    200: boolean;\n};\n\nexport type TuiOpenHelpResponse = TuiOpenHelpResponses[keyof TuiOpenHelpResponses];\n\nexport type TuiOpenSessionsData = {\n    body?: never;\n    path?: never;\n    query?: {\n        directory?: string;\n    };\n    url: '/tui/open-sessions';\n};\n\nexport type TuiOpenSessionsResponses = {\n    /**\n     * Session dialog opened successfully\n     */\n    200: boolean;\n};\n\nexport type TuiOpenSessionsResponse = TuiOpenSessionsResponses[keyof TuiOpenSessionsResponses];\n\nexport type TuiOpenThemesData = {\n    body?: never;\n    path?: never;\n    query?: {\n        directory?: string;\n    };\n    url: '/tui/open-themes';\n};\n\nexport type TuiOpenThemesResponses = {\n    /**\n     * Theme dialog opened successfully\n     */\n    200: boolean;\n};\n\nexport type TuiOpenThemesResponse = TuiOpenThemesResponses[keyof TuiOpenThemesResponses];\n\nexport type TuiOpenModelsData = {\n    body?: never;\n    path?: never;\n    query?: {\n        directory?: string;\n    };\n    url: '/tui/open-models';\n};\n\nexport type TuiOpenModelsResponses = {\n    /**\n     * Model dialog opened successfully\n     */\n    200: boolean;\n};\n\nexport type TuiOpenModelsResponse = TuiOpenModelsResponses[keyof TuiOpenModelsResponses];\n\nexport type TuiSubmitPromptData = {\n    body?: never;\n    path?: never;\n    query?: {\n        directory?: string;\n    };\n    url: '/tui/submit-prompt';\n};\n\nexport type TuiSubmitPromptResponses = {\n    /**\n     * Prompt submitted successfully\n     */\n    200: boolean;\n};\n\nexport type TuiSubmitPromptResponse = TuiSubmitPromptResponses[keyof TuiSubmitPromptResponses];\n\nexport type TuiClearPromptData = {\n    body?: never;\n    path?: never;\n    query?: {\n        directory?: string;\n    };\n    url: '/tui/clear-prompt';\n};\n\nexport type TuiClearPromptResponses = {\n    /**\n     * Prompt cleared successfully\n     */\n    200: boolean;\n};\n\nexport type TuiClearPromptResponse = TuiClearPromptResponses[keyof TuiClearPromptResponses];\n\nexport type TuiExecuteCommandData = {\n    body?: {\n        command: string;\n    };\n    path?: never;\n    query?: {\n        directory?: string;\n    };\n    url: '/tui/execute-command';\n};\n\nexport type TuiExecuteCommandErrors = {\n    /**\n     * Bad request\n     */\n    400: BadRequestError;\n};\n\nexport type TuiExecuteCommandError = TuiExecuteCommandErrors[keyof TuiExecuteCommandErrors];\n\nexport type TuiExecuteCommandResponses = {\n    /**\n     * Command executed successfully\n     */\n    200: boolean;\n};\n\nexport type TuiExecuteCommandResponse = TuiExecuteCommandResponses[keyof TuiExecuteCommandResponses];\n\nexport type TuiShowToastData = {\n    body?: {\n        title?: string;\n        message: string;\n        variant: 'info' | 'success' | 'warning' | 'error';\n        /**\n         * Duration in milliseconds\n         */\n        duration?: number;\n    };\n    path?: never;\n    query?: {\n        directory?: string;\n    };\n    url: '/tui/show-toast';\n};\n\nexport type TuiShowToastResponses = {\n    /**\n     * Toast notification shown successfully\n     */\n    200: boolean;\n};\n\nexport type TuiShowToastResponse = TuiShowToastResponses[keyof TuiShowToastResponses];\n\nexport type TuiPublishData = {\n    body?: EventTuiPromptAppend | EventTuiCommandExecute | EventTuiToastShow;\n    path?: never;\n    query?: {\n        directory?: string;\n    };\n    url: '/tui/publish';\n};\n\nexport type TuiPublishErrors = {\n    /**\n     * Bad request\n     */\n    400: BadRequestError;\n};\n\nexport type TuiPublishError = TuiPublishErrors[keyof TuiPublishErrors];\n\nexport type TuiPublishResponses = {\n    /**\n     * Event published successfully\n     */\n    200: boolean;\n};\n\nexport type TuiPublishResponse = TuiPublishResponses[keyof TuiPublishResponses];\n\nexport type TuiControlNextData = {\n    body?: never;\n    path?: never;\n    query?: {\n        directory?: string;\n    };\n    url: '/tui/control/next';\n};\n\nexport type TuiControlNextResponses = {\n    /**\n     * Next TUI request\n     */\n    200: {\n        path: string;\n        body: unknown;\n    };\n};\n\nexport type TuiControlNextResponse = TuiControlNextResponses[keyof TuiControlNextResponses];\n\nexport type TuiControlResponseData = {\n    body?: unknown;\n    path?: never;\n    query?: {\n        directory?: string;\n    };\n    url: '/tui/control/response';\n};\n\nexport type TuiControlResponseResponses = {\n    /**\n     * Response submitted successfully\n     */\n    200: boolean;\n};\n\nexport type TuiControlResponseResponse = TuiControlResponseResponses[keyof TuiControlResponseResponses];\n\nexport type AuthSetData = {\n    body?: Auth;\n    path: {\n        providerID: string;\n    };\n    query?: {\n        directory?: string;\n    };\n    url: '/auth/{providerID}';\n};\n\nexport type AuthSetErrors = {\n    /**\n     * Bad request\n     */\n    400: BadRequestError;\n};\n\nexport type AuthSetError = AuthSetErrors[keyof AuthSetErrors];\n\nexport type AuthSetResponses = {\n    /**\n     * Successfully set authentication credentials\n     */\n    200: boolean;\n};\n\nexport type AuthSetResponse = AuthSetResponses[keyof AuthSetResponses];\n\nexport type EventSubscribeData = {\n    body?: never;\n    path?: never;\n    query?: {\n        directory?: string;\n    };\n    url: '/event';\n};\n\nexport type EventSubscribeResponses = {\n    /**\n     * Event stream\n     */\n    200: Event;\n};\n\nexport type EventSubscribeResponse = EventSubscribeResponses[keyof EventSubscribeResponses];\n"
  },
  {
    "path": "packages/openapi-ts-tests/sdks/__snapshots__/opencode/flat/client/client.gen.ts",
    "content": "// 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 (options: RequestOptions) => {\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 url = buildUrl(opts);\n\n    return { opts, url };\n  };\n\n  const request: Client['request'] = async (options) => {\n    // @ts-expect-error\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"
  },
  {
    "path": "packages/openapi-ts-tests/sdks/__snapshots__/opencode/flat/client/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type { Auth } from '../core/auth.gen';\nexport type { QuerySerializerOptions } from '../core/bodySerializer.gen';\nexport {\n  formDataBodySerializer,\n  jsonBodySerializer,\n  urlSearchParamsBodySerializer,\n} from '../core/bodySerializer.gen';\nexport { buildClientParams } from '../core/params.gen';\nexport { serializeQueryKeyValue } from '../core/queryKeySerializer.gen';\nexport { createClient } from './client.gen';\nexport type {\n  Client,\n  ClientOptions,\n  Config,\n  CreateClientConfig,\n  Options,\n  RequestOptions,\n  RequestResult,\n  ResolvedRequestOptions,\n  ResponseStyle,\n  TDataShape,\n} from './types.gen';\nexport { createConfig, mergeHeaders } from './utils.gen';\n"
  },
  {
    "path": "packages/openapi-ts-tests/sdks/__snapshots__/opencode/flat/client/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { Auth } from '../core/auth.gen';\nimport type {\n  ServerSentEventsOptions,\n  ServerSentEventsResult,\n} from '../core/serverSentEvents.gen';\nimport type { Client as CoreClient, Config as CoreConfig } from '../core/types.gen';\nimport type { Middleware } from './utils.gen';\n\nexport type ResponseStyle = 'data' | 'fields';\n\nexport interface Config<T extends ClientOptions = ClientOptions>\n  extends Omit<RequestInit, 'body' | 'headers' | 'method'>, CoreConfig {\n  /**\n   * Base URL for all requests made by this client.\n   */\n  baseUrl?: T['baseUrl'];\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   * Please don't use the Fetch client for Next.js applications. The `next`\n   * options won't have any effect.\n   *\n   * Install {@link https://www.npmjs.com/package/@hey-api/client-next `@hey-api/client-next`} instead.\n   */\n  next?: never;\n  /**\n   * Return the response data parsed in a specified format. By default, `auto`\n   * will infer the appropriate method from the `Content-Type` response header.\n   * You can override this behavior with any of the {@link Body} methods.\n   * Select `stream` if you don't want to parse response data at all.\n   *\n   * @default 'auto'\n   */\n  parseAs?: 'arrayBuffer' | 'auto' | 'blob' | 'formData' | 'json' | 'stream' | 'text';\n  /**\n   * Should we return only data or multiple fields (data, error, response, etc.)?\n   *\n   * @default 'fields'\n   */\n  responseStyle?: ResponseStyle;\n  /**\n   * Throw an error instead of returning it in the response?\n   *\n   * @default false\n   */\n  throwOnError?: T['throwOnError'];\n}\n\nexport interface RequestOptions<\n  TData = unknown,\n  TResponseStyle extends ResponseStyle = 'fields',\n  ThrowOnError extends boolean = boolean,\n  Url extends string = string,\n>\n  extends\n    Config<{\n      responseStyle: TResponseStyle;\n      throwOnError: ThrowOnError;\n    }>,\n    Pick<\n      ServerSentEventsOptions<TData>,\n      | 'onRequest'\n      | 'onSseError'\n      | 'onSseEvent'\n      | 'sseDefaultRetryDelay'\n      | 'sseMaxRetryAttempts'\n      | 'sseMaxRetryDelay'\n    > {\n  /**\n   * Any body that you want to add to your request.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/fetch#body}\n   */\n  body?: unknown;\n  path?: Record<string, unknown>;\n  query?: Record<string, unknown>;\n  /**\n   * Security mechanism(s) to use for the request.\n   */\n  security?: ReadonlyArray<Auth>;\n  url: Url;\n}\n\nexport interface ResolvedRequestOptions<\n  TResponseStyle extends ResponseStyle = 'fields',\n  ThrowOnError extends boolean = boolean,\n  Url extends string = string,\n> extends RequestOptions<unknown, TResponseStyle, ThrowOnError, Url> {\n  serializedBody?: string;\n}\n\nexport type RequestResult<\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = boolean,\n  TResponseStyle extends ResponseStyle = 'fields',\n> = ThrowOnError extends true\n  ? Promise<\n      TResponseStyle extends 'data'\n        ? TData extends Record<string, unknown>\n          ? TData[keyof TData]\n          : TData\n        : {\n            data: TData extends Record<string, unknown> ? TData[keyof TData] : TData;\n            request: Request;\n            response: Response;\n          }\n    >\n  : Promise<\n      TResponseStyle extends 'data'\n        ? (TData extends Record<string, unknown> ? TData[keyof TData] : TData) | undefined\n        : (\n            | {\n                data: TData extends Record<string, unknown> ? TData[keyof TData] : TData;\n                error: undefined;\n              }\n            | {\n                data: undefined;\n                error: TError extends Record<string, unknown> ? TError[keyof TError] : TError;\n              }\n          ) & {\n            request: Request;\n            response: Response;\n          }\n    >;\n\nexport interface ClientOptions {\n  baseUrl?: string;\n  responseStyle?: ResponseStyle;\n  throwOnError?: boolean;\n}\n\ntype MethodFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'>,\n) => RequestResult<TData, TError, ThrowOnError, TResponseStyle>;\n\ntype SseFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'>,\n) => Promise<ServerSentEventsResult<TData, TError>>;\n\ntype RequestFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'> &\n    Pick<Required<RequestOptions<TData, TResponseStyle, ThrowOnError>>, 'method'>,\n) => RequestResult<TData, TError, ThrowOnError, TResponseStyle>;\n\ntype BuildUrlFn = <\n  TData extends {\n    body?: unknown;\n    path?: Record<string, unknown>;\n    query?: Record<string, unknown>;\n    url: string;\n  },\n>(\n  options: TData & Options<TData>,\n) => string;\n\nexport type Client = CoreClient<RequestFn, Config, MethodFn, BuildUrlFn, SseFn> & {\n  interceptors: Middleware<Request, Response, unknown, ResolvedRequestOptions>;\n};\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 = ClientOptions> = (\n  override?: Config<ClientOptions & T>,\n) => Config<Required<ClientOptions> & T>;\n\nexport interface TDataShape {\n  body?: unknown;\n  headers?: unknown;\n  path?: unknown;\n  query?: unknown;\n  url: string;\n}\n\ntype OmitKeys<T, K> = Pick<T, Exclude<keyof T, K>>;\n\nexport type Options<\n  TData extends TDataShape = TDataShape,\n  ThrowOnError extends boolean = boolean,\n  TResponse = unknown,\n  TResponseStyle extends ResponseStyle = 'fields',\n> = OmitKeys<\n  RequestOptions<TResponse, TResponseStyle, ThrowOnError>,\n  'body' | 'path' | 'query' | 'url'\n> &\n  ([TData] extends [never] ? unknown : Omit<TData, 'url'>);\n"
  },
  {
    "path": "packages/openapi-ts-tests/sdks/__snapshots__/opencode/flat/client/utils.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/sdks/__snapshots__/opencode/flat/client.gen.ts",
    "content": "// 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>());\n"
  },
  {
    "path": "packages/openapi-ts-tests/sdks/__snapshots__/opencode/flat/core/auth.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/sdks/__snapshots__/opencode/flat/core/bodySerializer.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/sdks/__snapshots__/opencode/flat/core/params.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/sdks/__snapshots__/opencode/flat/core/pathSerializer.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/sdks/__snapshots__/opencode/flat/core/queryKeySerializer.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\n/**\n * JSON-friendly union that mirrors what Pinia Colada can hash.\n */\nexport type JsonValue =\n  | null\n  | string\n  | number\n  | boolean\n  | JsonValue[]\n  | { [key: string]: JsonValue };\n\n/**\n * Replacer that converts non-JSON values (bigint, Date, etc.) to safe substitutes.\n */\nexport const queryKeyJsonReplacer = (_key: string, value: unknown) => {\n  if (value === undefined || typeof value === 'function' || typeof value === 'symbol') {\n    return undefined;\n  }\n  if (typeof value === 'bigint') {\n    return value.toString();\n  }\n  if (value instanceof Date) {\n    return value.toISOString();\n  }\n  return value;\n};\n\n/**\n * Safely stringifies a value and parses it back into a JsonValue.\n */\nexport const stringifyToJsonValue = (input: unknown): JsonValue | undefined => {\n  try {\n    const json = JSON.stringify(input, queryKeyJsonReplacer);\n    if (json === undefined) {\n      return undefined;\n    }\n    return JSON.parse(json) as JsonValue;\n  } catch {\n    return undefined;\n  }\n};\n\n/**\n * Detects plain objects (including objects with a null prototype).\n */\nconst isPlainObject = (value: unknown): value is Record<string, unknown> => {\n  if (value === null || typeof value !== 'object') {\n    return false;\n  }\n  const prototype = Object.getPrototypeOf(value as object);\n  return prototype === Object.prototype || prototype === null;\n};\n\n/**\n * Turns URLSearchParams into a sorted JSON object for deterministic keys.\n */\nconst serializeSearchParams = (params: URLSearchParams): JsonValue => {\n  const entries = Array.from(params.entries()).sort(([a], [b]) => a.localeCompare(b));\n  const result: Record<string, JsonValue> = {};\n\n  for (const [key, value] of entries) {\n    const existing = result[key];\n    if (existing === undefined) {\n      result[key] = value;\n      continue;\n    }\n\n    if (Array.isArray(existing)) {\n      (existing as string[]).push(value);\n    } else {\n      result[key] = [existing, value];\n    }\n  }\n\n  return result;\n};\n\n/**\n * Normalizes any accepted value into a JSON-friendly shape for query keys.\n */\nexport const serializeQueryKeyValue = (value: unknown): JsonValue | undefined => {\n  if (value === null) {\n    return null;\n  }\n\n  if (typeof value === 'string' || typeof value === 'number' || typeof value === 'boolean') {\n    return value;\n  }\n\n  if (value === undefined || typeof value === 'function' || typeof value === 'symbol') {\n    return undefined;\n  }\n\n  if (typeof value === 'bigint') {\n    return value.toString();\n  }\n\n  if (value instanceof Date) {\n    return value.toISOString();\n  }\n\n  if (Array.isArray(value)) {\n    return stringifyToJsonValue(value);\n  }\n\n  if (typeof URLSearchParams !== 'undefined' && value instanceof URLSearchParams) {\n    return serializeSearchParams(value);\n  }\n\n  if (isPlainObject(value)) {\n    return stringifyToJsonValue(value);\n  }\n\n  return undefined;\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/sdks/__snapshots__/opencode/flat/core/serverSentEvents.gen.ts",
    "content": "// 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 const 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            // Normalize line endings: CRLF -> LF, then CR -> LF\n            buffer = buffer.replace(/\\r\\n/g, '\\n').replace(/\\r/g, '\\n');\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"
  },
  {
    "path": "packages/openapi-ts-tests/sdks/__snapshots__/opencode/flat/core/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { Auth, AuthToken } from './auth.gen';\nimport type { BodySerializer, QuerySerializer, QuerySerializerOptions } from './bodySerializer.gen';\n\nexport type HttpMethod =\n  | 'connect'\n  | 'delete'\n  | 'get'\n  | 'head'\n  | 'options'\n  | 'patch'\n  | 'post'\n  | 'put'\n  | 'trace';\n\nexport type Client<\n  RequestFn = never,\n  Config = unknown,\n  MethodFn = never,\n  BuildUrlFn = never,\n  SseFn = never,\n> = {\n  /**\n   * Returns the final request URL.\n   */\n  buildUrl: BuildUrlFn;\n  getConfig: () => Config;\n  request: RequestFn;\n  setConfig: (config: Config) => Config;\n} & {\n  [K in HttpMethod]: MethodFn;\n} & ([SseFn] extends [never] ? { sse?: never } : { sse: { [K in HttpMethod]: SseFn } });\n\nexport interface Config {\n  /**\n   * Auth token or a function returning auth token. The resolved value will be\n   * added to the request payload as defined by its `security` array.\n   */\n  auth?: ((auth: Auth) => Promise<AuthToken> | AuthToken) | AuthToken;\n  /**\n   * A function for serializing request body parameter. By default,\n   * {@link JSON.stringify()} will be used.\n   */\n  bodySerializer?: BodySerializer | null;\n  /**\n   * An object containing any HTTP headers that you want to pre-populate your\n   * `Headers` object with.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/Headers/Headers#init See more}\n   */\n  headers?:\n    | RequestInit['headers']\n    | Record<\n        string,\n        string | number | boolean | (string | number | boolean)[] | null | undefined | unknown\n      >;\n  /**\n   * The request method.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/fetch#method See more}\n   */\n  method?: Uppercase<HttpMethod>;\n  /**\n   * A function for serializing request query parameters. By default, arrays\n   * will be exploded in form style, objects will be exploded in deepObject\n   * style, and reserved characters are percent-encoded.\n   *\n   * This method will have no effect if the native `paramsSerializer()` Axios\n   * API function is used.\n   *\n   * {@link https://swagger.io/docs/specification/serialization/#query View examples}\n   */\n  querySerializer?: QuerySerializer | QuerySerializerOptions;\n  /**\n   * A function validating request data. This is useful if you want to ensure\n   * the request conforms to the desired shape, so it can be safely sent to\n   * the server.\n   */\n  requestValidator?: (data: unknown) => Promise<unknown>;\n  /**\n   * A function transforming response data before it's returned. This is useful\n   * for post-processing data, e.g. converting ISO strings into Date objects.\n   */\n  responseTransformer?: (data: unknown) => Promise<unknown>;\n  /**\n   * A function validating response data. This is useful if you want to ensure\n   * the response conforms to the desired shape, so it can be safely passed to\n   * the transformers and returned to the user.\n   */\n  responseValidator?: (data: unknown) => Promise<unknown>;\n}\n\ntype IsExactlyNeverOrNeverUndefined<T> = [T] extends [never]\n  ? true\n  : [T] extends [never | undefined]\n    ? [undefined] extends [T]\n      ? false\n      : true\n    : false;\n\nexport type OmitNever<T extends Record<string, unknown>> = {\n  [K in keyof T as IsExactlyNeverOrNeverUndefined<T[K]> extends true ? never : K]: T[K];\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/sdks/__snapshots__/opencode/flat/core/utils.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/sdks/__snapshots__/opencode/flat/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport { appAgents, appLog, authSet, commandList, configGet, configProviders, configUpdate, eventSubscribe, fileList, fileRead, fileStatus, findFiles, findSymbols, findText, formatterStatus, globalDispose, globalEvent, globalHealth, instanceDispose, lspStatus, mcpAdd, mcpAuthAuthenticate, mcpAuthCallback, mcpAuthRemove, mcpAuthStart, mcpConnect, mcpDisconnect, mcpStatus, type Options, partDelete, partUpdate, pathGet, permissionList, permissionReply, permissionRespond, projectCurrent, projectList, projectUpdate, providerAuth, providerList, providerOauthAuthorize, providerOauthCallback, ptyConnect, ptyCreate, ptyGet, ptyList, ptyRemove, ptyUpdate, sessionAbort, sessionChildren, sessionCommand, sessionCreate, sessionDelete, sessionDiff, sessionFork, sessionGet, sessionInit, sessionList, sessionMessage, sessionMessages, sessionPrompt, sessionPromptAsync, sessionRevert, sessionShare, sessionShell, sessionStatus, sessionSummarize, sessionTodo, sessionUnrevert, sessionUnshare, sessionUpdate, toolIds, toolList, tuiAppendPrompt, tuiClearPrompt, tuiControlNext, tuiControlResponse, tuiExecuteCommand, tuiOpenHelp, tuiOpenModels, tuiOpenSessions, tuiOpenThemes, tuiPublish, tuiShowToast, tuiSubmitPrompt, vcsGet } from './sdk.gen';\nexport type { Agent, AgentConfig, AgentPart, AgentPartInput, ApiAuth, ApiError, AppAgentsData, AppAgentsResponse, AppAgentsResponses, AppLogData, AppLogError, AppLogErrors, AppLogResponse, AppLogResponses, AssistantMessage, Auth, AuthSetData, AuthSetError, AuthSetErrors, AuthSetResponse, AuthSetResponses, BadRequestError, ClientOptions, Command, CommandListData, CommandListResponse, CommandListResponses, CompactionPart, Config, ConfigGetData, ConfigGetResponse, ConfigGetResponses, ConfigProvidersData, ConfigProvidersResponse, ConfigProvidersResponses, ConfigUpdateData, ConfigUpdateError, ConfigUpdateErrors, ConfigUpdateResponse, ConfigUpdateResponses, Event, EventCommandExecuted, EventFileEdited, EventFileWatcherUpdated, EventGlobalDisposed, EventInstallationUpdateAvailable, EventInstallationUpdated, EventLspClientDiagnostics, EventLspUpdated, EventMcpToolsChanged, EventMessagePartRemoved, EventMessagePartUpdated, EventMessageRemoved, EventMessageUpdated, EventPermissionAsked, EventPermissionReplied, EventProjectUpdated, EventPtyCreated, EventPtyDeleted, EventPtyExited, EventPtyUpdated, EventServerConnected, EventServerInstanceDisposed, EventSessionCompacted, EventSessionCreated, EventSessionDeleted, EventSessionDiff, EventSessionError, EventSessionIdle, EventSessionStatus, EventSessionUpdated, EventSubscribeData, EventSubscribeResponse, EventSubscribeResponses, EventTodoUpdated, EventTuiCommandExecute, EventTuiPromptAppend, EventTuiToastShow, EventVcsBranchUpdated, File, FileContent, FileDiff, FileListData, FileListResponse, FileListResponses, FileNode, FilePart, FilePartInput, FilePartSource, FilePartSourceText, FileReadData, FileReadResponse, FileReadResponses, FileSource, FileStatusData, FileStatusResponse, FileStatusResponses, FindFilesData, FindFilesResponse, FindFilesResponses, FindSymbolsData, FindSymbolsResponse, FindSymbolsResponses, FindTextData, FindTextResponse, FindTextResponses, FormatterStatus, FormatterStatusData, FormatterStatusResponse, FormatterStatusResponses, GlobalDisposeData, GlobalDisposeResponse, GlobalDisposeResponses, GlobalEvent, GlobalEventData, GlobalEventResponse, GlobalEventResponses, GlobalHealthData, GlobalHealthResponse, GlobalHealthResponses, InstanceDisposeData, InstanceDisposeResponse, InstanceDisposeResponses, KeybindsConfig, LayoutConfig, LogLevel, LspStatus, LspStatusData, LspStatusResponse, LspStatusResponses, McpAddData, McpAddError, McpAddErrors, McpAddResponse, McpAddResponses, McpAuthAuthenticateData, McpAuthAuthenticateError, McpAuthAuthenticateErrors, McpAuthAuthenticateResponse, McpAuthAuthenticateResponses, McpAuthCallbackData, McpAuthCallbackError, McpAuthCallbackErrors, McpAuthCallbackResponse, McpAuthCallbackResponses, McpAuthRemoveData, McpAuthRemoveError, McpAuthRemoveErrors, McpAuthRemoveResponse, McpAuthRemoveResponses, McpAuthStartData, McpAuthStartError, McpAuthStartErrors, McpAuthStartResponse, McpAuthStartResponses, McpConnectData, McpConnectResponse, McpConnectResponses, McpDisconnectData, McpDisconnectResponse, McpDisconnectResponses, McpLocalConfig, McpOAuthConfig, McpRemoteConfig, McpStatus, McpStatusConnected, McpStatusData, McpStatusDisabled, McpStatusFailed, McpStatusNeedsAuth, McpStatusNeedsClientRegistration, McpStatusResponse, McpStatusResponses, Message, MessageAbortedError, MessageOutputLengthError, Model, NotFoundError, OAuth, Part, PartDeleteData, PartDeleteError, PartDeleteErrors, PartDeleteResponse, PartDeleteResponses, PartUpdateData, PartUpdateError, PartUpdateErrors, PartUpdateResponse, PartUpdateResponses, PatchPart, Path, PathGetData, PathGetResponse, PathGetResponses, PermissionAction, PermissionActionConfig, PermissionConfig, PermissionListData, PermissionListResponse, PermissionListResponses, PermissionObjectConfig, PermissionReplyData, PermissionReplyError, PermissionReplyErrors, PermissionReplyResponse, PermissionReplyResponses, PermissionRequest, PermissionRespondData, PermissionRespondError, PermissionRespondErrors, PermissionRespondResponse, PermissionRespondResponses, PermissionRule, PermissionRuleConfig, PermissionRuleset, Project, ProjectCurrentData, ProjectCurrentResponse, ProjectCurrentResponses, ProjectListData, ProjectListResponse, ProjectListResponses, ProjectUpdateData, ProjectUpdateError, ProjectUpdateErrors, ProjectUpdateResponse, ProjectUpdateResponses, Provider, ProviderAuthAuthorization, ProviderAuthData, ProviderAuthError, ProviderAuthMethod, ProviderAuthResponse, ProviderAuthResponses, ProviderConfig, ProviderListData, ProviderListResponse, ProviderListResponses, ProviderOauthAuthorizeData, ProviderOauthAuthorizeError, ProviderOauthAuthorizeErrors, ProviderOauthAuthorizeResponse, ProviderOauthAuthorizeResponses, ProviderOauthCallbackData, ProviderOauthCallbackError, ProviderOauthCallbackErrors, ProviderOauthCallbackResponse, ProviderOauthCallbackResponses, Pty, PtyConnectData, PtyConnectError, PtyConnectErrors, PtyConnectResponse, PtyConnectResponses, PtyCreateData, PtyCreateError, PtyCreateErrors, PtyCreateResponse, PtyCreateResponses, PtyGetData, PtyGetError, PtyGetErrors, PtyGetResponse, PtyGetResponses, PtyListData, PtyListResponse, PtyListResponses, PtyRemoveData, PtyRemoveError, PtyRemoveErrors, PtyRemoveResponse, PtyRemoveResponses, PtyUpdateData, PtyUpdateError, PtyUpdateErrors, PtyUpdateResponse, PtyUpdateResponses, Range, ReasoningPart, RetryPart, ServerConfig, Session, SessionAbortData, SessionAbortError, SessionAbortErrors, SessionAbortResponse, SessionAbortResponses, SessionChildrenData, SessionChildrenError, SessionChildrenErrors, SessionChildrenResponse, SessionChildrenResponses, SessionCommandData, SessionCommandError, SessionCommandErrors, SessionCommandResponse, SessionCommandResponses, SessionCreateData, SessionCreateError, SessionCreateErrors, SessionCreateResponse, SessionCreateResponses, SessionDeleteData, SessionDeleteError, SessionDeleteErrors, SessionDeleteResponse, SessionDeleteResponses, SessionDiffData, SessionDiffError, SessionDiffErrors, SessionDiffResponse, SessionDiffResponses, SessionForkData, SessionForkResponse, SessionForkResponses, SessionGetData, SessionGetError, SessionGetErrors, SessionGetResponse, SessionGetResponses, SessionInitData, SessionInitError, SessionInitErrors, SessionInitResponse, SessionInitResponses, SessionListData, SessionListResponse, SessionListResponses, SessionMessageData, SessionMessageError, SessionMessageErrors, SessionMessageResponse, SessionMessageResponses, SessionMessagesData, SessionMessagesError, SessionMessagesErrors, SessionMessagesResponse, SessionMessagesResponses, SessionPromptAsyncData, SessionPromptAsyncError, SessionPromptAsyncErrors, SessionPromptAsyncResponse, SessionPromptAsyncResponses, SessionPromptData, SessionPromptError, SessionPromptErrors, SessionPromptResponse, SessionPromptResponses, SessionRevertData, SessionRevertError, SessionRevertErrors, SessionRevertResponse, SessionRevertResponses, SessionShareData, SessionShareError, SessionShareErrors, SessionShareResponse, SessionShareResponses, SessionShellData, SessionShellError, SessionShellErrors, SessionShellResponse, SessionShellResponses, SessionStatus, SessionStatusData, SessionStatusError, SessionStatusErrors, SessionStatusResponse, SessionStatusResponses, SessionSummarizeData, SessionSummarizeError, SessionSummarizeErrors, SessionSummarizeResponse, SessionSummarizeResponses, SessionTodoData, SessionTodoError, SessionTodoErrors, SessionTodoResponse, SessionTodoResponses, SessionUnrevertData, SessionUnrevertError, SessionUnrevertErrors, SessionUnrevertResponse, SessionUnrevertResponses, SessionUnshareData, SessionUnshareError, SessionUnshareErrors, SessionUnshareResponse, SessionUnshareResponses, SessionUpdateData, SessionUpdateError, SessionUpdateErrors, SessionUpdateResponse, SessionUpdateResponses, SnapshotPart, StepFinishPart, StepStartPart, SubtaskPartInput, Symbol, SymbolSource, TextPart, TextPartInput, Todo, ToolIds, ToolIdsData, ToolIdsError, ToolIdsErrors, ToolIdsResponse, ToolIdsResponses, ToolList, ToolListData, ToolListError, ToolListErrors, ToolListItem, ToolListResponse, ToolListResponses, ToolPart, ToolState, ToolStateCompleted, ToolStateError, ToolStatePending, ToolStateRunning, TuiAppendPromptData, TuiAppendPromptError, TuiAppendPromptErrors, TuiAppendPromptResponse, TuiAppendPromptResponses, TuiClearPromptData, TuiClearPromptResponse, TuiClearPromptResponses, TuiControlNextData, TuiControlNextResponse, TuiControlNextResponses, TuiControlResponseData, TuiControlResponseResponse, TuiControlResponseResponses, TuiExecuteCommandData, TuiExecuteCommandError, TuiExecuteCommandErrors, TuiExecuteCommandResponse, TuiExecuteCommandResponses, TuiOpenHelpData, TuiOpenHelpResponse, TuiOpenHelpResponses, TuiOpenModelsData, TuiOpenModelsResponse, TuiOpenModelsResponses, TuiOpenSessionsData, TuiOpenSessionsResponse, TuiOpenSessionsResponses, TuiOpenThemesData, TuiOpenThemesResponse, TuiOpenThemesResponses, TuiPublishData, TuiPublishError, TuiPublishErrors, TuiPublishResponse, TuiPublishResponses, TuiShowToastData, TuiShowToastResponse, TuiShowToastResponses, TuiSubmitPromptData, TuiSubmitPromptResponse, TuiSubmitPromptResponses, UnknownError, UserMessage, VcsGetData, VcsGetResponse, VcsGetResponses, VcsInfo, WellKnownAuth } from './types.gen';\n"
  },
  {
    "path": "packages/openapi-ts-tests/sdks/__snapshots__/opencode/flat/sdk.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport { buildClientParams, type Client, type Options as Options2, type TDataShape } from './client';\nimport { client } from './client.gen';\nimport type { AgentPartInput, AppAgentsResponses, AppLogErrors, AppLogResponses, Auth, AuthSetErrors, AuthSetResponses, CommandListResponses, Config, ConfigGetResponses, ConfigProvidersResponses, ConfigUpdateErrors, ConfigUpdateResponses, EventSubscribeResponses, EventTuiCommandExecute, EventTuiPromptAppend, EventTuiToastShow, FileListResponses, FilePartInput, FileReadResponses, FileStatusResponses, FindFilesResponses, FindSymbolsResponses, FindTextResponses, FormatterStatusResponses, GlobalDisposeResponses, GlobalEventResponses, GlobalHealthResponses, InstanceDisposeResponses, LspStatusResponses, McpAddErrors, McpAddResponses, McpAuthAuthenticateErrors, McpAuthAuthenticateResponses, McpAuthCallbackErrors, McpAuthCallbackResponses, McpAuthRemoveErrors, McpAuthRemoveResponses, McpAuthStartErrors, McpAuthStartResponses, McpConnectResponses, McpDisconnectResponses, McpLocalConfig, McpRemoteConfig, McpStatusResponses, Part, PartDeleteErrors, PartDeleteResponses, PartUpdateErrors, PartUpdateResponses, PathGetResponses, PermissionListResponses, PermissionReplyErrors, PermissionReplyResponses, PermissionRespondErrors, PermissionRespondResponses, PermissionRuleset, ProjectCurrentResponses, ProjectListResponses, ProjectUpdateErrors, ProjectUpdateResponses, ProviderAuthResponses, ProviderListResponses, ProviderOauthAuthorizeErrors, ProviderOauthAuthorizeResponses, ProviderOauthCallbackErrors, ProviderOauthCallbackResponses, PtyConnectErrors, PtyConnectResponses, PtyCreateErrors, PtyCreateResponses, PtyGetErrors, PtyGetResponses, PtyListResponses, PtyRemoveErrors, PtyRemoveResponses, PtyUpdateErrors, PtyUpdateResponses, SessionAbortErrors, SessionAbortResponses, SessionChildrenErrors, SessionChildrenResponses, SessionCommandErrors, SessionCommandResponses, SessionCreateErrors, SessionCreateResponses, SessionDeleteErrors, SessionDeleteResponses, SessionDiffErrors, SessionDiffResponses, SessionForkResponses, SessionGetErrors, SessionGetResponses, SessionInitErrors, SessionInitResponses, SessionListResponses, SessionMessageErrors, SessionMessageResponses, SessionMessagesErrors, SessionMessagesResponses, SessionPromptAsyncErrors, SessionPromptAsyncResponses, SessionPromptErrors, SessionPromptResponses, SessionRevertErrors, SessionRevertResponses, SessionShareErrors, SessionShareResponses, SessionShellErrors, SessionShellResponses, SessionStatusErrors, SessionStatusResponses, SessionSummarizeErrors, SessionSummarizeResponses, SessionTodoErrors, SessionTodoResponses, SessionUnrevertErrors, SessionUnrevertResponses, SessionUnshareErrors, SessionUnshareResponses, SessionUpdateErrors, SessionUpdateResponses, SubtaskPartInput, TextPartInput, ToolIdsErrors, ToolIdsResponses, ToolListErrors, ToolListResponses, TuiAppendPromptErrors, TuiAppendPromptResponses, TuiClearPromptResponses, TuiControlNextResponses, TuiControlResponseResponses, TuiExecuteCommandErrors, TuiExecuteCommandResponses, TuiOpenHelpResponses, TuiOpenModelsResponses, TuiOpenSessionsResponses, TuiOpenThemesResponses, TuiPublishErrors, TuiPublishResponses, TuiShowToastResponses, TuiSubmitPromptResponses, VcsGetResponses } from './types.gen';\n\nexport type Options<TData extends TDataShape = TDataShape, ThrowOnError extends boolean = boolean> = Options2<TData, ThrowOnError> & {\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 * Get health\n *\n * Get health information about the OpenCode server.\n */\nexport const globalHealth = <ThrowOnError extends boolean = false>(options?: Options<never, ThrowOnError>) => (options?.client ?? client).get<GlobalHealthResponses, unknown, ThrowOnError>({ url: '/global/health', ...options });\n\n/**\n * Get global events\n *\n * Subscribe to global events from the OpenCode system using server-sent events.\n */\nexport const globalEvent = <ThrowOnError extends boolean = false>(options?: Options<never, ThrowOnError>) => (options?.client ?? client).sse.get<GlobalEventResponses, unknown, ThrowOnError>({ url: '/global/event', ...options });\n\n/**\n * Dispose instance\n *\n * Clean up and dispose all OpenCode instances, releasing all resources.\n */\nexport const globalDispose = <ThrowOnError extends boolean = false>(options?: Options<never, ThrowOnError>) => (options?.client ?? client).post<GlobalDisposeResponses, unknown, ThrowOnError>({ url: '/global/dispose', ...options });\n\n/**\n * List all projects\n *\n * Get a list of projects that have been opened with OpenCode.\n */\nexport const projectList = <ThrowOnError extends boolean = false>(parameters?: {\n    directory?: string;\n}, options?: Options<never, ThrowOnError>) => {\n    const params = buildClientParams([parameters], [{ args: [{ in: 'query', key: 'directory' }] }]);\n    return (options?.client ?? client).get<ProjectListResponses, unknown, ThrowOnError>({\n        url: '/project',\n        ...options,\n        ...params\n    });\n};\n\n/**\n * Get current project\n *\n * Retrieve the currently active project that OpenCode is working with.\n */\nexport const projectCurrent = <ThrowOnError extends boolean = false>(parameters?: {\n    directory?: string;\n}, options?: Options<never, ThrowOnError>) => {\n    const params = buildClientParams([parameters], [{ args: [{ in: 'query', key: 'directory' }] }]);\n    return (options?.client ?? client).get<ProjectCurrentResponses, unknown, ThrowOnError>({\n        url: '/project/current',\n        ...options,\n        ...params\n    });\n};\n\n/**\n * Update project\n *\n * Update project properties such as name, icon and color.\n */\nexport const projectUpdate = <ThrowOnError extends boolean = false>(parameters: {\n    projectID: string;\n    directory?: string;\n    name?: string;\n    icon?: {\n        url?: string;\n        color?: string;\n    };\n}, options?: Options<never, ThrowOnError>) => {\n    const params = buildClientParams([parameters], [{ args: [\n                { in: 'path', key: 'projectID' },\n                { in: 'query', key: 'directory' },\n                { in: 'body', key: 'name' },\n                { in: 'body', key: 'icon' }\n            ] }]);\n    return (options?.client ?? client).patch<ProjectUpdateResponses, ProjectUpdateErrors, ThrowOnError>({\n        url: '/project/{projectID}',\n        ...options,\n        ...params,\n        headers: {\n            'Content-Type': 'application/json',\n            ...options?.headers,\n            ...params.headers\n        }\n    });\n};\n\n/**\n * List PTY sessions\n *\n * Get a list of all active pseudo-terminal (PTY) sessions managed by OpenCode.\n */\nexport const ptyList = <ThrowOnError extends boolean = false>(parameters?: {\n    directory?: string;\n}, options?: Options<never, ThrowOnError>) => {\n    const params = buildClientParams([parameters], [{ args: [{ in: 'query', key: 'directory' }] }]);\n    return (options?.client ?? client).get<PtyListResponses, unknown, ThrowOnError>({\n        url: '/pty',\n        ...options,\n        ...params\n    });\n};\n\n/**\n * Create PTY session\n *\n * Create a new pseudo-terminal (PTY) session for running shell commands and processes.\n */\nexport const ptyCreate = <ThrowOnError extends boolean = false>(parameters?: {\n    directory?: string;\n    command?: string;\n    args?: Array<string>;\n    cwd?: string;\n    title?: string;\n    env?: {\n        [key: string]: string;\n    };\n}, options?: Options<never, ThrowOnError>) => {\n    const params = buildClientParams([parameters], [{ args: [\n                { in: 'query', key: 'directory' },\n                { in: 'body', key: 'command' },\n                { in: 'body', key: 'args' },\n                { in: 'body', key: 'cwd' },\n                { in: 'body', key: 'title' },\n                { in: 'body', key: 'env' }\n            ] }]);\n    return (options?.client ?? client).post<PtyCreateResponses, PtyCreateErrors, ThrowOnError>({\n        url: '/pty',\n        ...options,\n        ...params,\n        headers: {\n            'Content-Type': 'application/json',\n            ...options?.headers,\n            ...params.headers\n        }\n    });\n};\n\n/**\n * Remove PTY session\n *\n * Remove and terminate a specific pseudo-terminal (PTY) session.\n */\nexport const ptyRemove = <ThrowOnError extends boolean = false>(parameters: {\n    ptyID: string;\n    directory?: string;\n}, options?: Options<never, ThrowOnError>) => {\n    const params = buildClientParams([parameters], [{ args: [{ in: 'path', key: 'ptyID' }, { in: 'query', key: 'directory' }] }]);\n    return (options?.client ?? client).delete<PtyRemoveResponses, PtyRemoveErrors, ThrowOnError>({\n        url: '/pty/{ptyID}',\n        ...options,\n        ...params\n    });\n};\n\n/**\n * Get PTY session\n *\n * Retrieve detailed information about a specific pseudo-terminal (PTY) session.\n */\nexport const ptyGet = <ThrowOnError extends boolean = false>(parameters: {\n    ptyID: string;\n    directory?: string;\n}, options?: Options<never, ThrowOnError>) => {\n    const params = buildClientParams([parameters], [{ args: [{ in: 'path', key: 'ptyID' }, { in: 'query', key: 'directory' }] }]);\n    return (options?.client ?? client).get<PtyGetResponses, PtyGetErrors, ThrowOnError>({\n        url: '/pty/{ptyID}',\n        ...options,\n        ...params\n    });\n};\n\n/**\n * Update PTY session\n *\n * Update properties of an existing pseudo-terminal (PTY) session.\n */\nexport const ptyUpdate = <ThrowOnError extends boolean = false>(parameters: {\n    ptyID: string;\n    directory?: string;\n    title?: string;\n    size?: {\n        rows: number;\n        cols: number;\n    };\n}, options?: Options<never, ThrowOnError>) => {\n    const params = buildClientParams([parameters], [{ args: [\n                { in: 'path', key: 'ptyID' },\n                { in: 'query', key: 'directory' },\n                { in: 'body', key: 'title' },\n                { in: 'body', key: 'size' }\n            ] }]);\n    return (options?.client ?? client).put<PtyUpdateResponses, PtyUpdateErrors, ThrowOnError>({\n        url: '/pty/{ptyID}',\n        ...options,\n        ...params,\n        headers: {\n            'Content-Type': 'application/json',\n            ...options?.headers,\n            ...params.headers\n        }\n    });\n};\n\n/**\n * Connect to PTY session\n *\n * Establish a WebSocket connection to interact with a pseudo-terminal (PTY) session in real-time.\n */\nexport const ptyConnect = <ThrowOnError extends boolean = false>(parameters: {\n    ptyID: string;\n    directory?: string;\n}, options?: Options<never, ThrowOnError>) => {\n    const params = buildClientParams([parameters], [{ args: [{ in: 'path', key: 'ptyID' }, { in: 'query', key: 'directory' }] }]);\n    return (options?.client ?? client).get<PtyConnectResponses, PtyConnectErrors, ThrowOnError>({\n        url: '/pty/{ptyID}/connect',\n        ...options,\n        ...params\n    });\n};\n\n/**\n * Get configuration\n *\n * Retrieve the current OpenCode configuration settings and preferences.\n */\nexport const configGet = <ThrowOnError extends boolean = false>(parameters?: {\n    directory?: string;\n}, options?: Options<never, ThrowOnError>) => {\n    const params = buildClientParams([parameters], [{ args: [{ in: 'query', key: 'directory' }] }]);\n    return (options?.client ?? client).get<ConfigGetResponses, unknown, ThrowOnError>({\n        url: '/config',\n        ...options,\n        ...params\n    });\n};\n\n/**\n * Update configuration\n *\n * Update OpenCode configuration settings and preferences.\n */\nexport const configUpdate = <ThrowOnError extends boolean = false>(parameters?: {\n    directory?: string;\n    config?: Config;\n}, options?: Options<never, ThrowOnError>) => {\n    const params = buildClientParams([parameters], [{ args: [{ in: 'query', key: 'directory' }, { key: 'config', map: 'body' }] }]);\n    return (options?.client ?? client).patch<ConfigUpdateResponses, ConfigUpdateErrors, ThrowOnError>({\n        url: '/config',\n        ...options,\n        ...params,\n        headers: {\n            'Content-Type': 'application/json',\n            ...options?.headers,\n            ...params.headers\n        }\n    });\n};\n\n/**\n * List tool IDs\n *\n * Get a list of all available tool IDs, including both built-in tools and dynamically registered tools.\n */\nexport const toolIds = <ThrowOnError extends boolean = false>(parameters?: {\n    directory?: string;\n}, options?: Options<never, ThrowOnError>) => {\n    const params = buildClientParams([parameters], [{ args: [{ in: 'query', key: 'directory' }] }]);\n    return (options?.client ?? client).get<ToolIdsResponses, ToolIdsErrors, ThrowOnError>({\n        url: '/experimental/tool/ids',\n        ...options,\n        ...params\n    });\n};\n\n/**\n * List tools\n *\n * Get a list of available tools with their JSON schema parameters for a specific provider and model combination.\n */\nexport const toolList = <ThrowOnError extends boolean = false>(parameters: {\n    directory?: string;\n    provider: string;\n    model: string;\n}, options?: Options<never, ThrowOnError>) => {\n    const params = buildClientParams([parameters], [{ args: [\n                { in: 'query', key: 'directory' },\n                { in: 'query', key: 'provider' },\n                { in: 'query', key: 'model' }\n            ] }]);\n    return (options?.client ?? client).get<ToolListResponses, ToolListErrors, ThrowOnError>({\n        url: '/experimental/tool',\n        ...options,\n        ...params\n    });\n};\n\n/**\n * Dispose instance\n *\n * Clean up and dispose the current OpenCode instance, releasing all resources.\n */\nexport const instanceDispose = <ThrowOnError extends boolean = false>(parameters?: {\n    directory?: string;\n}, options?: Options<never, ThrowOnError>) => {\n    const params = buildClientParams([parameters], [{ args: [{ in: 'query', key: 'directory' }] }]);\n    return (options?.client ?? client).post<InstanceDisposeResponses, unknown, ThrowOnError>({\n        url: '/instance/dispose',\n        ...options,\n        ...params\n    });\n};\n\n/**\n * Get paths\n *\n * Retrieve the current working directory and related path information for the OpenCode instance.\n */\nexport const pathGet = <ThrowOnError extends boolean = false>(parameters?: {\n    directory?: string;\n}, options?: Options<never, ThrowOnError>) => {\n    const params = buildClientParams([parameters], [{ args: [{ in: 'query', key: 'directory' }] }]);\n    return (options?.client ?? client).get<PathGetResponses, unknown, ThrowOnError>({\n        url: '/path',\n        ...options,\n        ...params\n    });\n};\n\n/**\n * Get VCS info\n *\n * Retrieve version control system (VCS) information for the current project, such as git branch.\n */\nexport const vcsGet = <ThrowOnError extends boolean = false>(parameters?: {\n    directory?: string;\n}, options?: Options<never, ThrowOnError>) => {\n    const params = buildClientParams([parameters], [{ args: [{ in: 'query', key: 'directory' }] }]);\n    return (options?.client ?? client).get<VcsGetResponses, unknown, ThrowOnError>({\n        url: '/vcs',\n        ...options,\n        ...params\n    });\n};\n\n/**\n * List sessions\n *\n * Get a list of all OpenCode sessions, sorted by most recently updated.\n */\nexport const sessionList = <ThrowOnError extends boolean = false>(parameters?: {\n    directory?: string;\n}, options?: Options<never, ThrowOnError>) => {\n    const params = buildClientParams([parameters], [{ args: [{ in: 'query', key: 'directory' }] }]);\n    return (options?.client ?? client).get<SessionListResponses, unknown, ThrowOnError>({\n        url: '/session',\n        ...options,\n        ...params\n    });\n};\n\n/**\n * Create session\n *\n * Create a new OpenCode session for interacting with AI assistants and managing conversations.\n */\nexport const sessionCreate = <ThrowOnError extends boolean = false>(parameters?: {\n    directory?: string;\n    parentID?: string;\n    title?: string;\n    permission?: PermissionRuleset;\n}, options?: Options<never, ThrowOnError>) => {\n    const params = buildClientParams([parameters], [{ args: [\n                { in: 'query', key: 'directory' },\n                { in: 'body', key: 'parentID' },\n                { in: 'body', key: 'title' },\n                { in: 'body', key: 'permission' }\n            ] }]);\n    return (options?.client ?? client).post<SessionCreateResponses, SessionCreateErrors, ThrowOnError>({\n        url: '/session',\n        ...options,\n        ...params,\n        headers: {\n            'Content-Type': 'application/json',\n            ...options?.headers,\n            ...params.headers\n        }\n    });\n};\n\n/**\n * Get session status\n *\n * Retrieve the current status of all sessions, including active, idle, and completed states.\n */\nexport const sessionStatus = <ThrowOnError extends boolean = false>(parameters?: {\n    directory?: string;\n}, options?: Options<never, ThrowOnError>) => {\n    const params = buildClientParams([parameters], [{ args: [{ in: 'query', key: 'directory' }] }]);\n    return (options?.client ?? client).get<SessionStatusResponses, SessionStatusErrors, ThrowOnError>({\n        url: '/session/status',\n        ...options,\n        ...params\n    });\n};\n\n/**\n * Delete session\n *\n * Delete a session and permanently remove all associated data, including messages and history.\n */\nexport const sessionDelete = <ThrowOnError extends boolean = false>(parameters: {\n    sessionID: string;\n    directory?: string;\n}, options?: Options<never, ThrowOnError>) => {\n    const params = buildClientParams([parameters], [{ args: [{ in: 'path', key: 'sessionID' }, { in: 'query', key: 'directory' }] }]);\n    return (options?.client ?? client).delete<SessionDeleteResponses, SessionDeleteErrors, ThrowOnError>({\n        url: '/session/{sessionID}',\n        ...options,\n        ...params\n    });\n};\n\n/**\n * Get session\n *\n * Retrieve detailed information about a specific OpenCode session.\n */\nexport const sessionGet = <ThrowOnError extends boolean = false>(parameters: {\n    sessionID: string;\n    directory?: string;\n}, options?: Options<never, ThrowOnError>) => {\n    const params = buildClientParams([parameters], [{ args: [{ in: 'path', key: 'sessionID' }, { in: 'query', key: 'directory' }] }]);\n    return (options?.client ?? client).get<SessionGetResponses, SessionGetErrors, ThrowOnError>({\n        url: '/session/{sessionID}',\n        ...options,\n        ...params\n    });\n};\n\n/**\n * Update session\n *\n * Update properties of an existing session, such as title or other metadata.\n */\nexport const sessionUpdate = <ThrowOnError extends boolean = false>(parameters: {\n    sessionID: string;\n    directory?: string;\n    title?: string;\n    time?: {\n        archived?: number;\n    };\n}, options?: Options<never, ThrowOnError>) => {\n    const params = buildClientParams([parameters], [{ args: [\n                { in: 'path', key: 'sessionID' },\n                { in: 'query', key: 'directory' },\n                { in: 'body', key: 'title' },\n                { in: 'body', key: 'time' }\n            ] }]);\n    return (options?.client ?? client).patch<SessionUpdateResponses, SessionUpdateErrors, ThrowOnError>({\n        url: '/session/{sessionID}',\n        ...options,\n        ...params,\n        headers: {\n            'Content-Type': 'application/json',\n            ...options?.headers,\n            ...params.headers\n        }\n    });\n};\n\n/**\n * Get session children\n *\n * Retrieve all child sessions that were forked from the specified parent session.\n */\nexport const sessionChildren = <ThrowOnError extends boolean = false>(parameters: {\n    sessionID: string;\n    directory?: string;\n}, options?: Options<never, ThrowOnError>) => {\n    const params = buildClientParams([parameters], [{ args: [{ in: 'path', key: 'sessionID' }, { in: 'query', key: 'directory' }] }]);\n    return (options?.client ?? client).get<SessionChildrenResponses, SessionChildrenErrors, ThrowOnError>({\n        url: '/session/{sessionID}/children',\n        ...options,\n        ...params\n    });\n};\n\n/**\n * Get session todos\n *\n * Retrieve the todo list associated with a specific session, showing tasks and action items.\n */\nexport const sessionTodo = <ThrowOnError extends boolean = false>(parameters: {\n    sessionID: string;\n    directory?: string;\n}, options?: Options<never, ThrowOnError>) => {\n    const params = buildClientParams([parameters], [{ args: [{ in: 'path', key: 'sessionID' }, { in: 'query', key: 'directory' }] }]);\n    return (options?.client ?? client).get<SessionTodoResponses, SessionTodoErrors, ThrowOnError>({\n        url: '/session/{sessionID}/todo',\n        ...options,\n        ...params\n    });\n};\n\n/**\n * Initialize session\n *\n * Analyze the current application and create an AGENTS.md file with project-specific agent configurations.\n */\nexport const sessionInit = <ThrowOnError extends boolean = false>(parameters: {\n    sessionID: string;\n    directory?: string;\n    modelID: string;\n    providerID: string;\n    messageID: string;\n}, options?: Options<never, ThrowOnError>) => {\n    const params = buildClientParams([parameters], [{ args: [\n                { in: 'path', key: 'sessionID' },\n                { in: 'query', key: 'directory' },\n                { in: 'body', key: 'modelID' },\n                { in: 'body', key: 'providerID' },\n                { in: 'body', key: 'messageID' }\n            ] }]);\n    return (options?.client ?? client).post<SessionInitResponses, SessionInitErrors, ThrowOnError>({\n        url: '/session/{sessionID}/init',\n        ...options,\n        ...params,\n        headers: {\n            'Content-Type': 'application/json',\n            ...options?.headers,\n            ...params.headers\n        }\n    });\n};\n\n/**\n * Fork session\n *\n * Create a new session by forking an existing session at a specific message point.\n */\nexport const sessionFork = <ThrowOnError extends boolean = false>(parameters: {\n    sessionID: string;\n    directory?: string;\n    messageID?: string;\n}, options?: Options<never, ThrowOnError>) => {\n    const params = buildClientParams([parameters], [{ args: [\n                { in: 'path', key: 'sessionID' },\n                { in: 'query', key: 'directory' },\n                { in: 'body', key: 'messageID' }\n            ] }]);\n    return (options?.client ?? client).post<SessionForkResponses, unknown, ThrowOnError>({\n        url: '/session/{sessionID}/fork',\n        ...options,\n        ...params,\n        headers: {\n            'Content-Type': 'application/json',\n            ...options?.headers,\n            ...params.headers\n        }\n    });\n};\n\n/**\n * Abort session\n *\n * Abort an active session and stop any ongoing AI processing or command execution.\n */\nexport const sessionAbort = <ThrowOnError extends boolean = false>(parameters: {\n    sessionID: string;\n    directory?: string;\n}, options?: Options<never, ThrowOnError>) => {\n    const params = buildClientParams([parameters], [{ args: [{ in: 'path', key: 'sessionID' }, { in: 'query', key: 'directory' }] }]);\n    return (options?.client ?? client).post<SessionAbortResponses, SessionAbortErrors, ThrowOnError>({\n        url: '/session/{sessionID}/abort',\n        ...options,\n        ...params\n    });\n};\n\n/**\n * Unshare session\n *\n * Remove the shareable link for a session, making it private again.\n */\nexport const sessionUnshare = <ThrowOnError extends boolean = false>(parameters: {\n    sessionID: string;\n    directory?: string;\n}, options?: Options<never, ThrowOnError>) => {\n    const params = buildClientParams([parameters], [{ args: [{ in: 'path', key: 'sessionID' }, { in: 'query', key: 'directory' }] }]);\n    return (options?.client ?? client).delete<SessionUnshareResponses, SessionUnshareErrors, ThrowOnError>({\n        url: '/session/{sessionID}/share',\n        ...options,\n        ...params\n    });\n};\n\n/**\n * Share session\n *\n * Create a shareable link for a session, allowing others to view the conversation.\n */\nexport const sessionShare = <ThrowOnError extends boolean = false>(parameters: {\n    sessionID: string;\n    directory?: string;\n}, options?: Options<never, ThrowOnError>) => {\n    const params = buildClientParams([parameters], [{ args: [{ in: 'path', key: 'sessionID' }, { in: 'query', key: 'directory' }] }]);\n    return (options?.client ?? client).post<SessionShareResponses, SessionShareErrors, ThrowOnError>({\n        url: '/session/{sessionID}/share',\n        ...options,\n        ...params\n    });\n};\n\n/**\n * Get session diff\n *\n * Get all file changes (diffs) made during this session.\n */\nexport const sessionDiff = <ThrowOnError extends boolean = false>(parameters: {\n    sessionID: string;\n    directory?: string;\n    messageID?: string;\n}, options?: Options<never, ThrowOnError>) => {\n    const params = buildClientParams([parameters], [{ args: [\n                { in: 'path', key: 'sessionID' },\n                { in: 'query', key: 'directory' },\n                { in: 'query', key: 'messageID' }\n            ] }]);\n    return (options?.client ?? client).get<SessionDiffResponses, SessionDiffErrors, ThrowOnError>({\n        url: '/session/{sessionID}/diff',\n        ...options,\n        ...params\n    });\n};\n\n/**\n * Summarize session\n *\n * Generate a concise summary of the session using AI compaction to preserve key information.\n */\nexport const sessionSummarize = <ThrowOnError extends boolean = false>(parameters: {\n    sessionID: string;\n    directory?: string;\n    providerID: string;\n    modelID: string;\n    auto?: boolean;\n}, options?: Options<never, ThrowOnError>) => {\n    const params = buildClientParams([parameters], [{ args: [\n                { in: 'path', key: 'sessionID' },\n                { in: 'query', key: 'directory' },\n                { in: 'body', key: 'providerID' },\n                { in: 'body', key: 'modelID' },\n                { in: 'body', key: 'auto' }\n            ] }]);\n    return (options?.client ?? client).post<SessionSummarizeResponses, SessionSummarizeErrors, ThrowOnError>({\n        url: '/session/{sessionID}/summarize',\n        ...options,\n        ...params,\n        headers: {\n            'Content-Type': 'application/json',\n            ...options?.headers,\n            ...params.headers\n        }\n    });\n};\n\n/**\n * Get session messages\n *\n * Retrieve all messages in a session, including user prompts and AI responses.\n */\nexport const sessionMessages = <ThrowOnError extends boolean = false>(parameters: {\n    sessionID: string;\n    directory?: string;\n    limit?: number;\n}, options?: Options<never, ThrowOnError>) => {\n    const params = buildClientParams([parameters], [{ args: [\n                { in: 'path', key: 'sessionID' },\n                { in: 'query', key: 'directory' },\n                { in: 'query', key: 'limit' }\n            ] }]);\n    return (options?.client ?? client).get<SessionMessagesResponses, SessionMessagesErrors, ThrowOnError>({\n        url: '/session/{sessionID}/message',\n        ...options,\n        ...params\n    });\n};\n\n/**\n * Send message\n *\n * Create and send a new message to a session, streaming the AI response.\n */\nexport const sessionPrompt = <ThrowOnError extends boolean = false>(parameters: {\n    sessionID: string;\n    directory?: string;\n    messageID?: string;\n    model?: {\n        providerID: string;\n        modelID: string;\n    };\n    agent?: string;\n    noReply?: boolean;\n    tools?: {\n        [key: string]: boolean;\n    };\n    system?: string;\n    variant?: string;\n    parts: Array<TextPartInput | FilePartInput | AgentPartInput | SubtaskPartInput>;\n}, options?: Options<never, ThrowOnError>) => {\n    const params = buildClientParams([parameters], [{ args: [\n                { in: 'path', key: 'sessionID' },\n                { in: 'query', key: 'directory' },\n                { in: 'body', key: 'messageID' },\n                { in: 'body', key: 'model' },\n                { in: 'body', key: 'agent' },\n                { in: 'body', key: 'noReply' },\n                { in: 'body', key: 'tools' },\n                { in: 'body', key: 'system' },\n                { in: 'body', key: 'variant' },\n                { in: 'body', key: 'parts' }\n            ] }]);\n    return (options?.client ?? client).post<SessionPromptResponses, SessionPromptErrors, ThrowOnError>({\n        url: '/session/{sessionID}/message',\n        ...options,\n        ...params,\n        headers: {\n            'Content-Type': 'application/json',\n            ...options?.headers,\n            ...params.headers\n        }\n    });\n};\n\n/**\n * Get message\n *\n * Retrieve a specific message from a session by its message ID.\n */\nexport const sessionMessage = <ThrowOnError extends boolean = false>(parameters: {\n    sessionID: string;\n    messageID: string;\n    directory?: string;\n}, options?: Options<never, ThrowOnError>) => {\n    const params = buildClientParams([parameters], [{ args: [\n                { in: 'path', key: 'sessionID' },\n                { in: 'path', key: 'messageID' },\n                { in: 'query', key: 'directory' }\n            ] }]);\n    return (options?.client ?? client).get<SessionMessageResponses, SessionMessageErrors, ThrowOnError>({\n        url: '/session/{sessionID}/message/{messageID}',\n        ...options,\n        ...params\n    });\n};\n\n/**\n * Delete a part from a message\n */\nexport const partDelete = <ThrowOnError extends boolean = false>(parameters: {\n    sessionID: string;\n    messageID: string;\n    partID: string;\n    directory?: string;\n}, options?: Options<never, ThrowOnError>) => {\n    const params = buildClientParams([parameters], [{ args: [\n                { in: 'path', key: 'sessionID' },\n                { in: 'path', key: 'messageID' },\n                { in: 'path', key: 'partID' },\n                { in: 'query', key: 'directory' }\n            ] }]);\n    return (options?.client ?? client).delete<PartDeleteResponses, PartDeleteErrors, ThrowOnError>({\n        url: '/session/{sessionID}/message/{messageID}/part/{partID}',\n        ...options,\n        ...params\n    });\n};\n\n/**\n * Update a part in a message\n */\nexport const partUpdate = <ThrowOnError extends boolean = false>(parameters: {\n    sessionID: string;\n    messageID: string;\n    partID: string;\n    directory?: string;\n    part?: Part;\n}, options?: Options<never, ThrowOnError>) => {\n    const params = buildClientParams([parameters], [{ args: [\n                { in: 'path', key: 'sessionID' },\n                { in: 'path', key: 'messageID' },\n                { in: 'path', key: 'partID' },\n                { in: 'query', key: 'directory' },\n                { key: 'part', map: 'body' }\n            ] }]);\n    return (options?.client ?? client).patch<PartUpdateResponses, PartUpdateErrors, ThrowOnError>({\n        url: '/session/{sessionID}/message/{messageID}/part/{partID}',\n        ...options,\n        ...params,\n        headers: {\n            'Content-Type': 'application/json',\n            ...options?.headers,\n            ...params.headers\n        }\n    });\n};\n\n/**\n * Send async message\n *\n * Create and send a new message to a session asynchronously, starting the session if needed and returning immediately.\n */\nexport const sessionPromptAsync = <ThrowOnError extends boolean = false>(parameters: {\n    sessionID: string;\n    directory?: string;\n    messageID?: string;\n    model?: {\n        providerID: string;\n        modelID: string;\n    };\n    agent?: string;\n    noReply?: boolean;\n    tools?: {\n        [key: string]: boolean;\n    };\n    system?: string;\n    variant?: string;\n    parts: Array<TextPartInput | FilePartInput | AgentPartInput | SubtaskPartInput>;\n}, options?: Options<never, ThrowOnError>) => {\n    const params = buildClientParams([parameters], [{ args: [\n                { in: 'path', key: 'sessionID' },\n                { in: 'query', key: 'directory' },\n                { in: 'body', key: 'messageID' },\n                { in: 'body', key: 'model' },\n                { in: 'body', key: 'agent' },\n                { in: 'body', key: 'noReply' },\n                { in: 'body', key: 'tools' },\n                { in: 'body', key: 'system' },\n                { in: 'body', key: 'variant' },\n                { in: 'body', key: 'parts' }\n            ] }]);\n    return (options?.client ?? client).post<SessionPromptAsyncResponses, SessionPromptAsyncErrors, ThrowOnError>({\n        url: '/session/{sessionID}/prompt_async',\n        ...options,\n        ...params,\n        headers: {\n            'Content-Type': 'application/json',\n            ...options?.headers,\n            ...params.headers\n        }\n    });\n};\n\n/**\n * Send command\n *\n * Send a new command to a session for execution by the AI assistant.\n */\nexport const sessionCommand = <ThrowOnError extends boolean = false>(parameters: {\n    sessionID: string;\n    directory?: string;\n    messageID?: string;\n    agent?: string;\n    model?: string;\n    arguments: string;\n    command: string;\n    variant?: string;\n}, options?: Options<never, ThrowOnError>) => {\n    const params = buildClientParams([parameters], [{ args: [\n                { in: 'path', key: 'sessionID' },\n                { in: 'query', key: 'directory' },\n                { in: 'body', key: 'messageID' },\n                { in: 'body', key: 'agent' },\n                { in: 'body', key: 'model' },\n                { in: 'body', key: 'arguments' },\n                { in: 'body', key: 'command' },\n                { in: 'body', key: 'variant' }\n            ] }]);\n    return (options?.client ?? client).post<SessionCommandResponses, SessionCommandErrors, ThrowOnError>({\n        url: '/session/{sessionID}/command',\n        ...options,\n        ...params,\n        headers: {\n            'Content-Type': 'application/json',\n            ...options?.headers,\n            ...params.headers\n        }\n    });\n};\n\n/**\n * Run shell command\n *\n * Execute a shell command within the session context and return the AI's response.\n */\nexport const sessionShell = <ThrowOnError extends boolean = false>(parameters: {\n    sessionID: string;\n    directory?: string;\n    agent: string;\n    model?: {\n        providerID: string;\n        modelID: string;\n    };\n    command: string;\n}, options?: Options<never, ThrowOnError>) => {\n    const params = buildClientParams([parameters], [{ args: [\n                { in: 'path', key: 'sessionID' },\n                { in: 'query', key: 'directory' },\n                { in: 'body', key: 'agent' },\n                { in: 'body', key: 'model' },\n                { in: 'body', key: 'command' }\n            ] }]);\n    return (options?.client ?? client).post<SessionShellResponses, SessionShellErrors, ThrowOnError>({\n        url: '/session/{sessionID}/shell',\n        ...options,\n        ...params,\n        headers: {\n            'Content-Type': 'application/json',\n            ...options?.headers,\n            ...params.headers\n        }\n    });\n};\n\n/**\n * Revert message\n *\n * Revert a specific message in a session, undoing its effects and restoring the previous state.\n */\nexport const sessionRevert = <ThrowOnError extends boolean = false>(parameters: {\n    sessionID: string;\n    directory?: string;\n    messageID: string;\n    partID?: string;\n}, options?: Options<never, ThrowOnError>) => {\n    const params = buildClientParams([parameters], [{ args: [\n                { in: 'path', key: 'sessionID' },\n                { in: 'query', key: 'directory' },\n                { in: 'body', key: 'messageID' },\n                { in: 'body', key: 'partID' }\n            ] }]);\n    return (options?.client ?? client).post<SessionRevertResponses, SessionRevertErrors, ThrowOnError>({\n        url: '/session/{sessionID}/revert',\n        ...options,\n        ...params,\n        headers: {\n            'Content-Type': 'application/json',\n            ...options?.headers,\n            ...params.headers\n        }\n    });\n};\n\n/**\n * Restore reverted messages\n *\n * Restore all previously reverted messages in a session.\n */\nexport const sessionUnrevert = <ThrowOnError extends boolean = false>(parameters: {\n    sessionID: string;\n    directory?: string;\n}, options?: Options<never, ThrowOnError>) => {\n    const params = buildClientParams([parameters], [{ args: [{ in: 'path', key: 'sessionID' }, { in: 'query', key: 'directory' }] }]);\n    return (options?.client ?? client).post<SessionUnrevertResponses, SessionUnrevertErrors, ThrowOnError>({\n        url: '/session/{sessionID}/unrevert',\n        ...options,\n        ...params\n    });\n};\n\n/**\n * Respond to permission\n *\n * Approve or deny a permission request from the AI assistant.\n *\n * @deprecated\n */\nexport const permissionRespond = <ThrowOnError extends boolean = false>(parameters: {\n    sessionID: string;\n    permissionID: string;\n    directory?: string;\n    response: 'once' | 'always' | 'reject';\n}, options?: Options<never, ThrowOnError>) => {\n    const params = buildClientParams([parameters], [{ args: [\n                { in: 'path', key: 'sessionID' },\n                { in: 'path', key: 'permissionID' },\n                { in: 'query', key: 'directory' },\n                { in: 'body', key: 'response' }\n            ] }]);\n    return (options?.client ?? client).post<PermissionRespondResponses, PermissionRespondErrors, ThrowOnError>({\n        url: '/session/{sessionID}/permissions/{permissionID}',\n        ...options,\n        ...params,\n        headers: {\n            'Content-Type': 'application/json',\n            ...options?.headers,\n            ...params.headers\n        }\n    });\n};\n\n/**\n * Respond to permission request\n *\n * Approve or deny a permission request from the AI assistant.\n */\nexport const permissionReply = <ThrowOnError extends boolean = false>(parameters: {\n    requestID: string;\n    directory?: string;\n    reply: 'once' | 'always' | 'reject';\n}, options?: Options<never, ThrowOnError>) => {\n    const params = buildClientParams([parameters], [{ args: [\n                { in: 'path', key: 'requestID' },\n                { in: 'query', key: 'directory' },\n                { in: 'body', key: 'reply' }\n            ] }]);\n    return (options?.client ?? client).post<PermissionReplyResponses, PermissionReplyErrors, ThrowOnError>({\n        url: '/permission/{requestID}/reply',\n        ...options,\n        ...params,\n        headers: {\n            'Content-Type': 'application/json',\n            ...options?.headers,\n            ...params.headers\n        }\n    });\n};\n\n/**\n * List pending permissions\n *\n * Get all pending permission requests across all sessions.\n */\nexport const permissionList = <ThrowOnError extends boolean = false>(parameters?: {\n    directory?: string;\n}, options?: Options<never, ThrowOnError>) => {\n    const params = buildClientParams([parameters], [{ args: [{ in: 'query', key: 'directory' }] }]);\n    return (options?.client ?? client).get<PermissionListResponses, unknown, ThrowOnError>({\n        url: '/permission',\n        ...options,\n        ...params\n    });\n};\n\n/**\n * List commands\n *\n * Get a list of all available commands in the OpenCode system.\n */\nexport const commandList = <ThrowOnError extends boolean = false>(parameters?: {\n    directory?: string;\n}, options?: Options<never, ThrowOnError>) => {\n    const params = buildClientParams([parameters], [{ args: [{ in: 'query', key: 'directory' }] }]);\n    return (options?.client ?? client).get<CommandListResponses, unknown, ThrowOnError>({\n        url: '/command',\n        ...options,\n        ...params\n    });\n};\n\n/**\n * List config providers\n *\n * Get a list of all configured AI providers and their default models.\n */\nexport const configProviders = <ThrowOnError extends boolean = false>(parameters?: {\n    directory?: string;\n}, options?: Options<never, ThrowOnError>) => {\n    const params = buildClientParams([parameters], [{ args: [{ in: 'query', key: 'directory' }] }]);\n    return (options?.client ?? client).get<ConfigProvidersResponses, unknown, ThrowOnError>({\n        url: '/config/providers',\n        ...options,\n        ...params\n    });\n};\n\n/**\n * List providers\n *\n * Get a list of all available AI providers, including both available and connected ones.\n */\nexport const providerList = <ThrowOnError extends boolean = false>(parameters?: {\n    directory?: string;\n}, options?: Options<never, ThrowOnError>) => {\n    const params = buildClientParams([parameters], [{ args: [{ in: 'query', key: 'directory' }] }]);\n    return (options?.client ?? client).get<ProviderListResponses, unknown, ThrowOnError>({\n        url: '/provider',\n        ...options,\n        ...params\n    });\n};\n\n/**\n * Get provider auth methods\n *\n * Retrieve available authentication methods for all AI providers.\n */\nexport const providerAuth = <ThrowOnError extends boolean = false>(parameters?: {\n    directory?: string;\n}, options?: Options<never, ThrowOnError>) => {\n    const params = buildClientParams([parameters], [{ args: [{ in: 'query', key: 'directory' }] }]);\n    return (options?.client ?? client).get<ProviderAuthResponses, unknown, ThrowOnError>({\n        url: '/provider/auth',\n        ...options,\n        ...params\n    });\n};\n\n/**\n * OAuth authorize\n *\n * Initiate OAuth authorization for a specific AI provider to get an authorization URL.\n */\nexport const providerOauthAuthorize = <ThrowOnError extends boolean = false>(parameters: {\n    providerID: string;\n    directory?: string;\n    method: number;\n}, options?: Options<never, ThrowOnError>) => {\n    const params = buildClientParams([parameters], [{ args: [\n                { in: 'path', key: 'providerID' },\n                { in: 'query', key: 'directory' },\n                { in: 'body', key: 'method' }\n            ] }]);\n    return (options?.client ?? client).post<ProviderOauthAuthorizeResponses, ProviderOauthAuthorizeErrors, ThrowOnError>({\n        url: '/provider/{providerID}/oauth/authorize',\n        ...options,\n        ...params,\n        headers: {\n            'Content-Type': 'application/json',\n            ...options?.headers,\n            ...params.headers\n        }\n    });\n};\n\n/**\n * OAuth callback\n *\n * Handle the OAuth callback from a provider after user authorization.\n */\nexport const providerOauthCallback = <ThrowOnError extends boolean = false>(parameters: {\n    providerID: string;\n    directory?: string;\n    method: number;\n    code?: string;\n}, options?: Options<never, ThrowOnError>) => {\n    const params = buildClientParams([parameters], [{ args: [\n                { in: 'path', key: 'providerID' },\n                { in: 'query', key: 'directory' },\n                { in: 'body', key: 'method' },\n                { in: 'body', key: 'code' }\n            ] }]);\n    return (options?.client ?? client).post<ProviderOauthCallbackResponses, ProviderOauthCallbackErrors, ThrowOnError>({\n        url: '/provider/{providerID}/oauth/callback',\n        ...options,\n        ...params,\n        headers: {\n            'Content-Type': 'application/json',\n            ...options?.headers,\n            ...params.headers\n        }\n    });\n};\n\n/**\n * Find text\n *\n * Search for text patterns across files in the project using ripgrep.\n */\nexport const findText = <ThrowOnError extends boolean = false>(parameters: {\n    directory?: string;\n    pattern: string;\n}, options?: Options<never, ThrowOnError>) => {\n    const params = buildClientParams([parameters], [{ args: [{ in: 'query', key: 'directory' }, { in: 'query', key: 'pattern' }] }]);\n    return (options?.client ?? client).get<FindTextResponses, unknown, ThrowOnError>({\n        url: '/find',\n        ...options,\n        ...params\n    });\n};\n\n/**\n * Find files\n *\n * Search for files or directories by name or pattern in the project directory.\n */\nexport const findFiles = <ThrowOnError extends boolean = false>(parameters: {\n    directory?: string;\n    query: string;\n    dirs?: 'true' | 'false';\n    type?: 'file' | 'directory';\n    limit?: number;\n}, options?: Options<never, ThrowOnError>) => {\n    const params = buildClientParams([parameters], [{ args: [\n                { in: 'query', key: 'directory' },\n                { in: 'query', key: 'query' },\n                { in: 'query', key: 'dirs' },\n                { in: 'query', key: 'type' },\n                { in: 'query', key: 'limit' }\n            ] }]);\n    return (options?.client ?? client).get<FindFilesResponses, unknown, ThrowOnError>({\n        url: '/find/file',\n        ...options,\n        ...params\n    });\n};\n\n/**\n * Find symbols\n *\n * Search for workspace symbols like functions, classes, and variables using LSP.\n */\nexport const findSymbols = <ThrowOnError extends boolean = false>(parameters: {\n    directory?: string;\n    query: string;\n}, options?: Options<never, ThrowOnError>) => {\n    const params = buildClientParams([parameters], [{ args: [{ in: 'query', key: 'directory' }, { in: 'query', key: 'query' }] }]);\n    return (options?.client ?? client).get<FindSymbolsResponses, unknown, ThrowOnError>({\n        url: '/find/symbol',\n        ...options,\n        ...params\n    });\n};\n\n/**\n * List files\n *\n * List files and directories in a specified path.\n */\nexport const fileList = <ThrowOnError extends boolean = false>(parameters: {\n    directory?: string;\n    path: string;\n}, options?: Options<never, ThrowOnError>) => {\n    const params = buildClientParams([parameters], [{ args: [{ in: 'query', key: 'directory' }, { in: 'query', key: 'path' }] }]);\n    return (options?.client ?? client).get<FileListResponses, unknown, ThrowOnError>({\n        url: '/file',\n        ...options,\n        ...params\n    });\n};\n\n/**\n * Read file\n *\n * Read the content of a specified file.\n */\nexport const fileRead = <ThrowOnError extends boolean = false>(parameters: {\n    directory?: string;\n    path: string;\n}, options?: Options<never, ThrowOnError>) => {\n    const params = buildClientParams([parameters], [{ args: [{ in: 'query', key: 'directory' }, { in: 'query', key: 'path' }] }]);\n    return (options?.client ?? client).get<FileReadResponses, unknown, ThrowOnError>({\n        url: '/file/content',\n        ...options,\n        ...params\n    });\n};\n\n/**\n * Get file status\n *\n * Get the git status of all files in the project.\n */\nexport const fileStatus = <ThrowOnError extends boolean = false>(parameters?: {\n    directory?: string;\n}, options?: Options<never, ThrowOnError>) => {\n    const params = buildClientParams([parameters], [{ args: [{ in: 'query', key: 'directory' }] }]);\n    return (options?.client ?? client).get<FileStatusResponses, unknown, ThrowOnError>({\n        url: '/file/status',\n        ...options,\n        ...params\n    });\n};\n\n/**\n * Write log\n *\n * Write a log entry to the server logs with specified level and metadata.\n */\nexport const appLog = <ThrowOnError extends boolean = false>(parameters: {\n    directory?: string;\n    service: string;\n    level: 'debug' | 'info' | 'error' | 'warn';\n    message: string;\n    extra?: {\n        [key: string]: unknown;\n    };\n}, options?: Options<never, ThrowOnError>) => {\n    const params = buildClientParams([parameters], [{ args: [\n                { in: 'query', key: 'directory' },\n                { in: 'body', key: 'service' },\n                { in: 'body', key: 'level' },\n                { in: 'body', key: 'message' },\n                { in: 'body', key: 'extra' }\n            ] }]);\n    return (options?.client ?? client).post<AppLogResponses, AppLogErrors, ThrowOnError>({\n        url: '/log',\n        ...options,\n        ...params,\n        headers: {\n            'Content-Type': 'application/json',\n            ...options?.headers,\n            ...params.headers\n        }\n    });\n};\n\n/**\n * List agents\n *\n * Get a list of all available AI agents in the OpenCode system.\n */\nexport const appAgents = <ThrowOnError extends boolean = false>(parameters?: {\n    directory?: string;\n}, options?: Options<never, ThrowOnError>) => {\n    const params = buildClientParams([parameters], [{ args: [{ in: 'query', key: 'directory' }] }]);\n    return (options?.client ?? client).get<AppAgentsResponses, unknown, ThrowOnError>({\n        url: '/agent',\n        ...options,\n        ...params\n    });\n};\n\n/**\n * Get MCP status\n *\n * Get the status of all Model Context Protocol (MCP) servers.\n */\nexport const mcpStatus = <ThrowOnError extends boolean = false>(parameters?: {\n    directory?: string;\n}, options?: Options<never, ThrowOnError>) => {\n    const params = buildClientParams([parameters], [{ args: [{ in: 'query', key: 'directory' }] }]);\n    return (options?.client ?? client).get<McpStatusResponses, unknown, ThrowOnError>({\n        url: '/mcp',\n        ...options,\n        ...params\n    });\n};\n\n/**\n * Add MCP server\n *\n * Dynamically add a new Model Context Protocol (MCP) server to the system.\n */\nexport const mcpAdd = <ThrowOnError extends boolean = false>(parameters: {\n    directory?: string;\n    name: string;\n    config: McpLocalConfig | McpRemoteConfig;\n}, options?: Options<never, ThrowOnError>) => {\n    const params = buildClientParams([parameters], [{ args: [\n                { in: 'query', key: 'directory' },\n                { in: 'body', key: 'name' },\n                { in: 'body', key: 'config' }\n            ] }]);\n    return (options?.client ?? client).post<McpAddResponses, McpAddErrors, ThrowOnError>({\n        url: '/mcp',\n        ...options,\n        ...params,\n        headers: {\n            'Content-Type': 'application/json',\n            ...options?.headers,\n            ...params.headers\n        }\n    });\n};\n\n/**\n * Remove MCP OAuth\n *\n * Remove OAuth credentials for an MCP server\n */\nexport const mcpAuthRemove = <ThrowOnError extends boolean = false>(parameters: {\n    name: string;\n    directory?: string;\n}, options?: Options<never, ThrowOnError>) => {\n    const params = buildClientParams([parameters], [{ args: [{ in: 'path', key: 'name' }, { in: 'query', key: 'directory' }] }]);\n    return (options?.client ?? client).delete<McpAuthRemoveResponses, McpAuthRemoveErrors, ThrowOnError>({\n        url: '/mcp/{name}/auth',\n        ...options,\n        ...params\n    });\n};\n\n/**\n * Start MCP OAuth\n *\n * Start OAuth authentication flow for a Model Context Protocol (MCP) server.\n */\nexport const mcpAuthStart = <ThrowOnError extends boolean = false>(parameters: {\n    name: string;\n    directory?: string;\n}, options?: Options<never, ThrowOnError>) => {\n    const params = buildClientParams([parameters], [{ args: [{ in: 'path', key: 'name' }, { in: 'query', key: 'directory' }] }]);\n    return (options?.client ?? client).post<McpAuthStartResponses, McpAuthStartErrors, ThrowOnError>({\n        url: '/mcp/{name}/auth',\n        ...options,\n        ...params\n    });\n};\n\n/**\n * Complete MCP OAuth\n *\n * Complete OAuth authentication for a Model Context Protocol (MCP) server using the authorization code.\n */\nexport const mcpAuthCallback = <ThrowOnError extends boolean = false>(parameters: {\n    name: string;\n    directory?: string;\n    code: string;\n}, options?: Options<never, ThrowOnError>) => {\n    const params = buildClientParams([parameters], [{ args: [\n                { in: 'path', key: 'name' },\n                { in: 'query', key: 'directory' },\n                { in: 'body', key: 'code' }\n            ] }]);\n    return (options?.client ?? client).post<McpAuthCallbackResponses, McpAuthCallbackErrors, ThrowOnError>({\n        url: '/mcp/{name}/auth/callback',\n        ...options,\n        ...params,\n        headers: {\n            'Content-Type': 'application/json',\n            ...options?.headers,\n            ...params.headers\n        }\n    });\n};\n\n/**\n * Authenticate MCP OAuth\n *\n * Start OAuth flow and wait for callback (opens browser)\n */\nexport const mcpAuthAuthenticate = <ThrowOnError extends boolean = false>(parameters: {\n    name: string;\n    directory?: string;\n}, options?: Options<never, ThrowOnError>) => {\n    const params = buildClientParams([parameters], [{ args: [{ in: 'path', key: 'name' }, { in: 'query', key: 'directory' }] }]);\n    return (options?.client ?? client).post<McpAuthAuthenticateResponses, McpAuthAuthenticateErrors, ThrowOnError>({\n        url: '/mcp/{name}/auth/authenticate',\n        ...options,\n        ...params\n    });\n};\n\n/**\n * Connect an MCP server\n */\nexport const mcpConnect = <ThrowOnError extends boolean = false>(parameters: {\n    name: string;\n    directory?: string;\n}, options?: Options<never, ThrowOnError>) => {\n    const params = buildClientParams([parameters], [{ args: [{ in: 'path', key: 'name' }, { in: 'query', key: 'directory' }] }]);\n    return (options?.client ?? client).post<McpConnectResponses, unknown, ThrowOnError>({\n        url: '/mcp/{name}/connect',\n        ...options,\n        ...params\n    });\n};\n\n/**\n * Disconnect an MCP server\n */\nexport const mcpDisconnect = <ThrowOnError extends boolean = false>(parameters: {\n    name: string;\n    directory?: string;\n}, options?: Options<never, ThrowOnError>) => {\n    const params = buildClientParams([parameters], [{ args: [{ in: 'path', key: 'name' }, { in: 'query', key: 'directory' }] }]);\n    return (options?.client ?? client).post<McpDisconnectResponses, unknown, ThrowOnError>({\n        url: '/mcp/{name}/disconnect',\n        ...options,\n        ...params\n    });\n};\n\n/**\n * Get LSP status\n *\n * Get LSP server status\n */\nexport const lspStatus = <ThrowOnError extends boolean = false>(parameters?: {\n    directory?: string;\n}, options?: Options<never, ThrowOnError>) => {\n    const params = buildClientParams([parameters], [{ args: [{ in: 'query', key: 'directory' }] }]);\n    return (options?.client ?? client).get<LspStatusResponses, unknown, ThrowOnError>({\n        url: '/lsp',\n        ...options,\n        ...params\n    });\n};\n\n/**\n * Get formatter status\n *\n * Get formatter status\n */\nexport const formatterStatus = <ThrowOnError extends boolean = false>(parameters?: {\n    directory?: string;\n}, options?: Options<never, ThrowOnError>) => {\n    const params = buildClientParams([parameters], [{ args: [{ in: 'query', key: 'directory' }] }]);\n    return (options?.client ?? client).get<FormatterStatusResponses, unknown, ThrowOnError>({\n        url: '/formatter',\n        ...options,\n        ...params\n    });\n};\n\n/**\n * Append TUI prompt\n *\n * Append prompt to the TUI\n */\nexport const tuiAppendPrompt = <ThrowOnError extends boolean = false>(parameters: {\n    directory?: string;\n    text: string;\n}, options?: Options<never, ThrowOnError>) => {\n    const params = buildClientParams([parameters], [{ args: [{ in: 'query', key: 'directory' }, { in: 'body', key: 'text' }] }]);\n    return (options?.client ?? client).post<TuiAppendPromptResponses, TuiAppendPromptErrors, ThrowOnError>({\n        url: '/tui/append-prompt',\n        ...options,\n        ...params,\n        headers: {\n            'Content-Type': 'application/json',\n            ...options?.headers,\n            ...params.headers\n        }\n    });\n};\n\n/**\n * Open help dialog\n *\n * Open the help dialog in the TUI to display user assistance information.\n */\nexport const tuiOpenHelp = <ThrowOnError extends boolean = false>(parameters?: {\n    directory?: string;\n}, options?: Options<never, ThrowOnError>) => {\n    const params = buildClientParams([parameters], [{ args: [{ in: 'query', key: 'directory' }] }]);\n    return (options?.client ?? client).post<TuiOpenHelpResponses, unknown, ThrowOnError>({\n        url: '/tui/open-help',\n        ...options,\n        ...params\n    });\n};\n\n/**\n * Open sessions dialog\n *\n * Open the session dialog\n */\nexport const tuiOpenSessions = <ThrowOnError extends boolean = false>(parameters?: {\n    directory?: string;\n}, options?: Options<never, ThrowOnError>) => {\n    const params = buildClientParams([parameters], [{ args: [{ in: 'query', key: 'directory' }] }]);\n    return (options?.client ?? client).post<TuiOpenSessionsResponses, unknown, ThrowOnError>({\n        url: '/tui/open-sessions',\n        ...options,\n        ...params\n    });\n};\n\n/**\n * Open themes dialog\n *\n * Open the theme dialog\n */\nexport const tuiOpenThemes = <ThrowOnError extends boolean = false>(parameters?: {\n    directory?: string;\n}, options?: Options<never, ThrowOnError>) => {\n    const params = buildClientParams([parameters], [{ args: [{ in: 'query', key: 'directory' }] }]);\n    return (options?.client ?? client).post<TuiOpenThemesResponses, unknown, ThrowOnError>({\n        url: '/tui/open-themes',\n        ...options,\n        ...params\n    });\n};\n\n/**\n * Open models dialog\n *\n * Open the model dialog\n */\nexport const tuiOpenModels = <ThrowOnError extends boolean = false>(parameters?: {\n    directory?: string;\n}, options?: Options<never, ThrowOnError>) => {\n    const params = buildClientParams([parameters], [{ args: [{ in: 'query', key: 'directory' }] }]);\n    return (options?.client ?? client).post<TuiOpenModelsResponses, unknown, ThrowOnError>({\n        url: '/tui/open-models',\n        ...options,\n        ...params\n    });\n};\n\n/**\n * Submit TUI prompt\n *\n * Submit the prompt\n */\nexport const tuiSubmitPrompt = <ThrowOnError extends boolean = false>(parameters?: {\n    directory?: string;\n}, options?: Options<never, ThrowOnError>) => {\n    const params = buildClientParams([parameters], [{ args: [{ in: 'query', key: 'directory' }] }]);\n    return (options?.client ?? client).post<TuiSubmitPromptResponses, unknown, ThrowOnError>({\n        url: '/tui/submit-prompt',\n        ...options,\n        ...params\n    });\n};\n\n/**\n * Clear TUI prompt\n *\n * Clear the prompt\n */\nexport const tuiClearPrompt = <ThrowOnError extends boolean = false>(parameters?: {\n    directory?: string;\n}, options?: Options<never, ThrowOnError>) => {\n    const params = buildClientParams([parameters], [{ args: [{ in: 'query', key: 'directory' }] }]);\n    return (options?.client ?? client).post<TuiClearPromptResponses, unknown, ThrowOnError>({\n        url: '/tui/clear-prompt',\n        ...options,\n        ...params\n    });\n};\n\n/**\n * Execute TUI command\n *\n * Execute a TUI command (e.g. agent_cycle)\n */\nexport const tuiExecuteCommand = <ThrowOnError extends boolean = false>(parameters: {\n    directory?: string;\n    command: string;\n}, options?: Options<never, ThrowOnError>) => {\n    const params = buildClientParams([parameters], [{ args: [{ in: 'query', key: 'directory' }, { in: 'body', key: 'command' }] }]);\n    return (options?.client ?? client).post<TuiExecuteCommandResponses, TuiExecuteCommandErrors, ThrowOnError>({\n        url: '/tui/execute-command',\n        ...options,\n        ...params,\n        headers: {\n            'Content-Type': 'application/json',\n            ...options?.headers,\n            ...params.headers\n        }\n    });\n};\n\n/**\n * Show TUI toast\n *\n * Show a toast notification in the TUI\n */\nexport const tuiShowToast = <ThrowOnError extends boolean = false>(parameters: {\n    directory?: string;\n    title?: string;\n    message: string;\n    variant: 'info' | 'success' | 'warning' | 'error';\n    duration?: number;\n}, options?: Options<never, ThrowOnError>) => {\n    const params = buildClientParams([parameters], [{ args: [\n                { in: 'query', key: 'directory' },\n                { in: 'body', key: 'title' },\n                { in: 'body', key: 'message' },\n                { in: 'body', key: 'variant' },\n                { in: 'body', key: 'duration' }\n            ] }]);\n    return (options?.client ?? client).post<TuiShowToastResponses, unknown, ThrowOnError>({\n        url: '/tui/show-toast',\n        ...options,\n        ...params,\n        headers: {\n            'Content-Type': 'application/json',\n            ...options?.headers,\n            ...params.headers\n        }\n    });\n};\n\n/**\n * Publish TUI event\n *\n * Publish a TUI event\n */\nexport const tuiPublish = <ThrowOnError extends boolean = false>(parameters?: {\n    directory?: string;\n    body?: EventTuiPromptAppend | EventTuiCommandExecute | EventTuiToastShow;\n}, options?: Options<never, ThrowOnError>) => {\n    const params = buildClientParams([parameters], [{ args: [{ in: 'query', key: 'directory' }, { key: 'body', map: 'body' }] }]);\n    return (options?.client ?? client).post<TuiPublishResponses, TuiPublishErrors, ThrowOnError>({\n        url: '/tui/publish',\n        ...options,\n        ...params,\n        headers: {\n            'Content-Type': 'application/json',\n            ...options?.headers,\n            ...params.headers\n        }\n    });\n};\n\n/**\n * Get next TUI request\n *\n * Retrieve the next TUI (Terminal User Interface) request from the queue for processing.\n */\nexport const tuiControlNext = <ThrowOnError extends boolean = false>(parameters?: {\n    directory?: string;\n}, options?: Options<never, ThrowOnError>) => {\n    const params = buildClientParams([parameters], [{ args: [{ in: 'query', key: 'directory' }] }]);\n    return (options?.client ?? client).get<TuiControlNextResponses, unknown, ThrowOnError>({\n        url: '/tui/control/next',\n        ...options,\n        ...params\n    });\n};\n\n/**\n * Submit TUI response\n *\n * Submit a response to the TUI request queue to complete a pending request.\n */\nexport const tuiControlResponse = <ThrowOnError extends boolean = false>(parameters?: {\n    directory?: string;\n    body?: unknown;\n}, options?: Options<never, ThrowOnError>) => {\n    const params = buildClientParams([parameters], [{ args: [{ in: 'query', key: 'directory' }, { key: 'body', map: 'body' }] }]);\n    return (options?.client ?? client).post<TuiControlResponseResponses, unknown, ThrowOnError>({\n        url: '/tui/control/response',\n        ...options,\n        ...params,\n        headers: {\n            'Content-Type': 'application/json',\n            ...options?.headers,\n            ...params.headers\n        }\n    });\n};\n\n/**\n * Set auth credentials\n *\n * Set authentication credentials\n */\nexport const authSet = <ThrowOnError extends boolean = false>(parameters: {\n    providerID: string;\n    directory?: string;\n    auth?: Auth;\n}, options?: Options<never, ThrowOnError>) => {\n    const params = buildClientParams([parameters], [{ args: [\n                { in: 'path', key: 'providerID' },\n                { in: 'query', key: 'directory' },\n                { key: 'auth', map: 'body' }\n            ] }]);\n    return (options?.client ?? client).put<AuthSetResponses, AuthSetErrors, ThrowOnError>({\n        url: '/auth/{providerID}',\n        ...options,\n        ...params,\n        headers: {\n            'Content-Type': 'application/json',\n            ...options?.headers,\n            ...params.headers\n        }\n    });\n};\n\n/**\n * Subscribe to events\n *\n * Get events\n */\nexport const eventSubscribe = <ThrowOnError extends boolean = false>(parameters?: {\n    directory?: string;\n}, options?: Options<never, ThrowOnError>) => {\n    const params = buildClientParams([parameters], [{ args: [{ in: 'query', key: 'directory' }] }]);\n    return (options?.client ?? client).sse.get<EventSubscribeResponses, unknown, ThrowOnError>({\n        url: '/event',\n        ...options,\n        ...params\n    });\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/sdks/__snapshots__/opencode/flat/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type ClientOptions = {\n    baseUrl: `${string}://${string}` | (string & {});\n};\n\nexport type EventInstallationUpdated = {\n    type: 'installation.updated';\n    properties: {\n        version: string;\n    };\n};\n\nexport type EventInstallationUpdateAvailable = {\n    type: 'installation.update-available';\n    properties: {\n        version: string;\n    };\n};\n\nexport type Project = {\n    id: string;\n    worktree: string;\n    vcs?: 'git';\n    name?: string;\n    icon?: {\n        url?: string;\n        color?: string;\n    };\n    time: {\n        created: number;\n        updated: number;\n        initialized?: number;\n    };\n};\n\nexport type EventProjectUpdated = {\n    type: 'project.updated';\n    properties: Project;\n};\n\nexport type EventServerInstanceDisposed = {\n    type: 'server.instance.disposed';\n    properties: {\n        directory: string;\n    };\n};\n\nexport type EventLspClientDiagnostics = {\n    type: 'lsp.client.diagnostics';\n    properties: {\n        serverID: string;\n        path: string;\n    };\n};\n\nexport type EventLspUpdated = {\n    type: 'lsp.updated';\n    properties: {\n        [key: string]: unknown;\n    };\n};\n\nexport type FileDiff = {\n    file: string;\n    before: string;\n    after: string;\n    additions: number;\n    deletions: number;\n};\n\nexport type UserMessage = {\n    id: string;\n    sessionID: string;\n    role: 'user';\n    time: {\n        created: number;\n    };\n    summary?: {\n        title?: string;\n        body?: string;\n        diffs: Array<FileDiff>;\n    };\n    agent: string;\n    model: {\n        providerID: string;\n        modelID: string;\n    };\n    system?: string;\n    tools?: {\n        [key: string]: boolean;\n    };\n    variant?: string;\n};\n\nexport type ProviderAuthError = {\n    name: 'ProviderAuthError';\n    data: {\n        providerID: string;\n        message: string;\n    };\n};\n\nexport type UnknownError = {\n    name: 'UnknownError';\n    data: {\n        message: string;\n    };\n};\n\nexport type MessageOutputLengthError = {\n    name: 'MessageOutputLengthError';\n    data: {\n        [key: string]: unknown;\n    };\n};\n\nexport type MessageAbortedError = {\n    name: 'MessageAbortedError';\n    data: {\n        message: string;\n    };\n};\n\nexport type ApiError = {\n    name: 'APIError';\n    data: {\n        message: string;\n        statusCode?: number;\n        isRetryable: boolean;\n        responseHeaders?: {\n            [key: string]: string;\n        };\n        responseBody?: string;\n        metadata?: {\n            [key: string]: string;\n        };\n    };\n};\n\nexport type AssistantMessage = {\n    id: string;\n    sessionID: string;\n    role: 'assistant';\n    time: {\n        created: number;\n        completed?: number;\n    };\n    error?: ProviderAuthError | UnknownError | MessageOutputLengthError | MessageAbortedError | ApiError;\n    parentID: string;\n    modelID: string;\n    providerID: string;\n    mode: string;\n    agent: string;\n    path: {\n        cwd: string;\n        root: string;\n    };\n    summary?: boolean;\n    cost: number;\n    tokens: {\n        input: number;\n        output: number;\n        reasoning: number;\n        cache: {\n            read: number;\n            write: number;\n        };\n    };\n    finish?: string;\n};\n\nexport type Message = UserMessage | AssistantMessage;\n\nexport type EventMessageUpdated = {\n    type: 'message.updated';\n    properties: {\n        info: Message;\n    };\n};\n\nexport type EventMessageRemoved = {\n    type: 'message.removed';\n    properties: {\n        sessionID: string;\n        messageID: string;\n    };\n};\n\nexport type TextPart = {\n    id: string;\n    sessionID: string;\n    messageID: string;\n    type: 'text';\n    text: string;\n    synthetic?: boolean;\n    ignored?: boolean;\n    time?: {\n        start: number;\n        end?: number;\n    };\n    metadata?: {\n        [key: string]: unknown;\n    };\n};\n\nexport type ReasoningPart = {\n    id: string;\n    sessionID: string;\n    messageID: string;\n    type: 'reasoning';\n    text: string;\n    metadata?: {\n        [key: string]: unknown;\n    };\n    time: {\n        start: number;\n        end?: number;\n    };\n};\n\nexport type FilePartSourceText = {\n    value: string;\n    start: number;\n    end: number;\n};\n\nexport type FileSource = {\n    text: FilePartSourceText;\n    type: 'file';\n    path: string;\n};\n\nexport type Range = {\n    start: {\n        line: number;\n        character: number;\n    };\n    end: {\n        line: number;\n        character: number;\n    };\n};\n\nexport type SymbolSource = {\n    text: FilePartSourceText;\n    type: 'symbol';\n    path: string;\n    range: Range;\n    name: string;\n    kind: number;\n};\n\nexport type FilePartSource = FileSource | SymbolSource;\n\nexport type FilePart = {\n    id: string;\n    sessionID: string;\n    messageID: string;\n    type: 'file';\n    mime: string;\n    filename?: string;\n    url: string;\n    source?: FilePartSource;\n};\n\nexport type ToolStatePending = {\n    status: 'pending';\n    input: {\n        [key: string]: unknown;\n    };\n    raw: string;\n};\n\nexport type ToolStateRunning = {\n    status: 'running';\n    input: {\n        [key: string]: unknown;\n    };\n    title?: string;\n    metadata?: {\n        [key: string]: unknown;\n    };\n    time: {\n        start: number;\n    };\n};\n\nexport type ToolStateCompleted = {\n    status: 'completed';\n    input: {\n        [key: string]: unknown;\n    };\n    output: string;\n    title: string;\n    metadata: {\n        [key: string]: unknown;\n    };\n    time: {\n        start: number;\n        end: number;\n        compacted?: number;\n    };\n    attachments?: Array<FilePart>;\n};\n\nexport type ToolStateError = {\n    status: 'error';\n    input: {\n        [key: string]: unknown;\n    };\n    error: string;\n    metadata?: {\n        [key: string]: unknown;\n    };\n    time: {\n        start: number;\n        end: number;\n    };\n};\n\nexport type ToolState = ToolStatePending | ToolStateRunning | ToolStateCompleted | ToolStateError;\n\nexport type ToolPart = {\n    id: string;\n    sessionID: string;\n    messageID: string;\n    type: 'tool';\n    callID: string;\n    tool: string;\n    state: ToolState;\n    metadata?: {\n        [key: string]: unknown;\n    };\n};\n\nexport type StepStartPart = {\n    id: string;\n    sessionID: string;\n    messageID: string;\n    type: 'step-start';\n    snapshot?: string;\n};\n\nexport type StepFinishPart = {\n    id: string;\n    sessionID: string;\n    messageID: string;\n    type: 'step-finish';\n    reason: string;\n    snapshot?: string;\n    cost: number;\n    tokens: {\n        input: number;\n        output: number;\n        reasoning: number;\n        cache: {\n            read: number;\n            write: number;\n        };\n    };\n};\n\nexport type SnapshotPart = {\n    id: string;\n    sessionID: string;\n    messageID: string;\n    type: 'snapshot';\n    snapshot: string;\n};\n\nexport type PatchPart = {\n    id: string;\n    sessionID: string;\n    messageID: string;\n    type: 'patch';\n    hash: string;\n    files: Array<string>;\n};\n\nexport type AgentPart = {\n    id: string;\n    sessionID: string;\n    messageID: string;\n    type: 'agent';\n    name: string;\n    source?: {\n        value: string;\n        start: number;\n        end: number;\n    };\n};\n\nexport type RetryPart = {\n    id: string;\n    sessionID: string;\n    messageID: string;\n    type: 'retry';\n    attempt: number;\n    error: ApiError;\n    time: {\n        created: number;\n    };\n};\n\nexport type CompactionPart = {\n    id: string;\n    sessionID: string;\n    messageID: string;\n    type: 'compaction';\n    auto: boolean;\n};\n\nexport type Part = TextPart | {\n    id: string;\n    sessionID: string;\n    messageID: string;\n    type: 'subtask';\n    prompt: string;\n    description: string;\n    agent: string;\n    command?: string;\n} | ReasoningPart | FilePart | ToolPart | StepStartPart | StepFinishPart | SnapshotPart | PatchPart | AgentPart | RetryPart | CompactionPart;\n\nexport type EventMessagePartUpdated = {\n    type: 'message.part.updated';\n    properties: {\n        part: Part;\n        delta?: string;\n    };\n};\n\nexport type EventMessagePartRemoved = {\n    type: 'message.part.removed';\n    properties: {\n        sessionID: string;\n        messageID: string;\n        partID: string;\n    };\n};\n\nexport type PermissionRequest = {\n    id: string;\n    sessionID: string;\n    permission: string;\n    patterns: Array<string>;\n    metadata: {\n        [key: string]: unknown;\n    };\n    always: Array<string>;\n    tool?: {\n        messageID: string;\n        callID: string;\n    };\n};\n\nexport type EventPermissionAsked = {\n    type: 'permission.asked';\n    properties: PermissionRequest;\n};\n\nexport type EventPermissionReplied = {\n    type: 'permission.replied';\n    properties: {\n        sessionID: string;\n        requestID: string;\n        reply: 'once' | 'always' | 'reject';\n    };\n};\n\nexport type SessionStatus = {\n    type: 'idle';\n} | {\n    type: 'retry';\n    attempt: number;\n    message: string;\n    next: number;\n} | {\n    type: 'busy';\n};\n\nexport type EventSessionStatus = {\n    type: 'session.status';\n    properties: {\n        sessionID: string;\n        status: SessionStatus;\n    };\n};\n\nexport type EventSessionIdle = {\n    type: 'session.idle';\n    properties: {\n        sessionID: string;\n    };\n};\n\nexport type EventSessionCompacted = {\n    type: 'session.compacted';\n    properties: {\n        sessionID: string;\n    };\n};\n\nexport type EventFileEdited = {\n    type: 'file.edited';\n    properties: {\n        file: string;\n    };\n};\n\nexport type Todo = {\n    /**\n     * Brief description of the task\n     */\n    content: string;\n    /**\n     * Current status of the task: pending, in_progress, completed, cancelled\n     */\n    status: string;\n    /**\n     * Priority level of the task: high, medium, low\n     */\n    priority: string;\n    /**\n     * Unique identifier for the todo item\n     */\n    id: string;\n};\n\nexport type EventTodoUpdated = {\n    type: 'todo.updated';\n    properties: {\n        sessionID: string;\n        todos: Array<Todo>;\n    };\n};\n\nexport type EventTuiPromptAppend = {\n    type: 'tui.prompt.append';\n    properties: {\n        text: string;\n    };\n};\n\nexport type EventTuiCommandExecute = {\n    type: 'tui.command.execute';\n    properties: {\n        command: 'session.list' | 'session.new' | 'session.share' | 'session.interrupt' | 'session.compact' | 'session.page.up' | 'session.page.down' | 'session.half.page.up' | 'session.half.page.down' | 'session.first' | 'session.last' | 'prompt.clear' | 'prompt.submit' | 'agent.cycle' | string;\n    };\n};\n\nexport type EventTuiToastShow = {\n    type: 'tui.toast.show';\n    properties: {\n        title?: string;\n        message: string;\n        variant: 'info' | 'success' | 'warning' | 'error';\n        /**\n         * Duration in milliseconds\n         */\n        duration?: number;\n    };\n};\n\nexport type EventMcpToolsChanged = {\n    type: 'mcp.tools.changed';\n    properties: {\n        server: string;\n    };\n};\n\nexport type EventCommandExecuted = {\n    type: 'command.executed';\n    properties: {\n        name: string;\n        sessionID: string;\n        arguments: string;\n        messageID: string;\n    };\n};\n\nexport type PermissionAction = 'allow' | 'deny' | 'ask';\n\nexport type PermissionRule = {\n    permission: string;\n    pattern: string;\n    action: PermissionAction;\n};\n\nexport type PermissionRuleset = Array<PermissionRule>;\n\nexport type Session = {\n    id: string;\n    projectID: string;\n    directory: string;\n    parentID?: string;\n    summary?: {\n        additions: number;\n        deletions: number;\n        files: number;\n        diffs?: Array<FileDiff>;\n    };\n    share?: {\n        url: string;\n    };\n    title: string;\n    version: string;\n    time: {\n        created: number;\n        updated: number;\n        compacting?: number;\n        archived?: number;\n    };\n    permission?: PermissionRuleset;\n    revert?: {\n        messageID: string;\n        partID?: string;\n        snapshot?: string;\n        diff?: string;\n    };\n};\n\nexport type EventSessionCreated = {\n    type: 'session.created';\n    properties: {\n        info: Session;\n    };\n};\n\nexport type EventSessionUpdated = {\n    type: 'session.updated';\n    properties: {\n        info: Session;\n    };\n};\n\nexport type EventSessionDeleted = {\n    type: 'session.deleted';\n    properties: {\n        info: Session;\n    };\n};\n\nexport type EventSessionDiff = {\n    type: 'session.diff';\n    properties: {\n        sessionID: string;\n        diff: Array<FileDiff>;\n    };\n};\n\nexport type EventSessionError = {\n    type: 'session.error';\n    properties: {\n        sessionID?: string;\n        error?: ProviderAuthError | UnknownError | MessageOutputLengthError | MessageAbortedError | ApiError;\n    };\n};\n\nexport type EventFileWatcherUpdated = {\n    type: 'file.watcher.updated';\n    properties: {\n        file: string;\n        event: 'add' | 'change' | 'unlink';\n    };\n};\n\nexport type EventVcsBranchUpdated = {\n    type: 'vcs.branch.updated';\n    properties: {\n        branch?: string;\n    };\n};\n\nexport type Pty = {\n    id: string;\n    title: string;\n    command: string;\n    args: Array<string>;\n    cwd: string;\n    status: 'running' | 'exited';\n    pid: number;\n};\n\nexport type EventPtyCreated = {\n    type: 'pty.created';\n    properties: {\n        info: Pty;\n    };\n};\n\nexport type EventPtyUpdated = {\n    type: 'pty.updated';\n    properties: {\n        info: Pty;\n    };\n};\n\nexport type EventPtyExited = {\n    type: 'pty.exited';\n    properties: {\n        id: string;\n        exitCode: number;\n    };\n};\n\nexport type EventPtyDeleted = {\n    type: 'pty.deleted';\n    properties: {\n        id: string;\n    };\n};\n\nexport type EventServerConnected = {\n    type: 'server.connected';\n    properties: {\n        [key: string]: unknown;\n    };\n};\n\nexport type EventGlobalDisposed = {\n    type: 'global.disposed';\n    properties: {\n        [key: string]: unknown;\n    };\n};\n\nexport type Event = EventInstallationUpdated | EventInstallationUpdateAvailable | EventProjectUpdated | EventServerInstanceDisposed | EventLspClientDiagnostics | EventLspUpdated | EventMessageUpdated | EventMessageRemoved | EventMessagePartUpdated | EventMessagePartRemoved | EventPermissionAsked | EventPermissionReplied | EventSessionStatus | EventSessionIdle | EventSessionCompacted | EventFileEdited | EventTodoUpdated | EventTuiPromptAppend | EventTuiCommandExecute | EventTuiToastShow | EventMcpToolsChanged | EventCommandExecuted | EventSessionCreated | EventSessionUpdated | EventSessionDeleted | EventSessionDiff | EventSessionError | EventFileWatcherUpdated | EventVcsBranchUpdated | EventPtyCreated | EventPtyUpdated | EventPtyExited | EventPtyDeleted | EventServerConnected | EventGlobalDisposed;\n\nexport type GlobalEvent = {\n    directory: string;\n    payload: Event;\n};\n\nexport type BadRequestError = {\n    data: unknown;\n    errors: Array<{\n        [key: string]: unknown;\n    }>;\n    success: false;\n};\n\nexport type NotFoundError = {\n    name: 'NotFoundError';\n    data: {\n        message: string;\n    };\n};\n\n/**\n * Custom keybind configurations\n */\nexport type KeybindsConfig = {\n    /**\n     * Leader key for keybind combinations\n     */\n    leader?: string;\n    /**\n     * Exit the application\n     */\n    app_exit?: string;\n    /**\n     * Open external editor\n     */\n    editor_open?: string;\n    /**\n     * List available themes\n     */\n    theme_list?: string;\n    /**\n     * Toggle sidebar\n     */\n    sidebar_toggle?: string;\n    /**\n     * Toggle session scrollbar\n     */\n    scrollbar_toggle?: string;\n    /**\n     * Toggle username visibility\n     */\n    username_toggle?: string;\n    /**\n     * View status\n     */\n    status_view?: string;\n    /**\n     * Export session to editor\n     */\n    session_export?: string;\n    /**\n     * Create a new session\n     */\n    session_new?: string;\n    /**\n     * List all sessions\n     */\n    session_list?: string;\n    /**\n     * Show session timeline\n     */\n    session_timeline?: string;\n    /**\n     * Fork session from message\n     */\n    session_fork?: string;\n    /**\n     * Rename session\n     */\n    session_rename?: string;\n    /**\n     * Share current session\n     */\n    session_share?: string;\n    /**\n     * Unshare current session\n     */\n    session_unshare?: string;\n    /**\n     * Interrupt current session\n     */\n    session_interrupt?: string;\n    /**\n     * Compact the session\n     */\n    session_compact?: string;\n    /**\n     * Scroll messages up by one page\n     */\n    messages_page_up?: string;\n    /**\n     * Scroll messages down by one page\n     */\n    messages_page_down?: string;\n    /**\n     * Scroll messages up by half page\n     */\n    messages_half_page_up?: string;\n    /**\n     * Scroll messages down by half page\n     */\n    messages_half_page_down?: string;\n    /**\n     * Navigate to first message\n     */\n    messages_first?: string;\n    /**\n     * Navigate to last message\n     */\n    messages_last?: string;\n    /**\n     * Navigate to next message\n     */\n    messages_next?: string;\n    /**\n     * Navigate to previous message\n     */\n    messages_previous?: string;\n    /**\n     * Navigate to last user message\n     */\n    messages_last_user?: string;\n    /**\n     * Copy message\n     */\n    messages_copy?: string;\n    /**\n     * Undo message\n     */\n    messages_undo?: string;\n    /**\n     * Redo message\n     */\n    messages_redo?: string;\n    /**\n     * Toggle code block concealment in messages\n     */\n    messages_toggle_conceal?: string;\n    /**\n     * Toggle tool details visibility\n     */\n    tool_details?: string;\n    /**\n     * List available models\n     */\n    model_list?: string;\n    /**\n     * Next recently used model\n     */\n    model_cycle_recent?: string;\n    /**\n     * Previous recently used model\n     */\n    model_cycle_recent_reverse?: string;\n    /**\n     * Next favorite model\n     */\n    model_cycle_favorite?: string;\n    /**\n     * Previous favorite model\n     */\n    model_cycle_favorite_reverse?: string;\n    /**\n     * List available commands\n     */\n    command_list?: string;\n    /**\n     * List agents\n     */\n    agent_list?: string;\n    /**\n     * Next agent\n     */\n    agent_cycle?: string;\n    /**\n     * Previous agent\n     */\n    agent_cycle_reverse?: string;\n    /**\n     * Cycle model variants\n     */\n    variant_cycle?: string;\n    /**\n     * Clear input field\n     */\n    input_clear?: string;\n    /**\n     * Paste from clipboard\n     */\n    input_paste?: string;\n    /**\n     * Submit input\n     */\n    input_submit?: string;\n    /**\n     * Insert newline in input\n     */\n    input_newline?: string;\n    /**\n     * Move cursor left in input\n     */\n    input_move_left?: string;\n    /**\n     * Move cursor right in input\n     */\n    input_move_right?: string;\n    /**\n     * Move cursor up in input\n     */\n    input_move_up?: string;\n    /**\n     * Move cursor down in input\n     */\n    input_move_down?: string;\n    /**\n     * Select left in input\n     */\n    input_select_left?: string;\n    /**\n     * Select right in input\n     */\n    input_select_right?: string;\n    /**\n     * Select up in input\n     */\n    input_select_up?: string;\n    /**\n     * Select down in input\n     */\n    input_select_down?: string;\n    /**\n     * Move to start of line in input\n     */\n    input_line_home?: string;\n    /**\n     * Move to end of line in input\n     */\n    input_line_end?: string;\n    /**\n     * Select to start of line in input\n     */\n    input_select_line_home?: string;\n    /**\n     * Select to end of line in input\n     */\n    input_select_line_end?: string;\n    /**\n     * Move to start of visual line in input\n     */\n    input_visual_line_home?: string;\n    /**\n     * Move to end of visual line in input\n     */\n    input_visual_line_end?: string;\n    /**\n     * Select to start of visual line in input\n     */\n    input_select_visual_line_home?: string;\n    /**\n     * Select to end of visual line in input\n     */\n    input_select_visual_line_end?: string;\n    /**\n     * Move to start of buffer in input\n     */\n    input_buffer_home?: string;\n    /**\n     * Move to end of buffer in input\n     */\n    input_buffer_end?: string;\n    /**\n     * Select to start of buffer in input\n     */\n    input_select_buffer_home?: string;\n    /**\n     * Select to end of buffer in input\n     */\n    input_select_buffer_end?: string;\n    /**\n     * Delete line in input\n     */\n    input_delete_line?: string;\n    /**\n     * Delete to end of line in input\n     */\n    input_delete_to_line_end?: string;\n    /**\n     * Delete to start of line in input\n     */\n    input_delete_to_line_start?: string;\n    /**\n     * Backspace in input\n     */\n    input_backspace?: string;\n    /**\n     * Delete character in input\n     */\n    input_delete?: string;\n    /**\n     * Undo in input\n     */\n    input_undo?: string;\n    /**\n     * Redo in input\n     */\n    input_redo?: string;\n    /**\n     * Move word forward in input\n     */\n    input_word_forward?: string;\n    /**\n     * Move word backward in input\n     */\n    input_word_backward?: string;\n    /**\n     * Select word forward in input\n     */\n    input_select_word_forward?: string;\n    /**\n     * Select word backward in input\n     */\n    input_select_word_backward?: string;\n    /**\n     * Delete word forward in input\n     */\n    input_delete_word_forward?: string;\n    /**\n     * Delete word backward in input\n     */\n    input_delete_word_backward?: string;\n    /**\n     * Previous history item\n     */\n    history_previous?: string;\n    /**\n     * Next history item\n     */\n    history_next?: string;\n    /**\n     * Next child session\n     */\n    session_child_cycle?: string;\n    /**\n     * Previous child session\n     */\n    session_child_cycle_reverse?: string;\n    /**\n     * Go to parent session\n     */\n    session_parent?: string;\n    /**\n     * Suspend terminal\n     */\n    terminal_suspend?: string;\n    /**\n     * Toggle terminal title\n     */\n    terminal_title_toggle?: string;\n    /**\n     * Toggle tips on home screen\n     */\n    tips_toggle?: string;\n};\n\n/**\n * Log level\n */\nexport type LogLevel = 'DEBUG' | 'INFO' | 'WARN' | 'ERROR';\n\n/**\n * Server configuration for opencode serve and web commands\n */\nexport type ServerConfig = {\n    /**\n     * Port to listen on\n     */\n    port?: number;\n    /**\n     * Hostname to listen on\n     */\n    hostname?: string;\n    /**\n     * Enable mDNS service discovery\n     */\n    mdns?: boolean;\n    /**\n     * Additional domains to allow for CORS\n     */\n    cors?: Array<string>;\n};\n\nexport type PermissionActionConfig = 'ask' | 'allow' | 'deny';\n\nexport type PermissionObjectConfig = {\n    [key: string]: PermissionActionConfig;\n};\n\nexport type PermissionRuleConfig = PermissionActionConfig | PermissionObjectConfig;\n\nexport type PermissionConfig = {\n    read?: PermissionRuleConfig;\n    edit?: PermissionRuleConfig;\n    glob?: PermissionRuleConfig;\n    grep?: PermissionRuleConfig;\n    list?: PermissionRuleConfig;\n    bash?: PermissionRuleConfig;\n    task?: PermissionRuleConfig;\n    external_directory?: PermissionRuleConfig;\n    todowrite?: PermissionActionConfig;\n    todoread?: PermissionActionConfig;\n    webfetch?: PermissionActionConfig;\n    websearch?: PermissionActionConfig;\n    codesearch?: PermissionActionConfig;\n    lsp?: PermissionRuleConfig;\n    doom_loop?: PermissionActionConfig;\n    [key: string]: PermissionRuleConfig | PermissionActionConfig | undefined;\n} | PermissionActionConfig;\n\nexport type AgentConfig = {\n    model?: string;\n    temperature?: number;\n    top_p?: number;\n    prompt?: string;\n    /**\n     * @deprecated Use 'permission' field instead\n     */\n    tools?: {\n        [key: string]: boolean;\n    };\n    disable?: boolean;\n    /**\n     * Description of when to use the agent\n     */\n    description?: string;\n    mode?: 'subagent' | 'primary' | 'all';\n    options?: {\n        [key: string]: unknown;\n    };\n    /**\n     * Hex color code for the agent (e.g., #FF5733)\n     */\n    color?: string;\n    /**\n     * Maximum number of agentic iterations before forcing text-only response\n     */\n    steps?: number;\n    /**\n     * @deprecated Use 'steps' field instead.\n     */\n    maxSteps?: number;\n    permission?: PermissionConfig;\n    [key: string]: unknown;\n};\n\nexport type ProviderConfig = {\n    api?: string;\n    name?: string;\n    env?: Array<string>;\n    id?: string;\n    npm?: string;\n    models?: {\n        [key: string]: {\n            id?: string;\n            name?: string;\n            family?: string;\n            release_date?: string;\n            attachment?: boolean;\n            reasoning?: boolean;\n            temperature?: boolean;\n            tool_call?: boolean;\n            interleaved?: true | {\n                field: 'reasoning_content' | 'reasoning_details';\n            };\n            cost?: {\n                input: number;\n                output: number;\n                cache_read?: number;\n                cache_write?: number;\n                context_over_200k?: {\n                    input: number;\n                    output: number;\n                    cache_read?: number;\n                    cache_write?: number;\n                };\n            };\n            limit?: {\n                context: number;\n                output: number;\n            };\n            modalities?: {\n                input: Array<'text' | 'audio' | 'image' | 'video' | 'pdf'>;\n                output: Array<'text' | 'audio' | 'image' | 'video' | 'pdf'>;\n            };\n            experimental?: boolean;\n            status?: 'alpha' | 'beta' | 'deprecated';\n            options?: {\n                [key: string]: unknown;\n            };\n            headers?: {\n                [key: string]: string;\n            };\n            provider?: {\n                npm: string;\n            };\n            /**\n             * Variant-specific configuration\n             */\n            variants?: {\n                [key: string]: {\n                    /**\n                     * Disable this variant for the model\n                     */\n                    disabled?: boolean;\n                    [key: string]: unknown;\n                };\n            };\n        };\n    };\n    whitelist?: Array<string>;\n    blacklist?: Array<string>;\n    options?: {\n        apiKey?: string;\n        baseURL?: string;\n        /**\n         * GitHub Enterprise URL for copilot authentication\n         */\n        enterpriseUrl?: string;\n        /**\n         * Enable promptCacheKey for this provider (default false)\n         */\n        setCacheKey?: boolean;\n        /**\n         * Timeout in milliseconds for requests to this provider. Default is 300000 (5 minutes). Set to false to disable timeout.\n         */\n        timeout?: number | false;\n        [key: string]: unknown;\n    };\n};\n\nexport type McpLocalConfig = {\n    /**\n     * Type of MCP server connection\n     */\n    type: 'local';\n    /**\n     * Command and arguments to run the MCP server\n     */\n    command: Array<string>;\n    /**\n     * Environment variables to set when running the MCP server\n     */\n    environment?: {\n        [key: string]: string;\n    };\n    /**\n     * Enable or disable the MCP server on startup\n     */\n    enabled?: boolean;\n    /**\n     * Timeout in ms for fetching tools from the MCP server. Defaults to 5000 (5 seconds) if not specified.\n     */\n    timeout?: number;\n};\n\nexport type McpOAuthConfig = {\n    /**\n     * OAuth client ID. If not provided, dynamic client registration (RFC 7591) will be attempted.\n     */\n    clientId?: string;\n    /**\n     * OAuth client secret (if required by the authorization server)\n     */\n    clientSecret?: string;\n    /**\n     * OAuth scopes to request during authorization\n     */\n    scope?: string;\n};\n\nexport type McpRemoteConfig = {\n    /**\n     * Type of MCP server connection\n     */\n    type: 'remote';\n    /**\n     * URL of the remote MCP server\n     */\n    url: string;\n    /**\n     * Enable or disable the MCP server on startup\n     */\n    enabled?: boolean;\n    /**\n     * Headers to send with the request\n     */\n    headers?: {\n        [key: string]: string;\n    };\n    /**\n     * OAuth authentication configuration for the MCP server. Set to false to disable OAuth auto-detection.\n     */\n    oauth?: McpOAuthConfig | false;\n    /**\n     * Timeout in ms for fetching tools from the MCP server. Defaults to 5000 (5 seconds) if not specified.\n     */\n    timeout?: number;\n};\n\n/**\n * @deprecated Always uses stretch layout.\n */\nexport type LayoutConfig = 'auto' | 'stretch';\n\nexport type Config = {\n    /**\n     * JSON schema reference for configuration validation\n     */\n    $schema?: string;\n    /**\n     * Theme name to use for the interface\n     */\n    theme?: string;\n    keybinds?: KeybindsConfig;\n    logLevel?: LogLevel;\n    /**\n     * TUI specific settings\n     */\n    tui?: {\n        /**\n         * TUI scroll speed\n         */\n        scroll_speed?: number;\n        /**\n         * Scroll acceleration settings\n         */\n        scroll_acceleration?: {\n            /**\n             * Enable scroll acceleration\n             */\n            enabled: boolean;\n        };\n        /**\n         * Control diff rendering style: 'auto' adapts to terminal width, 'stacked' always shows single column\n         */\n        diff_style?: 'auto' | 'stacked';\n    };\n    server?: ServerConfig;\n    /**\n     * Command configuration, see https://opencode.ai/docs/commands\n     */\n    command?: {\n        [key: string]: {\n            template: string;\n            description?: string;\n            agent?: string;\n            model?: string;\n            subtask?: boolean;\n        };\n    };\n    watcher?: {\n        ignore?: Array<string>;\n    };\n    plugin?: Array<string>;\n    snapshot?: boolean;\n    /**\n     * Control sharing behavior:'manual' allows manual sharing via commands, 'auto' enables automatic sharing, 'disabled' disables all sharing\n     */\n    share?: 'manual' | 'auto' | 'disabled';\n    /**\n     * @deprecated Use 'share' field instead. Share newly created sessions automatically\n     */\n    autoshare?: boolean;\n    /**\n     * Automatically update to the latest version. Set to true to auto-update, false to disable, or 'notify' to show update notifications\n     */\n    autoupdate?: boolean | 'notify';\n    /**\n     * Disable providers that are loaded automatically\n     */\n    disabled_providers?: Array<string>;\n    /**\n     * When set, ONLY these providers will be enabled. All other providers will be ignored\n     */\n    enabled_providers?: Array<string>;\n    /**\n     * Model to use in the format of provider/model, eg anthropic/claude-2\n     */\n    model?: string;\n    /**\n     * Small model to use for tasks like title generation in the format of provider/model\n     */\n    small_model?: string;\n    /**\n     * Default agent to use when none is specified. Must be a primary agent. Falls back to 'build' if not set or if the specified agent is invalid.\n     */\n    default_agent?: string;\n    /**\n     * Custom username to display in conversations instead of system username\n     */\n    username?: string;\n    /**\n     * @deprecated Use `agent` field instead.\n     */\n    mode?: {\n        build?: AgentConfig;\n        plan?: AgentConfig;\n        [key: string]: AgentConfig | undefined;\n    };\n    /**\n     * Agent configuration, see https://opencode.ai/docs/agent\n     */\n    agent?: {\n        plan?: AgentConfig;\n        build?: AgentConfig;\n        general?: AgentConfig;\n        explore?: AgentConfig;\n        title?: AgentConfig;\n        summary?: AgentConfig;\n        compaction?: AgentConfig;\n        [key: string]: AgentConfig | undefined;\n    };\n    /**\n     * Custom provider configurations and model overrides\n     */\n    provider?: {\n        [key: string]: ProviderConfig;\n    };\n    /**\n     * MCP (Model Context Protocol) server configurations\n     */\n    mcp?: {\n        [key: string]: McpLocalConfig | McpRemoteConfig;\n    };\n    formatter?: false | {\n        [key: string]: {\n            disabled?: boolean;\n            command?: Array<string>;\n            environment?: {\n                [key: string]: string;\n            };\n            extensions?: Array<string>;\n        };\n    };\n    lsp?: false | {\n        [key: string]: {\n            disabled: true;\n        } | {\n            command: Array<string>;\n            extensions?: Array<string>;\n            disabled?: boolean;\n            env?: {\n                [key: string]: string;\n            };\n            initialization?: {\n                [key: string]: unknown;\n            };\n        };\n    };\n    /**\n     * Additional instruction files or patterns to include\n     */\n    instructions?: Array<string>;\n    layout?: LayoutConfig;\n    permission?: PermissionConfig;\n    tools?: {\n        [key: string]: boolean;\n    };\n    enterprise?: {\n        /**\n         * Enterprise URL\n         */\n        url?: string;\n    };\n    compaction?: {\n        /**\n         * Enable automatic compaction when context is full (default: true)\n         */\n        auto?: boolean;\n        /**\n         * Enable pruning of old tool outputs (default: true)\n         */\n        prune?: boolean;\n    };\n    experimental?: {\n        hook?: {\n            file_edited?: {\n                [key: string]: Array<{\n                    command: Array<string>;\n                    environment?: {\n                        [key: string]: string;\n                    };\n                }>;\n            };\n            session_completed?: Array<{\n                command: Array<string>;\n                environment?: {\n                    [key: string]: string;\n                };\n            }>;\n        };\n        /**\n         * Number of retries for chat completions on failure\n         */\n        chatMaxRetries?: number;\n        disable_paste_summary?: boolean;\n        /**\n         * Enable the batch tool\n         */\n        batch_tool?: boolean;\n        /**\n         * Enable OpenTelemetry spans for AI SDK calls (using the 'experimental_telemetry' flag)\n         */\n        openTelemetry?: boolean;\n        /**\n         * Tools that should only be available to primary agents.\n         */\n        primary_tools?: Array<string>;\n        /**\n         * Continue the agent loop when a tool call is denied\n         */\n        continue_loop_on_deny?: boolean;\n        /**\n         * Timeout in milliseconds for model context protocol (MCP) requests\n         */\n        mcp_timeout?: number;\n    };\n};\n\nexport type ToolIds = Array<string>;\n\nexport type ToolListItem = {\n    id: string;\n    description: string;\n    parameters: unknown;\n};\n\nexport type ToolList = Array<ToolListItem>;\n\nexport type Path = {\n    home: string;\n    state: string;\n    config: string;\n    worktree: string;\n    directory: string;\n};\n\nexport type VcsInfo = {\n    branch: string;\n};\n\nexport type TextPartInput = {\n    id?: string;\n    type: 'text';\n    text: string;\n    synthetic?: boolean;\n    ignored?: boolean;\n    time?: {\n        start: number;\n        end?: number;\n    };\n    metadata?: {\n        [key: string]: unknown;\n    };\n};\n\nexport type FilePartInput = {\n    id?: string;\n    type: 'file';\n    mime: string;\n    filename?: string;\n    url: string;\n    source?: FilePartSource;\n};\n\nexport type AgentPartInput = {\n    id?: string;\n    type: 'agent';\n    name: string;\n    source?: {\n        value: string;\n        start: number;\n        end: number;\n    };\n};\n\nexport type SubtaskPartInput = {\n    id?: string;\n    type: 'subtask';\n    prompt: string;\n    description: string;\n    agent: string;\n    command?: string;\n};\n\nexport type Command = {\n    name: string;\n    description?: string;\n    agent?: string;\n    model?: string;\n    mcp?: boolean;\n    template: string;\n    subtask?: boolean;\n    hints: Array<string>;\n};\n\nexport type Model = {\n    id: string;\n    providerID: string;\n    api: {\n        id: string;\n        url: string;\n        npm: string;\n    };\n    name: string;\n    family?: string;\n    capabilities: {\n        temperature: boolean;\n        reasoning: boolean;\n        attachment: boolean;\n        toolcall: boolean;\n        input: {\n            text: boolean;\n            audio: boolean;\n            image: boolean;\n            video: boolean;\n            pdf: boolean;\n        };\n        output: {\n            text: boolean;\n            audio: boolean;\n            image: boolean;\n            video: boolean;\n            pdf: boolean;\n        };\n        interleaved: boolean | {\n            field: 'reasoning_content' | 'reasoning_details';\n        };\n    };\n    cost: {\n        input: number;\n        output: number;\n        cache: {\n            read: number;\n            write: number;\n        };\n        experimentalOver200K?: {\n            input: number;\n            output: number;\n            cache: {\n                read: number;\n                write: number;\n            };\n        };\n    };\n    limit: {\n        context: number;\n        output: number;\n    };\n    status: 'alpha' | 'beta' | 'deprecated' | 'active';\n    options: {\n        [key: string]: unknown;\n    };\n    headers: {\n        [key: string]: string;\n    };\n    release_date: string;\n    variants?: {\n        [key: string]: {\n            [key: string]: unknown;\n        };\n    };\n};\n\nexport type Provider = {\n    id: string;\n    name: string;\n    source: 'env' | 'config' | 'custom' | 'api';\n    env: Array<string>;\n    key?: string;\n    options: {\n        [key: string]: unknown;\n    };\n    models: {\n        [key: string]: Model;\n    };\n};\n\nexport type ProviderAuthMethod = {\n    type: 'oauth' | 'api';\n    label: string;\n};\n\nexport type ProviderAuthAuthorization = {\n    url: string;\n    method: 'auto' | 'code';\n    instructions: string;\n};\n\nexport type Symbol = {\n    name: string;\n    kind: number;\n    location: {\n        uri: string;\n        range: Range;\n    };\n};\n\nexport type FileNode = {\n    name: string;\n    path: string;\n    absolute: string;\n    type: 'file' | 'directory';\n    ignored: boolean;\n};\n\nexport type FileContent = {\n    type: 'text';\n    content: string;\n    diff?: string;\n    patch?: {\n        oldFileName: string;\n        newFileName: string;\n        oldHeader?: string;\n        newHeader?: string;\n        hunks: Array<{\n            oldStart: number;\n            oldLines: number;\n            newStart: number;\n            newLines: number;\n            lines: Array<string>;\n        }>;\n        index?: string;\n    };\n    encoding?: 'base64';\n    mimeType?: string;\n};\n\nexport type File = {\n    path: string;\n    added: number;\n    removed: number;\n    status: 'added' | 'deleted' | 'modified';\n};\n\nexport type Agent = {\n    name: string;\n    description?: string;\n    mode: 'subagent' | 'primary' | 'all';\n    native?: boolean;\n    hidden?: boolean;\n    topP?: number;\n    temperature?: number;\n    color?: string;\n    permission: PermissionRuleset;\n    model?: {\n        modelID: string;\n        providerID: string;\n    };\n    prompt?: string;\n    options: {\n        [key: string]: unknown;\n    };\n    steps?: number;\n};\n\nexport type McpStatusConnected = {\n    status: 'connected';\n};\n\nexport type McpStatusDisabled = {\n    status: 'disabled';\n};\n\nexport type McpStatusFailed = {\n    status: 'failed';\n    error: string;\n};\n\nexport type McpStatusNeedsAuth = {\n    status: 'needs_auth';\n};\n\nexport type McpStatusNeedsClientRegistration = {\n    status: 'needs_client_registration';\n    error: string;\n};\n\nexport type McpStatus = McpStatusConnected | McpStatusDisabled | McpStatusFailed | McpStatusNeedsAuth | McpStatusNeedsClientRegistration;\n\nexport type LspStatus = {\n    id: string;\n    name: string;\n    root: string;\n    status: 'connected' | 'error';\n};\n\nexport type FormatterStatus = {\n    name: string;\n    extensions: Array<string>;\n    enabled: boolean;\n};\n\nexport type OAuth = {\n    type: 'oauth';\n    refresh: string;\n    access: string;\n    expires: number;\n    enterpriseUrl?: string;\n};\n\nexport type ApiAuth = {\n    type: 'api';\n    key: string;\n};\n\nexport type WellKnownAuth = {\n    type: 'wellknown';\n    key: string;\n    token: string;\n};\n\nexport type Auth = OAuth | ApiAuth | WellKnownAuth;\n\nexport type GlobalHealthData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/global/health';\n};\n\nexport type GlobalHealthResponses = {\n    /**\n     * Health information\n     */\n    200: {\n        healthy: true;\n        version: string;\n    };\n};\n\nexport type GlobalHealthResponse = GlobalHealthResponses[keyof GlobalHealthResponses];\n\nexport type GlobalEventData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/global/event';\n};\n\nexport type GlobalEventResponses = {\n    /**\n     * Event stream\n     */\n    200: GlobalEvent;\n};\n\nexport type GlobalEventResponse = GlobalEventResponses[keyof GlobalEventResponses];\n\nexport type GlobalDisposeData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/global/dispose';\n};\n\nexport type GlobalDisposeResponses = {\n    /**\n     * Global disposed\n     */\n    200: boolean;\n};\n\nexport type GlobalDisposeResponse = GlobalDisposeResponses[keyof GlobalDisposeResponses];\n\nexport type ProjectListData = {\n    body?: never;\n    path?: never;\n    query?: {\n        directory?: string;\n    };\n    url: '/project';\n};\n\nexport type ProjectListResponses = {\n    /**\n     * List of projects\n     */\n    200: Array<Project>;\n};\n\nexport type ProjectListResponse = ProjectListResponses[keyof ProjectListResponses];\n\nexport type ProjectCurrentData = {\n    body?: never;\n    path?: never;\n    query?: {\n        directory?: string;\n    };\n    url: '/project/current';\n};\n\nexport type ProjectCurrentResponses = {\n    /**\n     * Current project information\n     */\n    200: Project;\n};\n\nexport type ProjectCurrentResponse = ProjectCurrentResponses[keyof ProjectCurrentResponses];\n\nexport type ProjectUpdateData = {\n    body?: {\n        name?: string;\n        icon?: {\n            url?: string;\n            color?: string;\n        };\n    };\n    path: {\n        projectID: string;\n    };\n    query?: {\n        directory?: string;\n    };\n    url: '/project/{projectID}';\n};\n\nexport type ProjectUpdateErrors = {\n    /**\n     * Bad request\n     */\n    400: BadRequestError;\n    /**\n     * Not found\n     */\n    404: NotFoundError;\n};\n\nexport type ProjectUpdateError = ProjectUpdateErrors[keyof ProjectUpdateErrors];\n\nexport type ProjectUpdateResponses = {\n    /**\n     * Updated project information\n     */\n    200: Project;\n};\n\nexport type ProjectUpdateResponse = ProjectUpdateResponses[keyof ProjectUpdateResponses];\n\nexport type PtyListData = {\n    body?: never;\n    path?: never;\n    query?: {\n        directory?: string;\n    };\n    url: '/pty';\n};\n\nexport type PtyListResponses = {\n    /**\n     * List of sessions\n     */\n    200: Array<Pty>;\n};\n\nexport type PtyListResponse = PtyListResponses[keyof PtyListResponses];\n\nexport type PtyCreateData = {\n    body?: {\n        command?: string;\n        args?: Array<string>;\n        cwd?: string;\n        title?: string;\n        env?: {\n            [key: string]: string;\n        };\n    };\n    path?: never;\n    query?: {\n        directory?: string;\n    };\n    url: '/pty';\n};\n\nexport type PtyCreateErrors = {\n    /**\n     * Bad request\n     */\n    400: BadRequestError;\n};\n\nexport type PtyCreateError = PtyCreateErrors[keyof PtyCreateErrors];\n\nexport type PtyCreateResponses = {\n    /**\n     * Created session\n     */\n    200: Pty;\n};\n\nexport type PtyCreateResponse = PtyCreateResponses[keyof PtyCreateResponses];\n\nexport type PtyRemoveData = {\n    body?: never;\n    path: {\n        ptyID: string;\n    };\n    query?: {\n        directory?: string;\n    };\n    url: '/pty/{ptyID}';\n};\n\nexport type PtyRemoveErrors = {\n    /**\n     * Not found\n     */\n    404: NotFoundError;\n};\n\nexport type PtyRemoveError = PtyRemoveErrors[keyof PtyRemoveErrors];\n\nexport type PtyRemoveResponses = {\n    /**\n     * Session removed\n     */\n    200: boolean;\n};\n\nexport type PtyRemoveResponse = PtyRemoveResponses[keyof PtyRemoveResponses];\n\nexport type PtyGetData = {\n    body?: never;\n    path: {\n        ptyID: string;\n    };\n    query?: {\n        directory?: string;\n    };\n    url: '/pty/{ptyID}';\n};\n\nexport type PtyGetErrors = {\n    /**\n     * Not found\n     */\n    404: NotFoundError;\n};\n\nexport type PtyGetError = PtyGetErrors[keyof PtyGetErrors];\n\nexport type PtyGetResponses = {\n    /**\n     * Session info\n     */\n    200: Pty;\n};\n\nexport type PtyGetResponse = PtyGetResponses[keyof PtyGetResponses];\n\nexport type PtyUpdateData = {\n    body?: {\n        title?: string;\n        size?: {\n            rows: number;\n            cols: number;\n        };\n    };\n    path: {\n        ptyID: string;\n    };\n    query?: {\n        directory?: string;\n    };\n    url: '/pty/{ptyID}';\n};\n\nexport type PtyUpdateErrors = {\n    /**\n     * Bad request\n     */\n    400: BadRequestError;\n};\n\nexport type PtyUpdateError = PtyUpdateErrors[keyof PtyUpdateErrors];\n\nexport type PtyUpdateResponses = {\n    /**\n     * Updated session\n     */\n    200: Pty;\n};\n\nexport type PtyUpdateResponse = PtyUpdateResponses[keyof PtyUpdateResponses];\n\nexport type PtyConnectData = {\n    body?: never;\n    path: {\n        ptyID: string;\n    };\n    query?: {\n        directory?: string;\n    };\n    url: '/pty/{ptyID}/connect';\n};\n\nexport type PtyConnectErrors = {\n    /**\n     * Not found\n     */\n    404: NotFoundError;\n};\n\nexport type PtyConnectError = PtyConnectErrors[keyof PtyConnectErrors];\n\nexport type PtyConnectResponses = {\n    /**\n     * Connected session\n     */\n    200: boolean;\n};\n\nexport type PtyConnectResponse = PtyConnectResponses[keyof PtyConnectResponses];\n\nexport type ConfigGetData = {\n    body?: never;\n    path?: never;\n    query?: {\n        directory?: string;\n    };\n    url: '/config';\n};\n\nexport type ConfigGetResponses = {\n    /**\n     * Get config info\n     */\n    200: Config;\n};\n\nexport type ConfigGetResponse = ConfigGetResponses[keyof ConfigGetResponses];\n\nexport type ConfigUpdateData = {\n    body?: Config;\n    path?: never;\n    query?: {\n        directory?: string;\n    };\n    url: '/config';\n};\n\nexport type ConfigUpdateErrors = {\n    /**\n     * Bad request\n     */\n    400: BadRequestError;\n};\n\nexport type ConfigUpdateError = ConfigUpdateErrors[keyof ConfigUpdateErrors];\n\nexport type ConfigUpdateResponses = {\n    /**\n     * Successfully updated config\n     */\n    200: Config;\n};\n\nexport type ConfigUpdateResponse = ConfigUpdateResponses[keyof ConfigUpdateResponses];\n\nexport type ToolIdsData = {\n    body?: never;\n    path?: never;\n    query?: {\n        directory?: string;\n    };\n    url: '/experimental/tool/ids';\n};\n\nexport type ToolIdsErrors = {\n    /**\n     * Bad request\n     */\n    400: BadRequestError;\n};\n\nexport type ToolIdsError = ToolIdsErrors[keyof ToolIdsErrors];\n\nexport type ToolIdsResponses = {\n    /**\n     * Tool IDs\n     */\n    200: ToolIds;\n};\n\nexport type ToolIdsResponse = ToolIdsResponses[keyof ToolIdsResponses];\n\nexport type ToolListData = {\n    body?: never;\n    path?: never;\n    query: {\n        directory?: string;\n        provider: string;\n        model: string;\n    };\n    url: '/experimental/tool';\n};\n\nexport type ToolListErrors = {\n    /**\n     * Bad request\n     */\n    400: BadRequestError;\n};\n\nexport type ToolListError = ToolListErrors[keyof ToolListErrors];\n\nexport type ToolListResponses = {\n    /**\n     * Tools\n     */\n    200: ToolList;\n};\n\nexport type ToolListResponse = ToolListResponses[keyof ToolListResponses];\n\nexport type InstanceDisposeData = {\n    body?: never;\n    path?: never;\n    query?: {\n        directory?: string;\n    };\n    url: '/instance/dispose';\n};\n\nexport type InstanceDisposeResponses = {\n    /**\n     * Instance disposed\n     */\n    200: boolean;\n};\n\nexport type InstanceDisposeResponse = InstanceDisposeResponses[keyof InstanceDisposeResponses];\n\nexport type PathGetData = {\n    body?: never;\n    path?: never;\n    query?: {\n        directory?: string;\n    };\n    url: '/path';\n};\n\nexport type PathGetResponses = {\n    /**\n     * Path\n     */\n    200: Path;\n};\n\nexport type PathGetResponse = PathGetResponses[keyof PathGetResponses];\n\nexport type VcsGetData = {\n    body?: never;\n    path?: never;\n    query?: {\n        directory?: string;\n    };\n    url: '/vcs';\n};\n\nexport type VcsGetResponses = {\n    /**\n     * VCS info\n     */\n    200: VcsInfo;\n};\n\nexport type VcsGetResponse = VcsGetResponses[keyof VcsGetResponses];\n\nexport type SessionListData = {\n    body?: never;\n    path?: never;\n    query?: {\n        directory?: string;\n    };\n    url: '/session';\n};\n\nexport type SessionListResponses = {\n    /**\n     * List of sessions\n     */\n    200: Array<Session>;\n};\n\nexport type SessionListResponse = SessionListResponses[keyof SessionListResponses];\n\nexport type SessionCreateData = {\n    body?: {\n        parentID?: string;\n        title?: string;\n        permission?: PermissionRuleset;\n    };\n    path?: never;\n    query?: {\n        directory?: string;\n    };\n    url: '/session';\n};\n\nexport type SessionCreateErrors = {\n    /**\n     * Bad request\n     */\n    400: BadRequestError;\n};\n\nexport type SessionCreateError = SessionCreateErrors[keyof SessionCreateErrors];\n\nexport type SessionCreateResponses = {\n    /**\n     * Successfully created session\n     */\n    200: Session;\n};\n\nexport type SessionCreateResponse = SessionCreateResponses[keyof SessionCreateResponses];\n\nexport type SessionStatusData = {\n    body?: never;\n    path?: never;\n    query?: {\n        directory?: string;\n    };\n    url: '/session/status';\n};\n\nexport type SessionStatusErrors = {\n    /**\n     * Bad request\n     */\n    400: BadRequestError;\n};\n\nexport type SessionStatusError = SessionStatusErrors[keyof SessionStatusErrors];\n\nexport type SessionStatusResponses = {\n    /**\n     * Get session status\n     */\n    200: {\n        [key: string]: SessionStatus;\n    };\n};\n\nexport type SessionStatusResponse = SessionStatusResponses[keyof SessionStatusResponses];\n\nexport type SessionDeleteData = {\n    body?: never;\n    path: {\n        sessionID: string;\n    };\n    query?: {\n        directory?: string;\n    };\n    url: '/session/{sessionID}';\n};\n\nexport type SessionDeleteErrors = {\n    /**\n     * Bad request\n     */\n    400: BadRequestError;\n    /**\n     * Not found\n     */\n    404: NotFoundError;\n};\n\nexport type SessionDeleteError = SessionDeleteErrors[keyof SessionDeleteErrors];\n\nexport type SessionDeleteResponses = {\n    /**\n     * Successfully deleted session\n     */\n    200: boolean;\n};\n\nexport type SessionDeleteResponse = SessionDeleteResponses[keyof SessionDeleteResponses];\n\nexport type SessionGetData = {\n    body?: never;\n    path: {\n        sessionID: string;\n    };\n    query?: {\n        directory?: string;\n    };\n    url: '/session/{sessionID}';\n};\n\nexport type SessionGetErrors = {\n    /**\n     * Bad request\n     */\n    400: BadRequestError;\n    /**\n     * Not found\n     */\n    404: NotFoundError;\n};\n\nexport type SessionGetError = SessionGetErrors[keyof SessionGetErrors];\n\nexport type SessionGetResponses = {\n    /**\n     * Get session\n     */\n    200: Session;\n};\n\nexport type SessionGetResponse = SessionGetResponses[keyof SessionGetResponses];\n\nexport type SessionUpdateData = {\n    body?: {\n        title?: string;\n        time?: {\n            archived?: number;\n        };\n    };\n    path: {\n        sessionID: string;\n    };\n    query?: {\n        directory?: string;\n    };\n    url: '/session/{sessionID}';\n};\n\nexport type SessionUpdateErrors = {\n    /**\n     * Bad request\n     */\n    400: BadRequestError;\n    /**\n     * Not found\n     */\n    404: NotFoundError;\n};\n\nexport type SessionUpdateError = SessionUpdateErrors[keyof SessionUpdateErrors];\n\nexport type SessionUpdateResponses = {\n    /**\n     * Successfully updated session\n     */\n    200: Session;\n};\n\nexport type SessionUpdateResponse = SessionUpdateResponses[keyof SessionUpdateResponses];\n\nexport type SessionChildrenData = {\n    body?: never;\n    path: {\n        sessionID: string;\n    };\n    query?: {\n        directory?: string;\n    };\n    url: '/session/{sessionID}/children';\n};\n\nexport type SessionChildrenErrors = {\n    /**\n     * Bad request\n     */\n    400: BadRequestError;\n    /**\n     * Not found\n     */\n    404: NotFoundError;\n};\n\nexport type SessionChildrenError = SessionChildrenErrors[keyof SessionChildrenErrors];\n\nexport type SessionChildrenResponses = {\n    /**\n     * List of children\n     */\n    200: Array<Session>;\n};\n\nexport type SessionChildrenResponse = SessionChildrenResponses[keyof SessionChildrenResponses];\n\nexport type SessionTodoData = {\n    body?: never;\n    path: {\n        /**\n         * Session ID\n         */\n        sessionID: string;\n    };\n    query?: {\n        directory?: string;\n    };\n    url: '/session/{sessionID}/todo';\n};\n\nexport type SessionTodoErrors = {\n    /**\n     * Bad request\n     */\n    400: BadRequestError;\n    /**\n     * Not found\n     */\n    404: NotFoundError;\n};\n\nexport type SessionTodoError = SessionTodoErrors[keyof SessionTodoErrors];\n\nexport type SessionTodoResponses = {\n    /**\n     * Todo list\n     */\n    200: Array<Todo>;\n};\n\nexport type SessionTodoResponse = SessionTodoResponses[keyof SessionTodoResponses];\n\nexport type SessionInitData = {\n    body?: {\n        modelID: string;\n        providerID: string;\n        messageID: string;\n    };\n    path: {\n        /**\n         * Session ID\n         */\n        sessionID: string;\n    };\n    query?: {\n        directory?: string;\n    };\n    url: '/session/{sessionID}/init';\n};\n\nexport type SessionInitErrors = {\n    /**\n     * Bad request\n     */\n    400: BadRequestError;\n    /**\n     * Not found\n     */\n    404: NotFoundError;\n};\n\nexport type SessionInitError = SessionInitErrors[keyof SessionInitErrors];\n\nexport type SessionInitResponses = {\n    /**\n     * 200\n     */\n    200: boolean;\n};\n\nexport type SessionInitResponse = SessionInitResponses[keyof SessionInitResponses];\n\nexport type SessionForkData = {\n    body?: {\n        messageID?: string;\n    };\n    path: {\n        sessionID: string;\n    };\n    query?: {\n        directory?: string;\n    };\n    url: '/session/{sessionID}/fork';\n};\n\nexport type SessionForkResponses = {\n    /**\n     * 200\n     */\n    200: Session;\n};\n\nexport type SessionForkResponse = SessionForkResponses[keyof SessionForkResponses];\n\nexport type SessionAbortData = {\n    body?: never;\n    path: {\n        sessionID: string;\n    };\n    query?: {\n        directory?: string;\n    };\n    url: '/session/{sessionID}/abort';\n};\n\nexport type SessionAbortErrors = {\n    /**\n     * Bad request\n     */\n    400: BadRequestError;\n    /**\n     * Not found\n     */\n    404: NotFoundError;\n};\n\nexport type SessionAbortError = SessionAbortErrors[keyof SessionAbortErrors];\n\nexport type SessionAbortResponses = {\n    /**\n     * Aborted session\n     */\n    200: boolean;\n};\n\nexport type SessionAbortResponse = SessionAbortResponses[keyof SessionAbortResponses];\n\nexport type SessionUnshareData = {\n    body?: never;\n    path: {\n        sessionID: string;\n    };\n    query?: {\n        directory?: string;\n    };\n    url: '/session/{sessionID}/share';\n};\n\nexport type SessionUnshareErrors = {\n    /**\n     * Bad request\n     */\n    400: BadRequestError;\n    /**\n     * Not found\n     */\n    404: NotFoundError;\n};\n\nexport type SessionUnshareError = SessionUnshareErrors[keyof SessionUnshareErrors];\n\nexport type SessionUnshareResponses = {\n    /**\n     * Successfully unshared session\n     */\n    200: Session;\n};\n\nexport type SessionUnshareResponse = SessionUnshareResponses[keyof SessionUnshareResponses];\n\nexport type SessionShareData = {\n    body?: never;\n    path: {\n        sessionID: string;\n    };\n    query?: {\n        directory?: string;\n    };\n    url: '/session/{sessionID}/share';\n};\n\nexport type SessionShareErrors = {\n    /**\n     * Bad request\n     */\n    400: BadRequestError;\n    /**\n     * Not found\n     */\n    404: NotFoundError;\n};\n\nexport type SessionShareError = SessionShareErrors[keyof SessionShareErrors];\n\nexport type SessionShareResponses = {\n    /**\n     * Successfully shared session\n     */\n    200: Session;\n};\n\nexport type SessionShareResponse = SessionShareResponses[keyof SessionShareResponses];\n\nexport type SessionDiffData = {\n    body?: never;\n    path: {\n        /**\n         * Session ID\n         */\n        sessionID: string;\n    };\n    query?: {\n        directory?: string;\n        messageID?: string;\n    };\n    url: '/session/{sessionID}/diff';\n};\n\nexport type SessionDiffErrors = {\n    /**\n     * Bad request\n     */\n    400: BadRequestError;\n    /**\n     * Not found\n     */\n    404: NotFoundError;\n};\n\nexport type SessionDiffError = SessionDiffErrors[keyof SessionDiffErrors];\n\nexport type SessionDiffResponses = {\n    /**\n     * List of diffs\n     */\n    200: Array<FileDiff>;\n};\n\nexport type SessionDiffResponse = SessionDiffResponses[keyof SessionDiffResponses];\n\nexport type SessionSummarizeData = {\n    body?: {\n        providerID: string;\n        modelID: string;\n        auto?: boolean;\n    };\n    path: {\n        /**\n         * Session ID\n         */\n        sessionID: string;\n    };\n    query?: {\n        directory?: string;\n    };\n    url: '/session/{sessionID}/summarize';\n};\n\nexport type SessionSummarizeErrors = {\n    /**\n     * Bad request\n     */\n    400: BadRequestError;\n    /**\n     * Not found\n     */\n    404: NotFoundError;\n};\n\nexport type SessionSummarizeError = SessionSummarizeErrors[keyof SessionSummarizeErrors];\n\nexport type SessionSummarizeResponses = {\n    /**\n     * Summarized session\n     */\n    200: boolean;\n};\n\nexport type SessionSummarizeResponse = SessionSummarizeResponses[keyof SessionSummarizeResponses];\n\nexport type SessionMessagesData = {\n    body?: never;\n    path: {\n        /**\n         * Session ID\n         */\n        sessionID: string;\n    };\n    query?: {\n        directory?: string;\n        limit?: number;\n    };\n    url: '/session/{sessionID}/message';\n};\n\nexport type SessionMessagesErrors = {\n    /**\n     * Bad request\n     */\n    400: BadRequestError;\n    /**\n     * Not found\n     */\n    404: NotFoundError;\n};\n\nexport type SessionMessagesError = SessionMessagesErrors[keyof SessionMessagesErrors];\n\nexport type SessionMessagesResponses = {\n    /**\n     * List of messages\n     */\n    200: Array<{\n        info: Message;\n        parts: Array<Part>;\n    }>;\n};\n\nexport type SessionMessagesResponse = SessionMessagesResponses[keyof SessionMessagesResponses];\n\nexport type SessionPromptData = {\n    body?: {\n        messageID?: string;\n        model?: {\n            providerID: string;\n            modelID: string;\n        };\n        agent?: string;\n        noReply?: boolean;\n        /**\n         * @deprecated tools and permissions have been merged, you can set permissions on the session itself now\n         */\n        tools?: {\n            [key: string]: boolean;\n        };\n        system?: string;\n        variant?: string;\n        parts: Array<TextPartInput | FilePartInput | AgentPartInput | SubtaskPartInput>;\n    };\n    path: {\n        /**\n         * Session ID\n         */\n        sessionID: string;\n    };\n    query?: {\n        directory?: string;\n    };\n    url: '/session/{sessionID}/message';\n};\n\nexport type SessionPromptErrors = {\n    /**\n     * Bad request\n     */\n    400: BadRequestError;\n    /**\n     * Not found\n     */\n    404: NotFoundError;\n};\n\nexport type SessionPromptError = SessionPromptErrors[keyof SessionPromptErrors];\n\nexport type SessionPromptResponses = {\n    /**\n     * Created message\n     */\n    200: {\n        info: AssistantMessage;\n        parts: Array<Part>;\n    };\n};\n\nexport type SessionPromptResponse = SessionPromptResponses[keyof SessionPromptResponses];\n\nexport type SessionMessageData = {\n    body?: never;\n    path: {\n        /**\n         * Session ID\n         */\n        sessionID: string;\n        /**\n         * Message ID\n         */\n        messageID: string;\n    };\n    query?: {\n        directory?: string;\n    };\n    url: '/session/{sessionID}/message/{messageID}';\n};\n\nexport type SessionMessageErrors = {\n    /**\n     * Bad request\n     */\n    400: BadRequestError;\n    /**\n     * Not found\n     */\n    404: NotFoundError;\n};\n\nexport type SessionMessageError = SessionMessageErrors[keyof SessionMessageErrors];\n\nexport type SessionMessageResponses = {\n    /**\n     * Message\n     */\n    200: {\n        info: Message;\n        parts: Array<Part>;\n    };\n};\n\nexport type SessionMessageResponse = SessionMessageResponses[keyof SessionMessageResponses];\n\nexport type PartDeleteData = {\n    body?: never;\n    path: {\n        /**\n         * Session ID\n         */\n        sessionID: string;\n        /**\n         * Message ID\n         */\n        messageID: string;\n        /**\n         * Part ID\n         */\n        partID: string;\n    };\n    query?: {\n        directory?: string;\n    };\n    url: '/session/{sessionID}/message/{messageID}/part/{partID}';\n};\n\nexport type PartDeleteErrors = {\n    /**\n     * Bad request\n     */\n    400: BadRequestError;\n    /**\n     * Not found\n     */\n    404: NotFoundError;\n};\n\nexport type PartDeleteError = PartDeleteErrors[keyof PartDeleteErrors];\n\nexport type PartDeleteResponses = {\n    /**\n     * Successfully deleted part\n     */\n    200: boolean;\n};\n\nexport type PartDeleteResponse = PartDeleteResponses[keyof PartDeleteResponses];\n\nexport type PartUpdateData = {\n    body?: Part;\n    path: {\n        /**\n         * Session ID\n         */\n        sessionID: string;\n        /**\n         * Message ID\n         */\n        messageID: string;\n        /**\n         * Part ID\n         */\n        partID: string;\n    };\n    query?: {\n        directory?: string;\n    };\n    url: '/session/{sessionID}/message/{messageID}/part/{partID}';\n};\n\nexport type PartUpdateErrors = {\n    /**\n     * Bad request\n     */\n    400: BadRequestError;\n    /**\n     * Not found\n     */\n    404: NotFoundError;\n};\n\nexport type PartUpdateError = PartUpdateErrors[keyof PartUpdateErrors];\n\nexport type PartUpdateResponses = {\n    /**\n     * Successfully updated part\n     */\n    200: Part;\n};\n\nexport type PartUpdateResponse = PartUpdateResponses[keyof PartUpdateResponses];\n\nexport type SessionPromptAsyncData = {\n    body?: {\n        messageID?: string;\n        model?: {\n            providerID: string;\n            modelID: string;\n        };\n        agent?: string;\n        noReply?: boolean;\n        /**\n         * @deprecated tools and permissions have been merged, you can set permissions on the session itself now\n         */\n        tools?: {\n            [key: string]: boolean;\n        };\n        system?: string;\n        variant?: string;\n        parts: Array<TextPartInput | FilePartInput | AgentPartInput | SubtaskPartInput>;\n    };\n    path: {\n        /**\n         * Session ID\n         */\n        sessionID: string;\n    };\n    query?: {\n        directory?: string;\n    };\n    url: '/session/{sessionID}/prompt_async';\n};\n\nexport type SessionPromptAsyncErrors = {\n    /**\n     * Bad request\n     */\n    400: BadRequestError;\n    /**\n     * Not found\n     */\n    404: NotFoundError;\n};\n\nexport type SessionPromptAsyncError = SessionPromptAsyncErrors[keyof SessionPromptAsyncErrors];\n\nexport type SessionPromptAsyncResponses = {\n    /**\n     * Prompt accepted\n     */\n    204: void;\n};\n\nexport type SessionPromptAsyncResponse = SessionPromptAsyncResponses[keyof SessionPromptAsyncResponses];\n\nexport type SessionCommandData = {\n    body?: {\n        messageID?: string;\n        agent?: string;\n        model?: string;\n        arguments: string;\n        command: string;\n        variant?: string;\n    };\n    path: {\n        /**\n         * Session ID\n         */\n        sessionID: string;\n    };\n    query?: {\n        directory?: string;\n    };\n    url: '/session/{sessionID}/command';\n};\n\nexport type SessionCommandErrors = {\n    /**\n     * Bad request\n     */\n    400: BadRequestError;\n    /**\n     * Not found\n     */\n    404: NotFoundError;\n};\n\nexport type SessionCommandError = SessionCommandErrors[keyof SessionCommandErrors];\n\nexport type SessionCommandResponses = {\n    /**\n     * Created message\n     */\n    200: {\n        info: AssistantMessage;\n        parts: Array<Part>;\n    };\n};\n\nexport type SessionCommandResponse = SessionCommandResponses[keyof SessionCommandResponses];\n\nexport type SessionShellData = {\n    body?: {\n        agent: string;\n        model?: {\n            providerID: string;\n            modelID: string;\n        };\n        command: string;\n    };\n    path: {\n        /**\n         * Session ID\n         */\n        sessionID: string;\n    };\n    query?: {\n        directory?: string;\n    };\n    url: '/session/{sessionID}/shell';\n};\n\nexport type SessionShellErrors = {\n    /**\n     * Bad request\n     */\n    400: BadRequestError;\n    /**\n     * Not found\n     */\n    404: NotFoundError;\n};\n\nexport type SessionShellError = SessionShellErrors[keyof SessionShellErrors];\n\nexport type SessionShellResponses = {\n    /**\n     * Created message\n     */\n    200: AssistantMessage;\n};\n\nexport type SessionShellResponse = SessionShellResponses[keyof SessionShellResponses];\n\nexport type SessionRevertData = {\n    body?: {\n        messageID: string;\n        partID?: string;\n    };\n    path: {\n        sessionID: string;\n    };\n    query?: {\n        directory?: string;\n    };\n    url: '/session/{sessionID}/revert';\n};\n\nexport type SessionRevertErrors = {\n    /**\n     * Bad request\n     */\n    400: BadRequestError;\n    /**\n     * Not found\n     */\n    404: NotFoundError;\n};\n\nexport type SessionRevertError = SessionRevertErrors[keyof SessionRevertErrors];\n\nexport type SessionRevertResponses = {\n    /**\n     * Updated session\n     */\n    200: Session;\n};\n\nexport type SessionRevertResponse = SessionRevertResponses[keyof SessionRevertResponses];\n\nexport type SessionUnrevertData = {\n    body?: never;\n    path: {\n        sessionID: string;\n    };\n    query?: {\n        directory?: string;\n    };\n    url: '/session/{sessionID}/unrevert';\n};\n\nexport type SessionUnrevertErrors = {\n    /**\n     * Bad request\n     */\n    400: BadRequestError;\n    /**\n     * Not found\n     */\n    404: NotFoundError;\n};\n\nexport type SessionUnrevertError = SessionUnrevertErrors[keyof SessionUnrevertErrors];\n\nexport type SessionUnrevertResponses = {\n    /**\n     * Updated session\n     */\n    200: Session;\n};\n\nexport type SessionUnrevertResponse = SessionUnrevertResponses[keyof SessionUnrevertResponses];\n\nexport type PermissionRespondData = {\n    body?: {\n        response: 'once' | 'always' | 'reject';\n    };\n    path: {\n        sessionID: string;\n        permissionID: string;\n    };\n    query?: {\n        directory?: string;\n    };\n    url: '/session/{sessionID}/permissions/{permissionID}';\n};\n\nexport type PermissionRespondErrors = {\n    /**\n     * Bad request\n     */\n    400: BadRequestError;\n    /**\n     * Not found\n     */\n    404: NotFoundError;\n};\n\nexport type PermissionRespondError = PermissionRespondErrors[keyof PermissionRespondErrors];\n\nexport type PermissionRespondResponses = {\n    /**\n     * Permission processed successfully\n     */\n    200: boolean;\n};\n\nexport type PermissionRespondResponse = PermissionRespondResponses[keyof PermissionRespondResponses];\n\nexport type PermissionReplyData = {\n    body?: {\n        reply: 'once' | 'always' | 'reject';\n    };\n    path: {\n        requestID: string;\n    };\n    query?: {\n        directory?: string;\n    };\n    url: '/permission/{requestID}/reply';\n};\n\nexport type PermissionReplyErrors = {\n    /**\n     * Bad request\n     */\n    400: BadRequestError;\n    /**\n     * Not found\n     */\n    404: NotFoundError;\n};\n\nexport type PermissionReplyError = PermissionReplyErrors[keyof PermissionReplyErrors];\n\nexport type PermissionReplyResponses = {\n    /**\n     * Permission processed successfully\n     */\n    200: boolean;\n};\n\nexport type PermissionReplyResponse = PermissionReplyResponses[keyof PermissionReplyResponses];\n\nexport type PermissionListData = {\n    body?: never;\n    path?: never;\n    query?: {\n        directory?: string;\n    };\n    url: '/permission';\n};\n\nexport type PermissionListResponses = {\n    /**\n     * List of pending permissions\n     */\n    200: Array<PermissionRequest>;\n};\n\nexport type PermissionListResponse = PermissionListResponses[keyof PermissionListResponses];\n\nexport type CommandListData = {\n    body?: never;\n    path?: never;\n    query?: {\n        directory?: string;\n    };\n    url: '/command';\n};\n\nexport type CommandListResponses = {\n    /**\n     * List of commands\n     */\n    200: Array<Command>;\n};\n\nexport type CommandListResponse = CommandListResponses[keyof CommandListResponses];\n\nexport type ConfigProvidersData = {\n    body?: never;\n    path?: never;\n    query?: {\n        directory?: string;\n    };\n    url: '/config/providers';\n};\n\nexport type ConfigProvidersResponses = {\n    /**\n     * List of providers\n     */\n    200: {\n        providers: Array<Provider>;\n        default: {\n            [key: string]: string;\n        };\n    };\n};\n\nexport type ConfigProvidersResponse = ConfigProvidersResponses[keyof ConfigProvidersResponses];\n\nexport type ProviderListData = {\n    body?: never;\n    path?: never;\n    query?: {\n        directory?: string;\n    };\n    url: '/provider';\n};\n\nexport type ProviderListResponses = {\n    /**\n     * List of providers\n     */\n    200: {\n        all: Array<{\n            api?: string;\n            name: string;\n            env: Array<string>;\n            id: string;\n            npm?: string;\n            models: {\n                [key: string]: {\n                    id: string;\n                    name: string;\n                    family?: string;\n                    release_date: string;\n                    attachment: boolean;\n                    reasoning: boolean;\n                    temperature: boolean;\n                    tool_call: boolean;\n                    interleaved?: true | {\n                        field: 'reasoning_content' | 'reasoning_details';\n                    };\n                    cost?: {\n                        input: number;\n                        output: number;\n                        cache_read?: number;\n                        cache_write?: number;\n                        context_over_200k?: {\n                            input: number;\n                            output: number;\n                            cache_read?: number;\n                            cache_write?: number;\n                        };\n                    };\n                    limit: {\n                        context: number;\n                        output: number;\n                    };\n                    modalities?: {\n                        input: Array<'text' | 'audio' | 'image' | 'video' | 'pdf'>;\n                        output: Array<'text' | 'audio' | 'image' | 'video' | 'pdf'>;\n                    };\n                    experimental?: boolean;\n                    status?: 'alpha' | 'beta' | 'deprecated';\n                    options: {\n                        [key: string]: unknown;\n                    };\n                    headers?: {\n                        [key: string]: string;\n                    };\n                    provider?: {\n                        npm: string;\n                    };\n                    variants?: {\n                        [key: string]: {\n                            [key: string]: unknown;\n                        };\n                    };\n                };\n            };\n        }>;\n        default: {\n            [key: string]: string;\n        };\n        connected: Array<string>;\n    };\n};\n\nexport type ProviderListResponse = ProviderListResponses[keyof ProviderListResponses];\n\nexport type ProviderAuthData = {\n    body?: never;\n    path?: never;\n    query?: {\n        directory?: string;\n    };\n    url: '/provider/auth';\n};\n\nexport type ProviderAuthResponses = {\n    /**\n     * Provider auth methods\n     */\n    200: {\n        [key: string]: Array<ProviderAuthMethod>;\n    };\n};\n\nexport type ProviderAuthResponse = ProviderAuthResponses[keyof ProviderAuthResponses];\n\nexport type ProviderOauthAuthorizeData = {\n    body?: {\n        /**\n         * Auth method index\n         */\n        method: number;\n    };\n    path: {\n        /**\n         * Provider ID\n         */\n        providerID: string;\n    };\n    query?: {\n        directory?: string;\n    };\n    url: '/provider/{providerID}/oauth/authorize';\n};\n\nexport type ProviderOauthAuthorizeErrors = {\n    /**\n     * Bad request\n     */\n    400: BadRequestError;\n};\n\nexport type ProviderOauthAuthorizeError = ProviderOauthAuthorizeErrors[keyof ProviderOauthAuthorizeErrors];\n\nexport type ProviderOauthAuthorizeResponses = {\n    /**\n     * Authorization URL and method\n     */\n    200: ProviderAuthAuthorization;\n};\n\nexport type ProviderOauthAuthorizeResponse = ProviderOauthAuthorizeResponses[keyof ProviderOauthAuthorizeResponses];\n\nexport type ProviderOauthCallbackData = {\n    body?: {\n        /**\n         * Auth method index\n         */\n        method: number;\n        /**\n         * OAuth authorization code\n         */\n        code?: string;\n    };\n    path: {\n        /**\n         * Provider ID\n         */\n        providerID: string;\n    };\n    query?: {\n        directory?: string;\n    };\n    url: '/provider/{providerID}/oauth/callback';\n};\n\nexport type ProviderOauthCallbackErrors = {\n    /**\n     * Bad request\n     */\n    400: BadRequestError;\n};\n\nexport type ProviderOauthCallbackError = ProviderOauthCallbackErrors[keyof ProviderOauthCallbackErrors];\n\nexport type ProviderOauthCallbackResponses = {\n    /**\n     * OAuth callback processed successfully\n     */\n    200: boolean;\n};\n\nexport type ProviderOauthCallbackResponse = ProviderOauthCallbackResponses[keyof ProviderOauthCallbackResponses];\n\nexport type FindTextData = {\n    body?: never;\n    path?: never;\n    query: {\n        directory?: string;\n        pattern: string;\n    };\n    url: '/find';\n};\n\nexport type FindTextResponses = {\n    /**\n     * Matches\n     */\n    200: Array<{\n        path: {\n            text: string;\n        };\n        lines: {\n            text: string;\n        };\n        line_number: number;\n        absolute_offset: number;\n        submatches: Array<{\n            match: {\n                text: string;\n            };\n            start: number;\n            end: number;\n        }>;\n    }>;\n};\n\nexport type FindTextResponse = FindTextResponses[keyof FindTextResponses];\n\nexport type FindFilesData = {\n    body?: never;\n    path?: never;\n    query: {\n        directory?: string;\n        query: string;\n        dirs?: 'true' | 'false';\n        type?: 'file' | 'directory';\n        limit?: number;\n    };\n    url: '/find/file';\n};\n\nexport type FindFilesResponses = {\n    /**\n     * File paths\n     */\n    200: Array<string>;\n};\n\nexport type FindFilesResponse = FindFilesResponses[keyof FindFilesResponses];\n\nexport type FindSymbolsData = {\n    body?: never;\n    path?: never;\n    query: {\n        directory?: string;\n        query: string;\n    };\n    url: '/find/symbol';\n};\n\nexport type FindSymbolsResponses = {\n    /**\n     * Symbols\n     */\n    200: Array<Symbol>;\n};\n\nexport type FindSymbolsResponse = FindSymbolsResponses[keyof FindSymbolsResponses];\n\nexport type FileListData = {\n    body?: never;\n    path?: never;\n    query: {\n        directory?: string;\n        path: string;\n    };\n    url: '/file';\n};\n\nexport type FileListResponses = {\n    /**\n     * Files and directories\n     */\n    200: Array<FileNode>;\n};\n\nexport type FileListResponse = FileListResponses[keyof FileListResponses];\n\nexport type FileReadData = {\n    body?: never;\n    path?: never;\n    query: {\n        directory?: string;\n        path: string;\n    };\n    url: '/file/content';\n};\n\nexport type FileReadResponses = {\n    /**\n     * File content\n     */\n    200: FileContent;\n};\n\nexport type FileReadResponse = FileReadResponses[keyof FileReadResponses];\n\nexport type FileStatusData = {\n    body?: never;\n    path?: never;\n    query?: {\n        directory?: string;\n    };\n    url: '/file/status';\n};\n\nexport type FileStatusResponses = {\n    /**\n     * File status\n     */\n    200: Array<File>;\n};\n\nexport type FileStatusResponse = FileStatusResponses[keyof FileStatusResponses];\n\nexport type AppLogData = {\n    body?: {\n        /**\n         * Service name for the log entry\n         */\n        service: string;\n        /**\n         * Log level\n         */\n        level: 'debug' | 'info' | 'error' | 'warn';\n        /**\n         * Log message\n         */\n        message: string;\n        /**\n         * Additional metadata for the log entry\n         */\n        extra?: {\n            [key: string]: unknown;\n        };\n    };\n    path?: never;\n    query?: {\n        directory?: string;\n    };\n    url: '/log';\n};\n\nexport type AppLogErrors = {\n    /**\n     * Bad request\n     */\n    400: BadRequestError;\n};\n\nexport type AppLogError = AppLogErrors[keyof AppLogErrors];\n\nexport type AppLogResponses = {\n    /**\n     * Log entry written successfully\n     */\n    200: boolean;\n};\n\nexport type AppLogResponse = AppLogResponses[keyof AppLogResponses];\n\nexport type AppAgentsData = {\n    body?: never;\n    path?: never;\n    query?: {\n        directory?: string;\n    };\n    url: '/agent';\n};\n\nexport type AppAgentsResponses = {\n    /**\n     * List of agents\n     */\n    200: Array<Agent>;\n};\n\nexport type AppAgentsResponse = AppAgentsResponses[keyof AppAgentsResponses];\n\nexport type McpStatusData = {\n    body?: never;\n    path?: never;\n    query?: {\n        directory?: string;\n    };\n    url: '/mcp';\n};\n\nexport type McpStatusResponses = {\n    /**\n     * MCP server status\n     */\n    200: {\n        [key: string]: McpStatus;\n    };\n};\n\nexport type McpStatusResponse = McpStatusResponses[keyof McpStatusResponses];\n\nexport type McpAddData = {\n    body?: {\n        name: string;\n        config: McpLocalConfig | McpRemoteConfig;\n    };\n    path?: never;\n    query?: {\n        directory?: string;\n    };\n    url: '/mcp';\n};\n\nexport type McpAddErrors = {\n    /**\n     * Bad request\n     */\n    400: BadRequestError;\n};\n\nexport type McpAddError = McpAddErrors[keyof McpAddErrors];\n\nexport type McpAddResponses = {\n    /**\n     * MCP server added successfully\n     */\n    200: {\n        [key: string]: McpStatus;\n    };\n};\n\nexport type McpAddResponse = McpAddResponses[keyof McpAddResponses];\n\nexport type McpAuthRemoveData = {\n    body?: never;\n    path: {\n        name: string;\n    };\n    query?: {\n        directory?: string;\n    };\n    url: '/mcp/{name}/auth';\n};\n\nexport type McpAuthRemoveErrors = {\n    /**\n     * Not found\n     */\n    404: NotFoundError;\n};\n\nexport type McpAuthRemoveError = McpAuthRemoveErrors[keyof McpAuthRemoveErrors];\n\nexport type McpAuthRemoveResponses = {\n    /**\n     * OAuth credentials removed\n     */\n    200: {\n        success: true;\n    };\n};\n\nexport type McpAuthRemoveResponse = McpAuthRemoveResponses[keyof McpAuthRemoveResponses];\n\nexport type McpAuthStartData = {\n    body?: never;\n    path: {\n        name: string;\n    };\n    query?: {\n        directory?: string;\n    };\n    url: '/mcp/{name}/auth';\n};\n\nexport type McpAuthStartErrors = {\n    /**\n     * Bad request\n     */\n    400: BadRequestError;\n    /**\n     * Not found\n     */\n    404: NotFoundError;\n};\n\nexport type McpAuthStartError = McpAuthStartErrors[keyof McpAuthStartErrors];\n\nexport type McpAuthStartResponses = {\n    /**\n     * OAuth flow started\n     */\n    200: {\n        /**\n         * URL to open in browser for authorization\n         */\n        authorizationUrl: string;\n    };\n};\n\nexport type McpAuthStartResponse = McpAuthStartResponses[keyof McpAuthStartResponses];\n\nexport type McpAuthCallbackData = {\n    body?: {\n        /**\n         * Authorization code from OAuth callback\n         */\n        code: string;\n    };\n    path: {\n        name: string;\n    };\n    query?: {\n        directory?: string;\n    };\n    url: '/mcp/{name}/auth/callback';\n};\n\nexport type McpAuthCallbackErrors = {\n    /**\n     * Bad request\n     */\n    400: BadRequestError;\n    /**\n     * Not found\n     */\n    404: NotFoundError;\n};\n\nexport type McpAuthCallbackError = McpAuthCallbackErrors[keyof McpAuthCallbackErrors];\n\nexport type McpAuthCallbackResponses = {\n    /**\n     * OAuth authentication completed\n     */\n    200: McpStatus;\n};\n\nexport type McpAuthCallbackResponse = McpAuthCallbackResponses[keyof McpAuthCallbackResponses];\n\nexport type McpAuthAuthenticateData = {\n    body?: never;\n    path: {\n        name: string;\n    };\n    query?: {\n        directory?: string;\n    };\n    url: '/mcp/{name}/auth/authenticate';\n};\n\nexport type McpAuthAuthenticateErrors = {\n    /**\n     * Bad request\n     */\n    400: BadRequestError;\n    /**\n     * Not found\n     */\n    404: NotFoundError;\n};\n\nexport type McpAuthAuthenticateError = McpAuthAuthenticateErrors[keyof McpAuthAuthenticateErrors];\n\nexport type McpAuthAuthenticateResponses = {\n    /**\n     * OAuth authentication completed\n     */\n    200: McpStatus;\n};\n\nexport type McpAuthAuthenticateResponse = McpAuthAuthenticateResponses[keyof McpAuthAuthenticateResponses];\n\nexport type McpConnectData = {\n    body?: never;\n    path: {\n        name: string;\n    };\n    query?: {\n        directory?: string;\n    };\n    url: '/mcp/{name}/connect';\n};\n\nexport type McpConnectResponses = {\n    /**\n     * MCP server connected successfully\n     */\n    200: boolean;\n};\n\nexport type McpConnectResponse = McpConnectResponses[keyof McpConnectResponses];\n\nexport type McpDisconnectData = {\n    body?: never;\n    path: {\n        name: string;\n    };\n    query?: {\n        directory?: string;\n    };\n    url: '/mcp/{name}/disconnect';\n};\n\nexport type McpDisconnectResponses = {\n    /**\n     * MCP server disconnected successfully\n     */\n    200: boolean;\n};\n\nexport type McpDisconnectResponse = McpDisconnectResponses[keyof McpDisconnectResponses];\n\nexport type LspStatusData = {\n    body?: never;\n    path?: never;\n    query?: {\n        directory?: string;\n    };\n    url: '/lsp';\n};\n\nexport type LspStatusResponses = {\n    /**\n     * LSP server status\n     */\n    200: Array<LspStatus>;\n};\n\nexport type LspStatusResponse = LspStatusResponses[keyof LspStatusResponses];\n\nexport type FormatterStatusData = {\n    body?: never;\n    path?: never;\n    query?: {\n        directory?: string;\n    };\n    url: '/formatter';\n};\n\nexport type FormatterStatusResponses = {\n    /**\n     * Formatter status\n     */\n    200: Array<FormatterStatus>;\n};\n\nexport type FormatterStatusResponse = FormatterStatusResponses[keyof FormatterStatusResponses];\n\nexport type TuiAppendPromptData = {\n    body?: {\n        text: string;\n    };\n    path?: never;\n    query?: {\n        directory?: string;\n    };\n    url: '/tui/append-prompt';\n};\n\nexport type TuiAppendPromptErrors = {\n    /**\n     * Bad request\n     */\n    400: BadRequestError;\n};\n\nexport type TuiAppendPromptError = TuiAppendPromptErrors[keyof TuiAppendPromptErrors];\n\nexport type TuiAppendPromptResponses = {\n    /**\n     * Prompt processed successfully\n     */\n    200: boolean;\n};\n\nexport type TuiAppendPromptResponse = TuiAppendPromptResponses[keyof TuiAppendPromptResponses];\n\nexport type TuiOpenHelpData = {\n    body?: never;\n    path?: never;\n    query?: {\n        directory?: string;\n    };\n    url: '/tui/open-help';\n};\n\nexport type TuiOpenHelpResponses = {\n    /**\n     * Help dialog opened successfully\n     */\n    200: boolean;\n};\n\nexport type TuiOpenHelpResponse = TuiOpenHelpResponses[keyof TuiOpenHelpResponses];\n\nexport type TuiOpenSessionsData = {\n    body?: never;\n    path?: never;\n    query?: {\n        directory?: string;\n    };\n    url: '/tui/open-sessions';\n};\n\nexport type TuiOpenSessionsResponses = {\n    /**\n     * Session dialog opened successfully\n     */\n    200: boolean;\n};\n\nexport type TuiOpenSessionsResponse = TuiOpenSessionsResponses[keyof TuiOpenSessionsResponses];\n\nexport type TuiOpenThemesData = {\n    body?: never;\n    path?: never;\n    query?: {\n        directory?: string;\n    };\n    url: '/tui/open-themes';\n};\n\nexport type TuiOpenThemesResponses = {\n    /**\n     * Theme dialog opened successfully\n     */\n    200: boolean;\n};\n\nexport type TuiOpenThemesResponse = TuiOpenThemesResponses[keyof TuiOpenThemesResponses];\n\nexport type TuiOpenModelsData = {\n    body?: never;\n    path?: never;\n    query?: {\n        directory?: string;\n    };\n    url: '/tui/open-models';\n};\n\nexport type TuiOpenModelsResponses = {\n    /**\n     * Model dialog opened successfully\n     */\n    200: boolean;\n};\n\nexport type TuiOpenModelsResponse = TuiOpenModelsResponses[keyof TuiOpenModelsResponses];\n\nexport type TuiSubmitPromptData = {\n    body?: never;\n    path?: never;\n    query?: {\n        directory?: string;\n    };\n    url: '/tui/submit-prompt';\n};\n\nexport type TuiSubmitPromptResponses = {\n    /**\n     * Prompt submitted successfully\n     */\n    200: boolean;\n};\n\nexport type TuiSubmitPromptResponse = TuiSubmitPromptResponses[keyof TuiSubmitPromptResponses];\n\nexport type TuiClearPromptData = {\n    body?: never;\n    path?: never;\n    query?: {\n        directory?: string;\n    };\n    url: '/tui/clear-prompt';\n};\n\nexport type TuiClearPromptResponses = {\n    /**\n     * Prompt cleared successfully\n     */\n    200: boolean;\n};\n\nexport type TuiClearPromptResponse = TuiClearPromptResponses[keyof TuiClearPromptResponses];\n\nexport type TuiExecuteCommandData = {\n    body?: {\n        command: string;\n    };\n    path?: never;\n    query?: {\n        directory?: string;\n    };\n    url: '/tui/execute-command';\n};\n\nexport type TuiExecuteCommandErrors = {\n    /**\n     * Bad request\n     */\n    400: BadRequestError;\n};\n\nexport type TuiExecuteCommandError = TuiExecuteCommandErrors[keyof TuiExecuteCommandErrors];\n\nexport type TuiExecuteCommandResponses = {\n    /**\n     * Command executed successfully\n     */\n    200: boolean;\n};\n\nexport type TuiExecuteCommandResponse = TuiExecuteCommandResponses[keyof TuiExecuteCommandResponses];\n\nexport type TuiShowToastData = {\n    body?: {\n        title?: string;\n        message: string;\n        variant: 'info' | 'success' | 'warning' | 'error';\n        /**\n         * Duration in milliseconds\n         */\n        duration?: number;\n    };\n    path?: never;\n    query?: {\n        directory?: string;\n    };\n    url: '/tui/show-toast';\n};\n\nexport type TuiShowToastResponses = {\n    /**\n     * Toast notification shown successfully\n     */\n    200: boolean;\n};\n\nexport type TuiShowToastResponse = TuiShowToastResponses[keyof TuiShowToastResponses];\n\nexport type TuiPublishData = {\n    body?: EventTuiPromptAppend | EventTuiCommandExecute | EventTuiToastShow;\n    path?: never;\n    query?: {\n        directory?: string;\n    };\n    url: '/tui/publish';\n};\n\nexport type TuiPublishErrors = {\n    /**\n     * Bad request\n     */\n    400: BadRequestError;\n};\n\nexport type TuiPublishError = TuiPublishErrors[keyof TuiPublishErrors];\n\nexport type TuiPublishResponses = {\n    /**\n     * Event published successfully\n     */\n    200: boolean;\n};\n\nexport type TuiPublishResponse = TuiPublishResponses[keyof TuiPublishResponses];\n\nexport type TuiControlNextData = {\n    body?: never;\n    path?: never;\n    query?: {\n        directory?: string;\n    };\n    url: '/tui/control/next';\n};\n\nexport type TuiControlNextResponses = {\n    /**\n     * Next TUI request\n     */\n    200: {\n        path: string;\n        body: unknown;\n    };\n};\n\nexport type TuiControlNextResponse = TuiControlNextResponses[keyof TuiControlNextResponses];\n\nexport type TuiControlResponseData = {\n    body?: unknown;\n    path?: never;\n    query?: {\n        directory?: string;\n    };\n    url: '/tui/control/response';\n};\n\nexport type TuiControlResponseResponses = {\n    /**\n     * Response submitted successfully\n     */\n    200: boolean;\n};\n\nexport type TuiControlResponseResponse = TuiControlResponseResponses[keyof TuiControlResponseResponses];\n\nexport type AuthSetData = {\n    body?: Auth;\n    path: {\n        providerID: string;\n    };\n    query?: {\n        directory?: string;\n    };\n    url: '/auth/{providerID}';\n};\n\nexport type AuthSetErrors = {\n    /**\n     * Bad request\n     */\n    400: BadRequestError;\n};\n\nexport type AuthSetError = AuthSetErrors[keyof AuthSetErrors];\n\nexport type AuthSetResponses = {\n    /**\n     * Successfully set authentication credentials\n     */\n    200: boolean;\n};\n\nexport type AuthSetResponse = AuthSetResponses[keyof AuthSetResponses];\n\nexport type EventSubscribeData = {\n    body?: never;\n    path?: never;\n    query?: {\n        directory?: string;\n    };\n    url: '/event';\n};\n\nexport type EventSubscribeResponses = {\n    /**\n     * Event stream\n     */\n    200: Event;\n};\n\nexport type EventSubscribeResponse = EventSubscribeResponses[keyof EventSubscribeResponses];\n"
  },
  {
    "path": "packages/openapi-ts-tests/sdks/__snapshots__/opencode/grouped/client/client.gen.ts",
    "content": "// 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 (options: RequestOptions) => {\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 url = buildUrl(opts);\n\n    return { opts, url };\n  };\n\n  const request: Client['request'] = async (options) => {\n    // @ts-expect-error\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"
  },
  {
    "path": "packages/openapi-ts-tests/sdks/__snapshots__/opencode/grouped/client/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type { Auth } from '../core/auth.gen';\nexport type { QuerySerializerOptions } from '../core/bodySerializer.gen';\nexport {\n  formDataBodySerializer,\n  jsonBodySerializer,\n  urlSearchParamsBodySerializer,\n} from '../core/bodySerializer.gen';\nexport { buildClientParams } from '../core/params.gen';\nexport { serializeQueryKeyValue } from '../core/queryKeySerializer.gen';\nexport { createClient } from './client.gen';\nexport type {\n  Client,\n  ClientOptions,\n  Config,\n  CreateClientConfig,\n  Options,\n  RequestOptions,\n  RequestResult,\n  ResolvedRequestOptions,\n  ResponseStyle,\n  TDataShape,\n} from './types.gen';\nexport { createConfig, mergeHeaders } from './utils.gen';\n"
  },
  {
    "path": "packages/openapi-ts-tests/sdks/__snapshots__/opencode/grouped/client/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { Auth } from '../core/auth.gen';\nimport type {\n  ServerSentEventsOptions,\n  ServerSentEventsResult,\n} from '../core/serverSentEvents.gen';\nimport type { Client as CoreClient, Config as CoreConfig } from '../core/types.gen';\nimport type { Middleware } from './utils.gen';\n\nexport type ResponseStyle = 'data' | 'fields';\n\nexport interface Config<T extends ClientOptions = ClientOptions>\n  extends Omit<RequestInit, 'body' | 'headers' | 'method'>, CoreConfig {\n  /**\n   * Base URL for all requests made by this client.\n   */\n  baseUrl?: T['baseUrl'];\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   * Please don't use the Fetch client for Next.js applications. The `next`\n   * options won't have any effect.\n   *\n   * Install {@link https://www.npmjs.com/package/@hey-api/client-next `@hey-api/client-next`} instead.\n   */\n  next?: never;\n  /**\n   * Return the response data parsed in a specified format. By default, `auto`\n   * will infer the appropriate method from the `Content-Type` response header.\n   * You can override this behavior with any of the {@link Body} methods.\n   * Select `stream` if you don't want to parse response data at all.\n   *\n   * @default 'auto'\n   */\n  parseAs?: 'arrayBuffer' | 'auto' | 'blob' | 'formData' | 'json' | 'stream' | 'text';\n  /**\n   * Should we return only data or multiple fields (data, error, response, etc.)?\n   *\n   * @default 'fields'\n   */\n  responseStyle?: ResponseStyle;\n  /**\n   * Throw an error instead of returning it in the response?\n   *\n   * @default false\n   */\n  throwOnError?: T['throwOnError'];\n}\n\nexport interface RequestOptions<\n  TData = unknown,\n  TResponseStyle extends ResponseStyle = 'fields',\n  ThrowOnError extends boolean = boolean,\n  Url extends string = string,\n>\n  extends\n    Config<{\n      responseStyle: TResponseStyle;\n      throwOnError: ThrowOnError;\n    }>,\n    Pick<\n      ServerSentEventsOptions<TData>,\n      | 'onRequest'\n      | 'onSseError'\n      | 'onSseEvent'\n      | 'sseDefaultRetryDelay'\n      | 'sseMaxRetryAttempts'\n      | 'sseMaxRetryDelay'\n    > {\n  /**\n   * Any body that you want to add to your request.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/fetch#body}\n   */\n  body?: unknown;\n  path?: Record<string, unknown>;\n  query?: Record<string, unknown>;\n  /**\n   * Security mechanism(s) to use for the request.\n   */\n  security?: ReadonlyArray<Auth>;\n  url: Url;\n}\n\nexport interface ResolvedRequestOptions<\n  TResponseStyle extends ResponseStyle = 'fields',\n  ThrowOnError extends boolean = boolean,\n  Url extends string = string,\n> extends RequestOptions<unknown, TResponseStyle, ThrowOnError, Url> {\n  serializedBody?: string;\n}\n\nexport type RequestResult<\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = boolean,\n  TResponseStyle extends ResponseStyle = 'fields',\n> = ThrowOnError extends true\n  ? Promise<\n      TResponseStyle extends 'data'\n        ? TData extends Record<string, unknown>\n          ? TData[keyof TData]\n          : TData\n        : {\n            data: TData extends Record<string, unknown> ? TData[keyof TData] : TData;\n            request: Request;\n            response: Response;\n          }\n    >\n  : Promise<\n      TResponseStyle extends 'data'\n        ? (TData extends Record<string, unknown> ? TData[keyof TData] : TData) | undefined\n        : (\n            | {\n                data: TData extends Record<string, unknown> ? TData[keyof TData] : TData;\n                error: undefined;\n              }\n            | {\n                data: undefined;\n                error: TError extends Record<string, unknown> ? TError[keyof TError] : TError;\n              }\n          ) & {\n            request: Request;\n            response: Response;\n          }\n    >;\n\nexport interface ClientOptions {\n  baseUrl?: string;\n  responseStyle?: ResponseStyle;\n  throwOnError?: boolean;\n}\n\ntype MethodFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'>,\n) => RequestResult<TData, TError, ThrowOnError, TResponseStyle>;\n\ntype SseFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'>,\n) => Promise<ServerSentEventsResult<TData, TError>>;\n\ntype RequestFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'> &\n    Pick<Required<RequestOptions<TData, TResponseStyle, ThrowOnError>>, 'method'>,\n) => RequestResult<TData, TError, ThrowOnError, TResponseStyle>;\n\ntype BuildUrlFn = <\n  TData extends {\n    body?: unknown;\n    path?: Record<string, unknown>;\n    query?: Record<string, unknown>;\n    url: string;\n  },\n>(\n  options: TData & Options<TData>,\n) => string;\n\nexport type Client = CoreClient<RequestFn, Config, MethodFn, BuildUrlFn, SseFn> & {\n  interceptors: Middleware<Request, Response, unknown, ResolvedRequestOptions>;\n};\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 = ClientOptions> = (\n  override?: Config<ClientOptions & T>,\n) => Config<Required<ClientOptions> & T>;\n\nexport interface TDataShape {\n  body?: unknown;\n  headers?: unknown;\n  path?: unknown;\n  query?: unknown;\n  url: string;\n}\n\ntype OmitKeys<T, K> = Pick<T, Exclude<keyof T, K>>;\n\nexport type Options<\n  TData extends TDataShape = TDataShape,\n  ThrowOnError extends boolean = boolean,\n  TResponse = unknown,\n  TResponseStyle extends ResponseStyle = 'fields',\n> = OmitKeys<\n  RequestOptions<TResponse, TResponseStyle, ThrowOnError>,\n  'body' | 'path' | 'query' | 'url'\n> &\n  ([TData] extends [never] ? unknown : Omit<TData, 'url'>);\n"
  },
  {
    "path": "packages/openapi-ts-tests/sdks/__snapshots__/opencode/grouped/client/utils.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/sdks/__snapshots__/opencode/grouped/client.gen.ts",
    "content": "// 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>());\n"
  },
  {
    "path": "packages/openapi-ts-tests/sdks/__snapshots__/opencode/grouped/core/auth.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/sdks/__snapshots__/opencode/grouped/core/bodySerializer.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/sdks/__snapshots__/opencode/grouped/core/params.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/sdks/__snapshots__/opencode/grouped/core/pathSerializer.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/sdks/__snapshots__/opencode/grouped/core/queryKeySerializer.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\n/**\n * JSON-friendly union that mirrors what Pinia Colada can hash.\n */\nexport type JsonValue =\n  | null\n  | string\n  | number\n  | boolean\n  | JsonValue[]\n  | { [key: string]: JsonValue };\n\n/**\n * Replacer that converts non-JSON values (bigint, Date, etc.) to safe substitutes.\n */\nexport const queryKeyJsonReplacer = (_key: string, value: unknown) => {\n  if (value === undefined || typeof value === 'function' || typeof value === 'symbol') {\n    return undefined;\n  }\n  if (typeof value === 'bigint') {\n    return value.toString();\n  }\n  if (value instanceof Date) {\n    return value.toISOString();\n  }\n  return value;\n};\n\n/**\n * Safely stringifies a value and parses it back into a JsonValue.\n */\nexport const stringifyToJsonValue = (input: unknown): JsonValue | undefined => {\n  try {\n    const json = JSON.stringify(input, queryKeyJsonReplacer);\n    if (json === undefined) {\n      return undefined;\n    }\n    return JSON.parse(json) as JsonValue;\n  } catch {\n    return undefined;\n  }\n};\n\n/**\n * Detects plain objects (including objects with a null prototype).\n */\nconst isPlainObject = (value: unknown): value is Record<string, unknown> => {\n  if (value === null || typeof value !== 'object') {\n    return false;\n  }\n  const prototype = Object.getPrototypeOf(value as object);\n  return prototype === Object.prototype || prototype === null;\n};\n\n/**\n * Turns URLSearchParams into a sorted JSON object for deterministic keys.\n */\nconst serializeSearchParams = (params: URLSearchParams): JsonValue => {\n  const entries = Array.from(params.entries()).sort(([a], [b]) => a.localeCompare(b));\n  const result: Record<string, JsonValue> = {};\n\n  for (const [key, value] of entries) {\n    const existing = result[key];\n    if (existing === undefined) {\n      result[key] = value;\n      continue;\n    }\n\n    if (Array.isArray(existing)) {\n      (existing as string[]).push(value);\n    } else {\n      result[key] = [existing, value];\n    }\n  }\n\n  return result;\n};\n\n/**\n * Normalizes any accepted value into a JSON-friendly shape for query keys.\n */\nexport const serializeQueryKeyValue = (value: unknown): JsonValue | undefined => {\n  if (value === null) {\n    return null;\n  }\n\n  if (typeof value === 'string' || typeof value === 'number' || typeof value === 'boolean') {\n    return value;\n  }\n\n  if (value === undefined || typeof value === 'function' || typeof value === 'symbol') {\n    return undefined;\n  }\n\n  if (typeof value === 'bigint') {\n    return value.toString();\n  }\n\n  if (value instanceof Date) {\n    return value.toISOString();\n  }\n\n  if (Array.isArray(value)) {\n    return stringifyToJsonValue(value);\n  }\n\n  if (typeof URLSearchParams !== 'undefined' && value instanceof URLSearchParams) {\n    return serializeSearchParams(value);\n  }\n\n  if (isPlainObject(value)) {\n    return stringifyToJsonValue(value);\n  }\n\n  return undefined;\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/sdks/__snapshots__/opencode/grouped/core/serverSentEvents.gen.ts",
    "content": "// 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 const 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            // Normalize line endings: CRLF -> LF, then CR -> LF\n            buffer = buffer.replace(/\\r\\n/g, '\\n').replace(/\\r/g, '\\n');\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"
  },
  {
    "path": "packages/openapi-ts-tests/sdks/__snapshots__/opencode/grouped/core/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { Auth, AuthToken } from './auth.gen';\nimport type { BodySerializer, QuerySerializer, QuerySerializerOptions } from './bodySerializer.gen';\n\nexport type HttpMethod =\n  | 'connect'\n  | 'delete'\n  | 'get'\n  | 'head'\n  | 'options'\n  | 'patch'\n  | 'post'\n  | 'put'\n  | 'trace';\n\nexport type Client<\n  RequestFn = never,\n  Config = unknown,\n  MethodFn = never,\n  BuildUrlFn = never,\n  SseFn = never,\n> = {\n  /**\n   * Returns the final request URL.\n   */\n  buildUrl: BuildUrlFn;\n  getConfig: () => Config;\n  request: RequestFn;\n  setConfig: (config: Config) => Config;\n} & {\n  [K in HttpMethod]: MethodFn;\n} & ([SseFn] extends [never] ? { sse?: never } : { sse: { [K in HttpMethod]: SseFn } });\n\nexport interface Config {\n  /**\n   * Auth token or a function returning auth token. The resolved value will be\n   * added to the request payload as defined by its `security` array.\n   */\n  auth?: ((auth: Auth) => Promise<AuthToken> | AuthToken) | AuthToken;\n  /**\n   * A function for serializing request body parameter. By default,\n   * {@link JSON.stringify()} will be used.\n   */\n  bodySerializer?: BodySerializer | null;\n  /**\n   * An object containing any HTTP headers that you want to pre-populate your\n   * `Headers` object with.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/Headers/Headers#init See more}\n   */\n  headers?:\n    | RequestInit['headers']\n    | Record<\n        string,\n        string | number | boolean | (string | number | boolean)[] | null | undefined | unknown\n      >;\n  /**\n   * The request method.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/fetch#method See more}\n   */\n  method?: Uppercase<HttpMethod>;\n  /**\n   * A function for serializing request query parameters. By default, arrays\n   * will be exploded in form style, objects will be exploded in deepObject\n   * style, and reserved characters are percent-encoded.\n   *\n   * This method will have no effect if the native `paramsSerializer()` Axios\n   * API function is used.\n   *\n   * {@link https://swagger.io/docs/specification/serialization/#query View examples}\n   */\n  querySerializer?: QuerySerializer | QuerySerializerOptions;\n  /**\n   * A function validating request data. This is useful if you want to ensure\n   * the request conforms to the desired shape, so it can be safely sent to\n   * the server.\n   */\n  requestValidator?: (data: unknown) => Promise<unknown>;\n  /**\n   * A function transforming response data before it's returned. This is useful\n   * for post-processing data, e.g. converting ISO strings into Date objects.\n   */\n  responseTransformer?: (data: unknown) => Promise<unknown>;\n  /**\n   * A function validating response data. This is useful if you want to ensure\n   * the response conforms to the desired shape, so it can be safely passed to\n   * the transformers and returned to the user.\n   */\n  responseValidator?: (data: unknown) => Promise<unknown>;\n}\n\ntype IsExactlyNeverOrNeverUndefined<T> = [T] extends [never]\n  ? true\n  : [T] extends [never | undefined]\n    ? [undefined] extends [T]\n      ? false\n      : true\n    : false;\n\nexport type OmitNever<T extends Record<string, unknown>> = {\n  [K in keyof T as IsExactlyNeverOrNeverUndefined<T[K]> extends true ? never : K]: T[K];\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/sdks/__snapshots__/opencode/grouped/core/utils.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/sdks/__snapshots__/opencode/grouped/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport { appAgents, appLog, authSet, commandList, configGet, configProviders, configUpdate, eventSubscribe, fileList, fileRead, fileStatus, findFiles, findSymbols, findText, formatterStatus, globalDispose, globalEvent, globalHealth, instanceDispose, lspStatus, mcpAdd, mcpAuthAuthenticate, mcpAuthCallback, mcpAuthRemove, mcpAuthStart, mcpConnect, mcpDisconnect, mcpStatus, type Options, partDelete, partUpdate, pathGet, permissionList, permissionReply, permissionRespond, projectCurrent, projectList, projectUpdate, providerAuth, providerList, providerOauthAuthorize, providerOauthCallback, ptyConnect, ptyCreate, ptyGet, ptyList, ptyRemove, ptyUpdate, sessionAbort, sessionChildren, sessionCommand, sessionCreate, sessionDelete, sessionDiff, sessionFork, sessionGet, sessionInit, sessionList, sessionMessage, sessionMessages, sessionPrompt, sessionPromptAsync, sessionRevert, sessionShare, sessionShell, sessionStatus, sessionSummarize, sessionTodo, sessionUnrevert, sessionUnshare, sessionUpdate, toolIds, toolList, tuiAppendPrompt, tuiClearPrompt, tuiControlNext, tuiControlResponse, tuiExecuteCommand, tuiOpenHelp, tuiOpenModels, tuiOpenSessions, tuiOpenThemes, tuiPublish, tuiShowToast, tuiSubmitPrompt, vcsGet } from './sdk.gen';\nexport type { Agent, AgentConfig, AgentPart, AgentPartInput, ApiAuth, ApiError, AppAgentsData, AppAgentsResponse, AppAgentsResponses, AppLogData, AppLogError, AppLogErrors, AppLogResponse, AppLogResponses, AssistantMessage, Auth, AuthSetData, AuthSetError, AuthSetErrors, AuthSetResponse, AuthSetResponses, BadRequestError, ClientOptions, Command, CommandListData, CommandListResponse, CommandListResponses, CompactionPart, Config, ConfigGetData, ConfigGetResponse, ConfigGetResponses, ConfigProvidersData, ConfigProvidersResponse, ConfigProvidersResponses, ConfigUpdateData, ConfigUpdateError, ConfigUpdateErrors, ConfigUpdateResponse, ConfigUpdateResponses, Event, EventCommandExecuted, EventFileEdited, EventFileWatcherUpdated, EventGlobalDisposed, EventInstallationUpdateAvailable, EventInstallationUpdated, EventLspClientDiagnostics, EventLspUpdated, EventMcpToolsChanged, EventMessagePartRemoved, EventMessagePartUpdated, EventMessageRemoved, EventMessageUpdated, EventPermissionAsked, EventPermissionReplied, EventProjectUpdated, EventPtyCreated, EventPtyDeleted, EventPtyExited, EventPtyUpdated, EventServerConnected, EventServerInstanceDisposed, EventSessionCompacted, EventSessionCreated, EventSessionDeleted, EventSessionDiff, EventSessionError, EventSessionIdle, EventSessionStatus, EventSessionUpdated, EventSubscribeData, EventSubscribeResponse, EventSubscribeResponses, EventTodoUpdated, EventTuiCommandExecute, EventTuiPromptAppend, EventTuiToastShow, EventVcsBranchUpdated, File, FileContent, FileDiff, FileListData, FileListResponse, FileListResponses, FileNode, FilePart, FilePartInput, FilePartSource, FilePartSourceText, FileReadData, FileReadResponse, FileReadResponses, FileSource, FileStatusData, FileStatusResponse, FileStatusResponses, FindFilesData, FindFilesResponse, FindFilesResponses, FindSymbolsData, FindSymbolsResponse, FindSymbolsResponses, FindTextData, FindTextResponse, FindTextResponses, FormatterStatus, FormatterStatusData, FormatterStatusResponse, FormatterStatusResponses, GlobalDisposeData, GlobalDisposeResponse, GlobalDisposeResponses, GlobalEvent, GlobalEventData, GlobalEventResponse, GlobalEventResponses, GlobalHealthData, GlobalHealthResponse, GlobalHealthResponses, InstanceDisposeData, InstanceDisposeResponse, InstanceDisposeResponses, KeybindsConfig, LayoutConfig, LogLevel, LspStatus, LspStatusData, LspStatusResponse, LspStatusResponses, McpAddData, McpAddError, McpAddErrors, McpAddResponse, McpAddResponses, McpAuthAuthenticateData, McpAuthAuthenticateError, McpAuthAuthenticateErrors, McpAuthAuthenticateResponse, McpAuthAuthenticateResponses, McpAuthCallbackData, McpAuthCallbackError, McpAuthCallbackErrors, McpAuthCallbackResponse, McpAuthCallbackResponses, McpAuthRemoveData, McpAuthRemoveError, McpAuthRemoveErrors, McpAuthRemoveResponse, McpAuthRemoveResponses, McpAuthStartData, McpAuthStartError, McpAuthStartErrors, McpAuthStartResponse, McpAuthStartResponses, McpConnectData, McpConnectResponse, McpConnectResponses, McpDisconnectData, McpDisconnectResponse, McpDisconnectResponses, McpLocalConfig, McpOAuthConfig, McpRemoteConfig, McpStatus, McpStatusConnected, McpStatusData, McpStatusDisabled, McpStatusFailed, McpStatusNeedsAuth, McpStatusNeedsClientRegistration, McpStatusResponse, McpStatusResponses, Message, MessageAbortedError, MessageOutputLengthError, Model, NotFoundError, OAuth, Part, PartDeleteData, PartDeleteError, PartDeleteErrors, PartDeleteResponse, PartDeleteResponses, PartUpdateData, PartUpdateError, PartUpdateErrors, PartUpdateResponse, PartUpdateResponses, PatchPart, Path, PathGetData, PathGetResponse, PathGetResponses, PermissionAction, PermissionActionConfig, PermissionConfig, PermissionListData, PermissionListResponse, PermissionListResponses, PermissionObjectConfig, PermissionReplyData, PermissionReplyError, PermissionReplyErrors, PermissionReplyResponse, PermissionReplyResponses, PermissionRequest, PermissionRespondData, PermissionRespondError, PermissionRespondErrors, PermissionRespondResponse, PermissionRespondResponses, PermissionRule, PermissionRuleConfig, PermissionRuleset, Project, ProjectCurrentData, ProjectCurrentResponse, ProjectCurrentResponses, ProjectListData, ProjectListResponse, ProjectListResponses, ProjectUpdateData, ProjectUpdateError, ProjectUpdateErrors, ProjectUpdateResponse, ProjectUpdateResponses, Provider, ProviderAuthAuthorization, ProviderAuthData, ProviderAuthError, ProviderAuthMethod, ProviderAuthResponse, ProviderAuthResponses, ProviderConfig, ProviderListData, ProviderListResponse, ProviderListResponses, ProviderOauthAuthorizeData, ProviderOauthAuthorizeError, ProviderOauthAuthorizeErrors, ProviderOauthAuthorizeResponse, ProviderOauthAuthorizeResponses, ProviderOauthCallbackData, ProviderOauthCallbackError, ProviderOauthCallbackErrors, ProviderOauthCallbackResponse, ProviderOauthCallbackResponses, Pty, PtyConnectData, PtyConnectError, PtyConnectErrors, PtyConnectResponse, PtyConnectResponses, PtyCreateData, PtyCreateError, PtyCreateErrors, PtyCreateResponse, PtyCreateResponses, PtyGetData, PtyGetError, PtyGetErrors, PtyGetResponse, PtyGetResponses, PtyListData, PtyListResponse, PtyListResponses, PtyRemoveData, PtyRemoveError, PtyRemoveErrors, PtyRemoveResponse, PtyRemoveResponses, PtyUpdateData, PtyUpdateError, PtyUpdateErrors, PtyUpdateResponse, PtyUpdateResponses, Range, ReasoningPart, RetryPart, ServerConfig, Session, SessionAbortData, SessionAbortError, SessionAbortErrors, SessionAbortResponse, SessionAbortResponses, SessionChildrenData, SessionChildrenError, SessionChildrenErrors, SessionChildrenResponse, SessionChildrenResponses, SessionCommandData, SessionCommandError, SessionCommandErrors, SessionCommandResponse, SessionCommandResponses, SessionCreateData, SessionCreateError, SessionCreateErrors, SessionCreateResponse, SessionCreateResponses, SessionDeleteData, SessionDeleteError, SessionDeleteErrors, SessionDeleteResponse, SessionDeleteResponses, SessionDiffData, SessionDiffError, SessionDiffErrors, SessionDiffResponse, SessionDiffResponses, SessionForkData, SessionForkResponse, SessionForkResponses, SessionGetData, SessionGetError, SessionGetErrors, SessionGetResponse, SessionGetResponses, SessionInitData, SessionInitError, SessionInitErrors, SessionInitResponse, SessionInitResponses, SessionListData, SessionListResponse, SessionListResponses, SessionMessageData, SessionMessageError, SessionMessageErrors, SessionMessageResponse, SessionMessageResponses, SessionMessagesData, SessionMessagesError, SessionMessagesErrors, SessionMessagesResponse, SessionMessagesResponses, SessionPromptAsyncData, SessionPromptAsyncError, SessionPromptAsyncErrors, SessionPromptAsyncResponse, SessionPromptAsyncResponses, SessionPromptData, SessionPromptError, SessionPromptErrors, SessionPromptResponse, SessionPromptResponses, SessionRevertData, SessionRevertError, SessionRevertErrors, SessionRevertResponse, SessionRevertResponses, SessionShareData, SessionShareError, SessionShareErrors, SessionShareResponse, SessionShareResponses, SessionShellData, SessionShellError, SessionShellErrors, SessionShellResponse, SessionShellResponses, SessionStatus, SessionStatusData, SessionStatusError, SessionStatusErrors, SessionStatusResponse, SessionStatusResponses, SessionSummarizeData, SessionSummarizeError, SessionSummarizeErrors, SessionSummarizeResponse, SessionSummarizeResponses, SessionTodoData, SessionTodoError, SessionTodoErrors, SessionTodoResponse, SessionTodoResponses, SessionUnrevertData, SessionUnrevertError, SessionUnrevertErrors, SessionUnrevertResponse, SessionUnrevertResponses, SessionUnshareData, SessionUnshareError, SessionUnshareErrors, SessionUnshareResponse, SessionUnshareResponses, SessionUpdateData, SessionUpdateError, SessionUpdateErrors, SessionUpdateResponse, SessionUpdateResponses, SnapshotPart, StepFinishPart, StepStartPart, SubtaskPartInput, Symbol, SymbolSource, TextPart, TextPartInput, Todo, ToolIds, ToolIdsData, ToolIdsError, ToolIdsErrors, ToolIdsResponse, ToolIdsResponses, ToolList, ToolListData, ToolListError, ToolListErrors, ToolListItem, ToolListResponse, ToolListResponses, ToolPart, ToolState, ToolStateCompleted, ToolStateError, ToolStatePending, ToolStateRunning, TuiAppendPromptData, TuiAppendPromptError, TuiAppendPromptErrors, TuiAppendPromptResponse, TuiAppendPromptResponses, TuiClearPromptData, TuiClearPromptResponse, TuiClearPromptResponses, TuiControlNextData, TuiControlNextResponse, TuiControlNextResponses, TuiControlResponseData, TuiControlResponseResponse, TuiControlResponseResponses, TuiExecuteCommandData, TuiExecuteCommandError, TuiExecuteCommandErrors, TuiExecuteCommandResponse, TuiExecuteCommandResponses, TuiOpenHelpData, TuiOpenHelpResponse, TuiOpenHelpResponses, TuiOpenModelsData, TuiOpenModelsResponse, TuiOpenModelsResponses, TuiOpenSessionsData, TuiOpenSessionsResponse, TuiOpenSessionsResponses, TuiOpenThemesData, TuiOpenThemesResponse, TuiOpenThemesResponses, TuiPublishData, TuiPublishError, TuiPublishErrors, TuiPublishResponse, TuiPublishResponses, TuiShowToastData, TuiShowToastResponse, TuiShowToastResponses, TuiSubmitPromptData, TuiSubmitPromptResponse, TuiSubmitPromptResponses, UnknownError, UserMessage, VcsGetData, VcsGetResponse, VcsGetResponses, VcsInfo, WellKnownAuth } from './types.gen';\n"
  },
  {
    "path": "packages/openapi-ts-tests/sdks/__snapshots__/opencode/grouped/sdk.gen.ts",
    "content": "// 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 { AppAgentsData, AppAgentsResponses, AppLogData, AppLogErrors, AppLogResponses, AuthSetData, AuthSetErrors, AuthSetResponses, CommandListData, CommandListResponses, ConfigGetData, ConfigGetResponses, ConfigProvidersData, ConfigProvidersResponses, ConfigUpdateData, ConfigUpdateErrors, ConfigUpdateResponses, EventSubscribeData, EventSubscribeResponses, FileListData, FileListResponses, FileReadData, FileReadResponses, FileStatusData, FileStatusResponses, FindFilesData, FindFilesResponses, FindSymbolsData, FindSymbolsResponses, FindTextData, FindTextResponses, FormatterStatusData, FormatterStatusResponses, GlobalDisposeData, GlobalDisposeResponses, GlobalEventData, GlobalEventResponses, GlobalHealthData, GlobalHealthResponses, InstanceDisposeData, InstanceDisposeResponses, LspStatusData, LspStatusResponses, McpAddData, McpAddErrors, McpAddResponses, McpAuthAuthenticateData, McpAuthAuthenticateErrors, McpAuthAuthenticateResponses, McpAuthCallbackData, McpAuthCallbackErrors, McpAuthCallbackResponses, McpAuthRemoveData, McpAuthRemoveErrors, McpAuthRemoveResponses, McpAuthStartData, McpAuthStartErrors, McpAuthStartResponses, McpConnectData, McpConnectResponses, McpDisconnectData, McpDisconnectResponses, McpStatusData, McpStatusResponses, PartDeleteData, PartDeleteErrors, PartDeleteResponses, PartUpdateData, PartUpdateErrors, PartUpdateResponses, PathGetData, PathGetResponses, PermissionListData, PermissionListResponses, PermissionReplyData, PermissionReplyErrors, PermissionReplyResponses, PermissionRespondData, PermissionRespondErrors, PermissionRespondResponses, ProjectCurrentData, ProjectCurrentResponses, ProjectListData, ProjectListResponses, ProjectUpdateData, ProjectUpdateErrors, ProjectUpdateResponses, ProviderAuthData, ProviderAuthResponses, ProviderListData, ProviderListResponses, ProviderOauthAuthorizeData, ProviderOauthAuthorizeErrors, ProviderOauthAuthorizeResponses, ProviderOauthCallbackData, ProviderOauthCallbackErrors, ProviderOauthCallbackResponses, PtyConnectData, PtyConnectErrors, PtyConnectResponses, PtyCreateData, PtyCreateErrors, PtyCreateResponses, PtyGetData, PtyGetErrors, PtyGetResponses, PtyListData, PtyListResponses, PtyRemoveData, PtyRemoveErrors, PtyRemoveResponses, PtyUpdateData, PtyUpdateErrors, PtyUpdateResponses, SessionAbortData, SessionAbortErrors, SessionAbortResponses, SessionChildrenData, SessionChildrenErrors, SessionChildrenResponses, SessionCommandData, SessionCommandErrors, SessionCommandResponses, SessionCreateData, SessionCreateErrors, SessionCreateResponses, SessionDeleteData, SessionDeleteErrors, SessionDeleteResponses, SessionDiffData, SessionDiffErrors, SessionDiffResponses, SessionForkData, SessionForkResponses, SessionGetData, SessionGetErrors, SessionGetResponses, SessionInitData, SessionInitErrors, SessionInitResponses, SessionListData, SessionListResponses, SessionMessageData, SessionMessageErrors, SessionMessageResponses, SessionMessagesData, SessionMessagesErrors, SessionMessagesResponses, SessionPromptAsyncData, SessionPromptAsyncErrors, SessionPromptAsyncResponses, SessionPromptData, SessionPromptErrors, SessionPromptResponses, SessionRevertData, SessionRevertErrors, SessionRevertResponses, SessionShareData, SessionShareErrors, SessionShareResponses, SessionShellData, SessionShellErrors, SessionShellResponses, SessionStatusData, SessionStatusErrors, SessionStatusResponses, SessionSummarizeData, SessionSummarizeErrors, SessionSummarizeResponses, SessionTodoData, SessionTodoErrors, SessionTodoResponses, SessionUnrevertData, SessionUnrevertErrors, SessionUnrevertResponses, SessionUnshareData, SessionUnshareErrors, SessionUnshareResponses, SessionUpdateData, SessionUpdateErrors, SessionUpdateResponses, ToolIdsData, ToolIdsErrors, ToolIdsResponses, ToolListData, ToolListErrors, ToolListResponses, TuiAppendPromptData, TuiAppendPromptErrors, TuiAppendPromptResponses, TuiClearPromptData, TuiClearPromptResponses, TuiControlNextData, TuiControlNextResponses, TuiControlResponseData, TuiControlResponseResponses, TuiExecuteCommandData, TuiExecuteCommandErrors, TuiExecuteCommandResponses, TuiOpenHelpData, TuiOpenHelpResponses, TuiOpenModelsData, TuiOpenModelsResponses, TuiOpenSessionsData, TuiOpenSessionsResponses, TuiOpenThemesData, TuiOpenThemesResponses, TuiPublishData, TuiPublishErrors, TuiPublishResponses, TuiShowToastData, TuiShowToastResponses, TuiSubmitPromptData, TuiSubmitPromptResponses, VcsGetData, VcsGetResponses } from './types.gen';\n\nexport type Options<TData extends TDataShape = TDataShape, ThrowOnError extends boolean = boolean> = Options2<TData, ThrowOnError> & {\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 * Get health\n *\n * Get health information about the OpenCode server.\n */\nexport const globalHealth = <ThrowOnError extends boolean = false>(options?: Options<GlobalHealthData, ThrowOnError>) => (options?.client ?? client).get<GlobalHealthResponses, unknown, ThrowOnError>({ url: '/global/health', ...options });\n\n/**\n * Get global events\n *\n * Subscribe to global events from the OpenCode system using server-sent events.\n */\nexport const globalEvent = <ThrowOnError extends boolean = false>(options?: Options<GlobalEventData, ThrowOnError>) => (options?.client ?? client).sse.get<GlobalEventResponses, unknown, ThrowOnError>({ url: '/global/event', ...options });\n\n/**\n * Dispose instance\n *\n * Clean up and dispose all OpenCode instances, releasing all resources.\n */\nexport const globalDispose = <ThrowOnError extends boolean = false>(options?: Options<GlobalDisposeData, ThrowOnError>) => (options?.client ?? client).post<GlobalDisposeResponses, unknown, ThrowOnError>({ url: '/global/dispose', ...options });\n\n/**\n * List all projects\n *\n * Get a list of projects that have been opened with OpenCode.\n */\nexport const projectList = <ThrowOnError extends boolean = false>(options?: Options<ProjectListData, ThrowOnError>) => (options?.client ?? client).get<ProjectListResponses, unknown, ThrowOnError>({ url: '/project', ...options });\n\n/**\n * Get current project\n *\n * Retrieve the currently active project that OpenCode is working with.\n */\nexport const projectCurrent = <ThrowOnError extends boolean = false>(options?: Options<ProjectCurrentData, ThrowOnError>) => (options?.client ?? client).get<ProjectCurrentResponses, unknown, ThrowOnError>({ url: '/project/current', ...options });\n\n/**\n * Update project\n *\n * Update project properties such as name, icon and color.\n */\nexport const projectUpdate = <ThrowOnError extends boolean = false>(options: Options<ProjectUpdateData, ThrowOnError>) => (options.client ?? client).patch<ProjectUpdateResponses, ProjectUpdateErrors, ThrowOnError>({\n    url: '/project/{projectID}',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options.headers\n    }\n});\n\n/**\n * List PTY sessions\n *\n * Get a list of all active pseudo-terminal (PTY) sessions managed by OpenCode.\n */\nexport const ptyList = <ThrowOnError extends boolean = false>(options?: Options<PtyListData, ThrowOnError>) => (options?.client ?? client).get<PtyListResponses, unknown, ThrowOnError>({ url: '/pty', ...options });\n\n/**\n * Create PTY session\n *\n * Create a new pseudo-terminal (PTY) session for running shell commands and processes.\n */\nexport const ptyCreate = <ThrowOnError extends boolean = false>(options?: Options<PtyCreateData, ThrowOnError>) => (options?.client ?? client).post<PtyCreateResponses, PtyCreateErrors, ThrowOnError>({\n    url: '/pty',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options?.headers\n    }\n});\n\n/**\n * Remove PTY session\n *\n * Remove and terminate a specific pseudo-terminal (PTY) session.\n */\nexport const ptyRemove = <ThrowOnError extends boolean = false>(options: Options<PtyRemoveData, ThrowOnError>) => (options.client ?? client).delete<PtyRemoveResponses, PtyRemoveErrors, ThrowOnError>({ url: '/pty/{ptyID}', ...options });\n\n/**\n * Get PTY session\n *\n * Retrieve detailed information about a specific pseudo-terminal (PTY) session.\n */\nexport const ptyGet = <ThrowOnError extends boolean = false>(options: Options<PtyGetData, ThrowOnError>) => (options.client ?? client).get<PtyGetResponses, PtyGetErrors, ThrowOnError>({ url: '/pty/{ptyID}', ...options });\n\n/**\n * Update PTY session\n *\n * Update properties of an existing pseudo-terminal (PTY) session.\n */\nexport const ptyUpdate = <ThrowOnError extends boolean = false>(options: Options<PtyUpdateData, ThrowOnError>) => (options.client ?? client).put<PtyUpdateResponses, PtyUpdateErrors, ThrowOnError>({\n    url: '/pty/{ptyID}',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options.headers\n    }\n});\n\n/**\n * Connect to PTY session\n *\n * Establish a WebSocket connection to interact with a pseudo-terminal (PTY) session in real-time.\n */\nexport const ptyConnect = <ThrowOnError extends boolean = false>(options: Options<PtyConnectData, ThrowOnError>) => (options.client ?? client).get<PtyConnectResponses, PtyConnectErrors, ThrowOnError>({ url: '/pty/{ptyID}/connect', ...options });\n\n/**\n * Get configuration\n *\n * Retrieve the current OpenCode configuration settings and preferences.\n */\nexport const configGet = <ThrowOnError extends boolean = false>(options?: Options<ConfigGetData, ThrowOnError>) => (options?.client ?? client).get<ConfigGetResponses, unknown, ThrowOnError>({ url: '/config', ...options });\n\n/**\n * Update configuration\n *\n * Update OpenCode configuration settings and preferences.\n */\nexport const configUpdate = <ThrowOnError extends boolean = false>(options?: Options<ConfigUpdateData, ThrowOnError>) => (options?.client ?? client).patch<ConfigUpdateResponses, ConfigUpdateErrors, ThrowOnError>({\n    url: '/config',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options?.headers\n    }\n});\n\n/**\n * List tool IDs\n *\n * Get a list of all available tool IDs, including both built-in tools and dynamically registered tools.\n */\nexport const toolIds = <ThrowOnError extends boolean = false>(options?: Options<ToolIdsData, ThrowOnError>) => (options?.client ?? client).get<ToolIdsResponses, ToolIdsErrors, ThrowOnError>({ url: '/experimental/tool/ids', ...options });\n\n/**\n * List tools\n *\n * Get a list of available tools with their JSON schema parameters for a specific provider and model combination.\n */\nexport const toolList = <ThrowOnError extends boolean = false>(options: Options<ToolListData, ThrowOnError>) => (options.client ?? client).get<ToolListResponses, ToolListErrors, ThrowOnError>({ url: '/experimental/tool', ...options });\n\n/**\n * Dispose instance\n *\n * Clean up and dispose the current OpenCode instance, releasing all resources.\n */\nexport const instanceDispose = <ThrowOnError extends boolean = false>(options?: Options<InstanceDisposeData, ThrowOnError>) => (options?.client ?? client).post<InstanceDisposeResponses, unknown, ThrowOnError>({ url: '/instance/dispose', ...options });\n\n/**\n * Get paths\n *\n * Retrieve the current working directory and related path information for the OpenCode instance.\n */\nexport const pathGet = <ThrowOnError extends boolean = false>(options?: Options<PathGetData, ThrowOnError>) => (options?.client ?? client).get<PathGetResponses, unknown, ThrowOnError>({ url: '/path', ...options });\n\n/**\n * Get VCS info\n *\n * Retrieve version control system (VCS) information for the current project, such as git branch.\n */\nexport const vcsGet = <ThrowOnError extends boolean = false>(options?: Options<VcsGetData, ThrowOnError>) => (options?.client ?? client).get<VcsGetResponses, unknown, ThrowOnError>({ url: '/vcs', ...options });\n\n/**\n * List sessions\n *\n * Get a list of all OpenCode sessions, sorted by most recently updated.\n */\nexport const sessionList = <ThrowOnError extends boolean = false>(options?: Options<SessionListData, ThrowOnError>) => (options?.client ?? client).get<SessionListResponses, unknown, ThrowOnError>({ url: '/session', ...options });\n\n/**\n * Create session\n *\n * Create a new OpenCode session for interacting with AI assistants and managing conversations.\n */\nexport const sessionCreate = <ThrowOnError extends boolean = false>(options?: Options<SessionCreateData, ThrowOnError>) => (options?.client ?? client).post<SessionCreateResponses, SessionCreateErrors, ThrowOnError>({\n    url: '/session',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options?.headers\n    }\n});\n\n/**\n * Get session status\n *\n * Retrieve the current status of all sessions, including active, idle, and completed states.\n */\nexport const sessionStatus = <ThrowOnError extends boolean = false>(options?: Options<SessionStatusData, ThrowOnError>) => (options?.client ?? client).get<SessionStatusResponses, SessionStatusErrors, ThrowOnError>({ url: '/session/status', ...options });\n\n/**\n * Delete session\n *\n * Delete a session and permanently remove all associated data, including messages and history.\n */\nexport const sessionDelete = <ThrowOnError extends boolean = false>(options: Options<SessionDeleteData, ThrowOnError>) => (options.client ?? client).delete<SessionDeleteResponses, SessionDeleteErrors, ThrowOnError>({ url: '/session/{sessionID}', ...options });\n\n/**\n * Get session\n *\n * Retrieve detailed information about a specific OpenCode session.\n */\nexport const sessionGet = <ThrowOnError extends boolean = false>(options: Options<SessionGetData, ThrowOnError>) => (options.client ?? client).get<SessionGetResponses, SessionGetErrors, ThrowOnError>({ url: '/session/{sessionID}', ...options });\n\n/**\n * Update session\n *\n * Update properties of an existing session, such as title or other metadata.\n */\nexport const sessionUpdate = <ThrowOnError extends boolean = false>(options: Options<SessionUpdateData, ThrowOnError>) => (options.client ?? client).patch<SessionUpdateResponses, SessionUpdateErrors, ThrowOnError>({\n    url: '/session/{sessionID}',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options.headers\n    }\n});\n\n/**\n * Get session children\n *\n * Retrieve all child sessions that were forked from the specified parent session.\n */\nexport const sessionChildren = <ThrowOnError extends boolean = false>(options: Options<SessionChildrenData, ThrowOnError>) => (options.client ?? client).get<SessionChildrenResponses, SessionChildrenErrors, ThrowOnError>({ url: '/session/{sessionID}/children', ...options });\n\n/**\n * Get session todos\n *\n * Retrieve the todo list associated with a specific session, showing tasks and action items.\n */\nexport const sessionTodo = <ThrowOnError extends boolean = false>(options: Options<SessionTodoData, ThrowOnError>) => (options.client ?? client).get<SessionTodoResponses, SessionTodoErrors, ThrowOnError>({ url: '/session/{sessionID}/todo', ...options });\n\n/**\n * Initialize session\n *\n * Analyze the current application and create an AGENTS.md file with project-specific agent configurations.\n */\nexport const sessionInit = <ThrowOnError extends boolean = false>(options: Options<SessionInitData, ThrowOnError>) => (options.client ?? client).post<SessionInitResponses, SessionInitErrors, ThrowOnError>({\n    url: '/session/{sessionID}/init',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options.headers\n    }\n});\n\n/**\n * Fork session\n *\n * Create a new session by forking an existing session at a specific message point.\n */\nexport const sessionFork = <ThrowOnError extends boolean = false>(options: Options<SessionForkData, ThrowOnError>) => (options.client ?? client).post<SessionForkResponses, unknown, ThrowOnError>({\n    url: '/session/{sessionID}/fork',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options.headers\n    }\n});\n\n/**\n * Abort session\n *\n * Abort an active session and stop any ongoing AI processing or command execution.\n */\nexport const sessionAbort = <ThrowOnError extends boolean = false>(options: Options<SessionAbortData, ThrowOnError>) => (options.client ?? client).post<SessionAbortResponses, SessionAbortErrors, ThrowOnError>({ url: '/session/{sessionID}/abort', ...options });\n\n/**\n * Unshare session\n *\n * Remove the shareable link for a session, making it private again.\n */\nexport const sessionUnshare = <ThrowOnError extends boolean = false>(options: Options<SessionUnshareData, ThrowOnError>) => (options.client ?? client).delete<SessionUnshareResponses, SessionUnshareErrors, ThrowOnError>({ url: '/session/{sessionID}/share', ...options });\n\n/**\n * Share session\n *\n * Create a shareable link for a session, allowing others to view the conversation.\n */\nexport const sessionShare = <ThrowOnError extends boolean = false>(options: Options<SessionShareData, ThrowOnError>) => (options.client ?? client).post<SessionShareResponses, SessionShareErrors, ThrowOnError>({ url: '/session/{sessionID}/share', ...options });\n\n/**\n * Get session diff\n *\n * Get all file changes (diffs) made during this session.\n */\nexport const sessionDiff = <ThrowOnError extends boolean = false>(options: Options<SessionDiffData, ThrowOnError>) => (options.client ?? client).get<SessionDiffResponses, SessionDiffErrors, ThrowOnError>({ url: '/session/{sessionID}/diff', ...options });\n\n/**\n * Summarize session\n *\n * Generate a concise summary of the session using AI compaction to preserve key information.\n */\nexport const sessionSummarize = <ThrowOnError extends boolean = false>(options: Options<SessionSummarizeData, ThrowOnError>) => (options.client ?? client).post<SessionSummarizeResponses, SessionSummarizeErrors, ThrowOnError>({\n    url: '/session/{sessionID}/summarize',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options.headers\n    }\n});\n\n/**\n * Get session messages\n *\n * Retrieve all messages in a session, including user prompts and AI responses.\n */\nexport const sessionMessages = <ThrowOnError extends boolean = false>(options: Options<SessionMessagesData, ThrowOnError>) => (options.client ?? client).get<SessionMessagesResponses, SessionMessagesErrors, ThrowOnError>({ url: '/session/{sessionID}/message', ...options });\n\n/**\n * Send message\n *\n * Create and send a new message to a session, streaming the AI response.\n */\nexport const sessionPrompt = <ThrowOnError extends boolean = false>(options: Options<SessionPromptData, ThrowOnError>) => (options.client ?? client).post<SessionPromptResponses, SessionPromptErrors, ThrowOnError>({\n    url: '/session/{sessionID}/message',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options.headers\n    }\n});\n\n/**\n * Get message\n *\n * Retrieve a specific message from a session by its message ID.\n */\nexport const sessionMessage = <ThrowOnError extends boolean = false>(options: Options<SessionMessageData, ThrowOnError>) => (options.client ?? client).get<SessionMessageResponses, SessionMessageErrors, ThrowOnError>({ url: '/session/{sessionID}/message/{messageID}', ...options });\n\n/**\n * Delete a part from a message\n */\nexport const partDelete = <ThrowOnError extends boolean = false>(options: Options<PartDeleteData, ThrowOnError>) => (options.client ?? client).delete<PartDeleteResponses, PartDeleteErrors, ThrowOnError>({ url: '/session/{sessionID}/message/{messageID}/part/{partID}', ...options });\n\n/**\n * Update a part in a message\n */\nexport const partUpdate = <ThrowOnError extends boolean = false>(options: Options<PartUpdateData, ThrowOnError>) => (options.client ?? client).patch<PartUpdateResponses, PartUpdateErrors, ThrowOnError>({\n    url: '/session/{sessionID}/message/{messageID}/part/{partID}',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options.headers\n    }\n});\n\n/**\n * Send async message\n *\n * Create and send a new message to a session asynchronously, starting the session if needed and returning immediately.\n */\nexport const sessionPromptAsync = <ThrowOnError extends boolean = false>(options: Options<SessionPromptAsyncData, ThrowOnError>) => (options.client ?? client).post<SessionPromptAsyncResponses, SessionPromptAsyncErrors, ThrowOnError>({\n    url: '/session/{sessionID}/prompt_async',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options.headers\n    }\n});\n\n/**\n * Send command\n *\n * Send a new command to a session for execution by the AI assistant.\n */\nexport const sessionCommand = <ThrowOnError extends boolean = false>(options: Options<SessionCommandData, ThrowOnError>) => (options.client ?? client).post<SessionCommandResponses, SessionCommandErrors, ThrowOnError>({\n    url: '/session/{sessionID}/command',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options.headers\n    }\n});\n\n/**\n * Run shell command\n *\n * Execute a shell command within the session context and return the AI's response.\n */\nexport const sessionShell = <ThrowOnError extends boolean = false>(options: Options<SessionShellData, ThrowOnError>) => (options.client ?? client).post<SessionShellResponses, SessionShellErrors, ThrowOnError>({\n    url: '/session/{sessionID}/shell',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options.headers\n    }\n});\n\n/**\n * Revert message\n *\n * Revert a specific message in a session, undoing its effects and restoring the previous state.\n */\nexport const sessionRevert = <ThrowOnError extends boolean = false>(options: Options<SessionRevertData, ThrowOnError>) => (options.client ?? client).post<SessionRevertResponses, SessionRevertErrors, ThrowOnError>({\n    url: '/session/{sessionID}/revert',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options.headers\n    }\n});\n\n/**\n * Restore reverted messages\n *\n * Restore all previously reverted messages in a session.\n */\nexport const sessionUnrevert = <ThrowOnError extends boolean = false>(options: Options<SessionUnrevertData, ThrowOnError>) => (options.client ?? client).post<SessionUnrevertResponses, SessionUnrevertErrors, ThrowOnError>({ url: '/session/{sessionID}/unrevert', ...options });\n\n/**\n * Respond to permission\n *\n * Approve or deny a permission request from the AI assistant.\n *\n * @deprecated\n */\nexport const permissionRespond = <ThrowOnError extends boolean = false>(options: Options<PermissionRespondData, ThrowOnError>) => (options.client ?? client).post<PermissionRespondResponses, PermissionRespondErrors, ThrowOnError>({\n    url: '/session/{sessionID}/permissions/{permissionID}',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options.headers\n    }\n});\n\n/**\n * Respond to permission request\n *\n * Approve or deny a permission request from the AI assistant.\n */\nexport const permissionReply = <ThrowOnError extends boolean = false>(options: Options<PermissionReplyData, ThrowOnError>) => (options.client ?? client).post<PermissionReplyResponses, PermissionReplyErrors, ThrowOnError>({\n    url: '/permission/{requestID}/reply',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options.headers\n    }\n});\n\n/**\n * List pending permissions\n *\n * Get all pending permission requests across all sessions.\n */\nexport const permissionList = <ThrowOnError extends boolean = false>(options?: Options<PermissionListData, ThrowOnError>) => (options?.client ?? client).get<PermissionListResponses, unknown, ThrowOnError>({ url: '/permission', ...options });\n\n/**\n * List commands\n *\n * Get a list of all available commands in the OpenCode system.\n */\nexport const commandList = <ThrowOnError extends boolean = false>(options?: Options<CommandListData, ThrowOnError>) => (options?.client ?? client).get<CommandListResponses, unknown, ThrowOnError>({ url: '/command', ...options });\n\n/**\n * List config providers\n *\n * Get a list of all configured AI providers and their default models.\n */\nexport const configProviders = <ThrowOnError extends boolean = false>(options?: Options<ConfigProvidersData, ThrowOnError>) => (options?.client ?? client).get<ConfigProvidersResponses, unknown, ThrowOnError>({ url: '/config/providers', ...options });\n\n/**\n * List providers\n *\n * Get a list of all available AI providers, including both available and connected ones.\n */\nexport const providerList = <ThrowOnError extends boolean = false>(options?: Options<ProviderListData, ThrowOnError>) => (options?.client ?? client).get<ProviderListResponses, unknown, ThrowOnError>({ url: '/provider', ...options });\n\n/**\n * Get provider auth methods\n *\n * Retrieve available authentication methods for all AI providers.\n */\nexport const providerAuth = <ThrowOnError extends boolean = false>(options?: Options<ProviderAuthData, ThrowOnError>) => (options?.client ?? client).get<ProviderAuthResponses, unknown, ThrowOnError>({ url: '/provider/auth', ...options });\n\n/**\n * OAuth authorize\n *\n * Initiate OAuth authorization for a specific AI provider to get an authorization URL.\n */\nexport const providerOauthAuthorize = <ThrowOnError extends boolean = false>(options: Options<ProviderOauthAuthorizeData, ThrowOnError>) => (options.client ?? client).post<ProviderOauthAuthorizeResponses, ProviderOauthAuthorizeErrors, ThrowOnError>({\n    url: '/provider/{providerID}/oauth/authorize',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options.headers\n    }\n});\n\n/**\n * OAuth callback\n *\n * Handle the OAuth callback from a provider after user authorization.\n */\nexport const providerOauthCallback = <ThrowOnError extends boolean = false>(options: Options<ProviderOauthCallbackData, ThrowOnError>) => (options.client ?? client).post<ProviderOauthCallbackResponses, ProviderOauthCallbackErrors, ThrowOnError>({\n    url: '/provider/{providerID}/oauth/callback',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options.headers\n    }\n});\n\n/**\n * Find text\n *\n * Search for text patterns across files in the project using ripgrep.\n */\nexport const findText = <ThrowOnError extends boolean = false>(options: Options<FindTextData, ThrowOnError>) => (options.client ?? client).get<FindTextResponses, unknown, ThrowOnError>({ url: '/find', ...options });\n\n/**\n * Find files\n *\n * Search for files or directories by name or pattern in the project directory.\n */\nexport const findFiles = <ThrowOnError extends boolean = false>(options: Options<FindFilesData, ThrowOnError>) => (options.client ?? client).get<FindFilesResponses, unknown, ThrowOnError>({ url: '/find/file', ...options });\n\n/**\n * Find symbols\n *\n * Search for workspace symbols like functions, classes, and variables using LSP.\n */\nexport const findSymbols = <ThrowOnError extends boolean = false>(options: Options<FindSymbolsData, ThrowOnError>) => (options.client ?? client).get<FindSymbolsResponses, unknown, ThrowOnError>({ url: '/find/symbol', ...options });\n\n/**\n * List files\n *\n * List files and directories in a specified path.\n */\nexport const fileList = <ThrowOnError extends boolean = false>(options: Options<FileListData, ThrowOnError>) => (options.client ?? client).get<FileListResponses, unknown, ThrowOnError>({ url: '/file', ...options });\n\n/**\n * Read file\n *\n * Read the content of a specified file.\n */\nexport const fileRead = <ThrowOnError extends boolean = false>(options: Options<FileReadData, ThrowOnError>) => (options.client ?? client).get<FileReadResponses, unknown, ThrowOnError>({ url: '/file/content', ...options });\n\n/**\n * Get file status\n *\n * Get the git status of all files in the project.\n */\nexport const fileStatus = <ThrowOnError extends boolean = false>(options?: Options<FileStatusData, ThrowOnError>) => (options?.client ?? client).get<FileStatusResponses, unknown, ThrowOnError>({ url: '/file/status', ...options });\n\n/**\n * Write log\n *\n * Write a log entry to the server logs with specified level and metadata.\n */\nexport const appLog = <ThrowOnError extends boolean = false>(options?: Options<AppLogData, ThrowOnError>) => (options?.client ?? client).post<AppLogResponses, AppLogErrors, ThrowOnError>({\n    url: '/log',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options?.headers\n    }\n});\n\n/**\n * List agents\n *\n * Get a list of all available AI agents in the OpenCode system.\n */\nexport const appAgents = <ThrowOnError extends boolean = false>(options?: Options<AppAgentsData, ThrowOnError>) => (options?.client ?? client).get<AppAgentsResponses, unknown, ThrowOnError>({ url: '/agent', ...options });\n\n/**\n * Get MCP status\n *\n * Get the status of all Model Context Protocol (MCP) servers.\n */\nexport const mcpStatus = <ThrowOnError extends boolean = false>(options?: Options<McpStatusData, ThrowOnError>) => (options?.client ?? client).get<McpStatusResponses, unknown, ThrowOnError>({ url: '/mcp', ...options });\n\n/**\n * Add MCP server\n *\n * Dynamically add a new Model Context Protocol (MCP) server to the system.\n */\nexport const mcpAdd = <ThrowOnError extends boolean = false>(options?: Options<McpAddData, ThrowOnError>) => (options?.client ?? client).post<McpAddResponses, McpAddErrors, ThrowOnError>({\n    url: '/mcp',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options?.headers\n    }\n});\n\n/**\n * Remove MCP OAuth\n *\n * Remove OAuth credentials for an MCP server\n */\nexport const mcpAuthRemove = <ThrowOnError extends boolean = false>(options: Options<McpAuthRemoveData, ThrowOnError>) => (options.client ?? client).delete<McpAuthRemoveResponses, McpAuthRemoveErrors, ThrowOnError>({ url: '/mcp/{name}/auth', ...options });\n\n/**\n * Start MCP OAuth\n *\n * Start OAuth authentication flow for a Model Context Protocol (MCP) server.\n */\nexport const mcpAuthStart = <ThrowOnError extends boolean = false>(options: Options<McpAuthStartData, ThrowOnError>) => (options.client ?? client).post<McpAuthStartResponses, McpAuthStartErrors, ThrowOnError>({ url: '/mcp/{name}/auth', ...options });\n\n/**\n * Complete MCP OAuth\n *\n * Complete OAuth authentication for a Model Context Protocol (MCP) server using the authorization code.\n */\nexport const mcpAuthCallback = <ThrowOnError extends boolean = false>(options: Options<McpAuthCallbackData, ThrowOnError>) => (options.client ?? client).post<McpAuthCallbackResponses, McpAuthCallbackErrors, ThrowOnError>({\n    url: '/mcp/{name}/auth/callback',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options.headers\n    }\n});\n\n/**\n * Authenticate MCP OAuth\n *\n * Start OAuth flow and wait for callback (opens browser)\n */\nexport const mcpAuthAuthenticate = <ThrowOnError extends boolean = false>(options: Options<McpAuthAuthenticateData, ThrowOnError>) => (options.client ?? client).post<McpAuthAuthenticateResponses, McpAuthAuthenticateErrors, ThrowOnError>({ url: '/mcp/{name}/auth/authenticate', ...options });\n\n/**\n * Connect an MCP server\n */\nexport const mcpConnect = <ThrowOnError extends boolean = false>(options: Options<McpConnectData, ThrowOnError>) => (options.client ?? client).post<McpConnectResponses, unknown, ThrowOnError>({ url: '/mcp/{name}/connect', ...options });\n\n/**\n * Disconnect an MCP server\n */\nexport const mcpDisconnect = <ThrowOnError extends boolean = false>(options: Options<McpDisconnectData, ThrowOnError>) => (options.client ?? client).post<McpDisconnectResponses, unknown, ThrowOnError>({ url: '/mcp/{name}/disconnect', ...options });\n\n/**\n * Get LSP status\n *\n * Get LSP server status\n */\nexport const lspStatus = <ThrowOnError extends boolean = false>(options?: Options<LspStatusData, ThrowOnError>) => (options?.client ?? client).get<LspStatusResponses, unknown, ThrowOnError>({ url: '/lsp', ...options });\n\n/**\n * Get formatter status\n *\n * Get formatter status\n */\nexport const formatterStatus = <ThrowOnError extends boolean = false>(options?: Options<FormatterStatusData, ThrowOnError>) => (options?.client ?? client).get<FormatterStatusResponses, unknown, ThrowOnError>({ url: '/formatter', ...options });\n\n/**\n * Append TUI prompt\n *\n * Append prompt to the TUI\n */\nexport const tuiAppendPrompt = <ThrowOnError extends boolean = false>(options?: Options<TuiAppendPromptData, ThrowOnError>) => (options?.client ?? client).post<TuiAppendPromptResponses, TuiAppendPromptErrors, ThrowOnError>({\n    url: '/tui/append-prompt',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options?.headers\n    }\n});\n\n/**\n * Open help dialog\n *\n * Open the help dialog in the TUI to display user assistance information.\n */\nexport const tuiOpenHelp = <ThrowOnError extends boolean = false>(options?: Options<TuiOpenHelpData, ThrowOnError>) => (options?.client ?? client).post<TuiOpenHelpResponses, unknown, ThrowOnError>({ url: '/tui/open-help', ...options });\n\n/**\n * Open sessions dialog\n *\n * Open the session dialog\n */\nexport const tuiOpenSessions = <ThrowOnError extends boolean = false>(options?: Options<TuiOpenSessionsData, ThrowOnError>) => (options?.client ?? client).post<TuiOpenSessionsResponses, unknown, ThrowOnError>({ url: '/tui/open-sessions', ...options });\n\n/**\n * Open themes dialog\n *\n * Open the theme dialog\n */\nexport const tuiOpenThemes = <ThrowOnError extends boolean = false>(options?: Options<TuiOpenThemesData, ThrowOnError>) => (options?.client ?? client).post<TuiOpenThemesResponses, unknown, ThrowOnError>({ url: '/tui/open-themes', ...options });\n\n/**\n * Open models dialog\n *\n * Open the model dialog\n */\nexport const tuiOpenModels = <ThrowOnError extends boolean = false>(options?: Options<TuiOpenModelsData, ThrowOnError>) => (options?.client ?? client).post<TuiOpenModelsResponses, unknown, ThrowOnError>({ url: '/tui/open-models', ...options });\n\n/**\n * Submit TUI prompt\n *\n * Submit the prompt\n */\nexport const tuiSubmitPrompt = <ThrowOnError extends boolean = false>(options?: Options<TuiSubmitPromptData, ThrowOnError>) => (options?.client ?? client).post<TuiSubmitPromptResponses, unknown, ThrowOnError>({ url: '/tui/submit-prompt', ...options });\n\n/**\n * Clear TUI prompt\n *\n * Clear the prompt\n */\nexport const tuiClearPrompt = <ThrowOnError extends boolean = false>(options?: Options<TuiClearPromptData, ThrowOnError>) => (options?.client ?? client).post<TuiClearPromptResponses, unknown, ThrowOnError>({ url: '/tui/clear-prompt', ...options });\n\n/**\n * Execute TUI command\n *\n * Execute a TUI command (e.g. agent_cycle)\n */\nexport const tuiExecuteCommand = <ThrowOnError extends boolean = false>(options?: Options<TuiExecuteCommandData, ThrowOnError>) => (options?.client ?? client).post<TuiExecuteCommandResponses, TuiExecuteCommandErrors, ThrowOnError>({\n    url: '/tui/execute-command',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options?.headers\n    }\n});\n\n/**\n * Show TUI toast\n *\n * Show a toast notification in the TUI\n */\nexport const tuiShowToast = <ThrowOnError extends boolean = false>(options?: Options<TuiShowToastData, ThrowOnError>) => (options?.client ?? client).post<TuiShowToastResponses, unknown, ThrowOnError>({\n    url: '/tui/show-toast',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options?.headers\n    }\n});\n\n/**\n * Publish TUI event\n *\n * Publish a TUI event\n */\nexport const tuiPublish = <ThrowOnError extends boolean = false>(options?: Options<TuiPublishData, ThrowOnError>) => (options?.client ?? client).post<TuiPublishResponses, TuiPublishErrors, ThrowOnError>({\n    url: '/tui/publish',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options?.headers\n    }\n});\n\n/**\n * Get next TUI request\n *\n * Retrieve the next TUI (Terminal User Interface) request from the queue for processing.\n */\nexport const tuiControlNext = <ThrowOnError extends boolean = false>(options?: Options<TuiControlNextData, ThrowOnError>) => (options?.client ?? client).get<TuiControlNextResponses, unknown, ThrowOnError>({ url: '/tui/control/next', ...options });\n\n/**\n * Submit TUI response\n *\n * Submit a response to the TUI request queue to complete a pending request.\n */\nexport const tuiControlResponse = <ThrowOnError extends boolean = false>(options?: Options<TuiControlResponseData, ThrowOnError>) => (options?.client ?? client).post<TuiControlResponseResponses, unknown, ThrowOnError>({\n    url: '/tui/control/response',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options?.headers\n    }\n});\n\n/**\n * Set auth credentials\n *\n * Set authentication credentials\n */\nexport const authSet = <ThrowOnError extends boolean = false>(options: Options<AuthSetData, ThrowOnError>) => (options.client ?? client).put<AuthSetResponses, AuthSetErrors, ThrowOnError>({\n    url: '/auth/{providerID}',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options.headers\n    }\n});\n\n/**\n * Subscribe to events\n *\n * Get events\n */\nexport const eventSubscribe = <ThrowOnError extends boolean = false>(options?: Options<EventSubscribeData, ThrowOnError>) => (options?.client ?? client).sse.get<EventSubscribeResponses, unknown, ThrowOnError>({ url: '/event', ...options });\n"
  },
  {
    "path": "packages/openapi-ts-tests/sdks/__snapshots__/opencode/grouped/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type ClientOptions = {\n    baseUrl: `${string}://${string}` | (string & {});\n};\n\nexport type EventInstallationUpdated = {\n    type: 'installation.updated';\n    properties: {\n        version: string;\n    };\n};\n\nexport type EventInstallationUpdateAvailable = {\n    type: 'installation.update-available';\n    properties: {\n        version: string;\n    };\n};\n\nexport type Project = {\n    id: string;\n    worktree: string;\n    vcs?: 'git';\n    name?: string;\n    icon?: {\n        url?: string;\n        color?: string;\n    };\n    time: {\n        created: number;\n        updated: number;\n        initialized?: number;\n    };\n};\n\nexport type EventProjectUpdated = {\n    type: 'project.updated';\n    properties: Project;\n};\n\nexport type EventServerInstanceDisposed = {\n    type: 'server.instance.disposed';\n    properties: {\n        directory: string;\n    };\n};\n\nexport type EventLspClientDiagnostics = {\n    type: 'lsp.client.diagnostics';\n    properties: {\n        serverID: string;\n        path: string;\n    };\n};\n\nexport type EventLspUpdated = {\n    type: 'lsp.updated';\n    properties: {\n        [key: string]: unknown;\n    };\n};\n\nexport type FileDiff = {\n    file: string;\n    before: string;\n    after: string;\n    additions: number;\n    deletions: number;\n};\n\nexport type UserMessage = {\n    id: string;\n    sessionID: string;\n    role: 'user';\n    time: {\n        created: number;\n    };\n    summary?: {\n        title?: string;\n        body?: string;\n        diffs: Array<FileDiff>;\n    };\n    agent: string;\n    model: {\n        providerID: string;\n        modelID: string;\n    };\n    system?: string;\n    tools?: {\n        [key: string]: boolean;\n    };\n    variant?: string;\n};\n\nexport type ProviderAuthError = {\n    name: 'ProviderAuthError';\n    data: {\n        providerID: string;\n        message: string;\n    };\n};\n\nexport type UnknownError = {\n    name: 'UnknownError';\n    data: {\n        message: string;\n    };\n};\n\nexport type MessageOutputLengthError = {\n    name: 'MessageOutputLengthError';\n    data: {\n        [key: string]: unknown;\n    };\n};\n\nexport type MessageAbortedError = {\n    name: 'MessageAbortedError';\n    data: {\n        message: string;\n    };\n};\n\nexport type ApiError = {\n    name: 'APIError';\n    data: {\n        message: string;\n        statusCode?: number;\n        isRetryable: boolean;\n        responseHeaders?: {\n            [key: string]: string;\n        };\n        responseBody?: string;\n        metadata?: {\n            [key: string]: string;\n        };\n    };\n};\n\nexport type AssistantMessage = {\n    id: string;\n    sessionID: string;\n    role: 'assistant';\n    time: {\n        created: number;\n        completed?: number;\n    };\n    error?: ProviderAuthError | UnknownError | MessageOutputLengthError | MessageAbortedError | ApiError;\n    parentID: string;\n    modelID: string;\n    providerID: string;\n    mode: string;\n    agent: string;\n    path: {\n        cwd: string;\n        root: string;\n    };\n    summary?: boolean;\n    cost: number;\n    tokens: {\n        input: number;\n        output: number;\n        reasoning: number;\n        cache: {\n            read: number;\n            write: number;\n        };\n    };\n    finish?: string;\n};\n\nexport type Message = UserMessage | AssistantMessage;\n\nexport type EventMessageUpdated = {\n    type: 'message.updated';\n    properties: {\n        info: Message;\n    };\n};\n\nexport type EventMessageRemoved = {\n    type: 'message.removed';\n    properties: {\n        sessionID: string;\n        messageID: string;\n    };\n};\n\nexport type TextPart = {\n    id: string;\n    sessionID: string;\n    messageID: string;\n    type: 'text';\n    text: string;\n    synthetic?: boolean;\n    ignored?: boolean;\n    time?: {\n        start: number;\n        end?: number;\n    };\n    metadata?: {\n        [key: string]: unknown;\n    };\n};\n\nexport type ReasoningPart = {\n    id: string;\n    sessionID: string;\n    messageID: string;\n    type: 'reasoning';\n    text: string;\n    metadata?: {\n        [key: string]: unknown;\n    };\n    time: {\n        start: number;\n        end?: number;\n    };\n};\n\nexport type FilePartSourceText = {\n    value: string;\n    start: number;\n    end: number;\n};\n\nexport type FileSource = {\n    text: FilePartSourceText;\n    type: 'file';\n    path: string;\n};\n\nexport type Range = {\n    start: {\n        line: number;\n        character: number;\n    };\n    end: {\n        line: number;\n        character: number;\n    };\n};\n\nexport type SymbolSource = {\n    text: FilePartSourceText;\n    type: 'symbol';\n    path: string;\n    range: Range;\n    name: string;\n    kind: number;\n};\n\nexport type FilePartSource = FileSource | SymbolSource;\n\nexport type FilePart = {\n    id: string;\n    sessionID: string;\n    messageID: string;\n    type: 'file';\n    mime: string;\n    filename?: string;\n    url: string;\n    source?: FilePartSource;\n};\n\nexport type ToolStatePending = {\n    status: 'pending';\n    input: {\n        [key: string]: unknown;\n    };\n    raw: string;\n};\n\nexport type ToolStateRunning = {\n    status: 'running';\n    input: {\n        [key: string]: unknown;\n    };\n    title?: string;\n    metadata?: {\n        [key: string]: unknown;\n    };\n    time: {\n        start: number;\n    };\n};\n\nexport type ToolStateCompleted = {\n    status: 'completed';\n    input: {\n        [key: string]: unknown;\n    };\n    output: string;\n    title: string;\n    metadata: {\n        [key: string]: unknown;\n    };\n    time: {\n        start: number;\n        end: number;\n        compacted?: number;\n    };\n    attachments?: Array<FilePart>;\n};\n\nexport type ToolStateError = {\n    status: 'error';\n    input: {\n        [key: string]: unknown;\n    };\n    error: string;\n    metadata?: {\n        [key: string]: unknown;\n    };\n    time: {\n        start: number;\n        end: number;\n    };\n};\n\nexport type ToolState = ToolStatePending | ToolStateRunning | ToolStateCompleted | ToolStateError;\n\nexport type ToolPart = {\n    id: string;\n    sessionID: string;\n    messageID: string;\n    type: 'tool';\n    callID: string;\n    tool: string;\n    state: ToolState;\n    metadata?: {\n        [key: string]: unknown;\n    };\n};\n\nexport type StepStartPart = {\n    id: string;\n    sessionID: string;\n    messageID: string;\n    type: 'step-start';\n    snapshot?: string;\n};\n\nexport type StepFinishPart = {\n    id: string;\n    sessionID: string;\n    messageID: string;\n    type: 'step-finish';\n    reason: string;\n    snapshot?: string;\n    cost: number;\n    tokens: {\n        input: number;\n        output: number;\n        reasoning: number;\n        cache: {\n            read: number;\n            write: number;\n        };\n    };\n};\n\nexport type SnapshotPart = {\n    id: string;\n    sessionID: string;\n    messageID: string;\n    type: 'snapshot';\n    snapshot: string;\n};\n\nexport type PatchPart = {\n    id: string;\n    sessionID: string;\n    messageID: string;\n    type: 'patch';\n    hash: string;\n    files: Array<string>;\n};\n\nexport type AgentPart = {\n    id: string;\n    sessionID: string;\n    messageID: string;\n    type: 'agent';\n    name: string;\n    source?: {\n        value: string;\n        start: number;\n        end: number;\n    };\n};\n\nexport type RetryPart = {\n    id: string;\n    sessionID: string;\n    messageID: string;\n    type: 'retry';\n    attempt: number;\n    error: ApiError;\n    time: {\n        created: number;\n    };\n};\n\nexport type CompactionPart = {\n    id: string;\n    sessionID: string;\n    messageID: string;\n    type: 'compaction';\n    auto: boolean;\n};\n\nexport type Part = TextPart | {\n    id: string;\n    sessionID: string;\n    messageID: string;\n    type: 'subtask';\n    prompt: string;\n    description: string;\n    agent: string;\n    command?: string;\n} | ReasoningPart | FilePart | ToolPart | StepStartPart | StepFinishPart | SnapshotPart | PatchPart | AgentPart | RetryPart | CompactionPart;\n\nexport type EventMessagePartUpdated = {\n    type: 'message.part.updated';\n    properties: {\n        part: Part;\n        delta?: string;\n    };\n};\n\nexport type EventMessagePartRemoved = {\n    type: 'message.part.removed';\n    properties: {\n        sessionID: string;\n        messageID: string;\n        partID: string;\n    };\n};\n\nexport type PermissionRequest = {\n    id: string;\n    sessionID: string;\n    permission: string;\n    patterns: Array<string>;\n    metadata: {\n        [key: string]: unknown;\n    };\n    always: Array<string>;\n    tool?: {\n        messageID: string;\n        callID: string;\n    };\n};\n\nexport type EventPermissionAsked = {\n    type: 'permission.asked';\n    properties: PermissionRequest;\n};\n\nexport type EventPermissionReplied = {\n    type: 'permission.replied';\n    properties: {\n        sessionID: string;\n        requestID: string;\n        reply: 'once' | 'always' | 'reject';\n    };\n};\n\nexport type SessionStatus = {\n    type: 'idle';\n} | {\n    type: 'retry';\n    attempt: number;\n    message: string;\n    next: number;\n} | {\n    type: 'busy';\n};\n\nexport type EventSessionStatus = {\n    type: 'session.status';\n    properties: {\n        sessionID: string;\n        status: SessionStatus;\n    };\n};\n\nexport type EventSessionIdle = {\n    type: 'session.idle';\n    properties: {\n        sessionID: string;\n    };\n};\n\nexport type EventSessionCompacted = {\n    type: 'session.compacted';\n    properties: {\n        sessionID: string;\n    };\n};\n\nexport type EventFileEdited = {\n    type: 'file.edited';\n    properties: {\n        file: string;\n    };\n};\n\nexport type Todo = {\n    /**\n     * Brief description of the task\n     */\n    content: string;\n    /**\n     * Current status of the task: pending, in_progress, completed, cancelled\n     */\n    status: string;\n    /**\n     * Priority level of the task: high, medium, low\n     */\n    priority: string;\n    /**\n     * Unique identifier for the todo item\n     */\n    id: string;\n};\n\nexport type EventTodoUpdated = {\n    type: 'todo.updated';\n    properties: {\n        sessionID: string;\n        todos: Array<Todo>;\n    };\n};\n\nexport type EventTuiPromptAppend = {\n    type: 'tui.prompt.append';\n    properties: {\n        text: string;\n    };\n};\n\nexport type EventTuiCommandExecute = {\n    type: 'tui.command.execute';\n    properties: {\n        command: 'session.list' | 'session.new' | 'session.share' | 'session.interrupt' | 'session.compact' | 'session.page.up' | 'session.page.down' | 'session.half.page.up' | 'session.half.page.down' | 'session.first' | 'session.last' | 'prompt.clear' | 'prompt.submit' | 'agent.cycle' | string;\n    };\n};\n\nexport type EventTuiToastShow = {\n    type: 'tui.toast.show';\n    properties: {\n        title?: string;\n        message: string;\n        variant: 'info' | 'success' | 'warning' | 'error';\n        /**\n         * Duration in milliseconds\n         */\n        duration?: number;\n    };\n};\n\nexport type EventMcpToolsChanged = {\n    type: 'mcp.tools.changed';\n    properties: {\n        server: string;\n    };\n};\n\nexport type EventCommandExecuted = {\n    type: 'command.executed';\n    properties: {\n        name: string;\n        sessionID: string;\n        arguments: string;\n        messageID: string;\n    };\n};\n\nexport type PermissionAction = 'allow' | 'deny' | 'ask';\n\nexport type PermissionRule = {\n    permission: string;\n    pattern: string;\n    action: PermissionAction;\n};\n\nexport type PermissionRuleset = Array<PermissionRule>;\n\nexport type Session = {\n    id: string;\n    projectID: string;\n    directory: string;\n    parentID?: string;\n    summary?: {\n        additions: number;\n        deletions: number;\n        files: number;\n        diffs?: Array<FileDiff>;\n    };\n    share?: {\n        url: string;\n    };\n    title: string;\n    version: string;\n    time: {\n        created: number;\n        updated: number;\n        compacting?: number;\n        archived?: number;\n    };\n    permission?: PermissionRuleset;\n    revert?: {\n        messageID: string;\n        partID?: string;\n        snapshot?: string;\n        diff?: string;\n    };\n};\n\nexport type EventSessionCreated = {\n    type: 'session.created';\n    properties: {\n        info: Session;\n    };\n};\n\nexport type EventSessionUpdated = {\n    type: 'session.updated';\n    properties: {\n        info: Session;\n    };\n};\n\nexport type EventSessionDeleted = {\n    type: 'session.deleted';\n    properties: {\n        info: Session;\n    };\n};\n\nexport type EventSessionDiff = {\n    type: 'session.diff';\n    properties: {\n        sessionID: string;\n        diff: Array<FileDiff>;\n    };\n};\n\nexport type EventSessionError = {\n    type: 'session.error';\n    properties: {\n        sessionID?: string;\n        error?: ProviderAuthError | UnknownError | MessageOutputLengthError | MessageAbortedError | ApiError;\n    };\n};\n\nexport type EventFileWatcherUpdated = {\n    type: 'file.watcher.updated';\n    properties: {\n        file: string;\n        event: 'add' | 'change' | 'unlink';\n    };\n};\n\nexport type EventVcsBranchUpdated = {\n    type: 'vcs.branch.updated';\n    properties: {\n        branch?: string;\n    };\n};\n\nexport type Pty = {\n    id: string;\n    title: string;\n    command: string;\n    args: Array<string>;\n    cwd: string;\n    status: 'running' | 'exited';\n    pid: number;\n};\n\nexport type EventPtyCreated = {\n    type: 'pty.created';\n    properties: {\n        info: Pty;\n    };\n};\n\nexport type EventPtyUpdated = {\n    type: 'pty.updated';\n    properties: {\n        info: Pty;\n    };\n};\n\nexport type EventPtyExited = {\n    type: 'pty.exited';\n    properties: {\n        id: string;\n        exitCode: number;\n    };\n};\n\nexport type EventPtyDeleted = {\n    type: 'pty.deleted';\n    properties: {\n        id: string;\n    };\n};\n\nexport type EventServerConnected = {\n    type: 'server.connected';\n    properties: {\n        [key: string]: unknown;\n    };\n};\n\nexport type EventGlobalDisposed = {\n    type: 'global.disposed';\n    properties: {\n        [key: string]: unknown;\n    };\n};\n\nexport type Event = EventInstallationUpdated | EventInstallationUpdateAvailable | EventProjectUpdated | EventServerInstanceDisposed | EventLspClientDiagnostics | EventLspUpdated | EventMessageUpdated | EventMessageRemoved | EventMessagePartUpdated | EventMessagePartRemoved | EventPermissionAsked | EventPermissionReplied | EventSessionStatus | EventSessionIdle | EventSessionCompacted | EventFileEdited | EventTodoUpdated | EventTuiPromptAppend | EventTuiCommandExecute | EventTuiToastShow | EventMcpToolsChanged | EventCommandExecuted | EventSessionCreated | EventSessionUpdated | EventSessionDeleted | EventSessionDiff | EventSessionError | EventFileWatcherUpdated | EventVcsBranchUpdated | EventPtyCreated | EventPtyUpdated | EventPtyExited | EventPtyDeleted | EventServerConnected | EventGlobalDisposed;\n\nexport type GlobalEvent = {\n    directory: string;\n    payload: Event;\n};\n\nexport type BadRequestError = {\n    data: unknown;\n    errors: Array<{\n        [key: string]: unknown;\n    }>;\n    success: false;\n};\n\nexport type NotFoundError = {\n    name: 'NotFoundError';\n    data: {\n        message: string;\n    };\n};\n\n/**\n * Custom keybind configurations\n */\nexport type KeybindsConfig = {\n    /**\n     * Leader key for keybind combinations\n     */\n    leader?: string;\n    /**\n     * Exit the application\n     */\n    app_exit?: string;\n    /**\n     * Open external editor\n     */\n    editor_open?: string;\n    /**\n     * List available themes\n     */\n    theme_list?: string;\n    /**\n     * Toggle sidebar\n     */\n    sidebar_toggle?: string;\n    /**\n     * Toggle session scrollbar\n     */\n    scrollbar_toggle?: string;\n    /**\n     * Toggle username visibility\n     */\n    username_toggle?: string;\n    /**\n     * View status\n     */\n    status_view?: string;\n    /**\n     * Export session to editor\n     */\n    session_export?: string;\n    /**\n     * Create a new session\n     */\n    session_new?: string;\n    /**\n     * List all sessions\n     */\n    session_list?: string;\n    /**\n     * Show session timeline\n     */\n    session_timeline?: string;\n    /**\n     * Fork session from message\n     */\n    session_fork?: string;\n    /**\n     * Rename session\n     */\n    session_rename?: string;\n    /**\n     * Share current session\n     */\n    session_share?: string;\n    /**\n     * Unshare current session\n     */\n    session_unshare?: string;\n    /**\n     * Interrupt current session\n     */\n    session_interrupt?: string;\n    /**\n     * Compact the session\n     */\n    session_compact?: string;\n    /**\n     * Scroll messages up by one page\n     */\n    messages_page_up?: string;\n    /**\n     * Scroll messages down by one page\n     */\n    messages_page_down?: string;\n    /**\n     * Scroll messages up by half page\n     */\n    messages_half_page_up?: string;\n    /**\n     * Scroll messages down by half page\n     */\n    messages_half_page_down?: string;\n    /**\n     * Navigate to first message\n     */\n    messages_first?: string;\n    /**\n     * Navigate to last message\n     */\n    messages_last?: string;\n    /**\n     * Navigate to next message\n     */\n    messages_next?: string;\n    /**\n     * Navigate to previous message\n     */\n    messages_previous?: string;\n    /**\n     * Navigate to last user message\n     */\n    messages_last_user?: string;\n    /**\n     * Copy message\n     */\n    messages_copy?: string;\n    /**\n     * Undo message\n     */\n    messages_undo?: string;\n    /**\n     * Redo message\n     */\n    messages_redo?: string;\n    /**\n     * Toggle code block concealment in messages\n     */\n    messages_toggle_conceal?: string;\n    /**\n     * Toggle tool details visibility\n     */\n    tool_details?: string;\n    /**\n     * List available models\n     */\n    model_list?: string;\n    /**\n     * Next recently used model\n     */\n    model_cycle_recent?: string;\n    /**\n     * Previous recently used model\n     */\n    model_cycle_recent_reverse?: string;\n    /**\n     * Next favorite model\n     */\n    model_cycle_favorite?: string;\n    /**\n     * Previous favorite model\n     */\n    model_cycle_favorite_reverse?: string;\n    /**\n     * List available commands\n     */\n    command_list?: string;\n    /**\n     * List agents\n     */\n    agent_list?: string;\n    /**\n     * Next agent\n     */\n    agent_cycle?: string;\n    /**\n     * Previous agent\n     */\n    agent_cycle_reverse?: string;\n    /**\n     * Cycle model variants\n     */\n    variant_cycle?: string;\n    /**\n     * Clear input field\n     */\n    input_clear?: string;\n    /**\n     * Paste from clipboard\n     */\n    input_paste?: string;\n    /**\n     * Submit input\n     */\n    input_submit?: string;\n    /**\n     * Insert newline in input\n     */\n    input_newline?: string;\n    /**\n     * Move cursor left in input\n     */\n    input_move_left?: string;\n    /**\n     * Move cursor right in input\n     */\n    input_move_right?: string;\n    /**\n     * Move cursor up in input\n     */\n    input_move_up?: string;\n    /**\n     * Move cursor down in input\n     */\n    input_move_down?: string;\n    /**\n     * Select left in input\n     */\n    input_select_left?: string;\n    /**\n     * Select right in input\n     */\n    input_select_right?: string;\n    /**\n     * Select up in input\n     */\n    input_select_up?: string;\n    /**\n     * Select down in input\n     */\n    input_select_down?: string;\n    /**\n     * Move to start of line in input\n     */\n    input_line_home?: string;\n    /**\n     * Move to end of line in input\n     */\n    input_line_end?: string;\n    /**\n     * Select to start of line in input\n     */\n    input_select_line_home?: string;\n    /**\n     * Select to end of line in input\n     */\n    input_select_line_end?: string;\n    /**\n     * Move to start of visual line in input\n     */\n    input_visual_line_home?: string;\n    /**\n     * Move to end of visual line in input\n     */\n    input_visual_line_end?: string;\n    /**\n     * Select to start of visual line in input\n     */\n    input_select_visual_line_home?: string;\n    /**\n     * Select to end of visual line in input\n     */\n    input_select_visual_line_end?: string;\n    /**\n     * Move to start of buffer in input\n     */\n    input_buffer_home?: string;\n    /**\n     * Move to end of buffer in input\n     */\n    input_buffer_end?: string;\n    /**\n     * Select to start of buffer in input\n     */\n    input_select_buffer_home?: string;\n    /**\n     * Select to end of buffer in input\n     */\n    input_select_buffer_end?: string;\n    /**\n     * Delete line in input\n     */\n    input_delete_line?: string;\n    /**\n     * Delete to end of line in input\n     */\n    input_delete_to_line_end?: string;\n    /**\n     * Delete to start of line in input\n     */\n    input_delete_to_line_start?: string;\n    /**\n     * Backspace in input\n     */\n    input_backspace?: string;\n    /**\n     * Delete character in input\n     */\n    input_delete?: string;\n    /**\n     * Undo in input\n     */\n    input_undo?: string;\n    /**\n     * Redo in input\n     */\n    input_redo?: string;\n    /**\n     * Move word forward in input\n     */\n    input_word_forward?: string;\n    /**\n     * Move word backward in input\n     */\n    input_word_backward?: string;\n    /**\n     * Select word forward in input\n     */\n    input_select_word_forward?: string;\n    /**\n     * Select word backward in input\n     */\n    input_select_word_backward?: string;\n    /**\n     * Delete word forward in input\n     */\n    input_delete_word_forward?: string;\n    /**\n     * Delete word backward in input\n     */\n    input_delete_word_backward?: string;\n    /**\n     * Previous history item\n     */\n    history_previous?: string;\n    /**\n     * Next history item\n     */\n    history_next?: string;\n    /**\n     * Next child session\n     */\n    session_child_cycle?: string;\n    /**\n     * Previous child session\n     */\n    session_child_cycle_reverse?: string;\n    /**\n     * Go to parent session\n     */\n    session_parent?: string;\n    /**\n     * Suspend terminal\n     */\n    terminal_suspend?: string;\n    /**\n     * Toggle terminal title\n     */\n    terminal_title_toggle?: string;\n    /**\n     * Toggle tips on home screen\n     */\n    tips_toggle?: string;\n};\n\n/**\n * Log level\n */\nexport type LogLevel = 'DEBUG' | 'INFO' | 'WARN' | 'ERROR';\n\n/**\n * Server configuration for opencode serve and web commands\n */\nexport type ServerConfig = {\n    /**\n     * Port to listen on\n     */\n    port?: number;\n    /**\n     * Hostname to listen on\n     */\n    hostname?: string;\n    /**\n     * Enable mDNS service discovery\n     */\n    mdns?: boolean;\n    /**\n     * Additional domains to allow for CORS\n     */\n    cors?: Array<string>;\n};\n\nexport type PermissionActionConfig = 'ask' | 'allow' | 'deny';\n\nexport type PermissionObjectConfig = {\n    [key: string]: PermissionActionConfig;\n};\n\nexport type PermissionRuleConfig = PermissionActionConfig | PermissionObjectConfig;\n\nexport type PermissionConfig = {\n    read?: PermissionRuleConfig;\n    edit?: PermissionRuleConfig;\n    glob?: PermissionRuleConfig;\n    grep?: PermissionRuleConfig;\n    list?: PermissionRuleConfig;\n    bash?: PermissionRuleConfig;\n    task?: PermissionRuleConfig;\n    external_directory?: PermissionRuleConfig;\n    todowrite?: PermissionActionConfig;\n    todoread?: PermissionActionConfig;\n    webfetch?: PermissionActionConfig;\n    websearch?: PermissionActionConfig;\n    codesearch?: PermissionActionConfig;\n    lsp?: PermissionRuleConfig;\n    doom_loop?: PermissionActionConfig;\n    [key: string]: PermissionRuleConfig | PermissionActionConfig | undefined;\n} | PermissionActionConfig;\n\nexport type AgentConfig = {\n    model?: string;\n    temperature?: number;\n    top_p?: number;\n    prompt?: string;\n    /**\n     * @deprecated Use 'permission' field instead\n     */\n    tools?: {\n        [key: string]: boolean;\n    };\n    disable?: boolean;\n    /**\n     * Description of when to use the agent\n     */\n    description?: string;\n    mode?: 'subagent' | 'primary' | 'all';\n    options?: {\n        [key: string]: unknown;\n    };\n    /**\n     * Hex color code for the agent (e.g., #FF5733)\n     */\n    color?: string;\n    /**\n     * Maximum number of agentic iterations before forcing text-only response\n     */\n    steps?: number;\n    /**\n     * @deprecated Use 'steps' field instead.\n     */\n    maxSteps?: number;\n    permission?: PermissionConfig;\n    [key: string]: unknown;\n};\n\nexport type ProviderConfig = {\n    api?: string;\n    name?: string;\n    env?: Array<string>;\n    id?: string;\n    npm?: string;\n    models?: {\n        [key: string]: {\n            id?: string;\n            name?: string;\n            family?: string;\n            release_date?: string;\n            attachment?: boolean;\n            reasoning?: boolean;\n            temperature?: boolean;\n            tool_call?: boolean;\n            interleaved?: true | {\n                field: 'reasoning_content' | 'reasoning_details';\n            };\n            cost?: {\n                input: number;\n                output: number;\n                cache_read?: number;\n                cache_write?: number;\n                context_over_200k?: {\n                    input: number;\n                    output: number;\n                    cache_read?: number;\n                    cache_write?: number;\n                };\n            };\n            limit?: {\n                context: number;\n                output: number;\n            };\n            modalities?: {\n                input: Array<'text' | 'audio' | 'image' | 'video' | 'pdf'>;\n                output: Array<'text' | 'audio' | 'image' | 'video' | 'pdf'>;\n            };\n            experimental?: boolean;\n            status?: 'alpha' | 'beta' | 'deprecated';\n            options?: {\n                [key: string]: unknown;\n            };\n            headers?: {\n                [key: string]: string;\n            };\n            provider?: {\n                npm: string;\n            };\n            /**\n             * Variant-specific configuration\n             */\n            variants?: {\n                [key: string]: {\n                    /**\n                     * Disable this variant for the model\n                     */\n                    disabled?: boolean;\n                    [key: string]: unknown;\n                };\n            };\n        };\n    };\n    whitelist?: Array<string>;\n    blacklist?: Array<string>;\n    options?: {\n        apiKey?: string;\n        baseURL?: string;\n        /**\n         * GitHub Enterprise URL for copilot authentication\n         */\n        enterpriseUrl?: string;\n        /**\n         * Enable promptCacheKey for this provider (default false)\n         */\n        setCacheKey?: boolean;\n        /**\n         * Timeout in milliseconds for requests to this provider. Default is 300000 (5 minutes). Set to false to disable timeout.\n         */\n        timeout?: number | false;\n        [key: string]: unknown;\n    };\n};\n\nexport type McpLocalConfig = {\n    /**\n     * Type of MCP server connection\n     */\n    type: 'local';\n    /**\n     * Command and arguments to run the MCP server\n     */\n    command: Array<string>;\n    /**\n     * Environment variables to set when running the MCP server\n     */\n    environment?: {\n        [key: string]: string;\n    };\n    /**\n     * Enable or disable the MCP server on startup\n     */\n    enabled?: boolean;\n    /**\n     * Timeout in ms for fetching tools from the MCP server. Defaults to 5000 (5 seconds) if not specified.\n     */\n    timeout?: number;\n};\n\nexport type McpOAuthConfig = {\n    /**\n     * OAuth client ID. If not provided, dynamic client registration (RFC 7591) will be attempted.\n     */\n    clientId?: string;\n    /**\n     * OAuth client secret (if required by the authorization server)\n     */\n    clientSecret?: string;\n    /**\n     * OAuth scopes to request during authorization\n     */\n    scope?: string;\n};\n\nexport type McpRemoteConfig = {\n    /**\n     * Type of MCP server connection\n     */\n    type: 'remote';\n    /**\n     * URL of the remote MCP server\n     */\n    url: string;\n    /**\n     * Enable or disable the MCP server on startup\n     */\n    enabled?: boolean;\n    /**\n     * Headers to send with the request\n     */\n    headers?: {\n        [key: string]: string;\n    };\n    /**\n     * OAuth authentication configuration for the MCP server. Set to false to disable OAuth auto-detection.\n     */\n    oauth?: McpOAuthConfig | false;\n    /**\n     * Timeout in ms for fetching tools from the MCP server. Defaults to 5000 (5 seconds) if not specified.\n     */\n    timeout?: number;\n};\n\n/**\n * @deprecated Always uses stretch layout.\n */\nexport type LayoutConfig = 'auto' | 'stretch';\n\nexport type Config = {\n    /**\n     * JSON schema reference for configuration validation\n     */\n    $schema?: string;\n    /**\n     * Theme name to use for the interface\n     */\n    theme?: string;\n    keybinds?: KeybindsConfig;\n    logLevel?: LogLevel;\n    /**\n     * TUI specific settings\n     */\n    tui?: {\n        /**\n         * TUI scroll speed\n         */\n        scroll_speed?: number;\n        /**\n         * Scroll acceleration settings\n         */\n        scroll_acceleration?: {\n            /**\n             * Enable scroll acceleration\n             */\n            enabled: boolean;\n        };\n        /**\n         * Control diff rendering style: 'auto' adapts to terminal width, 'stacked' always shows single column\n         */\n        diff_style?: 'auto' | 'stacked';\n    };\n    server?: ServerConfig;\n    /**\n     * Command configuration, see https://opencode.ai/docs/commands\n     */\n    command?: {\n        [key: string]: {\n            template: string;\n            description?: string;\n            agent?: string;\n            model?: string;\n            subtask?: boolean;\n        };\n    };\n    watcher?: {\n        ignore?: Array<string>;\n    };\n    plugin?: Array<string>;\n    snapshot?: boolean;\n    /**\n     * Control sharing behavior:'manual' allows manual sharing via commands, 'auto' enables automatic sharing, 'disabled' disables all sharing\n     */\n    share?: 'manual' | 'auto' | 'disabled';\n    /**\n     * @deprecated Use 'share' field instead. Share newly created sessions automatically\n     */\n    autoshare?: boolean;\n    /**\n     * Automatically update to the latest version. Set to true to auto-update, false to disable, or 'notify' to show update notifications\n     */\n    autoupdate?: boolean | 'notify';\n    /**\n     * Disable providers that are loaded automatically\n     */\n    disabled_providers?: Array<string>;\n    /**\n     * When set, ONLY these providers will be enabled. All other providers will be ignored\n     */\n    enabled_providers?: Array<string>;\n    /**\n     * Model to use in the format of provider/model, eg anthropic/claude-2\n     */\n    model?: string;\n    /**\n     * Small model to use for tasks like title generation in the format of provider/model\n     */\n    small_model?: string;\n    /**\n     * Default agent to use when none is specified. Must be a primary agent. Falls back to 'build' if not set or if the specified agent is invalid.\n     */\n    default_agent?: string;\n    /**\n     * Custom username to display in conversations instead of system username\n     */\n    username?: string;\n    /**\n     * @deprecated Use `agent` field instead.\n     */\n    mode?: {\n        build?: AgentConfig;\n        plan?: AgentConfig;\n        [key: string]: AgentConfig | undefined;\n    };\n    /**\n     * Agent configuration, see https://opencode.ai/docs/agent\n     */\n    agent?: {\n        plan?: AgentConfig;\n        build?: AgentConfig;\n        general?: AgentConfig;\n        explore?: AgentConfig;\n        title?: AgentConfig;\n        summary?: AgentConfig;\n        compaction?: AgentConfig;\n        [key: string]: AgentConfig | undefined;\n    };\n    /**\n     * Custom provider configurations and model overrides\n     */\n    provider?: {\n        [key: string]: ProviderConfig;\n    };\n    /**\n     * MCP (Model Context Protocol) server configurations\n     */\n    mcp?: {\n        [key: string]: McpLocalConfig | McpRemoteConfig;\n    };\n    formatter?: false | {\n        [key: string]: {\n            disabled?: boolean;\n            command?: Array<string>;\n            environment?: {\n                [key: string]: string;\n            };\n            extensions?: Array<string>;\n        };\n    };\n    lsp?: false | {\n        [key: string]: {\n            disabled: true;\n        } | {\n            command: Array<string>;\n            extensions?: Array<string>;\n            disabled?: boolean;\n            env?: {\n                [key: string]: string;\n            };\n            initialization?: {\n                [key: string]: unknown;\n            };\n        };\n    };\n    /**\n     * Additional instruction files or patterns to include\n     */\n    instructions?: Array<string>;\n    layout?: LayoutConfig;\n    permission?: PermissionConfig;\n    tools?: {\n        [key: string]: boolean;\n    };\n    enterprise?: {\n        /**\n         * Enterprise URL\n         */\n        url?: string;\n    };\n    compaction?: {\n        /**\n         * Enable automatic compaction when context is full (default: true)\n         */\n        auto?: boolean;\n        /**\n         * Enable pruning of old tool outputs (default: true)\n         */\n        prune?: boolean;\n    };\n    experimental?: {\n        hook?: {\n            file_edited?: {\n                [key: string]: Array<{\n                    command: Array<string>;\n                    environment?: {\n                        [key: string]: string;\n                    };\n                }>;\n            };\n            session_completed?: Array<{\n                command: Array<string>;\n                environment?: {\n                    [key: string]: string;\n                };\n            }>;\n        };\n        /**\n         * Number of retries for chat completions on failure\n         */\n        chatMaxRetries?: number;\n        disable_paste_summary?: boolean;\n        /**\n         * Enable the batch tool\n         */\n        batch_tool?: boolean;\n        /**\n         * Enable OpenTelemetry spans for AI SDK calls (using the 'experimental_telemetry' flag)\n         */\n        openTelemetry?: boolean;\n        /**\n         * Tools that should only be available to primary agents.\n         */\n        primary_tools?: Array<string>;\n        /**\n         * Continue the agent loop when a tool call is denied\n         */\n        continue_loop_on_deny?: boolean;\n        /**\n         * Timeout in milliseconds for model context protocol (MCP) requests\n         */\n        mcp_timeout?: number;\n    };\n};\n\nexport type ToolIds = Array<string>;\n\nexport type ToolListItem = {\n    id: string;\n    description: string;\n    parameters: unknown;\n};\n\nexport type ToolList = Array<ToolListItem>;\n\nexport type Path = {\n    home: string;\n    state: string;\n    config: string;\n    worktree: string;\n    directory: string;\n};\n\nexport type VcsInfo = {\n    branch: string;\n};\n\nexport type TextPartInput = {\n    id?: string;\n    type: 'text';\n    text: string;\n    synthetic?: boolean;\n    ignored?: boolean;\n    time?: {\n        start: number;\n        end?: number;\n    };\n    metadata?: {\n        [key: string]: unknown;\n    };\n};\n\nexport type FilePartInput = {\n    id?: string;\n    type: 'file';\n    mime: string;\n    filename?: string;\n    url: string;\n    source?: FilePartSource;\n};\n\nexport type AgentPartInput = {\n    id?: string;\n    type: 'agent';\n    name: string;\n    source?: {\n        value: string;\n        start: number;\n        end: number;\n    };\n};\n\nexport type SubtaskPartInput = {\n    id?: string;\n    type: 'subtask';\n    prompt: string;\n    description: string;\n    agent: string;\n    command?: string;\n};\n\nexport type Command = {\n    name: string;\n    description?: string;\n    agent?: string;\n    model?: string;\n    mcp?: boolean;\n    template: string;\n    subtask?: boolean;\n    hints: Array<string>;\n};\n\nexport type Model = {\n    id: string;\n    providerID: string;\n    api: {\n        id: string;\n        url: string;\n        npm: string;\n    };\n    name: string;\n    family?: string;\n    capabilities: {\n        temperature: boolean;\n        reasoning: boolean;\n        attachment: boolean;\n        toolcall: boolean;\n        input: {\n            text: boolean;\n            audio: boolean;\n            image: boolean;\n            video: boolean;\n            pdf: boolean;\n        };\n        output: {\n            text: boolean;\n            audio: boolean;\n            image: boolean;\n            video: boolean;\n            pdf: boolean;\n        };\n        interleaved: boolean | {\n            field: 'reasoning_content' | 'reasoning_details';\n        };\n    };\n    cost: {\n        input: number;\n        output: number;\n        cache: {\n            read: number;\n            write: number;\n        };\n        experimentalOver200K?: {\n            input: number;\n            output: number;\n            cache: {\n                read: number;\n                write: number;\n            };\n        };\n    };\n    limit: {\n        context: number;\n        output: number;\n    };\n    status: 'alpha' | 'beta' | 'deprecated' | 'active';\n    options: {\n        [key: string]: unknown;\n    };\n    headers: {\n        [key: string]: string;\n    };\n    release_date: string;\n    variants?: {\n        [key: string]: {\n            [key: string]: unknown;\n        };\n    };\n};\n\nexport type Provider = {\n    id: string;\n    name: string;\n    source: 'env' | 'config' | 'custom' | 'api';\n    env: Array<string>;\n    key?: string;\n    options: {\n        [key: string]: unknown;\n    };\n    models: {\n        [key: string]: Model;\n    };\n};\n\nexport type ProviderAuthMethod = {\n    type: 'oauth' | 'api';\n    label: string;\n};\n\nexport type ProviderAuthAuthorization = {\n    url: string;\n    method: 'auto' | 'code';\n    instructions: string;\n};\n\nexport type Symbol = {\n    name: string;\n    kind: number;\n    location: {\n        uri: string;\n        range: Range;\n    };\n};\n\nexport type FileNode = {\n    name: string;\n    path: string;\n    absolute: string;\n    type: 'file' | 'directory';\n    ignored: boolean;\n};\n\nexport type FileContent = {\n    type: 'text';\n    content: string;\n    diff?: string;\n    patch?: {\n        oldFileName: string;\n        newFileName: string;\n        oldHeader?: string;\n        newHeader?: string;\n        hunks: Array<{\n            oldStart: number;\n            oldLines: number;\n            newStart: number;\n            newLines: number;\n            lines: Array<string>;\n        }>;\n        index?: string;\n    };\n    encoding?: 'base64';\n    mimeType?: string;\n};\n\nexport type File = {\n    path: string;\n    added: number;\n    removed: number;\n    status: 'added' | 'deleted' | 'modified';\n};\n\nexport type Agent = {\n    name: string;\n    description?: string;\n    mode: 'subagent' | 'primary' | 'all';\n    native?: boolean;\n    hidden?: boolean;\n    topP?: number;\n    temperature?: number;\n    color?: string;\n    permission: PermissionRuleset;\n    model?: {\n        modelID: string;\n        providerID: string;\n    };\n    prompt?: string;\n    options: {\n        [key: string]: unknown;\n    };\n    steps?: number;\n};\n\nexport type McpStatusConnected = {\n    status: 'connected';\n};\n\nexport type McpStatusDisabled = {\n    status: 'disabled';\n};\n\nexport type McpStatusFailed = {\n    status: 'failed';\n    error: string;\n};\n\nexport type McpStatusNeedsAuth = {\n    status: 'needs_auth';\n};\n\nexport type McpStatusNeedsClientRegistration = {\n    status: 'needs_client_registration';\n    error: string;\n};\n\nexport type McpStatus = McpStatusConnected | McpStatusDisabled | McpStatusFailed | McpStatusNeedsAuth | McpStatusNeedsClientRegistration;\n\nexport type LspStatus = {\n    id: string;\n    name: string;\n    root: string;\n    status: 'connected' | 'error';\n};\n\nexport type FormatterStatus = {\n    name: string;\n    extensions: Array<string>;\n    enabled: boolean;\n};\n\nexport type OAuth = {\n    type: 'oauth';\n    refresh: string;\n    access: string;\n    expires: number;\n    enterpriseUrl?: string;\n};\n\nexport type ApiAuth = {\n    type: 'api';\n    key: string;\n};\n\nexport type WellKnownAuth = {\n    type: 'wellknown';\n    key: string;\n    token: string;\n};\n\nexport type Auth = OAuth | ApiAuth | WellKnownAuth;\n\nexport type GlobalHealthData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/global/health';\n};\n\nexport type GlobalHealthResponses = {\n    /**\n     * Health information\n     */\n    200: {\n        healthy: true;\n        version: string;\n    };\n};\n\nexport type GlobalHealthResponse = GlobalHealthResponses[keyof GlobalHealthResponses];\n\nexport type GlobalEventData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/global/event';\n};\n\nexport type GlobalEventResponses = {\n    /**\n     * Event stream\n     */\n    200: GlobalEvent;\n};\n\nexport type GlobalEventResponse = GlobalEventResponses[keyof GlobalEventResponses];\n\nexport type GlobalDisposeData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/global/dispose';\n};\n\nexport type GlobalDisposeResponses = {\n    /**\n     * Global disposed\n     */\n    200: boolean;\n};\n\nexport type GlobalDisposeResponse = GlobalDisposeResponses[keyof GlobalDisposeResponses];\n\nexport type ProjectListData = {\n    body?: never;\n    path?: never;\n    query?: {\n        directory?: string;\n    };\n    url: '/project';\n};\n\nexport type ProjectListResponses = {\n    /**\n     * List of projects\n     */\n    200: Array<Project>;\n};\n\nexport type ProjectListResponse = ProjectListResponses[keyof ProjectListResponses];\n\nexport type ProjectCurrentData = {\n    body?: never;\n    path?: never;\n    query?: {\n        directory?: string;\n    };\n    url: '/project/current';\n};\n\nexport type ProjectCurrentResponses = {\n    /**\n     * Current project information\n     */\n    200: Project;\n};\n\nexport type ProjectCurrentResponse = ProjectCurrentResponses[keyof ProjectCurrentResponses];\n\nexport type ProjectUpdateData = {\n    body?: {\n        name?: string;\n        icon?: {\n            url?: string;\n            color?: string;\n        };\n    };\n    path: {\n        projectID: string;\n    };\n    query?: {\n        directory?: string;\n    };\n    url: '/project/{projectID}';\n};\n\nexport type ProjectUpdateErrors = {\n    /**\n     * Bad request\n     */\n    400: BadRequestError;\n    /**\n     * Not found\n     */\n    404: NotFoundError;\n};\n\nexport type ProjectUpdateError = ProjectUpdateErrors[keyof ProjectUpdateErrors];\n\nexport type ProjectUpdateResponses = {\n    /**\n     * Updated project information\n     */\n    200: Project;\n};\n\nexport type ProjectUpdateResponse = ProjectUpdateResponses[keyof ProjectUpdateResponses];\n\nexport type PtyListData = {\n    body?: never;\n    path?: never;\n    query?: {\n        directory?: string;\n    };\n    url: '/pty';\n};\n\nexport type PtyListResponses = {\n    /**\n     * List of sessions\n     */\n    200: Array<Pty>;\n};\n\nexport type PtyListResponse = PtyListResponses[keyof PtyListResponses];\n\nexport type PtyCreateData = {\n    body?: {\n        command?: string;\n        args?: Array<string>;\n        cwd?: string;\n        title?: string;\n        env?: {\n            [key: string]: string;\n        };\n    };\n    path?: never;\n    query?: {\n        directory?: string;\n    };\n    url: '/pty';\n};\n\nexport type PtyCreateErrors = {\n    /**\n     * Bad request\n     */\n    400: BadRequestError;\n};\n\nexport type PtyCreateError = PtyCreateErrors[keyof PtyCreateErrors];\n\nexport type PtyCreateResponses = {\n    /**\n     * Created session\n     */\n    200: Pty;\n};\n\nexport type PtyCreateResponse = PtyCreateResponses[keyof PtyCreateResponses];\n\nexport type PtyRemoveData = {\n    body?: never;\n    path: {\n        ptyID: string;\n    };\n    query?: {\n        directory?: string;\n    };\n    url: '/pty/{ptyID}';\n};\n\nexport type PtyRemoveErrors = {\n    /**\n     * Not found\n     */\n    404: NotFoundError;\n};\n\nexport type PtyRemoveError = PtyRemoveErrors[keyof PtyRemoveErrors];\n\nexport type PtyRemoveResponses = {\n    /**\n     * Session removed\n     */\n    200: boolean;\n};\n\nexport type PtyRemoveResponse = PtyRemoveResponses[keyof PtyRemoveResponses];\n\nexport type PtyGetData = {\n    body?: never;\n    path: {\n        ptyID: string;\n    };\n    query?: {\n        directory?: string;\n    };\n    url: '/pty/{ptyID}';\n};\n\nexport type PtyGetErrors = {\n    /**\n     * Not found\n     */\n    404: NotFoundError;\n};\n\nexport type PtyGetError = PtyGetErrors[keyof PtyGetErrors];\n\nexport type PtyGetResponses = {\n    /**\n     * Session info\n     */\n    200: Pty;\n};\n\nexport type PtyGetResponse = PtyGetResponses[keyof PtyGetResponses];\n\nexport type PtyUpdateData = {\n    body?: {\n        title?: string;\n        size?: {\n            rows: number;\n            cols: number;\n        };\n    };\n    path: {\n        ptyID: string;\n    };\n    query?: {\n        directory?: string;\n    };\n    url: '/pty/{ptyID}';\n};\n\nexport type PtyUpdateErrors = {\n    /**\n     * Bad request\n     */\n    400: BadRequestError;\n};\n\nexport type PtyUpdateError = PtyUpdateErrors[keyof PtyUpdateErrors];\n\nexport type PtyUpdateResponses = {\n    /**\n     * Updated session\n     */\n    200: Pty;\n};\n\nexport type PtyUpdateResponse = PtyUpdateResponses[keyof PtyUpdateResponses];\n\nexport type PtyConnectData = {\n    body?: never;\n    path: {\n        ptyID: string;\n    };\n    query?: {\n        directory?: string;\n    };\n    url: '/pty/{ptyID}/connect';\n};\n\nexport type PtyConnectErrors = {\n    /**\n     * Not found\n     */\n    404: NotFoundError;\n};\n\nexport type PtyConnectError = PtyConnectErrors[keyof PtyConnectErrors];\n\nexport type PtyConnectResponses = {\n    /**\n     * Connected session\n     */\n    200: boolean;\n};\n\nexport type PtyConnectResponse = PtyConnectResponses[keyof PtyConnectResponses];\n\nexport type ConfigGetData = {\n    body?: never;\n    path?: never;\n    query?: {\n        directory?: string;\n    };\n    url: '/config';\n};\n\nexport type ConfigGetResponses = {\n    /**\n     * Get config info\n     */\n    200: Config;\n};\n\nexport type ConfigGetResponse = ConfigGetResponses[keyof ConfigGetResponses];\n\nexport type ConfigUpdateData = {\n    body?: Config;\n    path?: never;\n    query?: {\n        directory?: string;\n    };\n    url: '/config';\n};\n\nexport type ConfigUpdateErrors = {\n    /**\n     * Bad request\n     */\n    400: BadRequestError;\n};\n\nexport type ConfigUpdateError = ConfigUpdateErrors[keyof ConfigUpdateErrors];\n\nexport type ConfigUpdateResponses = {\n    /**\n     * Successfully updated config\n     */\n    200: Config;\n};\n\nexport type ConfigUpdateResponse = ConfigUpdateResponses[keyof ConfigUpdateResponses];\n\nexport type ToolIdsData = {\n    body?: never;\n    path?: never;\n    query?: {\n        directory?: string;\n    };\n    url: '/experimental/tool/ids';\n};\n\nexport type ToolIdsErrors = {\n    /**\n     * Bad request\n     */\n    400: BadRequestError;\n};\n\nexport type ToolIdsError = ToolIdsErrors[keyof ToolIdsErrors];\n\nexport type ToolIdsResponses = {\n    /**\n     * Tool IDs\n     */\n    200: ToolIds;\n};\n\nexport type ToolIdsResponse = ToolIdsResponses[keyof ToolIdsResponses];\n\nexport type ToolListData = {\n    body?: never;\n    path?: never;\n    query: {\n        directory?: string;\n        provider: string;\n        model: string;\n    };\n    url: '/experimental/tool';\n};\n\nexport type ToolListErrors = {\n    /**\n     * Bad request\n     */\n    400: BadRequestError;\n};\n\nexport type ToolListError = ToolListErrors[keyof ToolListErrors];\n\nexport type ToolListResponses = {\n    /**\n     * Tools\n     */\n    200: ToolList;\n};\n\nexport type ToolListResponse = ToolListResponses[keyof ToolListResponses];\n\nexport type InstanceDisposeData = {\n    body?: never;\n    path?: never;\n    query?: {\n        directory?: string;\n    };\n    url: '/instance/dispose';\n};\n\nexport type InstanceDisposeResponses = {\n    /**\n     * Instance disposed\n     */\n    200: boolean;\n};\n\nexport type InstanceDisposeResponse = InstanceDisposeResponses[keyof InstanceDisposeResponses];\n\nexport type PathGetData = {\n    body?: never;\n    path?: never;\n    query?: {\n        directory?: string;\n    };\n    url: '/path';\n};\n\nexport type PathGetResponses = {\n    /**\n     * Path\n     */\n    200: Path;\n};\n\nexport type PathGetResponse = PathGetResponses[keyof PathGetResponses];\n\nexport type VcsGetData = {\n    body?: never;\n    path?: never;\n    query?: {\n        directory?: string;\n    };\n    url: '/vcs';\n};\n\nexport type VcsGetResponses = {\n    /**\n     * VCS info\n     */\n    200: VcsInfo;\n};\n\nexport type VcsGetResponse = VcsGetResponses[keyof VcsGetResponses];\n\nexport type SessionListData = {\n    body?: never;\n    path?: never;\n    query?: {\n        directory?: string;\n    };\n    url: '/session';\n};\n\nexport type SessionListResponses = {\n    /**\n     * List of sessions\n     */\n    200: Array<Session>;\n};\n\nexport type SessionListResponse = SessionListResponses[keyof SessionListResponses];\n\nexport type SessionCreateData = {\n    body?: {\n        parentID?: string;\n        title?: string;\n        permission?: PermissionRuleset;\n    };\n    path?: never;\n    query?: {\n        directory?: string;\n    };\n    url: '/session';\n};\n\nexport type SessionCreateErrors = {\n    /**\n     * Bad request\n     */\n    400: BadRequestError;\n};\n\nexport type SessionCreateError = SessionCreateErrors[keyof SessionCreateErrors];\n\nexport type SessionCreateResponses = {\n    /**\n     * Successfully created session\n     */\n    200: Session;\n};\n\nexport type SessionCreateResponse = SessionCreateResponses[keyof SessionCreateResponses];\n\nexport type SessionStatusData = {\n    body?: never;\n    path?: never;\n    query?: {\n        directory?: string;\n    };\n    url: '/session/status';\n};\n\nexport type SessionStatusErrors = {\n    /**\n     * Bad request\n     */\n    400: BadRequestError;\n};\n\nexport type SessionStatusError = SessionStatusErrors[keyof SessionStatusErrors];\n\nexport type SessionStatusResponses = {\n    /**\n     * Get session status\n     */\n    200: {\n        [key: string]: SessionStatus;\n    };\n};\n\nexport type SessionStatusResponse = SessionStatusResponses[keyof SessionStatusResponses];\n\nexport type SessionDeleteData = {\n    body?: never;\n    path: {\n        sessionID: string;\n    };\n    query?: {\n        directory?: string;\n    };\n    url: '/session/{sessionID}';\n};\n\nexport type SessionDeleteErrors = {\n    /**\n     * Bad request\n     */\n    400: BadRequestError;\n    /**\n     * Not found\n     */\n    404: NotFoundError;\n};\n\nexport type SessionDeleteError = SessionDeleteErrors[keyof SessionDeleteErrors];\n\nexport type SessionDeleteResponses = {\n    /**\n     * Successfully deleted session\n     */\n    200: boolean;\n};\n\nexport type SessionDeleteResponse = SessionDeleteResponses[keyof SessionDeleteResponses];\n\nexport type SessionGetData = {\n    body?: never;\n    path: {\n        sessionID: string;\n    };\n    query?: {\n        directory?: string;\n    };\n    url: '/session/{sessionID}';\n};\n\nexport type SessionGetErrors = {\n    /**\n     * Bad request\n     */\n    400: BadRequestError;\n    /**\n     * Not found\n     */\n    404: NotFoundError;\n};\n\nexport type SessionGetError = SessionGetErrors[keyof SessionGetErrors];\n\nexport type SessionGetResponses = {\n    /**\n     * Get session\n     */\n    200: Session;\n};\n\nexport type SessionGetResponse = SessionGetResponses[keyof SessionGetResponses];\n\nexport type SessionUpdateData = {\n    body?: {\n        title?: string;\n        time?: {\n            archived?: number;\n        };\n    };\n    path: {\n        sessionID: string;\n    };\n    query?: {\n        directory?: string;\n    };\n    url: '/session/{sessionID}';\n};\n\nexport type SessionUpdateErrors = {\n    /**\n     * Bad request\n     */\n    400: BadRequestError;\n    /**\n     * Not found\n     */\n    404: NotFoundError;\n};\n\nexport type SessionUpdateError = SessionUpdateErrors[keyof SessionUpdateErrors];\n\nexport type SessionUpdateResponses = {\n    /**\n     * Successfully updated session\n     */\n    200: Session;\n};\n\nexport type SessionUpdateResponse = SessionUpdateResponses[keyof SessionUpdateResponses];\n\nexport type SessionChildrenData = {\n    body?: never;\n    path: {\n        sessionID: string;\n    };\n    query?: {\n        directory?: string;\n    };\n    url: '/session/{sessionID}/children';\n};\n\nexport type SessionChildrenErrors = {\n    /**\n     * Bad request\n     */\n    400: BadRequestError;\n    /**\n     * Not found\n     */\n    404: NotFoundError;\n};\n\nexport type SessionChildrenError = SessionChildrenErrors[keyof SessionChildrenErrors];\n\nexport type SessionChildrenResponses = {\n    /**\n     * List of children\n     */\n    200: Array<Session>;\n};\n\nexport type SessionChildrenResponse = SessionChildrenResponses[keyof SessionChildrenResponses];\n\nexport type SessionTodoData = {\n    body?: never;\n    path: {\n        /**\n         * Session ID\n         */\n        sessionID: string;\n    };\n    query?: {\n        directory?: string;\n    };\n    url: '/session/{sessionID}/todo';\n};\n\nexport type SessionTodoErrors = {\n    /**\n     * Bad request\n     */\n    400: BadRequestError;\n    /**\n     * Not found\n     */\n    404: NotFoundError;\n};\n\nexport type SessionTodoError = SessionTodoErrors[keyof SessionTodoErrors];\n\nexport type SessionTodoResponses = {\n    /**\n     * Todo list\n     */\n    200: Array<Todo>;\n};\n\nexport type SessionTodoResponse = SessionTodoResponses[keyof SessionTodoResponses];\n\nexport type SessionInitData = {\n    body?: {\n        modelID: string;\n        providerID: string;\n        messageID: string;\n    };\n    path: {\n        /**\n         * Session ID\n         */\n        sessionID: string;\n    };\n    query?: {\n        directory?: string;\n    };\n    url: '/session/{sessionID}/init';\n};\n\nexport type SessionInitErrors = {\n    /**\n     * Bad request\n     */\n    400: BadRequestError;\n    /**\n     * Not found\n     */\n    404: NotFoundError;\n};\n\nexport type SessionInitError = SessionInitErrors[keyof SessionInitErrors];\n\nexport type SessionInitResponses = {\n    /**\n     * 200\n     */\n    200: boolean;\n};\n\nexport type SessionInitResponse = SessionInitResponses[keyof SessionInitResponses];\n\nexport type SessionForkData = {\n    body?: {\n        messageID?: string;\n    };\n    path: {\n        sessionID: string;\n    };\n    query?: {\n        directory?: string;\n    };\n    url: '/session/{sessionID}/fork';\n};\n\nexport type SessionForkResponses = {\n    /**\n     * 200\n     */\n    200: Session;\n};\n\nexport type SessionForkResponse = SessionForkResponses[keyof SessionForkResponses];\n\nexport type SessionAbortData = {\n    body?: never;\n    path: {\n        sessionID: string;\n    };\n    query?: {\n        directory?: string;\n    };\n    url: '/session/{sessionID}/abort';\n};\n\nexport type SessionAbortErrors = {\n    /**\n     * Bad request\n     */\n    400: BadRequestError;\n    /**\n     * Not found\n     */\n    404: NotFoundError;\n};\n\nexport type SessionAbortError = SessionAbortErrors[keyof SessionAbortErrors];\n\nexport type SessionAbortResponses = {\n    /**\n     * Aborted session\n     */\n    200: boolean;\n};\n\nexport type SessionAbortResponse = SessionAbortResponses[keyof SessionAbortResponses];\n\nexport type SessionUnshareData = {\n    body?: never;\n    path: {\n        sessionID: string;\n    };\n    query?: {\n        directory?: string;\n    };\n    url: '/session/{sessionID}/share';\n};\n\nexport type SessionUnshareErrors = {\n    /**\n     * Bad request\n     */\n    400: BadRequestError;\n    /**\n     * Not found\n     */\n    404: NotFoundError;\n};\n\nexport type SessionUnshareError = SessionUnshareErrors[keyof SessionUnshareErrors];\n\nexport type SessionUnshareResponses = {\n    /**\n     * Successfully unshared session\n     */\n    200: Session;\n};\n\nexport type SessionUnshareResponse = SessionUnshareResponses[keyof SessionUnshareResponses];\n\nexport type SessionShareData = {\n    body?: never;\n    path: {\n        sessionID: string;\n    };\n    query?: {\n        directory?: string;\n    };\n    url: '/session/{sessionID}/share';\n};\n\nexport type SessionShareErrors = {\n    /**\n     * Bad request\n     */\n    400: BadRequestError;\n    /**\n     * Not found\n     */\n    404: NotFoundError;\n};\n\nexport type SessionShareError = SessionShareErrors[keyof SessionShareErrors];\n\nexport type SessionShareResponses = {\n    /**\n     * Successfully shared session\n     */\n    200: Session;\n};\n\nexport type SessionShareResponse = SessionShareResponses[keyof SessionShareResponses];\n\nexport type SessionDiffData = {\n    body?: never;\n    path: {\n        /**\n         * Session ID\n         */\n        sessionID: string;\n    };\n    query?: {\n        directory?: string;\n        messageID?: string;\n    };\n    url: '/session/{sessionID}/diff';\n};\n\nexport type SessionDiffErrors = {\n    /**\n     * Bad request\n     */\n    400: BadRequestError;\n    /**\n     * Not found\n     */\n    404: NotFoundError;\n};\n\nexport type SessionDiffError = SessionDiffErrors[keyof SessionDiffErrors];\n\nexport type SessionDiffResponses = {\n    /**\n     * List of diffs\n     */\n    200: Array<FileDiff>;\n};\n\nexport type SessionDiffResponse = SessionDiffResponses[keyof SessionDiffResponses];\n\nexport type SessionSummarizeData = {\n    body?: {\n        providerID: string;\n        modelID: string;\n        auto?: boolean;\n    };\n    path: {\n        /**\n         * Session ID\n         */\n        sessionID: string;\n    };\n    query?: {\n        directory?: string;\n    };\n    url: '/session/{sessionID}/summarize';\n};\n\nexport type SessionSummarizeErrors = {\n    /**\n     * Bad request\n     */\n    400: BadRequestError;\n    /**\n     * Not found\n     */\n    404: NotFoundError;\n};\n\nexport type SessionSummarizeError = SessionSummarizeErrors[keyof SessionSummarizeErrors];\n\nexport type SessionSummarizeResponses = {\n    /**\n     * Summarized session\n     */\n    200: boolean;\n};\n\nexport type SessionSummarizeResponse = SessionSummarizeResponses[keyof SessionSummarizeResponses];\n\nexport type SessionMessagesData = {\n    body?: never;\n    path: {\n        /**\n         * Session ID\n         */\n        sessionID: string;\n    };\n    query?: {\n        directory?: string;\n        limit?: number;\n    };\n    url: '/session/{sessionID}/message';\n};\n\nexport type SessionMessagesErrors = {\n    /**\n     * Bad request\n     */\n    400: BadRequestError;\n    /**\n     * Not found\n     */\n    404: NotFoundError;\n};\n\nexport type SessionMessagesError = SessionMessagesErrors[keyof SessionMessagesErrors];\n\nexport type SessionMessagesResponses = {\n    /**\n     * List of messages\n     */\n    200: Array<{\n        info: Message;\n        parts: Array<Part>;\n    }>;\n};\n\nexport type SessionMessagesResponse = SessionMessagesResponses[keyof SessionMessagesResponses];\n\nexport type SessionPromptData = {\n    body?: {\n        messageID?: string;\n        model?: {\n            providerID: string;\n            modelID: string;\n        };\n        agent?: string;\n        noReply?: boolean;\n        /**\n         * @deprecated tools and permissions have been merged, you can set permissions on the session itself now\n         */\n        tools?: {\n            [key: string]: boolean;\n        };\n        system?: string;\n        variant?: string;\n        parts: Array<TextPartInput | FilePartInput | AgentPartInput | SubtaskPartInput>;\n    };\n    path: {\n        /**\n         * Session ID\n         */\n        sessionID: string;\n    };\n    query?: {\n        directory?: string;\n    };\n    url: '/session/{sessionID}/message';\n};\n\nexport type SessionPromptErrors = {\n    /**\n     * Bad request\n     */\n    400: BadRequestError;\n    /**\n     * Not found\n     */\n    404: NotFoundError;\n};\n\nexport type SessionPromptError = SessionPromptErrors[keyof SessionPromptErrors];\n\nexport type SessionPromptResponses = {\n    /**\n     * Created message\n     */\n    200: {\n        info: AssistantMessage;\n        parts: Array<Part>;\n    };\n};\n\nexport type SessionPromptResponse = SessionPromptResponses[keyof SessionPromptResponses];\n\nexport type SessionMessageData = {\n    body?: never;\n    path: {\n        /**\n         * Session ID\n         */\n        sessionID: string;\n        /**\n         * Message ID\n         */\n        messageID: string;\n    };\n    query?: {\n        directory?: string;\n    };\n    url: '/session/{sessionID}/message/{messageID}';\n};\n\nexport type SessionMessageErrors = {\n    /**\n     * Bad request\n     */\n    400: BadRequestError;\n    /**\n     * Not found\n     */\n    404: NotFoundError;\n};\n\nexport type SessionMessageError = SessionMessageErrors[keyof SessionMessageErrors];\n\nexport type SessionMessageResponses = {\n    /**\n     * Message\n     */\n    200: {\n        info: Message;\n        parts: Array<Part>;\n    };\n};\n\nexport type SessionMessageResponse = SessionMessageResponses[keyof SessionMessageResponses];\n\nexport type PartDeleteData = {\n    body?: never;\n    path: {\n        /**\n         * Session ID\n         */\n        sessionID: string;\n        /**\n         * Message ID\n         */\n        messageID: string;\n        /**\n         * Part ID\n         */\n        partID: string;\n    };\n    query?: {\n        directory?: string;\n    };\n    url: '/session/{sessionID}/message/{messageID}/part/{partID}';\n};\n\nexport type PartDeleteErrors = {\n    /**\n     * Bad request\n     */\n    400: BadRequestError;\n    /**\n     * Not found\n     */\n    404: NotFoundError;\n};\n\nexport type PartDeleteError = PartDeleteErrors[keyof PartDeleteErrors];\n\nexport type PartDeleteResponses = {\n    /**\n     * Successfully deleted part\n     */\n    200: boolean;\n};\n\nexport type PartDeleteResponse = PartDeleteResponses[keyof PartDeleteResponses];\n\nexport type PartUpdateData = {\n    body?: Part;\n    path: {\n        /**\n         * Session ID\n         */\n        sessionID: string;\n        /**\n         * Message ID\n         */\n        messageID: string;\n        /**\n         * Part ID\n         */\n        partID: string;\n    };\n    query?: {\n        directory?: string;\n    };\n    url: '/session/{sessionID}/message/{messageID}/part/{partID}';\n};\n\nexport type PartUpdateErrors = {\n    /**\n     * Bad request\n     */\n    400: BadRequestError;\n    /**\n     * Not found\n     */\n    404: NotFoundError;\n};\n\nexport type PartUpdateError = PartUpdateErrors[keyof PartUpdateErrors];\n\nexport type PartUpdateResponses = {\n    /**\n     * Successfully updated part\n     */\n    200: Part;\n};\n\nexport type PartUpdateResponse = PartUpdateResponses[keyof PartUpdateResponses];\n\nexport type SessionPromptAsyncData = {\n    body?: {\n        messageID?: string;\n        model?: {\n            providerID: string;\n            modelID: string;\n        };\n        agent?: string;\n        noReply?: boolean;\n        /**\n         * @deprecated tools and permissions have been merged, you can set permissions on the session itself now\n         */\n        tools?: {\n            [key: string]: boolean;\n        };\n        system?: string;\n        variant?: string;\n        parts: Array<TextPartInput | FilePartInput | AgentPartInput | SubtaskPartInput>;\n    };\n    path: {\n        /**\n         * Session ID\n         */\n        sessionID: string;\n    };\n    query?: {\n        directory?: string;\n    };\n    url: '/session/{sessionID}/prompt_async';\n};\n\nexport type SessionPromptAsyncErrors = {\n    /**\n     * Bad request\n     */\n    400: BadRequestError;\n    /**\n     * Not found\n     */\n    404: NotFoundError;\n};\n\nexport type SessionPromptAsyncError = SessionPromptAsyncErrors[keyof SessionPromptAsyncErrors];\n\nexport type SessionPromptAsyncResponses = {\n    /**\n     * Prompt accepted\n     */\n    204: void;\n};\n\nexport type SessionPromptAsyncResponse = SessionPromptAsyncResponses[keyof SessionPromptAsyncResponses];\n\nexport type SessionCommandData = {\n    body?: {\n        messageID?: string;\n        agent?: string;\n        model?: string;\n        arguments: string;\n        command: string;\n        variant?: string;\n    };\n    path: {\n        /**\n         * Session ID\n         */\n        sessionID: string;\n    };\n    query?: {\n        directory?: string;\n    };\n    url: '/session/{sessionID}/command';\n};\n\nexport type SessionCommandErrors = {\n    /**\n     * Bad request\n     */\n    400: BadRequestError;\n    /**\n     * Not found\n     */\n    404: NotFoundError;\n};\n\nexport type SessionCommandError = SessionCommandErrors[keyof SessionCommandErrors];\n\nexport type SessionCommandResponses = {\n    /**\n     * Created message\n     */\n    200: {\n        info: AssistantMessage;\n        parts: Array<Part>;\n    };\n};\n\nexport type SessionCommandResponse = SessionCommandResponses[keyof SessionCommandResponses];\n\nexport type SessionShellData = {\n    body?: {\n        agent: string;\n        model?: {\n            providerID: string;\n            modelID: string;\n        };\n        command: string;\n    };\n    path: {\n        /**\n         * Session ID\n         */\n        sessionID: string;\n    };\n    query?: {\n        directory?: string;\n    };\n    url: '/session/{sessionID}/shell';\n};\n\nexport type SessionShellErrors = {\n    /**\n     * Bad request\n     */\n    400: BadRequestError;\n    /**\n     * Not found\n     */\n    404: NotFoundError;\n};\n\nexport type SessionShellError = SessionShellErrors[keyof SessionShellErrors];\n\nexport type SessionShellResponses = {\n    /**\n     * Created message\n     */\n    200: AssistantMessage;\n};\n\nexport type SessionShellResponse = SessionShellResponses[keyof SessionShellResponses];\n\nexport type SessionRevertData = {\n    body?: {\n        messageID: string;\n        partID?: string;\n    };\n    path: {\n        sessionID: string;\n    };\n    query?: {\n        directory?: string;\n    };\n    url: '/session/{sessionID}/revert';\n};\n\nexport type SessionRevertErrors = {\n    /**\n     * Bad request\n     */\n    400: BadRequestError;\n    /**\n     * Not found\n     */\n    404: NotFoundError;\n};\n\nexport type SessionRevertError = SessionRevertErrors[keyof SessionRevertErrors];\n\nexport type SessionRevertResponses = {\n    /**\n     * Updated session\n     */\n    200: Session;\n};\n\nexport type SessionRevertResponse = SessionRevertResponses[keyof SessionRevertResponses];\n\nexport type SessionUnrevertData = {\n    body?: never;\n    path: {\n        sessionID: string;\n    };\n    query?: {\n        directory?: string;\n    };\n    url: '/session/{sessionID}/unrevert';\n};\n\nexport type SessionUnrevertErrors = {\n    /**\n     * Bad request\n     */\n    400: BadRequestError;\n    /**\n     * Not found\n     */\n    404: NotFoundError;\n};\n\nexport type SessionUnrevertError = SessionUnrevertErrors[keyof SessionUnrevertErrors];\n\nexport type SessionUnrevertResponses = {\n    /**\n     * Updated session\n     */\n    200: Session;\n};\n\nexport type SessionUnrevertResponse = SessionUnrevertResponses[keyof SessionUnrevertResponses];\n\nexport type PermissionRespondData = {\n    body?: {\n        response: 'once' | 'always' | 'reject';\n    };\n    path: {\n        sessionID: string;\n        permissionID: string;\n    };\n    query?: {\n        directory?: string;\n    };\n    url: '/session/{sessionID}/permissions/{permissionID}';\n};\n\nexport type PermissionRespondErrors = {\n    /**\n     * Bad request\n     */\n    400: BadRequestError;\n    /**\n     * Not found\n     */\n    404: NotFoundError;\n};\n\nexport type PermissionRespondError = PermissionRespondErrors[keyof PermissionRespondErrors];\n\nexport type PermissionRespondResponses = {\n    /**\n     * Permission processed successfully\n     */\n    200: boolean;\n};\n\nexport type PermissionRespondResponse = PermissionRespondResponses[keyof PermissionRespondResponses];\n\nexport type PermissionReplyData = {\n    body?: {\n        reply: 'once' | 'always' | 'reject';\n    };\n    path: {\n        requestID: string;\n    };\n    query?: {\n        directory?: string;\n    };\n    url: '/permission/{requestID}/reply';\n};\n\nexport type PermissionReplyErrors = {\n    /**\n     * Bad request\n     */\n    400: BadRequestError;\n    /**\n     * Not found\n     */\n    404: NotFoundError;\n};\n\nexport type PermissionReplyError = PermissionReplyErrors[keyof PermissionReplyErrors];\n\nexport type PermissionReplyResponses = {\n    /**\n     * Permission processed successfully\n     */\n    200: boolean;\n};\n\nexport type PermissionReplyResponse = PermissionReplyResponses[keyof PermissionReplyResponses];\n\nexport type PermissionListData = {\n    body?: never;\n    path?: never;\n    query?: {\n        directory?: string;\n    };\n    url: '/permission';\n};\n\nexport type PermissionListResponses = {\n    /**\n     * List of pending permissions\n     */\n    200: Array<PermissionRequest>;\n};\n\nexport type PermissionListResponse = PermissionListResponses[keyof PermissionListResponses];\n\nexport type CommandListData = {\n    body?: never;\n    path?: never;\n    query?: {\n        directory?: string;\n    };\n    url: '/command';\n};\n\nexport type CommandListResponses = {\n    /**\n     * List of commands\n     */\n    200: Array<Command>;\n};\n\nexport type CommandListResponse = CommandListResponses[keyof CommandListResponses];\n\nexport type ConfigProvidersData = {\n    body?: never;\n    path?: never;\n    query?: {\n        directory?: string;\n    };\n    url: '/config/providers';\n};\n\nexport type ConfigProvidersResponses = {\n    /**\n     * List of providers\n     */\n    200: {\n        providers: Array<Provider>;\n        default: {\n            [key: string]: string;\n        };\n    };\n};\n\nexport type ConfigProvidersResponse = ConfigProvidersResponses[keyof ConfigProvidersResponses];\n\nexport type ProviderListData = {\n    body?: never;\n    path?: never;\n    query?: {\n        directory?: string;\n    };\n    url: '/provider';\n};\n\nexport type ProviderListResponses = {\n    /**\n     * List of providers\n     */\n    200: {\n        all: Array<{\n            api?: string;\n            name: string;\n            env: Array<string>;\n            id: string;\n            npm?: string;\n            models: {\n                [key: string]: {\n                    id: string;\n                    name: string;\n                    family?: string;\n                    release_date: string;\n                    attachment: boolean;\n                    reasoning: boolean;\n                    temperature: boolean;\n                    tool_call: boolean;\n                    interleaved?: true | {\n                        field: 'reasoning_content' | 'reasoning_details';\n                    };\n                    cost?: {\n                        input: number;\n                        output: number;\n                        cache_read?: number;\n                        cache_write?: number;\n                        context_over_200k?: {\n                            input: number;\n                            output: number;\n                            cache_read?: number;\n                            cache_write?: number;\n                        };\n                    };\n                    limit: {\n                        context: number;\n                        output: number;\n                    };\n                    modalities?: {\n                        input: Array<'text' | 'audio' | 'image' | 'video' | 'pdf'>;\n                        output: Array<'text' | 'audio' | 'image' | 'video' | 'pdf'>;\n                    };\n                    experimental?: boolean;\n                    status?: 'alpha' | 'beta' | 'deprecated';\n                    options: {\n                        [key: string]: unknown;\n                    };\n                    headers?: {\n                        [key: string]: string;\n                    };\n                    provider?: {\n                        npm: string;\n                    };\n                    variants?: {\n                        [key: string]: {\n                            [key: string]: unknown;\n                        };\n                    };\n                };\n            };\n        }>;\n        default: {\n            [key: string]: string;\n        };\n        connected: Array<string>;\n    };\n};\n\nexport type ProviderListResponse = ProviderListResponses[keyof ProviderListResponses];\n\nexport type ProviderAuthData = {\n    body?: never;\n    path?: never;\n    query?: {\n        directory?: string;\n    };\n    url: '/provider/auth';\n};\n\nexport type ProviderAuthResponses = {\n    /**\n     * Provider auth methods\n     */\n    200: {\n        [key: string]: Array<ProviderAuthMethod>;\n    };\n};\n\nexport type ProviderAuthResponse = ProviderAuthResponses[keyof ProviderAuthResponses];\n\nexport type ProviderOauthAuthorizeData = {\n    body?: {\n        /**\n         * Auth method index\n         */\n        method: number;\n    };\n    path: {\n        /**\n         * Provider ID\n         */\n        providerID: string;\n    };\n    query?: {\n        directory?: string;\n    };\n    url: '/provider/{providerID}/oauth/authorize';\n};\n\nexport type ProviderOauthAuthorizeErrors = {\n    /**\n     * Bad request\n     */\n    400: BadRequestError;\n};\n\nexport type ProviderOauthAuthorizeError = ProviderOauthAuthorizeErrors[keyof ProviderOauthAuthorizeErrors];\n\nexport type ProviderOauthAuthorizeResponses = {\n    /**\n     * Authorization URL and method\n     */\n    200: ProviderAuthAuthorization;\n};\n\nexport type ProviderOauthAuthorizeResponse = ProviderOauthAuthorizeResponses[keyof ProviderOauthAuthorizeResponses];\n\nexport type ProviderOauthCallbackData = {\n    body?: {\n        /**\n         * Auth method index\n         */\n        method: number;\n        /**\n         * OAuth authorization code\n         */\n        code?: string;\n    };\n    path: {\n        /**\n         * Provider ID\n         */\n        providerID: string;\n    };\n    query?: {\n        directory?: string;\n    };\n    url: '/provider/{providerID}/oauth/callback';\n};\n\nexport type ProviderOauthCallbackErrors = {\n    /**\n     * Bad request\n     */\n    400: BadRequestError;\n};\n\nexport type ProviderOauthCallbackError = ProviderOauthCallbackErrors[keyof ProviderOauthCallbackErrors];\n\nexport type ProviderOauthCallbackResponses = {\n    /**\n     * OAuth callback processed successfully\n     */\n    200: boolean;\n};\n\nexport type ProviderOauthCallbackResponse = ProviderOauthCallbackResponses[keyof ProviderOauthCallbackResponses];\n\nexport type FindTextData = {\n    body?: never;\n    path?: never;\n    query: {\n        directory?: string;\n        pattern: string;\n    };\n    url: '/find';\n};\n\nexport type FindTextResponses = {\n    /**\n     * Matches\n     */\n    200: Array<{\n        path: {\n            text: string;\n        };\n        lines: {\n            text: string;\n        };\n        line_number: number;\n        absolute_offset: number;\n        submatches: Array<{\n            match: {\n                text: string;\n            };\n            start: number;\n            end: number;\n        }>;\n    }>;\n};\n\nexport type FindTextResponse = FindTextResponses[keyof FindTextResponses];\n\nexport type FindFilesData = {\n    body?: never;\n    path?: never;\n    query: {\n        directory?: string;\n        query: string;\n        dirs?: 'true' | 'false';\n        type?: 'file' | 'directory';\n        limit?: number;\n    };\n    url: '/find/file';\n};\n\nexport type FindFilesResponses = {\n    /**\n     * File paths\n     */\n    200: Array<string>;\n};\n\nexport type FindFilesResponse = FindFilesResponses[keyof FindFilesResponses];\n\nexport type FindSymbolsData = {\n    body?: never;\n    path?: never;\n    query: {\n        directory?: string;\n        query: string;\n    };\n    url: '/find/symbol';\n};\n\nexport type FindSymbolsResponses = {\n    /**\n     * Symbols\n     */\n    200: Array<Symbol>;\n};\n\nexport type FindSymbolsResponse = FindSymbolsResponses[keyof FindSymbolsResponses];\n\nexport type FileListData = {\n    body?: never;\n    path?: never;\n    query: {\n        directory?: string;\n        path: string;\n    };\n    url: '/file';\n};\n\nexport type FileListResponses = {\n    /**\n     * Files and directories\n     */\n    200: Array<FileNode>;\n};\n\nexport type FileListResponse = FileListResponses[keyof FileListResponses];\n\nexport type FileReadData = {\n    body?: never;\n    path?: never;\n    query: {\n        directory?: string;\n        path: string;\n    };\n    url: '/file/content';\n};\n\nexport type FileReadResponses = {\n    /**\n     * File content\n     */\n    200: FileContent;\n};\n\nexport type FileReadResponse = FileReadResponses[keyof FileReadResponses];\n\nexport type FileStatusData = {\n    body?: never;\n    path?: never;\n    query?: {\n        directory?: string;\n    };\n    url: '/file/status';\n};\n\nexport type FileStatusResponses = {\n    /**\n     * File status\n     */\n    200: Array<File>;\n};\n\nexport type FileStatusResponse = FileStatusResponses[keyof FileStatusResponses];\n\nexport type AppLogData = {\n    body?: {\n        /**\n         * Service name for the log entry\n         */\n        service: string;\n        /**\n         * Log level\n         */\n        level: 'debug' | 'info' | 'error' | 'warn';\n        /**\n         * Log message\n         */\n        message: string;\n        /**\n         * Additional metadata for the log entry\n         */\n        extra?: {\n            [key: string]: unknown;\n        };\n    };\n    path?: never;\n    query?: {\n        directory?: string;\n    };\n    url: '/log';\n};\n\nexport type AppLogErrors = {\n    /**\n     * Bad request\n     */\n    400: BadRequestError;\n};\n\nexport type AppLogError = AppLogErrors[keyof AppLogErrors];\n\nexport type AppLogResponses = {\n    /**\n     * Log entry written successfully\n     */\n    200: boolean;\n};\n\nexport type AppLogResponse = AppLogResponses[keyof AppLogResponses];\n\nexport type AppAgentsData = {\n    body?: never;\n    path?: never;\n    query?: {\n        directory?: string;\n    };\n    url: '/agent';\n};\n\nexport type AppAgentsResponses = {\n    /**\n     * List of agents\n     */\n    200: Array<Agent>;\n};\n\nexport type AppAgentsResponse = AppAgentsResponses[keyof AppAgentsResponses];\n\nexport type McpStatusData = {\n    body?: never;\n    path?: never;\n    query?: {\n        directory?: string;\n    };\n    url: '/mcp';\n};\n\nexport type McpStatusResponses = {\n    /**\n     * MCP server status\n     */\n    200: {\n        [key: string]: McpStatus;\n    };\n};\n\nexport type McpStatusResponse = McpStatusResponses[keyof McpStatusResponses];\n\nexport type McpAddData = {\n    body?: {\n        name: string;\n        config: McpLocalConfig | McpRemoteConfig;\n    };\n    path?: never;\n    query?: {\n        directory?: string;\n    };\n    url: '/mcp';\n};\n\nexport type McpAddErrors = {\n    /**\n     * Bad request\n     */\n    400: BadRequestError;\n};\n\nexport type McpAddError = McpAddErrors[keyof McpAddErrors];\n\nexport type McpAddResponses = {\n    /**\n     * MCP server added successfully\n     */\n    200: {\n        [key: string]: McpStatus;\n    };\n};\n\nexport type McpAddResponse = McpAddResponses[keyof McpAddResponses];\n\nexport type McpAuthRemoveData = {\n    body?: never;\n    path: {\n        name: string;\n    };\n    query?: {\n        directory?: string;\n    };\n    url: '/mcp/{name}/auth';\n};\n\nexport type McpAuthRemoveErrors = {\n    /**\n     * Not found\n     */\n    404: NotFoundError;\n};\n\nexport type McpAuthRemoveError = McpAuthRemoveErrors[keyof McpAuthRemoveErrors];\n\nexport type McpAuthRemoveResponses = {\n    /**\n     * OAuth credentials removed\n     */\n    200: {\n        success: true;\n    };\n};\n\nexport type McpAuthRemoveResponse = McpAuthRemoveResponses[keyof McpAuthRemoveResponses];\n\nexport type McpAuthStartData = {\n    body?: never;\n    path: {\n        name: string;\n    };\n    query?: {\n        directory?: string;\n    };\n    url: '/mcp/{name}/auth';\n};\n\nexport type McpAuthStartErrors = {\n    /**\n     * Bad request\n     */\n    400: BadRequestError;\n    /**\n     * Not found\n     */\n    404: NotFoundError;\n};\n\nexport type McpAuthStartError = McpAuthStartErrors[keyof McpAuthStartErrors];\n\nexport type McpAuthStartResponses = {\n    /**\n     * OAuth flow started\n     */\n    200: {\n        /**\n         * URL to open in browser for authorization\n         */\n        authorizationUrl: string;\n    };\n};\n\nexport type McpAuthStartResponse = McpAuthStartResponses[keyof McpAuthStartResponses];\n\nexport type McpAuthCallbackData = {\n    body?: {\n        /**\n         * Authorization code from OAuth callback\n         */\n        code: string;\n    };\n    path: {\n        name: string;\n    };\n    query?: {\n        directory?: string;\n    };\n    url: '/mcp/{name}/auth/callback';\n};\n\nexport type McpAuthCallbackErrors = {\n    /**\n     * Bad request\n     */\n    400: BadRequestError;\n    /**\n     * Not found\n     */\n    404: NotFoundError;\n};\n\nexport type McpAuthCallbackError = McpAuthCallbackErrors[keyof McpAuthCallbackErrors];\n\nexport type McpAuthCallbackResponses = {\n    /**\n     * OAuth authentication completed\n     */\n    200: McpStatus;\n};\n\nexport type McpAuthCallbackResponse = McpAuthCallbackResponses[keyof McpAuthCallbackResponses];\n\nexport type McpAuthAuthenticateData = {\n    body?: never;\n    path: {\n        name: string;\n    };\n    query?: {\n        directory?: string;\n    };\n    url: '/mcp/{name}/auth/authenticate';\n};\n\nexport type McpAuthAuthenticateErrors = {\n    /**\n     * Bad request\n     */\n    400: BadRequestError;\n    /**\n     * Not found\n     */\n    404: NotFoundError;\n};\n\nexport type McpAuthAuthenticateError = McpAuthAuthenticateErrors[keyof McpAuthAuthenticateErrors];\n\nexport type McpAuthAuthenticateResponses = {\n    /**\n     * OAuth authentication completed\n     */\n    200: McpStatus;\n};\n\nexport type McpAuthAuthenticateResponse = McpAuthAuthenticateResponses[keyof McpAuthAuthenticateResponses];\n\nexport type McpConnectData = {\n    body?: never;\n    path: {\n        name: string;\n    };\n    query?: {\n        directory?: string;\n    };\n    url: '/mcp/{name}/connect';\n};\n\nexport type McpConnectResponses = {\n    /**\n     * MCP server connected successfully\n     */\n    200: boolean;\n};\n\nexport type McpConnectResponse = McpConnectResponses[keyof McpConnectResponses];\n\nexport type McpDisconnectData = {\n    body?: never;\n    path: {\n        name: string;\n    };\n    query?: {\n        directory?: string;\n    };\n    url: '/mcp/{name}/disconnect';\n};\n\nexport type McpDisconnectResponses = {\n    /**\n     * MCP server disconnected successfully\n     */\n    200: boolean;\n};\n\nexport type McpDisconnectResponse = McpDisconnectResponses[keyof McpDisconnectResponses];\n\nexport type LspStatusData = {\n    body?: never;\n    path?: never;\n    query?: {\n        directory?: string;\n    };\n    url: '/lsp';\n};\n\nexport type LspStatusResponses = {\n    /**\n     * LSP server status\n     */\n    200: Array<LspStatus>;\n};\n\nexport type LspStatusResponse = LspStatusResponses[keyof LspStatusResponses];\n\nexport type FormatterStatusData = {\n    body?: never;\n    path?: never;\n    query?: {\n        directory?: string;\n    };\n    url: '/formatter';\n};\n\nexport type FormatterStatusResponses = {\n    /**\n     * Formatter status\n     */\n    200: Array<FormatterStatus>;\n};\n\nexport type FormatterStatusResponse = FormatterStatusResponses[keyof FormatterStatusResponses];\n\nexport type TuiAppendPromptData = {\n    body?: {\n        text: string;\n    };\n    path?: never;\n    query?: {\n        directory?: string;\n    };\n    url: '/tui/append-prompt';\n};\n\nexport type TuiAppendPromptErrors = {\n    /**\n     * Bad request\n     */\n    400: BadRequestError;\n};\n\nexport type TuiAppendPromptError = TuiAppendPromptErrors[keyof TuiAppendPromptErrors];\n\nexport type TuiAppendPromptResponses = {\n    /**\n     * Prompt processed successfully\n     */\n    200: boolean;\n};\n\nexport type TuiAppendPromptResponse = TuiAppendPromptResponses[keyof TuiAppendPromptResponses];\n\nexport type TuiOpenHelpData = {\n    body?: never;\n    path?: never;\n    query?: {\n        directory?: string;\n    };\n    url: '/tui/open-help';\n};\n\nexport type TuiOpenHelpResponses = {\n    /**\n     * Help dialog opened successfully\n     */\n    200: boolean;\n};\n\nexport type TuiOpenHelpResponse = TuiOpenHelpResponses[keyof TuiOpenHelpResponses];\n\nexport type TuiOpenSessionsData = {\n    body?: never;\n    path?: never;\n    query?: {\n        directory?: string;\n    };\n    url: '/tui/open-sessions';\n};\n\nexport type TuiOpenSessionsResponses = {\n    /**\n     * Session dialog opened successfully\n     */\n    200: boolean;\n};\n\nexport type TuiOpenSessionsResponse = TuiOpenSessionsResponses[keyof TuiOpenSessionsResponses];\n\nexport type TuiOpenThemesData = {\n    body?: never;\n    path?: never;\n    query?: {\n        directory?: string;\n    };\n    url: '/tui/open-themes';\n};\n\nexport type TuiOpenThemesResponses = {\n    /**\n     * Theme dialog opened successfully\n     */\n    200: boolean;\n};\n\nexport type TuiOpenThemesResponse = TuiOpenThemesResponses[keyof TuiOpenThemesResponses];\n\nexport type TuiOpenModelsData = {\n    body?: never;\n    path?: never;\n    query?: {\n        directory?: string;\n    };\n    url: '/tui/open-models';\n};\n\nexport type TuiOpenModelsResponses = {\n    /**\n     * Model dialog opened successfully\n     */\n    200: boolean;\n};\n\nexport type TuiOpenModelsResponse = TuiOpenModelsResponses[keyof TuiOpenModelsResponses];\n\nexport type TuiSubmitPromptData = {\n    body?: never;\n    path?: never;\n    query?: {\n        directory?: string;\n    };\n    url: '/tui/submit-prompt';\n};\n\nexport type TuiSubmitPromptResponses = {\n    /**\n     * Prompt submitted successfully\n     */\n    200: boolean;\n};\n\nexport type TuiSubmitPromptResponse = TuiSubmitPromptResponses[keyof TuiSubmitPromptResponses];\n\nexport type TuiClearPromptData = {\n    body?: never;\n    path?: never;\n    query?: {\n        directory?: string;\n    };\n    url: '/tui/clear-prompt';\n};\n\nexport type TuiClearPromptResponses = {\n    /**\n     * Prompt cleared successfully\n     */\n    200: boolean;\n};\n\nexport type TuiClearPromptResponse = TuiClearPromptResponses[keyof TuiClearPromptResponses];\n\nexport type TuiExecuteCommandData = {\n    body?: {\n        command: string;\n    };\n    path?: never;\n    query?: {\n        directory?: string;\n    };\n    url: '/tui/execute-command';\n};\n\nexport type TuiExecuteCommandErrors = {\n    /**\n     * Bad request\n     */\n    400: BadRequestError;\n};\n\nexport type TuiExecuteCommandError = TuiExecuteCommandErrors[keyof TuiExecuteCommandErrors];\n\nexport type TuiExecuteCommandResponses = {\n    /**\n     * Command executed successfully\n     */\n    200: boolean;\n};\n\nexport type TuiExecuteCommandResponse = TuiExecuteCommandResponses[keyof TuiExecuteCommandResponses];\n\nexport type TuiShowToastData = {\n    body?: {\n        title?: string;\n        message: string;\n        variant: 'info' | 'success' | 'warning' | 'error';\n        /**\n         * Duration in milliseconds\n         */\n        duration?: number;\n    };\n    path?: never;\n    query?: {\n        directory?: string;\n    };\n    url: '/tui/show-toast';\n};\n\nexport type TuiShowToastResponses = {\n    /**\n     * Toast notification shown successfully\n     */\n    200: boolean;\n};\n\nexport type TuiShowToastResponse = TuiShowToastResponses[keyof TuiShowToastResponses];\n\nexport type TuiPublishData = {\n    body?: EventTuiPromptAppend | EventTuiCommandExecute | EventTuiToastShow;\n    path?: never;\n    query?: {\n        directory?: string;\n    };\n    url: '/tui/publish';\n};\n\nexport type TuiPublishErrors = {\n    /**\n     * Bad request\n     */\n    400: BadRequestError;\n};\n\nexport type TuiPublishError = TuiPublishErrors[keyof TuiPublishErrors];\n\nexport type TuiPublishResponses = {\n    /**\n     * Event published successfully\n     */\n    200: boolean;\n};\n\nexport type TuiPublishResponse = TuiPublishResponses[keyof TuiPublishResponses];\n\nexport type TuiControlNextData = {\n    body?: never;\n    path?: never;\n    query?: {\n        directory?: string;\n    };\n    url: '/tui/control/next';\n};\n\nexport type TuiControlNextResponses = {\n    /**\n     * Next TUI request\n     */\n    200: {\n        path: string;\n        body: unknown;\n    };\n};\n\nexport type TuiControlNextResponse = TuiControlNextResponses[keyof TuiControlNextResponses];\n\nexport type TuiControlResponseData = {\n    body?: unknown;\n    path?: never;\n    query?: {\n        directory?: string;\n    };\n    url: '/tui/control/response';\n};\n\nexport type TuiControlResponseResponses = {\n    /**\n     * Response submitted successfully\n     */\n    200: boolean;\n};\n\nexport type TuiControlResponseResponse = TuiControlResponseResponses[keyof TuiControlResponseResponses];\n\nexport type AuthSetData = {\n    body?: Auth;\n    path: {\n        providerID: string;\n    };\n    query?: {\n        directory?: string;\n    };\n    url: '/auth/{providerID}';\n};\n\nexport type AuthSetErrors = {\n    /**\n     * Bad request\n     */\n    400: BadRequestError;\n};\n\nexport type AuthSetError = AuthSetErrors[keyof AuthSetErrors];\n\nexport type AuthSetResponses = {\n    /**\n     * Successfully set authentication credentials\n     */\n    200: boolean;\n};\n\nexport type AuthSetResponse = AuthSetResponses[keyof AuthSetResponses];\n\nexport type EventSubscribeData = {\n    body?: never;\n    path?: never;\n    query?: {\n        directory?: string;\n    };\n    url: '/event';\n};\n\nexport type EventSubscribeResponses = {\n    /**\n     * Event stream\n     */\n    200: Event;\n};\n\nexport type EventSubscribeResponse = EventSubscribeResponses[keyof EventSubscribeResponses];\n"
  },
  {
    "path": "packages/openapi-ts-tests/sdks/package.json",
    "content": "{\n  \"name\": \"@test/openapi-ts-sdks\",\n  \"version\": \"0.0.0\",\n  \"private\": true,\n  \"type\": \"module\",\n  \"scripts\": {\n    \"typecheck\": \"tsgo --noEmit\"\n  },\n  \"devDependencies\": {\n    \"@hey-api/openapi-ts\": \"workspace:*\",\n    \"typescript\": \"5.9.3\"\n  },\n  \"engines\": {\n    \"node\": \">=20.19.0\"\n  }\n}\n"
  },
  {
    "path": "packages/openapi-ts-tests/sdks/test/method-class-conflict.test.ts",
    "content": "import fs from 'node:fs';\nimport path from 'node:path';\n\nimport { createClient } from '@hey-api/openapi-ts';\n\nimport { getFilePaths, getSpecsPath } from '../../utils';\nimport { createSdkConfig, getSnapshotsPath, getTempSnapshotsPath } from './utils';\n\nconst namespace = 'method-class-conflict';\n\nconst outputDir = path.join(getTempSnapshotsPath(), namespace);\nconst snapshotsDir = path.join(getSnapshotsPath(), namespace);\n\nconst specPath = path.join(getSpecsPath(), '3.0.x', 'sdk-method-class-conflict.yaml');\n\ndescribe(`SDK: ${namespace}`, () => {\n  const createConfig = createSdkConfig({\n    outputDir,\n  });\n\n  const scenarios = [\n    {\n      config: createConfig({\n        input: specPath,\n        output: {\n          entryFile: false,\n          path: 'class',\n        },\n        plugins: [\n          {\n            asClass: true,\n            instance: false,\n            name: '@hey-api/sdk',\n          },\n        ],\n      }),\n      description: 'class',\n    },\n    {\n      config: createConfig({\n        input: specPath,\n        output: {\n          entryFile: false,\n          path: 'flat',\n        },\n        plugins: [\n          {\n            asClass: false,\n            instance: false,\n            name: '@hey-api/sdk',\n          },\n        ],\n      }),\n      description: 'flat',\n    },\n    {\n      config: createConfig({\n        input: specPath,\n        output: {\n          entryFile: false,\n          path: 'instance',\n        },\n        plugins: [\n          {\n            instance: true,\n            name: '@hey-api/sdk',\n          },\n        ],\n      }),\n      description: 'instance',\n    },\n  ];\n\n  it.each(scenarios)(\n    '$description',\n    async ({ config }) => {\n      await createClient(config);\n\n      const filePaths = getFilePaths(\n        typeof config.output === 'string' ? config.output : config.output.path,\n      );\n\n      await Promise.all(\n        filePaths.map(async (filePath) => {\n          const fileContent = fs.readFileSync(filePath, 'utf-8');\n          await expect(fileContent).toMatchFileSnapshot(\n            path.join(snapshotsDir, filePath.slice(outputDir.length + 1)),\n          );\n        }),\n      );\n    },\n    15_000,\n  );\n});\n"
  },
  {
    "path": "packages/openapi-ts-tests/sdks/test/opencode.test.ts",
    "content": "import fs from 'node:fs';\nimport path from 'node:path';\n\nimport { createClient } from '@hey-api/openapi-ts';\n\nimport { getFilePaths, getSpecsPath } from '../../utils';\nimport { createSdkConfig, getSnapshotsPath, getTempSnapshotsPath } from './utils';\n\nconst namespace = 'opencode';\n\nconst outputDir = path.join(getTempSnapshotsPath(), namespace);\nconst snapshotsDir = path.join(getSnapshotsPath(), namespace);\n\nconst specPath = path.join(getSpecsPath(), '3.1.x', 'opencode.yaml');\n\ndescribe(`SDK: ${namespace}`, () => {\n  const createConfig = createSdkConfig({\n    outputDir,\n  });\n\n  const scenarios = [\n    {\n      config: createConfig({\n        input: specPath,\n        output: {\n          path: 'export-all',\n          preferExportAll: true,\n        },\n        plugins: [\n          {\n            name: '@hey-api/sdk',\n            paramsStructure: 'flat',\n          },\n        ],\n      }),\n      description: 'export all',\n    },\n    {\n      config: createConfig({\n        input: specPath,\n        output: 'flat',\n        plugins: [\n          {\n            name: '@hey-api/sdk',\n            paramsStructure: 'flat',\n          },\n        ],\n      }),\n      description: 'flat',\n    },\n    {\n      config: createConfig({\n        input: specPath,\n        output: 'grouped',\n        plugins: [\n          {\n            name: '@hey-api/sdk',\n            paramsStructure: 'grouped',\n          },\n        ],\n      }),\n      description: 'grouped',\n    },\n  ];\n\n  it.each(scenarios)(\n    '$description',\n    async ({ config }) => {\n      await createClient(config);\n\n      const filePaths = getFilePaths(\n        typeof config.output === 'string' ? config.output : config.output.path,\n      );\n\n      await Promise.all(\n        filePaths.map(async (filePath) => {\n          const fileContent = fs.readFileSync(filePath, 'utf-8');\n          await expect(fileContent).toMatchFileSnapshot(\n            path.join(snapshotsDir, filePath.slice(outputDir.length + 1)),\n          );\n        }),\n      );\n    },\n    15_000,\n  );\n});\n"
  },
  {
    "path": "packages/openapi-ts-tests/sdks/test/utils.ts",
    "content": "import path from 'node:path';\nimport { fileURLToPath } from 'node:url';\n\nimport { type UserConfig } from '@hey-api/openapi-ts';\n\nconst __filename = fileURLToPath(import.meta.url);\nconst __dirname = path.dirname(__filename);\n\nexport const createSdkConfig =\n  ({ outputDir }: { outputDir: string }) =>\n  (userConfig: UserConfig) =>\n    ({\n      ...userConfig,\n      logs: {\n        level: 'silent',\n        path: './logs',\n      },\n      output:\n        typeof userConfig.output === 'string'\n          ? path.join(outputDir, userConfig.output)\n          : {\n              ...userConfig.output,\n              path: path.join(\n                outputDir,\n                userConfig.output instanceof Array ? '' : userConfig.output.path,\n              ),\n            },\n    }) as const satisfies UserConfig;\n\nexport const getSnapshotsPath = (): string => path.join(__dirname, '..', '__snapshots__');\n\nexport const getTempSnapshotsPath = (): string => path.join(__dirname, '..', '.gen', 'snapshots');\n"
  },
  {
    "path": "packages/openapi-ts-tests/sdks/tsconfig.json",
    "content": "{\n  \"extends\": \"../tsconfig.base.json\",\n  \"include\": [\"test/**/*\", \"__snapshots__/**/*\"],\n  \"exclude\": [\".gen/**/*\"],\n  \"references\": [{ \"path\": \"../../openapi-ts\" }]\n}\n"
  },
  {
    "path": "packages/openapi-ts-tests/sdks/turbo.json",
    "content": "{\n  \"$schema\": \"../../../node_modules/turbo/schema.json\",\n  \"extends\": [\"//\"],\n  \"tasks\": {\n    \"build\": {\n      \"dependsOn\": [],\n      \"outputs\": [\"dist/**\"]\n    }\n  }\n}\n"
  },
  {
    "path": "packages/openapi-ts-tests/sdks/vitest.setup.ts",
    "content": "import { fileURLToPath } from 'node:url';\n\nimport { beforeAll } from 'vitest';\n\nbeforeAll(() => {\n  process.chdir(fileURLToPath(new URL('.', import.meta.url)));\n});\n"
  },
  {
    "path": "packages/openapi-ts-tests/tsconfig.base.json",
    "content": "{\n  \"extends\": \"../../tsconfig.base.json\",\n  \"compilerOptions\": {\n    \"declaration\": false,\n    \"declarationMap\": false,\n    \"noEmit\": true,\n    \"noImplicitOverride\": true,\n    \"noImplicitReturns\": true,\n    \"noUnusedLocals\": true,\n    \"noUnusedParameters\": true,\n    \"types\": [\"vitest/globals\"],\n    \"useUnknownInCatchVariables\": false\n  }\n}\n"
  },
  {
    "path": "packages/openapi-ts-tests/utils.ts",
    "content": "import fs from 'node:fs';\nimport path from 'node:path';\n\nexport const getFilePaths = (dirPath: string): Array<string> => {\n  let filePaths: Array<string> = [];\n  const files = fs.readdirSync(dirPath);\n\n  for (const file of files) {\n    const filePath = path.join(dirPath, file);\n    const stat = fs.statSync(filePath);\n\n    if (stat.isDirectory()) {\n      filePaths = filePaths.concat(getFilePaths(filePath));\n    } else {\n      filePaths.push(filePath);\n    }\n  }\n\n  return filePaths;\n};\n\nexport const getSpecsPath = (): string => path.join(__dirname, '..', '..', 'specs');\n"
  },
  {
    "path": "packages/openapi-ts-tests/valibot/v1/.gitignore",
    "content": ".DS_Store\n.idea\n.tmp\n.tsdown\nlogs\nnode_modules\ntemp\n\n.env\ncoverage\ndist\n\n# test files\n.gen\n"
  },
  {
    "path": "packages/openapi-ts-tests/valibot/v1/__snapshots__/3.0.x/array-items-one-of-length-1/valibot.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport * as v from 'valibot';\n\nexport const vBar = v.string();\n\nexport const vFoo = v.object({\n    foo: v.optional(v.pipe(v.array(vBar), v.minLength(1), v.maxLength(2147483647)))\n});\n"
  },
  {
    "path": "packages/openapi-ts-tests/valibot/v1/__snapshots__/3.0.x/enum-null/valibot.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport * as v from 'valibot';\n\nexport const vFoo = v.nullable(v.picklist(['foo', 'bar']));\n\nexport const vBar = v.picklist(['foo', 'bar']);\n\nexport const vBaz = v.picklist(['foo', 'bar']);\n"
  },
  {
    "path": "packages/openapi-ts-tests/valibot/v1/__snapshots__/3.0.x/validators/valibot.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport * as v from 'valibot';\n\nexport const vBaz = v.optional(v.pipe(v.pipe(v.string(), v.regex(/foo\\nbar/)), v.readonly()), 'baz');\n\nexport const vFoo: v.GenericSchema = v.nullish(v.object({\n    foo: v.optional(v.pipe(v.string(), v.regex(/^\\d{3}-\\d{2}-\\d{4}$/))),\n    bar: v.optional(v.lazy(() => vBar)),\n    baz: v.optional(v.array(v.lazy(() => vFoo))),\n    qux: v.optional(v.pipe(v.number(), v.integer(), v.gtValue(0)), 0)\n}), null);\n\nexport const vBar = v.object({\n    foo: v.optional(vFoo)\n});\n"
  },
  {
    "path": "packages/openapi-ts-tests/valibot/v1/__snapshots__/3.1.x/array-items-one-of-length-1/valibot.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport * as v from 'valibot';\n\nexport const vBar = v.string();\n\nexport const vFoo = v.object({\n    foo: v.optional(v.pipe(v.array(vBar), v.minLength(1), v.maxLength(2147483647)))\n});\n"
  },
  {
    "path": "packages/openapi-ts-tests/valibot/v1/__snapshots__/3.1.x/enum-null/valibot.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport * as v from 'valibot';\n\nexport const vFoo = v.nullable(v.picklist(['foo', 'bar']));\n\nexport const vBar = v.picklist(['foo', 'bar']);\n\nexport const vBaz = v.picklist(['foo', 'bar']);\n"
  },
  {
    "path": "packages/openapi-ts-tests/valibot/v1/__snapshots__/3.1.x/integer-formats/valibot.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport * as v from 'valibot';\n\nexport const vIntegerFormats = v.object({\n    numberNoFormat: v.optional(v.number()),\n    numberInt8: v.optional(v.pipe(v.number(), v.minValue(-128, 'Invalid value: Expected int8 to be >= -128'), v.maxValue(127, 'Invalid value: Expected int8 to be <= 127'))),\n    numberInt16: v.optional(v.pipe(v.number(), v.minValue(-32768, 'Invalid value: Expected int16 to be >= -32768'), v.maxValue(32767, 'Invalid value: Expected int16 to be <= 32767'))),\n    numberInt32: v.optional(v.pipe(v.number(), v.minValue(-2147483648, 'Invalid value: Expected int32 to be >= -2147483648'), v.maxValue(2147483647, 'Invalid value: Expected int32 to be <= 2147483647'))),\n    numberInt64: v.optional(v.pipe(v.union([\n        v.number(),\n        v.string(),\n        v.bigint()\n    ]), v.transform(x => BigInt(x)), v.minValue(BigInt('-9223372036854775808'), 'Invalid value: Expected int64 to be >= -9223372036854775808'), v.maxValue(BigInt('9223372036854775807'), 'Invalid value: Expected int64 to be <= 9223372036854775807'))),\n    numberUint8: v.optional(v.pipe(v.number(), v.minValue(0, 'Invalid value: Expected uint8 to be >= 0'), v.maxValue(255, 'Invalid value: Expected uint8 to be <= 255'))),\n    numberUint16: v.optional(v.pipe(v.number(), v.minValue(0, 'Invalid value: Expected uint16 to be >= 0'), v.maxValue(65535, 'Invalid value: Expected uint16 to be <= 65535'))),\n    numberUint32: v.optional(v.pipe(v.number(), v.minValue(0, 'Invalid value: Expected uint32 to be >= 0'), v.maxValue(4294967295, 'Invalid value: Expected uint32 to be <= 4294967295'))),\n    numberUint64: v.optional(v.pipe(v.union([\n        v.number(),\n        v.string(),\n        v.bigint()\n    ]), v.transform(x => BigInt(x)), v.minValue(BigInt('0'), 'Invalid value: Expected uint64 to be >= 0'), v.maxValue(BigInt('18446744073709551615'), 'Invalid value: Expected uint64 to be <= 18446744073709551615'))),\n    integerNoFormat: v.optional(v.pipe(v.number(), v.integer())),\n    integerInt8: v.optional(v.pipe(v.number(), v.integer(), v.minValue(-128, 'Invalid value: Expected int8 to be >= -128'), v.maxValue(127, 'Invalid value: Expected int8 to be <= 127'))),\n    integerInt16: v.optional(v.pipe(v.number(), v.integer(), v.minValue(-32768, 'Invalid value: Expected int16 to be >= -32768'), v.maxValue(32767, 'Invalid value: Expected int16 to be <= 32767'))),\n    integerInt32: v.optional(v.pipe(v.number(), v.integer(), v.minValue(-2147483648, 'Invalid value: Expected int32 to be >= -2147483648'), v.maxValue(2147483647, 'Invalid value: Expected int32 to be <= 2147483647'))),\n    integerInt64: v.optional(v.pipe(v.union([\n        v.number(),\n        v.string(),\n        v.bigint()\n    ]), v.transform(x => BigInt(x)), v.minValue(BigInt('-9223372036854775808'), 'Invalid value: Expected int64 to be >= -9223372036854775808'), v.maxValue(BigInt('9223372036854775807'), 'Invalid value: Expected int64 to be <= 9223372036854775807'))),\n    integerUint8: v.optional(v.pipe(v.number(), v.integer(), v.minValue(0, 'Invalid value: Expected uint8 to be >= 0'), v.maxValue(255, 'Invalid value: Expected uint8 to be <= 255'))),\n    integerUint16: v.optional(v.pipe(v.number(), v.integer(), v.minValue(0, 'Invalid value: Expected uint16 to be >= 0'), v.maxValue(65535, 'Invalid value: Expected uint16 to be <= 65535'))),\n    integerUint32: v.optional(v.pipe(v.number(), v.integer(), v.minValue(0, 'Invalid value: Expected uint32 to be >= 0'), v.maxValue(4294967295, 'Invalid value: Expected uint32 to be <= 4294967295'))),\n    integerUint64: v.optional(v.pipe(v.union([\n        v.number(),\n        v.string(),\n        v.bigint()\n    ]), v.transform(x => BigInt(x)), v.minValue(BigInt('0'), 'Invalid value: Expected uint64 to be >= 0'), v.maxValue(BigInt('18446744073709551615'), 'Invalid value: Expected uint64 to be <= 18446744073709551615'))),\n    stringInt64: v.optional(v.pipe(v.union([\n        v.number(),\n        v.string(),\n        v.bigint()\n    ]), v.transform(x => BigInt(x)), v.minValue(BigInt('-9223372036854775808'), 'Invalid value: Expected int64 to be >= -9223372036854775808'), v.maxValue(BigInt('9223372036854775807'), 'Invalid value: Expected int64 to be <= 9223372036854775807'))),\n    stringUint64: v.optional(v.pipe(v.union([\n        v.number(),\n        v.string(),\n        v.bigint()\n    ]), v.transform(x => BigInt(x)), v.minValue(BigInt('0'), 'Invalid value: Expected uint64 to be >= 0'), v.maxValue(BigInt('18446744073709551615'), 'Invalid value: Expected uint64 to be <= 18446744073709551615')))\n});\n"
  },
  {
    "path": "packages/openapi-ts-tests/valibot/v1/__snapshots__/3.1.x/schema-const/valibot.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport * as v from 'valibot';\n\nexport const vFoo = v.object({\n    foo: v.optional(v.literal('foo')),\n    bar: v.optional(v.literal(3.2)),\n    baz: v.optional(v.literal(-1)),\n    qux: v.optional(v.literal(true)),\n    quux: v.optional(v.tuple([\n        v.literal(1),\n        v.literal(2),\n        v.literal(3),\n        v.literal('foo'),\n        v.literal(true)\n    ])),\n    corge: v.optional(v.record(v.string(), v.unknown())),\n    garply: v.optional(v.literal(BigInt('10'))),\n    numberInt8: v.optional(v.literal(100)),\n    numberInt16: v.optional(v.literal(1000)),\n    numberInt32: v.optional(v.literal(100000)),\n    numberInt64: v.optional(v.literal(BigInt(1000000000000))),\n    numberUint8: v.optional(v.literal(200)),\n    numberUint16: v.optional(v.literal(50000)),\n    numberUint32: v.optional(v.literal(3000000000)),\n    numberUint64: v.optional(v.literal(BigInt(18000000000000000000))),\n    integerInt8: v.optional(v.literal(-100)),\n    integerInt16: v.optional(v.literal(-1000)),\n    integerInt32: v.optional(v.literal(-100000)),\n    integerInt64: v.optional(v.literal(BigInt(-1000000000000))),\n    integerUint8: v.optional(v.literal(255)),\n    integerUint16: v.optional(v.literal(65535)),\n    integerUint32: v.optional(v.literal(4294967295)),\n    integerUint64: v.optional(v.literal(BigInt('18446744073709551615'))),\n    stringInt64: v.optional(v.literal(BigInt('-9223372036854775808'))),\n    stringUint64: v.optional(v.literal(BigInt('18446744073709551615')))\n});\n"
  },
  {
    "path": "packages/openapi-ts-tests/valibot/v1/__snapshots__/3.1.x/string-with-format/valibot.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport * as v from 'valibot';\n\nexport const vFoo = v.object({\n    foo: v.optional(v.array(v.unknown()))\n});\n"
  },
  {
    "path": "packages/openapi-ts-tests/valibot/v1/__snapshots__/3.1.x/time-format/valibot.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport * as v from 'valibot';\n\nexport const vGetSearchData = v.object({\n    body: v.optional(v.never()),\n    path: v.optional(v.never()),\n    query: v.object({\n        start_time: v.optional(v.pipe(v.string(), v.isoTimeSecond())),\n        end_time: v.pipe(v.string(), v.isoTimeSecond())\n    })\n});\n\n/**\n * Success\n */\nexport const vGetSearchResponse = v.object({\n    result: v.optional(v.string()),\n    scheduled_time: v.optional(v.pipe(v.string(), v.isoTimeSecond()))\n});\n"
  },
  {
    "path": "packages/openapi-ts-tests/valibot/v1/__snapshots__/3.1.x/type-format/client/client.gen.ts",
    "content": "// 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 (options: RequestOptions) => {\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 url = buildUrl(opts);\n\n    return { opts, url };\n  };\n\n  const request: Client['request'] = async (options) => {\n    // @ts-expect-error\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"
  },
  {
    "path": "packages/openapi-ts-tests/valibot/v1/__snapshots__/3.1.x/type-format/client/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type { Auth } from '../core/auth.gen';\nexport type { QuerySerializerOptions } from '../core/bodySerializer.gen';\nexport {\n  formDataBodySerializer,\n  jsonBodySerializer,\n  urlSearchParamsBodySerializer,\n} from '../core/bodySerializer.gen';\nexport { buildClientParams } from '../core/params.gen';\nexport { serializeQueryKeyValue } from '../core/queryKeySerializer.gen';\nexport { createClient } from './client.gen';\nexport type {\n  Client,\n  ClientOptions,\n  Config,\n  CreateClientConfig,\n  Options,\n  RequestOptions,\n  RequestResult,\n  ResolvedRequestOptions,\n  ResponseStyle,\n  TDataShape,\n} from './types.gen';\nexport { createConfig, mergeHeaders } from './utils.gen';\n"
  },
  {
    "path": "packages/openapi-ts-tests/valibot/v1/__snapshots__/3.1.x/type-format/client/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { Auth } from '../core/auth.gen';\nimport type {\n  ServerSentEventsOptions,\n  ServerSentEventsResult,\n} from '../core/serverSentEvents.gen';\nimport type { Client as CoreClient, Config as CoreConfig } from '../core/types.gen';\nimport type { Middleware } from './utils.gen';\n\nexport type ResponseStyle = 'data' | 'fields';\n\nexport interface Config<T extends ClientOptions = ClientOptions>\n  extends Omit<RequestInit, 'body' | 'headers' | 'method'>, CoreConfig {\n  /**\n   * Base URL for all requests made by this client.\n   */\n  baseUrl?: T['baseUrl'];\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   * Please don't use the Fetch client for Next.js applications. The `next`\n   * options won't have any effect.\n   *\n   * Install {@link https://www.npmjs.com/package/@hey-api/client-next `@hey-api/client-next`} instead.\n   */\n  next?: never;\n  /**\n   * Return the response data parsed in a specified format. By default, `auto`\n   * will infer the appropriate method from the `Content-Type` response header.\n   * You can override this behavior with any of the {@link Body} methods.\n   * Select `stream` if you don't want to parse response data at all.\n   *\n   * @default 'auto'\n   */\n  parseAs?: 'arrayBuffer' | 'auto' | 'blob' | 'formData' | 'json' | 'stream' | 'text';\n  /**\n   * Should we return only data or multiple fields (data, error, response, etc.)?\n   *\n   * @default 'fields'\n   */\n  responseStyle?: ResponseStyle;\n  /**\n   * Throw an error instead of returning it in the response?\n   *\n   * @default false\n   */\n  throwOnError?: T['throwOnError'];\n}\n\nexport interface RequestOptions<\n  TData = unknown,\n  TResponseStyle extends ResponseStyle = 'fields',\n  ThrowOnError extends boolean = boolean,\n  Url extends string = string,\n>\n  extends\n    Config<{\n      responseStyle: TResponseStyle;\n      throwOnError: ThrowOnError;\n    }>,\n    Pick<\n      ServerSentEventsOptions<TData>,\n      | 'onRequest'\n      | 'onSseError'\n      | 'onSseEvent'\n      | 'sseDefaultRetryDelay'\n      | 'sseMaxRetryAttempts'\n      | 'sseMaxRetryDelay'\n    > {\n  /**\n   * Any body that you want to add to your request.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/fetch#body}\n   */\n  body?: unknown;\n  path?: Record<string, unknown>;\n  query?: Record<string, unknown>;\n  /**\n   * Security mechanism(s) to use for the request.\n   */\n  security?: ReadonlyArray<Auth>;\n  url: Url;\n}\n\nexport interface ResolvedRequestOptions<\n  TResponseStyle extends ResponseStyle = 'fields',\n  ThrowOnError extends boolean = boolean,\n  Url extends string = string,\n> extends RequestOptions<unknown, TResponseStyle, ThrowOnError, Url> {\n  serializedBody?: string;\n}\n\nexport type RequestResult<\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = boolean,\n  TResponseStyle extends ResponseStyle = 'fields',\n> = ThrowOnError extends true\n  ? Promise<\n      TResponseStyle extends 'data'\n        ? TData extends Record<string, unknown>\n          ? TData[keyof TData]\n          : TData\n        : {\n            data: TData extends Record<string, unknown> ? TData[keyof TData] : TData;\n            request: Request;\n            response: Response;\n          }\n    >\n  : Promise<\n      TResponseStyle extends 'data'\n        ? (TData extends Record<string, unknown> ? TData[keyof TData] : TData) | undefined\n        : (\n            | {\n                data: TData extends Record<string, unknown> ? TData[keyof TData] : TData;\n                error: undefined;\n              }\n            | {\n                data: undefined;\n                error: TError extends Record<string, unknown> ? TError[keyof TError] : TError;\n              }\n          ) & {\n            request: Request;\n            response: Response;\n          }\n    >;\n\nexport interface ClientOptions {\n  baseUrl?: string;\n  responseStyle?: ResponseStyle;\n  throwOnError?: boolean;\n}\n\ntype MethodFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'>,\n) => RequestResult<TData, TError, ThrowOnError, TResponseStyle>;\n\ntype SseFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'>,\n) => Promise<ServerSentEventsResult<TData, TError>>;\n\ntype RequestFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'> &\n    Pick<Required<RequestOptions<TData, TResponseStyle, ThrowOnError>>, 'method'>,\n) => RequestResult<TData, TError, ThrowOnError, TResponseStyle>;\n\ntype BuildUrlFn = <\n  TData extends {\n    body?: unknown;\n    path?: Record<string, unknown>;\n    query?: Record<string, unknown>;\n    url: string;\n  },\n>(\n  options: TData & Options<TData>,\n) => string;\n\nexport type Client = CoreClient<RequestFn, Config, MethodFn, BuildUrlFn, SseFn> & {\n  interceptors: Middleware<Request, Response, unknown, ResolvedRequestOptions>;\n};\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 = ClientOptions> = (\n  override?: Config<ClientOptions & T>,\n) => Config<Required<ClientOptions> & T>;\n\nexport interface TDataShape {\n  body?: unknown;\n  headers?: unknown;\n  path?: unknown;\n  query?: unknown;\n  url: string;\n}\n\ntype OmitKeys<T, K> = Pick<T, Exclude<keyof T, K>>;\n\nexport type Options<\n  TData extends TDataShape = TDataShape,\n  ThrowOnError extends boolean = boolean,\n  TResponse = unknown,\n  TResponseStyle extends ResponseStyle = 'fields',\n> = OmitKeys<\n  RequestOptions<TResponse, TResponseStyle, ThrowOnError>,\n  'body' | 'path' | 'query' | 'url'\n> &\n  ([TData] extends [never] ? unknown : Omit<TData, 'url'>);\n"
  },
  {
    "path": "packages/openapi-ts-tests/valibot/v1/__snapshots__/3.1.x/type-format/client/utils.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/valibot/v1/__snapshots__/3.1.x/type-format/client.gen.ts",
    "content": "// 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>());\n"
  },
  {
    "path": "packages/openapi-ts-tests/valibot/v1/__snapshots__/3.1.x/type-format/core/auth.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/valibot/v1/__snapshots__/3.1.x/type-format/core/bodySerializer.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/valibot/v1/__snapshots__/3.1.x/type-format/core/params.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/valibot/v1/__snapshots__/3.1.x/type-format/core/pathSerializer.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/valibot/v1/__snapshots__/3.1.x/type-format/core/queryKeySerializer.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\n/**\n * JSON-friendly union that mirrors what Pinia Colada can hash.\n */\nexport type JsonValue =\n  | null\n  | string\n  | number\n  | boolean\n  | JsonValue[]\n  | { [key: string]: JsonValue };\n\n/**\n * Replacer that converts non-JSON values (bigint, Date, etc.) to safe substitutes.\n */\nexport const queryKeyJsonReplacer = (_key: string, value: unknown) => {\n  if (value === undefined || typeof value === 'function' || typeof value === 'symbol') {\n    return undefined;\n  }\n  if (typeof value === 'bigint') {\n    return value.toString();\n  }\n  if (value instanceof Date) {\n    return value.toISOString();\n  }\n  return value;\n};\n\n/**\n * Safely stringifies a value and parses it back into a JsonValue.\n */\nexport const stringifyToJsonValue = (input: unknown): JsonValue | undefined => {\n  try {\n    const json = JSON.stringify(input, queryKeyJsonReplacer);\n    if (json === undefined) {\n      return undefined;\n    }\n    return JSON.parse(json) as JsonValue;\n  } catch {\n    return undefined;\n  }\n};\n\n/**\n * Detects plain objects (including objects with a null prototype).\n */\nconst isPlainObject = (value: unknown): value is Record<string, unknown> => {\n  if (value === null || typeof value !== 'object') {\n    return false;\n  }\n  const prototype = Object.getPrototypeOf(value as object);\n  return prototype === Object.prototype || prototype === null;\n};\n\n/**\n * Turns URLSearchParams into a sorted JSON object for deterministic keys.\n */\nconst serializeSearchParams = (params: URLSearchParams): JsonValue => {\n  const entries = Array.from(params.entries()).sort(([a], [b]) => a.localeCompare(b));\n  const result: Record<string, JsonValue> = {};\n\n  for (const [key, value] of entries) {\n    const existing = result[key];\n    if (existing === undefined) {\n      result[key] = value;\n      continue;\n    }\n\n    if (Array.isArray(existing)) {\n      (existing as string[]).push(value);\n    } else {\n      result[key] = [existing, value];\n    }\n  }\n\n  return result;\n};\n\n/**\n * Normalizes any accepted value into a JSON-friendly shape for query keys.\n */\nexport const serializeQueryKeyValue = (value: unknown): JsonValue | undefined => {\n  if (value === null) {\n    return null;\n  }\n\n  if (typeof value === 'string' || typeof value === 'number' || typeof value === 'boolean') {\n    return value;\n  }\n\n  if (value === undefined || typeof value === 'function' || typeof value === 'symbol') {\n    return undefined;\n  }\n\n  if (typeof value === 'bigint') {\n    return value.toString();\n  }\n\n  if (value instanceof Date) {\n    return value.toISOString();\n  }\n\n  if (Array.isArray(value)) {\n    return stringifyToJsonValue(value);\n  }\n\n  if (typeof URLSearchParams !== 'undefined' && value instanceof URLSearchParams) {\n    return serializeSearchParams(value);\n  }\n\n  if (isPlainObject(value)) {\n    return stringifyToJsonValue(value);\n  }\n\n  return undefined;\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/valibot/v1/__snapshots__/3.1.x/type-format/core/serverSentEvents.gen.ts",
    "content": "// 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 const 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            // Normalize line endings: CRLF -> LF, then CR -> LF\n            buffer = buffer.replace(/\\r\\n/g, '\\n').replace(/\\r/g, '\\n');\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"
  },
  {
    "path": "packages/openapi-ts-tests/valibot/v1/__snapshots__/3.1.x/type-format/core/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { Auth, AuthToken } from './auth.gen';\nimport type { BodySerializer, QuerySerializer, QuerySerializerOptions } from './bodySerializer.gen';\n\nexport type HttpMethod =\n  | 'connect'\n  | 'delete'\n  | 'get'\n  | 'head'\n  | 'options'\n  | 'patch'\n  | 'post'\n  | 'put'\n  | 'trace';\n\nexport type Client<\n  RequestFn = never,\n  Config = unknown,\n  MethodFn = never,\n  BuildUrlFn = never,\n  SseFn = never,\n> = {\n  /**\n   * Returns the final request URL.\n   */\n  buildUrl: BuildUrlFn;\n  getConfig: () => Config;\n  request: RequestFn;\n  setConfig: (config: Config) => Config;\n} & {\n  [K in HttpMethod]: MethodFn;\n} & ([SseFn] extends [never] ? { sse?: never } : { sse: { [K in HttpMethod]: SseFn } });\n\nexport interface Config {\n  /**\n   * Auth token or a function returning auth token. The resolved value will be\n   * added to the request payload as defined by its `security` array.\n   */\n  auth?: ((auth: Auth) => Promise<AuthToken> | AuthToken) | AuthToken;\n  /**\n   * A function for serializing request body parameter. By default,\n   * {@link JSON.stringify()} will be used.\n   */\n  bodySerializer?: BodySerializer | null;\n  /**\n   * An object containing any HTTP headers that you want to pre-populate your\n   * `Headers` object with.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/Headers/Headers#init See more}\n   */\n  headers?:\n    | RequestInit['headers']\n    | Record<\n        string,\n        string | number | boolean | (string | number | boolean)[] | null | undefined | unknown\n      >;\n  /**\n   * The request method.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/fetch#method See more}\n   */\n  method?: Uppercase<HttpMethod>;\n  /**\n   * A function for serializing request query parameters. By default, arrays\n   * will be exploded in form style, objects will be exploded in deepObject\n   * style, and reserved characters are percent-encoded.\n   *\n   * This method will have no effect if the native `paramsSerializer()` Axios\n   * API function is used.\n   *\n   * {@link https://swagger.io/docs/specification/serialization/#query View examples}\n   */\n  querySerializer?: QuerySerializer | QuerySerializerOptions;\n  /**\n   * A function validating request data. This is useful if you want to ensure\n   * the request conforms to the desired shape, so it can be safely sent to\n   * the server.\n   */\n  requestValidator?: (data: unknown) => Promise<unknown>;\n  /**\n   * A function transforming response data before it's returned. This is useful\n   * for post-processing data, e.g. converting ISO strings into Date objects.\n   */\n  responseTransformer?: (data: unknown) => Promise<unknown>;\n  /**\n   * A function validating response data. This is useful if you want to ensure\n   * the response conforms to the desired shape, so it can be safely passed to\n   * the transformers and returned to the user.\n   */\n  responseValidator?: (data: unknown) => Promise<unknown>;\n}\n\ntype IsExactlyNeverOrNeverUndefined<T> = [T] extends [never]\n  ? true\n  : [T] extends [never | undefined]\n    ? [undefined] extends [T]\n      ? false\n      : true\n    : false;\n\nexport type OmitNever<T extends Record<string, unknown>> = {\n  [K in keyof T as IsExactlyNeverOrNeverUndefined<T[K]> extends true ? never : K]: T[K];\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/valibot/v1/__snapshots__/3.1.x/type-format/core/utils.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/valibot/v1/__snapshots__/3.1.x/type-format/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport { type Options, postFoo } from './sdk.gen';\nexport type { Bar, ClientOptions, Foo, PostFooData, PostFooResponse, PostFooResponses, TypeID, UserId } from './types.gen';\n"
  },
  {
    "path": "packages/openapi-ts-tests/valibot/v1/__snapshots__/3.1.x/type-format/sdk.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport * as v from 'valibot';\n\nimport type { Client, Options as Options2, TDataShape } from './client';\nimport { client } from './client.gen';\nimport { postFooResponseTransformer } from './transformers.gen';\nimport type { PostFooData, PostFooResponses } from './types.gen';\nimport { vPostFooData, vPostFooResponse } from './valibot.gen';\n\nexport type Options<TData extends TDataShape = TDataShape, ThrowOnError extends boolean = boolean> = Options2<TData, ThrowOnError> & {\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\nexport const postFoo = <ThrowOnError extends boolean = false>(options?: Options<PostFooData, ThrowOnError>) => (options?.client ?? client).post<PostFooResponses, unknown, ThrowOnError>({\n    requestValidator: async (data) => await v.parseAsync(vPostFooData, data),\n    responseTransformer: postFooResponseTransformer,\n    responseValidator: async (data) => await v.parseAsync(vPostFooResponse, data),\n    url: '/foo',\n    ...options\n});\n"
  },
  {
    "path": "packages/openapi-ts-tests/valibot/v1/__snapshots__/3.1.x/type-format/transformers.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { PostFooResponse } from './types.gen';\n\nconst fooSchemaResponseTransformer = (data: any) => {\n    data.foo = BigInt(data.foo.toString());\n    return data;\n};\n\nexport const postFooResponseTransformer = async (data: any): Promise<PostFooResponse> => {\n    data = fooSchemaResponseTransformer(data);\n    return data;\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/valibot/v1/__snapshots__/3.1.x/type-format/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type ClientOptions = {\n    baseUrl: `${string}://${string}` | (string & {});\n};\n\nexport type TypeID<T extends string> = `${T}_${string}`;\n\nexport type UserId = TypeID<'user'>;\n\nexport type Foo = {\n    bar?: number;\n    foo: bigint;\n    id: UserId;\n};\n\nexport type Bar = {\n    foo: number;\n    [key: string]: number;\n};\n\nexport type PostFooData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/foo';\n};\n\nexport type PostFooResponses = {\n    /**\n     * OK\n     */\n    200: Foo;\n};\n\nexport type PostFooResponse = PostFooResponses[keyof PostFooResponses];\n"
  },
  {
    "path": "packages/openapi-ts-tests/valibot/v1/__snapshots__/3.1.x/type-format/valibot.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport * as v from 'valibot';\n\nexport const vFoo = v.object({\n    bar: v.optional(v.pipe(v.number(), v.integer())),\n    foo: v.optional(v.pipe(v.union([\n        v.number(),\n        v.string(),\n        v.bigint()\n    ]), v.transform(x => BigInt(x)), v.minValue(BigInt('-9223372036854775808'), 'Invalid value: Expected int64 to be >= -9223372036854775808'), v.maxValue(BigInt('9223372036854775807'), 'Invalid value: Expected int64 to be <= 9223372036854775807')), BigInt(0)),\n    id: v.string()\n});\n\nexport const vBar = v.objectWithRest({\n    foo: v.pipe(v.number(), v.integer())\n}, v.pipe(v.number(), v.integer()));\n\nexport const vPostFooData = v.object({\n    body: v.optional(v.never()),\n    path: v.optional(v.never()),\n    query: v.optional(v.never())\n});\n\n/**\n * OK\n */\nexport const vPostFooResponse = vFoo;\n"
  },
  {
    "path": "packages/openapi-ts-tests/valibot/v1/__snapshots__/3.1.x/validators/valibot.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport * as v from 'valibot';\n\nexport const vBaz = v.optional(v.pipe(v.pipe(v.string(), v.regex(/foo\\nbar/)), v.readonly()), 'baz');\n\nexport const vQux = v.record(v.string(), v.object({\n    qux: v.optional(v.string())\n}));\n\n/**\n * This is Foo schema.\n */\nexport const vFoo: v.GenericSchema = v.nullish(v.object({\n    foo: v.optional(v.pipe(v.string(), v.regex(/^\\d{3}-\\d{2}-\\d{4}$/))),\n    bar: v.optional(v.lazy(() => vBar)),\n    baz: v.optional(v.array(v.lazy(() => vFoo))),\n    qux: v.optional(v.pipe(v.number(), v.integer(), v.gtValue(0)), 0)\n}), null);\n\n/**\n * This is Bar schema.\n */\nexport const vBar = v.object({\n    foo: v.optional(vFoo)\n});\n\n/**\n * This is Foo parameter.\n */\nexport const vFoo2 = v.string();\n\nexport const vFoo3 = v.object({\n    foo: v.optional(vBar)\n});\n\nexport const vPatchFooData = v.object({\n    body: v.object({\n        foo: v.optional(v.string())\n    }),\n    path: v.optional(v.never()),\n    query: v.optional(v.object({\n        foo: v.optional(v.string()),\n        bar: v.optional(vBar),\n        baz: v.optional(v.object({\n            baz: v.optional(v.string())\n        })),\n        qux: v.optional(v.pipe(v.string(), v.isoDate())),\n        quux: v.optional(v.pipe(v.string(), v.isoTimestamp()))\n    }))\n});\n\nexport const vPostFooData = v.object({\n    body: vFoo3,\n    path: v.optional(v.never()),\n    query: v.optional(v.never())\n});\n"
  },
  {
    "path": "packages/openapi-ts-tests/valibot/v1/__snapshots__/3.1.x/validators-bigint-min-max/valibot.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport * as v from 'valibot';\n\nexport const vFoo = v.object({\n    foo: v.optional(v.pipe(v.union([\n        v.number(),\n        v.string(),\n        v.bigint()\n    ]), v.transform(x => BigInt(x)), v.minValue(BigInt(0)), v.maxValue(BigInt(100))))\n});\n"
  },
  {
    "path": "packages/openapi-ts-tests/valibot/v1/__snapshots__/3.1.x/validators-circular-ref/valibot.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport * as v from 'valibot';\n\nexport const vBar: v.GenericSchema = v.object({\n    bar: v.optional(v.array(v.lazy(() => vBar)))\n});\n\nexport const vFoo = v.object({\n    foo: v.optional(vBar)\n});\n\nexport const vBaz: v.GenericSchema = v.lazy(() => vQux);\n\n/**\n * description caused circular reference error\n */\nexport const vQux = vBaz;\n"
  },
  {
    "path": "packages/openapi-ts-tests/valibot/v1/__snapshots__/3.1.x/validators-circular-ref-2/valibot.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport * as v from 'valibot';\n\nexport const vBar: v.GenericSchema = v.strictObject({\n    bar: v.nullable(v.array(v.lazy(() => vBar)))\n});\n\nexport const vFoo = v.strictObject({\n    foo: vBar\n});\n"
  },
  {
    "path": "packages/openapi-ts-tests/valibot/v1/__snapshots__/3.1.x/validators-metadata/valibot.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport * as v from 'valibot';\n\nexport const vBaz = v.optional(v.pipe(v.pipe(v.string(), v.regex(/foo\\nbar/)), v.readonly()), 'baz');\n\nexport const vQux = v.record(v.string(), v.object({\n    qux: v.optional(v.string())\n}));\n\n/**\n * This is Foo schema.\n */\nexport const vFoo: v.GenericSchema = v.nullish(v.object({\n    foo: v.optional(v.pipe(v.pipe(v.string(), v.regex(/^\\d{3}-\\d{2}-\\d{4}$/)), v.metadata({ description: 'This is foo property.' }))),\n    bar: v.optional(v.lazy(() => vBar)),\n    baz: v.optional(v.pipe(v.array(v.lazy(() => vFoo)), v.metadata({ description: 'This is baz property.' }))),\n    qux: v.optional(v.pipe(v.pipe(v.number(), v.integer(), v.gtValue(0)), v.metadata({ description: 'This is qux property.' })), 0)\n}), null);\n\n/**\n * This is Bar schema.\n */\nexport const vBar = v.pipe(v.object({\n    foo: v.optional(vFoo)\n}), v.metadata({ description: 'This is Bar schema.' }));\n\n/**\n * This is Foo parameter.\n */\nexport const vFoo2 = v.pipe(v.string(), v.metadata({ description: 'This is Foo parameter.' }));\n\nexport const vFoo3 = v.object({\n    foo: v.optional(vBar)\n});\n\nexport const vPatchFooData = v.object({\n    body: v.object({\n        foo: v.optional(v.string())\n    }),\n    path: v.optional(v.never()),\n    query: v.optional(v.object({\n        foo: v.optional(v.pipe(v.string(), v.metadata({ description: 'This is Foo parameter.' }))),\n        bar: v.optional(vBar),\n        baz: v.optional(v.object({\n            baz: v.optional(v.string())\n        })),\n        qux: v.optional(v.pipe(v.string(), v.isoDate())),\n        quux: v.optional(v.pipe(v.string(), v.isoTimestamp()))\n    }))\n});\n\nexport const vPostFooData = v.object({\n    body: vFoo3,\n    path: v.optional(v.never()),\n    query: v.optional(v.never())\n});\n"
  },
  {
    "path": "packages/openapi-ts-tests/valibot/v1/__snapshots__/3.1.x/validators-metadata-fn/valibot.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport * as v from 'valibot';\n\nexport const vBaz = v.optional(v.pipe(v.pipe(v.string(), v.regex(/foo\\nbar/)), v.metadata({ custom: 'value', title: 'string' }), v.readonly()), 'baz');\n\nexport const vQux = v.pipe(v.record(v.string(), v.pipe(v.object({\n    qux: v.optional(v.pipe(v.string(), v.metadata({ custom: 'value', title: 'string' })))\n}), v.metadata({ custom: 'value', title: 'object' }))), v.metadata({ custom: 'value', title: 'object' }));\n\n/**\n * This is Foo schema.\n */\nexport const vFoo: v.GenericSchema = v.nullish(v.pipe(v.object({\n    foo: v.optional(v.pipe(v.pipe(v.string(), v.regex(/^\\d{3}-\\d{2}-\\d{4}$/)), v.metadata({ custom: 'value', title: 'This is foo property.' }))),\n    bar: v.optional(v.lazy(() => vBar)),\n    baz: v.optional(v.pipe(v.array(v.lazy(() => vFoo)), v.metadata({ custom: 'value', title: 'This is baz property.' }))),\n    qux: v.optional(v.pipe(v.pipe(v.number(), v.integer(), v.gtValue(0)), v.metadata({ custom: 'value', title: 'This is qux property.' })), 0)\n}), v.metadata({ custom: 'value', title: 'object' })), null);\n\n/**\n * This is Bar schema.\n */\nexport const vBar = v.pipe(v.object({\n    foo: v.optional(vFoo)\n}), v.metadata({ custom: 'value', title: 'This is Bar schema.' }));\n\n/**\n * This is Foo parameter.\n */\nexport const vFoo2 = v.pipe(v.string(), v.metadata({ custom: 'value', title: 'This is Foo parameter.' }));\n\nexport const vFoo3 = v.pipe(v.object({\n    foo: v.optional(vBar)\n}), v.metadata({ custom: 'value', title: 'object' }));\n\nexport const vPatchFooData = v.pipe(v.object({\n    body: v.pipe(v.object({\n        foo: v.optional(v.pipe(v.string(), v.metadata({ custom: 'value', title: 'string' })))\n    }), v.metadata({ custom: 'value', title: 'object' })),\n    path: v.optional(v.pipe(v.never(), v.metadata({ custom: 'value', title: 'never' }))),\n    query: v.optional(v.pipe(v.object({\n        foo: v.optional(v.pipe(v.string(), v.metadata({ custom: 'value', title: 'This is Foo parameter.' }))),\n        bar: v.optional(vBar),\n        baz: v.optional(v.pipe(v.object({\n            baz: v.optional(v.pipe(v.string(), v.metadata({ custom: 'value', title: 'string' })))\n        }), v.metadata({ custom: 'value', title: 'object' }))),\n        qux: v.optional(v.pipe(v.pipe(v.string(), v.isoDate()), v.metadata({ custom: 'value', title: 'string' }))),\n        quux: v.optional(v.pipe(v.pipe(v.string(), v.isoTimestamp()), v.metadata({ custom: 'value', title: 'string' })))\n    }), v.metadata({ custom: 'value', title: 'object' })))\n}), v.metadata({ custom: 'value', title: 'object' }));\n\nexport const vPostFooData = v.pipe(v.object({\n    body: vFoo3,\n    path: v.optional(v.pipe(v.never(), v.metadata({ custom: 'value', title: 'never' }))),\n    query: v.optional(v.pipe(v.never(), v.metadata({ custom: 'value', title: 'never' })))\n}), v.metadata({ custom: 'value', title: 'object' }));\n"
  },
  {
    "path": "packages/openapi-ts-tests/valibot/v1/__snapshots__/3.1.x/validators-types/valibot.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport * as v from 'valibot';\n\nexport const vBaz = v.optional(v.pipe(v.pipe(v.string(), v.regex(/foo\\nbar/)), v.readonly()), 'baz');\n\nexport const vQux = v.record(v.string(), v.object({\n    qux: v.optional(v.string())\n}));\n\n/**\n * This is Foo schema.\n */\nexport const vFoo: v.GenericSchema = v.nullish(v.object({\n    foo: v.optional(v.pipe(v.string(), v.regex(/^\\d{3}-\\d{2}-\\d{4}$/))),\n    bar: v.optional(v.lazy(() => vBar)),\n    baz: v.optional(v.array(v.lazy(() => vFoo))),\n    qux: v.optional(v.pipe(v.number(), v.integer(), v.gtValue(0)), 0)\n}), null);\n\n/**\n * This is Bar schema.\n */\nexport const vBar = v.object({\n    foo: v.optional(vFoo)\n});\n\n/**\n * This is Foo parameter.\n */\nexport const vFoo2 = v.string();\n\nexport const vFoo3 = v.object({\n    foo: v.optional(vBar)\n});\n\nexport const vPatchFooData = v.object({\n    body: v.object({\n        foo: v.optional(v.string())\n    }),\n    path: v.optional(v.never()),\n    query: v.optional(v.object({\n        foo: v.optional(v.string()),\n        bar: v.optional(vBar),\n        baz: v.optional(v.object({\n            baz: v.optional(v.string())\n        })),\n        qux: v.optional(v.pipe(v.string(), v.isoDate())),\n        quux: v.optional(v.pipe(v.string(), v.isoTimestamp()))\n    }))\n});\n\nexport const vPostFooData = v.object({\n    body: vFoo3,\n    path: v.optional(v.never()),\n    query: v.optional(v.never())\n});\n"
  },
  {
    "path": "packages/openapi-ts-tests/valibot/v1/__snapshots__/3.1.x/validators-union-merge/valibot.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport * as v from 'valibot';\n\nexport const vContact = v.union([v.object({\n        email: v.string()\n    }), v.object({\n        phone: v.string()\n    })]);\n\nexport const vUser = v.intersect([vContact, v.object({\n        username: v.string()\n    })]);\n\nexport const vDogDetails = v.object({\n    breed: v.string(),\n    barkVolume: v.pipe(v.number(), v.integer(), v.minValue(1), v.maxValue(10))\n});\n\nexport const vCatDetails = v.object({\n    furLength: v.picklist([\n        'short',\n        'medium',\n        'long'\n    ]),\n    purrs: v.boolean()\n});\n\nexport const vPetStore = v.object({\n    animals: v.array(v.object({\n        name: v.string(),\n        type: v.optional(v.picklist(['dog', 'cat'])),\n        details: v.union([vDogDetails, vCatDetails])\n    }))\n});\n"
  },
  {
    "path": "packages/openapi-ts-tests/valibot/v1/__snapshots__/3.1.x/webhooks/valibot.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport * as v from 'valibot';\n\nexport const vSessionUserPhoneCalloutRingingWebhookRequest = v.object({\n    body: v.optional(v.strictObject({\n        event: v.string(),\n        event_ts: v.pipe(v.union([\n            v.number(),\n            v.string(),\n            v.bigint()\n        ]), v.transform(x => BigInt(x)), v.minValue(BigInt('-9223372036854775808'), 'Invalid value: Expected int64 to be >= -9223372036854775808'), v.maxValue(BigInt('9223372036854775807'), 'Invalid value: Expected int64 to be <= 9223372036854775807')),\n        payload: v.strictObject({\n            account_id: v.string(),\n            object: v.strictObject({\n                id: v.optional(v.pipe(v.union([\n                    v.number(),\n                    v.string(),\n                    v.bigint()\n                ]), v.transform(x => BigInt(x)), v.minValue(BigInt('-9223372036854775808'), 'Invalid value: Expected int64 to be >= -9223372036854775808'), v.maxValue(BigInt('9223372036854775807'), 'Invalid value: Expected int64 to be <= 9223372036854775807'))),\n                uuid: v.optional(v.string()),\n                session_id: v.string(),\n                session_name: v.string(),\n                session_key: v.string(),\n                user_key: v.string(),\n                host_id: v.string(),\n                participant: v.strictObject({\n                    invitee_name: v.string(),\n                    phone_number: v.pipe(v.union([\n                        v.number(),\n                        v.string(),\n                        v.bigint()\n                    ]), v.transform(x => BigInt(x)), v.minValue(BigInt('-9223372036854775808'), 'Invalid value: Expected int64 to be >= -9223372036854775808'), v.maxValue(BigInt('9223372036854775807'), 'Invalid value: Expected int64 to be <= 9223372036854775807')),\n                    from_number: v.pipe(v.union([\n                        v.number(),\n                        v.string(),\n                        v.bigint()\n                    ]), v.transform(x => BigInt(x)), v.minValue(BigInt('-9223372036854775808'), 'Invalid value: Expected int64 to be >= -9223372036854775808'), v.maxValue(BigInt('9223372036854775807'), 'Invalid value: Expected int64 to be <= 9223372036854775807'))\n                })\n            })\n        })\n    })),\n    path: v.optional(v.never()),\n    query: v.optional(v.never())\n});\n\nexport const vSessionUserRoomSystemCalloutRingingWebhookRequest = v.object({\n    body: v.optional(v.strictObject({\n        event: v.string(),\n        event_ts: v.pipe(v.union([\n            v.number(),\n            v.string(),\n            v.bigint()\n        ]), v.transform(x => BigInt(x)), v.minValue(BigInt('-9223372036854775808'), 'Invalid value: Expected int64 to be >= -9223372036854775808'), v.maxValue(BigInt('9223372036854775807'), 'Invalid value: Expected int64 to be <= 9223372036854775807')),\n        payload: v.strictObject({\n            account_id: v.string(),\n            object: v.strictObject({\n                id: v.optional(v.pipe(v.union([\n                    v.number(),\n                    v.string(),\n                    v.bigint()\n                ]), v.transform(x => BigInt(x)), v.minValue(BigInt('-9223372036854775808'), 'Invalid value: Expected int64 to be >= -9223372036854775808'), v.maxValue(BigInt('9223372036854775807'), 'Invalid value: Expected int64 to be <= 9223372036854775807'))),\n                uuid: v.optional(v.string()),\n                session_id: v.string(),\n                session_name: v.string(),\n                host_id: v.string(),\n                message_id: v.string(),\n                inviter_name: v.string(),\n                participant: v.objectWithRest({\n                    call_type: v.string(),\n                    device_ip: v.string()\n                }, v.unknown())\n            })\n        })\n    })),\n    path: v.optional(v.never()),\n    query: v.optional(v.never())\n});\n\nexport const vSessionRecordingStartedWebhookRequest = v.object({\n    body: v.optional(v.strictObject({\n        event: v.picklist(['session.recording_started']),\n        event_ts: v.pipe(v.union([\n            v.number(),\n            v.string(),\n            v.bigint()\n        ]), v.transform(x => BigInt(x)), v.minValue(BigInt('-9223372036854775808'), 'Invalid value: Expected int64 to be >= -9223372036854775808'), v.maxValue(BigInt('9223372036854775807'), 'Invalid value: Expected int64 to be <= 9223372036854775807')),\n        payload: v.strictObject({\n            account_id: v.string(),\n            object: v.strictObject({\n                session_id: v.string(),\n                session_name: v.string(),\n                session_key: v.string(),\n                start_time: v.pipe(v.string(), v.isoTimestamp()),\n                timezone: v.string(),\n                recording_file: v.object({\n                    recording_start: v.optional(v.string()),\n                    recording_end: v.optional(v.string())\n                })\n            })\n        })\n    })),\n    path: v.optional(v.never()),\n    query: v.optional(v.never())\n});\n\nexport const vSessionRecordingResumedWebhookRequest = v.object({\n    body: v.optional(v.strictObject({\n        event: v.picklist(['session.recording_resumed']),\n        event_ts: v.pipe(v.union([\n            v.number(),\n            v.string(),\n            v.bigint()\n        ]), v.transform(x => BigInt(x)), v.minValue(BigInt('-9223372036854775808'), 'Invalid value: Expected int64 to be >= -9223372036854775808'), v.maxValue(BigInt('9223372036854775807'), 'Invalid value: Expected int64 to be <= 9223372036854775807')),\n        payload: v.strictObject({\n            account_id: v.string(),\n            object: v.strictObject({\n                session_id: v.string(),\n                session_name: v.string(),\n                session_key: v.string(),\n                start_time: v.pipe(v.string(), v.isoTimestamp()),\n                timezone: v.string(),\n                recording_file: v.object({\n                    recording_start: v.optional(v.string()),\n                    recording_end: v.optional(v.string())\n                })\n            })\n        })\n    })),\n    path: v.optional(v.never()),\n    query: v.optional(v.never())\n});\n\nexport const vSessionLiveStreamingStoppedWebhookRequest = v.object({\n    body: v.optional(v.strictObject({\n        event: v.picklist(['session.live_streaming_stopped']),\n        event_ts: v.pipe(v.union([\n            v.number(),\n            v.string(),\n            v.bigint()\n        ]), v.transform(x => BigInt(x)), v.minValue(BigInt('-9223372036854775808'), 'Invalid value: Expected int64 to be >= -9223372036854775808'), v.maxValue(BigInt('9223372036854775807'), 'Invalid value: Expected int64 to be <= 9223372036854775807')),\n        payload: v.strictObject({\n            account_id: v.string(),\n            object: v.strictObject({\n                id: v.string(),\n                session_id: v.string(),\n                session_name: v.string(),\n                session_key: v.optional(v.string()),\n                start_time: v.pipe(v.string(), v.isoTimestamp()),\n                live_streaming: v.object({\n                    service: v.picklist([\n                        'Facebook',\n                        'Workplace_by_Facebook',\n                        'YouTube',\n                        'Custom_Live_Streaming_Service'\n                    ]),\n                    custom_live_streaming_settings: v.object({\n                        stream_url: v.string(),\n                        stream_key: v.string(),\n                        page_url: v.string(),\n                        resolution: v.optional(v.string())\n                    }),\n                    date_time: v.pipe(v.string(), v.isoTimestamp())\n                })\n            })\n        })\n    })),\n    path: v.optional(v.never()),\n    query: v.optional(v.never())\n});\n\nexport const vSessionStreamIngestionStoppedWebhookRequest = v.object({\n    body: v.optional(v.strictObject({\n        event: v.picklist(['session.stream_ingestion_stopped']),\n        event_ts: v.pipe(v.union([\n            v.number(),\n            v.string(),\n            v.bigint()\n        ]), v.transform(x => BigInt(x)), v.minValue(BigInt('-9223372036854775808'), 'Invalid value: Expected int64 to be >= -9223372036854775808'), v.maxValue(BigInt('9223372036854775807'), 'Invalid value: Expected int64 to be <= 9223372036854775807')),\n        payload: v.strictObject({\n            account_id: v.string(),\n            object: v.strictObject({\n                session_id: v.string(),\n                session_name: v.string(),\n                session_key: v.optional(v.string()),\n                stream_ingestion: v.object({\n                    stream_id: v.string(),\n                    stream_name: v.string(),\n                    stream_description: v.optional(v.string()),\n                    stream_key: v.string(),\n                    stream_url: v.string(),\n                    backup_stream_url: v.string()\n                })\n            })\n        })\n    })),\n    path: v.optional(v.never()),\n    query: v.optional(v.never())\n});\n\nexport const vSessionUserRoomSystemCalloutRejectedWebhookRequest = v.object({\n    body: v.optional(v.strictObject({\n        event: v.string(),\n        event_ts: v.pipe(v.union([\n            v.number(),\n            v.string(),\n            v.bigint()\n        ]), v.transform(x => BigInt(x)), v.minValue(BigInt('-9223372036854775808'), 'Invalid value: Expected int64 to be >= -9223372036854775808'), v.maxValue(BigInt('9223372036854775807'), 'Invalid value: Expected int64 to be <= 9223372036854775807')),\n        payload: v.strictObject({\n            account_id: v.string(),\n            object: v.strictObject({\n                id: v.optional(v.pipe(v.union([\n                    v.number(),\n                    v.string(),\n                    v.bigint()\n                ]), v.transform(x => BigInt(x)), v.minValue(BigInt('-9223372036854775808'), 'Invalid value: Expected int64 to be >= -9223372036854775808'), v.maxValue(BigInt('9223372036854775807'), 'Invalid value: Expected int64 to be <= 9223372036854775807'))),\n                uuid: v.optional(v.string()),\n                session_id: v.string(),\n                session_name: v.string(),\n                host_id: v.string(),\n                message_id: v.string(),\n                inviter_name: v.string(),\n                participant: v.objectWithRest({\n                    call_type: v.string(),\n                    device_ip: v.string()\n                }, v.unknown())\n            })\n        })\n    })),\n    path: v.optional(v.never()),\n    query: v.optional(v.never())\n});\n\nexport const vSessionAlertWebhookRequest = v.object({\n    body: v.optional(v.strictObject({\n        event: v.picklist(['session.alert']),\n        event_ts: v.pipe(v.union([\n            v.number(),\n            v.string(),\n            v.bigint()\n        ]), v.transform(x => BigInt(x)), v.minValue(BigInt('-9223372036854775808'), 'Invalid value: Expected int64 to be >= -9223372036854775808'), v.maxValue(BigInt('9223372036854775807'), 'Invalid value: Expected int64 to be <= 9223372036854775807')),\n        payload: v.strictObject({\n            account_id: v.string(),\n            object: v.strictObject({\n                id: v.string(),\n                session_id: v.string(),\n                session_name: v.string(),\n                session_key: v.optional(v.string()),\n                issues: v.array(v.picklist([\n                    'Unstable audio quality',\n                    'Unstable video quality',\n                    'Unstable screen share quality',\n                    'High CPU occupation',\n                    'Call Reconnection'\n                ]))\n            })\n        })\n    })),\n    path: v.optional(v.never()),\n    query: v.optional(v.never())\n});\n\nexport const vSessionSharingEndedWebhookRequest = v.object({\n    body: v.optional(v.strictObject({\n        event: v.picklist(['session.sharing_ended']),\n        event_ts: v.pipe(v.union([\n            v.number(),\n            v.string(),\n            v.bigint()\n        ]), v.transform(x => BigInt(x)), v.minValue(BigInt('-9223372036854775808'), 'Invalid value: Expected int64 to be >= -9223372036854775808'), v.maxValue(BigInt('9223372036854775807'), 'Invalid value: Expected int64 to be <= 9223372036854775807')),\n        payload: v.strictObject({\n            account_id: v.string(),\n            object: v.strictObject({\n                id: v.string(),\n                session_id: v.string(),\n                session_name: v.string(),\n                session_key: v.optional(v.string()),\n                user: v.strictObject({\n                    id: v.string(),\n                    name: v.string(),\n                    user_key: v.optional(v.string()),\n                    sharing_details: v.strictObject({\n                        content: v.picklist([\n                            'application',\n                            'whiteboard',\n                            'desktop',\n                            'unknown'\n                        ]),\n                        date_time: v.pipe(v.string(), v.isoTimestamp())\n                    })\n                })\n            })\n        })\n    })),\n    path: v.optional(v.never()),\n    query: v.optional(v.never())\n});\n\nexport const vSessionRecordingPausedWebhookRequest = v.object({\n    body: v.optional(v.strictObject({\n        event: v.picklist(['session.recording_paused']),\n        event_ts: v.pipe(v.union([\n            v.number(),\n            v.string(),\n            v.bigint()\n        ]), v.transform(x => BigInt(x)), v.minValue(BigInt('-9223372036854775808'), 'Invalid value: Expected int64 to be >= -9223372036854775808'), v.maxValue(BigInt('9223372036854775807'), 'Invalid value: Expected int64 to be <= 9223372036854775807')),\n        payload: v.strictObject({\n            account_id: v.string(),\n            object: v.strictObject({\n                session_id: v.string(),\n                session_name: v.string(),\n                session_key: v.string(),\n                start_time: v.pipe(v.string(), v.isoTimestamp()),\n                timezone: v.string(),\n                recording_file: v.object({\n                    recording_start: v.optional(v.string()),\n                    recording_end: v.optional(v.string())\n                })\n            })\n        })\n    })),\n    path: v.optional(v.never()),\n    query: v.optional(v.never())\n});\n\nexport const vSessionEndedWebhookRequest = v.object({\n    body: v.optional(v.strictObject({\n        event: v.picklist(['session.ended']),\n        event_ts: v.pipe(v.union([\n            v.number(),\n            v.string(),\n            v.bigint()\n        ]), v.transform(x => BigInt(x)), v.minValue(BigInt('-9223372036854775808'), 'Invalid value: Expected int64 to be >= -9223372036854775808'), v.maxValue(BigInt('9223372036854775807'), 'Invalid value: Expected int64 to be <= 9223372036854775807')),\n        payload: v.strictObject({\n            account_id: v.string(),\n            object: v.strictObject({\n                id: v.string(),\n                session_id: v.string(),\n                session_name: v.string(),\n                session_key: v.optional(v.string()),\n                start_time: v.pipe(v.string(), v.isoTimestamp()),\n                end_time: v.pipe(v.string(), v.isoTimestamp())\n            })\n        })\n    })),\n    path: v.optional(v.never()),\n    query: v.optional(v.never())\n});\n\nexport const vSessionStartedWebhookRequest = v.object({\n    body: v.optional(v.strictObject({\n        event: v.picklist(['session.started']),\n        event_ts: v.pipe(v.union([\n            v.number(),\n            v.string(),\n            v.bigint()\n        ]), v.transform(x => BigInt(x)), v.minValue(BigInt('-9223372036854775808'), 'Invalid value: Expected int64 to be >= -9223372036854775808'), v.maxValue(BigInt('9223372036854775807'), 'Invalid value: Expected int64 to be <= 9223372036854775807')),\n        payload: v.strictObject({\n            account_id: v.string(),\n            object: v.strictObject({\n                id: v.string(),\n                session_id: v.string(),\n                session_name: v.string(),\n                session_key: v.optional(v.string()),\n                start_time: v.pipe(v.string(), v.isoTimestamp())\n            })\n        })\n    })),\n    path: v.optional(v.never()),\n    query: v.optional(v.never())\n});\n\nexport const vSessionStreamIngestionUnbindWebhookRequest = v.object({\n    body: v.optional(v.strictObject({\n        event: v.picklist(['session.stream_ingestion_unbind']),\n        event_ts: v.pipe(v.union([\n            v.number(),\n            v.string(),\n            v.bigint()\n        ]), v.transform(x => BigInt(x)), v.minValue(BigInt('-9223372036854775808'), 'Invalid value: Expected int64 to be >= -9223372036854775808'), v.maxValue(BigInt('9223372036854775807'), 'Invalid value: Expected int64 to be <= 9223372036854775807')),\n        payload: v.strictObject({\n            account_id: v.string(),\n            object: v.strictObject({\n                session_id: v.string(),\n                session_name: v.string(),\n                session_key: v.optional(v.string()),\n                stream_ingestion: v.object({\n                    stream_id: v.string(),\n                    stream_name: v.string(),\n                    stream_description: v.optional(v.string()),\n                    stream_key: v.string(),\n                    stream_url: v.string(),\n                    backup_stream_url: v.string()\n                })\n            })\n        })\n    })),\n    path: v.optional(v.never()),\n    query: v.optional(v.never())\n});\n\nexport const vSessionLiveStreamingStartedWebhookRequest = v.object({\n    body: v.optional(v.strictObject({\n        event: v.picklist(['session.live_streaming_started']),\n        event_ts: v.pipe(v.union([\n            v.number(),\n            v.string(),\n            v.bigint()\n        ]), v.transform(x => BigInt(x)), v.minValue(BigInt('-9223372036854775808'), 'Invalid value: Expected int64 to be >= -9223372036854775808'), v.maxValue(BigInt('9223372036854775807'), 'Invalid value: Expected int64 to be <= 9223372036854775807')),\n        payload: v.strictObject({\n            account_id: v.string(),\n            object: v.strictObject({\n                id: v.string(),\n                session_id: v.string(),\n                session_name: v.string(),\n                session_key: v.optional(v.string()),\n                start_time: v.pipe(v.string(), v.isoTimestamp()),\n                live_streaming: v.object({\n                    service: v.picklist([\n                        'Facebook',\n                        'Workplace_by_Facebook',\n                        'YouTube',\n                        'Custom_Live_Streaming_Service'\n                    ]),\n                    custom_live_streaming_settings: v.object({\n                        stream_url: v.string(),\n                        stream_key: v.string(),\n                        page_url: v.string(),\n                        resolution: v.optional(v.string())\n                    }),\n                    date_time: v.pipe(v.string(), v.isoTimestamp())\n                })\n            })\n        })\n    })),\n    path: v.optional(v.never()),\n    query: v.optional(v.never())\n});\n\nexport const vSessionUserRoomSystemCalloutMissedWebhookRequest = v.object({\n    body: v.optional(v.strictObject({\n        event: v.string(),\n        event_ts: v.pipe(v.union([\n            v.number(),\n            v.string(),\n            v.bigint()\n        ]), v.transform(x => BigInt(x)), v.minValue(BigInt('-9223372036854775808'), 'Invalid value: Expected int64 to be >= -9223372036854775808'), v.maxValue(BigInt('9223372036854775807'), 'Invalid value: Expected int64 to be <= 9223372036854775807')),\n        payload: v.strictObject({\n            account_id: v.string(),\n            object: v.strictObject({\n                id: v.optional(v.pipe(v.union([\n                    v.number(),\n                    v.string(),\n                    v.bigint()\n                ]), v.transform(x => BigInt(x)), v.minValue(BigInt('-9223372036854775808'), 'Invalid value: Expected int64 to be >= -9223372036854775808'), v.maxValue(BigInt('9223372036854775807'), 'Invalid value: Expected int64 to be <= 9223372036854775807'))),\n                uuid: v.optional(v.string()),\n                session_id: v.string(),\n                session_name: v.string(),\n                host_id: v.string(),\n                message_id: v.string(),\n                inviter_name: v.string(),\n                participant: v.objectWithRest({\n                    call_type: v.string(),\n                    device_ip: v.string()\n                }, v.unknown())\n            })\n        })\n    })),\n    path: v.optional(v.never()),\n    query: v.optional(v.never())\n});\n\nexport const vSessionUserPhoneCalloutAcceptedWebhookRequest = v.object({\n    body: v.optional(v.strictObject({\n        event: v.string(),\n        event_ts: v.pipe(v.union([\n            v.number(),\n            v.string(),\n            v.bigint()\n        ]), v.transform(x => BigInt(x)), v.minValue(BigInt('-9223372036854775808'), 'Invalid value: Expected int64 to be >= -9223372036854775808'), v.maxValue(BigInt('9223372036854775807'), 'Invalid value: Expected int64 to be <= 9223372036854775807')),\n        payload: v.strictObject({\n            account_id: v.string(),\n            object: v.strictObject({\n                id: v.optional(v.pipe(v.union([\n                    v.number(),\n                    v.string(),\n                    v.bigint()\n                ]), v.transform(x => BigInt(x)), v.minValue(BigInt('-9223372036854775808'), 'Invalid value: Expected int64 to be >= -9223372036854775808'), v.maxValue(BigInt('9223372036854775807'), 'Invalid value: Expected int64 to be <= 9223372036854775807'))),\n                uuid: v.optional(v.string()),\n                session_id: v.string(),\n                session_name: v.string(),\n                session_key: v.string(),\n                user_key: v.string(),\n                host_id: v.string(),\n                participant: v.strictObject({\n                    invitee_name: v.string(),\n                    phone_number: v.pipe(v.union([\n                        v.number(),\n                        v.string(),\n                        v.bigint()\n                    ]), v.transform(x => BigInt(x)), v.minValue(BigInt('-9223372036854775808'), 'Invalid value: Expected int64 to be >= -9223372036854775808'), v.maxValue(BigInt('9223372036854775807'), 'Invalid value: Expected int64 to be <= 9223372036854775807')),\n                    from_number: v.pipe(v.union([\n                        v.number(),\n                        v.string(),\n                        v.bigint()\n                    ]), v.transform(x => BigInt(x)), v.minValue(BigInt('-9223372036854775808'), 'Invalid value: Expected int64 to be >= -9223372036854775808'), v.maxValue(BigInt('9223372036854775807'), 'Invalid value: Expected int64 to be <= 9223372036854775807'))\n                })\n            })\n        })\n    })),\n    path: v.optional(v.never()),\n    query: v.optional(v.never())\n});\n\nexport const vSessionUserLeftWebhookRequest = v.object({\n    body: v.optional(v.strictObject({\n        event: v.picklist(['session.user_left']),\n        event_ts: v.pipe(v.union([\n            v.number(),\n            v.string(),\n            v.bigint()\n        ]), v.transform(x => BigInt(x)), v.minValue(BigInt('-9223372036854775808'), 'Invalid value: Expected int64 to be >= -9223372036854775808'), v.maxValue(BigInt('9223372036854775807'), 'Invalid value: Expected int64 to be <= 9223372036854775807')),\n        payload: v.strictObject({\n            account_id: v.string(),\n            object: v.strictObject({\n                id: v.string(),\n                session_id: v.string(),\n                session_name: v.string(),\n                session_key: v.optional(v.string()),\n                user: v.strictObject({\n                    id: v.string(),\n                    name: v.string(),\n                    leave_time: v.pipe(v.string(), v.isoTimestamp()),\n                    leave_reason: v.optional(v.string()),\n                    user_key: v.optional(v.string()),\n                    phone_number: v.optional(v.string()),\n                    participant_uuid: v.string()\n                })\n            })\n        })\n    })),\n    path: v.optional(v.never()),\n    query: v.optional(v.never())\n});\n\nexport const vSessionSharingStartedWebhookRequest = v.object({\n    body: v.optional(v.strictObject({\n        event: v.picklist(['session.sharing_started']),\n        event_ts: v.pipe(v.union([\n            v.number(),\n            v.string(),\n            v.bigint()\n        ]), v.transform(x => BigInt(x)), v.minValue(BigInt('-9223372036854775808'), 'Invalid value: Expected int64 to be >= -9223372036854775808'), v.maxValue(BigInt('9223372036854775807'), 'Invalid value: Expected int64 to be <= 9223372036854775807')),\n        payload: v.strictObject({\n            account_id: v.string(),\n            object: v.strictObject({\n                id: v.string(),\n                session_id: v.string(),\n                session_name: v.string(),\n                session_key: v.optional(v.string()),\n                user: v.strictObject({\n                    id: v.string(),\n                    name: v.string(),\n                    user_key: v.optional(v.string()),\n                    sharing_details: v.strictObject({\n                        content: v.picklist([\n                            'application',\n                            'whiteboard',\n                            'desktop',\n                            'unknown'\n                        ]),\n                        date_time: v.pipe(v.string(), v.isoTimestamp())\n                    })\n                })\n            })\n        })\n    })),\n    path: v.optional(v.never()),\n    query: v.optional(v.never())\n});\n\nexport const vSessionUserPhoneCalloutCanceledWebhookRequest = v.object({\n    body: v.optional(v.strictObject({\n        event: v.string(),\n        event_ts: v.pipe(v.union([\n            v.number(),\n            v.string(),\n            v.bigint()\n        ]), v.transform(x => BigInt(x)), v.minValue(BigInt('-9223372036854775808'), 'Invalid value: Expected int64 to be >= -9223372036854775808'), v.maxValue(BigInt('9223372036854775807'), 'Invalid value: Expected int64 to be <= 9223372036854775807')),\n        payload: v.strictObject({\n            account_id: v.string(),\n            object: v.strictObject({\n                session_id: v.string(),\n                session_name: v.string(),\n                session_key: v.string(),\n                user_key: v.string(),\n                participant: v.strictObject({\n                    invitee_name: v.string(),\n                    phone_number: v.pipe(v.union([\n                        v.number(),\n                        v.string(),\n                        v.bigint()\n                    ]), v.transform(x => BigInt(x)), v.minValue(BigInt('-9223372036854775808'), 'Invalid value: Expected int64 to be >= -9223372036854775808'), v.maxValue(BigInt('9223372036854775807'), 'Invalid value: Expected int64 to be <= 9223372036854775807')),\n                    from_number: v.pipe(v.union([\n                        v.number(),\n                        v.string(),\n                        v.bigint()\n                    ]), v.transform(x => BigInt(x)), v.minValue(BigInt('-9223372036854775808'), 'Invalid value: Expected int64 to be >= -9223372036854775808'), v.maxValue(BigInt('9223372036854775807'), 'Invalid value: Expected int64 to be <= 9223372036854775807'))\n                })\n            })\n        })\n    })),\n    path: v.optional(v.never()),\n    query: v.optional(v.never())\n});\n\nexport const vSessionRecordingTranscriptCompletedWebhookRequest = v.object({\n    body: v.optional(v.strictObject({\n        event: v.picklist(['session.recording_transcript_completed']),\n        event_ts: v.pipe(v.union([\n            v.number(),\n            v.string(),\n            v.bigint()\n        ]), v.transform(x => BigInt(x)), v.minValue(BigInt('-9223372036854775808'), 'Invalid value: Expected int64 to be >= -9223372036854775808'), v.maxValue(BigInt('9223372036854775807'), 'Invalid value: Expected int64 to be <= 9223372036854775807')),\n        download_token: v.string(),\n        payload: v.strictObject({\n            account_id: v.string(),\n            object: v.strictObject({\n                session_id: v.string(),\n                session_name: v.string(),\n                session_key: v.string(),\n                start_time: v.pipe(v.string(), v.isoTimestamp()),\n                timezone: v.string(),\n                recording_files: v.array(v.object({\n                    id: v.optional(v.string()),\n                    recording_start: v.optional(v.string()),\n                    recording_end: v.optional(v.string()),\n                    file_name: v.optional(v.string()),\n                    file_path: v.optional(v.string()),\n                    file_type: v.optional(v.picklist([\n                        'MP4',\n                        'M4A',\n                        'CHAT',\n                        'TRANSCRIPT',\n                        'CSV',\n                        'CC',\n                        'TB',\n                        'CHAT_MESSAGE',\n                        'TIMELINE'\n                    ])),\n                    file_size: v.optional(v.number()),\n                    file_extension: v.optional(v.picklist([\n                        'MP4',\n                        'M4A',\n                        'TXT',\n                        'VTT',\n                        'CSV',\n                        'JSON',\n                        'JPG'\n                    ])),\n                    download_url: v.optional(v.string()),\n                    status: v.optional(v.picklist(['completed'])),\n                    recording_type: v.optional(v.picklist([\n                        'shared_screen_with_speaker_view(CC)',\n                        'shared_screen_with_speaker_view',\n                        'shared_screen_with_gallery_view',\n                        'gallery_view',\n                        'shared_screen',\n                        'audio_only',\n                        'audio_transcript',\n                        'chat_file',\n                        'active_speaker',\n                        'host_video',\n                        'audio_only_each_participant',\n                        'cc_transcript',\n                        'closed_caption',\n                        'poll',\n                        'timeline',\n                        'thumbnail',\n                        'chat_message'\n                    ]))\n                }))\n            })\n        })\n    })),\n    path: v.optional(v.never()),\n    query: v.optional(v.never())\n});\n\nexport const vSessionRecordingDeletedWebhookRequest = v.object({\n    body: v.optional(v.strictObject({\n        event: v.picklist(['session.recording_deleted']),\n        event_ts: v.pipe(v.union([\n            v.number(),\n            v.string(),\n            v.bigint()\n        ]), v.transform(x => BigInt(x)), v.minValue(BigInt('-9223372036854775808'), 'Invalid value: Expected int64 to be >= -9223372036854775808'), v.maxValue(BigInt('9223372036854775807'), 'Invalid value: Expected int64 to be <= 9223372036854775807')),\n        payload: v.strictObject({\n            account_id: v.string(),\n            operator: v.pipe(v.string(), v.email()),\n            operator_id: v.string(),\n            object: v.strictObject({\n                session_id: v.string(),\n                session_name: v.string(),\n                session_key: v.string(),\n                start_time: v.pipe(v.string(), v.isoTimestamp()),\n                timezone: v.string()\n            })\n        })\n    })),\n    path: v.optional(v.never()),\n    query: v.optional(v.never())\n});\n\nexport const vSessionUserRoomSystemCalloutFailedWebhookRequest = v.object({\n    body: v.optional(v.strictObject({\n        event: v.string(),\n        event_ts: v.pipe(v.union([\n            v.number(),\n            v.string(),\n            v.bigint()\n        ]), v.transform(x => BigInt(x)), v.minValue(BigInt('-9223372036854775808'), 'Invalid value: Expected int64 to be >= -9223372036854775808'), v.maxValue(BigInt('9223372036854775807'), 'Invalid value: Expected int64 to be <= 9223372036854775807')),\n        payload: v.strictObject({\n            account_id: v.string(),\n            object: v.strictObject({\n                id: v.optional(v.pipe(v.union([\n                    v.number(),\n                    v.string(),\n                    v.bigint()\n                ]), v.transform(x => BigInt(x)), v.minValue(BigInt('-9223372036854775808'), 'Invalid value: Expected int64 to be >= -9223372036854775808'), v.maxValue(BigInt('9223372036854775807'), 'Invalid value: Expected int64 to be <= 9223372036854775807'))),\n                uuid: v.optional(v.string()),\n                session_id: v.string(),\n                session_name: v.string(),\n                host_id: v.string(),\n                message_id: v.string(),\n                inviter_name: v.string(),\n                reason_type: v.unknown(),\n                participant: v.objectWithRest({\n                    call_type: v.string(),\n                    device_ip: v.string()\n                }, v.unknown())\n            })\n        })\n    })),\n    path: v.optional(v.never()),\n    query: v.optional(v.never())\n});\n\nexport const vSessionRecordingCompletedWebhookRequest = v.object({\n    body: v.optional(v.strictObject({\n        event: v.picklist(['session.recording_completed']),\n        event_ts: v.pipe(v.union([\n            v.number(),\n            v.string(),\n            v.bigint()\n        ]), v.transform(x => BigInt(x)), v.minValue(BigInt('-9223372036854775808'), 'Invalid value: Expected int64 to be >= -9223372036854775808'), v.maxValue(BigInt('9223372036854775807'), 'Invalid value: Expected int64 to be <= 9223372036854775807')),\n        download_token: v.string(),\n        payload: v.strictObject({\n            account_id: v.string(),\n            object: v.strictObject({\n                session_id: v.string(),\n                session_name: v.string(),\n                session_key: v.string(),\n                start_time: v.pipe(v.string(), v.isoTimestamp()),\n                timezone: v.string(),\n                recording_files: v.array(v.object({\n                    id: v.optional(v.string()),\n                    recording_start: v.optional(v.string()),\n                    recording_end: v.optional(v.string()),\n                    file_name: v.optional(v.string()),\n                    file_path: v.optional(v.string()),\n                    file_type: v.optional(v.picklist([\n                        'MP4',\n                        'M4A',\n                        'CHAT',\n                        'TRANSCRIPT',\n                        'CSV',\n                        'CC',\n                        'TB',\n                        'CHAT_MESSAGE'\n                    ])),\n                    file_size: v.optional(v.number()),\n                    file_extension: v.optional(v.picklist([\n                        'MP4',\n                        'M4A',\n                        'TXT',\n                        'VTT',\n                        'CSV',\n                        'JSON',\n                        'JPG'\n                    ])),\n                    download_url: v.optional(v.string()),\n                    status: v.optional(v.picklist(['completed'])),\n                    recording_type: v.optional(v.picklist([\n                        'shared_screen_with_speaker_view(CC)',\n                        'shared_screen_with_speaker_view',\n                        'shared_screen_with_gallery_view',\n                        'gallery_view',\n                        'shared_screen',\n                        'audio_only',\n                        'audio_transcript',\n                        'chat_file',\n                        'active_speaker',\n                        'host_video',\n                        'audio_only_each_participant',\n                        'cc_transcript',\n                        'closed_caption',\n                        'poll',\n                        'timeline',\n                        'thumbnail',\n                        'chat_message'\n                    ]))\n                })),\n                participant_audio_files: v.optional(v.array(v.object({\n                    id: v.optional(v.string()),\n                    recording_start: v.optional(v.string()),\n                    recording_end: v.optional(v.string()),\n                    file_name: v.optional(v.string()),\n                    file_path: v.optional(v.string()),\n                    file_type: v.optional(v.picklist([\n                        'MP4',\n                        'M4A',\n                        'CHAT',\n                        'TRANSCRIPT',\n                        'CSV',\n                        'CC',\n                        'TB',\n                        'CHAT_MESSAGE'\n                    ])),\n                    file_size: v.optional(v.number()),\n                    file_extension: v.optional(v.picklist([\n                        'MP4',\n                        'M4A',\n                        'TXT',\n                        'VTT',\n                        'CSV',\n                        'JSON',\n                        'JPG'\n                    ])),\n                    download_url: v.optional(v.string()),\n                    status: v.optional(v.picklist(['completed'])),\n                    recording_type: v.optional(v.picklist([\n                        'shared_screen_with_speaker_view(CC)',\n                        'shared_screen_with_speaker_view',\n                        'shared_screen_with_gallery_view',\n                        'gallery_view',\n                        'shared_screen',\n                        'audio_only',\n                        'audio_transcript',\n                        'chat_file',\n                        'active_speaker',\n                        'host_video',\n                        'audio_only_each_participant',\n                        'cc_transcript',\n                        'closed_caption',\n                        'poll',\n                        'timeline',\n                        'thumbnail',\n                        'chat_message'\n                    ])),\n                    user_id: v.optional(v.string()),\n                    user_key: v.optional(v.string())\n                }))),\n                participant_video_files: v.optional(v.array(v.object({\n                    id: v.optional(v.string()),\n                    recording_start: v.optional(v.string()),\n                    recording_end: v.optional(v.string()),\n                    file_name: v.optional(v.string()),\n                    file_path: v.optional(v.string()),\n                    file_type: v.optional(v.picklist(['MP4'])),\n                    file_size: v.optional(v.number()),\n                    file_extension: v.optional(v.picklist(['MP4'])),\n                    download_url: v.optional(v.string()),\n                    status: v.optional(v.picklist(['completed'])),\n                    recording_type: v.optional(v.picklist(['individual_user', 'individual_shared_screen'])),\n                    user_id: v.optional(v.string()),\n                    user_key: v.optional(v.string())\n                })))\n            })\n        })\n    })),\n    path: v.optional(v.never()),\n    query: v.optional(v.never())\n});\n\nexport const vSessionRecordingTranscriptFailedWebhookRequest = v.object({\n    body: v.optional(v.strictObject({\n        event: v.picklist(['session.recording_transcript_failed']),\n        event_ts: v.pipe(v.union([\n            v.number(),\n            v.string(),\n            v.bigint()\n        ]), v.transform(x => BigInt(x)), v.minValue(BigInt('-9223372036854775808'), 'Invalid value: Expected int64 to be >= -9223372036854775808'), v.maxValue(BigInt('9223372036854775807'), 'Invalid value: Expected int64 to be <= 9223372036854775807')),\n        payload: v.strictObject({\n            account_id: v.string(),\n            object: v.strictObject({\n                session_id: v.string(),\n                session_name: v.string(),\n                session_key: v.string(),\n                start_time: v.pipe(v.string(), v.isoTimestamp()),\n                timezone: v.string()\n            })\n        })\n    })),\n    path: v.optional(v.never()),\n    query: v.optional(v.never())\n});\n\nexport const vSessionRecordingTrashedWebhookRequest = v.object({\n    body: v.optional(v.strictObject({\n        event: v.picklist(['session.recording_trashed']),\n        event_ts: v.pipe(v.union([\n            v.number(),\n            v.string(),\n            v.bigint()\n        ]), v.transform(x => BigInt(x)), v.minValue(BigInt('-9223372036854775808'), 'Invalid value: Expected int64 to be >= -9223372036854775808'), v.maxValue(BigInt('9223372036854775807'), 'Invalid value: Expected int64 to be <= 9223372036854775807')),\n        payload: v.strictObject({\n            account_id: v.string(),\n            operator: v.pipe(v.string(), v.email()),\n            operator_id: v.string(),\n            object: v.strictObject({\n                session_id: v.string(),\n                session_name: v.string(),\n                session_key: v.string(),\n                start_time: v.pipe(v.string(), v.isoTimestamp()),\n                timezone: v.string()\n            })\n        })\n    })),\n    path: v.optional(v.never()),\n    query: v.optional(v.never())\n});\n\nexport const vSessionUserJoinedWebhookRequest = v.object({\n    body: v.optional(v.strictObject({\n        event: v.picklist(['session.user_joined']),\n        event_ts: v.pipe(v.union([\n            v.number(),\n            v.string(),\n            v.bigint()\n        ]), v.transform(x => BigInt(x)), v.minValue(BigInt('-9223372036854775808'), 'Invalid value: Expected int64 to be >= -9223372036854775808'), v.maxValue(BigInt('9223372036854775807'), 'Invalid value: Expected int64 to be <= 9223372036854775807')),\n        payload: v.strictObject({\n            account_id: v.string(),\n            object: v.strictObject({\n                id: v.string(),\n                session_id: v.string(),\n                session_name: v.string(),\n                session_key: v.optional(v.string()),\n                user: v.strictObject({\n                    id: v.string(),\n                    name: v.string(),\n                    join_time: v.pipe(v.string(), v.isoTimestamp()),\n                    user_key: v.optional(v.string()),\n                    phone_number: v.optional(v.string()),\n                    participant_uuid: v.string()\n                })\n            })\n        })\n    })),\n    path: v.optional(v.never()),\n    query: v.optional(v.never())\n});\n\nexport const vSessionStreamIngestionStartedWebhookRequest = v.object({\n    body: v.optional(v.strictObject({\n        event: v.picklist(['session.stream_ingestion_started']),\n        event_ts: v.pipe(v.union([\n            v.number(),\n            v.string(),\n            v.bigint()\n        ]), v.transform(x => BigInt(x)), v.minValue(BigInt('-9223372036854775808'), 'Invalid value: Expected int64 to be >= -9223372036854775808'), v.maxValue(BigInt('9223372036854775807'), 'Invalid value: Expected int64 to be <= 9223372036854775807')),\n        payload: v.strictObject({\n            account_id: v.string(),\n            object: v.strictObject({\n                session_id: v.string(),\n                session_name: v.string(),\n                session_key: v.optional(v.string()),\n                stream_ingestion: v.object({\n                    stream_id: v.string(),\n                    stream_name: v.string(),\n                    stream_description: v.optional(v.string()),\n                    stream_key: v.string(),\n                    stream_url: v.string(),\n                    backup_stream_url: v.string()\n                })\n            })\n        })\n    })),\n    path: v.optional(v.never()),\n    query: v.optional(v.never())\n});\n\nexport const vSessionStreamIngestionConnectedWebhookRequest = v.object({\n    body: v.optional(v.strictObject({\n        event: v.picklist(['session.stream_ingestion_connected']),\n        event_ts: v.pipe(v.union([\n            v.number(),\n            v.string(),\n            v.bigint()\n        ]), v.transform(x => BigInt(x)), v.minValue(BigInt('-9223372036854775808'), 'Invalid value: Expected int64 to be >= -9223372036854775808'), v.maxValue(BigInt('9223372036854775807'), 'Invalid value: Expected int64 to be <= 9223372036854775807')),\n        payload: v.strictObject({\n            account_id: v.string(),\n            object: v.strictObject({\n                session_id: v.string(),\n                session_name: v.string(),\n                session_key: v.optional(v.string()),\n                stream_ingestion: v.object({\n                    stream_id: v.string(),\n                    stream_name: v.string(),\n                    stream_description: v.optional(v.string()),\n                    stream_key: v.string(),\n                    stream_url: v.string(),\n                    backup_stream_url: v.string()\n                })\n            })\n        })\n    })),\n    path: v.optional(v.never()),\n    query: v.optional(v.never())\n});\n\nexport const vSessionStreamIngestionDisconnectedWebhookRequest = v.object({\n    body: v.optional(v.strictObject({\n        event: v.picklist(['session.stream_ingestion_disconnected']),\n        event_ts: v.pipe(v.union([\n            v.number(),\n            v.string(),\n            v.bigint()\n        ]), v.transform(x => BigInt(x)), v.minValue(BigInt('-9223372036854775808'), 'Invalid value: Expected int64 to be >= -9223372036854775808'), v.maxValue(BigInt('9223372036854775807'), 'Invalid value: Expected int64 to be <= 9223372036854775807')),\n        payload: v.strictObject({\n            account_id: v.string(),\n            object: v.strictObject({\n                session_id: v.string(),\n                session_name: v.string(),\n                session_key: v.optional(v.string()),\n                stream_ingestion: v.object({\n                    stream_id: v.string(),\n                    stream_name: v.string(),\n                    stream_description: v.optional(v.string()),\n                    stream_key: v.string(),\n                    stream_url: v.string(),\n                    backup_stream_url: v.string()\n                })\n            })\n        })\n    })),\n    path: v.optional(v.never()),\n    query: v.optional(v.never())\n});\n\nexport const vSessionRecordingRecoveredWebhookRequest = v.object({\n    body: v.optional(v.strictObject({\n        event: v.picklist(['session.recording_recovered']),\n        event_ts: v.pipe(v.union([\n            v.number(),\n            v.string(),\n            v.bigint()\n        ]), v.transform(x => BigInt(x)), v.minValue(BigInt('-9223372036854775808'), 'Invalid value: Expected int64 to be >= -9223372036854775808'), v.maxValue(BigInt('9223372036854775807'), 'Invalid value: Expected int64 to be <= 9223372036854775807')),\n        payload: v.strictObject({\n            account_id: v.string(),\n            operator: v.pipe(v.string(), v.email()),\n            operator_id: v.string(),\n            object: v.strictObject({\n                session_id: v.string(),\n                session_name: v.string(),\n                session_key: v.string(),\n                start_time: v.pipe(v.string(), v.isoTimestamp()),\n                timezone: v.string()\n            })\n        })\n    })),\n    path: v.optional(v.never()),\n    query: v.optional(v.never())\n});\n\nexport const vSessionUserPhoneCalloutMissedWebhookRequest = v.object({\n    body: v.optional(v.strictObject({\n        event: v.string(),\n        event_ts: v.pipe(v.union([\n            v.number(),\n            v.string(),\n            v.bigint()\n        ]), v.transform(x => BigInt(x)), v.minValue(BigInt('-9223372036854775808'), 'Invalid value: Expected int64 to be >= -9223372036854775808'), v.maxValue(BigInt('9223372036854775807'), 'Invalid value: Expected int64 to be <= 9223372036854775807')),\n        payload: v.strictObject({\n            account_id: v.string(),\n            object: v.strictObject({\n                id: v.optional(v.pipe(v.union([\n                    v.number(),\n                    v.string(),\n                    v.bigint()\n                ]), v.transform(x => BigInt(x)), v.minValue(BigInt('-9223372036854775808'), 'Invalid value: Expected int64 to be >= -9223372036854775808'), v.maxValue(BigInt('9223372036854775807'), 'Invalid value: Expected int64 to be <= 9223372036854775807'))),\n                uuid: v.optional(v.string()),\n                session_id: v.string(),\n                session_name: v.string(),\n                session_key: v.string(),\n                user_key: v.string(),\n                host_id: v.string(),\n                participant: v.strictObject({\n                    invitee_name: v.string(),\n                    phone_number: v.pipe(v.union([\n                        v.number(),\n                        v.string(),\n                        v.bigint()\n                    ]), v.transform(x => BigInt(x)), v.minValue(BigInt('-9223372036854775808'), 'Invalid value: Expected int64 to be >= -9223372036854775808'), v.maxValue(BigInt('9223372036854775807'), 'Invalid value: Expected int64 to be <= 9223372036854775807')),\n                    from_number: v.pipe(v.union([\n                        v.number(),\n                        v.string(),\n                        v.bigint()\n                    ]), v.transform(x => BigInt(x)), v.minValue(BigInt('-9223372036854775808'), 'Invalid value: Expected int64 to be >= -9223372036854775808'), v.maxValue(BigInt('9223372036854775807'), 'Invalid value: Expected int64 to be <= 9223372036854775807'))\n                })\n            })\n        })\n    })),\n    path: v.optional(v.never()),\n    query: v.optional(v.never())\n});\n\nexport const vSessionUserPhoneCalloutRejectedWebhookRequest = v.object({\n    body: v.optional(v.strictObject({\n        event: v.string(),\n        event_ts: v.pipe(v.union([\n            v.number(),\n            v.string(),\n            v.bigint()\n        ]), v.transform(x => BigInt(x)), v.minValue(BigInt('-9223372036854775808'), 'Invalid value: Expected int64 to be >= -9223372036854775808'), v.maxValue(BigInt('9223372036854775807'), 'Invalid value: Expected int64 to be <= 9223372036854775807')),\n        payload: v.strictObject({\n            account_id: v.string(),\n            object: v.strictObject({\n                id: v.optional(v.pipe(v.union([\n                    v.number(),\n                    v.string(),\n                    v.bigint()\n                ]), v.transform(x => BigInt(x)), v.minValue(BigInt('-9223372036854775808'), 'Invalid value: Expected int64 to be >= -9223372036854775808'), v.maxValue(BigInt('9223372036854775807'), 'Invalid value: Expected int64 to be <= 9223372036854775807'))),\n                uuid: v.optional(v.string()),\n                session_id: v.string(),\n                session_name: v.string(),\n                session_key: v.string(),\n                user_key: v.string(),\n                host_id: v.string(),\n                participant: v.strictObject({\n                    invitee_name: v.string(),\n                    phone_number: v.pipe(v.union([\n                        v.number(),\n                        v.string(),\n                        v.bigint()\n                    ]), v.transform(x => BigInt(x)), v.minValue(BigInt('-9223372036854775808'), 'Invalid value: Expected int64 to be >= -9223372036854775808'), v.maxValue(BigInt('9223372036854775807'), 'Invalid value: Expected int64 to be <= 9223372036854775807')),\n                    from_number: v.pipe(v.union([\n                        v.number(),\n                        v.string(),\n                        v.bigint()\n                    ]), v.transform(x => BigInt(x)), v.minValue(BigInt('-9223372036854775808'), 'Invalid value: Expected int64 to be >= -9223372036854775808'), v.maxValue(BigInt('9223372036854775807'), 'Invalid value: Expected int64 to be <= 9223372036854775807'))\n                })\n            })\n        })\n    })),\n    path: v.optional(v.never()),\n    query: v.optional(v.never())\n});\n\nexport const vSessionUserRoomSystemCalloutAcceptedWebhookRequest = v.object({\n    body: v.optional(v.strictObject({\n        event: v.string(),\n        event_ts: v.pipe(v.union([\n            v.number(),\n            v.string(),\n            v.bigint()\n        ]), v.transform(x => BigInt(x)), v.minValue(BigInt('-9223372036854775808'), 'Invalid value: Expected int64 to be >= -9223372036854775808'), v.maxValue(BigInt('9223372036854775807'), 'Invalid value: Expected int64 to be <= 9223372036854775807')),\n        payload: v.strictObject({\n            account_id: v.string(),\n            object: v.strictObject({\n                id: v.optional(v.pipe(v.union([\n                    v.number(),\n                    v.string(),\n                    v.bigint()\n                ]), v.transform(x => BigInt(x)), v.minValue(BigInt('-9223372036854775808'), 'Invalid value: Expected int64 to be >= -9223372036854775808'), v.maxValue(BigInt('9223372036854775807'), 'Invalid value: Expected int64 to be <= 9223372036854775807'))),\n                uuid: v.optional(v.string()),\n                session_id: v.string(),\n                session_name: v.string(),\n                host_id: v.string(),\n                message_id: v.string(),\n                inviter_name: v.string(),\n                participant: v.objectWithRest({\n                    call_type: v.string(),\n                    device_ip: v.string()\n                }, v.unknown())\n            })\n        })\n    })),\n    path: v.optional(v.never()),\n    query: v.optional(v.never())\n});\n\nexport const vSessionRecordingStoppedWebhookRequest = v.object({\n    body: v.optional(v.strictObject({\n        event: v.picklist(['session.recording_stopped']),\n        event_ts: v.pipe(v.union([\n            v.number(),\n            v.string(),\n            v.bigint()\n        ]), v.transform(x => BigInt(x)), v.minValue(BigInt('-9223372036854775808'), 'Invalid value: Expected int64 to be >= -9223372036854775808'), v.maxValue(BigInt('9223372036854775807'), 'Invalid value: Expected int64 to be <= 9223372036854775807')),\n        payload: v.strictObject({\n            account_id: v.string(),\n            object: v.strictObject({\n                session_id: v.string(),\n                session_name: v.string(),\n                session_key: v.string(),\n                start_time: v.pipe(v.string(), v.isoTimestamp()),\n                timezone: v.string(),\n                recording_file: v.object({\n                    recording_start: v.optional(v.string()),\n                    recording_end: v.optional(v.string())\n                })\n            })\n        })\n    })),\n    path: v.optional(v.never()),\n    query: v.optional(v.never())\n});\n"
  },
  {
    "path": "packages/openapi-ts-tests/valibot/v1/package.json",
    "content": "{\n  \"name\": \"@test/openapi-ts-valibot-v1\",\n  \"version\": \"0.0.0\",\n  \"private\": true,\n  \"type\": \"module\",\n  \"scripts\": {\n    \"typecheck\": \"tsgo --noEmit\"\n  },\n  \"devDependencies\": {\n    \"@hey-api/openapi-ts\": \"workspace:*\",\n    \"typescript\": \"5.9.3\",\n    \"valibot\": \"1.2.0\"\n  },\n  \"engines\": {\n    \"node\": \">=20.19.0\"\n  }\n}\n"
  },
  {
    "path": "packages/openapi-ts-tests/valibot/v1/test/3.0.x.test.ts",
    "content": "import fs from 'node:fs';\nimport path from 'node:path';\n\nimport { createClient } from '@hey-api/openapi-ts';\n\nimport { getFilePaths } from '../../../utils';\nimport { createValibotConfig, getSnapshotsPath, getTempSnapshotsPath } from './utils';\n\nconst version = '3.0.x';\n\nconst outputDir = path.join(getTempSnapshotsPath(), version);\nconst snapshotsDir = path.join(getSnapshotsPath(), version);\n\ndescribe(`OpenAPI ${version}`, () => {\n  const createConfig = createValibotConfig({ openApiVersion: version, outputDir });\n\n  const scenarios = [\n    {\n      config: createConfig({\n        input: 'array-items-one-of-length-1.yaml',\n        output: 'array-items-one-of-length-1',\n      }),\n      description: 'generates correct array when items are oneOf array with single item',\n    },\n    {\n      config: createConfig({\n        input: 'enum-null.json',\n        output: 'enum-null',\n      }),\n      description: 'handles null enums',\n    },\n    {\n      config: createConfig({\n        input: 'validators.json',\n        output: 'validators',\n      }),\n      description: 'generates validator schemas',\n    },\n  ];\n\n  it.each(scenarios)('$description', async ({ config }) => {\n    await createClient(config);\n\n    const outputString = config.output as string;\n    const filePaths = getFilePaths(outputString);\n\n    await Promise.all(\n      filePaths.map(async (filePath) => {\n        const fileContent = fs.readFileSync(filePath, 'utf-8');\n        await expect(fileContent).toMatchFileSnapshot(\n          path.join(snapshotsDir, filePath.slice(outputDir.length + 1)),\n        );\n      }),\n    );\n  });\n});\n"
  },
  {
    "path": "packages/openapi-ts-tests/valibot/v1/test/3.1.x.test.ts",
    "content": "import fs from 'node:fs';\nimport path from 'node:path';\n\nimport { createClient } from '@hey-api/openapi-ts';\n\nimport { getFilePaths } from '../../../utils';\nimport { createValibotConfig, getSnapshotsPath, getTempSnapshotsPath } from './utils';\n\nconst version = '3.1.x';\n\nconst outputDir = path.join(getTempSnapshotsPath(), version);\nconst snapshotsDir = path.join(getSnapshotsPath(), version);\n\ndescribe(`OpenAPI ${version}`, () => {\n  const createConfig = createValibotConfig({ openApiVersion: version, outputDir });\n\n  const scenarios = [\n    {\n      config: createConfig({\n        input: 'array-items-one-of-length-1.yaml',\n        output: 'array-items-one-of-length-1',\n      }),\n      description: 'generates correct array when items are oneOf array with single item',\n    },\n    {\n      config: createConfig({\n        input: 'enum-null.json',\n        output: 'enum-null',\n      }),\n      description: 'handles null enums',\n    },\n    {\n      config: createConfig({\n        input: 'schema-const.yaml',\n        output: 'schema-const',\n      }),\n      description: 'handles various constants',\n    },\n    {\n      config: createConfig({\n        input: 'validators.yaml',\n        output: 'validators',\n      }),\n      description: 'generates validator schemas',\n    },\n    {\n      config: createConfig({\n        input: 'validators.yaml',\n        output: 'validators-metadata',\n        plugins: [\n          {\n            metadata: true,\n            name: 'valibot',\n          },\n        ],\n      }),\n      description: 'generates validator schemas with metadata',\n    },\n    {\n      config: createConfig({\n        input: 'validators.yaml',\n        output: 'validators-metadata-fn',\n        plugins: [\n          {\n            metadata: ({ $, node, schema }) => {\n              node\n                .prop('custom', $.literal('value'))\n                .prop('title', $.literal(schema.description ?? schema.type ?? ''));\n            },\n            name: 'valibot',\n          },\n        ],\n      }),\n      description: 'generates validator schemas with metadata function',\n    },\n    {\n      config: createConfig({\n        input: 'validators.yaml',\n        output: 'validators-types',\n      }),\n      description: 'generates validator schemas with types',\n    },\n    {\n      config: createConfig({\n        input: 'validators-bigint-min-max.json',\n        output: 'validators-bigint-min-max',\n      }),\n      description: 'validator schemas with BigInt and min/max constraints',\n    },\n    {\n      config: createConfig({\n        input: 'validators-circular-ref.json',\n        output: 'validators-circular-ref',\n      }),\n      description: 'validator schemas with circular reference',\n    },\n    {\n      config: createConfig({\n        input: 'validators-circular-ref-2.yaml',\n        output: 'validators-circular-ref-2',\n      }),\n      description: 'validator schemas with circular reference 2',\n    },\n    {\n      config: createConfig({\n        input: 'validators-union-merge.json',\n        output: 'validators-union-merge',\n      }),\n      description: \"validator schemas with merged unions (can't use .merge())\",\n    },\n    {\n      config: createConfig({\n        input: 'integer-formats.yaml',\n        output: 'integer-formats',\n      }),\n      description:\n        'generates validator schemas for all integer format combinations (number/integer/string types with int8, int16, int32, int64, uint8, uint16, uint32, uint64 formats)',\n    },\n    {\n      config: createConfig({\n        input: 'zoom-video-sdk.json',\n        output: 'webhooks',\n      }),\n      description: 'webhook schemas',\n    },\n    {\n      config: createConfig({\n        input: 'string-with-format.yaml',\n        output: 'string-with-format',\n      }),\n      description: 'anyOf string and binary string',\n    },\n    {\n      config: createConfig({\n        input: 'time-format.yaml',\n        output: 'time-format',\n      }),\n      description: 'generates correct valibot schema for time format',\n    },\n    {\n      config: createConfig({\n        input: 'type-format.yaml',\n        output: 'type-format',\n        plugins: [\n          '@hey-api/transformers',\n          '@hey-api/client-fetch',\n          'valibot',\n          {\n            name: '@hey-api/sdk',\n            transformer: true,\n            validator: true,\n          },\n        ],\n      }),\n      description: 'handles various schema types and formats',\n    },\n  ];\n\n  it.each(scenarios)('$description', async ({ config }) => {\n    await createClient(config);\n\n    const outputString = config.output as string;\n    const filePaths = getFilePaths(outputString);\n\n    await Promise.all(\n      filePaths.map(async (filePath) => {\n        const fileContent = fs.readFileSync(filePath, 'utf-8');\n        await expect(fileContent).toMatchFileSnapshot(\n          path.join(snapshotsDir, filePath.slice(outputDir.length + 1)),\n        );\n      }),\n    );\n  });\n});\n"
  },
  {
    "path": "packages/openapi-ts-tests/valibot/v1/test/additional-properties.test.ts",
    "content": "import * as v from 'valibot';\n\nimport { setupValibotTest } from './utils';\n\n// TODO: further clean up\ndescribe('Object Additional Properties Tests', () => {\n  let generatedSchemas: any;\n\n  beforeAll(async () => {\n    generatedSchemas = await setupValibotTest(\n      'additional-properties.yaml',\n      'additional-properties',\n    );\n  });\n\n  describe('ObjectWithAdditionalPropertiesString', () => {\n    it('should preserve string additional properties in nested headers object', () => {\n      const input = {\n        headers: {\n          Authorization: 'Bearer token',\n          'Content-Type': 'application/json',\n        },\n      };\n      const result = v.safeParse(generatedSchemas.vObjectWithAdditionalPropertiesString, input);\n      expect(result.success).toBe(true);\n      if (result.success) {\n        expect(result.output.headers).toEqual({\n          Authorization: 'Bearer token',\n          'Content-Type': 'application/json',\n        });\n      }\n    });\n\n    it('should reject non-string values in additional properties', () => {\n      const input = {\n        headers: {\n          Authorization: 'Bearer token',\n          Count: 123, // Invalid: should be string\n        },\n      };\n      const result = v.safeParse(generatedSchemas.vObjectWithAdditionalPropertiesString, input);\n      expect(result.success).toBe(false);\n    });\n\n    it('should accept empty headers object', () => {\n      const input = {\n        headers: {},\n      };\n      const result = v.safeParse(generatedSchemas.vObjectWithAdditionalPropertiesString, input);\n      expect(result.success).toBe(true);\n    });\n  });\n\n  describe('ObjectOnlyAdditionalPropertiesString', () => {\n    it('should preserve string additional properties', () => {\n      const input = {\n        key1: 'value1',\n        key2: 'value2',\n        key3: 'value3',\n      };\n      const result = v.safeParse(generatedSchemas.vObjectOnlyAdditionalPropertiesString, input);\n      expect(result.success).toBe(true);\n      if (result.success) {\n        expect(result.output).toEqual(input);\n      }\n    });\n\n    it('should reject non-string values', () => {\n      const input = {\n        key1: 'value1',\n        key2: 123, // Invalid: should be string\n      };\n      const result = v.safeParse(generatedSchemas.vObjectOnlyAdditionalPropertiesString, input);\n      expect(result.success).toBe(false);\n    });\n  });\n\n  describe('ObjectOnlyAdditionalPropertiesNumber', () => {\n    it('should preserve number additional properties', () => {\n      const input = {\n        score1: 100,\n        score2: 95.5,\n        score3: 0,\n      };\n      const result = v.safeParse(generatedSchemas.vObjectOnlyAdditionalPropertiesNumber, input);\n      expect(result.success).toBe(true);\n      if (result.success) {\n        expect(result.output).toEqual(input);\n      }\n    });\n\n    it('should reject non-number values', () => {\n      const input = {\n        score1: 100,\n        score2: 'invalid', // Invalid: should be number\n      };\n      const result = v.safeParse(generatedSchemas.vObjectOnlyAdditionalPropertiesNumber, input);\n      expect(result.success).toBe(false);\n    });\n  });\n\n  describe('ObjectOnlyAdditionalPropertiesBoolean', () => {\n    it('should preserve boolean additional properties', () => {\n      const input = {\n        flag1: true,\n        flag2: false,\n        flag3: true,\n      };\n      const result = v.safeParse(generatedSchemas.vObjectOnlyAdditionalPropertiesBoolean, input);\n      expect(result.success).toBe(true);\n      if (result.success) {\n        expect(result.output).toEqual(input);\n      }\n    });\n\n    it('should reject non-boolean values', () => {\n      const input = {\n        flag1: true,\n        flag2: 'true', // Invalid: should be boolean\n      };\n      const result = v.safeParse(generatedSchemas.vObjectOnlyAdditionalPropertiesBoolean, input);\n      expect(result.success).toBe(false);\n    });\n  });\n\n  describe('ObjectWithPropertiesAndAdditionalPropertiesNumber', () => {\n    it('should preserve both named properties and additional properties', () => {\n      const input = {\n        count: 42,\n        extra1: 1.5,\n        extra2: 2.5,\n        id: 'abc123',\n      };\n      const result = v.safeParse(\n        generatedSchemas.vObjectWithPropertiesAndAdditionalPropertiesNumber,\n        input,\n      );\n      if (!result.success) {\n        console.log('Validation failed:', result.issues);\n      }\n      expect(result.success).toBe(true);\n      if (result.success) {\n        expect(result.output).toEqual(input);\n      }\n    });\n\n    it('should validate types of both named and additional properties', () => {\n      const input = {\n        count: 42,\n        extra1: 'invalid',\n        id: 'abc123', // Invalid: should be number\n      };\n      const result = v.safeParse(\n        generatedSchemas.vObjectWithPropertiesAndAdditionalPropertiesNumber,\n        input,\n      );\n      expect(result.success).toBe(false);\n    });\n\n    it('should require named properties but allow empty additional properties', () => {\n      const input = {\n        count: 42,\n        id: 'abc123',\n      };\n      const result = v.safeParse(\n        generatedSchemas.vObjectWithPropertiesAndAdditionalPropertiesNumber,\n        input,\n      );\n      expect(result.success).toBe(true);\n    });\n  });\n\n  describe('ObjectWithAdditionalPropertiesObject', () => {\n    it('should preserve nested object additional properties', () => {\n      const input = {\n        metadata: {\n          field1: { value: 'test1' },\n          field2: { value: 'test2' },\n        },\n      };\n      const result = v.safeParse(generatedSchemas.vObjectWithAdditionalPropertiesObject, input);\n      expect(result.success).toBe(true);\n      if (result.success) {\n        expect(result.output.metadata).toEqual({\n          field1: { value: 'test1' },\n          field2: { value: 'test2' },\n        });\n      }\n    });\n\n    it('should validate nested object structure', () => {\n      const input = {\n        metadata: {\n          field1: { value: 'test1' },\n          field2: { invalidKey: 'test2' }, // Object without required structure\n        },\n      };\n      const result = v.safeParse(generatedSchemas.vObjectWithAdditionalPropertiesObject, input);\n      // Should succeed as the nested object properties are optional\n      expect(result.success).toBe(true);\n    });\n  });\n\n  describe('ObjectOnlyAdditionalPropertiesObject', () => {\n    it('should preserve object additional properties', () => {\n      const input = {\n        item1: { name: 'Item 1' },\n        item2: { name: 'Item 2' },\n      };\n      const result = v.safeParse(generatedSchemas.vObjectOnlyAdditionalPropertiesObject, input);\n      expect(result.success).toBe(true);\n      if (result.success) {\n        expect(result.output).toEqual(input);\n      }\n    });\n  });\n\n  describe('ObjectWithAdditionalPropertiesFalse', () => {\n    it('should accept object with only defined properties', () => {\n      const input = {\n        count: 42,\n        id: 'abc123',\n      };\n      const result = v.safeParse(generatedSchemas.vObjectWithAdditionalPropertiesFalse, input);\n      expect(result.success).toBe(true);\n      if (result.success) {\n        expect(result.output).toEqual(input);\n      }\n    });\n\n    it('should reject object with additional properties', () => {\n      const input = {\n        count: 42,\n        extra: 'not allowed',\n        id: 'abc123',\n      };\n      const result = v.safeParse(generatedSchemas.vObjectWithAdditionalPropertiesFalse, input);\n      expect(result.success).toBe(false);\n    });\n  });\n\n  describe('ObjectWithNestedAdditionalPropertiesFalse', () => {\n    it('should accept object with correct nested properties', () => {\n      const input = {\n        membership: {\n          calendar_membership_tier_id: 'tier_id',\n          status: 'approved',\n        },\n      };\n      const result = v.safeParse(\n        generatedSchemas.vObjectWithNestedAdditionalPropertiesFalse,\n        input,\n      );\n      expect(result.success).toBe(true);\n      if (result.success) {\n        expect(result.output).toEqual(input);\n      }\n    });\n\n    it('should reject object with additional properties in nested object', () => {\n      const input = {\n        membership: {\n          calendar_membership_tier_id: 'tier_id',\n          extra: 'not allowed',\n          status: 'approved',\n        },\n      };\n      const result = v.safeParse(\n        generatedSchemas.vObjectWithNestedAdditionalPropertiesFalse,\n        input,\n      );\n      expect(result.success).toBe(false);\n    });\n  });\n});\n"
  },
  {
    "path": "packages/openapi-ts-tests/valibot/v1/test/const-values.test.ts",
    "content": "import * as v from 'valibot';\n\nimport { setupValibotTest } from './utils';\n\n// TODO: further clean up\ndescribe('Number Type Const Values Tests', () => {\n  let generatedSchemas: any;\n\n  beforeAll(async () => {\n    generatedSchemas = await setupValibotTest('const-values.yaml', 'const-values');\n  });\n\n  describe('Number Type Const Validation', () => {\n    it('should accept exact const value', () => {\n      const result = v.safeParse(generatedSchemas.vNumberNoFormat, 42.5);\n      expect(result.success).toBe(true);\n    });\n\n    it('should reject non-matching values', () => {\n      const result = v.safeParse(generatedSchemas.vNumberNoFormat, 42.6);\n      expect(result.success).toBe(false);\n    });\n  });\n\n  describe('Number Type Format Const Validation', () => {\n    it('should accept NumberInt8 exact const value', () => {\n      const result = v.safeParse(generatedSchemas.vNumberInt8, 100);\n      expect(result.success).toBe(true);\n    });\n\n    it('should reject NumberInt8 non-matching values', () => {\n      const result = v.safeParse(generatedSchemas.vNumberInt8, 101);\n      expect(result.success).toBe(false);\n    });\n\n    it('should accept NumberInt16 exact const value', () => {\n      const result = v.safeParse(generatedSchemas.vNumberInt16, 1000);\n      expect(result.success).toBe(true);\n    });\n\n    it('should reject NumberInt16 non-matching values', () => {\n      const result = v.safeParse(generatedSchemas.vNumberInt16, 1001);\n      expect(result.success).toBe(false);\n    });\n\n    it('should accept NumberInt32 exact const value', () => {\n      const result = v.safeParse(generatedSchemas.vNumberInt32, 100000);\n      expect(result.success).toBe(true);\n    });\n\n    it('should reject NumberInt32 non-matching values', () => {\n      const result = v.safeParse(generatedSchemas.vNumberInt32, 100001);\n      expect(result.success).toBe(false);\n    });\n\n    it('should accept NumberInt64 exact const value', () => {\n      const result = v.safeParse(generatedSchemas.vNumberInt64, BigInt('1000000000000'));\n      expect(result.success).toBe(true);\n    });\n\n    it('should reject NumberInt64 non-matching values', () => {\n      const result = v.safeParse(generatedSchemas.vNumberInt64, BigInt('1000000000001'));\n      expect(result.success).toBe(false);\n    });\n\n    it('should accept NumberUint8 exact const value', () => {\n      const result = v.safeParse(generatedSchemas.vNumberUint8, 200);\n      expect(result.success).toBe(true);\n    });\n\n    it('should reject NumberUint8 non-matching values', () => {\n      const result = v.safeParse(generatedSchemas.vNumberUint8, 201);\n      expect(result.success).toBe(false);\n    });\n\n    it('should accept NumberUint16 exact const value', () => {\n      const result = v.safeParse(generatedSchemas.vNumberUint16, 50000);\n      expect(result.success).toBe(true);\n    });\n\n    it('should reject NumberUint16 non-matching values', () => {\n      const result = v.safeParse(generatedSchemas.vNumberUint16, 50001);\n      expect(result.success).toBe(false);\n    });\n\n    it('should accept NumberUint32 exact const value', () => {\n      const result = v.safeParse(generatedSchemas.vNumberUint32, 3000000000);\n      expect(result.success).toBe(true);\n    });\n\n    it('should reject NumberUint32 non-matching values', () => {\n      const result = v.safeParse(generatedSchemas.vNumberUint32, 3000000001);\n      expect(result.success).toBe(false);\n    });\n\n    it('should accept NumberUint64 exact const value', () => {\n      const result = v.safeParse(generatedSchemas.vNumberUint64, BigInt('18000000000000000000'));\n      expect(result.success).toBe(true);\n    });\n\n    it('should reject NumberUint64 non-matching values', () => {\n      const result = v.safeParse(generatedSchemas.vNumberUint64, BigInt('18000000000000000001'));\n      expect(result.success).toBe(false);\n    });\n  });\n\n  describe('Integer Type Const Validation', () => {\n    it('should accept exact const value', () => {\n      const result = v.safeParse(generatedSchemas.vIntegerNoFormat, -1);\n      expect(result.success).toBe(true);\n    });\n\n    it('should reject non-matching values', () => {\n      const result = v.safeParse(generatedSchemas.vIntegerNoFormat, 0);\n      expect(result.success).toBe(false);\n    });\n  });\n\n  describe('Integer Type Format Const Validation', () => {\n    it('should accept IntegerInt8 exact const value', () => {\n      const result = v.safeParse(generatedSchemas.vIntegerInt8, -100);\n      expect(result.success).toBe(true);\n    });\n\n    it('should reject IntegerInt8 non-matching values', () => {\n      const result = v.safeParse(generatedSchemas.vIntegerInt8, -99);\n      expect(result.success).toBe(false);\n    });\n\n    it('should accept IntegerInt16 exact const value', () => {\n      const result = v.safeParse(generatedSchemas.vIntegerInt16, -1000);\n      expect(result.success).toBe(true);\n    });\n\n    it('should reject IntegerInt16 non-matching values', () => {\n      const result = v.safeParse(generatedSchemas.vIntegerInt16, -999);\n      expect(result.success).toBe(false);\n    });\n\n    it('should accept IntegerInt32 exact const value', () => {\n      const result = v.safeParse(generatedSchemas.vIntegerInt32, -100000);\n      expect(result.success).toBe(true);\n    });\n\n    it('should reject IntegerInt32 non-matching values', () => {\n      const result = v.safeParse(generatedSchemas.vIntegerInt32, -99999);\n      expect(result.success).toBe(false);\n    });\n\n    it('should accept IntegerInt64 exact const value', () => {\n      const result = v.safeParse(generatedSchemas.vIntegerInt64, BigInt('-1000000000000'));\n      expect(result.success).toBe(true);\n    });\n\n    it('should reject IntegerInt64 non-matching values', () => {\n      const result = v.safeParse(generatedSchemas.vIntegerInt64, BigInt('-999999999999'));\n      expect(result.success).toBe(false);\n    });\n\n    it('should accept IntegerUint8 exact const value', () => {\n      const result = v.safeParse(generatedSchemas.vIntegerUint8, 255);\n      expect(result.success).toBe(true);\n    });\n\n    it('should reject IntegerUint8 non-matching values', () => {\n      const result = v.safeParse(generatedSchemas.vIntegerUint8, 254);\n      expect(result.success).toBe(false);\n    });\n\n    it('should accept IntegerUint16 exact const value', () => {\n      const result = v.safeParse(generatedSchemas.vIntegerUint16, 65535);\n      expect(result.success).toBe(true);\n    });\n\n    it('should reject IntegerUint16 non-matching values', () => {\n      const result = v.safeParse(generatedSchemas.vIntegerUint16, 65534);\n      expect(result.success).toBe(false);\n    });\n\n    it('should accept IntegerUint32 exact const value', () => {\n      const result = v.safeParse(generatedSchemas.vIntegerUint32, 4294967295);\n      expect(result.success).toBe(true);\n    });\n\n    it('should reject IntegerUint32 non-matching values', () => {\n      const result = v.safeParse(generatedSchemas.vIntegerUint32, 4294967294);\n      expect(result.success).toBe(false);\n    });\n\n    it('should accept IntegerUint64 exact const value', () => {\n      const result = v.safeParse(generatedSchemas.vIntegerUint64, BigInt('1000000000000'));\n      expect(result.success).toBe(true);\n    });\n\n    it('should reject IntegerUint64 non-matching values', () => {\n      const result = v.safeParse(generatedSchemas.vIntegerUint64, BigInt('1000000000001'));\n      expect(result.success).toBe(false);\n    });\n  });\n\n  describe('String Type Format Const Validation', () => {\n    it('should accept StringInt64 exact const value', () => {\n      const result = v.safeParse(generatedSchemas.vStringInt64, BigInt('-9223372036854775808'));\n      expect(result.success).toBe(true);\n    });\n\n    it('should reject StringInt64 non-matching values', () => {\n      const result = v.safeParse(generatedSchemas.vStringInt64, BigInt('-9223372036854775807'));\n      expect(result.success).toBe(false);\n    });\n\n    it('should accept StringUint64 exact const value', () => {\n      const result = v.safeParse(generatedSchemas.vStringUint64, BigInt('18446744073709551615'));\n      expect(result.success).toBe(true);\n    });\n\n    it('should reject StringUint64 non-matching values', () => {\n      const result = v.safeParse(generatedSchemas.vStringUint64, BigInt('18446744073709551614'));\n      expect(result.success).toBe(false);\n    });\n  });\n\n  describe('String Type Format Const Validation (BigInt Literal)', () => {\n    it('should accept StringInt64n exact const value', () => {\n      const result = v.safeParse(generatedSchemas.vStringInt64n, BigInt('-9223372036854775808'));\n      expect(result.success).toBe(true);\n    });\n\n    it('should reject StringInt64n non-matching values', () => {\n      const result = v.safeParse(generatedSchemas.vStringInt64n, BigInt('-9223372036854775807'));\n      expect(result.success).toBe(false);\n    });\n\n    it('should accept StringUint64n exact const value', () => {\n      const result = v.safeParse(generatedSchemas.vStringUint64n, BigInt('18446744073709551615'));\n      expect(result.success).toBe(true);\n    });\n\n    it('should reject StringUint64n non-matching values', () => {\n      const result = v.safeParse(generatedSchemas.vStringUint64n, BigInt('18446744073709551614'));\n      expect(result.success).toBe(false);\n    });\n  });\n});\n"
  },
  {
    "path": "packages/openapi-ts-tests/valibot/v1/test/formats.test.ts",
    "content": "import * as v from 'valibot';\n\nimport { setupValibotTest } from './utils';\n\n// TODO: further clean up\ndescribe('Number Type Formats Tests', () => {\n  let generatedSchemas: any;\n\n  beforeAll(async () => {\n    generatedSchemas = await setupValibotTest('formats.yaml', 'formats');\n  });\n\n  // Format bounds and error messages from INTEGER_FORMATS\n  const FORMAT_BOUNDS = {\n    int16: {\n      max: 32767,\n      maxError: 'Invalid value: Expected int16 to be <= 32767',\n      min: -32768,\n      minError: 'Invalid value: Expected int16 to be >= -32768',\n    },\n    int32: {\n      max: 2147483647,\n      maxError: 'Invalid value: Expected int32 to be <= 2147483647',\n      min: -2147483648,\n      minError: 'Invalid value: Expected int32 to be >= -2147483648',\n    },\n    int64: {\n      max: '9223372036854775807',\n      maxError: 'Invalid value: Expected int64 to be <= 9223372036854775807',\n      min: '-9223372036854775808',\n      minError: 'Invalid value: Expected int64 to be >= -9223372036854775808',\n    },\n    int8: {\n      max: 127,\n      maxError: 'Invalid value: Expected int8 to be <= 127',\n      min: -128,\n      minError: 'Invalid value: Expected int8 to be >= -128',\n    },\n    uint16: {\n      max: 65535,\n      maxError: 'Invalid value: Expected uint16 to be <= 65535',\n      min: 0,\n      minError: 'Invalid value: Expected uint16 to be >= 0',\n    },\n    uint32: {\n      max: 4294967295,\n      maxError: 'Invalid value: Expected uint32 to be <= 4294967295',\n      min: 0,\n      minError: 'Invalid value: Expected uint32 to be >= 0',\n    },\n    uint64: {\n      max: '18446744073709551615',\n      maxError: 'Invalid value: Expected uint64 to be <= 18446744073709551615',\n      min: '0',\n      minError: 'Invalid value: Expected uint64 to be >= 0',\n    },\n    uint8: {\n      max: 255,\n      maxError: 'Invalid value: Expected uint8 to be <= 255',\n      min: 0,\n      minError: 'Invalid value: Expected uint8 to be >= 0',\n    },\n  };\n\n  describe('Number Type Format Validation', () => {\n    describe('numberNoFormat', () => {\n      it('should validate any number value', () => {\n        const result = v.safeParse(generatedSchemas.vNumberNoFormat, 123.456);\n        expect(result.success).toBe(true);\n      });\n    });\n\n    describe('numberInt8', () => {\n      it('should validate values within int8 range', () => {\n        const result = v.safeParse(generatedSchemas.vNumberInt8, 100);\n        expect(result.success).toBe(true);\n      });\n\n      it('should reject values below int8 minimum', () => {\n        const result = v.safeParse(generatedSchemas.vNumberInt8, -129);\n        expect(result.success).toBe(false);\n        expect(result.issues![0].message).toContain(FORMAT_BOUNDS.int8.minError);\n      });\n\n      it('should reject values above int8 maximum', () => {\n        const result = v.safeParse(generatedSchemas.vNumberInt8, 128);\n        expect(result.success).toBe(false);\n        expect(result.issues![0].message).toContain(FORMAT_BOUNDS.int8.maxError);\n      });\n    });\n\n    describe('numberInt16', () => {\n      it('should validate values within int16 range', () => {\n        const result = v.safeParse(generatedSchemas.vNumberInt16, 30000);\n        expect(result.success).toBe(true);\n      });\n\n      it('should reject values below int16 minimum', () => {\n        const result = v.safeParse(generatedSchemas.vNumberInt16, -32769);\n        expect(result.success).toBe(false);\n        expect(result.issues![0].message).toContain(FORMAT_BOUNDS.int16.minError);\n      });\n\n      it('should reject values above int16 maximum', () => {\n        const result = v.safeParse(generatedSchemas.vNumberInt16, 32768);\n        expect(result.success).toBe(false);\n        expect(result.issues![0].message).toContain(FORMAT_BOUNDS.int16.maxError);\n      });\n    });\n\n    describe('numberInt32', () => {\n      it('should validate values within int32 range', () => {\n        const result = v.safeParse(generatedSchemas.vNumberInt32, 2000000000);\n        expect(result.success).toBe(true);\n      });\n\n      it('should reject values below int32 minimum', () => {\n        const result = v.safeParse(generatedSchemas.vNumberInt32, -2147483649);\n        expect(result.success).toBe(false);\n        expect(result.issues![0].message).toContain(FORMAT_BOUNDS.int32.minError);\n      });\n\n      it('should reject values above int32 maximum', () => {\n        const result = v.safeParse(generatedSchemas.vNumberInt32, 2147483648);\n        expect(result.success).toBe(false);\n        expect(result.issues![0].message).toContain(FORMAT_BOUNDS.int32.maxError);\n      });\n    });\n\n    describe('numberInt64', () => {\n      it('should validate values within int64 range and convert to BigInt', () => {\n        const result = v.safeParse(generatedSchemas.vNumberInt64, 1000000000000);\n        expect(result.success).toBe(true);\n        expect(typeof result.output).toBe('bigint');\n      });\n\n      it('should validate string values within int64 range', () => {\n        const result = v.safeParse(generatedSchemas.vNumberInt64, '1000000000000');\n        expect(result.success).toBe(true);\n        expect(typeof result.output).toBe('bigint');\n      });\n\n      it('should reject values above int64 maximum', () => {\n        const result = v.safeParse(generatedSchemas.vNumberInt64, '9223372036854775808');\n        expect(result.success).toBe(false);\n        expect(result.issues![0].message).toContain(FORMAT_BOUNDS.int64.maxError);\n      });\n    });\n\n    describe('numberUint8', () => {\n      it('should validate values within uint8 range', () => {\n        const result = v.safeParse(generatedSchemas.vNumberUint8, 200);\n        expect(result.success).toBe(true);\n      });\n\n      it('should reject negative values', () => {\n        const result = v.safeParse(generatedSchemas.vNumberUint8, -1);\n        expect(result.success).toBe(false);\n        expect(result.issues![0].message).toContain(FORMAT_BOUNDS.uint8.minError);\n      });\n\n      it('should reject values above uint8 maximum', () => {\n        const result = v.safeParse(generatedSchemas.vNumberUint8, 256);\n        expect(result.success).toBe(false);\n        expect(result.issues![0].message).toContain(FORMAT_BOUNDS.uint8.maxError);\n      });\n    });\n\n    describe('numberUint16', () => {\n      it('should validate values within uint16 range', () => {\n        const result = v.safeParse(generatedSchemas.vNumberUint16, 60000);\n        expect(result.success).toBe(true);\n      });\n\n      it('should reject negative values', () => {\n        const result = v.safeParse(generatedSchemas.vNumberUint16, -1);\n        expect(result.success).toBe(false);\n        expect(result.issues![0].message).toContain(FORMAT_BOUNDS.uint16.minError);\n      });\n\n      it('should reject values above uint16 maximum', () => {\n        const result = v.safeParse(generatedSchemas.vNumberUint16, 65536);\n        expect(result.success).toBe(false);\n        expect(result.issues![0].message).toContain(FORMAT_BOUNDS.uint16.maxError);\n      });\n    });\n\n    describe('numberUint32', () => {\n      it('should validate values within uint32 range', () => {\n        const result = v.safeParse(generatedSchemas.vNumberUint32, 4000000000);\n        expect(result.success).toBe(true);\n      });\n\n      it('should reject negative values', () => {\n        const result = v.safeParse(generatedSchemas.vNumberUint32, -1);\n        expect(result.success).toBe(false);\n        expect(result.issues![0].message).toContain(FORMAT_BOUNDS.uint32.minError);\n      });\n\n      it('should reject values above uint32 maximum', () => {\n        const result = v.safeParse(generatedSchemas.vNumberUint32, 4294967296);\n        expect(result.success).toBe(false);\n        expect(result.issues![0].message).toContain(FORMAT_BOUNDS.uint32.maxError);\n      });\n    });\n\n    describe('numberUint64', () => {\n      it('should validate values within uint64 range and convert to BigInt', () => {\n        const result = v.safeParse(generatedSchemas.vNumberUint64, 1000000000000);\n        expect(result.success).toBe(true);\n        expect(typeof result.output).toBe('bigint');\n      });\n\n      it('should reject negative values', () => {\n        const result = v.safeParse(generatedSchemas.vNumberUint64, -1);\n        expect(result.success).toBe(false);\n        expect(result.issues![0].message).toContain(FORMAT_BOUNDS.uint64.minError);\n      });\n\n      it('should reject values above uint64 maximum', () => {\n        const result = v.safeParse(generatedSchemas.vNumberUint64, '18446744073709551616');\n        expect(result.success).toBe(false);\n        expect(result.issues![0].message).toContain(FORMAT_BOUNDS.uint64.maxError);\n      });\n    });\n  });\n\n  describe('Integer Type Format Validation', () => {\n    describe('integerNoFormat', () => {\n      it('should validate any integer value', () => {\n        const result = v.safeParse(generatedSchemas.vIntegerNoFormat, 123);\n        expect(result.success).toBe(true);\n      });\n\n      it('should reject non-integer values', () => {\n        const result = v.safeParse(generatedSchemas.vIntegerNoFormat, 123.456);\n        expect(result.success).toBe(false);\n      });\n    });\n\n    describe('integerInt8', () => {\n      it('should validate values within int8 range', () => {\n        const result = v.safeParse(generatedSchemas.vIntegerInt8, 100);\n        expect(result.success).toBe(true);\n      });\n\n      it('should reject values below int8 minimum', () => {\n        const result = v.safeParse(generatedSchemas.vIntegerInt8, -129);\n        expect(result.success).toBe(false);\n        expect(result.issues![0].message).toContain(FORMAT_BOUNDS.int8.minError);\n      });\n\n      it('should reject values above int8 maximum', () => {\n        const result = v.safeParse(generatedSchemas.vIntegerInt8, 128);\n        expect(result.success).toBe(false);\n        expect(result.issues![0].message).toContain(FORMAT_BOUNDS.int8.maxError);\n      });\n    });\n\n    describe('integerInt16', () => {\n      it('should validate values within int16 range', () => {\n        const result = v.safeParse(generatedSchemas.vIntegerInt16, 30000);\n        expect(result.success).toBe(true);\n      });\n\n      it('should reject values below int16 minimum', () => {\n        const result = v.safeParse(generatedSchemas.vIntegerInt16, -32769);\n        expect(result.success).toBe(false);\n        expect(result.issues![0].message).toContain(FORMAT_BOUNDS.int16.minError);\n      });\n\n      it('should reject values above int16 maximum', () => {\n        const result = v.safeParse(generatedSchemas.vIntegerInt16, 32768);\n        expect(result.success).toBe(false);\n        expect(result.issues![0].message).toContain(FORMAT_BOUNDS.int16.maxError);\n      });\n    });\n\n    describe('integerInt32', () => {\n      it('should validate values within int32 range', () => {\n        const result = v.safeParse(generatedSchemas.vIntegerInt32, 2000000000);\n        expect(result.success).toBe(true);\n      });\n\n      it('should reject values below int32 minimum', () => {\n        const result = v.safeParse(generatedSchemas.vIntegerInt32, -2147483649);\n        expect(result.success).toBe(false);\n        expect(result.issues![0].message).toContain(FORMAT_BOUNDS.int32.minError);\n      });\n\n      it('should reject values above int32 maximum', () => {\n        const result = v.safeParse(generatedSchemas.vIntegerInt32, 2147483648);\n        expect(result.success).toBe(false);\n        expect(result.issues![0].message).toContain(FORMAT_BOUNDS.int32.maxError);\n      });\n    });\n\n    describe('integerInt64', () => {\n      it('should validate values within int64 range and convert to BigInt', () => {\n        const result = v.safeParse(generatedSchemas.vIntegerInt64, 1000000000000);\n        expect(result.success).toBe(true);\n        expect(typeof result.output).toBe('bigint');\n      });\n\n      it('should validate string values within int64 range', () => {\n        const result = v.safeParse(generatedSchemas.vIntegerInt64, '1000000000000');\n        expect(result.success).toBe(true);\n        expect(typeof result.output).toBe('bigint');\n      });\n\n      it('should reject values above int64 maximum', () => {\n        const result = v.safeParse(generatedSchemas.vIntegerInt64, '9223372036854775808');\n        expect(result.success).toBe(false);\n        expect(result.issues![0].message).toContain(FORMAT_BOUNDS.int64.maxError);\n      });\n    });\n\n    describe('integerUint8', () => {\n      it('should validate values within uint8 range', () => {\n        const result = v.safeParse(generatedSchemas.vIntegerUint8, 200);\n        expect(result.success).toBe(true);\n      });\n\n      it('should reject negative values', () => {\n        const result = v.safeParse(generatedSchemas.vIntegerUint8, -1);\n        expect(result.success).toBe(false);\n        expect(result.issues![0].message).toContain(FORMAT_BOUNDS.uint8.minError);\n      });\n\n      it('should reject values above uint8 maximum', () => {\n        const result = v.safeParse(generatedSchemas.vIntegerUint8, 256);\n        expect(result.success).toBe(false);\n        expect(result.issues![0].message).toContain(FORMAT_BOUNDS.uint8.maxError);\n      });\n    });\n\n    describe('integerUint16', () => {\n      it('should validate values within uint16 range', () => {\n        const result = v.safeParse(generatedSchemas.vIntegerUint16, 60000);\n        expect(result.success).toBe(true);\n      });\n\n      it('should reject negative values', () => {\n        const result = v.safeParse(generatedSchemas.vIntegerUint16, -1);\n        expect(result.success).toBe(false);\n        expect(result.issues![0].message).toContain(FORMAT_BOUNDS.uint16.minError);\n      });\n\n      it('should reject values above uint16 maximum', () => {\n        const result = v.safeParse(generatedSchemas.vIntegerUint16, 65536);\n        expect(result.success).toBe(false);\n        expect(result.issues![0].message).toContain(FORMAT_BOUNDS.uint16.maxError);\n      });\n    });\n\n    describe('integerUint32', () => {\n      it('should validate values within uint32 range', () => {\n        const result = v.safeParse(generatedSchemas.vIntegerUint32, 4000000000);\n        expect(result.success).toBe(true);\n      });\n\n      it('should reject negative values', () => {\n        const result = v.safeParse(generatedSchemas.vIntegerUint32, -1);\n        expect(result.success).toBe(false);\n        expect(result.issues![0].message).toContain(FORMAT_BOUNDS.uint32.minError);\n      });\n\n      it('should reject values above uint32 maximum', () => {\n        const result = v.safeParse(generatedSchemas.vIntegerUint32, 4294967296);\n        expect(result.success).toBe(false);\n        expect(result.issues![0].message).toContain(FORMAT_BOUNDS.uint32.maxError);\n      });\n    });\n\n    describe('integerUint64', () => {\n      it('should validate values within uint64 range and convert to BigInt', () => {\n        const result = v.safeParse(generatedSchemas.vIntegerUint64, 1000000000000);\n        expect(result.success).toBe(true);\n        expect(typeof result.output).toBe('bigint');\n      });\n\n      it('should reject negative values', () => {\n        const result = v.safeParse(generatedSchemas.vIntegerUint64, -1);\n        expect(result.success).toBe(false);\n        expect(result.issues![0].message).toContain(FORMAT_BOUNDS.uint64.minError);\n      });\n\n      it('should reject values above uint64 maximum', () => {\n        const result = v.safeParse(generatedSchemas.vIntegerUint64, '18446744073709551616');\n        expect(result.success).toBe(false);\n        expect(result.issues![0].message).toContain(FORMAT_BOUNDS.uint64.maxError);\n      });\n    });\n  });\n\n  describe('String Type Format Validation', () => {\n    describe('stringInt64', () => {\n      it('should validate string values within int64 range and convert to BigInt', () => {\n        const result = v.safeParse(generatedSchemas.vStringInt64, '1000000000000');\n        expect(result.success).toBe(true);\n        expect(typeof result.output).toBe('bigint');\n      });\n\n      it('should reject values below int64 minimum', () => {\n        const result = v.safeParse(generatedSchemas.vStringInt64, '-9223372036854775809');\n        expect(result.success).toBe(false);\n        expect(result.issues![0].message).toContain(FORMAT_BOUNDS.int64.minError);\n      });\n\n      it('should reject values above int64 maximum', () => {\n        const result = v.safeParse(generatedSchemas.vStringInt64, '9223372036854775808');\n        expect(result.success).toBe(false);\n        expect(result.issues![0].message).toContain(FORMAT_BOUNDS.int64.maxError);\n      });\n    });\n\n    describe('stringUint64', () => {\n      it('should validate string values within uint64 range and convert to BigInt', () => {\n        const result = v.safeParse(generatedSchemas.vStringUint64, '1000000000000');\n        expect(result.success).toBe(true);\n        expect(typeof result.output).toBe('bigint');\n      });\n\n      it('should reject negative values', () => {\n        const result = v.safeParse(generatedSchemas.vStringUint64, '-1');\n        expect(result.success).toBe(false);\n        expect(result.issues![0].message).toContain(FORMAT_BOUNDS.uint64.minError);\n      });\n\n      it('should reject values above uint64 maximum', () => {\n        const result = v.safeParse(generatedSchemas.vStringUint64, '18446744073709551616');\n        expect(result.success).toBe(false);\n        expect(result.issues![0].message).toContain(FORMAT_BOUNDS.uint64.maxError);\n      });\n    });\n  });\n});\n"
  },
  {
    "path": "packages/openapi-ts-tests/valibot/v1/test/min-max-constraints.test.ts",
    "content": "import * as v from 'valibot';\n\nimport { setupValibotTest } from './utils';\n\n// TODO: further clean up\ndescribe('Number Type Min/Max Constraints Tests', () => {\n  let generatedSchemas: any;\n\n  beforeAll(async () => {\n    generatedSchemas = await setupValibotTest('min-max-constraints.yaml', 'min-max-constraints');\n  });\n\n  describe('Basic Number Constraints', () => {\n    describe('NumberWithMinimum', () => {\n      it('should accept values at minimum boundary', () => {\n        const result = v.safeParse(generatedSchemas.vNumberWithMinimum, 10);\n        expect(result.success).toBe(true);\n      });\n\n      it('should accept values above minimum', () => {\n        const result = v.safeParse(generatedSchemas.vNumberWithMinimum, 15);\n        expect(result.success).toBe(true);\n      });\n\n      it('should reject values below minimum', () => {\n        const result = v.safeParse(generatedSchemas.vNumberWithMinimum, 9);\n        expect(result.success).toBe(false);\n      });\n    });\n\n    describe('NumberWithMaximum', () => {\n      it('should accept values at maximum boundary', () => {\n        const result = v.safeParse(generatedSchemas.vNumberWithMaximum, 100);\n        expect(result.success).toBe(true);\n      });\n\n      it('should accept values below maximum', () => {\n        const result = v.safeParse(generatedSchemas.vNumberWithMaximum, 50);\n        expect(result.success).toBe(true);\n      });\n\n      it('should reject values above maximum', () => {\n        const result = v.safeParse(generatedSchemas.vNumberWithMaximum, 101);\n        expect(result.success).toBe(false);\n      });\n    });\n\n    describe('NumberWithMinMax', () => {\n      it('should accept values within range', () => {\n        const result = v.safeParse(generatedSchemas.vNumberWithMinMax, 50);\n        expect(result.success).toBe(true);\n      });\n\n      it('should accept values at minimum boundary', () => {\n        const result = v.safeParse(generatedSchemas.vNumberWithMinMax, 0);\n        expect(result.success).toBe(true);\n      });\n\n      it('should accept values at maximum boundary', () => {\n        const result = v.safeParse(generatedSchemas.vNumberWithMinMax, 100);\n        expect(result.success).toBe(true);\n      });\n\n      it('should reject values below minimum', () => {\n        const result = v.safeParse(generatedSchemas.vNumberWithMinMax, -1);\n        expect(result.success).toBe(false);\n      });\n\n      it('should reject values above maximum', () => {\n        const result = v.safeParse(generatedSchemas.vNumberWithMinMax, 101);\n        expect(result.success).toBe(false);\n      });\n    });\n  });\n\n  describe('Basic Integer Constraints', () => {\n    describe('IntegerWithMinimum', () => {\n      it('should accept values at minimum boundary', () => {\n        const result = v.safeParse(generatedSchemas.vIntegerWithMinimum, 5);\n        expect(result.success).toBe(true);\n      });\n\n      it('should accept values above minimum', () => {\n        const result = v.safeParse(generatedSchemas.vIntegerWithMinimum, 10);\n        expect(result.success).toBe(true);\n      });\n\n      it('should reject values below minimum', () => {\n        const result = v.safeParse(generatedSchemas.vIntegerWithMinimum, 4);\n        expect(result.success).toBe(false);\n      });\n    });\n\n    describe('IntegerWithMaximum', () => {\n      it('should accept values at maximum boundary', () => {\n        const result = v.safeParse(generatedSchemas.vIntegerWithMaximum, 999);\n        expect(result.success).toBe(true);\n      });\n\n      it('should accept values below maximum', () => {\n        const result = v.safeParse(generatedSchemas.vIntegerWithMaximum, 500);\n        expect(result.success).toBe(true);\n      });\n\n      it('should reject values above maximum', () => {\n        const result = v.safeParse(generatedSchemas.vIntegerWithMaximum, 1000);\n        expect(result.success).toBe(false);\n      });\n    });\n\n    describe('IntegerWithMinMax', () => {\n      it('should accept values within range', () => {\n        const result = v.safeParse(generatedSchemas.vIntegerWithMinMax, 500);\n        expect(result.success).toBe(true);\n      });\n\n      it('should accept values at minimum boundary', () => {\n        const result = v.safeParse(generatedSchemas.vIntegerWithMinMax, 1);\n        expect(result.success).toBe(true);\n      });\n\n      it('should accept values at maximum boundary', () => {\n        const result = v.safeParse(generatedSchemas.vIntegerWithMinMax, 999);\n        expect(result.success).toBe(true);\n      });\n\n      it('should reject values below minimum', () => {\n        const result = v.safeParse(generatedSchemas.vIntegerWithMinMax, 0);\n        expect(result.success).toBe(false);\n      });\n\n      it('should reject values above maximum', () => {\n        const result = v.safeParse(generatedSchemas.vIntegerWithMinMax, 1000);\n        expect(result.success).toBe(false);\n      });\n    });\n  });\n\n  describe('Exclusive Constraints', () => {\n    describe('NumberWithExclusiveMin', () => {\n      it('should accept values above exclusive minimum', () => {\n        const result = v.safeParse(generatedSchemas.vNumberWithExclusiveMin, 0.1);\n        expect(result.success).toBe(true);\n      });\n\n      it('should reject values at exclusive minimum', () => {\n        const result = v.safeParse(generatedSchemas.vNumberWithExclusiveMin, 0);\n        expect(result.success).toBe(false);\n      });\n\n      it('should reject values below exclusive minimum', () => {\n        const result = v.safeParse(generatedSchemas.vNumberWithExclusiveMin, -1);\n        expect(result.success).toBe(false);\n      });\n    });\n\n    describe('NumberWithExclusiveMax', () => {\n      it('should accept values below exclusive maximum', () => {\n        const result = v.safeParse(generatedSchemas.vNumberWithExclusiveMax, 99.9);\n        expect(result.success).toBe(true);\n      });\n\n      it('should reject values at exclusive maximum', () => {\n        const result = v.safeParse(generatedSchemas.vNumberWithExclusiveMax, 100);\n        expect(result.success).toBe(false);\n      });\n\n      it('should reject values above exclusive maximum', () => {\n        const result = v.safeParse(generatedSchemas.vNumberWithExclusiveMax, 101);\n        expect(result.success).toBe(false);\n      });\n    });\n\n    describe('NumberWithExclusiveMinMax', () => {\n      it('should accept values within exclusive range', () => {\n        const result = v.safeParse(generatedSchemas.vNumberWithExclusiveMinMax, 0.5);\n        expect(result.success).toBe(true);\n      });\n\n      it('should reject values at exclusive minimum', () => {\n        const result = v.safeParse(generatedSchemas.vNumberWithExclusiveMinMax, 0);\n        expect(result.success).toBe(false);\n      });\n\n      it('should reject values at exclusive maximum', () => {\n        const result = v.safeParse(generatedSchemas.vNumberWithExclusiveMinMax, 1);\n        expect(result.success).toBe(false);\n      });\n    });\n\n    describe('IntegerWithExclusiveMin', () => {\n      it('should accept values above exclusive minimum', () => {\n        const result = v.safeParse(generatedSchemas.vIntegerWithExclusiveMin, 11);\n        expect(result.success).toBe(true);\n      });\n\n      it('should reject values at exclusive minimum', () => {\n        const result = v.safeParse(generatedSchemas.vIntegerWithExclusiveMin, 10);\n        expect(result.success).toBe(false);\n      });\n\n      it('should reject values below exclusive minimum', () => {\n        const result = v.safeParse(generatedSchemas.vIntegerWithExclusiveMin, 9);\n        expect(result.success).toBe(false);\n      });\n    });\n\n    describe('IntegerWithExclusiveMax', () => {\n      it('should accept values below exclusive maximum', () => {\n        const result = v.safeParse(generatedSchemas.vIntegerWithExclusiveMax, 49);\n        expect(result.success).toBe(true);\n      });\n\n      it('should reject values at exclusive maximum', () => {\n        const result = v.safeParse(generatedSchemas.vIntegerWithExclusiveMax, 50);\n        expect(result.success).toBe(false);\n      });\n\n      it('should reject values above exclusive maximum', () => {\n        const result = v.safeParse(generatedSchemas.vIntegerWithExclusiveMax, 51);\n        expect(result.success).toBe(false);\n      });\n    });\n\n    describe('IntegerWithExclusiveMinMax', () => {\n      it('should accept values within exclusive range', () => {\n        const result = v.safeParse(generatedSchemas.vIntegerWithExclusiveMinMax, 10);\n        expect(result.success).toBe(true);\n      });\n\n      it('should reject values at exclusive minimum', () => {\n        const result = v.safeParse(generatedSchemas.vIntegerWithExclusiveMinMax, 5);\n        expect(result.success).toBe(false);\n      });\n\n      it('should reject values at exclusive maximum', () => {\n        const result = v.safeParse(generatedSchemas.vIntegerWithExclusiveMinMax, 15);\n        expect(result.success).toBe(false);\n      });\n    });\n  });\n\n  describe('Mixed Constraints', () => {\n    describe('NumberWithExclusiveMinInclusiveMax', () => {\n      it('should accept values above exclusive minimum and at inclusive maximum', () => {\n        const result = v.safeParse(generatedSchemas.vNumberWithExclusiveMinInclusiveMax, 90);\n        expect(result.success).toBe(true);\n      });\n\n      it('should accept values above exclusive minimum and below inclusive maximum', () => {\n        const result = v.safeParse(generatedSchemas.vNumberWithExclusiveMinInclusiveMax, 50);\n        expect(result.success).toBe(true);\n      });\n\n      it('should reject values at exclusive minimum', () => {\n        const result = v.safeParse(generatedSchemas.vNumberWithExclusiveMinInclusiveMax, 10);\n        expect(result.success).toBe(false);\n      });\n\n      it('should reject values above inclusive maximum', () => {\n        const result = v.safeParse(generatedSchemas.vNumberWithExclusiveMinInclusiveMax, 91);\n        expect(result.success).toBe(false);\n      });\n    });\n\n    describe('NumberWithInclusiveMinExclusiveMax', () => {\n      it('should accept values at inclusive minimum and below exclusive maximum', () => {\n        const result = v.safeParse(generatedSchemas.vNumberWithInclusiveMinExclusiveMax, 20);\n        expect(result.success).toBe(true);\n      });\n\n      it('should accept values above inclusive minimum and below exclusive maximum', () => {\n        const result = v.safeParse(generatedSchemas.vNumberWithInclusiveMinExclusiveMax, 50);\n        expect(result.success).toBe(true);\n      });\n\n      it('should reject values below inclusive minimum', () => {\n        const result = v.safeParse(generatedSchemas.vNumberWithInclusiveMinExclusiveMax, 19);\n        expect(result.success).toBe(false);\n      });\n\n      it('should reject values at exclusive maximum', () => {\n        const result = v.safeParse(generatedSchemas.vNumberWithInclusiveMinExclusiveMax, 80);\n        expect(result.success).toBe(false);\n      });\n    });\n\n    describe('IntegerWithExclusiveMinInclusiveMax', () => {\n      it('should accept values above exclusive minimum and at inclusive maximum', () => {\n        const result = v.safeParse(generatedSchemas.vIntegerWithExclusiveMinInclusiveMax, 50);\n        expect(result.success).toBe(true);\n      });\n\n      it('should accept values above exclusive minimum and below inclusive maximum', () => {\n        const result = v.safeParse(generatedSchemas.vIntegerWithExclusiveMinInclusiveMax, 25);\n        expect(result.success).toBe(true);\n      });\n\n      it('should reject values at exclusive minimum', () => {\n        const result = v.safeParse(generatedSchemas.vIntegerWithExclusiveMinInclusiveMax, 5);\n        expect(result.success).toBe(false);\n      });\n\n      it('should reject values above inclusive maximum', () => {\n        const result = v.safeParse(generatedSchemas.vIntegerWithExclusiveMinInclusiveMax, 51);\n        expect(result.success).toBe(false);\n      });\n    });\n\n    describe('IntegerWithInclusiveMinExclusiveMax', () => {\n      it('should accept values at inclusive minimum and below exclusive maximum', () => {\n        const result = v.safeParse(generatedSchemas.vIntegerWithInclusiveMinExclusiveMax, 10);\n        expect(result.success).toBe(true);\n      });\n\n      it('should accept values above inclusive minimum and below exclusive maximum', () => {\n        const result = v.safeParse(generatedSchemas.vIntegerWithInclusiveMinExclusiveMax, 55);\n        expect(result.success).toBe(true);\n      });\n\n      it('should reject values below inclusive minimum', () => {\n        const result = v.safeParse(generatedSchemas.vIntegerWithInclusiveMinExclusiveMax, 9);\n        expect(result.success).toBe(false);\n      });\n\n      it('should reject values at exclusive maximum', () => {\n        const result = v.safeParse(generatedSchemas.vIntegerWithInclusiveMinExclusiveMax, 100);\n        expect(result.success).toBe(false);\n      });\n    });\n  });\n\n  describe('Format-Specific Constraints (Int64)', () => {\n    describe('Int64WithMinimum', () => {\n      it('should accept BigInt values at minimum boundary', () => {\n        const result = v.safeParse(generatedSchemas.vInt64WithMinimum, BigInt('-5000000000000'));\n        expect(result.success).toBe(true);\n      });\n\n      it('should accept BigInt values above minimum', () => {\n        const result = v.safeParse(generatedSchemas.vInt64WithMinimum, BigInt('0'));\n        expect(result.success).toBe(true);\n      });\n\n      it('should reject BigInt values below minimum', () => {\n        const result = v.safeParse(generatedSchemas.vInt64WithMinimum, BigInt('-5000000000001'));\n        expect(result.success).toBe(false);\n      });\n    });\n\n    describe('Int64WithMaximum', () => {\n      it('should accept BigInt values at maximum boundary', () => {\n        const result = v.safeParse(generatedSchemas.vInt64WithMaximum, BigInt('5000000000000'));\n        expect(result.success).toBe(true);\n      });\n\n      it('should accept BigInt values below maximum', () => {\n        const result = v.safeParse(generatedSchemas.vInt64WithMaximum, BigInt('1000000000000'));\n        expect(result.success).toBe(true);\n      });\n\n      it('should reject BigInt values above maximum', () => {\n        const result = v.safeParse(generatedSchemas.vInt64WithMaximum, BigInt('5000000000001'));\n        expect(result.success).toBe(false);\n      });\n    });\n\n    describe('Int64WithMinMax', () => {\n      it('should accept BigInt values within range', () => {\n        const result = v.safeParse(generatedSchemas.vInt64WithMinMax, BigInt('0'));\n        expect(result.success).toBe(true);\n      });\n\n      it('should accept BigInt values at minimum boundary', () => {\n        const result = v.safeParse(generatedSchemas.vInt64WithMinMax, BigInt('-4000000000000'));\n        expect(result.success).toBe(true);\n      });\n\n      it('should accept BigInt values at maximum boundary', () => {\n        const result = v.safeParse(generatedSchemas.vInt64WithMinMax, BigInt('4000000000000'));\n        expect(result.success).toBe(true);\n      });\n\n      it('should reject BigInt values below minimum', () => {\n        const result = v.safeParse(generatedSchemas.vInt64WithMinMax, BigInt('-4000000000001'));\n        expect(result.success).toBe(false);\n      });\n\n      it('should reject BigInt values above maximum', () => {\n        const result = v.safeParse(generatedSchemas.vInt64WithMinMax, BigInt('4000000000001'));\n        expect(result.success).toBe(false);\n      });\n    });\n\n    describe('Int64WithExclusiveMin', () => {\n      it('should accept BigInt values above exclusive minimum', () => {\n        const result = v.safeParse(\n          generatedSchemas.vInt64WithExclusiveMin,\n          BigInt('-2999999999999'),\n        );\n        expect(result.success).toBe(true);\n      });\n\n      it('should reject BigInt values at exclusive minimum', () => {\n        const result = v.safeParse(\n          generatedSchemas.vInt64WithExclusiveMin,\n          BigInt('-3000000000000'),\n        );\n        expect(result.success).toBe(false);\n      });\n    });\n\n    describe('Int64WithExclusiveMax', () => {\n      it('should accept BigInt values below exclusive maximum', () => {\n        const result = v.safeParse(\n          generatedSchemas.vInt64WithExclusiveMax,\n          BigInt('2999999999999'),\n        );\n        expect(result.success).toBe(true);\n      });\n\n      it('should reject BigInt values at exclusive maximum', () => {\n        const result = v.safeParse(\n          generatedSchemas.vInt64WithExclusiveMax,\n          BigInt('3000000000000'),\n        );\n        expect(result.success).toBe(false);\n      });\n    });\n\n    describe('Int64WithExclusiveMinMax', () => {\n      it('should accept BigInt values within exclusive range', () => {\n        const result = v.safeParse(generatedSchemas.vInt64WithExclusiveMinMax, BigInt('0'));\n        expect(result.success).toBe(true);\n      });\n\n      it('should reject BigInt values at exclusive minimum', () => {\n        const result = v.safeParse(\n          generatedSchemas.vInt64WithExclusiveMinMax,\n          BigInt('-2000000000000'),\n        );\n        expect(result.success).toBe(false);\n      });\n\n      it('should reject BigInt values at exclusive maximum', () => {\n        const result = v.safeParse(\n          generatedSchemas.vInt64WithExclusiveMinMax,\n          BigInt('2000000000000'),\n        );\n        expect(result.success).toBe(false);\n      });\n    });\n\n    describe('Int64WithExclusiveMinInclusiveMax', () => {\n      it('should accept values above exclusive minimum and at inclusive maximum', () => {\n        const result = v.safeParse(\n          generatedSchemas.vInt64WithExclusiveMinInclusiveMax,\n          BigInt('6000000000000'),\n        );\n        expect(result.success).toBe(true);\n      });\n\n      it('should accept values above exclusive minimum and below inclusive maximum', () => {\n        const result = v.safeParse(\n          generatedSchemas.vInt64WithExclusiveMinInclusiveMax,\n          BigInt('0'),\n        );\n        expect(result.success).toBe(true);\n      });\n\n      it('should reject values at exclusive minimum', () => {\n        const result = v.safeParse(\n          generatedSchemas.vInt64WithExclusiveMinInclusiveMax,\n          BigInt('-6000000000000'),\n        );\n        expect(result.success).toBe(false);\n      });\n\n      it('should reject values above inclusive maximum', () => {\n        const result = v.safeParse(\n          generatedSchemas.vInt64WithExclusiveMinInclusiveMax,\n          BigInt('6000000000001'),\n        );\n        expect(result.success).toBe(false);\n      });\n    });\n\n    describe('Int64WithInclusiveMinExclusiveMax', () => {\n      it('should accept values at inclusive minimum and below exclusive maximum', () => {\n        const result = v.safeParse(\n          generatedSchemas.vInt64WithInclusiveMinExclusiveMax,\n          BigInt('-7000000000000'),\n        );\n        expect(result.success).toBe(true);\n      });\n\n      it('should accept values above inclusive minimum and below exclusive maximum', () => {\n        const result = v.safeParse(\n          generatedSchemas.vInt64WithInclusiveMinExclusiveMax,\n          BigInt('0'),\n        );\n        expect(result.success).toBe(true);\n      });\n\n      it('should reject values below inclusive minimum', () => {\n        const result = v.safeParse(\n          generatedSchemas.vInt64WithInclusiveMinExclusiveMax,\n          BigInt('-7000000000001'),\n        );\n        expect(result.success).toBe(false);\n      });\n\n      it('should reject values at exclusive maximum', () => {\n        const result = v.safeParse(\n          generatedSchemas.vInt64WithInclusiveMinExclusiveMax,\n          BigInt('7000000000000'),\n        );\n        expect(result.success).toBe(false);\n      });\n    });\n  });\n\n  describe('Format-Specific Constraints (UInt64)', () => {\n    describe('UInt64WithMinimum', () => {\n      it('should accept BigInt values at minimum boundary', () => {\n        const result = v.safeParse(generatedSchemas.vUInt64WithMinimum, BigInt('5000000000000'));\n        expect(result.success).toBe(true);\n      });\n\n      it('should accept BigInt values above minimum', () => {\n        const result = v.safeParse(generatedSchemas.vUInt64WithMinimum, BigInt('8000000000000'));\n        expect(result.success).toBe(true);\n      });\n\n      it('should reject BigInt values below minimum', () => {\n        const result = v.safeParse(generatedSchemas.vUInt64WithMinimum, BigInt('4999999999999'));\n        expect(result.success).toBe(false);\n      });\n    });\n\n    describe('UInt64WithMaximum', () => {\n      it('should accept BigInt values at maximum boundary', () => {\n        const result = v.safeParse(generatedSchemas.vUInt64WithMaximum, BigInt('15000000000000'));\n        expect(result.success).toBe(true);\n      });\n\n      it('should accept BigInt values below maximum', () => {\n        const result = v.safeParse(generatedSchemas.vUInt64WithMaximum, BigInt('10000000000000'));\n        expect(result.success).toBe(true);\n      });\n\n      it('should reject BigInt values above maximum', () => {\n        const result = v.safeParse(generatedSchemas.vUInt64WithMaximum, BigInt('15000000000001'));\n        expect(result.success).toBe(false);\n      });\n    });\n\n    describe('UInt64WithMinMax', () => {\n      it('should accept BigInt values within range', () => {\n        const result = v.safeParse(generatedSchemas.vUInt64WithMinMax, BigInt('5000000000000'));\n        expect(result.success).toBe(true);\n      });\n\n      it('should accept BigInt values at minimum boundary', () => {\n        const result = v.safeParse(generatedSchemas.vUInt64WithMinMax, BigInt('1000000000000'));\n        expect(result.success).toBe(true);\n      });\n\n      it('should accept BigInt values at maximum boundary', () => {\n        const result = v.safeParse(generatedSchemas.vUInt64WithMinMax, BigInt('10000000000000'));\n        expect(result.success).toBe(true);\n      });\n\n      it('should reject BigInt values below minimum', () => {\n        const result = v.safeParse(generatedSchemas.vUInt64WithMinMax, BigInt('999999999999'));\n        expect(result.success).toBe(false);\n      });\n\n      it('should reject BigInt values above maximum', () => {\n        const result = v.safeParse(generatedSchemas.vUInt64WithMinMax, BigInt('10000000000001'));\n        expect(result.success).toBe(false);\n      });\n    });\n\n    describe('UInt64WithExclusiveMin', () => {\n      it('should accept BigInt values above exclusive minimum', () => {\n        const result = v.safeParse(\n          generatedSchemas.vUInt64WithExclusiveMin,\n          BigInt('8000000000001'),\n        );\n        expect(result.success).toBe(true);\n      });\n\n      it('should reject BigInt values at exclusive minimum', () => {\n        const result = v.safeParse(\n          generatedSchemas.vUInt64WithExclusiveMin,\n          BigInt('8000000000000'),\n        );\n        expect(result.success).toBe(false);\n      });\n    });\n\n    describe('UInt64WithExclusiveMax', () => {\n      it('should accept BigInt values below exclusive maximum', () => {\n        const result = v.safeParse(\n          generatedSchemas.vUInt64WithExclusiveMax,\n          BigInt('11999999999999'),\n        );\n        expect(result.success).toBe(true);\n      });\n\n      it('should reject BigInt values at exclusive maximum', () => {\n        const result = v.safeParse(\n          generatedSchemas.vUInt64WithExclusiveMax,\n          BigInt('12000000000000'),\n        );\n        expect(result.success).toBe(false);\n      });\n    });\n\n    describe('UInt64WithExclusiveMinMax', () => {\n      it('should accept BigInt values within exclusive range', () => {\n        const result = v.safeParse(\n          generatedSchemas.vUInt64WithExclusiveMinMax,\n          BigInt('5000000000000'),\n        );\n        expect(result.success).toBe(true);\n      });\n\n      it('should reject BigInt values at exclusive minimum', () => {\n        const result = v.safeParse(\n          generatedSchemas.vUInt64WithExclusiveMinMax,\n          BigInt('2000000000000'),\n        );\n        expect(result.success).toBe(false);\n      });\n\n      it('should reject BigInt values at exclusive maximum', () => {\n        const result = v.safeParse(\n          generatedSchemas.vUInt64WithExclusiveMinMax,\n          BigInt('8000000000000'),\n        );\n        expect(result.success).toBe(false);\n      });\n    });\n\n    describe('UInt64WithExclusiveMinInclusiveMax', () => {\n      it('should accept values above exclusive minimum and at inclusive maximum', () => {\n        const result = v.safeParse(\n          generatedSchemas.vUInt64WithExclusiveMinInclusiveMax,\n          BigInt('13000000000000'),\n        );\n        expect(result.success).toBe(true);\n      });\n\n      it('should accept values above exclusive minimum and below inclusive maximum', () => {\n        const result = v.safeParse(\n          generatedSchemas.vUInt64WithExclusiveMinInclusiveMax,\n          BigInt('8000000000000'),\n        );\n        expect(result.success).toBe(true);\n      });\n\n      it('should reject values at exclusive minimum', () => {\n        const result = v.safeParse(\n          generatedSchemas.vUInt64WithExclusiveMinInclusiveMax,\n          BigInt('3000000000000'),\n        );\n        expect(result.success).toBe(false);\n      });\n\n      it('should reject values above inclusive maximum', () => {\n        const result = v.safeParse(\n          generatedSchemas.vUInt64WithExclusiveMinInclusiveMax,\n          BigInt('13000000000001'),\n        );\n        expect(result.success).toBe(false);\n      });\n    });\n\n    describe('UInt64WithInclusiveMinExclusiveMax', () => {\n      it('should accept values at inclusive minimum and below exclusive maximum', () => {\n        const result = v.safeParse(\n          generatedSchemas.vUInt64WithInclusiveMinExclusiveMax,\n          BigInt('4000000000000'),\n        );\n        expect(result.success).toBe(true);\n      });\n\n      it('should accept values above inclusive minimum and below exclusive maximum', () => {\n        const result = v.safeParse(\n          generatedSchemas.vUInt64WithInclusiveMinExclusiveMax,\n          BigInt('9000000000000'),\n        );\n        expect(result.success).toBe(true);\n      });\n\n      it('should reject values below inclusive minimum', () => {\n        const result = v.safeParse(\n          generatedSchemas.vUInt64WithInclusiveMinExclusiveMax,\n          BigInt('3999999999999'),\n        );\n        expect(result.success).toBe(false);\n      });\n\n      it('should reject values at exclusive maximum', () => {\n        const result = v.safeParse(\n          generatedSchemas.vUInt64WithInclusiveMinExclusiveMax,\n          BigInt('14000000000000'),\n        );\n        expect(result.success).toBe(false);\n      });\n    });\n  });\n\n  describe('Special Cases', () => {\n    describe('PrecedenceTest', () => {\n      it('should use exclusive constraints over inclusive (exclusive minimum takes precedence)', () => {\n        // exclusiveMinimum: 5, minimum: 10 - exclusive should take precedence\n        const result = v.safeParse(generatedSchemas.vPrecedenceTest, 6);\n        expect(result.success).toBe(true);\n      });\n\n      it('should use exclusive constraints over inclusive (exclusive maximum takes precedence)', () => {\n        // exclusiveMaximum: 95, maximum: 90 - exclusive should take precedence\n        const result = v.safeParse(generatedSchemas.vPrecedenceTest, 94);\n        expect(result.success).toBe(true);\n      });\n\n      it('should reject values at exclusive minimum boundary', () => {\n        const result = v.safeParse(generatedSchemas.vPrecedenceTest, 5);\n        expect(result.success).toBe(false);\n      });\n\n      it('should reject values at exclusive maximum boundary', () => {\n        const result = v.safeParse(generatedSchemas.vPrecedenceTest, 95);\n        expect(result.success).toBe(false);\n      });\n    });\n  });\n});\n"
  },
  {
    "path": "packages/openapi-ts-tests/valibot/v1/test/utils.ts",
    "content": "import fs from 'node:fs';\nimport path from 'node:path';\nimport { fileURLToPath } from 'node:url';\n\nimport { createClient, type UserConfig } from '@hey-api/openapi-ts';\nimport * as v from 'valibot';\n\nimport { getSpecsPath } from '../../../utils';\n\nconst __filename = fileURLToPath(import.meta.url);\nconst __dirname = path.dirname(__filename);\n\nexport const getSnapshotsPath = (): string => path.join(__dirname, '..', '__snapshots__');\n\nexport const getTempSnapshotsPath = (): string => path.join(__dirname, '..', '.gen', 'snapshots');\n\nexport const createValibotConfig =\n  ({ openApiVersion, outputDir }: { openApiVersion: string; outputDir: string }) =>\n  (userConfig: UserConfig) => {\n    const input = userConfig.input instanceof Array ? userConfig.input[0]! : userConfig.input;\n    const inputPath = path.join(\n      getSpecsPath(),\n      openApiVersion,\n      typeof input === 'string' ? input : (input.path as string),\n    );\n    const output = userConfig.output instanceof Array ? userConfig.output[0]! : userConfig.output;\n    const outputPath = typeof output === 'string' ? output : (output?.path ?? '');\n    return {\n      plugins: ['valibot'],\n      ...userConfig,\n      input:\n        typeof userConfig.input === 'string'\n          ? inputPath\n          : {\n              ...userConfig.input,\n              path: inputPath,\n            },\n      logs: { level: 'silent', path: './logs' },\n      output: path.join(outputDir, outputPath),\n    } as UserConfig;\n  };\n\nfunction loadGeneratedSchemas(generatedPath: string): any {\n  if (!fs.existsSync(generatedPath)) {\n    throw new Error(\n      `Generated schema file not found: ${generatedPath}\\n` +\n        `Schema generation may have failed. Check the input schema file for errors.`,\n    );\n  }\n\n  try {\n    const generatedCode = fs.readFileSync(generatedPath, 'utf-8');\n\n    const exportMatches = generatedCode.match(/export const (\\w+)/g);\n    if (!exportMatches) {\n      throw new Error('No exported schemas found in generated code');\n    }\n\n    const schemaNames = exportMatches.map((match: string) => match.replace('export const ', ''));\n    const evalCode =\n      generatedCode\n        .replace(/import \\* as v from 'valibot';/, '')\n        .replace(/export const/g, 'const')\n        .replace(/v\\./g, 'vModule.') + `\\n\\nreturn { ${schemaNames.join(', ')} };`;\n\n    const schemaFunction = new Function('vModule', evalCode);\n    return schemaFunction(v);\n  } catch (error) {\n    throw new Error(\n      `Failed to load generated schemas from ${generatedPath}: ${error instanceof Error ? error.message : String(error)}\\n` +\n        `The generated file may contain syntax errors or be malformed.`,\n    );\n  }\n}\n\nexport async function setupValibotTest(\n  input: string,\n  output: string,\n  version = '3.1.x',\n): Promise<any> {\n  const inputPath = path.join(getSpecsPath(), version, input);\n  const outputPath = path.join(__dirname, '.gen', version, output);\n\n  fs.mkdirSync(outputPath, { recursive: true });\n\n  await createClient({\n    input: inputPath,\n    logs: { level: 'silent' },\n    output: outputPath,\n    plugins: ['valibot'],\n  });\n\n  const generatedPath = path.join(outputPath, 'valibot.gen.ts');\n  return loadGeneratedSchemas(generatedPath);\n}\n"
  },
  {
    "path": "packages/openapi-ts-tests/valibot/v1/tsconfig.json",
    "content": "{\n  \"extends\": \"../../tsconfig.base.json\",\n  \"include\": [\"test/**/*\", \"__snapshots__/**/*\"],\n  \"exclude\": [\".gen/**/*\"],\n  \"references\": [{ \"path\": \"../../../openapi-ts\" }]\n}\n"
  },
  {
    "path": "packages/openapi-ts-tests/valibot/v1/turbo.json",
    "content": "{\n  \"$schema\": \"../../../../node_modules/turbo/schema.json\",\n  \"extends\": [\"//\"],\n  \"tasks\": {\n    \"build\": {\n      \"dependsOn\": [],\n      \"outputs\": [\"dist/**\"]\n    }\n  }\n}\n"
  },
  {
    "path": "packages/openapi-ts-tests/valibot/v1/vitest.setup.ts",
    "content": "import { fileURLToPath } from 'node:url';\n\nimport { beforeAll } from 'vitest';\n\nbeforeAll(() => {\n  process.chdir(fileURLToPath(new URL('.', import.meta.url)));\n});\n"
  },
  {
    "path": "packages/openapi-ts-tests/zod/v3/.gitignore",
    "content": ".DS_Store\n.idea\n.tmp\n.tsdown\nlogs\nnode_modules\ntemp\n\n.env\ncoverage\ndist\n\n# test files\n.gen\n"
  },
  {
    "path": "packages/openapi-ts-tests/zod/v3/__snapshots__/2.0.x/mini/array-items-all-of/zod.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport * as z from 'zod/v4-mini';\n\nexport const zArrayWithAllOfObjects = z.array(z.intersection(z.object({\n    id: z.optional(z.int())\n}), z.object({\n    name: z.optional(z.string())\n})));\n\nexport const zArrayWithAllOfPrimitives = z.array(z.intersection(z.number(), z.string()));\n\nexport const zBaseModel = z.object({\n    id: z.optional(z.int()),\n    createdAt: z.optional(z.iso.datetime())\n});\n\nexport const zArrayWithAllOfRefs = z.array(z.intersection(zBaseModel, z.object({\n    extra: z.optional(z.string())\n})));\n"
  },
  {
    "path": "packages/openapi-ts-tests/zod/v3/__snapshots__/2.0.x/mini/default/zod.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport * as z from 'zod/v4-mini';\n\n/**\n * Testing multiline comments in string: First line\n * Second line\n *\n * Fourth line\n */\nexport const zCommentWithBreaks = z.int();\n\n/**\n * Testing backticks in string: `backticks` and ```multiple backticks``` should work\n */\nexport const zCommentWithBackticks = z.int();\n\n/**\n * Testing backticks and quotes in string: `backticks`, 'quotes', \"double quotes\" and ```multiple backticks``` should work\n */\nexport const zCommentWithBackticksAndQuotes = z.int();\n\n/**\n * Testing slashes in string: \\backwards\\\\\\ and /forwards/// should work\n */\nexport const zCommentWithSlashes = z.int();\n\n/**\n * Testing expression placeholders in string: ${expression} should work\n */\nexport const zCommentWithExpressionPlaceholders = z.int();\n\n/**\n * Testing quotes in string: 'single quote''' and \"double quotes\"\"\" should work\n */\nexport const zCommentWithQuotes = z.int();\n\n/**\n * Testing reserved characters in string: * inline * and ** inline ** should work\n */\nexport const zCommentWithReservedCharacters = z.int();\n\n/**\n * This is a simple number\n */\nexport const zSimpleInteger = z.int();\n\n/**\n * This is a simple boolean\n */\nexport const zSimpleBoolean = z.boolean();\n\n/**\n * This is a simple string\n */\nexport const zSimpleString = z.string();\n\n/**\n * A string with non-ascii (unicode) characters valid in typescript identifiers (æøåÆØÅöÔèÈ字符串)\n */\nexport const zNonAsciiStringæøåÆøÅöôêÊ字符串 = z.string();\n\n/**\n * This is a simple file\n */\nexport const zSimpleFile = z.string();\n\n/**\n * This is a simple string\n */\nexport const zSimpleStringWithPattern = z.string().check(z.maxLength(64), z.regex(/^[a-zA-Z0-9_]*$/));\n\n/**\n * This is a simple enum with strings\n */\nexport const zEnumWithStrings = z.enum([\n    'Success',\n    'Warning',\n    'Error',\n    '\\'Single Quote\\'',\n    '\"Double Quotes\"',\n    'Non-ascii: øæåôöØÆÅÔÖ字符串'\n]);\n\n/**\n * This is a simple enum with numbers\n */\nexport const zEnumWithNumbers = z.union([\n    z.literal(1),\n    z.literal(2),\n    z.literal(3),\n    z.literal(1.1),\n    z.literal(1.2),\n    z.literal(1.3),\n    z.literal(100),\n    z.literal(200),\n    z.literal(300),\n    z.literal(-100),\n    z.literal(-200),\n    z.literal(-300),\n    z.literal(-1.1),\n    z.literal(-1.2),\n    z.literal(-1.3)\n]);\n\n/**\n * Success=1,Warning=2,Error=3\n */\nexport const zEnumFromDescription = z.number();\n\n/**\n * This is a simple enum with numbers\n */\nexport const zEnumWithExtensions = z.union([\n    z.literal(200),\n    z.literal(400),\n    z.literal(500)\n]);\n\n/**\n * This is a simple array with numbers\n */\nexport const zArrayWithNumbers = z.array(z.int());\n\n/**\n * This is a simple array with booleans\n */\nexport const zArrayWithBooleans = z.array(z.boolean());\n\n/**\n * This is a simple array with strings\n */\nexport const zArrayWithStrings = z.array(z.string());\n\n/**\n * This is a simple array with properties\n */\nexport const zArrayWithProperties = z.array(z.object({\n    foo: z.optional(z.string()),\n    bar: z.optional(z.string())\n}));\n\n/**\n * This is a string dictionary\n */\nexport const zDictionaryWithString = z.record(z.string(), z.string());\n\n/**\n * This is a string dictionary\n */\nexport const zDictionaryWithDictionary = z.record(z.string(), z.record(z.string(), z.string()));\n\n/**\n * This is a complex dictionary\n */\nexport const zDictionaryWithProperties = z.record(z.string(), z.object({\n    foo: z.optional(z.string()),\n    bar: z.optional(z.string())\n}));\n\n/**\n * This is a type-only model that defines Date as a string\n */\nexport const zDate = z.string();\n\n/**\n * This is a model with one number property\n */\nexport const zModelWithInteger = z.object({\n    prop: z.optional(z.int())\n});\n\n/**\n * This is a model with one boolean property\n */\nexport const zModelWithBoolean = z.object({\n    prop: z.optional(z.boolean())\n});\n\n/**\n * This is a model with one string property\n */\nexport const zModelWithString = z.object({\n    prop: z.optional(z.string())\n});\n\nexport const zSimpleReference = zModelWithString;\n\n/**\n * This is a simple array with references\n */\nexport const zArrayWithReferences = z.array(zModelWithString);\n\n/**\n * This is a simple array containing an array\n */\nexport const zArrayWithArray = z.array(z.array(zModelWithString));\n\n/**\n * This is a string reference\n */\nexport const zDictionaryWithReference = z.record(z.string(), zModelWithString);\n\n/**\n * This is a complex dictionary\n */\nexport const zDictionaryWithArray = z.record(z.string(), z.array(zModelWithString));\n\n/**\n * This is a model with one string property\n */\nexport const zModelWithStringError = z.object({\n    prop: z.optional(z.string())\n});\n\n/**\n * This is a model with one string property\n */\nexport const zModelWithNullableString = z.object({\n    nullableProp: z.nullish(z.string()),\n    nullableRequiredProp: z.nullable(z.string())\n});\n\n/**\n * This is a model with one enum\n */\nexport const zModelWithEnum = z.object({\n    test: z.optional(z.enum([\n        'Success',\n        'Warning',\n        'Error',\n        'ØÆÅ字符串'\n    ])),\n    statusCode: z.optional(z.enum([\n        '100',\n        '200 FOO',\n        '300 FOO_BAR',\n        '400 foo-bar',\n        '500 foo.bar',\n        '600 foo&bar'\n    ])),\n    bool: z.optional(z.literal(true))\n});\n\n/**\n * This is a model with one enum\n */\nexport const zModelWithEnumFromDescription = z.object({\n    test: z.optional(z.int())\n});\n\n/**\n * This is a model with nested enums\n */\nexport const zModelWithNestedEnums = z.object({\n    dictionaryWithEnum: z.optional(z.record(z.string(), z.enum([\n        'Success',\n        'Warning',\n        'Error'\n    ]))),\n    dictionaryWithEnumFromDescription: z.optional(z.record(z.string(), z.int())),\n    arrayWithEnum: z.optional(z.array(z.enum([\n        'Success',\n        'Warning',\n        'Error'\n    ]))),\n    arrayWithDescription: z.optional(z.array(z.int()))\n});\n\n/**\n * This is a model with one property containing an array\n */\nexport const zModelWithArray = z.object({\n    prop: z.optional(z.array(zModelWithString)),\n    propWithFile: z.optional(z.array(z.string())),\n    propWithNumber: z.optional(z.array(z.number()))\n});\n\n/**\n * This is a model with one property containing a dictionary\n */\nexport const zModelWithDictionary = z.object({\n    prop: z.optional(z.record(z.string(), z.string()))\n});\n\n/**\n * This is a model with one property containing a circular reference\n */\nexport const zModelWithCircularReference = z.object({\n    prop: z.optional(z.lazy((): any => zModelWithCircularReference))\n});\n\n/**\n * This is a model with one nested property\n */\nexport const zModelWithProperties = z.object({\n    required: z.string(),\n    requiredAndReadOnly: z.readonly(z.string()),\n    string: z.optional(z.string()),\n    number: z.optional(z.number()),\n    boolean: z.optional(z.boolean()),\n    reference: z.optional(zModelWithString),\n    'property with space': z.optional(z.string()),\n    default: z.optional(z.string()),\n    try: z.optional(z.string()),\n    '@namespace.string': z.optional(z.readonly(z.string())),\n    '@namespace.integer': z.optional(z.readonly(z.int()))\n});\n\n/**\n * This is a model with one property containing a reference\n */\nexport const zModelWithReference = z.object({\n    prop: z.optional(zModelWithProperties)\n});\n\n/**\n * This is a model with one nested property\n */\nexport const zModelWithNestedProperties = z.object({\n    first: z.readonly(z.object({\n        second: z.readonly(z.object({\n            third: z.readonly(z.string())\n        }))\n    }))\n});\n\n/**\n * This is a model with duplicated properties\n */\nexport const zModelWithDuplicateProperties = z.object({\n    prop: z.optional(zModelWithString)\n});\n\n/**\n * This is a model with ordered properties\n */\nexport const zModelWithOrderedProperties = z.object({\n    zebra: z.optional(z.string()),\n    apple: z.optional(z.string()),\n    hawaii: z.optional(z.string())\n});\n\n/**\n * This is a model with duplicated imports\n */\nexport const zModelWithDuplicateImports = z.object({\n    propA: z.optional(zModelWithString),\n    propB: z.optional(zModelWithString),\n    propC: z.optional(zModelWithString)\n});\n\n/**\n * This is a model that extends another model\n */\nexport const zModelThatExtends = z.intersection(zModelWithString, z.object({\n    propExtendsA: z.optional(z.string()),\n    propExtendsB: z.optional(zModelWithString)\n}));\n\n/**\n * This is a model that extends another model\n */\nexport const zModelThatExtendsExtends = z.intersection(z.intersection(zModelWithString, zModelThatExtends), z.object({\n    propExtendsC: z.optional(z.string()),\n    propExtendsD: z.optional(zModelWithString)\n}));\n\nexport const zDefault = z.object({\n    name: z.optional(z.string())\n});\n\n/**\n * This is a model that contains a some patterns\n */\nexport const zModelWithPattern = z.object({\n    key: z.string().check(z.maxLength(64), z.regex(/^[a-zA-Z0-9_]*$/)),\n    name: z.string().check(z.maxLength(255)),\n    enabled: z.optional(z.readonly(z.boolean())),\n    modified: z.optional(z.readonly(z.iso.datetime())),\n    id: z.optional(z.string().check(z.regex(/^\\d{2}-\\d{3}-\\d{4}$/))),\n    text: z.optional(z.string().check(z.regex(/^\\w+$/))),\n    patternWithSingleQuotes: z.optional(z.string().check(z.regex(/^[a-zA-Z0-9']*$/))),\n    patternWithNewline: z.optional(z.string().check(z.regex(/aaa\\nbbb/))),\n    patternWithBacktick: z.optional(z.string().check(z.regex(/aaa`bbb/))),\n    patternWithUnicode: z.optional(z.string().check(z.regex(/^\\p{L}+$/u)))\n});\n\nexport const zParameterActivityParams = z.object({\n    description: z.optional(z.string()),\n    graduate_id: z.optional(z.int()),\n    organization_id: z.optional(z.int()),\n    parent_activity: z.optional(z.int()),\n    post_id: z.optional(z.int())\n});\n\nexport const zResponsePostActivityResponse = z.object({\n    description: z.optional(z.string()),\n    graduate_id: z.optional(z.int()),\n    organization_id: z.optional(z.int()),\n    parent_activity_id: z.optional(z.int()),\n    post_id: z.optional(z.int())\n});\n\nexport const zFailureFailure = z.object({\n    error: z.optional(z.string()),\n    message: z.optional(z.string()),\n    reference_code: z.optional(z.string())\n});\n\nexport const zExternalSharedModel = z.object({\n    id: z.string(),\n    name: z.optional(z.string())\n});\n\nexport const zExternalRefA = zExternalSharedModel;\n\nexport const zExternalRefB = zExternalSharedModel;\n\n/**\n * This is a model with one nested property\n */\nexport const zModelWithPropertiesWritable = z.object({\n    required: z.string(),\n    string: z.optional(z.string()),\n    number: z.optional(z.number()),\n    boolean: z.optional(z.boolean()),\n    reference: z.optional(zModelWithString),\n    'property with space': z.optional(z.string()),\n    default: z.optional(z.string()),\n    try: z.optional(z.string())\n});\n\n/**\n * This is a model with one property containing a reference\n */\nexport const zModelWithReferenceWritable = z.object({\n    prop: z.optional(zModelWithPropertiesWritable)\n});\n\n/**\n * This is a model that contains a some patterns\n */\nexport const zModelWithPatternWritable = z.object({\n    key: z.string().check(z.maxLength(64), z.regex(/^[a-zA-Z0-9_]*$/)),\n    name: z.string().check(z.maxLength(255)),\n    id: z.optional(z.string().check(z.regex(/^\\d{2}-\\d{3}-\\d{4}$/))),\n    text: z.optional(z.string().check(z.regex(/^\\w+$/))),\n    patternWithSingleQuotes: z.optional(z.string().check(z.regex(/^[a-zA-Z0-9']*$/))),\n    patternWithNewline: z.optional(z.string().check(z.regex(/aaa\\nbbb/))),\n    patternWithBacktick: z.optional(z.string().check(z.regex(/aaa`bbb/))),\n    patternWithUnicode: z.optional(z.string().check(z.regex(/^\\p{L}+$/u)))\n});\n\nexport const zServiceWithEmptyTagData = z.object({\n    body: z.optional(z.never()),\n    path: z.optional(z.never()),\n    query: z.optional(z.never())\n});\n\nexport const zPatchApiVbyApiVersionNoTagData = z.object({\n    body: z.optional(z.never()),\n    path: z.optional(z.never()),\n    query: z.optional(z.never())\n});\n\nexport const zFooWowData = z.object({\n    body: z.optional(z.never()),\n    path: z.optional(z.never()),\n    query: z.optional(z.never())\n});\n\nexport const zDeleteCallWithoutParametersAndResponseData = z.object({\n    body: z.optional(z.never()),\n    path: z.optional(z.never()),\n    query: z.optional(z.never())\n});\n\nexport const zGetCallWithoutParametersAndResponseData = z.object({\n    body: z.optional(z.never()),\n    path: z.optional(z.never()),\n    query: z.optional(z.never())\n});\n\nexport const zHeadCallWithoutParametersAndResponseData = z.object({\n    body: z.optional(z.never()),\n    path: z.optional(z.never()),\n    query: z.optional(z.never())\n});\n\nexport const zOptionsCallWithoutParametersAndResponseData = z.object({\n    body: z.optional(z.never()),\n    path: z.optional(z.never()),\n    query: z.optional(z.never())\n});\n\nexport const zPatchCallWithoutParametersAndResponseData = z.object({\n    body: z.optional(z.never()),\n    path: z.optional(z.never()),\n    query: z.optional(z.never())\n});\n\nexport const zPostCallWithoutParametersAndResponseData = z.object({\n    body: z.optional(z.never()),\n    path: z.optional(z.never()),\n    query: z.optional(z.never())\n});\n\nexport const zPutCallWithoutParametersAndResponseData = z.object({\n    body: z.optional(z.never()),\n    path: z.optional(z.never()),\n    query: z.optional(z.never())\n});\n\nexport const zCallWithDescriptionsData = z.object({\n    body: z.optional(z.never()),\n    path: z.optional(z.never()),\n    query: z.optional(z.object({\n        parameterWithBreaks: z.optional(z.string()),\n        parameterWithBackticks: z.optional(z.string()),\n        parameterWithSlashes: z.optional(z.string()),\n        parameterWithExpressionPlaceholders: z.optional(z.string()),\n        parameterWithQuotes: z.optional(z.string()),\n        parameterWithReservedCharacters: z.optional(z.string())\n    }))\n});\n\nexport const zCallWithParametersData = z.object({\n    body: z.optional(z.never()),\n    path: z.object({\n        parameterPath: z.string(),\n        'api-version': z.string()\n    }),\n    query: z.object({\n        parameterQuery: z.string()\n    }),\n    headers: z.object({\n        parameterHeader: z.string()\n    })\n});\n\nexport const zCallWithWeirdParameterNamesData = z.object({\n    body: z.string(),\n    path: z.object({\n        'parameter.path.1': z.optional(z.string()),\n        'parameter-path-2': z.optional(z.string()),\n        'PARAMETER-PATH-3': z.optional(z.string()),\n        'api-version': z.string()\n    }),\n    query: z.object({\n        default: z.optional(z.string()),\n        'parameter-query': z.string()\n    }),\n    headers: z.object({\n        'parameter.header': z.string()\n    })\n});\n\nexport const zCallWithDefaultParametersData = z.object({\n    body: z.optional(z.never()),\n    path: z.optional(z.never()),\n    query: z.object({\n        parameterString: z._default(z.string(), 'Hello World!'),\n        parameterNumber: z._default(z.number(), 123),\n        parameterBoolean: z._default(z.boolean(), true),\n        parameterEnum: z.enum([\n            'Success',\n            'Warning',\n            'Error'\n        ]),\n        parameterModel: z._default(z.object({\n            prop: z.optional(z.string())\n        }), { prop: 'Hello World!' })\n    })\n});\n\nexport const zCallWithDefaultOptionalParametersData = z.object({\n    body: z.optional(z.never()),\n    path: z.optional(z.never()),\n    query: z.optional(z.object({\n        parameterString: z._default(z.optional(z.string()), 'Hello World!'),\n        parameterNumber: z._default(z.optional(z.number()), 123),\n        parameterBoolean: z._default(z.optional(z.boolean()), true),\n        parameterEnum: z.optional(z.enum([\n            'Success',\n            'Warning',\n            'Error'\n        ]))\n    }))\n});\n\nexport const zCallToTestOrderOfParamsData = z.object({\n    body: z.optional(z.never()),\n    path: z.optional(z.never()),\n    query: z.object({\n        parameterOptionalStringWithDefault: z._default(z.optional(z.string()), 'Hello World!'),\n        parameterOptionalStringWithEmptyDefault: z._default(z.optional(z.string()), ''),\n        parameterOptionalStringWithNoDefault: z.optional(z.string()),\n        parameterStringWithDefault: z._default(z.string(), 'Hello World!'),\n        parameterStringWithEmptyDefault: z._default(z.string(), ''),\n        parameterStringWithNoDefault: z.string(),\n        parameterStringNullableWithNoDefault: z.nullish(z.string()),\n        parameterStringNullableWithDefault: z._default(z.nullish(z.string()), null)\n    })\n});\n\nexport const zDuplicateNameData = z.object({\n    body: z.optional(z.never()),\n    path: z.optional(z.never()),\n    query: z.optional(z.never())\n});\n\nexport const zDuplicateName2Data = z.object({\n    body: z.optional(z.never()),\n    path: z.optional(z.never()),\n    query: z.optional(z.never())\n});\n\nexport const zDuplicateName3Data = z.object({\n    body: z.optional(z.never()),\n    path: z.optional(z.never()),\n    query: z.optional(z.never())\n});\n\nexport const zDuplicateName4Data = z.object({\n    body: z.optional(z.never()),\n    path: z.optional(z.never()),\n    query: z.optional(z.never())\n});\n\nexport const zCallWithNoContentResponseData = z.object({\n    body: z.optional(z.never()),\n    path: z.optional(z.never()),\n    query: z.optional(z.never())\n});\n\nexport const zCallWithResponseAndNoContentResponseData = z.object({\n    body: z.optional(z.never()),\n    path: z.optional(z.never()),\n    query: z.optional(z.never())\n});\n\nexport const zCallWithResponseAndNoContentResponseResponse = z.union([\n    z.number(),\n    z.unknown()\n]);\n\nexport const zDummyAData = z.object({\n    body: z.optional(z.never()),\n    path: z.optional(z.never()),\n    query: z.optional(z.never())\n});\n\nexport const zDummyBData = z.object({\n    body: z.optional(z.never()),\n    path: z.optional(z.never()),\n    query: z.optional(z.never())\n});\n\nexport const zCallWithResponseData = z.object({\n    body: z.optional(z.never()),\n    path: z.optional(z.never()),\n    query: z.optional(z.never())\n});\n\n/**\n * Message for default response\n */\nexport const zCallWithResponseResponse = zModelWithString;\n\nexport const zCallWithDuplicateResponsesData = z.object({\n    body: z.optional(z.never()),\n    path: z.optional(z.never()),\n    query: z.optional(z.never())\n});\n\n/**\n * Message for 201 response\n */\nexport const zCallWithDuplicateResponsesResponse = zModelWithString;\n\nexport const zCallWithResponsesData = z.object({\n    body: z.optional(z.never()),\n    path: z.optional(z.never()),\n    query: z.optional(z.never())\n});\n\nexport const zCallWithResponsesResponse = z.union([\n    z.object({\n        '@namespace.string': z.optional(z.readonly(z.string())),\n        '@namespace.integer': z.optional(z.readonly(z.int())),\n        value: z.optional(z.readonly(z.array(zModelWithString)))\n    }),\n    zModelThatExtends,\n    zModelThatExtendsExtends\n]);\n\nexport const zCollectionFormatData = z.object({\n    body: z.optional(z.never()),\n    path: z.optional(z.never()),\n    query: z.object({\n        parameterArrayCSV: z.array(z.string()),\n        parameterArraySSV: z.array(z.string()),\n        parameterArrayTSV: z.array(z.string()),\n        parameterArrayPipes: z.array(z.string()),\n        parameterArrayMulti: z.array(z.string())\n    })\n});\n\nexport const zTypesData = z.object({\n    body: z.optional(z.never()),\n    path: z.optional(z.object({\n        id: z.optional(z.int().check(z.minimum(-2147483648, { error: 'Invalid value: Expected int32 to be >= -2147483648' }), z.maximum(2147483647, { error: 'Invalid value: Expected int32 to be <= 2147483647' })))\n    })),\n    query: z.object({\n        parameterNumber: z._default(z.number(), 123),\n        parameterString: z._default(z.string(), 'default'),\n        parameterBoolean: z._default(z.boolean(), true),\n        parameterArray: z.array(z.string()),\n        parameterDictionary: z.record(z.string(), z.unknown()),\n        parameterEnum: z.enum([\n            'Success',\n            'Warning',\n            'Error'\n        ])\n    })\n});\n\nexport const zTypesResponse = z.union([\n    z.number(),\n    z.string(),\n    z.boolean(),\n    z.record(z.string(), z.unknown())\n]);\n\nexport const zComplexTypesData = z.object({\n    body: z.optional(z.never()),\n    path: z.optional(z.never()),\n    query: z.object({\n        parameterObject: z.object({\n            first: z.optional(z.object({\n                second: z.optional(z.object({\n                    third: z.optional(z.string())\n                }))\n            }))\n        }),\n        parameterReference: z.object({\n            prop: z.optional(z.string())\n        })\n    })\n});\n\n/**\n * Successful response\n */\nexport const zComplexTypesResponse = z.array(zModelWithString);\n\nexport const zCallWithResultFromHeaderData = z.object({\n    body: z.optional(z.never()),\n    path: z.optional(z.never()),\n    query: z.optional(z.never())\n});\n\nexport const zTestErrorCodeData = z.object({\n    body: z.optional(z.never()),\n    path: z.optional(z.never()),\n    query: z.object({\n        status: z.string()\n    })\n});\n\nexport const zNonAsciiæøåÆøÅöôêÊ字符串Data = z.object({\n    body: z.optional(z.never()),\n    path: z.optional(z.never()),\n    query: z.object({\n        nonAsciiParamæøåÆØÅöôêÊ: z.int()\n    })\n});\n\n/**\n * Successful response\n */\nexport const zNonAsciiæøåÆøÅöôêÊ字符串Response = zNonAsciiStringæøåÆøÅöôêÊ字符串;\n\nexport const zPostApiVbyApiVersionBodyData = z.object({\n    body: zParameterActivityParams,\n    path: z.optional(z.never()),\n    query: z.optional(z.never())\n});\n\n/**\n * OK\n */\nexport const zPostApiVbyApiVersionBodyResponse = zResponsePostActivityResponse;\n"
  },
  {
    "path": "packages/openapi-ts-tests/zod/v3/__snapshots__/2.0.x/mini/type-format/zod.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport * as z from 'zod/v4-mini';\n\nexport const zFoo = z.object({\n    bar: z.optional(z.int()),\n    foo: z._default(z.coerce.bigint().check(z.minimum(BigInt('-9223372036854775808'), { error: 'Invalid value: Expected int64 to be >= -9223372036854775808' }), z.maximum(BigInt('9223372036854775807'), { error: 'Invalid value: Expected int64 to be <= 9223372036854775807' })), BigInt(0)),\n    id: z.string()\n});\n\nexport const zBar = z.object({\n    foo: z.int()\n});\n\nexport const zPostFooData = z.object({\n    body: z.optional(z.never()),\n    path: z.optional(z.never()),\n    query: z.optional(z.never())\n});\n\n/**\n * OK\n */\nexport const zPostFooResponse = zFoo;\n"
  },
  {
    "path": "packages/openapi-ts-tests/zod/v3/__snapshots__/2.0.x/v3/array-items-all-of/zod.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport { z } from 'zod';\n\nexport const zArrayWithAllOfObjects = z.array(z.object({\n    id: z.number().int().optional()\n}).and(z.object({\n    name: z.string().optional()\n})));\n\nexport const zArrayWithAllOfPrimitives = z.array(z.intersection(z.number(), z.string()));\n\nexport const zBaseModel = z.object({\n    id: z.number().int().optional(),\n    createdAt: z.string().datetime().optional()\n});\n\nexport const zArrayWithAllOfRefs = z.array(zBaseModel.and(z.object({\n    extra: z.string().optional()\n})));\n"
  },
  {
    "path": "packages/openapi-ts-tests/zod/v3/__snapshots__/2.0.x/v3/default/zod.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport { z } from 'zod';\n\n/**\n * Testing multiline comments in string: First line\n * Second line\n *\n * Fourth line\n */\nexport const zCommentWithBreaks = z.number().int();\n\n/**\n * Testing backticks in string: `backticks` and ```multiple backticks``` should work\n */\nexport const zCommentWithBackticks = z.number().int();\n\n/**\n * Testing backticks and quotes in string: `backticks`, 'quotes', \"double quotes\" and ```multiple backticks``` should work\n */\nexport const zCommentWithBackticksAndQuotes = z.number().int();\n\n/**\n * Testing slashes in string: \\backwards\\\\\\ and /forwards/// should work\n */\nexport const zCommentWithSlashes = z.number().int();\n\n/**\n * Testing expression placeholders in string: ${expression} should work\n */\nexport const zCommentWithExpressionPlaceholders = z.number().int();\n\n/**\n * Testing quotes in string: 'single quote''' and \"double quotes\"\"\" should work\n */\nexport const zCommentWithQuotes = z.number().int();\n\n/**\n * Testing reserved characters in string: * inline * and ** inline ** should work\n */\nexport const zCommentWithReservedCharacters = z.number().int();\n\n/**\n * This is a simple number\n */\nexport const zSimpleInteger = z.number().int();\n\n/**\n * This is a simple boolean\n */\nexport const zSimpleBoolean = z.boolean();\n\n/**\n * This is a simple string\n */\nexport const zSimpleString = z.string();\n\n/**\n * A string with non-ascii (unicode) characters valid in typescript identifiers (æøåÆØÅöÔèÈ字符串)\n */\nexport const zNonAsciiStringæøåÆøÅöôêÊ字符串 = z.string();\n\n/**\n * This is a simple file\n */\nexport const zSimpleFile = z.string();\n\n/**\n * This is a simple string\n */\nexport const zSimpleStringWithPattern = z.string().max(64).regex(/^[a-zA-Z0-9_]*$/);\n\n/**\n * This is a simple enum with strings\n */\nexport const zEnumWithStrings = z.enum([\n    'Success',\n    'Warning',\n    'Error',\n    '\\'Single Quote\\'',\n    '\"Double Quotes\"',\n    'Non-ascii: øæåôöØÆÅÔÖ字符串'\n]);\n\n/**\n * This is a simple enum with numbers\n */\nexport const zEnumWithNumbers = z.union([\n    z.literal(1),\n    z.literal(2),\n    z.literal(3),\n    z.literal(1.1),\n    z.literal(1.2),\n    z.literal(1.3),\n    z.literal(100),\n    z.literal(200),\n    z.literal(300),\n    z.literal(-100),\n    z.literal(-200),\n    z.literal(-300),\n    z.literal(-1.1),\n    z.literal(-1.2),\n    z.literal(-1.3)\n]);\n\n/**\n * Success=1,Warning=2,Error=3\n */\nexport const zEnumFromDescription = z.number();\n\n/**\n * This is a simple enum with numbers\n */\nexport const zEnumWithExtensions = z.union([\n    z.literal(200),\n    z.literal(400),\n    z.literal(500)\n]);\n\n/**\n * This is a simple array with numbers\n */\nexport const zArrayWithNumbers = z.array(z.number().int());\n\n/**\n * This is a simple array with booleans\n */\nexport const zArrayWithBooleans = z.array(z.boolean());\n\n/**\n * This is a simple array with strings\n */\nexport const zArrayWithStrings = z.array(z.string());\n\n/**\n * This is a simple array with properties\n */\nexport const zArrayWithProperties = z.array(z.object({\n    foo: z.string().optional(),\n    bar: z.string().optional()\n}));\n\n/**\n * This is a string dictionary\n */\nexport const zDictionaryWithString = z.record(z.string());\n\n/**\n * This is a string dictionary\n */\nexport const zDictionaryWithDictionary = z.record(z.record(z.string()));\n\n/**\n * This is a complex dictionary\n */\nexport const zDictionaryWithProperties = z.record(z.object({\n    foo: z.string().optional(),\n    bar: z.string().optional()\n}));\n\n/**\n * This is a type-only model that defines Date as a string\n */\nexport const zDate = z.string();\n\n/**\n * This is a model with one number property\n */\nexport const zModelWithInteger = z.object({\n    prop: z.number().int().optional()\n});\n\n/**\n * This is a model with one boolean property\n */\nexport const zModelWithBoolean = z.object({\n    prop: z.boolean().optional()\n});\n\n/**\n * This is a model with one string property\n */\nexport const zModelWithString = z.object({\n    prop: z.string().optional()\n});\n\nexport const zSimpleReference = zModelWithString;\n\n/**\n * This is a simple array with references\n */\nexport const zArrayWithReferences = z.array(zModelWithString);\n\n/**\n * This is a simple array containing an array\n */\nexport const zArrayWithArray = z.array(z.array(zModelWithString));\n\n/**\n * This is a string reference\n */\nexport const zDictionaryWithReference = z.record(zModelWithString);\n\n/**\n * This is a complex dictionary\n */\nexport const zDictionaryWithArray = z.record(z.array(zModelWithString));\n\n/**\n * This is a model with one string property\n */\nexport const zModelWithStringError = z.object({\n    prop: z.string().optional()\n});\n\n/**\n * This is a model with one string property\n */\nexport const zModelWithNullableString = z.object({\n    nullableProp: z.string().nullish(),\n    nullableRequiredProp: z.string().nullable()\n});\n\n/**\n * This is a model with one enum\n */\nexport const zModelWithEnum = z.object({\n    test: z.enum([\n        'Success',\n        'Warning',\n        'Error',\n        'ØÆÅ字符串'\n    ]).optional(),\n    statusCode: z.enum([\n        '100',\n        '200 FOO',\n        '300 FOO_BAR',\n        '400 foo-bar',\n        '500 foo.bar',\n        '600 foo&bar'\n    ]).optional(),\n    bool: z.literal(true).optional()\n});\n\n/**\n * This is a model with one enum\n */\nexport const zModelWithEnumFromDescription = z.object({\n    test: z.number().int().optional()\n});\n\n/**\n * This is a model with nested enums\n */\nexport const zModelWithNestedEnums = z.object({\n    dictionaryWithEnum: z.record(z.enum([\n        'Success',\n        'Warning',\n        'Error'\n    ])).optional(),\n    dictionaryWithEnumFromDescription: z.record(z.number().int()).optional(),\n    arrayWithEnum: z.array(z.enum([\n        'Success',\n        'Warning',\n        'Error'\n    ])).optional(),\n    arrayWithDescription: z.array(z.number().int()).optional()\n});\n\n/**\n * This is a model with one property containing an array\n */\nexport const zModelWithArray = z.object({\n    prop: z.array(zModelWithString).optional(),\n    propWithFile: z.array(z.string()).optional(),\n    propWithNumber: z.array(z.number()).optional()\n});\n\n/**\n * This is a model with one property containing a dictionary\n */\nexport const zModelWithDictionary = z.object({\n    prop: z.record(z.string()).optional()\n});\n\n/**\n * This is a model with one property containing a circular reference\n */\nexport const zModelWithCircularReference: z.AnyZodObject = z.object({\n    prop: z.lazy(() => zModelWithCircularReference).optional()\n});\n\n/**\n * This is a model with one nested property\n */\nexport const zModelWithProperties = z.object({\n    required: z.string(),\n    requiredAndReadOnly: z.string().readonly(),\n    string: z.string().optional(),\n    number: z.number().optional(),\n    boolean: z.boolean().optional(),\n    reference: zModelWithString.optional(),\n    'property with space': z.string().optional(),\n    default: z.string().optional(),\n    try: z.string().optional(),\n    '@namespace.string': z.string().readonly().optional(),\n    '@namespace.integer': z.number().int().readonly().optional()\n});\n\n/**\n * This is a model with one property containing a reference\n */\nexport const zModelWithReference = z.object({\n    prop: zModelWithProperties.optional()\n});\n\n/**\n * This is a model with one nested property\n */\nexport const zModelWithNestedProperties = z.object({\n    first: z.object({\n        second: z.object({\n            third: z.string().readonly()\n        }).readonly()\n    }).readonly()\n});\n\n/**\n * This is a model with duplicated properties\n */\nexport const zModelWithDuplicateProperties = z.object({\n    prop: zModelWithString.optional()\n});\n\n/**\n * This is a model with ordered properties\n */\nexport const zModelWithOrderedProperties = z.object({\n    zebra: z.string().optional(),\n    apple: z.string().optional(),\n    hawaii: z.string().optional()\n});\n\n/**\n * This is a model with duplicated imports\n */\nexport const zModelWithDuplicateImports = z.object({\n    propA: zModelWithString.optional(),\n    propB: zModelWithString.optional(),\n    propC: zModelWithString.optional()\n});\n\n/**\n * This is a model that extends another model\n */\nexport const zModelThatExtends = zModelWithString.and(z.object({\n    propExtendsA: z.string().optional(),\n    propExtendsB: zModelWithString.optional()\n}));\n\n/**\n * This is a model that extends another model\n */\nexport const zModelThatExtendsExtends = zModelWithString.and(zModelThatExtends).and(z.object({\n    propExtendsC: z.string().optional(),\n    propExtendsD: zModelWithString.optional()\n}));\n\nexport const zDefault = z.object({\n    name: z.string().optional()\n});\n\n/**\n * This is a model that contains a some patterns\n */\nexport const zModelWithPattern = z.object({\n    key: z.string().max(64).regex(/^[a-zA-Z0-9_]*$/),\n    name: z.string().max(255),\n    enabled: z.boolean().readonly().optional(),\n    modified: z.string().datetime().readonly().optional(),\n    id: z.string().regex(/^\\d{2}-\\d{3}-\\d{4}$/).optional(),\n    text: z.string().regex(/^\\w+$/).optional(),\n    patternWithSingleQuotes: z.string().regex(/^[a-zA-Z0-9']*$/).optional(),\n    patternWithNewline: z.string().regex(/aaa\\nbbb/).optional(),\n    patternWithBacktick: z.string().regex(/aaa`bbb/).optional(),\n    patternWithUnicode: z.string().regex(/^\\p{L}+$/u).optional()\n});\n\nexport const zParameterActivityParams = z.object({\n    description: z.string().optional(),\n    graduate_id: z.number().int().optional(),\n    organization_id: z.number().int().optional(),\n    parent_activity: z.number().int().optional(),\n    post_id: z.number().int().optional()\n});\n\nexport const zResponsePostActivityResponse = z.object({\n    description: z.string().optional(),\n    graduate_id: z.number().int().optional(),\n    organization_id: z.number().int().optional(),\n    parent_activity_id: z.number().int().optional(),\n    post_id: z.number().int().optional()\n});\n\nexport const zFailureFailure = z.object({\n    error: z.string().optional(),\n    message: z.string().optional(),\n    reference_code: z.string().optional()\n});\n\nexport const zExternalSharedModel = z.object({\n    id: z.string(),\n    name: z.string().optional()\n});\n\nexport const zExternalRefA = zExternalSharedModel;\n\nexport const zExternalRefB = zExternalSharedModel;\n\n/**\n * This is a model with one nested property\n */\nexport const zModelWithPropertiesWritable = z.object({\n    required: z.string(),\n    string: z.string().optional(),\n    number: z.number().optional(),\n    boolean: z.boolean().optional(),\n    reference: zModelWithString.optional(),\n    'property with space': z.string().optional(),\n    default: z.string().optional(),\n    try: z.string().optional()\n});\n\n/**\n * This is a model with one property containing a reference\n */\nexport const zModelWithReferenceWritable = z.object({\n    prop: zModelWithPropertiesWritable.optional()\n});\n\n/**\n * This is a model that contains a some patterns\n */\nexport const zModelWithPatternWritable = z.object({\n    key: z.string().max(64).regex(/^[a-zA-Z0-9_]*$/),\n    name: z.string().max(255),\n    id: z.string().regex(/^\\d{2}-\\d{3}-\\d{4}$/).optional(),\n    text: z.string().regex(/^\\w+$/).optional(),\n    patternWithSingleQuotes: z.string().regex(/^[a-zA-Z0-9']*$/).optional(),\n    patternWithNewline: z.string().regex(/aaa\\nbbb/).optional(),\n    patternWithBacktick: z.string().regex(/aaa`bbb/).optional(),\n    patternWithUnicode: z.string().regex(/^\\p{L}+$/u).optional()\n});\n\nexport const zServiceWithEmptyTagData = z.object({\n    body: z.never().optional(),\n    path: z.never().optional(),\n    query: z.never().optional()\n});\n\nexport const zPatchApiVbyApiVersionNoTagData = z.object({\n    body: z.never().optional(),\n    path: z.never().optional(),\n    query: z.never().optional()\n});\n\nexport const zFooWowData = z.object({\n    body: z.never().optional(),\n    path: z.never().optional(),\n    query: z.never().optional()\n});\n\nexport const zDeleteCallWithoutParametersAndResponseData = z.object({\n    body: z.never().optional(),\n    path: z.never().optional(),\n    query: z.never().optional()\n});\n\nexport const zGetCallWithoutParametersAndResponseData = z.object({\n    body: z.never().optional(),\n    path: z.never().optional(),\n    query: z.never().optional()\n});\n\nexport const zHeadCallWithoutParametersAndResponseData = z.object({\n    body: z.never().optional(),\n    path: z.never().optional(),\n    query: z.never().optional()\n});\n\nexport const zOptionsCallWithoutParametersAndResponseData = z.object({\n    body: z.never().optional(),\n    path: z.never().optional(),\n    query: z.never().optional()\n});\n\nexport const zPatchCallWithoutParametersAndResponseData = z.object({\n    body: z.never().optional(),\n    path: z.never().optional(),\n    query: z.never().optional()\n});\n\nexport const zPostCallWithoutParametersAndResponseData = z.object({\n    body: z.never().optional(),\n    path: z.never().optional(),\n    query: z.never().optional()\n});\n\nexport const zPutCallWithoutParametersAndResponseData = z.object({\n    body: z.never().optional(),\n    path: z.never().optional(),\n    query: z.never().optional()\n});\n\nexport const zCallWithDescriptionsData = z.object({\n    body: z.never().optional(),\n    path: z.never().optional(),\n    query: z.object({\n        parameterWithBreaks: z.string().optional(),\n        parameterWithBackticks: z.string().optional(),\n        parameterWithSlashes: z.string().optional(),\n        parameterWithExpressionPlaceholders: z.string().optional(),\n        parameterWithQuotes: z.string().optional(),\n        parameterWithReservedCharacters: z.string().optional()\n    }).optional()\n});\n\nexport const zCallWithParametersData = z.object({\n    body: z.never().optional(),\n    path: z.object({\n        parameterPath: z.string(),\n        'api-version': z.string()\n    }),\n    query: z.object({\n        parameterQuery: z.string()\n    }),\n    headers: z.object({\n        parameterHeader: z.string()\n    })\n});\n\nexport const zCallWithWeirdParameterNamesData = z.object({\n    body: z.string(),\n    path: z.object({\n        'parameter.path.1': z.string().optional(),\n        'parameter-path-2': z.string().optional(),\n        'PARAMETER-PATH-3': z.string().optional(),\n        'api-version': z.string()\n    }),\n    query: z.object({\n        default: z.string().optional(),\n        'parameter-query': z.string()\n    }),\n    headers: z.object({\n        'parameter.header': z.string()\n    })\n});\n\nexport const zCallWithDefaultParametersData = z.object({\n    body: z.never().optional(),\n    path: z.never().optional(),\n    query: z.object({\n        parameterString: z.string().default('Hello World!'),\n        parameterNumber: z.number().default(123),\n        parameterBoolean: z.boolean().default(true),\n        parameterEnum: z.enum([\n            'Success',\n            'Warning',\n            'Error'\n        ]),\n        parameterModel: z.object({\n            prop: z.string().optional()\n        }).default({ prop: 'Hello World!' })\n    })\n});\n\nexport const zCallWithDefaultOptionalParametersData = z.object({\n    body: z.never().optional(),\n    path: z.never().optional(),\n    query: z.object({\n        parameterString: z.string().optional().default('Hello World!'),\n        parameterNumber: z.number().optional().default(123),\n        parameterBoolean: z.boolean().optional().default(true),\n        parameterEnum: z.enum([\n            'Success',\n            'Warning',\n            'Error'\n        ]).optional()\n    }).optional()\n});\n\nexport const zCallToTestOrderOfParamsData = z.object({\n    body: z.never().optional(),\n    path: z.never().optional(),\n    query: z.object({\n        parameterOptionalStringWithDefault: z.string().optional().default('Hello World!'),\n        parameterOptionalStringWithEmptyDefault: z.string().optional().default(''),\n        parameterOptionalStringWithNoDefault: z.string().optional(),\n        parameterStringWithDefault: z.string().default('Hello World!'),\n        parameterStringWithEmptyDefault: z.string().default(''),\n        parameterStringWithNoDefault: z.string(),\n        parameterStringNullableWithNoDefault: z.string().nullish(),\n        parameterStringNullableWithDefault: z.string().nullish().default(null)\n    })\n});\n\nexport const zDuplicateNameData = z.object({\n    body: z.never().optional(),\n    path: z.never().optional(),\n    query: z.never().optional()\n});\n\nexport const zDuplicateName2Data = z.object({\n    body: z.never().optional(),\n    path: z.never().optional(),\n    query: z.never().optional()\n});\n\nexport const zDuplicateName3Data = z.object({\n    body: z.never().optional(),\n    path: z.never().optional(),\n    query: z.never().optional()\n});\n\nexport const zDuplicateName4Data = z.object({\n    body: z.never().optional(),\n    path: z.never().optional(),\n    query: z.never().optional()\n});\n\nexport const zCallWithNoContentResponseData = z.object({\n    body: z.never().optional(),\n    path: z.never().optional(),\n    query: z.never().optional()\n});\n\nexport const zCallWithResponseAndNoContentResponseData = z.object({\n    body: z.never().optional(),\n    path: z.never().optional(),\n    query: z.never().optional()\n});\n\nexport const zCallWithResponseAndNoContentResponseResponse = z.union([\n    z.number(),\n    z.unknown()\n]);\n\nexport const zDummyAData = z.object({\n    body: z.never().optional(),\n    path: z.never().optional(),\n    query: z.never().optional()\n});\n\nexport const zDummyBData = z.object({\n    body: z.never().optional(),\n    path: z.never().optional(),\n    query: z.never().optional()\n});\n\nexport const zCallWithResponseData = z.object({\n    body: z.never().optional(),\n    path: z.never().optional(),\n    query: z.never().optional()\n});\n\n/**\n * Message for default response\n */\nexport const zCallWithResponseResponse = zModelWithString;\n\nexport const zCallWithDuplicateResponsesData = z.object({\n    body: z.never().optional(),\n    path: z.never().optional(),\n    query: z.never().optional()\n});\n\n/**\n * Message for 201 response\n */\nexport const zCallWithDuplicateResponsesResponse = zModelWithString;\n\nexport const zCallWithResponsesData = z.object({\n    body: z.never().optional(),\n    path: z.never().optional(),\n    query: z.never().optional()\n});\n\nexport const zCallWithResponsesResponse = z.union([\n    z.object({\n        '@namespace.string': z.string().readonly().optional(),\n        '@namespace.integer': z.number().int().readonly().optional(),\n        value: z.array(zModelWithString).readonly().optional()\n    }),\n    zModelThatExtends,\n    zModelThatExtendsExtends\n]);\n\nexport const zCollectionFormatData = z.object({\n    body: z.never().optional(),\n    path: z.never().optional(),\n    query: z.object({\n        parameterArrayCSV: z.array(z.string()),\n        parameterArraySSV: z.array(z.string()),\n        parameterArrayTSV: z.array(z.string()),\n        parameterArrayPipes: z.array(z.string()),\n        parameterArrayMulti: z.array(z.string())\n    })\n});\n\nexport const zTypesData = z.object({\n    body: z.never().optional(),\n    path: z.object({\n        id: z.number().int().min(-2147483648, { message: 'Invalid value: Expected int32 to be >= -2147483648' }).max(2147483647, { message: 'Invalid value: Expected int32 to be <= 2147483647' }).optional()\n    }).optional(),\n    query: z.object({\n        parameterNumber: z.number().default(123),\n        parameterString: z.string().default('default'),\n        parameterBoolean: z.boolean().default(true),\n        parameterArray: z.array(z.string()),\n        parameterDictionary: z.record(z.unknown()),\n        parameterEnum: z.enum([\n            'Success',\n            'Warning',\n            'Error'\n        ])\n    })\n});\n\nexport const zTypesResponse = z.union([\n    z.number(),\n    z.string(),\n    z.boolean(),\n    z.record(z.unknown())\n]);\n\nexport const zComplexTypesData = z.object({\n    body: z.never().optional(),\n    path: z.never().optional(),\n    query: z.object({\n        parameterObject: z.object({\n            first: z.object({\n                second: z.object({\n                    third: z.string().optional()\n                }).optional()\n            }).optional()\n        }),\n        parameterReference: z.object({\n            prop: z.string().optional()\n        })\n    })\n});\n\n/**\n * Successful response\n */\nexport const zComplexTypesResponse = z.array(zModelWithString);\n\nexport const zCallWithResultFromHeaderData = z.object({\n    body: z.never().optional(),\n    path: z.never().optional(),\n    query: z.never().optional()\n});\n\nexport const zTestErrorCodeData = z.object({\n    body: z.never().optional(),\n    path: z.never().optional(),\n    query: z.object({\n        status: z.string()\n    })\n});\n\nexport const zNonAsciiæøåÆøÅöôêÊ字符串Data = z.object({\n    body: z.never().optional(),\n    path: z.never().optional(),\n    query: z.object({\n        nonAsciiParamæøåÆØÅöôêÊ: z.number().int()\n    })\n});\n\n/**\n * Successful response\n */\nexport const zNonAsciiæøåÆøÅöôêÊ字符串Response = zNonAsciiStringæøåÆøÅöôêÊ字符串;\n\nexport const zPostApiVbyApiVersionBodyData = z.object({\n    body: zParameterActivityParams,\n    path: z.never().optional(),\n    query: z.never().optional()\n});\n\n/**\n * OK\n */\nexport const zPostApiVbyApiVersionBodyResponse = zResponsePostActivityResponse;\n"
  },
  {
    "path": "packages/openapi-ts-tests/zod/v3/__snapshots__/2.0.x/v3/type-format/zod.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport { z } from 'zod';\n\nexport const zFoo = z.object({\n    bar: z.number().int().optional(),\n    foo: z.coerce.bigint().min(BigInt('-9223372036854775808'), { message: 'Invalid value: Expected int64 to be >= -9223372036854775808' }).max(BigInt('9223372036854775807'), { message: 'Invalid value: Expected int64 to be <= 9223372036854775807' }).default(BigInt(0)),\n    id: z.string()\n});\n\nexport const zBar = z.object({\n    foo: z.number().int()\n});\n\nexport const zPostFooData = z.object({\n    body: z.never().optional(),\n    path: z.never().optional(),\n    query: z.never().optional()\n});\n\n/**\n * OK\n */\nexport const zPostFooResponse = zFoo;\n"
  },
  {
    "path": "packages/openapi-ts-tests/zod/v3/__snapshots__/2.0.x/v4/array-items-all-of/zod.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport * as z from 'zod/v4';\n\nexport const zArrayWithAllOfObjects = z.array(z.object({\n    id: z.int().optional()\n}).and(z.object({\n    name: z.string().optional()\n})));\n\nexport const zArrayWithAllOfPrimitives = z.array(z.intersection(z.number(), z.string()));\n\nexport const zBaseModel = z.object({\n    id: z.int().optional(),\n    createdAt: z.iso.datetime().optional()\n});\n\nexport const zArrayWithAllOfRefs = z.array(zBaseModel.and(z.object({\n    extra: z.string().optional()\n})));\n"
  },
  {
    "path": "packages/openapi-ts-tests/zod/v3/__snapshots__/2.0.x/v4/default/zod.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport * as z from 'zod/v4';\n\n/**\n * Testing multiline comments in string: First line\n * Second line\n *\n * Fourth line\n */\nexport const zCommentWithBreaks = z.int();\n\n/**\n * Testing backticks in string: `backticks` and ```multiple backticks``` should work\n */\nexport const zCommentWithBackticks = z.int();\n\n/**\n * Testing backticks and quotes in string: `backticks`, 'quotes', \"double quotes\" and ```multiple backticks``` should work\n */\nexport const zCommentWithBackticksAndQuotes = z.int();\n\n/**\n * Testing slashes in string: \\backwards\\\\\\ and /forwards/// should work\n */\nexport const zCommentWithSlashes = z.int();\n\n/**\n * Testing expression placeholders in string: ${expression} should work\n */\nexport const zCommentWithExpressionPlaceholders = z.int();\n\n/**\n * Testing quotes in string: 'single quote''' and \"double quotes\"\"\" should work\n */\nexport const zCommentWithQuotes = z.int();\n\n/**\n * Testing reserved characters in string: * inline * and ** inline ** should work\n */\nexport const zCommentWithReservedCharacters = z.int();\n\n/**\n * This is a simple number\n */\nexport const zSimpleInteger = z.int();\n\n/**\n * This is a simple boolean\n */\nexport const zSimpleBoolean = z.boolean();\n\n/**\n * This is a simple string\n */\nexport const zSimpleString = z.string();\n\n/**\n * A string with non-ascii (unicode) characters valid in typescript identifiers (æøåÆØÅöÔèÈ字符串)\n */\nexport const zNonAsciiStringæøåÆøÅöôêÊ字符串 = z.string();\n\n/**\n * This is a simple file\n */\nexport const zSimpleFile = z.string();\n\n/**\n * This is a simple string\n */\nexport const zSimpleStringWithPattern = z.string().max(64).regex(/^[a-zA-Z0-9_]*$/);\n\n/**\n * This is a simple enum with strings\n */\nexport const zEnumWithStrings = z.enum([\n    'Success',\n    'Warning',\n    'Error',\n    '\\'Single Quote\\'',\n    '\"Double Quotes\"',\n    'Non-ascii: øæåôöØÆÅÔÖ字符串'\n]);\n\n/**\n * This is a simple enum with numbers\n */\nexport const zEnumWithNumbers = z.union([\n    z.literal(1),\n    z.literal(2),\n    z.literal(3),\n    z.literal(1.1),\n    z.literal(1.2),\n    z.literal(1.3),\n    z.literal(100),\n    z.literal(200),\n    z.literal(300),\n    z.literal(-100),\n    z.literal(-200),\n    z.literal(-300),\n    z.literal(-1.1),\n    z.literal(-1.2),\n    z.literal(-1.3)\n]);\n\n/**\n * Success=1,Warning=2,Error=3\n */\nexport const zEnumFromDescription = z.number();\n\n/**\n * This is a simple enum with numbers\n */\nexport const zEnumWithExtensions = z.union([\n    z.literal(200),\n    z.literal(400),\n    z.literal(500)\n]);\n\n/**\n * This is a simple array with numbers\n */\nexport const zArrayWithNumbers = z.array(z.int());\n\n/**\n * This is a simple array with booleans\n */\nexport const zArrayWithBooleans = z.array(z.boolean());\n\n/**\n * This is a simple array with strings\n */\nexport const zArrayWithStrings = z.array(z.string());\n\n/**\n * This is a simple array with properties\n */\nexport const zArrayWithProperties = z.array(z.object({\n    foo: z.string().optional(),\n    bar: z.string().optional()\n}));\n\n/**\n * This is a string dictionary\n */\nexport const zDictionaryWithString = z.record(z.string(), z.string());\n\n/**\n * This is a string dictionary\n */\nexport const zDictionaryWithDictionary = z.record(z.string(), z.record(z.string(), z.string()));\n\n/**\n * This is a complex dictionary\n */\nexport const zDictionaryWithProperties = z.record(z.string(), z.object({\n    foo: z.string().optional(),\n    bar: z.string().optional()\n}));\n\n/**\n * This is a type-only model that defines Date as a string\n */\nexport const zDate = z.string();\n\n/**\n * This is a model with one number property\n */\nexport const zModelWithInteger = z.object({\n    prop: z.int().optional()\n});\n\n/**\n * This is a model with one boolean property\n */\nexport const zModelWithBoolean = z.object({\n    prop: z.boolean().optional()\n});\n\n/**\n * This is a model with one string property\n */\nexport const zModelWithString = z.object({\n    prop: z.string().optional()\n});\n\nexport const zSimpleReference = zModelWithString;\n\n/**\n * This is a simple array with references\n */\nexport const zArrayWithReferences = z.array(zModelWithString);\n\n/**\n * This is a simple array containing an array\n */\nexport const zArrayWithArray = z.array(z.array(zModelWithString));\n\n/**\n * This is a string reference\n */\nexport const zDictionaryWithReference = z.record(z.string(), zModelWithString);\n\n/**\n * This is a complex dictionary\n */\nexport const zDictionaryWithArray = z.record(z.string(), z.array(zModelWithString));\n\n/**\n * This is a model with one string property\n */\nexport const zModelWithStringError = z.object({\n    prop: z.string().optional()\n});\n\n/**\n * This is a model with one string property\n */\nexport const zModelWithNullableString = z.object({\n    nullableProp: z.string().nullish(),\n    nullableRequiredProp: z.string().nullable()\n});\n\n/**\n * This is a model with one enum\n */\nexport const zModelWithEnum = z.object({\n    test: z.enum([\n        'Success',\n        'Warning',\n        'Error',\n        'ØÆÅ字符串'\n    ]).optional(),\n    statusCode: z.enum([\n        '100',\n        '200 FOO',\n        '300 FOO_BAR',\n        '400 foo-bar',\n        '500 foo.bar',\n        '600 foo&bar'\n    ]).optional(),\n    bool: z.literal(true).optional()\n});\n\n/**\n * This is a model with one enum\n */\nexport const zModelWithEnumFromDescription = z.object({\n    test: z.int().optional()\n});\n\n/**\n * This is a model with nested enums\n */\nexport const zModelWithNestedEnums = z.object({\n    dictionaryWithEnum: z.record(z.string(), z.enum([\n        'Success',\n        'Warning',\n        'Error'\n    ])).optional(),\n    dictionaryWithEnumFromDescription: z.record(z.string(), z.int()).optional(),\n    arrayWithEnum: z.array(z.enum([\n        'Success',\n        'Warning',\n        'Error'\n    ])).optional(),\n    arrayWithDescription: z.array(z.int()).optional()\n});\n\n/**\n * This is a model with one property containing an array\n */\nexport const zModelWithArray = z.object({\n    prop: z.array(zModelWithString).optional(),\n    propWithFile: z.array(z.string()).optional(),\n    propWithNumber: z.array(z.number()).optional()\n});\n\n/**\n * This is a model with one property containing a dictionary\n */\nexport const zModelWithDictionary = z.object({\n    prop: z.record(z.string(), z.string()).optional()\n});\n\n/**\n * This is a model with one property containing a circular reference\n */\nexport const zModelWithCircularReference = z.object({\n    prop: z.lazy((): any => zModelWithCircularReference).optional()\n});\n\n/**\n * This is a model with one nested property\n */\nexport const zModelWithProperties = z.object({\n    required: z.string(),\n    requiredAndReadOnly: z.string().readonly(),\n    string: z.string().optional(),\n    number: z.number().optional(),\n    boolean: z.boolean().optional(),\n    reference: zModelWithString.optional(),\n    'property with space': z.string().optional(),\n    default: z.string().optional(),\n    try: z.string().optional(),\n    '@namespace.string': z.string().readonly().optional(),\n    '@namespace.integer': z.int().readonly().optional()\n});\n\n/**\n * This is a model with one property containing a reference\n */\nexport const zModelWithReference = z.object({\n    prop: zModelWithProperties.optional()\n});\n\n/**\n * This is a model with one nested property\n */\nexport const zModelWithNestedProperties = z.object({\n    first: z.object({\n        second: z.object({\n            third: z.string().readonly()\n        }).readonly()\n    }).readonly()\n});\n\n/**\n * This is a model with duplicated properties\n */\nexport const zModelWithDuplicateProperties = z.object({\n    prop: zModelWithString.optional()\n});\n\n/**\n * This is a model with ordered properties\n */\nexport const zModelWithOrderedProperties = z.object({\n    zebra: z.string().optional(),\n    apple: z.string().optional(),\n    hawaii: z.string().optional()\n});\n\n/**\n * This is a model with duplicated imports\n */\nexport const zModelWithDuplicateImports = z.object({\n    propA: zModelWithString.optional(),\n    propB: zModelWithString.optional(),\n    propC: zModelWithString.optional()\n});\n\n/**\n * This is a model that extends another model\n */\nexport const zModelThatExtends = zModelWithString.and(z.object({\n    propExtendsA: z.string().optional(),\n    propExtendsB: zModelWithString.optional()\n}));\n\n/**\n * This is a model that extends another model\n */\nexport const zModelThatExtendsExtends = zModelWithString.and(zModelThatExtends).and(z.object({\n    propExtendsC: z.string().optional(),\n    propExtendsD: zModelWithString.optional()\n}));\n\nexport const zDefault = z.object({\n    name: z.string().optional()\n});\n\n/**\n * This is a model that contains a some patterns\n */\nexport const zModelWithPattern = z.object({\n    key: z.string().max(64).regex(/^[a-zA-Z0-9_]*$/),\n    name: z.string().max(255),\n    enabled: z.boolean().readonly().optional(),\n    modified: z.iso.datetime().readonly().optional(),\n    id: z.string().regex(/^\\d{2}-\\d{3}-\\d{4}$/).optional(),\n    text: z.string().regex(/^\\w+$/).optional(),\n    patternWithSingleQuotes: z.string().regex(/^[a-zA-Z0-9']*$/).optional(),\n    patternWithNewline: z.string().regex(/aaa\\nbbb/).optional(),\n    patternWithBacktick: z.string().regex(/aaa`bbb/).optional(),\n    patternWithUnicode: z.string().regex(/^\\p{L}+$/u).optional()\n});\n\nexport const zParameterActivityParams = z.object({\n    description: z.string().optional(),\n    graduate_id: z.int().optional(),\n    organization_id: z.int().optional(),\n    parent_activity: z.int().optional(),\n    post_id: z.int().optional()\n});\n\nexport const zResponsePostActivityResponse = z.object({\n    description: z.string().optional(),\n    graduate_id: z.int().optional(),\n    organization_id: z.int().optional(),\n    parent_activity_id: z.int().optional(),\n    post_id: z.int().optional()\n});\n\nexport const zFailureFailure = z.object({\n    error: z.string().optional(),\n    message: z.string().optional(),\n    reference_code: z.string().optional()\n});\n\nexport const zExternalSharedModel = z.object({\n    id: z.string(),\n    name: z.string().optional()\n});\n\nexport const zExternalRefA = zExternalSharedModel;\n\nexport const zExternalRefB = zExternalSharedModel;\n\n/**\n * This is a model with one nested property\n */\nexport const zModelWithPropertiesWritable = z.object({\n    required: z.string(),\n    string: z.string().optional(),\n    number: z.number().optional(),\n    boolean: z.boolean().optional(),\n    reference: zModelWithString.optional(),\n    'property with space': z.string().optional(),\n    default: z.string().optional(),\n    try: z.string().optional()\n});\n\n/**\n * This is a model with one property containing a reference\n */\nexport const zModelWithReferenceWritable = z.object({\n    prop: zModelWithPropertiesWritable.optional()\n});\n\n/**\n * This is a model that contains a some patterns\n */\nexport const zModelWithPatternWritable = z.object({\n    key: z.string().max(64).regex(/^[a-zA-Z0-9_]*$/),\n    name: z.string().max(255),\n    id: z.string().regex(/^\\d{2}-\\d{3}-\\d{4}$/).optional(),\n    text: z.string().regex(/^\\w+$/).optional(),\n    patternWithSingleQuotes: z.string().regex(/^[a-zA-Z0-9']*$/).optional(),\n    patternWithNewline: z.string().regex(/aaa\\nbbb/).optional(),\n    patternWithBacktick: z.string().regex(/aaa`bbb/).optional(),\n    patternWithUnicode: z.string().regex(/^\\p{L}+$/u).optional()\n});\n\nexport const zServiceWithEmptyTagData = z.object({\n    body: z.never().optional(),\n    path: z.never().optional(),\n    query: z.never().optional()\n});\n\nexport const zPatchApiVbyApiVersionNoTagData = z.object({\n    body: z.never().optional(),\n    path: z.never().optional(),\n    query: z.never().optional()\n});\n\nexport const zFooWowData = z.object({\n    body: z.never().optional(),\n    path: z.never().optional(),\n    query: z.never().optional()\n});\n\nexport const zDeleteCallWithoutParametersAndResponseData = z.object({\n    body: z.never().optional(),\n    path: z.never().optional(),\n    query: z.never().optional()\n});\n\nexport const zGetCallWithoutParametersAndResponseData = z.object({\n    body: z.never().optional(),\n    path: z.never().optional(),\n    query: z.never().optional()\n});\n\nexport const zHeadCallWithoutParametersAndResponseData = z.object({\n    body: z.never().optional(),\n    path: z.never().optional(),\n    query: z.never().optional()\n});\n\nexport const zOptionsCallWithoutParametersAndResponseData = z.object({\n    body: z.never().optional(),\n    path: z.never().optional(),\n    query: z.never().optional()\n});\n\nexport const zPatchCallWithoutParametersAndResponseData = z.object({\n    body: z.never().optional(),\n    path: z.never().optional(),\n    query: z.never().optional()\n});\n\nexport const zPostCallWithoutParametersAndResponseData = z.object({\n    body: z.never().optional(),\n    path: z.never().optional(),\n    query: z.never().optional()\n});\n\nexport const zPutCallWithoutParametersAndResponseData = z.object({\n    body: z.never().optional(),\n    path: z.never().optional(),\n    query: z.never().optional()\n});\n\nexport const zCallWithDescriptionsData = z.object({\n    body: z.never().optional(),\n    path: z.never().optional(),\n    query: z.object({\n        parameterWithBreaks: z.string().optional(),\n        parameterWithBackticks: z.string().optional(),\n        parameterWithSlashes: z.string().optional(),\n        parameterWithExpressionPlaceholders: z.string().optional(),\n        parameterWithQuotes: z.string().optional(),\n        parameterWithReservedCharacters: z.string().optional()\n    }).optional()\n});\n\nexport const zCallWithParametersData = z.object({\n    body: z.never().optional(),\n    path: z.object({\n        parameterPath: z.string(),\n        'api-version': z.string()\n    }),\n    query: z.object({\n        parameterQuery: z.string()\n    }),\n    headers: z.object({\n        parameterHeader: z.string()\n    })\n});\n\nexport const zCallWithWeirdParameterNamesData = z.object({\n    body: z.string(),\n    path: z.object({\n        'parameter.path.1': z.string().optional(),\n        'parameter-path-2': z.string().optional(),\n        'PARAMETER-PATH-3': z.string().optional(),\n        'api-version': z.string()\n    }),\n    query: z.object({\n        default: z.string().optional(),\n        'parameter-query': z.string()\n    }),\n    headers: z.object({\n        'parameter.header': z.string()\n    })\n});\n\nexport const zCallWithDefaultParametersData = z.object({\n    body: z.never().optional(),\n    path: z.never().optional(),\n    query: z.object({\n        parameterString: z.string().default('Hello World!'),\n        parameterNumber: z.number().default(123),\n        parameterBoolean: z.boolean().default(true),\n        parameterEnum: z.enum([\n            'Success',\n            'Warning',\n            'Error'\n        ]),\n        parameterModel: z.object({\n            prop: z.string().optional()\n        }).default({ prop: 'Hello World!' })\n    })\n});\n\nexport const zCallWithDefaultOptionalParametersData = z.object({\n    body: z.never().optional(),\n    path: z.never().optional(),\n    query: z.object({\n        parameterString: z.string().optional().default('Hello World!'),\n        parameterNumber: z.number().optional().default(123),\n        parameterBoolean: z.boolean().optional().default(true),\n        parameterEnum: z.enum([\n            'Success',\n            'Warning',\n            'Error'\n        ]).optional()\n    }).optional()\n});\n\nexport const zCallToTestOrderOfParamsData = z.object({\n    body: z.never().optional(),\n    path: z.never().optional(),\n    query: z.object({\n        parameterOptionalStringWithDefault: z.string().optional().default('Hello World!'),\n        parameterOptionalStringWithEmptyDefault: z.string().optional().default(''),\n        parameterOptionalStringWithNoDefault: z.string().optional(),\n        parameterStringWithDefault: z.string().default('Hello World!'),\n        parameterStringWithEmptyDefault: z.string().default(''),\n        parameterStringWithNoDefault: z.string(),\n        parameterStringNullableWithNoDefault: z.string().nullish(),\n        parameterStringNullableWithDefault: z.string().nullish().default(null)\n    })\n});\n\nexport const zDuplicateNameData = z.object({\n    body: z.never().optional(),\n    path: z.never().optional(),\n    query: z.never().optional()\n});\n\nexport const zDuplicateName2Data = z.object({\n    body: z.never().optional(),\n    path: z.never().optional(),\n    query: z.never().optional()\n});\n\nexport const zDuplicateName3Data = z.object({\n    body: z.never().optional(),\n    path: z.never().optional(),\n    query: z.never().optional()\n});\n\nexport const zDuplicateName4Data = z.object({\n    body: z.never().optional(),\n    path: z.never().optional(),\n    query: z.never().optional()\n});\n\nexport const zCallWithNoContentResponseData = z.object({\n    body: z.never().optional(),\n    path: z.never().optional(),\n    query: z.never().optional()\n});\n\nexport const zCallWithResponseAndNoContentResponseData = z.object({\n    body: z.never().optional(),\n    path: z.never().optional(),\n    query: z.never().optional()\n});\n\nexport const zCallWithResponseAndNoContentResponseResponse = z.union([\n    z.number(),\n    z.unknown()\n]);\n\nexport const zDummyAData = z.object({\n    body: z.never().optional(),\n    path: z.never().optional(),\n    query: z.never().optional()\n});\n\nexport const zDummyBData = z.object({\n    body: z.never().optional(),\n    path: z.never().optional(),\n    query: z.never().optional()\n});\n\nexport const zCallWithResponseData = z.object({\n    body: z.never().optional(),\n    path: z.never().optional(),\n    query: z.never().optional()\n});\n\n/**\n * Message for default response\n */\nexport const zCallWithResponseResponse = zModelWithString;\n\nexport const zCallWithDuplicateResponsesData = z.object({\n    body: z.never().optional(),\n    path: z.never().optional(),\n    query: z.never().optional()\n});\n\n/**\n * Message for 201 response\n */\nexport const zCallWithDuplicateResponsesResponse = zModelWithString;\n\nexport const zCallWithResponsesData = z.object({\n    body: z.never().optional(),\n    path: z.never().optional(),\n    query: z.never().optional()\n});\n\nexport const zCallWithResponsesResponse = z.union([\n    z.object({\n        '@namespace.string': z.string().readonly().optional(),\n        '@namespace.integer': z.int().readonly().optional(),\n        value: z.array(zModelWithString).readonly().optional()\n    }),\n    zModelThatExtends,\n    zModelThatExtendsExtends\n]);\n\nexport const zCollectionFormatData = z.object({\n    body: z.never().optional(),\n    path: z.never().optional(),\n    query: z.object({\n        parameterArrayCSV: z.array(z.string()),\n        parameterArraySSV: z.array(z.string()),\n        parameterArrayTSV: z.array(z.string()),\n        parameterArrayPipes: z.array(z.string()),\n        parameterArrayMulti: z.array(z.string())\n    })\n});\n\nexport const zTypesData = z.object({\n    body: z.never().optional(),\n    path: z.object({\n        id: z.int().min(-2147483648, { error: 'Invalid value: Expected int32 to be >= -2147483648' }).max(2147483647, { error: 'Invalid value: Expected int32 to be <= 2147483647' }).optional()\n    }).optional(),\n    query: z.object({\n        parameterNumber: z.number().default(123),\n        parameterString: z.string().default('default'),\n        parameterBoolean: z.boolean().default(true),\n        parameterArray: z.array(z.string()),\n        parameterDictionary: z.record(z.string(), z.unknown()),\n        parameterEnum: z.enum([\n            'Success',\n            'Warning',\n            'Error'\n        ])\n    })\n});\n\nexport const zTypesResponse = z.union([\n    z.number(),\n    z.string(),\n    z.boolean(),\n    z.record(z.string(), z.unknown())\n]);\n\nexport const zComplexTypesData = z.object({\n    body: z.never().optional(),\n    path: z.never().optional(),\n    query: z.object({\n        parameterObject: z.object({\n            first: z.object({\n                second: z.object({\n                    third: z.string().optional()\n                }).optional()\n            }).optional()\n        }),\n        parameterReference: z.object({\n            prop: z.string().optional()\n        })\n    })\n});\n\n/**\n * Successful response\n */\nexport const zComplexTypesResponse = z.array(zModelWithString);\n\nexport const zCallWithResultFromHeaderData = z.object({\n    body: z.never().optional(),\n    path: z.never().optional(),\n    query: z.never().optional()\n});\n\nexport const zTestErrorCodeData = z.object({\n    body: z.never().optional(),\n    path: z.never().optional(),\n    query: z.object({\n        status: z.string()\n    })\n});\n\nexport const zNonAsciiæøåÆøÅöôêÊ字符串Data = z.object({\n    body: z.never().optional(),\n    path: z.never().optional(),\n    query: z.object({\n        nonAsciiParamæøåÆØÅöôêÊ: z.int()\n    })\n});\n\n/**\n * Successful response\n */\nexport const zNonAsciiæøåÆøÅöôêÊ字符串Response = zNonAsciiStringæøåÆøÅöôêÊ字符串;\n\nexport const zPostApiVbyApiVersionBodyData = z.object({\n    body: zParameterActivityParams,\n    path: z.never().optional(),\n    query: z.never().optional()\n});\n\n/**\n * OK\n */\nexport const zPostApiVbyApiVersionBodyResponse = zResponsePostActivityResponse;\n"
  },
  {
    "path": "packages/openapi-ts-tests/zod/v3/__snapshots__/2.0.x/v4/type-format/zod.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport * as z from 'zod/v4';\n\nexport const zFoo = z.object({\n    bar: z.int().optional(),\n    foo: z.coerce.bigint().min(BigInt('-9223372036854775808'), { error: 'Invalid value: Expected int64 to be >= -9223372036854775808' }).max(BigInt('9223372036854775807'), { error: 'Invalid value: Expected int64 to be <= 9223372036854775807' }).default(BigInt(0)),\n    id: z.string()\n});\n\nexport const zBar = z.object({\n    foo: z.int()\n});\n\nexport const zPostFooData = z.object({\n    body: z.never().optional(),\n    path: z.never().optional(),\n    query: z.never().optional()\n});\n\n/**\n * OK\n */\nexport const zPostFooResponse = zFoo;\n"
  },
  {
    "path": "packages/openapi-ts-tests/zod/v3/__snapshots__/3.0.x/mini/array-items-all-of/zod.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport * as z from 'zod/v4-mini';\n\nexport const zArrayWithAllOfObjects = z.array(z.intersection(z.object({\n    id: z.optional(z.int())\n}), z.object({\n    name: z.optional(z.string())\n})));\n\nexport const zArrayWithAllOfPrimitives = z.array(z.intersection(z.number(), z.string()));\n\nexport const zBaseModel = z.object({\n    id: z.optional(z.int()),\n    createdAt: z.optional(z.iso.datetime())\n});\n\nexport const zArrayWithAllOfRefs = z.array(z.intersection(zBaseModel, z.object({\n    extra: z.optional(z.string())\n})));\n"
  },
  {
    "path": "packages/openapi-ts-tests/zod/v3/__snapshots__/3.0.x/mini/array-items-one-of-length-1/zod.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport * as z from 'zod/v4-mini';\n\nexport const zBar = z.string();\n\nexport const zFoo = z.object({\n    foo: z.optional(z.array(zBar).check(z.minLength(1), z.maxLength(2147483647)))\n});\n"
  },
  {
    "path": "packages/openapi-ts-tests/zod/v3/__snapshots__/3.0.x/mini/circular/zod.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport * as z from 'zod/v4-mini';\n\nexport const zFoo = z.object({\n    quux: z.optional(z.lazy((): any => zQuux))\n});\n\nexport const zBar = z.object({\n    bar: z.optional(z.lazy((): any => zBar)),\n    baz: z.optional(z.lazy((): any => zBaz))\n});\n\nexport const zBaz = z.object({\n    quux: z.optional(z.lazy((): any => zQuux))\n});\n\nexport const zQux = z.union([\n    z.intersection(z.object({\n        type: z.literal('struct')\n    }), z.lazy(() => z.lazy((): any => zCorge))),\n    z.intersection(z.object({\n        type: z.literal('array')\n    }), zFoo)\n]);\n\nexport const zQuux = z.object({\n    qux: z.optional(zQux)\n});\n\nexport const zCorge = z.object({\n    baz: z.optional(z.array(zBaz))\n});\n"
  },
  {
    "path": "packages/openapi-ts-tests/zod/v3/__snapshots__/3.0.x/mini/default/zod.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport * as z from 'zod/v4-mini';\n\n/**\n * Model with number-only name\n */\nexport const z400 = z.string();\n\n/**\n * Testing multiline comments in string: First line\n * Second line\n *\n * Fourth line\n */\nexport const zCamelCaseCommentWithBreaks = z.int();\n\n/**\n * Testing multiline comments in string: First line\n * Second line\n *\n * Fourth line\n */\nexport const zCommentWithBreaks = z.int();\n\n/**\n * Testing backticks in string: `backticks` and ```multiple backticks``` should work\n */\nexport const zCommentWithBackticks = z.int();\n\n/**\n * Testing backticks and quotes in string: `backticks`, 'quotes', \"double quotes\" and ```multiple backticks``` should work\n */\nexport const zCommentWithBackticksAndQuotes = z.int();\n\n/**\n * Testing slashes in string: \\backwards\\\\\\ and /forwards/// should work\n */\nexport const zCommentWithSlashes = z.int();\n\n/**\n * Testing expression placeholders in string: ${expression} should work\n */\nexport const zCommentWithExpressionPlaceholders = z.int();\n\n/**\n * Testing quotes in string: 'single quote''' and \"double quotes\"\"\" should work\n */\nexport const zCommentWithQuotes = z.int();\n\n/**\n * Testing reserved characters in string: * inline * and ** inline ** should work\n */\nexport const zCommentWithReservedCharacters = z.int();\n\n/**\n * This is a simple number\n */\nexport const zSimpleInteger = z.int();\n\n/**\n * This is a simple boolean\n */\nexport const zSimpleBoolean = z.boolean();\n\n/**\n * This is a simple string\n */\nexport const zSimpleString = z.string();\n\n/**\n * A string with non-ascii (unicode) characters valid in typescript identifiers (æøåÆØÅöÔèÈ字符串)\n */\nexport const zNonAsciiStringæøåÆøÅöôêÊ字符串 = z.string();\n\n/**\n * This is a simple file\n */\nexport const zSimpleFile = z.string();\n\n/**\n * This is a simple string\n */\nexport const zSimpleStringWithPattern = z.nullable(z.string().check(z.maxLength(64), z.regex(/^[a-zA-Z0-9_]*$/)));\n\n/**\n * This is a simple enum with strings\n */\nexport const zEnumWithStrings = z.enum([\n    'Success',\n    'Warning',\n    'Error',\n    '\\'Single Quote\\'',\n    '\"Double Quotes\"',\n    'Non-ascii: øæåôöØÆÅÔÖ字符串'\n]);\n\nexport const zEnumWithReplacedCharacters = z.union([\n    z.literal('\\'Single Quote\\''),\n    z.literal('\"Double Quotes\"'),\n    z.literal('øæåôöØÆÅÔÖ字符串'),\n    z.literal(3.1),\n    z.literal('')\n]);\n\n/**\n * This is a simple enum with numbers\n */\nexport const zEnumWithNumbers = z.union([\n    z.literal(1),\n    z.literal(2),\n    z.literal(3),\n    z.literal(1.1),\n    z.literal(1.2),\n    z.literal(1.3),\n    z.literal(100),\n    z.literal(200),\n    z.literal(300),\n    z.literal(-100),\n    z.literal(-200),\n    z.literal(-300),\n    z.literal(-1.1),\n    z.literal(-1.2),\n    z.literal(-1.3)\n]);\n\n/**\n * Success=1,Warning=2,Error=3\n */\nexport const zEnumFromDescription = z.number();\n\n/**\n * This is a simple enum with numbers\n */\nexport const zEnumWithExtensions = z.union([\n    z.literal(200),\n    z.literal(400),\n    z.literal(500)\n]);\n\nexport const zEnumWithXEnumNames = z.union([\n    z.literal(0),\n    z.literal(1),\n    z.literal(2)\n]);\n\n/**\n * This is a simple array with numbers\n */\nexport const zArrayWithNumbers = z.array(z.int());\n\n/**\n * This is a simple array with booleans\n */\nexport const zArrayWithBooleans = z.array(z.boolean());\n\n/**\n * This is a simple array with strings\n */\nexport const zArrayWithStrings = z._default(z.array(z.string()), ['test']);\n\n/**\n * This is a simple array with properties\n */\nexport const zArrayWithProperties = z.array(z.object({\n    '16x16': z.optional(zCamelCaseCommentWithBreaks),\n    bar: z.optional(z.string())\n}));\n\n/**\n * This is a simple array with any of properties\n */\nexport const zArrayWithAnyOfProperties = z.array(z.union([z.object({\n        foo: z._default(z.optional(z.string()), 'test')\n    }), z.object({\n        bar: z.optional(z.string())\n    })]));\n\nexport const zAnyOfAnyAndNull = z.object({\n    data: z.optional(z.unknown())\n});\n\n/**\n * This is a simple array with any of properties\n */\nexport const zAnyOfArrays = z.object({\n    results: z.optional(z.array(z.union([z.object({\n            foo: z.optional(z.string())\n        }), z.object({\n            bar: z.optional(z.string())\n        })])))\n});\n\n/**\n * This is a string dictionary\n */\nexport const zDictionaryWithString = z.record(z.string(), z.string());\n\nexport const zDictionaryWithPropertiesAndAdditionalProperties = z.object({\n    foo: z.optional(z.number()),\n    bar: z.optional(z.boolean())\n});\n\n/**\n * This is a string dictionary\n */\nexport const zDictionaryWithDictionary = z.record(z.string(), z.record(z.string(), z.string()));\n\n/**\n * This is a complex dictionary\n */\nexport const zDictionaryWithProperties = z.record(z.string(), z.object({\n    foo: z.optional(z.string()),\n    bar: z.optional(z.string())\n}));\n\n/**\n * This is a model with one number property\n */\nexport const zModelWithInteger = z.object({\n    prop: z.optional(z.int())\n});\n\n/**\n * This is a model with one boolean property\n */\nexport const zModelWithBoolean = z.object({\n    prop: z.optional(z.boolean())\n});\n\n/**\n * This is a model with one string property\n */\nexport const zModelWithString = z.object({\n    prop: z.optional(z.string())\n});\n\n/**\n * This is a simple reference\n */\nexport const zSimpleReference = zModelWithString;\n\n/**\n * This is a simple array with references\n */\nexport const zArrayWithReferences = z.array(zModelWithString);\n\n/**\n * This is a simple array containing an array\n */\nexport const zArrayWithArray = z.array(z.array(zModelWithString));\n\n/**\n * This is a string reference\n */\nexport const zDictionaryWithReference = z.record(z.string(), zModelWithString);\n\n/**\n * This is a complex dictionary\n */\nexport const zDictionaryWithArray = z.record(z.string(), z.array(zModelWithString));\n\n/**\n * This is a model with one string property\n */\nexport const zModelWithStringError = z.object({\n    prop: z.optional(z.string())\n});\n\n/**\n * `Comment` or `VoiceComment`. The JSON object for adding voice comments to tickets is different. See [Adding voice comments to tickets](/documentation/ticketing/managing-tickets/adding-voice-comments-to-tickets)\n */\nexport const zModelFromZendesk = z.string();\n\n/**\n * This is a model with one string property\n */\nexport const zModelWithNullableString = z.object({\n    nullableProp1: z.nullish(z.string()),\n    nullableRequiredProp1: z.nullable(z.string()),\n    nullableProp2: z.nullish(z.string()),\n    nullableRequiredProp2: z.nullable(z.string()),\n    'foo_bar-enum': z.optional(z.enum([\n        'Success',\n        'Warning',\n        'Error',\n        'ØÆÅ字符串'\n    ]))\n});\n\n/**\n * This is a model with one enum\n */\nexport const zModelWithEnum = z.object({\n    'foo_bar-enum': z.optional(z.enum([\n        'Success',\n        'Warning',\n        'Error',\n        'ØÆÅ字符串'\n    ])),\n    statusCode: z.optional(z.enum([\n        '100',\n        '200 FOO',\n        '300 FOO_BAR',\n        '400 foo-bar',\n        '500 foo.bar',\n        '600 foo&bar'\n    ])),\n    bool: z.optional(z.literal(true))\n});\n\n/**\n * This is a model with one enum with escaped name\n */\nexport const zModelWithEnumWithHyphen = z.object({\n    'foo-bar-baz-qux': z.optional(z.enum(['3.0']))\n});\n\n/**\n * This is a model with one enum\n */\nexport const zModelWithEnumFromDescription = z.object({\n    test: z.optional(z.int())\n});\n\n/**\n * This is a model with nested enums\n */\nexport const zModelWithNestedEnums = z.object({\n    dictionaryWithEnum: z.optional(z.record(z.string(), z.enum([\n        'Success',\n        'Warning',\n        'Error'\n    ]))),\n    dictionaryWithEnumFromDescription: z.optional(z.record(z.string(), z.int())),\n    arrayWithEnum: z.optional(z.array(z.enum([\n        'Success',\n        'Warning',\n        'Error'\n    ]))),\n    arrayWithDescription: z.optional(z.array(z.int())),\n    'foo_bar-enum': z.optional(z.enum([\n        'Success',\n        'Warning',\n        'Error',\n        'ØÆÅ字符串'\n    ]))\n});\n\n/**\n * This is a model with one property containing an array\n */\nexport const zModelWithArray = z.object({\n    prop: z.optional(z.array(zModelWithString)),\n    propWithFile: z.optional(z.array(z.string())),\n    propWithNumber: z.optional(z.array(z.number()))\n});\n\n/**\n * This is a model with one property containing a dictionary\n */\nexport const zModelWithDictionary = z.object({\n    prop: z.optional(z.record(z.string(), z.string()))\n});\n\n/**\n * This is a deprecated model with a deprecated property\n *\n * @deprecated\n */\nexport const zDeprecatedModel = z.object({\n    prop: z.optional(z.string())\n});\n\n/**\n * This is a model with one property containing a circular reference\n */\nexport const zModelWithCircularReference = z.object({\n    prop: z.optional(z.lazy((): any => zModelWithCircularReference))\n});\n\n/**\n * This is a model with one property with a 'one of' relationship\n */\nexport const zCompositionWithOneOf = z.object({\n    propA: z.optional(z.union([\n        zModelWithString,\n        zModelWithEnum,\n        zModelWithArray,\n        zModelWithDictionary\n    ]))\n});\n\n/**\n * This is a model with one property with a 'one of' relationship where the options are not $ref\n */\nexport const zCompositionWithOneOfAnonymous = z.object({\n    propA: z.optional(z.union([\n        z.object({\n            propA: z.optional(z.string())\n        }),\n        z.string(),\n        z.int()\n    ]))\n});\n\n/**\n * Circle\n */\nexport const zModelCircle = z.object({\n    kind: z.string(),\n    radius: z.optional(z.number())\n});\n\n/**\n * Square\n */\nexport const zModelSquare = z.object({\n    kind: z.string(),\n    sideLength: z.optional(z.number())\n});\n\n/**\n * This is a model with one property with a 'one of' relationship where the options are not $ref\n */\nexport const zCompositionWithOneOfDiscriminator = z.union([\n    z.intersection(z.object({\n        kind: z.literal('circle')\n    }), zModelCircle),\n    z.intersection(z.object({\n        kind: z.literal('square')\n    }), zModelSquare)\n]);\n\n/**\n * This is a model with one property with a 'any of' relationship\n */\nexport const zCompositionWithAnyOf = z.object({\n    propA: z.optional(z.union([\n        zModelWithString,\n        zModelWithEnum,\n        zModelWithArray,\n        zModelWithDictionary\n    ]))\n});\n\n/**\n * This is a model with one property with a 'any of' relationship where the options are not $ref\n */\nexport const zCompositionWithAnyOfAnonymous = z.object({\n    propA: z.optional(z.union([\n        z.object({\n            propA: z.optional(z.string())\n        }),\n        z.string(),\n        z.int()\n    ]))\n});\n\n/**\n * This is a model with nested 'any of' property with a type null\n */\nexport const zCompositionWithNestedAnyAndTypeNull = z.object({\n    propA: z.optional(z.union([\n        z.array(z.nullable(zModelWithDictionary)),\n        z.array(z.nullable(zModelWithArray))\n    ]))\n});\n\nexport const z3eNum1Период = z.enum(['Bird', 'Dog']);\n\nexport const zConstValue = z.enum(['ConstValue']);\n\n/**\n * This is a model with one property with a 'any of' relationship where the options are not $ref\n */\nexport const zCompositionWithNestedAnyOfAndNull = z.object({\n    propA: z.nullish(z.array(z.union([z3eNum1Период, zConstValue])))\n});\n\n/**\n * This is a model with one property with a 'one of' relationship\n */\nexport const zCompositionWithOneOfAndNullable = z.object({\n    propA: z.nullish(z.union([\n        z.object({\n            boolean: z.optional(z.boolean())\n        }),\n        zModelWithEnum,\n        zModelWithArray,\n        zModelWithDictionary\n    ]))\n});\n\n/**\n * This is a model that contains a simple dictionary within composition\n */\nexport const zCompositionWithOneOfAndSimpleDictionary = z.object({\n    propA: z.optional(z.union([\n        z.boolean(),\n        z.record(z.string(), z.number())\n    ]))\n});\n\n/**\n * This is a model that contains a dictionary of simple arrays within composition\n */\nexport const zCompositionWithOneOfAndSimpleArrayDictionary = z.object({\n    propA: z.optional(z.union([\n        z.boolean(),\n        z.record(z.string(), z.array(z.boolean()))\n    ]))\n});\n\n/**\n * This is a model that contains a dictionary of complex arrays (composited) within composition\n */\nexport const zCompositionWithOneOfAndComplexArrayDictionary = z.object({\n    propA: z.optional(z.union([\n        z.boolean(),\n        z.record(z.string(), z.array(z.union([z.number(), z.string()])))\n    ]))\n});\n\n/**\n * This is a model with one property with a 'all of' relationship\n */\nexport const zCompositionWithAllOfAndNullable = z.object({\n    propA: z.nullish(z.intersection(z.intersection(z.intersection(z.object({\n        boolean: z.optional(z.boolean())\n    }), zModelWithEnum), zModelWithArray), zModelWithDictionary))\n});\n\n/**\n * This is a model with one property with a 'any of' relationship\n */\nexport const zCompositionWithAnyOfAndNullable = z.object({\n    propA: z.nullish(z.union([\n        z.object({\n            boolean: z.optional(z.boolean())\n        }),\n        zModelWithEnum,\n        zModelWithArray,\n        zModelWithDictionary\n    ]))\n});\n\n/**\n * This is a base model with two simple optional properties\n */\nexport const zCompositionBaseModel = z.object({\n    firstName: z.optional(z.string()),\n    lastname: z.optional(z.string())\n});\n\n/**\n * This is a model that extends the base model\n */\nexport const zCompositionExtendedModel = z.intersection(zCompositionBaseModel, z.object({\n    age: z.number(),\n    firstName: z.string(),\n    lastname: z.string()\n}));\n\n/**\n * This is a model with one nested property\n */\nexport const zModelWithProperties = z.object({\n    required: z.string(),\n    requiredAndReadOnly: z.readonly(z.string()),\n    requiredAndNullable: z.nullable(z.string()),\n    string: z.optional(z.string()),\n    number: z.optional(z.number()),\n    boolean: z.optional(z.boolean()),\n    reference: z.optional(zModelWithString),\n    'property with space': z.optional(z.string()),\n    default: z.optional(z.string()),\n    try: z.optional(z.string()),\n    '@namespace.string': z.optional(z.readonly(z.string())),\n    '@namespace.integer': z.optional(z.readonly(z.int()))\n});\n\n/**\n * This is a model with one property containing a reference\n */\nexport const zModelWithReference = z.object({\n    prop: z.optional(zModelWithProperties)\n});\n\n/**\n * This is a model with one nested property\n */\nexport const zModelWithNestedProperties = z.object({\n    first: z.nullable(z.readonly(z.object({\n        second: z.nullable(z.readonly(z.object({\n            third: z.nullable(z.readonly(z.string()))\n        })))\n    })))\n});\n\n/**\n * This is a model with duplicated properties\n */\nexport const zModelWithDuplicateProperties = z.object({\n    prop: z.optional(zModelWithString)\n});\n\n/**\n * This is a model with ordered properties\n */\nexport const zModelWithOrderedProperties = z.object({\n    zebra: z.optional(z.string()),\n    apple: z.optional(z.string()),\n    hawaii: z.optional(z.string())\n});\n\n/**\n * This is a model with duplicated imports\n */\nexport const zModelWithDuplicateImports = z.object({\n    propA: z.optional(zModelWithString),\n    propB: z.optional(zModelWithString),\n    propC: z.optional(zModelWithString)\n});\n\n/**\n * This is a model that extends another model\n */\nexport const zModelThatExtends = z.intersection(zModelWithString, z.object({\n    propExtendsA: z.optional(z.string()),\n    propExtendsB: z.optional(zModelWithString)\n}));\n\n/**\n * This is a model that extends another model\n */\nexport const zModelThatExtendsExtends = z.intersection(z.intersection(zModelWithString, zModelThatExtends), z.object({\n    propExtendsC: z.optional(z.string()),\n    propExtendsD: z.optional(zModelWithString)\n}));\n\n/**\n * This is a model that contains a some patterns\n */\nexport const zModelWithPattern = z.object({\n    key: z.string().check(z.maxLength(64), z.regex(/^[a-zA-Z0-9_]*$/)),\n    name: z.string().check(z.maxLength(255)),\n    enabled: z.optional(z.readonly(z.boolean())),\n    modified: z.optional(z.readonly(z.iso.datetime())),\n    id: z.optional(z.string().check(z.regex(/^\\d{2}-\\d{3}-\\d{4}$/))),\n    text: z.optional(z.string().check(z.regex(/^\\w+$/))),\n    patternWithSingleQuotes: z.optional(z.string().check(z.regex(/^[a-zA-Z0-9']*$/))),\n    patternWithNewline: z.optional(z.string().check(z.regex(/aaa\\nbbb/))),\n    patternWithBacktick: z.optional(z.string().check(z.regex(/aaa`bbb/))),\n    patternWithUnicode: z.optional(z.string().check(z.regex(/^\\p{L}+$/u)))\n});\n\nexport const zFile = z.object({\n    id: z.optional(z.readonly(z.string().check(z.minLength(1)))),\n    updated_at: z.optional(z.readonly(z.iso.datetime())),\n    created_at: z.optional(z.readonly(z.iso.datetime())),\n    mime: z.string().check(z.minLength(1), z.maxLength(24)),\n    file: z.optional(z.readonly(z.url()))\n});\n\nexport const zDefault = z.object({\n    name: z.optional(z.string())\n});\n\nexport const zPageable = z.object({\n    page: z._default(z.optional(z.int().check(z.gte(0), z.maximum(2147483647, { error: 'Invalid value: Expected int32 to be <= 2147483647' }))), 0),\n    size: z.optional(z.int().check(z.gte(1), z.maximum(2147483647, { error: 'Invalid value: Expected int32 to be <= 2147483647' }))),\n    sort: z.optional(z.array(z.string()))\n});\n\n/**\n * This is a free-form object without additionalProperties.\n */\nexport const zFreeFormObjectWithoutAdditionalProperties = z.record(z.string(), z.unknown());\n\n/**\n * This is a free-form object with additionalProperties: true.\n */\nexport const zFreeFormObjectWithAdditionalPropertiesEqTrue = z.record(z.string(), z.unknown());\n\n/**\n * This is a free-form object with additionalProperties: {}.\n */\nexport const zFreeFormObjectWithAdditionalPropertiesEqEmptyObject = z.record(z.string(), z.unknown());\n\nexport const zModelWithConst = z.object({\n    String: z.optional(z.enum(['String'])),\n    number: z.optional(z.literal(0)),\n    null: z.optional(z.unknown()),\n    withType: z.optional(z.enum(['Some string']))\n});\n\n/**\n * This is a model with one property and additionalProperties: true\n */\nexport const zModelWithAdditionalPropertiesEqTrue = z.object({\n    prop: z.optional(z.string())\n});\n\nexport const zNestedAnyOfArraysNullable = z.object({\n    nullableArray: z.nullish(z.array(z.union([z.string(), z.boolean()])))\n});\n\n/**\n * An object that can be null\n */\nexport const zNullableObject = z._default(z.nullable(z.object({\n    foo: z.optional(z.string())\n})), null);\n\n/**\n * Some % character\n */\nexport const zCharactersInDescription = z.string();\n\nexport const zModelWithNullableObject = z.object({\n    data: z.optional(zNullableObject)\n});\n\n/**\n * An object with additional properties that can be null\n */\nexport const zModelWithAdditionalPropertiesRef = z.record(z.string(), z.nullable(zNullableObject));\n\nexport const zModelWithOneOfEnum = z.union([\n    z.object({\n        foo: z.enum(['Bar'])\n    }),\n    z.object({\n        foo: z.enum(['Baz'])\n    }),\n    z.object({\n        foo: z.enum(['Qux'])\n    }),\n    z.object({\n        content: z.iso.datetime(),\n        foo: z.enum(['Quux'])\n    }),\n    z.object({\n        content: z.tuple([z.iso.datetime(), z.iso.datetime()]),\n        foo: z.enum(['Corge'])\n    })\n]);\n\nexport const zModelWithNestedArrayEnumsDataFoo = z.enum(['foo', 'bar']);\n\nexport const zModelWithNestedArrayEnumsDataBar = z.enum(['baz', 'qux']);\n\nexport const zModelWithNestedArrayEnumsData = z.object({\n    foo: z.optional(z.array(zModelWithNestedArrayEnumsDataFoo)),\n    bar: z.optional(z.array(zModelWithNestedArrayEnumsDataBar))\n});\n\nexport const zModelWithNestedArrayEnums = z.object({\n    array_strings: z.optional(z.array(z.string())),\n    data: z.optional(zModelWithNestedArrayEnumsData)\n});\n\nexport const zModelWithNestedCompositionEnums = z.object({\n    foo: z.optional(zModelWithNestedArrayEnumsDataFoo)\n});\n\nexport const zModelWithReadOnlyAndWriteOnly = z.object({\n    foo: z.string(),\n    bar: z.readonly(z.string())\n});\n\n/**\n * This is a model with one property containing an array\n */\nexport const zModelWithArrayReadOnlyAndWriteOnly = z.object({\n    prop: z.optional(z.array(zModelWithReadOnlyAndWriteOnly)),\n    propWithFile: z.optional(z.array(z.string())),\n    propWithNumber: z.optional(z.array(z.number()))\n});\n\nexport const zModelWithConstantSizeArray = z.tuple([z.number(), z.number()]);\n\nexport const zModelWithAnyOfConstantSizeArray = z.tuple([\n    z.union([\n        z.number(),\n        z.string()\n    ]),\n    z.union([\n        z.number(),\n        z.string()\n    ]),\n    z.union([\n        z.number(),\n        z.string()\n    ])\n]);\n\nexport const zModelWithPrefixItemsConstantSizeArray = z.array(z.union([\n    zModelWithInteger,\n    z.number(),\n    z.string()\n]));\n\nexport const zModelWithAnyOfConstantSizeArrayNullable = z.tuple([\n    z.nullable(z.union([\n        z.number(),\n        z.string()\n    ])),\n    z.nullable(z.union([\n        z.number(),\n        z.string()\n    ])),\n    z.nullable(z.union([\n        z.number(),\n        z.string()\n    ]))\n]);\n\nexport const zModelWithAnyOfConstantSizeArrayAndIntersect = z.tuple([z.intersection(z.number(), z.string()), z.intersection(z.number(), z.string())]);\n\nexport const zModelWithNumericEnumUnion = z.object({\n    value: z.optional(z.union([\n        z.literal(-10),\n        z.literal(-1),\n        z.literal(0),\n        z.literal(1),\n        z.literal(3),\n        z.literal(6),\n        z.literal(12)\n    ]))\n});\n\n/**\n * Some description with `back ticks`\n */\nexport const zModelWithBackticksInDescription = z.object({\n    template: z.optional(z.string())\n});\n\n/**\n * Model used to test deduplication strategy (unused)\n */\nexport const zParameterSimpleParameterUnused = z.string();\n\n/**\n * Model used to test deduplication strategy\n */\nexport const zPostServiceWithEmptyTagResponse = z.string();\n\n/**\n * Model used to test deduplication strategy\n */\nexport const zPostServiceWithEmptyTagResponse2 = z.string();\n\n/**\n * Model used to test deduplication strategy\n */\nexport const zDeleteFooData = z.string();\n\n/**\n * Model used to test deduplication strategy\n */\nexport const zDeleteFooData2 = z.string();\n\n/**\n * Model with restricted keyword name\n */\nexport const zImport = z.string();\n\nexport const zModelWithAnyOfConstantSizeArrayWithNSizeAndOptions = z.tuple([z.union([\n        z.number(),\n        zImport\n    ]), z.union([\n        z.number(),\n        zImport\n    ])]);\n\nexport const zSchemaWithFormRestrictedKeys = z.object({\n    description: z.optional(z.string()),\n    'x-enum-descriptions': z.optional(z.string()),\n    'x-enum-varnames': z.optional(z.string()),\n    'x-enumNames': z.optional(z.string()),\n    title: z.optional(z.string()),\n    object: z.optional(z.object({\n        description: z.optional(z.string()),\n        'x-enum-descriptions': z.optional(z.string()),\n        'x-enum-varnames': z.optional(z.string()),\n        'x-enumNames': z.optional(z.string()),\n        title: z.optional(z.string())\n    })),\n    array: z.optional(z.array(z.object({\n        description: z.optional(z.string()),\n        'x-enum-descriptions': z.optional(z.string()),\n        'x-enum-varnames': z.optional(z.string()),\n        'x-enumNames': z.optional(z.string()),\n        title: z.optional(z.string())\n    })))\n});\n\n/**\n * This schema was giving PascalCase transformations a hard time\n */\nexport const zIoK8sApimachineryPkgApisMetaV1Preconditions = z.object({\n    resourceVersion: z.optional(z.string()),\n    uid: z.optional(z.string())\n});\n\n/**\n * This schema was giving PascalCase transformations a hard time\n */\nexport const zIoK8sApimachineryPkgApisMetaV1DeleteOptions = z.object({\n    preconditions: z.optional(zIoK8sApimachineryPkgApisMetaV1Preconditions)\n});\n\nexport const zAdditionalPropertiesUnknownIssue = z.record(z.string(), z.union([\n    z.string(),\n    z.number()\n]));\n\nexport const zAdditionalPropertiesUnknownIssue2 = z.record(z.string(), z.union([\n    z.string(),\n    z.number()\n]));\n\nexport const zAdditionalPropertiesUnknownIssue3 = z.intersection(z.string(), z.object({\n    entries: z.record(z.string(), zAdditionalPropertiesUnknownIssue)\n}));\n\nexport const zAdditionalPropertiesIntegerIssue = z.object({\n    value: z.int()\n});\n\nexport const zGenericSchemaDuplicateIssue1SystemBoolean = z.object({\n    item: z.optional(z.boolean()),\n    error: z.nullish(z.string()),\n    hasError: z.optional(z.readonly(z.boolean())),\n    data: z.optional(z.record(z.string(), z.never()))\n});\n\nexport const zGenericSchemaDuplicateIssue1SystemString = z.object({\n    item: z.nullish(z.string()),\n    error: z.nullish(z.string()),\n    hasError: z.optional(z.readonly(z.boolean()))\n});\n\nexport const zOneOfAllOfIssue = z.union([\n    z.intersection(z.union([\n        zConstValue,\n        zGenericSchemaDuplicateIssue1SystemBoolean\n    ]), z3eNum1Период),\n    zGenericSchemaDuplicateIssue1SystemString\n]);\n\nexport const zExternalSharedModel = z.object({\n    id: z.string(),\n    name: z.optional(z.string())\n});\n\nexport const zExternalRefA = zExternalSharedModel;\n\nexport const zExternalRefB = zExternalSharedModel;\n\n/**\n * This is a model with one nested property\n */\nexport const zModelWithPropertiesWritable = z.object({\n    required: z.string(),\n    requiredAndNullable: z.nullable(z.string()),\n    string: z.optional(z.string()),\n    number: z.optional(z.number()),\n    boolean: z.optional(z.boolean()),\n    reference: z.optional(zModelWithString),\n    'property with space': z.optional(z.string()),\n    default: z.optional(z.string()),\n    try: z.optional(z.string())\n});\n\n/**\n * This is a model with one property containing a reference\n */\nexport const zModelWithReferenceWritable = z.object({\n    prop: z.optional(zModelWithPropertiesWritable)\n});\n\n/**\n * This is a model that contains a some patterns\n */\nexport const zModelWithPatternWritable = z.object({\n    key: z.string().check(z.maxLength(64), z.regex(/^[a-zA-Z0-9_]*$/)),\n    name: z.string().check(z.maxLength(255)),\n    id: z.optional(z.string().check(z.regex(/^\\d{2}-\\d{3}-\\d{4}$/))),\n    text: z.optional(z.string().check(z.regex(/^\\w+$/))),\n    patternWithSingleQuotes: z.optional(z.string().check(z.regex(/^[a-zA-Z0-9']*$/))),\n    patternWithNewline: z.optional(z.string().check(z.regex(/aaa\\nbbb/))),\n    patternWithBacktick: z.optional(z.string().check(z.regex(/aaa`bbb/))),\n    patternWithUnicode: z.optional(z.string().check(z.regex(/^\\p{L}+$/u)))\n});\n\nexport const zFileWritable = z.object({\n    mime: z.string().check(z.minLength(1), z.maxLength(24))\n});\n\nexport const zModelWithReadOnlyAndWriteOnlyWritable = z.object({\n    foo: z.string(),\n    baz: z.string()\n});\n\n/**\n * This is a model with one property containing an array\n */\nexport const zModelWithArrayReadOnlyAndWriteOnlyWritable = z.object({\n    prop: z.optional(z.array(zModelWithReadOnlyAndWriteOnlyWritable)),\n    propWithFile: z.optional(z.array(z.string())),\n    propWithNumber: z.optional(z.array(z.number()))\n});\n\nexport const zModelWithAnyOfConstantSizeArrayWithNSizeAndOptionsWritable = z.tuple([z.union([\n        z.number(),\n        zImport\n    ]), z.union([\n        z.number(),\n        zImport\n    ])]);\n\nexport const zAdditionalPropertiesUnknownIssueWritable = z.record(z.string(), z.union([\n    z.string(),\n    z.number()\n]));\n\nexport const zOneOfAllOfIssueWritable = z.union([\n    z.intersection(z.union([\n        zConstValue,\n        zGenericSchemaDuplicateIssue1SystemBoolean\n    ]), z3eNum1Период),\n    zGenericSchemaDuplicateIssue1SystemString\n]);\n\nexport const zGenericSchemaDuplicateIssue1SystemBooleanWritable = z.object({\n    item: z.optional(z.boolean()),\n    error: z.nullish(z.string()),\n    data: z.optional(z.record(z.string(), z.never()))\n});\n\nexport const zGenericSchemaDuplicateIssue1SystemStringWritable = z.object({\n    item: z.nullish(z.string()),\n    error: z.nullish(z.string())\n});\n\n/**\n * This is a reusable parameter\n */\nexport const zSimpleParameter = z.string();\n\nexport const zCompositionWithOneOfAndProperties = z.intersection(z.union([\n    z.object({\n        foo: zSimpleParameter\n    }),\n    z.object({\n        bar: zNonAsciiStringæøåÆøÅöôêÊ字符串\n    })\n]), z.object({\n    baz: z.nullable(z.int().check(z.gte(0), z.maximum(65535, { error: 'Invalid value: Expected uint16 to be <= 65535' }))),\n    qux: z.int().check(z.gte(0), z.maximum(255, { error: 'Invalid value: Expected uint8 to be <= 255' }))\n}));\n\nexport const zModelWithOneOfAndProperties = z.intersection(z.union([\n    zSimpleParameter,\n    zNonAsciiStringæøåÆøÅöôêÊ字符串\n]), z.object({\n    baz: z.nullable(z.int().check(z.gte(0), z.maximum(65535, { error: 'Invalid value: Expected uint16 to be <= 65535' }))),\n    qux: z.int().check(z.gte(0), z.maximum(255, { error: 'Invalid value: Expected uint8 to be <= 255' }))\n}));\n\n/**\n * Parameter with illegal characters\n */\nexport const zXFooBar = zModelWithString;\n\nexport const zSimpleRequestBody = zModelWithString;\n\nexport const zSimpleFormData = zModelWithString;\n\nexport const zExportData = z.object({\n    body: z.optional(z.never()),\n    path: z.optional(z.never()),\n    query: z.optional(z.never())\n});\n\nexport const zPatchApiVbyApiVersionNoTagData = z.object({\n    body: z.optional(z.never()),\n    path: z.optional(z.never()),\n    query: z.optional(z.never())\n});\n\nexport const zImportData = z.object({\n    body: z.union([\n        zModelWithReadOnlyAndWriteOnlyWritable,\n        zModelWithArrayReadOnlyAndWriteOnlyWritable\n    ]),\n    path: z.optional(z.never()),\n    query: z.optional(z.never())\n});\n\nexport const zImportResponse = z.union([\n    zModelFromZendesk,\n    zModelWithReadOnlyAndWriteOnly\n]);\n\nexport const zFooWowData = z.object({\n    body: z.optional(z.never()),\n    path: z.optional(z.never()),\n    query: z.optional(z.never())\n});\n\nexport const zApiVVersionODataControllerCountData = z.object({\n    body: z.optional(z.never()),\n    path: z.optional(z.never()),\n    query: z.optional(z.never())\n});\n\n/**\n * Success\n */\nexport const zApiVVersionODataControllerCountResponse = zModelFromZendesk;\n\nexport const zGetApiVbyApiVersionSimpleOperationData = z.object({\n    body: z.optional(z.never()),\n    path: z.object({\n        foo_param: z.string()\n    }),\n    query: z.optional(z.never())\n});\n\n/**\n * Response is a simple number\n */\nexport const zGetApiVbyApiVersionSimpleOperationResponse = z.number();\n\nexport const zDeleteCallWithoutParametersAndResponseData = z.object({\n    body: z.optional(z.never()),\n    path: z.optional(z.never()),\n    query: z.optional(z.never())\n});\n\nexport const zGetCallWithoutParametersAndResponseData = z.object({\n    body: z.optional(z.never()),\n    path: z.optional(z.never()),\n    query: z.optional(z.never())\n});\n\nexport const zHeadCallWithoutParametersAndResponseData = z.object({\n    body: z.optional(z.never()),\n    path: z.optional(z.never()),\n    query: z.optional(z.never())\n});\n\nexport const zOptionsCallWithoutParametersAndResponseData = z.object({\n    body: z.optional(z.never()),\n    path: z.optional(z.never()),\n    query: z.optional(z.never())\n});\n\nexport const zPatchCallWithoutParametersAndResponseData = z.object({\n    body: z.optional(z.never()),\n    path: z.optional(z.never()),\n    query: z.optional(z.never())\n});\n\nexport const zPostCallWithoutParametersAndResponseData = z.object({\n    body: z.optional(z.never()),\n    path: z.optional(z.never()),\n    query: z.optional(z.never())\n});\n\nexport const zPutCallWithoutParametersAndResponseData = z.object({\n    body: z.optional(z.never()),\n    path: z.optional(z.never()),\n    query: z.optional(z.never())\n});\n\nexport const zDeleteFooData3 = z.object({\n    body: z.optional(z.never()),\n    path: z.object({\n        foo_param: z.string(),\n        BarParam: z.string()\n    }),\n    query: z.optional(z.never()),\n    headers: z.object({\n        'x-Foo-Bar': zModelWithString\n    })\n});\n\nexport const zCallWithDescriptionsData = z.object({\n    body: z.optional(z.never()),\n    path: z.optional(z.never()),\n    query: z.optional(z.object({\n        parameterWithBreaks: z.optional(z.string()),\n        parameterWithBackticks: z.optional(z.string()),\n        parameterWithSlashes: z.optional(z.string()),\n        parameterWithExpressionPlaceholders: z.optional(z.string()),\n        parameterWithQuotes: z.optional(z.string()),\n        parameterWithReservedCharacters: z.optional(z.string())\n    }))\n});\n\nexport const zDeprecatedCallData = z.object({\n    body: z.optional(z.never()),\n    path: z.optional(z.never()),\n    query: z.optional(z.never()),\n    headers: z.object({\n        parameter: z.nullable(zDeprecatedModel)\n    })\n});\n\nexport const zCallWithParametersData = z.object({\n    body: z.nullable(z.record(z.string(), z.unknown())),\n    path: z.object({\n        parameterPath: z.nullable(z.string()),\n        'api-version': z.nullable(z.string())\n    }),\n    query: z.object({\n        foo_ref_enum: z.optional(zModelWithNestedArrayEnumsDataFoo),\n        foo_all_of_enum: zModelWithNestedArrayEnumsDataFoo,\n        cursor: z.nullable(z.string())\n    }),\n    headers: z.object({\n        parameterHeader: z.nullable(z.string())\n    })\n});\n\nexport const zCallWithWeirdParameterNamesData = z.object({\n    body: z.nullable(zModelWithString),\n    path: z.object({\n        'parameter.path.1': z.optional(z.string()),\n        'parameter-path-2': z.optional(z.string()),\n        'PARAMETER-PATH-3': z.optional(z.string()),\n        'api-version': z.nullable(z.string())\n    }),\n    query: z.object({\n        default: z.optional(z.string()),\n        'parameter-query': z.nullable(z.string())\n    }),\n    headers: z.object({\n        'parameter.header': z.nullable(z.string())\n    })\n});\n\nexport const zGetCallWithOptionalParamData = z.object({\n    body: zModelWithOneOfEnum,\n    path: z.optional(z.never()),\n    query: z.optional(z.object({\n        page: z.optional(z.number())\n    }))\n});\n\nexport const zPostCallWithOptionalParamData = z.object({\n    body: z.optional(z.object({\n        offset: z.nullish(z.number())\n    })),\n    path: z.optional(z.never()),\n    query: z.object({\n        parameter: zPageable\n    })\n});\n\nexport const zPostCallWithOptionalParamResponse = z.union([\n    z.number(),\n    z.void()\n]);\n\nexport const zPostApiVbyApiVersionRequestBodyData = z.object({\n    body: z.optional(zSimpleRequestBody),\n    path: z.optional(z.never()),\n    query: z.optional(z.object({\n        parameter: z.optional(z.string())\n    }))\n});\n\nexport const zPostApiVbyApiVersionFormDataData = z.object({\n    body: z.optional(zSimpleFormData),\n    path: z.optional(z.never()),\n    query: z.optional(z.object({\n        parameter: z.optional(z.string())\n    }))\n});\n\nexport const zCallWithDefaultParametersData = z.object({\n    body: z.optional(z.never()),\n    path: z.optional(z.never()),\n    query: z.optional(z.object({\n        parameterString: z._default(z.nullish(z.string()), 'Hello World!'),\n        parameterNumber: z._default(z.nullish(z.number()), 123),\n        parameterBoolean: z._default(z.nullish(z.boolean()), true),\n        parameterEnum: z.optional(z.enum([\n            'Success',\n            'Warning',\n            'Error'\n        ])),\n        parameterModel: z.nullish(zModelWithString)\n    }))\n});\n\nexport const zCallWithDefaultOptionalParametersData = z.object({\n    body: z.optional(z.never()),\n    path: z.optional(z.never()),\n    query: z.optional(z.object({\n        parameterString: z._default(z.optional(z.string()), 'Hello World!'),\n        parameterNumber: z._default(z.optional(z.number()), 123),\n        parameterBoolean: z._default(z.optional(z.boolean()), true),\n        parameterEnum: z.optional(z.enum([\n            'Success',\n            'Warning',\n            'Error'\n        ])),\n        parameterModel: z.optional(zModelWithString)\n    }))\n});\n\nexport const zCallToTestOrderOfParamsData = z.object({\n    body: z.optional(z.never()),\n    path: z.optional(z.never()),\n    query: z.object({\n        parameterOptionalStringWithDefault: z._default(z.optional(z.string()), 'Hello World!'),\n        parameterOptionalStringWithEmptyDefault: z._default(z.optional(z.string()), ''),\n        parameterOptionalStringWithNoDefault: z.optional(z.string()),\n        parameterStringWithDefault: z._default(z.string(), 'Hello World!'),\n        parameterStringWithEmptyDefault: z._default(z.string(), ''),\n        parameterStringWithNoDefault: z.string(),\n        parameterStringNullableWithNoDefault: z.nullish(z.string()),\n        parameterStringNullableWithDefault: z._default(z.nullish(z.string()), null)\n    })\n});\n\nexport const zDuplicateNameData = z.object({\n    body: z.optional(z.never()),\n    path: z.optional(z.never()),\n    query: z.optional(z.never())\n});\n\nexport const zDuplicateName2Data = z.object({\n    body: z.optional(z.never()),\n    path: z.optional(z.never()),\n    query: z.optional(z.never())\n});\n\nexport const zDuplicateName3Data = z.object({\n    body: z.optional(z.never()),\n    path: z.optional(z.never()),\n    query: z.optional(z.never())\n});\n\nexport const zDuplicateName4Data = z.object({\n    body: z.optional(z.never()),\n    path: z.optional(z.never()),\n    query: z.optional(z.never())\n});\n\nexport const zCallWithNoContentResponseData = z.object({\n    body: z.optional(z.never()),\n    path: z.optional(z.never()),\n    query: z.optional(z.never())\n});\n\n/**\n * Success\n */\nexport const zCallWithNoContentResponseResponse = z.void();\n\nexport const zCallWithResponseAndNoContentResponseData = z.object({\n    body: z.optional(z.never()),\n    path: z.optional(z.never()),\n    query: z.optional(z.never())\n});\n\nexport const zCallWithResponseAndNoContentResponseResponse = z.union([\n    z.number(),\n    z.void()\n]);\n\nexport const zDummyAData = z.object({\n    body: z.optional(z.never()),\n    path: z.optional(z.never()),\n    query: z.optional(z.never())\n});\n\nexport const zDummyAResponse = z400;\n\nexport const zDummyBData = z.object({\n    body: z.optional(z.never()),\n    path: z.optional(z.never()),\n    query: z.optional(z.never())\n});\n\n/**\n * Success\n */\nexport const zDummyBResponse = z.void();\n\nexport const zCallWithResponseData = z.object({\n    body: z.optional(z.never()),\n    path: z.optional(z.never()),\n    query: z.optional(z.never())\n});\n\nexport const zCallWithResponseResponse = zImport;\n\nexport const zCallWithDuplicateResponsesData = z.object({\n    body: z.optional(z.never()),\n    path: z.optional(z.never()),\n    query: z.optional(z.never())\n});\n\nexport const zCallWithDuplicateResponsesResponse = z.union([\n    z.intersection(zModelWithBoolean, zModelWithInteger),\n    zModelWithString\n]);\n\nexport const zCallWithResponsesData = z.object({\n    body: z.optional(z.never()),\n    path: z.optional(z.never()),\n    query: z.optional(z.never())\n});\n\nexport const zCallWithResponsesResponse = z.union([\n    z.object({\n        '@namespace.string': z.optional(z.readonly(z.string())),\n        '@namespace.integer': z.optional(z.readonly(z.int())),\n        value: z.optional(z.readonly(z.array(zModelWithString)))\n    }),\n    zModelThatExtends,\n    zModelThatExtendsExtends\n]);\n\nexport const zCollectionFormatData = z.object({\n    body: z.optional(z.never()),\n    path: z.optional(z.never()),\n    query: z.object({\n        parameterArrayCSV: z.nullable(z.array(z.string())),\n        parameterArraySSV: z.nullable(z.array(z.string())),\n        parameterArrayTSV: z.nullable(z.array(z.string())),\n        parameterArrayPipes: z.nullable(z.array(z.string())),\n        parameterArrayMulti: z.nullable(z.array(z.string()))\n    })\n});\n\nexport const zTypesData = z.object({\n    body: z.optional(z.never()),\n    path: z.optional(z.object({\n        id: z.optional(z.int().check(z.minimum(-2147483648, { error: 'Invalid value: Expected int32 to be >= -2147483648' }), z.maximum(2147483647, { error: 'Invalid value: Expected int32 to be <= 2147483647' })))\n    })),\n    query: z.object({\n        parameterNumber: z._default(z.number(), 123),\n        parameterString: z._default(z.nullable(z.string()), 'default'),\n        parameterBoolean: z._default(z.nullable(z.boolean()), true),\n        parameterObject: z._default(z.nullable(z.record(z.string(), z.unknown())), null),\n        parameterArray: z.nullable(z.array(z.string())),\n        parameterDictionary: z.nullable(z.record(z.string(), z.unknown())),\n        parameterEnum: z.enum([\n            'Success',\n            'Warning',\n            'Error'\n        ])\n    })\n});\n\nexport const zTypesResponse = z.union([\n    z.number(),\n    z.string(),\n    z.boolean(),\n    z.record(z.string(), z.unknown())\n]);\n\nexport const zUploadFileData = z.object({\n    body: z.string(),\n    path: z.object({\n        'api-version': z.nullable(z.string())\n    }),\n    query: z.optional(z.never())\n});\n\nexport const zUploadFileResponse = z.boolean();\n\nexport const zFileResponseData = z.object({\n    body: z.optional(z.never()),\n    path: z.object({\n        id: z.string(),\n        'api-version': z.string()\n    }),\n    query: z.optional(z.never())\n});\n\n/**\n * Success\n */\nexport const zFileResponseResponse = z.string();\n\nexport const zComplexTypesData = z.object({\n    body: z.optional(z.never()),\n    path: z.optional(z.never()),\n    query: z.object({\n        parameterObject: z.object({\n            first: z.optional(z.object({\n                second: z.optional(z.object({\n                    third: z.optional(z.string())\n                }))\n            }))\n        }),\n        parameterReference: zModelWithString\n    })\n});\n\n/**\n * Successful response\n */\nexport const zComplexTypesResponse = z.array(zModelWithString);\n\nexport const zMultipartResponseData = z.object({\n    body: z.optional(z.never()),\n    path: z.optional(z.never()),\n    query: z.optional(z.never())\n});\n\n/**\n * OK\n */\nexport const zMultipartResponseResponse = z.object({\n    file: z.optional(z.string()),\n    metadata: z.optional(z.object({\n        foo: z.optional(z.string()),\n        bar: z.optional(z.string())\n    }))\n});\n\nexport const zMultipartRequestData = z.object({\n    body: z.optional(z.object({\n        content: z.optional(z.string()),\n        data: z.nullish(zModelWithString)\n    })),\n    path: z.optional(z.never()),\n    query: z.optional(z.never())\n});\n\nexport const zComplexParamsData = z.object({\n    body: z.optional(z.object({\n        key: z.nullable(z.readonly(z.string().check(z.maxLength(64), z.regex(/^[a-zA-Z0-9_]*$/)))),\n        name: z.nullable(z.string().check(z.maxLength(255))),\n        enabled: z._default(z.optional(z.boolean()), true),\n        type: z.enum([\n            'Monkey',\n            'Horse',\n            'Bird'\n        ]),\n        listOfModels: z.nullish(z.array(zModelWithString)),\n        listOfStrings: z.nullish(z.array(z.string())),\n        parameters: z.union([\n            zModelWithString,\n            zModelWithEnum,\n            zModelWithArray,\n            zModelWithDictionary\n        ]),\n        user: z.optional(z.readonly(z.object({\n            id: z.optional(z.readonly(z.int().check(z.minimum(-2147483648, { error: 'Invalid value: Expected int32 to be >= -2147483648' }), z.maximum(2147483647, { error: 'Invalid value: Expected int32 to be <= 2147483647' })))),\n            name: z.nullish(z.readonly(z.string()))\n        })))\n    })),\n    path: z.object({\n        id: z.int().check(z.minimum(-2147483648, { error: 'Invalid value: Expected int32 to be >= -2147483648' }), z.maximum(2147483647, { error: 'Invalid value: Expected int32 to be <= 2147483647' })),\n        'api-version': z.string()\n    }),\n    query: z.optional(z.never())\n});\n\n/**\n * Success\n */\nexport const zComplexParamsResponse = zModelWithString;\n\nexport const zCallWithResultFromHeaderData = z.object({\n    body: z.optional(z.never()),\n    path: z.optional(z.never()),\n    query: z.optional(z.never())\n});\n\nexport const zTestErrorCodeData = z.object({\n    body: z.optional(z.never()),\n    path: z.optional(z.never()),\n    query: z.object({\n        status: z.int()\n    })\n});\n\nexport const zNonAsciiæøåÆøÅöôêÊ字符串Data = z.object({\n    body: z.optional(z.never()),\n    path: z.optional(z.never()),\n    query: z.object({\n        nonAsciiParamæøåÆØÅöôêÊ: z.int()\n    })\n});\n\n/**\n * Successful response\n */\nexport const zNonAsciiæøåÆøÅöôêÊ字符串Response = z.array(zNonAsciiStringæøåÆøÅöôêÊ字符串);\n\nexport const zPutWithFormUrlEncodedData = z.object({\n    body: zArrayWithStrings,\n    path: z.optional(z.never()),\n    query: z.optional(z.never())\n});\n"
  },
  {
    "path": "packages/openapi-ts-tests/zod/v3/__snapshots__/3.0.x/mini/enum-null/zod.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport * as z from 'zod/v4-mini';\n\nexport const zFoo = z.nullable(z.enum(['foo', 'bar']));\n\nexport const zBar = z.enum(['foo', 'bar']);\n\nexport const zBaz = z.enum(['foo', 'bar']);\n"
  },
  {
    "path": "packages/openapi-ts-tests/zod/v3/__snapshots__/3.0.x/mini/type-format/zod.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport * as z from 'zod/v4-mini';\n\nexport const zFoo = z.object({\n    bar: z.optional(z.int()),\n    foo: z._default(z.coerce.bigint().check(z.minimum(BigInt('-9223372036854775808'), { error: 'Invalid value: Expected int64 to be >= -9223372036854775808' }), z.maximum(BigInt('9223372036854775807'), { error: 'Invalid value: Expected int64 to be <= 9223372036854775807' })), BigInt(0)),\n    id: z.string()\n});\n\nexport const zBar = z.object({\n    foo: z.int()\n});\n\nexport const zPostFooData = z.object({\n    body: z.optional(z.never()),\n    path: z.optional(z.never()),\n    query: z.optional(z.never())\n});\n\n/**\n * OK\n */\nexport const zPostFooResponse = zFoo;\n"
  },
  {
    "path": "packages/openapi-ts-tests/zod/v3/__snapshots__/3.0.x/mini/validators/zod.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport * as z from 'zod/v4-mini';\n\nexport const zBaz = z._default(z.readonly(z.string().check(z.regex(/foo\\nbar/))), 'baz');\n\nexport const zFoo = z._default(z.nullable(z.object({\n    foo: z.optional(z.string().check(z.regex(/^\\d{3}-\\d{2}-\\d{4}$/))),\n    bar: z.optional(z.lazy((): any => zBar)),\n    baz: z.optional(z.array(z.lazy((): any => zFoo))),\n    qux: z._default(z.optional(z.int().check(z.gt(0))), 0)\n})), null);\n\nexport const zBar = z.object({\n    foo: z.optional(zFoo)\n});\n"
  },
  {
    "path": "packages/openapi-ts-tests/zod/v3/__snapshots__/3.0.x/v3/array-items-all-of/zod.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport { z } from 'zod';\n\nexport const zArrayWithAllOfObjects = z.array(z.object({\n    id: z.number().int().optional()\n}).and(z.object({\n    name: z.string().optional()\n})));\n\nexport const zArrayWithAllOfPrimitives = z.array(z.intersection(z.number(), z.string()));\n\nexport const zBaseModel = z.object({\n    id: z.number().int().optional(),\n    createdAt: z.string().datetime().optional()\n});\n\nexport const zArrayWithAllOfRefs = z.array(zBaseModel.and(z.object({\n    extra: z.string().optional()\n})));\n"
  },
  {
    "path": "packages/openapi-ts-tests/zod/v3/__snapshots__/3.0.x/v3/array-items-one-of-length-1/zod.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport { z } from 'zod';\n\nexport const zBar = z.string();\n\nexport const zFoo = z.object({\n    foo: z.array(zBar).min(1).max(2147483647).optional()\n});\n"
  },
  {
    "path": "packages/openapi-ts-tests/zod/v3/__snapshots__/3.0.x/v3/circular/zod.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport { z } from 'zod';\n\nexport const zFoo: z.AnyZodObject = z.object({\n    quux: z.lazy(() => zQuux).optional()\n});\n\nexport const zBar: z.AnyZodObject = z.object({\n    bar: z.lazy(() => zBar).optional(),\n    baz: z.lazy(() => zBaz).optional()\n});\n\nexport const zBaz: z.AnyZodObject = z.object({\n    quux: z.lazy(() => zQuux).optional()\n});\n\nexport const zQux: z.ZodTypeAny = z.union([\n    z.object({\n        type: z.literal('struct')\n    }).and(z.lazy(() => zCorge)),\n    z.object({\n        type: z.literal('array')\n    }).and(zFoo)\n]);\n\nexport const zQuux = z.object({\n    qux: zQux.optional()\n});\n\nexport const zCorge = z.object({\n    baz: z.array(zBaz).optional()\n});\n"
  },
  {
    "path": "packages/openapi-ts-tests/zod/v3/__snapshots__/3.0.x/v3/default/zod.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport { z } from 'zod';\n\n/**\n * Model with number-only name\n */\nexport const z400 = z.string();\n\n/**\n * Testing multiline comments in string: First line\n * Second line\n *\n * Fourth line\n */\nexport const zCamelCaseCommentWithBreaks = z.number().int();\n\n/**\n * Testing multiline comments in string: First line\n * Second line\n *\n * Fourth line\n */\nexport const zCommentWithBreaks = z.number().int();\n\n/**\n * Testing backticks in string: `backticks` and ```multiple backticks``` should work\n */\nexport const zCommentWithBackticks = z.number().int();\n\n/**\n * Testing backticks and quotes in string: `backticks`, 'quotes', \"double quotes\" and ```multiple backticks``` should work\n */\nexport const zCommentWithBackticksAndQuotes = z.number().int();\n\n/**\n * Testing slashes in string: \\backwards\\\\\\ and /forwards/// should work\n */\nexport const zCommentWithSlashes = z.number().int();\n\n/**\n * Testing expression placeholders in string: ${expression} should work\n */\nexport const zCommentWithExpressionPlaceholders = z.number().int();\n\n/**\n * Testing quotes in string: 'single quote''' and \"double quotes\"\"\" should work\n */\nexport const zCommentWithQuotes = z.number().int();\n\n/**\n * Testing reserved characters in string: * inline * and ** inline ** should work\n */\nexport const zCommentWithReservedCharacters = z.number().int();\n\n/**\n * This is a simple number\n */\nexport const zSimpleInteger = z.number().int();\n\n/**\n * This is a simple boolean\n */\nexport const zSimpleBoolean = z.boolean();\n\n/**\n * This is a simple string\n */\nexport const zSimpleString = z.string();\n\n/**\n * A string with non-ascii (unicode) characters valid in typescript identifiers (æøåÆØÅöÔèÈ字符串)\n */\nexport const zNonAsciiStringæøåÆøÅöôêÊ字符串 = z.string();\n\n/**\n * This is a simple file\n */\nexport const zSimpleFile = z.string();\n\n/**\n * This is a simple string\n */\nexport const zSimpleStringWithPattern = z.string().max(64).regex(/^[a-zA-Z0-9_]*$/).nullable();\n\n/**\n * This is a simple enum with strings\n */\nexport const zEnumWithStrings = z.enum([\n    'Success',\n    'Warning',\n    'Error',\n    '\\'Single Quote\\'',\n    '\"Double Quotes\"',\n    'Non-ascii: øæåôöØÆÅÔÖ字符串'\n]);\n\nexport const zEnumWithReplacedCharacters = z.union([\n    z.literal('\\'Single Quote\\''),\n    z.literal('\"Double Quotes\"'),\n    z.literal('øæåôöØÆÅÔÖ字符串'),\n    z.literal(3.1),\n    z.literal('')\n]);\n\n/**\n * This is a simple enum with numbers\n */\nexport const zEnumWithNumbers = z.union([\n    z.literal(1),\n    z.literal(2),\n    z.literal(3),\n    z.literal(1.1),\n    z.literal(1.2),\n    z.literal(1.3),\n    z.literal(100),\n    z.literal(200),\n    z.literal(300),\n    z.literal(-100),\n    z.literal(-200),\n    z.literal(-300),\n    z.literal(-1.1),\n    z.literal(-1.2),\n    z.literal(-1.3)\n]);\n\n/**\n * Success=1,Warning=2,Error=3\n */\nexport const zEnumFromDescription = z.number();\n\n/**\n * This is a simple enum with numbers\n */\nexport const zEnumWithExtensions = z.union([\n    z.literal(200),\n    z.literal(400),\n    z.literal(500)\n]);\n\nexport const zEnumWithXEnumNames = z.union([\n    z.literal(0),\n    z.literal(1),\n    z.literal(2)\n]);\n\n/**\n * This is a simple array with numbers\n */\nexport const zArrayWithNumbers = z.array(z.number().int());\n\n/**\n * This is a simple array with booleans\n */\nexport const zArrayWithBooleans = z.array(z.boolean());\n\n/**\n * This is a simple array with strings\n */\nexport const zArrayWithStrings = z.array(z.string()).default(['test']);\n\n/**\n * This is a simple array with properties\n */\nexport const zArrayWithProperties = z.array(z.object({\n    '16x16': zCamelCaseCommentWithBreaks.optional(),\n    bar: z.string().optional()\n}));\n\n/**\n * This is a simple array with any of properties\n */\nexport const zArrayWithAnyOfProperties = z.array(z.union([z.object({\n        foo: z.string().optional().default('test')\n    }), z.object({\n        bar: z.string().optional()\n    })]));\n\nexport const zAnyOfAnyAndNull = z.object({\n    data: z.unknown().optional()\n});\n\n/**\n * This is a simple array with any of properties\n */\nexport const zAnyOfArrays = z.object({\n    results: z.array(z.union([z.object({\n            foo: z.string().optional()\n        }), z.object({\n            bar: z.string().optional()\n        })])).optional()\n});\n\n/**\n * This is a string dictionary\n */\nexport const zDictionaryWithString = z.record(z.string());\n\nexport const zDictionaryWithPropertiesAndAdditionalProperties = z.object({\n    foo: z.number().optional(),\n    bar: z.boolean().optional()\n});\n\n/**\n * This is a string dictionary\n */\nexport const zDictionaryWithDictionary = z.record(z.record(z.string()));\n\n/**\n * This is a complex dictionary\n */\nexport const zDictionaryWithProperties = z.record(z.object({\n    foo: z.string().optional(),\n    bar: z.string().optional()\n}));\n\n/**\n * This is a model with one number property\n */\nexport const zModelWithInteger = z.object({\n    prop: z.number().int().optional()\n});\n\n/**\n * This is a model with one boolean property\n */\nexport const zModelWithBoolean = z.object({\n    prop: z.boolean().optional()\n});\n\n/**\n * This is a model with one string property\n */\nexport const zModelWithString = z.object({\n    prop: z.string().optional()\n});\n\n/**\n * This is a simple reference\n */\nexport const zSimpleReference = zModelWithString;\n\n/**\n * This is a simple array with references\n */\nexport const zArrayWithReferences = z.array(zModelWithString);\n\n/**\n * This is a simple array containing an array\n */\nexport const zArrayWithArray = z.array(z.array(zModelWithString));\n\n/**\n * This is a string reference\n */\nexport const zDictionaryWithReference = z.record(zModelWithString);\n\n/**\n * This is a complex dictionary\n */\nexport const zDictionaryWithArray = z.record(z.array(zModelWithString));\n\n/**\n * This is a model with one string property\n */\nexport const zModelWithStringError = z.object({\n    prop: z.string().optional()\n});\n\n/**\n * `Comment` or `VoiceComment`. The JSON object for adding voice comments to tickets is different. See [Adding voice comments to tickets](/documentation/ticketing/managing-tickets/adding-voice-comments-to-tickets)\n */\nexport const zModelFromZendesk = z.string();\n\n/**\n * This is a model with one string property\n */\nexport const zModelWithNullableString = z.object({\n    nullableProp1: z.string().nullish(),\n    nullableRequiredProp1: z.string().nullable(),\n    nullableProp2: z.string().nullish(),\n    nullableRequiredProp2: z.string().nullable(),\n    'foo_bar-enum': z.enum([\n        'Success',\n        'Warning',\n        'Error',\n        'ØÆÅ字符串'\n    ]).optional()\n});\n\n/**\n * This is a model with one enum\n */\nexport const zModelWithEnum = z.object({\n    'foo_bar-enum': z.enum([\n        'Success',\n        'Warning',\n        'Error',\n        'ØÆÅ字符串'\n    ]).optional(),\n    statusCode: z.enum([\n        '100',\n        '200 FOO',\n        '300 FOO_BAR',\n        '400 foo-bar',\n        '500 foo.bar',\n        '600 foo&bar'\n    ]).optional(),\n    bool: z.literal(true).optional()\n});\n\n/**\n * This is a model with one enum with escaped name\n */\nexport const zModelWithEnumWithHyphen = z.object({\n    'foo-bar-baz-qux': z.enum(['3.0']).optional()\n});\n\n/**\n * This is a model with one enum\n */\nexport const zModelWithEnumFromDescription = z.object({\n    test: z.number().int().optional()\n});\n\n/**\n * This is a model with nested enums\n */\nexport const zModelWithNestedEnums = z.object({\n    dictionaryWithEnum: z.record(z.enum([\n        'Success',\n        'Warning',\n        'Error'\n    ])).optional(),\n    dictionaryWithEnumFromDescription: z.record(z.number().int()).optional(),\n    arrayWithEnum: z.array(z.enum([\n        'Success',\n        'Warning',\n        'Error'\n    ])).optional(),\n    arrayWithDescription: z.array(z.number().int()).optional(),\n    'foo_bar-enum': z.enum([\n        'Success',\n        'Warning',\n        'Error',\n        'ØÆÅ字符串'\n    ]).optional()\n});\n\n/**\n * This is a model with one property containing an array\n */\nexport const zModelWithArray = z.object({\n    prop: z.array(zModelWithString).optional(),\n    propWithFile: z.array(z.string()).optional(),\n    propWithNumber: z.array(z.number()).optional()\n});\n\n/**\n * This is a model with one property containing a dictionary\n */\nexport const zModelWithDictionary = z.object({\n    prop: z.record(z.string()).optional()\n});\n\n/**\n * This is a deprecated model with a deprecated property\n *\n * @deprecated\n */\nexport const zDeprecatedModel = z.object({\n    prop: z.string().optional()\n});\n\n/**\n * This is a model with one property containing a circular reference\n */\nexport const zModelWithCircularReference: z.AnyZodObject = z.object({\n    prop: z.lazy(() => zModelWithCircularReference).optional()\n});\n\n/**\n * This is a model with one property with a 'one of' relationship\n */\nexport const zCompositionWithOneOf = z.object({\n    propA: z.union([\n        zModelWithString,\n        zModelWithEnum,\n        zModelWithArray,\n        zModelWithDictionary\n    ]).optional()\n});\n\n/**\n * This is a model with one property with a 'one of' relationship where the options are not $ref\n */\nexport const zCompositionWithOneOfAnonymous = z.object({\n    propA: z.union([\n        z.object({\n            propA: z.string().optional()\n        }),\n        z.string(),\n        z.number().int()\n    ]).optional()\n});\n\n/**\n * Circle\n */\nexport const zModelCircle = z.object({\n    kind: z.string(),\n    radius: z.number().optional()\n});\n\n/**\n * Square\n */\nexport const zModelSquare = z.object({\n    kind: z.string(),\n    sideLength: z.number().optional()\n});\n\n/**\n * This is a model with one property with a 'one of' relationship where the options are not $ref\n */\nexport const zCompositionWithOneOfDiscriminator = z.union([\n    z.object({\n        kind: z.literal('circle')\n    }).and(zModelCircle),\n    z.object({\n        kind: z.literal('square')\n    }).and(zModelSquare)\n]);\n\n/**\n * This is a model with one property with a 'any of' relationship\n */\nexport const zCompositionWithAnyOf = z.object({\n    propA: z.union([\n        zModelWithString,\n        zModelWithEnum,\n        zModelWithArray,\n        zModelWithDictionary\n    ]).optional()\n});\n\n/**\n * This is a model with one property with a 'any of' relationship where the options are not $ref\n */\nexport const zCompositionWithAnyOfAnonymous = z.object({\n    propA: z.union([\n        z.object({\n            propA: z.string().optional()\n        }),\n        z.string(),\n        z.number().int()\n    ]).optional()\n});\n\n/**\n * This is a model with nested 'any of' property with a type null\n */\nexport const zCompositionWithNestedAnyAndTypeNull = z.object({\n    propA: z.union([\n        z.array(zModelWithDictionary.nullable()),\n        z.array(zModelWithArray.nullable())\n    ]).optional()\n});\n\nexport const z3eNum1Период = z.enum(['Bird', 'Dog']);\n\nexport const zConstValue = z.enum(['ConstValue']);\n\n/**\n * This is a model with one property with a 'any of' relationship where the options are not $ref\n */\nexport const zCompositionWithNestedAnyOfAndNull = z.object({\n    propA: z.array(z.union([z3eNum1Период, zConstValue])).nullish()\n});\n\n/**\n * This is a model with one property with a 'one of' relationship\n */\nexport const zCompositionWithOneOfAndNullable = z.object({\n    propA: z.union([\n        z.object({\n            boolean: z.boolean().optional()\n        }),\n        zModelWithEnum,\n        zModelWithArray,\n        zModelWithDictionary\n    ]).nullish()\n});\n\n/**\n * This is a model that contains a simple dictionary within composition\n */\nexport const zCompositionWithOneOfAndSimpleDictionary = z.object({\n    propA: z.union([\n        z.boolean(),\n        z.record(z.number())\n    ]).optional()\n});\n\n/**\n * This is a model that contains a dictionary of simple arrays within composition\n */\nexport const zCompositionWithOneOfAndSimpleArrayDictionary = z.object({\n    propA: z.union([\n        z.boolean(),\n        z.record(z.array(z.boolean()))\n    ]).optional()\n});\n\n/**\n * This is a model that contains a dictionary of complex arrays (composited) within composition\n */\nexport const zCompositionWithOneOfAndComplexArrayDictionary = z.object({\n    propA: z.union([\n        z.boolean(),\n        z.record(z.array(z.union([z.number(), z.string()])))\n    ]).optional()\n});\n\n/**\n * This is a model with one property with a 'all of' relationship\n */\nexport const zCompositionWithAllOfAndNullable = z.object({\n    propA: z.object({\n        boolean: z.boolean().optional()\n    }).and(zModelWithEnum).and(zModelWithArray).and(zModelWithDictionary).nullish()\n});\n\n/**\n * This is a model with one property with a 'any of' relationship\n */\nexport const zCompositionWithAnyOfAndNullable = z.object({\n    propA: z.union([\n        z.object({\n            boolean: z.boolean().optional()\n        }),\n        zModelWithEnum,\n        zModelWithArray,\n        zModelWithDictionary\n    ]).nullish()\n});\n\n/**\n * This is a base model with two simple optional properties\n */\nexport const zCompositionBaseModel = z.object({\n    firstName: z.string().optional(),\n    lastname: z.string().optional()\n});\n\n/**\n * This is a model that extends the base model\n */\nexport const zCompositionExtendedModel = zCompositionBaseModel.and(z.object({\n    age: z.number(),\n    firstName: z.string(),\n    lastname: z.string()\n}));\n\n/**\n * This is a model with one nested property\n */\nexport const zModelWithProperties = z.object({\n    required: z.string(),\n    requiredAndReadOnly: z.string().readonly(),\n    requiredAndNullable: z.string().nullable(),\n    string: z.string().optional(),\n    number: z.number().optional(),\n    boolean: z.boolean().optional(),\n    reference: zModelWithString.optional(),\n    'property with space': z.string().optional(),\n    default: z.string().optional(),\n    try: z.string().optional(),\n    '@namespace.string': z.string().readonly().optional(),\n    '@namespace.integer': z.number().int().readonly().optional()\n});\n\n/**\n * This is a model with one property containing a reference\n */\nexport const zModelWithReference = z.object({\n    prop: zModelWithProperties.optional()\n});\n\n/**\n * This is a model with one nested property\n */\nexport const zModelWithNestedProperties = z.object({\n    first: z.object({\n        second: z.object({\n            third: z.string().readonly().nullable()\n        }).readonly().nullable()\n    }).readonly().nullable()\n});\n\n/**\n * This is a model with duplicated properties\n */\nexport const zModelWithDuplicateProperties = z.object({\n    prop: zModelWithString.optional()\n});\n\n/**\n * This is a model with ordered properties\n */\nexport const zModelWithOrderedProperties = z.object({\n    zebra: z.string().optional(),\n    apple: z.string().optional(),\n    hawaii: z.string().optional()\n});\n\n/**\n * This is a model with duplicated imports\n */\nexport const zModelWithDuplicateImports = z.object({\n    propA: zModelWithString.optional(),\n    propB: zModelWithString.optional(),\n    propC: zModelWithString.optional()\n});\n\n/**\n * This is a model that extends another model\n */\nexport const zModelThatExtends = zModelWithString.and(z.object({\n    propExtendsA: z.string().optional(),\n    propExtendsB: zModelWithString.optional()\n}));\n\n/**\n * This is a model that extends another model\n */\nexport const zModelThatExtendsExtends = zModelWithString.and(zModelThatExtends).and(z.object({\n    propExtendsC: z.string().optional(),\n    propExtendsD: zModelWithString.optional()\n}));\n\n/**\n * This is a model that contains a some patterns\n */\nexport const zModelWithPattern = z.object({\n    key: z.string().max(64).regex(/^[a-zA-Z0-9_]*$/),\n    name: z.string().max(255),\n    enabled: z.boolean().readonly().optional(),\n    modified: z.string().datetime().readonly().optional(),\n    id: z.string().regex(/^\\d{2}-\\d{3}-\\d{4}$/).optional(),\n    text: z.string().regex(/^\\w+$/).optional(),\n    patternWithSingleQuotes: z.string().regex(/^[a-zA-Z0-9']*$/).optional(),\n    patternWithNewline: z.string().regex(/aaa\\nbbb/).optional(),\n    patternWithBacktick: z.string().regex(/aaa`bbb/).optional(),\n    patternWithUnicode: z.string().regex(/^\\p{L}+$/u).optional()\n});\n\nexport const zFile = z.object({\n    id: z.string().min(1).readonly().optional(),\n    updated_at: z.string().datetime().readonly().optional(),\n    created_at: z.string().datetime().readonly().optional(),\n    mime: z.string().min(1).max(24),\n    file: z.string().url().readonly().optional()\n});\n\nexport const zDefault = z.object({\n    name: z.string().optional()\n});\n\nexport const zPageable = z.object({\n    page: z.number().int().gte(0).max(2147483647, { message: 'Invalid value: Expected int32 to be <= 2147483647' }).optional().default(0),\n    size: z.number().int().gte(1).max(2147483647, { message: 'Invalid value: Expected int32 to be <= 2147483647' }).optional(),\n    sort: z.array(z.string()).optional()\n});\n\n/**\n * This is a free-form object without additionalProperties.\n */\nexport const zFreeFormObjectWithoutAdditionalProperties = z.record(z.unknown());\n\n/**\n * This is a free-form object with additionalProperties: true.\n */\nexport const zFreeFormObjectWithAdditionalPropertiesEqTrue = z.record(z.unknown());\n\n/**\n * This is a free-form object with additionalProperties: {}.\n */\nexport const zFreeFormObjectWithAdditionalPropertiesEqEmptyObject = z.record(z.unknown());\n\nexport const zModelWithConst = z.object({\n    String: z.enum(['String']).optional(),\n    number: z.literal(0).optional(),\n    null: z.unknown().optional(),\n    withType: z.enum(['Some string']).optional()\n});\n\n/**\n * This is a model with one property and additionalProperties: true\n */\nexport const zModelWithAdditionalPropertiesEqTrue = z.object({\n    prop: z.string().optional()\n});\n\nexport const zNestedAnyOfArraysNullable = z.object({\n    nullableArray: z.array(z.union([z.string(), z.boolean()])).nullish()\n});\n\n/**\n * An object that can be null\n */\nexport const zNullableObject = z.object({\n    foo: z.string().optional()\n}).nullable().default(null);\n\n/**\n * Some % character\n */\nexport const zCharactersInDescription = z.string();\n\nexport const zModelWithNullableObject = z.object({\n    data: zNullableObject.optional()\n});\n\n/**\n * An object with additional properties that can be null\n */\nexport const zModelWithAdditionalPropertiesRef = z.record(zNullableObject.nullable());\n\nexport const zModelWithOneOfEnum = z.union([\n    z.object({\n        foo: z.enum(['Bar'])\n    }),\n    z.object({\n        foo: z.enum(['Baz'])\n    }),\n    z.object({\n        foo: z.enum(['Qux'])\n    }),\n    z.object({\n        content: z.string().datetime(),\n        foo: z.enum(['Quux'])\n    }),\n    z.object({\n        content: z.tuple([z.string().datetime(), z.string().datetime()]),\n        foo: z.enum(['Corge'])\n    })\n]);\n\nexport const zModelWithNestedArrayEnumsDataFoo = z.enum(['foo', 'bar']);\n\nexport const zModelWithNestedArrayEnumsDataBar = z.enum(['baz', 'qux']);\n\nexport const zModelWithNestedArrayEnumsData = z.object({\n    foo: z.array(zModelWithNestedArrayEnumsDataFoo).optional(),\n    bar: z.array(zModelWithNestedArrayEnumsDataBar).optional()\n});\n\nexport const zModelWithNestedArrayEnums = z.object({\n    array_strings: z.array(z.string()).optional(),\n    data: zModelWithNestedArrayEnumsData.optional()\n});\n\nexport const zModelWithNestedCompositionEnums = z.object({\n    foo: zModelWithNestedArrayEnumsDataFoo.optional()\n});\n\nexport const zModelWithReadOnlyAndWriteOnly = z.object({\n    foo: z.string(),\n    bar: z.string().readonly()\n});\n\n/**\n * This is a model with one property containing an array\n */\nexport const zModelWithArrayReadOnlyAndWriteOnly = z.object({\n    prop: z.array(zModelWithReadOnlyAndWriteOnly).optional(),\n    propWithFile: z.array(z.string()).optional(),\n    propWithNumber: z.array(z.number()).optional()\n});\n\nexport const zModelWithConstantSizeArray = z.tuple([z.number(), z.number()]);\n\nexport const zModelWithAnyOfConstantSizeArray = z.tuple([\n    z.union([\n        z.number(),\n        z.string()\n    ]),\n    z.union([\n        z.number(),\n        z.string()\n    ]),\n    z.union([\n        z.number(),\n        z.string()\n    ])\n]);\n\nexport const zModelWithPrefixItemsConstantSizeArray = z.array(z.union([\n    zModelWithInteger,\n    z.number(),\n    z.string()\n]));\n\nexport const zModelWithAnyOfConstantSizeArrayNullable = z.tuple([\n    z.union([\n        z.number(),\n        z.string()\n    ]).nullable(),\n    z.union([\n        z.number(),\n        z.string()\n    ]).nullable(),\n    z.union([\n        z.number(),\n        z.string()\n    ]).nullable()\n]);\n\nexport const zModelWithAnyOfConstantSizeArrayAndIntersect = z.tuple([z.intersection(z.number(), z.string()), z.intersection(z.number(), z.string())]);\n\nexport const zModelWithNumericEnumUnion = z.object({\n    value: z.union([\n        z.literal(-10),\n        z.literal(-1),\n        z.literal(0),\n        z.literal(1),\n        z.literal(3),\n        z.literal(6),\n        z.literal(12)\n    ]).optional()\n});\n\n/**\n * Some description with `back ticks`\n */\nexport const zModelWithBackticksInDescription = z.object({\n    template: z.string().optional()\n});\n\n/**\n * Model used to test deduplication strategy (unused)\n */\nexport const zParameterSimpleParameterUnused = z.string();\n\n/**\n * Model used to test deduplication strategy\n */\nexport const zPostServiceWithEmptyTagResponse = z.string();\n\n/**\n * Model used to test deduplication strategy\n */\nexport const zPostServiceWithEmptyTagResponse2 = z.string();\n\n/**\n * Model used to test deduplication strategy\n */\nexport const zDeleteFooData = z.string();\n\n/**\n * Model used to test deduplication strategy\n */\nexport const zDeleteFooData2 = z.string();\n\n/**\n * Model with restricted keyword name\n */\nexport const zImport = z.string();\n\nexport const zModelWithAnyOfConstantSizeArrayWithNSizeAndOptions = z.tuple([z.union([\n        z.number(),\n        zImport\n    ]), z.union([\n        z.number(),\n        zImport\n    ])]);\n\nexport const zSchemaWithFormRestrictedKeys = z.object({\n    description: z.string().optional(),\n    'x-enum-descriptions': z.string().optional(),\n    'x-enum-varnames': z.string().optional(),\n    'x-enumNames': z.string().optional(),\n    title: z.string().optional(),\n    object: z.object({\n        description: z.string().optional(),\n        'x-enum-descriptions': z.string().optional(),\n        'x-enum-varnames': z.string().optional(),\n        'x-enumNames': z.string().optional(),\n        title: z.string().optional()\n    }).optional(),\n    array: z.array(z.object({\n        description: z.string().optional(),\n        'x-enum-descriptions': z.string().optional(),\n        'x-enum-varnames': z.string().optional(),\n        'x-enumNames': z.string().optional(),\n        title: z.string().optional()\n    })).optional()\n});\n\n/**\n * This schema was giving PascalCase transformations a hard time\n */\nexport const zIoK8sApimachineryPkgApisMetaV1Preconditions = z.object({\n    resourceVersion: z.string().optional(),\n    uid: z.string().optional()\n});\n\n/**\n * This schema was giving PascalCase transformations a hard time\n */\nexport const zIoK8sApimachineryPkgApisMetaV1DeleteOptions = z.object({\n    preconditions: zIoK8sApimachineryPkgApisMetaV1Preconditions.optional()\n});\n\nexport const zAdditionalPropertiesUnknownIssue = z.record(z.union([\n    z.string(),\n    z.number()\n]));\n\nexport const zAdditionalPropertiesUnknownIssue2 = z.record(z.union([\n    z.string(),\n    z.number()\n]));\n\nexport const zAdditionalPropertiesUnknownIssue3 = z.intersection(z.string(), z.object({\n    entries: z.record(zAdditionalPropertiesUnknownIssue)\n}));\n\nexport const zAdditionalPropertiesIntegerIssue = z.object({\n    value: z.number().int()\n});\n\nexport const zGenericSchemaDuplicateIssue1SystemBoolean = z.object({\n    item: z.boolean().optional(),\n    error: z.string().nullish(),\n    hasError: z.boolean().readonly().optional(),\n    data: z.record(z.never()).optional()\n});\n\nexport const zGenericSchemaDuplicateIssue1SystemString = z.object({\n    item: z.string().nullish(),\n    error: z.string().nullish(),\n    hasError: z.boolean().readonly().optional()\n});\n\nexport const zOneOfAllOfIssue = z.union([\n    z.intersection(z.union([\n        zConstValue,\n        zGenericSchemaDuplicateIssue1SystemBoolean\n    ]), z3eNum1Период),\n    zGenericSchemaDuplicateIssue1SystemString\n]);\n\nexport const zExternalSharedModel = z.object({\n    id: z.string(),\n    name: z.string().optional()\n});\n\nexport const zExternalRefA = zExternalSharedModel;\n\nexport const zExternalRefB = zExternalSharedModel;\n\n/**\n * This is a model with one nested property\n */\nexport const zModelWithPropertiesWritable = z.object({\n    required: z.string(),\n    requiredAndNullable: z.string().nullable(),\n    string: z.string().optional(),\n    number: z.number().optional(),\n    boolean: z.boolean().optional(),\n    reference: zModelWithString.optional(),\n    'property with space': z.string().optional(),\n    default: z.string().optional(),\n    try: z.string().optional()\n});\n\n/**\n * This is a model with one property containing a reference\n */\nexport const zModelWithReferenceWritable = z.object({\n    prop: zModelWithPropertiesWritable.optional()\n});\n\n/**\n * This is a model that contains a some patterns\n */\nexport const zModelWithPatternWritable = z.object({\n    key: z.string().max(64).regex(/^[a-zA-Z0-9_]*$/),\n    name: z.string().max(255),\n    id: z.string().regex(/^\\d{2}-\\d{3}-\\d{4}$/).optional(),\n    text: z.string().regex(/^\\w+$/).optional(),\n    patternWithSingleQuotes: z.string().regex(/^[a-zA-Z0-9']*$/).optional(),\n    patternWithNewline: z.string().regex(/aaa\\nbbb/).optional(),\n    patternWithBacktick: z.string().regex(/aaa`bbb/).optional(),\n    patternWithUnicode: z.string().regex(/^\\p{L}+$/u).optional()\n});\n\nexport const zFileWritable = z.object({\n    mime: z.string().min(1).max(24)\n});\n\nexport const zModelWithReadOnlyAndWriteOnlyWritable = z.object({\n    foo: z.string(),\n    baz: z.string()\n});\n\n/**\n * This is a model with one property containing an array\n */\nexport const zModelWithArrayReadOnlyAndWriteOnlyWritable = z.object({\n    prop: z.array(zModelWithReadOnlyAndWriteOnlyWritable).optional(),\n    propWithFile: z.array(z.string()).optional(),\n    propWithNumber: z.array(z.number()).optional()\n});\n\nexport const zModelWithAnyOfConstantSizeArrayWithNSizeAndOptionsWritable = z.tuple([z.union([\n        z.number(),\n        zImport\n    ]), z.union([\n        z.number(),\n        zImport\n    ])]);\n\nexport const zAdditionalPropertiesUnknownIssueWritable = z.record(z.union([\n    z.string(),\n    z.number()\n]));\n\nexport const zOneOfAllOfIssueWritable = z.union([\n    z.intersection(z.union([\n        zConstValue,\n        zGenericSchemaDuplicateIssue1SystemBoolean\n    ]), z3eNum1Период),\n    zGenericSchemaDuplicateIssue1SystemString\n]);\n\nexport const zGenericSchemaDuplicateIssue1SystemBooleanWritable = z.object({\n    item: z.boolean().optional(),\n    error: z.string().nullish(),\n    data: z.record(z.never()).optional()\n});\n\nexport const zGenericSchemaDuplicateIssue1SystemStringWritable = z.object({\n    item: z.string().nullish(),\n    error: z.string().nullish()\n});\n\n/**\n * This is a reusable parameter\n */\nexport const zSimpleParameter = z.string();\n\nexport const zCompositionWithOneOfAndProperties = z.intersection(z.union([\n    z.object({\n        foo: zSimpleParameter\n    }),\n    z.object({\n        bar: zNonAsciiStringæøåÆøÅöôêÊ字符串\n    })\n]), z.object({\n    baz: z.number().int().gte(0).max(65535, { message: 'Invalid value: Expected uint16 to be <= 65535' }).nullable(),\n    qux: z.number().int().gte(0).max(255, { message: 'Invalid value: Expected uint8 to be <= 255' })\n}));\n\nexport const zModelWithOneOfAndProperties = z.intersection(z.union([\n    zSimpleParameter,\n    zNonAsciiStringæøåÆøÅöôêÊ字符串\n]), z.object({\n    baz: z.number().int().gte(0).max(65535, { message: 'Invalid value: Expected uint16 to be <= 65535' }).nullable(),\n    qux: z.number().int().gte(0).max(255, { message: 'Invalid value: Expected uint8 to be <= 255' })\n}));\n\n/**\n * Parameter with illegal characters\n */\nexport const zXFooBar = zModelWithString;\n\nexport const zSimpleRequestBody = zModelWithString;\n\nexport const zSimpleFormData = zModelWithString;\n\nexport const zExportData = z.object({\n    body: z.never().optional(),\n    path: z.never().optional(),\n    query: z.never().optional()\n});\n\nexport const zPatchApiVbyApiVersionNoTagData = z.object({\n    body: z.never().optional(),\n    path: z.never().optional(),\n    query: z.never().optional()\n});\n\nexport const zImportData = z.object({\n    body: z.union([\n        zModelWithReadOnlyAndWriteOnlyWritable,\n        zModelWithArrayReadOnlyAndWriteOnlyWritable\n    ]),\n    path: z.never().optional(),\n    query: z.never().optional()\n});\n\nexport const zImportResponse = z.union([\n    zModelFromZendesk,\n    zModelWithReadOnlyAndWriteOnly\n]);\n\nexport const zFooWowData = z.object({\n    body: z.never().optional(),\n    path: z.never().optional(),\n    query: z.never().optional()\n});\n\nexport const zApiVVersionODataControllerCountData = z.object({\n    body: z.never().optional(),\n    path: z.never().optional(),\n    query: z.never().optional()\n});\n\n/**\n * Success\n */\nexport const zApiVVersionODataControllerCountResponse = zModelFromZendesk;\n\nexport const zGetApiVbyApiVersionSimpleOperationData = z.object({\n    body: z.never().optional(),\n    path: z.object({\n        foo_param: z.string()\n    }),\n    query: z.never().optional()\n});\n\n/**\n * Response is a simple number\n */\nexport const zGetApiVbyApiVersionSimpleOperationResponse = z.number();\n\nexport const zDeleteCallWithoutParametersAndResponseData = z.object({\n    body: z.never().optional(),\n    path: z.never().optional(),\n    query: z.never().optional()\n});\n\nexport const zGetCallWithoutParametersAndResponseData = z.object({\n    body: z.never().optional(),\n    path: z.never().optional(),\n    query: z.never().optional()\n});\n\nexport const zHeadCallWithoutParametersAndResponseData = z.object({\n    body: z.never().optional(),\n    path: z.never().optional(),\n    query: z.never().optional()\n});\n\nexport const zOptionsCallWithoutParametersAndResponseData = z.object({\n    body: z.never().optional(),\n    path: z.never().optional(),\n    query: z.never().optional()\n});\n\nexport const zPatchCallWithoutParametersAndResponseData = z.object({\n    body: z.never().optional(),\n    path: z.never().optional(),\n    query: z.never().optional()\n});\n\nexport const zPostCallWithoutParametersAndResponseData = z.object({\n    body: z.never().optional(),\n    path: z.never().optional(),\n    query: z.never().optional()\n});\n\nexport const zPutCallWithoutParametersAndResponseData = z.object({\n    body: z.never().optional(),\n    path: z.never().optional(),\n    query: z.never().optional()\n});\n\nexport const zDeleteFooData3 = z.object({\n    body: z.never().optional(),\n    path: z.object({\n        foo_param: z.string(),\n        BarParam: z.string()\n    }),\n    query: z.never().optional(),\n    headers: z.object({\n        'x-Foo-Bar': zModelWithString\n    })\n});\n\nexport const zCallWithDescriptionsData = z.object({\n    body: z.never().optional(),\n    path: z.never().optional(),\n    query: z.object({\n        parameterWithBreaks: z.string().optional(),\n        parameterWithBackticks: z.string().optional(),\n        parameterWithSlashes: z.string().optional(),\n        parameterWithExpressionPlaceholders: z.string().optional(),\n        parameterWithQuotes: z.string().optional(),\n        parameterWithReservedCharacters: z.string().optional()\n    }).optional()\n});\n\nexport const zDeprecatedCallData = z.object({\n    body: z.never().optional(),\n    path: z.never().optional(),\n    query: z.never().optional(),\n    headers: z.object({\n        parameter: zDeprecatedModel.nullable()\n    })\n});\n\nexport const zCallWithParametersData = z.object({\n    body: z.record(z.unknown()).nullable(),\n    path: z.object({\n        parameterPath: z.string().nullable(),\n        'api-version': z.string().nullable()\n    }),\n    query: z.object({\n        foo_ref_enum: zModelWithNestedArrayEnumsDataFoo.optional(),\n        foo_all_of_enum: zModelWithNestedArrayEnumsDataFoo,\n        cursor: z.string().nullable()\n    }),\n    headers: z.object({\n        parameterHeader: z.string().nullable()\n    })\n});\n\nexport const zCallWithWeirdParameterNamesData = z.object({\n    body: zModelWithString.nullable(),\n    path: z.object({\n        'parameter.path.1': z.string().optional(),\n        'parameter-path-2': z.string().optional(),\n        'PARAMETER-PATH-3': z.string().optional(),\n        'api-version': z.string().nullable()\n    }),\n    query: z.object({\n        default: z.string().optional(),\n        'parameter-query': z.string().nullable()\n    }),\n    headers: z.object({\n        'parameter.header': z.string().nullable()\n    })\n});\n\nexport const zGetCallWithOptionalParamData = z.object({\n    body: zModelWithOneOfEnum,\n    path: z.never().optional(),\n    query: z.object({\n        page: z.number().optional()\n    }).optional()\n});\n\nexport const zPostCallWithOptionalParamData = z.object({\n    body: z.object({\n        offset: z.number().nullish()\n    }).optional(),\n    path: z.never().optional(),\n    query: z.object({\n        parameter: zPageable\n    })\n});\n\nexport const zPostCallWithOptionalParamResponse = z.union([\n    z.number(),\n    z.void()\n]);\n\nexport const zPostApiVbyApiVersionRequestBodyData = z.object({\n    body: zSimpleRequestBody.optional(),\n    path: z.never().optional(),\n    query: z.object({\n        parameter: z.string().optional()\n    }).optional()\n});\n\nexport const zPostApiVbyApiVersionFormDataData = z.object({\n    body: zSimpleFormData.optional(),\n    path: z.never().optional(),\n    query: z.object({\n        parameter: z.string().optional()\n    }).optional()\n});\n\nexport const zCallWithDefaultParametersData = z.object({\n    body: z.never().optional(),\n    path: z.never().optional(),\n    query: z.object({\n        parameterString: z.string().nullish().default('Hello World!'),\n        parameterNumber: z.number().nullish().default(123),\n        parameterBoolean: z.boolean().nullish().default(true),\n        parameterEnum: z.enum([\n            'Success',\n            'Warning',\n            'Error'\n        ]).optional(),\n        parameterModel: zModelWithString.nullish()\n    }).optional()\n});\n\nexport const zCallWithDefaultOptionalParametersData = z.object({\n    body: z.never().optional(),\n    path: z.never().optional(),\n    query: z.object({\n        parameterString: z.string().optional().default('Hello World!'),\n        parameterNumber: z.number().optional().default(123),\n        parameterBoolean: z.boolean().optional().default(true),\n        parameterEnum: z.enum([\n            'Success',\n            'Warning',\n            'Error'\n        ]).optional(),\n        parameterModel: zModelWithString.optional()\n    }).optional()\n});\n\nexport const zCallToTestOrderOfParamsData = z.object({\n    body: z.never().optional(),\n    path: z.never().optional(),\n    query: z.object({\n        parameterOptionalStringWithDefault: z.string().optional().default('Hello World!'),\n        parameterOptionalStringWithEmptyDefault: z.string().optional().default(''),\n        parameterOptionalStringWithNoDefault: z.string().optional(),\n        parameterStringWithDefault: z.string().default('Hello World!'),\n        parameterStringWithEmptyDefault: z.string().default(''),\n        parameterStringWithNoDefault: z.string(),\n        parameterStringNullableWithNoDefault: z.string().nullish(),\n        parameterStringNullableWithDefault: z.string().nullish().default(null)\n    })\n});\n\nexport const zDuplicateNameData = z.object({\n    body: z.never().optional(),\n    path: z.never().optional(),\n    query: z.never().optional()\n});\n\nexport const zDuplicateName2Data = z.object({\n    body: z.never().optional(),\n    path: z.never().optional(),\n    query: z.never().optional()\n});\n\nexport const zDuplicateName3Data = z.object({\n    body: z.never().optional(),\n    path: z.never().optional(),\n    query: z.never().optional()\n});\n\nexport const zDuplicateName4Data = z.object({\n    body: z.never().optional(),\n    path: z.never().optional(),\n    query: z.never().optional()\n});\n\nexport const zCallWithNoContentResponseData = z.object({\n    body: z.never().optional(),\n    path: z.never().optional(),\n    query: z.never().optional()\n});\n\n/**\n * Success\n */\nexport const zCallWithNoContentResponseResponse = z.void();\n\nexport const zCallWithResponseAndNoContentResponseData = z.object({\n    body: z.never().optional(),\n    path: z.never().optional(),\n    query: z.never().optional()\n});\n\nexport const zCallWithResponseAndNoContentResponseResponse = z.union([\n    z.number(),\n    z.void()\n]);\n\nexport const zDummyAData = z.object({\n    body: z.never().optional(),\n    path: z.never().optional(),\n    query: z.never().optional()\n});\n\nexport const zDummyAResponse = z400;\n\nexport const zDummyBData = z.object({\n    body: z.never().optional(),\n    path: z.never().optional(),\n    query: z.never().optional()\n});\n\n/**\n * Success\n */\nexport const zDummyBResponse = z.void();\n\nexport const zCallWithResponseData = z.object({\n    body: z.never().optional(),\n    path: z.never().optional(),\n    query: z.never().optional()\n});\n\nexport const zCallWithResponseResponse = zImport;\n\nexport const zCallWithDuplicateResponsesData = z.object({\n    body: z.never().optional(),\n    path: z.never().optional(),\n    query: z.never().optional()\n});\n\nexport const zCallWithDuplicateResponsesResponse = z.union([\n    zModelWithBoolean.and(zModelWithInteger),\n    zModelWithString\n]);\n\nexport const zCallWithResponsesData = z.object({\n    body: z.never().optional(),\n    path: z.never().optional(),\n    query: z.never().optional()\n});\n\nexport const zCallWithResponsesResponse = z.union([\n    z.object({\n        '@namespace.string': z.string().readonly().optional(),\n        '@namespace.integer': z.number().int().readonly().optional(),\n        value: z.array(zModelWithString).readonly().optional()\n    }),\n    zModelThatExtends,\n    zModelThatExtendsExtends\n]);\n\nexport const zCollectionFormatData = z.object({\n    body: z.never().optional(),\n    path: z.never().optional(),\n    query: z.object({\n        parameterArrayCSV: z.array(z.string()).nullable(),\n        parameterArraySSV: z.array(z.string()).nullable(),\n        parameterArrayTSV: z.array(z.string()).nullable(),\n        parameterArrayPipes: z.array(z.string()).nullable(),\n        parameterArrayMulti: z.array(z.string()).nullable()\n    })\n});\n\nexport const zTypesData = z.object({\n    body: z.never().optional(),\n    path: z.object({\n        id: z.number().int().min(-2147483648, { message: 'Invalid value: Expected int32 to be >= -2147483648' }).max(2147483647, { message: 'Invalid value: Expected int32 to be <= 2147483647' }).optional()\n    }).optional(),\n    query: z.object({\n        parameterNumber: z.number().default(123),\n        parameterString: z.string().nullable().default('default'),\n        parameterBoolean: z.boolean().nullable().default(true),\n        parameterObject: z.record(z.unknown()).nullable().default(null),\n        parameterArray: z.array(z.string()).nullable(),\n        parameterDictionary: z.record(z.unknown()).nullable(),\n        parameterEnum: z.enum([\n            'Success',\n            'Warning',\n            'Error'\n        ])\n    })\n});\n\nexport const zTypesResponse = z.union([\n    z.number(),\n    z.string(),\n    z.boolean(),\n    z.record(z.unknown())\n]);\n\nexport const zUploadFileData = z.object({\n    body: z.string(),\n    path: z.object({\n        'api-version': z.string().nullable()\n    }),\n    query: z.never().optional()\n});\n\nexport const zUploadFileResponse = z.boolean();\n\nexport const zFileResponseData = z.object({\n    body: z.never().optional(),\n    path: z.object({\n        id: z.string(),\n        'api-version': z.string()\n    }),\n    query: z.never().optional()\n});\n\n/**\n * Success\n */\nexport const zFileResponseResponse = z.string();\n\nexport const zComplexTypesData = z.object({\n    body: z.never().optional(),\n    path: z.never().optional(),\n    query: z.object({\n        parameterObject: z.object({\n            first: z.object({\n                second: z.object({\n                    third: z.string().optional()\n                }).optional()\n            }).optional()\n        }),\n        parameterReference: zModelWithString\n    })\n});\n\n/**\n * Successful response\n */\nexport const zComplexTypesResponse = z.array(zModelWithString);\n\nexport const zMultipartResponseData = z.object({\n    body: z.never().optional(),\n    path: z.never().optional(),\n    query: z.never().optional()\n});\n\n/**\n * OK\n */\nexport const zMultipartResponseResponse = z.object({\n    file: z.string().optional(),\n    metadata: z.object({\n        foo: z.string().optional(),\n        bar: z.string().optional()\n    }).optional()\n});\n\nexport const zMultipartRequestData = z.object({\n    body: z.object({\n        content: z.string().optional(),\n        data: zModelWithString.nullish()\n    }).optional(),\n    path: z.never().optional(),\n    query: z.never().optional()\n});\n\nexport const zComplexParamsData = z.object({\n    body: z.object({\n        key: z.string().max(64).regex(/^[a-zA-Z0-9_]*$/).readonly().nullable(),\n        name: z.string().max(255).nullable(),\n        enabled: z.boolean().optional().default(true),\n        type: z.enum([\n            'Monkey',\n            'Horse',\n            'Bird'\n        ]),\n        listOfModels: z.array(zModelWithString).nullish(),\n        listOfStrings: z.array(z.string()).nullish(),\n        parameters: z.union([\n            zModelWithString,\n            zModelWithEnum,\n            zModelWithArray,\n            zModelWithDictionary\n        ]),\n        user: z.object({\n            id: z.number().int().min(-2147483648, { message: 'Invalid value: Expected int32 to be >= -2147483648' }).max(2147483647, { message: 'Invalid value: Expected int32 to be <= 2147483647' }).readonly().optional(),\n            name: z.string().readonly().nullish()\n        }).readonly().optional()\n    }).optional(),\n    path: z.object({\n        id: z.number().int().min(-2147483648, { message: 'Invalid value: Expected int32 to be >= -2147483648' }).max(2147483647, { message: 'Invalid value: Expected int32 to be <= 2147483647' }),\n        'api-version': z.string()\n    }),\n    query: z.never().optional()\n});\n\n/**\n * Success\n */\nexport const zComplexParamsResponse = zModelWithString;\n\nexport const zCallWithResultFromHeaderData = z.object({\n    body: z.never().optional(),\n    path: z.never().optional(),\n    query: z.never().optional()\n});\n\nexport const zTestErrorCodeData = z.object({\n    body: z.never().optional(),\n    path: z.never().optional(),\n    query: z.object({\n        status: z.number().int()\n    })\n});\n\nexport const zNonAsciiæøåÆøÅöôêÊ字符串Data = z.object({\n    body: z.never().optional(),\n    path: z.never().optional(),\n    query: z.object({\n        nonAsciiParamæøåÆØÅöôêÊ: z.number().int()\n    })\n});\n\n/**\n * Successful response\n */\nexport const zNonAsciiæøåÆøÅöôêÊ字符串Response = z.array(zNonAsciiStringæøåÆøÅöôêÊ字符串);\n\nexport const zPutWithFormUrlEncodedData = z.object({\n    body: zArrayWithStrings,\n    path: z.never().optional(),\n    query: z.never().optional()\n});\n"
  },
  {
    "path": "packages/openapi-ts-tests/zod/v3/__snapshots__/3.0.x/v3/enum-null/zod.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport { z } from 'zod';\n\nexport const zFoo = z.enum(['foo', 'bar']).nullable();\n\nexport const zBar = z.enum(['foo', 'bar']);\n\nexport const zBaz = z.enum(['foo', 'bar']);\n"
  },
  {
    "path": "packages/openapi-ts-tests/zod/v3/__snapshots__/3.0.x/v3/type-format/zod.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport { z } from 'zod';\n\nexport const zFoo = z.object({\n    bar: z.number().int().optional(),\n    foo: z.coerce.bigint().min(BigInt('-9223372036854775808'), { message: 'Invalid value: Expected int64 to be >= -9223372036854775808' }).max(BigInt('9223372036854775807'), { message: 'Invalid value: Expected int64 to be <= 9223372036854775807' }).default(BigInt(0)),\n    id: z.string()\n});\n\nexport const zBar = z.object({\n    foo: z.number().int()\n});\n\nexport const zPostFooData = z.object({\n    body: z.never().optional(),\n    path: z.never().optional(),\n    query: z.never().optional()\n});\n\n/**\n * OK\n */\nexport const zPostFooResponse = zFoo;\n"
  },
  {
    "path": "packages/openapi-ts-tests/zod/v3/__snapshots__/3.0.x/v3/validators/zod.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport { z } from 'zod';\n\nexport const zBaz = z.string().regex(/foo\\nbar/).readonly().default('baz');\n\nexport const zFoo: z.ZodTypeAny = z.object({\n    foo: z.string().regex(/^\\d{3}-\\d{2}-\\d{4}$/).optional(),\n    bar: z.lazy(() => zBar).optional(),\n    baz: z.array(z.lazy(() => zFoo)).optional(),\n    qux: z.number().int().gt(0).optional().default(0)\n}).nullable().default(null);\n\nexport const zBar = z.object({\n    foo: zFoo.optional()\n});\n"
  },
  {
    "path": "packages/openapi-ts-tests/zod/v3/__snapshots__/3.0.x/v4/array-items-all-of/zod.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport * as z from 'zod/v4';\n\nexport const zArrayWithAllOfObjects = z.array(z.object({\n    id: z.int().optional()\n}).and(z.object({\n    name: z.string().optional()\n})));\n\nexport const zArrayWithAllOfPrimitives = z.array(z.intersection(z.number(), z.string()));\n\nexport const zBaseModel = z.object({\n    id: z.int().optional(),\n    createdAt: z.iso.datetime().optional()\n});\n\nexport const zArrayWithAllOfRefs = z.array(zBaseModel.and(z.object({\n    extra: z.string().optional()\n})));\n"
  },
  {
    "path": "packages/openapi-ts-tests/zod/v3/__snapshots__/3.0.x/v4/array-items-one-of-length-1/zod.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport * as z from 'zod/v4';\n\nexport const zBar = z.string();\n\nexport const zFoo = z.object({\n    foo: z.array(zBar).min(1).max(2147483647).optional()\n});\n"
  },
  {
    "path": "packages/openapi-ts-tests/zod/v3/__snapshots__/3.0.x/v4/circular/zod.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport * as z from 'zod/v4';\n\nexport const zFoo = z.object({\n    quux: z.lazy((): any => zQuux).optional()\n});\n\nexport const zBar = z.object({\n    bar: z.lazy((): any => zBar).optional(),\n    baz: z.lazy((): any => zBaz).optional()\n});\n\nexport const zBaz = z.object({\n    quux: z.lazy((): any => zQuux).optional()\n});\n\nexport const zQux = z.union([\n    z.object({\n        type: z.literal('struct')\n    }).and(z.lazy(() => z.lazy((): any => zCorge))),\n    z.object({\n        type: z.literal('array')\n    }).and(zFoo)\n]);\n\nexport const zQuux = z.object({\n    qux: zQux.optional()\n});\n\nexport const zCorge = z.object({\n    baz: z.array(zBaz).optional()\n});\n"
  },
  {
    "path": "packages/openapi-ts-tests/zod/v3/__snapshots__/3.0.x/v4/default/zod.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport * as z from 'zod/v4';\n\n/**\n * Model with number-only name\n */\nexport const z400 = z.string();\n\n/**\n * Testing multiline comments in string: First line\n * Second line\n *\n * Fourth line\n */\nexport const zCamelCaseCommentWithBreaks = z.int();\n\n/**\n * Testing multiline comments in string: First line\n * Second line\n *\n * Fourth line\n */\nexport const zCommentWithBreaks = z.int();\n\n/**\n * Testing backticks in string: `backticks` and ```multiple backticks``` should work\n */\nexport const zCommentWithBackticks = z.int();\n\n/**\n * Testing backticks and quotes in string: `backticks`, 'quotes', \"double quotes\" and ```multiple backticks``` should work\n */\nexport const zCommentWithBackticksAndQuotes = z.int();\n\n/**\n * Testing slashes in string: \\backwards\\\\\\ and /forwards/// should work\n */\nexport const zCommentWithSlashes = z.int();\n\n/**\n * Testing expression placeholders in string: ${expression} should work\n */\nexport const zCommentWithExpressionPlaceholders = z.int();\n\n/**\n * Testing quotes in string: 'single quote''' and \"double quotes\"\"\" should work\n */\nexport const zCommentWithQuotes = z.int();\n\n/**\n * Testing reserved characters in string: * inline * and ** inline ** should work\n */\nexport const zCommentWithReservedCharacters = z.int();\n\n/**\n * This is a simple number\n */\nexport const zSimpleInteger = z.int();\n\n/**\n * This is a simple boolean\n */\nexport const zSimpleBoolean = z.boolean();\n\n/**\n * This is a simple string\n */\nexport const zSimpleString = z.string();\n\n/**\n * A string with non-ascii (unicode) characters valid in typescript identifiers (æøåÆØÅöÔèÈ字符串)\n */\nexport const zNonAsciiStringæøåÆøÅöôêÊ字符串 = z.string();\n\n/**\n * This is a simple file\n */\nexport const zSimpleFile = z.string();\n\n/**\n * This is a simple string\n */\nexport const zSimpleStringWithPattern = z.string().max(64).regex(/^[a-zA-Z0-9_]*$/).nullable();\n\n/**\n * This is a simple enum with strings\n */\nexport const zEnumWithStrings = z.enum([\n    'Success',\n    'Warning',\n    'Error',\n    '\\'Single Quote\\'',\n    '\"Double Quotes\"',\n    'Non-ascii: øæåôöØÆÅÔÖ字符串'\n]);\n\nexport const zEnumWithReplacedCharacters = z.union([\n    z.literal('\\'Single Quote\\''),\n    z.literal('\"Double Quotes\"'),\n    z.literal('øæåôöØÆÅÔÖ字符串'),\n    z.literal(3.1),\n    z.literal('')\n]);\n\n/**\n * This is a simple enum with numbers\n */\nexport const zEnumWithNumbers = z.union([\n    z.literal(1),\n    z.literal(2),\n    z.literal(3),\n    z.literal(1.1),\n    z.literal(1.2),\n    z.literal(1.3),\n    z.literal(100),\n    z.literal(200),\n    z.literal(300),\n    z.literal(-100),\n    z.literal(-200),\n    z.literal(-300),\n    z.literal(-1.1),\n    z.literal(-1.2),\n    z.literal(-1.3)\n]);\n\n/**\n * Success=1,Warning=2,Error=3\n */\nexport const zEnumFromDescription = z.number();\n\n/**\n * This is a simple enum with numbers\n */\nexport const zEnumWithExtensions = z.union([\n    z.literal(200),\n    z.literal(400),\n    z.literal(500)\n]);\n\nexport const zEnumWithXEnumNames = z.union([\n    z.literal(0),\n    z.literal(1),\n    z.literal(2)\n]);\n\n/**\n * This is a simple array with numbers\n */\nexport const zArrayWithNumbers = z.array(z.int());\n\n/**\n * This is a simple array with booleans\n */\nexport const zArrayWithBooleans = z.array(z.boolean());\n\n/**\n * This is a simple array with strings\n */\nexport const zArrayWithStrings = z.array(z.string()).default(['test']);\n\n/**\n * This is a simple array with properties\n */\nexport const zArrayWithProperties = z.array(z.object({\n    '16x16': zCamelCaseCommentWithBreaks.optional(),\n    bar: z.string().optional()\n}));\n\n/**\n * This is a simple array with any of properties\n */\nexport const zArrayWithAnyOfProperties = z.array(z.union([z.object({\n        foo: z.string().optional().default('test')\n    }), z.object({\n        bar: z.string().optional()\n    })]));\n\nexport const zAnyOfAnyAndNull = z.object({\n    data: z.unknown().optional()\n});\n\n/**\n * This is a simple array with any of properties\n */\nexport const zAnyOfArrays = z.object({\n    results: z.array(z.union([z.object({\n            foo: z.string().optional()\n        }), z.object({\n            bar: z.string().optional()\n        })])).optional()\n});\n\n/**\n * This is a string dictionary\n */\nexport const zDictionaryWithString = z.record(z.string(), z.string());\n\nexport const zDictionaryWithPropertiesAndAdditionalProperties = z.object({\n    foo: z.number().optional(),\n    bar: z.boolean().optional()\n});\n\n/**\n * This is a string dictionary\n */\nexport const zDictionaryWithDictionary = z.record(z.string(), z.record(z.string(), z.string()));\n\n/**\n * This is a complex dictionary\n */\nexport const zDictionaryWithProperties = z.record(z.string(), z.object({\n    foo: z.string().optional(),\n    bar: z.string().optional()\n}));\n\n/**\n * This is a model with one number property\n */\nexport const zModelWithInteger = z.object({\n    prop: z.int().optional()\n});\n\n/**\n * This is a model with one boolean property\n */\nexport const zModelWithBoolean = z.object({\n    prop: z.boolean().optional()\n});\n\n/**\n * This is a model with one string property\n */\nexport const zModelWithString = z.object({\n    prop: z.string().optional()\n});\n\n/**\n * This is a simple reference\n */\nexport const zSimpleReference = zModelWithString;\n\n/**\n * This is a simple array with references\n */\nexport const zArrayWithReferences = z.array(zModelWithString);\n\n/**\n * This is a simple array containing an array\n */\nexport const zArrayWithArray = z.array(z.array(zModelWithString));\n\n/**\n * This is a string reference\n */\nexport const zDictionaryWithReference = z.record(z.string(), zModelWithString);\n\n/**\n * This is a complex dictionary\n */\nexport const zDictionaryWithArray = z.record(z.string(), z.array(zModelWithString));\n\n/**\n * This is a model with one string property\n */\nexport const zModelWithStringError = z.object({\n    prop: z.string().optional()\n});\n\n/**\n * `Comment` or `VoiceComment`. The JSON object for adding voice comments to tickets is different. See [Adding voice comments to tickets](/documentation/ticketing/managing-tickets/adding-voice-comments-to-tickets)\n */\nexport const zModelFromZendesk = z.string();\n\n/**\n * This is a model with one string property\n */\nexport const zModelWithNullableString = z.object({\n    nullableProp1: z.string().nullish(),\n    nullableRequiredProp1: z.string().nullable(),\n    nullableProp2: z.string().nullish(),\n    nullableRequiredProp2: z.string().nullable(),\n    'foo_bar-enum': z.enum([\n        'Success',\n        'Warning',\n        'Error',\n        'ØÆÅ字符串'\n    ]).optional()\n});\n\n/**\n * This is a model with one enum\n */\nexport const zModelWithEnum = z.object({\n    'foo_bar-enum': z.enum([\n        'Success',\n        'Warning',\n        'Error',\n        'ØÆÅ字符串'\n    ]).optional(),\n    statusCode: z.enum([\n        '100',\n        '200 FOO',\n        '300 FOO_BAR',\n        '400 foo-bar',\n        '500 foo.bar',\n        '600 foo&bar'\n    ]).optional(),\n    bool: z.literal(true).optional()\n});\n\n/**\n * This is a model with one enum with escaped name\n */\nexport const zModelWithEnumWithHyphen = z.object({\n    'foo-bar-baz-qux': z.enum(['3.0']).optional()\n});\n\n/**\n * This is a model with one enum\n */\nexport const zModelWithEnumFromDescription = z.object({\n    test: z.int().optional()\n});\n\n/**\n * This is a model with nested enums\n */\nexport const zModelWithNestedEnums = z.object({\n    dictionaryWithEnum: z.record(z.string(), z.enum([\n        'Success',\n        'Warning',\n        'Error'\n    ])).optional(),\n    dictionaryWithEnumFromDescription: z.record(z.string(), z.int()).optional(),\n    arrayWithEnum: z.array(z.enum([\n        'Success',\n        'Warning',\n        'Error'\n    ])).optional(),\n    arrayWithDescription: z.array(z.int()).optional(),\n    'foo_bar-enum': z.enum([\n        'Success',\n        'Warning',\n        'Error',\n        'ØÆÅ字符串'\n    ]).optional()\n});\n\n/**\n * This is a model with one property containing an array\n */\nexport const zModelWithArray = z.object({\n    prop: z.array(zModelWithString).optional(),\n    propWithFile: z.array(z.string()).optional(),\n    propWithNumber: z.array(z.number()).optional()\n});\n\n/**\n * This is a model with one property containing a dictionary\n */\nexport const zModelWithDictionary = z.object({\n    prop: z.record(z.string(), z.string()).optional()\n});\n\n/**\n * This is a deprecated model with a deprecated property\n *\n * @deprecated\n */\nexport const zDeprecatedModel = z.object({\n    prop: z.string().optional()\n});\n\n/**\n * This is a model with one property containing a circular reference\n */\nexport const zModelWithCircularReference = z.object({\n    prop: z.lazy((): any => zModelWithCircularReference).optional()\n});\n\n/**\n * This is a model with one property with a 'one of' relationship\n */\nexport const zCompositionWithOneOf = z.object({\n    propA: z.union([\n        zModelWithString,\n        zModelWithEnum,\n        zModelWithArray,\n        zModelWithDictionary\n    ]).optional()\n});\n\n/**\n * This is a model with one property with a 'one of' relationship where the options are not $ref\n */\nexport const zCompositionWithOneOfAnonymous = z.object({\n    propA: z.union([\n        z.object({\n            propA: z.string().optional()\n        }),\n        z.string(),\n        z.int()\n    ]).optional()\n});\n\n/**\n * Circle\n */\nexport const zModelCircle = z.object({\n    kind: z.string(),\n    radius: z.number().optional()\n});\n\n/**\n * Square\n */\nexport const zModelSquare = z.object({\n    kind: z.string(),\n    sideLength: z.number().optional()\n});\n\n/**\n * This is a model with one property with a 'one of' relationship where the options are not $ref\n */\nexport const zCompositionWithOneOfDiscriminator = z.union([\n    z.object({\n        kind: z.literal('circle')\n    }).and(zModelCircle),\n    z.object({\n        kind: z.literal('square')\n    }).and(zModelSquare)\n]);\n\n/**\n * This is a model with one property with a 'any of' relationship\n */\nexport const zCompositionWithAnyOf = z.object({\n    propA: z.union([\n        zModelWithString,\n        zModelWithEnum,\n        zModelWithArray,\n        zModelWithDictionary\n    ]).optional()\n});\n\n/**\n * This is a model with one property with a 'any of' relationship where the options are not $ref\n */\nexport const zCompositionWithAnyOfAnonymous = z.object({\n    propA: z.union([\n        z.object({\n            propA: z.string().optional()\n        }),\n        z.string(),\n        z.int()\n    ]).optional()\n});\n\n/**\n * This is a model with nested 'any of' property with a type null\n */\nexport const zCompositionWithNestedAnyAndTypeNull = z.object({\n    propA: z.union([\n        z.array(zModelWithDictionary.nullable()),\n        z.array(zModelWithArray.nullable())\n    ]).optional()\n});\n\nexport const z3eNum1Период = z.enum(['Bird', 'Dog']);\n\nexport const zConstValue = z.enum(['ConstValue']);\n\n/**\n * This is a model with one property with a 'any of' relationship where the options are not $ref\n */\nexport const zCompositionWithNestedAnyOfAndNull = z.object({\n    propA: z.array(z.union([z3eNum1Период, zConstValue])).nullish()\n});\n\n/**\n * This is a model with one property with a 'one of' relationship\n */\nexport const zCompositionWithOneOfAndNullable = z.object({\n    propA: z.union([\n        z.object({\n            boolean: z.boolean().optional()\n        }),\n        zModelWithEnum,\n        zModelWithArray,\n        zModelWithDictionary\n    ]).nullish()\n});\n\n/**\n * This is a model that contains a simple dictionary within composition\n */\nexport const zCompositionWithOneOfAndSimpleDictionary = z.object({\n    propA: z.union([\n        z.boolean(),\n        z.record(z.string(), z.number())\n    ]).optional()\n});\n\n/**\n * This is a model that contains a dictionary of simple arrays within composition\n */\nexport const zCompositionWithOneOfAndSimpleArrayDictionary = z.object({\n    propA: z.union([\n        z.boolean(),\n        z.record(z.string(), z.array(z.boolean()))\n    ]).optional()\n});\n\n/**\n * This is a model that contains a dictionary of complex arrays (composited) within composition\n */\nexport const zCompositionWithOneOfAndComplexArrayDictionary = z.object({\n    propA: z.union([\n        z.boolean(),\n        z.record(z.string(), z.array(z.union([z.number(), z.string()])))\n    ]).optional()\n});\n\n/**\n * This is a model with one property with a 'all of' relationship\n */\nexport const zCompositionWithAllOfAndNullable = z.object({\n    propA: z.object({\n        boolean: z.boolean().optional()\n    }).and(zModelWithEnum).and(zModelWithArray).and(zModelWithDictionary).nullish()\n});\n\n/**\n * This is a model with one property with a 'any of' relationship\n */\nexport const zCompositionWithAnyOfAndNullable = z.object({\n    propA: z.union([\n        z.object({\n            boolean: z.boolean().optional()\n        }),\n        zModelWithEnum,\n        zModelWithArray,\n        zModelWithDictionary\n    ]).nullish()\n});\n\n/**\n * This is a base model with two simple optional properties\n */\nexport const zCompositionBaseModel = z.object({\n    firstName: z.string().optional(),\n    lastname: z.string().optional()\n});\n\n/**\n * This is a model that extends the base model\n */\nexport const zCompositionExtendedModel = zCompositionBaseModel.and(z.object({\n    age: z.number(),\n    firstName: z.string(),\n    lastname: z.string()\n}));\n\n/**\n * This is a model with one nested property\n */\nexport const zModelWithProperties = z.object({\n    required: z.string(),\n    requiredAndReadOnly: z.string().readonly(),\n    requiredAndNullable: z.string().nullable(),\n    string: z.string().optional(),\n    number: z.number().optional(),\n    boolean: z.boolean().optional(),\n    reference: zModelWithString.optional(),\n    'property with space': z.string().optional(),\n    default: z.string().optional(),\n    try: z.string().optional(),\n    '@namespace.string': z.string().readonly().optional(),\n    '@namespace.integer': z.int().readonly().optional()\n});\n\n/**\n * This is a model with one property containing a reference\n */\nexport const zModelWithReference = z.object({\n    prop: zModelWithProperties.optional()\n});\n\n/**\n * This is a model with one nested property\n */\nexport const zModelWithNestedProperties = z.object({\n    first: z.object({\n        second: z.object({\n            third: z.string().readonly().nullable()\n        }).readonly().nullable()\n    }).readonly().nullable()\n});\n\n/**\n * This is a model with duplicated properties\n */\nexport const zModelWithDuplicateProperties = z.object({\n    prop: zModelWithString.optional()\n});\n\n/**\n * This is a model with ordered properties\n */\nexport const zModelWithOrderedProperties = z.object({\n    zebra: z.string().optional(),\n    apple: z.string().optional(),\n    hawaii: z.string().optional()\n});\n\n/**\n * This is a model with duplicated imports\n */\nexport const zModelWithDuplicateImports = z.object({\n    propA: zModelWithString.optional(),\n    propB: zModelWithString.optional(),\n    propC: zModelWithString.optional()\n});\n\n/**\n * This is a model that extends another model\n */\nexport const zModelThatExtends = zModelWithString.and(z.object({\n    propExtendsA: z.string().optional(),\n    propExtendsB: zModelWithString.optional()\n}));\n\n/**\n * This is a model that extends another model\n */\nexport const zModelThatExtendsExtends = zModelWithString.and(zModelThatExtends).and(z.object({\n    propExtendsC: z.string().optional(),\n    propExtendsD: zModelWithString.optional()\n}));\n\n/**\n * This is a model that contains a some patterns\n */\nexport const zModelWithPattern = z.object({\n    key: z.string().max(64).regex(/^[a-zA-Z0-9_]*$/),\n    name: z.string().max(255),\n    enabled: z.boolean().readonly().optional(),\n    modified: z.iso.datetime().readonly().optional(),\n    id: z.string().regex(/^\\d{2}-\\d{3}-\\d{4}$/).optional(),\n    text: z.string().regex(/^\\w+$/).optional(),\n    patternWithSingleQuotes: z.string().regex(/^[a-zA-Z0-9']*$/).optional(),\n    patternWithNewline: z.string().regex(/aaa\\nbbb/).optional(),\n    patternWithBacktick: z.string().regex(/aaa`bbb/).optional(),\n    patternWithUnicode: z.string().regex(/^\\p{L}+$/u).optional()\n});\n\nexport const zFile = z.object({\n    id: z.string().min(1).readonly().optional(),\n    updated_at: z.iso.datetime().readonly().optional(),\n    created_at: z.iso.datetime().readonly().optional(),\n    mime: z.string().min(1).max(24),\n    file: z.url().readonly().optional()\n});\n\nexport const zDefault = z.object({\n    name: z.string().optional()\n});\n\nexport const zPageable = z.object({\n    page: z.int().gte(0).max(2147483647, { error: 'Invalid value: Expected int32 to be <= 2147483647' }).optional().default(0),\n    size: z.int().gte(1).max(2147483647, { error: 'Invalid value: Expected int32 to be <= 2147483647' }).optional(),\n    sort: z.array(z.string()).optional()\n});\n\n/**\n * This is a free-form object without additionalProperties.\n */\nexport const zFreeFormObjectWithoutAdditionalProperties = z.record(z.string(), z.unknown());\n\n/**\n * This is a free-form object with additionalProperties: true.\n */\nexport const zFreeFormObjectWithAdditionalPropertiesEqTrue = z.record(z.string(), z.unknown());\n\n/**\n * This is a free-form object with additionalProperties: {}.\n */\nexport const zFreeFormObjectWithAdditionalPropertiesEqEmptyObject = z.record(z.string(), z.unknown());\n\nexport const zModelWithConst = z.object({\n    String: z.enum(['String']).optional(),\n    number: z.literal(0).optional(),\n    null: z.unknown().optional(),\n    withType: z.enum(['Some string']).optional()\n});\n\n/**\n * This is a model with one property and additionalProperties: true\n */\nexport const zModelWithAdditionalPropertiesEqTrue = z.object({\n    prop: z.string().optional()\n});\n\nexport const zNestedAnyOfArraysNullable = z.object({\n    nullableArray: z.array(z.union([z.string(), z.boolean()])).nullish()\n});\n\n/**\n * An object that can be null\n */\nexport const zNullableObject = z.object({\n    foo: z.string().optional()\n}).nullable().default(null);\n\n/**\n * Some % character\n */\nexport const zCharactersInDescription = z.string();\n\nexport const zModelWithNullableObject = z.object({\n    data: zNullableObject.optional()\n});\n\n/**\n * An object with additional properties that can be null\n */\nexport const zModelWithAdditionalPropertiesRef = z.record(z.string(), zNullableObject.nullable());\n\nexport const zModelWithOneOfEnum = z.union([\n    z.object({\n        foo: z.enum(['Bar'])\n    }),\n    z.object({\n        foo: z.enum(['Baz'])\n    }),\n    z.object({\n        foo: z.enum(['Qux'])\n    }),\n    z.object({\n        content: z.iso.datetime(),\n        foo: z.enum(['Quux'])\n    }),\n    z.object({\n        content: z.tuple([z.iso.datetime(), z.iso.datetime()]),\n        foo: z.enum(['Corge'])\n    })\n]);\n\nexport const zModelWithNestedArrayEnumsDataFoo = z.enum(['foo', 'bar']);\n\nexport const zModelWithNestedArrayEnumsDataBar = z.enum(['baz', 'qux']);\n\nexport const zModelWithNestedArrayEnumsData = z.object({\n    foo: z.array(zModelWithNestedArrayEnumsDataFoo).optional(),\n    bar: z.array(zModelWithNestedArrayEnumsDataBar).optional()\n});\n\nexport const zModelWithNestedArrayEnums = z.object({\n    array_strings: z.array(z.string()).optional(),\n    data: zModelWithNestedArrayEnumsData.optional()\n});\n\nexport const zModelWithNestedCompositionEnums = z.object({\n    foo: zModelWithNestedArrayEnumsDataFoo.optional()\n});\n\nexport const zModelWithReadOnlyAndWriteOnly = z.object({\n    foo: z.string(),\n    bar: z.string().readonly()\n});\n\n/**\n * This is a model with one property containing an array\n */\nexport const zModelWithArrayReadOnlyAndWriteOnly = z.object({\n    prop: z.array(zModelWithReadOnlyAndWriteOnly).optional(),\n    propWithFile: z.array(z.string()).optional(),\n    propWithNumber: z.array(z.number()).optional()\n});\n\nexport const zModelWithConstantSizeArray = z.tuple([z.number(), z.number()]);\n\nexport const zModelWithAnyOfConstantSizeArray = z.tuple([\n    z.union([\n        z.number(),\n        z.string()\n    ]),\n    z.union([\n        z.number(),\n        z.string()\n    ]),\n    z.union([\n        z.number(),\n        z.string()\n    ])\n]);\n\nexport const zModelWithPrefixItemsConstantSizeArray = z.array(z.union([\n    zModelWithInteger,\n    z.number(),\n    z.string()\n]));\n\nexport const zModelWithAnyOfConstantSizeArrayNullable = z.tuple([\n    z.union([\n        z.number(),\n        z.string()\n    ]).nullable(),\n    z.union([\n        z.number(),\n        z.string()\n    ]).nullable(),\n    z.union([\n        z.number(),\n        z.string()\n    ]).nullable()\n]);\n\nexport const zModelWithAnyOfConstantSizeArrayAndIntersect = z.tuple([z.intersection(z.number(), z.string()), z.intersection(z.number(), z.string())]);\n\nexport const zModelWithNumericEnumUnion = z.object({\n    value: z.union([\n        z.literal(-10),\n        z.literal(-1),\n        z.literal(0),\n        z.literal(1),\n        z.literal(3),\n        z.literal(6),\n        z.literal(12)\n    ]).optional()\n});\n\n/**\n * Some description with `back ticks`\n */\nexport const zModelWithBackticksInDescription = z.object({\n    template: z.string().optional()\n});\n\n/**\n * Model used to test deduplication strategy (unused)\n */\nexport const zParameterSimpleParameterUnused = z.string();\n\n/**\n * Model used to test deduplication strategy\n */\nexport const zPostServiceWithEmptyTagResponse = z.string();\n\n/**\n * Model used to test deduplication strategy\n */\nexport const zPostServiceWithEmptyTagResponse2 = z.string();\n\n/**\n * Model used to test deduplication strategy\n */\nexport const zDeleteFooData = z.string();\n\n/**\n * Model used to test deduplication strategy\n */\nexport const zDeleteFooData2 = z.string();\n\n/**\n * Model with restricted keyword name\n */\nexport const zImport = z.string();\n\nexport const zModelWithAnyOfConstantSizeArrayWithNSizeAndOptions = z.tuple([z.union([\n        z.number(),\n        zImport\n    ]), z.union([\n        z.number(),\n        zImport\n    ])]);\n\nexport const zSchemaWithFormRestrictedKeys = z.object({\n    description: z.string().optional(),\n    'x-enum-descriptions': z.string().optional(),\n    'x-enum-varnames': z.string().optional(),\n    'x-enumNames': z.string().optional(),\n    title: z.string().optional(),\n    object: z.object({\n        description: z.string().optional(),\n        'x-enum-descriptions': z.string().optional(),\n        'x-enum-varnames': z.string().optional(),\n        'x-enumNames': z.string().optional(),\n        title: z.string().optional()\n    }).optional(),\n    array: z.array(z.object({\n        description: z.string().optional(),\n        'x-enum-descriptions': z.string().optional(),\n        'x-enum-varnames': z.string().optional(),\n        'x-enumNames': z.string().optional(),\n        title: z.string().optional()\n    })).optional()\n});\n\n/**\n * This schema was giving PascalCase transformations a hard time\n */\nexport const zIoK8sApimachineryPkgApisMetaV1Preconditions = z.object({\n    resourceVersion: z.string().optional(),\n    uid: z.string().optional()\n});\n\n/**\n * This schema was giving PascalCase transformations a hard time\n */\nexport const zIoK8sApimachineryPkgApisMetaV1DeleteOptions = z.object({\n    preconditions: zIoK8sApimachineryPkgApisMetaV1Preconditions.optional()\n});\n\nexport const zAdditionalPropertiesUnknownIssue = z.record(z.string(), z.union([\n    z.string(),\n    z.number()\n]));\n\nexport const zAdditionalPropertiesUnknownIssue2 = z.record(z.string(), z.union([\n    z.string(),\n    z.number()\n]));\n\nexport const zAdditionalPropertiesUnknownIssue3 = z.intersection(z.string(), z.object({\n    entries: z.record(z.string(), zAdditionalPropertiesUnknownIssue)\n}));\n\nexport const zAdditionalPropertiesIntegerIssue = z.object({\n    value: z.int()\n});\n\nexport const zGenericSchemaDuplicateIssue1SystemBoolean = z.object({\n    item: z.boolean().optional(),\n    error: z.string().nullish(),\n    hasError: z.boolean().readonly().optional(),\n    data: z.record(z.string(), z.never()).optional()\n});\n\nexport const zGenericSchemaDuplicateIssue1SystemString = z.object({\n    item: z.string().nullish(),\n    error: z.string().nullish(),\n    hasError: z.boolean().readonly().optional()\n});\n\nexport const zOneOfAllOfIssue = z.union([\n    z.intersection(z.union([\n        zConstValue,\n        zGenericSchemaDuplicateIssue1SystemBoolean\n    ]), z3eNum1Период),\n    zGenericSchemaDuplicateIssue1SystemString\n]);\n\nexport const zExternalSharedModel = z.object({\n    id: z.string(),\n    name: z.string().optional()\n});\n\nexport const zExternalRefA = zExternalSharedModel;\n\nexport const zExternalRefB = zExternalSharedModel;\n\n/**\n * This is a model with one nested property\n */\nexport const zModelWithPropertiesWritable = z.object({\n    required: z.string(),\n    requiredAndNullable: z.string().nullable(),\n    string: z.string().optional(),\n    number: z.number().optional(),\n    boolean: z.boolean().optional(),\n    reference: zModelWithString.optional(),\n    'property with space': z.string().optional(),\n    default: z.string().optional(),\n    try: z.string().optional()\n});\n\n/**\n * This is a model with one property containing a reference\n */\nexport const zModelWithReferenceWritable = z.object({\n    prop: zModelWithPropertiesWritable.optional()\n});\n\n/**\n * This is a model that contains a some patterns\n */\nexport const zModelWithPatternWritable = z.object({\n    key: z.string().max(64).regex(/^[a-zA-Z0-9_]*$/),\n    name: z.string().max(255),\n    id: z.string().regex(/^\\d{2}-\\d{3}-\\d{4}$/).optional(),\n    text: z.string().regex(/^\\w+$/).optional(),\n    patternWithSingleQuotes: z.string().regex(/^[a-zA-Z0-9']*$/).optional(),\n    patternWithNewline: z.string().regex(/aaa\\nbbb/).optional(),\n    patternWithBacktick: z.string().regex(/aaa`bbb/).optional(),\n    patternWithUnicode: z.string().regex(/^\\p{L}+$/u).optional()\n});\n\nexport const zFileWritable = z.object({\n    mime: z.string().min(1).max(24)\n});\n\nexport const zModelWithReadOnlyAndWriteOnlyWritable = z.object({\n    foo: z.string(),\n    baz: z.string()\n});\n\n/**\n * This is a model with one property containing an array\n */\nexport const zModelWithArrayReadOnlyAndWriteOnlyWritable = z.object({\n    prop: z.array(zModelWithReadOnlyAndWriteOnlyWritable).optional(),\n    propWithFile: z.array(z.string()).optional(),\n    propWithNumber: z.array(z.number()).optional()\n});\n\nexport const zModelWithAnyOfConstantSizeArrayWithNSizeAndOptionsWritable = z.tuple([z.union([\n        z.number(),\n        zImport\n    ]), z.union([\n        z.number(),\n        zImport\n    ])]);\n\nexport const zAdditionalPropertiesUnknownIssueWritable = z.record(z.string(), z.union([\n    z.string(),\n    z.number()\n]));\n\nexport const zOneOfAllOfIssueWritable = z.union([\n    z.intersection(z.union([\n        zConstValue,\n        zGenericSchemaDuplicateIssue1SystemBoolean\n    ]), z3eNum1Период),\n    zGenericSchemaDuplicateIssue1SystemString\n]);\n\nexport const zGenericSchemaDuplicateIssue1SystemBooleanWritable = z.object({\n    item: z.boolean().optional(),\n    error: z.string().nullish(),\n    data: z.record(z.string(), z.never()).optional()\n});\n\nexport const zGenericSchemaDuplicateIssue1SystemStringWritable = z.object({\n    item: z.string().nullish(),\n    error: z.string().nullish()\n});\n\n/**\n * This is a reusable parameter\n */\nexport const zSimpleParameter = z.string();\n\nexport const zCompositionWithOneOfAndProperties = z.intersection(z.union([\n    z.object({\n        foo: zSimpleParameter\n    }),\n    z.object({\n        bar: zNonAsciiStringæøåÆøÅöôêÊ字符串\n    })\n]), z.object({\n    baz: z.int().gte(0).max(65535, { error: 'Invalid value: Expected uint16 to be <= 65535' }).nullable(),\n    qux: z.int().gte(0).max(255, { error: 'Invalid value: Expected uint8 to be <= 255' })\n}));\n\nexport const zModelWithOneOfAndProperties = z.intersection(z.union([\n    zSimpleParameter,\n    zNonAsciiStringæøåÆøÅöôêÊ字符串\n]), z.object({\n    baz: z.int().gte(0).max(65535, { error: 'Invalid value: Expected uint16 to be <= 65535' }).nullable(),\n    qux: z.int().gte(0).max(255, { error: 'Invalid value: Expected uint8 to be <= 255' })\n}));\n\n/**\n * Parameter with illegal characters\n */\nexport const zXFooBar = zModelWithString;\n\nexport const zSimpleRequestBody = zModelWithString;\n\nexport const zSimpleFormData = zModelWithString;\n\nexport const zExportData = z.object({\n    body: z.never().optional(),\n    path: z.never().optional(),\n    query: z.never().optional()\n});\n\nexport const zPatchApiVbyApiVersionNoTagData = z.object({\n    body: z.never().optional(),\n    path: z.never().optional(),\n    query: z.never().optional()\n});\n\nexport const zImportData = z.object({\n    body: z.union([\n        zModelWithReadOnlyAndWriteOnlyWritable,\n        zModelWithArrayReadOnlyAndWriteOnlyWritable\n    ]),\n    path: z.never().optional(),\n    query: z.never().optional()\n});\n\nexport const zImportResponse = z.union([\n    zModelFromZendesk,\n    zModelWithReadOnlyAndWriteOnly\n]);\n\nexport const zFooWowData = z.object({\n    body: z.never().optional(),\n    path: z.never().optional(),\n    query: z.never().optional()\n});\n\nexport const zApiVVersionODataControllerCountData = z.object({\n    body: z.never().optional(),\n    path: z.never().optional(),\n    query: z.never().optional()\n});\n\n/**\n * Success\n */\nexport const zApiVVersionODataControllerCountResponse = zModelFromZendesk;\n\nexport const zGetApiVbyApiVersionSimpleOperationData = z.object({\n    body: z.never().optional(),\n    path: z.object({\n        foo_param: z.string()\n    }),\n    query: z.never().optional()\n});\n\n/**\n * Response is a simple number\n */\nexport const zGetApiVbyApiVersionSimpleOperationResponse = z.number();\n\nexport const zDeleteCallWithoutParametersAndResponseData = z.object({\n    body: z.never().optional(),\n    path: z.never().optional(),\n    query: z.never().optional()\n});\n\nexport const zGetCallWithoutParametersAndResponseData = z.object({\n    body: z.never().optional(),\n    path: z.never().optional(),\n    query: z.never().optional()\n});\n\nexport const zHeadCallWithoutParametersAndResponseData = z.object({\n    body: z.never().optional(),\n    path: z.never().optional(),\n    query: z.never().optional()\n});\n\nexport const zOptionsCallWithoutParametersAndResponseData = z.object({\n    body: z.never().optional(),\n    path: z.never().optional(),\n    query: z.never().optional()\n});\n\nexport const zPatchCallWithoutParametersAndResponseData = z.object({\n    body: z.never().optional(),\n    path: z.never().optional(),\n    query: z.never().optional()\n});\n\nexport const zPostCallWithoutParametersAndResponseData = z.object({\n    body: z.never().optional(),\n    path: z.never().optional(),\n    query: z.never().optional()\n});\n\nexport const zPutCallWithoutParametersAndResponseData = z.object({\n    body: z.never().optional(),\n    path: z.never().optional(),\n    query: z.never().optional()\n});\n\nexport const zDeleteFooData3 = z.object({\n    body: z.never().optional(),\n    path: z.object({\n        foo_param: z.string(),\n        BarParam: z.string()\n    }),\n    query: z.never().optional(),\n    headers: z.object({\n        'x-Foo-Bar': zModelWithString\n    })\n});\n\nexport const zCallWithDescriptionsData = z.object({\n    body: z.never().optional(),\n    path: z.never().optional(),\n    query: z.object({\n        parameterWithBreaks: z.string().optional(),\n        parameterWithBackticks: z.string().optional(),\n        parameterWithSlashes: z.string().optional(),\n        parameterWithExpressionPlaceholders: z.string().optional(),\n        parameterWithQuotes: z.string().optional(),\n        parameterWithReservedCharacters: z.string().optional()\n    }).optional()\n});\n\nexport const zDeprecatedCallData = z.object({\n    body: z.never().optional(),\n    path: z.never().optional(),\n    query: z.never().optional(),\n    headers: z.object({\n        parameter: zDeprecatedModel.nullable()\n    })\n});\n\nexport const zCallWithParametersData = z.object({\n    body: z.record(z.string(), z.unknown()).nullable(),\n    path: z.object({\n        parameterPath: z.string().nullable(),\n        'api-version': z.string().nullable()\n    }),\n    query: z.object({\n        foo_ref_enum: zModelWithNestedArrayEnumsDataFoo.optional(),\n        foo_all_of_enum: zModelWithNestedArrayEnumsDataFoo,\n        cursor: z.string().nullable()\n    }),\n    headers: z.object({\n        parameterHeader: z.string().nullable()\n    })\n});\n\nexport const zCallWithWeirdParameterNamesData = z.object({\n    body: zModelWithString.nullable(),\n    path: z.object({\n        'parameter.path.1': z.string().optional(),\n        'parameter-path-2': z.string().optional(),\n        'PARAMETER-PATH-3': z.string().optional(),\n        'api-version': z.string().nullable()\n    }),\n    query: z.object({\n        default: z.string().optional(),\n        'parameter-query': z.string().nullable()\n    }),\n    headers: z.object({\n        'parameter.header': z.string().nullable()\n    })\n});\n\nexport const zGetCallWithOptionalParamData = z.object({\n    body: zModelWithOneOfEnum,\n    path: z.never().optional(),\n    query: z.object({\n        page: z.number().optional()\n    }).optional()\n});\n\nexport const zPostCallWithOptionalParamData = z.object({\n    body: z.object({\n        offset: z.number().nullish()\n    }).optional(),\n    path: z.never().optional(),\n    query: z.object({\n        parameter: zPageable\n    })\n});\n\nexport const zPostCallWithOptionalParamResponse = z.union([\n    z.number(),\n    z.void()\n]);\n\nexport const zPostApiVbyApiVersionRequestBodyData = z.object({\n    body: zSimpleRequestBody.optional(),\n    path: z.never().optional(),\n    query: z.object({\n        parameter: z.string().optional()\n    }).optional()\n});\n\nexport const zPostApiVbyApiVersionFormDataData = z.object({\n    body: zSimpleFormData.optional(),\n    path: z.never().optional(),\n    query: z.object({\n        parameter: z.string().optional()\n    }).optional()\n});\n\nexport const zCallWithDefaultParametersData = z.object({\n    body: z.never().optional(),\n    path: z.never().optional(),\n    query: z.object({\n        parameterString: z.string().nullish().default('Hello World!'),\n        parameterNumber: z.number().nullish().default(123),\n        parameterBoolean: z.boolean().nullish().default(true),\n        parameterEnum: z.enum([\n            'Success',\n            'Warning',\n            'Error'\n        ]).optional(),\n        parameterModel: zModelWithString.nullish()\n    }).optional()\n});\n\nexport const zCallWithDefaultOptionalParametersData = z.object({\n    body: z.never().optional(),\n    path: z.never().optional(),\n    query: z.object({\n        parameterString: z.string().optional().default('Hello World!'),\n        parameterNumber: z.number().optional().default(123),\n        parameterBoolean: z.boolean().optional().default(true),\n        parameterEnum: z.enum([\n            'Success',\n            'Warning',\n            'Error'\n        ]).optional(),\n        parameterModel: zModelWithString.optional()\n    }).optional()\n});\n\nexport const zCallToTestOrderOfParamsData = z.object({\n    body: z.never().optional(),\n    path: z.never().optional(),\n    query: z.object({\n        parameterOptionalStringWithDefault: z.string().optional().default('Hello World!'),\n        parameterOptionalStringWithEmptyDefault: z.string().optional().default(''),\n        parameterOptionalStringWithNoDefault: z.string().optional(),\n        parameterStringWithDefault: z.string().default('Hello World!'),\n        parameterStringWithEmptyDefault: z.string().default(''),\n        parameterStringWithNoDefault: z.string(),\n        parameterStringNullableWithNoDefault: z.string().nullish(),\n        parameterStringNullableWithDefault: z.string().nullish().default(null)\n    })\n});\n\nexport const zDuplicateNameData = z.object({\n    body: z.never().optional(),\n    path: z.never().optional(),\n    query: z.never().optional()\n});\n\nexport const zDuplicateName2Data = z.object({\n    body: z.never().optional(),\n    path: z.never().optional(),\n    query: z.never().optional()\n});\n\nexport const zDuplicateName3Data = z.object({\n    body: z.never().optional(),\n    path: z.never().optional(),\n    query: z.never().optional()\n});\n\nexport const zDuplicateName4Data = z.object({\n    body: z.never().optional(),\n    path: z.never().optional(),\n    query: z.never().optional()\n});\n\nexport const zCallWithNoContentResponseData = z.object({\n    body: z.never().optional(),\n    path: z.never().optional(),\n    query: z.never().optional()\n});\n\n/**\n * Success\n */\nexport const zCallWithNoContentResponseResponse = z.void();\n\nexport const zCallWithResponseAndNoContentResponseData = z.object({\n    body: z.never().optional(),\n    path: z.never().optional(),\n    query: z.never().optional()\n});\n\nexport const zCallWithResponseAndNoContentResponseResponse = z.union([\n    z.number(),\n    z.void()\n]);\n\nexport const zDummyAData = z.object({\n    body: z.never().optional(),\n    path: z.never().optional(),\n    query: z.never().optional()\n});\n\nexport const zDummyAResponse = z400;\n\nexport const zDummyBData = z.object({\n    body: z.never().optional(),\n    path: z.never().optional(),\n    query: z.never().optional()\n});\n\n/**\n * Success\n */\nexport const zDummyBResponse = z.void();\n\nexport const zCallWithResponseData = z.object({\n    body: z.never().optional(),\n    path: z.never().optional(),\n    query: z.never().optional()\n});\n\nexport const zCallWithResponseResponse = zImport;\n\nexport const zCallWithDuplicateResponsesData = z.object({\n    body: z.never().optional(),\n    path: z.never().optional(),\n    query: z.never().optional()\n});\n\nexport const zCallWithDuplicateResponsesResponse = z.union([\n    zModelWithBoolean.and(zModelWithInteger),\n    zModelWithString\n]);\n\nexport const zCallWithResponsesData = z.object({\n    body: z.never().optional(),\n    path: z.never().optional(),\n    query: z.never().optional()\n});\n\nexport const zCallWithResponsesResponse = z.union([\n    z.object({\n        '@namespace.string': z.string().readonly().optional(),\n        '@namespace.integer': z.int().readonly().optional(),\n        value: z.array(zModelWithString).readonly().optional()\n    }),\n    zModelThatExtends,\n    zModelThatExtendsExtends\n]);\n\nexport const zCollectionFormatData = z.object({\n    body: z.never().optional(),\n    path: z.never().optional(),\n    query: z.object({\n        parameterArrayCSV: z.array(z.string()).nullable(),\n        parameterArraySSV: z.array(z.string()).nullable(),\n        parameterArrayTSV: z.array(z.string()).nullable(),\n        parameterArrayPipes: z.array(z.string()).nullable(),\n        parameterArrayMulti: z.array(z.string()).nullable()\n    })\n});\n\nexport const zTypesData = z.object({\n    body: z.never().optional(),\n    path: z.object({\n        id: z.int().min(-2147483648, { error: 'Invalid value: Expected int32 to be >= -2147483648' }).max(2147483647, { error: 'Invalid value: Expected int32 to be <= 2147483647' }).optional()\n    }).optional(),\n    query: z.object({\n        parameterNumber: z.number().default(123),\n        parameterString: z.string().nullable().default('default'),\n        parameterBoolean: z.boolean().nullable().default(true),\n        parameterObject: z.record(z.string(), z.unknown()).nullable().default(null),\n        parameterArray: z.array(z.string()).nullable(),\n        parameterDictionary: z.record(z.string(), z.unknown()).nullable(),\n        parameterEnum: z.enum([\n            'Success',\n            'Warning',\n            'Error'\n        ])\n    })\n});\n\nexport const zTypesResponse = z.union([\n    z.number(),\n    z.string(),\n    z.boolean(),\n    z.record(z.string(), z.unknown())\n]);\n\nexport const zUploadFileData = z.object({\n    body: z.string(),\n    path: z.object({\n        'api-version': z.string().nullable()\n    }),\n    query: z.never().optional()\n});\n\nexport const zUploadFileResponse = z.boolean();\n\nexport const zFileResponseData = z.object({\n    body: z.never().optional(),\n    path: z.object({\n        id: z.string(),\n        'api-version': z.string()\n    }),\n    query: z.never().optional()\n});\n\n/**\n * Success\n */\nexport const zFileResponseResponse = z.string();\n\nexport const zComplexTypesData = z.object({\n    body: z.never().optional(),\n    path: z.never().optional(),\n    query: z.object({\n        parameterObject: z.object({\n            first: z.object({\n                second: z.object({\n                    third: z.string().optional()\n                }).optional()\n            }).optional()\n        }),\n        parameterReference: zModelWithString\n    })\n});\n\n/**\n * Successful response\n */\nexport const zComplexTypesResponse = z.array(zModelWithString);\n\nexport const zMultipartResponseData = z.object({\n    body: z.never().optional(),\n    path: z.never().optional(),\n    query: z.never().optional()\n});\n\n/**\n * OK\n */\nexport const zMultipartResponseResponse = z.object({\n    file: z.string().optional(),\n    metadata: z.object({\n        foo: z.string().optional(),\n        bar: z.string().optional()\n    }).optional()\n});\n\nexport const zMultipartRequestData = z.object({\n    body: z.object({\n        content: z.string().optional(),\n        data: zModelWithString.nullish()\n    }).optional(),\n    path: z.never().optional(),\n    query: z.never().optional()\n});\n\nexport const zComplexParamsData = z.object({\n    body: z.object({\n        key: z.string().max(64).regex(/^[a-zA-Z0-9_]*$/).readonly().nullable(),\n        name: z.string().max(255).nullable(),\n        enabled: z.boolean().optional().default(true),\n        type: z.enum([\n            'Monkey',\n            'Horse',\n            'Bird'\n        ]),\n        listOfModels: z.array(zModelWithString).nullish(),\n        listOfStrings: z.array(z.string()).nullish(),\n        parameters: z.union([\n            zModelWithString,\n            zModelWithEnum,\n            zModelWithArray,\n            zModelWithDictionary\n        ]),\n        user: z.object({\n            id: z.int().min(-2147483648, { error: 'Invalid value: Expected int32 to be >= -2147483648' }).max(2147483647, { error: 'Invalid value: Expected int32 to be <= 2147483647' }).readonly().optional(),\n            name: z.string().readonly().nullish()\n        }).readonly().optional()\n    }).optional(),\n    path: z.object({\n        id: z.int().min(-2147483648, { error: 'Invalid value: Expected int32 to be >= -2147483648' }).max(2147483647, { error: 'Invalid value: Expected int32 to be <= 2147483647' }),\n        'api-version': z.string()\n    }),\n    query: z.never().optional()\n});\n\n/**\n * Success\n */\nexport const zComplexParamsResponse = zModelWithString;\n\nexport const zCallWithResultFromHeaderData = z.object({\n    body: z.never().optional(),\n    path: z.never().optional(),\n    query: z.never().optional()\n});\n\nexport const zTestErrorCodeData = z.object({\n    body: z.never().optional(),\n    path: z.never().optional(),\n    query: z.object({\n        status: z.int()\n    })\n});\n\nexport const zNonAsciiæøåÆøÅöôêÊ字符串Data = z.object({\n    body: z.never().optional(),\n    path: z.never().optional(),\n    query: z.object({\n        nonAsciiParamæøåÆØÅöôêÊ: z.int()\n    })\n});\n\n/**\n * Successful response\n */\nexport const zNonAsciiæøåÆøÅöôêÊ字符串Response = z.array(zNonAsciiStringæøåÆøÅöôêÊ字符串);\n\nexport const zPutWithFormUrlEncodedData = z.object({\n    body: zArrayWithStrings,\n    path: z.never().optional(),\n    query: z.never().optional()\n});\n"
  },
  {
    "path": "packages/openapi-ts-tests/zod/v3/__snapshots__/3.0.x/v4/enum-null/zod.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport * as z from 'zod/v4';\n\nexport const zFoo = z.enum(['foo', 'bar']).nullable();\n\nexport const zBar = z.enum(['foo', 'bar']);\n\nexport const zBaz = z.enum(['foo', 'bar']);\n"
  },
  {
    "path": "packages/openapi-ts-tests/zod/v3/__snapshots__/3.0.x/v4/type-format/zod.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport * as z from 'zod/v4';\n\nexport const zFoo = z.object({\n    bar: z.int().optional(),\n    foo: z.coerce.bigint().min(BigInt('-9223372036854775808'), { error: 'Invalid value: Expected int64 to be >= -9223372036854775808' }).max(BigInt('9223372036854775807'), { error: 'Invalid value: Expected int64 to be <= 9223372036854775807' }).default(BigInt(0)),\n    id: z.string()\n});\n\nexport const zBar = z.object({\n    foo: z.int()\n});\n\nexport const zPostFooData = z.object({\n    body: z.never().optional(),\n    path: z.never().optional(),\n    query: z.never().optional()\n});\n\n/**\n * OK\n */\nexport const zPostFooResponse = zFoo;\n"
  },
  {
    "path": "packages/openapi-ts-tests/zod/v3/__snapshots__/3.0.x/v4/validators/zod.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport * as z from 'zod/v4';\n\nexport const zBaz = z.string().regex(/foo\\nbar/).readonly().default('baz');\n\nexport const zFoo = z.object({\n    foo: z.string().regex(/^\\d{3}-\\d{2}-\\d{4}$/).optional(),\n    bar: z.lazy((): any => zBar).optional(),\n    baz: z.array(z.lazy((): any => zFoo)).optional(),\n    qux: z.int().gt(0).optional().default(0)\n}).nullable().default(null);\n\nexport const zBar = z.object({\n    foo: zFoo.optional()\n});\n"
  },
  {
    "path": "packages/openapi-ts-tests/zod/v3/__snapshots__/3.1.x/mini/array-items-all-of/zod.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport * as z from 'zod/v4-mini';\n\nexport const zArrayWithAllOfObjects = z.array(z.intersection(z.object({\n    id: z.optional(z.int())\n}), z.object({\n    name: z.optional(z.string())\n})));\n\nexport const zArrayWithAllOfPrimitives = z.array(z.intersection(z.number(), z.string()));\n\nexport const zBaseModel = z.object({\n    id: z.optional(z.int()),\n    createdAt: z.optional(z.iso.datetime())\n});\n\nexport const zArrayWithAllOfRefs = z.array(z.intersection(zBaseModel, z.object({\n    extra: z.optional(z.string())\n})));\n"
  },
  {
    "path": "packages/openapi-ts-tests/zod/v3/__snapshots__/3.1.x/mini/array-items-one-of-length-1/zod.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport * as z from 'zod/v4-mini';\n\nexport const zBar = z.string();\n\nexport const zFoo = z.object({\n    foo: z.optional(z.array(zBar).check(z.minLength(1), z.maxLength(2147483647)))\n});\n"
  },
  {
    "path": "packages/openapi-ts-tests/zod/v3/__snapshots__/3.1.x/mini/default/zod.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport * as z from 'zod/v4-mini';\n\n/**\n * Model with number-only name\n */\nexport const z400 = z.string();\n\n/**\n * Testing multiline comments in string: First line\n * Second line\n *\n * Fourth line\n */\nexport const zCamelCaseCommentWithBreaks = z.int();\n\n/**\n * Testing multiline comments in string: First line\n * Second line\n *\n * Fourth line\n */\nexport const zCommentWithBreaks = z.int();\n\n/**\n * Testing backticks in string: `backticks` and ```multiple backticks``` should work\n */\nexport const zCommentWithBackticks = z.int();\n\n/**\n * Testing backticks and quotes in string: `backticks`, 'quotes', \"double quotes\" and ```multiple backticks``` should work\n */\nexport const zCommentWithBackticksAndQuotes = z.int();\n\n/**\n * Testing slashes in string: \\backwards\\\\\\ and /forwards/// should work\n */\nexport const zCommentWithSlashes = z.int();\n\n/**\n * Testing expression placeholders in string: ${expression} should work\n */\nexport const zCommentWithExpressionPlaceholders = z.int();\n\n/**\n * Testing quotes in string: 'single quote''' and \"double quotes\"\"\" should work\n */\nexport const zCommentWithQuotes = z.int();\n\n/**\n * Testing reserved characters in string: * inline * and ** inline ** should work\n */\nexport const zCommentWithReservedCharacters = z.int();\n\n/**\n * This is a simple number\n */\nexport const zSimpleInteger = z.int();\n\n/**\n * This is a simple boolean\n */\nexport const zSimpleBoolean = z.boolean();\n\n/**\n * This is a simple string\n */\nexport const zSimpleString = z.string();\n\n/**\n * A string with non-ascii (unicode) characters valid in typescript identifiers (æøåÆØÅöÔèÈ字符串)\n */\nexport const zNonAsciiStringæøåÆøÅöôêÊ字符串 = z.string();\n\n/**\n * This is a simple file\n */\nexport const zSimpleFile = z.string();\n\n/**\n * This is a simple string\n */\nexport const zSimpleStringWithPattern = z.nullable(z.string().check(z.maxLength(64), z.regex(/^[a-zA-Z0-9_]*$/)));\n\n/**\n * This is a simple enum with strings\n */\nexport const zEnumWithStrings = z.enum([\n    'Success',\n    'Warning',\n    'Error',\n    '\\'Single Quote\\'',\n    '\"Double Quotes\"',\n    'Non-ascii: øæåôöØÆÅÔÖ字符串'\n]);\n\nexport const zEnumWithReplacedCharacters = z.union([\n    z.literal('\\'Single Quote\\''),\n    z.literal('\"Double Quotes\"'),\n    z.literal('øæåôöØÆÅÔÖ字符串'),\n    z.literal(3.1),\n    z.literal('')\n]);\n\n/**\n * This is a simple enum with numbers\n */\nexport const zEnumWithNumbers = z.union([\n    z.literal(1),\n    z.literal(2),\n    z.literal(3),\n    z.literal(1.1),\n    z.literal(1.2),\n    z.literal(1.3),\n    z.literal(100),\n    z.literal(200),\n    z.literal(300),\n    z.literal(-100),\n    z.literal(-200),\n    z.literal(-300),\n    z.literal(-1.1),\n    z.literal(-1.2),\n    z.literal(-1.3)\n]);\n\n/**\n * Success=1,Warning=2,Error=3\n */\nexport const zEnumFromDescription = z.number();\n\n/**\n * This is a simple enum with numbers\n */\nexport const zEnumWithExtensions = z.union([\n    z.literal(200),\n    z.literal(400),\n    z.literal(500)\n]);\n\nexport const zEnumWithXEnumNames = z.union([\n    z.literal(0),\n    z.literal(1),\n    z.literal(2)\n]);\n\n/**\n * This is a simple array with numbers\n */\nexport const zArrayWithNumbers = z.array(z.int());\n\n/**\n * This is a simple array with booleans\n */\nexport const zArrayWithBooleans = z.array(z.boolean());\n\n/**\n * This is a simple array with strings\n */\nexport const zArrayWithStrings = z._default(z.array(z.string()), ['test']);\n\n/**\n * This is a simple array with properties\n */\nexport const zArrayWithProperties = z.array(z.object({\n    '16x16': z.optional(zCamelCaseCommentWithBreaks),\n    bar: z.optional(z.string())\n}));\n\n/**\n * This is a simple array with any of properties\n */\nexport const zArrayWithAnyOfProperties = z.array(z.union([z.object({\n        foo: z._default(z.optional(z.string()), 'test')\n    }), z.object({\n        bar: z.optional(z.string())\n    })]));\n\nexport const zAnyOfAnyAndNull = z.object({\n    data: z.nullish(z.unknown())\n});\n\n/**\n * This is a simple array with any of properties\n */\nexport const zAnyOfArrays = z.object({\n    results: z.optional(z.array(z.union([z.object({\n            foo: z.optional(z.string())\n        }), z.object({\n            bar: z.optional(z.string())\n        })])))\n});\n\n/**\n * This is a string dictionary\n */\nexport const zDictionaryWithString = z.record(z.string(), z.string());\n\nexport const zDictionaryWithPropertiesAndAdditionalProperties = z.object({\n    foo: z.optional(z.number()),\n    bar: z.optional(z.boolean())\n});\n\n/**\n * This is a string dictionary\n */\nexport const zDictionaryWithDictionary = z.record(z.string(), z.record(z.string(), z.string()));\n\n/**\n * This is a complex dictionary\n */\nexport const zDictionaryWithProperties = z.record(z.string(), z.object({\n    foo: z.optional(z.string()),\n    bar: z.optional(z.string())\n}));\n\n/**\n * This is a model with one number property\n */\nexport const zModelWithInteger = z.object({\n    prop: z.optional(z.int())\n});\n\n/**\n * This is a model with one boolean property\n */\nexport const zModelWithBoolean = z.object({\n    prop: z.optional(z.boolean())\n});\n\n/**\n * This is a model with one string property\n */\nexport const zModelWithString = z.object({\n    prop: z.optional(z.string())\n});\n\n/**\n * This is a simple reference\n */\nexport const zSimpleReference = zModelWithString;\n\n/**\n * This is a simple array with references\n */\nexport const zArrayWithReferences = z.array(zModelWithString);\n\n/**\n * This is a simple array containing an array\n */\nexport const zArrayWithArray = z.array(z.array(zModelWithString));\n\n/**\n * This is a string reference\n */\nexport const zDictionaryWithReference = z.record(z.string(), zModelWithString);\n\n/**\n * This is a complex dictionary\n */\nexport const zDictionaryWithArray = z.record(z.string(), z.array(zModelWithString));\n\n/**\n * This is a model with one string property\n */\nexport const zModelWithStringError = z.object({\n    prop: z.optional(z.string())\n});\n\n/**\n * `Comment` or `VoiceComment`. The JSON object for adding voice comments to tickets is different. See [Adding voice comments to tickets](/documentation/ticketing/managing-tickets/adding-voice-comments-to-tickets)\n */\nexport const zModelFromZendesk = z.string();\n\n/**\n * This is a model with one string property\n */\nexport const zModelWithNullableString = z.object({\n    nullableProp1: z.nullish(z.string()),\n    nullableRequiredProp1: z.nullable(z.string()),\n    nullableProp2: z.nullish(z.string()),\n    nullableRequiredProp2: z.nullable(z.string()),\n    'foo_bar-enum': z.optional(z.enum([\n        'Success',\n        'Warning',\n        'Error',\n        'ØÆÅ字符串'\n    ]))\n});\n\n/**\n * This is a model with one enum\n */\nexport const zModelWithEnum = z.object({\n    'foo_bar-enum': z.optional(z.enum([\n        'Success',\n        'Warning',\n        'Error',\n        'ØÆÅ字符串'\n    ])),\n    statusCode: z.optional(z.enum([\n        '100',\n        '200 FOO',\n        '300 FOO_BAR',\n        '400 foo-bar',\n        '500 foo.bar',\n        '600 foo&bar'\n    ])),\n    bool: z.optional(z.literal(true))\n});\n\n/**\n * This is a model with one enum with escaped name\n */\nexport const zModelWithEnumWithHyphen = z.object({\n    'foo-bar-baz-qux': z.optional(z.enum(['3.0']))\n});\n\n/**\n * This is a model with one enum\n */\nexport const zModelWithEnumFromDescription = z.object({\n    test: z.optional(z.int())\n});\n\n/**\n * This is a model with nested enums\n */\nexport const zModelWithNestedEnums = z.object({\n    dictionaryWithEnum: z.optional(z.record(z.string(), z.enum([\n        'Success',\n        'Warning',\n        'Error'\n    ]))),\n    dictionaryWithEnumFromDescription: z.optional(z.record(z.string(), z.int())),\n    arrayWithEnum: z.optional(z.array(z.enum([\n        'Success',\n        'Warning',\n        'Error'\n    ]))),\n    arrayWithDescription: z.optional(z.array(z.int())),\n    'foo_bar-enum': z.optional(z.enum([\n        'Success',\n        'Warning',\n        'Error',\n        'ØÆÅ字符串'\n    ]))\n});\n\n/**\n * This is a model with one property containing an array\n */\nexport const zModelWithArray = z.object({\n    prop: z.optional(z.array(zModelWithString)),\n    propWithFile: z.optional(z.array(z.string())),\n    propWithNumber: z.optional(z.array(z.number()))\n});\n\n/**\n * This is a model with one property containing a dictionary\n */\nexport const zModelWithDictionary = z.object({\n    prop: z.optional(z.record(z.string(), z.string()))\n});\n\n/**\n * This is a deprecated model with a deprecated property\n *\n * @deprecated\n */\nexport const zDeprecatedModel = z.object({\n    prop: z.optional(z.string())\n});\n\n/**\n * This is a model with one property containing a circular reference\n */\nexport const zModelWithCircularReference = z.object({\n    prop: z.optional(z.lazy((): any => zModelWithCircularReference))\n});\n\n/**\n * This is a model with one property with a 'one of' relationship\n */\nexport const zCompositionWithOneOf = z.object({\n    propA: z.optional(z.union([\n        zModelWithString,\n        zModelWithEnum,\n        zModelWithArray,\n        zModelWithDictionary\n    ]))\n});\n\n/**\n * This is a model with one property with a 'one of' relationship where the options are not $ref\n */\nexport const zCompositionWithOneOfAnonymous = z.object({\n    propA: z.optional(z.union([\n        z.object({\n            propA: z.optional(z.string())\n        }),\n        z.string(),\n        z.int()\n    ]))\n});\n\n/**\n * Circle\n */\nexport const zModelCircle = z.object({\n    kind: z.string(),\n    radius: z.optional(z.number())\n});\n\n/**\n * Square\n */\nexport const zModelSquare = z.object({\n    kind: z.string(),\n    sideLength: z.optional(z.number())\n});\n\n/**\n * This is a model with one property with a 'one of' relationship where the options are not $ref\n */\nexport const zCompositionWithOneOfDiscriminator = z.union([\n    z.intersection(z.object({\n        kind: z.literal('circle')\n    }), zModelCircle),\n    z.intersection(z.object({\n        kind: z.literal('square')\n    }), zModelSquare)\n]);\n\n/**\n * This is a model with one property with a 'any of' relationship\n */\nexport const zCompositionWithAnyOf = z.object({\n    propA: z.optional(z.union([\n        zModelWithString,\n        zModelWithEnum,\n        zModelWithArray,\n        zModelWithDictionary\n    ]))\n});\n\n/**\n * This is a model with one property with a 'any of' relationship where the options are not $ref\n */\nexport const zCompositionWithAnyOfAnonymous = z.object({\n    propA: z.optional(z.union([\n        z.object({\n            propA: z.optional(z.string())\n        }),\n        z.string(),\n        z.int()\n    ]))\n});\n\n/**\n * This is a model with nested 'any of' property with a type null\n */\nexport const zCompositionWithNestedAnyAndTypeNull = z.object({\n    propA: z.optional(z.union([\n        z.array(z.union([zModelWithDictionary, z.null()])),\n        z.array(z.union([zModelWithArray, z.null()]))\n    ]))\n});\n\nexport const z3eNum1Период = z.enum(['Bird', 'Dog']);\n\nexport const zConstValue = z.literal('ConstValue');\n\n/**\n * This is a model with one property with a 'any of' relationship where the options are not $ref\n */\nexport const zCompositionWithNestedAnyOfAndNull = z.object({\n    propA: z.nullish(z.array(z.union([z3eNum1Период, zConstValue])))\n});\n\n/**\n * This is a model with one property with a 'one of' relationship\n */\nexport const zCompositionWithOneOfAndNullable = z.object({\n    propA: z.nullish(z.union([\n        z.object({\n            boolean: z.optional(z.boolean())\n        }),\n        zModelWithEnum,\n        zModelWithArray,\n        zModelWithDictionary\n    ]))\n});\n\n/**\n * This is a model that contains a simple dictionary within composition\n */\nexport const zCompositionWithOneOfAndSimpleDictionary = z.object({\n    propA: z.optional(z.union([\n        z.boolean(),\n        z.record(z.string(), z.number())\n    ]))\n});\n\n/**\n * This is a model that contains a dictionary of simple arrays within composition\n */\nexport const zCompositionWithOneOfAndSimpleArrayDictionary = z.object({\n    propA: z.optional(z.union([\n        z.boolean(),\n        z.record(z.string(), z.array(z.boolean()))\n    ]))\n});\n\n/**\n * This is a model that contains a dictionary of complex arrays (composited) within composition\n */\nexport const zCompositionWithOneOfAndComplexArrayDictionary = z.object({\n    propA: z.optional(z.union([\n        z.boolean(),\n        z.record(z.string(), z.array(z.union([z.number(), z.string()])))\n    ]))\n});\n\n/**\n * This is a model with one property with a 'all of' relationship\n */\nexport const zCompositionWithAllOfAndNullable = z.object({\n    propA: z.nullish(z.intersection(z.intersection(z.intersection(z.object({\n        boolean: z.optional(z.boolean())\n    }), zModelWithEnum), zModelWithArray), zModelWithDictionary))\n});\n\n/**\n * This is a model with one property with a 'any of' relationship\n */\nexport const zCompositionWithAnyOfAndNullable = z.object({\n    propA: z.nullish(z.union([\n        z.object({\n            boolean: z.optional(z.boolean())\n        }),\n        zModelWithEnum,\n        zModelWithArray,\n        zModelWithDictionary\n    ]))\n});\n\n/**\n * This is a base model with two simple optional properties\n */\nexport const zCompositionBaseModel = z.object({\n    firstName: z.optional(z.string()),\n    lastname: z.optional(z.string())\n});\n\n/**\n * This is a model that extends the base model\n */\nexport const zCompositionExtendedModel = z.intersection(zCompositionBaseModel, z.object({\n    age: z.number(),\n    firstName: z.string(),\n    lastname: z.string()\n}));\n\n/**\n * This is a model with one nested property\n */\nexport const zModelWithProperties = z.object({\n    required: z.string(),\n    requiredAndReadOnly: z.readonly(z.string()),\n    requiredAndNullable: z.nullable(z.string()),\n    string: z.optional(z.string()),\n    number: z.optional(z.number()),\n    boolean: z.optional(z.boolean()),\n    reference: z.optional(zModelWithString),\n    'property with space': z.optional(z.string()),\n    default: z.optional(z.string()),\n    try: z.optional(z.string()),\n    '@namespace.string': z.optional(z.readonly(z.string())),\n    '@namespace.integer': z.optional(z.readonly(z.int()))\n});\n\n/**\n * This is a model with one property containing a reference\n */\nexport const zModelWithReference = z.object({\n    prop: z.optional(zModelWithProperties)\n});\n\n/**\n * This is a model with one nested property\n */\nexport const zModelWithNestedProperties = z.object({\n    first: z.nullable(z.readonly(z.object({\n        second: z.nullable(z.readonly(z.object({\n            third: z.nullable(z.readonly(z.string()))\n        })))\n    })))\n});\n\n/**\n * This is a model with duplicated properties\n */\nexport const zModelWithDuplicateProperties = z.object({\n    prop: z.optional(zModelWithString)\n});\n\n/**\n * This is a model with ordered properties\n */\nexport const zModelWithOrderedProperties = z.object({\n    zebra: z.optional(z.string()),\n    apple: z.optional(z.string()),\n    hawaii: z.optional(z.string())\n});\n\n/**\n * This is a model with duplicated imports\n */\nexport const zModelWithDuplicateImports = z.object({\n    propA: z.optional(zModelWithString),\n    propB: z.optional(zModelWithString),\n    propC: z.optional(zModelWithString)\n});\n\n/**\n * This is a model that extends another model\n */\nexport const zModelThatExtends = z.intersection(zModelWithString, z.object({\n    propExtendsA: z.optional(z.string()),\n    propExtendsB: z.optional(zModelWithString)\n}));\n\n/**\n * This is a model that extends another model\n */\nexport const zModelThatExtendsExtends = z.intersection(z.intersection(zModelWithString, zModelThatExtends), z.object({\n    propExtendsC: z.optional(z.string()),\n    propExtendsD: z.optional(zModelWithString)\n}));\n\n/**\n * This is a model that contains a some patterns\n */\nexport const zModelWithPattern = z.object({\n    key: z.string().check(z.maxLength(64), z.regex(/^[a-zA-Z0-9_]*$/)),\n    name: z.string().check(z.maxLength(255)),\n    enabled: z.optional(z.readonly(z.boolean())),\n    modified: z.optional(z.readonly(z.iso.datetime())),\n    id: z.optional(z.string().check(z.regex(/^\\d{2}-\\d{3}-\\d{4}$/))),\n    text: z.optional(z.string().check(z.regex(/^\\w+$/))),\n    patternWithSingleQuotes: z.optional(z.string().check(z.regex(/^[a-zA-Z0-9']*$/))),\n    patternWithNewline: z.optional(z.string().check(z.regex(/aaa\\nbbb/))),\n    patternWithBacktick: z.optional(z.string().check(z.regex(/aaa`bbb/))),\n    patternWithUnicode: z.optional(z.string().check(z.regex(/^\\p{L}+$/u)))\n});\n\nexport const zFile = z.object({\n    id: z.optional(z.readonly(z.string().check(z.minLength(1)))),\n    updated_at: z.optional(z.readonly(z.iso.datetime())),\n    created_at: z.optional(z.readonly(z.iso.datetime())),\n    mime: z.string().check(z.minLength(1), z.maxLength(24)),\n    file: z.optional(z.readonly(z.url()))\n});\n\nexport const zDefault = z.object({\n    name: z.optional(z.string())\n});\n\nexport const zPageable = z.object({\n    page: z._default(z.optional(z.int().check(z.gte(0), z.maximum(2147483647, { error: 'Invalid value: Expected int32 to be <= 2147483647' }))), 0),\n    size: z.optional(z.int().check(z.gte(1), z.maximum(2147483647, { error: 'Invalid value: Expected int32 to be <= 2147483647' }))),\n    sort: z.optional(z.array(z.string()))\n});\n\n/**\n * This is a free-form object without additionalProperties.\n */\nexport const zFreeFormObjectWithoutAdditionalProperties = z.record(z.string(), z.unknown());\n\n/**\n * This is a free-form object with additionalProperties: true.\n */\nexport const zFreeFormObjectWithAdditionalPropertiesEqTrue = z.record(z.string(), z.unknown());\n\n/**\n * This is a free-form object with additionalProperties: {}.\n */\nexport const zFreeFormObjectWithAdditionalPropertiesEqEmptyObject = z.record(z.string(), z.unknown());\n\nexport const zModelWithConst = z.object({\n    String: z.optional(z.literal('String')),\n    number: z.optional(z.literal(0)),\n    null: z.optional(z.null()),\n    withType: z.optional(z.literal('Some string'))\n});\n\n/**\n * This is a model with one property and additionalProperties: true\n */\nexport const zModelWithAdditionalPropertiesEqTrue = z.object({\n    prop: z.optional(z.string())\n});\n\nexport const zNestedAnyOfArraysNullable = z.object({\n    nullableArray: z.nullish(z.array(z.union([z.string(), z.boolean()])))\n});\n\n/**\n * An object that can be null\n */\nexport const zNullableObject = z._default(z.nullable(z.object({\n    foo: z.optional(z.string())\n})), null);\n\n/**\n * Some % character\n */\nexport const zCharactersInDescription = z.string();\n\nexport const zModelWithNullableObject = z.object({\n    data: z.optional(zNullableObject)\n});\n\n/**\n * An object with additional properties that can be null (anyOf ref + null)\n */\nexport const zModelWithAdditionalPropertiesRef = z.record(z.string(), z.nullable(zNullableObject));\n\nexport const zModelWithOneOfEnum = z.union([\n    z.object({\n        foo: z.enum(['Bar'])\n    }),\n    z.object({\n        foo: z.enum(['Baz'])\n    }),\n    z.object({\n        foo: z.enum(['Qux'])\n    }),\n    z.object({\n        content: z.iso.datetime(),\n        foo: z.enum(['Quux'])\n    }),\n    z.object({\n        content: z.tuple([z.iso.datetime(), z.string()]),\n        foo: z.enum(['Corge'])\n    })\n]);\n\nexport const zModelWithNestedArrayEnumsDataFoo = z.enum(['foo', 'bar']);\n\nexport const zModelWithNestedArrayEnumsDataBar = z.enum(['baz', 'qux']);\n\nexport const zModelWithNestedArrayEnumsData = z.object({\n    foo: z.optional(z.array(zModelWithNestedArrayEnumsDataFoo)),\n    bar: z.optional(z.array(zModelWithNestedArrayEnumsDataBar))\n});\n\nexport const zModelWithNestedArrayEnums = z.object({\n    array_strings: z.optional(z.array(z.string())),\n    data: z.optional(zModelWithNestedArrayEnumsData)\n});\n\nexport const zModelWithNestedCompositionEnums = z.object({\n    foo: z.optional(zModelWithNestedArrayEnumsDataFoo)\n});\n\nexport const zModelWithReadOnlyAndWriteOnly = z.object({\n    foo: z.string(),\n    bar: z.readonly(z.string())\n});\n\n/**\n * This is a model with one property containing an array\n */\nexport const zModelWithArrayReadOnlyAndWriteOnly = z.object({\n    prop: z.optional(z.array(zModelWithReadOnlyAndWriteOnly)),\n    propWithFile: z.optional(z.array(z.string())),\n    propWithNumber: z.optional(z.array(z.number()))\n});\n\nexport const zModelWithConstantSizeArray = z.tuple([z.number(), z.number()]);\n\nexport const zModelWithAnyOfConstantSizeArray = z.tuple([\n    z.union([\n        z.number(),\n        z.string()\n    ]),\n    z.union([\n        z.number(),\n        z.string()\n    ]),\n    z.union([\n        z.number(),\n        z.string()\n    ])\n]);\n\nexport const zModelWithPrefixItemsConstantSizeArray = z.tuple([\n    zModelWithInteger,\n    z.union([\n        z.number(),\n        z.string()\n    ]),\n    z.string()\n]);\n\nexport const zModelWithAnyOfConstantSizeArrayNullable = z.tuple([\n    z.nullable(z.union([\n        z.number(),\n        z.string()\n    ])),\n    z.nullable(z.union([\n        z.number(),\n        z.string()\n    ])),\n    z.nullable(z.union([\n        z.number(),\n        z.string()\n    ]))\n]);\n\nexport const zModelWithAnyOfConstantSizeArrayAndIntersect = z.tuple([z.intersection(z.number(), z.string()), z.intersection(z.number(), z.string())]);\n\nexport const zModelWithNumericEnumUnion = z.object({\n    value: z.optional(z.union([\n        z.literal(-10),\n        z.literal(-1),\n        z.literal(0),\n        z.literal(1),\n        z.literal(3),\n        z.literal(6),\n        z.literal(12)\n    ]))\n});\n\n/**\n * Some description with `back ticks`\n */\nexport const zModelWithBackticksInDescription = z.object({\n    template: z.optional(z.string())\n});\n\n/**\n * Model used to test deduplication strategy (unused)\n */\nexport const zParameterSimpleParameterUnused = z.string();\n\n/**\n * Model used to test deduplication strategy\n */\nexport const zPostServiceWithEmptyTagResponse = z.string();\n\n/**\n * Model used to test deduplication strategy\n */\nexport const zPostServiceWithEmptyTagResponse2 = z.string();\n\n/**\n * Model used to test deduplication strategy\n */\nexport const zDeleteFooData = z.string();\n\n/**\n * Model used to test deduplication strategy\n */\nexport const zDeleteFooData2 = z.string();\n\n/**\n * Model with restricted keyword name\n */\nexport const zImport = z.string();\n\nexport const zModelWithAnyOfConstantSizeArrayWithNSizeAndOptions = z.tuple([z.union([\n        z.number(),\n        zImport\n    ]), z.union([\n        z.number(),\n        zImport\n    ])]);\n\nexport const zSchemaWithFormRestrictedKeys = z.object({\n    description: z.optional(z.string()),\n    'x-enum-descriptions': z.optional(z.string()),\n    'x-enum-varnames': z.optional(z.string()),\n    'x-enumNames': z.optional(z.string()),\n    title: z.optional(z.string()),\n    object: z.optional(z.object({\n        description: z.optional(z.string()),\n        'x-enum-descriptions': z.optional(z.string()),\n        'x-enum-varnames': z.optional(z.string()),\n        'x-enumNames': z.optional(z.string()),\n        title: z.optional(z.string())\n    })),\n    array: z.optional(z.array(z.object({\n        description: z.optional(z.string()),\n        'x-enum-descriptions': z.optional(z.string()),\n        'x-enum-varnames': z.optional(z.string()),\n        'x-enumNames': z.optional(z.string()),\n        title: z.optional(z.string())\n    })))\n});\n\n/**\n * This schema was giving PascalCase transformations a hard time\n */\nexport const zIoK8sApimachineryPkgApisMetaV1Preconditions = z.object({\n    resourceVersion: z.optional(z.string()),\n    uid: z.optional(z.string())\n});\n\n/**\n * This schema was giving PascalCase transformations a hard time\n */\nexport const zIoK8sApimachineryPkgApisMetaV1DeleteOptions = z.object({\n    preconditions: z.optional(zIoK8sApimachineryPkgApisMetaV1Preconditions)\n});\n\nexport const zAdditionalPropertiesUnknownIssue = z.record(z.string(), z.union([\n    z.string(),\n    z.number()\n]));\n\nexport const zAdditionalPropertiesUnknownIssue2 = z.record(z.string(), z.union([\n    z.string(),\n    z.number()\n]));\n\nexport const zAdditionalPropertiesUnknownIssue3 = z.intersection(z.string(), z.object({\n    entries: z.record(z.string(), zAdditionalPropertiesUnknownIssue)\n}));\n\nexport const zAdditionalPropertiesIntegerIssue = z.object({\n    value: z.int()\n});\n\nexport const zGenericSchemaDuplicateIssue1SystemBoolean = z.object({\n    item: z.optional(z.boolean()),\n    error: z.nullish(z.string()),\n    hasError: z.optional(z.readonly(z.boolean())),\n    data: z.optional(z.record(z.string(), z.never()))\n});\n\nexport const zGenericSchemaDuplicateIssue1SystemString = z.object({\n    item: z.nullish(z.string()),\n    error: z.nullish(z.string()),\n    hasError: z.optional(z.readonly(z.boolean()))\n});\n\nexport const zOneOfAllOfIssue = z.union([\n    z.intersection(z.union([\n        zConstValue,\n        zGenericSchemaDuplicateIssue1SystemBoolean\n    ]), z3eNum1Период),\n    zGenericSchemaDuplicateIssue1SystemString\n]);\n\nexport const zExternalSharedModel = z.object({\n    id: z.string(),\n    name: z.optional(z.string())\n});\n\n/**\n * External ref to shared model (A)\n */\nexport const zExternalRefA = zExternalSharedModel;\n\n/**\n * External ref to shared model (B)\n */\nexport const zExternalRefB = zExternalSharedModel;\n\n/**\n * This is a model with one nested property\n */\nexport const zModelWithPropertiesWritable = z.object({\n    required: z.string(),\n    requiredAndNullable: z.nullable(z.string()),\n    string: z.optional(z.string()),\n    number: z.optional(z.number()),\n    boolean: z.optional(z.boolean()),\n    reference: z.optional(zModelWithString),\n    'property with space': z.optional(z.string()),\n    default: z.optional(z.string()),\n    try: z.optional(z.string())\n});\n\n/**\n * This is a model with one property containing a reference\n */\nexport const zModelWithReferenceWritable = z.object({\n    prop: z.optional(zModelWithPropertiesWritable)\n});\n\n/**\n * This is a model that contains a some patterns\n */\nexport const zModelWithPatternWritable = z.object({\n    key: z.string().check(z.maxLength(64), z.regex(/^[a-zA-Z0-9_]*$/)),\n    name: z.string().check(z.maxLength(255)),\n    id: z.optional(z.string().check(z.regex(/^\\d{2}-\\d{3}-\\d{4}$/))),\n    text: z.optional(z.string().check(z.regex(/^\\w+$/))),\n    patternWithSingleQuotes: z.optional(z.string().check(z.regex(/^[a-zA-Z0-9']*$/))),\n    patternWithNewline: z.optional(z.string().check(z.regex(/aaa\\nbbb/))),\n    patternWithBacktick: z.optional(z.string().check(z.regex(/aaa`bbb/))),\n    patternWithUnicode: z.optional(z.string().check(z.regex(/^\\p{L}+$/u)))\n});\n\nexport const zFileWritable = z.object({\n    mime: z.string().check(z.minLength(1), z.maxLength(24))\n});\n\nexport const zModelWithReadOnlyAndWriteOnlyWritable = z.object({\n    foo: z.string(),\n    baz: z.string()\n});\n\n/**\n * This is a model with one property containing an array\n */\nexport const zModelWithArrayReadOnlyAndWriteOnlyWritable = z.object({\n    prop: z.optional(z.array(zModelWithReadOnlyAndWriteOnlyWritable)),\n    propWithFile: z.optional(z.array(z.string())),\n    propWithNumber: z.optional(z.array(z.number()))\n});\n\nexport const zModelWithAnyOfConstantSizeArrayWithNSizeAndOptionsWritable = z.tuple([z.union([\n        z.number(),\n        zImport\n    ]), z.union([\n        z.number(),\n        zImport\n    ])]);\n\nexport const zAdditionalPropertiesUnknownIssueWritable = z.record(z.string(), z.union([\n    z.string(),\n    z.number()\n]));\n\nexport const zOneOfAllOfIssueWritable = z.union([\n    z.intersection(z.union([\n        zConstValue,\n        zGenericSchemaDuplicateIssue1SystemBoolean\n    ]), z3eNum1Период),\n    zGenericSchemaDuplicateIssue1SystemString\n]);\n\nexport const zGenericSchemaDuplicateIssue1SystemBooleanWritable = z.object({\n    item: z.optional(z.boolean()),\n    error: z.nullish(z.string()),\n    data: z.optional(z.record(z.string(), z.never()))\n});\n\nexport const zGenericSchemaDuplicateIssue1SystemStringWritable = z.object({\n    item: z.nullish(z.string()),\n    error: z.nullish(z.string())\n});\n\n/**\n * This is a reusable parameter\n */\nexport const zSimpleParameter = z.string();\n\nexport const zCompositionWithOneOfAndProperties = z.intersection(z.union([\n    z.object({\n        foo: zSimpleParameter\n    }),\n    z.object({\n        bar: zNonAsciiStringæøåÆøÅöôêÊ字符串\n    })\n]), z.object({\n    baz: z.nullable(z.int().check(z.gte(0), z.maximum(65535, { error: 'Invalid value: Expected uint16 to be <= 65535' }))),\n    qux: z.int().check(z.gte(0), z.maximum(255, { error: 'Invalid value: Expected uint8 to be <= 255' }))\n}));\n\nexport const zModelWithOneOfAndProperties = z.intersection(z.union([\n    zSimpleParameter,\n    zNonAsciiStringæøåÆøÅöôêÊ字符串\n]), z.object({\n    baz: z.nullable(z.int().check(z.gte(0), z.maximum(65535, { error: 'Invalid value: Expected uint16 to be <= 65535' }))),\n    qux: z.int().check(z.gte(0), z.maximum(255, { error: 'Invalid value: Expected uint8 to be <= 255' }))\n}));\n\n/**\n * Parameter with illegal characters\n */\nexport const zXFooBar = zModelWithString;\n\n/**\n * A reusable request body\n */\nexport const zSimpleRequestBody = zModelWithString;\n\n/**\n * A reusable request body\n */\nexport const zSimpleFormData = zModelWithString;\n\nexport const zExportData = z.object({\n    body: z.optional(z.never()),\n    path: z.optional(z.never()),\n    query: z.optional(z.never())\n});\n\nexport const zPatchApiVbyApiVersionNoTagData = z.object({\n    body: z.optional(z.never()),\n    path: z.optional(z.never()),\n    query: z.optional(z.never())\n});\n\nexport const zImportData = z.object({\n    body: z.union([\n        zModelWithReadOnlyAndWriteOnlyWritable,\n        zModelWithArrayReadOnlyAndWriteOnlyWritable\n    ]),\n    path: z.optional(z.never()),\n    query: z.optional(z.never())\n});\n\nexport const zImportResponse = z.union([\n    zModelFromZendesk,\n    zModelWithReadOnlyAndWriteOnly\n]);\n\nexport const zFooWowData = z.object({\n    body: z.optional(z.never()),\n    path: z.optional(z.never()),\n    query: z.optional(z.never())\n});\n\nexport const zApiVVersionODataControllerCountData = z.object({\n    body: z.optional(z.never()),\n    path: z.optional(z.never()),\n    query: z.optional(z.never())\n});\n\n/**\n * Success\n */\nexport const zApiVVersionODataControllerCountResponse = zModelFromZendesk;\n\nexport const zGetApiVbyApiVersionSimpleOperationData = z.object({\n    body: z.optional(z.never()),\n    path: z.object({\n        foo_param: z.union([\n            z.string(),\n            z.uuid()\n        ])\n    }),\n    query: z.optional(z.never())\n});\n\n/**\n * Response is a simple number\n */\nexport const zGetApiVbyApiVersionSimpleOperationResponse = z.number();\n\nexport const zDeleteCallWithoutParametersAndResponseData = z.object({\n    body: z.optional(z.never()),\n    path: z.optional(z.never()),\n    query: z.optional(z.never())\n});\n\nexport const zGetCallWithoutParametersAndResponseData = z.object({\n    body: z.optional(z.never()),\n    path: z.optional(z.never()),\n    query: z.optional(z.never())\n});\n\nexport const zHeadCallWithoutParametersAndResponseData = z.object({\n    body: z.optional(z.never()),\n    path: z.optional(z.never()),\n    query: z.optional(z.never())\n});\n\nexport const zOptionsCallWithoutParametersAndResponseData = z.object({\n    body: z.optional(z.never()),\n    path: z.optional(z.never()),\n    query: z.optional(z.never())\n});\n\nexport const zPatchCallWithoutParametersAndResponseData = z.object({\n    body: z.optional(z.never()),\n    path: z.optional(z.never()),\n    query: z.optional(z.never())\n});\n\nexport const zPostCallWithoutParametersAndResponseData = z.object({\n    body: z.optional(z.never()),\n    path: z.optional(z.never()),\n    query: z.optional(z.never())\n});\n\nexport const zPutCallWithoutParametersAndResponseData = z.object({\n    body: z.optional(z.never()),\n    path: z.optional(z.never()),\n    query: z.optional(z.never())\n});\n\nexport const zDeleteFooData3 = z.object({\n    body: z.optional(z.never()),\n    path: z.object({\n        foo_param: z.string(),\n        BarParam: z.string()\n    }),\n    query: z.optional(z.never()),\n    headers: z.object({\n        'x-Foo-Bar': zModelWithString\n    })\n});\n\nexport const zCallWithDescriptionsData = z.object({\n    body: z.optional(z.never()),\n    path: z.optional(z.never()),\n    query: z.optional(z.object({\n        parameterWithBreaks: z.optional(z.string()),\n        parameterWithBackticks: z.optional(z.string()),\n        parameterWithSlashes: z.optional(z.string()),\n        parameterWithExpressionPlaceholders: z.optional(z.string()),\n        parameterWithQuotes: z.optional(z.string()),\n        parameterWithReservedCharacters: z.optional(z.string())\n    }))\n});\n\nexport const zDeprecatedCallData = z.object({\n    body: z.optional(z.never()),\n    path: z.optional(z.never()),\n    query: z.optional(z.never()),\n    headers: z.object({\n        parameter: z.nullable(zDeprecatedModel)\n    })\n});\n\nexport const zCallWithParametersData = z.object({\n    body: z.nullable(z.record(z.string(), z.unknown())),\n    path: z.object({\n        parameterPath: z.nullable(z.string()),\n        'api-version': z.nullable(z.string())\n    }),\n    query: z.object({\n        foo_ref_enum: z.optional(zModelWithNestedArrayEnumsDataFoo),\n        foo_all_of_enum: zModelWithNestedArrayEnumsDataFoo,\n        cursor: z.nullable(z.string())\n    }),\n    headers: z.object({\n        parameterHeader: z.nullable(z.string())\n    })\n});\n\nexport const zCallWithWeirdParameterNamesData = z.object({\n    body: z.nullable(zModelWithString),\n    path: z.object({\n        'parameter.path.1': z.optional(z.string()),\n        'parameter-path-2': z.optional(z.string()),\n        'PARAMETER-PATH-3': z.optional(z.string()),\n        'api-version': z.nullable(z.string())\n    }),\n    query: z.object({\n        default: z.optional(z.string()),\n        'parameter-query': z.nullable(z.string())\n    }),\n    headers: z.object({\n        'parameter.header': z.nullable(z.string())\n    })\n});\n\nexport const zGetCallWithOptionalParamData = z.object({\n    body: zModelWithOneOfEnum,\n    path: z.optional(z.never()),\n    query: z.optional(z.object({\n        page: z.optional(z.number())\n    }))\n});\n\nexport const zPostCallWithOptionalParamData = z.object({\n    body: z.optional(z.object({\n        offset: z.nullish(z.number())\n    })),\n    path: z.optional(z.never()),\n    query: z.object({\n        parameter: zPageable\n    })\n});\n\nexport const zPostCallWithOptionalParamResponse = z.union([\n    z.number(),\n    z.void()\n]);\n\nexport const zPostApiVbyApiVersionRequestBodyData = z.object({\n    body: z.optional(zSimpleRequestBody),\n    path: z.optional(z.never()),\n    query: z.optional(z.object({\n        parameter: z.optional(z.string())\n    }))\n});\n\nexport const zPostApiVbyApiVersionFormDataData = z.object({\n    body: z.optional(zSimpleFormData),\n    path: z.optional(z.never()),\n    query: z.optional(z.object({\n        parameter: z.optional(z.string())\n    }))\n});\n\nexport const zCallWithDefaultParametersData = z.object({\n    body: z.optional(z.never()),\n    path: z.optional(z.never()),\n    query: z.optional(z.object({\n        parameterString: z._default(z.nullish(z.string()), 'Hello World!'),\n        parameterNumber: z._default(z.nullish(z.number()), 123),\n        parameterBoolean: z._default(z.nullish(z.boolean()), true),\n        parameterEnum: z.optional(z.enum([\n            'Success',\n            'Warning',\n            'Error'\n        ])),\n        parameterModel: z.nullish(zModelWithString)\n    }))\n});\n\nexport const zCallWithDefaultOptionalParametersData = z.object({\n    body: z.optional(z.never()),\n    path: z.optional(z.never()),\n    query: z.optional(z.object({\n        parameterString: z._default(z.optional(z.string()), 'Hello World!'),\n        parameterNumber: z._default(z.optional(z.number()), 123),\n        parameterBoolean: z._default(z.optional(z.boolean()), true),\n        parameterEnum: z.optional(z.enum([\n            'Success',\n            'Warning',\n            'Error'\n        ])),\n        parameterModel: z._default(z.optional(zModelWithString), { prop: 'Hello World!' })\n    }))\n});\n\nexport const zCallToTestOrderOfParamsData = z.object({\n    body: z.optional(z.never()),\n    path: z.optional(z.never()),\n    query: z.object({\n        parameterOptionalStringWithDefault: z._default(z.optional(z.string()), 'Hello World!'),\n        parameterOptionalStringWithEmptyDefault: z._default(z.optional(z.string()), ''),\n        parameterOptionalStringWithNoDefault: z.optional(z.string()),\n        parameterStringWithDefault: z._default(z.string(), 'Hello World!'),\n        parameterStringWithEmptyDefault: z._default(z.string(), ''),\n        parameterStringWithNoDefault: z.string(),\n        parameterStringNullableWithNoDefault: z.nullish(z.string()),\n        parameterStringNullableWithDefault: z._default(z.nullish(z.string()), null)\n    })\n});\n\nexport const zDuplicateNameData = z.object({\n    body: z.optional(z.never()),\n    path: z.optional(z.never()),\n    query: z.optional(z.never())\n});\n\nexport const zDuplicateName2Data = z.object({\n    body: z.optional(z.never()),\n    path: z.optional(z.never()),\n    query: z.optional(z.never())\n});\n\nexport const zDuplicateName3Data = z.object({\n    body: z.optional(z.never()),\n    path: z.optional(z.never()),\n    query: z.optional(z.never())\n});\n\nexport const zDuplicateName4Data = z.object({\n    body: z.optional(z.never()),\n    path: z.optional(z.never()),\n    query: z.optional(z.never())\n});\n\nexport const zCallWithNoContentResponseData = z.object({\n    body: z.optional(z.never()),\n    path: z.optional(z.never()),\n    query: z.optional(z.never())\n});\n\n/**\n * Success\n */\nexport const zCallWithNoContentResponseResponse = z.void();\n\nexport const zCallWithResponseAndNoContentResponseData = z.object({\n    body: z.optional(z.never()),\n    path: z.optional(z.never()),\n    query: z.optional(z.never())\n});\n\nexport const zCallWithResponseAndNoContentResponseResponse = z.union([\n    z.number(),\n    z.void()\n]);\n\nexport const zDummyAData = z.object({\n    body: z.optional(z.never()),\n    path: z.optional(z.never()),\n    query: z.optional(z.never())\n});\n\nexport const zDummyAResponse = z400;\n\nexport const zDummyBData = z.object({\n    body: z.optional(z.never()),\n    path: z.optional(z.never()),\n    query: z.optional(z.never())\n});\n\n/**\n * Success\n */\nexport const zDummyBResponse = z.void();\n\nexport const zCallWithResponseData = z.object({\n    body: z.optional(z.never()),\n    path: z.optional(z.never()),\n    query: z.optional(z.never())\n});\n\nexport const zCallWithResponseResponse = zImport;\n\nexport const zCallWithDuplicateResponsesData = z.object({\n    body: z.optional(z.never()),\n    path: z.optional(z.never()),\n    query: z.optional(z.never())\n});\n\nexport const zCallWithDuplicateResponsesResponse = z.union([\n    z.intersection(zModelWithBoolean, zModelWithInteger),\n    zModelWithString\n]);\n\nexport const zCallWithResponsesData = z.object({\n    body: z.optional(z.never()),\n    path: z.optional(z.never()),\n    query: z.optional(z.never())\n});\n\nexport const zCallWithResponsesResponse = z.union([\n    z.object({\n        '@namespace.string': z.optional(z.readonly(z.string())),\n        '@namespace.integer': z.optional(z.readonly(z.int())),\n        value: z.optional(z.readonly(z.array(zModelWithString)))\n    }),\n    zModelThatExtends,\n    zModelThatExtendsExtends\n]);\n\nexport const zCollectionFormatData = z.object({\n    body: z.optional(z.never()),\n    path: z.optional(z.never()),\n    query: z.object({\n        parameterArrayCSV: z.nullable(z.array(z.string())),\n        parameterArraySSV: z.nullable(z.array(z.string())),\n        parameterArrayTSV: z.nullable(z.array(z.string())),\n        parameterArrayPipes: z.nullable(z.array(z.string())),\n        parameterArrayMulti: z.nullable(z.array(z.string()))\n    })\n});\n\nexport const zTypesData = z.object({\n    body: z.optional(z.never()),\n    path: z.optional(z.object({\n        id: z.optional(z.int().check(z.minimum(-2147483648, { error: 'Invalid value: Expected int32 to be >= -2147483648' }), z.maximum(2147483647, { error: 'Invalid value: Expected int32 to be <= 2147483647' })))\n    })),\n    query: z.object({\n        parameterNumber: z._default(z.number(), 123),\n        parameterString: z._default(z.nullable(z.string()), 'default'),\n        parameterBoolean: z._default(z.nullable(z.boolean()), true),\n        parameterObject: z._default(z.nullable(z.record(z.string(), z.unknown())), null),\n        parameterArray: z.nullable(z.array(z.string())),\n        parameterDictionary: z.nullable(z.record(z.string(), z.unknown())),\n        parameterEnum: z.nullable(z.union([\n            z.literal('Success'),\n            z.literal('Warning'),\n            z.literal('Error')\n        ]))\n    })\n});\n\nexport const zTypesResponse = z.union([\n    z.number(),\n    z.string(),\n    z.boolean(),\n    z.record(z.string(), z.unknown())\n]);\n\nexport const zUploadFileData = z.object({\n    body: z.string(),\n    path: z.object({\n        'api-version': z.nullable(z.string())\n    }),\n    query: z.optional(z.never())\n});\n\nexport const zUploadFileResponse = z.boolean();\n\nexport const zFileResponseData = z.object({\n    body: z.optional(z.never()),\n    path: z.object({\n        id: z.string(),\n        'api-version': z.string()\n    }),\n    query: z.optional(z.never())\n});\n\n/**\n * Success\n */\nexport const zFileResponseResponse = z.string();\n\nexport const zComplexTypesData = z.object({\n    body: z.optional(z.never()),\n    path: z.optional(z.never()),\n    query: z.object({\n        parameterObject: z.object({\n            first: z.optional(z.object({\n                second: z.optional(z.object({\n                    third: z.optional(z.string())\n                }))\n            }))\n        }),\n        parameterReference: zModelWithString\n    })\n});\n\n/**\n * Successful response\n */\nexport const zComplexTypesResponse = z.array(zModelWithString);\n\nexport const zMultipartResponseData = z.object({\n    body: z.optional(z.never()),\n    path: z.optional(z.never()),\n    query: z.optional(z.never())\n});\n\n/**\n * OK\n */\nexport const zMultipartResponseResponse = z.object({\n    file: z.optional(z.string()),\n    metadata: z.optional(z.object({\n        foo: z.optional(z.string()),\n        bar: z.optional(z.string())\n    }))\n});\n\nexport const zMultipartRequestData = z.object({\n    body: z.optional(z.object({\n        content: z.optional(z.string()),\n        data: z.nullish(zModelWithString)\n    })),\n    path: z.optional(z.never()),\n    query: z.optional(z.never())\n});\n\nexport const zComplexParamsData = z.object({\n    body: z.optional(z.object({\n        key: z.nullable(z.readonly(z.string().check(z.maxLength(64), z.regex(/^[a-zA-Z0-9_]*$/)))),\n        name: z.nullable(z.string().check(z.maxLength(255))),\n        enabled: z._default(z.optional(z.boolean()), true),\n        type: z.enum([\n            'Monkey',\n            'Horse',\n            'Bird'\n        ]),\n        listOfModels: z.nullish(z.array(zModelWithString)),\n        listOfStrings: z.nullish(z.array(z.string())),\n        parameters: z.union([\n            zModelWithString,\n            zModelWithEnum,\n            zModelWithArray,\n            zModelWithDictionary\n        ]),\n        user: z.optional(z.readonly(z.object({\n            id: z.optional(z.readonly(z.int().check(z.minimum(-2147483648, { error: 'Invalid value: Expected int32 to be >= -2147483648' }), z.maximum(2147483647, { error: 'Invalid value: Expected int32 to be <= 2147483647' })))),\n            name: z.nullish(z.readonly(z.string()))\n        })))\n    })),\n    path: z.object({\n        id: z.int().check(z.minimum(-2147483648, { error: 'Invalid value: Expected int32 to be >= -2147483648' }), z.maximum(2147483647, { error: 'Invalid value: Expected int32 to be <= 2147483647' })),\n        'api-version': z.string()\n    }),\n    query: z.optional(z.never())\n});\n\n/**\n * Success\n */\nexport const zComplexParamsResponse = zModelWithString;\n\nexport const zCallWithResultFromHeaderData = z.object({\n    body: z.optional(z.never()),\n    path: z.optional(z.never()),\n    query: z.optional(z.never())\n});\n\nexport const zTestErrorCodeData = z.object({\n    body: z.optional(z.never()),\n    path: z.optional(z.never()),\n    query: z.object({\n        status: z.int()\n    })\n});\n\nexport const zNonAsciiæøåÆøÅöôêÊ字符串Data = z.object({\n    body: z.optional(z.never()),\n    path: z.optional(z.never()),\n    query: z.object({\n        nonAsciiParamæøåÆØÅöôêÊ: z.int()\n    })\n});\n\n/**\n * Successful response\n */\nexport const zNonAsciiæøåÆøÅöôêÊ字符串Response = z.array(zNonAsciiStringæøåÆøÅöôêÊ字符串);\n\nexport const zPutWithFormUrlEncodedData = z.object({\n    body: zArrayWithStrings,\n    path: z.optional(z.never()),\n    query: z.optional(z.never())\n});\n"
  },
  {
    "path": "packages/openapi-ts-tests/zod/v3/__snapshots__/3.1.x/mini/enum-null/zod.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport * as z from 'zod/v4-mini';\n\nexport const zFoo = z.nullable(z.enum(['foo', 'bar']));\n\nexport const zBar = z.enum(['foo', 'bar']);\n\nexport const zBaz = z.enum(['foo', 'bar']);\n"
  },
  {
    "path": "packages/openapi-ts-tests/zod/v3/__snapshots__/3.1.x/mini/enum-resolver-permissive/zod.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport * as z from 'zod/v4-mini';\n\nexport const zFoo = z.nullable(z.union([z.enum(['foo', 'bar']), z.string()]));\n\nexport const zBar = z.union([z.enum(['foo', 'bar']), z.string()]);\n\nexport const zBaz = z.union([z.enum(['foo', 'bar']), z.string()]);\n"
  },
  {
    "path": "packages/openapi-ts-tests/zod/v3/__snapshots__/3.1.x/mini/schema-const/zod.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport * as z from 'zod/v4-mini';\n\nexport const zFoo = z.object({\n    foo: z.optional(z.literal('foo')),\n    bar: z.optional(z.literal(3.2)),\n    baz: z.optional(z.literal(-1)),\n    qux: z.optional(z.literal(true)),\n    quux: z.optional(z.tuple([\n        z.literal(1),\n        z.literal(2),\n        z.literal(3),\n        z.literal('foo'),\n        z.literal(true)\n    ])),\n    corge: z.optional(z.record(z.string(), z.unknown())),\n    garply: z.optional(z.literal(BigInt('10'))),\n    numberInt8: z.optional(z.literal(100)),\n    numberInt16: z.optional(z.literal(1000)),\n    numberInt32: z.optional(z.literal(100000)),\n    numberInt64: z.optional(z.literal(BigInt(1000000000000))),\n    numberUint8: z.optional(z.literal(200)),\n    numberUint16: z.optional(z.literal(50000)),\n    numberUint32: z.optional(z.literal(3000000000)),\n    numberUint64: z.optional(z.literal(BigInt(18000000000000000000))),\n    integerInt8: z.optional(z.literal(-100)),\n    integerInt16: z.optional(z.literal(-1000)),\n    integerInt32: z.optional(z.literal(-100000)),\n    integerInt64: z.optional(z.literal(BigInt(-1000000000000))),\n    integerUint8: z.optional(z.literal(255)),\n    integerUint16: z.optional(z.literal(65535)),\n    integerUint32: z.optional(z.literal(4294967295)),\n    integerUint64: z.optional(z.literal(BigInt('18446744073709551615'))),\n    stringInt64: z.optional(z.literal(BigInt('-9223372036854775808'))),\n    stringUint64: z.optional(z.literal(BigInt('18446744073709551615')))\n});\n"
  },
  {
    "path": "packages/openapi-ts-tests/zod/v3/__snapshots__/3.1.x/mini/type-format/zod.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport * as z from 'zod/v4-mini';\n\nexport const zFoo = z.object({\n    bar: z.optional(z.int()),\n    foo: z._default(z.coerce.bigint().check(z.minimum(BigInt('-9223372036854775808'), { error: 'Invalid value: Expected int64 to be >= -9223372036854775808' }), z.maximum(BigInt('9223372036854775807'), { error: 'Invalid value: Expected int64 to be <= 9223372036854775807' })), BigInt(0)),\n    id: z.string()\n});\n\nexport const zBar = z.object({\n    foo: z.int()\n});\n\nexport const zPostFooData = z.object({\n    body: z.optional(z.never()),\n    path: z.optional(z.never()),\n    query: z.optional(z.never())\n});\n\n/**\n * OK\n */\nexport const zPostFooResponse = zFoo;\n"
  },
  {
    "path": "packages/openapi-ts-tests/zod/v3/__snapshots__/3.1.x/mini/validators/zod.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport * as z from 'zod/v4-mini';\n\nexport const zBaz = z._default(z.readonly(z.string().check(z.regex(/foo\\nbar/))), 'baz');\n\nexport const zQux = z.record(z.string(), z.object({\n    qux: z.optional(z.string())\n}));\n\n/**\n * This is Foo schema.\n */\nexport const zFoo = z._default(z.nullable(z.object({\n    foo: z.optional(z.string().check(z.regex(/^\\d{3}-\\d{2}-\\d{4}$/))),\n    bar: z.optional(z.lazy((): any => zBar)),\n    baz: z.optional(z.array(z.lazy((): any => zFoo))),\n    qux: z._default(z.optional(z.int().check(z.gt(0))), 0)\n})), null);\n\n/**\n * This is Bar schema.\n */\nexport const zBar = z.object({\n    foo: z.optional(zFoo)\n});\n\n/**\n * This is Foo parameter.\n */\nexport const zFoo2 = z.string();\n\nexport const zFoo3 = z.object({\n    foo: z.optional(zBar)\n});\n\nexport const zPatchFooData = z.object({\n    body: z.object({\n        foo: z.optional(z.string())\n    }),\n    path: z.optional(z.never()),\n    query: z.optional(z.object({\n        foo: z.optional(z.string()),\n        bar: z.optional(zBar),\n        baz: z.optional(z.object({\n            baz: z.optional(z.string())\n        })),\n        qux: z.optional(z.iso.date()),\n        quux: z.optional(z.iso.datetime())\n    }))\n});\n\nexport const zPostFooData = z.object({\n    body: zFoo3,\n    path: z.optional(z.never()),\n    query: z.optional(z.never())\n});\n"
  },
  {
    "path": "packages/openapi-ts-tests/zod/v3/__snapshots__/3.1.x/mini/validators-bigint-min-max/zod.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport * as z from 'zod/v4-mini';\n\nexport const zFoo = z.object({\n    foo: z.optional(z.coerce.bigint().check(z.gte(BigInt(0)), z.lte(BigInt(100))))\n});\n"
  },
  {
    "path": "packages/openapi-ts-tests/zod/v3/__snapshots__/3.1.x/mini/validators-circular-ref/zod.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport * as z from 'zod/v4-mini';\n\nexport const zBar = z.object({\n    bar: z.optional(z.array(z.lazy((): any => zBar)))\n});\n\nexport const zFoo = z.object({\n    foo: z.optional(zBar)\n});\n\nexport const zBaz = z.lazy((): any => zQux);\n\n/**\n * description caused circular reference error\n */\nexport const zQux = zBaz;\n"
  },
  {
    "path": "packages/openapi-ts-tests/zod/v3/__snapshots__/3.1.x/mini/validators-circular-ref-2/zod.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport * as z from 'zod/v4-mini';\n\nexport const zBar = z.object({\n    bar: z.nullable(z.array(z.lazy((): any => zBar)))\n});\n\nexport const zFoo = z.object({\n    foo: zBar\n});\n"
  },
  {
    "path": "packages/openapi-ts-tests/zod/v3/__snapshots__/3.1.x/mini/validators-dates/zod.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport * as z from 'zod/v4-mini';\n\nexport const zBaz = z._default(z.readonly(z.string().check(z.regex(/foo\\nbar/))), 'baz');\n\nexport const zQux = z.record(z.string(), z.object({\n    qux: z.optional(z.string())\n}));\n\n/**\n * This is Foo schema.\n */\nexport const zFoo = z._default(z.nullable(z.object({\n    foo: z.optional(z.string().check(z.regex(/^\\d{3}-\\d{2}-\\d{4}$/))),\n    bar: z.optional(z.lazy((): any => zBar)),\n    baz: z.optional(z.array(z.lazy((): any => zFoo))),\n    qux: z._default(z.optional(z.int().check(z.gt(0))), 0)\n})), null);\n\n/**\n * This is Bar schema.\n */\nexport const zBar = z.object({\n    foo: z.optional(zFoo)\n});\n\n/**\n * This is Foo parameter.\n */\nexport const zFoo2 = z.string();\n\nexport const zFoo3 = z.object({\n    foo: z.optional(zBar)\n});\n\nexport const zPatchFooData = z.object({\n    body: z.object({\n        foo: z.optional(z.string())\n    }),\n    path: z.optional(z.never()),\n    query: z.optional(z.object({\n        foo: z.optional(z.string()),\n        bar: z.optional(zBar),\n        baz: z.optional(z.object({\n            baz: z.optional(z.string())\n        })),\n        qux: z.optional(z.iso.date()),\n        quux: z.optional(z.iso.datetime({ offset: true }))\n    }))\n});\n\nexport const zPostFooData = z.object({\n    body: zFoo3,\n    path: z.optional(z.never()),\n    query: z.optional(z.never())\n});\n"
  },
  {
    "path": "packages/openapi-ts-tests/zod/v3/__snapshots__/3.1.x/mini/validators-metadata/zod.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport * as z from 'zod/v4-mini';\n\nexport const zBaz = z._default(z.readonly(z.string().check(z.regex(/foo\\nbar/))), 'baz');\n\nexport const zQux = z.record(z.string(), z.object({\n    qux: z.optional(z.string())\n}));\n\n/**\n * This is Foo schema.\n */\nexport const zFoo = z._default(z.nullable(z.object({\n    foo: z.optional(z.string().check(z.regex(/^\\d{3}-\\d{2}-\\d{4}$/)).register(z.globalRegistry, {\n        description: 'This is foo property.'\n    })),\n    bar: z.optional(z.lazy((): any => zBar)),\n    baz: z.optional(z.array(z.lazy((): any => zFoo)).register(z.globalRegistry, {\n        description: 'This is baz property.'\n    })),\n    qux: z._default(z.optional(z.int().check(z.gt(0)).register(z.globalRegistry, {\n        description: 'This is qux property.'\n    })), 0)\n})), null);\n\n/**\n * This is Bar schema.\n */\nexport const zBar = z.object({\n    foo: z.optional(zFoo)\n}).register(z.globalRegistry, {\n    description: 'This is Bar schema.'\n});\n\n/**\n * This is Foo parameter.\n */\nexport const zFoo2 = z.string().register(z.globalRegistry, {\n    description: 'This is Foo parameter.'\n});\n\nexport const zFoo3 = z.object({\n    foo: z.optional(zBar)\n});\n\nexport const zPatchFooData = z.object({\n    body: z.object({\n        foo: z.optional(z.string())\n    }),\n    path: z.optional(z.never()),\n    query: z.optional(z.object({\n        foo: z.optional(z.string().register(z.globalRegistry, {\n            description: 'This is Foo parameter.'\n        })),\n        bar: z.optional(zBar),\n        baz: z.optional(z.object({\n            baz: z.optional(z.string())\n        })),\n        qux: z.optional(z.iso.date()),\n        quux: z.optional(z.iso.datetime())\n    }))\n});\n\nexport const zPostFooData = z.object({\n    body: zFoo3,\n    path: z.optional(z.never()),\n    query: z.optional(z.never())\n});\n"
  },
  {
    "path": "packages/openapi-ts-tests/zod/v3/__snapshots__/3.1.x/mini/validators-string-constraints-union/zod.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport * as z from 'zod/v4-mini';\n\nexport const zLocaleOrLanguage = z.union([\n    z.string().check(z.length(5)),\n    z.string().check(z.length(2))\n]);\n"
  },
  {
    "path": "packages/openapi-ts-tests/zod/v3/__snapshots__/3.1.x/mini/validators-types/zod.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport * as z from 'zod/v4-mini';\n\nexport const zBaz = z._default(z.readonly(z.string().check(z.regex(/foo\\nbar/))), 'baz');\n\nexport type BazZodType = z.infer<typeof zBaz>;\n\nexport const zQux = z.record(z.string(), z.object({\n    qux: z.optional(z.string())\n}));\n\nexport type QuxZodType = z.infer<typeof zQux>;\n\n/**\n * This is Foo schema.\n */\nexport const zFoo = z._default(z.nullable(z.object({\n    foo: z.optional(z.string().check(z.regex(/^\\d{3}-\\d{2}-\\d{4}$/))),\n    bar: z.optional(z.lazy((): any => zBar)),\n    baz: z.optional(z.array(z.lazy((): any => zFoo))),\n    qux: z._default(z.optional(z.int().check(z.gt(0))), 0)\n})), null);\n\nexport type FooZodType = z.infer<typeof zFoo>;\n\n/**\n * This is Bar schema.\n */\nexport const zBar = z.object({\n    foo: z.optional(zFoo)\n});\n\nexport type BarZodType = z.infer<typeof zBar>;\n\n/**\n * This is Foo parameter.\n */\nexport const zFoo2 = z.string();\n\nexport type FooZodType2 = z.infer<typeof zFoo2>;\n\nexport const zFoo3 = z.object({\n    foo: z.optional(zBar)\n});\n\nexport type FooZodType3 = z.infer<typeof zFoo3>;\n\nexport const zPatchFooData = z.object({\n    body: z.object({\n        foo: z.optional(z.string())\n    }),\n    path: z.optional(z.never()),\n    query: z.optional(z.object({\n        foo: z.optional(z.string()),\n        bar: z.optional(zBar),\n        baz: z.optional(z.object({\n            baz: z.optional(z.string())\n        })),\n        qux: z.optional(z.iso.date()),\n        quux: z.optional(z.iso.datetime())\n    }))\n});\n\nexport type PatchFooDataZodType = z.infer<typeof zPatchFooData>;\n\nexport const zPostFooData = z.object({\n    body: zFoo3,\n    path: z.optional(z.never()),\n    query: z.optional(z.never())\n});\n\nexport type PostFooDataZodType = z.infer<typeof zPostFooData>;\n"
  },
  {
    "path": "packages/openapi-ts-tests/zod/v3/__snapshots__/3.1.x/mini/validators-union-merge/zod.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport * as z from 'zod/v4-mini';\n\nexport const zContact = z.union([\n    z.object({\n        email: z.string()\n    }),\n    z.object({\n        phone: z.string()\n    })\n]);\n\nexport const zUser = z.intersection(zContact, z.object({\n    username: z.string()\n}));\n\nexport const zDogDetails = z.object({\n    breed: z.string(),\n    barkVolume: z.int().check(z.gte(1), z.lte(10))\n});\n\nexport const zCatDetails = z.object({\n    furLength: z.enum([\n        'short',\n        'medium',\n        'long'\n    ]),\n    purrs: z.boolean()\n});\n\nexport const zPetStore = z.object({\n    animals: z.array(z.object({\n        name: z.string(),\n        type: z.optional(z.enum(['dog', 'cat'])),\n        details: z.union([\n            zDogDetails,\n            zCatDetails\n        ])\n    }))\n});\n"
  },
  {
    "path": "packages/openapi-ts-tests/zod/v3/__snapshots__/3.1.x/v3/array-items-all-of/zod.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport { z } from 'zod';\n\nexport const zArrayWithAllOfObjects = z.array(z.object({\n    id: z.number().int().optional()\n}).and(z.object({\n    name: z.string().optional()\n})));\n\nexport const zArrayWithAllOfPrimitives = z.array(z.intersection(z.number(), z.string()));\n\nexport const zBaseModel = z.object({\n    id: z.number().int().optional(),\n    createdAt: z.string().datetime().optional()\n});\n\nexport const zArrayWithAllOfRefs = z.array(zBaseModel.and(z.object({\n    extra: z.string().optional()\n})));\n"
  },
  {
    "path": "packages/openapi-ts-tests/zod/v3/__snapshots__/3.1.x/v3/array-items-one-of-length-1/zod.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport { z } from 'zod';\n\nexport const zBar = z.string();\n\nexport const zFoo = z.object({\n    foo: z.array(zBar).min(1).max(2147483647).optional()\n});\n"
  },
  {
    "path": "packages/openapi-ts-tests/zod/v3/__snapshots__/3.1.x/v3/default/zod.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport { z } from 'zod';\n\n/**\n * Model with number-only name\n */\nexport const z400 = z.string();\n\n/**\n * Testing multiline comments in string: First line\n * Second line\n *\n * Fourth line\n */\nexport const zCamelCaseCommentWithBreaks = z.number().int();\n\n/**\n * Testing multiline comments in string: First line\n * Second line\n *\n * Fourth line\n */\nexport const zCommentWithBreaks = z.number().int();\n\n/**\n * Testing backticks in string: `backticks` and ```multiple backticks``` should work\n */\nexport const zCommentWithBackticks = z.number().int();\n\n/**\n * Testing backticks and quotes in string: `backticks`, 'quotes', \"double quotes\" and ```multiple backticks``` should work\n */\nexport const zCommentWithBackticksAndQuotes = z.number().int();\n\n/**\n * Testing slashes in string: \\backwards\\\\\\ and /forwards/// should work\n */\nexport const zCommentWithSlashes = z.number().int();\n\n/**\n * Testing expression placeholders in string: ${expression} should work\n */\nexport const zCommentWithExpressionPlaceholders = z.number().int();\n\n/**\n * Testing quotes in string: 'single quote''' and \"double quotes\"\"\" should work\n */\nexport const zCommentWithQuotes = z.number().int();\n\n/**\n * Testing reserved characters in string: * inline * and ** inline ** should work\n */\nexport const zCommentWithReservedCharacters = z.number().int();\n\n/**\n * This is a simple number\n */\nexport const zSimpleInteger = z.number().int();\n\n/**\n * This is a simple boolean\n */\nexport const zSimpleBoolean = z.boolean();\n\n/**\n * This is a simple string\n */\nexport const zSimpleString = z.string();\n\n/**\n * A string with non-ascii (unicode) characters valid in typescript identifiers (æøåÆØÅöÔèÈ字符串)\n */\nexport const zNonAsciiStringæøåÆøÅöôêÊ字符串 = z.string();\n\n/**\n * This is a simple file\n */\nexport const zSimpleFile = z.string();\n\n/**\n * This is a simple string\n */\nexport const zSimpleStringWithPattern = z.string().max(64).regex(/^[a-zA-Z0-9_]*$/).nullable();\n\n/**\n * This is a simple enum with strings\n */\nexport const zEnumWithStrings = z.enum([\n    'Success',\n    'Warning',\n    'Error',\n    '\\'Single Quote\\'',\n    '\"Double Quotes\"',\n    'Non-ascii: øæåôöØÆÅÔÖ字符串'\n]);\n\nexport const zEnumWithReplacedCharacters = z.union([\n    z.literal('\\'Single Quote\\''),\n    z.literal('\"Double Quotes\"'),\n    z.literal('øæåôöØÆÅÔÖ字符串'),\n    z.literal(3.1),\n    z.literal('')\n]);\n\n/**\n * This is a simple enum with numbers\n */\nexport const zEnumWithNumbers = z.union([\n    z.literal(1),\n    z.literal(2),\n    z.literal(3),\n    z.literal(1.1),\n    z.literal(1.2),\n    z.literal(1.3),\n    z.literal(100),\n    z.literal(200),\n    z.literal(300),\n    z.literal(-100),\n    z.literal(-200),\n    z.literal(-300),\n    z.literal(-1.1),\n    z.literal(-1.2),\n    z.literal(-1.3)\n]);\n\n/**\n * Success=1,Warning=2,Error=3\n */\nexport const zEnumFromDescription = z.number();\n\n/**\n * This is a simple enum with numbers\n */\nexport const zEnumWithExtensions = z.union([\n    z.literal(200),\n    z.literal(400),\n    z.literal(500)\n]);\n\nexport const zEnumWithXEnumNames = z.union([\n    z.literal(0),\n    z.literal(1),\n    z.literal(2)\n]);\n\n/**\n * This is a simple array with numbers\n */\nexport const zArrayWithNumbers = z.array(z.number().int());\n\n/**\n * This is a simple array with booleans\n */\nexport const zArrayWithBooleans = z.array(z.boolean());\n\n/**\n * This is a simple array with strings\n */\nexport const zArrayWithStrings = z.array(z.string()).default(['test']);\n\n/**\n * This is a simple array with properties\n */\nexport const zArrayWithProperties = z.array(z.object({\n    '16x16': zCamelCaseCommentWithBreaks.optional(),\n    bar: z.string().optional()\n}));\n\n/**\n * This is a simple array with any of properties\n */\nexport const zArrayWithAnyOfProperties = z.array(z.union([z.object({\n        foo: z.string().optional().default('test')\n    }), z.object({\n        bar: z.string().optional()\n    })]));\n\nexport const zAnyOfAnyAndNull = z.object({\n    data: z.unknown().nullish()\n});\n\n/**\n * This is a simple array with any of properties\n */\nexport const zAnyOfArrays = z.object({\n    results: z.array(z.union([z.object({\n            foo: z.string().optional()\n        }), z.object({\n            bar: z.string().optional()\n        })])).optional()\n});\n\n/**\n * This is a string dictionary\n */\nexport const zDictionaryWithString = z.record(z.string());\n\nexport const zDictionaryWithPropertiesAndAdditionalProperties = z.object({\n    foo: z.number().optional(),\n    bar: z.boolean().optional()\n});\n\n/**\n * This is a string dictionary\n */\nexport const zDictionaryWithDictionary = z.record(z.record(z.string()));\n\n/**\n * This is a complex dictionary\n */\nexport const zDictionaryWithProperties = z.record(z.object({\n    foo: z.string().optional(),\n    bar: z.string().optional()\n}));\n\n/**\n * This is a model with one number property\n */\nexport const zModelWithInteger = z.object({\n    prop: z.number().int().optional()\n});\n\n/**\n * This is a model with one boolean property\n */\nexport const zModelWithBoolean = z.object({\n    prop: z.boolean().optional()\n});\n\n/**\n * This is a model with one string property\n */\nexport const zModelWithString = z.object({\n    prop: z.string().optional()\n});\n\n/**\n * This is a simple reference\n */\nexport const zSimpleReference = zModelWithString;\n\n/**\n * This is a simple array with references\n */\nexport const zArrayWithReferences = z.array(zModelWithString);\n\n/**\n * This is a simple array containing an array\n */\nexport const zArrayWithArray = z.array(z.array(zModelWithString));\n\n/**\n * This is a string reference\n */\nexport const zDictionaryWithReference = z.record(zModelWithString);\n\n/**\n * This is a complex dictionary\n */\nexport const zDictionaryWithArray = z.record(z.array(zModelWithString));\n\n/**\n * This is a model with one string property\n */\nexport const zModelWithStringError = z.object({\n    prop: z.string().optional()\n});\n\n/**\n * `Comment` or `VoiceComment`. The JSON object for adding voice comments to tickets is different. See [Adding voice comments to tickets](/documentation/ticketing/managing-tickets/adding-voice-comments-to-tickets)\n */\nexport const zModelFromZendesk = z.string();\n\n/**\n * This is a model with one string property\n */\nexport const zModelWithNullableString = z.object({\n    nullableProp1: z.string().nullish(),\n    nullableRequiredProp1: z.string().nullable(),\n    nullableProp2: z.string().nullish(),\n    nullableRequiredProp2: z.string().nullable(),\n    'foo_bar-enum': z.enum([\n        'Success',\n        'Warning',\n        'Error',\n        'ØÆÅ字符串'\n    ]).optional()\n});\n\n/**\n * This is a model with one enum\n */\nexport const zModelWithEnum = z.object({\n    'foo_bar-enum': z.enum([\n        'Success',\n        'Warning',\n        'Error',\n        'ØÆÅ字符串'\n    ]).optional(),\n    statusCode: z.enum([\n        '100',\n        '200 FOO',\n        '300 FOO_BAR',\n        '400 foo-bar',\n        '500 foo.bar',\n        '600 foo&bar'\n    ]).optional(),\n    bool: z.literal(true).optional()\n});\n\n/**\n * This is a model with one enum with escaped name\n */\nexport const zModelWithEnumWithHyphen = z.object({\n    'foo-bar-baz-qux': z.enum(['3.0']).optional()\n});\n\n/**\n * This is a model with one enum\n */\nexport const zModelWithEnumFromDescription = z.object({\n    test: z.number().int().optional()\n});\n\n/**\n * This is a model with nested enums\n */\nexport const zModelWithNestedEnums = z.object({\n    dictionaryWithEnum: z.record(z.enum([\n        'Success',\n        'Warning',\n        'Error'\n    ])).optional(),\n    dictionaryWithEnumFromDescription: z.record(z.number().int()).optional(),\n    arrayWithEnum: z.array(z.enum([\n        'Success',\n        'Warning',\n        'Error'\n    ])).optional(),\n    arrayWithDescription: z.array(z.number().int()).optional(),\n    'foo_bar-enum': z.enum([\n        'Success',\n        'Warning',\n        'Error',\n        'ØÆÅ字符串'\n    ]).optional()\n});\n\n/**\n * This is a model with one property containing an array\n */\nexport const zModelWithArray = z.object({\n    prop: z.array(zModelWithString).optional(),\n    propWithFile: z.array(z.string()).optional(),\n    propWithNumber: z.array(z.number()).optional()\n});\n\n/**\n * This is a model with one property containing a dictionary\n */\nexport const zModelWithDictionary = z.object({\n    prop: z.record(z.string()).optional()\n});\n\n/**\n * This is a deprecated model with a deprecated property\n *\n * @deprecated\n */\nexport const zDeprecatedModel = z.object({\n    prop: z.string().optional()\n});\n\n/**\n * This is a model with one property containing a circular reference\n */\nexport const zModelWithCircularReference: z.AnyZodObject = z.object({\n    prop: z.lazy(() => zModelWithCircularReference).optional()\n});\n\n/**\n * This is a model with one property with a 'one of' relationship\n */\nexport const zCompositionWithOneOf = z.object({\n    propA: z.union([\n        zModelWithString,\n        zModelWithEnum,\n        zModelWithArray,\n        zModelWithDictionary\n    ]).optional()\n});\n\n/**\n * This is a model with one property with a 'one of' relationship where the options are not $ref\n */\nexport const zCompositionWithOneOfAnonymous = z.object({\n    propA: z.union([\n        z.object({\n            propA: z.string().optional()\n        }),\n        z.string(),\n        z.number().int()\n    ]).optional()\n});\n\n/**\n * Circle\n */\nexport const zModelCircle = z.object({\n    kind: z.string(),\n    radius: z.number().optional()\n});\n\n/**\n * Square\n */\nexport const zModelSquare = z.object({\n    kind: z.string(),\n    sideLength: z.number().optional()\n});\n\n/**\n * This is a model with one property with a 'one of' relationship where the options are not $ref\n */\nexport const zCompositionWithOneOfDiscriminator = z.union([\n    z.object({\n        kind: z.literal('circle')\n    }).and(zModelCircle),\n    z.object({\n        kind: z.literal('square')\n    }).and(zModelSquare)\n]);\n\n/**\n * This is a model with one property with a 'any of' relationship\n */\nexport const zCompositionWithAnyOf = z.object({\n    propA: z.union([\n        zModelWithString,\n        zModelWithEnum,\n        zModelWithArray,\n        zModelWithDictionary\n    ]).optional()\n});\n\n/**\n * This is a model with one property with a 'any of' relationship where the options are not $ref\n */\nexport const zCompositionWithAnyOfAnonymous = z.object({\n    propA: z.union([\n        z.object({\n            propA: z.string().optional()\n        }),\n        z.string(),\n        z.number().int()\n    ]).optional()\n});\n\n/**\n * This is a model with nested 'any of' property with a type null\n */\nexport const zCompositionWithNestedAnyAndTypeNull = z.object({\n    propA: z.union([\n        z.array(z.union([zModelWithDictionary, z.null()])),\n        z.array(z.union([zModelWithArray, z.null()]))\n    ]).optional()\n});\n\nexport const z3eNum1Период = z.enum(['Bird', 'Dog']);\n\nexport const zConstValue = z.literal('ConstValue');\n\n/**\n * This is a model with one property with a 'any of' relationship where the options are not $ref\n */\nexport const zCompositionWithNestedAnyOfAndNull = z.object({\n    propA: z.array(z.union([z3eNum1Период, zConstValue])).nullish()\n});\n\n/**\n * This is a model with one property with a 'one of' relationship\n */\nexport const zCompositionWithOneOfAndNullable = z.object({\n    propA: z.union([\n        z.object({\n            boolean: z.boolean().optional()\n        }),\n        zModelWithEnum,\n        zModelWithArray,\n        zModelWithDictionary\n    ]).nullish()\n});\n\n/**\n * This is a model that contains a simple dictionary within composition\n */\nexport const zCompositionWithOneOfAndSimpleDictionary = z.object({\n    propA: z.union([\n        z.boolean(),\n        z.record(z.number())\n    ]).optional()\n});\n\n/**\n * This is a model that contains a dictionary of simple arrays within composition\n */\nexport const zCompositionWithOneOfAndSimpleArrayDictionary = z.object({\n    propA: z.union([\n        z.boolean(),\n        z.record(z.array(z.boolean()))\n    ]).optional()\n});\n\n/**\n * This is a model that contains a dictionary of complex arrays (composited) within composition\n */\nexport const zCompositionWithOneOfAndComplexArrayDictionary = z.object({\n    propA: z.union([\n        z.boolean(),\n        z.record(z.array(z.union([z.number(), z.string()])))\n    ]).optional()\n});\n\n/**\n * This is a model with one property with a 'all of' relationship\n */\nexport const zCompositionWithAllOfAndNullable = z.object({\n    propA: z.object({\n        boolean: z.boolean().optional()\n    }).and(zModelWithEnum).and(zModelWithArray).and(zModelWithDictionary).nullish()\n});\n\n/**\n * This is a model with one property with a 'any of' relationship\n */\nexport const zCompositionWithAnyOfAndNullable = z.object({\n    propA: z.union([\n        z.object({\n            boolean: z.boolean().optional()\n        }),\n        zModelWithEnum,\n        zModelWithArray,\n        zModelWithDictionary\n    ]).nullish()\n});\n\n/**\n * This is a base model with two simple optional properties\n */\nexport const zCompositionBaseModel = z.object({\n    firstName: z.string().optional(),\n    lastname: z.string().optional()\n});\n\n/**\n * This is a model that extends the base model\n */\nexport const zCompositionExtendedModel = zCompositionBaseModel.and(z.object({\n    age: z.number(),\n    firstName: z.string(),\n    lastname: z.string()\n}));\n\n/**\n * This is a model with one nested property\n */\nexport const zModelWithProperties = z.object({\n    required: z.string(),\n    requiredAndReadOnly: z.string().readonly(),\n    requiredAndNullable: z.string().nullable(),\n    string: z.string().optional(),\n    number: z.number().optional(),\n    boolean: z.boolean().optional(),\n    reference: zModelWithString.optional(),\n    'property with space': z.string().optional(),\n    default: z.string().optional(),\n    try: z.string().optional(),\n    '@namespace.string': z.string().readonly().optional(),\n    '@namespace.integer': z.number().int().readonly().optional()\n});\n\n/**\n * This is a model with one property containing a reference\n */\nexport const zModelWithReference = z.object({\n    prop: zModelWithProperties.optional()\n});\n\n/**\n * This is a model with one nested property\n */\nexport const zModelWithNestedProperties = z.object({\n    first: z.object({\n        second: z.object({\n            third: z.string().readonly().nullable()\n        }).readonly().nullable()\n    }).readonly().nullable()\n});\n\n/**\n * This is a model with duplicated properties\n */\nexport const zModelWithDuplicateProperties = z.object({\n    prop: zModelWithString.optional()\n});\n\n/**\n * This is a model with ordered properties\n */\nexport const zModelWithOrderedProperties = z.object({\n    zebra: z.string().optional(),\n    apple: z.string().optional(),\n    hawaii: z.string().optional()\n});\n\n/**\n * This is a model with duplicated imports\n */\nexport const zModelWithDuplicateImports = z.object({\n    propA: zModelWithString.optional(),\n    propB: zModelWithString.optional(),\n    propC: zModelWithString.optional()\n});\n\n/**\n * This is a model that extends another model\n */\nexport const zModelThatExtends = zModelWithString.and(z.object({\n    propExtendsA: z.string().optional(),\n    propExtendsB: zModelWithString.optional()\n}));\n\n/**\n * This is a model that extends another model\n */\nexport const zModelThatExtendsExtends = zModelWithString.and(zModelThatExtends).and(z.object({\n    propExtendsC: z.string().optional(),\n    propExtendsD: zModelWithString.optional()\n}));\n\n/**\n * This is a model that contains a some patterns\n */\nexport const zModelWithPattern = z.object({\n    key: z.string().max(64).regex(/^[a-zA-Z0-9_]*$/),\n    name: z.string().max(255),\n    enabled: z.boolean().readonly().optional(),\n    modified: z.string().datetime().readonly().optional(),\n    id: z.string().regex(/^\\d{2}-\\d{3}-\\d{4}$/).optional(),\n    text: z.string().regex(/^\\w+$/).optional(),\n    patternWithSingleQuotes: z.string().regex(/^[a-zA-Z0-9']*$/).optional(),\n    patternWithNewline: z.string().regex(/aaa\\nbbb/).optional(),\n    patternWithBacktick: z.string().regex(/aaa`bbb/).optional(),\n    patternWithUnicode: z.string().regex(/^\\p{L}+$/u).optional()\n});\n\nexport const zFile = z.object({\n    id: z.string().min(1).readonly().optional(),\n    updated_at: z.string().datetime().readonly().optional(),\n    created_at: z.string().datetime().readonly().optional(),\n    mime: z.string().min(1).max(24),\n    file: z.string().url().readonly().optional()\n});\n\nexport const zDefault = z.object({\n    name: z.string().optional()\n});\n\nexport const zPageable = z.object({\n    page: z.number().int().gte(0).max(2147483647, { message: 'Invalid value: Expected int32 to be <= 2147483647' }).optional().default(0),\n    size: z.number().int().gte(1).max(2147483647, { message: 'Invalid value: Expected int32 to be <= 2147483647' }).optional(),\n    sort: z.array(z.string()).optional()\n});\n\n/**\n * This is a free-form object without additionalProperties.\n */\nexport const zFreeFormObjectWithoutAdditionalProperties = z.record(z.unknown());\n\n/**\n * This is a free-form object with additionalProperties: true.\n */\nexport const zFreeFormObjectWithAdditionalPropertiesEqTrue = z.record(z.unknown());\n\n/**\n * This is a free-form object with additionalProperties: {}.\n */\nexport const zFreeFormObjectWithAdditionalPropertiesEqEmptyObject = z.record(z.unknown());\n\nexport const zModelWithConst = z.object({\n    String: z.literal('String').optional(),\n    number: z.literal(0).optional(),\n    null: z.null().optional(),\n    withType: z.literal('Some string').optional()\n});\n\n/**\n * This is a model with one property and additionalProperties: true\n */\nexport const zModelWithAdditionalPropertiesEqTrue = z.object({\n    prop: z.string().optional()\n});\n\nexport const zNestedAnyOfArraysNullable = z.object({\n    nullableArray: z.array(z.union([z.string(), z.boolean()])).nullish()\n});\n\n/**\n * An object that can be null\n */\nexport const zNullableObject = z.object({\n    foo: z.string().optional()\n}).nullable().default(null);\n\n/**\n * Some % character\n */\nexport const zCharactersInDescription = z.string();\n\nexport const zModelWithNullableObject = z.object({\n    data: zNullableObject.optional()\n});\n\n/**\n * An object with additional properties that can be null (anyOf ref + null)\n */\nexport const zModelWithAdditionalPropertiesRef = z.record(zNullableObject.nullable());\n\nexport const zModelWithOneOfEnum = z.union([\n    z.object({\n        foo: z.enum(['Bar'])\n    }),\n    z.object({\n        foo: z.enum(['Baz'])\n    }),\n    z.object({\n        foo: z.enum(['Qux'])\n    }),\n    z.object({\n        content: z.string().datetime(),\n        foo: z.enum(['Quux'])\n    }),\n    z.object({\n        content: z.tuple([z.string().datetime(), z.string()]),\n        foo: z.enum(['Corge'])\n    })\n]);\n\nexport const zModelWithNestedArrayEnumsDataFoo = z.enum(['foo', 'bar']);\n\nexport const zModelWithNestedArrayEnumsDataBar = z.enum(['baz', 'qux']);\n\nexport const zModelWithNestedArrayEnumsData = z.object({\n    foo: z.array(zModelWithNestedArrayEnumsDataFoo).optional(),\n    bar: z.array(zModelWithNestedArrayEnumsDataBar).optional()\n});\n\nexport const zModelWithNestedArrayEnums = z.object({\n    array_strings: z.array(z.string()).optional(),\n    data: zModelWithNestedArrayEnumsData.optional()\n});\n\nexport const zModelWithNestedCompositionEnums = z.object({\n    foo: zModelWithNestedArrayEnumsDataFoo.optional()\n});\n\nexport const zModelWithReadOnlyAndWriteOnly = z.object({\n    foo: z.string(),\n    bar: z.string().readonly()\n});\n\n/**\n * This is a model with one property containing an array\n */\nexport const zModelWithArrayReadOnlyAndWriteOnly = z.object({\n    prop: z.array(zModelWithReadOnlyAndWriteOnly).optional(),\n    propWithFile: z.array(z.string()).optional(),\n    propWithNumber: z.array(z.number()).optional()\n});\n\nexport const zModelWithConstantSizeArray = z.tuple([z.number(), z.number()]);\n\nexport const zModelWithAnyOfConstantSizeArray = z.tuple([\n    z.union([\n        z.number(),\n        z.string()\n    ]),\n    z.union([\n        z.number(),\n        z.string()\n    ]),\n    z.union([\n        z.number(),\n        z.string()\n    ])\n]);\n\nexport const zModelWithPrefixItemsConstantSizeArray = z.tuple([\n    zModelWithInteger,\n    z.union([\n        z.number(),\n        z.string()\n    ]),\n    z.string()\n]);\n\nexport const zModelWithAnyOfConstantSizeArrayNullable = z.tuple([\n    z.union([\n        z.number(),\n        z.string()\n    ]).nullable(),\n    z.union([\n        z.number(),\n        z.string()\n    ]).nullable(),\n    z.union([\n        z.number(),\n        z.string()\n    ]).nullable()\n]);\n\nexport const zModelWithAnyOfConstantSizeArrayAndIntersect = z.tuple([z.intersection(z.number(), z.string()), z.intersection(z.number(), z.string())]);\n\nexport const zModelWithNumericEnumUnion = z.object({\n    value: z.union([\n        z.literal(-10),\n        z.literal(-1),\n        z.literal(0),\n        z.literal(1),\n        z.literal(3),\n        z.literal(6),\n        z.literal(12)\n    ]).optional()\n});\n\n/**\n * Some description with `back ticks`\n */\nexport const zModelWithBackticksInDescription = z.object({\n    template: z.string().optional()\n});\n\n/**\n * Model used to test deduplication strategy (unused)\n */\nexport const zParameterSimpleParameterUnused = z.string();\n\n/**\n * Model used to test deduplication strategy\n */\nexport const zPostServiceWithEmptyTagResponse = z.string();\n\n/**\n * Model used to test deduplication strategy\n */\nexport const zPostServiceWithEmptyTagResponse2 = z.string();\n\n/**\n * Model used to test deduplication strategy\n */\nexport const zDeleteFooData = z.string();\n\n/**\n * Model used to test deduplication strategy\n */\nexport const zDeleteFooData2 = z.string();\n\n/**\n * Model with restricted keyword name\n */\nexport const zImport = z.string();\n\nexport const zModelWithAnyOfConstantSizeArrayWithNSizeAndOptions = z.tuple([z.union([\n        z.number(),\n        zImport\n    ]), z.union([\n        z.number(),\n        zImport\n    ])]);\n\nexport const zSchemaWithFormRestrictedKeys = z.object({\n    description: z.string().optional(),\n    'x-enum-descriptions': z.string().optional(),\n    'x-enum-varnames': z.string().optional(),\n    'x-enumNames': z.string().optional(),\n    title: z.string().optional(),\n    object: z.object({\n        description: z.string().optional(),\n        'x-enum-descriptions': z.string().optional(),\n        'x-enum-varnames': z.string().optional(),\n        'x-enumNames': z.string().optional(),\n        title: z.string().optional()\n    }).optional(),\n    array: z.array(z.object({\n        description: z.string().optional(),\n        'x-enum-descriptions': z.string().optional(),\n        'x-enum-varnames': z.string().optional(),\n        'x-enumNames': z.string().optional(),\n        title: z.string().optional()\n    })).optional()\n});\n\n/**\n * This schema was giving PascalCase transformations a hard time\n */\nexport const zIoK8sApimachineryPkgApisMetaV1Preconditions = z.object({\n    resourceVersion: z.string().optional(),\n    uid: z.string().optional()\n});\n\n/**\n * This schema was giving PascalCase transformations a hard time\n */\nexport const zIoK8sApimachineryPkgApisMetaV1DeleteOptions = z.object({\n    preconditions: zIoK8sApimachineryPkgApisMetaV1Preconditions.optional()\n});\n\nexport const zAdditionalPropertiesUnknownIssue = z.record(z.union([\n    z.string(),\n    z.number()\n]));\n\nexport const zAdditionalPropertiesUnknownIssue2 = z.record(z.union([\n    z.string(),\n    z.number()\n]));\n\nexport const zAdditionalPropertiesUnknownIssue3 = z.intersection(z.string(), z.object({\n    entries: z.record(zAdditionalPropertiesUnknownIssue)\n}));\n\nexport const zAdditionalPropertiesIntegerIssue = z.object({\n    value: z.number().int()\n});\n\nexport const zGenericSchemaDuplicateIssue1SystemBoolean = z.object({\n    item: z.boolean().optional(),\n    error: z.string().nullish(),\n    hasError: z.boolean().readonly().optional(),\n    data: z.record(z.never()).optional()\n});\n\nexport const zGenericSchemaDuplicateIssue1SystemString = z.object({\n    item: z.string().nullish(),\n    error: z.string().nullish(),\n    hasError: z.boolean().readonly().optional()\n});\n\nexport const zOneOfAllOfIssue = z.union([\n    z.intersection(z.union([\n        zConstValue,\n        zGenericSchemaDuplicateIssue1SystemBoolean\n    ]), z3eNum1Период),\n    zGenericSchemaDuplicateIssue1SystemString\n]);\n\nexport const zExternalSharedModel = z.object({\n    id: z.string(),\n    name: z.string().optional()\n});\n\n/**\n * External ref to shared model (A)\n */\nexport const zExternalRefA = zExternalSharedModel;\n\n/**\n * External ref to shared model (B)\n */\nexport const zExternalRefB = zExternalSharedModel;\n\n/**\n * This is a model with one nested property\n */\nexport const zModelWithPropertiesWritable = z.object({\n    required: z.string(),\n    requiredAndNullable: z.string().nullable(),\n    string: z.string().optional(),\n    number: z.number().optional(),\n    boolean: z.boolean().optional(),\n    reference: zModelWithString.optional(),\n    'property with space': z.string().optional(),\n    default: z.string().optional(),\n    try: z.string().optional()\n});\n\n/**\n * This is a model with one property containing a reference\n */\nexport const zModelWithReferenceWritable = z.object({\n    prop: zModelWithPropertiesWritable.optional()\n});\n\n/**\n * This is a model that contains a some patterns\n */\nexport const zModelWithPatternWritable = z.object({\n    key: z.string().max(64).regex(/^[a-zA-Z0-9_]*$/),\n    name: z.string().max(255),\n    id: z.string().regex(/^\\d{2}-\\d{3}-\\d{4}$/).optional(),\n    text: z.string().regex(/^\\w+$/).optional(),\n    patternWithSingleQuotes: z.string().regex(/^[a-zA-Z0-9']*$/).optional(),\n    patternWithNewline: z.string().regex(/aaa\\nbbb/).optional(),\n    patternWithBacktick: z.string().regex(/aaa`bbb/).optional(),\n    patternWithUnicode: z.string().regex(/^\\p{L}+$/u).optional()\n});\n\nexport const zFileWritable = z.object({\n    mime: z.string().min(1).max(24)\n});\n\nexport const zModelWithReadOnlyAndWriteOnlyWritable = z.object({\n    foo: z.string(),\n    baz: z.string()\n});\n\n/**\n * This is a model with one property containing an array\n */\nexport const zModelWithArrayReadOnlyAndWriteOnlyWritable = z.object({\n    prop: z.array(zModelWithReadOnlyAndWriteOnlyWritable).optional(),\n    propWithFile: z.array(z.string()).optional(),\n    propWithNumber: z.array(z.number()).optional()\n});\n\nexport const zModelWithAnyOfConstantSizeArrayWithNSizeAndOptionsWritable = z.tuple([z.union([\n        z.number(),\n        zImport\n    ]), z.union([\n        z.number(),\n        zImport\n    ])]);\n\nexport const zAdditionalPropertiesUnknownIssueWritable = z.record(z.union([\n    z.string(),\n    z.number()\n]));\n\nexport const zOneOfAllOfIssueWritable = z.union([\n    z.intersection(z.union([\n        zConstValue,\n        zGenericSchemaDuplicateIssue1SystemBoolean\n    ]), z3eNum1Период),\n    zGenericSchemaDuplicateIssue1SystemString\n]);\n\nexport const zGenericSchemaDuplicateIssue1SystemBooleanWritable = z.object({\n    item: z.boolean().optional(),\n    error: z.string().nullish(),\n    data: z.record(z.never()).optional()\n});\n\nexport const zGenericSchemaDuplicateIssue1SystemStringWritable = z.object({\n    item: z.string().nullish(),\n    error: z.string().nullish()\n});\n\n/**\n * This is a reusable parameter\n */\nexport const zSimpleParameter = z.string();\n\nexport const zCompositionWithOneOfAndProperties = z.intersection(z.union([\n    z.object({\n        foo: zSimpleParameter\n    }),\n    z.object({\n        bar: zNonAsciiStringæøåÆøÅöôêÊ字符串\n    })\n]), z.object({\n    baz: z.number().int().gte(0).max(65535, { message: 'Invalid value: Expected uint16 to be <= 65535' }).nullable(),\n    qux: z.number().int().gte(0).max(255, { message: 'Invalid value: Expected uint8 to be <= 255' })\n}));\n\nexport const zModelWithOneOfAndProperties = z.intersection(z.union([\n    zSimpleParameter,\n    zNonAsciiStringæøåÆøÅöôêÊ字符串\n]), z.object({\n    baz: z.number().int().gte(0).max(65535, { message: 'Invalid value: Expected uint16 to be <= 65535' }).nullable(),\n    qux: z.number().int().gte(0).max(255, { message: 'Invalid value: Expected uint8 to be <= 255' })\n}));\n\n/**\n * Parameter with illegal characters\n */\nexport const zXFooBar = zModelWithString;\n\n/**\n * A reusable request body\n */\nexport const zSimpleRequestBody = zModelWithString;\n\n/**\n * A reusable request body\n */\nexport const zSimpleFormData = zModelWithString;\n\nexport const zExportData = z.object({\n    body: z.never().optional(),\n    path: z.never().optional(),\n    query: z.never().optional()\n});\n\nexport const zPatchApiVbyApiVersionNoTagData = z.object({\n    body: z.never().optional(),\n    path: z.never().optional(),\n    query: z.never().optional()\n});\n\nexport const zImportData = z.object({\n    body: z.union([\n        zModelWithReadOnlyAndWriteOnlyWritable,\n        zModelWithArrayReadOnlyAndWriteOnlyWritable\n    ]),\n    path: z.never().optional(),\n    query: z.never().optional()\n});\n\nexport const zImportResponse = z.union([\n    zModelFromZendesk,\n    zModelWithReadOnlyAndWriteOnly\n]);\n\nexport const zFooWowData = z.object({\n    body: z.never().optional(),\n    path: z.never().optional(),\n    query: z.never().optional()\n});\n\nexport const zApiVVersionODataControllerCountData = z.object({\n    body: z.never().optional(),\n    path: z.never().optional(),\n    query: z.never().optional()\n});\n\n/**\n * Success\n */\nexport const zApiVVersionODataControllerCountResponse = zModelFromZendesk;\n\nexport const zGetApiVbyApiVersionSimpleOperationData = z.object({\n    body: z.never().optional(),\n    path: z.object({\n        foo_param: z.union([\n            z.string(),\n            z.string().uuid()\n        ])\n    }),\n    query: z.never().optional()\n});\n\n/**\n * Response is a simple number\n */\nexport const zGetApiVbyApiVersionSimpleOperationResponse = z.number();\n\nexport const zDeleteCallWithoutParametersAndResponseData = z.object({\n    body: z.never().optional(),\n    path: z.never().optional(),\n    query: z.never().optional()\n});\n\nexport const zGetCallWithoutParametersAndResponseData = z.object({\n    body: z.never().optional(),\n    path: z.never().optional(),\n    query: z.never().optional()\n});\n\nexport const zHeadCallWithoutParametersAndResponseData = z.object({\n    body: z.never().optional(),\n    path: z.never().optional(),\n    query: z.never().optional()\n});\n\nexport const zOptionsCallWithoutParametersAndResponseData = z.object({\n    body: z.never().optional(),\n    path: z.never().optional(),\n    query: z.never().optional()\n});\n\nexport const zPatchCallWithoutParametersAndResponseData = z.object({\n    body: z.never().optional(),\n    path: z.never().optional(),\n    query: z.never().optional()\n});\n\nexport const zPostCallWithoutParametersAndResponseData = z.object({\n    body: z.never().optional(),\n    path: z.never().optional(),\n    query: z.never().optional()\n});\n\nexport const zPutCallWithoutParametersAndResponseData = z.object({\n    body: z.never().optional(),\n    path: z.never().optional(),\n    query: z.never().optional()\n});\n\nexport const zDeleteFooData3 = z.object({\n    body: z.never().optional(),\n    path: z.object({\n        foo_param: z.string(),\n        BarParam: z.string()\n    }),\n    query: z.never().optional(),\n    headers: z.object({\n        'x-Foo-Bar': zModelWithString\n    })\n});\n\nexport const zCallWithDescriptionsData = z.object({\n    body: z.never().optional(),\n    path: z.never().optional(),\n    query: z.object({\n        parameterWithBreaks: z.string().optional(),\n        parameterWithBackticks: z.string().optional(),\n        parameterWithSlashes: z.string().optional(),\n        parameterWithExpressionPlaceholders: z.string().optional(),\n        parameterWithQuotes: z.string().optional(),\n        parameterWithReservedCharacters: z.string().optional()\n    }).optional()\n});\n\nexport const zDeprecatedCallData = z.object({\n    body: z.never().optional(),\n    path: z.never().optional(),\n    query: z.never().optional(),\n    headers: z.object({\n        parameter: zDeprecatedModel.nullable()\n    })\n});\n\nexport const zCallWithParametersData = z.object({\n    body: z.record(z.unknown()).nullable(),\n    path: z.object({\n        parameterPath: z.string().nullable(),\n        'api-version': z.string().nullable()\n    }),\n    query: z.object({\n        foo_ref_enum: zModelWithNestedArrayEnumsDataFoo.optional(),\n        foo_all_of_enum: zModelWithNestedArrayEnumsDataFoo,\n        cursor: z.string().nullable()\n    }),\n    headers: z.object({\n        parameterHeader: z.string().nullable()\n    })\n});\n\nexport const zCallWithWeirdParameterNamesData = z.object({\n    body: zModelWithString.nullable(),\n    path: z.object({\n        'parameter.path.1': z.string().optional(),\n        'parameter-path-2': z.string().optional(),\n        'PARAMETER-PATH-3': z.string().optional(),\n        'api-version': z.string().nullable()\n    }),\n    query: z.object({\n        default: z.string().optional(),\n        'parameter-query': z.string().nullable()\n    }),\n    headers: z.object({\n        'parameter.header': z.string().nullable()\n    })\n});\n\nexport const zGetCallWithOptionalParamData = z.object({\n    body: zModelWithOneOfEnum,\n    path: z.never().optional(),\n    query: z.object({\n        page: z.number().optional()\n    }).optional()\n});\n\nexport const zPostCallWithOptionalParamData = z.object({\n    body: z.object({\n        offset: z.number().nullish()\n    }).optional(),\n    path: z.never().optional(),\n    query: z.object({\n        parameter: zPageable\n    })\n});\n\nexport const zPostCallWithOptionalParamResponse = z.union([\n    z.number(),\n    z.void()\n]);\n\nexport const zPostApiVbyApiVersionRequestBodyData = z.object({\n    body: zSimpleRequestBody.optional(),\n    path: z.never().optional(),\n    query: z.object({\n        parameter: z.string().optional()\n    }).optional()\n});\n\nexport const zPostApiVbyApiVersionFormDataData = z.object({\n    body: zSimpleFormData.optional(),\n    path: z.never().optional(),\n    query: z.object({\n        parameter: z.string().optional()\n    }).optional()\n});\n\nexport const zCallWithDefaultParametersData = z.object({\n    body: z.never().optional(),\n    path: z.never().optional(),\n    query: z.object({\n        parameterString: z.string().nullish().default('Hello World!'),\n        parameterNumber: z.number().nullish().default(123),\n        parameterBoolean: z.boolean().nullish().default(true),\n        parameterEnum: z.enum([\n            'Success',\n            'Warning',\n            'Error'\n        ]).optional(),\n        parameterModel: zModelWithString.nullish()\n    }).optional()\n});\n\nexport const zCallWithDefaultOptionalParametersData = z.object({\n    body: z.never().optional(),\n    path: z.never().optional(),\n    query: z.object({\n        parameterString: z.string().optional().default('Hello World!'),\n        parameterNumber: z.number().optional().default(123),\n        parameterBoolean: z.boolean().optional().default(true),\n        parameterEnum: z.enum([\n            'Success',\n            'Warning',\n            'Error'\n        ]).optional(),\n        parameterModel: zModelWithString.optional().default({ prop: 'Hello World!' })\n    }).optional()\n});\n\nexport const zCallToTestOrderOfParamsData = z.object({\n    body: z.never().optional(),\n    path: z.never().optional(),\n    query: z.object({\n        parameterOptionalStringWithDefault: z.string().optional().default('Hello World!'),\n        parameterOptionalStringWithEmptyDefault: z.string().optional().default(''),\n        parameterOptionalStringWithNoDefault: z.string().optional(),\n        parameterStringWithDefault: z.string().default('Hello World!'),\n        parameterStringWithEmptyDefault: z.string().default(''),\n        parameterStringWithNoDefault: z.string(),\n        parameterStringNullableWithNoDefault: z.string().nullish(),\n        parameterStringNullableWithDefault: z.string().nullish().default(null)\n    })\n});\n\nexport const zDuplicateNameData = z.object({\n    body: z.never().optional(),\n    path: z.never().optional(),\n    query: z.never().optional()\n});\n\nexport const zDuplicateName2Data = z.object({\n    body: z.never().optional(),\n    path: z.never().optional(),\n    query: z.never().optional()\n});\n\nexport const zDuplicateName3Data = z.object({\n    body: z.never().optional(),\n    path: z.never().optional(),\n    query: z.never().optional()\n});\n\nexport const zDuplicateName4Data = z.object({\n    body: z.never().optional(),\n    path: z.never().optional(),\n    query: z.never().optional()\n});\n\nexport const zCallWithNoContentResponseData = z.object({\n    body: z.never().optional(),\n    path: z.never().optional(),\n    query: z.never().optional()\n});\n\n/**\n * Success\n */\nexport const zCallWithNoContentResponseResponse = z.void();\n\nexport const zCallWithResponseAndNoContentResponseData = z.object({\n    body: z.never().optional(),\n    path: z.never().optional(),\n    query: z.never().optional()\n});\n\nexport const zCallWithResponseAndNoContentResponseResponse = z.union([\n    z.number(),\n    z.void()\n]);\n\nexport const zDummyAData = z.object({\n    body: z.never().optional(),\n    path: z.never().optional(),\n    query: z.never().optional()\n});\n\nexport const zDummyAResponse = z400;\n\nexport const zDummyBData = z.object({\n    body: z.never().optional(),\n    path: z.never().optional(),\n    query: z.never().optional()\n});\n\n/**\n * Success\n */\nexport const zDummyBResponse = z.void();\n\nexport const zCallWithResponseData = z.object({\n    body: z.never().optional(),\n    path: z.never().optional(),\n    query: z.never().optional()\n});\n\nexport const zCallWithResponseResponse = zImport;\n\nexport const zCallWithDuplicateResponsesData = z.object({\n    body: z.never().optional(),\n    path: z.never().optional(),\n    query: z.never().optional()\n});\n\nexport const zCallWithDuplicateResponsesResponse = z.union([\n    zModelWithBoolean.and(zModelWithInteger),\n    zModelWithString\n]);\n\nexport const zCallWithResponsesData = z.object({\n    body: z.never().optional(),\n    path: z.never().optional(),\n    query: z.never().optional()\n});\n\nexport const zCallWithResponsesResponse = z.union([\n    z.object({\n        '@namespace.string': z.string().readonly().optional(),\n        '@namespace.integer': z.number().int().readonly().optional(),\n        value: z.array(zModelWithString).readonly().optional()\n    }),\n    zModelThatExtends,\n    zModelThatExtendsExtends\n]);\n\nexport const zCollectionFormatData = z.object({\n    body: z.never().optional(),\n    path: z.never().optional(),\n    query: z.object({\n        parameterArrayCSV: z.array(z.string()).nullable(),\n        parameterArraySSV: z.array(z.string()).nullable(),\n        parameterArrayTSV: z.array(z.string()).nullable(),\n        parameterArrayPipes: z.array(z.string()).nullable(),\n        parameterArrayMulti: z.array(z.string()).nullable()\n    })\n});\n\nexport const zTypesData = z.object({\n    body: z.never().optional(),\n    path: z.object({\n        id: z.number().int().min(-2147483648, { message: 'Invalid value: Expected int32 to be >= -2147483648' }).max(2147483647, { message: 'Invalid value: Expected int32 to be <= 2147483647' }).optional()\n    }).optional(),\n    query: z.object({\n        parameterNumber: z.number().default(123),\n        parameterString: z.string().nullable().default('default'),\n        parameterBoolean: z.boolean().nullable().default(true),\n        parameterObject: z.record(z.unknown()).nullable().default(null),\n        parameterArray: z.array(z.string()).nullable(),\n        parameterDictionary: z.record(z.unknown()).nullable(),\n        parameterEnum: z.union([\n            z.literal('Success'),\n            z.literal('Warning'),\n            z.literal('Error')\n        ]).nullable()\n    })\n});\n\nexport const zTypesResponse = z.union([\n    z.number(),\n    z.string(),\n    z.boolean(),\n    z.record(z.unknown())\n]);\n\nexport const zUploadFileData = z.object({\n    body: z.string(),\n    path: z.object({\n        'api-version': z.string().nullable()\n    }),\n    query: z.never().optional()\n});\n\nexport const zUploadFileResponse = z.boolean();\n\nexport const zFileResponseData = z.object({\n    body: z.never().optional(),\n    path: z.object({\n        id: z.string(),\n        'api-version': z.string()\n    }),\n    query: z.never().optional()\n});\n\n/**\n * Success\n */\nexport const zFileResponseResponse = z.string();\n\nexport const zComplexTypesData = z.object({\n    body: z.never().optional(),\n    path: z.never().optional(),\n    query: z.object({\n        parameterObject: z.object({\n            first: z.object({\n                second: z.object({\n                    third: z.string().optional()\n                }).optional()\n            }).optional()\n        }),\n        parameterReference: zModelWithString\n    })\n});\n\n/**\n * Successful response\n */\nexport const zComplexTypesResponse = z.array(zModelWithString);\n\nexport const zMultipartResponseData = z.object({\n    body: z.never().optional(),\n    path: z.never().optional(),\n    query: z.never().optional()\n});\n\n/**\n * OK\n */\nexport const zMultipartResponseResponse = z.object({\n    file: z.string().optional(),\n    metadata: z.object({\n        foo: z.string().optional(),\n        bar: z.string().optional()\n    }).optional()\n});\n\nexport const zMultipartRequestData = z.object({\n    body: z.object({\n        content: z.string().optional(),\n        data: zModelWithString.nullish()\n    }).optional(),\n    path: z.never().optional(),\n    query: z.never().optional()\n});\n\nexport const zComplexParamsData = z.object({\n    body: z.object({\n        key: z.string().max(64).regex(/^[a-zA-Z0-9_]*$/).readonly().nullable(),\n        name: z.string().max(255).nullable(),\n        enabled: z.boolean().optional().default(true),\n        type: z.enum([\n            'Monkey',\n            'Horse',\n            'Bird'\n        ]),\n        listOfModels: z.array(zModelWithString).nullish(),\n        listOfStrings: z.array(z.string()).nullish(),\n        parameters: z.union([\n            zModelWithString,\n            zModelWithEnum,\n            zModelWithArray,\n            zModelWithDictionary\n        ]),\n        user: z.object({\n            id: z.number().int().min(-2147483648, { message: 'Invalid value: Expected int32 to be >= -2147483648' }).max(2147483647, { message: 'Invalid value: Expected int32 to be <= 2147483647' }).readonly().optional(),\n            name: z.string().readonly().nullish()\n        }).readonly().optional()\n    }).optional(),\n    path: z.object({\n        id: z.number().int().min(-2147483648, { message: 'Invalid value: Expected int32 to be >= -2147483648' }).max(2147483647, { message: 'Invalid value: Expected int32 to be <= 2147483647' }),\n        'api-version': z.string()\n    }),\n    query: z.never().optional()\n});\n\n/**\n * Success\n */\nexport const zComplexParamsResponse = zModelWithString;\n\nexport const zCallWithResultFromHeaderData = z.object({\n    body: z.never().optional(),\n    path: z.never().optional(),\n    query: z.never().optional()\n});\n\nexport const zTestErrorCodeData = z.object({\n    body: z.never().optional(),\n    path: z.never().optional(),\n    query: z.object({\n        status: z.number().int()\n    })\n});\n\nexport const zNonAsciiæøåÆøÅöôêÊ字符串Data = z.object({\n    body: z.never().optional(),\n    path: z.never().optional(),\n    query: z.object({\n        nonAsciiParamæøåÆØÅöôêÊ: z.number().int()\n    })\n});\n\n/**\n * Successful response\n */\nexport const zNonAsciiæøåÆøÅöôêÊ字符串Response = z.array(zNonAsciiStringæøåÆøÅöôêÊ字符串);\n\nexport const zPutWithFormUrlEncodedData = z.object({\n    body: zArrayWithStrings,\n    path: z.never().optional(),\n    query: z.never().optional()\n});\n"
  },
  {
    "path": "packages/openapi-ts-tests/zod/v3/__snapshots__/3.1.x/v3/enum-null/zod.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport { z } from 'zod';\n\nexport const zFoo = z.enum(['foo', 'bar']).nullable();\n\nexport const zBar = z.enum(['foo', 'bar']);\n\nexport const zBaz = z.enum(['foo', 'bar']);\n"
  },
  {
    "path": "packages/openapi-ts-tests/zod/v3/__snapshots__/3.1.x/v3/enum-resolver-permissive/zod.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport { z } from 'zod';\n\nexport const zFoo = z.union([z.enum(['foo', 'bar']), z.string()]).nullable();\n\nexport const zBar = z.union([z.enum(['foo', 'bar']), z.string()]);\n\nexport const zBaz = z.union([z.enum(['foo', 'bar']), z.string()]);\n"
  },
  {
    "path": "packages/openapi-ts-tests/zod/v3/__snapshots__/3.1.x/v3/schema-const/zod.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport { z } from 'zod';\n\nexport const zFoo = z.object({\n    foo: z.literal('foo').optional(),\n    bar: z.literal(3.2).optional(),\n    baz: z.literal(-1).optional(),\n    qux: z.literal(true).optional(),\n    quux: z.tuple([\n        z.literal(1),\n        z.literal(2),\n        z.literal(3),\n        z.literal('foo'),\n        z.literal(true)\n    ]).optional(),\n    corge: z.record(z.unknown()).optional(),\n    garply: z.literal(BigInt('10')).optional(),\n    numberInt8: z.literal(100).optional(),\n    numberInt16: z.literal(1000).optional(),\n    numberInt32: z.literal(100000).optional(),\n    numberInt64: z.literal(BigInt(1000000000000)).optional(),\n    numberUint8: z.literal(200).optional(),\n    numberUint16: z.literal(50000).optional(),\n    numberUint32: z.literal(3000000000).optional(),\n    numberUint64: z.literal(BigInt(18000000000000000000)).optional(),\n    integerInt8: z.literal(-100).optional(),\n    integerInt16: z.literal(-1000).optional(),\n    integerInt32: z.literal(-100000).optional(),\n    integerInt64: z.literal(BigInt(-1000000000000)).optional(),\n    integerUint8: z.literal(255).optional(),\n    integerUint16: z.literal(65535).optional(),\n    integerUint32: z.literal(4294967295).optional(),\n    integerUint64: z.literal(BigInt('18446744073709551615')).optional(),\n    stringInt64: z.literal(BigInt('-9223372036854775808')).optional(),\n    stringUint64: z.literal(BigInt('18446744073709551615')).optional()\n});\n"
  },
  {
    "path": "packages/openapi-ts-tests/zod/v3/__snapshots__/3.1.x/v3/type-format/zod.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport { z } from 'zod';\n\nexport const zFoo = z.object({\n    bar: z.number().int().optional(),\n    foo: z.coerce.bigint().min(BigInt('-9223372036854775808'), { message: 'Invalid value: Expected int64 to be >= -9223372036854775808' }).max(BigInt('9223372036854775807'), { message: 'Invalid value: Expected int64 to be <= 9223372036854775807' }).default(BigInt(0)),\n    id: z.string()\n});\n\nexport const zBar = z.object({\n    foo: z.number().int()\n});\n\nexport const zPostFooData = z.object({\n    body: z.never().optional(),\n    path: z.never().optional(),\n    query: z.never().optional()\n});\n\n/**\n * OK\n */\nexport const zPostFooResponse = zFoo;\n"
  },
  {
    "path": "packages/openapi-ts-tests/zod/v3/__snapshots__/3.1.x/v3/validators/zod.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport { z } from 'zod';\n\nexport const zBaz = z.string().regex(/foo\\nbar/).readonly().default('baz');\n\nexport const zQux = z.record(z.object({\n    qux: z.string().optional()\n}));\n\n/**\n * This is Foo schema.\n */\nexport const zFoo: z.ZodTypeAny = z.object({\n    foo: z.string().regex(/^\\d{3}-\\d{2}-\\d{4}$/).optional(),\n    bar: z.lazy(() => zBar).optional(),\n    baz: z.array(z.lazy(() => zFoo)).optional(),\n    qux: z.number().int().gt(0).optional().default(0)\n}).nullable().default(null);\n\n/**\n * This is Bar schema.\n */\nexport const zBar = z.object({\n    foo: zFoo.optional()\n});\n\n/**\n * This is Foo parameter.\n */\nexport const zFoo2 = z.string();\n\nexport const zFoo3 = z.object({\n    foo: zBar.optional()\n});\n\nexport const zPatchFooData = z.object({\n    body: z.object({\n        foo: z.string().optional()\n    }),\n    path: z.never().optional(),\n    query: z.object({\n        foo: z.string().optional(),\n        bar: zBar.optional(),\n        baz: z.object({\n            baz: z.string().optional()\n        }).optional(),\n        qux: z.string().date().optional(),\n        quux: z.string().datetime().optional()\n    }).optional()\n});\n\nexport const zPostFooData = z.object({\n    body: zFoo3,\n    path: z.never().optional(),\n    query: z.never().optional()\n});\n"
  },
  {
    "path": "packages/openapi-ts-tests/zod/v3/__snapshots__/3.1.x/v3/validators-bigint-min-max/zod.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport { z } from 'zod';\n\nexport const zFoo = z.object({\n    foo: z.coerce.bigint().gte(BigInt(0)).lte(BigInt(100)).optional()\n});\n"
  },
  {
    "path": "packages/openapi-ts-tests/zod/v3/__snapshots__/3.1.x/v3/validators-circular-ref/zod.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport { z } from 'zod';\n\nexport const zBar: z.AnyZodObject = z.object({\n    bar: z.array(z.lazy(() => zBar)).optional()\n});\n\nexport const zFoo = z.object({\n    foo: zBar.optional()\n});\n\nexport const zBaz: z.ZodTypeAny = z.lazy(() => zQux);\n\n/**\n * description caused circular reference error\n */\nexport const zQux = zBaz;\n"
  },
  {
    "path": "packages/openapi-ts-tests/zod/v3/__snapshots__/3.1.x/v3/validators-circular-ref-2/zod.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport { z } from 'zod';\n\nexport const zBar: z.AnyZodObject = z.object({\n    bar: z.array(z.lazy(() => zBar)).nullable()\n});\n\nexport const zFoo = z.object({\n    foo: zBar\n});\n"
  },
  {
    "path": "packages/openapi-ts-tests/zod/v3/__snapshots__/3.1.x/v3/validators-dates/zod.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport { z } from 'zod';\n\nexport const zBaz = z.string().regex(/foo\\nbar/).readonly().default('baz');\n\nexport const zQux = z.record(z.object({\n    qux: z.string().optional()\n}));\n\n/**\n * This is Foo schema.\n */\nexport const zFoo: z.ZodTypeAny = z.object({\n    foo: z.string().regex(/^\\d{3}-\\d{2}-\\d{4}$/).optional(),\n    bar: z.lazy(() => zBar).optional(),\n    baz: z.array(z.lazy(() => zFoo)).optional(),\n    qux: z.number().int().gt(0).optional().default(0)\n}).nullable().default(null);\n\n/**\n * This is Bar schema.\n */\nexport const zBar = z.object({\n    foo: zFoo.optional()\n});\n\n/**\n * This is Foo parameter.\n */\nexport const zFoo2 = z.string();\n\nexport const zFoo3 = z.object({\n    foo: zBar.optional()\n});\n\nexport const zPatchFooData = z.object({\n    body: z.object({\n        foo: z.string().optional()\n    }),\n    path: z.never().optional(),\n    query: z.object({\n        foo: z.string().optional(),\n        bar: zBar.optional(),\n        baz: z.object({\n            baz: z.string().optional()\n        }).optional(),\n        qux: z.string().date().optional(),\n        quux: z.string().datetime({ offset: true }).optional()\n    }).optional()\n});\n\nexport const zPostFooData = z.object({\n    body: zFoo3,\n    path: z.never().optional(),\n    query: z.never().optional()\n});\n"
  },
  {
    "path": "packages/openapi-ts-tests/zod/v3/__snapshots__/3.1.x/v3/validators-metadata/zod.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport { z } from 'zod';\n\nexport const zBaz = z.string().regex(/foo\\nbar/).readonly().default('baz');\n\nexport const zQux = z.record(z.object({\n    qux: z.string().optional()\n}));\n\n/**\n * This is Foo schema.\n */\nexport const zFoo: z.ZodTypeAny = z.object({\n    foo: z.string().regex(/^\\d{3}-\\d{2}-\\d{4}$/).describe('This is foo property.').optional(),\n    bar: z.lazy(() => zBar).optional(),\n    baz: z.array(z.lazy(() => zFoo)).describe('This is baz property.').optional(),\n    qux: z.number().int().gt(0).describe('This is qux property.').optional().default(0)\n}).nullable().default(null);\n\n/**\n * This is Bar schema.\n */\nexport const zBar = z.object({\n    foo: zFoo.optional()\n}).describe('This is Bar schema.');\n\n/**\n * This is Foo parameter.\n */\nexport const zFoo2 = z.string().describe('This is Foo parameter.');\n\nexport const zFoo3 = z.object({\n    foo: zBar.optional()\n});\n\nexport const zPatchFooData = z.object({\n    body: z.object({\n        foo: z.string().optional()\n    }),\n    path: z.never().optional(),\n    query: z.object({\n        foo: z.string().describe('This is Foo parameter.').optional(),\n        bar: zBar.optional(),\n        baz: z.object({\n            baz: z.string().optional()\n        }).optional(),\n        qux: z.string().date().optional(),\n        quux: z.string().datetime().optional()\n    }).optional()\n});\n\nexport const zPostFooData = z.object({\n    body: zFoo3,\n    path: z.never().optional(),\n    query: z.never().optional()\n});\n"
  },
  {
    "path": "packages/openapi-ts-tests/zod/v3/__snapshots__/3.1.x/v3/validators-string-constraints-union/zod.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport { z } from 'zod';\n\nexport const zLocaleOrLanguage = z.union([\n    z.string().length(5),\n    z.string().length(2)\n]);\n"
  },
  {
    "path": "packages/openapi-ts-tests/zod/v3/__snapshots__/3.1.x/v3/validators-types/zod.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport { z } from 'zod';\n\nexport const zBaz = z.string().regex(/foo\\nbar/).readonly().default('baz');\n\nexport type BazZodType = z.infer<typeof zBaz>;\n\nexport const zQux = z.record(z.object({\n    qux: z.string().optional()\n}));\n\nexport type QuxZodType = z.infer<typeof zQux>;\n\n/**\n * This is Foo schema.\n */\nexport const zFoo: z.ZodTypeAny = z.object({\n    foo: z.string().regex(/^\\d{3}-\\d{2}-\\d{4}$/).optional(),\n    bar: z.lazy(() => zBar).optional(),\n    baz: z.array(z.lazy(() => zFoo)).optional(),\n    qux: z.number().int().gt(0).optional().default(0)\n}).nullable().default(null);\n\nexport type FooZodType = z.infer<typeof zFoo>;\n\n/**\n * This is Bar schema.\n */\nexport const zBar = z.object({\n    foo: zFoo.optional()\n});\n\nexport type BarZodType = z.infer<typeof zBar>;\n\n/**\n * This is Foo parameter.\n */\nexport const zFoo2 = z.string();\n\nexport type FooZodType2 = z.infer<typeof zFoo2>;\n\nexport const zFoo3 = z.object({\n    foo: zBar.optional()\n});\n\nexport type FooZodType3 = z.infer<typeof zFoo3>;\n\nexport const zPatchFooData = z.object({\n    body: z.object({\n        foo: z.string().optional()\n    }),\n    path: z.never().optional(),\n    query: z.object({\n        foo: z.string().optional(),\n        bar: zBar.optional(),\n        baz: z.object({\n            baz: z.string().optional()\n        }).optional(),\n        qux: z.string().date().optional(),\n        quux: z.string().datetime().optional()\n    }).optional()\n});\n\nexport type PatchFooDataZodType = z.infer<typeof zPatchFooData>;\n\nexport const zPostFooData = z.object({\n    body: zFoo3,\n    path: z.never().optional(),\n    query: z.never().optional()\n});\n\nexport type PostFooDataZodType = z.infer<typeof zPostFooData>;\n"
  },
  {
    "path": "packages/openapi-ts-tests/zod/v3/__snapshots__/3.1.x/v3/validators-union-merge/zod.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport { z } from 'zod';\n\nexport const zContact = z.union([\n    z.object({\n        email: z.string()\n    }),\n    z.object({\n        phone: z.string()\n    })\n]);\n\nexport const zUser = zContact.and(z.object({\n    username: z.string()\n}));\n\nexport const zDogDetails = z.object({\n    breed: z.string(),\n    barkVolume: z.number().int().gte(1).lte(10)\n});\n\nexport const zCatDetails = z.object({\n    furLength: z.enum([\n        'short',\n        'medium',\n        'long'\n    ]),\n    purrs: z.boolean()\n});\n\nexport const zPetStore = z.object({\n    animals: z.array(z.object({\n        name: z.string(),\n        type: z.enum(['dog', 'cat']).optional(),\n        details: z.union([\n            zDogDetails,\n            zCatDetails\n        ])\n    }))\n});\n"
  },
  {
    "path": "packages/openapi-ts-tests/zod/v3/__snapshots__/3.1.x/v4/array-items-all-of/zod.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport * as z from 'zod/v4';\n\nexport const zArrayWithAllOfObjects = z.array(z.object({\n    id: z.int().optional()\n}).and(z.object({\n    name: z.string().optional()\n})));\n\nexport const zArrayWithAllOfPrimitives = z.array(z.intersection(z.number(), z.string()));\n\nexport const zBaseModel = z.object({\n    id: z.int().optional(),\n    createdAt: z.iso.datetime().optional()\n});\n\nexport const zArrayWithAllOfRefs = z.array(zBaseModel.and(z.object({\n    extra: z.string().optional()\n})));\n"
  },
  {
    "path": "packages/openapi-ts-tests/zod/v3/__snapshots__/3.1.x/v4/array-items-one-of-length-1/zod.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport * as z from 'zod/v4';\n\nexport const zBar = z.string();\n\nexport const zFoo = z.object({\n    foo: z.array(zBar).min(1).max(2147483647).optional()\n});\n"
  },
  {
    "path": "packages/openapi-ts-tests/zod/v3/__snapshots__/3.1.x/v4/default/zod.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport * as z from 'zod/v4';\n\n/**\n * Model with number-only name\n */\nexport const z400 = z.string();\n\n/**\n * Testing multiline comments in string: First line\n * Second line\n *\n * Fourth line\n */\nexport const zCamelCaseCommentWithBreaks = z.int();\n\n/**\n * Testing multiline comments in string: First line\n * Second line\n *\n * Fourth line\n */\nexport const zCommentWithBreaks = z.int();\n\n/**\n * Testing backticks in string: `backticks` and ```multiple backticks``` should work\n */\nexport const zCommentWithBackticks = z.int();\n\n/**\n * Testing backticks and quotes in string: `backticks`, 'quotes', \"double quotes\" and ```multiple backticks``` should work\n */\nexport const zCommentWithBackticksAndQuotes = z.int();\n\n/**\n * Testing slashes in string: \\backwards\\\\\\ and /forwards/// should work\n */\nexport const zCommentWithSlashes = z.int();\n\n/**\n * Testing expression placeholders in string: ${expression} should work\n */\nexport const zCommentWithExpressionPlaceholders = z.int();\n\n/**\n * Testing quotes in string: 'single quote''' and \"double quotes\"\"\" should work\n */\nexport const zCommentWithQuotes = z.int();\n\n/**\n * Testing reserved characters in string: * inline * and ** inline ** should work\n */\nexport const zCommentWithReservedCharacters = z.int();\n\n/**\n * This is a simple number\n */\nexport const zSimpleInteger = z.int();\n\n/**\n * This is a simple boolean\n */\nexport const zSimpleBoolean = z.boolean();\n\n/**\n * This is a simple string\n */\nexport const zSimpleString = z.string();\n\n/**\n * A string with non-ascii (unicode) characters valid in typescript identifiers (æøåÆØÅöÔèÈ字符串)\n */\nexport const zNonAsciiStringæøåÆøÅöôêÊ字符串 = z.string();\n\n/**\n * This is a simple file\n */\nexport const zSimpleFile = z.string();\n\n/**\n * This is a simple string\n */\nexport const zSimpleStringWithPattern = z.string().max(64).regex(/^[a-zA-Z0-9_]*$/).nullable();\n\n/**\n * This is a simple enum with strings\n */\nexport const zEnumWithStrings = z.enum([\n    'Success',\n    'Warning',\n    'Error',\n    '\\'Single Quote\\'',\n    '\"Double Quotes\"',\n    'Non-ascii: øæåôöØÆÅÔÖ字符串'\n]);\n\nexport const zEnumWithReplacedCharacters = z.union([\n    z.literal('\\'Single Quote\\''),\n    z.literal('\"Double Quotes\"'),\n    z.literal('øæåôöØÆÅÔÖ字符串'),\n    z.literal(3.1),\n    z.literal('')\n]);\n\n/**\n * This is a simple enum with numbers\n */\nexport const zEnumWithNumbers = z.union([\n    z.literal(1),\n    z.literal(2),\n    z.literal(3),\n    z.literal(1.1),\n    z.literal(1.2),\n    z.literal(1.3),\n    z.literal(100),\n    z.literal(200),\n    z.literal(300),\n    z.literal(-100),\n    z.literal(-200),\n    z.literal(-300),\n    z.literal(-1.1),\n    z.literal(-1.2),\n    z.literal(-1.3)\n]);\n\n/**\n * Success=1,Warning=2,Error=3\n */\nexport const zEnumFromDescription = z.number();\n\n/**\n * This is a simple enum with numbers\n */\nexport const zEnumWithExtensions = z.union([\n    z.literal(200),\n    z.literal(400),\n    z.literal(500)\n]);\n\nexport const zEnumWithXEnumNames = z.union([\n    z.literal(0),\n    z.literal(1),\n    z.literal(2)\n]);\n\n/**\n * This is a simple array with numbers\n */\nexport const zArrayWithNumbers = z.array(z.int());\n\n/**\n * This is a simple array with booleans\n */\nexport const zArrayWithBooleans = z.array(z.boolean());\n\n/**\n * This is a simple array with strings\n */\nexport const zArrayWithStrings = z.array(z.string()).default(['test']);\n\n/**\n * This is a simple array with properties\n */\nexport const zArrayWithProperties = z.array(z.object({\n    '16x16': zCamelCaseCommentWithBreaks.optional(),\n    bar: z.string().optional()\n}));\n\n/**\n * This is a simple array with any of properties\n */\nexport const zArrayWithAnyOfProperties = z.array(z.union([z.object({\n        foo: z.string().optional().default('test')\n    }), z.object({\n        bar: z.string().optional()\n    })]));\n\nexport const zAnyOfAnyAndNull = z.object({\n    data: z.unknown().nullish()\n});\n\n/**\n * This is a simple array with any of properties\n */\nexport const zAnyOfArrays = z.object({\n    results: z.array(z.union([z.object({\n            foo: z.string().optional()\n        }), z.object({\n            bar: z.string().optional()\n        })])).optional()\n});\n\n/**\n * This is a string dictionary\n */\nexport const zDictionaryWithString = z.record(z.string(), z.string());\n\nexport const zDictionaryWithPropertiesAndAdditionalProperties = z.object({\n    foo: z.number().optional(),\n    bar: z.boolean().optional()\n});\n\n/**\n * This is a string dictionary\n */\nexport const zDictionaryWithDictionary = z.record(z.string(), z.record(z.string(), z.string()));\n\n/**\n * This is a complex dictionary\n */\nexport const zDictionaryWithProperties = z.record(z.string(), z.object({\n    foo: z.string().optional(),\n    bar: z.string().optional()\n}));\n\n/**\n * This is a model with one number property\n */\nexport const zModelWithInteger = z.object({\n    prop: z.int().optional()\n});\n\n/**\n * This is a model with one boolean property\n */\nexport const zModelWithBoolean = z.object({\n    prop: z.boolean().optional()\n});\n\n/**\n * This is a model with one string property\n */\nexport const zModelWithString = z.object({\n    prop: z.string().optional()\n});\n\n/**\n * This is a simple reference\n */\nexport const zSimpleReference = zModelWithString;\n\n/**\n * This is a simple array with references\n */\nexport const zArrayWithReferences = z.array(zModelWithString);\n\n/**\n * This is a simple array containing an array\n */\nexport const zArrayWithArray = z.array(z.array(zModelWithString));\n\n/**\n * This is a string reference\n */\nexport const zDictionaryWithReference = z.record(z.string(), zModelWithString);\n\n/**\n * This is a complex dictionary\n */\nexport const zDictionaryWithArray = z.record(z.string(), z.array(zModelWithString));\n\n/**\n * This is a model with one string property\n */\nexport const zModelWithStringError = z.object({\n    prop: z.string().optional()\n});\n\n/**\n * `Comment` or `VoiceComment`. The JSON object for adding voice comments to tickets is different. See [Adding voice comments to tickets](/documentation/ticketing/managing-tickets/adding-voice-comments-to-tickets)\n */\nexport const zModelFromZendesk = z.string();\n\n/**\n * This is a model with one string property\n */\nexport const zModelWithNullableString = z.object({\n    nullableProp1: z.string().nullish(),\n    nullableRequiredProp1: z.string().nullable(),\n    nullableProp2: z.string().nullish(),\n    nullableRequiredProp2: z.string().nullable(),\n    'foo_bar-enum': z.enum([\n        'Success',\n        'Warning',\n        'Error',\n        'ØÆÅ字符串'\n    ]).optional()\n});\n\n/**\n * This is a model with one enum\n */\nexport const zModelWithEnum = z.object({\n    'foo_bar-enum': z.enum([\n        'Success',\n        'Warning',\n        'Error',\n        'ØÆÅ字符串'\n    ]).optional(),\n    statusCode: z.enum([\n        '100',\n        '200 FOO',\n        '300 FOO_BAR',\n        '400 foo-bar',\n        '500 foo.bar',\n        '600 foo&bar'\n    ]).optional(),\n    bool: z.literal(true).optional()\n});\n\n/**\n * This is a model with one enum with escaped name\n */\nexport const zModelWithEnumWithHyphen = z.object({\n    'foo-bar-baz-qux': z.enum(['3.0']).optional()\n});\n\n/**\n * This is a model with one enum\n */\nexport const zModelWithEnumFromDescription = z.object({\n    test: z.int().optional()\n});\n\n/**\n * This is a model with nested enums\n */\nexport const zModelWithNestedEnums = z.object({\n    dictionaryWithEnum: z.record(z.string(), z.enum([\n        'Success',\n        'Warning',\n        'Error'\n    ])).optional(),\n    dictionaryWithEnumFromDescription: z.record(z.string(), z.int()).optional(),\n    arrayWithEnum: z.array(z.enum([\n        'Success',\n        'Warning',\n        'Error'\n    ])).optional(),\n    arrayWithDescription: z.array(z.int()).optional(),\n    'foo_bar-enum': z.enum([\n        'Success',\n        'Warning',\n        'Error',\n        'ØÆÅ字符串'\n    ]).optional()\n});\n\n/**\n * This is a model with one property containing an array\n */\nexport const zModelWithArray = z.object({\n    prop: z.array(zModelWithString).optional(),\n    propWithFile: z.array(z.string()).optional(),\n    propWithNumber: z.array(z.number()).optional()\n});\n\n/**\n * This is a model with one property containing a dictionary\n */\nexport const zModelWithDictionary = z.object({\n    prop: z.record(z.string(), z.string()).optional()\n});\n\n/**\n * This is a deprecated model with a deprecated property\n *\n * @deprecated\n */\nexport const zDeprecatedModel = z.object({\n    prop: z.string().optional()\n});\n\n/**\n * This is a model with one property containing a circular reference\n */\nexport const zModelWithCircularReference = z.object({\n    prop: z.lazy((): any => zModelWithCircularReference).optional()\n});\n\n/**\n * This is a model with one property with a 'one of' relationship\n */\nexport const zCompositionWithOneOf = z.object({\n    propA: z.union([\n        zModelWithString,\n        zModelWithEnum,\n        zModelWithArray,\n        zModelWithDictionary\n    ]).optional()\n});\n\n/**\n * This is a model with one property with a 'one of' relationship where the options are not $ref\n */\nexport const zCompositionWithOneOfAnonymous = z.object({\n    propA: z.union([\n        z.object({\n            propA: z.string().optional()\n        }),\n        z.string(),\n        z.int()\n    ]).optional()\n});\n\n/**\n * Circle\n */\nexport const zModelCircle = z.object({\n    kind: z.string(),\n    radius: z.number().optional()\n});\n\n/**\n * Square\n */\nexport const zModelSquare = z.object({\n    kind: z.string(),\n    sideLength: z.number().optional()\n});\n\n/**\n * This is a model with one property with a 'one of' relationship where the options are not $ref\n */\nexport const zCompositionWithOneOfDiscriminator = z.union([\n    z.object({\n        kind: z.literal('circle')\n    }).and(zModelCircle),\n    z.object({\n        kind: z.literal('square')\n    }).and(zModelSquare)\n]);\n\n/**\n * This is a model with one property with a 'any of' relationship\n */\nexport const zCompositionWithAnyOf = z.object({\n    propA: z.union([\n        zModelWithString,\n        zModelWithEnum,\n        zModelWithArray,\n        zModelWithDictionary\n    ]).optional()\n});\n\n/**\n * This is a model with one property with a 'any of' relationship where the options are not $ref\n */\nexport const zCompositionWithAnyOfAnonymous = z.object({\n    propA: z.union([\n        z.object({\n            propA: z.string().optional()\n        }),\n        z.string(),\n        z.int()\n    ]).optional()\n});\n\n/**\n * This is a model with nested 'any of' property with a type null\n */\nexport const zCompositionWithNestedAnyAndTypeNull = z.object({\n    propA: z.union([\n        z.array(z.union([zModelWithDictionary, z.null()])),\n        z.array(z.union([zModelWithArray, z.null()]))\n    ]).optional()\n});\n\nexport const z3eNum1Период = z.enum(['Bird', 'Dog']);\n\nexport const zConstValue = z.literal('ConstValue');\n\n/**\n * This is a model with one property with a 'any of' relationship where the options are not $ref\n */\nexport const zCompositionWithNestedAnyOfAndNull = z.object({\n    propA: z.array(z.union([z3eNum1Период, zConstValue])).nullish()\n});\n\n/**\n * This is a model with one property with a 'one of' relationship\n */\nexport const zCompositionWithOneOfAndNullable = z.object({\n    propA: z.union([\n        z.object({\n            boolean: z.boolean().optional()\n        }),\n        zModelWithEnum,\n        zModelWithArray,\n        zModelWithDictionary\n    ]).nullish()\n});\n\n/**\n * This is a model that contains a simple dictionary within composition\n */\nexport const zCompositionWithOneOfAndSimpleDictionary = z.object({\n    propA: z.union([\n        z.boolean(),\n        z.record(z.string(), z.number())\n    ]).optional()\n});\n\n/**\n * This is a model that contains a dictionary of simple arrays within composition\n */\nexport const zCompositionWithOneOfAndSimpleArrayDictionary = z.object({\n    propA: z.union([\n        z.boolean(),\n        z.record(z.string(), z.array(z.boolean()))\n    ]).optional()\n});\n\n/**\n * This is a model that contains a dictionary of complex arrays (composited) within composition\n */\nexport const zCompositionWithOneOfAndComplexArrayDictionary = z.object({\n    propA: z.union([\n        z.boolean(),\n        z.record(z.string(), z.array(z.union([z.number(), z.string()])))\n    ]).optional()\n});\n\n/**\n * This is a model with one property with a 'all of' relationship\n */\nexport const zCompositionWithAllOfAndNullable = z.object({\n    propA: z.object({\n        boolean: z.boolean().optional()\n    }).and(zModelWithEnum).and(zModelWithArray).and(zModelWithDictionary).nullish()\n});\n\n/**\n * This is a model with one property with a 'any of' relationship\n */\nexport const zCompositionWithAnyOfAndNullable = z.object({\n    propA: z.union([\n        z.object({\n            boolean: z.boolean().optional()\n        }),\n        zModelWithEnum,\n        zModelWithArray,\n        zModelWithDictionary\n    ]).nullish()\n});\n\n/**\n * This is a base model with two simple optional properties\n */\nexport const zCompositionBaseModel = z.object({\n    firstName: z.string().optional(),\n    lastname: z.string().optional()\n});\n\n/**\n * This is a model that extends the base model\n */\nexport const zCompositionExtendedModel = zCompositionBaseModel.and(z.object({\n    age: z.number(),\n    firstName: z.string(),\n    lastname: z.string()\n}));\n\n/**\n * This is a model with one nested property\n */\nexport const zModelWithProperties = z.object({\n    required: z.string(),\n    requiredAndReadOnly: z.string().readonly(),\n    requiredAndNullable: z.string().nullable(),\n    string: z.string().optional(),\n    number: z.number().optional(),\n    boolean: z.boolean().optional(),\n    reference: zModelWithString.optional(),\n    'property with space': z.string().optional(),\n    default: z.string().optional(),\n    try: z.string().optional(),\n    '@namespace.string': z.string().readonly().optional(),\n    '@namespace.integer': z.int().readonly().optional()\n});\n\n/**\n * This is a model with one property containing a reference\n */\nexport const zModelWithReference = z.object({\n    prop: zModelWithProperties.optional()\n});\n\n/**\n * This is a model with one nested property\n */\nexport const zModelWithNestedProperties = z.object({\n    first: z.object({\n        second: z.object({\n            third: z.string().readonly().nullable()\n        }).readonly().nullable()\n    }).readonly().nullable()\n});\n\n/**\n * This is a model with duplicated properties\n */\nexport const zModelWithDuplicateProperties = z.object({\n    prop: zModelWithString.optional()\n});\n\n/**\n * This is a model with ordered properties\n */\nexport const zModelWithOrderedProperties = z.object({\n    zebra: z.string().optional(),\n    apple: z.string().optional(),\n    hawaii: z.string().optional()\n});\n\n/**\n * This is a model with duplicated imports\n */\nexport const zModelWithDuplicateImports = z.object({\n    propA: zModelWithString.optional(),\n    propB: zModelWithString.optional(),\n    propC: zModelWithString.optional()\n});\n\n/**\n * This is a model that extends another model\n */\nexport const zModelThatExtends = zModelWithString.and(z.object({\n    propExtendsA: z.string().optional(),\n    propExtendsB: zModelWithString.optional()\n}));\n\n/**\n * This is a model that extends another model\n */\nexport const zModelThatExtendsExtends = zModelWithString.and(zModelThatExtends).and(z.object({\n    propExtendsC: z.string().optional(),\n    propExtendsD: zModelWithString.optional()\n}));\n\n/**\n * This is a model that contains a some patterns\n */\nexport const zModelWithPattern = z.object({\n    key: z.string().max(64).regex(/^[a-zA-Z0-9_]*$/),\n    name: z.string().max(255),\n    enabled: z.boolean().readonly().optional(),\n    modified: z.iso.datetime().readonly().optional(),\n    id: z.string().regex(/^\\d{2}-\\d{3}-\\d{4}$/).optional(),\n    text: z.string().regex(/^\\w+$/).optional(),\n    patternWithSingleQuotes: z.string().regex(/^[a-zA-Z0-9']*$/).optional(),\n    patternWithNewline: z.string().regex(/aaa\\nbbb/).optional(),\n    patternWithBacktick: z.string().regex(/aaa`bbb/).optional(),\n    patternWithUnicode: z.string().regex(/^\\p{L}+$/u).optional()\n});\n\nexport const zFile = z.object({\n    id: z.string().min(1).readonly().optional(),\n    updated_at: z.iso.datetime().readonly().optional(),\n    created_at: z.iso.datetime().readonly().optional(),\n    mime: z.string().min(1).max(24),\n    file: z.url().readonly().optional()\n});\n\nexport const zDefault = z.object({\n    name: z.string().optional()\n});\n\nexport const zPageable = z.object({\n    page: z.int().gte(0).max(2147483647, { error: 'Invalid value: Expected int32 to be <= 2147483647' }).optional().default(0),\n    size: z.int().gte(1).max(2147483647, { error: 'Invalid value: Expected int32 to be <= 2147483647' }).optional(),\n    sort: z.array(z.string()).optional()\n});\n\n/**\n * This is a free-form object without additionalProperties.\n */\nexport const zFreeFormObjectWithoutAdditionalProperties = z.record(z.string(), z.unknown());\n\n/**\n * This is a free-form object with additionalProperties: true.\n */\nexport const zFreeFormObjectWithAdditionalPropertiesEqTrue = z.record(z.string(), z.unknown());\n\n/**\n * This is a free-form object with additionalProperties: {}.\n */\nexport const zFreeFormObjectWithAdditionalPropertiesEqEmptyObject = z.record(z.string(), z.unknown());\n\nexport const zModelWithConst = z.object({\n    String: z.literal('String').optional(),\n    number: z.literal(0).optional(),\n    null: z.null().optional(),\n    withType: z.literal('Some string').optional()\n});\n\n/**\n * This is a model with one property and additionalProperties: true\n */\nexport const zModelWithAdditionalPropertiesEqTrue = z.object({\n    prop: z.string().optional()\n});\n\nexport const zNestedAnyOfArraysNullable = z.object({\n    nullableArray: z.array(z.union([z.string(), z.boolean()])).nullish()\n});\n\n/**\n * An object that can be null\n */\nexport const zNullableObject = z.object({\n    foo: z.string().optional()\n}).nullable().default(null);\n\n/**\n * Some % character\n */\nexport const zCharactersInDescription = z.string();\n\nexport const zModelWithNullableObject = z.object({\n    data: zNullableObject.optional()\n});\n\n/**\n * An object with additional properties that can be null (anyOf ref + null)\n */\nexport const zModelWithAdditionalPropertiesRef = z.record(z.string(), zNullableObject.nullable());\n\nexport const zModelWithOneOfEnum = z.union([\n    z.object({\n        foo: z.enum(['Bar'])\n    }),\n    z.object({\n        foo: z.enum(['Baz'])\n    }),\n    z.object({\n        foo: z.enum(['Qux'])\n    }),\n    z.object({\n        content: z.iso.datetime(),\n        foo: z.enum(['Quux'])\n    }),\n    z.object({\n        content: z.tuple([z.iso.datetime(), z.string()]),\n        foo: z.enum(['Corge'])\n    })\n]);\n\nexport const zModelWithNestedArrayEnumsDataFoo = z.enum(['foo', 'bar']);\n\nexport const zModelWithNestedArrayEnumsDataBar = z.enum(['baz', 'qux']);\n\nexport const zModelWithNestedArrayEnumsData = z.object({\n    foo: z.array(zModelWithNestedArrayEnumsDataFoo).optional(),\n    bar: z.array(zModelWithNestedArrayEnumsDataBar).optional()\n});\n\nexport const zModelWithNestedArrayEnums = z.object({\n    array_strings: z.array(z.string()).optional(),\n    data: zModelWithNestedArrayEnumsData.optional()\n});\n\nexport const zModelWithNestedCompositionEnums = z.object({\n    foo: zModelWithNestedArrayEnumsDataFoo.optional()\n});\n\nexport const zModelWithReadOnlyAndWriteOnly = z.object({\n    foo: z.string(),\n    bar: z.string().readonly()\n});\n\n/**\n * This is a model with one property containing an array\n */\nexport const zModelWithArrayReadOnlyAndWriteOnly = z.object({\n    prop: z.array(zModelWithReadOnlyAndWriteOnly).optional(),\n    propWithFile: z.array(z.string()).optional(),\n    propWithNumber: z.array(z.number()).optional()\n});\n\nexport const zModelWithConstantSizeArray = z.tuple([z.number(), z.number()]);\n\nexport const zModelWithAnyOfConstantSizeArray = z.tuple([\n    z.union([\n        z.number(),\n        z.string()\n    ]),\n    z.union([\n        z.number(),\n        z.string()\n    ]),\n    z.union([\n        z.number(),\n        z.string()\n    ])\n]);\n\nexport const zModelWithPrefixItemsConstantSizeArray = z.tuple([\n    zModelWithInteger,\n    z.union([\n        z.number(),\n        z.string()\n    ]),\n    z.string()\n]);\n\nexport const zModelWithAnyOfConstantSizeArrayNullable = z.tuple([\n    z.union([\n        z.number(),\n        z.string()\n    ]).nullable(),\n    z.union([\n        z.number(),\n        z.string()\n    ]).nullable(),\n    z.union([\n        z.number(),\n        z.string()\n    ]).nullable()\n]);\n\nexport const zModelWithAnyOfConstantSizeArrayAndIntersect = z.tuple([z.intersection(z.number(), z.string()), z.intersection(z.number(), z.string())]);\n\nexport const zModelWithNumericEnumUnion = z.object({\n    value: z.union([\n        z.literal(-10),\n        z.literal(-1),\n        z.literal(0),\n        z.literal(1),\n        z.literal(3),\n        z.literal(6),\n        z.literal(12)\n    ]).optional()\n});\n\n/**\n * Some description with `back ticks`\n */\nexport const zModelWithBackticksInDescription = z.object({\n    template: z.string().optional()\n});\n\n/**\n * Model used to test deduplication strategy (unused)\n */\nexport const zParameterSimpleParameterUnused = z.string();\n\n/**\n * Model used to test deduplication strategy\n */\nexport const zPostServiceWithEmptyTagResponse = z.string();\n\n/**\n * Model used to test deduplication strategy\n */\nexport const zPostServiceWithEmptyTagResponse2 = z.string();\n\n/**\n * Model used to test deduplication strategy\n */\nexport const zDeleteFooData = z.string();\n\n/**\n * Model used to test deduplication strategy\n */\nexport const zDeleteFooData2 = z.string();\n\n/**\n * Model with restricted keyword name\n */\nexport const zImport = z.string();\n\nexport const zModelWithAnyOfConstantSizeArrayWithNSizeAndOptions = z.tuple([z.union([\n        z.number(),\n        zImport\n    ]), z.union([\n        z.number(),\n        zImport\n    ])]);\n\nexport const zSchemaWithFormRestrictedKeys = z.object({\n    description: z.string().optional(),\n    'x-enum-descriptions': z.string().optional(),\n    'x-enum-varnames': z.string().optional(),\n    'x-enumNames': z.string().optional(),\n    title: z.string().optional(),\n    object: z.object({\n        description: z.string().optional(),\n        'x-enum-descriptions': z.string().optional(),\n        'x-enum-varnames': z.string().optional(),\n        'x-enumNames': z.string().optional(),\n        title: z.string().optional()\n    }).optional(),\n    array: z.array(z.object({\n        description: z.string().optional(),\n        'x-enum-descriptions': z.string().optional(),\n        'x-enum-varnames': z.string().optional(),\n        'x-enumNames': z.string().optional(),\n        title: z.string().optional()\n    })).optional()\n});\n\n/**\n * This schema was giving PascalCase transformations a hard time\n */\nexport const zIoK8sApimachineryPkgApisMetaV1Preconditions = z.object({\n    resourceVersion: z.string().optional(),\n    uid: z.string().optional()\n});\n\n/**\n * This schema was giving PascalCase transformations a hard time\n */\nexport const zIoK8sApimachineryPkgApisMetaV1DeleteOptions = z.object({\n    preconditions: zIoK8sApimachineryPkgApisMetaV1Preconditions.optional()\n});\n\nexport const zAdditionalPropertiesUnknownIssue = z.record(z.string(), z.union([\n    z.string(),\n    z.number()\n]));\n\nexport const zAdditionalPropertiesUnknownIssue2 = z.record(z.string(), z.union([\n    z.string(),\n    z.number()\n]));\n\nexport const zAdditionalPropertiesUnknownIssue3 = z.intersection(z.string(), z.object({\n    entries: z.record(z.string(), zAdditionalPropertiesUnknownIssue)\n}));\n\nexport const zAdditionalPropertiesIntegerIssue = z.object({\n    value: z.int()\n});\n\nexport const zGenericSchemaDuplicateIssue1SystemBoolean = z.object({\n    item: z.boolean().optional(),\n    error: z.string().nullish(),\n    hasError: z.boolean().readonly().optional(),\n    data: z.record(z.string(), z.never()).optional()\n});\n\nexport const zGenericSchemaDuplicateIssue1SystemString = z.object({\n    item: z.string().nullish(),\n    error: z.string().nullish(),\n    hasError: z.boolean().readonly().optional()\n});\n\nexport const zOneOfAllOfIssue = z.union([\n    z.intersection(z.union([\n        zConstValue,\n        zGenericSchemaDuplicateIssue1SystemBoolean\n    ]), z3eNum1Период),\n    zGenericSchemaDuplicateIssue1SystemString\n]);\n\nexport const zExternalSharedModel = z.object({\n    id: z.string(),\n    name: z.string().optional()\n});\n\n/**\n * External ref to shared model (A)\n */\nexport const zExternalRefA = zExternalSharedModel;\n\n/**\n * External ref to shared model (B)\n */\nexport const zExternalRefB = zExternalSharedModel;\n\n/**\n * This is a model with one nested property\n */\nexport const zModelWithPropertiesWritable = z.object({\n    required: z.string(),\n    requiredAndNullable: z.string().nullable(),\n    string: z.string().optional(),\n    number: z.number().optional(),\n    boolean: z.boolean().optional(),\n    reference: zModelWithString.optional(),\n    'property with space': z.string().optional(),\n    default: z.string().optional(),\n    try: z.string().optional()\n});\n\n/**\n * This is a model with one property containing a reference\n */\nexport const zModelWithReferenceWritable = z.object({\n    prop: zModelWithPropertiesWritable.optional()\n});\n\n/**\n * This is a model that contains a some patterns\n */\nexport const zModelWithPatternWritable = z.object({\n    key: z.string().max(64).regex(/^[a-zA-Z0-9_]*$/),\n    name: z.string().max(255),\n    id: z.string().regex(/^\\d{2}-\\d{3}-\\d{4}$/).optional(),\n    text: z.string().regex(/^\\w+$/).optional(),\n    patternWithSingleQuotes: z.string().regex(/^[a-zA-Z0-9']*$/).optional(),\n    patternWithNewline: z.string().regex(/aaa\\nbbb/).optional(),\n    patternWithBacktick: z.string().regex(/aaa`bbb/).optional(),\n    patternWithUnicode: z.string().regex(/^\\p{L}+$/u).optional()\n});\n\nexport const zFileWritable = z.object({\n    mime: z.string().min(1).max(24)\n});\n\nexport const zModelWithReadOnlyAndWriteOnlyWritable = z.object({\n    foo: z.string(),\n    baz: z.string()\n});\n\n/**\n * This is a model with one property containing an array\n */\nexport const zModelWithArrayReadOnlyAndWriteOnlyWritable = z.object({\n    prop: z.array(zModelWithReadOnlyAndWriteOnlyWritable).optional(),\n    propWithFile: z.array(z.string()).optional(),\n    propWithNumber: z.array(z.number()).optional()\n});\n\nexport const zModelWithAnyOfConstantSizeArrayWithNSizeAndOptionsWritable = z.tuple([z.union([\n        z.number(),\n        zImport\n    ]), z.union([\n        z.number(),\n        zImport\n    ])]);\n\nexport const zAdditionalPropertiesUnknownIssueWritable = z.record(z.string(), z.union([\n    z.string(),\n    z.number()\n]));\n\nexport const zOneOfAllOfIssueWritable = z.union([\n    z.intersection(z.union([\n        zConstValue,\n        zGenericSchemaDuplicateIssue1SystemBoolean\n    ]), z3eNum1Период),\n    zGenericSchemaDuplicateIssue1SystemString\n]);\n\nexport const zGenericSchemaDuplicateIssue1SystemBooleanWritable = z.object({\n    item: z.boolean().optional(),\n    error: z.string().nullish(),\n    data: z.record(z.string(), z.never()).optional()\n});\n\nexport const zGenericSchemaDuplicateIssue1SystemStringWritable = z.object({\n    item: z.string().nullish(),\n    error: z.string().nullish()\n});\n\n/**\n * This is a reusable parameter\n */\nexport const zSimpleParameter = z.string();\n\nexport const zCompositionWithOneOfAndProperties = z.intersection(z.union([\n    z.object({\n        foo: zSimpleParameter\n    }),\n    z.object({\n        bar: zNonAsciiStringæøåÆøÅöôêÊ字符串\n    })\n]), z.object({\n    baz: z.int().gte(0).max(65535, { error: 'Invalid value: Expected uint16 to be <= 65535' }).nullable(),\n    qux: z.int().gte(0).max(255, { error: 'Invalid value: Expected uint8 to be <= 255' })\n}));\n\nexport const zModelWithOneOfAndProperties = z.intersection(z.union([\n    zSimpleParameter,\n    zNonAsciiStringæøåÆøÅöôêÊ字符串\n]), z.object({\n    baz: z.int().gte(0).max(65535, { error: 'Invalid value: Expected uint16 to be <= 65535' }).nullable(),\n    qux: z.int().gte(0).max(255, { error: 'Invalid value: Expected uint8 to be <= 255' })\n}));\n\n/**\n * Parameter with illegal characters\n */\nexport const zXFooBar = zModelWithString;\n\n/**\n * A reusable request body\n */\nexport const zSimpleRequestBody = zModelWithString;\n\n/**\n * A reusable request body\n */\nexport const zSimpleFormData = zModelWithString;\n\nexport const zExportData = z.object({\n    body: z.never().optional(),\n    path: z.never().optional(),\n    query: z.never().optional()\n});\n\nexport const zPatchApiVbyApiVersionNoTagData = z.object({\n    body: z.never().optional(),\n    path: z.never().optional(),\n    query: z.never().optional()\n});\n\nexport const zImportData = z.object({\n    body: z.union([\n        zModelWithReadOnlyAndWriteOnlyWritable,\n        zModelWithArrayReadOnlyAndWriteOnlyWritable\n    ]),\n    path: z.never().optional(),\n    query: z.never().optional()\n});\n\nexport const zImportResponse = z.union([\n    zModelFromZendesk,\n    zModelWithReadOnlyAndWriteOnly\n]);\n\nexport const zFooWowData = z.object({\n    body: z.never().optional(),\n    path: z.never().optional(),\n    query: z.never().optional()\n});\n\nexport const zApiVVersionODataControllerCountData = z.object({\n    body: z.never().optional(),\n    path: z.never().optional(),\n    query: z.never().optional()\n});\n\n/**\n * Success\n */\nexport const zApiVVersionODataControllerCountResponse = zModelFromZendesk;\n\nexport const zGetApiVbyApiVersionSimpleOperationData = z.object({\n    body: z.never().optional(),\n    path: z.object({\n        foo_param: z.union([\n            z.string(),\n            z.uuid()\n        ])\n    }),\n    query: z.never().optional()\n});\n\n/**\n * Response is a simple number\n */\nexport const zGetApiVbyApiVersionSimpleOperationResponse = z.number();\n\nexport const zDeleteCallWithoutParametersAndResponseData = z.object({\n    body: z.never().optional(),\n    path: z.never().optional(),\n    query: z.never().optional()\n});\n\nexport const zGetCallWithoutParametersAndResponseData = z.object({\n    body: z.never().optional(),\n    path: z.never().optional(),\n    query: z.never().optional()\n});\n\nexport const zHeadCallWithoutParametersAndResponseData = z.object({\n    body: z.never().optional(),\n    path: z.never().optional(),\n    query: z.never().optional()\n});\n\nexport const zOptionsCallWithoutParametersAndResponseData = z.object({\n    body: z.never().optional(),\n    path: z.never().optional(),\n    query: z.never().optional()\n});\n\nexport const zPatchCallWithoutParametersAndResponseData = z.object({\n    body: z.never().optional(),\n    path: z.never().optional(),\n    query: z.never().optional()\n});\n\nexport const zPostCallWithoutParametersAndResponseData = z.object({\n    body: z.never().optional(),\n    path: z.never().optional(),\n    query: z.never().optional()\n});\n\nexport const zPutCallWithoutParametersAndResponseData = z.object({\n    body: z.never().optional(),\n    path: z.never().optional(),\n    query: z.never().optional()\n});\n\nexport const zDeleteFooData3 = z.object({\n    body: z.never().optional(),\n    path: z.object({\n        foo_param: z.string(),\n        BarParam: z.string()\n    }),\n    query: z.never().optional(),\n    headers: z.object({\n        'x-Foo-Bar': zModelWithString\n    })\n});\n\nexport const zCallWithDescriptionsData = z.object({\n    body: z.never().optional(),\n    path: z.never().optional(),\n    query: z.object({\n        parameterWithBreaks: z.string().optional(),\n        parameterWithBackticks: z.string().optional(),\n        parameterWithSlashes: z.string().optional(),\n        parameterWithExpressionPlaceholders: z.string().optional(),\n        parameterWithQuotes: z.string().optional(),\n        parameterWithReservedCharacters: z.string().optional()\n    }).optional()\n});\n\nexport const zDeprecatedCallData = z.object({\n    body: z.never().optional(),\n    path: z.never().optional(),\n    query: z.never().optional(),\n    headers: z.object({\n        parameter: zDeprecatedModel.nullable()\n    })\n});\n\nexport const zCallWithParametersData = z.object({\n    body: z.record(z.string(), z.unknown()).nullable(),\n    path: z.object({\n        parameterPath: z.string().nullable(),\n        'api-version': z.string().nullable()\n    }),\n    query: z.object({\n        foo_ref_enum: zModelWithNestedArrayEnumsDataFoo.optional(),\n        foo_all_of_enum: zModelWithNestedArrayEnumsDataFoo,\n        cursor: z.string().nullable()\n    }),\n    headers: z.object({\n        parameterHeader: z.string().nullable()\n    })\n});\n\nexport const zCallWithWeirdParameterNamesData = z.object({\n    body: zModelWithString.nullable(),\n    path: z.object({\n        'parameter.path.1': z.string().optional(),\n        'parameter-path-2': z.string().optional(),\n        'PARAMETER-PATH-3': z.string().optional(),\n        'api-version': z.string().nullable()\n    }),\n    query: z.object({\n        default: z.string().optional(),\n        'parameter-query': z.string().nullable()\n    }),\n    headers: z.object({\n        'parameter.header': z.string().nullable()\n    })\n});\n\nexport const zGetCallWithOptionalParamData = z.object({\n    body: zModelWithOneOfEnum,\n    path: z.never().optional(),\n    query: z.object({\n        page: z.number().optional()\n    }).optional()\n});\n\nexport const zPostCallWithOptionalParamData = z.object({\n    body: z.object({\n        offset: z.number().nullish()\n    }).optional(),\n    path: z.never().optional(),\n    query: z.object({\n        parameter: zPageable\n    })\n});\n\nexport const zPostCallWithOptionalParamResponse = z.union([\n    z.number(),\n    z.void()\n]);\n\nexport const zPostApiVbyApiVersionRequestBodyData = z.object({\n    body: zSimpleRequestBody.optional(),\n    path: z.never().optional(),\n    query: z.object({\n        parameter: z.string().optional()\n    }).optional()\n});\n\nexport const zPostApiVbyApiVersionFormDataData = z.object({\n    body: zSimpleFormData.optional(),\n    path: z.never().optional(),\n    query: z.object({\n        parameter: z.string().optional()\n    }).optional()\n});\n\nexport const zCallWithDefaultParametersData = z.object({\n    body: z.never().optional(),\n    path: z.never().optional(),\n    query: z.object({\n        parameterString: z.string().nullish().default('Hello World!'),\n        parameterNumber: z.number().nullish().default(123),\n        parameterBoolean: z.boolean().nullish().default(true),\n        parameterEnum: z.enum([\n            'Success',\n            'Warning',\n            'Error'\n        ]).optional(),\n        parameterModel: zModelWithString.nullish()\n    }).optional()\n});\n\nexport const zCallWithDefaultOptionalParametersData = z.object({\n    body: z.never().optional(),\n    path: z.never().optional(),\n    query: z.object({\n        parameterString: z.string().optional().default('Hello World!'),\n        parameterNumber: z.number().optional().default(123),\n        parameterBoolean: z.boolean().optional().default(true),\n        parameterEnum: z.enum([\n            'Success',\n            'Warning',\n            'Error'\n        ]).optional(),\n        parameterModel: zModelWithString.optional().default({ prop: 'Hello World!' })\n    }).optional()\n});\n\nexport const zCallToTestOrderOfParamsData = z.object({\n    body: z.never().optional(),\n    path: z.never().optional(),\n    query: z.object({\n        parameterOptionalStringWithDefault: z.string().optional().default('Hello World!'),\n        parameterOptionalStringWithEmptyDefault: z.string().optional().default(''),\n        parameterOptionalStringWithNoDefault: z.string().optional(),\n        parameterStringWithDefault: z.string().default('Hello World!'),\n        parameterStringWithEmptyDefault: z.string().default(''),\n        parameterStringWithNoDefault: z.string(),\n        parameterStringNullableWithNoDefault: z.string().nullish(),\n        parameterStringNullableWithDefault: z.string().nullish().default(null)\n    })\n});\n\nexport const zDuplicateNameData = z.object({\n    body: z.never().optional(),\n    path: z.never().optional(),\n    query: z.never().optional()\n});\n\nexport const zDuplicateName2Data = z.object({\n    body: z.never().optional(),\n    path: z.never().optional(),\n    query: z.never().optional()\n});\n\nexport const zDuplicateName3Data = z.object({\n    body: z.never().optional(),\n    path: z.never().optional(),\n    query: z.never().optional()\n});\n\nexport const zDuplicateName4Data = z.object({\n    body: z.never().optional(),\n    path: z.never().optional(),\n    query: z.never().optional()\n});\n\nexport const zCallWithNoContentResponseData = z.object({\n    body: z.never().optional(),\n    path: z.never().optional(),\n    query: z.never().optional()\n});\n\n/**\n * Success\n */\nexport const zCallWithNoContentResponseResponse = z.void();\n\nexport const zCallWithResponseAndNoContentResponseData = z.object({\n    body: z.never().optional(),\n    path: z.never().optional(),\n    query: z.never().optional()\n});\n\nexport const zCallWithResponseAndNoContentResponseResponse = z.union([\n    z.number(),\n    z.void()\n]);\n\nexport const zDummyAData = z.object({\n    body: z.never().optional(),\n    path: z.never().optional(),\n    query: z.never().optional()\n});\n\nexport const zDummyAResponse = z400;\n\nexport const zDummyBData = z.object({\n    body: z.never().optional(),\n    path: z.never().optional(),\n    query: z.never().optional()\n});\n\n/**\n * Success\n */\nexport const zDummyBResponse = z.void();\n\nexport const zCallWithResponseData = z.object({\n    body: z.never().optional(),\n    path: z.never().optional(),\n    query: z.never().optional()\n});\n\nexport const zCallWithResponseResponse = zImport;\n\nexport const zCallWithDuplicateResponsesData = z.object({\n    body: z.never().optional(),\n    path: z.never().optional(),\n    query: z.never().optional()\n});\n\nexport const zCallWithDuplicateResponsesResponse = z.union([\n    zModelWithBoolean.and(zModelWithInteger),\n    zModelWithString\n]);\n\nexport const zCallWithResponsesData = z.object({\n    body: z.never().optional(),\n    path: z.never().optional(),\n    query: z.never().optional()\n});\n\nexport const zCallWithResponsesResponse = z.union([\n    z.object({\n        '@namespace.string': z.string().readonly().optional(),\n        '@namespace.integer': z.int().readonly().optional(),\n        value: z.array(zModelWithString).readonly().optional()\n    }),\n    zModelThatExtends,\n    zModelThatExtendsExtends\n]);\n\nexport const zCollectionFormatData = z.object({\n    body: z.never().optional(),\n    path: z.never().optional(),\n    query: z.object({\n        parameterArrayCSV: z.array(z.string()).nullable(),\n        parameterArraySSV: z.array(z.string()).nullable(),\n        parameterArrayTSV: z.array(z.string()).nullable(),\n        parameterArrayPipes: z.array(z.string()).nullable(),\n        parameterArrayMulti: z.array(z.string()).nullable()\n    })\n});\n\nexport const zTypesData = z.object({\n    body: z.never().optional(),\n    path: z.object({\n        id: z.int().min(-2147483648, { error: 'Invalid value: Expected int32 to be >= -2147483648' }).max(2147483647, { error: 'Invalid value: Expected int32 to be <= 2147483647' }).optional()\n    }).optional(),\n    query: z.object({\n        parameterNumber: z.number().default(123),\n        parameterString: z.string().nullable().default('default'),\n        parameterBoolean: z.boolean().nullable().default(true),\n        parameterObject: z.record(z.string(), z.unknown()).nullable().default(null),\n        parameterArray: z.array(z.string()).nullable(),\n        parameterDictionary: z.record(z.string(), z.unknown()).nullable(),\n        parameterEnum: z.union([\n            z.literal('Success'),\n            z.literal('Warning'),\n            z.literal('Error')\n        ]).nullable()\n    })\n});\n\nexport const zTypesResponse = z.union([\n    z.number(),\n    z.string(),\n    z.boolean(),\n    z.record(z.string(), z.unknown())\n]);\n\nexport const zUploadFileData = z.object({\n    body: z.string(),\n    path: z.object({\n        'api-version': z.string().nullable()\n    }),\n    query: z.never().optional()\n});\n\nexport const zUploadFileResponse = z.boolean();\n\nexport const zFileResponseData = z.object({\n    body: z.never().optional(),\n    path: z.object({\n        id: z.string(),\n        'api-version': z.string()\n    }),\n    query: z.never().optional()\n});\n\n/**\n * Success\n */\nexport const zFileResponseResponse = z.string();\n\nexport const zComplexTypesData = z.object({\n    body: z.never().optional(),\n    path: z.never().optional(),\n    query: z.object({\n        parameterObject: z.object({\n            first: z.object({\n                second: z.object({\n                    third: z.string().optional()\n                }).optional()\n            }).optional()\n        }),\n        parameterReference: zModelWithString\n    })\n});\n\n/**\n * Successful response\n */\nexport const zComplexTypesResponse = z.array(zModelWithString);\n\nexport const zMultipartResponseData = z.object({\n    body: z.never().optional(),\n    path: z.never().optional(),\n    query: z.never().optional()\n});\n\n/**\n * OK\n */\nexport const zMultipartResponseResponse = z.object({\n    file: z.string().optional(),\n    metadata: z.object({\n        foo: z.string().optional(),\n        bar: z.string().optional()\n    }).optional()\n});\n\nexport const zMultipartRequestData = z.object({\n    body: z.object({\n        content: z.string().optional(),\n        data: zModelWithString.nullish()\n    }).optional(),\n    path: z.never().optional(),\n    query: z.never().optional()\n});\n\nexport const zComplexParamsData = z.object({\n    body: z.object({\n        key: z.string().max(64).regex(/^[a-zA-Z0-9_]*$/).readonly().nullable(),\n        name: z.string().max(255).nullable(),\n        enabled: z.boolean().optional().default(true),\n        type: z.enum([\n            'Monkey',\n            'Horse',\n            'Bird'\n        ]),\n        listOfModels: z.array(zModelWithString).nullish(),\n        listOfStrings: z.array(z.string()).nullish(),\n        parameters: z.union([\n            zModelWithString,\n            zModelWithEnum,\n            zModelWithArray,\n            zModelWithDictionary\n        ]),\n        user: z.object({\n            id: z.int().min(-2147483648, { error: 'Invalid value: Expected int32 to be >= -2147483648' }).max(2147483647, { error: 'Invalid value: Expected int32 to be <= 2147483647' }).readonly().optional(),\n            name: z.string().readonly().nullish()\n        }).readonly().optional()\n    }).optional(),\n    path: z.object({\n        id: z.int().min(-2147483648, { error: 'Invalid value: Expected int32 to be >= -2147483648' }).max(2147483647, { error: 'Invalid value: Expected int32 to be <= 2147483647' }),\n        'api-version': z.string()\n    }),\n    query: z.never().optional()\n});\n\n/**\n * Success\n */\nexport const zComplexParamsResponse = zModelWithString;\n\nexport const zCallWithResultFromHeaderData = z.object({\n    body: z.never().optional(),\n    path: z.never().optional(),\n    query: z.never().optional()\n});\n\nexport const zTestErrorCodeData = z.object({\n    body: z.never().optional(),\n    path: z.never().optional(),\n    query: z.object({\n        status: z.int()\n    })\n});\n\nexport const zNonAsciiæøåÆøÅöôêÊ字符串Data = z.object({\n    body: z.never().optional(),\n    path: z.never().optional(),\n    query: z.object({\n        nonAsciiParamæøåÆØÅöôêÊ: z.int()\n    })\n});\n\n/**\n * Successful response\n */\nexport const zNonAsciiæøåÆøÅöôêÊ字符串Response = z.array(zNonAsciiStringæøåÆøÅöôêÊ字符串);\n\nexport const zPutWithFormUrlEncodedData = z.object({\n    body: zArrayWithStrings,\n    path: z.never().optional(),\n    query: z.never().optional()\n});\n"
  },
  {
    "path": "packages/openapi-ts-tests/zod/v3/__snapshots__/3.1.x/v4/enum-null/zod.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport * as z from 'zod/v4';\n\nexport const zFoo = z.enum(['foo', 'bar']).nullable();\n\nexport const zBar = z.enum(['foo', 'bar']);\n\nexport const zBaz = z.enum(['foo', 'bar']);\n"
  },
  {
    "path": "packages/openapi-ts-tests/zod/v3/__snapshots__/3.1.x/v4/enum-resolver-permissive/zod.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport * as z from 'zod/v4';\n\nexport const zFoo = z.union([z.enum(['foo', 'bar']), z.string()]).nullable();\n\nexport const zBar = z.union([z.enum(['foo', 'bar']), z.string()]);\n\nexport const zBaz = z.union([z.enum(['foo', 'bar']), z.string()]);\n"
  },
  {
    "path": "packages/openapi-ts-tests/zod/v3/__snapshots__/3.1.x/v4/schema-const/zod.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport * as z from 'zod/v4';\n\nexport const zFoo = z.object({\n    foo: z.literal('foo').optional(),\n    bar: z.literal(3.2).optional(),\n    baz: z.literal(-1).optional(),\n    qux: z.literal(true).optional(),\n    quux: z.tuple([\n        z.literal(1),\n        z.literal(2),\n        z.literal(3),\n        z.literal('foo'),\n        z.literal(true)\n    ]).optional(),\n    corge: z.record(z.string(), z.unknown()).optional(),\n    garply: z.literal(BigInt('10')).optional(),\n    numberInt8: z.literal(100).optional(),\n    numberInt16: z.literal(1000).optional(),\n    numberInt32: z.literal(100000).optional(),\n    numberInt64: z.literal(BigInt(1000000000000)).optional(),\n    numberUint8: z.literal(200).optional(),\n    numberUint16: z.literal(50000).optional(),\n    numberUint32: z.literal(3000000000).optional(),\n    numberUint64: z.literal(BigInt(18000000000000000000)).optional(),\n    integerInt8: z.literal(-100).optional(),\n    integerInt16: z.literal(-1000).optional(),\n    integerInt32: z.literal(-100000).optional(),\n    integerInt64: z.literal(BigInt(-1000000000000)).optional(),\n    integerUint8: z.literal(255).optional(),\n    integerUint16: z.literal(65535).optional(),\n    integerUint32: z.literal(4294967295).optional(),\n    integerUint64: z.literal(BigInt('18446744073709551615')).optional(),\n    stringInt64: z.literal(BigInt('-9223372036854775808')).optional(),\n    stringUint64: z.literal(BigInt('18446744073709551615')).optional()\n});\n"
  },
  {
    "path": "packages/openapi-ts-tests/zod/v3/__snapshots__/3.1.x/v4/type-format/zod.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport * as z from 'zod/v4';\n\nexport const zFoo = z.object({\n    bar: z.int().optional(),\n    foo: z.coerce.bigint().min(BigInt('-9223372036854775808'), { error: 'Invalid value: Expected int64 to be >= -9223372036854775808' }).max(BigInt('9223372036854775807'), { error: 'Invalid value: Expected int64 to be <= 9223372036854775807' }).default(BigInt(0)),\n    id: z.string()\n});\n\nexport const zBar = z.object({\n    foo: z.int()\n});\n\nexport const zPostFooData = z.object({\n    body: z.never().optional(),\n    path: z.never().optional(),\n    query: z.never().optional()\n});\n\n/**\n * OK\n */\nexport const zPostFooResponse = zFoo;\n"
  },
  {
    "path": "packages/openapi-ts-tests/zod/v3/__snapshots__/3.1.x/v4/validators/zod.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport * as z from 'zod/v4';\n\nexport const zBaz = z.string().regex(/foo\\nbar/).readonly().default('baz');\n\nexport const zQux = z.record(z.string(), z.object({\n    qux: z.string().optional()\n}));\n\n/**\n * This is Foo schema.\n */\nexport const zFoo = z.object({\n    foo: z.string().regex(/^\\d{3}-\\d{2}-\\d{4}$/).optional(),\n    bar: z.lazy((): any => zBar).optional(),\n    baz: z.array(z.lazy((): any => zFoo)).optional(),\n    qux: z.int().gt(0).optional().default(0)\n}).nullable().default(null);\n\n/**\n * This is Bar schema.\n */\nexport const zBar = z.object({\n    foo: zFoo.optional()\n});\n\n/**\n * This is Foo parameter.\n */\nexport const zFoo2 = z.string();\n\nexport const zFoo3 = z.object({\n    foo: zBar.optional()\n});\n\nexport const zPatchFooData = z.object({\n    body: z.object({\n        foo: z.string().optional()\n    }),\n    path: z.never().optional(),\n    query: z.object({\n        foo: z.string().optional(),\n        bar: zBar.optional(),\n        baz: z.object({\n            baz: z.string().optional()\n        }).optional(),\n        qux: z.iso.date().optional(),\n        quux: z.iso.datetime().optional()\n    }).optional()\n});\n\nexport const zPostFooData = z.object({\n    body: zFoo3,\n    path: z.never().optional(),\n    query: z.never().optional()\n});\n"
  },
  {
    "path": "packages/openapi-ts-tests/zod/v3/__snapshots__/3.1.x/v4/validators-bigint-min-max/zod.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport * as z from 'zod/v4';\n\nexport const zFoo = z.object({\n    foo: z.coerce.bigint().gte(BigInt(0)).lte(BigInt(100)).optional()\n});\n"
  },
  {
    "path": "packages/openapi-ts-tests/zod/v3/__snapshots__/3.1.x/v4/validators-circular-ref/zod.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport * as z from 'zod/v4';\n\nexport const zBar = z.object({\n    bar: z.array(z.lazy((): any => zBar)).optional()\n});\n\nexport const zFoo = z.object({\n    foo: zBar.optional()\n});\n\nexport const zBaz = z.lazy((): any => zQux);\n\n/**\n * description caused circular reference error\n */\nexport const zQux = zBaz;\n"
  },
  {
    "path": "packages/openapi-ts-tests/zod/v3/__snapshots__/3.1.x/v4/validators-circular-ref-2/zod.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport * as z from 'zod/v4';\n\nexport const zBar = z.object({\n    bar: z.array(z.lazy((): any => zBar)).nullable()\n});\n\nexport const zFoo = z.object({\n    foo: zBar\n});\n"
  },
  {
    "path": "packages/openapi-ts-tests/zod/v3/__snapshots__/3.1.x/v4/validators-dates/zod.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport * as z from 'zod/v4';\n\nexport const zBaz = z.string().regex(/foo\\nbar/).readonly().default('baz');\n\nexport const zQux = z.record(z.string(), z.object({\n    qux: z.string().optional()\n}));\n\n/**\n * This is Foo schema.\n */\nexport const zFoo = z.object({\n    foo: z.string().regex(/^\\d{3}-\\d{2}-\\d{4}$/).optional(),\n    bar: z.lazy((): any => zBar).optional(),\n    baz: z.array(z.lazy((): any => zFoo)).optional(),\n    qux: z.int().gt(0).optional().default(0)\n}).nullable().default(null);\n\n/**\n * This is Bar schema.\n */\nexport const zBar = z.object({\n    foo: zFoo.optional()\n});\n\n/**\n * This is Foo parameter.\n */\nexport const zFoo2 = z.string();\n\nexport const zFoo3 = z.object({\n    foo: zBar.optional()\n});\n\nexport const zPatchFooData = z.object({\n    body: z.object({\n        foo: z.string().optional()\n    }),\n    path: z.never().optional(),\n    query: z.object({\n        foo: z.string().optional(),\n        bar: zBar.optional(),\n        baz: z.object({\n            baz: z.string().optional()\n        }).optional(),\n        qux: z.iso.date().optional(),\n        quux: z.iso.datetime({ offset: true }).optional()\n    }).optional()\n});\n\nexport const zPostFooData = z.object({\n    body: zFoo3,\n    path: z.never().optional(),\n    query: z.never().optional()\n});\n"
  },
  {
    "path": "packages/openapi-ts-tests/zod/v3/__snapshots__/3.1.x/v4/validators-metadata/zod.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport * as z from 'zod/v4';\n\nexport const zBaz = z.string().regex(/foo\\nbar/).readonly().default('baz');\n\nexport const zQux = z.record(z.string(), z.object({\n    qux: z.string().optional()\n}));\n\n/**\n * This is Foo schema.\n */\nexport const zFoo = z.object({\n    foo: z.string().regex(/^\\d{3}-\\d{2}-\\d{4}$/).register(z.globalRegistry, {\n        description: 'This is foo property.'\n    }).optional(),\n    bar: z.lazy((): any => zBar).optional(),\n    baz: z.array(z.lazy((): any => zFoo)).register(z.globalRegistry, {\n        description: 'This is baz property.'\n    }).optional(),\n    qux: z.int().gt(0).register(z.globalRegistry, {\n        description: 'This is qux property.'\n    }).optional().default(0)\n}).nullable().default(null);\n\n/**\n * This is Bar schema.\n */\nexport const zBar = z.object({\n    foo: zFoo.optional()\n}).register(z.globalRegistry, {\n    description: 'This is Bar schema.'\n});\n\n/**\n * This is Foo parameter.\n */\nexport const zFoo2 = z.string().register(z.globalRegistry, {\n    description: 'This is Foo parameter.'\n});\n\nexport const zFoo3 = z.object({\n    foo: zBar.optional()\n});\n\nexport const zPatchFooData = z.object({\n    body: z.object({\n        foo: z.string().optional()\n    }),\n    path: z.never().optional(),\n    query: z.object({\n        foo: z.string().register(z.globalRegistry, {\n            description: 'This is Foo parameter.'\n        }).optional(),\n        bar: zBar.optional(),\n        baz: z.object({\n            baz: z.string().optional()\n        }).optional(),\n        qux: z.iso.date().optional(),\n        quux: z.iso.datetime().optional()\n    }).optional()\n});\n\nexport const zPostFooData = z.object({\n    body: zFoo3,\n    path: z.never().optional(),\n    query: z.never().optional()\n});\n"
  },
  {
    "path": "packages/openapi-ts-tests/zod/v3/__snapshots__/3.1.x/v4/validators-string-constraints-union/zod.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport * as z from 'zod/v4';\n\nexport const zLocaleOrLanguage = z.union([\n    z.string().length(5),\n    z.string().length(2)\n]);\n"
  },
  {
    "path": "packages/openapi-ts-tests/zod/v3/__snapshots__/3.1.x/v4/validators-types/zod.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport * as z from 'zod/v4';\n\nexport const zBaz = z.string().regex(/foo\\nbar/).readonly().default('baz');\n\nexport type BazZodType = z.infer<typeof zBaz>;\n\nexport const zQux = z.record(z.string(), z.object({\n    qux: z.string().optional()\n}));\n\nexport type QuxZodType = z.infer<typeof zQux>;\n\n/**\n * This is Foo schema.\n */\nexport const zFoo = z.object({\n    foo: z.string().regex(/^\\d{3}-\\d{2}-\\d{4}$/).optional(),\n    bar: z.lazy((): any => zBar).optional(),\n    baz: z.array(z.lazy((): any => zFoo)).optional(),\n    qux: z.int().gt(0).optional().default(0)\n}).nullable().default(null);\n\nexport type FooZodType = z.infer<typeof zFoo>;\n\n/**\n * This is Bar schema.\n */\nexport const zBar = z.object({\n    foo: zFoo.optional()\n});\n\nexport type BarZodType = z.infer<typeof zBar>;\n\n/**\n * This is Foo parameter.\n */\nexport const zFoo2 = z.string();\n\nexport type FooZodType2 = z.infer<typeof zFoo2>;\n\nexport const zFoo3 = z.object({\n    foo: zBar.optional()\n});\n\nexport type FooZodType3 = z.infer<typeof zFoo3>;\n\nexport const zPatchFooData = z.object({\n    body: z.object({\n        foo: z.string().optional()\n    }),\n    path: z.never().optional(),\n    query: z.object({\n        foo: z.string().optional(),\n        bar: zBar.optional(),\n        baz: z.object({\n            baz: z.string().optional()\n        }).optional(),\n        qux: z.iso.date().optional(),\n        quux: z.iso.datetime().optional()\n    }).optional()\n});\n\nexport type PatchFooDataZodType = z.infer<typeof zPatchFooData>;\n\nexport const zPostFooData = z.object({\n    body: zFoo3,\n    path: z.never().optional(),\n    query: z.never().optional()\n});\n\nexport type PostFooDataZodType = z.infer<typeof zPostFooData>;\n"
  },
  {
    "path": "packages/openapi-ts-tests/zod/v3/__snapshots__/3.1.x/v4/validators-union-merge/zod.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport * as z from 'zod/v4';\n\nexport const zContact = z.union([\n    z.object({\n        email: z.string()\n    }),\n    z.object({\n        phone: z.string()\n    })\n]);\n\nexport const zUser = zContact.and(z.object({\n    username: z.string()\n}));\n\nexport const zDogDetails = z.object({\n    breed: z.string(),\n    barkVolume: z.int().gte(1).lte(10)\n});\n\nexport const zCatDetails = z.object({\n    furLength: z.enum([\n        'short',\n        'medium',\n        'long'\n    ]),\n    purrs: z.boolean()\n});\n\nexport const zPetStore = z.object({\n    animals: z.array(z.object({\n        name: z.string(),\n        type: z.enum(['dog', 'cat']).optional(),\n        details: z.union([\n            zDogDetails,\n            zCatDetails\n        ])\n    }))\n});\n"
  },
  {
    "path": "packages/openapi-ts-tests/zod/v3/package.json",
    "content": "{\n  \"name\": \"@test/openapi-ts-zod-v3\",\n  \"version\": \"0.0.0\",\n  \"private\": true,\n  \"type\": \"module\",\n  \"scripts\": {\n    \"typecheck\": \"tsgo --noEmit\"\n  },\n  \"devDependencies\": {\n    \"@hey-api/openapi-ts\": \"workspace:*\",\n    \"typescript\": \"5.9.3\",\n    \"zod\": \"^3.25.0\"\n  },\n  \"engines\": {\n    \"node\": \">=20.19.0\"\n  }\n}\n"
  },
  {
    "path": "packages/openapi-ts-tests/zod/v3/test/3.0.x.test.ts",
    "content": "import fs from 'node:fs';\nimport path from 'node:path';\n\nimport { createClient } from '@hey-api/openapi-ts';\n\nimport { getFilePaths } from '../../../utils';\nimport { createZodConfig, getSnapshotsPath, getTempSnapshotsPath, zodVersions } from './utils';\n\nconst version = '3.0.x';\n\nfor (const zodVersion of zodVersions) {\n  const outputDir = path.join(getTempSnapshotsPath(), version, zodVersion.folder);\n  const snapshotsDir = path.join(getSnapshotsPath(), version, zodVersion.folder);\n\n  describe(`OpenAPI ${version}`, () => {\n    const createConfig = createZodConfig({\n      openApiVersion: version,\n      outputDir,\n      zodVersion,\n    });\n\n    const scenarios = [\n      {\n        config: createConfig({\n          input: 'array-items-one-of-length-1.yaml',\n          output: 'array-items-one-of-length-1',\n        }),\n        description: 'generates correct array when items are oneOf array with single item',\n      },\n      {\n        config: createConfig({\n          input: 'circular.yaml',\n          output: 'circular',\n        }),\n        description: 'generates circular schemas',\n      },\n      {\n        config: createConfig({\n          input: 'enum-null.json',\n          output: 'enum-null',\n        }),\n        description: 'handles null enums',\n      },\n      {\n        config: createConfig({\n          input: 'validators.json',\n          output: 'validators',\n        }),\n        description: 'generates validator schemas',\n      },\n    ];\n\n    it.each(scenarios)('$description', async ({ config }) => {\n      await createClient(config);\n\n      const filePaths = getFilePaths(config.output);\n\n      await Promise.all(\n        filePaths.map(async (filePath) => {\n          const fileContent = fs.readFileSync(filePath, 'utf-8');\n          await expect(fileContent).toMatchFileSnapshot(\n            path.join(snapshotsDir, filePath.slice(outputDir.length + 1)),\n          );\n        }),\n      );\n    });\n  });\n}\n"
  },
  {
    "path": "packages/openapi-ts-tests/zod/v3/test/3.1.x.test.ts",
    "content": "import fs from 'node:fs';\nimport path from 'node:path';\n\nimport { createClient } from '@hey-api/openapi-ts';\n\nimport { getFilePaths } from '../../../utils';\nimport { createZodConfig, getSnapshotsPath, getTempSnapshotsPath, zodVersions } from './utils';\n\nconst version = '3.1.x';\n\nfor (const zodVersion of zodVersions) {\n  const outputDir = path.join(getTempSnapshotsPath(), version, zodVersion.folder);\n  const snapshotsDir = path.join(getSnapshotsPath(), version, zodVersion.folder);\n\n  describe(`OpenAPI ${version}`, () => {\n    const createConfig = createZodConfig({\n      openApiVersion: version,\n      outputDir,\n      zodVersion,\n    });\n\n    const scenarios = [\n      {\n        config: createConfig({\n          input: 'array-items-one-of-length-1.yaml',\n          output: 'array-items-one-of-length-1',\n        }),\n        description: 'generates correct array when items are oneOf array with single item',\n      },\n      {\n        config: createConfig({\n          input: 'enum-null.json',\n          output: 'enum-null',\n        }),\n        description: 'handles null enums',\n      },\n      {\n        config: createConfig({\n          input: 'schema-const.yaml',\n          output: 'schema-const',\n        }),\n        description: 'handles various constants',\n      },\n      {\n        config: createConfig({\n          input: 'validators.yaml',\n          output: 'validators',\n        }),\n        description: 'generates validator schemas',\n      },\n      {\n        config: createConfig({\n          input: 'validators.yaml',\n          output: 'validators-dates',\n          plugins: [\n            {\n              compatibilityVersion: zodVersion.compatibilityVersion,\n              dates: {\n                offset: true,\n              },\n              name: 'zod',\n            },\n          ],\n        }),\n        description: 'generates validator schemas with any offset',\n      },\n      {\n        config: createConfig({\n          input: 'validators.yaml',\n          output: 'validators-metadata',\n          plugins: [\n            {\n              compatibilityVersion: zodVersion.compatibilityVersion,\n              metadata: true,\n              name: 'zod',\n            },\n          ],\n        }),\n        description: 'generates validator schemas with metadata',\n      },\n      {\n        config: createConfig({\n          input: 'validators.yaml',\n          output: 'validators-types',\n          plugins: [\n            {\n              compatibilityVersion: zodVersion.compatibilityVersion,\n              name: 'zod',\n              types: {\n                infer: true,\n              },\n            },\n          ],\n        }),\n        description: 'generates validator schemas with types',\n      },\n      {\n        config: createConfig({\n          input: 'validators-bigint-min-max.json',\n          output: 'validators-bigint-min-max',\n        }),\n        description: 'validator schemas with BigInt and min/max constraints',\n      },\n      {\n        config: createConfig({\n          input: 'validators-circular-ref.json',\n          output: 'validators-circular-ref',\n        }),\n        description: 'validator schemas with circular reference',\n      },\n      {\n        config: createConfig({\n          input: 'validators-circular-ref-2.yaml',\n          output: 'validators-circular-ref-2',\n        }),\n        description: 'validator schemas with circular reference 2',\n      },\n      {\n        config: createConfig({\n          input: 'validators-union-merge.json',\n          output: 'validators-union-merge',\n        }),\n        description: \"validator schemas with merged unions (can't use .merge())\",\n      },\n      {\n        config: createConfig({\n          input: 'validators-string-constraints-union.json',\n          output: 'validators-string-constraints-union',\n        }),\n        description: 'validator schemas with string constraints union',\n      },\n      {\n        config: createConfig({\n          input: 'enum-null.json',\n          output: 'enum-resolver-permissive',\n          plugins: [\n            {\n              compatibilityVersion: zodVersion.compatibilityVersion,\n              name: 'zod',\n              '~resolvers': {\n                enum(ctx) {\n                  const { $, symbols } = ctx;\n                  const { z } = symbols;\n                  const { allStrings, enumMembers } = ctx.nodes.items(ctx);\n\n                  if (!allStrings || !enumMembers.length) {\n                    return;\n                  }\n\n                  const enumSchema = $(z)\n                    .attr('enum')\n                    .call($.array(...enumMembers));\n                  return $(z)\n                    .attr('union')\n                    .call($.array(enumSchema, $(z).attr('string').call()));\n                },\n              },\n            },\n          ],\n        }),\n        description: 'generates permissive enums with enum resolver',\n      },\n    ];\n\n    it.each(scenarios)('$description', async ({ config }) => {\n      await createClient(config);\n\n      const filePaths = getFilePaths(config.output);\n\n      await Promise.all(\n        filePaths.map(async (filePath) => {\n          const fileContent = fs.readFileSync(filePath, 'utf-8');\n          await expect(fileContent).toMatchFileSnapshot(\n            path.join(snapshotsDir, filePath.slice(outputDir.length + 1)),\n          );\n        }),\n      );\n    });\n  });\n}\n"
  },
  {
    "path": "packages/openapi-ts-tests/zod/v3/test/openapi.test.ts",
    "content": "import fs from 'node:fs';\nimport path from 'node:path';\n\nimport { createClient } from '@hey-api/openapi-ts';\n\nimport { getFilePaths } from '../../../utils';\nimport { createZodConfig, getSnapshotsPath, getTempSnapshotsPath, zodVersions } from './utils';\n\nconst versions = ['2.0.x', '3.0.x', '3.1.x'];\n\nfor (const version of versions) {\n  for (const zodVersion of zodVersions) {\n    const outputDir = path.join(getTempSnapshotsPath(), version, zodVersion.folder);\n    const snapshotsDir = path.join(getSnapshotsPath(), version, zodVersion.folder);\n\n    describe(`OpenAPI ${version}`, () => {\n      const createConfig = createZodConfig({\n        openApiVersion: version,\n        outputDir,\n        zodVersion,\n      });\n\n      const scenarios = [\n        {\n          config: createConfig({\n            input: 'array-items-all-of.yaml',\n            output: 'array-items-all-of',\n          }),\n          description: 'generates correct array when items use allOf (intersection)',\n        },\n        {\n          config: createConfig({\n            input: 'full.yaml',\n            output: 'default',\n          }),\n          description: 'generate Zod schemas with Zod plugin',\n        },\n        {\n          config: createConfig({\n            input: 'type-format.yaml',\n            output: 'type-format',\n          }),\n          description: 'handles various schema types and formats',\n        },\n      ];\n\n      it.each(scenarios)('$description', async ({ config }) => {\n        await createClient(config);\n\n        const filePaths = getFilePaths(config.output);\n\n        await Promise.all(\n          filePaths.map(async (filePath) => {\n            const fileContent = fs.readFileSync(filePath, 'utf-8');\n            await expect(fileContent).toMatchFileSnapshot(\n              path.join(snapshotsDir, filePath.slice(outputDir.length + 1)),\n            );\n          }),\n        );\n      });\n    });\n  }\n}\n"
  },
  {
    "path": "packages/openapi-ts-tests/zod/v3/test/utils.ts",
    "content": "import path from 'node:path';\nimport { fileURLToPath } from 'node:url';\n\nimport { type UserConfig } from '@hey-api/openapi-ts';\n\nimport { getSpecsPath } from '../../../utils';\n\nconst __filename = fileURLToPath(import.meta.url);\nconst __dirname = path.dirname(__filename);\n\nexport const createZodConfig =\n  ({\n    openApiVersion,\n    outputDir,\n    zodVersion,\n  }: {\n    openApiVersion: string;\n    outputDir: string;\n    zodVersion: (typeof zodVersions)[number];\n  }) =>\n  (userConfig: UserConfig) => {\n    const input = userConfig.input instanceof Array ? userConfig.input[0]! : userConfig.input;\n    const inputPath = path.join(\n      getSpecsPath(),\n      openApiVersion,\n      typeof input === 'string' ? input : (input.path as string),\n    );\n    return {\n      plugins: [\n        {\n          compatibilityVersion: zodVersion.compatibilityVersion,\n          name: 'zod',\n        },\n      ],\n      ...userConfig,\n      input:\n        typeof userConfig.input === 'string'\n          ? inputPath\n          : {\n              ...userConfig.input,\n              path: inputPath,\n            },\n      logs: {\n        level: 'silent',\n        path: './logs',\n      },\n      output: path.join(outputDir, typeof userConfig.output === 'string' ? userConfig.output : ''),\n    } as const satisfies UserConfig;\n  };\n\nexport const getSnapshotsPath = (): string => path.join(__dirname, '..', '__snapshots__');\n\nexport const getTempSnapshotsPath = (): string => path.join(__dirname, '..', '.gen', 'snapshots');\n\nexport const zodVersions = [\n  {\n    compatibilityVersion: 3,\n    folder: 'v3',\n  },\n  {\n    compatibilityVersion: 4,\n    folder: 'v4',\n  },\n  {\n    compatibilityVersion: 'mini',\n    folder: 'mini',\n  },\n] as const;\n"
  },
  {
    "path": "packages/openapi-ts-tests/zod/v3/tsconfig.json",
    "content": "{\n  \"extends\": \"../../tsconfig.base.json\",\n  \"include\": [\"test/**/*\", \"__snapshots__/**/*\"],\n  \"exclude\": [\".gen/**/*\"],\n  \"references\": [{ \"path\": \"../../../openapi-ts\" }]\n}\n"
  },
  {
    "path": "packages/openapi-ts-tests/zod/v3/turbo.json",
    "content": "{\n  \"$schema\": \"../../../../node_modules/turbo/schema.json\",\n  \"extends\": [\"//\"],\n  \"tasks\": {\n    \"build\": {\n      \"dependsOn\": [],\n      \"outputs\": [\"dist/**\"]\n    }\n  }\n}\n"
  },
  {
    "path": "packages/openapi-ts-tests/zod/v3/vitest.setup.ts",
    "content": "import { fileURLToPath } from 'node:url';\n\nimport { beforeAll } from 'vitest';\n\nbeforeAll(() => {\n  process.chdir(fileURLToPath(new URL('.', import.meta.url)));\n});\n"
  },
  {
    "path": "packages/openapi-ts-tests/zod/v4/.gitignore",
    "content": ".DS_Store\n.idea\n.tmp\n.tsdown\nlogs\nnode_modules\ntemp\n\n.env\ncoverage\ndist\n\n# test files\n.gen\n"
  },
  {
    "path": "packages/openapi-ts-tests/zod/v4/__snapshots__/2.0.x/mini/array-items-all-of/zod.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport * as z from 'zod/mini';\n\nexport const zArrayWithAllOfObjects = z.array(z.intersection(z.object({\n    id: z.optional(z.int())\n}), z.object({\n    name: z.optional(z.string())\n})));\n\nexport const zArrayWithAllOfPrimitives = z.array(z.intersection(z.number(), z.string()));\n\nexport const zBaseModel = z.object({\n    id: z.optional(z.int()),\n    createdAt: z.optional(z.iso.datetime())\n});\n\nexport const zArrayWithAllOfRefs = z.array(z.intersection(zBaseModel, z.object({\n    extra: z.optional(z.string())\n})));\n"
  },
  {
    "path": "packages/openapi-ts-tests/zod/v4/__snapshots__/2.0.x/mini/default/zod.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport * as z from 'zod/mini';\n\n/**\n * Testing multiline comments in string: First line\n * Second line\n *\n * Fourth line\n */\nexport const zCommentWithBreaks = z.int();\n\n/**\n * Testing backticks in string: `backticks` and ```multiple backticks``` should work\n */\nexport const zCommentWithBackticks = z.int();\n\n/**\n * Testing backticks and quotes in string: `backticks`, 'quotes', \"double quotes\" and ```multiple backticks``` should work\n */\nexport const zCommentWithBackticksAndQuotes = z.int();\n\n/**\n * Testing slashes in string: \\backwards\\\\\\ and /forwards/// should work\n */\nexport const zCommentWithSlashes = z.int();\n\n/**\n * Testing expression placeholders in string: ${expression} should work\n */\nexport const zCommentWithExpressionPlaceholders = z.int();\n\n/**\n * Testing quotes in string: 'single quote''' and \"double quotes\"\"\" should work\n */\nexport const zCommentWithQuotes = z.int();\n\n/**\n * Testing reserved characters in string: * inline * and ** inline ** should work\n */\nexport const zCommentWithReservedCharacters = z.int();\n\n/**\n * This is a simple number\n */\nexport const zSimpleInteger = z.int();\n\n/**\n * This is a simple boolean\n */\nexport const zSimpleBoolean = z.boolean();\n\n/**\n * This is a simple string\n */\nexport const zSimpleString = z.string();\n\n/**\n * A string with non-ascii (unicode) characters valid in typescript identifiers (æøåÆØÅöÔèÈ字符串)\n */\nexport const zNonAsciiStringæøåÆøÅöôêÊ字符串 = z.string();\n\n/**\n * This is a simple file\n */\nexport const zSimpleFile = z.string();\n\n/**\n * This is a simple string\n */\nexport const zSimpleStringWithPattern = z.string().check(z.maxLength(64), z.regex(/^[a-zA-Z0-9_]*$/));\n\n/**\n * This is a simple enum with strings\n */\nexport const zEnumWithStrings = z.enum([\n    'Success',\n    'Warning',\n    'Error',\n    '\\'Single Quote\\'',\n    '\"Double Quotes\"',\n    'Non-ascii: øæåôöØÆÅÔÖ字符串'\n]);\n\n/**\n * This is a simple enum with numbers\n */\nexport const zEnumWithNumbers = z.union([\n    z.literal(1),\n    z.literal(2),\n    z.literal(3),\n    z.literal(1.1),\n    z.literal(1.2),\n    z.literal(1.3),\n    z.literal(100),\n    z.literal(200),\n    z.literal(300),\n    z.literal(-100),\n    z.literal(-200),\n    z.literal(-300),\n    z.literal(-1.1),\n    z.literal(-1.2),\n    z.literal(-1.3)\n]);\n\n/**\n * Success=1,Warning=2,Error=3\n */\nexport const zEnumFromDescription = z.number();\n\n/**\n * This is a simple enum with numbers\n */\nexport const zEnumWithExtensions = z.union([\n    z.literal(200),\n    z.literal(400),\n    z.literal(500)\n]);\n\n/**\n * This is a simple array with numbers\n */\nexport const zArrayWithNumbers = z.array(z.int());\n\n/**\n * This is a simple array with booleans\n */\nexport const zArrayWithBooleans = z.array(z.boolean());\n\n/**\n * This is a simple array with strings\n */\nexport const zArrayWithStrings = z.array(z.string());\n\n/**\n * This is a simple array with properties\n */\nexport const zArrayWithProperties = z.array(z.object({\n    foo: z.optional(z.string()),\n    bar: z.optional(z.string())\n}));\n\n/**\n * This is a string dictionary\n */\nexport const zDictionaryWithString = z.record(z.string(), z.string());\n\n/**\n * This is a string dictionary\n */\nexport const zDictionaryWithDictionary = z.record(z.string(), z.record(z.string(), z.string()));\n\n/**\n * This is a complex dictionary\n */\nexport const zDictionaryWithProperties = z.record(z.string(), z.object({\n    foo: z.optional(z.string()),\n    bar: z.optional(z.string())\n}));\n\n/**\n * This is a type-only model that defines Date as a string\n */\nexport const zDate = z.string();\n\n/**\n * This is a model with one number property\n */\nexport const zModelWithInteger = z.object({\n    prop: z.optional(z.int())\n});\n\n/**\n * This is a model with one boolean property\n */\nexport const zModelWithBoolean = z.object({\n    prop: z.optional(z.boolean())\n});\n\n/**\n * This is a model with one string property\n */\nexport const zModelWithString = z.object({\n    prop: z.optional(z.string())\n});\n\nexport const zSimpleReference = zModelWithString;\n\n/**\n * This is a simple array with references\n */\nexport const zArrayWithReferences = z.array(zModelWithString);\n\n/**\n * This is a simple array containing an array\n */\nexport const zArrayWithArray = z.array(z.array(zModelWithString));\n\n/**\n * This is a string reference\n */\nexport const zDictionaryWithReference = z.record(z.string(), zModelWithString);\n\n/**\n * This is a complex dictionary\n */\nexport const zDictionaryWithArray = z.record(z.string(), z.array(zModelWithString));\n\n/**\n * This is a model with one string property\n */\nexport const zModelWithStringError = z.object({\n    prop: z.optional(z.string())\n});\n\n/**\n * This is a model with one string property\n */\nexport const zModelWithNullableString = z.object({\n    nullableProp: z.nullish(z.string()),\n    nullableRequiredProp: z.nullable(z.string())\n});\n\n/**\n * This is a model with one enum\n */\nexport const zModelWithEnum = z.object({\n    test: z.optional(z.enum([\n        'Success',\n        'Warning',\n        'Error',\n        'ØÆÅ字符串'\n    ])),\n    statusCode: z.optional(z.enum([\n        '100',\n        '200 FOO',\n        '300 FOO_BAR',\n        '400 foo-bar',\n        '500 foo.bar',\n        '600 foo&bar'\n    ])),\n    bool: z.optional(z.literal(true))\n});\n\n/**\n * This is a model with one enum\n */\nexport const zModelWithEnumFromDescription = z.object({\n    test: z.optional(z.int())\n});\n\n/**\n * This is a model with nested enums\n */\nexport const zModelWithNestedEnums = z.object({\n    dictionaryWithEnum: z.optional(z.record(z.string(), z.enum([\n        'Success',\n        'Warning',\n        'Error'\n    ]))),\n    dictionaryWithEnumFromDescription: z.optional(z.record(z.string(), z.int())),\n    arrayWithEnum: z.optional(z.array(z.enum([\n        'Success',\n        'Warning',\n        'Error'\n    ]))),\n    arrayWithDescription: z.optional(z.array(z.int()))\n});\n\n/**\n * This is a model with one property containing an array\n */\nexport const zModelWithArray = z.object({\n    prop: z.optional(z.array(zModelWithString)),\n    propWithFile: z.optional(z.array(z.string())),\n    propWithNumber: z.optional(z.array(z.number()))\n});\n\n/**\n * This is a model with one property containing a dictionary\n */\nexport const zModelWithDictionary = z.object({\n    prop: z.optional(z.record(z.string(), z.string()))\n});\n\n/**\n * This is a model with one property containing a circular reference\n */\nexport const zModelWithCircularReference = z.object({\n    prop: z.optional(z.lazy((): any => zModelWithCircularReference))\n});\n\n/**\n * This is a model with one nested property\n */\nexport const zModelWithProperties = z.object({\n    required: z.string(),\n    requiredAndReadOnly: z.readonly(z.string()),\n    string: z.optional(z.string()),\n    number: z.optional(z.number()),\n    boolean: z.optional(z.boolean()),\n    reference: z.optional(zModelWithString),\n    'property with space': z.optional(z.string()),\n    default: z.optional(z.string()),\n    try: z.optional(z.string()),\n    '@namespace.string': z.optional(z.readonly(z.string())),\n    '@namespace.integer': z.optional(z.readonly(z.int()))\n});\n\n/**\n * This is a model with one property containing a reference\n */\nexport const zModelWithReference = z.object({\n    prop: z.optional(zModelWithProperties)\n});\n\n/**\n * This is a model with one nested property\n */\nexport const zModelWithNestedProperties = z.object({\n    first: z.readonly(z.object({\n        second: z.readonly(z.object({\n            third: z.readonly(z.string())\n        }))\n    }))\n});\n\n/**\n * This is a model with duplicated properties\n */\nexport const zModelWithDuplicateProperties = z.object({\n    prop: z.optional(zModelWithString)\n});\n\n/**\n * This is a model with ordered properties\n */\nexport const zModelWithOrderedProperties = z.object({\n    zebra: z.optional(z.string()),\n    apple: z.optional(z.string()),\n    hawaii: z.optional(z.string())\n});\n\n/**\n * This is a model with duplicated imports\n */\nexport const zModelWithDuplicateImports = z.object({\n    propA: z.optional(zModelWithString),\n    propB: z.optional(zModelWithString),\n    propC: z.optional(zModelWithString)\n});\n\n/**\n * This is a model that extends another model\n */\nexport const zModelThatExtends = z.intersection(zModelWithString, z.object({\n    propExtendsA: z.optional(z.string()),\n    propExtendsB: z.optional(zModelWithString)\n}));\n\n/**\n * This is a model that extends another model\n */\nexport const zModelThatExtendsExtends = z.intersection(z.intersection(zModelWithString, zModelThatExtends), z.object({\n    propExtendsC: z.optional(z.string()),\n    propExtendsD: z.optional(zModelWithString)\n}));\n\nexport const zDefault = z.object({\n    name: z.optional(z.string())\n});\n\n/**\n * This is a model that contains a some patterns\n */\nexport const zModelWithPattern = z.object({\n    key: z.string().check(z.maxLength(64), z.regex(/^[a-zA-Z0-9_]*$/)),\n    name: z.string().check(z.maxLength(255)),\n    enabled: z.optional(z.readonly(z.boolean())),\n    modified: z.optional(z.readonly(z.iso.datetime())),\n    id: z.optional(z.string().check(z.regex(/^\\d{2}-\\d{3}-\\d{4}$/))),\n    text: z.optional(z.string().check(z.regex(/^\\w+$/))),\n    patternWithSingleQuotes: z.optional(z.string().check(z.regex(/^[a-zA-Z0-9']*$/))),\n    patternWithNewline: z.optional(z.string().check(z.regex(/aaa\\nbbb/))),\n    patternWithBacktick: z.optional(z.string().check(z.regex(/aaa`bbb/))),\n    patternWithUnicode: z.optional(z.string().check(z.regex(/^\\p{L}+$/u)))\n});\n\nexport const zParameterActivityParams = z.object({\n    description: z.optional(z.string()),\n    graduate_id: z.optional(z.int()),\n    organization_id: z.optional(z.int()),\n    parent_activity: z.optional(z.int()),\n    post_id: z.optional(z.int())\n});\n\nexport const zResponsePostActivityResponse = z.object({\n    description: z.optional(z.string()),\n    graduate_id: z.optional(z.int()),\n    organization_id: z.optional(z.int()),\n    parent_activity_id: z.optional(z.int()),\n    post_id: z.optional(z.int())\n});\n\nexport const zFailureFailure = z.object({\n    error: z.optional(z.string()),\n    message: z.optional(z.string()),\n    reference_code: z.optional(z.string())\n});\n\nexport const zExternalSharedModel = z.object({\n    id: z.string(),\n    name: z.optional(z.string())\n});\n\nexport const zExternalRefA = zExternalSharedModel;\n\nexport const zExternalRefB = zExternalSharedModel;\n\n/**\n * This is a model with one nested property\n */\nexport const zModelWithPropertiesWritable = z.object({\n    required: z.string(),\n    string: z.optional(z.string()),\n    number: z.optional(z.number()),\n    boolean: z.optional(z.boolean()),\n    reference: z.optional(zModelWithString),\n    'property with space': z.optional(z.string()),\n    default: z.optional(z.string()),\n    try: z.optional(z.string())\n});\n\n/**\n * This is a model with one property containing a reference\n */\nexport const zModelWithReferenceWritable = z.object({\n    prop: z.optional(zModelWithPropertiesWritable)\n});\n\n/**\n * This is a model that contains a some patterns\n */\nexport const zModelWithPatternWritable = z.object({\n    key: z.string().check(z.maxLength(64), z.regex(/^[a-zA-Z0-9_]*$/)),\n    name: z.string().check(z.maxLength(255)),\n    id: z.optional(z.string().check(z.regex(/^\\d{2}-\\d{3}-\\d{4}$/))),\n    text: z.optional(z.string().check(z.regex(/^\\w+$/))),\n    patternWithSingleQuotes: z.optional(z.string().check(z.regex(/^[a-zA-Z0-9']*$/))),\n    patternWithNewline: z.optional(z.string().check(z.regex(/aaa\\nbbb/))),\n    patternWithBacktick: z.optional(z.string().check(z.regex(/aaa`bbb/))),\n    patternWithUnicode: z.optional(z.string().check(z.regex(/^\\p{L}+$/u)))\n});\n\nexport const zServiceWithEmptyTagData = z.object({\n    body: z.optional(z.never()),\n    path: z.optional(z.never()),\n    query: z.optional(z.never())\n});\n\nexport const zPatchApiVbyApiVersionNoTagData = z.object({\n    body: z.optional(z.never()),\n    path: z.optional(z.never()),\n    query: z.optional(z.never())\n});\n\nexport const zFooWowData = z.object({\n    body: z.optional(z.never()),\n    path: z.optional(z.never()),\n    query: z.optional(z.never())\n});\n\nexport const zDeleteCallWithoutParametersAndResponseData = z.object({\n    body: z.optional(z.never()),\n    path: z.optional(z.never()),\n    query: z.optional(z.never())\n});\n\nexport const zGetCallWithoutParametersAndResponseData = z.object({\n    body: z.optional(z.never()),\n    path: z.optional(z.never()),\n    query: z.optional(z.never())\n});\n\nexport const zHeadCallWithoutParametersAndResponseData = z.object({\n    body: z.optional(z.never()),\n    path: z.optional(z.never()),\n    query: z.optional(z.never())\n});\n\nexport const zOptionsCallWithoutParametersAndResponseData = z.object({\n    body: z.optional(z.never()),\n    path: z.optional(z.never()),\n    query: z.optional(z.never())\n});\n\nexport const zPatchCallWithoutParametersAndResponseData = z.object({\n    body: z.optional(z.never()),\n    path: z.optional(z.never()),\n    query: z.optional(z.never())\n});\n\nexport const zPostCallWithoutParametersAndResponseData = z.object({\n    body: z.optional(z.never()),\n    path: z.optional(z.never()),\n    query: z.optional(z.never())\n});\n\nexport const zPutCallWithoutParametersAndResponseData = z.object({\n    body: z.optional(z.never()),\n    path: z.optional(z.never()),\n    query: z.optional(z.never())\n});\n\nexport const zCallWithDescriptionsData = z.object({\n    body: z.optional(z.never()),\n    path: z.optional(z.never()),\n    query: z.optional(z.object({\n        parameterWithBreaks: z.optional(z.string()),\n        parameterWithBackticks: z.optional(z.string()),\n        parameterWithSlashes: z.optional(z.string()),\n        parameterWithExpressionPlaceholders: z.optional(z.string()),\n        parameterWithQuotes: z.optional(z.string()),\n        parameterWithReservedCharacters: z.optional(z.string())\n    }))\n});\n\nexport const zCallWithParametersData = z.object({\n    body: z.optional(z.never()),\n    path: z.object({\n        parameterPath: z.string(),\n        'api-version': z.string()\n    }),\n    query: z.object({\n        parameterQuery: z.string()\n    }),\n    headers: z.object({\n        parameterHeader: z.string()\n    })\n});\n\nexport const zCallWithWeirdParameterNamesData = z.object({\n    body: z.string(),\n    path: z.object({\n        'parameter.path.1': z.optional(z.string()),\n        'parameter-path-2': z.optional(z.string()),\n        'PARAMETER-PATH-3': z.optional(z.string()),\n        'api-version': z.string()\n    }),\n    query: z.object({\n        default: z.optional(z.string()),\n        'parameter-query': z.string()\n    }),\n    headers: z.object({\n        'parameter.header': z.string()\n    })\n});\n\nexport const zCallWithDefaultParametersData = z.object({\n    body: z.optional(z.never()),\n    path: z.optional(z.never()),\n    query: z.object({\n        parameterString: z._default(z.string(), 'Hello World!'),\n        parameterNumber: z._default(z.number(), 123),\n        parameterBoolean: z._default(z.boolean(), true),\n        parameterEnum: z.enum([\n            'Success',\n            'Warning',\n            'Error'\n        ]),\n        parameterModel: z._default(z.object({\n            prop: z.optional(z.string())\n        }), { prop: 'Hello World!' })\n    })\n});\n\nexport const zCallWithDefaultOptionalParametersData = z.object({\n    body: z.optional(z.never()),\n    path: z.optional(z.never()),\n    query: z.optional(z.object({\n        parameterString: z._default(z.optional(z.string()), 'Hello World!'),\n        parameterNumber: z._default(z.optional(z.number()), 123),\n        parameterBoolean: z._default(z.optional(z.boolean()), true),\n        parameterEnum: z.optional(z.enum([\n            'Success',\n            'Warning',\n            'Error'\n        ]))\n    }))\n});\n\nexport const zCallToTestOrderOfParamsData = z.object({\n    body: z.optional(z.never()),\n    path: z.optional(z.never()),\n    query: z.object({\n        parameterOptionalStringWithDefault: z._default(z.optional(z.string()), 'Hello World!'),\n        parameterOptionalStringWithEmptyDefault: z._default(z.optional(z.string()), ''),\n        parameterOptionalStringWithNoDefault: z.optional(z.string()),\n        parameterStringWithDefault: z._default(z.string(), 'Hello World!'),\n        parameterStringWithEmptyDefault: z._default(z.string(), ''),\n        parameterStringWithNoDefault: z.string(),\n        parameterStringNullableWithNoDefault: z.nullish(z.string()),\n        parameterStringNullableWithDefault: z._default(z.nullish(z.string()), null)\n    })\n});\n\nexport const zDuplicateNameData = z.object({\n    body: z.optional(z.never()),\n    path: z.optional(z.never()),\n    query: z.optional(z.never())\n});\n\nexport const zDuplicateName2Data = z.object({\n    body: z.optional(z.never()),\n    path: z.optional(z.never()),\n    query: z.optional(z.never())\n});\n\nexport const zDuplicateName3Data = z.object({\n    body: z.optional(z.never()),\n    path: z.optional(z.never()),\n    query: z.optional(z.never())\n});\n\nexport const zDuplicateName4Data = z.object({\n    body: z.optional(z.never()),\n    path: z.optional(z.never()),\n    query: z.optional(z.never())\n});\n\nexport const zCallWithNoContentResponseData = z.object({\n    body: z.optional(z.never()),\n    path: z.optional(z.never()),\n    query: z.optional(z.never())\n});\n\nexport const zCallWithResponseAndNoContentResponseData = z.object({\n    body: z.optional(z.never()),\n    path: z.optional(z.never()),\n    query: z.optional(z.never())\n});\n\nexport const zCallWithResponseAndNoContentResponseResponse = z.union([\n    z.number(),\n    z.unknown()\n]);\n\nexport const zDummyAData = z.object({\n    body: z.optional(z.never()),\n    path: z.optional(z.never()),\n    query: z.optional(z.never())\n});\n\nexport const zDummyBData = z.object({\n    body: z.optional(z.never()),\n    path: z.optional(z.never()),\n    query: z.optional(z.never())\n});\n\nexport const zCallWithResponseData = z.object({\n    body: z.optional(z.never()),\n    path: z.optional(z.never()),\n    query: z.optional(z.never())\n});\n\n/**\n * Message for default response\n */\nexport const zCallWithResponseResponse = zModelWithString;\n\nexport const zCallWithDuplicateResponsesData = z.object({\n    body: z.optional(z.never()),\n    path: z.optional(z.never()),\n    query: z.optional(z.never())\n});\n\n/**\n * Message for 201 response\n */\nexport const zCallWithDuplicateResponsesResponse = zModelWithString;\n\nexport const zCallWithResponsesData = z.object({\n    body: z.optional(z.never()),\n    path: z.optional(z.never()),\n    query: z.optional(z.never())\n});\n\nexport const zCallWithResponsesResponse = z.union([\n    z.object({\n        '@namespace.string': z.optional(z.readonly(z.string())),\n        '@namespace.integer': z.optional(z.readonly(z.int())),\n        value: z.optional(z.readonly(z.array(zModelWithString)))\n    }),\n    zModelThatExtends,\n    zModelThatExtendsExtends\n]);\n\nexport const zCollectionFormatData = z.object({\n    body: z.optional(z.never()),\n    path: z.optional(z.never()),\n    query: z.object({\n        parameterArrayCSV: z.array(z.string()),\n        parameterArraySSV: z.array(z.string()),\n        parameterArrayTSV: z.array(z.string()),\n        parameterArrayPipes: z.array(z.string()),\n        parameterArrayMulti: z.array(z.string())\n    })\n});\n\nexport const zTypesData = z.object({\n    body: z.optional(z.never()),\n    path: z.optional(z.object({\n        id: z.optional(z.int().check(z.minimum(-2147483648, { error: 'Invalid value: Expected int32 to be >= -2147483648' }), z.maximum(2147483647, { error: 'Invalid value: Expected int32 to be <= 2147483647' })))\n    })),\n    query: z.object({\n        parameterNumber: z._default(z.number(), 123),\n        parameterString: z._default(z.string(), 'default'),\n        parameterBoolean: z._default(z.boolean(), true),\n        parameterArray: z.array(z.string()),\n        parameterDictionary: z.record(z.string(), z.unknown()),\n        parameterEnum: z.enum([\n            'Success',\n            'Warning',\n            'Error'\n        ])\n    })\n});\n\nexport const zTypesResponse = z.union([\n    z.number(),\n    z.string(),\n    z.boolean(),\n    z.record(z.string(), z.unknown())\n]);\n\nexport const zComplexTypesData = z.object({\n    body: z.optional(z.never()),\n    path: z.optional(z.never()),\n    query: z.object({\n        parameterObject: z.object({\n            first: z.optional(z.object({\n                second: z.optional(z.object({\n                    third: z.optional(z.string())\n                }))\n            }))\n        }),\n        parameterReference: z.object({\n            prop: z.optional(z.string())\n        })\n    })\n});\n\n/**\n * Successful response\n */\nexport const zComplexTypesResponse = z.array(zModelWithString);\n\nexport const zCallWithResultFromHeaderData = z.object({\n    body: z.optional(z.never()),\n    path: z.optional(z.never()),\n    query: z.optional(z.never())\n});\n\nexport const zTestErrorCodeData = z.object({\n    body: z.optional(z.never()),\n    path: z.optional(z.never()),\n    query: z.object({\n        status: z.string()\n    })\n});\n\nexport const zNonAsciiæøåÆøÅöôêÊ字符串Data = z.object({\n    body: z.optional(z.never()),\n    path: z.optional(z.never()),\n    query: z.object({\n        nonAsciiParamæøåÆØÅöôêÊ: z.int()\n    })\n});\n\n/**\n * Successful response\n */\nexport const zNonAsciiæøåÆøÅöôêÊ字符串Response = zNonAsciiStringæøåÆøÅöôêÊ字符串;\n\nexport const zPostApiVbyApiVersionBodyData = z.object({\n    body: zParameterActivityParams,\n    path: z.optional(z.never()),\n    query: z.optional(z.never())\n});\n\n/**\n * OK\n */\nexport const zPostApiVbyApiVersionBodyResponse = zResponsePostActivityResponse;\n"
  },
  {
    "path": "packages/openapi-ts-tests/zod/v4/__snapshots__/2.0.x/mini/type-format/client/client.gen.ts",
    "content": "// 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 (options: RequestOptions) => {\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 url = buildUrl(opts);\n\n    return { opts, url };\n  };\n\n  const request: Client['request'] = async (options) => {\n    // @ts-expect-error\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"
  },
  {
    "path": "packages/openapi-ts-tests/zod/v4/__snapshots__/2.0.x/mini/type-format/client/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type { Auth } from '../core/auth.gen';\nexport type { QuerySerializerOptions } from '../core/bodySerializer.gen';\nexport {\n  formDataBodySerializer,\n  jsonBodySerializer,\n  urlSearchParamsBodySerializer,\n} from '../core/bodySerializer.gen';\nexport { buildClientParams } from '../core/params.gen';\nexport { serializeQueryKeyValue } from '../core/queryKeySerializer.gen';\nexport { createClient } from './client.gen';\nexport type {\n  Client,\n  ClientOptions,\n  Config,\n  CreateClientConfig,\n  Options,\n  RequestOptions,\n  RequestResult,\n  ResolvedRequestOptions,\n  ResponseStyle,\n  TDataShape,\n} from './types.gen';\nexport { createConfig, mergeHeaders } from './utils.gen';\n"
  },
  {
    "path": "packages/openapi-ts-tests/zod/v4/__snapshots__/2.0.x/mini/type-format/client/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { Auth } from '../core/auth.gen';\nimport type {\n  ServerSentEventsOptions,\n  ServerSentEventsResult,\n} from '../core/serverSentEvents.gen';\nimport type { Client as CoreClient, Config as CoreConfig } from '../core/types.gen';\nimport type { Middleware } from './utils.gen';\n\nexport type ResponseStyle = 'data' | 'fields';\n\nexport interface Config<T extends ClientOptions = ClientOptions>\n  extends Omit<RequestInit, 'body' | 'headers' | 'method'>, CoreConfig {\n  /**\n   * Base URL for all requests made by this client.\n   */\n  baseUrl?: T['baseUrl'];\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   * Please don't use the Fetch client for Next.js applications. The `next`\n   * options won't have any effect.\n   *\n   * Install {@link https://www.npmjs.com/package/@hey-api/client-next `@hey-api/client-next`} instead.\n   */\n  next?: never;\n  /**\n   * Return the response data parsed in a specified format. By default, `auto`\n   * will infer the appropriate method from the `Content-Type` response header.\n   * You can override this behavior with any of the {@link Body} methods.\n   * Select `stream` if you don't want to parse response data at all.\n   *\n   * @default 'auto'\n   */\n  parseAs?: 'arrayBuffer' | 'auto' | 'blob' | 'formData' | 'json' | 'stream' | 'text';\n  /**\n   * Should we return only data or multiple fields (data, error, response, etc.)?\n   *\n   * @default 'fields'\n   */\n  responseStyle?: ResponseStyle;\n  /**\n   * Throw an error instead of returning it in the response?\n   *\n   * @default false\n   */\n  throwOnError?: T['throwOnError'];\n}\n\nexport interface RequestOptions<\n  TData = unknown,\n  TResponseStyle extends ResponseStyle = 'fields',\n  ThrowOnError extends boolean = boolean,\n  Url extends string = string,\n>\n  extends\n    Config<{\n      responseStyle: TResponseStyle;\n      throwOnError: ThrowOnError;\n    }>,\n    Pick<\n      ServerSentEventsOptions<TData>,\n      | 'onRequest'\n      | 'onSseError'\n      | 'onSseEvent'\n      | 'sseDefaultRetryDelay'\n      | 'sseMaxRetryAttempts'\n      | 'sseMaxRetryDelay'\n    > {\n  /**\n   * Any body that you want to add to your request.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/fetch#body}\n   */\n  body?: unknown;\n  path?: Record<string, unknown>;\n  query?: Record<string, unknown>;\n  /**\n   * Security mechanism(s) to use for the request.\n   */\n  security?: ReadonlyArray<Auth>;\n  url: Url;\n}\n\nexport interface ResolvedRequestOptions<\n  TResponseStyle extends ResponseStyle = 'fields',\n  ThrowOnError extends boolean = boolean,\n  Url extends string = string,\n> extends RequestOptions<unknown, TResponseStyle, ThrowOnError, Url> {\n  serializedBody?: string;\n}\n\nexport type RequestResult<\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = boolean,\n  TResponseStyle extends ResponseStyle = 'fields',\n> = ThrowOnError extends true\n  ? Promise<\n      TResponseStyle extends 'data'\n        ? TData extends Record<string, unknown>\n          ? TData[keyof TData]\n          : TData\n        : {\n            data: TData extends Record<string, unknown> ? TData[keyof TData] : TData;\n            request: Request;\n            response: Response;\n          }\n    >\n  : Promise<\n      TResponseStyle extends 'data'\n        ? (TData extends Record<string, unknown> ? TData[keyof TData] : TData) | undefined\n        : (\n            | {\n                data: TData extends Record<string, unknown> ? TData[keyof TData] : TData;\n                error: undefined;\n              }\n            | {\n                data: undefined;\n                error: TError extends Record<string, unknown> ? TError[keyof TError] : TError;\n              }\n          ) & {\n            request: Request;\n            response: Response;\n          }\n    >;\n\nexport interface ClientOptions {\n  baseUrl?: string;\n  responseStyle?: ResponseStyle;\n  throwOnError?: boolean;\n}\n\ntype MethodFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'>,\n) => RequestResult<TData, TError, ThrowOnError, TResponseStyle>;\n\ntype SseFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'>,\n) => Promise<ServerSentEventsResult<TData, TError>>;\n\ntype RequestFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'> &\n    Pick<Required<RequestOptions<TData, TResponseStyle, ThrowOnError>>, 'method'>,\n) => RequestResult<TData, TError, ThrowOnError, TResponseStyle>;\n\ntype BuildUrlFn = <\n  TData extends {\n    body?: unknown;\n    path?: Record<string, unknown>;\n    query?: Record<string, unknown>;\n    url: string;\n  },\n>(\n  options: TData & Options<TData>,\n) => string;\n\nexport type Client = CoreClient<RequestFn, Config, MethodFn, BuildUrlFn, SseFn> & {\n  interceptors: Middleware<Request, Response, unknown, ResolvedRequestOptions>;\n};\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 = ClientOptions> = (\n  override?: Config<ClientOptions & T>,\n) => Config<Required<ClientOptions> & T>;\n\nexport interface TDataShape {\n  body?: unknown;\n  headers?: unknown;\n  path?: unknown;\n  query?: unknown;\n  url: string;\n}\n\ntype OmitKeys<T, K> = Pick<T, Exclude<keyof T, K>>;\n\nexport type Options<\n  TData extends TDataShape = TDataShape,\n  ThrowOnError extends boolean = boolean,\n  TResponse = unknown,\n  TResponseStyle extends ResponseStyle = 'fields',\n> = OmitKeys<\n  RequestOptions<TResponse, TResponseStyle, ThrowOnError>,\n  'body' | 'path' | 'query' | 'url'\n> &\n  ([TData] extends [never] ? unknown : Omit<TData, 'url'>);\n"
  },
  {
    "path": "packages/openapi-ts-tests/zod/v4/__snapshots__/2.0.x/mini/type-format/client/utils.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/zod/v4/__snapshots__/2.0.x/mini/type-format/client.gen.ts",
    "content": "// 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>());\n"
  },
  {
    "path": "packages/openapi-ts-tests/zod/v4/__snapshots__/2.0.x/mini/type-format/core/auth.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/zod/v4/__snapshots__/2.0.x/mini/type-format/core/bodySerializer.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/zod/v4/__snapshots__/2.0.x/mini/type-format/core/params.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/zod/v4/__snapshots__/2.0.x/mini/type-format/core/pathSerializer.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/zod/v4/__snapshots__/2.0.x/mini/type-format/core/queryKeySerializer.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\n/**\n * JSON-friendly union that mirrors what Pinia Colada can hash.\n */\nexport type JsonValue =\n  | null\n  | string\n  | number\n  | boolean\n  | JsonValue[]\n  | { [key: string]: JsonValue };\n\n/**\n * Replacer that converts non-JSON values (bigint, Date, etc.) to safe substitutes.\n */\nexport const queryKeyJsonReplacer = (_key: string, value: unknown) => {\n  if (value === undefined || typeof value === 'function' || typeof value === 'symbol') {\n    return undefined;\n  }\n  if (typeof value === 'bigint') {\n    return value.toString();\n  }\n  if (value instanceof Date) {\n    return value.toISOString();\n  }\n  return value;\n};\n\n/**\n * Safely stringifies a value and parses it back into a JsonValue.\n */\nexport const stringifyToJsonValue = (input: unknown): JsonValue | undefined => {\n  try {\n    const json = JSON.stringify(input, queryKeyJsonReplacer);\n    if (json === undefined) {\n      return undefined;\n    }\n    return JSON.parse(json) as JsonValue;\n  } catch {\n    return undefined;\n  }\n};\n\n/**\n * Detects plain objects (including objects with a null prototype).\n */\nconst isPlainObject = (value: unknown): value is Record<string, unknown> => {\n  if (value === null || typeof value !== 'object') {\n    return false;\n  }\n  const prototype = Object.getPrototypeOf(value as object);\n  return prototype === Object.prototype || prototype === null;\n};\n\n/**\n * Turns URLSearchParams into a sorted JSON object for deterministic keys.\n */\nconst serializeSearchParams = (params: URLSearchParams): JsonValue => {\n  const entries = Array.from(params.entries()).sort(([a], [b]) => a.localeCompare(b));\n  const result: Record<string, JsonValue> = {};\n\n  for (const [key, value] of entries) {\n    const existing = result[key];\n    if (existing === undefined) {\n      result[key] = value;\n      continue;\n    }\n\n    if (Array.isArray(existing)) {\n      (existing as string[]).push(value);\n    } else {\n      result[key] = [existing, value];\n    }\n  }\n\n  return result;\n};\n\n/**\n * Normalizes any accepted value into a JSON-friendly shape for query keys.\n */\nexport const serializeQueryKeyValue = (value: unknown): JsonValue | undefined => {\n  if (value === null) {\n    return null;\n  }\n\n  if (typeof value === 'string' || typeof value === 'number' || typeof value === 'boolean') {\n    return value;\n  }\n\n  if (value === undefined || typeof value === 'function' || typeof value === 'symbol') {\n    return undefined;\n  }\n\n  if (typeof value === 'bigint') {\n    return value.toString();\n  }\n\n  if (value instanceof Date) {\n    return value.toISOString();\n  }\n\n  if (Array.isArray(value)) {\n    return stringifyToJsonValue(value);\n  }\n\n  if (typeof URLSearchParams !== 'undefined' && value instanceof URLSearchParams) {\n    return serializeSearchParams(value);\n  }\n\n  if (isPlainObject(value)) {\n    return stringifyToJsonValue(value);\n  }\n\n  return undefined;\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/zod/v4/__snapshots__/2.0.x/mini/type-format/core/serverSentEvents.gen.ts",
    "content": "// 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 const 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            // Normalize line endings: CRLF -> LF, then CR -> LF\n            buffer = buffer.replace(/\\r\\n/g, '\\n').replace(/\\r/g, '\\n');\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"
  },
  {
    "path": "packages/openapi-ts-tests/zod/v4/__snapshots__/2.0.x/mini/type-format/core/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { Auth, AuthToken } from './auth.gen';\nimport type { BodySerializer, QuerySerializer, QuerySerializerOptions } from './bodySerializer.gen';\n\nexport type HttpMethod =\n  | 'connect'\n  | 'delete'\n  | 'get'\n  | 'head'\n  | 'options'\n  | 'patch'\n  | 'post'\n  | 'put'\n  | 'trace';\n\nexport type Client<\n  RequestFn = never,\n  Config = unknown,\n  MethodFn = never,\n  BuildUrlFn = never,\n  SseFn = never,\n> = {\n  /**\n   * Returns the final request URL.\n   */\n  buildUrl: BuildUrlFn;\n  getConfig: () => Config;\n  request: RequestFn;\n  setConfig: (config: Config) => Config;\n} & {\n  [K in HttpMethod]: MethodFn;\n} & ([SseFn] extends [never] ? { sse?: never } : { sse: { [K in HttpMethod]: SseFn } });\n\nexport interface Config {\n  /**\n   * Auth token or a function returning auth token. The resolved value will be\n   * added to the request payload as defined by its `security` array.\n   */\n  auth?: ((auth: Auth) => Promise<AuthToken> | AuthToken) | AuthToken;\n  /**\n   * A function for serializing request body parameter. By default,\n   * {@link JSON.stringify()} will be used.\n   */\n  bodySerializer?: BodySerializer | null;\n  /**\n   * An object containing any HTTP headers that you want to pre-populate your\n   * `Headers` object with.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/Headers/Headers#init See more}\n   */\n  headers?:\n    | RequestInit['headers']\n    | Record<\n        string,\n        string | number | boolean | (string | number | boolean)[] | null | undefined | unknown\n      >;\n  /**\n   * The request method.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/fetch#method See more}\n   */\n  method?: Uppercase<HttpMethod>;\n  /**\n   * A function for serializing request query parameters. By default, arrays\n   * will be exploded in form style, objects will be exploded in deepObject\n   * style, and reserved characters are percent-encoded.\n   *\n   * This method will have no effect if the native `paramsSerializer()` Axios\n   * API function is used.\n   *\n   * {@link https://swagger.io/docs/specification/serialization/#query View examples}\n   */\n  querySerializer?: QuerySerializer | QuerySerializerOptions;\n  /**\n   * A function validating request data. This is useful if you want to ensure\n   * the request conforms to the desired shape, so it can be safely sent to\n   * the server.\n   */\n  requestValidator?: (data: unknown) => Promise<unknown>;\n  /**\n   * A function transforming response data before it's returned. This is useful\n   * for post-processing data, e.g. converting ISO strings into Date objects.\n   */\n  responseTransformer?: (data: unknown) => Promise<unknown>;\n  /**\n   * A function validating response data. This is useful if you want to ensure\n   * the response conforms to the desired shape, so it can be safely passed to\n   * the transformers and returned to the user.\n   */\n  responseValidator?: (data: unknown) => Promise<unknown>;\n}\n\ntype IsExactlyNeverOrNeverUndefined<T> = [T] extends [never]\n  ? true\n  : [T] extends [never | undefined]\n    ? [undefined] extends [T]\n      ? false\n      : true\n    : false;\n\nexport type OmitNever<T extends Record<string, unknown>> = {\n  [K in keyof T as IsExactlyNeverOrNeverUndefined<T[K]> extends true ? never : K]: T[K];\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/zod/v4/__snapshots__/2.0.x/mini/type-format/core/utils.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/zod/v4/__snapshots__/2.0.x/mini/type-format/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport { type Options, postFoo } from './sdk.gen';\nexport type { Bar, ClientOptions, Foo, PostFooData, PostFooResponse, PostFooResponses, TypeID, UserId } from './types.gen';\n"
  },
  {
    "path": "packages/openapi-ts-tests/zod/v4/__snapshots__/2.0.x/mini/type-format/sdk.gen.ts",
    "content": "// 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 { postFooResponseTransformer } from './transformers.gen';\nimport type { PostFooData, PostFooResponses } from './types.gen';\nimport { zPostFooData, zPostFooResponse } from './zod.gen';\n\nexport type Options<TData extends TDataShape = TDataShape, ThrowOnError extends boolean = boolean> = Options2<TData, ThrowOnError> & {\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\nexport const postFoo = <ThrowOnError extends boolean = false>(options?: Options<PostFooData, ThrowOnError>) => (options?.client ?? client).post<PostFooResponses, unknown, ThrowOnError>({\n    requestValidator: async (data) => await zPostFooData.parseAsync(data),\n    responseTransformer: postFooResponseTransformer,\n    responseValidator: async (data) => await zPostFooResponse.parseAsync(data),\n    url: '/foo',\n    ...options\n});\n"
  },
  {
    "path": "packages/openapi-ts-tests/zod/v4/__snapshots__/2.0.x/mini/type-format/transformers.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { PostFooResponse } from './types.gen';\n\nconst fooSchemaResponseTransformer = (data: any) => {\n    data.foo = BigInt(data.foo.toString());\n    return data;\n};\n\nexport const postFooResponseTransformer = async (data: any): Promise<PostFooResponse> => {\n    data = fooSchemaResponseTransformer(data);\n    return data;\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/zod/v4/__snapshots__/2.0.x/mini/type-format/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type ClientOptions = {\n    baseUrl: string;\n};\n\nexport type TypeID<T extends string> = `${T}_${string}`;\n\nexport type UserId = TypeID<'user'>;\n\nexport type Foo = {\n    bar?: number;\n    foo: bigint;\n    id: UserId;\n};\n\nexport type Bar = {\n    foo: number;\n    [key: string]: number;\n};\n\nexport type PostFooData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/foo';\n};\n\nexport type PostFooResponses = {\n    /**\n     * OK\n     */\n    200: Foo;\n};\n\nexport type PostFooResponse = PostFooResponses[keyof PostFooResponses];\n"
  },
  {
    "path": "packages/openapi-ts-tests/zod/v4/__snapshots__/2.0.x/mini/type-format/zod.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport * as z from 'zod/mini';\n\nexport const zFoo = z.object({\n    bar: z.optional(z.int()),\n    foo: z._default(z.coerce.bigint().check(z.minimum(BigInt('-9223372036854775808'), { error: 'Invalid value: Expected int64 to be >= -9223372036854775808' }), z.maximum(BigInt('9223372036854775807'), { error: 'Invalid value: Expected int64 to be <= 9223372036854775807' })), BigInt(0)),\n    id: z.string()\n});\n\nexport const zBar = z.object({\n    foo: z.int()\n});\n\nexport const zPostFooData = z.object({\n    body: z.optional(z.never()),\n    path: z.optional(z.never()),\n    query: z.optional(z.never())\n});\n\n/**\n * OK\n */\nexport const zPostFooResponse = zFoo;\n"
  },
  {
    "path": "packages/openapi-ts-tests/zod/v4/__snapshots__/2.0.x/v3/array-items-all-of/zod.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport { z } from 'zod/v3';\n\nexport const zArrayWithAllOfObjects = z.array(z.object({\n    id: z.number().int().optional()\n}).and(z.object({\n    name: z.string().optional()\n})));\n\nexport const zArrayWithAllOfPrimitives = z.array(z.intersection(z.number(), z.string()));\n\nexport const zBaseModel = z.object({\n    id: z.number().int().optional(),\n    createdAt: z.string().datetime().optional()\n});\n\nexport const zArrayWithAllOfRefs = z.array(zBaseModel.and(z.object({\n    extra: z.string().optional()\n})));\n"
  },
  {
    "path": "packages/openapi-ts-tests/zod/v4/__snapshots__/2.0.x/v3/default/zod.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport { z } from 'zod/v3';\n\n/**\n * Testing multiline comments in string: First line\n * Second line\n *\n * Fourth line\n */\nexport const zCommentWithBreaks = z.number().int();\n\n/**\n * Testing backticks in string: `backticks` and ```multiple backticks``` should work\n */\nexport const zCommentWithBackticks = z.number().int();\n\n/**\n * Testing backticks and quotes in string: `backticks`, 'quotes', \"double quotes\" and ```multiple backticks``` should work\n */\nexport const zCommentWithBackticksAndQuotes = z.number().int();\n\n/**\n * Testing slashes in string: \\backwards\\\\\\ and /forwards/// should work\n */\nexport const zCommentWithSlashes = z.number().int();\n\n/**\n * Testing expression placeholders in string: ${expression} should work\n */\nexport const zCommentWithExpressionPlaceholders = z.number().int();\n\n/**\n * Testing quotes in string: 'single quote''' and \"double quotes\"\"\" should work\n */\nexport const zCommentWithQuotes = z.number().int();\n\n/**\n * Testing reserved characters in string: * inline * and ** inline ** should work\n */\nexport const zCommentWithReservedCharacters = z.number().int();\n\n/**\n * This is a simple number\n */\nexport const zSimpleInteger = z.number().int();\n\n/**\n * This is a simple boolean\n */\nexport const zSimpleBoolean = z.boolean();\n\n/**\n * This is a simple string\n */\nexport const zSimpleString = z.string();\n\n/**\n * A string with non-ascii (unicode) characters valid in typescript identifiers (æøåÆØÅöÔèÈ字符串)\n */\nexport const zNonAsciiStringæøåÆøÅöôêÊ字符串 = z.string();\n\n/**\n * This is a simple file\n */\nexport const zSimpleFile = z.string();\n\n/**\n * This is a simple string\n */\nexport const zSimpleStringWithPattern = z.string().max(64).regex(/^[a-zA-Z0-9_]*$/);\n\n/**\n * This is a simple enum with strings\n */\nexport const zEnumWithStrings = z.enum([\n    'Success',\n    'Warning',\n    'Error',\n    '\\'Single Quote\\'',\n    '\"Double Quotes\"',\n    'Non-ascii: øæåôöØÆÅÔÖ字符串'\n]);\n\n/**\n * This is a simple enum with numbers\n */\nexport const zEnumWithNumbers = z.union([\n    z.literal(1),\n    z.literal(2),\n    z.literal(3),\n    z.literal(1.1),\n    z.literal(1.2),\n    z.literal(1.3),\n    z.literal(100),\n    z.literal(200),\n    z.literal(300),\n    z.literal(-100),\n    z.literal(-200),\n    z.literal(-300),\n    z.literal(-1.1),\n    z.literal(-1.2),\n    z.literal(-1.3)\n]);\n\n/**\n * Success=1,Warning=2,Error=3\n */\nexport const zEnumFromDescription = z.number();\n\n/**\n * This is a simple enum with numbers\n */\nexport const zEnumWithExtensions = z.union([\n    z.literal(200),\n    z.literal(400),\n    z.literal(500)\n]);\n\n/**\n * This is a simple array with numbers\n */\nexport const zArrayWithNumbers = z.array(z.number().int());\n\n/**\n * This is a simple array with booleans\n */\nexport const zArrayWithBooleans = z.array(z.boolean());\n\n/**\n * This is a simple array with strings\n */\nexport const zArrayWithStrings = z.array(z.string());\n\n/**\n * This is a simple array with properties\n */\nexport const zArrayWithProperties = z.array(z.object({\n    foo: z.string().optional(),\n    bar: z.string().optional()\n}));\n\n/**\n * This is a string dictionary\n */\nexport const zDictionaryWithString = z.record(z.string());\n\n/**\n * This is a string dictionary\n */\nexport const zDictionaryWithDictionary = z.record(z.record(z.string()));\n\n/**\n * This is a complex dictionary\n */\nexport const zDictionaryWithProperties = z.record(z.object({\n    foo: z.string().optional(),\n    bar: z.string().optional()\n}));\n\n/**\n * This is a type-only model that defines Date as a string\n */\nexport const zDate = z.string();\n\n/**\n * This is a model with one number property\n */\nexport const zModelWithInteger = z.object({\n    prop: z.number().int().optional()\n});\n\n/**\n * This is a model with one boolean property\n */\nexport const zModelWithBoolean = z.object({\n    prop: z.boolean().optional()\n});\n\n/**\n * This is a model with one string property\n */\nexport const zModelWithString = z.object({\n    prop: z.string().optional()\n});\n\nexport const zSimpleReference = zModelWithString;\n\n/**\n * This is a simple array with references\n */\nexport const zArrayWithReferences = z.array(zModelWithString);\n\n/**\n * This is a simple array containing an array\n */\nexport const zArrayWithArray = z.array(z.array(zModelWithString));\n\n/**\n * This is a string reference\n */\nexport const zDictionaryWithReference = z.record(zModelWithString);\n\n/**\n * This is a complex dictionary\n */\nexport const zDictionaryWithArray = z.record(z.array(zModelWithString));\n\n/**\n * This is a model with one string property\n */\nexport const zModelWithStringError = z.object({\n    prop: z.string().optional()\n});\n\n/**\n * This is a model with one string property\n */\nexport const zModelWithNullableString = z.object({\n    nullableProp: z.string().nullish(),\n    nullableRequiredProp: z.string().nullable()\n});\n\n/**\n * This is a model with one enum\n */\nexport const zModelWithEnum = z.object({\n    test: z.enum([\n        'Success',\n        'Warning',\n        'Error',\n        'ØÆÅ字符串'\n    ]).optional(),\n    statusCode: z.enum([\n        '100',\n        '200 FOO',\n        '300 FOO_BAR',\n        '400 foo-bar',\n        '500 foo.bar',\n        '600 foo&bar'\n    ]).optional(),\n    bool: z.literal(true).optional()\n});\n\n/**\n * This is a model with one enum\n */\nexport const zModelWithEnumFromDescription = z.object({\n    test: z.number().int().optional()\n});\n\n/**\n * This is a model with nested enums\n */\nexport const zModelWithNestedEnums = z.object({\n    dictionaryWithEnum: z.record(z.enum([\n        'Success',\n        'Warning',\n        'Error'\n    ])).optional(),\n    dictionaryWithEnumFromDescription: z.record(z.number().int()).optional(),\n    arrayWithEnum: z.array(z.enum([\n        'Success',\n        'Warning',\n        'Error'\n    ])).optional(),\n    arrayWithDescription: z.array(z.number().int()).optional()\n});\n\n/**\n * This is a model with one property containing an array\n */\nexport const zModelWithArray = z.object({\n    prop: z.array(zModelWithString).optional(),\n    propWithFile: z.array(z.string()).optional(),\n    propWithNumber: z.array(z.number()).optional()\n});\n\n/**\n * This is a model with one property containing a dictionary\n */\nexport const zModelWithDictionary = z.object({\n    prop: z.record(z.string()).optional()\n});\n\n/**\n * This is a model with one property containing a circular reference\n */\nexport const zModelWithCircularReference: z.AnyZodObject = z.object({\n    prop: z.lazy(() => zModelWithCircularReference).optional()\n});\n\n/**\n * This is a model with one nested property\n */\nexport const zModelWithProperties = z.object({\n    required: z.string(),\n    requiredAndReadOnly: z.string().readonly(),\n    string: z.string().optional(),\n    number: z.number().optional(),\n    boolean: z.boolean().optional(),\n    reference: zModelWithString.optional(),\n    'property with space': z.string().optional(),\n    default: z.string().optional(),\n    try: z.string().optional(),\n    '@namespace.string': z.string().readonly().optional(),\n    '@namespace.integer': z.number().int().readonly().optional()\n});\n\n/**\n * This is a model with one property containing a reference\n */\nexport const zModelWithReference = z.object({\n    prop: zModelWithProperties.optional()\n});\n\n/**\n * This is a model with one nested property\n */\nexport const zModelWithNestedProperties = z.object({\n    first: z.object({\n        second: z.object({\n            third: z.string().readonly()\n        }).readonly()\n    }).readonly()\n});\n\n/**\n * This is a model with duplicated properties\n */\nexport const zModelWithDuplicateProperties = z.object({\n    prop: zModelWithString.optional()\n});\n\n/**\n * This is a model with ordered properties\n */\nexport const zModelWithOrderedProperties = z.object({\n    zebra: z.string().optional(),\n    apple: z.string().optional(),\n    hawaii: z.string().optional()\n});\n\n/**\n * This is a model with duplicated imports\n */\nexport const zModelWithDuplicateImports = z.object({\n    propA: zModelWithString.optional(),\n    propB: zModelWithString.optional(),\n    propC: zModelWithString.optional()\n});\n\n/**\n * This is a model that extends another model\n */\nexport const zModelThatExtends = zModelWithString.and(z.object({\n    propExtendsA: z.string().optional(),\n    propExtendsB: zModelWithString.optional()\n}));\n\n/**\n * This is a model that extends another model\n */\nexport const zModelThatExtendsExtends = zModelWithString.and(zModelThatExtends).and(z.object({\n    propExtendsC: z.string().optional(),\n    propExtendsD: zModelWithString.optional()\n}));\n\nexport const zDefault = z.object({\n    name: z.string().optional()\n});\n\n/**\n * This is a model that contains a some patterns\n */\nexport const zModelWithPattern = z.object({\n    key: z.string().max(64).regex(/^[a-zA-Z0-9_]*$/),\n    name: z.string().max(255),\n    enabled: z.boolean().readonly().optional(),\n    modified: z.string().datetime().readonly().optional(),\n    id: z.string().regex(/^\\d{2}-\\d{3}-\\d{4}$/).optional(),\n    text: z.string().regex(/^\\w+$/).optional(),\n    patternWithSingleQuotes: z.string().regex(/^[a-zA-Z0-9']*$/).optional(),\n    patternWithNewline: z.string().regex(/aaa\\nbbb/).optional(),\n    patternWithBacktick: z.string().regex(/aaa`bbb/).optional(),\n    patternWithUnicode: z.string().regex(/^\\p{L}+$/u).optional()\n});\n\nexport const zParameterActivityParams = z.object({\n    description: z.string().optional(),\n    graduate_id: z.number().int().optional(),\n    organization_id: z.number().int().optional(),\n    parent_activity: z.number().int().optional(),\n    post_id: z.number().int().optional()\n});\n\nexport const zResponsePostActivityResponse = z.object({\n    description: z.string().optional(),\n    graduate_id: z.number().int().optional(),\n    organization_id: z.number().int().optional(),\n    parent_activity_id: z.number().int().optional(),\n    post_id: z.number().int().optional()\n});\n\nexport const zFailureFailure = z.object({\n    error: z.string().optional(),\n    message: z.string().optional(),\n    reference_code: z.string().optional()\n});\n\nexport const zExternalSharedModel = z.object({\n    id: z.string(),\n    name: z.string().optional()\n});\n\nexport const zExternalRefA = zExternalSharedModel;\n\nexport const zExternalRefB = zExternalSharedModel;\n\n/**\n * This is a model with one nested property\n */\nexport const zModelWithPropertiesWritable = z.object({\n    required: z.string(),\n    string: z.string().optional(),\n    number: z.number().optional(),\n    boolean: z.boolean().optional(),\n    reference: zModelWithString.optional(),\n    'property with space': z.string().optional(),\n    default: z.string().optional(),\n    try: z.string().optional()\n});\n\n/**\n * This is a model with one property containing a reference\n */\nexport const zModelWithReferenceWritable = z.object({\n    prop: zModelWithPropertiesWritable.optional()\n});\n\n/**\n * This is a model that contains a some patterns\n */\nexport const zModelWithPatternWritable = z.object({\n    key: z.string().max(64).regex(/^[a-zA-Z0-9_]*$/),\n    name: z.string().max(255),\n    id: z.string().regex(/^\\d{2}-\\d{3}-\\d{4}$/).optional(),\n    text: z.string().regex(/^\\w+$/).optional(),\n    patternWithSingleQuotes: z.string().regex(/^[a-zA-Z0-9']*$/).optional(),\n    patternWithNewline: z.string().regex(/aaa\\nbbb/).optional(),\n    patternWithBacktick: z.string().regex(/aaa`bbb/).optional(),\n    patternWithUnicode: z.string().regex(/^\\p{L}+$/u).optional()\n});\n\nexport const zServiceWithEmptyTagData = z.object({\n    body: z.never().optional(),\n    path: z.never().optional(),\n    query: z.never().optional()\n});\n\nexport const zPatchApiVbyApiVersionNoTagData = z.object({\n    body: z.never().optional(),\n    path: z.never().optional(),\n    query: z.never().optional()\n});\n\nexport const zFooWowData = z.object({\n    body: z.never().optional(),\n    path: z.never().optional(),\n    query: z.never().optional()\n});\n\nexport const zDeleteCallWithoutParametersAndResponseData = z.object({\n    body: z.never().optional(),\n    path: z.never().optional(),\n    query: z.never().optional()\n});\n\nexport const zGetCallWithoutParametersAndResponseData = z.object({\n    body: z.never().optional(),\n    path: z.never().optional(),\n    query: z.never().optional()\n});\n\nexport const zHeadCallWithoutParametersAndResponseData = z.object({\n    body: z.never().optional(),\n    path: z.never().optional(),\n    query: z.never().optional()\n});\n\nexport const zOptionsCallWithoutParametersAndResponseData = z.object({\n    body: z.never().optional(),\n    path: z.never().optional(),\n    query: z.never().optional()\n});\n\nexport const zPatchCallWithoutParametersAndResponseData = z.object({\n    body: z.never().optional(),\n    path: z.never().optional(),\n    query: z.never().optional()\n});\n\nexport const zPostCallWithoutParametersAndResponseData = z.object({\n    body: z.never().optional(),\n    path: z.never().optional(),\n    query: z.never().optional()\n});\n\nexport const zPutCallWithoutParametersAndResponseData = z.object({\n    body: z.never().optional(),\n    path: z.never().optional(),\n    query: z.never().optional()\n});\n\nexport const zCallWithDescriptionsData = z.object({\n    body: z.never().optional(),\n    path: z.never().optional(),\n    query: z.object({\n        parameterWithBreaks: z.string().optional(),\n        parameterWithBackticks: z.string().optional(),\n        parameterWithSlashes: z.string().optional(),\n        parameterWithExpressionPlaceholders: z.string().optional(),\n        parameterWithQuotes: z.string().optional(),\n        parameterWithReservedCharacters: z.string().optional()\n    }).optional()\n});\n\nexport const zCallWithParametersData = z.object({\n    body: z.never().optional(),\n    path: z.object({\n        parameterPath: z.string(),\n        'api-version': z.string()\n    }),\n    query: z.object({\n        parameterQuery: z.string()\n    }),\n    headers: z.object({\n        parameterHeader: z.string()\n    })\n});\n\nexport const zCallWithWeirdParameterNamesData = z.object({\n    body: z.string(),\n    path: z.object({\n        'parameter.path.1': z.string().optional(),\n        'parameter-path-2': z.string().optional(),\n        'PARAMETER-PATH-3': z.string().optional(),\n        'api-version': z.string()\n    }),\n    query: z.object({\n        default: z.string().optional(),\n        'parameter-query': z.string()\n    }),\n    headers: z.object({\n        'parameter.header': z.string()\n    })\n});\n\nexport const zCallWithDefaultParametersData = z.object({\n    body: z.never().optional(),\n    path: z.never().optional(),\n    query: z.object({\n        parameterString: z.string().default('Hello World!'),\n        parameterNumber: z.number().default(123),\n        parameterBoolean: z.boolean().default(true),\n        parameterEnum: z.enum([\n            'Success',\n            'Warning',\n            'Error'\n        ]),\n        parameterModel: z.object({\n            prop: z.string().optional()\n        }).default({ prop: 'Hello World!' })\n    })\n});\n\nexport const zCallWithDefaultOptionalParametersData = z.object({\n    body: z.never().optional(),\n    path: z.never().optional(),\n    query: z.object({\n        parameterString: z.string().optional().default('Hello World!'),\n        parameterNumber: z.number().optional().default(123),\n        parameterBoolean: z.boolean().optional().default(true),\n        parameterEnum: z.enum([\n            'Success',\n            'Warning',\n            'Error'\n        ]).optional()\n    }).optional()\n});\n\nexport const zCallToTestOrderOfParamsData = z.object({\n    body: z.never().optional(),\n    path: z.never().optional(),\n    query: z.object({\n        parameterOptionalStringWithDefault: z.string().optional().default('Hello World!'),\n        parameterOptionalStringWithEmptyDefault: z.string().optional().default(''),\n        parameterOptionalStringWithNoDefault: z.string().optional(),\n        parameterStringWithDefault: z.string().default('Hello World!'),\n        parameterStringWithEmptyDefault: z.string().default(''),\n        parameterStringWithNoDefault: z.string(),\n        parameterStringNullableWithNoDefault: z.string().nullish(),\n        parameterStringNullableWithDefault: z.string().nullish().default(null)\n    })\n});\n\nexport const zDuplicateNameData = z.object({\n    body: z.never().optional(),\n    path: z.never().optional(),\n    query: z.never().optional()\n});\n\nexport const zDuplicateName2Data = z.object({\n    body: z.never().optional(),\n    path: z.never().optional(),\n    query: z.never().optional()\n});\n\nexport const zDuplicateName3Data = z.object({\n    body: z.never().optional(),\n    path: z.never().optional(),\n    query: z.never().optional()\n});\n\nexport const zDuplicateName4Data = z.object({\n    body: z.never().optional(),\n    path: z.never().optional(),\n    query: z.never().optional()\n});\n\nexport const zCallWithNoContentResponseData = z.object({\n    body: z.never().optional(),\n    path: z.never().optional(),\n    query: z.never().optional()\n});\n\nexport const zCallWithResponseAndNoContentResponseData = z.object({\n    body: z.never().optional(),\n    path: z.never().optional(),\n    query: z.never().optional()\n});\n\nexport const zCallWithResponseAndNoContentResponseResponse = z.union([\n    z.number(),\n    z.unknown()\n]);\n\nexport const zDummyAData = z.object({\n    body: z.never().optional(),\n    path: z.never().optional(),\n    query: z.never().optional()\n});\n\nexport const zDummyBData = z.object({\n    body: z.never().optional(),\n    path: z.never().optional(),\n    query: z.never().optional()\n});\n\nexport const zCallWithResponseData = z.object({\n    body: z.never().optional(),\n    path: z.never().optional(),\n    query: z.never().optional()\n});\n\n/**\n * Message for default response\n */\nexport const zCallWithResponseResponse = zModelWithString;\n\nexport const zCallWithDuplicateResponsesData = z.object({\n    body: z.never().optional(),\n    path: z.never().optional(),\n    query: z.never().optional()\n});\n\n/**\n * Message for 201 response\n */\nexport const zCallWithDuplicateResponsesResponse = zModelWithString;\n\nexport const zCallWithResponsesData = z.object({\n    body: z.never().optional(),\n    path: z.never().optional(),\n    query: z.never().optional()\n});\n\nexport const zCallWithResponsesResponse = z.union([\n    z.object({\n        '@namespace.string': z.string().readonly().optional(),\n        '@namespace.integer': z.number().int().readonly().optional(),\n        value: z.array(zModelWithString).readonly().optional()\n    }),\n    zModelThatExtends,\n    zModelThatExtendsExtends\n]);\n\nexport const zCollectionFormatData = z.object({\n    body: z.never().optional(),\n    path: z.never().optional(),\n    query: z.object({\n        parameterArrayCSV: z.array(z.string()),\n        parameterArraySSV: z.array(z.string()),\n        parameterArrayTSV: z.array(z.string()),\n        parameterArrayPipes: z.array(z.string()),\n        parameterArrayMulti: z.array(z.string())\n    })\n});\n\nexport const zTypesData = z.object({\n    body: z.never().optional(),\n    path: z.object({\n        id: z.number().int().min(-2147483648, { message: 'Invalid value: Expected int32 to be >= -2147483648' }).max(2147483647, { message: 'Invalid value: Expected int32 to be <= 2147483647' }).optional()\n    }).optional(),\n    query: z.object({\n        parameterNumber: z.number().default(123),\n        parameterString: z.string().default('default'),\n        parameterBoolean: z.boolean().default(true),\n        parameterArray: z.array(z.string()),\n        parameterDictionary: z.record(z.unknown()),\n        parameterEnum: z.enum([\n            'Success',\n            'Warning',\n            'Error'\n        ])\n    })\n});\n\nexport const zTypesResponse = z.union([\n    z.number(),\n    z.string(),\n    z.boolean(),\n    z.record(z.unknown())\n]);\n\nexport const zComplexTypesData = z.object({\n    body: z.never().optional(),\n    path: z.never().optional(),\n    query: z.object({\n        parameterObject: z.object({\n            first: z.object({\n                second: z.object({\n                    third: z.string().optional()\n                }).optional()\n            }).optional()\n        }),\n        parameterReference: z.object({\n            prop: z.string().optional()\n        })\n    })\n});\n\n/**\n * Successful response\n */\nexport const zComplexTypesResponse = z.array(zModelWithString);\n\nexport const zCallWithResultFromHeaderData = z.object({\n    body: z.never().optional(),\n    path: z.never().optional(),\n    query: z.never().optional()\n});\n\nexport const zTestErrorCodeData = z.object({\n    body: z.never().optional(),\n    path: z.never().optional(),\n    query: z.object({\n        status: z.string()\n    })\n});\n\nexport const zNonAsciiæøåÆøÅöôêÊ字符串Data = z.object({\n    body: z.never().optional(),\n    path: z.never().optional(),\n    query: z.object({\n        nonAsciiParamæøåÆØÅöôêÊ: z.number().int()\n    })\n});\n\n/**\n * Successful response\n */\nexport const zNonAsciiæøåÆøÅöôêÊ字符串Response = zNonAsciiStringæøåÆøÅöôêÊ字符串;\n\nexport const zPostApiVbyApiVersionBodyData = z.object({\n    body: zParameterActivityParams,\n    path: z.never().optional(),\n    query: z.never().optional()\n});\n\n/**\n * OK\n */\nexport const zPostApiVbyApiVersionBodyResponse = zResponsePostActivityResponse;\n"
  },
  {
    "path": "packages/openapi-ts-tests/zod/v4/__snapshots__/2.0.x/v3/type-format/client/client.gen.ts",
    "content": "// 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 (options: RequestOptions) => {\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 url = buildUrl(opts);\n\n    return { opts, url };\n  };\n\n  const request: Client['request'] = async (options) => {\n    // @ts-expect-error\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"
  },
  {
    "path": "packages/openapi-ts-tests/zod/v4/__snapshots__/2.0.x/v3/type-format/client/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type { Auth } from '../core/auth.gen';\nexport type { QuerySerializerOptions } from '../core/bodySerializer.gen';\nexport {\n  formDataBodySerializer,\n  jsonBodySerializer,\n  urlSearchParamsBodySerializer,\n} from '../core/bodySerializer.gen';\nexport { buildClientParams } from '../core/params.gen';\nexport { serializeQueryKeyValue } from '../core/queryKeySerializer.gen';\nexport { createClient } from './client.gen';\nexport type {\n  Client,\n  ClientOptions,\n  Config,\n  CreateClientConfig,\n  Options,\n  RequestOptions,\n  RequestResult,\n  ResolvedRequestOptions,\n  ResponseStyle,\n  TDataShape,\n} from './types.gen';\nexport { createConfig, mergeHeaders } from './utils.gen';\n"
  },
  {
    "path": "packages/openapi-ts-tests/zod/v4/__snapshots__/2.0.x/v3/type-format/client/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { Auth } from '../core/auth.gen';\nimport type {\n  ServerSentEventsOptions,\n  ServerSentEventsResult,\n} from '../core/serverSentEvents.gen';\nimport type { Client as CoreClient, Config as CoreConfig } from '../core/types.gen';\nimport type { Middleware } from './utils.gen';\n\nexport type ResponseStyle = 'data' | 'fields';\n\nexport interface Config<T extends ClientOptions = ClientOptions>\n  extends Omit<RequestInit, 'body' | 'headers' | 'method'>, CoreConfig {\n  /**\n   * Base URL for all requests made by this client.\n   */\n  baseUrl?: T['baseUrl'];\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   * Please don't use the Fetch client for Next.js applications. The `next`\n   * options won't have any effect.\n   *\n   * Install {@link https://www.npmjs.com/package/@hey-api/client-next `@hey-api/client-next`} instead.\n   */\n  next?: never;\n  /**\n   * Return the response data parsed in a specified format. By default, `auto`\n   * will infer the appropriate method from the `Content-Type` response header.\n   * You can override this behavior with any of the {@link Body} methods.\n   * Select `stream` if you don't want to parse response data at all.\n   *\n   * @default 'auto'\n   */\n  parseAs?: 'arrayBuffer' | 'auto' | 'blob' | 'formData' | 'json' | 'stream' | 'text';\n  /**\n   * Should we return only data or multiple fields (data, error, response, etc.)?\n   *\n   * @default 'fields'\n   */\n  responseStyle?: ResponseStyle;\n  /**\n   * Throw an error instead of returning it in the response?\n   *\n   * @default false\n   */\n  throwOnError?: T['throwOnError'];\n}\n\nexport interface RequestOptions<\n  TData = unknown,\n  TResponseStyle extends ResponseStyle = 'fields',\n  ThrowOnError extends boolean = boolean,\n  Url extends string = string,\n>\n  extends\n    Config<{\n      responseStyle: TResponseStyle;\n      throwOnError: ThrowOnError;\n    }>,\n    Pick<\n      ServerSentEventsOptions<TData>,\n      | 'onRequest'\n      | 'onSseError'\n      | 'onSseEvent'\n      | 'sseDefaultRetryDelay'\n      | 'sseMaxRetryAttempts'\n      | 'sseMaxRetryDelay'\n    > {\n  /**\n   * Any body that you want to add to your request.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/fetch#body}\n   */\n  body?: unknown;\n  path?: Record<string, unknown>;\n  query?: Record<string, unknown>;\n  /**\n   * Security mechanism(s) to use for the request.\n   */\n  security?: ReadonlyArray<Auth>;\n  url: Url;\n}\n\nexport interface ResolvedRequestOptions<\n  TResponseStyle extends ResponseStyle = 'fields',\n  ThrowOnError extends boolean = boolean,\n  Url extends string = string,\n> extends RequestOptions<unknown, TResponseStyle, ThrowOnError, Url> {\n  serializedBody?: string;\n}\n\nexport type RequestResult<\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = boolean,\n  TResponseStyle extends ResponseStyle = 'fields',\n> = ThrowOnError extends true\n  ? Promise<\n      TResponseStyle extends 'data'\n        ? TData extends Record<string, unknown>\n          ? TData[keyof TData]\n          : TData\n        : {\n            data: TData extends Record<string, unknown> ? TData[keyof TData] : TData;\n            request: Request;\n            response: Response;\n          }\n    >\n  : Promise<\n      TResponseStyle extends 'data'\n        ? (TData extends Record<string, unknown> ? TData[keyof TData] : TData) | undefined\n        : (\n            | {\n                data: TData extends Record<string, unknown> ? TData[keyof TData] : TData;\n                error: undefined;\n              }\n            | {\n                data: undefined;\n                error: TError extends Record<string, unknown> ? TError[keyof TError] : TError;\n              }\n          ) & {\n            request: Request;\n            response: Response;\n          }\n    >;\n\nexport interface ClientOptions {\n  baseUrl?: string;\n  responseStyle?: ResponseStyle;\n  throwOnError?: boolean;\n}\n\ntype MethodFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'>,\n) => RequestResult<TData, TError, ThrowOnError, TResponseStyle>;\n\ntype SseFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'>,\n) => Promise<ServerSentEventsResult<TData, TError>>;\n\ntype RequestFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'> &\n    Pick<Required<RequestOptions<TData, TResponseStyle, ThrowOnError>>, 'method'>,\n) => RequestResult<TData, TError, ThrowOnError, TResponseStyle>;\n\ntype BuildUrlFn = <\n  TData extends {\n    body?: unknown;\n    path?: Record<string, unknown>;\n    query?: Record<string, unknown>;\n    url: string;\n  },\n>(\n  options: TData & Options<TData>,\n) => string;\n\nexport type Client = CoreClient<RequestFn, Config, MethodFn, BuildUrlFn, SseFn> & {\n  interceptors: Middleware<Request, Response, unknown, ResolvedRequestOptions>;\n};\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 = ClientOptions> = (\n  override?: Config<ClientOptions & T>,\n) => Config<Required<ClientOptions> & T>;\n\nexport interface TDataShape {\n  body?: unknown;\n  headers?: unknown;\n  path?: unknown;\n  query?: unknown;\n  url: string;\n}\n\ntype OmitKeys<T, K> = Pick<T, Exclude<keyof T, K>>;\n\nexport type Options<\n  TData extends TDataShape = TDataShape,\n  ThrowOnError extends boolean = boolean,\n  TResponse = unknown,\n  TResponseStyle extends ResponseStyle = 'fields',\n> = OmitKeys<\n  RequestOptions<TResponse, TResponseStyle, ThrowOnError>,\n  'body' | 'path' | 'query' | 'url'\n> &\n  ([TData] extends [never] ? unknown : Omit<TData, 'url'>);\n"
  },
  {
    "path": "packages/openapi-ts-tests/zod/v4/__snapshots__/2.0.x/v3/type-format/client/utils.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/zod/v4/__snapshots__/2.0.x/v3/type-format/client.gen.ts",
    "content": "// 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>());\n"
  },
  {
    "path": "packages/openapi-ts-tests/zod/v4/__snapshots__/2.0.x/v3/type-format/core/auth.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/zod/v4/__snapshots__/2.0.x/v3/type-format/core/bodySerializer.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/zod/v4/__snapshots__/2.0.x/v3/type-format/core/params.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/zod/v4/__snapshots__/2.0.x/v3/type-format/core/pathSerializer.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/zod/v4/__snapshots__/2.0.x/v3/type-format/core/queryKeySerializer.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\n/**\n * JSON-friendly union that mirrors what Pinia Colada can hash.\n */\nexport type JsonValue =\n  | null\n  | string\n  | number\n  | boolean\n  | JsonValue[]\n  | { [key: string]: JsonValue };\n\n/**\n * Replacer that converts non-JSON values (bigint, Date, etc.) to safe substitutes.\n */\nexport const queryKeyJsonReplacer = (_key: string, value: unknown) => {\n  if (value === undefined || typeof value === 'function' || typeof value === 'symbol') {\n    return undefined;\n  }\n  if (typeof value === 'bigint') {\n    return value.toString();\n  }\n  if (value instanceof Date) {\n    return value.toISOString();\n  }\n  return value;\n};\n\n/**\n * Safely stringifies a value and parses it back into a JsonValue.\n */\nexport const stringifyToJsonValue = (input: unknown): JsonValue | undefined => {\n  try {\n    const json = JSON.stringify(input, queryKeyJsonReplacer);\n    if (json === undefined) {\n      return undefined;\n    }\n    return JSON.parse(json) as JsonValue;\n  } catch {\n    return undefined;\n  }\n};\n\n/**\n * Detects plain objects (including objects with a null prototype).\n */\nconst isPlainObject = (value: unknown): value is Record<string, unknown> => {\n  if (value === null || typeof value !== 'object') {\n    return false;\n  }\n  const prototype = Object.getPrototypeOf(value as object);\n  return prototype === Object.prototype || prototype === null;\n};\n\n/**\n * Turns URLSearchParams into a sorted JSON object for deterministic keys.\n */\nconst serializeSearchParams = (params: URLSearchParams): JsonValue => {\n  const entries = Array.from(params.entries()).sort(([a], [b]) => a.localeCompare(b));\n  const result: Record<string, JsonValue> = {};\n\n  for (const [key, value] of entries) {\n    const existing = result[key];\n    if (existing === undefined) {\n      result[key] = value;\n      continue;\n    }\n\n    if (Array.isArray(existing)) {\n      (existing as string[]).push(value);\n    } else {\n      result[key] = [existing, value];\n    }\n  }\n\n  return result;\n};\n\n/**\n * Normalizes any accepted value into a JSON-friendly shape for query keys.\n */\nexport const serializeQueryKeyValue = (value: unknown): JsonValue | undefined => {\n  if (value === null) {\n    return null;\n  }\n\n  if (typeof value === 'string' || typeof value === 'number' || typeof value === 'boolean') {\n    return value;\n  }\n\n  if (value === undefined || typeof value === 'function' || typeof value === 'symbol') {\n    return undefined;\n  }\n\n  if (typeof value === 'bigint') {\n    return value.toString();\n  }\n\n  if (value instanceof Date) {\n    return value.toISOString();\n  }\n\n  if (Array.isArray(value)) {\n    return stringifyToJsonValue(value);\n  }\n\n  if (typeof URLSearchParams !== 'undefined' && value instanceof URLSearchParams) {\n    return serializeSearchParams(value);\n  }\n\n  if (isPlainObject(value)) {\n    return stringifyToJsonValue(value);\n  }\n\n  return undefined;\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/zod/v4/__snapshots__/2.0.x/v3/type-format/core/serverSentEvents.gen.ts",
    "content": "// 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 const 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            // Normalize line endings: CRLF -> LF, then CR -> LF\n            buffer = buffer.replace(/\\r\\n/g, '\\n').replace(/\\r/g, '\\n');\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"
  },
  {
    "path": "packages/openapi-ts-tests/zod/v4/__snapshots__/2.0.x/v3/type-format/core/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { Auth, AuthToken } from './auth.gen';\nimport type { BodySerializer, QuerySerializer, QuerySerializerOptions } from './bodySerializer.gen';\n\nexport type HttpMethod =\n  | 'connect'\n  | 'delete'\n  | 'get'\n  | 'head'\n  | 'options'\n  | 'patch'\n  | 'post'\n  | 'put'\n  | 'trace';\n\nexport type Client<\n  RequestFn = never,\n  Config = unknown,\n  MethodFn = never,\n  BuildUrlFn = never,\n  SseFn = never,\n> = {\n  /**\n   * Returns the final request URL.\n   */\n  buildUrl: BuildUrlFn;\n  getConfig: () => Config;\n  request: RequestFn;\n  setConfig: (config: Config) => Config;\n} & {\n  [K in HttpMethod]: MethodFn;\n} & ([SseFn] extends [never] ? { sse?: never } : { sse: { [K in HttpMethod]: SseFn } });\n\nexport interface Config {\n  /**\n   * Auth token or a function returning auth token. The resolved value will be\n   * added to the request payload as defined by its `security` array.\n   */\n  auth?: ((auth: Auth) => Promise<AuthToken> | AuthToken) | AuthToken;\n  /**\n   * A function for serializing request body parameter. By default,\n   * {@link JSON.stringify()} will be used.\n   */\n  bodySerializer?: BodySerializer | null;\n  /**\n   * An object containing any HTTP headers that you want to pre-populate your\n   * `Headers` object with.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/Headers/Headers#init See more}\n   */\n  headers?:\n    | RequestInit['headers']\n    | Record<\n        string,\n        string | number | boolean | (string | number | boolean)[] | null | undefined | unknown\n      >;\n  /**\n   * The request method.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/fetch#method See more}\n   */\n  method?: Uppercase<HttpMethod>;\n  /**\n   * A function for serializing request query parameters. By default, arrays\n   * will be exploded in form style, objects will be exploded in deepObject\n   * style, and reserved characters are percent-encoded.\n   *\n   * This method will have no effect if the native `paramsSerializer()` Axios\n   * API function is used.\n   *\n   * {@link https://swagger.io/docs/specification/serialization/#query View examples}\n   */\n  querySerializer?: QuerySerializer | QuerySerializerOptions;\n  /**\n   * A function validating request data. This is useful if you want to ensure\n   * the request conforms to the desired shape, so it can be safely sent to\n   * the server.\n   */\n  requestValidator?: (data: unknown) => Promise<unknown>;\n  /**\n   * A function transforming response data before it's returned. This is useful\n   * for post-processing data, e.g. converting ISO strings into Date objects.\n   */\n  responseTransformer?: (data: unknown) => Promise<unknown>;\n  /**\n   * A function validating response data. This is useful if you want to ensure\n   * the response conforms to the desired shape, so it can be safely passed to\n   * the transformers and returned to the user.\n   */\n  responseValidator?: (data: unknown) => Promise<unknown>;\n}\n\ntype IsExactlyNeverOrNeverUndefined<T> = [T] extends [never]\n  ? true\n  : [T] extends [never | undefined]\n    ? [undefined] extends [T]\n      ? false\n      : true\n    : false;\n\nexport type OmitNever<T extends Record<string, unknown>> = {\n  [K in keyof T as IsExactlyNeverOrNeverUndefined<T[K]> extends true ? never : K]: T[K];\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/zod/v4/__snapshots__/2.0.x/v3/type-format/core/utils.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/zod/v4/__snapshots__/2.0.x/v3/type-format/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport { type Options, postFoo } from './sdk.gen';\nexport type { Bar, ClientOptions, Foo, PostFooData, PostFooResponse, PostFooResponses, TypeID, UserId } from './types.gen';\n"
  },
  {
    "path": "packages/openapi-ts-tests/zod/v4/__snapshots__/2.0.x/v3/type-format/sdk.gen.ts",
    "content": "// 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 { postFooResponseTransformer } from './transformers.gen';\nimport type { PostFooData, PostFooResponses } from './types.gen';\nimport { zPostFooData, zPostFooResponse } from './zod.gen';\n\nexport type Options<TData extends TDataShape = TDataShape, ThrowOnError extends boolean = boolean> = Options2<TData, ThrowOnError> & {\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\nexport const postFoo = <ThrowOnError extends boolean = false>(options?: Options<PostFooData, ThrowOnError>) => (options?.client ?? client).post<PostFooResponses, unknown, ThrowOnError>({\n    requestValidator: async (data) => await zPostFooData.parseAsync(data),\n    responseTransformer: postFooResponseTransformer,\n    responseValidator: async (data) => await zPostFooResponse.parseAsync(data),\n    url: '/foo',\n    ...options\n});\n"
  },
  {
    "path": "packages/openapi-ts-tests/zod/v4/__snapshots__/2.0.x/v3/type-format/transformers.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { PostFooResponse } from './types.gen';\n\nconst fooSchemaResponseTransformer = (data: any) => {\n    data.foo = BigInt(data.foo.toString());\n    return data;\n};\n\nexport const postFooResponseTransformer = async (data: any): Promise<PostFooResponse> => {\n    data = fooSchemaResponseTransformer(data);\n    return data;\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/zod/v4/__snapshots__/2.0.x/v3/type-format/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type ClientOptions = {\n    baseUrl: string;\n};\n\nexport type TypeID<T extends string> = `${T}_${string}`;\n\nexport type UserId = TypeID<'user'>;\n\nexport type Foo = {\n    bar?: number;\n    foo: bigint;\n    id: UserId;\n};\n\nexport type Bar = {\n    foo: number;\n    [key: string]: number;\n};\n\nexport type PostFooData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/foo';\n};\n\nexport type PostFooResponses = {\n    /**\n     * OK\n     */\n    200: Foo;\n};\n\nexport type PostFooResponse = PostFooResponses[keyof PostFooResponses];\n"
  },
  {
    "path": "packages/openapi-ts-tests/zod/v4/__snapshots__/2.0.x/v3/type-format/zod.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport { z } from 'zod/v3';\n\nexport const zFoo = z.object({\n    bar: z.number().int().optional(),\n    foo: z.coerce.bigint().min(BigInt('-9223372036854775808'), { message: 'Invalid value: Expected int64 to be >= -9223372036854775808' }).max(BigInt('9223372036854775807'), { message: 'Invalid value: Expected int64 to be <= 9223372036854775807' }).default(BigInt(0)),\n    id: z.string()\n});\n\nexport const zBar = z.object({\n    foo: z.number().int()\n});\n\nexport const zPostFooData = z.object({\n    body: z.never().optional(),\n    path: z.never().optional(),\n    query: z.never().optional()\n});\n\n/**\n * OK\n */\nexport const zPostFooResponse = zFoo;\n"
  },
  {
    "path": "packages/openapi-ts-tests/zod/v4/__snapshots__/2.0.x/v4/array-items-all-of/zod.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport * as z from 'zod';\n\nexport const zArrayWithAllOfObjects = z.array(z.object({\n    id: z.int().optional()\n}).and(z.object({\n    name: z.string().optional()\n})));\n\nexport const zArrayWithAllOfPrimitives = z.array(z.intersection(z.number(), z.string()));\n\nexport const zBaseModel = z.object({\n    id: z.int().optional(),\n    createdAt: z.iso.datetime().optional()\n});\n\nexport const zArrayWithAllOfRefs = z.array(zBaseModel.and(z.object({\n    extra: z.string().optional()\n})));\n"
  },
  {
    "path": "packages/openapi-ts-tests/zod/v4/__snapshots__/2.0.x/v4/default/zod.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport * as z from 'zod';\n\n/**\n * Testing multiline comments in string: First line\n * Second line\n *\n * Fourth line\n */\nexport const zCommentWithBreaks = z.int();\n\n/**\n * Testing backticks in string: `backticks` and ```multiple backticks``` should work\n */\nexport const zCommentWithBackticks = z.int();\n\n/**\n * Testing backticks and quotes in string: `backticks`, 'quotes', \"double quotes\" and ```multiple backticks``` should work\n */\nexport const zCommentWithBackticksAndQuotes = z.int();\n\n/**\n * Testing slashes in string: \\backwards\\\\\\ and /forwards/// should work\n */\nexport const zCommentWithSlashes = z.int();\n\n/**\n * Testing expression placeholders in string: ${expression} should work\n */\nexport const zCommentWithExpressionPlaceholders = z.int();\n\n/**\n * Testing quotes in string: 'single quote''' and \"double quotes\"\"\" should work\n */\nexport const zCommentWithQuotes = z.int();\n\n/**\n * Testing reserved characters in string: * inline * and ** inline ** should work\n */\nexport const zCommentWithReservedCharacters = z.int();\n\n/**\n * This is a simple number\n */\nexport const zSimpleInteger = z.int();\n\n/**\n * This is a simple boolean\n */\nexport const zSimpleBoolean = z.boolean();\n\n/**\n * This is a simple string\n */\nexport const zSimpleString = z.string();\n\n/**\n * A string with non-ascii (unicode) characters valid in typescript identifiers (æøåÆØÅöÔèÈ字符串)\n */\nexport const zNonAsciiStringæøåÆøÅöôêÊ字符串 = z.string();\n\n/**\n * This is a simple file\n */\nexport const zSimpleFile = z.string();\n\n/**\n * This is a simple string\n */\nexport const zSimpleStringWithPattern = z.string().max(64).regex(/^[a-zA-Z0-9_]*$/);\n\n/**\n * This is a simple enum with strings\n */\nexport const zEnumWithStrings = z.enum([\n    'Success',\n    'Warning',\n    'Error',\n    '\\'Single Quote\\'',\n    '\"Double Quotes\"',\n    'Non-ascii: øæåôöØÆÅÔÖ字符串'\n]);\n\n/**\n * This is a simple enum with numbers\n */\nexport const zEnumWithNumbers = z.union([\n    z.literal(1),\n    z.literal(2),\n    z.literal(3),\n    z.literal(1.1),\n    z.literal(1.2),\n    z.literal(1.3),\n    z.literal(100),\n    z.literal(200),\n    z.literal(300),\n    z.literal(-100),\n    z.literal(-200),\n    z.literal(-300),\n    z.literal(-1.1),\n    z.literal(-1.2),\n    z.literal(-1.3)\n]);\n\n/**\n * Success=1,Warning=2,Error=3\n */\nexport const zEnumFromDescription = z.number();\n\n/**\n * This is a simple enum with numbers\n */\nexport const zEnumWithExtensions = z.union([\n    z.literal(200),\n    z.literal(400),\n    z.literal(500)\n]);\n\n/**\n * This is a simple array with numbers\n */\nexport const zArrayWithNumbers = z.array(z.int());\n\n/**\n * This is a simple array with booleans\n */\nexport const zArrayWithBooleans = z.array(z.boolean());\n\n/**\n * This is a simple array with strings\n */\nexport const zArrayWithStrings = z.array(z.string());\n\n/**\n * This is a simple array with properties\n */\nexport const zArrayWithProperties = z.array(z.object({\n    foo: z.string().optional(),\n    bar: z.string().optional()\n}));\n\n/**\n * This is a string dictionary\n */\nexport const zDictionaryWithString = z.record(z.string(), z.string());\n\n/**\n * This is a string dictionary\n */\nexport const zDictionaryWithDictionary = z.record(z.string(), z.record(z.string(), z.string()));\n\n/**\n * This is a complex dictionary\n */\nexport const zDictionaryWithProperties = z.record(z.string(), z.object({\n    foo: z.string().optional(),\n    bar: z.string().optional()\n}));\n\n/**\n * This is a type-only model that defines Date as a string\n */\nexport const zDate = z.string();\n\n/**\n * This is a model with one number property\n */\nexport const zModelWithInteger = z.object({\n    prop: z.int().optional()\n});\n\n/**\n * This is a model with one boolean property\n */\nexport const zModelWithBoolean = z.object({\n    prop: z.boolean().optional()\n});\n\n/**\n * This is a model with one string property\n */\nexport const zModelWithString = z.object({\n    prop: z.string().optional()\n});\n\nexport const zSimpleReference = zModelWithString;\n\n/**\n * This is a simple array with references\n */\nexport const zArrayWithReferences = z.array(zModelWithString);\n\n/**\n * This is a simple array containing an array\n */\nexport const zArrayWithArray = z.array(z.array(zModelWithString));\n\n/**\n * This is a string reference\n */\nexport const zDictionaryWithReference = z.record(z.string(), zModelWithString);\n\n/**\n * This is a complex dictionary\n */\nexport const zDictionaryWithArray = z.record(z.string(), z.array(zModelWithString));\n\n/**\n * This is a model with one string property\n */\nexport const zModelWithStringError = z.object({\n    prop: z.string().optional()\n});\n\n/**\n * This is a model with one string property\n */\nexport const zModelWithNullableString = z.object({\n    nullableProp: z.string().nullish(),\n    nullableRequiredProp: z.string().nullable()\n});\n\n/**\n * This is a model with one enum\n */\nexport const zModelWithEnum = z.object({\n    test: z.enum([\n        'Success',\n        'Warning',\n        'Error',\n        'ØÆÅ字符串'\n    ]).optional(),\n    statusCode: z.enum([\n        '100',\n        '200 FOO',\n        '300 FOO_BAR',\n        '400 foo-bar',\n        '500 foo.bar',\n        '600 foo&bar'\n    ]).optional(),\n    bool: z.literal(true).optional()\n});\n\n/**\n * This is a model with one enum\n */\nexport const zModelWithEnumFromDescription = z.object({\n    test: z.int().optional()\n});\n\n/**\n * This is a model with nested enums\n */\nexport const zModelWithNestedEnums = z.object({\n    dictionaryWithEnum: z.record(z.string(), z.enum([\n        'Success',\n        'Warning',\n        'Error'\n    ])).optional(),\n    dictionaryWithEnumFromDescription: z.record(z.string(), z.int()).optional(),\n    arrayWithEnum: z.array(z.enum([\n        'Success',\n        'Warning',\n        'Error'\n    ])).optional(),\n    arrayWithDescription: z.array(z.int()).optional()\n});\n\n/**\n * This is a model with one property containing an array\n */\nexport const zModelWithArray = z.object({\n    prop: z.array(zModelWithString).optional(),\n    propWithFile: z.array(z.string()).optional(),\n    propWithNumber: z.array(z.number()).optional()\n});\n\n/**\n * This is a model with one property containing a dictionary\n */\nexport const zModelWithDictionary = z.object({\n    prop: z.record(z.string(), z.string()).optional()\n});\n\n/**\n * This is a model with one property containing a circular reference\n */\nexport const zModelWithCircularReference = z.object({\n    prop: z.lazy((): any => zModelWithCircularReference).optional()\n});\n\n/**\n * This is a model with one nested property\n */\nexport const zModelWithProperties = z.object({\n    required: z.string(),\n    requiredAndReadOnly: z.string().readonly(),\n    string: z.string().optional(),\n    number: z.number().optional(),\n    boolean: z.boolean().optional(),\n    reference: zModelWithString.optional(),\n    'property with space': z.string().optional(),\n    default: z.string().optional(),\n    try: z.string().optional(),\n    '@namespace.string': z.string().readonly().optional(),\n    '@namespace.integer': z.int().readonly().optional()\n});\n\n/**\n * This is a model with one property containing a reference\n */\nexport const zModelWithReference = z.object({\n    prop: zModelWithProperties.optional()\n});\n\n/**\n * This is a model with one nested property\n */\nexport const zModelWithNestedProperties = z.object({\n    first: z.object({\n        second: z.object({\n            third: z.string().readonly()\n        }).readonly()\n    }).readonly()\n});\n\n/**\n * This is a model with duplicated properties\n */\nexport const zModelWithDuplicateProperties = z.object({\n    prop: zModelWithString.optional()\n});\n\n/**\n * This is a model with ordered properties\n */\nexport const zModelWithOrderedProperties = z.object({\n    zebra: z.string().optional(),\n    apple: z.string().optional(),\n    hawaii: z.string().optional()\n});\n\n/**\n * This is a model with duplicated imports\n */\nexport const zModelWithDuplicateImports = z.object({\n    propA: zModelWithString.optional(),\n    propB: zModelWithString.optional(),\n    propC: zModelWithString.optional()\n});\n\n/**\n * This is a model that extends another model\n */\nexport const zModelThatExtends = zModelWithString.and(z.object({\n    propExtendsA: z.string().optional(),\n    propExtendsB: zModelWithString.optional()\n}));\n\n/**\n * This is a model that extends another model\n */\nexport const zModelThatExtendsExtends = zModelWithString.and(zModelThatExtends).and(z.object({\n    propExtendsC: z.string().optional(),\n    propExtendsD: zModelWithString.optional()\n}));\n\nexport const zDefault = z.object({\n    name: z.string().optional()\n});\n\n/**\n * This is a model that contains a some patterns\n */\nexport const zModelWithPattern = z.object({\n    key: z.string().max(64).regex(/^[a-zA-Z0-9_]*$/),\n    name: z.string().max(255),\n    enabled: z.boolean().readonly().optional(),\n    modified: z.iso.datetime().readonly().optional(),\n    id: z.string().regex(/^\\d{2}-\\d{3}-\\d{4}$/).optional(),\n    text: z.string().regex(/^\\w+$/).optional(),\n    patternWithSingleQuotes: z.string().regex(/^[a-zA-Z0-9']*$/).optional(),\n    patternWithNewline: z.string().regex(/aaa\\nbbb/).optional(),\n    patternWithBacktick: z.string().regex(/aaa`bbb/).optional(),\n    patternWithUnicode: z.string().regex(/^\\p{L}+$/u).optional()\n});\n\nexport const zParameterActivityParams = z.object({\n    description: z.string().optional(),\n    graduate_id: z.int().optional(),\n    organization_id: z.int().optional(),\n    parent_activity: z.int().optional(),\n    post_id: z.int().optional()\n});\n\nexport const zResponsePostActivityResponse = z.object({\n    description: z.string().optional(),\n    graduate_id: z.int().optional(),\n    organization_id: z.int().optional(),\n    parent_activity_id: z.int().optional(),\n    post_id: z.int().optional()\n});\n\nexport const zFailureFailure = z.object({\n    error: z.string().optional(),\n    message: z.string().optional(),\n    reference_code: z.string().optional()\n});\n\nexport const zExternalSharedModel = z.object({\n    id: z.string(),\n    name: z.string().optional()\n});\n\nexport const zExternalRefA = zExternalSharedModel;\n\nexport const zExternalRefB = zExternalSharedModel;\n\n/**\n * This is a model with one nested property\n */\nexport const zModelWithPropertiesWritable = z.object({\n    required: z.string(),\n    string: z.string().optional(),\n    number: z.number().optional(),\n    boolean: z.boolean().optional(),\n    reference: zModelWithString.optional(),\n    'property with space': z.string().optional(),\n    default: z.string().optional(),\n    try: z.string().optional()\n});\n\n/**\n * This is a model with one property containing a reference\n */\nexport const zModelWithReferenceWritable = z.object({\n    prop: zModelWithPropertiesWritable.optional()\n});\n\n/**\n * This is a model that contains a some patterns\n */\nexport const zModelWithPatternWritable = z.object({\n    key: z.string().max(64).regex(/^[a-zA-Z0-9_]*$/),\n    name: z.string().max(255),\n    id: z.string().regex(/^\\d{2}-\\d{3}-\\d{4}$/).optional(),\n    text: z.string().regex(/^\\w+$/).optional(),\n    patternWithSingleQuotes: z.string().regex(/^[a-zA-Z0-9']*$/).optional(),\n    patternWithNewline: z.string().regex(/aaa\\nbbb/).optional(),\n    patternWithBacktick: z.string().regex(/aaa`bbb/).optional(),\n    patternWithUnicode: z.string().regex(/^\\p{L}+$/u).optional()\n});\n\nexport const zServiceWithEmptyTagData = z.object({\n    body: z.never().optional(),\n    path: z.never().optional(),\n    query: z.never().optional()\n});\n\nexport const zPatchApiVbyApiVersionNoTagData = z.object({\n    body: z.never().optional(),\n    path: z.never().optional(),\n    query: z.never().optional()\n});\n\nexport const zFooWowData = z.object({\n    body: z.never().optional(),\n    path: z.never().optional(),\n    query: z.never().optional()\n});\n\nexport const zDeleteCallWithoutParametersAndResponseData = z.object({\n    body: z.never().optional(),\n    path: z.never().optional(),\n    query: z.never().optional()\n});\n\nexport const zGetCallWithoutParametersAndResponseData = z.object({\n    body: z.never().optional(),\n    path: z.never().optional(),\n    query: z.never().optional()\n});\n\nexport const zHeadCallWithoutParametersAndResponseData = z.object({\n    body: z.never().optional(),\n    path: z.never().optional(),\n    query: z.never().optional()\n});\n\nexport const zOptionsCallWithoutParametersAndResponseData = z.object({\n    body: z.never().optional(),\n    path: z.never().optional(),\n    query: z.never().optional()\n});\n\nexport const zPatchCallWithoutParametersAndResponseData = z.object({\n    body: z.never().optional(),\n    path: z.never().optional(),\n    query: z.never().optional()\n});\n\nexport const zPostCallWithoutParametersAndResponseData = z.object({\n    body: z.never().optional(),\n    path: z.never().optional(),\n    query: z.never().optional()\n});\n\nexport const zPutCallWithoutParametersAndResponseData = z.object({\n    body: z.never().optional(),\n    path: z.never().optional(),\n    query: z.never().optional()\n});\n\nexport const zCallWithDescriptionsData = z.object({\n    body: z.never().optional(),\n    path: z.never().optional(),\n    query: z.object({\n        parameterWithBreaks: z.string().optional(),\n        parameterWithBackticks: z.string().optional(),\n        parameterWithSlashes: z.string().optional(),\n        parameterWithExpressionPlaceholders: z.string().optional(),\n        parameterWithQuotes: z.string().optional(),\n        parameterWithReservedCharacters: z.string().optional()\n    }).optional()\n});\n\nexport const zCallWithParametersData = z.object({\n    body: z.never().optional(),\n    path: z.object({\n        parameterPath: z.string(),\n        'api-version': z.string()\n    }),\n    query: z.object({\n        parameterQuery: z.string()\n    }),\n    headers: z.object({\n        parameterHeader: z.string()\n    })\n});\n\nexport const zCallWithWeirdParameterNamesData = z.object({\n    body: z.string(),\n    path: z.object({\n        'parameter.path.1': z.string().optional(),\n        'parameter-path-2': z.string().optional(),\n        'PARAMETER-PATH-3': z.string().optional(),\n        'api-version': z.string()\n    }),\n    query: z.object({\n        default: z.string().optional(),\n        'parameter-query': z.string()\n    }),\n    headers: z.object({\n        'parameter.header': z.string()\n    })\n});\n\nexport const zCallWithDefaultParametersData = z.object({\n    body: z.never().optional(),\n    path: z.never().optional(),\n    query: z.object({\n        parameterString: z.string().default('Hello World!'),\n        parameterNumber: z.number().default(123),\n        parameterBoolean: z.boolean().default(true),\n        parameterEnum: z.enum([\n            'Success',\n            'Warning',\n            'Error'\n        ]),\n        parameterModel: z.object({\n            prop: z.string().optional()\n        }).default({ prop: 'Hello World!' })\n    })\n});\n\nexport const zCallWithDefaultOptionalParametersData = z.object({\n    body: z.never().optional(),\n    path: z.never().optional(),\n    query: z.object({\n        parameterString: z.string().optional().default('Hello World!'),\n        parameterNumber: z.number().optional().default(123),\n        parameterBoolean: z.boolean().optional().default(true),\n        parameterEnum: z.enum([\n            'Success',\n            'Warning',\n            'Error'\n        ]).optional()\n    }).optional()\n});\n\nexport const zCallToTestOrderOfParamsData = z.object({\n    body: z.never().optional(),\n    path: z.never().optional(),\n    query: z.object({\n        parameterOptionalStringWithDefault: z.string().optional().default('Hello World!'),\n        parameterOptionalStringWithEmptyDefault: z.string().optional().default(''),\n        parameterOptionalStringWithNoDefault: z.string().optional(),\n        parameterStringWithDefault: z.string().default('Hello World!'),\n        parameterStringWithEmptyDefault: z.string().default(''),\n        parameterStringWithNoDefault: z.string(),\n        parameterStringNullableWithNoDefault: z.string().nullish(),\n        parameterStringNullableWithDefault: z.string().nullish().default(null)\n    })\n});\n\nexport const zDuplicateNameData = z.object({\n    body: z.never().optional(),\n    path: z.never().optional(),\n    query: z.never().optional()\n});\n\nexport const zDuplicateName2Data = z.object({\n    body: z.never().optional(),\n    path: z.never().optional(),\n    query: z.never().optional()\n});\n\nexport const zDuplicateName3Data = z.object({\n    body: z.never().optional(),\n    path: z.never().optional(),\n    query: z.never().optional()\n});\n\nexport const zDuplicateName4Data = z.object({\n    body: z.never().optional(),\n    path: z.never().optional(),\n    query: z.never().optional()\n});\n\nexport const zCallWithNoContentResponseData = z.object({\n    body: z.never().optional(),\n    path: z.never().optional(),\n    query: z.never().optional()\n});\n\nexport const zCallWithResponseAndNoContentResponseData = z.object({\n    body: z.never().optional(),\n    path: z.never().optional(),\n    query: z.never().optional()\n});\n\nexport const zCallWithResponseAndNoContentResponseResponse = z.union([\n    z.number(),\n    z.unknown()\n]);\n\nexport const zDummyAData = z.object({\n    body: z.never().optional(),\n    path: z.never().optional(),\n    query: z.never().optional()\n});\n\nexport const zDummyBData = z.object({\n    body: z.never().optional(),\n    path: z.never().optional(),\n    query: z.never().optional()\n});\n\nexport const zCallWithResponseData = z.object({\n    body: z.never().optional(),\n    path: z.never().optional(),\n    query: z.never().optional()\n});\n\n/**\n * Message for default response\n */\nexport const zCallWithResponseResponse = zModelWithString;\n\nexport const zCallWithDuplicateResponsesData = z.object({\n    body: z.never().optional(),\n    path: z.never().optional(),\n    query: z.never().optional()\n});\n\n/**\n * Message for 201 response\n */\nexport const zCallWithDuplicateResponsesResponse = zModelWithString;\n\nexport const zCallWithResponsesData = z.object({\n    body: z.never().optional(),\n    path: z.never().optional(),\n    query: z.never().optional()\n});\n\nexport const zCallWithResponsesResponse = z.union([\n    z.object({\n        '@namespace.string': z.string().readonly().optional(),\n        '@namespace.integer': z.int().readonly().optional(),\n        value: z.array(zModelWithString).readonly().optional()\n    }),\n    zModelThatExtends,\n    zModelThatExtendsExtends\n]);\n\nexport const zCollectionFormatData = z.object({\n    body: z.never().optional(),\n    path: z.never().optional(),\n    query: z.object({\n        parameterArrayCSV: z.array(z.string()),\n        parameterArraySSV: z.array(z.string()),\n        parameterArrayTSV: z.array(z.string()),\n        parameterArrayPipes: z.array(z.string()),\n        parameterArrayMulti: z.array(z.string())\n    })\n});\n\nexport const zTypesData = z.object({\n    body: z.never().optional(),\n    path: z.object({\n        id: z.int().min(-2147483648, { error: 'Invalid value: Expected int32 to be >= -2147483648' }).max(2147483647, { error: 'Invalid value: Expected int32 to be <= 2147483647' }).optional()\n    }).optional(),\n    query: z.object({\n        parameterNumber: z.number().default(123),\n        parameterString: z.string().default('default'),\n        parameterBoolean: z.boolean().default(true),\n        parameterArray: z.array(z.string()),\n        parameterDictionary: z.record(z.string(), z.unknown()),\n        parameterEnum: z.enum([\n            'Success',\n            'Warning',\n            'Error'\n        ])\n    })\n});\n\nexport const zTypesResponse = z.union([\n    z.number(),\n    z.string(),\n    z.boolean(),\n    z.record(z.string(), z.unknown())\n]);\n\nexport const zComplexTypesData = z.object({\n    body: z.never().optional(),\n    path: z.never().optional(),\n    query: z.object({\n        parameterObject: z.object({\n            first: z.object({\n                second: z.object({\n                    third: z.string().optional()\n                }).optional()\n            }).optional()\n        }),\n        parameterReference: z.object({\n            prop: z.string().optional()\n        })\n    })\n});\n\n/**\n * Successful response\n */\nexport const zComplexTypesResponse = z.array(zModelWithString);\n\nexport const zCallWithResultFromHeaderData = z.object({\n    body: z.never().optional(),\n    path: z.never().optional(),\n    query: z.never().optional()\n});\n\nexport const zTestErrorCodeData = z.object({\n    body: z.never().optional(),\n    path: z.never().optional(),\n    query: z.object({\n        status: z.string()\n    })\n});\n\nexport const zNonAsciiæøåÆøÅöôêÊ字符串Data = z.object({\n    body: z.never().optional(),\n    path: z.never().optional(),\n    query: z.object({\n        nonAsciiParamæøåÆØÅöôêÊ: z.int()\n    })\n});\n\n/**\n * Successful response\n */\nexport const zNonAsciiæøåÆøÅöôêÊ字符串Response = zNonAsciiStringæøåÆøÅöôêÊ字符串;\n\nexport const zPostApiVbyApiVersionBodyData = z.object({\n    body: zParameterActivityParams,\n    path: z.never().optional(),\n    query: z.never().optional()\n});\n\n/**\n * OK\n */\nexport const zPostApiVbyApiVersionBodyResponse = zResponsePostActivityResponse;\n"
  },
  {
    "path": "packages/openapi-ts-tests/zod/v4/__snapshots__/2.0.x/v4/type-format/client/client.gen.ts",
    "content": "// 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 (options: RequestOptions) => {\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 url = buildUrl(opts);\n\n    return { opts, url };\n  };\n\n  const request: Client['request'] = async (options) => {\n    // @ts-expect-error\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"
  },
  {
    "path": "packages/openapi-ts-tests/zod/v4/__snapshots__/2.0.x/v4/type-format/client/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type { Auth } from '../core/auth.gen';\nexport type { QuerySerializerOptions } from '../core/bodySerializer.gen';\nexport {\n  formDataBodySerializer,\n  jsonBodySerializer,\n  urlSearchParamsBodySerializer,\n} from '../core/bodySerializer.gen';\nexport { buildClientParams } from '../core/params.gen';\nexport { serializeQueryKeyValue } from '../core/queryKeySerializer.gen';\nexport { createClient } from './client.gen';\nexport type {\n  Client,\n  ClientOptions,\n  Config,\n  CreateClientConfig,\n  Options,\n  RequestOptions,\n  RequestResult,\n  ResolvedRequestOptions,\n  ResponseStyle,\n  TDataShape,\n} from './types.gen';\nexport { createConfig, mergeHeaders } from './utils.gen';\n"
  },
  {
    "path": "packages/openapi-ts-tests/zod/v4/__snapshots__/2.0.x/v4/type-format/client/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { Auth } from '../core/auth.gen';\nimport type {\n  ServerSentEventsOptions,\n  ServerSentEventsResult,\n} from '../core/serverSentEvents.gen';\nimport type { Client as CoreClient, Config as CoreConfig } from '../core/types.gen';\nimport type { Middleware } from './utils.gen';\n\nexport type ResponseStyle = 'data' | 'fields';\n\nexport interface Config<T extends ClientOptions = ClientOptions>\n  extends Omit<RequestInit, 'body' | 'headers' | 'method'>, CoreConfig {\n  /**\n   * Base URL for all requests made by this client.\n   */\n  baseUrl?: T['baseUrl'];\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   * Please don't use the Fetch client for Next.js applications. The `next`\n   * options won't have any effect.\n   *\n   * Install {@link https://www.npmjs.com/package/@hey-api/client-next `@hey-api/client-next`} instead.\n   */\n  next?: never;\n  /**\n   * Return the response data parsed in a specified format. By default, `auto`\n   * will infer the appropriate method from the `Content-Type` response header.\n   * You can override this behavior with any of the {@link Body} methods.\n   * Select `stream` if you don't want to parse response data at all.\n   *\n   * @default 'auto'\n   */\n  parseAs?: 'arrayBuffer' | 'auto' | 'blob' | 'formData' | 'json' | 'stream' | 'text';\n  /**\n   * Should we return only data or multiple fields (data, error, response, etc.)?\n   *\n   * @default 'fields'\n   */\n  responseStyle?: ResponseStyle;\n  /**\n   * Throw an error instead of returning it in the response?\n   *\n   * @default false\n   */\n  throwOnError?: T['throwOnError'];\n}\n\nexport interface RequestOptions<\n  TData = unknown,\n  TResponseStyle extends ResponseStyle = 'fields',\n  ThrowOnError extends boolean = boolean,\n  Url extends string = string,\n>\n  extends\n    Config<{\n      responseStyle: TResponseStyle;\n      throwOnError: ThrowOnError;\n    }>,\n    Pick<\n      ServerSentEventsOptions<TData>,\n      | 'onRequest'\n      | 'onSseError'\n      | 'onSseEvent'\n      | 'sseDefaultRetryDelay'\n      | 'sseMaxRetryAttempts'\n      | 'sseMaxRetryDelay'\n    > {\n  /**\n   * Any body that you want to add to your request.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/fetch#body}\n   */\n  body?: unknown;\n  path?: Record<string, unknown>;\n  query?: Record<string, unknown>;\n  /**\n   * Security mechanism(s) to use for the request.\n   */\n  security?: ReadonlyArray<Auth>;\n  url: Url;\n}\n\nexport interface ResolvedRequestOptions<\n  TResponseStyle extends ResponseStyle = 'fields',\n  ThrowOnError extends boolean = boolean,\n  Url extends string = string,\n> extends RequestOptions<unknown, TResponseStyle, ThrowOnError, Url> {\n  serializedBody?: string;\n}\n\nexport type RequestResult<\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = boolean,\n  TResponseStyle extends ResponseStyle = 'fields',\n> = ThrowOnError extends true\n  ? Promise<\n      TResponseStyle extends 'data'\n        ? TData extends Record<string, unknown>\n          ? TData[keyof TData]\n          : TData\n        : {\n            data: TData extends Record<string, unknown> ? TData[keyof TData] : TData;\n            request: Request;\n            response: Response;\n          }\n    >\n  : Promise<\n      TResponseStyle extends 'data'\n        ? (TData extends Record<string, unknown> ? TData[keyof TData] : TData) | undefined\n        : (\n            | {\n                data: TData extends Record<string, unknown> ? TData[keyof TData] : TData;\n                error: undefined;\n              }\n            | {\n                data: undefined;\n                error: TError extends Record<string, unknown> ? TError[keyof TError] : TError;\n              }\n          ) & {\n            request: Request;\n            response: Response;\n          }\n    >;\n\nexport interface ClientOptions {\n  baseUrl?: string;\n  responseStyle?: ResponseStyle;\n  throwOnError?: boolean;\n}\n\ntype MethodFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'>,\n) => RequestResult<TData, TError, ThrowOnError, TResponseStyle>;\n\ntype SseFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'>,\n) => Promise<ServerSentEventsResult<TData, TError>>;\n\ntype RequestFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'> &\n    Pick<Required<RequestOptions<TData, TResponseStyle, ThrowOnError>>, 'method'>,\n) => RequestResult<TData, TError, ThrowOnError, TResponseStyle>;\n\ntype BuildUrlFn = <\n  TData extends {\n    body?: unknown;\n    path?: Record<string, unknown>;\n    query?: Record<string, unknown>;\n    url: string;\n  },\n>(\n  options: TData & Options<TData>,\n) => string;\n\nexport type Client = CoreClient<RequestFn, Config, MethodFn, BuildUrlFn, SseFn> & {\n  interceptors: Middleware<Request, Response, unknown, ResolvedRequestOptions>;\n};\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 = ClientOptions> = (\n  override?: Config<ClientOptions & T>,\n) => Config<Required<ClientOptions> & T>;\n\nexport interface TDataShape {\n  body?: unknown;\n  headers?: unknown;\n  path?: unknown;\n  query?: unknown;\n  url: string;\n}\n\ntype OmitKeys<T, K> = Pick<T, Exclude<keyof T, K>>;\n\nexport type Options<\n  TData extends TDataShape = TDataShape,\n  ThrowOnError extends boolean = boolean,\n  TResponse = unknown,\n  TResponseStyle extends ResponseStyle = 'fields',\n> = OmitKeys<\n  RequestOptions<TResponse, TResponseStyle, ThrowOnError>,\n  'body' | 'path' | 'query' | 'url'\n> &\n  ([TData] extends [never] ? unknown : Omit<TData, 'url'>);\n"
  },
  {
    "path": "packages/openapi-ts-tests/zod/v4/__snapshots__/2.0.x/v4/type-format/client/utils.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/zod/v4/__snapshots__/2.0.x/v4/type-format/client.gen.ts",
    "content": "// 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>());\n"
  },
  {
    "path": "packages/openapi-ts-tests/zod/v4/__snapshots__/2.0.x/v4/type-format/core/auth.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/zod/v4/__snapshots__/2.0.x/v4/type-format/core/bodySerializer.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/zod/v4/__snapshots__/2.0.x/v4/type-format/core/params.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/zod/v4/__snapshots__/2.0.x/v4/type-format/core/pathSerializer.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/zod/v4/__snapshots__/2.0.x/v4/type-format/core/queryKeySerializer.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\n/**\n * JSON-friendly union that mirrors what Pinia Colada can hash.\n */\nexport type JsonValue =\n  | null\n  | string\n  | number\n  | boolean\n  | JsonValue[]\n  | { [key: string]: JsonValue };\n\n/**\n * Replacer that converts non-JSON values (bigint, Date, etc.) to safe substitutes.\n */\nexport const queryKeyJsonReplacer = (_key: string, value: unknown) => {\n  if (value === undefined || typeof value === 'function' || typeof value === 'symbol') {\n    return undefined;\n  }\n  if (typeof value === 'bigint') {\n    return value.toString();\n  }\n  if (value instanceof Date) {\n    return value.toISOString();\n  }\n  return value;\n};\n\n/**\n * Safely stringifies a value and parses it back into a JsonValue.\n */\nexport const stringifyToJsonValue = (input: unknown): JsonValue | undefined => {\n  try {\n    const json = JSON.stringify(input, queryKeyJsonReplacer);\n    if (json === undefined) {\n      return undefined;\n    }\n    return JSON.parse(json) as JsonValue;\n  } catch {\n    return undefined;\n  }\n};\n\n/**\n * Detects plain objects (including objects with a null prototype).\n */\nconst isPlainObject = (value: unknown): value is Record<string, unknown> => {\n  if (value === null || typeof value !== 'object') {\n    return false;\n  }\n  const prototype = Object.getPrototypeOf(value as object);\n  return prototype === Object.prototype || prototype === null;\n};\n\n/**\n * Turns URLSearchParams into a sorted JSON object for deterministic keys.\n */\nconst serializeSearchParams = (params: URLSearchParams): JsonValue => {\n  const entries = Array.from(params.entries()).sort(([a], [b]) => a.localeCompare(b));\n  const result: Record<string, JsonValue> = {};\n\n  for (const [key, value] of entries) {\n    const existing = result[key];\n    if (existing === undefined) {\n      result[key] = value;\n      continue;\n    }\n\n    if (Array.isArray(existing)) {\n      (existing as string[]).push(value);\n    } else {\n      result[key] = [existing, value];\n    }\n  }\n\n  return result;\n};\n\n/**\n * Normalizes any accepted value into a JSON-friendly shape for query keys.\n */\nexport const serializeQueryKeyValue = (value: unknown): JsonValue | undefined => {\n  if (value === null) {\n    return null;\n  }\n\n  if (typeof value === 'string' || typeof value === 'number' || typeof value === 'boolean') {\n    return value;\n  }\n\n  if (value === undefined || typeof value === 'function' || typeof value === 'symbol') {\n    return undefined;\n  }\n\n  if (typeof value === 'bigint') {\n    return value.toString();\n  }\n\n  if (value instanceof Date) {\n    return value.toISOString();\n  }\n\n  if (Array.isArray(value)) {\n    return stringifyToJsonValue(value);\n  }\n\n  if (typeof URLSearchParams !== 'undefined' && value instanceof URLSearchParams) {\n    return serializeSearchParams(value);\n  }\n\n  if (isPlainObject(value)) {\n    return stringifyToJsonValue(value);\n  }\n\n  return undefined;\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/zod/v4/__snapshots__/2.0.x/v4/type-format/core/serverSentEvents.gen.ts",
    "content": "// 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 const 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            // Normalize line endings: CRLF -> LF, then CR -> LF\n            buffer = buffer.replace(/\\r\\n/g, '\\n').replace(/\\r/g, '\\n');\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"
  },
  {
    "path": "packages/openapi-ts-tests/zod/v4/__snapshots__/2.0.x/v4/type-format/core/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { Auth, AuthToken } from './auth.gen';\nimport type { BodySerializer, QuerySerializer, QuerySerializerOptions } from './bodySerializer.gen';\n\nexport type HttpMethod =\n  | 'connect'\n  | 'delete'\n  | 'get'\n  | 'head'\n  | 'options'\n  | 'patch'\n  | 'post'\n  | 'put'\n  | 'trace';\n\nexport type Client<\n  RequestFn = never,\n  Config = unknown,\n  MethodFn = never,\n  BuildUrlFn = never,\n  SseFn = never,\n> = {\n  /**\n   * Returns the final request URL.\n   */\n  buildUrl: BuildUrlFn;\n  getConfig: () => Config;\n  request: RequestFn;\n  setConfig: (config: Config) => Config;\n} & {\n  [K in HttpMethod]: MethodFn;\n} & ([SseFn] extends [never] ? { sse?: never } : { sse: { [K in HttpMethod]: SseFn } });\n\nexport interface Config {\n  /**\n   * Auth token or a function returning auth token. The resolved value will be\n   * added to the request payload as defined by its `security` array.\n   */\n  auth?: ((auth: Auth) => Promise<AuthToken> | AuthToken) | AuthToken;\n  /**\n   * A function for serializing request body parameter. By default,\n   * {@link JSON.stringify()} will be used.\n   */\n  bodySerializer?: BodySerializer | null;\n  /**\n   * An object containing any HTTP headers that you want to pre-populate your\n   * `Headers` object with.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/Headers/Headers#init See more}\n   */\n  headers?:\n    | RequestInit['headers']\n    | Record<\n        string,\n        string | number | boolean | (string | number | boolean)[] | null | undefined | unknown\n      >;\n  /**\n   * The request method.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/fetch#method See more}\n   */\n  method?: Uppercase<HttpMethod>;\n  /**\n   * A function for serializing request query parameters. By default, arrays\n   * will be exploded in form style, objects will be exploded in deepObject\n   * style, and reserved characters are percent-encoded.\n   *\n   * This method will have no effect if the native `paramsSerializer()` Axios\n   * API function is used.\n   *\n   * {@link https://swagger.io/docs/specification/serialization/#query View examples}\n   */\n  querySerializer?: QuerySerializer | QuerySerializerOptions;\n  /**\n   * A function validating request data. This is useful if you want to ensure\n   * the request conforms to the desired shape, so it can be safely sent to\n   * the server.\n   */\n  requestValidator?: (data: unknown) => Promise<unknown>;\n  /**\n   * A function transforming response data before it's returned. This is useful\n   * for post-processing data, e.g. converting ISO strings into Date objects.\n   */\n  responseTransformer?: (data: unknown) => Promise<unknown>;\n  /**\n   * A function validating response data. This is useful if you want to ensure\n   * the response conforms to the desired shape, so it can be safely passed to\n   * the transformers and returned to the user.\n   */\n  responseValidator?: (data: unknown) => Promise<unknown>;\n}\n\ntype IsExactlyNeverOrNeverUndefined<T> = [T] extends [never]\n  ? true\n  : [T] extends [never | undefined]\n    ? [undefined] extends [T]\n      ? false\n      : true\n    : false;\n\nexport type OmitNever<T extends Record<string, unknown>> = {\n  [K in keyof T as IsExactlyNeverOrNeverUndefined<T[K]> extends true ? never : K]: T[K];\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/zod/v4/__snapshots__/2.0.x/v4/type-format/core/utils.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/zod/v4/__snapshots__/2.0.x/v4/type-format/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport { type Options, postFoo } from './sdk.gen';\nexport type { Bar, ClientOptions, Foo, PostFooData, PostFooResponse, PostFooResponses, TypeID, UserId } from './types.gen';\n"
  },
  {
    "path": "packages/openapi-ts-tests/zod/v4/__snapshots__/2.0.x/v4/type-format/sdk.gen.ts",
    "content": "// 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 { postFooResponseTransformer } from './transformers.gen';\nimport type { PostFooData, PostFooResponses } from './types.gen';\nimport { zPostFooData, zPostFooResponse } from './zod.gen';\n\nexport type Options<TData extends TDataShape = TDataShape, ThrowOnError extends boolean = boolean> = Options2<TData, ThrowOnError> & {\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\nexport const postFoo = <ThrowOnError extends boolean = false>(options?: Options<PostFooData, ThrowOnError>) => (options?.client ?? client).post<PostFooResponses, unknown, ThrowOnError>({\n    requestValidator: async (data) => await zPostFooData.parseAsync(data),\n    responseTransformer: postFooResponseTransformer,\n    responseValidator: async (data) => await zPostFooResponse.parseAsync(data),\n    url: '/foo',\n    ...options\n});\n"
  },
  {
    "path": "packages/openapi-ts-tests/zod/v4/__snapshots__/2.0.x/v4/type-format/transformers.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { PostFooResponse } from './types.gen';\n\nconst fooSchemaResponseTransformer = (data: any) => {\n    data.foo = BigInt(data.foo.toString());\n    return data;\n};\n\nexport const postFooResponseTransformer = async (data: any): Promise<PostFooResponse> => {\n    data = fooSchemaResponseTransformer(data);\n    return data;\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/zod/v4/__snapshots__/2.0.x/v4/type-format/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type ClientOptions = {\n    baseUrl: string;\n};\n\nexport type TypeID<T extends string> = `${T}_${string}`;\n\nexport type UserId = TypeID<'user'>;\n\nexport type Foo = {\n    bar?: number;\n    foo: bigint;\n    id: UserId;\n};\n\nexport type Bar = {\n    foo: number;\n    [key: string]: number;\n};\n\nexport type PostFooData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/foo';\n};\n\nexport type PostFooResponses = {\n    /**\n     * OK\n     */\n    200: Foo;\n};\n\nexport type PostFooResponse = PostFooResponses[keyof PostFooResponses];\n"
  },
  {
    "path": "packages/openapi-ts-tests/zod/v4/__snapshots__/2.0.x/v4/type-format/zod.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport * as z from 'zod';\n\nexport const zFoo = z.object({\n    bar: z.int().optional(),\n    foo: z.coerce.bigint().min(BigInt('-9223372036854775808'), { error: 'Invalid value: Expected int64 to be >= -9223372036854775808' }).max(BigInt('9223372036854775807'), { error: 'Invalid value: Expected int64 to be <= 9223372036854775807' }).default(BigInt(0)),\n    id: z.string()\n});\n\nexport const zBar = z.object({\n    foo: z.int()\n});\n\nexport const zPostFooData = z.object({\n    body: z.never().optional(),\n    path: z.never().optional(),\n    query: z.never().optional()\n});\n\n/**\n * OK\n */\nexport const zPostFooResponse = zFoo;\n"
  },
  {
    "path": "packages/openapi-ts-tests/zod/v4/__snapshots__/3.0.x/mini/array-items-all-of/zod.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport * as z from 'zod/mini';\n\nexport const zArrayWithAllOfObjects = z.array(z.intersection(z.object({\n    id: z.optional(z.int())\n}), z.object({\n    name: z.optional(z.string())\n})));\n\nexport const zArrayWithAllOfPrimitives = z.array(z.intersection(z.number(), z.string()));\n\nexport const zBaseModel = z.object({\n    id: z.optional(z.int()),\n    createdAt: z.optional(z.iso.datetime())\n});\n\nexport const zArrayWithAllOfRefs = z.array(z.intersection(zBaseModel, z.object({\n    extra: z.optional(z.string())\n})));\n"
  },
  {
    "path": "packages/openapi-ts-tests/zod/v4/__snapshots__/3.0.x/mini/array-items-one-of-length-1/zod.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport * as z from 'zod/mini';\n\nexport const zBar = z.string();\n\nexport const zFoo = z.object({\n    foo: z.optional(z.array(zBar).check(z.minLength(1), z.maxLength(2147483647)))\n});\n"
  },
  {
    "path": "packages/openapi-ts-tests/zod/v4/__snapshots__/3.0.x/mini/circular/zod.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport * as z from 'zod/mini';\n\nexport const zFoo = z.object({\n    quux: z.optional(z.lazy((): any => zQuux))\n});\n\nexport const zBar = z.object({\n    bar: z.optional(z.lazy((): any => zBar)),\n    baz: z.optional(z.lazy((): any => zBaz))\n});\n\nexport const zBaz = z.object({\n    quux: z.optional(z.lazy((): any => zQuux))\n});\n\nexport const zQux = z.union([\n    z.intersection(z.object({\n        type: z.literal('struct')\n    }), z.lazy(() => z.lazy((): any => zCorge))),\n    z.intersection(z.object({\n        type: z.literal('array')\n    }), zFoo)\n]);\n\nexport const zQuux = z.object({\n    qux: z.optional(zQux)\n});\n\nexport const zCorge = z.object({\n    baz: z.optional(z.array(zBaz))\n});\n"
  },
  {
    "path": "packages/openapi-ts-tests/zod/v4/__snapshots__/3.0.x/mini/default/zod.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport * as z from 'zod/mini';\n\n/**\n * Model with number-only name\n */\nexport const z400 = z.string();\n\n/**\n * Testing multiline comments in string: First line\n * Second line\n *\n * Fourth line\n */\nexport const zCamelCaseCommentWithBreaks = z.int();\n\n/**\n * Testing multiline comments in string: First line\n * Second line\n *\n * Fourth line\n */\nexport const zCommentWithBreaks = z.int();\n\n/**\n * Testing backticks in string: `backticks` and ```multiple backticks``` should work\n */\nexport const zCommentWithBackticks = z.int();\n\n/**\n * Testing backticks and quotes in string: `backticks`, 'quotes', \"double quotes\" and ```multiple backticks``` should work\n */\nexport const zCommentWithBackticksAndQuotes = z.int();\n\n/**\n * Testing slashes in string: \\backwards\\\\\\ and /forwards/// should work\n */\nexport const zCommentWithSlashes = z.int();\n\n/**\n * Testing expression placeholders in string: ${expression} should work\n */\nexport const zCommentWithExpressionPlaceholders = z.int();\n\n/**\n * Testing quotes in string: 'single quote''' and \"double quotes\"\"\" should work\n */\nexport const zCommentWithQuotes = z.int();\n\n/**\n * Testing reserved characters in string: * inline * and ** inline ** should work\n */\nexport const zCommentWithReservedCharacters = z.int();\n\n/**\n * This is a simple number\n */\nexport const zSimpleInteger = z.int();\n\n/**\n * This is a simple boolean\n */\nexport const zSimpleBoolean = z.boolean();\n\n/**\n * This is a simple string\n */\nexport const zSimpleString = z.string();\n\n/**\n * A string with non-ascii (unicode) characters valid in typescript identifiers (æøåÆØÅöÔèÈ字符串)\n */\nexport const zNonAsciiStringæøåÆøÅöôêÊ字符串 = z.string();\n\n/**\n * This is a simple file\n */\nexport const zSimpleFile = z.string();\n\n/**\n * This is a simple string\n */\nexport const zSimpleStringWithPattern = z.nullable(z.string().check(z.maxLength(64), z.regex(/^[a-zA-Z0-9_]*$/)));\n\n/**\n * This is a simple enum with strings\n */\nexport const zEnumWithStrings = z.enum([\n    'Success',\n    'Warning',\n    'Error',\n    '\\'Single Quote\\'',\n    '\"Double Quotes\"',\n    'Non-ascii: øæåôöØÆÅÔÖ字符串'\n]);\n\nexport const zEnumWithReplacedCharacters = z.union([\n    z.literal('\\'Single Quote\\''),\n    z.literal('\"Double Quotes\"'),\n    z.literal('øæåôöØÆÅÔÖ字符串'),\n    z.literal(3.1),\n    z.literal('')\n]);\n\n/**\n * This is a simple enum with numbers\n */\nexport const zEnumWithNumbers = z.union([\n    z.literal(1),\n    z.literal(2),\n    z.literal(3),\n    z.literal(1.1),\n    z.literal(1.2),\n    z.literal(1.3),\n    z.literal(100),\n    z.literal(200),\n    z.literal(300),\n    z.literal(-100),\n    z.literal(-200),\n    z.literal(-300),\n    z.literal(-1.1),\n    z.literal(-1.2),\n    z.literal(-1.3)\n]);\n\n/**\n * Success=1,Warning=2,Error=3\n */\nexport const zEnumFromDescription = z.number();\n\n/**\n * This is a simple enum with numbers\n */\nexport const zEnumWithExtensions = z.union([\n    z.literal(200),\n    z.literal(400),\n    z.literal(500)\n]);\n\nexport const zEnumWithXEnumNames = z.union([\n    z.literal(0),\n    z.literal(1),\n    z.literal(2)\n]);\n\n/**\n * This is a simple array with numbers\n */\nexport const zArrayWithNumbers = z.array(z.int());\n\n/**\n * This is a simple array with booleans\n */\nexport const zArrayWithBooleans = z.array(z.boolean());\n\n/**\n * This is a simple array with strings\n */\nexport const zArrayWithStrings = z._default(z.array(z.string()), ['test']);\n\n/**\n * This is a simple array with properties\n */\nexport const zArrayWithProperties = z.array(z.object({\n    '16x16': z.optional(zCamelCaseCommentWithBreaks),\n    bar: z.optional(z.string())\n}));\n\n/**\n * This is a simple array with any of properties\n */\nexport const zArrayWithAnyOfProperties = z.array(z.union([z.object({\n        foo: z._default(z.optional(z.string()), 'test')\n    }), z.object({\n        bar: z.optional(z.string())\n    })]));\n\nexport const zAnyOfAnyAndNull = z.object({\n    data: z.optional(z.unknown())\n});\n\n/**\n * This is a simple array with any of properties\n */\nexport const zAnyOfArrays = z.object({\n    results: z.optional(z.array(z.union([z.object({\n            foo: z.optional(z.string())\n        }), z.object({\n            bar: z.optional(z.string())\n        })])))\n});\n\n/**\n * This is a string dictionary\n */\nexport const zDictionaryWithString = z.record(z.string(), z.string());\n\nexport const zDictionaryWithPropertiesAndAdditionalProperties = z.object({\n    foo: z.optional(z.number()),\n    bar: z.optional(z.boolean())\n});\n\n/**\n * This is a string dictionary\n */\nexport const zDictionaryWithDictionary = z.record(z.string(), z.record(z.string(), z.string()));\n\n/**\n * This is a complex dictionary\n */\nexport const zDictionaryWithProperties = z.record(z.string(), z.object({\n    foo: z.optional(z.string()),\n    bar: z.optional(z.string())\n}));\n\n/**\n * This is a model with one number property\n */\nexport const zModelWithInteger = z.object({\n    prop: z.optional(z.int())\n});\n\n/**\n * This is a model with one boolean property\n */\nexport const zModelWithBoolean = z.object({\n    prop: z.optional(z.boolean())\n});\n\n/**\n * This is a model with one string property\n */\nexport const zModelWithString = z.object({\n    prop: z.optional(z.string())\n});\n\n/**\n * This is a simple reference\n */\nexport const zSimpleReference = zModelWithString;\n\n/**\n * This is a simple array with references\n */\nexport const zArrayWithReferences = z.array(zModelWithString);\n\n/**\n * This is a simple array containing an array\n */\nexport const zArrayWithArray = z.array(z.array(zModelWithString));\n\n/**\n * This is a string reference\n */\nexport const zDictionaryWithReference = z.record(z.string(), zModelWithString);\n\n/**\n * This is a complex dictionary\n */\nexport const zDictionaryWithArray = z.record(z.string(), z.array(zModelWithString));\n\n/**\n * This is a model with one string property\n */\nexport const zModelWithStringError = z.object({\n    prop: z.optional(z.string())\n});\n\n/**\n * `Comment` or `VoiceComment`. The JSON object for adding voice comments to tickets is different. See [Adding voice comments to tickets](/documentation/ticketing/managing-tickets/adding-voice-comments-to-tickets)\n */\nexport const zModelFromZendesk = z.string();\n\n/**\n * This is a model with one string property\n */\nexport const zModelWithNullableString = z.object({\n    nullableProp1: z.nullish(z.string()),\n    nullableRequiredProp1: z.nullable(z.string()),\n    nullableProp2: z.nullish(z.string()),\n    nullableRequiredProp2: z.nullable(z.string()),\n    'foo_bar-enum': z.optional(z.enum([\n        'Success',\n        'Warning',\n        'Error',\n        'ØÆÅ字符串'\n    ]))\n});\n\n/**\n * This is a model with one enum\n */\nexport const zModelWithEnum = z.object({\n    'foo_bar-enum': z.optional(z.enum([\n        'Success',\n        'Warning',\n        'Error',\n        'ØÆÅ字符串'\n    ])),\n    statusCode: z.optional(z.enum([\n        '100',\n        '200 FOO',\n        '300 FOO_BAR',\n        '400 foo-bar',\n        '500 foo.bar',\n        '600 foo&bar'\n    ])),\n    bool: z.optional(z.literal(true))\n});\n\n/**\n * This is a model with one enum with escaped name\n */\nexport const zModelWithEnumWithHyphen = z.object({\n    'foo-bar-baz-qux': z.optional(z.enum(['3.0']))\n});\n\n/**\n * This is a model with one enum\n */\nexport const zModelWithEnumFromDescription = z.object({\n    test: z.optional(z.int())\n});\n\n/**\n * This is a model with nested enums\n */\nexport const zModelWithNestedEnums = z.object({\n    dictionaryWithEnum: z.optional(z.record(z.string(), z.enum([\n        'Success',\n        'Warning',\n        'Error'\n    ]))),\n    dictionaryWithEnumFromDescription: z.optional(z.record(z.string(), z.int())),\n    arrayWithEnum: z.optional(z.array(z.enum([\n        'Success',\n        'Warning',\n        'Error'\n    ]))),\n    arrayWithDescription: z.optional(z.array(z.int())),\n    'foo_bar-enum': z.optional(z.enum([\n        'Success',\n        'Warning',\n        'Error',\n        'ØÆÅ字符串'\n    ]))\n});\n\n/**\n * This is a model with one property containing an array\n */\nexport const zModelWithArray = z.object({\n    prop: z.optional(z.array(zModelWithString)),\n    propWithFile: z.optional(z.array(z.string())),\n    propWithNumber: z.optional(z.array(z.number()))\n});\n\n/**\n * This is a model with one property containing a dictionary\n */\nexport const zModelWithDictionary = z.object({\n    prop: z.optional(z.record(z.string(), z.string()))\n});\n\n/**\n * This is a deprecated model with a deprecated property\n *\n * @deprecated\n */\nexport const zDeprecatedModel = z.object({\n    prop: z.optional(z.string())\n});\n\n/**\n * This is a model with one property containing a circular reference\n */\nexport const zModelWithCircularReference = z.object({\n    prop: z.optional(z.lazy((): any => zModelWithCircularReference))\n});\n\n/**\n * This is a model with one property with a 'one of' relationship\n */\nexport const zCompositionWithOneOf = z.object({\n    propA: z.optional(z.union([\n        zModelWithString,\n        zModelWithEnum,\n        zModelWithArray,\n        zModelWithDictionary\n    ]))\n});\n\n/**\n * This is a model with one property with a 'one of' relationship where the options are not $ref\n */\nexport const zCompositionWithOneOfAnonymous = z.object({\n    propA: z.optional(z.union([\n        z.object({\n            propA: z.optional(z.string())\n        }),\n        z.string(),\n        z.int()\n    ]))\n});\n\n/**\n * Circle\n */\nexport const zModelCircle = z.object({\n    kind: z.string(),\n    radius: z.optional(z.number())\n});\n\n/**\n * Square\n */\nexport const zModelSquare = z.object({\n    kind: z.string(),\n    sideLength: z.optional(z.number())\n});\n\n/**\n * This is a model with one property with a 'one of' relationship where the options are not $ref\n */\nexport const zCompositionWithOneOfDiscriminator = z.union([\n    z.intersection(z.object({\n        kind: z.literal('circle')\n    }), zModelCircle),\n    z.intersection(z.object({\n        kind: z.literal('square')\n    }), zModelSquare)\n]);\n\n/**\n * This is a model with one property with a 'any of' relationship\n */\nexport const zCompositionWithAnyOf = z.object({\n    propA: z.optional(z.union([\n        zModelWithString,\n        zModelWithEnum,\n        zModelWithArray,\n        zModelWithDictionary\n    ]))\n});\n\n/**\n * This is a model with one property with a 'any of' relationship where the options are not $ref\n */\nexport const zCompositionWithAnyOfAnonymous = z.object({\n    propA: z.optional(z.union([\n        z.object({\n            propA: z.optional(z.string())\n        }),\n        z.string(),\n        z.int()\n    ]))\n});\n\n/**\n * This is a model with nested 'any of' property with a type null\n */\nexport const zCompositionWithNestedAnyAndTypeNull = z.object({\n    propA: z.optional(z.union([\n        z.array(z.nullable(zModelWithDictionary)),\n        z.array(z.nullable(zModelWithArray))\n    ]))\n});\n\nexport const z3eNum1Период = z.enum(['Bird', 'Dog']);\n\nexport const zConstValue = z.enum(['ConstValue']);\n\n/**\n * This is a model with one property with a 'any of' relationship where the options are not $ref\n */\nexport const zCompositionWithNestedAnyOfAndNull = z.object({\n    propA: z.nullish(z.array(z.union([z3eNum1Период, zConstValue])))\n});\n\n/**\n * This is a model with one property with a 'one of' relationship\n */\nexport const zCompositionWithOneOfAndNullable = z.object({\n    propA: z.nullish(z.union([\n        z.object({\n            boolean: z.optional(z.boolean())\n        }),\n        zModelWithEnum,\n        zModelWithArray,\n        zModelWithDictionary\n    ]))\n});\n\n/**\n * This is a model that contains a simple dictionary within composition\n */\nexport const zCompositionWithOneOfAndSimpleDictionary = z.object({\n    propA: z.optional(z.union([\n        z.boolean(),\n        z.record(z.string(), z.number())\n    ]))\n});\n\n/**\n * This is a model that contains a dictionary of simple arrays within composition\n */\nexport const zCompositionWithOneOfAndSimpleArrayDictionary = z.object({\n    propA: z.optional(z.union([\n        z.boolean(),\n        z.record(z.string(), z.array(z.boolean()))\n    ]))\n});\n\n/**\n * This is a model that contains a dictionary of complex arrays (composited) within composition\n */\nexport const zCompositionWithOneOfAndComplexArrayDictionary = z.object({\n    propA: z.optional(z.union([\n        z.boolean(),\n        z.record(z.string(), z.array(z.union([z.number(), z.string()])))\n    ]))\n});\n\n/**\n * This is a model with one property with a 'all of' relationship\n */\nexport const zCompositionWithAllOfAndNullable = z.object({\n    propA: z.nullish(z.intersection(z.intersection(z.intersection(z.object({\n        boolean: z.optional(z.boolean())\n    }), zModelWithEnum), zModelWithArray), zModelWithDictionary))\n});\n\n/**\n * This is a model with one property with a 'any of' relationship\n */\nexport const zCompositionWithAnyOfAndNullable = z.object({\n    propA: z.nullish(z.union([\n        z.object({\n            boolean: z.optional(z.boolean())\n        }),\n        zModelWithEnum,\n        zModelWithArray,\n        zModelWithDictionary\n    ]))\n});\n\n/**\n * This is a base model with two simple optional properties\n */\nexport const zCompositionBaseModel = z.object({\n    firstName: z.optional(z.string()),\n    lastname: z.optional(z.string())\n});\n\n/**\n * This is a model that extends the base model\n */\nexport const zCompositionExtendedModel = z.intersection(zCompositionBaseModel, z.object({\n    age: z.number(),\n    firstName: z.string(),\n    lastname: z.string()\n}));\n\n/**\n * This is a model with one nested property\n */\nexport const zModelWithProperties = z.object({\n    required: z.string(),\n    requiredAndReadOnly: z.readonly(z.string()),\n    requiredAndNullable: z.nullable(z.string()),\n    string: z.optional(z.string()),\n    number: z.optional(z.number()),\n    boolean: z.optional(z.boolean()),\n    reference: z.optional(zModelWithString),\n    'property with space': z.optional(z.string()),\n    default: z.optional(z.string()),\n    try: z.optional(z.string()),\n    '@namespace.string': z.optional(z.readonly(z.string())),\n    '@namespace.integer': z.optional(z.readonly(z.int()))\n});\n\n/**\n * This is a model with one property containing a reference\n */\nexport const zModelWithReference = z.object({\n    prop: z.optional(zModelWithProperties)\n});\n\n/**\n * This is a model with one nested property\n */\nexport const zModelWithNestedProperties = z.object({\n    first: z.nullable(z.readonly(z.object({\n        second: z.nullable(z.readonly(z.object({\n            third: z.nullable(z.readonly(z.string()))\n        })))\n    })))\n});\n\n/**\n * This is a model with duplicated properties\n */\nexport const zModelWithDuplicateProperties = z.object({\n    prop: z.optional(zModelWithString)\n});\n\n/**\n * This is a model with ordered properties\n */\nexport const zModelWithOrderedProperties = z.object({\n    zebra: z.optional(z.string()),\n    apple: z.optional(z.string()),\n    hawaii: z.optional(z.string())\n});\n\n/**\n * This is a model with duplicated imports\n */\nexport const zModelWithDuplicateImports = z.object({\n    propA: z.optional(zModelWithString),\n    propB: z.optional(zModelWithString),\n    propC: z.optional(zModelWithString)\n});\n\n/**\n * This is a model that extends another model\n */\nexport const zModelThatExtends = z.intersection(zModelWithString, z.object({\n    propExtendsA: z.optional(z.string()),\n    propExtendsB: z.optional(zModelWithString)\n}));\n\n/**\n * This is a model that extends another model\n */\nexport const zModelThatExtendsExtends = z.intersection(z.intersection(zModelWithString, zModelThatExtends), z.object({\n    propExtendsC: z.optional(z.string()),\n    propExtendsD: z.optional(zModelWithString)\n}));\n\n/**\n * This is a model that contains a some patterns\n */\nexport const zModelWithPattern = z.object({\n    key: z.string().check(z.maxLength(64), z.regex(/^[a-zA-Z0-9_]*$/)),\n    name: z.string().check(z.maxLength(255)),\n    enabled: z.optional(z.readonly(z.boolean())),\n    modified: z.optional(z.readonly(z.iso.datetime())),\n    id: z.optional(z.string().check(z.regex(/^\\d{2}-\\d{3}-\\d{4}$/))),\n    text: z.optional(z.string().check(z.regex(/^\\w+$/))),\n    patternWithSingleQuotes: z.optional(z.string().check(z.regex(/^[a-zA-Z0-9']*$/))),\n    patternWithNewline: z.optional(z.string().check(z.regex(/aaa\\nbbb/))),\n    patternWithBacktick: z.optional(z.string().check(z.regex(/aaa`bbb/))),\n    patternWithUnicode: z.optional(z.string().check(z.regex(/^\\p{L}+$/u)))\n});\n\nexport const zFile = z.object({\n    id: z.optional(z.readonly(z.string().check(z.minLength(1)))),\n    updated_at: z.optional(z.readonly(z.iso.datetime())),\n    created_at: z.optional(z.readonly(z.iso.datetime())),\n    mime: z.string().check(z.minLength(1), z.maxLength(24)),\n    file: z.optional(z.readonly(z.url()))\n});\n\nexport const zDefault = z.object({\n    name: z.optional(z.string())\n});\n\nexport const zPageable = z.object({\n    page: z._default(z.optional(z.int().check(z.gte(0), z.maximum(2147483647, { error: 'Invalid value: Expected int32 to be <= 2147483647' }))), 0),\n    size: z.optional(z.int().check(z.gte(1), z.maximum(2147483647, { error: 'Invalid value: Expected int32 to be <= 2147483647' }))),\n    sort: z.optional(z.array(z.string()))\n});\n\n/**\n * This is a free-form object without additionalProperties.\n */\nexport const zFreeFormObjectWithoutAdditionalProperties = z.record(z.string(), z.unknown());\n\n/**\n * This is a free-form object with additionalProperties: true.\n */\nexport const zFreeFormObjectWithAdditionalPropertiesEqTrue = z.record(z.string(), z.unknown());\n\n/**\n * This is a free-form object with additionalProperties: {}.\n */\nexport const zFreeFormObjectWithAdditionalPropertiesEqEmptyObject = z.record(z.string(), z.unknown());\n\nexport const zModelWithConst = z.object({\n    String: z.optional(z.enum(['String'])),\n    number: z.optional(z.literal(0)),\n    null: z.optional(z.unknown()),\n    withType: z.optional(z.enum(['Some string']))\n});\n\n/**\n * This is a model with one property and additionalProperties: true\n */\nexport const zModelWithAdditionalPropertiesEqTrue = z.object({\n    prop: z.optional(z.string())\n});\n\nexport const zNestedAnyOfArraysNullable = z.object({\n    nullableArray: z.nullish(z.array(z.union([z.string(), z.boolean()])))\n});\n\n/**\n * An object that can be null\n */\nexport const zNullableObject = z._default(z.nullable(z.object({\n    foo: z.optional(z.string())\n})), null);\n\n/**\n * Some % character\n */\nexport const zCharactersInDescription = z.string();\n\nexport const zModelWithNullableObject = z.object({\n    data: z.optional(zNullableObject)\n});\n\n/**\n * An object with additional properties that can be null\n */\nexport const zModelWithAdditionalPropertiesRef = z.record(z.string(), z.nullable(zNullableObject));\n\nexport const zModelWithOneOfEnum = z.union([\n    z.object({\n        foo: z.enum(['Bar'])\n    }),\n    z.object({\n        foo: z.enum(['Baz'])\n    }),\n    z.object({\n        foo: z.enum(['Qux'])\n    }),\n    z.object({\n        content: z.iso.datetime(),\n        foo: z.enum(['Quux'])\n    }),\n    z.object({\n        content: z.tuple([z.iso.datetime(), z.iso.datetime()]),\n        foo: z.enum(['Corge'])\n    })\n]);\n\nexport const zModelWithNestedArrayEnumsDataFoo = z.enum(['foo', 'bar']);\n\nexport const zModelWithNestedArrayEnumsDataBar = z.enum(['baz', 'qux']);\n\nexport const zModelWithNestedArrayEnumsData = z.object({\n    foo: z.optional(z.array(zModelWithNestedArrayEnumsDataFoo)),\n    bar: z.optional(z.array(zModelWithNestedArrayEnumsDataBar))\n});\n\nexport const zModelWithNestedArrayEnums = z.object({\n    array_strings: z.optional(z.array(z.string())),\n    data: z.optional(zModelWithNestedArrayEnumsData)\n});\n\nexport const zModelWithNestedCompositionEnums = z.object({\n    foo: z.optional(zModelWithNestedArrayEnumsDataFoo)\n});\n\nexport const zModelWithReadOnlyAndWriteOnly = z.object({\n    foo: z.string(),\n    bar: z.readonly(z.string())\n});\n\n/**\n * This is a model with one property containing an array\n */\nexport const zModelWithArrayReadOnlyAndWriteOnly = z.object({\n    prop: z.optional(z.array(zModelWithReadOnlyAndWriteOnly)),\n    propWithFile: z.optional(z.array(z.string())),\n    propWithNumber: z.optional(z.array(z.number()))\n});\n\nexport const zModelWithConstantSizeArray = z.tuple([z.number(), z.number()]);\n\nexport const zModelWithAnyOfConstantSizeArray = z.tuple([\n    z.union([\n        z.number(),\n        z.string()\n    ]),\n    z.union([\n        z.number(),\n        z.string()\n    ]),\n    z.union([\n        z.number(),\n        z.string()\n    ])\n]);\n\nexport const zModelWithPrefixItemsConstantSizeArray = z.array(z.union([\n    zModelWithInteger,\n    z.number(),\n    z.string()\n]));\n\nexport const zModelWithAnyOfConstantSizeArrayNullable = z.tuple([\n    z.nullable(z.union([\n        z.number(),\n        z.string()\n    ])),\n    z.nullable(z.union([\n        z.number(),\n        z.string()\n    ])),\n    z.nullable(z.union([\n        z.number(),\n        z.string()\n    ]))\n]);\n\nexport const zModelWithAnyOfConstantSizeArrayAndIntersect = z.tuple([z.intersection(z.number(), z.string()), z.intersection(z.number(), z.string())]);\n\nexport const zModelWithNumericEnumUnion = z.object({\n    value: z.optional(z.union([\n        z.literal(-10),\n        z.literal(-1),\n        z.literal(0),\n        z.literal(1),\n        z.literal(3),\n        z.literal(6),\n        z.literal(12)\n    ]))\n});\n\n/**\n * Some description with `back ticks`\n */\nexport const zModelWithBackticksInDescription = z.object({\n    template: z.optional(z.string())\n});\n\n/**\n * Model used to test deduplication strategy (unused)\n */\nexport const zParameterSimpleParameterUnused = z.string();\n\n/**\n * Model used to test deduplication strategy\n */\nexport const zPostServiceWithEmptyTagResponse = z.string();\n\n/**\n * Model used to test deduplication strategy\n */\nexport const zPostServiceWithEmptyTagResponse2 = z.string();\n\n/**\n * Model used to test deduplication strategy\n */\nexport const zDeleteFooData = z.string();\n\n/**\n * Model used to test deduplication strategy\n */\nexport const zDeleteFooData2 = z.string();\n\n/**\n * Model with restricted keyword name\n */\nexport const zImport = z.string();\n\nexport const zModelWithAnyOfConstantSizeArrayWithNSizeAndOptions = z.tuple([z.union([\n        z.number(),\n        zImport\n    ]), z.union([\n        z.number(),\n        zImport\n    ])]);\n\nexport const zSchemaWithFormRestrictedKeys = z.object({\n    description: z.optional(z.string()),\n    'x-enum-descriptions': z.optional(z.string()),\n    'x-enum-varnames': z.optional(z.string()),\n    'x-enumNames': z.optional(z.string()),\n    title: z.optional(z.string()),\n    object: z.optional(z.object({\n        description: z.optional(z.string()),\n        'x-enum-descriptions': z.optional(z.string()),\n        'x-enum-varnames': z.optional(z.string()),\n        'x-enumNames': z.optional(z.string()),\n        title: z.optional(z.string())\n    })),\n    array: z.optional(z.array(z.object({\n        description: z.optional(z.string()),\n        'x-enum-descriptions': z.optional(z.string()),\n        'x-enum-varnames': z.optional(z.string()),\n        'x-enumNames': z.optional(z.string()),\n        title: z.optional(z.string())\n    })))\n});\n\n/**\n * This schema was giving PascalCase transformations a hard time\n */\nexport const zIoK8sApimachineryPkgApisMetaV1Preconditions = z.object({\n    resourceVersion: z.optional(z.string()),\n    uid: z.optional(z.string())\n});\n\n/**\n * This schema was giving PascalCase transformations a hard time\n */\nexport const zIoK8sApimachineryPkgApisMetaV1DeleteOptions = z.object({\n    preconditions: z.optional(zIoK8sApimachineryPkgApisMetaV1Preconditions)\n});\n\nexport const zAdditionalPropertiesUnknownIssue = z.record(z.string(), z.union([\n    z.string(),\n    z.number()\n]));\n\nexport const zAdditionalPropertiesUnknownIssue2 = z.record(z.string(), z.union([\n    z.string(),\n    z.number()\n]));\n\nexport const zAdditionalPropertiesUnknownIssue3 = z.intersection(z.string(), z.object({\n    entries: z.record(z.string(), zAdditionalPropertiesUnknownIssue)\n}));\n\nexport const zAdditionalPropertiesIntegerIssue = z.object({\n    value: z.int()\n});\n\nexport const zGenericSchemaDuplicateIssue1SystemBoolean = z.object({\n    item: z.optional(z.boolean()),\n    error: z.nullish(z.string()),\n    hasError: z.optional(z.readonly(z.boolean())),\n    data: z.optional(z.record(z.string(), z.never()))\n});\n\nexport const zGenericSchemaDuplicateIssue1SystemString = z.object({\n    item: z.nullish(z.string()),\n    error: z.nullish(z.string()),\n    hasError: z.optional(z.readonly(z.boolean()))\n});\n\nexport const zOneOfAllOfIssue = z.union([\n    z.intersection(z.union([\n        zConstValue,\n        zGenericSchemaDuplicateIssue1SystemBoolean\n    ]), z3eNum1Период),\n    zGenericSchemaDuplicateIssue1SystemString\n]);\n\nexport const zExternalSharedModel = z.object({\n    id: z.string(),\n    name: z.optional(z.string())\n});\n\nexport const zExternalRefA = zExternalSharedModel;\n\nexport const zExternalRefB = zExternalSharedModel;\n\n/**\n * This is a model with one nested property\n */\nexport const zModelWithPropertiesWritable = z.object({\n    required: z.string(),\n    requiredAndNullable: z.nullable(z.string()),\n    string: z.optional(z.string()),\n    number: z.optional(z.number()),\n    boolean: z.optional(z.boolean()),\n    reference: z.optional(zModelWithString),\n    'property with space': z.optional(z.string()),\n    default: z.optional(z.string()),\n    try: z.optional(z.string())\n});\n\n/**\n * This is a model with one property containing a reference\n */\nexport const zModelWithReferenceWritable = z.object({\n    prop: z.optional(zModelWithPropertiesWritable)\n});\n\n/**\n * This is a model that contains a some patterns\n */\nexport const zModelWithPatternWritable = z.object({\n    key: z.string().check(z.maxLength(64), z.regex(/^[a-zA-Z0-9_]*$/)),\n    name: z.string().check(z.maxLength(255)),\n    id: z.optional(z.string().check(z.regex(/^\\d{2}-\\d{3}-\\d{4}$/))),\n    text: z.optional(z.string().check(z.regex(/^\\w+$/))),\n    patternWithSingleQuotes: z.optional(z.string().check(z.regex(/^[a-zA-Z0-9']*$/))),\n    patternWithNewline: z.optional(z.string().check(z.regex(/aaa\\nbbb/))),\n    patternWithBacktick: z.optional(z.string().check(z.regex(/aaa`bbb/))),\n    patternWithUnicode: z.optional(z.string().check(z.regex(/^\\p{L}+$/u)))\n});\n\nexport const zFileWritable = z.object({\n    mime: z.string().check(z.minLength(1), z.maxLength(24))\n});\n\nexport const zModelWithReadOnlyAndWriteOnlyWritable = z.object({\n    foo: z.string(),\n    baz: z.string()\n});\n\n/**\n * This is a model with one property containing an array\n */\nexport const zModelWithArrayReadOnlyAndWriteOnlyWritable = z.object({\n    prop: z.optional(z.array(zModelWithReadOnlyAndWriteOnlyWritable)),\n    propWithFile: z.optional(z.array(z.string())),\n    propWithNumber: z.optional(z.array(z.number()))\n});\n\nexport const zModelWithAnyOfConstantSizeArrayWithNSizeAndOptionsWritable = z.tuple([z.union([\n        z.number(),\n        zImport\n    ]), z.union([\n        z.number(),\n        zImport\n    ])]);\n\nexport const zAdditionalPropertiesUnknownIssueWritable = z.record(z.string(), z.union([\n    z.string(),\n    z.number()\n]));\n\nexport const zOneOfAllOfIssueWritable = z.union([\n    z.intersection(z.union([\n        zConstValue,\n        zGenericSchemaDuplicateIssue1SystemBoolean\n    ]), z3eNum1Период),\n    zGenericSchemaDuplicateIssue1SystemString\n]);\n\nexport const zGenericSchemaDuplicateIssue1SystemBooleanWritable = z.object({\n    item: z.optional(z.boolean()),\n    error: z.nullish(z.string()),\n    data: z.optional(z.record(z.string(), z.never()))\n});\n\nexport const zGenericSchemaDuplicateIssue1SystemStringWritable = z.object({\n    item: z.nullish(z.string()),\n    error: z.nullish(z.string())\n});\n\n/**\n * This is a reusable parameter\n */\nexport const zSimpleParameter = z.string();\n\nexport const zCompositionWithOneOfAndProperties = z.intersection(z.union([\n    z.object({\n        foo: zSimpleParameter\n    }),\n    z.object({\n        bar: zNonAsciiStringæøåÆøÅöôêÊ字符串\n    })\n]), z.object({\n    baz: z.nullable(z.int().check(z.gte(0), z.maximum(65535, { error: 'Invalid value: Expected uint16 to be <= 65535' }))),\n    qux: z.int().check(z.gte(0), z.maximum(255, { error: 'Invalid value: Expected uint8 to be <= 255' }))\n}));\n\nexport const zModelWithOneOfAndProperties = z.intersection(z.union([\n    zSimpleParameter,\n    zNonAsciiStringæøåÆøÅöôêÊ字符串\n]), z.object({\n    baz: z.nullable(z.int().check(z.gte(0), z.maximum(65535, { error: 'Invalid value: Expected uint16 to be <= 65535' }))),\n    qux: z.int().check(z.gte(0), z.maximum(255, { error: 'Invalid value: Expected uint8 to be <= 255' }))\n}));\n\n/**\n * Parameter with illegal characters\n */\nexport const zXFooBar = zModelWithString;\n\nexport const zSimpleRequestBody = zModelWithString;\n\nexport const zSimpleFormData = zModelWithString;\n\nexport const zExportData = z.object({\n    body: z.optional(z.never()),\n    path: z.optional(z.never()),\n    query: z.optional(z.never())\n});\n\nexport const zPatchApiVbyApiVersionNoTagData = z.object({\n    body: z.optional(z.never()),\n    path: z.optional(z.never()),\n    query: z.optional(z.never())\n});\n\nexport const zImportData = z.object({\n    body: z.union([\n        zModelWithReadOnlyAndWriteOnlyWritable,\n        zModelWithArrayReadOnlyAndWriteOnlyWritable\n    ]),\n    path: z.optional(z.never()),\n    query: z.optional(z.never())\n});\n\nexport const zImportResponse = z.union([\n    zModelFromZendesk,\n    zModelWithReadOnlyAndWriteOnly\n]);\n\nexport const zFooWowData = z.object({\n    body: z.optional(z.never()),\n    path: z.optional(z.never()),\n    query: z.optional(z.never())\n});\n\nexport const zApiVVersionODataControllerCountData = z.object({\n    body: z.optional(z.never()),\n    path: z.optional(z.never()),\n    query: z.optional(z.never())\n});\n\n/**\n * Success\n */\nexport const zApiVVersionODataControllerCountResponse = zModelFromZendesk;\n\nexport const zGetApiVbyApiVersionSimpleOperationData = z.object({\n    body: z.optional(z.never()),\n    path: z.object({\n        foo_param: z.string()\n    }),\n    query: z.optional(z.never())\n});\n\n/**\n * Response is a simple number\n */\nexport const zGetApiVbyApiVersionSimpleOperationResponse = z.number();\n\nexport const zDeleteCallWithoutParametersAndResponseData = z.object({\n    body: z.optional(z.never()),\n    path: z.optional(z.never()),\n    query: z.optional(z.never())\n});\n\nexport const zGetCallWithoutParametersAndResponseData = z.object({\n    body: z.optional(z.never()),\n    path: z.optional(z.never()),\n    query: z.optional(z.never())\n});\n\nexport const zHeadCallWithoutParametersAndResponseData = z.object({\n    body: z.optional(z.never()),\n    path: z.optional(z.never()),\n    query: z.optional(z.never())\n});\n\nexport const zOptionsCallWithoutParametersAndResponseData = z.object({\n    body: z.optional(z.never()),\n    path: z.optional(z.never()),\n    query: z.optional(z.never())\n});\n\nexport const zPatchCallWithoutParametersAndResponseData = z.object({\n    body: z.optional(z.never()),\n    path: z.optional(z.never()),\n    query: z.optional(z.never())\n});\n\nexport const zPostCallWithoutParametersAndResponseData = z.object({\n    body: z.optional(z.never()),\n    path: z.optional(z.never()),\n    query: z.optional(z.never())\n});\n\nexport const zPutCallWithoutParametersAndResponseData = z.object({\n    body: z.optional(z.never()),\n    path: z.optional(z.never()),\n    query: z.optional(z.never())\n});\n\nexport const zDeleteFooData3 = z.object({\n    body: z.optional(z.never()),\n    path: z.object({\n        foo_param: z.string(),\n        BarParam: z.string()\n    }),\n    query: z.optional(z.never()),\n    headers: z.object({\n        'x-Foo-Bar': zModelWithString\n    })\n});\n\nexport const zCallWithDescriptionsData = z.object({\n    body: z.optional(z.never()),\n    path: z.optional(z.never()),\n    query: z.optional(z.object({\n        parameterWithBreaks: z.optional(z.string()),\n        parameterWithBackticks: z.optional(z.string()),\n        parameterWithSlashes: z.optional(z.string()),\n        parameterWithExpressionPlaceholders: z.optional(z.string()),\n        parameterWithQuotes: z.optional(z.string()),\n        parameterWithReservedCharacters: z.optional(z.string())\n    }))\n});\n\nexport const zDeprecatedCallData = z.object({\n    body: z.optional(z.never()),\n    path: z.optional(z.never()),\n    query: z.optional(z.never()),\n    headers: z.object({\n        parameter: z.nullable(zDeprecatedModel)\n    })\n});\n\nexport const zCallWithParametersData = z.object({\n    body: z.nullable(z.record(z.string(), z.unknown())),\n    path: z.object({\n        parameterPath: z.nullable(z.string()),\n        'api-version': z.nullable(z.string())\n    }),\n    query: z.object({\n        foo_ref_enum: z.optional(zModelWithNestedArrayEnumsDataFoo),\n        foo_all_of_enum: zModelWithNestedArrayEnumsDataFoo,\n        cursor: z.nullable(z.string())\n    }),\n    headers: z.object({\n        parameterHeader: z.nullable(z.string())\n    })\n});\n\nexport const zCallWithWeirdParameterNamesData = z.object({\n    body: z.nullable(zModelWithString),\n    path: z.object({\n        'parameter.path.1': z.optional(z.string()),\n        'parameter-path-2': z.optional(z.string()),\n        'PARAMETER-PATH-3': z.optional(z.string()),\n        'api-version': z.nullable(z.string())\n    }),\n    query: z.object({\n        default: z.optional(z.string()),\n        'parameter-query': z.nullable(z.string())\n    }),\n    headers: z.object({\n        'parameter.header': z.nullable(z.string())\n    })\n});\n\nexport const zGetCallWithOptionalParamData = z.object({\n    body: zModelWithOneOfEnum,\n    path: z.optional(z.never()),\n    query: z.optional(z.object({\n        page: z.optional(z.number())\n    }))\n});\n\nexport const zPostCallWithOptionalParamData = z.object({\n    body: z.optional(z.object({\n        offset: z.nullish(z.number())\n    })),\n    path: z.optional(z.never()),\n    query: z.object({\n        parameter: zPageable\n    })\n});\n\nexport const zPostCallWithOptionalParamResponse = z.union([\n    z.number(),\n    z.void()\n]);\n\nexport const zPostApiVbyApiVersionRequestBodyData = z.object({\n    body: z.optional(zSimpleRequestBody),\n    path: z.optional(z.never()),\n    query: z.optional(z.object({\n        parameter: z.optional(z.string())\n    }))\n});\n\nexport const zPostApiVbyApiVersionFormDataData = z.object({\n    body: z.optional(zSimpleFormData),\n    path: z.optional(z.never()),\n    query: z.optional(z.object({\n        parameter: z.optional(z.string())\n    }))\n});\n\nexport const zCallWithDefaultParametersData = z.object({\n    body: z.optional(z.never()),\n    path: z.optional(z.never()),\n    query: z.optional(z.object({\n        parameterString: z._default(z.nullish(z.string()), 'Hello World!'),\n        parameterNumber: z._default(z.nullish(z.number()), 123),\n        parameterBoolean: z._default(z.nullish(z.boolean()), true),\n        parameterEnum: z.optional(z.enum([\n            'Success',\n            'Warning',\n            'Error'\n        ])),\n        parameterModel: z.nullish(zModelWithString)\n    }))\n});\n\nexport const zCallWithDefaultOptionalParametersData = z.object({\n    body: z.optional(z.never()),\n    path: z.optional(z.never()),\n    query: z.optional(z.object({\n        parameterString: z._default(z.optional(z.string()), 'Hello World!'),\n        parameterNumber: z._default(z.optional(z.number()), 123),\n        parameterBoolean: z._default(z.optional(z.boolean()), true),\n        parameterEnum: z.optional(z.enum([\n            'Success',\n            'Warning',\n            'Error'\n        ])),\n        parameterModel: z.optional(zModelWithString)\n    }))\n});\n\nexport const zCallToTestOrderOfParamsData = z.object({\n    body: z.optional(z.never()),\n    path: z.optional(z.never()),\n    query: z.object({\n        parameterOptionalStringWithDefault: z._default(z.optional(z.string()), 'Hello World!'),\n        parameterOptionalStringWithEmptyDefault: z._default(z.optional(z.string()), ''),\n        parameterOptionalStringWithNoDefault: z.optional(z.string()),\n        parameterStringWithDefault: z._default(z.string(), 'Hello World!'),\n        parameterStringWithEmptyDefault: z._default(z.string(), ''),\n        parameterStringWithNoDefault: z.string(),\n        parameterStringNullableWithNoDefault: z.nullish(z.string()),\n        parameterStringNullableWithDefault: z._default(z.nullish(z.string()), null)\n    })\n});\n\nexport const zDuplicateNameData = z.object({\n    body: z.optional(z.never()),\n    path: z.optional(z.never()),\n    query: z.optional(z.never())\n});\n\nexport const zDuplicateName2Data = z.object({\n    body: z.optional(z.never()),\n    path: z.optional(z.never()),\n    query: z.optional(z.never())\n});\n\nexport const zDuplicateName3Data = z.object({\n    body: z.optional(z.never()),\n    path: z.optional(z.never()),\n    query: z.optional(z.never())\n});\n\nexport const zDuplicateName4Data = z.object({\n    body: z.optional(z.never()),\n    path: z.optional(z.never()),\n    query: z.optional(z.never())\n});\n\nexport const zCallWithNoContentResponseData = z.object({\n    body: z.optional(z.never()),\n    path: z.optional(z.never()),\n    query: z.optional(z.never())\n});\n\n/**\n * Success\n */\nexport const zCallWithNoContentResponseResponse = z.void();\n\nexport const zCallWithResponseAndNoContentResponseData = z.object({\n    body: z.optional(z.never()),\n    path: z.optional(z.never()),\n    query: z.optional(z.never())\n});\n\nexport const zCallWithResponseAndNoContentResponseResponse = z.union([\n    z.number(),\n    z.void()\n]);\n\nexport const zDummyAData = z.object({\n    body: z.optional(z.never()),\n    path: z.optional(z.never()),\n    query: z.optional(z.never())\n});\n\nexport const zDummyAResponse = z400;\n\nexport const zDummyBData = z.object({\n    body: z.optional(z.never()),\n    path: z.optional(z.never()),\n    query: z.optional(z.never())\n});\n\n/**\n * Success\n */\nexport const zDummyBResponse = z.void();\n\nexport const zCallWithResponseData = z.object({\n    body: z.optional(z.never()),\n    path: z.optional(z.never()),\n    query: z.optional(z.never())\n});\n\nexport const zCallWithResponseResponse = zImport;\n\nexport const zCallWithDuplicateResponsesData = z.object({\n    body: z.optional(z.never()),\n    path: z.optional(z.never()),\n    query: z.optional(z.never())\n});\n\nexport const zCallWithDuplicateResponsesResponse = z.union([\n    z.intersection(zModelWithBoolean, zModelWithInteger),\n    zModelWithString\n]);\n\nexport const zCallWithResponsesData = z.object({\n    body: z.optional(z.never()),\n    path: z.optional(z.never()),\n    query: z.optional(z.never())\n});\n\nexport const zCallWithResponsesResponse = z.union([\n    z.object({\n        '@namespace.string': z.optional(z.readonly(z.string())),\n        '@namespace.integer': z.optional(z.readonly(z.int())),\n        value: z.optional(z.readonly(z.array(zModelWithString)))\n    }),\n    zModelThatExtends,\n    zModelThatExtendsExtends\n]);\n\nexport const zCollectionFormatData = z.object({\n    body: z.optional(z.never()),\n    path: z.optional(z.never()),\n    query: z.object({\n        parameterArrayCSV: z.nullable(z.array(z.string())),\n        parameterArraySSV: z.nullable(z.array(z.string())),\n        parameterArrayTSV: z.nullable(z.array(z.string())),\n        parameterArrayPipes: z.nullable(z.array(z.string())),\n        parameterArrayMulti: z.nullable(z.array(z.string()))\n    })\n});\n\nexport const zTypesData = z.object({\n    body: z.optional(z.never()),\n    path: z.optional(z.object({\n        id: z.optional(z.int().check(z.minimum(-2147483648, { error: 'Invalid value: Expected int32 to be >= -2147483648' }), z.maximum(2147483647, { error: 'Invalid value: Expected int32 to be <= 2147483647' })))\n    })),\n    query: z.object({\n        parameterNumber: z._default(z.number(), 123),\n        parameterString: z._default(z.nullable(z.string()), 'default'),\n        parameterBoolean: z._default(z.nullable(z.boolean()), true),\n        parameterObject: z._default(z.nullable(z.record(z.string(), z.unknown())), null),\n        parameterArray: z.nullable(z.array(z.string())),\n        parameterDictionary: z.nullable(z.record(z.string(), z.unknown())),\n        parameterEnum: z.enum([\n            'Success',\n            'Warning',\n            'Error'\n        ])\n    })\n});\n\nexport const zTypesResponse = z.union([\n    z.number(),\n    z.string(),\n    z.boolean(),\n    z.record(z.string(), z.unknown())\n]);\n\nexport const zUploadFileData = z.object({\n    body: z.string(),\n    path: z.object({\n        'api-version': z.nullable(z.string())\n    }),\n    query: z.optional(z.never())\n});\n\nexport const zUploadFileResponse = z.boolean();\n\nexport const zFileResponseData = z.object({\n    body: z.optional(z.never()),\n    path: z.object({\n        id: z.string(),\n        'api-version': z.string()\n    }),\n    query: z.optional(z.never())\n});\n\n/**\n * Success\n */\nexport const zFileResponseResponse = z.string();\n\nexport const zComplexTypesData = z.object({\n    body: z.optional(z.never()),\n    path: z.optional(z.never()),\n    query: z.object({\n        parameterObject: z.object({\n            first: z.optional(z.object({\n                second: z.optional(z.object({\n                    third: z.optional(z.string())\n                }))\n            }))\n        }),\n        parameterReference: zModelWithString\n    })\n});\n\n/**\n * Successful response\n */\nexport const zComplexTypesResponse = z.array(zModelWithString);\n\nexport const zMultipartResponseData = z.object({\n    body: z.optional(z.never()),\n    path: z.optional(z.never()),\n    query: z.optional(z.never())\n});\n\n/**\n * OK\n */\nexport const zMultipartResponseResponse = z.object({\n    file: z.optional(z.string()),\n    metadata: z.optional(z.object({\n        foo: z.optional(z.string()),\n        bar: z.optional(z.string())\n    }))\n});\n\nexport const zMultipartRequestData = z.object({\n    body: z.optional(z.object({\n        content: z.optional(z.string()),\n        data: z.nullish(zModelWithString)\n    })),\n    path: z.optional(z.never()),\n    query: z.optional(z.never())\n});\n\nexport const zComplexParamsData = z.object({\n    body: z.optional(z.object({\n        key: z.nullable(z.readonly(z.string().check(z.maxLength(64), z.regex(/^[a-zA-Z0-9_]*$/)))),\n        name: z.nullable(z.string().check(z.maxLength(255))),\n        enabled: z._default(z.optional(z.boolean()), true),\n        type: z.enum([\n            'Monkey',\n            'Horse',\n            'Bird'\n        ]),\n        listOfModels: z.nullish(z.array(zModelWithString)),\n        listOfStrings: z.nullish(z.array(z.string())),\n        parameters: z.union([\n            zModelWithString,\n            zModelWithEnum,\n            zModelWithArray,\n            zModelWithDictionary\n        ]),\n        user: z.optional(z.readonly(z.object({\n            id: z.optional(z.readonly(z.int().check(z.minimum(-2147483648, { error: 'Invalid value: Expected int32 to be >= -2147483648' }), z.maximum(2147483647, { error: 'Invalid value: Expected int32 to be <= 2147483647' })))),\n            name: z.nullish(z.readonly(z.string()))\n        })))\n    })),\n    path: z.object({\n        id: z.int().check(z.minimum(-2147483648, { error: 'Invalid value: Expected int32 to be >= -2147483648' }), z.maximum(2147483647, { error: 'Invalid value: Expected int32 to be <= 2147483647' })),\n        'api-version': z.string()\n    }),\n    query: z.optional(z.never())\n});\n\n/**\n * Success\n */\nexport const zComplexParamsResponse = zModelWithString;\n\nexport const zCallWithResultFromHeaderData = z.object({\n    body: z.optional(z.never()),\n    path: z.optional(z.never()),\n    query: z.optional(z.never())\n});\n\nexport const zTestErrorCodeData = z.object({\n    body: z.optional(z.never()),\n    path: z.optional(z.never()),\n    query: z.object({\n        status: z.int()\n    })\n});\n\nexport const zNonAsciiæøåÆøÅöôêÊ字符串Data = z.object({\n    body: z.optional(z.never()),\n    path: z.optional(z.never()),\n    query: z.object({\n        nonAsciiParamæøåÆØÅöôêÊ: z.int()\n    })\n});\n\n/**\n * Successful response\n */\nexport const zNonAsciiæøåÆøÅöôêÊ字符串Response = z.array(zNonAsciiStringæøåÆøÅöôêÊ字符串);\n\nexport const zPutWithFormUrlEncodedData = z.object({\n    body: zArrayWithStrings,\n    path: z.optional(z.never()),\n    query: z.optional(z.never())\n});\n"
  },
  {
    "path": "packages/openapi-ts-tests/zod/v4/__snapshots__/3.0.x/mini/enum-null/zod.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport * as z from 'zod/mini';\n\nexport const zFoo = z.nullable(z.enum(['foo', 'bar']));\n\nexport const zBar = z.enum(['foo', 'bar']);\n\nexport const zBaz = z.enum(['foo', 'bar']);\n"
  },
  {
    "path": "packages/openapi-ts-tests/zod/v4/__snapshots__/3.0.x/mini/type-format/client/client.gen.ts",
    "content": "// 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 (options: RequestOptions) => {\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 url = buildUrl(opts);\n\n    return { opts, url };\n  };\n\n  const request: Client['request'] = async (options) => {\n    // @ts-expect-error\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"
  },
  {
    "path": "packages/openapi-ts-tests/zod/v4/__snapshots__/3.0.x/mini/type-format/client/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type { Auth } from '../core/auth.gen';\nexport type { QuerySerializerOptions } from '../core/bodySerializer.gen';\nexport {\n  formDataBodySerializer,\n  jsonBodySerializer,\n  urlSearchParamsBodySerializer,\n} from '../core/bodySerializer.gen';\nexport { buildClientParams } from '../core/params.gen';\nexport { serializeQueryKeyValue } from '../core/queryKeySerializer.gen';\nexport { createClient } from './client.gen';\nexport type {\n  Client,\n  ClientOptions,\n  Config,\n  CreateClientConfig,\n  Options,\n  RequestOptions,\n  RequestResult,\n  ResolvedRequestOptions,\n  ResponseStyle,\n  TDataShape,\n} from './types.gen';\nexport { createConfig, mergeHeaders } from './utils.gen';\n"
  },
  {
    "path": "packages/openapi-ts-tests/zod/v4/__snapshots__/3.0.x/mini/type-format/client/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { Auth } from '../core/auth.gen';\nimport type {\n  ServerSentEventsOptions,\n  ServerSentEventsResult,\n} from '../core/serverSentEvents.gen';\nimport type { Client as CoreClient, Config as CoreConfig } from '../core/types.gen';\nimport type { Middleware } from './utils.gen';\n\nexport type ResponseStyle = 'data' | 'fields';\n\nexport interface Config<T extends ClientOptions = ClientOptions>\n  extends Omit<RequestInit, 'body' | 'headers' | 'method'>, CoreConfig {\n  /**\n   * Base URL for all requests made by this client.\n   */\n  baseUrl?: T['baseUrl'];\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   * Please don't use the Fetch client for Next.js applications. The `next`\n   * options won't have any effect.\n   *\n   * Install {@link https://www.npmjs.com/package/@hey-api/client-next `@hey-api/client-next`} instead.\n   */\n  next?: never;\n  /**\n   * Return the response data parsed in a specified format. By default, `auto`\n   * will infer the appropriate method from the `Content-Type` response header.\n   * You can override this behavior with any of the {@link Body} methods.\n   * Select `stream` if you don't want to parse response data at all.\n   *\n   * @default 'auto'\n   */\n  parseAs?: 'arrayBuffer' | 'auto' | 'blob' | 'formData' | 'json' | 'stream' | 'text';\n  /**\n   * Should we return only data or multiple fields (data, error, response, etc.)?\n   *\n   * @default 'fields'\n   */\n  responseStyle?: ResponseStyle;\n  /**\n   * Throw an error instead of returning it in the response?\n   *\n   * @default false\n   */\n  throwOnError?: T['throwOnError'];\n}\n\nexport interface RequestOptions<\n  TData = unknown,\n  TResponseStyle extends ResponseStyle = 'fields',\n  ThrowOnError extends boolean = boolean,\n  Url extends string = string,\n>\n  extends\n    Config<{\n      responseStyle: TResponseStyle;\n      throwOnError: ThrowOnError;\n    }>,\n    Pick<\n      ServerSentEventsOptions<TData>,\n      | 'onRequest'\n      | 'onSseError'\n      | 'onSseEvent'\n      | 'sseDefaultRetryDelay'\n      | 'sseMaxRetryAttempts'\n      | 'sseMaxRetryDelay'\n    > {\n  /**\n   * Any body that you want to add to your request.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/fetch#body}\n   */\n  body?: unknown;\n  path?: Record<string, unknown>;\n  query?: Record<string, unknown>;\n  /**\n   * Security mechanism(s) to use for the request.\n   */\n  security?: ReadonlyArray<Auth>;\n  url: Url;\n}\n\nexport interface ResolvedRequestOptions<\n  TResponseStyle extends ResponseStyle = 'fields',\n  ThrowOnError extends boolean = boolean,\n  Url extends string = string,\n> extends RequestOptions<unknown, TResponseStyle, ThrowOnError, Url> {\n  serializedBody?: string;\n}\n\nexport type RequestResult<\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = boolean,\n  TResponseStyle extends ResponseStyle = 'fields',\n> = ThrowOnError extends true\n  ? Promise<\n      TResponseStyle extends 'data'\n        ? TData extends Record<string, unknown>\n          ? TData[keyof TData]\n          : TData\n        : {\n            data: TData extends Record<string, unknown> ? TData[keyof TData] : TData;\n            request: Request;\n            response: Response;\n          }\n    >\n  : Promise<\n      TResponseStyle extends 'data'\n        ? (TData extends Record<string, unknown> ? TData[keyof TData] : TData) | undefined\n        : (\n            | {\n                data: TData extends Record<string, unknown> ? TData[keyof TData] : TData;\n                error: undefined;\n              }\n            | {\n                data: undefined;\n                error: TError extends Record<string, unknown> ? TError[keyof TError] : TError;\n              }\n          ) & {\n            request: Request;\n            response: Response;\n          }\n    >;\n\nexport interface ClientOptions {\n  baseUrl?: string;\n  responseStyle?: ResponseStyle;\n  throwOnError?: boolean;\n}\n\ntype MethodFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'>,\n) => RequestResult<TData, TError, ThrowOnError, TResponseStyle>;\n\ntype SseFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'>,\n) => Promise<ServerSentEventsResult<TData, TError>>;\n\ntype RequestFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'> &\n    Pick<Required<RequestOptions<TData, TResponseStyle, ThrowOnError>>, 'method'>,\n) => RequestResult<TData, TError, ThrowOnError, TResponseStyle>;\n\ntype BuildUrlFn = <\n  TData extends {\n    body?: unknown;\n    path?: Record<string, unknown>;\n    query?: Record<string, unknown>;\n    url: string;\n  },\n>(\n  options: TData & Options<TData>,\n) => string;\n\nexport type Client = CoreClient<RequestFn, Config, MethodFn, BuildUrlFn, SseFn> & {\n  interceptors: Middleware<Request, Response, unknown, ResolvedRequestOptions>;\n};\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 = ClientOptions> = (\n  override?: Config<ClientOptions & T>,\n) => Config<Required<ClientOptions> & T>;\n\nexport interface TDataShape {\n  body?: unknown;\n  headers?: unknown;\n  path?: unknown;\n  query?: unknown;\n  url: string;\n}\n\ntype OmitKeys<T, K> = Pick<T, Exclude<keyof T, K>>;\n\nexport type Options<\n  TData extends TDataShape = TDataShape,\n  ThrowOnError extends boolean = boolean,\n  TResponse = unknown,\n  TResponseStyle extends ResponseStyle = 'fields',\n> = OmitKeys<\n  RequestOptions<TResponse, TResponseStyle, ThrowOnError>,\n  'body' | 'path' | 'query' | 'url'\n> &\n  ([TData] extends [never] ? unknown : Omit<TData, 'url'>);\n"
  },
  {
    "path": "packages/openapi-ts-tests/zod/v4/__snapshots__/3.0.x/mini/type-format/client/utils.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/zod/v4/__snapshots__/3.0.x/mini/type-format/client.gen.ts",
    "content": "// 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>());\n"
  },
  {
    "path": "packages/openapi-ts-tests/zod/v4/__snapshots__/3.0.x/mini/type-format/core/auth.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/zod/v4/__snapshots__/3.0.x/mini/type-format/core/bodySerializer.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/zod/v4/__snapshots__/3.0.x/mini/type-format/core/params.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/zod/v4/__snapshots__/3.0.x/mini/type-format/core/pathSerializer.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/zod/v4/__snapshots__/3.0.x/mini/type-format/core/queryKeySerializer.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\n/**\n * JSON-friendly union that mirrors what Pinia Colada can hash.\n */\nexport type JsonValue =\n  | null\n  | string\n  | number\n  | boolean\n  | JsonValue[]\n  | { [key: string]: JsonValue };\n\n/**\n * Replacer that converts non-JSON values (bigint, Date, etc.) to safe substitutes.\n */\nexport const queryKeyJsonReplacer = (_key: string, value: unknown) => {\n  if (value === undefined || typeof value === 'function' || typeof value === 'symbol') {\n    return undefined;\n  }\n  if (typeof value === 'bigint') {\n    return value.toString();\n  }\n  if (value instanceof Date) {\n    return value.toISOString();\n  }\n  return value;\n};\n\n/**\n * Safely stringifies a value and parses it back into a JsonValue.\n */\nexport const stringifyToJsonValue = (input: unknown): JsonValue | undefined => {\n  try {\n    const json = JSON.stringify(input, queryKeyJsonReplacer);\n    if (json === undefined) {\n      return undefined;\n    }\n    return JSON.parse(json) as JsonValue;\n  } catch {\n    return undefined;\n  }\n};\n\n/**\n * Detects plain objects (including objects with a null prototype).\n */\nconst isPlainObject = (value: unknown): value is Record<string, unknown> => {\n  if (value === null || typeof value !== 'object') {\n    return false;\n  }\n  const prototype = Object.getPrototypeOf(value as object);\n  return prototype === Object.prototype || prototype === null;\n};\n\n/**\n * Turns URLSearchParams into a sorted JSON object for deterministic keys.\n */\nconst serializeSearchParams = (params: URLSearchParams): JsonValue => {\n  const entries = Array.from(params.entries()).sort(([a], [b]) => a.localeCompare(b));\n  const result: Record<string, JsonValue> = {};\n\n  for (const [key, value] of entries) {\n    const existing = result[key];\n    if (existing === undefined) {\n      result[key] = value;\n      continue;\n    }\n\n    if (Array.isArray(existing)) {\n      (existing as string[]).push(value);\n    } else {\n      result[key] = [existing, value];\n    }\n  }\n\n  return result;\n};\n\n/**\n * Normalizes any accepted value into a JSON-friendly shape for query keys.\n */\nexport const serializeQueryKeyValue = (value: unknown): JsonValue | undefined => {\n  if (value === null) {\n    return null;\n  }\n\n  if (typeof value === 'string' || typeof value === 'number' || typeof value === 'boolean') {\n    return value;\n  }\n\n  if (value === undefined || typeof value === 'function' || typeof value === 'symbol') {\n    return undefined;\n  }\n\n  if (typeof value === 'bigint') {\n    return value.toString();\n  }\n\n  if (value instanceof Date) {\n    return value.toISOString();\n  }\n\n  if (Array.isArray(value)) {\n    return stringifyToJsonValue(value);\n  }\n\n  if (typeof URLSearchParams !== 'undefined' && value instanceof URLSearchParams) {\n    return serializeSearchParams(value);\n  }\n\n  if (isPlainObject(value)) {\n    return stringifyToJsonValue(value);\n  }\n\n  return undefined;\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/zod/v4/__snapshots__/3.0.x/mini/type-format/core/serverSentEvents.gen.ts",
    "content": "// 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 const 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            // Normalize line endings: CRLF -> LF, then CR -> LF\n            buffer = buffer.replace(/\\r\\n/g, '\\n').replace(/\\r/g, '\\n');\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"
  },
  {
    "path": "packages/openapi-ts-tests/zod/v4/__snapshots__/3.0.x/mini/type-format/core/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { Auth, AuthToken } from './auth.gen';\nimport type { BodySerializer, QuerySerializer, QuerySerializerOptions } from './bodySerializer.gen';\n\nexport type HttpMethod =\n  | 'connect'\n  | 'delete'\n  | 'get'\n  | 'head'\n  | 'options'\n  | 'patch'\n  | 'post'\n  | 'put'\n  | 'trace';\n\nexport type Client<\n  RequestFn = never,\n  Config = unknown,\n  MethodFn = never,\n  BuildUrlFn = never,\n  SseFn = never,\n> = {\n  /**\n   * Returns the final request URL.\n   */\n  buildUrl: BuildUrlFn;\n  getConfig: () => Config;\n  request: RequestFn;\n  setConfig: (config: Config) => Config;\n} & {\n  [K in HttpMethod]: MethodFn;\n} & ([SseFn] extends [never] ? { sse?: never } : { sse: { [K in HttpMethod]: SseFn } });\n\nexport interface Config {\n  /**\n   * Auth token or a function returning auth token. The resolved value will be\n   * added to the request payload as defined by its `security` array.\n   */\n  auth?: ((auth: Auth) => Promise<AuthToken> | AuthToken) | AuthToken;\n  /**\n   * A function for serializing request body parameter. By default,\n   * {@link JSON.stringify()} will be used.\n   */\n  bodySerializer?: BodySerializer | null;\n  /**\n   * An object containing any HTTP headers that you want to pre-populate your\n   * `Headers` object with.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/Headers/Headers#init See more}\n   */\n  headers?:\n    | RequestInit['headers']\n    | Record<\n        string,\n        string | number | boolean | (string | number | boolean)[] | null | undefined | unknown\n      >;\n  /**\n   * The request method.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/fetch#method See more}\n   */\n  method?: Uppercase<HttpMethod>;\n  /**\n   * A function for serializing request query parameters. By default, arrays\n   * will be exploded in form style, objects will be exploded in deepObject\n   * style, and reserved characters are percent-encoded.\n   *\n   * This method will have no effect if the native `paramsSerializer()` Axios\n   * API function is used.\n   *\n   * {@link https://swagger.io/docs/specification/serialization/#query View examples}\n   */\n  querySerializer?: QuerySerializer | QuerySerializerOptions;\n  /**\n   * A function validating request data. This is useful if you want to ensure\n   * the request conforms to the desired shape, so it can be safely sent to\n   * the server.\n   */\n  requestValidator?: (data: unknown) => Promise<unknown>;\n  /**\n   * A function transforming response data before it's returned. This is useful\n   * for post-processing data, e.g. converting ISO strings into Date objects.\n   */\n  responseTransformer?: (data: unknown) => Promise<unknown>;\n  /**\n   * A function validating response data. This is useful if you want to ensure\n   * the response conforms to the desired shape, so it can be safely passed to\n   * the transformers and returned to the user.\n   */\n  responseValidator?: (data: unknown) => Promise<unknown>;\n}\n\ntype IsExactlyNeverOrNeverUndefined<T> = [T] extends [never]\n  ? true\n  : [T] extends [never | undefined]\n    ? [undefined] extends [T]\n      ? false\n      : true\n    : false;\n\nexport type OmitNever<T extends Record<string, unknown>> = {\n  [K in keyof T as IsExactlyNeverOrNeverUndefined<T[K]> extends true ? never : K]: T[K];\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/zod/v4/__snapshots__/3.0.x/mini/type-format/core/utils.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/zod/v4/__snapshots__/3.0.x/mini/type-format/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport { type Options, postFoo } from './sdk.gen';\nexport type { Bar, ClientOptions, Foo, PostFooData, PostFooResponse, PostFooResponses, TypeID, UserId } from './types.gen';\n"
  },
  {
    "path": "packages/openapi-ts-tests/zod/v4/__snapshots__/3.0.x/mini/type-format/sdk.gen.ts",
    "content": "// 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 { postFooResponseTransformer } from './transformers.gen';\nimport type { PostFooData, PostFooResponses } from './types.gen';\nimport { zPostFooData, zPostFooResponse } from './zod.gen';\n\nexport type Options<TData extends TDataShape = TDataShape, ThrowOnError extends boolean = boolean> = Options2<TData, ThrowOnError> & {\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\nexport const postFoo = <ThrowOnError extends boolean = false>(options?: Options<PostFooData, ThrowOnError>) => (options?.client ?? client).post<PostFooResponses, unknown, ThrowOnError>({\n    requestValidator: async (data) => await zPostFooData.parseAsync(data),\n    responseTransformer: postFooResponseTransformer,\n    responseValidator: async (data) => await zPostFooResponse.parseAsync(data),\n    url: '/foo',\n    ...options\n});\n"
  },
  {
    "path": "packages/openapi-ts-tests/zod/v4/__snapshots__/3.0.x/mini/type-format/transformers.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { PostFooResponse } from './types.gen';\n\nconst fooSchemaResponseTransformer = (data: any) => {\n    data.foo = BigInt(data.foo.toString());\n    return data;\n};\n\nexport const postFooResponseTransformer = async (data: any): Promise<PostFooResponse> => {\n    data = fooSchemaResponseTransformer(data);\n    return data;\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/zod/v4/__snapshots__/3.0.x/mini/type-format/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type ClientOptions = {\n    baseUrl: `${string}://${string}` | (string & {});\n};\n\nexport type TypeID<T extends string> = `${T}_${string}`;\n\nexport type UserId = TypeID<'user'>;\n\nexport type Foo = {\n    bar?: number;\n    foo: bigint;\n    id: UserId;\n};\n\nexport type Bar = {\n    foo: number;\n    [key: string]: number;\n};\n\nexport type PostFooData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/foo';\n};\n\nexport type PostFooResponses = {\n    /**\n     * OK\n     */\n    200: Foo;\n};\n\nexport type PostFooResponse = PostFooResponses[keyof PostFooResponses];\n"
  },
  {
    "path": "packages/openapi-ts-tests/zod/v4/__snapshots__/3.0.x/mini/type-format/zod.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport * as z from 'zod/mini';\n\nexport const zFoo = z.object({\n    bar: z.optional(z.int()),\n    foo: z._default(z.coerce.bigint().check(z.minimum(BigInt('-9223372036854775808'), { error: 'Invalid value: Expected int64 to be >= -9223372036854775808' }), z.maximum(BigInt('9223372036854775807'), { error: 'Invalid value: Expected int64 to be <= 9223372036854775807' })), BigInt(0)),\n    id: z.string()\n});\n\nexport const zBar = z.object({\n    foo: z.int()\n});\n\nexport const zPostFooData = z.object({\n    body: z.optional(z.never()),\n    path: z.optional(z.never()),\n    query: z.optional(z.never())\n});\n\n/**\n * OK\n */\nexport const zPostFooResponse = zFoo;\n"
  },
  {
    "path": "packages/openapi-ts-tests/zod/v4/__snapshots__/3.0.x/mini/validators/zod.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport * as z from 'zod/mini';\n\nexport const zBaz = z._default(z.readonly(z.string().check(z.regex(/foo\\nbar/))), 'baz');\n\nexport const zFoo = z._default(z.nullable(z.object({\n    foo: z.optional(z.string().check(z.regex(/^\\d{3}-\\d{2}-\\d{4}$/))),\n    bar: z.optional(z.lazy((): any => zBar)),\n    baz: z.optional(z.array(z.lazy((): any => zFoo))),\n    qux: z._default(z.optional(z.int().check(z.gt(0))), 0)\n})), null);\n\nexport const zBar = z.object({\n    foo: z.optional(zFoo)\n});\n"
  },
  {
    "path": "packages/openapi-ts-tests/zod/v4/__snapshots__/3.0.x/v3/array-items-all-of/zod.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport { z } from 'zod/v3';\n\nexport const zArrayWithAllOfObjects = z.array(z.object({\n    id: z.number().int().optional()\n}).and(z.object({\n    name: z.string().optional()\n})));\n\nexport const zArrayWithAllOfPrimitives = z.array(z.intersection(z.number(), z.string()));\n\nexport const zBaseModel = z.object({\n    id: z.number().int().optional(),\n    createdAt: z.string().datetime().optional()\n});\n\nexport const zArrayWithAllOfRefs = z.array(zBaseModel.and(z.object({\n    extra: z.string().optional()\n})));\n"
  },
  {
    "path": "packages/openapi-ts-tests/zod/v4/__snapshots__/3.0.x/v3/array-items-one-of-length-1/zod.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport { z } from 'zod/v3';\n\nexport const zBar = z.string();\n\nexport const zFoo = z.object({\n    foo: z.array(zBar).min(1).max(2147483647).optional()\n});\n"
  },
  {
    "path": "packages/openapi-ts-tests/zod/v4/__snapshots__/3.0.x/v3/circular/zod.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport { z } from 'zod/v3';\n\nexport const zFoo: z.AnyZodObject = z.object({\n    quux: z.lazy(() => zQuux).optional()\n});\n\nexport const zBar: z.AnyZodObject = z.object({\n    bar: z.lazy(() => zBar).optional(),\n    baz: z.lazy(() => zBaz).optional()\n});\n\nexport const zBaz: z.AnyZodObject = z.object({\n    quux: z.lazy(() => zQuux).optional()\n});\n\nexport const zQux: z.ZodTypeAny = z.union([\n    z.object({\n        type: z.literal('struct')\n    }).and(z.lazy(() => zCorge)),\n    z.object({\n        type: z.literal('array')\n    }).and(zFoo)\n]);\n\nexport const zQuux = z.object({\n    qux: zQux.optional()\n});\n\nexport const zCorge = z.object({\n    baz: z.array(zBaz).optional()\n});\n"
  },
  {
    "path": "packages/openapi-ts-tests/zod/v4/__snapshots__/3.0.x/v3/default/zod.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport { z } from 'zod/v3';\n\n/**\n * Model with number-only name\n */\nexport const z400 = z.string();\n\n/**\n * Testing multiline comments in string: First line\n * Second line\n *\n * Fourth line\n */\nexport const zCamelCaseCommentWithBreaks = z.number().int();\n\n/**\n * Testing multiline comments in string: First line\n * Second line\n *\n * Fourth line\n */\nexport const zCommentWithBreaks = z.number().int();\n\n/**\n * Testing backticks in string: `backticks` and ```multiple backticks``` should work\n */\nexport const zCommentWithBackticks = z.number().int();\n\n/**\n * Testing backticks and quotes in string: `backticks`, 'quotes', \"double quotes\" and ```multiple backticks``` should work\n */\nexport const zCommentWithBackticksAndQuotes = z.number().int();\n\n/**\n * Testing slashes in string: \\backwards\\\\\\ and /forwards/// should work\n */\nexport const zCommentWithSlashes = z.number().int();\n\n/**\n * Testing expression placeholders in string: ${expression} should work\n */\nexport const zCommentWithExpressionPlaceholders = z.number().int();\n\n/**\n * Testing quotes in string: 'single quote''' and \"double quotes\"\"\" should work\n */\nexport const zCommentWithQuotes = z.number().int();\n\n/**\n * Testing reserved characters in string: * inline * and ** inline ** should work\n */\nexport const zCommentWithReservedCharacters = z.number().int();\n\n/**\n * This is a simple number\n */\nexport const zSimpleInteger = z.number().int();\n\n/**\n * This is a simple boolean\n */\nexport const zSimpleBoolean = z.boolean();\n\n/**\n * This is a simple string\n */\nexport const zSimpleString = z.string();\n\n/**\n * A string with non-ascii (unicode) characters valid in typescript identifiers (æøåÆØÅöÔèÈ字符串)\n */\nexport const zNonAsciiStringæøåÆøÅöôêÊ字符串 = z.string();\n\n/**\n * This is a simple file\n */\nexport const zSimpleFile = z.string();\n\n/**\n * This is a simple string\n */\nexport const zSimpleStringWithPattern = z.string().max(64).regex(/^[a-zA-Z0-9_]*$/).nullable();\n\n/**\n * This is a simple enum with strings\n */\nexport const zEnumWithStrings = z.enum([\n    'Success',\n    'Warning',\n    'Error',\n    '\\'Single Quote\\'',\n    '\"Double Quotes\"',\n    'Non-ascii: øæåôöØÆÅÔÖ字符串'\n]);\n\nexport const zEnumWithReplacedCharacters = z.union([\n    z.literal('\\'Single Quote\\''),\n    z.literal('\"Double Quotes\"'),\n    z.literal('øæåôöØÆÅÔÖ字符串'),\n    z.literal(3.1),\n    z.literal('')\n]);\n\n/**\n * This is a simple enum with numbers\n */\nexport const zEnumWithNumbers = z.union([\n    z.literal(1),\n    z.literal(2),\n    z.literal(3),\n    z.literal(1.1),\n    z.literal(1.2),\n    z.literal(1.3),\n    z.literal(100),\n    z.literal(200),\n    z.literal(300),\n    z.literal(-100),\n    z.literal(-200),\n    z.literal(-300),\n    z.literal(-1.1),\n    z.literal(-1.2),\n    z.literal(-1.3)\n]);\n\n/**\n * Success=1,Warning=2,Error=3\n */\nexport const zEnumFromDescription = z.number();\n\n/**\n * This is a simple enum with numbers\n */\nexport const zEnumWithExtensions = z.union([\n    z.literal(200),\n    z.literal(400),\n    z.literal(500)\n]);\n\nexport const zEnumWithXEnumNames = z.union([\n    z.literal(0),\n    z.literal(1),\n    z.literal(2)\n]);\n\n/**\n * This is a simple array with numbers\n */\nexport const zArrayWithNumbers = z.array(z.number().int());\n\n/**\n * This is a simple array with booleans\n */\nexport const zArrayWithBooleans = z.array(z.boolean());\n\n/**\n * This is a simple array with strings\n */\nexport const zArrayWithStrings = z.array(z.string()).default(['test']);\n\n/**\n * This is a simple array with properties\n */\nexport const zArrayWithProperties = z.array(z.object({\n    '16x16': zCamelCaseCommentWithBreaks.optional(),\n    bar: z.string().optional()\n}));\n\n/**\n * This is a simple array with any of properties\n */\nexport const zArrayWithAnyOfProperties = z.array(z.union([z.object({\n        foo: z.string().optional().default('test')\n    }), z.object({\n        bar: z.string().optional()\n    })]));\n\nexport const zAnyOfAnyAndNull = z.object({\n    data: z.unknown().optional()\n});\n\n/**\n * This is a simple array with any of properties\n */\nexport const zAnyOfArrays = z.object({\n    results: z.array(z.union([z.object({\n            foo: z.string().optional()\n        }), z.object({\n            bar: z.string().optional()\n        })])).optional()\n});\n\n/**\n * This is a string dictionary\n */\nexport const zDictionaryWithString = z.record(z.string());\n\nexport const zDictionaryWithPropertiesAndAdditionalProperties = z.object({\n    foo: z.number().optional(),\n    bar: z.boolean().optional()\n});\n\n/**\n * This is a string dictionary\n */\nexport const zDictionaryWithDictionary = z.record(z.record(z.string()));\n\n/**\n * This is a complex dictionary\n */\nexport const zDictionaryWithProperties = z.record(z.object({\n    foo: z.string().optional(),\n    bar: z.string().optional()\n}));\n\n/**\n * This is a model with one number property\n */\nexport const zModelWithInteger = z.object({\n    prop: z.number().int().optional()\n});\n\n/**\n * This is a model with one boolean property\n */\nexport const zModelWithBoolean = z.object({\n    prop: z.boolean().optional()\n});\n\n/**\n * This is a model with one string property\n */\nexport const zModelWithString = z.object({\n    prop: z.string().optional()\n});\n\n/**\n * This is a simple reference\n */\nexport const zSimpleReference = zModelWithString;\n\n/**\n * This is a simple array with references\n */\nexport const zArrayWithReferences = z.array(zModelWithString);\n\n/**\n * This is a simple array containing an array\n */\nexport const zArrayWithArray = z.array(z.array(zModelWithString));\n\n/**\n * This is a string reference\n */\nexport const zDictionaryWithReference = z.record(zModelWithString);\n\n/**\n * This is a complex dictionary\n */\nexport const zDictionaryWithArray = z.record(z.array(zModelWithString));\n\n/**\n * This is a model with one string property\n */\nexport const zModelWithStringError = z.object({\n    prop: z.string().optional()\n});\n\n/**\n * `Comment` or `VoiceComment`. The JSON object for adding voice comments to tickets is different. See [Adding voice comments to tickets](/documentation/ticketing/managing-tickets/adding-voice-comments-to-tickets)\n */\nexport const zModelFromZendesk = z.string();\n\n/**\n * This is a model with one string property\n */\nexport const zModelWithNullableString = z.object({\n    nullableProp1: z.string().nullish(),\n    nullableRequiredProp1: z.string().nullable(),\n    nullableProp2: z.string().nullish(),\n    nullableRequiredProp2: z.string().nullable(),\n    'foo_bar-enum': z.enum([\n        'Success',\n        'Warning',\n        'Error',\n        'ØÆÅ字符串'\n    ]).optional()\n});\n\n/**\n * This is a model with one enum\n */\nexport const zModelWithEnum = z.object({\n    'foo_bar-enum': z.enum([\n        'Success',\n        'Warning',\n        'Error',\n        'ØÆÅ字符串'\n    ]).optional(),\n    statusCode: z.enum([\n        '100',\n        '200 FOO',\n        '300 FOO_BAR',\n        '400 foo-bar',\n        '500 foo.bar',\n        '600 foo&bar'\n    ]).optional(),\n    bool: z.literal(true).optional()\n});\n\n/**\n * This is a model with one enum with escaped name\n */\nexport const zModelWithEnumWithHyphen = z.object({\n    'foo-bar-baz-qux': z.enum(['3.0']).optional()\n});\n\n/**\n * This is a model with one enum\n */\nexport const zModelWithEnumFromDescription = z.object({\n    test: z.number().int().optional()\n});\n\n/**\n * This is a model with nested enums\n */\nexport const zModelWithNestedEnums = z.object({\n    dictionaryWithEnum: z.record(z.enum([\n        'Success',\n        'Warning',\n        'Error'\n    ])).optional(),\n    dictionaryWithEnumFromDescription: z.record(z.number().int()).optional(),\n    arrayWithEnum: z.array(z.enum([\n        'Success',\n        'Warning',\n        'Error'\n    ])).optional(),\n    arrayWithDescription: z.array(z.number().int()).optional(),\n    'foo_bar-enum': z.enum([\n        'Success',\n        'Warning',\n        'Error',\n        'ØÆÅ字符串'\n    ]).optional()\n});\n\n/**\n * This is a model with one property containing an array\n */\nexport const zModelWithArray = z.object({\n    prop: z.array(zModelWithString).optional(),\n    propWithFile: z.array(z.string()).optional(),\n    propWithNumber: z.array(z.number()).optional()\n});\n\n/**\n * This is a model with one property containing a dictionary\n */\nexport const zModelWithDictionary = z.object({\n    prop: z.record(z.string()).optional()\n});\n\n/**\n * This is a deprecated model with a deprecated property\n *\n * @deprecated\n */\nexport const zDeprecatedModel = z.object({\n    prop: z.string().optional()\n});\n\n/**\n * This is a model with one property containing a circular reference\n */\nexport const zModelWithCircularReference: z.AnyZodObject = z.object({\n    prop: z.lazy(() => zModelWithCircularReference).optional()\n});\n\n/**\n * This is a model with one property with a 'one of' relationship\n */\nexport const zCompositionWithOneOf = z.object({\n    propA: z.union([\n        zModelWithString,\n        zModelWithEnum,\n        zModelWithArray,\n        zModelWithDictionary\n    ]).optional()\n});\n\n/**\n * This is a model with one property with a 'one of' relationship where the options are not $ref\n */\nexport const zCompositionWithOneOfAnonymous = z.object({\n    propA: z.union([\n        z.object({\n            propA: z.string().optional()\n        }),\n        z.string(),\n        z.number().int()\n    ]).optional()\n});\n\n/**\n * Circle\n */\nexport const zModelCircle = z.object({\n    kind: z.string(),\n    radius: z.number().optional()\n});\n\n/**\n * Square\n */\nexport const zModelSquare = z.object({\n    kind: z.string(),\n    sideLength: z.number().optional()\n});\n\n/**\n * This is a model with one property with a 'one of' relationship where the options are not $ref\n */\nexport const zCompositionWithOneOfDiscriminator = z.union([\n    z.object({\n        kind: z.literal('circle')\n    }).and(zModelCircle),\n    z.object({\n        kind: z.literal('square')\n    }).and(zModelSquare)\n]);\n\n/**\n * This is a model with one property with a 'any of' relationship\n */\nexport const zCompositionWithAnyOf = z.object({\n    propA: z.union([\n        zModelWithString,\n        zModelWithEnum,\n        zModelWithArray,\n        zModelWithDictionary\n    ]).optional()\n});\n\n/**\n * This is a model with one property with a 'any of' relationship where the options are not $ref\n */\nexport const zCompositionWithAnyOfAnonymous = z.object({\n    propA: z.union([\n        z.object({\n            propA: z.string().optional()\n        }),\n        z.string(),\n        z.number().int()\n    ]).optional()\n});\n\n/**\n * This is a model with nested 'any of' property with a type null\n */\nexport const zCompositionWithNestedAnyAndTypeNull = z.object({\n    propA: z.union([\n        z.array(zModelWithDictionary.nullable()),\n        z.array(zModelWithArray.nullable())\n    ]).optional()\n});\n\nexport const z3eNum1Период = z.enum(['Bird', 'Dog']);\n\nexport const zConstValue = z.enum(['ConstValue']);\n\n/**\n * This is a model with one property with a 'any of' relationship where the options are not $ref\n */\nexport const zCompositionWithNestedAnyOfAndNull = z.object({\n    propA: z.array(z.union([z3eNum1Период, zConstValue])).nullish()\n});\n\n/**\n * This is a model with one property with a 'one of' relationship\n */\nexport const zCompositionWithOneOfAndNullable = z.object({\n    propA: z.union([\n        z.object({\n            boolean: z.boolean().optional()\n        }),\n        zModelWithEnum,\n        zModelWithArray,\n        zModelWithDictionary\n    ]).nullish()\n});\n\n/**\n * This is a model that contains a simple dictionary within composition\n */\nexport const zCompositionWithOneOfAndSimpleDictionary = z.object({\n    propA: z.union([\n        z.boolean(),\n        z.record(z.number())\n    ]).optional()\n});\n\n/**\n * This is a model that contains a dictionary of simple arrays within composition\n */\nexport const zCompositionWithOneOfAndSimpleArrayDictionary = z.object({\n    propA: z.union([\n        z.boolean(),\n        z.record(z.array(z.boolean()))\n    ]).optional()\n});\n\n/**\n * This is a model that contains a dictionary of complex arrays (composited) within composition\n */\nexport const zCompositionWithOneOfAndComplexArrayDictionary = z.object({\n    propA: z.union([\n        z.boolean(),\n        z.record(z.array(z.union([z.number(), z.string()])))\n    ]).optional()\n});\n\n/**\n * This is a model with one property with a 'all of' relationship\n */\nexport const zCompositionWithAllOfAndNullable = z.object({\n    propA: z.object({\n        boolean: z.boolean().optional()\n    }).and(zModelWithEnum).and(zModelWithArray).and(zModelWithDictionary).nullish()\n});\n\n/**\n * This is a model with one property with a 'any of' relationship\n */\nexport const zCompositionWithAnyOfAndNullable = z.object({\n    propA: z.union([\n        z.object({\n            boolean: z.boolean().optional()\n        }),\n        zModelWithEnum,\n        zModelWithArray,\n        zModelWithDictionary\n    ]).nullish()\n});\n\n/**\n * This is a base model with two simple optional properties\n */\nexport const zCompositionBaseModel = z.object({\n    firstName: z.string().optional(),\n    lastname: z.string().optional()\n});\n\n/**\n * This is a model that extends the base model\n */\nexport const zCompositionExtendedModel = zCompositionBaseModel.and(z.object({\n    age: z.number(),\n    firstName: z.string(),\n    lastname: z.string()\n}));\n\n/**\n * This is a model with one nested property\n */\nexport const zModelWithProperties = z.object({\n    required: z.string(),\n    requiredAndReadOnly: z.string().readonly(),\n    requiredAndNullable: z.string().nullable(),\n    string: z.string().optional(),\n    number: z.number().optional(),\n    boolean: z.boolean().optional(),\n    reference: zModelWithString.optional(),\n    'property with space': z.string().optional(),\n    default: z.string().optional(),\n    try: z.string().optional(),\n    '@namespace.string': z.string().readonly().optional(),\n    '@namespace.integer': z.number().int().readonly().optional()\n});\n\n/**\n * This is a model with one property containing a reference\n */\nexport const zModelWithReference = z.object({\n    prop: zModelWithProperties.optional()\n});\n\n/**\n * This is a model with one nested property\n */\nexport const zModelWithNestedProperties = z.object({\n    first: z.object({\n        second: z.object({\n            third: z.string().readonly().nullable()\n        }).readonly().nullable()\n    }).readonly().nullable()\n});\n\n/**\n * This is a model with duplicated properties\n */\nexport const zModelWithDuplicateProperties = z.object({\n    prop: zModelWithString.optional()\n});\n\n/**\n * This is a model with ordered properties\n */\nexport const zModelWithOrderedProperties = z.object({\n    zebra: z.string().optional(),\n    apple: z.string().optional(),\n    hawaii: z.string().optional()\n});\n\n/**\n * This is a model with duplicated imports\n */\nexport const zModelWithDuplicateImports = z.object({\n    propA: zModelWithString.optional(),\n    propB: zModelWithString.optional(),\n    propC: zModelWithString.optional()\n});\n\n/**\n * This is a model that extends another model\n */\nexport const zModelThatExtends = zModelWithString.and(z.object({\n    propExtendsA: z.string().optional(),\n    propExtendsB: zModelWithString.optional()\n}));\n\n/**\n * This is a model that extends another model\n */\nexport const zModelThatExtendsExtends = zModelWithString.and(zModelThatExtends).and(z.object({\n    propExtendsC: z.string().optional(),\n    propExtendsD: zModelWithString.optional()\n}));\n\n/**\n * This is a model that contains a some patterns\n */\nexport const zModelWithPattern = z.object({\n    key: z.string().max(64).regex(/^[a-zA-Z0-9_]*$/),\n    name: z.string().max(255),\n    enabled: z.boolean().readonly().optional(),\n    modified: z.string().datetime().readonly().optional(),\n    id: z.string().regex(/^\\d{2}-\\d{3}-\\d{4}$/).optional(),\n    text: z.string().regex(/^\\w+$/).optional(),\n    patternWithSingleQuotes: z.string().regex(/^[a-zA-Z0-9']*$/).optional(),\n    patternWithNewline: z.string().regex(/aaa\\nbbb/).optional(),\n    patternWithBacktick: z.string().regex(/aaa`bbb/).optional(),\n    patternWithUnicode: z.string().regex(/^\\p{L}+$/u).optional()\n});\n\nexport const zFile = z.object({\n    id: z.string().min(1).readonly().optional(),\n    updated_at: z.string().datetime().readonly().optional(),\n    created_at: z.string().datetime().readonly().optional(),\n    mime: z.string().min(1).max(24),\n    file: z.string().url().readonly().optional()\n});\n\nexport const zDefault = z.object({\n    name: z.string().optional()\n});\n\nexport const zPageable = z.object({\n    page: z.number().int().gte(0).max(2147483647, { message: 'Invalid value: Expected int32 to be <= 2147483647' }).optional().default(0),\n    size: z.number().int().gte(1).max(2147483647, { message: 'Invalid value: Expected int32 to be <= 2147483647' }).optional(),\n    sort: z.array(z.string()).optional()\n});\n\n/**\n * This is a free-form object without additionalProperties.\n */\nexport const zFreeFormObjectWithoutAdditionalProperties = z.record(z.unknown());\n\n/**\n * This is a free-form object with additionalProperties: true.\n */\nexport const zFreeFormObjectWithAdditionalPropertiesEqTrue = z.record(z.unknown());\n\n/**\n * This is a free-form object with additionalProperties: {}.\n */\nexport const zFreeFormObjectWithAdditionalPropertiesEqEmptyObject = z.record(z.unknown());\n\nexport const zModelWithConst = z.object({\n    String: z.enum(['String']).optional(),\n    number: z.literal(0).optional(),\n    null: z.unknown().optional(),\n    withType: z.enum(['Some string']).optional()\n});\n\n/**\n * This is a model with one property and additionalProperties: true\n */\nexport const zModelWithAdditionalPropertiesEqTrue = z.object({\n    prop: z.string().optional()\n});\n\nexport const zNestedAnyOfArraysNullable = z.object({\n    nullableArray: z.array(z.union([z.string(), z.boolean()])).nullish()\n});\n\n/**\n * An object that can be null\n */\nexport const zNullableObject = z.object({\n    foo: z.string().optional()\n}).nullable().default(null);\n\n/**\n * Some % character\n */\nexport const zCharactersInDescription = z.string();\n\nexport const zModelWithNullableObject = z.object({\n    data: zNullableObject.optional()\n});\n\n/**\n * An object with additional properties that can be null\n */\nexport const zModelWithAdditionalPropertiesRef = z.record(zNullableObject.nullable());\n\nexport const zModelWithOneOfEnum = z.union([\n    z.object({\n        foo: z.enum(['Bar'])\n    }),\n    z.object({\n        foo: z.enum(['Baz'])\n    }),\n    z.object({\n        foo: z.enum(['Qux'])\n    }),\n    z.object({\n        content: z.string().datetime(),\n        foo: z.enum(['Quux'])\n    }),\n    z.object({\n        content: z.tuple([z.string().datetime(), z.string().datetime()]),\n        foo: z.enum(['Corge'])\n    })\n]);\n\nexport const zModelWithNestedArrayEnumsDataFoo = z.enum(['foo', 'bar']);\n\nexport const zModelWithNestedArrayEnumsDataBar = z.enum(['baz', 'qux']);\n\nexport const zModelWithNestedArrayEnumsData = z.object({\n    foo: z.array(zModelWithNestedArrayEnumsDataFoo).optional(),\n    bar: z.array(zModelWithNestedArrayEnumsDataBar).optional()\n});\n\nexport const zModelWithNestedArrayEnums = z.object({\n    array_strings: z.array(z.string()).optional(),\n    data: zModelWithNestedArrayEnumsData.optional()\n});\n\nexport const zModelWithNestedCompositionEnums = z.object({\n    foo: zModelWithNestedArrayEnumsDataFoo.optional()\n});\n\nexport const zModelWithReadOnlyAndWriteOnly = z.object({\n    foo: z.string(),\n    bar: z.string().readonly()\n});\n\n/**\n * This is a model with one property containing an array\n */\nexport const zModelWithArrayReadOnlyAndWriteOnly = z.object({\n    prop: z.array(zModelWithReadOnlyAndWriteOnly).optional(),\n    propWithFile: z.array(z.string()).optional(),\n    propWithNumber: z.array(z.number()).optional()\n});\n\nexport const zModelWithConstantSizeArray = z.tuple([z.number(), z.number()]);\n\nexport const zModelWithAnyOfConstantSizeArray = z.tuple([\n    z.union([\n        z.number(),\n        z.string()\n    ]),\n    z.union([\n        z.number(),\n        z.string()\n    ]),\n    z.union([\n        z.number(),\n        z.string()\n    ])\n]);\n\nexport const zModelWithPrefixItemsConstantSizeArray = z.array(z.union([\n    zModelWithInteger,\n    z.number(),\n    z.string()\n]));\n\nexport const zModelWithAnyOfConstantSizeArrayNullable = z.tuple([\n    z.union([\n        z.number(),\n        z.string()\n    ]).nullable(),\n    z.union([\n        z.number(),\n        z.string()\n    ]).nullable(),\n    z.union([\n        z.number(),\n        z.string()\n    ]).nullable()\n]);\n\nexport const zModelWithAnyOfConstantSizeArrayAndIntersect = z.tuple([z.intersection(z.number(), z.string()), z.intersection(z.number(), z.string())]);\n\nexport const zModelWithNumericEnumUnion = z.object({\n    value: z.union([\n        z.literal(-10),\n        z.literal(-1),\n        z.literal(0),\n        z.literal(1),\n        z.literal(3),\n        z.literal(6),\n        z.literal(12)\n    ]).optional()\n});\n\n/**\n * Some description with `back ticks`\n */\nexport const zModelWithBackticksInDescription = z.object({\n    template: z.string().optional()\n});\n\n/**\n * Model used to test deduplication strategy (unused)\n */\nexport const zParameterSimpleParameterUnused = z.string();\n\n/**\n * Model used to test deduplication strategy\n */\nexport const zPostServiceWithEmptyTagResponse = z.string();\n\n/**\n * Model used to test deduplication strategy\n */\nexport const zPostServiceWithEmptyTagResponse2 = z.string();\n\n/**\n * Model used to test deduplication strategy\n */\nexport const zDeleteFooData = z.string();\n\n/**\n * Model used to test deduplication strategy\n */\nexport const zDeleteFooData2 = z.string();\n\n/**\n * Model with restricted keyword name\n */\nexport const zImport = z.string();\n\nexport const zModelWithAnyOfConstantSizeArrayWithNSizeAndOptions = z.tuple([z.union([\n        z.number(),\n        zImport\n    ]), z.union([\n        z.number(),\n        zImport\n    ])]);\n\nexport const zSchemaWithFormRestrictedKeys = z.object({\n    description: z.string().optional(),\n    'x-enum-descriptions': z.string().optional(),\n    'x-enum-varnames': z.string().optional(),\n    'x-enumNames': z.string().optional(),\n    title: z.string().optional(),\n    object: z.object({\n        description: z.string().optional(),\n        'x-enum-descriptions': z.string().optional(),\n        'x-enum-varnames': z.string().optional(),\n        'x-enumNames': z.string().optional(),\n        title: z.string().optional()\n    }).optional(),\n    array: z.array(z.object({\n        description: z.string().optional(),\n        'x-enum-descriptions': z.string().optional(),\n        'x-enum-varnames': z.string().optional(),\n        'x-enumNames': z.string().optional(),\n        title: z.string().optional()\n    })).optional()\n});\n\n/**\n * This schema was giving PascalCase transformations a hard time\n */\nexport const zIoK8sApimachineryPkgApisMetaV1Preconditions = z.object({\n    resourceVersion: z.string().optional(),\n    uid: z.string().optional()\n});\n\n/**\n * This schema was giving PascalCase transformations a hard time\n */\nexport const zIoK8sApimachineryPkgApisMetaV1DeleteOptions = z.object({\n    preconditions: zIoK8sApimachineryPkgApisMetaV1Preconditions.optional()\n});\n\nexport const zAdditionalPropertiesUnknownIssue = z.record(z.union([\n    z.string(),\n    z.number()\n]));\n\nexport const zAdditionalPropertiesUnknownIssue2 = z.record(z.union([\n    z.string(),\n    z.number()\n]));\n\nexport const zAdditionalPropertiesUnknownIssue3 = z.intersection(z.string(), z.object({\n    entries: z.record(zAdditionalPropertiesUnknownIssue)\n}));\n\nexport const zAdditionalPropertiesIntegerIssue = z.object({\n    value: z.number().int()\n});\n\nexport const zGenericSchemaDuplicateIssue1SystemBoolean = z.object({\n    item: z.boolean().optional(),\n    error: z.string().nullish(),\n    hasError: z.boolean().readonly().optional(),\n    data: z.record(z.never()).optional()\n});\n\nexport const zGenericSchemaDuplicateIssue1SystemString = z.object({\n    item: z.string().nullish(),\n    error: z.string().nullish(),\n    hasError: z.boolean().readonly().optional()\n});\n\nexport const zOneOfAllOfIssue = z.union([\n    z.intersection(z.union([\n        zConstValue,\n        zGenericSchemaDuplicateIssue1SystemBoolean\n    ]), z3eNum1Период),\n    zGenericSchemaDuplicateIssue1SystemString\n]);\n\nexport const zExternalSharedModel = z.object({\n    id: z.string(),\n    name: z.string().optional()\n});\n\nexport const zExternalRefA = zExternalSharedModel;\n\nexport const zExternalRefB = zExternalSharedModel;\n\n/**\n * This is a model with one nested property\n */\nexport const zModelWithPropertiesWritable = z.object({\n    required: z.string(),\n    requiredAndNullable: z.string().nullable(),\n    string: z.string().optional(),\n    number: z.number().optional(),\n    boolean: z.boolean().optional(),\n    reference: zModelWithString.optional(),\n    'property with space': z.string().optional(),\n    default: z.string().optional(),\n    try: z.string().optional()\n});\n\n/**\n * This is a model with one property containing a reference\n */\nexport const zModelWithReferenceWritable = z.object({\n    prop: zModelWithPropertiesWritable.optional()\n});\n\n/**\n * This is a model that contains a some patterns\n */\nexport const zModelWithPatternWritable = z.object({\n    key: z.string().max(64).regex(/^[a-zA-Z0-9_]*$/),\n    name: z.string().max(255),\n    id: z.string().regex(/^\\d{2}-\\d{3}-\\d{4}$/).optional(),\n    text: z.string().regex(/^\\w+$/).optional(),\n    patternWithSingleQuotes: z.string().regex(/^[a-zA-Z0-9']*$/).optional(),\n    patternWithNewline: z.string().regex(/aaa\\nbbb/).optional(),\n    patternWithBacktick: z.string().regex(/aaa`bbb/).optional(),\n    patternWithUnicode: z.string().regex(/^\\p{L}+$/u).optional()\n});\n\nexport const zFileWritable = z.object({\n    mime: z.string().min(1).max(24)\n});\n\nexport const zModelWithReadOnlyAndWriteOnlyWritable = z.object({\n    foo: z.string(),\n    baz: z.string()\n});\n\n/**\n * This is a model with one property containing an array\n */\nexport const zModelWithArrayReadOnlyAndWriteOnlyWritable = z.object({\n    prop: z.array(zModelWithReadOnlyAndWriteOnlyWritable).optional(),\n    propWithFile: z.array(z.string()).optional(),\n    propWithNumber: z.array(z.number()).optional()\n});\n\nexport const zModelWithAnyOfConstantSizeArrayWithNSizeAndOptionsWritable = z.tuple([z.union([\n        z.number(),\n        zImport\n    ]), z.union([\n        z.number(),\n        zImport\n    ])]);\n\nexport const zAdditionalPropertiesUnknownIssueWritable = z.record(z.union([\n    z.string(),\n    z.number()\n]));\n\nexport const zOneOfAllOfIssueWritable = z.union([\n    z.intersection(z.union([\n        zConstValue,\n        zGenericSchemaDuplicateIssue1SystemBoolean\n    ]), z3eNum1Период),\n    zGenericSchemaDuplicateIssue1SystemString\n]);\n\nexport const zGenericSchemaDuplicateIssue1SystemBooleanWritable = z.object({\n    item: z.boolean().optional(),\n    error: z.string().nullish(),\n    data: z.record(z.never()).optional()\n});\n\nexport const zGenericSchemaDuplicateIssue1SystemStringWritable = z.object({\n    item: z.string().nullish(),\n    error: z.string().nullish()\n});\n\n/**\n * This is a reusable parameter\n */\nexport const zSimpleParameter = z.string();\n\nexport const zCompositionWithOneOfAndProperties = z.intersection(z.union([\n    z.object({\n        foo: zSimpleParameter\n    }),\n    z.object({\n        bar: zNonAsciiStringæøåÆøÅöôêÊ字符串\n    })\n]), z.object({\n    baz: z.number().int().gte(0).max(65535, { message: 'Invalid value: Expected uint16 to be <= 65535' }).nullable(),\n    qux: z.number().int().gte(0).max(255, { message: 'Invalid value: Expected uint8 to be <= 255' })\n}));\n\nexport const zModelWithOneOfAndProperties = z.intersection(z.union([\n    zSimpleParameter,\n    zNonAsciiStringæøåÆøÅöôêÊ字符串\n]), z.object({\n    baz: z.number().int().gte(0).max(65535, { message: 'Invalid value: Expected uint16 to be <= 65535' }).nullable(),\n    qux: z.number().int().gte(0).max(255, { message: 'Invalid value: Expected uint8 to be <= 255' })\n}));\n\n/**\n * Parameter with illegal characters\n */\nexport const zXFooBar = zModelWithString;\n\nexport const zSimpleRequestBody = zModelWithString;\n\nexport const zSimpleFormData = zModelWithString;\n\nexport const zExportData = z.object({\n    body: z.never().optional(),\n    path: z.never().optional(),\n    query: z.never().optional()\n});\n\nexport const zPatchApiVbyApiVersionNoTagData = z.object({\n    body: z.never().optional(),\n    path: z.never().optional(),\n    query: z.never().optional()\n});\n\nexport const zImportData = z.object({\n    body: z.union([\n        zModelWithReadOnlyAndWriteOnlyWritable,\n        zModelWithArrayReadOnlyAndWriteOnlyWritable\n    ]),\n    path: z.never().optional(),\n    query: z.never().optional()\n});\n\nexport const zImportResponse = z.union([\n    zModelFromZendesk,\n    zModelWithReadOnlyAndWriteOnly\n]);\n\nexport const zFooWowData = z.object({\n    body: z.never().optional(),\n    path: z.never().optional(),\n    query: z.never().optional()\n});\n\nexport const zApiVVersionODataControllerCountData = z.object({\n    body: z.never().optional(),\n    path: z.never().optional(),\n    query: z.never().optional()\n});\n\n/**\n * Success\n */\nexport const zApiVVersionODataControllerCountResponse = zModelFromZendesk;\n\nexport const zGetApiVbyApiVersionSimpleOperationData = z.object({\n    body: z.never().optional(),\n    path: z.object({\n        foo_param: z.string()\n    }),\n    query: z.never().optional()\n});\n\n/**\n * Response is a simple number\n */\nexport const zGetApiVbyApiVersionSimpleOperationResponse = z.number();\n\nexport const zDeleteCallWithoutParametersAndResponseData = z.object({\n    body: z.never().optional(),\n    path: z.never().optional(),\n    query: z.never().optional()\n});\n\nexport const zGetCallWithoutParametersAndResponseData = z.object({\n    body: z.never().optional(),\n    path: z.never().optional(),\n    query: z.never().optional()\n});\n\nexport const zHeadCallWithoutParametersAndResponseData = z.object({\n    body: z.never().optional(),\n    path: z.never().optional(),\n    query: z.never().optional()\n});\n\nexport const zOptionsCallWithoutParametersAndResponseData = z.object({\n    body: z.never().optional(),\n    path: z.never().optional(),\n    query: z.never().optional()\n});\n\nexport const zPatchCallWithoutParametersAndResponseData = z.object({\n    body: z.never().optional(),\n    path: z.never().optional(),\n    query: z.never().optional()\n});\n\nexport const zPostCallWithoutParametersAndResponseData = z.object({\n    body: z.never().optional(),\n    path: z.never().optional(),\n    query: z.never().optional()\n});\n\nexport const zPutCallWithoutParametersAndResponseData = z.object({\n    body: z.never().optional(),\n    path: z.never().optional(),\n    query: z.never().optional()\n});\n\nexport const zDeleteFooData3 = z.object({\n    body: z.never().optional(),\n    path: z.object({\n        foo_param: z.string(),\n        BarParam: z.string()\n    }),\n    query: z.never().optional(),\n    headers: z.object({\n        'x-Foo-Bar': zModelWithString\n    })\n});\n\nexport const zCallWithDescriptionsData = z.object({\n    body: z.never().optional(),\n    path: z.never().optional(),\n    query: z.object({\n        parameterWithBreaks: z.string().optional(),\n        parameterWithBackticks: z.string().optional(),\n        parameterWithSlashes: z.string().optional(),\n        parameterWithExpressionPlaceholders: z.string().optional(),\n        parameterWithQuotes: z.string().optional(),\n        parameterWithReservedCharacters: z.string().optional()\n    }).optional()\n});\n\nexport const zDeprecatedCallData = z.object({\n    body: z.never().optional(),\n    path: z.never().optional(),\n    query: z.never().optional(),\n    headers: z.object({\n        parameter: zDeprecatedModel.nullable()\n    })\n});\n\nexport const zCallWithParametersData = z.object({\n    body: z.record(z.unknown()).nullable(),\n    path: z.object({\n        parameterPath: z.string().nullable(),\n        'api-version': z.string().nullable()\n    }),\n    query: z.object({\n        foo_ref_enum: zModelWithNestedArrayEnumsDataFoo.optional(),\n        foo_all_of_enum: zModelWithNestedArrayEnumsDataFoo,\n        cursor: z.string().nullable()\n    }),\n    headers: z.object({\n        parameterHeader: z.string().nullable()\n    })\n});\n\nexport const zCallWithWeirdParameterNamesData = z.object({\n    body: zModelWithString.nullable(),\n    path: z.object({\n        'parameter.path.1': z.string().optional(),\n        'parameter-path-2': z.string().optional(),\n        'PARAMETER-PATH-3': z.string().optional(),\n        'api-version': z.string().nullable()\n    }),\n    query: z.object({\n        default: z.string().optional(),\n        'parameter-query': z.string().nullable()\n    }),\n    headers: z.object({\n        'parameter.header': z.string().nullable()\n    })\n});\n\nexport const zGetCallWithOptionalParamData = z.object({\n    body: zModelWithOneOfEnum,\n    path: z.never().optional(),\n    query: z.object({\n        page: z.number().optional()\n    }).optional()\n});\n\nexport const zPostCallWithOptionalParamData = z.object({\n    body: z.object({\n        offset: z.number().nullish()\n    }).optional(),\n    path: z.never().optional(),\n    query: z.object({\n        parameter: zPageable\n    })\n});\n\nexport const zPostCallWithOptionalParamResponse = z.union([\n    z.number(),\n    z.void()\n]);\n\nexport const zPostApiVbyApiVersionRequestBodyData = z.object({\n    body: zSimpleRequestBody.optional(),\n    path: z.never().optional(),\n    query: z.object({\n        parameter: z.string().optional()\n    }).optional()\n});\n\nexport const zPostApiVbyApiVersionFormDataData = z.object({\n    body: zSimpleFormData.optional(),\n    path: z.never().optional(),\n    query: z.object({\n        parameter: z.string().optional()\n    }).optional()\n});\n\nexport const zCallWithDefaultParametersData = z.object({\n    body: z.never().optional(),\n    path: z.never().optional(),\n    query: z.object({\n        parameterString: z.string().nullish().default('Hello World!'),\n        parameterNumber: z.number().nullish().default(123),\n        parameterBoolean: z.boolean().nullish().default(true),\n        parameterEnum: z.enum([\n            'Success',\n            'Warning',\n            'Error'\n        ]).optional(),\n        parameterModel: zModelWithString.nullish()\n    }).optional()\n});\n\nexport const zCallWithDefaultOptionalParametersData = z.object({\n    body: z.never().optional(),\n    path: z.never().optional(),\n    query: z.object({\n        parameterString: z.string().optional().default('Hello World!'),\n        parameterNumber: z.number().optional().default(123),\n        parameterBoolean: z.boolean().optional().default(true),\n        parameterEnum: z.enum([\n            'Success',\n            'Warning',\n            'Error'\n        ]).optional(),\n        parameterModel: zModelWithString.optional()\n    }).optional()\n});\n\nexport const zCallToTestOrderOfParamsData = z.object({\n    body: z.never().optional(),\n    path: z.never().optional(),\n    query: z.object({\n        parameterOptionalStringWithDefault: z.string().optional().default('Hello World!'),\n        parameterOptionalStringWithEmptyDefault: z.string().optional().default(''),\n        parameterOptionalStringWithNoDefault: z.string().optional(),\n        parameterStringWithDefault: z.string().default('Hello World!'),\n        parameterStringWithEmptyDefault: z.string().default(''),\n        parameterStringWithNoDefault: z.string(),\n        parameterStringNullableWithNoDefault: z.string().nullish(),\n        parameterStringNullableWithDefault: z.string().nullish().default(null)\n    })\n});\n\nexport const zDuplicateNameData = z.object({\n    body: z.never().optional(),\n    path: z.never().optional(),\n    query: z.never().optional()\n});\n\nexport const zDuplicateName2Data = z.object({\n    body: z.never().optional(),\n    path: z.never().optional(),\n    query: z.never().optional()\n});\n\nexport const zDuplicateName3Data = z.object({\n    body: z.never().optional(),\n    path: z.never().optional(),\n    query: z.never().optional()\n});\n\nexport const zDuplicateName4Data = z.object({\n    body: z.never().optional(),\n    path: z.never().optional(),\n    query: z.never().optional()\n});\n\nexport const zCallWithNoContentResponseData = z.object({\n    body: z.never().optional(),\n    path: z.never().optional(),\n    query: z.never().optional()\n});\n\n/**\n * Success\n */\nexport const zCallWithNoContentResponseResponse = z.void();\n\nexport const zCallWithResponseAndNoContentResponseData = z.object({\n    body: z.never().optional(),\n    path: z.never().optional(),\n    query: z.never().optional()\n});\n\nexport const zCallWithResponseAndNoContentResponseResponse = z.union([\n    z.number(),\n    z.void()\n]);\n\nexport const zDummyAData = z.object({\n    body: z.never().optional(),\n    path: z.never().optional(),\n    query: z.never().optional()\n});\n\nexport const zDummyAResponse = z400;\n\nexport const zDummyBData = z.object({\n    body: z.never().optional(),\n    path: z.never().optional(),\n    query: z.never().optional()\n});\n\n/**\n * Success\n */\nexport const zDummyBResponse = z.void();\n\nexport const zCallWithResponseData = z.object({\n    body: z.never().optional(),\n    path: z.never().optional(),\n    query: z.never().optional()\n});\n\nexport const zCallWithResponseResponse = zImport;\n\nexport const zCallWithDuplicateResponsesData = z.object({\n    body: z.never().optional(),\n    path: z.never().optional(),\n    query: z.never().optional()\n});\n\nexport const zCallWithDuplicateResponsesResponse = z.union([\n    zModelWithBoolean.and(zModelWithInteger),\n    zModelWithString\n]);\n\nexport const zCallWithResponsesData = z.object({\n    body: z.never().optional(),\n    path: z.never().optional(),\n    query: z.never().optional()\n});\n\nexport const zCallWithResponsesResponse = z.union([\n    z.object({\n        '@namespace.string': z.string().readonly().optional(),\n        '@namespace.integer': z.number().int().readonly().optional(),\n        value: z.array(zModelWithString).readonly().optional()\n    }),\n    zModelThatExtends,\n    zModelThatExtendsExtends\n]);\n\nexport const zCollectionFormatData = z.object({\n    body: z.never().optional(),\n    path: z.never().optional(),\n    query: z.object({\n        parameterArrayCSV: z.array(z.string()).nullable(),\n        parameterArraySSV: z.array(z.string()).nullable(),\n        parameterArrayTSV: z.array(z.string()).nullable(),\n        parameterArrayPipes: z.array(z.string()).nullable(),\n        parameterArrayMulti: z.array(z.string()).nullable()\n    })\n});\n\nexport const zTypesData = z.object({\n    body: z.never().optional(),\n    path: z.object({\n        id: z.number().int().min(-2147483648, { message: 'Invalid value: Expected int32 to be >= -2147483648' }).max(2147483647, { message: 'Invalid value: Expected int32 to be <= 2147483647' }).optional()\n    }).optional(),\n    query: z.object({\n        parameterNumber: z.number().default(123),\n        parameterString: z.string().nullable().default('default'),\n        parameterBoolean: z.boolean().nullable().default(true),\n        parameterObject: z.record(z.unknown()).nullable().default(null),\n        parameterArray: z.array(z.string()).nullable(),\n        parameterDictionary: z.record(z.unknown()).nullable(),\n        parameterEnum: z.enum([\n            'Success',\n            'Warning',\n            'Error'\n        ])\n    })\n});\n\nexport const zTypesResponse = z.union([\n    z.number(),\n    z.string(),\n    z.boolean(),\n    z.record(z.unknown())\n]);\n\nexport const zUploadFileData = z.object({\n    body: z.string(),\n    path: z.object({\n        'api-version': z.string().nullable()\n    }),\n    query: z.never().optional()\n});\n\nexport const zUploadFileResponse = z.boolean();\n\nexport const zFileResponseData = z.object({\n    body: z.never().optional(),\n    path: z.object({\n        id: z.string(),\n        'api-version': z.string()\n    }),\n    query: z.never().optional()\n});\n\n/**\n * Success\n */\nexport const zFileResponseResponse = z.string();\n\nexport const zComplexTypesData = z.object({\n    body: z.never().optional(),\n    path: z.never().optional(),\n    query: z.object({\n        parameterObject: z.object({\n            first: z.object({\n                second: z.object({\n                    third: z.string().optional()\n                }).optional()\n            }).optional()\n        }),\n        parameterReference: zModelWithString\n    })\n});\n\n/**\n * Successful response\n */\nexport const zComplexTypesResponse = z.array(zModelWithString);\n\nexport const zMultipartResponseData = z.object({\n    body: z.never().optional(),\n    path: z.never().optional(),\n    query: z.never().optional()\n});\n\n/**\n * OK\n */\nexport const zMultipartResponseResponse = z.object({\n    file: z.string().optional(),\n    metadata: z.object({\n        foo: z.string().optional(),\n        bar: z.string().optional()\n    }).optional()\n});\n\nexport const zMultipartRequestData = z.object({\n    body: z.object({\n        content: z.string().optional(),\n        data: zModelWithString.nullish()\n    }).optional(),\n    path: z.never().optional(),\n    query: z.never().optional()\n});\n\nexport const zComplexParamsData = z.object({\n    body: z.object({\n        key: z.string().max(64).regex(/^[a-zA-Z0-9_]*$/).readonly().nullable(),\n        name: z.string().max(255).nullable(),\n        enabled: z.boolean().optional().default(true),\n        type: z.enum([\n            'Monkey',\n            'Horse',\n            'Bird'\n        ]),\n        listOfModels: z.array(zModelWithString).nullish(),\n        listOfStrings: z.array(z.string()).nullish(),\n        parameters: z.union([\n            zModelWithString,\n            zModelWithEnum,\n            zModelWithArray,\n            zModelWithDictionary\n        ]),\n        user: z.object({\n            id: z.number().int().min(-2147483648, { message: 'Invalid value: Expected int32 to be >= -2147483648' }).max(2147483647, { message: 'Invalid value: Expected int32 to be <= 2147483647' }).readonly().optional(),\n            name: z.string().readonly().nullish()\n        }).readonly().optional()\n    }).optional(),\n    path: z.object({\n        id: z.number().int().min(-2147483648, { message: 'Invalid value: Expected int32 to be >= -2147483648' }).max(2147483647, { message: 'Invalid value: Expected int32 to be <= 2147483647' }),\n        'api-version': z.string()\n    }),\n    query: z.never().optional()\n});\n\n/**\n * Success\n */\nexport const zComplexParamsResponse = zModelWithString;\n\nexport const zCallWithResultFromHeaderData = z.object({\n    body: z.never().optional(),\n    path: z.never().optional(),\n    query: z.never().optional()\n});\n\nexport const zTestErrorCodeData = z.object({\n    body: z.never().optional(),\n    path: z.never().optional(),\n    query: z.object({\n        status: z.number().int()\n    })\n});\n\nexport const zNonAsciiæøåÆøÅöôêÊ字符串Data = z.object({\n    body: z.never().optional(),\n    path: z.never().optional(),\n    query: z.object({\n        nonAsciiParamæøåÆØÅöôêÊ: z.number().int()\n    })\n});\n\n/**\n * Successful response\n */\nexport const zNonAsciiæøåÆøÅöôêÊ字符串Response = z.array(zNonAsciiStringæøåÆøÅöôêÊ字符串);\n\nexport const zPutWithFormUrlEncodedData = z.object({\n    body: zArrayWithStrings,\n    path: z.never().optional(),\n    query: z.never().optional()\n});\n"
  },
  {
    "path": "packages/openapi-ts-tests/zod/v4/__snapshots__/3.0.x/v3/enum-null/zod.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport { z } from 'zod/v3';\n\nexport const zFoo = z.enum(['foo', 'bar']).nullable();\n\nexport const zBar = z.enum(['foo', 'bar']);\n\nexport const zBaz = z.enum(['foo', 'bar']);\n"
  },
  {
    "path": "packages/openapi-ts-tests/zod/v4/__snapshots__/3.0.x/v3/type-format/client/client.gen.ts",
    "content": "// 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 (options: RequestOptions) => {\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 url = buildUrl(opts);\n\n    return { opts, url };\n  };\n\n  const request: Client['request'] = async (options) => {\n    // @ts-expect-error\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"
  },
  {
    "path": "packages/openapi-ts-tests/zod/v4/__snapshots__/3.0.x/v3/type-format/client/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type { Auth } from '../core/auth.gen';\nexport type { QuerySerializerOptions } from '../core/bodySerializer.gen';\nexport {\n  formDataBodySerializer,\n  jsonBodySerializer,\n  urlSearchParamsBodySerializer,\n} from '../core/bodySerializer.gen';\nexport { buildClientParams } from '../core/params.gen';\nexport { serializeQueryKeyValue } from '../core/queryKeySerializer.gen';\nexport { createClient } from './client.gen';\nexport type {\n  Client,\n  ClientOptions,\n  Config,\n  CreateClientConfig,\n  Options,\n  RequestOptions,\n  RequestResult,\n  ResolvedRequestOptions,\n  ResponseStyle,\n  TDataShape,\n} from './types.gen';\nexport { createConfig, mergeHeaders } from './utils.gen';\n"
  },
  {
    "path": "packages/openapi-ts-tests/zod/v4/__snapshots__/3.0.x/v3/type-format/client/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { Auth } from '../core/auth.gen';\nimport type {\n  ServerSentEventsOptions,\n  ServerSentEventsResult,\n} from '../core/serverSentEvents.gen';\nimport type { Client as CoreClient, Config as CoreConfig } from '../core/types.gen';\nimport type { Middleware } from './utils.gen';\n\nexport type ResponseStyle = 'data' | 'fields';\n\nexport interface Config<T extends ClientOptions = ClientOptions>\n  extends Omit<RequestInit, 'body' | 'headers' | 'method'>, CoreConfig {\n  /**\n   * Base URL for all requests made by this client.\n   */\n  baseUrl?: T['baseUrl'];\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   * Please don't use the Fetch client for Next.js applications. The `next`\n   * options won't have any effect.\n   *\n   * Install {@link https://www.npmjs.com/package/@hey-api/client-next `@hey-api/client-next`} instead.\n   */\n  next?: never;\n  /**\n   * Return the response data parsed in a specified format. By default, `auto`\n   * will infer the appropriate method from the `Content-Type` response header.\n   * You can override this behavior with any of the {@link Body} methods.\n   * Select `stream` if you don't want to parse response data at all.\n   *\n   * @default 'auto'\n   */\n  parseAs?: 'arrayBuffer' | 'auto' | 'blob' | 'formData' | 'json' | 'stream' | 'text';\n  /**\n   * Should we return only data or multiple fields (data, error, response, etc.)?\n   *\n   * @default 'fields'\n   */\n  responseStyle?: ResponseStyle;\n  /**\n   * Throw an error instead of returning it in the response?\n   *\n   * @default false\n   */\n  throwOnError?: T['throwOnError'];\n}\n\nexport interface RequestOptions<\n  TData = unknown,\n  TResponseStyle extends ResponseStyle = 'fields',\n  ThrowOnError extends boolean = boolean,\n  Url extends string = string,\n>\n  extends\n    Config<{\n      responseStyle: TResponseStyle;\n      throwOnError: ThrowOnError;\n    }>,\n    Pick<\n      ServerSentEventsOptions<TData>,\n      | 'onRequest'\n      | 'onSseError'\n      | 'onSseEvent'\n      | 'sseDefaultRetryDelay'\n      | 'sseMaxRetryAttempts'\n      | 'sseMaxRetryDelay'\n    > {\n  /**\n   * Any body that you want to add to your request.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/fetch#body}\n   */\n  body?: unknown;\n  path?: Record<string, unknown>;\n  query?: Record<string, unknown>;\n  /**\n   * Security mechanism(s) to use for the request.\n   */\n  security?: ReadonlyArray<Auth>;\n  url: Url;\n}\n\nexport interface ResolvedRequestOptions<\n  TResponseStyle extends ResponseStyle = 'fields',\n  ThrowOnError extends boolean = boolean,\n  Url extends string = string,\n> extends RequestOptions<unknown, TResponseStyle, ThrowOnError, Url> {\n  serializedBody?: string;\n}\n\nexport type RequestResult<\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = boolean,\n  TResponseStyle extends ResponseStyle = 'fields',\n> = ThrowOnError extends true\n  ? Promise<\n      TResponseStyle extends 'data'\n        ? TData extends Record<string, unknown>\n          ? TData[keyof TData]\n          : TData\n        : {\n            data: TData extends Record<string, unknown> ? TData[keyof TData] : TData;\n            request: Request;\n            response: Response;\n          }\n    >\n  : Promise<\n      TResponseStyle extends 'data'\n        ? (TData extends Record<string, unknown> ? TData[keyof TData] : TData) | undefined\n        : (\n            | {\n                data: TData extends Record<string, unknown> ? TData[keyof TData] : TData;\n                error: undefined;\n              }\n            | {\n                data: undefined;\n                error: TError extends Record<string, unknown> ? TError[keyof TError] : TError;\n              }\n          ) & {\n            request: Request;\n            response: Response;\n          }\n    >;\n\nexport interface ClientOptions {\n  baseUrl?: string;\n  responseStyle?: ResponseStyle;\n  throwOnError?: boolean;\n}\n\ntype MethodFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'>,\n) => RequestResult<TData, TError, ThrowOnError, TResponseStyle>;\n\ntype SseFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'>,\n) => Promise<ServerSentEventsResult<TData, TError>>;\n\ntype RequestFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'> &\n    Pick<Required<RequestOptions<TData, TResponseStyle, ThrowOnError>>, 'method'>,\n) => RequestResult<TData, TError, ThrowOnError, TResponseStyle>;\n\ntype BuildUrlFn = <\n  TData extends {\n    body?: unknown;\n    path?: Record<string, unknown>;\n    query?: Record<string, unknown>;\n    url: string;\n  },\n>(\n  options: TData & Options<TData>,\n) => string;\n\nexport type Client = CoreClient<RequestFn, Config, MethodFn, BuildUrlFn, SseFn> & {\n  interceptors: Middleware<Request, Response, unknown, ResolvedRequestOptions>;\n};\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 = ClientOptions> = (\n  override?: Config<ClientOptions & T>,\n) => Config<Required<ClientOptions> & T>;\n\nexport interface TDataShape {\n  body?: unknown;\n  headers?: unknown;\n  path?: unknown;\n  query?: unknown;\n  url: string;\n}\n\ntype OmitKeys<T, K> = Pick<T, Exclude<keyof T, K>>;\n\nexport type Options<\n  TData extends TDataShape = TDataShape,\n  ThrowOnError extends boolean = boolean,\n  TResponse = unknown,\n  TResponseStyle extends ResponseStyle = 'fields',\n> = OmitKeys<\n  RequestOptions<TResponse, TResponseStyle, ThrowOnError>,\n  'body' | 'path' | 'query' | 'url'\n> &\n  ([TData] extends [never] ? unknown : Omit<TData, 'url'>);\n"
  },
  {
    "path": "packages/openapi-ts-tests/zod/v4/__snapshots__/3.0.x/v3/type-format/client/utils.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/zod/v4/__snapshots__/3.0.x/v3/type-format/client.gen.ts",
    "content": "// 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>());\n"
  },
  {
    "path": "packages/openapi-ts-tests/zod/v4/__snapshots__/3.0.x/v3/type-format/core/auth.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/zod/v4/__snapshots__/3.0.x/v3/type-format/core/bodySerializer.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/zod/v4/__snapshots__/3.0.x/v3/type-format/core/params.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/zod/v4/__snapshots__/3.0.x/v3/type-format/core/pathSerializer.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/zod/v4/__snapshots__/3.0.x/v3/type-format/core/queryKeySerializer.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\n/**\n * JSON-friendly union that mirrors what Pinia Colada can hash.\n */\nexport type JsonValue =\n  | null\n  | string\n  | number\n  | boolean\n  | JsonValue[]\n  | { [key: string]: JsonValue };\n\n/**\n * Replacer that converts non-JSON values (bigint, Date, etc.) to safe substitutes.\n */\nexport const queryKeyJsonReplacer = (_key: string, value: unknown) => {\n  if (value === undefined || typeof value === 'function' || typeof value === 'symbol') {\n    return undefined;\n  }\n  if (typeof value === 'bigint') {\n    return value.toString();\n  }\n  if (value instanceof Date) {\n    return value.toISOString();\n  }\n  return value;\n};\n\n/**\n * Safely stringifies a value and parses it back into a JsonValue.\n */\nexport const stringifyToJsonValue = (input: unknown): JsonValue | undefined => {\n  try {\n    const json = JSON.stringify(input, queryKeyJsonReplacer);\n    if (json === undefined) {\n      return undefined;\n    }\n    return JSON.parse(json) as JsonValue;\n  } catch {\n    return undefined;\n  }\n};\n\n/**\n * Detects plain objects (including objects with a null prototype).\n */\nconst isPlainObject = (value: unknown): value is Record<string, unknown> => {\n  if (value === null || typeof value !== 'object') {\n    return false;\n  }\n  const prototype = Object.getPrototypeOf(value as object);\n  return prototype === Object.prototype || prototype === null;\n};\n\n/**\n * Turns URLSearchParams into a sorted JSON object for deterministic keys.\n */\nconst serializeSearchParams = (params: URLSearchParams): JsonValue => {\n  const entries = Array.from(params.entries()).sort(([a], [b]) => a.localeCompare(b));\n  const result: Record<string, JsonValue> = {};\n\n  for (const [key, value] of entries) {\n    const existing = result[key];\n    if (existing === undefined) {\n      result[key] = value;\n      continue;\n    }\n\n    if (Array.isArray(existing)) {\n      (existing as string[]).push(value);\n    } else {\n      result[key] = [existing, value];\n    }\n  }\n\n  return result;\n};\n\n/**\n * Normalizes any accepted value into a JSON-friendly shape for query keys.\n */\nexport const serializeQueryKeyValue = (value: unknown): JsonValue | undefined => {\n  if (value === null) {\n    return null;\n  }\n\n  if (typeof value === 'string' || typeof value === 'number' || typeof value === 'boolean') {\n    return value;\n  }\n\n  if (value === undefined || typeof value === 'function' || typeof value === 'symbol') {\n    return undefined;\n  }\n\n  if (typeof value === 'bigint') {\n    return value.toString();\n  }\n\n  if (value instanceof Date) {\n    return value.toISOString();\n  }\n\n  if (Array.isArray(value)) {\n    return stringifyToJsonValue(value);\n  }\n\n  if (typeof URLSearchParams !== 'undefined' && value instanceof URLSearchParams) {\n    return serializeSearchParams(value);\n  }\n\n  if (isPlainObject(value)) {\n    return stringifyToJsonValue(value);\n  }\n\n  return undefined;\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/zod/v4/__snapshots__/3.0.x/v3/type-format/core/serverSentEvents.gen.ts",
    "content": "// 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 const 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            // Normalize line endings: CRLF -> LF, then CR -> LF\n            buffer = buffer.replace(/\\r\\n/g, '\\n').replace(/\\r/g, '\\n');\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"
  },
  {
    "path": "packages/openapi-ts-tests/zod/v4/__snapshots__/3.0.x/v3/type-format/core/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { Auth, AuthToken } from './auth.gen';\nimport type { BodySerializer, QuerySerializer, QuerySerializerOptions } from './bodySerializer.gen';\n\nexport type HttpMethod =\n  | 'connect'\n  | 'delete'\n  | 'get'\n  | 'head'\n  | 'options'\n  | 'patch'\n  | 'post'\n  | 'put'\n  | 'trace';\n\nexport type Client<\n  RequestFn = never,\n  Config = unknown,\n  MethodFn = never,\n  BuildUrlFn = never,\n  SseFn = never,\n> = {\n  /**\n   * Returns the final request URL.\n   */\n  buildUrl: BuildUrlFn;\n  getConfig: () => Config;\n  request: RequestFn;\n  setConfig: (config: Config) => Config;\n} & {\n  [K in HttpMethod]: MethodFn;\n} & ([SseFn] extends [never] ? { sse?: never } : { sse: { [K in HttpMethod]: SseFn } });\n\nexport interface Config {\n  /**\n   * Auth token or a function returning auth token. The resolved value will be\n   * added to the request payload as defined by its `security` array.\n   */\n  auth?: ((auth: Auth) => Promise<AuthToken> | AuthToken) | AuthToken;\n  /**\n   * A function for serializing request body parameter. By default,\n   * {@link JSON.stringify()} will be used.\n   */\n  bodySerializer?: BodySerializer | null;\n  /**\n   * An object containing any HTTP headers that you want to pre-populate your\n   * `Headers` object with.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/Headers/Headers#init See more}\n   */\n  headers?:\n    | RequestInit['headers']\n    | Record<\n        string,\n        string | number | boolean | (string | number | boolean)[] | null | undefined | unknown\n      >;\n  /**\n   * The request method.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/fetch#method See more}\n   */\n  method?: Uppercase<HttpMethod>;\n  /**\n   * A function for serializing request query parameters. By default, arrays\n   * will be exploded in form style, objects will be exploded in deepObject\n   * style, and reserved characters are percent-encoded.\n   *\n   * This method will have no effect if the native `paramsSerializer()` Axios\n   * API function is used.\n   *\n   * {@link https://swagger.io/docs/specification/serialization/#query View examples}\n   */\n  querySerializer?: QuerySerializer | QuerySerializerOptions;\n  /**\n   * A function validating request data. This is useful if you want to ensure\n   * the request conforms to the desired shape, so it can be safely sent to\n   * the server.\n   */\n  requestValidator?: (data: unknown) => Promise<unknown>;\n  /**\n   * A function transforming response data before it's returned. This is useful\n   * for post-processing data, e.g. converting ISO strings into Date objects.\n   */\n  responseTransformer?: (data: unknown) => Promise<unknown>;\n  /**\n   * A function validating response data. This is useful if you want to ensure\n   * the response conforms to the desired shape, so it can be safely passed to\n   * the transformers and returned to the user.\n   */\n  responseValidator?: (data: unknown) => Promise<unknown>;\n}\n\ntype IsExactlyNeverOrNeverUndefined<T> = [T] extends [never]\n  ? true\n  : [T] extends [never | undefined]\n    ? [undefined] extends [T]\n      ? false\n      : true\n    : false;\n\nexport type OmitNever<T extends Record<string, unknown>> = {\n  [K in keyof T as IsExactlyNeverOrNeverUndefined<T[K]> extends true ? never : K]: T[K];\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/zod/v4/__snapshots__/3.0.x/v3/type-format/core/utils.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/zod/v4/__snapshots__/3.0.x/v3/type-format/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport { type Options, postFoo } from './sdk.gen';\nexport type { Bar, ClientOptions, Foo, PostFooData, PostFooResponse, PostFooResponses, TypeID, UserId } from './types.gen';\n"
  },
  {
    "path": "packages/openapi-ts-tests/zod/v4/__snapshots__/3.0.x/v3/type-format/sdk.gen.ts",
    "content": "// 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 { postFooResponseTransformer } from './transformers.gen';\nimport type { PostFooData, PostFooResponses } from './types.gen';\nimport { zPostFooData, zPostFooResponse } from './zod.gen';\n\nexport type Options<TData extends TDataShape = TDataShape, ThrowOnError extends boolean = boolean> = Options2<TData, ThrowOnError> & {\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\nexport const postFoo = <ThrowOnError extends boolean = false>(options?: Options<PostFooData, ThrowOnError>) => (options?.client ?? client).post<PostFooResponses, unknown, ThrowOnError>({\n    requestValidator: async (data) => await zPostFooData.parseAsync(data),\n    responseTransformer: postFooResponseTransformer,\n    responseValidator: async (data) => await zPostFooResponse.parseAsync(data),\n    url: '/foo',\n    ...options\n});\n"
  },
  {
    "path": "packages/openapi-ts-tests/zod/v4/__snapshots__/3.0.x/v3/type-format/transformers.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { PostFooResponse } from './types.gen';\n\nconst fooSchemaResponseTransformer = (data: any) => {\n    data.foo = BigInt(data.foo.toString());\n    return data;\n};\n\nexport const postFooResponseTransformer = async (data: any): Promise<PostFooResponse> => {\n    data = fooSchemaResponseTransformer(data);\n    return data;\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/zod/v4/__snapshots__/3.0.x/v3/type-format/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type ClientOptions = {\n    baseUrl: `${string}://${string}` | (string & {});\n};\n\nexport type TypeID<T extends string> = `${T}_${string}`;\n\nexport type UserId = TypeID<'user'>;\n\nexport type Foo = {\n    bar?: number;\n    foo: bigint;\n    id: UserId;\n};\n\nexport type Bar = {\n    foo: number;\n    [key: string]: number;\n};\n\nexport type PostFooData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/foo';\n};\n\nexport type PostFooResponses = {\n    /**\n     * OK\n     */\n    200: Foo;\n};\n\nexport type PostFooResponse = PostFooResponses[keyof PostFooResponses];\n"
  },
  {
    "path": "packages/openapi-ts-tests/zod/v4/__snapshots__/3.0.x/v3/type-format/zod.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport { z } from 'zod/v3';\n\nexport const zFoo = z.object({\n    bar: z.number().int().optional(),\n    foo: z.coerce.bigint().min(BigInt('-9223372036854775808'), { message: 'Invalid value: Expected int64 to be >= -9223372036854775808' }).max(BigInt('9223372036854775807'), { message: 'Invalid value: Expected int64 to be <= 9223372036854775807' }).default(BigInt(0)),\n    id: z.string()\n});\n\nexport const zBar = z.object({\n    foo: z.number().int()\n});\n\nexport const zPostFooData = z.object({\n    body: z.never().optional(),\n    path: z.never().optional(),\n    query: z.never().optional()\n});\n\n/**\n * OK\n */\nexport const zPostFooResponse = zFoo;\n"
  },
  {
    "path": "packages/openapi-ts-tests/zod/v4/__snapshots__/3.0.x/v3/validators/zod.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport { z } from 'zod/v3';\n\nexport const zBaz = z.string().regex(/foo\\nbar/).readonly().default('baz');\n\nexport const zFoo: z.ZodTypeAny = z.object({\n    foo: z.string().regex(/^\\d{3}-\\d{2}-\\d{4}$/).optional(),\n    bar: z.lazy(() => zBar).optional(),\n    baz: z.array(z.lazy(() => zFoo)).optional(),\n    qux: z.number().int().gt(0).optional().default(0)\n}).nullable().default(null);\n\nexport const zBar = z.object({\n    foo: zFoo.optional()\n});\n"
  },
  {
    "path": "packages/openapi-ts-tests/zod/v4/__snapshots__/3.0.x/v4/array-items-all-of/zod.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport * as z from 'zod';\n\nexport const zArrayWithAllOfObjects = z.array(z.object({\n    id: z.int().optional()\n}).and(z.object({\n    name: z.string().optional()\n})));\n\nexport const zArrayWithAllOfPrimitives = z.array(z.intersection(z.number(), z.string()));\n\nexport const zBaseModel = z.object({\n    id: z.int().optional(),\n    createdAt: z.iso.datetime().optional()\n});\n\nexport const zArrayWithAllOfRefs = z.array(zBaseModel.and(z.object({\n    extra: z.string().optional()\n})));\n"
  },
  {
    "path": "packages/openapi-ts-tests/zod/v4/__snapshots__/3.0.x/v4/array-items-one-of-length-1/zod.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport * as z from 'zod';\n\nexport const zBar = z.string();\n\nexport const zFoo = z.object({\n    foo: z.array(zBar).min(1).max(2147483647).optional()\n});\n"
  },
  {
    "path": "packages/openapi-ts-tests/zod/v4/__snapshots__/3.0.x/v4/circular/zod.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport * as z from 'zod';\n\nexport const zFoo = z.object({\n    quux: z.lazy((): any => zQuux).optional()\n});\n\nexport const zBar = z.object({\n    bar: z.lazy((): any => zBar).optional(),\n    baz: z.lazy((): any => zBaz).optional()\n});\n\nexport const zBaz = z.object({\n    quux: z.lazy((): any => zQuux).optional()\n});\n\nexport const zQux = z.union([\n    z.object({\n        type: z.literal('struct')\n    }).and(z.lazy(() => z.lazy((): any => zCorge))),\n    z.object({\n        type: z.literal('array')\n    }).and(zFoo)\n]);\n\nexport const zQuux = z.object({\n    qux: zQux.optional()\n});\n\nexport const zCorge = z.object({\n    baz: z.array(zBaz).optional()\n});\n"
  },
  {
    "path": "packages/openapi-ts-tests/zod/v4/__snapshots__/3.0.x/v4/default/zod.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport * as z from 'zod';\n\n/**\n * Model with number-only name\n */\nexport const z400 = z.string();\n\n/**\n * Testing multiline comments in string: First line\n * Second line\n *\n * Fourth line\n */\nexport const zCamelCaseCommentWithBreaks = z.int();\n\n/**\n * Testing multiline comments in string: First line\n * Second line\n *\n * Fourth line\n */\nexport const zCommentWithBreaks = z.int();\n\n/**\n * Testing backticks in string: `backticks` and ```multiple backticks``` should work\n */\nexport const zCommentWithBackticks = z.int();\n\n/**\n * Testing backticks and quotes in string: `backticks`, 'quotes', \"double quotes\" and ```multiple backticks``` should work\n */\nexport const zCommentWithBackticksAndQuotes = z.int();\n\n/**\n * Testing slashes in string: \\backwards\\\\\\ and /forwards/// should work\n */\nexport const zCommentWithSlashes = z.int();\n\n/**\n * Testing expression placeholders in string: ${expression} should work\n */\nexport const zCommentWithExpressionPlaceholders = z.int();\n\n/**\n * Testing quotes in string: 'single quote''' and \"double quotes\"\"\" should work\n */\nexport const zCommentWithQuotes = z.int();\n\n/**\n * Testing reserved characters in string: * inline * and ** inline ** should work\n */\nexport const zCommentWithReservedCharacters = z.int();\n\n/**\n * This is a simple number\n */\nexport const zSimpleInteger = z.int();\n\n/**\n * This is a simple boolean\n */\nexport const zSimpleBoolean = z.boolean();\n\n/**\n * This is a simple string\n */\nexport const zSimpleString = z.string();\n\n/**\n * A string with non-ascii (unicode) characters valid in typescript identifiers (æøåÆØÅöÔèÈ字符串)\n */\nexport const zNonAsciiStringæøåÆøÅöôêÊ字符串 = z.string();\n\n/**\n * This is a simple file\n */\nexport const zSimpleFile = z.string();\n\n/**\n * This is a simple string\n */\nexport const zSimpleStringWithPattern = z.string().max(64).regex(/^[a-zA-Z0-9_]*$/).nullable();\n\n/**\n * This is a simple enum with strings\n */\nexport const zEnumWithStrings = z.enum([\n    'Success',\n    'Warning',\n    'Error',\n    '\\'Single Quote\\'',\n    '\"Double Quotes\"',\n    'Non-ascii: øæåôöØÆÅÔÖ字符串'\n]);\n\nexport const zEnumWithReplacedCharacters = z.union([\n    z.literal('\\'Single Quote\\''),\n    z.literal('\"Double Quotes\"'),\n    z.literal('øæåôöØÆÅÔÖ字符串'),\n    z.literal(3.1),\n    z.literal('')\n]);\n\n/**\n * This is a simple enum with numbers\n */\nexport const zEnumWithNumbers = z.union([\n    z.literal(1),\n    z.literal(2),\n    z.literal(3),\n    z.literal(1.1),\n    z.literal(1.2),\n    z.literal(1.3),\n    z.literal(100),\n    z.literal(200),\n    z.literal(300),\n    z.literal(-100),\n    z.literal(-200),\n    z.literal(-300),\n    z.literal(-1.1),\n    z.literal(-1.2),\n    z.literal(-1.3)\n]);\n\n/**\n * Success=1,Warning=2,Error=3\n */\nexport const zEnumFromDescription = z.number();\n\n/**\n * This is a simple enum with numbers\n */\nexport const zEnumWithExtensions = z.union([\n    z.literal(200),\n    z.literal(400),\n    z.literal(500)\n]);\n\nexport const zEnumWithXEnumNames = z.union([\n    z.literal(0),\n    z.literal(1),\n    z.literal(2)\n]);\n\n/**\n * This is a simple array with numbers\n */\nexport const zArrayWithNumbers = z.array(z.int());\n\n/**\n * This is a simple array with booleans\n */\nexport const zArrayWithBooleans = z.array(z.boolean());\n\n/**\n * This is a simple array with strings\n */\nexport const zArrayWithStrings = z.array(z.string()).default(['test']);\n\n/**\n * This is a simple array with properties\n */\nexport const zArrayWithProperties = z.array(z.object({\n    '16x16': zCamelCaseCommentWithBreaks.optional(),\n    bar: z.string().optional()\n}));\n\n/**\n * This is a simple array with any of properties\n */\nexport const zArrayWithAnyOfProperties = z.array(z.union([z.object({\n        foo: z.string().optional().default('test')\n    }), z.object({\n        bar: z.string().optional()\n    })]));\n\nexport const zAnyOfAnyAndNull = z.object({\n    data: z.unknown().optional()\n});\n\n/**\n * This is a simple array with any of properties\n */\nexport const zAnyOfArrays = z.object({\n    results: z.array(z.union([z.object({\n            foo: z.string().optional()\n        }), z.object({\n            bar: z.string().optional()\n        })])).optional()\n});\n\n/**\n * This is a string dictionary\n */\nexport const zDictionaryWithString = z.record(z.string(), z.string());\n\nexport const zDictionaryWithPropertiesAndAdditionalProperties = z.object({\n    foo: z.number().optional(),\n    bar: z.boolean().optional()\n});\n\n/**\n * This is a string dictionary\n */\nexport const zDictionaryWithDictionary = z.record(z.string(), z.record(z.string(), z.string()));\n\n/**\n * This is a complex dictionary\n */\nexport const zDictionaryWithProperties = z.record(z.string(), z.object({\n    foo: z.string().optional(),\n    bar: z.string().optional()\n}));\n\n/**\n * This is a model with one number property\n */\nexport const zModelWithInteger = z.object({\n    prop: z.int().optional()\n});\n\n/**\n * This is a model with one boolean property\n */\nexport const zModelWithBoolean = z.object({\n    prop: z.boolean().optional()\n});\n\n/**\n * This is a model with one string property\n */\nexport const zModelWithString = z.object({\n    prop: z.string().optional()\n});\n\n/**\n * This is a simple reference\n */\nexport const zSimpleReference = zModelWithString;\n\n/**\n * This is a simple array with references\n */\nexport const zArrayWithReferences = z.array(zModelWithString);\n\n/**\n * This is a simple array containing an array\n */\nexport const zArrayWithArray = z.array(z.array(zModelWithString));\n\n/**\n * This is a string reference\n */\nexport const zDictionaryWithReference = z.record(z.string(), zModelWithString);\n\n/**\n * This is a complex dictionary\n */\nexport const zDictionaryWithArray = z.record(z.string(), z.array(zModelWithString));\n\n/**\n * This is a model with one string property\n */\nexport const zModelWithStringError = z.object({\n    prop: z.string().optional()\n});\n\n/**\n * `Comment` or `VoiceComment`. The JSON object for adding voice comments to tickets is different. See [Adding voice comments to tickets](/documentation/ticketing/managing-tickets/adding-voice-comments-to-tickets)\n */\nexport const zModelFromZendesk = z.string();\n\n/**\n * This is a model with one string property\n */\nexport const zModelWithNullableString = z.object({\n    nullableProp1: z.string().nullish(),\n    nullableRequiredProp1: z.string().nullable(),\n    nullableProp2: z.string().nullish(),\n    nullableRequiredProp2: z.string().nullable(),\n    'foo_bar-enum': z.enum([\n        'Success',\n        'Warning',\n        'Error',\n        'ØÆÅ字符串'\n    ]).optional()\n});\n\n/**\n * This is a model with one enum\n */\nexport const zModelWithEnum = z.object({\n    'foo_bar-enum': z.enum([\n        'Success',\n        'Warning',\n        'Error',\n        'ØÆÅ字符串'\n    ]).optional(),\n    statusCode: z.enum([\n        '100',\n        '200 FOO',\n        '300 FOO_BAR',\n        '400 foo-bar',\n        '500 foo.bar',\n        '600 foo&bar'\n    ]).optional(),\n    bool: z.literal(true).optional()\n});\n\n/**\n * This is a model with one enum with escaped name\n */\nexport const zModelWithEnumWithHyphen = z.object({\n    'foo-bar-baz-qux': z.enum(['3.0']).optional()\n});\n\n/**\n * This is a model with one enum\n */\nexport const zModelWithEnumFromDescription = z.object({\n    test: z.int().optional()\n});\n\n/**\n * This is a model with nested enums\n */\nexport const zModelWithNestedEnums = z.object({\n    dictionaryWithEnum: z.record(z.string(), z.enum([\n        'Success',\n        'Warning',\n        'Error'\n    ])).optional(),\n    dictionaryWithEnumFromDescription: z.record(z.string(), z.int()).optional(),\n    arrayWithEnum: z.array(z.enum([\n        'Success',\n        'Warning',\n        'Error'\n    ])).optional(),\n    arrayWithDescription: z.array(z.int()).optional(),\n    'foo_bar-enum': z.enum([\n        'Success',\n        'Warning',\n        'Error',\n        'ØÆÅ字符串'\n    ]).optional()\n});\n\n/**\n * This is a model with one property containing an array\n */\nexport const zModelWithArray = z.object({\n    prop: z.array(zModelWithString).optional(),\n    propWithFile: z.array(z.string()).optional(),\n    propWithNumber: z.array(z.number()).optional()\n});\n\n/**\n * This is a model with one property containing a dictionary\n */\nexport const zModelWithDictionary = z.object({\n    prop: z.record(z.string(), z.string()).optional()\n});\n\n/**\n * This is a deprecated model with a deprecated property\n *\n * @deprecated\n */\nexport const zDeprecatedModel = z.object({\n    prop: z.string().optional()\n});\n\n/**\n * This is a model with one property containing a circular reference\n */\nexport const zModelWithCircularReference = z.object({\n    prop: z.lazy((): any => zModelWithCircularReference).optional()\n});\n\n/**\n * This is a model with one property with a 'one of' relationship\n */\nexport const zCompositionWithOneOf = z.object({\n    propA: z.union([\n        zModelWithString,\n        zModelWithEnum,\n        zModelWithArray,\n        zModelWithDictionary\n    ]).optional()\n});\n\n/**\n * This is a model with one property with a 'one of' relationship where the options are not $ref\n */\nexport const zCompositionWithOneOfAnonymous = z.object({\n    propA: z.union([\n        z.object({\n            propA: z.string().optional()\n        }),\n        z.string(),\n        z.int()\n    ]).optional()\n});\n\n/**\n * Circle\n */\nexport const zModelCircle = z.object({\n    kind: z.string(),\n    radius: z.number().optional()\n});\n\n/**\n * Square\n */\nexport const zModelSquare = z.object({\n    kind: z.string(),\n    sideLength: z.number().optional()\n});\n\n/**\n * This is a model with one property with a 'one of' relationship where the options are not $ref\n */\nexport const zCompositionWithOneOfDiscriminator = z.union([\n    z.object({\n        kind: z.literal('circle')\n    }).and(zModelCircle),\n    z.object({\n        kind: z.literal('square')\n    }).and(zModelSquare)\n]);\n\n/**\n * This is a model with one property with a 'any of' relationship\n */\nexport const zCompositionWithAnyOf = z.object({\n    propA: z.union([\n        zModelWithString,\n        zModelWithEnum,\n        zModelWithArray,\n        zModelWithDictionary\n    ]).optional()\n});\n\n/**\n * This is a model with one property with a 'any of' relationship where the options are not $ref\n */\nexport const zCompositionWithAnyOfAnonymous = z.object({\n    propA: z.union([\n        z.object({\n            propA: z.string().optional()\n        }),\n        z.string(),\n        z.int()\n    ]).optional()\n});\n\n/**\n * This is a model with nested 'any of' property with a type null\n */\nexport const zCompositionWithNestedAnyAndTypeNull = z.object({\n    propA: z.union([\n        z.array(zModelWithDictionary.nullable()),\n        z.array(zModelWithArray.nullable())\n    ]).optional()\n});\n\nexport const z3eNum1Период = z.enum(['Bird', 'Dog']);\n\nexport const zConstValue = z.enum(['ConstValue']);\n\n/**\n * This is a model with one property with a 'any of' relationship where the options are not $ref\n */\nexport const zCompositionWithNestedAnyOfAndNull = z.object({\n    propA: z.array(z.union([z3eNum1Период, zConstValue])).nullish()\n});\n\n/**\n * This is a model with one property with a 'one of' relationship\n */\nexport const zCompositionWithOneOfAndNullable = z.object({\n    propA: z.union([\n        z.object({\n            boolean: z.boolean().optional()\n        }),\n        zModelWithEnum,\n        zModelWithArray,\n        zModelWithDictionary\n    ]).nullish()\n});\n\n/**\n * This is a model that contains a simple dictionary within composition\n */\nexport const zCompositionWithOneOfAndSimpleDictionary = z.object({\n    propA: z.union([\n        z.boolean(),\n        z.record(z.string(), z.number())\n    ]).optional()\n});\n\n/**\n * This is a model that contains a dictionary of simple arrays within composition\n */\nexport const zCompositionWithOneOfAndSimpleArrayDictionary = z.object({\n    propA: z.union([\n        z.boolean(),\n        z.record(z.string(), z.array(z.boolean()))\n    ]).optional()\n});\n\n/**\n * This is a model that contains a dictionary of complex arrays (composited) within composition\n */\nexport const zCompositionWithOneOfAndComplexArrayDictionary = z.object({\n    propA: z.union([\n        z.boolean(),\n        z.record(z.string(), z.array(z.union([z.number(), z.string()])))\n    ]).optional()\n});\n\n/**\n * This is a model with one property with a 'all of' relationship\n */\nexport const zCompositionWithAllOfAndNullable = z.object({\n    propA: z.object({\n        boolean: z.boolean().optional()\n    }).and(zModelWithEnum).and(zModelWithArray).and(zModelWithDictionary).nullish()\n});\n\n/**\n * This is a model with one property with a 'any of' relationship\n */\nexport const zCompositionWithAnyOfAndNullable = z.object({\n    propA: z.union([\n        z.object({\n            boolean: z.boolean().optional()\n        }),\n        zModelWithEnum,\n        zModelWithArray,\n        zModelWithDictionary\n    ]).nullish()\n});\n\n/**\n * This is a base model with two simple optional properties\n */\nexport const zCompositionBaseModel = z.object({\n    firstName: z.string().optional(),\n    lastname: z.string().optional()\n});\n\n/**\n * This is a model that extends the base model\n */\nexport const zCompositionExtendedModel = zCompositionBaseModel.and(z.object({\n    age: z.number(),\n    firstName: z.string(),\n    lastname: z.string()\n}));\n\n/**\n * This is a model with one nested property\n */\nexport const zModelWithProperties = z.object({\n    required: z.string(),\n    requiredAndReadOnly: z.string().readonly(),\n    requiredAndNullable: z.string().nullable(),\n    string: z.string().optional(),\n    number: z.number().optional(),\n    boolean: z.boolean().optional(),\n    reference: zModelWithString.optional(),\n    'property with space': z.string().optional(),\n    default: z.string().optional(),\n    try: z.string().optional(),\n    '@namespace.string': z.string().readonly().optional(),\n    '@namespace.integer': z.int().readonly().optional()\n});\n\n/**\n * This is a model with one property containing a reference\n */\nexport const zModelWithReference = z.object({\n    prop: zModelWithProperties.optional()\n});\n\n/**\n * This is a model with one nested property\n */\nexport const zModelWithNestedProperties = z.object({\n    first: z.object({\n        second: z.object({\n            third: z.string().readonly().nullable()\n        }).readonly().nullable()\n    }).readonly().nullable()\n});\n\n/**\n * This is a model with duplicated properties\n */\nexport const zModelWithDuplicateProperties = z.object({\n    prop: zModelWithString.optional()\n});\n\n/**\n * This is a model with ordered properties\n */\nexport const zModelWithOrderedProperties = z.object({\n    zebra: z.string().optional(),\n    apple: z.string().optional(),\n    hawaii: z.string().optional()\n});\n\n/**\n * This is a model with duplicated imports\n */\nexport const zModelWithDuplicateImports = z.object({\n    propA: zModelWithString.optional(),\n    propB: zModelWithString.optional(),\n    propC: zModelWithString.optional()\n});\n\n/**\n * This is a model that extends another model\n */\nexport const zModelThatExtends = zModelWithString.and(z.object({\n    propExtendsA: z.string().optional(),\n    propExtendsB: zModelWithString.optional()\n}));\n\n/**\n * This is a model that extends another model\n */\nexport const zModelThatExtendsExtends = zModelWithString.and(zModelThatExtends).and(z.object({\n    propExtendsC: z.string().optional(),\n    propExtendsD: zModelWithString.optional()\n}));\n\n/**\n * This is a model that contains a some patterns\n */\nexport const zModelWithPattern = z.object({\n    key: z.string().max(64).regex(/^[a-zA-Z0-9_]*$/),\n    name: z.string().max(255),\n    enabled: z.boolean().readonly().optional(),\n    modified: z.iso.datetime().readonly().optional(),\n    id: z.string().regex(/^\\d{2}-\\d{3}-\\d{4}$/).optional(),\n    text: z.string().regex(/^\\w+$/).optional(),\n    patternWithSingleQuotes: z.string().regex(/^[a-zA-Z0-9']*$/).optional(),\n    patternWithNewline: z.string().regex(/aaa\\nbbb/).optional(),\n    patternWithBacktick: z.string().regex(/aaa`bbb/).optional(),\n    patternWithUnicode: z.string().regex(/^\\p{L}+$/u).optional()\n});\n\nexport const zFile = z.object({\n    id: z.string().min(1).readonly().optional(),\n    updated_at: z.iso.datetime().readonly().optional(),\n    created_at: z.iso.datetime().readonly().optional(),\n    mime: z.string().min(1).max(24),\n    file: z.url().readonly().optional()\n});\n\nexport const zDefault = z.object({\n    name: z.string().optional()\n});\n\nexport const zPageable = z.object({\n    page: z.int().gte(0).max(2147483647, { error: 'Invalid value: Expected int32 to be <= 2147483647' }).optional().default(0),\n    size: z.int().gte(1).max(2147483647, { error: 'Invalid value: Expected int32 to be <= 2147483647' }).optional(),\n    sort: z.array(z.string()).optional()\n});\n\n/**\n * This is a free-form object without additionalProperties.\n */\nexport const zFreeFormObjectWithoutAdditionalProperties = z.record(z.string(), z.unknown());\n\n/**\n * This is a free-form object with additionalProperties: true.\n */\nexport const zFreeFormObjectWithAdditionalPropertiesEqTrue = z.record(z.string(), z.unknown());\n\n/**\n * This is a free-form object with additionalProperties: {}.\n */\nexport const zFreeFormObjectWithAdditionalPropertiesEqEmptyObject = z.record(z.string(), z.unknown());\n\nexport const zModelWithConst = z.object({\n    String: z.enum(['String']).optional(),\n    number: z.literal(0).optional(),\n    null: z.unknown().optional(),\n    withType: z.enum(['Some string']).optional()\n});\n\n/**\n * This is a model with one property and additionalProperties: true\n */\nexport const zModelWithAdditionalPropertiesEqTrue = z.object({\n    prop: z.string().optional()\n});\n\nexport const zNestedAnyOfArraysNullable = z.object({\n    nullableArray: z.array(z.union([z.string(), z.boolean()])).nullish()\n});\n\n/**\n * An object that can be null\n */\nexport const zNullableObject = z.object({\n    foo: z.string().optional()\n}).nullable().default(null);\n\n/**\n * Some % character\n */\nexport const zCharactersInDescription = z.string();\n\nexport const zModelWithNullableObject = z.object({\n    data: zNullableObject.optional()\n});\n\n/**\n * An object with additional properties that can be null\n */\nexport const zModelWithAdditionalPropertiesRef = z.record(z.string(), zNullableObject.nullable());\n\nexport const zModelWithOneOfEnum = z.union([\n    z.object({\n        foo: z.enum(['Bar'])\n    }),\n    z.object({\n        foo: z.enum(['Baz'])\n    }),\n    z.object({\n        foo: z.enum(['Qux'])\n    }),\n    z.object({\n        content: z.iso.datetime(),\n        foo: z.enum(['Quux'])\n    }),\n    z.object({\n        content: z.tuple([z.iso.datetime(), z.iso.datetime()]),\n        foo: z.enum(['Corge'])\n    })\n]);\n\nexport const zModelWithNestedArrayEnumsDataFoo = z.enum(['foo', 'bar']);\n\nexport const zModelWithNestedArrayEnumsDataBar = z.enum(['baz', 'qux']);\n\nexport const zModelWithNestedArrayEnumsData = z.object({\n    foo: z.array(zModelWithNestedArrayEnumsDataFoo).optional(),\n    bar: z.array(zModelWithNestedArrayEnumsDataBar).optional()\n});\n\nexport const zModelWithNestedArrayEnums = z.object({\n    array_strings: z.array(z.string()).optional(),\n    data: zModelWithNestedArrayEnumsData.optional()\n});\n\nexport const zModelWithNestedCompositionEnums = z.object({\n    foo: zModelWithNestedArrayEnumsDataFoo.optional()\n});\n\nexport const zModelWithReadOnlyAndWriteOnly = z.object({\n    foo: z.string(),\n    bar: z.string().readonly()\n});\n\n/**\n * This is a model with one property containing an array\n */\nexport const zModelWithArrayReadOnlyAndWriteOnly = z.object({\n    prop: z.array(zModelWithReadOnlyAndWriteOnly).optional(),\n    propWithFile: z.array(z.string()).optional(),\n    propWithNumber: z.array(z.number()).optional()\n});\n\nexport const zModelWithConstantSizeArray = z.tuple([z.number(), z.number()]);\n\nexport const zModelWithAnyOfConstantSizeArray = z.tuple([\n    z.union([\n        z.number(),\n        z.string()\n    ]),\n    z.union([\n        z.number(),\n        z.string()\n    ]),\n    z.union([\n        z.number(),\n        z.string()\n    ])\n]);\n\nexport const zModelWithPrefixItemsConstantSizeArray = z.array(z.union([\n    zModelWithInteger,\n    z.number(),\n    z.string()\n]));\n\nexport const zModelWithAnyOfConstantSizeArrayNullable = z.tuple([\n    z.union([\n        z.number(),\n        z.string()\n    ]).nullable(),\n    z.union([\n        z.number(),\n        z.string()\n    ]).nullable(),\n    z.union([\n        z.number(),\n        z.string()\n    ]).nullable()\n]);\n\nexport const zModelWithAnyOfConstantSizeArrayAndIntersect = z.tuple([z.intersection(z.number(), z.string()), z.intersection(z.number(), z.string())]);\n\nexport const zModelWithNumericEnumUnion = z.object({\n    value: z.union([\n        z.literal(-10),\n        z.literal(-1),\n        z.literal(0),\n        z.literal(1),\n        z.literal(3),\n        z.literal(6),\n        z.literal(12)\n    ]).optional()\n});\n\n/**\n * Some description with `back ticks`\n */\nexport const zModelWithBackticksInDescription = z.object({\n    template: z.string().optional()\n});\n\n/**\n * Model used to test deduplication strategy (unused)\n */\nexport const zParameterSimpleParameterUnused = z.string();\n\n/**\n * Model used to test deduplication strategy\n */\nexport const zPostServiceWithEmptyTagResponse = z.string();\n\n/**\n * Model used to test deduplication strategy\n */\nexport const zPostServiceWithEmptyTagResponse2 = z.string();\n\n/**\n * Model used to test deduplication strategy\n */\nexport const zDeleteFooData = z.string();\n\n/**\n * Model used to test deduplication strategy\n */\nexport const zDeleteFooData2 = z.string();\n\n/**\n * Model with restricted keyword name\n */\nexport const zImport = z.string();\n\nexport const zModelWithAnyOfConstantSizeArrayWithNSizeAndOptions = z.tuple([z.union([\n        z.number(),\n        zImport\n    ]), z.union([\n        z.number(),\n        zImport\n    ])]);\n\nexport const zSchemaWithFormRestrictedKeys = z.object({\n    description: z.string().optional(),\n    'x-enum-descriptions': z.string().optional(),\n    'x-enum-varnames': z.string().optional(),\n    'x-enumNames': z.string().optional(),\n    title: z.string().optional(),\n    object: z.object({\n        description: z.string().optional(),\n        'x-enum-descriptions': z.string().optional(),\n        'x-enum-varnames': z.string().optional(),\n        'x-enumNames': z.string().optional(),\n        title: z.string().optional()\n    }).optional(),\n    array: z.array(z.object({\n        description: z.string().optional(),\n        'x-enum-descriptions': z.string().optional(),\n        'x-enum-varnames': z.string().optional(),\n        'x-enumNames': z.string().optional(),\n        title: z.string().optional()\n    })).optional()\n});\n\n/**\n * This schema was giving PascalCase transformations a hard time\n */\nexport const zIoK8sApimachineryPkgApisMetaV1Preconditions = z.object({\n    resourceVersion: z.string().optional(),\n    uid: z.string().optional()\n});\n\n/**\n * This schema was giving PascalCase transformations a hard time\n */\nexport const zIoK8sApimachineryPkgApisMetaV1DeleteOptions = z.object({\n    preconditions: zIoK8sApimachineryPkgApisMetaV1Preconditions.optional()\n});\n\nexport const zAdditionalPropertiesUnknownIssue = z.record(z.string(), z.union([\n    z.string(),\n    z.number()\n]));\n\nexport const zAdditionalPropertiesUnknownIssue2 = z.record(z.string(), z.union([\n    z.string(),\n    z.number()\n]));\n\nexport const zAdditionalPropertiesUnknownIssue3 = z.intersection(z.string(), z.object({\n    entries: z.record(z.string(), zAdditionalPropertiesUnknownIssue)\n}));\n\nexport const zAdditionalPropertiesIntegerIssue = z.object({\n    value: z.int()\n});\n\nexport const zGenericSchemaDuplicateIssue1SystemBoolean = z.object({\n    item: z.boolean().optional(),\n    error: z.string().nullish(),\n    hasError: z.boolean().readonly().optional(),\n    data: z.record(z.string(), z.never()).optional()\n});\n\nexport const zGenericSchemaDuplicateIssue1SystemString = z.object({\n    item: z.string().nullish(),\n    error: z.string().nullish(),\n    hasError: z.boolean().readonly().optional()\n});\n\nexport const zOneOfAllOfIssue = z.union([\n    z.intersection(z.union([\n        zConstValue,\n        zGenericSchemaDuplicateIssue1SystemBoolean\n    ]), z3eNum1Период),\n    zGenericSchemaDuplicateIssue1SystemString\n]);\n\nexport const zExternalSharedModel = z.object({\n    id: z.string(),\n    name: z.string().optional()\n});\n\nexport const zExternalRefA = zExternalSharedModel;\n\nexport const zExternalRefB = zExternalSharedModel;\n\n/**\n * This is a model with one nested property\n */\nexport const zModelWithPropertiesWritable = z.object({\n    required: z.string(),\n    requiredAndNullable: z.string().nullable(),\n    string: z.string().optional(),\n    number: z.number().optional(),\n    boolean: z.boolean().optional(),\n    reference: zModelWithString.optional(),\n    'property with space': z.string().optional(),\n    default: z.string().optional(),\n    try: z.string().optional()\n});\n\n/**\n * This is a model with one property containing a reference\n */\nexport const zModelWithReferenceWritable = z.object({\n    prop: zModelWithPropertiesWritable.optional()\n});\n\n/**\n * This is a model that contains a some patterns\n */\nexport const zModelWithPatternWritable = z.object({\n    key: z.string().max(64).regex(/^[a-zA-Z0-9_]*$/),\n    name: z.string().max(255),\n    id: z.string().regex(/^\\d{2}-\\d{3}-\\d{4}$/).optional(),\n    text: z.string().regex(/^\\w+$/).optional(),\n    patternWithSingleQuotes: z.string().regex(/^[a-zA-Z0-9']*$/).optional(),\n    patternWithNewline: z.string().regex(/aaa\\nbbb/).optional(),\n    patternWithBacktick: z.string().regex(/aaa`bbb/).optional(),\n    patternWithUnicode: z.string().regex(/^\\p{L}+$/u).optional()\n});\n\nexport const zFileWritable = z.object({\n    mime: z.string().min(1).max(24)\n});\n\nexport const zModelWithReadOnlyAndWriteOnlyWritable = z.object({\n    foo: z.string(),\n    baz: z.string()\n});\n\n/**\n * This is a model with one property containing an array\n */\nexport const zModelWithArrayReadOnlyAndWriteOnlyWritable = z.object({\n    prop: z.array(zModelWithReadOnlyAndWriteOnlyWritable).optional(),\n    propWithFile: z.array(z.string()).optional(),\n    propWithNumber: z.array(z.number()).optional()\n});\n\nexport const zModelWithAnyOfConstantSizeArrayWithNSizeAndOptionsWritable = z.tuple([z.union([\n        z.number(),\n        zImport\n    ]), z.union([\n        z.number(),\n        zImport\n    ])]);\n\nexport const zAdditionalPropertiesUnknownIssueWritable = z.record(z.string(), z.union([\n    z.string(),\n    z.number()\n]));\n\nexport const zOneOfAllOfIssueWritable = z.union([\n    z.intersection(z.union([\n        zConstValue,\n        zGenericSchemaDuplicateIssue1SystemBoolean\n    ]), z3eNum1Период),\n    zGenericSchemaDuplicateIssue1SystemString\n]);\n\nexport const zGenericSchemaDuplicateIssue1SystemBooleanWritable = z.object({\n    item: z.boolean().optional(),\n    error: z.string().nullish(),\n    data: z.record(z.string(), z.never()).optional()\n});\n\nexport const zGenericSchemaDuplicateIssue1SystemStringWritable = z.object({\n    item: z.string().nullish(),\n    error: z.string().nullish()\n});\n\n/**\n * This is a reusable parameter\n */\nexport const zSimpleParameter = z.string();\n\nexport const zCompositionWithOneOfAndProperties = z.intersection(z.union([\n    z.object({\n        foo: zSimpleParameter\n    }),\n    z.object({\n        bar: zNonAsciiStringæøåÆøÅöôêÊ字符串\n    })\n]), z.object({\n    baz: z.int().gte(0).max(65535, { error: 'Invalid value: Expected uint16 to be <= 65535' }).nullable(),\n    qux: z.int().gte(0).max(255, { error: 'Invalid value: Expected uint8 to be <= 255' })\n}));\n\nexport const zModelWithOneOfAndProperties = z.intersection(z.union([\n    zSimpleParameter,\n    zNonAsciiStringæøåÆøÅöôêÊ字符串\n]), z.object({\n    baz: z.int().gte(0).max(65535, { error: 'Invalid value: Expected uint16 to be <= 65535' }).nullable(),\n    qux: z.int().gte(0).max(255, { error: 'Invalid value: Expected uint8 to be <= 255' })\n}));\n\n/**\n * Parameter with illegal characters\n */\nexport const zXFooBar = zModelWithString;\n\nexport const zSimpleRequestBody = zModelWithString;\n\nexport const zSimpleFormData = zModelWithString;\n\nexport const zExportData = z.object({\n    body: z.never().optional(),\n    path: z.never().optional(),\n    query: z.never().optional()\n});\n\nexport const zPatchApiVbyApiVersionNoTagData = z.object({\n    body: z.never().optional(),\n    path: z.never().optional(),\n    query: z.never().optional()\n});\n\nexport const zImportData = z.object({\n    body: z.union([\n        zModelWithReadOnlyAndWriteOnlyWritable,\n        zModelWithArrayReadOnlyAndWriteOnlyWritable\n    ]),\n    path: z.never().optional(),\n    query: z.never().optional()\n});\n\nexport const zImportResponse = z.union([\n    zModelFromZendesk,\n    zModelWithReadOnlyAndWriteOnly\n]);\n\nexport const zFooWowData = z.object({\n    body: z.never().optional(),\n    path: z.never().optional(),\n    query: z.never().optional()\n});\n\nexport const zApiVVersionODataControllerCountData = z.object({\n    body: z.never().optional(),\n    path: z.never().optional(),\n    query: z.never().optional()\n});\n\n/**\n * Success\n */\nexport const zApiVVersionODataControllerCountResponse = zModelFromZendesk;\n\nexport const zGetApiVbyApiVersionSimpleOperationData = z.object({\n    body: z.never().optional(),\n    path: z.object({\n        foo_param: z.string()\n    }),\n    query: z.never().optional()\n});\n\n/**\n * Response is a simple number\n */\nexport const zGetApiVbyApiVersionSimpleOperationResponse = z.number();\n\nexport const zDeleteCallWithoutParametersAndResponseData = z.object({\n    body: z.never().optional(),\n    path: z.never().optional(),\n    query: z.never().optional()\n});\n\nexport const zGetCallWithoutParametersAndResponseData = z.object({\n    body: z.never().optional(),\n    path: z.never().optional(),\n    query: z.never().optional()\n});\n\nexport const zHeadCallWithoutParametersAndResponseData = z.object({\n    body: z.never().optional(),\n    path: z.never().optional(),\n    query: z.never().optional()\n});\n\nexport const zOptionsCallWithoutParametersAndResponseData = z.object({\n    body: z.never().optional(),\n    path: z.never().optional(),\n    query: z.never().optional()\n});\n\nexport const zPatchCallWithoutParametersAndResponseData = z.object({\n    body: z.never().optional(),\n    path: z.never().optional(),\n    query: z.never().optional()\n});\n\nexport const zPostCallWithoutParametersAndResponseData = z.object({\n    body: z.never().optional(),\n    path: z.never().optional(),\n    query: z.never().optional()\n});\n\nexport const zPutCallWithoutParametersAndResponseData = z.object({\n    body: z.never().optional(),\n    path: z.never().optional(),\n    query: z.never().optional()\n});\n\nexport const zDeleteFooData3 = z.object({\n    body: z.never().optional(),\n    path: z.object({\n        foo_param: z.string(),\n        BarParam: z.string()\n    }),\n    query: z.never().optional(),\n    headers: z.object({\n        'x-Foo-Bar': zModelWithString\n    })\n});\n\nexport const zCallWithDescriptionsData = z.object({\n    body: z.never().optional(),\n    path: z.never().optional(),\n    query: z.object({\n        parameterWithBreaks: z.string().optional(),\n        parameterWithBackticks: z.string().optional(),\n        parameterWithSlashes: z.string().optional(),\n        parameterWithExpressionPlaceholders: z.string().optional(),\n        parameterWithQuotes: z.string().optional(),\n        parameterWithReservedCharacters: z.string().optional()\n    }).optional()\n});\n\nexport const zDeprecatedCallData = z.object({\n    body: z.never().optional(),\n    path: z.never().optional(),\n    query: z.never().optional(),\n    headers: z.object({\n        parameter: zDeprecatedModel.nullable()\n    })\n});\n\nexport const zCallWithParametersData = z.object({\n    body: z.record(z.string(), z.unknown()).nullable(),\n    path: z.object({\n        parameterPath: z.string().nullable(),\n        'api-version': z.string().nullable()\n    }),\n    query: z.object({\n        foo_ref_enum: zModelWithNestedArrayEnumsDataFoo.optional(),\n        foo_all_of_enum: zModelWithNestedArrayEnumsDataFoo,\n        cursor: z.string().nullable()\n    }),\n    headers: z.object({\n        parameterHeader: z.string().nullable()\n    })\n});\n\nexport const zCallWithWeirdParameterNamesData = z.object({\n    body: zModelWithString.nullable(),\n    path: z.object({\n        'parameter.path.1': z.string().optional(),\n        'parameter-path-2': z.string().optional(),\n        'PARAMETER-PATH-3': z.string().optional(),\n        'api-version': z.string().nullable()\n    }),\n    query: z.object({\n        default: z.string().optional(),\n        'parameter-query': z.string().nullable()\n    }),\n    headers: z.object({\n        'parameter.header': z.string().nullable()\n    })\n});\n\nexport const zGetCallWithOptionalParamData = z.object({\n    body: zModelWithOneOfEnum,\n    path: z.never().optional(),\n    query: z.object({\n        page: z.number().optional()\n    }).optional()\n});\n\nexport const zPostCallWithOptionalParamData = z.object({\n    body: z.object({\n        offset: z.number().nullish()\n    }).optional(),\n    path: z.never().optional(),\n    query: z.object({\n        parameter: zPageable\n    })\n});\n\nexport const zPostCallWithOptionalParamResponse = z.union([\n    z.number(),\n    z.void()\n]);\n\nexport const zPostApiVbyApiVersionRequestBodyData = z.object({\n    body: zSimpleRequestBody.optional(),\n    path: z.never().optional(),\n    query: z.object({\n        parameter: z.string().optional()\n    }).optional()\n});\n\nexport const zPostApiVbyApiVersionFormDataData = z.object({\n    body: zSimpleFormData.optional(),\n    path: z.never().optional(),\n    query: z.object({\n        parameter: z.string().optional()\n    }).optional()\n});\n\nexport const zCallWithDefaultParametersData = z.object({\n    body: z.never().optional(),\n    path: z.never().optional(),\n    query: z.object({\n        parameterString: z.string().nullish().default('Hello World!'),\n        parameterNumber: z.number().nullish().default(123),\n        parameterBoolean: z.boolean().nullish().default(true),\n        parameterEnum: z.enum([\n            'Success',\n            'Warning',\n            'Error'\n        ]).optional(),\n        parameterModel: zModelWithString.nullish()\n    }).optional()\n});\n\nexport const zCallWithDefaultOptionalParametersData = z.object({\n    body: z.never().optional(),\n    path: z.never().optional(),\n    query: z.object({\n        parameterString: z.string().optional().default('Hello World!'),\n        parameterNumber: z.number().optional().default(123),\n        parameterBoolean: z.boolean().optional().default(true),\n        parameterEnum: z.enum([\n            'Success',\n            'Warning',\n            'Error'\n        ]).optional(),\n        parameterModel: zModelWithString.optional()\n    }).optional()\n});\n\nexport const zCallToTestOrderOfParamsData = z.object({\n    body: z.never().optional(),\n    path: z.never().optional(),\n    query: z.object({\n        parameterOptionalStringWithDefault: z.string().optional().default('Hello World!'),\n        parameterOptionalStringWithEmptyDefault: z.string().optional().default(''),\n        parameterOptionalStringWithNoDefault: z.string().optional(),\n        parameterStringWithDefault: z.string().default('Hello World!'),\n        parameterStringWithEmptyDefault: z.string().default(''),\n        parameterStringWithNoDefault: z.string(),\n        parameterStringNullableWithNoDefault: z.string().nullish(),\n        parameterStringNullableWithDefault: z.string().nullish().default(null)\n    })\n});\n\nexport const zDuplicateNameData = z.object({\n    body: z.never().optional(),\n    path: z.never().optional(),\n    query: z.never().optional()\n});\n\nexport const zDuplicateName2Data = z.object({\n    body: z.never().optional(),\n    path: z.never().optional(),\n    query: z.never().optional()\n});\n\nexport const zDuplicateName3Data = z.object({\n    body: z.never().optional(),\n    path: z.never().optional(),\n    query: z.never().optional()\n});\n\nexport const zDuplicateName4Data = z.object({\n    body: z.never().optional(),\n    path: z.never().optional(),\n    query: z.never().optional()\n});\n\nexport const zCallWithNoContentResponseData = z.object({\n    body: z.never().optional(),\n    path: z.never().optional(),\n    query: z.never().optional()\n});\n\n/**\n * Success\n */\nexport const zCallWithNoContentResponseResponse = z.void();\n\nexport const zCallWithResponseAndNoContentResponseData = z.object({\n    body: z.never().optional(),\n    path: z.never().optional(),\n    query: z.never().optional()\n});\n\nexport const zCallWithResponseAndNoContentResponseResponse = z.union([\n    z.number(),\n    z.void()\n]);\n\nexport const zDummyAData = z.object({\n    body: z.never().optional(),\n    path: z.never().optional(),\n    query: z.never().optional()\n});\n\nexport const zDummyAResponse = z400;\n\nexport const zDummyBData = z.object({\n    body: z.never().optional(),\n    path: z.never().optional(),\n    query: z.never().optional()\n});\n\n/**\n * Success\n */\nexport const zDummyBResponse = z.void();\n\nexport const zCallWithResponseData = z.object({\n    body: z.never().optional(),\n    path: z.never().optional(),\n    query: z.never().optional()\n});\n\nexport const zCallWithResponseResponse = zImport;\n\nexport const zCallWithDuplicateResponsesData = z.object({\n    body: z.never().optional(),\n    path: z.never().optional(),\n    query: z.never().optional()\n});\n\nexport const zCallWithDuplicateResponsesResponse = z.union([\n    zModelWithBoolean.and(zModelWithInteger),\n    zModelWithString\n]);\n\nexport const zCallWithResponsesData = z.object({\n    body: z.never().optional(),\n    path: z.never().optional(),\n    query: z.never().optional()\n});\n\nexport const zCallWithResponsesResponse = z.union([\n    z.object({\n        '@namespace.string': z.string().readonly().optional(),\n        '@namespace.integer': z.int().readonly().optional(),\n        value: z.array(zModelWithString).readonly().optional()\n    }),\n    zModelThatExtends,\n    zModelThatExtendsExtends\n]);\n\nexport const zCollectionFormatData = z.object({\n    body: z.never().optional(),\n    path: z.never().optional(),\n    query: z.object({\n        parameterArrayCSV: z.array(z.string()).nullable(),\n        parameterArraySSV: z.array(z.string()).nullable(),\n        parameterArrayTSV: z.array(z.string()).nullable(),\n        parameterArrayPipes: z.array(z.string()).nullable(),\n        parameterArrayMulti: z.array(z.string()).nullable()\n    })\n});\n\nexport const zTypesData = z.object({\n    body: z.never().optional(),\n    path: z.object({\n        id: z.int().min(-2147483648, { error: 'Invalid value: Expected int32 to be >= -2147483648' }).max(2147483647, { error: 'Invalid value: Expected int32 to be <= 2147483647' }).optional()\n    }).optional(),\n    query: z.object({\n        parameterNumber: z.number().default(123),\n        parameterString: z.string().nullable().default('default'),\n        parameterBoolean: z.boolean().nullable().default(true),\n        parameterObject: z.record(z.string(), z.unknown()).nullable().default(null),\n        parameterArray: z.array(z.string()).nullable(),\n        parameterDictionary: z.record(z.string(), z.unknown()).nullable(),\n        parameterEnum: z.enum([\n            'Success',\n            'Warning',\n            'Error'\n        ])\n    })\n});\n\nexport const zTypesResponse = z.union([\n    z.number(),\n    z.string(),\n    z.boolean(),\n    z.record(z.string(), z.unknown())\n]);\n\nexport const zUploadFileData = z.object({\n    body: z.string(),\n    path: z.object({\n        'api-version': z.string().nullable()\n    }),\n    query: z.never().optional()\n});\n\nexport const zUploadFileResponse = z.boolean();\n\nexport const zFileResponseData = z.object({\n    body: z.never().optional(),\n    path: z.object({\n        id: z.string(),\n        'api-version': z.string()\n    }),\n    query: z.never().optional()\n});\n\n/**\n * Success\n */\nexport const zFileResponseResponse = z.string();\n\nexport const zComplexTypesData = z.object({\n    body: z.never().optional(),\n    path: z.never().optional(),\n    query: z.object({\n        parameterObject: z.object({\n            first: z.object({\n                second: z.object({\n                    third: z.string().optional()\n                }).optional()\n            }).optional()\n        }),\n        parameterReference: zModelWithString\n    })\n});\n\n/**\n * Successful response\n */\nexport const zComplexTypesResponse = z.array(zModelWithString);\n\nexport const zMultipartResponseData = z.object({\n    body: z.never().optional(),\n    path: z.never().optional(),\n    query: z.never().optional()\n});\n\n/**\n * OK\n */\nexport const zMultipartResponseResponse = z.object({\n    file: z.string().optional(),\n    metadata: z.object({\n        foo: z.string().optional(),\n        bar: z.string().optional()\n    }).optional()\n});\n\nexport const zMultipartRequestData = z.object({\n    body: z.object({\n        content: z.string().optional(),\n        data: zModelWithString.nullish()\n    }).optional(),\n    path: z.never().optional(),\n    query: z.never().optional()\n});\n\nexport const zComplexParamsData = z.object({\n    body: z.object({\n        key: z.string().max(64).regex(/^[a-zA-Z0-9_]*$/).readonly().nullable(),\n        name: z.string().max(255).nullable(),\n        enabled: z.boolean().optional().default(true),\n        type: z.enum([\n            'Monkey',\n            'Horse',\n            'Bird'\n        ]),\n        listOfModels: z.array(zModelWithString).nullish(),\n        listOfStrings: z.array(z.string()).nullish(),\n        parameters: z.union([\n            zModelWithString,\n            zModelWithEnum,\n            zModelWithArray,\n            zModelWithDictionary\n        ]),\n        user: z.object({\n            id: z.int().min(-2147483648, { error: 'Invalid value: Expected int32 to be >= -2147483648' }).max(2147483647, { error: 'Invalid value: Expected int32 to be <= 2147483647' }).readonly().optional(),\n            name: z.string().readonly().nullish()\n        }).readonly().optional()\n    }).optional(),\n    path: z.object({\n        id: z.int().min(-2147483648, { error: 'Invalid value: Expected int32 to be >= -2147483648' }).max(2147483647, { error: 'Invalid value: Expected int32 to be <= 2147483647' }),\n        'api-version': z.string()\n    }),\n    query: z.never().optional()\n});\n\n/**\n * Success\n */\nexport const zComplexParamsResponse = zModelWithString;\n\nexport const zCallWithResultFromHeaderData = z.object({\n    body: z.never().optional(),\n    path: z.never().optional(),\n    query: z.never().optional()\n});\n\nexport const zTestErrorCodeData = z.object({\n    body: z.never().optional(),\n    path: z.never().optional(),\n    query: z.object({\n        status: z.int()\n    })\n});\n\nexport const zNonAsciiæøåÆøÅöôêÊ字符串Data = z.object({\n    body: z.never().optional(),\n    path: z.never().optional(),\n    query: z.object({\n        nonAsciiParamæøåÆØÅöôêÊ: z.int()\n    })\n});\n\n/**\n * Successful response\n */\nexport const zNonAsciiæøåÆøÅöôêÊ字符串Response = z.array(zNonAsciiStringæøåÆøÅöôêÊ字符串);\n\nexport const zPutWithFormUrlEncodedData = z.object({\n    body: zArrayWithStrings,\n    path: z.never().optional(),\n    query: z.never().optional()\n});\n"
  },
  {
    "path": "packages/openapi-ts-tests/zod/v4/__snapshots__/3.0.x/v4/enum-null/zod.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport * as z from 'zod';\n\nexport const zFoo = z.enum(['foo', 'bar']).nullable();\n\nexport const zBar = z.enum(['foo', 'bar']);\n\nexport const zBaz = z.enum(['foo', 'bar']);\n"
  },
  {
    "path": "packages/openapi-ts-tests/zod/v4/__snapshots__/3.0.x/v4/type-format/client/client.gen.ts",
    "content": "// 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 (options: RequestOptions) => {\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 url = buildUrl(opts);\n\n    return { opts, url };\n  };\n\n  const request: Client['request'] = async (options) => {\n    // @ts-expect-error\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"
  },
  {
    "path": "packages/openapi-ts-tests/zod/v4/__snapshots__/3.0.x/v4/type-format/client/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type { Auth } from '../core/auth.gen';\nexport type { QuerySerializerOptions } from '../core/bodySerializer.gen';\nexport {\n  formDataBodySerializer,\n  jsonBodySerializer,\n  urlSearchParamsBodySerializer,\n} from '../core/bodySerializer.gen';\nexport { buildClientParams } from '../core/params.gen';\nexport { serializeQueryKeyValue } from '../core/queryKeySerializer.gen';\nexport { createClient } from './client.gen';\nexport type {\n  Client,\n  ClientOptions,\n  Config,\n  CreateClientConfig,\n  Options,\n  RequestOptions,\n  RequestResult,\n  ResolvedRequestOptions,\n  ResponseStyle,\n  TDataShape,\n} from './types.gen';\nexport { createConfig, mergeHeaders } from './utils.gen';\n"
  },
  {
    "path": "packages/openapi-ts-tests/zod/v4/__snapshots__/3.0.x/v4/type-format/client/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { Auth } from '../core/auth.gen';\nimport type {\n  ServerSentEventsOptions,\n  ServerSentEventsResult,\n} from '../core/serverSentEvents.gen';\nimport type { Client as CoreClient, Config as CoreConfig } from '../core/types.gen';\nimport type { Middleware } from './utils.gen';\n\nexport type ResponseStyle = 'data' | 'fields';\n\nexport interface Config<T extends ClientOptions = ClientOptions>\n  extends Omit<RequestInit, 'body' | 'headers' | 'method'>, CoreConfig {\n  /**\n   * Base URL for all requests made by this client.\n   */\n  baseUrl?: T['baseUrl'];\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   * Please don't use the Fetch client for Next.js applications. The `next`\n   * options won't have any effect.\n   *\n   * Install {@link https://www.npmjs.com/package/@hey-api/client-next `@hey-api/client-next`} instead.\n   */\n  next?: never;\n  /**\n   * Return the response data parsed in a specified format. By default, `auto`\n   * will infer the appropriate method from the `Content-Type` response header.\n   * You can override this behavior with any of the {@link Body} methods.\n   * Select `stream` if you don't want to parse response data at all.\n   *\n   * @default 'auto'\n   */\n  parseAs?: 'arrayBuffer' | 'auto' | 'blob' | 'formData' | 'json' | 'stream' | 'text';\n  /**\n   * Should we return only data or multiple fields (data, error, response, etc.)?\n   *\n   * @default 'fields'\n   */\n  responseStyle?: ResponseStyle;\n  /**\n   * Throw an error instead of returning it in the response?\n   *\n   * @default false\n   */\n  throwOnError?: T['throwOnError'];\n}\n\nexport interface RequestOptions<\n  TData = unknown,\n  TResponseStyle extends ResponseStyle = 'fields',\n  ThrowOnError extends boolean = boolean,\n  Url extends string = string,\n>\n  extends\n    Config<{\n      responseStyle: TResponseStyle;\n      throwOnError: ThrowOnError;\n    }>,\n    Pick<\n      ServerSentEventsOptions<TData>,\n      | 'onRequest'\n      | 'onSseError'\n      | 'onSseEvent'\n      | 'sseDefaultRetryDelay'\n      | 'sseMaxRetryAttempts'\n      | 'sseMaxRetryDelay'\n    > {\n  /**\n   * Any body that you want to add to your request.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/fetch#body}\n   */\n  body?: unknown;\n  path?: Record<string, unknown>;\n  query?: Record<string, unknown>;\n  /**\n   * Security mechanism(s) to use for the request.\n   */\n  security?: ReadonlyArray<Auth>;\n  url: Url;\n}\n\nexport interface ResolvedRequestOptions<\n  TResponseStyle extends ResponseStyle = 'fields',\n  ThrowOnError extends boolean = boolean,\n  Url extends string = string,\n> extends RequestOptions<unknown, TResponseStyle, ThrowOnError, Url> {\n  serializedBody?: string;\n}\n\nexport type RequestResult<\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = boolean,\n  TResponseStyle extends ResponseStyle = 'fields',\n> = ThrowOnError extends true\n  ? Promise<\n      TResponseStyle extends 'data'\n        ? TData extends Record<string, unknown>\n          ? TData[keyof TData]\n          : TData\n        : {\n            data: TData extends Record<string, unknown> ? TData[keyof TData] : TData;\n            request: Request;\n            response: Response;\n          }\n    >\n  : Promise<\n      TResponseStyle extends 'data'\n        ? (TData extends Record<string, unknown> ? TData[keyof TData] : TData) | undefined\n        : (\n            | {\n                data: TData extends Record<string, unknown> ? TData[keyof TData] : TData;\n                error: undefined;\n              }\n            | {\n                data: undefined;\n                error: TError extends Record<string, unknown> ? TError[keyof TError] : TError;\n              }\n          ) & {\n            request: Request;\n            response: Response;\n          }\n    >;\n\nexport interface ClientOptions {\n  baseUrl?: string;\n  responseStyle?: ResponseStyle;\n  throwOnError?: boolean;\n}\n\ntype MethodFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'>,\n) => RequestResult<TData, TError, ThrowOnError, TResponseStyle>;\n\ntype SseFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'>,\n) => Promise<ServerSentEventsResult<TData, TError>>;\n\ntype RequestFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'> &\n    Pick<Required<RequestOptions<TData, TResponseStyle, ThrowOnError>>, 'method'>,\n) => RequestResult<TData, TError, ThrowOnError, TResponseStyle>;\n\ntype BuildUrlFn = <\n  TData extends {\n    body?: unknown;\n    path?: Record<string, unknown>;\n    query?: Record<string, unknown>;\n    url: string;\n  },\n>(\n  options: TData & Options<TData>,\n) => string;\n\nexport type Client = CoreClient<RequestFn, Config, MethodFn, BuildUrlFn, SseFn> & {\n  interceptors: Middleware<Request, Response, unknown, ResolvedRequestOptions>;\n};\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 = ClientOptions> = (\n  override?: Config<ClientOptions & T>,\n) => Config<Required<ClientOptions> & T>;\n\nexport interface TDataShape {\n  body?: unknown;\n  headers?: unknown;\n  path?: unknown;\n  query?: unknown;\n  url: string;\n}\n\ntype OmitKeys<T, K> = Pick<T, Exclude<keyof T, K>>;\n\nexport type Options<\n  TData extends TDataShape = TDataShape,\n  ThrowOnError extends boolean = boolean,\n  TResponse = unknown,\n  TResponseStyle extends ResponseStyle = 'fields',\n> = OmitKeys<\n  RequestOptions<TResponse, TResponseStyle, ThrowOnError>,\n  'body' | 'path' | 'query' | 'url'\n> &\n  ([TData] extends [never] ? unknown : Omit<TData, 'url'>);\n"
  },
  {
    "path": "packages/openapi-ts-tests/zod/v4/__snapshots__/3.0.x/v4/type-format/client/utils.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/zod/v4/__snapshots__/3.0.x/v4/type-format/client.gen.ts",
    "content": "// 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>());\n"
  },
  {
    "path": "packages/openapi-ts-tests/zod/v4/__snapshots__/3.0.x/v4/type-format/core/auth.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/zod/v4/__snapshots__/3.0.x/v4/type-format/core/bodySerializer.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/zod/v4/__snapshots__/3.0.x/v4/type-format/core/params.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/zod/v4/__snapshots__/3.0.x/v4/type-format/core/pathSerializer.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/zod/v4/__snapshots__/3.0.x/v4/type-format/core/queryKeySerializer.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\n/**\n * JSON-friendly union that mirrors what Pinia Colada can hash.\n */\nexport type JsonValue =\n  | null\n  | string\n  | number\n  | boolean\n  | JsonValue[]\n  | { [key: string]: JsonValue };\n\n/**\n * Replacer that converts non-JSON values (bigint, Date, etc.) to safe substitutes.\n */\nexport const queryKeyJsonReplacer = (_key: string, value: unknown) => {\n  if (value === undefined || typeof value === 'function' || typeof value === 'symbol') {\n    return undefined;\n  }\n  if (typeof value === 'bigint') {\n    return value.toString();\n  }\n  if (value instanceof Date) {\n    return value.toISOString();\n  }\n  return value;\n};\n\n/**\n * Safely stringifies a value and parses it back into a JsonValue.\n */\nexport const stringifyToJsonValue = (input: unknown): JsonValue | undefined => {\n  try {\n    const json = JSON.stringify(input, queryKeyJsonReplacer);\n    if (json === undefined) {\n      return undefined;\n    }\n    return JSON.parse(json) as JsonValue;\n  } catch {\n    return undefined;\n  }\n};\n\n/**\n * Detects plain objects (including objects with a null prototype).\n */\nconst isPlainObject = (value: unknown): value is Record<string, unknown> => {\n  if (value === null || typeof value !== 'object') {\n    return false;\n  }\n  const prototype = Object.getPrototypeOf(value as object);\n  return prototype === Object.prototype || prototype === null;\n};\n\n/**\n * Turns URLSearchParams into a sorted JSON object for deterministic keys.\n */\nconst serializeSearchParams = (params: URLSearchParams): JsonValue => {\n  const entries = Array.from(params.entries()).sort(([a], [b]) => a.localeCompare(b));\n  const result: Record<string, JsonValue> = {};\n\n  for (const [key, value] of entries) {\n    const existing = result[key];\n    if (existing === undefined) {\n      result[key] = value;\n      continue;\n    }\n\n    if (Array.isArray(existing)) {\n      (existing as string[]).push(value);\n    } else {\n      result[key] = [existing, value];\n    }\n  }\n\n  return result;\n};\n\n/**\n * Normalizes any accepted value into a JSON-friendly shape for query keys.\n */\nexport const serializeQueryKeyValue = (value: unknown): JsonValue | undefined => {\n  if (value === null) {\n    return null;\n  }\n\n  if (typeof value === 'string' || typeof value === 'number' || typeof value === 'boolean') {\n    return value;\n  }\n\n  if (value === undefined || typeof value === 'function' || typeof value === 'symbol') {\n    return undefined;\n  }\n\n  if (typeof value === 'bigint') {\n    return value.toString();\n  }\n\n  if (value instanceof Date) {\n    return value.toISOString();\n  }\n\n  if (Array.isArray(value)) {\n    return stringifyToJsonValue(value);\n  }\n\n  if (typeof URLSearchParams !== 'undefined' && value instanceof URLSearchParams) {\n    return serializeSearchParams(value);\n  }\n\n  if (isPlainObject(value)) {\n    return stringifyToJsonValue(value);\n  }\n\n  return undefined;\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/zod/v4/__snapshots__/3.0.x/v4/type-format/core/serverSentEvents.gen.ts",
    "content": "// 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 const 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            // Normalize line endings: CRLF -> LF, then CR -> LF\n            buffer = buffer.replace(/\\r\\n/g, '\\n').replace(/\\r/g, '\\n');\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"
  },
  {
    "path": "packages/openapi-ts-tests/zod/v4/__snapshots__/3.0.x/v4/type-format/core/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { Auth, AuthToken } from './auth.gen';\nimport type { BodySerializer, QuerySerializer, QuerySerializerOptions } from './bodySerializer.gen';\n\nexport type HttpMethod =\n  | 'connect'\n  | 'delete'\n  | 'get'\n  | 'head'\n  | 'options'\n  | 'patch'\n  | 'post'\n  | 'put'\n  | 'trace';\n\nexport type Client<\n  RequestFn = never,\n  Config = unknown,\n  MethodFn = never,\n  BuildUrlFn = never,\n  SseFn = never,\n> = {\n  /**\n   * Returns the final request URL.\n   */\n  buildUrl: BuildUrlFn;\n  getConfig: () => Config;\n  request: RequestFn;\n  setConfig: (config: Config) => Config;\n} & {\n  [K in HttpMethod]: MethodFn;\n} & ([SseFn] extends [never] ? { sse?: never } : { sse: { [K in HttpMethod]: SseFn } });\n\nexport interface Config {\n  /**\n   * Auth token or a function returning auth token. The resolved value will be\n   * added to the request payload as defined by its `security` array.\n   */\n  auth?: ((auth: Auth) => Promise<AuthToken> | AuthToken) | AuthToken;\n  /**\n   * A function for serializing request body parameter. By default,\n   * {@link JSON.stringify()} will be used.\n   */\n  bodySerializer?: BodySerializer | null;\n  /**\n   * An object containing any HTTP headers that you want to pre-populate your\n   * `Headers` object with.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/Headers/Headers#init See more}\n   */\n  headers?:\n    | RequestInit['headers']\n    | Record<\n        string,\n        string | number | boolean | (string | number | boolean)[] | null | undefined | unknown\n      >;\n  /**\n   * The request method.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/fetch#method See more}\n   */\n  method?: Uppercase<HttpMethod>;\n  /**\n   * A function for serializing request query parameters. By default, arrays\n   * will be exploded in form style, objects will be exploded in deepObject\n   * style, and reserved characters are percent-encoded.\n   *\n   * This method will have no effect if the native `paramsSerializer()` Axios\n   * API function is used.\n   *\n   * {@link https://swagger.io/docs/specification/serialization/#query View examples}\n   */\n  querySerializer?: QuerySerializer | QuerySerializerOptions;\n  /**\n   * A function validating request data. This is useful if you want to ensure\n   * the request conforms to the desired shape, so it can be safely sent to\n   * the server.\n   */\n  requestValidator?: (data: unknown) => Promise<unknown>;\n  /**\n   * A function transforming response data before it's returned. This is useful\n   * for post-processing data, e.g. converting ISO strings into Date objects.\n   */\n  responseTransformer?: (data: unknown) => Promise<unknown>;\n  /**\n   * A function validating response data. This is useful if you want to ensure\n   * the response conforms to the desired shape, so it can be safely passed to\n   * the transformers and returned to the user.\n   */\n  responseValidator?: (data: unknown) => Promise<unknown>;\n}\n\ntype IsExactlyNeverOrNeverUndefined<T> = [T] extends [never]\n  ? true\n  : [T] extends [never | undefined]\n    ? [undefined] extends [T]\n      ? false\n      : true\n    : false;\n\nexport type OmitNever<T extends Record<string, unknown>> = {\n  [K in keyof T as IsExactlyNeverOrNeverUndefined<T[K]> extends true ? never : K]: T[K];\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/zod/v4/__snapshots__/3.0.x/v4/type-format/core/utils.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/zod/v4/__snapshots__/3.0.x/v4/type-format/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport { type Options, postFoo } from './sdk.gen';\nexport type { Bar, ClientOptions, Foo, PostFooData, PostFooResponse, PostFooResponses, TypeID, UserId } from './types.gen';\n"
  },
  {
    "path": "packages/openapi-ts-tests/zod/v4/__snapshots__/3.0.x/v4/type-format/sdk.gen.ts",
    "content": "// 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 { postFooResponseTransformer } from './transformers.gen';\nimport type { PostFooData, PostFooResponses } from './types.gen';\nimport { zPostFooData, zPostFooResponse } from './zod.gen';\n\nexport type Options<TData extends TDataShape = TDataShape, ThrowOnError extends boolean = boolean> = Options2<TData, ThrowOnError> & {\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\nexport const postFoo = <ThrowOnError extends boolean = false>(options?: Options<PostFooData, ThrowOnError>) => (options?.client ?? client).post<PostFooResponses, unknown, ThrowOnError>({\n    requestValidator: async (data) => await zPostFooData.parseAsync(data),\n    responseTransformer: postFooResponseTransformer,\n    responseValidator: async (data) => await zPostFooResponse.parseAsync(data),\n    url: '/foo',\n    ...options\n});\n"
  },
  {
    "path": "packages/openapi-ts-tests/zod/v4/__snapshots__/3.0.x/v4/type-format/transformers.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { PostFooResponse } from './types.gen';\n\nconst fooSchemaResponseTransformer = (data: any) => {\n    data.foo = BigInt(data.foo.toString());\n    return data;\n};\n\nexport const postFooResponseTransformer = async (data: any): Promise<PostFooResponse> => {\n    data = fooSchemaResponseTransformer(data);\n    return data;\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/zod/v4/__snapshots__/3.0.x/v4/type-format/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type ClientOptions = {\n    baseUrl: `${string}://${string}` | (string & {});\n};\n\nexport type TypeID<T extends string> = `${T}_${string}`;\n\nexport type UserId = TypeID<'user'>;\n\nexport type Foo = {\n    bar?: number;\n    foo: bigint;\n    id: UserId;\n};\n\nexport type Bar = {\n    foo: number;\n    [key: string]: number;\n};\n\nexport type PostFooData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/foo';\n};\n\nexport type PostFooResponses = {\n    /**\n     * OK\n     */\n    200: Foo;\n};\n\nexport type PostFooResponse = PostFooResponses[keyof PostFooResponses];\n"
  },
  {
    "path": "packages/openapi-ts-tests/zod/v4/__snapshots__/3.0.x/v4/type-format/zod.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport * as z from 'zod';\n\nexport const zFoo = z.object({\n    bar: z.int().optional(),\n    foo: z.coerce.bigint().min(BigInt('-9223372036854775808'), { error: 'Invalid value: Expected int64 to be >= -9223372036854775808' }).max(BigInt('9223372036854775807'), { error: 'Invalid value: Expected int64 to be <= 9223372036854775807' }).default(BigInt(0)),\n    id: z.string()\n});\n\nexport const zBar = z.object({\n    foo: z.int()\n});\n\nexport const zPostFooData = z.object({\n    body: z.never().optional(),\n    path: z.never().optional(),\n    query: z.never().optional()\n});\n\n/**\n * OK\n */\nexport const zPostFooResponse = zFoo;\n"
  },
  {
    "path": "packages/openapi-ts-tests/zod/v4/__snapshots__/3.0.x/v4/validators/zod.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport * as z from 'zod';\n\nexport const zBaz = z.string().regex(/foo\\nbar/).readonly().default('baz');\n\nexport const zFoo = z.object({\n    foo: z.string().regex(/^\\d{3}-\\d{2}-\\d{4}$/).optional(),\n    bar: z.lazy((): any => zBar).optional(),\n    baz: z.array(z.lazy((): any => zFoo)).optional(),\n    qux: z.int().gt(0).optional().default(0)\n}).nullable().default(null);\n\nexport const zBar = z.object({\n    foo: zFoo.optional()\n});\n"
  },
  {
    "path": "packages/openapi-ts-tests/zod/v4/__snapshots__/3.1.x/mini/array-items-all-of/zod.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport * as z from 'zod/mini';\n\nexport const zArrayWithAllOfObjects = z.array(z.intersection(z.object({\n    id: z.optional(z.int())\n}), z.object({\n    name: z.optional(z.string())\n})));\n\nexport const zArrayWithAllOfPrimitives = z.array(z.intersection(z.number(), z.string()));\n\nexport const zBaseModel = z.object({\n    id: z.optional(z.int()),\n    createdAt: z.optional(z.iso.datetime())\n});\n\nexport const zArrayWithAllOfRefs = z.array(z.intersection(zBaseModel, z.object({\n    extra: z.optional(z.string())\n})));\n"
  },
  {
    "path": "packages/openapi-ts-tests/zod/v4/__snapshots__/3.1.x/mini/array-items-one-of-length-1/zod.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport * as z from 'zod/mini';\n\nexport const zBar = z.string();\n\nexport const zFoo = z.object({\n    foo: z.optional(z.array(zBar).check(z.minLength(1), z.maxLength(2147483647)))\n});\n"
  },
  {
    "path": "packages/openapi-ts-tests/zod/v4/__snapshots__/3.1.x/mini/default/zod.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport * as z from 'zod/mini';\n\n/**\n * Model with number-only name\n */\nexport const z400 = z.string();\n\n/**\n * Testing multiline comments in string: First line\n * Second line\n *\n * Fourth line\n */\nexport const zCamelCaseCommentWithBreaks = z.int();\n\n/**\n * Testing multiline comments in string: First line\n * Second line\n *\n * Fourth line\n */\nexport const zCommentWithBreaks = z.int();\n\n/**\n * Testing backticks in string: `backticks` and ```multiple backticks``` should work\n */\nexport const zCommentWithBackticks = z.int();\n\n/**\n * Testing backticks and quotes in string: `backticks`, 'quotes', \"double quotes\" and ```multiple backticks``` should work\n */\nexport const zCommentWithBackticksAndQuotes = z.int();\n\n/**\n * Testing slashes in string: \\backwards\\\\\\ and /forwards/// should work\n */\nexport const zCommentWithSlashes = z.int();\n\n/**\n * Testing expression placeholders in string: ${expression} should work\n */\nexport const zCommentWithExpressionPlaceholders = z.int();\n\n/**\n * Testing quotes in string: 'single quote''' and \"double quotes\"\"\" should work\n */\nexport const zCommentWithQuotes = z.int();\n\n/**\n * Testing reserved characters in string: * inline * and ** inline ** should work\n */\nexport const zCommentWithReservedCharacters = z.int();\n\n/**\n * This is a simple number\n */\nexport const zSimpleInteger = z.int();\n\n/**\n * This is a simple boolean\n */\nexport const zSimpleBoolean = z.boolean();\n\n/**\n * This is a simple string\n */\nexport const zSimpleString = z.string();\n\n/**\n * A string with non-ascii (unicode) characters valid in typescript identifiers (æøåÆØÅöÔèÈ字符串)\n */\nexport const zNonAsciiStringæøåÆøÅöôêÊ字符串 = z.string();\n\n/**\n * This is a simple file\n */\nexport const zSimpleFile = z.string();\n\n/**\n * This is a simple string\n */\nexport const zSimpleStringWithPattern = z.nullable(z.string().check(z.maxLength(64), z.regex(/^[a-zA-Z0-9_]*$/)));\n\n/**\n * This is a simple enum with strings\n */\nexport const zEnumWithStrings = z.enum([\n    'Success',\n    'Warning',\n    'Error',\n    '\\'Single Quote\\'',\n    '\"Double Quotes\"',\n    'Non-ascii: øæåôöØÆÅÔÖ字符串'\n]);\n\nexport const zEnumWithReplacedCharacters = z.union([\n    z.literal('\\'Single Quote\\''),\n    z.literal('\"Double Quotes\"'),\n    z.literal('øæåôöØÆÅÔÖ字符串'),\n    z.literal(3.1),\n    z.literal('')\n]);\n\n/**\n * This is a simple enum with numbers\n */\nexport const zEnumWithNumbers = z.union([\n    z.literal(1),\n    z.literal(2),\n    z.literal(3),\n    z.literal(1.1),\n    z.literal(1.2),\n    z.literal(1.3),\n    z.literal(100),\n    z.literal(200),\n    z.literal(300),\n    z.literal(-100),\n    z.literal(-200),\n    z.literal(-300),\n    z.literal(-1.1),\n    z.literal(-1.2),\n    z.literal(-1.3)\n]);\n\n/**\n * Success=1,Warning=2,Error=3\n */\nexport const zEnumFromDescription = z.number();\n\n/**\n * This is a simple enum with numbers\n */\nexport const zEnumWithExtensions = z.union([\n    z.literal(200),\n    z.literal(400),\n    z.literal(500)\n]);\n\nexport const zEnumWithXEnumNames = z.union([\n    z.literal(0),\n    z.literal(1),\n    z.literal(2)\n]);\n\n/**\n * This is a simple array with numbers\n */\nexport const zArrayWithNumbers = z.array(z.int());\n\n/**\n * This is a simple array with booleans\n */\nexport const zArrayWithBooleans = z.array(z.boolean());\n\n/**\n * This is a simple array with strings\n */\nexport const zArrayWithStrings = z._default(z.array(z.string()), ['test']);\n\n/**\n * This is a simple array with properties\n */\nexport const zArrayWithProperties = z.array(z.object({\n    '16x16': z.optional(zCamelCaseCommentWithBreaks),\n    bar: z.optional(z.string())\n}));\n\n/**\n * This is a simple array with any of properties\n */\nexport const zArrayWithAnyOfProperties = z.array(z.union([z.object({\n        foo: z._default(z.optional(z.string()), 'test')\n    }), z.object({\n        bar: z.optional(z.string())\n    })]));\n\nexport const zAnyOfAnyAndNull = z.object({\n    data: z.nullish(z.unknown())\n});\n\n/**\n * This is a simple array with any of properties\n */\nexport const zAnyOfArrays = z.object({\n    results: z.optional(z.array(z.union([z.object({\n            foo: z.optional(z.string())\n        }), z.object({\n            bar: z.optional(z.string())\n        })])))\n});\n\n/**\n * This is a string dictionary\n */\nexport const zDictionaryWithString = z.record(z.string(), z.string());\n\nexport const zDictionaryWithPropertiesAndAdditionalProperties = z.object({\n    foo: z.optional(z.number()),\n    bar: z.optional(z.boolean())\n});\n\n/**\n * This is a string dictionary\n */\nexport const zDictionaryWithDictionary = z.record(z.string(), z.record(z.string(), z.string()));\n\n/**\n * This is a complex dictionary\n */\nexport const zDictionaryWithProperties = z.record(z.string(), z.object({\n    foo: z.optional(z.string()),\n    bar: z.optional(z.string())\n}));\n\n/**\n * This is a model with one number property\n */\nexport const zModelWithInteger = z.object({\n    prop: z.optional(z.int())\n});\n\n/**\n * This is a model with one boolean property\n */\nexport const zModelWithBoolean = z.object({\n    prop: z.optional(z.boolean())\n});\n\n/**\n * This is a model with one string property\n */\nexport const zModelWithString = z.object({\n    prop: z.optional(z.string())\n});\n\n/**\n * This is a simple reference\n */\nexport const zSimpleReference = zModelWithString;\n\n/**\n * This is a simple array with references\n */\nexport const zArrayWithReferences = z.array(zModelWithString);\n\n/**\n * This is a simple array containing an array\n */\nexport const zArrayWithArray = z.array(z.array(zModelWithString));\n\n/**\n * This is a string reference\n */\nexport const zDictionaryWithReference = z.record(z.string(), zModelWithString);\n\n/**\n * This is a complex dictionary\n */\nexport const zDictionaryWithArray = z.record(z.string(), z.array(zModelWithString));\n\n/**\n * This is a model with one string property\n */\nexport const zModelWithStringError = z.object({\n    prop: z.optional(z.string())\n});\n\n/**\n * `Comment` or `VoiceComment`. The JSON object for adding voice comments to tickets is different. See [Adding voice comments to tickets](/documentation/ticketing/managing-tickets/adding-voice-comments-to-tickets)\n */\nexport const zModelFromZendesk = z.string();\n\n/**\n * This is a model with one string property\n */\nexport const zModelWithNullableString = z.object({\n    nullableProp1: z.nullish(z.string()),\n    nullableRequiredProp1: z.nullable(z.string()),\n    nullableProp2: z.nullish(z.string()),\n    nullableRequiredProp2: z.nullable(z.string()),\n    'foo_bar-enum': z.optional(z.enum([\n        'Success',\n        'Warning',\n        'Error',\n        'ØÆÅ字符串'\n    ]))\n});\n\n/**\n * This is a model with one enum\n */\nexport const zModelWithEnum = z.object({\n    'foo_bar-enum': z.optional(z.enum([\n        'Success',\n        'Warning',\n        'Error',\n        'ØÆÅ字符串'\n    ])),\n    statusCode: z.optional(z.enum([\n        '100',\n        '200 FOO',\n        '300 FOO_BAR',\n        '400 foo-bar',\n        '500 foo.bar',\n        '600 foo&bar'\n    ])),\n    bool: z.optional(z.literal(true))\n});\n\n/**\n * This is a model with one enum with escaped name\n */\nexport const zModelWithEnumWithHyphen = z.object({\n    'foo-bar-baz-qux': z.optional(z.enum(['3.0']))\n});\n\n/**\n * This is a model with one enum\n */\nexport const zModelWithEnumFromDescription = z.object({\n    test: z.optional(z.int())\n});\n\n/**\n * This is a model with nested enums\n */\nexport const zModelWithNestedEnums = z.object({\n    dictionaryWithEnum: z.optional(z.record(z.string(), z.enum([\n        'Success',\n        'Warning',\n        'Error'\n    ]))),\n    dictionaryWithEnumFromDescription: z.optional(z.record(z.string(), z.int())),\n    arrayWithEnum: z.optional(z.array(z.enum([\n        'Success',\n        'Warning',\n        'Error'\n    ]))),\n    arrayWithDescription: z.optional(z.array(z.int())),\n    'foo_bar-enum': z.optional(z.enum([\n        'Success',\n        'Warning',\n        'Error',\n        'ØÆÅ字符串'\n    ]))\n});\n\n/**\n * This is a model with one property containing an array\n */\nexport const zModelWithArray = z.object({\n    prop: z.optional(z.array(zModelWithString)),\n    propWithFile: z.optional(z.array(z.string())),\n    propWithNumber: z.optional(z.array(z.number()))\n});\n\n/**\n * This is a model with one property containing a dictionary\n */\nexport const zModelWithDictionary = z.object({\n    prop: z.optional(z.record(z.string(), z.string()))\n});\n\n/**\n * This is a deprecated model with a deprecated property\n *\n * @deprecated\n */\nexport const zDeprecatedModel = z.object({\n    prop: z.optional(z.string())\n});\n\n/**\n * This is a model with one property containing a circular reference\n */\nexport const zModelWithCircularReference = z.object({\n    prop: z.optional(z.lazy((): any => zModelWithCircularReference))\n});\n\n/**\n * This is a model with one property with a 'one of' relationship\n */\nexport const zCompositionWithOneOf = z.object({\n    propA: z.optional(z.union([\n        zModelWithString,\n        zModelWithEnum,\n        zModelWithArray,\n        zModelWithDictionary\n    ]))\n});\n\n/**\n * This is a model with one property with a 'one of' relationship where the options are not $ref\n */\nexport const zCompositionWithOneOfAnonymous = z.object({\n    propA: z.optional(z.union([\n        z.object({\n            propA: z.optional(z.string())\n        }),\n        z.string(),\n        z.int()\n    ]))\n});\n\n/**\n * Circle\n */\nexport const zModelCircle = z.object({\n    kind: z.string(),\n    radius: z.optional(z.number())\n});\n\n/**\n * Square\n */\nexport const zModelSquare = z.object({\n    kind: z.string(),\n    sideLength: z.optional(z.number())\n});\n\n/**\n * This is a model with one property with a 'one of' relationship where the options are not $ref\n */\nexport const zCompositionWithOneOfDiscriminator = z.union([\n    z.intersection(z.object({\n        kind: z.literal('circle')\n    }), zModelCircle),\n    z.intersection(z.object({\n        kind: z.literal('square')\n    }), zModelSquare)\n]);\n\n/**\n * This is a model with one property with a 'any of' relationship\n */\nexport const zCompositionWithAnyOf = z.object({\n    propA: z.optional(z.union([\n        zModelWithString,\n        zModelWithEnum,\n        zModelWithArray,\n        zModelWithDictionary\n    ]))\n});\n\n/**\n * This is a model with one property with a 'any of' relationship where the options are not $ref\n */\nexport const zCompositionWithAnyOfAnonymous = z.object({\n    propA: z.optional(z.union([\n        z.object({\n            propA: z.optional(z.string())\n        }),\n        z.string(),\n        z.int()\n    ]))\n});\n\n/**\n * This is a model with nested 'any of' property with a type null\n */\nexport const zCompositionWithNestedAnyAndTypeNull = z.object({\n    propA: z.optional(z.union([\n        z.array(z.union([zModelWithDictionary, z.null()])),\n        z.array(z.union([zModelWithArray, z.null()]))\n    ]))\n});\n\nexport const z3eNum1Период = z.enum(['Bird', 'Dog']);\n\nexport const zConstValue = z.literal('ConstValue');\n\n/**\n * This is a model with one property with a 'any of' relationship where the options are not $ref\n */\nexport const zCompositionWithNestedAnyOfAndNull = z.object({\n    propA: z.nullish(z.array(z.union([z3eNum1Период, zConstValue])))\n});\n\n/**\n * This is a model with one property with a 'one of' relationship\n */\nexport const zCompositionWithOneOfAndNullable = z.object({\n    propA: z.nullish(z.union([\n        z.object({\n            boolean: z.optional(z.boolean())\n        }),\n        zModelWithEnum,\n        zModelWithArray,\n        zModelWithDictionary\n    ]))\n});\n\n/**\n * This is a model that contains a simple dictionary within composition\n */\nexport const zCompositionWithOneOfAndSimpleDictionary = z.object({\n    propA: z.optional(z.union([\n        z.boolean(),\n        z.record(z.string(), z.number())\n    ]))\n});\n\n/**\n * This is a model that contains a dictionary of simple arrays within composition\n */\nexport const zCompositionWithOneOfAndSimpleArrayDictionary = z.object({\n    propA: z.optional(z.union([\n        z.boolean(),\n        z.record(z.string(), z.array(z.boolean()))\n    ]))\n});\n\n/**\n * This is a model that contains a dictionary of complex arrays (composited) within composition\n */\nexport const zCompositionWithOneOfAndComplexArrayDictionary = z.object({\n    propA: z.optional(z.union([\n        z.boolean(),\n        z.record(z.string(), z.array(z.union([z.number(), z.string()])))\n    ]))\n});\n\n/**\n * This is a model with one property with a 'all of' relationship\n */\nexport const zCompositionWithAllOfAndNullable = z.object({\n    propA: z.nullish(z.intersection(z.intersection(z.intersection(z.object({\n        boolean: z.optional(z.boolean())\n    }), zModelWithEnum), zModelWithArray), zModelWithDictionary))\n});\n\n/**\n * This is a model with one property with a 'any of' relationship\n */\nexport const zCompositionWithAnyOfAndNullable = z.object({\n    propA: z.nullish(z.union([\n        z.object({\n            boolean: z.optional(z.boolean())\n        }),\n        zModelWithEnum,\n        zModelWithArray,\n        zModelWithDictionary\n    ]))\n});\n\n/**\n * This is a base model with two simple optional properties\n */\nexport const zCompositionBaseModel = z.object({\n    firstName: z.optional(z.string()),\n    lastname: z.optional(z.string())\n});\n\n/**\n * This is a model that extends the base model\n */\nexport const zCompositionExtendedModel = z.intersection(zCompositionBaseModel, z.object({\n    age: z.number(),\n    firstName: z.string(),\n    lastname: z.string()\n}));\n\n/**\n * This is a model with one nested property\n */\nexport const zModelWithProperties = z.object({\n    required: z.string(),\n    requiredAndReadOnly: z.readonly(z.string()),\n    requiredAndNullable: z.nullable(z.string()),\n    string: z.optional(z.string()),\n    number: z.optional(z.number()),\n    boolean: z.optional(z.boolean()),\n    reference: z.optional(zModelWithString),\n    'property with space': z.optional(z.string()),\n    default: z.optional(z.string()),\n    try: z.optional(z.string()),\n    '@namespace.string': z.optional(z.readonly(z.string())),\n    '@namespace.integer': z.optional(z.readonly(z.int()))\n});\n\n/**\n * This is a model with one property containing a reference\n */\nexport const zModelWithReference = z.object({\n    prop: z.optional(zModelWithProperties)\n});\n\n/**\n * This is a model with one nested property\n */\nexport const zModelWithNestedProperties = z.object({\n    first: z.nullable(z.readonly(z.object({\n        second: z.nullable(z.readonly(z.object({\n            third: z.nullable(z.readonly(z.string()))\n        })))\n    })))\n});\n\n/**\n * This is a model with duplicated properties\n */\nexport const zModelWithDuplicateProperties = z.object({\n    prop: z.optional(zModelWithString)\n});\n\n/**\n * This is a model with ordered properties\n */\nexport const zModelWithOrderedProperties = z.object({\n    zebra: z.optional(z.string()),\n    apple: z.optional(z.string()),\n    hawaii: z.optional(z.string())\n});\n\n/**\n * This is a model with duplicated imports\n */\nexport const zModelWithDuplicateImports = z.object({\n    propA: z.optional(zModelWithString),\n    propB: z.optional(zModelWithString),\n    propC: z.optional(zModelWithString)\n});\n\n/**\n * This is a model that extends another model\n */\nexport const zModelThatExtends = z.intersection(zModelWithString, z.object({\n    propExtendsA: z.optional(z.string()),\n    propExtendsB: z.optional(zModelWithString)\n}));\n\n/**\n * This is a model that extends another model\n */\nexport const zModelThatExtendsExtends = z.intersection(z.intersection(zModelWithString, zModelThatExtends), z.object({\n    propExtendsC: z.optional(z.string()),\n    propExtendsD: z.optional(zModelWithString)\n}));\n\n/**\n * This is a model that contains a some patterns\n */\nexport const zModelWithPattern = z.object({\n    key: z.string().check(z.maxLength(64), z.regex(/^[a-zA-Z0-9_]*$/)),\n    name: z.string().check(z.maxLength(255)),\n    enabled: z.optional(z.readonly(z.boolean())),\n    modified: z.optional(z.readonly(z.iso.datetime())),\n    id: z.optional(z.string().check(z.regex(/^\\d{2}-\\d{3}-\\d{4}$/))),\n    text: z.optional(z.string().check(z.regex(/^\\w+$/))),\n    patternWithSingleQuotes: z.optional(z.string().check(z.regex(/^[a-zA-Z0-9']*$/))),\n    patternWithNewline: z.optional(z.string().check(z.regex(/aaa\\nbbb/))),\n    patternWithBacktick: z.optional(z.string().check(z.regex(/aaa`bbb/))),\n    patternWithUnicode: z.optional(z.string().check(z.regex(/^\\p{L}+$/u)))\n});\n\nexport const zFile = z.object({\n    id: z.optional(z.readonly(z.string().check(z.minLength(1)))),\n    updated_at: z.optional(z.readonly(z.iso.datetime())),\n    created_at: z.optional(z.readonly(z.iso.datetime())),\n    mime: z.string().check(z.minLength(1), z.maxLength(24)),\n    file: z.optional(z.readonly(z.url()))\n});\n\nexport const zDefault = z.object({\n    name: z.optional(z.string())\n});\n\nexport const zPageable = z.object({\n    page: z._default(z.optional(z.int().check(z.gte(0), z.maximum(2147483647, { error: 'Invalid value: Expected int32 to be <= 2147483647' }))), 0),\n    size: z.optional(z.int().check(z.gte(1), z.maximum(2147483647, { error: 'Invalid value: Expected int32 to be <= 2147483647' }))),\n    sort: z.optional(z.array(z.string()))\n});\n\n/**\n * This is a free-form object without additionalProperties.\n */\nexport const zFreeFormObjectWithoutAdditionalProperties = z.record(z.string(), z.unknown());\n\n/**\n * This is a free-form object with additionalProperties: true.\n */\nexport const zFreeFormObjectWithAdditionalPropertiesEqTrue = z.record(z.string(), z.unknown());\n\n/**\n * This is a free-form object with additionalProperties: {}.\n */\nexport const zFreeFormObjectWithAdditionalPropertiesEqEmptyObject = z.record(z.string(), z.unknown());\n\nexport const zModelWithConst = z.object({\n    String: z.optional(z.literal('String')),\n    number: z.optional(z.literal(0)),\n    null: z.optional(z.null()),\n    withType: z.optional(z.literal('Some string'))\n});\n\n/**\n * This is a model with one property and additionalProperties: true\n */\nexport const zModelWithAdditionalPropertiesEqTrue = z.object({\n    prop: z.optional(z.string())\n});\n\nexport const zNestedAnyOfArraysNullable = z.object({\n    nullableArray: z.nullish(z.array(z.union([z.string(), z.boolean()])))\n});\n\n/**\n * An object that can be null\n */\nexport const zNullableObject = z._default(z.nullable(z.object({\n    foo: z.optional(z.string())\n})), null);\n\n/**\n * Some % character\n */\nexport const zCharactersInDescription = z.string();\n\nexport const zModelWithNullableObject = z.object({\n    data: z.optional(zNullableObject)\n});\n\n/**\n * An object with additional properties that can be null (anyOf ref + null)\n */\nexport const zModelWithAdditionalPropertiesRef = z.record(z.string(), z.nullable(zNullableObject));\n\nexport const zModelWithOneOfEnum = z.union([\n    z.object({\n        foo: z.enum(['Bar'])\n    }),\n    z.object({\n        foo: z.enum(['Baz'])\n    }),\n    z.object({\n        foo: z.enum(['Qux'])\n    }),\n    z.object({\n        content: z.iso.datetime(),\n        foo: z.enum(['Quux'])\n    }),\n    z.object({\n        content: z.tuple([z.iso.datetime(), z.string()]),\n        foo: z.enum(['Corge'])\n    })\n]);\n\nexport const zModelWithNestedArrayEnumsDataFoo = z.enum(['foo', 'bar']);\n\nexport const zModelWithNestedArrayEnumsDataBar = z.enum(['baz', 'qux']);\n\nexport const zModelWithNestedArrayEnumsData = z.object({\n    foo: z.optional(z.array(zModelWithNestedArrayEnumsDataFoo)),\n    bar: z.optional(z.array(zModelWithNestedArrayEnumsDataBar))\n});\n\nexport const zModelWithNestedArrayEnums = z.object({\n    array_strings: z.optional(z.array(z.string())),\n    data: z.optional(zModelWithNestedArrayEnumsData)\n});\n\nexport const zModelWithNestedCompositionEnums = z.object({\n    foo: z.optional(zModelWithNestedArrayEnumsDataFoo)\n});\n\nexport const zModelWithReadOnlyAndWriteOnly = z.object({\n    foo: z.string(),\n    bar: z.readonly(z.string())\n});\n\n/**\n * This is a model with one property containing an array\n */\nexport const zModelWithArrayReadOnlyAndWriteOnly = z.object({\n    prop: z.optional(z.array(zModelWithReadOnlyAndWriteOnly)),\n    propWithFile: z.optional(z.array(z.string())),\n    propWithNumber: z.optional(z.array(z.number()))\n});\n\nexport const zModelWithConstantSizeArray = z.tuple([z.number(), z.number()]);\n\nexport const zModelWithAnyOfConstantSizeArray = z.tuple([\n    z.union([\n        z.number(),\n        z.string()\n    ]),\n    z.union([\n        z.number(),\n        z.string()\n    ]),\n    z.union([\n        z.number(),\n        z.string()\n    ])\n]);\n\nexport const zModelWithPrefixItemsConstantSizeArray = z.tuple([\n    zModelWithInteger,\n    z.union([\n        z.number(),\n        z.string()\n    ]),\n    z.string()\n]);\n\nexport const zModelWithAnyOfConstantSizeArrayNullable = z.tuple([\n    z.nullable(z.union([\n        z.number(),\n        z.string()\n    ])),\n    z.nullable(z.union([\n        z.number(),\n        z.string()\n    ])),\n    z.nullable(z.union([\n        z.number(),\n        z.string()\n    ]))\n]);\n\nexport const zModelWithAnyOfConstantSizeArrayAndIntersect = z.tuple([z.intersection(z.number(), z.string()), z.intersection(z.number(), z.string())]);\n\nexport const zModelWithNumericEnumUnion = z.object({\n    value: z.optional(z.union([\n        z.literal(-10),\n        z.literal(-1),\n        z.literal(0),\n        z.literal(1),\n        z.literal(3),\n        z.literal(6),\n        z.literal(12)\n    ]))\n});\n\n/**\n * Some description with `back ticks`\n */\nexport const zModelWithBackticksInDescription = z.object({\n    template: z.optional(z.string())\n});\n\n/**\n * Model used to test deduplication strategy (unused)\n */\nexport const zParameterSimpleParameterUnused = z.string();\n\n/**\n * Model used to test deduplication strategy\n */\nexport const zPostServiceWithEmptyTagResponse = z.string();\n\n/**\n * Model used to test deduplication strategy\n */\nexport const zPostServiceWithEmptyTagResponse2 = z.string();\n\n/**\n * Model used to test deduplication strategy\n */\nexport const zDeleteFooData = z.string();\n\n/**\n * Model used to test deduplication strategy\n */\nexport const zDeleteFooData2 = z.string();\n\n/**\n * Model with restricted keyword name\n */\nexport const zImport = z.string();\n\nexport const zModelWithAnyOfConstantSizeArrayWithNSizeAndOptions = z.tuple([z.union([\n        z.number(),\n        zImport\n    ]), z.union([\n        z.number(),\n        zImport\n    ])]);\n\nexport const zSchemaWithFormRestrictedKeys = z.object({\n    description: z.optional(z.string()),\n    'x-enum-descriptions': z.optional(z.string()),\n    'x-enum-varnames': z.optional(z.string()),\n    'x-enumNames': z.optional(z.string()),\n    title: z.optional(z.string()),\n    object: z.optional(z.object({\n        description: z.optional(z.string()),\n        'x-enum-descriptions': z.optional(z.string()),\n        'x-enum-varnames': z.optional(z.string()),\n        'x-enumNames': z.optional(z.string()),\n        title: z.optional(z.string())\n    })),\n    array: z.optional(z.array(z.object({\n        description: z.optional(z.string()),\n        'x-enum-descriptions': z.optional(z.string()),\n        'x-enum-varnames': z.optional(z.string()),\n        'x-enumNames': z.optional(z.string()),\n        title: z.optional(z.string())\n    })))\n});\n\n/**\n * This schema was giving PascalCase transformations a hard time\n */\nexport const zIoK8sApimachineryPkgApisMetaV1Preconditions = z.object({\n    resourceVersion: z.optional(z.string()),\n    uid: z.optional(z.string())\n});\n\n/**\n * This schema was giving PascalCase transformations a hard time\n */\nexport const zIoK8sApimachineryPkgApisMetaV1DeleteOptions = z.object({\n    preconditions: z.optional(zIoK8sApimachineryPkgApisMetaV1Preconditions)\n});\n\nexport const zAdditionalPropertiesUnknownIssue = z.record(z.string(), z.union([\n    z.string(),\n    z.number()\n]));\n\nexport const zAdditionalPropertiesUnknownIssue2 = z.record(z.string(), z.union([\n    z.string(),\n    z.number()\n]));\n\nexport const zAdditionalPropertiesUnknownIssue3 = z.intersection(z.string(), z.object({\n    entries: z.record(z.string(), zAdditionalPropertiesUnknownIssue)\n}));\n\nexport const zAdditionalPropertiesIntegerIssue = z.object({\n    value: z.int()\n});\n\nexport const zGenericSchemaDuplicateIssue1SystemBoolean = z.object({\n    item: z.optional(z.boolean()),\n    error: z.nullish(z.string()),\n    hasError: z.optional(z.readonly(z.boolean())),\n    data: z.optional(z.record(z.string(), z.never()))\n});\n\nexport const zGenericSchemaDuplicateIssue1SystemString = z.object({\n    item: z.nullish(z.string()),\n    error: z.nullish(z.string()),\n    hasError: z.optional(z.readonly(z.boolean()))\n});\n\nexport const zOneOfAllOfIssue = z.union([\n    z.intersection(z.union([\n        zConstValue,\n        zGenericSchemaDuplicateIssue1SystemBoolean\n    ]), z3eNum1Период),\n    zGenericSchemaDuplicateIssue1SystemString\n]);\n\nexport const zExternalSharedModel = z.object({\n    id: z.string(),\n    name: z.optional(z.string())\n});\n\n/**\n * External ref to shared model (A)\n */\nexport const zExternalRefA = zExternalSharedModel;\n\n/**\n * External ref to shared model (B)\n */\nexport const zExternalRefB = zExternalSharedModel;\n\n/**\n * This is a model with one nested property\n */\nexport const zModelWithPropertiesWritable = z.object({\n    required: z.string(),\n    requiredAndNullable: z.nullable(z.string()),\n    string: z.optional(z.string()),\n    number: z.optional(z.number()),\n    boolean: z.optional(z.boolean()),\n    reference: z.optional(zModelWithString),\n    'property with space': z.optional(z.string()),\n    default: z.optional(z.string()),\n    try: z.optional(z.string())\n});\n\n/**\n * This is a model with one property containing a reference\n */\nexport const zModelWithReferenceWritable = z.object({\n    prop: z.optional(zModelWithPropertiesWritable)\n});\n\n/**\n * This is a model that contains a some patterns\n */\nexport const zModelWithPatternWritable = z.object({\n    key: z.string().check(z.maxLength(64), z.regex(/^[a-zA-Z0-9_]*$/)),\n    name: z.string().check(z.maxLength(255)),\n    id: z.optional(z.string().check(z.regex(/^\\d{2}-\\d{3}-\\d{4}$/))),\n    text: z.optional(z.string().check(z.regex(/^\\w+$/))),\n    patternWithSingleQuotes: z.optional(z.string().check(z.regex(/^[a-zA-Z0-9']*$/))),\n    patternWithNewline: z.optional(z.string().check(z.regex(/aaa\\nbbb/))),\n    patternWithBacktick: z.optional(z.string().check(z.regex(/aaa`bbb/))),\n    patternWithUnicode: z.optional(z.string().check(z.regex(/^\\p{L}+$/u)))\n});\n\nexport const zFileWritable = z.object({\n    mime: z.string().check(z.minLength(1), z.maxLength(24))\n});\n\nexport const zModelWithReadOnlyAndWriteOnlyWritable = z.object({\n    foo: z.string(),\n    baz: z.string()\n});\n\n/**\n * This is a model with one property containing an array\n */\nexport const zModelWithArrayReadOnlyAndWriteOnlyWritable = z.object({\n    prop: z.optional(z.array(zModelWithReadOnlyAndWriteOnlyWritable)),\n    propWithFile: z.optional(z.array(z.string())),\n    propWithNumber: z.optional(z.array(z.number()))\n});\n\nexport const zModelWithAnyOfConstantSizeArrayWithNSizeAndOptionsWritable = z.tuple([z.union([\n        z.number(),\n        zImport\n    ]), z.union([\n        z.number(),\n        zImport\n    ])]);\n\nexport const zAdditionalPropertiesUnknownIssueWritable = z.record(z.string(), z.union([\n    z.string(),\n    z.number()\n]));\n\nexport const zOneOfAllOfIssueWritable = z.union([\n    z.intersection(z.union([\n        zConstValue,\n        zGenericSchemaDuplicateIssue1SystemBoolean\n    ]), z3eNum1Период),\n    zGenericSchemaDuplicateIssue1SystemString\n]);\n\nexport const zGenericSchemaDuplicateIssue1SystemBooleanWritable = z.object({\n    item: z.optional(z.boolean()),\n    error: z.nullish(z.string()),\n    data: z.optional(z.record(z.string(), z.never()))\n});\n\nexport const zGenericSchemaDuplicateIssue1SystemStringWritable = z.object({\n    item: z.nullish(z.string()),\n    error: z.nullish(z.string())\n});\n\n/**\n * This is a reusable parameter\n */\nexport const zSimpleParameter = z.string();\n\nexport const zCompositionWithOneOfAndProperties = z.intersection(z.union([\n    z.object({\n        foo: zSimpleParameter\n    }),\n    z.object({\n        bar: zNonAsciiStringæøåÆøÅöôêÊ字符串\n    })\n]), z.object({\n    baz: z.nullable(z.int().check(z.gte(0), z.maximum(65535, { error: 'Invalid value: Expected uint16 to be <= 65535' }))),\n    qux: z.int().check(z.gte(0), z.maximum(255, { error: 'Invalid value: Expected uint8 to be <= 255' }))\n}));\n\nexport const zModelWithOneOfAndProperties = z.intersection(z.union([\n    zSimpleParameter,\n    zNonAsciiStringæøåÆøÅöôêÊ字符串\n]), z.object({\n    baz: z.nullable(z.int().check(z.gte(0), z.maximum(65535, { error: 'Invalid value: Expected uint16 to be <= 65535' }))),\n    qux: z.int().check(z.gte(0), z.maximum(255, { error: 'Invalid value: Expected uint8 to be <= 255' }))\n}));\n\n/**\n * Parameter with illegal characters\n */\nexport const zXFooBar = zModelWithString;\n\n/**\n * A reusable request body\n */\nexport const zSimpleRequestBody = zModelWithString;\n\n/**\n * A reusable request body\n */\nexport const zSimpleFormData = zModelWithString;\n\nexport const zExportData = z.object({\n    body: z.optional(z.never()),\n    path: z.optional(z.never()),\n    query: z.optional(z.never())\n});\n\nexport const zPatchApiVbyApiVersionNoTagData = z.object({\n    body: z.optional(z.never()),\n    path: z.optional(z.never()),\n    query: z.optional(z.never())\n});\n\nexport const zImportData = z.object({\n    body: z.union([\n        zModelWithReadOnlyAndWriteOnlyWritable,\n        zModelWithArrayReadOnlyAndWriteOnlyWritable\n    ]),\n    path: z.optional(z.never()),\n    query: z.optional(z.never())\n});\n\nexport const zImportResponse = z.union([\n    zModelFromZendesk,\n    zModelWithReadOnlyAndWriteOnly\n]);\n\nexport const zFooWowData = z.object({\n    body: z.optional(z.never()),\n    path: z.optional(z.never()),\n    query: z.optional(z.never())\n});\n\nexport const zApiVVersionODataControllerCountData = z.object({\n    body: z.optional(z.never()),\n    path: z.optional(z.never()),\n    query: z.optional(z.never())\n});\n\n/**\n * Success\n */\nexport const zApiVVersionODataControllerCountResponse = zModelFromZendesk;\n\nexport const zGetApiVbyApiVersionSimpleOperationData = z.object({\n    body: z.optional(z.never()),\n    path: z.object({\n        foo_param: z.union([\n            z.string(),\n            z.uuid()\n        ])\n    }),\n    query: z.optional(z.never())\n});\n\n/**\n * Response is a simple number\n */\nexport const zGetApiVbyApiVersionSimpleOperationResponse = z.number();\n\nexport const zDeleteCallWithoutParametersAndResponseData = z.object({\n    body: z.optional(z.never()),\n    path: z.optional(z.never()),\n    query: z.optional(z.never())\n});\n\nexport const zGetCallWithoutParametersAndResponseData = z.object({\n    body: z.optional(z.never()),\n    path: z.optional(z.never()),\n    query: z.optional(z.never())\n});\n\nexport const zHeadCallWithoutParametersAndResponseData = z.object({\n    body: z.optional(z.never()),\n    path: z.optional(z.never()),\n    query: z.optional(z.never())\n});\n\nexport const zOptionsCallWithoutParametersAndResponseData = z.object({\n    body: z.optional(z.never()),\n    path: z.optional(z.never()),\n    query: z.optional(z.never())\n});\n\nexport const zPatchCallWithoutParametersAndResponseData = z.object({\n    body: z.optional(z.never()),\n    path: z.optional(z.never()),\n    query: z.optional(z.never())\n});\n\nexport const zPostCallWithoutParametersAndResponseData = z.object({\n    body: z.optional(z.never()),\n    path: z.optional(z.never()),\n    query: z.optional(z.never())\n});\n\nexport const zPutCallWithoutParametersAndResponseData = z.object({\n    body: z.optional(z.never()),\n    path: z.optional(z.never()),\n    query: z.optional(z.never())\n});\n\nexport const zDeleteFooData3 = z.object({\n    body: z.optional(z.never()),\n    path: z.object({\n        foo_param: z.string(),\n        BarParam: z.string()\n    }),\n    query: z.optional(z.never()),\n    headers: z.object({\n        'x-Foo-Bar': zModelWithString\n    })\n});\n\nexport const zCallWithDescriptionsData = z.object({\n    body: z.optional(z.never()),\n    path: z.optional(z.never()),\n    query: z.optional(z.object({\n        parameterWithBreaks: z.optional(z.string()),\n        parameterWithBackticks: z.optional(z.string()),\n        parameterWithSlashes: z.optional(z.string()),\n        parameterWithExpressionPlaceholders: z.optional(z.string()),\n        parameterWithQuotes: z.optional(z.string()),\n        parameterWithReservedCharacters: z.optional(z.string())\n    }))\n});\n\nexport const zDeprecatedCallData = z.object({\n    body: z.optional(z.never()),\n    path: z.optional(z.never()),\n    query: z.optional(z.never()),\n    headers: z.object({\n        parameter: z.nullable(zDeprecatedModel)\n    })\n});\n\nexport const zCallWithParametersData = z.object({\n    body: z.nullable(z.record(z.string(), z.unknown())),\n    path: z.object({\n        parameterPath: z.nullable(z.string()),\n        'api-version': z.nullable(z.string())\n    }),\n    query: z.object({\n        foo_ref_enum: z.optional(zModelWithNestedArrayEnumsDataFoo),\n        foo_all_of_enum: zModelWithNestedArrayEnumsDataFoo,\n        cursor: z.nullable(z.string())\n    }),\n    headers: z.object({\n        parameterHeader: z.nullable(z.string())\n    })\n});\n\nexport const zCallWithWeirdParameterNamesData = z.object({\n    body: z.nullable(zModelWithString),\n    path: z.object({\n        'parameter.path.1': z.optional(z.string()),\n        'parameter-path-2': z.optional(z.string()),\n        'PARAMETER-PATH-3': z.optional(z.string()),\n        'api-version': z.nullable(z.string())\n    }),\n    query: z.object({\n        default: z.optional(z.string()),\n        'parameter-query': z.nullable(z.string())\n    }),\n    headers: z.object({\n        'parameter.header': z.nullable(z.string())\n    })\n});\n\nexport const zGetCallWithOptionalParamData = z.object({\n    body: zModelWithOneOfEnum,\n    path: z.optional(z.never()),\n    query: z.optional(z.object({\n        page: z.optional(z.number())\n    }))\n});\n\nexport const zPostCallWithOptionalParamData = z.object({\n    body: z.optional(z.object({\n        offset: z.nullish(z.number())\n    })),\n    path: z.optional(z.never()),\n    query: z.object({\n        parameter: zPageable\n    })\n});\n\nexport const zPostCallWithOptionalParamResponse = z.union([\n    z.number(),\n    z.void()\n]);\n\nexport const zPostApiVbyApiVersionRequestBodyData = z.object({\n    body: z.optional(zSimpleRequestBody),\n    path: z.optional(z.never()),\n    query: z.optional(z.object({\n        parameter: z.optional(z.string())\n    }))\n});\n\nexport const zPostApiVbyApiVersionFormDataData = z.object({\n    body: z.optional(zSimpleFormData),\n    path: z.optional(z.never()),\n    query: z.optional(z.object({\n        parameter: z.optional(z.string())\n    }))\n});\n\nexport const zCallWithDefaultParametersData = z.object({\n    body: z.optional(z.never()),\n    path: z.optional(z.never()),\n    query: z.optional(z.object({\n        parameterString: z._default(z.nullish(z.string()), 'Hello World!'),\n        parameterNumber: z._default(z.nullish(z.number()), 123),\n        parameterBoolean: z._default(z.nullish(z.boolean()), true),\n        parameterEnum: z.optional(z.enum([\n            'Success',\n            'Warning',\n            'Error'\n        ])),\n        parameterModel: z.nullish(zModelWithString)\n    }))\n});\n\nexport const zCallWithDefaultOptionalParametersData = z.object({\n    body: z.optional(z.never()),\n    path: z.optional(z.never()),\n    query: z.optional(z.object({\n        parameterString: z._default(z.optional(z.string()), 'Hello World!'),\n        parameterNumber: z._default(z.optional(z.number()), 123),\n        parameterBoolean: z._default(z.optional(z.boolean()), true),\n        parameterEnum: z.optional(z.enum([\n            'Success',\n            'Warning',\n            'Error'\n        ])),\n        parameterModel: z._default(z.optional(zModelWithString), { prop: 'Hello World!' })\n    }))\n});\n\nexport const zCallToTestOrderOfParamsData = z.object({\n    body: z.optional(z.never()),\n    path: z.optional(z.never()),\n    query: z.object({\n        parameterOptionalStringWithDefault: z._default(z.optional(z.string()), 'Hello World!'),\n        parameterOptionalStringWithEmptyDefault: z._default(z.optional(z.string()), ''),\n        parameterOptionalStringWithNoDefault: z.optional(z.string()),\n        parameterStringWithDefault: z._default(z.string(), 'Hello World!'),\n        parameterStringWithEmptyDefault: z._default(z.string(), ''),\n        parameterStringWithNoDefault: z.string(),\n        parameterStringNullableWithNoDefault: z.nullish(z.string()),\n        parameterStringNullableWithDefault: z._default(z.nullish(z.string()), null)\n    })\n});\n\nexport const zDuplicateNameData = z.object({\n    body: z.optional(z.never()),\n    path: z.optional(z.never()),\n    query: z.optional(z.never())\n});\n\nexport const zDuplicateName2Data = z.object({\n    body: z.optional(z.never()),\n    path: z.optional(z.never()),\n    query: z.optional(z.never())\n});\n\nexport const zDuplicateName3Data = z.object({\n    body: z.optional(z.never()),\n    path: z.optional(z.never()),\n    query: z.optional(z.never())\n});\n\nexport const zDuplicateName4Data = z.object({\n    body: z.optional(z.never()),\n    path: z.optional(z.never()),\n    query: z.optional(z.never())\n});\n\nexport const zCallWithNoContentResponseData = z.object({\n    body: z.optional(z.never()),\n    path: z.optional(z.never()),\n    query: z.optional(z.never())\n});\n\n/**\n * Success\n */\nexport const zCallWithNoContentResponseResponse = z.void();\n\nexport const zCallWithResponseAndNoContentResponseData = z.object({\n    body: z.optional(z.never()),\n    path: z.optional(z.never()),\n    query: z.optional(z.never())\n});\n\nexport const zCallWithResponseAndNoContentResponseResponse = z.union([\n    z.number(),\n    z.void()\n]);\n\nexport const zDummyAData = z.object({\n    body: z.optional(z.never()),\n    path: z.optional(z.never()),\n    query: z.optional(z.never())\n});\n\nexport const zDummyAResponse = z400;\n\nexport const zDummyBData = z.object({\n    body: z.optional(z.never()),\n    path: z.optional(z.never()),\n    query: z.optional(z.never())\n});\n\n/**\n * Success\n */\nexport const zDummyBResponse = z.void();\n\nexport const zCallWithResponseData = z.object({\n    body: z.optional(z.never()),\n    path: z.optional(z.never()),\n    query: z.optional(z.never())\n});\n\nexport const zCallWithResponseResponse = zImport;\n\nexport const zCallWithDuplicateResponsesData = z.object({\n    body: z.optional(z.never()),\n    path: z.optional(z.never()),\n    query: z.optional(z.never())\n});\n\nexport const zCallWithDuplicateResponsesResponse = z.union([\n    z.intersection(zModelWithBoolean, zModelWithInteger),\n    zModelWithString\n]);\n\nexport const zCallWithResponsesData = z.object({\n    body: z.optional(z.never()),\n    path: z.optional(z.never()),\n    query: z.optional(z.never())\n});\n\nexport const zCallWithResponsesResponse = z.union([\n    z.object({\n        '@namespace.string': z.optional(z.readonly(z.string())),\n        '@namespace.integer': z.optional(z.readonly(z.int())),\n        value: z.optional(z.readonly(z.array(zModelWithString)))\n    }),\n    zModelThatExtends,\n    zModelThatExtendsExtends\n]);\n\nexport const zCollectionFormatData = z.object({\n    body: z.optional(z.never()),\n    path: z.optional(z.never()),\n    query: z.object({\n        parameterArrayCSV: z.nullable(z.array(z.string())),\n        parameterArraySSV: z.nullable(z.array(z.string())),\n        parameterArrayTSV: z.nullable(z.array(z.string())),\n        parameterArrayPipes: z.nullable(z.array(z.string())),\n        parameterArrayMulti: z.nullable(z.array(z.string()))\n    })\n});\n\nexport const zTypesData = z.object({\n    body: z.optional(z.never()),\n    path: z.optional(z.object({\n        id: z.optional(z.int().check(z.minimum(-2147483648, { error: 'Invalid value: Expected int32 to be >= -2147483648' }), z.maximum(2147483647, { error: 'Invalid value: Expected int32 to be <= 2147483647' })))\n    })),\n    query: z.object({\n        parameterNumber: z._default(z.number(), 123),\n        parameterString: z._default(z.nullable(z.string()), 'default'),\n        parameterBoolean: z._default(z.nullable(z.boolean()), true),\n        parameterObject: z._default(z.nullable(z.record(z.string(), z.unknown())), null),\n        parameterArray: z.nullable(z.array(z.string())),\n        parameterDictionary: z.nullable(z.record(z.string(), z.unknown())),\n        parameterEnum: z.nullable(z.union([\n            z.literal('Success'),\n            z.literal('Warning'),\n            z.literal('Error')\n        ]))\n    })\n});\n\nexport const zTypesResponse = z.union([\n    z.number(),\n    z.string(),\n    z.boolean(),\n    z.record(z.string(), z.unknown())\n]);\n\nexport const zUploadFileData = z.object({\n    body: z.string(),\n    path: z.object({\n        'api-version': z.nullable(z.string())\n    }),\n    query: z.optional(z.never())\n});\n\nexport const zUploadFileResponse = z.boolean();\n\nexport const zFileResponseData = z.object({\n    body: z.optional(z.never()),\n    path: z.object({\n        id: z.string(),\n        'api-version': z.string()\n    }),\n    query: z.optional(z.never())\n});\n\n/**\n * Success\n */\nexport const zFileResponseResponse = z.string();\n\nexport const zComplexTypesData = z.object({\n    body: z.optional(z.never()),\n    path: z.optional(z.never()),\n    query: z.object({\n        parameterObject: z.object({\n            first: z.optional(z.object({\n                second: z.optional(z.object({\n                    third: z.optional(z.string())\n                }))\n            }))\n        }),\n        parameterReference: zModelWithString\n    })\n});\n\n/**\n * Successful response\n */\nexport const zComplexTypesResponse = z.array(zModelWithString);\n\nexport const zMultipartResponseData = z.object({\n    body: z.optional(z.never()),\n    path: z.optional(z.never()),\n    query: z.optional(z.never())\n});\n\n/**\n * OK\n */\nexport const zMultipartResponseResponse = z.object({\n    file: z.optional(z.string()),\n    metadata: z.optional(z.object({\n        foo: z.optional(z.string()),\n        bar: z.optional(z.string())\n    }))\n});\n\nexport const zMultipartRequestData = z.object({\n    body: z.optional(z.object({\n        content: z.optional(z.string()),\n        data: z.nullish(zModelWithString)\n    })),\n    path: z.optional(z.never()),\n    query: z.optional(z.never())\n});\n\nexport const zComplexParamsData = z.object({\n    body: z.optional(z.object({\n        key: z.nullable(z.readonly(z.string().check(z.maxLength(64), z.regex(/^[a-zA-Z0-9_]*$/)))),\n        name: z.nullable(z.string().check(z.maxLength(255))),\n        enabled: z._default(z.optional(z.boolean()), true),\n        type: z.enum([\n            'Monkey',\n            'Horse',\n            'Bird'\n        ]),\n        listOfModels: z.nullish(z.array(zModelWithString)),\n        listOfStrings: z.nullish(z.array(z.string())),\n        parameters: z.union([\n            zModelWithString,\n            zModelWithEnum,\n            zModelWithArray,\n            zModelWithDictionary\n        ]),\n        user: z.optional(z.readonly(z.object({\n            id: z.optional(z.readonly(z.int().check(z.minimum(-2147483648, { error: 'Invalid value: Expected int32 to be >= -2147483648' }), z.maximum(2147483647, { error: 'Invalid value: Expected int32 to be <= 2147483647' })))),\n            name: z.nullish(z.readonly(z.string()))\n        })))\n    })),\n    path: z.object({\n        id: z.int().check(z.minimum(-2147483648, { error: 'Invalid value: Expected int32 to be >= -2147483648' }), z.maximum(2147483647, { error: 'Invalid value: Expected int32 to be <= 2147483647' })),\n        'api-version': z.string()\n    }),\n    query: z.optional(z.never())\n});\n\n/**\n * Success\n */\nexport const zComplexParamsResponse = zModelWithString;\n\nexport const zCallWithResultFromHeaderData = z.object({\n    body: z.optional(z.never()),\n    path: z.optional(z.never()),\n    query: z.optional(z.never())\n});\n\nexport const zTestErrorCodeData = z.object({\n    body: z.optional(z.never()),\n    path: z.optional(z.never()),\n    query: z.object({\n        status: z.int()\n    })\n});\n\nexport const zNonAsciiæøåÆøÅöôêÊ字符串Data = z.object({\n    body: z.optional(z.never()),\n    path: z.optional(z.never()),\n    query: z.object({\n        nonAsciiParamæøåÆØÅöôêÊ: z.int()\n    })\n});\n\n/**\n * Successful response\n */\nexport const zNonAsciiæøåÆøÅöôêÊ字符串Response = z.array(zNonAsciiStringæøåÆøÅöôêÊ字符串);\n\nexport const zPutWithFormUrlEncodedData = z.object({\n    body: zArrayWithStrings,\n    path: z.optional(z.never()),\n    query: z.optional(z.never())\n});\n"
  },
  {
    "path": "packages/openapi-ts-tests/zod/v4/__snapshots__/3.1.x/mini/defaults-with-ref-and-anyof/zod.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport * as z from 'zod/mini';\n\nexport const zAudioFormat = z.enum(['pcm_16bit_44.1khz', 'pcm_16bit_24khz']);\n\nexport const zLanguage = z.enum([\n    'en',\n    'es',\n    'fr'\n]);\n\nexport const zNestedConfig = z.object({\n    model: z._default(z.string(), 'gpt-4'),\n    temperature: z._default(z.number(), 1)\n});\n\nexport const zTestSchema = z.object({\n    primitiveDefault: z._default(z.number(), 42),\n    refWithPrimitiveDefault: z._default(zAudioFormat, 'pcm_16bit_44.1khz'),\n    refWithObjectDefault: z._default(zNestedConfig, { model: 'gpt-4', temperature: 1 }),\n    anyOfWithNullDefault: z._default(z.nullable(z.number()), null),\n    anyOfWithRefAndNullDefault: z._default(z.nullable(zLanguage), null),\n    optionalAnyOfWithDefault: z._default(z.nullish(z.string()), null)\n});\n"
  },
  {
    "path": "packages/openapi-ts-tests/zod/v4/__snapshots__/3.1.x/mini/enum-null/zod.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport * as z from 'zod/mini';\n\nexport const zFoo = z.nullable(z.enum(['foo', 'bar']));\n\nexport const zBar = z.enum(['foo', 'bar']);\n\nexport const zBaz = z.enum(['foo', 'bar']);\n"
  },
  {
    "path": "packages/openapi-ts-tests/zod/v4/__snapshots__/3.1.x/mini/enum-resolver-permissive/zod.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport * as z from 'zod/mini';\n\nexport const zFoo = z.nullable(z.union([z.enum(['foo', 'bar']), z.string()]));\n\nexport const zBar = z.union([z.enum(['foo', 'bar']), z.string()]);\n\nexport const zBaz = z.union([z.enum(['foo', 'bar']), z.string()]);\n"
  },
  {
    "path": "packages/openapi-ts-tests/zod/v4/__snapshots__/3.1.x/mini/schema-const/zod.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport * as z from 'zod/mini';\n\nexport const zFoo = z.object({\n    foo: z.optional(z.literal('foo')),\n    bar: z.optional(z.literal(3.2)),\n    baz: z.optional(z.literal(-1)),\n    qux: z.optional(z.literal(true)),\n    quux: z.optional(z.tuple([\n        z.literal(1),\n        z.literal(2),\n        z.literal(3),\n        z.literal('foo'),\n        z.literal(true)\n    ])),\n    corge: z.optional(z.record(z.string(), z.unknown())),\n    garply: z.optional(z.literal(BigInt('10'))),\n    numberInt8: z.optional(z.literal(100)),\n    numberInt16: z.optional(z.literal(1000)),\n    numberInt32: z.optional(z.literal(100000)),\n    numberInt64: z.optional(z.literal(BigInt(1000000000000))),\n    numberUint8: z.optional(z.literal(200)),\n    numberUint16: z.optional(z.literal(50000)),\n    numberUint32: z.optional(z.literal(3000000000)),\n    numberUint64: z.optional(z.literal(BigInt(18000000000000000000))),\n    integerInt8: z.optional(z.literal(-100)),\n    integerInt16: z.optional(z.literal(-1000)),\n    integerInt32: z.optional(z.literal(-100000)),\n    integerInt64: z.optional(z.literal(BigInt(-1000000000000))),\n    integerUint8: z.optional(z.literal(255)),\n    integerUint16: z.optional(z.literal(65535)),\n    integerUint32: z.optional(z.literal(4294967295)),\n    integerUint64: z.optional(z.literal(BigInt('18446744073709551615'))),\n    stringInt64: z.optional(z.literal(BigInt('-9223372036854775808'))),\n    stringUint64: z.optional(z.literal(BigInt('18446744073709551615')))\n});\n"
  },
  {
    "path": "packages/openapi-ts-tests/zod/v4/__snapshots__/3.1.x/mini/string-with-format/zod.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport * as z from 'zod/mini';\n\nexport const zFoo = z.object({\n    foo: z.optional(z.array(z.union([z.string(), z.string()])))\n});\n"
  },
  {
    "path": "packages/openapi-ts-tests/zod/v4/__snapshots__/3.1.x/mini/string-with-guid-format/zod.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport * as z from 'zod/mini';\n\nexport const zGetFooData = z.object({\n    body: z.optional(z.never()),\n    path: z.object({\n        guidId: z.guid()\n    }),\n    query: z.optional(z.never())\n});\n"
  },
  {
    "path": "packages/openapi-ts-tests/zod/v4/__snapshots__/3.1.x/mini/type-format/client/client.gen.ts",
    "content": "// 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 (options: RequestOptions) => {\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 url = buildUrl(opts);\n\n    return { opts, url };\n  };\n\n  const request: Client['request'] = async (options) => {\n    // @ts-expect-error\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"
  },
  {
    "path": "packages/openapi-ts-tests/zod/v4/__snapshots__/3.1.x/mini/type-format/client/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type { Auth } from '../core/auth.gen';\nexport type { QuerySerializerOptions } from '../core/bodySerializer.gen';\nexport {\n  formDataBodySerializer,\n  jsonBodySerializer,\n  urlSearchParamsBodySerializer,\n} from '../core/bodySerializer.gen';\nexport { buildClientParams } from '../core/params.gen';\nexport { serializeQueryKeyValue } from '../core/queryKeySerializer.gen';\nexport { createClient } from './client.gen';\nexport type {\n  Client,\n  ClientOptions,\n  Config,\n  CreateClientConfig,\n  Options,\n  RequestOptions,\n  RequestResult,\n  ResolvedRequestOptions,\n  ResponseStyle,\n  TDataShape,\n} from './types.gen';\nexport { createConfig, mergeHeaders } from './utils.gen';\n"
  },
  {
    "path": "packages/openapi-ts-tests/zod/v4/__snapshots__/3.1.x/mini/type-format/client/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { Auth } from '../core/auth.gen';\nimport type {\n  ServerSentEventsOptions,\n  ServerSentEventsResult,\n} from '../core/serverSentEvents.gen';\nimport type { Client as CoreClient, Config as CoreConfig } from '../core/types.gen';\nimport type { Middleware } from './utils.gen';\n\nexport type ResponseStyle = 'data' | 'fields';\n\nexport interface Config<T extends ClientOptions = ClientOptions>\n  extends Omit<RequestInit, 'body' | 'headers' | 'method'>, CoreConfig {\n  /**\n   * Base URL for all requests made by this client.\n   */\n  baseUrl?: T['baseUrl'];\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   * Please don't use the Fetch client for Next.js applications. The `next`\n   * options won't have any effect.\n   *\n   * Install {@link https://www.npmjs.com/package/@hey-api/client-next `@hey-api/client-next`} instead.\n   */\n  next?: never;\n  /**\n   * Return the response data parsed in a specified format. By default, `auto`\n   * will infer the appropriate method from the `Content-Type` response header.\n   * You can override this behavior with any of the {@link Body} methods.\n   * Select `stream` if you don't want to parse response data at all.\n   *\n   * @default 'auto'\n   */\n  parseAs?: 'arrayBuffer' | 'auto' | 'blob' | 'formData' | 'json' | 'stream' | 'text';\n  /**\n   * Should we return only data or multiple fields (data, error, response, etc.)?\n   *\n   * @default 'fields'\n   */\n  responseStyle?: ResponseStyle;\n  /**\n   * Throw an error instead of returning it in the response?\n   *\n   * @default false\n   */\n  throwOnError?: T['throwOnError'];\n}\n\nexport interface RequestOptions<\n  TData = unknown,\n  TResponseStyle extends ResponseStyle = 'fields',\n  ThrowOnError extends boolean = boolean,\n  Url extends string = string,\n>\n  extends\n    Config<{\n      responseStyle: TResponseStyle;\n      throwOnError: ThrowOnError;\n    }>,\n    Pick<\n      ServerSentEventsOptions<TData>,\n      | 'onRequest'\n      | 'onSseError'\n      | 'onSseEvent'\n      | 'sseDefaultRetryDelay'\n      | 'sseMaxRetryAttempts'\n      | 'sseMaxRetryDelay'\n    > {\n  /**\n   * Any body that you want to add to your request.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/fetch#body}\n   */\n  body?: unknown;\n  path?: Record<string, unknown>;\n  query?: Record<string, unknown>;\n  /**\n   * Security mechanism(s) to use for the request.\n   */\n  security?: ReadonlyArray<Auth>;\n  url: Url;\n}\n\nexport interface ResolvedRequestOptions<\n  TResponseStyle extends ResponseStyle = 'fields',\n  ThrowOnError extends boolean = boolean,\n  Url extends string = string,\n> extends RequestOptions<unknown, TResponseStyle, ThrowOnError, Url> {\n  serializedBody?: string;\n}\n\nexport type RequestResult<\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = boolean,\n  TResponseStyle extends ResponseStyle = 'fields',\n> = ThrowOnError extends true\n  ? Promise<\n      TResponseStyle extends 'data'\n        ? TData extends Record<string, unknown>\n          ? TData[keyof TData]\n          : TData\n        : {\n            data: TData extends Record<string, unknown> ? TData[keyof TData] : TData;\n            request: Request;\n            response: Response;\n          }\n    >\n  : Promise<\n      TResponseStyle extends 'data'\n        ? (TData extends Record<string, unknown> ? TData[keyof TData] : TData) | undefined\n        : (\n            | {\n                data: TData extends Record<string, unknown> ? TData[keyof TData] : TData;\n                error: undefined;\n              }\n            | {\n                data: undefined;\n                error: TError extends Record<string, unknown> ? TError[keyof TError] : TError;\n              }\n          ) & {\n            request: Request;\n            response: Response;\n          }\n    >;\n\nexport interface ClientOptions {\n  baseUrl?: string;\n  responseStyle?: ResponseStyle;\n  throwOnError?: boolean;\n}\n\ntype MethodFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'>,\n) => RequestResult<TData, TError, ThrowOnError, TResponseStyle>;\n\ntype SseFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'>,\n) => Promise<ServerSentEventsResult<TData, TError>>;\n\ntype RequestFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'> &\n    Pick<Required<RequestOptions<TData, TResponseStyle, ThrowOnError>>, 'method'>,\n) => RequestResult<TData, TError, ThrowOnError, TResponseStyle>;\n\ntype BuildUrlFn = <\n  TData extends {\n    body?: unknown;\n    path?: Record<string, unknown>;\n    query?: Record<string, unknown>;\n    url: string;\n  },\n>(\n  options: TData & Options<TData>,\n) => string;\n\nexport type Client = CoreClient<RequestFn, Config, MethodFn, BuildUrlFn, SseFn> & {\n  interceptors: Middleware<Request, Response, unknown, ResolvedRequestOptions>;\n};\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 = ClientOptions> = (\n  override?: Config<ClientOptions & T>,\n) => Config<Required<ClientOptions> & T>;\n\nexport interface TDataShape {\n  body?: unknown;\n  headers?: unknown;\n  path?: unknown;\n  query?: unknown;\n  url: string;\n}\n\ntype OmitKeys<T, K> = Pick<T, Exclude<keyof T, K>>;\n\nexport type Options<\n  TData extends TDataShape = TDataShape,\n  ThrowOnError extends boolean = boolean,\n  TResponse = unknown,\n  TResponseStyle extends ResponseStyle = 'fields',\n> = OmitKeys<\n  RequestOptions<TResponse, TResponseStyle, ThrowOnError>,\n  'body' | 'path' | 'query' | 'url'\n> &\n  ([TData] extends [never] ? unknown : Omit<TData, 'url'>);\n"
  },
  {
    "path": "packages/openapi-ts-tests/zod/v4/__snapshots__/3.1.x/mini/type-format/client/utils.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/zod/v4/__snapshots__/3.1.x/mini/type-format/client.gen.ts",
    "content": "// 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>());\n"
  },
  {
    "path": "packages/openapi-ts-tests/zod/v4/__snapshots__/3.1.x/mini/type-format/core/auth.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/zod/v4/__snapshots__/3.1.x/mini/type-format/core/bodySerializer.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/zod/v4/__snapshots__/3.1.x/mini/type-format/core/params.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/zod/v4/__snapshots__/3.1.x/mini/type-format/core/pathSerializer.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/zod/v4/__snapshots__/3.1.x/mini/type-format/core/queryKeySerializer.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\n/**\n * JSON-friendly union that mirrors what Pinia Colada can hash.\n */\nexport type JsonValue =\n  | null\n  | string\n  | number\n  | boolean\n  | JsonValue[]\n  | { [key: string]: JsonValue };\n\n/**\n * Replacer that converts non-JSON values (bigint, Date, etc.) to safe substitutes.\n */\nexport const queryKeyJsonReplacer = (_key: string, value: unknown) => {\n  if (value === undefined || typeof value === 'function' || typeof value === 'symbol') {\n    return undefined;\n  }\n  if (typeof value === 'bigint') {\n    return value.toString();\n  }\n  if (value instanceof Date) {\n    return value.toISOString();\n  }\n  return value;\n};\n\n/**\n * Safely stringifies a value and parses it back into a JsonValue.\n */\nexport const stringifyToJsonValue = (input: unknown): JsonValue | undefined => {\n  try {\n    const json = JSON.stringify(input, queryKeyJsonReplacer);\n    if (json === undefined) {\n      return undefined;\n    }\n    return JSON.parse(json) as JsonValue;\n  } catch {\n    return undefined;\n  }\n};\n\n/**\n * Detects plain objects (including objects with a null prototype).\n */\nconst isPlainObject = (value: unknown): value is Record<string, unknown> => {\n  if (value === null || typeof value !== 'object') {\n    return false;\n  }\n  const prototype = Object.getPrototypeOf(value as object);\n  return prototype === Object.prototype || prototype === null;\n};\n\n/**\n * Turns URLSearchParams into a sorted JSON object for deterministic keys.\n */\nconst serializeSearchParams = (params: URLSearchParams): JsonValue => {\n  const entries = Array.from(params.entries()).sort(([a], [b]) => a.localeCompare(b));\n  const result: Record<string, JsonValue> = {};\n\n  for (const [key, value] of entries) {\n    const existing = result[key];\n    if (existing === undefined) {\n      result[key] = value;\n      continue;\n    }\n\n    if (Array.isArray(existing)) {\n      (existing as string[]).push(value);\n    } else {\n      result[key] = [existing, value];\n    }\n  }\n\n  return result;\n};\n\n/**\n * Normalizes any accepted value into a JSON-friendly shape for query keys.\n */\nexport const serializeQueryKeyValue = (value: unknown): JsonValue | undefined => {\n  if (value === null) {\n    return null;\n  }\n\n  if (typeof value === 'string' || typeof value === 'number' || typeof value === 'boolean') {\n    return value;\n  }\n\n  if (value === undefined || typeof value === 'function' || typeof value === 'symbol') {\n    return undefined;\n  }\n\n  if (typeof value === 'bigint') {\n    return value.toString();\n  }\n\n  if (value instanceof Date) {\n    return value.toISOString();\n  }\n\n  if (Array.isArray(value)) {\n    return stringifyToJsonValue(value);\n  }\n\n  if (typeof URLSearchParams !== 'undefined' && value instanceof URLSearchParams) {\n    return serializeSearchParams(value);\n  }\n\n  if (isPlainObject(value)) {\n    return stringifyToJsonValue(value);\n  }\n\n  return undefined;\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/zod/v4/__snapshots__/3.1.x/mini/type-format/core/serverSentEvents.gen.ts",
    "content": "// 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 const 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            // Normalize line endings: CRLF -> LF, then CR -> LF\n            buffer = buffer.replace(/\\r\\n/g, '\\n').replace(/\\r/g, '\\n');\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"
  },
  {
    "path": "packages/openapi-ts-tests/zod/v4/__snapshots__/3.1.x/mini/type-format/core/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { Auth, AuthToken } from './auth.gen';\nimport type { BodySerializer, QuerySerializer, QuerySerializerOptions } from './bodySerializer.gen';\n\nexport type HttpMethod =\n  | 'connect'\n  | 'delete'\n  | 'get'\n  | 'head'\n  | 'options'\n  | 'patch'\n  | 'post'\n  | 'put'\n  | 'trace';\n\nexport type Client<\n  RequestFn = never,\n  Config = unknown,\n  MethodFn = never,\n  BuildUrlFn = never,\n  SseFn = never,\n> = {\n  /**\n   * Returns the final request URL.\n   */\n  buildUrl: BuildUrlFn;\n  getConfig: () => Config;\n  request: RequestFn;\n  setConfig: (config: Config) => Config;\n} & {\n  [K in HttpMethod]: MethodFn;\n} & ([SseFn] extends [never] ? { sse?: never } : { sse: { [K in HttpMethod]: SseFn } });\n\nexport interface Config {\n  /**\n   * Auth token or a function returning auth token. The resolved value will be\n   * added to the request payload as defined by its `security` array.\n   */\n  auth?: ((auth: Auth) => Promise<AuthToken> | AuthToken) | AuthToken;\n  /**\n   * A function for serializing request body parameter. By default,\n   * {@link JSON.stringify()} will be used.\n   */\n  bodySerializer?: BodySerializer | null;\n  /**\n   * An object containing any HTTP headers that you want to pre-populate your\n   * `Headers` object with.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/Headers/Headers#init See more}\n   */\n  headers?:\n    | RequestInit['headers']\n    | Record<\n        string,\n        string | number | boolean | (string | number | boolean)[] | null | undefined | unknown\n      >;\n  /**\n   * The request method.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/fetch#method See more}\n   */\n  method?: Uppercase<HttpMethod>;\n  /**\n   * A function for serializing request query parameters. By default, arrays\n   * will be exploded in form style, objects will be exploded in deepObject\n   * style, and reserved characters are percent-encoded.\n   *\n   * This method will have no effect if the native `paramsSerializer()` Axios\n   * API function is used.\n   *\n   * {@link https://swagger.io/docs/specification/serialization/#query View examples}\n   */\n  querySerializer?: QuerySerializer | QuerySerializerOptions;\n  /**\n   * A function validating request data. This is useful if you want to ensure\n   * the request conforms to the desired shape, so it can be safely sent to\n   * the server.\n   */\n  requestValidator?: (data: unknown) => Promise<unknown>;\n  /**\n   * A function transforming response data before it's returned. This is useful\n   * for post-processing data, e.g. converting ISO strings into Date objects.\n   */\n  responseTransformer?: (data: unknown) => Promise<unknown>;\n  /**\n   * A function validating response data. This is useful if you want to ensure\n   * the response conforms to the desired shape, so it can be safely passed to\n   * the transformers and returned to the user.\n   */\n  responseValidator?: (data: unknown) => Promise<unknown>;\n}\n\ntype IsExactlyNeverOrNeverUndefined<T> = [T] extends [never]\n  ? true\n  : [T] extends [never | undefined]\n    ? [undefined] extends [T]\n      ? false\n      : true\n    : false;\n\nexport type OmitNever<T extends Record<string, unknown>> = {\n  [K in keyof T as IsExactlyNeverOrNeverUndefined<T[K]> extends true ? never : K]: T[K];\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/zod/v4/__snapshots__/3.1.x/mini/type-format/core/utils.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/zod/v4/__snapshots__/3.1.x/mini/type-format/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport { type Options, postFoo } from './sdk.gen';\nexport type { Bar, ClientOptions, Foo, PostFooData, PostFooResponse, PostFooResponses, TypeID, UserId } from './types.gen';\n"
  },
  {
    "path": "packages/openapi-ts-tests/zod/v4/__snapshots__/3.1.x/mini/type-format/sdk.gen.ts",
    "content": "// 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 { postFooResponseTransformer } from './transformers.gen';\nimport type { PostFooData, PostFooResponses } from './types.gen';\nimport { zPostFooData, zPostFooResponse } from './zod.gen';\n\nexport type Options<TData extends TDataShape = TDataShape, ThrowOnError extends boolean = boolean> = Options2<TData, ThrowOnError> & {\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\nexport const postFoo = <ThrowOnError extends boolean = false>(options?: Options<PostFooData, ThrowOnError>) => (options?.client ?? client).post<PostFooResponses, unknown, ThrowOnError>({\n    requestValidator: async (data) => await zPostFooData.parseAsync(data),\n    responseTransformer: postFooResponseTransformer,\n    responseValidator: async (data) => await zPostFooResponse.parseAsync(data),\n    url: '/foo',\n    ...options\n});\n"
  },
  {
    "path": "packages/openapi-ts-tests/zod/v4/__snapshots__/3.1.x/mini/type-format/transformers.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { PostFooResponse } from './types.gen';\n\nconst fooSchemaResponseTransformer = (data: any) => {\n    data.foo = BigInt(data.foo.toString());\n    return data;\n};\n\nexport const postFooResponseTransformer = async (data: any): Promise<PostFooResponse> => {\n    data = fooSchemaResponseTransformer(data);\n    return data;\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/zod/v4/__snapshots__/3.1.x/mini/type-format/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type ClientOptions = {\n    baseUrl: `${string}://${string}` | (string & {});\n};\n\nexport type TypeID<T extends string> = `${T}_${string}`;\n\nexport type UserId = TypeID<'user'>;\n\nexport type Foo = {\n    bar?: number;\n    foo: bigint;\n    id: UserId;\n};\n\nexport type Bar = {\n    foo: number;\n    [key: string]: number;\n};\n\nexport type PostFooData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/foo';\n};\n\nexport type PostFooResponses = {\n    /**\n     * OK\n     */\n    200: Foo;\n};\n\nexport type PostFooResponse = PostFooResponses[keyof PostFooResponses];\n"
  },
  {
    "path": "packages/openapi-ts-tests/zod/v4/__snapshots__/3.1.x/mini/type-format/zod.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport * as z from 'zod/mini';\n\nexport const zFoo = z.object({\n    bar: z.optional(z.int()),\n    foo: z._default(z.coerce.bigint().check(z.minimum(BigInt('-9223372036854775808'), { error: 'Invalid value: Expected int64 to be >= -9223372036854775808' }), z.maximum(BigInt('9223372036854775807'), { error: 'Invalid value: Expected int64 to be <= 9223372036854775807' })), BigInt(0)),\n    id: z.string()\n});\n\nexport const zBar = z.object({\n    foo: z.int()\n});\n\nexport const zPostFooData = z.object({\n    body: z.optional(z.never()),\n    path: z.optional(z.never()),\n    query: z.optional(z.never())\n});\n\n/**\n * OK\n */\nexport const zPostFooResponse = zFoo;\n"
  },
  {
    "path": "packages/openapi-ts-tests/zod/v4/__snapshots__/3.1.x/mini/validators/zod.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport * as z from 'zod/mini';\n\nexport const zBaz = z._default(z.readonly(z.string().check(z.regex(/foo\\nbar/))), 'baz');\n\nexport const zQux = z.record(z.string(), z.object({\n    qux: z.optional(z.string())\n}));\n\n/**\n * This is Foo schema.\n */\nexport const zFoo = z._default(z.nullable(z.object({\n    foo: z.optional(z.string().check(z.regex(/^\\d{3}-\\d{2}-\\d{4}$/))),\n    bar: z.optional(z.lazy((): any => zBar)),\n    baz: z.optional(z.array(z.lazy((): any => zFoo))),\n    qux: z._default(z.optional(z.int().check(z.gt(0))), 0)\n})), null);\n\n/**\n * This is Bar schema.\n */\nexport const zBar = z.object({\n    foo: z.optional(zFoo)\n});\n\n/**\n * This is Foo parameter.\n */\nexport const zFoo2 = z.string();\n\nexport const zFoo3 = z.object({\n    foo: z.optional(zBar)\n});\n\nexport const zPatchFooData = z.object({\n    body: z.object({\n        foo: z.optional(z.string())\n    }),\n    path: z.optional(z.never()),\n    query: z.optional(z.object({\n        foo: z.optional(z.string()),\n        bar: z.optional(zBar),\n        baz: z.optional(z.object({\n            baz: z.optional(z.string())\n        })),\n        qux: z.optional(z.iso.date()),\n        quux: z.optional(z.iso.datetime())\n    }))\n});\n\nexport const zPostFooData = z.object({\n    body: zFoo3,\n    path: z.optional(z.never()),\n    query: z.optional(z.never())\n});\n"
  },
  {
    "path": "packages/openapi-ts-tests/zod/v4/__snapshots__/3.1.x/mini/validators-bigint-min-max/zod.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport * as z from 'zod/mini';\n\nexport const zFoo = z.object({\n    foo: z.optional(z.coerce.bigint().check(z.gte(BigInt(0)), z.lte(BigInt(100))))\n});\n"
  },
  {
    "path": "packages/openapi-ts-tests/zod/v4/__snapshots__/3.1.x/mini/validators-circular-ref/zod.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport * as z from 'zod/mini';\n\nexport const zBar = z.object({\n    bar: z.optional(z.array(z.lazy((): any => zBar)))\n});\n\nexport const zFoo = z.object({\n    foo: z.optional(zBar)\n});\n\nexport const zBaz = z.lazy((): any => zQux);\n\n/**\n * description caused circular reference error\n */\nexport const zQux = zBaz;\n"
  },
  {
    "path": "packages/openapi-ts-tests/zod/v4/__snapshots__/3.1.x/mini/validators-circular-ref-2/zod.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport * as z from 'zod/mini';\n\nexport const zBar = z.object({\n    bar: z.nullable(z.array(z.lazy((): any => zBar)))\n});\n\nexport const zFoo = z.object({\n    foo: zBar\n});\n"
  },
  {
    "path": "packages/openapi-ts-tests/zod/v4/__snapshots__/3.1.x/mini/validators-dates/zod.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport * as z from 'zod/mini';\n\nexport const zBaz = z._default(z.readonly(z.string().check(z.regex(/foo\\nbar/))), 'baz');\n\nexport const zQux = z.record(z.string(), z.object({\n    qux: z.optional(z.string())\n}));\n\n/**\n * This is Foo schema.\n */\nexport const zFoo = z._default(z.nullable(z.object({\n    foo: z.optional(z.string().check(z.regex(/^\\d{3}-\\d{2}-\\d{4}$/))),\n    bar: z.optional(z.lazy((): any => zBar)),\n    baz: z.optional(z.array(z.lazy((): any => zFoo))),\n    qux: z._default(z.optional(z.int().check(z.gt(0))), 0)\n})), null);\n\n/**\n * This is Bar schema.\n */\nexport const zBar = z.object({\n    foo: z.optional(zFoo)\n});\n\n/**\n * This is Foo parameter.\n */\nexport const zFoo2 = z.string();\n\nexport const zFoo3 = z.object({\n    foo: z.optional(zBar)\n});\n\nexport const zPatchFooData = z.object({\n    body: z.object({\n        foo: z.optional(z.string())\n    }),\n    path: z.optional(z.never()),\n    query: z.optional(z.object({\n        foo: z.optional(z.string()),\n        bar: z.optional(zBar),\n        baz: z.optional(z.object({\n            baz: z.optional(z.string())\n        })),\n        qux: z.optional(z.iso.date()),\n        quux: z.optional(z.iso.datetime({ offset: true }))\n    }))\n});\n\nexport const zPostFooData = z.object({\n    body: zFoo3,\n    path: z.optional(z.never()),\n    query: z.optional(z.never())\n});\n"
  },
  {
    "path": "packages/openapi-ts-tests/zod/v4/__snapshots__/3.1.x/mini/validators-metadata/zod.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport * as z from 'zod/mini';\n\nexport const zBaz = z._default(z.readonly(z.string().check(z.regex(/foo\\nbar/))), 'baz');\n\nexport const zQux = z.record(z.string(), z.object({\n    qux: z.optional(z.string())\n}));\n\n/**\n * This is Foo schema.\n */\nexport const zFoo = z._default(z.nullable(z.object({\n    foo: z.optional(z.string().check(z.regex(/^\\d{3}-\\d{2}-\\d{4}$/)).register(z.globalRegistry, {\n        description: 'This is foo property.'\n    })),\n    bar: z.optional(z.lazy((): any => zBar)),\n    baz: z.optional(z.array(z.lazy((): any => zFoo)).register(z.globalRegistry, {\n        description: 'This is baz property.'\n    })),\n    qux: z._default(z.optional(z.int().check(z.gt(0)).register(z.globalRegistry, {\n        description: 'This is qux property.'\n    })), 0)\n})), null);\n\n/**\n * This is Bar schema.\n */\nexport const zBar = z.object({\n    foo: z.optional(zFoo)\n}).register(z.globalRegistry, {\n    description: 'This is Bar schema.'\n});\n\n/**\n * This is Foo parameter.\n */\nexport const zFoo2 = z.string().register(z.globalRegistry, {\n    description: 'This is Foo parameter.'\n});\n\nexport const zFoo3 = z.object({\n    foo: z.optional(zBar)\n});\n\nexport const zPatchFooData = z.object({\n    body: z.object({\n        foo: z.optional(z.string())\n    }),\n    path: z.optional(z.never()),\n    query: z.optional(z.object({\n        foo: z.optional(z.string().register(z.globalRegistry, {\n            description: 'This is Foo parameter.'\n        })),\n        bar: z.optional(zBar),\n        baz: z.optional(z.object({\n            baz: z.optional(z.string())\n        })),\n        qux: z.optional(z.iso.date()),\n        quux: z.optional(z.iso.datetime())\n    }))\n});\n\nexport const zPostFooData = z.object({\n    body: zFoo3,\n    path: z.optional(z.never()),\n    query: z.optional(z.never())\n});\n"
  },
  {
    "path": "packages/openapi-ts-tests/zod/v4/__snapshots__/3.1.x/mini/validators-metadata-fn/zod.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport * as z from 'zod/mini';\n\nexport const zBaz = z._default(z.readonly(z.string().check(z.regex(/foo\\nbar/)).register(z.globalRegistry, { custom: 'value', title: 'string' })), 'baz');\n\nexport const zQux = z.record(z.string(), z.object({\n    qux: z.optional(z.string().register(z.globalRegistry, { custom: 'value', title: 'string' }))\n}).register(z.globalRegistry, { custom: 'value', title: 'object' })).register(z.globalRegistry, { custom: 'value', title: 'object' });\n\n/**\n * This is Foo schema.\n */\nexport const zFoo = z._default(z.nullable(z.object({\n    foo: z.optional(z.string().check(z.regex(/^\\d{3}-\\d{2}-\\d{4}$/)).register(z.globalRegistry, { custom: 'value', title: 'This is foo property.' })),\n    bar: z.optional(z.lazy((): any => zBar)),\n    baz: z.optional(z.array(z.lazy((): any => zFoo)).register(z.globalRegistry, { custom: 'value', title: 'This is baz property.' })),\n    qux: z._default(z.optional(z.int().check(z.gt(0)).register(z.globalRegistry, { custom: 'value', title: 'This is qux property.' })), 0)\n}).register(z.globalRegistry, { custom: 'value', title: 'object' })), null);\n\n/**\n * This is Bar schema.\n */\nexport const zBar = z.object({\n    foo: z.optional(zFoo)\n}).register(z.globalRegistry, { custom: 'value', title: 'This is Bar schema.' });\n\n/**\n * This is Foo parameter.\n */\nexport const zFoo2 = z.string().register(z.globalRegistry, { custom: 'value', title: 'This is Foo parameter.' });\n\nexport const zFoo3 = z.object({\n    foo: z.optional(zBar)\n}).register(z.globalRegistry, { custom: 'value', title: 'object' });\n\nexport const zPatchFooData = z.object({\n    body: z.object({\n        foo: z.optional(z.string().register(z.globalRegistry, { custom: 'value', title: 'string' }))\n    }).register(z.globalRegistry, { custom: 'value', title: 'object' }),\n    path: z.optional(z.never().register(z.globalRegistry, { custom: 'value', title: 'never' })),\n    query: z.optional(z.object({\n        foo: z.optional(z.string().register(z.globalRegistry, { custom: 'value', title: 'This is Foo parameter.' })),\n        bar: z.optional(zBar),\n        baz: z.optional(z.object({\n            baz: z.optional(z.string().register(z.globalRegistry, { custom: 'value', title: 'string' }))\n        }).register(z.globalRegistry, { custom: 'value', title: 'object' })),\n        qux: z.optional(z.iso.date().register(z.globalRegistry, { custom: 'value', title: 'string' })),\n        quux: z.optional(z.iso.datetime().register(z.globalRegistry, { custom: 'value', title: 'string' }))\n    }).register(z.globalRegistry, { custom: 'value', title: 'object' }))\n}).register(z.globalRegistry, { custom: 'value', title: 'object' });\n\nexport const zPostFooData = z.object({\n    body: zFoo3,\n    path: z.optional(z.never().register(z.globalRegistry, { custom: 'value', title: 'never' })),\n    query: z.optional(z.never().register(z.globalRegistry, { custom: 'value', title: 'never' }))\n}).register(z.globalRegistry, { custom: 'value', title: 'object' });\n"
  },
  {
    "path": "packages/openapi-ts-tests/zod/v4/__snapshots__/3.1.x/mini/validators-string-constraints-union/zod.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport * as z from 'zod/mini';\n\nexport const zLocaleOrLanguage = z.union([\n    z.string().check(z.length(5)),\n    z.string().check(z.length(2))\n]);\n"
  },
  {
    "path": "packages/openapi-ts-tests/zod/v4/__snapshots__/3.1.x/mini/validators-types/zod.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport * as z from 'zod/mini';\n\nexport const zBaz = z._default(z.readonly(z.string().check(z.regex(/foo\\nbar/))), 'baz');\n\nexport type BazZodType = z.infer<typeof zBaz>;\n\nexport const zQux = z.record(z.string(), z.object({\n    qux: z.optional(z.string())\n}));\n\nexport type QuxZodType = z.infer<typeof zQux>;\n\n/**\n * This is Foo schema.\n */\nexport const zFoo = z._default(z.nullable(z.object({\n    foo: z.optional(z.string().check(z.regex(/^\\d{3}-\\d{2}-\\d{4}$/))),\n    bar: z.optional(z.lazy((): any => zBar)),\n    baz: z.optional(z.array(z.lazy((): any => zFoo))),\n    qux: z._default(z.optional(z.int().check(z.gt(0))), 0)\n})), null);\n\nexport type FooZodType = z.infer<typeof zFoo>;\n\n/**\n * This is Bar schema.\n */\nexport const zBar = z.object({\n    foo: z.optional(zFoo)\n});\n\nexport type BarZodType = z.infer<typeof zBar>;\n\n/**\n * This is Foo parameter.\n */\nexport const zFoo2 = z.string();\n\nexport type FooZodType2 = z.infer<typeof zFoo2>;\n\nexport const zFoo3 = z.object({\n    foo: z.optional(zBar)\n});\n\nexport type FooZodType3 = z.infer<typeof zFoo3>;\n\nexport const zPatchFooData = z.object({\n    body: z.object({\n        foo: z.optional(z.string())\n    }),\n    path: z.optional(z.never()),\n    query: z.optional(z.object({\n        foo: z.optional(z.string()),\n        bar: z.optional(zBar),\n        baz: z.optional(z.object({\n            baz: z.optional(z.string())\n        })),\n        qux: z.optional(z.iso.date()),\n        quux: z.optional(z.iso.datetime())\n    }))\n});\n\nexport type PatchFooDataZodType = z.infer<typeof zPatchFooData>;\n\nexport const zPostFooData = z.object({\n    body: zFoo3,\n    path: z.optional(z.never()),\n    query: z.optional(z.never())\n});\n\nexport type PostFooDataZodType = z.infer<typeof zPostFooData>;\n"
  },
  {
    "path": "packages/openapi-ts-tests/zod/v4/__snapshots__/3.1.x/mini/validators-union-merge/zod.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport * as z from 'zod/mini';\n\nexport const zContact = z.union([\n    z.object({\n        email: z.string()\n    }),\n    z.object({\n        phone: z.string()\n    })\n]);\n\nexport const zUser = z.intersection(zContact, z.object({\n    username: z.string()\n}));\n\nexport const zDogDetails = z.object({\n    breed: z.string(),\n    barkVolume: z.int().check(z.gte(1), z.lte(10))\n});\n\nexport const zCatDetails = z.object({\n    furLength: z.enum([\n        'short',\n        'medium',\n        'long'\n    ]),\n    purrs: z.boolean()\n});\n\nexport const zPetStore = z.object({\n    animals: z.array(z.object({\n        name: z.string(),\n        type: z.optional(z.enum(['dog', 'cat'])),\n        details: z.union([\n            zDogDetails,\n            zCatDetails\n        ])\n    }))\n});\n"
  },
  {
    "path": "packages/openapi-ts-tests/zod/v4/__snapshots__/3.1.x/mini/webhooks/zod.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport * as z from 'zod/mini';\n\nexport const zSessionUserPhoneCalloutRingingWebhookRequest = z.object({\n    body: z.optional(z.object({\n        event: z.string(),\n        event_ts: z.coerce.bigint().check(z.minimum(BigInt('-9223372036854775808'), { error: 'Invalid value: Expected int64 to be >= -9223372036854775808' }), z.maximum(BigInt('9223372036854775807'), { error: 'Invalid value: Expected int64 to be <= 9223372036854775807' })),\n        payload: z.object({\n            account_id: z.string(),\n            object: z.object({\n                id: z.optional(z.coerce.bigint().check(z.minimum(BigInt('-9223372036854775808'), { error: 'Invalid value: Expected int64 to be >= -9223372036854775808' }), z.maximum(BigInt('9223372036854775807'), { error: 'Invalid value: Expected int64 to be <= 9223372036854775807' }))),\n                uuid: z.optional(z.string()),\n                session_id: z.string(),\n                session_name: z.string(),\n                session_key: z.string(),\n                user_key: z.string(),\n                host_id: z.string(),\n                participant: z.object({\n                    invitee_name: z.string(),\n                    phone_number: z.coerce.bigint().check(z.minimum(BigInt('-9223372036854775808'), { error: 'Invalid value: Expected int64 to be >= -9223372036854775808' }), z.maximum(BigInt('9223372036854775807'), { error: 'Invalid value: Expected int64 to be <= 9223372036854775807' })),\n                    from_number: z.coerce.bigint().check(z.minimum(BigInt('-9223372036854775808'), { error: 'Invalid value: Expected int64 to be >= -9223372036854775808' }), z.maximum(BigInt('9223372036854775807'), { error: 'Invalid value: Expected int64 to be <= 9223372036854775807' }))\n                })\n            })\n        })\n    })),\n    path: z.optional(z.never()),\n    query: z.optional(z.never())\n});\n\nexport const zSessionUserRoomSystemCalloutRingingWebhookRequest = z.object({\n    body: z.optional(z.object({\n        event: z.string(),\n        event_ts: z.coerce.bigint().check(z.minimum(BigInt('-9223372036854775808'), { error: 'Invalid value: Expected int64 to be >= -9223372036854775808' }), z.maximum(BigInt('9223372036854775807'), { error: 'Invalid value: Expected int64 to be <= 9223372036854775807' })),\n        payload: z.object({\n            account_id: z.string(),\n            object: z.object({\n                id: z.optional(z.coerce.bigint().check(z.minimum(BigInt('-9223372036854775808'), { error: 'Invalid value: Expected int64 to be >= -9223372036854775808' }), z.maximum(BigInt('9223372036854775807'), { error: 'Invalid value: Expected int64 to be <= 9223372036854775807' }))),\n                uuid: z.optional(z.string()),\n                session_id: z.string(),\n                session_name: z.string(),\n                host_id: z.string(),\n                message_id: z.string(),\n                inviter_name: z.string(),\n                participant: z.object({\n                    call_type: z.string(),\n                    device_ip: z.string()\n                })\n            })\n        })\n    })),\n    path: z.optional(z.never()),\n    query: z.optional(z.never())\n});\n\nexport const zSessionRecordingStartedWebhookRequest = z.object({\n    body: z.optional(z.object({\n        event: z.enum(['session.recording_started']),\n        event_ts: z.coerce.bigint().check(z.minimum(BigInt('-9223372036854775808'), { error: 'Invalid value: Expected int64 to be >= -9223372036854775808' }), z.maximum(BigInt('9223372036854775807'), { error: 'Invalid value: Expected int64 to be <= 9223372036854775807' })),\n        payload: z.object({\n            account_id: z.string(),\n            object: z.object({\n                session_id: z.string(),\n                session_name: z.string(),\n                session_key: z.string(),\n                start_time: z.iso.datetime(),\n                timezone: z.string(),\n                recording_file: z.object({\n                    recording_start: z.optional(z.string()),\n                    recording_end: z.optional(z.string())\n                })\n            })\n        })\n    })),\n    path: z.optional(z.never()),\n    query: z.optional(z.never())\n});\n\nexport const zSessionRecordingResumedWebhookRequest = z.object({\n    body: z.optional(z.object({\n        event: z.enum(['session.recording_resumed']),\n        event_ts: z.coerce.bigint().check(z.minimum(BigInt('-9223372036854775808'), { error: 'Invalid value: Expected int64 to be >= -9223372036854775808' }), z.maximum(BigInt('9223372036854775807'), { error: 'Invalid value: Expected int64 to be <= 9223372036854775807' })),\n        payload: z.object({\n            account_id: z.string(),\n            object: z.object({\n                session_id: z.string(),\n                session_name: z.string(),\n                session_key: z.string(),\n                start_time: z.iso.datetime(),\n                timezone: z.string(),\n                recording_file: z.object({\n                    recording_start: z.optional(z.string()),\n                    recording_end: z.optional(z.string())\n                })\n            })\n        })\n    })),\n    path: z.optional(z.never()),\n    query: z.optional(z.never())\n});\n\nexport const zSessionLiveStreamingStoppedWebhookRequest = z.object({\n    body: z.optional(z.object({\n        event: z.enum(['session.live_streaming_stopped']),\n        event_ts: z.coerce.bigint().check(z.minimum(BigInt('-9223372036854775808'), { error: 'Invalid value: Expected int64 to be >= -9223372036854775808' }), z.maximum(BigInt('9223372036854775807'), { error: 'Invalid value: Expected int64 to be <= 9223372036854775807' })),\n        payload: z.object({\n            account_id: z.string(),\n            object: z.object({\n                id: z.string(),\n                session_id: z.string(),\n                session_name: z.string(),\n                session_key: z.optional(z.string()),\n                start_time: z.iso.datetime(),\n                live_streaming: z.object({\n                    service: z.enum([\n                        'Facebook',\n                        'Workplace_by_Facebook',\n                        'YouTube',\n                        'Custom_Live_Streaming_Service'\n                    ]),\n                    custom_live_streaming_settings: z.object({\n                        stream_url: z.string(),\n                        stream_key: z.string(),\n                        page_url: z.string(),\n                        resolution: z.optional(z.string())\n                    }),\n                    date_time: z.iso.datetime()\n                })\n            })\n        })\n    })),\n    path: z.optional(z.never()),\n    query: z.optional(z.never())\n});\n\nexport const zSessionStreamIngestionStoppedWebhookRequest = z.object({\n    body: z.optional(z.object({\n        event: z.enum(['session.stream_ingestion_stopped']),\n        event_ts: z.coerce.bigint().check(z.minimum(BigInt('-9223372036854775808'), { error: 'Invalid value: Expected int64 to be >= -9223372036854775808' }), z.maximum(BigInt('9223372036854775807'), { error: 'Invalid value: Expected int64 to be <= 9223372036854775807' })),\n        payload: z.object({\n            account_id: z.string(),\n            object: z.object({\n                session_id: z.string(),\n                session_name: z.string(),\n                session_key: z.optional(z.string()),\n                stream_ingestion: z.object({\n                    stream_id: z.string(),\n                    stream_name: z.string(),\n                    stream_description: z.optional(z.string()),\n                    stream_key: z.string(),\n                    stream_url: z.string(),\n                    backup_stream_url: z.string()\n                })\n            })\n        })\n    })),\n    path: z.optional(z.never()),\n    query: z.optional(z.never())\n});\n\nexport const zSessionUserRoomSystemCalloutRejectedWebhookRequest = z.object({\n    body: z.optional(z.object({\n        event: z.string(),\n        event_ts: z.coerce.bigint().check(z.minimum(BigInt('-9223372036854775808'), { error: 'Invalid value: Expected int64 to be >= -9223372036854775808' }), z.maximum(BigInt('9223372036854775807'), { error: 'Invalid value: Expected int64 to be <= 9223372036854775807' })),\n        payload: z.object({\n            account_id: z.string(),\n            object: z.object({\n                id: z.optional(z.coerce.bigint().check(z.minimum(BigInt('-9223372036854775808'), { error: 'Invalid value: Expected int64 to be >= -9223372036854775808' }), z.maximum(BigInt('9223372036854775807'), { error: 'Invalid value: Expected int64 to be <= 9223372036854775807' }))),\n                uuid: z.optional(z.string()),\n                session_id: z.string(),\n                session_name: z.string(),\n                host_id: z.string(),\n                message_id: z.string(),\n                inviter_name: z.string(),\n                participant: z.object({\n                    call_type: z.string(),\n                    device_ip: z.string()\n                })\n            })\n        })\n    })),\n    path: z.optional(z.never()),\n    query: z.optional(z.never())\n});\n\nexport const zSessionAlertWebhookRequest = z.object({\n    body: z.optional(z.object({\n        event: z.enum(['session.alert']),\n        event_ts: z.coerce.bigint().check(z.minimum(BigInt('-9223372036854775808'), { error: 'Invalid value: Expected int64 to be >= -9223372036854775808' }), z.maximum(BigInt('9223372036854775807'), { error: 'Invalid value: Expected int64 to be <= 9223372036854775807' })),\n        payload: z.object({\n            account_id: z.string(),\n            object: z.object({\n                id: z.string(),\n                session_id: z.string(),\n                session_name: z.string(),\n                session_key: z.optional(z.string()),\n                issues: z.array(z.enum([\n                    'Unstable audio quality',\n                    'Unstable video quality',\n                    'Unstable screen share quality',\n                    'High CPU occupation',\n                    'Call Reconnection'\n                ]))\n            })\n        })\n    })),\n    path: z.optional(z.never()),\n    query: z.optional(z.never())\n});\n\nexport const zSessionSharingEndedWebhookRequest = z.object({\n    body: z.optional(z.object({\n        event: z.enum(['session.sharing_ended']),\n        event_ts: z.coerce.bigint().check(z.minimum(BigInt('-9223372036854775808'), { error: 'Invalid value: Expected int64 to be >= -9223372036854775808' }), z.maximum(BigInt('9223372036854775807'), { error: 'Invalid value: Expected int64 to be <= 9223372036854775807' })),\n        payload: z.object({\n            account_id: z.string(),\n            object: z.object({\n                id: z.string(),\n                session_id: z.string(),\n                session_name: z.string(),\n                session_key: z.optional(z.string()),\n                user: z.object({\n                    id: z.string(),\n                    name: z.string(),\n                    user_key: z.optional(z.string()),\n                    sharing_details: z.object({\n                        content: z.enum([\n                            'application',\n                            'whiteboard',\n                            'desktop',\n                            'unknown'\n                        ]),\n                        date_time: z.iso.datetime()\n                    })\n                })\n            })\n        })\n    })),\n    path: z.optional(z.never()),\n    query: z.optional(z.never())\n});\n\nexport const zSessionRecordingPausedWebhookRequest = z.object({\n    body: z.optional(z.object({\n        event: z.enum(['session.recording_paused']),\n        event_ts: z.coerce.bigint().check(z.minimum(BigInt('-9223372036854775808'), { error: 'Invalid value: Expected int64 to be >= -9223372036854775808' }), z.maximum(BigInt('9223372036854775807'), { error: 'Invalid value: Expected int64 to be <= 9223372036854775807' })),\n        payload: z.object({\n            account_id: z.string(),\n            object: z.object({\n                session_id: z.string(),\n                session_name: z.string(),\n                session_key: z.string(),\n                start_time: z.iso.datetime(),\n                timezone: z.string(),\n                recording_file: z.object({\n                    recording_start: z.optional(z.string()),\n                    recording_end: z.optional(z.string())\n                })\n            })\n        })\n    })),\n    path: z.optional(z.never()),\n    query: z.optional(z.never())\n});\n\nexport const zSessionEndedWebhookRequest = z.object({\n    body: z.optional(z.object({\n        event: z.enum(['session.ended']),\n        event_ts: z.coerce.bigint().check(z.minimum(BigInt('-9223372036854775808'), { error: 'Invalid value: Expected int64 to be >= -9223372036854775808' }), z.maximum(BigInt('9223372036854775807'), { error: 'Invalid value: Expected int64 to be <= 9223372036854775807' })),\n        payload: z.object({\n            account_id: z.string(),\n            object: z.object({\n                id: z.string(),\n                session_id: z.string(),\n                session_name: z.string(),\n                session_key: z.optional(z.string()),\n                start_time: z.iso.datetime(),\n                end_time: z.iso.datetime()\n            })\n        })\n    })),\n    path: z.optional(z.never()),\n    query: z.optional(z.never())\n});\n\nexport const zSessionStartedWebhookRequest = z.object({\n    body: z.optional(z.object({\n        event: z.enum(['session.started']),\n        event_ts: z.coerce.bigint().check(z.minimum(BigInt('-9223372036854775808'), { error: 'Invalid value: Expected int64 to be >= -9223372036854775808' }), z.maximum(BigInt('9223372036854775807'), { error: 'Invalid value: Expected int64 to be <= 9223372036854775807' })),\n        payload: z.object({\n            account_id: z.string(),\n            object: z.object({\n                id: z.string(),\n                session_id: z.string(),\n                session_name: z.string(),\n                session_key: z.optional(z.string()),\n                start_time: z.iso.datetime()\n            })\n        })\n    })),\n    path: z.optional(z.never()),\n    query: z.optional(z.never())\n});\n\nexport const zSessionStreamIngestionUnbindWebhookRequest = z.object({\n    body: z.optional(z.object({\n        event: z.enum(['session.stream_ingestion_unbind']),\n        event_ts: z.coerce.bigint().check(z.minimum(BigInt('-9223372036854775808'), { error: 'Invalid value: Expected int64 to be >= -9223372036854775808' }), z.maximum(BigInt('9223372036854775807'), { error: 'Invalid value: Expected int64 to be <= 9223372036854775807' })),\n        payload: z.object({\n            account_id: z.string(),\n            object: z.object({\n                session_id: z.string(),\n                session_name: z.string(),\n                session_key: z.optional(z.string()),\n                stream_ingestion: z.object({\n                    stream_id: z.string(),\n                    stream_name: z.string(),\n                    stream_description: z.optional(z.string()),\n                    stream_key: z.string(),\n                    stream_url: z.string(),\n                    backup_stream_url: z.string()\n                })\n            })\n        })\n    })),\n    path: z.optional(z.never()),\n    query: z.optional(z.never())\n});\n\nexport const zSessionLiveStreamingStartedWebhookRequest = z.object({\n    body: z.optional(z.object({\n        event: z.enum(['session.live_streaming_started']),\n        event_ts: z.coerce.bigint().check(z.minimum(BigInt('-9223372036854775808'), { error: 'Invalid value: Expected int64 to be >= -9223372036854775808' }), z.maximum(BigInt('9223372036854775807'), { error: 'Invalid value: Expected int64 to be <= 9223372036854775807' })),\n        payload: z.object({\n            account_id: z.string(),\n            object: z.object({\n                id: z.string(),\n                session_id: z.string(),\n                session_name: z.string(),\n                session_key: z.optional(z.string()),\n                start_time: z.iso.datetime(),\n                live_streaming: z.object({\n                    service: z.enum([\n                        'Facebook',\n                        'Workplace_by_Facebook',\n                        'YouTube',\n                        'Custom_Live_Streaming_Service'\n                    ]),\n                    custom_live_streaming_settings: z.object({\n                        stream_url: z.string(),\n                        stream_key: z.string(),\n                        page_url: z.string(),\n                        resolution: z.optional(z.string())\n                    }),\n                    date_time: z.iso.datetime()\n                })\n            })\n        })\n    })),\n    path: z.optional(z.never()),\n    query: z.optional(z.never())\n});\n\nexport const zSessionUserRoomSystemCalloutMissedWebhookRequest = z.object({\n    body: z.optional(z.object({\n        event: z.string(),\n        event_ts: z.coerce.bigint().check(z.minimum(BigInt('-9223372036854775808'), { error: 'Invalid value: Expected int64 to be >= -9223372036854775808' }), z.maximum(BigInt('9223372036854775807'), { error: 'Invalid value: Expected int64 to be <= 9223372036854775807' })),\n        payload: z.object({\n            account_id: z.string(),\n            object: z.object({\n                id: z.optional(z.coerce.bigint().check(z.minimum(BigInt('-9223372036854775808'), { error: 'Invalid value: Expected int64 to be >= -9223372036854775808' }), z.maximum(BigInt('9223372036854775807'), { error: 'Invalid value: Expected int64 to be <= 9223372036854775807' }))),\n                uuid: z.optional(z.string()),\n                session_id: z.string(),\n                session_name: z.string(),\n                host_id: z.string(),\n                message_id: z.string(),\n                inviter_name: z.string(),\n                participant: z.object({\n                    call_type: z.string(),\n                    device_ip: z.string()\n                })\n            })\n        })\n    })),\n    path: z.optional(z.never()),\n    query: z.optional(z.never())\n});\n\nexport const zSessionUserPhoneCalloutAcceptedWebhookRequest = z.object({\n    body: z.optional(z.object({\n        event: z.string(),\n        event_ts: z.coerce.bigint().check(z.minimum(BigInt('-9223372036854775808'), { error: 'Invalid value: Expected int64 to be >= -9223372036854775808' }), z.maximum(BigInt('9223372036854775807'), { error: 'Invalid value: Expected int64 to be <= 9223372036854775807' })),\n        payload: z.object({\n            account_id: z.string(),\n            object: z.object({\n                id: z.optional(z.coerce.bigint().check(z.minimum(BigInt('-9223372036854775808'), { error: 'Invalid value: Expected int64 to be >= -9223372036854775808' }), z.maximum(BigInt('9223372036854775807'), { error: 'Invalid value: Expected int64 to be <= 9223372036854775807' }))),\n                uuid: z.optional(z.string()),\n                session_id: z.string(),\n                session_name: z.string(),\n                session_key: z.string(),\n                user_key: z.string(),\n                host_id: z.string(),\n                participant: z.object({\n                    invitee_name: z.string(),\n                    phone_number: z.coerce.bigint().check(z.minimum(BigInt('-9223372036854775808'), { error: 'Invalid value: Expected int64 to be >= -9223372036854775808' }), z.maximum(BigInt('9223372036854775807'), { error: 'Invalid value: Expected int64 to be <= 9223372036854775807' })),\n                    from_number: z.coerce.bigint().check(z.minimum(BigInt('-9223372036854775808'), { error: 'Invalid value: Expected int64 to be >= -9223372036854775808' }), z.maximum(BigInt('9223372036854775807'), { error: 'Invalid value: Expected int64 to be <= 9223372036854775807' }))\n                })\n            })\n        })\n    })),\n    path: z.optional(z.never()),\n    query: z.optional(z.never())\n});\n\nexport const zSessionUserLeftWebhookRequest = z.object({\n    body: z.optional(z.object({\n        event: z.enum(['session.user_left']),\n        event_ts: z.coerce.bigint().check(z.minimum(BigInt('-9223372036854775808'), { error: 'Invalid value: Expected int64 to be >= -9223372036854775808' }), z.maximum(BigInt('9223372036854775807'), { error: 'Invalid value: Expected int64 to be <= 9223372036854775807' })),\n        payload: z.object({\n            account_id: z.string(),\n            object: z.object({\n                id: z.string(),\n                session_id: z.string(),\n                session_name: z.string(),\n                session_key: z.optional(z.string()),\n                user: z.object({\n                    id: z.string(),\n                    name: z.string(),\n                    leave_time: z.iso.datetime(),\n                    leave_reason: z.optional(z.string()),\n                    user_key: z.optional(z.string()),\n                    phone_number: z.optional(z.string()),\n                    participant_uuid: z.string()\n                })\n            })\n        })\n    })),\n    path: z.optional(z.never()),\n    query: z.optional(z.never())\n});\n\nexport const zSessionSharingStartedWebhookRequest = z.object({\n    body: z.optional(z.object({\n        event: z.enum(['session.sharing_started']),\n        event_ts: z.coerce.bigint().check(z.minimum(BigInt('-9223372036854775808'), { error: 'Invalid value: Expected int64 to be >= -9223372036854775808' }), z.maximum(BigInt('9223372036854775807'), { error: 'Invalid value: Expected int64 to be <= 9223372036854775807' })),\n        payload: z.object({\n            account_id: z.string(),\n            object: z.object({\n                id: z.string(),\n                session_id: z.string(),\n                session_name: z.string(),\n                session_key: z.optional(z.string()),\n                user: z.object({\n                    id: z.string(),\n                    name: z.string(),\n                    user_key: z.optional(z.string()),\n                    sharing_details: z.object({\n                        content: z.enum([\n                            'application',\n                            'whiteboard',\n                            'desktop',\n                            'unknown'\n                        ]),\n                        date_time: z.iso.datetime()\n                    })\n                })\n            })\n        })\n    })),\n    path: z.optional(z.never()),\n    query: z.optional(z.never())\n});\n\nexport const zSessionUserPhoneCalloutCanceledWebhookRequest = z.object({\n    body: z.optional(z.object({\n        event: z.string(),\n        event_ts: z.coerce.bigint().check(z.minimum(BigInt('-9223372036854775808'), { error: 'Invalid value: Expected int64 to be >= -9223372036854775808' }), z.maximum(BigInt('9223372036854775807'), { error: 'Invalid value: Expected int64 to be <= 9223372036854775807' })),\n        payload: z.object({\n            account_id: z.string(),\n            object: z.object({\n                session_id: z.string(),\n                session_name: z.string(),\n                session_key: z.string(),\n                user_key: z.string(),\n                participant: z.object({\n                    invitee_name: z.string(),\n                    phone_number: z.coerce.bigint().check(z.minimum(BigInt('-9223372036854775808'), { error: 'Invalid value: Expected int64 to be >= -9223372036854775808' }), z.maximum(BigInt('9223372036854775807'), { error: 'Invalid value: Expected int64 to be <= 9223372036854775807' })),\n                    from_number: z.coerce.bigint().check(z.minimum(BigInt('-9223372036854775808'), { error: 'Invalid value: Expected int64 to be >= -9223372036854775808' }), z.maximum(BigInt('9223372036854775807'), { error: 'Invalid value: Expected int64 to be <= 9223372036854775807' }))\n                })\n            })\n        })\n    })),\n    path: z.optional(z.never()),\n    query: z.optional(z.never())\n});\n\nexport const zSessionRecordingTranscriptCompletedWebhookRequest = z.object({\n    body: z.optional(z.object({\n        event: z.enum(['session.recording_transcript_completed']),\n        event_ts: z.coerce.bigint().check(z.minimum(BigInt('-9223372036854775808'), { error: 'Invalid value: Expected int64 to be >= -9223372036854775808' }), z.maximum(BigInt('9223372036854775807'), { error: 'Invalid value: Expected int64 to be <= 9223372036854775807' })),\n        download_token: z.string(),\n        payload: z.object({\n            account_id: z.string(),\n            object: z.object({\n                session_id: z.string(),\n                session_name: z.string(),\n                session_key: z.string(),\n                start_time: z.iso.datetime(),\n                timezone: z.string(),\n                recording_files: z.array(z.object({\n                    id: z.optional(z.string()),\n                    recording_start: z.optional(z.string()),\n                    recording_end: z.optional(z.string()),\n                    file_name: z.optional(z.string()),\n                    file_path: z.optional(z.string()),\n                    file_type: z.optional(z.enum([\n                        'MP4',\n                        'M4A',\n                        'CHAT',\n                        'TRANSCRIPT',\n                        'CSV',\n                        'CC',\n                        'TB',\n                        'CHAT_MESSAGE',\n                        'TIMELINE'\n                    ])),\n                    file_size: z.optional(z.number()),\n                    file_extension: z.optional(z.enum([\n                        'MP4',\n                        'M4A',\n                        'TXT',\n                        'VTT',\n                        'CSV',\n                        'JSON',\n                        'JPG'\n                    ])),\n                    download_url: z.optional(z.string()),\n                    status: z.optional(z.enum(['completed'])),\n                    recording_type: z.optional(z.enum([\n                        'shared_screen_with_speaker_view(CC)',\n                        'shared_screen_with_speaker_view',\n                        'shared_screen_with_gallery_view',\n                        'gallery_view',\n                        'shared_screen',\n                        'audio_only',\n                        'audio_transcript',\n                        'chat_file',\n                        'active_speaker',\n                        'host_video',\n                        'audio_only_each_participant',\n                        'cc_transcript',\n                        'closed_caption',\n                        'poll',\n                        'timeline',\n                        'thumbnail',\n                        'chat_message'\n                    ]))\n                }))\n            })\n        })\n    })),\n    path: z.optional(z.never()),\n    query: z.optional(z.never())\n});\n\nexport const zSessionRecordingDeletedWebhookRequest = z.object({\n    body: z.optional(z.object({\n        event: z.enum(['session.recording_deleted']),\n        event_ts: z.coerce.bigint().check(z.minimum(BigInt('-9223372036854775808'), { error: 'Invalid value: Expected int64 to be >= -9223372036854775808' }), z.maximum(BigInt('9223372036854775807'), { error: 'Invalid value: Expected int64 to be <= 9223372036854775807' })),\n        payload: z.object({\n            account_id: z.string(),\n            operator: z.email(),\n            operator_id: z.string(),\n            object: z.object({\n                session_id: z.string(),\n                session_name: z.string(),\n                session_key: z.string(),\n                start_time: z.iso.datetime(),\n                timezone: z.string()\n            })\n        })\n    })),\n    path: z.optional(z.never()),\n    query: z.optional(z.never())\n});\n\nexport const zSessionUserRoomSystemCalloutFailedWebhookRequest = z.object({\n    body: z.optional(z.object({\n        event: z.string(),\n        event_ts: z.coerce.bigint().check(z.minimum(BigInt('-9223372036854775808'), { error: 'Invalid value: Expected int64 to be >= -9223372036854775808' }), z.maximum(BigInt('9223372036854775807'), { error: 'Invalid value: Expected int64 to be <= 9223372036854775807' })),\n        payload: z.object({\n            account_id: z.string(),\n            object: z.object({\n                id: z.optional(z.coerce.bigint().check(z.minimum(BigInt('-9223372036854775808'), { error: 'Invalid value: Expected int64 to be >= -9223372036854775808' }), z.maximum(BigInt('9223372036854775807'), { error: 'Invalid value: Expected int64 to be <= 9223372036854775807' }))),\n                uuid: z.optional(z.string()),\n                session_id: z.string(),\n                session_name: z.string(),\n                host_id: z.string(),\n                message_id: z.string(),\n                inviter_name: z.string(),\n                reason_type: z.union([\n                    z.literal(0),\n                    z.literal(1),\n                    z.literal(2),\n                    z.literal(3),\n                    z.literal(4),\n                    z.literal(7),\n                    z.literal(8),\n                    z.literal(9),\n                    z.literal(10),\n                    z.literal(11),\n                    z.literal(12),\n                    z.literal(13),\n                    z.literal(14)\n                ]),\n                participant: z.object({\n                    call_type: z.string(),\n                    device_ip: z.string()\n                })\n            })\n        })\n    })),\n    path: z.optional(z.never()),\n    query: z.optional(z.never())\n});\n\nexport const zSessionRecordingCompletedWebhookRequest = z.object({\n    body: z.optional(z.object({\n        event: z.enum(['session.recording_completed']),\n        event_ts: z.coerce.bigint().check(z.minimum(BigInt('-9223372036854775808'), { error: 'Invalid value: Expected int64 to be >= -9223372036854775808' }), z.maximum(BigInt('9223372036854775807'), { error: 'Invalid value: Expected int64 to be <= 9223372036854775807' })),\n        download_token: z.string(),\n        payload: z.object({\n            account_id: z.string(),\n            object: z.object({\n                session_id: z.string(),\n                session_name: z.string(),\n                session_key: z.string(),\n                start_time: z.iso.datetime(),\n                timezone: z.string(),\n                recording_files: z.array(z.object({\n                    id: z.optional(z.string()),\n                    recording_start: z.optional(z.string()),\n                    recording_end: z.optional(z.string()),\n                    file_name: z.optional(z.string()),\n                    file_path: z.optional(z.string()),\n                    file_type: z.optional(z.enum([\n                        'MP4',\n                        'M4A',\n                        'CHAT',\n                        'TRANSCRIPT',\n                        'CSV',\n                        'CC',\n                        'TB',\n                        'CHAT_MESSAGE'\n                    ])),\n                    file_size: z.optional(z.number()),\n                    file_extension: z.optional(z.enum([\n                        'MP4',\n                        'M4A',\n                        'TXT',\n                        'VTT',\n                        'CSV',\n                        'JSON',\n                        'JPG'\n                    ])),\n                    download_url: z.optional(z.string()),\n                    status: z.optional(z.enum(['completed'])),\n                    recording_type: z.optional(z.enum([\n                        'shared_screen_with_speaker_view(CC)',\n                        'shared_screen_with_speaker_view',\n                        'shared_screen_with_gallery_view',\n                        'gallery_view',\n                        'shared_screen',\n                        'audio_only',\n                        'audio_transcript',\n                        'chat_file',\n                        'active_speaker',\n                        'host_video',\n                        'audio_only_each_participant',\n                        'cc_transcript',\n                        'closed_caption',\n                        'poll',\n                        'timeline',\n                        'thumbnail',\n                        'chat_message'\n                    ]))\n                })),\n                participant_audio_files: z.optional(z.array(z.object({\n                    id: z.optional(z.string()),\n                    recording_start: z.optional(z.string()),\n                    recording_end: z.optional(z.string()),\n                    file_name: z.optional(z.string()),\n                    file_path: z.optional(z.string()),\n                    file_type: z.optional(z.enum([\n                        'MP4',\n                        'M4A',\n                        'CHAT',\n                        'TRANSCRIPT',\n                        'CSV',\n                        'CC',\n                        'TB',\n                        'CHAT_MESSAGE'\n                    ])),\n                    file_size: z.optional(z.number()),\n                    file_extension: z.optional(z.enum([\n                        'MP4',\n                        'M4A',\n                        'TXT',\n                        'VTT',\n                        'CSV',\n                        'JSON',\n                        'JPG'\n                    ])),\n                    download_url: z.optional(z.string()),\n                    status: z.optional(z.enum(['completed'])),\n                    recording_type: z.optional(z.enum([\n                        'shared_screen_with_speaker_view(CC)',\n                        'shared_screen_with_speaker_view',\n                        'shared_screen_with_gallery_view',\n                        'gallery_view',\n                        'shared_screen',\n                        'audio_only',\n                        'audio_transcript',\n                        'chat_file',\n                        'active_speaker',\n                        'host_video',\n                        'audio_only_each_participant',\n                        'cc_transcript',\n                        'closed_caption',\n                        'poll',\n                        'timeline',\n                        'thumbnail',\n                        'chat_message'\n                    ])),\n                    user_id: z.optional(z.string()),\n                    user_key: z.optional(z.string())\n                }))),\n                participant_video_files: z.optional(z.array(z.object({\n                    id: z.optional(z.string()),\n                    recording_start: z.optional(z.string()),\n                    recording_end: z.optional(z.string()),\n                    file_name: z.optional(z.string()),\n                    file_path: z.optional(z.string()),\n                    file_type: z.optional(z.enum(['MP4'])),\n                    file_size: z.optional(z.number()),\n                    file_extension: z.optional(z.enum(['MP4'])),\n                    download_url: z.optional(z.string()),\n                    status: z.optional(z.enum(['completed'])),\n                    recording_type: z.optional(z.enum(['individual_user', 'individual_shared_screen'])),\n                    user_id: z.optional(z.string()),\n                    user_key: z.optional(z.string())\n                })))\n            })\n        })\n    })),\n    path: z.optional(z.never()),\n    query: z.optional(z.never())\n});\n\nexport const zSessionRecordingTranscriptFailedWebhookRequest = z.object({\n    body: z.optional(z.object({\n        event: z.enum(['session.recording_transcript_failed']),\n        event_ts: z.coerce.bigint().check(z.minimum(BigInt('-9223372036854775808'), { error: 'Invalid value: Expected int64 to be >= -9223372036854775808' }), z.maximum(BigInt('9223372036854775807'), { error: 'Invalid value: Expected int64 to be <= 9223372036854775807' })),\n        payload: z.object({\n            account_id: z.string(),\n            object: z.object({\n                session_id: z.string(),\n                session_name: z.string(),\n                session_key: z.string(),\n                start_time: z.iso.datetime(),\n                timezone: z.string()\n            })\n        })\n    })),\n    path: z.optional(z.never()),\n    query: z.optional(z.never())\n});\n\nexport const zSessionRecordingTrashedWebhookRequest = z.object({\n    body: z.optional(z.object({\n        event: z.enum(['session.recording_trashed']),\n        event_ts: z.coerce.bigint().check(z.minimum(BigInt('-9223372036854775808'), { error: 'Invalid value: Expected int64 to be >= -9223372036854775808' }), z.maximum(BigInt('9223372036854775807'), { error: 'Invalid value: Expected int64 to be <= 9223372036854775807' })),\n        payload: z.object({\n            account_id: z.string(),\n            operator: z.email(),\n            operator_id: z.string(),\n            object: z.object({\n                session_id: z.string(),\n                session_name: z.string(),\n                session_key: z.string(),\n                start_time: z.iso.datetime(),\n                timezone: z.string()\n            })\n        })\n    })),\n    path: z.optional(z.never()),\n    query: z.optional(z.never())\n});\n\nexport const zSessionUserJoinedWebhookRequest = z.object({\n    body: z.optional(z.object({\n        event: z.enum(['session.user_joined']),\n        event_ts: z.coerce.bigint().check(z.minimum(BigInt('-9223372036854775808'), { error: 'Invalid value: Expected int64 to be >= -9223372036854775808' }), z.maximum(BigInt('9223372036854775807'), { error: 'Invalid value: Expected int64 to be <= 9223372036854775807' })),\n        payload: z.object({\n            account_id: z.string(),\n            object: z.object({\n                id: z.string(),\n                session_id: z.string(),\n                session_name: z.string(),\n                session_key: z.optional(z.string()),\n                user: z.object({\n                    id: z.string(),\n                    name: z.string(),\n                    join_time: z.iso.datetime(),\n                    user_key: z.optional(z.string()),\n                    phone_number: z.optional(z.string()),\n                    participant_uuid: z.string()\n                })\n            })\n        })\n    })),\n    path: z.optional(z.never()),\n    query: z.optional(z.never())\n});\n\nexport const zSessionStreamIngestionStartedWebhookRequest = z.object({\n    body: z.optional(z.object({\n        event: z.enum(['session.stream_ingestion_started']),\n        event_ts: z.coerce.bigint().check(z.minimum(BigInt('-9223372036854775808'), { error: 'Invalid value: Expected int64 to be >= -9223372036854775808' }), z.maximum(BigInt('9223372036854775807'), { error: 'Invalid value: Expected int64 to be <= 9223372036854775807' })),\n        payload: z.object({\n            account_id: z.string(),\n            object: z.object({\n                session_id: z.string(),\n                session_name: z.string(),\n                session_key: z.optional(z.string()),\n                stream_ingestion: z.object({\n                    stream_id: z.string(),\n                    stream_name: z.string(),\n                    stream_description: z.optional(z.string()),\n                    stream_key: z.string(),\n                    stream_url: z.string(),\n                    backup_stream_url: z.string()\n                })\n            })\n        })\n    })),\n    path: z.optional(z.never()),\n    query: z.optional(z.never())\n});\n\nexport const zSessionStreamIngestionConnectedWebhookRequest = z.object({\n    body: z.optional(z.object({\n        event: z.enum(['session.stream_ingestion_connected']),\n        event_ts: z.coerce.bigint().check(z.minimum(BigInt('-9223372036854775808'), { error: 'Invalid value: Expected int64 to be >= -9223372036854775808' }), z.maximum(BigInt('9223372036854775807'), { error: 'Invalid value: Expected int64 to be <= 9223372036854775807' })),\n        payload: z.object({\n            account_id: z.string(),\n            object: z.object({\n                session_id: z.string(),\n                session_name: z.string(),\n                session_key: z.optional(z.string()),\n                stream_ingestion: z.object({\n                    stream_id: z.string(),\n                    stream_name: z.string(),\n                    stream_description: z.optional(z.string()),\n                    stream_key: z.string(),\n                    stream_url: z.string(),\n                    backup_stream_url: z.string()\n                })\n            })\n        })\n    })),\n    path: z.optional(z.never()),\n    query: z.optional(z.never())\n});\n\nexport const zSessionStreamIngestionDisconnectedWebhookRequest = z.object({\n    body: z.optional(z.object({\n        event: z.enum(['session.stream_ingestion_disconnected']),\n        event_ts: z.coerce.bigint().check(z.minimum(BigInt('-9223372036854775808'), { error: 'Invalid value: Expected int64 to be >= -9223372036854775808' }), z.maximum(BigInt('9223372036854775807'), { error: 'Invalid value: Expected int64 to be <= 9223372036854775807' })),\n        payload: z.object({\n            account_id: z.string(),\n            object: z.object({\n                session_id: z.string(),\n                session_name: z.string(),\n                session_key: z.optional(z.string()),\n                stream_ingestion: z.object({\n                    stream_id: z.string(),\n                    stream_name: z.string(),\n                    stream_description: z.optional(z.string()),\n                    stream_key: z.string(),\n                    stream_url: z.string(),\n                    backup_stream_url: z.string()\n                })\n            })\n        })\n    })),\n    path: z.optional(z.never()),\n    query: z.optional(z.never())\n});\n\nexport const zSessionRecordingRecoveredWebhookRequest = z.object({\n    body: z.optional(z.object({\n        event: z.enum(['session.recording_recovered']),\n        event_ts: z.coerce.bigint().check(z.minimum(BigInt('-9223372036854775808'), { error: 'Invalid value: Expected int64 to be >= -9223372036854775808' }), z.maximum(BigInt('9223372036854775807'), { error: 'Invalid value: Expected int64 to be <= 9223372036854775807' })),\n        payload: z.object({\n            account_id: z.string(),\n            operator: z.email(),\n            operator_id: z.string(),\n            object: z.object({\n                session_id: z.string(),\n                session_name: z.string(),\n                session_key: z.string(),\n                start_time: z.iso.datetime(),\n                timezone: z.string()\n            })\n        })\n    })),\n    path: z.optional(z.never()),\n    query: z.optional(z.never())\n});\n\nexport const zSessionUserPhoneCalloutMissedWebhookRequest = z.object({\n    body: z.optional(z.object({\n        event: z.string(),\n        event_ts: z.coerce.bigint().check(z.minimum(BigInt('-9223372036854775808'), { error: 'Invalid value: Expected int64 to be >= -9223372036854775808' }), z.maximum(BigInt('9223372036854775807'), { error: 'Invalid value: Expected int64 to be <= 9223372036854775807' })),\n        payload: z.object({\n            account_id: z.string(),\n            object: z.object({\n                id: z.optional(z.coerce.bigint().check(z.minimum(BigInt('-9223372036854775808'), { error: 'Invalid value: Expected int64 to be >= -9223372036854775808' }), z.maximum(BigInt('9223372036854775807'), { error: 'Invalid value: Expected int64 to be <= 9223372036854775807' }))),\n                uuid: z.optional(z.string()),\n                session_id: z.string(),\n                session_name: z.string(),\n                session_key: z.string(),\n                user_key: z.string(),\n                host_id: z.string(),\n                participant: z.object({\n                    invitee_name: z.string(),\n                    phone_number: z.coerce.bigint().check(z.minimum(BigInt('-9223372036854775808'), { error: 'Invalid value: Expected int64 to be >= -9223372036854775808' }), z.maximum(BigInt('9223372036854775807'), { error: 'Invalid value: Expected int64 to be <= 9223372036854775807' })),\n                    from_number: z.coerce.bigint().check(z.minimum(BigInt('-9223372036854775808'), { error: 'Invalid value: Expected int64 to be >= -9223372036854775808' }), z.maximum(BigInt('9223372036854775807'), { error: 'Invalid value: Expected int64 to be <= 9223372036854775807' }))\n                })\n            })\n        })\n    })),\n    path: z.optional(z.never()),\n    query: z.optional(z.never())\n});\n\nexport const zSessionUserPhoneCalloutRejectedWebhookRequest = z.object({\n    body: z.optional(z.object({\n        event: z.string(),\n        event_ts: z.coerce.bigint().check(z.minimum(BigInt('-9223372036854775808'), { error: 'Invalid value: Expected int64 to be >= -9223372036854775808' }), z.maximum(BigInt('9223372036854775807'), { error: 'Invalid value: Expected int64 to be <= 9223372036854775807' })),\n        payload: z.object({\n            account_id: z.string(),\n            object: z.object({\n                id: z.optional(z.coerce.bigint().check(z.minimum(BigInt('-9223372036854775808'), { error: 'Invalid value: Expected int64 to be >= -9223372036854775808' }), z.maximum(BigInt('9223372036854775807'), { error: 'Invalid value: Expected int64 to be <= 9223372036854775807' }))),\n                uuid: z.optional(z.string()),\n                session_id: z.string(),\n                session_name: z.string(),\n                session_key: z.string(),\n                user_key: z.string(),\n                host_id: z.string(),\n                participant: z.object({\n                    invitee_name: z.string(),\n                    phone_number: z.coerce.bigint().check(z.minimum(BigInt('-9223372036854775808'), { error: 'Invalid value: Expected int64 to be >= -9223372036854775808' }), z.maximum(BigInt('9223372036854775807'), { error: 'Invalid value: Expected int64 to be <= 9223372036854775807' })),\n                    from_number: z.coerce.bigint().check(z.minimum(BigInt('-9223372036854775808'), { error: 'Invalid value: Expected int64 to be >= -9223372036854775808' }), z.maximum(BigInt('9223372036854775807'), { error: 'Invalid value: Expected int64 to be <= 9223372036854775807' }))\n                })\n            })\n        })\n    })),\n    path: z.optional(z.never()),\n    query: z.optional(z.never())\n});\n\nexport const zSessionUserRoomSystemCalloutAcceptedWebhookRequest = z.object({\n    body: z.optional(z.object({\n        event: z.string(),\n        event_ts: z.coerce.bigint().check(z.minimum(BigInt('-9223372036854775808'), { error: 'Invalid value: Expected int64 to be >= -9223372036854775808' }), z.maximum(BigInt('9223372036854775807'), { error: 'Invalid value: Expected int64 to be <= 9223372036854775807' })),\n        payload: z.object({\n            account_id: z.string(),\n            object: z.object({\n                id: z.optional(z.coerce.bigint().check(z.minimum(BigInt('-9223372036854775808'), { error: 'Invalid value: Expected int64 to be >= -9223372036854775808' }), z.maximum(BigInt('9223372036854775807'), { error: 'Invalid value: Expected int64 to be <= 9223372036854775807' }))),\n                uuid: z.optional(z.string()),\n                session_id: z.string(),\n                session_name: z.string(),\n                host_id: z.string(),\n                message_id: z.string(),\n                inviter_name: z.string(),\n                participant: z.object({\n                    call_type: z.string(),\n                    device_ip: z.string()\n                })\n            })\n        })\n    })),\n    path: z.optional(z.never()),\n    query: z.optional(z.never())\n});\n\nexport const zSessionRecordingStoppedWebhookRequest = z.object({\n    body: z.optional(z.object({\n        event: z.enum(['session.recording_stopped']),\n        event_ts: z.coerce.bigint().check(z.minimum(BigInt('-9223372036854775808'), { error: 'Invalid value: Expected int64 to be >= -9223372036854775808' }), z.maximum(BigInt('9223372036854775807'), { error: 'Invalid value: Expected int64 to be <= 9223372036854775807' })),\n        payload: z.object({\n            account_id: z.string(),\n            object: z.object({\n                session_id: z.string(),\n                session_name: z.string(),\n                session_key: z.string(),\n                start_time: z.iso.datetime(),\n                timezone: z.string(),\n                recording_file: z.object({\n                    recording_start: z.optional(z.string()),\n                    recording_end: z.optional(z.string())\n                })\n            })\n        })\n    })),\n    path: z.optional(z.never()),\n    query: z.optional(z.never())\n});\n"
  },
  {
    "path": "packages/openapi-ts-tests/zod/v4/__snapshots__/3.1.x/v3/array-items-all-of/zod.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport { z } from 'zod/v3';\n\nexport const zArrayWithAllOfObjects = z.array(z.object({\n    id: z.number().int().optional()\n}).and(z.object({\n    name: z.string().optional()\n})));\n\nexport const zArrayWithAllOfPrimitives = z.array(z.intersection(z.number(), z.string()));\n\nexport const zBaseModel = z.object({\n    id: z.number().int().optional(),\n    createdAt: z.string().datetime().optional()\n});\n\nexport const zArrayWithAllOfRefs = z.array(zBaseModel.and(z.object({\n    extra: z.string().optional()\n})));\n"
  },
  {
    "path": "packages/openapi-ts-tests/zod/v4/__snapshots__/3.1.x/v3/array-items-one-of-length-1/zod.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport { z } from 'zod/v3';\n\nexport const zBar = z.string();\n\nexport const zFoo = z.object({\n    foo: z.array(zBar).min(1).max(2147483647).optional()\n});\n"
  },
  {
    "path": "packages/openapi-ts-tests/zod/v4/__snapshots__/3.1.x/v3/default/zod.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport { z } from 'zod/v3';\n\n/**\n * Model with number-only name\n */\nexport const z400 = z.string();\n\n/**\n * Testing multiline comments in string: First line\n * Second line\n *\n * Fourth line\n */\nexport const zCamelCaseCommentWithBreaks = z.number().int();\n\n/**\n * Testing multiline comments in string: First line\n * Second line\n *\n * Fourth line\n */\nexport const zCommentWithBreaks = z.number().int();\n\n/**\n * Testing backticks in string: `backticks` and ```multiple backticks``` should work\n */\nexport const zCommentWithBackticks = z.number().int();\n\n/**\n * Testing backticks and quotes in string: `backticks`, 'quotes', \"double quotes\" and ```multiple backticks``` should work\n */\nexport const zCommentWithBackticksAndQuotes = z.number().int();\n\n/**\n * Testing slashes in string: \\backwards\\\\\\ and /forwards/// should work\n */\nexport const zCommentWithSlashes = z.number().int();\n\n/**\n * Testing expression placeholders in string: ${expression} should work\n */\nexport const zCommentWithExpressionPlaceholders = z.number().int();\n\n/**\n * Testing quotes in string: 'single quote''' and \"double quotes\"\"\" should work\n */\nexport const zCommentWithQuotes = z.number().int();\n\n/**\n * Testing reserved characters in string: * inline * and ** inline ** should work\n */\nexport const zCommentWithReservedCharacters = z.number().int();\n\n/**\n * This is a simple number\n */\nexport const zSimpleInteger = z.number().int();\n\n/**\n * This is a simple boolean\n */\nexport const zSimpleBoolean = z.boolean();\n\n/**\n * This is a simple string\n */\nexport const zSimpleString = z.string();\n\n/**\n * A string with non-ascii (unicode) characters valid in typescript identifiers (æøåÆØÅöÔèÈ字符串)\n */\nexport const zNonAsciiStringæøåÆøÅöôêÊ字符串 = z.string();\n\n/**\n * This is a simple file\n */\nexport const zSimpleFile = z.string();\n\n/**\n * This is a simple string\n */\nexport const zSimpleStringWithPattern = z.string().max(64).regex(/^[a-zA-Z0-9_]*$/).nullable();\n\n/**\n * This is a simple enum with strings\n */\nexport const zEnumWithStrings = z.enum([\n    'Success',\n    'Warning',\n    'Error',\n    '\\'Single Quote\\'',\n    '\"Double Quotes\"',\n    'Non-ascii: øæåôöØÆÅÔÖ字符串'\n]);\n\nexport const zEnumWithReplacedCharacters = z.union([\n    z.literal('\\'Single Quote\\''),\n    z.literal('\"Double Quotes\"'),\n    z.literal('øæåôöØÆÅÔÖ字符串'),\n    z.literal(3.1),\n    z.literal('')\n]);\n\n/**\n * This is a simple enum with numbers\n */\nexport const zEnumWithNumbers = z.union([\n    z.literal(1),\n    z.literal(2),\n    z.literal(3),\n    z.literal(1.1),\n    z.literal(1.2),\n    z.literal(1.3),\n    z.literal(100),\n    z.literal(200),\n    z.literal(300),\n    z.literal(-100),\n    z.literal(-200),\n    z.literal(-300),\n    z.literal(-1.1),\n    z.literal(-1.2),\n    z.literal(-1.3)\n]);\n\n/**\n * Success=1,Warning=2,Error=3\n */\nexport const zEnumFromDescription = z.number();\n\n/**\n * This is a simple enum with numbers\n */\nexport const zEnumWithExtensions = z.union([\n    z.literal(200),\n    z.literal(400),\n    z.literal(500)\n]);\n\nexport const zEnumWithXEnumNames = z.union([\n    z.literal(0),\n    z.literal(1),\n    z.literal(2)\n]);\n\n/**\n * This is a simple array with numbers\n */\nexport const zArrayWithNumbers = z.array(z.number().int());\n\n/**\n * This is a simple array with booleans\n */\nexport const zArrayWithBooleans = z.array(z.boolean());\n\n/**\n * This is a simple array with strings\n */\nexport const zArrayWithStrings = z.array(z.string()).default(['test']);\n\n/**\n * This is a simple array with properties\n */\nexport const zArrayWithProperties = z.array(z.object({\n    '16x16': zCamelCaseCommentWithBreaks.optional(),\n    bar: z.string().optional()\n}));\n\n/**\n * This is a simple array with any of properties\n */\nexport const zArrayWithAnyOfProperties = z.array(z.union([z.object({\n        foo: z.string().optional().default('test')\n    }), z.object({\n        bar: z.string().optional()\n    })]));\n\nexport const zAnyOfAnyAndNull = z.object({\n    data: z.unknown().nullish()\n});\n\n/**\n * This is a simple array with any of properties\n */\nexport const zAnyOfArrays = z.object({\n    results: z.array(z.union([z.object({\n            foo: z.string().optional()\n        }), z.object({\n            bar: z.string().optional()\n        })])).optional()\n});\n\n/**\n * This is a string dictionary\n */\nexport const zDictionaryWithString = z.record(z.string());\n\nexport const zDictionaryWithPropertiesAndAdditionalProperties = z.object({\n    foo: z.number().optional(),\n    bar: z.boolean().optional()\n});\n\n/**\n * This is a string dictionary\n */\nexport const zDictionaryWithDictionary = z.record(z.record(z.string()));\n\n/**\n * This is a complex dictionary\n */\nexport const zDictionaryWithProperties = z.record(z.object({\n    foo: z.string().optional(),\n    bar: z.string().optional()\n}));\n\n/**\n * This is a model with one number property\n */\nexport const zModelWithInteger = z.object({\n    prop: z.number().int().optional()\n});\n\n/**\n * This is a model with one boolean property\n */\nexport const zModelWithBoolean = z.object({\n    prop: z.boolean().optional()\n});\n\n/**\n * This is a model with one string property\n */\nexport const zModelWithString = z.object({\n    prop: z.string().optional()\n});\n\n/**\n * This is a simple reference\n */\nexport const zSimpleReference = zModelWithString;\n\n/**\n * This is a simple array with references\n */\nexport const zArrayWithReferences = z.array(zModelWithString);\n\n/**\n * This is a simple array containing an array\n */\nexport const zArrayWithArray = z.array(z.array(zModelWithString));\n\n/**\n * This is a string reference\n */\nexport const zDictionaryWithReference = z.record(zModelWithString);\n\n/**\n * This is a complex dictionary\n */\nexport const zDictionaryWithArray = z.record(z.array(zModelWithString));\n\n/**\n * This is a model with one string property\n */\nexport const zModelWithStringError = z.object({\n    prop: z.string().optional()\n});\n\n/**\n * `Comment` or `VoiceComment`. The JSON object for adding voice comments to tickets is different. See [Adding voice comments to tickets](/documentation/ticketing/managing-tickets/adding-voice-comments-to-tickets)\n */\nexport const zModelFromZendesk = z.string();\n\n/**\n * This is a model with one string property\n */\nexport const zModelWithNullableString = z.object({\n    nullableProp1: z.string().nullish(),\n    nullableRequiredProp1: z.string().nullable(),\n    nullableProp2: z.string().nullish(),\n    nullableRequiredProp2: z.string().nullable(),\n    'foo_bar-enum': z.enum([\n        'Success',\n        'Warning',\n        'Error',\n        'ØÆÅ字符串'\n    ]).optional()\n});\n\n/**\n * This is a model with one enum\n */\nexport const zModelWithEnum = z.object({\n    'foo_bar-enum': z.enum([\n        'Success',\n        'Warning',\n        'Error',\n        'ØÆÅ字符串'\n    ]).optional(),\n    statusCode: z.enum([\n        '100',\n        '200 FOO',\n        '300 FOO_BAR',\n        '400 foo-bar',\n        '500 foo.bar',\n        '600 foo&bar'\n    ]).optional(),\n    bool: z.literal(true).optional()\n});\n\n/**\n * This is a model with one enum with escaped name\n */\nexport const zModelWithEnumWithHyphen = z.object({\n    'foo-bar-baz-qux': z.enum(['3.0']).optional()\n});\n\n/**\n * This is a model with one enum\n */\nexport const zModelWithEnumFromDescription = z.object({\n    test: z.number().int().optional()\n});\n\n/**\n * This is a model with nested enums\n */\nexport const zModelWithNestedEnums = z.object({\n    dictionaryWithEnum: z.record(z.enum([\n        'Success',\n        'Warning',\n        'Error'\n    ])).optional(),\n    dictionaryWithEnumFromDescription: z.record(z.number().int()).optional(),\n    arrayWithEnum: z.array(z.enum([\n        'Success',\n        'Warning',\n        'Error'\n    ])).optional(),\n    arrayWithDescription: z.array(z.number().int()).optional(),\n    'foo_bar-enum': z.enum([\n        'Success',\n        'Warning',\n        'Error',\n        'ØÆÅ字符串'\n    ]).optional()\n});\n\n/**\n * This is a model with one property containing an array\n */\nexport const zModelWithArray = z.object({\n    prop: z.array(zModelWithString).optional(),\n    propWithFile: z.array(z.string()).optional(),\n    propWithNumber: z.array(z.number()).optional()\n});\n\n/**\n * This is a model with one property containing a dictionary\n */\nexport const zModelWithDictionary = z.object({\n    prop: z.record(z.string()).optional()\n});\n\n/**\n * This is a deprecated model with a deprecated property\n *\n * @deprecated\n */\nexport const zDeprecatedModel = z.object({\n    prop: z.string().optional()\n});\n\n/**\n * This is a model with one property containing a circular reference\n */\nexport const zModelWithCircularReference: z.AnyZodObject = z.object({\n    prop: z.lazy(() => zModelWithCircularReference).optional()\n});\n\n/**\n * This is a model with one property with a 'one of' relationship\n */\nexport const zCompositionWithOneOf = z.object({\n    propA: z.union([\n        zModelWithString,\n        zModelWithEnum,\n        zModelWithArray,\n        zModelWithDictionary\n    ]).optional()\n});\n\n/**\n * This is a model with one property with a 'one of' relationship where the options are not $ref\n */\nexport const zCompositionWithOneOfAnonymous = z.object({\n    propA: z.union([\n        z.object({\n            propA: z.string().optional()\n        }),\n        z.string(),\n        z.number().int()\n    ]).optional()\n});\n\n/**\n * Circle\n */\nexport const zModelCircle = z.object({\n    kind: z.string(),\n    radius: z.number().optional()\n});\n\n/**\n * Square\n */\nexport const zModelSquare = z.object({\n    kind: z.string(),\n    sideLength: z.number().optional()\n});\n\n/**\n * This is a model with one property with a 'one of' relationship where the options are not $ref\n */\nexport const zCompositionWithOneOfDiscriminator = z.union([\n    z.object({\n        kind: z.literal('circle')\n    }).and(zModelCircle),\n    z.object({\n        kind: z.literal('square')\n    }).and(zModelSquare)\n]);\n\n/**\n * This is a model with one property with a 'any of' relationship\n */\nexport const zCompositionWithAnyOf = z.object({\n    propA: z.union([\n        zModelWithString,\n        zModelWithEnum,\n        zModelWithArray,\n        zModelWithDictionary\n    ]).optional()\n});\n\n/**\n * This is a model with one property with a 'any of' relationship where the options are not $ref\n */\nexport const zCompositionWithAnyOfAnonymous = z.object({\n    propA: z.union([\n        z.object({\n            propA: z.string().optional()\n        }),\n        z.string(),\n        z.number().int()\n    ]).optional()\n});\n\n/**\n * This is a model with nested 'any of' property with a type null\n */\nexport const zCompositionWithNestedAnyAndTypeNull = z.object({\n    propA: z.union([\n        z.array(z.union([zModelWithDictionary, z.null()])),\n        z.array(z.union([zModelWithArray, z.null()]))\n    ]).optional()\n});\n\nexport const z3eNum1Период = z.enum(['Bird', 'Dog']);\n\nexport const zConstValue = z.literal('ConstValue');\n\n/**\n * This is a model with one property with a 'any of' relationship where the options are not $ref\n */\nexport const zCompositionWithNestedAnyOfAndNull = z.object({\n    propA: z.array(z.union([z3eNum1Период, zConstValue])).nullish()\n});\n\n/**\n * This is a model with one property with a 'one of' relationship\n */\nexport const zCompositionWithOneOfAndNullable = z.object({\n    propA: z.union([\n        z.object({\n            boolean: z.boolean().optional()\n        }),\n        zModelWithEnum,\n        zModelWithArray,\n        zModelWithDictionary\n    ]).nullish()\n});\n\n/**\n * This is a model that contains a simple dictionary within composition\n */\nexport const zCompositionWithOneOfAndSimpleDictionary = z.object({\n    propA: z.union([\n        z.boolean(),\n        z.record(z.number())\n    ]).optional()\n});\n\n/**\n * This is a model that contains a dictionary of simple arrays within composition\n */\nexport const zCompositionWithOneOfAndSimpleArrayDictionary = z.object({\n    propA: z.union([\n        z.boolean(),\n        z.record(z.array(z.boolean()))\n    ]).optional()\n});\n\n/**\n * This is a model that contains a dictionary of complex arrays (composited) within composition\n */\nexport const zCompositionWithOneOfAndComplexArrayDictionary = z.object({\n    propA: z.union([\n        z.boolean(),\n        z.record(z.array(z.union([z.number(), z.string()])))\n    ]).optional()\n});\n\n/**\n * This is a model with one property with a 'all of' relationship\n */\nexport const zCompositionWithAllOfAndNullable = z.object({\n    propA: z.object({\n        boolean: z.boolean().optional()\n    }).and(zModelWithEnum).and(zModelWithArray).and(zModelWithDictionary).nullish()\n});\n\n/**\n * This is a model with one property with a 'any of' relationship\n */\nexport const zCompositionWithAnyOfAndNullable = z.object({\n    propA: z.union([\n        z.object({\n            boolean: z.boolean().optional()\n        }),\n        zModelWithEnum,\n        zModelWithArray,\n        zModelWithDictionary\n    ]).nullish()\n});\n\n/**\n * This is a base model with two simple optional properties\n */\nexport const zCompositionBaseModel = z.object({\n    firstName: z.string().optional(),\n    lastname: z.string().optional()\n});\n\n/**\n * This is a model that extends the base model\n */\nexport const zCompositionExtendedModel = zCompositionBaseModel.and(z.object({\n    age: z.number(),\n    firstName: z.string(),\n    lastname: z.string()\n}));\n\n/**\n * This is a model with one nested property\n */\nexport const zModelWithProperties = z.object({\n    required: z.string(),\n    requiredAndReadOnly: z.string().readonly(),\n    requiredAndNullable: z.string().nullable(),\n    string: z.string().optional(),\n    number: z.number().optional(),\n    boolean: z.boolean().optional(),\n    reference: zModelWithString.optional(),\n    'property with space': z.string().optional(),\n    default: z.string().optional(),\n    try: z.string().optional(),\n    '@namespace.string': z.string().readonly().optional(),\n    '@namespace.integer': z.number().int().readonly().optional()\n});\n\n/**\n * This is a model with one property containing a reference\n */\nexport const zModelWithReference = z.object({\n    prop: zModelWithProperties.optional()\n});\n\n/**\n * This is a model with one nested property\n */\nexport const zModelWithNestedProperties = z.object({\n    first: z.object({\n        second: z.object({\n            third: z.string().readonly().nullable()\n        }).readonly().nullable()\n    }).readonly().nullable()\n});\n\n/**\n * This is a model with duplicated properties\n */\nexport const zModelWithDuplicateProperties = z.object({\n    prop: zModelWithString.optional()\n});\n\n/**\n * This is a model with ordered properties\n */\nexport const zModelWithOrderedProperties = z.object({\n    zebra: z.string().optional(),\n    apple: z.string().optional(),\n    hawaii: z.string().optional()\n});\n\n/**\n * This is a model with duplicated imports\n */\nexport const zModelWithDuplicateImports = z.object({\n    propA: zModelWithString.optional(),\n    propB: zModelWithString.optional(),\n    propC: zModelWithString.optional()\n});\n\n/**\n * This is a model that extends another model\n */\nexport const zModelThatExtends = zModelWithString.and(z.object({\n    propExtendsA: z.string().optional(),\n    propExtendsB: zModelWithString.optional()\n}));\n\n/**\n * This is a model that extends another model\n */\nexport const zModelThatExtendsExtends = zModelWithString.and(zModelThatExtends).and(z.object({\n    propExtendsC: z.string().optional(),\n    propExtendsD: zModelWithString.optional()\n}));\n\n/**\n * This is a model that contains a some patterns\n */\nexport const zModelWithPattern = z.object({\n    key: z.string().max(64).regex(/^[a-zA-Z0-9_]*$/),\n    name: z.string().max(255),\n    enabled: z.boolean().readonly().optional(),\n    modified: z.string().datetime().readonly().optional(),\n    id: z.string().regex(/^\\d{2}-\\d{3}-\\d{4}$/).optional(),\n    text: z.string().regex(/^\\w+$/).optional(),\n    patternWithSingleQuotes: z.string().regex(/^[a-zA-Z0-9']*$/).optional(),\n    patternWithNewline: z.string().regex(/aaa\\nbbb/).optional(),\n    patternWithBacktick: z.string().regex(/aaa`bbb/).optional(),\n    patternWithUnicode: z.string().regex(/^\\p{L}+$/u).optional()\n});\n\nexport const zFile = z.object({\n    id: z.string().min(1).readonly().optional(),\n    updated_at: z.string().datetime().readonly().optional(),\n    created_at: z.string().datetime().readonly().optional(),\n    mime: z.string().min(1).max(24),\n    file: z.string().url().readonly().optional()\n});\n\nexport const zDefault = z.object({\n    name: z.string().optional()\n});\n\nexport const zPageable = z.object({\n    page: z.number().int().gte(0).max(2147483647, { message: 'Invalid value: Expected int32 to be <= 2147483647' }).optional().default(0),\n    size: z.number().int().gte(1).max(2147483647, { message: 'Invalid value: Expected int32 to be <= 2147483647' }).optional(),\n    sort: z.array(z.string()).optional()\n});\n\n/**\n * This is a free-form object without additionalProperties.\n */\nexport const zFreeFormObjectWithoutAdditionalProperties = z.record(z.unknown());\n\n/**\n * This is a free-form object with additionalProperties: true.\n */\nexport const zFreeFormObjectWithAdditionalPropertiesEqTrue = z.record(z.unknown());\n\n/**\n * This is a free-form object with additionalProperties: {}.\n */\nexport const zFreeFormObjectWithAdditionalPropertiesEqEmptyObject = z.record(z.unknown());\n\nexport const zModelWithConst = z.object({\n    String: z.literal('String').optional(),\n    number: z.literal(0).optional(),\n    null: z.null().optional(),\n    withType: z.literal('Some string').optional()\n});\n\n/**\n * This is a model with one property and additionalProperties: true\n */\nexport const zModelWithAdditionalPropertiesEqTrue = z.object({\n    prop: z.string().optional()\n});\n\nexport const zNestedAnyOfArraysNullable = z.object({\n    nullableArray: z.array(z.union([z.string(), z.boolean()])).nullish()\n});\n\n/**\n * An object that can be null\n */\nexport const zNullableObject = z.object({\n    foo: z.string().optional()\n}).nullable().default(null);\n\n/**\n * Some % character\n */\nexport const zCharactersInDescription = z.string();\n\nexport const zModelWithNullableObject = z.object({\n    data: zNullableObject.optional()\n});\n\n/**\n * An object with additional properties that can be null (anyOf ref + null)\n */\nexport const zModelWithAdditionalPropertiesRef = z.record(zNullableObject.nullable());\n\nexport const zModelWithOneOfEnum = z.union([\n    z.object({\n        foo: z.enum(['Bar'])\n    }),\n    z.object({\n        foo: z.enum(['Baz'])\n    }),\n    z.object({\n        foo: z.enum(['Qux'])\n    }),\n    z.object({\n        content: z.string().datetime(),\n        foo: z.enum(['Quux'])\n    }),\n    z.object({\n        content: z.tuple([z.string().datetime(), z.string()]),\n        foo: z.enum(['Corge'])\n    })\n]);\n\nexport const zModelWithNestedArrayEnumsDataFoo = z.enum(['foo', 'bar']);\n\nexport const zModelWithNestedArrayEnumsDataBar = z.enum(['baz', 'qux']);\n\nexport const zModelWithNestedArrayEnumsData = z.object({\n    foo: z.array(zModelWithNestedArrayEnumsDataFoo).optional(),\n    bar: z.array(zModelWithNestedArrayEnumsDataBar).optional()\n});\n\nexport const zModelWithNestedArrayEnums = z.object({\n    array_strings: z.array(z.string()).optional(),\n    data: zModelWithNestedArrayEnumsData.optional()\n});\n\nexport const zModelWithNestedCompositionEnums = z.object({\n    foo: zModelWithNestedArrayEnumsDataFoo.optional()\n});\n\nexport const zModelWithReadOnlyAndWriteOnly = z.object({\n    foo: z.string(),\n    bar: z.string().readonly()\n});\n\n/**\n * This is a model with one property containing an array\n */\nexport const zModelWithArrayReadOnlyAndWriteOnly = z.object({\n    prop: z.array(zModelWithReadOnlyAndWriteOnly).optional(),\n    propWithFile: z.array(z.string()).optional(),\n    propWithNumber: z.array(z.number()).optional()\n});\n\nexport const zModelWithConstantSizeArray = z.tuple([z.number(), z.number()]);\n\nexport const zModelWithAnyOfConstantSizeArray = z.tuple([\n    z.union([\n        z.number(),\n        z.string()\n    ]),\n    z.union([\n        z.number(),\n        z.string()\n    ]),\n    z.union([\n        z.number(),\n        z.string()\n    ])\n]);\n\nexport const zModelWithPrefixItemsConstantSizeArray = z.tuple([\n    zModelWithInteger,\n    z.union([\n        z.number(),\n        z.string()\n    ]),\n    z.string()\n]);\n\nexport const zModelWithAnyOfConstantSizeArrayNullable = z.tuple([\n    z.union([\n        z.number(),\n        z.string()\n    ]).nullable(),\n    z.union([\n        z.number(),\n        z.string()\n    ]).nullable(),\n    z.union([\n        z.number(),\n        z.string()\n    ]).nullable()\n]);\n\nexport const zModelWithAnyOfConstantSizeArrayAndIntersect = z.tuple([z.intersection(z.number(), z.string()), z.intersection(z.number(), z.string())]);\n\nexport const zModelWithNumericEnumUnion = z.object({\n    value: z.union([\n        z.literal(-10),\n        z.literal(-1),\n        z.literal(0),\n        z.literal(1),\n        z.literal(3),\n        z.literal(6),\n        z.literal(12)\n    ]).optional()\n});\n\n/**\n * Some description with `back ticks`\n */\nexport const zModelWithBackticksInDescription = z.object({\n    template: z.string().optional()\n});\n\n/**\n * Model used to test deduplication strategy (unused)\n */\nexport const zParameterSimpleParameterUnused = z.string();\n\n/**\n * Model used to test deduplication strategy\n */\nexport const zPostServiceWithEmptyTagResponse = z.string();\n\n/**\n * Model used to test deduplication strategy\n */\nexport const zPostServiceWithEmptyTagResponse2 = z.string();\n\n/**\n * Model used to test deduplication strategy\n */\nexport const zDeleteFooData = z.string();\n\n/**\n * Model used to test deduplication strategy\n */\nexport const zDeleteFooData2 = z.string();\n\n/**\n * Model with restricted keyword name\n */\nexport const zImport = z.string();\n\nexport const zModelWithAnyOfConstantSizeArrayWithNSizeAndOptions = z.tuple([z.union([\n        z.number(),\n        zImport\n    ]), z.union([\n        z.number(),\n        zImport\n    ])]);\n\nexport const zSchemaWithFormRestrictedKeys = z.object({\n    description: z.string().optional(),\n    'x-enum-descriptions': z.string().optional(),\n    'x-enum-varnames': z.string().optional(),\n    'x-enumNames': z.string().optional(),\n    title: z.string().optional(),\n    object: z.object({\n        description: z.string().optional(),\n        'x-enum-descriptions': z.string().optional(),\n        'x-enum-varnames': z.string().optional(),\n        'x-enumNames': z.string().optional(),\n        title: z.string().optional()\n    }).optional(),\n    array: z.array(z.object({\n        description: z.string().optional(),\n        'x-enum-descriptions': z.string().optional(),\n        'x-enum-varnames': z.string().optional(),\n        'x-enumNames': z.string().optional(),\n        title: z.string().optional()\n    })).optional()\n});\n\n/**\n * This schema was giving PascalCase transformations a hard time\n */\nexport const zIoK8sApimachineryPkgApisMetaV1Preconditions = z.object({\n    resourceVersion: z.string().optional(),\n    uid: z.string().optional()\n});\n\n/**\n * This schema was giving PascalCase transformations a hard time\n */\nexport const zIoK8sApimachineryPkgApisMetaV1DeleteOptions = z.object({\n    preconditions: zIoK8sApimachineryPkgApisMetaV1Preconditions.optional()\n});\n\nexport const zAdditionalPropertiesUnknownIssue = z.record(z.union([\n    z.string(),\n    z.number()\n]));\n\nexport const zAdditionalPropertiesUnknownIssue2 = z.record(z.union([\n    z.string(),\n    z.number()\n]));\n\nexport const zAdditionalPropertiesUnknownIssue3 = z.intersection(z.string(), z.object({\n    entries: z.record(zAdditionalPropertiesUnknownIssue)\n}));\n\nexport const zAdditionalPropertiesIntegerIssue = z.object({\n    value: z.number().int()\n});\n\nexport const zGenericSchemaDuplicateIssue1SystemBoolean = z.object({\n    item: z.boolean().optional(),\n    error: z.string().nullish(),\n    hasError: z.boolean().readonly().optional(),\n    data: z.record(z.never()).optional()\n});\n\nexport const zGenericSchemaDuplicateIssue1SystemString = z.object({\n    item: z.string().nullish(),\n    error: z.string().nullish(),\n    hasError: z.boolean().readonly().optional()\n});\n\nexport const zOneOfAllOfIssue = z.union([\n    z.intersection(z.union([\n        zConstValue,\n        zGenericSchemaDuplicateIssue1SystemBoolean\n    ]), z3eNum1Период),\n    zGenericSchemaDuplicateIssue1SystemString\n]);\n\nexport const zExternalSharedModel = z.object({\n    id: z.string(),\n    name: z.string().optional()\n});\n\n/**\n * External ref to shared model (A)\n */\nexport const zExternalRefA = zExternalSharedModel;\n\n/**\n * External ref to shared model (B)\n */\nexport const zExternalRefB = zExternalSharedModel;\n\n/**\n * This is a model with one nested property\n */\nexport const zModelWithPropertiesWritable = z.object({\n    required: z.string(),\n    requiredAndNullable: z.string().nullable(),\n    string: z.string().optional(),\n    number: z.number().optional(),\n    boolean: z.boolean().optional(),\n    reference: zModelWithString.optional(),\n    'property with space': z.string().optional(),\n    default: z.string().optional(),\n    try: z.string().optional()\n});\n\n/**\n * This is a model with one property containing a reference\n */\nexport const zModelWithReferenceWritable = z.object({\n    prop: zModelWithPropertiesWritable.optional()\n});\n\n/**\n * This is a model that contains a some patterns\n */\nexport const zModelWithPatternWritable = z.object({\n    key: z.string().max(64).regex(/^[a-zA-Z0-9_]*$/),\n    name: z.string().max(255),\n    id: z.string().regex(/^\\d{2}-\\d{3}-\\d{4}$/).optional(),\n    text: z.string().regex(/^\\w+$/).optional(),\n    patternWithSingleQuotes: z.string().regex(/^[a-zA-Z0-9']*$/).optional(),\n    patternWithNewline: z.string().regex(/aaa\\nbbb/).optional(),\n    patternWithBacktick: z.string().regex(/aaa`bbb/).optional(),\n    patternWithUnicode: z.string().regex(/^\\p{L}+$/u).optional()\n});\n\nexport const zFileWritable = z.object({\n    mime: z.string().min(1).max(24)\n});\n\nexport const zModelWithReadOnlyAndWriteOnlyWritable = z.object({\n    foo: z.string(),\n    baz: z.string()\n});\n\n/**\n * This is a model with one property containing an array\n */\nexport const zModelWithArrayReadOnlyAndWriteOnlyWritable = z.object({\n    prop: z.array(zModelWithReadOnlyAndWriteOnlyWritable).optional(),\n    propWithFile: z.array(z.string()).optional(),\n    propWithNumber: z.array(z.number()).optional()\n});\n\nexport const zModelWithAnyOfConstantSizeArrayWithNSizeAndOptionsWritable = z.tuple([z.union([\n        z.number(),\n        zImport\n    ]), z.union([\n        z.number(),\n        zImport\n    ])]);\n\nexport const zAdditionalPropertiesUnknownIssueWritable = z.record(z.union([\n    z.string(),\n    z.number()\n]));\n\nexport const zOneOfAllOfIssueWritable = z.union([\n    z.intersection(z.union([\n        zConstValue,\n        zGenericSchemaDuplicateIssue1SystemBoolean\n    ]), z3eNum1Период),\n    zGenericSchemaDuplicateIssue1SystemString\n]);\n\nexport const zGenericSchemaDuplicateIssue1SystemBooleanWritable = z.object({\n    item: z.boolean().optional(),\n    error: z.string().nullish(),\n    data: z.record(z.never()).optional()\n});\n\nexport const zGenericSchemaDuplicateIssue1SystemStringWritable = z.object({\n    item: z.string().nullish(),\n    error: z.string().nullish()\n});\n\n/**\n * This is a reusable parameter\n */\nexport const zSimpleParameter = z.string();\n\nexport const zCompositionWithOneOfAndProperties = z.intersection(z.union([\n    z.object({\n        foo: zSimpleParameter\n    }),\n    z.object({\n        bar: zNonAsciiStringæøåÆøÅöôêÊ字符串\n    })\n]), z.object({\n    baz: z.number().int().gte(0).max(65535, { message: 'Invalid value: Expected uint16 to be <= 65535' }).nullable(),\n    qux: z.number().int().gte(0).max(255, { message: 'Invalid value: Expected uint8 to be <= 255' })\n}));\n\nexport const zModelWithOneOfAndProperties = z.intersection(z.union([\n    zSimpleParameter,\n    zNonAsciiStringæøåÆøÅöôêÊ字符串\n]), z.object({\n    baz: z.number().int().gte(0).max(65535, { message: 'Invalid value: Expected uint16 to be <= 65535' }).nullable(),\n    qux: z.number().int().gte(0).max(255, { message: 'Invalid value: Expected uint8 to be <= 255' })\n}));\n\n/**\n * Parameter with illegal characters\n */\nexport const zXFooBar = zModelWithString;\n\n/**\n * A reusable request body\n */\nexport const zSimpleRequestBody = zModelWithString;\n\n/**\n * A reusable request body\n */\nexport const zSimpleFormData = zModelWithString;\n\nexport const zExportData = z.object({\n    body: z.never().optional(),\n    path: z.never().optional(),\n    query: z.never().optional()\n});\n\nexport const zPatchApiVbyApiVersionNoTagData = z.object({\n    body: z.never().optional(),\n    path: z.never().optional(),\n    query: z.never().optional()\n});\n\nexport const zImportData = z.object({\n    body: z.union([\n        zModelWithReadOnlyAndWriteOnlyWritable,\n        zModelWithArrayReadOnlyAndWriteOnlyWritable\n    ]),\n    path: z.never().optional(),\n    query: z.never().optional()\n});\n\nexport const zImportResponse = z.union([\n    zModelFromZendesk,\n    zModelWithReadOnlyAndWriteOnly\n]);\n\nexport const zFooWowData = z.object({\n    body: z.never().optional(),\n    path: z.never().optional(),\n    query: z.never().optional()\n});\n\nexport const zApiVVersionODataControllerCountData = z.object({\n    body: z.never().optional(),\n    path: z.never().optional(),\n    query: z.never().optional()\n});\n\n/**\n * Success\n */\nexport const zApiVVersionODataControllerCountResponse = zModelFromZendesk;\n\nexport const zGetApiVbyApiVersionSimpleOperationData = z.object({\n    body: z.never().optional(),\n    path: z.object({\n        foo_param: z.union([\n            z.string(),\n            z.string().uuid()\n        ])\n    }),\n    query: z.never().optional()\n});\n\n/**\n * Response is a simple number\n */\nexport const zGetApiVbyApiVersionSimpleOperationResponse = z.number();\n\nexport const zDeleteCallWithoutParametersAndResponseData = z.object({\n    body: z.never().optional(),\n    path: z.never().optional(),\n    query: z.never().optional()\n});\n\nexport const zGetCallWithoutParametersAndResponseData = z.object({\n    body: z.never().optional(),\n    path: z.never().optional(),\n    query: z.never().optional()\n});\n\nexport const zHeadCallWithoutParametersAndResponseData = z.object({\n    body: z.never().optional(),\n    path: z.never().optional(),\n    query: z.never().optional()\n});\n\nexport const zOptionsCallWithoutParametersAndResponseData = z.object({\n    body: z.never().optional(),\n    path: z.never().optional(),\n    query: z.never().optional()\n});\n\nexport const zPatchCallWithoutParametersAndResponseData = z.object({\n    body: z.never().optional(),\n    path: z.never().optional(),\n    query: z.never().optional()\n});\n\nexport const zPostCallWithoutParametersAndResponseData = z.object({\n    body: z.never().optional(),\n    path: z.never().optional(),\n    query: z.never().optional()\n});\n\nexport const zPutCallWithoutParametersAndResponseData = z.object({\n    body: z.never().optional(),\n    path: z.never().optional(),\n    query: z.never().optional()\n});\n\nexport const zDeleteFooData3 = z.object({\n    body: z.never().optional(),\n    path: z.object({\n        foo_param: z.string(),\n        BarParam: z.string()\n    }),\n    query: z.never().optional(),\n    headers: z.object({\n        'x-Foo-Bar': zModelWithString\n    })\n});\n\nexport const zCallWithDescriptionsData = z.object({\n    body: z.never().optional(),\n    path: z.never().optional(),\n    query: z.object({\n        parameterWithBreaks: z.string().optional(),\n        parameterWithBackticks: z.string().optional(),\n        parameterWithSlashes: z.string().optional(),\n        parameterWithExpressionPlaceholders: z.string().optional(),\n        parameterWithQuotes: z.string().optional(),\n        parameterWithReservedCharacters: z.string().optional()\n    }).optional()\n});\n\nexport const zDeprecatedCallData = z.object({\n    body: z.never().optional(),\n    path: z.never().optional(),\n    query: z.never().optional(),\n    headers: z.object({\n        parameter: zDeprecatedModel.nullable()\n    })\n});\n\nexport const zCallWithParametersData = z.object({\n    body: z.record(z.unknown()).nullable(),\n    path: z.object({\n        parameterPath: z.string().nullable(),\n        'api-version': z.string().nullable()\n    }),\n    query: z.object({\n        foo_ref_enum: zModelWithNestedArrayEnumsDataFoo.optional(),\n        foo_all_of_enum: zModelWithNestedArrayEnumsDataFoo,\n        cursor: z.string().nullable()\n    }),\n    headers: z.object({\n        parameterHeader: z.string().nullable()\n    })\n});\n\nexport const zCallWithWeirdParameterNamesData = z.object({\n    body: zModelWithString.nullable(),\n    path: z.object({\n        'parameter.path.1': z.string().optional(),\n        'parameter-path-2': z.string().optional(),\n        'PARAMETER-PATH-3': z.string().optional(),\n        'api-version': z.string().nullable()\n    }),\n    query: z.object({\n        default: z.string().optional(),\n        'parameter-query': z.string().nullable()\n    }),\n    headers: z.object({\n        'parameter.header': z.string().nullable()\n    })\n});\n\nexport const zGetCallWithOptionalParamData = z.object({\n    body: zModelWithOneOfEnum,\n    path: z.never().optional(),\n    query: z.object({\n        page: z.number().optional()\n    }).optional()\n});\n\nexport const zPostCallWithOptionalParamData = z.object({\n    body: z.object({\n        offset: z.number().nullish()\n    }).optional(),\n    path: z.never().optional(),\n    query: z.object({\n        parameter: zPageable\n    })\n});\n\nexport const zPostCallWithOptionalParamResponse = z.union([\n    z.number(),\n    z.void()\n]);\n\nexport const zPostApiVbyApiVersionRequestBodyData = z.object({\n    body: zSimpleRequestBody.optional(),\n    path: z.never().optional(),\n    query: z.object({\n        parameter: z.string().optional()\n    }).optional()\n});\n\nexport const zPostApiVbyApiVersionFormDataData = z.object({\n    body: zSimpleFormData.optional(),\n    path: z.never().optional(),\n    query: z.object({\n        parameter: z.string().optional()\n    }).optional()\n});\n\nexport const zCallWithDefaultParametersData = z.object({\n    body: z.never().optional(),\n    path: z.never().optional(),\n    query: z.object({\n        parameterString: z.string().nullish().default('Hello World!'),\n        parameterNumber: z.number().nullish().default(123),\n        parameterBoolean: z.boolean().nullish().default(true),\n        parameterEnum: z.enum([\n            'Success',\n            'Warning',\n            'Error'\n        ]).optional(),\n        parameterModel: zModelWithString.nullish()\n    }).optional()\n});\n\nexport const zCallWithDefaultOptionalParametersData = z.object({\n    body: z.never().optional(),\n    path: z.never().optional(),\n    query: z.object({\n        parameterString: z.string().optional().default('Hello World!'),\n        parameterNumber: z.number().optional().default(123),\n        parameterBoolean: z.boolean().optional().default(true),\n        parameterEnum: z.enum([\n            'Success',\n            'Warning',\n            'Error'\n        ]).optional(),\n        parameterModel: zModelWithString.optional().default({ prop: 'Hello World!' })\n    }).optional()\n});\n\nexport const zCallToTestOrderOfParamsData = z.object({\n    body: z.never().optional(),\n    path: z.never().optional(),\n    query: z.object({\n        parameterOptionalStringWithDefault: z.string().optional().default('Hello World!'),\n        parameterOptionalStringWithEmptyDefault: z.string().optional().default(''),\n        parameterOptionalStringWithNoDefault: z.string().optional(),\n        parameterStringWithDefault: z.string().default('Hello World!'),\n        parameterStringWithEmptyDefault: z.string().default(''),\n        parameterStringWithNoDefault: z.string(),\n        parameterStringNullableWithNoDefault: z.string().nullish(),\n        parameterStringNullableWithDefault: z.string().nullish().default(null)\n    })\n});\n\nexport const zDuplicateNameData = z.object({\n    body: z.never().optional(),\n    path: z.never().optional(),\n    query: z.never().optional()\n});\n\nexport const zDuplicateName2Data = z.object({\n    body: z.never().optional(),\n    path: z.never().optional(),\n    query: z.never().optional()\n});\n\nexport const zDuplicateName3Data = z.object({\n    body: z.never().optional(),\n    path: z.never().optional(),\n    query: z.never().optional()\n});\n\nexport const zDuplicateName4Data = z.object({\n    body: z.never().optional(),\n    path: z.never().optional(),\n    query: z.never().optional()\n});\n\nexport const zCallWithNoContentResponseData = z.object({\n    body: z.never().optional(),\n    path: z.never().optional(),\n    query: z.never().optional()\n});\n\n/**\n * Success\n */\nexport const zCallWithNoContentResponseResponse = z.void();\n\nexport const zCallWithResponseAndNoContentResponseData = z.object({\n    body: z.never().optional(),\n    path: z.never().optional(),\n    query: z.never().optional()\n});\n\nexport const zCallWithResponseAndNoContentResponseResponse = z.union([\n    z.number(),\n    z.void()\n]);\n\nexport const zDummyAData = z.object({\n    body: z.never().optional(),\n    path: z.never().optional(),\n    query: z.never().optional()\n});\n\nexport const zDummyAResponse = z400;\n\nexport const zDummyBData = z.object({\n    body: z.never().optional(),\n    path: z.never().optional(),\n    query: z.never().optional()\n});\n\n/**\n * Success\n */\nexport const zDummyBResponse = z.void();\n\nexport const zCallWithResponseData = z.object({\n    body: z.never().optional(),\n    path: z.never().optional(),\n    query: z.never().optional()\n});\n\nexport const zCallWithResponseResponse = zImport;\n\nexport const zCallWithDuplicateResponsesData = z.object({\n    body: z.never().optional(),\n    path: z.never().optional(),\n    query: z.never().optional()\n});\n\nexport const zCallWithDuplicateResponsesResponse = z.union([\n    zModelWithBoolean.and(zModelWithInteger),\n    zModelWithString\n]);\n\nexport const zCallWithResponsesData = z.object({\n    body: z.never().optional(),\n    path: z.never().optional(),\n    query: z.never().optional()\n});\n\nexport const zCallWithResponsesResponse = z.union([\n    z.object({\n        '@namespace.string': z.string().readonly().optional(),\n        '@namespace.integer': z.number().int().readonly().optional(),\n        value: z.array(zModelWithString).readonly().optional()\n    }),\n    zModelThatExtends,\n    zModelThatExtendsExtends\n]);\n\nexport const zCollectionFormatData = z.object({\n    body: z.never().optional(),\n    path: z.never().optional(),\n    query: z.object({\n        parameterArrayCSV: z.array(z.string()).nullable(),\n        parameterArraySSV: z.array(z.string()).nullable(),\n        parameterArrayTSV: z.array(z.string()).nullable(),\n        parameterArrayPipes: z.array(z.string()).nullable(),\n        parameterArrayMulti: z.array(z.string()).nullable()\n    })\n});\n\nexport const zTypesData = z.object({\n    body: z.never().optional(),\n    path: z.object({\n        id: z.number().int().min(-2147483648, { message: 'Invalid value: Expected int32 to be >= -2147483648' }).max(2147483647, { message: 'Invalid value: Expected int32 to be <= 2147483647' }).optional()\n    }).optional(),\n    query: z.object({\n        parameterNumber: z.number().default(123),\n        parameterString: z.string().nullable().default('default'),\n        parameterBoolean: z.boolean().nullable().default(true),\n        parameterObject: z.record(z.unknown()).nullable().default(null),\n        parameterArray: z.array(z.string()).nullable(),\n        parameterDictionary: z.record(z.unknown()).nullable(),\n        parameterEnum: z.union([\n            z.literal('Success'),\n            z.literal('Warning'),\n            z.literal('Error')\n        ]).nullable()\n    })\n});\n\nexport const zTypesResponse = z.union([\n    z.number(),\n    z.string(),\n    z.boolean(),\n    z.record(z.unknown())\n]);\n\nexport const zUploadFileData = z.object({\n    body: z.string(),\n    path: z.object({\n        'api-version': z.string().nullable()\n    }),\n    query: z.never().optional()\n});\n\nexport const zUploadFileResponse = z.boolean();\n\nexport const zFileResponseData = z.object({\n    body: z.never().optional(),\n    path: z.object({\n        id: z.string(),\n        'api-version': z.string()\n    }),\n    query: z.never().optional()\n});\n\n/**\n * Success\n */\nexport const zFileResponseResponse = z.string();\n\nexport const zComplexTypesData = z.object({\n    body: z.never().optional(),\n    path: z.never().optional(),\n    query: z.object({\n        parameterObject: z.object({\n            first: z.object({\n                second: z.object({\n                    third: z.string().optional()\n                }).optional()\n            }).optional()\n        }),\n        parameterReference: zModelWithString\n    })\n});\n\n/**\n * Successful response\n */\nexport const zComplexTypesResponse = z.array(zModelWithString);\n\nexport const zMultipartResponseData = z.object({\n    body: z.never().optional(),\n    path: z.never().optional(),\n    query: z.never().optional()\n});\n\n/**\n * OK\n */\nexport const zMultipartResponseResponse = z.object({\n    file: z.string().optional(),\n    metadata: z.object({\n        foo: z.string().optional(),\n        bar: z.string().optional()\n    }).optional()\n});\n\nexport const zMultipartRequestData = z.object({\n    body: z.object({\n        content: z.string().optional(),\n        data: zModelWithString.nullish()\n    }).optional(),\n    path: z.never().optional(),\n    query: z.never().optional()\n});\n\nexport const zComplexParamsData = z.object({\n    body: z.object({\n        key: z.string().max(64).regex(/^[a-zA-Z0-9_]*$/).readonly().nullable(),\n        name: z.string().max(255).nullable(),\n        enabled: z.boolean().optional().default(true),\n        type: z.enum([\n            'Monkey',\n            'Horse',\n            'Bird'\n        ]),\n        listOfModels: z.array(zModelWithString).nullish(),\n        listOfStrings: z.array(z.string()).nullish(),\n        parameters: z.union([\n            zModelWithString,\n            zModelWithEnum,\n            zModelWithArray,\n            zModelWithDictionary\n        ]),\n        user: z.object({\n            id: z.number().int().min(-2147483648, { message: 'Invalid value: Expected int32 to be >= -2147483648' }).max(2147483647, { message: 'Invalid value: Expected int32 to be <= 2147483647' }).readonly().optional(),\n            name: z.string().readonly().nullish()\n        }).readonly().optional()\n    }).optional(),\n    path: z.object({\n        id: z.number().int().min(-2147483648, { message: 'Invalid value: Expected int32 to be >= -2147483648' }).max(2147483647, { message: 'Invalid value: Expected int32 to be <= 2147483647' }),\n        'api-version': z.string()\n    }),\n    query: z.never().optional()\n});\n\n/**\n * Success\n */\nexport const zComplexParamsResponse = zModelWithString;\n\nexport const zCallWithResultFromHeaderData = z.object({\n    body: z.never().optional(),\n    path: z.never().optional(),\n    query: z.never().optional()\n});\n\nexport const zTestErrorCodeData = z.object({\n    body: z.never().optional(),\n    path: z.never().optional(),\n    query: z.object({\n        status: z.number().int()\n    })\n});\n\nexport const zNonAsciiæøåÆøÅöôêÊ字符串Data = z.object({\n    body: z.never().optional(),\n    path: z.never().optional(),\n    query: z.object({\n        nonAsciiParamæøåÆØÅöôêÊ: z.number().int()\n    })\n});\n\n/**\n * Successful response\n */\nexport const zNonAsciiæøåÆøÅöôêÊ字符串Response = z.array(zNonAsciiStringæøåÆøÅöôêÊ字符串);\n\nexport const zPutWithFormUrlEncodedData = z.object({\n    body: zArrayWithStrings,\n    path: z.never().optional(),\n    query: z.never().optional()\n});\n"
  },
  {
    "path": "packages/openapi-ts-tests/zod/v4/__snapshots__/3.1.x/v3/defaults-with-ref-and-anyof/zod.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport { z } from 'zod/v3';\n\nexport const zAudioFormat = z.enum(['pcm_16bit_44.1khz', 'pcm_16bit_24khz']);\n\nexport const zLanguage = z.enum([\n    'en',\n    'es',\n    'fr'\n]);\n\nexport const zNestedConfig = z.object({\n    model: z.string().default('gpt-4'),\n    temperature: z.number().default(1)\n});\n\nexport const zTestSchema = z.object({\n    primitiveDefault: z.number().default(42),\n    refWithPrimitiveDefault: zAudioFormat.default('pcm_16bit_44.1khz'),\n    refWithObjectDefault: zNestedConfig.default({ model: 'gpt-4', temperature: 1 }),\n    anyOfWithNullDefault: z.number().nullable().default(null),\n    anyOfWithRefAndNullDefault: zLanguage.nullable().default(null),\n    optionalAnyOfWithDefault: z.string().nullish().default(null)\n});\n"
  },
  {
    "path": "packages/openapi-ts-tests/zod/v4/__snapshots__/3.1.x/v3/enum-null/zod.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport { z } from 'zod/v3';\n\nexport const zFoo = z.enum(['foo', 'bar']).nullable();\n\nexport const zBar = z.enum(['foo', 'bar']);\n\nexport const zBaz = z.enum(['foo', 'bar']);\n"
  },
  {
    "path": "packages/openapi-ts-tests/zod/v4/__snapshots__/3.1.x/v3/enum-resolver-permissive/zod.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport { z } from 'zod/v3';\n\nexport const zFoo = z.union([z.enum(['foo', 'bar']), z.string()]).nullable();\n\nexport const zBar = z.union([z.enum(['foo', 'bar']), z.string()]);\n\nexport const zBaz = z.union([z.enum(['foo', 'bar']), z.string()]);\n"
  },
  {
    "path": "packages/openapi-ts-tests/zod/v4/__snapshots__/3.1.x/v3/schema-const/zod.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport { z } from 'zod/v3';\n\nexport const zFoo = z.object({\n    foo: z.literal('foo').optional(),\n    bar: z.literal(3.2).optional(),\n    baz: z.literal(-1).optional(),\n    qux: z.literal(true).optional(),\n    quux: z.tuple([\n        z.literal(1),\n        z.literal(2),\n        z.literal(3),\n        z.literal('foo'),\n        z.literal(true)\n    ]).optional(),\n    corge: z.record(z.unknown()).optional(),\n    garply: z.literal(BigInt('10')).optional(),\n    numberInt8: z.literal(100).optional(),\n    numberInt16: z.literal(1000).optional(),\n    numberInt32: z.literal(100000).optional(),\n    numberInt64: z.literal(BigInt(1000000000000)).optional(),\n    numberUint8: z.literal(200).optional(),\n    numberUint16: z.literal(50000).optional(),\n    numberUint32: z.literal(3000000000).optional(),\n    numberUint64: z.literal(BigInt(18000000000000000000)).optional(),\n    integerInt8: z.literal(-100).optional(),\n    integerInt16: z.literal(-1000).optional(),\n    integerInt32: z.literal(-100000).optional(),\n    integerInt64: z.literal(BigInt(-1000000000000)).optional(),\n    integerUint8: z.literal(255).optional(),\n    integerUint16: z.literal(65535).optional(),\n    integerUint32: z.literal(4294967295).optional(),\n    integerUint64: z.literal(BigInt('18446744073709551615')).optional(),\n    stringInt64: z.literal(BigInt('-9223372036854775808')).optional(),\n    stringUint64: z.literal(BigInt('18446744073709551615')).optional()\n});\n"
  },
  {
    "path": "packages/openapi-ts-tests/zod/v4/__snapshots__/3.1.x/v3/string-with-format/zod.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport { z } from 'zod/v3';\n\nexport const zFoo = z.object({\n    foo: z.array(z.union([z.string(), z.string()])).optional()\n});\n"
  },
  {
    "path": "packages/openapi-ts-tests/zod/v4/__snapshots__/3.1.x/v3/string-with-guid-format/zod.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport { z } from 'zod/v3';\n\nexport const zGetFooData = z.object({\n    body: z.never().optional(),\n    path: z.object({\n        guidId: z.string()\n    }),\n    query: z.never().optional()\n});\n"
  },
  {
    "path": "packages/openapi-ts-tests/zod/v4/__snapshots__/3.1.x/v3/type-format/client/client.gen.ts",
    "content": "// 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 (options: RequestOptions) => {\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 url = buildUrl(opts);\n\n    return { opts, url };\n  };\n\n  const request: Client['request'] = async (options) => {\n    // @ts-expect-error\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"
  },
  {
    "path": "packages/openapi-ts-tests/zod/v4/__snapshots__/3.1.x/v3/type-format/client/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type { Auth } from '../core/auth.gen';\nexport type { QuerySerializerOptions } from '../core/bodySerializer.gen';\nexport {\n  formDataBodySerializer,\n  jsonBodySerializer,\n  urlSearchParamsBodySerializer,\n} from '../core/bodySerializer.gen';\nexport { buildClientParams } from '../core/params.gen';\nexport { serializeQueryKeyValue } from '../core/queryKeySerializer.gen';\nexport { createClient } from './client.gen';\nexport type {\n  Client,\n  ClientOptions,\n  Config,\n  CreateClientConfig,\n  Options,\n  RequestOptions,\n  RequestResult,\n  ResolvedRequestOptions,\n  ResponseStyle,\n  TDataShape,\n} from './types.gen';\nexport { createConfig, mergeHeaders } from './utils.gen';\n"
  },
  {
    "path": "packages/openapi-ts-tests/zod/v4/__snapshots__/3.1.x/v3/type-format/client/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { Auth } from '../core/auth.gen';\nimport type {\n  ServerSentEventsOptions,\n  ServerSentEventsResult,\n} from '../core/serverSentEvents.gen';\nimport type { Client as CoreClient, Config as CoreConfig } from '../core/types.gen';\nimport type { Middleware } from './utils.gen';\n\nexport type ResponseStyle = 'data' | 'fields';\n\nexport interface Config<T extends ClientOptions = ClientOptions>\n  extends Omit<RequestInit, 'body' | 'headers' | 'method'>, CoreConfig {\n  /**\n   * Base URL for all requests made by this client.\n   */\n  baseUrl?: T['baseUrl'];\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   * Please don't use the Fetch client for Next.js applications. The `next`\n   * options won't have any effect.\n   *\n   * Install {@link https://www.npmjs.com/package/@hey-api/client-next `@hey-api/client-next`} instead.\n   */\n  next?: never;\n  /**\n   * Return the response data parsed in a specified format. By default, `auto`\n   * will infer the appropriate method from the `Content-Type` response header.\n   * You can override this behavior with any of the {@link Body} methods.\n   * Select `stream` if you don't want to parse response data at all.\n   *\n   * @default 'auto'\n   */\n  parseAs?: 'arrayBuffer' | 'auto' | 'blob' | 'formData' | 'json' | 'stream' | 'text';\n  /**\n   * Should we return only data or multiple fields (data, error, response, etc.)?\n   *\n   * @default 'fields'\n   */\n  responseStyle?: ResponseStyle;\n  /**\n   * Throw an error instead of returning it in the response?\n   *\n   * @default false\n   */\n  throwOnError?: T['throwOnError'];\n}\n\nexport interface RequestOptions<\n  TData = unknown,\n  TResponseStyle extends ResponseStyle = 'fields',\n  ThrowOnError extends boolean = boolean,\n  Url extends string = string,\n>\n  extends\n    Config<{\n      responseStyle: TResponseStyle;\n      throwOnError: ThrowOnError;\n    }>,\n    Pick<\n      ServerSentEventsOptions<TData>,\n      | 'onRequest'\n      | 'onSseError'\n      | 'onSseEvent'\n      | 'sseDefaultRetryDelay'\n      | 'sseMaxRetryAttempts'\n      | 'sseMaxRetryDelay'\n    > {\n  /**\n   * Any body that you want to add to your request.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/fetch#body}\n   */\n  body?: unknown;\n  path?: Record<string, unknown>;\n  query?: Record<string, unknown>;\n  /**\n   * Security mechanism(s) to use for the request.\n   */\n  security?: ReadonlyArray<Auth>;\n  url: Url;\n}\n\nexport interface ResolvedRequestOptions<\n  TResponseStyle extends ResponseStyle = 'fields',\n  ThrowOnError extends boolean = boolean,\n  Url extends string = string,\n> extends RequestOptions<unknown, TResponseStyle, ThrowOnError, Url> {\n  serializedBody?: string;\n}\n\nexport type RequestResult<\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = boolean,\n  TResponseStyle extends ResponseStyle = 'fields',\n> = ThrowOnError extends true\n  ? Promise<\n      TResponseStyle extends 'data'\n        ? TData extends Record<string, unknown>\n          ? TData[keyof TData]\n          : TData\n        : {\n            data: TData extends Record<string, unknown> ? TData[keyof TData] : TData;\n            request: Request;\n            response: Response;\n          }\n    >\n  : Promise<\n      TResponseStyle extends 'data'\n        ? (TData extends Record<string, unknown> ? TData[keyof TData] : TData) | undefined\n        : (\n            | {\n                data: TData extends Record<string, unknown> ? TData[keyof TData] : TData;\n                error: undefined;\n              }\n            | {\n                data: undefined;\n                error: TError extends Record<string, unknown> ? TError[keyof TError] : TError;\n              }\n          ) & {\n            request: Request;\n            response: Response;\n          }\n    >;\n\nexport interface ClientOptions {\n  baseUrl?: string;\n  responseStyle?: ResponseStyle;\n  throwOnError?: boolean;\n}\n\ntype MethodFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'>,\n) => RequestResult<TData, TError, ThrowOnError, TResponseStyle>;\n\ntype SseFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'>,\n) => Promise<ServerSentEventsResult<TData, TError>>;\n\ntype RequestFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'> &\n    Pick<Required<RequestOptions<TData, TResponseStyle, ThrowOnError>>, 'method'>,\n) => RequestResult<TData, TError, ThrowOnError, TResponseStyle>;\n\ntype BuildUrlFn = <\n  TData extends {\n    body?: unknown;\n    path?: Record<string, unknown>;\n    query?: Record<string, unknown>;\n    url: string;\n  },\n>(\n  options: TData & Options<TData>,\n) => string;\n\nexport type Client = CoreClient<RequestFn, Config, MethodFn, BuildUrlFn, SseFn> & {\n  interceptors: Middleware<Request, Response, unknown, ResolvedRequestOptions>;\n};\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 = ClientOptions> = (\n  override?: Config<ClientOptions & T>,\n) => Config<Required<ClientOptions> & T>;\n\nexport interface TDataShape {\n  body?: unknown;\n  headers?: unknown;\n  path?: unknown;\n  query?: unknown;\n  url: string;\n}\n\ntype OmitKeys<T, K> = Pick<T, Exclude<keyof T, K>>;\n\nexport type Options<\n  TData extends TDataShape = TDataShape,\n  ThrowOnError extends boolean = boolean,\n  TResponse = unknown,\n  TResponseStyle extends ResponseStyle = 'fields',\n> = OmitKeys<\n  RequestOptions<TResponse, TResponseStyle, ThrowOnError>,\n  'body' | 'path' | 'query' | 'url'\n> &\n  ([TData] extends [never] ? unknown : Omit<TData, 'url'>);\n"
  },
  {
    "path": "packages/openapi-ts-tests/zod/v4/__snapshots__/3.1.x/v3/type-format/client/utils.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/zod/v4/__snapshots__/3.1.x/v3/type-format/client.gen.ts",
    "content": "// 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>());\n"
  },
  {
    "path": "packages/openapi-ts-tests/zod/v4/__snapshots__/3.1.x/v3/type-format/core/auth.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/zod/v4/__snapshots__/3.1.x/v3/type-format/core/bodySerializer.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/zod/v4/__snapshots__/3.1.x/v3/type-format/core/params.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/zod/v4/__snapshots__/3.1.x/v3/type-format/core/pathSerializer.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/zod/v4/__snapshots__/3.1.x/v3/type-format/core/queryKeySerializer.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\n/**\n * JSON-friendly union that mirrors what Pinia Colada can hash.\n */\nexport type JsonValue =\n  | null\n  | string\n  | number\n  | boolean\n  | JsonValue[]\n  | { [key: string]: JsonValue };\n\n/**\n * Replacer that converts non-JSON values (bigint, Date, etc.) to safe substitutes.\n */\nexport const queryKeyJsonReplacer = (_key: string, value: unknown) => {\n  if (value === undefined || typeof value === 'function' || typeof value === 'symbol') {\n    return undefined;\n  }\n  if (typeof value === 'bigint') {\n    return value.toString();\n  }\n  if (value instanceof Date) {\n    return value.toISOString();\n  }\n  return value;\n};\n\n/**\n * Safely stringifies a value and parses it back into a JsonValue.\n */\nexport const stringifyToJsonValue = (input: unknown): JsonValue | undefined => {\n  try {\n    const json = JSON.stringify(input, queryKeyJsonReplacer);\n    if (json === undefined) {\n      return undefined;\n    }\n    return JSON.parse(json) as JsonValue;\n  } catch {\n    return undefined;\n  }\n};\n\n/**\n * Detects plain objects (including objects with a null prototype).\n */\nconst isPlainObject = (value: unknown): value is Record<string, unknown> => {\n  if (value === null || typeof value !== 'object') {\n    return false;\n  }\n  const prototype = Object.getPrototypeOf(value as object);\n  return prototype === Object.prototype || prototype === null;\n};\n\n/**\n * Turns URLSearchParams into a sorted JSON object for deterministic keys.\n */\nconst serializeSearchParams = (params: URLSearchParams): JsonValue => {\n  const entries = Array.from(params.entries()).sort(([a], [b]) => a.localeCompare(b));\n  const result: Record<string, JsonValue> = {};\n\n  for (const [key, value] of entries) {\n    const existing = result[key];\n    if (existing === undefined) {\n      result[key] = value;\n      continue;\n    }\n\n    if (Array.isArray(existing)) {\n      (existing as string[]).push(value);\n    } else {\n      result[key] = [existing, value];\n    }\n  }\n\n  return result;\n};\n\n/**\n * Normalizes any accepted value into a JSON-friendly shape for query keys.\n */\nexport const serializeQueryKeyValue = (value: unknown): JsonValue | undefined => {\n  if (value === null) {\n    return null;\n  }\n\n  if (typeof value === 'string' || typeof value === 'number' || typeof value === 'boolean') {\n    return value;\n  }\n\n  if (value === undefined || typeof value === 'function' || typeof value === 'symbol') {\n    return undefined;\n  }\n\n  if (typeof value === 'bigint') {\n    return value.toString();\n  }\n\n  if (value instanceof Date) {\n    return value.toISOString();\n  }\n\n  if (Array.isArray(value)) {\n    return stringifyToJsonValue(value);\n  }\n\n  if (typeof URLSearchParams !== 'undefined' && value instanceof URLSearchParams) {\n    return serializeSearchParams(value);\n  }\n\n  if (isPlainObject(value)) {\n    return stringifyToJsonValue(value);\n  }\n\n  return undefined;\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/zod/v4/__snapshots__/3.1.x/v3/type-format/core/serverSentEvents.gen.ts",
    "content": "// 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 const 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            // Normalize line endings: CRLF -> LF, then CR -> LF\n            buffer = buffer.replace(/\\r\\n/g, '\\n').replace(/\\r/g, '\\n');\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"
  },
  {
    "path": "packages/openapi-ts-tests/zod/v4/__snapshots__/3.1.x/v3/type-format/core/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { Auth, AuthToken } from './auth.gen';\nimport type { BodySerializer, QuerySerializer, QuerySerializerOptions } from './bodySerializer.gen';\n\nexport type HttpMethod =\n  | 'connect'\n  | 'delete'\n  | 'get'\n  | 'head'\n  | 'options'\n  | 'patch'\n  | 'post'\n  | 'put'\n  | 'trace';\n\nexport type Client<\n  RequestFn = never,\n  Config = unknown,\n  MethodFn = never,\n  BuildUrlFn = never,\n  SseFn = never,\n> = {\n  /**\n   * Returns the final request URL.\n   */\n  buildUrl: BuildUrlFn;\n  getConfig: () => Config;\n  request: RequestFn;\n  setConfig: (config: Config) => Config;\n} & {\n  [K in HttpMethod]: MethodFn;\n} & ([SseFn] extends [never] ? { sse?: never } : { sse: { [K in HttpMethod]: SseFn } });\n\nexport interface Config {\n  /**\n   * Auth token or a function returning auth token. The resolved value will be\n   * added to the request payload as defined by its `security` array.\n   */\n  auth?: ((auth: Auth) => Promise<AuthToken> | AuthToken) | AuthToken;\n  /**\n   * A function for serializing request body parameter. By default,\n   * {@link JSON.stringify()} will be used.\n   */\n  bodySerializer?: BodySerializer | null;\n  /**\n   * An object containing any HTTP headers that you want to pre-populate your\n   * `Headers` object with.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/Headers/Headers#init See more}\n   */\n  headers?:\n    | RequestInit['headers']\n    | Record<\n        string,\n        string | number | boolean | (string | number | boolean)[] | null | undefined | unknown\n      >;\n  /**\n   * The request method.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/fetch#method See more}\n   */\n  method?: Uppercase<HttpMethod>;\n  /**\n   * A function for serializing request query parameters. By default, arrays\n   * will be exploded in form style, objects will be exploded in deepObject\n   * style, and reserved characters are percent-encoded.\n   *\n   * This method will have no effect if the native `paramsSerializer()` Axios\n   * API function is used.\n   *\n   * {@link https://swagger.io/docs/specification/serialization/#query View examples}\n   */\n  querySerializer?: QuerySerializer | QuerySerializerOptions;\n  /**\n   * A function validating request data. This is useful if you want to ensure\n   * the request conforms to the desired shape, so it can be safely sent to\n   * the server.\n   */\n  requestValidator?: (data: unknown) => Promise<unknown>;\n  /**\n   * A function transforming response data before it's returned. This is useful\n   * for post-processing data, e.g. converting ISO strings into Date objects.\n   */\n  responseTransformer?: (data: unknown) => Promise<unknown>;\n  /**\n   * A function validating response data. This is useful if you want to ensure\n   * the response conforms to the desired shape, so it can be safely passed to\n   * the transformers and returned to the user.\n   */\n  responseValidator?: (data: unknown) => Promise<unknown>;\n}\n\ntype IsExactlyNeverOrNeverUndefined<T> = [T] extends [never]\n  ? true\n  : [T] extends [never | undefined]\n    ? [undefined] extends [T]\n      ? false\n      : true\n    : false;\n\nexport type OmitNever<T extends Record<string, unknown>> = {\n  [K in keyof T as IsExactlyNeverOrNeverUndefined<T[K]> extends true ? never : K]: T[K];\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/zod/v4/__snapshots__/3.1.x/v3/type-format/core/utils.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/zod/v4/__snapshots__/3.1.x/v3/type-format/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport { type Options, postFoo } from './sdk.gen';\nexport type { Bar, ClientOptions, Foo, PostFooData, PostFooResponse, PostFooResponses, TypeID, UserId } from './types.gen';\n"
  },
  {
    "path": "packages/openapi-ts-tests/zod/v4/__snapshots__/3.1.x/v3/type-format/sdk.gen.ts",
    "content": "// 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 { postFooResponseTransformer } from './transformers.gen';\nimport type { PostFooData, PostFooResponses } from './types.gen';\nimport { zPostFooData, zPostFooResponse } from './zod.gen';\n\nexport type Options<TData extends TDataShape = TDataShape, ThrowOnError extends boolean = boolean> = Options2<TData, ThrowOnError> & {\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\nexport const postFoo = <ThrowOnError extends boolean = false>(options?: Options<PostFooData, ThrowOnError>) => (options?.client ?? client).post<PostFooResponses, unknown, ThrowOnError>({\n    requestValidator: async (data) => await zPostFooData.parseAsync(data),\n    responseTransformer: postFooResponseTransformer,\n    responseValidator: async (data) => await zPostFooResponse.parseAsync(data),\n    url: '/foo',\n    ...options\n});\n"
  },
  {
    "path": "packages/openapi-ts-tests/zod/v4/__snapshots__/3.1.x/v3/type-format/transformers.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { PostFooResponse } from './types.gen';\n\nconst fooSchemaResponseTransformer = (data: any) => {\n    data.foo = BigInt(data.foo.toString());\n    return data;\n};\n\nexport const postFooResponseTransformer = async (data: any): Promise<PostFooResponse> => {\n    data = fooSchemaResponseTransformer(data);\n    return data;\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/zod/v4/__snapshots__/3.1.x/v3/type-format/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type ClientOptions = {\n    baseUrl: `${string}://${string}` | (string & {});\n};\n\nexport type TypeID<T extends string> = `${T}_${string}`;\n\nexport type UserId = TypeID<'user'>;\n\nexport type Foo = {\n    bar?: number;\n    foo: bigint;\n    id: UserId;\n};\n\nexport type Bar = {\n    foo: number;\n    [key: string]: number;\n};\n\nexport type PostFooData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/foo';\n};\n\nexport type PostFooResponses = {\n    /**\n     * OK\n     */\n    200: Foo;\n};\n\nexport type PostFooResponse = PostFooResponses[keyof PostFooResponses];\n"
  },
  {
    "path": "packages/openapi-ts-tests/zod/v4/__snapshots__/3.1.x/v3/type-format/zod.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport { z } from 'zod/v3';\n\nexport const zFoo = z.object({\n    bar: z.number().int().optional(),\n    foo: z.coerce.bigint().min(BigInt('-9223372036854775808'), { message: 'Invalid value: Expected int64 to be >= -9223372036854775808' }).max(BigInt('9223372036854775807'), { message: 'Invalid value: Expected int64 to be <= 9223372036854775807' }).default(BigInt(0)),\n    id: z.string()\n});\n\nexport const zBar = z.object({\n    foo: z.number().int()\n});\n\nexport const zPostFooData = z.object({\n    body: z.never().optional(),\n    path: z.never().optional(),\n    query: z.never().optional()\n});\n\n/**\n * OK\n */\nexport const zPostFooResponse = zFoo;\n"
  },
  {
    "path": "packages/openapi-ts-tests/zod/v4/__snapshots__/3.1.x/v3/validators/zod.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport { z } from 'zod/v3';\n\nexport const zBaz = z.string().regex(/foo\\nbar/).readonly().default('baz');\n\nexport const zQux = z.record(z.object({\n    qux: z.string().optional()\n}));\n\n/**\n * This is Foo schema.\n */\nexport const zFoo: z.ZodTypeAny = z.object({\n    foo: z.string().regex(/^\\d{3}-\\d{2}-\\d{4}$/).optional(),\n    bar: z.lazy(() => zBar).optional(),\n    baz: z.array(z.lazy(() => zFoo)).optional(),\n    qux: z.number().int().gt(0).optional().default(0)\n}).nullable().default(null);\n\n/**\n * This is Bar schema.\n */\nexport const zBar = z.object({\n    foo: zFoo.optional()\n});\n\n/**\n * This is Foo parameter.\n */\nexport const zFoo2 = z.string();\n\nexport const zFoo3 = z.object({\n    foo: zBar.optional()\n});\n\nexport const zPatchFooData = z.object({\n    body: z.object({\n        foo: z.string().optional()\n    }),\n    path: z.never().optional(),\n    query: z.object({\n        foo: z.string().optional(),\n        bar: zBar.optional(),\n        baz: z.object({\n            baz: z.string().optional()\n        }).optional(),\n        qux: z.string().date().optional(),\n        quux: z.string().datetime().optional()\n    }).optional()\n});\n\nexport const zPostFooData = z.object({\n    body: zFoo3,\n    path: z.never().optional(),\n    query: z.never().optional()\n});\n"
  },
  {
    "path": "packages/openapi-ts-tests/zod/v4/__snapshots__/3.1.x/v3/validators-bigint-min-max/zod.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport { z } from 'zod/v3';\n\nexport const zFoo = z.object({\n    foo: z.coerce.bigint().gte(BigInt(0)).lte(BigInt(100)).optional()\n});\n"
  },
  {
    "path": "packages/openapi-ts-tests/zod/v4/__snapshots__/3.1.x/v3/validators-circular-ref/zod.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport { z } from 'zod/v3';\n\nexport const zBar: z.AnyZodObject = z.object({\n    bar: z.array(z.lazy(() => zBar)).optional()\n});\n\nexport const zFoo = z.object({\n    foo: zBar.optional()\n});\n\nexport const zBaz: z.ZodTypeAny = z.lazy(() => zQux);\n\n/**\n * description caused circular reference error\n */\nexport const zQux = zBaz;\n"
  },
  {
    "path": "packages/openapi-ts-tests/zod/v4/__snapshots__/3.1.x/v3/validators-circular-ref-2/zod.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport { z } from 'zod/v3';\n\nexport const zBar: z.AnyZodObject = z.object({\n    bar: z.array(z.lazy(() => zBar)).nullable()\n});\n\nexport const zFoo = z.object({\n    foo: zBar\n});\n"
  },
  {
    "path": "packages/openapi-ts-tests/zod/v4/__snapshots__/3.1.x/v3/validators-dates/zod.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport { z } from 'zod/v3';\n\nexport const zBaz = z.string().regex(/foo\\nbar/).readonly().default('baz');\n\nexport const zQux = z.record(z.object({\n    qux: z.string().optional()\n}));\n\n/**\n * This is Foo schema.\n */\nexport const zFoo: z.ZodTypeAny = z.object({\n    foo: z.string().regex(/^\\d{3}-\\d{2}-\\d{4}$/).optional(),\n    bar: z.lazy(() => zBar).optional(),\n    baz: z.array(z.lazy(() => zFoo)).optional(),\n    qux: z.number().int().gt(0).optional().default(0)\n}).nullable().default(null);\n\n/**\n * This is Bar schema.\n */\nexport const zBar = z.object({\n    foo: zFoo.optional()\n});\n\n/**\n * This is Foo parameter.\n */\nexport const zFoo2 = z.string();\n\nexport const zFoo3 = z.object({\n    foo: zBar.optional()\n});\n\nexport const zPatchFooData = z.object({\n    body: z.object({\n        foo: z.string().optional()\n    }),\n    path: z.never().optional(),\n    query: z.object({\n        foo: z.string().optional(),\n        bar: zBar.optional(),\n        baz: z.object({\n            baz: z.string().optional()\n        }).optional(),\n        qux: z.string().date().optional(),\n        quux: z.string().datetime({ offset: true }).optional()\n    }).optional()\n});\n\nexport const zPostFooData = z.object({\n    body: zFoo3,\n    path: z.never().optional(),\n    query: z.never().optional()\n});\n"
  },
  {
    "path": "packages/openapi-ts-tests/zod/v4/__snapshots__/3.1.x/v3/validators-metadata/zod.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport { z } from 'zod/v3';\n\nexport const zBaz = z.string().regex(/foo\\nbar/).readonly().default('baz');\n\nexport const zQux = z.record(z.object({\n    qux: z.string().optional()\n}));\n\n/**\n * This is Foo schema.\n */\nexport const zFoo: z.ZodTypeAny = z.object({\n    foo: z.string().regex(/^\\d{3}-\\d{2}-\\d{4}$/).describe('This is foo property.').optional(),\n    bar: z.lazy(() => zBar).optional(),\n    baz: z.array(z.lazy(() => zFoo)).describe('This is baz property.').optional(),\n    qux: z.number().int().gt(0).describe('This is qux property.').optional().default(0)\n}).nullable().default(null);\n\n/**\n * This is Bar schema.\n */\nexport const zBar = z.object({\n    foo: zFoo.optional()\n}).describe('This is Bar schema.');\n\n/**\n * This is Foo parameter.\n */\nexport const zFoo2 = z.string().describe('This is Foo parameter.');\n\nexport const zFoo3 = z.object({\n    foo: zBar.optional()\n});\n\nexport const zPatchFooData = z.object({\n    body: z.object({\n        foo: z.string().optional()\n    }),\n    path: z.never().optional(),\n    query: z.object({\n        foo: z.string().describe('This is Foo parameter.').optional(),\n        bar: zBar.optional(),\n        baz: z.object({\n            baz: z.string().optional()\n        }).optional(),\n        qux: z.string().date().optional(),\n        quux: z.string().datetime().optional()\n    }).optional()\n});\n\nexport const zPostFooData = z.object({\n    body: zFoo3,\n    path: z.never().optional(),\n    query: z.never().optional()\n});\n"
  },
  {
    "path": "packages/openapi-ts-tests/zod/v4/__snapshots__/3.1.x/v3/validators-metadata-fn/zod.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport { z } from 'zod/v3';\n\nexport const zBaz = z.string().regex(/foo\\nbar/).readonly().default('baz');\n\nexport const zQux = z.record(z.object({\n    qux: z.string().optional()\n}));\n\n/**\n * This is Foo schema.\n */\nexport const zFoo: z.ZodTypeAny = z.object({\n    foo: z.string().regex(/^\\d{3}-\\d{2}-\\d{4}$/).describe('This is foo property.').optional(),\n    bar: z.lazy(() => zBar).optional(),\n    baz: z.array(z.lazy(() => zFoo)).describe('This is baz property.').optional(),\n    qux: z.number().int().gt(0).describe('This is qux property.').optional().default(0)\n}).nullable().default(null);\n\n/**\n * This is Bar schema.\n */\nexport const zBar = z.object({\n    foo: zFoo.optional()\n}).describe('This is Bar schema.');\n\n/**\n * This is Foo parameter.\n */\nexport const zFoo2 = z.string().describe('This is Foo parameter.');\n\nexport const zFoo3 = z.object({\n    foo: zBar.optional()\n});\n\nexport const zPatchFooData = z.object({\n    body: z.object({\n        foo: z.string().optional()\n    }),\n    path: z.never().optional(),\n    query: z.object({\n        foo: z.string().describe('This is Foo parameter.').optional(),\n        bar: zBar.optional(),\n        baz: z.object({\n            baz: z.string().optional()\n        }).optional(),\n        qux: z.string().date().optional(),\n        quux: z.string().datetime().optional()\n    }).optional()\n});\n\nexport const zPostFooData = z.object({\n    body: zFoo3,\n    path: z.never().optional(),\n    query: z.never().optional()\n});\n"
  },
  {
    "path": "packages/openapi-ts-tests/zod/v4/__snapshots__/3.1.x/v3/validators-string-constraints-union/zod.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport { z } from 'zod/v3';\n\nexport const zLocaleOrLanguage = z.union([\n    z.string().length(5),\n    z.string().length(2)\n]);\n"
  },
  {
    "path": "packages/openapi-ts-tests/zod/v4/__snapshots__/3.1.x/v3/validators-types/zod.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport { z } from 'zod/v3';\n\nexport const zBaz = z.string().regex(/foo\\nbar/).readonly().default('baz');\n\nexport type BazZodType = z.infer<typeof zBaz>;\n\nexport const zQux = z.record(z.object({\n    qux: z.string().optional()\n}));\n\nexport type QuxZodType = z.infer<typeof zQux>;\n\n/**\n * This is Foo schema.\n */\nexport const zFoo: z.ZodTypeAny = z.object({\n    foo: z.string().regex(/^\\d{3}-\\d{2}-\\d{4}$/).optional(),\n    bar: z.lazy(() => zBar).optional(),\n    baz: z.array(z.lazy(() => zFoo)).optional(),\n    qux: z.number().int().gt(0).optional().default(0)\n}).nullable().default(null);\n\nexport type FooZodType = z.infer<typeof zFoo>;\n\n/**\n * This is Bar schema.\n */\nexport const zBar = z.object({\n    foo: zFoo.optional()\n});\n\nexport type BarZodType = z.infer<typeof zBar>;\n\n/**\n * This is Foo parameter.\n */\nexport const zFoo2 = z.string();\n\nexport type FooZodType2 = z.infer<typeof zFoo2>;\n\nexport const zFoo3 = z.object({\n    foo: zBar.optional()\n});\n\nexport type FooZodType3 = z.infer<typeof zFoo3>;\n\nexport const zPatchFooData = z.object({\n    body: z.object({\n        foo: z.string().optional()\n    }),\n    path: z.never().optional(),\n    query: z.object({\n        foo: z.string().optional(),\n        bar: zBar.optional(),\n        baz: z.object({\n            baz: z.string().optional()\n        }).optional(),\n        qux: z.string().date().optional(),\n        quux: z.string().datetime().optional()\n    }).optional()\n});\n\nexport type PatchFooDataZodType = z.infer<typeof zPatchFooData>;\n\nexport const zPostFooData = z.object({\n    body: zFoo3,\n    path: z.never().optional(),\n    query: z.never().optional()\n});\n\nexport type PostFooDataZodType = z.infer<typeof zPostFooData>;\n"
  },
  {
    "path": "packages/openapi-ts-tests/zod/v4/__snapshots__/3.1.x/v3/validators-union-merge/zod.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport { z } from 'zod/v3';\n\nexport const zContact = z.union([\n    z.object({\n        email: z.string()\n    }),\n    z.object({\n        phone: z.string()\n    })\n]);\n\nexport const zUser = zContact.and(z.object({\n    username: z.string()\n}));\n\nexport const zDogDetails = z.object({\n    breed: z.string(),\n    barkVolume: z.number().int().gte(1).lte(10)\n});\n\nexport const zCatDetails = z.object({\n    furLength: z.enum([\n        'short',\n        'medium',\n        'long'\n    ]),\n    purrs: z.boolean()\n});\n\nexport const zPetStore = z.object({\n    animals: z.array(z.object({\n        name: z.string(),\n        type: z.enum(['dog', 'cat']).optional(),\n        details: z.union([\n            zDogDetails,\n            zCatDetails\n        ])\n    }))\n});\n"
  },
  {
    "path": "packages/openapi-ts-tests/zod/v4/__snapshots__/3.1.x/v3/webhooks/zod.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport { z } from 'zod/v3';\n\nexport const zSessionUserPhoneCalloutRingingWebhookRequest = z.object({\n    body: z.object({\n        event: z.string(),\n        event_ts: z.coerce.bigint().min(BigInt('-9223372036854775808'), { message: 'Invalid value: Expected int64 to be >= -9223372036854775808' }).max(BigInt('9223372036854775807'), { message: 'Invalid value: Expected int64 to be <= 9223372036854775807' }),\n        payload: z.object({\n            account_id: z.string(),\n            object: z.object({\n                id: z.coerce.bigint().min(BigInt('-9223372036854775808'), { message: 'Invalid value: Expected int64 to be >= -9223372036854775808' }).max(BigInt('9223372036854775807'), { message: 'Invalid value: Expected int64 to be <= 9223372036854775807' }).optional(),\n                uuid: z.string().optional(),\n                session_id: z.string(),\n                session_name: z.string(),\n                session_key: z.string(),\n                user_key: z.string(),\n                host_id: z.string(),\n                participant: z.object({\n                    invitee_name: z.string(),\n                    phone_number: z.coerce.bigint().min(BigInt('-9223372036854775808'), { message: 'Invalid value: Expected int64 to be >= -9223372036854775808' }).max(BigInt('9223372036854775807'), { message: 'Invalid value: Expected int64 to be <= 9223372036854775807' }),\n                    from_number: z.coerce.bigint().min(BigInt('-9223372036854775808'), { message: 'Invalid value: Expected int64 to be >= -9223372036854775808' }).max(BigInt('9223372036854775807'), { message: 'Invalid value: Expected int64 to be <= 9223372036854775807' })\n                })\n            })\n        })\n    }).optional(),\n    path: z.never().optional(),\n    query: z.never().optional()\n});\n\nexport const zSessionUserRoomSystemCalloutRingingWebhookRequest = z.object({\n    body: z.object({\n        event: z.string(),\n        event_ts: z.coerce.bigint().min(BigInt('-9223372036854775808'), { message: 'Invalid value: Expected int64 to be >= -9223372036854775808' }).max(BigInt('9223372036854775807'), { message: 'Invalid value: Expected int64 to be <= 9223372036854775807' }),\n        payload: z.object({\n            account_id: z.string(),\n            object: z.object({\n                id: z.coerce.bigint().min(BigInt('-9223372036854775808'), { message: 'Invalid value: Expected int64 to be >= -9223372036854775808' }).max(BigInt('9223372036854775807'), { message: 'Invalid value: Expected int64 to be <= 9223372036854775807' }).optional(),\n                uuid: z.string().optional(),\n                session_id: z.string(),\n                session_name: z.string(),\n                host_id: z.string(),\n                message_id: z.string(),\n                inviter_name: z.string(),\n                participant: z.object({\n                    call_type: z.string(),\n                    device_ip: z.string()\n                })\n            })\n        })\n    }).optional(),\n    path: z.never().optional(),\n    query: z.never().optional()\n});\n\nexport const zSessionRecordingStartedWebhookRequest = z.object({\n    body: z.object({\n        event: z.enum(['session.recording_started']),\n        event_ts: z.coerce.bigint().min(BigInt('-9223372036854775808'), { message: 'Invalid value: Expected int64 to be >= -9223372036854775808' }).max(BigInt('9223372036854775807'), { message: 'Invalid value: Expected int64 to be <= 9223372036854775807' }),\n        payload: z.object({\n            account_id: z.string(),\n            object: z.object({\n                session_id: z.string(),\n                session_name: z.string(),\n                session_key: z.string(),\n                start_time: z.string().datetime(),\n                timezone: z.string(),\n                recording_file: z.object({\n                    recording_start: z.string().optional(),\n                    recording_end: z.string().optional()\n                })\n            })\n        })\n    }).optional(),\n    path: z.never().optional(),\n    query: z.never().optional()\n});\n\nexport const zSessionRecordingResumedWebhookRequest = z.object({\n    body: z.object({\n        event: z.enum(['session.recording_resumed']),\n        event_ts: z.coerce.bigint().min(BigInt('-9223372036854775808'), { message: 'Invalid value: Expected int64 to be >= -9223372036854775808' }).max(BigInt('9223372036854775807'), { message: 'Invalid value: Expected int64 to be <= 9223372036854775807' }),\n        payload: z.object({\n            account_id: z.string(),\n            object: z.object({\n                session_id: z.string(),\n                session_name: z.string(),\n                session_key: z.string(),\n                start_time: z.string().datetime(),\n                timezone: z.string(),\n                recording_file: z.object({\n                    recording_start: z.string().optional(),\n                    recording_end: z.string().optional()\n                })\n            })\n        })\n    }).optional(),\n    path: z.never().optional(),\n    query: z.never().optional()\n});\n\nexport const zSessionLiveStreamingStoppedWebhookRequest = z.object({\n    body: z.object({\n        event: z.enum(['session.live_streaming_stopped']),\n        event_ts: z.coerce.bigint().min(BigInt('-9223372036854775808'), { message: 'Invalid value: Expected int64 to be >= -9223372036854775808' }).max(BigInt('9223372036854775807'), { message: 'Invalid value: Expected int64 to be <= 9223372036854775807' }),\n        payload: z.object({\n            account_id: z.string(),\n            object: z.object({\n                id: z.string(),\n                session_id: z.string(),\n                session_name: z.string(),\n                session_key: z.string().optional(),\n                start_time: z.string().datetime(),\n                live_streaming: z.object({\n                    service: z.enum([\n                        'Facebook',\n                        'Workplace_by_Facebook',\n                        'YouTube',\n                        'Custom_Live_Streaming_Service'\n                    ]),\n                    custom_live_streaming_settings: z.object({\n                        stream_url: z.string(),\n                        stream_key: z.string(),\n                        page_url: z.string(),\n                        resolution: z.string().optional()\n                    }),\n                    date_time: z.string().datetime()\n                })\n            })\n        })\n    }).optional(),\n    path: z.never().optional(),\n    query: z.never().optional()\n});\n\nexport const zSessionStreamIngestionStoppedWebhookRequest = z.object({\n    body: z.object({\n        event: z.enum(['session.stream_ingestion_stopped']),\n        event_ts: z.coerce.bigint().min(BigInt('-9223372036854775808'), { message: 'Invalid value: Expected int64 to be >= -9223372036854775808' }).max(BigInt('9223372036854775807'), { message: 'Invalid value: Expected int64 to be <= 9223372036854775807' }),\n        payload: z.object({\n            account_id: z.string(),\n            object: z.object({\n                session_id: z.string(),\n                session_name: z.string(),\n                session_key: z.string().optional(),\n                stream_ingestion: z.object({\n                    stream_id: z.string(),\n                    stream_name: z.string(),\n                    stream_description: z.string().optional(),\n                    stream_key: z.string(),\n                    stream_url: z.string(),\n                    backup_stream_url: z.string()\n                })\n            })\n        })\n    }).optional(),\n    path: z.never().optional(),\n    query: z.never().optional()\n});\n\nexport const zSessionUserRoomSystemCalloutRejectedWebhookRequest = z.object({\n    body: z.object({\n        event: z.string(),\n        event_ts: z.coerce.bigint().min(BigInt('-9223372036854775808'), { message: 'Invalid value: Expected int64 to be >= -9223372036854775808' }).max(BigInt('9223372036854775807'), { message: 'Invalid value: Expected int64 to be <= 9223372036854775807' }),\n        payload: z.object({\n            account_id: z.string(),\n            object: z.object({\n                id: z.coerce.bigint().min(BigInt('-9223372036854775808'), { message: 'Invalid value: Expected int64 to be >= -9223372036854775808' }).max(BigInt('9223372036854775807'), { message: 'Invalid value: Expected int64 to be <= 9223372036854775807' }).optional(),\n                uuid: z.string().optional(),\n                session_id: z.string(),\n                session_name: z.string(),\n                host_id: z.string(),\n                message_id: z.string(),\n                inviter_name: z.string(),\n                participant: z.object({\n                    call_type: z.string(),\n                    device_ip: z.string()\n                })\n            })\n        })\n    }).optional(),\n    path: z.never().optional(),\n    query: z.never().optional()\n});\n\nexport const zSessionAlertWebhookRequest = z.object({\n    body: z.object({\n        event: z.enum(['session.alert']),\n        event_ts: z.coerce.bigint().min(BigInt('-9223372036854775808'), { message: 'Invalid value: Expected int64 to be >= -9223372036854775808' }).max(BigInt('9223372036854775807'), { message: 'Invalid value: Expected int64 to be <= 9223372036854775807' }),\n        payload: z.object({\n            account_id: z.string(),\n            object: z.object({\n                id: z.string(),\n                session_id: z.string(),\n                session_name: z.string(),\n                session_key: z.string().optional(),\n                issues: z.array(z.enum([\n                    'Unstable audio quality',\n                    'Unstable video quality',\n                    'Unstable screen share quality',\n                    'High CPU occupation',\n                    'Call Reconnection'\n                ]))\n            })\n        })\n    }).optional(),\n    path: z.never().optional(),\n    query: z.never().optional()\n});\n\nexport const zSessionSharingEndedWebhookRequest = z.object({\n    body: z.object({\n        event: z.enum(['session.sharing_ended']),\n        event_ts: z.coerce.bigint().min(BigInt('-9223372036854775808'), { message: 'Invalid value: Expected int64 to be >= -9223372036854775808' }).max(BigInt('9223372036854775807'), { message: 'Invalid value: Expected int64 to be <= 9223372036854775807' }),\n        payload: z.object({\n            account_id: z.string(),\n            object: z.object({\n                id: z.string(),\n                session_id: z.string(),\n                session_name: z.string(),\n                session_key: z.string().optional(),\n                user: z.object({\n                    id: z.string(),\n                    name: z.string(),\n                    user_key: z.string().optional(),\n                    sharing_details: z.object({\n                        content: z.enum([\n                            'application',\n                            'whiteboard',\n                            'desktop',\n                            'unknown'\n                        ]),\n                        date_time: z.string().datetime()\n                    })\n                })\n            })\n        })\n    }).optional(),\n    path: z.never().optional(),\n    query: z.never().optional()\n});\n\nexport const zSessionRecordingPausedWebhookRequest = z.object({\n    body: z.object({\n        event: z.enum(['session.recording_paused']),\n        event_ts: z.coerce.bigint().min(BigInt('-9223372036854775808'), { message: 'Invalid value: Expected int64 to be >= -9223372036854775808' }).max(BigInt('9223372036854775807'), { message: 'Invalid value: Expected int64 to be <= 9223372036854775807' }),\n        payload: z.object({\n            account_id: z.string(),\n            object: z.object({\n                session_id: z.string(),\n                session_name: z.string(),\n                session_key: z.string(),\n                start_time: z.string().datetime(),\n                timezone: z.string(),\n                recording_file: z.object({\n                    recording_start: z.string().optional(),\n                    recording_end: z.string().optional()\n                })\n            })\n        })\n    }).optional(),\n    path: z.never().optional(),\n    query: z.never().optional()\n});\n\nexport const zSessionEndedWebhookRequest = z.object({\n    body: z.object({\n        event: z.enum(['session.ended']),\n        event_ts: z.coerce.bigint().min(BigInt('-9223372036854775808'), { message: 'Invalid value: Expected int64 to be >= -9223372036854775808' }).max(BigInt('9223372036854775807'), { message: 'Invalid value: Expected int64 to be <= 9223372036854775807' }),\n        payload: z.object({\n            account_id: z.string(),\n            object: z.object({\n                id: z.string(),\n                session_id: z.string(),\n                session_name: z.string(),\n                session_key: z.string().optional(),\n                start_time: z.string().datetime(),\n                end_time: z.string().datetime()\n            })\n        })\n    }).optional(),\n    path: z.never().optional(),\n    query: z.never().optional()\n});\n\nexport const zSessionStartedWebhookRequest = z.object({\n    body: z.object({\n        event: z.enum(['session.started']),\n        event_ts: z.coerce.bigint().min(BigInt('-9223372036854775808'), { message: 'Invalid value: Expected int64 to be >= -9223372036854775808' }).max(BigInt('9223372036854775807'), { message: 'Invalid value: Expected int64 to be <= 9223372036854775807' }),\n        payload: z.object({\n            account_id: z.string(),\n            object: z.object({\n                id: z.string(),\n                session_id: z.string(),\n                session_name: z.string(),\n                session_key: z.string().optional(),\n                start_time: z.string().datetime()\n            })\n        })\n    }).optional(),\n    path: z.never().optional(),\n    query: z.never().optional()\n});\n\nexport const zSessionStreamIngestionUnbindWebhookRequest = z.object({\n    body: z.object({\n        event: z.enum(['session.stream_ingestion_unbind']),\n        event_ts: z.coerce.bigint().min(BigInt('-9223372036854775808'), { message: 'Invalid value: Expected int64 to be >= -9223372036854775808' }).max(BigInt('9223372036854775807'), { message: 'Invalid value: Expected int64 to be <= 9223372036854775807' }),\n        payload: z.object({\n            account_id: z.string(),\n            object: z.object({\n                session_id: z.string(),\n                session_name: z.string(),\n                session_key: z.string().optional(),\n                stream_ingestion: z.object({\n                    stream_id: z.string(),\n                    stream_name: z.string(),\n                    stream_description: z.string().optional(),\n                    stream_key: z.string(),\n                    stream_url: z.string(),\n                    backup_stream_url: z.string()\n                })\n            })\n        })\n    }).optional(),\n    path: z.never().optional(),\n    query: z.never().optional()\n});\n\nexport const zSessionLiveStreamingStartedWebhookRequest = z.object({\n    body: z.object({\n        event: z.enum(['session.live_streaming_started']),\n        event_ts: z.coerce.bigint().min(BigInt('-9223372036854775808'), { message: 'Invalid value: Expected int64 to be >= -9223372036854775808' }).max(BigInt('9223372036854775807'), { message: 'Invalid value: Expected int64 to be <= 9223372036854775807' }),\n        payload: z.object({\n            account_id: z.string(),\n            object: z.object({\n                id: z.string(),\n                session_id: z.string(),\n                session_name: z.string(),\n                session_key: z.string().optional(),\n                start_time: z.string().datetime(),\n                live_streaming: z.object({\n                    service: z.enum([\n                        'Facebook',\n                        'Workplace_by_Facebook',\n                        'YouTube',\n                        'Custom_Live_Streaming_Service'\n                    ]),\n                    custom_live_streaming_settings: z.object({\n                        stream_url: z.string(),\n                        stream_key: z.string(),\n                        page_url: z.string(),\n                        resolution: z.string().optional()\n                    }),\n                    date_time: z.string().datetime()\n                })\n            })\n        })\n    }).optional(),\n    path: z.never().optional(),\n    query: z.never().optional()\n});\n\nexport const zSessionUserRoomSystemCalloutMissedWebhookRequest = z.object({\n    body: z.object({\n        event: z.string(),\n        event_ts: z.coerce.bigint().min(BigInt('-9223372036854775808'), { message: 'Invalid value: Expected int64 to be >= -9223372036854775808' }).max(BigInt('9223372036854775807'), { message: 'Invalid value: Expected int64 to be <= 9223372036854775807' }),\n        payload: z.object({\n            account_id: z.string(),\n            object: z.object({\n                id: z.coerce.bigint().min(BigInt('-9223372036854775808'), { message: 'Invalid value: Expected int64 to be >= -9223372036854775808' }).max(BigInt('9223372036854775807'), { message: 'Invalid value: Expected int64 to be <= 9223372036854775807' }).optional(),\n                uuid: z.string().optional(),\n                session_id: z.string(),\n                session_name: z.string(),\n                host_id: z.string(),\n                message_id: z.string(),\n                inviter_name: z.string(),\n                participant: z.object({\n                    call_type: z.string(),\n                    device_ip: z.string()\n                })\n            })\n        })\n    }).optional(),\n    path: z.never().optional(),\n    query: z.never().optional()\n});\n\nexport const zSessionUserPhoneCalloutAcceptedWebhookRequest = z.object({\n    body: z.object({\n        event: z.string(),\n        event_ts: z.coerce.bigint().min(BigInt('-9223372036854775808'), { message: 'Invalid value: Expected int64 to be >= -9223372036854775808' }).max(BigInt('9223372036854775807'), { message: 'Invalid value: Expected int64 to be <= 9223372036854775807' }),\n        payload: z.object({\n            account_id: z.string(),\n            object: z.object({\n                id: z.coerce.bigint().min(BigInt('-9223372036854775808'), { message: 'Invalid value: Expected int64 to be >= -9223372036854775808' }).max(BigInt('9223372036854775807'), { message: 'Invalid value: Expected int64 to be <= 9223372036854775807' }).optional(),\n                uuid: z.string().optional(),\n                session_id: z.string(),\n                session_name: z.string(),\n                session_key: z.string(),\n                user_key: z.string(),\n                host_id: z.string(),\n                participant: z.object({\n                    invitee_name: z.string(),\n                    phone_number: z.coerce.bigint().min(BigInt('-9223372036854775808'), { message: 'Invalid value: Expected int64 to be >= -9223372036854775808' }).max(BigInt('9223372036854775807'), { message: 'Invalid value: Expected int64 to be <= 9223372036854775807' }),\n                    from_number: z.coerce.bigint().min(BigInt('-9223372036854775808'), { message: 'Invalid value: Expected int64 to be >= -9223372036854775808' }).max(BigInt('9223372036854775807'), { message: 'Invalid value: Expected int64 to be <= 9223372036854775807' })\n                })\n            })\n        })\n    }).optional(),\n    path: z.never().optional(),\n    query: z.never().optional()\n});\n\nexport const zSessionUserLeftWebhookRequest = z.object({\n    body: z.object({\n        event: z.enum(['session.user_left']),\n        event_ts: z.coerce.bigint().min(BigInt('-9223372036854775808'), { message: 'Invalid value: Expected int64 to be >= -9223372036854775808' }).max(BigInt('9223372036854775807'), { message: 'Invalid value: Expected int64 to be <= 9223372036854775807' }),\n        payload: z.object({\n            account_id: z.string(),\n            object: z.object({\n                id: z.string(),\n                session_id: z.string(),\n                session_name: z.string(),\n                session_key: z.string().optional(),\n                user: z.object({\n                    id: z.string(),\n                    name: z.string(),\n                    leave_time: z.string().datetime(),\n                    leave_reason: z.string().optional(),\n                    user_key: z.string().optional(),\n                    phone_number: z.string().optional(),\n                    participant_uuid: z.string()\n                })\n            })\n        })\n    }).optional(),\n    path: z.never().optional(),\n    query: z.never().optional()\n});\n\nexport const zSessionSharingStartedWebhookRequest = z.object({\n    body: z.object({\n        event: z.enum(['session.sharing_started']),\n        event_ts: z.coerce.bigint().min(BigInt('-9223372036854775808'), { message: 'Invalid value: Expected int64 to be >= -9223372036854775808' }).max(BigInt('9223372036854775807'), { message: 'Invalid value: Expected int64 to be <= 9223372036854775807' }),\n        payload: z.object({\n            account_id: z.string(),\n            object: z.object({\n                id: z.string(),\n                session_id: z.string(),\n                session_name: z.string(),\n                session_key: z.string().optional(),\n                user: z.object({\n                    id: z.string(),\n                    name: z.string(),\n                    user_key: z.string().optional(),\n                    sharing_details: z.object({\n                        content: z.enum([\n                            'application',\n                            'whiteboard',\n                            'desktop',\n                            'unknown'\n                        ]),\n                        date_time: z.string().datetime()\n                    })\n                })\n            })\n        })\n    }).optional(),\n    path: z.never().optional(),\n    query: z.never().optional()\n});\n\nexport const zSessionUserPhoneCalloutCanceledWebhookRequest = z.object({\n    body: z.object({\n        event: z.string(),\n        event_ts: z.coerce.bigint().min(BigInt('-9223372036854775808'), { message: 'Invalid value: Expected int64 to be >= -9223372036854775808' }).max(BigInt('9223372036854775807'), { message: 'Invalid value: Expected int64 to be <= 9223372036854775807' }),\n        payload: z.object({\n            account_id: z.string(),\n            object: z.object({\n                session_id: z.string(),\n                session_name: z.string(),\n                session_key: z.string(),\n                user_key: z.string(),\n                participant: z.object({\n                    invitee_name: z.string(),\n                    phone_number: z.coerce.bigint().min(BigInt('-9223372036854775808'), { message: 'Invalid value: Expected int64 to be >= -9223372036854775808' }).max(BigInt('9223372036854775807'), { message: 'Invalid value: Expected int64 to be <= 9223372036854775807' }),\n                    from_number: z.coerce.bigint().min(BigInt('-9223372036854775808'), { message: 'Invalid value: Expected int64 to be >= -9223372036854775808' }).max(BigInt('9223372036854775807'), { message: 'Invalid value: Expected int64 to be <= 9223372036854775807' })\n                })\n            })\n        })\n    }).optional(),\n    path: z.never().optional(),\n    query: z.never().optional()\n});\n\nexport const zSessionRecordingTranscriptCompletedWebhookRequest = z.object({\n    body: z.object({\n        event: z.enum(['session.recording_transcript_completed']),\n        event_ts: z.coerce.bigint().min(BigInt('-9223372036854775808'), { message: 'Invalid value: Expected int64 to be >= -9223372036854775808' }).max(BigInt('9223372036854775807'), { message: 'Invalid value: Expected int64 to be <= 9223372036854775807' }),\n        download_token: z.string(),\n        payload: z.object({\n            account_id: z.string(),\n            object: z.object({\n                session_id: z.string(),\n                session_name: z.string(),\n                session_key: z.string(),\n                start_time: z.string().datetime(),\n                timezone: z.string(),\n                recording_files: z.array(z.object({\n                    id: z.string().optional(),\n                    recording_start: z.string().optional(),\n                    recording_end: z.string().optional(),\n                    file_name: z.string().optional(),\n                    file_path: z.string().optional(),\n                    file_type: z.enum([\n                        'MP4',\n                        'M4A',\n                        'CHAT',\n                        'TRANSCRIPT',\n                        'CSV',\n                        'CC',\n                        'TB',\n                        'CHAT_MESSAGE',\n                        'TIMELINE'\n                    ]).optional(),\n                    file_size: z.number().optional(),\n                    file_extension: z.enum([\n                        'MP4',\n                        'M4A',\n                        'TXT',\n                        'VTT',\n                        'CSV',\n                        'JSON',\n                        'JPG'\n                    ]).optional(),\n                    download_url: z.string().optional(),\n                    status: z.enum(['completed']).optional(),\n                    recording_type: z.enum([\n                        'shared_screen_with_speaker_view(CC)',\n                        'shared_screen_with_speaker_view',\n                        'shared_screen_with_gallery_view',\n                        'gallery_view',\n                        'shared_screen',\n                        'audio_only',\n                        'audio_transcript',\n                        'chat_file',\n                        'active_speaker',\n                        'host_video',\n                        'audio_only_each_participant',\n                        'cc_transcript',\n                        'closed_caption',\n                        'poll',\n                        'timeline',\n                        'thumbnail',\n                        'chat_message'\n                    ]).optional()\n                }))\n            })\n        })\n    }).optional(),\n    path: z.never().optional(),\n    query: z.never().optional()\n});\n\nexport const zSessionRecordingDeletedWebhookRequest = z.object({\n    body: z.object({\n        event: z.enum(['session.recording_deleted']),\n        event_ts: z.coerce.bigint().min(BigInt('-9223372036854775808'), { message: 'Invalid value: Expected int64 to be >= -9223372036854775808' }).max(BigInt('9223372036854775807'), { message: 'Invalid value: Expected int64 to be <= 9223372036854775807' }),\n        payload: z.object({\n            account_id: z.string(),\n            operator: z.string().email(),\n            operator_id: z.string(),\n            object: z.object({\n                session_id: z.string(),\n                session_name: z.string(),\n                session_key: z.string(),\n                start_time: z.string().datetime(),\n                timezone: z.string()\n            })\n        })\n    }).optional(),\n    path: z.never().optional(),\n    query: z.never().optional()\n});\n\nexport const zSessionUserRoomSystemCalloutFailedWebhookRequest = z.object({\n    body: z.object({\n        event: z.string(),\n        event_ts: z.coerce.bigint().min(BigInt('-9223372036854775808'), { message: 'Invalid value: Expected int64 to be >= -9223372036854775808' }).max(BigInt('9223372036854775807'), { message: 'Invalid value: Expected int64 to be <= 9223372036854775807' }),\n        payload: z.object({\n            account_id: z.string(),\n            object: z.object({\n                id: z.coerce.bigint().min(BigInt('-9223372036854775808'), { message: 'Invalid value: Expected int64 to be >= -9223372036854775808' }).max(BigInt('9223372036854775807'), { message: 'Invalid value: Expected int64 to be <= 9223372036854775807' }).optional(),\n                uuid: z.string().optional(),\n                session_id: z.string(),\n                session_name: z.string(),\n                host_id: z.string(),\n                message_id: z.string(),\n                inviter_name: z.string(),\n                reason_type: z.union([\n                    z.literal(0),\n                    z.literal(1),\n                    z.literal(2),\n                    z.literal(3),\n                    z.literal(4),\n                    z.literal(7),\n                    z.literal(8),\n                    z.literal(9),\n                    z.literal(10),\n                    z.literal(11),\n                    z.literal(12),\n                    z.literal(13),\n                    z.literal(14)\n                ]),\n                participant: z.object({\n                    call_type: z.string(),\n                    device_ip: z.string()\n                })\n            })\n        })\n    }).optional(),\n    path: z.never().optional(),\n    query: z.never().optional()\n});\n\nexport const zSessionRecordingCompletedWebhookRequest = z.object({\n    body: z.object({\n        event: z.enum(['session.recording_completed']),\n        event_ts: z.coerce.bigint().min(BigInt('-9223372036854775808'), { message: 'Invalid value: Expected int64 to be >= -9223372036854775808' }).max(BigInt('9223372036854775807'), { message: 'Invalid value: Expected int64 to be <= 9223372036854775807' }),\n        download_token: z.string(),\n        payload: z.object({\n            account_id: z.string(),\n            object: z.object({\n                session_id: z.string(),\n                session_name: z.string(),\n                session_key: z.string(),\n                start_time: z.string().datetime(),\n                timezone: z.string(),\n                recording_files: z.array(z.object({\n                    id: z.string().optional(),\n                    recording_start: z.string().optional(),\n                    recording_end: z.string().optional(),\n                    file_name: z.string().optional(),\n                    file_path: z.string().optional(),\n                    file_type: z.enum([\n                        'MP4',\n                        'M4A',\n                        'CHAT',\n                        'TRANSCRIPT',\n                        'CSV',\n                        'CC',\n                        'TB',\n                        'CHAT_MESSAGE'\n                    ]).optional(),\n                    file_size: z.number().optional(),\n                    file_extension: z.enum([\n                        'MP4',\n                        'M4A',\n                        'TXT',\n                        'VTT',\n                        'CSV',\n                        'JSON',\n                        'JPG'\n                    ]).optional(),\n                    download_url: z.string().optional(),\n                    status: z.enum(['completed']).optional(),\n                    recording_type: z.enum([\n                        'shared_screen_with_speaker_view(CC)',\n                        'shared_screen_with_speaker_view',\n                        'shared_screen_with_gallery_view',\n                        'gallery_view',\n                        'shared_screen',\n                        'audio_only',\n                        'audio_transcript',\n                        'chat_file',\n                        'active_speaker',\n                        'host_video',\n                        'audio_only_each_participant',\n                        'cc_transcript',\n                        'closed_caption',\n                        'poll',\n                        'timeline',\n                        'thumbnail',\n                        'chat_message'\n                    ]).optional()\n                })),\n                participant_audio_files: z.array(z.object({\n                    id: z.string().optional(),\n                    recording_start: z.string().optional(),\n                    recording_end: z.string().optional(),\n                    file_name: z.string().optional(),\n                    file_path: z.string().optional(),\n                    file_type: z.enum([\n                        'MP4',\n                        'M4A',\n                        'CHAT',\n                        'TRANSCRIPT',\n                        'CSV',\n                        'CC',\n                        'TB',\n                        'CHAT_MESSAGE'\n                    ]).optional(),\n                    file_size: z.number().optional(),\n                    file_extension: z.enum([\n                        'MP4',\n                        'M4A',\n                        'TXT',\n                        'VTT',\n                        'CSV',\n                        'JSON',\n                        'JPG'\n                    ]).optional(),\n                    download_url: z.string().optional(),\n                    status: z.enum(['completed']).optional(),\n                    recording_type: z.enum([\n                        'shared_screen_with_speaker_view(CC)',\n                        'shared_screen_with_speaker_view',\n                        'shared_screen_with_gallery_view',\n                        'gallery_view',\n                        'shared_screen',\n                        'audio_only',\n                        'audio_transcript',\n                        'chat_file',\n                        'active_speaker',\n                        'host_video',\n                        'audio_only_each_participant',\n                        'cc_transcript',\n                        'closed_caption',\n                        'poll',\n                        'timeline',\n                        'thumbnail',\n                        'chat_message'\n                    ]).optional(),\n                    user_id: z.string().optional(),\n                    user_key: z.string().optional()\n                })).optional(),\n                participant_video_files: z.array(z.object({\n                    id: z.string().optional(),\n                    recording_start: z.string().optional(),\n                    recording_end: z.string().optional(),\n                    file_name: z.string().optional(),\n                    file_path: z.string().optional(),\n                    file_type: z.enum(['MP4']).optional(),\n                    file_size: z.number().optional(),\n                    file_extension: z.enum(['MP4']).optional(),\n                    download_url: z.string().optional(),\n                    status: z.enum(['completed']).optional(),\n                    recording_type: z.enum(['individual_user', 'individual_shared_screen']).optional(),\n                    user_id: z.string().optional(),\n                    user_key: z.string().optional()\n                })).optional()\n            })\n        })\n    }).optional(),\n    path: z.never().optional(),\n    query: z.never().optional()\n});\n\nexport const zSessionRecordingTranscriptFailedWebhookRequest = z.object({\n    body: z.object({\n        event: z.enum(['session.recording_transcript_failed']),\n        event_ts: z.coerce.bigint().min(BigInt('-9223372036854775808'), { message: 'Invalid value: Expected int64 to be >= -9223372036854775808' }).max(BigInt('9223372036854775807'), { message: 'Invalid value: Expected int64 to be <= 9223372036854775807' }),\n        payload: z.object({\n            account_id: z.string(),\n            object: z.object({\n                session_id: z.string(),\n                session_name: z.string(),\n                session_key: z.string(),\n                start_time: z.string().datetime(),\n                timezone: z.string()\n            })\n        })\n    }).optional(),\n    path: z.never().optional(),\n    query: z.never().optional()\n});\n\nexport const zSessionRecordingTrashedWebhookRequest = z.object({\n    body: z.object({\n        event: z.enum(['session.recording_trashed']),\n        event_ts: z.coerce.bigint().min(BigInt('-9223372036854775808'), { message: 'Invalid value: Expected int64 to be >= -9223372036854775808' }).max(BigInt('9223372036854775807'), { message: 'Invalid value: Expected int64 to be <= 9223372036854775807' }),\n        payload: z.object({\n            account_id: z.string(),\n            operator: z.string().email(),\n            operator_id: z.string(),\n            object: z.object({\n                session_id: z.string(),\n                session_name: z.string(),\n                session_key: z.string(),\n                start_time: z.string().datetime(),\n                timezone: z.string()\n            })\n        })\n    }).optional(),\n    path: z.never().optional(),\n    query: z.never().optional()\n});\n\nexport const zSessionUserJoinedWebhookRequest = z.object({\n    body: z.object({\n        event: z.enum(['session.user_joined']),\n        event_ts: z.coerce.bigint().min(BigInt('-9223372036854775808'), { message: 'Invalid value: Expected int64 to be >= -9223372036854775808' }).max(BigInt('9223372036854775807'), { message: 'Invalid value: Expected int64 to be <= 9223372036854775807' }),\n        payload: z.object({\n            account_id: z.string(),\n            object: z.object({\n                id: z.string(),\n                session_id: z.string(),\n                session_name: z.string(),\n                session_key: z.string().optional(),\n                user: z.object({\n                    id: z.string(),\n                    name: z.string(),\n                    join_time: z.string().datetime(),\n                    user_key: z.string().optional(),\n                    phone_number: z.string().optional(),\n                    participant_uuid: z.string()\n                })\n            })\n        })\n    }).optional(),\n    path: z.never().optional(),\n    query: z.never().optional()\n});\n\nexport const zSessionStreamIngestionStartedWebhookRequest = z.object({\n    body: z.object({\n        event: z.enum(['session.stream_ingestion_started']),\n        event_ts: z.coerce.bigint().min(BigInt('-9223372036854775808'), { message: 'Invalid value: Expected int64 to be >= -9223372036854775808' }).max(BigInt('9223372036854775807'), { message: 'Invalid value: Expected int64 to be <= 9223372036854775807' }),\n        payload: z.object({\n            account_id: z.string(),\n            object: z.object({\n                session_id: z.string(),\n                session_name: z.string(),\n                session_key: z.string().optional(),\n                stream_ingestion: z.object({\n                    stream_id: z.string(),\n                    stream_name: z.string(),\n                    stream_description: z.string().optional(),\n                    stream_key: z.string(),\n                    stream_url: z.string(),\n                    backup_stream_url: z.string()\n                })\n            })\n        })\n    }).optional(),\n    path: z.never().optional(),\n    query: z.never().optional()\n});\n\nexport const zSessionStreamIngestionConnectedWebhookRequest = z.object({\n    body: z.object({\n        event: z.enum(['session.stream_ingestion_connected']),\n        event_ts: z.coerce.bigint().min(BigInt('-9223372036854775808'), { message: 'Invalid value: Expected int64 to be >= -9223372036854775808' }).max(BigInt('9223372036854775807'), { message: 'Invalid value: Expected int64 to be <= 9223372036854775807' }),\n        payload: z.object({\n            account_id: z.string(),\n            object: z.object({\n                session_id: z.string(),\n                session_name: z.string(),\n                session_key: z.string().optional(),\n                stream_ingestion: z.object({\n                    stream_id: z.string(),\n                    stream_name: z.string(),\n                    stream_description: z.string().optional(),\n                    stream_key: z.string(),\n                    stream_url: z.string(),\n                    backup_stream_url: z.string()\n                })\n            })\n        })\n    }).optional(),\n    path: z.never().optional(),\n    query: z.never().optional()\n});\n\nexport const zSessionStreamIngestionDisconnectedWebhookRequest = z.object({\n    body: z.object({\n        event: z.enum(['session.stream_ingestion_disconnected']),\n        event_ts: z.coerce.bigint().min(BigInt('-9223372036854775808'), { message: 'Invalid value: Expected int64 to be >= -9223372036854775808' }).max(BigInt('9223372036854775807'), { message: 'Invalid value: Expected int64 to be <= 9223372036854775807' }),\n        payload: z.object({\n            account_id: z.string(),\n            object: z.object({\n                session_id: z.string(),\n                session_name: z.string(),\n                session_key: z.string().optional(),\n                stream_ingestion: z.object({\n                    stream_id: z.string(),\n                    stream_name: z.string(),\n                    stream_description: z.string().optional(),\n                    stream_key: z.string(),\n                    stream_url: z.string(),\n                    backup_stream_url: z.string()\n                })\n            })\n        })\n    }).optional(),\n    path: z.never().optional(),\n    query: z.never().optional()\n});\n\nexport const zSessionRecordingRecoveredWebhookRequest = z.object({\n    body: z.object({\n        event: z.enum(['session.recording_recovered']),\n        event_ts: z.coerce.bigint().min(BigInt('-9223372036854775808'), { message: 'Invalid value: Expected int64 to be >= -9223372036854775808' }).max(BigInt('9223372036854775807'), { message: 'Invalid value: Expected int64 to be <= 9223372036854775807' }),\n        payload: z.object({\n            account_id: z.string(),\n            operator: z.string().email(),\n            operator_id: z.string(),\n            object: z.object({\n                session_id: z.string(),\n                session_name: z.string(),\n                session_key: z.string(),\n                start_time: z.string().datetime(),\n                timezone: z.string()\n            })\n        })\n    }).optional(),\n    path: z.never().optional(),\n    query: z.never().optional()\n});\n\nexport const zSessionUserPhoneCalloutMissedWebhookRequest = z.object({\n    body: z.object({\n        event: z.string(),\n        event_ts: z.coerce.bigint().min(BigInt('-9223372036854775808'), { message: 'Invalid value: Expected int64 to be >= -9223372036854775808' }).max(BigInt('9223372036854775807'), { message: 'Invalid value: Expected int64 to be <= 9223372036854775807' }),\n        payload: z.object({\n            account_id: z.string(),\n            object: z.object({\n                id: z.coerce.bigint().min(BigInt('-9223372036854775808'), { message: 'Invalid value: Expected int64 to be >= -9223372036854775808' }).max(BigInt('9223372036854775807'), { message: 'Invalid value: Expected int64 to be <= 9223372036854775807' }).optional(),\n                uuid: z.string().optional(),\n                session_id: z.string(),\n                session_name: z.string(),\n                session_key: z.string(),\n                user_key: z.string(),\n                host_id: z.string(),\n                participant: z.object({\n                    invitee_name: z.string(),\n                    phone_number: z.coerce.bigint().min(BigInt('-9223372036854775808'), { message: 'Invalid value: Expected int64 to be >= -9223372036854775808' }).max(BigInt('9223372036854775807'), { message: 'Invalid value: Expected int64 to be <= 9223372036854775807' }),\n                    from_number: z.coerce.bigint().min(BigInt('-9223372036854775808'), { message: 'Invalid value: Expected int64 to be >= -9223372036854775808' }).max(BigInt('9223372036854775807'), { message: 'Invalid value: Expected int64 to be <= 9223372036854775807' })\n                })\n            })\n        })\n    }).optional(),\n    path: z.never().optional(),\n    query: z.never().optional()\n});\n\nexport const zSessionUserPhoneCalloutRejectedWebhookRequest = z.object({\n    body: z.object({\n        event: z.string(),\n        event_ts: z.coerce.bigint().min(BigInt('-9223372036854775808'), { message: 'Invalid value: Expected int64 to be >= -9223372036854775808' }).max(BigInt('9223372036854775807'), { message: 'Invalid value: Expected int64 to be <= 9223372036854775807' }),\n        payload: z.object({\n            account_id: z.string(),\n            object: z.object({\n                id: z.coerce.bigint().min(BigInt('-9223372036854775808'), { message: 'Invalid value: Expected int64 to be >= -9223372036854775808' }).max(BigInt('9223372036854775807'), { message: 'Invalid value: Expected int64 to be <= 9223372036854775807' }).optional(),\n                uuid: z.string().optional(),\n                session_id: z.string(),\n                session_name: z.string(),\n                session_key: z.string(),\n                user_key: z.string(),\n                host_id: z.string(),\n                participant: z.object({\n                    invitee_name: z.string(),\n                    phone_number: z.coerce.bigint().min(BigInt('-9223372036854775808'), { message: 'Invalid value: Expected int64 to be >= -9223372036854775808' }).max(BigInt('9223372036854775807'), { message: 'Invalid value: Expected int64 to be <= 9223372036854775807' }),\n                    from_number: z.coerce.bigint().min(BigInt('-9223372036854775808'), { message: 'Invalid value: Expected int64 to be >= -9223372036854775808' }).max(BigInt('9223372036854775807'), { message: 'Invalid value: Expected int64 to be <= 9223372036854775807' })\n                })\n            })\n        })\n    }).optional(),\n    path: z.never().optional(),\n    query: z.never().optional()\n});\n\nexport const zSessionUserRoomSystemCalloutAcceptedWebhookRequest = z.object({\n    body: z.object({\n        event: z.string(),\n        event_ts: z.coerce.bigint().min(BigInt('-9223372036854775808'), { message: 'Invalid value: Expected int64 to be >= -9223372036854775808' }).max(BigInt('9223372036854775807'), { message: 'Invalid value: Expected int64 to be <= 9223372036854775807' }),\n        payload: z.object({\n            account_id: z.string(),\n            object: z.object({\n                id: z.coerce.bigint().min(BigInt('-9223372036854775808'), { message: 'Invalid value: Expected int64 to be >= -9223372036854775808' }).max(BigInt('9223372036854775807'), { message: 'Invalid value: Expected int64 to be <= 9223372036854775807' }).optional(),\n                uuid: z.string().optional(),\n                session_id: z.string(),\n                session_name: z.string(),\n                host_id: z.string(),\n                message_id: z.string(),\n                inviter_name: z.string(),\n                participant: z.object({\n                    call_type: z.string(),\n                    device_ip: z.string()\n                })\n            })\n        })\n    }).optional(),\n    path: z.never().optional(),\n    query: z.never().optional()\n});\n\nexport const zSessionRecordingStoppedWebhookRequest = z.object({\n    body: z.object({\n        event: z.enum(['session.recording_stopped']),\n        event_ts: z.coerce.bigint().min(BigInt('-9223372036854775808'), { message: 'Invalid value: Expected int64 to be >= -9223372036854775808' }).max(BigInt('9223372036854775807'), { message: 'Invalid value: Expected int64 to be <= 9223372036854775807' }),\n        payload: z.object({\n            account_id: z.string(),\n            object: z.object({\n                session_id: z.string(),\n                session_name: z.string(),\n                session_key: z.string(),\n                start_time: z.string().datetime(),\n                timezone: z.string(),\n                recording_file: z.object({\n                    recording_start: z.string().optional(),\n                    recording_end: z.string().optional()\n                })\n            })\n        })\n    }).optional(),\n    path: z.never().optional(),\n    query: z.never().optional()\n});\n"
  },
  {
    "path": "packages/openapi-ts-tests/zod/v4/__snapshots__/3.1.x/v4/array-items-all-of/zod.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport * as z from 'zod';\n\nexport const zArrayWithAllOfObjects = z.array(z.object({\n    id: z.int().optional()\n}).and(z.object({\n    name: z.string().optional()\n})));\n\nexport const zArrayWithAllOfPrimitives = z.array(z.intersection(z.number(), z.string()));\n\nexport const zBaseModel = z.object({\n    id: z.int().optional(),\n    createdAt: z.iso.datetime().optional()\n});\n\nexport const zArrayWithAllOfRefs = z.array(zBaseModel.and(z.object({\n    extra: z.string().optional()\n})));\n"
  },
  {
    "path": "packages/openapi-ts-tests/zod/v4/__snapshots__/3.1.x/v4/array-items-one-of-length-1/zod.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport * as z from 'zod';\n\nexport const zBar = z.string();\n\nexport const zFoo = z.object({\n    foo: z.array(zBar).min(1).max(2147483647).optional()\n});\n"
  },
  {
    "path": "packages/openapi-ts-tests/zod/v4/__snapshots__/3.1.x/v4/default/zod.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport * as z from 'zod';\n\n/**\n * Model with number-only name\n */\nexport const z400 = z.string();\n\n/**\n * Testing multiline comments in string: First line\n * Second line\n *\n * Fourth line\n */\nexport const zCamelCaseCommentWithBreaks = z.int();\n\n/**\n * Testing multiline comments in string: First line\n * Second line\n *\n * Fourth line\n */\nexport const zCommentWithBreaks = z.int();\n\n/**\n * Testing backticks in string: `backticks` and ```multiple backticks``` should work\n */\nexport const zCommentWithBackticks = z.int();\n\n/**\n * Testing backticks and quotes in string: `backticks`, 'quotes', \"double quotes\" and ```multiple backticks``` should work\n */\nexport const zCommentWithBackticksAndQuotes = z.int();\n\n/**\n * Testing slashes in string: \\backwards\\\\\\ and /forwards/// should work\n */\nexport const zCommentWithSlashes = z.int();\n\n/**\n * Testing expression placeholders in string: ${expression} should work\n */\nexport const zCommentWithExpressionPlaceholders = z.int();\n\n/**\n * Testing quotes in string: 'single quote''' and \"double quotes\"\"\" should work\n */\nexport const zCommentWithQuotes = z.int();\n\n/**\n * Testing reserved characters in string: * inline * and ** inline ** should work\n */\nexport const zCommentWithReservedCharacters = z.int();\n\n/**\n * This is a simple number\n */\nexport const zSimpleInteger = z.int();\n\n/**\n * This is a simple boolean\n */\nexport const zSimpleBoolean = z.boolean();\n\n/**\n * This is a simple string\n */\nexport const zSimpleString = z.string();\n\n/**\n * A string with non-ascii (unicode) characters valid in typescript identifiers (æøåÆØÅöÔèÈ字符串)\n */\nexport const zNonAsciiStringæøåÆøÅöôêÊ字符串 = z.string();\n\n/**\n * This is a simple file\n */\nexport const zSimpleFile = z.string();\n\n/**\n * This is a simple string\n */\nexport const zSimpleStringWithPattern = z.string().max(64).regex(/^[a-zA-Z0-9_]*$/).nullable();\n\n/**\n * This is a simple enum with strings\n */\nexport const zEnumWithStrings = z.enum([\n    'Success',\n    'Warning',\n    'Error',\n    '\\'Single Quote\\'',\n    '\"Double Quotes\"',\n    'Non-ascii: øæåôöØÆÅÔÖ字符串'\n]);\n\nexport const zEnumWithReplacedCharacters = z.union([\n    z.literal('\\'Single Quote\\''),\n    z.literal('\"Double Quotes\"'),\n    z.literal('øæåôöØÆÅÔÖ字符串'),\n    z.literal(3.1),\n    z.literal('')\n]);\n\n/**\n * This is a simple enum with numbers\n */\nexport const zEnumWithNumbers = z.union([\n    z.literal(1),\n    z.literal(2),\n    z.literal(3),\n    z.literal(1.1),\n    z.literal(1.2),\n    z.literal(1.3),\n    z.literal(100),\n    z.literal(200),\n    z.literal(300),\n    z.literal(-100),\n    z.literal(-200),\n    z.literal(-300),\n    z.literal(-1.1),\n    z.literal(-1.2),\n    z.literal(-1.3)\n]);\n\n/**\n * Success=1,Warning=2,Error=3\n */\nexport const zEnumFromDescription = z.number();\n\n/**\n * This is a simple enum with numbers\n */\nexport const zEnumWithExtensions = z.union([\n    z.literal(200),\n    z.literal(400),\n    z.literal(500)\n]);\n\nexport const zEnumWithXEnumNames = z.union([\n    z.literal(0),\n    z.literal(1),\n    z.literal(2)\n]);\n\n/**\n * This is a simple array with numbers\n */\nexport const zArrayWithNumbers = z.array(z.int());\n\n/**\n * This is a simple array with booleans\n */\nexport const zArrayWithBooleans = z.array(z.boolean());\n\n/**\n * This is a simple array with strings\n */\nexport const zArrayWithStrings = z.array(z.string()).default(['test']);\n\n/**\n * This is a simple array with properties\n */\nexport const zArrayWithProperties = z.array(z.object({\n    '16x16': zCamelCaseCommentWithBreaks.optional(),\n    bar: z.string().optional()\n}));\n\n/**\n * This is a simple array with any of properties\n */\nexport const zArrayWithAnyOfProperties = z.array(z.union([z.object({\n        foo: z.string().optional().default('test')\n    }), z.object({\n        bar: z.string().optional()\n    })]));\n\nexport const zAnyOfAnyAndNull = z.object({\n    data: z.unknown().nullish()\n});\n\n/**\n * This is a simple array with any of properties\n */\nexport const zAnyOfArrays = z.object({\n    results: z.array(z.union([z.object({\n            foo: z.string().optional()\n        }), z.object({\n            bar: z.string().optional()\n        })])).optional()\n});\n\n/**\n * This is a string dictionary\n */\nexport const zDictionaryWithString = z.record(z.string(), z.string());\n\nexport const zDictionaryWithPropertiesAndAdditionalProperties = z.object({\n    foo: z.number().optional(),\n    bar: z.boolean().optional()\n});\n\n/**\n * This is a string dictionary\n */\nexport const zDictionaryWithDictionary = z.record(z.string(), z.record(z.string(), z.string()));\n\n/**\n * This is a complex dictionary\n */\nexport const zDictionaryWithProperties = z.record(z.string(), z.object({\n    foo: z.string().optional(),\n    bar: z.string().optional()\n}));\n\n/**\n * This is a model with one number property\n */\nexport const zModelWithInteger = z.object({\n    prop: z.int().optional()\n});\n\n/**\n * This is a model with one boolean property\n */\nexport const zModelWithBoolean = z.object({\n    prop: z.boolean().optional()\n});\n\n/**\n * This is a model with one string property\n */\nexport const zModelWithString = z.object({\n    prop: z.string().optional()\n});\n\n/**\n * This is a simple reference\n */\nexport const zSimpleReference = zModelWithString;\n\n/**\n * This is a simple array with references\n */\nexport const zArrayWithReferences = z.array(zModelWithString);\n\n/**\n * This is a simple array containing an array\n */\nexport const zArrayWithArray = z.array(z.array(zModelWithString));\n\n/**\n * This is a string reference\n */\nexport const zDictionaryWithReference = z.record(z.string(), zModelWithString);\n\n/**\n * This is a complex dictionary\n */\nexport const zDictionaryWithArray = z.record(z.string(), z.array(zModelWithString));\n\n/**\n * This is a model with one string property\n */\nexport const zModelWithStringError = z.object({\n    prop: z.string().optional()\n});\n\n/**\n * `Comment` or `VoiceComment`. The JSON object for adding voice comments to tickets is different. See [Adding voice comments to tickets](/documentation/ticketing/managing-tickets/adding-voice-comments-to-tickets)\n */\nexport const zModelFromZendesk = z.string();\n\n/**\n * This is a model with one string property\n */\nexport const zModelWithNullableString = z.object({\n    nullableProp1: z.string().nullish(),\n    nullableRequiredProp1: z.string().nullable(),\n    nullableProp2: z.string().nullish(),\n    nullableRequiredProp2: z.string().nullable(),\n    'foo_bar-enum': z.enum([\n        'Success',\n        'Warning',\n        'Error',\n        'ØÆÅ字符串'\n    ]).optional()\n});\n\n/**\n * This is a model with one enum\n */\nexport const zModelWithEnum = z.object({\n    'foo_bar-enum': z.enum([\n        'Success',\n        'Warning',\n        'Error',\n        'ØÆÅ字符串'\n    ]).optional(),\n    statusCode: z.enum([\n        '100',\n        '200 FOO',\n        '300 FOO_BAR',\n        '400 foo-bar',\n        '500 foo.bar',\n        '600 foo&bar'\n    ]).optional(),\n    bool: z.literal(true).optional()\n});\n\n/**\n * This is a model with one enum with escaped name\n */\nexport const zModelWithEnumWithHyphen = z.object({\n    'foo-bar-baz-qux': z.enum(['3.0']).optional()\n});\n\n/**\n * This is a model with one enum\n */\nexport const zModelWithEnumFromDescription = z.object({\n    test: z.int().optional()\n});\n\n/**\n * This is a model with nested enums\n */\nexport const zModelWithNestedEnums = z.object({\n    dictionaryWithEnum: z.record(z.string(), z.enum([\n        'Success',\n        'Warning',\n        'Error'\n    ])).optional(),\n    dictionaryWithEnumFromDescription: z.record(z.string(), z.int()).optional(),\n    arrayWithEnum: z.array(z.enum([\n        'Success',\n        'Warning',\n        'Error'\n    ])).optional(),\n    arrayWithDescription: z.array(z.int()).optional(),\n    'foo_bar-enum': z.enum([\n        'Success',\n        'Warning',\n        'Error',\n        'ØÆÅ字符串'\n    ]).optional()\n});\n\n/**\n * This is a model with one property containing an array\n */\nexport const zModelWithArray = z.object({\n    prop: z.array(zModelWithString).optional(),\n    propWithFile: z.array(z.string()).optional(),\n    propWithNumber: z.array(z.number()).optional()\n});\n\n/**\n * This is a model with one property containing a dictionary\n */\nexport const zModelWithDictionary = z.object({\n    prop: z.record(z.string(), z.string()).optional()\n});\n\n/**\n * This is a deprecated model with a deprecated property\n *\n * @deprecated\n */\nexport const zDeprecatedModel = z.object({\n    prop: z.string().optional()\n});\n\n/**\n * This is a model with one property containing a circular reference\n */\nexport const zModelWithCircularReference = z.object({\n    prop: z.lazy((): any => zModelWithCircularReference).optional()\n});\n\n/**\n * This is a model with one property with a 'one of' relationship\n */\nexport const zCompositionWithOneOf = z.object({\n    propA: z.union([\n        zModelWithString,\n        zModelWithEnum,\n        zModelWithArray,\n        zModelWithDictionary\n    ]).optional()\n});\n\n/**\n * This is a model with one property with a 'one of' relationship where the options are not $ref\n */\nexport const zCompositionWithOneOfAnonymous = z.object({\n    propA: z.union([\n        z.object({\n            propA: z.string().optional()\n        }),\n        z.string(),\n        z.int()\n    ]).optional()\n});\n\n/**\n * Circle\n */\nexport const zModelCircle = z.object({\n    kind: z.string(),\n    radius: z.number().optional()\n});\n\n/**\n * Square\n */\nexport const zModelSquare = z.object({\n    kind: z.string(),\n    sideLength: z.number().optional()\n});\n\n/**\n * This is a model with one property with a 'one of' relationship where the options are not $ref\n */\nexport const zCompositionWithOneOfDiscriminator = z.union([\n    z.object({\n        kind: z.literal('circle')\n    }).and(zModelCircle),\n    z.object({\n        kind: z.literal('square')\n    }).and(zModelSquare)\n]);\n\n/**\n * This is a model with one property with a 'any of' relationship\n */\nexport const zCompositionWithAnyOf = z.object({\n    propA: z.union([\n        zModelWithString,\n        zModelWithEnum,\n        zModelWithArray,\n        zModelWithDictionary\n    ]).optional()\n});\n\n/**\n * This is a model with one property with a 'any of' relationship where the options are not $ref\n */\nexport const zCompositionWithAnyOfAnonymous = z.object({\n    propA: z.union([\n        z.object({\n            propA: z.string().optional()\n        }),\n        z.string(),\n        z.int()\n    ]).optional()\n});\n\n/**\n * This is a model with nested 'any of' property with a type null\n */\nexport const zCompositionWithNestedAnyAndTypeNull = z.object({\n    propA: z.union([\n        z.array(z.union([zModelWithDictionary, z.null()])),\n        z.array(z.union([zModelWithArray, z.null()]))\n    ]).optional()\n});\n\nexport const z3eNum1Период = z.enum(['Bird', 'Dog']);\n\nexport const zConstValue = z.literal('ConstValue');\n\n/**\n * This is a model with one property with a 'any of' relationship where the options are not $ref\n */\nexport const zCompositionWithNestedAnyOfAndNull = z.object({\n    propA: z.array(z.union([z3eNum1Период, zConstValue])).nullish()\n});\n\n/**\n * This is a model with one property with a 'one of' relationship\n */\nexport const zCompositionWithOneOfAndNullable = z.object({\n    propA: z.union([\n        z.object({\n            boolean: z.boolean().optional()\n        }),\n        zModelWithEnum,\n        zModelWithArray,\n        zModelWithDictionary\n    ]).nullish()\n});\n\n/**\n * This is a model that contains a simple dictionary within composition\n */\nexport const zCompositionWithOneOfAndSimpleDictionary = z.object({\n    propA: z.union([\n        z.boolean(),\n        z.record(z.string(), z.number())\n    ]).optional()\n});\n\n/**\n * This is a model that contains a dictionary of simple arrays within composition\n */\nexport const zCompositionWithOneOfAndSimpleArrayDictionary = z.object({\n    propA: z.union([\n        z.boolean(),\n        z.record(z.string(), z.array(z.boolean()))\n    ]).optional()\n});\n\n/**\n * This is a model that contains a dictionary of complex arrays (composited) within composition\n */\nexport const zCompositionWithOneOfAndComplexArrayDictionary = z.object({\n    propA: z.union([\n        z.boolean(),\n        z.record(z.string(), z.array(z.union([z.number(), z.string()])))\n    ]).optional()\n});\n\n/**\n * This is a model with one property with a 'all of' relationship\n */\nexport const zCompositionWithAllOfAndNullable = z.object({\n    propA: z.object({\n        boolean: z.boolean().optional()\n    }).and(zModelWithEnum).and(zModelWithArray).and(zModelWithDictionary).nullish()\n});\n\n/**\n * This is a model with one property with a 'any of' relationship\n */\nexport const zCompositionWithAnyOfAndNullable = z.object({\n    propA: z.union([\n        z.object({\n            boolean: z.boolean().optional()\n        }),\n        zModelWithEnum,\n        zModelWithArray,\n        zModelWithDictionary\n    ]).nullish()\n});\n\n/**\n * This is a base model with two simple optional properties\n */\nexport const zCompositionBaseModel = z.object({\n    firstName: z.string().optional(),\n    lastname: z.string().optional()\n});\n\n/**\n * This is a model that extends the base model\n */\nexport const zCompositionExtendedModel = zCompositionBaseModel.and(z.object({\n    age: z.number(),\n    firstName: z.string(),\n    lastname: z.string()\n}));\n\n/**\n * This is a model with one nested property\n */\nexport const zModelWithProperties = z.object({\n    required: z.string(),\n    requiredAndReadOnly: z.string().readonly(),\n    requiredAndNullable: z.string().nullable(),\n    string: z.string().optional(),\n    number: z.number().optional(),\n    boolean: z.boolean().optional(),\n    reference: zModelWithString.optional(),\n    'property with space': z.string().optional(),\n    default: z.string().optional(),\n    try: z.string().optional(),\n    '@namespace.string': z.string().readonly().optional(),\n    '@namespace.integer': z.int().readonly().optional()\n});\n\n/**\n * This is a model with one property containing a reference\n */\nexport const zModelWithReference = z.object({\n    prop: zModelWithProperties.optional()\n});\n\n/**\n * This is a model with one nested property\n */\nexport const zModelWithNestedProperties = z.object({\n    first: z.object({\n        second: z.object({\n            third: z.string().readonly().nullable()\n        }).readonly().nullable()\n    }).readonly().nullable()\n});\n\n/**\n * This is a model with duplicated properties\n */\nexport const zModelWithDuplicateProperties = z.object({\n    prop: zModelWithString.optional()\n});\n\n/**\n * This is a model with ordered properties\n */\nexport const zModelWithOrderedProperties = z.object({\n    zebra: z.string().optional(),\n    apple: z.string().optional(),\n    hawaii: z.string().optional()\n});\n\n/**\n * This is a model with duplicated imports\n */\nexport const zModelWithDuplicateImports = z.object({\n    propA: zModelWithString.optional(),\n    propB: zModelWithString.optional(),\n    propC: zModelWithString.optional()\n});\n\n/**\n * This is a model that extends another model\n */\nexport const zModelThatExtends = zModelWithString.and(z.object({\n    propExtendsA: z.string().optional(),\n    propExtendsB: zModelWithString.optional()\n}));\n\n/**\n * This is a model that extends another model\n */\nexport const zModelThatExtendsExtends = zModelWithString.and(zModelThatExtends).and(z.object({\n    propExtendsC: z.string().optional(),\n    propExtendsD: zModelWithString.optional()\n}));\n\n/**\n * This is a model that contains a some patterns\n */\nexport const zModelWithPattern = z.object({\n    key: z.string().max(64).regex(/^[a-zA-Z0-9_]*$/),\n    name: z.string().max(255),\n    enabled: z.boolean().readonly().optional(),\n    modified: z.iso.datetime().readonly().optional(),\n    id: z.string().regex(/^\\d{2}-\\d{3}-\\d{4}$/).optional(),\n    text: z.string().regex(/^\\w+$/).optional(),\n    patternWithSingleQuotes: z.string().regex(/^[a-zA-Z0-9']*$/).optional(),\n    patternWithNewline: z.string().regex(/aaa\\nbbb/).optional(),\n    patternWithBacktick: z.string().regex(/aaa`bbb/).optional(),\n    patternWithUnicode: z.string().regex(/^\\p{L}+$/u).optional()\n});\n\nexport const zFile = z.object({\n    id: z.string().min(1).readonly().optional(),\n    updated_at: z.iso.datetime().readonly().optional(),\n    created_at: z.iso.datetime().readonly().optional(),\n    mime: z.string().min(1).max(24),\n    file: z.url().readonly().optional()\n});\n\nexport const zDefault = z.object({\n    name: z.string().optional()\n});\n\nexport const zPageable = z.object({\n    page: z.int().gte(0).max(2147483647, { error: 'Invalid value: Expected int32 to be <= 2147483647' }).optional().default(0),\n    size: z.int().gte(1).max(2147483647, { error: 'Invalid value: Expected int32 to be <= 2147483647' }).optional(),\n    sort: z.array(z.string()).optional()\n});\n\n/**\n * This is a free-form object without additionalProperties.\n */\nexport const zFreeFormObjectWithoutAdditionalProperties = z.record(z.string(), z.unknown());\n\n/**\n * This is a free-form object with additionalProperties: true.\n */\nexport const zFreeFormObjectWithAdditionalPropertiesEqTrue = z.record(z.string(), z.unknown());\n\n/**\n * This is a free-form object with additionalProperties: {}.\n */\nexport const zFreeFormObjectWithAdditionalPropertiesEqEmptyObject = z.record(z.string(), z.unknown());\n\nexport const zModelWithConst = z.object({\n    String: z.literal('String').optional(),\n    number: z.literal(0).optional(),\n    null: z.null().optional(),\n    withType: z.literal('Some string').optional()\n});\n\n/**\n * This is a model with one property and additionalProperties: true\n */\nexport const zModelWithAdditionalPropertiesEqTrue = z.object({\n    prop: z.string().optional()\n});\n\nexport const zNestedAnyOfArraysNullable = z.object({\n    nullableArray: z.array(z.union([z.string(), z.boolean()])).nullish()\n});\n\n/**\n * An object that can be null\n */\nexport const zNullableObject = z.object({\n    foo: z.string().optional()\n}).nullable().default(null);\n\n/**\n * Some % character\n */\nexport const zCharactersInDescription = z.string();\n\nexport const zModelWithNullableObject = z.object({\n    data: zNullableObject.optional()\n});\n\n/**\n * An object with additional properties that can be null (anyOf ref + null)\n */\nexport const zModelWithAdditionalPropertiesRef = z.record(z.string(), zNullableObject.nullable());\n\nexport const zModelWithOneOfEnum = z.union([\n    z.object({\n        foo: z.enum(['Bar'])\n    }),\n    z.object({\n        foo: z.enum(['Baz'])\n    }),\n    z.object({\n        foo: z.enum(['Qux'])\n    }),\n    z.object({\n        content: z.iso.datetime(),\n        foo: z.enum(['Quux'])\n    }),\n    z.object({\n        content: z.tuple([z.iso.datetime(), z.string()]),\n        foo: z.enum(['Corge'])\n    })\n]);\n\nexport const zModelWithNestedArrayEnumsDataFoo = z.enum(['foo', 'bar']);\n\nexport const zModelWithNestedArrayEnumsDataBar = z.enum(['baz', 'qux']);\n\nexport const zModelWithNestedArrayEnumsData = z.object({\n    foo: z.array(zModelWithNestedArrayEnumsDataFoo).optional(),\n    bar: z.array(zModelWithNestedArrayEnumsDataBar).optional()\n});\n\nexport const zModelWithNestedArrayEnums = z.object({\n    array_strings: z.array(z.string()).optional(),\n    data: zModelWithNestedArrayEnumsData.optional()\n});\n\nexport const zModelWithNestedCompositionEnums = z.object({\n    foo: zModelWithNestedArrayEnumsDataFoo.optional()\n});\n\nexport const zModelWithReadOnlyAndWriteOnly = z.object({\n    foo: z.string(),\n    bar: z.string().readonly()\n});\n\n/**\n * This is a model with one property containing an array\n */\nexport const zModelWithArrayReadOnlyAndWriteOnly = z.object({\n    prop: z.array(zModelWithReadOnlyAndWriteOnly).optional(),\n    propWithFile: z.array(z.string()).optional(),\n    propWithNumber: z.array(z.number()).optional()\n});\n\nexport const zModelWithConstantSizeArray = z.tuple([z.number(), z.number()]);\n\nexport const zModelWithAnyOfConstantSizeArray = z.tuple([\n    z.union([\n        z.number(),\n        z.string()\n    ]),\n    z.union([\n        z.number(),\n        z.string()\n    ]),\n    z.union([\n        z.number(),\n        z.string()\n    ])\n]);\n\nexport const zModelWithPrefixItemsConstantSizeArray = z.tuple([\n    zModelWithInteger,\n    z.union([\n        z.number(),\n        z.string()\n    ]),\n    z.string()\n]);\n\nexport const zModelWithAnyOfConstantSizeArrayNullable = z.tuple([\n    z.union([\n        z.number(),\n        z.string()\n    ]).nullable(),\n    z.union([\n        z.number(),\n        z.string()\n    ]).nullable(),\n    z.union([\n        z.number(),\n        z.string()\n    ]).nullable()\n]);\n\nexport const zModelWithAnyOfConstantSizeArrayAndIntersect = z.tuple([z.intersection(z.number(), z.string()), z.intersection(z.number(), z.string())]);\n\nexport const zModelWithNumericEnumUnion = z.object({\n    value: z.union([\n        z.literal(-10),\n        z.literal(-1),\n        z.literal(0),\n        z.literal(1),\n        z.literal(3),\n        z.literal(6),\n        z.literal(12)\n    ]).optional()\n});\n\n/**\n * Some description with `back ticks`\n */\nexport const zModelWithBackticksInDescription = z.object({\n    template: z.string().optional()\n});\n\n/**\n * Model used to test deduplication strategy (unused)\n */\nexport const zParameterSimpleParameterUnused = z.string();\n\n/**\n * Model used to test deduplication strategy\n */\nexport const zPostServiceWithEmptyTagResponse = z.string();\n\n/**\n * Model used to test deduplication strategy\n */\nexport const zPostServiceWithEmptyTagResponse2 = z.string();\n\n/**\n * Model used to test deduplication strategy\n */\nexport const zDeleteFooData = z.string();\n\n/**\n * Model used to test deduplication strategy\n */\nexport const zDeleteFooData2 = z.string();\n\n/**\n * Model with restricted keyword name\n */\nexport const zImport = z.string();\n\nexport const zModelWithAnyOfConstantSizeArrayWithNSizeAndOptions = z.tuple([z.union([\n        z.number(),\n        zImport\n    ]), z.union([\n        z.number(),\n        zImport\n    ])]);\n\nexport const zSchemaWithFormRestrictedKeys = z.object({\n    description: z.string().optional(),\n    'x-enum-descriptions': z.string().optional(),\n    'x-enum-varnames': z.string().optional(),\n    'x-enumNames': z.string().optional(),\n    title: z.string().optional(),\n    object: z.object({\n        description: z.string().optional(),\n        'x-enum-descriptions': z.string().optional(),\n        'x-enum-varnames': z.string().optional(),\n        'x-enumNames': z.string().optional(),\n        title: z.string().optional()\n    }).optional(),\n    array: z.array(z.object({\n        description: z.string().optional(),\n        'x-enum-descriptions': z.string().optional(),\n        'x-enum-varnames': z.string().optional(),\n        'x-enumNames': z.string().optional(),\n        title: z.string().optional()\n    })).optional()\n});\n\n/**\n * This schema was giving PascalCase transformations a hard time\n */\nexport const zIoK8sApimachineryPkgApisMetaV1Preconditions = z.object({\n    resourceVersion: z.string().optional(),\n    uid: z.string().optional()\n});\n\n/**\n * This schema was giving PascalCase transformations a hard time\n */\nexport const zIoK8sApimachineryPkgApisMetaV1DeleteOptions = z.object({\n    preconditions: zIoK8sApimachineryPkgApisMetaV1Preconditions.optional()\n});\n\nexport const zAdditionalPropertiesUnknownIssue = z.record(z.string(), z.union([\n    z.string(),\n    z.number()\n]));\n\nexport const zAdditionalPropertiesUnknownIssue2 = z.record(z.string(), z.union([\n    z.string(),\n    z.number()\n]));\n\nexport const zAdditionalPropertiesUnknownIssue3 = z.intersection(z.string(), z.object({\n    entries: z.record(z.string(), zAdditionalPropertiesUnknownIssue)\n}));\n\nexport const zAdditionalPropertiesIntegerIssue = z.object({\n    value: z.int()\n});\n\nexport const zGenericSchemaDuplicateIssue1SystemBoolean = z.object({\n    item: z.boolean().optional(),\n    error: z.string().nullish(),\n    hasError: z.boolean().readonly().optional(),\n    data: z.record(z.string(), z.never()).optional()\n});\n\nexport const zGenericSchemaDuplicateIssue1SystemString = z.object({\n    item: z.string().nullish(),\n    error: z.string().nullish(),\n    hasError: z.boolean().readonly().optional()\n});\n\nexport const zOneOfAllOfIssue = z.union([\n    z.intersection(z.union([\n        zConstValue,\n        zGenericSchemaDuplicateIssue1SystemBoolean\n    ]), z3eNum1Период),\n    zGenericSchemaDuplicateIssue1SystemString\n]);\n\nexport const zExternalSharedModel = z.object({\n    id: z.string(),\n    name: z.string().optional()\n});\n\n/**\n * External ref to shared model (A)\n */\nexport const zExternalRefA = zExternalSharedModel;\n\n/**\n * External ref to shared model (B)\n */\nexport const zExternalRefB = zExternalSharedModel;\n\n/**\n * This is a model with one nested property\n */\nexport const zModelWithPropertiesWritable = z.object({\n    required: z.string(),\n    requiredAndNullable: z.string().nullable(),\n    string: z.string().optional(),\n    number: z.number().optional(),\n    boolean: z.boolean().optional(),\n    reference: zModelWithString.optional(),\n    'property with space': z.string().optional(),\n    default: z.string().optional(),\n    try: z.string().optional()\n});\n\n/**\n * This is a model with one property containing a reference\n */\nexport const zModelWithReferenceWritable = z.object({\n    prop: zModelWithPropertiesWritable.optional()\n});\n\n/**\n * This is a model that contains a some patterns\n */\nexport const zModelWithPatternWritable = z.object({\n    key: z.string().max(64).regex(/^[a-zA-Z0-9_]*$/),\n    name: z.string().max(255),\n    id: z.string().regex(/^\\d{2}-\\d{3}-\\d{4}$/).optional(),\n    text: z.string().regex(/^\\w+$/).optional(),\n    patternWithSingleQuotes: z.string().regex(/^[a-zA-Z0-9']*$/).optional(),\n    patternWithNewline: z.string().regex(/aaa\\nbbb/).optional(),\n    patternWithBacktick: z.string().regex(/aaa`bbb/).optional(),\n    patternWithUnicode: z.string().regex(/^\\p{L}+$/u).optional()\n});\n\nexport const zFileWritable = z.object({\n    mime: z.string().min(1).max(24)\n});\n\nexport const zModelWithReadOnlyAndWriteOnlyWritable = z.object({\n    foo: z.string(),\n    baz: z.string()\n});\n\n/**\n * This is a model with one property containing an array\n */\nexport const zModelWithArrayReadOnlyAndWriteOnlyWritable = z.object({\n    prop: z.array(zModelWithReadOnlyAndWriteOnlyWritable).optional(),\n    propWithFile: z.array(z.string()).optional(),\n    propWithNumber: z.array(z.number()).optional()\n});\n\nexport const zModelWithAnyOfConstantSizeArrayWithNSizeAndOptionsWritable = z.tuple([z.union([\n        z.number(),\n        zImport\n    ]), z.union([\n        z.number(),\n        zImport\n    ])]);\n\nexport const zAdditionalPropertiesUnknownIssueWritable = z.record(z.string(), z.union([\n    z.string(),\n    z.number()\n]));\n\nexport const zOneOfAllOfIssueWritable = z.union([\n    z.intersection(z.union([\n        zConstValue,\n        zGenericSchemaDuplicateIssue1SystemBoolean\n    ]), z3eNum1Период),\n    zGenericSchemaDuplicateIssue1SystemString\n]);\n\nexport const zGenericSchemaDuplicateIssue1SystemBooleanWritable = z.object({\n    item: z.boolean().optional(),\n    error: z.string().nullish(),\n    data: z.record(z.string(), z.never()).optional()\n});\n\nexport const zGenericSchemaDuplicateIssue1SystemStringWritable = z.object({\n    item: z.string().nullish(),\n    error: z.string().nullish()\n});\n\n/**\n * This is a reusable parameter\n */\nexport const zSimpleParameter = z.string();\n\nexport const zCompositionWithOneOfAndProperties = z.intersection(z.union([\n    z.object({\n        foo: zSimpleParameter\n    }),\n    z.object({\n        bar: zNonAsciiStringæøåÆøÅöôêÊ字符串\n    })\n]), z.object({\n    baz: z.int().gte(0).max(65535, { error: 'Invalid value: Expected uint16 to be <= 65535' }).nullable(),\n    qux: z.int().gte(0).max(255, { error: 'Invalid value: Expected uint8 to be <= 255' })\n}));\n\nexport const zModelWithOneOfAndProperties = z.intersection(z.union([\n    zSimpleParameter,\n    zNonAsciiStringæøåÆøÅöôêÊ字符串\n]), z.object({\n    baz: z.int().gte(0).max(65535, { error: 'Invalid value: Expected uint16 to be <= 65535' }).nullable(),\n    qux: z.int().gte(0).max(255, { error: 'Invalid value: Expected uint8 to be <= 255' })\n}));\n\n/**\n * Parameter with illegal characters\n */\nexport const zXFooBar = zModelWithString;\n\n/**\n * A reusable request body\n */\nexport const zSimpleRequestBody = zModelWithString;\n\n/**\n * A reusable request body\n */\nexport const zSimpleFormData = zModelWithString;\n\nexport const zExportData = z.object({\n    body: z.never().optional(),\n    path: z.never().optional(),\n    query: z.never().optional()\n});\n\nexport const zPatchApiVbyApiVersionNoTagData = z.object({\n    body: z.never().optional(),\n    path: z.never().optional(),\n    query: z.never().optional()\n});\n\nexport const zImportData = z.object({\n    body: z.union([\n        zModelWithReadOnlyAndWriteOnlyWritable,\n        zModelWithArrayReadOnlyAndWriteOnlyWritable\n    ]),\n    path: z.never().optional(),\n    query: z.never().optional()\n});\n\nexport const zImportResponse = z.union([\n    zModelFromZendesk,\n    zModelWithReadOnlyAndWriteOnly\n]);\n\nexport const zFooWowData = z.object({\n    body: z.never().optional(),\n    path: z.never().optional(),\n    query: z.never().optional()\n});\n\nexport const zApiVVersionODataControllerCountData = z.object({\n    body: z.never().optional(),\n    path: z.never().optional(),\n    query: z.never().optional()\n});\n\n/**\n * Success\n */\nexport const zApiVVersionODataControllerCountResponse = zModelFromZendesk;\n\nexport const zGetApiVbyApiVersionSimpleOperationData = z.object({\n    body: z.never().optional(),\n    path: z.object({\n        foo_param: z.union([\n            z.string(),\n            z.uuid()\n        ])\n    }),\n    query: z.never().optional()\n});\n\n/**\n * Response is a simple number\n */\nexport const zGetApiVbyApiVersionSimpleOperationResponse = z.number();\n\nexport const zDeleteCallWithoutParametersAndResponseData = z.object({\n    body: z.never().optional(),\n    path: z.never().optional(),\n    query: z.never().optional()\n});\n\nexport const zGetCallWithoutParametersAndResponseData = z.object({\n    body: z.never().optional(),\n    path: z.never().optional(),\n    query: z.never().optional()\n});\n\nexport const zHeadCallWithoutParametersAndResponseData = z.object({\n    body: z.never().optional(),\n    path: z.never().optional(),\n    query: z.never().optional()\n});\n\nexport const zOptionsCallWithoutParametersAndResponseData = z.object({\n    body: z.never().optional(),\n    path: z.never().optional(),\n    query: z.never().optional()\n});\n\nexport const zPatchCallWithoutParametersAndResponseData = z.object({\n    body: z.never().optional(),\n    path: z.never().optional(),\n    query: z.never().optional()\n});\n\nexport const zPostCallWithoutParametersAndResponseData = z.object({\n    body: z.never().optional(),\n    path: z.never().optional(),\n    query: z.never().optional()\n});\n\nexport const zPutCallWithoutParametersAndResponseData = z.object({\n    body: z.never().optional(),\n    path: z.never().optional(),\n    query: z.never().optional()\n});\n\nexport const zDeleteFooData3 = z.object({\n    body: z.never().optional(),\n    path: z.object({\n        foo_param: z.string(),\n        BarParam: z.string()\n    }),\n    query: z.never().optional(),\n    headers: z.object({\n        'x-Foo-Bar': zModelWithString\n    })\n});\n\nexport const zCallWithDescriptionsData = z.object({\n    body: z.never().optional(),\n    path: z.never().optional(),\n    query: z.object({\n        parameterWithBreaks: z.string().optional(),\n        parameterWithBackticks: z.string().optional(),\n        parameterWithSlashes: z.string().optional(),\n        parameterWithExpressionPlaceholders: z.string().optional(),\n        parameterWithQuotes: z.string().optional(),\n        parameterWithReservedCharacters: z.string().optional()\n    }).optional()\n});\n\nexport const zDeprecatedCallData = z.object({\n    body: z.never().optional(),\n    path: z.never().optional(),\n    query: z.never().optional(),\n    headers: z.object({\n        parameter: zDeprecatedModel.nullable()\n    })\n});\n\nexport const zCallWithParametersData = z.object({\n    body: z.record(z.string(), z.unknown()).nullable(),\n    path: z.object({\n        parameterPath: z.string().nullable(),\n        'api-version': z.string().nullable()\n    }),\n    query: z.object({\n        foo_ref_enum: zModelWithNestedArrayEnumsDataFoo.optional(),\n        foo_all_of_enum: zModelWithNestedArrayEnumsDataFoo,\n        cursor: z.string().nullable()\n    }),\n    headers: z.object({\n        parameterHeader: z.string().nullable()\n    })\n});\n\nexport const zCallWithWeirdParameterNamesData = z.object({\n    body: zModelWithString.nullable(),\n    path: z.object({\n        'parameter.path.1': z.string().optional(),\n        'parameter-path-2': z.string().optional(),\n        'PARAMETER-PATH-3': z.string().optional(),\n        'api-version': z.string().nullable()\n    }),\n    query: z.object({\n        default: z.string().optional(),\n        'parameter-query': z.string().nullable()\n    }),\n    headers: z.object({\n        'parameter.header': z.string().nullable()\n    })\n});\n\nexport const zGetCallWithOptionalParamData = z.object({\n    body: zModelWithOneOfEnum,\n    path: z.never().optional(),\n    query: z.object({\n        page: z.number().optional()\n    }).optional()\n});\n\nexport const zPostCallWithOptionalParamData = z.object({\n    body: z.object({\n        offset: z.number().nullish()\n    }).optional(),\n    path: z.never().optional(),\n    query: z.object({\n        parameter: zPageable\n    })\n});\n\nexport const zPostCallWithOptionalParamResponse = z.union([\n    z.number(),\n    z.void()\n]);\n\nexport const zPostApiVbyApiVersionRequestBodyData = z.object({\n    body: zSimpleRequestBody.optional(),\n    path: z.never().optional(),\n    query: z.object({\n        parameter: z.string().optional()\n    }).optional()\n});\n\nexport const zPostApiVbyApiVersionFormDataData = z.object({\n    body: zSimpleFormData.optional(),\n    path: z.never().optional(),\n    query: z.object({\n        parameter: z.string().optional()\n    }).optional()\n});\n\nexport const zCallWithDefaultParametersData = z.object({\n    body: z.never().optional(),\n    path: z.never().optional(),\n    query: z.object({\n        parameterString: z.string().nullish().default('Hello World!'),\n        parameterNumber: z.number().nullish().default(123),\n        parameterBoolean: z.boolean().nullish().default(true),\n        parameterEnum: z.enum([\n            'Success',\n            'Warning',\n            'Error'\n        ]).optional(),\n        parameterModel: zModelWithString.nullish()\n    }).optional()\n});\n\nexport const zCallWithDefaultOptionalParametersData = z.object({\n    body: z.never().optional(),\n    path: z.never().optional(),\n    query: z.object({\n        parameterString: z.string().optional().default('Hello World!'),\n        parameterNumber: z.number().optional().default(123),\n        parameterBoolean: z.boolean().optional().default(true),\n        parameterEnum: z.enum([\n            'Success',\n            'Warning',\n            'Error'\n        ]).optional(),\n        parameterModel: zModelWithString.optional().default({ prop: 'Hello World!' })\n    }).optional()\n});\n\nexport const zCallToTestOrderOfParamsData = z.object({\n    body: z.never().optional(),\n    path: z.never().optional(),\n    query: z.object({\n        parameterOptionalStringWithDefault: z.string().optional().default('Hello World!'),\n        parameterOptionalStringWithEmptyDefault: z.string().optional().default(''),\n        parameterOptionalStringWithNoDefault: z.string().optional(),\n        parameterStringWithDefault: z.string().default('Hello World!'),\n        parameterStringWithEmptyDefault: z.string().default(''),\n        parameterStringWithNoDefault: z.string(),\n        parameterStringNullableWithNoDefault: z.string().nullish(),\n        parameterStringNullableWithDefault: z.string().nullish().default(null)\n    })\n});\n\nexport const zDuplicateNameData = z.object({\n    body: z.never().optional(),\n    path: z.never().optional(),\n    query: z.never().optional()\n});\n\nexport const zDuplicateName2Data = z.object({\n    body: z.never().optional(),\n    path: z.never().optional(),\n    query: z.never().optional()\n});\n\nexport const zDuplicateName3Data = z.object({\n    body: z.never().optional(),\n    path: z.never().optional(),\n    query: z.never().optional()\n});\n\nexport const zDuplicateName4Data = z.object({\n    body: z.never().optional(),\n    path: z.never().optional(),\n    query: z.never().optional()\n});\n\nexport const zCallWithNoContentResponseData = z.object({\n    body: z.never().optional(),\n    path: z.never().optional(),\n    query: z.never().optional()\n});\n\n/**\n * Success\n */\nexport const zCallWithNoContentResponseResponse = z.void();\n\nexport const zCallWithResponseAndNoContentResponseData = z.object({\n    body: z.never().optional(),\n    path: z.never().optional(),\n    query: z.never().optional()\n});\n\nexport const zCallWithResponseAndNoContentResponseResponse = z.union([\n    z.number(),\n    z.void()\n]);\n\nexport const zDummyAData = z.object({\n    body: z.never().optional(),\n    path: z.never().optional(),\n    query: z.never().optional()\n});\n\nexport const zDummyAResponse = z400;\n\nexport const zDummyBData = z.object({\n    body: z.never().optional(),\n    path: z.never().optional(),\n    query: z.never().optional()\n});\n\n/**\n * Success\n */\nexport const zDummyBResponse = z.void();\n\nexport const zCallWithResponseData = z.object({\n    body: z.never().optional(),\n    path: z.never().optional(),\n    query: z.never().optional()\n});\n\nexport const zCallWithResponseResponse = zImport;\n\nexport const zCallWithDuplicateResponsesData = z.object({\n    body: z.never().optional(),\n    path: z.never().optional(),\n    query: z.never().optional()\n});\n\nexport const zCallWithDuplicateResponsesResponse = z.union([\n    zModelWithBoolean.and(zModelWithInteger),\n    zModelWithString\n]);\n\nexport const zCallWithResponsesData = z.object({\n    body: z.never().optional(),\n    path: z.never().optional(),\n    query: z.never().optional()\n});\n\nexport const zCallWithResponsesResponse = z.union([\n    z.object({\n        '@namespace.string': z.string().readonly().optional(),\n        '@namespace.integer': z.int().readonly().optional(),\n        value: z.array(zModelWithString).readonly().optional()\n    }),\n    zModelThatExtends,\n    zModelThatExtendsExtends\n]);\n\nexport const zCollectionFormatData = z.object({\n    body: z.never().optional(),\n    path: z.never().optional(),\n    query: z.object({\n        parameterArrayCSV: z.array(z.string()).nullable(),\n        parameterArraySSV: z.array(z.string()).nullable(),\n        parameterArrayTSV: z.array(z.string()).nullable(),\n        parameterArrayPipes: z.array(z.string()).nullable(),\n        parameterArrayMulti: z.array(z.string()).nullable()\n    })\n});\n\nexport const zTypesData = z.object({\n    body: z.never().optional(),\n    path: z.object({\n        id: z.int().min(-2147483648, { error: 'Invalid value: Expected int32 to be >= -2147483648' }).max(2147483647, { error: 'Invalid value: Expected int32 to be <= 2147483647' }).optional()\n    }).optional(),\n    query: z.object({\n        parameterNumber: z.number().default(123),\n        parameterString: z.string().nullable().default('default'),\n        parameterBoolean: z.boolean().nullable().default(true),\n        parameterObject: z.record(z.string(), z.unknown()).nullable().default(null),\n        parameterArray: z.array(z.string()).nullable(),\n        parameterDictionary: z.record(z.string(), z.unknown()).nullable(),\n        parameterEnum: z.union([\n            z.literal('Success'),\n            z.literal('Warning'),\n            z.literal('Error')\n        ]).nullable()\n    })\n});\n\nexport const zTypesResponse = z.union([\n    z.number(),\n    z.string(),\n    z.boolean(),\n    z.record(z.string(), z.unknown())\n]);\n\nexport const zUploadFileData = z.object({\n    body: z.string(),\n    path: z.object({\n        'api-version': z.string().nullable()\n    }),\n    query: z.never().optional()\n});\n\nexport const zUploadFileResponse = z.boolean();\n\nexport const zFileResponseData = z.object({\n    body: z.never().optional(),\n    path: z.object({\n        id: z.string(),\n        'api-version': z.string()\n    }),\n    query: z.never().optional()\n});\n\n/**\n * Success\n */\nexport const zFileResponseResponse = z.string();\n\nexport const zComplexTypesData = z.object({\n    body: z.never().optional(),\n    path: z.never().optional(),\n    query: z.object({\n        parameterObject: z.object({\n            first: z.object({\n                second: z.object({\n                    third: z.string().optional()\n                }).optional()\n            }).optional()\n        }),\n        parameterReference: zModelWithString\n    })\n});\n\n/**\n * Successful response\n */\nexport const zComplexTypesResponse = z.array(zModelWithString);\n\nexport const zMultipartResponseData = z.object({\n    body: z.never().optional(),\n    path: z.never().optional(),\n    query: z.never().optional()\n});\n\n/**\n * OK\n */\nexport const zMultipartResponseResponse = z.object({\n    file: z.string().optional(),\n    metadata: z.object({\n        foo: z.string().optional(),\n        bar: z.string().optional()\n    }).optional()\n});\n\nexport const zMultipartRequestData = z.object({\n    body: z.object({\n        content: z.string().optional(),\n        data: zModelWithString.nullish()\n    }).optional(),\n    path: z.never().optional(),\n    query: z.never().optional()\n});\n\nexport const zComplexParamsData = z.object({\n    body: z.object({\n        key: z.string().max(64).regex(/^[a-zA-Z0-9_]*$/).readonly().nullable(),\n        name: z.string().max(255).nullable(),\n        enabled: z.boolean().optional().default(true),\n        type: z.enum([\n            'Monkey',\n            'Horse',\n            'Bird'\n        ]),\n        listOfModels: z.array(zModelWithString).nullish(),\n        listOfStrings: z.array(z.string()).nullish(),\n        parameters: z.union([\n            zModelWithString,\n            zModelWithEnum,\n            zModelWithArray,\n            zModelWithDictionary\n        ]),\n        user: z.object({\n            id: z.int().min(-2147483648, { error: 'Invalid value: Expected int32 to be >= -2147483648' }).max(2147483647, { error: 'Invalid value: Expected int32 to be <= 2147483647' }).readonly().optional(),\n            name: z.string().readonly().nullish()\n        }).readonly().optional()\n    }).optional(),\n    path: z.object({\n        id: z.int().min(-2147483648, { error: 'Invalid value: Expected int32 to be >= -2147483648' }).max(2147483647, { error: 'Invalid value: Expected int32 to be <= 2147483647' }),\n        'api-version': z.string()\n    }),\n    query: z.never().optional()\n});\n\n/**\n * Success\n */\nexport const zComplexParamsResponse = zModelWithString;\n\nexport const zCallWithResultFromHeaderData = z.object({\n    body: z.never().optional(),\n    path: z.never().optional(),\n    query: z.never().optional()\n});\n\nexport const zTestErrorCodeData = z.object({\n    body: z.never().optional(),\n    path: z.never().optional(),\n    query: z.object({\n        status: z.int()\n    })\n});\n\nexport const zNonAsciiæøåÆøÅöôêÊ字符串Data = z.object({\n    body: z.never().optional(),\n    path: z.never().optional(),\n    query: z.object({\n        nonAsciiParamæøåÆØÅöôêÊ: z.int()\n    })\n});\n\n/**\n * Successful response\n */\nexport const zNonAsciiæøåÆøÅöôêÊ字符串Response = z.array(zNonAsciiStringæøåÆøÅöôêÊ字符串);\n\nexport const zPutWithFormUrlEncodedData = z.object({\n    body: zArrayWithStrings,\n    path: z.never().optional(),\n    query: z.never().optional()\n});\n"
  },
  {
    "path": "packages/openapi-ts-tests/zod/v4/__snapshots__/3.1.x/v4/defaults-with-ref-and-anyof/zod.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport * as z from 'zod';\n\nexport const zAudioFormat = z.enum(['pcm_16bit_44.1khz', 'pcm_16bit_24khz']);\n\nexport const zLanguage = z.enum([\n    'en',\n    'es',\n    'fr'\n]);\n\nexport const zNestedConfig = z.object({\n    model: z.string().default('gpt-4'),\n    temperature: z.number().default(1)\n});\n\nexport const zTestSchema = z.object({\n    primitiveDefault: z.number().default(42),\n    refWithPrimitiveDefault: zAudioFormat.default('pcm_16bit_44.1khz'),\n    refWithObjectDefault: zNestedConfig.default({ model: 'gpt-4', temperature: 1 }),\n    anyOfWithNullDefault: z.number().nullable().default(null),\n    anyOfWithRefAndNullDefault: zLanguage.nullable().default(null),\n    optionalAnyOfWithDefault: z.string().nullish().default(null)\n});\n"
  },
  {
    "path": "packages/openapi-ts-tests/zod/v4/__snapshots__/3.1.x/v4/enum-null/zod.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport * as z from 'zod';\n\nexport const zFoo = z.enum(['foo', 'bar']).nullable();\n\nexport const zBar = z.enum(['foo', 'bar']);\n\nexport const zBaz = z.enum(['foo', 'bar']);\n"
  },
  {
    "path": "packages/openapi-ts-tests/zod/v4/__snapshots__/3.1.x/v4/enum-resolver-permissive/zod.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport * as z from 'zod';\n\nexport const zFoo = z.union([z.enum(['foo', 'bar']), z.string()]).nullable();\n\nexport const zBar = z.union([z.enum(['foo', 'bar']), z.string()]);\n\nexport const zBaz = z.union([z.enum(['foo', 'bar']), z.string()]);\n"
  },
  {
    "path": "packages/openapi-ts-tests/zod/v4/__snapshots__/3.1.x/v4/schema-const/zod.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport * as z from 'zod';\n\nexport const zFoo = z.object({\n    foo: z.literal('foo').optional(),\n    bar: z.literal(3.2).optional(),\n    baz: z.literal(-1).optional(),\n    qux: z.literal(true).optional(),\n    quux: z.tuple([\n        z.literal(1),\n        z.literal(2),\n        z.literal(3),\n        z.literal('foo'),\n        z.literal(true)\n    ]).optional(),\n    corge: z.record(z.string(), z.unknown()).optional(),\n    garply: z.literal(BigInt('10')).optional(),\n    numberInt8: z.literal(100).optional(),\n    numberInt16: z.literal(1000).optional(),\n    numberInt32: z.literal(100000).optional(),\n    numberInt64: z.literal(BigInt(1000000000000)).optional(),\n    numberUint8: z.literal(200).optional(),\n    numberUint16: z.literal(50000).optional(),\n    numberUint32: z.literal(3000000000).optional(),\n    numberUint64: z.literal(BigInt(18000000000000000000)).optional(),\n    integerInt8: z.literal(-100).optional(),\n    integerInt16: z.literal(-1000).optional(),\n    integerInt32: z.literal(-100000).optional(),\n    integerInt64: z.literal(BigInt(-1000000000000)).optional(),\n    integerUint8: z.literal(255).optional(),\n    integerUint16: z.literal(65535).optional(),\n    integerUint32: z.literal(4294967295).optional(),\n    integerUint64: z.literal(BigInt('18446744073709551615')).optional(),\n    stringInt64: z.literal(BigInt('-9223372036854775808')).optional(),\n    stringUint64: z.literal(BigInt('18446744073709551615')).optional()\n});\n"
  },
  {
    "path": "packages/openapi-ts-tests/zod/v4/__snapshots__/3.1.x/v4/string-with-format/zod.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport * as z from 'zod';\n\nexport const zFoo = z.object({\n    foo: z.array(z.union([z.string(), z.string()])).optional()\n});\n"
  },
  {
    "path": "packages/openapi-ts-tests/zod/v4/__snapshots__/3.1.x/v4/string-with-guid-format/zod.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport * as z from 'zod';\n\nexport const zGetFooData = z.object({\n    body: z.never().optional(),\n    path: z.object({\n        guidId: z.guid()\n    }),\n    query: z.never().optional()\n});\n"
  },
  {
    "path": "packages/openapi-ts-tests/zod/v4/__snapshots__/3.1.x/v4/type-format/client/client.gen.ts",
    "content": "// 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 (options: RequestOptions) => {\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 url = buildUrl(opts);\n\n    return { opts, url };\n  };\n\n  const request: Client['request'] = async (options) => {\n    // @ts-expect-error\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"
  },
  {
    "path": "packages/openapi-ts-tests/zod/v4/__snapshots__/3.1.x/v4/type-format/client/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type { Auth } from '../core/auth.gen';\nexport type { QuerySerializerOptions } from '../core/bodySerializer.gen';\nexport {\n  formDataBodySerializer,\n  jsonBodySerializer,\n  urlSearchParamsBodySerializer,\n} from '../core/bodySerializer.gen';\nexport { buildClientParams } from '../core/params.gen';\nexport { serializeQueryKeyValue } from '../core/queryKeySerializer.gen';\nexport { createClient } from './client.gen';\nexport type {\n  Client,\n  ClientOptions,\n  Config,\n  CreateClientConfig,\n  Options,\n  RequestOptions,\n  RequestResult,\n  ResolvedRequestOptions,\n  ResponseStyle,\n  TDataShape,\n} from './types.gen';\nexport { createConfig, mergeHeaders } from './utils.gen';\n"
  },
  {
    "path": "packages/openapi-ts-tests/zod/v4/__snapshots__/3.1.x/v4/type-format/client/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { Auth } from '../core/auth.gen';\nimport type {\n  ServerSentEventsOptions,\n  ServerSentEventsResult,\n} from '../core/serverSentEvents.gen';\nimport type { Client as CoreClient, Config as CoreConfig } from '../core/types.gen';\nimport type { Middleware } from './utils.gen';\n\nexport type ResponseStyle = 'data' | 'fields';\n\nexport interface Config<T extends ClientOptions = ClientOptions>\n  extends Omit<RequestInit, 'body' | 'headers' | 'method'>, CoreConfig {\n  /**\n   * Base URL for all requests made by this client.\n   */\n  baseUrl?: T['baseUrl'];\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   * Please don't use the Fetch client for Next.js applications. The `next`\n   * options won't have any effect.\n   *\n   * Install {@link https://www.npmjs.com/package/@hey-api/client-next `@hey-api/client-next`} instead.\n   */\n  next?: never;\n  /**\n   * Return the response data parsed in a specified format. By default, `auto`\n   * will infer the appropriate method from the `Content-Type` response header.\n   * You can override this behavior with any of the {@link Body} methods.\n   * Select `stream` if you don't want to parse response data at all.\n   *\n   * @default 'auto'\n   */\n  parseAs?: 'arrayBuffer' | 'auto' | 'blob' | 'formData' | 'json' | 'stream' | 'text';\n  /**\n   * Should we return only data or multiple fields (data, error, response, etc.)?\n   *\n   * @default 'fields'\n   */\n  responseStyle?: ResponseStyle;\n  /**\n   * Throw an error instead of returning it in the response?\n   *\n   * @default false\n   */\n  throwOnError?: T['throwOnError'];\n}\n\nexport interface RequestOptions<\n  TData = unknown,\n  TResponseStyle extends ResponseStyle = 'fields',\n  ThrowOnError extends boolean = boolean,\n  Url extends string = string,\n>\n  extends\n    Config<{\n      responseStyle: TResponseStyle;\n      throwOnError: ThrowOnError;\n    }>,\n    Pick<\n      ServerSentEventsOptions<TData>,\n      | 'onRequest'\n      | 'onSseError'\n      | 'onSseEvent'\n      | 'sseDefaultRetryDelay'\n      | 'sseMaxRetryAttempts'\n      | 'sseMaxRetryDelay'\n    > {\n  /**\n   * Any body that you want to add to your request.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/fetch#body}\n   */\n  body?: unknown;\n  path?: Record<string, unknown>;\n  query?: Record<string, unknown>;\n  /**\n   * Security mechanism(s) to use for the request.\n   */\n  security?: ReadonlyArray<Auth>;\n  url: Url;\n}\n\nexport interface ResolvedRequestOptions<\n  TResponseStyle extends ResponseStyle = 'fields',\n  ThrowOnError extends boolean = boolean,\n  Url extends string = string,\n> extends RequestOptions<unknown, TResponseStyle, ThrowOnError, Url> {\n  serializedBody?: string;\n}\n\nexport type RequestResult<\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = boolean,\n  TResponseStyle extends ResponseStyle = 'fields',\n> = ThrowOnError extends true\n  ? Promise<\n      TResponseStyle extends 'data'\n        ? TData extends Record<string, unknown>\n          ? TData[keyof TData]\n          : TData\n        : {\n            data: TData extends Record<string, unknown> ? TData[keyof TData] : TData;\n            request: Request;\n            response: Response;\n          }\n    >\n  : Promise<\n      TResponseStyle extends 'data'\n        ? (TData extends Record<string, unknown> ? TData[keyof TData] : TData) | undefined\n        : (\n            | {\n                data: TData extends Record<string, unknown> ? TData[keyof TData] : TData;\n                error: undefined;\n              }\n            | {\n                data: undefined;\n                error: TError extends Record<string, unknown> ? TError[keyof TError] : TError;\n              }\n          ) & {\n            request: Request;\n            response: Response;\n          }\n    >;\n\nexport interface ClientOptions {\n  baseUrl?: string;\n  responseStyle?: ResponseStyle;\n  throwOnError?: boolean;\n}\n\ntype MethodFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'>,\n) => RequestResult<TData, TError, ThrowOnError, TResponseStyle>;\n\ntype SseFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'>,\n) => Promise<ServerSentEventsResult<TData, TError>>;\n\ntype RequestFn = <\n  TData = unknown,\n  TError = unknown,\n  ThrowOnError extends boolean = false,\n  TResponseStyle extends ResponseStyle = 'fields',\n>(\n  options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'> &\n    Pick<Required<RequestOptions<TData, TResponseStyle, ThrowOnError>>, 'method'>,\n) => RequestResult<TData, TError, ThrowOnError, TResponseStyle>;\n\ntype BuildUrlFn = <\n  TData extends {\n    body?: unknown;\n    path?: Record<string, unknown>;\n    query?: Record<string, unknown>;\n    url: string;\n  },\n>(\n  options: TData & Options<TData>,\n) => string;\n\nexport type Client = CoreClient<RequestFn, Config, MethodFn, BuildUrlFn, SseFn> & {\n  interceptors: Middleware<Request, Response, unknown, ResolvedRequestOptions>;\n};\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 = ClientOptions> = (\n  override?: Config<ClientOptions & T>,\n) => Config<Required<ClientOptions> & T>;\n\nexport interface TDataShape {\n  body?: unknown;\n  headers?: unknown;\n  path?: unknown;\n  query?: unknown;\n  url: string;\n}\n\ntype OmitKeys<T, K> = Pick<T, Exclude<keyof T, K>>;\n\nexport type Options<\n  TData extends TDataShape = TDataShape,\n  ThrowOnError extends boolean = boolean,\n  TResponse = unknown,\n  TResponseStyle extends ResponseStyle = 'fields',\n> = OmitKeys<\n  RequestOptions<TResponse, TResponseStyle, ThrowOnError>,\n  'body' | 'path' | 'query' | 'url'\n> &\n  ([TData] extends [never] ? unknown : Omit<TData, 'url'>);\n"
  },
  {
    "path": "packages/openapi-ts-tests/zod/v4/__snapshots__/3.1.x/v4/type-format/client/utils.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/zod/v4/__snapshots__/3.1.x/v4/type-format/client.gen.ts",
    "content": "// 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>());\n"
  },
  {
    "path": "packages/openapi-ts-tests/zod/v4/__snapshots__/3.1.x/v4/type-format/core/auth.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/zod/v4/__snapshots__/3.1.x/v4/type-format/core/bodySerializer.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/zod/v4/__snapshots__/3.1.x/v4/type-format/core/params.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/zod/v4/__snapshots__/3.1.x/v4/type-format/core/pathSerializer.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/zod/v4/__snapshots__/3.1.x/v4/type-format/core/queryKeySerializer.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\n/**\n * JSON-friendly union that mirrors what Pinia Colada can hash.\n */\nexport type JsonValue =\n  | null\n  | string\n  | number\n  | boolean\n  | JsonValue[]\n  | { [key: string]: JsonValue };\n\n/**\n * Replacer that converts non-JSON values (bigint, Date, etc.) to safe substitutes.\n */\nexport const queryKeyJsonReplacer = (_key: string, value: unknown) => {\n  if (value === undefined || typeof value === 'function' || typeof value === 'symbol') {\n    return undefined;\n  }\n  if (typeof value === 'bigint') {\n    return value.toString();\n  }\n  if (value instanceof Date) {\n    return value.toISOString();\n  }\n  return value;\n};\n\n/**\n * Safely stringifies a value and parses it back into a JsonValue.\n */\nexport const stringifyToJsonValue = (input: unknown): JsonValue | undefined => {\n  try {\n    const json = JSON.stringify(input, queryKeyJsonReplacer);\n    if (json === undefined) {\n      return undefined;\n    }\n    return JSON.parse(json) as JsonValue;\n  } catch {\n    return undefined;\n  }\n};\n\n/**\n * Detects plain objects (including objects with a null prototype).\n */\nconst isPlainObject = (value: unknown): value is Record<string, unknown> => {\n  if (value === null || typeof value !== 'object') {\n    return false;\n  }\n  const prototype = Object.getPrototypeOf(value as object);\n  return prototype === Object.prototype || prototype === null;\n};\n\n/**\n * Turns URLSearchParams into a sorted JSON object for deterministic keys.\n */\nconst serializeSearchParams = (params: URLSearchParams): JsonValue => {\n  const entries = Array.from(params.entries()).sort(([a], [b]) => a.localeCompare(b));\n  const result: Record<string, JsonValue> = {};\n\n  for (const [key, value] of entries) {\n    const existing = result[key];\n    if (existing === undefined) {\n      result[key] = value;\n      continue;\n    }\n\n    if (Array.isArray(existing)) {\n      (existing as string[]).push(value);\n    } else {\n      result[key] = [existing, value];\n    }\n  }\n\n  return result;\n};\n\n/**\n * Normalizes any accepted value into a JSON-friendly shape for query keys.\n */\nexport const serializeQueryKeyValue = (value: unknown): JsonValue | undefined => {\n  if (value === null) {\n    return null;\n  }\n\n  if (typeof value === 'string' || typeof value === 'number' || typeof value === 'boolean') {\n    return value;\n  }\n\n  if (value === undefined || typeof value === 'function' || typeof value === 'symbol') {\n    return undefined;\n  }\n\n  if (typeof value === 'bigint') {\n    return value.toString();\n  }\n\n  if (value instanceof Date) {\n    return value.toISOString();\n  }\n\n  if (Array.isArray(value)) {\n    return stringifyToJsonValue(value);\n  }\n\n  if (typeof URLSearchParams !== 'undefined' && value instanceof URLSearchParams) {\n    return serializeSearchParams(value);\n  }\n\n  if (isPlainObject(value)) {\n    return stringifyToJsonValue(value);\n  }\n\n  return undefined;\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/zod/v4/__snapshots__/3.1.x/v4/type-format/core/serverSentEvents.gen.ts",
    "content": "// 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 const 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            // Normalize line endings: CRLF -> LF, then CR -> LF\n            buffer = buffer.replace(/\\r\\n/g, '\\n').replace(/\\r/g, '\\n');\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"
  },
  {
    "path": "packages/openapi-ts-tests/zod/v4/__snapshots__/3.1.x/v4/type-format/core/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { Auth, AuthToken } from './auth.gen';\nimport type { BodySerializer, QuerySerializer, QuerySerializerOptions } from './bodySerializer.gen';\n\nexport type HttpMethod =\n  | 'connect'\n  | 'delete'\n  | 'get'\n  | 'head'\n  | 'options'\n  | 'patch'\n  | 'post'\n  | 'put'\n  | 'trace';\n\nexport type Client<\n  RequestFn = never,\n  Config = unknown,\n  MethodFn = never,\n  BuildUrlFn = never,\n  SseFn = never,\n> = {\n  /**\n   * Returns the final request URL.\n   */\n  buildUrl: BuildUrlFn;\n  getConfig: () => Config;\n  request: RequestFn;\n  setConfig: (config: Config) => Config;\n} & {\n  [K in HttpMethod]: MethodFn;\n} & ([SseFn] extends [never] ? { sse?: never } : { sse: { [K in HttpMethod]: SseFn } });\n\nexport interface Config {\n  /**\n   * Auth token or a function returning auth token. The resolved value will be\n   * added to the request payload as defined by its `security` array.\n   */\n  auth?: ((auth: Auth) => Promise<AuthToken> | AuthToken) | AuthToken;\n  /**\n   * A function for serializing request body parameter. By default,\n   * {@link JSON.stringify()} will be used.\n   */\n  bodySerializer?: BodySerializer | null;\n  /**\n   * An object containing any HTTP headers that you want to pre-populate your\n   * `Headers` object with.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/Headers/Headers#init See more}\n   */\n  headers?:\n    | RequestInit['headers']\n    | Record<\n        string,\n        string | number | boolean | (string | number | boolean)[] | null | undefined | unknown\n      >;\n  /**\n   * The request method.\n   *\n   * {@link https://developer.mozilla.org/docs/Web/API/fetch#method See more}\n   */\n  method?: Uppercase<HttpMethod>;\n  /**\n   * A function for serializing request query parameters. By default, arrays\n   * will be exploded in form style, objects will be exploded in deepObject\n   * style, and reserved characters are percent-encoded.\n   *\n   * This method will have no effect if the native `paramsSerializer()` Axios\n   * API function is used.\n   *\n   * {@link https://swagger.io/docs/specification/serialization/#query View examples}\n   */\n  querySerializer?: QuerySerializer | QuerySerializerOptions;\n  /**\n   * A function validating request data. This is useful if you want to ensure\n   * the request conforms to the desired shape, so it can be safely sent to\n   * the server.\n   */\n  requestValidator?: (data: unknown) => Promise<unknown>;\n  /**\n   * A function transforming response data before it's returned. This is useful\n   * for post-processing data, e.g. converting ISO strings into Date objects.\n   */\n  responseTransformer?: (data: unknown) => Promise<unknown>;\n  /**\n   * A function validating response data. This is useful if you want to ensure\n   * the response conforms to the desired shape, so it can be safely passed to\n   * the transformers and returned to the user.\n   */\n  responseValidator?: (data: unknown) => Promise<unknown>;\n}\n\ntype IsExactlyNeverOrNeverUndefined<T> = [T] extends [never]\n  ? true\n  : [T] extends [never | undefined]\n    ? [undefined] extends [T]\n      ? false\n      : true\n    : false;\n\nexport type OmitNever<T extends Record<string, unknown>> = {\n  [K in keyof T as IsExactlyNeverOrNeverUndefined<T[K]> extends true ? never : K]: T[K];\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/zod/v4/__snapshots__/3.1.x/v4/type-format/core/utils.gen.ts",
    "content": "// 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"
  },
  {
    "path": "packages/openapi-ts-tests/zod/v4/__snapshots__/3.1.x/v4/type-format/index.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport { type Options, postFoo } from './sdk.gen';\nexport type { Bar, ClientOptions, Foo, PostFooData, PostFooResponse, PostFooResponses, TypeID, UserId } from './types.gen';\n"
  },
  {
    "path": "packages/openapi-ts-tests/zod/v4/__snapshots__/3.1.x/v4/type-format/sdk.gen.ts",
    "content": "// 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 { postFooResponseTransformer } from './transformers.gen';\nimport type { PostFooData, PostFooResponses } from './types.gen';\nimport { zPostFooData, zPostFooResponse } from './zod.gen';\n\nexport type Options<TData extends TDataShape = TDataShape, ThrowOnError extends boolean = boolean> = Options2<TData, ThrowOnError> & {\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\nexport const postFoo = <ThrowOnError extends boolean = false>(options?: Options<PostFooData, ThrowOnError>) => (options?.client ?? client).post<PostFooResponses, unknown, ThrowOnError>({\n    requestValidator: async (data) => await zPostFooData.parseAsync(data),\n    responseTransformer: postFooResponseTransformer,\n    responseValidator: async (data) => await zPostFooResponse.parseAsync(data),\n    url: '/foo',\n    ...options\n});\n"
  },
  {
    "path": "packages/openapi-ts-tests/zod/v4/__snapshots__/3.1.x/v4/type-format/transformers.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { PostFooResponse } from './types.gen';\n\nconst fooSchemaResponseTransformer = (data: any) => {\n    data.foo = BigInt(data.foo.toString());\n    return data;\n};\n\nexport const postFooResponseTransformer = async (data: any): Promise<PostFooResponse> => {\n    data = fooSchemaResponseTransformer(data);\n    return data;\n};\n"
  },
  {
    "path": "packages/openapi-ts-tests/zod/v4/__snapshots__/3.1.x/v4/type-format/types.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nexport type ClientOptions = {\n    baseUrl: `${string}://${string}` | (string & {});\n};\n\nexport type TypeID<T extends string> = `${T}_${string}`;\n\nexport type UserId = TypeID<'user'>;\n\nexport type Foo = {\n    bar?: number;\n    foo: bigint;\n    id: UserId;\n};\n\nexport type Bar = {\n    foo: number;\n    [key: string]: number;\n};\n\nexport type PostFooData = {\n    body?: never;\n    path?: never;\n    query?: never;\n    url: '/foo';\n};\n\nexport type PostFooResponses = {\n    /**\n     * OK\n     */\n    200: Foo;\n};\n\nexport type PostFooResponse = PostFooResponses[keyof PostFooResponses];\n"
  },
  {
    "path": "packages/openapi-ts-tests/zod/v4/__snapshots__/3.1.x/v4/type-format/zod.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport * as z from 'zod';\n\nexport const zFoo = z.object({\n    bar: z.int().optional(),\n    foo: z.coerce.bigint().min(BigInt('-9223372036854775808'), { error: 'Invalid value: Expected int64 to be >= -9223372036854775808' }).max(BigInt('9223372036854775807'), { error: 'Invalid value: Expected int64 to be <= 9223372036854775807' }).default(BigInt(0)),\n    id: z.string()\n});\n\nexport const zBar = z.object({\n    foo: z.int()\n});\n\nexport const zPostFooData = z.object({\n    body: z.never().optional(),\n    path: z.never().optional(),\n    query: z.never().optional()\n});\n\n/**\n * OK\n */\nexport const zPostFooResponse = zFoo;\n"
  },
  {
    "path": "packages/openapi-ts-tests/zod/v4/__snapshots__/3.1.x/v4/validators/zod.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport * as z from 'zod';\n\nexport const zBaz = z.string().regex(/foo\\nbar/).readonly().default('baz');\n\nexport const zQux = z.record(z.string(), z.object({\n    qux: z.string().optional()\n}));\n\n/**\n * This is Foo schema.\n */\nexport const zFoo = z.object({\n    foo: z.string().regex(/^\\d{3}-\\d{2}-\\d{4}$/).optional(),\n    bar: z.lazy((): any => zBar).optional(),\n    baz: z.array(z.lazy((): any => zFoo)).optional(),\n    qux: z.int().gt(0).optional().default(0)\n}).nullable().default(null);\n\n/**\n * This is Bar schema.\n */\nexport const zBar = z.object({\n    foo: zFoo.optional()\n});\n\n/**\n * This is Foo parameter.\n */\nexport const zFoo2 = z.string();\n\nexport const zFoo3 = z.object({\n    foo: zBar.optional()\n});\n\nexport const zPatchFooData = z.object({\n    body: z.object({\n        foo: z.string().optional()\n    }),\n    path: z.never().optional(),\n    query: z.object({\n        foo: z.string().optional(),\n        bar: zBar.optional(),\n        baz: z.object({\n            baz: z.string().optional()\n        }).optional(),\n        qux: z.iso.date().optional(),\n        quux: z.iso.datetime().optional()\n    }).optional()\n});\n\nexport const zPostFooData = z.object({\n    body: zFoo3,\n    path: z.never().optional(),\n    query: z.never().optional()\n});\n"
  },
  {
    "path": "packages/openapi-ts-tests/zod/v4/__snapshots__/3.1.x/v4/validators-bigint-min-max/zod.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport * as z from 'zod';\n\nexport const zFoo = z.object({\n    foo: z.coerce.bigint().gte(BigInt(0)).lte(BigInt(100)).optional()\n});\n"
  },
  {
    "path": "packages/openapi-ts-tests/zod/v4/__snapshots__/3.1.x/v4/validators-circular-ref/zod.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport * as z from 'zod';\n\nexport const zBar = z.object({\n    bar: z.array(z.lazy((): any => zBar)).optional()\n});\n\nexport const zFoo = z.object({\n    foo: zBar.optional()\n});\n\nexport const zBaz = z.lazy((): any => zQux);\n\n/**\n * description caused circular reference error\n */\nexport const zQux = zBaz;\n"
  },
  {
    "path": "packages/openapi-ts-tests/zod/v4/__snapshots__/3.1.x/v4/validators-circular-ref-2/zod.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport * as z from 'zod';\n\nexport const zBar = z.object({\n    bar: z.array(z.lazy((): any => zBar)).nullable()\n});\n\nexport const zFoo = z.object({\n    foo: zBar\n});\n"
  },
  {
    "path": "packages/openapi-ts-tests/zod/v4/__snapshots__/3.1.x/v4/validators-dates/zod.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport * as z from 'zod';\n\nexport const zBaz = z.string().regex(/foo\\nbar/).readonly().default('baz');\n\nexport const zQux = z.record(z.string(), z.object({\n    qux: z.string().optional()\n}));\n\n/**\n * This is Foo schema.\n */\nexport const zFoo = z.object({\n    foo: z.string().regex(/^\\d{3}-\\d{2}-\\d{4}$/).optional(),\n    bar: z.lazy((): any => zBar).optional(),\n    baz: z.array(z.lazy((): any => zFoo)).optional(),\n    qux: z.int().gt(0).optional().default(0)\n}).nullable().default(null);\n\n/**\n * This is Bar schema.\n */\nexport const zBar = z.object({\n    foo: zFoo.optional()\n});\n\n/**\n * This is Foo parameter.\n */\nexport const zFoo2 = z.string();\n\nexport const zFoo3 = z.object({\n    foo: zBar.optional()\n});\n\nexport const zPatchFooData = z.object({\n    body: z.object({\n        foo: z.string().optional()\n    }),\n    path: z.never().optional(),\n    query: z.object({\n        foo: z.string().optional(),\n        bar: zBar.optional(),\n        baz: z.object({\n            baz: z.string().optional()\n        }).optional(),\n        qux: z.iso.date().optional(),\n        quux: z.iso.datetime({ offset: true }).optional()\n    }).optional()\n});\n\nexport const zPostFooData = z.object({\n    body: zFoo3,\n    path: z.never().optional(),\n    query: z.never().optional()\n});\n"
  },
  {
    "path": "packages/openapi-ts-tests/zod/v4/__snapshots__/3.1.x/v4/validators-metadata/zod.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport * as z from 'zod';\n\nexport const zBaz = z.string().regex(/foo\\nbar/).readonly().default('baz');\n\nexport const zQux = z.record(z.string(), z.object({\n    qux: z.string().optional()\n}));\n\n/**\n * This is Foo schema.\n */\nexport const zFoo = z.object({\n    foo: z.string().regex(/^\\d{3}-\\d{2}-\\d{4}$/).register(z.globalRegistry, {\n        description: 'This is foo property.'\n    }).optional(),\n    bar: z.lazy((): any => zBar).optional(),\n    baz: z.array(z.lazy((): any => zFoo)).register(z.globalRegistry, {\n        description: 'This is baz property.'\n    }).optional(),\n    qux: z.int().gt(0).register(z.globalRegistry, {\n        description: 'This is qux property.'\n    }).optional().default(0)\n}).nullable().default(null);\n\n/**\n * This is Bar schema.\n */\nexport const zBar = z.object({\n    foo: zFoo.optional()\n}).register(z.globalRegistry, {\n    description: 'This is Bar schema.'\n});\n\n/**\n * This is Foo parameter.\n */\nexport const zFoo2 = z.string().register(z.globalRegistry, {\n    description: 'This is Foo parameter.'\n});\n\nexport const zFoo3 = z.object({\n    foo: zBar.optional()\n});\n\nexport const zPatchFooData = z.object({\n    body: z.object({\n        foo: z.string().optional()\n    }),\n    path: z.never().optional(),\n    query: z.object({\n        foo: z.string().register(z.globalRegistry, {\n            description: 'This is Foo parameter.'\n        }).optional(),\n        bar: zBar.optional(),\n        baz: z.object({\n            baz: z.string().optional()\n        }).optional(),\n        qux: z.iso.date().optional(),\n        quux: z.iso.datetime().optional()\n    }).optional()\n});\n\nexport const zPostFooData = z.object({\n    body: zFoo3,\n    path: z.never().optional(),\n    query: z.never().optional()\n});\n"
  },
  {
    "path": "packages/openapi-ts-tests/zod/v4/__snapshots__/3.1.x/v4/validators-metadata-fn/zod.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport * as z from 'zod';\n\nexport const zBaz = z.string().regex(/foo\\nbar/).register(z.globalRegistry, { custom: 'value', title: 'string' }).readonly().default('baz');\n\nexport const zQux = z.record(z.string(), z.object({\n    qux: z.string().register(z.globalRegistry, { custom: 'value', title: 'string' }).optional()\n}).register(z.globalRegistry, { custom: 'value', title: 'object' })).register(z.globalRegistry, { custom: 'value', title: 'object' });\n\n/**\n * This is Foo schema.\n */\nexport const zFoo = z.object({\n    foo: z.string().regex(/^\\d{3}-\\d{2}-\\d{4}$/).register(z.globalRegistry, { custom: 'value', title: 'This is foo property.' }).optional(),\n    bar: z.lazy((): any => zBar).optional(),\n    baz: z.array(z.lazy((): any => zFoo)).register(z.globalRegistry, { custom: 'value', title: 'This is baz property.' }).optional(),\n    qux: z.int().gt(0).register(z.globalRegistry, { custom: 'value', title: 'This is qux property.' }).optional().default(0)\n}).register(z.globalRegistry, { custom: 'value', title: 'object' }).nullable().default(null);\n\n/**\n * This is Bar schema.\n */\nexport const zBar = z.object({\n    foo: zFoo.optional()\n}).register(z.globalRegistry, { custom: 'value', title: 'This is Bar schema.' });\n\n/**\n * This is Foo parameter.\n */\nexport const zFoo2 = z.string().register(z.globalRegistry, { custom: 'value', title: 'This is Foo parameter.' });\n\nexport const zFoo3 = z.object({\n    foo: zBar.optional()\n}).register(z.globalRegistry, { custom: 'value', title: 'object' });\n\nexport const zPatchFooData = z.object({\n    body: z.object({\n        foo: z.string().register(z.globalRegistry, { custom: 'value', title: 'string' }).optional()\n    }).register(z.globalRegistry, { custom: 'value', title: 'object' }),\n    path: z.never().register(z.globalRegistry, { custom: 'value', title: 'never' }).optional(),\n    query: z.object({\n        foo: z.string().register(z.globalRegistry, { custom: 'value', title: 'This is Foo parameter.' }).optional(),\n        bar: zBar.optional(),\n        baz: z.object({\n            baz: z.string().register(z.globalRegistry, { custom: 'value', title: 'string' }).optional()\n        }).register(z.globalRegistry, { custom: 'value', title: 'object' }).optional(),\n        qux: z.iso.date().register(z.globalRegistry, { custom: 'value', title: 'string' }).optional(),\n        quux: z.iso.datetime().register(z.globalRegistry, { custom: 'value', title: 'string' }).optional()\n    }).register(z.globalRegistry, { custom: 'value', title: 'object' }).optional()\n}).register(z.globalRegistry, { custom: 'value', title: 'object' });\n\nexport const zPostFooData = z.object({\n    body: zFoo3,\n    path: z.never().register(z.globalRegistry, { custom: 'value', title: 'never' }).optional(),\n    query: z.never().register(z.globalRegistry, { custom: 'value', title: 'never' }).optional()\n}).register(z.globalRegistry, { custom: 'value', title: 'object' });\n"
  },
  {
    "path": "packages/openapi-ts-tests/zod/v4/__snapshots__/3.1.x/v4/validators-string-constraints-union/zod.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport * as z from 'zod';\n\nexport const zLocaleOrLanguage = z.union([\n    z.string().length(5),\n    z.string().length(2)\n]);\n"
  },
  {
    "path": "packages/openapi-ts-tests/zod/v4/__snapshots__/3.1.x/v4/validators-types/zod.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport * as z from 'zod';\n\nexport const zBaz = z.string().regex(/foo\\nbar/).readonly().default('baz');\n\nexport type BazZodType = z.infer<typeof zBaz>;\n\nexport const zQux = z.record(z.string(), z.object({\n    qux: z.string().optional()\n}));\n\nexport type QuxZodType = z.infer<typeof zQux>;\n\n/**\n * This is Foo schema.\n */\nexport const zFoo = z.object({\n    foo: z.string().regex(/^\\d{3}-\\d{2}-\\d{4}$/).optional(),\n    bar: z.lazy((): any => zBar).optional(),\n    baz: z.array(z.lazy((): any => zFoo)).optional(),\n    qux: z.int().gt(0).optional().default(0)\n}).nullable().default(null);\n\nexport type FooZodType = z.infer<typeof zFoo>;\n\n/**\n * This is Bar schema.\n */\nexport const zBar = z.object({\n    foo: zFoo.optional()\n});\n\nexport type BarZodType = z.infer<typeof zBar>;\n\n/**\n * This is Foo parameter.\n */\nexport const zFoo2 = z.string();\n\nexport type FooZodType2 = z.infer<typeof zFoo2>;\n\nexport const zFoo3 = z.object({\n    foo: zBar.optional()\n});\n\nexport type FooZodType3 = z.infer<typeof zFoo3>;\n\nexport const zPatchFooData = z.object({\n    body: z.object({\n        foo: z.string().optional()\n    }),\n    path: z.never().optional(),\n    query: z.object({\n        foo: z.string().optional(),\n        bar: zBar.optional(),\n        baz: z.object({\n            baz: z.string().optional()\n        }).optional(),\n        qux: z.iso.date().optional(),\n        quux: z.iso.datetime().optional()\n    }).optional()\n});\n\nexport type PatchFooDataZodType = z.infer<typeof zPatchFooData>;\n\nexport const zPostFooData = z.object({\n    body: zFoo3,\n    path: z.never().optional(),\n    query: z.never().optional()\n});\n\nexport type PostFooDataZodType = z.infer<typeof zPostFooData>;\n"
  },
  {
    "path": "packages/openapi-ts-tests/zod/v4/__snapshots__/3.1.x/v4/validators-union-merge/zod.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport * as z from 'zod';\n\nexport const zContact = z.union([\n    z.object({\n        email: z.string()\n    }),\n    z.object({\n        phone: z.string()\n    })\n]);\n\nexport const zUser = zContact.and(z.object({\n    username: z.string()\n}));\n\nexport const zDogDetails = z.object({\n    breed: z.string(),\n    barkVolume: z.int().gte(1).lte(10)\n});\n\nexport const zCatDetails = z.object({\n    furLength: z.enum([\n        'short',\n        'medium',\n        'long'\n    ]),\n    purrs: z.boolean()\n});\n\nexport const zPetStore = z.object({\n    animals: z.array(z.object({\n        name: z.string(),\n        type: z.enum(['dog', 'cat']).optional(),\n        details: z.union([\n            zDogDetails,\n            zCatDetails\n        ])\n    }))\n});\n"
  },
  {
    "path": "packages/openapi-ts-tests/zod/v4/__snapshots__/3.1.x/v4/webhooks/zod.gen.ts",
    "content": "// This file is auto-generated by @hey-api/openapi-ts\n\nimport * as z from 'zod';\n\nexport const zSessionUserPhoneCalloutRingingWebhookRequest = z.object({\n    body: z.object({\n        event: z.string(),\n        event_ts: z.coerce.bigint().min(BigInt('-9223372036854775808'), { error: 'Invalid value: Expected int64 to be >= -9223372036854775808' }).max(BigInt('9223372036854775807'), { error: 'Invalid value: Expected int64 to be <= 9223372036854775807' }),\n        payload: z.object({\n            account_id: z.string(),\n            object: z.object({\n                id: z.coerce.bigint().min(BigInt('-9223372036854775808'), { error: 'Invalid value: Expected int64 to be >= -9223372036854775808' }).max(BigInt('9223372036854775807'), { error: 'Invalid value: Expected int64 to be <= 9223372036854775807' }).optional(),\n                uuid: z.string().optional(),\n                session_id: z.string(),\n                session_name: z.string(),\n                session_key: z.string(),\n                user_key: z.string(),\n                host_id: z.string(),\n                participant: z.object({\n                    invitee_name: z.string(),\n                    phone_number: z.coerce.bigint().min(BigInt('-9223372036854775808'), { error: 'Invalid value: Expected int64 to be >= -9223372036854775808' }).max(BigInt('9223372036854775807'), { error: 'Invalid value: Expected int64 to be <= 9223372036854775807' }),\n                    from_number: z.coerce.bigint().min(BigInt('-9223372036854775808'), { error: 'Invalid value: Expected int64 to be >= -9223372036854775808' }).max(BigInt('9223372036854775807'), { error: 'Invalid value: Expected int64 to be <= 9223372036854775807' })\n                })\n            })\n        })\n    }).optional(),\n    path: z.never().optional(),\n    query: z.never().optional()\n});\n\nexport const zSessionUserRoomSystemCalloutRingingWebhookRequest = z.object({\n    body: z.object({\n        event: z.string(),\n        event_ts: z.coerce.bigint().min(BigInt('-9223372036854775808'), { error: 'Invalid value: Expected int64 to be >= -9223372036854775808' }).max(BigInt('9223372036854775807'), { error: 'Invalid value: Expected int64 to be <= 9223372036854775807' }),\n        payload: z.object({\n            account_id: z.string(),\n            object: z.object({\n                id: z.coerce.bigint().min(BigInt('-9223372036854775808'), { error: 'Invalid value: Expected int64 to be >= -9223372036854775808' }).max(BigInt('9223372036854775807'), { error: 'Invalid value: Expected int64 to be <= 9223372036854775807' }).optional(),\n                uuid: z.string().optional(),\n                session_id: z.string(),\n                session_name: z.string(),\n                host_id: z.string(),\n                message_id: z.string(),\n                inviter_name: z.string(),\n                participant: z.object({\n                    call_type: z.string(),\n                    device_ip: z.string()\n                })\n            })\n        })\n    }).optional(),\n    path: z.never().optional(),\n    query: z.never().optional()\n});\n\nexport const zSessionRecordingStartedWebhookRequest = z.object({\n    body: z.object({\n        event: z.enum(['session.recording_started']),\n        event_ts: z.coerce.bigint().min(BigInt('-9223372036854775808'), { error: 'Invalid value: Expected int64 to be >= -9223372036854775808' }).max(BigInt('9223372036854775807'), { error: 'Invalid value: Expected int64 to be <= 9223372036854775807' }),\n        payload: z.object({\n            account_id: z.string(),\n            object: z.object({\n                session_id: z.string(),\n                session_name: z.string(),\n                session_key: z.string(),\n                start_time: z.iso.datetime(),\n                timezone: z.string(),\n                recording_file: z.object({\n                    recording_start: z.string().optional(),\n                    recording_end: z.string().optional()\n                })\n            })\n        })\n    }).optional(),\n    path: z.never().optional(),\n    query: z.never().optional()\n});\n\nexport const zSessionRecordingResumedWebhookRequest = z.object({\n    body: z.object({\n        event: z.enum(['session.recording_resumed']),\n        event_ts: z.coerce.bigint().min(BigInt('-9223372036854775808'), { error: 'Invalid value: Expected int64 to be >= -9223372036854775808' }).max(BigInt('9223372036854775807'), { error: 'Invalid value: Expected int64 to be <= 9223372036854775807' }),\n        payload: z.object({\n            account_id: z.string(),\n            object: z.object({\n                session_id: z.string(),\n                session_name: z.string(),\n                session_key: z.string(),\n                start_time: z.iso.datetime(),\n                timezone: z.string(),\n                recording_file: z.object({\n                    recording_start: z.string().optional(),\n                    recording_end: z.string().optional()\n                })\n            })\n        })\n    }).optional(),\n    path: z.never().optional(),\n    query: z.never().optional()\n});\n\nexport const zSessionLiveStreamingStoppedWebhookRequest = z.object({\n    body: z.object({\n        event: z.enum(['session.live_streaming_stopped']),\n        event_ts: z.coerce.bigint().min(BigInt('-9223372036854775808'), { error: 'Invalid value: Expected int64 to be >= -9223372036854775808' }).max(BigInt('9223372036854775807'), { error: 'Invalid value: Expected int64 to be <= 9223372036854775807' }),\n        payload: z.object({\n            account_id: z.string(),\n            object: z.object({\n                id: z.string(),\n                session_id: z.string(),\n                session_name: z.string(),\n                session_key: z.string().optional(),\n                start_time: z.iso.datetime(),\n                live_streaming: z.object({\n                    service: z.enum([\n                        'Facebook',\n                        'Workplace_by_Facebook',\n                        'YouTube',\n                        'Custom_Live_Streaming_Service'\n                    ]),\n                    custom_live_streaming_settings: z.object({\n                        stream_url: z.string(),\n                        stream_key: z.string(),\n                        page_url: z.string(),\n                        resolution: z.string().optional()\n                    }),\n                    date_time: z.iso.datetime()\n                })\n            })\n        })\n    }).optional(),\n    path: z.never().optional(),\n    query: z.never().optional()\n});\n\nexport const zSessionStreamIngestionStoppedWebhookRequest = z.object({\n    body: z.object({\n        event: z.enum(['session.stream_ingestion_stopped']),\n        event_ts: z.coerce.bigint().min(BigInt('-9223372036854775808'), { error: 'Invalid value: Expected int64 to be >= -9223372036854775808' }).max(BigInt('9223372036854775807'), { error: 'Invalid value: Expected int64 to be <= 9223372036854775807' }),\n        payload: z.object({\n            account_id: z.string(),\n            object: z.object({\n                session_id: z.string(),\n                session_name: z.string(),\n                session_key: z.string().optional(),\n                stream_ingestion: z.object({\n                    stream_id: z.string(),\n                    stream_name: z.string(),\n                    stream_description: z.string().optional(),\n                    stream_key: z.string(),\n                    stream_url: z.string(),\n                    backup_stream_url: z.string()\n                })\n            })\n        })\n    }).optional(),\n    path: z.never().optional(),\n    query: z.never().optional()\n});\n\nexport const zSessionUserRoomSystemCalloutRejectedWebhookRequest = z.object({\n    body: z.object({\n        event: z.string(),\n        event_ts: z.coerce.bigint().min(BigInt('-9223372036854775808'), { error: 'Invalid value: Expected int64 to be >= -9223372036854775808' }).max(BigInt('9223372036854775807'), { error: 'Invalid value: Expected int64 to be <= 9223372036854775807' }),\n        payload: z.object({\n            account_id: z.string(),\n            object: z.object({\n                id: z.coerce.bigint().min(BigInt('-9223372036854775808'), { error: 'Invalid value: Expected int64 to be >= -9223372036854775808' }).max(BigInt('9223372036854775807'), { error: 'Invalid value: Expected int64 to be <= 9223372036854775807' }).optional(),\n                uuid: z.string().optional(),\n                session_id: z.string(),\n                session_name: z.string(),\n                host_id: z.string(),\n                message_id: z.string(),\n                inviter_name: z.string(),\n                participant: z.object({\n                    call_type: z.string(),\n                    device_ip: z.string()\n                })\n            })\n        })\n    }).optional(),\n    path: z.never().optional(),\n    query: z.never().optional()\n});\n\nexport const zSessionAlertWebhookRequest = z.object({\n    body: z.object({\n        event: z.enum(['session.alert']),\n        event_ts: z.coerce.bigint().min(BigInt('-9223372036854775808'), { error: 'Invalid value: Expected int64 to be >= -9223372036854775808' }).max(BigInt('9223372036854775807'), { error: 'Invalid value: Expected int64 to be <= 9223372036854775807' }),\n        payload: z.object({\n            account_id: z.string(),\n            object: z.object({\n                id: z.string(),\n                session_id: z.string(),\n                session_name: z.string(),\n                session_key: z.string().optional(),\n                issues: z.array(z.enum([\n                    'Unstable audio quality',\n                    'Unstable video quality',\n                    'Unstable screen share quality',\n                    'High CPU occupation',\n                    'Call Reconnection'\n                ]))\n            })\n        })\n    }).optional(),\n    path: z.never().optional(),\n    query: z.never().optional()\n});\n\nexport const zSessionSharingEndedWebhookRequest = z.object({\n    body: z.object({\n        event: z.enum(['session.sharing_ended']),\n        event_ts: z.coerce.bigint().min(BigInt('-9223372036854775808'), { error: 'Invalid value: Expected int64 to be >= -9223372036854775808' }).max(BigInt('9223372036854775807'), { error: 'Invalid value: Expected int64 to be <= 9223372036854775807' }),\n        payload: z.object({\n            account_id: z.string(),\n            object: z.object({\n                id: z.string(),\n                session_id: z.string(),\n                session_name: z.string(),\n                session_key: z.string().optional(),\n                user: z.object({\n                    id: z.string(),\n                    name: z.string(),\n                    user_key: z.string().optional(),\n                    sharing_details: z.object({\n                        content: z.enum([\n                            'application',\n                            'whiteboard',\n                            'desktop',\n                            'unknown'\n                        ]),\n                        date_time: z.iso.datetime()\n                    })\n                })\n            })\n        })\n    }).optional(),\n    path: z.never().optional(),\n    query: z.never().optional()\n});\n\nexport const zSessionRecordingPausedWebhookRequest = z.object({\n    body: z.object({\n        event: z.enum(['session.recording_paused']),\n        event_ts: z.coerce.bigint().min(BigInt('-9223372036854775808'), { error: 'Invalid value: Expected int64 to be >= -9223372036854775808' }).max(BigInt('9223372036854775807'), { error: 'Invalid value: Expected int64 to be <= 9223372036854775807' }),\n        payload: z.object({\n            account_id: z.string(),\n            object: z.object({\n                session_id: z.string(),\n                session_name: z.string(),\n                session_key: z.string(),\n                start_time: z.iso.datetime(),\n                timezone: z.string(),\n                recording_file: z.object({\n                    recording_start: z.string().optional(),\n                    recording_end: z.string().optional()\n                })\n            })\n        })\n    }).optional(),\n    path: z.never().optional(),\n    query: z.never().optional()\n});\n\nexport const zSessionEndedWebhookRequest = z.object({\n    body: z.object({\n        event: z.enum(['session.ended']),\n        event_ts: z.coerce.bigint().min(BigInt('-9223372036854775808'), { error: 'Invalid value: Expected int64 to be >= -9223372036854775808' }).max(BigInt('9223372036854775807'), { error: 'Invalid value: Expected int64 to be <= 9223372036854775807' }),\n        payload: z.object({\n            account_id: z.string(),\n            object: z.object({\n                id: z.string(),\n                session_id: z.string(),\n                session_name: z.string(),\n                session_key: z.string().optional(),\n                start_time: z.iso.datetime(),\n                end_time: z.iso.datetime()\n            })\n        })\n    }).optional(),\n    path: z.never().optional(),\n    query: z.never().optional()\n});\n\nexport const zSessionStartedWebhookRequest = z.object({\n    body: z.object({\n        event: z.enum(['session.started']),\n        event_ts: z.coerce.bigint().min(BigInt('-9223372036854775808'), { error: 'Invalid value: Expected int64 to be >= -9223372036854775808' }).max(BigInt('9223372036854775807'), { error: 'Invalid value: Expected int64 to be <= 9223372036854775807' }),\n        payload: z.object({\n            account_id: z.string(),\n            object: z.object({\n                id: z.string(),\n                session_id: z.string(),\n                session_name: z.string(),\n                session_key: z.string().optional(),\n                start_time: z.iso.datetime()\n            })\n        })\n    }).optional(),\n    path: z.never().optional(),\n    query: z.never().optional()\n});\n\nexport const zSessionStreamIngestionUnbindWebhookRequest = z.object({\n    body: z.object({\n        event: z.enum(['session.stream_ingestion_unbind']),\n        event_ts: z.coerce.bigint().min(BigInt('-9223372036854775808'), { error: 'Invalid value: Expected int64 to be >= -9223372036854775808' }).max(BigInt('9223372036854775807'), { error: 'Invalid value: Expected int64 to be <= 9223372036854775807' }),\n        payload: z.object({\n            account_id: z.string(),\n            object: z.object({\n                session_id: z.string(),\n                session_name: z.string(),\n                session_key: z.string().optional(),\n                stream_ingestion: z.object({\n                    stream_id: z.string(),\n                    stream_name: z.string(),\n                    stream_description: z.string().optional(),\n                    stream_key: z.string(),\n                    stream_url: z.string(),\n                    backup_stream_url: z.string()\n                })\n            })\n        })\n    }).optional(),\n    path: z.never().optional(),\n    query: z.never().optional()\n});\n\nexport const zSessionLiveStreamingStartedWebhookRequest = z.object({\n    body: z.object({\n        event: z.enum(['session.live_streaming_started']),\n        event_ts: z.coerce.bigint().min(BigInt('-9223372036854775808'), { error: 'Invalid value: Expected int64 to be >= -9223372036854775808' }).max(BigInt('9223372036854775807'), { error: 'Invalid value: Expected int64 to be <= 9223372036854775807' }),\n        payload: z.object({\n            account_id: z.string(),\n            object: z.object({\n                id: z.string(),\n                session_id: z.string(),\n                session_name: z.string(),\n                session_key: z.string().optional(),\n                start_time: z.iso.datetime(),\n                live_streaming: z.object({\n                    service: z.enum([\n                        'Facebook',\n                        'Workplace_by_Facebook',\n                        'YouTube',\n                        'Custom_Live_Streaming_Service'\n                    ]),\n                    custom_live_streaming_settings: z.object({\n                        stream_url: z.string(),\n                        stream_key: z.string(),\n                        page_url: z.string(),\n                        resolution: z.string().optional()\n                    }),\n                    date_time: z.iso.datetime()\n                })\n            })\n        })\n    }).optional(),\n    path: z.never().optional(),\n    query: z.never().optional()\n});\n\nexport const zSessionUserRoomSystemCalloutMissedWebhookRequest = z.object({\n    body: z.object({\n        event: z.string(),\n        event_ts: z.coerce.bigint().min(BigInt('-9223372036854775808'), { error: 'Invalid value: Expected int64 to be >= -9223372036854775808' }).max(BigInt('9223372036854775807'), { error: 'Invalid value: Expected int64 to be <= 9223372036854775807' }),\n        payload: z.object({\n            account_id: z.string(),\n            object: z.object({\n                id: z.coerce.bigint().min(BigInt('-9223372036854775808'), { error: 'Invalid value: Expected int64 to be >= -9223372036854775808' }).max(BigInt('9223372036854775807'), { error: 'Invalid value: Expected int64 to be <= 9223372036854775807' }).optional(),\n                uuid: z.string().optional(),\n                session_id: z.string(),\n                session_name: z.string(),\n                host_id: z.string(),\n                message_id: z.string(),\n                inviter_name: z.string(),\n                participant: z.object({\n                    call_type: z.string(),\n                    device_ip: z.string()\n                })\n            })\n        })\n    }).optional(),\n    path: z.never().optional(),\n    query: z.never().optional()\n});\n\nexport const zSessionUserPhoneCalloutAcceptedWebhookRequest = z.object({\n    body: z.object({\n        event: z.string(),\n        event_ts: z.coerce.bigint().min(BigInt('-9223372036854775808'), { error: 'Invalid value: Expected int64 to be >= -9223372036854775808' }).max(BigInt('9223372036854775807'), { error: 'Invalid value: Expected int64 to be <= 9223372036854775807' }),\n        payload: z.object({\n            account_id: z.string(),\n            object: z.object({\n                id: z.coerce.bigint().min(BigInt('-9223372036854775808'), { error: 'Invalid value: Expected int64 to be >= -9223372036854775808' }).max(BigInt('9223372036854775807'), { error: 'Invalid value: Expected int64 to be <= 9223372036854775807' }).optional(),\n                uuid: z.string().optional(),\n                session_id: z.string(),\n                session_name: z.string(),\n                session_key: z.string(),\n                user_key: z.string(),\n                host_id: z.string(),\n                participant: z.object({\n                    invitee_name: z.string(),\n                    phone_number: z.coerce.bigint().min(BigInt('-9223372036854775808'), { error: 'Invalid value: Expected int64 to be >= -9223372036854775808' }).max(BigInt('9223372036854775807'), { error: 'Invalid value: Expected int64 to be <= 9223372036854775807' }),\n                    from_number: z.coerce.bigint().min(BigInt('-9223372036854775808'), { error: 'Invalid value: Expected int64 to be >= -9223372036854775808' }).max(BigInt('9223372036854775807'), { error: 'Invalid value: Expected int64 to be <= 9223372036854775807' })\n                })\n            })\n        })\n    }).optional(),\n    path: z.never().optional(),\n    query: z.never().optional()\n});\n\nexport const zSessionUserLeftWebhookRequest = z.object({\n    body: z.object({\n        event: z.enum(['session.user_left']),\n        event_ts: z.coerce.bigint().min(BigInt('-9223372036854775808'), { error: 'Invalid value: Expected int64 to be >= -9223372036854775808' }).max(BigInt('9223372036854775807'), { error: 'Invalid value: Expected int64 to be <= 9223372036854775807' }),\n        payload: z.object({\n            account_id: z.string(),\n            object: z.object({\n                id: z.string(),\n                session_id: z.string(),\n                session_name: z.string(),\n                session_key: z.string().optional(),\n                user: z.object({\n                    id: z.string(),\n                    name: z.string(),\n                    leave_time: z.iso.datetime(),\n                    leave_reason: z.string().optional(),\n                    user_key: z.string().optional(),\n                    phone_number: z.string().optional(),\n                    participant_uuid: z.string()\n                })\n            })\n        })\n    }).optional(),\n    path: z.never().optional(),\n    query: z.never().optional()\n});\n\nexport const zSessionSharingStartedWebhookRequest = z.object({\n    body: z.object({\n        event: z.enum(['session.sharing_started']),\n        event_ts: z.coerce.bigint().min(BigInt('-9223372036854775808'), { error: 'Invalid value: Expected int64 to be >= -9223372036854775808' }).max(BigInt('9223372036854775807'), { error: 'Invalid value: Expected int64 to be <= 9223372036854775807' }),\n        payload: z.object({\n            account_id: z.string(),\n            object: z.object({\n                id: z.string(),\n                session_id: z.string(),\n                session_name: z.string(),\n                session_key: z.string().optional(),\n                user: z.object({\n                    id: z.string(),\n                    name: z.string(),\n                    user_key: z.string().optional(),\n                    sharing_details: z.object({\n                        content: z.enum([\n                            'application',\n                            'whiteboard',\n                            'desktop',\n                            'unknown'\n                        ]),\n                        date_time: z.iso.datetime()\n                    })\n                })\n            })\n        })\n    }).optional(),\n    path: z.never().optional(),\n    query: z.never().optional()\n});\n\nexport const zSessionUserPhoneCalloutCanceledWebhookRequest = z.object({\n    body: z.object({\n        event: z.string(),\n        event_ts: z.coerce.bigint().min(BigInt('-9223372036854775808'), { error: 'Invalid value: Expected int64 to be >= -9223372036854775808' }).max(BigInt('9223372036854775807'), { error: 'Invalid value: Expected int64 to be <= 9223372036854775807' }),\n        payload: z.object({\n            account_id: z.string(),\n            object: z.object({\n                session_id: z.string(),\n                session_name: z.string(),\n                session_key: z.string(),\n                user_key: z.string(),\n                participant: z.object({\n                    invitee_name: z.string(),\n                    phone_number: z.coerce.bigint().min(BigInt('-9223372036854775808'), { error: 'Invalid value: Expected int64 to be >= -9223372036854775808' }).max(BigInt('9223372036854775807'), { error: 'Invalid value: Expected int64 to be <= 9223372036854775807' }),\n                    from_number: z.coerce.bigint().min(BigInt('-9223372036854775808'), { error: 'Invalid value: Expected int64 to be >= -9223372036854775808' }).max(BigInt('9223372036854775807'), { error: 'Invalid value: Expected int64 to be <= 9223372036854775807' })\n                })\n            })\n        })\n    }).optional(),\n    path: z.never().optional(),\n    query: z.never().optional()\n});\n\nexport const zSessionRecordingTranscriptCompletedWebhookRequest = z.object({\n    body: z.object({\n        event: z.enum(['session.recording_transcript_completed']),\n        event_ts: z.coerce.bigint().min(BigInt('-9223372036854775808'), { error: 'Invalid value: Expected int64 to be >= -9223372036854775808' }).max(BigInt('9223372036854775807'), { error: 'Invalid value: Expected int64 to be <= 9223372036854775807' }),\n        download_token: z.string(),\n        payload: z.object({\n            account_id: z.string(),\n            object: z.object({\n                session_id: z.string(),\n                session_name: z.string(),\n                session_key: z.string(),\n                start_time: z.iso.datetime(),\n                timezone: z.string(),\n                recording_files: z.array(z.object({\n                    id: z.string().optional(),\n                    recording_start: z.string().optional(),\n                    recording_end: z.string().optional(),\n                    file_name: z.string().optional(),\n                    file_path: z.string().optional(),\n                    file_type: z.enum([\n                        'MP4',\n                        'M4A',\n                        'CHAT',\n                        'TRANSCRIPT',\n                        'CSV',\n                        'CC',\n                        'TB',\n                        'CHAT_MESSAGE',\n                        'TIMELINE'\n                    ]).optional(),\n                    file_size: z.number().optional(),\n                    file_extension: z.enum([\n                        'MP4',\n                        'M4A',\n                        'TXT',\n                        'VTT',\n                        'CSV',\n                        'JSON',\n                        'JPG'\n                    ]).optional(),\n                    download_url: z.string().optional(),\n                    status: z.enum(['completed']).optional(),\n                    recording_type: z.enum([\n                        'shared_screen_with_speaker_view(CC)',\n                        'shared_screen_with_speaker_view',\n                        'shared_screen_with_gallery_view',\n                        'gallery_view',\n                        'shared_screen',\n                        'audio_only',\n                        'audio_transcript',\n                        'chat_file',\n                        'active_speaker',\n                        'host_video',\n                        'audio_only_each_participant',\n                        'cc_transcript',\n                        'closed_caption',\n                        'poll',\n                        'timeline',\n                        'thumbnail',\n                        'chat_message'\n                    ]).optional()\n                }))\n            })\n        })\n    }).optional(),\n    path: z.never().optional(),\n    query: z.never().optional()\n});\n\nexport const zSessionRecordingDeletedWebhookRequest = z.object({\n    body: z.object({\n        event: z.enum(['session.recording_deleted']),\n        event_ts: z.coerce.bigint().min(BigInt('-9223372036854775808'), { error: 'Invalid value: Expected int64 to be >= -9223372036854775808' }).max(BigInt('9223372036854775807'), { error: 'Invalid value: Expected int64 to be <= 9223372036854775807' }),\n        payload: z.object({\n            account_id: z.string(),\n            operator: z.email(),\n            operator_id: z.string(),\n            object: z.object({\n                session_id: z.string(),\n                session_name: z.string(),\n                session_key: z.string(),\n                start_time: z.iso.datetime(),\n                timezone: z.string()\n            })\n        })\n    }).optional(),\n    path: z.never().optional(),\n    query: z.never().optional()\n});\n\nexport const zSessionUserRoomSystemCalloutFailedWebhookRequest = z.object({\n    body: z.object({\n        event: z.string(),\n        event_ts: z.coerce.bigint().min(BigInt('-9223372036854775808'), { error: 'Invalid value: Expected int64 to be >= -9223372036854775808' }).max(BigInt('9223372036854775807'), { error: 'Invalid value: Expected int64 to be <= 9223372036854775807' }),\n        payload: z.object({\n            account_id: z.string(),\n            object: z.object({\n                id: z.coerce.bigint().min(BigInt('-9223372036854775808'), { error: 'Invalid value: Expected int64 to be >= -9223372036854775808' }).max(BigInt('9223372036854775807'), { error: 'Invalid value: Expected int64 to be <= 9223372036854775807' }).optional(),\n                uuid: z.string().optional(),\n                session_id: z.string(),\n                session_name: z.string(),\n                host_id: z.string(),\n                message_id: z.string(),\n                inviter_name: z.string(),\n                reason_type: z.union([\n                    z.literal(0),\n                    z.literal(1),\n                    z.literal(2),\n                    z.literal(3),\n                    z.literal(4),\n                    z.literal(7),\n                    z.literal(8),\n                    z.literal(9),\n                    z.literal(10),\n                    z.literal(11),\n                    z.literal(12),\n                    z.literal(13),\n                    z.literal(14)\n                ]),\n                participant: z.object({\n                    call_type: z.string(),\n                    device_ip: z.string()\n                })\n            })\n        })\n    }).optional(),\n    path: z.never().optional(),\n    query: z.never().optional()\n});\n\nexport const zSessionRecordingCompletedWebhookRequest = z.object({\n    body: z.object({\n        event: z.enum(['session.recording_completed']),\n        event_ts: z.coerce.bigint().min(BigInt('-9223372036854775808'), { error: 'Invalid value: Expected int64 to be >= -9223372036854775808' }).max(BigInt('9223372036854775807'), { error: 'Invalid value: Expected int64 to be <= 9223372036854775807' }),\n        download_token: z.string(),\n        payload: z.object({\n            account_id: z.string(),\n            object: z.object({\n                session_id: z.string(),\n                session_name: z.string(),\n                session_key: z.string(),\n                start_time: z.iso.datetime(),\n                timezone: z.string(),\n                recording_files: z.array(z.object({\n                    id: z.string().optional(),\n                    recording_start: z.string().optional(),\n                    recording_end: z.string().optional(),\n                    file_name: z.string().optional(),\n                    file_path: z.string().optional(),\n                    file_type: z.enum([\n                        'MP4',\n                        'M4A',\n                        'CHAT',\n                        'TRANSCRIPT',\n                        'CSV',\n                        'CC',\n                        'TB',\n                        'CHAT_MESSAGE'\n                    ]).optional(),\n                    file_size: z.number().optional(),\n                    file_extension: z.enum([\n                        'MP4',\n                        'M4A',\n                        'TXT',\n                        'VTT',\n                        'CSV',\n                        'JSON',\n                        'JPG'\n                    ]).optional(),\n                    download_url: z.string().optional(),\n                    status: z.enum(['completed']).optional(),\n                    recording_type: z.enum([\n                        'shared_screen_with_speaker_view(CC)',\n                        'shared_screen_with_speaker_view',\n                        'shared_screen_with_gallery_view',\n                        'gallery_view',\n                        'shared_screen',\n                        'audio_only',\n                        'audio_transcript',\n                        'chat_file',\n                        'active_speaker',\n                        'host_video',\n                        'audio_only_each_participant',\n                        'cc_transcript',\n                        'closed_caption',\n                        'poll',\n                        'timeline',\n                        'thumbnail',\n                        'chat_message'\n                    ]).optional()\n                })),\n                participant_audio_files: z.array(z.object({\n                    id: z.string().optional(),\n                    recording_start: z.string().optional(),\n                    recording_end: z.string().optional(),\n                    file_name: z.string().optional(),\n                    file_path: z.string().optional(),\n                    file_type: z.enum([\n                        'MP4',\n                        'M4A',\n                        'CHAT',\n                        'TRANSCRIPT',\n                        'CSV',\n                        'CC',\n                        'TB',\n                        'CHAT_MESSAGE'\n                    ]).optional(),\n                    file_size: z.number().optional(),\n                    file_extension: z.enum([\n                        'MP4',\n                        'M4A',\n                        'TXT',\n                        'VTT',\n                        'CSV',\n                        'JSON',\n                        'JPG'\n                    ]).optional(),\n                    download_url: z.string().optional(),\n                    status: z.enum(['completed']).optional(),\n                    recording_type: z.enum([\n                        'shared_screen_with_speaker_view(CC)',\n                        'shared_screen_with_speaker_view',\n                        'shared_screen_with_gallery_view',\n                        'gallery_view',\n                        'shared_screen',\n                        'audio_only',\n                        'audio_transcript',\n                        'chat_file',\n                        'active_speaker',\n                        'host_video',\n                        'audio_only_each_participant',\n                        'cc_transcript',\n                        'closed_caption',\n                        'poll',\n                        'timeline',\n                        'thumbnail',\n                        'chat_message'\n                    ]).optional(),\n                    user_id: z.string().optional(),\n                    user_key: z.string().optional()\n                })).optional(),\n                participant_video_files: z.array(z.object({\n                    id: z.string().optional(),\n                    recording_start: z.string().optional(),\n                    recording_end: z.string().optional(),\n                    file_name: z.string().optional(),\n                    file_path: z.string().optional(),\n                    file_type: z.enum(['MP4']).optional(),\n                    file_size: z.number().optional(),\n                    file_extension: z.enum(['MP4']).optional(),\n                    download_url: z.string().optional(),\n                    status: z.enum(['completed']).optional(),\n                    recording_type: z.enum(['individual_user', 'individual_shared_screen']).optional(),\n                    user_id: z.string().optional(),\n                    user_key: z.string().optional()\n                })).optional()\n            })\n        })\n    }).optional(),\n    path: z.never().optional(),\n    query: z.never().optional()\n});\n\nexport const zSessionRecordingTranscriptFailedWebhookRequest = z.object({\n    body: z.object({\n        event: z.enum(['session.recording_transcript_failed']),\n        event_ts: z.coerce.bigint().min(BigInt('-9223372036854775808'), { error: 'Invalid value: Expected int64 to be >= -9223372036854775808' }).max(BigInt('9223372036854775807'), { error: 'Invalid value: Expected int64 to be <= 9223372036854775807' }),\n        payload: z.object({\n            account_id: z.string(),\n            object: z.object({\n                session_id: z.string(),\n                session_name: z.string(),\n                session_key: z.string(),\n                start_time: z.iso.datetime(),\n                timezone: z.string()\n            })\n        })\n    }).optional(),\n    path: z.never().optional(),\n    query: z.never().optional()\n});\n\nexport const zSessionRecordingTrashedWebhookRequest = z.object({\n    body: z.object({\n        event: z.enum(['session.recording_trashed']),\n        event_ts: z.coerce.bigint().min(BigInt('-9223372036854775808'), { error: 'Invalid value: Expected int64 to be >= -9223372036854775808' }).max(BigInt('9223372036854775807'), { error: 'Invalid value: Expected int64 to be <= 9223372036854775807' }),\n        payload: z.object({\n            account_id: z.string(),\n            operator: z.email(),\n            operator_id: z.string(),\n            object: z.object({\n                session_id: z.string(),\n                session_name: z.string(),\n                session_key: z.string(),\n                start_time: z.iso.datetime(),\n                timezone: z.string()\n            })\n        })\n    }).optional(),\n    path: z.never().optional(),\n    query: z.never().optional()\n});\n\nexport const zSessionUserJoinedWebhookRequest = z.object({\n    body: z.object({\n        event: z.enum(['session.user_joined']),\n        event_ts: z.coerce.bigint().min(BigInt('-9223372036854775808'), { error: 'Invalid value: Expected int64 to be >= -9223372036854775808' }).max(BigInt('9223372036854775807'), { error: 'Invalid value: Expected int64 to be <= 9223372036854775807' }),\n        payload: z.object({\n            account_id: z.string(),\n            object: z.object({\n                id: z.string(),\n                session_id: z.string(),\n                session_name: z.string(),\n                session_key: z.string().optional(),\n                user: z.object({\n                    id: z.string(),\n                    name: z.string(),\n                    join_time: z.iso.datetime(),\n                    user_key: z.string().optional(),\n                    phone_number: z.string().optional(),\n                    participant_uuid: z.string()\n                })\n            })\n        })\n    }).optional(),\n    path: z.never().optional(),\n    query: z.never().optional()\n});\n\nexport const zSessionStreamIngestionStartedWebhookRequest = z.object({\n    body: z.object({\n        event: z.enum(['session.stream_ingestion_started']),\n        event_ts: z.coerce.bigint().min(BigInt('-9223372036854775808'), { error: 'Invalid value: Expected int64 to be >= -9223372036854775808' }).max(BigInt('9223372036854775807'), { error: 'Invalid value: Expected int64 to be <= 9223372036854775807' }),\n        payload: z.object({\n            account_id: z.string(),\n            object: z.object({\n                session_id: z.string(),\n                session_name: z.string(),\n                session_key: z.string().optional(),\n                stream_ingestion: z.object({\n                    stream_id: z.string(),\n                    stream_name: z.string(),\n                    stream_description: z.string().optional(),\n                    stream_key: z.string(),\n                    stream_url: z.string(),\n                    backup_stream_url: z.string()\n                })\n            })\n        })\n    }).optional(),\n    path: z.never().optional(),\n    query: z.never().optional()\n});\n\nexport const zSessionStreamIngestionConnectedWebhookRequest = z.object({\n    body: z.object({\n        event: z.enum(['session.stream_ingestion_connected']),\n        event_ts: z.coerce.bigint().min(BigInt('-9223372036854775808'), { error: 'Invalid value: Expected int64 to be >= -9223372036854775808' }).max(BigInt('9223372036854775807'), { error: 'Invalid value: Expected int64 to be <= 9223372036854775807' }),\n        payload: z.object({\n            account_id: z.string(),\n            object: z.object({\n                session_id: z.string(),\n                session_name: z.string(),\n                session_key: z.string().optional(),\n                stream_ingestion: z.object({\n                    stream_id: z.string(),\n                    stream_name: z.string(),\n                    stream_description: z.string().optional(),\n                    stream_key: z.string(),\n                    stream_url: z.string(),\n                    backup_stream_url: z.string()\n                })\n            })\n        })\n    }).optional(),\n    path: z.never().optional(),\n    query: z.never().optional()\n});\n\nexport const zSessionStreamIngestionDisconnectedWebhookRequest = z.object({\n    body: z.object({\n        event: z.enum(['session.stream_ingestion_disconnected']),\n        event_ts: z.coerce.bigint().min(BigInt('-9223372036854775808'), { error: 'Invalid value: Expected int64 to be >= -9223372036854775808' }).max(BigInt('9223372036854775807'), { error: 'Invalid value: Expected int64 to be <= 9223372036854775807' }),\n        payload: z.object({\n            account_id: z.string(),\n            object: z.object({\n                session_id: z.string(),\n                session_name: z.string(),\n                session_key: z.string().optional(),\n                stream_ingestion: z.object({\n                    stream_id: z.string(),\n                    stream_name: z.string(),\n                    stream_description: z.string().optional(),\n                    stream_key: z.string(),\n                    stream_url: z.string(),\n                    backup_stream_url: z.string()\n                })\n            })\n        })\n    }).optional(),\n    path: z.never().optional(),\n    query: z.never().optional()\n});\n\nexport const zSessionRecordingRecoveredWebhookRequest = z.object({\n    body: z.object({\n        event: z.enum(['session.recording_recovered']),\n        event_ts: z.coerce.bigint().min(BigInt('-9223372036854775808'), { error: 'Invalid value: Expected int64 to be >= -9223372036854775808' }).max(BigInt('9223372036854775807'), { error: 'Invalid value: Expected int64 to be <= 9223372036854775807' }),\n        payload: z.object({\n            account_id: z.string(),\n            operator: z.email(),\n            operator_id: z.string(),\n            object: z.object({\n                session_id: z.string(),\n                session_name: z.string(),\n                session_key: z.string(),\n                start_time: z.iso.datetime(),\n                timezone: z.string()\n            })\n        })\n    }).optional(),\n    path: z.never().optional(),\n    query: z.never().optional()\n});\n\nexport const zSessionUserPhoneCalloutMissedWebhookRequest = z.object({\n    body: z.object({\n        event: z.string(),\n        event_ts: z.coerce.bigint().min(BigInt('-9223372036854775808'), { error: 'Invalid value: Expected int64 to be >= -9223372036854775808' }).max(BigInt('9223372036854775807'), { error: 'Invalid value: Expected int64 to be <= 9223372036854775807' }),\n        payload: z.object({\n            account_id: z.string(),\n            object: z.object({\n                id: z.coerce.bigint().min(BigInt('-9223372036854775808'), { error: 'Invalid value: Expected int64 to be >= -9223372036854775808' }).max(BigInt('9223372036854775807'), { error: 'Invalid value: Expected int64 to be <= 9223372036854775807' }).optional(),\n                uuid: z.string().optional(),\n                session_id: z.string(),\n                session_name: z.string(),\n                session_key: z.string(),\n                user_key: z.string(),\n                host_id: z.string(),\n                participant: z.object({\n                    invitee_name: z.string(),\n                    phone_number: z.coerce.bigint().min(BigInt('-9223372036854775808'), { error: 'Invalid value: Expected int64 to be >= -9223372036854775808' }).max(BigInt('9223372036854775807'), { error: 'Invalid value: Expected int64 to be <= 9223372036854775807' }),\n                    from_number: z.coerce.bigint().min(BigInt('-9223372036854775808'), { error: 'Invalid value: Expected int64 to be >= -9223372036854775808' }).max(BigInt('9223372036854775807'), { error: 'Invalid value: Expected int64 to be <= 9223372036854775807' })\n                })\n            })\n        })\n    }).optional(),\n    path: z.never().optional(),\n    query: z.never().optional()\n});\n\nexport const zSessionUserPhoneCalloutRejectedWebhookRequest = z.object({\n    body: z.object({\n        event: z.string(),\n        event_ts: z.coerce.bigint().min(BigInt('-9223372036854775808'), { error: 'Invalid value: Expected int64 to be >= -9223372036854775808' }).max(BigInt('9223372036854775807'), { error: 'Invalid value: Expected int64 to be <= 9223372036854775807' }),\n        payload: z.object({\n            account_id: z.string(),\n            object: z.object({\n                id: z.coerce.bigint().min(BigInt('-9223372036854775808'), { error: 'Invalid value: Expected int64 to be >= -9223372036854775808' }).max(BigInt('9223372036854775807'), { error: 'Invalid value: Expected int64 to be <= 9223372036854775807' }).optional(),\n                uuid: z.string().optional(),\n                session_id: z.string(),\n                session_name: z.string(),\n                session_key: z.string(),\n                user_key: z.string(),\n                host_id: z.string(),\n                participant: z.object({\n                    invitee_name: z.string(),\n                    phone_number: z.coerce.bigint().min(BigInt('-9223372036854775808'), { error: 'Invalid value: Expected int64 to be >= -9223372036854775808' }).max(BigInt('9223372036854775807'), { error: 'Invalid value: Expected int64 to be <= 9223372036854775807' }),\n                    from_number: z.coerce.bigint().min(BigInt('-9223372036854775808'), { error: 'Invalid value: Expected int64 to be >= -9223372036854775808' }).max(BigInt('9223372036854775807'), { error: 'Invalid value: Expected int64 to be <= 9223372036854775807' })\n                })\n            })\n        })\n    }).optional(),\n    path: z.never().optional(),\n    query: z.never().optional()\n});\n\nexport const zSessionUserRoomSystemCalloutAcceptedWebhookRequest = z.object({\n    body: z.object({\n        event: z.string(),\n        event_ts: z.coerce.bigint().min(BigInt('-9223372036854775808'), { error: 'Invalid value: Expected int64 to be >= -9223372036854775808' }).max(BigInt('9223372036854775807'), { error: 'Invalid value: Expected int64 to be <= 9223372036854775807' }),\n        payload: z.object({\n            account_id: z.string(),\n            object: z.object({\n                id: z.coerce.bigint().min(BigInt('-9223372036854775808'), { error: 'Invalid value: Expected int64 to be >= -9223372036854775808' }).max(BigInt('9223372036854775807'), { error: 'Invalid value: Expected int64 to be <= 9223372036854775807' }).optional(),\n                uuid: z.string().optional(),\n                session_id: z.string(),\n                session_name: z.string(),\n                host_id: z.string(),\n                message_id: z.string(),\n                inviter_name: z.string(),\n                participant: z.object({\n                    call_type: z.string(),\n                    device_ip: z.string()\n                })\n            })\n        })\n    }).optional(),\n    path: z.never().optional(),\n    query: z.never().optional()\n});\n\nexport const zSessionRecordingStoppedWebhookRequest = z.object({\n    body: z.object({\n        event: z.enum(['session.recording_stopped']),\n        event_ts: z.coerce.bigint().min(BigInt('-9223372036854775808'), { error: 'Invalid value: Expected int64 to be >= -9223372036854775808' }).max(BigInt('9223372036854775807'), { error: 'Invalid value: Expected int64 to be <= 9223372036854775807' }),\n        payload: z.object({\n            account_id: z.string(),\n            object: z.object({\n                session_id: z.string(),\n                session_name: z.string(),\n                session_key: z.string(),\n                start_time: z.iso.datetime(),\n                timezone: z.string(),\n                recording_file: z.object({\n                    recording_start: z.string().optional(),\n                    recording_end: z.string().optional()\n                })\n            })\n        })\n    }).optional(),\n    path: z.never().optional(),\n    query: z.never().optional()\n});\n"
  },
  {
    "path": "packages/openapi-ts-tests/zod/v4/package.json",
    "content": "{\n  \"name\": \"@test/openapi-ts-zod-v4\",\n  \"version\": \"0.0.0\",\n  \"private\": true,\n  \"type\": \"module\",\n  \"scripts\": {\n    \"typecheck\": \"tsgo --noEmit\"\n  },\n  \"devDependencies\": {\n    \"@hey-api/openapi-ts\": \"workspace:*\",\n    \"typescript\": \"5.9.3\",\n    \"zod\": \"4.3.6\"\n  },\n  \"engines\": {\n    \"node\": \">=20.19.0\"\n  }\n}\n"
  },
  {
    "path": "packages/openapi-ts-tests/zod/v4/test/3.0.x.test.ts",
    "content": "import fs from 'node:fs';\nimport path from 'node:path';\n\nimport { createClient } from '@hey-api/openapi-ts';\n\nimport { getFilePaths } from '../../../utils';\nimport { createZodConfig, getSnapshotsPath, getTempSnapshotsPath, zodVersions } from './utils';\n\nconst version = '3.0.x';\n\nfor (const zodVersion of zodVersions) {\n  const outputDir = path.join(getTempSnapshotsPath(), version, zodVersion.folder);\n  const snapshotsDir = path.join(getSnapshotsPath(), version, zodVersion.folder);\n\n  describe(`OpenAPI ${version}`, () => {\n    const createConfig = createZodConfig({\n      openApiVersion: version,\n      outputDir,\n      zodVersion,\n    });\n\n    const scenarios = [\n      {\n        config: createConfig({\n          input: 'array-items-one-of-length-1.yaml',\n          output: 'array-items-one-of-length-1',\n        }),\n        description: 'generates correct array when items are oneOf array with single item',\n      },\n      {\n        config: createConfig({\n          input: 'circular.yaml',\n          output: 'circular',\n        }),\n        description: 'generates circular schemas',\n      },\n      {\n        config: createConfig({\n          input: 'enum-null.json',\n          output: 'enum-null',\n        }),\n        description: 'handles null enums',\n      },\n      {\n        config: createConfig({\n          input: 'validators.json',\n          output: 'validators',\n        }),\n        description: 'generates validator schemas',\n      },\n    ];\n\n    it.each(scenarios)('$description', async ({ config }) => {\n      await createClient(config);\n\n      const filePaths = getFilePaths(config.output);\n\n      await Promise.all(\n        filePaths.map(async (filePath) => {\n          const fileContent = fs.readFileSync(filePath, 'utf-8');\n          await expect(fileContent).toMatchFileSnapshot(\n            path.join(snapshotsDir, filePath.slice(outputDir.length + 1)),\n          );\n        }),\n      );\n    });\n  });\n}\n"
  },
  {
    "path": "packages/openapi-ts-tests/zod/v4/test/3.1.x.test.ts",
    "content": "import fs from 'node:fs';\nimport path from 'node:path';\n\nimport { createClient } from '@hey-api/openapi-ts';\n\nimport { getFilePaths } from '../../../utils';\nimport { createZodConfig, getSnapshotsPath, getTempSnapshotsPath, zodVersions } from './utils';\n\nconst version = '3.1.x';\n\nfor (const zodVersion of zodVersions) {\n  const outputDir = path.join(getTempSnapshotsPath(), version, zodVersion.folder);\n  const snapshotsDir = path.join(getSnapshotsPath(), version, zodVersion.folder);\n\n  describe(`OpenAPI ${version}`, () => {\n    const createConfig = createZodConfig({\n      openApiVersion: version,\n      outputDir,\n      zodVersion,\n    });\n\n    const scenarios = [\n      {\n        config: createConfig({\n          input: 'array-items-one-of-length-1.yaml',\n          output: 'array-items-one-of-length-1',\n        }),\n        description: 'generates correct array when items are oneOf array with single item',\n      },\n      {\n        config: createConfig({\n          input: 'defaults-with-ref-and-anyof.json',\n          output: 'defaults-with-ref-and-anyof',\n        }),\n        description: 'preserves defaults with $ref and anyOf',\n      },\n      {\n        config: createConfig({\n          input: 'enum-null.json',\n          output: 'enum-null',\n        }),\n        description: 'handles null enums',\n      },\n      {\n        config: createConfig({\n          input: 'schema-const.yaml',\n          output: 'schema-const',\n        }),\n        description: 'handles various constants',\n      },\n      {\n        config: createConfig({\n          input: 'validators.yaml',\n          output: 'validators',\n        }),\n        description: 'generates validator schemas',\n      },\n      {\n        config: createConfig({\n          input: 'validators.yaml',\n          output: 'validators-dates',\n          plugins: [\n            {\n              compatibilityVersion: zodVersion.compatibilityVersion,\n              dates: {\n                offset: true,\n              },\n              name: 'zod',\n            },\n          ],\n        }),\n        description: 'generates validator schemas with any offset',\n      },\n      {\n        config: createConfig({\n          input: 'validators.yaml',\n          output: 'validators-metadata',\n          plugins: [\n            {\n              compatibilityVersion: zodVersion.compatibilityVersion,\n              metadata: true,\n              name: 'zod',\n            },\n          ],\n        }),\n        description: 'generates validator schemas with metadata',\n      },\n      {\n        config: createConfig({\n          input: 'validators.yaml',\n          output: 'validators-metadata-fn',\n          plugins: [\n            {\n              compatibilityVersion: zodVersion.compatibilityVersion,\n              metadata: ({ $, node, schema }) => {\n                node\n                  .prop('custom', $.literal('value'))\n                  .prop('title', $.literal(schema.description ?? schema.type ?? ''));\n              },\n              name: 'zod',\n            },\n          ],\n        }),\n        description: 'generates validator schemas with metadata function',\n      },\n      {\n        config: createConfig({\n          input: 'validators.yaml',\n          output: 'validators-types',\n          plugins: [\n            {\n              compatibilityVersion: zodVersion.compatibilityVersion,\n              name: 'zod',\n              types: {\n                infer: true,\n              },\n            },\n          ],\n        }),\n        description: 'generates validator schemas with types',\n      },\n      {\n        config: createConfig({\n          input: 'validators-bigint-min-max.json',\n          output: 'validators-bigint-min-max',\n        }),\n        description: 'validator schemas with BigInt and min/max constraints',\n      },\n      {\n        config: createConfig({\n          input: 'validators-circular-ref.json',\n          output: 'validators-circular-ref',\n        }),\n        description: 'validator schemas with circular reference',\n      },\n      {\n        config: createConfig({\n          input: 'validators-circular-ref-2.yaml',\n          output: 'validators-circular-ref-2',\n        }),\n        description: 'validator schemas with circular reference 2',\n      },\n      {\n        config: createConfig({\n          input: 'validators-union-merge.json',\n          output: 'validators-union-merge',\n        }),\n        description: \"validator schemas with merged unions (can't use .merge())\",\n      },\n      {\n        config: createConfig({\n          input: 'validators-string-constraints-union.json',\n          output: 'validators-string-constraints-union',\n        }),\n        description: 'validator schemas with string constraints union',\n      },\n      {\n        config: createConfig({\n          input: 'enum-null.json',\n          output: 'enum-resolver-permissive',\n          plugins: [\n            {\n              compatibilityVersion: zodVersion.compatibilityVersion,\n              name: 'zod',\n              '~resolvers': {\n                enum(ctx) {\n                  const { $, symbols } = ctx;\n                  const { z } = symbols;\n                  const { allStrings, enumMembers } = ctx.nodes.items(ctx);\n\n                  if (!allStrings || !enumMembers.length) {\n                    return;\n                  }\n\n                  const enumSchema = $(z)\n                    .attr('enum')\n                    .call($.array(...enumMembers));\n                  return $(z)\n                    .attr('union')\n                    .call($.array(enumSchema, $(z).attr('string').call()));\n                },\n              },\n            },\n          ],\n        }),\n        description: 'generates permissive enums with enum resolver',\n      },\n    ];\n\n    it.each(scenarios)('$description', async ({ config }) => {\n      await createClient(config);\n\n      const filePaths = getFilePaths(config.output);\n\n      await Promise.all(\n        filePaths.map(async (filePath) => {\n          const fileContent = fs.readFileSync(filePath, 'utf-8');\n          await expect(fileContent).toMatchFileSnapshot(\n            path.join(snapshotsDir, filePath.slice(outputDir.length + 1)),\n          );\n        }),\n      );\n    });\n  });\n}\n"
  },
  {
    "path": "packages/openapi-ts-tests/zod/v4/test/formats.test.ts",
    "content": "import fs from 'node:fs';\nimport path from 'node:path';\n\nimport { createClient } from '@hey-api/openapi-ts';\n\nimport { getFilePaths } from '../../../utils';\nimport { createZodConfig, getSnapshotsPath, getTempSnapshotsPath, zodVersions } from './utils';\n\nconst version = '3.1.x';\n\nfor (const zodVersion of zodVersions) {\n  const outputDir = path.join(getTempSnapshotsPath(), version, zodVersion.folder);\n  const snapshotsDir = path.join(getSnapshotsPath(), version, zodVersion.folder);\n\n  describe(`OpenAPI ${version} Zod formats`, () => {\n    const createConfig = createZodConfig({\n      openApiVersion: version,\n      outputDir,\n      zodVersion,\n    });\n\n    const scenarios = [\n      {\n        config: createConfig({\n          input: 'zoom-video-sdk.json',\n          output: 'webhooks',\n          plugins: [\n            {\n              compatibilityVersion: zodVersion.compatibilityVersion,\n              name: 'zod',\n            },\n          ],\n        }),\n        description: 'webhook schemas',\n      },\n      {\n        config: createConfig({\n          input: 'string-with-format.yaml',\n          output: 'string-with-format',\n          plugins: [\n            {\n              compatibilityVersion: zodVersion.compatibilityVersion,\n              name: 'zod',\n            },\n          ],\n        }),\n        description: 'generates anyOf string and binary string',\n      },\n      {\n        config: createConfig({\n          input: 'string-with-guid-format.yaml',\n          output: 'string-with-guid-format',\n          plugins: [\n            {\n              compatibilityVersion: zodVersion.compatibilityVersion,\n              name: 'zod',\n            },\n          ],\n        }),\n        description: 'handles string guid format',\n      },\n    ];\n\n    it.each(scenarios)('$description', async ({ config }) => {\n      await createClient(config);\n\n      const filePaths = getFilePaths(config.output);\n\n      await Promise.all(\n        filePaths.map(async (filePath) => {\n          const fileContent = fs.readFileSync(filePath, 'utf-8');\n          await expect(fileContent).toMatchFileSnapshot(\n            path.join(snapshotsDir, filePath.slice(outputDir.length + 1)),\n          );\n        }),\n      );\n    });\n  });\n}\n"
  },
  {
    "path": "packages/openapi-ts-tests/zod/v4/test/openapi.test.ts",
    "content": "import fs from 'node:fs';\nimport path from 'node:path';\n\nimport { createClient } from '@hey-api/openapi-ts';\n\nimport { getFilePaths } from '../../../utils';\nimport { createZodConfig, getSnapshotsPath, getTempSnapshotsPath, zodVersions } from './utils';\n\nconst versions = ['2.0.x', '3.0.x', '3.1.x'];\n\nfor (const version of versions) {\n  for (const zodVersion of zodVersions) {\n    const outputDir = path.join(getTempSnapshotsPath(), version, zodVersion.folder);\n    const snapshotsDir = path.join(getSnapshotsPath(), version, zodVersion.folder);\n\n    describe(`OpenAPI ${version}`, () => {\n      const createConfig = createZodConfig({\n        openApiVersion: version,\n        outputDir,\n        zodVersion,\n      });\n\n      const scenarios = [\n        {\n          config: createConfig({\n            input: 'array-items-all-of.yaml',\n            output: 'array-items-all-of',\n          }),\n          description: 'generates correct array when items use allOf (intersection)',\n        },\n        {\n          config: createConfig({\n            input: 'full.yaml',\n            output: 'default',\n          }),\n          description: 'generate Zod schemas with Zod plugin',\n        },\n        {\n          config: createConfig({\n            input: 'type-format.yaml',\n            output: 'type-format',\n            plugins: [\n              '@hey-api/transformers',\n              '@hey-api/client-fetch',\n              {\n                compatibilityVersion: zodVersion.compatibilityVersion,\n                name: 'zod',\n              },\n              {\n                name: '@hey-api/sdk',\n                transformer: true,\n                validator: true,\n              },\n            ],\n          }),\n          description: 'handles various schema types and formats',\n        },\n      ];\n\n      it.each(scenarios)('$description', async ({ config }) => {\n        await createClient(config);\n\n        const filePaths = getFilePaths(config.output);\n\n        await Promise.all(\n          filePaths.map(async (filePath) => {\n            const fileContent = fs.readFileSync(filePath, 'utf-8');\n            await expect(fileContent).toMatchFileSnapshot(\n              path.join(snapshotsDir, filePath.slice(outputDir.length + 1)),\n            );\n          }),\n        );\n      });\n    });\n  }\n}\n"
  },
  {
    "path": "packages/openapi-ts-tests/zod/v4/test/utils.ts",
    "content": "import path from 'node:path';\nimport { fileURLToPath } from 'node:url';\n\nimport { type UserConfig } from '@hey-api/openapi-ts';\n\nimport { getSpecsPath } from '../../../utils';\n\nconst __filename = fileURLToPath(import.meta.url);\nconst __dirname = path.dirname(__filename);\n\nexport const createZodConfig =\n  ({\n    openApiVersion,\n    outputDir,\n    zodVersion,\n  }: {\n    openApiVersion: string;\n    outputDir: string;\n    zodVersion: (typeof zodVersions)[number];\n  }) =>\n  (userConfig: UserConfig) => {\n    const input = userConfig.input instanceof Array ? userConfig.input[0]! : userConfig.input;\n    const inputPath = path.join(\n      getSpecsPath(),\n      openApiVersion,\n      typeof input === 'string' ? input : (input.path as string),\n    );\n    return {\n      plugins: [\n        {\n          compatibilityVersion: zodVersion.compatibilityVersion,\n          name: 'zod',\n        },\n      ],\n      ...userConfig,\n      input:\n        typeof userConfig.input === 'string'\n          ? inputPath\n          : {\n              ...userConfig.input,\n              path: inputPath,\n            },\n      logs: {\n        level: 'silent',\n        path: './logs',\n      },\n      output: path.join(outputDir, typeof userConfig.output === 'string' ? userConfig.output : ''),\n    } as const satisfies UserConfig;\n  };\n\nexport const getSnapshotsPath = (): string => path.join(__dirname, '..', '__snapshots__');\n\nexport const getTempSnapshotsPath = (): string => path.join(__dirname, '..', '.gen', 'snapshots');\n\nexport const zodVersions = [\n  {\n    compatibilityVersion: 3,\n    folder: 'v3',\n  },\n  {\n    compatibilityVersion: 4,\n    folder: 'v4',\n  },\n  {\n    compatibilityVersion: 'mini',\n    folder: 'mini',\n  },\n] as const;\n"
  },
  {
    "path": "packages/openapi-ts-tests/zod/v4/tsconfig.json",
    "content": "{\n  \"extends\": \"../../tsconfig.base.json\",\n  \"include\": [\"test/**/*\", \"__snapshots__/**/*\"],\n  \"exclude\": [\".gen/**/*\"],\n  \"references\": [{ \"path\": \"../../../openapi-ts\" }]\n}\n"
  },
  {
    "path": "packages/openapi-ts-tests/zod/v4/turbo.json",
    "content": "{\n  \"$schema\": \"../../../../node_modules/turbo/schema.json\",\n  \"extends\": [\"//\"],\n  \"tasks\": {\n    \"build\": {\n      \"dependsOn\": [],\n      \"outputs\": [\"dist/**\"]\n    }\n  }\n}\n"
  },
  {
    "path": "packages/openapi-ts-tests/zod/v4/vitest.setup.ts",
    "content": "import { fileURLToPath } from 'node:url';\n\nimport { beforeAll } from 'vitest';\n\nbeforeAll(() => {\n  process.chdir(fileURLToPath(new URL('.', import.meta.url)));\n});\n"
  },
  {
    "path": "packages/shared/.gitignore",
    "content": ".DS_Store\n.idea\n.tmp\n.tsdown\nlogs\nnode_modules\ntemp\n\n.env\ncoverage\ndist\n\n# test files\n.gen\n"
  },
  {
    "path": "packages/shared/CHANGELOG.md",
    "content": "# @hey-api/shared\n\n## 0.2.5\n\n### Patch Changes\n\n- **output**: pass context as second argument in `module.resolve()` function ([#3615](https://github.com/hey-api/openapi-ts/pull/3615)) ([`b6a65d6`](https://github.com/hey-api/openapi-ts/commit/b6a65d6bb3ff1895f2189af858e3424733154bdf)) by [@mrlubos](https://github.com/mrlubos)\n\n- **parser**: fix: self-referencing discriminator ([#3601](https://github.com/hey-api/openapi-ts/pull/3601)) ([`857eb19`](https://github.com/hey-api/openapi-ts/commit/857eb1983fa1ab0f048d426a31835ede563a2c00)) by [@pgraug](https://github.com/pgraug)\n\n- **output**: add `module` option ([#3616](https://github.com/hey-api/openapi-ts/pull/3616)) ([`e4eea23`](https://github.com/hey-api/openapi-ts/commit/e4eea23ab23fb704dfdb9aaad63989be34d5093c)) by [@mrlubos](https://github.com/mrlubos)\n\n### Updated Dependencies:\n\n- @hey-api/codegen-core@0.7.4\n\n## 0.2.4\n\n### Patch Changes\n\n- **utils**: `outputHeaderToPrefix()` function signature change ([#3585](https://github.com/hey-api/openapi-ts/pull/3585)) ([`c076e4d`](https://github.com/hey-api/openapi-ts/commit/c076e4d3e9697d8bbc72db13a31d44627c814c2d)) by [@mrlubos](https://github.com/mrlubos)\n\n- **internal**: remove TypeScript from peer dependencies ([#3566](https://github.com/hey-api/openapi-ts/pull/3566)) ([`b5f1e4b`](https://github.com/hey-api/openapi-ts/commit/b5f1e4b5f64cbf0bad2eff888177ac9c1881ba3e)) by [@mrlubos](https://github.com/mrlubos)\n\n### Updated Dependencies:\n\n- @hey-api/codegen-core@0.7.3\n- @hey-api/types@0.1.4\n\n## 0.2.3\n\n### Patch Changes\n\n- **cli**: export isEnvironment function ([#3546](https://github.com/hey-api/openapi-ts/pull/3546)) ([`571bc8a`](https://github.com/hey-api/openapi-ts/commit/571bc8a32b55647083bb506d4a5b575c4736cb94)) by [@mrlubos](https://github.com/mrlubos)\n\n- **internal**: export more IR types ([#3513](https://github.com/hey-api/openapi-ts/pull/3513)) ([`ffe68cd`](https://github.com/hey-api/openapi-ts/commit/ffe68cd4303c39e71152f36c2057165468e64308)) by [@copilot-swe-agent](https://github.com/apps/copilot-swe-agent)\n\n- **parser**: add `getName()` symbol hook ([#3556](https://github.com/hey-api/openapi-ts/pull/3556)) ([`68c750a`](https://github.com/hey-api/openapi-ts/commit/68c750ab7ad37c71c4f9b267ddc9e1c90c89924a)) by [@mrlubos](https://github.com/mrlubos)\n\n### Updated Dependencies:\n\n- @hey-api/codegen-core@0.7.2\n\n## 0.2.2\n\n### Patch Changes\n\n- **output**: context file is optional ([#3486](https://github.com/hey-api/openapi-ts/pull/3486)) ([`942913a`](https://github.com/hey-api/openapi-ts/commit/942913af15ae10c5fc3c5e456800829b7dd9c10a)) by [@mrlubos](https://github.com/mrlubos)\n\n- **parser**: fix: explicit discriminator mapping wins over fallback in nested `allOf` ([#3490](https://github.com/hey-api/openapi-ts/pull/3490)) ([`a67d589`](https://github.com/hey-api/openapi-ts/commit/a67d589e1f8e5860bd05d5caff134dd6a7eed6e2)) by [@pgraug](https://github.com/pgraug)\n\n### Updated Dependencies:\n\n- @hey-api/codegen-core@0.7.1\n\n## 0.2.1\n\n### Patch Changes\n\n- **internal**: export schema walker interfaces ([#3396](https://github.com/hey-api/openapi-ts/pull/3396)) ([`ea6f386`](https://github.com/hey-api/openapi-ts/commit/ea6f3865c8e381b3160e1526435c4522f0dc6aa4)) by [@mrlubos](https://github.com/mrlubos)\n\n- **parser(patch)**: support callback for `patch.schemas` ([#3415](https://github.com/hey-api/openapi-ts/pull/3415)) ([`e494f4d`](https://github.com/hey-api/openapi-ts/commit/e494f4dd828167a0096a0a488b222a013f911055)) by [@copilot-swe-agent](https://github.com/apps/copilot-swe-agent)\n\n- **parser**: handle OpenAPI 3.1 `contentMediaType` keyword as binary format when file-like ([#3431](https://github.com/hey-api/openapi-ts/pull/3431)) ([`d6a8538`](https://github.com/hey-api/openapi-ts/commit/d6a85381e3c52b4fd1c4af43ee57506459db7a45)) by [@copilot-swe-agent](https://github.com/apps/copilot-swe-agent)\n\n- **input**: fix: improve returned status code when spec fetch fails ([#3427](https://github.com/hey-api/openapi-ts/pull/3427)) ([`37dd92c`](https://github.com/hey-api/openapi-ts/commit/37dd92c6629511860ae434c64ac8af9154ed6aed)) by [@copilot-swe-agent](https://github.com/apps/copilot-swe-agent)\n\n- **parser**: add `patch.input` and shorthand `patch()` option for full specification transformations ([#3411](https://github.com/hey-api/openapi-ts/pull/3411)) ([`ba9f893`](https://github.com/hey-api/openapi-ts/commit/ba9f893d71b959721e177717ae85fce34d697002)) by [@copilot-swe-agent](https://github.com/apps/copilot-swe-agent)\n\n- **parser**: fix: preserve `unevaluatedProperties` keyword in transforms ([#3435](https://github.com/hey-api/openapi-ts/pull/3435)) ([`f659b38`](https://github.com/hey-api/openapi-ts/commit/f659b38701795d2c2b61c8d3f5c43af93893481a)) by [@copilot-swe-agent](https://github.com/apps/copilot-swe-agent)\n\n- **parser(transforms)**: add `schemaName` transform ([#3416](https://github.com/hey-api/openapi-ts/pull/3416)) ([`4b9d032`](https://github.com/hey-api/openapi-ts/commit/4b9d032c6a144fa79cedc28e077782b9d67803a3)) by [@copilot-swe-agent](https://github.com/apps/copilot-swe-agent)\n\n- **parser(patch)**: support callback for `patch.operations` ([#3420](https://github.com/hey-api/openapi-ts/pull/3420)) ([`e1cd970`](https://github.com/hey-api/openapi-ts/commit/e1cd970e4f3028b29ace44a58b2d2cae18a6c45f)) by [@copilot-swe-agent](https://github.com/apps/copilot-swe-agent)\n\n- **parser**: add support for non-string discriminator property types ([#3385](https://github.com/hey-api/openapi-ts/pull/3385)) ([`dd0be9c`](https://github.com/hey-api/openapi-ts/commit/dd0be9c6ca93552c3367ca8e8ba785381295a112)) by [@SipanP](https://github.com/SipanP)\n\n### Updated Dependencies:\n\n- @hey-api/json-schema-ref-parser@1.3.1\n\n## 0.2.0\n\n### Minor Changes\n\n- **utils**: rename `isTopLevelComponentRef` to `isTopLevelComponent` ([#3370](https://github.com/hey-api/openapi-ts/pull/3370)) ([`27cd91f`](https://github.com/hey-api/openapi-ts/commit/27cd91f530bd77da6ea95df1704b2947917b4626)) by [@mrlubos](https://github.com/mrlubos)\n\n### Patch Changes\n\n### Updated Dependencies:\n\n- @hey-api/json-schema-ref-parser@1.3.0\n\n## 0.1.2\n\n### Patch Changes\n\n- **parser**: add `getExportFromFilePath()` hook ([#3322](https://github.com/hey-api/openapi-ts/pull/3322)) ([`bfd43ec`](https://github.com/hey-api/openapi-ts/commit/bfd43ec6d638bfc97b6905dd9dee2c911ccea3e0)) by [@mrlubos](https://github.com/mrlubos)\n\n- **config**: `includeInEntry` accepts function in addition to primitive value ([#3322](https://github.com/hey-api/openapi-ts/pull/3322)) ([`bfd43ec`](https://github.com/hey-api/openapi-ts/commit/bfd43ec6d638bfc97b6905dd9dee2c911ccea3e0)) by [@mrlubos](https://github.com/mrlubos)\n\n- **transform(read-write)**: improve discriminated schemas split ([#3322](https://github.com/hey-api/openapi-ts/pull/3322)) ([`bfd43ec`](https://github.com/hey-api/openapi-ts/commit/bfd43ec6d638bfc97b6905dd9dee2c911ccea3e0)) by [@mrlubos](https://github.com/mrlubos)\n\n### Updated Dependencies:\n\n- @hey-api/codegen-core@0.7.0\n\n## 0.1.1\n\n### Patch Changes\n\n### Updated Dependencies:\n\n- @hey-api/codegen-core@0.6.1\n\n## 0.1.0\n\n### Minor Changes\n\n- **feat**: initial release ([#3251](https://github.com/hey-api/openapi-ts/pull/3251)) ([`7f19d59`](https://github.com/hey-api/openapi-ts/commit/7f19d5921dadfa96ecae84a5298b7aee1daee56d)) by [@mrlubos](https://github.com/mrlubos)\n\n### Patch Changes\n\n### Updated Dependencies:\n\n- @hey-api/codegen-core@0.6.0\n- @hey-api/types@0.1.3\n"
  },
  {
    "path": "packages/shared/LICENSE.md",
    "content": "MIT License\n\nCopyright (c) Hey API\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n"
  },
  {
    "path": "packages/shared/package.json",
    "content": "{\n  \"name\": \"@hey-api/shared\",\n  \"version\": \"0.2.5\",\n  \"description\": \"Temporary home for cross-package utilities. Contents will migrate to proper packages as architecture stabilizes.\",\n  \"homepage\": \"https://heyapi.dev/\",\n  \"bugs\": {\n    \"url\": \"https://github.com/hey-api/openapi-ts/issues\"\n  },\n  \"license\": \"MIT\",\n  \"author\": {\n    \"name\": \"Hey API\",\n    \"email\": \"lubos@heyapi.dev\",\n    \"url\": \"https://heyapi.dev\"\n  },\n  \"repository\": {\n    \"type\": \"git\",\n    \"url\": \"git+https://github.com/hey-api/openapi-ts.git\"\n  },\n  \"funding\": \"https://github.com/sponsors/hey-api\",\n  \"files\": [\n    \"dist\",\n    \"LICENSE.md\",\n    \"README.md\"\n  ],\n  \"type\": \"module\",\n  \"main\": \"./dist/index.mjs\",\n  \"types\": \"./dist/index.d.mts\",\n  \"exports\": {\n    \".\": {\n      \"types\": \"./dist/index.d.mts\",\n      \"import\": \"./dist/index.mjs\"\n    },\n    \"./package.json\": \"./package.json\"\n  },\n  \"scripts\": {\n    \"build\": \"tsdown && pnpm check-exports\",\n    \"check-exports\": \"attw --pack . --profile esm-only --ignore-rules cjs-resolves-to-esm\",\n    \"dev\": \"tsdown --watch\",\n    \"prepublishOnly\": \"pnpm build\",\n    \"typecheck\": \"tsgo --noEmit\"\n  },\n  \"dependencies\": {\n    \"@hey-api/codegen-core\": \"workspace:*\",\n    \"@hey-api/json-schema-ref-parser\": \"workspace:*\",\n    \"@hey-api/types\": \"workspace:*\",\n    \"ansi-colors\": \"4.1.3\",\n    \"cross-spawn\": \"7.0.6\",\n    \"open\": \"11.0.0\",\n    \"semver\": \"7.7.3\"\n  },\n  \"devDependencies\": {\n    \"@types/bun\": \"1.3.8\",\n    \"@types/cross-spawn\": \"6.0.6\",\n    \"@types/semver\": \"7.7.1\",\n    \"eslint\": \"9.39.1\",\n    \"typescript\": \"5.9.3\",\n    \"yaml\": \"2.8.2\"\n  },\n  \"engines\": {\n    \"node\": \">=20.19.0\"\n  }\n}\n"
  },
  {
    "path": "packages/shared/src/__tests__/cli.test.ts",
    "content": "import { isEnvironment } from '../cli';\n\n/**\n * Replicates the outputHeaderToPrefix logic from generate/client.ts for testing.\n */\nfunction outputHeaderToPrefix(header: unknown): string {\n  if (header == null || typeof header === 'function') return '';\n  const lines =\n    typeof header === 'string'\n      ? header.split(/\\r?\\n/)\n      : (header as string[]).flatMap((line) => line.split(/\\r?\\n/));\n  const content = lines.join('\\n');\n  return content ? `${content}\\n\\n` : '';\n}\n\ndescribe('outputHeaderToPrefix logic', () => {\n  it('returns default comment for string header', () => {\n    const result = outputHeaderToPrefix('// This file is auto-generated by @hey-api/openapi-ts');\n    expect(result).toBe('// This file is auto-generated by @hey-api/openapi-ts\\n\\n');\n  });\n\n  it('returns joined lines for array header', () => {\n    const result = outputHeaderToPrefix([\n      '// This file is auto-generated by @hey-api/openapi-ts',\n      '// @ts-nocheck',\n    ]);\n    expect(result).toBe(\n      '// This file is auto-generated by @hey-api/openapi-ts\\n// @ts-nocheck\\n\\n',\n    );\n  });\n\n  it('returns empty string for null header', () => {\n    expect(outputHeaderToPrefix(null)).toBe('');\n  });\n\n  it('returns empty string for undefined header', () => {\n    expect(outputHeaderToPrefix(undefined)).toBe('');\n  });\n\n  it('returns empty string for function header', () => {\n    expect(outputHeaderToPrefix(() => '// dynamic')).toBe('');\n  });\n\n  it('handles string with embedded newlines', () => {\n    const result = outputHeaderToPrefix('// line1\\n// line2');\n    expect(result).toBe('// line1\\n// line2\\n\\n');\n  });\n});\n\ndescribe('isEnvironment', () => {\n  const originalEnv = process.env;\n\n  beforeEach(() => {\n    process.env = { ...originalEnv };\n    delete process.env.HEYAPI_CODEGEN_ENV;\n  });\n\n  afterAll(() => {\n    process.env = originalEnv;\n  });\n\n  it('returns false when env var is not set', () => {\n    expect(isEnvironment('development')).toBe(false);\n  });\n\n  it('returns true when env var is set to \"development\"', () => {\n    process.env.HEYAPI_CODEGEN_ENV = 'development';\n    expect(isEnvironment('development')).toBe(true);\n  });\n\n  it('returns false when env var is set to other values', () => {\n    process.env.HEYAPI_CODEGEN_ENV = '0';\n    expect(isEnvironment('development')).toBe(false);\n\n    process.env.HEYAPI_CODEGEN_ENV = 'false';\n    expect(isEnvironment('development')).toBe(false);\n\n    process.env.HEYAPI_CODEGEN_ENV = 'anything';\n    expect(isEnvironment('development')).toBe(false);\n  });\n});\n"
  },
  {
    "path": "packages/shared/src/__tests__/error.test.ts",
    "content": "import { shouldReportCrash } from '../error';\n\ndescribe('shouldReportCrash', () => {\n  it('should return false when isInteractive is false', async () => {\n    const result = await shouldReportCrash({\n      error: new Error('test error'),\n      isInteractive: false,\n    });\n    expect(result).toBe(false);\n  });\n\n  it('should return false when isInteractive is undefined', async () => {\n    const result = await shouldReportCrash({\n      error: new Error('test error'),\n      isInteractive: undefined,\n    });\n    expect(result).toBe(false);\n  });\n\n  it('should not prompt when isInteractive is explicitly false', async () => {\n    // Mock stdin and console.log to ensure we don't wait for user input\n    const logSpy = vi.spyOn(console, 'log').mockImplementation(() => undefined);\n    const setEncodingSpy = vi\n      .spyOn(process.stdin, 'setEncoding')\n      .mockImplementation(() => process.stdin as any);\n    const onceSpy = vi.spyOn(process.stdin, 'once').mockImplementation(() => process.stdin);\n\n    const result = await shouldReportCrash({\n      error: new Error('test error'),\n      isInteractive: false,\n    });\n\n    expect(result).toBe(false);\n    expect(logSpy).not.toHaveBeenCalled();\n    expect(setEncodingSpy).not.toHaveBeenCalled();\n    expect(onceSpy).not.toHaveBeenCalled();\n\n    logSpy.mockRestore();\n    setEncodingSpy.mockRestore();\n    onceSpy.mockRestore();\n  });\n\n  it('should prompt when isInteractive is true', async () => {\n    // Mock stdin and console.log for interactive session\n    const logSpy = vi.spyOn(console, 'log').mockImplementation(() => undefined);\n    const setEncodingSpy = vi\n      .spyOn(process.stdin, 'setEncoding')\n      .mockImplementation(() => process.stdin as any);\n    const onceSpy = vi.spyOn(process.stdin, 'once').mockImplementation((_event, callback) => {\n      // Simulate user typing 'n'\n      setTimeout(() => {\n        (callback as any)('n');\n      }, 0);\n      return process.stdin;\n    });\n\n    const result = await shouldReportCrash({\n      error: new Error('test error'),\n      isInteractive: true,\n    });\n\n    expect(result).toBe(false); // User said 'n'\n    expect(logSpy).toHaveBeenCalledWith(\n      expect.stringContaining('📢 Open a GitHub issue with crash details?'),\n    );\n\n    logSpy.mockRestore();\n    setEncodingSpy.mockRestore();\n    onceSpy.mockRestore();\n  });\n\n  it('should handle user saying yes to crash report', async () => {\n    // Mock stdin and console.log for interactive session\n    const logSpy = vi.spyOn(console, 'log').mockImplementation(() => undefined);\n    const setEncodingSpy = vi\n      .spyOn(process.stdin, 'setEncoding')\n      .mockImplementation(() => process.stdin as any);\n    const onceSpy = vi.spyOn(process.stdin, 'once').mockImplementation((_event, callback) => {\n      // Simulate user typing 'y'\n      setTimeout(() => {\n        (callback as any)('y');\n      }, 0);\n      return process.stdin;\n    });\n\n    const result = await shouldReportCrash({\n      error: new Error('test error'),\n      isInteractive: true,\n    });\n\n    expect(result).toBe(true); // User said 'y'\n\n    logSpy.mockRestore();\n    setEncodingSpy.mockRestore();\n    onceSpy.mockRestore();\n  });\n});\n"
  },
  {
    "path": "packages/shared/src/__tests__/getSpec.test.ts",
    "content": "import * as refParser from '@hey-api/json-schema-ref-parser';\n\nimport { getSpec } from '../getSpec';\n\nvi.mock('@hey-api/json-schema-ref-parser', () => ({\n  getResolvedInput: vi.fn(({ pathOrUrlOrSchema }: { pathOrUrlOrSchema: string }) => ({\n    path: pathOrUrlOrSchema,\n    schema: undefined,\n    type: 'url',\n  })),\n  sendRequest: vi.fn(),\n}));\n\nconst mockSendRequest = vi.mocked(refParser.sendRequest);\n\ndescribe('getSpec', () => {\n  beforeEach(() => {\n    vi.clearAllMocks();\n  });\n\n  describe('URL input', () => {\n    it('returns error with status 500 and error message when GET request throws an exception', async () => {\n      mockSendRequest.mockRejectedValueOnce(new Error('fetch failed'));\n\n      const result = await getSpec({\n        fetchOptions: undefined,\n        inputPath: 'http://example.com/openapi.json',\n        timeout: undefined,\n        watch: { headers: new Headers() },\n      });\n\n      expect(result.error).toBe('not-ok');\n      expect(result.response!.status).toBe(500);\n      expect(await result.response!.text()).toBe('fetch failed');\n    });\n\n    it('returns error with status 500 and string message when non-Error is thrown during GET request', async () => {\n      mockSendRequest.mockRejectedValueOnce('network unavailable');\n\n      const result = await getSpec({\n        fetchOptions: undefined,\n        inputPath: 'http://example.com/openapi.json',\n        timeout: undefined,\n        watch: { headers: new Headers() },\n      });\n\n      expect(result.error).toBe('not-ok');\n      expect(result.response!.status).toBe(500);\n      expect(await result.response!.text()).toBe('network unavailable');\n    });\n\n    it('returns error when GET response has status >= 300', async () => {\n      mockSendRequest.mockResolvedValueOnce({\n        response: new Response(null, { status: 404, statusText: 'Not Found' }),\n      });\n\n      const result = await getSpec({\n        fetchOptions: undefined,\n        inputPath: 'http://example.com/openapi.json',\n        timeout: undefined,\n        watch: { headers: new Headers() },\n      });\n\n      expect(result.error).toBe('not-ok');\n      expect(result.response!.status).toBe(404);\n    });\n\n    it('returns error with status 500 and error message when HEAD request throws an exception', async () => {\n      mockSendRequest.mockRejectedValueOnce(new Error('connection refused'));\n\n      const result = await getSpec({\n        fetchOptions: undefined,\n        inputPath: 'http://example.com/openapi.json',\n        timeout: undefined,\n        watch: { headers: new Headers(), isHeadMethodSupported: true, lastValue: 'previous' },\n      });\n\n      expect(result.error).toBe('not-ok');\n      expect(result.response!.status).toBe(500);\n      expect(await result.response!.text()).toBe('connection refused');\n    });\n\n    it('returns arrayBuffer on successful GET', async () => {\n      const content = '{\"openapi\":\"3.0.0\"}';\n      const encoder = new TextEncoder();\n      const buffer = encoder.encode(content).buffer as ArrayBuffer;\n\n      mockSendRequest.mockResolvedValueOnce({\n        response: new Response(buffer, { status: 200 }),\n      });\n\n      const result = await getSpec({\n        fetchOptions: undefined,\n        inputPath: 'http://example.com/openapi.json',\n        timeout: undefined,\n        watch: { headers: new Headers() },\n      });\n\n      expect(result.error).toBeUndefined();\n      expect(result.arrayBuffer).toBeDefined();\n    });\n  });\n});\n"
  },
  {
    "path": "packages/shared/src/cli.ts",
    "content": "import colors from 'ansi-colors';\n\nimport { loadPackageJson } from './tsConfig';\n\nconst textAscii = `\n888   |                           e      888~-_   888\n888___|  e88~~8e  Y88b  /        d8b     888   \\\\  888\n888   | d888  88b  Y888/        /Y88b    888    | 888\n888   | 8888__888   Y8/        /  Y88b   888   /  888\n888   | Y888    ,    Y        /____Y88b  888_-~   888\n888   |  \"88___/    /        /      Y88b 888      888\n                  _/\n`;\n\nconst asciiToLines = (\n  ascii: string,\n  options?: {\n    padding?: number;\n  },\n) => {\n  const lines: Array<string> = [];\n  const padding = Array.from<string>({ length: options?.padding ?? 0 }).fill('');\n  lines.push(...padding);\n  let maxLineLength = 0;\n  let line = '';\n  for (const char of ascii) {\n    if (char === '\\n') {\n      if (line) {\n        lines.push(line);\n        maxLineLength = Math.max(maxLineLength, line.length);\n        line = '';\n      }\n    } else {\n      line += char;\n    }\n  }\n  lines.push(...padding);\n  return { lines, maxLineLength };\n};\n\n/**\n * Checks the current environment based on the HEYAPI_CODEGEN_ENV environment variable.\n */\nexport function isEnvironment(value: 'development'): boolean {\n  return process.env.HEYAPI_CODEGEN_ENV === value;\n}\n\n// TODO: show ascii logo only in `--help` and `--version` commands\nexport function printCliIntro(initialDir: string, showLogo: boolean = false): void {\n  const packageJson = loadPackageJson(initialDir);\n  if (packageJson) {\n    if (showLogo) {\n      const text = asciiToLines(textAscii, { padding: 1 });\n      for (const line of text.lines) {\n        console.log(colors.cyan(line));\n      }\n    }\n    const versionString = isEnvironment('development')\n      ? '[DEVELOPMENT]'\n      : `v${packageJson.version}`;\n    console.log(colors.gray(`${packageJson.name} ${versionString}`));\n  }\n  console.log('');\n}\n"
  },
  {
    "path": "packages/shared/src/config/engine.ts",
    "content": "import { ConfigError } from '../error';\n\nexport function checkNodeVersion(): void {\n  if (typeof Bun !== 'undefined') {\n    const [major] = Bun.version.split('.').map(Number);\n    if (major! < 1) {\n      throw new ConfigError(\n        `Unsupported Bun version ${Bun.version}. Please use Bun 1.0.0 or newer.`,\n      );\n    }\n  } else if (typeof process !== 'undefined' && process.versions?.node) {\n    const [major] = process.versions.node.split('.').map(Number);\n    if (major! < 20) {\n      throw new ConfigError(\n        `Unsupported Node version ${process.versions.node}. Please use Node 20 or newer.`,\n      );\n    }\n  }\n}\n"
  },
  {
    "path": "packages/shared/src/config/input/__tests__/input.test.ts",
    "content": "import type { MaybeArray } from '@hey-api/types';\n\nimport { getInput } from '../input';\nimport type { UserInput, UserWatch } from '../types';\n\ntype UserConfig = {\n  input: MaybeArray<UserInput | Required<UserInput>['path']>;\n  watch?: UserWatch;\n};\n\ndescribe('input config', () => {\n  describe('getInput', () => {\n    it('should handle string input', () => {\n      const userConfig: UserConfig = {\n        input: 'https://example.com/openapi.yaml',\n      };\n\n      const result = getInput(userConfig)[0]!;\n      expect(result.path).toBe('https://example.com/openapi.yaml');\n    });\n\n    it('should transform ReadMe simple format input', () => {\n      const userConfig: UserConfig = {\n        input: 'readme:abc123',\n      };\n\n      const result = getInput(userConfig)[0]!;\n      expect(result.path).toBe('https://dash.readme.com/api/v1/api-registry/abc123');\n    });\n\n    it('should transform ReadMe full format input', () => {\n      const userConfig: UserConfig = {\n        input: 'readme:@myorg/myproject#uuid123',\n      };\n\n      const result = getInput(userConfig)[0]!;\n      expect(result.path).toBe('https://dash.readme.com/api/v1/api-registry/uuid123');\n    });\n\n    it('should handle ReadMe input with hyphens', () => {\n      const userConfig: UserConfig = {\n        input: 'readme:@my-org/my-project#test-uuid-123',\n      };\n\n      const result = getInput(userConfig)[0]!;\n      expect(result.path).toBe('https://dash.readme.com/api/v1/api-registry/test-uuid-123');\n    });\n\n    it('should handle object input with ReadMe path', () => {\n      const userConfig: UserConfig = {\n        input: {\n          fetch: {\n            headers: {\n              Authorization: 'Bearer token',\n            },\n          },\n          path: 'readme:abc123',\n        },\n      };\n\n      const result = getInput(userConfig)[0]!;\n      expect(result.path).toBe('https://dash.readme.com/api/v1/api-registry/abc123');\n    });\n\n    it('should handle object input with ReadMe full format path', () => {\n      const userConfig: UserConfig = {\n        input: {\n          path: 'readme:@org/project#uuid',\n          watch: true,\n        },\n      };\n\n      const result = getInput(userConfig)[0]!;\n      expect(result.path).toBe('https://dash.readme.com/api/v1/api-registry/uuid');\n      expect(result.watch.enabled).toBe(true);\n    });\n\n    it('should handle HeyAPI input format (existing functionality)', () => {\n      const userConfig: UserConfig = {\n        input: {\n          organization: 'myorg',\n          project: 'myproject',\n        },\n      };\n\n      const result = getInput(userConfig)[0]!;\n      expect(result.path).toBe('https://get.heyapi.dev/myorg/myproject');\n    });\n\n    it('should handle object input (existing functionality)', () => {\n      const userConfig: UserConfig = {\n        input: {\n          info: { title: 'Test API', version: '1.0.0' },\n          openapi: '3.0.0',\n        },\n      };\n\n      const result = getInput(userConfig)[0]!;\n      expect(result.path).toEqual({\n        info: { title: 'Test API', version: '1.0.0' },\n        openapi: '3.0.0',\n      });\n    });\n\n    it('should not transform non-ReadMe string inputs', () => {\n      const inputs = [\n        'https://example.com/openapi.yaml',\n        './local-file.yaml',\n        '/absolute/path/to/file.json',\n        'file.yaml',\n      ];\n\n      inputs.forEach((input) => {\n        const userConfig: UserConfig = { input };\n        const result = getInput(userConfig)[0]!;\n        expect(result.path).toBe(input);\n      });\n    });\n\n    it('should handle watch options with ReadMe inputs', () => {\n      const userConfig: UserConfig = {\n        input: 'readme:abc123',\n        watch: {\n          enabled: true,\n          interval: 2000,\n        },\n      };\n\n      const result = getInput(userConfig)[0]!;\n      expect(result.path).toBe('https://dash.readme.com/api/v1/api-registry/abc123');\n      expect(result.watch.enabled).toBe(true);\n      expect(result.watch.interval).toBe(2000);\n    });\n\n    it('should preserve other input object properties when transforming ReadMe path', () => {\n      const userConfig: UserConfig = {\n        input: {\n          fetch: {\n            headers: { 'X-Custom': 'value' },\n          },\n          path: 'readme:test123',\n          watch: { enabled: true, interval: 1500 },\n        },\n      };\n\n      const result = getInput(userConfig)[0]!;\n      expect(result.path).toBe('https://dash.readme.com/api/v1/api-registry/test123');\n      // Note: fetch options are preserved in the input object, not in the result\n      // The watch options should be processed separately\n      expect(result.watch.enabled).toBe(true);\n      expect(result.watch.interval).toBe(1500);\n    });\n  });\n\n  describe('error handling', () => {\n    it('should throw error for invalid ReadMe format', () => {\n      const userConfig: UserConfig = {\n        input: 'readme:',\n      };\n\n      expect(() => getInput(userConfig)).toThrow('Invalid ReadMe shorthand format');\n    });\n\n    it('should throw error for invalid ReadMe UUID', () => {\n      const userConfig: UserConfig = {\n        input: 'readme:invalid uuid with spaces',\n      };\n\n      expect(() => getInput(userConfig)).toThrow('Invalid ReadMe shorthand format');\n    });\n\n    it('should throw error for invalid ReadMe format in object input', () => {\n      const userConfig: UserConfig = {\n        input: {\n          path: 'readme:@org/project',\n        },\n      };\n\n      expect(() => getInput(userConfig)).toThrow('Invalid ReadMe shorthand format');\n    });\n  });\n});\n"
  },
  {
    "path": "packages/shared/src/config/input/__tests__/path.test.ts",
    "content": "import { compileInputPath } from '../path';\n\ndescribe('compileInputPath', () => {\n  it('with raw OpenAPI specification', () => {\n    const path = compileInputPath({\n      path: {\n        info: {\n          version: '1.0.0',\n        },\n        openapi: '3.1.0',\n      },\n    });\n    expect(path).toEqual({\n      path: {\n        info: {\n          version: '1.0.0',\n        },\n        openapi: '3.1.0',\n      },\n    });\n  });\n\n  it('with arbitrary string', () => {\n    const path = compileInputPath({\n      path: 'path/to/openapi.json',\n    });\n    expect(path).toEqual({\n      path: 'path/to/openapi.json',\n    });\n  });\n\n  it('with platform string', () => {\n    const path = compileInputPath({\n      path: 'https://get.heyapi.dev/foo/bar?branch=main&commit_sha=sha&tags=a,b,c&version=1.0.0',\n      registry: 'hey-api',\n    });\n    expect(path).toEqual({\n      branch: 'main',\n      commit_sha: 'sha',\n      organization: 'foo',\n      path: 'https://get.heyapi.dev/foo/bar?branch=main&commit_sha=sha&tags=a,b,c&version=1.0.0',\n      project: 'bar',\n      registry: 'hey-api',\n      tags: ['a', 'b', 'c'],\n      version: '1.0.0',\n    });\n  });\n\n  it('with platform arguments', () => {\n    const path = compileInputPath({\n      branch: 'main',\n      commit_sha: 'sha',\n      organization: 'foo',\n      path: '',\n      project: 'bar',\n      tags: ['a', 'b', 'c'],\n      version: '1.0.0',\n    });\n    expect(path).toEqual({\n      branch: 'main',\n      commit_sha: 'sha',\n      organization: 'foo',\n      path: 'https://get.heyapi.dev/foo/bar?branch=main&commit_sha=sha&tags=a,b,c&version=1.0.0',\n      project: 'bar',\n      tags: ['a', 'b', 'c'],\n      version: '1.0.0',\n    });\n  });\n\n  it('loads API key from HEY_API_TOKEN', () => {\n    process.env.HEY_API_TOKEN = 'foo';\n    const path = compileInputPath({\n      path: 'https://get.heyapi.dev/foo/bar',\n      registry: 'hey-api',\n    });\n    delete process.env.HEY_API_TOKEN;\n    expect(path).toEqual({\n      api_key: 'foo',\n      organization: 'foo',\n      path: 'https://get.heyapi.dev/foo/bar?api_key=foo',\n      project: 'bar',\n      registry: 'hey-api',\n    });\n  });\n});\n"
  },
  {
    "path": "packages/shared/src/config/input/input.ts",
    "content": "import type { MaybeArray } from '@hey-api/types';\n\nimport { inputToApiRegistry } from '../../utils/input';\nimport { heyApiRegistryBaseUrl } from '../../utils/input/heyApi';\nimport type { Input, UserInput, UserWatch, Watch } from './types';\n\nconst defaultWatch: Watch = {\n  enabled: false,\n  interval: 1_000,\n  timeout: 60_000,\n};\n\n// watch only remote files\nfunction getWatch(input: Pick<Input, 'path' | 'watch'>): Watch {\n  let watch = { ...defaultWatch };\n\n  // we cannot watch spec passed as an object\n  if (typeof input.path !== 'string') {\n    return watch;\n  }\n\n  if (typeof input.watch === 'boolean') {\n    watch.enabled = input.watch;\n  } else if (typeof input.watch === 'number') {\n    watch.enabled = true;\n    watch.interval = input.watch;\n  } else if (input.watch) {\n    watch = {\n      ...watch,\n      ...input.watch,\n    };\n  }\n\n  return watch;\n}\n\nexport function getInput(userConfig: {\n  input: MaybeArray<UserInput | Required<UserInput>['path']>;\n  watch?: UserWatch;\n}): ReadonlyArray<Input> {\n  const userInputs = userConfig.input instanceof Array ? userConfig.input : [userConfig.input];\n\n  const inputs: Array<Input> = [];\n\n  for (const userInput of userInputs) {\n    let input: Input = {\n      path: '',\n      watch: defaultWatch,\n    };\n\n    if (typeof userInput === 'string') {\n      input.path = userInput;\n    } else if (\n      userInput &&\n      (userInput.path !== undefined || userInput.organization !== undefined)\n    ) {\n      // @ts-expect-error\n      input = {\n        ...input,\n        path: heyApiRegistryBaseUrl,\n        ...userInput,\n      };\n\n      if (input.watch !== undefined) {\n        input.watch = getWatch(input);\n      }\n    } else {\n      input = {\n        ...input,\n        path: userInput,\n      };\n    }\n\n    if (typeof input.path === 'string') {\n      inputToApiRegistry(input as Input & { path: string });\n    }\n\n    if (\n      userConfig.watch !== undefined &&\n      input.watch.enabled === defaultWatch.enabled &&\n      input.watch.interval === defaultWatch.interval &&\n      input.watch.timeout === defaultWatch.timeout\n    ) {\n      input.watch = getWatch({\n        path: input.path,\n        // @ts-expect-error\n        watch: userConfig.watch,\n      });\n    }\n\n    if (input.path) {\n      inputs.push(input);\n    }\n  }\n\n  return inputs;\n}\n"
  },
  {
    "path": "packages/shared/src/config/input/path.ts",
    "content": "import colors from 'ansi-colors';\n\nimport type { Input } from './types';\n\nexport function compileInputPath(input: Omit<Input, 'watch'>) {\n  const result: Pick<\n    Partial<Input>,\n    | 'api_key'\n    | 'branch'\n    | 'commit_sha'\n    | 'organization'\n    | 'project'\n    | 'registry'\n    | 'tags'\n    | 'version'\n  > &\n    Pick<Input, 'path'> = {\n    ...input,\n    path: '',\n  };\n\n  if (input.path && (typeof input.path !== 'string' || input.registry !== 'hey-api')) {\n    result.path = input.path;\n    return result;\n  }\n\n  const [basePath, baseQuery] = input.path.split('?');\n  const queryParts = (baseQuery || '').split('&');\n  const queryPath = queryParts.map((part) => part.split('='));\n\n  let path = basePath || '';\n  if (path.endsWith('/')) {\n    path = path.slice(0, path.length - 1);\n  }\n\n  const [, pathUrl] = path.split('://');\n  const [baseUrl, organization, project] = (pathUrl || '').split('/');\n  result.organization = organization || input.organization;\n  result.project = project || input.project;\n\n  const queryParams: Array<string> = [];\n\n  const kApiKey = 'api_key';\n  result.api_key =\n    queryPath.find(([key]) => key === kApiKey)?.[1] || input.api_key || process.env.HEY_API_TOKEN;\n  if (result.api_key) {\n    queryParams.push(`${kApiKey}=${result.api_key}`);\n  }\n\n  const kBranch = 'branch';\n  result.branch = queryPath.find(([key]) => key === kBranch)?.[1] || input.branch;\n  if (result.branch) {\n    queryParams.push(`${kBranch}=${result.branch}`);\n  }\n\n  const kCommitSha = 'commit_sha';\n  result.commit_sha = queryPath.find(([key]) => key === kCommitSha)?.[1] || input.commit_sha;\n  if (result.commit_sha) {\n    queryParams.push(`${kCommitSha}=${result.commit_sha}`);\n  }\n\n  const kTags = 'tags';\n  result.tags = queryPath.find(([key]) => key === kTags)?.[1]?.split(',') || input.tags;\n  if (result.tags?.length) {\n    queryParams.push(`${kTags}=${result.tags.join(',')}`);\n  }\n\n  const kVersion = 'version';\n  result.version = queryPath.find(([key]) => key === kVersion)?.[1] || input.version;\n  if (result.version) {\n    queryParams.push(`${kVersion}=${result.version}`);\n  }\n\n  if (!result.organization) {\n    throw new Error(\n      'missing organization - from which Hey API Platform organization do you want to generate your output?',\n    );\n  }\n\n  if (!result.project) {\n    throw new Error(\n      'missing project - from which Hey API Platform project do you want to generate your output?',\n    );\n  }\n\n  const query = queryParams.join('&');\n  const platformUrl = baseUrl || 'get.heyapi.dev';\n  const isLocalhost = platformUrl.startsWith('localhost');\n  const platformUrlWithProtocol = [isLocalhost ? 'http' : 'https', platformUrl].join('://');\n  const compiledPath = isLocalhost\n    ? [platformUrlWithProtocol, 'v1', 'get', result.organization, result.project].join('/')\n    : [platformUrlWithProtocol, result.organization, result.project].join('/');\n  result.path = query ? `${compiledPath}?${query}` : compiledPath;\n\n  return result;\n}\n\nexport function logInputPaths(\n  inputPaths: ReadonlyArray<ReturnType<typeof compileInputPath>>,\n  jobIndex: number,\n): void {\n  const lines: Array<string> = [];\n\n  const jobPrefix = colors.gray(`[Job ${jobIndex + 1}] `);\n  const count = inputPaths.length;\n  const baseString = colors.cyan(`Generating from ${count} ${count === 1 ? 'input' : 'inputs'}:`);\n  lines.push(`${jobPrefix}⏳ ${baseString}`);\n\n  inputPaths.forEach((inputPath, index) => {\n    const itemPrefixStr = `  [${index + 1}] `;\n    const itemPrefix = colors.cyan(itemPrefixStr);\n    const detailIndent = ' '.repeat(itemPrefixStr.length);\n\n    if (typeof inputPath.path !== 'string') {\n      lines.push(`${jobPrefix}${itemPrefix}raw OpenAPI specification`);\n      return;\n    }\n\n    switch (inputPath.registry) {\n      case 'hey-api': {\n        const baseInput = [inputPath.organization, inputPath.project].filter(Boolean).join('/');\n        lines.push(`${jobPrefix}${itemPrefix}${baseInput}`);\n        if (inputPath.branch) {\n          lines.push(\n            `${jobPrefix}${detailIndent}${colors.gray('branch:')} ${colors.green(\n              inputPath.branch,\n            )}`,\n          );\n        }\n        if (inputPath.commit_sha) {\n          lines.push(\n            `${jobPrefix}${detailIndent}${colors.gray('commit:')} ${colors.green(\n              inputPath.commit_sha,\n            )}`,\n          );\n        }\n        if (inputPath.tags?.length) {\n          lines.push(\n            `${jobPrefix}${detailIndent}${colors.gray('tags:')} ${colors.green(\n              inputPath.tags.join(', '),\n            )}`,\n          );\n        }\n        if (inputPath.version) {\n          lines.push(\n            `${jobPrefix}${detailIndent}${colors.gray('version:')} ${colors.green(\n              inputPath.version,\n            )}`,\n          );\n        }\n        lines.push(\n          `${jobPrefix}${detailIndent}${colors.gray('registry:')} ${colors.green('Hey API')}`,\n        );\n        break;\n      }\n      case 'readme': {\n        const baseInput = [inputPath.organization, inputPath.project].filter(Boolean).join('/');\n        if (!baseInput) {\n          lines.push(`${jobPrefix}${itemPrefix}${inputPath.path}`);\n        } else {\n          lines.push(`${jobPrefix}${itemPrefix}${baseInput}`);\n        }\n        // @ts-expect-error\n        if (inputPath.uuid) {\n          lines.push(\n            `${jobPrefix}${detailIndent}${colors.gray('uuid:')} ${colors.green(\n              // @ts-expect-error\n              inputPath.uuid,\n            )}`,\n          );\n        }\n        lines.push(\n          `${jobPrefix}${detailIndent}${colors.gray('registry:')} ${colors.green('ReadMe')}`,\n        );\n        break;\n      }\n      case 'scalar': {\n        const baseInput = [inputPath.organization, inputPath.project].filter(Boolean).join('/');\n        lines.push(`${jobPrefix}${itemPrefix}${baseInput}`);\n        lines.push(\n          `${jobPrefix}${detailIndent}${colors.gray('registry:')} ${colors.green('Scalar')}`,\n        );\n        break;\n      }\n      default:\n        lines.push(`${jobPrefix}${itemPrefix}${inputPath.path}`);\n        break;\n    }\n  });\n\n  for (const line of lines) {\n    console.log(line);\n  }\n}\n"
  },
  {
    "path": "packages/shared/src/config/input/types.ts",
    "content": "import type { AnyString } from '@hey-api/types';\n\ntype JsonSchema = Record<string, unknown>;\n\ntype ApiRegistryShorthands =\n  | `https://get.heyapi.dev/${string}/${string}`\n  | `${string}/${string}`\n  | `readme:@${string}/${string}#${string}`\n  | `readme:${string}`\n  | `scalar:@${string}/${string}`;\n\nexport type UserInput = {\n  /**\n   * **Requires `path` to start with `https://get.heyapi.dev` or be undefined**\n   *\n   * Projects are private by default, you will need to be authenticated\n   * to download OpenAPI specifications. We recommend using project API\n   * keys in CI workflows and personal API keys for local development.\n   *\n   * API key isn't required for public projects. You can also omit this\n   * parameter and provide an environment variable `HEY_API_TOKEN`.\n   */\n  api_key?: string;\n  /**\n   * **Requires `path` to start with `https://get.heyapi.dev` or be undefined**\n   *\n   * You can fetch the last build from branch by providing the branch\n   * name.\n   */\n  branch?: string;\n  /**\n   * **Requires `path` to start with `https://get.heyapi.dev` or be undefined**\n   *\n   * You can fetch an exact specification by providing a commit sha.\n   * This will always return the same file.\n   */\n  commit_sha?: string;\n  /**\n   * You can pass any valid Fetch API options to the request for fetching your\n   * specification. This is useful if your file is behind auth for example.\n   */\n  fetch?: RequestInit;\n  /**\n   * **Requires `path` to start with `https://get.heyapi.dev` or be undefined**\n   *\n   * Organization created in Hey API Platform.\n   */\n  organization?: string;\n  /**\n   * Path to the OpenAPI specification. This can be:\n   *   - path\n   *   - URL\n   *   - API registry shorthand\n   *\n   * Both JSON and YAML file formats are supported. You can also pass the parsed\n   * object directly if you're fetching the file yourself.\n   */\n  path?: ApiRegistryShorthands | AnyString | JsonSchema;\n  /**\n   * **Requires `path` to start with `https://get.heyapi.dev` or be undefined**\n   *\n   * Project created in Hey API Platform.\n   */\n  project?: string;\n  /**\n   * **Requires `path` to start with `https://get.heyapi.dev` or be undefined**\n   *\n   * If you're tagging your specifications with custom tags, you can use\n   * them to filter the results. When you provide multiple tags, only\n   * the first match will be returned.\n   */\n  tags?: ReadonlyArray<string>;\n  /**\n   * **Requires `path` to start with `https://get.heyapi.dev` or be undefined**\n   *\n   * Every OpenAPI document contains a required version field. You can\n   * use this value to fetch the last uploaded specification matching\n   * the value.\n   */\n  version?: string;\n  /**\n   * Regenerate the client when the input file changes? You can alternatively\n   * pass a numeric value for the interval in ms.\n   *\n   * @default false\n   */\n  watch?: UserWatch;\n};\n\nexport type Input = {\n  /**\n   * **Requires `path` to start with `https://get.heyapi.dev` or be undefined**\n   *\n   * Projects are private by default, you will need to be authenticated\n   * to download OpenAPI specifications. We recommend using project API\n   * keys in CI workflows and personal API keys for local development.\n   *\n   * API key isn't required for public projects. You can also omit this\n   * parameter and provide an environment variable `HEY_API_TOKEN`.\n   */\n  api_key?: string;\n  /**\n   * **Requires `path` to start with `https://get.heyapi.dev` or be undefined**\n   *\n   * You can fetch the last build from branch by providing the branch\n   * name.\n   */\n  branch?: string;\n  /**\n   * **Requires `path` to start with `https://get.heyapi.dev` or be undefined**\n   *\n   * You can fetch an exact specification by providing a commit sha.\n   * This will always return the same file.\n   */\n  commit_sha?: string;\n  /**\n   * You can pass any valid Fetch API options to the request for fetching your\n   * specification. This is useful if your file is behind auth for example.\n   */\n  fetch?: RequestInit;\n  /**\n   * **Requires `path` to start with `https://get.heyapi.dev` or be undefined**\n   *\n   * Organization created in Hey API Platform.\n   */\n  organization?: string;\n  /**\n   * Path to the OpenAPI specification. This can be:\n   *   - path\n   *   - URL\n   *   - API registry shorthand\n   *\n   * Both JSON and YAML file formats are supported. You can also pass the parsed\n   * object directly if you're fetching the file yourself.\n   */\n  path: ApiRegistryShorthands | AnyString | JsonSchema;\n  /**\n   * **Requires `path` to start with `https://get.heyapi.dev` or be undefined**\n   *\n   * Project created in Hey API Platform.\n   */\n  project?: string;\n  /**\n   * If input path was resolved to a registry, this contains the registry\n   * identifier so we don't need to parse it again.\n   *\n   * @default undefined\n   */\n  registry?: 'hey-api' | 'readme' | 'scalar';\n  /**\n   * **Requires `path` to start with `https://get.heyapi.dev` or be undefined**\n   *\n   * If you're tagging your specifications with custom tags, you can use\n   * them to filter the results. When you provide multiple tags, only\n   * the first match will be returned.\n   */\n  tags?: ReadonlyArray<string>;\n  /**\n   * **Requires `path` to start with `https://get.heyapi.dev` or be undefined**\n   *\n   * Every OpenAPI document contains a required version field. You can\n   * use this value to fetch the last uploaded specification matching\n   * the value.\n   */\n  version?: string;\n  /**\n   * Regenerate the client when the input file changes? You can alternatively\n   * pass a numeric value for the interval in ms.\n   */\n  watch: Watch;\n};\n\nexport type UserWatch = boolean | number | Watch;\n\nexport type Watch = {\n  /**\n   * Whether this feature is enabled.\n   *\n   * @default false\n   */\n  enabled?: boolean;\n  /**\n   * How often should we attempt to detect the input file change? (in ms)\n   *\n   * @default 1000\n   */\n  interval?: number;\n  /**\n   * How long will we wait before the request times out?\n   *\n   * @default 60_000\n   */\n  timeout?: number;\n};\n"
  },
  {
    "path": "packages/shared/src/config/logs.ts",
    "content": "import type { Logs } from '../types/logs';\n\nexport function getLogs(userLogs: string | Logs | undefined): Logs {\n  let logs: Logs = {\n    file: true,\n    level: 'info',\n    path: process.cwd(),\n  };\n\n  if (typeof userLogs === 'string') {\n    logs.path = userLogs;\n  } else {\n    logs = {\n      ...logs,\n      ...userLogs,\n    };\n  }\n\n  return logs;\n}\n"
  },
  {
    "path": "packages/shared/src/config/output/postprocess.ts",
    "content": "import colors from 'ansi-colors';\nimport { sync } from 'cross-spawn';\n\ntype Output = {\n  /**\n   * The absolute path to the output folder.\n   */\n  path: string;\n  /**\n   * Post-processing commands to run on the output folder, executed in order.\n   */\n  postProcess: ReadonlyArray<string | UserPostProcessor>;\n};\n\nexport type UserPostProcessor = {\n  /**\n   * Arguments to pass to the command. Use `{{path}}` as a placeholder\n   * for the output directory path.\n   *\n   * @example ['format', '--write', '{{path}}']\n   */\n  args: ReadonlyArray<string>;\n  /**\n   * The command to run (e.g., 'biome', 'prettier', 'eslint').\n   */\n  command: string;\n  /**\n   * Display name for logging. Defaults to the command name.\n   */\n  name?: string;\n};\n\nexport type PostProcessor = {\n  /**\n   * Arguments to pass to the command.\n   */\n  args: ReadonlyArray<string>;\n  /**\n   * The command to run.\n   */\n  command: string;\n  /**\n   * Display name for logging.\n   */\n  name: string;\n};\n\nexport function postprocessOutput(\n  config: Output,\n  postProcessors: Record<string, PostProcessor>,\n  jobPrefix: string,\n): void {\n  for (const processor of config.postProcess) {\n    const resolved = typeof processor === 'string' ? postProcessors[processor] : processor;\n\n    // TODO: show warning\n    if (!resolved) continue;\n\n    const name = resolved.name ?? resolved.command;\n    const args = resolved.args.map((arg) => arg.replace('{{path}}', config.path));\n\n    console.log(`${jobPrefix}🧹 Running ${colors.cyanBright(name)}`);\n    sync(resolved.command, args);\n  }\n}\n"
  },
  {
    "path": "packages/shared/src/config/output/source/config.ts",
    "content": "import { valueToObject } from '../../utils/config';\nimport type { SourceConfig, UserSourceConfig } from './types';\n\nexport function resolveSource(config: { source?: boolean | UserSourceConfig }): SourceConfig {\n  const source = valueToObject({\n    defaultValue: {\n      enabled: Boolean(config.source),\n      extension: 'json',\n      fileName: 'source',\n      serialize: (input) => JSON.stringify(input, null, 2),\n    },\n    mappers: {\n      boolean: (enabled) => ({ enabled }),\n    },\n    value: config.source,\n  });\n  if (source.path === undefined || source.path === true) {\n    source.path = '';\n  } else if (source.path === false) {\n    source.path = null;\n  }\n  return source as SourceConfig;\n}\n"
  },
  {
    "path": "packages/shared/src/config/output/source/types.ts",
    "content": "import type { MaybePromise } from '@hey-api/types';\n\nimport type { FeatureToggle } from '../../shared';\n\n// TODO: json-schema-ref-parser needs to expose source extension so\n// we can default to it\ntype SourceExtension = 'json';\n// type SourceExtension = 'json' | 'yaml';\n\nexport type UserSourceConfig = {\n  /**\n   * Callback invoked with the serialized source string.\n   *\n   * Runs after the `serialize` function.\n   *\n   * @example\n   * source => console.log(source)\n   */\n  callback?: (source: string) => MaybePromise<void>;\n  /**\n   * Whether this feature is enabled.\n   *\n   * @default true\n   */\n  enabled?: boolean;\n  // * Only `'json'` and `'yaml'` are allowed.\n  /**\n   * File extension for the source file.\n   *\n   * @default 'json'\n   */\n  extension?: SourceExtension;\n  /**\n   * Base file name for the source file.\n   *\n   * The extension from `extension` will be appended automatically.\n   *\n   * @default 'source'\n   */\n  fileName?: string;\n  /**\n   * Target location for the source file.\n   *\n   * - `true` / `undefined` → write to output root (default)\n   * - `string` → relative to output root or absolute path\n   * - `false` / `null` → do not write\n   *\n   * @default true\n   */\n  path?: boolean | string | null;\n  /**\n   * Function to serialize the input object into a string.\n   *\n   * @default\n   * JSON.stringify(input, null, 2)\n   *\n   * @example\n   * input => JSON.stringify(input, null, 0) // minified\n   */\n  serialize?: (input: Record<string, any>) => MaybePromise<string>;\n};\n\nexport type SourceConfig = FeatureToggle & {\n  /**\n   * Callback invoked with the serialized source string.\n   *\n   * Runs after the `serialize` function.\n   */\n  callback?: (source: string) => MaybePromise<void>;\n  /**\n   * File extension for the source file.\n   */\n  extension: SourceExtension;\n  /**\n   * Base file name for the source file.\n   */\n  fileName: string;\n  /**\n   * Target location for the source file.\n   */\n  path: string | null;\n  /**\n   * Function to serialize the input object into a string.\n   */\n  serialize: (input: Record<string, any>) => MaybePromise<string>;\n};\n"
  },
  {
    "path": "packages/shared/src/config/output/types.ts",
    "content": "import type { RenderContext } from '@hey-api/codegen-core';\nimport type { MaybeArray, MaybeFunc } from '@hey-api/types';\n\nexport type OutputHeader = MaybeFunc<\n  (\n    ctx: Pick<RenderContext, 'meta' | 'project'> &\n      Pick<Partial<RenderContext>, 'file'> & {\n        /** The default header value. */\n        defaultValue: ReadonlyArray<string>;\n      },\n  ) => MaybeArray<string> | null | undefined\n>;\n"
  },
  {
    "path": "packages/shared/src/config/parser/config.ts",
    "content": "import { valueToObject } from '../utils/config';\nimport type { Parser, UserParser } from './types';\n\nexport const defaultPaginationKeywords = [\n  'after',\n  'before',\n  'cursor',\n  'offset',\n  'page',\n  'start',\n] as const;\n\nexport function getParser(userConfig: { parser?: UserParser }): Parser {\n  const parser = valueToObject({\n    defaultValue: {\n      hooks: {},\n      pagination: {\n        keywords: defaultPaginationKeywords,\n      },\n      transforms: {\n        enums: {\n          case: 'PascalCase',\n          enabled: false,\n          mode: 'root',\n          name: '{{name}}Enum',\n        },\n        propertiesRequiredByDefault: false,\n        readWrite: {\n          enabled: true,\n          requests: {\n            case: 'preserve',\n            name: '{{name}}Writable',\n          },\n          responses: {\n            case: 'preserve',\n            name: '{{name}}',\n          },\n        },\n        schemaName: undefined,\n      },\n      validate_EXPERIMENTAL: false,\n    },\n    mappers: {\n      object: (fields, defaultValue) => ({\n        ...fields,\n        pagination: valueToObject({\n          defaultValue: {\n            ...(defaultValue.pagination as Extract<\n              typeof defaultValue.pagination,\n              Record<string, unknown>\n            >),\n          },\n          value: fields.pagination,\n        }),\n        transforms: valueToObject({\n          defaultValue: {\n            ...(defaultValue.transforms as Extract<\n              typeof defaultValue.transforms,\n              Record<string, unknown>\n            >),\n          },\n          mappers: {\n            object: (fields, defaultValue) => ({\n              ...fields,\n              enums: valueToObject({\n                defaultValue: {\n                  ...(defaultValue.enums as Extract<\n                    typeof defaultValue.enums,\n                    Record<string, unknown>\n                  >),\n                  enabled:\n                    fields.enums !== undefined\n                      ? Boolean(fields.enums)\n                      : (\n                          defaultValue.enums as Extract<\n                            typeof defaultValue.enums,\n                            Record<string, unknown>\n                          >\n                        ).enabled,\n                },\n                mappers: {\n                  boolean: (enabled) => ({ enabled }),\n                  string: (mode) => ({ mode }),\n                },\n                value: fields.enums,\n              }),\n              propertiesRequiredByDefault:\n                fields.propertiesRequiredByDefault !== undefined\n                  ? fields.propertiesRequiredByDefault\n                  : defaultValue.propertiesRequiredByDefault,\n              readWrite: valueToObject({\n                defaultValue: {\n                  ...(defaultValue.readWrite as Extract<\n                    typeof defaultValue.readWrite,\n                    Record<string, unknown>\n                  >),\n                  enabled:\n                    fields.readWrite !== undefined\n                      ? Boolean(fields.readWrite)\n                      : (\n                          defaultValue.readWrite as Extract<\n                            typeof defaultValue.readWrite,\n                            Record<string, unknown>\n                          >\n                        ).enabled,\n                },\n                mappers: {\n                  boolean: (enabled) => ({ enabled }),\n                  object: (fields, defaultValue) => ({\n                    ...fields,\n                    requests: valueToObject({\n                      defaultValue: {\n                        ...(defaultValue.requests as Extract<\n                          typeof defaultValue.requests,\n                          Record<string, unknown>\n                        >),\n                      },\n                      mappers: {\n                        function: (name) => ({ name }),\n                        string: (name) => ({ name }),\n                      },\n                      value: fields.requests,\n                    }),\n                    responses: valueToObject({\n                      defaultValue: {\n                        ...(defaultValue.responses as Extract<\n                          typeof defaultValue.responses,\n                          Record<string, unknown>\n                        >),\n                      },\n                      mappers: {\n                        function: (name) => ({ name }),\n                        string: (name) => ({ name }),\n                      },\n                      value: fields.responses,\n                    }),\n                  }),\n                },\n                value: fields.readWrite,\n              }),\n              schemaName:\n                fields.schemaName !== undefined ? fields.schemaName : defaultValue.schemaName,\n            }),\n          },\n          value: fields.transforms,\n        }),\n        validate_EXPERIMENTAL:\n          fields.validate_EXPERIMENTAL === true ? 'warn' : fields.validate_EXPERIMENTAL,\n      }),\n    },\n    value: userConfig.parser,\n  });\n  return parser as Parser;\n}\n"
  },
  {
    "path": "packages/shared/src/config/parser/filters.ts",
    "content": "export type Filters = {\n  /**\n   * Include deprecated resources in the output?\n   *\n   * @default true\n   */\n  deprecated?: boolean;\n  operations?: {\n    /**\n     * Prevent operations matching the `exclude` filters from being processed.\n     *\n     * In case of conflicts, `exclude` takes precedence over `include`.\n     *\n     * @example ['GET /api/v1/foo']\n     */\n    exclude?: ReadonlyArray<string>;\n    /**\n     * Process only operations matching the `include` filters.\n     *\n     * In case of conflicts, `exclude` takes precedence over `include`.\n     *\n     * @example ['GET /api/v1/foo']\n     */\n    include?: ReadonlyArray<string>;\n  };\n  /**\n   * Keep reusable components without any references from operations in the\n   * output? By default, we exclude orphaned resources.\n   *\n   * @default false\n   */\n  orphans?: boolean;\n  parameters?: {\n    /**\n     * Prevent parameters matching the `exclude` filters from being processed.\n     *\n     * In case of conflicts, `exclude` takes precedence over `include`.\n     *\n     * @example ['QueryParam']\n     */\n    exclude?: ReadonlyArray<string>;\n    /**\n     * Process only parameters matching the `include` filters.\n     *\n     * In case of conflicts, `exclude` takes precedence over `include`.\n     *\n     * @example ['QueryParam']\n     */\n    include?: ReadonlyArray<string>;\n  };\n  /**\n   * Should we preserve the key order when overwriting your input? This\n   * option is disabled by default to improve performance.\n   *\n   * @default false\n   */\n  preserveOrder?: boolean;\n  requestBodies?: {\n    /**\n     * Prevent request bodies matching the `exclude` filters from being processed.\n     *\n     * In case of conflicts, `exclude` takes precedence over `include`.\n     *\n     * @example ['Foo']\n     */\n    exclude?: ReadonlyArray<string>;\n    /**\n     * Process only request bodies matching the `include` filters.\n     *\n     * In case of conflicts, `exclude` takes precedence over `include`.\n     *\n     * @example ['Foo']\n     */\n    include?: ReadonlyArray<string>;\n  };\n  responses?: {\n    /**\n     * Prevent responses matching the `exclude` filters from being processed.\n     *\n     * In case of conflicts, `exclude` takes precedence over `include`.\n     *\n     * @example ['Foo']\n     */\n    exclude?: ReadonlyArray<string>;\n    /**\n     * Process only responses matching the `include` filters.\n     *\n     * In case of conflicts, `exclude` takes precedence over `include`.\n     *\n     * @example ['Foo']\n     */\n    include?: ReadonlyArray<string>;\n  };\n  schemas?: {\n    /**\n     * Prevent schemas matching the `exclude` filters from being processed.\n     *\n     * In case of conflicts, `exclude` takes precedence over `include`.\n     *\n     * @example ['Foo']\n     */\n    exclude?: ReadonlyArray<string>;\n    /**\n     * Process only schemas matching the `include` filters.\n     *\n     * In case of conflicts, `exclude` takes precedence over `include`.\n     *\n     * @example ['Foo']\n     */\n    include?: ReadonlyArray<string>;\n  };\n  tags?: {\n    /**\n     * Prevent tags matching the `exclude` filters from being processed.\n     *\n     * In case of conflicts, `exclude` takes precedence over `include`.\n     *\n     * @example ['foo']\n     */\n    exclude?: ReadonlyArray<string>;\n    /**\n     * Process only tags matching the `include` filters.\n     *\n     * In case of conflicts, `exclude` takes precedence over `include`.\n     *\n     * @example ['foo']\n     */\n    include?: ReadonlyArray<string>;\n  };\n};\n"
  },
  {
    "path": "packages/shared/src/config/parser/patch.ts",
    "content": "import type { MaybeFunc } from '@hey-api/types';\n\nimport type {\n  OpenApi,\n  OpenApiMetaObject,\n  OpenApiOperationObject,\n  OpenApiParameterObject,\n  OpenApiRequestBodyObject,\n  OpenApiResponseObject,\n  OpenApiSchemaObject,\n} from '../../openApi/types';\n\nexport type PatchInputFn = (\n  spec: OpenApi.V2_0_X | OpenApi.V3_0_X | OpenApi.V3_1_X,\n) => void | Promise<void>;\n\nexport type Patch =\n  | PatchInputFn\n  | {\n      /**\n       * Patch the raw OpenAPI spec object in place. Called before all other\n       * patch callbacks. Useful for bulk/structural transformations such as\n       * adding new component definitions or modifying many operations at once.\n       *\n       * @param spec The OpenAPI spec object for the current version.\n       *\n       * @example\n       * ```ts\n       * input: (spec) => {\n       *   // Create new component parameters\n       *   if (!spec.components) spec.components = {};\n       *   if (!spec.components.parameters) spec.components.parameters = {};\n       *   spec.components.parameters.MyParam = {\n       *     in: 'query',\n       *     name: 'myParam',\n       *     schema: { type: 'string' }\n       *   };\n       *\n       *   // Inject parameters into operations\n       *   for (const [path, pathItem] of Object.entries(spec.paths ?? {})) {\n       *     if (pathItem?.get) {\n       *       if (!Array.isArray(pathItem.get.parameters)) {\n       *         pathItem.get.parameters = [];\n       *       }\n       *       pathItem.get.parameters.push({\n       *         $ref: '#/components/parameters/MyParam'\n       *       });\n       *     }\n       *   }\n       * }\n       * ```\n       */\n      input?: PatchInputFn;\n      /**\n       * Patch the OpenAPI meta object in place. Useful for modifying general metadata such as title, description, version, or custom fields before further processing.\n       *\n       * @param meta The OpenAPI meta object for the current version.\n       */\n      meta?: (\n        meta: OpenApiMetaObject.V2_0_X | OpenApiMetaObject.V3_0_X | OpenApiMetaObject.V3_1_X,\n      ) => void;\n      /**\n       * Patch OpenAPI operations in place. Each function receives the operation\n       * object to be modified in place. Common use cases include injecting\n       * `operationId` for specs that don't have them, adding `x-*` extensions,\n       * setting `deprecated` based on path patterns, or injecting `security`\n       * requirements globally.\n       *\n       * Can be:\n       * - `Record<string, fn>`: Patch specific operations by `\"METHOD /path\"` key\n       * - `function`: Bulk callback receives `(method, path, operation)` for every operation\n       *\n       * Both patterns support async functions for operations like fetching data\n       * from external sources or performing I/O.\n       *\n       * @example\n       * ```js\n       * // Named operations\n       * operations: {\n       *   'GET /foo': (operation) => {\n       *     operation.responses['200'].description = 'Success';\n       *   },\n       *   'POST /bar': (operation) => {\n       *     operation.deprecated = true;\n       *   }\n       * }\n       *\n       * // Bulk callback for all operations\n       * operations: (method, path, operation) => {\n       *   if (!operation.operationId) {\n       *     operation.operationId = method + buildOperationName(path);\n       *   }\n       * }\n       *\n       * // Async example - inject operationId based on path patterns\n       * operations: async (method, path, operation) => {\n       *   if (operation.operationId) return;\n       *\n       *   const segments = path.split('/').filter(Boolean);\n       *   const parts = segments\n       *     .map((seg) => seg.startsWith('{') ? 'ById' : seg)\n       *     .join('');\n       *   operation.operationId = method + parts;\n       * }\n       * ```\n       */\n      operations?:\n        | Record<\n            string,\n            (\n              operation:\n                | OpenApiOperationObject.V2_0_X\n                | OpenApiOperationObject.V3_0_X\n                | OpenApiOperationObject.V3_1_X,\n            ) => void | Promise<void>\n          >\n        | ((\n            method: string,\n            path: string,\n            operation:\n              | OpenApiOperationObject.V2_0_X\n              | OpenApiOperationObject.V3_0_X\n              | OpenApiOperationObject.V3_1_X,\n          ) => void | Promise<void>);\n      /**\n       * Patch OpenAPI parameters in place. The key is the parameter name, and the function receives the parameter object to modify directly.\n       *\n       * @example\n       * parameters: {\n       *   limit: (parameter) => {\n       *     parameter.schema.type = 'integer';\n       *   }\n       * }\n       */\n      parameters?: Record<\n        string,\n        (parameter: OpenApiParameterObject.V3_0_X | OpenApiParameterObject.V3_1_X) => void\n      >;\n      /**\n       * Patch OpenAPI request bodies in place. The key is the request body name, and the function receives the request body object to modify directly.\n       *\n       * @example\n       * requestBodies: {\n       *   CreateUserRequest: (requestBody) => {\n       *     requestBody.required = true;\n       *   }\n       * }\n       */\n      requestBodies?: Record<\n        string,\n        (requestBody: OpenApiRequestBodyObject.V3_0_X | OpenApiRequestBodyObject.V3_1_X) => void\n      >;\n      /**\n       * Patch OpenAPI responses in place. The key is the response name, and the function receives the response object to modify directly.\n       *\n       * @example\n       * responses: {\n       *   NotFound: (response) => {\n       *     response.description = 'Resource not found.';\n       *   }\n       * }\n       */\n      responses?: Record<\n        string,\n        (response: OpenApiResponseObject.V3_0_X | OpenApiResponseObject.V3_1_X) => void\n      >;\n      /**\n       * Each function receives the schema object to be modified in place. Common\n       * use cases include fixing incorrect data types, removing unwanted\n       * properties, adding missing fields, or standardizing date/time formats.\n       *\n       * Can be:\n       * - `Record<string, fn>`: Patch specific named schemas\n       * - `function`: Bulk callback receives `(name, schema)` for every schema\n       *\n       * Both patterns support async functions for operations like fetching data\n       * from external sources or performing I/O.\n       *\n       * @example\n       * ```js\n       * // Named schemas\n       * schemas: {\n       *   Foo: (schema) => {\n       *     // convert date-time format to timestamp\n       *     delete schema.properties.updatedAt.format;\n       *     schema.properties.updatedAt.type = 'number';\n       *   },\n       *   Bar: (schema) => {\n       *     // add missing property\n       *     schema.properties.metadata = {\n       *       additionalProperties: true,\n       *       type: 'object',\n       *     };\n       *     schema.required = ['metadata'];\n       *   },\n       *   Baz: (schema) => {\n       *     // remove property\n       *     delete schema.properties.internalField;\n       *   }\n       * }\n       *\n       * // Bulk callback for all schemas\n       * schemas: (name, schema) => {\n       *   const match = name.match(/_v(\\d+)_(\\d+)_(\\d+)_/);\n       *   if (match) {\n       *     schema.description = (schema.description || '') +\n       *       `\\n@version ${match[1]}.${match[2]}.${match[3]}`;\n       *   }\n       * }\n       *\n       * // Async example - fetch metadata from external source\n       * schemas: async (name, schema) => {\n       *   const metadata = await fetchSchemaMetadata(name);\n       *   if (metadata) {\n       *     schema.description = `${schema.description}\\n\\n${metadata.notes}`;\n       *   }\n       * }\n       * ```\n       */\n      schemas?:\n        | Record<\n            string,\n            (\n              schema:\n                | OpenApiSchemaObject.V2_0_X\n                | OpenApiSchemaObject.V3_0_X\n                | OpenApiSchemaObject.V3_1_X,\n            ) => void | Promise<void>\n          >\n        | ((\n            name: string,\n            schema:\n              | OpenApiSchemaObject.V2_0_X\n              | OpenApiSchemaObject.V3_0_X\n              | OpenApiSchemaObject.V3_1_X,\n          ) => void | Promise<void>);\n      /**\n       * Patch the OpenAPI version string. The function receives the current version and should return the new version string.\n       * Useful for normalizing or overriding the version value before further processing.\n       *\n       * @param version The current OpenAPI version string.\n       * @returns The new version string to use.\n       *\n       * @example\n       * version: (version) => version.replace(/^v/, '')\n       */\n      version?: MaybeFunc<(version: string) => string>;\n    };\n"
  },
  {
    "path": "packages/shared/src/config/parser/types.ts",
    "content": "import type { Hooks } from '../../parser/hooks';\nimport type { Casing, NameTransformer } from '../../utils/naming/types';\nimport type { FeatureToggle, NamingOptions } from '../shared';\nimport type { Filters } from './filters';\nimport type { Patch } from './patch';\n\ntype EnumsMode = 'inline' | 'root';\n\nexport type UserParser = {\n  /**\n   * Filters can be used to select a subset of your input before it's passed\n   * to plugins.\n   */\n  filters?: Filters;\n  /**\n   * Optional hooks to override default plugin behavior.\n   *\n   * Use these to classify resources, control which outputs are generated,\n   * or provide custom behavior for specific resources.\n   */\n  hooks?: Hooks;\n  /**\n   * Pagination configuration.\n   */\n  pagination?: {\n    /**\n     * Array of keywords to be considered as pagination field names.\n     * These will be used to detect pagination fields in schemas and parameters.\n     *\n     * @default ['after', 'before', 'cursor', 'offset', 'page', 'start']\n     */\n    keywords?: ReadonlyArray<string>;\n  };\n  /**\n   * Custom input transformations to execute before parsing. Use this\n   * to modify, fix, or enhance input before it's passed to plugins.\n   */\n  patch?: Patch;\n  /**\n   * Built-in transformations that modify or normalize the input before it's\n   * passed to plugins. These options enable predictable, documented behaviors\n   * and are distinct from custom patches. Use this to perform structural\n   * changes to input in a standardized way.\n   */\n  transforms?: {\n    /**\n     * Your input might contain two types of enums:\n     * - enums defined as reusable components (root enums)\n     * - non-reusable enums nested within other schemas (inline enums)\n     *\n     * You may want all enums to be reusable. This is because only root enums\n     * are typically exported by plugins. Inline enums will never be directly\n     * importable since they're nested inside other schemas.\n     *\n     * For example, to export nested enum types with the `@hey-api/typescript`\n     * plugin, set `enums` to `root`. Likewise, if you don't want to export any\n     * enum types, set `enums` to `inline`.\n     *\n     * @default false\n     */\n    enums?:\n      | boolean\n      | EnumsMode\n      | {\n          /**\n           * Casing convention for generated names.\n           *\n           * @default 'PascalCase'\n           */\n          case?: Casing;\n          /**\n           * Whether this feature is enabled.\n           *\n           * @default true\n           */\n          enabled?: boolean;\n          /**\n           * Controls whether enums are promoted to reusable root components\n           * ('root') or kept inline within schemas ('inline').\n           *\n           * @default 'root'\n           */\n          mode?: EnumsMode;\n          /**\n           * Customize the generated name of enums.\n           *\n           * @default '{{name}}Enum'\n           */\n          name?: NameTransformer;\n        };\n    /**\n     * By default, any object schema with a missing `required` keyword is\n     * interpreted as \"no properties are required.\" This is the correct\n     * behavior according to the OpenAPI standard. However, some specifications\n     * interpret a missing `required` keyword as \"all properties should be\n     * required.\"\n     *\n     * This option allows you to change the default behavior so that\n     * properties are required by default unless explicitly marked as optional.\n     *\n     * @default false\n     */\n    propertiesRequiredByDefault?: boolean;\n    /**\n     * Your schemas might contain read-only or write-only fields. Using such\n     * schemas directly could mean asking the user to provide a read-only\n     * field in requests, or expecting a write-only field in responses.\n     *\n     * We separate schemas for requests and responses if direct usage\n     * would result in such scenarios. You can still disable this\n     * behavior if you prefer.\n     *\n     * @default true\n     */\n    readWrite?:\n      | boolean\n      | {\n          /**\n           * Whether this feature is enabled.\n           *\n           * @default true\n           */\n          enabled?: boolean;\n          /**\n           * Configuration for generated request-specific schemas.\n           *\n           * Can be:\n           * - `string` or `function`: Shorthand for `{ name: string | function }`\n           * - `object`: Full configuration object\n           *\n           * @default '{{name}}Writable'\n           */\n          requests?:\n            | NameTransformer\n            | {\n                /**\n                 * Casing convention for generated names.\n                 *\n                 * @default 'preserve'\n                 */\n                case?: Casing;\n                /**\n                 * Customize the generated name of schemas used in requests or\n                 * containing write-only fields.\n                 *\n                 * @default '{{name}}Writable'\n                 */\n                name?: NameTransformer;\n              };\n          /**\n           * Configuration for generated response-specific schemas.\n           *\n           * Can be:\n           * - `string` or `function`: Shorthand for `{ name: string | function }`\n           * - `object`: Full configuration object\n           *\n           * @default '{{name}}'\n           */\n          responses?:\n            | NameTransformer\n            | {\n                /**\n                 * Casing convention for generated names.\n                 *\n                 * @default 'preserve'\n                 */\n                case?: Casing;\n                /**\n                 * Customize the generated name of schemas used in responses or\n                 * containing read-only fields. We default to the original name\n                 * to avoid breaking output when a read-only field is added.\n                 *\n                 * @default '{{name}}'\n                 */\n                name?: NameTransformer;\n              };\n        };\n    /**\n     * Sometimes your schema names are auto-generated or follow a naming convention\n     * that produces verbose or awkward type names. You can rename schema component\n     * keys throughout the specification, automatically updating all `$ref` pointers.\n     *\n     * @example\n     * ```ts\n     * {\n     *   schemaName: (name) => name.replace(/_v\\d+_\\d+_\\d+_/, '_')\n     * }\n     * ```\n     *\n     * @default undefined\n     */\n    schemaName?: NameTransformer;\n  };\n  /**\n   * **This is an experimental feature.**\n   *\n   * Validate the input before generating output? This is an experimental,\n   * lightweight feature and support will be added on an ad hoc basis. Setting\n   * `validate_EXPERIMENTAL` to `true` is the same as `warn`.\n   *\n   * @default false\n   */\n  validate_EXPERIMENTAL?: boolean | 'strict' | 'warn';\n};\n\nexport type Parser = {\n  /**\n   * Filters can be used to select a subset of your input before it's passed\n   * to plugins.\n   */\n  filters?: Filters;\n  /**\n   * Optional hooks to override default plugin behavior.\n   *\n   * Use these to classify resources, control which outputs are generated,\n   * or provide custom behavior for specific resources.\n   */\n  hooks: Hooks;\n  /**\n   * Pagination configuration.\n   */\n  pagination: {\n    /**\n     * Array of keywords to be considered as pagination field names.\n     * These will be used to detect pagination fields in schemas and parameters.\n     *\n     * @default ['after', 'before', 'cursor', 'offset', 'page', 'start']\n     */\n    keywords: ReadonlyArray<string>;\n  };\n  /**\n   * Custom input transformations to execute before parsing. Use this\n   * to modify, fix, or enhance input before it's passed to plugins.\n   */\n  patch?: Patch;\n  /**\n   * Built-in transformations that modify or normalize the input before it's\n   * passed to plugins. These options enable predictable, documented behaviors\n   * and are distinct from custom patches. Use this to perform structural\n   * changes to input in a standardized way.\n   */\n  transforms: {\n    /**\n     * Your input might contain two types of enums:\n     * - enums defined as reusable components (root enums)\n     * - non-reusable enums nested within other schemas (inline enums)\n     *\n     * You may want all enums to be reusable. This is because only root enums\n     * are typically exported by plugins. Inline enums will never be directly\n     * importable since they're nested inside other schemas.\n     *\n     * For example, to export nested enum types with the `@hey-api/typescript`\n     * plugin, set `enums` to `root`. Likewise, if you don't want to export any\n     * enum types, set `enums` to `inline`.\n     */\n    enums: NamingOptions &\n      FeatureToggle & {\n        /**\n         * Controls whether enums are promoted to reusable root components\n         * ('root') or kept inline within schemas ('inline').\n         *\n         * @default 'root'\n         */\n        mode: EnumsMode;\n      };\n    /**\n     * By default, any object schema with a missing `required` keyword is\n     * interpreted as \"no properties are required.\" This is the correct\n     * behavior according to the OpenAPI standard. However, some specifications\n     * interpret a missing `required` keyword as \"all properties should be\n     * required.\"\n     *\n     * This option allows you to change the default behavior so that\n     * properties are required by default unless explicitly marked as optional.\n     *\n     * @default false\n     */\n    propertiesRequiredByDefault: boolean;\n    /**\n     * Your schemas might contain read-only or write-only fields. Using such\n     * schemas directly could mean asking the user to provide a read-only\n     * field in requests, or expecting a write-only field in responses.\n     *\n     * We separate schemas for requests and responses if direct usage\n     * would result in such scenarios. You can still disable this\n     * behavior if you prefer.\n     */\n    readWrite: FeatureToggle & {\n      /**\n       * Configuration for generated request-specific schemas.\n       */\n      requests: NamingOptions;\n      /**\n       * Configuration for generated response-specific schemas.\n       */\n      responses: NamingOptions;\n    };\n    /**\n     * Rename schema component keys and automatically update all `$ref` pointers\n     * throughout the specification.\n     *\n     * @default undefined\n     */\n    schemaName?: NameTransformer;\n  };\n  /**\n   * **This is an experimental feature.**\n   *\n   * Validate the input before generating output? This is an experimental,\n   * lightweight feature and support will be added on an ad hoc basis. Setting\n   * `validate_EXPERIMENTAL` to `true` is the same as `warn`.\n   *\n   * @default false\n   */\n  validate_EXPERIMENTAL: false | 'strict' | 'warn';\n};\n"
  },
  {
    "path": "packages/shared/src/config/shared.ts",
    "content": "import type { NameConflictResolver, RenderContext, Symbol } from '@hey-api/codegen-core';\nimport type { AnyString, MaybeArray } from '@hey-api/types';\n\nimport type { Plugin } from '../plugins/types';\nimport type { Logs } from '../types/logs';\nimport type { Casing, NameTransformer } from '../utils/naming/types';\nimport type { Input, UserInput, UserWatch } from './input/types';\nimport type { PostProcessor } from './output/postprocess';\nimport type { SourceConfig, UserSourceConfig } from './output/source/types';\nimport type { OutputHeader } from './output/types';\nimport type { Parser, UserParser } from './parser/types';\n\nexport type FeatureToggle = {\n  /**\n   * Whether this feature is enabled.\n   */\n  enabled: boolean;\n};\n\nexport type UserIndexExportOption = {\n  /**\n   * Whether exports should be re-exported from the entry file.\n   *\n   * - `true` — include all exports\n   * - `false` — exclude all exports\n   * - `(symbol) => boolean` — include exports matching the predicate\n   *\n   * @default false\n   * @deprecated use `includeInEntry` instead\n   */\n  exportFromIndex?: boolean | ((symbol: Symbol) => boolean);\n  /**\n   * Whether exports should be re-exported from the entry file.\n   *\n   * - `true` — include all exports\n   * - `false` — exclude all exports\n   * - `(symbol) => boolean` — include exports matching the predicate\n   *\n   * @default false\n   */\n  includeInEntry?: boolean | ((symbol: Symbol) => boolean);\n};\nexport type IndexExportOption = {\n  /**\n   * Whether exports should be re-exported from the entry file.\n   *\n   * @deprecated use `includeInEntry` instead\n   */\n  exportFromIndex: boolean | ((symbol: Symbol) => boolean);\n  /**\n   * Whether exports should be re-exported from the entry file.\n   */\n  includeInEntry: boolean | ((symbol: Symbol) => boolean);\n};\n\nexport type UserCommentsOption = {\n  /**\n   * Whether to add comments to the generated code.\n   *\n   * @default true\n   */\n  comments?: boolean;\n};\nexport type CommentsOption = {\n  /**\n   * Whether to add comments to the generated code.\n   */\n  comments: boolean;\n};\n\nexport type NamingOptions = {\n  /**\n   * Casing convention for generated names.\n   */\n  case: Casing;\n  /**\n   * Naming pattern for generated names.\n   */\n  name: NameTransformer;\n};\n\n/**\n * Base output shape all packages must satisfy.\n */\nexport interface BaseUserOutput<TModuleExtension extends string = string> {\n  /**\n   * Defines casing of the output fields. By default, we preserve `input`\n   * values as data transforms incur a performance penalty at runtime.\n   *\n   * @default undefined\n   */\n  case?: Casing;\n  /**\n   * Clean the `output` folder on every run? If disabled, this folder may\n   * be used to store additional files. The default option is `true` to\n   * reduce the risk of keeping outdated files around when configuration,\n   * input, or package version changes.\n   *\n   * @default true\n   */\n  clean?: boolean;\n  /**\n   * Whether to generate an entry file that re-exports symbols for convenient imports.\n   *\n   * Plugins control their inclusion via `includeInEntry`.\n   *\n   * @default true\n   */\n  entryFile?: boolean;\n  /**\n   * Optional function to transform file names before they are used.\n   *\n   * @param name The original file name.\n   * @returns The transformed file name.\n   * @default '{{name}}'\n   */\n  fileName?:\n    | NameTransformer\n    | {\n        /**\n         * Casing convention for generated names.\n         *\n         * @default 'preserve'\n         */\n        case?: Casing;\n        /**\n         * Naming pattern for generated names.\n         *\n         * @default '{{name}}'\n         */\n        name?: NameTransformer;\n        /**\n         * Suffix to append to file names (before the extension). For example,\n         * with a suffix of `.gen`, `example.ts` becomes `example.gen.ts`.\n         *\n         * @default '.gen'\n         * @example\n         * // Given a suffix of `.gen`\n         * 'index.ts' -> 'index.ts' (index files are not renamed)\n         * 'user.ts' -> 'user.gen.ts'\n         * 'order.gen.ts' -> 'order.gen.ts' (files already containing the suffix are not renamed)\n         */\n        suffix?: string | null;\n      };\n  /**\n   * Text to include at the top of every generated file.\n   */\n  header?: OutputHeader;\n  /**\n   * Whether to generate an entry file that re-exports symbols for convenient imports.\n   *\n   * Plugins control their inclusion via `includeInEntry`.\n   *\n   * @default true\n   * @deprecated use `entryFile` instead\n   */\n  indexFile?: boolean;\n  /**\n   * Options for module specifier resolution.\n   */\n  module?: {\n    /**\n     * If specified, this will be the extension used when importing other\n     * modules. By default, we don't add an extension unless we detect that\n     * you're using a module resolution strategy that requires one.\n     *\n     * @default undefined\n     */\n    extension?: TModuleExtension | AnyString | null;\n    /**\n     * Function to transform module specifiers.\n     *\n     * @default undefined\n     */\n    resolve?: ResolveModuleFn;\n  };\n  /**\n   * Optional name conflict resolver to customize how naming conflicts\n   * are handled.\n   */\n  nameConflictResolver?: NameConflictResolver;\n  /**\n   * The absolute path to the output folder.\n   */\n  path: string;\n  /**\n   * Optional function to transform module specifiers.\n   *\n   * @default undefined\n   * @deprecated use `module.resolve` instead\n   */\n  resolveModuleName?: ResolveModuleFn;\n  /**\n   * Configuration for generating a copy of the input source used to produce this output.\n   *\n   * Set to `false` to skip generating the source, or `true` to use defaults.\n   *\n   * You can also provide a configuration object to further customize behavior.\n   *\n   * @default false\n   */\n  source?: boolean | UserSourceConfig;\n}\n\n/**\n * Base output shape all packages must satisfy.\n */\nexport interface BaseOutput<TModuleExtension extends string = string> {\n  /**\n   * Defines casing of the output fields. By default, we preserve `input`\n   * values as data transforms incur a performance penalty at runtime.\n   */\n  case: Casing | undefined;\n  /**\n   * Clean the `output` folder on every run? If disabled, this folder may\n   * be used to store additional files. The default option is `true` to\n   * reduce the risk of keeping outdated files around when configuration,\n   * input, or package version changes.\n   */\n  clean: boolean;\n  /** Whether to generate an entry file that re-exports symbols for convenient imports. */\n  entryFile: boolean;\n  /**\n   * Optional function to transform file names before they are used.\n   *\n   * @param name The original file name.\n   * @returns The transformed file name.\n   */\n  fileName: NamingOptions & {\n    /**\n     * Suffix to append to file names (before the extension). For example,\n     * with a suffix of `.gen`, `example.ts` becomes `example.gen.ts`.\n     *\n     * @example\n     * // Given a suffix of `.gen`\n     * 'index.ts' -> 'index.ts' (index files are not renamed)\n     * 'user.ts' -> 'user.gen.ts'\n     * 'order.gen.ts' -> 'order.gen.ts' (files already containing the suffix are not renamed)\n     */\n    suffix: string | null;\n  };\n  /** Text to include at the top of every generated file. */\n  header: OutputHeader;\n  /**\n   * Whether to generate an entry file that re-exports symbols for convenient imports.\n   *\n   * @deprecated use `entryFile` instead\n   */\n  indexFile: boolean;\n  /** Options for module specifier resolution. */\n  module: {\n    /** The extension used when importing other modules. */\n    extension: TModuleExtension | AnyString | null;\n    /** Function to transform module specifiers. */\n    resolve: ResolveModuleFn | undefined;\n  };\n  /** Name conflict resolver to customize how naming conflicts are handled. */\n  nameConflictResolver: NameConflictResolver | undefined;\n  /** The absolute path to the output folder. */\n  path: string;\n  /** Post-processing commands to run on the output folder, executed in order. */\n  postProcess: ReadonlyArray<PostProcessor>;\n  /** Configuration for generating a copy of the input source used to produce this output. */\n  source: SourceConfig;\n}\n\n/**\n * Core configuration shared across all packages.\n */\nexport type BaseUserConfig<TOutput extends BaseUserOutput> = {\n  /**\n   * Path to the config file. Set this value if you don't use the default\n   * config file name, or it's not located in the project root.\n   */\n  configFile?: string;\n  /**\n   * Skip writing files to disk?\n   *\n   * @default false\n   */\n  dryRun?: boolean;\n  /**\n   * Path to the OpenAPI specification. This can be:\n   *   - path\n   *   - URL\n   *   - API registry shorthand\n   *\n   * Both JSON and YAML file formats are supported. You can also pass the parsed\n   * object directly if you're fetching the file yourself.\n   *\n   * Alternatively, you can define a configuration object with more options.\n   *\n   * If you define an array, we will generate a single output from multiple\n   * inputs. If you define an array of outputs with the same length, we will\n   * generate multiple outputs, one for each input.\n   */\n  input: MaybeArray<UserInput | Required<UserInput>['path']>;\n  /**\n   * Show an interactive error reporting tool when the program crashes? You\n   * generally want to keep this disabled (default).\n   *\n   * @default false\n   */\n  interactive?: boolean;\n  /**\n   * The relative location of the logs folder.\n   *\n   * @default process.cwd()\n   */\n  logs?: string | Logs;\n  /**\n   * Path to the output folder.\n   *\n   * If you define an array of outputs with the same length as inputs, we will\n   * generate multiple outputs, one for each input.\n   */\n  output: MaybeArray<string | TOutput>;\n  /**\n   * Customize how the input is parsed and transformed before it's passed to\n   * plugins.\n   */\n  parser?: UserParser;\n  /**\n   * @deprecated use `input.watch` instead\n   */\n  watch?: UserWatch;\n};\n\n/**\n * Core configuration shared across all packages.\n */\nexport type BaseConfig<TUserConfig extends object, TOutput extends BaseOutput> = Omit<\n  Required<TUserConfig>,\n  'input' | 'logs' | 'output' | 'parser' | 'plugins' | 'watch'\n> & {\n  /**\n   * Path to the input specification.\n   */\n  input: ReadonlyArray<Input>;\n  logs: Logs;\n  /**\n   * Path to the output folder.\n   */\n  output: TOutput;\n  /**\n   * Customize how the input is parsed and transformed before it's passed to\n   * plugins.\n   */\n  parser: Parser;\n  // Loose types - packages override via intersection\n  pluginOrder: ReadonlyArray<string>;\n  plugins: Record<string, Plugin.Config<Plugin.Types> | undefined>;\n};\n\n/**\n * For shared utilities that operate on any config.\n */\nexport type AnyConfig = BaseConfig<Record<string, unknown>, BaseOutput>;\n\n/**\n * Function to transform module specifiers.\n */\nexport type ResolveModuleFn = (path: string, ctx: RenderContext) => string | undefined;\n"
  },
  {
    "path": "packages/shared/src/config/utils/config.ts",
    "content": "type ObjectType<T> =\n  Extract<T, Record<string, any>> extends never\n    ? Record<string, any>\n    : Extract<T, Record<string, any>>;\n\ntype NotArray<T> = T extends Array<any> ? never : T;\ntype NotFunction<T> = T extends (...args: Array<any>) => any ? never : T;\ntype PlainObject<T> = T extends object\n  ? NotFunction<T> extends never\n    ? never\n    : NotArray<T> extends never\n      ? never\n      : T\n  : never;\n\ntype MappersType<T> = {\n  boolean: T extends boolean ? (value: boolean) => Partial<ObjectType<T>> : never;\n  function: T extends (...args: Array<any>) => any\n    ? (value: (...args: Array<any>) => any) => Partial<ObjectType<T>>\n    : never;\n  number: T extends number ? (value: number) => Partial<ObjectType<T>> : never;\n  object?: PlainObject<T> extends never\n    ? never\n    : (value: Partial<PlainObject<T>>, defaultValue: PlainObject<T>) => Partial<ObjectType<T>>;\n  string: T extends string ? (value: string) => Partial<ObjectType<T>> : never;\n} extends infer U\n  ? { [K in keyof U as U[K] extends never ? never : K]: U[K] }\n  : never;\n\ntype IsObjectOnly<T> = T extends Record<string, any> | undefined\n  ? Extract<T, string | boolean | number | ((...args: Array<any>) => any)> extends never\n    ? true\n    : false\n  : false;\n\nexport type ValueToObject = <\n  T extends\n    | undefined\n    | string\n    | boolean\n    | number\n    | ((...args: Array<any>) => any)\n    | Record<string, any>,\n>(\n  args: {\n    defaultValue: ObjectType<T>;\n    value: T;\n  } & (IsObjectOnly<T> extends true\n    ? {\n        mappers?: MappersType<T>;\n      }\n    : {\n        mappers: MappersType<T>;\n      }),\n) => PlainObject<T>;\n\nconst isPlainObject = (value: unknown): value is Record<string, any> =>\n  typeof value === 'object' &&\n  value !== null &&\n  !Array.isArray(value) &&\n  typeof value !== 'function';\n\nconst mergeResult = <T>(result: ObjectType<T>, mapped: Record<string, any>): ObjectType<T> => {\n  for (const [key, value] of Object.entries(mapped)) {\n    if (value !== undefined && value !== '') {\n      (result as Record<string, any>)[key] = value;\n    }\n  }\n  return result;\n};\n\nexport const valueToObject: ValueToObject = ({ defaultValue, mappers, value }) => {\n  let result = { ...defaultValue };\n\n  switch (typeof value) {\n    case 'boolean':\n      if (mappers && 'boolean' in mappers) {\n        const mapper = mappers.boolean as (value: boolean) => Record<string, any>;\n        result = mergeResult(result, mapper(value));\n      }\n      break;\n    case 'function':\n      if (mappers && 'function' in mappers) {\n        const mapper = mappers.function as (\n          value: (...args: Array<any>) => any,\n        ) => Record<string, any>;\n        result = mergeResult(result, mapper(value as (...args: Array<any>) => any));\n      }\n      break;\n    case 'number':\n      if (mappers && 'number' in mappers) {\n        const mapper = mappers.number as (value: number) => Record<string, any>;\n        result = mergeResult(result, mapper(value));\n      }\n      break;\n    case 'string':\n      if (mappers && 'string' in mappers) {\n        const mapper = mappers.string as (value: string) => Record<string, any>;\n        result = mergeResult(result, mapper(value));\n      }\n      break;\n    case 'object':\n      if (isPlainObject(value)) {\n        if (mappers && 'object' in mappers && typeof mappers.object === 'function') {\n          const mapper = mappers.object as (\n            value: Record<string, any>,\n            defaultValue: ObjectType<any>,\n          ) => Partial<ObjectType<any>>;\n          result = mergeResult(result, mapper(value, defaultValue));\n        } else {\n          result = mergeResult(result, value);\n        }\n      }\n      break;\n  }\n\n  return result as any;\n};\n"
  },
  {
    "path": "packages/shared/src/config/utils/dependencies.ts",
    "content": "import type { RangeOptions, SemVer } from 'semver';\nimport * as semver from 'semver';\n\nexport type Dependency = {\n  /**\n   * Get the installed version of a package.\n   * @param name The name of the package to get the version for.\n   * @returns A SemVer object containing version information, or undefined if the package is not installed\n   *         or the version string is invalid.\n   */\n  getVersion: (name: string) => SemVer | undefined;\n  /**\n   * Check if a given package is installed in the project.\n   * @param name The name of the package to check.\n   */\n  isInstalled: (name: string) => boolean;\n  /**\n   * Check if the installed version of a package or a given SemVer object satisfies a semver range.\n   * @param nameOrVersion The name of the package to check, or a SemVer object.\n   * @param range The semver range to check against.\n   * @returns True if the version satisfies the range, false otherwise.\n   */\n  satisfies: (\n    nameOrVersion: string | SemVer,\n    range: string,\n    optionsOrLoose?: boolean | RangeOptions,\n  ) => boolean;\n};\n\nexport const satisfies: typeof semver.satisfies = (...args) => semver.satisfies(...args);\n\nexport function dependencyFactory(dependencies: Record<string, string>): Dependency {\n  return {\n    getVersion: (name) => {\n      const version = dependencies[name];\n      if (!version) return;\n      try {\n        let parsed = semver.parse(version);\n        if (parsed) return parsed;\n\n        const min = semver.minVersion(version);\n        if (min) return min;\n\n        parsed = semver.coerce(version);\n        if (parsed) return parsed;\n      } catch {\n        // noop\n      }\n      return;\n    },\n    isInstalled: (name) => Boolean(dependencies[name]),\n    satisfies: (nameOrVersion, range, optionsOrLoose) => {\n      const version =\n        typeof nameOrVersion === 'string' ? dependencies[nameOrVersion] : nameOrVersion;\n      return version ? satisfies(version, range, optionsOrLoose) : false;\n    },\n  };\n}\n"
  },
  {
    "path": "packages/shared/src/debug/graph.ts",
    "content": "import type { Graph } from '../graph';\n\nconst analyzeStructure = (graph: Graph) => {\n  let maxDepth = 0;\n  let maxChildren = 0;\n\n  const computeDepth = (pointer: string, depth: number): void => {\n    maxDepth = Math.max(maxDepth, depth);\n\n    const children = Array.from(graph.nodes.entries())\n      .filter(([, nodeInfo]) => nodeInfo.parentPointer === pointer)\n      .map(([childPointer]) => childPointer);\n\n    maxChildren = Math.max(maxChildren, children.length);\n\n    for (const childPointer of children) {\n      computeDepth(childPointer, depth + 1);\n    }\n  };\n\n  const totalNodes = graph.nodes.size;\n  if (graph.nodes.has('#')) {\n    computeDepth('#', 1);\n  }\n\n  return { maxChildren, maxDepth, totalNodes };\n};\n\nconst exportForVisualization = (graph: Graph) => {\n  const childrenMap = new Map<string, string[]>();\n\n  for (const [pointer, nodeInfo] of graph.nodes) {\n    if (!nodeInfo.parentPointer) continue;\n    if (!childrenMap.has(nodeInfo.parentPointer)) {\n      childrenMap.set(nodeInfo.parentPointer, []);\n    }\n    childrenMap.get(nodeInfo.parentPointer)!.push(pointer);\n  }\n\n  const nodes = Array.from(graph.nodes.keys()).map((pointer) => ({\n    children: childrenMap.get(pointer)?.length ?? 0,\n    childrenPointers: childrenMap.get(pointer) || [],\n    pointer,\n  }));\n\n  return nodes;\n};\n\nexport const graph = {\n  analyzeStructure,\n  exportForVisualization,\n} as const;\n"
  },
  {
    "path": "packages/shared/src/debug/index.ts",
    "content": "import { graph } from './graph';\nimport { ir } from './ir';\n\nexport const debugTools = {\n  graph,\n  ir,\n};\n"
  },
  {
    "path": "packages/shared/src/debug/ir.ts",
    "content": "import colors from 'ansi-colors';\n\nimport type { IR } from '../ir/types';\nimport { httpMethods } from '../openApi/shared/utils/operation';\n\nexport interface PrintOptions {\n  /**\n   * Indentation depth for `JSON.stringify()` when printing objects.\n   *\n   * @default 2\n   */\n  depth?: number;\n  /**\n   * Which section of the IR to print. Use 'all' to print every section.\n   *\n   * @default 'all'\n   */\n  section?: keyof IR.Model | 'all';\n  /**\n   * How much detail to print.\n   *\n   * - `summary` → only keys, names, operationIds, status codes\n   * - `full` → dump full JSON structures\n   *\n   * @default 'summary'\n   */\n  verbosity?: 'full' | 'summary';\n}\n\nconst indent = (level: number) => '  '.repeat(level);\n\nconst log = (message: string, level?: number) => console.log(`${indent(level ?? 0)}${message}`);\n\nconst print = (ir: IR.Model, options: PrintOptions = {}) => {\n  const { depth = 2, section = 'all', verbosity = 'summary' } = options;\n\n  const printObject = (\n    obj: unknown,\n    level: number,\n    kind: 'responses' | 'requestBody' | 'schema' | 'generic' = 'generic',\n  ) => {\n    if (verbosity === 'summary' && obj && typeof obj === 'object') {\n      if (kind === 'responses') {\n        const count = Object.keys(obj).length;\n        const noun = count === 1 ? 'code' : 'codes';\n        log(`responses: ${colors.yellow(`${count} ${noun}`)}`, level);\n      } else if (kind === 'requestBody') {\n        log(`requestBody: ${Object.keys(obj).join(', ')}`, level);\n      } else if (kind === 'schema') {\n        log(`schema keys: ${Object.keys(obj).join(', ')}`, level);\n      } else {\n        log(`keys: ${Object.keys(obj).join(', ')}`, level);\n      }\n    } else {\n      log(JSON.stringify(obj, null, depth), level);\n    }\n  };\n\n  const printPathItem = (\n    key: string,\n    item: IR.PathItemObject | IR.ReferenceObject,\n    base: number = 1,\n  ) => {\n    if ('$ref' in item) {\n      log(`${colors.cyan(key)} is a $ref → ${colors.yellow(item.$ref)}`, base);\n      return;\n    }\n\n    for (const method of Object.keys(item) as Array<keyof IR.PathItemObject>) {\n      if (!httpMethods.includes(method)) continue;\n\n      const operation = item[method]!;\n      log(\n        `${colors.green(method.toUpperCase())} ${colors.cyan(key)} (${colors.magenta(operation.operationId ?? '')})`,\n        base,\n      );\n\n      if (operation.body) printObject(operation.body, base + 1, 'requestBody');\n      if (operation.responses) printObject(operation.responses, base + 1, 'responses');\n    }\n  };\n\n  const sections =\n    section === 'all' ? (Object.keys(ir) as unknown as ReadonlyArray<keyof IR.Model>) : [section];\n\n  for (const section of sections) {\n    switch (section) {\n      case 'components':\n        if (ir.components?.schemas) {\n          log(`Components: ${Object.keys(ir.components.schemas).length} schemas`);\n          for (const [, schema] of Object.entries(ir.components.schemas)) {\n            printObject(schema, 1, 'schema');\n          }\n        }\n        break;\n      case 'paths': {\n        const paths = ir.paths || {};\n        log(`paths (${Object.keys(paths).length} items):`);\n        for (const [path, item] of Object.entries(paths)) {\n          printPathItem(path, item);\n        }\n        break;\n      }\n      case 'servers':\n        break;\n      case 'webhooks': {\n        const webhooks = ir.webhooks || {};\n        log(`webhooks (${Object.keys(webhooks).length} items):`);\n        for (const [path, item] of Object.entries(webhooks)) {\n          printPathItem(path, item);\n        }\n        break;\n      }\n    }\n  }\n};\n\nexport const ir = {\n  print,\n} as const;\n"
  },
  {
    "path": "packages/shared/src/error.ts",
    "content": "import fs from 'node:fs';\nimport path from 'node:path';\n\nimport colors from 'ansi-colors';\nimport open from 'open';\n\nimport { ensureDirSync } from './fs';\nimport { loadPackageJson } from './tsConfig';\n\ntype IJobError = {\n  error: Error;\n  jobIndex: number;\n};\n\n/**\n * Represents a single configuration error.\n *\n * Used for reporting issues with a specific config instance.\n */\nexport class ConfigError extends Error {\n  constructor(message: string) {\n    super(message);\n    this.name = 'ConfigError';\n  }\n}\n\n/**\n * Aggregates multiple config errors with their job indices for reporting.\n */\nexport class ConfigValidationError extends Error {\n  readonly errors: ReadonlyArray<IJobError>;\n\n  constructor(errors: Array<IJobError>) {\n    super(`Found ${errors.length} configuration ${errors.length === 1 ? 'error' : 'errors'}.`);\n    this.name = 'ConfigValidationError';\n    this.errors = errors;\n  }\n}\n\n/**\n * Represents a runtime error originating from a specific job.\n *\n * Used for reporting job-level failures that are not config validation errors.\n */\nexport class JobError extends Error {\n  readonly originalError: IJobError;\n\n  constructor(message: string, error: IJobError) {\n    super(message);\n    this.name = 'JobError';\n    this.originalError = error;\n  }\n}\n\nexport class HeyApiError extends Error {\n  args: ReadonlyArray<unknown>;\n  event: string;\n  pluginName: string;\n\n  constructor({\n    args,\n    error,\n    event,\n    name,\n    pluginName,\n  }: {\n    args: unknown[];\n    error: Error;\n    event: string;\n    name: string;\n    pluginName: string;\n  }) {\n    const message = error instanceof Error ? error.message : 'Unknown error';\n    super(message);\n\n    this.args = args;\n    this.cause = error.cause;\n    this.event = event;\n    this.name = name || error.name;\n    this.pluginName = pluginName;\n    this.stack = error.stack;\n  }\n}\n\nexport function logCrashReport(error: unknown, logsDir: string): string | undefined {\n  if (error instanceof ConfigError || error instanceof ConfigValidationError) {\n    return;\n  }\n\n  if (error instanceof JobError) {\n    error = error.originalError.error;\n  }\n\n  const logName = `openapi-ts-error-${Date.now()}.log`;\n  const fullDir = path.resolve(process.cwd(), logsDir);\n  ensureDirSync(fullDir);\n  const logPath = path.resolve(fullDir, logName);\n\n  let logContent = `[${new Date().toISOString()}] `;\n\n  if (error instanceof HeyApiError) {\n    logContent += `${error.name} during event \"${error.event}\"\\n`;\n    if (error.pluginName) {\n      logContent += `Plugin: ${error.pluginName}\\n`;\n    }\n    logContent += `Arguments: ${JSON.stringify(error.args, null, 2)}\\n\\n`;\n  }\n\n  const message = error instanceof Error ? error.message : String(error);\n  const stack = error instanceof Error ? error.stack : undefined;\n\n  logContent += `Error: ${message}\\n`;\n  if (stack) {\n    logContent += `Stack:\\n${stack}\\n`;\n  }\n\n  fs.writeFileSync(logPath, logContent);\n\n  return logPath;\n}\n\nexport async function openGitHubIssueWithCrashReport(\n  error: unknown,\n  initialDir: string,\n): Promise<void> {\n  const packageJson = loadPackageJson(initialDir);\n  if (!packageJson?.bugs.url) return;\n\n  if (error instanceof JobError) {\n    error = error.originalError.error;\n  }\n\n  let body = '';\n\n  if (error instanceof HeyApiError) {\n    if (error.pluginName) {\n      body += `**Plugin**: \\`${error.pluginName}\\`\\n`;\n    }\n    body += `**Event**: \\`${error.event}\\`\\n`;\n    body += `**Arguments**:\\n\\`\\`\\`ts\\n${JSON.stringify(error.args, null, 2)}\\n\\`\\`\\`\\n\\n`;\n  }\n\n  const message = error instanceof Error ? error.message : String(error);\n  const stack = error instanceof Error ? error.stack : undefined;\n\n  body += `**Error**: \\`${message}\\`\\n`;\n  if (stack) {\n    body += `\\n**Stack Trace**:\\n\\`\\`\\`\\n${stack}\\n\\`\\`\\``;\n  }\n\n  const search = new URLSearchParams({\n    body,\n    labels: 'bug 🔥',\n    title: 'Crash Report',\n  });\n  const url = `${packageJson.bugs.url}new?${search.toString()}`;\n  await open(url);\n}\n\nexport function printCrashReport({\n  error,\n  logPath,\n}: {\n  error: unknown;\n  logPath: string | undefined;\n}): void {\n  if (error instanceof ConfigValidationError && error.errors.length) {\n    const groupByJob = new Map<number, Array<Error>>();\n    for (const { error: err, jobIndex } of error.errors) {\n      if (!groupByJob.has(jobIndex)) {\n        groupByJob.set(jobIndex, []);\n      }\n      groupByJob.get(jobIndex)!.push(err);\n    }\n\n    for (const [jobIndex, errors] of groupByJob.entries()) {\n      const jobPrefix = colors.gray(`[Job ${jobIndex + 1}] `);\n      const count = errors.length;\n      const baseString = colors.red(\n        `Found ${count} configuration ${count === 1 ? 'error' : 'errors'}:`,\n      );\n      console.error(`${jobPrefix}❗️ ${baseString}`);\n      errors.forEach((err, index) => {\n        const itemPrefixStr = `  [${index + 1}] `;\n        const itemPrefix = colors.red(itemPrefixStr);\n        console.error(`${jobPrefix}${itemPrefix}${colors.white(err.message)}`);\n      });\n    }\n  } else {\n    let jobPrefix = colors.gray('[root] ');\n    if (error instanceof JobError) {\n      jobPrefix = colors.gray(`[Job ${error.originalError.jobIndex + 1}] `);\n      error = error.originalError.error;\n    }\n\n    const baseString = colors.red('Failed with the message:');\n    console.error(`${jobPrefix}❌ ${baseString}`);\n    const itemPrefixStr = `  `;\n    const itemPrefix = colors.red(itemPrefixStr);\n    console.error(\n      `${jobPrefix}${itemPrefix}${typeof error === 'string' ? error : error instanceof Error ? error.message : 'Unknown error'}`,\n    );\n  }\n\n  if (logPath) {\n    const jobPrefix = colors.gray('[root] ');\n    console.error(`${jobPrefix}${colors.cyan('📄 Crash log saved to:')} ${colors.gray(logPath)}`);\n  }\n}\n\nexport async function shouldReportCrash({\n  error,\n  isInteractive,\n}: {\n  error: unknown;\n  isInteractive: boolean | undefined;\n}): Promise<boolean> {\n  if (!isInteractive || error instanceof ConfigError || error instanceof ConfigValidationError) {\n    return false;\n  }\n\n  return new Promise((resolve) => {\n    const jobPrefix = colors.gray('[root] ');\n    console.log(\n      `${jobPrefix}${colors.yellow('📢 Open a GitHub issue with crash details? (y/N):')}`,\n    );\n    process.stdin.setEncoding('utf8');\n    process.stdin.once('data', (data: string) => {\n      resolve(data.trim().toLowerCase() === 'y');\n    });\n  });\n}\n"
  },
  {
    "path": "packages/shared/src/fs.ts",
    "content": "import type { PathLike } from 'node:fs';\nimport fs from 'node:fs';\n\nexport function ensureDirSync(path: PathLike): void {\n  if (!fs.existsSync(path)) {\n    fs.mkdirSync(path, { recursive: true });\n  }\n}\n"
  },
  {
    "path": "packages/shared/src/getSpec.ts",
    "content": "import { getResolvedInput, sendRequest } from '@hey-api/json-schema-ref-parser';\nimport type { MaybeArray } from '@hey-api/types';\n\nimport type { Input } from './config/input/types';\nimport type { WatchValues } from './types/watch';\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\nconst mergeHeaders = (\n  ...headers: Array<\n    | RequestInit['headers']\n    | Record<string, MaybeArray<string | number | boolean> | null | undefined | unknown>\n    | undefined\n  >\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 SpecResponse = {\n  arrayBuffer: ArrayBuffer | undefined;\n  error?: never;\n  resolvedInput: ReturnType<typeof getResolvedInput>;\n  response?: never;\n};\n\ntype SpecError = {\n  arrayBuffer?: never;\n  error: 'not-modified' | 'not-ok';\n  resolvedInput?: never;\n  response: Response;\n};\n\n/**\n * @internal\n */\nexport async function getSpec({\n  fetchOptions,\n  inputPath,\n  timeout,\n  watch,\n}: {\n  fetchOptions?: RequestInit;\n  inputPath: Input['path'];\n  timeout: number | undefined;\n  watch: WatchValues;\n}): Promise<SpecResponse | SpecError> {\n  const resolvedInput = getResolvedInput({ pathOrUrlOrSchema: inputPath });\n\n  let arrayBuffer: ArrayBuffer | undefined;\n  // boolean signals whether the file has **definitely** changed\n  let hasChanged: boolean | undefined;\n  let response: Response | undefined;\n\n  if (resolvedInput.type === 'url') {\n    // do NOT send HEAD request on first run or if unsupported\n    if (watch.lastValue && watch.isHeadMethodSupported !== false) {\n      try {\n        const request = await sendRequest({\n          fetchOptions: {\n            method: 'HEAD',\n            ...fetchOptions,\n            headers: mergeHeaders(fetchOptions?.headers, watch.headers),\n          },\n          timeout,\n          url: resolvedInput.path,\n        });\n\n        if (request.response.status >= 300) {\n          return {\n            error: 'not-ok',\n            response: request.response,\n          };\n        }\n\n        response = request.response;\n      } catch (error) {\n        const message = error instanceof Error ? error.message : String(error);\n        return {\n          error: 'not-ok',\n          response: new Response(message, { status: 500 }),\n        };\n      }\n\n      if (!response.ok && watch.isHeadMethodSupported) {\n        // assume the server is no longer running\n        // do nothing, it might be restarted later\n        return {\n          error: 'not-ok',\n          response,\n        };\n      }\n\n      if (watch.isHeadMethodSupported === undefined) {\n        watch.isHeadMethodSupported = response.ok;\n      }\n\n      if (response.status === 304) {\n        return {\n          error: 'not-modified',\n          response,\n        };\n      }\n\n      if (hasChanged === undefined) {\n        const eTag = response.headers.get('ETag');\n        if (eTag) {\n          hasChanged = eTag !== watch.headers.get('If-None-Match');\n\n          if (hasChanged) {\n            watch.headers.set('If-None-Match', eTag);\n          }\n        }\n      }\n\n      if (hasChanged === undefined) {\n        const lastModified = response.headers.get('Last-Modified');\n        if (lastModified) {\n          hasChanged = lastModified !== watch.headers.get('If-Modified-Since');\n\n          if (hasChanged) {\n            watch.headers.set('If-Modified-Since', lastModified);\n          }\n        }\n      }\n\n      // we definitely know the input has not changed\n      if (hasChanged === false) {\n        return {\n          error: 'not-modified',\n          response,\n        };\n      }\n    }\n\n    try {\n      const request = await sendRequest({\n        fetchOptions: {\n          method: 'GET',\n          ...fetchOptions,\n        },\n        timeout,\n        url: resolvedInput.path,\n      });\n\n      if (request.response.status >= 300) {\n        return {\n          error: 'not-ok',\n          response: request.response,\n        };\n      }\n\n      response = request.response;\n    } catch (error) {\n      const message = error instanceof Error ? error.message : String(error);\n      return {\n        error: 'not-ok',\n        response: new Response(message, { status: 500 }),\n      };\n    }\n\n    if (!response.ok) {\n      // assume the server is no longer running\n      // do nothing, it might be restarted later\n      return {\n        error: 'not-ok',\n        response,\n      };\n    }\n\n    arrayBuffer = response.body ? await response.arrayBuffer() : new ArrayBuffer(0);\n\n    if (hasChanged === undefined) {\n      const content = new TextDecoder().decode(arrayBuffer);\n      hasChanged = content !== watch.lastValue;\n      watch.lastValue = content;\n    }\n  } else {\n    // we do not support watch mode for files or raw spec data\n    if (!watch.lastValue) {\n      watch.lastValue = resolvedInput.type;\n    } else {\n      hasChanged = false;\n    }\n  }\n\n  if (hasChanged === false) {\n    return {\n      error: 'not-modified',\n      response: response!,\n    };\n  }\n\n  return {\n    arrayBuffer,\n    resolvedInput,\n  };\n}\n"
  },
  {
    "path": "packages/shared/src/graph/__tests__/walk.test.ts",
    "content": "import { getIrPointerPriority, matchIrPointerToGroup, preferGroups } from '../../ir/graph';\nimport { buildGraph } from '../../openApi/shared/utils/graph';\nimport type { Graph } from '../types/graph';\nimport { walk } from '../walk';\n\nconst loggerStub = {\n  timeEvent: () => ({ timeEnd: () => {} }),\n} as any;\n\ndescribe('walkTopological', () => {\n  const makeGraph = (deps: Array<[string, Array<string>]>, nodes: Array<string>) => {\n    const nodeDependencies = new Map<string, Set<string>>();\n    const subtreeDependencies = new Map<string, Set<string>>();\n    const reverseNodeDependencies = new Map<string, Set<string>>();\n    const nodesMap = new Map<string, any>();\n\n    for (const name of nodes) {\n      nodesMap.set(name, { key: null, node: {}, parentPointer: null });\n    }\n\n    for (const [from, toList] of deps) {\n      const s = new Set<string>(toList);\n      nodeDependencies.set(from, s);\n      subtreeDependencies.set(from, new Set<string>(toList));\n      for (const to of toList) {\n        if (!reverseNodeDependencies.has(to)) reverseNodeDependencies.set(to, new Set());\n        reverseNodeDependencies.get(to)!.add(from);\n      }\n    }\n\n    return {\n      nodeDependencies,\n      nodes: nodesMap,\n      reverseNodeDependencies,\n      subtreeDependencies,\n      transitiveDependencies: new Map<string, Set<string>>(),\n    } as unknown as Graph;\n  };\n\n  it('walks nodes in topological order for a simple acyclic graph', () => {\n    // Graph: A -> B -> C\n    const graph = makeGraph(\n      [\n        ['A', ['B']],\n        ['B', ['C']],\n      ],\n      ['A', 'B', 'C'],\n    );\n    const order: Array<string> = [];\n    walk(graph, (pointer) => order.push(pointer), { order: 'topological' });\n    expect(order.indexOf('C')).toBeLessThan(order.indexOf('B'));\n    expect(order.indexOf('B')).toBeLessThan(order.indexOf('A'));\n    expect(order).toHaveLength(3);\n  });\n\n  it('walks nodes in topological order for multiple roots', () => {\n    // Graph: A -> B, C -> D\n    const graph = makeGraph(\n      [\n        ['A', ['B']],\n        ['C', ['D']],\n      ],\n      ['A', 'B', 'C', 'D'],\n    );\n    const order: Array<string> = [];\n    walk(graph, (pointer) => order.push(pointer), { order: 'topological' });\n    expect(order.indexOf('B')).toBeLessThan(order.indexOf('A'));\n    expect(order.indexOf('D')).toBeLessThan(order.indexOf('C'));\n    expect(order).toHaveLength(4);\n  });\n\n  it('walks nodes in topological order for a disconnected graph', () => {\n    // Graph: A -> B, C (no deps), D (no deps)\n    const graph = makeGraph([['A', ['B']]], ['A', 'B', 'C', 'D']);\n    const order: Array<string> = [];\n    walk(graph, (pointer) => order.push(pointer), { order: 'topological' });\n    expect(order.indexOf('B')).toBeLessThan(order.indexOf('A'));\n    expect(order).toHaveLength(4);\n    expect(order).toContain('C');\n    expect(order).toContain('D');\n  });\n\n  it('walks nodes in topological order for a diamond dependency', () => {\n    // Graph:   A\n    //         / \\\n    //        B   C\n    //         \\ /\n    //          D\n    const graph = makeGraph(\n      [\n        ['A', ['B', 'C']],\n        ['B', ['D']],\n        ['C', ['D']],\n      ],\n      ['A', 'B', 'C', 'D'],\n    );\n    const order: Array<string> = [];\n    walk(graph, (pointer) => order.push(pointer), { order: 'topological' });\n    expect(order.indexOf('D')).toBeLessThan(order.indexOf('B'));\n    expect(order.indexOf('D')).toBeLessThan(order.indexOf('C'));\n    expect(order.indexOf('B')).toBeLessThan(order.indexOf('A'));\n    expect(order.indexOf('C')).toBeLessThan(order.indexOf('A'));\n    expect(order).toHaveLength(4);\n  });\n\n  it('walks nodes in topological order for a long chain', () => {\n    // Graph: A -> B -> C -> D -> E\n    const graph = makeGraph(\n      [\n        ['A', ['B']],\n        ['B', ['C']],\n        ['C', ['D']],\n        ['D', ['E']],\n      ],\n      ['A', 'B', 'C', 'D', 'E'],\n    );\n    const order: Array<string> = [];\n    walk(graph, (pointer) => order.push(pointer), { order: 'topological' });\n    expect(order.indexOf('E')).toBeLessThan(order.indexOf('D'));\n    expect(order.indexOf('D')).toBeLessThan(order.indexOf('C'));\n    expect(order.indexOf('C')).toBeLessThan(order.indexOf('B'));\n    expect(order.indexOf('B')).toBeLessThan(order.indexOf('A'));\n    expect(order).toHaveLength(5);\n  });\n\n  it('walks all nodes, including cycles', () => {\n    // Graph: A <-> B (cycle), C (no deps)\n    const graph = makeGraph(\n      [\n        ['A', ['B']],\n        ['B', ['A']],\n      ],\n      ['A', 'B', 'C'],\n    );\n    const order: Array<string> = [];\n    walk(graph, (pointer) => order.push(pointer), { order: 'topological' });\n    expect(order.sort()).toEqual(['A', 'B', 'C']);\n  });\n\n  it('matches ordering for validators-circular-ref spec', async () => {\n    const specModule = await import('../../../../../specs/3.1.x/validators-circular-ref.json');\n    const spec = specModule.default ?? specModule;\n    const { graph } = buildGraph(spec, loggerStub);\n\n    const order: Array<string> = [];\n    walk(graph, (pointer) => order.push(pointer), { order: 'topological' });\n\n    const foo = '#/components/schemas/Foo';\n    const bar = '#/components/schemas/Bar';\n    const baz = '#/components/schemas/Baz';\n    const qux = '#/components/schemas/Qux';\n\n    // Bar should come before Foo because Foo depends on Bar\n    expect(order.indexOf(bar)).toBeLessThan(order.indexOf(foo));\n\n    // Baz and Qux form a mutual $ref cycle; both must be present\n    expect(order).toContain(baz);\n    expect(order).toContain(qux);\n  });\n\n  it('prefers schema group before parameter when safe (default)', () => {\n    // parameter then schema in declaration order, no deps -> schema should move before parameter\n    const param = '#/components/parameters/P';\n    const schema = '#/components/schemas/A';\n    const nodes = [param, schema];\n    const graph = makeGraph([], nodes);\n\n    const order: Array<string> = [];\n    walk(graph, (pointer) => order.push(pointer), {\n      getPointerPriority: getIrPointerPriority,\n      matchPointerToGroup: matchIrPointerToGroup,\n      order: 'topological',\n      preferGroups,\n    });\n    expect(order.indexOf(schema)).toBeLessThan(order.indexOf(param));\n  });\n\n  it('does not apply preferGroups when it would violate dependencies (fallback)', () => {\n    // declaration order: param, schema; schema depends on param -> cannot move before param\n    const param = '#/components/parameters/P';\n    const schema = '#/components/schemas/S';\n    const nodes = [param, schema];\n    const nodeDependencies = new Map<string, Set<string>>();\n    nodeDependencies.set(schema, new Set([param]));\n    const subtreeDependencies = new Map<string, Set<string>>();\n    const reverseNodeDependencies = new Map<string, Set<string>>();\n    const nodesMap = new Map<string, any>();\n    for (const n of nodes) nodesMap.set(n, { key: null, node: {}, parentPointer: null });\n    const graph = {\n      nodeDependencies,\n      nodes: nodesMap,\n      reverseNodeDependencies,\n      subtreeDependencies,\n      transitiveDependencies: new Map<string, Set<string>>(),\n    } as unknown as Graph;\n\n    const order: Array<string> = [];\n    walk(graph, (pointer) => order.push(pointer), { order: 'topological' });\n    // schema depends on param so param must remain before schema\n    expect(order.indexOf(param)).toBeLessThan(order.indexOf(schema));\n  });\n\n  it('ignores self-dependencies when ordering', () => {\n    // Foo has self-ref only, Bar references Foo -> Foo should come before Bar\n    const foo = '#/components/schemas/Foo';\n    const bar = '#/components/schemas/Bar';\n    const nodes = [foo, bar];\n    const nodeDependencies = new Map<string, Set<string>>();\n    nodeDependencies.set(foo, new Set([foo]));\n    nodeDependencies.set(bar, new Set([foo]));\n\n    const nodesMap = new Map<string, any>();\n    for (const n of nodes) nodesMap.set(n, { key: null, node: {}, parentPointer: null });\n\n    const graph = {\n      nodeDependencies,\n      nodes: nodesMap,\n      reverseNodeDependencies: new Map<string, Set<string>>(),\n      subtreeDependencies: new Map<string, Set<string>>(),\n      transitiveDependencies: new Map<string, Set<string>>(),\n    } as unknown as Graph;\n\n    const order: Array<string> = [];\n    walk(graph, (pointer) => order.push(pointer), { order: 'topological' });\n    // Foo is a dependency of Bar, so Foo should come before Bar\n    expect(order.indexOf(foo)).toBeLessThan(order.indexOf(bar));\n  });\n\n  it('uses subtreeDependencies when nodeDependencies are absent', () => {\n    const parent = '#/components/schemas/Parent';\n    const child = '#/components/schemas/Child';\n    const nodes = [parent, child];\n    const nodeDependencies = new Map<string, Set<string>>();\n    const subtreeDependencies = new Map<string, Set<string>>();\n    subtreeDependencies.set(parent, new Set([child]));\n\n    const nodesMap = new Map<string, any>();\n    for (const n of nodes) nodesMap.set(n, { key: null, node: {}, parentPointer: null });\n\n    const graph = {\n      nodeDependencies,\n      nodes: nodesMap,\n      reverseNodeDependencies: new Map<string, Set<string>>(),\n      subtreeDependencies,\n      transitiveDependencies: new Map<string, Set<string>>(),\n    } as unknown as Graph;\n\n    const order: Array<string> = [];\n    walk(graph, (pointer) => order.push(pointer), { order: 'topological' });\n    expect(order.indexOf(child)).toBeLessThan(order.indexOf(parent));\n  });\n\n  it('preserves declaration order for equal-priority items (stability)', () => {\n    const a = '#/components/schemas/A';\n    const b = '#/components/schemas/B';\n    const c = '#/components/schemas/C';\n    const nodes = [a, b, c];\n    const graph = makeGraph([], nodes);\n    const order: Array<string> = [];\n    walk(graph, (pointer) => order.push(pointer), { order: 'topological' });\n    expect(order).toEqual(nodes);\n  });\n\n  it('walks nodes in declaration order when order=declarations', () => {\n    const a = '#/components/schemas/A';\n    const b = '#/components/schemas/B';\n    const c = '#/components/schemas/C';\n    const nodes = [a, b, c];\n    const graph = makeGraph([], nodes);\n    const order: Array<string> = [];\n    walk(graph, (pointer) => order.push(pointer), { order: 'declarations' });\n    expect(order).toEqual(nodes);\n  });\n\n  it('applies preferGroups ordering in declaration mode', () => {\n    const param = '#/components/parameters/P';\n    const schema = '#/components/schemas/A';\n    const nodes = [param, schema];\n    const graph = makeGraph([], nodes);\n\n    const order: Array<string> = [];\n    walk(graph, (pointer) => order.push(pointer), {\n      matchPointerToGroup: matchIrPointerToGroup,\n      order: 'declarations',\n      preferGroups,\n    });\n    // preferGroups puts schema before parameter\n    expect(order.indexOf(schema)).toBeLessThan(order.indexOf(param));\n  });\n});\n"
  },
  {
    "path": "packages/shared/src/graph/index.ts",
    "content": "export type { Graph, NodeInfo } from './types/graph';\nexport type { GetPointerPriorityFn, MatchPointerToGroupFn, WalkOptions } from './types/walk';\nexport { walk } from './walk';\n"
  },
  {
    "path": "packages/shared/src/graph/types/graph.ts",
    "content": "import type { Scope } from '../../openApi/shared/utils/graph';\n\n/**\n * The main graph structure for OpenAPI node analysis.\n *\n * @property nodeDependencies - For each node with at least one dependency, the set of normalized JSON Pointers it references via $ref. Nodes with no dependencies are omitted.\n * @property nodes - Map from normalized JSON Pointer to NodeInfo for every node in the spec.\n * @property reverseNodeDependencies - For each node with at least one dependent, the set of nodes that reference it via $ref. Nodes with no dependents are omitted.\n */\nexport type Graph = {\n  /**\n   * For each node with at least one dependency, the set of normalized JSON Pointers it references via $ref.\n   * Nodes with no dependencies are omitted from this map.\n   */\n  nodeDependencies: Map<string, Set<string>>;\n  /**\n   * Map from normalized JSON Pointer to NodeInfo for every node in the spec.\n   */\n  nodes: Map<string, NodeInfo>;\n  /**\n   * For each node with at least one dependent, the set of nodes that reference it via $ref.\n   * Nodes with no dependents are omitted from this map.\n   */\n  reverseNodeDependencies: Map<string, Set<string>>;\n  /**\n   * For each node, the set of direct $ref targets that appear anywhere inside the node's\n   * subtree (the node itself and its children). This is populated during graph construction\n   * and is used to compute top-level dependency relationships where $ref may be attached to\n   * child pointers instead of the parent.\n   */\n  subtreeDependencies: Map<string, Set<string>>;\n  /**\n   * For each node, the set of all (transitive) normalized JSON Pointers it references via $ref anywhere in its subtree.\n   * This includes both direct and indirect dependencies, making it useful for filtering, codegen, and tree-shaking.\n   */\n  transitiveDependencies: Map<string, Set<string>>;\n};\n\n/**\n * Information about a node in the OpenAPI graph.\n *\n * @property deprecated - Whether the node is deprecated. Optional.\n * @property key - The property name or array index in the parent, or null for root.\n * @property node - The actual object at this pointer in the spec.\n * @property parentPointer - The JSON Pointer of the parent node, or null for root.\n * @property scopes - The set of access scopes for this node, if any. Optional.\n * @property tags - The set of tags for this node, if any. Optional.\n */\nexport type NodeInfo = {\n  /** Whether the node is deprecated. Optional. */\n  deprecated?: boolean;\n  /** The property name or array index in the parent, or null for root. */\n  key: string | number | null;\n  /** The actual object at this pointer in the spec.  */\n  node: unknown;\n  /** The JSON Pointer of the parent node, or null for root. */\n  parentPointer: string | null;\n  /** The set of access scopes for this node, if any. Optional. */\n  scopes?: Set<Scope>;\n  /** The set of tags for this node, if any. Optional. */\n  tags?: Set<string>;\n};\n"
  },
  {
    "path": "packages/shared/src/graph/types/walk.ts",
    "content": "import type { Graph, NodeInfo } from './graph';\n\nexport type WalkCallbackFn = (pointer: string, nodeInfo: NodeInfo) => void;\n\nexport type GetPointerPriorityFn = (pointer: string) => number;\n\nexport type MatchPointerToGroupFn<T extends string = string> = (\n  pointer: string,\n  kind?: T,\n) => PointerGroupMatch<T>;\n\ntype PointerGroupMatch<T extends string = string> =\n  | { kind: T; matched: true }\n  | { kind?: undefined; matched: false };\n\nexport type WalkOptions<T extends string = string> = {\n  /**\n   * Optional priority function used to compute a numeric priority for each\n   * pointer. Lower values are emitted earlier. Useful to customize ordering\n   * beyond the built-in group preferences.\n   */\n  getPointerPriority?: GetPointerPriorityFn;\n  /**\n   * Optional function to match a pointer to a group name.\n   *\n   * @param pointer The pointer string\n   * @returns The group name, or undefined if no match\n   */\n  matchPointerToGroup?: MatchPointerToGroupFn<T>;\n  /**\n   * Order of walking schemas.\n   *\n   * The \"declarations\" option ensures that schemas are walked in the order\n   * they are declared in the input document. This is useful for scenarios where\n   * the order of declaration matters, such as when generating code that relies\n   * on the sequence of schema definitions.\n   *\n   * The \"topological\" option ensures that schemas are walked in an order\n   * where dependencies are visited before the schemas that depend on them.\n   * This is useful for scenarios where you need to process or generate\n   * schemas in a way that respects their interdependencies.\n   *\n   * @default 'topological'\n   */\n  order?: 'declarations' | 'topological';\n  /**\n   * Optional grouping preference for walking. When provided, walk function\n   * will prefer emitting kinds listed earlier in this array when it is safe\n   * to do so (it will only apply the preference when doing so does not\n   * violate dependency ordering).\n   */\n  preferGroups?: ReadonlyArray<T>;\n};\n\nexport type WalkFn = <T extends string = string>(\n  graph: Graph,\n  callback: WalkCallbackFn,\n  options?: WalkOptions<T>,\n) => void;\n"
  },
  {
    "path": "packages/shared/src/graph/walk.ts",
    "content": "import { MinHeap } from '../utils/minHeap';\nimport type { GetPointerPriorityFn, WalkFn } from './types/walk';\n\n/**\n * Walk the nodes of the graph in declaration (insertion) order.\n * This is a cheap alternative to `walkTopological` when dependency ordering\n * is not required and the caller only wants nodes in the order they were\n * added to the graph.\n */\nconst walkDeclarations: WalkFn = (graph, callback, options) => {\n  const pointers = Array.from(graph.nodes.keys());\n\n  if (options?.preferGroups && options.preferGroups.length > 0) {\n    // emit nodes that match each preferred group in order, preserving insertion order\n    const emitted = new Set<string>();\n    if (options.matchPointerToGroup) {\n      for (const kind of options.preferGroups) {\n        for (const pointer of pointers) {\n          const result = options.matchPointerToGroup(pointer);\n          if (!result.matched) continue;\n          if (result.kind === kind) {\n            emitted.add(pointer);\n            callback(pointer, graph.nodes.get(pointer)!);\n          }\n        }\n      }\n    }\n\n    // emit anything not covered by the preferGroups (in declaration order)\n    for (const pointer of pointers) {\n      if (emitted.has(pointer)) continue;\n      callback(pointer, graph.nodes.get(pointer)!);\n    }\n    return;\n  }\n\n  // fallback: simple declaration order\n  for (const pointer of pointers) {\n    callback(pointer, graph.nodes.get(pointer)!);\n  }\n};\n\n/**\n * Walks the nodes of the graph in topological order (dependencies before dependents).\n * Calls the callback for each node pointer in order.\n * Nodes in cycles are grouped together and emitted in arbitrary order within the group.\n *\n * @param graph - The dependency graph\n * @param callback - Function to call for each node pointer\n */\nconst walkTopological: WalkFn = (graph, callback, options) => {\n  // stable Kahn's algorithm that respects declaration order as a tiebreaker.\n  const pointers = Array.from(graph.nodes.keys());\n  // base insertion order\n  const baseIndex = new Map<string, number>();\n  pointers.forEach((pointer, index) => baseIndex.set(pointer, index));\n\n  // composite decl index: group priority then base insertion order\n  const declIndex = new Map<string, number>();\n  for (const pointer of pointers) {\n    const priority = options?.getPointerPriority?.(pointer) ?? 10;\n    const composite = priority * 1_000_000 + (baseIndex.get(pointer) ?? 0);\n    declIndex.set(pointer, composite);\n  }\n\n  // build dependency sets for each pointer\n  const depsOf = new Map<string, Set<string>>();\n  for (const pointer of pointers) {\n    const raw = graph.subtreeDependencies?.get(pointer) ?? new Set();\n    const filtered = new Set<string>();\n    for (const rawPointer of raw) {\n      if (rawPointer === pointer) continue; // ignore self-dependencies for ordering\n      if (graph.nodes.has(rawPointer)) {\n        filtered.add(rawPointer);\n      }\n    }\n    depsOf.set(pointer, filtered);\n  }\n\n  // build inDegree and dependents adjacency\n  const inDegree = new Map<string, number>();\n  const dependents = new Map<string, Set<string>>();\n  for (const pointer of pointers) {\n    inDegree.set(pointer, 0);\n  }\n  for (const [pointer, deps] of depsOf) {\n    inDegree.set(pointer, deps.size);\n    for (const d of deps) {\n      if (!dependents.has(d)) {\n        dependents.set(d, new Set());\n      }\n      dependents.get(d)!.add(pointer);\n    }\n  }\n\n  // sort pointers by declaration order\n  const sortByDecl = (arr: Array<string>) =>\n    arr.sort((a, b) => declIndex.get(a)! - declIndex.get(b)!);\n\n  // initialize queue with zero-inDegree nodes in declaration order\n  // use min-heap prioritized by declaration index to avoid repeated full sorts\n  const heap = new MinHeap(declIndex);\n  for (const pointer of pointers) {\n    if ((inDegree.get(pointer) ?? 0) === 0) {\n      heap.push(pointer);\n    }\n  }\n\n  const emitted = new Set<string>();\n  const order: Array<string> = [];\n\n  while (!heap.isEmpty()) {\n    const cur = heap.pop()!;\n    if (emitted.has(cur)) continue;\n    emitted.add(cur);\n    order.push(cur);\n\n    const deps = dependents.get(cur);\n    if (!deps) continue;\n\n    for (const dep of deps) {\n      const v = (inDegree.get(dep) ?? 0) - 1;\n      inDegree.set(dep, v);\n      if (v === 0) {\n        heap.push(dep);\n      }\n    }\n  }\n\n  // emit remaining nodes (cycles) in declaration order\n  const remaining = pointers.filter((pointer) => !emitted.has(pointer));\n  sortByDecl(remaining);\n  for (const pointer of remaining) {\n    emitted.add(pointer);\n    order.push(pointer);\n  }\n\n  // prefer specified groups when safe\n  let finalOrder = order;\n  if (options?.preferGroups && options.preferGroups.length > 0) {\n    // build group priority map (lower = earlier)\n    const groupPriority = new Map<string, number>();\n    for (let i = 0; i < options.preferGroups.length; i++) {\n      const k = options.preferGroups[i];\n      if (k) {\n        groupPriority.set(k, i);\n      }\n    }\n\n    const getGroup: GetPointerPriorityFn = (pointer) => {\n      if (options.matchPointerToGroup) {\n        const result = options.matchPointerToGroup(pointer);\n        if (result.matched) {\n          return groupPriority.has(result.kind)\n            ? groupPriority.get(result.kind)!\n            : options.preferGroups!.length;\n        }\n      }\n      return options.preferGroups!.length;\n    };\n\n    // proposed order: sort by (groupPriority, originalIndex)\n    const proposed = [...order].sort((a, b) => {\n      const ga = getGroup(a);\n      const gb = getGroup(b);\n      return ga !== gb ? ga - gb : order.indexOf(a) - order.indexOf(b);\n    });\n\n    // build quick lookup of original index and proposed index\n    const proposedIndex = new Map<string, number>();\n    for (let i = 0; i < proposed.length; i++) {\n      proposedIndex.set(proposed[i]!, i);\n    }\n\n    // only validate edges where group(dep) > group(node)\n    const violated = (() => {\n      for (const [node, deps] of depsOf) {\n        for (const dep of deps) {\n          const gDep = getGroup(dep);\n          const gNode = getGroup(node);\n          if (gDep <= gNode) continue; // not a crossing edge, cannot be violated by grouping\n          const pDep = proposedIndex.get(dep)!;\n          const pNode = proposedIndex.get(node)!;\n          if (pDep >= pNode) {\n            return true;\n          }\n        }\n      }\n      return false;\n    })();\n\n    if (!violated) {\n      finalOrder = proposed;\n    }\n  }\n\n  for (const pointer of finalOrder) {\n    callback(pointer, graph.nodes.get(pointer)!);\n  }\n};\n\nexport const walk: WalkFn = (graph, callback, options) => {\n  if (options?.order === 'topological') {\n    return walkTopological(graph, callback, options);\n  }\n  return walkDeclarations(graph, callback, options);\n};\n"
  },
  {
    "path": "packages/shared/src/index.ts",
    "content": "export { isEnvironment, printCliIntro } from './cli';\nexport { checkNodeVersion } from './config/engine';\nexport { getInput } from './config/input/input';\nexport { compileInputPath, logInputPaths } from './config/input/path';\nexport type { Input, UserInput, UserWatch, Watch } from './config/input/types';\nexport { getLogs } from './config/logs';\nexport type { PostProcessor, UserPostProcessor } from './config/output/postprocess';\nexport { postprocessOutput } from './config/output/postprocess';\nexport { resolveSource } from './config/output/source/config';\nexport type { SourceConfig, UserSourceConfig } from './config/output/source/types';\nexport type { OutputHeader } from './config/output/types';\nexport { defaultPaginationKeywords, getParser } from './config/parser/config';\nexport type { Filters } from './config/parser/filters';\nexport type { Patch } from './config/parser/patch';\nexport type { Parser, UserParser } from './config/parser/types';\nexport type {\n  AnyConfig,\n  BaseConfig,\n  BaseOutput,\n  BaseUserConfig,\n  BaseUserOutput,\n  CommentsOption,\n  FeatureToggle,\n  IndexExportOption,\n  NamingOptions,\n  ResolveModuleFn,\n  UserCommentsOption,\n  UserIndexExportOption,\n} from './config/shared';\nexport type { ValueToObject } from './config/utils/config';\nexport { valueToObject } from './config/utils/config';\nexport type { Dependency } from './config/utils/dependencies';\nexport { dependencyFactory, satisfies } from './config/utils/dependencies';\nexport { debugTools } from './debug';\nexport {\n  ConfigError,\n  ConfigValidationError,\n  HeyApiError,\n  JobError,\n  logCrashReport,\n  openGitHubIssueWithCrashReport,\n  printCrashReport,\n  shouldReportCrash,\n} from './error';\nexport { ensureDirSync } from './fs';\nexport { getSpec } from './getSpec';\nexport { Context } from './ir/context';\nexport { IntentContext } from './ir/intents';\nexport {\n  createOperationKey,\n  hasOperationDataRequired,\n  operationPagination,\n  operationResponsesMap,\n  statusCodeToGroup,\n} from './ir/operation';\nexport {\n  hasParameterGroupObjectRequired,\n  hasParametersObjectRequired,\n  parameterWithPagination,\n} from './ir/parameter';\nexport { deduplicateSchema } from './ir/schema';\nexport type {\n  SchemaExtractor,\n  SchemaProcessor,\n  SchemaProcessorContext,\n  SchemaProcessorResult,\n} from './ir/schema-processor';\nexport { createSchemaProcessor } from './ir/schema-processor';\nexport type { SchemaVisitor, SchemaVisitorContext, Walker } from './ir/schema-walker';\nexport { childContext, createSchemaWalker } from './ir/schema-walker';\nexport type {\n  IR,\n  IRModel,\n  IROperationObject,\n  IRParameterObject,\n  IRParametersObject,\n  IRSchemaObject,\n  IRServerObject,\n} from './ir/types';\nexport { addItemsToSchema } from './ir/utils';\nexport { parseOpenApiSpec } from './openApi';\nexport type { OpenApiV2_0_X, OpenApiV2_0_XTypes } from './openApi/2.0.x';\nexport { parseV2_0_X } from './openApi/2.0.x';\nexport type { OpenApiV3_0_X, OpenApiV3_0_XTypes } from './openApi/3.0.x';\nexport { parseV3_0_X } from './openApi/3.0.x';\nexport type { OpenApiV3_1_X, OpenApiV3_1_XTypes } from './openApi/3.1.x';\nexport { parseV3_1_X } from './openApi/3.1.x';\nexport type { OperationsStrategy } from './openApi/shared/locations';\nexport type { OperationPathStrategy, OperationStructureStrategy } from './openApi/shared/locations';\nexport { OperationPath, OperationStrategy } from './openApi/shared/locations';\nexport type {\n  CodeSampleObject,\n  EnumExtensions,\n  LinguistLanguages,\n} from './openApi/shared/types/openapi-spec-extensions';\nexport { buildGraph } from './openApi/shared/utils/graph';\nexport { patchOpenApiSpec } from './openApi/shared/utils/patch';\nexport type {\n  OpenApi,\n  OpenApiMetaObject,\n  OpenApiOperationObject,\n  OpenApiParameterObject,\n  OpenApiRequestBodyObject,\n  OpenApiResponseObject,\n  OpenApiSchemaObject,\n} from './openApi/types';\nexport type { GetNameContext, Hooks } from './parser/hooks';\nexport type { SchemaWithType } from './plugins/shared/types/schema';\nexport { definePluginConfig, mappers } from './plugins/shared/utils/config';\nexport type { PluginInstanceTypes } from './plugins/shared/utils/instance';\nexport { PluginInstance } from './plugins/shared/utils/instance';\nexport { buildSymbolIn } from './plugins/symbol';\nexport type {\n  AnyPluginName,\n  DefinePlugin,\n  Plugin,\n  PluginConfigMap,\n  PluginContext,\n  PluginNames,\n} from './plugins/types';\nexport { findPackageJson, findTsConfigPath, loadPackageJson } from './tsConfig';\nexport type { Logs } from './types/logs';\nexport type { WatchValues } from './types/watch';\nexport { escapeComment } from './utils/escape';\nexport { utils } from './utils/exports';\nexport { outputHeaderToPrefix } from './utils/header';\nexport { inputToApiRegistry } from './utils/input';\nexport { heyApiRegistryBaseUrl } from './utils/input/heyApi';\nexport { MinHeap } from './utils/minHeap';\nexport { applyNaming, resolveNaming, toCase } from './utils/naming/naming';\nexport type { Casing, NameTransformer, NamingConfig, NamingRule } from './utils/naming/types';\nexport { pathToName } from './utils/path';\nexport {\n  encodeJsonPointerSegment,\n  isTopLevelComponent,\n  jsonPointerToPath,\n  normalizeJsonPointer,\n  pathToJsonPointer,\n  refToName,\n  resolveRef,\n} from './utils/ref';\nexport { parseUrl } from './utils/url';\n"
  },
  {
    "path": "packages/shared/src/ir/__tests__/graph.test.ts",
    "content": "import type { IrTopLevelKind } from '../graph';\nimport { matchIrPointerToGroup } from '../graph';\n\ndescribe('matchIrPointerToGroup', () => {\n  const cases: Array<\n    [string, IrTopLevelKind | undefined, { kind?: IrTopLevelKind; matched: boolean }]\n  > = [\n    ['#/components/schemas/Foo', undefined, { kind: 'schema', matched: true }],\n    ['#/components/schemas/Foo', 'schema', { kind: 'schema', matched: true }],\n    ['#/components/schemas/Foo', 'parameter', { matched: false }],\n    ['#/components/parameters/Bar', undefined, { kind: 'parameter', matched: true }],\n    ['#/components/parameters/Bar', 'parameter', { kind: 'parameter', matched: true }],\n    ['#/components/parameters/Bar', 'schema', { matched: false }],\n    ['#/components/requestBodies/Baz', undefined, { kind: 'requestBody', matched: true }],\n    ['#/components/requestBodies/Baz', 'requestBody', { kind: 'requestBody', matched: true }],\n    ['#/components/requestBodies/Baz', 'schema', { matched: false }],\n    ['#/servers/0', undefined, { kind: 'server', matched: true }],\n    ['#/servers/foo', undefined, { kind: 'server', matched: true }],\n    ['#/paths/~1users/get', undefined, { kind: 'operation', matched: true }],\n    ['#/paths/~1users/post', 'operation', { kind: 'operation', matched: true }],\n    ['#/webhooks/foo/get', undefined, { kind: 'webhook', matched: true }],\n    ['#/webhooks/foo/patch', 'webhook', { kind: 'webhook', matched: true }],\n    ['#/not/a/top/level', undefined, { matched: false }],\n    ['#/components/unknown/Foo', undefined, { matched: false }],\n  ];\n\n  for (const [pointer, kind, expected] of cases) {\n    it(`matches ${pointer} with kind=${kind}`, () => {\n      const result = matchIrPointerToGroup(pointer, kind as IrTopLevelKind);\n      expect(result.matched).toBe(expected.matched);\n      if (expected.matched) {\n        expect(result.kind).toBe(expected.kind);\n      } else {\n        expect(result.kind).toBeUndefined();\n      }\n    });\n  }\n});\n"
  },
  {
    "path": "packages/shared/src/ir/__tests__/mediaType.test.ts",
    "content": "import type { IRMediaType } from '../mediaType';\nimport { isMediaTypeFileLike, mediaTypeToIrMediaType } from '../mediaType';\n\ndescribe('isMediaTypeFileLike', () => {\n  const scenarios: Array<{\n    mediaType: string;\n    response: boolean;\n  }> = [\n    {\n      mediaType: 'application/json',\n      response: false,\n    },\n    {\n      mediaType: 'application/json+download',\n      response: true,\n    },\n    {\n      mediaType: 'application/json; charset=ascii',\n      response: false,\n    },\n    {\n      mediaType: 'application/octet-stream',\n      response: true,\n    },\n    {\n      mediaType: 'application/pdf',\n      response: true,\n    },\n    {\n      mediaType: 'application/xml; charset=utf-8',\n      response: true,\n    },\n    {\n      mediaType: 'application/zip',\n      response: true,\n    },\n    {\n      mediaType: 'image/jpeg',\n      response: false,\n    },\n    {\n      mediaType: 'image/jpeg; charset=utf-8',\n      response: false,\n    },\n    {\n      mediaType: 'text/html; charset=utf-8',\n      response: false,\n    },\n    {\n      mediaType: 'text/javascript; charset=ISO-8859-1',\n      response: true,\n    },\n    {\n      mediaType: 'text/plain; charset=utf-8',\n      response: false,\n    },\n    {\n      mediaType: 'video/mp4',\n      response: true,\n    },\n  ];\n\n  it.each(scenarios)(\n    'detects $mediaType as file-like? $response',\n    async ({ mediaType, response }) => {\n      expect(isMediaTypeFileLike({ mediaType })).toEqual(response);\n    },\n  );\n});\n\ndescribe('mediaTypeToIrMediaType', () => {\n  const scenarios: Array<{\n    mediaType: string;\n    response: IRMediaType | undefined;\n  }> = [\n    {\n      mediaType: 'multipart/form-data',\n      response: 'form-data',\n    },\n    {\n      mediaType: 'application/json',\n      response: 'json',\n    },\n    {\n      mediaType: 'text/plain; charset=utf-8',\n      response: 'text',\n    },\n    {\n      mediaType: 'application/x-www-form-urlencoded',\n      response: 'url-search-params',\n    },\n    {\n      mediaType: 'application/octet-stream',\n      response: 'octet-stream',\n    },\n    {\n      mediaType: 'application/foo',\n      response: undefined,\n    },\n  ];\n\n  it.each(scenarios)('ir media type for $mediaType: $response', async ({ mediaType, response }) => {\n    expect(mediaTypeToIrMediaType({ mediaType })).toEqual(response);\n  });\n});\n"
  },
  {
    "path": "packages/shared/src/ir/__tests__/pagination.test.ts",
    "content": "import { defaultPaginationKeywords } from '../../config/parser/config';\nimport type { Parser } from '../../config/parser/types';\nimport type { Context } from '../context';\nimport { operationPagination } from '../operation';\nimport { getPaginationKeywordsRegExp } from '../pagination';\nimport type { IR } from '../types';\n\ndescribe('paginationKeywordsRegExp', () => {\n  const defaultScenarios: ReadonlyArray<{\n    result: boolean;\n    value: string;\n  }> = [\n    {\n      result: true,\n      value: 'after',\n    },\n    {\n      result: true,\n      value: 'before',\n    },\n    {\n      result: true,\n      value: 'cursor',\n    },\n    {\n      result: true,\n      value: 'offset',\n    },\n    {\n      result: true,\n      value: 'page',\n    },\n    {\n      result: true,\n      value: 'start',\n    },\n    {\n      result: false,\n      value: 'my_start',\n    },\n    {\n      result: false,\n      value: 'start_my',\n    },\n  ];\n\n  it.each(defaultScenarios)('is $value pagination param? $output', async ({ result, value }) => {\n    const paginationRegExp = getPaginationKeywordsRegExp({\n      keywords: defaultPaginationKeywords,\n    });\n    expect(paginationRegExp.test(value)).toEqual(result);\n  });\n\n  const customScenarios: ReadonlyArray<{\n    result: boolean;\n    value: string;\n  }> = [\n    { result: true, value: 'customPagination' },\n    { result: true, value: 'pageSize' },\n    { result: true, value: 'perPage' },\n    { result: false, value: 'page' },\n  ];\n\n  it.each(customScenarios)(\n    'with custom config, $value should match? $result',\n    async ({ result, value }) => {\n      const pagination: Parser['pagination'] = {\n        keywords: ['customPagination', 'pageSize', 'perPage'],\n      };\n      const paginationRegExp = getPaginationKeywordsRegExp(pagination);\n      expect(paginationRegExp.test(value)).toEqual(result);\n    },\n  );\n});\n\ndescribe('operationPagination', () => {\n  const queryParam = (\n    name: string,\n    type: IR.SchemaObject['type'] = 'string',\n    pagination = false,\n  ): IR.ParameterObject => ({\n    explode: true,\n    location: 'query',\n    name,\n    schema: { type },\n    style: 'form',\n    ...(pagination ? { pagination: true } : {}),\n  });\n\n  const emptyContext = {} as Context;\n\n  const baseOperationMeta = {\n    method: 'post' as const,\n    path: '/test' as const,\n  };\n\n  const queryScenarios: ReadonlyArray<{\n    hasPagination: boolean;\n    operation: IR.OperationObject;\n  }> = [\n    {\n      hasPagination: true,\n      operation: {\n        ...baseOperationMeta,\n        id: 'op1',\n        method: 'get',\n        parameters: {\n          query: {\n            page: queryParam('page', 'integer', true),\n          },\n        },\n      },\n    },\n    {\n      hasPagination: false,\n      operation: {\n        ...baseOperationMeta,\n        id: 'op2',\n        method: 'get',\n        parameters: {\n          query: {\n            sort: queryParam('sort', 'string'),\n          },\n        },\n      },\n    },\n    {\n      hasPagination: true,\n      operation: {\n        ...baseOperationMeta,\n        id: 'op3',\n        method: 'get',\n        parameters: {\n          query: {\n            pagesize: queryParam('pageSize', 'string', true),\n          },\n        },\n      },\n    },\n  ];\n\n  it.each(queryScenarios)(\n    'query params for $operation.id → $hasPagination',\n    ({ hasPagination, operation }: (typeof queryScenarios)[number]) => {\n      const pagination = operationPagination({\n        context: emptyContext,\n        operation,\n      });\n      expect(Boolean(pagination)).toEqual(hasPagination);\n      if (pagination && pagination.in !== 'body') {\n        const parameter =\n          operation.parameters?.[pagination.in]?.[pagination.name.toLocaleLowerCase()];\n        if (parameter) {\n          expect(pagination.name).toBe(parameter.name);\n        }\n      }\n    },\n  );\n\n  it('body.pagination === true returns entire body', () => {\n    const operation: IR.OperationObject = {\n      ...baseOperationMeta,\n      body: {\n        mediaType: 'application/json',\n        pagination: true,\n        schema: {\n          properties: {\n            page: { type: 'integer' },\n          },\n          type: 'object',\n        },\n      },\n      id: 'bodyTrue',\n    };\n\n    const result = operationPagination({ context: emptyContext, operation });\n\n    expect(result?.in).toEqual('body');\n    expect(result?.name).toEqual('body');\n    expect(result?.schema?.type).toEqual('object');\n  });\n\n  it('body.pagination = \"pagination\" returns the matching property', () => {\n    const operation: IR.OperationObject = {\n      ...baseOperationMeta,\n      body: {\n        mediaType: 'application/json',\n        pagination: 'pagination',\n        schema: {\n          properties: {\n            pagination: {\n              properties: {\n                page: { type: 'integer' },\n              },\n              type: 'object',\n            },\n          },\n          type: 'object',\n        },\n      },\n      id: 'bodyField',\n    };\n\n    const result = operationPagination({ context: emptyContext, operation });\n\n    expect(result?.in).toEqual('body');\n    expect(result?.name).toEqual('pagination');\n    expect(result?.schema?.type).toEqual('object');\n  });\n\n  it('resolves $ref and uses the resolved pagination property', () => {\n    const context: Context = {\n      resolveIrRef: vi.fn().mockReturnValue({\n        properties: {\n          pagination: {\n            properties: {\n              page: { type: 'integer' },\n            },\n            type: 'object',\n          },\n        },\n        type: 'object',\n      }),\n    } as unknown as Context;\n\n    const operation: IR.OperationObject = {\n      ...baseOperationMeta,\n      body: {\n        mediaType: 'application/json',\n        pagination: 'pagination',\n        schema: { $ref: '#/components/schemas/PaginationBody' },\n      },\n      id: 'refPagination',\n    };\n\n    const result = operationPagination({ context, operation });\n\n    expect(context.resolveIrRef).toHaveBeenCalledWith('#/components/schemas/PaginationBody');\n    expect(result?.in).toEqual('body');\n    expect(result?.name).toEqual('pagination');\n    expect(result?.schema?.type).toEqual('object');\n  });\n\n  it('falls back to query when pagination key not found in body', () => {\n    const operation: IR.OperationObject = {\n      ...baseOperationMeta,\n      body: {\n        mediaType: 'application/json',\n        pagination: 'pagination',\n        schema: {\n          properties: {\n            notPagination: { type: 'string' },\n          },\n          type: 'object',\n        },\n      },\n      id: 'fallback',\n      parameters: {\n        query: {\n          cursor: queryParam('cursor', 'string', true),\n        },\n      },\n    };\n\n    const result = operationPagination({ context: emptyContext, operation });\n\n    expect(result?.in).toEqual('query');\n    expect(result?.name).toEqual('cursor');\n    expect(result?.schema?.type).toEqual('string');\n  });\n});\n"
  },
  {
    "path": "packages/shared/src/ir/__tests__/schema.test.ts",
    "content": "import { deduplicateSchema } from '../schema';\nimport type { IR } from '../types';\n\ndescribe('deduplicateSchema', () => {\n  const scenarios: ReadonlyArray<{\n    description: string;\n    detectFormat?: boolean;\n    result: IR.SchemaObject;\n    schema: IR.SchemaObject;\n  }> = [\n    {\n      description: 'keeps multiple strings if they have different formats',\n      result: {\n        items: [\n          {\n            format: 'uuid',\n            type: 'string',\n          },\n          {\n            type: 'string',\n          },\n        ],\n        logicalOperator: 'or',\n      },\n      schema: {\n        items: [\n          {\n            format: 'uuid',\n            type: 'string',\n          },\n          {\n            type: 'string',\n          },\n        ],\n        logicalOperator: 'or',\n      },\n    },\n    {\n      description:\n        'discards duplicate strings if they have different formats and `detectFormat` is `false`',\n      detectFormat: false,\n      result: {\n        format: 'uuid',\n        type: 'string',\n      },\n      schema: {\n        items: [\n          {\n            format: 'uuid',\n            type: 'string',\n          },\n          {\n            type: 'string',\n          },\n        ],\n        logicalOperator: 'or',\n      },\n    },\n  ];\n\n  it.each(scenarios)('$description', ({ detectFormat, result, schema }) => {\n    expect(deduplicateSchema({ detectFormat, schema })).toEqual(result);\n  });\n});\n"
  },
  {
    "path": "packages/shared/src/ir/context.ts",
    "content": "import type { Logger, Project } from '@hey-api/codegen-core';\n\nimport type { AnyConfig } from '../config/shared';\nimport type { Dependency } from '../config/utils/dependencies';\nimport { dependencyFactory } from '../config/utils/dependencies';\nimport type { Graph } from '../graph';\nimport { PluginInstance } from '../plugins/shared/utils/instance';\nimport type { Plugin, PluginConfigMap, PluginNames } from '../plugins/types';\nimport { resolveRef } from '../utils/ref';\nimport type { ExampleIntent } from './intents';\nimport type { IR } from './types';\n\nexport class Context<Spec extends Record<string, any> = any, Config extends AnyConfig = AnyConfig> {\n  /**\n   * Configuration for parsing and generating the output. This\n   * is a mix of user-provided and default values.\n   */\n  config: Config;\n  /**\n   * The code generation project instance used to manage files, symbols,\n   */\n  gen: Project;\n  /**\n   * The dependency graph built from the intermediate representation.\n   */\n  graph: Graph | undefined;\n  /**\n   * Intents declared by plugins.\n   */\n  intents: Array<ExampleIntent> = [];\n  /**\n   * Intermediate representation model obtained from `spec`.\n   */\n  ir: IR.Model = {};\n  /**\n   * Logger instance.\n   */\n  logger: Logger;\n  /**\n   * The package metadata and utilities for the current context, constructed\n   * from the provided dependencies. Used for managing package-related\n   * information such as name, version, and dependency resolution during\n   * code generation.\n   */\n  package: Dependency;\n  /**\n   * A map of registered plugin instances, keyed by plugin name. Plugins are\n   * registered through the `registerPlugin` method and can be accessed by\n   * their configured name from the config.\n   */\n  plugins: Partial<Record<PluginNames, PluginInstance<PluginConfigMap[keyof PluginConfigMap]>>> =\n    {};\n  /**\n   * Resolved specification from `input`.\n   */\n  spec: Spec;\n\n  constructor({\n    config,\n    dependencies,\n    logger,\n    project,\n    spec,\n  }: {\n    config: Config;\n    dependencies: Record<string, string>;\n    logger: Logger;\n    project: Project;\n    spec: Spec;\n  }) {\n    this.config = config;\n    this.gen = project;\n    this.logger = logger;\n    this.package = dependencyFactory(dependencies);\n    this.spec = spec;\n  }\n\n  /**\n   * Returns a resolved and dereferenced schema from `spec`.\n   */\n  dereference<T>(schema: { $ref: string }) {\n    const resolved = this.resolveRef<T>(schema.$ref);\n    const dereferenced = {\n      ...schema,\n      ...resolved,\n    } as T;\n    // @ts-expect-error\n    delete dereferenced.$ref;\n    return dereferenced;\n  }\n\n  /**\n   * Registers a new plugin to the global context.\n   *\n   * @param name Plugin name.\n   * @returns Registered plugin instance.\n   */\n  private registerPlugin<T extends PluginNames>(\n    name: T,\n  ): T extends keyof PluginConfigMap ? PluginInstance<PluginConfigMap[T]> : PluginInstance {\n    const plugin = (this.config.plugins as Record<string, Plugin.Config<Plugin.Types>>)[name]!;\n    const instance = new PluginInstance({\n      api: plugin.api,\n      config: plugin.config as any,\n      context: this as any,\n      dependencies: plugin.dependencies ?? [],\n      gen: this.gen,\n      handler: plugin.handler,\n      name: plugin.name,\n    });\n    (this.plugins as Record<string, any>)[instance.name] = instance;\n    return instance as T extends keyof PluginConfigMap\n      ? PluginInstance<PluginConfigMap[T]>\n      : PluginInstance;\n  }\n\n  /**\n   * Registers all plugins in the order specified by the configuration and returns\n   * an array of the registered PluginInstance objects. Each plugin is instantiated\n   * and added to the context's plugins map.\n   *\n   * @returns {ReadonlyArray<PluginInstance>} An array of registered plugin instances in order.\n   */\n  registerPlugins(): ReadonlyArray<PluginInstance> {\n    return this.config.pluginOrder.map((name) => this.registerPlugin(name));\n  }\n\n  // TODO: parser - works the same as resolveRef, but for IR schemas.\n  // for now, they map 1:1, but if they diverge (like with OpenAPI 2.0),\n  // we will want to rewrite $refs at parse time, so they continue pointing\n  // to the correct IR location\n  resolveIrRef<T>($ref: string) {\n    return resolveRef<T>({\n      $ref,\n      spec: this.ir,\n    });\n  }\n\n  /**\n   * Returns a resolved reference from `spec`.\n   */\n  resolveRef<T>($ref: string) {\n    return resolveRef<T>({\n      $ref,\n      spec: this.spec,\n    });\n  }\n}\n"
  },
  {
    "path": "packages/shared/src/ir/graph.ts",
    "content": "import type { GetPointerPriorityFn, MatchPointerToGroupFn } from '../graph';\n\nexport const irTopLevelKinds = [\n  'operation',\n  'parameter',\n  'requestBody',\n  'schema',\n  'server',\n  'webhook',\n] as const;\n\nexport type IrTopLevelKind = (typeof irTopLevelKinds)[number];\n\n/**\n * Checks if a pointer matches a known top-level IR component (schema, parameter, etc) and returns match info.\n *\n * @param pointer - The IR pointer string (e.g. '#/components/schemas/Foo')\n * @param kind - (Optional) The component kind to check\n * @returns { matched: true, kind: IrTopLevelKind } | { matched: false } - Whether it matched, and the matched kind if so\n */\nexport const matchIrPointerToGroup: MatchPointerToGroupFn<IrTopLevelKind> = (pointer, kind) => {\n  const patterns: Record<IrTopLevelKind, RegExp> = {\n    operation: /^#\\/paths\\/[^/]+\\/(get|put|post|delete|options|head|patch|trace)$/,\n    parameter: /^#\\/components\\/parameters\\/[^/]+$/,\n    requestBody: /^#\\/components\\/requestBodies\\/[^/]+$/,\n    schema: /^#\\/components\\/schemas\\/[^/]+$/,\n    server: /^#\\/servers\\/(\\d+|[^/]+)$/,\n    webhook: /^#\\/webhooks\\/[^/]+\\/(get|put|post|delete|options|head|patch|trace)$/,\n  };\n  if (kind) {\n    return patterns[kind].test(pointer) ? { kind, matched: true } : { matched: false };\n  }\n  for (const key of Object.keys(patterns)) {\n    const kind = key as IrTopLevelKind;\n    if (patterns[kind].test(pointer)) {\n      return { kind, matched: true };\n    }\n  }\n  return { matched: false };\n};\n\n// default grouping preference (earlier groups emitted first when safe)\nexport const preferGroups = [\n  'server',\n  'schema',\n  'parameter',\n  'requestBody',\n  'operation',\n  'webhook',\n] satisfies ReadonlyArray<IrTopLevelKind>;\n\ntype KindPriority = Record<IrTopLevelKind, number>;\n\n// default group priority (lower = earlier)\n// built from `preferGroups` so the priority order stays in sync with the prefer-groups array.\nconst kindPriority: KindPriority = (() => {\n  const partial: Partial<KindPriority> = {};\n  for (let i = 0; i < preferGroups.length; i++) {\n    const k = preferGroups[i];\n    if (k) partial[k] = i;\n  }\n  // Ensure all known kinds exist in the map (fall back to a high index).\n  for (const k of irTopLevelKinds) {\n    if (partial[k] === undefined) {\n      partial[k] = preferGroups.length;\n    }\n  }\n  return partial as KindPriority;\n})();\n\nconst defaultPriority = 10;\n\nexport const getIrPointerPriority: GetPointerPriorityFn = (pointer) => {\n  const result = matchIrPointerToGroup(pointer);\n  if (result.matched) {\n    return kindPriority[result.kind] ?? defaultPriority;\n  }\n  return defaultPriority;\n};\n"
  },
  {
    "path": "packages/shared/src/ir/intents.ts",
    "content": "import type { MaybePromise } from '@hey-api/types';\n\nimport type { CodeSampleObject } from '..//openApi/shared/types';\nimport type { IR } from './types';\n\nexport interface ExampleIntent {\n  run(ctx: IntentContext): MaybePromise<void>;\n}\n\nexport class IntentContext<Spec extends Record<string, any> = any> {\n  private spec: Spec;\n\n  constructor(spec: Spec) {\n    this.spec = spec;\n  }\n\n  private getOperation(path: string, method: string): Record<string, any> | undefined {\n    const paths = (this.spec as any).paths;\n    if (!paths) return;\n    return paths[path]?.[method];\n  }\n\n  setExample(operation: IR.OperationObject, example: CodeSampleObject): void {\n    const source = this.getOperation(operation.path, operation.method);\n    if (!source) return;\n    source['x-codeSamples'] ||= [];\n    source['x-codeSamples'].push(example);\n  }\n}\n"
  },
  {
    "path": "packages/shared/src/ir/mediaType.ts",
    "content": "const fileLikeRegExp =\n  /^(application\\/(pdf|rtf|msword|vnd\\.(ms-|openxmlformats-officedocument\\.)|zip|x-(7z|tar|rar|zip|iso)|octet-stream|gzip|x-msdownload|json\\+download|xml|x-yaml|x-7z-compressed|x-tar)|text\\/(yaml|css|javascript)|audio\\/(mpeg|wav)|video\\/(mp4|x-matroska)|image\\/(vnd\\.adobe\\.photoshop|svg\\+xml))(; ?charset=[^;]+)?$/i;\nconst jsonMimeRegExp = /^application\\/(.*\\+)?json(;.*)?$/i;\nconst multipartFormDataMimeRegExp = /^multipart\\/form-data(;.*)?$/i;\nconst textMimeRegExp = /^text\\/[a-z0-9.+-]+(;.*)?$/i;\nconst xWwwFormUrlEncodedMimeRegExp = /^application\\/x-www-form-urlencoded(;.*)?$/i;\nconst octetStreamMimeRegExp = /^application\\/octet-stream(;.*)?$/i;\n\nexport type IRMediaType = 'form-data' | 'json' | 'text' | 'url-search-params' | 'octet-stream';\n\nexport const isMediaTypeFileLike = ({ mediaType }: { mediaType: string }): boolean => {\n  fileLikeRegExp.lastIndex = 0;\n  return fileLikeRegExp.test(mediaType);\n};\n\nexport const mediaTypeToIrMediaType = ({\n  mediaType,\n}: {\n  mediaType: string;\n}): IRMediaType | undefined => {\n  jsonMimeRegExp.lastIndex = 0;\n  if (jsonMimeRegExp.test(mediaType)) {\n    return 'json';\n  }\n\n  multipartFormDataMimeRegExp.lastIndex = 0;\n  if (multipartFormDataMimeRegExp.test(mediaType)) {\n    return 'form-data';\n  }\n\n  textMimeRegExp.lastIndex = 0;\n  if (textMimeRegExp.test(mediaType)) {\n    return 'text';\n  }\n\n  xWwwFormUrlEncodedMimeRegExp.lastIndex = 0;\n  if (xWwwFormUrlEncodedMimeRegExp.test(mediaType)) {\n    return 'url-search-params';\n  }\n\n  octetStreamMimeRegExp.lastIndex = 0;\n  if (octetStreamMimeRegExp.test(mediaType)) {\n    return 'octet-stream';\n  }\n\n  return;\n};\n"
  },
  {
    "path": "packages/shared/src/ir/operation.ts",
    "content": "import type { Context } from './context';\nimport type { Pagination } from './pagination';\nimport { hasParametersObjectRequired, parameterWithPagination } from './parameter';\nimport { deduplicateSchema } from './schema';\nimport type { IR } from './types';\nimport { addItemsToSchema } from './utils';\n\nexport const hasOperationDataRequired = (operation: IR.OperationObject): boolean => {\n  if (hasParametersObjectRequired(operation.parameters)) {\n    return true;\n  }\n\n  if (operation.body?.required) {\n    return true;\n  }\n\n  return false;\n};\n\nexport const createOperationKey = ({ method, path }: { method: string; path: string }) =>\n  `${method.toUpperCase()} ${path}`;\n\nexport const operationPagination = ({\n  context,\n  operation,\n}: {\n  context: Context;\n  operation: IR.OperationObject;\n}): Pagination | undefined => {\n  const body = operation.body;\n\n  if (!body || !body.pagination) {\n    return parameterWithPagination({\n      context,\n      parameters: operation.parameters,\n    });\n  }\n\n  if (body.pagination === true) {\n    return {\n      in: 'body',\n      name: 'body',\n      schema: body.schema,\n    };\n  }\n\n  const schema = body.schema;\n  const resolvedSchema = schema.$ref\n    ? context.resolveIrRef<IR.RequestBodyObject | IR.SchemaObject>(schema.$ref)\n    : schema;\n\n  const finalSchema = 'schema' in resolvedSchema ? resolvedSchema.schema : resolvedSchema;\n  const paginationProp = finalSchema?.properties?.[body.pagination];\n\n  if (!paginationProp) {\n    return parameterWithPagination({\n      context,\n      parameters: operation.parameters,\n    });\n  }\n\n  return {\n    in: 'body',\n    name: body.pagination,\n    schema: paginationProp,\n  };\n};\n\ntype StatusGroup = '1XX' | '2XX' | '3XX' | '4XX' | '5XX' | 'default';\n\nexport const statusCodeToGroup = ({ statusCode }: { statusCode: string }): StatusGroup => {\n  switch (statusCode) {\n    case '1XX':\n      return '1XX';\n    case '2XX':\n      return '2XX';\n    case '3XX':\n      return '3XX';\n    case '4XX':\n      return '4XX';\n    case '5XX':\n      return '5XX';\n    case 'default':\n      return 'default';\n    default:\n      return `${statusCode[0]}XX` as StatusGroup;\n  }\n};\n\ninterface OperationResponsesMap {\n  /**\n   * A deduplicated union of all error types. Unknown types are omitted.\n   */\n  error?: IR.SchemaObject;\n  /**\n   * An object containing a map of status codes for each error type.\n   */\n  errors?: IR.SchemaObject;\n  /**\n   * A deduplicated union of all response types. Unknown types are omitted.\n   */\n  response?: IR.SchemaObject;\n  /**\n   * An object containing a map of status codes for each response type.\n   */\n  responses?: IR.SchemaObject;\n}\n\nexport const operationResponsesMap = (operation: IR.OperationObject): OperationResponsesMap => {\n  const result: OperationResponsesMap = {};\n\n  if (!operation.responses) {\n    return result;\n  }\n\n  const errors: Omit<IR.SchemaObject, 'properties'> &\n    Pick<Required<IR.SchemaObject>, 'properties'> = {\n    properties: {},\n    type: 'object',\n  };\n\n  const responses: Omit<IR.SchemaObject, 'properties'> &\n    Pick<Required<IR.SchemaObject>, 'properties'> = {\n    properties: {},\n    type: 'object',\n  };\n\n  // store default response to be evaluated last\n  let defaultResponse: IR.ResponseObject | undefined;\n\n  for (const name in operation.responses) {\n    const response = operation.responses[name]!;\n\n    switch (statusCodeToGroup({ statusCode: name })) {\n      case '1XX':\n      case '3XX':\n        // TODO: parser - handle informational and redirection status codes\n        break;\n      case '2XX':\n        responses.properties[name] = response.schema;\n        break;\n      case '4XX':\n      case '5XX':\n        errors.properties[name] = response.schema;\n        break;\n      case 'default':\n        defaultResponse = response;\n        break;\n    }\n  }\n\n  // infer default response type\n  if (defaultResponse) {\n    let inferred = false;\n\n    // assume default is intended for success if none exists yet\n    if (!Object.keys(responses.properties).length) {\n      responses.properties.default = defaultResponse.schema;\n      inferred = true;\n    }\n\n    const description = (defaultResponse.schema.description ?? '').toLocaleLowerCase();\n    const $ref = (defaultResponse.schema.$ref ?? '').toLocaleLowerCase();\n\n    // TODO: parser - this could be rewritten using regular expressions\n    const successKeywords = ['success'];\n    if (\n      successKeywords.some((keyword) => description.includes(keyword) || $ref.includes(keyword))\n    ) {\n      responses.properties.default = defaultResponse.schema;\n      inferred = true;\n    }\n\n    // TODO: parser - this could be rewritten using regular expressions\n    const errorKeywords = ['error', 'problem'];\n    if (errorKeywords.some((keyword) => description.includes(keyword) || $ref.includes(keyword))) {\n      errors.properties.default = defaultResponse.schema;\n      inferred = true;\n    }\n\n    // if no keyword match, assume default schema is intended for error\n    if (!inferred) {\n      errors.properties.default = defaultResponse.schema;\n    }\n  }\n\n  const errorKeys = Object.keys(errors.properties);\n  if (errorKeys.length) {\n    errors.required = errorKeys;\n    result.errors = errors;\n\n    let errorUnion = addItemsToSchema({\n      items: Object.values(errors.properties),\n      mutateSchemaOneItem: true,\n      schema: {},\n    });\n    errorUnion = deduplicateSchema({ schema: errorUnion });\n    if (Object.keys(errorUnion).length && errorUnion.type !== 'unknown') {\n      result.error = errorUnion;\n    }\n  }\n\n  const responseKeys = Object.keys(responses.properties);\n  if (responseKeys.length) {\n    responses.required = responseKeys;\n    result.responses = responses;\n\n    let responseUnion = addItemsToSchema({\n      items: Object.values(responses.properties),\n      mutateSchemaOneItem: true,\n      schema: {},\n    });\n    responseUnion = deduplicateSchema({ schema: responseUnion });\n    if (Object.keys(responseUnion).length && responseUnion.type !== 'unknown') {\n      result.response = responseUnion;\n    }\n  }\n\n  return result;\n};\n"
  },
  {
    "path": "packages/shared/src/ir/pagination.ts",
    "content": "import type { Parser } from '../config/parser/types';\nimport type { IR } from './types';\n\nexport function getPaginationKeywordsRegExp(pagination: Parser['pagination']): RegExp {\n  const pattern = `^(${pagination.keywords.join('|')})$`;\n  return new RegExp(pattern);\n}\n\nexport interface Pagination {\n  in: 'body' | 'cookie' | 'header' | 'path' | 'query';\n  name: string;\n  schema: IR.SchemaObject;\n}\n"
  },
  {
    "path": "packages/shared/src/ir/parameter.ts",
    "content": "import type { Context } from './context';\nimport type { Pagination } from './pagination';\nimport type { IR } from './types';\n\nconst getPaginationSchema = ({\n  context,\n  parameter,\n}: {\n  context: Context;\n  parameter: IR.ParameterObject;\n}): IR.SchemaObject | undefined => {\n  if (!parameter.pagination) {\n    return;\n  }\n\n  if (parameter.pagination === true) {\n    return parameter.schema;\n  }\n\n  let schema = parameter.schema;\n  if (schema.$ref) {\n    schema = context.resolveIrRef<IR.SchemaObject>(schema.$ref);\n  }\n\n  return schema.properties![parameter.pagination]!;\n};\n\nexport const hasParameterGroupObjectRequired = (\n  parameterGroup?: Record<string, IR.ParameterObject>,\n): boolean => {\n  for (const name in parameterGroup) {\n    if (parameterGroup[name]!.required) {\n      return true;\n    }\n  }\n\n  return false;\n};\n\nexport const hasParametersObjectRequired = (\n  parameters: IR.ParametersObject | undefined,\n): boolean => {\n  if (!parameters) {\n    return false;\n  }\n\n  if (hasParameterGroupObjectRequired(parameters.cookie)) {\n    return true;\n  }\n\n  if (hasParameterGroupObjectRequired(parameters.header)) {\n    return true;\n  }\n\n  if (hasParameterGroupObjectRequired(parameters.path)) {\n    return true;\n  }\n\n  if (hasParameterGroupObjectRequired(parameters.query)) {\n    return true;\n  }\n\n  return false;\n};\n\nexport const parameterWithPagination = ({\n  context,\n  parameters,\n}: {\n  context: Context;\n  parameters: IR.ParametersObject | undefined;\n}): Pagination | undefined => {\n  if (!parameters) {\n    return;\n  }\n\n  for (const name in parameters.cookie) {\n    const parameter = parameters.cookie[name]!;\n    if (parameter.pagination) {\n      return {\n        in: parameter.location,\n        name:\n          parameter.pagination === true\n            ? parameter.name\n            : `${parameter.name}.${parameter.pagination}`,\n        schema: getPaginationSchema({ context, parameter })!,\n      };\n    }\n  }\n\n  for (const name in parameters.header) {\n    const parameter = parameters.header[name]!;\n    if (parameter.pagination) {\n      return {\n        in: parameter.location,\n        name:\n          parameter.pagination === true\n            ? parameter.name\n            : `${parameter.name}.${parameter.pagination}`,\n        schema: getPaginationSchema({ context, parameter })!,\n      };\n    }\n  }\n\n  for (const name in parameters.path) {\n    const parameter = parameters.path[name]!;\n    if (parameter.pagination) {\n      return {\n        in: parameter.location,\n        name:\n          parameter.pagination === true\n            ? parameter.name\n            : `${parameter.name}.${parameter.pagination}`,\n        schema: getPaginationSchema({ context, parameter })!,\n      };\n    }\n  }\n\n  for (const name in parameters.query) {\n    const parameter = parameters.query[name]!;\n    if (parameter.pagination) {\n      return {\n        in: parameter.location,\n        name:\n          parameter.pagination === true\n            ? parameter.name\n            : `${parameter.name}.${parameter.pagination}`,\n        schema: getPaginationSchema({ context, parameter })!,\n      };\n    }\n  }\n\n  return;\n};\n"
  },
  {
    "path": "packages/shared/src/ir/schema-processor.ts",
    "content": "import { pathToJsonPointer } from '../utils/ref';\nimport type { IR } from './types';\n\nexport interface SchemaProcessor {\n  /** Current inherited context (set by withContext) */\n  readonly context: {\n    readonly anchor: string | undefined;\n    readonly tags: ReadonlyArray<string> | undefined;\n  };\n  /** Check if pointer was already emitted */\n  hasEmitted: (path: ReadonlyArray<string | number>) => boolean;\n  /** Mark pointer as emitted. Returns false if already emitted. */\n  markEmitted: (path: ReadonlyArray<string | number>) => boolean;\n  /** Execute with inherited context for nested extractions */\n  withContext: <T>(ctx: { anchor?: string; tags?: ReadonlyArray<string> }, fn: () => T) => T;\n}\n\nexport interface SchemaProcessorContext {\n  meta: { resource: string; resourceId: string; role?: string };\n  namingAnchor?: string;\n  path: ReadonlyArray<string | number>;\n  schema: IR.SchemaObject;\n  tags?: ReadonlyArray<string>;\n}\n\nexport interface SchemaProcessorResult<\n  Context extends SchemaProcessorContext = SchemaProcessorContext,\n> {\n  process: (ctx: Context) => void;\n}\n\nexport type SchemaExtractor<Context extends SchemaProcessorContext = SchemaProcessorContext> = (\n  ctx: Context,\n) => IR.SchemaObject;\n\nexport function createSchemaProcessor(): SchemaProcessor {\n  const emitted = new Set<string>();\n  let contextTags: ReadonlyArray<string> | undefined;\n  let contextAnchor: string | undefined;\n\n  return {\n    get context() {\n      return {\n        anchor: contextAnchor,\n        tags: contextTags,\n      };\n    },\n    hasEmitted(path) {\n      return emitted.has(pathToJsonPointer(path));\n    },\n    markEmitted(path) {\n      const pointer = pathToJsonPointer(path);\n      if (emitted.has(pointer)) return false;\n      emitted.add(pointer);\n      return true;\n    },\n    withContext(ctx, fn) {\n      const prevTags = contextTags;\n      const prevAnchor = contextAnchor;\n      contextTags = ctx.tags;\n      contextAnchor = ctx.anchor;\n      try {\n        return fn();\n      } finally {\n        contextTags = prevTags;\n        contextAnchor = prevAnchor;\n      }\n    },\n  };\n}\n"
  },
  {
    "path": "packages/shared/src/ir/schema-walker.ts",
    "content": "import type { Ref } from '@hey-api/codegen-core';\nimport { fromRef, ref } from '@hey-api/codegen-core';\n\nimport type { SchemaWithType } from '../plugins/shared/types/schema';\nimport { deduplicateSchema } from './schema';\nimport type { IR } from './types';\n\n/**\n * Context passed to all visitor methods.\n */\nexport interface SchemaVisitorContext<TPlugin = unknown> {\n  /** Current path in the schema tree. */\n  path: Ref<ReadonlyArray<string | number>>;\n  /** The plugin instance. */\n  plugin: TPlugin;\n}\n\n/**\n * The walk function signature. Fully generic over TResult.\n */\nexport type Walker<TResult, TPlugin = unknown> = (\n  schema: IR.SchemaObject,\n  ctx: SchemaVisitorContext<TPlugin>,\n) => TResult;\n\n/**\n * The visitor interface. Plugins define their own TResult type.\n *\n * The walker handles orchestration (dispatch, deduplication, path tracking).\n * Result shape and semantics are entirely plugin-defined.\n */\nexport interface SchemaVisitor<TResult, TPlugin = unknown> {\n  /**\n   * Apply modifiers to a result.\n   */\n  applyModifiers(\n    result: TResult,\n    ctx: SchemaVisitorContext<TPlugin>,\n    context?: {\n      /** Is this property optional? */\n      optional?: boolean;\n    },\n  ): unknown;\n  array(\n    schema: SchemaWithType<'array'>,\n    ctx: SchemaVisitorContext<TPlugin>,\n    walk: Walker<TResult, TPlugin>,\n  ): TResult;\n  boolean(schema: SchemaWithType<'boolean'>, ctx: SchemaVisitorContext<TPlugin>): TResult;\n  enum(\n    schema: SchemaWithType<'enum'>,\n    ctx: SchemaVisitorContext<TPlugin>,\n    walk: Walker<TResult, TPlugin>,\n  ): TResult;\n  integer(schema: SchemaWithType<'integer'>, ctx: SchemaVisitorContext<TPlugin>): TResult;\n  /**\n   * Called before any dispatch logic. Return a result to short-circuit,\n   * or undefined to continue normal dispatch.\n   */\n  intercept?(\n    schema: IR.SchemaObject,\n    ctx: SchemaVisitorContext<TPlugin>,\n    walk: Walker<TResult, TPlugin>,\n  ): TResult | undefined;\n  /**\n   * Handle intersection types. Receives already-walked child results.\n   */\n  intersection(\n    items: Array<TResult>,\n    schemas: ReadonlyArray<IR.SchemaObject>,\n    parentSchema: IR.SchemaObject,\n    ctx: SchemaVisitorContext<TPlugin>,\n  ): TResult;\n  never(schema: SchemaWithType<'never'>, ctx: SchemaVisitorContext<TPlugin>): TResult;\n  null(schema: SchemaWithType<'null'>, ctx: SchemaVisitorContext<TPlugin>): TResult;\n  number(schema: SchemaWithType<'number'>, ctx: SchemaVisitorContext<TPlugin>): TResult;\n  object(\n    schema: SchemaWithType<'object'>,\n    ctx: SchemaVisitorContext<TPlugin>,\n    walk: Walker<TResult, TPlugin>,\n  ): TResult;\n  /**\n   * Called after each typed schema visitor returns.\n   */\n  postProcess?(\n    result: TResult,\n    schema: IR.SchemaObject,\n    ctx: SchemaVisitorContext<TPlugin>,\n  ): TResult;\n  /**\n   * Handle $ref to another schema.\n   */\n  reference($ref: string, schema: IR.SchemaObject, ctx: SchemaVisitorContext<TPlugin>): TResult;\n  string(schema: SchemaWithType<'string'>, ctx: SchemaVisitorContext<TPlugin>): TResult;\n  tuple(\n    schema: SchemaWithType<'tuple'>,\n    ctx: SchemaVisitorContext<TPlugin>,\n    walk: Walker<TResult, TPlugin>,\n  ): TResult;\n  undefined(schema: SchemaWithType<'undefined'>, ctx: SchemaVisitorContext<TPlugin>): TResult;\n  /**\n   * Handle union types. Receives already-walked child results.\n   */\n  union(\n    items: Array<TResult>,\n    schemas: ReadonlyArray<IR.SchemaObject>,\n    parentSchema: IR.SchemaObject,\n    ctx: SchemaVisitorContext<TPlugin>,\n  ): TResult;\n  unknown(schema: SchemaWithType<'unknown'>, ctx: SchemaVisitorContext<TPlugin>): TResult;\n  void(schema: SchemaWithType<'void'>, ctx: SchemaVisitorContext<TPlugin>): TResult;\n}\n\n/**\n * Create a schema walker from a visitor.\n *\n * The walker handles:\n * - Dispatch order ($ref → type → items → fallback)\n * - Deduplication of union/intersection schemas\n * - Path tracking for child schemas\n */\nexport function createSchemaWalker<TResult, TPlugin = unknown>(\n  visitor: SchemaVisitor<TResult, TPlugin>,\n): Walker<TResult, TPlugin> {\n  const walk: Walker<TResult, TPlugin> = (schema, ctx) => {\n    // escape hatch\n    if (visitor.intercept) {\n      const intercepted = visitor.intercept(schema, ctx, walk);\n      if (intercepted !== undefined) {\n        return intercepted;\n      }\n    }\n\n    if (schema.$ref) {\n      return visitor.reference(schema.$ref, schema, ctx);\n    }\n\n    if (schema.type) {\n      let result = visitTyped(schema as SchemaWithType, ctx, visitor, walk);\n      if (visitor.postProcess) {\n        result = visitor.postProcess(result, schema, ctx);\n      }\n      return result;\n    }\n\n    if (schema.items) {\n      const deduplicated = deduplicateSchema({ schema });\n\n      // deduplication might collapse to a single schema\n      if (!deduplicated.items) {\n        return walk(deduplicated, ctx);\n      }\n\n      const itemResults = deduplicated.items.map((item, index) =>\n        walk(item, {\n          ...ctx,\n          path: ref([...fromRef(ctx.path), 'items', index]),\n        }),\n      );\n\n      return deduplicated.logicalOperator === 'and'\n        ? visitor.intersection(itemResults, deduplicated.items, schema, ctx)\n        : visitor.union(itemResults, deduplicated.items, schema, ctx);\n    }\n\n    // fallback\n    return visitor.unknown({ type: 'unknown' }, ctx);\n  };\n\n  return walk;\n}\n\n/**\n * Dispatch to the appropriate visitor method based on schema type.\n */\nfunction visitTyped<TResult, TPlugin>(\n  schema: SchemaWithType,\n  ctx: SchemaVisitorContext<TPlugin>,\n  visitor: SchemaVisitor<TResult, TPlugin>,\n  walk: Walker<TResult, TPlugin>,\n): TResult {\n  switch (schema.type) {\n    case 'array':\n      return visitor.array(schema as SchemaWithType<'array'>, ctx, walk);\n    case 'boolean':\n      return visitor.boolean(schema as SchemaWithType<'boolean'>, ctx);\n    case 'enum':\n      return visitor.enum(schema as SchemaWithType<'enum'>, ctx, walk);\n    case 'integer':\n      return visitor.integer(schema as SchemaWithType<'integer'>, ctx);\n    case 'never':\n      return visitor.never(schema as SchemaWithType<'never'>, ctx);\n    case 'null':\n      return visitor.null(schema as SchemaWithType<'null'>, ctx);\n    case 'number':\n      return visitor.number(schema as SchemaWithType<'number'>, ctx);\n    case 'object':\n      return visitor.object(schema as SchemaWithType<'object'>, ctx, walk);\n    case 'string':\n      return visitor.string(schema as SchemaWithType<'string'>, ctx);\n    case 'tuple':\n      return visitor.tuple(schema as SchemaWithType<'tuple'>, ctx, walk);\n    case 'undefined':\n      return visitor.undefined(schema as SchemaWithType<'undefined'>, ctx);\n    case 'unknown':\n      return visitor.unknown(schema as SchemaWithType<'unknown'>, ctx);\n    case 'void':\n      return visitor.void(schema as SchemaWithType<'void'>, ctx);\n  }\n}\n\n/**\n * Helper to create a child context with an extended path.\n */\nexport function childContext<TPlugin>(\n  ctx: SchemaVisitorContext<TPlugin>,\n  ...segments: ReadonlyArray<string | number>\n): SchemaVisitorContext<TPlugin> {\n  return {\n    ...ctx,\n    path: ref([...fromRef(ctx.path), ...segments]),\n  };\n}\n"
  },
  {
    "path": "packages/shared/src/ir/schema.ts",
    "content": "import type { IR } from './types';\n\n/**\n * Ensure we don't produce redundant types, e.g. string | string.\n */\nexport function deduplicateSchema<T extends IR.SchemaObject>({\n  detectFormat = true,\n  schema,\n}: {\n  detectFormat?: boolean;\n  schema: T;\n}): T {\n  if (!schema.items) {\n    return schema;\n  }\n\n  const uniqueItems: Array<IR.SchemaObject> = [];\n  const typeIds: Array<string> = [];\n\n  for (const item of schema.items) {\n    // skip nested schemas for now, handle if necessary\n    if ((!item.type && item.items) || schema.type === 'tuple') {\n      uniqueItems.push(item);\n      continue;\n    }\n\n    if (\n      // no `type` might still include `$ref` or `const`\n      !item.type ||\n      item.type === 'boolean' ||\n      item.type === 'integer' ||\n      item.type === 'null' ||\n      item.type === 'number' ||\n      item.type === 'string' ||\n      item.type === 'unknown' ||\n      item.type === 'void'\n    ) {\n      // const needs namespace to handle empty string values, otherwise\n      // fallback would equal an actual value and we would skip an item\n      const constant = item.const !== undefined ? `const-${item.const}` : '';\n      const format = item.format !== undefined && detectFormat ? `format-${item.format}` : '';\n\n      // Include validation constraints in the type ID to avoid incorrect deduplication\n      const constraints = [\n        item.minLength !== undefined ? `minLength-${item.minLength}` : '',\n        item.maxLength !== undefined ? `maxLength-${item.maxLength}` : '',\n        item.minimum !== undefined ? `minimum-${item.minimum}` : '',\n        item.maximum !== undefined ? `maximum-${item.maximum}` : '',\n        item.exclusiveMinimum !== undefined ? `exclusiveMinimum-${item.exclusiveMinimum}` : '',\n        item.exclusiveMaximum !== undefined ? `exclusiveMaximum-${item.exclusiveMaximum}` : '',\n        item.minItems !== undefined ? `minItems-${item.minItems}` : '',\n        item.maxItems !== undefined ? `maxItems-${item.maxItems}` : '',\n        item.pattern !== undefined ? `pattern-${item.pattern}` : '',\n      ].join('');\n\n      const typeId = `${item.$ref ?? ''}${item.type ?? ''}${constant}${format}${constraints}`;\n      if (!typeIds.includes(typeId)) {\n        typeIds.push(typeId);\n        uniqueItems.push(item);\n      }\n      continue;\n    }\n\n    uniqueItems.push(item);\n  }\n\n  let result = { ...schema };\n  result.items = uniqueItems;\n\n  if (\n    result.items.length <= 1 &&\n    result.type !== 'array' &&\n    result.type !== 'enum' &&\n    result.type !== 'tuple'\n  ) {\n    // bring the only item up to clean up the schema\n    const liftedSchema = result.items[0];\n    delete result.logicalOperator;\n    delete result.items;\n    result = {\n      ...result,\n      ...liftedSchema,\n    };\n  }\n\n  // exclude unknown if it's the only type left\n  if (result.type === 'unknown') {\n    return {} as T;\n  }\n\n  return result;\n}\n"
  },
  {
    "path": "packages/shared/src/ir/types.ts",
    "content": "/* eslint-disable @typescript-eslint/no-namespace */\nimport type { Symbol } from '@hey-api/codegen-core';\n\nimport type { JsonSchemaDraft2020_12 } from '../openApi/3.1.x/types/json-schema-draft-2020-12';\nimport type {\n  ReferenceObject as IRReferenceObject,\n  SecuritySchemeObject,\n  ServerObject,\n} from '../openApi/3.1.x/types/spec';\nimport type { IRMediaType } from './mediaType';\n\n/**\n * OpenAPI Specification Extensions.\n *\n * See {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.0.md#specification-extensions Specification Extensions}.\n */\nexport interface SpecificationExtensions {\n  [extension: `x-${string}`]: unknown;\n}\n\ninterface IRBodyObject {\n  mediaType: string;\n  /**\n   * Does body control pagination? We handle only simple values\n   * for now, up to 1 nested field.\n   */\n  pagination?: boolean | string;\n  required?: boolean;\n  schema: IRSchemaObject;\n  type?: IRMediaType;\n}\n\ninterface IRComponentsObject {\n  parameters?: Record<string, IRParameterObject>;\n  requestBodies?: Record<string, IRRequestBodyObject>;\n  schemas?: Record<string, IRSchemaObject>;\n}\n\nexport interface IROperationObject extends SpecificationExtensions {\n  body?: IRBodyObject;\n  deprecated?: boolean;\n  description?: string;\n  id: string;\n  method: keyof IRPathItemObject;\n  operationId?: string;\n  parameters?: IRParametersObject;\n  path: keyof IRPathsObject;\n  responses?: IRResponsesObject;\n  security?: ReadonlyArray<IRSecurityObject>;\n  servers?: ReadonlyArray<IRServerObject>;\n  summary?: string;\n  tags?: ReadonlyArray<string>;\n}\n\nexport interface IRParametersObject {\n  cookie?: Record<string, IRParameterObject>;\n  header?: Record<string, IRParameterObject>;\n  path?: Record<string, IRParameterObject>;\n  query?: Record<string, IRParameterObject>;\n}\n\nexport interface IRParameterObject\n  extends Pick<JsonSchemaDraft2020_12, 'deprecated' | 'description'>, SpecificationExtensions {\n  /**\n   * Determines whether the parameter value SHOULD allow reserved characters, as defined by RFC3986 `:/?#[]@!$&'()*+,;=` to be included without percent-encoding. The default value is `false`. This property SHALL be ignored if the request body media type is not `application/x-www-form-urlencoded` or `multipart/form-data`. If a value is explicitly defined, then the value of `contentType` (implicit or explicit) SHALL be ignored.\n   */\n  allowReserved?: boolean;\n  /**\n   * When this is true, property values of type `array` or `object` generate separate parameters for each value of the array, or key-value-pair of the map. For other types of properties this property has no effect. When `style` is `form`, the default value is `true`. For all other styles, the default value is `false`. This property SHALL be ignored if the request body media type is not `application/x-www-form-urlencoded` or `multipart/form-data`. If a value is explicitly defined, then the value of `contentType` (implicit or explicit) SHALL be ignored.\n   */\n  explode: boolean;\n  /**\n   * Endpoint parameters must specify their location.\n   */\n  location: 'cookie' | 'header' | 'path' | 'query';\n  name: string;\n  /**\n   * Does this parameter control pagination? We handle only simple values\n   * for now, up to 1 nested field.\n   */\n  pagination?: boolean | string;\n  required?: boolean;\n  schema: IRSchemaObject;\n  /**\n   * Describes how the parameter value will be serialized depending on the type of the parameter value. Default values (based on value of `in`): for `query` - `form`; for `path` - `simple`; for `header` - `simple`; for `cookie` - `form`.\n   */\n  style: 'deepObject' | 'form' | 'label' | 'matrix' | 'pipeDelimited' | 'simple' | 'spaceDelimited';\n}\n\ninterface IRPathsObject {\n  [path: `/${string}`]: IRPathItemObject;\n}\n\ninterface IRPathItemObject {\n  delete?: IROperationObject;\n  get?: IROperationObject;\n  head?: IROperationObject;\n  options?: IROperationObject;\n  patch?: IROperationObject;\n  post?: IROperationObject;\n  put?: IROperationObject;\n  trace?: IROperationObject;\n}\n\ninterface IRRequestBodyObject extends Pick<JsonSchemaDraft2020_12, 'description'> {\n  required?: boolean;\n  schema: IRSchemaObject;\n}\n\ninterface IRResponsesObject {\n  /**\n   * Any {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.0.md#http-status-codes HTTP status code} can be used as the property name, but only one property per code, to describe the expected response for that HTTP status code. This field MUST be enclosed in quotation marks (for example, \"200\") for compatibility between JSON and YAML. To define a range of response codes, this field MAY contain the uppercase wildcard character `X`. For example, `2XX` represents all response codes between `[200-299]`. Only the following range definitions are allowed: `1XX`, `2XX`, `3XX`, `4XX`, and `5XX`. If a response is defined using an explicit code, the explicit code definition takes precedence over the range definition for that code.\n   */\n  [statusCode: string]: IRResponseObject | undefined;\n  /**\n   * The documentation of responses other than the ones declared for specific HTTP response codes. Use this field to cover undeclared responses.\n   */\n  default?: IRResponseObject;\n}\n\ninterface IRResponseObject {\n  // TODO: parser - handle headers, links, and possibly other media types?\n  mediaType?: string;\n  schema: IRSchemaObject;\n}\n\nexport interface IRSchemaObject\n  extends\n    Pick<\n      JsonSchemaDraft2020_12,\n      | '$ref'\n      | 'const'\n      | 'default'\n      | 'deprecated'\n      | 'description'\n      | 'exclusiveMaximum'\n      | 'exclusiveMinimum'\n      | 'maximum'\n      | 'maxItems'\n      | 'maxLength'\n      | 'minimum'\n      | 'minItems'\n      | 'minLength'\n      | 'pattern'\n      | 'required'\n      | 'title'\n      | 'example'\n    >,\n    SpecificationExtensions {\n  /**\n   * If the schema is intended to be used as an object property, it can be\n   * marked as read-only or write-only. This value controls whether the schema\n   * receives the \"readonly\" TypeScript keyword.\n   */\n  accessScope?: 'read' | 'write';\n  /**\n   * If type is `object`, `additionalProperties` can be used to either define\n   * a schema for properties not included in `properties` or disallow such\n   * properties altogether.\n   */\n  additionalProperties?: IRSchemaObject | false;\n  /**\n   * Any string value is accepted as `format`.\n   */\n  format?: JsonSchemaDraft2020_12['format'] | 'binary' | 'integer';\n  /**\n   * If schema resolves into multiple items instead of a simple `type`, they\n   * will be included in `items` array.\n   */\n  items?: ReadonlyArray<IRSchemaObject>;\n  /**\n   * When resolving a list of items, we need to know the relationship between\n   * them. `logicalOperator` specifies this logical relationship.\n   *\n   * @default 'or'\n   */\n  logicalOperator?: 'and' | 'or';\n  /**\n   * When used with `$ref` or `symbolRef`, specifies properties to omit from the referenced schema.\n   * Useful for handling discriminator property conflicts in allOf compositions.\n   */\n  omit?: ReadonlyArray<string>;\n  /**\n   * When type is `object`, `patternProperties` can be used to define a schema\n   * for properties that match a specific regex pattern.\n   */\n  patternProperties?: Record<string, IRSchemaObject>;\n  /**\n   * When type is `object`, `properties` will contain a map of its properties.\n   */\n  properties?: Record<string, IRSchemaObject>;\n  /**\n   * The names of `properties` can be validated against a schema, irrespective\n   * of their values. This can be useful if you don't want to enforce specific\n   * properties, but you want to make sure that the names of those properties\n   * follow a specific convention.\n   */\n  propertyNames?: IRSchemaObject;\n  /**\n   * Reference to symbol instead of `$ref` string.\n   */\n  symbolRef?: Symbol;\n  /**\n   * Each schema eventually resolves into `type`.\n   */\n  type?:\n    | 'array'\n    | 'boolean'\n    | 'enum'\n    | 'integer'\n    | 'never'\n    | 'null'\n    | 'number'\n    | 'object'\n    | 'string'\n    | 'tuple'\n    | 'undefined'\n    | 'unknown'\n    | 'void';\n}\n\ntype IRSecurityObject = SecuritySchemeObject;\n\n// eslint-disable-next-line @typescript-eslint/no-empty-object-type -- Interface rather than type alias avoids TS4023 errors when bundled dist is consumed by tsgo/TypeScript 7\nexport interface IRServerObject extends ServerObject {}\n\ntype IRWebhookObject = IRPathItemObject;\n\nexport interface IRModel {\n  components?: IRComponentsObject;\n  paths?: IRPathsObject;\n  servers?: ReadonlyArray<IRServerObject>;\n  webhooks?: Record<string, IRWebhookObject>;\n}\n\nexport namespace IR {\n  export type BodyObject = IRBodyObject;\n  export type ComponentsObject = IRComponentsObject;\n  export type Model = IRModel;\n  export type OperationObject = IROperationObject;\n  export type ParameterObject = IRParameterObject;\n  export type ParametersObject = IRParametersObject;\n  export type PathItemObject = IRPathItemObject;\n  export type PathsObject = IRPathsObject;\n  export type ReferenceObject = IRReferenceObject;\n  export type RequestBodyObject = IRRequestBodyObject;\n  export type ResponseObject = IRResponseObject;\n  export type ResponsesObject = IRResponsesObject;\n  export type SchemaObject = IRSchemaObject;\n  export type SecurityObject = IRSecurityObject;\n  export type ServerObject = IRServerObject;\n  export type WebhookObject = IRWebhookObject;\n}\n"
  },
  {
    "path": "packages/shared/src/ir/utils.ts",
    "content": "import type { IR } from './types';\n\n/**\n * Simply adds `items` to the schema. Also handles setting the logical operator\n * and avoids setting it for a single item or tuples.\n */\nexport function addItemsToSchema({\n  items,\n  logicalOperator = 'or',\n  mutateSchemaOneItem = false,\n  schema,\n}: {\n  items: Array<IR.SchemaObject>;\n  logicalOperator?: IR.SchemaObject['logicalOperator'];\n  mutateSchemaOneItem?: boolean;\n  schema: IR.SchemaObject;\n}): IR.SchemaObject {\n  if (!items.length) {\n    return schema;\n  }\n\n  if (schema.type === 'tuple') {\n    schema.items = items;\n    return schema;\n  }\n\n  if (items.length !== 1) {\n    schema.items = items;\n    schema.logicalOperator = logicalOperator;\n    return schema;\n  }\n\n  if (mutateSchemaOneItem) {\n    // bring composition up to avoid extraneous brackets\n    schema = {\n      ...schema,\n      ...items[0],\n    };\n    return schema;\n  }\n\n  schema.items = items;\n  return schema;\n}\n"
  },
  {
    "path": "packages/shared/src/openApi/2.0.x/index.ts",
    "content": "export { parseV2_0_X } from './parser';\nexport type { OpenApiV2_0_X } from './types/spec';\n\nimport type { InfoObject, OperationObject, SchemaObject } from './types/spec';\n\nexport interface OpenApiV2_0_XTypes {\n  InfoObject: InfoObject;\n  OperationObject: OperationObject;\n  SchemaObject: SchemaObject;\n}\n"
  },
  {
    "path": "packages/shared/src/openApi/2.0.x/parser/__tests__/operation.test.ts",
    "content": "import type { Context } from '../../../../ir/context';\nimport type { ParameterObject, SecuritySchemeObject } from '../../types/spec';\nimport { parsePathOperation } from '../operation';\n\ntype ParseOperationProps = Parameters<typeof parsePathOperation>[0];\n\nconst createContext = () =>\n  ({\n    config: {\n      parser: {\n        pagination: {\n          keywords: ['after', 'before', 'cursor', 'offset', 'page', 'start'],\n        },\n      },\n      plugins: {},\n    },\n    dereference: <T>(obj: any): T => obj as T,\n    ir: {\n      components: {\n        schemas: {},\n      },\n      paths: {},\n      servers: [],\n    },\n    resolveRef: () =>\n      // Mock implementation\n      undefined,\n  }) as unknown as Context;\n\ndescribe('operation', () => {\n  const context = createContext();\n\n  it('should parse operation correctly', () => {\n    const method = 'get';\n    const operation: ParseOperationProps['operation'] = {\n      operationId: 'testOperation',\n      responses: {},\n      security: [\n        {\n          apiKeyAuth: [],\n          basicAuthRule: [],\n        },\n        {\n          apiKeyAuth: [],\n          oauthRule: [],\n        },\n      ],\n      summary: 'Test Operation',\n    };\n    const path = '/test';\n    const securitySchemesMap = new Map<string, SecuritySchemeObject>([\n      ['apiKeyAuth', { in: 'header', name: 'Auth', type: 'apiKey' }],\n      ['basicAuthRule', { description: 'Basic Auth', type: 'basic' }],\n      [\n        'oauthRule',\n        {\n          description: 'OAuth2',\n          flow: 'password',\n          scopes: {\n            read: 'Grants read access',\n            write: 'Grants write access',\n          },\n          tokenUrl: 'https://example.com/oauth/token',\n          type: 'oauth2',\n        },\n      ],\n    ]);\n    const state: ParseOperationProps['state'] = {\n      ids: new Map<string, string>(),\n    };\n\n    parsePathOperation({\n      context,\n      method,\n      operation,\n      path,\n      securitySchemesMap,\n      state,\n    });\n\n    expect(context.ir.paths?.[path]?.[method]).toEqual({\n      id: 'testOperation',\n      method,\n      operationId: 'testOperation',\n      path,\n      security: [\n        { in: 'header', name: 'Auth', type: 'apiKey' },\n        { description: 'Basic Auth', scheme: 'basic', type: 'http' },\n        {\n          description: 'OAuth2',\n          flows: {\n            password: {\n              scopes: {\n                read: 'Grants read access',\n                write: 'Grants write access',\n              },\n              tokenUrl: 'https://example.com/oauth/token',\n            },\n          },\n          type: 'oauth2',\n        },\n      ],\n      summary: 'Test Operation',\n    });\n  });\n\n  it('should parse body parameter when consumes is undefined', () => {\n    const context = createContext();\n    const method = 'post';\n    const bodyParam: ParameterObject = {\n      description: 'Request body',\n      in: 'body',\n      name: 'body',\n      required: true,\n      schema: {\n        properties: {\n          id: { type: 'string' },\n          name: { type: 'string' },\n        },\n        required: ['id'],\n        type: 'object',\n      },\n    };\n    const operation: ParseOperationProps['operation'] = {\n      operationId: 'createItem',\n      requestBody: [bodyParam],\n      responses: {\n        '201': {\n          description: 'Created',\n        },\n      },\n      summary: 'Create an item',\n    };\n    const path = '/items';\n    const securitySchemesMap = new Map<string, SecuritySchemeObject>();\n    const state: ParseOperationProps['state'] = {\n      ids: new Map<string, string>(),\n    };\n\n    parsePathOperation({\n      context,\n      method,\n      operation,\n      path,\n      securitySchemesMap,\n      state,\n    });\n\n    const result = context.ir.paths?.[path]?.[method];\n    expect(result).toBeDefined();\n    expect(result?.body).toBeDefined();\n    expect(result?.body?.mediaType).toBe('application/json');\n    expect(result?.body?.required).toBe(true);\n    expect(result?.body?.schema.type).toBe('object');\n  });\n\n  it('should parse body parameter with array schema', () => {\n    const context = createContext();\n    const method = 'post';\n    const bodyParam: ParameterObject = {\n      description: 'add items',\n      in: 'body',\n      name: 'request',\n      required: true,\n      schema: {\n        items: {\n          properties: {\n            count: { type: 'number' },\n            id: { type: 'integer' },\n          },\n          type: 'object',\n        },\n        type: 'array',\n      },\n    };\n    const operation: ParseOperationProps['operation'] = {\n      operationId: 'addItems',\n      requestBody: [bodyParam],\n      responses: {\n        '201': {\n          description: 'Created',\n        },\n      },\n    };\n    const path = '/api/v1/items';\n    const securitySchemesMap = new Map<string, SecuritySchemeObject>();\n    const state: ParseOperationProps['state'] = {\n      ids: new Map<string, string>(),\n    };\n\n    parsePathOperation({\n      context,\n      method,\n      operation,\n      path,\n      securitySchemesMap,\n      state,\n    });\n\n    const result = context.ir.paths?.[path]?.[method];\n    expect(result).toBeDefined();\n    expect(result?.body).toBeDefined();\n    expect(result?.body?.mediaType).toBe('application/json');\n    expect(result?.body?.required).toBe(true);\n    expect(result?.body?.schema.type).toBe('array');\n  });\n\n  it('should use consumes when specified', () => {\n    const context = createContext();\n    const method = 'post';\n    const bodyParam: ParameterObject = {\n      description: 'XML body',\n      in: 'body',\n      name: 'body',\n      required: true,\n      schema: {\n        type: 'object',\n      },\n    };\n    const operation: ParseOperationProps['operation'] = {\n      consumes: ['application/xml'],\n      operationId: 'createXml',\n      requestBody: [bodyParam],\n      responses: {\n        '201': {\n          description: 'Created',\n        },\n      },\n    };\n    const path = '/items';\n    const securitySchemesMap = new Map<string, SecuritySchemeObject>();\n    const state: ParseOperationProps['state'] = {\n      ids: new Map<string, string>(),\n    };\n\n    parsePathOperation({\n      context,\n      method,\n      operation,\n      path,\n      securitySchemesMap,\n      state,\n    });\n\n    const result = context.ir.paths?.[path]?.[method];\n    expect(result).toBeDefined();\n    expect(result?.body).toBeDefined();\n    expect(result?.body?.mediaType).toBe('application/xml');\n  });\n});\n"
  },
  {
    "path": "packages/shared/src/openApi/2.0.x/parser/__tests__/server.test.ts",
    "content": "import type { Context } from '../../../../ir/context';\nimport type { OpenApi } from '../../../types';\nimport { parseServers } from '../server';\n\ndescribe('parseServers', () => {\n  it('host + basePath + schemes', () => {\n    const context: Partial<Context<Partial<OpenApi.V2_0_X>>> = {\n      config: {\n        input: [\n          // @ts-expect-error\n          {\n            path: '',\n          },\n        ],\n      },\n      ir: {},\n      spec: {\n        basePath: '/v1',\n        host: 'foo.com',\n        schemes: ['http', 'https'],\n      },\n    };\n    parseServers({ context: context as Context });\n    expect(context.ir!.servers).toEqual([\n      {\n        url: 'http://foo.com/v1',\n      },\n      {\n        url: 'https://foo.com/v1',\n      },\n    ]);\n  });\n\n  it('schemes + host', () => {\n    const context: Partial<Context<Partial<OpenApi.V2_0_X>>> = {\n      config: {\n        input: [\n          // @ts-expect-error\n          {\n            path: '',\n          },\n        ],\n      },\n      ir: {},\n      spec: {\n        host: 'foo.com',\n        schemes: ['ws'],\n      },\n    };\n    parseServers({ context: context as Context });\n    expect(context.ir!.servers).toEqual([\n      {\n        url: 'ws://foo.com',\n      },\n    ]);\n  });\n\n  it('host + basePath', () => {\n    const context: Partial<Context<Partial<OpenApi.V2_0_X>>> = {\n      config: {\n        input: [\n          // @ts-expect-error\n          {\n            path: '',\n          },\n        ],\n      },\n      ir: {},\n      spec: {\n        basePath: '/v1',\n        host: 'foo.com',\n      },\n    };\n    parseServers({ context: context as Context });\n    expect(context.ir!.servers).toEqual([\n      {\n        url: 'foo.com/v1',\n      },\n    ]);\n  });\n\n  it('host', () => {\n    const context: Partial<Context<Partial<OpenApi.V2_0_X>>> = {\n      config: {\n        input: [\n          // @ts-expect-error\n          {\n            path: '',\n          },\n        ],\n      },\n      ir: {},\n      spec: {\n        host: 'foo.com',\n      },\n    };\n    parseServers({ context: context as Context });\n    expect(context.ir!.servers).toEqual([\n      {\n        url: 'foo.com',\n      },\n    ]);\n  });\n\n  it('basePath', () => {\n    const context: Partial<Context<Partial<OpenApi.V2_0_X>>> = {\n      config: {\n        input: [\n          // @ts-expect-error\n          {\n            path: '',\n          },\n        ],\n      },\n      ir: {},\n      spec: {\n        basePath: '/v1',\n      },\n    };\n    parseServers({ context: context as Context });\n    expect(context.ir!.servers).toEqual([\n      {\n        url: '/v1',\n      },\n    ]);\n  });\n});\n"
  },
  {
    "path": "packages/shared/src/openApi/2.0.x/parser/__tests__/validate.test.ts",
    "content": "import path from 'node:path';\n\nimport { Logger } from '@hey-api/codegen-core';\n\nimport { getSpecsPath, specFileToJson } from '../../../__tests__/utils';\nimport type { ValidatorResult } from '../../../shared/utils/validator';\nimport { validateOpenApiSpec } from '../validate';\n\nconst specsFolder = path.join(getSpecsPath(), '2.0.x', 'invalid');\n\ndescribe('validate', () => {\n  const scenarios: Array<\n    ValidatorResult & {\n      description: string;\n      file: string;\n    }\n  > = [\n    {\n      description: 'operationId must be unique',\n      file: path.join(specsFolder, 'operationId-unique.yaml'),\n      issues: [\n        {\n          code: 'duplicate_key',\n          context: {\n            key: 'operationId',\n            value: 'foo',\n          },\n          message: 'Duplicate `operationId` found. Each `operationId` must be unique.',\n          path: ['paths', '/foo', 'post', 'operationId'],\n          severity: 'error',\n        },\n      ],\n      valid: false,\n    },\n  ];\n\n  it.each(scenarios)('$description', ({ file, issues, valid }) => {\n    const spec = specFileToJson(file);\n    const logger = new Logger();\n    const result = validateOpenApiSpec(spec, logger);\n    expect(result.valid).toBe(valid);\n    expect(result.issues).toEqual(issues);\n  });\n});\n"
  },
  {
    "path": "packages/shared/src/openApi/2.0.x/parser/filter.ts",
    "content": "import type { Logger } from '@hey-api/codegen-core';\n\nimport { createOperationKey } from '../../../ir/operation';\nimport { addNamespace, removeNamespace } from '../../../openApi/shared/utils/filter';\nimport { httpMethods } from '../../../openApi/shared/utils/operation';\nimport type { OpenApiV2_0_X, OperationObject, PathItemObject, PathsObject } from '../types/spec';\n\n/**\n * Replace source spec with filtered version.\n */\nexport const filterSpec = ({\n  logger,\n  operations,\n  preserveOrder,\n  schemas,\n  spec,\n}: {\n  logger: Logger;\n  operations: Set<string>;\n  parameters: Set<string>;\n  preserveOrder: boolean;\n  requestBodies: Set<string>;\n  responses: Set<string>;\n  schemas: Set<string>;\n  spec: OpenApiV2_0_X;\n}) => {\n  const eventFilterSpec = logger.timeEvent('filter-spec');\n  if (spec.definitions) {\n    const filtered: typeof spec.definitions = {};\n\n    if (preserveOrder) {\n      for (const [name, source] of Object.entries(spec.definitions)) {\n        if (schemas.has(addNamespace('schema', name))) {\n          filtered[name] = source;\n        }\n      }\n    } else {\n      for (const key of schemas) {\n        const { name } = removeNamespace(key);\n        const source = spec.definitions[name];\n        if (source) {\n          filtered[name] = source;\n        }\n      }\n    }\n\n    spec.definitions = filtered;\n  }\n\n  if (spec.paths) {\n    for (const entry of Object.entries(spec.paths)) {\n      const path = entry[0] as keyof PathsObject;\n      const pathItem = entry[1] as PathItemObject;\n\n      for (const method of httpMethods) {\n        // @ts-expect-error\n        const operation = pathItem[method] as OperationObject;\n        if (!operation) {\n          continue;\n        }\n\n        const key = addNamespace('operation', createOperationKey({ method, path }));\n        if (!operations.has(key)) {\n          // @ts-expect-error\n          delete pathItem[method];\n        }\n      }\n\n      // remove paths that have no operations left\n      if (!Object.keys(pathItem).length) {\n        delete spec.paths[path];\n      }\n    }\n  }\n  eventFilterSpec.timeEnd();\n};\n"
  },
  {
    "path": "packages/shared/src/openApi/2.0.x/parser/index.ts",
    "content": "import type { Context } from '../../../ir/context';\nimport { buildResourceMetadata } from '../../../openApi/shared/graph/meta';\nimport { transformOpenApiSpec } from '../../../openApi/shared/transforms';\nimport type { State } from '../../../openApi/shared/types/state';\nimport {\n  createFilteredDependencies,\n  createFilters,\n  hasFilters,\n} from '../../../openApi/shared/utils/filter';\nimport { buildGraph } from '../../../openApi/shared/utils/graph';\nimport { mergeParametersObjects } from '../../../openApi/shared/utils/parameter';\nimport { handleValidatorResult } from '../../../openApi/shared/utils/validator';\nimport type {\n  OpenApiV2_0_X,\n  OperationObject,\n  PathItemObject,\n  PathsObject,\n  SecuritySchemeObject,\n} from '../types/spec';\nimport { filterSpec } from './filter';\nimport { parsePathOperation } from './operation';\nimport { parametersArrayToObject } from './parameter';\nimport { parseSchema } from './schema';\nimport { parseServers } from './server';\nimport { validateOpenApiSpec } from './validate';\n\ntype PathKeys<T extends keyof PathsObject = keyof PathsObject> = keyof T extends infer K\n  ? K extends `/${string}`\n    ? K\n    : never\n  : never;\n\nexport const parseV2_0_X = (context: Context<OpenApiV2_0_X>) => {\n  if (context.config.parser.validate_EXPERIMENTAL) {\n    const result = validateOpenApiSpec(context.spec, context.logger);\n    handleValidatorResult({ context, result });\n  }\n\n  const shouldFilterSpec = hasFilters(context.config.parser.filters);\n  if (shouldFilterSpec) {\n    const filters = createFilters(context.config.parser.filters, context.spec, context.logger);\n    const { graph } = buildGraph(context.spec, context.logger);\n    const { resourceMetadata } = buildResourceMetadata(graph, context.logger);\n    const sets = createFilteredDependencies({\n      filters,\n      logger: context.logger,\n      resourceMetadata,\n    });\n    filterSpec({\n      ...sets,\n      logger: context.logger,\n      preserveOrder: filters.preserveOrder,\n      spec: context.spec,\n    });\n  }\n\n  transformOpenApiSpec({ context });\n\n  const state: State = {\n    ids: new Map(),\n  };\n  const securitySchemesMap = new Map<string, SecuritySchemeObject>();\n\n  for (const name in context.spec.securityDefinitions) {\n    const securitySchemeObject = context.spec.securityDefinitions[name]!;\n    securitySchemesMap.set(name, securitySchemeObject);\n  }\n\n  if (context.spec.definitions) {\n    for (const name in context.spec.definitions) {\n      const $ref = `#/definitions/${name}`;\n      const schema = context.spec.definitions[name]!;\n\n      parseSchema({\n        $ref,\n        context,\n        schema,\n      });\n    }\n  }\n\n  parseServers({ context });\n\n  for (const path in context.spec.paths) {\n    if (path.startsWith('x-')) continue;\n    const pathItem = context.spec.paths[path as PathKeys]!;\n\n    const finalPathItem = pathItem.$ref\n      ? {\n          ...context.resolveRef<PathItemObject>(pathItem.$ref),\n          ...pathItem,\n        }\n      : pathItem;\n\n    const commonOperation: OperationObject = {\n      consumes: context.spec.consumes,\n      produces: context.spec.produces,\n      responses: {},\n      security: context.spec.security,\n    };\n    const operationArgs: Omit<Parameters<typeof parsePathOperation>[0], 'method'> = {\n      context,\n      operation: {\n        ...commonOperation,\n        parameters: parametersArrayToObject({\n          context,\n          operation: commonOperation,\n          parameters: finalPathItem.parameters,\n        }),\n      },\n      path: path as PathKeys,\n      securitySchemesMap,\n      state,\n    };\n\n    if (finalPathItem.delete) {\n      const parameters = mergeParametersObjects({\n        source: parametersArrayToObject({\n          context,\n          operation: finalPathItem.delete,\n          parameters: finalPathItem.delete.parameters,\n        }),\n        target: operationArgs.operation.parameters,\n      });\n      parsePathOperation({\n        ...operationArgs,\n        method: 'delete',\n        operation: {\n          ...operationArgs.operation,\n          ...finalPathItem.delete,\n          parameters,\n        },\n      });\n    }\n\n    if (finalPathItem.get) {\n      const parameters = mergeParametersObjects({\n        source: parametersArrayToObject({\n          context,\n          operation: finalPathItem.get,\n          parameters: finalPathItem.get.parameters,\n        }),\n        target: operationArgs.operation.parameters,\n      });\n      parsePathOperation({\n        ...operationArgs,\n        method: 'get',\n        operation: {\n          ...operationArgs.operation,\n          ...finalPathItem.get,\n          parameters,\n        },\n      });\n    }\n\n    if (finalPathItem.head) {\n      const parameters = mergeParametersObjects({\n        source: parametersArrayToObject({\n          context,\n          operation: finalPathItem.head,\n          parameters: finalPathItem.head.parameters,\n        }),\n        target: operationArgs.operation.parameters,\n      });\n      parsePathOperation({\n        ...operationArgs,\n        method: 'head',\n        operation: {\n          ...operationArgs.operation,\n          ...finalPathItem.head,\n          parameters,\n        },\n      });\n    }\n\n    if (finalPathItem.options) {\n      const parameters = mergeParametersObjects({\n        source: parametersArrayToObject({\n          context,\n          operation: finalPathItem.options,\n          parameters: finalPathItem.options.parameters,\n        }),\n        target: operationArgs.operation.parameters,\n      });\n      parsePathOperation({\n        ...operationArgs,\n        method: 'options',\n        operation: {\n          ...operationArgs.operation,\n          ...finalPathItem.options,\n          parameters,\n        },\n      });\n    }\n\n    if (finalPathItem.patch) {\n      const parameters = mergeParametersObjects({\n        source: parametersArrayToObject({\n          context,\n          operation: finalPathItem.patch,\n          parameters: finalPathItem.patch.parameters,\n        }),\n        target: operationArgs.operation.parameters,\n      });\n      parsePathOperation({\n        ...operationArgs,\n        method: 'patch',\n        operation: {\n          ...operationArgs.operation,\n          ...finalPathItem.patch,\n          parameters,\n        },\n      });\n    }\n\n    if (finalPathItem.post) {\n      const parameters = mergeParametersObjects({\n        source: parametersArrayToObject({\n          context,\n          operation: finalPathItem.post,\n          parameters: finalPathItem.post.parameters,\n        }),\n        target: operationArgs.operation.parameters,\n      });\n      parsePathOperation({\n        ...operationArgs,\n        method: 'post',\n        operation: {\n          ...operationArgs.operation,\n          ...finalPathItem.post,\n          parameters,\n        },\n      });\n    }\n\n    if (finalPathItem.put) {\n      const parameters = mergeParametersObjects({\n        source: parametersArrayToObject({\n          context,\n          operation: finalPathItem.put,\n          parameters: finalPathItem.put.parameters,\n        }),\n        target: operationArgs.operation.parameters,\n      });\n      parsePathOperation({\n        ...operationArgs,\n        method: 'put',\n        operation: {\n          ...operationArgs.operation,\n          ...finalPathItem.put,\n          parameters,\n        },\n      });\n    }\n  }\n};\n"
  },
  {
    "path": "packages/shared/src/openApi/2.0.x/parser/mediaType.ts",
    "content": "import type { IRMediaType } from '../../../ir/mediaType';\nimport { isMediaTypeFileLike, mediaTypeToIrMediaType } from '../../../ir/mediaType';\nimport type { ReferenceObject, ResponseObject, SchemaObject } from '../types/spec';\n\ninterface Content {\n  mediaType: string;\n  schema: SchemaObject | ReferenceObject | undefined;\n  type: IRMediaType | undefined;\n}\n\nexport const contentToSchema = ({ content }: { content: Content }): SchemaObject | undefined => {\n  const { mediaType, schema } = content;\n\n  if (schema && '$ref' in schema) {\n    return {\n      allOf: [{ ...schema }],\n    };\n  }\n\n  if (!schema) {\n    if (isMediaTypeFileLike({ mediaType })) {\n      return {\n        format: 'binary',\n        type: 'string',\n      };\n    }\n    return;\n  }\n\n  if (schema.type === 'string' && !schema.format && isMediaTypeFileLike({ mediaType })) {\n    return {\n      ...schema,\n      format: 'binary',\n    };\n  }\n\n  return schema;\n};\n\nexport const mediaTypeObjects = ({\n  mimeTypes,\n  response,\n}: {\n  mimeTypes: ReadonlyArray<string> | undefined;\n  response: Pick<ResponseObject, 'schema'>;\n}): ReadonlyArray<Content> => {\n  const objects: Array<Content> = [];\n\n  for (const mediaType of mimeTypes ?? []) {\n    objects.push({\n      mediaType,\n      schema: response.schema,\n      type: mediaTypeToIrMediaType({ mediaType }),\n    });\n  }\n\n  return objects;\n};\n"
  },
  {
    "path": "packages/shared/src/openApi/2.0.x/parser/operation.ts",
    "content": "import type { Context } from '../../../ir/context';\nimport type { IR } from '../../../ir/types';\nimport type { State } from '../../../openApi/shared/types/state';\nimport { operationToId } from '../../../openApi/shared/utils/operation';\nimport type {\n  OperationObject,\n  ParameterObject,\n  PathItemObject,\n  ResponseObject,\n  SchemaObject,\n  SecuritySchemeObject,\n} from '../types/spec';\nimport { contentToSchema, mediaTypeObjects } from './mediaType';\nimport { paginationField } from './pagination';\nimport { parseExtensions, schemaToIrSchema } from './schema';\n\ninterface Operation\n  extends Omit<OperationObject, 'parameters'>, Pick<IR.OperationObject, 'parameters'> {\n  requestBody?: OperationObject['parameters'];\n}\n\nconst parseOperationJsDoc = ({\n  irOperation,\n  operation,\n}: {\n  irOperation: IR.OperationObject;\n  operation: Operation;\n}) => {\n  if (operation.deprecated !== undefined) {\n    irOperation.deprecated = operation.deprecated;\n  }\n\n  if (operation.description) {\n    irOperation.description = operation.description;\n  }\n\n  if (operation.summary) {\n    irOperation.summary = operation.summary;\n  }\n\n  if (operation.tags?.length) {\n    irOperation.tags = operation.tags;\n  }\n};\n\nconst initIrOperation = ({\n  context,\n  method,\n  operation,\n  path,\n  state,\n}: Pick<IR.OperationObject, 'method' | 'path'> & {\n  context: Context;\n  operation: Operation;\n  state: State;\n}): IR.OperationObject => {\n  const irOperation: IR.OperationObject = {\n    id: operationToId({\n      context,\n      id: operation.operationId,\n      method,\n      path,\n      state,\n    }),\n    method,\n    path,\n  };\n\n  if (operation.operationId) {\n    irOperation.operationId = operation.operationId;\n  }\n\n  parseOperationJsDoc({\n    irOperation,\n    operation,\n  });\n\n  parseExtensions({\n    source: operation,\n    target: irOperation,\n  });\n\n  return irOperation;\n};\n\nconst operationToIrOperation = ({\n  context,\n  method,\n  operation,\n  path,\n  securitySchemesMap,\n  state,\n}: Pick<IR.OperationObject, 'method' | 'path'> & {\n  context: Context;\n  operation: Operation;\n  securitySchemesMap: Map<string, SecuritySchemeObject>;\n  state: State;\n}): IR.OperationObject => {\n  const irOperation = initIrOperation({\n    context,\n    method,\n    operation,\n    path,\n    state,\n  });\n\n  if (operation.parameters) {\n    irOperation.parameters = operation.parameters;\n  }\n\n  let isRequestBodyRequired = false;\n  const requestBodyObject: IR.BodyObject = {\n    mediaType: '',\n    schema: {\n      properties: {},\n      required: [],\n      type: 'object',\n    },\n  };\n  const requestBodyObjectRequired: Array<string> = [];\n\n  // Check if there are any body parameters (not formData) to determine default media type\n  const hasBodyParameter = operation.requestBody?.some((param) => {\n    const resolvedParam = '$ref' in param ? context.resolveRef<ParameterObject>(param.$ref) : param;\n    return resolvedParam.in === 'body';\n  });\n\n  for (const requestBodyParameter of operation.requestBody ?? []) {\n    const requestBody =\n      '$ref' in requestBodyParameter\n        ? context.resolveRef<ParameterObject>(requestBodyParameter.$ref)\n        : requestBodyParameter;\n    const schema: SchemaObject =\n      requestBody.in === 'body'\n        ? requestBody.schema\n        : {\n            ...requestBody,\n            format: requestBody.type === 'file' ? 'binary' : requestBody.format,\n            required: undefined,\n            type: requestBody.type === 'file' ? 'string' : requestBody.type,\n          };\n\n    // Only default to JSON if we have body parameters and no consumes specified\n    // FormData parameters without consumes should not get a default media type\n    let mimeTypes = operation.consumes;\n    if (!mimeTypes && hasBodyParameter && requestBody.in === 'body') {\n      mimeTypes = ['application/json'];\n    }\n\n    const contents = mediaTypeObjects({\n      mimeTypes,\n      response: { schema },\n    });\n    // TODO: add support for multiple content types, for now prefer JSON\n    const content = contents.find((content) => content.type === 'json') || contents[0];\n\n    if (content) {\n      const pagination = paginationField({\n        context,\n        name: '',\n        schema:\n          content.schema && '$ref' in content.schema\n            ? {\n                allOf: [{ ...content.schema }],\n                description: requestBody.description,\n              }\n            : {\n                description: requestBody.description,\n                ...content.schema,\n              },\n      });\n\n      const irSchema = schemaToIrSchema({\n        context,\n        schema:\n          '$ref' in requestBody\n            ? {\n                allOf: [\n                  {\n                    ...requestBody,\n                    $ref: requestBody.$ref as string,\n                    required: [],\n                    type: 'string',\n                  },\n                ],\n                description: requestBody.description,\n              }\n            : content.schema && '$ref' in content.schema\n              ? {\n                  allOf: [{ ...content.schema }],\n                  description: requestBody.description,\n                }\n              : {\n                  description: requestBody.description,\n                  ...content.schema,\n                },\n        state: undefined,\n      });\n\n      requestBodyObject.mediaType = content.mediaType;\n\n      if (requestBody.in === 'body') {\n        requestBodyObject.schema = irSchema;\n      } else {\n        requestBodyObject.schema.properties![requestBody.name] = irSchema;\n\n        if (requestBody.required) {\n          requestBodyObjectRequired.push(requestBody.name);\n        }\n      }\n\n      if (pagination) {\n        requestBodyObject.pagination = pagination;\n      }\n\n      if (content.type) {\n        requestBodyObject.type = content.type;\n      }\n    }\n\n    if (requestBody.required) {\n      isRequestBodyRequired = true;\n    }\n  }\n\n  if (requestBodyObject.mediaType) {\n    if (requestBodyObjectRequired.length) {\n      requestBodyObject.schema.required = requestBodyObjectRequired;\n    }\n\n    irOperation.body = requestBodyObject;\n\n    if (isRequestBodyRequired) {\n      irOperation.body.required = isRequestBodyRequired;\n    }\n  }\n\n  for (const name in operation.responses) {\n    if (!irOperation.responses) {\n      irOperation.responses = {};\n    }\n\n    const response = operation.responses[name]!;\n    const responseObject =\n      '$ref' in response ? context.resolveRef<ResponseObject>(response.$ref) : response;\n    const contents = mediaTypeObjects({\n      // assume JSON by default\n      mimeTypes: operation.produces ? operation.produces : ['application/json'],\n      response: responseObject,\n    });\n    // TODO: add support for multiple content types, for now prefer JSON\n    const content = contents.find((content) => content.type === 'json') || contents[0];\n\n    if (content) {\n      irOperation.responses[name] = {\n        mediaType: content.mediaType,\n        schema: schemaToIrSchema({\n          context,\n          schema: {\n            description: responseObject.description,\n            ...contentToSchema({ content }),\n          },\n          state: undefined,\n        }),\n      };\n    } else {\n      irOperation.responses[name] = {\n        schema: {\n          description: responseObject.description,\n          // TODO: parser - cover all statues with empty response bodies\n          // 1xx, 204, 205, 304\n          type: name === '204' ? 'void' : 'unknown',\n        },\n      };\n    }\n  }\n\n  if (operation.security) {\n    const securitySchemeObjects: Map<string, IR.SecurityObject> = new Map();\n\n    for (const securityRequirementObject of operation.security) {\n      for (const name in securityRequirementObject) {\n        const securitySchemeObject = securitySchemesMap.get(name);\n\n        if (!securitySchemeObject) {\n          continue;\n        }\n\n        let irSecuritySchemeObject: IR.SecurityObject | undefined;\n\n        if (securitySchemeObject.type === 'apiKey') {\n          irSecuritySchemeObject = securitySchemeObject;\n        }\n\n        if (securitySchemeObject.type === 'basic') {\n          irSecuritySchemeObject = {\n            description: securitySchemeObject.description,\n            scheme: 'basic',\n            type: 'http',\n          };\n        }\n\n        if (securitySchemeObject.type === 'oauth2') {\n          irSecuritySchemeObject = {\n            description: securitySchemeObject.description,\n            flows: {},\n            type: 'oauth2',\n          };\n\n          switch (securitySchemeObject.flow) {\n            case 'accessCode':\n              irSecuritySchemeObject.flows.authorizationCode = {\n                authorizationUrl: securitySchemeObject.authorizationUrl!,\n                scopes: securitySchemeObject.scopes,\n                tokenUrl: securitySchemeObject.tokenUrl!,\n              };\n              break;\n            case 'application':\n              irSecuritySchemeObject.flows.clientCredentials = {\n                scopes: securitySchemeObject.scopes,\n                tokenUrl: securitySchemeObject.tokenUrl!,\n              };\n              break;\n            case 'implicit':\n              irSecuritySchemeObject.flows.implicit = {\n                authorizationUrl: securitySchemeObject.authorizationUrl!,\n                scopes: securitySchemeObject.scopes,\n              };\n              break;\n            case 'password':\n              irSecuritySchemeObject.flows.password = {\n                scopes: securitySchemeObject.scopes,\n                tokenUrl: securitySchemeObject.tokenUrl!,\n              };\n              break;\n          }\n        }\n\n        if (!irSecuritySchemeObject) {\n          continue;\n        }\n\n        securitySchemeObjects.set(name, irSecuritySchemeObject);\n      }\n    }\n\n    if (securitySchemeObjects.size) {\n      irOperation.security = Array.from(securitySchemeObjects.values());\n    }\n  }\n\n  // TODO: parser - handle servers\n  // qux: operation.servers\n\n  return irOperation;\n};\n\nexport const parsePathOperation = ({\n  context,\n  method,\n  operation,\n  path,\n  securitySchemesMap,\n  state,\n}: {\n  context: Context;\n  method: Extract<\n    keyof PathItemObject,\n    'delete' | 'get' | 'head' | 'options' | 'patch' | 'post' | 'put' | 'trace'\n  >;\n  operation: Operation;\n  path: keyof IR.PathsObject;\n  securitySchemesMap: Map<string, SecuritySchemeObject>;\n  state: State;\n}) => {\n  if (!context.ir.paths) {\n    context.ir.paths = {};\n  }\n\n  if (!context.ir.paths[path]) {\n    context.ir.paths[path] = {};\n  }\n\n  context.ir.paths[path][method] = operationToIrOperation({\n    context,\n    method,\n    operation,\n    path,\n    securitySchemesMap,\n    state,\n  });\n};\n"
  },
  {
    "path": "packages/shared/src/openApi/2.0.x/parser/pagination.ts",
    "content": "import type { Context } from '../../../ir/context';\nimport { getPaginationKeywordsRegExp } from '../../../ir/pagination';\nimport type { SchemaType } from '../../../openApi/shared/types/schema';\nimport type { ParameterObject, ReferenceObject } from '../types/spec';\nimport type { SchemaObject } from '../types/spec';\nimport { getSchemaType } from './schema';\n\nconst isPaginationType = (schemaType: SchemaType<SchemaObject> | undefined): boolean =>\n  schemaType === 'boolean' ||\n  schemaType === 'integer' ||\n  schemaType === 'number' ||\n  schemaType === 'string';\n\n// We handle only simple values for now, up to 1 nested field\nexport const paginationField = ({\n  context,\n  name,\n  schema,\n}: {\n  context: Context;\n  name: string;\n  schema:\n    | ParameterObject\n    | SchemaObject\n    | ReferenceObject\n    | {\n        in: undefined;\n      };\n}): boolean | string => {\n  const paginationRegExp = getPaginationKeywordsRegExp(context.config.parser.pagination);\n  if (paginationRegExp.test(name)) {\n    return true;\n  }\n\n  if ('$ref' in schema) {\n    const ref = context.resolveRef<ParameterObject | SchemaObject>(schema.$ref ?? '');\n\n    if ('in' in ref && ref.in) {\n      const refSchema =\n        'schema' in ref\n          ? ref.schema\n          : {\n              ...ref,\n              in: undefined,\n            };\n\n      return paginationField({\n        context,\n        name,\n        schema: refSchema,\n      });\n    }\n\n    return paginationField({\n      context,\n      name,\n      schema: ref,\n    });\n  }\n\n  if ('in' in schema) {\n    if (!schema.in) {\n      return false;\n    }\n\n    const finalSchema =\n      'schema' in schema\n        ? schema.schema\n        : {\n            ...schema,\n            in: undefined,\n          };\n\n    return paginationField({\n      context,\n      name,\n      schema: finalSchema,\n    });\n  }\n\n  for (const name in schema.properties) {\n    const paginationRegExp = getPaginationKeywordsRegExp(context.config.parser.pagination);\n\n    if (paginationRegExp.test(name)) {\n      const property = schema.properties[name]!;\n\n      if (typeof property !== 'boolean' && !('$ref' in property)) {\n        const schemaType = getSchemaType({ schema: property });\n        // TODO: resolve deeper references\n\n        if (isPaginationType(schemaType)) {\n          return name;\n        }\n      }\n    }\n  }\n\n  for (const allOf of schema.allOf ?? []) {\n    const pagination = paginationField({\n      context,\n      name,\n      schema: allOf,\n    });\n    if (pagination) {\n      return pagination;\n    }\n  }\n\n  return false;\n};\n"
  },
  {
    "path": "packages/shared/src/openApi/2.0.x/parser/parameter.ts",
    "content": "import type { Context } from '../../../ir/context';\nimport type { IR } from '../../../ir/types';\nimport type {\n  OperationObject,\n  ParameterObject,\n  ReferenceObject,\n  SchemaObject,\n} from '../types/spec';\nimport { paginationField } from './pagination';\nimport { parseExtensions, schemaToIrSchema } from './schema';\n\ntype Parameter = Exclude<ParameterObject, { in: 'body' }>;\n\n/**\n * Returns default parameter `explode` based on value of `collectionFormat`.\n */\nconst defaultExplode = (collectionFormat: Parameter['collectionFormat']): boolean => {\n  switch (collectionFormat) {\n    case 'multi':\n      return true;\n    case 'csv':\n    case 'pipes':\n    case 'ssv':\n    case 'tsv':\n    default:\n      return false;\n  }\n};\n\n/**\n * Returns default parameter `style` based on value of `in`.\n */\nconst defaultStyle = (_in: Parameter['in']): Required<IR.ParameterObject>['style'] => {\n  switch (_in) {\n    case 'header':\n    case 'path':\n      return 'simple';\n    case 'query':\n    default:\n      return 'form';\n  }\n};\n\nexport const parametersArrayToObject = ({\n  context,\n  operation,\n  parameters,\n}: {\n  context: Context;\n  operation: OperationObject;\n  parameters?: ReadonlyArray<ParameterObject | ReferenceObject>;\n}): IR.ParametersObject | undefined => {\n  if (!parameters || !Object.keys(parameters).length) {\n    return;\n  }\n\n  const parametersObject: IR.ParametersObject = {};\n\n  for (const parameterOrReference of parameters) {\n    const parameter =\n      '$ref' in parameterOrReference\n        ? context.dereference<ParameterObject>(parameterOrReference)\n        : parameterOrReference;\n\n    // push request body parameters into a separate field\n    if (parameter.in === 'body' || parameter.in === 'formData') {\n      // @ts-expect-error\n      if (!operation.requestBody) {\n        // @ts-expect-error\n        operation.requestBody = [];\n      }\n\n      // @ts-expect-error\n      operation.requestBody.push(parameter);\n      continue;\n    }\n\n    if (!parametersObject[parameter.in]) {\n      parametersObject[parameter.in] = {};\n    }\n\n    // lowercase keys for case insensitive access\n    parametersObject[parameter.in]![parameter.name.toLocaleLowerCase()] = parameterToIrParameter({\n      $ref: `#/todo/real/path/to/parameter/${parameter.name}`,\n      context,\n      parameter,\n    });\n  }\n\n  return parametersObject;\n};\n\nconst parameterToIrParameter = ({\n  $ref,\n  context,\n  parameter,\n}: {\n  $ref: string;\n  context: Context;\n  parameter: Parameter;\n}): IR.ParameterObject => {\n  const schema = parameter;\n\n  const finalSchema: SchemaObject =\n    schema && '$ref' in schema\n      ? {\n          allOf: [\n            {\n              ...schema,\n              $ref: schema.$ref as string,\n              required: Array.isArray(schema.required) ? schema.required : [],\n              type: schema.type as SchemaObject['type'],\n            },\n          ],\n          description: parameter.description,\n        }\n      : {\n          description: parameter.description,\n          ...schema,\n          required: Array.isArray(schema.required) ? schema.required : [],\n          type: schema.type as SchemaObject['type'],\n        };\n\n  const pagination = paginationField({\n    context,\n    name: parameter.name,\n    schema: finalSchema,\n  });\n\n  const style = defaultStyle(parameter.in);\n  const explode = defaultExplode(parameter.collectionFormat);\n  const allowReserved = false;\n\n  const irParameter: IR.ParameterObject = {\n    allowReserved,\n    explode,\n    location: parameter.in as IR.ParameterObject['location'],\n    name: parameter.name,\n    schema: schemaToIrSchema({\n      context,\n      schema: finalSchema,\n      state: {\n        $ref,\n        circularReferenceTracker: new Set(),\n      },\n    }),\n    style,\n  };\n\n  if (parameter.description) {\n    irParameter.description = parameter.description;\n  }\n\n  if (pagination) {\n    irParameter.pagination = pagination;\n  }\n\n  if (parameter.required) {\n    irParameter.required = parameter.required;\n  }\n\n  parseExtensions({\n    source: parameter,\n    target: irParameter,\n  });\n\n  return irParameter;\n};\n"
  },
  {
    "path": "packages/shared/src/openApi/2.0.x/parser/schema.ts",
    "content": "import type { Context } from '../../../ir/context';\nimport type { IR } from '../../../ir/types';\nimport { addItemsToSchema } from '../../../ir/utils';\nimport type {\n  SchemaState,\n  SchemaType,\n  SchemaWithRequired,\n} from '../../../openApi/shared/types/schema';\nimport { discriminatorValues } from '../../../openApi/shared/utils/discriminator';\nimport { isTopLevelComponent, refToName } from '../../../utils/ref';\nimport type { SchemaObject } from '../types/spec';\n\nexport const getSchemaType = ({\n  schema,\n}: {\n  schema: SchemaObject;\n}): SchemaType<SchemaObject> | undefined => {\n  if (schema.type) {\n    return schema.type;\n  }\n\n  // infer object based on the presence of properties\n  if (schema.properties) {\n    return 'object';\n  }\n\n  return;\n};\n\nconst parseSchemaJsDoc = ({\n  irSchema,\n  schema,\n}: {\n  irSchema: IR.SchemaObject;\n  schema: SchemaObject;\n}) => {\n  if (schema.example) {\n    irSchema.example = schema.example;\n  }\n\n  if (schema.description) {\n    irSchema.description = schema.description;\n  }\n\n  if (schema.title) {\n    irSchema.title = schema.title;\n  }\n};\n\nconst parseSchemaMeta = ({\n  irSchema,\n  schema,\n}: {\n  irSchema: IR.SchemaObject;\n  schema: SchemaObject;\n}) => {\n  if (schema.default !== undefined) {\n    irSchema.default = schema.default;\n  }\n\n  if (schema.exclusiveMaximum) {\n    if (schema.maximum !== undefined) {\n      irSchema.exclusiveMaximum = schema.maximum;\n    }\n  } else if (schema.maximum !== undefined) {\n    irSchema.maximum = schema.maximum;\n  }\n\n  if (schema.exclusiveMinimum) {\n    if (schema.minimum !== undefined) {\n      irSchema.exclusiveMinimum = schema.minimum;\n    }\n  } else if (schema.minimum !== undefined) {\n    irSchema.minimum = schema.minimum;\n  }\n\n  if (schema.format) {\n    irSchema.format = schema.format;\n  }\n\n  if (schema.maxItems !== undefined) {\n    irSchema.maxItems = schema.maxItems;\n  }\n\n  if (schema.maxLength !== undefined) {\n    irSchema.maxLength = schema.maxLength;\n  }\n\n  if (schema.minItems !== undefined) {\n    irSchema.minItems = schema.minItems;\n  }\n\n  if (schema.minLength !== undefined) {\n    irSchema.minLength = schema.minLength;\n  }\n\n  if (schema.pattern) {\n    irSchema.pattern = schema.pattern;\n  }\n\n  if (schema.readOnly) {\n    irSchema.accessScope = 'read';\n  }\n};\n\nconst parseArray = ({\n  context,\n  irSchema = {},\n  schema,\n  state,\n}: {\n  context: Context;\n  irSchema?: IR.SchemaObject;\n  schema: SchemaObject;\n  state: SchemaState;\n}): IR.SchemaObject => {\n  if (schema.maxItems && schema.maxItems === schema.minItems) {\n    irSchema.type = 'tuple';\n  } else {\n    irSchema.type = 'array';\n  }\n\n  let schemaItems: Array<IR.SchemaObject> = [];\n\n  if (schema.items) {\n    const irItemsSchema = schemaToIrSchema({\n      context,\n      schema: schema.items,\n      state,\n    });\n\n    if (!schemaItems.length && schema.maxItems && schema.maxItems === schema.minItems) {\n      schemaItems = Array(schema.maxItems).fill(irItemsSchema);\n    } else {\n      if ('$ref' in schema.items) {\n        schemaItems.push(irItemsSchema);\n      } else {\n        const ofArray = schema.items.allOf;\n        if (ofArray && ofArray.length > 1 && !schema.items['x-nullable']) {\n          // bring composition up to avoid incorrectly nested arrays\n          irSchema = {\n            ...irSchema,\n            ...irItemsSchema,\n          };\n        } else {\n          schemaItems.push(irItemsSchema);\n        }\n      }\n    }\n  }\n\n  irSchema = addItemsToSchema({\n    items: schemaItems,\n    schema: irSchema,\n  });\n\n  return irSchema;\n};\n\nconst parseBoolean = ({\n  irSchema = {},\n}: {\n  context: Context;\n  irSchema?: IR.SchemaObject;\n  schema: SchemaObject;\n  state: SchemaState;\n}): IR.SchemaObject => {\n  irSchema.type = 'boolean';\n\n  return irSchema;\n};\n\nconst parseNumber = ({\n  irSchema = {},\n  schema,\n}: {\n  context: Context;\n  irSchema?: IR.SchemaObject;\n  schema: SchemaWithRequired<SchemaObject, 'type'>;\n  state: SchemaState;\n}): IR.SchemaObject => {\n  irSchema.type = schema.type;\n\n  return irSchema;\n};\n\nconst parseObject = ({\n  context,\n  irSchema = {},\n  schema,\n  state,\n}: {\n  context: Context;\n  irSchema?: IR.SchemaObject;\n  schema: SchemaObject;\n  state: SchemaState;\n}): IR.SchemaObject => {\n  irSchema.type = 'object';\n\n  const schemaProperties: Record<string, IR.SchemaObject> = {};\n\n  for (const name in schema.properties) {\n    const property = schema.properties[name]!;\n    if (typeof property === 'boolean') {\n      // TODO: parser - handle boolean properties\n    } else {\n      const irPropertySchema = schemaToIrSchema({\n        context,\n        schema: property,\n        state,\n      });\n      schemaProperties[name] = irPropertySchema;\n    }\n  }\n\n  if (Object.keys(schemaProperties).length) {\n    irSchema.properties = schemaProperties;\n  }\n\n  if (schema.additionalProperties === undefined) {\n    if (!irSchema.properties) {\n      irSchema.additionalProperties = {\n        type: 'unknown',\n      };\n    }\n  } else if (typeof schema.additionalProperties === 'boolean') {\n    // Avoid [key: string]: never for empty objects with additionalProperties: false inside allOf\n    // This would override inherited properties from other schemas in the composition\n    const isEmptyObjectInAllOf =\n      state.inAllOf &&\n      schema.additionalProperties === false &&\n      (!schema.properties || !Object.keys(schema.properties).length);\n\n    if (!isEmptyObjectInAllOf) {\n      irSchema.additionalProperties = {\n        type: schema.additionalProperties ? 'unknown' : 'never',\n      };\n    }\n  } else {\n    const irAdditionalPropertiesSchema = schemaToIrSchema({\n      context,\n      schema: schema.additionalProperties,\n      state,\n    });\n    irSchema.additionalProperties = irAdditionalPropertiesSchema;\n  }\n\n  if (schema.required) {\n    irSchema.required = schema.required;\n  }\n\n  return irSchema;\n};\n\nconst parseString = ({\n  irSchema = {},\n}: {\n  context: Context;\n  irSchema?: IR.SchemaObject;\n  schema: SchemaObject;\n  state: SchemaState;\n}): IR.SchemaObject => {\n  irSchema.type = 'string';\n\n  return irSchema;\n};\n\nexport const parseExtensions = ({ source, target }: { source: object; target: object }) => {\n  for (const key in source) {\n    if (key.startsWith('x-')) {\n      (target as Record<string, unknown>)[key] = (source as Record<string, unknown>)[key];\n    }\n  }\n};\n\nconst initIrSchema = ({ schema }: { schema: SchemaObject }): IR.SchemaObject => {\n  const irSchema: IR.SchemaObject = {};\n\n  parseSchemaJsDoc({\n    irSchema,\n    schema,\n  });\n\n  parseExtensions({\n    source: schema,\n    target: irSchema,\n  });\n\n  return irSchema;\n};\n\nconst parseAllOf = ({\n  context,\n  schema,\n  state,\n}: {\n  context: Context;\n  schema: SchemaWithRequired<SchemaObject, 'allOf'>;\n  state: SchemaState;\n}): IR.SchemaObject => {\n  let irSchema = initIrSchema({ schema });\n\n  const schemaItems: Array<IR.SchemaObject> = [];\n  const schemaType = getSchemaType({ schema });\n\n  const compositionSchemas = schema.allOf;\n\n  for (const compositionSchema of compositionSchemas) {\n    const originalInAllOf = state.inAllOf;\n    // Don't propagate inAllOf flag to $ref schemas to avoid issues with reusable components\n    if (!('$ref' in compositionSchema)) {\n      state.inAllOf = true;\n    }\n    const irCompositionSchema = schemaToIrSchema({\n      context,\n      schema: compositionSchema,\n      state,\n    });\n    state.inAllOf = originalInAllOf;\n    if (state.inAllOf === undefined) {\n      delete state.inAllOf;\n    }\n\n    if (schema.required) {\n      if (irCompositionSchema.required) {\n        irCompositionSchema.required = [...irCompositionSchema.required, ...schema.required];\n      } else {\n        irCompositionSchema.required = schema.required;\n      }\n    }\n\n    schemaItems.push(irCompositionSchema);\n\n    if (compositionSchema.$ref) {\n      const ref = context.resolveRef<SchemaObject>(compositionSchema.$ref);\n      // `$ref` should be passed from the root `parseSchema()` call\n      if (ref.discriminator && state.$ref) {\n        const values = discriminatorValues(state.$ref);\n        const valueSchemas: ReadonlyArray<IR.SchemaObject> = values.map((value) => ({\n          const: value,\n          type: 'string',\n        }));\n        const irDiscriminatorSchema: IR.SchemaObject = {\n          properties: {\n            [ref.discriminator]:\n              valueSchemas.length > 1\n                ? {\n                    items: valueSchemas,\n                    logicalOperator: 'or',\n                  }\n                : valueSchemas[0]!,\n          },\n          type: 'object',\n        };\n        if (ref.required?.includes(ref.discriminator)) {\n          irDiscriminatorSchema.required = [ref.discriminator];\n        }\n        schemaItems.push(irDiscriminatorSchema);\n      }\n    }\n  }\n\n  if (schemaType === 'object') {\n    const irObjectSchema = parseOneType({\n      context,\n      schema: {\n        ...schema,\n        type: 'object',\n      },\n      state,\n    });\n\n    if (irObjectSchema.properties) {\n      for (const requiredProperty of irObjectSchema.required ?? []) {\n        if (!irObjectSchema.properties[requiredProperty]) {\n          for (const compositionSchema of compositionSchemas) {\n            // TODO: parser - this could be probably resolved more accurately\n            const finalCompositionSchema = compositionSchema.$ref\n              ? context.resolveRef<SchemaObject>(compositionSchema.$ref)\n              : compositionSchema;\n\n            if (getSchemaType({ schema: finalCompositionSchema }) === 'object') {\n              const irCompositionSchema = parseOneType({\n                context,\n                schema: {\n                  ...finalCompositionSchema,\n                  type: 'object',\n                },\n                state,\n              });\n\n              if (irCompositionSchema.properties?.[requiredProperty]) {\n                irObjectSchema.properties[requiredProperty] =\n                  irCompositionSchema.properties[requiredProperty];\n                break;\n              }\n            }\n          }\n        }\n      }\n      schemaItems.push(irObjectSchema);\n    }\n  }\n\n  irSchema = addItemsToSchema({\n    items: schemaItems,\n    logicalOperator: 'and',\n    mutateSchemaOneItem: true,\n    schema: irSchema,\n  });\n\n  if (schema['x-nullable']) {\n    // nest composition to avoid producing an intersection with null\n    const nestedItems: Array<IR.SchemaObject> = [\n      {\n        type: 'null',\n      },\n    ];\n\n    if (schemaItems.length) {\n      nestedItems.unshift(irSchema);\n    }\n\n    irSchema = {\n      items: nestedItems,\n      logicalOperator: 'or',\n    };\n\n    // TODO: parser - this is a hack to bring back up meta fields\n    // without it, some schemas were missing original deprecated\n    if (nestedItems[0]!.deprecated) {\n      irSchema.deprecated = nestedItems[0]!.deprecated;\n    }\n\n    // TODO: parser - this is a hack to bring back up meta fields\n    // without it, some schemas were missing original description\n    if (nestedItems[0]!.description) {\n      irSchema.description = nestedItems[0]!.description;\n    }\n  }\n\n  return irSchema;\n};\n\nconst parseEnum = ({\n  context,\n  schema,\n  state,\n}: {\n  context: Context;\n  schema: SchemaWithRequired<SchemaObject, 'enum'>;\n  state: SchemaState;\n}): IR.SchemaObject => {\n  let irSchema = initIrSchema({ schema });\n\n  irSchema.type = 'enum';\n\n  const schemaItems: Array<IR.SchemaObject> = [];\n\n  for (const [index, enumValue] of schema.enum.entries()) {\n    const typeOfEnumValue = typeof enumValue;\n    let enumType: SchemaType<SchemaObject> | 'null' | undefined;\n\n    if (\n      typeOfEnumValue === 'string' ||\n      typeOfEnumValue === 'number' ||\n      typeOfEnumValue === 'boolean'\n    ) {\n      enumType = typeOfEnumValue;\n    } else if (typeOfEnumValue === 'object' && Array.isArray(enumValue)) {\n      enumType = 'array';\n    } else if (enumValue === null) {\n      // nullable must be true\n      if (schema['x-nullable']) {\n        enumType = 'null';\n      }\n    } else {\n      console.warn(\n        '🚨',\n        `unhandled \"${typeOfEnumValue}\" typeof value \"${enumValue}\" for enum`,\n        schema.enum,\n      );\n    }\n\n    if (!enumType) {\n      continue;\n    }\n\n    const irTypeSchema = parseOneType({\n      context,\n      schema: {\n        description: schema['x-enum-descriptions']?.[index],\n        title: schema['x-enum-varnames']?.[index] ?? schema['x-enumNames']?.[index],\n        // cast enum to string temporarily\n        type: enumType === 'null' ? 'string' : enumType,\n      },\n      state,\n    });\n\n    irTypeSchema.const = enumValue;\n\n    // cast enum back\n    if (enumType === 'null') {\n      irTypeSchema.type = enumType;\n    }\n\n    if (irTypeSchema.type === 'array') {\n      irTypeSchema.type = 'tuple';\n    }\n\n    schemaItems.push(irTypeSchema);\n  }\n\n  irSchema = addItemsToSchema({\n    items: schemaItems,\n    schema: irSchema,\n  });\n\n  return irSchema;\n};\n\nconst parseRef = ({\n  context,\n  schema,\n  state,\n}: {\n  context: Context;\n  schema: SchemaWithRequired<SchemaObject, '$ref'>;\n  state: SchemaState;\n}): IR.SchemaObject => {\n  const irSchema: IR.SchemaObject = {};\n  // Inline non-component refs (e.g. #/paths/...) and deep path refs (e.g. #/definitions/Foo/properties/bar)\n  // to avoid generating orphaned named types or referencing unregistered symbols\n  const isComponentsRef = isTopLevelComponent(schema.$ref);\n  if (!isComponentsRef) {\n    if (!state.circularReferenceTracker.has(schema.$ref)) {\n      const refSchema = context.resolveRef<SchemaObject>(schema.$ref);\n      const originalRef = state.$ref;\n      state.$ref = schema.$ref;\n      const irSchema = schemaToIrSchema({\n        context,\n        schema: refSchema,\n        state,\n      });\n      state.$ref = originalRef;\n      return irSchema;\n    }\n    // Fallback to preserving the ref if circular\n  }\n\n  // refs using unicode characters become encoded, didn't investigate why\n  // but the suspicion is this comes from `@hey-api/json-schema-ref-parser`\n  irSchema.$ref = decodeURI(schema.$ref);\n\n  // rewrite definitions refs as the internal schema follows OpenAPI 3.x syntax\n  // and stores all definitions as reusable schemas\n  irSchema.$ref = irSchema.$ref.replace(/#\\/definitions\\/([^/]+)/g, '#/components/schemas/$1');\n\n  if (!state.circularReferenceTracker.has(schema.$ref)) {\n    const refSchema = context.resolveRef<SchemaObject>(schema.$ref);\n    const originalRef = state.$ref;\n    state.$ref = schema.$ref;\n    schemaToIrSchema({\n      context,\n      schema: refSchema,\n      state,\n    });\n    state.$ref = originalRef;\n  }\n\n  return irSchema;\n};\n\nconst parseNullableType = ({\n  context,\n  irSchema,\n  schema,\n  state,\n}: {\n  context: Context;\n  irSchema?: IR.SchemaObject;\n  schema: SchemaWithRequired<SchemaObject, 'type'>;\n  state: SchemaState;\n}): IR.SchemaObject => {\n  if (!irSchema) {\n    irSchema = initIrSchema({ schema });\n  }\n\n  const typeIrSchema: IR.SchemaObject = {};\n\n  parseSchemaMeta({ irSchema: typeIrSchema, schema });\n\n  if (typeIrSchema.default === null) {\n    // clear to avoid duplicate default inside the non-null schema.\n    // this would produce incorrect validator output\n    delete typeIrSchema.default;\n  }\n\n  const schemaItems: Array<IR.SchemaObject> = [\n    parseOneType({\n      context,\n      irSchema: typeIrSchema,\n      schema,\n      state,\n    }),\n    {\n      type: 'null',\n    },\n  ];\n\n  irSchema = addItemsToSchema({\n    items: schemaItems,\n    schema: irSchema,\n  });\n\n  return irSchema;\n};\n\nconst parseType = ({\n  context,\n  schema,\n  state,\n}: {\n  context: Context;\n  schema: SchemaWithRequired<SchemaObject, 'type'>;\n  state: SchemaState;\n}): IR.SchemaObject => {\n  const irSchema = initIrSchema({ schema });\n\n  parseSchemaMeta({ irSchema, schema });\n\n  const type = getSchemaType({ schema });\n\n  if (!type) {\n    return irSchema;\n  }\n\n  if (schema['x-nullable']) {\n    return parseNullableType({\n      context,\n      irSchema,\n      schema: {\n        ...schema,\n        type,\n      },\n      state,\n    });\n  }\n\n  return parseOneType({\n    context,\n    irSchema,\n    schema: {\n      ...schema,\n      type,\n    },\n    state,\n  });\n};\n\nconst parseOneType = ({\n  context,\n  irSchema,\n  schema,\n  state,\n}: {\n  context: Context;\n  irSchema?: IR.SchemaObject;\n  schema: SchemaWithRequired<SchemaObject, 'type'>;\n  state: SchemaState;\n}): IR.SchemaObject => {\n  if (!irSchema) {\n    irSchema = initIrSchema({ schema });\n\n    parseSchemaMeta({ irSchema, schema });\n  }\n\n  switch (schema.type) {\n    case 'array':\n      return parseArray({\n        context,\n        irSchema,\n        schema,\n        state,\n      });\n    case 'boolean':\n      return parseBoolean({\n        context,\n        irSchema,\n        schema,\n        state,\n      });\n    case 'integer':\n    case 'number':\n      return parseNumber({\n        context,\n        irSchema,\n        schema,\n        state,\n      });\n    case 'object':\n      return parseObject({\n        context,\n        irSchema,\n        schema,\n        state,\n      });\n    case 'string':\n      return parseString({\n        context,\n        irSchema,\n        schema,\n        state,\n      });\n    default:\n      // gracefully handle invalid type\n      return parseUnknown({\n        context,\n        irSchema,\n        schema,\n      });\n  }\n};\n\nconst parseUnknown = ({\n  irSchema,\n  schema,\n}: {\n  context: Context;\n  irSchema?: IR.SchemaObject;\n  schema: SchemaObject;\n}): IR.SchemaObject => {\n  if (!irSchema) {\n    irSchema = initIrSchema({ schema });\n  }\n\n  irSchema.type = 'unknown';\n\n  parseSchemaMeta({ irSchema, schema });\n\n  return irSchema;\n};\n\nexport const schemaToIrSchema = ({\n  context,\n  schema,\n  state,\n}: {\n  context: Context;\n  schema: SchemaObject;\n  state: SchemaState | undefined;\n}): IR.SchemaObject => {\n  if (!state) {\n    state = {\n      circularReferenceTracker: new Set(),\n    };\n  }\n\n  if (state.$ref) {\n    state.circularReferenceTracker.add(state.$ref);\n  }\n\n  if (schema.$ref) {\n    return parseRef({\n      context,\n      schema: schema as SchemaWithRequired<SchemaObject, '$ref'>,\n      state,\n    });\n  }\n\n  if (schema.enum) {\n    return parseEnum({\n      context,\n      schema: schema as SchemaWithRequired<SchemaObject, 'enum'>,\n      state,\n    });\n  }\n\n  if (schema.allOf) {\n    return parseAllOf({\n      context,\n      schema: schema as SchemaWithRequired<SchemaObject, 'allOf'>,\n      state,\n    });\n  }\n\n  // infer object based on the presence of properties\n  if (schema.type || schema.properties) {\n    return parseType({\n      context,\n      schema: schema as SchemaWithRequired<SchemaObject, 'type'>,\n      state,\n    });\n  }\n\n  return parseUnknown({ context, schema });\n};\n\nexport const parseSchema = ({\n  $ref,\n  context,\n  schema,\n}: {\n  $ref: string;\n  context: Context;\n  schema: SchemaObject;\n}) => {\n  if (!context.ir.components) {\n    context.ir.components = {};\n  }\n\n  if (!context.ir.components.schemas) {\n    context.ir.components.schemas = {};\n  }\n\n  context.ir.components.schemas[refToName($ref)] = schemaToIrSchema({\n    context,\n    schema,\n    state: {\n      $ref,\n      circularReferenceTracker: new Set(),\n    },\n  });\n};\n"
  },
  {
    "path": "packages/shared/src/openApi/2.0.x/parser/server.ts",
    "content": "import type { Context } from '../../../ir/context';\nimport { parseUrl } from '../../../utils/url';\n\nexport const parseServers = ({ context }: { context: Context }) => {\n  let schemes: ReadonlyArray<string> = context.spec.schemes ?? [];\n  let host = context.spec.host ?? '';\n  const path = context.spec.basePath ?? '';\n\n  for (const input of context.config.input) {\n    if (typeof input.path === 'string') {\n      const url = parseUrl(input.path);\n\n      if (!schemes.length) {\n        if (url.protocol) {\n          schemes = [url.protocol] as typeof schemes;\n        }\n      }\n\n      if (!host) {\n        host = `${url.host}${url.port ? `:${url.port}` : ''}`;\n      }\n    }\n  }\n\n  if (!schemes.length) {\n    schemes = [''];\n  }\n\n  const servers = schemes\n    .map((scheme) => `${scheme ? `${scheme}://` : ''}${host}${path}`)\n    .filter(Boolean);\n\n  if (servers.length) {\n    context.ir.servers = servers.map((url) => ({\n      url,\n    }));\n  }\n};\n"
  },
  {
    "path": "packages/shared/src/openApi/2.0.x/parser/validate.ts",
    "content": "import type { Logger } from '@hey-api/codegen-core';\n\nimport { createOperationKey } from '../../../ir/operation';\nimport { httpMethods } from '../../../openApi/shared/utils/operation';\nimport type { ValidatorIssue, ValidatorResult } from '../../../openApi/shared/utils/validator';\nimport type { OpenApiV2_0_X, PathItemObject, PathsObject } from '../types/spec';\n\nexport const validateOpenApiSpec = (spec: OpenApiV2_0_X, logger: Logger): ValidatorResult => {\n  const eventValidate = logger.timeEvent('validate');\n  const issues: Array<ValidatorIssue> = [];\n  const operationIds = new Map();\n\n  if (spec.paths) {\n    for (const entry of Object.entries(spec.paths)) {\n      const path = entry[0] as keyof PathsObject;\n      const pathItem = entry[1] as PathItemObject;\n      for (const method of httpMethods) {\n        if (method === 'trace') {\n          continue;\n        }\n\n        const operation = pathItem[method];\n        if (!operation) {\n          continue;\n        }\n\n        const operationKey = createOperationKey({ method, path });\n\n        if (operation.operationId) {\n          if (!operationIds.has(operation.operationId)) {\n            operationIds.set(operation.operationId, operationKey);\n          } else {\n            issues.push({\n              code: 'duplicate_key',\n              context: {\n                key: 'operationId',\n                value: operation.operationId,\n              },\n              message: 'Duplicate `operationId` found. Each `operationId` must be unique.',\n              path: ['paths', path, method, 'operationId'],\n              severity: 'error',\n            });\n          }\n        }\n      }\n    }\n  }\n\n  eventValidate.timeEnd();\n  return {\n    issues,\n    valid: !issues.some((issue) => issue.severity === 'error'),\n  };\n};\n"
  },
  {
    "path": "packages/shared/src/openApi/2.0.x/types/json-schema-draft-4.ts",
    "content": "import type { AnyString } from '@hey-api/types';\n\nimport type { EnumExtensions } from '../../../openApi/shared/types';\n\nexport interface JsonSchemaDraft4 extends EnumExtensions {\n  /**\n   * A schema can reference another schema using the `$ref` keyword. The value of `$ref` is a URI-reference that is resolved against the schema's {@link https://json-schema.org/understanding-json-schema/structuring#base-uri Base URI}. When evaluating a `$ref`, an implementation uses the resolved identifier to retrieve the referenced schema and applies that schema to the {@link https://json-schema.org/learn/glossary#instance instance}.\n   *\n   * The `$ref` keyword may be used to create recursive schemas that refer to themselves.\n   */\n  $ref?: string;\n  /**\n   * The `default` keyword specifies a default value. This value is not used to fill in missing values during the validation process. Non-validation tools such as documentation generators or form generators may use this value to give hints to users about how to use a value. However, `default` is typically used to express that if a value is missing, then the value is semantically the same as if the value was present with the default value. The value of `default` should validate against the schema in which it resides, but that isn't required.\n   */\n  default?: unknown;\n  /**\n   * The `title` and `description` keywords must be strings. A \"title\" will preferably be short, whereas a \"description\" will provide a more lengthy explanation about the purpose of the data described by the schema.\n   */\n  description?: string;\n  /**\n   * The `enum` {@link https://json-schema.org/learn/glossary#keyword keyword} is used to restrict a value to a fixed set of values. It must be an array with at least one element, where each element is unique.\n   *\n   * You can use `enum` even without a type, to accept values of different types.\n   */\n  enum?: ReadonlyArray<unknown>;\n  /**\n   * Ranges of numbers are specified using a combination of the `minimum` and `maximum` keywords, (or `exclusiveMinimum` and `exclusiveMaximum` for expressing exclusive range).\n   *\n   * If _x_ is the value being validated, the following must hold true:\n   *\n   * ```\n   * x ≥ minimum\n   * x > exclusiveMinimum\n   * x ≤ maximum\n   * x < exclusiveMaximum\n   * ```\n   *\n   * While you can specify both of `minimum` and `exclusiveMinimum` or both of `maximum` and `exclusiveMaximum`, it doesn't really make sense to do so.\n   */\n  exclusiveMaximum?: boolean;\n  /**\n   * Ranges of numbers are specified using a combination of the `minimum` and `maximum` keywords, (or `exclusiveMinimum` and `exclusiveMaximum` for expressing exclusive range).\n   *\n   * If _x_ is the value being validated, the following must hold true:\n   *\n   * ```\n   * x ≥ minimum\n   * x > exclusiveMinimum\n   * x ≤ maximum\n   * x < exclusiveMaximum\n   * ```\n   *\n   * While you can specify both of `minimum` and `exclusiveMinimum` or both of `maximum` and `exclusiveMaximum`, it doesn't really make sense to do so.\n   */\n  exclusiveMinimum?: boolean;\n  /**\n   * The `format` keyword allows for basic semantic identification of certain kinds of string values that are commonly used. For example, because JSON doesn't have a \"DateTime\" type, dates need to be encoded as strings. `format` allows the schema author to indicate that the string value should be interpreted as a date. By default, `format` is just an annotation and does not effect validation.\n   *\n   * Optionally, validator {@link https://json-schema.org/learn/glossary#implementation implementations} can provide a configuration option to enable `format` to function as an assertion rather than just an annotation. That means that validation will fail if, for example, a value with a `date` format isn't in a form that can be parsed as a date. This can allow values to be constrained beyond what the other tools in JSON Schema, including {@link https://json-schema.org/understanding-json-schema/reference/regular_expressions Regular Expressions} can do.\n   *\n   * There is a bias toward networking-related formats in the JSON Schema specification, most likely due to its heritage in web technologies. However, custom formats may also be used, as long as the parties exchanging the JSON documents also exchange information about the custom format types. A JSON Schema validator will ignore any format type that it does not understand.\n   */\n  format?: JsonSchemaFormats;\n  /**\n   * The length of the array can be specified using the `minItems` and `maxItems` keywords. The value of each keyword must be a non-negative number. These keywords work whether doing {@link https://json-schema.org/understanding-json-schema/reference/array#items list validation} or {@link https://json-schema.org/understanding-json-schema/reference/array#tupleValidation tuple-validation}.\n   */\n  maxItems?: number;\n  /**\n   * The length of a string can be constrained using the `minLength` and `maxLength` {@link https://json-schema.org/learn/glossary#keyword keywords}. For both keywords, the value must be a non-negative number.\n   */\n  maxLength?: number;\n  /**\n   * The number of properties on an object can be restricted using the `minProperties` and `maxProperties` keywords. Each of these must be a non-negative integer.\n   */\n  maxProperties?: number;\n  /**\n   * Ranges of numbers are specified using a combination of the `minimum` and `maximum` keywords, (or `exclusiveMinimum` and `exclusiveMaximum` for expressing exclusive range).\n   *\n   * If _x_ is the value being validated, the following must hold true:\n   *\n   * ```\n   * x ≥ minimum\n   * x > exclusiveMinimum\n   * x ≤ maximum\n   * x < exclusiveMaximum\n   * ```\n   *\n   * While you can specify both of `minimum` and `exclusiveMinimum` or both of `maximum` and `exclusiveMaximum`, it doesn't really make sense to do so.\n   */\n  maximum?: number;\n  /**\n   * The length of the array can be specified using the `minItems` and `maxItems` keywords. The value of each keyword must be a non-negative number. These keywords work whether doing {@link https://json-schema.org/understanding-json-schema/reference/array#items list validation} or {@link https://json-schema.org/understanding-json-schema/reference/array#tupleValidation tuple-validation}.\n   */\n  minItems?: number;\n  /**\n   * The length of a string can be constrained using the `minLength` and `maxLength` {@link https://json-schema.org/learn/glossary#keyword keywords}. For both keywords, the value must be a non-negative number.\n   */\n  minLength?: number;\n  /**\n   * The number of properties on an object can be restricted using the `minProperties` and `maxProperties` keywords. Each of these must be a non-negative integer.\n   */\n  minProperties?: number;\n  /**\n   * Ranges of numbers are specified using a combination of the `minimum` and `maximum` keywords, (or `exclusiveMinimum` and `exclusiveMaximum` for expressing exclusive range).\n   *\n   * If _x_ is the value being validated, the following must hold true:\n   *\n   * ```\n   * x ≥ minimum\n   * x > exclusiveMinimum\n   * x ≤ maximum\n   * x < exclusiveMaximum\n   * ```\n   *\n   * While you can specify both of `minimum` and `exclusiveMinimum` or both of `maximum` and `exclusiveMaximum`, it doesn't really make sense to do so.\n   */\n  minimum?: number;\n  /**\n   * Numbers can be restricted to a multiple of a given number, using the `multipleOf` keyword. It may be set to any positive number. The multiple can be a floating point number.\n   */\n  multipleOf?: number;\n  /**\n   * The `pattern` keyword is used to restrict a string to a particular regular expression. The regular expression syntax is the one defined in JavaScript ({@link https://www.ecma-international.org/publications-and-standards/standards/ecma-262/ ECMA 262} specifically) with Unicode support. See {@link https://json-schema.org/understanding-json-schema/reference/regular_expressions Regular Expressions} for more information.\n   */\n  pattern?: string;\n  /**\n   * By default, the properties defined by the `properties` keyword are not required. However, one can provide a list of required properties using the `required` keyword.\n   *\n   * The `required` keyword takes an array of zero or more strings. Each of these strings must be unique.\n   */\n  required?: ReadonlyArray<string>;\n  /**\n   * The `title` and `description` keywords must be strings. A \"title\" will preferably be short, whereas a \"description\" will provide a more lengthy explanation about the purpose of the data described by the schema.\n   */\n  title?: string;\n  /**\n   * Primitive data types in the Swagger Specification are based on the types supported by the {@link https://tools.ietf.org/html/draft-zyp-json-schema-04#section-3.5 JSON-Schema Draft 4}. Models are described using the {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/2.0.md#schema-object Schema Object} which is a subset of JSON Schema Draft 4.\n   */\n  type?: JsonSchemaTypes;\n  /**\n   * A schema can ensure that each of the items in an array is unique. Simply set the `uniqueItems` keyword to `true`.\n   */\n  uniqueItems?: boolean;\n}\n\ntype JsonSchemaFormats = 'date-time' | 'email' | 'hostname' | 'ipv4' | 'ipv6' | 'uri' | AnyString;\n\ntype JsonSchemaTypes = 'array' | 'boolean' | 'integer' | 'number' | 'object' | 'string';\n"
  },
  {
    "path": "packages/shared/src/openApi/2.0.x/types/openapi-spec-extensions.ts",
    "content": "export interface OpenApiV2_0_X_Nullable_Extensions {\n  /**\n   * OpenAPI 2.0 does not natively support null as a type, but you can use\n   * `x-nullable` to polyfill this functionality.\n   */\n  'x-nullable'?: boolean;\n}\n"
  },
  {
    "path": "packages/shared/src/openApi/2.0.x/types/spec.ts",
    "content": "import type { CodeSampleObject, EnumExtensions } from '../../../openApi/shared/types';\nimport type { JsonSchemaDraft4 } from './json-schema-draft-4';\nimport type { OpenApiV2_0_X_Nullable_Extensions } from './openapi-spec-extensions';\n\n/**\n * This is the root document object for the API specification. It combines what previously was the Resource Listing and API Declaration (version 1.2 and earlier) together into one document.\n */\nexport interface OpenApiV2_0_X {\n  /**\n   * Allows extensions to the Swagger Schema. The field name MUST begin with `x-`, for example, `x-internal-id`. The value can be `null`, a primitive, an array or an object. See {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/2.0.md#specification-extensions Vendor Extensions} for further details.\n   */\n  [name: `x-${string}`]: unknown;\n  /**\n   * The base path on which the API is served, which is relative to the {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/2.0.md#swaggerHost `host`}. If it is not included, the API is served directly under the `host`. The value MUST start with a leading slash (`/`). The `basePath` does not support {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/2.0.md#path-templating path templating}.\n   */\n  basePath?: string;\n  /**\n   * A list of MIME types the APIs can consume. This is global to all APIs but can be overridden on specific API calls. Value MUST be as described under {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/2.0.md#mime-types Mime Types}.\n   */\n  consumes?: ReadonlyArray<string>;\n  /**\n   * An object to hold data types produced and consumed by operations.\n   */\n  definitions?: DefinitionsObject;\n  /**\n   * Additional external documentation.\n   */\n  externalDocs?: ExternalDocumentationObject;\n  /**\n   * The host (name or ip) serving the API. This MUST be the host only and does not include the scheme nor sub-paths. It MAY include a port. If the `host` is not included, the host serving the documentation is to be used (including the port). The `host` does not support {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/2.0.md#path-templating path templating}.\n   */\n  host?: string;\n  /**\n   * **Required**. Provides metadata about the API. The metadata can be used by the clients if needed.\n   */\n  info: InfoObject;\n  /**\n   * An object to hold parameters that can be used across operations. This property _does not_ define global parameters for all operations.\n   */\n  parameters?: ParametersDefinitionsObject;\n  /**\n   * **Required**. The available paths and operations for the API.\n   */\n  paths: PathsObject;\n  /**\n   * A list of MIME types the APIs can produce. This is global to all APIs but can be overridden on specific API calls. Value MUST be as described under {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/2.0.md#mime-types Mime Types}.\n   */\n  produces?: ReadonlyArray<string>;\n  /**\n   * An object to hold responses that can be used across operations. This property _does not_ define global responses for all operations.\n   */\n  responses?: ResponsesDefinitionsObject;\n  /**\n   * The transfer protocol of the API. Values MUST be from the list: `\"http\"`, `\"https\"`, `\"ws\"`, `\"wss\"`. If the `schemes` is not included, the default scheme to be used is the one used to access the Swagger definition itself.\n   */\n  schemes?: ReadonlyArray<'http' | 'https' | 'ws' | 'wss'>;\n  /**\n   * A declaration of which security schemes are applied for the API as a whole. The list of values describes alternative security schemes that can be used (that is, there is a logical OR between the security requirements). Individual operations can override this definition.\n   */\n  security?: ReadonlyArray<SecurityRequirementObject>;\n  /**\n   * Security scheme definitions that can be used across the specification.\n   */\n  securityDefinitions?: SecurityDefinitionsObject;\n  /**\n   * **Required**. Specifies the Swagger Specification version being used. It can be used by the Swagger UI and other clients to interpret the API listing. The value MUST be `\"2.0\"`.\n   */\n  swagger: string;\n  /**\n   * A list of tags used by the specification with additional metadata. The order of the tags can be used to reflect on their order by the parsing tools. Not all tags that are used by the {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/2.0.md#operation-object Operation Object} must be declared. The tags that are not declared may be organized randomly or based on the tools' logic. Each tag name in the list MUST be unique.\n   */\n  tags?: ReadonlyArray<TagObject>;\n}\n\n/**\n * Contact information for the exposed API.\n *\n * @example\n * ```yaml\n * name: API Support\n * url: http://www.swagger.io/support\n * email: support@swagger.io\n * ```\n */\nexport interface ContactObject {\n  /**\n   * Allows extensions to the Swagger Schema. The field name MUST begin with `x-`, for example, `x-internal-id`. The value can be `null`, a primitive, an array or an object. See {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/2.0.md#specification-extensions Vendor Extensions} for further details.\n   */\n  [name: `x-${string}`]: unknown;\n  /**\n   * The email address of the contact person/organization. MUST be in the format of an email address.\n   */\n  email?: string;\n  /**\n   * The identifying name of the contact person/organization.\n   */\n  name?: string;\n  /**\n   * The URL pointing to the contact information. MUST be in the format of a URL.\n   */\n  url?: string;\n}\n\n/**\n * An object to hold data types that can be consumed and produced by operations. These data types can be primitives, arrays or models.\n *\n * **Definitions Object Example**\n *\n * @example\n * ```yaml\n * Category:\n *   type: object\n *   properties:\n *     id:\n *       type: integer\n *       format: int64\n *     name:\n *       type: string\n * Tag:\n *   type: object\n *   properties:\n *     id:\n *       type: integer\n *       format: int64\n *     name:\n *       type: string\n * ```\n */\nexport interface DefinitionsObject {\n  /**\n   * A single definition, mapping a \"name\" to the schema it defines.\n   */\n  [name: string]: SchemaObject;\n}\n\n/**\n * Allows sharing examples for operation responses.\n *\n * **Example Object Example**\n *\n * Example response for application/json mimetype of a Pet data type:\n *\n * @example\n * ```yaml\n * application/json:\n *   name: Puma\n *   type: Dog\n *   color: Black\n *   gender: Female\n *   breed: Mixed\n * ```\n */\nexport interface ExampleObject {\n  /**\n   * The name of the property MUST be one of the Operation `produces` values (either implicit or inherited). The value SHOULD be an example of what such a response would look like.\n   */\n  [mimeType: string]: unknown;\n}\n\n/**\n * Allows referencing an external resource for extended documentation.\n *\n * @example\n * ```yaml\n * description: Find more info here\n * url: https://swagger.io\n * ```\n */\nexport interface ExternalDocumentationObject {\n  /**\n   * Allows extensions to the Swagger Schema. The field name MUST begin with `x-`, for example, `x-internal-id`. The value can be `null`, a primitive, an array or an object. See {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/2.0.md#specification-extensions Vendor Extensions} for further details.\n   */\n  [name: `x-${string}`]: unknown;\n  /**\n   * A short description of the target documentation. {@link https://guides.github.com/features/mastering-markdown/#GitHub-flavored-markdown GFM syntax} can be used for rich text representation.\n   */\n  description?: string;\n  /**\n   * **Required**. The URL for the target documentation. Value MUST be in the format of a URL.\n   */\n  url: string;\n}\n\n/**\n * **Header Object Example**\n *\n * A simple header with of an integer type:\n *\n * @example\n * ```yaml\n * description: The number of allowed requests in the current period\n * type: integer\n * ```\n */\nexport interface HeaderObject extends EnumExtensions, OpenApiV2_0_X_Nullable_Extensions {\n  /**\n   * Allows extensions to the Swagger Schema. The field name MUST begin with `x-`, for example, `x-internal-id`. The value can be `null`, a primitive, an array or an object. See {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/2.0.md#specification-extensions Vendor Extensions} for further details.\n   */\n  [name: `x-${string}`]: unknown;\n  /**\n   * Determines the format of the array if type array is used. Possible values are:\n   *\n   * - `csv` - comma separated values `foo,bar`.\n   * - `ssv` - space separated values `foo bar`.\n   * - `tsv` - tab separated values `foo\\tbar`.\n   * - `pipes` - pipe separated values `foo|bar`.\n   *\n   * Default value is `csv`.\n   */\n  collectionFormat?: 'csv' | 'pipes' | 'ssv' | 'tsv';\n  /**\n   * Declares the value of the item that the server will use if none is provided. (Note: \"default\" has no meaning for required items.) See {@link https://tools.ietf.org/html/draft-fge-json-schema-validation-00#section-6.2 https://tools.ietf.org/html/draft-fge-json-schema-validation-00#section-6.2}. Unlike JSON Schema this value MUST conform to the defined {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/2.0.md#itemsType `type`} for the data type.\n   */\n  default?: unknown;\n  /**\n   * A short description of the header.\n   */\n  description?: string;\n  /**\n   * See {@link https://tools.ietf.org/html/draft-fge-json-schema-validation-00#section-5.5.1 https://tools.ietf.org/html/draft-fge-json-schema-validation-00#section-5.5.1}.\n   */\n  enum?: ReadonlyArray<unknown>;\n  /**\n   * See {@link https://tools.ietf.org/html/draft-fge-json-schema-validation-00#section-5.1.2 https://tools.ietf.org/html/draft-fge-json-schema-validation-00#section-5.1.2}.\n   */\n  exclusiveMaximum?: boolean;\n  /**\n   * See {@link https://tools.ietf.org/html/draft-fge-json-schema-validation-00#section-5.1.3 https://tools.ietf.org/html/draft-fge-json-schema-validation-00#section-5.1.3}.\n   */\n  exclusiveMinimum?: boolean;\n  /**\n   * The extending format for the previously mentioned {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/2.0.md#stType `type`}. See {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/2.0.md#dataTypeFormat Data Type Formats} for further details.\n   */\n  format?: string;\n  /**\n   * **Required if {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/2.0.md#parameterType `type`} is \"array\"**. Describes the type of items in the array.\n   */\n  items?: ItemsObject;\n  /**\n   * See {@link https://tools.ietf.org/html/draft-fge-json-schema-validation-00#section-5.3.2 https://tools.ietf.org/html/draft-fge-json-schema-validation-00#section-5.3.2}.\n   */\n  maxItems?: number;\n  /**\n   * See {@link https://tools.ietf.org/html/draft-fge-json-schema-validation-00#section-5.2.1 https://tools.ietf.org/html/draft-fge-json-schema-validation-00#section-5.2.1}.\n   */\n  maxLength?: number;\n  /**\n   * See {@link https://tools.ietf.org/html/draft-fge-json-schema-validation-00#section-5.1.2 https://tools.ietf.org/html/draft-fge-json-schema-validation-00#section-5.1.2}.\n   */\n  maximum?: number;\n  /**\n   * See {@link https://tools.ietf.org/html/draft-fge-json-schema-validation-00#section-5.3.3 https://tools.ietf.org/html/draft-fge-json-schema-validation-00#section-5.3.3}.\n   */\n  minItems?: number;\n  /**\n   * See {@link https://tools.ietf.org/html/draft-fge-json-schema-validation-00#section-5.2.2 https://tools.ietf.org/html/draft-fge-json-schema-validation-00#section-5.2.2}.\n   */\n  minLength?: number;\n  /**\n   * See {@link https://tools.ietf.org/html/draft-fge-json-schema-validation-00#section-5.1.3 https://tools.ietf.org/html/draft-fge-json-schema-validation-00#section-5.1.3}.\n   */\n  minimum?: number;\n  /**\n   * See {@link https://tools.ietf.org/html/draft-fge-json-schema-validation-00#section-5.1.1 https://tools.ietf.org/html/draft-fge-json-schema-validation-00#section-5.1.1}.\n   */\n  multipleOf?: number;\n  /**\n   * See {@link https://tools.ietf.org/html/draft-fge-json-schema-validation-00#section-5.2.3 https://tools.ietf.org/html/draft-fge-json-schema-validation-00#section-5.2.3}.\n   */\n  pattern?: string;\n  /**\n   * Required. The type of the object. The value MUST be one of `\"string\"`, `\"number\"`, `\"integer\"`, `\"boolean\"`, or `\"array\"`.\n   */\n  type: 'array' | 'boolean' | 'integer' | 'number' | 'string';\n  /**\n   * See {@link https://tools.ietf.org/html/draft-fge-json-schema-validation-00#section-5.3.4 https://tools.ietf.org/html/draft-fge-json-schema-validation-00#section-5.3.4}.\n   */\n  uniqueItems?: boolean;\n}\n\n/**\n * Lists the headers that can be sent as part of a response.\n *\n * **Headers Object Example**\n *\n * Rate-limit headers:\n *\n * @example\n * ```yaml\n * X-Rate-Limit-Limit:\n *   description: The number of allowed requests in the current period\n *   type: integer\n * X-Rate-Limit-Remaining:\n *   description: The number of remaining requests in the current period\n *   type: integer\n * X-Rate-Limit-Reset:\n *   description: The number of seconds left in the current period\n *   type: integer\n * ```\n */\nexport interface HeadersObject {\n  /**\n   * The name of the property corresponds to the name of the header. The value describes the type of the header.\n   */\n  [name: string]: HeaderObject;\n}\n\n/**\n * The object provides metadata about the API. The metadata can be used by the clients if needed, and can be presented in the Swagger-UI for convenience.\n *\n * @example\n * ```yaml\n * title: Swagger Sample App\n * description: This is a sample server Petstore server.\n * termsOfService: http://swagger.io/terms/\n * contact:\n *   name: API Support\n *   url: http://www.swagger.io/support\n *   email: support@swagger.io\n * license:\n *   name: Apache 2.0\n *   url: http://www.apache.org/licenses/LICENSE-2.0.html\n * version: 1.0.1\n * ```\n */\nexport interface InfoObject {\n  /**\n   * Allows extensions to the Swagger Schema. The field name MUST begin with `x-`, for example, `x-internal-id`. The value can be `null`, a primitive, an array or an object. See {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/2.0.md#specification-extensions Vendor Extensions} for further details.\n   */\n  [name: `x-${string}`]: unknown;\n  /**\n   * The contact information for the exposed API.\n   */\n  contact?: ContactObject;\n  /**\n   * A short description of the application. {@link https://guides.github.com/features/mastering-markdown/#GitHub-flavored-markdown GFM syntax} can be used for rich text representation.\n   */\n  description?: string;\n  /**\n   * The license information for the exposed API.\n   */\n  license?: LicenseObject;\n  /**\n   * The Terms of Service for the API.\n   */\n  termsOfService?: string;\n  /**\n   * **Required**. The title of the application.\n   */\n  title: string;\n  /**\n   * **Required** Provides the version of the application API (not to be confused with the specification version).\n   */\n  version: string;\n}\n\n/**\n * A limited subset of JSON-Schema's items object. It is used by parameter definitions that are not located {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/2.0.md#parameterIn `in`} `\"body\"`.\n *\n * **Items Object Examples**\n *\n * Items must be of type string and have the minimum length of 2 characters:\n *\n * @example\n * ```yaml\n * type: string\n * minLength: 2\n * ```\n *\n * An array of arrays, the internal array being of type integer, numbers must be between 0 and 63 (inclusive):\n *\n * @example\n * ```yaml\n * type: array\n * items:\n *   type: integer\n *   minimum: 0\n *   maximum: 63\n * ```\n */\nexport interface ItemsObject extends EnumExtensions, OpenApiV2_0_X_Nullable_Extensions {\n  /**\n   * Allows extensions to the Swagger Schema. The field name MUST begin with `x-`, for example, `x-internal-id`. The value can be `null`, a primitive, an array or an object. See {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/2.0.md#specification-extensions Vendor Extensions} for further details.\n   */\n  [name: `x-${string}`]: unknown;\n  /**\n   * Determines the format of the array if type array is used. Possible values are:\n   *\n   * - `csv` - comma separated values `foo,bar`.\n   * - `ssv` - space separated values `foo bar`.\n   * - `tsv` - tab separated values `foo\\tbar`.\n   * - `pipes` - pipe separated values `foo|bar`.\n   *\n   * Default value is `csv`.\n   */\n  collectionFormat?: 'csv' | 'pipes' | 'ssv' | 'tsv';\n  /**\n   * Declares the value of the item that the server will use if none is provided. (Note: \"default\" has no meaning for required items.) See {@link https://tools.ietf.org/html/draft-fge-json-schema-validation-00#section-6.2 https://tools.ietf.org/html/draft-fge-json-schema-validation-00#section-6.2}. Unlike JSON Schema this value MUST conform to the defined {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/2.0.md#itemsType `type`} for the data type.\n   */\n  default?: unknown;\n  /**\n   * See {@link https://tools.ietf.org/html/draft-fge-json-schema-validation-00#section-5.5.1 https://tools.ietf.org/html/draft-fge-json-schema-validation-00#section-5.5.1}.\n   */\n  enum?: ReadonlyArray<unknown>;\n  /**\n   * See {@link https://tools.ietf.org/html/draft-fge-json-schema-validation-00#section-5.1.2 https://tools.ietf.org/html/draft-fge-json-schema-validation-00#section-5.1.2}.\n   */\n  exclusiveMaximum?: boolean;\n  /**\n   * See {@link https://tools.ietf.org/html/draft-fge-json-schema-validation-00#section-5.1.3 https://tools.ietf.org/html/draft-fge-json-schema-validation-00#section-5.1.3}.\n   */\n  exclusiveMinimum?: boolean;\n  /**\n   * The extending format for the previously mentioned {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/2.0.md#parameterType `type`}. See {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/2.0.md#dataTypeFormat Data Type Formats} for further details.\n   */\n  format?: string;\n  /**\n   * **Required if {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/2.0.md#parameterType `type`} is \"array\"**. Describes the type of items in the array.\n   */\n  items?: ItemsObject;\n  /**\n   * See {@link https://tools.ietf.org/html/draft-fge-json-schema-validation-00#section-5.3.2 https://tools.ietf.org/html/draft-fge-json-schema-validation-00#section-5.3.2}.\n   */\n  maxItems?: number;\n  /**\n   * See {@link https://tools.ietf.org/html/draft-fge-json-schema-validation-00#section-5.2.1 https://tools.ietf.org/html/draft-fge-json-schema-validation-00#section-5.2.1}.\n   */\n  maxLength?: number;\n  /**\n   * See {@link https://tools.ietf.org/html/draft-fge-json-schema-validation-00#section-5.1.2 https://tools.ietf.org/html/draft-fge-json-schema-validation-00#section-5.1.2}.\n   */\n  maximum?: number;\n  /**\n   * See {@link https://tools.ietf.org/html/draft-fge-json-schema-validation-00#section-5.3.3 https://tools.ietf.org/html/draft-fge-json-schema-validation-00#section-5.3.3}.\n   */\n  minItems?: number;\n  /**\n   * See {@link https://tools.ietf.org/html/draft-fge-json-schema-validation-00#section-5.2.2 https://tools.ietf.org/html/draft-fge-json-schema-validation-00#section-5.2.2}.\n   */\n  minLength?: number;\n  /**\n   * See {@link https://tools.ietf.org/html/draft-fge-json-schema-validation-00#section-5.1.3 https://tools.ietf.org/html/draft-fge-json-schema-validation-00#section-5.1.3}.\n   */\n  minimum?: number;\n  /**\n   * See {@link https://tools.ietf.org/html/draft-fge-json-schema-validation-00#section-5.1.1 https://tools.ietf.org/html/draft-fge-json-schema-validation-00#section-5.1.1}.\n   */\n  multipleOf?: number;\n  /**\n   * See {@link https://tools.ietf.org/html/draft-fge-json-schema-validation-00#section-5.2.3 https://tools.ietf.org/html/draft-fge-json-schema-validation-00#section-5.2.3}.\n   */\n  pattern?: string;\n  /**\n   * **Required**. The internal type of the array. The value MUST be one of `\"string\"`, `\"number\"`, `\"integer\"`, `\"boolean\"`, or `\"array\"`. Files and models are not allowed.\n   */\n  type: 'array' | 'boolean' | 'integer' | 'number' | 'string';\n  /**\n   * See {@link https://tools.ietf.org/html/draft-fge-json-schema-validation-00#section-5.3.4 https://tools.ietf.org/html/draft-fge-json-schema-validation-00#section-5.3.4}.\n   */\n  uniqueItems?: boolean;\n}\n\n/**\n * License information for the exposed API.\n *\n * @example\n * ```yaml\n * name: Apache 2.0\n * url: http://www.apache.org/licenses/LICENSE-2.0.html\n * ```\n */\nexport interface LicenseObject {\n  /**\n   * Allows extensions to the Swagger Schema. The field name MUST begin with `x-`, for example, `x-internal-id`. The value can be `null`, a primitive, an array or an object. See {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/2.0.md#specification-extensions Vendor Extensions} for further details.\n   */\n  [name: `x-${string}`]: unknown;\n  /**\n   * **Required**. The license name used for the API.\n   */\n  name: string;\n  /**\n   * A URL to the license used for the API. MUST be in the format of a URL.\n   */\n  url?: string;\n}\n\n/**\n * Describes a single API operation on a path.\n *\n * @example\n * ```yaml\n * tags:\n * - pet\n * summary: Updates a pet in the store with form data\n * description: \"\"\n * operationId: updatePetWithForm\n * consumes:\n * - application/x-www-form-urlencoded\n * produces:\n * - application/json\n * - application/xml\n * parameters:\n * - name: petId\n *   in: path\n *   description: ID of pet that needs to be updated\n *   required: true\n *   type: string\n * - name: name\n *   in: formData\n *   description: Updated name of the pet\n *   required: false\n *   type: string\n * - name: status\n *   in: formData\n *   description: Updated status of the pet\n *   required: false\n *   type: string\n * responses:\n *   '200':\n *     description: Pet updated.\n *   '405':\n *     description: Invalid input\n * security:\n * - petstore_auth:\n *   - write:pets\n *   - read:pets\n * ```\n */\nexport interface OperationObject {\n  /**\n   * Allows extensions to the Swagger Schema. The field name MUST begin with `x-`, for example, `x-internal-id`. The value can be `null`, a primitive, an array or an object. See {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/2.0.md#specification-extensions Vendor Extensions} for further details.\n   */\n  [name: `x-${string}`]: unknown;\n  /**\n   * A list of MIME types the operation can consume. This overrides the {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/2.0.md#swaggerConsumes `consumes`} definition at the Swagger Object. An empty value MAY be used to clear the global definition. Value MUST be as described under {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/2.0.md#mime-types Mime Types}.\n   */\n  consumes?: ReadonlyArray<string>;\n  /**\n   * Declares this operation to be deprecated. Usage of the declared operation should be refrained. Default value is `false`.\n   */\n  deprecated?: boolean;\n  /**\n   * A verbose explanation of the operation behavior. {@link https://guides.github.com/features/mastering-markdown/#GitHub-flavored-markdown GFM syntax} can be used for rich text representation.\n   */\n  description?: string;\n  /**\n   * Additional external documentation for this operation.\n   */\n  externalDocs?: ExternalDocumentationObject;\n  /**\n   * Unique string used to identify the operation. The id MUST be unique among all operations described in the API. Tools and libraries MAY use the operationId to uniquely identify an operation, therefore, it is recommended to follow common programming naming conventions.\n   */\n  operationId?: string;\n  /**\n   * A list of parameters that are applicable for this operation. If a parameter is already defined at the {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/2.0.md#pathItemParameters Path Item}, the new definition will override it, but can never remove it. The list MUST NOT include duplicated parameters. A unique parameter is defined by a combination of a {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/2.0.md#parameterName name} and {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/2.0.md#parameterIn location}. The list can use the {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/2.0.md#reference-object Reference Object} to link to parameters that are defined at the {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/2.0.md#swaggerParameters Swagger Object's parameters}. There can be one \"body\" parameter at most.\n   */\n  parameters?: ReadonlyArray<ParameterObject | ReferenceObject>;\n  /**\n   * A list of MIME types the operation can produce. This overrides the {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/2.0.md#swaggerProduces `produces`} definition at the Swagger Object. An empty value MAY be used to clear the global definition. Value MUST be as described under {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/2.0.md#mime-types Mime Types}.\n   */\n  produces?: ReadonlyArray<string>;\n  /**\n   * **Required**. The list of possible responses as they are returned from executing this operation.\n   */\n  responses: ResponsesObject;\n  /**\n   * The transfer protocol for the operation. Values MUST be from the list: `\"http\"`, `\"https\"`, `\"ws\"`, `\"wss\"`. The value overrides the Swagger Object {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/2.0.md#swaggerSchemes `schemes`} definition.\n   */\n  schemes?: ReadonlyArray<'http' | 'https' | 'ws' | 'wss'>;\n  /**\n   * A declaration of which security schemes are applied for this operation. The list of values describes alternative security schemes that can be used (that is, there is a logical OR between the security requirements). This definition overrides any declared top-level {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/2.0.md#swaggerSecurity `security`}. To remove a top-level security declaration, an empty array can be used.\n   */\n  security?: ReadonlyArray<SecurityRequirementObject>;\n  /**\n   * A short summary of what the operation does. For maximum readability in the swagger-ui, this field SHOULD be less than 120 characters.\n   */\n  summary?: string;\n  /**\n   * A list of tags for API documentation control. Tags can be used for logical grouping of operations by resources or any other qualifier.\n   */\n  tags?: ReadonlyArray<string>;\n  /**\n   * A list of code samples associated with an operation.\n   */\n  'x-codeSamples'?: ReadonlyArray<CodeSampleObject>;\n}\n\n/**\n * Describes a single operation parameter.\n *\n * A unique parameter is defined by a combination of a {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/2.0.md#parameterName name} and {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/2.0.md#parameterIn location}.\n *\n * There are five possible parameter types.\n *\n * - Path - Used together with {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/2.0.md#path-templating Path Templating}, where the parameter value is actually part of the operation's URL. This does not include the host or base path of the API. For example, in `/items/{itemId}`, the path parameter is `itemId`.\n * - Query - Parameters that are appended to the URL. For example, in `/items?id=###`, the query parameter is `id`.\n * - Header - Custom headers that are expected as part of the request.\n * - Body - The payload that's appended to the HTTP request. Since there can only be one payload, there can only be _one_ body parameter. The name of the body parameter has no effect on the parameter itself and is used for documentation purposes only. Since Form parameters are also in the payload, body and form parameters cannot exist together for the same operation.\n * - Form - Used to describe the payload of an HTTP request when either `application/x-www-form-urlencoded`, `multipart/form-data` or both are used as the content type of the request (in Swagger's definition, the {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/2.0.md#operationConsumes `consumes`} property of an operation). This is the only parameter type that can be used to send files, thus supporting the `file` type. Since form parameters are sent in the payload, they cannot be declared together with a body parameter for the same operation. Form parameters have a different format based on the content-type used (for further details, consult {@link http://www.w3.org/TR/html401/interact/forms.html#h-17.13.4 http://www.w3.org/TR/html401/interact/forms.html#h-17.13.4}):\n *   - `application/x-www-form-urlencoded` - Similar to the format of Query parameters but as a payload. For example, `foo=1&bar=swagger` - both `foo` and `bar` are form parameters. This is normally used for simple parameters that are being transferred.\n *   - `multipart/form-data` - each parameter takes a section in the payload with an internal header. For example, for the header `Content-Disposition: form-data; name=\"submit-name\"` the name of the parameter is `submit-name`. This type of form parameters is more commonly used for file transfers.\n *\n * **Parameter Object Examples**\n *\n * Body Parameters\n *\n * A body parameter with a referenced schema definition (normally for a model definition):\n *\n * @example\n * ```yaml\n * name: user\n * in: body\n * description: user to add to the system\n * required: true\n * schema:\n *   $ref: '#/definitions/User'\n * ```\n *\n * A body parameter that is an array of string values:\n *\n * @example\n * ```yaml\n * name: user\n * in: body\n * description: user to add to the system\n * required: true\n * schema:\n *   type: array\n *   items:\n *     type: string\n * ```\n *\n * Other Parameters\n *\n * A header parameter with an array of 64 bit integer numbers:\n *\n * @example\n * ```yaml\n * name: token\n * in: header\n * description: token to be passed as a header\n * required: true\n * type: array\n * items:\n *   type: integer\n *   format: int64\n * collectionFormat: csv\n * ```\n *\n * A path parameter of a string value:\n *\n * @example\n * ```yaml\n * name: username\n * in: path\n * description: username to fetch\n * required: true\n * type: string\n * ```\n *\n * An optional query parameter of a string value, allowing multiple values by repeating the query parameter:\n *\n * @example\n * ```yaml\n * name: id\n * in: query\n * description: ID of the object to fetch\n * required: false\n * type: array\n * items:\n *   type: string\n * collectionFormat: multi\n * ```\n *\n * A form data with file type for a file upload:\n *\n * @example\n * ```yaml\n * name: avatar\n * in: formData\n * description: The avatar of the user\n * required: true\n * type: file\n * ```\n */\nexport type ParameterObject = EnumExtensions &\n  OpenApiV2_0_X_Nullable_Extensions & {\n    /**\n     * Allows extensions to the Swagger Schema. The field name MUST begin with `x-`, for example, `x-internal-id`. The value can be `null`, a primitive, an array or an object. See {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/2.0.md#specification-extensions Vendor Extensions} for further details.\n     */\n    [name: `x-${string}`]: unknown;\n    /**\n     * A brief description of the parameter. This could contain examples of use. {@link https://guides.github.com/features/mastering-markdown/#GitHub-flavored-markdown GFM syntax} can be used for rich text representation.\n     */\n    description?: string;\n    /**\n     * **Required**. The name of the parameter. Parameter names are _case sensitive_.\n     *\n     * - If {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/2.0.md#parameterIn `in`} is `\"path\"`, the `name` field MUST correspond to the associated path segment from the {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/2.0.md#pathsPath path} field in the {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/2.0.md#paths-object Paths Object}. See {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/2.0.md#path-templating Path Templating} for further information.\n     * - For all other cases, the `name` corresponds to the parameter name used based on the {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/2.0.md#parameterIn `in`} property.\n     */\n    name: string;\n    /**\n     * Determines whether this parameter is mandatory. If the parameter is {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/2.0.md#parameterIn `in`} \"path\", this property is **required** and its value MUST be `true`. Otherwise, the property MAY be included and its default value is `false`.\n     */\n    required?: boolean;\n  } & (\n    | {\n        /**\n         * **Required**. The location of the parameter. Possible values are \"query\", \"header\", \"path\", \"formData\" or \"body\".\n         */\n        in: 'body';\n        /**\n         * **Required**. The schema defining the type used for the body parameter.\n         */\n        schema: SchemaObject;\n      }\n    | {\n        /**\n         * Sets the ability to pass empty-valued parameters. This is valid only for either `query` or `formData` parameters and allows you to send a parameter with a name only or an empty value. Default value is `false`.\n         */\n        allowEmptyValue?: boolean;\n        /**\n         * Determines the format of the array if type array is used. Possible values are:\n         *\n         * - `csv` - comma separated values `foo,bar`.\n         * - `ssv` - space separated values `foo bar`.\n         * - `tsv` - tab separated values `foo\\tbar`.\n         * - `pipes` - pipe separated values `foo|bar`.\n         * - `multi` - corresponds to multiple parameter instances instead of multiple values for a single instance `foo=bar&foo=baz`. This is valid only for parameters {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/2.0.md#parameterIn `in`} \"query\" or \"formData\".\n         *\n         * Default value is `csv`.\n         */\n        collectionFormat?: 'csv' | 'multi' | 'pipes' | 'ssv' | 'tsv';\n        /**\n         * Declares the value of the parameter that the server will use if none is provided, for example a \"count\" to control the number of results per page might default to 100 if not supplied by the client in the request. (Note: \"default\" has no meaning for required parameters.) See {@link https://tools.ietf.org/html/draft-fge-json-schema-validation-00#section-6.2 https://tools.ietf.org/html/draft-fge-json-schema-validation-00#section-6.2}. Unlike JSON Schema this value MUST conform to the defined {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/2.0.md#parameterType `type`} for this parameter.\n         */\n        default?: unknown;\n        /**\n         * See {@link https://tools.ietf.org/html/draft-fge-json-schema-validation-00#section-5.5.1 https://tools.ietf.org/html/draft-fge-json-schema-validation-00#section-5.5.1}.\n         */\n        enum?: ReadonlyArray<unknown>;\n        /**\n         * See {@link https://tools.ietf.org/html/draft-fge-json-schema-validation-00#section-5.1.2 https://tools.ietf.org/html/draft-fge-json-schema-validation-00#section-5.1.2}.\n         */\n        exclusiveMaximum?: boolean;\n        /**\n         * See {@link https://tools.ietf.org/html/draft-fge-json-schema-validation-00#section-5.1.3 https://tools.ietf.org/html/draft-fge-json-schema-validation-00#section-5.1.3}.\n         */\n        exclusiveMinimum?: boolean;\n        /**\n         * The extending format for the previously mentioned {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/2.0.md#parameterType `type`}. See {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/2.0.md#dataTypeFormat Data Type Formats} for further details.\n         */\n        format?: string;\n        /**\n         * **Required**. The location of the parameter. Possible values are \"query\", \"header\", \"path\", \"formData\" or \"body\".\n         */\n        in: 'formData' | 'header' | 'path' | 'query';\n        /**\n         * **Required if {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/2.0.md#parameterType `type`} is \"array\"**. Describes the type of items in the array.\n         */\n        items?: ItemsObject;\n        /**\n         * See {@link https://tools.ietf.org/html/draft-fge-json-schema-validation-00#section-5.3.2 https://tools.ietf.org/html/draft-fge-json-schema-validation-00#section-5.3.2}.\n         */\n        maxItems?: number;\n        /**\n         * See {@link https://tools.ietf.org/html/draft-fge-json-schema-validation-00#section-5.2.1 https://tools.ietf.org/html/draft-fge-json-schema-validation-00#section-5.2.1}.\n         */\n        maxLength?: number;\n        /**\n         * See {@link https://tools.ietf.org/html/draft-fge-json-schema-validation-00#section-5.1.2 https://tools.ietf.org/html/draft-fge-json-schema-validation-00#section-5.1.2}.\n         */\n        maximum?: number;\n        /**\n         * See {@link https://tools.ietf.org/html/draft-fge-json-schema-validation-00#section-5.3.3 https://tools.ietf.org/html/draft-fge-json-schema-validation-00#section-5.3.3}.\n         */\n        minItems?: number;\n        /**\n         * See {@link https://tools.ietf.org/html/draft-fge-json-schema-validation-00#section-5.2.2 https://tools.ietf.org/html/draft-fge-json-schema-validation-00#section-5.2.2}.\n         */\n        minLength?: number;\n        /**\n         * See {@link https://tools.ietf.org/html/draft-fge-json-schema-validation-00#section-5.1.3 https://tools.ietf.org/html/draft-fge-json-schema-validation-00#section-5.1.3}.\n         */\n        minimum?: number;\n        /**\n         * See {@link https://tools.ietf.org/html/draft-fge-json-schema-validation-00#section-5.1.1 https://tools.ietf.org/html/draft-fge-json-schema-validation-00#section-5.1.1}.\n         */\n        multipleOf?: number;\n        /**\n         * See {@link https://tools.ietf.org/html/draft-fge-json-schema-validation-00#section-5.2.3 https://tools.ietf.org/html/draft-fge-json-schema-validation-00#section-5.2.3}.\n         */\n        pattern?: string;\n        /**\n         * **Required**. The type of the parameter. Since the parameter is not located at the request body, it is limited to simple types (that is, not an object). The value MUST be one of `\"string\"`, `\"number\"`, `\"integer\"`, `\"boolean\"`, `\"array\"` or `\"file\"`. If `type` is `\"file\"`, the {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/2.0.md#operationConsumes `consumes`} MUST be either `\"multipart/form-data\"`, `\"application/x-www-form-urlencoded\"` or both and the parameter MUST be {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/2.0.md#parameterIn `in`} `\"formData\"`.\n         */\n        type: 'array' | 'boolean' | 'file' | 'integer' | 'number' | 'string';\n        /**\n         * See {@link https://tools.ietf.org/html/draft-fge-json-schema-validation-00#section-5.3.4 https://tools.ietf.org/html/draft-fge-json-schema-validation-00#section-5.3.4}.\n         */\n        uniqueItems?: boolean;\n      }\n  );\n\n/**\n * An object to hold parameters to be reused across operations. Parameter definitions can be referenced to the ones defined here.\n *\n * This does _not_ define global operation parameters.\n *\n * **Parameters Definition Object Example**\n *\n * @example\n * ```yaml\n * skipParam:\n *   name: skip\n *   in: query\n *   description: number of items to skip\n *   required: true\n *   type: integer\n *   format: int32\n * limitParam:\n *   name: limit\n *   in: query\n *   description: max records to return\n *   required: true\n *   type: integer\n *   format: int32\n * ```\n */\nexport interface ParametersDefinitionsObject {\n  /**\n   * A single parameter definition, mapping a \"name\" to the parameter it defines.\n   */\n  [name: string]: ParameterObject;\n}\n\n/**\n * Describes the operations available on a single path. A Path Item may be empty, due to {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/2.0.md#security-filtering ACL constraints}. The path itself is still exposed to the documentation viewer but they will not know which operations and parameters are available.\n *\n * @example\n * ```yaml\n * get:\n *   description: Returns pets based on ID\n *   summary: Find pets by ID\n *   operationId: getPetsById\n *   produces:\n *   - application/json\n *   - text/html\n *   responses:\n *     '200':\n *       description: pet response\n *       schema:\n *         type: array\n *         items:\n *           $ref: '#/definitions/Pet'\n *     default:\n *       description: error payload\n *       schema:\n *         $ref: '#/definitions/ErrorModel'\n * parameters:\n * - name: id\n *   in: path\n *   description: ID of pet to use\n *   required: true\n *   type: array\n *   items:\n *     type: string\n *   collectionFormat: csv\n * ```\n */\nexport interface PathItemObject {\n  /**\n   * Allows extensions to the Swagger Schema. The field name MUST begin with `x-`, for example, `x-internal-id`. The value can be `null`, a primitive, an array or an object. See {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/2.0.md#specification-extensions Vendor Extensions} for further details.\n   */\n  [name: `x-${string}`]: unknown;\n  /**\n   * Allows for an external definition of this path item. The referenced structure MUST be in the format of a {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/2.0.md#path-item-object Path Item Object}. If there are conflicts between the referenced definition and this Path Item's definition, the behavior is _undefined_.\n   */\n  $ref?: string;\n  /**\n   * A definition of a DELETE operation on this path.\n   */\n  delete?: OperationObject;\n  /**\n   * A definition of a GET operation on this path.\n   */\n  get?: OperationObject;\n  /**\n   * A definition of a HEAD operation on this path.\n   */\n  head?: OperationObject;\n  /**\n   * A definition of a OPTIONS operation on this path.\n   */\n  options?: OperationObject;\n  /**\n   * A list of parameters that are applicable for all the operations described under this path. These parameters can be overridden at the operation level, but cannot be removed there. The list MUST NOT include duplicated parameters. A unique parameter is defined by a combination of a {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/2.0.md#parameterName name} and {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/2.0.md#parameterIn location}. The list can use the {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/2.0.md#reference-object Reference Object} to link to parameters that are defined at the {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/2.0.md#swaggerParameters Swagger Object's parameters}. There can be one \"body\" parameter at most.\n   */\n  parameters?: ReadonlyArray<ParameterObject | ReferenceObject>;\n  /**\n   * A definition of a PATCH operation on this path.\n   */\n  patch?: OperationObject;\n  /**\n   * A definition of a POST operation on this path.\n   */\n  post?: OperationObject;\n  /**\n   * A definition of a PUT operation on this path.\n   */\n  put?: OperationObject;\n}\n\n/**\n * Holds the relative paths to the individual endpoints. The path is appended to the {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/2.0.md#swaggerBasePath `basePath`} in order to construct the full URL. The Paths may be empty, due to {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/2.0.md#security-filtering ACL constraints}.\n *\n * @example\n * ```yaml\n * /pets:\n *   get:\n *     description: Returns all pets from the system that the user has access to\n *     produces:\n *     - application/json\n *     responses:\n *       '200':\n *         description: A list of pets.\n *         schema:\n *           type: array\n *           items:\n *             $ref: '#/definitions/pet'\n * ```\n */\nexport interface PathsObject {\n  /**\n   * Allows extensions to the Swagger Schema. The field name MUST begin with `x-`, for example, `x-internal-id`. The value can be `null`, a primitive, an array or an object. See {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/2.0.md#specification-extensions Vendor Extensions} for further details.\n   */\n  [name: `x-${string}`]: unknown;\n  /**\n   * A relative path to an individual endpoint. The field name MUST begin with a slash. The path is appended to the {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/2.0.md#swaggerBasePath `basePath`} in order to construct the full URL. {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/2.0.md#path-templating Path templating} is allowed.\n   */\n  [path: `/${string}`]: PathItemObject;\n}\n\n/**\n * A simple object to allow referencing other definitions in the specification. It can be used to reference parameters and responses that are defined at the top level for reuse.\n *\n * The Reference Object is a {@link http://tools.ietf.org/html/draft-pbryan-zyp-json-ref-02 JSON Reference} that uses a {@link http://tools.ietf.org/html/rfc6901 JSON Pointer} as its value. For this specification, only {@link https://tools.ietf.org/html/draft-zyp-json-schema-04#section-7.2.3 canonical dereferencing} is supported.\n *\n * **Reference Object Example**\n *\n * @example\n * ```yaml\n * $ref: '#/definitions/Pet'\n * ```\n *\n * **Relative Schema File Example**\n *\n * @example\n * ```yaml\n * $ref: 'Pet.yaml'\n * ```\n *\n * **Relative Files With Embedded Schema Example**\n *\n * @example\n * ```yaml\n * $ref: 'definitions.yaml#/Pet'\n * ```\n */\nexport interface ReferenceObject {\n  /**\n   * **Required**. The reference string.\n   */\n  $ref: string;\n}\n\n/**\n * Describes a single response from an API Operation.\n *\n * **Response Object Examples**\n *\n * Response of an array of a complex type:\n *\n * @example\n * ```yaml\n * description: A complex object array response\n * schema:\n *   type: array\n *   items:\n *     $ref: '#/definitions/VeryComplexType'\n * ```\n *\n * Response with a string type:\n *\n * @example\n * ```yaml\n * description: A simple string response\n * schema:\n *   type: string\n * ```\n *\n * Response with headers:\n *\n * @example\n * ```yaml\n * description: A simple string response\n * schema:\n *   type: string\n * headers:\n *   X-Rate-Limit-Limit:\n *     description: The number of allowed requests in the current period\n *     type: integer\n *   X-Rate-Limit-Remaining:\n *     description: The number of remaining requests in the current period\n *     type: integer\n *   X-Rate-Limit-Reset:\n *     description: The number of seconds left in the current period\n *     type: integer\n * ```\n *\n * Response with no return value:\n *\n * @example\n * ```yaml\n * description: object created\n * ```\n */\nexport interface ResponseObject {\n  /**\n   * Allows extensions to the Swagger Schema. The field name MUST begin with `x-`, for example, `x-internal-id`. The value can be `null`, a primitive, an array or an object. See {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/2.0.md#specification-extensions Vendor Extensions} for further details.\n   */\n  [name: `x-${string}`]: unknown;\n  /**\n   * **Required**. A short description of the response. {@link https://guides.github.com/features/mastering-markdown/#GitHub-flavored-markdown GFM syntax} can be used for rich text representation.\n   */\n  description: string;\n  /**\n   * An example of the response message.\n   */\n  examples?: ExampleObject;\n  /**\n   * A list of headers that are sent with the response.\n   */\n  headers?: HeadersObject;\n  /**\n   * A definition of the response structure. It can be a primitive, an array or an object. If this field does not exist, it means no content is returned as part of the response. As an extension to the {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/2.0.md#schema-object Schema Object}, its root `type` value may also be `\"file\"`. This SHOULD be accompanied by a relevant `produces` mime-type.\n   */\n  schema?: SchemaObject;\n}\n\n/**\n * An object to hold responses to be reused across operations. Response definitions can be referenced to the ones defined here.\n *\n * This does _not_ define global operation responses.\n *\n * **Responses Definitions Object Example**\n *\n * @example\n * ```yaml\n * NotFound:\n *   description: Entity not found.\n * IllegalInput:\n *   description: Illegal input for operation.\n * GeneralError:\n *   description: General Error\n *   schema:\n *     $ref: '#/definitions/GeneralError'\n * ```\n */\nexport interface ResponsesDefinitionsObject {\n  /**\n   * A single response definition, mapping a \"name\" to the response it defines.\n   */\n  [name: string]: ResponseObject;\n}\n\n/**\n * A container for the expected responses of an operation. The container maps a HTTP response code to the expected response. It is not expected from the documentation to necessarily cover all possible HTTP response codes, since they may not be known in advance. However, it is expected from the documentation to cover a successful operation response and any known errors.\n *\n * The `default` can be used as the default response object for all HTTP codes that are not covered individually by the specification.\n *\n * The `Responses Object` MUST contain at least one response code, and it SHOULD be the response for a successful operation call.\n *\n * **Responses Object Example**\n *\n * A 200 response for successful operation and a default response for others (implying an error):\n *\n * @example\n * ```yaml\n * '200':\n *   description: a pet to be returned\n *   schema:\n *     $ref: '#/definitions/Pet'\n * default:\n *   description: Unexpected error\n *   schema:\n *     $ref: '#/definitions/ErrorModel'\n * ```\n */\nexport interface ResponsesObject {\n  /**\n   * Any {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/2.0.md#http-status-codes HTTP status code} can be used as the property name (one property per HTTP status code). Describes the expected response for that HTTP status code. {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/2.0.md#reference-object Reference Object} can be used to link to a response that is defined at the {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/2.0.md#swaggerResponses Swagger Object's responses} section.\n   */\n  [httpStatusCode: string]: ResponseObject | ReferenceObject | undefined;\n  /**\n   * Allows extensions to the Swagger Schema. The field name MUST begin with `x-`, for example, `x-internal-id`. The value can be `null`, a primitive, an array or an object. See {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/2.0.md#specification-extensions Vendor Extensions} for further details.\n   */\n  [name: `x-${string}`]: any;\n  /**\n   * The documentation of responses other than the ones declared for specific HTTP response codes. It can be used to cover undeclared responses. {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/2.0.md#reference-object Reference Object} can be used to link to a response that is defined at the {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/2.0.md#swaggerResponses Swagger Object's responses} section.\n   */\n  default?: ResponseObject | ReferenceObject;\n}\n\n/**\n * The Schema Object allows the definition of input and output data types. These types can be objects, but also primitives and arrays. This object is based on the {@link http://json-schema.org/ JSON Schema Specification Draft 4} and uses a predefined subset of it. On top of this subset, there are extensions provided by this specification to allow for more complete documentation.\n *\n * Further information about the properties can be found in {@link https://tools.ietf.org/html/draft-zyp-json-schema-04 JSON Schema Core} and {@link https://tools.ietf.org/html/draft-fge-json-schema-validation-00 JSON Schema Validation}. Unless stated otherwise, the property definitions follow the JSON Schema specification as referenced here.\n *\n * The following properties are taken directly from the JSON Schema definition and follow the same specifications:\n *\n * - $ref - As a {@link https://tools.ietf.org/html/draft-pbryan-zyp-json-ref-03 JSON Reference}\n * - format (See {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/2.0.md#dataTypeFormat Data Type Formats} for further details)\n * - title\n * - description ({@link https://guides.github.com/features/mastering-markdown/#GitHub-flavored-markdown GFM syntax} can be used for rich text representation)\n * - default (Unlike JSON Schema, the value MUST conform to the defined type for the Schema Object)\n * - multipleOf\n * - maximum\n * - exclusiveMaximum\n * - minimum\n * - exclusiveMinimum\n * - maxLength\n * - minLength\n * - pattern\n * - maxItems\n * - minItems\n * - uniqueItems\n * - maxProperties\n * - minProperties\n * - required\n * - enum\n * - type\n *\n * The following properties are taken from the JSON Schema definition but their definitions were adjusted to the Swagger Specification. Their definition is the same as the one from JSON Schema, only where the original definition references the JSON Schema definition, the {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/2.0.md#schema-object Schema Object} definition is used instead.\n *\n * - items\n * - allOf\n * - properties\n * - additionalProperties\n *\n * Other than the JSON Schema subset fields, the following fields may be used for further schema documentation.\n *\n * **Composition and Inheritance (Polymorphism)**\n *\n * Swagger allows combining and extending model definitions using the `allOf` property of JSON Schema, in effect offering model composition. `allOf` takes in an array of object definitions that are validated _independently_ but together compose a single object.\n *\n * While composition offers model extensibility, it does not imply a hierarchy between the models. To support polymorphism, Swagger adds the support of the `discriminator` field. When used, the `discriminator` will be the name of the property used to decide which schema definition is used to validate the structure of the model. As such, the `discriminator` field MUST be a required field. The value of the chosen property has to be the friendly name given to the model under the `definitions` property. As such, inline schema definitions, which do not have a given id, _cannot_ be used in polymorphism.\n *\n * **XML Modeling**\n *\n * The {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/2.0.md#schemaXml xml} property allows extra definitions when translating the JSON definition to XML. The {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/2.0.md#xml-object XML Object} contains additional information about the available options.\n *\n * **Schema Object Examples**\n *\n * Primitive Sample\n *\n * Unlike previous versions of Swagger, Schema definitions can be used to describe primitive and arrays as well.\n *\n * @example\n * ```yaml\n * type: string\n * format: email\n * ```\n *\n * Simple Model\n *\n * @example\n * ```yaml\n * type: object\n * required:\n * - name\n * properties:\n *   name:\n *     type: string\n *   address:\n *     $ref: '#/definitions/Address'\n *   age:\n *     type: integer\n *     format: int32\n *     minimum: 0\n * ```\n *\n * Model with Map/Dictionary Properties\n *\n * For a simple string to string mapping:\n *\n * @example\n * ```yaml\n * type: object\n * additionalProperties:\n *   type: string\n * ```\n *\n * For a string to model mapping:\n *\n * @example\n * ```yaml\n * type: object\n * additionalProperties:\n *   $ref: '#/definitions/ComplexModel'\n * ```\n *\n * Model with Example\n *\n * @example\n * ```yaml\n * type: object\n * properties:\n *   id:\n *     type: integer\n *     format: int64\n *   name:\n *     type: string\n * required:\n * - name\n * example:\n *   name: Puma\n *   id: 1\n * ```\n *\n * Models with Composition\n *\n * @example\n * ```yaml\n * definitions:\n *   ErrorModel:\n *     type: object\n *     required:\n *     - message\n *     - code\n *     properties:\n *       message:\n *         type: string\n *       code:\n *         type: integer\n *         minimum: 100\n *         maximum: 600\n *   ExtendedErrorModel:\n *     allOf:\n *     - $ref: '#/definitions/ErrorModel'\n *     - type: object\n *       required:\n *       - rootCause\n *       properties:\n *         rootCause:\n *           type: string\n * ```\n *\n * Models with Polymorphism Support\n *\n * @example\n * ```yaml\n * definitions:\n *   Pet:\n *     type: object\n *     discriminator: petType\n *     properties:\n *       name:\n *         type: string\n *       petType:\n *         type: string\n *     required:\n *     - name\n *     - petType\n *   Cat:\n *     description: A representation of a cat\n *     allOf:\n *     - $ref: '#/definitions/Pet'\n *     - type: object\n *       properties:\n *         huntingSkill:\n *           type: string\n *           description: The measured skill for hunting\n *           default: lazy\n *           enum:\n *           - clueless\n *           - lazy\n *           - adventurous\n *           - aggressive\n *       required:\n *       - huntingSkill\n *   Dog:\n *     description: A representation of a dog\n *     allOf:\n *     - $ref: '#/definitions/Pet'\n *     - type: object\n *       properties:\n *         packSize:\n *           type: integer\n *           format: int32\n *           description: the size of the pack the dog is from\n *           default: 0\n *           minimum: 0\n *       required:\n *       - packSize\n * ```\n */\nexport interface SchemaObject extends JsonSchemaDraft4, OpenApiV2_0_X_Nullable_Extensions {\n  /**\n   * Allows extensions to the Swagger Schema. The field name MUST begin with `x-`, for example, `x-internal-id`. The value can be `null`, a primitive, an array or an object. See {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/2.0.md#specification-extensions Vendor Extensions} for further details.\n   */\n  [name: `x-${string}`]: unknown;\n  /**\n   * The `additionalProperties` keyword is used to control the handling of extra stuff, that is, properties whose names are not listed in the `properties` keyword or match any of the regular expressions in the `patternProperties` keyword. By default any additional properties are allowed.\n   *\n   * The value of the `additionalProperties` keyword is a schema that will be used to validate any properties in the {@link https://json-schema.org/learn/glossary#instance instance} that are not matched by `properties` or `patternProperties`. Setting the `additionalProperties` schema to `false` means no additional properties will be allowed.\n   *\n   * It's important to note that `additionalProperties` only recognizes properties declared in the same {@link https://json-schema.org/learn/glossary#subschema subschema} as itself. So, `additionalProperties` can restrict you from \"extending\" a schema using {@link https://json-schema.org/understanding-json-schema/reference/combining combining} keywords such as {@link https://json-schema.org/understanding-json-schema/reference/combining#allof allOf}.\n   */\n  additionalProperties?: SchemaObject | boolean;\n  /**\n   * `allOf`: (AND) Must be valid against _all_ of the {@link https://json-schema.org/learn/glossary#subschema subschemas}\n   *\n   * To validate against `allOf`, the given data must be valid against all of the given subschemas.\n   *\n   * {@link https://json-schema.org/understanding-json-schema/reference/combining#allof allOf} can not be used to \"extend\" a schema to add more details to it in the sense of object-oriented inheritance. {@link https://json-schema.org/learn/glossary#instance Instances} must independently be valid against \"all of\" the schemas in the `allOf`. See the section on {@link https://json-schema.org/understanding-json-schema/reference/object#extending Extending Closed Schemas} for more information.\n   */\n  allOf?: ReadonlyArray<SchemaObject>;\n  /**\n   * Adds support for polymorphism. The discriminator is the schema property name that is used to differentiate between other schema that inherit this schema. The property name used MUST be defined at this schema and it MUST be in the `required` property list. When used, the value MUST be the name of this schema or any schema that inherits it.\n   */\n  discriminator?: string;\n  /**\n   * A free-form property to include an example of an instance for this schema.\n   */\n  example?: unknown;\n  /**\n   * Additional external documentation for this schema.\n   */\n  externalDocs?: ExternalDocumentationObject;\n  /**\n   * List validation is useful for arrays of arbitrary length where each item matches the same schema. For this kind of array, set the `items` {@link https://json-schema.org/learn/glossary#keyword keyword} to a single schema that will be used to validate all of the items in the array.\n   *\n   * The `items` keyword can be used to control whether it's valid to have additional items in a tuple beyond what is defined in `prefixItems`. The value of the `items` keyword is a schema that all additional items must pass in order for the keyword to validate.\n   *\n   * Note that `items` doesn't \"see inside\" any {@link https://json-schema.org/learn/glossary#instance instances} of `allOf`, `anyOf`, or `oneOf` in the same {@link https://json-schema.org/learn/glossary#subschema subschema}.\n   */\n  items?: SchemaObject;\n  /**\n   * The properties (key-value pairs) on an object are defined using the `properties` {@link https://json-schema.org/learn/glossary#keyword keyword}. The value of `properties` is an object, where each key is the name of a property and each value is a {@link https://json-schema.org/learn/glossary#schema schema} used to validate that property. Any property that doesn't match any of the property names in the `properties` keyword is ignored by this keyword.\n   */\n  properties?: Record<string, SchemaObject>;\n  /**\n   * Relevant only for Schema `\"properties\"` definitions. Declares the property as \"read only\". This means that it MAY be sent as part of a response but MUST NOT be sent as part of the request. Properties marked as `readOnly` being `true` SHOULD NOT be in the `required` list of the defined schema. Default value is `false`.\n   */\n  readOnly?: boolean;\n  /**\n   * This MAY be used only on properties schemas. It has no effect on root schemas. Adds Additional metadata to describe the XML representation format of this property.\n   */\n  xml?: XMLObject;\n}\n\n/**\n * Lists the available scopes for an OAuth2 security scheme.\n *\n * **Scopes Object Example**\n *\n * @example\n * ```yaml\n * write:pets: modify pets in your account\n * read:pets: read your pets\n * ```\n */\nexport interface ScopesObject {\n  /**\n   * Allows extensions to the Swagger Schema. The field name MUST begin with `x-`, for example, `x-internal-id`. The value can be `null`, a primitive, an array or an object. See {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/2.0.md#specification-extensions Vendor Extensions} for further details.\n   */\n  [name: `x-${string}`]: any;\n  /**\n   * Maps between a name of a scope to a short description of it (as the value of the property).\n   */\n  [name: string]: string;\n}\n\n/**\n * A declaration of the security schemes available to be used in the specification. This does not enforce the security schemes on the operations and only serves to provide the relevant details for each scheme.\n *\n * **Security Definitions Object Example**\n *\n * @example\n * ```yaml\n * api_key:\n *   type: apiKey\n *   name: api_key\n *   in: header\n * petstore_auth:\n *   type: oauth2\n *   authorizationUrl: http://swagger.io/api/oauth/dialog\n *   flow: implicit\n *   scopes:\n *     write:pets: modify pets in your account\n *     read:pets: read your pets\n * ```\n */\nexport interface SecurityDefinitionsObject {\n  /**\n   * Allows extensions to the Swagger Schema. The field name MUST begin with `x-`, for example, `x-internal-id`. The value can be `null`, a primitive, an array or an object. See {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/2.0.md#specification-extensions Vendor Extensions} for further details.\n   */\n  [name: `x-${string}`]: any;\n  /**\n   * A single security scheme definition, mapping a \"name\" to the scheme it defines.\n   */\n  [name: string]: SecuritySchemeObject;\n}\n\n/**\n * Lists the required security schemes to execute this operation. The object can have multiple security schemes declared in it which are all required (that is, there is a logical AND between the schemes).\n *\n * The name used for each property MUST correspond to a security scheme declared in the {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/2.0.md#security-definitions-object Security Definitions}.\n *\n * **Security Requirement Object Examples**\n *\n * Non-OAuth2 Security Requirement\n *\n * @example\n * ```yaml\n * api_key: []\n * ```\n *\n * OAuth2 Security Requirement\n *\n * @example\n * ```yaml\n * petstore_auth:\n * - write:pets\n * - read:pets\n * ```\n */\nexport interface SecurityRequirementObject {\n  /**\n   * Each name must correspond to a security scheme which is declared in the {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/2.0.md#securityDefinitions Security Definitions}. If the security scheme is of type `\"oauth2\"`, then the value is a list of scope names required for the execution. For other security scheme types, the array MUST be empty.\n   */\n  [name: string]: ReadonlyArray<string>;\n}\n\n/**\n * Allows the definition of a security scheme that can be used by the operations. Supported schemes are basic authentication, an API key (either as a header or as a query parameter) and OAuth2's common flows (implicit, password, application and access code).\n *\n * **Security Scheme Object Example**\n *\n * Basic Authentication Sample\n *\n * @example\n * ```yaml\n * type: basic\n * ```\n *\n * API Key Sample\n *\n * @example\n * ```yaml\n * type: apiKey\n * name: api_key\n * in: header\n * ```\n *\n * Implicit OAuth2 Sample\n *\n * @example\n * ```yaml\n * type: oauth2\n * authorizationUrl: http://swagger.io/api/oauth/dialog\n * flow: implicit\n * scopes:\n *   write:pets: modify pets in your account\n *   read:pets: read your pets\n * ```\n */\nexport type SecuritySchemeObject = {\n  /**\n   * A short description for security scheme.\n   */\n  description?: string;\n} & (\n  | {\n      /**\n       * **Required** The location of the API key. Valid values are `\"query\"` or `\"header\"`.\n       */\n      in: 'header' | 'query';\n      /**\n       * **Required**. The name of the header or query parameter to be used.\n       */\n      name: string;\n      /**\n       * **Required**. The type of the security scheme. Valid values are `\"basic\"`, `\"apiKey\"` or `\"oauth2\"`.\n       */\n      type: 'apiKey';\n    }\n  | {\n      /**\n       * **Required (`\"implicit\"`, `\"accessCode\"`)**. The authorization URL to be used for this flow. This SHOULD be in the form of a URL.\n       */\n      authorizationUrl?: string;\n      /**\n       * **Required**. The flow used by the OAuth2 security scheme. Valid values are `\"implicit\"`, `\"password\"`, `\"application\"` or `\"accessCode\"`.\n       */\n      flow: 'accessCode' | 'application' | 'implicit' | 'password';\n      /**\n       * **Required**. The available scopes for the OAuth2 security scheme.\n       */\n      scopes: ScopesObject;\n      /**\n       * **Required (`\"password\"`, `\"application\"`, `\"accessCode\"`)**. The token URL to be used for this flow. This SHOULD be in the form of a URL.\n       */\n      tokenUrl?: string;\n      /**\n       * **Required**. The type of the security scheme. Valid values are `\"basic\"`, `\"apiKey\"` or `\"oauth2\"`.\n       */\n      type: 'oauth2';\n    }\n  | {\n      /**\n       * **Required**. The type of the security scheme. Valid values are `\"basic\"`, `\"apiKey\"` or `\"oauth2\"`.\n       */\n      type: 'basic';\n    }\n);\n\n/**\n * Allows adding meta data to a single tag that is used by the {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/2.0.md#operation-object Operation Object}. It is not mandatory to have a Tag Object per tag used there.\n *\n * **Tag Object Example**\n *\n * @example\n * ```yaml\n * name: pet\n * description: Pets operations\n * ```\n */\nexport interface TagObject {\n  /**\n   * Allows extensions to the Swagger Schema. The field name MUST begin with `x-`, for example, `x-internal-id`. The value can be `null`, a primitive, an array or an object. See {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/2.0.md#specification-extensions Vendor Extensions} for further details.\n   */\n  [name: `x-${string}`]: unknown;\n  /**\n   * A short description for the tag. {@link https://guides.github.com/features/mastering-markdown/#GitHub-flavored-markdown GFM syntax} can be used for rich text representation.\n   */\n  description?: string;\n  /**\n   * Additional external documentation for this tag.\n   */\n  externalDocs?: ExternalDocumentationObject;\n  /**\n   * **Required**. The name of the tag.\n   */\n  name: string;\n}\n\n/**\n * A metadata object that allows for more fine-tuned XML model definitions.\n *\n * When using arrays, XML element names are _not_ inferred (for singular/plural forms) and the `name` property should be used to add that information. See examples for expected behavior.\n */\nexport interface XMLObject {\n  /**\n   * Allows extensions to the Swagger Schema. The field name MUST begin with `x-`, for example, `x-internal-id`. The value can be `null`, a primitive, an array or an object. See {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/2.0.md#specification-extensions Vendor Extensions} for further details.\n   */\n  [name: `x-${string}`]: unknown;\n  /**\n   * Declares whether the property definition translates to an attribute instead of an element. Default value is `false`.\n   */\n  attribute?: boolean;\n  /**\n   * Replaces the name of the element/attribute used for the described schema property. When defined within the Items Object (`items`), it will affect the name of the individual XML elements within the list. When defined alongside `type` being `array` (outside the `items`), it will affect the wrapping element and only if `wrapped` is `true`. If `wrapped` is `false`, it will be ignored.\n   */\n  name?: string;\n  /**\n   * The URL of the namespace definition. Value SHOULD be in the form of a URL.\n   */\n  namespace?: string;\n  /**\n   * The prefix to be used for the {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/2.0.md#xmlName name}.\n   */\n  prefix?: string;\n  /**\n   * MAY be used only for an array definition. Signifies whether the array is wrapped (for example, `<books><book/><book/></books>`) or unwrapped (`<book/><book/>`). Default value is `false`. The definition takes effect only when defined alongside `type` being `array` (outside the `items`).\n   */\n  wrapped?: boolean;\n}\n"
  },
  {
    "path": "packages/shared/src/openApi/3.0.x/index.ts",
    "content": "export { parseV3_0_X } from './parser';\nexport type { OpenApiV3_0_X } from './types/spec';\n\nimport type {\n  InfoObject,\n  OperationObject,\n  ParameterObject,\n  ReferenceObject,\n  RequestBodyObject,\n  ResponseObject,\n  SchemaObject,\n} from './types/spec';\n\nexport interface OpenApiV3_0_XTypes {\n  InfoObject: InfoObject;\n  OperationObject: OperationObject;\n  ParameterObject: ParameterObject;\n  ReferenceObject: ReferenceObject;\n  RequestBodyObject: RequestBodyObject;\n  ResponseObject: ResponseObject;\n  SchemaObject: SchemaObject;\n}\n"
  },
  {
    "path": "packages/shared/src/openApi/3.0.x/parser/__tests__/operation.test.ts",
    "content": "import type { Context } from '../../../../ir/context';\nimport type { SecuritySchemeObject } from '../../types/spec';\nimport { parsePathOperation } from '../operation';\n\ntype ParseOperationProps = Parameters<typeof parsePathOperation>[0];\n\ndescribe('operation', () => {\n  const context = {\n    config: {\n      plugins: {},\n    },\n    ir: {\n      paths: {},\n      servers: [],\n    },\n  } as unknown as Context;\n\n  it('should parse operation correctly', () => {\n    const method = 'get';\n    const operation: ParseOperationProps['operation'] = {\n      operationId: 'testOperation',\n      responses: {},\n      security: [\n        {\n          apiKeyAuth: [],\n        },\n        {\n          apiKeyAuth: [],\n        },\n        {\n          oauthRule: ['read'],\n        },\n        {\n          oauthRule: ['write'],\n        },\n      ],\n      summary: 'Test Operation',\n    };\n    const path = '/test';\n\n    const oauth2: SecuritySchemeObject = {\n      description: 'OAuth2',\n      flows: {\n        password: {\n          scopes: {\n            read: 'Grants read access',\n            write: 'Grants write access',\n          },\n          tokenUrl: 'https://example.com/oauth/token',\n        },\n      },\n      type: 'oauth2',\n    };\n    const securitySchemesMap = new Map<string, SecuritySchemeObject>([\n      ['apiKeyAuth', { in: 'header', name: 'Auth', type: 'apiKey' }],\n      ['basicAuthRule', { description: 'Basic Auth', scheme: 'basic', type: 'http' }],\n      ['oauthRule', oauth2],\n    ]);\n    const state: ParseOperationProps['state'] = {\n      ids: new Map<string, string>(),\n    };\n\n    parsePathOperation({\n      context,\n      method,\n      operation,\n      path,\n      securitySchemesMap,\n      state,\n    });\n\n    expect(context.ir.paths?.[path]?.[method]).toEqual({\n      id: 'testOperation',\n      method,\n      operationId: 'testOperation',\n      path,\n      security: [{ in: 'header', name: 'Auth', type: 'apiKey' }, oauth2],\n      summary: 'Test Operation',\n    });\n  });\n});\n"
  },
  {
    "path": "packages/shared/src/openApi/3.0.x/parser/__tests__/validate.test.ts",
    "content": "import path from 'node:path';\n\nimport { Logger } from '@hey-api/codegen-core';\n\nimport { getSpecsPath, specFileToJson } from '../../../__tests__/utils';\nimport type { ValidatorResult } from '../../../shared/utils/validator';\nimport { validateOpenApiSpec } from '../validate';\n\nconst specsFolder = path.join(getSpecsPath(), '3.0.x', 'invalid');\n\ndescribe('validate', () => {\n  const scenarios: Array<\n    ValidatorResult & {\n      description: string;\n      file: string;\n    }\n  > = [\n    {\n      description: 'servers must be array',\n      file: path.join(specsFolder, 'servers-array.yaml'),\n      issues: [\n        {\n          code: 'invalid_type',\n          message: '`servers` must be an array.',\n          path: [],\n          severity: 'error',\n        },\n      ],\n      valid: false,\n    },\n    {\n      description: 'servers entry must be object',\n      file: path.join(specsFolder, 'servers-entry.yaml'),\n      issues: [\n        {\n          code: 'invalid_type',\n          context: {\n            actual: 'string',\n            expected: 'object',\n          },\n          message: 'Each entry in `servers` must be an object.',\n          path: ['servers', 0],\n          severity: 'error',\n        },\n      ],\n      valid: false,\n    },\n    {\n      description: 'servers entry required fields',\n      file: path.join(specsFolder, 'servers-required.yaml'),\n      issues: [\n        {\n          code: 'missing_required_field',\n          context: {\n            field: 'url',\n          },\n          message: 'Missing required field `url` in server object.',\n          path: ['servers', 0],\n          severity: 'error',\n        },\n      ],\n      valid: false,\n    },\n    {\n      description: 'operationId must be unique',\n      file: path.join(specsFolder, 'operationId-unique.yaml'),\n      issues: [\n        {\n          code: 'duplicate_key',\n          context: {\n            key: 'operationId',\n            value: 'foo',\n          },\n          message: 'Duplicate `operationId` found. Each `operationId` must be unique.',\n          path: ['paths', '/foo', 'post', 'operationId'],\n          severity: 'error',\n        },\n      ],\n      valid: false,\n    },\n  ];\n\n  it.each(scenarios)('$description', ({ file, issues, valid }) => {\n    const spec = specFileToJson(file);\n    const logger = new Logger();\n    const result = validateOpenApiSpec(spec, logger);\n    expect(result.valid).toBe(valid);\n    expect(result.issues).toEqual(issues);\n  });\n});\n"
  },
  {
    "path": "packages/shared/src/openApi/3.0.x/parser/filter.ts",
    "content": "import type { Logger } from '@hey-api/codegen-core';\n\nimport { createOperationKey } from '../../../ir/operation';\nimport { addNamespace, removeNamespace } from '../../../openApi/shared/utils/filter';\nimport { httpMethods } from '../../../openApi/shared/utils/operation';\nimport type { OpenApiV3_0_X, PathItemObject, PathsObject } from '../types/spec';\n\n/**\n * Replace source spec with filtered version.\n */\nexport const filterSpec = ({\n  logger,\n  operations,\n  parameters,\n  preserveOrder,\n  requestBodies,\n  responses,\n  schemas,\n  spec,\n}: {\n  logger: Logger;\n  operations: Set<string>;\n  parameters: Set<string>;\n  preserveOrder: boolean;\n  requestBodies: Set<string>;\n  responses: Set<string>;\n  schemas: Set<string>;\n  spec: OpenApiV3_0_X;\n}) => {\n  const eventFilterSpec = logger.timeEvent('filter-spec');\n  if (spec.components) {\n    if (spec.components.parameters) {\n      const filtered: typeof spec.components.parameters = {};\n\n      if (preserveOrder) {\n        for (const [name, source] of Object.entries(spec.components.parameters)) {\n          if (parameters.has(addNamespace('parameter', name))) {\n            filtered[name] = source;\n          }\n        }\n      } else {\n        for (const key of parameters) {\n          const { name } = removeNamespace(key);\n          const source = spec.components.parameters[name];\n          if (source) {\n            filtered[name] = source;\n          }\n        }\n      }\n\n      spec.components.parameters = filtered;\n    }\n\n    if (spec.components.requestBodies) {\n      const filtered: typeof spec.components.requestBodies = {};\n\n      if (preserveOrder) {\n        for (const [name, source] of Object.entries(spec.components.requestBodies)) {\n          if (requestBodies.has(addNamespace('body', name))) {\n            filtered[name] = source;\n          }\n        }\n      } else {\n        for (const key of requestBodies) {\n          const { name } = removeNamespace(key);\n          const source = spec.components.requestBodies[name];\n          if (source) {\n            filtered[name] = source;\n          }\n        }\n      }\n\n      spec.components.requestBodies = filtered;\n    }\n\n    if (spec.components.responses) {\n      const filtered: typeof spec.components.responses = {};\n\n      if (preserveOrder) {\n        for (const [name, source] of Object.entries(spec.components.responses)) {\n          if (responses.has(addNamespace('response', name))) {\n            filtered[name] = source;\n          }\n        }\n      } else {\n        for (const key of responses) {\n          const { name } = removeNamespace(key);\n          const source = spec.components.responses[name];\n          if (source) {\n            filtered[name] = source;\n          }\n        }\n      }\n\n      spec.components.responses = filtered;\n    }\n\n    if (spec.components.schemas) {\n      const filtered: typeof spec.components.schemas = {};\n\n      if (preserveOrder) {\n        for (const [name, source] of Object.entries(spec.components.schemas)) {\n          if (schemas.has(addNamespace('schema', name))) {\n            filtered[name] = source;\n          }\n        }\n      } else {\n        for (const key of schemas) {\n          const { name } = removeNamespace(key);\n          const source = spec.components.schemas[name];\n          if (source) {\n            filtered[name] = source;\n          }\n        }\n      }\n\n      spec.components.schemas = filtered;\n    }\n  }\n\n  if (spec.paths) {\n    for (const entry of Object.entries(spec.paths)) {\n      const path = entry[0] as keyof PathsObject;\n      const pathItem = entry[1] as PathItemObject;\n\n      for (const method of httpMethods) {\n        const operation = pathItem[method];\n        if (!operation) {\n          continue;\n        }\n\n        const key = addNamespace('operation', createOperationKey({ method, path }));\n        if (!operations.has(key)) {\n          delete pathItem[method];\n        }\n      }\n\n      // remove paths that have no operations left\n      if (!Object.keys(pathItem).length) {\n        delete spec.paths[path];\n      }\n    }\n  }\n  eventFilterSpec.timeEnd();\n};\n"
  },
  {
    "path": "packages/shared/src/openApi/3.0.x/parser/index.ts",
    "content": "import type { Context } from '../../../ir/context';\nimport { buildResourceMetadata } from '../../../openApi/shared/graph/meta';\nimport { transformOpenApiSpec } from '../../../openApi/shared/transforms';\nimport type { State } from '../../../openApi/shared/types/state';\nimport {\n  createFilteredDependencies,\n  createFilters,\n  hasFilters,\n} from '../../../openApi/shared/utils/filter';\nimport { buildGraph } from '../../../openApi/shared/utils/graph';\nimport { mergeParametersObjects } from '../../../openApi/shared/utils/parameter';\nimport { handleValidatorResult } from '../../../openApi/shared/utils/validator';\nimport type {\n  OpenApiV3_0_X,\n  ParameterObject,\n  PathItemObject,\n  PathsObject,\n  RequestBodyObject,\n  SecuritySchemeObject,\n} from '../types/spec';\nimport { filterSpec } from './filter';\nimport { parsePathOperation } from './operation';\nimport { parametersArrayToObject, parseParameter } from './parameter';\nimport { parseRequestBody } from './requestBody';\nimport { parseSchema } from './schema';\nimport { parseServers } from './server';\nimport { validateOpenApiSpec } from './validate';\n\nexport const parseV3_0_X = (context: Context<OpenApiV3_0_X>) => {\n  if (context.config.parser.validate_EXPERIMENTAL) {\n    const result = validateOpenApiSpec(context.spec, context.logger);\n    handleValidatorResult({ context, result });\n  }\n\n  const shouldFilterSpec = hasFilters(context.config.parser.filters);\n  if (shouldFilterSpec) {\n    const filters = createFilters(context.config.parser.filters, context.spec, context.logger);\n    const { graph } = buildGraph(context.spec, context.logger);\n    const { resourceMetadata } = buildResourceMetadata(graph, context.logger);\n    const sets = createFilteredDependencies({\n      filters,\n      logger: context.logger,\n      resourceMetadata,\n    });\n    filterSpec({\n      ...sets,\n      logger: context.logger,\n      preserveOrder: filters.preserveOrder,\n      spec: context.spec,\n    });\n  }\n\n  transformOpenApiSpec({ context });\n\n  const state: State = {\n    ids: new Map(),\n  };\n  const securitySchemesMap = new Map<string, SecuritySchemeObject>();\n\n  // TODO: parser - handle more component types, old parser handles only parameters and schemas\n  if (context.spec.components) {\n    for (const name in context.spec.components.securitySchemes) {\n      const securityOrReference = context.spec.components.securitySchemes[name]!;\n      const securitySchemeObject =\n        '$ref' in securityOrReference\n          ? context.resolveRef<SecuritySchemeObject>(securityOrReference.$ref)\n          : securityOrReference;\n      securitySchemesMap.set(name, securitySchemeObject);\n    }\n\n    for (const name in context.spec.components.parameters) {\n      const $ref = `#/components/parameters/${name}`;\n      const parameterOrReference = context.spec.components.parameters[name]!;\n      const parameter =\n        '$ref' in parameterOrReference\n          ? context.resolveRef<ParameterObject>(parameterOrReference.$ref)\n          : parameterOrReference;\n\n      parseParameter({\n        $ref,\n        context,\n        parameter,\n      });\n    }\n\n    for (const name in context.spec.components.requestBodies) {\n      const $ref = `#/components/requestBodies/${name}`;\n      const requestBodyOrReference = context.spec.components.requestBodies[name]!;\n      const requestBody =\n        '$ref' in requestBodyOrReference\n          ? context.resolveRef<RequestBodyObject>(requestBodyOrReference.$ref)\n          : requestBodyOrReference;\n\n      parseRequestBody({\n        $ref,\n        context,\n        requestBody,\n      });\n    }\n\n    for (const name in context.spec.components.schemas) {\n      const $ref = `#/components/schemas/${name}`;\n      const schema = context.spec.components.schemas[name]!;\n\n      parseSchema({\n        $ref,\n        context,\n        schema,\n      });\n    }\n  }\n\n  parseServers({ context });\n\n  for (const path in context.spec.paths) {\n    if (path.startsWith('x-')) continue;\n    const pathItem = context.spec.paths[path as keyof PathsObject]! as PathItemObject;\n\n    const finalPathItem = pathItem.$ref\n      ? {\n          ...context.resolveRef<PathItemObject>(pathItem.$ref),\n          ...pathItem,\n        }\n      : pathItem;\n\n    const operationArgs: Omit<Parameters<typeof parsePathOperation>[0], 'method' | 'operation'> & {\n      operation: Omit<Parameters<typeof parsePathOperation>[0]['operation'], 'responses'>;\n    } = {\n      context,\n      operation: {\n        description: finalPathItem.description,\n        parameters: parametersArrayToObject({\n          context,\n          parameters: finalPathItem.parameters,\n        }),\n        security: context.spec.security,\n        servers: finalPathItem.servers,\n        summary: finalPathItem.summary,\n      },\n      path: path as `/${string}`,\n      securitySchemesMap,\n      state,\n    };\n\n    if (finalPathItem.delete) {\n      parsePathOperation({\n        ...operationArgs,\n        method: 'delete',\n        operation: {\n          ...operationArgs.operation,\n          ...finalPathItem.delete,\n          parameters: mergeParametersObjects({\n            source: parametersArrayToObject({\n              context,\n              parameters: finalPathItem.delete.parameters,\n            }),\n            target: operationArgs.operation.parameters,\n          }),\n        },\n      });\n    }\n\n    if (finalPathItem.get) {\n      parsePathOperation({\n        ...operationArgs,\n        method: 'get',\n        operation: {\n          ...operationArgs.operation,\n          ...finalPathItem.get,\n          parameters: mergeParametersObjects({\n            source: parametersArrayToObject({\n              context,\n              parameters: finalPathItem.get.parameters,\n            }),\n            target: operationArgs.operation.parameters,\n          }),\n        },\n      });\n    }\n\n    if (finalPathItem.head) {\n      parsePathOperation({\n        ...operationArgs,\n        method: 'head',\n        operation: {\n          ...operationArgs.operation,\n          ...finalPathItem.head,\n          parameters: mergeParametersObjects({\n            source: parametersArrayToObject({\n              context,\n              parameters: finalPathItem.head.parameters,\n            }),\n            target: operationArgs.operation.parameters,\n          }),\n        },\n      });\n    }\n\n    if (finalPathItem.options) {\n      parsePathOperation({\n        ...operationArgs,\n        method: 'options',\n        operation: {\n          ...operationArgs.operation,\n          ...finalPathItem.options,\n          parameters: mergeParametersObjects({\n            source: parametersArrayToObject({\n              context,\n              parameters: finalPathItem.options.parameters,\n            }),\n            target: operationArgs.operation.parameters,\n          }),\n        },\n      });\n    }\n\n    if (finalPathItem.patch) {\n      parsePathOperation({\n        ...operationArgs,\n        method: 'patch',\n        operation: {\n          ...operationArgs.operation,\n          ...finalPathItem.patch,\n          parameters: mergeParametersObjects({\n            source: parametersArrayToObject({\n              context,\n              parameters: finalPathItem.patch.parameters,\n            }),\n            target: operationArgs.operation.parameters,\n          }),\n        },\n      });\n    }\n\n    if (finalPathItem.post) {\n      parsePathOperation({\n        ...operationArgs,\n        method: 'post',\n        operation: {\n          ...operationArgs.operation,\n          ...finalPathItem.post,\n          parameters: mergeParametersObjects({\n            source: parametersArrayToObject({\n              context,\n              parameters: finalPathItem.post.parameters,\n            }),\n            target: operationArgs.operation.parameters,\n          }),\n        },\n      });\n    }\n\n    if (finalPathItem.put) {\n      parsePathOperation({\n        ...operationArgs,\n        method: 'put',\n        operation: {\n          ...operationArgs.operation,\n          ...finalPathItem.put,\n          parameters: mergeParametersObjects({\n            source: parametersArrayToObject({\n              context,\n              parameters: finalPathItem.put.parameters,\n            }),\n            target: operationArgs.operation.parameters,\n          }),\n        },\n      });\n    }\n\n    if (finalPathItem.trace) {\n      parsePathOperation({\n        ...operationArgs,\n        method: 'trace',\n        operation: {\n          ...operationArgs.operation,\n          ...finalPathItem.trace,\n          parameters: mergeParametersObjects({\n            source: parametersArrayToObject({\n              context,\n              parameters: finalPathItem.trace.parameters,\n            }),\n            target: operationArgs.operation.parameters,\n          }),\n        },\n      });\n    }\n  }\n};\n"
  },
  {
    "path": "packages/shared/src/openApi/3.0.x/parser/mediaType.ts",
    "content": "import type { IRMediaType } from '../../../ir/mediaType';\nimport { isMediaTypeFileLike, mediaTypeToIrMediaType } from '../../../ir/mediaType';\nimport type { MediaTypeObject, ReferenceObject, SchemaObject } from '../types/spec';\n\ninterface Content {\n  mediaType: string;\n  schema: SchemaObject | ReferenceObject | undefined;\n  type: IRMediaType | undefined;\n}\n\nexport const contentToSchema = ({ content }: { content: Content }): SchemaObject | undefined => {\n  const { mediaType, schema } = content;\n\n  if (schema && '$ref' in schema) {\n    return {\n      allOf: [{ ...schema }],\n    };\n  }\n\n  if (!schema) {\n    if (isMediaTypeFileLike({ mediaType })) {\n      return {\n        format: 'binary',\n        type: 'string',\n      };\n    }\n    return;\n  }\n\n  if (schema.type === 'string' && !schema.format && isMediaTypeFileLike({ mediaType })) {\n    return {\n      ...schema,\n      format: 'binary',\n    };\n  }\n\n  return schema;\n};\n\nexport const mediaTypeObjects = ({\n  content,\n}: {\n  content: Record<string, MediaTypeObject> | undefined;\n}): ReadonlyArray<Content> => {\n  const objects: Array<Content> = [];\n\n  for (const mediaType in content) {\n    objects.push({\n      mediaType,\n      schema: content[mediaType]!.schema,\n      type: mediaTypeToIrMediaType({ mediaType }),\n    });\n  }\n\n  return objects;\n};\n"
  },
  {
    "path": "packages/shared/src/openApi/3.0.x/parser/operation.ts",
    "content": "import type { Context } from '../../../ir/context';\nimport type { IR } from '../../../ir/types';\nimport type { State } from '../../../openApi/shared/types/state';\nimport { operationToId } from '../../../openApi/shared/utils/operation';\nimport type {\n  OperationObject,\n  PathItemObject,\n  ReferenceObject,\n  RequestBodyObject,\n  ResponseObject,\n  SecuritySchemeObject,\n} from '../types/spec';\nimport { contentToSchema, mediaTypeObjects } from './mediaType';\nimport { paginationField } from './pagination';\nimport { parseExtensions, schemaToIrSchema } from './schema';\n\ninterface Operation\n  extends Omit<OperationObject, 'parameters'>, Pick<IR.OperationObject, 'parameters'> {}\n\nconst parseOperationJsDoc = ({\n  irOperation,\n  operation,\n}: {\n  irOperation: IR.OperationObject;\n  operation: Operation;\n}) => {\n  if (operation.deprecated !== undefined) {\n    irOperation.deprecated = operation.deprecated;\n  }\n\n  if (operation.description) {\n    irOperation.description = operation.description;\n  }\n\n  if (operation.summary) {\n    irOperation.summary = operation.summary;\n  }\n\n  if (operation.tags?.length) {\n    irOperation.tags = operation.tags;\n  }\n};\n\nconst initIrOperation = ({\n  context,\n  method,\n  operation,\n  path,\n  state,\n}: Pick<IR.OperationObject, 'method' | 'path'> & {\n  context: Context;\n  operation: Operation;\n  state: State;\n}): IR.OperationObject => {\n  const irOperation: IR.OperationObject = {\n    id: operationToId({\n      context,\n      id: operation.operationId,\n      method,\n      path,\n      state,\n    }),\n    method,\n    path,\n  };\n\n  if (operation.operationId) {\n    irOperation.operationId = operation.operationId;\n  }\n\n  parseOperationJsDoc({\n    irOperation,\n    operation,\n  });\n\n  parseExtensions({\n    source: operation,\n    target: irOperation,\n  });\n\n  return irOperation;\n};\n\nconst operationToIrOperation = ({\n  context,\n  method,\n  operation,\n  path,\n  securitySchemesMap,\n  state,\n}: Pick<IR.OperationObject, 'method' | 'path'> & {\n  context: Context;\n  operation: Operation;\n  securitySchemesMap: Map<string, SecuritySchemeObject>;\n  state: State;\n}): IR.OperationObject => {\n  const irOperation = initIrOperation({\n    context,\n    method,\n    operation,\n    path,\n    state,\n  });\n\n  if (operation.parameters) {\n    irOperation.parameters = operation.parameters;\n  }\n\n  if (operation.requestBody) {\n    const requestBody =\n      '$ref' in operation.requestBody\n        ? context.resolveRef<RequestBodyObject>(operation.requestBody.$ref)\n        : operation.requestBody;\n    const contents = mediaTypeObjects({ content: requestBody.content });\n    // TODO: add support for multiple content types, for now prefer JSON\n    const content = contents.find((content) => content.type === 'json') || contents[0];\n\n    if (content) {\n      const pagination = paginationField({\n        context,\n        name: '',\n        schema:\n          content.schema && '$ref' in content.schema\n            ? {\n                allOf: [{ ...content.schema }],\n                description: requestBody.description,\n              }\n            : {\n                description: requestBody.description,\n                ...content.schema,\n              },\n      });\n\n      irOperation.body = {\n        mediaType: content.mediaType,\n        schema: schemaToIrSchema({\n          context,\n          schema:\n            '$ref' in operation.requestBody\n              ? {\n                  allOf: [{ ...operation.requestBody }],\n                  description: requestBody.description,\n                }\n              : content.schema && '$ref' in content.schema\n                ? {\n                    allOf: [{ ...content.schema }],\n                    description: requestBody.description,\n                  }\n                : {\n                    description: requestBody.description,\n                    ...content.schema,\n                  },\n          state: undefined,\n        }),\n      };\n\n      if (pagination) {\n        irOperation.body.pagination = pagination;\n      }\n\n      if (requestBody.required) {\n        irOperation.body.required = requestBody.required;\n      }\n\n      if (content.type) {\n        irOperation.body.type = content.type;\n      }\n    }\n  }\n\n  for (const name in operation.responses) {\n    if (name.startsWith('x-')) continue;\n\n    if (!irOperation.responses) {\n      irOperation.responses = {};\n    }\n\n    const response = operation.responses[name]! as ResponseObject | ReferenceObject;\n    const responseObject =\n      '$ref' in response ? context.resolveRef<ResponseObject>(response.$ref) : response;\n    const contents = mediaTypeObjects({ content: responseObject.content });\n    // TODO: add support for multiple content types, for now prefer JSON\n    const content = contents.find((content) => content.type === 'json') || contents[0];\n\n    if (content) {\n      irOperation.responses[name] = {\n        mediaType: content.mediaType,\n        schema: schemaToIrSchema({\n          context,\n          schema: {\n            description: responseObject.description,\n            ...contentToSchema({ content }),\n          },\n          state: undefined,\n        }),\n      };\n    } else {\n      irOperation.responses[name] = {\n        schema: {\n          description: responseObject.description,\n          // TODO: parser - cover all statues with empty response bodies\n          // 1xx, 204, 205, 304\n          type: name === '204' ? 'void' : 'unknown',\n        },\n      };\n    }\n  }\n\n  if (operation.security) {\n    const securitySchemeObjects: Map<string, IR.SecurityObject> = new Map();\n\n    for (const securityRequirementObject of operation.security) {\n      for (const name in securityRequirementObject) {\n        const securitySchemeObject = securitySchemesMap.get(name);\n\n        if (!securitySchemeObject) {\n          continue;\n        }\n\n        securitySchemeObjects.set(name, securitySchemeObject);\n      }\n    }\n\n    if (securitySchemeObjects.size) {\n      irOperation.security = Array.from(securitySchemeObjects.values());\n    }\n  }\n\n  // TODO: parser - handle servers\n  // qux: operation.servers\n\n  return irOperation;\n};\n\nexport const parsePathOperation = ({\n  context,\n  method,\n  operation,\n  path,\n  securitySchemesMap,\n  state,\n}: {\n  context: Context;\n  method: Extract<\n    keyof PathItemObject,\n    'delete' | 'get' | 'head' | 'options' | 'patch' | 'post' | 'put' | 'trace'\n  >;\n  operation: Operation;\n  path: keyof IR.PathsObject;\n  securitySchemesMap: Map<string, SecuritySchemeObject>;\n  state: State;\n}) => {\n  if (!context.ir.paths) {\n    context.ir.paths = {};\n  }\n\n  if (!context.ir.paths[path]) {\n    context.ir.paths[path] = {};\n  }\n\n  if (operation.servers) {\n    context.ir.servers = [...(context.ir.servers ?? []), ...operation.servers];\n  }\n\n  context.ir.paths[path][method] = operationToIrOperation({\n    context,\n    method,\n    operation,\n    path,\n    securitySchemesMap,\n    state,\n  });\n};\n"
  },
  {
    "path": "packages/shared/src/openApi/3.0.x/parser/pagination.ts",
    "content": "import type { Context } from '../../../ir/context';\nimport { getPaginationKeywordsRegExp } from '../../../ir/pagination';\nimport type { SchemaType } from '../../../openApi/shared/types/schema';\nimport type { ParameterObject, ReferenceObject, RequestBodyObject } from '../types/spec';\nimport type { SchemaObject } from '../types/spec';\nimport { mediaTypeObjects } from './mediaType';\nimport { getSchemaType } from './schema';\n\nconst isPaginationType = (schemaType: SchemaType<SchemaObject> | undefined): boolean =>\n  schemaType === 'boolean' ||\n  schemaType === 'integer' ||\n  schemaType === 'number' ||\n  schemaType === 'string';\n\n// We handle only simple values for now, up to 1 nested field\nexport const paginationField = ({\n  context,\n  name,\n  schema,\n}: {\n  context: Context;\n  name: string;\n  schema: SchemaObject | ReferenceObject;\n}): boolean | string => {\n  const paginationRegExp = getPaginationKeywordsRegExp(context.config.parser.pagination);\n  if (paginationRegExp.test(name)) {\n    return true;\n  }\n\n  if ('$ref' in schema) {\n    const ref = context.resolveRef<ParameterObject | RequestBodyObject | SchemaObject>(schema.$ref);\n\n    if ('content' in ref || 'in' in ref) {\n      let refSchema: SchemaObject | ReferenceObject | undefined;\n\n      if ('in' in ref) {\n        refSchema = ref.schema;\n      }\n\n      if (!refSchema) {\n        // parameter or body\n        const contents = mediaTypeObjects({ content: ref.content });\n        // TODO: add support for multiple content types, for now prefer JSON\n        const content = contents.find((content) => content.type === 'json') || contents[0];\n        if (content?.schema) {\n          refSchema = content.schema;\n        }\n      }\n\n      if (!refSchema) {\n        return false;\n      }\n\n      return paginationField({\n        context,\n        name,\n        schema: refSchema,\n      });\n    }\n\n    return paginationField({\n      context,\n      name,\n      schema: ref,\n    });\n  }\n\n  for (const name in schema.properties) {\n    const paginationRegExp = getPaginationKeywordsRegExp(context.config.parser.pagination);\n\n    if (paginationRegExp.test(name)) {\n      const property = schema.properties[name]!;\n\n      if (typeof property !== 'boolean' && !('$ref' in property)) {\n        const schemaType = getSchemaType({ schema: property });\n        // TODO: resolve deeper references\n\n        if (isPaginationType(schemaType)) {\n          return name;\n        }\n      }\n    }\n  }\n\n  for (const allOf of schema.allOf ?? []) {\n    const pagination = paginationField({\n      context,\n      name,\n      schema: allOf,\n    });\n    if (pagination) {\n      return pagination;\n    }\n  }\n\n  return false;\n};\n"
  },
  {
    "path": "packages/shared/src/openApi/3.0.x/parser/parameter.ts",
    "content": "import type { Context } from '../../../ir/context';\nimport type { IR } from '../../../ir/types';\nimport { refToName } from '../../../utils/ref';\nimport type { ParameterObject, ReferenceObject, SchemaObject } from '../types/spec';\nimport { mediaTypeObjects } from './mediaType';\nimport { paginationField } from './pagination';\nimport { parseExtensions, schemaToIrSchema } from './schema';\n\n/**\n * Returns default parameter `allowReserved` based on value of `in`.\n */\nconst defaultAllowReserved = (_in: ParameterObject['in']): boolean | undefined => {\n  switch (_in) {\n    // this keyword only applies to parameters with an `in` value of `query`\n    case 'query':\n      return false;\n    default:\n      return;\n  }\n};\n\n/**\n * Returns default parameter `explode` based on value of `style`.\n */\nconst defaultExplode = (style: Required<ParameterObject>['style']): boolean => {\n  switch (style) {\n    // default value for `deepObject` is `false`, but that behavior is undefined\n    // so we use `true` to make this work with the `client-fetch` package\n    case 'deepObject':\n    case 'form':\n      return true;\n    default:\n      return false;\n  }\n};\n\n/**\n * Returns default parameter `style` based on value of `in`.\n */\nconst defaultStyle = (_in: ParameterObject['in']): Required<IR.ParameterObject>['style'] => {\n  switch (_in) {\n    case 'header':\n    case 'path':\n      return 'simple';\n    case 'cookie':\n    case 'query':\n      return 'form';\n  }\n};\n\nexport const parametersArrayToObject = ({\n  context,\n  parameters,\n}: {\n  context: Context;\n  parameters?: ReadonlyArray<ParameterObject | ReferenceObject>;\n}): IR.ParametersObject | undefined => {\n  if (!parameters || !Object.keys(parameters).length) {\n    return;\n  }\n\n  const parametersObject: IR.ParametersObject = {};\n\n  for (const parameterOrReference of parameters) {\n    const parameter =\n      '$ref' in parameterOrReference\n        ? context.dereference<ParameterObject>(parameterOrReference)\n        : parameterOrReference;\n\n    if (!parametersObject[parameter.in]) {\n      parametersObject[parameter.in] = {};\n    }\n\n    // lowercase keys for case insensitive access\n    parametersObject[parameter.in]![parameter.name.toLocaleLowerCase()] = parameterToIrParameter({\n      $ref: `#/todo/real/path/to/parameter/${parameter.name}`,\n      context,\n      parameter,\n    });\n  }\n\n  return parametersObject;\n};\n\nconst parameterToIrParameter = ({\n  $ref,\n  context,\n  parameter,\n}: {\n  $ref: string;\n  context: Context;\n  parameter: ParameterObject;\n}): IR.ParameterObject => {\n  // TODO: parser - fix\n  let schema = parameter.schema;\n\n  if (!schema) {\n    const contents = mediaTypeObjects({ content: parameter.content });\n    // TODO: add support for multiple content types, for now prefer JSON\n    const content = contents.find((content) => content.type === 'json') || contents[0];\n    if (content) {\n      schema = content.schema;\n    }\n  }\n\n  const finalSchema: SchemaObject =\n    schema && '$ref' in schema\n      ? {\n          allOf: [{ ...schema }],\n          deprecated: parameter.deprecated,\n          description: parameter.description,\n        }\n      : {\n          deprecated: parameter.deprecated,\n          description: parameter.description,\n          ...schema,\n        };\n\n  const pagination = paginationField({\n    context,\n    name: parameter.name,\n    schema: finalSchema,\n  });\n\n  const style = parameter.style || defaultStyle(parameter.in);\n  const explode = parameter.explode !== undefined ? parameter.explode : defaultExplode(style);\n  const allowReserved =\n    parameter.allowReserved !== undefined\n      ? parameter.allowReserved\n      : defaultAllowReserved(parameter.in);\n\n  const irParameter: IR.ParameterObject = {\n    allowReserved,\n    explode,\n    location: parameter.in,\n    name: parameter.name,\n    schema: schemaToIrSchema({\n      context,\n      schema: finalSchema,\n      state: {\n        $ref,\n        circularReferenceTracker: new Set(),\n      },\n    }),\n    style,\n  };\n\n  if (parameter.deprecated) {\n    irParameter.deprecated = parameter.deprecated;\n  }\n\n  if (parameter.description) {\n    irParameter.description = parameter.description;\n  }\n\n  if (pagination) {\n    irParameter.pagination = pagination;\n  }\n\n  if (parameter.required) {\n    irParameter.required = parameter.required;\n  }\n\n  parseExtensions({\n    source: parameter,\n    target: irParameter,\n  });\n\n  return irParameter;\n};\n\nexport const parseParameter = ({\n  $ref,\n  context,\n  parameter,\n}: {\n  $ref: string;\n  context: Context;\n  parameter: ParameterObject;\n}) => {\n  if (!context.ir.components) {\n    context.ir.components = {};\n  }\n\n  if (!context.ir.components.parameters) {\n    context.ir.components.parameters = {};\n  }\n\n  context.ir.components.parameters[refToName($ref)] = parameterToIrParameter({\n    $ref,\n    context,\n    parameter,\n  });\n};\n"
  },
  {
    "path": "packages/shared/src/openApi/3.0.x/parser/requestBody.ts",
    "content": "import type { Context } from '../../../ir/context';\nimport type { IR } from '../../../ir/types';\nimport { refToName } from '../../../utils/ref';\nimport type { RequestBodyObject, SchemaObject } from '../types/spec';\nimport { mediaTypeObjects } from './mediaType';\nimport { schemaToIrSchema } from './schema';\n\nconst requestBodyToIrRequestBody = ({\n  $ref,\n  context,\n  requestBody,\n}: {\n  $ref: string;\n  context: Context;\n  requestBody: RequestBodyObject;\n}): IR.RequestBodyObject => {\n  // TODO: parser - fix\n  const contents = mediaTypeObjects({ content: requestBody.content });\n  // TODO: add support for multiple content types, for now prefer JSON\n  const content = contents.find((content) => content.type === 'json') || contents[0];\n  const schema = content ? content.schema : undefined;\n\n  const finalSchema: SchemaObject = {\n    description: requestBody.description,\n    ...schema,\n  };\n\n  const irRequestBody: IR.RequestBodyObject = {\n    schema: schemaToIrSchema({\n      context,\n      schema: finalSchema,\n      state: {\n        $ref,\n        circularReferenceTracker: new Set(),\n      },\n    }),\n  };\n\n  if (requestBody.description) {\n    irRequestBody.description = requestBody.description;\n  }\n\n  if (requestBody.required) {\n    irRequestBody.required = requestBody.required;\n  }\n\n  return irRequestBody;\n};\n\nexport const parseRequestBody = ({\n  $ref,\n  context,\n  requestBody,\n}: {\n  $ref: string;\n  context: Context;\n  requestBody: RequestBodyObject;\n}) => {\n  if (!context.ir.components) {\n    context.ir.components = {};\n  }\n\n  if (!context.ir.components.requestBodies) {\n    context.ir.components.requestBodies = {};\n  }\n\n  context.ir.components.requestBodies[refToName($ref)] = requestBodyToIrRequestBody({\n    $ref,\n    context,\n    requestBody,\n  });\n};\n"
  },
  {
    "path": "packages/shared/src/openApi/3.0.x/parser/schema.ts",
    "content": "import type { Context } from '../../../ir/context';\nimport type { IR } from '../../../ir/types';\nimport { addItemsToSchema } from '../../../ir/utils';\nimport type {\n  SchemaState,\n  SchemaType,\n  SchemaWithRequired,\n} from '../../../openApi/shared/types/schema';\nimport {\n  convertDiscriminatorValue,\n  type DiscriminatorPropertyType,\n  discriminatorValues,\n} from '../../../openApi/shared/utils/discriminator';\nimport { isTopLevelComponent, refToName } from '../../../utils/ref';\nimport type { ReferenceObject, SchemaObject } from '../types/spec';\n\nexport const getSchemaType = ({\n  schema,\n}: {\n  schema: SchemaObject;\n}): SchemaType<SchemaObject> | undefined => {\n  if (schema.type) {\n    return schema.type;\n  }\n\n  // infer object based on the presence of properties\n  if (schema.properties) {\n    return 'object';\n  }\n\n  return;\n};\n\n/**\n * Finds the type of a discriminator property by looking it up in the provided schemas.\n * Searches through properties and allOf chains to find the property definition.\n */\nconst findDiscriminatorPropertyType = ({\n  context,\n  propertyName,\n  schemas,\n}: {\n  context: Context;\n  propertyName: string;\n  schemas: ReadonlyArray<SchemaObject | ReferenceObject>;\n}): DiscriminatorPropertyType => {\n  for (const schema of schemas) {\n    const resolved = '$ref' in schema ? context.resolveRef<SchemaObject>(schema.$ref) : schema;\n\n    // Check direct properties\n    const property = resolved.properties?.[propertyName];\n    if (property) {\n      const resolvedProperty =\n        '$ref' in property ? context.resolveRef<SchemaObject>(property.$ref) : property;\n      if (\n        resolvedProperty.type === 'boolean' ||\n        resolvedProperty.type === 'integer' ||\n        resolvedProperty.type === 'number'\n      ) {\n        return resolvedProperty.type;\n      }\n    }\n\n    // Check allOf chains\n    if (resolved.allOf) {\n      const foundType = findDiscriminatorPropertyType({\n        context,\n        propertyName,\n        schemas: resolved.allOf,\n      });\n      if (foundType !== 'string') {\n        return foundType;\n      }\n    }\n  }\n\n  return 'string';\n};\n\n/**\n * Recursively finds discriminators in a schema, including nested allOf compositions.\n * This is needed when a schema extends another schema via allOf, and that parent\n * schema is itself an allOf composition with discriminators in inline schemas.\n */\nconst findDiscriminatorsInSchema = ({\n  context,\n  discriminators = [],\n  schema,\n}: {\n  context: Context;\n  discriminators?: Array<{\n    discriminator: NonNullable<SchemaObject['discriminator']>;\n    oneOf?: SchemaObject['oneOf'];\n  }>;\n  schema: SchemaObject;\n}): Array<{\n  discriminator: NonNullable<SchemaObject['discriminator']>;\n  oneOf?: SchemaObject['oneOf'];\n}> => {\n  // Check if this schema has a discriminator\n  if (schema.discriminator) {\n    discriminators.push({\n      discriminator: schema.discriminator,\n      oneOf: schema.oneOf,\n    });\n  }\n\n  // If this schema is an allOf composition, recursively search in its components\n  if (schema.allOf) {\n    for (const compositionSchema of schema.allOf) {\n      let resolvedSchema: SchemaObject;\n      if ('$ref' in compositionSchema) {\n        resolvedSchema = context.resolveRef<SchemaObject>(compositionSchema.$ref);\n      } else {\n        resolvedSchema = compositionSchema;\n      }\n\n      findDiscriminatorsInSchema({\n        context,\n        discriminators,\n        schema: resolvedSchema,\n      });\n    }\n  }\n\n  return discriminators;\n};\n\n/**\n * Gets the discriminator value for a schema.\n * Returns only the schema's own discriminator value, not child values.\n */\nconst getAllDiscriminatorValues = ({\n  discriminator,\n  schemaRef,\n}: {\n  discriminator: NonNullable<SchemaObject['discriminator']>;\n  schemaRef: string;\n}): Array<string> => {\n  const values: Array<string> = [];\n\n  // Check each entry in the discriminator mapping\n  for (const [value, mappedSchemaRef] of Object.entries(discriminator.mapping || {})) {\n    if (mappedSchemaRef === schemaRef) {\n      // This is the current schema's own value\n      values.push(value);\n    }\n  }\n\n  return values;\n};\n\nconst parseSchemaJsDoc = ({\n  irSchema,\n  schema,\n}: {\n  irSchema: IR.SchemaObject;\n  schema: SchemaObject;\n}) => {\n  if (schema.deprecated !== undefined) {\n    irSchema.deprecated = schema.deprecated;\n  }\n\n  if (schema.example) {\n    irSchema.example = schema.example;\n  }\n\n  if (schema.description) {\n    irSchema.description = schema.description;\n  }\n\n  if (schema.title) {\n    irSchema.title = schema.title;\n  }\n};\n\nconst parseSchemaMeta = ({\n  irSchema,\n  schema,\n}: {\n  irSchema: IR.SchemaObject;\n  schema: SchemaObject;\n}) => {\n  if (schema.default !== undefined) {\n    irSchema.default = schema.default;\n  }\n\n  if (schema.exclusiveMaximum) {\n    if (schema.maximum !== undefined) {\n      irSchema.exclusiveMaximum = schema.maximum;\n    }\n  } else if (schema.maximum !== undefined) {\n    irSchema.maximum = schema.maximum;\n  }\n\n  if (schema.exclusiveMinimum) {\n    if (schema.minimum !== undefined) {\n      irSchema.exclusiveMinimum = schema.minimum;\n    }\n  } else if (schema.minimum !== undefined) {\n    irSchema.minimum = schema.minimum;\n  }\n\n  if (schema.format) {\n    irSchema.format = schema.format;\n  }\n\n  if (schema.maxItems !== undefined) {\n    irSchema.maxItems = schema.maxItems;\n  }\n\n  if (schema.maxLength !== undefined) {\n    irSchema.maxLength = schema.maxLength;\n  }\n\n  if (schema.minItems !== undefined) {\n    irSchema.minItems = schema.minItems;\n  }\n\n  if (schema.minLength !== undefined) {\n    irSchema.minLength = schema.minLength;\n  }\n\n  if (schema.pattern) {\n    irSchema.pattern = schema.pattern;\n  }\n\n  if (schema.readOnly) {\n    irSchema.accessScope = 'read';\n  } else if (schema.writeOnly) {\n    irSchema.accessScope = 'write';\n  }\n};\n\nconst parseArray = ({\n  context,\n  irSchema = {},\n  schema,\n  state,\n}: {\n  context: Context;\n  irSchema?: IR.SchemaObject;\n  schema: SchemaObject;\n  state: SchemaState;\n}): IR.SchemaObject => {\n  if (schema.maxItems && schema.maxItems === schema.minItems) {\n    irSchema.type = 'tuple';\n  } else {\n    irSchema.type = 'array';\n  }\n\n  let schemaItems: Array<IR.SchemaObject> = [];\n\n  if (schema.items) {\n    const irItemsSchema = schemaToIrSchema({\n      context,\n      schema: schema.items,\n      state,\n    });\n\n    if (!schemaItems.length && schema.maxItems && schema.maxItems === schema.minItems) {\n      schemaItems = Array(schema.maxItems).fill(irItemsSchema);\n    } else {\n      if ('$ref' in schema.items) {\n        schemaItems.push(irItemsSchema);\n      } else {\n        const ofArray = schema.items.allOf || schema.items.anyOf || schema.items.oneOf;\n        if (ofArray && ofArray.length > 1 && !schema.items.nullable) {\n          // bring composition up to avoid incorrectly nested arrays\n          irSchema = {\n            ...irSchema,\n            ...irItemsSchema,\n          };\n        } else {\n          schemaItems.push(irItemsSchema);\n        }\n      }\n    }\n  }\n\n  irSchema = addItemsToSchema({\n    items: schemaItems,\n    schema: irSchema,\n  });\n\n  return irSchema;\n};\n\nconst parseBoolean = ({\n  irSchema = {},\n}: {\n  context: Context;\n  irSchema?: IR.SchemaObject;\n  schema: SchemaObject;\n  state: SchemaState;\n}): IR.SchemaObject => {\n  irSchema.type = 'boolean';\n\n  return irSchema;\n};\n\nconst parseNumber = ({\n  irSchema = {},\n  schema,\n}: {\n  context: Context;\n  irSchema?: IR.SchemaObject;\n  schema: SchemaWithRequired<SchemaObject, 'type'>;\n  state: SchemaState;\n}): IR.SchemaObject => {\n  irSchema.type = schema.type;\n\n  return irSchema;\n};\n\nconst parseObject = ({\n  context,\n  irSchema = {},\n  schema,\n  state,\n}: {\n  context: Context;\n  irSchema?: IR.SchemaObject;\n  schema: SchemaObject;\n  state: SchemaState;\n}): IR.SchemaObject => {\n  irSchema.type = 'object';\n\n  const schemaProperties: Record<string, IR.SchemaObject> = {};\n\n  for (const name in schema.properties) {\n    const property = schema.properties[name]!;\n    if (typeof property === 'boolean') {\n      // TODO: parser - handle boolean properties\n    } else {\n      schemaProperties[name] = schemaToIrSchema({\n        context,\n        schema: property,\n        state,\n      });\n    }\n  }\n\n  if (Object.keys(schemaProperties).length) {\n    irSchema.properties = schemaProperties;\n  }\n\n  if (schema.additionalProperties === undefined) {\n    if (!irSchema.properties) {\n      irSchema.additionalProperties = {\n        type: 'unknown',\n      };\n    }\n  } else if (typeof schema.additionalProperties === 'boolean') {\n    // Avoid [key: string]: never for empty objects with additionalProperties: false inside allOf\n    // This would override inherited properties from other schemas in the composition\n    const isEmptyObjectInAllOf =\n      state.inAllOf &&\n      schema.additionalProperties === false &&\n      (!schema.properties || !Object.keys(schema.properties).length);\n\n    if (!isEmptyObjectInAllOf) {\n      irSchema.additionalProperties = {\n        type: schema.additionalProperties ? 'unknown' : 'never',\n      };\n    }\n  } else {\n    const irAdditionalPropertiesSchema = schemaToIrSchema({\n      context,\n      schema: schema.additionalProperties,\n      state,\n    });\n    irSchema.additionalProperties = irAdditionalPropertiesSchema;\n  }\n\n  if (schema.required) {\n    irSchema.required = schema.required;\n  }\n\n  if (schema.discriminator && state.$ref) {\n    const values = getAllDiscriminatorValues({\n      discriminator: schema.discriminator,\n      schemaRef: state.$ref,\n    });\n\n    if (values.length) {\n      const propertyType = findDiscriminatorPropertyType({\n        context,\n        propertyName: schema.discriminator.propertyName,\n        schemas: [schema],\n      });\n      const valueSchemas: ReadonlyArray<IR.SchemaObject> = values.map((value) =>\n        convertDiscriminatorValue(value, propertyType),\n      );\n\n      if (!irSchema.properties) {\n        irSchema.properties = {};\n      }\n\n      irSchema.properties[schema.discriminator.propertyName] =\n        valueSchemas.length > 1\n          ? {\n              items: valueSchemas,\n              logicalOperator: 'or',\n            }\n          : valueSchemas[0]!;\n    }\n  }\n\n  return irSchema;\n};\n\nconst parseString = ({\n  irSchema = {},\n}: {\n  context: Context;\n  irSchema?: IR.SchemaObject;\n  schema: SchemaObject;\n  state: SchemaState;\n}): IR.SchemaObject => {\n  irSchema.type = 'string';\n\n  return irSchema;\n};\n\nexport const parseExtensions = ({ source, target }: { source: object; target: object }) => {\n  for (const key in source) {\n    if (key.startsWith('x-')) {\n      (target as Record<string, unknown>)[key] = (source as Record<string, unknown>)[key];\n    }\n  }\n};\n\nconst initIrSchema = ({ schema }: { schema: SchemaObject }): IR.SchemaObject => {\n  const irSchema: IR.SchemaObject = {};\n\n  parseSchemaJsDoc({\n    irSchema,\n    schema,\n  });\n\n  parseExtensions({\n    source: schema,\n    target: irSchema,\n  });\n\n  return irSchema;\n};\n\nconst parseAllOf = ({\n  context,\n  schema,\n  state,\n}: {\n  context: Context;\n  schema: SchemaWithRequired<SchemaObject, 'allOf'>;\n  state: SchemaState;\n}): IR.SchemaObject => {\n  let irSchema = initIrSchema({ schema });\n\n  const schemaItems: Array<IR.SchemaObject> = [];\n  const schemaType = getSchemaType({ schema });\n\n  const compositionSchemas = schema.allOf;\n\n  // Collect discriminator information to add after all compositions are processed\n  type DiscriminatorInfo = {\n    discriminator: NonNullable<SchemaObject['discriminator']>;\n    isExplicitMapping: boolean;\n    isRequired: boolean;\n    values: ReadonlyArray<string>;\n  };\n  const discriminatorsToAdd: Array<DiscriminatorInfo> = [];\n\n  for (const compositionSchema of compositionSchemas) {\n    const originalInAllOf = state.inAllOf;\n    // Don't propagate inAllOf flag to $ref schemas to avoid issues with reusable components\n    if (!('$ref' in compositionSchema)) {\n      state.inAllOf = true;\n    }\n    const irCompositionSchema = schemaToIrSchema({\n      context,\n      schema: compositionSchema,\n      state,\n    });\n    state.inAllOf = originalInAllOf;\n    if (state.inAllOf === undefined) {\n      delete state.inAllOf;\n    }\n\n    if (schema.required) {\n      if (irCompositionSchema.required) {\n        irCompositionSchema.required = [...irCompositionSchema.required, ...schema.required];\n      } else {\n        irCompositionSchema.required = schema.required;\n      }\n    }\n\n    schemaItems.push(irCompositionSchema);\n\n    if ('$ref' in compositionSchema) {\n      const ref = context.resolveRef<SchemaObject>(compositionSchema.$ref);\n      // `$ref` should be passed from the root `parseSchema()` call\n      if (state.$ref) {\n        // Find all discriminators in the referenced schema, including nested allOf compositions\n        const discriminators = findDiscriminatorsInSchema({\n          context,\n          schema: ref,\n        });\n\n        for (const { discriminator, oneOf } of discriminators) {\n          const values = discriminatorValues(\n            state.$ref,\n            discriminator.mapping,\n            // If the ref has oneOf, we only use the schema name as the value\n            // only if current schema is part of the oneOf. Else it is extending\n            // the ref schema\n            oneOf ? () => oneOf.some((o) => '$ref' in o && o.$ref === state.$ref) : undefined,\n          );\n\n          if (values.length === 0) {\n            continue;\n          }\n\n          // True when state.$ref appears directly in the mapping; false when the\n          // value fell back to the schema name because no mapping entry matched.\n          const isExplicitMapping =\n            discriminator.mapping !== undefined &&\n            Object.values(discriminator.mapping).includes(state.$ref);\n\n          // An explicit mapping always beats a same-property fallback collected\n          // earlier (e.g. from a grandparent discriminator that doesn't list this\n          // schema). Replace it; otherwise skip the duplicate.\n          const existingIndex = discriminatorsToAdd.findIndex(\n            (d) => d.discriminator.propertyName === discriminator.propertyName,\n          );\n          if (existingIndex !== -1) {\n            if (isExplicitMapping && !discriminatorsToAdd[existingIndex]!.isExplicitMapping) {\n              discriminatorsToAdd.splice(existingIndex, 1);\n            } else {\n              continue;\n            }\n          }\n\n          const isRequired = discriminators.some(\n            (d) =>\n              d.discriminator.propertyName === discriminator.propertyName &&\n              (ref.required?.includes(d.discriminator.propertyName) ||\n                (ref.allOf &&\n                  ref.allOf.some((item) => {\n                    const resolvedItem =\n                      '$ref' in item ? context.resolveRef<SchemaObject>(item.$ref) : item;\n                    return resolvedItem.required?.includes(d.discriminator.propertyName);\n                  }))),\n          );\n\n          discriminatorsToAdd.push({\n            discriminator,\n            isExplicitMapping,\n            isRequired,\n            values,\n          });\n        }\n      }\n    }\n  }\n\n  // Now add discriminators after all compositions have been processed\n  for (const { discriminator, isRequired, values } of discriminatorsToAdd) {\n    // Get all discriminator values including children for union types\n    const allValues = getAllDiscriminatorValues({\n      discriminator,\n      schemaRef: state.$ref!,\n    });\n\n    // Use allValues if we found children, otherwise use the original values\n    const finalValues = allValues.length > 0 ? allValues : values;\n\n    // Detect the actual type of the discriminator property\n    const propertyType = findDiscriminatorPropertyType({\n      context,\n      propertyName: discriminator.propertyName,\n      schemas: compositionSchemas,\n    });\n\n    const valueSchemas: ReadonlyArray<IR.SchemaObject> = finalValues.map((value) =>\n      convertDiscriminatorValue(value, propertyType),\n    );\n\n    const discriminatorProperty: IR.SchemaObject =\n      valueSchemas.length > 1\n        ? {\n            items: valueSchemas,\n            logicalOperator: 'or',\n          }\n        : valueSchemas[0]!;\n\n    // Check if any $ref schemas in schemaItems have this discriminator property\n    // If yes, mark them to omit it to avoid conflicts\n    for (const item of schemaItems) {\n      if (item.$ref || item.symbolRef) {\n        // Check if the referenced schema has this property\n        const hasProperty = (() => {\n          if (!item.$ref) return false;\n          try {\n            const refSchema = context.resolveRef<SchemaObject>(item.$ref);\n            // Check if the discriminator property exists in the ref schema\n            return (\n              refSchema.properties?.[discriminator.propertyName] !== undefined ||\n              (refSchema.allOf &&\n                refSchema.allOf.some((allOfItem) => {\n                  const resolved =\n                    '$ref' in allOfItem\n                      ? context.resolveRef<SchemaObject>(allOfItem.$ref)\n                      : allOfItem;\n                  return resolved.properties?.[discriminator.propertyName] !== undefined;\n                }))\n            );\n          } catch {\n            return false;\n          }\n        })();\n\n        if (hasProperty) {\n          // Mark this ref to omit the discriminator property\n          if (!item.omit) {\n            item.omit = [discriminator.propertyName];\n          } else if (!item.omit.includes(discriminator.propertyName)) {\n            item.omit = [...item.omit, discriminator.propertyName];\n          }\n        }\n      }\n    }\n\n    // Find the inline schema (non-$ref) to merge the discriminator property into\n    // The inline schema should be the last non-$ref item in schemaItems\n    let inlineSchema: IR.SchemaObject | undefined;\n    for (let i = schemaItems.length - 1; i >= 0; i--) {\n      const item = schemaItems[i]!;\n      // Check if this is not a $ref schema by looking for properties or checking if it came from an inline schema\n      if (item.type === 'object' || item.properties) {\n        inlineSchema = item;\n        break;\n      }\n    }\n\n    // If we found an inline schema, add the discriminator property to it\n    if (inlineSchema) {\n      if (!inlineSchema.properties) {\n        inlineSchema.properties = {};\n      }\n      inlineSchema.properties[discriminator.propertyName] = discriminatorProperty;\n\n      if (isRequired) {\n        if (!inlineSchema.required) {\n          inlineSchema.required = [];\n        }\n        if (!inlineSchema.required.includes(discriminator.propertyName)) {\n          inlineSchema.required = [...inlineSchema.required, discriminator.propertyName];\n        }\n      }\n    } else {\n      // Fallback: create a separate discriminator schema if no inline schema found\n      const irDiscriminatorSchema: IR.SchemaObject = {\n        properties: {\n          [discriminator.propertyName]: discriminatorProperty,\n        },\n        type: 'object',\n      };\n\n      if (isRequired) {\n        irDiscriminatorSchema.required = [discriminator.propertyName];\n      }\n      schemaItems.push(irDiscriminatorSchema);\n    }\n  }\n\n  if (schemaType === 'object') {\n    const irObjectSchema = parseOneType({\n      context,\n      schema: {\n        ...schema,\n        type: 'object',\n      },\n      state,\n    });\n\n    if (irObjectSchema.properties) {\n      for (const requiredProperty of irObjectSchema.required ?? []) {\n        if (!irObjectSchema.properties[requiredProperty]) {\n          for (const compositionSchema of compositionSchemas) {\n            // TODO: parser - this could be probably resolved more accurately\n            const finalCompositionSchema =\n              '$ref' in compositionSchema\n                ? context.resolveRef<SchemaObject>(compositionSchema.$ref)\n                : compositionSchema;\n\n            if (getSchemaType({ schema: finalCompositionSchema }) === 'object') {\n              const irCompositionSchema = parseOneType({\n                context,\n                schema: {\n                  ...finalCompositionSchema,\n                  type: 'object',\n                },\n                state,\n              });\n\n              if (irCompositionSchema.properties?.[requiredProperty]) {\n                irObjectSchema.properties[requiredProperty] =\n                  irCompositionSchema.properties[requiredProperty];\n                break;\n              }\n            }\n          }\n        }\n      }\n      schemaItems.push(irObjectSchema);\n    }\n  }\n\n  irSchema = addItemsToSchema({\n    items: schemaItems,\n    logicalOperator: 'and',\n    mutateSchemaOneItem: true,\n    schema: irSchema,\n  });\n\n  if (schema.nullable) {\n    // nest composition to avoid producing an intersection with null\n    const nestedItems: Array<IR.SchemaObject> = [\n      {\n        type: 'null',\n      },\n    ];\n\n    if (schemaItems.length) {\n      nestedItems.unshift(irSchema);\n    }\n\n    irSchema = {\n      items: nestedItems,\n      logicalOperator: 'or',\n    };\n\n    // TODO: parser - this is a hack to bring back up meta fields\n    // without it, some schemas were missing original deprecated\n    if (nestedItems[0]!.deprecated) {\n      irSchema.deprecated = nestedItems[0]!.deprecated;\n    }\n\n    // TODO: parser - this is a hack to bring back up meta fields\n    // without it, some schemas were missing original description\n    if (nestedItems[0]!.description) {\n      irSchema.description = nestedItems[0]!.description;\n    }\n  }\n\n  return irSchema;\n};\n\nconst parseAnyOf = ({\n  context,\n  schema,\n  state,\n}: {\n  context: Context;\n  schema: SchemaWithRequired<SchemaObject, 'anyOf'>;\n  state: SchemaState;\n}): IR.SchemaObject => {\n  let irSchema = initIrSchema({ schema });\n\n  const schemaItems: Array<IR.SchemaObject> = [];\n  const schemaType = getSchemaType({ schema });\n\n  const compositionSchemas = schema.anyOf;\n\n  const discriminatorPropertyType = schema.discriminator\n    ? findDiscriminatorPropertyType({\n        context,\n        propertyName: schema.discriminator.propertyName,\n        schemas: compositionSchemas,\n      })\n    : undefined;\n\n  for (const compositionSchema of compositionSchemas) {\n    let irCompositionSchema = schemaToIrSchema({\n      context,\n      schema: compositionSchema,\n      state,\n    });\n\n    // `$ref` should be defined with discriminators\n    if (schema.discriminator && irCompositionSchema.$ref != null) {\n      const values = discriminatorValues(irCompositionSchema.$ref, schema.discriminator.mapping);\n\n      const valueSchemas: ReadonlyArray<IR.SchemaObject> = values.map((value) =>\n        convertDiscriminatorValue(value, discriminatorPropertyType!),\n      );\n      const irDiscriminatorSchema: IR.SchemaObject = {\n        properties: {\n          [schema.discriminator.propertyName]:\n            valueSchemas.length > 1\n              ? {\n                  items: valueSchemas,\n                  logicalOperator: 'or',\n                }\n              : valueSchemas[0]!,\n        },\n        type: 'object',\n      };\n      irCompositionSchema = {\n        items: [irDiscriminatorSchema, irCompositionSchema],\n        logicalOperator: 'and',\n      };\n    }\n\n    schemaItems.push(irCompositionSchema);\n  }\n\n  if (schema.nullable) {\n    schemaItems.push({ type: 'null' });\n  }\n\n  irSchema = addItemsToSchema({\n    items: schemaItems,\n    mutateSchemaOneItem: true,\n    schema: irSchema,\n  });\n\n  if (schemaType === 'object') {\n    // nest composition to avoid producing a union with object properties\n    const irObjectSchema = parseOneType({\n      context,\n      schema: {\n        ...schema,\n        type: 'object',\n      },\n      state,\n    });\n\n    if (irObjectSchema.properties) {\n      irSchema = {\n        items: [irSchema, irObjectSchema],\n        logicalOperator: 'and',\n      };\n    }\n  }\n\n  return irSchema;\n};\n\nconst parseEnum = ({\n  context,\n  schema,\n  state,\n}: {\n  context: Context;\n  schema: SchemaWithRequired<SchemaObject, 'enum'>;\n  state: SchemaState;\n}): IR.SchemaObject => {\n  let irSchema = initIrSchema({ schema });\n\n  irSchema.type = 'enum';\n\n  const schemaItems: Array<IR.SchemaObject> = [];\n\n  for (const [index, enumValue] of schema.enum.entries()) {\n    const typeOfEnumValue = typeof enumValue;\n    let enumType: SchemaType<SchemaObject> | 'null' | undefined;\n\n    if (\n      typeOfEnumValue === 'string' ||\n      typeOfEnumValue === 'number' ||\n      typeOfEnumValue === 'boolean'\n    ) {\n      enumType = typeOfEnumValue;\n    } else if (typeOfEnumValue === 'object' && Array.isArray(enumValue)) {\n      enumType = 'array';\n    } else if (enumValue === null) {\n      // nullable must be true\n      if (schema.nullable) {\n        enumType = 'null';\n      }\n    } else {\n      console.warn(\n        '🚨',\n        `unhandled \"${typeOfEnumValue}\" typeof value \"${enumValue}\" for enum`,\n        schema.enum,\n      );\n    }\n\n    if (!enumType) {\n      continue;\n    }\n\n    const irTypeSchema = parseOneType({\n      context,\n      schema: {\n        description: schema['x-enum-descriptions']?.[index],\n        title: schema['x-enum-varnames']?.[index] ?? schema['x-enumNames']?.[index],\n        // cast enum to string temporarily\n        type: enumType === 'null' ? 'string' : enumType,\n      },\n      state,\n    });\n\n    irTypeSchema.const = enumValue;\n\n    // cast enum back\n    if (enumType === 'null') {\n      irTypeSchema.type = enumType;\n    }\n\n    if (irTypeSchema.type === 'array') {\n      irTypeSchema.type = 'tuple';\n    }\n\n    schemaItems.push(irTypeSchema);\n  }\n\n  irSchema = addItemsToSchema({\n    items: schemaItems,\n    schema: irSchema,\n  });\n\n  return irSchema;\n};\n\nconst parseOneOf = ({\n  context,\n  schema,\n  state,\n}: {\n  context: Context;\n  schema: SchemaWithRequired<SchemaObject, 'oneOf'>;\n  state: SchemaState;\n}): IR.SchemaObject => {\n  let irSchema = initIrSchema({ schema });\n\n  let schemaItems: Array<IR.SchemaObject> = [];\n  const schemaType = getSchemaType({ schema });\n\n  const compositionSchemas = schema.oneOf;\n\n  const discriminatorPropertyType = schema.discriminator\n    ? findDiscriminatorPropertyType({\n        context,\n        propertyName: schema.discriminator.propertyName,\n        schemas: compositionSchemas,\n      })\n    : undefined;\n\n  for (const compositionSchema of compositionSchemas) {\n    let irCompositionSchema = schemaToIrSchema({\n      context,\n      schema: compositionSchema,\n      state,\n    });\n\n    // `$ref` should be defined with discriminators\n    if (schema.discriminator && irCompositionSchema.$ref != null) {\n      const values = discriminatorValues(irCompositionSchema.$ref, schema.discriminator.mapping);\n\n      const valueSchemas: ReadonlyArray<IR.SchemaObject> = values.map((value) =>\n        convertDiscriminatorValue(value, discriminatorPropertyType!),\n      );\n      const irDiscriminatorSchema: IR.SchemaObject = {\n        properties: {\n          [schema.discriminator.propertyName]:\n            valueSchemas.length > 1\n              ? {\n                  items: valueSchemas,\n                  logicalOperator: 'or',\n                }\n              : valueSchemas[0]!,\n        },\n        required: [schema.discriminator.propertyName],\n        type: 'object',\n      };\n      irCompositionSchema = {\n        items: [irDiscriminatorSchema, irCompositionSchema],\n        logicalOperator: 'and',\n      };\n    }\n\n    // since we know oneOf will be using \"or\" logical operator, if the parsed\n    // composition schema also has an \"or\" operator, we can bring it up\n    // to avoid unnecessary brackets\n    if (\n      irCompositionSchema.logicalOperator === 'or' &&\n      irCompositionSchema.type !== 'array' &&\n      irCompositionSchema.items\n    ) {\n      schemaItems = schemaItems.concat(irCompositionSchema.items);\n    } else {\n      schemaItems.push(irCompositionSchema);\n    }\n  }\n\n  if (schema.nullable) {\n    schemaItems.push({ type: 'null' });\n  }\n\n  irSchema = addItemsToSchema({\n    items: schemaItems,\n    mutateSchemaOneItem: true,\n    schema: irSchema,\n  });\n\n  if (schemaType === 'object') {\n    // nest composition to avoid producing a union with object properties\n    const irObjectSchema = parseOneType({\n      context,\n      schema: {\n        ...schema,\n        type: 'object',\n      },\n      state,\n    });\n\n    if (irObjectSchema.properties) {\n      irSchema = {\n        items: [irSchema, irObjectSchema],\n        logicalOperator: 'and',\n      };\n    }\n  }\n\n  return irSchema;\n};\n\nconst parseRef = ({\n  context,\n  schema,\n  state,\n}: {\n  context: Context;\n  schema: ReferenceObject;\n  state: SchemaState;\n}): IR.SchemaObject => {\n  // Inline non-component refs (e.g. #/paths/...) and deep path refs (e.g. #/components/schemas/Foo/properties/bar)\n  // to avoid generating orphaned named types or referencing unregistered symbols\n  const isComponentsRef = isTopLevelComponent(schema.$ref);\n  if (!isComponentsRef) {\n    if (!state.circularReferenceTracker.has(schema.$ref)) {\n      const refSchema = context.resolveRef<SchemaObject>(schema.$ref);\n      const originalRef = state.$ref;\n      state.$ref = schema.$ref;\n      const irSchema = schemaToIrSchema({\n        context,\n        schema: refSchema,\n        state,\n      });\n      state.$ref = originalRef;\n      return irSchema;\n    }\n    // Fallback to preserving the ref if circular\n  }\n\n  const irSchema: IR.SchemaObject = {};\n\n  // refs using unicode characters become encoded, didn't investigate why\n  // but the suspicion is this comes from `@hey-api/json-schema-ref-parser`\n  irSchema.$ref = decodeURI(schema.$ref);\n\n  if (!state.circularReferenceTracker.has(schema.$ref)) {\n    const refSchema = context.resolveRef<SchemaObject>(schema.$ref);\n    const originalRef = state.$ref;\n    state.$ref = schema.$ref;\n    schemaToIrSchema({\n      context,\n      schema: refSchema,\n      state,\n    });\n    state.$ref = originalRef;\n  }\n\n  return irSchema;\n};\n\nconst parseNullableType = ({\n  context,\n  irSchema,\n  schema,\n  state,\n}: {\n  context: Context;\n  irSchema?: IR.SchemaObject;\n  schema: SchemaWithRequired<SchemaObject, 'type'>;\n  state: SchemaState;\n}): IR.SchemaObject => {\n  if (!irSchema) {\n    irSchema = initIrSchema({ schema });\n  }\n\n  const typeIrSchema: IR.SchemaObject = {};\n\n  parseSchemaMeta({ irSchema: typeIrSchema, schema });\n\n  if (typeIrSchema.default === null) {\n    // clear to avoid duplicate default inside the non-null schema.\n    // this would produce incorrect validator output\n    delete typeIrSchema.default;\n  }\n\n  const schemaItems: Array<IR.SchemaObject> = [\n    parseOneType({\n      context,\n      irSchema: typeIrSchema,\n      schema,\n      state,\n    }),\n    {\n      type: 'null',\n    },\n  ];\n\n  irSchema = addItemsToSchema({\n    items: schemaItems,\n    schema: irSchema,\n  });\n\n  return irSchema;\n};\n\nconst parseType = ({\n  context,\n  schema,\n  state,\n}: {\n  context: Context;\n  schema: SchemaWithRequired<SchemaObject, 'type'>;\n  state: SchemaState;\n}): IR.SchemaObject => {\n  const irSchema = initIrSchema({ schema });\n\n  parseSchemaMeta({ irSchema, schema });\n\n  const type = getSchemaType({ schema });\n\n  if (!type) {\n    return irSchema;\n  }\n\n  if (!schema.nullable) {\n    return parseOneType({\n      context,\n      irSchema,\n      schema: {\n        ...schema,\n        type,\n      },\n      state,\n    });\n  }\n\n  return parseNullableType({\n    context,\n    irSchema,\n    schema: {\n      ...schema,\n      type,\n    },\n    state,\n  });\n};\n\nconst parseOneType = ({\n  context,\n  irSchema,\n  schema,\n  state,\n}: {\n  context: Context;\n  irSchema?: IR.SchemaObject;\n  schema: SchemaWithRequired<SchemaObject, 'type'>;\n  state: SchemaState;\n}): IR.SchemaObject => {\n  if (!irSchema) {\n    irSchema = initIrSchema({ schema });\n\n    parseSchemaMeta({ irSchema, schema });\n  }\n\n  switch (schema.type) {\n    case 'array':\n      return parseArray({\n        context,\n        irSchema,\n        schema,\n        state,\n      });\n    case 'boolean':\n      return parseBoolean({\n        context,\n        irSchema,\n        schema,\n        state,\n      });\n    case 'integer':\n    case 'number':\n      return parseNumber({\n        context,\n        irSchema,\n        schema,\n        state,\n      });\n    case 'object':\n      return parseObject({\n        context,\n        irSchema,\n        schema,\n        state,\n      });\n    case 'string':\n      return parseString({\n        context,\n        irSchema,\n        schema,\n        state,\n      });\n    default:\n      // gracefully handle invalid type\n      return parseUnknown({\n        context,\n        irSchema,\n        schema,\n      });\n  }\n};\n\nconst parseUnknown = ({\n  irSchema,\n  schema,\n}: {\n  context: Context;\n  irSchema?: IR.SchemaObject;\n  schema: SchemaObject;\n}): IR.SchemaObject => {\n  if (!irSchema) {\n    irSchema = initIrSchema({ schema });\n  }\n\n  irSchema.type = 'unknown';\n\n  parseSchemaMeta({ irSchema, schema });\n\n  return irSchema;\n};\n\nexport const schemaToIrSchema = ({\n  context,\n  schema,\n  state,\n}: {\n  context: Context;\n  schema: SchemaObject | ReferenceObject;\n  state: SchemaState | undefined;\n}): IR.SchemaObject => {\n  if (!state) {\n    state = {\n      circularReferenceTracker: new Set(),\n    };\n  }\n\n  if (state.$ref) {\n    state.circularReferenceTracker.add(state.$ref);\n  }\n\n  if ('$ref' in schema) {\n    return parseRef({\n      context,\n      schema,\n      state,\n    });\n  }\n\n  if (schema.enum) {\n    return parseEnum({\n      context,\n      schema: schema as SchemaWithRequired<SchemaObject, 'enum'>,\n      state,\n    });\n  }\n\n  if (schema.allOf) {\n    return parseAllOf({\n      context,\n      schema: schema as SchemaWithRequired<SchemaObject, 'allOf'>,\n      state,\n    });\n  }\n\n  if (schema.anyOf) {\n    return parseAnyOf({\n      context,\n      schema: schema as SchemaWithRequired<SchemaObject, 'anyOf'>,\n      state,\n    });\n  }\n\n  if (schema.oneOf) {\n    return parseOneOf({\n      context,\n      schema: schema as SchemaWithRequired<SchemaObject, 'oneOf'>,\n      state,\n    });\n  }\n\n  // infer object based on the presence of properties\n  if (schema.type || schema.properties) {\n    return parseType({\n      context,\n      schema: schema as SchemaWithRequired<SchemaObject, 'type'>,\n      state,\n    });\n  }\n\n  return parseUnknown({ context, schema });\n};\n\nexport const parseSchema = ({\n  $ref,\n  context,\n  schema,\n}: {\n  $ref: string;\n  context: Context;\n  schema: SchemaObject | ReferenceObject;\n}) => {\n  if (!context.ir.components) {\n    context.ir.components = {};\n  }\n\n  if (!context.ir.components.schemas) {\n    context.ir.components.schemas = {};\n  }\n\n  context.ir.components.schemas[refToName($ref)] = schemaToIrSchema({\n    context,\n    schema,\n    state: {\n      $ref,\n      circularReferenceTracker: new Set(),\n    },\n  });\n};\n"
  },
  {
    "path": "packages/shared/src/openApi/3.0.x/parser/server.ts",
    "content": "import type { Context } from '../../../ir/context';\nimport { parseUrl } from '../../../utils/url';\n\nexport function parseServers({ context }: { context: Context }): void {\n  if (context.spec.servers) {\n    context.ir.servers = context.spec.servers;\n    return;\n  }\n\n  for (const input of context.config.input) {\n    if (typeof input.path === 'string') {\n      const url = parseUrl(input.path);\n      context.ir.servers = [\n        {\n          url: `${url.protocol ? `${url.protocol}://` : ''}${url.host}${url.port ? `:${url.port}` : ''}`,\n        },\n      ];\n    }\n  }\n\n  if (!context.ir.servers) {\n    context.ir.servers = [\n      {\n        url: '/',\n      },\n    ];\n  }\n}\n"
  },
  {
    "path": "packages/shared/src/openApi/3.0.x/parser/validate.ts",
    "content": "import type { Logger } from '@hey-api/codegen-core';\n\nimport { createOperationKey } from '../../../ir/operation';\nimport { httpMethods } from '../../../openApi/shared/utils/operation';\nimport type { ValidatorIssue, ValidatorResult } from '../../../openApi/shared/utils/validator';\nimport type { OpenApiV3_0_X, PathItemObject, PathsObject } from '../types/spec';\n\nexport const validateOpenApiSpec = (spec: OpenApiV3_0_X, logger: Logger): ValidatorResult => {\n  const eventValidate = logger.timeEvent('validate');\n  const issues: Array<ValidatorIssue> = [];\n  const operationIds = new Map();\n\n  if (spec.paths) {\n    for (const entry of Object.entries(spec.paths)) {\n      const path = entry[0] as keyof PathsObject;\n      const pathItem = entry[1] as PathItemObject;\n      for (const method of httpMethods) {\n        const operation = pathItem[method];\n        if (!operation) {\n          continue;\n        }\n\n        const operationKey = createOperationKey({ method, path });\n\n        if (operation.operationId) {\n          if (!operationIds.has(operation.operationId)) {\n            operationIds.set(operation.operationId, operationKey);\n          } else {\n            issues.push({\n              code: 'duplicate_key',\n              context: {\n                key: 'operationId',\n                value: operation.operationId,\n              },\n              message: 'Duplicate `operationId` found. Each `operationId` must be unique.',\n              path: ['paths', path, method, 'operationId'],\n              severity: 'error',\n            });\n          }\n        }\n      }\n    }\n  }\n\n  if (spec.servers) {\n    if (typeof spec.servers !== 'object' || !Array.isArray(spec.servers)) {\n      issues.push({\n        code: 'invalid_type',\n        message: '`servers` must be an array.',\n        path: [],\n        severity: 'error',\n      });\n    }\n\n    for (let index = 0; index < spec.servers.length; index++) {\n      const server = spec.servers[index];\n      if (!server || typeof server !== 'object') {\n        issues.push({\n          code: 'invalid_type',\n          context: {\n            actual: typeof server,\n            expected: 'object',\n          },\n          message: 'Each entry in `servers` must be an object.',\n          path: ['servers', index],\n          severity: 'error',\n        });\n      } else {\n        if (!server.url) {\n          issues.push({\n            code: 'missing_required_field',\n            context: {\n              field: 'url',\n            },\n            message: 'Missing required field `url` in server object.',\n            path: ['servers', index],\n            severity: 'error',\n          });\n        }\n      }\n    }\n  }\n\n  eventValidate.timeEnd();\n  return {\n    issues,\n    valid: !issues.some((issue) => issue.severity === 'error'),\n  };\n};\n"
  },
  {
    "path": "packages/shared/src/openApi/3.0.x/types/spec.ts",
    "content": "import type { AnyString } from '@hey-api/types';\n\nimport type { CodeSampleObject, EnumExtensions } from '../../../openApi/shared/types';\n\n/**\n * OpenAPI Specification Extensions.\n *\n * See {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.4.md#specification-extensions Specification Extensions}.\n */\nexport interface SpecificationExtensions {\n  [extension: `x-${string}`]: unknown;\n}\n\n/**\n * This is the root object of the {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.4.md#openapi-description OpenAPI Description}.\n *\n * This object MAY be extended with {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.4.md#specification-extensions Specification Extensions}.\n */\nexport interface OpenApiV3_0_X extends SpecificationExtensions {\n  /**\n   * An element to hold various Objects for the OpenAPI Description.\n   */\n  components?: ComponentsObject;\n  /**\n   * Additional external documentation.\n   */\n  externalDocs?: ExternalDocumentationObject;\n  /**\n   * **REQUIRED**. Provides metadata about the API. The metadata MAY be used by tooling as required.\n   */\n  info: InfoObject;\n  /**\n   * **REQUIRED**. This string MUST be the {@link https://semver.org/spec/v2.0.0.html semantic version number} of the {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.3.md#versions OpenAPI Specification version} that the OpenAPI document uses. The `openapi` field SHOULD be used by tooling specifications and clients to interpret the OpenAPI document. This is _not_ related to the API {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.3.md#infoVersion `info.version`} string.\n   */\n  openapi: '3.0.0' | '3.0.1' | '3.0.2' | '3.0.3' | '3.0.4';\n  /**\n   * **REQUIRED**. The available paths and operations for the API.\n   */\n  paths: PathsObject;\n  /**\n   * A declaration of which security mechanisms can be used across the API. The list of values includes alternative Security Requirement Objects that can be used. Only one of the Security Requirement Objects need to be satisfied to authorize a request. Individual operations can override this definition. The list can be incomplete, up to being empty or absent. To make security explicitly optional, an empty security requirement (`{}`) can be included in the array.\n   */\n  security?: ReadonlyArray<SecurityRequirementObject>;\n  /**\n   * An array of Server Objects, which provide connectivity information to a target server. If the `servers` field is not provided, or is an empty array, the default value would be a {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.4.md#server-object Server Object} with a {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.4.md#server-url url} value of `/`.\n   */\n  servers?: ReadonlyArray<ServerObject>;\n  /**\n   * A list of tags used by the OpenAPI Description with additional metadata. The order of the tags can be used to reflect on their order by the parsing tools. Not all tags that are used by the {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.4.md#operation-object Operation Object} must be declared. The tags that are not declared MAY be organized randomly or based on the tools' logic. Each tag name in the list MUST be unique.\n   */\n  tags?: ReadonlyArray<TagObject>;\n}\n\n/**\n * A map of possible out-of band callbacks related to the parent operation. Each value in the map is a {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.4.md#path-item-object Path Item Object} that describes a set of requests that may be initiated by the API provider and the expected responses. The key value used to identify the Path Item Object is an expression, evaluated at runtime, that identifies a URL to use for the callback operation.\n *\n * This object MAY be extended with {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.4.md#specification-extensions Specification Extensions}.\n *\n * TODO: examples\n */\nexport interface CallbackObject extends SpecificationExtensions {\n  /**\n   * A Path Item Object used to define a callback request and expected responses. A {@link https://learn.openapis.org/examples/v3.0/callback-example.html complete example} is available.\n   */\n  [expression: string]: PathItemObject | ReferenceObject | unknown;\n}\n\n/**\n * Holds a set of reusable objects for different aspects of the OAS. All objects defined within the Components Object will have no effect on the API unless they are explicitly referenced from outside the Components Object.\n *\n * This object MAY be extended with {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.4.md#specification-extensions Specification Extensions}.\n *\n * All the fixed fields declared above are objects that MUST use keys that match the regular expression: `^[a-zA-Z0-9\\.\\-_]+$`.\n *\n * TODO: examples\n */\nexport interface ComponentsObject extends SpecificationExtensions {\n  /**\n   * An object to hold reusable {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.4.md#callback-object Callback Objects}.\n   */\n  callbacks?: Record<string, CallbackObject | ReferenceObject>;\n  /**\n   * An object to hold reusable {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.4.md#example-object Example Objects}.\n   */\n  examples?: Record<string, ExampleObject | ReferenceObject>;\n  /**\n   * An object to hold reusable {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.4.md#header-object Header Objects}.\n   */\n  headers?: Record<string, HeaderObject | ReferenceObject>;\n  /**\n   * An object to hold reusable {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.4.md#link-object Link Objects}.\n   */\n  linkes?: Record<string, LinkObject | ReferenceObject>;\n  /**\n   * An object to hold reusable {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.4.md#parameter-object Parameter Objects}.\n   */\n  parameters?: Record<string, ParameterObject | ReferenceObject>;\n  /**\n   * An object to hold reusable {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.4.md#request-body-object Request Body Objects}.\n   */\n  requestBodies?: Record<string, RequestBodyObject | ReferenceObject>;\n  /**\n   * An object to hold reusable {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.4.md#response-object Response Objects}.\n   */\n  responses?: Record<string, ResponseObject | ReferenceObject>;\n  /**\n   * An object to hold reusable {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.4.md#schema-object Schema Objects}.\n   */\n  schemas?: Record<string, SchemaObject | ReferenceObject>;\n  /**\n   * An object to hold reusable {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.4.md#security-scheme-object Security Scheme Objects}.\n   */\n  securitySchemes?: Record<string, SecuritySchemeObject | ReferenceObject>;\n}\n\n/**\n * Contact information for the exposed API.\n *\n * This object MAY be extended with {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.4.md#specification-extensions Specification Extensions}.\n *\n * ```yaml\n * name: API Support\n * url: https://www.example.com/support\n * email: support@example.com\n * ```\n */\nexport interface ContactObject extends SpecificationExtensions {\n  /**\n   * The email address of the contact person/organization. This MUST be in the form of an email address.\n   */\n  email?: string;\n  /**\n   * The identifying name of the contact person/organization.\n   */\n  name?: string;\n  /**\n   * The URL for the contact information. This MUST be in the form of a URL.\n   */\n  url?: string;\n}\n\n/**\n * When request bodies or response payloads may be one of a number of different schemas, a Discriminator Object gives a hint about the expected schema of the document. This hint can be used to aid in serialization, deserialization, and validation. The Discriminator Object does this by implicitly or explicitly associating the possible values of a named property with alternative schemas.\n *\n * Note that `discriminator` MUST NOT change the validation outcome of the schema.\n *\n * **Conditions for Using the Discriminator Object**\n *\n * TODO: content, examples\n */\nexport interface DiscriminatorObject {\n  /**\n   * An object to hold mappings between payload values and schema names or URI references.\n   */\n  mapping?: Record<string, string>;\n  /**\n   * **REQUIRED**. The name of the property in the payload that will hold the discriminating value. This property SHOULD be required in the payload schema, as the behavior when the property is absent is undefined.\n   */\n  propertyName: string;\n}\n\n/**\n * A single encoding definition applied to a single schema property. See {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.4.md#appendix-b-data-type-conversion Appendix B} for a discussion of converting values of various types to string representations.\n *\n * Properties are correlated with `multipart` parts using the {@link https://www.rfc-editor.org/rfc/rfc7578#section-4.2 `name` parameter} of `Content-Disposition: form-data`, and with `application/x-www-form-urlencoded` using the query string parameter names. In both cases, their order is implementation-defined.\n *\n * See {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.4.md#appendix-e-percent-encoding-and-form-media-types Appendix E} for a detailed examination of percent-encoding concerns for form media types.\n *\n * This object MAY be extended with {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.4.md#specification-extensions Specification Extensions}.\n *\n * TODO: default values examples\n * TODO: examples\n */\nexport interface EncodingObject extends SpecificationExtensions {\n  /**\n   * When this is true, parameter values are serialized using reserved expansion, as defined by {@link https://datatracker.ietf.org/doc/html/rfc6570#section-3.2.3 RFC6570}, which allows {@link https://datatracker.ietf.org/doc/html/rfc3986#section-2.2 RFC3986's reserved character set}, as well as percent-encoded triples, to pass through unchanged, while still percent-encoding all other disallowed characters (including `%` outside of percent-encoded triples). Applications are still responsible for percent-encoding reserved characters that are {@link https://datatracker.ietf.org/doc/html/rfc3986#section-3.4 not allowed in the query string} (`[`, `]`, `#`), or have a special meaning in `application/x-www-form-urlencoded` (`-`, `&`, `+`); see Appendices {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.4.md#appendix-c-using-rfc6570-based-serialization C} and {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.4.md#appendix-e-percent-encoding-and-form-media-types E} for details. The default value is `false`. This field SHALL be ignored if the request body media type is not `application/x-www-form-urlencoded`.\n   */\n  allowReserved?: boolean;\n  /**\n   * The `Content-Type` for encoding a specific property. The value is a comma-separated list, each element of which is either a specific media type (e.g. `image/png`) or a wildcard media type (e.g. `image/*`). Default value depends on the property type as shown in the table below.\n   */\n  contentType?: string;\n  /**\n   * When this is true, property values of type `array` or `object` generate separate parameters for each value of the array, or key-value-pair of the map. For other types of properties this field has no effect. When {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.4.md#encoding-style `style`} is `\"form\"`, the default value is `true`. For all other styles, the default value is `false`. Note that despite `false` being the default for `deepObject`, the combination of `false` with `deepObject` is undefined. This field SHALL be ignored if the request body media type is not `application/x-www-form-urlencoded`.\n   */\n  explode?: boolean;\n  /**\n   * A map allowing additional information to be provided as headers. `Content-Type` is described separately and SHALL be ignored in this section. This field SHALL be ignored if the request body media type is not a `multipart`.\n   */\n  headers?: Record<string, HeaderObject | ReferenceObject>;\n  /**\n   * Describes how a specific property value will be serialized depending on its type. See {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.4.md#parameter-object Parameter Object} for details on the {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.4.md#parameter-style `style`} field. The behavior follows the same values as `query` parameters, including default values. Note that the initial `?` used in query strings is not used in `application/x-www-form-urlencoded` message bodies, and MUST be removed (if using an RFC6570 implementation) or simply not added (if constructing the string manually). This field SHALL be ignored if the request body media type is not `application/x-www-form-urlencoded`.\n   */\n  style?:\n    | 'deepObject'\n    | 'form'\n    | 'label'\n    | 'matrix'\n    | 'pipeDelimited'\n    | 'simple'\n    | 'spaceDelimited';\n}\n\n/**\n * An object grouping an internal or external example value with basic `summary` and `description` metadata. This object is typically used in fields named `examples` (plural), and is a {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.4.md#reference-object referenceable} alternative to older `example` (singular) fields that do not support referencing or metadata.\n *\n * Examples allow demonstration of the usage of properties, parameters and objects within OpenAPI.\n *\n * This object MAY be extended with {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.4.md#specification-extensions Specification Extensions}.\n *\n * In all cases, the example value SHOULD be compatible with the schema of its associated value. Tooling implementations MAY choose to validate compatibility automatically, and reject the example value(s) if incompatible.\n *\n * TODO: examples\n */\nexport interface ExampleObject extends SpecificationExtensions {\n  /**\n   * Long description for the example. {@link https://spec.commonmark.org/ CommonMark syntax} MAY be used for rich text representation.\n   */\n  description?: string;\n  /**\n   * A URL that points to the literal example. This provides the capability to reference examples that cannot easily be included in JSON or YAML documents. The `value` field and `externalValue` field are mutually exclusive. See the rules for resolving {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.4.md#relative-references-in-urls Relative References}.\n   */\n  externalValue?: string;\n  /**\n   * Short description for the example.\n   */\n  summary?: string;\n  /**\n   * Embedded literal example. The `value` field and `externalValue` field are mutually exclusive. To represent examples of media types that cannot naturally represented in JSON or YAML, use a string value to contain the example, escaping where necessary.\n   */\n  value?: unknown;\n}\n\n/**\n * Allows referencing an external resource for extended documentation.\n *\n * This object MAY be extended with {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.4.md#specification-extensions Specification Extensions}.\n *\n * **External Documentation Object Example**\n *\n * ```yaml\n * description: Find more info here\n * url: https://example.com\n * ```\n */\nexport interface ExternalDocumentationObject extends SpecificationExtensions {\n  /**\n   * A description of the target documentation. {@link https://spec.commonmark.org/ CommonMark syntax} MAY be used for rich text representation.\n   */\n  description?: string;\n  /**\n   * **REQUIRED**. The URL for the target documentation. This MUST be in the form of a URL.\n   */\n  url: string;\n}\n\n/**\n * Describes a single header for {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.4.md#response-headers HTTP responses} and for {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.4.md#encoding-headers individual parts in `multipart` representations}; see the relevant {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.4.md#response-object Response Object} and {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.4.md#encoding-object Encoding Object} documentation for restrictions on which headers can be described.\n *\n * The Header Object follows the structure of the {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.4.md#parameter-object Parameter Object}, including determining its serialization strategy based on whether `schema` or `content` is present, with the following changes:\n * 1. `name` MUST NOT be specified, it is given in the corresponding `headers` map.\n * 1. `in` MUST NOT be specified, it is implicitly in `header`.\n * 1. All traits that are affected by the location MUST be applicable to a location of `header` (for example, {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.4.md#parameter-style `style`}). This means that `allowEmptyValue` and `allowReserved` MUST NOT be used, and `style`, if used, MUST be limited to `\"simple\"`.\n *\n * This object MAY be extended with {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.4.md#specification-extensions Specification Extensions}.\n *\n * TODO: examples\n */\nexport type HeaderObject = Omit<ParameterObject, 'in' | 'name'>;\n\n/**\n * The object provides metadata about the API. The metadata MAY be used by the clients if needed, and MAY be presented in editing or documentation generation tools for convenience.\n *\n * This object MAY be extended with {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.4.md#specification-extensions Specification Extensions}.\n *\n * ```yaml\n * title: Example Pet Store App\n * description: This is an example server for a pet store.\n * termsOfService: https://example.com/terms/\n * contact:\n *   name: API Support\n *   url: https://www.example.com/support\n *   email: support@example.com\n * license:\n *   name: Apache 2.0\n *   url: https://www.apache.org/licenses/LICENSE-2.0.html\n * version: 1.0.1\n * ```\n */\nexport interface InfoObject extends SpecificationExtensions {\n  /**\n   * The contact information for the exposed API.\n   */\n  contact?: ContactObject;\n  /**\n   * A description of the API. {@link https://spec.commonmark.org/ CommonMark syntax} MAY be used for rich text representation.\n   */\n  description?: string;\n  /**\n   * The license information for the exposed API.\n   */\n  license?: LicenseObject;\n  /**\n   * A URL for the Terms of Service for the API. This MUST be in the form of a URL.\n   */\n  termsOfService?: string;\n  /**\n   * **REQUIRED**. The title of the API.\n   */\n  title: string;\n  /**\n   * **REQUIRED**. The version of the OpenAPI Document (which is distinct from the {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.4.md#oas-version OpenAPI Specification version} or the version of the API being described or the version of the OpenAPI Description).\n   */\n  version: string;\n}\n\n/**\n * License information for the exposed API.\n *\n * This object MAY be extended with {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.4.md#specification-extensions Specification Extensions}.\n *\n * ```yaml\n * name: Apache 2.0\n * url: https://www.apache.org/licenses/LICENSE-2.0.html\n * ```\n */\nexport interface LicenseObject extends SpecificationExtensions {\n  /**\n   * **REQUIRED**. The license name used for the API.\n   */\n  name: string;\n  /**\n   * A URL for the license used for the API. This MUST be in the form of a URL.\n   */\n  url?: string;\n}\n\n/**\n * The Link Object represents a possible design-time link for a response. The presence of a link does not guarantee the caller's ability to successfully invoke it, rather it provides a known relationship and traversal mechanism between responses and other operations.\n *\n * Unlike _dynamic links_ (i.e. links provided in the response payload), the OAS linking mechanism does not require link information in the runtime response.\n *\n * For computing links and providing instructions to execute them, a {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.4.md#runtime-expressions runtime expression} is used for accessing values in an operation and using them as parameters while invoking the linked operation.\n *\n * This object MAY be extended with {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.4.md#specification-extensions Specification Extensions}.\n *\n * A linked operation MUST be identified using either an `operationRef` or `operationId`. The identified or reference operation MUST be unique, and in the case of an `operationId`, it MUST be resolved within the scope of the OpenAPI Description (OAD). Because of the potential for name clashes, the `operationRef` syntax is preferred for multi-document OADs. However, because use of an operation depends on its URL path template in the {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.4.md#paths-object Paths Object}, operations from any {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.4.md#path-item-object Path Item Object} that is referenced multiple times within the OAD cannot be resolved unambiguously. In such ambiguous cases, the resulting behavior is implementation-defined and MAY result in an error.\n *\n * Note that it is not possible to provide a constant value to `parameters` that matches the syntax of a runtime expression. It is possible to have ambiguous parameter names, e.g. `name: \"id\"`, `in: \"path\"` and `name: \"path.id\", in: \"query\"`; this is NOT RECOMMENDED and the behavior is implementation-defined, however implementations SHOULD prefer the qualified interpretation (`path.id` as a path parameter), as the names can always be qualified to disambiguate them (e.g. using `query.path.id` for the query parameter).\n *\n * TODO: examples\n */\nexport interface LinkObject extends SpecificationExtensions {\n  /**\n   * A description of the link. {@link https://spec.commonmark.org/ CommonMark syntax} MAY be used for rich text representation.\n   */\n  description?: string;\n  /**\n   * The name of an _existing_, resolvable OAS operation, as defined with a unique `operationId`. This field is mutually exclusive of the `operationRef` field.\n   */\n  operationId?: string;\n  /**\n   * A URI reference to an OAS operation. This field is mutually exclusive of the `operationId` field, and MUST point to an {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.4.md#operation-object Operation Object}.\n   */\n  operationRef?: string;\n  /**\n   * A map representing parameters to pass to an operation as specified with `operationId` or identified via `operationRef`. The key is the parameter name to be used (optionally qualified with the parameter location, e.g. `path.id` for an `id` parameter in the path), whereas the value can be a constant or an expression to be evaluated and passed to the linked operation.\n   */\n  parameters?: Record<string, unknown | string>;\n  /**\n   * A literal value or {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.4.md#runtime-expressions {expression}} to use as a request body when calling the target operation.\n   */\n  requestBody?: unknown | string;\n  /**\n   * A server object to be used by the target operation.\n   */\n  server?: ServerObject;\n}\n\n/**\n * Each Media Type Object provides schema and examples for the media type identified by its key.\n *\n * When `example` or `examples` are provided, the example SHOULD match the specified schema and be in the correct format as specified by the media type and its encoding. The `example` and `examples` fields are mutually exclusive, and if either is present it SHALL _override_ any `example` in the schema. See {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.4.md#working-with-examples Working With Examples} for further guidance regarding the different ways of specifying examples, including non-JSON/YAML values.\n *\n * This object MAY be extended with {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.4.md#specification-extensions Specification Extensions}.\n *\n * TODO: examples\n */\nexport interface MediaTypeObject extends SpecificationExtensions {\n  /**\n   * A map between a property name and its encoding information. The key, being the property name, MUST exist in the schema as a property. The `encoding` field SHALL only apply to {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.4.md#request-body-object Request Body Objects}, and only when the media type is `multipart` or `application/x-www-form-urlencoded`. If no Encoding Object is provided for a property, the behavior is determined by the default values documented for the Encoding Object.\n   */\n  encoding?: Record<string, EncodingObject>;\n  /**\n   * Example of the media type; see {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.4.md#working-with-examples Working With Examples}.\n   */\n  example?: unknown;\n  /**\n   * Examples of the media type; see {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.4.md#working-with-examples Working With Examples}.\n   */\n  examples?: Record<string, ExampleObject | ReferenceObject>;\n  /**\n   * The schema defining the content of the request, response, parameter, or header.\n   */\n  schema?: SchemaObject | ReferenceObject;\n}\n\n/**\n * Configuration details for a supported OAuth Flow\n *\n * This object MAY be extended with {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.4.md#specification-extensions Specification Extensions}.\n *\n * TODO: examples\n */\nexport interface OAuthFlowObject extends SpecificationExtensions {\n  /**\n   * **REQUIRED (`\"implicit\"`, `\"authorizationCode\"`)**. The authorization URL to be used for this flow. This MUST be in the form of a URL. The OAuth2 standard requires the use of TLS.\n   */\n  authorizationUrl?: string;\n  /**\n   * The URL to be used for obtaining refresh tokens. This MUST be in the form of a URL. The OAuth2 standard requires the use of TLS.\n   */\n  refreshUrl?: string;\n  /**\n   * **REQUIRED**. The available scopes for the OAuth2 security scheme. A map between the scope name and a short description for it. The map MAY be empty.\n   */\n  scopes: Record<string, string>;\n  /**\n   * **REQUIRED (`\"password\"`, `\"clientCredentials\"`, `\"authorizationCode\"`)**. The token URL to be used for this flow. This MUST be in the form of a URL. The OAuth2 standard requires the use of TLS.\n   */\n  tokenUrl?: string;\n}\n\n/**\n * Allows configuration of the supported OAuth Flows.\n *\n * This object MAY be extended with {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.4.md#specification-extensions Specification Extensions}.\n */\nexport interface OAuthFlowsObject extends SpecificationExtensions {\n  /**\n   * Configuration for the OAuth Authorization Code flow. Previously called `accessCode` in OpenAPI 2.0.\n   */\n  authorizationCode?: OAuthFlowObject;\n  /**\n   * Configuration for the OAuth Client Credentials flow. Previously called `application` in OpenAPI 2.0.\n   */\n  clientCredentials?: OAuthFlowObject;\n  /**\n   * Configuration for the OAuth Implicit flow\n   */\n  implicit?: OAuthFlowObject;\n  /**\n   * Configuration for the OAuth Resource Owner Password flow\n   */\n  password?: OAuthFlowObject;\n}\n\n/**\n * Describes a single API operation on a path.\n *\n * This object MAY be extended with {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.4.md#specification-extensions Specification Extensions}.\n *\n * TODO: examples\n */\nexport interface OperationObject extends SpecificationExtensions {\n  /**\n   * A map of possible out-of band callbacks related to the parent operation. The key is a unique identifier for the Callback Object. Each value in the map is a {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.4.md#callback-object Callback Object} that describes a request that may be initiated by the API provider and the expected responses.\n   */\n  callbacks?: Record<string, CallbackObject | ReferenceObject>;\n  /**\n   * Declares this operation to be deprecated. Consumers SHOULD refrain from usage of the declared operation. Default value is `false`.\n   */\n  deprecated?: boolean;\n  /**\n   * A verbose explanation of the operation behavior. {@link https://spec.commonmark.org/ CommonMark syntax} MAY be used for rich text representation.\n   */\n  description?: string;\n  /**\n   * Additional external documentation for this operation.\n   */\n  externalDocs?: ExternalDocumentationObject;\n  /**\n   * Unique string used to identify the operation. The id MUST be unique among all operations described in the API. The operationId value is **case-sensitive**. Tools and libraries MAY use the operationId to uniquely identify an operation, therefore, it is RECOMMENDED to follow common programming naming conventions.\n   */\n  operationId?: string;\n  /**\n   * A list of parameters that are applicable for this operation. If a parameter is already defined in the {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.4.md#path-item-parameters Path Item}, the new definition will override it but can never remove it. The list MUST NOT include duplicated parameters. A unique parameter is defined by a combination of a {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.4.md#parameter-name name} and {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.4.md#parameter-in location}. The list can use the {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.4.md#reference-object Reference Object} to link to parameters that are defined in the {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.4.md#components-parameters OpenAPI Object's `components.parameters`}.\n   */\n  parameters?: ReadonlyArray<ParameterObject | ReferenceObject>;\n  /**\n   * The request body applicable for this operation. The `requestBody` is only supported in HTTP methods where the HTTP 1.1 specification {@link https://tools.ietf.org/html/rfc7231#section-4.3.1 RFC7231} has explicitly defined semantics for request bodies. In other cases where the HTTP spec is vague (such as {@link https://tools.ietf.org/html/rfc7231#section-4.3.1 GET}, {@link https://tools.ietf.org/html/rfc7231#section-4.3.2 HEAD} and {@link https://tools.ietf.org/html/rfc7231#section-4.3.5 DELETE}), `requestBody` SHALL be ignored by consumers.\n   */\n  requestBody?: RequestBodyObject | ReferenceObject;\n  /**\n   * **REQUIRED**. The list of possible responses as they are returned from executing this operation.\n   */\n  responses: ResponsesObject;\n  /**\n   * A declaration of which security mechanisms can be used for this operation. The list of values includes alternative Security Requirement Objects that can be used. Only one of the Security Requirement Objects need to be satisfied to authorize a request. To make security optional, an empty security requirement (`{}`) can be included in the array. This definition overrides any declared top-level {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.4.md#oas-security `security`}. To remove a top-level security declaration, an empty array can be used.\n   */\n  security?: ReadonlyArray<SecurityRequirementObject>;\n  /**\n   * An alternative `servers` array to service this operation. If a `servers` array is specified at the {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.4.md#path-item-servers Path Item Object} or {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.4.md#oas-servers OpenAPI Object} level, it will be overridden by this value.\n   */\n  servers?: ReadonlyArray<ServerObject>;\n  /**\n   * A short summary of what the operation does.\n   */\n  summary?: string;\n  /**\n   * A list of tags for API documentation control. Tags can be used for logical grouping of operations by resources or any other qualifier.\n   */\n  tags?: ReadonlyArray<string>;\n  /**\n   * A list of code samples associated with an operation.\n   */\n  'x-codeSamples'?: ReadonlyArray<CodeSampleObject>;\n}\n\n/**\n * Describes a single operation parameter.\n *\n * A unique parameter is defined by a combination of a {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.4.md#parameter-name name} and {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.4.md#parameter-in location}.\n *\n * See {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.4.md#appendix-e-percent-encoding-and-form-media-types Appendix E} for a detailed examination of percent-encoding concerns, including interactions with the `application/x-www-form-urlencoded` query string format.\n *\n * **Parameter Locations**\n *\n * There are four possible parameter locations specified by the `in` field:\n *\n * - path - Used together with {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.4.md#path-templating Path Templating}, where the parameter value is actually part of the operation's URL. This does not include the host or base path of the API. For example, in `/items/{itemId}`, the path parameter is `itemId`.\n * - query - Parameters that are appended to the URL. For example, in `/items?id=###`, the query parameter is `id`.\n * - header - Custom headers that are expected as part of the request. Note that {@link https://tools.ietf.org/html/rfc7230#section-3.2 RFC7230} states header names are case insensitive.\n * - cookie - Used to pass a specific cookie value to the API.\n *\n * **Fixed Fields**\n *\n * The rules for serialization of the parameter are specified in one of two ways. Parameter Objects MUST include either a `content` field or a `schema` field, but not both. See {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.4.md#appendix-b-data-type-conversion Appendix B} for a discussion of converting values of various types to string representations.\n *\n * This object MAY be extended with {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.4.md#specification-extensions Specification Extensions}.\n *\n * Note that while `\"Cookie\"` as a `name` is not forbidden if `in` is `\"header\"`, the effect of defining a cookie parameter that way is undefined; use `in: \"cookie\"` instead.\n *\n * **Fixed Fields for use with schema**\n *\n * For simpler scenarios, a {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.4.md#parameter-schema `schema`} and {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.4.md#parameter-style `style`} can describe the structure and syntax of the parameter. When `example` or `examples` are provided in conjunction with the `schema` field, the example SHOULD match the specified schema and follow the prescribed serialization strategy for the parameter. The `example` and `examples` fields are mutually exclusive, and if either is present it SHALL _override_ any `example` in the schema.\n *\n * Serializing with `schema` is NOT RECOMMENDED for `in: \"cookie\"` parameters, `in: \"header\"` parameters that use HTTP header parameters (name=value pairs following a `;`) in their values, or `in: \"header\"` parameters where values might have non-URL-safe characters; see {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.4.md#appendix-d-serializing-headers-and-cookies Appendix D} for details.\n *\n * See also {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.4.md#appendix-c-using-rfc6570-based-serialization Appendix C: Using RFC6570-Based Serialization} for additional guidance.\n *\n * **Fixed Fields for use with `content`**\n *\n * For more complex scenarios, the {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.4.md#parameter-content `content`} field can define the media type and schema of the parameter, as well as give examples of its use. Using `content` with a `text/plain` media type is RECOMMENDED for `in: \"header\"` and `in: \"cookie\"` parameters where the `schema` strategy is not appropriate.\n *\n * **Style Values**\n *\n * In order to support common ways of serializing simple parameters, a set of `style` values are defined.\n *\n * See {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.4.md#appendix-e-percent-encoding-and-form-media-types Appendix E} for a discussion of percent-encoding, including when delimiters need to be percent-encoded and options for handling collisions with percent-encoded data.\n *\n * TODO: examples\n */\nexport interface ParameterObject extends SpecificationExtensions {\n  /**\n   * If `true`, clients MAY pass a zero-length string value in place of parameters that would otherwise be omitted entirely, which the server SHOULD interpret as the parameter being unused. Default value is `false`. If {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.4.md#parameter-style `style`} is used, and if {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.4.md#style-examples behavior is _n/a_ (cannot be serialized)}, the value of `allowEmptyValue` SHALL be ignored. Interactions between this field and the parameter's {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.4.md#schema-object Schema Object} are implementation-defined. This field is valid only for `query` parameters. Use of this field is NOT RECOMMENDED, and it is likely to be removed in a later revision.\n   */\n  allowEmptyValue?: boolean;\n  /**\n   * When this is true, parameter values are serialized using reserved expansion, as defined by {@link https://datatracker.ietf.org/doc/html/rfc6570#section-3.2.3 RFC6570}, which allows {@link https://datatracker.ietf.org/doc/html/rfc3986#section-2.2 RFC3986's reserved character set}, as well as percent-encoded triples, to pass through unchanged, while still percent-encoding all other disallowed characters (including `%` outside of percent-encoded triples). Applications are still responsible for percent-encoding reserved characters that are {@link https://datatracker.ietf.org/doc/html/rfc3986#section-3.4 not allowed in the query string} (`[`, `]`, `#`), or have a special meaning in `application/x-www-form-urlencoded` (`-`, `&`, `+`); see Appendices {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.4.md#appendix-c-using-rfc6570-based-serialization C} and {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.4.md#appendix-e-percent-encoding-and-form-media-types E} for details. This field only applies to parameters with an `in` value of `query`. The default value is `false`.\n   */\n  allowReserved?: boolean;\n  /**\n   * A map containing the representations for the parameter. The key is the media type and the value describes it. The map MUST only contain one entry.\n   */\n  content?: Record<string, MediaTypeObject>;\n  /**\n   * Specifies that a parameter is deprecated and SHOULD be transitioned out of usage. Default value is `false`.\n   */\n  deprecated?: boolean;\n  /**\n   * A brief description of the parameter. This could contain examples of use. {@link https://spec.commonmark.org/ CommonMark syntax} MAY be used for rich text representation.\n   */\n  description?: string;\n  /**\n   * Example of the parameter's potential value; see {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.4.md#working-with-examples Working With Examples}.\n   */\n  example?: unknown;\n  /**\n   * Examples of the parameter's potential value; see {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.4.md#working-with-examples Working With Examples}.\n   */\n  examples?: Record<string, ExampleObject | ReferenceObject>;\n  /**\n   * When this is true, parameter values of type `array` or `object` generate separate parameters for each value of the array or key-value pair of the map. For other types of parameters this field has no effect. When {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.4.md#parameter-style `style`} is `\"form\"`, the default value is `true`. For all other styles, the default value is `false`. Note that despite `false` being the default for `deepObject`, the combination of `false` with `deepObject` is undefined.\n   */\n  explode?: boolean;\n  /**\n   * **REQUIRED**. The location of the parameter. Possible values are `\"query\"`, `\"header\"`, `\"path\"` or `\"cookie\"`.\n   */\n  in: 'cookie' | 'header' | 'path' | 'query';\n  /**\n   * **REQUIRED**. The name of the parameter. Parameter names are _case sensitive_.\n   * - If {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.4.md#parameter-in `in`} is `\"path\"`, the `name` field MUST correspond to a template expression occurring within the {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.4.md#paths-path path} field in the {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.4.md#paths-object Paths Object}. See {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.4.md#path-templating Path Templating} for further information.\n   * - If {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.4.md#parameter-in `in`} is `\"header\"` and the `name` field is `\"Accept\"`, `\"Content-Type\"` or `\"Authorization\"`, the parameter definition SHALL be ignored.\n   * - For all other cases, the `name` corresponds to the parameter name used by the {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.4.md#parameter-in `in`} field.\n   */\n  name: string;\n  /**\n   * Determines whether this parameter is mandatory. If the {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.4.md#parameter-in parameter location} is `\"path\"`, this field is **REQUIRED** and its value MUST be `true`. Otherwise, the field MAY be included and its default value is `false`.\n   */\n  required?: boolean;\n  /**\n   * The schema defining the type used for the parameter.\n   */\n  schema?: SchemaObject | ReferenceObject;\n  /**\n   * Describes how the parameter value will be serialized depending on the type of the parameter value. Default values (based on value of `in`): for `\"query\"` - `\"form\"`; for `\"path\"` - `\"simple\"`; for `\"header\"` - `\"simple\"`; for `\"cookie\"` - `\"form\"`.\n   */\n  style?:\n    | 'deepObject'\n    | 'form'\n    | 'label'\n    | 'matrix'\n    | 'pipeDelimited'\n    | 'simple'\n    | 'spaceDelimited';\n}\n\n/**\n * Describes the operations available on a single path. A Path Item MAY be empty, due to {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.4.md#security-filtering ACL constraints}. The path itself is still exposed to the documentation viewer but they will not know which operations and parameters are available.\n *\n * This object MAY be extended with {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.4.md#specification-extensions Specification Extensions}.\n *\n * TODO: examples\n */\nexport interface PathItemObject extends SpecificationExtensions {\n  /**\n   * Allows for a referenced definition of this path item. The value MUST be in the form of a URL, and the referenced structure MUST be in the form of a {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.4.md#path-item-object Path Item Object}. In case a Path Item Object field appears both in the defined object and the referenced object, the behavior is undefined. See the rules for resolving {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.4.md#relative-references-in-urls Relative References}.\n   */\n  $ref?: string;\n  /**\n   * A definition of a DELETE operation on this path.\n   */\n  delete?: OperationObject;\n  /**\n   * An optional string description, intended to apply to all operations in this path. {@link https://spec.commonmark.org/ CommonMark syntax} MAY be used for rich text representation.\n   */\n  description?: string;\n  /**\n   * A definition of a GET operation on this path.\n   */\n  get?: OperationObject;\n  /**\n   * A definition of a HEAD operation on this path.\n   */\n  head?: OperationObject;\n  /**\n   * A definition of a OPTIONS operation on this path.\n   */\n  options?: OperationObject;\n  /**\n   * A list of parameters that are applicable for all the operations described under this path. These parameters can be overridden at the operation level, but cannot be removed there. The list MUST NOT include duplicated parameters. A unique parameter is defined by a combination of a {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.4.md#parameter-name name} and {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.4.md#parameter-in location}. The list can use the {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.4.md#reference-object Reference Object} to link to parameters that are defined in the {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.4.md#components-parameters OpenAPI Object's `components.parameters`}.\n   */\n  parameters?: ReadonlyArray<ParameterObject | ReferenceObject>;\n  /**\n   * A definition of a PATCH operation on this path.\n   */\n  patch?: OperationObject;\n  /**\n   * A definition of a POST operation on this path.\n   */\n  post?: OperationObject;\n  /**\n   * A definition of a PUT operation on this path.\n   */\n  put?: OperationObject;\n  /**\n   * An alternative `servers` array to service all operations in this path. If a `servers` array is specified at the {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.4.md#oas-servers OpenAPI Object} level, it will be overridden by this value.\n   */\n  servers?: ReadonlyArray<ServerObject>;\n  /**\n   * An optional string summary, intended to apply to all operations in this path.\n   */\n  summary?: string;\n  /**\n   * A definition of a TRACE operation on this path.\n   */\n  trace?: OperationObject;\n}\n\n/**\n * Holds the relative paths to the individual endpoints and their operations. The path is appended to the URL from the {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.4.md#server-object Server Object} in order to construct the full URL. The Paths Object MAY be empty, due to {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.4.md#security-filtering Access Control List (ACL) constraints}.\n *\n * This object MAY be extended with {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.4.md#specification-extensions Specification Extensions}.\n *\n * TODO: examples\n */\nexport interface PathsObject extends SpecificationExtensions {\n  /**\n   * A relative path to an individual endpoint. The field name MUST begin with a forward slash (`/`). The path is **appended** (no relative URL resolution) to the expanded URL from the {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.4.md#server-object Server Object}'s `url` field in order to construct the full URL. {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.4.md#path-templating Path templating} is allowed. When matching URLs, concrete (non-templated) paths would be matched before their templated counterparts. Templated paths with the same hierarchy but different templated names MUST NOT exist as they are identical. In case of ambiguous matching, it's up to the tooling to decide which one to use.\n   */\n  [path: `/${string}`]: PathItemObject;\n}\n\n/**\n * A simple object to allow referencing other components in the OpenAPI Description, internally and externally.\n *\n * The Reference Object is defined by {@link https://tools.ietf.org/html/draft-pbryan-zyp-json-ref-03 JSON Reference} and follows the same structure, behavior and rules.\n *\n * For this specification, reference resolution is accomplished as defined by the JSON Reference specification and not by the JSON Schema specification.\n *\n * This object cannot be extended with additional properties, and any properties added SHALL be ignored.\n *\n * **Reference Object Example**\n *\n * ```yaml\n * $ref: '#/components/schemas/Pet'\n * ```\n *\n * **Relative Schema Document Example**\n *\n * ```yaml\n * $ref: Pet.yaml\n * ```\n *\n * **Relative Documents with Embedded Schema Example**\n *\n * ```yaml\n * $ref: definitions.yaml#/Pet\n * ```\n */\nexport interface ReferenceObject {\n  /**\n   * **REQUIRED**. The reference string.\n   */\n  $ref: string;\n}\n\n/**\n * Describes a single request body.\n *\n * This object MAY be extended with {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.4.md#specification-extensions Specification Extensions}.\n *\n * TODO: examples\n */\nexport interface RequestBodyObject extends SpecificationExtensions {\n  /**\n   * **REQUIRED**. The content of the request body. The key is a media type or {@link https://tools.ietf.org/html/rfc7231#appendix-D media type range} and the value describes it. For requests that match multiple keys, only the most specific key is applicable. e.g. `\"text/plain\"` overrides `\"text/*\"`\n   */\n  content: Record<string, MediaTypeObject>;\n  /**\n   * A brief description of the request body. This could contain examples of use. {@link https://spec.commonmark.org/ CommonMark syntax} MAY be used for rich text representation.\n   */\n  description?: string;\n  /**\n   * Determines if the request body is required in the request. Defaults to `false`.\n   */\n  required?: boolean;\n}\n\n/**\n * Describes a single response from an API operation, including design-time, static `links` to operations based on the response.\n *\n * This object MAY be extended with {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.4.md#specification-extensions Specification Extensions}.\n *\n * TODO: examples\n */\nexport interface ResponseObject extends SpecificationExtensions {\n  /**\n   * A map containing descriptions of potential response payloads. The key is a media type or {@link https://tools.ietf.org/html/rfc7231#appendix-D media type range} and the value describes it. For responses that match multiple keys, only the most specific key is applicable. e.g. `\"text/plain\"` overrides `\"text/*\"`\n   */\n  content?: Record<string, MediaTypeObject>;\n  /**\n   * **REQUIRED**. A description of the response. {@link https://spec.commonmark.org/ CommonMark syntax} MAY be used for rich text representation.\n   */\n  description: string;\n  /**\n   * Maps a header name to its definition. {@link https://tools.ietf.org/html/rfc7230#section-3.2 RFC7230} states header names are case insensitive. If a response header is defined with the name `\"Content-Type\"`, it SHALL be ignored.\n   */\n  headers?: Record<string, HeaderObject | ReferenceObject>;\n  /**\n   * A map of operations links that can be followed from the response. The key of the map is a short name for the link, following the naming constraints of the names for {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.4.md#components-object Component Objects}.\n   */\n  links?: Record<string, LinkObject | ReferenceObject>;\n}\n\n/**\n * A container for the expected responses of an operation. The container maps a HTTP response code to the expected response.\n *\n * The documentation is not necessarily expected to cover all possible HTTP response codes because they may not be known in advance. However, documentation is expected to cover a successful operation response and any known errors.\n *\n * The `default` MAY be used as a default Response Object for all HTTP codes that are not covered individually by the Responses Object.\n *\n * The Responses Object MUST contain at least one response code, and if only one response code is provided it SHOULD be the response for a successful operation call.\n *\n * This object MAY be extended with {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.4.md#specification-extensions Specification Extensions}.\n *\n * TODO: examples\n */\nexport interface ResponsesObject extends SpecificationExtensions {\n  /**\n   * Any {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.4.md#http-status-codes HTTP status code} can be used as the property name, but only one property per code, to describe the expected response for that HTTP status code. A {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.4.md#reference-object Reference Object} can link to a response that is defined in the {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.4.md#components-responses OpenAPI Object's `components.responses`} section. This field MUST be enclosed in quotation marks (for example, \"200\") for compatibility between JSON and YAML. To define a range of response codes, this field MAY contain the uppercase wildcard character `X`. For example, `2XX` represents all response codes between `200` and `299`. Only the following range definitions are allowed: `1XX`, `2XX`, `3XX`, `4XX`, and `5XX`. If a response is defined using an explicit code, the explicit code definition takes precedence over the range definition for that code.\n   */\n  [httpStatusCode: string]: ResponseObject | ReferenceObject | undefined | unknown;\n  /**\n   * The documentation of responses other than the ones declared for specific HTTP response codes. Use this field to cover undeclared responses. A {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.4.md#reference-object Reference Object} can link to a response that the {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.4.md#components-responses OpenAPI Object's `components.responses`} section defines.\n   */\n  default?: ResponseObject | ReferenceObject;\n}\n\n/**\n * The Schema Object allows the definition of input and output data types. These types can be objects, but also primitives and arrays. This object is an extended subset of the [[JSON-Schema-05|JSON Schema Specification Draft Wright-00]].\n *\n * For more information about the keywords, see {@link https://tools.ietf.org/html/draft-wright-json-schema-00 JSON Schema Core} and {@link https://tools.ietf.org/html/draft-wright-json-schema-validation-00 JSON Schema Validation}. Unless stated otherwise, the keyword definitions follow those of JSON Schema and do not add any additional semantics.\n *\n * **JSON Schema Keywords**\n *\n * The following keywords are taken directly from the JSON Schema definition and follow the same specifications:\n * - title\n * - multipleOf\n * - maximum\n * - exclusiveMaximum\n * - minimum\n * - exclusiveMinimum\n * - maxLength\n * - minLength\n * - pattern (This string SHOULD be a valid regular expression, according to the {@link https://www.ecma-international.org/ecma-262/5.1/#sec-15.10.1 Ecma-262 Edition 5.1 regular expression} dialect)\n * - maxItems\n * - minItems\n * - uniqueItems\n * - maxProperties\n * - minProperties\n * - required\n * - enum\n *\n * The following keywords are taken from the JSON Schema definition but their definitions were adjusted to the OpenAPI Specification.\n *\n * - type - Value MUST be a string. Multiple types via an array are not supported.\n * - allOf - Inline or referenced schema MUST be of a {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.4.md#schema-object Schema Object} and not a standard JSON Schema.\n * - oneOf - Inline or referenced schema MUST be of a {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.4.md#schema-object Schema Object} and not a standard JSON Schema.\n * - anyOf - Inline or referenced schema MUST be of a {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.4.md#schema-object Schema Object} and not a standard JSON Schema.\n * - not - Inline or referenced schema MUST be of a {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.4.md#schema-object Schema Object} and not a standard JSON Schema.\n * - items - Value MUST be an object and not an array. Inline or referenced schema MUST be of a {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.4.md#schema-object Schema Object} and not a standard JSON Schema. `items` MUST be present if `type` is `\"array\"`.\n * - properties - Property definitions MUST be a {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.4.md#schema-object Schema Object} and not a standard JSON Schema (inline or referenced).\n * - additionalProperties - Value can be boolean or object. Inline or referenced schema MUST be of a {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.4.md#schema-object Schema Object} and not a standard JSON Schema. Consistent with JSON Schema, `additionalProperties` defaults to `true`.\n * - description - {@link https://spec.commonmark.org/ CommonMark syntax} MAY be used for rich text representation.\n * - format - See {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.4.md#data-type-format Data Type Formats} for further details. While relying on JSON Schema's defined formats, the OAS offers a few additional predefined formats.\n * - default - The default value represents what would be assumed by the consumer of the input as the value of the schema if one is not provided. Unlike JSON Schema, the value MUST conform to the defined `type` for the Schema Object defined at the same level. For example, if `type` is `\"string\"`, then `default` can be `\"foo\"` but cannot be `1`.\n *\n * Alternatively, any time a Schema Object can be used, a {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.4.md#reference-object Reference Object} can be used in its place. This allows referencing definitions instead of defining them inline.\n *\n * Additional keywords defined by the JSON Schema specification that are not mentioned here are strictly unsupported.\n *\n * Other than the JSON Schema subset fields, the following fields MAY be used for further schema documentation:\n *\n * This object MAY be extended with {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.4.md#specification-extensions Specification Extensions}.\n *\n * **Composition and Inheritance (Polymorphism)**\n *\n * TODO: content, examples\n */\nexport interface SchemaObject extends EnumExtensions, SpecificationExtensions {\n  /**\n   * The value of \"additionalProperties\" MUST be a boolean or a schema.\n   *\n   * If \"additionalProperties\" is absent, it may be considered present with an empty schema as a value.\n   *\n   * If \"additionalProperties\" is true, validation always succeeds.\n   *\n   * If \"additionalProperties\" is false, validation succeeds only if the instance is an object and all properties on the instance were covered by \"properties\" and/or \"patternProperties\".\n   *\n   * If \"additionalProperties\" is an object, validate the value as a schema to all of the properties that weren't validated by \"properties\" nor \"patternProperties\".\n   *\n   * Value can be boolean or object. Inline or referenced schema MUST be of a {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.4.md#schema-object Schema Object} and not a standard JSON Schema. Consistent with JSON Schema, `additionalProperties` defaults to `true`.\n   */\n  additionalProperties?: boolean | SchemaObject | ReferenceObject;\n  /**\n   * This keyword's value MUST be an array.  This array MUST have at least one element.\n   *\n   * Elements of the array MUST be objects.  Each object MUST be a valid Schema Object.\n   *\n   * An instance validates successfully against this keyword if it validates successfully against all schemas defined by this keyword's value.\n   */\n  allOf?: ReadonlyArray<SchemaObject | ReferenceObject>;\n  /**\n   * This keyword's value MUST be an array.  This array MUST have at least one element.\n   *\n   * Elements of the array MUST be objects.  Each object MUST be a valid Schema Object.\n   *\n   * An instance validates successfully against this keyword if it validates successfully against at least one schema defined by this\n   keyword's value.\n   */\n  anyOf?: ReadonlyArray<SchemaObject | ReferenceObject>;\n  /**\n   * The default value represents what would be assumed by the consumer of the input as the value of the schema if one is not provided. Unlike JSON Schema, the value MUST conform to the defined `type` for the Schema Object defined at the same level. For example, if `type` is `\"string\"`, then `default` can be `\"foo\"` but cannot be `1`.\n   */\n  default?: unknown;\n  /**\n   * Specifies that a schema is deprecated and SHOULD be transitioned out of usage. Default value is `false`.\n   */\n  deprecated?: boolean;\n  /**\n   * The value of both of these keywords MUST be a string.\n   *\n   * Both of these keywords can be used to decorate a user interface with information about the data produced by this user interface.  A title will preferrably be short, whereas a description will provide explanation about the purpose of the instance described by this schema.\n   *\n   * Both of these keywords MAY be used in root schemas, and in any subschemas.\n   */\n  description?: string;\n  /**\n   * Adds support for polymorphism. The discriminator is used to determine which of a set of schemas a payload is expected to satisfy. See {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.4.md#composition-and-inheritance-polymorphism Composition and Inheritance} for more details.\n   */\n  discriminator?: DiscriminatorObject;\n  /**\n   * The value of this keyword MUST be an array.  This array SHOULD have at least one element.  Elements in the array SHOULD be unique.\n   *\n   * Elements in the array MAY be of any type, including null.\n   *\n   * An instance validates successfully against this keyword if its value is equal to one of the elements in this keyword's array value.\n   */\n  enum?: ReadonlyArray<unknown>;\n  /**\n   * A free-form field to include an example of an instance for this schema. To represent examples that cannot be naturally represented in JSON or YAML, a string value can be used to contain the example with escaping where necessary.\n   */\n  example?: unknown;\n  /**\n   * The value of \"exclusiveMaximum\" MUST be a boolean, representing whether the limit in \"maximum\" is exclusive or not.  An undefined value is the same as false.\n   *\n   * If \"exclusiveMaximum\" is true, then a numeric instance SHOULD NOT be equal to the value specified in \"maximum\".  If \"exclusiveMaximum\" is false (or not specified), then a numeric instance MAY be equal to the value of \"maximum\".\n   */\n  exclusiveMaximum?: boolean;\n  /**\n   * The value of \"exclusiveMinimum\" MUST be a boolean, representing whether the limit in \"minimum\" is exclusive or not.  An undefined value is the same as false.\n   *\n   * If \"exclusiveMinimum\" is true, then a numeric instance SHOULD NOT be equal to the value specified in \"minimum\".  If \"exclusiveMinimum\" is false (or not specified), then a numeric instance MAY be equal to the value of \"minimum\".\n   */\n  exclusiveMinimum?: boolean;\n  /**\n   * Additional external documentation for this schema.\n   */\n  externalDocs?: ExternalDocumentationObject;\n  /**\n   * While relying on JSON Schema's defined formats, the OAS offers a few additional predefined formats.\n   */\n  format?: Format;\n  /**\n   * `items` MUST be present if `type` is `\"array\"`.\n   */\n  items?: SchemaObject | ReferenceObject;\n  /**\n   * The value of this keyword MUST be an integer.  This integer MUST be greater than, or equal to, 0.\n   *\n   * An array instance is valid against \"maxItems\" if its size is less than, or equal to, the value of this keyword.\n   */\n  maxItems?: number;\n  /**\n   * The value of this keyword MUST be a non-negative integer.\n   *\n   * The value of this keyword MUST be an integer.  This integer MUST be greater than, or equal to, 0.\n   *\n   * A string instance is valid against this keyword if its length is less than, or equal to, the value of this keyword.\n   *\n   * The length of a string instance is defined as the number of its characters as defined by {@link https://datatracker.ietf.org/doc/html/rfc7159 RFC 7159} [RFC7159].\n   */\n  maxLength?: number;\n  /**\n   * The value of this keyword MUST be an integer.  This integer MUST be greater than, or equal to, 0.\n   *\n   * An object instance is valid against \"maxProperties\" if its number of properties is less than, or equal to, the value of this keyword.\n   */\n  maxProperties?: number;\n  /**\n   * The value of \"maximum\" MUST be a number, representing an upper limit for a numeric instance.\n   *\n   * If the instance is a number, then this keyword validates if \"exclusiveMaximum\" is true and instance is less than the provided value, or else if the instance is less than or exactly equal to the provided value.\n   */\n  maximum?: number;\n  /**\n   * The value of this keyword MUST be an integer.  This integer MUST be greater than, or equal to, 0.\n   *\n   * An array instance is valid against \"minItems\" if its size is greater than, or equal to, the value of this keyword.\n   *\n   * If this keyword is not present, it may be considered present with a value of 0.\n   */\n  minItems?: number;\n  /**\n   * A string instance is valid against this keyword if its length is greater than, or equal to, the value of this keyword.\n   *\n   * The length of a string instance is defined as the number of its characters as defined by {@link https://datatracker.ietf.org/doc/html/rfc7159 RFC 7159} [RFC7159].\n   *\n   * The value of this keyword MUST be an integer.  This integer MUST be greater than, or equal to, 0.\n   *\n   * \"minLength\", if absent, may be considered as being present with integer value 0.\n   */\n  minLength?: number;\n  /**\n   * The value of this keyword MUST be an integer.  This integer MUST be greater than, or equal to, 0.\n   *\n   * An object instance is valid against \"minProperties\" if its number of properties is greater than, or equal to, the value of this keyword.\n   *\n   * If this keyword is not present, it may be considered present with a value of 0.\n   */\n  minProperties?: number;\n  /**\n   * The value of \"minimum\" MUST be a number, representing a lower limit for a numeric instance.\n   *\n   * If the instance is a number, then this keyword validates if \"exclusiveMinimum\" is true and instance is greater than the provided value, or else if the instance is greater than or exactly equal to the provided value.\n   */\n  minimum?: number;\n  /**\n   * The value of \"multipleOf\" MUST be a number, strictly greater than 0.\n   *\n   * A numeric instance is only valid if division by this keyword's value results in an integer.\n   */\n  multipleOf?: number;\n  /**\n   * This keyword's value MUST be an object.  This object MUST be a valid Schema Object.\n   *\n   * An instance is valid against this keyword if it fails to validate successfully against the schema defined by this keyword.\n   */\n  not?: SchemaObject | ReferenceObject;\n  /**\n   * This keyword only takes effect if `type` is explicitly defined within the same Schema Object. A `true` value indicates that both `null` values and values of the type specified by `type` are allowed. Other Schema Object constraints retain their defined behavior, and therefore may disallow the use of `null` as a value. A `false` value leaves the specified or default `type` unmodified. The default value is `false`.\n   */\n  nullable?: boolean;\n  /**\n   * This keyword's value MUST be an array.  This array MUST have at least one element.\n   *\n   * Elements of the array MUST be objects.  Each object MUST be a valid Schema Object.\n   *\n   * An instance validates successfully against this keyword if it validates successfully against exactly one schema defined by this keyword's value.\n   */\n  oneOf?: ReadonlyArray<SchemaObject | ReferenceObject>;\n  /**\n   * The value of this keyword MUST be a string.  This string SHOULD be a valid regular expression, according to the ECMA 262 regular expression dialect.\n   *\n   * A string instance is considered valid if the regular expression matches the instance successfully.  Recall: regular expressions are not implicitly anchored.\n   */\n  pattern?: string;\n  /**\n   * The value of \"properties\" MUST be an object.  Each value of this object MUST be an object, and each object MUST be a valid Schema Object.\n   *\n   * If absent, it can be considered the same as an empty object.\n   */\n  properties?: Record<string, SchemaObject | ReferenceObject>;\n  /**\n   * Relevant only for Schema Object `properties` definitions. Declares the property as \"read only\". This means that it MAY be sent as part of a response but SHOULD NOT be sent as part of the request. If the property is marked as `readOnly` being `true` and is in the `required` list, the `required` will take effect on the response only. A property MUST NOT be marked as both `readOnly` and `writeOnly` being `true`. Default value is `false`.\n   */\n  readOnly?: boolean;\n  /**\n   * The value of this keyword MUST be an array.  This array MUST have at least one element.  Elements of this array MUST be strings, and MUST be unique.\n   *\n   * An object instance is valid against this keyword if its property set contains all elements in this keyword's array value.\n   */\n  required?: ReadonlyArray<string>;\n  /**\n   * The value of both of these keywords MUST be a string.\n   *\n   * Both of these keywords can be used to decorate a user interface with information about the data produced by this user interface.  A title will preferrably be short, whereas a description will provide explanation about the purpose of the instance described by this schema.\n   *\n   * Both of these keywords MAY be used in root schemas, and in any subschemas.\n   */\n  title?: string;\n  /**\n   * The value of this keyword MUST be a string.\n   *\n   * An instance matches successfully if its primitive type is one of the types defined by keyword.  Recall: \"number\" includes \"integer\".\n   */\n  type?: 'array' | 'boolean' | 'integer' | 'number' | 'object' | 'string';\n  /**\n   * The value of this keyword MUST be a boolean.\n   *\n   * If this keyword has boolean value false, the instance validates successfully.  If it has boolean value true, the instance validates successfully if all of its elements are unique.\n   *\n   * If not present, this keyword may be considered present with boolean value false.\n   */\n  uniqueItems?: boolean;\n  /**\n   * Relevant only for Schema Object `properties` definitions. Declares the property as \"write only\". Therefore, it MAY be sent as part of a request but SHOULD NOT be sent as part of the response. If the property is marked as `writeOnly` being `true` and is in the `required` list, the `required` will take effect on the request only. A property MUST NOT be marked as both `readOnly` and `writeOnly` being `true`. Default value is `false`.\n   */\n  writeOnly?: boolean;\n  /**\n   * This MAY be used only on property schemas. It has no effect on root schemas. Adds additional metadata to describe the XML representation of this property.\n   */\n  xml?: XMLObject;\n}\n\n/**\n * Lists the required security schemes to execute this operation. The name used for each property MUST correspond to a security scheme declared in the {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.4.md#security-scheme-object Security Schemes} under the {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.4.md#components-object Components Object}.\n *\n * A Security Requirement Object MAY refer to multiple security schemes in which case all schemes MUST be satisfied for a request to be authorized. This enables support for scenarios where multiple query parameters or HTTP headers are required to convey security information.\n *\n * When the `security` field is defined on the {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.4.md#openapi-object OpenAPI Object} or {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.4.md#operation-object Operation Object} and contains multiple Security Requirement Objects, only one of the entries in the list needs to be satisfied to authorize the request. This enables support for scenarios where the API allows multiple, independent security schemes.\n *\n * An empty Security Requirement Object (`{}`) indicates anonymous access is supported.\n *\n * TODO: examples\n */\nexport interface SecurityRequirementObject {\n  /**\n   * Each name MUST correspond to a security scheme which is declared in the {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.4.md#security-scheme-object Security Schemes} under the {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.4.md#components-object Components Object}. If the security scheme is of type `\"oauth2\"` or `\"openIdConnect\"`, then the value is a list of scope names required for the execution, and the list MAY be empty if authorization does not require a specified scope. For other security scheme types, the array MUST be empty.\n   */\n  [name: string]: ReadonlyArray<string>;\n}\n\n/**\n * Defines a security scheme that can be used by the operations.\n *\n * Supported schemes are HTTP authentication, an API key (either as a header, a cookie parameter, or as a query parameter), OAuth2's common flows (implicit, password, client credentials, and authorization code) as defined in {@link https://tools.ietf.org/html/rfc6749 RFC6749}, and [[OpenID-Connect-Core]]. Please note that as of 2020, the implicit flow is about to be deprecated by {@link https://tools.ietf.org/html/draft-ietf-oauth-security-topics OAuth 2.0 Security Best Current Practice}. Recommended for most use cases is Authorization Code Grant flow with PKCE.\n *\n * This object MAY be extended with {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.4.md#specification-extensions Specification Extensions}.\n *\n * TODO: examples\n */\nexport type SecuritySchemeObject = SpecificationExtensions & {\n  /**\n   * A description for security scheme. {@link https://spec.commonmark.org/ CommonMark syntax} MAY be used for rich text representation.\n   */\n  description?: string;\n} & (\n    | {\n        /**\n         * **REQUIRED**. The location of the API key. Valid values are `\"query\"`, `\"header\"`, or `\"cookie\"`.\n         */\n        in: 'cookie' | 'header' | 'query';\n        /**\n         * **REQUIRED**. The name of the header, query or cookie parameter to be used.\n         */\n        name: string;\n        /**\n         * **REQUIRED**. The type of the security scheme. Valid values are `\"apiKey\"`, `\"http\"`, `\"oauth2\"`, `\"openIdConnect\"`.\n         */\n        type: 'apiKey';\n      }\n    | {\n        /**\n         * A hint to the client to identify how the bearer token is formatted. Bearer tokens are usually generated by an authorization server, so this information is primarily for documentation purposes.\n         */\n        bearerFormat?: string;\n        /**\n         * **REQUIRED**. The name of the HTTP Authentication scheme to be used in the {@link https://tools.ietf.org/html/rfc7235#section-5.1 Authorization header as defined in RFC7235}. The values used SHOULD be registered in the {@link https://www.iana.org/assignments/http-authschemes/http-authschemes.xhtml IANA Authentication Scheme registry}. The value is case-insensitive, as defined in {@link https://datatracker.ietf.org/doc/html/rfc7235#section-2.1 RFC7235}.\n         */\n        scheme: string;\n        /**\n         * **REQUIRED**. The type of the security scheme. Valid values are `\"apiKey\"`, `\"http\"`, `\"oauth2\"`, `\"openIdConnect\"`.\n         */\n        type: 'http';\n      }\n    | {\n        /**\n         * **REQUIRED**. An object containing configuration information for the flow types supported.\n         */\n        flows: OAuthFlowsObject;\n        /**\n         * **REQUIRED**. The type of the security scheme. Valid values are `\"apiKey\"`, `\"http\"`, `\"oauth2\"`, `\"openIdConnect\"`.\n         */\n        type: 'oauth2';\n      }\n    | {\n        /**\n         * **REQUIRED**. {@link https://openid.net/specs/openid-connect-discovery-1_0.html#ProviderConfig Well-known URL} to discover the [[OpenID-Connect-Discovery]] {@link https://openid.net/specs/openid-connect-discovery-1_0.html#ProviderMetadata provider metadata}.\n         */\n        openIdConnectUrl: string;\n        /**\n         * **REQUIRED**. The type of the security scheme. Valid values are `\"apiKey\"`, `\"http\"`, `\"oauth2\"`, `\"openIdConnect\"`.\n         */\n        type: 'openIdConnect';\n      }\n  );\n\n/**\n * An object representing a Server.\n *\n * This object MAY be extended with {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.4.md#specification-extensions Specification Extensions}.\n *\n * TODO: examples\n */\nexport interface ServerObject extends SpecificationExtensions {\n  /**\n   * An optional string describing the host designated by the URL. {@link https://spec.commonmark.org/ CommonMark syntax} MAY be used for rich text representation.\n   */\n  description?: string;\n  /**\n   * **REQUIRED**. A URL to the target host. This URL supports Server Variables and MAY be relative, to indicate that the host location is relative to the location where the document containing the Server Object is being served. Variable substitutions will be made when a variable is named in `{`braces`}`.\n   */\n  url: string;\n  /**\n   * A map between a variable name and its value. The value is used for substitution in the server's URL template.\n   */\n  variables?: Record<string, ServerVariableObject>;\n}\n\n/**\n * An object representing a Server Variable for server URL template substitution.\n *\n * This object MAY be extended with {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.4.md#specification-extensions Specification Extensions}.\n */\nexport interface ServerVariableObject extends SpecificationExtensions {\n  /**\n   * **REQUIRED**. The default value to use for substitution, which SHALL be sent if an alternate value is _not_ supplied. If the {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.4.md#server-variable-enum `enum`} is defined, the value SHOULD exist in the enum's values. Note that this behavior is different from the {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.4.md#schema-object Schema Object}'s `default` keyword, which documents the receiver's behavior rather than inserting the value into the data.\n   */\n  default: string;\n  /**\n   * An optional description for the server variable. {@link https://spec.commonmark.org/ CommonMark syntax} MAY be used for rich text representation.\n   */\n  description?: string;\n  /**\n   * An enumeration of string values to be used if the substitution options are from a limited set. The array SHOULD NOT be empty.\n   */\n  enum?: ReadonlyArray<string>;\n}\n\n/**\n * Adds metadata to a single tag that is used by the {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.4.md#operation-object Operation Object}. It is not mandatory to have a Tag Object per tag defined in the Operation Object instances.\n *\n * This object MAY be extended with {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.4.md#specification-extensions Specification Extensions}.\n *\n * **Tag Object Example**\n *\n * ```yaml\n * name: pet\n * description: Pets operations\n * ```\n */\nexport interface TagObject extends SpecificationExtensions {\n  /**\n   * A description for the tag. {@link https://spec.commonmark.org/ CommonMark syntax} MAY be used for rich text representation.\n   */\n  description?: string;\n  /**\n   * Additional external documentation for this tag.\n   */\n  externalDocs?: ExternalDocumentationObject;\n  /**\n   * **REQUIRED**. The name of the tag.\n   */\n  name: string;\n}\n\n/**\n * A metadata object that allows for more fine-tuned XML model definitions.\n *\n * When using arrays, XML element names are _not_ inferred (for singular/plural forms) and the `name` field SHOULD be used to add that information. See examples for expected behavior.\n *\n * This object MAY be extended with {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.4.md#specification-extensions Specification Extensions}.\n *\n * The `namespace` field is intended to match the syntax of {@link https://www.w3.org/TR/xml-names11/ XML namespaces}, although there are a few caveats:\n * - Version 3.0.3 and earlier of this specification erroneously used the term \"absolute URI\" instead of \"non-relative URI\", so authors using namespaces that include a fragment should check tooling support carefully.\n * - XML allows but discourages relative URI-references, while this specification outright forbids them.\n * - XML 1.1 allows IRIs ({@link https://datatracker.ietf.org/doc/html/rfc3987 RFC3987}) as namespaces, and specifies that namespaces are compared without any encoding or decoding, which means that IRIs encoded to meet this specification's URI syntax requirement cannot be compared to IRIs as-is.\n *\n * TODO: examples\n */\nexport interface XMLObject extends SpecificationExtensions {\n  /**\n   * Declares whether the property definition translates to an attribute instead of an element. Default value is `false`.\n   */\n  attribute?: boolean;\n  /**\n   * Replaces the name of the element/attribute used for the described schema property. When defined within `items`, it will affect the name of the individual XML elements within the list. When defined alongside `type` being `\"array\"` (outside the `items`), it will affect the wrapping element if and only if `wrapped` is `true`. If `wrapped` is `false`, it will be ignored.\n   */\n  name?: string;\n  /**\n   * The URI of the namespace definition. Value MUST be in the form of a non-relative URI.\n   */\n  namespace?: string;\n  /**\n   * The prefix to be used for the {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.4.md#xml-name name}.\n   */\n  prefix?: string;\n  /**\n   * MAY be used only for an array definition. Signifies whether the array is wrapped (for example, `<books><book/><book/></books>`) or unwrapped (`<book/><book/>`). Default value is `false`. The definition takes effect only when defined alongside `type` being `\"array\"` (outside the `items`).\n   */\n  wrapped?: boolean;\n}\n\ntype JsonSchemaFormats = 'date-time' | 'email' | 'hostname' | 'ipv4' | 'ipv6' | 'uri' | 'uriref';\n\ntype OpenApiSchemaFormats =\n  | 'int32'\n  | 'int64'\n  | 'float'\n  | 'double'\n  | 'byte'\n  | 'binary'\n  | 'date'\n  | 'date-time'\n  | 'password';\n\ntype Format = JsonSchemaFormats | OpenApiSchemaFormats | AnyString;\n"
  },
  {
    "path": "packages/shared/src/openApi/3.1.x/index.ts",
    "content": "export { parseV3_1_X } from './parser';\nexport type { OpenApiV3_1_X } from './types/spec';\n\nimport type {\n  InfoObject,\n  OperationObject,\n  ParameterObject,\n  ReferenceObject,\n  RequestBodyObject,\n  ResponseObject,\n  SchemaObject,\n} from './types/spec';\n\nexport interface OpenApiV3_1_XTypes {\n  InfoObject: InfoObject;\n  OperationObject: OperationObject;\n  ParameterObject: ParameterObject;\n  ReferenceObject: ReferenceObject;\n  RequestBodyObject: RequestBodyObject;\n  ResponseObject: ResponseObject;\n  SchemaObject: SchemaObject;\n}\n"
  },
  {
    "path": "packages/shared/src/openApi/3.1.x/parser/__tests__/operation.test.ts",
    "content": "import type { Context } from '../../../../ir/context';\nimport type { SecuritySchemeObject } from '../../types/spec';\nimport { parsePathOperation } from '../operation';\n\ntype ParseOperationProps = Parameters<typeof parsePathOperation>[0];\n\ndescribe('operation', () => {\n  const context = {\n    config: {\n      plugins: {},\n    },\n    ir: {\n      paths: {},\n      servers: [],\n    },\n  } as unknown as Context;\n\n  it('should parse operation correctly', () => {\n    const method = 'get';\n    const operation: ParseOperationProps['operation'] = {\n      operationId: 'testOperation',\n      responses: {},\n      security: [\n        {\n          apiKeyAuth: [],\n        },\n        {\n          apiKeyAuth: [],\n        },\n        {\n          oauthRule: ['read'],\n        },\n        {\n          oauthRule: ['write'],\n        },\n      ],\n      summary: 'Test Operation',\n    };\n    const path = '/test';\n\n    const oauth2: SecuritySchemeObject = {\n      description: 'OAuth2',\n      flows: {\n        password: {\n          scopes: {\n            read: 'Grants read access',\n            write: 'Grants write access',\n          },\n          tokenUrl: 'https://example.com/oauth/token',\n        },\n      },\n      type: 'oauth2',\n    };\n    const securitySchemesMap = new Map<string, SecuritySchemeObject>([\n      ['apiKeyAuth', { in: 'header', name: 'Auth', type: 'apiKey' }],\n      ['basicAuthRule', { description: 'Basic Auth', scheme: 'basic', type: 'http' }],\n      ['oauthRule', oauth2],\n    ]);\n    const state: ParseOperationProps['state'] = {\n      ids: new Map<string, string>(),\n    };\n\n    parsePathOperation({\n      context,\n      method,\n      operation,\n      path,\n      securitySchemesMap,\n      state,\n    });\n\n    expect(context.ir.paths?.[path]?.[method]).toEqual({\n      id: 'testOperation',\n      method,\n      operationId: 'testOperation',\n      path,\n      security: [{ in: 'header', name: 'Auth', type: 'apiKey' }, oauth2],\n      summary: 'Test Operation',\n    });\n  });\n});\n"
  },
  {
    "path": "packages/shared/src/openApi/3.1.x/parser/__tests__/validate.test.ts",
    "content": "import path from 'node:path';\n\nimport { Logger } from '@hey-api/codegen-core';\n\nimport { getSpecsPath, specFileToJson } from '../../../__tests__/utils';\nimport type { ValidatorResult } from '../../../shared/utils/validator';\nimport { validateOpenApiSpec } from '../validate';\n\nconst specsFolder = path.join(getSpecsPath(), '3.1.x', 'invalid');\n\ndescribe('validate', () => {\n  const scenarios: Array<\n    ValidatorResult & {\n      description: string;\n      file: string;\n    }\n  > = [\n    {\n      description: 'servers must be array',\n      file: path.join(specsFolder, 'servers-array.yaml'),\n      issues: [\n        {\n          code: 'invalid_type',\n          message: '`servers` must be an array.',\n          path: [],\n          severity: 'error',\n        },\n      ],\n      valid: false,\n    },\n    {\n      description: 'servers entry must be object',\n      file: path.join(specsFolder, 'servers-entry.yaml'),\n      issues: [\n        {\n          code: 'invalid_type',\n          context: {\n            actual: 'string',\n            expected: 'object',\n          },\n          message: 'Each entry in `servers` must be an object.',\n          path: ['servers', 0],\n          severity: 'error',\n        },\n      ],\n      valid: false,\n    },\n    {\n      description: 'servers entry required fields',\n      file: path.join(specsFolder, 'servers-required.yaml'),\n      issues: [\n        {\n          code: 'missing_required_field',\n          context: {\n            field: 'url',\n          },\n          message: 'Missing required field `url` in server object.',\n          path: ['servers', 0],\n          severity: 'error',\n        },\n      ],\n      valid: false,\n    },\n    {\n      description: 'operationId must be unique',\n      file: path.join(specsFolder, 'operationId-unique.yaml'),\n      issues: [\n        {\n          code: 'duplicate_key',\n          context: {\n            key: 'operationId',\n            value: 'foo',\n          },\n          message: 'Duplicate `operationId` found. Each `operationId` must be unique.',\n          path: ['paths', '/foo', 'post', 'operationId'],\n          severity: 'error',\n        },\n      ],\n      valid: false,\n    },\n  ];\n\n  it.each(scenarios)('$description', ({ file, issues, valid }) => {\n    const spec = specFileToJson(file);\n    const logger = new Logger();\n    const result = validateOpenApiSpec(spec, logger);\n    expect(result.valid).toBe(valid);\n    expect(result.issues).toEqual(issues);\n  });\n});\n"
  },
  {
    "path": "packages/shared/src/openApi/3.1.x/parser/filter.ts",
    "content": "import type { Logger } from '@hey-api/codegen-core';\n\nimport { createOperationKey } from '../../../ir/operation';\nimport { addNamespace, removeNamespace } from '../../../openApi/shared/utils/filter';\nimport { httpMethods } from '../../../openApi/shared/utils/operation';\nimport type { OpenApiV3_1_X, PathItemObject, PathsObject } from '../types/spec';\n\n/**\n * Replace source spec with filtered version.\n */\nexport const filterSpec = ({\n  logger,\n  operations,\n  parameters,\n  preserveOrder,\n  requestBodies,\n  responses,\n  schemas,\n  spec,\n}: {\n  logger: Logger;\n  operations: Set<string>;\n  parameters: Set<string>;\n  preserveOrder: boolean;\n  requestBodies: Set<string>;\n  responses: Set<string>;\n  schemas: Set<string>;\n  spec: OpenApiV3_1_X;\n}) => {\n  const eventFilterSpec = logger.timeEvent('filter-spec');\n  if (spec.components) {\n    if (spec.components.parameters) {\n      const filtered: typeof spec.components.parameters = {};\n\n      if (preserveOrder) {\n        for (const [name, source] of Object.entries(spec.components.parameters)) {\n          if (parameters.has(addNamespace('parameter', name))) {\n            filtered[name] = source;\n          }\n        }\n      } else {\n        for (const key of parameters) {\n          const { name } = removeNamespace(key);\n          const source = spec.components.parameters[name];\n          if (source) {\n            filtered[name] = source;\n          }\n        }\n      }\n\n      spec.components.parameters = filtered;\n    }\n\n    if (spec.components.requestBodies) {\n      const filtered: typeof spec.components.requestBodies = {};\n\n      if (preserveOrder) {\n        for (const [name, source] of Object.entries(spec.components.requestBodies)) {\n          if (requestBodies.has(addNamespace('body', name))) {\n            filtered[name] = source;\n          }\n        }\n      } else {\n        for (const key of requestBodies) {\n          const { name } = removeNamespace(key);\n          const source = spec.components.requestBodies[name];\n          if (source) {\n            filtered[name] = source;\n          }\n        }\n      }\n\n      spec.components.requestBodies = filtered;\n    }\n\n    if (spec.components.responses) {\n      const filtered: typeof spec.components.responses = {};\n\n      if (preserveOrder) {\n        for (const [name, source] of Object.entries(spec.components.responses)) {\n          if (responses.has(addNamespace('response', name))) {\n            filtered[name] = source;\n          }\n        }\n      } else {\n        for (const key of responses) {\n          const { name } = removeNamespace(key);\n          const source = spec.components.responses[name];\n          if (source) {\n            filtered[name] = source;\n          }\n        }\n      }\n\n      spec.components.responses = filtered;\n    }\n\n    if (spec.components.schemas) {\n      const filtered: typeof spec.components.schemas = {};\n\n      if (preserveOrder) {\n        for (const [name, source] of Object.entries(spec.components.schemas)) {\n          if (schemas.has(addNamespace('schema', name))) {\n            filtered[name] = source;\n          }\n        }\n      } else {\n        for (const key of schemas) {\n          const { name } = removeNamespace(key);\n          const source = spec.components.schemas[name];\n          if (source) {\n            filtered[name] = source;\n          }\n        }\n      }\n\n      spec.components.schemas = filtered;\n    }\n  }\n\n  if (spec.paths) {\n    for (const entry of Object.entries(spec.paths)) {\n      const path = entry[0] as keyof PathsObject;\n      const pathItem = entry[1] as PathItemObject;\n\n      for (const method of httpMethods) {\n        const operation = pathItem[method];\n        if (!operation) {\n          continue;\n        }\n\n        const key = addNamespace('operation', createOperationKey({ method, path }));\n        if (!operations.has(key)) {\n          delete pathItem[method];\n        }\n      }\n\n      // remove paths that have no operations left\n      if (!Object.keys(pathItem).length) {\n        delete spec.paths[path];\n      }\n    }\n  }\n  eventFilterSpec.timeEnd();\n};\n"
  },
  {
    "path": "packages/shared/src/openApi/3.1.x/parser/index.ts",
    "content": "import type { Context } from '../../../ir/context';\nimport { buildResourceMetadata } from '../../../openApi/shared/graph/meta';\nimport { transformOpenApiSpec } from '../../../openApi/shared/transforms';\nimport type { State } from '../../../openApi/shared/types/state';\nimport {\n  createFilteredDependencies,\n  createFilters,\n  hasFilters,\n} from '../../../openApi/shared/utils/filter';\nimport { buildGraph } from '../../../openApi/shared/utils/graph';\nimport { mergeParametersObjects } from '../../../openApi/shared/utils/parameter';\nimport { handleValidatorResult } from '../../../openApi/shared/utils/validator';\nimport type {\n  OpenApiV3_1_X,\n  ParameterObject,\n  PathItemObject,\n  PathsObject,\n  RequestBodyObject,\n  SecuritySchemeObject,\n} from '../types/spec';\nimport { filterSpec } from './filter';\nimport { parsePathOperation } from './operation';\nimport { parametersArrayToObject, parseParameter } from './parameter';\nimport { parseRequestBody } from './requestBody';\nimport { parseSchema } from './schema';\nimport { parseServers } from './server';\nimport { validateOpenApiSpec } from './validate';\nimport { parseWebhooks } from './webhook';\n\nexport const parseV3_1_X = (context: Context<OpenApiV3_1_X>) => {\n  if (context.config.parser.validate_EXPERIMENTAL) {\n    const result = validateOpenApiSpec(context.spec, context.logger);\n    handleValidatorResult({ context, result });\n  }\n\n  const shouldFilterSpec = hasFilters(context.config.parser.filters);\n  if (shouldFilterSpec) {\n    const filters = createFilters(context.config.parser.filters, context.spec, context.logger);\n    const { graph } = buildGraph(context.spec, context.logger);\n    const { resourceMetadata } = buildResourceMetadata(graph, context.logger);\n    const sets = createFilteredDependencies({\n      filters,\n      logger: context.logger,\n      resourceMetadata,\n    });\n    filterSpec({\n      ...sets,\n      logger: context.logger,\n      preserveOrder: filters.preserveOrder,\n      spec: context.spec,\n    });\n  }\n\n  transformOpenApiSpec({ context });\n\n  const state: State = {\n    ids: new Map(),\n  };\n  const securitySchemesMap = new Map<string, SecuritySchemeObject>();\n\n  // TODO: parser - handle more component types, old parser handles only parameters and schemas\n  if (context.spec.components) {\n    for (const name in context.spec.components.securitySchemes) {\n      const securityOrReference = context.spec.components.securitySchemes[name]!;\n      const securitySchemeObject =\n        '$ref' in securityOrReference\n          ? context.resolveRef<SecuritySchemeObject>(securityOrReference.$ref)\n          : securityOrReference;\n      securitySchemesMap.set(name, securitySchemeObject);\n    }\n\n    for (const name in context.spec.components.parameters) {\n      const $ref = `#/components/parameters/${name}`;\n      const parameterOrReference = context.spec.components.parameters[name]!;\n      const parameter =\n        '$ref' in parameterOrReference\n          ? context.resolveRef<ParameterObject>(parameterOrReference.$ref)\n          : parameterOrReference;\n\n      parseParameter({\n        $ref,\n        context,\n        parameter,\n      });\n    }\n\n    for (const name in context.spec.components.requestBodies) {\n      const $ref = `#/components/requestBodies/${name}`;\n      const requestBodyOrReference = context.spec.components.requestBodies[name]!;\n      const requestBody =\n        '$ref' in requestBodyOrReference\n          ? context.resolveRef<RequestBodyObject>(requestBodyOrReference.$ref)\n          : requestBodyOrReference;\n\n      parseRequestBody({\n        $ref,\n        context,\n        requestBody,\n      });\n    }\n\n    for (const name in context.spec.components.schemas) {\n      const $ref = `#/components/schemas/${name}`;\n      const schema = context.spec.components.schemas[name]!;\n\n      parseSchema({\n        $ref,\n        context,\n        schema,\n      });\n    }\n  }\n\n  parseServers({ context });\n\n  for (const path in context.spec.paths) {\n    if (path.startsWith('x-')) continue;\n    const pathItem = context.spec.paths[path as keyof PathsObject]! as PathItemObject;\n\n    const finalPathItem = pathItem.$ref\n      ? {\n          ...context.resolveRef<PathItemObject>(pathItem.$ref),\n          ...pathItem,\n        }\n      : pathItem;\n\n    const operationArgs: Omit<Parameters<typeof parsePathOperation>[0], 'method'> = {\n      context,\n      operation: {\n        description: finalPathItem.description,\n        parameters: parametersArrayToObject({\n          context,\n          parameters: finalPathItem.parameters,\n        }),\n        security: context.spec.security,\n        servers: finalPathItem.servers,\n        summary: finalPathItem.summary,\n      },\n      path: path as `/${string}`,\n      securitySchemesMap,\n      state,\n    };\n\n    if (finalPathItem.delete) {\n      parsePathOperation({\n        ...operationArgs,\n        method: 'delete',\n        operation: {\n          ...operationArgs.operation,\n          ...finalPathItem.delete,\n          parameters: mergeParametersObjects({\n            source: parametersArrayToObject({\n              context,\n              parameters: finalPathItem.delete.parameters,\n            }),\n            target: operationArgs.operation.parameters,\n          }),\n        },\n      });\n    }\n\n    if (finalPathItem.get) {\n      parsePathOperation({\n        ...operationArgs,\n        method: 'get',\n        operation: {\n          ...operationArgs.operation,\n          ...finalPathItem.get,\n          parameters: mergeParametersObjects({\n            source: parametersArrayToObject({\n              context,\n              parameters: finalPathItem.get.parameters,\n            }),\n            target: operationArgs.operation.parameters,\n          }),\n        },\n      });\n    }\n\n    if (finalPathItem.head) {\n      parsePathOperation({\n        ...operationArgs,\n        method: 'head',\n        operation: {\n          ...operationArgs.operation,\n          ...finalPathItem.head,\n          parameters: mergeParametersObjects({\n            source: parametersArrayToObject({\n              context,\n              parameters: finalPathItem.head.parameters,\n            }),\n            target: operationArgs.operation.parameters,\n          }),\n        },\n      });\n    }\n\n    if (finalPathItem.options) {\n      parsePathOperation({\n        ...operationArgs,\n        method: 'options',\n        operation: {\n          ...operationArgs.operation,\n          ...finalPathItem.options,\n          parameters: mergeParametersObjects({\n            source: parametersArrayToObject({\n              context,\n              parameters: finalPathItem.options.parameters,\n            }),\n            target: operationArgs.operation.parameters,\n          }),\n        },\n      });\n    }\n\n    if (finalPathItem.patch) {\n      parsePathOperation({\n        ...operationArgs,\n        method: 'patch',\n        operation: {\n          ...operationArgs.operation,\n          ...finalPathItem.patch,\n          parameters: mergeParametersObjects({\n            source: parametersArrayToObject({\n              context,\n              parameters: finalPathItem.patch.parameters,\n            }),\n            target: operationArgs.operation.parameters,\n          }),\n        },\n      });\n    }\n\n    if (finalPathItem.post) {\n      parsePathOperation({\n        ...operationArgs,\n        method: 'post',\n        operation: {\n          ...operationArgs.operation,\n          ...finalPathItem.post,\n          parameters: mergeParametersObjects({\n            source: parametersArrayToObject({\n              context,\n              parameters: finalPathItem.post.parameters,\n            }),\n            target: operationArgs.operation.parameters,\n          }),\n        },\n      });\n    }\n\n    if (finalPathItem.put) {\n      parsePathOperation({\n        ...operationArgs,\n        method: 'put',\n        operation: {\n          ...operationArgs.operation,\n          ...finalPathItem.put,\n          parameters: mergeParametersObjects({\n            source: parametersArrayToObject({\n              context,\n              parameters: finalPathItem.put.parameters,\n            }),\n            target: operationArgs.operation.parameters,\n          }),\n        },\n      });\n    }\n\n    if (finalPathItem.trace) {\n      parsePathOperation({\n        ...operationArgs,\n        method: 'trace',\n        operation: {\n          ...operationArgs.operation,\n          ...finalPathItem.trace,\n          parameters: mergeParametersObjects({\n            source: parametersArrayToObject({\n              context,\n              parameters: finalPathItem.trace.parameters,\n            }),\n            target: operationArgs.operation.parameters,\n          }),\n        },\n      });\n    }\n  }\n\n  parseWebhooks({ context, securitySchemesMap });\n};\n"
  },
  {
    "path": "packages/shared/src/openApi/3.1.x/parser/mediaType.ts",
    "content": "import type { IRMediaType } from '../../../ir/mediaType';\nimport { isMediaTypeFileLike, mediaTypeToIrMediaType } from '../../../ir/mediaType';\nimport type { MediaTypeObject, SchemaObject } from '../types/spec';\n\ninterface Content {\n  mediaType: string;\n  schema: SchemaObject | undefined;\n  type: IRMediaType | undefined;\n}\n\nexport const contentToSchema = ({ content }: { content: Content }): SchemaObject | undefined => {\n  const { mediaType, schema } = content;\n\n  if (!schema) {\n    if (isMediaTypeFileLike({ mediaType })) {\n      return {\n        format: 'binary',\n        type: 'string',\n      };\n    }\n    return;\n  }\n\n  if (schema.type === 'string' && !schema.format && isMediaTypeFileLike({ mediaType })) {\n    return {\n      ...schema,\n      format: 'binary',\n    };\n  }\n\n  return schema;\n};\n\nexport const mediaTypeObjects = ({\n  content,\n}: {\n  content: Record<string, MediaTypeObject> | undefined;\n}): ReadonlyArray<Content> => {\n  const objects: Array<Content> = [];\n\n  for (const mediaType in content) {\n    objects.push({\n      mediaType,\n      schema: content[mediaType]!.schema,\n      type: mediaTypeToIrMediaType({ mediaType }),\n    });\n  }\n\n  return objects;\n};\n"
  },
  {
    "path": "packages/shared/src/openApi/3.1.x/parser/operation.ts",
    "content": "import type { Context } from '../../../ir/context';\nimport type { IR } from '../../../ir/types';\nimport type { State } from '../../../openApi/shared/types/state';\nimport type { httpMethods } from '../../../openApi/shared/utils/operation';\nimport { operationToId } from '../../../openApi/shared/utils/operation';\nimport type {\n  OperationObject,\n  ReferenceObject,\n  RequestBodyObject,\n  ResponseObject,\n  SecuritySchemeObject,\n} from '../types/spec';\nimport { contentToSchema, mediaTypeObjects } from './mediaType';\nimport { paginationField } from './pagination';\nimport { parseExtensions, schemaToIrSchema } from './schema';\n\nexport interface Operation\n  extends Omit<OperationObject, 'parameters'>, Pick<IR.OperationObject, 'parameters'> {}\n\nconst parseOperationJsDoc = ({\n  irOperation,\n  operation,\n}: {\n  irOperation: IR.OperationObject;\n  operation: Operation;\n}) => {\n  if (operation.deprecated !== undefined) {\n    irOperation.deprecated = operation.deprecated;\n  }\n\n  if (operation.description) {\n    irOperation.description = operation.description;\n  }\n\n  if (operation.summary) {\n    irOperation.summary = operation.summary;\n  }\n\n  if (operation.tags?.length) {\n    irOperation.tags = operation.tags;\n  }\n};\n\nconst initIrOperation = ({\n  context,\n  method,\n  operation,\n  path,\n  state,\n}: Pick<IR.OperationObject, 'method' | 'path'> & {\n  context: Context;\n  operation: Operation;\n  state: State;\n}): IR.OperationObject => {\n  const irOperation: IR.OperationObject = {\n    id: operationToId({\n      context,\n      id: operation.operationId,\n      method,\n      path,\n      state,\n    }),\n    method,\n    path,\n  };\n\n  if (operation.operationId) {\n    irOperation.operationId = operation.operationId;\n  }\n\n  parseOperationJsDoc({\n    irOperation,\n    operation,\n  });\n\n  parseExtensions({\n    source: operation,\n    target: irOperation,\n  });\n\n  return irOperation;\n};\n\nconst operationToIrOperation = ({\n  context,\n  method,\n  operation,\n  path,\n  securitySchemesMap,\n  state,\n}: Pick<IR.OperationObject, 'method' | 'path'> & {\n  context: Context;\n  operation: Operation;\n  securitySchemesMap: Map<string, SecuritySchemeObject>;\n  state: State;\n}): IR.OperationObject => {\n  const irOperation = initIrOperation({\n    context,\n    method,\n    operation,\n    path,\n    state,\n  });\n\n  if (operation.parameters) {\n    irOperation.parameters = operation.parameters;\n  }\n\n  if (operation.requestBody) {\n    const requestBody =\n      '$ref' in operation.requestBody\n        ? context.resolveRef<RequestBodyObject>(operation.requestBody.$ref)\n        : operation.requestBody;\n    const contents = mediaTypeObjects({ content: requestBody.content });\n    // TODO: add support for multiple content types, for now prefer JSON\n    const content = contents.find((content) => content.type === 'json') || contents[0];\n\n    if (content) {\n      const pagination = paginationField({\n        context,\n        name: '',\n        schema: {\n          description: requestBody.description,\n          ...content.schema,\n        },\n      });\n\n      irOperation.body = {\n        mediaType: content.mediaType,\n        schema: schemaToIrSchema({\n          context,\n          schema: {\n            description: requestBody.description,\n            ...('$ref' in operation.requestBody ? operation.requestBody : content.schema),\n          },\n          state: undefined,\n        }),\n      };\n\n      if (pagination) {\n        irOperation.body.pagination = pagination;\n      }\n\n      if (requestBody.required) {\n        irOperation.body.required = requestBody.required;\n      }\n\n      if (content.type) {\n        irOperation.body.type = content.type;\n      }\n    }\n  }\n\n  for (const name in operation.responses) {\n    if (name.startsWith('x-')) continue;\n\n    if (!irOperation.responses) {\n      irOperation.responses = {};\n    }\n\n    const response = operation.responses[name]! as ResponseObject | ReferenceObject;\n    const responseObject =\n      '$ref' in response ? context.resolveRef<ResponseObject>(response.$ref) : response;\n    const contents = mediaTypeObjects({ content: responseObject.content });\n    // TODO: add support for multiple content types, for now prefer JSON\n    const content = contents.find((content) => content.type === 'json') || contents[0];\n\n    if (content) {\n      irOperation.responses[name] = {\n        mediaType: content.mediaType,\n        schema: schemaToIrSchema({\n          context,\n          schema: {\n            description: responseObject.description,\n            ...contentToSchema({ content }),\n          },\n          state: undefined,\n        }),\n      };\n    } else {\n      irOperation.responses[name] = {\n        schema: {\n          description: responseObject.description,\n          // TODO: parser - cover all statues with empty response bodies\n          // 1xx, 204, 205, 304\n          type: name === '204' ? 'void' : 'unknown',\n        },\n      };\n    }\n  }\n\n  if (operation.security) {\n    const securitySchemeObjects: Map<string, IR.SecurityObject> = new Map();\n\n    for (const securityRequirementObject of operation.security) {\n      for (const name in securityRequirementObject) {\n        const securitySchemeObject = securitySchemesMap.get(name);\n\n        if (!securitySchemeObject) {\n          continue;\n        }\n\n        securitySchemeObjects.set(name, securitySchemeObject);\n      }\n    }\n\n    if (securitySchemeObjects.size) {\n      irOperation.security = Array.from(securitySchemeObjects.values());\n    }\n  }\n\n  // TODO: parser - handle servers\n  // qux: operation.servers\n\n  return irOperation;\n};\n\nconst parseOperationObject = ({\n  context,\n  method,\n  operation,\n  path,\n  securitySchemesMap,\n  state,\n}: {\n  context: Context;\n  method: (typeof httpMethods)[number];\n  operation: Operation;\n  path: keyof IR.PathsObject;\n  securitySchemesMap: Map<string, SecuritySchemeObject>;\n  state: State;\n}) => {\n  if (operation.servers) {\n    context.ir.servers = [...(context.ir.servers ?? []), ...operation.servers];\n  }\n\n  const parsed = operationToIrOperation({\n    context,\n    method,\n    operation,\n    path,\n    securitySchemesMap,\n    state,\n  });\n\n  return { parsed };\n};\n\nexport const parsePathOperation = ({\n  context,\n  method,\n  path,\n  ...options\n}: {\n  context: Context;\n  method: (typeof httpMethods)[number];\n  operation: Operation;\n  path: keyof IR.PathsObject;\n  securitySchemesMap: Map<string, SecuritySchemeObject>;\n  state: State;\n}) => {\n  if (!context.ir.paths) {\n    context.ir.paths = {};\n  }\n\n  if (!context.ir.paths[path]) {\n    context.ir.paths[path] = {};\n  }\n\n  const { parsed } = parseOperationObject({\n    context,\n    method,\n    path,\n    ...options,\n  });\n\n  context.ir.paths[path][method] = parsed;\n};\n\nexport const parseWebhookOperation = ({\n  context,\n  key,\n  method,\n  ...options\n}: {\n  context: Context;\n  key: string;\n  method: (typeof httpMethods)[number];\n  operation: Operation;\n  securitySchemesMap: Map<string, SecuritySchemeObject>;\n  state: State;\n}) => {\n  if (!context.ir.webhooks) {\n    context.ir.webhooks = {};\n  }\n\n  if (!context.ir.webhooks[key]) {\n    context.ir.webhooks[key] = {};\n  }\n\n  const { parsed } = parseOperationObject({\n    context,\n    method,\n    path: key as `/${string}`,\n    ...options,\n  });\n\n  context.ir.webhooks[key][method] = parsed;\n};\n"
  },
  {
    "path": "packages/shared/src/openApi/3.1.x/parser/pagination.ts",
    "content": "import type { Context } from '../../../ir/context';\nimport { getPaginationKeywordsRegExp } from '../../../ir/pagination';\nimport type { SchemaType } from '../../../openApi/shared/types/schema';\nimport type { ParameterObject, RequestBodyObject } from '../types/spec';\nimport type { SchemaObject } from '../types/spec';\nimport { mediaTypeObjects } from './mediaType';\nimport { getSchemaTypes } from './schema';\n\nconst isPaginationType = (schemaTypes: ReadonlyArray<SchemaType<SchemaObject>>): boolean =>\n  schemaTypes.includes('boolean') ||\n  schemaTypes.includes('integer') ||\n  schemaTypes.includes('number') ||\n  schemaTypes.includes('string');\n\n// We handle only simple values for now, up to 1 nested field\nexport const paginationField = ({\n  context,\n  name,\n  schema,\n}: {\n  context: Context;\n  name: string;\n  schema: SchemaObject;\n}): boolean | string => {\n  const paginationRegExp = getPaginationKeywordsRegExp(context.config.parser.pagination);\n  if (paginationRegExp.test(name)) {\n    return true;\n  }\n\n  if (schema.$ref) {\n    const ref = context.resolveRef<ParameterObject | RequestBodyObject | SchemaObject>(schema.$ref);\n\n    if ('content' in ref || 'in' in ref) {\n      let refSchema: SchemaObject | undefined;\n\n      if ('in' in ref) {\n        refSchema = ref.schema;\n      }\n\n      if (!refSchema) {\n        // parameter or body\n        const contents = mediaTypeObjects({ content: ref.content });\n        // TODO: add support for multiple content types, for now prefer JSON\n        const content = contents.find((content) => content.type === 'json') || contents[0];\n        if (content?.schema) {\n          refSchema = content.schema;\n        }\n      }\n\n      if (!refSchema) {\n        return false;\n      }\n\n      return paginationField({\n        context,\n        name,\n        schema: refSchema,\n      });\n    }\n\n    return paginationField({\n      context,\n      name,\n      schema: ref,\n    });\n  }\n\n  for (const name in schema.properties) {\n    const paginationRegExp = getPaginationKeywordsRegExp(context.config.parser.pagination);\n\n    if (paginationRegExp.test(name)) {\n      const property = schema.properties[name]!;\n\n      if (typeof property !== 'boolean') {\n        // TODO: resolve deeper references\n        const schemaTypes = getSchemaTypes({ schema: property });\n\n        if (!schemaTypes.length) {\n          const compositionSchemas = property.anyOf ?? property.oneOf;\n          const nonNullCompositionSchemas = (compositionSchemas ?? []).filter(\n            (schema) => schema.type !== 'null',\n          );\n          if (nonNullCompositionSchemas.length === 1) {\n            const schemaTypes = getSchemaTypes({\n              schema: nonNullCompositionSchemas[0]!,\n            });\n            if (isPaginationType(schemaTypes)) {\n              return name;\n            }\n          }\n        }\n\n        if (isPaginationType(schemaTypes)) {\n          return name;\n        }\n      }\n    }\n  }\n\n  for (const allOf of schema.allOf ?? []) {\n    const pagination = paginationField({\n      context,\n      name,\n      schema: allOf,\n    });\n    if (pagination) {\n      return pagination;\n    }\n  }\n\n  return false;\n};\n"
  },
  {
    "path": "packages/shared/src/openApi/3.1.x/parser/parameter.ts",
    "content": "import type { Context } from '../../../ir/context';\nimport type { IR } from '../../../ir/types';\nimport { refToName } from '../../../utils/ref';\nimport type { ParameterObject, ReferenceObject, SchemaObject } from '../types/spec';\nimport { mediaTypeObjects } from './mediaType';\nimport { paginationField } from './pagination';\nimport { parseExtensions, schemaToIrSchema } from './schema';\n\n/**\n * Returns default parameter `allowReserved` based on value of `in`.\n */\nconst defaultAllowReserved = (_in: ParameterObject['in']): boolean | undefined => {\n  switch (_in) {\n    // this keyword only applies to parameters with an `in` value of `query`\n    case 'query':\n      return false;\n    default:\n      return;\n  }\n};\n\n/**\n * Returns default parameter `explode` based on value of `style`.\n */\nconst defaultExplode = (style: Required<ParameterObject>['style']): boolean => {\n  switch (style) {\n    // default value for `deepObject` is `false`, but that behavior is undefined\n    // so we use `true` to make this work with the `client-fetch` package\n    case 'deepObject':\n    case 'form':\n      return true;\n    default:\n      return false;\n  }\n};\n\n/**\n * Returns default parameter `style` based on value of `in`.\n */\nconst defaultStyle = (_in: ParameterObject['in']): Required<ParameterObject>['style'] => {\n  switch (_in) {\n    case 'header':\n    case 'path':\n      return 'simple';\n    case 'cookie':\n    case 'query':\n      return 'form';\n  }\n};\n\nexport const parametersArrayToObject = ({\n  context,\n  parameters,\n}: {\n  context: Context;\n  parameters?: ReadonlyArray<ParameterObject | ReferenceObject>;\n}): IR.ParametersObject | undefined => {\n  if (!parameters || !Object.keys(parameters).length) {\n    return;\n  }\n\n  const parametersObject: IR.ParametersObject = {};\n\n  for (const parameterOrReference of parameters) {\n    const parameter =\n      '$ref' in parameterOrReference\n        ? context.dereference<ParameterObject>(parameterOrReference)\n        : parameterOrReference;\n\n    if (!parametersObject[parameter.in]) {\n      parametersObject[parameter.in] = {};\n    }\n\n    // lowercase keys for case insensitive access\n    parametersObject[parameter.in]![parameter.name.toLocaleLowerCase()] = parameterToIrParameter({\n      $ref: `#/todo/real/path/to/parameter/${parameter.name}`,\n      context,\n      parameter,\n    });\n  }\n\n  return parametersObject;\n};\n\nconst parameterToIrParameter = ({\n  $ref,\n  context,\n  parameter,\n}: {\n  $ref: string;\n  context: Context;\n  parameter: ParameterObject;\n}): IR.ParameterObject => {\n  // TODO: parser - fix\n  let schema = parameter.schema;\n\n  if (!schema) {\n    const contents = mediaTypeObjects({ content: parameter.content });\n    // TODO: add support for multiple content types, for now prefer JSON\n    const content = contents.find((content) => content.type === 'json') || contents[0];\n    if (content) {\n      schema = content.schema;\n    }\n  }\n\n  const finalSchema: SchemaObject = {\n    deprecated: parameter.deprecated,\n    description: parameter.description,\n    ...schema,\n  };\n\n  const pagination = paginationField({\n    context,\n    name: parameter.name,\n    schema: finalSchema,\n  });\n\n  const style = parameter.style || defaultStyle(parameter.in);\n  const explode = parameter.explode !== undefined ? parameter.explode : defaultExplode(style);\n  const allowReserved =\n    parameter.allowReserved !== undefined\n      ? parameter.allowReserved\n      : defaultAllowReserved(parameter.in);\n\n  const irParameter: IR.ParameterObject = {\n    allowReserved,\n    explode,\n    location: parameter.in,\n    name: parameter.name,\n    schema: schemaToIrSchema({\n      context,\n      schema: finalSchema,\n      state: {\n        $ref,\n        circularReferenceTracker: new Set(),\n      },\n    }),\n    style,\n  };\n\n  if (parameter.deprecated) {\n    irParameter.deprecated = parameter.deprecated;\n  }\n\n  if (parameter.description) {\n    irParameter.description = parameter.description;\n  }\n\n  if (pagination) {\n    irParameter.pagination = pagination;\n  }\n\n  if (parameter.required) {\n    irParameter.required = parameter.required;\n  }\n\n  parseExtensions({\n    source: parameter,\n    target: irParameter,\n  });\n\n  return irParameter;\n};\n\nexport const parseParameter = ({\n  $ref,\n  context,\n  parameter,\n}: {\n  $ref: string;\n  context: Context;\n  parameter: ParameterObject;\n}) => {\n  if (!context.ir.components) {\n    context.ir.components = {};\n  }\n\n  if (!context.ir.components.parameters) {\n    context.ir.components.parameters = {};\n  }\n\n  context.ir.components.parameters[refToName($ref)] = parameterToIrParameter({\n    $ref,\n    context,\n    parameter,\n  });\n};\n"
  },
  {
    "path": "packages/shared/src/openApi/3.1.x/parser/requestBody.ts",
    "content": "import type { Context } from '../../../ir/context';\nimport type { IR } from '../../../ir/types';\nimport { refToName } from '../../../utils/ref';\nimport type { RequestBodyObject, SchemaObject } from '../types/spec';\nimport { mediaTypeObjects } from './mediaType';\nimport { schemaToIrSchema } from './schema';\n\nconst requestBodyToIrRequestBody = ({\n  $ref,\n  context,\n  requestBody,\n}: {\n  $ref: string;\n  context: Context;\n  requestBody: RequestBodyObject;\n}): IR.RequestBodyObject => {\n  // TODO: parser - fix\n  const contents = mediaTypeObjects({ content: requestBody.content });\n  // TODO: add support for multiple content types, for now prefer JSON\n  const content = contents.find((content) => content.type === 'json') || contents[0];\n  const schema = content ? content.schema : undefined;\n\n  const finalSchema: SchemaObject = {\n    description: requestBody.description,\n    ...schema,\n  };\n\n  const irRequestBody: IR.RequestBodyObject = {\n    schema: schemaToIrSchema({\n      context,\n      schema: finalSchema,\n      state: {\n        $ref,\n        circularReferenceTracker: new Set(),\n      },\n    }),\n  };\n\n  if (requestBody.description) {\n    irRequestBody.description = requestBody.description;\n  }\n\n  if (requestBody.required) {\n    irRequestBody.required = requestBody.required;\n  }\n\n  return irRequestBody;\n};\n\nexport const parseRequestBody = ({\n  $ref,\n  context,\n  requestBody,\n}: {\n  $ref: string;\n  context: Context;\n  requestBody: RequestBodyObject;\n}) => {\n  if (!context.ir.components) {\n    context.ir.components = {};\n  }\n\n  if (!context.ir.components.requestBodies) {\n    context.ir.components.requestBodies = {};\n  }\n\n  context.ir.components.requestBodies[refToName($ref)] = requestBodyToIrRequestBody({\n    $ref,\n    context,\n    requestBody,\n  });\n};\n"
  },
  {
    "path": "packages/shared/src/openApi/3.1.x/parser/schema.ts",
    "content": "import type { Context } from '../../../ir/context';\nimport { isMediaTypeFileLike } from '../../../ir/mediaType';\nimport type { IR } from '../../../ir/types';\nimport { addItemsToSchema } from '../../../ir/utils';\nimport type {\n  SchemaState,\n  SchemaType,\n  SchemaWithRequired,\n} from '../../../openApi/shared/types/schema';\nimport {\n  convertDiscriminatorValue,\n  type DiscriminatorPropertyType,\n  discriminatorValues,\n} from '../../../openApi/shared/utils/discriminator';\nimport { isTopLevelComponent, refToName } from '../../../utils/ref';\nimport type { SchemaObject } from '../types/spec';\n\nexport const getSchemaTypes = ({\n  schema,\n}: {\n  schema: SchemaObject;\n}): ReadonlyArray<SchemaType<SchemaObject>> => {\n  if (typeof schema.type === 'string') {\n    return [schema.type];\n  }\n\n  if (schema.type) {\n    return schema.type;\n  }\n\n  // infer object based on the presence of properties\n  if (schema.properties) {\n    return ['object'];\n  }\n\n  return [];\n};\n\n/**\n * Finds the type of a discriminator property by looking it up in the provided schemas.\n * Searches through properties and allOf chains to find the property definition.\n */\nconst findDiscriminatorPropertyType = ({\n  context,\n  propertyName,\n  schemas,\n}: {\n  context: Context;\n  propertyName: string;\n  schemas: ReadonlyArray<SchemaObject>;\n}): DiscriminatorPropertyType => {\n  for (const schema of schemas) {\n    const resolved = schema.$ref ? context.resolveRef<SchemaObject>(schema.$ref) : schema;\n\n    // Check direct properties\n    const property = resolved.properties?.[propertyName];\n    if (property === true) {\n      continue;\n    }\n    if (property) {\n      const resolvedProperty = property.$ref\n        ? context.resolveRef<SchemaObject>(property.$ref)\n        : property;\n      // Handle both single type and array of types (3.1.x supports type arrays)\n      const propertyTypes = Array.isArray(resolvedProperty.type)\n        ? resolvedProperty.type\n        : resolvedProperty.type\n          ? [resolvedProperty.type]\n          : [];\n      for (const propType of propertyTypes) {\n        if (propType === 'boolean' || propType === 'integer' || propType === 'number') {\n          return propType;\n        }\n      }\n    }\n\n    // Check allOf chains\n    if (resolved.allOf) {\n      const foundType = findDiscriminatorPropertyType({\n        context,\n        propertyName,\n        schemas: resolved.allOf,\n      });\n      if (foundType !== 'string') {\n        return foundType;\n      }\n    }\n  }\n\n  return 'string';\n};\n\n/**\n * Recursively finds discriminators in a schema, including nested allOf compositions.\n * This is needed when a schema extends another schema via allOf, and that parent\n * schema is itself an allOf composition with discriminators in inline schemas.\n */\nconst findDiscriminatorsInSchema = ({\n  context,\n  discriminators = [],\n  schema,\n}: {\n  context: Context;\n  discriminators?: Array<{\n    discriminator: NonNullable<SchemaObject['discriminator']>;\n    oneOf?: SchemaObject['oneOf'];\n  }>;\n  schema: SchemaObject;\n}): Array<{\n  discriminator: NonNullable<SchemaObject['discriminator']>;\n  oneOf?: SchemaObject['oneOf'];\n}> => {\n  // Check if this schema has a discriminator\n  if (schema.discriminator) {\n    discriminators.push({\n      discriminator: schema.discriminator,\n      oneOf: schema.oneOf,\n    });\n  }\n\n  // If this schema is an allOf composition, recursively search in its components\n  if (schema.allOf) {\n    for (const compositionSchema of schema.allOf) {\n      let resolvedSchema: SchemaObject;\n      if (compositionSchema.$ref) {\n        resolvedSchema = context.resolveRef<SchemaObject>(compositionSchema.$ref);\n      } else {\n        resolvedSchema = compositionSchema;\n      }\n\n      findDiscriminatorsInSchema({\n        context,\n        discriminators,\n        schema: resolvedSchema,\n      });\n    }\n  }\n\n  return discriminators;\n};\n\n/**\n * Gets the discriminator value for a schema.\n * Returns only the schema's own discriminator value, not child values.\n */\nconst getAllDiscriminatorValues = ({\n  discriminator,\n  schemaRef,\n}: {\n  discriminator: NonNullable<SchemaObject['discriminator']>;\n  schemaRef: string;\n}): Array<string> => {\n  const values: Array<string> = [];\n\n  // Check each entry in the discriminator mapping\n  for (const [value, mappedSchemaRef] of Object.entries(discriminator.mapping || {})) {\n    if (mappedSchemaRef === schemaRef) {\n      // This is the current schema's own value\n      values.push(value);\n    }\n  }\n\n  return values;\n};\n\nconst parseSchemaJsDoc = ({\n  irSchema,\n  schema,\n}: {\n  irSchema: IR.SchemaObject;\n  schema: SchemaObject;\n}) => {\n  if (schema.deprecated !== undefined) {\n    irSchema.deprecated = schema.deprecated;\n  }\n\n  if (schema.example) {\n    irSchema.example = schema.example;\n  }\n\n  if (schema.description) {\n    irSchema.description = schema.description;\n  }\n\n  if (schema.title) {\n    irSchema.title = schema.title;\n  }\n};\n\nconst parseSchemaMeta = ({\n  irSchema,\n  schema,\n}: {\n  irSchema: IR.SchemaObject;\n  schema: SchemaObject;\n}) => {\n  if (schema.const !== undefined) {\n    irSchema.const = schema.const;\n\n    // try to infer schema type\n    if (!schema.type) {\n      if (schema.const === null) {\n        irSchema.type = 'null';\n      } else {\n        switch (typeof schema.const) {\n          case 'bigint':\n          case 'number':\n            irSchema.type = 'number';\n            break;\n          case 'boolean':\n            irSchema.type = 'boolean';\n            break;\n          case 'string':\n            irSchema.type = 'string';\n            break;\n        }\n      }\n    }\n  }\n\n  if (schema.default !== undefined) {\n    irSchema.default = schema.default;\n  }\n\n  if (schema.exclusiveMaximum !== undefined) {\n    irSchema.exclusiveMaximum = schema.exclusiveMaximum;\n  }\n\n  if (schema.exclusiveMinimum !== undefined) {\n    irSchema.exclusiveMinimum = schema.exclusiveMinimum;\n  }\n\n  if (schema.format) {\n    irSchema.format = schema.format;\n  } else if (\n    schema.contentMediaType &&\n    isMediaTypeFileLike({ mediaType: schema.contentMediaType })\n  ) {\n    irSchema.format = 'binary';\n  }\n\n  if (schema.maximum !== undefined) {\n    irSchema.maximum = schema.maximum;\n  }\n\n  if (schema.maxItems !== undefined) {\n    irSchema.maxItems = schema.maxItems;\n  }\n\n  if (schema.maxLength !== undefined) {\n    irSchema.maxLength = schema.maxLength;\n  }\n\n  if (schema.minimum !== undefined) {\n    irSchema.minimum = schema.minimum;\n  }\n\n  if (schema.minItems !== undefined) {\n    irSchema.minItems = schema.minItems;\n  }\n\n  if (schema.minLength !== undefined) {\n    irSchema.minLength = schema.minLength;\n  }\n\n  if (schema.pattern) {\n    irSchema.pattern = schema.pattern;\n  }\n\n  if (schema.readOnly) {\n    irSchema.accessScope = 'read';\n  } else if (schema.writeOnly) {\n    irSchema.accessScope = 'write';\n  }\n};\n\nconst parseArray = ({\n  context,\n  irSchema = {},\n  schema,\n  state,\n}: {\n  context: Context;\n  irSchema?: IR.SchemaObject;\n  schema: SchemaObject;\n  state: SchemaState;\n}): IR.SchemaObject => {\n  if (\n    (schema.prefixItems && schema.prefixItems.length) ||\n    (schema.maxItems && schema.maxItems === schema.minItems) ||\n    schema.const !== undefined\n  ) {\n    irSchema.type = 'tuple';\n  } else {\n    irSchema.type = 'array';\n  }\n\n  let schemaItems: Array<IR.SchemaObject> = [];\n\n  for (const item of schema.prefixItems ?? []) {\n    const irItemSchema = schemaToIrSchema({\n      context,\n      schema: item,\n      state,\n    });\n    schemaItems.push(irItemSchema);\n  }\n\n  if (schema.items) {\n    const irItemsSchema = schemaToIrSchema({\n      context,\n      schema: schema.items,\n      state,\n    });\n\n    if (!schemaItems.length && schema.maxItems && schema.maxItems === schema.minItems) {\n      schemaItems = Array(schema.maxItems).fill(irItemsSchema);\n    } else {\n      const ofArray = schema.items.allOf || schema.items.anyOf || schema.items.oneOf;\n      if (\n        ofArray &&\n        ofArray.length > 1 &&\n        !getSchemaTypes({ schema: schema.items }).includes('null')\n      ) {\n        // bring composition up to avoid incorrectly nested arrays\n        irSchema = {\n          ...irSchema,\n          ...irItemsSchema,\n        };\n      } else {\n        schemaItems.push(irItemsSchema);\n      }\n    }\n  }\n\n  irSchema = addItemsToSchema({\n    items: schemaItems,\n    schema: irSchema,\n  });\n\n  return irSchema;\n};\n\nconst parseBoolean = ({\n  irSchema = {},\n}: {\n  context: Context;\n  irSchema?: IR.SchemaObject;\n  schema: SchemaObject;\n}): IR.SchemaObject => {\n  irSchema.type = 'boolean';\n\n  return irSchema;\n};\n\nconst parseNull = ({\n  irSchema = {},\n}: {\n  context: Context;\n  irSchema?: IR.SchemaObject;\n  schema: SchemaObject;\n}) => {\n  irSchema.type = 'null';\n\n  return irSchema;\n};\n\nconst parseNumber = ({\n  irSchema = {},\n  schema,\n}: {\n  context: Context;\n  irSchema?: IR.SchemaObject;\n  schema: Omit<SchemaObject, 'type'> & {\n    type: SchemaType<SchemaObject>;\n  };\n}): IR.SchemaObject => {\n  irSchema.type = schema.type;\n\n  return irSchema;\n};\n\nconst parseObject = ({\n  context,\n  irSchema = {},\n  schema,\n  state,\n}: {\n  context: Context;\n  irSchema?: IR.SchemaObject;\n  schema: SchemaObject;\n  state: SchemaState;\n}): IR.SchemaObject => {\n  irSchema.type = 'object';\n\n  const schemaProperties: Record<string, IR.SchemaObject> = {};\n\n  for (const name in schema.properties) {\n    const property = schema.properties[name]!;\n    if (typeof property === 'boolean') {\n      // TODO: parser - handle boolean properties\n    } else {\n      const irPropertySchema = schemaToIrSchema({\n        context,\n        schema: property,\n        state,\n      });\n      schemaProperties[name] = irPropertySchema;\n    }\n  }\n\n  if (Object.keys(schemaProperties).length) {\n    irSchema.properties = schemaProperties;\n  }\n\n  if (schema.additionalProperties === undefined) {\n    if (!irSchema.properties) {\n      irSchema.additionalProperties = {\n        type: 'unknown',\n      };\n    }\n  } else if (typeof schema.additionalProperties === 'boolean') {\n    // Avoid [key: string]: never for empty objects with additionalProperties: false inside allOf\n    // This would override inherited properties from other schemas in the composition\n    const isEmptyObjectInAllOf =\n      state.inAllOf &&\n      schema.additionalProperties === false &&\n      (!schema.properties || !Object.keys(schema.properties).length) &&\n      (!schema.patternProperties || !Object.keys(schema.patternProperties).length);\n\n    if (!isEmptyObjectInAllOf) {\n      irSchema.additionalProperties = {\n        type: schema.additionalProperties ? 'unknown' : 'never',\n      };\n    }\n  } else {\n    const irAdditionalPropertiesSchema = schemaToIrSchema({\n      context,\n      schema: schema.additionalProperties,\n      state,\n    });\n    irSchema.additionalProperties = irAdditionalPropertiesSchema;\n  }\n\n  if (schema.patternProperties) {\n    const patternProperties: Record<string, IR.SchemaObject> = {};\n\n    for (const pattern in schema.patternProperties) {\n      const patternSchema = schema.patternProperties[pattern]!;\n      const irPatternSchema = schemaToIrSchema({\n        context,\n        schema: patternSchema,\n        state,\n      });\n      patternProperties[pattern] = irPatternSchema;\n    }\n\n    if (Object.keys(patternProperties).length) {\n      irSchema.patternProperties = patternProperties;\n    }\n  }\n\n  if (schema.propertyNames) {\n    irSchema.propertyNames = schemaToIrSchema({\n      context,\n      schema: schema.propertyNames,\n      state,\n    });\n  }\n\n  if (schema.required) {\n    irSchema.required = schema.required;\n  }\n\n  if (schema.discriminator && state.$ref) {\n    const values = getAllDiscriminatorValues({\n      discriminator: schema.discriminator,\n      schemaRef: state.$ref,\n    });\n\n    if (values.length) {\n      const propertyType = findDiscriminatorPropertyType({\n        context,\n        propertyName: schema.discriminator.propertyName,\n        schemas: [schema],\n      });\n      const valueSchemas: ReadonlyArray<IR.SchemaObject> = values.map((value) =>\n        convertDiscriminatorValue(value, propertyType),\n      );\n\n      if (!irSchema.properties) {\n        irSchema.properties = {};\n      }\n\n      irSchema.properties[schema.discriminator.propertyName] =\n        valueSchemas.length > 1\n          ? {\n              items: valueSchemas,\n              logicalOperator: 'or',\n            }\n          : valueSchemas[0]!;\n    }\n  }\n\n  return irSchema;\n};\n\nconst parseString = ({\n  irSchema = {},\n}: {\n  context: Context;\n  irSchema?: IR.SchemaObject;\n  schema: SchemaObject;\n}): IR.SchemaObject => {\n  irSchema.type = 'string';\n\n  return irSchema;\n};\n\nexport const parseExtensions = ({ source, target }: { source: object; target: object }) => {\n  for (const key in source) {\n    if (key.startsWith('x-')) {\n      (target as Record<string, unknown>)[key] = (source as Record<string, unknown>)[key];\n    }\n  }\n};\n\nconst initIrSchema = ({ schema }: { schema: SchemaObject }): IR.SchemaObject => {\n  const irSchema: IR.SchemaObject = {};\n\n  parseSchemaJsDoc({\n    irSchema,\n    schema,\n  });\n\n  parseExtensions({\n    source: schema,\n    target: irSchema,\n  });\n\n  return irSchema;\n};\n\nconst parseAllOf = ({\n  context,\n  schema,\n  state,\n}: {\n  context: Context;\n  schema: SchemaWithRequired<SchemaObject, 'allOf'>;\n  state: SchemaState;\n}): IR.SchemaObject => {\n  let irSchema = initIrSchema({ schema });\n  parseSchemaMeta({ irSchema, schema });\n\n  const schemaItems: Array<IR.SchemaObject> = [];\n  const schemaTypes = getSchemaTypes({ schema });\n\n  const compositionSchemas = schema.allOf;\n\n  // Collect discriminator information to add after all compositions are processed\n  type DiscriminatorInfo = {\n    discriminator: NonNullable<SchemaObject['discriminator']>;\n    isExplicitMapping: boolean;\n    isRequired: boolean;\n    values: ReadonlyArray<string>;\n  };\n  const discriminatorsToAdd: Array<DiscriminatorInfo> = [];\n\n  for (const compositionSchema of compositionSchemas) {\n    const originalInAllOf = state.inAllOf;\n    // Don't propagate inAllOf flag to $ref schemas to avoid issues with reusable components\n    if (!('$ref' in compositionSchema)) {\n      state.inAllOf = true;\n    }\n    const irCompositionSchema = schemaToIrSchema({\n      context,\n      schema: compositionSchema,\n      state,\n    });\n    state.inAllOf = originalInAllOf;\n    if (state.inAllOf === undefined) {\n      delete state.inAllOf;\n    }\n\n    if (schema.required) {\n      if (irCompositionSchema.required) {\n        irCompositionSchema.required = [...irCompositionSchema.required, ...schema.required];\n      } else {\n        irCompositionSchema.required = schema.required;\n      }\n    }\n\n    schemaItems.push(irCompositionSchema);\n\n    if (compositionSchema.$ref) {\n      const ref = context.resolveRef<SchemaObject>(compositionSchema.$ref);\n      // `$ref` should be passed from the root `parseSchema()` call\n      if (state.$ref) {\n        // Find all discriminators in the referenced schema, including nested allOf compositions\n        const discriminators = findDiscriminatorsInSchema({\n          context,\n          schema: ref,\n        });\n\n        for (const { discriminator, oneOf } of discriminators) {\n          const values = discriminatorValues(\n            state.$ref,\n            discriminator.mapping,\n            // If the ref has oneOf, we only use the schema name as the value\n            // only if current schema is part of the oneOf. Else it is extending\n            // the ref schema\n            oneOf ? () => oneOf.some((o) => '$ref' in o && o.$ref === state.$ref) : undefined,\n          );\n\n          if (values.length === 0) {\n            continue;\n          }\n\n          // True when state.$ref appears directly in the mapping; false when the\n          // value fell back to the schema name because no mapping entry matched.\n          const isExplicitMapping =\n            discriminator.mapping !== undefined &&\n            Object.values(discriminator.mapping).includes(state.$ref);\n\n          // An explicit mapping always beats a same-property fallback collected\n          // earlier (e.g. from a grandparent discriminator that doesn't list this\n          // schema). Replace it; otherwise skip the duplicate.\n          const existingIndex = discriminatorsToAdd.findIndex(\n            (d) => d.discriminator.propertyName === discriminator.propertyName,\n          );\n          if (existingIndex !== -1) {\n            if (isExplicitMapping && !discriminatorsToAdd[existingIndex]!.isExplicitMapping) {\n              discriminatorsToAdd.splice(existingIndex, 1);\n            } else {\n              continue;\n            }\n          }\n\n          const isRequired = discriminators.some(\n            (d) =>\n              d.discriminator.propertyName === discriminator.propertyName &&\n              (ref.required?.includes(d.discriminator.propertyName) ||\n                (ref.allOf &&\n                  ref.allOf.some((item) => {\n                    const resolvedItem = item.$ref\n                      ? context.resolveRef<SchemaObject>(item.$ref)\n                      : item;\n                    return resolvedItem.required?.includes(d.discriminator.propertyName);\n                  }))),\n          );\n\n          discriminatorsToAdd.push({\n            discriminator,\n            isExplicitMapping,\n            isRequired,\n            values,\n          });\n        }\n      }\n    }\n  }\n\n  // Now add discriminators after all compositions have been processed\n  for (const { discriminator, isRequired, values } of discriminatorsToAdd) {\n    // Get all discriminator values including children for union types\n    const allValues = getAllDiscriminatorValues({\n      discriminator,\n      schemaRef: state.$ref!,\n    });\n\n    // Use allValues if we found children, otherwise use the original values\n    const finalValues = allValues.length > 0 ? allValues : values;\n\n    // Detect the actual type of the discriminator property\n    const propertyType = findDiscriminatorPropertyType({\n      context,\n      propertyName: discriminator.propertyName,\n      schemas: compositionSchemas,\n    });\n\n    const valueSchemas: ReadonlyArray<IR.SchemaObject> = finalValues.map((value) =>\n      convertDiscriminatorValue(value, propertyType),\n    );\n\n    const discriminatorProperty: IR.SchemaObject =\n      valueSchemas.length > 1\n        ? {\n            items: valueSchemas,\n            logicalOperator: 'or',\n          }\n        : valueSchemas[0]!;\n\n    // Check if any $ref schemas in schemaItems have this discriminator property\n    // If yes, mark them to omit it to avoid conflicts\n    for (const item of schemaItems) {\n      if (item.$ref || item.symbolRef) {\n        // Check if the referenced schema has this property\n        const hasProperty = (() => {\n          if (!item.$ref) return false;\n          try {\n            const refSchema = context.resolveRef<SchemaObject>(item.$ref);\n            // Check if the discriminator property exists in the ref schema\n            return (\n              refSchema.properties?.[discriminator.propertyName] !== undefined ||\n              (refSchema.allOf &&\n                refSchema.allOf.some((allOfItem) => {\n                  const resolved = allOfItem.$ref\n                    ? context.resolveRef<SchemaObject>(allOfItem.$ref)\n                    : allOfItem;\n                  return resolved.properties?.[discriminator.propertyName] !== undefined;\n                }))\n            );\n          } catch {\n            return false;\n          }\n        })();\n\n        if (hasProperty) {\n          // Mark this ref to omit the discriminator property\n          if (!item.omit) {\n            item.omit = [discriminator.propertyName];\n          } else if (!item.omit.includes(discriminator.propertyName)) {\n            item.omit = [...item.omit, discriminator.propertyName];\n          }\n        }\n      }\n    }\n\n    // Find the inline schema (non-$ref) to merge the discriminator property into\n    // The inline schema should be the last non-$ref item in schemaItems\n    let inlineSchema: IR.SchemaObject | undefined;\n    for (let i = schemaItems.length - 1; i >= 0; i--) {\n      const item = schemaItems[i]!;\n      // Check if this is not a $ref schema by looking for properties or checking if it came from an inline schema\n      if (item.type === 'object' || item.properties) {\n        inlineSchema = item;\n        break;\n      }\n    }\n\n    // If we found an inline schema, add the discriminator property to it\n    if (inlineSchema) {\n      if (!inlineSchema.properties) {\n        inlineSchema.properties = {};\n      }\n      inlineSchema.properties[discriminator.propertyName] = discriminatorProperty;\n\n      if (isRequired) {\n        if (!inlineSchema.required) {\n          inlineSchema.required = [];\n        }\n        if (!inlineSchema.required.includes(discriminator.propertyName)) {\n          inlineSchema.required = [...inlineSchema.required, discriminator.propertyName];\n        }\n      }\n    } else {\n      // Fallback: create a separate discriminator schema if no inline schema found\n      const irDiscriminatorSchema: IR.SchemaObject = {\n        properties: {\n          [discriminator.propertyName]: discriminatorProperty,\n        },\n        type: 'object',\n      };\n\n      if (isRequired) {\n        irDiscriminatorSchema.required = [discriminator.propertyName];\n      }\n      schemaItems.push(irDiscriminatorSchema);\n    }\n  }\n\n  if (schemaTypes.includes('object')) {\n    const irObjectSchema = parseOneType({\n      context,\n      schema: {\n        ...schema,\n        type: 'object',\n      },\n      state,\n    });\n\n    if (irObjectSchema.properties) {\n      for (const requiredProperty of irObjectSchema.required ?? []) {\n        if (!irObjectSchema.properties[requiredProperty]) {\n          for (const compositionSchema of compositionSchemas) {\n            // TODO: parser - this could be probably resolved more accurately\n            const finalCompositionSchema = compositionSchema.$ref\n              ? context.resolveRef<SchemaObject>(compositionSchema.$ref)\n              : compositionSchema;\n\n            if (getSchemaTypes({ schema: finalCompositionSchema }).includes('object')) {\n              const irCompositionSchema = parseOneType({\n                context,\n                schema: {\n                  ...finalCompositionSchema,\n                  type: 'object',\n                },\n                state,\n              });\n\n              if (irCompositionSchema.properties?.[requiredProperty]) {\n                irObjectSchema.properties[requiredProperty] =\n                  irCompositionSchema.properties[requiredProperty];\n                break;\n              }\n            }\n          }\n        }\n      }\n      schemaItems.push(irObjectSchema);\n    }\n  }\n\n  irSchema = addItemsToSchema({\n    items: schemaItems,\n    logicalOperator: 'and',\n    mutateSchemaOneItem: true,\n    schema: irSchema,\n  });\n\n  if (schemaTypes.includes('null')) {\n    // nest composition to avoid producing an intersection with null\n    const nestedItems: Array<IR.SchemaObject> = [\n      {\n        type: 'null',\n      },\n    ];\n\n    if (schemaItems.length) {\n      nestedItems.unshift(irSchema);\n    }\n\n    irSchema = {\n      items: nestedItems,\n      logicalOperator: 'or',\n    };\n  }\n\n  return irSchema;\n};\n\nconst parseAnyOf = ({\n  context,\n  schema,\n  state,\n}: {\n  context: Context;\n  schema: SchemaWithRequired<SchemaObject, 'anyOf'>;\n  state: SchemaState;\n}): IR.SchemaObject => {\n  let irSchema = initIrSchema({ schema });\n  parseSchemaMeta({ irSchema, schema });\n\n  const schemaItems: Array<IR.SchemaObject> = [];\n  const schemaTypes = getSchemaTypes({ schema });\n\n  const compositionSchemas = schema.anyOf;\n\n  const discriminatorPropertyType = schema.discriminator\n    ? findDiscriminatorPropertyType({\n        context,\n        propertyName: schema.discriminator.propertyName,\n        schemas: compositionSchemas,\n      })\n    : undefined;\n\n  for (const compositionSchema of compositionSchemas) {\n    let irCompositionSchema = schemaToIrSchema({\n      context,\n      schema: compositionSchema,\n      state,\n    });\n\n    // `$ref` should be defined with discriminators\n    if (schema.discriminator && irCompositionSchema.$ref != null) {\n      const values = discriminatorValues(irCompositionSchema.$ref, schema.discriminator.mapping);\n\n      const valueSchemas: ReadonlyArray<IR.SchemaObject> = values.map((value) =>\n        convertDiscriminatorValue(value, discriminatorPropertyType!),\n      );\n      const irDiscriminatorSchema: IR.SchemaObject = {\n        properties: {\n          [schema.discriminator.propertyName]:\n            valueSchemas.length > 1\n              ? {\n                  items: valueSchemas,\n                  logicalOperator: 'or',\n                }\n              : valueSchemas[0]!,\n        },\n        type: 'object',\n      };\n      irCompositionSchema = {\n        items: [irDiscriminatorSchema, irCompositionSchema],\n        logicalOperator: 'and',\n      };\n    }\n\n    schemaItems.push(irCompositionSchema);\n  }\n\n  if (schemaTypes.includes('null')) {\n    schemaItems.push({ type: 'null' });\n  }\n\n  irSchema = addItemsToSchema({\n    items: schemaItems,\n    mutateSchemaOneItem: true,\n    schema: irSchema,\n  });\n\n  if (schemaTypes.includes('object')) {\n    // nest composition to avoid producing a union with object properties\n    const irObjectSchema = parseOneType({\n      context,\n      schema: {\n        ...schema,\n        type: 'object',\n      },\n      state,\n    });\n\n    if (irObjectSchema.properties) {\n      irSchema = {\n        items: [irSchema, irObjectSchema],\n        logicalOperator: 'and',\n      };\n    }\n  }\n\n  return irSchema;\n};\n\nconst parseEnum = ({\n  context,\n  schema,\n  state,\n}: {\n  context: Context;\n  schema: SchemaWithRequired<SchemaObject, 'enum'>;\n  state: SchemaState;\n}): IR.SchemaObject => {\n  let irSchema = initIrSchema({ schema });\n\n  irSchema.type = 'enum';\n\n  const schemaItems: Array<IR.SchemaObject> = [];\n  const schemaTypes = getSchemaTypes({ schema });\n\n  for (const [index, enumValue] of schema.enum.entries()) {\n    const typeOfEnumValue = typeof enumValue;\n    let enumType: SchemaType<SchemaObject> | undefined;\n\n    if (\n      typeOfEnumValue === 'string' ||\n      typeOfEnumValue === 'number' ||\n      typeOfEnumValue === 'boolean'\n    ) {\n      enumType = typeOfEnumValue;\n    } else if (typeOfEnumValue === 'object' && Array.isArray(enumValue)) {\n      enumType = 'array';\n    } else if (enumValue === null) {\n      // type must contain null\n      if (schemaTypes.includes('null')) {\n        enumType = 'null';\n      }\n    } else {\n      console.warn(\n        '🚨',\n        `unhandled \"${typeOfEnumValue}\" typeof value \"${enumValue}\" for enum`,\n        schema.enum,\n      );\n    }\n\n    if (!enumType) {\n      continue;\n    }\n\n    const irTypeSchema = parseOneType({\n      context,\n      schema: {\n        const: enumValue,\n        description: schema['x-enum-descriptions']?.[index],\n        title: schema['x-enum-varnames']?.[index] ?? schema['x-enumNames']?.[index],\n        type: enumType,\n      },\n      state,\n    });\n\n    schemaItems.push(irTypeSchema);\n  }\n\n  irSchema = addItemsToSchema({\n    items: schemaItems,\n    schema: irSchema,\n  });\n\n  return irSchema;\n};\n\nconst parseOneOf = ({\n  context,\n  schema,\n  state,\n}: {\n  context: Context;\n  schema: SchemaWithRequired<SchemaObject, 'oneOf'>;\n  state: SchemaState;\n}): IR.SchemaObject => {\n  let irSchema = initIrSchema({ schema });\n  parseSchemaMeta({ irSchema, schema });\n\n  let schemaItems: Array<IR.SchemaObject> = [];\n  const schemaTypes = getSchemaTypes({ schema });\n\n  const compositionSchemas = schema.oneOf;\n\n  const discriminatorPropertyType = schema.discriminator\n    ? findDiscriminatorPropertyType({\n        context,\n        propertyName: schema.discriminator.propertyName,\n        schemas: compositionSchemas,\n      })\n    : undefined;\n\n  for (const compositionSchema of compositionSchemas) {\n    let irCompositionSchema = schemaToIrSchema({\n      context,\n      schema: compositionSchema,\n      state,\n    });\n\n    // `$ref` should be defined with discriminators\n    if (schema.discriminator && irCompositionSchema.$ref != null) {\n      const values = discriminatorValues(irCompositionSchema.$ref, schema.discriminator.mapping);\n\n      const valueSchemas: ReadonlyArray<IR.SchemaObject> = values.map((value) =>\n        convertDiscriminatorValue(value, discriminatorPropertyType!),\n      );\n      const irDiscriminatorSchema: IR.SchemaObject = {\n        properties: {\n          [schema.discriminator.propertyName]:\n            valueSchemas.length > 1\n              ? {\n                  items: valueSchemas,\n                  logicalOperator: 'or',\n                }\n              : valueSchemas[0]!,\n        },\n        required: [schema.discriminator.propertyName],\n        type: 'object',\n      };\n      irCompositionSchema = {\n        items: [irDiscriminatorSchema, irCompositionSchema],\n        logicalOperator: 'and',\n      };\n    }\n\n    // since we know oneOf will be using \"or\" logical operator, if the parsed\n    // composition schema also has an \"or\" operator, we can bring it up\n    // to avoid unnecessary brackets\n    if (\n      irCompositionSchema.logicalOperator === 'or' &&\n      irCompositionSchema.type !== 'array' &&\n      irCompositionSchema.items\n    ) {\n      schemaItems = schemaItems.concat(irCompositionSchema.items);\n    } else {\n      schemaItems.push(irCompositionSchema);\n    }\n  }\n\n  if (schemaTypes.includes('null')) {\n    schemaItems.push({ type: 'null' });\n  }\n\n  irSchema = addItemsToSchema({\n    items: schemaItems,\n    mutateSchemaOneItem: true,\n    schema: irSchema,\n  });\n\n  if (schemaTypes.includes('object')) {\n    // nest composition to avoid producing a union with object properties\n    const irObjectSchema = parseOneType({\n      context,\n      schema: {\n        ...schema,\n        type: 'object',\n      },\n      state,\n    });\n\n    if (irObjectSchema.properties) {\n      irSchema = {\n        items: [irSchema, irObjectSchema],\n        logicalOperator: 'and',\n      };\n    }\n  }\n\n  return irSchema;\n};\n\nconst parseRef = ({\n  context,\n  schema,\n  state,\n}: {\n  context: Context;\n  schema: SchemaWithRequired<SchemaObject, '$ref'>;\n  state: SchemaState;\n}): IR.SchemaObject => {\n  // Inline non-component refs (e.g. #/paths/...) and deep path refs (e.g. #/components/schemas/Foo/properties/bar)\n  // to avoid generating orphaned named types or referencing unregistered symbols\n  const isComponentsRef = isTopLevelComponent(schema.$ref);\n  if (!isComponentsRef) {\n    if (!state.circularReferenceTracker.has(schema.$ref)) {\n      const refSchema = context.resolveRef<SchemaObject>(schema.$ref);\n      const originalRef = state.$ref;\n      state.$ref = schema.$ref;\n      const irSchema = schemaToIrSchema({\n        context,\n        schema: refSchema,\n        state,\n      });\n      state.$ref = originalRef;\n      return irSchema;\n    }\n    // Fallback to preserving the ref if circular\n  }\n\n  let irSchema = initIrSchema({ schema });\n  parseSchemaMeta({ irSchema, schema });\n\n  const irRefSchema: IR.SchemaObject = {};\n\n  // refs using unicode characters become encoded, didn't investigate why\n  // but the suspicion is this comes from `@hey-api/json-schema-ref-parser`\n  irRefSchema.$ref = decodeURI(schema.$ref);\n\n  if (!state.circularReferenceTracker.has(schema.$ref)) {\n    const refSchema = context.resolveRef<SchemaObject>(schema.$ref);\n    const originalRef = state.$ref;\n    state.$ref = schema.$ref;\n    schemaToIrSchema({\n      context,\n      schema: refSchema,\n      state,\n    });\n    state.$ref = originalRef;\n  }\n\n  const schemaItems: Array<IR.SchemaObject> = [];\n  schemaItems.push(irRefSchema);\n\n  if (schema.type && typeof schema.type !== 'string') {\n    if (schema.type.includes('null')) {\n      schemaItems.push({ type: 'null' });\n    }\n  }\n\n  irSchema = addItemsToSchema({\n    items: schemaItems,\n    mutateSchemaOneItem: true,\n    schema: irSchema,\n  });\n\n  return irSchema;\n};\n\nconst parseOneType = ({\n  context,\n  irSchema,\n  schema,\n  state,\n}: {\n  context: Context;\n  irSchema?: IR.SchemaObject;\n  schema: Omit<SchemaObject, 'type'> & {\n    type: SchemaType<SchemaObject>;\n  };\n  state: SchemaState;\n}): IR.SchemaObject => {\n  if (!irSchema) {\n    irSchema = initIrSchema({ schema });\n    parseSchemaMeta({ irSchema, schema });\n  }\n\n  switch (schema.type) {\n    case 'array':\n      return parseArray({\n        context,\n        irSchema,\n        schema,\n        state,\n      });\n    case 'boolean':\n      return parseBoolean({\n        context,\n        irSchema,\n        schema,\n      });\n    case 'integer':\n    case 'number':\n      return parseNumber({\n        context,\n        irSchema,\n        schema,\n      });\n    case 'null':\n      return parseNull({\n        context,\n        irSchema,\n        schema,\n      });\n    case 'object':\n      return parseObject({\n        context,\n        irSchema,\n        schema,\n        state,\n      });\n    case 'string':\n      return parseString({\n        context,\n        irSchema,\n        schema,\n      });\n    default:\n      // gracefully handle invalid type\n      return parseUnknown({ context, irSchema, schema });\n  }\n};\n\nconst parseManyTypes = ({\n  context,\n  irSchema,\n  schema,\n  state,\n}: {\n  context: Context;\n  irSchema?: IR.SchemaObject;\n  schema: Omit<SchemaObject, 'type'> & {\n    type: ReadonlyArray<SchemaType<SchemaObject>>;\n  };\n  state: SchemaState;\n}): IR.SchemaObject => {\n  if (!irSchema) {\n    irSchema = initIrSchema({ schema });\n  }\n\n  const typeIrSchema: IR.SchemaObject = {};\n\n  parseSchemaMeta({ irSchema: typeIrSchema, schema });\n\n  if (schema.type.includes('null') && typeIrSchema.default === null) {\n    // clear to avoid duplicate default inside the non-null schema.\n    // this would produce incorrect validator output\n    delete typeIrSchema.default;\n  }\n\n  const schemaItems: Array<IR.SchemaObject> = [];\n\n  for (const type of schema.type) {\n    if (type === 'null') {\n      schemaItems.push({ type: 'null' });\n    } else {\n      const irTypeSchema = parseOneType({\n        context,\n        irSchema: { ...typeIrSchema },\n        schema: {\n          ...schema,\n          type,\n        },\n        state,\n      });\n\n      schemaItems.push(irTypeSchema);\n    }\n  }\n\n  irSchema = addItemsToSchema({\n    items: schemaItems,\n    schema: irSchema,\n  });\n\n  return irSchema;\n};\n\nconst parseType = ({\n  context,\n  schema,\n  state,\n}: {\n  context: Context;\n  schema: SchemaWithRequired<SchemaObject, 'type'>;\n  state: SchemaState;\n}): IR.SchemaObject => {\n  const irSchema = initIrSchema({ schema });\n\n  parseSchemaMeta({ irSchema, schema });\n\n  const schemaTypes = getSchemaTypes({ schema });\n\n  if (schemaTypes.length === 1) {\n    return parseOneType({\n      context,\n      irSchema,\n      schema: {\n        ...schema,\n        type: schemaTypes[0]!,\n      },\n      state,\n    });\n  }\n\n  return parseManyTypes({\n    context,\n    irSchema,\n    schema: {\n      ...schema,\n      type: schemaTypes,\n    },\n    state,\n  });\n};\n\nconst parseUnknown = ({\n  irSchema,\n  schema,\n}: {\n  context: Context;\n  irSchema?: IR.SchemaObject;\n  schema: SchemaObject;\n}): IR.SchemaObject => {\n  if (!irSchema) {\n    irSchema = initIrSchema({ schema });\n  }\n\n  irSchema.type = 'unknown';\n\n  parseSchemaMeta({ irSchema, schema });\n\n  return irSchema;\n};\n\nexport const schemaToIrSchema = ({\n  context,\n  schema,\n  state,\n}: {\n  context: Context;\n  schema: SchemaObject;\n  state: SchemaState | undefined;\n}): IR.SchemaObject => {\n  if (!state) {\n    state = {\n      circularReferenceTracker: new Set(),\n    };\n  }\n\n  if (state.$ref) {\n    state.circularReferenceTracker.add(state.$ref);\n  }\n\n  if (schema.$ref) {\n    return parseRef({\n      context,\n      schema: schema as SchemaWithRequired<SchemaObject, '$ref'>,\n      state,\n    });\n  }\n\n  if (schema.enum) {\n    return parseEnum({\n      context,\n      schema: schema as SchemaWithRequired<SchemaObject, 'enum'>,\n      state,\n    });\n  }\n\n  if (schema.allOf) {\n    return parseAllOf({\n      context,\n      schema: schema as SchemaWithRequired<SchemaObject, 'allOf'>,\n      state,\n    });\n  }\n\n  if (schema.anyOf) {\n    return parseAnyOf({\n      context,\n      schema: schema as SchemaWithRequired<SchemaObject, 'anyOf'>,\n      state,\n    });\n  }\n\n  if (schema.oneOf) {\n    return parseOneOf({\n      context,\n      schema: schema as SchemaWithRequired<SchemaObject, 'oneOf'>,\n      state,\n    });\n  }\n\n  // infer object based on the presence of properties\n  if (schema.type || schema.properties) {\n    return parseType({\n      context,\n      schema: schema as SchemaWithRequired<SchemaObject, 'type'>,\n      state,\n    });\n  }\n\n  // infer string with binary format based on contentMediaType\n  if (schema.contentMediaType && isMediaTypeFileLike({ mediaType: schema.contentMediaType })) {\n    return parseType({\n      context,\n      schema: { ...schema, type: 'string' } as SchemaWithRequired<SchemaObject, 'type'>,\n      state,\n    });\n  }\n\n  return parseUnknown({ context, schema });\n};\n\nexport const parseSchema = ({\n  $ref,\n  context,\n  schema,\n}: {\n  $ref: string;\n  context: Context;\n  schema: SchemaObject;\n}) => {\n  if (!context.ir.components) {\n    context.ir.components = {};\n  }\n\n  if (!context.ir.components.schemas) {\n    context.ir.components.schemas = {};\n  }\n\n  context.ir.components.schemas[refToName($ref)] = schemaToIrSchema({\n    context,\n    schema,\n    state: {\n      $ref,\n      circularReferenceTracker: new Set(),\n    },\n  });\n};\n"
  },
  {
    "path": "packages/shared/src/openApi/3.1.x/parser/server.ts",
    "content": "import type { Context } from '../../../ir/context';\nimport { parseUrl } from '../../../utils/url';\n\nexport const parseServers = ({ context }: { context: Context }) => {\n  if (context.spec.servers) {\n    context.ir.servers = context.spec.servers;\n    return;\n  }\n\n  for (const input of context.config.input) {\n    if (typeof input.path === 'string') {\n      const url = parseUrl(input.path);\n      context.ir.servers = [\n        {\n          url: `${url.protocol ? `${url.protocol}://` : ''}${url.host}${url.port ? `:${url.port}` : ''}`,\n        },\n      ];\n    }\n  }\n\n  if (!context.ir.servers) {\n    context.ir.servers = [\n      {\n        url: '/',\n      },\n    ];\n  }\n};\n"
  },
  {
    "path": "packages/shared/src/openApi/3.1.x/parser/validate.ts",
    "content": "import type { Logger } from '@hey-api/codegen-core';\n\nimport { createOperationKey } from '../../../ir/operation';\nimport { httpMethods } from '../../../openApi/shared/utils/operation';\nimport type { ValidatorIssue, ValidatorResult } from '../../../openApi/shared/utils/validator';\nimport type { OpenApiV3_1_X, PathItemObject, PathsObject } from '../types/spec';\n\nexport const validateOpenApiSpec = (spec: OpenApiV3_1_X, logger: Logger): ValidatorResult => {\n  const eventValidate = logger.timeEvent('validate');\n  const issues: Array<ValidatorIssue> = [];\n  const operationIds = new Map();\n\n  if (spec.paths) {\n    for (const entry of Object.entries(spec.paths)) {\n      const path = entry[0] as keyof PathsObject;\n      const pathItem = entry[1] as PathItemObject;\n      for (const method of httpMethods) {\n        const operation = pathItem[method];\n        if (!operation) {\n          continue;\n        }\n\n        const operationKey = createOperationKey({ method, path });\n\n        if (operation.operationId) {\n          if (!operationIds.has(operation.operationId)) {\n            operationIds.set(operation.operationId, operationKey);\n          } else {\n            issues.push({\n              code: 'duplicate_key',\n              context: {\n                key: 'operationId',\n                value: operation.operationId,\n              },\n              message: 'Duplicate `operationId` found. Each `operationId` must be unique.',\n              path: ['paths', path, method, 'operationId'],\n              severity: 'error',\n            });\n          }\n        }\n      }\n    }\n  }\n\n  if (spec.servers) {\n    if (typeof spec.servers !== 'object' || !Array.isArray(spec.servers)) {\n      issues.push({\n        code: 'invalid_type',\n        message: '`servers` must be an array.',\n        path: [],\n        severity: 'error',\n      });\n    }\n\n    for (let index = 0; index < spec.servers.length; index++) {\n      const server = spec.servers[index];\n      if (!server || typeof server !== 'object') {\n        issues.push({\n          code: 'invalid_type',\n          context: {\n            actual: typeof server,\n            expected: 'object',\n          },\n          message: 'Each entry in `servers` must be an object.',\n          path: ['servers', index],\n          severity: 'error',\n        });\n      } else {\n        if (!server.url) {\n          issues.push({\n            code: 'missing_required_field',\n            context: {\n              field: 'url',\n            },\n            message: 'Missing required field `url` in server object.',\n            path: ['servers', index],\n            severity: 'error',\n          });\n        }\n      }\n    }\n  }\n\n  eventValidate.timeEnd();\n  return {\n    issues,\n    valid: !issues.some((issue) => issue.severity === 'error'),\n  };\n};\n"
  },
  {
    "path": "packages/shared/src/openApi/3.1.x/parser/webhook.ts",
    "content": "import type { Context } from '../../../ir/context';\nimport { mergeParametersObjects } from '../../../openApi/shared/utils/parameter';\nimport type { OpenApiV3_1_X, PathItemObject } from '../types/spec';\nimport { parseWebhookOperation } from './operation';\nimport { parametersArrayToObject } from './parameter';\n\nexport const parseWebhooks = ({\n  context,\n  securitySchemesMap,\n}: Pick<Parameters<typeof parseWebhookOperation>[0], 'securitySchemesMap'> & {\n  context: Context<OpenApiV3_1_X>;\n}) => {\n  const state: Parameters<typeof parseWebhookOperation>[0]['state'] = {\n    ids: new Map(),\n  };\n\n  for (const key in context.spec.webhooks) {\n    const webhook = context.spec.webhooks[key]!;\n\n    const finalWebhook =\n      '$ref' in webhook\n        ? {\n            ...context.resolveRef<PathItemObject>(webhook.$ref!),\n            ...webhook,\n          }\n        : webhook;\n\n    const operationArgs: Omit<Parameters<typeof parseWebhookOperation>[0], 'method'> = {\n      context,\n      key,\n      operation: {\n        description: finalWebhook.description,\n        parameters: parametersArrayToObject({\n          context,\n          parameters: finalWebhook.parameters,\n        }),\n        security: context.spec.security,\n        servers: finalWebhook.servers,\n        summary: finalWebhook.summary,\n      },\n      securitySchemesMap,\n      state,\n    };\n\n    if (finalWebhook.delete) {\n      parseWebhookOperation({\n        ...operationArgs,\n        method: 'delete',\n        operation: {\n          ...operationArgs.operation,\n          ...finalWebhook.delete,\n          parameters: mergeParametersObjects({\n            source: parametersArrayToObject({\n              context,\n              parameters: finalWebhook.delete.parameters,\n            }),\n            target: operationArgs.operation.parameters,\n          }),\n        },\n      });\n    }\n\n    if (finalWebhook.get) {\n      parseWebhookOperation({\n        ...operationArgs,\n        method: 'get',\n        operation: {\n          ...operationArgs.operation,\n          ...finalWebhook.get,\n          parameters: mergeParametersObjects({\n            source: parametersArrayToObject({\n              context,\n              parameters: finalWebhook.get.parameters,\n            }),\n            target: operationArgs.operation.parameters,\n          }),\n        },\n      });\n    }\n\n    if (finalWebhook.head) {\n      parseWebhookOperation({\n        ...operationArgs,\n        method: 'head',\n        operation: {\n          ...operationArgs.operation,\n          ...finalWebhook.head,\n          parameters: mergeParametersObjects({\n            source: parametersArrayToObject({\n              context,\n              parameters: finalWebhook.head.parameters,\n            }),\n            target: operationArgs.operation.parameters,\n          }),\n        },\n      });\n    }\n\n    if (finalWebhook.options) {\n      parseWebhookOperation({\n        ...operationArgs,\n        method: 'options',\n        operation: {\n          ...operationArgs.operation,\n          ...finalWebhook.options,\n          parameters: mergeParametersObjects({\n            source: parametersArrayToObject({\n              context,\n              parameters: finalWebhook.options.parameters,\n            }),\n            target: operationArgs.operation.parameters,\n          }),\n        },\n      });\n    }\n\n    if (finalWebhook.patch) {\n      parseWebhookOperation({\n        ...operationArgs,\n        method: 'patch',\n        operation: {\n          ...operationArgs.operation,\n          ...finalWebhook.patch,\n          parameters: mergeParametersObjects({\n            source: parametersArrayToObject({\n              context,\n              parameters: finalWebhook.patch.parameters,\n            }),\n            target: operationArgs.operation.parameters,\n          }),\n        },\n      });\n    }\n\n    if (finalWebhook.post) {\n      parseWebhookOperation({\n        ...operationArgs,\n        method: 'post',\n        operation: {\n          ...operationArgs.operation,\n          ...finalWebhook.post,\n          parameters: mergeParametersObjects({\n            source: parametersArrayToObject({\n              context,\n              parameters: finalWebhook.post.parameters,\n            }),\n            target: operationArgs.operation.parameters,\n          }),\n        },\n      });\n    }\n\n    if (finalWebhook.put) {\n      parseWebhookOperation({\n        ...operationArgs,\n        method: 'put',\n        operation: {\n          ...operationArgs.operation,\n          ...finalWebhook.put,\n          parameters: mergeParametersObjects({\n            source: parametersArrayToObject({\n              context,\n              parameters: finalWebhook.put.parameters,\n            }),\n            target: operationArgs.operation.parameters,\n          }),\n        },\n      });\n    }\n\n    if (finalWebhook.trace) {\n      parseWebhookOperation({\n        ...operationArgs,\n        method: 'trace',\n        operation: {\n          ...operationArgs.operation,\n          ...finalWebhook.trace,\n          parameters: mergeParametersObjects({\n            source: parametersArrayToObject({\n              context,\n              parameters: finalWebhook.trace.parameters,\n            }),\n            target: operationArgs.operation.parameters,\n          }),\n        },\n      });\n    }\n  }\n};\n"
  },
  {
    "path": "packages/shared/src/openApi/3.1.x/types/json-schema-draft-2020-12.ts",
    "content": "import type { AnyString, MaybeArray } from '@hey-api/types';\n\nimport type { EnumExtensions } from '../../../openApi/shared/types';\nimport type { SpecificationExtensions } from './spec';\nimport type { OpenApiSchemaExtensions } from './spec-extensions';\n\n// TODO: left out some keywords related to structuring a complex schema and declaring a dialect\nexport interface JsonSchemaDraft2020_12\n  extends\n    ArrayKeywords,\n    NumberKeywords,\n    ObjectKeywords,\n    StringKeywords,\n    EnumExtensions,\n    OpenApiSchemaExtensions,\n    SpecificationExtensions {\n  /**\n   * The `$comment` {@link https://json-schema.org/learn/glossary#keyword keyword} is strictly intended for adding comments to a schema. Its value must always be a string. Unlike the annotations `title`, `description`, and `examples`, JSON schema {@link https://json-schema.org/learn/glossary#implementation implementations} aren't allowed to attach any meaning or behavior to it whatsoever, and may even strip them at any time. Therefore, they are useful for leaving notes to future editors of a JSON schema, but should not be used to communicate to users of the schema.\n   */\n  $comment?: string;\n  /**\n   * A schema can reference another schema using the `$ref` keyword. The value of `$ref` is a URI-reference that is resolved against the schema's {@link https://json-schema.org/understanding-json-schema/structuring#base-uri Base URI}. When evaluating a `$ref`, an implementation uses the resolved identifier to retrieve the referenced schema and applies that schema to the {@link https://json-schema.org/learn/glossary#instance instance}.\n   *\n   * The `$ref` keyword may be used to create recursive schemas that refer to themselves.\n   */\n  $ref?: string;\n  /**\n   * `allOf`: (AND) Must be valid against _all_ of the {@link https://json-schema.org/learn/glossary#subschema subschemas}\n   *\n   * To validate against `allOf`, the given data must be valid against all of the given subschemas.\n   *\n   * {@link https://json-schema.org/understanding-json-schema/reference/combining#allof allOf} can not be used to \"extend\" a schema to add more details to it in the sense of object-oriented inheritance. {@link https://json-schema.org/learn/glossary#instance Instances} must independently be valid against \"all of\" the schemas in the `allOf`. See the section on {@link https://json-schema.org/understanding-json-schema/reference/object#extending Extending Closed Schemas} for more information.\n   */\n  allOf?: ReadonlyArray<JsonSchemaDraft2020_12>;\n  /**\n   * `anyOf`: (OR) Must be valid against _any_ of the subschemas\n   *\n   * To validate against `anyOf`, the given data must be valid against any (one or more) of the given subschemas.\n   */\n  anyOf?: ReadonlyArray<JsonSchemaDraft2020_12>;\n  /**\n   * The `const` keyword is used to restrict a value to a single value.\n   */\n  const?: unknown;\n  /**\n   * The `contentEncoding` keyword specifies the encoding used to store the contents, as specified in {@link https://tools.ietf.org/html/rfc2045 RFC 2054, part 6.1} and {@link https://datatracker.ietf.org/doc/html/rfc4648 RFC 4648}.\n   *\n   * The acceptable values are `quoted-printable`, `base16`, `base32`, and `base64`. If not specified, the encoding is the same as the containing JSON document.\n   *\n   * Without getting into the low-level details of each of these encodings, there are really only two options useful for modern usage:\n   * - If the content is encoded in the same encoding as the enclosing JSON document (which for practical purposes, is almost always UTF-8), leave `contentEncoding` unspecified, and include the content in a string as-is. This includes text-based content types, such as `text/html` or `application/xml`.\n   * - If the content is binary data, set `contentEncoding` to `base64` and encode the contents using {@link https://tools.ietf.org/html/rfc4648 Base64}. This would include many image types, such as `image/png` or audio types, such as `audio/mpeg`.\n   */\n  contentEncoding?: 'base16' | 'base32' | 'base64' | 'quoted-printable';\n  /**\n   * The `contentMediaType` keyword specifies the MIME type of the contents of a string, as described in {@link https://tools.ietf.org/html/rfc2046 RFC 2046}. There is a list of {@link http://www.iana.org/assignments/media-types/media-types.xhtml MIME types officially registered by the IANA}, but the set of types supported will be application and operating system dependent. Mozilla Developer Network also maintains a {@link https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types/Complete_list_of_MIME_types shorter list of MIME types that are important for the web}\n   */\n  contentMediaType?: string;\n  /**\n   * The `default` keyword specifies a default value. This value is not used to fill in missing values during the validation process. Non-validation tools such as documentation generators or form generators may use this value to give hints to users about how to use a value. However, `default` is typically used to express that if a value is missing, then the value is semantically the same as if the value was present with the default value. The value of `default` should validate against the schema in which it resides, but that isn't required.\n   */\n  default?: unknown;\n  /**\n   * The `dependentRequired` {@link https://json-schema.org/learn/glossary#keyword keyword} conditionally requires that certain properties must be present if a given property is present in an object. For example, suppose we have a {@link https://json-schema.org/learn/glossary#schema schema} representing a customer. If you have their credit card number, you also want to ensure you have a billing address. If you don't have their credit card number, a billing address would not be required. We represent this dependency of one property on another using the `dependentRequired` keyword. The value of the `dependentRequired` keyword is an object. Each entry in the object maps from the name of a property, _p_, to an array of strings listing properties that are required if _p_ is present.\n   */\n  dependentRequired?: Record<string, ReadonlyArray<string>>;\n  /**\n   * The `dependentSchemas` keyword conditionally applies a {@link https://json-schema.org/learn/glossary#subschema subschema} when a given property is present. This schema is applied in the same way {@link https://json-schema.org/understanding-json-schema/reference/combining#allof allOf} applies schemas. Nothing is merged or extended. Both schemas apply independently.\n   */\n  dependentSchemas?: Record<string, JsonSchemaDraft2020_12>;\n  /**\n   * The `deprecated` keyword is a boolean that indicates that the {@link https://json-schema.org/learn/glossary#instance instance} value the keyword applies to should not be used and may be removed in the future.\n   */\n  deprecated?: boolean;\n  /**\n   * The `title` and `description` keywords must be strings. A \"title\" will preferably be short, whereas a \"description\" will provide a more lengthy explanation about the purpose of the data described by the schema.\n   */\n  description?: string;\n  /**\n   * The `if`, `then` and `else` keywords allow the application of a subschema based on the outcome of another schema, much like the `if`/`then`/`else` constructs you've probably seen in traditional programming languages.\n   *\n   * If `if` is valid, `then` must also be valid (and `else` is ignored.) If `if` is invalid, `else` must also be valid (and `then` is ignored).\n   *\n   * If `then` or `else` is not defined, `if` behaves as if they have a value of `true`.\n   *\n   * If `then` and/or `else` appear in a schema without `if`, `then` and `else` are ignored.\n   */\n  else?: JsonSchemaDraft2020_12;\n  /**\n   * The `enum` {@link https://json-schema.org/learn/glossary#keyword keyword} is used to restrict a value to a fixed set of values. It must be an array with at least one element, where each element is unique.\n   *\n   * You can use `enum` even without a type, to accept values of different types.\n   */\n  enum?: ReadonlyArray<unknown>;\n  /**\n   * The `examples` keyword is a place to provide an array of examples that validate against the schema. This isn't used for validation, but may help with explaining the effect and purpose of the schema to a reader. Each entry should validate against the schema in which it resides, but that isn't strictly required. There is no need to duplicate the `default` value in the `examples` array, since `default` will be treated as another example.\n   */\n  examples?: ReadonlyArray<unknown>;\n  /**\n   * The `format` keyword allows for basic semantic identification of certain kinds of string values that are commonly used. For example, because JSON doesn't have a \"DateTime\" type, dates need to be encoded as strings. `format` allows the schema author to indicate that the string value should be interpreted as a date. By default, `format` is just an annotation and does not effect validation.\n   *\n   * Optionally, validator {@link https://json-schema.org/learn/glossary#implementation implementations} can provide a configuration option to enable `format` to function as an assertion rather than just an annotation. That means that validation will fail if, for example, a value with a `date` format isn't in a form that can be parsed as a date. This can allow values to be constrained beyond what the other tools in JSON Schema, including {@link https://json-schema.org/understanding-json-schema/reference/regular_expressions Regular Expressions} can do.\n   *\n   * There is a bias toward networking-related formats in the JSON Schema specification, most likely due to its heritage in web technologies. However, custom formats may also be used, as long as the parties exchanging the JSON documents also exchange information about the custom format types. A JSON Schema validator will ignore any format type that it does not understand.\n   */\n  format?: JsonSchemaFormats;\n  /**\n   * The `if`, `then` and `else` keywords allow the application of a subschema based on the outcome of another schema, much like the `if`/`then`/`else` constructs you've probably seen in traditional programming languages.\n   *\n   * If `if` is valid, `then` must also be valid (and `else` is ignored.) If `if` is invalid, `else` must also be valid (and `then` is ignored).\n   *\n   * If `then` or `else` is not defined, `if` behaves as if they have a value of `true`.\n   *\n   * If `then` and/or `else` appear in a schema without `if`, `then` and `else` are ignored.\n   */\n  if?: JsonSchemaDraft2020_12;\n  /**\n   * `not`: (NOT) Must _not_ be valid against the given schema\n   *\n   * The `not` keyword declares that an instance validates if it doesn't validate against the given subschema.\n   */\n  not?: JsonSchemaDraft2020_12;\n  /**\n   * `oneOf`: (XOR) Must be valid against _exactly one_ of the subschemas\n   *\n   * To validate against `oneOf`, the given data must be valid against exactly one of the given subschemas.\n   *\n   * Careful consideration should be taken when using `oneOf` entries as the nature of it requires verification of _every_ sub-schema which can lead to increased processing times. Prefer `anyOf` where possible.\n   */\n  oneOf?: ReadonlyArray<JsonSchemaDraft2020_12>;\n  /**\n   * The boolean keywords `readOnly` and `writeOnly` are typically used in an API context. `readOnly` indicates that a value should not be modified. It could be used to indicate that a `PUT` request that changes a value would result in a `400 Bad Request` response. `writeOnly` indicates that a value may be set, but will remain hidden. In could be used to indicate you can set a value with a `PUT` request, but it would not be included when retrieving that record with a `GET` request.\n   */\n  readOnly?: boolean;\n  /**\n   * The `if`, `then` and `else` keywords allow the application of a subschema based on the outcome of another schema, much like the `if`/`then`/`else` constructs you've probably seen in traditional programming languages.\n   *\n   * If `if` is valid, `then` must also be valid (and `else` is ignored.) If `if` is invalid, `else` must also be valid (and `then` is ignored).\n   *\n   * If `then` or `else` is not defined, `if` behaves as if they have a value of `true`.\n   *\n   * If `then` and/or `else` appear in a schema without `if`, `then` and `else` are ignored.\n   */\n  then?: JsonSchemaDraft2020_12;\n  /**\n   * The `title` and `description` keywords must be strings. A \"title\" will preferably be short, whereas a \"description\" will provide a more lengthy explanation about the purpose of the data described by the schema.\n   */\n  title?: string;\n  /**\n   * If it is an array, it must be an array of strings, where each string is the name of one of the basic types, and each element is unique. In this case, the JSON snippet is valid if it matches any of the given types.\n   */\n  type?: MaybeArray<JsonSchemaTypes>;\n  /**\n   * The boolean keywords `readOnly` and `writeOnly` are typically used in an API context. `readOnly` indicates that a value should not be modified. It could be used to indicate that a `PUT` request that changes a value would result in a `400 Bad Request` response. `writeOnly` indicates that a value may be set, but will remain hidden. In could be used to indicate you can set a value with a `PUT` request, but it would not be included when retrieving that record with a `GET` request.\n   */\n  writeOnly?: boolean;\n}\n\ninterface ArrayKeywords {\n  /**\n   * While the `items` schema must be valid for every item in the array, the `contains` schema only needs to validate against one or more items in the array.\n   */\n  contains?: JsonSchemaDraft2020_12;\n  /**\n   * List validation is useful for arrays of arbitrary length where each item matches the same schema. For this kind of array, set the `items` {@link https://json-schema.org/learn/glossary#keyword keyword} to a single schema that will be used to validate all of the items in the array.\n   *\n   * The `items` keyword can be used to control whether it's valid to have additional items in a tuple beyond what is defined in `prefixItems`. The value of the `items` keyword is a schema that all additional items must pass in order for the keyword to validate.\n   *\n   * Note that `items` doesn't \"see inside\" any {@link https://json-schema.org/learn/glossary#instance instances} of `allOf`, `anyOf`, or `oneOf` in the same {@link https://json-schema.org/learn/glossary#subschema subschema}.\n   */\n  items?: JsonSchemaDraft2020_12 | false;\n  /**\n   * `minContains` and `maxContains` can be used with `contains` to further specify how many times a schema matches a `contains` constraint. These keywords can be any non-negative number including zero.\n   */\n  maxContains?: number;\n  /**\n   * The length of the array can be specified using the `minItems` and `maxItems` keywords. The value of each keyword must be a non-negative number. These keywords work whether doing {@link https://json-schema.org/understanding-json-schema/reference/array#items list validation} or {@link https://json-schema.org/understanding-json-schema/reference/array#tupleValidation tuple-validation}.\n   */\n  maxItems?: number;\n  /**\n   * `minContains` and `maxContains` can be used with `contains` to further specify how many times a schema matches a `contains` constraint. These keywords can be any non-negative number including zero.\n   */\n  minContains?: number;\n  /**\n   * The length of the array can be specified using the `minItems` and `maxItems` keywords. The value of each keyword must be a non-negative number. These keywords work whether doing {@link https://json-schema.org/understanding-json-schema/reference/array#items list validation} or {@link https://json-schema.org/understanding-json-schema/reference/array#tupleValidation tuple-validation}.\n   */\n  minItems?: number;\n  /**\n   * `prefixItems` is an array, where each item is a schema that corresponds to each index of the document's array. That is, an array where the first element validates the first element of the input array, the second element validates the second element of the input array, etc.\n   */\n  prefixItems?: ReadonlyArray<JsonSchemaDraft2020_12>;\n  /**\n   * The `unevaluatedItems` keyword is useful mainly when you want to add or disallow extra items to an array.\n   *\n   * `unevaluatedItems` applies to any values not evaluated by an `items`, `prefixItems`, or `contains` keyword. Just as `unevaluatedProperties` affects only properties in an object, `unevaluatedItems` affects only items in an array.\n   *\n   * Watch out! The word \"unevaluated\" _does not mean_ \"not evaluated by `items`, `prefixItems`, or `contains`.\" \"Unevaluated\" means \"not successfully evaluated\", or \"does not evaluate to true\".\n   *\n   * Like with `items`, if you set `unevaluatedItems` to false, you can disallow extra items in the array.\n   */\n  unevaluatedItems?: JsonSchemaDraft2020_12 | false;\n  /**\n   * A schema can ensure that each of the items in an array is unique. Simply set the `uniqueItems` keyword to `true`.\n   */\n  uniqueItems?: boolean;\n}\n\ninterface NumberKeywords {\n  /**\n   * Ranges of numbers are specified using a combination of the `minimum` and `maximum` keywords, (or `exclusiveMinimum` and `exclusiveMaximum` for expressing exclusive range).\n   *\n   * If _x_ is the value being validated, the following must hold true:\n   *\n   * ```\n   * x ≥ minimum\n   * x > exclusiveMinimum\n   * x ≤ maximum\n   * x < exclusiveMaximum\n   * ```\n   *\n   * While you can specify both of `minimum` and `exclusiveMinimum` or both of `maximum` and `exclusiveMaximum`, it doesn't really make sense to do so.\n   */\n  exclusiveMaximum?: number;\n  /**\n   * Ranges of numbers are specified using a combination of the `minimum` and `maximum` keywords, (or `exclusiveMinimum` and `exclusiveMaximum` for expressing exclusive range).\n   *\n   * If _x_ is the value being validated, the following must hold true:\n   *\n   * ```\n   * x ≥ minimum\n   * x > exclusiveMinimum\n   * x ≤ maximum\n   * x < exclusiveMaximum\n   * ```\n   *\n   * While you can specify both of `minimum` and `exclusiveMinimum` or both of `maximum` and `exclusiveMaximum`, it doesn't really make sense to do so.\n   */\n  exclusiveMinimum?: number;\n  /**\n   * Ranges of numbers are specified using a combination of the `minimum` and `maximum` keywords, (or `exclusiveMinimum` and `exclusiveMaximum` for expressing exclusive range).\n   *\n   * If _x_ is the value being validated, the following must hold true:\n   *\n   * ```\n   * x ≥ minimum\n   * x > exclusiveMinimum\n   * x ≤ maximum\n   * x < exclusiveMaximum\n   * ```\n   *\n   * While you can specify both of `minimum` and `exclusiveMinimum` or both of `maximum` and `exclusiveMaximum`, it doesn't really make sense to do so.\n   */\n  maximum?: number;\n  /**\n   * Ranges of numbers are specified using a combination of the `minimum` and `maximum` keywords, (or `exclusiveMinimum` and `exclusiveMaximum` for expressing exclusive range).\n   *\n   * If _x_ is the value being validated, the following must hold true:\n   *\n   * ```\n   * x ≥ minimum\n   * x > exclusiveMinimum\n   * x ≤ maximum\n   * x < exclusiveMaximum\n   * ```\n   *\n   * While you can specify both of `minimum` and `exclusiveMinimum` or both of `maximum` and `exclusiveMaximum`, it doesn't really make sense to do so.\n   */\n  minimum?: number;\n  /**\n   * Numbers can be restricted to a multiple of a given number, using the `multipleOf` keyword. It may be set to any positive number. The multiple can be a floating point number.\n   */\n  multipleOf?: number;\n}\n\ninterface ObjectKeywords {\n  /**\n   * The `additionalProperties` keyword is used to control the handling of extra stuff, that is, properties whose names are not listed in the `properties` keyword or match any of the regular expressions in the `patternProperties` keyword. By default any additional properties are allowed.\n   *\n   * The value of the `additionalProperties` keyword is a schema that will be used to validate any properties in the {@link https://json-schema.org/learn/glossary#instance instance} that are not matched by `properties` or `patternProperties`. Setting the `additionalProperties` schema to `false` means no additional properties will be allowed.\n   *\n   * It's important to note that `additionalProperties` only recognizes properties declared in the same {@link https://json-schema.org/learn/glossary#subschema subschema} as itself. So, `additionalProperties` can restrict you from \"extending\" a schema using {@link https://json-schema.org/understanding-json-schema/reference/combining combining} keywords such as {@link https://json-schema.org/understanding-json-schema/reference/combining#allof allOf}.\n   */\n  additionalProperties?: JsonSchemaDraft2020_12 | false;\n  /**\n   * The number of properties on an object can be restricted using the `minProperties` and `maxProperties` keywords. Each of these must be a non-negative integer.\n   */\n  maxProperties?: number;\n  /**\n   * The number of properties on an object can be restricted using the `minProperties` and `maxProperties` keywords. Each of these must be a non-negative integer.\n   */\n  minProperties?: number;\n  /**\n   * Sometimes you want to say that, given a particular kind of property name, the value should match a particular schema. That's where `patternProperties` comes in: it maps regular expressions to schemas. If a property name matches the given regular expression, the property value must validate against the corresponding schema.\n   */\n  patternProperties?: Record<string, JsonSchemaDraft2020_12>;\n  /**\n   * The properties (key-value pairs) on an object are defined using the `properties` {@link https://json-schema.org/learn/glossary#keyword keyword}. The value of `properties` is an object, where each key is the name of a property and each value is a {@link https://json-schema.org/learn/glossary#schema schema} used to validate that property. Any property that doesn't match any of the property names in the `properties` keyword is ignored by this keyword.\n   */\n  properties?: Record<string, JsonSchemaDraft2020_12 | true>;\n  /**\n   * The names of properties can be validated against a schema, irrespective of their values. This can be useful if you don't want to enforce specific properties, but you want to make sure that the names of those properties follow a specific convention. You might, for example, want to enforce that all names are valid ASCII tokens so they can be used as attributes in a particular programming language.\n   *\n   * Since object keys must always be strings anyway, it is implied that the schema given to `propertyNames` is always at least:\n   *\n   * ```json\n   * { \"type\": \"string\" }\n   * ```\n   */\n  propertyNames?: JsonSchemaDraft2020_12;\n  /**\n   * By default, the properties defined by the `properties` keyword are not required. However, one can provide a list of required properties using the `required` keyword.\n   *\n   * The `required` keyword takes an array of zero or more strings. Each of these strings must be unique.\n   */\n  required?: ReadonlyArray<string>;\n  /**\n   * The `unevaluatedProperties` keyword is similar to `additionalProperties` except that it can recognize properties declared in subschemas. So, the example from the previous section can be rewritten without the need to redeclare properties.\n   *\n   * `unevaluatedProperties` works by collecting any properties that are successfully validated when processing the schemas and using those as the allowed list of properties. This allows you to do more complex things like conditionally adding properties.\n   */\n  unevaluatedProperties?: JsonSchemaDraft2020_12 | false;\n}\n\ninterface StringKeywords {\n  /**\n   * The length of a string can be constrained using the `minLength` and `maxLength` {@link https://json-schema.org/learn/glossary#keyword keywords}. For both keywords, the value must be a non-negative number.\n   */\n  maxLength?: number;\n  /**\n   * The length of a string can be constrained using the `minLength` and `maxLength` {@link https://json-schema.org/learn/glossary#keyword keywords}. For both keywords, the value must be a non-negative number.\n   */\n  minLength?: number;\n  /**\n   * The `pattern` keyword is used to restrict a string to a particular regular expression. The regular expression syntax is the one defined in JavaScript ({@link https://www.ecma-international.org/publications-and-standards/standards/ecma-262/ ECMA 262} specifically) with Unicode support. See {@link https://json-schema.org/understanding-json-schema/reference/regular_expressions Regular Expressions} for more information.\n   */\n  pattern?: string;\n}\n\ntype JsonSchemaFormats =\n  | 'date'\n  | 'date-time'\n  | 'duration'\n  | 'email'\n  | 'hostname'\n  | 'idn-email'\n  | 'idn-hostname'\n  | 'ipv4'\n  | 'ipv6'\n  | 'iri'\n  | 'iri-reference'\n  | 'json-pointer'\n  | 'regex'\n  | 'relative-json-pointer'\n  | 'time'\n  | 'uri'\n  | 'uri-reference'\n  | 'uri-template'\n  | 'uuid'\n  | AnyString;\n\ntype JsonSchemaTypes = 'array' | 'boolean' | 'integer' | 'null' | 'number' | 'object' | 'string';\n"
  },
  {
    "path": "packages/shared/src/openApi/3.1.x/types/spec-extensions.ts",
    "content": "import type { DiscriminatorObject, ExternalDocumentationObject, XMLObject } from './spec';\n\nexport interface OpenApiSchemaExtensions {\n  /**\n   * Adds support for polymorphism. The discriminator is an object name that is used to differentiate between other schemas which may satisfy the payload description. See {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.0.md#composition-and-inheritance-polymorphism Composition and Inheritance} for more details.\n   */\n  discriminator?: DiscriminatorObject;\n  /**\n   * A free-form property to include an example of an instance for this schema. To represent examples that cannot be naturally represented in JSON or YAML, a string value can be used to contain the example with escaping where necessary.\n   *\n   * **Deprecated**: The `example` property has been deprecated in favor of the JSON Schema `examples` keyword. Use of `example` is discouraged, and later versions of this specification may remove it.\n   */\n  example?: unknown;\n  /**\n   * Additional external documentation for this schema.\n   */\n  externalDocs?: ExternalDocumentationObject;\n  /**\n   * This MAY be used only on properties schemas. It has no effect on root schemas. Adds additional metadata to describe the XML representation of this property.\n   */\n  xml?: XMLObject;\n}\n"
  },
  {
    "path": "packages/shared/src/openApi/3.1.x/types/spec.ts",
    "content": "import type { CodeSampleObject } from '../../../openApi/shared/types';\nimport type { JsonSchemaDraft2020_12 } from './json-schema-draft-2020-12';\n\n/**\n * OpenAPI Specification Extensions.\n *\n * See {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.0.md#specification-extensions Specification Extensions}.\n */\nexport interface SpecificationExtensions {\n  [extension: `x-${string}`]: unknown;\n}\n\n/**\n * This is the root object of the {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.0.md#openapi-document OpenAPI document}.\n *\n * This object MAY be extended with {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.0.md#specification-extensions Specification Extensions}.\n */\nexport interface OpenApiV3_1_X extends SpecificationExtensions {\n  /**\n   * An element to hold various schemas for the document.\n   */\n  components?: ComponentsObject;\n  /**\n   * Additional external documentation.\n   */\n  externalDocs?: ExternalDocumentationObject;\n  /**\n   * **REQUIRED**. Provides metadata about the API. The metadata MAY be used by tooling as required.\n   */\n  info: InfoObject;\n  /**\n   * The default value for the `$schema` keyword within {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.0.md#schema-object Schema Objects} contained within this OAS document. This MUST be in the form of a URI.\n   */\n  jsonSchemaDialect?: string;\n  /**\n   * **REQUIRED**. This string MUST be the {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.0.md#versions version number} of the OpenAPI Specification that the OpenAPI document uses. The `openapi` field SHOULD be used by tooling to interpret the OpenAPI document. This is _not_ related to the API {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.0.md#infoVersion `info.version`} string.\n   */\n  openapi: '3.1.0' | '3.1.1' | '3.1.2';\n  /**\n   * The available paths and operations for the API.\n   */\n  paths?: PathsObject;\n  /**\n   * A declaration of which security mechanisms can be used across the API. The list of values includes alternative security requirement objects that can be used. Only one of the security requirement objects need to be satisfied to authorize a request. Individual operations can override this definition. To make security optional, an empty security requirement (`{}`) can be included in the array.\n   */\n  security?: ReadonlyArray<SecurityRequirementObject>;\n  /**\n   * An array of Server Objects, which provide connectivity information to a target server. If the `servers` property is not provided, or is an empty array, the default value would be a {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.0.md#server-object Server Object} with a {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.0.md#serverUrl url} value of `/`.\n   */\n  servers?: ReadonlyArray<ServerObject>;\n  /**\n   * A list of tags used by the document with additional metadata. The order of the tags can be used to reflect on their order by the parsing tools. Not all tags that are used by the {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.0.md#operation-object Operation Object} must be declared. The tags that are not declared MAY be organized randomly or based on the tools' logic. Each tag name in the list MUST be unique.\n   */\n  tags?: ReadonlyArray<TagObject>;\n  /**\n   * The incoming webhooks that MAY be received as part of this API and that the API consumer MAY choose to implement. Closely related to the `callbacks` feature, this section describes requests initiated other than by an API call, for example by an out of band registration. The key name is a unique string to refer to each webhook, while the (optionally referenced) Path Item Object describes a request that may be initiated by the API provider and the expected responses. An {@link https://github.com/OAI/OpenAPI-Specification/blob/main/examples/v3.1/webhook-example.yaml example} is available.\n   */\n  webhooks?: Record<string, PathItemObject | ReferenceObject>;\n}\n\n/**\n * A map of possible out-of band callbacks related to the parent operation. Each value in the map is a {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.0.md#path-item-object Path Item Object} that describes a set of requests that may be initiated by the API provider and the expected responses. The key value used to identify the path item object is an expression, evaluated at runtime, that identifies a URL to use for the callback operation.\n *\n * To describe incoming requests from the API provider independent from another API call, use the {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.0.md#oasWebhooks `webhooks`} field.\n *\n * This object MAY be extended with {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.0.md#specification-extensions Specification Extensions}.\n *\n * **Key Expression**\n *\n * The key that identifies the {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.0.md#path-item-object Path Item Object} is a {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.0.md#runtime-expressions runtime expression} that can be evaluated in the context of a runtime HTTP request/response to identify the URL to be used for the callback request. A simple example might be $request.body#/url. However, using a {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.0.md#runtime-expressions runtime expression} the complete HTTP message can be accessed. This includes accessing any part of a body that a JSON Pointer {@link https://tools.ietf.org/html/rfc6901 RFC6901} can reference.\n *\n * For example, given the following HTTP request:\n *\n * ```http\n * POST /subscribe/myevent?queryUrl=https://clientdomain.com/stillrunning HTTP/1.1\n * Host: example.org\n * Content-Type: application/json\n * Content-Length: 187\n *\n * {\n *   \"failedUrl\" : \"https://clientdomain.com/failed\",\n *   \"successUrls\" : [\n *     \"https://clientdomain.com/fast\",\n *     \"https://clientdomain.com/medium\",\n *     \"https://clientdomain.com/slow\"\n *   ]\n * }\n *\n * 201 Created\n * Location: https://example.org/subscription/1\n * ```\n *\n * The following examples show how the various expressions evaluate, assuming the callback operation has a path parameter named `eventType` and a query parameter named `queryUrl`.\n *\n * | Expression | Value |\n * | -------- | ------- |\n * | $url | https://example.org/subscribe/myevent?queryUrl=https://clientdomain.com/stillrunning |\n * | $method | POST |\n * | $request.path.eventType | myevent |\n * | $request.query.queryUrl | https://clientdomain.com/stillrunning |\n * | $request.header.content-Type | application/json |\n * | $request.body#/failedUrl | https://clientdomain.com/failed |\n * | $request.body#/successUrls/2 | https://clientdomain.com/medium |\n * | $response.header.Location | https://example.org/subscription/1 |\n *\n * **Callback Object Examples**\n *\n * The following example uses the user provided `queryUrl` query string parameter to define the callback URL. This is an example of how to use a callback object to describe a WebHook callback that goes with the subscription operation to enable registering for the WebHook.\n *\n * ```yaml\n * myCallback:\n *   '{$request.query.queryUrl}':\n *     post:\n *       requestBody:\n *         description: Callback payload\n *         content:\n *           'application/json':\n *             schema:\n *               $ref: '#/components/schemas/SomePayload'\n *       responses:\n *         '200':\n *           description: callback successfully processed\n * ```\n *\n * The following example shows a callback where the server is hard-coded, but the query string parameters are populated from the `id` and `email` property in the request body.\n *\n * ```yaml\n * transactionCallback:\n *   'http://notificationServer.com?transactionId={$request.body#/id}&email={$request.body#/email}':\n *     post:\n *       requestBody:\n *         description: Callback payload\n *         content:\n *           'application/json':\n *             schema:\n *               $ref: '#/components/schemas/SomePayload'\n *       responses:\n *         '200':\n *           description: callback successfully processed\n * ```\n */\nexport interface CallbackObject extends SpecificationExtensions {\n  /**\n   * A Path Item Object, or a reference to one, used to define a callback request and expected responses. A {@link https://github.com/OAI/OpenAPI-Specification/blob/main/examples/v3.0/callback-example.yaml complete example} is available.\n   */\n  [expression: string]: PathItemObject | ReferenceObject | unknown;\n}\n\n/**\n * Holds a set of reusable objects for different aspects of the OAS. All objects defined within the components object will have no effect on the API unless they are explicitly referenced from properties outside the components object.\n *\n * This object MAY be extended with {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.0.md#specification-extensions Specification Extensions}.\n *\n * All the fixed fields declared above are objects that MUST use keys that match the regular expression: `^[a-zA-Z0-9\\.\\-_]+$`.\n *\n * Field Name Examples:\n *\n * ```\n * User\n * User_1\n * User_Name\n * user-name\n * my.org.User\n * ```\n *\n * **Components Object Example**\n *\n * ```yaml\n * components:\n *   schemas:\n *     GeneralError:\n *       type: object\n *       properties:\n *         code:\n *           type: integer\n *           format: int32\n *         message:\n *           type: string\n *     Category:\n *       type: object\n *       properties:\n *         id:\n *           type: integer\n *           format: int64\n *         name:\n *           type: string\n *     Tag:\n *       type: object\n *       properties:\n *         id:\n *           type: integer\n *           format: int64\n *         name:\n *           type: string\n *   parameters:\n *     skipParam:\n *       name: skip\n *       in: query\n *       description: number of items to skip\n *       required: true\n *       schema:\n *         type: integer\n *         format: int32\n *     limitParam:\n *       name: limit\n *       in: query\n *       description: max records to return\n *       required: true\n *       schema:\n *         type: integer\n *         format: int32\n *   responses:\n *     NotFound:\n *       description: Entity not found.\n *     IllegalInput:\n *       description: Illegal input for operation.\n *     GeneralError:\n *       description: General Error\n *       content:\n *         application/json:\n *           schema:\n *             $ref: '#/components/schemas/GeneralError'\n *   securitySchemes:\n *     api_key:\n *       type: apiKey\n *       name: api_key\n *       in: header\n *     petstore_auth:\n *       type: oauth2\n *       flows:\n *         implicit:\n *           authorizationUrl: https://example.org/api/oauth/dialog\n *           scopes:\n *             write:pets: modify pets in your account\n *             read:pets: read your pets\n * ```\n */\nexport interface ComponentsObject extends SpecificationExtensions {\n  /**\n   * An object to hold reusable {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.0.md#callback-object Callback Objects}.\n   */\n  callbacks?: Record<string, CallbackObject | ReferenceObject>;\n  /**\n   * An object to hold reusable {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.0.md#example-object Example Objects}.\n   */\n  examples?: Record<string, ExampleObject | ReferenceObject>;\n  /**\n   * An object to hold reusable {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.0.md#header-object Header Objects}.\n   */\n  headers?: Record<string, HeaderObject | ReferenceObject>;\n  /**\n   * An object to hold reusable {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.0.md#link-object Link Objects}.\n   */\n  links?: Record<string, LinkObject | ReferenceObject>;\n  /**\n   * An object to hold reusable {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.0.md#parameter-object Parameter Objects}.\n   */\n  parameters?: Record<string, ParameterObject | ReferenceObject>;\n  /**\n   * An object to hold reusable {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.0.md#path-item-object Path Item Object}.\n   */\n  pathItems?: Record<string, PathItemObject | ReferenceObject>;\n  /**\n   * An object to hold reusable {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.0.md#request-body-object Request Body Objects}.\n   */\n  requestBodies?: Record<string, RequestBodyObject | ReferenceObject>;\n  /**\n   * An object to hold reusable {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.0.md#response-object Response Objects}.\n   */\n  responses?: Record<string, ResponseObject | ReferenceObject>;\n  /**\n   * An object to hold reusable {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.0.md#schema-object Schema Objects}.\n   */\n  schemas?: Record<string, SchemaObject>;\n  /**\n   * An object to hold reusable {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.0.md#security-scheme-object Security Scheme Objects}.\n   */\n  securitySchemes?: Record<string, SecuritySchemeObject | ReferenceObject>;\n}\n\n/**\n * Contact information for the exposed API.\n *\n * This object MAY be extended with {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.0.md#specification-extensions Specification Extensions}.\n *\n * @example\n * ```yaml\n * name: API Support\n * url: https://www.example.com/support\n * email: support@example.com\n * ```\n */\nexport interface ContactObject extends SpecificationExtensions {\n  /**\n   * The email address of the contact person/organization. This MUST be in the form of an email address.\n   */\n  email?: string;\n  /**\n   * The identifying name of the contact person/organization.\n   */\n  name?: string;\n  /**\n   * The URL pointing to the contact information. This MUST be in the form of a URL.\n   */\n  url?: string;\n}\n\n/**\n * When request bodies or response payloads may be one of a number of different schemas, a `discriminator` object can be used to aid in serialization, deserialization, and validation. The discriminator is a specific object in a schema which is used to inform the consumer of the document of an alternative schema based on the value associated with it.\n *\n * When using the discriminator, _inline_ schemas will not be considered.\n *\n * This object MAY be extended with {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.0.md#specification-extensions Specification Extensions}.\n *\n * The discriminator object is legal only when using one of the composite keywords `oneOf`, `anyOf`, `allOf`.\n *\n * In OAS 3.0, a response payload MAY be described to be exactly one of any number of types:\n *\n * ```yaml\n * MyResponseType:\n *   oneOf:\n *   - $ref: '#/components/schemas/Cat'\n *   - $ref: '#/components/schemas/Dog'\n *   - $ref: '#/components/schemas/Lizard'\n * ```\n *\n * which means the payload _MUST_, by validation, match exactly one of the schemas described by `Cat`, `Dog`, or `Lizard`. In this case, a discriminator MAY act as a \"hint\" to shortcut validation and selection of the matching schema which may be a costly operation, depending on the complexity of the schema. We can then describe exactly which field tells us which schema to use:\n *\n * ```yaml\n * MyResponseType:\n *   oneOf:\n *   - $ref: '#/components/schemas/Cat'\n *   - $ref: '#/components/schemas/Dog'\n *   - $ref: '#/components/schemas/Lizard'\n *   discriminator:\n *     propertyName: petType\n * ```\n *\n * The expectation now is that a property with name `petType` _MUST_ be present in the response payload, and the value will correspond to the name of a schema defined in the OAS document. Thus the response payload:\n *\n * ```json\n * {\n *   \"id\": 12345,\n *   \"petType\": \"Cat\"\n * }\n * ```\n *\n * Will indicate that the `Cat` schema be used in conjunction with this payload.\n *\n * In scenarios where the value of the discriminator field does not match the schema name or implicit mapping is not possible, an optional `mapping` definition MAY be used:\n *\n * ```yaml\n * MyResponseType:\n *   oneOf:\n *   - $ref: '#/components/schemas/Cat'\n *   - $ref: '#/components/schemas/Dog'\n *   - $ref: '#/components/schemas/Lizard'\n *   - $ref: 'https://gigantic-server.com/schemas/Monster/schema.json'\n *   discriminator:\n *     propertyName: petType\n *     mapping:\n *       dog: '#/components/schemas/Dog'\n *       monster: 'https://gigantic-server.com/schemas/Monster/schema.json'\n * ```\n *\n * Here the discriminator _value_ of `dog` will map to the schema `#/components/schemas/Dog`, rather than the default (implicit) value of `Dog`. If the discriminator _value_ does not match an implicit or explicit mapping, no schema can be determined and validation SHOULD fail. Mapping keys MUST be string values, but tooling MAY convert response values to strings for comparison.\n *\n * When used in conjunction with the `anyOf` construct, the use of the discriminator can avoid ambiguity where multiple schemas may satisfy a single payload.\n *\n * In both the `oneOf` and `anyOf` use cases, all possible schemas MUST be listed explicitly. To avoid redundancy, the discriminator MAY be added to a parent schema definition, and all schemas comprising the parent schema in an `allOf` construct may be used as an alternate schema.\n *\n * For example:\n *\n * ```yaml\n * components:\n *   schemas:\n *     Pet:\n *       type: object\n *       required:\n *       - petType\n *       properties:\n *         petType:\n *           type: string\n *       discriminator:\n *         propertyName: petType\n *         mapping:\n *           dog: Dog\n *     Cat:\n *       allOf:\n *       - $ref: '#/components/schemas/Pet'\n *       - type: object\n *         # all other properties specific to a `Cat`\n *         properties:\n *           name:\n *             type: string\n *     Dog:\n *       allOf:\n *       - $ref: '#/components/schemas/Pet'\n *       - type: object\n *         # all other properties specific to a `Dog`\n *         properties:\n *           bark:\n *             type: string\n *     Lizard:\n *       allOf:\n *       - $ref: '#/components/schemas/Pet'\n *       - type: object\n *         # all other properties specific to a `Lizard`\n *         properties:\n *           lovesRocks:\n *             type: boolean\n * ```\n *\n * a payload like this:\n *\n * ```json\n * {\n *   \"petType\": \"Cat\",\n *   \"name\": \"misty\"\n * }\n * ```\n *\n * will indicate that the `Cat` schema be used. Likewise this schema:\n *\n * ```json\n * {\n *   \"petType\": \"dog\",\n *   \"bark\": \"soft\"\n * }\n * ```\n *\n * will map to `Dog` because of the definition in the `mapping` element.\n */\nexport interface DiscriminatorObject extends SpecificationExtensions {\n  /**\n   * An object to hold mappings between payload values and schema names or references.\n   */\n  mapping?: Record<string, string>;\n  /**\n   * **REQUIRED**. The name of the property in the payload that will hold the discriminator value.\n   */\n  propertyName: string;\n}\n\n/**\n * A single encoding definition applied to a single schema property.\n *\n * This object MAY be extended with {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.0.md#specification-extensions Specification Extensions}.\n *\n * @example\n * ```yaml\n * requestBody:\n *   content:\n *     multipart/form-data:\n *       schema:\n *         type: object\n *         properties:\n *           id:\n *             # default is text/plain\n *             type: string\n *             format: uuid\n *           address:\n *             # default is application/json\n *             type: object\n *             properties: {}\n *           historyMetadata:\n *             # need to declare XML format!\n *             description: metadata in XML format\n *             type: object\n *             properties: {}\n *           profileImage: {}\n *       encoding:\n *         historyMetadata:\n *           # require XML Content-Type in utf-8 encoding\n *           contentType: application/xml; charset=utf-8\n *         profileImage:\n *           # only accept png/jpeg\n *           contentType: image/png, image/jpeg\n *           headers:\n *             X-Rate-Limit-Limit:\n *               description: The number of allowed requests in the current period\n *               schema:\n *                 type: integer\n * ```\n */\nexport interface EncodingObject extends SpecificationExtensions {\n  /**\n   * Determines whether the parameter value SHOULD allow reserved characters, as defined by {@link https://tools.ietf.org/html/rfc3986#section-2.2 RFC3986} `:/?#[]@!$&'()*+,;=` to be included without percent-encoding. The default value is `false`. This property SHALL be ignored if the request body media type is not `application/x-www-form-urlencoded` or `multipart/form-data`. If a value is explicitly defined, then the value of {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.0.md#encodingContentType `contentType`} (implicit or explicit) SHALL be ignored.\n   */\n  allowReserved?: boolean;\n  /**\n   * The Content-Type for encoding a specific property. Default value depends on the property type: for `object` - `application/json`; for `array` – the default is defined based on the inner type; for all other cases the default is `application/octet-stream`. The value can be a specific media type (e.g. `application/json`), a wildcard media type (e.g. `image/*`), or a comma-separated list of the two types.\n   */\n  contentType?: string;\n  /**\n   * When this is true, property values of type `array` or `object` generate separate parameters for each value of the array, or key-value-pair of the map. For other types of properties this property has no effect. When {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.0.md#encodingStyle `style`} is `form`, the default value is `true`. For all other styles, the default value is `false`. This property SHALL be ignored if the request body media type is not `application/x-www-form-urlencoded` or `multipart/form-data`. If a value is explicitly defined, then the value of {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.0.md#encodingContentType `contentType`} (implicit or explicit) SHALL be ignored.\n   */\n  explode?: boolean;\n  /**\n   * A map allowing additional information to be provided as headers, for example `Content-Disposition`. `Content-Type` is described separately and SHALL be ignored in this section. This property SHALL be ignored if the request body media type is not a `multipart`.\n   */\n  headers?: Record<string, HeaderObject | ReferenceObject>;\n  /**\n   * Describes how a specific property value will be serialized depending on its type. See {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.0.md#parameter-object Parameter Object} for details on the {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.0.md#parameterStyle `style`} property. The behavior follows the same values as `query` parameters, including default values. This property SHALL be ignored if the request body media type is not `application/x-www-form-urlencoded` or `multipart/form-data`. If a value is explicitly defined, then the value of {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.0.md#encodingContentType `contentType`} (implicit or explicit) SHALL be ignored.\n   */\n  style?:\n    | 'deepObject'\n    | 'form'\n    | 'label'\n    | 'matrix'\n    | 'pipeDelimited'\n    | 'simple'\n    | 'spaceDelimited';\n}\n\n/**\n * This object MAY be extended with {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.0.md#specification-extensions Specification Extensions}.\n *\n * In all cases, the example value is expected to be compatible with the type schema of its associated value. Tooling implementations MAY choose to validate compatibility automatically, and reject the example value(s) if incompatible.\n *\n * Example Object Examples\n *\n * In a request body:\n *\n * @example\n * ```yaml\n * requestBody:\n *   content:\n *     'application/json':\n *       schema:\n *         $ref: '#/components/schemas/Address'\n *       examples:\n *         foo:\n *           summary: A foo example\n *           value: {\"foo\": \"bar\"}\n *         bar:\n *           summary: A bar example\n *           value: {\"bar\": \"baz\"}\n *     'application/xml':\n *       examples:\n *         xmlExample:\n *           summary: This is an example in XML\n *           externalValue: 'https://example.org/examples/address-example.xml'\n *     'text/plain':\n *       examples:\n *         textExample:\n *           summary: This is a text example\n *           externalValue: 'https://foo.bar/examples/address-example.txt'\n * ```\n *\n * In a parameter:\n *\n * @example\n * ```yaml\n * parameters:\n *   - name: 'zipCode'\n *     in: 'query'\n *     schema:\n *       type: 'string'\n *       format: 'zip-code'\n *     examples:\n *       zip-example:\n *         $ref: '#/components/examples/zip-example'\n * ```\n *\n * In a response:\n *\n * @example\n * ```yaml\n * responses:\n *   '200':\n *     description: your car appointment has been booked\n *     content:\n *       application/json:\n *         schema:\n *           $ref: '#/components/schemas/SuccessResponse'\n *         examples:\n *           confirmation-success:\n *             $ref: '#/components/examples/confirmation-success'\n * ```\n */\nexport interface ExampleObject extends SpecificationExtensions {\n  /**\n   * Long description for the example. {@link https://spec.commonmark.org/ CommonMark syntax} MAY be used for rich text representation.\n   */\n  description?: string;\n  /**\n   * A URI that points to the literal example. This provides the capability to reference examples that cannot easily be included in JSON or YAML documents. The `value` field and `externalValue` field are mutually exclusive. See the rules for resolving {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.0.md#relative-references-in-uris Relative References}.\n   */\n  externalValue?: string;\n  /**\n   * Short description for the example.\n   */\n  summary?: string;\n  /**\n   * Embedded literal example. The `value` field and `externalValue` field are mutually exclusive. To represent examples of media types that cannot naturally represented in JSON or YAML, use a string value to contain the example, escaping where necessary.\n   */\n  value?: unknown;\n}\n\n/**\n * Allows referencing an external resource for extended documentation.\n *\n * This object MAY be extended with {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.0.md#specification-extensions Specification Extensions}.\n *\n * @example\n * ```yaml\n * description: Find more info here\n * url: https://example.com\n * ```\n */\nexport interface ExternalDocumentationObject extends SpecificationExtensions {\n  /**\n   * A description of the target documentation. {@link https://spec.commonmark.org/ CommonMark syntax} MAY be used for rich text representation.\n   */\n  description?: string;\n  /**\n   * **REQUIRED**. The URL for the target documentation. This MUST be in the form of a URL.\n   */\n  url: string;\n}\n\n/**\n * The Header Object follows the structure of the {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.0.md#parameter-object Parameter Object} with the following changes:\n *\n * 1. `name` MUST NOT be specified, it is given in the corresponding `headers` map.\n * 1. `in` MUST NOT be specified, it is implicitly in `header`.\n * 1. All traits that are affected by the location MUST be applicable to a location of `header` (for example, {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.0.md#parameterStyle `style`}).\n *\n * @example\n * ```yaml\n * description: The number of allowed requests in the current period\n * schema:\n *   type: integer\n * ```\n */\nexport type HeaderObject = Omit<ParameterObject, 'in' | 'name'>;\n\n/**\n * The object provides metadata about the API. The metadata MAY be used by the clients if needed, and MAY be presented in editing or documentation generation tools for convenience.\n *\n * This object MAY be extended with {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.0.md#specification-extensions Specification Extensions}.\n *\n * @example\n * ```yaml\n * title: Sample Pet Store App\n * summary: A pet store manager.\n * description: This is a sample server for a pet store.\n * termsOfService: https://example.com/terms/\n * contact:\n *   name: API Support\n *   url: https://www.example.com/support\n *   email: support@example.com\n * license:\n *   name: Apache 2.0\n *   url: https://www.apache.org/licenses/LICENSE-2.0.html\n * version: 1.0.1\n * ```\n */\nexport interface InfoObject extends SpecificationExtensions {\n  /**\n   * The contact information for the exposed API.\n   */\n  contact?: ContactObject;\n  /**\n   * A description of the API. {@link https://spec.commonmark.org/ CommonMark syntax} MAY be used for rich text representation.\n   */\n  description?: string;\n  /**\n   * The license information for the exposed API.\n   */\n  license?: LicenseObject;\n  /**\n   * A short summary of the API.\n   */\n  summary?: string;\n  /**\n   * A URL to the Terms of Service for the API. This MUST be in the form of a URL.\n   */\n  termsOfService?: string;\n  /**\n   * **REQUIRED**. The title of the API.\n   */\n  title: string;\n  /**\n   * **REQUIRED**. The version of the OpenAPI document (which is distinct from the {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.0.md#oasVersion OpenAPI Specification version} or the API implementation version).\n   */\n  version: string;\n}\n\n/**\n * License information for the exposed API.\n *\n * This object MAY be extended with {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.0.md#specification-extensions Specification Extensions}.\n *\n * @example\n * ```yaml\n * name: Apache 2.0\n * identifier: Apache-2.0\n * ```\n */\nexport interface LicenseObject extends SpecificationExtensions {\n  /**\n   * An {@link https://spdx.org/licenses/ SPDX} license expression for the API. The `identifier` field is mutually exclusive of the `url` field.\n   */\n  identifier?: string;\n  /**\n   * **REQUIRED**. The license name used for the API.\n   */\n  name: string;\n  /**\n   * A URL to the license used for the API. This MUST be in the form of a URL. The `url` field is mutually exclusive of the `identifier` field.\n   */\n  url?: string;\n}\n\n/**\n * The `Link object` represents a possible design-time link for a response. The presence of a link does not guarantee the caller's ability to successfully invoke it, rather it provides a known relationship and traversal mechanism between responses and other operations.\n *\n * Unlike _dynamic_ links (i.e. links provided in the response payload), the OAS linking mechanism does not require link information in the runtime response.\n *\n * For computing links, and providing instructions to execute them, a {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.0.md#runtime-expressions runtime expression} is used for accessing values in an operation and using them as parameters while invoking the linked operation.\n *\n * This object MAY be extended with {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.0.md#specification-extensions Specification Extensions}.\n *\n * A linked operation MUST be identified using either an `operationRef` or `operationId`. In the case of an `operationId`, it MUST be unique and resolved in the scope of the OAS document. Because of the potential for name clashes, the `operationRef` syntax is preferred for OpenAPI documents with external references.\n *\n * **Examples**\n *\n * Computing a link from a request operation where the `$request.path.id` is used to pass a request parameter to the linked operation.\n *\n * ```yaml\n * paths:\n *   /users/{id}:\n *     parameters:\n *     - name: id\n *       in: path\n *       required: true\n *       description: the user identifier, as userId\n *       schema:\n *         type: string\n *     get:\n *       responses:\n *         '200':\n *           description: the user being returned\n *           content:\n *             application/json:\n *               schema:\n *                 type: object\n *                 properties:\n *                   uuid: # the unique user id\n *                     type: string\n *                     format: uuid\n *           links:\n *             address:\n *               # the target link operationId\n *               operationId: getUserAddress\n *               parameters:\n *                 # get the `id` field from the request path parameter named `id`\n *                 userId: $request.path.id\n *   # the path item of the linked operation\n *   /users/{userid}/address:\n *     parameters:\n *     - name: userid\n *       in: path\n *       required: true\n *       description: the user identifier, as userId\n *       schema:\n *         type: string\n *     # linked operation\n *     get:\n *       operationId: getUserAddress\n *       responses:\n *         '200':\n *           description: the user's address\n * ```\n *\n * When a runtime expression fails to evaluate, no parameter value is passed to the target operation.\n *\n * Values from the response body can be used to drive a linked operation.\n *\n * ```yaml\n * links:\n *   address:\n *     operationId: getUserAddressByUUID\n *     parameters:\n *       # get the `uuid` field from the `uuid` field in the response body\n *       userUuid: $response.body#/uuid\n * ```\n *\n * Clients follow all links at their discretion. Neither permissions, nor the capability to make a successful call to that link, is guaranteed solely by the existence of a relationship.\n *\n * **OperationRef Examples**\n *\n * As references to `operationId` MAY NOT be possible (the `operationId` is an optional field in an {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.0.md#operation-object Operation Object}), references MAY also be made through a relative `operationRef`:\n *\n * ```yaml\n * links:\n *   UserRepositories:\n *     # returns array of '#/components/schemas/repository'\n *     operationRef: '#/paths/~12.0~1repositories~1{username}/get'\n *     parameters:\n *       username: $response.body#/username\n * ```\n *\n * or an absolute `operationRef`:\n *\n * ```yaml\n * links:\n *   UserRepositories:\n *     # returns array of '#/components/schemas/repository'\n *     operationRef: 'https://na2.gigantic-server.com/#/paths/~12.0~1repositories~1{username}/get'\n *     parameters:\n *       username: $response.body#/username\n * ```\n *\n * Note that in the use of `operationRef`, the _escaped forward-slash_ is necessary when using JSON references.\n *\n * **Runtime Expressions**\n *\n * Runtime expressions allow defining values based on information that will only be available within the HTTP message in an actual API call. This mechanism is used by {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.0.md#link-object Link Objects} and {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.0.md#callback-object Callback Objects}.\n *\n * The runtime expression is defined by the following {@link https://tools.ietf.org/html/rfc5234 ABNF} syntax\n *\n * ```abnf\n * expression = ( \"$url\" / \"$method\" / \"$statusCode\" / \"$request.\" source / \"$response.\" source )\n * source = ( header-reference / query-reference / path-reference / body-reference )\n * header-reference = \"header.\" token\n * query-reference = \"query.\" name\n * path-reference = \"path.\" name\n * body-reference = \"body\" [\"#\" json-pointer ]\n * json-pointer    = *( \"/\" reference-token )\n * reference-token = *( unescaped / escaped )\n * unescaped       = %x00-2E / %x30-7D / %x7F-10FFFF\n *   ; %x2F ('/') and %x7E ('~') are excluded from 'unescaped'\n * escaped         = \"~\" ( \"0\" / \"1\" )\n *   ; representing '~' and '/', respectively\n * name = *( CHAR )\n * token = 1*tchar\n * tchar = \"!\" / \"#\" / \"$\" / \"%\" / \"&\" / \"'\" / \"*\" / \"+\" / \"-\" / \".\" /\n *   \"^\" / \"_\" / \"`\" / \"|\" / \"~\" / DIGIT / ALPHA\n * ```\n *\n * Here, `json-pointer` is taken from {@link https://tools.ietf.org/html/rfc6901 RFC6901}, `char` from {@link https://tools.ietf.org/html/rfc7159#section-7 RFC7159} and `token` from {@link https://tools.ietf.org/html/rfc7230#section-3.2.6 RFC7230}.\n *\n * The `name` identifier is case-sensitive, whereas `token` is not.\n *\n * The table below provides examples of runtime expressions and examples of their use in a value:\n *\n * **Examples**\n *\n * | Source Location | example expression | notes |\n * | -------- | ------- | ------- |\n * | HTTP Method | `$method` | The allowable values for the `$method` will be those for the HTTP operation. |\n * | Requested media type | `$request.header.accept` | |\n * | Request parameter | `$request.path.id` | Request parameters MUST be declared in the `parameters` section of the parent operation or they cannot be evaluated. This includes request headers. |\n * | Request body property | `$request.body#/user/uuid` | In operations which accept payloads, references may be made to portions of the `requestBody` or the entire body. |\n * | Request URL | `$url` | |\n * | Response value | `$response.body#/status` | In operations which return payloads, references may be made to portions of the response body or the entire body. |\n * | Response header | `$response.header.Server` | Single header values only are available |\n *\n * Runtime expressions preserve the type of the referenced value. Expressions can be embedded into string values by surrounding the expression with `{}` curly braces.\n */\nexport interface LinkObject extends SpecificationExtensions {\n  /**\n   * A description of the link. {@link https://spec.commonmark.org/ CommonMark syntax} MAY be used for rich text representation.\n   */\n  description?: string;\n  /**\n   * The name of an _existing_, resolvable OAS operation, as defined with a unique `operationId`. This field is mutually exclusive of the `operationRef` field.\n   */\n  operationId?: string;\n  /**\n   * A relative or absolute URI reference to an OAS operation. This field is mutually exclusive of the `operationId` field, and MUST point to an {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.0.md#operation-object Operation Object}. Relative `operationRef` values MAY be used to locate an existing {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.0.md#operation-object Operation Object} in the OpenAPI definition. See the rules for resolving {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.0.md#relative-references-in-uris Relative References}.\n   */\n  operationRef?: string;\n  /**\n   * A map representing parameters to pass to an operation as specified with `operationId` or identified via `operationRef`. The key is the parameter name to be used, whereas the value can be a constant or an expression to be evaluated and passed to the linked operation. The parameter name can be qualified using the {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.0.md#parameterIn parameter location} `[{in}.]{name}` for operations that use the same parameter name in different locations (e.g. path.id).\n   */\n  parameters?: Record<string, unknown | string>;\n  /**\n   * A literal value or {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.0.md#runtime-expressions {expression}} to use as a request body when calling the target operation.\n   */\n  requestBody?: unknown | string;\n  /**\n   * A server object to be used by the target operation.\n   */\n  server?: ServerObject;\n}\n\n/**\n * Each Media Type Object provides schema and examples for the media type identified by its key.\n *\n * This object MAY be extended with {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.0.md#specification-extensions Specification Extensions}.\n *\n * **Media Type Examples**\n *\n * @example\n * ```yaml\n * application/json:\n *   schema:\n *     $ref: \"#/components/schemas/Pet\"\n *   examples:\n *     cat:\n *       summary: An example of a cat\n *       value:\n *         name: Fluffy\n *         petType: Cat\n *         color: White\n *         gender: male\n *         breed: Persian\n *     dog:\n *       summary: An example of a dog with a cat's name\n *       value:\n *         name: Puma\n *         petType: Dog\n *         color: Black\n *         gender: Female\n *         breed: Mixed\n *     frog:\n *       $ref: \"#/components/examples/frog-example\"\n * ```\n */\nexport interface MediaTypeObject extends SpecificationExtensions {\n  /**\n   * A map between a property name and its encoding information. The key, being the property name, MUST exist in the schema as a property. The encoding object SHALL only apply to `requestBody` objects when the media type is `multipart` or `application/x-www-form-urlencoded`.\n   */\n  encoding?: Record<string, EncodingObject>;\n  /**\n   * Example of the media type. The example object SHOULD be in the correct format as specified by the media type. The `example` field is mutually exclusive of the `examples` field. Furthermore, if referencing a `schema` which contains an example, the `example` value SHALL _override_ the example provided by the schema.\n   */\n  example?: unknown;\n  /**\n   * Examples of the media type. Each example object SHOULD match the media type and specified schema if present. The `examples` field is mutually exclusive of the `example` field. Furthermore, if referencing a `schema` which contains an example, the `examples` value SHALL _override_ the example provided by the schema.\n   */\n  examples?: Record<string, ExampleObject | ReferenceObject>;\n  /**\n   * The schema defining the content of the request, response, or parameter.\n   */\n  schema?: SchemaObject;\n}\n\n/**\n * Configuration details for a supported OAuth Flow\n *\n * This object MAY be extended with {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.0.md#specification-extensions Specification Extensions}.\n *\n * **OAuth Flow Object Examples**\n *\n * ```yaml\n * type: oauth2\n * flows:\n *   implicit:\n *     authorizationUrl: https://example.com/api/oauth/dialog\n *     scopes:\n *       write:pets: modify pets in your account\n *       read:pets: read your pets\n *   authorizationCode:\n *     authorizationUrl: https://example.com/api/oauth/dialog\n *     tokenUrl: https://example.com/api/oauth/token\n *     scopes:\n *       write:pets: modify pets in your account\n *       read:pets: read your pets\n * ```\n */\nexport interface OAuthFlowObject extends SpecificationExtensions {\n  /**\n   * **REQUIRED (`\"implicit\"`, `\"authorizationCode\"`)**. The authorization URL to be used for this flow. This MUST be in the form of a URL. The OAuth2 standard requires the use of TLS.\n   */\n  authorizationUrl?: string;\n  /**\n   * The URL to be used for obtaining refresh tokens. This MUST be in the form of a URL. The OAuth2 standard requires the use of TLS.\n   */\n  refreshUrl?: string;\n  /**\n   * **REQUIRED**. The available scopes for the OAuth2 security scheme. A map between the scope name and a short description for it. The map MAY be empty.\n   */\n  scopes: Record<string, string>;\n  /**\n   * **REQUIRED (`\"password\"`, `\"clientCredentials\"`, `\"authorizationCode\"`)**. The token URL to be used for this flow. This MUST be in the form of a URL. The OAuth2 standard requires the use of TLS.\n   */\n  tokenUrl?: string;\n}\n\n/**\n * Allows configuration of the supported OAuth Flows.\n *\n * This object MAY be extended with {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.0.md#specification-extensions Specification Extensions}.\n */\nexport interface OAuthFlowsObject extends SpecificationExtensions {\n  /**\n   * Configuration for the OAuth Authorization Code flow. Previously called `accessCode` in OpenAPI 2.0.\n   */\n  authorizationCode?: OAuthFlowObject;\n  /**\n   * Configuration for the OAuth Client Credentials flow. Previously called `application` in OpenAPI 2.0.\n   */\n  clientCredentials?: OAuthFlowObject;\n  /**\n   * Configuration for the OAuth Implicit flow\n   */\n  implicit?: OAuthFlowObject;\n  /**\n   * Configuration for the OAuth Resource Owner Password flow\n   */\n  password?: OAuthFlowObject;\n}\n\n/**\n * Describes a single API operation on a path.\n *\n * This object MAY be extended with {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.0.md#specification-extensions Specification Extensions}.\n *\n * @example\n * ```yaml\n * tags:\n * - pet\n * summary: Updates a pet in the store with form data\n * operationId: updatePetWithForm\n * parameters:\n * - name: petId\n *   in: path\n *   description: ID of pet that needs to be updated\n *   required: true\n *   schema:\n *     type: string\n * requestBody:\n *   content:\n *     'application/x-www-form-urlencoded':\n *       schema:\n *         type: object\n *         properties:\n *           name:\n *             description: Updated name of the pet\n *             type: string\n *           status:\n *             description: Updated status of the pet\n *             type: string\n *         required:\n *           - status\n * responses:\n *   '200':\n *     description: Pet updated.\n *     content:\n *       'application/json': {}\n *       'application/xml': {}\n *   '405':\n *     description: Method Not Allowed\n *     content:\n *       'application/json': {}\n *       'application/xml': {}\n * security:\n * - petstore_auth:\n *   - write:pets\n *   - read:pets\n * ```\n */\nexport interface OperationObject extends SpecificationExtensions {\n  /**\n   * A map of possible out-of band callbacks related to the parent operation. The key is a unique identifier for the Callback Object. Each value in the map is a {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.0.md#callback-object Callback Object} that describes a request that may be initiated by the API provider and the expected responses.\n   */\n  callbacks?: Record<string, CallbackObject | ReferenceObject>;\n  /**\n   * Declares this operation to be deprecated. Consumers SHOULD refrain from usage of the declared operation. Default value is `false`.\n   */\n  deprecated?: boolean;\n  /**\n   * A verbose explanation of the operation behavior. {@link https://spec.commonmark.org/ CommonMark syntax} MAY be used for rich text representation.\n   */\n  description?: string;\n  /**\n   * Additional external documentation for this operation.\n   */\n  externalDocs?: ExternalDocumentationObject;\n  /**\n   * Unique string used to identify the operation. The id MUST be unique among all operations described in the API. The operationId value is **case-sensitive**. Tools and libraries MAY use the operationId to uniquely identify an operation, therefore, it is RECOMMENDED to follow common programming naming conventions.\n   */\n  operationId?: string;\n  /**\n   * A list of parameters that are applicable for this operation. If a parameter is already defined at the {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.0.md#pathItemParameters Path Item}, the new definition will override it but can never remove it. The list MUST NOT include duplicated parameters. A unique parameter is defined by a combination of a {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.0.md#parameterName name} and {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.0.md#parameterIn location}. The list can use the {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.0.md#reference-object Reference Object} to link to parameters that are defined at the {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.0.md#componentsParameters OpenAPI Object's components/parameters}.\n   */\n  parameters?: ReadonlyArray<ParameterObject | ReferenceObject>;\n  /**\n   * The request body applicable for this operation. The `requestBody` is fully supported in HTTP methods where the HTTP 1.1 specification {@link https://datatracker.ietf.org/doc/html/rfc7231#section-4.3.1 RFC7231} has explicitly defined semantics for request bodies. In other cases where the HTTP spec is vague (such as {@link https://datatracker.ietf.org/doc/html/rfc7231#section-4.3.1 GET}, {@link https://datatracker.ietf.org/doc/html/rfc7231#section-4.3.2 HEAD} and {@link https://datatracker.ietf.org/doc/html/rfc7231#section-4.3.5 DELETE}), `requestBody` is permitted but does not have well-defined semantics and SHOULD be avoided if possible.\n   */\n  requestBody?: RequestBodyObject | ReferenceObject;\n  /**\n   * The list of possible responses as they are returned from executing this operation.\n   */\n  responses?: ResponsesObject;\n  /**\n   * A declaration of which security mechanisms can be used for this operation. The list of values includes alternative security requirement objects that can be used. Only one of the security requirement objects need to be satisfied to authorize a request. To make security optional, an empty security requirement (`{}`) can be included in the array. This definition overrides any declared top-level {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.0.md#oasSecurity `security`}. To remove a top-level security declaration, an empty array can be used.\n   */\n  security?: ReadonlyArray<SecurityRequirementObject>;\n  /**\n   * An alternative `server` array to service this operation. If an alternative `server` object is specified at the Path Item Object or Root level, it will be overridden by this value.\n   */\n  servers?: ReadonlyArray<ServerObject>;\n  /**\n   * A short summary of what the operation does.\n   */\n  summary?: string;\n  /**\n   * A list of tags for API documentation control. Tags can be used for logical grouping of operations by resources or any other qualifier.\n   */\n  tags?: ReadonlyArray<string>;\n  /**\n   * A list of code samples associated with an operation.\n   */\n  'x-codeSamples'?: ReadonlyArray<CodeSampleObject>;\n}\n\n/**\n * Describes a single operation parameter.\n *\n * A unique parameter is defined by a combination of a {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.0.md#parameterName name} and {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.0.md#parameterIn location}.\n *\n * **Parameter Locations**\n *\n * There are four possible parameter locations specified by the `in` field:\n *\n * - path - Used together with {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.0.md#path-templating Path Templating}, where the parameter value is actually part of the operation's URL. This does not include the host or base path of the API. For example, in `/items/{itemId}`, the path parameter is `itemId`.\n * - query - Parameters that are appended to the URL. For example, in `/items?id=###`, the query parameter is `id`.\n * - header - Custom headers that are expected as part of the request. Note that {@link https://datatracker.ietf.org/doc/html/rfc7230#page-22 RFC7230} states header names are case insensitive.\n * - cookie - Used to pass a specific cookie value to the API.\n *\n * The rules for serialization of the parameter are specified in one of two ways. For simpler scenarios, a {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.0.md#parameterSchema `schema`} and {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.0.md#parameterStyle `style`} can describe the structure and syntax of the parameter.\n *\n * For more complex scenarios, the {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.0.md#parameterContent `content`} property can define the media type and schema of the parameter. A parameter MUST contain either a `schema` property, or a `content` property, but not both. When `example` or `examples` are provided in conjunction with the `schema` object, the example MUST follow the prescribed serialization strategy for the parameter.\n *\n * This object MAY be extended with {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.0.md#specification-extensions Specification Extensions}.\n *\n * A header parameter with an array of 64 bit integer numbers:\n *\n * @example\n * ```yaml\n * name: token\n * in: header\n * description: token to be passed as a header\n * required: true\n * schema:\n *   type: array\n *   items:\n *     type: integer\n *     format: int64\n * style: simple\n * ```\n *\n * A path parameter of a string value:\n *\n * @example\n * ```yaml\n * name: username\n * in: path\n * description: username to fetch\n * required: true\n * schema:\n *   type: string\n * ```\n *\n * An optional query parameter of a string value, allowing multiple values by repeating the query parameter:\n *\n * @example\n * ```yaml\n * name: id\n * in: query\n * description: ID of the object to fetch\n * required: false\n * schema:\n *   type: array\n *   items:\n *     type: string\n * style: form\n * explode: true\n * ```\n *\n * A free-form query parameter, allowing undefined parameters of a specific type:\n *\n * @example\n * ```yaml\n * in: query\n * name: freeForm\n * schema:\n *   type: object\n *   additionalProperties:\n *     type: integer\n * style: form\n * ```\n *\n * A complex parameter using `content` to define serialization:\n *\n * @example\n * ```yaml\n * in: query\n * name: coordinates\n * content:\n *   application/json:\n *     schema:\n *       type: object\n *       required:\n *         - lat\n *         - long\n *       properties:\n *         lat:\n *           type: number\n *         long:\n *           type: number\n * ```\n */\nexport interface ParameterObject extends SpecificationExtensions {\n  /**\n   * Sets the ability to pass empty-valued parameters. This is valid only for `query` parameters and allows sending a parameter with an empty value. Default value is `false`. If {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.0.md#parameterStyle `style`} is used, and if behavior is `n/a` (cannot be serialized), the value of `allowEmptyValue` SHALL be ignored. Use of this property is NOT RECOMMENDED, as it is likely to be removed in a later revision.\n   */\n  allowEmptyValue?: boolean;\n  /**\n   * Determines whether the parameter value SHOULD allow reserved characters, as defined by {@link https://datatracker.ietf.org/doc/html/rfc3986#section-2.2 RFC3986} `:/?#[]@!$&'()*+,;=` to be included without percent-encoding. This property only applies to parameters with an `in` value of `query`. The default value is `false`.\n   */\n  allowReserved?: boolean;\n  /**\n   * A map containing the representations for the parameter. The key is the media type and the value describes it. The map MUST only contain one entry.\n   */\n  content?: Record<string, MediaTypeObject>;\n  /**\n   * Specifies that a parameter is deprecated and SHOULD be transitioned out of usage. Default value is `false`.\n   */\n  deprecated?: boolean;\n  /**\n   * A brief description of the parameter. This could contain examples of use. {@link https://spec.commonmark.org/ CommonMark syntax} MAY be used for rich text representation.\n   */\n  description?: string;\n  /**\n   * Example of the parameter's potential value. The example SHOULD match the specified schema and encoding properties if present. The `example` field is mutually exclusive of the `examples` field. Furthermore, if referencing a `schema` that contains an example, the `example` value SHALL _override_ the example provided by the schema. To represent examples of media types that cannot naturally be represented in JSON or YAML, a string value can contain the example with escaping where necessary.\n   */\n  example?: unknown;\n  /**\n   * Examples of the parameter's potential value. Each example SHOULD contain a value in the correct format as specified in the parameter encoding. The `examples` field is mutually exclusive of the `example` field. Furthermore, if referencing a `schema` that contains an example, the `examples` value SHALL _override_ the example provided by the schema.\n   */\n  examples?: Record<string, ExampleObject | ReferenceObject>;\n  /**\n   * When this is true, parameter values of type `array` or `object` generate separate parameters for each value of the array or key-value pair of the map. For other types of parameters this property has no effect. When {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.0.md#parameterStyle `style`} is `form`, the default value is `true`. For all other styles, the default value is `false`.\n   */\n  explode?: boolean;\n  /**\n   * **REQUIRED**. The location of the parameter. Possible values are `\"query\"`, `\"header\"`, `\"path\"` or `\"cookie\"`.\n   */\n  in: 'cookie' | 'header' | 'path' | 'query';\n  /**\n   * **REQUIRED**. The name of the parameter. Parameter names are _case sensitive_.\n   * - If {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.0.md#parameterIn `in`} is `\"path\"`, the `name` field MUST correspond to a template expression occurring within the {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.0.md#pathsPath path} field in the {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.0.md#paths-object Paths Object}. See {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.0.md#path-templating Path Templating} for further information.\n   * - If {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.0.md#parameterIn `in`} is `\"header\"` and the `name` field is `\"Accept\"`, `\"Content-Type\"` or `\"Authorization\"`, the parameter definition SHALL be ignored.\n   * - For all other cases, the `name` corresponds to the parameter name used by the {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.0.md#parameterIn `in`} property.\n   */\n  name: string;\n  /**\n   * Determines whether this parameter is mandatory. If the {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.0.md#parameterIn parameter location} is `\"path\"`, this property is **REQUIRED** and its value MUST be `true`. Otherwise, the property MAY be included and its default value is `false`.\n   */\n  required?: boolean;\n  /**\n   * The schema defining the type used for the parameter.\n   */\n  schema?: SchemaObject;\n  /**\n   * Describes how the parameter value will be serialized depending on the type of the parameter value. Default values (based on value of `in`): for `query` - `form`; for `path` - `simple`; for `header` - `simple`; for `cookie` - `form`.\n   */\n  style?:\n    | 'deepObject'\n    | 'form'\n    | 'label'\n    | 'matrix'\n    | 'pipeDelimited'\n    | 'simple'\n    | 'spaceDelimited';\n}\n\n/**\n * Describes the operations available on a single path. A Path Item MAY be empty, due to {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.0.md#security-filtering ACL constraints}. The path itself is still exposed to the documentation viewer but they will not know which operations and parameters are available.\n *\n * This object MAY be extended with {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.0.md#specification-extensions Specification Extensions}.\n *\n * @example\n * ```yaml\n * get:\n *   description: Returns pets based on ID\n *   summary: Find pets by ID\n *   operationId: getPetsById\n *   responses:\n *     '200':\n *       description: pet response\n *       content:\n *         '*\\/*':\n *           schema:\n *             type: array\n *             items:\n *               $ref: '#/components/schemas/Pet'\n *     default:\n *       description: error payload\n *       content:\n *         'text/html':\n *           schema:\n *             $ref: '#/components/schemas/ErrorModel'\n * parameters:\n * - name: id\n *   in: path\n *   description: ID of pet to use\n *   required: true\n *   schema:\n *     type: array\n *     items:\n *       type: string\n *   style: simple\n * ```\n */\nexport interface PathItemObject extends SpecificationExtensions {\n  /**\n   * Allows for a referenced definition of this path item. The referenced structure MUST be in the form of a {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.0.md#path-item-object Path Item Object}. In case a Path Item Object field appears both in the defined object and the referenced object, the behavior is undefined. See the rules for resolving {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.0.md#relative-references-in-uris Relative References}.\n   */\n  $ref?: string;\n  /**\n   * A definition of a DELETE operation on this path.\n   */\n  delete?: OperationObject;\n  /**\n   * An optional, string description, intended to apply to all operations in this path. {@link https://spec.commonmark.org/ CommonMark syntax} MAY be used for rich text representation.\n   */\n  description?: string;\n  /**\n   * A definition of a GET operation on this path.\n   */\n  get?: OperationObject;\n  /**\n   * A definition of a HEAD operation on this path.\n   */\n  head?: OperationObject;\n  /**\n   * A definition of a OPTIONS operation on this path.\n   */\n  options?: OperationObject;\n  /**\n   * A list of parameters that are applicable for all the operations described under this path. These parameters can be overridden at the operation level, but cannot be removed there. The list MUST NOT include duplicated parameters. A unique parameter is defined by a combination of a {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.0.md#parameterName name} and {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.0.md#parameterIn location}. The list can use the {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.0.md#reference-object Reference Object} to link to parameters that are defined at the {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.0.md#componentsParameters OpenAPI Object's components/parameters}.\n   */\n  parameters?: ReadonlyArray<ParameterObject | ReferenceObject>;\n  /**\n   * A definition of a PATCH operation on this path.\n   */\n  patch?: OperationObject;\n  /**\n   * A definition of a POST operation on this path.\n   */\n  post?: OperationObject;\n  /**\n   * A definition of a PUT operation on this path.\n   */\n  put?: OperationObject;\n  /**\n   * An alternative `server` array to service all operations in this path.\n   */\n  servers?: ReadonlyArray<ServerObject>;\n  /**\n   * An optional, string summary, intended to apply to all operations in this path.\n   */\n  summary?: string;\n  /**\n   * A definition of a TRACE operation on this path.\n   */\n  trace?: OperationObject;\n}\n\n/**\n * Holds the relative paths to the individual endpoints and their operations. The path is appended to the URL from the {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.0.md#server-object `Server Object`} in order to construct the full URL. The Paths MAY be empty, due to {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.0.md#security-filtering Access Control List (ACL) constraints}.\n *\n * This object MAY be extended with {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.0.md#specification-extensions Specification Extensions}.\n *\n * **Path Templating Matching**\n *\n * Assuming the following paths, the concrete definition, `/pets/mine`, will be matched first if used:\n *\n * ```\n * /pets/{petId}\n * /pets/mine\n * ```\n *\n * The following paths are considered identical and invalid:\n *\n * ```\n * /pets/{petId}\n * /pets/{name}\n * ```\n *\n * The following may lead to ambiguous resolution:\n *\n * ```\n * /{entity}/me\n * /books/{id}\n * ```\n *\n * **Paths Object Example**\n *\n * ```yaml\n * /pets:\n *   get:\n *     description: Returns all pets from the system that the user has access to\n *     responses:\n *       '200':\n *         description: A list of pets.\n *         content:\n *           application/json:\n *             schema:\n *               type: array\n *               items:\n *                 $ref: '#/components/schemas/pet'\n * ```\n */\nexport interface PathsObject extends SpecificationExtensions {\n  /**\n   * A relative path to an individual endpoint. The field name MUST begin with a forward slash (`/`). The path is **appended** (no relative URL resolution) to the expanded URL from the {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.0.md#server-object `Server Object`}'s `url` field in order to construct the full URL. {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.0.md#path-templating Path templating} is allowed. When matching URLs, concrete (non-templated) paths would be matched before their templated counterparts. Templated paths with the same hierarchy but different templated names MUST NOT exist as they are identical. In case of ambiguous matching, it's up to the tooling to decide which one to use.\n   */\n  [path: `/${string}`]: PathItemObject;\n}\n\n/**\n * A simple object to allow referencing other components in the OpenAPI document, internally and externally.\n *\n * The `$ref` string value contains a URI {@link https://datatracker.ietf.org/doc/html/rfc3986 RFC3986}, which identifies the location of the value being referenced.\n *\n * See the rules for resolving {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.0.md#relative-references-in-uris Relative References}.\n *\n * This object cannot be extended with additional properties and any properties added SHALL be ignored.\n *\n * Note that this restriction on additional properties is a difference between Reference Objects and {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.0.md#schema-object `Schema Objects`} that contain a `$ref` keyword.\n *\n * Reference Object Example\n *\n * @example\n * ```yaml\n * $ref: '#/components/schemas/Pet'\n * ```\n *\n * Relative Schema Document Example\n *\n * @example\n * ```yaml\n * $ref: Pet.yaml\n * ```\n *\n * Relative Documents With Embedded Schema Example\n *\n * @example\n * ```yaml\n * $ref: definitions.yaml#/Pet\n * ```\n */\nexport interface ReferenceObject {\n  /**\n   * **REQUIRED**. The reference identifier. This MUST be in the form of a URI.\n   */\n  $ref: string;\n  /**\n   * A description which by default SHOULD override that of the referenced component. {@link https://spec.commonmark.org/ CommonMark syntax} MAY be used for rich text representation. If the referenced object-type does not allow a `description` field, then this field has no effect.\n   */\n  description?: string;\n  /**\n   * A short summary which by default SHOULD override that of the referenced component. If the referenced object-type does not allow a `summary` field, then this field has no effect.\n   */\n  summary?: string;\n}\n\n/**\n * Describes a single request body.\n *\n * This object MAY be extended with {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.0.md#specification-extensions Specification Extensions}.\n *\n * **Request Body Examples**\n *\n * A request body with a referenced model definition.\n *\n * ```yaml\n * description: user to add to the system\n * content:\n *   'application/json':\n *     schema:\n *       $ref: '#/components/schemas/User'\n *     examples:\n *       user:\n *         summary: User Example\n *         externalValue: 'https://foo.bar/examples/user-example.json'\n *   'application/xml':\n *     schema:\n *       $ref: '#/components/schemas/User'\n *     examples:\n *       user:\n *         summary: User example in XML\n *         externalValue: 'https://foo.bar/examples/user-example.xml'\n *   'text/plain':\n *     examples:\n *       user:\n *         summary: User example in Plain text\n *         externalValue: 'https://foo.bar/examples/user-example.txt'\n *   '*\\/*':\n *     examples:\n *       user:\n *         summary: User example in other format\n *         externalValue: 'https://foo.bar/examples/user-example.whatever'\n * ```\n *\n * A body parameter that is an array of string values:\n *\n * ```yaml\n * description: user to add to the system\n * required: true\n * content:\n *   text/plain:\n *     schema:\n *       type: array\n *       items:\n *         type: string\n * ```\n */\nexport interface RequestBodyObject extends SpecificationExtensions {\n  /**\n   * **REQUIRED**. The content of the request body. The key is a media type or {@link https://tools.ietf.org/html/rfc7231#appendix-D media type range} and the value describes it. For requests that match multiple keys, only the most specific key is applicable. e.g. text/plain overrides text/*\n   */\n  content: Record<string, MediaTypeObject>;\n  /**\n   * A brief description of the request body. This could contain examples of use. {@link https://spec.commonmark.org/ CommonMark syntax} MAY be used for rich text representation.\n   */\n  description?: string;\n  /**\n   * Determines if the request body is required in the request. Defaults to `false`.\n   */\n  required?: boolean;\n}\n\n/**\n * Describes a single response from an API Operation, including design-time, static `links` to operations based on the response.\n *\n * This object MAY be extended with {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.0.md#specification-extensions Specification Extensions}.\n *\n * Response of an array of a complex type:\n *\n * @example\n * ```yaml\n * description: A complex object array response\n * content:\n *   application/json:\n *     schema:\n *       type: array\n *       items:\n *         $ref: '#/components/schemas/VeryComplexType'\n * ```\n *\n * Response with a string type:\n *\n * @example\n * ```yaml\n * description: A simple string response\n * content:\n *   text/plain:\n *     schema:\n *       type: string\n * ```\n *\n * Plain text response with headers:\n *\n * @example\n * ```yaml\n * description: A simple string response\n * content:\n *   text/plain:\n *     schema:\n *       type: string\n *     example: 'whoa!'\n * headers:\n *   X-Rate-Limit-Limit:\n *     description: The number of allowed requests in the current period\n *     schema:\n *       type: integer\n *   X-Rate-Limit-Remaining:\n *     description: The number of remaining requests in the current period\n *     schema:\n *       type: integer\n *   X-Rate-Limit-Reset:\n *     description: The number of seconds left in the current period\n *     schema:\n *       type: integer\n * ```\n *\n * Response with no return value:\n *\n * @example\n * ```yaml\n * description: object created\n * ```\n */\nexport interface ResponseObject extends SpecificationExtensions {\n  /**\n   * A map containing descriptions of potential response payloads. The key is a media type or {@link https://datatracker.ietf.org/doc/html/rfc7231#appendix-D media type range} and the value describes it. For responses that match multiple keys, only the most specific key is applicable. e.g. text/plain overrides text/*\n   */\n  content?: Record<string, MediaTypeObject>;\n  /**\n   * **REQUIRED**. A description of the response. {@link https://spec.commonmark.org/ CommonMark syntax} MAY be used for rich text representation.\n   */\n  description: string;\n  /**\n   * Maps a header name to its definition. {@link https://datatracker.ietf.org/doc/html/rfc7230#page-22 RFC7230} states header names are case insensitive. If a response header is defined with the name `\"Content-Type\"`, it SHALL be ignored.\n   */\n  headers?: Record<string, HeaderObject | ReferenceObject>;\n  /**\n   * A map of operations links that can be followed from the response. The key of the map is a short name for the link, following the naming constraints of the names for {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.0.md#components-object Component Objects}.\n   */\n  links?: Record<string, LinkObject | ReferenceObject>;\n}\n\n/**\n * A container for the expected responses of an operation. The container maps a HTTP response code to the expected response.\n *\n * The documentation is not necessarily expected to cover all possible HTTP response codes because they may not be known in advance. However, documentation is expected to cover a successful operation response and any known errors.\n *\n * The `default` MAY be used as a default response object for all HTTP codes that are not covered individually by the `Responses Object`.\n *\n * The `Responses Object` MUST contain at least one response code, and if only one response code is provided it SHOULD be the response for a successful operation call.\n *\n * This object MAY be extended with {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.0.md#specification-extensions Specification Extensions}.\n *\n * A 200 response for a successful operation and a default response for others (implying an error):\n *\n * @example\n * ```yaml\n * '200':\n *   description: a pet to be returned\n *   content:\n *     application/json:\n *       schema:\n *         $ref: '#/components/schemas/Pet'\n * default:\n *   description: Unexpected error\n *   content:\n *     application/json:\n *       schema:\n *         $ref: '#/components/schemas/ErrorModel'\n * ```\n */\nexport interface ResponsesObject extends SpecificationExtensions {\n  /**\n   * Any {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.0.md#http-status-codes HTTP status code} can be used as the property name, but only one property per code, to describe the expected response for that HTTP status code. This field MUST be enclosed in quotation marks (for example, \"200\") for compatibility between JSON and YAML. To define a range of response codes, this field MAY contain the uppercase wildcard character `X`. For example, `2XX` represents all response codes between `[200-299]`. Only the following range definitions are allowed: `1XX`, `2XX`, `3XX`, `4XX`, and `5XX`. If a response is defined using an explicit code, the explicit code definition takes precedence over the range definition for that code.\n   */\n  [httpStatusCode: string]: ResponseObject | ReferenceObject | undefined | unknown;\n  /**\n   * The documentation of responses other than the ones declared for specific HTTP response codes. Use this field to cover undeclared responses.\n   */\n  default?: ResponseObject | ReferenceObject;\n}\n\n/**\n * The Schema Object allows the definition of input and output data types. These types can be objects, but also primitives and arrays. This object is a superset of the {@link https://tools.ietf.org/html/draft-bhutton-json-schema-00 JSON Schema Specification Draft 2020-12}.\n *\n * For more information about the properties, see {@link https://tools.ietf.org/html/draft-bhutton-json-schema-00 JSON Schema Core} and {@link https://tools.ietf.org/html/draft-bhutton-json-schema-validation-00 JSON Schema Validation}.\n *\n * Unless stated otherwise, the property definitions follow those of JSON Schema and do not add any additional semantics. Where JSON Schema indicates that behavior is defined by the application (e.g. for annotations), OAS also defers the definition of semantics to the application consuming the OpenAPI document.\n *\n * **Properties**\n *\n * The OpenAPI Schema Object {@link https://tools.ietf.org/html/draft-bhutton-json-schema-00#section-4.3.3 dialect} is defined as requiring the {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.0.md#fixed-fields-20 OAS base vocabulary}, in addition to the vocabularies as specified in the JSON Schema draft 2020-12 {@link https://tools.ietf.org/html/draft-bhutton-json-schema-00#section-8 general purpose meta-schema}.\n *\n * The OpenAPI Schema Object dialect for this version of the specification is identified by the URI `https://spec.openapis.org/oas/3.1/dialect/base` (the \"OAS dialect schema id\").\n *\n * The following properties are taken from the JSON Schema specification but their definitions have been extended by the OAS:\n *\n * - description - {@link https://spec.commonmark.org/ CommonMark syntax} MAY be used for rich text representation.\n * - format - See {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.0.md#dataTypeFormat Data Type Formats} for further details. While relying on JSON Schema's defined formats, the OAS offers a few additional predefined formats.\n *\n * In addition to the JSON Schema properties comprising the OAS dialect, the Schema Object supports keywords from any other vocabularies, or entirely arbitrary properties.\n *\n * The OpenAPI Specification's base vocabulary is comprised of the following keywords:\n *\n * This object MAY be extended with {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.0.md#specification-extensions Specification Extensions}, though as noted, additional properties MAY omit the `x-` prefix within this object.\n */\nexport type SchemaObject = JsonSchemaDraft2020_12 & SpecificationExtensions;\n\n/**\n * Lists the required security schemes to execute this operation. The name used for each property MUST correspond to a security scheme declared in the {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.0.md#componentsSecuritySchemes Security Schemes} under the {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.0.md#components-object Components Object}.\n *\n * Security Requirement Objects that contain multiple schemes require that all schemes MUST be satisfied for a request to be authorized. This enables support for scenarios where multiple query parameters or HTTP headers are required to convey security information.\n *\n * When a list of Security Requirement Objects is defined on the {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.0.md#openapi-object OpenAPI Object} or {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.0.md#operation-object Operation Object}, only one of the Security Requirement Objects in the list needs to be satisfied to authorize the request.\n *\n * Non-OAuth2 Security Requirement\n *\n * @example\n * ```yaml\n * api_key: []\n * ```\n *\n * OAuth2 Security Requirement\n *\n * @example\n * ```yaml\n * petstore_auth:\n * - write:pets\n * - read:pets\n * ```\n *\n * Optional OAuth2 Security\n *\n * @example\n * ```yaml\n * security:\n * - {}\n * - petstore_auth:\n *   - write:pets\n *   - read:pets\n * ```\n */\nexport interface SecurityRequirementObject {\n  /**\n   * Each name MUST correspond to a security scheme which is declared in the {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.0.md#componentsSecuritySchemes Security Schemes} under the {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.0.md#components-object Components Object}. If the security scheme is of type `\"oauth2\"` or `\"openIdConnect\"`, then the value is a list of scope names required for the execution, and the list MAY be empty if authorization does not require a specified scope. For other security scheme types, the array MAY contain a list of role names which are required for the execution, but are not otherwise defined or exchanged in-band.\n   */\n  [name: string]: ReadonlyArray<string>;\n}\n\n/**\n * Defines a security scheme that can be used by the operations.\n *\n * Supported schemes are HTTP authentication, an API key (either as a header, a cookie parameter or as a query parameter), mutual TLS (use of a client certificate), OAuth2's common flows (implicit, password, client credentials and authorization code) as defined in {@link https://tools.ietf.org/html/rfc6749 RFC6749}, and {@link https://tools.ietf.org/html/draft-ietf-oauth-discovery-06 OpenID Connect Discovery}. Please note that as of 2020, the implicit flow is about to be deprecated by {@link https://tools.ietf.org/html/draft-ietf-oauth-security-topics OAuth 2.0 Security Best Current Practice}. Recommended for most use case is Authorization Code Grant flow with PKCE.\n *\n * This object MAY be extended with {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.0.md#specification-extensions Specification Extensions}.\n *\n * **Security Scheme Object Example**\n *\n * **Basic Authentication Sample**\n *\n * ```yaml\n * type: http\n * scheme: basic\n * ```\n *\n * **API Key Sample**\n *\n * ```yaml\n * type: apiKey\n * name: api_key\n * in: header\n * ```\n *\n * **JWT Bearer Sample**\n *\n * ```yaml\n * type: http\n * scheme: bearer\n * bearerFormat: JWT\n * ```\n *\n * **Implicit OAuth2 Sample**\n *\n * ```yaml\n * type: oauth2\n * flows:\n *   implicit:\n *     authorizationUrl: https://example.com/api/oauth/dialog\n *     scopes:\n *       write:pets: modify pets in your account\n *       read:pets: read your pets\n * ```\n */\nexport type SecuritySchemeObject = SpecificationExtensions & {\n  /**\n   * A description for security scheme. {@link https://spec.commonmark.org/ CommonMark syntax} MAY be used for rich text representation.\n   */\n  description?: string;\n} & (\n    | {\n        /**\n         * **REQUIRED**. The location of the API key. Valid values are \"query\", \"header\" or \"cookie\".\n         */\n        in: 'cookie' | 'header' | 'query';\n        /**\n         * **REQUIRED**. The name of the header, query or cookie parameter to be used.\n         */\n        name: string;\n        /**\n         * **REQUIRED**. The type of the security scheme. Valid values are `\"apiKey\"`, `\"http\"`, `\"mutualTLS\"`, `\"oauth2\"`, `\"openIdConnect\"`.\n         */\n        type: 'apiKey';\n      }\n    | {\n        /**\n         * A hint to the client to identify how the bearer token is formatted. Bearer tokens are usually generated by an authorization server, so this information is primarily for documentation purposes.\n         */\n        bearerFormat?: string;\n        /**\n         * **REQUIRED**. The name of the HTTP Authorization scheme to be used in the {@link https://tools.ietf.org/html/rfc7235#section-5.1 Authorization header as defined in RFC7235}. The values used SHOULD be registered in the {@link https://www.iana.org/assignments/http-authschemes/http-authschemes.xhtml IANA Authentication Scheme registry}.\n         */\n        scheme: string;\n        /**\n         * **REQUIRED**. The type of the security scheme. Valid values are `\"apiKey\"`, `\"http\"`, `\"mutualTLS\"`, `\"oauth2\"`, `\"openIdConnect\"`.\n         */\n        type: 'http';\n      }\n    | {\n        /**\n         * **REQUIRED**. The type of the security scheme. Valid values are `\"apiKey\"`, `\"http\"`, `\"mutualTLS\"`, `\"oauth2\"`, `\"openIdConnect\"`.\n         */\n        type: 'mutualTLS';\n      }\n    | {\n        /**\n         * **REQUIRED**. An object containing configuration information for the flow types supported.\n         */\n        flows: OAuthFlowsObject;\n        /**\n         * **REQUIRED**. The type of the security scheme. Valid values are `\"apiKey\"`, `\"http\"`, `\"mutualTLS\"`, `\"oauth2\"`, `\"openIdConnect\"`.\n         */\n        type: 'oauth2';\n      }\n    | {\n        /**\n         * **REQUIRED**. OpenId Connect URL to discover OAuth2 configuration values. This MUST be in the form of a URL. The OpenID Connect standard requires the use of TLS.\n         */\n        openIdConnectUrl: string;\n        /**\n         * **REQUIRED**. The type of the security scheme. Valid values are `\"apiKey\"`, `\"http\"`, `\"mutualTLS\"`, `\"oauth2\"`, `\"openIdConnect\"`.\n         */\n        type: 'openIdConnect';\n      }\n  );\n\n/**\n * An object representing a Server.\n *\n * This object MAY be extended with {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.0.md#specification-extensions Specification Extensions}.\n *\n * @example\n * ```yaml\n * url: https://development.gigantic-server.com/v1\n * description: Development server\n * ```\n */\nexport interface ServerObject extends SpecificationExtensions {\n  /**\n   * An optional string describing the host designated by the URL. {@link https://spec.commonmark.org/ CommonMark syntax} MAY be used for rich text representation.\n   */\n  description?: string;\n  /**\n   * **REQUIRED**. A URL to the target host. This URL supports Server Variables and MAY be relative, to indicate that the host location is relative to the location where the OpenAPI document is being served. Variable substitutions will be made when a variable is named in `{`brackets`}`.\n   */\n  url: string;\n  /**\n   * A map between a variable name and its value. The value is used for substitution in the server's URL template.\n   */\n  variables?: Record<string, ServerVariableObject>;\n}\n\n/**\n * An object representing a Server Variable for server URL template substitution.\n *\n * This object MAY be extended with {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.0.md#specification-extensions Specification Extensions}.\n */\nexport interface ServerVariableObject extends SpecificationExtensions {\n  /**\n   * **REQUIRED**. The default value to use for substitution, which SHALL be sent if an alternate value is _not_ supplied. Note this behavior is different than the {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.0.md#schema-object Schema Object's} treatment of default values, because in those cases parameter values are optional. If the {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.0.md#serverVariableEnum `enum`} is defined, the value MUST exist in the enum's values.\n   */\n  default: string;\n  /**\n   * An optional description for the server variable. {@link https://spec.commonmark.org/ CommonMark syntax} MAY be used for rich text representation.\n   */\n  description?: string;\n  /**\n   * An enumeration of string values to be used if the substitution options are from a limited set. The array MUST NOT be empty.\n   */\n  enum?: ReadonlyArray<string>;\n}\n\n/**\n * Adds metadata to a single tag that is used by the {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.0.md#operation-object Operation Object}. It is not mandatory to have a Tag Object per tag defined in the Operation Object instances.\n *\n * This object MAY be extended with {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.0.md#specification-extensions Specification Extensions}.\n *\n * @example\n * ```yaml\n * name: pet\n * description: Pets operations\n * ```\n */\nexport interface TagObject extends SpecificationExtensions {\n  /**\n   * A description for the tag. {@link https://spec.commonmark.org/ CommonMark syntax} MAY be used for rich text representation.\n   */\n  description?: string;\n  /**\n   * Additional external documentation for this tag.\n   */\n  externalDocs?: ExternalDocumentationObject;\n  /**\n   * **REQUIRED**. The name of the tag.\n   */\n  name: string;\n}\n\n/**\n * A metadata object that allows for more fine-tuned XML model definitions.\n *\n * When using arrays, XML element names are _not_ inferred (for singular/plural forms) and the `name` property SHOULD be used to add that information. See examples for expected behavior.\n *\n * This object MAY be extended with {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.0.md#specification-extensions Specification Extensions}.\n *\n * **XML Object Examples**\n *\n * The examples of the XML object definitions are included inside a property definition of a {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.0.md#schema-object Schema Object} with a sample of the XML representation of it.\n *\n * **No XML Element**\n *\n * Basic string property:\n *\n * ```yaml\n * animals:\n *   type: string\n * ```\n *\n * ```xml\n * <animals>...</animals>\n * ```\n *\n * Basic string array property ({@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.0.md#xmlWrapped `wrapped`} is `false` by default):\n *\n * ```yaml\n * animals:\n *   type: array\n *   items:\n *     type: string\n * ```\n *\n * ```xml\n * <animals>...</animals>\n * <animals>...</animals>\n * <animals>...</animals>\n * ```\n *\n * **XML Name Replacement**\n *\n * ```yaml\n * animals:\n *   type: string\n *   xml:\n *     name: animal\n * ```\n *\n * ```xml\n * <animal>...</animal>\n * ```\n *\n * **XML Attribute, Prefix and Namespace**\n *\n * In this example, a full model definition is shown.\n *\n * ```yaml\n * Person:\n *   type: object\n *   properties:\n *     id:\n *       type: integer\n *       format: int32\n *       xml:\n *         attribute: true\n *     name:\n *       type: string\n *       xml:\n *         namespace: https://example.com/schema/sample\n *         prefix: sample\n * ```\n *\n * ```xml\n * <Person id=\"123\">\n *   <sample:name xmlns:sample=\"https://example.com/schema/sample\">example</sample:name>\n * </Person>\n * ```\n *\n * **XML Arrays**\n *\n * Changing the element names:\n *\n * ```yaml\n * animals:\n *   type: array\n *   items:\n *     type: string\n *     xml:\n *       name: animal\n * ```\n *\n * ```xml\n * <animal>value</animal>\n * <animal>value</animal>\n * ```\n *\n * The external `name` property has no effect on the XML:\n *\n * ```yaml\n * animals:\n *   type: array\n *   items:\n *     type: string\n *     xml:\n *       name: animal\n *   xml:\n *     name: aliens\n * ```\n *\n * ```xml\n * <animal>value</animal>\n * <animal>value</animal>\n * ```\n *\n * Even when the array is wrapped, if a name is not explicitly defined, the same name will be used both internally and externally:\n *\n * ```yaml\n * animals:\n *   type: array\n *   items:\n *     type: string\n *   xml:\n *     wrapped: true\n * ```\n *\n * ```xml\n * <animals>\n *   <animals>value</animals>\n *   <animals>value</animals>\n * </animals>\n * ```\n *\n * To overcome the naming problem in the example above, the following definition can be used:\n *\n * ```yaml\n * animals:\n *   type: array\n *   items:\n *     type: string\n *     xml:\n *       name: animal\n *   xml:\n *     wrapped: true\n * ```\n *\n * ```xml\n * <animals>\n *   <animal>value</animal>\n *   <animal>value</animal>\n * </animals>\n * ```\n *\n * Affecting both internal and external names:\n *\n * ```yaml\n * animals:\n *   type: array\n *   items:\n *     type: string\n *     xml:\n *       name: animal\n *   xml:\n *     name: aliens\n *     wrapped: true\n * ```\n *\n * ```xml\n * <aliens>\n *   <animal>value</animal>\n *   <animal>value</animal>\n * </aliens>\n * ```\n *\n * If we change the external element but not the internal ones:\n *\n * ```yaml\n * animals:\n *   type: array\n *   items:\n *     type: string\n *   xml:\n *     name: aliens\n *     wrapped: true\n * ```\n *\n * ```xml\n * <aliens>\n *   <aliens>value</aliens>\n *   <aliens>value</aliens>\n * </aliens>\n * ```\n */\nexport interface XMLObject extends SpecificationExtensions {\n  /**\n   * Declares whether the property definition translates to an attribute instead of an element. Default value is `false`.\n   */\n  attribute?: boolean;\n  /**\n   * Replaces the name of the element/attribute used for the described schema property. When defined within `items`, it will affect the name of the individual XML elements within the list. When defined alongside `type` being `array` (outside the `items`), it will affect the wrapping element and only if `wrapped` is `true`. If `wrapped` is `false`, it will be ignored.\n   */\n  name?: string;\n  /**\n   * The URI of the namespace definition. This MUST be in the form of an absolute URI.\n   */\n  namespace?: string;\n  /**\n   * The prefix to be used for the {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.0.md#xmlName name}.\n   */\n  prefix?: string;\n  /**\n   * MAY be used only for an array definition. Signifies whether the array is wrapped (for example, `<books><book/><book/></books>`) or unwrapped (`<book/><book/>`). Default value is `false`. The definition takes effect only when defined alongside `type` being `array` (outside the `items`).\n   */\n  wrapped?: boolean;\n}\n"
  },
  {
    "path": "packages/shared/src/openApi/__tests__/index.test.ts",
    "content": "import { Logger } from '@hey-api/codegen-core';\n\nimport type { AnyConfig } from '../../config/shared';\nimport { Context } from '../../ir/context';\nimport { parseOpenApiSpec } from '..';\nimport { type OpenApiV3_0_X, parseV3_0_X } from '../3.0.x';\nimport { type OpenApiV3_1_X, parseV3_1_X } from '../3.1.x';\n\nvi.mock('../3.0.x', () => ({\n  parseV3_0_X: vi.fn(),\n}));\nvi.mock('../3.1.x', () => ({\n  parseV3_1_X: vi.fn(),\n}));\nvi.mock('../../utils/config', () => {\n  const config: Partial<AnyConfig> = {\n    logs: {\n      file: false,\n      level: 'silent',\n      path: '',\n    },\n    pluginOrder: [],\n  };\n  return {\n    getConfig: () => config,\n  };\n});\n\ndescribe('OpenAPI parser', () => {\n  afterEach(() => {\n    vi.restoreAllMocks();\n  });\n\n  it('handles OpenAPI 3.0.0', () => {\n    const spec: OpenApiV3_0_X = {\n      info: {\n        title: '',\n        version: '1',\n      },\n      openapi: '3.0.0',\n      paths: {},\n    };\n    const context = new Context({\n      config: {\n        input: [],\n        logs: {},\n        // @ts-expect-error\n        output: {\n          case: undefined,\n          entryFile: false,\n          path: '',\n        },\n        // @ts-expect-error\n        parser: {},\n        pluginOrder: [],\n        plugins: {},\n      },\n      dependencies: {},\n      logger: new Logger(),\n      spec,\n    });\n    parseOpenApiSpec(context);\n    expect(parseV3_0_X).toHaveBeenCalled();\n  });\n\n  it('handles OpenAPI 3.0.1', () => {\n    const spec: OpenApiV3_0_X = {\n      info: {\n        title: '',\n        version: '1',\n      },\n      openapi: '3.0.1',\n      paths: {},\n    };\n    const context = new Context({\n      config: {\n        input: [],\n        logs: {},\n        // @ts-expect-error\n        output: {\n          case: undefined,\n          entryFile: false,\n          path: '',\n        },\n        // @ts-expect-error\n        parser: {},\n        pluginOrder: [],\n        plugins: {},\n      },\n      dependencies: {},\n      logger: new Logger(),\n      spec,\n    });\n    parseOpenApiSpec(context);\n    expect(parseV3_0_X).toHaveBeenCalled();\n  });\n\n  it('handles OpenAPI 3.0.2', () => {\n    const spec: OpenApiV3_0_X = {\n      info: {\n        title: '',\n        version: '1',\n      },\n      openapi: '3.0.2',\n      paths: {},\n    };\n    const context = new Context({\n      config: {\n        input: [],\n        logs: {},\n        // @ts-expect-error\n        output: {\n          case: undefined,\n          entryFile: false,\n          path: '',\n        },\n        // @ts-expect-error\n        parser: {},\n        pluginOrder: [],\n        plugins: {},\n      },\n      dependencies: {},\n      logger: new Logger(),\n      spec,\n    });\n    parseOpenApiSpec(context);\n    expect(parseV3_0_X).toHaveBeenCalled();\n  });\n\n  it('handles OpenAPI 3.0.3', () => {\n    const spec: OpenApiV3_0_X = {\n      info: {\n        title: '',\n        version: '1',\n      },\n      openapi: '3.0.3',\n      paths: {},\n    };\n    const context = new Context({\n      config: {\n        input: [],\n        logs: {},\n        // @ts-expect-error\n        output: {\n          case: undefined,\n          entryFile: false,\n          path: '',\n        },\n        // @ts-expect-error\n        parser: {},\n        pluginOrder: [],\n        plugins: {},\n      },\n      dependencies: {},\n      logger: new Logger(),\n      spec,\n    });\n    parseOpenApiSpec(context);\n    expect(parseV3_0_X).toHaveBeenCalled();\n  });\n\n  it('handles OpenAPI 3.0.4', () => {\n    const spec: OpenApiV3_0_X = {\n      info: {\n        title: '',\n        version: '1',\n      },\n      openapi: '3.0.4',\n      paths: {},\n    };\n    const context = new Context({\n      config: {\n        input: [],\n        logs: {},\n        // @ts-expect-error\n        output: {\n          case: undefined,\n          entryFile: false,\n          path: '',\n        },\n        // @ts-expect-error\n        parser: {},\n        pluginOrder: [],\n        plugins: {},\n      },\n      dependencies: {},\n      logger: new Logger(),\n      spec,\n    });\n    parseOpenApiSpec(context);\n    expect(parseV3_0_X).toHaveBeenCalled();\n  });\n\n  it('handles OpenAPI 3.1.0', () => {\n    const spec: OpenApiV3_1_X = {\n      info: {\n        title: '',\n        version: '1',\n      },\n      openapi: '3.1.0',\n    };\n    const context = new Context({\n      config: {\n        input: [],\n        logs: {},\n        // @ts-expect-error\n        output: {\n          case: undefined,\n          entryFile: false,\n          path: '',\n        },\n        // @ts-expect-error\n        parser: {},\n        pluginOrder: [],\n        plugins: {},\n      },\n      dependencies: {},\n      logger: new Logger(),\n      spec,\n    });\n    parseOpenApiSpec(context);\n    expect(parseV3_1_X).toHaveBeenCalled();\n  });\n\n  it('handles OpenAPI 3.1.1', () => {\n    const spec: OpenApiV3_1_X = {\n      info: {\n        title: '',\n        version: '1',\n      },\n      openapi: '3.1.1',\n    };\n    const context = new Context({\n      config: {\n        input: [],\n        logs: {},\n        // @ts-expect-error\n        output: {\n          case: undefined,\n          entryFile: false,\n          path: '',\n        },\n        // @ts-expect-error\n        parser: {},\n        pluginOrder: [],\n        plugins: {},\n      },\n      dependencies: {},\n      logger: new Logger(),\n      spec,\n    });\n    parseOpenApiSpec(context);\n    expect(parseV3_1_X).toHaveBeenCalled();\n  });\n});\n"
  },
  {
    "path": "packages/shared/src/openApi/__tests__/utils.ts",
    "content": "import fs from 'node:fs';\nimport path from 'node:path';\n\nimport yaml from 'yaml';\n\nexport const getSpecsPath = (): string =>\n  path.join(__dirname, '..', '..', '..', '..', '..', 'specs');\n\nexport const specFileToJson = (file: string) => {\n  const raw = fs.readFileSync(file, 'utf8');\n  const ext = path.extname(file).toLowerCase();\n  return ext === '.json' ? JSON.parse(raw) : yaml.parse(raw);\n};\n"
  },
  {
    "path": "packages/shared/src/openApi/index.ts",
    "content": "import { satisfies } from '../config/utils/dependencies';\nimport type { Context } from '../ir/context';\nimport { parseV2_0_X } from './2.0.x';\nimport { parseV3_0_X } from './3.0.x';\nimport { parseV3_1_X } from './3.1.x';\nimport type { OpenApi } from './types';\n\n/**\n * @internal\n * Parse the resolved OpenAPI specification. This will populate and return\n * `context` with intermediate representation obtained from the parsed spec.\n */\nexport function parseOpenApiSpec(context: Context): Context {\n  if ('swagger' in context.spec) {\n    parseV2_0_X(context as Context<OpenApi.V2_0_X>);\n    return context;\n  }\n\n  if (satisfies(context.spec.openapi, '>=3.0.0 <3.1.0')) {\n    parseV3_0_X(context as Context<OpenApi.V3_0_X>);\n    return context;\n  }\n\n  if (satisfies(context.spec.openapi, '>=3.1.0')) {\n    parseV3_1_X(context as Context<OpenApi.V3_1_X>);\n    return context;\n  }\n\n  throw new Error('Unsupported OpenAPI specification');\n}\n"
  },
  {
    "path": "packages/shared/src/openApi/shared/graph/meta.ts",
    "content": "import type { Logger } from '@hey-api/codegen-core';\n\nimport type { Graph } from '../../../graph';\nimport { createOperationKey } from '../../../ir/operation';\nimport { jsonPointerToPath } from '../../../utils/ref';\nimport { addNamespace, stringToNamespace } from '../utils/filter';\nimport { httpMethods } from '../utils/operation';\n\nexport type ResourceMetadata = {\n  operations: Map<\n    string,\n    {\n      dependencies: Set<string>;\n      deprecated: boolean;\n      tags: Set<string>;\n    }\n  >;\n  parameters: Map<\n    string,\n    {\n      dependencies: Set<string>;\n      deprecated: boolean;\n    }\n  >;\n  requestBodies: Map<\n    string,\n    {\n      dependencies: Set<string>;\n      deprecated: boolean;\n    }\n  >;\n  responses: Map<\n    string,\n    {\n      dependencies: Set<string>;\n      deprecated: boolean;\n    }\n  >;\n  schemas: Map<\n    string,\n    {\n      dependencies: Set<string>;\n      deprecated: boolean;\n    }\n  >;\n};\n\n/**\n * Builds a resource metadata map from a Graph, matching the old Graph interface\n * for compatibility with filtering code.\n */\nexport const buildResourceMetadata = (\n  graph: Graph,\n  logger: Logger,\n): {\n  resourceMetadata: ResourceMetadata;\n} => {\n  const eventBuildResourceMetadata = logger.timeEvent('build-resource-metadata');\n  const resourceMetadata: ResourceMetadata = {\n    operations: new Map(),\n    parameters: new Map(),\n    requestBodies: new Map(),\n    responses: new Map(),\n    schemas: new Map(),\n  };\n\n  const getDependencies = (pointer: string): Set<string> => {\n    const dependencies = new Set<string>();\n    const nodeDependencies = graph.transitiveDependencies.get(pointer);\n    if (nodeDependencies?.size) {\n      for (const dependency of nodeDependencies) {\n        const path = jsonPointerToPath(dependency);\n        const type = path[path.length - 2];\n        const name = path[path.length - 1];\n        if (type && name) {\n          const namespace = stringToNamespace(type);\n          if (namespace === 'unknown') {\n            console.warn(`unsupported type: ${type}`);\n          }\n          dependencies.add(addNamespace(namespace, name));\n        }\n      }\n    }\n    return dependencies;\n  };\n\n  // Process each node to find top-level resources\n  for (const [pointer, nodeInfo] of graph.nodes) {\n    // const node = nodeInfo.node as Record<string, unknown>;\n    const path = jsonPointerToPath(pointer);\n\n    // OpenAPI 3.x\n    if (path[0] === 'components') {\n      if (path.length === 3) {\n        if (path[1] === 'schemas') {\n          // Schema: #/components/schemas/{name}\n          const name = path[path.length - 1]!;\n          resourceMetadata.schemas.set(addNamespace('schema', name), {\n            dependencies: getDependencies(pointer),\n            deprecated: nodeInfo.deprecated ?? false,\n          });\n        } else if (path[1] === 'parameters') {\n          // Parameter: #/components/parameters/{name}\n          const name = path[path.length - 1]!;\n          resourceMetadata.parameters.set(addNamespace('parameter', name), {\n            dependencies: getDependencies(pointer),\n            deprecated: nodeInfo.deprecated ?? false,\n          });\n        } else if (path[1] === 'requestBodies') {\n          // RequestBody: #/components/requestBodies/{name}\n          const name = path[path.length - 1]!;\n          resourceMetadata.requestBodies.set(addNamespace('body', name), {\n            dependencies: getDependencies(pointer),\n            deprecated: nodeInfo.deprecated ?? false,\n          });\n        } else if (path[1] === 'responses') {\n          // Response: #/components/responses/{name}\n          const name = path[path.length - 1]!;\n          resourceMetadata.responses.set(addNamespace('response', name), {\n            dependencies: getDependencies(pointer),\n            deprecated: nodeInfo.deprecated ?? false,\n          });\n        }\n      }\n      continue;\n    }\n\n    if (path[0] === 'paths') {\n      if (path.length === 3 && httpMethods.includes(path[2] as (typeof httpMethods)[number])) {\n        // Operation: #/paths/{path}/{method}\n        const method = path[path.length - 1]!;\n        const operationPath = path.slice(1, -1).join('/');\n        const operationKey = createOperationKey({\n          method,\n          path: operationPath,\n        });\n        resourceMetadata.operations.set(addNamespace('operation', operationKey), {\n          dependencies: getDependencies(pointer),\n          deprecated: nodeInfo.deprecated ?? false,\n          tags: nodeInfo.tags ?? new Set(),\n        });\n      }\n      continue;\n    }\n\n    // OpenAPI 2.0\n    if (path[0] === 'definitions') {\n      if (path.length === 2) {\n        // Schema: #/definitions/{name}\n        const name = path[path.length - 1]!;\n        resourceMetadata.schemas.set(addNamespace('schema', name), {\n          dependencies: getDependencies(pointer),\n          deprecated: nodeInfo.deprecated ?? false,\n        });\n      }\n      continue;\n    }\n  }\n\n  eventBuildResourceMetadata.timeEnd();\n  return { resourceMetadata };\n};\n"
  },
  {
    "path": "packages/shared/src/openApi/shared/locations/index.ts",
    "content": "export type {\n  OperationPathStrategy,\n  OperationsStrategy,\n  OperationStructureStrategy,\n} from './operation';\nexport { OperationPath, OperationStrategy } from './operation';\n"
  },
  {
    "path": "packages/shared/src/openApi/shared/locations/operation.ts",
    "content": "import type { StructureLocation } from '@hey-api/codegen-core';\n\nimport type { IR } from '../../../ir/types';\n\n/**\n * A function that derives path segments from an operation.\n *\n * Used by location strategies to build paths within containers.\n */\nexport type OperationPathStrategy = (operation: IR.OperationObject) => ReadonlyArray<string>;\n\n/**\n * A function that determines where an operation appears in the structure.\n *\n * Returns one or more locations, each with a full path.\n */\nexport type OperationStructureStrategy = (\n  operation: IR.OperationObject,\n) => ReadonlyArray<StructureLocation['path']>;\n\nexport type OperationsStrategy = 'byTags' | 'flat' | 'single' | OperationStructureStrategy;\n\n/**\n * Built-in strategies for operations.\n */\nexport const OperationStrategy = {\n  /**\n   * Creates one root container per operation tag.\n   *\n   * Operations with multiple tags appear in multiple root containers.\n   * Operations without tags use the fallback root container.\n   *\n   * @example\n   * // Operation with tags: ['users', 'admin']\n   * // Path function returns: ['list']\n   * // Result: [{ path: ['users', 'list'], shell }, { path: ['admin', 'list'], shell }]\n   */\n  byTags:\n    (config: {\n      /**\n       * Root name for operations without tags.\n       */\n      fallback: string;\n      /**\n       * Derives path segments from the operation.\n       *\n       * @default OperationPath.id()\n       */\n      path?: OperationPathStrategy;\n    }): OperationStructureStrategy =>\n    (operation) => {\n      const tags = operation.tags && operation.tags.length > 0 ? operation.tags : [config.fallback];\n      const path = config.path ?? OperationPath.id();\n      const pathSegments = path(operation);\n      return tags.map((tag) => [tag, ...pathSegments]);\n    },\n\n  /**\n   * Creates flat functions without any container.\n   *\n   * Each operation becomes a standalone function at the root level.\n   * No shell is applied.\n   *\n   * @example\n   * // Operation id: 'getUsers'\n   * // Result: [{ path: ['getUsers'] }]\n   */\n  flat:\n    (config?: {\n      /**\n       * Derives path segments within the root from the operation.\n       *\n       * @default OperationPath.id()\n       */\n      path?: OperationPathStrategy;\n    }): OperationStructureStrategy =>\n    (operation) => {\n      const path = config?.path ?? OperationPath.id();\n      const pathSegments = path(operation);\n      return [[pathSegments[pathSegments.length - 1]!]];\n    },\n\n  /**\n   * Places all operations under a single root container.\n   *\n   * @example\n   * // Root: 'Sdk', path function returns: ['users', 'list']\n   * // Result: [{ path: ['Sdk', 'users', 'list'], shell }]\n   */\n  single:\n    (config: {\n      /**\n       * Derives path segments within the root from the operation.\n       *\n       * @default OperationPath.id()\n       */\n      path?: OperationPathStrategy;\n      /**\n       * Name of the container.\n       */\n      root: string;\n    }): OperationStructureStrategy =>\n    (operation) => {\n      const path = config.path ?? OperationPath.id();\n      const pathSegments = path(operation);\n      return [[config.root, ...pathSegments]];\n    },\n};\n\n/**\n * Built-in path derivation helpers for operations.\n */\nexport const OperationPath = {\n  /**\n   * Splits operationId by delimiters to create nested paths.\n   *\n   * @example\n   * // operationId: 'users.accounts.list'\n   * // Result: ['users', 'accounts', 'list']\n   *\n   * @example\n   * // operationId: 'users/accounts/getAll'\n   * // Result: ['users', 'accounts', 'getAll']\n   */\n  fromOperationId:\n    (config?: {\n      /**\n       * Pattern to split operationId.\n       *\n       * @default /[./]/\n       */\n      delimiters?: RegExp;\n      /**\n       * Fallback strategy if operationId is missing.\n       *\n       * @default OperationPath.id()\n       */\n      fallback?: OperationPathStrategy;\n    }): OperationPathStrategy =>\n    (operation) => {\n      const fallback = config?.fallback ?? OperationPath.id();\n      if (!operation.operationId) return fallback(operation);\n      const delimiters = config?.delimiters ?? /[./]/;\n      const segments = operation.operationId.split(delimiters).filter(Boolean);\n      return segments.length === 0 ? fallback(operation) : segments;\n    },\n\n  /**\n   * Splits path by delimiters to create nested paths.\n   *\n   * Can include the method as a prefix or suffix segment.\n   *\n   * @example\n   * // path: '/users/{id}/accounts', method: 'get', delimiters: /[\\/{}]+/, methodPosition: 'none'\n   * // Result: ['users', 'id', 'accounts']\n   *\n   * @example\n   * // path: '/users/{id}/accounts', method: 'get', delimiters: /[\\/{}]+/, methodPosition: 'prefix'\n   * // Result: ['get', 'users', 'id', 'accounts']\n   *\n   * @example\n   * // path: '/users/{id}/accounts', method: 'get', delimiters: /[\\/{}]+/, methodPosition: 'suffix'\n   * // Result: ['users', 'id', 'accounts', 'get']\n   */\n  fromPath:\n    (config?: {\n      /**\n       * Pattern to split the path.\n       *\n       * @default /[./]/\n       */\n      delimiters?: RegExp;\n      /**\n       * Position of the method segment.\n       *\n       * @default 'none'\n       */\n      methodPosition?: 'prefix' | 'suffix';\n    }): OperationPathStrategy =>\n    (operation) => {\n      const delimiters = config?.delimiters ?? /[./]/;\n      const segments = operation.path.split(delimiters).filter(Boolean);\n      switch (config?.methodPosition) {\n        case 'prefix':\n          segments.unshift(operation.method.toLowerCase());\n          break;\n        case 'suffix':\n          segments.push(operation.method.toLowerCase());\n          break;\n        default:\n          break;\n      }\n      return segments;\n    },\n\n  /**\n   * Uses operation.id as a single path segment.\n   *\n   * @example\n   * // operation.id: 'getUserById'\n   * // Result: ['getUserById']\n   */\n  id: (): OperationPathStrategy => (operation) => [operation.id],\n};\n"
  },
  {
    "path": "packages/shared/src/openApi/shared/transforms/enums.ts",
    "content": "import type { Parser } from '../../../config/parser/types';\nimport { applyNaming } from '../../../utils/naming/naming';\nimport { jsonPointerToPath } from '../../../utils/ref';\nimport { deepClone } from '../utils/schema';\nimport { childSchemaRelationships } from '../utils/schemaChildRelationships';\nimport { getSchemasObject } from '../utils/transforms';\nimport { getUniqueComponentName, isPathRootSchema, specToSchemasPointerNamespace } from './utils';\n\ntype EnumsConfig = Parser['transforms']['enums'];\n\n/**\n * Generate a unique, structural signature for an enum schema for deduplication.\n * Only considers 'type' and sorted 'enum' values, ignoring other fields.\n *\n * @param schema - The schema object to analyze\n * @returns A string signature if the schema is an enum, otherwise undefined\n */\nconst getEnumSignature = (schema: unknown): string | undefined => {\n  if (\n    !schema ||\n    typeof schema !== 'object' ||\n    !('enum' in schema) ||\n    !(schema.enum instanceof Array)\n  ) {\n    return;\n  }\n  // Use type + sorted enum values for signature\n  const type = ('type' in schema ? schema.type : undefined) || '';\n  const values = [...schema.enum].sort();\n  return JSON.stringify({ type, values });\n};\n\ntype NodeInfo = {\n  key: string | number | null;\n  node: unknown;\n  parent: unknown;\n  path: ReadonlyArray<string | number>;\n};\n\n/**\n * Recursively walk all schemas in the OpenAPI spec, visiting every object/array\n * that could contain an enum. Calls the visitor with node info for each.\n *\n * @param key - The key of the current node\n * @param node - The current node\n * @param parent - The parent node\n * @param path - The path to the current node\n * @param visitor - Function to call for each visited node\n */\nconst walkSchemas = ({\n  key,\n  node,\n  parent,\n  path,\n  visitor,\n}: NodeInfo & {\n  visitor: (nodeInfo: NodeInfo) => void;\n}) => {\n  if (!node || typeof node !== 'object' || node instanceof Array) return;\n\n  const value = node as Record<string, unknown>;\n\n  if (\n    'type' in value ||\n    'enum' in value ||\n    childSchemaRelationships.some(([keyword]) => keyword in value)\n  ) {\n    visitor({ key, node, parent, path });\n  }\n\n  for (const [k, v] of Object.entries(value)) {\n    if (typeof v === 'object' && v !== null) {\n      if (v instanceof Array) {\n        v.forEach((item, index) =>\n          walkSchemas({\n            key: index,\n            node: item,\n            parent: v,\n            path: [...path, k, index],\n            visitor,\n          }),\n        );\n      } else {\n        walkSchemas({\n          key: k,\n          node: v,\n          parent: node,\n          path: [...path, k],\n          visitor,\n        });\n      }\n    }\n  }\n};\n\n/**\n * Inlines all root/top-level enums by replacing $refs to them with the actual enum schema,\n * and then removes the now-unreferenced root enums from the schemas object.\n *\n * @param spec - The OpenAPI spec object to transform\n */\nconst inlineMode = ({ spec }: { spec: unknown }) => {\n  const schemasObj = getSchemasObject(spec);\n  if (!schemasObj) {\n    return;\n  }\n\n  const schemasPointerNamespace = specToSchemasPointerNamespace(spec);\n\n  // Collect all root enums\n  const rootEnums: Record<string, unknown> = {};\n  for (const [name, schema] of Object.entries(schemasObj)) {\n    const signature = getEnumSignature(schema);\n    if (signature) {\n      rootEnums[`${schemasPointerNamespace}${name}`] = schema;\n    }\n  }\n\n  // Walk the spec and replace $refs to root enums with inline enum schemas\n  const replaceEnumRefs = (node: unknown) => {\n    if (node instanceof Array) {\n      node.forEach(replaceEnumRefs);\n    } else if (node && typeof node === 'object') {\n      for (const [k, v] of Object.entries(node)) {\n        if (k === '$ref' && typeof v === 'string' && v in rootEnums) {\n          // Replace $ref with a deep clone of the enum schema\n          Object.assign(node, deepClone(rootEnums[v]));\n          delete (node as Record<string, unknown>)['$ref'];\n        } else {\n          replaceEnumRefs(v);\n        }\n      }\n    }\n  };\n  replaceEnumRefs(spec);\n\n  // Remove unreferenced root enums\n  for (const pointer of Object.keys(rootEnums)) {\n    const path = jsonPointerToPath(pointer);\n    const name = path[path.length - 1]!;\n    if (name) {\n      delete schemasObj[name];\n    }\n  }\n};\n\n/**\n * Promotes all inline enums to reusable root components (if mode is 'root'),\n * deduplicates by signature, and replaces inline enums with $refs.\n *\n * Naming, casing, and deduplication are controlled by the enums transform config.\n * Existing root enums are reused if structurally identical.\n *\n * @param spec - The OpenAPI spec object to transform\n * @param config - The enums transform config\n */\nconst rootMode = ({ config, spec }: { config: EnumsConfig; spec: unknown }) => {\n  const schemasObj = getSchemasObject(spec);\n  if (!schemasObj) {\n    return;\n  }\n\n  // Build a map of existing root enum signatures to their names for deduplication\n  const rootEnumSignatures: Record<string, string> = {};\n  for (const [name, schema] of Object.entries(schemasObj)) {\n    const signature = getEnumSignature(schema);\n    if (signature) {\n      rootEnumSignatures[signature] = name;\n    }\n  }\n\n  // Collect all inline enums (not at root schemas)\n  const inlineEnums: Array<{\n    key: string | number | null;\n    node: unknown;\n    parent: unknown;\n    path: ReadonlyArray<string | number>;\n    signature: string;\n  }> = [];\n\n  walkSchemas({\n    key: null,\n    node: spec,\n    parent: null,\n    path: [],\n    visitor: (nodeInfo) => {\n      if (!isPathRootSchema(nodeInfo.path)) {\n        const signature = getEnumSignature(nodeInfo.node);\n        if (signature) {\n          inlineEnums.push({ ...nodeInfo, signature });\n        }\n      }\n    },\n  });\n\n  // Deduplicate and assign unique names for promoted enums\n  const signatureToName: Record<string, string | undefined> = {};\n  const signatureToSchema: Record<string, unknown> = {};\n\n  for (const { key, node, signature } of inlineEnums) {\n    if (signature in signatureToName) {\n      // Already handled\n      continue;\n    }\n\n    // Use existing root enum if available\n    if (signature in rootEnumSignatures) {\n      signatureToName[signature] = rootEnumSignatures[signature];\n      continue;\n    }\n\n    // Generate a unique name for the new root enum using config\n    const base = applyNaming(\n      typeof node === 'object' && node && 'title' in node && typeof node.title === 'string'\n        ? node.title\n        : String(key),\n      config,\n    );\n    const name = getUniqueComponentName({\n      base,\n      components: schemasObj,\n      extraComponents: Object.values(signatureToName),\n    });\n    signatureToName[signature] = name;\n    signatureToSchema[signature] = node;\n  }\n\n  // Add new root enums to the schemas object\n  for (const [signature, name] of Object.entries(signatureToName)) {\n    // Only add if not already present\n    const schema = signatureToSchema[signature];\n    if (name && !(name in schemasObj) && schema && typeof schema === 'object') {\n      schemasObj[name] = schema;\n    }\n  }\n\n  // Replace inline enums with $ref to the new root enum\n  const schemasPointerNamespace = specToSchemasPointerNamespace(spec);\n  for (const { key, parent, signature } of inlineEnums) {\n    const name = signatureToName[signature];\n    if (name && key != null && parent && typeof parent === 'object') {\n      (parent as Record<string, unknown>)[key] = {\n        $ref: `${schemasPointerNamespace}${name}`,\n      };\n    }\n  }\n};\n\n/**\n * Applies the enums transform according to the configured mode ('inline' or 'root').\n *\n * - In 'inline' mode, all root enums are inlined and removed.\n * - In 'root' mode, all inline enums are promoted to root components and deduplicated.\n *\n * @param config - The enums transform config\n * @param spec - The OpenAPI spec object to transform\n */\nexport const enumsTransform = ({ config, spec }: { config: EnumsConfig; spec: unknown }) => {\n  if (config.mode === 'inline') {\n    inlineMode({ spec });\n    return;\n  }\n\n  if (config.mode === 'root') {\n    rootMode({ config, spec });\n    return;\n  }\n};\n"
  },
  {
    "path": "packages/shared/src/openApi/shared/transforms/index.ts",
    "content": "import type { Context } from '../../../ir/context';\nimport { enumsTransform } from './enums';\nimport { propertiesRequiredByDefaultTransform } from './propertiesRequiredByDefault';\nimport { readWriteTransform } from './readWrite';\nimport { schemaNameTransform } from './schemas';\n\nexport const transformOpenApiSpec = ({ context }: { context: Context }) => {\n  const { logger } = context;\n  const eventTransformOpenApiSpec = logger.timeEvent('transform-openapi-spec');\n\n  if (context.config.parser.transforms.schemaName) {\n    schemaNameTransform({\n      config: context.config.parser.transforms.schemaName,\n      spec: context.spec,\n    });\n  }\n\n  if (context.config.parser.transforms.enums.enabled) {\n    enumsTransform({\n      config: context.config.parser.transforms.enums,\n      spec: context.spec,\n    });\n  }\n\n  if (context.config.parser.transforms.propertiesRequiredByDefault) {\n    propertiesRequiredByDefaultTransform({ spec: context.spec });\n  }\n\n  if (context.config.parser.transforms.readWrite.enabled) {\n    readWriteTransform({\n      config: context.config.parser.transforms.readWrite,\n      logger,\n      spec: context.spec,\n    });\n  }\n  eventTransformOpenApiSpec.timeEnd();\n};\n"
  },
  {
    "path": "packages/shared/src/openApi/shared/transforms/propertiesRequiredByDefault.ts",
    "content": "import { childSchemaRelationships } from '../utils/schemaChildRelationships';\n\ntype NodeInfo = {\n  key: string | number | null;\n  node: unknown;\n  parent: unknown;\n  path: ReadonlyArray<string | number>;\n};\n\n/**\n * Recursively walk all schemas in the OpenAPI spec, visiting every object.\n * Calls the visitor with node info for each.\n *\n * @param key - The key of the current node\n * @param node - The current node\n * @param parent - The parent node\n * @param path - The path to the current node\n * @param visitor - Function to call for each visited node\n */\nconst walkSchemas = ({\n  key,\n  node,\n  parent,\n  path,\n  visitor,\n}: NodeInfo & {\n  visitor: (nodeInfo: NodeInfo) => void;\n}) => {\n  if (!node || typeof node !== 'object' || node instanceof Array) return;\n\n  const value = node as Record<string, unknown>;\n\n  if ('type' in value || childSchemaRelationships.some(([keyword]) => keyword in value)) {\n    visitor({ key, node, parent, path });\n  }\n\n  for (const [k, v] of Object.entries(value)) {\n    if (typeof v === 'object' && v !== null) {\n      if (v instanceof Array) {\n        v.forEach((item, index) =>\n          walkSchemas({\n            key: index,\n            node: item,\n            parent: v,\n            path: [...path, k, index],\n            visitor,\n          }),\n        );\n      } else {\n        walkSchemas({\n          key: k,\n          node: v,\n          parent: node,\n          path: [...path, k],\n          visitor,\n        });\n      }\n    }\n  }\n};\n\n/**\n * Applies the properties required by default transform\n *\n * @param spec - The OpenAPI spec object to transform\n */\nexport const propertiesRequiredByDefaultTransform = ({ spec }: { spec: unknown }) => {\n  walkSchemas({\n    key: null,\n    node: spec,\n    parent: null,\n    path: [],\n    visitor: (nodeInfo) => {\n      if (\n        nodeInfo.node &&\n        typeof nodeInfo.node === 'object' &&\n        'type' in nodeInfo.node &&\n        nodeInfo.node.type === 'object' &&\n        'properties' in nodeInfo.node &&\n        nodeInfo.node.properties &&\n        typeof nodeInfo.node.properties === 'object' &&\n        !('required' in nodeInfo.node)\n      ) {\n        const propKeys = Object.keys(nodeInfo.node.properties as Record<string, unknown>);\n        if (propKeys.length > 0) {\n          (nodeInfo.node as Record<string, unknown>).required = propKeys;\n        }\n      }\n    },\n  });\n};\n"
  },
  {
    "path": "packages/shared/src/openApi/shared/transforms/readWrite.ts",
    "content": "import type { Logger } from '@hey-api/codegen-core';\n\nimport type { Parser } from '../../../config/parser/types';\nimport type { Graph } from '../../../graph';\nimport { applyNaming } from '../../../utils/naming/naming';\nimport { jsonPointerToPath } from '../../../utils/ref';\nimport deepEqual from '../utils/deepEqual';\nimport { buildGraph, type Scope } from '../utils/graph';\nimport { deepClone } from '../utils/schema';\nimport { childSchemaRelationships } from '../utils/schemaChildRelationships';\nimport {\n  getSchemasObject,\n  hasComponentsSchemasObject,\n  hasDefinitionsObject,\n} from '../utils/transforms';\nimport { getUniqueComponentName, isPathRootSchema, specToSchemasPointerNamespace } from './utils';\n\ntype OriginalSchemas = Record<string, unknown>;\n\ntype SplitMapping = Record<\n  string,\n  {\n    read?: string;\n    write?: string;\n  }\n>;\n\ntype SplitSchemas = {\n  /** Key is the original schema pointer. */\n  mapping: SplitMapping;\n  /** splitPointer -> originalPointer */\n  reverseMapping: Record<string, string>;\n  /** name -> schema object */\n  schemas: Record<string, unknown>;\n};\n\ntype ReadWriteConfig = Parser['transforms']['readWrite'];\n\nconst schemaKeys = new Set([\n  'additionalProperties',\n  'allOf',\n  'anyOf',\n  'items',\n  'not',\n  'oneOf',\n  'patternProperties',\n  'properties',\n  'schema',\n  'unevaluatedProperties',\n]);\n\nconst getComponentContext = (path: ReadonlyArray<string | number>): Scope | undefined => {\n  // OpenAPI 3.x: #/components/{type}/{name}\n  if (path.length === 3 && path[0] === 'components') {\n    const type = path[1];\n    if (type === 'parameters') return 'write';\n    if (type === 'requestBodies') return 'write';\n    if (type === 'responses') return 'read';\n    if (type === 'headers') return 'read';\n  }\n  // OpenAPI 2.x: #/parameters/{name}, #/responses/{name}\n  if (path.length === 2) {\n    const type = path[0];\n    if (type === 'parameters') return 'write';\n    if (type === 'responses') return 'read';\n  }\n  return;\n};\n\n/**\n * Capture the original schema objects by pointer before splitting.\n * This is used to safely remove only the true originals after splitting,\n * even if names are swapped or overwritten by split variants.\n */\nconst captureOriginalSchemas = (spec: unknown, logger: Logger): OriginalSchemas => {\n  const event = logger.timeEvent('capture-original-schemas');\n  const originals: OriginalSchemas = {};\n  if (hasComponentsSchemasObject(spec)) {\n    for (const [name, obj] of Object.entries((spec as any).components.schemas)) {\n      originals[`#/components/schemas/${name}`] = obj;\n    }\n  } else if (hasDefinitionsObject(spec)) {\n    for (const [name, obj] of Object.entries((spec as any).definitions)) {\n      originals[`#/definitions/${name}`] = obj;\n    }\n  }\n  event.timeEnd();\n  return originals;\n};\n\n/**\n * Inserts split schemas into the spec at the correct location (OpenAPI 3.x or 2.0).\n * This function is robust to spec version and will assign all split schemas\n * to either components.schemas (OAS3) or definitions (OAS2).\n *\n * @param spec - The OpenAPI spec object\n * @param split - The split schemas (from splitSchemas)\n */\nconst insertSplitSchemasIntoSpec = ({\n  logger,\n  spec,\n  split,\n}: {\n  logger: Logger;\n  spec: unknown;\n  split: Pick<SplitSchemas, 'schemas'>;\n}) => {\n  const event = logger.timeEvent('insert-split-schemas-into-spec');\n  if (hasComponentsSchemasObject(spec)) {\n    Object.assign((spec as any).components.schemas, split.schemas);\n  } else if (hasDefinitionsObject(spec)) {\n    Object.assign((spec as any).definitions, split.schemas);\n  }\n  event.timeEnd();\n};\n\n/**\n * Prunes a schema by removing all child schemas (in any structural keyword)\n * that are marked with the given scope (readOnly/writeOnly), or that are $ref to a schema\n * that is exclusively the excluded scope (according to the graph).\n *\n * Uses childSchemaRelationships for parity with graph traversal.\n * Returns true if the schema itself should be removed from its parent.\n *\n * @param graph - The Graph containing all nodes and their scopes\n * @param schema - The schema object to prune\n * @param scope - The scope to exclude ('readOnly' or 'writeOnly')\n * @returns boolean - Whether the schema should be removed from its parent\n */\nconst pruneSchemaByScope = (\n  graph: Graph,\n  schema: unknown,\n  scope: 'readOnly' | 'writeOnly',\n): boolean => {\n  if (schema && typeof schema === 'object') {\n    // Handle $ref schemas\n    if ('$ref' in schema && typeof schema.$ref === 'string') {\n      const nodeInfo = graph.nodes.get(schema.$ref);\n      if (nodeInfo?.scopes) {\n        // Only remove $ref if the referenced schema is *exclusively* the excluded scope.\n        // This ensures 'normal' or multi-scope schemas are always kept.\n        if (\n          (scope === 'writeOnly' && nodeInfo.scopes.size === 1 && nodeInfo.scopes.has('write')) ||\n          (scope === 'readOnly' && nodeInfo.scopes.size === 1 && nodeInfo.scopes.has('read'))\n        ) {\n          delete (schema as Record<string, unknown>)['$ref'];\n          // If the schema is now empty, remove it\n          if (!childSchemaRelationships.some(([keyword]) => keyword in schema)) {\n            return true;\n          }\n        }\n      }\n    }\n    // Recursively prune all child schemas according to childSchemaRelationships\n    for (const [keyword, type] of childSchemaRelationships) {\n      if (!(keyword in schema)) {\n        continue;\n      }\n      const value = (schema as Record<string, unknown>)[keyword];\n      if (type === 'array' && value instanceof Array) {\n        for (let index = value.length - 1; index >= 0; index--) {\n          const item = value[index];\n          if (\n            item &&\n            typeof item === 'object' &&\n            (item as Record<string, unknown>)[scope] === true\n          ) {\n            value.splice(index, 1);\n          } else {\n            const shouldRemove = pruneSchemaByScope(graph, item, scope);\n            if (shouldRemove) value.splice(index, 1);\n          }\n        }\n        if (!value.length) {\n          delete (schema as Record<string, unknown>)[keyword];\n        }\n      } else if (\n        type === 'objectMap' &&\n        typeof value === 'object' &&\n        value !== null &&\n        !(value instanceof Array)\n      ) {\n        const objMap = value as Record<string, unknown>;\n        // Track removed properties for object schemas to update required array\n        const removedProperties = new Set<string>();\n\n        for (const key of Object.keys(objMap)) {\n          const prop = objMap[key];\n          if (\n            prop &&\n            typeof prop === 'object' &&\n            (prop as Record<string, unknown>)[scope] === true\n          ) {\n            delete objMap[key];\n            // Track removed properties for object schemas\n            if (keyword === 'properties') {\n              removedProperties.add(key);\n            }\n          } else {\n            const shouldRemove = pruneSchemaByScope(graph, prop, scope);\n            if (shouldRemove) {\n              delete objMap[key];\n              // Track removed properties for object schemas\n              if (keyword === 'properties') {\n                removedProperties.add(key);\n              }\n            }\n          }\n        }\n\n        // Update required array if properties were removed\n        if (\n          removedProperties.size > 0 &&\n          keyword === 'properties' &&\n          'required' in schema &&\n          Array.isArray((schema as Record<string, unknown>).required)\n        ) {\n          const required = (schema as Record<string, unknown>).required as string[];\n          const filteredRequired = required.filter((prop) => !removedProperties.has(prop));\n\n          if (!filteredRequired.length) {\n            delete (schema as Record<string, unknown>).required;\n          } else {\n            (schema as Record<string, unknown>).required = filteredRequired;\n          }\n        }\n\n        if (!Object.keys(objMap).length) {\n          delete (schema as Record<string, unknown>)[keyword];\n        }\n      } else if (type === 'single' && typeof value === 'object' && value !== null) {\n        if ((value as Record<string, unknown>)[scope] === true) {\n          delete (schema as Record<string, unknown>)[keyword];\n        } else {\n          const shouldRemove = pruneSchemaByScope(graph, value, scope);\n          if (shouldRemove) {\n            delete (schema as Record<string, unknown>)[keyword];\n          }\n        }\n      } else if (type === 'singleOrArray') {\n        if (value instanceof Array) {\n          for (let index = value.length - 1; index >= 0; index--) {\n            const item = value[index];\n            if (\n              item &&\n              typeof item === 'object' &&\n              (item as Record<string, unknown>)[scope] === true\n            ) {\n              value.splice(index, 1);\n            } else {\n              const shouldRemove = pruneSchemaByScope(graph, item, scope);\n              if (shouldRemove) value.splice(index, 1);\n            }\n          }\n          if (!value.length) {\n            delete (schema as Record<string, unknown>)[keyword];\n          }\n        } else if (typeof value === 'object' && value !== null) {\n          if ((value as Record<string, unknown>)[scope] === true) {\n            delete (schema as Record<string, unknown>)[keyword];\n          } else {\n            const shouldRemove = pruneSchemaByScope(graph, value, scope);\n            if (shouldRemove) {\n              delete (schema as Record<string, unknown>)[keyword];\n            }\n          }\n        }\n      }\n    }\n    // After all removals, if this is type: object and has no structural fields, remove it\n    if (\n      (schema as Record<string, unknown>).type === 'object' &&\n      !childSchemaRelationships.some(([keyword]) => keyword in schema)\n    ) {\n      return true;\n    }\n  }\n  return false;\n};\n\n/**\n * Remove only the true original schemas that were split, by object identity.\n * This is robust to swaps, overwrites, and name collisions.\n *\n * @param originalSchemas - Map of original pointers to their schema objects (captured before splitting)\n * @param spec - The OpenAPI spec object\n * @param split - The split mapping (from splitSchemas)\n */\nconst removeOriginalSplitSchemas = ({\n  logger,\n  originalSchemas,\n  spec,\n  split,\n}: {\n  logger: Logger;\n  originalSchemas: OriginalSchemas;\n  spec: unknown;\n  split: Pick<SplitSchemas, 'mapping'>;\n}) => {\n  const event = logger.timeEvent('remove-original-split-schemas');\n  const schemasObj = getSchemasObject(spec);\n\n  for (const originalPointer of Object.keys(split.mapping)) {\n    const path = jsonPointerToPath(originalPointer);\n    const name = path[path.length - 1]!;\n    if (\n      typeof name === 'string' &&\n      schemasObj &&\n      Object.prototype.hasOwnProperty.call(schemasObj, name) &&\n      schemasObj[name] === originalSchemas[originalPointer]\n    ) {\n      delete schemasObj[name];\n    }\n  }\n  event.timeEnd();\n};\n\n/**\n * Create writable variants of parent schemas that have discriminators\n * and are referenced by split schemas.\n */\nfunction splitDiscriminatorSchemas({\n  config,\n  existingNames,\n  schemasPointerNamespace,\n  spec,\n  split,\n}: {\n  config: ReadWriteConfig;\n  existingNames: Set<string>;\n  schemasPointerNamespace: string;\n  spec: unknown;\n  split: SplitSchemas;\n}) {\n  const schemasObj = getSchemasObject(spec);\n  if (!schemasObj) return;\n\n  const parentSchemasToSplit = new Map<string, Set<Scope>>();\n\n  // First pass: identify parent schemas that need writable variants\n  for (const [name, schema] of Object.entries(split.schemas)) {\n    const pointer = `${schemasPointerNamespace}${name}`;\n    const originalPointer = split.reverseMapping[pointer];\n\n    if (originalPointer) {\n      const mapping = split.mapping[originalPointer];\n      if (mapping) {\n        const contextVariant: Scope | null =\n          mapping.read === pointer ? 'read' : mapping.write === pointer ? 'write' : null;\n\n        // Check allOf for $refs to schemas with discriminators\n        if (\n          contextVariant &&\n          schema &&\n          typeof schema === 'object' &&\n          'allOf' in schema &&\n          schema.allOf instanceof Array\n        ) {\n          for (const comp of schema.allOf) {\n            if (\n              comp &&\n              typeof comp === 'object' &&\n              '$ref' in comp &&\n              typeof comp.$ref === 'string'\n            ) {\n              const refPath = jsonPointerToPath(comp.$ref);\n              const schemaName = refPath[refPath.length - 1];\n\n              if (typeof schemaName === 'string' && schemaName in schemasObj) {\n                const resolvedSchema = schemasObj[schemaName];\n\n                // Check if this schema has a discriminator with mapping\n                if (\n                  resolvedSchema &&\n                  typeof resolvedSchema === 'object' &&\n                  'discriminator' in resolvedSchema &&\n                  resolvedSchema.discriminator &&\n                  typeof resolvedSchema.discriminator === 'object' &&\n                  'mapping' in resolvedSchema.discriminator &&\n                  resolvedSchema.discriminator.mapping &&\n                  typeof resolvedSchema.discriminator.mapping === 'object'\n                ) {\n                  // This parent schema needs a variant for this context\n                  if (!parentSchemasToSplit.has(comp.$ref)) {\n                    parentSchemasToSplit.set(comp.$ref, new Set());\n                  }\n                  parentSchemasToSplit.get(comp.$ref)!.add(contextVariant);\n                }\n              }\n            }\n          }\n        }\n      }\n    }\n  }\n\n  // Second pass: create writable variants of parent schemas and update their discriminator mappings\n  const parentSchemaVariants = new Map<string, SplitMapping[keyof SplitMapping]>();\n\n  for (const [parentRef, contexts] of parentSchemasToSplit) {\n    const refPath = jsonPointerToPath(parentRef);\n    const parentName = refPath[refPath.length - 1];\n\n    if (typeof parentName !== 'string' || !(parentName in schemasObj)) continue;\n\n    const parentSchema = schemasObj[parentName];\n    if (!parentSchema || typeof parentSchema !== 'object') continue;\n\n    const variants: SplitMapping[keyof SplitMapping] = {};\n\n    // Create variants for each context\n    for (const context of contexts) {\n      const variantSchema = deepClone(parentSchema);\n\n      // Update discriminator mapping in the variant\n      if (\n        'discriminator' in variantSchema &&\n        variantSchema.discriminator &&\n        typeof variantSchema.discriminator === 'object' &&\n        'mapping' in variantSchema.discriminator &&\n        variantSchema.discriminator.mapping &&\n        typeof variantSchema.discriminator.mapping === 'object'\n      ) {\n        const mapping = variantSchema.discriminator.mapping;\n        const updatedMapping: Record<string, string> = {};\n\n        for (const [discriminatorValue, originalRef] of Object.entries(mapping)) {\n          const map = split.mapping[originalRef];\n          if (map) {\n            if (context === 'read' && map.read) {\n              updatedMapping[discriminatorValue] = map.read;\n            } else if (context === 'write' && map.write) {\n              updatedMapping[discriminatorValue] = map.write;\n            } else {\n              updatedMapping[discriminatorValue] = originalRef;\n            }\n          } else {\n            updatedMapping[discriminatorValue] = originalRef;\n          }\n        }\n\n        variantSchema.discriminator.mapping = updatedMapping;\n      }\n\n      // Add the variant to split.schemas with an appropriate name\n      if (context === 'write') {\n        const writeBase = applyNaming(parentName, config.requests);\n        const writeName = getUniqueComponentName({\n          base: writeBase,\n          components: existingNames,\n        });\n        existingNames.add(writeName);\n        split.schemas[writeName] = variantSchema;\n        variants.write = `${schemasPointerNamespace}${writeName}`;\n      }\n      // We could create read variants too, but typically they're not needed\n      // since the original schema serves as the read variant\n    }\n\n    parentSchemaVariants.set(parentRef, variants);\n  }\n\n  // Third pass: update $refs in split schemas to point to the parent variants\n  for (const [name, schema] of Object.entries(split.schemas)) {\n    const pointer = `${schemasPointerNamespace}${name}`;\n    const originalPointer = split.reverseMapping[pointer];\n    if (!originalPointer) continue;\n\n    const mapping = split.mapping[originalPointer];\n    if (!mapping) continue;\n\n    const contextVariant: Scope | null =\n      mapping.read === pointer ? 'read' : mapping.write === pointer ? 'write' : null;\n\n    if (contextVariant && schema && typeof schema === 'object') {\n      // Update $refs in allOf\n      if ('allOf' in schema && schema.allOf instanceof Array) {\n        for (let i = 0; i < schema.allOf.length; i++) {\n          const comp = schema.allOf[i];\n\n          if (comp && typeof comp === 'object' && '$ref' in comp && typeof comp.$ref === 'string') {\n            const variants = parentSchemaVariants.get(comp.$ref);\n\n            if (variants) {\n              if (contextVariant === 'write' && variants.write) {\n                comp.$ref = variants.write;\n              } else if (contextVariant === 'read' && variants.read) {\n                comp.$ref = variants.read;\n              }\n            }\n          }\n        }\n      }\n    }\n  }\n}\n\n/**\n * Splits schemas with both 'read' and 'write' scopes into read/write variants.\n * Returns the new schemas and a mapping from original pointer to new variant pointers.\n *\n * @param config - The readWrite transform config\n * @param graph - The Graph containing all nodes and their scopes\n * @param spec - The OpenAPI spec object\n * @returns SplitSchemas - The split schemas and pointer mappings\n */\nexport const splitSchemas = ({\n  config,\n  graph,\n  logger,\n  spec,\n}: {\n  config: ReadWriteConfig;\n  graph: Graph;\n  logger: Logger;\n  spec: unknown;\n}): SplitSchemas => {\n  const event = logger.timeEvent('split-schemas');\n  const existingNames = new Set<string>();\n  const split: SplitSchemas = {\n    mapping: {},\n    reverseMapping: {},\n    schemas: {},\n  };\n\n  const schemasPointerNamespace = specToSchemasPointerNamespace(spec);\n  const schemasNamespaceSegments = schemasPointerNamespace.split('/').length - 1;\n\n  /**\n   * Extracts the schema name from pointer, but only if it's a top-level schema\n   * pointer. Returns an empty string if it's a nested pointer.\n   * @param pointer\n   * @returns Schema's base name.\n   */\n  const pointerToSchema = (pointer: string): string => {\n    if (pointer.startsWith(schemasPointerNamespace)) {\n      const path = jsonPointerToPath(pointer);\n      if (path.length === schemasNamespaceSegments) {\n        return path[schemasNamespaceSegments - 1] || '';\n      }\n    }\n    return '';\n  };\n\n  // Collect all existing schema names\n  for (const pointer of graph.nodes.keys()) {\n    const name = pointerToSchema(pointer);\n    if (name) existingNames.add(name);\n  }\n\n  for (const [pointer, nodeInfo] of graph.nodes) {\n    const name = pointerToSchema(pointer);\n    // Only split top-level schemas, with either read-only or write-only scopes (or both).\n    if (\n      !name ||\n      !(nodeInfo.scopes?.has('read') || nodeInfo.scopes?.has('write')) ||\n      !nodeInfo.scopes?.has('normal')\n    ) {\n      continue;\n    }\n\n    // read variant\n    const readSchema = deepClone<unknown>(nodeInfo.node);\n    pruneSchemaByScope(graph, readSchema, 'writeOnly');\n    const readBase = applyNaming(name, config.responses);\n    const readName =\n      readBase === name\n        ? readBase\n        : getUniqueComponentName({\n            base: readBase,\n            components: existingNames,\n          });\n    existingNames.add(readName);\n    split.schemas[readName] = readSchema;\n    const readPointer = `${schemasPointerNamespace}${readName}`;\n\n    // write variant\n    const writeSchema = deepClone<unknown>(nodeInfo.node);\n    pruneSchemaByScope(graph, writeSchema, 'readOnly');\n\n    // Check if this schema (or any of its descendants) references any schema that\n    // will need read/write variants. This is determined by checking transitive\n    // dependencies for schemas with both 'normal' and ('read' or 'write') scopes.\n    const transitiveDeps = graph.transitiveDependencies.get(pointer) || new Set();\n    const referencesReadWriteSchemas = Array.from(transitiveDeps).some((depPointer) => {\n      const depNodeInfo = graph.nodes.get(depPointer);\n      return (\n        depNodeInfo?.scopes?.has('normal') &&\n        (depNodeInfo.scopes.has('read') || depNodeInfo.scopes.has('write'))\n      );\n    });\n\n    // If pruning did not change anything (both variants equal and equal to original),\n    // and the schema doesn't reference any schemas that will have read/write variants,\n    // skip splitting and keep the original single schema.\n    if (\n      !referencesReadWriteSchemas &&\n      deepEqual(readSchema, writeSchema) &&\n      deepEqual(readSchema, nodeInfo.node)\n    ) {\n      continue;\n    }\n    const writeBase = applyNaming(name, config.requests);\n    const writeName =\n      writeBase === name && writeBase !== readName\n        ? writeBase\n        : getUniqueComponentName({\n            base: writeBase,\n            components: existingNames,\n          });\n    existingNames.add(writeName);\n    split.schemas[writeName] = writeSchema;\n    const writePointer = `${schemasPointerNamespace}${writeName}`;\n\n    split.mapping[pointer] = {\n      read: readPointer,\n      write: writePointer,\n    };\n    split.reverseMapping[readPointer] = pointer;\n    split.reverseMapping[writePointer] = pointer;\n  }\n\n  splitDiscriminatorSchemas({\n    config,\n    existingNames,\n    schemasPointerNamespace,\n    spec,\n    split,\n  });\n\n  event.timeEnd();\n  return split;\n};\n\ntype WalkArgs = {\n  context: Scope | null;\n  currentPointer: string | null;\n  inSchema: boolean;\n  node: unknown;\n  path: ReadonlyArray<string | number>;\n  visited?: Set<string>;\n};\n\n/**\n * Recursively updates $ref fields in the spec to point to the correct read/write variant\n * according to the current context (read/write), using the split mapping.\n *\n * @param spec - The OpenAPI spec object\n * @param split - The split mapping (from splitSchemas)\n */\nexport const updateRefsInSpec = ({\n  logger,\n  spec,\n  split,\n}: {\n  logger: Logger;\n  spec: unknown;\n  split: Omit<SplitSchemas, 'schemas'>;\n}): void => {\n  const event = logger.timeEvent('update-refs-in-spec');\n  const schemasPointerNamespace = specToSchemasPointerNamespace(spec);\n\n  const walk = ({\n    context,\n    currentPointer,\n    inSchema,\n    node,\n    path,\n    visited = new Set(),\n  }: WalkArgs): void => {\n    if (node instanceof Array) {\n      node.forEach((item, index) =>\n        walk({\n          context,\n          currentPointer,\n          inSchema,\n          node: item,\n          path: [...path, index],\n          visited,\n        }),\n      );\n    } else if (node && typeof node === 'object') {\n      // Detect if we're entering a split schema variant\n      let nextPointer = currentPointer;\n      let nextContext = context;\n      if (isPathRootSchema(path)) {\n        // Use the last path segment instead of a fixed index (path[2]) because\n        // path depth varies across OAS2/OAS3 and contexts; fixed indexing is brittle.\n        const nameSegment = path[path.length - 1] as string;\n        nextPointer = `${schemasPointerNamespace}${nameSegment}`;\n        const originalPointer = split.reverseMapping[nextPointer];\n        if (originalPointer) {\n          const mapping = split.mapping[originalPointer];\n          if (mapping?.read === nextPointer) {\n            nextContext = 'read';\n          } else if (mapping?.write === nextPointer) {\n            nextContext = 'write';\n          }\n        }\n        // For schemas that are not split variants, keep the inherited context.\n        // This ensures that $refs inside these schemas are resolved based on\n        // where the schema is actually used (requestBody vs responses), not\n        // based on the schema's own scopes which track readOnly/writeOnly fields.\n      }\n\n      const compContext = getComponentContext(path);\n      if (compContext !== undefined) {\n        // For each component, walk with the correct context\n        for (const key in node) {\n          if (!Object.prototype.hasOwnProperty.call(node, key)) {\n            continue;\n          }\n          walk({\n            context: compContext,\n            currentPointer: nextPointer,\n            inSchema: false,\n            node: (node as Record<string, unknown>)[key],\n            path: [...path, key],\n            visited,\n          });\n        }\n        return;\n      }\n\n      for (const key in node) {\n        if (!Object.prototype.hasOwnProperty.call(node, key)) {\n          continue;\n        }\n        const value = (node as Record<string, unknown>)[key];\n\n        // Only treat context switches at the OpenAPI structure level (not inside schemas)\n        if (!inSchema) {\n          if (key === 'requestBody') {\n            walk({\n              context: 'write',\n              currentPointer: nextPointer,\n              inSchema: false,\n              node: value,\n              path: [...path, key],\n              visited,\n            });\n            continue;\n          }\n          if (key === 'responses') {\n            walk({\n              context: 'read',\n              currentPointer: nextPointer,\n              inSchema: false,\n              node: value,\n              path: [...path, key],\n              visited,\n            });\n            continue;\n          }\n          if (key === 'parameters' && Array.isArray(value)) {\n            value.forEach((param, index) => {\n              if (param && typeof param === 'object' && 'schema' in param) {\n                walk({\n                  context: 'write',\n                  currentPointer: nextPointer,\n                  inSchema: true,\n                  node: param.schema,\n                  path: [...path, key, index, 'schema'],\n                  visited,\n                });\n              }\n              // Also handle content (OpenAPI 3.x)\n              if (param && typeof param === 'object' && 'content' in param) {\n                walk({\n                  context: 'write',\n                  currentPointer: nextPointer,\n                  inSchema: false,\n                  node: param.content,\n                  path: [...path, key, index, 'content'],\n                  visited,\n                });\n              }\n            });\n            continue;\n          }\n          // OpenAPI 3.x: headers in responses\n          if (key === 'headers' && typeof value === 'object' && value !== null) {\n            for (const headerKey in value) {\n              if (!Object.prototype.hasOwnProperty.call(value, headerKey)) {\n                continue;\n              }\n              walk({\n                context: 'read',\n                currentPointer: nextPointer,\n                inSchema: false,\n                node: (value as Record<string, unknown>)[headerKey],\n                path: [...path, key, headerKey],\n                visited,\n              });\n            }\n            continue;\n          }\n        }\n\n        // Entering a schema context\n        if (schemaKeys.has(key)) {\n          walk({\n            context: nextContext,\n            currentPointer: nextPointer,\n            inSchema: true,\n            node: value,\n            path: [...path, key],\n            visited,\n          });\n        } else if (key === '$ref' && typeof value === 'string') {\n          // Prefer exact match first\n          const map = split.mapping[value];\n          if (map) {\n            if (nextContext === 'read' && map.read) {\n              (node as Record<string, unknown>)[key] = map.read;\n            } else if (nextContext === 'write' && map.write) {\n              (node as Record<string, unknown>)[key] = map.write;\n            } else if (!nextContext && map.read) {\n              // For schemas with no context (unused in operations), default to read variant\n              // This ensures $refs in unused schemas don't point to removed originals\n              (node as Record<string, unknown>)[key] = map.read;\n            }\n          }\n        } else if (key === 'discriminator' && typeof value === 'object' && value !== null) {\n          // Update discriminator mappings to point to the correct read/write variants\n          if ('mapping' in value && value.mapping && typeof value.mapping === 'object') {\n            const updatedMapping: Record<string, string> = {};\n            for (const [discriminatorValue, originalRef] of Object.entries(value.mapping)) {\n              const map = split.mapping[originalRef];\n              if (map) {\n                if (nextContext === 'read' && map.read) {\n                  updatedMapping[discriminatorValue] = map.read;\n                } else if (nextContext === 'write' && map.write) {\n                  updatedMapping[discriminatorValue] = map.write;\n                } else {\n                  // For schemas with no context, don't update the mapping.\n                  // This preserves the original mapping for base schemas.\n                  updatedMapping[discriminatorValue] = originalRef;\n                }\n              } else {\n                updatedMapping[discriminatorValue] = originalRef;\n              }\n            }\n            value.mapping = updatedMapping;\n          }\n          // Continue walking the discriminator object for other properties\n          walk({\n            context: nextContext,\n            currentPointer: nextPointer,\n            inSchema,\n            node: value,\n            path: [...path, key],\n            visited,\n          });\n        } else {\n          walk({\n            context: nextContext,\n            currentPointer: nextPointer,\n            inSchema,\n            node: value,\n            path: [...path, key],\n            visited,\n          });\n        }\n      }\n    }\n  };\n  walk({\n    context: null,\n    currentPointer: null,\n    inSchema: false,\n    node: spec,\n    path: [],\n  });\n  event.timeEnd();\n};\n\n/**\n * Orchestrates the full read/write transform:\n * - Captures original schemas\n * - Splits schemas into read/write variants\n * - Inserts split schemas into the spec\n * - Updates $refs throughout the spec\n * - Removes original schemas that were split\n *\n * @param config - The readWrite transform config\n * @param spec - The OpenAPI spec object\n */\nexport const readWriteTransform = ({\n  config,\n  logger,\n  spec,\n}: {\n  config: ReadWriteConfig;\n  logger: Logger;\n  spec: unknown;\n}) => {\n  const { graph } = buildGraph(spec, logger);\n  const originalSchemas = captureOriginalSchemas(spec, logger);\n  const split = splitSchemas({ config, graph, logger, spec });\n  insertSplitSchemasIntoSpec({ logger, spec, split });\n  updateRefsInSpec({ logger, spec, split });\n  removeOriginalSplitSchemas({ logger, originalSchemas, spec, split });\n};\n"
  },
  {
    "path": "packages/shared/src/openApi/shared/transforms/schemas.ts",
    "content": "import type { Parser } from '../../../config/parser/types';\nimport { applyNaming } from '../../../utils/naming/naming';\nimport { getSchemasObject } from '../utils/transforms';\nimport { specToSchemasPointerNamespace } from './utils';\n\ntype SchemaNameConfig = Parser['transforms']['schemaName'];\n\n/**\n * Recursively walks the entire spec object and replaces all $ref strings\n * according to the provided rename mapping.\n */\nconst rewriteRefs = (node: unknown, renameMap: Record<string, string>) => {\n  if (node instanceof Array) {\n    node.forEach((item) => rewriteRefs(item, renameMap));\n  } else if (node && typeof node === 'object') {\n    for (const [key, value] of Object.entries(node)) {\n      if (key === '$ref' && typeof value === 'string' && value in renameMap) {\n        (node as Record<string, unknown>)[key] = renameMap[value];\n      } else {\n        rewriteRefs(value, renameMap);\n      }\n    }\n  }\n};\n\n/**\n * Renames schema component keys and updates all $ref pointers throughout\n * the spec. Handles collisions by skipping renames when the target name\n * already exists or conflicts with another rename.\n */\nexport const schemaNameTransform = ({\n  config,\n  spec,\n}: {\n  config: SchemaNameConfig;\n  spec: unknown;\n}) => {\n  if (!config) {\n    return;\n  }\n\n  const schemasObj = getSchemasObject(spec);\n  if (!schemasObj) {\n    return;\n  }\n\n  const schemasPointerNamespace = specToSchemasPointerNamespace(spec);\n  if (!schemasPointerNamespace) {\n    return;\n  }\n\n  const renameMap: Record<string, string> = {};\n  const newNames = new Set<string>();\n  const namingConfig = { name: config };\n\n  for (const oldName of Object.keys(schemasObj)) {\n    const newName = applyNaming(oldName, namingConfig);\n\n    if (newName === oldName || newName in schemasObj || newNames.has(newName)) {\n      continue;\n    }\n\n    renameMap[`${schemasPointerNamespace}${oldName}`] = `${schemasPointerNamespace}${newName}`;\n    newNames.add(newName);\n  }\n\n  for (const [oldPointer, newPointer] of Object.entries(renameMap)) {\n    const oldName = oldPointer.slice(schemasPointerNamespace.length);\n    const newName = newPointer.slice(schemasPointerNamespace.length);\n    const schema = schemasObj[oldName];\n\n    delete schemasObj[oldName];\n    schemasObj[newName] = schema;\n  }\n\n  if (Object.keys(renameMap).length > 0) {\n    rewriteRefs(spec, renameMap);\n  }\n};\n"
  },
  {
    "path": "packages/shared/src/openApi/shared/transforms/utils.ts",
    "content": "type Obj = Record<string, unknown> | Set<string> | ReadonlyArray<string | undefined>;\n\nconst hasName = (obj: Obj, value: string): boolean => {\n  if (obj instanceof Set) {\n    return obj.has(value);\n  }\n  if (obj instanceof Array) {\n    return obj.includes(value);\n  }\n  return value in obj;\n};\n\nexport const getUniqueComponentName = ({\n  base,\n  components,\n  extraComponents,\n}: {\n  base: string;\n  /**\n   * Input components.\n   */\n  components: Obj;\n  /**\n   * Temporary input components, waiting to be inserted for example.\n   */\n  extraComponents?: Obj;\n}): string => {\n  let index = 2;\n  let name = base;\n  while (hasName(components, name) || (extraComponents && hasName(extraComponents, name))) {\n    name = `${base}${index}`;\n    index += 1;\n  }\n  return name;\n};\n\nexport const isPathRootSchema = (path: ReadonlyArray<string | number>) =>\n  (path.length === 3 && path[0] === 'components' && path[1] === 'schemas') ||\n  (path.length === 2 && path[0] === 'definitions');\n\nexport const specToSchemasPointerNamespace = (spec: unknown): string => {\n  if (spec && typeof spec === 'object') {\n    if ('swagger' in spec) {\n      // #/definitions/SchemaName\n      return '#/definitions/';\n    }\n\n    if ('openapi' in spec) {\n      // #/components/schemas/SchemaName\n      return '#/components/schemas/';\n    }\n  }\n\n  return '';\n};\n"
  },
  {
    "path": "packages/shared/src/openApi/shared/types/index.ts",
    "content": "export type {\n  CodeSampleObject,\n  EnumExtensions,\n  LinguistLanguages,\n} from './openapi-spec-extensions';\n"
  },
  {
    "path": "packages/shared/src/openApi/shared/types/openapi-spec-extensions.ts",
    "content": "export type LinguistLanguages =\n  | 'C'\n  | 'C#'\n  | 'C++'\n  | 'CoffeeScript'\n  | 'CSS'\n  | 'Dart'\n  | 'DM'\n  | 'Elixir'\n  | 'Go'\n  | 'Groovy'\n  | 'HTML'\n  | 'Java'\n  | 'JavaScript'\n  | 'Kotlin'\n  | 'Objective-C'\n  | 'Perl'\n  | 'PHP'\n  | 'PowerShell'\n  | 'Python'\n  | 'Ruby'\n  | 'Rust'\n  | 'Scala'\n  | 'Shell'\n  | 'Swift'\n  | 'TypeScript';\n\nexport interface CodeSampleObject {\n  /**\n   * Code sample label, for example `Node` or `Python2.7`.\n   *\n   * @default `lang` value\n   */\n  label?: string;\n  /**\n   * **REQUIRED**. Code sample language. Can be one of the automatically supported languages or any other language identifier of your choice (for custom code samples).\n   */\n  lang: LinguistLanguages;\n  /**\n   * **REQUIRED**. Code sample source code, or a `$ref` to the file containing the code sample.\n   */\n  source: string;\n}\n\nexport interface EnumExtensions {\n  /**\n   * `x-enum-descriptions` are {@link https://stackoverflow.com/a/66471626 supported} by OpenAPI Generator.\n   */\n  'x-enum-descriptions'?: ReadonlyArray<string>;\n  /**\n   * `x-enum-varnames` are {@link https://stackoverflow.com/a/66471626 supported} by OpenAPI Generator.\n   */\n  'x-enum-varnames'?: ReadonlyArray<string>;\n  /**\n   * {@link https://github.com/RicoSuter/NSwag NSwag} generates `x-enumNames` field containing custom enum names.\n   */\n  'x-enumNames'?: ReadonlyArray<string>;\n}\n"
  },
  {
    "path": "packages/shared/src/openApi/shared/types/schema.ts",
    "content": "export interface SchemaState {\n  /**\n   * Optional schema $ref. This will be only defined for reusable components\n   * from the OpenAPI specification.\n   */\n  $ref?: string;\n  /**\n   * Set of $refs currently being resolved that are circular. This is used to\n   * avoid infinite loops when resolving schemas with circular references.\n   */\n  circularReferenceTracker: Set<string>;\n  /**\n   * True if current schema is part of an allOf composition. This is used to\n   * avoid emitting [key: string]: never for empty objects with\n   * additionalProperties: false inside allOf, which would override inherited\n   * properties from other schemas in the composition.\n   */\n  inAllOf?: boolean;\n}\n\nexport type SchemaWithRequired<\n  S extends {\n    type?: unknown;\n  },\n  K extends keyof S,\n> = {\n  [P in keyof S as P extends K ? never : P]: S[P];\n} & {\n  [P in K]-?: S[P];\n};\n\nexport type SchemaType<\n  S extends {\n    type?: unknown;\n  },\n> = Extract<Required<S>['type'], string>;\n"
  },
  {
    "path": "packages/shared/src/openApi/shared/types/state.ts",
    "content": "export interface State {\n  ids: Map<string, string>;\n}\n"
  },
  {
    "path": "packages/shared/src/openApi/shared/utils/__tests__/deepEqual.test.ts",
    "content": "import deepEqual from '../deepEqual';\n\ndescribe('deepEqual', () => {\n  const scenarios: Array<{\n    a: unknown;\n    b: unknown;\n    equal: boolean;\n    name: string;\n  }> = [\n    // Primitives\n    { a: 1, b: 1, equal: true, name: 'numbers equal' },\n    { a: 1, b: 2, equal: false, name: 'numbers not equal' },\n    { a: 'a', b: 'a', equal: true, name: 'strings equal' },\n    { a: 'a', b: 'b', equal: false, name: 'strings not equal' },\n    { a: true, b: true, equal: true, name: 'booleans equal' },\n    { a: true, b: false, equal: false, name: 'booleans not equal' },\n    { a: null, b: null, equal: true, name: 'null equal' },\n    { a: null, b: {}, equal: false, name: 'null vs object' },\n    { a: undefined, b: undefined, equal: true, name: 'undefined equal' },\n    { a: 1, b: '1', equal: false, name: 'number vs string' },\n    {\n      a: Number.NaN,\n      b: Number.NaN,\n      equal: false,\n      name: 'NaN vs NaN (not equal)',\n    },\n\n    // Arrays\n    { a: [1, 2], b: [1, 2], equal: true, name: 'arrays equal' },\n    { a: [1, 2], b: [2, 1], equal: false, name: 'arrays different order' },\n    { a: [1], b: [1, 2], equal: false, name: 'arrays different length' },\n    {\n      a: [{ a: 1 }, 2, [3, 4]],\n      b: [{ a: 1 }, 2, [3, 4]],\n      equal: true,\n      name: 'nested arrays and objects equal',\n    },\n\n    // Objects\n    {\n      a: { a: 1, b: 2 },\n      b: { a: 1, b: 2 },\n      equal: true,\n      name: 'objects equal different key order',\n    },\n    {\n      a: { a: 1 },\n      b: { a: 1, b: 2 },\n      equal: false,\n      name: 'objects different keys',\n    },\n    {\n      a: { a: { b: 2 } },\n      b: { a: { b: 2 } },\n      equal: true,\n      name: 'objects nested equal',\n    },\n    {\n      a: { a: { b: 2 } },\n      b: { a: { b: 3 } },\n      equal: false,\n      name: 'objects nested not equal',\n    },\n    {\n      a: { a: undefined },\n      b: { a: undefined },\n      equal: true,\n      name: 'object with undefined values equal',\n    },\n\n    // Mismatched types\n    { a: [], b: {}, equal: false, name: 'array vs object' },\n  ];\n\n  it.each(scenarios)('compares $name', async ({ a, b, equal }) => {\n    expect(deepEqual(a, b)).toBe(equal);\n  });\n});\n"
  },
  {
    "path": "packages/shared/src/openApi/shared/utils/__tests__/graph.test.ts",
    "content": "import { buildGraph } from '../graph';\n\n// simple logger stub for buildGraph\nconst loggerStub = {\n  timeEvent: () => ({ timeEnd: () => {} }),\n} as any;\n\ndescribe('buildGraph', () => {\n  it('computes referenced and transitive dependencies for validators-circular-ref.json', async () => {\n    const mod = await import('../../../../../../../specs/3.1.x/validators-circular-ref.json');\n    const spec = (mod as any).default ?? mod;\n\n    const { graph } = buildGraph(spec, loggerStub);\n\n    const foo = '#/components/schemas/Foo';\n    const bar = '#/components/schemas/Bar';\n    const baz = '#/components/schemas/Baz';\n    const qux = '#/components/schemas/Qux';\n\n    // Foo has a child property that $ref's Bar, so Foo should have Bar in subtreeDependencies\n    expect(graph.subtreeDependencies.get(foo)).toBeDefined();\n    expect(Array.from(graph.subtreeDependencies.get(foo)!).sort()).toEqual([bar].sort());\n\n    // Foo transitively depends on Bar (via the child), so transitiveDependencies should include Bar\n    expect(graph.transitiveDependencies.get(foo)).toBeDefined();\n    expect(Array.from(graph.transitiveDependencies.get(foo)!).sort()).toEqual([bar].sort());\n\n    // Bar references itself via an array item; Bar should reference Bar\n    expect(Array.from(graph.subtreeDependencies.get(bar)!).sort()).toEqual([bar].sort());\n\n    // Baz and Qux form a mutual $ref cycle; each should reference the other in subtreeDependencies\n    expect(Array.from(graph.subtreeDependencies.get(baz)!).sort()).toEqual([qux].sort());\n    expect(Array.from(graph.subtreeDependencies.get(qux)!).sort()).toEqual([baz].sort());\n\n    // Qux node should exist and have a direct dependency to Baz (node-level $ref)\n    expect(graph.nodes.has(qux)).toBe(true);\n    expect(graph.nodeDependencies.get(qux)).toBeDefined();\n    expect(Array.from(graph.nodeDependencies.get(qux)!).sort()).toEqual([baz].sort());\n\n    // Qux transitive deps should include Baz (and vice-versa because of the cycle)\n    expect(graph.transitiveDependencies.get(qux)).toBeDefined();\n    expect(Array.from(graph.transitiveDependencies.get(qux)!).sort()).toEqual([baz].sort());\n\n    // Reverse dependencies should reflect the mutual references\n    expect(graph.reverseNodeDependencies.get(qux)).toBeDefined();\n    expect(Array.from(graph.reverseNodeDependencies.get(qux)!).sort()).toEqual([baz].sort());\n    expect(Array.from(graph.reverseNodeDependencies.get(baz)!).sort()).toEqual([qux].sort());\n  });\n\n  it('handles a small hand-constructed tree with child-level $ref', () => {\n    const spec = {\n      components: {\n        schemas: {\n          A: {\n            properties: { p: { $ref: '#/components/schemas/B' } },\n            type: 'object',\n          },\n          B: { type: 'object' },\n        },\n      },\n    };\n\n    const { graph } = buildGraph(spec, loggerStub);\n\n    const a = '#/components/schemas/A';\n    const b = '#/components/schemas/B';\n\n    expect(Array.from(graph.subtreeDependencies.get(a)!).sort()).toEqual([b].sort());\n    expect(Array.from(graph.transitiveDependencies.get(a)!).sort()).toEqual([b].sort());\n    // reverseNodeDependencies should record that b is referenced by the property child as well\n    expect(graph.reverseNodeDependencies.get(b)).toBeDefined();\n    expect(Array.from(graph.reverseNodeDependencies.get(b)!).some((p) => p.startsWith(a))).toBe(\n      true,\n    );\n  });\n});\n"
  },
  {
    "path": "packages/shared/src/openApi/shared/utils/__tests__/operation.test.ts",
    "content": "import type { Context } from '../../../../ir/context';\nimport { operationToId } from '../operation';\n\ndescribe('operationToId', () => {\n  const scenarios: Array<{\n    id?: string;\n    method: string;\n    output: string;\n    path: string;\n  }> = [\n    {\n      method: 'post',\n      output: 'postFoo',\n      path: '/foo',\n    },\n    {\n      id: 'Post-foo',\n      method: 'post',\n      output: 'postFoo',\n      path: '/foo',\n    },\n    {\n      method: 'post',\n      output: 'postFooByFooId',\n      path: '/foo/{foo_id}',\n    },\n    {\n      method: 'post',\n      output: 'postFooByFooIdBarBazQux',\n      path: '/foo/{foo_id}/bar+baz:qux',\n    },\n  ];\n\n  it.each(scenarios)(\n    'transforms $method $path ($id) -> $output',\n    async ({ id, method, output, path }) => {\n      const context: Partial<Context> = {\n        config: {\n          plugins: {\n            '@hey-api/sdk': {\n              config: {\n                // @ts-expect-error\n                operationId: true,\n              },\n              name: '@hey-api/sdk',\n            },\n          },\n        },\n      };\n      expect(\n        operationToId({\n          context: context as Context,\n          id,\n          method,\n          path,\n          state: {\n            ids: new Map(),\n          },\n        }),\n      ).toEqual(output);\n    },\n  );\n});\n"
  },
  {
    "path": "packages/shared/src/openApi/shared/utils/__tests__/patch.test.ts",
    "content": "import type { OpenApi } from '../../../types';\nimport { patchOpenApiSpec } from '../patch';\n\nconst specMetadataV2: Pick<OpenApi.V2_0_X, 'info' | 'paths' | 'swagger'> = {\n  info: {\n    title: 'Test API',\n    version: '1.0.0',\n  },\n  paths: {},\n  swagger: '2.0',\n};\n\nconst specMetadataV3: Pick<OpenApi.V3_1_X, 'info' | 'openapi'> = {\n  info: {\n    title: 'Test API',\n    version: '1.0.0',\n  },\n  openapi: '3.1.0',\n};\n\ndescribe('patchOpenApiSpec', () => {\n  describe('patch.input', () => {\n    describe('OpenAPI v3', () => {\n      it('calls patch.input function before other patches', async () => {\n        const inputFn = vi.fn();\n        const metaFn = vi.fn();\n        const spec: OpenApi.V3_1_X = {\n          ...specMetadataV3,\n        };\n\n        await patchOpenApiSpec({\n          patchOptions: {\n            input: inputFn,\n            meta: metaFn,\n          },\n          spec,\n        });\n\n        // Both should be called\n        expect(inputFn).toHaveBeenCalledOnce();\n        expect(inputFn).toHaveBeenCalledWith(spec);\n        expect(metaFn).toHaveBeenCalledOnce();\n      });\n\n      it('allows bulk creation of component parameters', async () => {\n        const spec: OpenApi.V3_1_X = {\n          ...specMetadataV3,\n          paths: {},\n        };\n\n        await patchOpenApiSpec({\n          patchOptions: {\n            input: (spec) => {\n              if ('openapi' in spec) {\n                if (!spec.components) spec.components = {};\n                if (!spec.components.parameters) spec.components.parameters = {};\n                spec.components.parameters.MyParam = {\n                  in: 'query',\n                  name: 'myParam',\n                  schema: { type: 'string' },\n                } as any;\n              }\n            },\n          },\n          spec,\n        });\n\n        expect(spec.components?.parameters?.MyParam).toEqual({\n          in: 'query',\n          name: 'myParam',\n          schema: { type: 'string' },\n        });\n      });\n\n      it('allows injecting parameters into multiple operations', async () => {\n        const spec: OpenApi.V3_1_X = {\n          ...specMetadataV3,\n          components: {\n            parameters: {\n              SharedParam: {\n                in: 'query',\n                name: 'shared',\n                schema: { type: 'string' },\n              } as any,\n            },\n          },\n          paths: {\n            '/bar': {\n              get: {\n                responses: {},\n              },\n            },\n            '/baz': {\n              post: {\n                responses: {},\n              },\n            },\n            '/foo': {\n              get: {\n                responses: {},\n              },\n            },\n          } as any,\n        };\n\n        await patchOpenApiSpec({\n          patchOptions: {\n            input: (spec) => {\n              // Inject parameter into all GET operations\n              for (const [, pathItem] of Object.entries(spec.paths ?? {})) {\n                if (pathItem?.get) {\n                  if (!Array.isArray(pathItem.get.parameters)) {\n                    pathItem.get.parameters = [];\n                  }\n                  (pathItem.get.parameters as any[]).push({\n                    $ref: '#/components/parameters/SharedParam',\n                  });\n                }\n              }\n            },\n          },\n          spec,\n        });\n\n        expect((spec.paths as any)['/foo'].get.parameters).toEqual([\n          { $ref: '#/components/parameters/SharedParam' },\n        ]);\n        expect((spec.paths as any)['/bar'].get.parameters).toEqual([\n          { $ref: '#/components/parameters/SharedParam' },\n        ]);\n        expect((spec.paths as any)['/baz'].post.parameters).toBeUndefined();\n      });\n\n      it('allows complex Redfish-like transformations', async () => {\n        const spec: OpenApi.V3_1_X = {\n          ...specMetadataV3,\n          paths: {\n            '/other/path': {\n              get: {\n                responses: {},\n              },\n            },\n            '/redfish/v1/Chassis': {\n              get: {\n                responses: {},\n              },\n            },\n            '/redfish/v1/Systems': {\n              get: {\n                responses: {},\n              },\n            },\n          } as any,\n        };\n\n        const QUERY_PARAMS = [\n          { description: 'Expand related resources.', key: '$expand' },\n          { description: 'Select subset.', key: '$select' },\n        ];\n\n        await patchOpenApiSpec({\n          patchOptions: {\n            input: (spec) => {\n              if (!('openapi' in spec)) return;\n\n              // 1. Create component parameters\n              if (!spec.components) spec.components = {};\n              if (!spec.components.parameters) spec.components.parameters = {};\n\n              for (const param of QUERY_PARAMS) {\n                (spec.components.parameters as any)[`Redfish_${param.key}`] = {\n                  description: param.description,\n                  in: 'query',\n                  name: param.key,\n                  required: false,\n                  schema: { type: 'string' },\n                };\n              }\n\n              // 2. Inject into Redfish paths\n              for (const [path, pathItem] of Object.entries(spec.paths ?? {})) {\n                if (!path.startsWith('/redfish/v1')) continue;\n                const getOp = pathItem?.get;\n                if (!getOp) continue;\n\n                if (!Array.isArray(getOp.parameters)) getOp.parameters = [];\n                for (const param of QUERY_PARAMS) {\n                  (getOp.parameters as any[]).push({\n                    $ref: `#/components/parameters/Redfish_${param.key}`,\n                  });\n                }\n              }\n            },\n          },\n          spec,\n        });\n\n        // Verify component parameters were created\n        expect(spec.components?.parameters).toHaveProperty('Redfish_$expand');\n        expect(spec.components?.parameters).toHaveProperty('Redfish_$select');\n\n        // Verify they were injected into Redfish paths\n        expect((spec.paths as any)['/redfish/v1/Systems'].get.parameters).toHaveLength(2);\n        expect((spec.paths as any)['/redfish/v1/Chassis'].get.parameters).toHaveLength(2);\n\n        // Verify they were NOT injected into non-Redfish paths\n        expect((spec.paths as any)['/other/path'].get.parameters).toBeUndefined();\n      });\n    });\n\n    describe('OpenAPI v2', () => {\n      it('calls patch.input function for v2 specs', async () => {\n        const inputFn = vi.fn();\n        const spec: OpenApi.V2_0_X = {\n          ...specMetadataV2,\n        };\n\n        await patchOpenApiSpec({\n          patchOptions: {\n            input: inputFn,\n          },\n          spec,\n        });\n\n        expect(inputFn).toHaveBeenCalledOnce();\n        expect(inputFn).toHaveBeenCalledWith(spec);\n      });\n\n      it('allows adding definitions in v2 specs', async () => {\n        const spec: OpenApi.V2_0_X = {\n          ...specMetadataV2,\n        };\n\n        await patchOpenApiSpec({\n          patchOptions: {\n            input: (spec) => {\n              if ('swagger' in spec) {\n                if (!spec.definitions) spec.definitions = {};\n                spec.definitions.NewSchema = {\n                  properties: {\n                    id: { type: 'string' },\n                  },\n                  type: 'object',\n                } as any;\n              }\n            },\n          },\n          spec,\n        });\n\n        expect(spec.definitions?.NewSchema).toEqual({\n          properties: {\n            id: { type: 'string' },\n          },\n          type: 'object',\n        });\n      });\n    });\n  });\n\n  describe('async patch support', () => {\n    describe('patch.input async', () => {\n      it('supports async patch.input function', async () => {\n        const spec: OpenApi.V3_1_X = {\n          ...specMetadataV3,\n        };\n\n        let asyncExecuted = false;\n\n        await patchOpenApiSpec({\n          patchOptions: {\n            input: async (spec) => {\n              await new Promise((resolve) => setTimeout(resolve, 10));\n              spec.info.title = 'Async Modified';\n              asyncExecuted = true;\n            },\n          },\n          spec,\n        });\n\n        expect(asyncExecuted).toBe(true);\n        expect(spec.info.title).toBe('Async Modified');\n      });\n\n      it('supports async operations in patch.input', async () => {\n        const spec: OpenApi.V3_1_X = {\n          ...specMetadataV3,\n          paths: {},\n        };\n\n        await patchOpenApiSpec({\n          patchOptions: {\n            input: async (spec) => {\n              // Simulate async operation like fetching data\n              await new Promise((resolve) => setTimeout(resolve, 5));\n              if ('openapi' in spec) {\n                if (!spec.components) spec.components = {};\n                if (!spec.components.parameters) spec.components.parameters = {};\n                spec.components.parameters.AsyncParam = {\n                  in: 'query',\n                  name: 'asyncParam',\n                  schema: { type: 'string' },\n                } as any;\n              }\n            },\n          },\n          spec,\n        });\n\n        expect(spec.components?.parameters?.AsyncParam).toEqual({\n          in: 'query',\n          name: 'asyncParam',\n          schema: { type: 'string' },\n        });\n      });\n    });\n\n    describe('shorthand async', () => {\n      it('supports async shorthand patch function', async () => {\n        const spec: OpenApi.V3_1_X = {\n          ...specMetadataV3,\n        };\n\n        let asyncExecuted = false;\n\n        await patchOpenApiSpec({\n          patchOptions: async (spec) => {\n            await new Promise((resolve) => setTimeout(resolve, 10));\n            spec.info.title = 'Async Shorthand Modified';\n            asyncExecuted = true;\n          },\n          spec,\n        });\n\n        expect(asyncExecuted).toBe(true);\n        expect(spec.info.title).toBe('Async Shorthand Modified');\n      });\n\n      it('supports async operations in shorthand function', async () => {\n        const spec: OpenApi.V3_1_X = {\n          ...specMetadataV3,\n          components: {\n            schemas: {\n              Foo: {\n                type: 'string',\n              },\n            },\n          },\n        };\n\n        await patchOpenApiSpec({\n          patchOptions: async (spec) => {\n            // Simulate async operation\n            await new Promise((resolve) => setTimeout(resolve, 5));\n            spec.info.description = 'Added via async shorthand';\n            if ('openapi' in spec && spec.components?.schemas) {\n              (spec.components.schemas as any).Bar = {\n                type: 'number',\n              };\n            }\n          },\n          spec,\n        });\n\n        expect(spec.info.description).toBe('Added via async shorthand');\n        expect((spec.components?.schemas as any)?.Bar).toEqual({\n          type: 'number',\n        });\n      });\n    });\n  });\n\n  describe('shorthand patch function', () => {\n    describe('OpenAPI v3', () => {\n      it('calls shorthand patch function', async () => {\n        const patchFn = vi.fn();\n        const spec: OpenApi.V3_1_X = {\n          ...specMetadataV3,\n        };\n\n        await patchOpenApiSpec({\n          patchOptions: patchFn,\n          spec,\n        });\n\n        expect(patchFn).toHaveBeenCalledOnce();\n        expect(patchFn).toHaveBeenCalledWith(spec);\n      });\n\n      it('allows modifications through shorthand function', async () => {\n        const spec: OpenApi.V3_1_X = {\n          ...specMetadataV3,\n        };\n\n        await patchOpenApiSpec({\n          patchOptions: (spec) => {\n            spec.info.title = 'Modified Title';\n          },\n          spec,\n        });\n\n        expect(spec.info.title).toBe('Modified Title');\n      });\n\n      it('shorthand function replaces object-based patch configuration', async () => {\n        const spec: OpenApi.V3_1_X = {\n          ...specMetadataV3,\n          components: {\n            schemas: {\n              Foo: {\n                type: 'string',\n              },\n            },\n          },\n        };\n\n        // When using shorthand syntax, only the function is called\n        // Object properties like meta or schemas would be ignored\n        await patchOpenApiSpec({\n          patchOptions: (spec) => {\n            spec.info.title = 'Shorthand Title';\n            // This is the only code that runs\n          },\n          spec,\n        });\n\n        expect(spec.info.title).toBe('Shorthand Title');\n        // Schemas remain untouched since no schema patch was applied\n        expect(spec.components?.schemas?.Foo).toEqual({ type: 'string' });\n      });\n    });\n\n    describe('OpenAPI v2', () => {\n      it('calls shorthand patch function for v2 specs', async () => {\n        const patchFn = vi.fn();\n        const spec: OpenApi.V2_0_X = {\n          ...specMetadataV2,\n        };\n\n        await patchOpenApiSpec({\n          patchOptions: patchFn,\n          spec,\n        });\n\n        expect(patchFn).toHaveBeenCalledOnce();\n        expect(patchFn).toHaveBeenCalledWith(spec);\n      });\n\n      it('allows modifications through shorthand function in v2', async () => {\n        const spec: OpenApi.V2_0_X = {\n          ...specMetadataV2,\n        };\n\n        await patchOpenApiSpec({\n          patchOptions: (spec) => {\n            spec.info.title = 'Modified V2 Title';\n          },\n          spec,\n        });\n\n        expect(spec.info.title).toBe('Modified V2 Title');\n      });\n    });\n  });\n\n  describe('edge cases', () => {\n    it('does not modify spec', async () => {\n      const spec: OpenApi.V3_1_X = {\n        ...specMetadataV3,\n        components: {\n          schemas: {\n            Foo: {\n              type: 'string',\n            },\n          },\n        },\n      };\n\n      await patchOpenApiSpec({\n        patchOptions: undefined,\n        spec,\n      });\n\n      expect(spec).toEqual({\n        ...specMetadataV3,\n        components: {\n          schemas: {\n            Foo: {\n              type: 'string',\n            },\n          },\n        },\n      });\n    });\n\n    it('does not modify spec', async () => {\n      const spec: OpenApi.V3_1_X = {\n        ...specMetadataV3,\n        components: {\n          schemas: {\n            Foo: {\n              type: 'string',\n            },\n          },\n        },\n      };\n\n      await patchOpenApiSpec({\n        patchOptions: {},\n        spec,\n      });\n\n      expect(spec).toEqual({\n        ...specMetadataV3,\n        components: {\n          schemas: {\n            Foo: {\n              type: 'string',\n            },\n          },\n        },\n      });\n    });\n  });\n\n  describe('OpenAPI v3', () => {\n    it('calls patch function', async () => {\n      const fnBar = vi.fn();\n      const fnFoo = vi.fn();\n\n      const spec: OpenApi.V3_1_X = {\n        ...specMetadataV3,\n        components: {\n          schemas: {\n            Bar: {\n              type: 'object',\n            },\n            Foo: {\n              type: 'string',\n            },\n          },\n        },\n      };\n\n      await patchOpenApiSpec({\n        patchOptions: {\n          schemas: {\n            Bar: fnBar,\n            Foo: fnFoo,\n          },\n        },\n        spec,\n      });\n\n      expect(fnBar).toHaveBeenCalledOnce();\n      expect(fnBar).toHaveBeenCalledWith({\n        type: 'object',\n      });\n      expect(fnFoo).toHaveBeenCalledOnce();\n      expect(fnFoo).toHaveBeenCalledWith({\n        type: 'string',\n      });\n    });\n\n    it('patch function mutates spec', async () => {\n      const spec: OpenApi.V3_1_X = {\n        ...specMetadataV3,\n        components: {\n          parameters: {\n            Foo: {\n              in: 'path',\n              name: 'foo',\n              schema: {\n                type: 'string',\n              },\n            },\n          },\n          requestBodies: {\n            Foo: {\n              content: {\n                'application/json': {\n                  schema: {\n                    type: 'string',\n                  },\n                },\n              },\n            },\n          },\n          responses: {\n            Foo: {\n              $ref: 'foo',\n              content: {\n                'application/json': {\n                  schema: {\n                    type: 'string',\n                  },\n                },\n              },\n            },\n          },\n          schemas: {\n            Foo: {\n              type: 'string',\n            },\n          },\n        },\n      };\n\n      await patchOpenApiSpec({\n        patchOptions: {\n          parameters: {\n            Foo: (schema) => {\n              if ('in' in schema) {\n                schema.in = 'query';\n                if (schema.schema && 'type' in schema.schema) {\n                  schema.schema.type = 'number';\n                }\n              }\n            },\n          },\n          requestBodies: {\n            Foo: (schema) => {\n              if ('content' in schema) {\n                if (\n                  schema.content['application/json'] &&\n                  schema.content['application/json'].schema\n                ) {\n                  if ('type' in schema.content['application/json'].schema) {\n                    schema.content['application/json'].schema.type = 'number';\n                  }\n                }\n              }\n            },\n          },\n          responses: {\n            Foo: (schema) => {\n              if ('content' in schema) {\n                if (\n                  schema.content &&\n                  schema.content['application/json'] &&\n                  schema.content['application/json'].schema\n                ) {\n                  if ('type' in schema.content['application/json'].schema) {\n                    schema.content['application/json'].schema.type = 'number';\n                  }\n                }\n              }\n            },\n          },\n          schemas: {\n            Foo: (schema) => {\n              schema.type = 'number';\n            },\n          },\n        },\n        spec,\n      });\n\n      expect(spec).toEqual({\n        ...specMetadataV3,\n        components: {\n          parameters: {\n            Foo: {\n              in: 'query',\n              name: 'foo',\n              schema: {\n                type: 'number',\n              },\n            },\n          },\n          requestBodies: {\n            Foo: {\n              content: {\n                'application/json': {\n                  schema: {\n                    type: 'number',\n                  },\n                },\n              },\n            },\n          },\n          responses: {\n            Foo: {\n              $ref: 'foo',\n              content: {\n                'application/json': {\n                  schema: {\n                    type: 'number',\n                  },\n                },\n              },\n            },\n          },\n          schemas: {\n            Foo: {\n              type: 'number',\n            },\n          },\n        },\n      });\n    });\n\n    it('handles spec without components', async () => {\n      const fn = vi.fn();\n\n      const spec: OpenApi.V3_1_X = {\n        ...specMetadataV3,\n      };\n\n      await patchOpenApiSpec({\n        patchOptions: {\n          parameters: {\n            Foo: fn,\n          },\n          requestBodies: {\n            Foo: fn,\n          },\n          responses: {\n            Foo: fn,\n          },\n          schemas: {\n            Foo: fn,\n          },\n        },\n        spec,\n      });\n\n      expect(fn).not.toHaveBeenCalled();\n    });\n\n    it('handles spec without component namespaces', async () => {\n      const fn = vi.fn();\n\n      const spec: OpenApi.V3_1_X = {\n        ...specMetadataV3,\n        components: {},\n      };\n\n      await patchOpenApiSpec({\n        patchOptions: {\n          parameters: {\n            Foo: fn,\n          },\n          requestBodies: {\n            Foo: fn,\n          },\n          responses: {\n            Foo: fn,\n          },\n          schemas: {\n            Foo: fn,\n          },\n        },\n        spec,\n      });\n\n      expect(fn).not.toHaveBeenCalled();\n    });\n\n    it('handles spec without matching components', async () => {\n      const fn = vi.fn();\n\n      const spec: OpenApi.V3_1_X = {\n        ...specMetadataV3,\n        components: {\n          parameters: {},\n          requestBodies: {},\n          responses: {},\n          schemas: {},\n        },\n      };\n\n      await patchOpenApiSpec({\n        patchOptions: {\n          parameters: {\n            Foo: fn,\n          },\n          requestBodies: {\n            Foo: fn,\n          },\n          responses: {\n            Foo: fn,\n          },\n          schemas: {\n            Foo: fn,\n          },\n        },\n        spec,\n      });\n\n      expect(fn).not.toHaveBeenCalled();\n    });\n\n    it('skips invalid schemas', async () => {\n      const fn = vi.fn();\n\n      const spec: OpenApi.V3_1_X = {\n        ...specMetadataV3,\n        components: {\n          schemas: {\n            Bar: 123 as any,\n            Baz: 'invalid' as any,\n            Foo: null as any,\n            Qux: {\n              type: 'string',\n            },\n          },\n        },\n      };\n\n      await patchOpenApiSpec({\n        patchOptions: {\n          schemas: {\n            Bar: fn,\n            Baz: fn,\n            Foo: fn,\n            Qux: fn,\n          },\n        },\n        spec,\n      });\n\n      expect(fn).toHaveBeenCalledOnce();\n      expect(fn).toHaveBeenCalledWith({\n        type: 'string',\n      });\n    });\n\n    it('applies meta patch function', async () => {\n      const metaFn = vi.fn((meta) => {\n        meta.title = 'Changed Title';\n      });\n      const spec: OpenApi.V3_1_X = {\n        ...specMetadataV3,\n      };\n      await patchOpenApiSpec({\n        patchOptions: {\n          meta: metaFn,\n        },\n        spec,\n      });\n      expect(metaFn).toHaveBeenCalledOnce();\n      expect(spec.info.title).toBe('Changed Title');\n    });\n\n    it('applies version patch function', async () => {\n      const versionFn = vi.fn((version) => `patched-${version}`);\n      const spec: OpenApi.V3_1_X = {\n        ...specMetadataV3,\n      };\n      await patchOpenApiSpec({\n        patchOptions: {\n          version: versionFn,\n        },\n        spec,\n      });\n      expect(versionFn).toHaveBeenCalledOnce();\n      expect(spec.openapi).toBe('patched-3.1.0');\n    });\n\n    it('calls bulk callback function for all schemas', async () => {\n      const fn = vi.fn();\n\n      const spec: OpenApi.V3_1_X = {\n        ...specMetadataV3,\n        components: {\n          schemas: {\n            Bar: {\n              type: 'object',\n            },\n            Foo: {\n              type: 'string',\n            },\n            Qux: {\n              type: 'number',\n            },\n          },\n        },\n      };\n\n      await patchOpenApiSpec({\n        patchOptions: {\n          schemas: fn,\n        },\n        spec,\n      });\n\n      expect(fn).toHaveBeenCalledTimes(3);\n      expect(fn).toHaveBeenCalledWith('Bar', { type: 'object' });\n      expect(fn).toHaveBeenCalledWith('Foo', { type: 'string' });\n      expect(fn).toHaveBeenCalledWith('Qux', { type: 'number' });\n    });\n\n    it('bulk callback mutates all schemas', async () => {\n      const spec: OpenApi.V3_1_X = {\n        ...specMetadataV3,\n        components: {\n          schemas: {\n            Bar: {\n              description: 'Bar schema',\n              type: 'object',\n            },\n            Foo: {\n              description: 'Foo schema',\n              type: 'string',\n            },\n          },\n        },\n      };\n\n      await patchOpenApiSpec({\n        patchOptions: {\n          schemas: (name, schema) => {\n            schema.description = `${schema.description} - patched`;\n          },\n        },\n        spec,\n      });\n\n      expect(spec.components?.schemas?.Bar!.description).toBe('Bar schema - patched');\n      expect(spec.components?.schemas?.Foo!.description).toBe('Foo schema - patched');\n    });\n\n    it('bulk callback can extract version from schema name', async () => {\n      const spec: OpenApi.V3_1_X = {\n        ...specMetadataV3,\n        components: {\n          schemas: {\n            OtherSchema: {\n              type: 'string',\n            },\n            ServiceRoot_v1_20_0_ServiceRoot: {\n              description: 'Service root',\n              type: 'object',\n            },\n            User_v2_3_1_User: {\n              description: 'User object',\n              type: 'object',\n            },\n          },\n        },\n      };\n\n      await patchOpenApiSpec({\n        patchOptions: {\n          schemas: (name, schema) => {\n            const match = name.match(/_v(\\d+)_(\\d+)_(\\d+)_/);\n            if (match) {\n              schema.description = `${schema.description || ''}\\n@version ${match[1]}.${match[2]}.${match[3]}`;\n            }\n          },\n        },\n        spec,\n      });\n\n      expect(spec.components?.schemas?.ServiceRoot_v1_20_0_ServiceRoot!.description).toBe(\n        'Service root\\n@version 1.20.0',\n      );\n      expect(spec.components?.schemas?.User_v2_3_1_User!.description).toBe(\n        'User object\\n@version 2.3.1',\n      );\n      expect(spec.components?.schemas?.OtherSchema!.description).toBeUndefined();\n    });\n\n    it('bulk callback skips invalid schemas', async () => {\n      const fn = vi.fn();\n\n      const spec: OpenApi.V3_1_X = {\n        ...specMetadataV3,\n        components: {\n          schemas: {\n            Bar: 123 as any,\n            Baz: 'invalid' as any,\n            Foo: null as any,\n            Qux: {\n              type: 'string',\n            },\n          },\n        },\n      };\n\n      await patchOpenApiSpec({\n        patchOptions: {\n          schemas: fn,\n        },\n        spec,\n      });\n\n      expect(fn).toHaveBeenCalledOnce();\n      expect(fn).toHaveBeenCalledWith('Qux', { type: 'string' });\n    });\n\n    it('supports async bulk callback', async () => {\n      const spec: OpenApi.V3_1_X = {\n        ...specMetadataV3,\n        components: {\n          schemas: {\n            Bar: {\n              description: 'Bar schema',\n              type: 'object',\n            },\n            Foo: {\n              description: 'Foo schema',\n              type: 'string',\n            },\n          },\n        },\n      };\n\n      await patchOpenApiSpec({\n        patchOptions: {\n          schemas: async (name, schema) => {\n            // Simulate async operation\n            await Promise.resolve();\n            schema.description = `${schema.description} - async patched`;\n          },\n        },\n        spec,\n      });\n\n      expect(spec.components?.schemas?.Bar!.description).toBe('Bar schema - async patched');\n      expect(spec.components?.schemas?.Foo!.description).toBe('Foo schema - async patched');\n    });\n\n    it('supports async Record-based callbacks', async () => {\n      const spec: OpenApi.V3_1_X = {\n        ...specMetadataV3,\n        components: {\n          schemas: {\n            Bar: {\n              description: 'Bar schema',\n              type: 'object',\n            },\n            Foo: {\n              description: 'Foo schema',\n              type: 'string',\n            },\n          },\n        },\n      };\n\n      await patchOpenApiSpec({\n        patchOptions: {\n          schemas: {\n            Bar: async (schema) => {\n              await Promise.resolve();\n              schema.description = `${schema.description} - async`;\n            },\n            Foo: async (schema) => {\n              await Promise.resolve();\n              schema.description = `${schema.description} - async`;\n            },\n          },\n        },\n        spec,\n      });\n\n      expect(spec.components?.schemas?.Bar!.description).toBe('Bar schema - async');\n      expect(spec.components?.schemas?.Foo!.description).toBe('Foo schema - async');\n    });\n  });\n\n  describe('OpenAPI v2', () => {\n    it('calls patch function', async () => {\n      const fnBar = vi.fn();\n      const fnFoo = vi.fn();\n\n      const spec: OpenApi.V2_0_X = {\n        ...specMetadataV2,\n        definitions: {\n          Bar: {\n            type: 'object',\n          },\n          Foo: {\n            type: 'string',\n          },\n        },\n      };\n\n      await patchOpenApiSpec({\n        patchOptions: {\n          schemas: {\n            Bar: fnBar,\n            Foo: fnFoo,\n          },\n        },\n        spec,\n      });\n\n      expect(fnBar).toHaveBeenCalledOnce();\n      expect(fnBar).toHaveBeenCalledWith({\n        type: 'object',\n      });\n      expect(fnFoo).toHaveBeenCalledOnce();\n      expect(fnFoo).toHaveBeenCalledWith({\n        type: 'string',\n      });\n    });\n\n    it('patch function mutates schema', async () => {\n      const spec: OpenApi.V2_0_X = {\n        ...specMetadataV2,\n        definitions: {\n          Foo: {\n            type: 'string',\n          },\n        },\n      };\n\n      await patchOpenApiSpec({\n        patchOptions: {\n          schemas: {\n            Foo: (schema) => {\n              schema.type = 'number';\n            },\n          },\n        },\n        spec,\n      });\n\n      expect(spec).toEqual({\n        ...specMetadataV2,\n        definitions: {\n          Foo: {\n            type: 'number',\n          },\n        },\n      });\n    });\n\n    it('handles spec without definitions', async () => {\n      const fn = vi.fn();\n\n      const spec: OpenApi.V2_0_X = {\n        ...specMetadataV2,\n      };\n\n      await patchOpenApiSpec({\n        patchOptions: {\n          parameters: {\n            Foo: fn,\n          },\n          requestBodies: {\n            Foo: fn,\n          },\n          responses: {\n            Foo: fn,\n          },\n          schemas: {\n            Foo: fn,\n          },\n        },\n        spec,\n      });\n\n      expect(fn).not.toHaveBeenCalled();\n    });\n\n    it('handles spec without matching definitions', async () => {\n      const fn = vi.fn();\n\n      const spec: OpenApi.V2_0_X = {\n        ...specMetadataV2,\n        definitions: {},\n      };\n\n      await patchOpenApiSpec({\n        patchOptions: {\n          parameters: {\n            Foo: fn,\n          },\n          requestBodies: {\n            Foo: fn,\n          },\n          responses: {\n            Foo: fn,\n          },\n          schemas: {\n            Foo: fn,\n          },\n        },\n        spec,\n      });\n\n      expect(fn).not.toHaveBeenCalled();\n    });\n\n    it('skips invalid schemas', async () => {\n      const fn = vi.fn();\n\n      const spec: OpenApi.V2_0_X = {\n        ...specMetadataV2,\n        definitions: {\n          Bar: 123 as any,\n          Baz: 'invalid' as any,\n          Foo: null as any,\n          Qux: {\n            type: 'string',\n          },\n        },\n      };\n\n      await patchOpenApiSpec({\n        patchOptions: {\n          schemas: {\n            Bar: fn,\n            Baz: fn,\n            Foo: fn,\n            Qux: fn,\n          },\n        },\n        spec,\n      });\n\n      expect(fn).toHaveBeenCalledOnce();\n      expect(fn).toHaveBeenCalledWith({\n        type: 'string',\n      });\n    });\n\n    it('applies meta patch function', async () => {\n      const metaFn = vi.fn((meta) => {\n        meta.title = 'Changed Title';\n      });\n      const spec: OpenApi.V2_0_X = {\n        ...specMetadataV2,\n      };\n      await patchOpenApiSpec({\n        patchOptions: {\n          meta: metaFn,\n        },\n        spec,\n      });\n      expect(metaFn).toHaveBeenCalledOnce();\n      expect(spec.info.title).toBe('Changed Title');\n    });\n\n    it('applies version patch function', async () => {\n      const versionFn = vi.fn((version) => `patched-${version}`);\n      const spec: OpenApi.V2_0_X = {\n        ...specMetadataV2,\n      };\n      await patchOpenApiSpec({\n        patchOptions: {\n          version: versionFn,\n        },\n        spec,\n      });\n      expect(versionFn).toHaveBeenCalledOnce();\n      expect(spec.swagger).toBe('patched-2.0');\n    });\n\n    it('calls bulk callback function for all schemas', async () => {\n      const fn = vi.fn();\n\n      const spec: OpenApi.V2_0_X = {\n        ...specMetadataV2,\n        definitions: {\n          Bar: {\n            type: 'object',\n          },\n          Foo: {\n            type: 'string',\n          },\n          Qux: {\n            type: 'number',\n          },\n        },\n      };\n\n      await patchOpenApiSpec({\n        patchOptions: {\n          schemas: fn,\n        },\n        spec,\n      });\n\n      expect(fn).toHaveBeenCalledTimes(3);\n      expect(fn).toHaveBeenCalledWith('Bar', { type: 'object' });\n      expect(fn).toHaveBeenCalledWith('Foo', { type: 'string' });\n      expect(fn).toHaveBeenCalledWith('Qux', { type: 'number' });\n    });\n\n    it('bulk callback mutates all schemas', async () => {\n      const spec: OpenApi.V2_0_X = {\n        ...specMetadataV2,\n        definitions: {\n          Bar: {\n            description: 'Bar schema',\n            type: 'object',\n          },\n          Foo: {\n            description: 'Foo schema',\n            type: 'string',\n          },\n        },\n      };\n\n      await patchOpenApiSpec({\n        patchOptions: {\n          schemas: (name, schema) => {\n            schema.description = `${schema.description} - patched`;\n          },\n        },\n        spec,\n      });\n\n      expect(spec.definitions?.Bar!.description).toBe('Bar schema - patched');\n      expect(spec.definitions?.Foo!.description).toBe('Foo schema - patched');\n    });\n\n    it('bulk callback can extract version from schema name', async () => {\n      const spec: OpenApi.V2_0_X = {\n        ...specMetadataV2,\n        definitions: {\n          OtherSchema: {\n            type: 'string',\n          },\n          ServiceRoot_v1_20_0_ServiceRoot: {\n            description: 'Service root',\n            type: 'object',\n          },\n          User_v2_3_1_User: {\n            description: 'User object',\n            type: 'object',\n          },\n        },\n      };\n\n      await patchOpenApiSpec({\n        patchOptions: {\n          schemas: (name, schema) => {\n            const match = name.match(/_v(\\d+)_(\\d+)_(\\d+)_/);\n            if (match) {\n              schema.description = `${schema.description || ''}\\n@version ${match[1]}.${match[2]}.${match[3]}`;\n            }\n          },\n        },\n        spec,\n      });\n\n      expect(spec.definitions?.ServiceRoot_v1_20_0_ServiceRoot!.description).toBe(\n        'Service root\\n@version 1.20.0',\n      );\n      expect(spec.definitions?.User_v2_3_1_User!.description).toBe('User object\\n@version 2.3.1');\n      expect(spec.definitions?.OtherSchema!.description).toBeUndefined();\n    });\n\n    it('bulk callback skips invalid schemas', async () => {\n      const fn = vi.fn();\n\n      const spec: OpenApi.V2_0_X = {\n        ...specMetadataV2,\n        definitions: {\n          Bar: 123 as any,\n          Baz: 'invalid' as any,\n          Foo: null as any,\n          Qux: {\n            type: 'string',\n          },\n        },\n      };\n\n      await patchOpenApiSpec({\n        patchOptions: {\n          schemas: fn,\n        },\n        spec,\n      });\n\n      expect(fn).toHaveBeenCalledOnce();\n      expect(fn).toHaveBeenCalledWith('Qux', { type: 'string' });\n    });\n\n    it('supports async bulk callback', async () => {\n      const spec: OpenApi.V2_0_X = {\n        ...specMetadataV2,\n        definitions: {\n          Bar: {\n            description: 'Bar schema',\n            type: 'object',\n          },\n          Foo: {\n            description: 'Foo schema',\n            type: 'string',\n          },\n        },\n      };\n\n      await patchOpenApiSpec({\n        patchOptions: {\n          schemas: async (name, schema) => {\n            // Simulate async operation\n            await Promise.resolve();\n            schema.description = `${schema.description} - async patched`;\n          },\n        },\n        spec,\n      });\n\n      expect(spec.definitions?.Bar!.description).toBe('Bar schema - async patched');\n      expect(spec.definitions?.Foo!.description).toBe('Foo schema - async patched');\n    });\n\n    it('supports async Record-based callbacks', async () => {\n      const spec: OpenApi.V2_0_X = {\n        ...specMetadataV2,\n        definitions: {\n          Bar: {\n            description: 'Bar schema',\n            type: 'object',\n          },\n          Foo: {\n            description: 'Foo schema',\n            type: 'string',\n          },\n        },\n      };\n\n      await patchOpenApiSpec({\n        patchOptions: {\n          schemas: {\n            Bar: async (schema) => {\n              await Promise.resolve();\n              schema.description = `${schema.description} - async`;\n            },\n            Foo: async (schema) => {\n              await Promise.resolve();\n              schema.description = `${schema.description} - async`;\n            },\n          },\n        },\n        spec,\n      });\n\n      expect(spec.definitions?.Bar!.description).toBe('Bar schema - async');\n      expect(spec.definitions?.Foo!.description).toBe('Foo schema - async');\n    });\n  });\n\n  describe('real-world usage', () => {\n    it('handles complex schema example from docs', async () => {\n      const spec: OpenApi.V3_1_X = {\n        ...specMetadataV3,\n        components: {\n          schemas: {\n            Foo: {\n              properties: {\n                id: { type: 'string' },\n                name: { type: 'string' },\n                updatedAt: {\n                  format: 'date-time',\n                  type: 'string',\n                },\n              },\n              type: 'object',\n            },\n          },\n        },\n      };\n\n      await patchOpenApiSpec({\n        patchOptions: {\n          schemas: {\n            Foo: (schema: any) => {\n              if (typeof schema.properties?.updatedAt === 'object') {\n                delete schema.properties.updatedAt.format;\n                schema.properties.updatedAt.type = 'number';\n              }\n            },\n          },\n        },\n        spec,\n      });\n\n      expect(spec).toEqual({\n        ...specMetadataV3,\n        components: {\n          schemas: {\n            Foo: {\n              properties: {\n                id: { type: 'string' },\n                name: { type: 'string' },\n                updatedAt: {\n                  type: 'number',\n                },\n              },\n              type: 'object',\n            },\n          },\n        },\n      });\n    });\n\n    it('handles adding new schema properties', async () => {\n      const spec: OpenApi.V3_1_X = {\n        ...specMetadataV3,\n        components: {\n          schemas: {\n            Foo: {\n              properties: {\n                id: { type: 'string' },\n              },\n              type: 'object',\n            },\n          },\n        },\n      };\n\n      await patchOpenApiSpec({\n        patchOptions: {\n          schemas: {\n            Foo: (schema: any) => {\n              schema.properties.meta = {\n                additionalProperties: true,\n                type: 'object',\n              };\n              schema.required = ['meta'];\n            },\n          },\n        },\n        spec,\n      });\n\n      expect(spec).toEqual({\n        ...specMetadataV3,\n        components: {\n          schemas: {\n            Foo: {\n              properties: {\n                id: { type: 'string' },\n                meta: {\n                  additionalProperties: true,\n                  type: 'object',\n                },\n              },\n              required: ['meta'],\n              type: 'object',\n            },\n          },\n        },\n      });\n    });\n\n    it('handles removing schema properties', async () => {\n      const spec: OpenApi.V3_1_X = {\n        ...specMetadataV3,\n        components: {\n          schemas: {\n            Foo: {\n              properties: {\n                id: { type: 'string' },\n                internalField: { type: 'string' },\n                publicField: { type: 'string' },\n              },\n              type: 'object',\n            },\n          },\n        },\n      };\n\n      await patchOpenApiSpec({\n        patchOptions: {\n          schemas: {\n            Foo: (schema: any) => {\n              delete schema.properties.internalField;\n            },\n          },\n        },\n        spec,\n      });\n\n      expect(spec).toEqual({\n        ...specMetadataV3,\n        components: {\n          schemas: {\n            Foo: {\n              properties: {\n                id: { type: 'string' },\n                publicField: { type: 'string' },\n              },\n              type: 'object',\n            },\n          },\n        },\n      });\n    });\n  });\n\n  describe('patch.operations', () => {\n    describe('OpenAPI v3', () => {\n      it('bulk callback mutates all operations', async () => {\n        const spec: OpenApi.V3_1_X = {\n          ...specMetadataV3,\n          paths: {\n            '/bar': {\n              post: {\n                responses: {},\n              } as any,\n            },\n            '/foo': {\n              get: {\n                responses: {},\n              } as any,\n              put: {\n                responses: {},\n              } as any,\n            },\n          },\n        };\n\n        await patchOpenApiSpec({\n          patchOptions: {\n            operations: (method, path, operation) => {\n              operation.operationId = `${method}_${path.replace(/\\//g, '_')}`;\n            },\n          },\n          spec,\n        });\n\n        expect(spec.paths!['/foo']?.get?.operationId).toBe('get__foo');\n        expect(spec.paths!['/foo']?.put?.operationId).toBe('put__foo');\n        expect(spec.paths!['/bar']?.post?.operationId).toBe('post__bar');\n      });\n\n      it('bulk callback receives correct parameters', async () => {\n        const fn = vi.fn();\n\n        const spec: OpenApi.V3_1_X = {\n          ...specMetadataV3,\n          paths: {\n            '/bar': {\n              post: {\n                responses: {},\n              } as any,\n            },\n            '/foo': {\n              get: {\n                responses: {},\n              } as any,\n            },\n          },\n        };\n\n        await patchOpenApiSpec({\n          patchOptions: {\n            operations: fn,\n          },\n          spec,\n        });\n\n        expect(fn).toHaveBeenCalledTimes(2);\n        expect(fn).toHaveBeenCalledWith('get', '/foo', spec.paths!['/foo']?.get);\n        expect(fn).toHaveBeenCalledWith('post', '/bar', spec.paths!['/bar']?.post);\n      });\n\n      it('bulk callback can inject operationId based on path patterns', async () => {\n        const spec: OpenApi.V3_1_X = {\n          ...specMetadataV3,\n          paths: {\n            '/users': {\n              get: {\n                responses: {},\n              } as any,\n              post: {\n                responses: {},\n              } as any,\n            },\n            '/users/{id}': {\n              delete: {\n                responses: {},\n              } as any,\n              get: {\n                operationId: 'existingId',\n                responses: {},\n              } as any,\n            },\n          },\n        };\n\n        await patchOpenApiSpec({\n          patchOptions: {\n            operations: (method, path, operation) => {\n              if (operation.operationId) return; // don't override existing\n\n              const segments = path.split('/').filter(Boolean);\n              const parts = segments.map((seg) => (seg.startsWith('{') ? 'ById' : seg)).join('');\n              operation.operationId = method + parts;\n            },\n          },\n          spec,\n        });\n\n        expect(spec.paths!['/users']?.get?.operationId).toBe('getusers');\n        expect(spec.paths!['/users']?.post?.operationId).toBe('postusers');\n        expect(spec.paths!['/users/{id}']?.get?.operationId).toBe('existingId'); // not overridden\n        expect(spec.paths!['/users/{id}']?.delete?.operationId).toBe('deleteusersById');\n      });\n\n      it('bulk callback skips invalid operations', async () => {\n        const fn = vi.fn();\n\n        const spec: OpenApi.V3_1_X = {\n          ...specMetadataV3,\n          paths: {\n            '/bar': {\n              get: null as any,\n              post: 'invalid' as any,\n            },\n            '/baz': 123 as any,\n            '/foo': {\n              get: {\n                responses: {},\n              } as any,\n            },\n          },\n        };\n\n        await patchOpenApiSpec({\n          patchOptions: {\n            operations: fn,\n          },\n          spec,\n        });\n\n        expect(fn).toHaveBeenCalledOnce();\n        expect(fn).toHaveBeenCalledWith('get', '/foo', spec.paths!['/foo']?.get);\n      });\n\n      it('supports async bulk callback', async () => {\n        const spec: OpenApi.V3_1_X = {\n          ...specMetadataV3,\n          paths: {\n            '/bar': {\n              post: {\n                responses: {},\n              } as any,\n            },\n            '/foo': {\n              get: {\n                responses: {},\n              } as any,\n            },\n          },\n        };\n\n        await patchOpenApiSpec({\n          patchOptions: {\n            operations: async (method, path, operation) => {\n              // Simulate async operation\n              await Promise.resolve();\n              operation.operationId = `async_${method}_${path}`;\n            },\n          },\n          spec,\n        });\n\n        expect(spec.paths!['/foo']?.get?.operationId).toBe('async_get_/foo');\n        expect(spec.paths!['/bar']?.post?.operationId).toBe('async_post_/bar');\n      });\n\n      it('supports async Record-based callbacks', async () => {\n        const spec: OpenApi.V3_1_X = {\n          ...specMetadataV3,\n          paths: {\n            '/bar': {\n              post: {\n                responses: {},\n              } as any,\n            },\n            '/foo': {\n              get: {\n                responses: {},\n              } as any,\n            },\n          },\n        };\n\n        await patchOpenApiSpec({\n          patchOptions: {\n            operations: {\n              'GET /foo': async (operation) => {\n                await Promise.resolve();\n                operation.operationId = 'asyncGetFoo';\n              },\n              'POST /bar': async (operation) => {\n                await Promise.resolve();\n                operation.operationId = 'asyncPostBar';\n              },\n            },\n          },\n          spec,\n        });\n\n        expect(spec.paths!['/foo']?.get?.operationId).toBe('asyncGetFoo');\n        expect(spec.paths!['/bar']?.post?.operationId).toBe('asyncPostBar');\n      });\n\n      it('Record-based operations still work as before', async () => {\n        const spec: OpenApi.V3_1_X = {\n          ...specMetadataV3,\n          paths: {\n            '/bar': {\n              post: {\n                responses: {},\n              } as any,\n            },\n            '/foo': {\n              get: {\n                responses: {},\n              } as any,\n            },\n          },\n        };\n\n        await patchOpenApiSpec({\n          patchOptions: {\n            operations: {\n              'GET /foo': (operation) => {\n                operation.operationId = 'getFoo';\n              },\n              'POST /bar': (operation) => {\n                operation.operationId = 'postBar';\n              },\n            },\n          },\n          spec,\n        });\n\n        expect(spec.paths!['/foo']?.get?.operationId).toBe('getFoo');\n        expect(spec.paths!['/bar']?.post?.operationId).toBe('postBar');\n      });\n\n      it('handles spec without paths', async () => {\n        const fn = vi.fn();\n\n        const spec: OpenApi.V3_1_X = {\n          ...specMetadataV3,\n        };\n\n        await patchOpenApiSpec({\n          patchOptions: {\n            operations: fn,\n          },\n          spec,\n        });\n\n        expect(fn).not.toHaveBeenCalled();\n      });\n\n      it('handles all HTTP methods', async () => {\n        const fn = vi.fn();\n\n        const spec: OpenApi.V3_1_X = {\n          ...specMetadataV3,\n          paths: {\n            '/test': {\n              delete: { responses: {} } as any,\n              get: { responses: {} } as any,\n              head: { responses: {} } as any,\n              options: { responses: {} } as any,\n              patch: { responses: {} } as any,\n              post: { responses: {} } as any,\n              put: { responses: {} } as any,\n              trace: { responses: {} } as any,\n            },\n          },\n        };\n\n        await patchOpenApiSpec({\n          patchOptions: {\n            operations: fn,\n          },\n          spec,\n        });\n\n        expect(fn).toHaveBeenCalledTimes(8);\n        expect(fn).toHaveBeenCalledWith('get', '/test', expect.any(Object));\n        expect(fn).toHaveBeenCalledWith('put', '/test', expect.any(Object));\n        expect(fn).toHaveBeenCalledWith('post', '/test', expect.any(Object));\n        expect(fn).toHaveBeenCalledWith('delete', '/test', expect.any(Object));\n        expect(fn).toHaveBeenCalledWith('options', '/test', expect.any(Object));\n        expect(fn).toHaveBeenCalledWith('head', '/test', expect.any(Object));\n        expect(fn).toHaveBeenCalledWith('patch', '/test', expect.any(Object));\n        expect(fn).toHaveBeenCalledWith('trace', '/test', expect.any(Object));\n      });\n    });\n\n    describe('OpenAPI v2', () => {\n      it('bulk callback mutates all operations', async () => {\n        const spec: OpenApi.V2_0_X = {\n          ...specMetadataV2,\n          paths: {\n            '/bar': {\n              post: {\n                responses: {},\n              } as any,\n            },\n            '/foo': {\n              get: {\n                responses: {},\n              } as any,\n              put: {\n                responses: {},\n              } as any,\n            },\n          },\n        };\n\n        await patchOpenApiSpec({\n          patchOptions: {\n            operations: (method, path, operation) => {\n              operation.operationId = `${method}_${path.replace(/\\//g, '_')}`;\n            },\n          },\n          spec,\n        });\n\n        expect(spec.paths!['/foo']?.get?.operationId).toBe('get__foo');\n        expect(spec.paths!['/foo']?.put?.operationId).toBe('put__foo');\n        expect(spec.paths!['/bar']?.post?.operationId).toBe('post__bar');\n      });\n\n      it('bulk callback receives correct parameters', async () => {\n        const fn = vi.fn();\n\n        const spec: OpenApi.V2_0_X = {\n          ...specMetadataV2,\n          paths: {\n            '/bar': {\n              post: {\n                responses: {},\n              } as any,\n            },\n            '/foo': {\n              get: {\n                responses: {},\n              } as any,\n            },\n          },\n        };\n\n        await patchOpenApiSpec({\n          patchOptions: {\n            operations: fn,\n          },\n          spec,\n        });\n\n        expect(fn).toHaveBeenCalledTimes(2);\n        expect(fn).toHaveBeenCalledWith('get', '/foo', spec.paths!['/foo']?.get);\n        expect(fn).toHaveBeenCalledWith('post', '/bar', spec.paths!['/bar']?.post);\n      });\n\n      it('supports async bulk callback', async () => {\n        const spec: OpenApi.V2_0_X = {\n          ...specMetadataV2,\n          paths: {\n            '/bar': {\n              post: {\n                responses: {},\n              } as any,\n            },\n            '/foo': {\n              get: {\n                responses: {},\n              } as any,\n            },\n          },\n        };\n\n        await patchOpenApiSpec({\n          patchOptions: {\n            operations: async (method, path, operation) => {\n              await Promise.resolve();\n              operation.operationId = `async_${method}_${path}`;\n            },\n          },\n          spec,\n        });\n\n        expect(spec.paths!['/foo']?.get?.operationId).toBe('async_get_/foo');\n        expect(spec.paths!['/bar']?.post?.operationId).toBe('async_post_/bar');\n      });\n\n      it('Record-based operations still work as before', async () => {\n        const spec: OpenApi.V2_0_X = {\n          ...specMetadataV2,\n          paths: {\n            '/bar': {\n              post: {\n                responses: {},\n              } as any,\n            },\n            '/foo': {\n              get: {\n                responses: {},\n              } as any,\n            },\n          },\n        };\n\n        await patchOpenApiSpec({\n          patchOptions: {\n            operations: {\n              'GET /foo': (operation) => {\n                operation.operationId = 'getFoo';\n              },\n              'POST /bar': (operation) => {\n                operation.operationId = 'postBar';\n              },\n            },\n          },\n          spec,\n        });\n\n        expect(spec.paths!['/foo']?.get?.operationId).toBe('getFoo');\n        expect(spec.paths!['/bar']?.post?.operationId).toBe('postBar');\n      });\n\n      it('handles all HTTP methods', async () => {\n        const fn = vi.fn();\n\n        const spec: OpenApi.V2_0_X = {\n          ...specMetadataV2,\n          paths: {\n            '/test': {\n              delete: { responses: {} } as any,\n              get: { responses: {} } as any,\n              head: { responses: {} } as any,\n              options: { responses: {} } as any,\n              patch: { responses: {} } as any,\n              post: { responses: {} } as any,\n              put: { responses: {} } as any,\n            },\n          },\n        };\n\n        await patchOpenApiSpec({\n          patchOptions: {\n            operations: fn,\n          },\n          spec,\n        });\n\n        expect(fn).toHaveBeenCalledTimes(7);\n        expect(fn).toHaveBeenCalledWith('get', '/test', expect.any(Object));\n        expect(fn).toHaveBeenCalledWith('put', '/test', expect.any(Object));\n        expect(fn).toHaveBeenCalledWith('post', '/test', expect.any(Object));\n        expect(fn).toHaveBeenCalledWith('delete', '/test', expect.any(Object));\n        expect(fn).toHaveBeenCalledWith('options', '/test', expect.any(Object));\n        expect(fn).toHaveBeenCalledWith('head', '/test', expect.any(Object));\n        expect(fn).toHaveBeenCalledWith('patch', '/test', expect.any(Object));\n      });\n    });\n  });\n});\n"
  },
  {
    "path": "packages/shared/src/openApi/shared/utils/__tests__/sanitize.test.ts",
    "content": "import { sanitizeNamespaceIdentifier } from '../operation';\n\ndescribe('sanitizeNamespaceIdentifier', () => {\n  it.each([\n    { expected: 'abc', input: 'abc' },\n    { expected: 'æbc', input: 'æbc' },\n    { expected: 'æb-c', input: 'æb.c' },\n    { expected: 'æb-c', input: '1æb.c' },\n    { expected: 'a-b-c--d---e', input: 'a/b{c}/d/$+e' },\n  ])('sanitizeNamespaceIdentifier($input) -> $expected', ({ expected, input }) => {\n    expect(sanitizeNamespaceIdentifier(input)).toEqual(expected);\n  });\n});\n"
  },
  {
    "path": "packages/shared/src/openApi/shared/utils/deepEqual.ts",
    "content": "/**\n * Deep equality for JSON-compatible values (objects, arrays, primitives).\n * Used to determine whether read/write pruned variants actually differ.\n */\nconst deepEqual = (a: unknown, b: unknown): boolean => {\n  if (a === b) return true;\n  if (a === null || b === null) return a === b;\n  const typeA = typeof a;\n  const typeB = typeof b;\n  if (typeA !== typeB) return false;\n  if (typeA !== 'object') return false;\n\n  // Arrays\n  if (Array.isArray(a) || Array.isArray(b)) {\n    if (!Array.isArray(a) || !Array.isArray(b)) return false;\n    if (a.length !== b.length) return false;\n    for (let i = 0; i < a.length; i++) {\n      if (!deepEqual(a[i], b[i])) return false;\n    }\n    return true;\n  }\n\n  // Plain objects\n  const objA = a as Record<string, unknown>;\n  const objB = b as Record<string, unknown>;\n  const keysA = Object.keys(objA).sort();\n  const keysB = Object.keys(objB).sort();\n  if (keysA.length !== keysB.length) return false;\n  for (let i = 0; i < keysA.length; i++) {\n    if (keysA[i] !== keysB[i]) return false;\n  }\n  for (const key of keysA) {\n    if (!deepEqual(objA[key], objB[key])) return false;\n  }\n  return true;\n};\n\nexport default deepEqual;\n"
  },
  {
    "path": "packages/shared/src/openApi/shared/utils/discriminator.ts",
    "content": "import type { IR } from '../../../ir/types';\nimport { refToName } from '../../../utils/ref';\n\n/**\n * Supported types for discriminator properties.\n */\nexport type DiscriminatorPropertyType = 'boolean' | 'integer' | 'number' | 'string';\n\n/**\n * Converts a string discriminator mapping value to the appropriate type based on\n * the actual property type in the schema.\n *\n * OpenAPI discriminator mappings always use string keys, but the actual discriminator\n * property may be a boolean, number, or integer. This function converts the string\n * key to the correct runtime value and IR type.\n */\nexport const convertDiscriminatorValue = (\n  value: string,\n  propertyType: DiscriminatorPropertyType,\n): { const: IR.SchemaObject['const']; type: IR.SchemaObject['type'] } => {\n  switch (propertyType) {\n    case 'boolean': {\n      const lowerValue = value.toLowerCase();\n      if (lowerValue !== 'true' && lowerValue !== 'false') {\n        console.warn(\n          '🚨',\n          `non-boolean discriminator mapping value \"${value}\" for boolean property, falling back to string`,\n        );\n        return {\n          const: value,\n          type: 'string',\n        };\n      }\n      return {\n        const: lowerValue === 'true',\n        type: 'boolean',\n      };\n    }\n    case 'integer': {\n      const parsed = parseInt(value, 10);\n      if (Number.isNaN(parsed)) {\n        console.warn(\n          '🚨',\n          `non-numeric discriminator mapping value \"${value}\" for integer property, falling back to string`,\n        );\n        return {\n          const: value,\n          type: 'string',\n        };\n      }\n      return {\n        const: parsed,\n        type: 'integer',\n      };\n    }\n    case 'number': {\n      const parsed = parseFloat(value);\n      if (Number.isNaN(parsed)) {\n        console.warn(\n          '🚨',\n          `non-numeric discriminator mapping value \"${value}\" for number property, falling back to string`,\n        );\n        return {\n          const: value,\n          type: 'string',\n        };\n      }\n      return {\n        const: parsed,\n        type: 'number',\n      };\n    }\n    default:\n      return {\n        const: value,\n        type: 'string',\n      };\n  }\n};\n\nexport const discriminatorValues = (\n  $ref: string,\n  mapping?: Record<string, string>,\n  shouldUseRefAsValue?: () => boolean,\n): ReadonlyArray<string> => {\n  const values: Array<string> = [];\n\n  for (const name in mapping) {\n    if (mapping[name] === $ref) {\n      values.push(name);\n    }\n  }\n\n  if (!values.length && (!shouldUseRefAsValue || shouldUseRefAsValue())) {\n    return [refToName($ref)];\n  }\n\n  return values;\n};\n"
  },
  {
    "path": "packages/shared/src/openApi/shared/utils/filter.ts",
    "content": "import type { Logger } from '@hey-api/codegen-core';\n\nimport type { Parser } from '../../../config/parser/types';\nimport { createOperationKey } from '../../../ir/operation';\nimport type { PathItemObject, PathsObject } from '../../../openApi/3.1.x/types/spec';\nimport type { OpenApi } from '../../../openApi/types';\nimport type { ResourceMetadata } from '../graph/meta';\nimport { httpMethods } from './operation';\n\ntype FilterNamespace = 'body' | 'operation' | 'parameter' | 'response' | 'schema' | 'unknown';\n\nconst namespaceNeedle = '/';\n\nexport const addNamespace = (namespace: FilterNamespace, value: string = ''): string =>\n  `${namespace}${namespaceNeedle}${value}`;\n\nexport const removeNamespace = (\n  key: string,\n): {\n  name: string;\n  namespace: FilterNamespace;\n} => {\n  const index = key.indexOf(namespaceNeedle);\n  const name = key.slice(index + 1);\n  return {\n    name,\n    namespace: key.slice(0, index)! as FilterNamespace,\n  };\n};\n\n/**\n * Converts reference strings from OpenAPI $ref keywords into namespaces.\n *\n * @example '#/components/schemas/Foo' -> 'schema'\n */\nexport const stringToNamespace = (value: string): FilterNamespace => {\n  switch (value) {\n    case 'parameters':\n      return 'parameter';\n    case 'requestBodies':\n      return 'body';\n    case 'responses':\n      return 'response';\n    case 'definitions':\n    case 'schemas':\n      return 'schema';\n    default:\n      return 'unknown';\n  }\n};\n\ntype FiltersConfigToState<T> = {\n  [K in keyof T]-?: NonNullable<T[K]> extends ReadonlyArray<infer U>\n    ? Set<U>\n    : NonNullable<T[K]> extends object\n      ? FiltersConfigToState<NonNullable<T[K]>>\n      : T[K];\n};\n\nexport type Filters = FiltersConfigToState<NonNullable<Parser['filters']>>;\n\ninterface SetAndRegExps {\n  regexps: Array<RegExp>;\n  set: Set<string>;\n}\n\nconst createFiltersSetAndRegExps = (\n  type: FilterNamespace,\n  filters: ReadonlyArray<string> | undefined,\n): SetAndRegExps => {\n  const keys: Array<string> = [];\n  const regexps: Array<RegExp> = [];\n  if (filters) {\n    for (const value of filters) {\n      if (value.startsWith('/') && value.endsWith('/')) {\n        regexps.push(new RegExp(value.slice(1, value.length - 1)));\n      } else {\n        keys.push(addNamespace(type, value));\n      }\n    }\n  }\n  return {\n    regexps,\n    set: new Set(keys),\n  };\n};\n\ninterface CollectFiltersSetFromRegExps {\n  excludeOperations: SetAndRegExps;\n  excludeParameters: SetAndRegExps;\n  excludeRequestBodies: SetAndRegExps;\n  excludeResponses: SetAndRegExps;\n  excludeSchemas: SetAndRegExps;\n  includeOperations: SetAndRegExps;\n  includeParameters: SetAndRegExps;\n  includeRequestBodies: SetAndRegExps;\n  includeResponses: SetAndRegExps;\n  includeSchemas: SetAndRegExps;\n}\n\nconst collectFiltersSetFromRegExpsOpenApiV2 = ({\n  excludeOperations,\n  excludeSchemas,\n  includeOperations,\n  includeSchemas,\n  spec,\n}: CollectFiltersSetFromRegExps & {\n  spec: OpenApi.V2_0_X;\n}) => {\n  if ((excludeOperations.regexps.length || includeOperations.regexps.length) && spec.paths) {\n    for (const entry of Object.entries(spec.paths)) {\n      const path = entry[0] as keyof PathsObject;\n      const pathItem = entry[1] as PathItemObject;\n      for (const method of httpMethods) {\n        const operation = pathItem[method];\n        if (!operation) {\n          continue;\n        }\n\n        const key = createOperationKey({ method, path });\n        if (excludeOperations.regexps.some((regexp) => regexp.test(key))) {\n          excludeOperations.set.add(addNamespace('operation', key));\n        }\n        if (includeOperations.regexps.some((regexp) => regexp.test(key))) {\n          includeOperations.set.add(addNamespace('operation', key));\n        }\n      }\n    }\n  }\n\n  if (spec.definitions) {\n    // TODO: add parameters\n\n    if (excludeSchemas.regexps.length || includeSchemas.regexps.length) {\n      for (const key of Object.keys(spec.definitions)) {\n        if (excludeSchemas.regexps.some((regexp) => regexp.test(key))) {\n          excludeSchemas.set.add(addNamespace('schema', key));\n        }\n        if (includeSchemas.regexps.some((regexp) => regexp.test(key))) {\n          includeSchemas.set.add(addNamespace('schema', key));\n        }\n      }\n    }\n  }\n};\n\nconst collectFiltersSetFromRegExpsOpenApiV3 = ({\n  excludeOperations,\n  excludeParameters,\n  excludeRequestBodies,\n  excludeResponses,\n  excludeSchemas,\n  includeOperations,\n  includeParameters,\n  includeRequestBodies,\n  includeResponses,\n  includeSchemas,\n  spec,\n}: CollectFiltersSetFromRegExps & {\n  spec: OpenApi.V3_0_X | OpenApi.V3_1_X;\n}) => {\n  if ((excludeOperations.regexps.length || includeOperations.regexps.length) && spec.paths) {\n    for (const entry of Object.entries(spec.paths)) {\n      const path = entry[0] as keyof PathsObject;\n      const pathItem = entry[1] as PathItemObject;\n      for (const method of httpMethods) {\n        const operation = pathItem[method];\n        if (!operation) {\n          continue;\n        }\n\n        const key = createOperationKey({ method, path });\n        if (excludeOperations.regexps.some((regexp) => regexp.test(key))) {\n          excludeOperations.set.add(addNamespace('operation', key));\n        }\n        if (includeOperations.regexps.some((regexp) => regexp.test(key))) {\n          includeOperations.set.add(addNamespace('operation', key));\n        }\n      }\n    }\n  }\n\n  if (spec.components) {\n    if (\n      (excludeParameters.regexps.length || includeParameters.regexps.length) &&\n      spec.components.parameters\n    ) {\n      for (const key of Object.keys(spec.components.parameters)) {\n        if (excludeParameters.regexps.some((regexp) => regexp.test(key))) {\n          excludeParameters.set.add(addNamespace('parameter', key));\n        }\n        if (includeParameters.regexps.some((regexp) => regexp.test(key))) {\n          includeParameters.set.add(addNamespace('parameter', key));\n        }\n      }\n    }\n\n    if (\n      (excludeRequestBodies.regexps.length || includeRequestBodies.regexps.length) &&\n      spec.components.requestBodies\n    ) {\n      for (const key of Object.keys(spec.components.requestBodies)) {\n        if (excludeRequestBodies.regexps.some((regexp) => regexp.test(key))) {\n          excludeRequestBodies.set.add(addNamespace('body', key));\n        }\n        if (includeRequestBodies.regexps.some((regexp) => regexp.test(key))) {\n          includeRequestBodies.set.add(addNamespace('body', key));\n        }\n      }\n    }\n\n    if (\n      (excludeResponses.regexps.length || includeResponses.regexps.length) &&\n      spec.components.responses\n    ) {\n      for (const key of Object.keys(spec.components.responses)) {\n        if (excludeResponses.regexps.some((regexp) => regexp.test(key))) {\n          excludeResponses.set.add(addNamespace('response', key));\n        }\n        if (includeResponses.regexps.some((regexp) => regexp.test(key))) {\n          includeResponses.set.add(addNamespace('response', key));\n        }\n      }\n    }\n\n    if (\n      (excludeSchemas.regexps.length || includeSchemas.regexps.length) &&\n      spec.components.schemas\n    ) {\n      for (const key of Object.keys(spec.components.schemas)) {\n        if (excludeSchemas.regexps.some((regexp) => regexp.test(key))) {\n          excludeSchemas.set.add(addNamespace('schema', key));\n        }\n        if (includeSchemas.regexps.some((regexp) => regexp.test(key))) {\n          includeSchemas.set.add(addNamespace('schema', key));\n        }\n      }\n    }\n  }\n};\n\nconst collectFiltersSetFromRegExps = ({\n  spec,\n  ...filters\n}: CollectFiltersSetFromRegExps & {\n  spec: OpenApi.V2_0_X | OpenApi.V3_0_X | OpenApi.V3_1_X;\n}): void => {\n  if ('swagger' in spec) {\n    collectFiltersSetFromRegExpsOpenApiV2({ ...filters, spec });\n  } else {\n    collectFiltersSetFromRegExpsOpenApiV3({ ...filters, spec });\n  }\n};\n\nexport const createFilters = (\n  config: Parser['filters'],\n  spec: OpenApi.V2_0_X | OpenApi.V3_0_X | OpenApi.V3_1_X,\n  logger: Logger,\n): Filters => {\n  const eventCreateFilters = logger.timeEvent('create-filters');\n  const excludeOperations = createFiltersSetAndRegExps('operation', config?.operations?.exclude);\n  const includeOperations = createFiltersSetAndRegExps('operation', config?.operations?.include);\n  const excludeParameters = createFiltersSetAndRegExps('parameter', config?.parameters?.exclude);\n  const includeParameters = createFiltersSetAndRegExps('parameter', config?.parameters?.include);\n  const excludeRequestBodies = createFiltersSetAndRegExps('body', config?.requestBodies?.exclude);\n  const includeRequestBodies = createFiltersSetAndRegExps('body', config?.requestBodies?.include);\n  const excludeResponses = createFiltersSetAndRegExps('response', config?.responses?.exclude);\n  const includeResponses = createFiltersSetAndRegExps('response', config?.responses?.include);\n  const excludeSchemas = createFiltersSetAndRegExps('schema', config?.schemas?.exclude);\n  const includeSchemas = createFiltersSetAndRegExps('schema', config?.schemas?.include);\n\n  collectFiltersSetFromRegExps({\n    excludeOperations,\n    excludeParameters,\n    excludeRequestBodies,\n    excludeResponses,\n    excludeSchemas,\n    includeOperations,\n    includeParameters,\n    includeRequestBodies,\n    includeResponses,\n    includeSchemas,\n    spec,\n  });\n\n  const filters: Filters = {\n    deprecated: config?.deprecated ?? true,\n    operations: {\n      exclude: excludeOperations.set,\n      include: includeOperations.set,\n    },\n    orphans: config?.orphans ?? false,\n    parameters: {\n      exclude: excludeParameters.set,\n      include: includeParameters.set,\n    },\n    preserveOrder: config?.preserveOrder ?? false,\n    requestBodies: {\n      exclude: excludeRequestBodies.set,\n      include: includeRequestBodies.set,\n    },\n    responses: {\n      exclude: excludeResponses.set,\n      include: includeResponses.set,\n    },\n    schemas: {\n      exclude: excludeSchemas.set,\n      include: includeSchemas.set,\n    },\n    tags: {\n      exclude: new Set(config?.tags?.exclude),\n      include: new Set(config?.tags?.include),\n    },\n  };\n  eventCreateFilters.timeEnd();\n  return filters;\n};\n\nexport const hasFilters = (config: Parser['filters']): boolean => {\n  if (!config) {\n    return false;\n  }\n\n  // we explicitly want to strip orphans or deprecated\n  if (config.orphans === false || config.deprecated === false) {\n    return true;\n  }\n\n  return Boolean(\n    config.operations?.exclude?.length ||\n    config.operations?.include?.length ||\n    config.parameters?.exclude?.length ||\n    config.parameters?.include?.length ||\n    config.requestBodies?.exclude?.length ||\n    config.requestBodies?.include?.length ||\n    config.responses?.exclude?.length ||\n    config.responses?.include?.length ||\n    config.schemas?.exclude?.length ||\n    config.schemas?.include?.length ||\n    config.tags?.exclude?.length ||\n    config.tags?.include?.length,\n  );\n};\n\n/**\n * Collect operations that satisfy the include/exclude filters and schema dependencies.\n */\nconst collectOperations = ({\n  filters,\n  parameters,\n  requestBodies,\n  resourceMetadata,\n  responses,\n  schemas,\n}: {\n  filters: Filters;\n  parameters: Set<string>;\n  requestBodies: Set<string>;\n  resourceMetadata: ResourceMetadata;\n  responses: Set<string>;\n  schemas: Set<string>;\n}): {\n  operations: Set<string>;\n} => {\n  const finalSet = new Set<string>();\n  const initialSet = filters.operations.include.size\n    ? filters.operations.include\n    : new Set(resourceMetadata.operations.keys());\n  const stack = [...initialSet];\n  while (stack.length) {\n    const key = stack.pop()!;\n\n    if (filters.operations.exclude.has(key) || finalSet.has(key)) {\n      continue;\n    }\n\n    const node = resourceMetadata.operations.get(key);\n\n    if (!node) {\n      continue;\n    }\n\n    if (!filters.deprecated && node.deprecated) {\n      continue;\n    }\n\n    if (\n      filters.tags.exclude.size &&\n      node.tags.size &&\n      [...filters.tags.exclude].some((tag) => node.tags.has(tag))\n    ) {\n      continue;\n    }\n\n    if (\n      filters.tags.include.size &&\n      !new Set([...filters.tags.include].filter((tag) => node.tags.has(tag))).size\n    ) {\n      continue;\n    }\n\n    // skip operation if it references any component not included\n    if (\n      [...node.dependencies].some((dependency) => {\n        const { namespace } = removeNamespace(dependency);\n        switch (namespace) {\n          case 'body':\n            return !requestBodies.has(dependency);\n          case 'parameter':\n            return !parameters.has(dependency);\n          case 'response':\n            return !responses.has(dependency);\n          case 'schema':\n            return !schemas.has(dependency);\n          default:\n            return false;\n        }\n      })\n    ) {\n      continue;\n    }\n\n    finalSet.add(key);\n  }\n  return { operations: finalSet };\n};\n\n/**\n * Collect parameters that satisfy the include/exclude filters and schema dependencies.\n */\nconst collectParameters = ({\n  filters,\n  resourceMetadata,\n  schemas,\n}: {\n  filters: Filters;\n  resourceMetadata: ResourceMetadata;\n  schemas: Set<string>;\n}): {\n  parameters: Set<string>;\n} => {\n  const finalSet = new Set<string>();\n  const initialSet = filters.parameters.include.size\n    ? filters.parameters.include\n    : new Set(resourceMetadata.parameters.keys());\n  const stack = [...initialSet];\n  while (stack.length) {\n    const key = stack.pop()!;\n\n    if (filters.parameters.exclude.has(key) || finalSet.has(key)) {\n      continue;\n    }\n\n    const node = resourceMetadata.parameters.get(key);\n\n    if (!node) {\n      continue;\n    }\n\n    if (!filters.deprecated && node.deprecated) {\n      continue;\n    }\n\n    finalSet.add(key);\n\n    if (!node.dependencies.size) {\n      continue;\n    }\n\n    for (const dependency of node.dependencies) {\n      const { namespace } = removeNamespace(dependency);\n      switch (namespace) {\n        case 'body': {\n          if (filters.requestBodies.exclude.has(dependency)) {\n            finalSet.delete(key);\n          } else if (!finalSet.has(dependency)) {\n            stack.push(dependency);\n          }\n          break;\n        }\n        case 'schema': {\n          if (filters.schemas.exclude.has(dependency)) {\n            finalSet.delete(key);\n          } else if (!schemas.has(dependency)) {\n            schemas.add(dependency);\n          }\n          break;\n        }\n      }\n    }\n  }\n  return { parameters: finalSet };\n};\n\n/**\n * Collect request bodies that satisfy the include/exclude filters and schema dependencies.\n */\nconst collectRequestBodies = ({\n  filters,\n  resourceMetadata,\n  schemas,\n}: {\n  filters: Filters;\n  resourceMetadata: ResourceMetadata;\n  schemas: Set<string>;\n}): {\n  requestBodies: Set<string>;\n} => {\n  const finalSet = new Set<string>();\n  const initialSet = filters.requestBodies.include.size\n    ? filters.requestBodies.include\n    : new Set(resourceMetadata.requestBodies.keys());\n  const stack = [...initialSet];\n  while (stack.length) {\n    const key = stack.pop()!;\n\n    if (filters.requestBodies.exclude.has(key) || finalSet.has(key)) {\n      continue;\n    }\n\n    const node = resourceMetadata.requestBodies.get(key);\n\n    if (!node) {\n      continue;\n    }\n\n    if (!filters.deprecated && node.deprecated) {\n      continue;\n    }\n\n    finalSet.add(key);\n\n    if (!node.dependencies.size) {\n      continue;\n    }\n\n    for (const dependency of node.dependencies) {\n      const { namespace } = removeNamespace(dependency);\n      switch (namespace) {\n        case 'body': {\n          if (filters.requestBodies.exclude.has(dependency)) {\n            finalSet.delete(key);\n          } else if (!finalSet.has(dependency)) {\n            stack.push(dependency);\n          }\n          break;\n        }\n        case 'schema': {\n          if (filters.schemas.exclude.has(dependency)) {\n            finalSet.delete(key);\n          } else if (!schemas.has(dependency)) {\n            schemas.add(dependency);\n          }\n          break;\n        }\n      }\n    }\n  }\n  return { requestBodies: finalSet };\n};\n\n/**\n * Collect responses that satisfy the include/exclude filters and schema dependencies.\n */\nconst collectResponses = ({\n  filters,\n  resourceMetadata,\n  schemas,\n}: {\n  filters: Filters;\n  resourceMetadata: ResourceMetadata;\n  schemas: Set<string>;\n}): {\n  responses: Set<string>;\n} => {\n  const finalSet = new Set<string>();\n  const initialSet = filters.responses.include.size\n    ? filters.responses.include\n    : new Set(resourceMetadata.responses.keys());\n  const stack = [...initialSet];\n  while (stack.length) {\n    const key = stack.pop()!;\n\n    if (filters.responses.exclude.has(key) || finalSet.has(key)) {\n      continue;\n    }\n\n    const node = resourceMetadata.responses.get(key);\n\n    if (!node) {\n      continue;\n    }\n\n    if (!filters.deprecated && node.deprecated) {\n      continue;\n    }\n\n    finalSet.add(key);\n\n    if (!node.dependencies.size) {\n      continue;\n    }\n\n    for (const dependency of node.dependencies) {\n      const { namespace } = removeNamespace(dependency);\n      switch (namespace) {\n        case 'body': {\n          if (filters.requestBodies.exclude.has(dependency)) {\n            finalSet.delete(key);\n          } else if (!finalSet.has(dependency)) {\n            stack.push(dependency);\n          }\n          break;\n        }\n        case 'schema': {\n          if (filters.schemas.exclude.has(dependency)) {\n            finalSet.delete(key);\n          } else if (!schemas.has(dependency)) {\n            schemas.add(dependency);\n          }\n          break;\n        }\n      }\n    }\n  }\n  return { responses: finalSet };\n};\n\n/**\n * Collect schemas that satisfy the include/exclude filters.\n */\nconst collectSchemas = ({\n  filters,\n  resourceMetadata,\n}: {\n  filters: Filters;\n  resourceMetadata: ResourceMetadata;\n}): {\n  schemas: Set<string>;\n} => {\n  const finalSet = new Set<string>();\n  const initialSet = filters.schemas.include.size\n    ? filters.schemas.include\n    : new Set(resourceMetadata.schemas.keys());\n  const stack = [...initialSet];\n  while (stack.length) {\n    const key = stack.pop()!;\n\n    if (filters.schemas.exclude.has(key) || finalSet.has(key)) {\n      continue;\n    }\n\n    const node = resourceMetadata.schemas.get(key);\n\n    if (!node) {\n      continue;\n    }\n\n    if (!filters.deprecated && node.deprecated) {\n      continue;\n    }\n\n    finalSet.add(key);\n\n    if (!node.dependencies.size) {\n      continue;\n    }\n\n    for (const dependency of node.dependencies) {\n      const { namespace } = removeNamespace(dependency);\n      switch (namespace) {\n        case 'schema': {\n          if (!finalSet.has(dependency) && !filters.schemas.exclude.has(dependency)) {\n            stack.push(dependency);\n          }\n          break;\n        }\n      }\n    }\n  }\n  return { schemas: finalSet };\n};\n\n/**\n * Drop parameters that depend on already excluded parameters.\n */\nconst dropExcludedParameters = ({\n  filters,\n  parameters,\n  resourceMetadata,\n}: {\n  filters: Filters;\n  parameters: Set<string>;\n  resourceMetadata: ResourceMetadata;\n}): void => {\n  if (!filters.parameters.exclude.size) {\n    return;\n  }\n\n  for (const key of parameters) {\n    const node = resourceMetadata.parameters.get(key);\n\n    if (!node?.dependencies.size) {\n      continue;\n    }\n\n    for (const excludedKey of filters.parameters.exclude) {\n      if (node.dependencies.has(excludedKey)) {\n        parameters.delete(key);\n        break;\n      }\n    }\n  }\n};\n\n/**\n * Drop request bodies that depend on already excluded request bodies.\n */\nconst dropExcludedRequestBodies = ({\n  filters,\n  requestBodies,\n  resourceMetadata,\n}: {\n  filters: Filters;\n  requestBodies: Set<string>;\n  resourceMetadata: ResourceMetadata;\n}): void => {\n  if (!filters.requestBodies.exclude.size) {\n    return;\n  }\n\n  for (const key of requestBodies) {\n    const node = resourceMetadata.requestBodies.get(key);\n\n    if (!node?.dependencies.size) {\n      continue;\n    }\n\n    for (const excludedKey of filters.requestBodies.exclude) {\n      if (node.dependencies.has(excludedKey)) {\n        requestBodies.delete(key);\n        break;\n      }\n    }\n  }\n};\n\n/**\n * Drop responses that depend on already excluded responses.\n */\nconst dropExcludedResponses = ({\n  filters,\n  resourceMetadata,\n  responses,\n}: {\n  filters: Filters;\n  resourceMetadata: ResourceMetadata;\n  responses: Set<string>;\n}): void => {\n  if (!filters.responses.exclude.size) {\n    return;\n  }\n\n  for (const key of responses) {\n    const node = resourceMetadata.responses.get(key);\n\n    if (!node?.dependencies.size) {\n      continue;\n    }\n\n    for (const excludedKey of filters.responses.exclude) {\n      if (node.dependencies.has(excludedKey)) {\n        responses.delete(key);\n        break;\n      }\n    }\n  }\n};\n\n/**\n * Drop schemas that depend on already excluded schemas.\n */\nconst dropExcludedSchemas = ({\n  filters,\n  resourceMetadata,\n  schemas,\n}: {\n  filters: Filters;\n  resourceMetadata: ResourceMetadata;\n  schemas: Set<string>;\n}): void => {\n  if (!filters.schemas.exclude.size) {\n    return;\n  }\n\n  for (const key of schemas) {\n    const node = resourceMetadata.schemas.get(key);\n\n    if (!node?.dependencies.size) {\n      continue;\n    }\n\n    for (const excludedKey of filters.schemas.exclude) {\n      if (node.dependencies.has(excludedKey)) {\n        schemas.delete(key);\n        break;\n      }\n    }\n  }\n};\n\nconst dropOrphans = ({\n  operationDependencies,\n  parameters,\n  requestBodies,\n  responses,\n  schemas,\n}: {\n  operationDependencies: Set<string>;\n  parameters: Set<string>;\n  requestBodies: Set<string>;\n  responses: Set<string>;\n  schemas: Set<string>;\n}) => {\n  for (const key of schemas) {\n    if (!operationDependencies.has(key)) {\n      schemas.delete(key);\n    }\n  }\n  for (const key of parameters) {\n    if (!operationDependencies.has(key)) {\n      parameters.delete(key);\n    }\n  }\n  for (const key of requestBodies) {\n    if (!operationDependencies.has(key)) {\n      requestBodies.delete(key);\n    }\n  }\n  for (const key of responses) {\n    if (!operationDependencies.has(key)) {\n      responses.delete(key);\n    }\n  }\n};\n\nconst collectOperationDependencies = ({\n  operations,\n  resourceMetadata,\n}: {\n  operations: Set<string>;\n  resourceMetadata: ResourceMetadata;\n}): {\n  operationDependencies: Set<string>;\n} => {\n  const finalSet = new Set<string>();\n  const initialSet = new Set(\n    [...operations].flatMap((key) => [\n      ...(resourceMetadata.operations.get(key)?.dependencies ?? []),\n    ]),\n  );\n  const stack = [...initialSet];\n  while (stack.length) {\n    const key = stack.pop()!;\n\n    if (finalSet.has(key)) {\n      continue;\n    }\n\n    finalSet.add(key);\n\n    const { namespace } = removeNamespace(key);\n    let dependencies: Set<string> | undefined;\n    if (namespace === 'body') {\n      dependencies = resourceMetadata.requestBodies.get(key)?.dependencies;\n    } else if (namespace === 'operation') {\n      dependencies = resourceMetadata.operations.get(key)?.dependencies;\n    } else if (namespace === 'parameter') {\n      dependencies = resourceMetadata.parameters.get(key)?.dependencies;\n    } else if (namespace === 'response') {\n      dependencies = resourceMetadata.responses.get(key)?.dependencies;\n    } else if (namespace === 'schema') {\n      dependencies = resourceMetadata.schemas.get(key)?.dependencies;\n    }\n\n    if (!dependencies?.size) {\n      continue;\n    }\n\n    for (const dependency of dependencies) {\n      if (!finalSet.has(dependency)) {\n        stack.push(dependency);\n      }\n    }\n  }\n  return { operationDependencies: finalSet };\n};\n\nexport const createFilteredDependencies = ({\n  filters,\n  logger,\n  resourceMetadata,\n}: {\n  filters: Filters;\n  logger: Logger;\n  resourceMetadata: ResourceMetadata;\n}): {\n  operations: Set<string>;\n  parameters: Set<string>;\n  requestBodies: Set<string>;\n  responses: Set<string>;\n  schemas: Set<string>;\n} => {\n  const eventCreateFilteredDependencies = logger.timeEvent('create-filtered-dependencies');\n  const { schemas } = collectSchemas({ filters, resourceMetadata });\n  const { parameters } = collectParameters({\n    filters,\n    resourceMetadata,\n    schemas,\n  });\n  const { requestBodies } = collectRequestBodies({\n    filters,\n    resourceMetadata,\n    schemas,\n  });\n  const { responses } = collectResponses({\n    filters,\n    resourceMetadata,\n    schemas,\n  });\n\n  dropExcludedSchemas({ filters, resourceMetadata, schemas });\n  dropExcludedParameters({ filters, parameters, resourceMetadata });\n  dropExcludedRequestBodies({ filters, requestBodies, resourceMetadata });\n  dropExcludedResponses({ filters, resourceMetadata, responses });\n\n  // collect operations after dropping components\n  const { operations } = collectOperations({\n    filters,\n    parameters,\n    requestBodies,\n    resourceMetadata,\n    responses,\n    schemas,\n  });\n\n  if (!filters.orphans && operations.size) {\n    const { operationDependencies } = collectOperationDependencies({\n      operations,\n      resourceMetadata,\n    });\n    dropOrphans({\n      operationDependencies,\n      parameters,\n      requestBodies,\n      responses,\n      schemas,\n    });\n  }\n\n  eventCreateFilteredDependencies.timeEnd();\n  return {\n    operations,\n    parameters,\n    requestBodies,\n    responses,\n    schemas,\n  };\n};\n"
  },
  {
    "path": "packages/shared/src/openApi/shared/utils/graph.ts",
    "content": "import type { Logger } from '@hey-api/codegen-core';\n\nimport type { Graph, NodeInfo } from '../../../graph';\nimport { normalizeJsonPointer, pathToJsonPointer } from '../../../utils/ref';\nimport { childSchemaRelationships } from './schemaChildRelationships';\n\n/**\n * Represents the possible access scopes for OpenAPI nodes.\n * - 'normal': Default scope for regular nodes.\n * - 'read': Node is read-only (e.g., readOnly: true).\n * - 'write': Node is write-only (e.g., writeOnly: true).\n */\nexport type Scope = 'normal' | 'read' | 'write';\n\n/**\n * Ensures every relevant child node (e.g., properties, items) in the graph has a `scopes` property.\n * If a node does not have its own scopes, it inherits from its parent if available.\n *\n * @param nodes - Map of JSON Pointer to NodeInfo.\n */\nexport const annotateChildScopes = (nodes: Graph['nodes']): void => {\n  for (const [, nodeInfo] of nodes) {\n    if (nodeInfo.scopes) continue;\n\n    if (nodeInfo.parentPointer) {\n      const parentInfo = nodes.get(nodeInfo.parentPointer);\n      if (parentInfo?.scopes) {\n        nodeInfo.scopes = new Set(parentInfo.scopes);\n      }\n    }\n  }\n};\n\ninterface Cache {\n  parentToChildren: Map<string, Array<string>>;\n  subtreeDependencies: Map<string, Set<string>>;\n  transitiveDependencies: Map<string, Set<string>>;\n}\n\ntype PointerDependenciesResult = {\n  subtreeDependencies: Set<string>;\n  transitiveDependencies: Set<string>;\n};\n\n/**\n * Recursively collects all $ref dependencies in the subtree rooted at `pointer`.\n */\nconst collectPointerDependencies = ({\n  cache,\n  graph,\n  pointer,\n  visited,\n}: {\n  cache: Cache;\n  graph: Graph;\n  pointer: string;\n  visited: Set<string>;\n}): PointerDependenciesResult => {\n  const cached = cache.transitiveDependencies.get(pointer);\n  if (cached) {\n    return {\n      subtreeDependencies: cache.subtreeDependencies.get(pointer)!,\n      transitiveDependencies: cached,\n    };\n  }\n\n  if (visited.has(pointer)) {\n    return {\n      subtreeDependencies: new Set(),\n      transitiveDependencies: new Set(),\n    };\n  }\n  visited.add(pointer);\n\n  const nodeInfo = graph.nodes.get(pointer);\n  if (!nodeInfo) {\n    return {\n      subtreeDependencies: new Set(),\n      transitiveDependencies: new Set(),\n    };\n  }\n\n  const transitiveDependencies = new Set<string>();\n  const subtreeDependencies = new Set<string>();\n\n  // Add direct $ref dependencies for this node\n  // (from the dependencies map, or by checking nodeInfo.node directly)\n  // We'll use the dependencies map for consistency:\n  const nodeDependencies = graph.nodeDependencies.get(pointer);\n  if (nodeDependencies) {\n    for (const depPointer of nodeDependencies) {\n      transitiveDependencies.add(depPointer);\n      subtreeDependencies.add(depPointer);\n      // Recursively collect dependencies of the referenced node\n      const depResult = collectPointerDependencies({\n        cache,\n        graph,\n        pointer: depPointer,\n        visited,\n      });\n      for (const dependency of depResult.transitiveDependencies) {\n        transitiveDependencies.add(dependency);\n      }\n    }\n  }\n\n  const children = cache.parentToChildren.get(pointer) ?? [];\n  for (const childPointer of children) {\n    let childResult: Partial<PointerDependenciesResult> = {\n      subtreeDependencies: cache.subtreeDependencies.get(childPointer),\n      transitiveDependencies: cache.transitiveDependencies.get(childPointer),\n    };\n    if (!childResult.subtreeDependencies || !childResult.transitiveDependencies) {\n      childResult = collectPointerDependencies({\n        cache,\n        graph,\n        pointer: childPointer,\n        visited,\n      });\n      cache.transitiveDependencies.set(childPointer, childResult.transitiveDependencies!);\n      cache.subtreeDependencies.set(childPointer, childResult.subtreeDependencies!);\n    }\n    for (const dependency of childResult.transitiveDependencies!) {\n      transitiveDependencies.add(dependency);\n    }\n    for (const dependency of childResult.subtreeDependencies!) {\n      subtreeDependencies.add(dependency);\n    }\n  }\n\n  cache.transitiveDependencies.set(pointer, transitiveDependencies);\n  cache.subtreeDependencies.set(pointer, subtreeDependencies);\n  return {\n    subtreeDependencies,\n    transitiveDependencies,\n  };\n};\n\n/**\n * Propagates scopes through the graph using a worklist algorithm.\n * Each node's scopes will be updated to include any scopes inherited via $ref dependencies, combinator/child relationships, and parent relationships.\n * Handles cycles and deep chains efficiently.\n *\n * Whenever a node's scopes change, all dependents are notified:\n *   - Its parent (if any)\n *   - All nodes that reference it via $ref (reverse dependencies)\n *   - Combinator parents (allOf/anyOf/oneOf) if applicable\n *\n * @param graph - The Graph structure containing nodes, dependencies, and reverseNodeDependencies.\n */\nexport const propagateScopes = (graph: Graph): void => {\n  const worklist: Set<string> = new Set(\n    Array.from(graph.nodes.entries())\n      .filter(([, nodeInfo]) => nodeInfo.scopes && nodeInfo.scopes.size > 0)\n      .map(([pointer]) => pointer),\n  );\n\n  /**\n   * Notifies all dependents of a node that its scopes may have changed.\n   * Dependents include:\n   *   - The parent node (if any)\n   *   - All nodes that reference this node via $ref (reverse dependencies)\n   *   - Combinator parents (allOf/anyOf/oneOf) if this node is a combinator child\n   *\n   * @param pointer - The JSON pointer of the node whose dependents to notify\n   * @param nodeInfo - The NodeInfo of the node\n   * @param childPointer - (Optional) The pointer of the child, used to detect combinator parents\n   */\n  const notifyAllDependents = (pointer: string, nodeInfo: NodeInfo, childPointer?: string) => {\n    if (nodeInfo.parentPointer) {\n      worklist.add(nodeInfo.parentPointer);\n    }\n    const reverseNodeDependencies = graph.reverseNodeDependencies.get(pointer);\n    if (reverseNodeDependencies) {\n      for (const dependentPointer of reverseNodeDependencies) {\n        worklist.add(dependentPointer);\n      }\n    }\n    if (childPointer) {\n      // If this is a combinator child, notify the combinator parent\n      const combinatorChildMatch = childPointer.match(/(.*)\\/(allOf|anyOf|oneOf)\\/\\d+$/);\n      if (combinatorChildMatch) {\n        const combinatorParentPointer = combinatorChildMatch[1];\n        if (combinatorParentPointer) {\n          worklist.add(combinatorParentPointer);\n        }\n      }\n    }\n  };\n\n  /**\n   * Propagates scopes from a child node to its parent node.\n   * If the parent's scopes change, notifies all dependents.\n   *\n   * @param pointer - The parent node's pointer\n   * @param nodeInfo - The parent node's NodeInfo\n   * @param childPointer - The child node's pointer\n   */\n  const propagateChildScopes = (\n    pointer: string,\n    nodeInfo: NodeInfo,\n    childPointer: string,\n  ): void => {\n    if (!nodeInfo?.scopes) return;\n    const childInfo = graph.nodes.get(childPointer);\n    if (!childInfo?.scopes) return;\n    const changed = propagateScopesToNode(childInfo, nodeInfo);\n    if (changed) {\n      notifyAllDependents(pointer, nodeInfo, childPointer);\n    }\n  };\n\n  while (worklist.size > 0) {\n    const pointer = worklist.values().next().value!;\n    worklist.delete(pointer);\n\n    const nodeInfo = graph.nodes.get(pointer);\n    if (!nodeInfo) continue;\n\n    if (!nodeInfo.scopes) {\n      nodeInfo.scopes = new Set();\n    }\n\n    const node = nodeInfo.node as Record<string, unknown>;\n\n    // Propagate scopes from all child schema relationships (combinators, properties, etc.)\n    for (const [keyword, type] of childSchemaRelationships) {\n      if (!node || typeof node !== 'object' || !(keyword in node)) continue;\n      const value = node[keyword];\n      if (type === 'array' && value instanceof Array) {\n        for (let index = 0; index < value.length; index++) {\n          const childPointer = `${pointer}/${keyword}/${index}`;\n          propagateChildScopes(pointer, nodeInfo, childPointer);\n        }\n      } else if (\n        type === 'objectMap' &&\n        typeof value === 'object' &&\n        value !== null &&\n        !(value instanceof Array)\n      ) {\n        for (const key of Object.keys(value)) {\n          const childPointer = `${pointer}/${keyword}/${key}`;\n          propagateChildScopes(pointer, nodeInfo, childPointer);\n        }\n      } else if (type === 'single' && typeof value === 'object' && value !== null) {\n        const childPointer = `${pointer}/${keyword}`;\n        propagateChildScopes(pointer, nodeInfo, childPointer);\n      } else if (type === 'singleOrArray') {\n        if (value instanceof Array) {\n          for (let index = 0; index < value.length; index++) {\n            const childPointer = `${pointer}/${keyword}/${index}`;\n            propagateChildScopes(pointer, nodeInfo, childPointer);\n          }\n        } else if (typeof value === 'object' && value !== null) {\n          const childPointer = `${pointer}/${keyword}`;\n          propagateChildScopes(pointer, nodeInfo, childPointer);\n        }\n      }\n    }\n\n    // Propagate scopes from $ref dependencies\n    const nodeDependencies = graph.nodeDependencies.get(pointer);\n    if (nodeDependencies) {\n      for (const depPointer of nodeDependencies) {\n        const depNode = graph.nodes.get(depPointer);\n        if (depNode?.scopes) {\n          const changed = propagateScopesToNode(depNode, nodeInfo);\n          if (changed) {\n            notifyAllDependents(pointer, nodeInfo);\n          }\n        }\n      }\n    }\n\n    // Propagate scopes up the parent chain\n    if (nodeInfo.parentPointer) {\n      const parentInfo = graph.nodes.get(nodeInfo.parentPointer);\n      if (parentInfo) {\n        const changed = propagateScopesToNode(nodeInfo, parentInfo);\n        if (changed) {\n          notifyAllDependents(nodeInfo.parentPointer, parentInfo);\n        }\n      }\n    }\n  }\n};\n\n/**\n * Propagates scopes from one node to another.\n * Adds any scopes from fromNodeInfo to toNodeInfo that are not already present.\n * Returns true if any scopes were added, false otherwise.\n *\n * @param fromNodeInfo - The node to propagate scopes from\n * @param toNodeInfo - The node to propagate scopes to\n * @returns boolean - Whether any scopes were added\n */\nconst propagateScopesToNode = (fromNodeInfo: NodeInfo, toNodeInfo: NodeInfo): boolean => {\n  if (!fromNodeInfo.scopes) {\n    return false;\n  }\n\n  if (!toNodeInfo.scopes) {\n    toNodeInfo.scopes = new Set();\n  }\n\n  let changed = false;\n\n  for (const scope of fromNodeInfo.scopes) {\n    if (!toNodeInfo.scopes.has(scope)) {\n      toNodeInfo.scopes.add(scope);\n      changed = true;\n    }\n  }\n\n  return changed;\n};\n\n/**\n * Seeds each node in the graph with its local access scope(s) based on its own properties.\n * - 'read' if readOnly: true\n * - 'write' if writeOnly: true\n * - 'normal' if node is an object property\n *\n * Only non-array objects are considered for scope seeding.\n *\n * @param nodes - Map of JSON Pointer to NodeInfo.\n */\nexport const seedLocalScopes = (nodes: Graph['nodes']): void => {\n  for (const [pointer, nodeInfo] of nodes) {\n    const { node } = nodeInfo;\n\n    if (typeof node !== 'object' || node === null || node instanceof Array) {\n      continue;\n    }\n\n    if ('readOnly' in node && node.readOnly === true) {\n      nodeInfo.scopes = new Set(['read']);\n    } else if ('writeOnly' in node && node.writeOnly === true) {\n      nodeInfo.scopes = new Set(['write']);\n    } else if (pointer.match(/\\/properties\\/[^/]+$/)) {\n      nodeInfo.scopes = new Set(['normal']);\n    }\n  }\n};\n\n/**\n * Builds a graph of all nodes in an OpenAPI spec, indexed by normalized JSON Pointer,\n * and tracks all $ref dependencies and reverse dependencies between nodes.\n *\n * - All keys in the returned maps are normalized JSON Pointers (RFC 6901, always starting with '#').\n * - The `nodes` map allows fast lookup of any node and its parent/key context.\n * - The `dependencies` map records, for each node, the set of normalized pointers it references via $ref.\n * - The `reverseNodeDependencies` map records, for each node, the set of nodes that reference it via $ref.\n * - After construction, all nodes will have their local and propagated scopes annotated.\n *\n * @param root The root object (e.g., the OpenAPI spec)\n * @returns An object with:\n *   - nodes: Map from normalized JSON Pointer string to NodeInfo\n *   - dependencies: Map from normalized JSON Pointer string to Set of referenced normalized JSON Pointers\n *   - reverseNodeDependencies: Map from normalized JSON Pointer string to Set of referencing normalized JSON Pointers\n */\nexport function buildGraph(\n  root: unknown,\n  logger: Logger,\n): {\n  graph: Graph;\n} {\n  const eventBuildGraph = logger.timeEvent('build-graph');\n  const graph: Graph = {\n    nodeDependencies: new Map(),\n    nodes: new Map(),\n    reverseNodeDependencies: new Map(),\n    subtreeDependencies: new Map(),\n    transitiveDependencies: new Map(),\n  };\n\n  const walk = ({\n    key,\n    node,\n    parentPointer,\n    path,\n  }: NodeInfo & {\n    path: ReadonlyArray<string | number>;\n  }) => {\n    if (typeof node !== 'object' || node === null) {\n      return;\n    }\n\n    const pointer = pathToJsonPointer(path);\n\n    let deprecated: boolean | undefined;\n    let tags: Set<string> | undefined;\n\n    if (typeof node === 'object' && node !== null) {\n      // Check for deprecated property\n      if ('deprecated' in node && typeof node.deprecated === 'boolean') {\n        deprecated = Boolean(node.deprecated);\n      }\n      // If this node has a $ref, record the dependency\n      if ('$ref' in node && typeof node.$ref === 'string') {\n        const refPointer = normalizeJsonPointer(node.$ref);\n        if (!graph.nodeDependencies.has(pointer)) {\n          graph.nodeDependencies.set(pointer, new Set());\n        }\n        graph.nodeDependencies.get(pointer)!.add(refPointer);\n      }\n      // Check for tags property (should be an array of strings)\n      if ('tags' in node && node.tags instanceof Array) {\n        tags = new Set(node.tags.filter((tag) => typeof tag === 'string'));\n      }\n    }\n\n    graph.nodes.set(pointer, { deprecated, key, node, parentPointer, tags });\n\n    if (node instanceof Array) {\n      node.forEach((item, index) =>\n        walk({\n          key: index,\n          node: item,\n          parentPointer: pointer,\n          path: [...path, index],\n        }),\n      );\n    } else {\n      for (const [childKey, value] of Object.entries(node)) {\n        walk({\n          key: childKey,\n          node: value,\n          parentPointer: pointer,\n          path: [...path, childKey],\n        });\n      }\n    }\n  };\n\n  walk({\n    key: null,\n    node: root,\n    parentPointer: null,\n    path: [],\n  });\n\n  const cache: Cache = {\n    parentToChildren: new Map(),\n    subtreeDependencies: new Map(),\n    transitiveDependencies: new Map(),\n  };\n\n  for (const [pointer, nodeInfo] of graph.nodes) {\n    const parent = nodeInfo.parentPointer;\n    if (!parent) continue;\n    if (!cache.parentToChildren.has(parent)) {\n      cache.parentToChildren.set(parent, []);\n    }\n    cache.parentToChildren.get(parent)!.push(pointer);\n  }\n\n  for (const [pointerFrom, pointers] of graph.nodeDependencies) {\n    for (const pointerTo of pointers) {\n      if (!graph.reverseNodeDependencies.has(pointerTo)) {\n        graph.reverseNodeDependencies.set(pointerTo, new Set());\n      }\n      graph.reverseNodeDependencies.get(pointerTo)!.add(pointerFrom);\n    }\n  }\n\n  seedLocalScopes(graph.nodes);\n  propagateScopes(graph);\n  annotateChildScopes(graph.nodes);\n\n  for (const pointer of graph.nodes.keys()) {\n    const result = collectPointerDependencies({\n      cache,\n      graph,\n      pointer,\n      visited: new Set(),\n    });\n    graph.transitiveDependencies.set(pointer, result.transitiveDependencies);\n    graph.subtreeDependencies.set(pointer, result.subtreeDependencies);\n  }\n\n  eventBuildGraph.timeEnd();\n\n  // functions creating data for debug scripts located in `dev/`\n  // const { maxChildren, maxDepth, totalNodes } = debugTools.graph.analyzeStructure(graph);\n  // const nodesForViz = debugTools.graph.exportForVisualization(graph);\n  // fs.writeFileSync('dev/graph.json', JSON.stringify(nodesForViz, null, 2));\n\n  return { graph };\n}\n"
  },
  {
    "path": "packages/shared/src/openApi/shared/utils/operation.ts",
    "content": "import type { Context } from '../../../ir/context';\nimport { createOperationKey } from '../../../ir/operation';\nimport { toCase } from '../../../utils/naming/naming';\nimport type { State } from '../types/state';\n\nexport const httpMethods = [\n  'delete',\n  'get',\n  'head',\n  'options',\n  'patch',\n  'post',\n  'put',\n  'trace',\n] as const;\n\n/**\n * Sanitizes namespace identifiers so they are valid TypeScript identifiers of a certain form.\n *\n * 1: Remove any leading characters that are illegal as starting character of a typescript identifier.\n * 2: Replace illegal characters in remaining part of type name with hyphen (-).\n *\n * Step 1 should perhaps instead also replace illegal characters with underscore, or prefix with it, like sanitizeEnumName\n * does. The way this is now one could perhaps end up removing all characters, if all are illegal start characters. It\n * would be sort of a breaking change to do so, though, previously generated code might change then.\n *\n * JavaScript identifier regexp pattern retrieved from https://developer.mozilla.org/docs/Web/JavaScript/Reference/Lexical_grammar#identifiers\n *\n * The output of this is expected to be converted to PascalCase\n *\n * @deprecated\n */\nexport const sanitizeNamespaceIdentifier = (name: string) =>\n  name\n    .replace(/^[^\\p{ID_Start}]+/u, '')\n    .replace(/[^$\\u200c\\u200d\\p{ID_Continue}]/gu, '-')\n    .replace(/[$+]/g, '-');\n\n/**\n * Returns an operation ID to use across the application. By default, we try\n * to use the provided ID. If it's not provided or the SDK is configured\n * to exclude it, we generate operation ID from its location.\n *\n * @deprecated\n */\nexport function operationToId({\n  context,\n  count = 1,\n  id,\n  method,\n  path,\n  state,\n}: {\n  context: Context;\n  count?: number;\n  id: string | undefined;\n  method: string;\n  path: string;\n  state: Pick<State, 'ids'>;\n}): string {\n  let result: string;\n\n  const { output } = context.config;\n  const targetCase =\n    (output !== undefined && typeof output === 'object' && 'case' in output\n      ? output.case\n      : undefined) ?? 'camelCase';\n\n  if (\n    id &&\n    (!context.config.plugins['@hey-api/sdk'] ||\n      // TODO: needs to be refactored...\n      // @ts-expect-error\n      (context.config.plugins['@hey-api/sdk'].config.operations &&\n        // @ts-expect-error\n        typeof context.config.plugins['@hey-api/sdk'].config.operations !== 'function' &&\n        // @ts-expect-error\n        typeof context.config.plugins['@hey-api/sdk'].config.operations === 'object' &&\n        // @ts-expect-error\n        context.config.plugins['@hey-api/sdk'].config.operations.nesting === 'operationId'))\n  ) {\n    result = toCase(sanitizeNamespaceIdentifier(id), targetCase);\n  } else {\n    const pathWithoutPlaceholders = path\n      .replace(/{(.*?)}/g, 'by-$1')\n      // replace slashes with hyphens for camelcase method at the end\n      .replace(/[/:+]/g, '-');\n\n    result = toCase(`${method}-${pathWithoutPlaceholders}`, targetCase);\n  }\n\n  if (count > 1) {\n    result = `${result}${count}`;\n  }\n\n  if (state.ids.has(result)) {\n    return operationToId({\n      context,\n      count: count + 1,\n      id,\n      method,\n      path,\n      state,\n    });\n  }\n\n  state.ids.set(result, createOperationKey({ method, path }));\n\n  return result;\n}\n"
  },
  {
    "path": "packages/shared/src/openApi/shared/utils/parameter.ts",
    "content": "import type { IR } from '../../../ir/types';\n\nexport const mergeParametersObjects = ({\n  source,\n  target,\n}: {\n  source: IR.ParametersObject | undefined;\n  target: IR.ParametersObject | undefined;\n}): IR.ParametersObject | undefined => {\n  const result = { ...target };\n\n  if (source) {\n    if (source.cookie) {\n      if (result.cookie) {\n        result.cookie = {\n          ...result.cookie,\n          ...source.cookie,\n        };\n      } else {\n        result.cookie = source.cookie;\n      }\n    }\n\n    if (source.header) {\n      if (result.header) {\n        result.header = {\n          ...result.header,\n          ...source.header,\n        };\n      } else {\n        result.header = source.header;\n      }\n    }\n\n    if (source.path) {\n      if (result.path) {\n        result.path = {\n          ...result.path,\n          ...source.path,\n        };\n      } else {\n        result.path = source.path;\n      }\n    }\n\n    if (source.query) {\n      if (result.query) {\n        result.query = {\n          ...result.query,\n          ...source.query,\n        };\n      } else {\n        result.query = source.query;\n      }\n    }\n  }\n\n  if (!Object.keys(result).length) {\n    return;\n  }\n\n  return result;\n};\n"
  },
  {
    "path": "packages/shared/src/openApi/shared/utils/patch.ts",
    "content": "import type { Patch } from '../../../config/parser/patch';\nimport type { OpenApi } from '../../../openApi/types';\n\nexport async function patchOpenApiSpec({\n  patchOptions,\n  spec: _spec,\n}: {\n  patchOptions: Patch | undefined;\n  spec: unknown;\n}) {\n  if (!patchOptions) {\n    return;\n  }\n\n  const spec = _spec as OpenApi.V2_0_X | OpenApi.V3_0_X | OpenApi.V3_1_X;\n\n  if (typeof patchOptions === 'function') {\n    await patchOptions(spec);\n    return;\n  }\n\n  if (patchOptions.input) {\n    await patchOptions.input(spec);\n  }\n\n  if ('swagger' in spec) {\n    if (patchOptions.version && spec.swagger) {\n      spec.swagger = (\n        typeof patchOptions.version === 'string'\n          ? patchOptions.version\n          : patchOptions.version(spec.swagger)\n      ) as typeof spec.swagger;\n    }\n\n    if (patchOptions.meta && spec.info) {\n      patchOptions.meta(spec.info);\n    }\n\n    if (patchOptions.schemas && spec.definitions) {\n      if (typeof patchOptions.schemas === 'function') {\n        for (const [key, schema] of Object.entries(spec.definitions)) {\n          if (schema && typeof schema === 'object') {\n            await patchOptions.schemas(key, schema);\n          }\n        }\n      } else {\n        for (const key in patchOptions.schemas) {\n          const schema = spec.definitions[key];\n          if (!schema || typeof schema !== 'object') continue;\n\n          const patchFn = patchOptions.schemas[key]!;\n          await patchFn(schema);\n        }\n      }\n    }\n\n    if (patchOptions.operations && spec.paths) {\n      if (typeof patchOptions.operations === 'function') {\n        // Bulk callback: iterate all operations\n        for (const [path, pathItem] of Object.entries(spec.paths)) {\n          if (!pathItem || typeof pathItem !== 'object') continue;\n          for (const method of [\n            'get',\n            'put',\n            'post',\n            'delete',\n            'options',\n            'head',\n            'patch',\n            'trace',\n          ]) {\n            const operation = pathItem[method as keyof typeof pathItem];\n            if (!operation || typeof operation !== 'object') continue;\n            await patchOptions.operations(method, path, operation as any);\n          }\n        }\n      } else {\n        // Record-based: iterate named operations\n        for (const key in patchOptions.operations) {\n          const [method, path] = key.split(' ');\n          if (!method || !path) continue;\n\n          const pathItem = spec.paths[path as keyof typeof spec.paths];\n          if (!pathItem) continue;\n\n          const operation =\n            pathItem[method.toLocaleLowerCase() as keyof typeof pathItem] ||\n            pathItem[method.toLocaleUpperCase() as keyof typeof pathItem];\n          if (!operation || typeof operation !== 'object') continue;\n\n          const patchFn = patchOptions.operations[key]!;\n          await patchFn(operation as any);\n        }\n      }\n    }\n    return;\n  }\n\n  if (patchOptions.version && spec.openapi) {\n    spec.openapi = (\n      typeof patchOptions.version === 'string'\n        ? patchOptions.version\n        : patchOptions.version(spec.openapi)\n    ) as typeof spec.openapi;\n  }\n\n  if (patchOptions.meta && spec.info) {\n    patchOptions.meta(spec.info);\n  }\n\n  if (spec.components) {\n    if (patchOptions.schemas && spec.components.schemas) {\n      if (typeof patchOptions.schemas === 'function') {\n        for (const [key, schema] of Object.entries(spec.components.schemas)) {\n          if (schema && typeof schema === 'object') {\n            await patchOptions.schemas(key, schema as Parameters<typeof patchOptions.schemas>[1]);\n          }\n        }\n      } else {\n        for (const key in patchOptions.schemas) {\n          const schema = spec.components.schemas[key];\n          if (!schema || typeof schema !== 'object') continue;\n\n          const patchFn = patchOptions.schemas[key]!;\n          await patchFn(schema as Parameters<typeof patchFn>[0]);\n        }\n      }\n    }\n\n    if (patchOptions.parameters && spec.components.parameters) {\n      for (const key in patchOptions.parameters) {\n        const schema = spec.components.parameters[key];\n        if (!schema || typeof schema !== 'object') continue;\n\n        const patchFn = patchOptions.parameters[key]!;\n        patchFn(schema);\n      }\n    }\n\n    if (patchOptions.requestBodies && spec.components.requestBodies) {\n      for (const key in patchOptions.requestBodies) {\n        const schema = spec.components.requestBodies[key];\n        if (!schema || typeof schema !== 'object') continue;\n\n        const patchFn = patchOptions.requestBodies[key]!;\n        patchFn(schema);\n      }\n    }\n\n    if (patchOptions.responses && spec.components.responses) {\n      for (const key in patchOptions.responses) {\n        const schema = spec.components.responses[key];\n        if (!schema || typeof schema !== 'object') continue;\n\n        const patchFn = patchOptions.responses[key]!;\n        patchFn(schema);\n      }\n    }\n  }\n\n  if (patchOptions.operations && spec.paths) {\n    if (typeof patchOptions.operations === 'function') {\n      // Bulk callback: iterate all operations\n      for (const [path, pathItem] of Object.entries(spec.paths)) {\n        if (!pathItem || typeof pathItem !== 'object') continue;\n        for (const method of [\n          'get',\n          'put',\n          'post',\n          'delete',\n          'options',\n          'head',\n          'patch',\n          'trace',\n        ]) {\n          const operation = pathItem[method as keyof typeof pathItem];\n          if (!operation || typeof operation !== 'object') continue;\n          await patchOptions.operations(method, path, operation as any);\n        }\n      }\n    } else {\n      // Record-based: iterate named operations\n      for (const key in patchOptions.operations) {\n        const [method, path] = key.split(' ');\n        if (!method || !path) continue;\n\n        const pathItem = spec.paths[path as keyof typeof spec.paths];\n        if (!pathItem) continue;\n\n        const operation =\n          pathItem[method.toLocaleLowerCase() as keyof typeof pathItem] ||\n          pathItem[method.toLocaleUpperCase() as keyof typeof pathItem];\n        if (!operation || typeof operation !== 'object') continue;\n\n        const patchFn = patchOptions.operations[key]!;\n        await patchFn(operation as any);\n      }\n    }\n  }\n}\n"
  },
  {
    "path": "packages/shared/src/openApi/shared/utils/schema.ts",
    "content": "export const deepClone = <T>(obj: T): T => JSON.parse(JSON.stringify(obj));\n"
  },
  {
    "path": "packages/shared/src/openApi/shared/utils/schemaChildRelationships.ts",
    "content": "export const childSchemaRelationships = [\n  ['additionalProperties', 'single'],\n  ['allOf', 'array'],\n  ['anyOf', 'array'],\n  ['contains', 'single'],\n  ['dependentSchemas', 'objectMap'],\n  ['else', 'single'],\n  ['if', 'single'],\n  ['items', 'singleOrArray'],\n  ['oneOf', 'array'],\n  ['patternProperties', 'objectMap'],\n  ['properties', 'objectMap'],\n  ['propertyNames', 'single'],\n  ['then', 'single'],\n  ['unevaluatedProperties', 'single'],\n] as const;\n"
  },
  {
    "path": "packages/shared/src/openApi/shared/utils/transforms.ts",
    "content": "export const getSchemasObject = (spec: unknown): Record<string, unknown> | undefined => {\n  if (hasComponentsSchemasObject(spec)) {\n    return (spec as any).components.schemas;\n  }\n  if (hasDefinitionsObject(spec)) {\n    return (spec as any).definitions;\n  }\n  return;\n};\n\n/**\n * Checks if the given spec has a valid OpenAPI 3.x components.schemas object.\n * Returns true if present, false otherwise.\n */\nexport const hasComponentsSchemasObject = (spec: unknown): boolean =>\n  typeof spec === 'object' &&\n  spec !== null &&\n  'components' in spec &&\n  typeof (spec as any).components === 'object' &&\n  (spec as any).components !== null &&\n  'schemas' in (spec as any).components &&\n  typeof (spec as any).components.schemas === 'object' &&\n  (spec as any).components.schemas !== null;\n\n/**\n * Checks if the given spec has a valid OpenAPI 2.0 definitions object.\n * Returns true if present, false otherwise.\n */\nexport const hasDefinitionsObject = (spec: unknown): boolean =>\n  typeof spec === 'object' &&\n  spec !== null &&\n  'definitions' in spec &&\n  typeof (spec as any).definitions === 'object' &&\n  (spec as any).definitions !== null;\n"
  },
  {
    "path": "packages/shared/src/openApi/shared/utils/validator.ts",
    "content": "import colors from 'ansi-colors';\n\nimport type { Context } from '../../../ir/context';\n\nexport interface ValidatorIssue {\n  /**\n   * Machine-readable issue code\n   *\n   * @example\n   * 'invalid_type'\n   */\n  code: 'duplicate_key' | 'invalid_type' | 'missing_required_field';\n  /**\n   * Optional additional data.\n   *\n   * @example\n   * 'expectedType'\n   */\n  context?: Record<string, any>;\n  /**\n   * Human-readable issue summary.\n   */\n  message: string;\n  /**\n   * JSONPath-like array to issue location.\n   */\n  path: ReadonlyArray<string | number>;\n  /**\n   * Error severity.\n   */\n  severity: 'error' | 'warning';\n}\n\nexport interface ValidatorResult {\n  issues: ReadonlyArray<ValidatorIssue>;\n  valid: boolean;\n}\n\nconst isSimpleKey = (key: string) => /^[A-Za-z_$][A-Za-z0-9_$]*$/.test(key);\n\nconst formatPath = (path: ReadonlyArray<string | number>): string =>\n  path\n    .map((segment, i) => {\n      if (typeof segment === 'number') {\n        return `[${segment}]`;\n      }\n\n      if (i === 0) {\n        // first segment no dot or brackets\n        return segment;\n      }\n\n      return isSimpleKey(segment) ? `.${segment}` : `['${segment.replace(/\"/g, \"\\\\'\")}']`;\n    })\n    .join('');\n\nconst formatValidatorIssue = (issue: ValidatorIssue): string => {\n  const pathStr = formatPath(issue.path);\n  const level = issue.severity === 'error' ? colors.bold.red : colors.bold.yellow;\n\n  const highlightedMessage = issue.message.replace(/`([^`]+)`/g, (_, code) =>\n    colors.yellow(`\\`${code}\\``),\n  );\n\n  return `${level(`[${issue.severity.toUpperCase()}]`)} ${colors.cyan(pathStr)}: ${highlightedMessage}`;\n};\n\nconst shouldPrint = ({ context, issue }: { context: Context; issue: ValidatorIssue }) => {\n  if (context.config.logs.level === 'silent') {\n    return false;\n  }\n\n  if (issue.severity === 'error') {\n    return context.config.logs.level !== 'warn';\n  }\n\n  return true;\n};\n\nexport const handleValidatorResult = ({\n  context,\n  result,\n}: {\n  context: Context;\n  result: ValidatorResult;\n}) => {\n  for (const issue of result.issues) {\n    if (shouldPrint({ context, issue })) {\n      console.log(formatValidatorIssue(issue));\n    }\n  }\n\n  if (!result.valid) {\n    process.exit(1);\n  }\n};\n"
  },
  {
    "path": "packages/shared/src/openApi/types.ts",
    "content": "/* eslint-disable @typescript-eslint/no-namespace */\nimport type { OpenApiV2_0_X, OpenApiV2_0_XTypes } from './2.0.x';\nimport type { OpenApiV3_0_X, OpenApiV3_0_XTypes } from './3.0.x';\nimport type { OpenApiV3_1_X, OpenApiV3_1_XTypes } from './3.1.x';\n\nexport namespace OpenApi {\n  export type V2_0_X = OpenApiV2_0_X;\n\n  export type V3_0_X = OpenApiV3_0_X;\n\n  export type V3_1_X = OpenApiV3_1_X;\n}\n\nexport namespace OpenApiMetaObject {\n  export type V2_0_X = OpenApiV2_0_XTypes['InfoObject'];\n\n  export type V3_0_X = OpenApiV3_0_XTypes['InfoObject'];\n\n  export type V3_1_X = OpenApiV3_1_XTypes['InfoObject'];\n}\n\nexport namespace OpenApiOperationObject {\n  export type V2_0_X = OpenApiV2_0_XTypes['OperationObject'];\n\n  export type V3_0_X = OpenApiV3_0_XTypes['OperationObject'];\n\n  export type V3_1_X = OpenApiV3_1_XTypes['OperationObject'];\n}\n\nexport namespace OpenApiParameterObject {\n  export type V3_0_X =\n    | OpenApiV3_0_XTypes['ParameterObject']\n    | OpenApiV3_0_XTypes['ReferenceObject'];\n\n  export type V3_1_X =\n    | OpenApiV3_1_XTypes['ParameterObject']\n    | OpenApiV3_1_XTypes['ReferenceObject'];\n}\n\nexport namespace OpenApiRequestBodyObject {\n  export type V3_0_X =\n    | OpenApiV3_0_XTypes['RequestBodyObject']\n    | OpenApiV3_0_XTypes['ReferenceObject'];\n\n  export type V3_1_X =\n    | OpenApiV3_1_XTypes['RequestBodyObject']\n    | OpenApiV3_1_XTypes['ReferenceObject'];\n}\n\nexport namespace OpenApiResponseObject {\n  export type V3_0_X = OpenApiV3_0_XTypes['ResponseObject'] | OpenApiV3_0_XTypes['ReferenceObject'];\n\n  export type V3_1_X = OpenApiV3_1_XTypes['ResponseObject'] | OpenApiV3_1_XTypes['ReferenceObject'];\n}\n\nexport namespace OpenApiSchemaObject {\n  export type V2_0_X = OpenApiV2_0_XTypes['SchemaObject'];\n\n  export type V3_0_X = OpenApiV3_0_XTypes['SchemaObject'];\n\n  export type V3_1_X = OpenApiV3_1_XTypes['SchemaObject'];\n}\n"
  },
  {
    "path": "packages/shared/src/parser/hooks.ts",
    "content": "import type { Node, Symbol, SymbolIn, SymbolMeta } from '@hey-api/codegen-core';\nimport type { MaybeFunc } from '@hey-api/types';\n\nimport type { SchemaProcessorContext } from '../ir/schema-processor';\nimport type { IROperationObject, IRSchemaObject } from '../ir/types';\nimport type { PluginInstance } from '../plugins/shared/utils/instance';\nimport type { NamingConfig } from '../utils/naming/types';\n\nexport type Hooks = {\n  /**\n   * Event hooks.\n   */\n  events?: {\n    /**\n     * Triggered after adding or updating a node.\n     *\n     * You can use this to perform actions after a node is added or updated.\n     *\n     * @param args Arguments object.\n     * @returns void\n     */\n    'node:set:after'?: (args: {\n      /** The node added or updated. */\n      node: Node | null;\n      /** Plugin that added or updated the node. */\n      plugin: PluginInstance;\n    }) => void;\n    /**\n     * Triggered before adding or updating a node.\n     *\n     * You can use this to modify the node before it's added or updated.\n     *\n     * @param args Arguments object.\n     * @returns void\n     */\n    'node:set:before'?: (args: {\n      /** The node to be added or updated. */\n      node: Node | null;\n      /** Plugin adding or updating the node. */\n      plugin: PluginInstance;\n    }) => void;\n    /**\n     * Triggered after executing a plugin handler.\n     *\n     * @param args Arguments object.\n     * @returns void\n     */\n    'plugin:handler:after'?: (args: {\n      /** Plugin that just executed. */\n      plugin: PluginInstance;\n    }) => void;\n    /**\n     * Triggered before executing a plugin handler.\n     *\n     * @param args Arguments object.\n     * @returns void\n     */\n    'plugin:handler:before'?: (args: {\n      /** Plugin about to execute. */\n      plugin: PluginInstance;\n    }) => void;\n    /**\n     * Triggered after registering a symbol.\n     *\n     * You can use this to perform actions after a symbol is registered.\n     *\n     * @param args Arguments object.\n     * @returns void\n     */\n    'symbol:register:after'?: (args: {\n      /** Plugin that registered the symbol. */\n      plugin: PluginInstance;\n      /** The registered symbol. */\n      symbol: Symbol;\n    }) => void;\n    /**\n     * Triggered before registering a symbol.\n     *\n     * You can use this to modify the symbol before it's registered.\n     *\n     * @param args Arguments object.\n     * @returns void\n     */\n    'symbol:register:before'?: (args: {\n      /** Plugin registering the symbol. */\n      plugin: PluginInstance;\n      /** Symbol to register. */\n      symbol: SymbolIn;\n    }) => void;\n  };\n  /**\n   * Hooks specifically for overriding operations behavior.\n   *\n   * Use these to classify operations, decide which outputs to generate,\n   * or apply custom behavior to individual operations.\n   */\n  operations?: {\n    /**\n     * Classify the given operation into one or more kinds.\n     *\n     * Each kind determines how we treat the operation (e.g., generating queries or mutations).\n     *\n     * **Default behavior:**\n     * - GET → 'query'\n     * - DELETE, PATCH, POST, PUT → 'mutation'\n     *\n     * **Resolution order:**\n     * 1. If `isQuery` or `isMutation` returns `true` or `false`, that overrides `getKind`.\n     * 2. If `isQuery` or `isMutation` returns `undefined`, the result of `getKind` is used.\n     *\n     * @param operation - The operation object to classify.\n     * @returns An array containing one or more of 'query' or 'mutation', or undefined to fallback to default behavior.\n     * @example\n     * ```ts\n     * getKind: (operation) => {\n     *   if (operation.method === 'get' && operation.path === '/search') {\n     *     return ['query', 'mutation'];\n     *   }\n     *   return; // fallback to default behavior\n     * }\n     * ```\n     */\n    getKind?: (operation: IROperationObject) => ReadonlyArray<'mutation' | 'query'> | undefined;\n    /**\n     * Check if the given operation should be treated as a mutation.\n     *\n     * This affects which outputs are generated for the operation.\n     *\n     * **Default behavior:** DELETE, PATCH, POST, and PUT operations are treated as mutations.\n     *\n     * **Resolution order:** If this returns `true` or `false`, it overrides `getKind`.\n     * If it returns `undefined`, `getKind` is used instead.\n     *\n     * @param operation - The operation object to check.\n     * @returns true if the operation is a mutation, false otherwise, or undefined to fallback to `getKind`.\n     * @example\n     * ```ts\n     * isMutation: (operation) => {\n     *   if (operation.method === 'post' && operation.path === '/search') {\n     *     return true;\n     *   }\n     *   return; // fallback to default behavior\n     * }\n     * ```\n     */\n    isMutation?: (operation: IROperationObject) => boolean | undefined;\n    /**\n     * Check if the given operation should be treated as a query.\n     *\n     * This affects which outputs are generated for the operation.\n     *\n     * **Default behavior:** GET operations are treated as queries.\n     *\n     * **Resolution order:** If this returns `true` or `false`, it overrides `getKind`.\n     * If it returns `undefined`, `getKind` is used instead.\n     *\n     * @param operation - The operation object to check.\n     * @returns true if the operation is a query, false otherwise, or undefined to fallback to `getKind`.\n     * @example\n     * ```ts\n     * isQuery: (operation) => {\n     *   if (operation.method === 'post' && operation.path === '/search') {\n     *     return true;\n     *   }\n     *   return; // fallback to default behavior\n     * }\n     * ```\n     */\n    isQuery?: (operation: IROperationObject) => boolean | undefined;\n  };\n  schemas?: {\n    /**\n     * Whether to extract the given schema into a separate symbol.\n     *\n     * This affects how schemas are processed and output.\n     *\n     * **Default behavior:** No schemas are extracted.\n     *\n     * @param ctx - The processing context for the schema.\n     * @returns true to extract the schema, false to keep it inline, or undefined to fallback to default behavior.\n     * @example\n     * ```ts\n     * shouldExtract: (ctx) => {\n     *   if (ctx.meta.resource === 'requestBody') {\n     *     return true;\n     *   }\n     *   return; // fallback to default behavior\n     * }\n     * ```\n     */\n    shouldExtract?: (ctx: SchemaProcessorContext) => boolean;\n  };\n  /**\n   * Hooks specifically for overriding symbols behavior.\n   *\n   * Use these to customize file placement.\n   */\n  symbols?: {\n    /**\n     * Optional output strategy to override default plugin behavior.\n     *\n     * Use this to re-export symbols from specific files.\n     *\n     * @returns The file path(s) that re-export this symbol, or undefined to fallback to default behavior.\n     */\n    getExportFromFilePath?: (symbol: Symbol) => ReadonlyArray<string> | undefined;\n    /**\n     * Optional output strategy to override default plugin behavior.\n     *\n     * Use this to route symbols to specific files.\n     *\n     * @returns The file path to output the symbol to, or undefined to fallback to default behavior.\n     */\n    getFilePath?: (symbol: Symbol) => string | undefined;\n    /**\n     * Optional output strategy to override default plugin behavior.\n     *\n     * Use this to customize symbol names.\n     *\n     * @returns The name to register the symbol with, or undefined to fallback to default behavior.\n     */\n    getName?: (ctx: GetNameContext) => MaybeFunc<(ctx: GetNameContext) => string | undefined>;\n  };\n};\n\nexport interface GetNameContext {\n  /** Arbitrary metadata about the symbol. */\n  meta: SymbolMeta;\n  /** The proposed name for the symbol. */\n  name: string;\n  /** The naming configuration for the symbol. */\n  naming?: NamingConfig;\n  /** The operation object associated with the symbol. */\n  operation?: IROperationObject;\n  /** The schema object associated with the symbol. */\n  schema?: IRSchemaObject;\n}\n"
  },
  {
    "path": "packages/shared/src/plugins/shared/types/instance.ts",
    "content": "import type { IrTopLevelKind } from '../../../ir/graph';\nimport type { IR } from '../../../ir/types';\n\nexport type BaseEvent = {\n  /**\n   * Path to the node, derived from the pointer.\n   */\n  _path: ReadonlyArray<string | number>;\n  /**\n   * Pointer to the node in the graph.\n   */\n  pointer: string;\n  /**\n   * Tags associated with the node.\n   */\n  tags?: ReadonlyArray<string>;\n};\n\ntype WalkEvents = BaseEvent &\n  (\n    | {\n        method: keyof IR.PathItemObject;\n        operation: IR.OperationObject;\n        path: string;\n        type: Extract<IrTopLevelKind, 'operation'>;\n      }\n    | {\n        /** Name of the parameter (e.g., \"id\" for a parameter defined as \"#/components/parameters/id\"). */\n        name: string;\n        parameter: IR.ParameterObject;\n        type: Extract<IrTopLevelKind, 'parameter'>;\n      }\n    | {\n        /** Name of the request body (e.g., \"CreateUserRequest\" for a request body defined as \"#/components/requestBodies/CreateUserRequest\"). */\n        name: string;\n        requestBody: IR.RequestBodyObject;\n        type: Extract<IrTopLevelKind, 'requestBody'>;\n      }\n    | {\n        /** Name of the schema (e.g., \"User\" for a schema defined as \"#/components/schemas/User\"). */\n        name: string;\n        schema: IR.SchemaObject;\n        type: Extract<IrTopLevelKind, 'schema'>;\n      }\n    | {\n        server: IR.ServerObject;\n        type: Extract<IrTopLevelKind, 'server'>;\n      }\n    | {\n        key: string;\n        method: keyof IR.PathItemObject;\n        operation: IR.OperationObject;\n        type: Extract<IrTopLevelKind, 'webhook'>;\n      }\n  );\n\nexport type WalkEvent<T extends IrTopLevelKind = IrTopLevelKind> = Extract<WalkEvents, { type: T }>;\n"
  },
  {
    "path": "packages/shared/src/plugins/shared/types/schema.ts",
    "content": "import type { IR } from '../../../ir/types';\n\nexport type SchemaWithType<\n  T extends Required<IR.SchemaObject>['type'] = Required<IR.SchemaObject>['type'],\n> = Omit<IR.SchemaObject, 'type'> & {\n  type: Extract<Required<IR.SchemaObject>['type'], T>;\n};\n"
  },
  {
    "path": "packages/shared/src/plugins/shared/utils/config.ts",
    "content": "import type { Plugin } from '../../types';\n\nexport const definePluginConfig =\n  <T extends Plugin.Types>(defaultConfig: Plugin.Config<T>) =>\n  (\n    userConfig?: Omit<T['config'], 'name'>,\n  ): Omit<Plugin.Config<T>, 'name'> & {\n    /**\n     * Cast name to `any` so it doesn't throw type error in `plugins` array.\n     * We could allow any `string` as plugin `name` in the object syntax, but\n     * that TypeScript trick would cause all string methods to appear as\n     * suggested auto completions, which is undesirable.\n     */\n    name: any;\n  } => ({\n    ...defaultConfig,\n    config: {\n      ...defaultConfig.config,\n      ...userConfig,\n    },\n  });\n\n/**\n * Reusable mappers for `enabled` and `name` fields.\n */\nexport const mappers = {\n  boolean: (enabled: boolean) => ({ enabled }),\n  function: (name: (...args: Array<any>) => any) => ({ name }),\n  string: (name: string) => ({ name }),\n} as const;\n"
  },
  {
    "path": "packages/shared/src/plugins/shared/utils/instance.ts",
    "content": "import path from 'node:path';\n\nimport type {\n  IProject,\n  Node,\n  Symbol,\n  SymbolIdentifier,\n  SymbolIn,\n  SymbolMeta,\n} from '@hey-api/codegen-core';\n\nimport type { Dependency } from '../../../config/utils/dependencies';\nimport { HeyApiError } from '../../../error';\nimport type { MatchPointerToGroupFn, WalkOptions } from '../../../graph';\nimport { walk } from '../../../graph';\nimport type { Context } from '../../../ir/context';\nimport type { IrTopLevelKind } from '../../../ir/graph';\nimport {\n  getIrPointerPriority,\n  irTopLevelKinds,\n  matchIrPointerToGroup,\n  preferGroups,\n} from '../../../ir/graph';\nimport type { ExampleIntent } from '../../../ir/intents';\nimport type { IR } from '../../../ir/types';\nimport type { Hooks } from '../../../parser/hooks';\nimport { jsonPointerToPath } from '../../../utils/ref';\nimport type { Plugin, PluginConfigMap } from '../../types';\nimport type { BaseEvent, WalkEvent } from '../types/instance';\n\n// eslint-disable-next-line @typescript-eslint/no-empty-object-type\nexport interface PluginInstanceTypes {}\n\n/**\n * Resolves the Node type, falling back to base Node if not augmented.\n */\ntype ResolvedNode = 'Node' extends keyof PluginInstanceTypes\n  ? // @ts-expect-error ts cannot resolve conditional types properly here\n    PluginInstanceTypes['Node']\n  : Node;\n\n// TODO: abstract\nconst defaultGetFilePath = (symbol: Symbol): string | undefined => {\n  if (!symbol.meta?.pluginName || typeof symbol.meta.pluginName !== 'string') {\n    return;\n  }\n  if (symbol.meta.pluginName.startsWith('@hey-api/client-')) {\n    return 'client';\n  }\n  if (symbol.meta.pluginName === '@hey-api/typescript') {\n    return 'types';\n  }\n  if (symbol.meta.pluginName === '@hey-api/python-sdk') {\n    return 'sdk';\n  }\n  if (symbol.meta.pluginName.startsWith('@hey-api/')) {\n    return symbol.meta.pluginName.split('/')[1];\n  }\n  return symbol.meta.pluginName;\n};\n\nconst defaultGetKind: Required<Required<Hooks>['operations']>['getKind'] = (operation) => {\n  switch (operation.method) {\n    case 'delete':\n    case 'patch':\n    case 'post':\n    case 'put':\n      return ['mutation'];\n    case 'get':\n      return ['query'];\n    default:\n      return;\n  }\n};\n\ntype EventHooks = {\n  [K in keyof Required<NonNullable<Hooks['events']>>]: Array<\n    NonNullable<NonNullable<Hooks['events']>[K]>\n  >;\n};\n\nexport class PluginInstance<T extends Plugin.Types = Plugin.Types> {\n  api: T['api'];\n  config: Omit<T['resolvedConfig'], 'name'>;\n  context: Context;\n  dependencies: Required<Plugin.Config<T>>['dependencies'] = [];\n  private eventHooks: EventHooks;\n  gen: IProject;\n  private handler: Plugin.Config<T>['handler'];\n  name: T['resolvedConfig']['name'];\n  /**\n   * The package metadata and utilities for the current context, constructed\n   * from the provided dependencies. Used for managing package-related\n   * information such as name, version, and dependency resolution during\n   * code generation.\n   */\n  package: Dependency;\n\n  constructor(\n    props: Pick<Required<Plugin.Config<T>>, 'config' | 'dependencies' | 'handler'> & {\n      api?: T['api'];\n      context: Context;\n      gen: IProject;\n      name: string;\n    },\n  ) {\n    this.api = props.api ?? {};\n    this.config = props.config;\n    this.context = props.context;\n    this.dependencies = props.dependencies;\n    this.eventHooks = this.buildEventHooks();\n    this.gen = props.gen;\n    this.handler = props.handler;\n    this.name = props.name;\n    this.package = props.context.package;\n  }\n\n  external(\n    resource: Required<SymbolMeta>['resource'],\n    meta?: Omit<SymbolMeta, 'category' | 'resource'>,\n  ): Symbol {\n    return this.gen.symbols.reference({\n      ...meta,\n      category: 'external',\n      resource,\n    });\n  }\n\n  /**\n   * Iterates over various input elements as specified by the event types, in\n   * a specific order: servers, schemas, parameters, request bodies, then\n   * operations.\n   *\n   * This ensures, for example, that schemas are always processed before\n   * operations, which may reference them.\n   *\n   * @template TKind - The event type(s) to yield. Defaults to all event types.\n   * @param events - The event types to walk over. If none are provided, all event types are included.\n   * @param callback - Function to execute for each event.\n   *\n   * @example\n   * // Iterate over all operations and schemas\n   * plugin.forEach('operation', 'schema', (event) => {\n   *   if (event.type === 'operation') {\n   *     // handle operation\n   *   } else if (event.type === 'schema') {\n   *     // handle schema\n   *   }\n   * });\n   */\n  forEach<TKind extends IrTopLevelKind = IrTopLevelKind>(\n    ...args: [...events: ReadonlyArray<TKind>, callback: (event: WalkEvent<TKind>) => void]\n  ): void;\n  forEach<TKind extends IrTopLevelKind = IrTopLevelKind>(\n    ...args: [\n      ...events: ReadonlyArray<TKind>,\n      callback: (event: WalkEvent<TKind>) => void,\n      options: WalkOptions<TKind>,\n    ]\n  ): void;\n  forEach<TKind extends IrTopLevelKind = IrTopLevelKind>(\n    ...args: [\n      ...events: ReadonlyArray<TKind>,\n      callback: (event: WalkEvent<TKind>) => void,\n      options: any,\n    ]\n  ): void {\n    if (!this.context.graph) {\n      throw new Error('No graph available in context');\n    }\n\n    let callback: (event: WalkEvent<TKind>) => void;\n    let events: ReadonlyArray<TKind>;\n    let options: WalkOptions<TKind> = {\n      getPointerPriority: getIrPointerPriority,\n      // default functions operate on the full union of kinds; cast them\n      // to the WalkOptions generic to keep strict typing for callers.\n      matchPointerToGroup: matchIrPointerToGroup as unknown as MatchPointerToGroupFn<TKind>,\n      order: 'topological',\n      preferGroups: preferGroups as unknown as ReadonlyArray<TKind>,\n    };\n    if (typeof args[args.length - 1] === 'function') {\n      events = args.slice(0, -1);\n      callback = args[args.length - 1];\n    } else {\n      events = args.slice(0, -2);\n      callback = args[args.length - 2];\n      options = {\n        ...options,\n        ...args[args.length - 1],\n      };\n    }\n    const eventSet = new Set(events.length ? events : irTopLevelKinds);\n\n    walk(\n      this.context.graph,\n      (pointer, nodeInfo) => {\n        const result = matchIrPointerToGroup(pointer);\n        if (!result.matched || !eventSet.has(result.kind)) return;\n        let event: WalkEvent | undefined;\n        const baseEvent: BaseEvent = {\n          _path: jsonPointerToPath(pointer),\n          pointer,\n          tags: nodeInfo.tags ? Array.from(nodeInfo.tags) : undefined,\n        };\n        switch (result.kind) {\n          case 'operation':\n            event = {\n              ...baseEvent,\n              method: nodeInfo.key as keyof IR.PathItemObject,\n              operation: nodeInfo.node as IR.OperationObject,\n              path: baseEvent._path[1] as string,\n              type: result.kind,\n            } satisfies WalkEvent<'operation'>;\n            break;\n          case 'parameter':\n            event = {\n              ...baseEvent,\n              name: nodeInfo.key as string,\n              parameter: nodeInfo.node as IR.ParameterObject,\n              type: result.kind,\n            } satisfies WalkEvent<'parameter'>;\n            break;\n          case 'requestBody':\n            event = {\n              ...baseEvent,\n              name: nodeInfo.key as string,\n              requestBody: nodeInfo.node as IR.RequestBodyObject,\n              type: result.kind,\n            } satisfies WalkEvent<'requestBody'>;\n            break;\n          case 'schema':\n            event = {\n              ...baseEvent,\n              name: nodeInfo.key as string,\n              schema: nodeInfo.node as IR.SchemaObject,\n              type: result.kind,\n            } satisfies WalkEvent<'schema'>;\n            break;\n          case 'server':\n            event = {\n              ...baseEvent,\n              server: nodeInfo.node as IR.ServerObject,\n              type: result.kind,\n            } satisfies WalkEvent<'server'>;\n            break;\n          case 'webhook':\n            event = {\n              ...baseEvent,\n              key: baseEvent._path[1] as string,\n              method: nodeInfo.key as keyof IR.PathItemObject,\n              operation: nodeInfo.node as IR.OperationObject,\n              type: result.kind,\n            } satisfies WalkEvent<'webhook'>;\n            break;\n        }\n        if (event) {\n          try {\n            callback(event as WalkEvent<TKind>);\n          } catch (error) {\n            this.forEachError(error, event);\n          }\n        }\n      },\n      options,\n    );\n  }\n\n  /**\n   * Retrieves a registered plugin instance by its name from the context. This\n   * allows plugins to access other plugins that have been registered in the\n   * same context, enabling cross-plugin communication and dependencies.\n   *\n   * @param name Plugin name as defined in the configuration.\n   * @returns The plugin instance if found, undefined otherwise.\n   */\n  getPlugin<TName extends keyof PluginConfigMap>(\n    name: TName,\n  ): TName extends any ? PluginInstance<PluginConfigMap[TName]> | undefined : never {\n    return this.context.plugins[name] as any;\n  }\n\n  /**\n   * Retrieves a registered plugin instance by its name from the context. This\n   * allows plugins to access other plugins that have been registered in the\n   * same context, enabling cross-plugin communication and dependencies.\n   *\n   * @param name Plugin name as defined in the configuration.\n   * @returns The plugin instance if found, throw otherwise.\n   */\n  getPluginOrThrow<TName extends keyof PluginConfigMap>(\n    name: TName,\n  ): TName extends any ? PluginInstance<PluginConfigMap[TName]> : never {\n    const plugin = this.getPlugin(name);\n    if (!plugin) throw new Error(`plugin not found ${name}`);\n    return plugin as any;\n  }\n\n  getSymbol(identifier: SymbolIdentifier): Symbol | undefined {\n    return this.gen.symbols.get(identifier);\n  }\n\n  hooks = {\n    operation: {\n      isMutation: (operation: IR.OperationObject): boolean =>\n        this.isOperationKind(operation, 'mutation'),\n      isQuery: (operation: IR.OperationObject): boolean => this.isOperationKind(operation, 'query'),\n    },\n  };\n\n  /**\n   * Registers an intent in the context's intent list.\n   *\n   * @param intent The intent to be registered.\n   * @returns void\n   */\n  intent(intent: ExampleIntent): void {\n    this.context.intents.push(intent);\n  }\n\n  isSymbolRegistered(identifier: SymbolIdentifier): boolean {\n    return this.gen.symbols.isRegistered(identifier);\n  }\n\n  /**\n   * Sets or adds a node to the project graph.\n   *\n   * @param node The node to be added or updated in the project graph.\n   * @param index The index at which to update the node. If undefined, the node will be added.\n   * @returns The index of the added node or void if updated.\n   */\n  node<T extends number | undefined = undefined>(\n    node: Node | null,\n    index?: T,\n  ): T extends number ? void : number {\n    for (const hook of this.eventHooks['node:set:before']) {\n      hook({ node, plugin: this as any });\n    }\n    const result =\n      index !== undefined ? this.gen.nodes.update(index, node) : this.gen.nodes.add(node);\n    for (const hook of this.eventHooks['node:set:after']) {\n      hook({ node, plugin: this as any });\n    }\n    return result as T extends number ? void : number;\n  }\n\n  querySymbol(filter: SymbolMeta): Symbol<ResolvedNode> | undefined {\n    return this.gen.symbols.query(filter)[0] as Symbol<ResolvedNode> | undefined;\n  }\n\n  referenceSymbol(meta: SymbolMeta): Symbol<ResolvedNode> {\n    return this.gen.symbols.reference(meta) as Symbol<ResolvedNode>;\n  }\n\n  /**\n   * Alias for `symbol()` method with single argument.\n   */\n  registerSymbol(symbol: SymbolIn): Symbol<ResolvedNode> {\n    return this.symbol(symbol.name, symbol) as Symbol<ResolvedNode>;\n  }\n\n  /**\n   * Executes plugin's handler function.\n   */\n  async run(): Promise<void> {\n    for (const hook of this.eventHooks['plugin:handler:before']) {\n      hook({ plugin: this as any });\n    }\n    await this.handler({ plugin: this });\n    for (const hook of this.eventHooks['plugin:handler:after']) {\n      hook({ plugin: this as any });\n    }\n  }\n\n  symbol(name: SymbolIn['name'], symbol?: Omit<SymbolIn, 'name'>): Symbol<ResolvedNode> {\n    const symbolIn: SymbolIn = {\n      ...symbol,\n      meta: {\n        pluginName: path.isAbsolute(this.name) ? 'custom' : this.name,\n        ...symbol?.meta,\n      },\n      name,\n    };\n    if (symbolIn.getExportFromFilePath === undefined) {\n      symbolIn.getExportFromFilePath = this.getSymbolExportFromFilePath.bind(this);\n    }\n    if (symbolIn.getFilePath === undefined) {\n      symbolIn.getFilePath = this.getSymbolFilePath.bind(this);\n    }\n    for (const hook of this.eventHooks['symbol:register:before']) {\n      hook({ plugin: this as any, symbol: symbolIn });\n    }\n    const symbolOut = this.gen.symbols.register(symbolIn);\n    for (const hook of this.eventHooks['symbol:register:after']) {\n      hook({ plugin: this as any, symbol: symbolOut });\n    }\n    return symbolOut as Symbol<ResolvedNode>;\n  }\n\n  /**\n   * Registers a symbol only if it does not already exist based on the provided\n   * metadata. This prevents duplicate symbols from being created in the project.\n   */\n  symbolOnce(name: SymbolIn['name'], symbol?: Omit<SymbolIn, 'name'>): Symbol {\n    const meta = {\n      ...symbol?.meta,\n    };\n    if (symbol?.external) {\n      meta.category = 'external';\n      meta.resource = symbol.external;\n    }\n    const existing = this.querySymbol(meta);\n    if (existing) return existing;\n    return this.symbol(name, { ...symbol, meta });\n  }\n\n  private buildEventHooks(): EventHooks {\n    const result: EventHooks = {\n      'node:set:after': [],\n      'node:set:before': [],\n      'plugin:handler:after': [],\n      'plugin:handler:before': [],\n      'symbol:register:after': [],\n      'symbol:register:before': [],\n    };\n    const scopes = [this.config['~hooks']?.events, this.context.config.parser.hooks.events];\n    for (const scope of scopes) {\n      if (!scope) continue;\n      for (const [key, value] of Object.entries(scope)) {\n        if (value) {\n          result[key as keyof typeof result].push(value.bind(scope) as any);\n        }\n      }\n    }\n    return result;\n  }\n\n  private forEachError(error: unknown, event: WalkEvent) {\n    const originalError = error instanceof Error ? error : new Error(String(error));\n    throw new HeyApiError({\n      args: [event],\n      error: originalError,\n      event: event.type,\n      name: 'Error',\n      pluginName: this.name,\n    });\n  }\n\n  private getSymbolExportFromFilePath(symbol: Symbol): ReadonlyArray<string> | undefined {\n    const hooks = [this.config['~hooks']?.symbols, this.context.config.parser.hooks.symbols];\n    for (const hook of hooks) {\n      const result = hook?.getExportFromFilePath?.(symbol);\n      if (result !== undefined) return result;\n    }\n\n    // default logic below\n    const entryFile = this.context.config.output.indexFile ?? this.context.config.output.entryFile;\n    if (symbol.external || !entryFile) return;\n\n    const includeInEntry = this.config.exportFromIndex ?? this.config.includeInEntry;\n    if (\n      (typeof includeInEntry === 'boolean' && !includeInEntry) ||\n      (typeof includeInEntry === 'function' && !includeInEntry(symbol))\n    ) {\n      return;\n    }\n\n    const language = symbol.node?.language;\n    if (!language) return;\n\n    const moduleEntryName = this.gen.moduleEntryNames[language];\n    if (!moduleEntryName) return;\n\n    return [moduleEntryName];\n  }\n\n  private getSymbolFilePath(symbol: Symbol): string | undefined {\n    const hooks = [this.config['~hooks']?.symbols, this.context.config.parser.hooks.symbols];\n    for (const hook of hooks) {\n      const result = hook?.getFilePath?.(symbol);\n      if (result !== undefined) return result;\n    }\n    return defaultGetFilePath(symbol);\n  }\n\n  private isOperationKind(operation: IR.OperationObject, kind: 'mutation' | 'query'): boolean {\n    const method = kind === 'query' ? 'isQuery' : 'isMutation';\n    const hooks = [\n      this.config['~hooks']?.operations?.[method],\n      this.config['~hooks']?.operations?.getKind,\n      this.context.config.parser.hooks.operations?.[method],\n      this.context.config.parser.hooks.operations?.getKind,\n      defaultGetKind,\n    ];\n    for (const hook of hooks) {\n      if (hook) {\n        const result = hook(operation);\n        if (result !== undefined) {\n          return typeof result === 'boolean' ? result : result.includes(kind);\n        }\n      }\n    }\n    return false;\n  }\n}\n"
  },
  {
    "path": "packages/shared/src/plugins/symbol.ts",
    "content": "import type { SymbolIn } from '@hey-api/codegen-core';\n\nimport type { GetNameContext } from '../parser/hooks';\nimport { applyNaming } from '../utils/naming/naming';\nimport type { PluginInstance } from './shared/utils/instance';\n\n/**\n * Helper function to build the input for symbol registration, applying naming hooks if provided.\n */\nexport function buildSymbolIn({\n  plugin,\n  ...ctx\n}: GetNameContext & {\n  plugin: {\n    config: Pick<PluginInstance['config'], '~hooks'>;\n    context: {\n      config: {\n        parser: Pick<PluginInstance['context']['config']['parser'], 'hooks'>;\n      };\n    };\n  };\n}): SymbolIn {\n  const hooks = [\n    plugin.config['~hooks']?.symbols?.getName,\n    plugin.context.config.parser.hooks.symbols?.getName,\n  ];\n  for (const hook of hooks) {\n    if (!hook) continue;\n\n    const result = hook(ctx);\n    if (typeof result === 'function') {\n      const name = result(ctx);\n      if (name) {\n        return {\n          meta: ctx.meta,\n          name,\n        };\n      }\n    } else if (typeof result === 'string') {\n      return {\n        meta: ctx.meta,\n        name: ctx.naming ? applyNaming(result, ctx.naming) : result,\n      };\n    }\n  }\n\n  return {\n    meta: ctx.meta,\n    name: ctx.naming ? applyNaming(ctx.name, ctx.naming) : ctx.name,\n  };\n}\n"
  },
  {
    "path": "packages/shared/src/plugins/types.ts",
    "content": "/* eslint-disable @typescript-eslint/no-namespace */\nimport type { AnyString } from '@hey-api/types';\n\nimport type {\n  CommentsOption,\n  IndexExportOption,\n  UserCommentsOption,\n  UserIndexExportOption,\n} from '../config/shared';\nimport type { ValueToObject } from '../config/utils/config';\nimport type { Dependency } from '../config/utils/dependencies';\nimport type { Hooks as ParserHooks } from '../parser/hooks';\nimport type { PluginInstance } from './shared/utils/instance';\n\n// eslint-disable-next-line @typescript-eslint/no-empty-object-type\nexport interface PluginConfigMap {}\n\nexport type PluginNames = keyof PluginConfigMap extends never ? string : keyof PluginConfigMap;\n\nexport type AnyPluginName = PluginNames | AnyString;\n\ntype PluginTag = 'client' | 'mocker' | 'sdk' | 'transformer' | 'validator';\n\nexport type PluginContext = {\n  package: Dependency;\n  pluginByTag: <T extends AnyPluginName | boolean = AnyPluginName>(\n    tag: PluginTag,\n    props?: {\n      defaultPlugin?: Exclude<T, boolean>;\n      errorMessage?: string;\n    },\n  ) => Exclude<T, boolean> | undefined;\n  valueToObject: ValueToObject;\n};\n\ntype BaseApi = Record<string, unknown>;\n\ntype PluginBaseConfig = UserIndexExportOption & {\n  name: AnyPluginName;\n  /**\n   * Optional hooks to override default plugin behavior.\n   *\n   * Use these to classify resources, control which outputs are generated,\n   * or provide custom behavior for specific resources.\n   */\n  '~hooks'?: ParserHooks;\n};\n\n/**\n * Public Plugin API.\n */\nexport namespace Plugin {\n  export type Config<T extends Types> = Pick<T, 'api'> & {\n    config: Omit<T['config'], 'name'>;\n    /**\n     * Dependency plugins will be always processed, regardless of whether user\n     * explicitly defines them in their `plugins` config.\n     */\n    dependencies?: ReadonlyArray<AnyPluginName>;\n    handler: (args: { plugin: PluginInstance<T> }) => void;\n    name: T['config']['name'];\n    /**\n     * Resolves static configuration values into their runtime equivalents. For\n     * example, when `validator` is set to `true`, it figures out which plugin\n     * should be used for validation.\n     */\n    resolveConfig?: (\n      plugin: Omit<Plugin.Config<T>, 'dependencies'> & {\n        dependencies: Set<AnyPluginName>;\n      },\n      context: PluginContext,\n    ) => void;\n    /**\n     * Tags can be used to help with deciding plugin order and resolving\n     * plugin configuration options.\n     */\n    tags?: ReadonlyArray<PluginTag>;\n  };\n\n  export type Comments = CommentsOption;\n  export type UserComments = UserCommentsOption;\n\n  export type Exports = IndexExportOption;\n  export type UserExports = UserIndexExportOption;\n\n  /**\n   * Generic wrapper for plugin hooks.\n   */\n  export type Hooks = Pick<PluginBaseConfig, '~hooks'>;\n\n  export interface Name<Name extends PluginNames> {\n    name: Name;\n  }\n\n  /**\n   * Generic wrapper for plugin resolvers.\n   *\n   * Provides a namespaced configuration entry (`~resolvers`)\n   * where plugins can define how specific schema constructs\n   * should be resolved or overridden.\n   */\n  export type Resolvers<T extends Record<string, unknown> = Record<string, unknown>> = {\n    /**\n     * Custom behavior resolvers for a plugin.\n     *\n     * Used to define how specific schema constructs are\n     * resolved into AST or runtime logic.\n     */\n    '~resolvers'?: T;\n  };\n\n  export type Types<\n    Config extends PluginBaseConfig = PluginBaseConfig,\n    ResolvedConfig extends PluginBaseConfig = Config,\n    Api extends BaseApi = never,\n  > = ([Api] extends [never] ? { api?: BaseApi } : { api: Api }) & {\n    config: Config;\n    resolvedConfig: ResolvedConfig;\n  };\n}\n\nexport type DefinePlugin<\n  Config extends PluginBaseConfig = PluginBaseConfig,\n  ResolvedConfig extends PluginBaseConfig = Config,\n  Api extends BaseApi = never,\n> = {\n  Config: Plugin.Config<Plugin.Types<Config, ResolvedConfig, Api>>;\n  Handler: (args: { plugin: PluginInstance<Plugin.Types<Config, ResolvedConfig, Api>> }) => void;\n  /** The plugin instance. */\n  Instance: PluginInstance<Plugin.Types<Config, ResolvedConfig, Api>>;\n  Types: Plugin.Types<Config, ResolvedConfig, Api>;\n};\n"
  },
  {
    "path": "packages/shared/src/tsConfig.ts",
    "content": "import fs from 'node:fs';\nimport path from 'node:path';\n\nimport type { AnyString } from '@hey-api/types';\n\nexport function findPackageJson(initialDir: string): unknown | undefined {\n  let dir = initialDir;\n  while (dir !== path.dirname(dir)) {\n    const files = fs.readdirSync(dir);\n    const candidates = files.filter((file) => file === 'package.json');\n\n    if (candidates[0]) {\n      const packageJsonPath = path.join(dir, candidates[0]);\n      return JSON.parse(\n        fs.readFileSync(packageJsonPath, {\n          encoding: 'utf8',\n        }),\n      );\n    }\n\n    dir = path.dirname(dir);\n  }\n\n  return;\n}\n\ntype PackageJson = {\n  bugs: {\n    url: string;\n  };\n  name: string;\n  version: string;\n};\n\nexport function loadPackageJson(initialDir: string): PackageJson | undefined {\n  const packageJson = findPackageJson(initialDir);\n\n  const safePackage: PackageJson = {\n    bugs: {\n      url: '',\n    },\n    name: '',\n    version: '',\n  };\n\n  if (packageJson && typeof packageJson === 'object') {\n    if ('name' in packageJson && typeof packageJson.name === 'string') {\n      safePackage.name = packageJson.name;\n    }\n\n    if ('version' in packageJson && typeof packageJson.version === 'string') {\n      safePackage.version = packageJson.version;\n    }\n\n    if ('bugs' in packageJson && packageJson.bugs && typeof packageJson.bugs === 'object') {\n      if ('url' in packageJson.bugs && typeof packageJson.bugs.url === 'string') {\n        safePackage.bugs.url = packageJson.bugs.url;\n        if (safePackage.bugs.url && !safePackage.bugs.url.endsWith('/')) {\n          safePackage.bugs.url += '/';\n        }\n      }\n    }\n  }\n\n  if (!safePackage.name) return;\n\n  return safePackage;\n}\n\nexport function findTsConfigPath(baseDir: string, tsConfigPath?: AnyString | null): string | null {\n  if (tsConfigPath === null) {\n    return null;\n  }\n\n  if (tsConfigPath) {\n    const resolved = path.isAbsolute(tsConfigPath)\n      ? tsConfigPath\n      : path.resolve(baseDir, tsConfigPath);\n    return fs.existsSync(resolved) ? resolved : null;\n  }\n\n  let dir = baseDir;\n  while (dir !== path.dirname(dir)) {\n    const files = fs.readdirSync(dir);\n    const candidates = files\n      .filter((file) => file.startsWith('tsconfig') && file.endsWith('.json'))\n      .sort((file) => (file === 'tsconfig.json' ? -1 : 1));\n\n    if (candidates[0]) {\n      return path.join(dir, candidates[0]);\n    }\n\n    dir = path.dirname(dir);\n  }\n\n  return null;\n}\n"
  },
  {
    "path": "packages/shared/src/types/logs.ts",
    "content": "export type Logs = {\n  /**\n   * Whether or not error logs should be written to a file or not\n   *\n   * @default true\n   * */\n  file?: boolean;\n  /**\n   * The logging level to control the verbosity of log output.\n   * Determines which messages are logged based on their severity.\n   *\n   * Available levels (in increasing order of severity):\n   * - `trace`: Detailed debug information, primarily for development.\n   * - `debug`: Diagnostic information useful during debugging.\n   * - `info`: General operational messages that indicate normal application behavior.\n   * - `warn`: Potentially problematic situations that require attention.\n   * - `error`: Errors that prevent some functionality but do not crash the application.\n   * - `fatal`: Critical errors that cause the application to terminate.\n   * - `silent`: Disables all logging.\n   *\n   * Messages with a severity equal to or higher than the specified level will be logged.\n   *\n   * @default 'info'\n   */\n  level?: 'debug' | 'error' | 'fatal' | 'info' | 'silent' | 'trace' | 'warn';\n  /**\n   * The relative location of the logs folder\n   *\n   * @default process.cwd()\n   */\n  path?: string;\n};\n"
  },
  {
    "path": "packages/shared/src/types/watch.ts",
    "content": "export type WatchValues = {\n  /**\n   * Headers to be sent with each HEAD and/or GET request. This effectively\n   * serves as a mechanism resolver because setting certain headers will opt\n   * into comparing the specifications using that method.\n   */\n  headers: Headers;\n  /**\n   * Can we send a HEAD request instead of fetching the whole specification?\n   * This value will be set after the first successful fetch.\n   */\n  isHeadMethodSupported?: boolean;\n  /**\n   * String content of the last successfully fetched specification.\n   */\n  lastValue?: string;\n};\n"
  },
  {
    "path": "packages/shared/src/utils/__tests__/minHeap.test.ts",
    "content": "import { MinHeap } from '../minHeap';\n\ndescribe('MinHeap', () => {\n  it('pops items in increasing declIndex order', () => {\n    const idx = new Map<string, number>([\n      ['a', 10],\n      ['b', 5],\n      ['c', 20],\n    ]);\n    const h = new MinHeap(idx);\n    h.push('a');\n    h.push('b');\n    h.push('c');\n\n    expect(h.pop()).toBe('b');\n    expect(h.pop()).toBe('a');\n    expect(h.pop()).toBe('c');\n    expect(h.pop()).toBeUndefined();\n  });\n\n  it('supports interleaved push/pop and maintains order', () => {\n    const idx = new Map<string, number>([\n      ['x', 0],\n      ['y', 1],\n      ['z', 2],\n    ]);\n    const h = new MinHeap(idx);\n    h.push('y');\n    expect(h.pop()).toBe('y');\n\n    h.push('z');\n    h.push('x');\n    expect(h.pop()).toBe('x');\n    expect(h.pop()).toBe('z');\n  });\n\n  it('handles duplicates (same id pushed multiple times)', () => {\n    const idx = new Map<string, number>([['dup', 1]]);\n    const h = new MinHeap(idx);\n    h.push('dup');\n    h.push('dup');\n    expect(h.pop()).toBe('dup');\n    // second duplicate still present\n    expect(h.pop()).toBe('dup');\n    expect(h.pop()).toBeUndefined();\n  });\n\n  it('isEmpty returns true when empty and false when not', () => {\n    const idx = new Map<string, number>([['a', 0]]);\n    const h = new MinHeap(idx);\n    expect(h.isEmpty()).toBe(true);\n    h.push('a');\n    expect(h.isEmpty()).toBe(false);\n    h.pop();\n    expect(h.isEmpty()).toBe(true);\n  });\n});\n"
  },
  {
    "path": "packages/shared/src/utils/__tests__/path.test.ts",
    "content": "import { pathToName } from '../path';\n\ndescribe('pathToName', () => {\n  // ── OpenAPI 3.x component schemas ──\n\n  it('handles top-level schema', () => {\n    expect(pathToName(['components', 'schemas', 'User'])).toBe('User');\n  });\n\n  it('handles nested property', () => {\n    expect(pathToName(['components', 'schemas', 'User', 'properties', 'address'])).toBe(\n      'User-address',\n    );\n  });\n\n  it('handles deeply nested properties', () => {\n    expect(\n      pathToName(['components', 'schemas', 'User', 'properties', 'address', 'properties', 'city']),\n    ).toBe('User-address-city');\n  });\n\n  it('handles property literally named \"properties\"', () => {\n    expect(pathToName(['components', 'schemas', 'Foo', 'properties', 'properties'])).toBe(\n      'Foo-properties',\n    );\n  });\n\n  it('handles property named \"properties\" with children', () => {\n    expect(\n      pathToName([\n        'components',\n        'schemas',\n        'Foo',\n        'properties',\n        'properties',\n        'properties',\n        'items',\n      ]),\n    ).toBe('Foo-properties-items');\n  });\n\n  it('handles property named \"items\"', () => {\n    expect(pathToName(['components', 'schemas', 'Foo', 'properties', 'items'])).toBe('Foo-items');\n  });\n\n  // ── additionalProperties ──\n\n  it('handles additionalProperties', () => {\n    expect(pathToName(['components', 'schemas', 'Pet', 'additionalProperties'])).toBe('Pet-Value');\n  });\n\n  it('handles nested additionalProperties', () => {\n    expect(\n      pathToName([\n        'components',\n        'schemas',\n        'Pet',\n        'properties',\n        'metadata',\n        'additionalProperties',\n      ]),\n    ).toBe('Pet-metadata-Value');\n  });\n\n  // ── Array items ──\n\n  it('handles array items (skips index)', () => {\n    expect(\n      pathToName(['components', 'schemas', 'Order', 'properties', 'line_items', 'items', 0]),\n    ).toBe('Order-line_items');\n  });\n\n  it('handles items without numeric index', () => {\n    expect(pathToName(['components', 'schemas', 'Result', 'items', 0])).toBe('Result');\n  });\n\n  // ── Tuple items ──\n\n  it('handles tuple items at different indices', () => {\n    expect(pathToName(['components', 'schemas', 'Pair', 'items', 0])).toBe('Pair');\n\n    expect(pathToName(['components', 'schemas', 'Pair', 'items', 1])).toBe('Pair');\n  });\n\n  // ── patternProperties ──\n\n  it('handles patternProperties', () => {\n    expect(pathToName(['components', 'schemas', 'Config', 'patternProperties', '^x-'])).toBe(\n      'Config-^x-',\n    );\n  });\n\n  // ── OpenAPI 2.0 ──\n\n  it('handles definitions (OpenAPI 2.0)', () => {\n    expect(pathToName(['definitions', 'User'])).toBe('User');\n  });\n\n  it('handles definitions with nested properties', () => {\n    expect(pathToName(['definitions', 'User', 'properties', 'address'])).toBe('User-address');\n  });\n\n  // ── Paths (operations) ──\n\n  it('handles simple path', () => {\n    expect(pathToName(['paths', '/event', 'get', 'properties', 'query'])).toBe('Event-get-query');\n  });\n\n  it('handles path with multiple segments', () => {\n    expect(pathToName(['paths', '/api/v1/users', 'post', 'properties', 'body'])).toBe(\n      'ApiV1Users-post-body',\n    );\n  });\n\n  it('handles path with parameter', () => {\n    expect(pathToName(['paths', '/users/{id}/posts', 'get', 'properties', 'query'])).toBe(\n      'UsersIdPosts-get-query',\n    );\n  });\n\n  it('handles path without properties', () => {\n    expect(pathToName(['paths', '/event', 'get'])).toBe('Event-get');\n  });\n\n  // ── Webhooks ──\n\n  it('handles webhooks', () => {\n    expect(pathToName(['webhooks', 'onEvent', 'post', 'properties', 'body'])).toBe(\n      'onEvent-post-body',\n    );\n  });\n\n  // ── Component types beyond schemas ──\n\n  it('handles component parameters', () => {\n    expect(pathToName(['components', 'parameters', 'UserId'])).toBe('UserId');\n  });\n\n  it('handles component requestBodies', () => {\n    expect(pathToName(['components', 'requestBodies', 'CreateUser', 'properties', 'name'])).toBe(\n      'CreateUser-name',\n    );\n  });\n\n  // ── Encoded characters ──\n\n  it('handles URI-encoded names', () => {\n    expect(pathToName(['components', 'schemas', 'My%20Schema'])).toBe('My Schema');\n  });\n\n  // ── Anchor option ──\n\n  it('uses anchor for component schema', () => {\n    expect(\n      pathToName(['components', 'schemas', 'User', 'properties', 'address'], {\n        anchor: 'UserDTO',\n      }),\n    ).toBe('UserDTO-address');\n  });\n\n  it('uses anchor for paths', () => {\n    expect(\n      pathToName(['paths', '/event', 'get', 'properties', 'query'], {\n        anchor: 'event.subscribe',\n      }),\n    ).toBe('event.subscribe-query');\n  });\n\n  it('uses anchor and preserves structural suffix', () => {\n    expect(\n      pathToName(['components', 'schemas', 'Pet', 'additionalProperties'], {\n        anchor: 'PetMap',\n      }),\n    ).toBe('PetMap-Value');\n  });\n\n  it('uses anchor with deeply nested properties', () => {\n    expect(\n      pathToName(['components', 'schemas', 'User', 'properties', 'address', 'properties', 'city'], {\n        anchor: 'UserInput',\n      }),\n    ).toBe('UserInput-address-city');\n  });\n\n  it('uses anchor for unknown root', () => {\n    expect(pathToName(['foo', 'bar', 'baz'], { anchor: 'Root' })).toBe('Root');\n  });\n});\n"
  },
  {
    "path": "packages/shared/src/utils/__tests__/ref.test.ts",
    "content": "import { isTopLevelComponent, jsonPointerToPath, pathToJsonPointer } from '../ref';\n\ndescribe('jsonPointerToPath', () => {\n  it('parses root pointer', () => {\n    expect(jsonPointerToPath('#')).toEqual([]);\n    expect(jsonPointerToPath('')).toEqual([]);\n  });\n\n  it('parses component ref', () => {\n    expect(jsonPointerToPath('#/components/schemas/Foo')).toEqual(['components', 'schemas', 'Foo']);\n  });\n\n  it('parses deep path ref', () => {\n    expect(jsonPointerToPath('#/components/schemas/Foo/properties/bar/items')).toEqual([\n      'components',\n      'schemas',\n      'Foo',\n      'properties',\n      'bar',\n      'items',\n    ]);\n  });\n});\n\ndescribe('pathToJsonPointer', () => {\n  it('converts empty path to root pointer', () => {\n    expect(pathToJsonPointer([])).toBe('#');\n  });\n\n  it('converts path to pointer', () => {\n    expect(pathToJsonPointer(['components', 'schemas', 'Foo'])).toBe('#/components/schemas/Foo');\n  });\n});\n\ndescribe('isTopLevelComponent', () => {\n  describe('OpenAPI 3.x refs', () => {\n    it('returns true for top-level component refs', () => {\n      expect(isTopLevelComponent('#/components/schemas/Foo')).toBe(true);\n      expect(isTopLevelComponent('#/components/parameters/Bar')).toBe(true);\n      expect(isTopLevelComponent('#/components/responses/Error')).toBe(true);\n      expect(isTopLevelComponent('#/components/requestBodies/Body')).toBe(true);\n    });\n\n    it('returns false for deep path refs', () => {\n      expect(isTopLevelComponent('#/components/schemas/Foo/properties/bar')).toBe(false);\n      expect(isTopLevelComponent('#/components/schemas/Foo/properties/bar/items')).toBe(false);\n      expect(isTopLevelComponent('#/components/schemas/Foo/allOf/0')).toBe(false);\n    });\n  });\n\n  describe('OpenAPI 2.0 refs', () => {\n    it('returns true for top-level definitions refs', () => {\n      expect(isTopLevelComponent('#/definitions/Foo')).toBe(true);\n      expect(isTopLevelComponent('#/definitions/Bar')).toBe(true);\n    });\n\n    it('returns false for deep path refs', () => {\n      expect(isTopLevelComponent('#/definitions/Foo/properties/bar')).toBe(false);\n      expect(isTopLevelComponent('#/definitions/Foo/properties/bar/items')).toBe(false);\n    });\n  });\n\n  describe('non-component refs', () => {\n    it('returns false for path refs', () => {\n      expect(isTopLevelComponent('#/paths/~1users/get')).toBe(false);\n    });\n\n    it('returns false for other refs', () => {\n      expect(isTopLevelComponent('#/info/title')).toBe(false);\n    });\n  });\n});\n"
  },
  {
    "path": "packages/shared/src/utils/__tests__/url.test.ts",
    "content": "import { parseUrl } from '../url';\n\ndescribe('parseUrl', () => {\n  it.each([\n    { host: '', path: '', port: '', protocol: '', value: '' },\n    { host: '', path: '', port: '', protocol: '', value: '/' },\n    { host: 'foo.com', path: '', port: '', protocol: '', value: 'foo.com' },\n    { host: 'foo.com', path: '', port: '', protocol: '', value: 'foo.com/' },\n    {\n      host: 'foo.com',\n      path: '/bar',\n      port: '',\n      protocol: '',\n      value: 'foo.com/bar',\n    },\n    {\n      host: 'www.foo.com',\n      path: '/bar',\n      port: '',\n      protocol: '',\n      value: 'www.foo.com/bar',\n    },\n    {\n      host: 'www.foo.com',\n      path: '/bar',\n      port: '',\n      protocol: 'https',\n      value: 'https://www.foo.com/bar',\n    },\n    {\n      host: 'www.foo.com',\n      path: '/bar',\n      port: '',\n      protocol: 'custom',\n      value: 'custom://www.foo.com/bar',\n    },\n    {\n      host: 'foo.com',\n      path: '/bar',\n      port: '',\n      protocol: 'ws',\n      value: 'ws://foo.com/bar',\n    },\n    {\n      host: 'foo.com',\n      path: '/bar',\n      port: '',\n      protocol: '',\n      value: '//foo.com/bar?ignore',\n    },\n    { host: 'foo.com', path: '', port: '', protocol: '', value: '//foo.com' },\n    { host: '', path: '', port: '', protocol: 'https', value: 'https://' },\n    { host: '', path: '/bar', port: '', protocol: '', value: '/bar' },\n    {\n      host: 'localhost',\n      path: '',\n      port: '3025',\n      protocol: 'http',\n      value: 'http://localhost:3025',\n    },\n    {\n      host: 'localhost',\n      path: '',\n      port: '',\n      protocol: 'https',\n      value: 'https://localhost',\n    },\n    { host: '', path: '/v1/foo', port: '', protocol: '', value: '/v1/foo' },\n    {\n      host: '10.0.81.36',\n      path: '/v1',\n      port: '',\n      protocol: 'http',\n      value: 'http://10.0.81.36/v1',\n    },\n    {\n      host: '{id}.foo.com',\n      path: '/v1',\n      port: '{port}',\n      protocol: 'https',\n      value: 'https://{id}.foo.com:{port}/v1',\n    },\n    { host: '', path: '', port: '', protocol: '', value: './foo.json' },\n    { host: '', path: '', port: '', protocol: '', value: '../../foo.json' },\n    { host: '', path: '', port: '', protocol: '', value: 'D://\\\\foo.json' },\n  ])('$value', ({ host, path, port, protocol, value }) => {\n    expect(parseUrl(value)).toEqual({\n      host,\n      path,\n      port,\n      protocol,\n    });\n  });\n});\n"
  },
  {
    "path": "packages/shared/src/utils/escape.ts",
    "content": "import { EOL } from 'node:os';\n\nexport function escapeComment(value: string) {\n  return value\n    .replace(/\\*\\//g, '*')\n    .replace(/\\/\\*/g, '*')\n    .replace(/\\r?\\n(.*)/g, (_l, w) => EOL + w.trim());\n}\n"
  },
  {
    "path": "packages/shared/src/utils/exports.ts",
    "content": "import { toCase } from './naming/naming';\nimport type { Casing } from './naming/types';\n\n/**\n * Utilities shared across the package.\n */\nexport const utils = {\n  /**\n   * @deprecated use `toCase` instead\n   */\n  stringCase({\n    case: casing,\n    stripLeadingSeparators,\n    value,\n  }: {\n    readonly case: Casing | undefined;\n    /**\n     * If leading separators have a semantic meaning, we might not want to\n     * remove them.\n     */\n    stripLeadingSeparators?: boolean;\n    value: string;\n  }) {\n    return toCase(value, casing, { stripLeadingSeparators });\n  },\n  /**\n   * Converts the given string to the specified casing.\n   */\n  toCase,\n};\n"
  },
  {
    "path": "packages/shared/src/utils/header.ts",
    "content": "import type { IProject } from '@hey-api/codegen-core';\n\nimport type { OutputHeader } from '../config/output/types';\n\n/**\n * Converts an {@link OutputHeader} value to a string prefix for file content.\n */\nexport function outputHeaderToPrefix(ctx: {\n  defaultValue: ReadonlyArray<string>;\n  header: OutputHeader;\n  project: IProject;\n}): string {\n  const { defaultValue, header, project } = ctx;\n  let lines = typeof header === 'function' ? header({ defaultValue, project }) : header;\n  if (lines === undefined) lines = defaultValue;\n  if (lines === null) return '';\n  lines =\n    typeof lines === 'string' ? lines.split(/\\r?\\n/) : lines.flatMap((line) => line.split(/\\r?\\n/));\n  const content = lines.join('\\n');\n  return content ? `${content}\\n\\n` : '';\n}\n"
  },
  {
    "path": "packages/shared/src/utils/input/__tests__/readme.test.ts",
    "content": "import { getRegistryUrl, inputToReadmePath, type Parsed, parseShorthand } from '../readme';\n\ndescribe('readme utils', () => {\n  describe('parseShorthand', () => {\n    it('should parse simple UUID format', () => {\n      const result = parseShorthand('abc123');\n      expect(result).toEqual({ uuid: 'abc123' });\n    });\n\n    it('should parse UUID with hyphens', () => {\n      const result = parseShorthand('test-uuid-123');\n      expect(result).toEqual({ uuid: 'test-uuid-123' });\n    });\n\n    it('should parse full format with organization and project', () => {\n      const result = parseShorthand('@myorg/myproject#uuid123');\n      expect(result).toEqual({\n        organization: 'myorg',\n        project: 'myproject',\n        uuid: 'uuid123',\n      });\n    });\n\n    it('should parse organization and project with hyphens', () => {\n      const result = parseShorthand('@my-org/my-project#test-uuid');\n      expect(result).toEqual({\n        organization: 'my-org',\n        project: 'my-project',\n        uuid: 'test-uuid',\n      });\n    });\n\n    it('should throw error for invalid formats', () => {\n      expect(() => parseShorthand('')).toThrow('Invalid ReadMe shorthand format');\n      expect(() => parseShorthand('@org')).toThrow('Invalid ReadMe shorthand format');\n      expect(() => parseShorthand('@org/project')).toThrow('Invalid ReadMe shorthand format');\n      expect(() => parseShorthand('@org/project#')).toThrow('Invalid ReadMe shorthand format');\n      expect(() => parseShorthand('https://example.com')).toThrow(\n        'Invalid ReadMe shorthand format',\n      );\n    });\n\n    it('should throw error for invalid UUID characters', () => {\n      expect(() => parseShorthand('abc@123')).toThrow('Invalid ReadMe shorthand format');\n      expect(() => parseShorthand('abc/123')).toThrow('Invalid ReadMe shorthand format');\n      expect(() => parseShorthand('abc#123')).toThrow('Invalid ReadMe shorthand format');\n      expect(() => parseShorthand('abc 123')).toThrow('Invalid ReadMe shorthand format');\n    });\n\n    it('should handle empty UUID', () => {\n      expect(() => parseShorthand('@org/project#')).toThrow('Invalid ReadMe shorthand format');\n    });\n  });\n\n  describe('getRegistryUrl', () => {\n    it('should generate correct URL', () => {\n      expect(getRegistryUrl('abc123')).toBe('https://dash.readme.com/api/v1/api-registry/abc123');\n      expect(getRegistryUrl('test-uuid-with-hyphens')).toBe(\n        'https://dash.readme.com/api/v1/api-registry/test-uuid-with-hyphens',\n      );\n    });\n  });\n\n  describe('inputToReadmePath', () => {\n    it('should transform simple UUID format to API URL', () => {\n      const result = inputToReadmePath('readme:abc123');\n      expect(result).toEqual({\n        path: 'https://dash.readme.com/api/v1/api-registry/abc123',\n        registry: 'readme',\n        uuid: 'abc123',\n      });\n    });\n\n    it('should transform full format to API URL', () => {\n      const result = inputToReadmePath('readme:@myorg/myproject#uuid123');\n      expect(result).toEqual({\n        organization: 'myorg',\n        path: 'https://dash.readme.com/api/v1/api-registry/uuid123',\n        project: 'myproject',\n        registry: 'readme',\n        uuid: 'uuid123',\n      });\n    });\n\n    it('should throw error for invalid inputs', () => {\n      expect(() => inputToReadmePath('invalid')).toThrow('Invalid ReadMe shorthand format');\n      expect(() => inputToReadmePath('')).toThrow('Invalid ReadMe shorthand format');\n    });\n  });\n\n  describe('integration scenarios', () => {\n    const validInputs: ReadonlyArray<{ expected: Parsed; input: string }> = [\n      { expected: { uuid: 'simple123' }, input: 'simple123' },\n      {\n        expected: { uuid: 'uuid-with-hyphens' },\n        input: 'uuid-with-hyphens',\n      },\n      { expected: { uuid: 'UUID123' }, input: 'UUID123' },\n      {\n        expected: { organization: 'org', project: 'proj', uuid: 'uuid' },\n        input: '@org/proj#uuid',\n      },\n      {\n        expected: {\n          organization: 'my-org',\n          project: 'my-project',\n          uuid: 'my-uuid',\n        },\n        input: '@my-org/my-project#my-uuid',\n      },\n    ];\n\n    it.each(validInputs)('should handle $input correctly', ({ expected, input }) => {\n      expect(parseShorthand(input)).toEqual(expected);\n      expect(inputToReadmePath(`readme:${input}`)).toEqual({\n        organization: expected.organization,\n        path: `https://dash.readme.com/api/v1/api-registry/${expected.uuid}`,\n        project: expected.project,\n        registry: 'readme',\n        uuid: expected.uuid,\n      });\n    });\n\n    const invalidInputs = [\n      '',\n      '@',\n      '@org',\n      '@org/',\n      '@org/proj',\n      '@org/proj#',\n      'uuid with spaces',\n      'uuid@invalid',\n      'uuid/invalid',\n      'uuid#invalid',\n      'https://example.com',\n      './local-file.yaml',\n    ];\n\n    it.each(invalidInputs)('should reject invalid input: %s', (input) => {\n      expect(() => parseShorthand(input)).toThrow();\n    });\n  });\n});\n"
  },
  {
    "path": "packages/shared/src/utils/input/__tests__/scalar.test.ts",
    "content": "import { getRegistryUrl, inputToScalarPath, type Parsed, parseShorthand } from '../scalar';\n\ndescribe('readme utils', () => {\n  describe('parseShorthand', () => {\n    it('should parse full format with organization and project', () => {\n      const result = parseShorthand('@myorg/myproject');\n      expect(result).toEqual({\n        organization: '@myorg',\n        project: 'myproject',\n      });\n    });\n\n    it('should parse organization and project with hyphens', () => {\n      const result = parseShorthand('@my-org/my-project');\n      expect(result).toEqual({\n        organization: '@my-org',\n        project: 'my-project',\n      });\n    });\n\n    it('should throw error for invalid formats', () => {\n      expect(() => parseShorthand('')).toThrow('Invalid Scalar shorthand format');\n      expect(() => parseShorthand('@org')).toThrow('Invalid Scalar shorthand format');\n      expect(() => parseShorthand('@org/project#')).toThrow('Invalid Scalar shorthand format');\n      expect(() => parseShorthand('https://example.com')).toThrow(\n        'Invalid Scalar shorthand format',\n      );\n    });\n\n    it('should throw error for invalid UUID characters', () => {\n      expect(() => parseShorthand('abc@123')).toThrow('Invalid Scalar shorthand format');\n      expect(() => parseShorthand('abc/123')).toThrow('Invalid Scalar shorthand format');\n      expect(() => parseShorthand('abc#123')).toThrow('Invalid Scalar shorthand format');\n      expect(() => parseShorthand('abc 123')).toThrow('Invalid Scalar shorthand format');\n    });\n\n    it('should handle empty UUID', () => {\n      expect(() => parseShorthand('@org/project#')).toThrow('Invalid Scalar shorthand format');\n    });\n  });\n\n  describe('getRegistryUrl', () => {\n    it('should generate correct URL', () => {\n      expect(getRegistryUrl('@foo', 'bar')).toBe(\n        'https://registry.scalar.com/@foo/apis/bar/latest?format=json',\n      );\n      expect(getRegistryUrl('@foo-with-hyphens', 'bar')).toBe(\n        'https://registry.scalar.com/@foo-with-hyphens/apis/bar/latest?format=json',\n      );\n    });\n  });\n\n  describe('inputToScalarPath', () => {\n    it('should transform full format to API URL', () => {\n      const result = inputToScalarPath('scalar:@foo/bar');\n      expect(result).toEqual({\n        organization: '@foo',\n        path: 'https://registry.scalar.com/@foo/apis/bar/latest?format=json',\n        project: 'bar',\n        registry: 'scalar',\n      });\n    });\n\n    it('should throw error for invalid inputs', () => {\n      expect(() => inputToScalarPath('invalid')).toThrow('Invalid Scalar shorthand format');\n      expect(() => inputToScalarPath('')).toThrow('Invalid Scalar shorthand format');\n    });\n  });\n\n  describe('integration scenarios', () => {\n    const validInputs: ReadonlyArray<{ expected: Parsed; input: string }> = [\n      {\n        expected: { organization: '@org', project: 'proj' },\n        input: '@org/proj',\n      },\n      {\n        expected: {\n          organization: '@my-org',\n          project: 'my-project',\n        },\n        input: '@my-org/my-project',\n      },\n    ];\n\n    it.each(validInputs)('should handle $input correctly', ({ expected, input }) => {\n      expect(parseShorthand(input)).toEqual(expected);\n      expect(inputToScalarPath(`scalar:${input}`)).toEqual({\n        organization: expected.organization,\n        path: `https://registry.scalar.com/${expected.organization}/apis/${expected.project}/latest?format=json`,\n        project: expected.project,\n        registry: 'scalar',\n      });\n    });\n\n    const invalidInputs = [\n      '',\n      '@',\n      '@org',\n      '@org/',\n      'uuid with spaces',\n      'uuid@invalid',\n      'uuid/invalid',\n      'uuid#invalid',\n      'https://example.com',\n      './local-file.yaml',\n    ];\n\n    it.each(invalidInputs)('should reject invalid input: %s', (input) => {\n      expect(() => parseShorthand(input)).toThrow();\n    });\n  });\n});\n"
  },
  {
    "path": "packages/shared/src/utils/input/heyApi.ts",
    "content": "import type { Input } from '../../config/input/types';\n\n// Regular expression to match Hey API Registry input formats:\n//   - {organization}/{project}?{queryParams}\nconst registryRegExp = /^([\\w-]+)\\/([\\w-]+)(?:\\?([\\w=&.-]*))?$/;\n\nexport const heyApiRegistryBaseUrl = 'https://get.heyapi.dev';\n\n/**\n * Creates a full Hey API Registry URL.\n *\n * @param organization - Hey API organization slug\n * @param project - Hey API project slug\n * @param queryParams - Optional query parameters\n * @returns The full Hey API registry URL.\n */\nexport function getRegistryUrl(\n  organization: string,\n  project: string,\n  queryParams?: string,\n): string {\n  return `${heyApiRegistryBaseUrl}/${organization}/${project}${queryParams ? `?${queryParams}` : ''}`;\n}\n\nexport type Parsed = {\n  organization: string;\n  project: string;\n  queryParams?: string;\n};\n\n/**\n * Parses a Hey API input string and extracts components.\n *\n * @param input - Hey API configuration input\n * @returns Parsed Hey API input components\n * @throws Error if the input format is invalid\n */\nexport function parseShorthand(\n  input: Input & {\n    path: string;\n  },\n): Parsed {\n  let organization = input.organization;\n  let project = input.project;\n  let queryParams: string | undefined;\n\n  if (input.path) {\n    const match = input.path.match(registryRegExp);\n\n    if (!match) {\n      throw new Error(\n        `Invalid Hey API shorthand format. Expected \"organization/project?queryParams\" or \"organization/project\", received: ${input.path}`,\n      );\n    }\n\n    organization = match[1];\n    project = match[2];\n    queryParams = match[3];\n  }\n\n  if (!organization) {\n    throw new Error('The Hey API organization cannot be empty.');\n  }\n\n  if (!project) {\n    throw new Error('The Hey API project cannot be empty.');\n  }\n\n  const result: Parsed = {\n    organization,\n    project,\n    queryParams,\n  };\n\n  return result;\n}\n\n/**\n * Transforms a Hey API shorthand string to the corresponding API URL.\n *\n * @param input - Hey API configuration input\n * @returns The Hey API Registry URL\n */\nexport function inputToHeyApiPath(\n  input: Input & {\n    path: string;\n  },\n): Partial<Input> {\n  const parsed = parseShorthand(input);\n  return {\n    path: getRegistryUrl(parsed.organization, parsed.project, parsed.queryParams),\n    registry: 'hey-api',\n  };\n}\n"
  },
  {
    "path": "packages/shared/src/utils/input/index.ts",
    "content": "import type { Input } from '../../config/input/types';\nimport { heyApiRegistryBaseUrl, inputToHeyApiPath } from './heyApi';\nimport { inputToReadmePath } from './readme';\nimport { inputToScalarPath } from './scalar';\n\nexport function inputToApiRegistry(\n  input: Input & {\n    path: string;\n  },\n) {\n  if (input.path.startsWith('readme:')) {\n    Object.assign(input, inputToReadmePath(input.path));\n    return;\n  }\n\n  if (input.path.startsWith('scalar:')) {\n    Object.assign(input, inputToScalarPath(input.path));\n    return;\n  }\n\n  if (input.path.startsWith('.')) {\n    return;\n  }\n\n  if (input.path.startsWith(heyApiRegistryBaseUrl)) {\n    input.path = input.path.slice(heyApiRegistryBaseUrl.length + 1);\n    Object.assign(input, inputToHeyApiPath(input as Input & { path: string }));\n    return;\n  }\n\n  const parts = input.path.split('/');\n  if (parts.length === 2 && parts.filter(Boolean).length === 2) {\n    Object.assign(input, inputToHeyApiPath(input as Input & { path: string }));\n    return;\n  }\n}\n"
  },
  {
    "path": "packages/shared/src/utils/input/readme.ts",
    "content": "import type { Input } from '../../config/input/types';\n\n// Regular expression to match ReadMe API Registry input formats:\n//   - @{organization}/{project}#{uuid}\n//   - {uuid}\nconst registryRegExp = /^(@([\\w-]+)\\/([\\w\\-.]+)#)?([\\w-]+)$/;\n\n/**\n * Creates a full ReadMe API Registry URL.\n *\n * @param uuid - ReadMe UUID\n * @returns The full ReadMe API registry URL.\n */\nexport function getRegistryUrl(uuid: string): string {\n  return `https://dash.readme.com/api/v1/api-registry/${uuid}`;\n}\n\nexport type Parsed = {\n  organization?: string;\n  project?: string;\n  uuid: string;\n};\n\nconst namespace = 'readme';\n\n/**\n * Parses a ReadMe input string and extracts components.\n *\n * @param shorthand - ReadMe format string (@org/project#uuid or uuid)\n * @returns Parsed ReadMe input components\n * @throws Error if the input format is invalid\n */\nexport function parseShorthand(shorthand: string): Parsed {\n  const match = shorthand.match(registryRegExp);\n\n  if (!match) {\n    throw new Error(\n      `Invalid ReadMe shorthand format. Expected \"${namespace}:@organization/project#uuid\" or \"${namespace}:uuid\", received: ${namespace}:${shorthand}`,\n    );\n  }\n\n  const [, , organization, project, uuid] = match;\n\n  if (!uuid) {\n    throw new Error('The ReadMe UUID cannot be empty.');\n  }\n\n  const result: Parsed = {\n    organization,\n    project,\n    uuid,\n  };\n\n  return result;\n}\n\n/**\n * Transforms a ReadMe shorthand string to the corresponding API URL.\n *\n * @param input - ReadMe format string\n * @returns The ReadMe API Registry URL\n */\nexport function inputToReadmePath(input: string): Partial<Input> {\n  const shorthand = input.slice(`${namespace}:`.length);\n  const parsed = parseShorthand(shorthand);\n  return {\n    ...parsed,\n    path: getRegistryUrl(parsed.uuid),\n    registry: 'readme',\n  };\n}\n"
  },
  {
    "path": "packages/shared/src/utils/input/scalar.ts",
    "content": "import type { Input } from '../../config/input/types';\n\n// Regular expression to match Scalar API Registry input formats:\n//   - @{organization}/{project}\nconst registryRegExp = /^(@[\\w-]+)\\/([\\w.-]+)$/;\n\n/**\n * Creates a full Scalar API Registry URL.\n *\n * @param organization - Scalar organization slug\n * @param project - Scalar project slug\n * @returns The full Scalar API registry URL.\n */\nexport function getRegistryUrl(organization: string, project: string): string {\n  return `https://registry.scalar.com/${organization}/apis/${project}/latest?format=json`;\n}\n\nexport type Parsed = {\n  organization: string;\n  project: string;\n};\n\nconst namespace = 'scalar';\n\n/**\n * Parses a Scalar input string and extracts components.\n *\n * @param shorthand - Scalar format string (@org/project)\n * @returns Parsed Scalar input components\n * @throws Error if the input format is invalid\n */\nexport function parseShorthand(shorthand: string): Parsed {\n  const match = shorthand.match(registryRegExp);\n\n  if (!match) {\n    throw new Error(\n      `Invalid Scalar shorthand format. Expected \"${namespace}:@organization/project\", received: ${namespace}:${shorthand}`,\n    );\n  }\n\n  const [, organization, project] = match;\n\n  if (!organization) {\n    throw new Error('The Scalar organization cannot be empty.');\n  }\n\n  if (!project) {\n    throw new Error('The Scalar project cannot be empty.');\n  }\n\n  const result: Parsed = {\n    organization,\n    project,\n  };\n\n  return result;\n}\n\n/**\n * Transforms a Scalar shorthand string to the corresponding API URL.\n *\n * @param input - Scalar format string\n * @returns The Scalar API Registry URL\n */\nexport function inputToScalarPath(input: string): Partial<Input> {\n  const shorthand = input.slice(`${namespace}:`.length);\n  const parsed = parseShorthand(shorthand);\n  return {\n    ...parsed,\n    path: getRegistryUrl(parsed.organization, parsed.project),\n    registry: 'scalar',\n  };\n}\n"
  },
  {
    "path": "packages/shared/src/utils/minHeap.ts",
    "content": "export class MinHeap {\n  private heap: Array<string> = [];\n\n  constructor(public declIndex: Map<string, number>) {}\n\n  isEmpty(): boolean {\n    return !this.heap.length;\n  }\n\n  pop(): string | undefined {\n    const [top] = this.heap;\n    if (!this.heap.length) return;\n    const last = this.heap.pop()!;\n    if (!this.heap.length) return top;\n    this.heap[0] = last;\n    this.sinkDown(0);\n    return top;\n  }\n\n  push(item: string): void {\n    this.heap.push(item);\n    this.bubbleUp(this.heap.length - 1);\n  }\n\n  private bubbleUp(index: number): void {\n    const heap = this.heap;\n    while (index > 0) {\n      const parent = Math.floor((index - 1) / 2);\n      const parentVal = heap[parent]!;\n      const curVal = heap[index]!;\n      if (this.declIndex.get(parentVal)! <= this.declIndex.get(curVal)!) break;\n      heap[parent] = curVal;\n      heap[index] = parentVal;\n      index = parent;\n    }\n  }\n\n  private sinkDown(index: number): void {\n    const heap = this.heap;\n    const len = heap.length;\n    while (true) {\n      const left = 2 * index + 1;\n      const right = 2 * index + 2;\n      let smallest = index;\n      if (left < len) {\n        const leftVal = heap[left]!;\n        const smallestVal = heap[smallest]!;\n        if (this.declIndex.get(leftVal)! < this.declIndex.get(smallestVal)!) smallest = left;\n      }\n      if (right < len) {\n        const rightVal = heap[right]!;\n        const smallestVal = heap[smallest]!;\n        if (this.declIndex.get(rightVal)! < this.declIndex.get(smallestVal)!) smallest = right;\n      }\n      if (smallest === index) break;\n      const tmp = heap[smallest]!;\n      heap[smallest] = heap[index]!;\n      heap[index] = tmp;\n      index = smallest;\n    }\n  }\n}\n"
  },
  {
    "path": "packages/shared/src/utils/naming/__tests__/naming.test.ts",
    "content": "import { toCase } from '../naming';\nimport type { Casing } from '../types';\n\nconst cases: ReadonlyArray<Casing> = [\n  'camelCase',\n  'PascalCase',\n  'SCREAMING_SNAKE_CASE',\n  'snake_case',\n];\n\nconst scenarios: ReadonlyArray<{\n  PascalCase: string;\n  SCREAMING_SNAKE_CASE: string;\n  camelCase: string;\n  snake_case: string;\n  stripLeadingSeparators?: boolean;\n  value: string;\n}> = [\n  {\n    PascalCase: 'FooDtoById',\n    SCREAMING_SNAKE_CASE: 'FOO_DTO_BY_ID',\n    camelCase: 'fooDtoById',\n    snake_case: 'foo_dto_by_id',\n    value: 'fooDTOById',\n  },\n  {\n    PascalCase: 'FooDtos',\n    SCREAMING_SNAKE_CASE: 'FOO_DTOS',\n    camelCase: 'fooDtos',\n    snake_case: 'foo_dtos',\n    value: 'fooDTOs',\n  },\n  {\n    PascalCase: 'FooDtosById',\n    SCREAMING_SNAKE_CASE: 'FOO_DTOS_BY_ID',\n    camelCase: 'fooDtosById',\n    snake_case: 'foo_dtos_by_id',\n    value: 'fooDTOsById',\n  },\n  {\n    PascalCase: 'DtoById',\n    SCREAMING_SNAKE_CASE: 'DTO_BY_ID',\n    camelCase: 'dtoById',\n    snake_case: 'dto_by_id',\n    value: 'DTOById',\n  },\n  {\n    PascalCase: 'Dtos',\n    SCREAMING_SNAKE_CASE: 'DTOS',\n    camelCase: 'dtos',\n    snake_case: 'dtos',\n    value: 'DTOs',\n  },\n  {\n    PascalCase: 'DtosById',\n    SCREAMING_SNAKE_CASE: 'DTOS_BY_ID',\n    camelCase: 'dtosById',\n    snake_case: 'dtos_by_id',\n    value: 'DTOsById',\n  },\n  {\n    PascalCase: 'SomeJsonFile',\n    SCREAMING_SNAKE_CASE: 'SOME_JSON_FILE',\n    camelCase: 'someJsonFile',\n    snake_case: 'some_json_file',\n    value: 'SOME_JSON_FILE',\n  },\n  {\n    PascalCase: 'SomeJsonsFile',\n    SCREAMING_SNAKE_CASE: 'SOME_JSONS_FILE',\n    camelCase: 'someJsonsFile',\n    snake_case: 'some_jsons_file',\n    value: 'SOME_JSONs_FILE',\n  },\n  {\n    PascalCase: 'PostHtmlGuide',\n    SCREAMING_SNAKE_CASE: 'POST_HTML_GUIDE',\n    camelCase: 'postHtmlGuide',\n    snake_case: 'post_html_guide',\n    value: 'postHTMLGuide',\n  },\n  {\n    PascalCase: 'PostHtmlScale',\n    SCREAMING_SNAKE_CASE: 'POST_HTML_SCALE',\n    camelCase: 'postHtmlScale',\n    snake_case: 'post_html_scale',\n    value: 'postHTMLScale',\n  },\n  {\n    PascalCase: 'SnakeCase',\n    SCREAMING_SNAKE_CASE: 'SNAKE_CASE',\n    camelCase: 'snakeCase',\n    snake_case: 'snake_case',\n    value: 'snake_case',\n  },\n  {\n    PascalCase: 'CamelCase',\n    SCREAMING_SNAKE_CASE: 'CAMEL_CASE',\n    camelCase: 'camelCase',\n    snake_case: 'camel_case',\n    value: 'camelCase',\n  },\n  {\n    PascalCase: 'PascalCase',\n    SCREAMING_SNAKE_CASE: 'PASCAL_CASE',\n    camelCase: 'pascalCase',\n    snake_case: 'pascal_case',\n    value: 'PascalCase',\n  },\n  {\n    PascalCase: 'IsXRated',\n    SCREAMING_SNAKE_CASE: 'IS_X_RATED',\n    camelCase: 'isXRated',\n    snake_case: 'is_x_rated',\n    value: 'isXRated',\n  },\n  {\n    PascalCase: 'IsHtmlSafe',\n    SCREAMING_SNAKE_CASE: 'IS_HTML_SAFE',\n    camelCase: 'isHtmlSafe',\n    snake_case: 'is_html_safe',\n    value: 'isHTMLSafe',\n  },\n  {\n    PascalCase: 'MyAspirations',\n    SCREAMING_SNAKE_CASE: 'MY_ASPIRATIONS',\n    camelCase: 'myAspirations',\n    snake_case: 'my_aspirations',\n    value: 'MyAspirations',\n  },\n  {\n    PascalCase: 'IoK8sApimachineryPkgApisMetaV1DeleteOptions',\n    SCREAMING_SNAKE_CASE: 'IO_K8S_APIMACHINERY_PKG_APIS_META_V1_DELETE_OPTIONS',\n    camelCase: 'ioK8sApimachineryPkgApisMetaV1DeleteOptions',\n    snake_case: 'io_k8s_apimachinery_pkg_apis_meta_v1_delete_options',\n    value: 'io.k8sApimachinery.pkg.apis.meta:v1.DeleteOptions',\n  },\n  {\n    PascalCase: 'GenericSchemaDuplicateIssue1SystemBoolean',\n    SCREAMING_SNAKE_CASE: 'GENERIC_SCHEMA_DUPLICATE_ISSUE_1_SYSTEM_BOOLEAN',\n    camelCase: 'genericSchemaDuplicateIssue1SystemBoolean',\n    snake_case: 'generic_schema_duplicate_issue_1_system_boolean',\n    value: 'Generic.Schema.Duplicate.Issue`1[System.Boolean]',\n  },\n  {\n    PascalCase: 'GetApiVApiVersionUsersUserIdLocationLocationId',\n    SCREAMING_SNAKE_CASE: 'GET_API_V_API_VERSION_USERS_USER_ID_LOCATION_LOCATION_ID',\n    camelCase: 'getApiVApiVersionUsersUserIdLocationLocationId',\n    snake_case: 'get_api_v_api_version_users_user_id_location_location_id',\n    value: 'GET /api/v{api-version}/users/{userId}/location/{locationId}',\n  },\n  {\n    PascalCase: 'IPhoneS',\n    SCREAMING_SNAKE_CASE: 'I_PHONE_S',\n    camelCase: 'iPhoneS',\n    snake_case: 'i_phone_s',\n    value: 'iPhone S',\n  },\n  {\n    PascalCase: '-100',\n    SCREAMING_SNAKE_CASE: '-100',\n    camelCase: '-100',\n    snake_case: '-100',\n    stripLeadingSeparators: false,\n    value: '-100',\n  },\n  {\n    PascalCase: 'MyFoo',\n    SCREAMING_SNAKE_CASE: 'MY_FOO',\n    camelCase: 'myFoo',\n    snake_case: 'my_foo',\n    stripLeadingSeparators: false,\n    value: 'MyFoo',\n  },\n];\n\ndescribe('toCase', () => {\n  describe.each(cases)('%s', (casing) => {\n    switch (casing) {\n      case 'PascalCase':\n        it.each(scenarios)(\n          '$value -> $PascalCase',\n          ({ PascalCase, stripLeadingSeparators, value }) => {\n            expect(toCase(value, casing, { stripLeadingSeparators })).toBe(PascalCase);\n          },\n        );\n        break;\n      case 'camelCase':\n        it.each(scenarios)(\n          '$value -> $camelCase',\n          ({ camelCase, stripLeadingSeparators, value }) => {\n            expect(toCase(value, casing, { stripLeadingSeparators })).toBe(camelCase);\n          },\n        );\n        break;\n      case 'SCREAMING_SNAKE_CASE':\n        it.each(scenarios)(\n          '$value -> $SCREAMING_SNAKE_CASE',\n          ({ SCREAMING_SNAKE_CASE, stripLeadingSeparators, value }) => {\n            expect(toCase(value, casing, { stripLeadingSeparators })).toBe(SCREAMING_SNAKE_CASE);\n          },\n        );\n        break;\n      case 'snake_case':\n        it.each(scenarios)(\n          '$value -> $snake_case',\n          ({ snake_case, stripLeadingSeparators, value }) => {\n            expect(toCase(value, casing, { stripLeadingSeparators })).toBe(snake_case);\n          },\n        );\n        break;\n    }\n  });\n});\n"
  },
  {
    "path": "packages/shared/src/utils/naming/naming.ts",
    "content": "import type { Casing, NamingConfig, NamingRule } from './types';\n\nconst uppercaseRegExp = /[\\p{Lu}]/u;\nconst lowercaseRegExp = /[\\p{Ll}]/u;\nconst identifierRegExp = /([\\p{Alpha}\\p{N}_]|$)/u;\nconst separatorsRegExp = /[_.$+:\\- `\\\\[\\](){}\\\\/]+/;\n\nconst leadingSeparatorsRegExp = new RegExp(`^${separatorsRegExp.source}`);\nconst separatorsAndIdentifierRegExp = new RegExp(\n  `${separatorsRegExp.source}${identifierRegExp.source}`,\n  'gu',\n);\nconst numbersAndIdentifierRegExp = new RegExp(`\\\\d+${identifierRegExp.source}`, 'gu');\n\nconst preserveCase = (value: string, casing: Casing) => {\n  let isLastCharLower = false;\n  let isLastCharUpper = false;\n  let isLastLastCharUpper = false;\n  let isLastLastCharPreserved = false;\n\n  const separator = casing === 'snake_case' || casing === 'SCREAMING_SNAKE_CASE' ? '_' : '-';\n\n  for (let index = 0; index < value.length; index++) {\n    const character = value[index]!;\n    isLastLastCharPreserved = index > 2 ? value[index - 3] === separator : true;\n\n    let nextIndex = index + 1;\n    let nextCharacter = value[nextIndex];\n    separatorsRegExp.lastIndex = 0;\n    while (nextCharacter && separatorsRegExp.test(nextCharacter)) {\n      nextIndex += 1;\n      nextCharacter = value[nextIndex];\n    }\n    const isSeparatorBeforeNextCharacter = nextIndex !== index + 1;\n\n    lowercaseRegExp.lastIndex = 0;\n    uppercaseRegExp.lastIndex = 0;\n    if (\n      uppercaseRegExp.test(character) &&\n      (isLastCharLower ||\n        (nextCharacter &&\n          !isSeparatorBeforeNextCharacter &&\n          nextCharacter !== 's' &&\n          lowercaseRegExp.test(nextCharacter)))\n    ) {\n      // insert separator behind character\n      value = `${value.slice(0, index)}${separator}${value.slice(index)}`;\n      index++;\n      isLastLastCharUpper = isLastCharUpper;\n      isLastCharLower = false;\n      isLastCharUpper = true;\n    } else if (\n      isLastCharUpper &&\n      isLastLastCharUpper &&\n      lowercaseRegExp.test(character) &&\n      !isLastLastCharPreserved &&\n      // naive detection of plurals\n      !(\n        character === 's' &&\n        (!nextCharacter || nextCharacter.toLocaleLowerCase() !== nextCharacter)\n      )\n    ) {\n      // insert separator 2 characters behind\n      value = `${value.slice(0, index - 1)}${separator}${value.slice(index - 1)}`;\n      isLastLastCharUpper = isLastCharUpper;\n      isLastCharLower = true;\n      isLastCharUpper = false;\n    } else {\n      const characterLower = character.toLocaleLowerCase();\n      const characterUpper = character.toLocaleUpperCase();\n      isLastLastCharUpper = isLastCharUpper;\n      isLastCharLower = characterLower === character && characterUpper !== character;\n      isLastCharUpper = characterUpper === character && characterLower !== character;\n    }\n  }\n\n  return value;\n};\n\n/**\n * Convert a string to the specified casing.\n *\n * @param value - The string to convert\n * @param casing - The target casing\n * @param options - Additional options\n * @returns The converted string\n */\nexport function toCase(\n  value: string,\n  casing: Casing | undefined,\n  options: {\n    /**\n     * If leading separators have a semantic meaning, we might not want to\n     * remove them.\n     */\n    stripLeadingSeparators?: boolean;\n  } = {},\n): string {\n  const stripLeadingSeparators = options.stripLeadingSeparators ?? true;\n\n  let result = value.trim();\n\n  if (!result.length || !casing || casing === 'preserve') {\n    return result;\n  }\n\n  if (result.length === 1) {\n    separatorsRegExp.lastIndex = 0;\n    if (separatorsRegExp.test(result)) {\n      return '';\n    }\n\n    return casing === 'PascalCase' || casing === 'SCREAMING_SNAKE_CASE'\n      ? result.toLocaleUpperCase()\n      : result.toLocaleLowerCase();\n  }\n\n  const hasUpperCase = result !== result.toLocaleLowerCase();\n\n  if (hasUpperCase) {\n    result = preserveCase(result, casing);\n  }\n\n  if (stripLeadingSeparators || result[0] !== value[0]) {\n    result = result.replace(leadingSeparatorsRegExp, '');\n  }\n\n  result =\n    casing === 'SCREAMING_SNAKE_CASE' ? result.toLocaleUpperCase() : result.toLocaleLowerCase();\n\n  if (casing === 'PascalCase') {\n    result = `${result.charAt(0).toLocaleUpperCase()}${result.slice(1)}`;\n  }\n\n  if (casing === 'snake_case' || casing === 'SCREAMING_SNAKE_CASE') {\n    result = result.replaceAll(separatorsAndIdentifierRegExp, (match, identifier, offset) => {\n      if (offset === 0 && !stripLeadingSeparators) {\n        return match;\n      }\n      return `_${identifier}`;\n    });\n\n    if (result[result.length - 1] === '_') {\n      // strip trailing underscore\n      result = result.slice(0, result.length - 1);\n    }\n  } else {\n    separatorsAndIdentifierRegExp.lastIndex = 0;\n    numbersAndIdentifierRegExp.lastIndex = 0;\n\n    result = result.replaceAll(numbersAndIdentifierRegExp, (match, _, offset) => {\n      if (['_', '-', '.'].includes(result.charAt(offset + match.length))) {\n        return match;\n      }\n\n      return match.toLocaleUpperCase();\n    });\n\n    result = result.replaceAll(separatorsAndIdentifierRegExp, (match, identifier, offset) => {\n      if (offset === 0 && !stripLeadingSeparators && match[0] && value.startsWith(match[0])) {\n        return match;\n      }\n      return identifier.toLocaleUpperCase();\n    });\n  }\n\n  return result;\n}\n\n/**\n * Normalize a NamingRule to NamingConfig.\n */\nexport function resolveNaming(rule: NamingRule | undefined): NamingConfig {\n  if (!rule) {\n    return {};\n  }\n  if (typeof rule === 'string' || typeof rule === 'function') {\n    return { name: rule };\n  }\n  return rule;\n}\n\n/**\n * Apply naming configuration to a value.\n *\n * Casing is applied first, then transformation.\n */\nexport function applyNaming(value: string, config: NamingConfig): string {\n  let result = value;\n\n  const casing = config.casing ?? config.case;\n\n  if (config.name) {\n    if (typeof config.name === 'function') {\n      result = config.name(result);\n    } else {\n      // TODO: refactor so there's no need for separators?\n      const separator = !casing || casing === 'preserve' ? '' : '-';\n      result = config.name.replace('{{name}}', `${separator}${result}${separator}`);\n    }\n  }\n\n  // TODO: apply case before name?\n  return toCase(result, casing);\n}\n"
  },
  {
    "path": "packages/shared/src/utils/naming/types.ts",
    "content": "import type { MaybeFunc } from '@hey-api/types';\n\n/**\n * Available casing strategies.\n */\nexport type Casing =\n  | 'camelCase'\n  | 'PascalCase'\n  | 'preserve'\n  | 'snake_case'\n  | 'SCREAMING_SNAKE_CASE';\n\n/**\n * Name transformer: template string or function.\n *\n * Template supports `{{name}}` variable.\n */\nexport type NameTransformer = MaybeFunc<(name: string) => string>;\n\n/**\n * Full naming configuration.\n */\nexport interface NamingConfig {\n  /**\n   * Casing strategy applied after transformation.\n   *\n   * @deprecated Use `casing` instead.\n   */\n  case?: Casing;\n  /**\n   * Casing strategy applied after transformation.\n   */\n  casing?: Casing;\n  /**\n   * Name template or transformer function.\n   *\n   * Applied before `casing` transformation.\n   */\n  name?: NameTransformer;\n}\n\n/**\n * Name customization: shorthand or full configuration.\n */\nexport type NamingRule = NameTransformer | NamingConfig;\n"
  },
  {
    "path": "packages/shared/src/utils/path.ts",
    "content": "/**\n * After these structural segments, the next segment has a known role.\n * This is what makes a property literally named \"properties\" safe —\n * it occupies the name position, never the structural position.\n */\nconst STRUCTURAL_ROLE: Record<string, 'name' | 'index'> = {\n  items: 'index',\n  patternProperties: 'name',\n  properties: 'name',\n};\n\n/**\n * These structural segments have no following name/index —\n * they are the terminal structural node. Append a suffix\n * to disambiguate from the parent.\n */\nconst STRUCTURAL_SUFFIX: Record<string, string> = {\n  additionalProperties: 'Value',\n};\n\ntype RootContextConfig = {\n  /** How many consecutive semantic segments follow before structural walking begins */\n  names: number;\n  /** How many leading segments to skip (the root keyword + any category segment) */\n  skip: number;\n};\n\n/**\n * Root context configuration.\n */\nconst ROOT_CONTEXT: Record<string | number, RootContextConfig> = {\n  components: { names: 1, skip: 2 }, // components/schemas/{name}\n  definitions: { names: 1, skip: 1 }, // definitions/{name}\n  paths: { names: 2, skip: 1 }, // paths/{path}/{method}\n  webhooks: { names: 2, skip: 1 }, // webhooks/{name}/{method}\n};\n\n/**\n * Sanitizes a path segment for use in a derived name.\n *\n * Handles API path segments like `/api/v1/users/{id}` → `ApiV1UsersId`.\n */\nfunction sanitizeSegment(segment: string | number): string {\n  const str = String(segment);\n  if (str.startsWith('/')) {\n    return str\n      .split('/')\n      .filter(Boolean)\n      .map((part) => {\n        const clean = part.replace(/[{}]/g, '');\n        return clean.charAt(0).toUpperCase() + clean.slice(1);\n      })\n      .join('');\n  }\n  return str;\n}\n\nexport interface PathToNameOptions {\n  /**\n   * When provided, replaces the root semantic segments with this anchor.\n   * Structural suffixes are still derived from path.\n   */\n  anchor?: string;\n}\n\n/**\n * Derives a composite name from a path.\n *\n * Examples:\n *   .../User                                    → 'User'\n *   .../User/properties/address                 → 'UserAddress'\n *   .../User/properties/properties              → 'UserProperties'\n *   .../User/properties/address/properties/city → 'UserAddressCity'\n *   .../Pet/additionalProperties                → 'PetValue'\n *   .../Order/properties/items/items/0          → 'OrderItems'\n *   paths//event/get/properties/query           → 'EventGetQuery'\n *\n * With anchor:\n *   paths//event/get/properties/query, { anchor: 'event.subscribe' }\n *                                               → 'event.subscribe-Query'\n */\nexport function pathToName(\n  path: ReadonlyArray<string | number>,\n  options?: PathToNameOptions,\n): string {\n  const names: Array<string> = [];\n  let index = 0;\n\n  const rootContext = ROOT_CONTEXT[path[0]!];\n  if (rootContext) {\n    index = rootContext.skip;\n\n    if (options?.anchor) {\n      // Use anchor as base name, skip past root semantic segments\n      names.push(options.anchor);\n      index += rootContext.names;\n    } else {\n      // Collect consecutive semantic name segments\n      for (let n = 0; n < rootContext.names && index < path.length; n++) {\n        names.push(sanitizeSegment(path[index]!));\n        index++;\n      }\n    }\n  } else {\n    // Unknown root\n    if (options?.anchor) {\n      names.push(options.anchor);\n      index++;\n    } else if (index < path.length) {\n      names.push(sanitizeSegment(path[index]!));\n      index++;\n    }\n  }\n\n  while (index < path.length) {\n    const segment = String(path[index]);\n\n    const role = STRUCTURAL_ROLE[segment];\n    if (role === 'name') {\n      // Next segment is a semantic name — collect it\n      index++;\n      if (index < path.length) {\n        names.push(sanitizeSegment(path[index]!));\n      }\n    } else if (role === 'index') {\n      // Next segment is a numeric index — skip it\n      index++;\n      if (index < path.length && typeof path[index] === 'number') {\n        index++;\n      }\n      continue;\n    } else if (STRUCTURAL_SUFFIX[segment]) {\n      names.push(STRUCTURAL_SUFFIX[segment]);\n    }\n\n    index++;\n  }\n\n  // refs using unicode characters become encoded, didn't investigate why\n  // but the suspicion is this comes from `@hey-api/json-schema-ref-parser`\n  return decodeURI(names.join('-'));\n}\n"
  },
  {
    "path": "packages/shared/src/utils/ref.ts",
    "content": "const jsonPointerSlash = /~1/g;\nconst jsonPointerTilde = /~0/g;\n\n/**\n * Returns the reusable component name from `$ref`.\n */\nexport function refToName($ref: string): string {\n  const path = jsonPointerToPath($ref);\n  const name = path[path.length - 1]!;\n  // refs using unicode characters become encoded, didn't investigate why\n  // but the suspicion is this comes from `@hey-api/json-schema-ref-parser`\n  return decodeURI(name);\n}\n\n/**\n * Encodes a path segment for use in a JSON Pointer (RFC 6901).\n *\n * - Replaces all '~' with '~0'.\n * - Replaces all '/' with '~1'.\n *\n * This ensures that path segments containing these characters are safely\n * represented in JSON Pointer strings.\n *\n * @param segment - The path segment (string or number) to encode.\n * @returns The encoded segment as a string.\n */\nexport function encodeJsonPointerSegment(segment: string | number): string {\n  return String(segment).replace(/~/g, '~0').replace(/\\//g, '~1');\n}\n\n/**\n * Converts a JSON Pointer string (RFC 6901) to an array of path segments.\n *\n * - Removes the leading '#' if present.\n * - Splits the pointer on '/'.\n * - Decodes '~1' to '/' and '~0' to '~' in each segment.\n * - Returns an empty array for the root pointer ('#' or '').\n *\n * @param pointer - The JSON Pointer string to convert (e.g., '#/components/schemas/Foo').\n * @returns An array of decoded path segments.\n */\nexport function jsonPointerToPath(pointer: string): ReadonlyArray<string> {\n  let clean = pointer.trim();\n  if (clean.startsWith('#')) {\n    clean = clean.slice(1);\n  }\n  if (clean.startsWith('/')) {\n    clean = clean.slice(1);\n  }\n  if (!clean) {\n    return [];\n  }\n  return clean\n    .split('/')\n    .map((part) => part.replace(jsonPointerSlash, '/').replace(jsonPointerTilde, '~'));\n}\n\n/**\n * Normalizes a JSON Pointer string to a canonical form.\n *\n * - Ensures the pointer starts with '#'.\n * - Removes trailing slashes (except for root).\n * - Collapses multiple consecutive slashes into one.\n * - Trims whitespace from the input.\n *\n * @param pointer - The JSON Pointer string to normalize.\n * @returns The normalized JSON Pointer string.\n */\nexport function normalizeJsonPointer(pointer: string): string {\n  let normalized = pointer.trim();\n  if (!normalized.startsWith('#')) {\n    normalized = `#${normalized}`;\n  }\n  // Remove trailing slashes (except for root)\n  if (normalized.length > 1 && normalized.endsWith('/')) {\n    normalized = normalized.slice(0, -1);\n  }\n  // Collapse multiple slashes\n  normalized = normalized.replace(/\\/+/g, '/');\n  return normalized;\n}\n\n/**\n * Encode path as JSON Pointer (RFC 6901).\n *\n * @param path\n * @returns\n */\nexport function pathToJsonPointer(path: ReadonlyArray<string | number>): string {\n  const segments = path.map(encodeJsonPointerSegment).join('/');\n  return '#' + (segments ? `/${segments}` : '');\n}\n\n/**\n * Checks if a $ref or path points to a top-level component (not a deep path reference).\n *\n * Top-level component references:\n * - OpenAPI 3.x: #/components/{type}/{name} (3 segments)\n * - OpenAPI 2.0: #/definitions/{name} (2 segments)\n *\n * Deep path references (4+ segments for 3.x, 3+ for 2.0) should be inlined\n * because they don't have corresponding registered symbols.\n *\n * @param refOrPath - The $ref string or path array to check\n * @returns true if the ref points to a top-level component, false otherwise\n */\nexport function isTopLevelComponent(refOrPath: string | ReadonlyArray<string | number>): boolean {\n  const path = refOrPath instanceof Array ? refOrPath : jsonPointerToPath(refOrPath);\n\n  // OpenAPI 3.x: #/components/{type}/{name} = 3 segments\n  if (path[0] === 'components') {\n    return path.length === 3;\n  }\n\n  // OpenAPI 2.0: #/definitions/{name} = 2 segments\n  if (path[0] === 'definitions') {\n    return path.length === 2;\n  }\n\n  return false;\n}\n\nexport function resolveRef<T>({ $ref, spec }: { $ref: string; spec: Record<string, any> }): T {\n  // refs using unicode characters become encoded, didn't investigate why\n  // but the suspicion is this comes from `@hey-api/json-schema-ref-parser`\n  const path = jsonPointerToPath(decodeURI($ref));\n\n  let current = spec;\n\n  for (const part of path) {\n    const segment = part as keyof typeof current;\n    if (current[segment] === undefined) {\n      throw new Error(`Reference not found: ${$ref}`);\n    }\n    current = current[segment];\n  }\n\n  return current as T;\n}\n"
  },
  {
    "path": "packages/shared/src/utils/url.ts",
    "content": "const parseUrlRegExp =\n  /^(([^:/?#]+):)?((\\/\\/)?([^:/?#]*)(:?([^/?#]*)))?([^?#]*)(\\?([^#]*))?(#(.*))?/;\n\ninterface Url {\n  host: string;\n  path: string;\n  port: string;\n  protocol: string;\n}\n\nexport function parseUrl(value: string): Url {\n  const errorResponse: Url = {\n    host: '',\n    path: '',\n    port: '',\n    protocol: '',\n  };\n\n  parseUrlRegExp.lastIndex = 0;\n  const match = value.match(parseUrlRegExp);\n\n  if (!match) {\n    return errorResponse;\n  }\n\n  const host = match[5] || '';\n\n  // value is a relative file system path\n  if (host === '.' || host === '..') {\n    return errorResponse;\n  }\n\n  const path = match[8] || '';\n  const protocol = match[2] || '';\n\n  // value is probably a Windows file system path\n  if (protocol.length === 1) {\n    return errorResponse;\n  }\n\n  return {\n    host,\n    path: path === '/' ? '' : path,\n    port: match[7] || '',\n    protocol,\n  };\n}\n"
  },
  {
    "path": "packages/shared/tsconfig.json",
    "content": "{\n  \"extends\": \"../../tsconfig.base.json\",\n  \"compilerOptions\": {\n    \"composite\": true,\n    \"outDir\": \"dist\",\n    \"rootDir\": \"src\",\n    \"types\": [\"bun\", \"vitest/globals\"]\n  },\n  \"include\": [\"src\"],\n  \"references\": [\n    { \"path\": \"../types\" },\n    { \"path\": \"../codegen-core\" },\n    { \"path\": \"../json-schema-ref-parser\" }\n  ]\n}\n"
  },
  {
    "path": "packages/shared/tsdown.config.ts",
    "content": "import { defineConfig } from 'tsdown';\n\nexport default defineConfig({\n  clean: true,\n  dts: true,\n  entry: ['src/index.ts'],\n  format: ['esm'],\n  minify: false,\n  sourcemap: true,\n  treeshake: true,\n});\n"
  },
  {
    "path": "packages/shared/turbo.json",
    "content": "{\n  \"$schema\": \"../../node_modules/turbo/schema.json\",\n  \"extends\": [\"//\"],\n  \"tasks\": {\n    \"build\": {\n      \"dependsOn\": [],\n      \"outputs\": [\"dist/**\"]\n    }\n  }\n}\n"
  },
  {
    "path": "packages/types/CHANGELOG.md",
    "content": "# @hey-api/types\n\n## 0.1.4\n\n### Patch Changes\n\n- **internal**: remove TypeScript from peer dependencies ([#3566](https://github.com/hey-api/openapi-ts/pull/3566)) ([`b5f1e4b`](https://github.com/hey-api/openapi-ts/commit/b5f1e4b5f64cbf0bad2eff888177ac9c1881ba3e)) by [@mrlubos](https://github.com/mrlubos)\n\n## 0.1.3\n\n### Patch Changes\n\n- **types**: add `AnyString` utility type ([#3251](https://github.com/hey-api/openapi-ts/pull/3251)) ([`7f19d59`](https://github.com/hey-api/openapi-ts/commit/7f19d5921dadfa96ecae84a5298b7aee1daee56d)) by [@mrlubos](https://github.com/mrlubos)\n\n## 0.1.2\n\n### Patch Changes\n\n- feat: add `ToArray`, `ToReadonlyArray`, and `AnyObject` types ([#3244](https://github.com/hey-api/openapi-ts/pull/3244)) ([`4f52bce`](https://github.com/hey-api/openapi-ts/commit/4f52bce79d8ac6573472f32a05b7f70913b90605)) by [@mrlubos](https://github.com/mrlubos)\n\n## 0.1.1\n\n### Patch Changes\n\n- Publish `@hey-api/types` so workspace packages can resolve it from npm. ([#3224](https://github.com/hey-api/openapi-ts/pull/3224)) ([`1f381b7`](https://github.com/hey-api/openapi-ts/commit/1f381b7cea64d38dc0ebec2a18323829cf322f07)) by [@mrlubos](https://github.com/mrlubos)\n"
  },
  {
    "path": "packages/types/package.json",
    "content": "{\n  \"name\": \"@hey-api/types\",\n  \"version\": \"0.1.4\",\n  \"description\": \"Shared utility types.\",\n  \"homepage\": \"https://heyapi.dev/\",\n  \"bugs\": {\n    \"url\": \"https://github.com/hey-api/openapi-ts/issues\"\n  },\n  \"license\": \"MIT\",\n  \"repository\": {\n    \"type\": \"git\",\n    \"url\": \"git+https://github.com/hey-api/openapi-ts.git\"\n  },\n  \"files\": [\n    \"dist\"\n  ],\n  \"type\": \"module\",\n  \"types\": \"./dist/index.d.ts\",\n  \"exports\": {\n    \".\": {\n      \"types\": \"./dist/index.d.ts\"\n    },\n    \"./package.json\": \"./package.json\"\n  },\n  \"scripts\": {\n    \"build\": \"tsc --build\",\n    \"dev\": \"tsc --build --watch\",\n    \"prepublishOnly\": \"pnpm build\",\n    \"typecheck\": \"tsgo --noEmit\"\n  },\n  \"devDependencies\": {\n    \"typescript\": \"5.9.3\"\n  }\n}\n"
  },
  {
    "path": "packages/types/src/index.ts",
    "content": "/**\n * An object with string keys and unknown values.\n */\nexport type AnyObject = Record<string, unknown>;\n\n/**\n * An arbitrary string type.\n */\nexport type AnyString = string & {};\n\n/**\n * Converts all top-level ReadonlyArray properties to Array (shallow).\n */\nexport type ArrayOnly<T> = {\n  [K in keyof T]: ToArray<T[K]>;\n};\n\n/**\n * Recursively makes all non-function properties optional.\n */\nexport type DeepPartial<T> = {\n  [K in keyof T]?: T[K] extends (...args: Array<any>) => any\n    ? T[K]\n    : T[K] extends object\n      ? DeepPartial<T[K]>\n      : T[K];\n};\n\n/**\n * Accepts a value, a function returning a value, or a function returning a promise of a value.\n */\nexport type LazyOrAsync<T> = T | (() => MaybePromise<T>);\n\n/**\n * Accepts a value or a readonly array of values of type T.\n */\nexport type MaybeArray<T> = T | ReadonlyArray<T>;\n\n/**\n * Accepts a value or a function returning a value.\n */\nexport type MaybeFunc<T extends (...args: Array<any>) => any> = T | ReturnType<T>;\n\n/**\n * Accepts a value or a promise of a value.\n */\nexport type MaybePromise<T> = T | Promise<T>;\n\n/**\n * Converts all top-level Array properties to ReadonlyArray (shallow).\n */\nexport type ReadonlyArrayOnly<T> = {\n  [K in keyof T]: ToReadonlyArray<T[K]>;\n};\n\n/**\n * Converts ReadonlyArray<T> to Array<T>, preserving unions.\n */\nexport type ToArray<T> = T extends ReadonlyArray<infer U> ? Array<U> : T;\n\n/**\n * Converts Array<T> to ReadonlyArray<T>, preserving unions.\n */\nexport type ToReadonlyArray<T> = T extends ReadonlyArray<infer U> ? ReadonlyArray<U> : T;\n"
  },
  {
    "path": "packages/types/tsconfig.json",
    "content": "{\n  \"extends\": \"../../tsconfig.base.json\",\n  \"compilerOptions\": {\n    \"composite\": true,\n    \"emitDeclarationOnly\": true,\n    \"outDir\": \"dist\",\n    \"rootDir\": \"src\"\n  },\n  \"include\": [\"src\"]\n}\n"
  },
  {
    "path": "packages/vite-plugin/.gitignore",
    "content": ".DS_Store\n.idea\n.tmp\n.tsdown\nlogs\nnode_modules\ntemp\n\n.env\ncoverage\ndist\n\n# test files\n.gen\n\n\n# test files\ntest/generated\ntest/e2e/generated\ngenerated/\n"
  },
  {
    "path": "packages/vite-plugin/CHANGELOG.md",
    "content": "# @hey-api/vite-plugin\n\n## 0.2.1\n\n### Patch Changes\n\n- **build**: do not minify bundles for better code readability and debugging ([#3186](https://github.com/hey-api/openapi-ts/pull/3186)) ([`4d46130`](https://github.com/hey-api/openapi-ts/commit/4d46130b53d9d8d5d3c178343a1b4fc3645b2628)) by [@copilot-swe-agent](https://github.com/apps/copilot-swe-agent)\n\n## 0.2.0\n\n### Minor Changes\n\n- [#1838](https://github.com/hey-api/openapi-ts/pull/1838) [`cee4508`](https://github.com/hey-api/openapi-ts/commit/cee4508fe2a58f4bbc79955176c9e930f941ba94) Thanks [@mrlubos](https://github.com/mrlubos)! - fix: initial release\n\n## 0.1.2\n\n### Patch Changes\n\n- [#1836](https://github.com/hey-api/openapi-ts/pull/1836) [`f22dc53`](https://github.com/hey-api/openapi-ts/commit/f22dc533bb822d90b2be835217367ae9e6bbc559) Thanks [@mrlubos](https://github.com/mrlubos)! - fix: use enforce pre\n\n## 0.1.1\n\n### Patch Changes\n\n- [#1826](https://github.com/hey-api/openapi-ts/pull/1826) [`90886c1`](https://github.com/hey-api/openapi-ts/commit/90886c1372a999e8cb59d5da218762f6ee6cd459) Thanks [@mrlubos](https://github.com/mrlubos)! - fix: allow config to be a function\n\n- [#1825](https://github.com/hey-api/openapi-ts/pull/1825) [`0670a38`](https://github.com/hey-api/openapi-ts/commit/0670a38c66dffc1431a7d4b48ec06b72d4f6868f) Thanks [@mrlubos](https://github.com/mrlubos)! - fix: move @hey-api/openapi-ts to peerDependencies\n\n- Updated dependencies [[`c73b0d4`](https://github.com/hey-api/openapi-ts/commit/c73b0d401c2bfa6f0b0d89d844a6aa09f2685a69), [`90886c1`](https://github.com/hey-api/openapi-ts/commit/90886c1372a999e8cb59d5da218762f6ee6cd459)]:\n  - @hey-api/openapi-ts@0.64.13\n\n## 0.1.0\n\n### Minor Changes\n\n- [#1813](https://github.com/hey-api/openapi-ts/pull/1813) [`c737e05`](https://github.com/hey-api/openapi-ts/commit/c737e055591376e9351cd07533779023f773cff0) Thanks [@mrlubos](https://github.com/mrlubos)! - feat: initial release\n"
  },
  {
    "path": "packages/vite-plugin/LICENSE.md",
    "content": "MIT License\n\nCopyright (c) Hey API\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n"
  },
  {
    "path": "packages/vite-plugin/README.md",
    "content": "<div align=\"center\">\n  <img alt=\"Hey API logo\" height=\"150\" src=\"https://heyapi.dev/assets/.gen/logo-astronaut-300w.png\" width=\"150\">\n  <h1 align=\"center\"><b>Vite Plugin</b></h1>\n  <p align=\"center\">🚀 Vite plugin for <code>@hey-api/openapi-ts</code> codegen.</p>\n</div>\n\n## Dashboard\n\nAccess your projects and OpenAPI specifications in the [Hey API Platform](https://app.heyapi.dev/).\n\n## Contributing\n\nWant to see your code in products used by millions?\n\nStart with our [Contributing](https://heyapi.dev/openapi-ts/community/contributing) guide and release your first feature.\n\n## Documentation\n\nPlease visit our [website](https://heyapi.dev) for documentation, guides, migrating, and more.\n\n## Sponsors\n\nHelp Hey API stay around for the long haul by becoming a [sponsor](https://github.com/sponsors/hey-api).\n\n<h3 align=\"center\">Gold</h3>\n\n<table align=\"center\" style=\"justify-content: center;align-items: center;display: flex;\">\n  <tbody>\n    <tr>\n      <td align=\"center\" width=\"336px\">\n        <p></p>\n        <p>\n          <a href=\"https://kutt.to/pkEZyc\" target=\"_blank\">\n            <picture height=\"50px\">\n              <source media=\"(prefers-color-scheme: dark)\" srcset=\"https://heyapi.dev/assets/.gen/stainless-logo-wordmark-480w.jpeg\">\n              <img alt=\"Stainless logo\" height=\"50px\" src=\"https://heyapi.dev/assets/.gen/stainless-logo-wordmark-480w.jpeg\">\n            </picture>\n          </a>\n          <br/>\n          Best-in-class developer interfaces for your API.\n          <br/>\n          <a href=\"https://kutt.to/pkEZyc\" style=\"text-decoration:none;\" target=\"_blank\">\n            stainless.com\n          </a>\n        </p>\n        <p></p>\n      </td>\n      <td align=\"center\" width=\"336px\">\n        <p></p>\n        <p>\n          <a href=\"https://kutt.to/QM9Q2N\" target=\"_blank\">\n            <picture height=\"50px\">\n              <source media=\"(prefers-color-scheme: dark)\" srcset=\"https://heyapi.dev/assets/opencode/logo-light.svg\">\n              <img alt=\"Opencode logo\" height=\"50px\" src=\"https://heyapi.dev/assets/opencode/logo-dark.svg\">\n            </picture>\n          </a>\n          <br/>\n          The open source coding agent.\n          <br/>\n          <a href=\"https://kutt.to/QM9Q2N\" style=\"text-decoration:none;\" target=\"_blank\">\n            opencode.ai\n          </a>\n        </p>\n        <p></p>\n      </td>\n    </tr>\n    <tr>\n      <td align=\"center\" width=\"336px\">\n        <p></p>\n        <p>\n          <a href=\"https://kutt.to/6vrYy9\" target=\"_blank\">\n            <picture height=\"50px\">\n              <source media=\"(prefers-color-scheme: dark)\" srcset=\"https://heyapi.dev/assets/mintlify/logo-light.svg\">\n              <img alt=\"Mintlify logo\" height=\"50px\" src=\"https://heyapi.dev/assets/mintlify/logo-dark.svg\">\n            </picture>\n          </a>\n          <br/>\n          The intelligent knowledge platform.\n          <br/>\n          <a href=\"https://kutt.to/6vrYy9\" style=\"text-decoration:none;\" target=\"_blank\">\n            mintlify.com\n          </a>\n        </p>\n        <p></p>\n      </td>\n    </tr>\n  </tbody>\n</table>\n\n<h3 align=\"center\">Silver</h3>\n\n<table align=\"center\" style=\"justify-content: center;align-items: center;display: flex;\">\n  <tbody>\n    <tr>\n      <td align=\"center\" width=\"172px\">\n        <a href=\"https://kutt.to/skQUVd\" target=\"_blank\">\n          <picture height=\"40px\">\n            <source media=\"(prefers-color-scheme: dark)\" srcset=\"https://heyapi.dev/assets/scalar/logo-light.svg\">\n            <img alt=\"Scalar logo\" height=\"40px\" src=\"https://heyapi.dev/assets/scalar/logo-dark.svg\">\n          </picture>\n        </a>\n        <br/>\n        <a href=\"https://kutt.to/skQUVd\" style=\"text-decoration:none;\" target=\"_blank\">\n          scalar.com\n        </a>\n      </td>\n      <td align=\"center\" width=\"172px\">\n        <a href=\"https://kutt.to/Dr9GuW\" target=\"_blank\">\n          <picture height=\"40px\">\n            <source media=\"(prefers-color-scheme: dark)\" srcset=\"https://heyapi.dev/assets/fastapi/logo-light.svg\">\n            <img alt=\"FastAPI logo\" height=\"40px\" src=\"https://heyapi.dev/assets/fastapi/logo-dark.svg\">\n          </picture>\n        </a>\n        <br/>\n        <a href=\"https://kutt.to/Dr9GuW\" style=\"text-decoration:none;\" target=\"_blank\">\n          fastapi.tiangolo.com\n        </a>\n      </td>\n    </tr>\n  </tbody>\n</table>\n\n<h3 align=\"center\">Bronze</h3>\n\n<table align=\"center\" style=\"justify-content: center;align-items: center;display: flex;\">\n  <tbody>\n    <tr>\n      <td align=\"center\" width=\"136px\">\n        <a href=\"https://kutt.to/YpaKsX\" target=\"_blank\">\n          <picture height=\"34px\">\n            <source media=\"(prefers-color-scheme: dark)\" srcset=\"https://heyapi.dev/assets/.gen/kinde-logo-wordmark-dark-480w.webp\">\n            <img alt=\"Kinde logo\" height=\"34px\" src=\"https://heyapi.dev/assets/.gen/kinde-logo-wordmark-480w.jpeg\">\n          </picture>\n        </a>\n      </td>\n      <td align=\"center\" width=\"136px\">\n        <a href=\"https://kutt.to/KkqSaw\" target=\"_blank\">\n          <picture height=\"34px\">\n            <source media=\"(prefers-color-scheme: dark)\" srcset=\"https://heyapi.dev/assets/cella/logo-light.svg\">\n            <img alt=\"Cella logo\" height=\"34px\" src=\"https://heyapi.dev/assets/cella/logo-dark.svg\">\n          </picture>\n        </a>\n      </td>\n    </tr>\n  </tbody>\n</table>\n\n## Usage\n\nAdd to `plugins` inside your Vite configuration.\n\n```ts\nimport { heyApiPlugin } from '@hey-api/vite-plugin';\n\nexport default defineConfig({\n  plugins: [\n    heyApiPlugin({\n      config: {\n        // optional configuration instead of using the configuration file\n      },\n    }),\n  ],\n});\n```\n"
  },
  {
    "path": "packages/vite-plugin/package.json",
    "content": "{\n  \"name\": \"@hey-api/vite-plugin\",\n  \"version\": \"0.2.1\",\n  \"description\": \"🚀 Vite plugin for `@hey-api/openapi-ts` codegen.\",\n  \"keywords\": [\n    \"codegen\",\n    \"openapi\",\n    \"plugin\",\n    \"swagger\",\n    \"vite\",\n    \"vite-plugin\"\n  ],\n  \"homepage\": \"https://heyapi.dev/\",\n  \"bugs\": {\n    \"url\": \"https://github.com/hey-api/openapi-ts/issues\"\n  },\n  \"license\": \"MIT\",\n  \"author\": {\n    \"name\": \"Hey API\",\n    \"email\": \"lubos@heyapi.dev\",\n    \"url\": \"https://heyapi.dev\"\n  },\n  \"repository\": {\n    \"type\": \"git\",\n    \"url\": \"git+https://github.com/hey-api/openapi-ts.git\"\n  },\n  \"funding\": \"https://github.com/sponsors/hey-api\",\n  \"files\": [\n    \"dist\",\n    \"LICENSE.md\",\n    \"README.md\"\n  ],\n  \"type\": \"module\",\n  \"main\": \"./dist/index.cjs\",\n  \"module\": \"./dist/index.mjs\",\n  \"types\": \"./dist/index.d.mts\",\n  \"exports\": {\n    \".\": {\n      \"import\": {\n        \"types\": \"./dist/index.d.mts\",\n        \"default\": \"./dist/index.mjs\"\n      },\n      \"require\": {\n        \"types\": \"./dist/index.d.cts\",\n        \"default\": \"./dist/index.cjs\"\n      }\n    },\n    \"./package.json\": \"./package.json\"\n  },\n  \"scripts\": {\n    \"build\": \"tsdown && pnpm check-exports\",\n    \"check-exports\": \"attw --pack .\",\n    \"dev\": \"tsdown --watch\",\n    \"prepublishOnly\": \"pnpm build\"\n  },\n  \"devDependencies\": {\n    \"@hey-api/openapi-ts\": \"workspace:*\",\n    \"typescript\": \"5.9.3\",\n    \"vite\": \"7.3.1\"\n  },\n  \"peerDependencies\": {\n    \"@hey-api/openapi-ts\": \"<2\"\n  }\n}\n"
  },
  {
    "path": "packages/vite-plugin/src/index.ts",
    "content": "import { createClient } from '@hey-api/openapi-ts';\n\nexport function heyApiPlugin(options?: {\n  /**\n   * `@hey-api/openapi-ts` configuration options.\n   */\n  config?: Parameters<typeof createClient>[0];\n}) {\n  return {\n    configResolved: async () => {\n      await createClient(options?.config);\n    },\n    enforce: 'pre',\n    name: 'hey-api-plugin',\n  };\n}\n"
  },
  {
    "path": "packages/vite-plugin/tsconfig.base.json",
    "content": "{\n  \"compilerOptions\": {\n    \"declaration\": true,\n    \"esModuleInterop\": true,\n    \"module\": \"ESNext\",\n    \"moduleResolution\": \"Bundler\",\n    \"noImplicitOverride\": true,\n    \"noUncheckedIndexedAccess\": true,\n    \"noUnusedLocals\": true,\n    \"strict\": true,\n    \"target\": \"ES2022\",\n    \"useUnknownInCatchVariables\": false\n  }\n}\n"
  },
  {
    "path": "packages/vite-plugin/tsconfig.json",
    "content": "{\n  \"extends\": \"./tsconfig.base.json\",\n  \"compilerOptions\": {\n    \"declaration\": false,\n    \"esModuleInterop\": true,\n    \"resolveJsonModule\": true,\n    \"skipLibCheck\": true\n  }\n}\n"
  },
  {
    "path": "packages/vite-plugin/tsdown.config.ts",
    "content": "import { defineConfig } from 'tsdown';\n\nexport default defineConfig({\n  banner(ctx) {\n    /**\n     * fix dynamic require in ESM\n     * @link https://github.com/hey-api/openapi-ts/issues/1079\n     */\n    if (ctx.format === 'esm') {\n      return {\n        js: `import { createRequire } from 'module'; const require = createRequire(import.${'meta'}.url);`,\n      };\n    }\n  },\n  clean: true,\n  dts: true,\n  entry: ['src/index.ts'],\n  format: ['cjs', 'esm'],\n  minify: false,\n  shims: false,\n  sourcemap: true,\n  treeshake: true,\n});\n"
  },
  {
    "path": "patches/vitepress.patch",
    "content": "diff --git a/dist/client/shared.js b/dist/client/shared.js\nindex f65eb22fe2b0dfeb9bd823c00c737f5035f2c891..16a45edcf11b71881b31f1203add291a2c447d22 100644\n--- a/dist/client/shared.js\n+++ b/dist/client/shared.js\n@@ -16,6 +16,7 @@ export const notFoundPageData = {\n     lastUpdated: 0,\n     isNotFound: true\n };\n+const versionedPaths = ['clients', 'plugins'];\n export function isActive(currentPath, matchPath, asRegex = false) {\n     if (matchPath === undefined) {\n         return false;\n@@ -24,8 +25,19 @@ export function isActive(currentPath, matchPath, asRegex = false) {\n     if (asRegex) {\n         return new RegExp(matchPath).test(currentPath);\n     }\n-    if (normalize(matchPath) !== currentPath) {\n-        return false;\n+    const normalizedMatchPath = normalize(matchPath);\n+    if (normalizedMatchPath !== currentPath) {\n+        const currentPathParts = currentPath.split('/');\n+        if (currentPathParts.length > 3 &&\n+            versionedPaths.some((entry) => entry === currentPathParts[2])) {\n+            currentPath = currentPathParts.slice(0, 4).join('/');\n+            if (normalizedMatchPath !== currentPath) {\n+                return false;\n+            }\n+        }\n+        else {\n+            return false;\n+        }\n     }\n     const hashMatch = matchPath.match(HASH_RE);\n     if (hashMatch) {\ndiff --git a/dist/node/chunk-CwUP9ZhX.js b/dist/node/chunk-CwUP9ZhX.js\nindex e8b4954d00f247fb852096bb1f8f077fcfc1f93f..8db594d1bdaac76359656a95ac96cd98161b1062 100644\n--- a/dist/node/chunk-CwUP9ZhX.js\n+++ b/dist/node/chunk-CwUP9ZhX.js\n@@ -2053,7 +2053,7 @@ function requireBrowser () {\n \t\t\t} catch (error) {\n \t\t\t\treturn '[UnexpectedJSONParseError]: ' + error.message;\n \t\t\t}\n-\t\t}; \n+\t\t};\n \t} (browser, browser.exports));\n \treturn browser.exports;\n }\n@@ -2328,7 +2328,7 @@ function requireNode () {\n \t\tformatters.O = function (v) {\n \t\t\tthis.inspectOpts.colors = this.useColors;\n \t\t\treturn util.inspect(v, this.inspectOpts);\n-\t\t}; \n+\t\t};\n \t} (node, node.exports));\n \treturn node.exports;\n }\n@@ -3522,7 +3522,7 @@ function requireFs () {\n \t\t    'fs.realpath.native is not a function. Is fs being monkey-patched?',\n \t\t    'Warning', 'fs-extra-WARN0003'\n \t\t  );\n-\t\t} \n+\t\t}\n \t} (fs$1));\n \treturn fs$1;\n }\n@@ -6185,7 +6185,7 @@ class AST {\n                         const aps = addPatternStart;\n                         // check if we have a possibility of matching . or ..,\n                         // and prevent that.\n-                        const needNoTrav = \n+                        const needNoTrav =\n                         // dots are allowed, and the pattern starts with [ or .\n                         (dot && aps.has(src.charAt(0))) ||\n                             // the pattern starts with \\., and then [ or .\n@@ -8616,11 +8616,11 @@ class LRUCache {\n             b.__abortController instanceof AC);\n     }\n     async fetch(k, fetchOptions = {}) {\n-        const { \n+        const {\n         // get options\n-        allowStale = this.allowStale, updateAgeOnGet = this.updateAgeOnGet, noDeleteOnStaleGet = this.noDeleteOnStaleGet, \n+        allowStale = this.allowStale, updateAgeOnGet = this.updateAgeOnGet, noDeleteOnStaleGet = this.noDeleteOnStaleGet,\n         // set options\n-        ttl = this.ttl, noDisposeOnSet = this.noDisposeOnSet, size = 0, sizeCalculation = this.sizeCalculation, noUpdateTTL = this.noUpdateTTL, \n+        ttl = this.ttl, noDisposeOnSet = this.noDisposeOnSet, size = 0, sizeCalculation = this.sizeCalculation, noUpdateTTL = this.noUpdateTTL,\n         // fetch exclusive options\n         noDeleteOnFetchRejection = this.noDeleteOnFetchRejection, allowStaleOnFetchRejection = this.allowStaleOnFetchRejection, ignoreFetchAbort = this.ignoreFetchAbort, allowStaleOnFetchAbort = this.allowStaleOnFetchAbort, context, forceRefresh = false, status, signal, } = fetchOptions;\n         if (!this.#hasFetchMethod) {\n@@ -14468,7 +14468,7 @@ function requireUtils$4 () {\n \t\t  }\n \n \t\t  return last;\n-\t\t}; \n+\t\t};\n \t} (utils$5));\n \treturn utils$5;\n }\n@@ -17226,7 +17226,7 @@ function requireDist$1 () {\n \t\texports.fdir = void 0;\n \t\tconst builder_1 = requireBuilder();\n \t\tObject.defineProperty(exports, \"fdir\", { enumerable: true, get: function () { return builder_1.Builder; } });\n-\t\t__exportStar(requireTypes$1(), exports); \n+\t\t__exportStar(requireTypes$1(), exports);\n \t} (dist$1));\n \treturn dist$1;\n }\n@@ -18267,6 +18267,7 @@ const notFoundPageData = {\n   lastUpdated: 0,\n   isNotFound: true\n };\n+const versionedPaths = [\"clients\", \"plugins\"];\n function isActive(currentPath, matchPath, asRegex = false) {\n   if (matchPath === void 0) {\n     return false;\n@@ -18275,8 +18276,17 @@ function isActive(currentPath, matchPath, asRegex = false) {\n   if (asRegex) {\n     return new RegExp(matchPath).test(currentPath);\n   }\n-  if (normalize$1(matchPath) !== currentPath) {\n-    return false;\n+  const normalizedMatchPath = normalize$1(matchPath);\n+  if (normalizedMatchPath !== currentPath) {\n+    const currentPathParts = currentPath.split(\"/\");\n+    if (currentPathParts.length > 3 && versionedPaths.some((entry) => entry === currentPathParts[2])) {\n+      currentPath = currentPathParts.slice(0, 4).join(\"/\");\n+      if (normalizedMatchPath !== currentPath) {\n+        return false;\n+      }\n+    } else {\n+      return false;\n+    }\n   }\n   const hashMatch = matchPath.match(HASH_RE);\n   if (hashMatch) {\n@@ -23631,7 +23641,7 @@ function requireEngines () {\n \t\t  stringify: function() {\n \t\t    throw new Error('stringifying JavaScript is not supported');\n \t\t  }\n-\t\t}; \n+\t\t};\n \t} (engines));\n \treturn engines.exports;\n }\n@@ -23731,7 +23741,7 @@ function requireUtils$2 () {\n \t\texports.startsWith = function(str, substr, len) {\n \t\t  if (typeof len !== 'number') len = substr.length;\n \t\t  return str.slice(0, len) === substr;\n-\t\t}; \n+\t\t};\n \t} (utils$3));\n \treturn utils$3;\n }\n@@ -25043,7 +25053,7 @@ const decodeMap = new Map([\n /**\n  * Polyfill for `String.fromCodePoint`. It is used to create a string from a Unicode code point.\n  */\n-const fromCodePoint$1 = \n+const fromCodePoint$1 =\n // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition, node/no-unsupported-features/es-builtins\n (_a = String.fromCodePoint) !== null && _a !== void 0 ? _a : function (codePoint) {\n     let output = \"\";\n@@ -25135,7 +25145,7 @@ var DecodingMode;\n class EntityDecoder {\n     constructor(\n     /** The tree used to decode entities. */\n-    decodeTree, \n+    decodeTree,\n     /**\n      * The function that is called when a codepoint is decoded.\n      *\n@@ -25145,7 +25155,7 @@ class EntityDecoder {\n      * @param codepoint The decoded codepoint.\n      * @param consumed The number of bytes consumed by the decoder.\n      */\n-    emitCodePoint, \n+    emitCodePoint,\n     /** An object that is used to produce errors. */\n     errors) {\n         this.decodeTree = decodeTree;\n@@ -25458,7 +25468,7 @@ function getDecoder(decodeTree) {\n         while ((offset = str.indexOf(\"&\", offset)) >= 0) {\n             ret += str.slice(lastIndex, offset);\n             decoder.startEntity(decodeMode);\n-            const len = decoder.write(str, \n+            const len = decoder.write(str,\n             // Skip the \"&\"\n             offset + 1);\n             if (len < 0) {\n@@ -38931,7 +38941,7 @@ class SignalExit extends SignalExitBase {\n const process$1 = globalThis.process;\n // wrap so that we call the method on the actual handler, without\n // exporting it directly.\n-const { \n+const {\n /**\n  * Called when the process is exiting, whether via signal, explicit\n  * exit, or running out of stuff to do.\n@@ -41070,7 +41080,7 @@ function requireEastasianwidth () {\n \t\t    eawLen += charLen;\n \t\t  }\n \t\t  return result;\n-\t\t}; \n+\t\t};\n \t} (eastasianwidth));\n \treturn eastasianwidth.exports;\n }\n@@ -42826,7 +42836,7 @@ function requireTypes () {\n \t\t    IndexTagNames[\"sitemapindex\"] = \"sitemapindex\";\n \t\t    IndexTagNames[\"loc\"] = \"loc\";\n \t\t    IndexTagNames[\"lastmod\"] = \"lastmod\";\n-\t\t})(exports.IndexTagNames || (exports.IndexTagNames = {})); \n+\t\t})(exports.IndexTagNames || (exports.IndexTagNames = {}));\n \t} (types));\n \treturn types;\n }\n@@ -42840,7 +42850,7 @@ function requireSitemapXml () {\n \thasRequiredSitemapXml = 1;\n \tObject.defineProperty(sitemapXml, \"__esModule\", { value: true });\n \tsitemapXml.element = sitemapXml.ctag = sitemapXml.otag = sitemapXml.text = void 0;\n-\tconst invalidXMLUnicodeRegex = \n+\tconst invalidXMLUnicodeRegex =\n \t// eslint-disable-next-line no-control-regex\n \t/[\\u0000-\\u0008\\u000B\\u000C\\u000E-\\u001F\\u007F-\\u0084\\u0086-\\u009F\\uD800-\\uDFFF\\uFDD0-\\uFDDF\\u{1FFFE}-\\u{1FFFF}\\u{2FFFE}-\\u{2FFFF}\\u{3FFFE}-\\u{3FFFF}\\u{4FFFE}-\\u{4FFFF}\\u{5FFFE}-\\u{5FFFF}\\u{6FFFE}-\\u{6FFFF}\\u{7FFFE}-\\u{7FFFF}\\u{8FFFE}-\\u{8FFFF}\\u{9FFFE}-\\u{9FFFF}\\u{AFFFE}-\\u{AFFFF}\\u{BFFFE}-\\u{BFFFF}\\u{CFFFE}-\\u{CFFFF}\\u{DFFFE}-\\u{DFFFF}\\u{EFFFE}-\\u{EFFFF}\\u{FFFFE}-\\u{FFFFF}\\u{10FFFE}-\\u{10FFFF}]/gu;\n \tconst amp = /&/g;\n@@ -43586,7 +43596,7 @@ function requireSitemapStream () {\n \t\t        });\n \t\t    });\n \t\t}\n-\t\texports.streamToPromise = streamToPromise; \n+\t\texports.streamToPromise = streamToPromise;\n \t} (sitemapStream));\n \treturn sitemapStream;\n }\n@@ -43809,7 +43819,7 @@ function requireSitemapIndexStream () {\n \t\t        });\n \t\t    }\n \t\t}\n-\t\texports.SitemapAndIndexStream = SitemapAndIndexStream; \n+\t\texports.SitemapAndIndexStream = SitemapAndIndexStream;\n \t} (sitemapIndexStream));\n \treturn sitemapIndexStream;\n }\n@@ -45470,7 +45480,7 @@ function requireSax () {\n \t\t      }\n \t\t    }());\n \t\t  }\n-\t\t})(exports); \n+\t\t})(exports);\n \t} (sax));\n \treturn sax;\n }\n@@ -46277,7 +46287,7 @@ function requireSitemapSimple () {\n \t\t    }\n \t\t};\n \t\texports.simpleSitemapAndIndex = simpleSitemapAndIndex;\n-\t\texports.default = exports.simpleSitemapAndIndex; \n+\t\texports.default = exports.simpleSitemapAndIndex;\n \t} (sitemapSimple));\n \treturn sitemapSimple;\n }\n@@ -46333,7 +46343,7 @@ function requireDist () {\n \t\tObject.defineProperty(exports, \"XMLToSitemapIndexStream\", { enumerable: true, get: function () { return sitemap_index_parser_1.XMLToSitemapIndexStream; } });\n \t\tObject.defineProperty(exports, \"IndexObjectStreamToJSON\", { enumerable: true, get: function () { return sitemap_index_parser_1.IndexObjectStreamToJSON; } });\n \t\tvar sitemap_simple_1 = requireSitemapSimple();\n-\t\tObject.defineProperty(exports, \"simpleSitemapAndIndex\", { enumerable: true, get: function () { return sitemap_simple_1.simpleSitemapAndIndex; } }); \n+\t\tObject.defineProperty(exports, \"simpleSitemapAndIndex\", { enumerable: true, get: function () { return sitemap_simple_1.simpleSitemapAndIndex; } });\n \t} (dist));\n \treturn dist;\n }\n@@ -48930,7 +48940,7 @@ function requireLodash_template () {\n \t\t  return false;\n \t\t}\n \n-\t\tmodule.exports = template; \n+\t\tmodule.exports = template;\n \t} (lodash_template, lodash_template.exports));\n \treturn lodash_template.exports;\n }\n@@ -49165,7 +49175,7 @@ function requirePostcssPrefixSelector () {\n \n \t  return {\n \t    postcssPlugin: 'postcss-prefix-selector',\n-\t    prepare(result) { \n+\t    prepare(result) {\n \t      const root = result.root;\n \t      const file = root.source.input.file;\n \n"
  },
  {
    "path": "pnpm-workspace.yaml",
    "content": "packages:\n  - docs\n  - dev/**\n  - examples/**/*\n  - packages/**/*\n  - '!examples/*/.output'\n\npatchedDependencies:\n  vitepress: patches/vitepress.patch\n"
  },
  {
    "path": "pyproject.toml",
    "content": "[project]\nname = \"hey-api-dev\"\nversion = \"0.0.0\"\nrequires-python = \">=3.9\"\n\n[dependency-groups]\ndev = [\"httpx>=0.27\", \"mypy>=1.15\", \"pydantic>=2.0\", \"ruff>=0.11\"]\n\n[tool.mypy]\npython_version = \"3.9\"\nstrict = false\nwarn_return_any = true\nwarn_unused_configs = true\n\n[tool.ruff]\nline-length = 120\ntarget-version = \"py310\"\n\n[tool.ruff.format]\nexclude = [\"**/__snapshots__/**\"]\n\n[tool.ruff.lint]\nselect = [\"E\", \"F\", \"W\", \"I\"]\n"
  },
  {
    "path": "renovate.json",
    "content": "{\n  \"$schema\": \"https://docs.renovatebot.com/renovate-schema.json\",\n  \"dependencyDashboardTitle\": \"Dependencies 📦\",\n  \"extends\": [\"config:recommended\"],\n  \"ignorePaths\": [\"**/node_modules/**\"],\n  \"minimumReleaseAge\": \"3 days\",\n  \"packageRules\": [\n    {\n      \"matchPackageNames\": [\"zod\"],\n      \"matchFileNames\": [\"packages/openapi-ts-tests/zod/v3/**\"],\n      \"allowedVersions\": \"<4.0.0\"\n    },\n    {\n      \"matchFileNames\": [\"examples/**\"],\n      \"groupName\": \"examples\",\n      \"prPriority\": -1\n    },\n    {\n      \"matchFileNames\": [\"packages/**\"],\n      \"groupName\": \"core packages\",\n      \"prPriority\": 10\n    }\n  ],\n  \"prConcurrentLimit\": 4,\n  \"schedule\": [\"before 3am on Monday\"],\n  \"updatePinnedDependencies\": true\n}\n"
  },
  {
    "path": "scripts/examples-check.sh",
    "content": "#!/usr/bin/env bash\n\n# Check if generated client code for all examples is up-to-date\n# This script is used in CI to ensure examples are kept in sync with the codebase\n\nset -e\n\n# Get the directory of this script\nSCRIPT_DIR=\"$(cd \"$(dirname \"$0\")\" && pwd)\"\nROOT_DIR=\"$(cd \"$SCRIPT_DIR/..\" && pwd)\"\n\necho \"Checking if generated code is up-to-date...\"\n\n# Generate fresh code\n\"$SCRIPT_DIR/examples-generate.sh\"\n\n# Check if there are any changes\nif ! git diff --quiet; then\n  echo \"\"\n  echo \"━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\"\n  echo \"❌ ERROR: Generated code is out of sync!\"\n  echo \"━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\"\n  echo \"\"\n  echo \"The following files have changed:\"\n  git diff --name-only\n  echo \"\"\n  echo \"To fix this, run:\"\n  echo \"  pnpm examples:generate\"\n  echo \"\"\n  echo \"Then commit the changes.\"\n  exit 1\nfi\n\necho \"\"\necho \"━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\"\necho \"✅ All generated code is up-to-date!\"\necho \"━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\"\n"
  },
  {
    "path": "scripts/examples-generate.sh",
    "content": "#!/usr/bin/env bash\n\n# Generate client code for all examples that have openapi-ts script\n# This script is used to ensure examples are up-to-date with the latest code\n\nset -e\n\n# Get the directory of this script\nSCRIPT_DIR=\"$(cd \"$(dirname \"$0\")\" && pwd)\"\nROOT_DIR=\"$(cd \"$SCRIPT_DIR/..\" && pwd)\"\n\necho \"⏳ Generating client code for all examples...\"\n\n# Find all examples with openapi-ts script and generate code in parallel\n# Concurrency control: adjust this number depending on CI machine resources\nCONCURRENCY=${CONCURRENCY:-4}\ntmpdir=$(mktemp -d)\n# Use a simple space-separated list of pids and per-pid files for metadata\nPIDS=\"\"\n\nwait_for_slot() {\n  # Wait until number of background jobs is less than CONCURRENCY\n  while [ \"$(jobs -rp | wc -l)\" -ge \"$CONCURRENCY\" ]; do\n    sleep 0.2\n  done\n}\n\nfor dir in \"$ROOT_DIR\"/examples/*/; do\n  package_json=\"$dir/package.json\"\n  if [ ! -f \"$package_json\" ]; then\n    continue\n  fi\n\n  if ! grep -q \"\\\"openapi-ts\\\":\" \"$package_json\"; then\n    continue\n  fi\n\n  example_name=$(basename \"$dir\")\n  echo \"📦 Scheduling: $example_name\"\n\n  wait_for_slot\n\n  log=\"$tmpdir/${example_name}.log\"\n  (\n    echo \"Generating: $example_name\"\n    set -e\n    cd \"$dir\"\n    echo \"-> Running openapi-ts\"\n    pnpm run openapi-ts\n\n    # Format generated files in this example only to keep the step fast\n    if command -v pnpm >/dev/null 2>&1 && pnpm -w -s --version >/dev/null 2>&1; then\n      pnpm -s exec oxfmt \"src/**/*.{ts,tsx,js,jsx}\" || true\n      pnpm -s exec eslint --fix \"src/**/*.{ts,tsx,js,jsx}\" || true\n    else\n      if [ -x \"node_modules/.bin/oxfmt\" ]; then\n        ./node_modules/.bin/oxfmt \"src/**/*.{ts,tsx,js,jsx}\" || true\n      fi\n      if [ -x \"node_modules/.bin/eslint\" ]; then\n        ./node_modules/.bin/eslint --fix \"src/**/*.{ts,tsx,js,jsx}\" || true\n      fi\n    fi\n\n    echo \"Completed: $example_name\"\n  ) >\"$log\" 2>&1 &\n\n  pid=$!\n  PIDS=\"$PIDS $pid\"\n  printf '%s' \"$example_name\" >\"$tmpdir/$pid.name\"\n  printf '%s' \"$log\" >\"$tmpdir/$pid.log\"\ndone\n\nfailed=0\nfor pid in $PIDS; do\n  if wait \"$pid\"; then\n    name=$(cat \"$tmpdir/$pid.name\" 2>/dev/null || echo \"$pid\")\n    echo \"✅ $name succeeded\"\n  else\n    name=$(cat \"$tmpdir/$pid.name\" 2>/dev/null || echo \"$pid\")\n    # Read the metadata file which contains the path to the real log\n    logpath=$(cat \"$tmpdir/$pid.log\" 2>/dev/null || echo \"\")\n    if [ -n \"$logpath\" ] && [ -f \"$logpath\" ]; then\n      echo \"❌ $name failed — showing full log ($logpath):\"\n      echo \"---- full log start ----\"\n      cat \"$logpath\" || true\n      echo \"---- full log end ----\"\n    else\n      echo \"❌ $name failed — no log found (metadata: $tmpdir/$pid.log)\"\n    fi\n    failed=1\n  fi\ndone\n\nif [ \"$failed\" -ne 0 ]; then\n  echo \"One or more examples failed to generate. Logs are in: $tmpdir\"\n  exit 1\nfi\n\necho \"✨ All examples generated successfully!\"\n"
  },
  {
    "path": "scripts/publish-preview-packages.sh",
    "content": "#!/usr/bin/env bash\n\nresult=$(pnpm turbo run build --affected --dry-run=json 2>&1)\n\njson=$(printf '%s\\n' \"$result\" | awk '/^{/ {flag=1} flag {print}')\n\nif [ -z \"$json\" ]; then\n  echo \"Error: no JSON output from turbo; aborting.\" >&2\n  echo \"Raw result was:\"\n  echo \"$result\"\n  exit 1\nfi\n\necho \"Affected tasks:\"\necho \"$json\" | jq -r '.tasks[].directory'\n\npackages=$(echo \"$json\" | jq -r '.tasks[].directory' | grep '^packages/' | while read -r dir; do\n  if [ \"$(jq -r '.private' \"$dir/package.json\")\" != \"true\" ]; then\n    echo \"./$dir\"\n  fi\ndone)\n\necho \"Packages to publish:\"\necho \"$packages\"\n\nif [ -n \"$packages\" ]; then\n  pnpx pkg-pr-new publish --pnpm $packages\nelse\n  echo \"No packages to publish\"\nfi\n"
  },
  {
    "path": "scripts/update-contributors.sh",
    "content": "#!/usr/bin/env bash\n\nREPO=\"hey-api/openapi-ts\"\nPER_PAGE=100\nPAGE=1\nUSERS=()\n\nTMP_LOGINS=\"tmp_logins.txt\"\nTMP_USERS=\"tmp_users.txt\"\n\nCACHE_DIR=\".cache/github-users\"\nmkdir -p \"$CACHE_DIR\"\n\nAUTH_HEADER=()\nif [[ -n \"${GITHUB_TOKEN:-}\" ]]; then\n  AUTH_HEADER=(-H \"Authorization: token $GITHUB_TOKEN\")\nfi\n\nEXCLUDED_FILE=\"./docs/.contributorsignore\"\nSINCE_FILE=\"./docs/.contributorssince\"\n\n# disabled for now, we'd need to append to the list instead of write\n# if [[ -f \"$SINCE_FILE\" ]]; then\n#   SINCE=$(cat \"$SINCE_FILE\")\n# else\n#   SINCE=\"2024-01-27T00:00:00Z\"\n# fi\nSINCE=\"2024-01-27T00:00:00Z\"\n\nMAX_COMMIT_EPOCH=0\n\n> \"$TMP_USERS\"\n\nwhile :; do\n  TMP_JSON=$(mktemp)\n  HTTP_STATUS=$(curl -s -w \"%{http_code}\" -o \"$TMP_JSON\" \\\n    \"${AUTH_HEADER[@]}\" \\\n    \"https://api.github.com/repos/$REPO/commits?sha=main&since=$SINCE&per_page=$PER_PAGE&page=$PAGE\")\n\n  if [ \"$HTTP_STATUS\" != \"200\" ]; then\n    echo \"GitHub API error: $HTTP_STATUS\"\n    cat \"$TMP_JSON\"\n    rm \"$TMP_JSON\"\n    break\n  fi\n\n  if ! jq empty \"$TMP_JSON\" >/dev/null 2>&1; then\n    echo \"Invalid JSON, stopping.\"\n    cat \"$TMP_JSON\" > debug_response.json\n    rm \"$TMP_JSON\"\n    break\n  fi\n\n  COUNT=$(jq 'length' \"$TMP_JSON\")\n  if [ \"$COUNT\" -eq 0 ]; then\n    rm \"$TMP_JSON\"\n    break\n  fi\n\n  # Track max commit date epoch for the whole run\n  LATEST_COMMIT_DATE=$(jq -r '.[].commit.committer.date' \"$TMP_JSON\" | sort -r | head -n1)\n  if [[ -n \"$LATEST_COMMIT_DATE\" ]]; then\n    EPOCH=$(date -j -f \"%Y-%m-%dT%H:%M:%SZ\" \"$LATEST_COMMIT_DATE\" \"+%s\")\n    if [ \"$EPOCH\" -gt \"$MAX_COMMIT_EPOCH\" ]; then\n      MAX_COMMIT_EPOCH=$EPOCH\n    fi\n  fi\n\n  jq -r '.[].author | select(.login != null) | .login' \"$TMP_JSON\" | sort -u > \"$TMP_LOGINS\"\n\n  while read -r login; do\n    if ! grep -Fxq \"$login\" \"$EXCLUDED_FILE\"; then\n      if ! printf '%s\\n' \"${USERS[@]}\" | grep -qx \"$login\"; then\n        USERS+=(\"$login\")\n\n        CACHE_FILE=\"$CACHE_DIR/$login.json\"\n        if [ -f \"$CACHE_FILE\" ]; then\n          USER_JSON=$(<\"$CACHE_FILE\")\n        else\n          echo \"Fetching user $login\"\n          USER_JSON=$(curl -s \"${AUTH_HEADER[@]}\" \"https://api.github.com/users/$login\")\n          echo \"$USER_JSON\" > \"$CACHE_FILE\"\n        fi\n\n        SANITIZED_JSON=$(echo \"$USER_JSON\" | tr -d '\\000-\\037')\n        NAME=$(jq -r '.name // empty' <<< \"$SANITIZED_JSON\")\n        echo \"$login|$NAME\" >> \"$TMP_USERS\"\n      fi\n    fi\n  done < \"$TMP_LOGINS\"\n\n  rm \"$TMP_JSON\" \"$TMP_LOGINS\"\n  PAGE=$((PAGE + 1))\ndone\n\n# Update SINCE_FILE once after all pages\nif [ \"$MAX_COMMIT_EPOCH\" -gt 0 ]; then\n  BUFFER_DAYS=90\n  BUFFER_SECONDS=$((BUFFER_DAYS * 86400))\n  BUFFERED_EPOCH=$((MAX_COMMIT_EPOCH - BUFFER_SECONDS))\n  BUFFERED_DATE=$(date -u -r \"$BUFFERED_EPOCH\" \"+%Y-%m-%dT%H:%M:%SZ\")\n  echo \"$BUFFERED_DATE\" > \"$SINCE_FILE\"\n  echo \"Updated SINCE to $BUFFERED_DATE\"\nfi\n\nNAMES_SORTED=$(awk -F'|' '$2 != \"\"' \"$TMP_USERS\" | sort -t'|' -k2,2)\nNO_NAMES_SORTED=$(awk -F'|' '$2 == \"\"' \"$TMP_USERS\" | sort -t'|' -k1,1)\n\n{\n  echo \"$NAMES_SORTED\"\n  echo \"$NO_NAMES_SORTED\"\n} | while IFS='|' read -r login name; do\n  if [ -n \"$name\" ]; then\n    echo \"- [$name](https://github.com/$login)\"\n  else\n    echo \"- [$login](https://github.com/$login)\"\n  fi\ndone > ./docs/partials/contributors-list.md\n\nif [[ -f \"$TMP_USERS\" ]]; then\n  rm \"$TMP_USERS\"\nfi\n\necho \"Done. Total contributors: ${#USERS[@]}\"\n"
  },
  {
    "path": "specs/2.0.x/additional-properties-false.json",
    "content": "{\n  \"swagger\": \"2.0\",\n  \"info\": {\n    \"title\": \"OpenAPI 2.0 additional properties false example\",\n    \"version\": \"1\"\n  },\n  \"definitions\": {\n    \"Foo\": {\n      \"required\": [\"foo\"],\n      \"type\": \"object\",\n      \"properties\": {\n        \"foo\": {\n          \"type\": \"string\"\n        }\n      },\n      \"additionalProperties\": false\n    },\n    \"Bar\": {\n      \"allOf\": [\n        {\n          \"$ref\": \"#/definitions/Foo\"\n        },\n        {\n          \"type\": \"object\",\n          \"additionalProperties\": false\n        }\n      ]\n    },\n    \"Baz\": {\n      \"allOf\": [\n        {\n          \"$ref\": \"#/definitions/Foo\"\n        },\n        {\n          \"required\": [\"bar\"],\n          \"type\": \"object\",\n          \"properties\": {\n            \"bar\": {\n              \"type\": \"string\"\n            }\n          },\n          \"additionalProperties\": false\n        }\n      ]\n    }\n  }\n}\n"
  },
  {
    "path": "specs/2.0.x/additional-properties-true.json",
    "content": "{\n  \"swagger\": \"2.0\",\n  \"info\": {\n    \"title\": \"OpenAPI 2.0 additional properties true example\",\n    \"version\": \"1\"\n  },\n  \"definitions\": {\n    \"Foo\": {\n      \"required\": [\"foo\"],\n      \"type\": \"object\",\n      \"properties\": {\n        \"foo\": {\n          \"type\": \"string\"\n        }\n      },\n      \"additionalProperties\": true\n    },\n    \"Bar\": {\n      \"allOf\": [\n        {\n          \"$ref\": \"#/definitions/Foo\"\n        },\n        {\n          \"type\": \"object\",\n          \"additionalProperties\": true\n        }\n      ]\n    },\n    \"Baz\": {\n      \"allOf\": [\n        {\n          \"$ref\": \"#/definitions/Foo\"\n        },\n        {\n          \"required\": [\"bar\"],\n          \"type\": \"object\",\n          \"properties\": {\n            \"bar\": {\n              \"type\": \"string\"\n            }\n          },\n          \"additionalProperties\": true\n        }\n      ]\n    },\n    \"Qux\": {\n      \"type\": \"object\",\n      \"additionalProperties\": {}\n    }\n  }\n}\n"
  },
  {
    "path": "specs/2.0.x/array-items-all-of.yaml",
    "content": "swagger: '2.0'\ninfo:\n  title: OpenAPI 2.0 array items allOf example\n  version: '1'\ndefinitions:\n  ArrayWithAllOfObjects:\n    type: array\n    items:\n      allOf:\n        - type: object\n          properties:\n            id:\n              type: integer\n        - type: object\n          properties:\n            name:\n              type: string\n  ArrayWithAllOfPrimitives:\n    type: array\n    items:\n      allOf:\n        - type: number\n        - type: string\n  ArrayWithAllOfRefs:\n    type: array\n    items:\n      allOf:\n        - $ref: '#/definitions/BaseModel'\n        - type: object\n          properties:\n            extra:\n              type: string\n  BaseModel:\n    type: object\n    properties:\n      id:\n        type: integer\n      createdAt:\n        type: string\n        format: date-time\n"
  },
  {
    "path": "specs/2.0.x/body-response-text-plain.yaml",
    "content": "swagger: 2.0\ninfo:\n  title: OpenAPI 2.0 body response text plain example\n  version: 1\npaths:\n  /foo:\n    post:\n      consumes:\n        - text/plain\n      produces:\n        - text/plain\n      parameters:\n        - name: body\n          in: body\n          required: true\n          schema:\n            type: string\n      responses:\n        '200':\n          description: OK\n          schema:\n            type: string\n"
  },
  {
    "path": "specs/2.0.x/enum-names-values.json",
    "content": "{\n  \"swagger\": \"2.0\",\n  \"info\": {\n    \"title\": \"OpenAPI 2.0 enum names values example\",\n    \"version\": \"1\"\n  },\n  \"definitions\": {\n    \"1-10\": {\n      \"enum\": [\"1-10\", \"11-20\"],\n      \"type\": \"string\"\n    },\n    \"myFoo\": {\n      \"enum\": [\"myFoo\", \"myBar\"],\n      \"type\": \"string\"\n    },\n    \"MyFoo\": {\n      \"enum\": [\"MyFoo\", \"MyBar\"],\n      \"type\": \"string\"\n    },\n    \"Foo\": {\n      \"enum\": [\"foo\", \"bar\", \"\", true, false],\n      \"type\": \"string\"\n    },\n    \"Numbers\": {\n      \"enum\": [100, 200, 300, -100, -200, -300],\n      \"type\": \"number\"\n    },\n    \"Arrays\": {\n      \"enum\": [[\"foo\"], [\"bar\"], [\"baz\"]],\n      \"type\": \"array\"\n    }\n  }\n}\n"
  },
  {
    "path": "specs/2.0.x/exclude-deprecated.yaml",
    "content": "swagger: 2.0\ninfo:\n  title: OpenAPI 2.0 exclude deprecated example\n  version: 1\nproduces:\n  - application/json\nconsumes:\n  - application/json\npaths:\n  /foo:\n    post:\n      parameters:\n        - name: body\n          in: body\n          required: true\n          schema:\n            $ref: '#/definitions/Foo'\n      responses:\n        '200':\n          description: OK\n  /bar:\n    post:\n      deprecated: true\n      parameters:\n        - name: body\n          in: body\n          required: true\n          schema:\n            $ref: '#/definitions/Bar'\n      responses:\n        '200':\n          description: OK\ndefinitions:\n  Foo:\n    type: string\n  Bar:\n    deprecated: true\n    type: string\n"
  },
  {
    "path": "specs/2.0.x/external-shared.json",
    "content": "{\n  \"definitions\": {\n    \"ExternalSharedModel\": {\n      \"type\": \"object\",\n      \"properties\": {\n        \"id\": { \"type\": \"string\" },\n        \"name\": { \"type\": \"string\" }\n      },\n      \"required\": [\"id\"]\n    },\n    \"ExternalSharedModelWithUuid\": {\n      \"type\": \"string\",\n      \"format\": \"uuid\"\n    },\n    \"ExternalNested\": {\n      \"type\": \"object\",\n      \"properties\": {\n        \"inner\": {\n          \"type\": \"object\",\n          \"properties\": {\n            \"deep\": { \"type\": \"string\" }\n          }\n        }\n      }\n    },\n    \"ExternalNestedNumeric\": {\n      \"type\": \"object\",\n      \"properties\": {\n        \"0\": {\n          \"type\": \"object\",\n          \"properties\": {\n            \"1\": { \"type\": \"string\" }\n          }\n        }\n      }\n    }\n  }\n}\n"
  },
  {
    "path": "specs/2.0.x/external.yaml",
    "content": "swagger: '2.0'\ninfo:\n  title: Swagger 2.0 external example\n  version: 1\n# Paths using external references\npaths:\n  /external-model:\n    get:\n      summary: Get external model\n      parameters:\n        - $ref: '#/parameters/ExternalIdParam'\n        - $ref: '#/parameters/ExternalUuidParam'\n      responses:\n        '200':\n          $ref: '#/responses/ExternalModelResponse'\n        '400':\n          $ref: '#/responses/ExternalUuidResponse'\n    post:\n      summary: Create external model\n      parameters:\n        - $ref: '#/parameters/ExternalModelBody'\n      responses:\n        '201':\n          $ref: '#/responses/ExternalModelResponse'\n        '422':\n          $ref: '#/responses/ExternalUnionResponse'\n\n  /external-uuid:\n    get:\n      summary: Get external UUID\n      parameters:\n        - $ref: '#/parameters/ExternalUuidParam'\n      responses:\n        '200':\n          $ref: '#/responses/ExternalUuidResponse'\n    put:\n      summary: Update external UUID\n      parameters:\n        - $ref: '#/parameters/ExternalUuidBody'\n      responses:\n        '200':\n          $ref: '#/responses/ExternalUuidResponse'\n\n  /external-nested:\n    get:\n      summary: Get external nested object\n      parameters:\n        - $ref: '#/parameters/ExternalDeepParam'\n      responses:\n        '200':\n          $ref: '#/responses/ExternalNestedResponse'\n    post:\n      summary: Create external nested object\n      parameters:\n        - $ref: '#/parameters/ExternalNestedBody'\n      responses:\n        '201':\n          $ref: '#/responses/ExternalNestedResponse'\n\n  /external-mixed:\n    get:\n      summary: Get mixed external data\n      parameters:\n        - $ref: '#/parameters/ExternalIdParam'\n        - $ref: '#/parameters/ExternalUuidParam'\n        - $ref: '#/parameters/ExternalDeepParam'\n        - $ref: '#/parameters/ExternalNumericParam'\n      responses:\n        '200':\n          $ref: '#/responses/ExternalArrayResponse'\n    post:\n      summary: Create mixed external data\n      parameters:\n        - $ref: '#/parameters/ExternalMixedBody'\n      responses:\n        '201':\n          $ref: '#/responses/ExternalModelResponse'\n\n  /external-array:\n    get:\n      summary: Get array of external models\n      responses:\n        '200':\n          $ref: '#/responses/ExternalArrayResponse'\n    post:\n      summary: Create array of external models\n      parameters:\n        - name: body\n          in: body\n          required: true\n          schema:\n            type: array\n            items:\n              $ref: './external-shared.json#/definitions/ExternalSharedModel'\n      responses:\n        '201':\n          $ref: '#/responses/ExternalArrayResponse'\n\n  /external-union:\n    get:\n      summary: Get union of external types\n      responses:\n        '200':\n          $ref: '#/responses/ExternalUnionResponse'\n    post:\n      summary: Create union of external types\n      parameters:\n        - name: body\n          in: body\n          required: true\n          schema:\n            oneOf:\n              - $ref: './external-shared.json#/definitions/ExternalSharedModel'\n              - $ref: './external-shared.json#/definitions/ExternalSharedModelWithUuid'\n              - $ref: './external-shared.json#/definitions/ExternalNested'\n      responses:\n        '201':\n          $ref: '#/responses/ExternalUnionResponse'\n\n  /external-properties/{id}:\n    get:\n      summary: Get external properties\n      parameters:\n        - name: id\n          in: path\n          required: true\n          schema:\n            $ref: './external-shared.json#/definitions/ExternalSharedModel/properties/id'\n        - name: uuid\n          in: query\n          schema:\n            $ref: './external-shared.json#/definitions/ExternalSharedModelWithUuid'\n        - name: deep\n          in: header\n          schema:\n            $ref: './external-shared.json#/definitions/ExternalNested/properties/inner/properties/deep'\n      responses:\n        '200':\n          schema:\n            type: object\n            properties:\n              id:\n                $ref: './external-shared.json#/definitions/ExternalSharedModel/properties/id'\n              name:\n                $ref: './external-shared.json#/definitions/ExternalSharedModel/properties/name'\n              uuid:\n                $ref: './external-shared.json#/definitions/ExternalSharedModelWithUuid'\n              deep:\n                $ref: './external-shared.json#/definitions/ExternalNested/properties/inner/properties/deep'\n              numeric:\n                $ref: './external-shared.json#/definitions/ExternalNestedNumeric/properties/0/properties/1'\n\n# Definitions (equivalent to components/schemas in OpenAPI 3.0)\ndefinitions:\n  # Basic external schema references (multiple uses of each type)\n  ExternalSchemaA:\n    description: External schema (A)\n    $ref: './external-shared.json#/definitions/ExternalSharedModel'\n  ExternalSchemaB:\n    description: External schema (B) - second use of ExternalSharedModel\n    $ref: './external-shared.json#/definitions/ExternalSharedModel'\n  ExternalSchemaC:\n    description: External schema (C) - third use of ExternalSharedModel\n    $ref: './external-shared.json#/definitions/ExternalSharedModel'\n\n  # Path-based references using /path syntax\n  ExternalSchemaPathA:\n    description: External schema via path reference (A)\n    $ref: './external-shared.json#/definitions/ExternalSharedModel'\n  ExternalSchemaPathB:\n    description: External schema via path reference (B) - second use\n    $ref: './external-shared.json#/definitions/ExternalSharedModel'\n\n  # UUID type references (multiple uses)\n  ExternalSchemaPropertyA:\n    description: External schema property (A)\n    type: object\n    properties:\n      uuid1:\n        $ref: './external-shared.json#/definitions/ExternalSharedModelWithUuid'\n  ExternalSchemaPropertyB:\n    description: External schema property (B) - second use of UUID\n    type: object\n    properties:\n      uuid2:\n        $ref: './external-shared.json#/definitions/ExternalSharedModelWithUuid'\n  ExternalSchemaPropertyC:\n    description: External schema property (C) - third use of UUID\n    type: object\n    properties:\n      uuid3:\n        $ref: './external-shared.json#/definitions/ExternalSharedModelWithUuid'\n\n  # Duplicate refs in same schema\n  ExternalSchemaPropertyD:\n    description: External schema property with duplicate refs (D)\n    type: object\n    properties:\n      uuid4:\n        $ref: './external-shared.json#/definitions/ExternalSharedModelWithUuid'\n      uuid5:\n        $ref: './external-shared.json#/definitions/ExternalSharedModelWithUuid'\n\n  # External property references\n  ExternalSchemaExternalProp:\n    description: External schema property via external property ref (id)\n    type: object\n    properties:\n      id3:\n        $ref: './external-shared.json#/definitions/ExternalSharedModel/properties/id'\n      id4:\n        $ref: './external-shared.json#/definitions/ExternalSharedModel/properties/id'\n\n  # Alias references\n  ExternalSchemaExternalPropAlias:\n    description: Alias to external property via component property ref\n    type: object\n    properties:\n      id5:\n        $ref: '#/definitions/ExternalSchemaExternalProp/properties/id3'\n      id6:\n        $ref: '#/definitions/ExternalSchemaExternalProp/properties/id4'\n\n  # Nested property references (multiple uses)\n  ExternalDoubleNestedProp:\n    description: External double nested prop via property ref\n    type: object\n    properties:\n      deep1:\n        $ref: './external-shared.json#/definitions/ExternalNested/properties/inner/properties/deep'\n      deep2:\n        $ref: './external-shared.json#/definitions/ExternalNested/properties/inner/properties/deep'\n\n  # Numeric property references (multiple uses)\n  ExternalDoubleNestedNumeric:\n    description: External double nested numeric properties\n    type: object\n    properties:\n      numeric1:\n        $ref: './external-shared.json#/definitions/ExternalNestedNumeric/properties/0/properties/1'\n      numeric2:\n        $ref: './external-shared.json#/definitions/ExternalNestedNumeric/properties/0/properties/1'\n\n  # Complex nested object references\n  ExternalNestedObjectA:\n    description: External nested object reference (A)\n    $ref: './external-shared.json#/definitions/ExternalNested'\n  ExternalNestedObjectB:\n    description: External nested object reference (B) - second use\n    $ref: './external-shared.json#/definitions/ExternalNested'\n\n  # Numeric nested object references\n  ExternalNestedNumericObjectA:\n    description: External numeric nested object reference (A)\n    $ref: './external-shared.json#/definitions/ExternalNestedNumeric'\n  ExternalNestedNumericObjectB:\n    description: External numeric nested object reference (B) - second use\n    $ref: './external-shared.json#/definitions/ExternalNestedNumeric'\n\n  # Mixed property references\n  ExternalMixedProperties:\n    description: Mixed external property references\n    type: object\n    properties:\n      id7:\n        $ref: './external-shared.json#/definitions/ExternalSharedModel/properties/id'\n      name1:\n        $ref: './external-shared.json#/definitions/ExternalSharedModel/properties/name'\n      uuid6:\n        $ref: './external-shared.json#/definitions/ExternalSharedModelWithUuid'\n      deep3:\n        $ref: './external-shared.json#/definitions/ExternalNested/properties/inner/properties/deep'\n      numeric3:\n        $ref: './external-shared.json#/definitions/ExternalNestedNumeric/properties/0/properties/1'\n\n  # Array of external references\n  ExternalArraySchema:\n    description: Array containing external references\n    type: object\n    properties:\n      items:\n        type: array\n        items:\n          $ref: './external-shared.json#/definitions/ExternalSharedModel'\n      uuidItems:\n        type: array\n        items:\n          $ref: './external-shared.json#/definitions/ExternalSharedModelWithUuid'\n\n  # Union types with external references\n  ExternalUnionSchema:\n    description: Union type with external references\n    oneOf:\n      - $ref: './external-shared.json#/definitions/ExternalSharedModel'\n      - $ref: './external-shared.json#/definitions/ExternalSharedModel'\n      - $ref: './external-shared.json#/definitions/ExternalSharedModelWithUuid'\n      - $ref: './external-shared.json#/definitions/ExternalSharedModelWithUuid'\n\n  # AllOf with external references\n  ExternalAllOfSchema:\n    description: AllOf with external references\n    allOf:\n      - $ref: './external-shared.json#/definitions/ExternalSharedModel'\n      - $ref: './external-shared.json#/definitions/ExternalSharedModel'\n      - type: object\n        properties:\n          additional:\n            $ref: './external-shared.json#/definitions/ExternalSharedModelWithUuid'\n\n  # AnyOf with external references\n  ExternalAnyOfSchema:\n    description: AnyOf with external references\n    anyOf:\n      - $ref: './external-shared.json#/definitions/ExternalNested'\n      - $ref: './external-shared.json#/definitions/ExternalNested'\n      - $ref: './external-shared.json#/definitions/ExternalNestedNumeric'\n      - $ref: './external-shared.json#/definitions/ExternalNestedNumeric'\n\n# Parameters using external references\nparameters:\n  ExternalIdParam:\n    name: id\n    in: path\n    required: true\n    schema:\n      $ref: './external-shared.json#/definitions/ExternalSharedModel/properties/id'\n  ExternalUuidParam:\n    name: uuid\n    in: query\n    schema:\n      $ref: './external-shared.json#/definitions/ExternalSharedModelWithUuid'\n  ExternalDeepParam:\n    name: deep\n    in: header\n    schema:\n      $ref: './external-shared.json#/definitions/ExternalNested/properties/inner/properties/deep'\n  ExternalNumericParam:\n    name: numeric\n    in: query\n    schema:\n      $ref: './external-shared.json#/definitions/ExternalNestedNumeric/properties/0/properties/1'\n\n  # Request bodies using external references\n  ExternalModelBody:\n    name: body\n    in: body\n    description: Request body using external model\n    required: true\n    schema:\n      $ref: './external-shared.json#/definitions/ExternalSharedModel'\n  ExternalUuidBody:\n    name: body\n    in: body\n    description: Request body using external UUID\n    schema:\n      $ref: './external-shared.json#/definitions/ExternalSharedModelWithUuid'\n  ExternalNestedBody:\n    name: body\n    in: body\n    description: Request body using external nested object\n    schema:\n      $ref: './external-shared.json#/definitions/ExternalNested'\n  ExternalMixedBody:\n    name: body\n    in: body\n    description: Request body with mixed external properties\n    schema:\n      type: object\n      properties:\n        id:\n          $ref: './external-shared.json#/definitions/ExternalSharedModel/properties/id'\n        name:\n          $ref: './external-shared.json#/definitions/ExternalSharedModel/properties/name'\n        uuid:\n          $ref: './external-shared.json#/definitions/ExternalSharedModelWithUuid'\n        deep:\n          $ref: './external-shared.json#/definitions/ExternalNested/properties/inner/properties/deep'\n\n# Responses using external references\nresponses:\n  ExternalModelResponse:\n    description: Response using external model\n    schema:\n      $ref: './external-shared.json#/definitions/ExternalSharedModel'\n  ExternalUuidResponse:\n    description: Response using external UUID\n    schema:\n      $ref: './external-shared.json#/definitions/ExternalSharedModelWithUuid'\n  ExternalNestedResponse:\n    description: Response using external nested object\n    schema:\n      $ref: './external-shared.json#/definitions/ExternalNested'\n  ExternalArrayResponse:\n    description: Response with array of external models\n    schema:\n      type: array\n      items:\n        $ref: './external-shared.json#/definitions/ExternalSharedModel'\n  ExternalUnionResponse:\n    description: Response with union of external types\n    schema:\n      oneOf:\n        - $ref: './external-shared.json#/definitions/ExternalSharedModel'\n        - $ref: './external-shared.json#/definitions/ExternalSharedModelWithUuid'\n        - $ref: './external-shared.json#/definitions/ExternalNested'\n"
  },
  {
    "path": "specs/2.0.x/form-data.json",
    "content": "{\n  \"swagger\": \"2.0\",\n  \"info\": {\n    \"title\": \"OpenAPI 2.0 form data example\",\n    \"version\": \"1\"\n  },\n  \"paths\": {\n    \"/v1/foo\": {\n      \"post\": {\n        \"consumes\": [\"multipart/form-data\"],\n        \"parameters\": [\n          {\n            \"in\": \"formData\",\n            \"name\": \"file\",\n            \"required\": true,\n            \"type\": \"file\"\n          },\n          {\n            \"in\": \"formData\",\n            \"name\": \"info\",\n            \"required\": true,\n            \"type\": \"string\"\n          }\n        ],\n        \"responses\": {\n          \"200\": {\n            \"description\": \"OK\",\n            \"schema\": {\n              \"$ref\": \"#/definitions/Foo\"\n            }\n          }\n        }\n      }\n    }\n  },\n  \"definitions\": {\n    \"Foo\": {\n      \"type\": \"object\",\n      \"properties\": {\n        \"status\": {\n          \"type\": \"integer\"\n        }\n      }\n    }\n  }\n}\n"
  },
  {
    "path": "specs/2.0.x/full.yaml",
    "content": "swagger: '2.0'\ninfo:\n  title: swagger\n  version: v1.0\nhost: localhost:3000\nbasePath: /base\nschemes:\n  - http\npaths:\n  /api/v{api-version}/no+tag:\n    tags: []\n    get:\n      operationId: ServiceWithEmptyTag\n    patch:\n      responses:\n        default:\n          description: OK\n    put:\n      operationId: foo+Wow\n      responses:\n        default:\n          description: OK\n  /api/v{api-version}/simple:\n    get:\n      tags:\n        - Simple\n      operationId: GetCallWithoutParametersAndResponse\n    put:\n      tags:\n        - Simple\n      operationId: PutCallWithoutParametersAndResponse\n    post:\n      tags:\n        - Simple\n      operationId: PostCallWithoutParametersAndResponse\n    delete:\n      tags:\n        - Simple\n      operationId: DeleteCallWithoutParametersAndResponse\n    options:\n      tags:\n        - Simple\n      operationId: OptionsCallWithoutParametersAndResponse\n    head:\n      tags:\n        - Simple\n      operationId: HeadCallWithoutParametersAndResponse\n    patch:\n      tags:\n        - Simple\n      operationId: PatchCallWithoutParametersAndResponse\n  /api/v{api-version}/descriptions/:\n    post:\n      tags:\n        - Descriptions\n      operationId: CallWithDescriptions\n      parameters:\n        - description: |-\n            Testing multiline comments in string: First line\n            Second line\n\n            Fourth line\n          name: parameterWithBreaks\n          in: query\n          type: string\n        - description: 'Testing backticks in string: `backticks` and ```multiple\n            backticks``` should work'\n          name: parameterWithBackticks\n          in: query\n          type: string\n        - description: \"Testing slashes in string: \\\\backwards\\\\\\\\\\\\ and /forwards///\n            should work\"\n          name: parameterWithSlashes\n          in: query\n          type: string\n        - description: 'Testing expression placeholders in string: ${expression} should\n            work'\n          name: parameterWithExpressionPlaceholders\n          in: query\n          type: string\n        - description: 'Testing quotes in string: ''single quote'''''' and \"double\n            quotes\"\"\" should work'\n          name: parameterWithQuotes\n          in: query\n          type: string\n        - description: 'Testing reserved characters in string: /* inline */ and /** inline\n            **/ should work'\n          name: parameterWithReservedCharacters\n          in: query\n          type: string\n  /api/v{api-version}/parameters/{parameterPath}:\n    post:\n      tags:\n        - Parameters\n      operationId: CallWithParameters\n      parameters:\n        - description: This is the parameter that goes into the header\n          name: parameterHeader\n          in: header\n          type: string\n          required: true\n        - description: This is the parameter that goes into the query params\n          name: parameterQuery\n          in: query\n          type: string\n          required: true\n        - description: This is the parameter that goes into the form data\n          name: parameterForm\n          in: formData\n          type: string\n          required: true\n        - description: This is the parameter that goes into the path\n          name: parameterPath\n          in: path\n          type: string\n          required: true\n        - description: api-version should be required in standalone clients\n          name: api-version\n          in: path\n          type: string\n          required: true\n  /api/v{api-version}/parameters/{parameter.path.1}/{parameter-path-2}/{PARAMETER-PATH-3}:\n    post:\n      tags:\n        - Parameters\n      operationId: CallWithWeirdParameterNames\n      parameters:\n        - description: This is the parameter that goes into the path\n          name: parameter.path.1\n          in: path\n          type: string\n          required: false\n        - description: This is the parameter that goes into the path\n          name: parameter-path-2\n          in: path\n          type: string\n          required: false\n        - description: This is the parameter that goes into the path\n          name: PARAMETER-PATH-3\n          in: path\n          type: string\n          required: false\n        - description: This is the parameter with a reserved keyword\n          name: default\n          in: query\n          type: string\n          required: false\n        - description: This is the parameter that goes into the request header\n          name: parameter.header\n          in: header\n          type: string\n          required: true\n        - description: This is the parameter that goes into the request query params\n          name: parameter-query\n          in: query\n          type: string\n          required: true\n        - description: This is the parameter that is sent as request body\n          name: PARAMETER-BODY\n          in: body\n          required: true\n          schema:\n            type: string\n        - description: api-version should be required in standalone clients\n          name: api-version\n          in: path\n          type: string\n          required: true\n  /api/v{api-version}/defaults:\n    get:\n      tags:\n        - Defaults\n      operationId: CallWithDefaultParameters\n      parameters:\n        - description: This is a simple string with default value\n          name: parameterString\n          in: query\n          required: true\n          default: Hello World!\n          type: string\n        - description: This is a simple number with default value\n          name: parameterNumber\n          in: query\n          required: true\n          default: 123\n          type: number\n        - description: This is a simple boolean with default value\n          name: parameterBoolean\n          in: query\n          required: true\n          default: true\n          type: boolean\n        - description: This is a simple enum with default value\n          name: parameterEnum\n          in: query\n          required: true\n          default: 0\n          enum:\n            - Success\n            - Warning\n            - Error\n        - description: This is a simple model with default value\n          name: parameterModel\n          in: query\n          required: true\n          default:\n            prop: Hello World!\n          $ref: '#/definitions/ModelWithString'\n    post:\n      tags:\n        - Defaults\n      operationId: CallWithDefaultOptionalParameters\n      parameters:\n        - description: This is a simple string that is optional with default value\n          name: parameterString\n          in: query\n          default: Hello World!\n          type: string\n        - description: This is a simple number that is optional with default value\n          name: parameterNumber\n          in: query\n          default: 123\n          type: number\n        - description: This is a simple boolean that is optional with default value\n          name: parameterBoolean\n          in: query\n          default: true\n          type: boolean\n        - description: This is a simple enum that is optional with default value\n          name: parameterEnum\n          in: query\n          default: 0\n          enum:\n            - Success\n            - Warning\n            - Error\n    put:\n      tags:\n        - Defaults\n      operationId: CallToTestOrderOfParams\n      parameters:\n        - description: This is a optional string with default\n          name: parameterOptionalStringWithDefault\n          in: query\n          required: false\n          default: Hello World!\n          type: string\n        - description: This is a optional string with empty default\n          name: parameterOptionalStringWithEmptyDefault\n          in: query\n          required: false\n          default: ''\n          type: string\n        - description: This is a optional string with no default\n          name: parameterOptionalStringWithNoDefault\n          in: query\n          required: false\n          type: string\n        - description: This is a string with default\n          name: parameterStringWithDefault\n          in: query\n          required: true\n          default: Hello World!\n          type: string\n        - description: This is a string with empty default\n          name: parameterStringWithEmptyDefault\n          in: query\n          required: true\n          default: ''\n          type: string\n        - description: This is a string with no default\n          name: parameterStringWithNoDefault\n          in: query\n          required: true\n          type: string\n        - x-nullable: true\n          description: This is a string that can be null with no default\n          name: parameterStringNullableWithNoDefault\n          in: query\n          required: false\n          type: string\n        - x-nullable: true\n          description: This is a string that can be null with default\n          name: parameterStringNullableWithDefault\n          in: query\n          required: false\n          type: string\n          default: null\n  /api/v{api-version}/duplicate:\n    delete:\n      tags:\n        - Duplicate\n      operationId: DuplicateName\n    get:\n      tags:\n        - Duplicate\n      operationId: DuplicateName2\n    post:\n      tags:\n        - Duplicate\n      operationId: DuplicateName3\n    put:\n      tags:\n        - Duplicate\n      operationId: DuplicateName4\n  /api/v{api-version}/no-content:\n    get:\n      tags:\n        - NoContent\n      operationId: CallWithNoContentResponse\n      responses:\n        '204':\n          description: Success\n  /api/v{api-version}/multiple-tags/response-and-no-content:\n    get:\n      tags:\n        - Response\n        - NoContent\n      operationId: CallWithResponseAndNoContentResponse\n      produces:\n        - application/json\n      responses:\n        '200':\n          description: Response is a simple number\n          schema:\n            type: number\n        '204':\n          description: Success\n  /api/v{api-version}/multiple-tags/a:\n    get:\n      tags:\n        - MultipleTags1\n        - MultipleTags2\n      operationId: DummyA\n      responses:\n        '204':\n          description: Success\n  /api/v{api-version}/multiple-tags/b:\n    get:\n      tags:\n        - MultipleTags1\n        - MultipleTags2\n        - MultipleTags3\n      operationId: DummyB\n      responses:\n        '204':\n          description: Success\n  /api/v{api-version}/response:\n    get:\n      tags:\n        - Response\n      operationId: CallWithResponse\n      responses:\n        default:\n          description: Message for default response\n          schema:\n            $ref: '#/definitions/ModelWithString'\n    post:\n      tags:\n        - Response\n      operationId: CallWithDuplicateResponses\n      responses:\n        '201':\n          description: Message for 201 response\n          schema:\n            $ref: '#/definitions/ModelWithString'\n        '202':\n          description: Message for 202 response\n          schema:\n            $ref: '#/definitions/ModelWithString'\n        '500':\n          description: Message for 500 error\n          schema:\n            $ref: '#/definitions/ModelWithStringError'\n        '501':\n          description: Message for 501 error\n          schema:\n            $ref: '#/definitions/ModelWithStringError'\n        '502':\n          description: Message for 502 error\n          schema:\n            $ref: '#/definitions/ModelWithStringError'\n        default:\n          description: Message for default response\n          schema:\n            $ref: '#/definitions/ModelWithString'\n    put:\n      tags:\n        - Response\n      operationId: CallWithResponses\n      responses:\n        '200':\n          description: Message for 200 response\n          schema:\n            type: object\n            properties:\n              '@namespace.string':\n                type: string\n                readOnly: true\n              '@namespace.integer':\n                type: integer\n                readOnly: true\n              value:\n                type: array\n                items:\n                  $ref: '#/definitions/ModelWithString'\n                readOnly: true\n        '201':\n          description: Message for 201 response\n          schema:\n            $ref: '#/definitions/ModelThatExtends'\n        '202':\n          description: Message for 202 response\n          schema:\n            $ref: '#/definitions/ModelThatExtendsExtends'\n        '500':\n          description: Message for 500 error\n          schema:\n            $ref: '#/definitions/ModelWithStringError'\n        '501':\n          description: Message for 501 error\n          schema:\n            $ref: '#/definitions/ModelWithStringError'\n        '502':\n          description: Message for 502 error\n          schema:\n            $ref: '#/definitions/ModelWithStringError'\n        default:\n          description: Message for default response\n          schema:\n            $ref: '#/definitions/ModelWithString'\n  /api/v{api-version}/collectionFormat:\n    get:\n      tags:\n        - CollectionFormat\n      operationId: CollectionFormat\n      parameters:\n        - description: This is an array parameter that is sent as csv format\n            (comma-separated values)\n          name: parameterArrayCSV\n          in: query\n          required: true\n          type: array\n          items:\n            type: string\n          collectionFormat: csv\n        - description: This is an array parameter that is sent as ssv format\n            (space-separated values)\n          name: parameterArraySSV\n          in: query\n          required: true\n          type: array\n          items:\n            type: string\n          collectionFormat: ssv\n        - description: This is an array parameter that is sent as tsv format\n            (tab-separated values)\n          name: parameterArrayTSV\n          in: query\n          required: true\n          type: array\n          items:\n            type: string\n          collectionFormat: tsv\n        - description: This is an array parameter that is sent as pipes format\n            (pipe-separated values)\n          name: parameterArrayPipes\n          in: query\n          required: true\n          type: array\n          items:\n            type: string\n          collectionFormat: pipes\n        - description: This is an array parameter that is sent as multi format (multiple\n            parameter instances)\n          name: parameterArrayMulti\n          in: query\n          required: true\n          type: array\n          items:\n            type: string\n          collectionFormat: multi\n  /api/v{api-version}/types:\n    get:\n      tags:\n        - Types\n      operationId: Types\n      parameters:\n        - description: This is a number parameter\n          name: parameterNumber\n          in: query\n          required: true\n          default: 123\n          type: number\n        - description: This is a string parameter\n          name: parameterString\n          in: query\n          required: true\n          default: default\n          type: string\n        - description: This is a boolean parameter\n          name: parameterBoolean\n          in: query\n          required: true\n          default: true\n          type: boolean\n        - description: This is an array parameter\n          name: parameterArray\n          in: query\n          required: true\n          type: array\n          items:\n            type: string\n        - description: This is a dictionary parameter\n          name: parameterDictionary\n          in: query\n          required: true\n          type: object\n          items:\n            type: string\n        - description: This is an enum parameter\n          name: parameterEnum\n          in: query\n          required: true\n          enum:\n            - Success\n            - Warning\n            - Error\n        - description: This is a number parameter\n          name: id\n          in: path\n          type: integer\n          format: int32\n      responses:\n        '200':\n          description: Response is a simple number\n          schema:\n            type: number\n        '201':\n          description: Response is a simple string\n          schema:\n            type: string\n        '202':\n          description: Response is a simple boolean\n          schema:\n            type: boolean\n        '203':\n          description: Response is a simple object\n          default: null\n          schema:\n            type: object\n  /api/v{api-version}/complex:\n    get:\n      tags:\n        - Complex\n      operationId: ComplexTypes\n      parameters:\n        - description: Parameter containing object\n          name: parameterObject\n          in: query\n          required: true\n          type: object\n          properties:\n            first:\n              type: object\n              properties:\n                second:\n                  type: object\n                  properties:\n                    third:\n                      type: string\n        - description: Parameter containing reference\n          name: parameterReference\n          in: query\n          required: true\n          $ref: '#/definitions/ModelWithString'\n      responses:\n        '200':\n          description: Successful response\n          schema:\n            type: array\n            items:\n              $ref: '#/definitions/ModelWithString'\n        '400':\n          description: 400 server error\n        '500':\n          description: 500 server error\n  /api/v{api-version}/header:\n    post:\n      tags:\n        - Header\n      operationId: CallWithResultFromHeader\n      responses:\n        '200':\n          description: Successful response\n          headers:\n            operation-location:\n              type: string\n        '400':\n          description: 400 server error\n        '500':\n          description: 500 server error\n  /api/v{api-version}/error:\n    post:\n      tags:\n        - Error\n      operationId: testErrorCode\n      parameters:\n        - description: Status code to return\n          name: status\n          in: query\n          type: string\n          required: true\n      responses:\n        '200':\n          description: 'Custom message: Successful response'\n        '500':\n          description: 'Custom message: Internal Server Error'\n        '501':\n          description: 'Custom message: Not Implemented'\n        '502':\n          description: 'Custom message: Bad Gateway'\n        '503':\n          description: 'Custom message: Service Unavailable'\n  /api/v{api-version}/non-ascii-æøåÆØÅöôêÊ字符串:\n    post:\n      tags:\n        - Non-Ascii-æøåÆØÅöôêÊ\n      operationId: nonAsciiæøåÆØÅöôêÊ字符串\n      parameters:\n        - description: Dummy input param\n          name: nonAsciiParamæøåÆØÅöôêÊ\n          in: query\n          required: true\n          type: integer\n      responses:\n        '200':\n          description: Successful response\n          schema:\n            $ref: '#/definitions/NonAsciiStringæøåÆØÅöôêÊ字符串'\n  /api/v{api-version}/body:\n    post:\n      description: Body should not be unknown\n      consumes:\n        - application/json\n      produces:\n        - application/json\n      summary: Body should not be unknown\n      parameters:\n        - description: Body should not be unknown\n          name: request\n          in: body\n          required: true\n          schema:\n            $ref: '#/definitions/parameter.ActivityParams'\n      responses:\n        '200':\n          description: OK\n          schema:\n            $ref: '#/definitions/response.PostActivityResponse'\n        '400':\n          description: Bad Request\n          schema:\n            $ref: '#/definitions/failure.Failure'\n        '500':\n          description: Internal Server Error\n          schema:\n            $ref: '#/definitions/failure.Failure'\ndefinitions:\n  ExternalRefA:\n    description: External ref to shared model (A)\n    $ref: './external-shared.json#/definitions/ExternalSharedModel'\n  ExternalRefB:\n    description: External ref to shared model (B)\n    $ref: './external-shared.json#/definitions/ExternalSharedModel'\n  CommentWithBreaks:\n    description: |-\n      Testing multiline comments in string: First line\n      Second line\n\n      Fourth line\n    type: integer\n  CommentWithBackticks:\n    description: 'Testing backticks in string: `backticks` and ```multiple\n      backticks``` should work'\n    type: integer\n  CommentWithBackticksAndQuotes:\n    description: 'Testing backticks and quotes in string: `backticks`, ''quotes'',\n      \"double quotes\" and ```multiple backticks``` should work'\n    type: integer\n  CommentWithSlashes:\n    description: \"Testing slashes in string: \\\\backwards\\\\\\\\\\\\ and /forwards/// should work\"\n    type: integer\n  CommentWithExpressionPlaceholders:\n    description: 'Testing expression placeholders in string: ${expression} should work'\n    type: integer\n  CommentWithQuotes:\n    description: 'Testing quotes in string: ''single quote'''''' and \"double\n      quotes\"\"\" should work'\n    type: integer\n  CommentWithReservedCharacters:\n    description: 'Testing reserved characters in string: /* inline */ and /** inline\n      **/ should work'\n    type: integer\n  SimpleInteger:\n    description: This is a simple number\n    type: integer\n  SimpleBoolean:\n    description: This is a simple boolean\n    type: boolean\n  SimpleString:\n    description: This is a simple string\n    type: string\n  NonAsciiStringæøåÆØÅöôêÊ字符串:\n    description: A string with non-ascii (unicode) characters valid in typescript\n      identifiers (æøåÆØÅöÔèÈ字符串)\n    type: string\n  SimpleFile:\n    description: This is a simple file\n    format: binary\n    type: string\n  SimpleReference:\n    description: This is a simple reference\n    $ref: '#/definitions/ModelWithString'\n  SimpleStringWithPattern:\n    description: This is a simple string\n    type: string\n    maxLength: 64\n    pattern: ^[a-zA-Z0-9_]*$\n  EnumWithStrings:\n    description: This is a simple enum with strings\n    enum:\n      - Success\n      - Warning\n      - Error\n      - \"'Single Quote'\"\n      - '\"Double Quotes\"'\n      - 'Non-ascii: øæåôöØÆÅÔÖ字符串'\n  EnumWithNumbers:\n    description: This is a simple enum with numbers\n    enum:\n      - 1\n      - 2\n      - 3\n      - 1.1\n      - 1.2\n      - 1.3\n      - 100\n      - 200\n      - 300\n      - -100\n      - -200\n      - -300\n      - -1.1\n      - -1.2\n      - -1.3\n  EnumFromDescription:\n    description: Success=1,Warning=2,Error=3\n    type: number\n  EnumWithExtensions:\n    description: This is a simple enum with numbers\n    enum:\n      - 200\n      - 400\n      - 500\n    x-enum-varnames:\n      - CUSTOM_SUCCESS\n      - CUSTOM_WARNING\n      - CUSTOM_ERROR\n    x-enum-descriptions:\n      - Used when the status of something is successful\n      - Used when the status of something has a warning\n      - Used when the status of something has an error\n  ArrayWithNumbers:\n    description: This is a simple array with numbers\n    type: array\n    items:\n      type: integer\n  ArrayWithBooleans:\n    description: This is a simple array with booleans\n    type: array\n    items:\n      type: boolean\n  ArrayWithStrings:\n    description: This is a simple array with strings\n    type: array\n    items:\n      type: string\n  ArrayWithReferences:\n    description: This is a simple array with references\n    type: array\n    items:\n      $ref: '#/definitions/ModelWithString'\n  ArrayWithArray:\n    description: This is a simple array containing an array\n    type: array\n    items:\n      type: array\n      items:\n        $ref: '#/definitions/ModelWithString'\n  ArrayWithProperties:\n    description: This is a simple array with properties\n    type: array\n    items:\n      type: object\n      properties:\n        foo:\n          type: string\n        bar:\n          type: string\n  DictionaryWithString:\n    description: This is a string dictionary\n    type: object\n    additionalProperties:\n      type: string\n  DictionaryWithReference:\n    description: This is a string reference\n    type: object\n    additionalProperties:\n      $ref: '#/definitions/ModelWithString'\n  DictionaryWithArray:\n    description: This is a complex dictionary\n    type: object\n    additionalProperties:\n      type: array\n      items:\n        $ref: '#/definitions/ModelWithString'\n  DictionaryWithDictionary:\n    description: This is a string dictionary\n    type: object\n    additionalProperties:\n      type: object\n      additionalProperties:\n        type: string\n  DictionaryWithProperties:\n    description: This is a complex dictionary\n    type: object\n    additionalProperties:\n      type: object\n      properties:\n        foo:\n          type: string\n        bar:\n          type: string\n  Date:\n    description: This is a type-only model that defines Date as a string\n    type: string\n  ModelWithInteger:\n    description: This is a model with one number property\n    type: object\n    properties:\n      prop:\n        description: This is a simple number property\n        type: integer\n  ModelWithBoolean:\n    description: This is a model with one boolean property\n    type: object\n    properties:\n      prop:\n        description: This is a simple boolean property\n        type: boolean\n  ModelWithString:\n    description: This is a model with one string property\n    type: object\n    properties:\n      prop:\n        description: This is a simple string property\n        type: string\n  ModelWithStringError:\n    description: This is a model with one string property\n    type: object\n    properties:\n      prop:\n        description: This is a simple string property\n        type: string\n  ModelWithNullableString:\n    description: This is a model with one string property\n    type: object\n    required:\n      - nullableRequiredProp\n    properties:\n      nullableProp:\n        description: This is a simple string property\n        type: string\n        x-nullable: true\n      nullableRequiredProp:\n        description: This is a simple string property\n        type: string\n        x-nullable: true\n  ModelWithEnum:\n    description: This is a model with one enum\n    type: object\n    properties:\n      test:\n        description: This is a simple enum with strings\n        enum:\n          - Success\n          - Warning\n          - Error\n          - ØÆÅ字符串\n      statusCode:\n        description: These are the HTTP error code enums\n        enum:\n          - '100'\n          - 200 FOO\n          - 300 FOO_BAR\n          - 400 foo-bar\n          - 500 foo.bar\n          - 600 foo&bar\n      bool:\n        description: Simple boolean enum\n        type: boolean\n        enum:\n          - true\n  ModelWithEnumFromDescription:\n    description: This is a model with one enum\n    type: object\n    properties:\n      test:\n        type: integer\n        description: Success=1,Warning=2,Error=3\n  ModelWithNestedEnums:\n    description: This is a model with nested enums\n    type: object\n    properties:\n      dictionaryWithEnum:\n        type: object\n        additionalProperties:\n          enum:\n            - Success\n            - Warning\n            - Error\n      dictionaryWithEnumFromDescription:\n        type: object\n        additionalProperties:\n          type: integer\n          description: Success=1,Warning=2,Error=3\n      arrayWithEnum:\n        type: array\n        items:\n          enum:\n            - Success\n            - Warning\n            - Error\n      arrayWithDescription:\n        type: array\n        items:\n          type: integer\n          description: Success=1,Warning=2,Error=3\n  ModelWithReference:\n    description: This is a model with one property containing a reference\n    type: object\n    properties:\n      prop:\n        $ref: '#/definitions/ModelWithProperties'\n  ModelWithArray:\n    description: This is a model with one property containing an array\n    type: object\n    properties:\n      prop:\n        type: array\n        items:\n          $ref: '#/definitions/ModelWithString'\n      propWithFile:\n        type: array\n        items:\n          format: binary\n          type: string\n      propWithNumber:\n        type: array\n        items:\n          type: number\n  ModelWithDictionary:\n    description: This is a model with one property containing a dictionary\n    type: object\n    properties:\n      prop:\n        type: object\n        additionalProperties:\n          type: string\n  ModelWithCircularReference:\n    description: This is a model with one property containing a circular reference\n    type: object\n    properties:\n      prop:\n        $ref: '#/definitions/ModelWithCircularReference'\n  ModelWithProperties:\n    description: This is a model with one nested property\n    type: object\n    required:\n      - required\n      - requiredAndReadOnly\n    properties:\n      required:\n        type: string\n      requiredAndReadOnly:\n        type: string\n        readOnly: true\n      string:\n        type: string\n      number:\n        type: number\n      boolean:\n        type: boolean\n      reference:\n        $ref: '#/definitions/ModelWithString'\n      property with space:\n        type: string\n      default:\n        type: string\n      try:\n        type: string\n      '@namespace.string':\n        type: string\n        readOnly: true\n      '@namespace.integer':\n        type: integer\n        readOnly: true\n  ModelWithNestedProperties:\n    description: This is a model with one nested property\n    type: object\n    required:\n      - first\n    properties:\n      first:\n        type: object\n        required:\n          - second\n        readOnly: true\n        properties:\n          second:\n            type: object\n            required:\n              - third\n            readOnly: true\n            properties:\n              third:\n                type: string\n                readOnly: true\n  ModelWithDuplicateProperties:\n    description: This is a model with duplicated properties\n    type: object\n    properties:\n      prop:\n        $ref: '#/definitions/ModelWithString'\n  ModelWithOrderedProperties:\n    description: This is a model with ordered properties\n    type: object\n    properties:\n      zebra:\n        type: string\n      apple:\n        type: string\n      hawaii:\n        type: string\n  ModelWithDuplicateImports:\n    description: This is a model with duplicated imports\n    type: object\n    properties:\n      propA:\n        $ref: '#/definitions/ModelWithString'\n      propB:\n        $ref: '#/definitions/ModelWithString'\n      propC:\n        $ref: '#/definitions/ModelWithString'\n  ModelThatExtends:\n    description: This is a model that extends another model\n    type: object\n    allOf:\n      - $ref: '#/definitions/ModelWithString'\n      - type: object\n        properties:\n          propExtendsA:\n            type: string\n          propExtendsB:\n            $ref: '#/definitions/ModelWithString'\n  ModelThatExtendsExtends:\n    description: This is a model that extends another model\n    type: object\n    allOf:\n      - $ref: '#/definitions/ModelWithString'\n      - $ref: '#/definitions/ModelThatExtends'\n      - type: object\n        properties:\n          propExtendsC:\n            type: string\n          propExtendsD:\n            $ref: '#/definitions/ModelWithString'\n  default:\n    type: object\n    properties:\n      name:\n        type: string\n  ModelWithPattern:\n    description: This is a model that contains a some patterns\n    type: object\n    required:\n      - key\n      - name\n    properties:\n      key:\n        maxLength: 64\n        pattern: ^[a-zA-Z0-9_]*$\n        type: string\n      name:\n        maxLength: 255\n        type: string\n      enabled:\n        type: boolean\n        readOnly: true\n      modified:\n        type: string\n        format: date-time\n        readOnly: true\n      id:\n        type: string\n        pattern: ^\\d{2}-\\d{3}-\\d{4}$\n      text:\n        type: string\n        pattern: ^\\w+$\n      patternWithSingleQuotes:\n        type: string\n        pattern: ^[a-zA-Z0-9']*$\n      patternWithNewline:\n        type: string\n        pattern: aaa\\nbbb\n      patternWithBacktick:\n        type: string\n        pattern: aaa`bbb\n      patternWithUnicode:\n        type: string\n        pattern: ^\\p{L}+$\n  parameter.ActivityParams:\n    type: object\n    properties:\n      description:\n        type: string\n      graduate_id:\n        type: integer\n      organization_id:\n        type: integer\n      parent_activity:\n        type: integer\n      post_id:\n        type: integer\n  response.PostActivityResponse:\n    type: object\n    properties:\n      description:\n        type: string\n      graduate_id:\n        type: integer\n      organization_id:\n        type: integer\n      parent_activity_id:\n        type: integer\n      post_id:\n        type: integer\n  failure.Failure:\n    type: object\n    properties:\n      error:\n        type: string\n      message:\n        type: string\n      reference_code:\n        type: string\n"
  },
  {
    "path": "specs/2.0.x/invalid/operationId-unique.yaml",
    "content": "swagger: 2.0\ninfo:\n  title: Invalid OpenAPI 2.0 operationId unique example\n  version: 1\npaths:\n  /foo:\n    get:\n      operationId: foo\n      produces:\n        - application/json\n      responses:\n        '200':\n          description: OK\n          schema:\n            type: string\n    post:\n      operationId: foo\n      responses:\n        '200':\n          description: OK\n          schema:\n            type: string\n"
  },
  {
    "path": "specs/2.0.x/ref-deep.yaml",
    "content": "swagger: '2.0'\ninfo:\n  title: OpenAPI 2.0 ref deep example\n  version: '1'\npaths:\n  /foo:\n    get:\n      responses:\n        '200':\n          description: OK\n          content:\n            application/json:\n              schema:\n                type: array\n                items:\n                  type: object\n                  properties:\n                    foo:\n                      type: integer\n                    bar:\n                      type: string\n    post:\n      responses:\n        '200':\n          description: OK\n          content:\n            application/json:\n              schema:\n                type: object\n                properties:\n                  foo:\n                    $ref: '#/paths/~1foo/get/responses/200/content/application~1json/schema/items'\n                  bar:\n                    type: string\ndefinitions:\n  Foo:\n    type: object\n    properties:\n      foo:\n        type: array\n        items:\n          type: object\n          properties:\n            baz:\n              type: string\n      bar:\n        type: array\n        items:\n          type: object\n          properties:\n            baz:\n              type: string\n  Bar:\n    type: object\n    properties:\n      foo:\n        type: array\n        items:\n          $ref: '#/definitions/Foo/properties/foo/items'\n      bar:\n        type: array\n        items:\n          $ref: '#/definitions/Foo/properties/bar/items'\n"
  },
  {
    "path": "specs/2.0.x/schema-unknown.yaml",
    "content": "swagger: 2.0\ninfo:\n  title: OpenAPI 2.0 schema unknown example\n  description: https://github.com/hey-api/openapi-ts/issues/1402\n  version: 1\nhost: api.postmarkapp.com\nbasePath: /\nproduces:\n  - application/json\nconsumes:\n  - application/json\ndefinitions:\n  SendEmailRequest:\n    properties:\n      From:\n        description: The sender email address. Must have a registered and confirmed Sender Signature.\n        type: string\n      To:\n        description: Recipient email address. Multiple addresses are comma seperated. Max 50.\n        type: string\n      Cc:\n        description: Recipient email address. Multiple addresses are comma seperated. Max 50.\n        type: string\n      Bcc:\n        description: Bcc recipient email address. Multiple addresses are comma seperated. Max 50.\n        type: string\n      Subject:\n        description: Email Subject\n        type: string\n      Tag:\n        description: Email tag that allows you to categorize outgoing emails and get detailed statistics.\n        type: string\n      HtmlBody:\n        description: If no TextBody specified HTML email message\n        type: string\n      TextBody:\n        description: If no HtmlBody specified Plain text email message\n        type: string\n      ReplyTo:\n        description: Reply To override email address. Defaults to the Reply To set in the sender signature.\n        type: string\n      TrackOpens:\n        description: Activate open tracking for this email.\n        type: boolean\n      TrackLinks:\n        description: Replace links in content to enable \"click tracking\" stats. Default is 'null', which uses the server's LinkTracking setting'.\n        type: string\n        enum: ['None', 'HtmlAndText', 'HtmlOnly', 'TextOnly']\n      Headers:\n        $ref: '#/definitions/HeaderCollection'\n      Attachments:\n        $ref: '#/definitions/AttachmentCollection'\n  MessageHeader:\n    description: A single header for an email message.\n    properties:\n      Name:\n        description: The header's name.\n        type: string\n      Value:\n        description: The header's value.\n        type: string\n  HeaderCollection:\n    type: array\n    items:\n      $ref: '#/definitions/MessageHeader'\n  Attachment:\n    description: An attachment for an email message.\n    properties:\n      Name:\n        type: string\n      Content:\n        type: string\n      ContentType:\n        type: string\n      ContentID:\n        type: string\n  AttachmentCollection:\n    type: array\n    items:\n      $ref: '#/definitions/Attachment'\n  SendEmailResponse:\n    description: The standard response when a postmark message is sent\n    properties:\n      To:\n        type: string\n      SubmittedAt:\n        type: string\n        format: 'date-time'\n      MessageID:\n        type: string\n      ErrorCode:\n        type: integer\n      Message:\n        type: string\n  StandardPostmarkResponse:\n    description: 'A Postmark API error.'\n    properties:\n      ErrorCode:\n        type: integer\n      Message:\n        type: string\nresponses:\n  422:\n    description: 'An error was generated due to incorrect use of the API. See the Message associated with this response for more information.'\n    schema:\n      $ref: '#/definitions/StandardPostmarkResponse'\n  500:\n    description: 'Indicates an internal server error occurred.'\npaths:\n  #Message Sending API\n  /email:\n    post:\n      operationId: sendEmail\n      tags:\n        - Sending API\n      summary: Send a single email\n      parameters:\n        - name: X-Postmark-Server-Token\n          required: true\n          description: The token associated with the Server on which this request will operate.\n          type: string\n          in: header\n        - name: body\n          in: body\n          schema:\n            $ref: '#/definitions/SendEmailRequest'\n      responses:\n        200:\n          description: OK\n          schema:\n            $ref: '#/definitions/SendEmailResponse'\n        422:\n          $ref: '#/responses/422'\n        500:\n          $ref: '#/responses/500'\n"
  },
  {
    "path": "specs/2.0.x/sdk-instance.yaml",
    "content": "swagger: 2.0\ninfo:\n  title: OpenAPI 2.0 sdk instance example\n  version: 1\npaths:\n  /foo:\n    get:\n      tags:\n        - fooBaz\n      produces:\n        - application/json\n      responses:\n        '200':\n          description: OK\n          schema:\n            type: string\n    post:\n      tags:\n        - fooBaz\n      operationId: foo.-post\n      produces:\n        - application/json\n      responses:\n        '200':\n          description: OK\n          schema:\n            type: string\n    put:\n      tags:\n        - fooBaz\n      operationId: /foo/-put/\n      produces:\n        - application/json\n      responses:\n        '200':\n          description: OK\n          schema:\n            type: string\n  /foo/bar:\n    get:\n      tags:\n        - barBaz\n      produces:\n        - application/json\n      responses:\n        '200':\n          description: OK\n          schema:\n            type: string\n    post:\n      tags:\n        - fooBaz\n        - barBaz\n      operationId: foo.bar.post\n      produces:\n        - application/json\n      responses:\n        '200':\n          description: OK\n          schema:\n            type: string\n    put:\n      tags:\n        - fooBaz\n        - barBaz\n      operationId: /foo/bar/put/\n      produces:\n        - application/json\n      responses:\n        '200':\n          description: OK\n          schema:\n            type: string\n"
  },
  {
    "path": "specs/2.0.x/sdk-nested-classes.yaml",
    "content": "swagger: '2.0'\ninfo:\n  title: OpenAPI 2.0 sdk nested classes example\n  version: 1.0.0\n  description: Test schema for nested class generation with various operationId patterns\nhost: api.example.com\nbasePath: /v1\nschemes:\n  - https\npaths:\n  /business/providers/domains:\n    get:\n      tags:\n        - business\n        - providers\n        - domains\n      operationId: business.providers.domains.get\n      produces:\n        - '*/*'\n      responses:\n        '200':\n          description: OK\n          schema:\n            type: string\n    post:\n      tags:\n        - providers\n        - domains\n        - business\n      operationId: business.providers.domains.post\n      produces:\n        - '*/*'\n      responses:\n        '200':\n          description: OK\n          schema:\n            type: string\n    put:\n      tags:\n        - domains\n      produces:\n        - '*/*'\n      responses:\n        '200':\n          description: OK\n          schema:\n            type: string\n  /locations/businesses:\n    get:\n      tags:\n        - locations\n        - business\n      operationId: business.get\n      produces:\n        - '*/*'\n      responses:\n        '200':\n          description: OK\n          schema:\n            type: string\n  /locations:\n    get:\n      tags:\n        - locations\n      operationId: get\n      produces:\n        - '*/*'\n      responses:\n        '200':\n          description: OK\n          schema:\n            type: string\n"
  },
  {
    "path": "specs/2.0.x/security-api-key.yaml",
    "content": "swagger: '2.0'\ninfo:\n  title: OpenAPI 2.0 security api key example\n  version: '1'\npaths:\n  /foo:\n    get:\n      responses:\n        '200':\n          description: OK\n      security:\n        - foo: []\nsecurityDefinitions:\n  foo:\n    in: query\n    name: foo\n    type: apiKey\n"
  },
  {
    "path": "specs/2.0.x/security-basic.json",
    "content": "{\n  \"swagger\": \"2.0\",\n  \"info\": {\n    \"title\": \"OpenAPI 2.0 security basic example\",\n    \"version\": \"1\"\n  },\n  \"paths\": {\n    \"/foo\": {\n      \"get\": {\n        \"responses\": {\n          \"200\": {\n            \"description\": \"OK\"\n          }\n        },\n        \"security\": [\n          {\n            \"foo\": []\n          }\n        ]\n      }\n    }\n  },\n  \"securityDefinitions\": {\n    \"foo\": {\n      \"type\": \"basic\"\n    }\n  }\n}\n"
  },
  {
    "path": "specs/2.0.x/security-oauth2.yaml",
    "content": "swagger: 2.0\ninfo:\n  title: OpenAPI 2.0 security oauth2 example\n  version: 1\npaths:\n  /foo:\n    get:\n      responses:\n        '200':\n          description: OK\n      security:\n        - foo: []\nsecurityDefinitions:\n  foo:\n    flow: 'password'\n    scopes: {}\n    tokenUrl: '/'\n    type: 'oauth2'\n"
  },
  {
    "path": "specs/2.0.x/servers-base-path.yaml",
    "content": "swagger: 2.0\ninfo:\n  title: OpenAPI 2.0 servers base path example\n  version: 1\nbasePath: /v1\npaths:\n  /foo:\n    get:\n      produces:\n        - application/json\n      responses:\n        '200':\n          description: OK\n          schema:\n            type: string\n"
  },
  {
    "path": "specs/2.0.x/servers-host.yaml",
    "content": "swagger: 2.0\ninfo:\n  title: OpenAPI 2.0 servers host example\n  version: 1\nhost: foo.com\npaths:\n  /foo:\n    get:\n      produces:\n        - application/json\n      responses:\n        '200':\n          description: OK\n          schema:\n            type: string\n"
  },
  {
    "path": "specs/2.0.x/servers.yaml",
    "content": "swagger: 2.0\ninfo:\n  title: OpenAPI 2.0 servers example\n  version: 1\nhost: foo.com\nbasePath: /v1\nschemes:\n  - https\npaths:\n  /foo:\n    get:\n      produces:\n        - application/json\n      responses:\n        '200':\n          description: OK\n          schema:\n            type: string\n"
  },
  {
    "path": "specs/2.0.x/transforms-read-write.yaml",
    "content": "swagger: 2.0\ninfo:\n  title: OpenAPI 2.0 transforms read write example\n  version: 1\nproduces:\n  - application/json\nconsumes:\n  - application/json\npaths:\n  /foo-read:\n    post:\n      parameters:\n        - name: body\n          in: body\n          required: true\n          schema:\n            $ref: '#/definitions/FooRead'\n      responses:\n        '200':\n          schema:\n            $ref: '#/definitions/FooRead'\n          description: OK\ndefinitions:\n  FooRead:\n    allOf:\n      - $ref: '#/definitions/BarRead'\n      - type: object\n        properties:\n          foo:\n            readOnly: true\n            type: string\n  BarRead:\n    allOf:\n      - $ref: '#/definitions/Baz'\n      - type: object\n        properties:\n          bar:\n            readOnly: true\n            type: string\n  Baz:\n    type: object\n    properties:\n      baz:\n        type: string\n  QuxAllRead:\n    type: object\n    properties:\n      baz:\n        readOnly: true\n        type: string\n  Quux:\n    type: object\n    properties:\n      baz:\n        type: array\n        items:\n          $ref: '#/definitions/Baz'\n      qux:\n        $ref: '#/definitions/QuxAllRead'\n  Corge:\n    type: object\n    properties:\n      foo:\n        type: string\n      bar:\n        type: object\n        properties:\n          baz:\n            type: boolean\n            readOnly: true\n"
  },
  {
    "path": "specs/2.0.x/transforms-schemas-name.yaml",
    "content": "swagger: '2.0'\ninfo:\n  title: Schema Name Transform Test (Swagger 2.0)\n  version: 1.0.0\npaths:\n  /users:\n    get:\n      summary: Get users\n      produces:\n        - application/json\n      responses:\n        '200':\n          description: Success\n          schema:\n            $ref: '#/definitions/User_v1_0_0_User'\n  /posts:\n    post:\n      summary: Create post\n      consumes:\n        - application/json\n      produces:\n        - application/json\n      parameters:\n        - in: body\n          name: body\n          schema:\n            $ref: '#/definitions/Post_v2_1_3_Post'\n      responses:\n        '201':\n          description: Created\n          schema:\n            $ref: '#/definitions/Post_v2_1_3_Post'\ndefinitions:\n  User_v1_0_0_User:\n    type: object\n    properties:\n      id:\n        type: string\n      name:\n        type: string\n      profile:\n        $ref: '#/definitions/UserProfile_v1_0_0_UserProfile'\n  UserProfile_v1_0_0_UserProfile:\n    type: object\n    properties:\n      bio:\n        type: string\n      avatar:\n        type: string\n  Post_v2_1_3_Post:\n    type: object\n    properties:\n      id:\n        type: string\n      title:\n        type: string\n      author:\n        $ref: '#/definitions/User_v1_0_0_User'\n      comments:\n        type: array\n        items:\n          $ref: '#/definitions/Comment_v1_5_2_Comment'\n  Comment_v1_5_2_Comment:\n    type: object\n    properties:\n      id:\n        type: string\n      text:\n        type: string\n      author:\n        $ref: '#/definitions/User_v1_0_0_User'\n"
  },
  {
    "path": "specs/2.0.x/type-format.yaml",
    "content": "swagger: 2.0\ninfo:\n  title: OpenAPI 2.0 type format example\n  version: 1\npaths:\n  /foo:\n    post:\n      produces:\n        - application/json\n      responses:\n        '200':\n          description: OK\n          schema:\n            $ref: '#/definitions/Foo'\ndefinitions:\n  Foo:\n    type: object\n    properties:\n      bar:\n        type: integer\n      foo:\n        default: 0\n        format: int64\n        type: integer\n      id:\n        type: string\n        format: typeid\n        example: 'user_123'\n    required:\n      - id\n      - foo\n  Bar:\n    type: object\n    required:\n      - foo\n    properties:\n      foo:\n        type: integer\n    additionalProperties:\n      type: integer\n"
  },
  {
    "path": "specs/3.0.x/additional-properties-false.json",
    "content": "{\n  \"openapi\": \"3.0.1\",\n  \"info\": {\n    \"title\": \"OpenAPI 3.0.1 additional properties false example\",\n    \"version\": \"1\"\n  },\n  \"components\": {\n    \"schemas\": {\n      \"Foo\": {\n        \"required\": [\"foo\"],\n        \"type\": \"object\",\n        \"properties\": {\n          \"foo\": {\n            \"type\": \"string\"\n          }\n        },\n        \"additionalProperties\": false\n      },\n      \"Bar\": {\n        \"allOf\": [\n          {\n            \"$ref\": \"#/components/schemas/Foo\"\n          },\n          {\n            \"type\": \"object\",\n            \"additionalProperties\": false\n          }\n        ]\n      },\n      \"Baz\": {\n        \"allOf\": [\n          {\n            \"$ref\": \"#/components/schemas/Foo\"\n          },\n          {\n            \"required\": [\"bar\"],\n            \"type\": \"object\",\n            \"properties\": {\n              \"bar\": {\n                \"type\": \"string\"\n              }\n            },\n            \"additionalProperties\": false\n          }\n        ]\n      }\n    }\n  }\n}\n"
  },
  {
    "path": "specs/3.0.x/additional-properties-true.json",
    "content": "{\n  \"openapi\": \"3.0.1\",\n  \"info\": {\n    \"title\": \"OpenAPI 3.0.1 additional properties true example\",\n    \"version\": \"1\"\n  },\n  \"components\": {\n    \"schemas\": {\n      \"Foo\": {\n        \"required\": [\"foo\"],\n        \"type\": \"object\",\n        \"properties\": {\n          \"foo\": {\n            \"type\": \"string\"\n          }\n        },\n        \"additionalProperties\": true\n      },\n      \"Bar\": {\n        \"allOf\": [\n          {\n            \"$ref\": \"#/components/schemas/Foo\"\n          },\n          {\n            \"type\": \"object\",\n            \"additionalProperties\": true\n          }\n        ]\n      },\n      \"Baz\": {\n        \"allOf\": [\n          {\n            \"$ref\": \"#/components/schemas/Foo\"\n          },\n          {\n            \"required\": [\"bar\"],\n            \"type\": \"object\",\n            \"properties\": {\n              \"bar\": {\n                \"type\": \"string\"\n              }\n            },\n            \"additionalProperties\": true\n          }\n        ]\n      },\n      \"Qux\": {\n        \"type\": \"object\",\n        \"additionalProperties\": {}\n      }\n    }\n  }\n}\n"
  },
  {
    "path": "specs/3.0.x/additional-properties-undefined.json",
    "content": "{\n  \"openapi\": \"3.0.4\",\n  \"info\": {\n    \"title\": \"OpenAPI 3.0.4 additional properties undefined example\",\n    \"version\": \"1\"\n  },\n  \"components\": {\n    \"schemas\": {\n      \"Foo\": {\n        \"properties\": {\n          \"foo\": {\n            \"type\": \"object\"\n          }\n        },\n        \"required\": [\"foo\"],\n        \"type\": \"object\"\n      }\n    }\n  }\n}\n"
  },
  {
    "path": "specs/3.0.x/array-items-all-of.yaml",
    "content": "openapi: 3.0.2\ninfo:\n  title: OpenAPI 3.0.2 array items allOf example\n  version: '1'\ncomponents:\n  schemas:\n    # Test case 1: Array with allOf of object schemas\n    ArrayWithAllOfObjects:\n      type: array\n      items:\n        allOf:\n          - type: object\n            properties:\n              id:\n                type: integer\n          - type: object\n            properties:\n              name:\n                type: string\n    # Test case 2: Array with allOf of primitives\n    ArrayWithAllOfPrimitives:\n      type: array\n      items:\n        allOf:\n          - type: number\n          - type: string\n    # Test case 3: Array with allOf including refs\n    ArrayWithAllOfRefs:\n      type: array\n      items:\n        allOf:\n          - $ref: '#/components/schemas/BaseModel'\n          - type: object\n            properties:\n              extra:\n                type: string\n    BaseModel:\n      type: object\n      properties:\n        id:\n          type: integer\n        createdAt:\n          type: string\n          format: date-time\n"
  },
  {
    "path": "specs/3.0.x/array-items-one-of-length-1.yaml",
    "content": "openapi: 3.0.2\ninfo:\n  title: OpenAPI 3.0.2 array items oneOf length 1 example\n  version: '1'\ncomponents:\n  schemas:\n    Foo:\n      type: object\n      properties:\n        foo:\n          type: array\n          items:\n            oneOf:\n              - $ref: '#/components/schemas/Bar'\n          maxItems: 2147483647\n          minItems: 1\n    Bar:\n      type: string\n"
  },
  {
    "path": "specs/3.0.x/array-nested-one-of.yaml",
    "content": "openapi: 3.0.3\ninfo:\n  title: OpenAPI 3.0.3 array nested one of example\n  version: 1\ncomponents:\n  schemas:\n    Foo:\n      oneOf:\n        - type: array\n          items:\n            oneOf:\n              - type: object\n                properties:\n                  foo:\n                    type: string\n                  bar:\n                    type: string\n              - type: object\n                properties:\n                  baz:\n                    type: string\n                  qux:\n                    type: string\n        - type: array\n          items:\n            type: object\n            properties:\n              foo:\n                type: string\n              bar:\n                type: string\n"
  },
  {
    "path": "specs/3.0.x/body-binary-format.yaml",
    "content": "openapi: 3.0.0\ninfo:\n  title: OpenAPI 3.0.0 binary format body example\n  version: 1\npaths:\n  /upload-zip:\n    post:\n      summary: Upload a zip file\n      operationId: uploadZip\n      requestBody:\n        required: true\n        content:\n          application/zip:\n            schema:\n              type: string\n              format: binary\n      responses:\n        '204':\n          description: Successfully uploaded\n  /upload-pdf:\n    post:\n      summary: Upload a PDF file\n      operationId: uploadPdf\n      requestBody:\n        required: true\n        content:\n          application/pdf:\n            schema:\n              type: string\n              format: binary\n      responses:\n        '204':\n          description: Successfully uploaded\n  /upload-binary:\n    post:\n      summary: Upload binary data\n      operationId: uploadBinary\n      requestBody:\n        required: true\n        content:\n          application/octet-stream:\n            schema:\n              type: string\n              format: binary\n      responses:\n        '204':\n          description: Successfully uploaded\n"
  },
  {
    "path": "specs/3.0.x/body-response-text-plain.yaml",
    "content": "openapi: 3.0.4\ninfo:\n  title: OpenAPI 3.0.4 body response text plain example\n  version: 1\npaths:\n  /foo:\n    post:\n      requestBody:\n        content:\n          'text/plain':\n            schema:\n              type: string\n        required: true\n      responses:\n        '200':\n          description: OK\n          content:\n            text/plain:\n              schema:\n                type: string\n"
  },
  {
    "path": "specs/3.0.x/case.yaml",
    "content": "openapi: 3.0.2\ninfo:\n  title: OpenAPI 3.0.2 case example\n  version: '1'\npaths:\n  /foo:\n    get:\n      parameters:\n        - description: 'original name: fooBar'\n          in: query\n          name: fooBar\n          required: true\n          schema:\n            type: string\n        - description: 'original name: BarBaz'\n          in: query\n          name: BarBaz\n          required: true\n          schema:\n            type: string\n        - description: 'original name: qux_quux'\n          in: query\n          name: qux_quux\n          required: true\n          schema:\n            type: string\n      requestBody:\n        required: true\n        content:\n          application/json:\n            schema:\n              $ref: '#/components/schemas/Foo'\n      responses:\n        '200':\n          description: OK\n          content:\n            application/json:\n              schema:\n                $ref: '#/components/schemas/Foo'\n        '201':\n          description: OK\n          content:\n            application/json:\n              schema:\n                $ref: '#/components/schemas/201'\ncomponents:\n  schemas:\n    '201':\n      description: 'original name: 201'\n      type: number\n    Foo:\n      description: 'original name: Foo'\n      properties:\n        fooBar:\n          description: 'original name: fooBar'\n          allOf:\n            - $ref: '#/components/schemas/foo_bar'\n        BarBaz:\n          description: 'original name: BarBaz'\n          allOf:\n            - $ref: '#/components/schemas/Foo'\n        qux_quux:\n          description: 'original name: qux_quux'\n          properties:\n            fooBar:\n              description: 'original name: fooBar'\n              allOf:\n                - $ref: '#/components/schemas/fooBar'\n            BarBaz:\n              description: 'original name: BarBaz'\n              allOf:\n                - $ref: '#/components/schemas/FooBar'\n            qux_quux:\n              description: 'original name: qux_quux'\n              type: boolean\n          required:\n            - fooBar\n            - BarBaz\n            - qux_quux\n          type: object\n      required:\n        - fooBar\n        - BarBaz\n        - qux_quux\n      type: object\n    foo_bar:\n      description: 'original name: foo_bar'\n      type: boolean\n    fooBar:\n      description: 'original name: fooBar'\n      type: number\n    FooBar:\n      description: 'original name: FooBar'\n      type: string\n"
  },
  {
    "path": "specs/3.0.x/circular.yaml",
    "content": "openapi: 3.0.4\ninfo:\n  title: OpenAPI 3.0.4 circular example\n  version: 1\ncomponents:\n  schemas:\n    Foo:\n      type: object\n      properties:\n        quux:\n          $ref: '#/components/schemas/Quux'\n    Bar:\n      type: object\n      properties:\n        bar:\n          $ref: '#/components/schemas/Bar'\n        baz:\n          $ref: '#/components/schemas/Baz'\n    Baz:\n      type: object\n      properties:\n        quux:\n          $ref: '#/components/schemas/Quux'\n    Qux:\n      discriminator:\n        propertyName: type\n        mapping:\n          array: '#/components/schemas/Foo'\n          struct: '#/components/schemas/Corge'\n      oneOf:\n        - $ref: '#/components/schemas/Corge'\n        - $ref: '#/components/schemas/Foo'\n    Quux:\n      type: object\n      properties:\n        qux:\n          $ref: '#/components/schemas/Qux'\n    Corge:\n      type: object\n      properties:\n        baz:\n          type: array\n          items:\n            $ref: '#/components/schemas/Baz'\n"
  },
  {
    "path": "specs/3.0.x/components-request-bodies.json",
    "content": "{\n  \"openapi\": \"3.0.4\",\n  \"info\": {\n    \"title\": \"OpenAPI 3.0.4 components request bodies example\",\n    \"version\": \"1\"\n  },\n  \"paths\": {\n    \"/foo\": {\n      \"post\": {\n        \"requestBody\": {\n          \"$ref\": \"#/components/requestBodies/Foo\"\n        },\n        \"responses\": {\n          \"200\": {\n            \"description\": \"OK\"\n          }\n        }\n      }\n    }\n  },\n  \"components\": {\n    \"requestBodies\": {\n      \"Foo\": {\n        \"description\": \"Foo\",\n        \"required\": true,\n        \"content\": {\n          \"application/json\": {\n            \"schema\": {\n              \"type\": \"object\",\n              \"properties\": {\n                \"page\": {\n                  \"type\": \"number\"\n                }\n              }\n            }\n          }\n        }\n      }\n    }\n  }\n}\n"
  },
  {
    "path": "specs/3.0.x/content-binary.json",
    "content": "{\n  \"openapi\": \"3.0.0\",\n  \"info\": {\n    \"title\": \"OpenAPI 3.0.0 content binary example\",\n    \"version\": \"1\"\n  },\n  \"paths\": {\n    \"/foo\": {\n      \"get\": {\n        \"responses\": {\n          \"200\": {\n            \"content\": {\n              \"image/png\": {\n                \"schema\": {\n                  \"type\": \"string\",\n                  \"contentMediaType\": \"image/png\",\n                  \"contentEncoding\": \"base64\"\n                }\n              }\n            }\n          }\n        }\n      }\n    },\n    \"/bar\": {\n      \"get\": {\n        \"responses\": {\n          \"200\": {\n            \"content\": {\n              \"application/zip\": {}\n            }\n          }\n        }\n      }\n    }\n  }\n}\n"
  },
  {
    "path": "specs/3.0.x/content-types.yaml",
    "content": "openapi: 3.0.0\ninfo:\n  title: OpenAPI 3.0.0 content types example\n  version: '1'\npaths:\n  /foo:\n    get:\n      responses:\n        '200':\n          description: OK\n          content:\n            text/plain:\n              schema:\n                type: string\n            application/json:\n              schema:\n                type: string\n            text/json:\n              schema:\n                type: string\n"
  },
  {
    "path": "specs/3.0.x/discriminator-all-of.yaml",
    "content": "openapi: 3.0.3\ninfo:\n  title: OpenAPI 3.0.3 discriminator all of example\n  version: 1\ncomponents:\n  schemas:\n    Foo:\n      type: object\n      required:\n        - id\n      properties:\n        id:\n          type: string\n      discriminator:\n        propertyName: id\n    Bar:\n      allOf:\n        - $ref: '#/components/schemas/Foo'\n        - type: object\n          properties:\n            bar:\n              type: string\n    Baz:\n      allOf:\n        - $ref: '#/components/schemas/Foo'\n        - type: object\n          properties:\n            baz:\n              type: string\n    Qux:\n      allOf:\n        - $ref: '#/components/schemas/Foo'\n        - type: object\n          properties:\n            qux:\n              type: boolean\n    FooMapped:\n      type: object\n      required:\n        - id\n      properties:\n        id:\n          type: string\n      discriminator:\n        propertyName: id\n        mapping:\n          bar: '#/components/schemas/BarMapped'\n          baz: '#/components/schemas/BazMapped'\n    BarMapped:\n      allOf:\n        - $ref: '#/components/schemas/FooMapped'\n        - type: object\n          properties:\n            bar:\n              type: string\n    BazMapped:\n      allOf:\n        - $ref: '#/components/schemas/FooMapped'\n        - type: object\n          properties:\n            baz:\n              type: string\n    QuxMapped:\n      allOf:\n        - $ref: '#/components/schemas/FooMapped'\n        - type: object\n          properties:\n            qux:\n              type: boolean\n    FooUnion:\n      oneOf:\n        - $ref: '#/components/schemas/BarUnion'\n        - $ref: '#/components/schemas/BazUnion'\n      discriminator:\n        propertyName: id\n        mapping:\n          bar: '#/components/schemas/BarUnion'\n          baz: '#/components/schemas/BazUnion'\n    BarUnion:\n      type: object\n      properties:\n        id:\n          type: string\n        bar:\n          type: string\n    BazUnion:\n      type: object\n      properties:\n        id:\n          type: string\n        baz:\n          type: string\n    QuxExtend: # this is a schema that extends the FooUnion schema\n      allOf:\n        - $ref: '#/components/schemas/FooUnion'\n"
  },
  {
    "path": "specs/3.0.x/discriminator-allof-inline.json",
    "content": "{\n  \"openapi\": \"3.0.3\",\n  \"info\": {\n    \"title\": \"Discriminator allOf inline schema mapping\",\n    \"version\": \"1.0.0\",\n    \"description\": \"Reproduces a bug where a schema extending a parent whose allOf contains both a $ref (with a discriminator that doesn't map the child) and an inline schema (with a discriminator that does map the child) gets the wrong discriminator value. The inline discriminator mapping should win, not the $ref discriminator fallback.\"\n  },\n  \"paths\": {\n    \"/foos\": {\n      \"get\": {\n        \"responses\": {\n          \"200\": {\n            \"description\": \"OK\",\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"oneOf\": [\n                    { \"$ref\": \"#/components/schemas/Bar\" },\n                    { \"$ref\": \"#/components/schemas/Baz\" },\n                    { \"$ref\": \"#/components/schemas/Qux\" }\n                  ]\n                }\n              }\n            }\n          }\n        }\n      }\n    }\n  },\n  \"components\": {\n    \"schemas\": {\n      \"Foo\": {\n        \"required\": [\"$type\"],\n        \"type\": \"object\",\n        \"properties\": {\n          \"$type\": { \"type\": \"string\" },\n          \"foo\": { \"type\": \"string\" }\n        },\n        \"discriminator\": {\n          \"propertyName\": \"$type\",\n          \"mapping\": {\n            \"FooBar\": \"#/components/schemas/Bar\",\n            \"FooBaz\": \"#/components/schemas/Baz\"\n          }\n        }\n      },\n      \"Bar\": {\n        \"allOf\": [\n          { \"$ref\": \"#/components/schemas/Foo\" },\n          {\n            \"required\": [\"$type\"],\n            \"type\": \"object\",\n            \"properties\": {\n              \"$type\": { \"type\": \"string\" },\n              \"bar\": { \"type\": \"string\" }\n            },\n            \"discriminator\": {\n              \"propertyName\": \"$type\",\n              \"mapping\": {\n                \"BarQux\": \"#/components/schemas/Qux\"\n              }\n            }\n          }\n        ]\n      },\n      \"Baz\": {\n        \"allOf\": [\n          { \"$ref\": \"#/components/schemas/Foo\" },\n          {\n            \"type\": \"object\",\n            \"properties\": {\n              \"baz\": { \"type\": \"string\" }\n            }\n          }\n        ]\n      },\n      \"Qux\": {\n        \"allOf\": [\n          { \"$ref\": \"#/components/schemas/Bar\" },\n          {\n            \"type\": \"object\",\n            \"properties\": {\n              \"qux\": { \"type\": \"string\" }\n            }\n          }\n        ]\n      }\n    }\n  }\n}\n"
  },
  {
    "path": "specs/3.0.x/discriminator-allof-nested.json",
    "content": "{\n  \"openapi\": \"3.0.3\",\n  \"info\": {\n    \"title\": \"Minimal Polymorphic Discriminator Reproduction\",\n    \"version\": \"1.0.0\",\n    \"description\": \"Demonstrates an issue where TypeScript type generation results in wrong discriminator for nested allOf inheritance with discriminators at multiple levels.\"\n  },\n  \"paths\": {\n    \"/cars\": {\n      \"get\": {\n        \"summary\": \"Get cars\",\n        \"responses\": {\n          \"200\": {\n            \"description\": \"List of cars\",\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"type\": \"array\",\n                  \"items\": {\n                    \"oneOf\": [\n                      { \"$ref\": \"#/components/schemas/CarDto\" },\n                      { \"$ref\": \"#/components/schemas/VolvoDto\" }\n                    ]\n                  }\n                }\n              }\n            }\n          }\n        }\n      }\n    }\n  },\n  \"components\": {\n    \"schemas\": {\n      \"VehicleDto\": {\n        \"type\": \"object\",\n        \"required\": [\"$type\", \"id\"],\n        \"properties\": {\n          \"$type\": {\n            \"type\": \"string\"\n          },\n          \"id\": {\n            \"type\": \"integer\"\n          }\n        },\n        \"discriminator\": {\n          \"propertyName\": \"$type\",\n          \"mapping\": {\n            \"Car\": \"#/components/schemas/CarDto\",\n            \"Volvo\": \"#/components/schemas/VolvoDto\"\n          }\n        }\n      },\n      \"CarDto\": {\n        \"allOf\": [\n          { \"$ref\": \"#/components/schemas/VehicleDto\" },\n          {\n            \"type\": \"object\",\n            \"required\": [\"modelName\"],\n            \"properties\": {\n              \"modelName\": {\n                \"type\": \"string\"\n              }\n            }\n          }\n        ]\n      },\n      \"VolvoDto\": {\n        \"allOf\": [\n          { \"$ref\": \"#/components/schemas/CarDto\" },\n          {\n            \"type\": \"object\",\n            \"required\": [\"seatbeltCount\"],\n            \"properties\": {\n              \"seatbeltCount\": {\n                \"type\": \"integer\"\n              }\n            }\n          }\n        ]\n      }\n    }\n  }\n}\n"
  },
  {
    "path": "specs/3.0.x/discriminator-any-of.yaml",
    "content": "openapi: 3.0.3\ninfo:\n  title: OpenAPI 3.0.3 discriminator any of example\n  version: 1\ncomponents:\n  schemas:\n    Foo:\n      anyOf:\n        - $ref: '#/components/schemas/Bar'\n        - $ref: '#/components/schemas/Baz'\n      discriminator:\n        propertyName: type\n    Baz:\n      allOf:\n        - $ref: '#/components/schemas/Qux'\n    Bar:\n      allOf:\n        - $ref: '#/components/schemas/Qux'\n    Spæcial:\n      allOf:\n        - $ref: '#/components/schemas/Qux'\n    Qux:\n      type: object\n      properties:\n        id:\n          type: string\n        type:\n          $ref: '#/components/schemas/Quux'\n      required:\n        - id\n        - type\n    Quux:\n      enum:\n        - Bar\n        - Baz\n      type: string\n    Quuz:\n      anyOf:\n        - $ref: '#/components/schemas/Bar'\n        - $ref: '#/components/schemas/Baz'\n        - $ref: '#/components/schemas/Spæcial'\n      discriminator:\n        propertyName: type\n        mapping:\n          bar: '#/components/schemas/Bar'\n          baz: '#/components/schemas/Baz'\n          'non-ascii': '#/components/schemas/Spæcial'\n"
  },
  {
    "path": "specs/3.0.x/discriminator-mapped-many.yaml",
    "content": "openapi: 3.0.0\ninfo:\n  title: OpenAPI 3.0.0 discriminator mapped many example\n  version: 1\ncomponents:\n  schemas:\n    Foo:\n      oneOf:\n        - $ref: '#/components/schemas/Bar'\n        - $ref: '#/components/schemas/Baz'\n        - $ref: '#/components/schemas/Spæcial'\n      discriminator:\n        propertyName: foo\n        mapping:\n          one: '#/components/schemas/Bar'\n          two: '#/components/schemas/Bar'\n          three: '#/components/schemas/Baz'\n          four: '#/components/schemas/Spæcial'\n    Bar:\n      type: object\n      properties:\n        foo:\n          type: string\n          enum:\n            - one\n            - two\n    Baz:\n      type: object\n      properties:\n        foo:\n          type: string\n          enum:\n            - three\n    Spæcial:\n      type: object\n      properties:\n        foo:\n          type: string\n          enum:\n            - four\n"
  },
  {
    "path": "specs/3.0.x/discriminator-non-string.yaml",
    "content": "openapi: 3.0.3\ninfo:\n  title: Non-string discriminator test\n  version: 1\ncomponents:\n  schemas:\n    # --- Boolean discriminator (oneOf) ---\n    BooleanOneOf:\n      oneOf:\n        - $ref: '#/components/schemas/AutoConfig'\n        - $ref: '#/components/schemas/CustomConfig'\n      discriminator:\n        propertyName: use_custom\n        mapping:\n          'False': '#/components/schemas/AutoConfig'\n          'True': '#/components/schemas/CustomConfig'\n\n    AutoConfig:\n      type: object\n      required:\n        - use_custom\n        - auto_setting\n      properties:\n        use_custom:\n          type: boolean\n          const: false\n        auto_setting:\n          type: string\n\n    CustomConfig:\n      type: object\n      required:\n        - use_custom\n        - custom_value\n      properties:\n        use_custom:\n          type: boolean\n          const: true\n        custom_value:\n          type: integer\n\n    # --- Boolean discriminator (anyOf) ---\n    BooleanAnyOf:\n      anyOf:\n        - $ref: '#/components/schemas/AutoConfig'\n        - $ref: '#/components/schemas/CustomConfig'\n      discriminator:\n        propertyName: use_custom\n        mapping:\n          'False': '#/components/schemas/AutoConfig'\n          'True': '#/components/schemas/CustomConfig'\n\n    # --- Integer discriminator (oneOf) ---\n    IntegerOneOf:\n      oneOf:\n        - $ref: '#/components/schemas/TypeOne'\n        - $ref: '#/components/schemas/TypeTwo'\n      discriminator:\n        propertyName: type_id\n        mapping:\n          '1': '#/components/schemas/TypeOne'\n          '2': '#/components/schemas/TypeTwo'\n\n    TypeOne:\n      type: object\n      required:\n        - type_id\n        - one_data\n      properties:\n        type_id:\n          type: integer\n          const: 1\n        one_data:\n          type: string\n\n    TypeTwo:\n      type: object\n      required:\n        - type_id\n        - two_data\n      properties:\n        type_id:\n          type: integer\n          const: 2\n        two_data:\n          type: string\n\n    # --- Number (float) discriminator (oneOf) ---\n    NumberOneOf:\n      oneOf:\n        - $ref: '#/components/schemas/VersionAlpha'\n        - $ref: '#/components/schemas/VersionBeta'\n      discriminator:\n        propertyName: version\n        mapping:\n          '1.0': '#/components/schemas/VersionAlpha'\n          '2.5': '#/components/schemas/VersionBeta'\n\n    VersionAlpha:\n      type: object\n      required:\n        - version\n        - alpha_field\n      properties:\n        version:\n          type: number\n          const: 1.0\n        alpha_field:\n          type: string\n\n    VersionBeta:\n      type: object\n      required:\n        - version\n        - beta_field\n      properties:\n        version:\n          type: number\n          const: 2.5\n        beta_field:\n          type: string\n\n    # --- Integer discriminator (allOf) ---\n    IntegerAllOfBase:\n      type: object\n      required:\n        - kind\n      properties:\n        kind:\n          type: integer\n      discriminator:\n        propertyName: kind\n        mapping:\n          '1': '#/components/schemas/IntegerAllOfChildA'\n          '2': '#/components/schemas/IntegerAllOfChildB'\n\n    IntegerAllOfChildA:\n      allOf:\n        - $ref: '#/components/schemas/IntegerAllOfBase'\n        - type: object\n          required:\n            - child_a_field\n          properties:\n            child_a_field:\n              type: string\n\n    IntegerAllOfChildB:\n      allOf:\n        - $ref: '#/components/schemas/IntegerAllOfBase'\n        - type: object\n          required:\n            - child_b_field\n          properties:\n            child_b_field:\n              type: string\n"
  },
  {
    "path": "specs/3.0.x/discriminator-object-self-mapped.json",
    "content": "{\n  \"openapi\": \"3.0.3\",\n  \"info\": {\n    \"title\": \"Discriminator object schema with self mapping\",\n    \"version\": \"1.0.0\",\n    \"description\": \"Ensures a concrete schema with a discriminator mapping to itself gets a literal discriminator value instead of falling back to string.\"\n  },\n  \"paths\": {\n    \"/blog-posts\": {\n      \"get\": {\n        \"summary\": \"Get blog posts\",\n        \"responses\": {\n          \"200\": {\n            \"description\": \"List of blog posts\",\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"type\": \"array\",\n                  \"items\": {\n                    \"oneOf\": [\n                      { \"$ref\": \"#/components/schemas/BlogPostDto\" },\n                      { \"$ref\": \"#/components/schemas/BlogPostWithImageDto\" }\n                    ]\n                  }\n                }\n              }\n            }\n          }\n        }\n      }\n    }\n  },\n  \"components\": {\n    \"schemas\": {\n      \"BlogPostDto\": {\n        \"type\": \"object\",\n        \"required\": [\"$type\", \"id\", \"title\"],\n        \"properties\": {\n          \"$type\": {\n            \"type\": \"string\"\n          },\n          \"id\": {\n            \"type\": \"integer\"\n          },\n          \"title\": {\n            \"type\": \"string\"\n          }\n        },\n        \"discriminator\": {\n          \"propertyName\": \"$type\",\n          \"mapping\": {\n            \"BlogPost\": \"#/components/schemas/BlogPostDto\",\n            \"BlogPostWithImage\": \"#/components/schemas/BlogPostWithImageDto\"\n          }\n        }\n      },\n      \"BlogPostWithImageDto\": {\n        \"allOf\": [\n          { \"$ref\": \"#/components/schemas/BlogPostDto\" },\n          {\n            \"type\": \"object\",\n            \"required\": [\"imageUrl\"],\n            \"properties\": {\n              \"imageUrl\": {\n                \"type\": \"string\"\n              }\n            }\n          }\n        ]\n      }\n    }\n  }\n}\n"
  },
  {
    "path": "specs/3.0.x/discriminator-one-of.yaml",
    "content": "openapi: 3.0.3\ninfo:\n  title: OpenAPI 3.0.3 discriminator one of example\n  version: 1\ncomponents:\n  schemas:\n    Foo:\n      oneOf:\n        - $ref: '#/components/schemas/Bar'\n        - $ref: '#/components/schemas/Baz'\n      discriminator:\n        propertyName: type\n    Baz:\n      allOf:\n        - $ref: '#/components/schemas/Qux'\n    Bar:\n      allOf:\n        - $ref: '#/components/schemas/Qux'\n    Spæcial:\n      allOf:\n        - $ref: '#/components/schemas/Qux'\n    Qux:\n      type: object\n      properties:\n        id:\n          type: string\n        type:\n          $ref: '#/components/schemas/Quux'\n      required:\n        - id\n        - type\n    Quux:\n      enum:\n        - Bar\n        - Baz\n      type: string\n    Quuz:\n      oneOf:\n        - $ref: '#/components/schemas/Bar'\n        - $ref: '#/components/schemas/Baz'\n        - $ref: '#/components/schemas/Spæcial'\n      discriminator:\n        propertyName: type\n        mapping:\n          bar: '#/components/schemas/Bar'\n          baz: '#/components/schemas/Baz'\n          'non-ascii': '#/components/schemas/Spæcial'\n"
  },
  {
    "path": "specs/3.0.x/dutchie.json",
    "content": "{\n  \"openapi\": \"3.0.4\",\n  \"info\": {\n    \"title\": \"Dutchie Point of Sale API\",\n    \"description\": \"\\r\\n**Comprehensive REST API for Dutchie Point of Sale Platform Integration**\\r\\n\\r\\nThe Dutchie Point of Sale API provides complete access to your cannabis retail operations, enabling seamless integration with third-party systems, custom applications, and business intelligence tools.\\r\\n\\r\\n**Core Capabilities:**\\r\\n• **Product Management** - Create, update, and sync product catalogs with real-time inventory\\r\\n• **Customer Operations** - Manage customer profiles, loyalty programs, and purchase history  \\r\\n• **Inventory Control** - Track stock levels, receive shipments, and monitor product movement\\r\\n• **Reporting & Analytics** - Access comprehensive sales, inventory, and customer data\\r\\n• **Compliance Integration** - Maintain regulatory compliance with automated state reporting\\r\\n\\r\\n**Base URL:** `https://api.pos.dutchie.com`\\r\\n\\r\\n**Authentication:** All requests require a valid API key provided via HTTP Basic Authentication (username: your API key, password: leave empty).\\r\\n\\r\\n**Rate Limiting:** Requests are limited to ensure optimal performance for all users. See individual endpoints for specific limits.\\r\\n\",\n    \"version\": \"v1.0.0\"\n  },\n  \"servers\": [\n    {\n      \"url\": \"/\",\n      \"description\": \"Current Host\"\n    },\n    {\n      \"url\": \"https://api.pos.dutchie.com\",\n      \"description\": \"Production API Server\"\n    }\n  ],\n  \"paths\": {\n    \"/batch/lab-results\": {\n      \"post\": {\n        \"tags\": [\"Batch\"],\n        \"summary\": \"Create or Update Batch Lab Results\",\n        \"description\": \"**Purpose:** Create or update comprehensive laboratory testing results for a specific batch to ensure compliance with cannabis regulations and provide quality assurance data.\\n\\n**Request Requirements:**\\n- \\\"PackageWrite\\\" role authorization required for lab data operations\\n- `UpdateBatchLabResultsRequest` object in request body with lab result data\\n- Content-Type: application/json\\n- BatchName must exist and be accessible to your location\\n\\n**Response Data:**\\n- Returns success confirmation (HTTP 200) upon successful creation or update\\n- No response body content (void return)\\n- Lab results are validated and stored for compliance and quality tracking\\n- Updates are reflected immediately in batch data and inventory systems\\n\\n**Create vs Update Behavior:**\\n- **CREATE**: When no lab results exist for the batch, new lab results will be created\\n- **UPDATE**: When lab results already exist for the batch, existing results will be updated\\n- **Validation**: Lab result data must pass validation requirements for regulatory compliance\\n- **Batch Sharing**: All packages within the same batch share identical lab results\\n\\n**Request Body Fields:**\\n- BatchName: Name of the batch to update lab results for (required)\\n- SampleWeight: Weight of the sample tested (optional, defaults to -1)\\n- LabResults: Array of lab result objects with test data (required)\\n\\n**Sparse Update Behavior:**\\n- **Provided lab results**: Will overwrite existing test data with new values\\n- **Omitted lab results**: Existing test data for those analytes will be preserved\\n- **Special handling**: If multiple packages exist in the same batch, all will share the updated results\\n- **Validation**: All provided lab data must meet regulatory testing standards\\n\\n**Lab Result Data Types:**\\n- **Cannabinoid Testing**: THC, THCA, CBD, CBDA, CBN, CBG concentrations\\n- **Safety Testing**: Pesticides, heavy metals, microbials, mycotoxins results\\n- **Quality Testing**: Moisture content, foreign matter, residual solvents\\n- **Potency Testing**: Total THC/CBD calculations and verification\\n- **Terpene Testing**: Terpene profiles and concentration data\\n\\n**Common Use Cases:**\\n- Submit initial lab results from testing laboratory for compliance reporting\\n- Update lab results when retesting or additional testing is performed\\n- Correct lab result data when errors are discovered\\n- Add supplementary testing results (terpenes, additional cannabinoids)\\n- Maintain accurate Certificate of Analysis (COA) data for regulatory compliance\\n\\n**Performance & Limits:**\\n- Single batch operation for targeted lab result updates\\n- Immediate validation and compliance checking\\n- Changes propagate to all packages within the batch immediately\\n- Optimized for laboratory workflow integration\\n\\n**Related Endpoints:**\\n- `POST /package/lab-results` - Update lab results by package ID instead of batch name\\n- `GET /inventory/labresults` - Retrieve lab results for display and verification\\n- `GET /reference/lab-result-units` - Get valid units for lab result data\\n- `GET /reference/lab-results-names` - Get valid analyte names for testing\\n\\n**Important Notes:**\\n- **Batch Sharing**: All packages in the same batch will share these lab results\\n- **Compliance Critical**: Lab results are required for legal cannabis sales and regulatory reporting\\n- **Data Integrity**: Validation ensures lab results meet regulatory standards\\n- **Certificate Updates**: Changes update Certificate of Analysis (COA) documentation\\n- **Alternative Access**: Use POST /package/lab-results if you prefer to work with package IDs\",\n        \"operationId\": \"BatchLab-resultsPost\",\n        \"requestBody\": {\n          \"description\": \"Batch lab results update request with batch name and lab data - UpdateBatchLabResultsRequest object\",\n          \"content\": {\n            \"application/json-patch+json\": {\n              \"schema\": {\n                \"$ref\": \"#/components/schemas/UpdateBatchLabResultsRequest\"\n              }\n            },\n            \"application/json\": {\n              \"schema\": {\n                \"$ref\": \"#/components/schemas/UpdateBatchLabResultsRequest\"\n              }\n            },\n            \"text/json\": {\n              \"schema\": {\n                \"$ref\": \"#/components/schemas/UpdateBatchLabResultsRequest\"\n              }\n            },\n            \"application/*+json\": {\n              \"schema\": {\n                \"$ref\": \"#/components/schemas/UpdateBatchLabResultsRequest\"\n              }\n            }\n          },\n          \"x-bodyName\": \"req\"\n        },\n        \"responses\": {\n          \"200\": {\n            \"description\": \"Success - Lab results successfully created or updated\"\n          },\n          \"400\": {\n            \"description\": \"Bad Request - String error message (parse response body as plain text) OR `ValidationResult` object with `isValid` boolean, `errors` array, and `ruleSetsExecuted` array\",\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"$ref\": \"#/components/schemas/ValidationResult\"\n                }\n              }\n            }\n          },\n          \"401\": {\n            \"description\": \"Invalid API Key\"\n          },\n          \"403\": {\n            \"description\": \"Account not authorized\"\n          },\n          \"404\": {\n            \"description\": \"Not Found - Batch with specified name does not exist\",\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"type\": \"string\"\n                }\n              }\n            }\n          },\n          \"500\": {\n            \"description\": \"Something went wrong.\"\n          }\n        }\n      }\n    },\n    \"/brand\": {\n      \"get\": {\n        \"tags\": [\"Brand\"],\n        \"summary\": \"Get All Brands\",\n        \"description\": \"**Purpose:** Retrieve comprehensive list of all active product brands available for the authenticated location.\\n\\n**Request Requirements:**\\n- Any authenticated role authorization (no specific role required)\\n- No query parameters or request body needed\\n\\n**Response Data:**\\n- Returns array of brand objects: `[{ Brand }, ...]`\\n- Array typically contains 10-100 brands per location\\n- Returns empty array `[]` if no brands configured for location\\n- Brand ID, name, and optional external catalog identifiers\\n- Only active, non-deleted brands are included in results\\n- Results automatically filtered to authenticated location\\n\\n**Common Use Cases:**\\n- Populate brand dropdown lists in product creation and editing forms\\n- Show available brands for product categorization and filtering on e-commerce sites\\n- Group products by brand for inventory management and organization\\n- Generate brand-specific reports for regulatory compliance requirements\\n- Organize dispensary menus by brand for customer browsing\\n- Synchronize brand data with external POS and e-commerce systems\\n\\n**Performance & Limits:**\\n- Lightweight data that is typically small and fast to retrieve\\n- This endpoint is commonly called for form population and product management\\n- No pagination needed due to typically small brand datasets\\n\\n**Related Endpoints:**\\n- `GET /products` - Get products which include brand information in response\\n- `POST /brand` - Create or update brand information\\n\\n**Important Notes:**\\n- Despite the singular endpoint name `/brand`, this method returns multiple brands (an array)\\n- Brands are automatically scoped to the authenticated dispensary location\\n- Only active brands are returned; deleted brands are excluded\\n- Brands returned here can be used when creating or updating products\",\n        \"operationId\": \"BrandGet\",\n        \"responses\": {\n          \"200\": {\n            \"description\": \"Success - Returns array of brand objects: `[{ Brand }, ...]`\",\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"type\": \"array\",\n                  \"items\": {\n                    \"$ref\": \"#/components/schemas/Brand\"\n                  }\n                }\n              }\n            }\n          },\n          \"401\": {\n            \"description\": \"Unauthorized - Invalid or missing API key\"\n          },\n          \"403\": {\n            \"description\": \"Forbidden - Account not authorized for brand access\"\n          },\n          \"500\": {\n            \"description\": \"Internal Server Error - Server error occurred\"\n          }\n        }\n      },\n      \"post\": {\n        \"tags\": [\"Brand\"],\n        \"summary\": \"Create or Update Brand\",\n        \"description\": \"**Purpose:** Creates a new brand or updates an existing brand with the provided brand information.\\n\\n**Request Requirements:**\\n- Any authenticated role authorization (no specific role required)\\n- `BrandEditRequest` object in request body with brand details\\n- Content-Type: application/json\\n\\n**Response Data:**\\n- Returns brand object: `{ Brand }`\\n- Includes assigned or updated brand ID and all brand properties\\n\\n**Create vs Update Behavior:**\\n- **CREATE**: When `BrandId` is null or omitted, a new brand will be created\\n- **UPDATE**: When `BrandId` is provided with a valid brand ID, the existing brand will be updated\\n- **Validation**: Brand name is required for both operations and must be unique within the location\\n\\n**Sparse Update Behavior:**\\n- **Provided fields**: Will overwrite existing brand values with provided data\\n- **Omitted fields**: Will preserve existing brand values (no data loss)\\n- **Required validation**: BrandName must be provided even for updates\\n\\n**Common Use Cases:**\\n- Add new product brands to the system for product categorization\\n- Update existing brand information when details change\\n- Maintain brand consistency across products and inventory\\n- Synchronize brand data from external systems\\n\\n**Performance & Limits:**\\n- Single brand operation for targeted updates\\n- Immediate validation and response\\n- Changes are reflected immediately in brand listings\\n\\n**Related Endpoints:**\\n- `GET /brand` - Retrieve all brands to see current brand list\\n- `GET /products` - View products that use specific brands\\n\\n**Important Notes:**\\n- Brand name must be unique within the authenticated location\\n- All validation errors will be returned in a structured error response\\n- This endpoint handles a single brand per request\\n- Successful operations return the complete brand object\",\n        \"operationId\": \"BrandPost\",\n        \"requestBody\": {\n          \"description\": \"Brand information to create or update - BrandEditRequest object with brand details\",\n          \"content\": {\n            \"application/json-patch+json\": {\n              \"schema\": {\n                \"$ref\": \"#/components/schemas/BrandEditRequest\"\n              }\n            },\n            \"application/json\": {\n              \"schema\": {\n                \"$ref\": \"#/components/schemas/BrandEditRequest\"\n              }\n            },\n            \"text/json\": {\n              \"schema\": {\n                \"$ref\": \"#/components/schemas/BrandEditRequest\"\n              }\n            },\n            \"application/*+json\": {\n              \"schema\": {\n                \"$ref\": \"#/components/schemas/BrandEditRequest\"\n              }\n            }\n          },\n          \"x-bodyName\": \"brand\"\n        },\n        \"responses\": {\n          \"200\": {\n            \"description\": \"Success - Returns brand object: `{ Brand }`\",\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"$ref\": \"#/components/schemas/Brand\"\n                }\n              }\n            }\n          },\n          \"400\": {\n            \"description\": \"Bad Request - `BadRequestResponse` object with `message` string field (check `propertyErrors`: null for simple message, array for field-specific errors)\",\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"$ref\": \"#/components/schemas/BadRequestResponse\"\n                }\n              }\n            }\n          },\n          \"401\": {\n            \"description\": \"Invalid API Key\"\n          },\n          \"403\": {\n            \"description\": \"Account not authorized\"\n          },\n          \"500\": {\n            \"description\": \"Internal server error\"\n          }\n        }\n      }\n    },\n    \"/customer/customers\": {\n      \"get\": {\n        \"tags\": [\"Customer\"],\n        \"summary\": \"Get Customers\",\n        \"description\": \"**Purpose:** Retrieves a list of customers with optional filtering by modification date, customer ID, or unique ID for customer management and data synchronization.\\n\\n**Request Requirements:**\\n- \\\"Customer\\\" role authorization required for customer data operations\\n- Optional query parameters for filtering results\\n- No request body needed\\n\\n**Response Data:**\\n- Returns array of customer objects: `[{ Customer }, ...]`\\n- Array may contain 0 to 10,000+ customers depending on location and filtering\\n- Returns empty array `[]` if no customers match criteria (not null)\\n- Includes loyalty status and qualifying conditions when available\\n- Results automatically filtered by the authenticated user's location\\n- Customer profiles with contact information and preferences\\n\\n**Filtering Options:**\\n- No parameters: Returns all customers for the location\\n- fromLastModifiedDateUTC: Returns customers modified after this date for incremental sync\\n- toLastModifiedDateUTC: Returns customers modified before this date for date range filtering\\n- customerID: Returns a specific customer by internal ID\\n- uniqueId: Returns a specific customer by unique identifier\\n- includeAnonymous: Include/exclude anonymous customers (default: true)\\n\\n**Common Use Cases:**\\n- Call without parameters for initial sync to get all customers\\n- Use fromLastModifiedDateUTC for incremental sync to get only recent changes\\n- Use customerID or uniqueId for specific customer retrieval\\n- Sync customer data for point-of-sale systems integration\\n- Export customer data for external CRM or marketing systems\\n\\n**Performance & Limits:**\\n- Maximum date range is configurable per location (default: 90 days)\\n- Use incremental sync for large datasets to avoid timeouts\\n- Optimized for high-volume data synchronization\\n- Consider using paginated endpoint for very large customer bases\\n\\n**Related Endpoints:**\\n- `GET /customer/customers-paginated` - Paginated version for large datasets\\n- `POST /customer` - Create or update customer information\\n- `POST /customerLookup` - Find existing customers by various search criteria\\n\\n**Important Notes:**\\n- Results filtered to authenticated user's location for data security\\n- Date range limits help prevent timeouts with large customer databases\\n- Anonymous customers can be included or excluded based on business needs\\n- Loyalty status information included when available for customer insights\",\n        \"operationId\": \"CustomerCustomersGet\",\n        \"parameters\": [\n          {\n            \"name\": \"fromLastModifiedDateUTC\",\n            \"in\": \"query\",\n            \"description\": \"Optional date filter to return customers modified after this timestamp - Used for incremental sync\",\n            \"schema\": {\n              \"type\": \"string\",\n              \"format\": \"date-time\"\n            }\n          },\n          {\n            \"name\": \"toLastModifiedDateUTC\",\n            \"in\": \"query\",\n            \"description\": \"Optional date filter to return customers modified before this timestamp - Used for date range filtering\",\n            \"schema\": {\n              \"type\": \"string\",\n              \"format\": \"date-time\"\n            }\n          },\n          {\n            \"name\": \"customerID\",\n            \"in\": \"query\",\n            \"description\": \"Optional customer ID to return a specific customer by internal ID\",\n            \"schema\": {\n              \"type\": \"integer\",\n              \"format\": \"int32\"\n            }\n          },\n          {\n            \"name\": \"includeAnonymous\",\n            \"in\": \"query\",\n            \"description\": \"Include/exclude anonymous customers in results - Default: true\",\n            \"schema\": {\n              \"type\": \"boolean\",\n              \"default\": true\n            }\n          },\n          {\n            \"name\": \"uniqueId\",\n            \"in\": \"query\",\n            \"description\": \"Optional unique ID to return a specific customer by unique identifier - Must be valid long integer when provided\",\n            \"schema\": {\n              \"type\": \"string\"\n            }\n          }\n        ],\n        \"responses\": {\n          \"200\": {\n            \"description\": \"Success - Returns array of customer objects: `[{ Customer }, ...]`\",\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"type\": \"array\",\n                  \"items\": {\n                    \"$ref\": \"#/components/schemas/Customer\"\n                  }\n                }\n              }\n            }\n          },\n          \"400\": {\n            \"description\": \"Bad Request - Invalid date range or uniqueId format\",\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"$ref\": \"#/components/schemas/BadRequestResponse\"\n                }\n              }\n            }\n          },\n          \"401\": {\n            \"description\": \"Unauthorized - Invalid or missing API key\"\n          },\n          \"403\": {\n            \"description\": \"Forbidden - Account not authorized for customer data operations\"\n          },\n          \"404\": {\n            \"description\": \"Not Found - Customer not found when searching by customerID or uniqueId\"\n          },\n          \"500\": {\n            \"description\": \"Internal Server Error - Server error occurred\"\n          }\n        }\n      }\n    },\n    \"/customer/customers-paginated\": {\n      \"get\": {\n        \"tags\": [\"Customer\"],\n        \"summary\": \"Get Customers (Paginated)\",\n        \"description\": \"**Purpose:** Retrieves customers in paginated chunks for better performance with large customer datasets and efficient memory management.\\n\\n**Request Requirements:**\\n- \\\"Customer\\\" role authorization required for customer data operations\\n- Optional query parameters for pagination and filtering\\n- No request body needed\\n\\n**Response Data:**\\n- Response format: `[{ Customer }, { Customer }, ...]`\\n- **No pagination metadata**: Response contains only data array without total counts or page information\\n- Array contains up to PageSize customers (default 1000, max 10000)\\n- Returns empty array `[]` if no customers found for page (not null)\\n- Includes loyalty status and qualifying conditions when available\\n- Results automatically filtered by the authenticated user's location\\n\\n**Pagination Usage:**\\n- **First Request**: Call with PageNumber=0 to get first page\\n- **Subsequent Requests**: Increment PageNumber for each additional page\\n- **End Detection**: Continue requesting pages until you receive an empty array `[]`\\n- **Page Size Control**: Use PageSize parameter to control items per page (max 10,000)\\n- **Example Flow**: Request PageNumber=0 → Process results → Increment PageNumber → Repeat until empty `[]` response\\n\\n**Pagination Detection:**\\n- **End of data detection**: Continue requesting pages until you receive an empty array `[]`\\n- **No metadata provided**: Response does not include total counts, page counts, or hasNextPage indicators\\n- **Sequential access**: Increment PageNumber from 0 until empty response indicates no more data\\n\\n**Filtering Options:**\\n- fromLastModifiedDateUTC: Returns customers modified after this date\\n- toLastModifiedDateUTC: Returns customers modified before this date\\n- includeAnonymous: Include/exclude anonymous customers (default: true)\\n\\n**Common Use Cases:**\\n- Process large customer databases efficiently for data export\\n- Batch processing customers to avoid memory issues in applications\\n- Large-scale customer data synchronization with external systems\\n- Generate customer reports without overwhelming system resources\\n- Support high-volume customer data operations with controlled memory usage\\n\\n**Performance & Limits:**\\n- Maximum 10,000 customers per page for optimal performance\\n- Use consistent page size throughout pagination sequence for efficiency\\n- Monitor response times and adjust page size for optimal performance\\n- Cache results locally to minimize API calls and improve responsiveness\\n- Recommended over non-paginated endpoint for datasets over 1000 customers\\n\\n**Related Endpoints:**\\n- `GET /customer/customers` - Non-paginated version for smaller datasets\\n- `POST /customer` - Create or update customer information\\n- `POST /customerLookup` - Find specific customers by search criteria\\n\\n**Important Notes:**\\n- Use this endpoint instead of /customers for better performance with large datasets\\n- Results filtered to authenticated user's location for data security\\n- Pagination state management required in client applications\\n- Suitable for batch processing and large-scale data operations\",\n        \"operationId\": \"CustomerCustomers-paginatedGet\",\n        \"parameters\": [\n          {\n            \"name\": \"fromLastModifiedDateUTC\",\n            \"in\": \"query\",\n            \"description\": \"Optional date filter to return customers modified after this timestamp\",\n            \"schema\": {\n              \"type\": \"string\",\n              \"format\": \"date-time\"\n            }\n          },\n          {\n            \"name\": \"toLastModifiedDateUTC\",\n            \"in\": \"query\",\n            \"description\": \"Optional date filter to return customers modified before this timestamp\",\n            \"schema\": {\n              \"type\": \"string\",\n              \"format\": \"date-time\"\n            }\n          },\n          {\n            \"name\": \"PageNumber\",\n            \"in\": \"query\",\n            \"description\": \"Page number for sequential pagination (integer, starts at 0) - Default: 0\",\n            \"schema\": {\n              \"type\": \"integer\",\n              \"format\": \"int32\",\n              \"default\": 0\n            }\n          },\n          {\n            \"name\": \"PageSize\",\n            \"in\": \"query\",\n            \"description\": \"Number of items per page (integer) - Default: 1000, Maximum: 10000\",\n            \"schema\": {\n              \"type\": \"integer\",\n              \"format\": \"int32\",\n              \"default\": 1000\n            }\n          },\n          {\n            \"name\": \"includeAnonymous\",\n            \"in\": \"query\",\n            \"description\": \"Include/exclude anonymous customers in results - Default: true\",\n            \"schema\": {\n              \"type\": \"boolean\",\n              \"default\": true\n            }\n          }\n        ],\n        \"responses\": {\n          \"200\": {\n            \"description\": \"Success\",\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"type\": \"array\",\n                  \"items\": {\n                    \"$ref\": \"#/components/schemas/Customer\"\n                  }\n                }\n              }\n            }\n          },\n          \"400\": {\n            \"description\": \"Bad Request - PageSize exceeds maximum limit of 10,000\",\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"$ref\": \"#/components/schemas/BadRequestResponse\"\n                }\n              }\n            }\n          },\n          \"401\": {\n            \"description\": \"Invalid API Key\"\n          },\n          \"403\": {\n            \"description\": \"Account not authorized\"\n          },\n          \"500\": {\n            \"description\": \"Something went wrong.\"\n          }\n        }\n      }\n    },\n    \"/customer/customer-types\": {\n      \"get\": {\n        \"tags\": [\"Customer\"],\n        \"summary\": \"Get Customer Types\",\n        \"description\": \"**Purpose:** Retrieve the complete list of customer types available for the authenticated location, used for customer categorization and compliance.\\n\\n**Request Requirements:**\\n- Valid API key authentication required (no specific role restrictions)\\n- No query parameters or request body needed\\n\\n**Response Data:**\\n- Returns array of `CustomerType` objects with customer type information\\n- Response format: `[{ CustomerType }, ...]`\\n- Array typically contains 2-10 customer types per location\\n- Returns empty array `[]` if no customer types enabled for location (rare)\\n- Each customer type includes: Id, Name, IsRetail, IsMedical flags\\n- Display names include \\\"Adult Use\\\", \\\"Medical\\\", \\\"Wholesale\\\", etc.\\n- Results automatically filtered to authenticated location's enabled types\\n\\n**Customer Type Fields:**\\n- Id: Unique identifier for the customer type\\n- Name: Display name of the customer type\\n- IsRetail: Boolean indicating if this type is for retail customers\\n- IsMedical: Boolean indicating if this type is for medical patients\\n\\n**Common Use Cases:**\\n- Populate dropdown/selection lists for customer type in registration forms\\n- Ensure customers are assigned to valid, location-specific types for compliance validation\\n- Configure point-of-sale systems with available customer categories\\n- Configure online ordering systems with proper customer types for e-commerce setup\\n- Understand customer type structure for reporting classification and analytics\\n- Validate customer type IDs before creating/updating customers\\n\\n**Performance & Limits:**\\n- Lightweight reference data optimized for frequent access\\n- Customer types rarely change; safe to cache for several hours\\n- Small dataset suitable for client-side caching\\n- Location-specific results based on API key access\\n\\n**Integration Workflow:**\\n1. Call this endpoint to get available customer types for your location\\n2. Present options to users in registration/update forms\\n3. Use selected Id in POST /customer requests as CustomerTypeId\\n4. Implement validation to ensure selected type is valid for your location\\n\\n**Related Endpoints:**\\n- `POST /customer` - Create customers using these customer type IDs\\n- `GET /customer/customers` - Get customers with their assigned types\\n- `GET /customer/referral-sources` - Get referral source reference data\\n\\n**Important Notes:**\\n- Customer types are location-specific and may vary between dispensary locations\\n- Only returns customer types enabled for your specific location\\n- Results automatically filtered based on your API key's location access\\n- Use Name field for user-facing displays, Id for API calls\\n- Use IsRetail/IsMedical flags for business rule implementation and compliance logic\",\n        \"operationId\": \"CustomerCustomer-typesGet\",\n        \"responses\": {\n          \"200\": {\n            \"description\": \"Success\",\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"type\": \"array\",\n                  \"items\": {\n                    \"$ref\": \"#/components/schemas/CustomerType\"\n                  }\n                }\n              }\n            }\n          },\n          \"401\": {\n            \"description\": \"Invalid API Key\"\n          },\n          \"403\": {\n            \"description\": \"Account not authorized\"\n          },\n          \"500\": {\n            \"description\": \"Something went wrong.\"\n          }\n        }\n      }\n    },\n    \"/customer/referral-sources\": {\n      \"get\": {\n        \"tags\": [\"Customer\"],\n        \"summary\": \"Get Referral Sources\",\n        \"description\": \"**Purpose:** Retrieve the complete list of referral sources available system-wide, used for tracking customer acquisition and marketing campaign effectiveness.\\n\\n**Request Requirements:**\\n- \\\"Customer\\\" role authorization required for customer data operations\\n- No query parameters or request body needed\\n\\n**Response Data:**\\n- Returns array of string values representing available referral source options\\n- Response format: `[\\\"string\\\", \\\"string\\\", ...]`\\n- Array typically contains 10-20 predefined referral sources\\n- Returns empty array `[]` if no referral sources configured (rare)\\n- Examples include: \\\"Google\\\", \\\"Facebook\\\", \\\"Word of Mouth\\\", \\\"Print Ad\\\", \\\"Radio\\\", \\\"TV\\\", \\\"Yelp\\\", \\\"Instagram\\\"\\n- Standardized list ensures consistent marketing attribution across all locations\\n- System-wide reference data for marketing tracking\\n\\n**Common Use Cases:**\\n- Populate \\\"How did you hear about us?\\\" dropdown fields in customer registration\\n- Track which channels are driving customer acquisition for marketing attribution\\n- Measure effectiveness of different marketing strategies for campaign analysis\\n- Ensure valid referral source selection in customer profiles for form validation\\n- Feed data into marketing analytics and reporting systems for analytics integration\\n- Connect customer acquisition costs to specific marketing channels for ROI tracking\\n\\n**Performance & Limits:**\\n- Lightweight reference data optimized for frequent access\\n- Referral sources change infrequently; safe to cache for extended periods\\n- Small static dataset suitable for client-side caching\\n- Consistent across all organizations and locations\\n\\n**Integration Workflow:**\\n1. Call this endpoint to get available referral source options\\n2. Present options in customer registration or profile update forms\\n3. Include selected value when creating/updating customers (if supported)\\n4. Use for reporting to analyze customer acquisition patterns\\n\\n**Marketing Benefits:**\\n- Attribution tracking to understand which marketing channels are most effective\\n- Budget allocation optimization based on referral source performance\\n- Campaign ROI measurement for different marketing campaigns\\n- Customer insights to learn how customers discover your dispensary\\n\\n**Related Endpoints:**\\n- `POST /customer` - Create customers with referral source information\\n- `GET /customer/customer-types` - Get customer type reference data\\n- `GET /customer/customers` - Get customers with their referral source data\\n\\n**Important Notes:**\\n- Returns system-wide referral sources for consistent reporting across all locations\\n- Consider adding \\\"Other\\\" or \\\"Prefer not to say\\\" options in your UI implementation\\n- Use these values to populate selection lists in customer forms\\n- Validate referral source values against this list before submitting customer data\\n- Essential for marketing analytics and customer acquisition tracking\",\n        \"operationId\": \"CustomerReferral-sourcesGet\",\n        \"responses\": {\n          \"200\": {\n            \"description\": \"Success\",\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"type\": \"array\",\n                  \"items\": {\n                    \"type\": \"string\"\n                  }\n                }\n              }\n            }\n          },\n          \"401\": {\n            \"description\": \"Invalid API Key\"\n          },\n          \"403\": {\n            \"description\": \"Account not authorized\"\n          },\n          \"500\": {\n            \"description\": \"Something went wrong.\"\n          }\n        }\n      }\n    },\n    \"/customer/customer\": {\n      \"post\": {\n        \"tags\": [\"Customer\"],\n        \"summary\": \"Create or Update Customer\",\n        \"description\": \"**Purpose:** Create new customer profiles or update existing customer information for dispensary operations and e-commerce integration.\\n\\n**Request Requirements:**\\n- \\\"Customer\\\" role authorization required for customer data operations\\n- `EcomCustomerEdit` object in request body with customer details\\n- Content-Type: application/json\\n- Optional query parameter to bypass deduplication\\n- **Idempotency Support**: Requires `ConsumerKey` header and `IdempotencyKey` field for duplicate prevention (see [Idempotency Documentation](/pages/idempotency.html))\\n\\n**Response Data:**\\n- Returns single `Customer` object (not array) with assigned system ID\\n- Response format: `{ Customer }`\\n- Includes loyalty program enrollment and qualification status\\n- Provides both internal and external system identifiers\\n- Contains full customer profile with contact and address information\\n\\n**Create vs Update Behavior:**\\n- **CREATE**: When `CustomerId` is null, 0, or omitted, a new customer record will be created\\n- **UPDATE**: When `CustomerId` is provided with a valid customer ID, the existing customer will be updated\\n- **Validation**: FirstName, Address1, City, State, PostalCode, Status, and CustomerType are required\\n- **Deduplication**: Create operations include smart duplicate detection unless bypassed with query parameter\\n\\n**Request Body Format:**\\n- For new customers: Leave `CustomerId` null or 0 (will be auto-generated)\\n- For updates: Include the `CustomerId` in the request\\n- FirstName is required (Name will be used as FirstName if FirstName is empty)\\n- Address1, City, State, PostalCode are required for address information\\n- Status and CustomerType are required for customer classification\\n\\n**Optional Fields:**\\n- DateOfBirth (must be between 1800-01-01 and current date)\\n- LastName, MiddleName, NameSuffix, NamePrefix for name information\\n- Address2 for additional address details\\n- Phone, EmailAddress for contact information\\n- EcomUserId for external e-commerce system identifier\\n- UniqueId for external system integration\\n\\n**Sparse Update Behavior:**\\n- **Provided fields**: Will overwrite existing values with provided data\\n- **Omitted fields**: Will preserve existing values (no data loss for updates)\\n- **Special handling**: Name field will be used as FirstName if FirstName is omitted during updates\\n- **Validation**: Required fields for updates are more relaxed than for new customer creation\\n\\n**Smart Deduplication System:**\\n- Default behavior automatically searches for existing customers with matching details\\n- Helps prevent creating multiple records for the same person\\n- Use `bypassDeduplication=true` to force creation of new customer record\\n\\n**Common Use Cases:**\\n- Sync customer profiles from online ordering platforms for e-commerce integration\\n- Create new customer accounts during in-store visits and walk-in registration\\n- Update existing customer contact and address information\\n- Add customers to dispensary loyalty and rewards programs\\n- Maintain customer records for regulatory compliance requirements\\n- Synchronize customer data with external customer relationship management systems\\n\\n**Performance & Limits:**\\n- Rate limited to 1500 requests per minute (higher limit for high-volume customer operations)\\n- Single customer operation for targeted updates\\n- Immediate validation and duplicate detection\\n- Changes are reflected immediately in customer listings\\n- Smart matching algorithms optimize deduplication performance\\n\\n**Related Endpoints:**\\n- `POST /customerLookup` - Find existing customers by various search criteria\\n- `POST /search` - Search customers by name, phone, or email for quick lookup\\n- `GET /by-external-id` - Retrieve customers using external system identifiers\\n- `GET /customers` - List all customers with optional filtering\\n\\n**Important Notes:**\\n- Date of birth must be realistic (between 1800 and current date) for age verification\\n- Smart matching helps prevent multiple records for the same person\\n- Some fields may be required based on location-specific compliance regulations\\n- System validates contact information format and completeness for data quality\",\n        \"operationId\": \"CustomerCustomerPost\",\n        \"parameters\": [\n          {\n            \"name\": \"bypassDeduplication\",\n            \"in\": \"query\",\n            \"description\": \"Skip duplicate detection and force creation of new customer record - Default: false\",\n            \"schema\": {\n              \"type\": \"boolean\",\n              \"default\": false\n            }\n          },\n          {\n            \"name\": \"ConsumerKey\",\n            \"in\": \"header\",\n            \"description\": \"Optional GUID for idempotency checks. When provided with IdempotencyKey in request body, prevents duplicate customer creation\",\n            \"schema\": {\n              \"type\": \"string\"\n            }\n          }\n        ],\n        \"requestBody\": {\n          \"description\": \"Customer information to create or update - EcomCustomerEdit object with customer details\",\n          \"content\": {\n            \"application/json-patch+json\": {\n              \"schema\": {\n                \"$ref\": \"#/components/schemas/EcomCustomerEdit\"\n              }\n            },\n            \"application/json\": {\n              \"schema\": {\n                \"$ref\": \"#/components/schemas/EcomCustomerEdit\"\n              }\n            },\n            \"text/json\": {\n              \"schema\": {\n                \"$ref\": \"#/components/schemas/EcomCustomerEdit\"\n              }\n            },\n            \"application/*+json\": {\n              \"schema\": {\n                \"$ref\": \"#/components/schemas/EcomCustomerEdit\"\n              }\n            }\n          },\n          \"x-bodyName\": \"customer\"\n        },\n        \"responses\": {\n          \"200\": {\n            \"description\": \"Success - Returns complete Customer object with assigned ID and loyalty status\",\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"$ref\": \"#/components/schemas/Customer\"\n                }\n              }\n            }\n          },\n          \"400\": {\n            \"description\": \"Bad Request - `BadRequestResponse` object with `message` string field (check `propertyErrors`: null for simple message, array for field-specific errors)\",\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"$ref\": \"#/components/schemas/BadRequestResponse\"\n                }\n              }\n            }\n          },\n          \"401\": {\n            \"description\": \"Unauthorized - Invalid or missing API key\"\n          },\n          \"403\": {\n            \"description\": \"Forbidden - Account not authorized for customer management\"\n          },\n          \"404\": {\n            \"description\": \"Not Found - Customer ID provided for update but customer does not exist\",\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"type\": \"string\"\n                }\n              }\n            }\n          },\n          \"500\": {\n            \"description\": \"Internal Server Error - Server error occurred during customer processing\"\n          }\n        }\n      }\n    },\n    \"/customer/customerLookup\": {\n      \"post\": {\n        \"tags\": [\"Customer\"],\n        \"operationId\": \"CustomerCustomerLookupPost\",\n        \"requestBody\": {\n          \"content\": {\n            \"application/json-patch+json\": {\n              \"schema\": {\n                \"$ref\": \"#/components/schemas/EcomCustomerEdit\"\n              }\n            },\n            \"application/json\": {\n              \"schema\": {\n                \"$ref\": \"#/components/schemas/EcomCustomerEdit\"\n              }\n            },\n            \"text/json\": {\n              \"schema\": {\n                \"$ref\": \"#/components/schemas/EcomCustomerEdit\"\n              }\n            },\n            \"application/*+json\": {\n              \"schema\": {\n                \"$ref\": \"#/components/schemas/EcomCustomerEdit\"\n              }\n            }\n          },\n          \"x-bodyName\": \"customer\"\n        },\n        \"responses\": {\n          \"200\": {\n            \"description\": \"OK\",\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"$ref\": \"#/components/schemas/Customer\"\n                }\n              }\n            }\n          },\n          \"400\": {\n            \"description\": \"Bad Request\",\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"$ref\": \"#/components/schemas/BadRequestResponse\"\n                }\n              }\n            }\n          },\n          \"401\": {\n            \"description\": \"Unauthorized\"\n          },\n          \"403\": {\n            \"description\": \"Forbidden\"\n          },\n          \"404\": {\n            \"description\": \"Not Found\",\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"type\": \"string\"\n                }\n              }\n            }\n          },\n          \"500\": {\n            \"description\": \"Internal Server Error\"\n          }\n        }\n      }\n    },\n    \"/customer/search\": {\n      \"post\": {\n        \"tags\": [\"Customer\"],\n        \"summary\": \"Customer Search (PREVIEW)\",\n        \"description\": \"**NOTE - THIS ENDPOINT IS CURRENTLY IN PREVIEW - IT MAY UNDERGO BREAKING CHANGES IN UPCOMING RELEASES**\\n\\n\\n**Purpose:** Search for customers using multiple criteria with flexible matching to support customer identification and lookup workflows.\\n\\n**Request Requirements:**\\n- \\\"Customer\\\" role authorization required for customer data operations\\n- `CustomerSearchRequest` object in request body with search criteria\\n- Content-Type: application/json\\n- At least one search criterion must be provided\\n- Rate limited to 360 requests per minute\\n\\n**Response Data:**\\n- Returns array of `CustomerSearchResult` objects with matching customer information\\n- Response format: `[{ CustomerSearchResult }, ...]`\\n- Array may contain 0 to 100+ customers depending on search criteria specificity\\n- Returns empty array `[]` if no customers match search criteria (not null)\\n- Same customer may appear multiple times with different match types\\n- Includes match type information to identify which criteria matched\\n- Results automatically filtered to authenticated location\\n\\n**Search Criteria (Independent Matching):**\\n- **MMJ ID**: Medical marijuana patient identification number\\n- **Drivers License ID**: State-issued driver's license number\\n- **Email Address**: Customer's email address (exact match)\\n- **Phone Number**: Customer's phone number (normalized matching)\\n- **LastName + DateOfBirth**: Combined name and birth date search (both required together)\\n\\n**Search Behavior:**\\n- **Independent Fields**: Most fields are searched independently\\n- **Combined Fields**: LastName and DateOfBirth must be used together\\n- **Multiple Matches**: Same customer may appear with different match types\\n- **Location Scoped**: Results filtered to authenticated location only\\n- **Case Sensitivity**: Email and name searches are case-insensitive\\n\\n**Common Use Cases:**\\n- Find customers during check-in process for identification verification\\n- Locate existing customer records before creating new accounts\\n- Search for customers using partial or alternative identification methods\\n- Verify customer identity using multiple data points\\n- Support customer service lookup workflows\\n\\n**Performance & Limits:**\\n- Rate limited to 360 requests per minute for system protection\\n- Optimized for common customer lookup patterns\\n- Results limited to reasonable set size for performance\\n- Indexed searches for fast response times\\n\\n**Related Endpoints:**\\n- `POST /customer/customerLookup` - Single customer lookup with hierarchy\\n- `GET /customer/customers` - List all customers with filtering\\n- `POST /customer/customer` - Create or update customer records\\n\\n**Important Notes:**\\n- **PREVIEW STATUS**: This endpoint may undergo breaking changes in future releases\\n- **Multiple Results**: Same customer can appear multiple times with different match types\\n- **Location Filtering**: Results are automatically scoped to your authenticated location\\n- **Rate Limiting**: 360 requests per minute limit applies for system stability\\n- **Validation**: At least one search criterion must be provided in the request\",\n        \"operationId\": \"CustomerSearchPost\",\n        \"requestBody\": {\n          \"description\": \"Customer search request with search criteria - CustomerSearchRequest object\",\n          \"content\": {\n            \"application/json-patch+json\": {\n              \"schema\": {\n                \"$ref\": \"#/components/schemas/CustomerSearchRequest\"\n              }\n            },\n            \"application/json\": {\n              \"schema\": {\n                \"$ref\": \"#/components/schemas/CustomerSearchRequest\"\n              }\n            },\n            \"text/json\": {\n              \"schema\": {\n                \"$ref\": \"#/components/schemas/CustomerSearchRequest\"\n              }\n            },\n            \"application/*+json\": {\n              \"schema\": {\n                \"$ref\": \"#/components/schemas/CustomerSearchRequest\"\n              }\n            }\n          },\n          \"x-bodyName\": \"req\"\n        },\n        \"responses\": {\n          \"200\": {\n            \"description\": \"Success\",\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"type\": \"array\",\n                  \"items\": {\n                    \"$ref\": \"#/components/schemas/CustomerSearchResult\"\n                  }\n                }\n              }\n            }\n          },\n          \"400\": {\n            \"description\": \"Bad Request - Validation errors or no search criteria provided\",\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"$ref\": \"#/components/schemas/BadRequestResponse\"\n                }\n              }\n            }\n          },\n          \"401\": {\n            \"description\": \"Invalid API Key\"\n          },\n          \"403\": {\n            \"description\": \"Account not authorized\"\n          },\n          \"500\": {\n            \"description\": \"Something went wrong.\"\n          }\n        }\n      }\n    },\n    \"/customer/by-external-id\": {\n      \"get\": {\n        \"tags\": [\"Customer\"],\n        \"operationId\": \"CustomerBy-external-idGet\",\n        \"parameters\": [\n          {\n            \"name\": \"externalId\",\n            \"in\": \"query\",\n            \"schema\": {\n              \"type\": \"string\"\n            }\n          }\n        ],\n        \"responses\": {\n          \"200\": {\n            \"description\": \"OK\",\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"type\": \"array\",\n                  \"items\": {\n                    \"$ref\": \"#/components/schemas/CustomerSearchResult\"\n                  }\n                }\n              }\n            }\n          },\n          \"400\": {\n            \"description\": \"Bad Request\",\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"$ref\": \"#/components/schemas/BadRequestResponse\"\n                }\n              }\n            }\n          },\n          \"401\": {\n            \"description\": \"Unauthorized\"\n          },\n          \"403\": {\n            \"description\": \"Forbidden\"\n          },\n          \"404\": {\n            \"description\": \"Not Found\"\n          },\n          \"500\": {\n            \"description\": \"Internal Server Error\"\n          }\n        }\n      }\n    },\n    \"/customer-journal\": {\n      \"get\": {\n        \"tags\": [\"CustomerJournal\"],\n        \"summary\": \"Get Customer Journal Entries\",\n        \"description\": \"**Purpose:** Retrieves all journal entries (notes/comments) associated with a specific customer for customer service and account management.\\n\\n**Request Requirements:**\\n- \\\"Customer\\\" role authorization required for customer data operations\\n- Customer ID query parameter required\\n- No request body needed\\n\\n**Response Data:**\\n- Returns array of journal entry objects: `[{ JournalEntry }, ...]`\\n- Array may contain 0 to 100+ entries depending on customer interaction history\\n- Returns empty array `[]` if no journal entries exist for customer (not null)\\n- Includes entry ID, subject, body, and date\\n- Results filtered by customer accessibility to authenticated location\\n\\n**Common Use Cases:**\\n- View interaction history and notes about a customer for customer service\\n- Review previous communications and issues for account management\\n- Maintain audit trail of customer interactions for compliance\\n- Track resolution history and follow-ups for support tickets\\n\\n**Performance & Limits:**\\n- Efficient retrieval for individual customer journal histories\\n- Results scoped to specific customer and location\\n- No pagination needed for typical journal entry volumes\\n\\n**Related Endpoints:**\\n- `POST /customer-journal/create` - Create new journal entries\\n- `POST /customer-journal/update` - Update existing journal entries\\n\\n**Important Notes:**\\n- Customer ID must exist and be accessible to your location\\n- Requires customer validation before retrieving entries\\n- Entries are returned in database order (not explicitly sorted)\",\n        \"operationId\": \"Customer-journalGet\",\n        \"parameters\": [\n          {\n            \"name\": \"customerId\",\n            \"in\": \"query\",\n            \"description\": \"Internal customer ID to retrieve journal entries for - Must exist and be accessible to your location\",\n            \"schema\": {\n              \"type\": \"integer\",\n              \"format\": \"int32\"\n            }\n          }\n        ],\n        \"responses\": {\n          \"200\": {\n            \"description\": \"Success - Returns array of journal entry objects: `[{ JournalEntry }, ...]`\",\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"type\": \"array\",\n                  \"items\": {\n                    \"$ref\": \"#/components/schemas/JournalEntry\"\n                  }\n                }\n              }\n            }\n          },\n          \"400\": {\n            \"description\": \"Bad Request - `BadRequestResponse` object with `message` string field (check `propertyErrors`: null for simple message, array for field-specific errors)\",\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"$ref\": \"#/components/schemas/BadRequestResponse\"\n                }\n              }\n            }\n          },\n          \"401\": {\n            \"description\": \"Unauthorized - Invalid or missing API key\"\n          },\n          \"403\": {\n            \"description\": \"Forbidden - Account not authorized for customer access\"\n          },\n          \"500\": {\n            \"description\": \"Internal Server Error - Server error occurred\"\n          }\n        }\n      }\n    },\n    \"/customer-journal/update\": {\n      \"post\": {\n        \"tags\": [\"CustomerJournal\"],\n        \"summary\": \"Update Customer Journal Entry\",\n        \"description\": \"**Purpose:** Updates an existing journal entry's date, subject, and/or body content for customer service record management.\\n\\n**Request Requirements:**\\n- \\\"Customer\\\" role authorization required for customer data operations\\n- `UpdateJournalEntryRequest` object in request body\\n- Content-Type: application/json\\n- Journal entry must exist and be accessible to your location\\n\\n**Response Data:**\\n- Returns journal entry object: `{ JournalEntry }`\\n- Includes entry ID, updated subject, body, and date\\n- Confirms successful update with complete entry details\\n\\n**Request Body Fields:**\\n- JournalEntryId: The ID of the journal entry to update (required)\\n- Subject: New title or summary for the entry (required)\\n- Body: New detailed content for the entry (required)\\n- Date: New date for the entry (required)\\n\\n**Update Behavior:**\\n- **All fields required**: JournalEntryId, Subject, Body, and Date must all be provided\\n- **Complete replacement**: All entry fields will be updated with provided values\\n- **Validation**: Entry must exist and be accessible to your location\\n\\n**Common Use Cases:**\\n- Fix typos or errors in previously created entries for correction\\n- Add more details to existing notes for additional information\\n- Update resolution status or follow-up information for status updates\\n- Modify entries to meet regulatory requirements for compliance updates\\n\\n**Performance & Limits:**\\n- Single entry update operation for targeted modifications\\n- Immediate validation and response\\n- Changes reflected immediately in journal entry lists\\n\\n**Related Endpoints:**\\n- `GET /customer-journal` - Retrieve journal entries for a customer\\n- `POST /customer-journal/create` - Create new journal entries\\n\\n**Important Notes:**\\n- Journal entry must exist and be accessible to your location\\n- Validation performed before update to ensure data integrity\\n- All request fields are required for successful update\",\n        \"operationId\": \"Customer-journalUpdatePost\",\n        \"requestBody\": {\n          \"description\": \"Journal entry update request with required fields to update - UpdateJournalEntryRequest object\",\n          \"content\": {\n            \"application/json-patch+json\": {\n              \"schema\": {\n                \"$ref\": \"#/components/schemas/UpdateJournalEntryRequest\"\n              }\n            },\n            \"application/json\": {\n              \"schema\": {\n                \"$ref\": \"#/components/schemas/UpdateJournalEntryRequest\"\n              }\n            },\n            \"text/json\": {\n              \"schema\": {\n                \"$ref\": \"#/components/schemas/UpdateJournalEntryRequest\"\n              }\n            },\n            \"application/*+json\": {\n              \"schema\": {\n                \"$ref\": \"#/components/schemas/UpdateJournalEntryRequest\"\n              }\n            }\n          },\n          \"x-bodyName\": \"req\"\n        },\n        \"responses\": {\n          \"200\": {\n            \"description\": \"Success - Returns journal entry object: `{ JournalEntry }`\",\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"$ref\": \"#/components/schemas/JournalEntry\"\n                }\n              }\n            }\n          },\n          \"400\": {\n            \"description\": \"Bad Request - Validation errors or invalid journal entry ID\",\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"$ref\": \"#/components/schemas/BadRequestResponse\"\n                }\n              }\n            }\n          },\n          \"401\": {\n            \"description\": \"Unauthorized - Invalid or missing API key\"\n          },\n          \"403\": {\n            \"description\": \"Forbidden - Account not authorized for customer access\"\n          },\n          \"500\": {\n            \"description\": \"Internal Server Error - Server error occurred\"\n          }\n        }\n      }\n    },\n    \"/customer-journal/create\": {\n      \"post\": {\n        \"tags\": [\"CustomerJournal\"],\n        \"summary\": \"Create Customer Journal Entry\",\n        \"description\": \"**Purpose:** Creates a new journal entry (note/comment) for a specific customer to maintain interaction records and customer service history.\\n\\n**Request Requirements:**\\n- \\\"Customer\\\" role authorization required for customer data operations\\n- `CreateJournalEntryRequest` object in request body\\n- Content-Type: application/json\\n- Customer must exist and be accessible to your location\\n\\n**Response Data:**\\n- Returns journal entry object: `{ JournalEntry }`\\n- Includes assigned entry ID, subject, body, and date\\n- Confirms successful creation with complete entry details\\n\\n**Request Body Fields:**\\n- CustomerId: The customer to create the journal entry for (required)\\n- Subject: Brief title or summary of the entry (required)\\n- Body: Detailed content of the journal entry (required)\\n- Date: When this entry should be dated (required)\\n\\n**Common Use Cases:**\\n- Record interaction details and resolutions for customer service notes\\n- Document changes to customer information for account updates\\n- Log problems and their resolution status for issue tracking\\n- Maintain required interaction records for compliance documentation\\n- Schedule future contact or actions for follow-up reminders\\n\\n**Performance & Limits:**\\n- Single entry creation operation for immediate record keeping\\n- Immediate validation and creation\\n- New entries appear immediately in journal entry lists\\n\\n**Related Endpoints:**\\n- `GET /customer-journal` - Retrieve journal entries for a customer\\n- `POST /customer-journal/update` - Update existing journal entries\\n\\n**Important Notes:**\\n- Customer must exist and be accessible to your location\\n- Validation performed before creation to ensure data integrity\\n- All request fields are required for successful creation\",\n        \"operationId\": \"Customer-journalCreatePost\",\n        \"requestBody\": {\n          \"description\": \"Journal entry creation request with customer ID and entry details - CreateJournalEntryRequest object\",\n          \"content\": {\n            \"application/json-patch+json\": {\n              \"schema\": {\n                \"$ref\": \"#/components/schemas/CreateJournalEntryRequest\"\n              }\n            },\n            \"application/json\": {\n              \"schema\": {\n                \"$ref\": \"#/components/schemas/CreateJournalEntryRequest\"\n              }\n            },\n            \"text/json\": {\n              \"schema\": {\n                \"$ref\": \"#/components/schemas/CreateJournalEntryRequest\"\n              }\n            },\n            \"application/*+json\": {\n              \"schema\": {\n                \"$ref\": \"#/components/schemas/CreateJournalEntryRequest\"\n              }\n            }\n          },\n          \"x-bodyName\": \"req\"\n        },\n        \"responses\": {\n          \"200\": {\n            \"description\": \"Success - Returns journal entry object: `{ JournalEntry }`\",\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"$ref\": \"#/components/schemas/JournalEntry\"\n                }\n              }\n            }\n          },\n          \"400\": {\n            \"description\": \"Bad Request - Validation errors or invalid customer ID\",\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"$ref\": \"#/components/schemas/BadRequestResponse\"\n                }\n              }\n            }\n          },\n          \"401\": {\n            \"description\": \"Unauthorized - Invalid or missing API key\"\n          },\n          \"403\": {\n            \"description\": \"Forbidden - Account not authorized for customer access\"\n          },\n          \"500\": {\n            \"description\": \"Internal Server Error - Server error occurred\"\n          }\n        }\n      }\n    },\n    \"/Deliveries\": {\n      \"get\": {\n        \"tags\": [\"Deliveries\"],\n        \"summary\": \"Get Deliveries\",\n        \"description\": \"**Purpose:** Retrieve delivery status information and order details for cannabis delivery operations and tracking.\\n\\n**Request Requirements:**\\n- \\\"Deliveries\\\" role authorization required for delivery data access\\n- Optional query parameters for filtering and data inclusion\\n- Rate limited to 100 requests per minute\\n- No request body needed\\n\\n**Response Data:**\\n- Returns array of delivery objects: `[{ DeliveryOrderStatus }, ...]`\\n- Array may contain 0 to 100+ deliveries depending on filtering criteria\\n- Returns empty array `[]` if no deliveries match criteria (not null)\\n- Delivery status, timing, and location information included\\n- Optional line item details when includeLineItems=true\\n- Results automatically filtered to authenticated location\\n\\n**Query Parameters:**\\n- PreOrderId: Get delivery status for a specific pre-order (optional)\\n- TransactionId: Get delivery status for a specific transaction (optional)\\n- transactionIds: Get delivery status for multiple transactions (optional array)\\n- deliveryStatus: Filter by delivery status (optional)\\n- includeLineItems: Include detailed line item data (default: false)\\n\\n**Parameter Rules:**\\n- **Mutually Exclusive**: Use only ONE of PreOrderId, TransactionId, transactionIds, or deliveryStatus\\n- **Default Behavior**: If no parameters provided, returns all open deliveries from last 14 days\\n- **Open Definition**: Status of 'filled' or 'received' within the last 14 days\\n- **Line Items**: Only available for packages assigned to orders, not unassigned pre-order items\\n\\n**Delivery Status Values:**\\n- **Placed**: Order has been placed but not yet processed\\n- **Filled**: Order has been fulfilled and packaged for delivery\\n- **Received**: Order has been received by delivery team\\n- **In Transit**: Order is currently being delivered\\n- **Delivered**: Order has been successfully delivered to customer\\n- **Cancelled**: Order has been cancelled\\n\\n**Common Use Cases:**\\n- Monitor delivery status for customer service and tracking\\n- Generate delivery reports for operational management\\n- Track order fulfillment and delivery performance\\n- Provide delivery updates to customers and delivery teams\\n- Integrate with third-party delivery tracking systems\\n\\n**Performance & Limits:**\\n- Rate limited to 100 requests per minute for system protection\\n- Optimized for delivery tracking and status monitoring\\n- Line item data loading is conditional for performance\\n- Results filtered to location scope for operational relevance\\n\\n**Related Endpoints:**\\n- `POST /deliveries/set-route-detail` - Update delivery route and driver information\\n- `GET /drivers` - Get available drivers for delivery assignments\\n- `GET /preorder` - Get pre-order information that may become deliveries\\n\\n**Important Notes:**\\n- **Exclusive Parameters**: Only use one filtering parameter at a time\\n- **Line Item Limitation**: Line items only shown for assigned packages, not pre-order items\\n- **Time Window**: Default query covers last 14 days of open deliveries\\n- **Rate Limiting**: 100 requests per minute limit for delivery tracking operations\\n- **Status Tracking**: Provides real-time delivery status for customer and operational visibility\",\n        \"operationId\": \"DeliveriesGet\",\n        \"parameters\": [\n          {\n            \"name\": \"PreOrderId\",\n            \"in\": \"query\",\n            \"description\": \"Pre-order ID to get delivery status for - Optional, mutually exclusive with other filters\",\n            \"schema\": {\n              \"type\": \"integer\",\n              \"format\": \"int32\"\n            }\n          },\n          {\n            \"name\": \"TransactionId\",\n            \"in\": \"query\",\n            \"description\": \"Transaction ID to get delivery status for - Optional, mutually exclusive with other filters\",\n            \"schema\": {\n              \"type\": \"integer\",\n              \"format\": \"int32\"\n            }\n          },\n          {\n            \"name\": \"transactionIds\",\n            \"in\": \"query\",\n            \"description\": \"Array of transaction IDs to get delivery status for - Optional, mutually exclusive with other filters\",\n            \"schema\": {\n              \"type\": \"array\",\n              \"items\": {\n                \"type\": \"integer\",\n                \"format\": \"int32\"\n              }\n            }\n          },\n          {\n            \"name\": \"includeLineItems\",\n            \"in\": \"query\",\n            \"description\": \"Include detailed line item data in response - Default: false\",\n            \"schema\": {\n              \"type\": \"boolean\",\n              \"default\": false\n            }\n          },\n          {\n            \"name\": \"deliveryStatus\",\n            \"in\": \"query\",\n            \"description\": \"Filter deliveries by status - Optional, mutually exclusive with other filters\",\n            \"schema\": {\n              \"type\": \"string\",\n              \"default\": \"\"\n            }\n          }\n        ],\n        \"responses\": {\n          \"200\": {\n            \"description\": \"Success - Returns array of delivery objects: `[{ DeliveryOrderStatus }, ...]`\",\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"type\": \"array\",\n                  \"items\": {\n                    \"$ref\": \"#/components/schemas/DeliveryOrderStatus\"\n                  }\n                }\n              }\n            }\n          },\n          \"400\": {\n            \"description\": \"Bad Request - `ValidationResult` object with `isValid` boolean, `errors` array, and `ruleSetsExecuted` array\",\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"$ref\": \"#/components/schemas/ValidationResult\"\n                }\n              }\n            }\n          },\n          \"401\": {\n            \"description\": \"Unauthorized - Invalid or missing API key\"\n          },\n          \"403\": {\n            \"description\": \"Forbidden - Account not authorized for delivery access\"\n          },\n          \"500\": {\n            \"description\": \"Internal Server Error - Server error occurred\"\n          }\n        }\n      }\n    },\n    \"/Deliveries/set-route-detail\": {\n      \"post\": {\n        \"tags\": [\"Deliveries\"],\n        \"summary\": \"Set Delivery Route Detail\",\n        \"description\": \"**Purpose:** Update delivery route information including vehicle, driver assignments, route details, and delivery status for operational management.\\n\\n**Request Requirements:**\\n- \\\"Deliveries\\\" role authorization required for delivery operations\\n- `UpdateDeliveryRouteDetailRequest` object in request body with route details\\n- Content-Type: application/json\\n- Rate limited to 100 requests per minute\\n- Valid delivery ID must exist and be accessible to your location\\n\\n**Response Data:**\\n- Returns success confirmation (HTTP 200) upon successful update\\n- No response body content (void return)\\n- Route details are validated and stored for delivery operations\\n\\n\\n**Request Body Fields:**\\n- TransactionId: The delivery transaction to update (required)\\n- DriverId: Primary driver assignment for the delivery (optional)\\n- DriverId2: Secondary driver assignment for the delivery (optional)\\n- VehicleId: Vehicle assigned to the delivery (optional)\\n- Route: Route information or notes (optional)\\n- Status: Delivery status update (optional)\\n\\n**Route Detail Updates:**\\n- **Vehicle Assignment**: Set vehicle ID for the delivery\\n- **Driver Assignment**: Assign primary and optional secondary drivers\\n- **Route Information**: Update route notes or details\\n- **Status Updates**: Modify delivery status\\n\\n**Common Use Cases:**\\n- Assign delivery vehicles and drivers to pending orders\\n- Update delivery routes for optimal efficiency and timing\\n- Modify delivery status as orders progress through fulfillment\\n- Reassign deliveries to different drivers or vehicles\\n- Update delivery information for customer tracking and notifications\\n\\n**Performance & Limits:**\\n- Rate limited to 100 requests per minute for system protection\\n- Single delivery operation for targeted route updates\\n- Immediate validation and storage of route information\\n- Changes propagate to delivery tracking systems immediately\\n\\n**Related Endpoints:**\\n- `GET /deliveries` - Retrieve current delivery status and information\\n- `GET /drivers` - Get available drivers for delivery assignments\\n- `GET /preorder` - Access pre-order information for delivery preparation\\n\\n**Important Notes:**\\n- **Driver and Vehicle IDs**: Must reference valid drivers and vehicles in the system\\n- **Validation**: Request fields are validated before processing updates\\n- **Status Tracking**: Updates enable delivery tracking for operations\\n- **Rate Limiting**: 100 requests per minute limit for delivery management operations\",\n        \"operationId\": \"DeliveriesSet-route-detailPost\",\n        \"requestBody\": {\n          \"description\": \"Delivery route detail update request with transaction ID and delivery information - UpdateDeliveryRouteDetailRequest object\",\n          \"content\": {\n            \"application/json-patch+json\": {\n              \"schema\": {\n                \"$ref\": \"#/components/schemas/UpdateDeliveryRouteDetailRequest\"\n              }\n            },\n            \"application/json\": {\n              \"schema\": {\n                \"$ref\": \"#/components/schemas/UpdateDeliveryRouteDetailRequest\"\n              }\n            },\n            \"text/json\": {\n              \"schema\": {\n                \"$ref\": \"#/components/schemas/UpdateDeliveryRouteDetailRequest\"\n              }\n            },\n            \"application/*+json\": {\n              \"schema\": {\n                \"$ref\": \"#/components/schemas/UpdateDeliveryRouteDetailRequest\"\n              }\n            }\n          },\n          \"x-bodyName\": \"req\"\n        },\n        \"responses\": {\n          \"200\": {\n            \"description\": \"Success - Route details successfully updated\"\n          },\n          \"400\": {\n            \"description\": \"Bad Request - `ValidationResult` object with `isValid` boolean, `errors` array, and `ruleSetsExecuted` array\",\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"$ref\": \"#/components/schemas/ValidationResult\"\n                }\n              }\n            }\n          },\n          \"401\": {\n            \"description\": \"Unauthorized - Invalid or missing API key\"\n          },\n          \"403\": {\n            \"description\": \"Forbidden - Account not authorized for delivery access\"\n          },\n          \"500\": {\n            \"description\": \"Internal Server Error - Server error occurred\"\n          }\n        }\n      }\n    },\n    \"/discounts\": {\n      \"get\": {\n        \"tags\": [\"Discounts\"],\n        \"summary\": \"Get Discounts (Legacy)\",\n        \"description\": \"**Purpose:** Retrieves basic discount information using the legacy data structure with limited configuration details.\\n\\n**LEGACY WARNING:** This endpoint is deprecated. Migrate to `GET /discounts/v2/list` for complete functionality.\\n\\n**Request Requirements:**\\n- \\\"Inventory\\\" role authorization required for discount data access\\n- Optional query parameters for filtering\\n- No request body needed\\n\\n**Response Data:**\\n- Returns array of `PublishedDiscount` objects with basic discount information\\n- Array typically contains 5-50 discounts per location depending on active promotions\\n- Returns empty array `[]` if no discounts are active or configured\\n- Validity dates are converted from Eastern Time to UTC in response\\n- Automatically excludes \\\"Loyalty Multiplier\\\" discount types\\n- Results are filtered by the authenticated location\\n\\n**Key Limitations vs V2:**\\n- Basic response model with limited discount information\\n- Missing detailed reward and constraint configuration\\n- Does not support advanced discount capabilities\\n- Simple inclusion/exclusion data structure only\\n\\n**Common Use Cases:**\\n- Legacy system integrations that cannot be updated immediately\\n- Basic discount display when minimal information is sufficient\\n- Temporary implementations before V2 migration\\n\\n**Performance & Limits:**\\n- Lightweight response for basic discount listing\\n- Filtered results improve response time\\n- Consider V2 endpoint for comprehensive discount data\\n\\n**Related Endpoints:**\\n- `GET /discounts/v2/list` - Recommended enhanced endpoint with complete configuration\\n\\n**Important Notes:**\\n- This endpoint is deprecated and may be removed in future versions\\n- New integrations should use the V2 endpoint\\n- Date conversion assumes Eastern Time input, converts to UTC output\",\n        \"operationId\": \"DiscountsGet\",\n        \"parameters\": [\n          {\n            \"name\": \"includeInactive\",\n            \"in\": \"query\",\n            \"description\": \"Include deleted or inactive discounts in results - Default: false\",\n            \"schema\": {\n              \"type\": \"boolean\",\n              \"default\": false\n            }\n          },\n          {\n            \"name\": \"includeInclusionExclusionData\",\n            \"in\": \"query\",\n            \"description\": \"Include detailed product/category restriction data - Default: false\",\n            \"schema\": {\n              \"type\": \"boolean\",\n              \"default\": false\n            }\n          }\n        ],\n        \"responses\": {\n          \"200\": {\n            \"description\": \"Success - Returns array of basic discount information\",\n            \"content\": {\n              \"text/plain\": {\n                \"schema\": {\n                  \"type\": \"array\",\n                  \"items\": {\n                    \"$ref\": \"#/components/schemas/PublishedDiscount\"\n                  }\n                }\n              },\n              \"application/json\": {\n                \"schema\": {\n                  \"type\": \"array\",\n                  \"items\": {\n                    \"$ref\": \"#/components/schemas/PublishedDiscount\"\n                  }\n                }\n              },\n              \"text/json\": {\n                \"schema\": {\n                  \"type\": \"array\",\n                  \"items\": {\n                    \"$ref\": \"#/components/schemas/PublishedDiscount\"\n                  }\n                }\n              }\n            }\n          },\n          \"401\": {\n            \"description\": \"Unauthorized - Invalid or missing API key\"\n          },\n          \"500\": {\n            \"description\": \"Internal Server Error - Server error occurred\"\n          }\n        }\n      }\n    },\n    \"/discounts/v2/list\": {\n      \"get\": {\n        \"tags\": [\"Discounts\"],\n        \"summary\": \"Get Discounts V2 (Recommended)\",\n        \"description\": \"**Purpose:** Retrieves comprehensive discount information including detailed reward configuration, payment restrictions, and advanced bundling logic.\\n\\n**Request Requirements:**\\n- \\\"Inventory\\\" role authorization required for discount data access\\n- Optional query parameters for enhanced data inclusion\\n- No request body needed\\n\\n**Response Data:**\\n- Returns array of `DiscountApiResponse` objects with complete discount configuration\\n- Array typically contains 5-50 discounts per location depending on active promotions\\n- Returns empty array `[]` if no discounts are active or configured\\n- Validity dates are converted from Eastern Time to UTC in response\\n- Includes detailed reward structure and constraint details\\n- Results are filtered by the authenticated location\\n\\n**Enhanced Features vs Legacy:**\\n- Complete response model with detailed discount configuration\\n- Full discount reward structure and constraint details\\n- Payment method restrictions (credit card, cash, etc.)\\n- Advanced bundle discount logic and stacking configuration\\n- E-commerce menu display configuration and ranking\\n- Optimized data retrieval and processing\\n\\n**Common Use Cases:**\\n- New discount integrations requiring complete configuration data\\n- E-commerce systems needing full discount logic implementation\\n- Point-of-sale systems requiring comprehensive discount rules\\n- Advanced analytics and discount performance analysis\\n- Payment processing systems validating payment method restrictions\\n\\n**Performance & Limits:**\\n- Single request retrieves all discount data efficiently\\n- Optimized processing for large discount configurations\\n- Consider parameter filtering to reduce response size when needed\\n\\n**Related Endpoints:**\\n- `GET /discounts` - Legacy endpoint with basic discount information (deprecated)\\n\\n**Important Notes:**\\n- This is the recommended endpoint for all new integrations\\n- Includes latest discount capabilities and improvements\\n- Date conversion assumes Eastern Time input, converts to UTC output\",\n        \"operationId\": \"DiscountsV2ListGet\",\n        \"parameters\": [\n          {\n            \"name\": \"includeInactive\",\n            \"in\": \"query\",\n            \"description\": \"Include deleted or inactive discounts in results - Default: false\",\n            \"schema\": {\n              \"type\": \"boolean\",\n              \"default\": false\n            }\n          },\n          {\n            \"name\": \"includeInclusionExclusionData\",\n            \"in\": \"query\",\n            \"description\": \"Include detailed product/category restriction data - Default: false\",\n            \"schema\": {\n              \"type\": \"boolean\",\n              \"default\": false\n            }\n          },\n          {\n            \"name\": \"includePaymentRestrictions\",\n            \"in\": \"query\",\n            \"description\": \"Include credit card and payment method restrictions - Default: false\",\n            \"schema\": {\n              \"type\": \"boolean\",\n              \"default\": false\n            }\n          }\n        ],\n        \"responses\": {\n          \"200\": {\n            \"description\": \"Success - Returns array of comprehensive discount configuration objects\",\n            \"content\": {\n              \"text/plain\": {\n                \"schema\": {\n                  \"type\": \"array\",\n                  \"items\": {\n                    \"$ref\": \"#/components/schemas/DiscountApiResponse\"\n                  }\n                }\n              },\n              \"application/json\": {\n                \"schema\": {\n                  \"type\": \"array\",\n                  \"items\": {\n                    \"$ref\": \"#/components/schemas/DiscountApiResponse\"\n                  }\n                }\n              },\n              \"text/json\": {\n                \"schema\": {\n                  \"type\": \"array\",\n                  \"items\": {\n                    \"$ref\": \"#/components/schemas/DiscountApiResponse\"\n                  }\n                }\n              }\n            }\n          },\n          \"401\": {\n            \"description\": \"Unauthorized - Invalid or missing API key\"\n          },\n          \"500\": {\n            \"description\": \"Internal Server Error - Server error occurred\"\n          }\n        }\n      }\n    },\n    \"/drivers\": {\n      \"get\": {\n        \"tags\": [\"Drivers\"],\n        \"summary\": \"Get Drivers\",\n        \"description\": \"**Purpose:** Retrieves the complete list of drivers for the authenticated location for delivery operations and transportation management.\\n\\n**Request Requirements:**\\n- \\\"Reporting\\\" or \\\"Deliveries\\\" role authorization required for driver data access\\n- No query parameters or request body needed\\n\\n**Response Data:**\\n- Response format: `[{ DriverDetail }, { DriverDetail }, ...]`\\n- Array typically contains 2-20 drivers per location\\n- Returns empty array `[]` if no drivers configured for location\\n- Includes driver ID, name, state ID, and driver's license number\\n- Location-specific driver roster for delivery and transportation operations\\n\\n**Common Use Cases:**\\n- Populate driver dropdown lists in delivery assignment systems\\n- Support delivery operations and route management workflows\\n- Validate driver assignments in delivery and transportation systems\\n- Access basic driver information for compliance and operational purposes\\n\\n**Performance & Limits:**\\n- Location-specific driver data filtered to authenticated location\\n- No pagination needed for typical location driver counts\\n- Optimized for delivery operations and transportation management\\n\\n**Related Endpoints:**\\n- `POST /drivers` - Create or update driver information\\n- `GET /deliveries` - Get deliveries that may be assigned to these drivers\\n- Delivery and transportation endpoints that utilize driver assignments\\n\\n**Important Notes:**\\n- Drivers are scoped to location level for operational relevance\\n- Requires Reporting or Deliveries role for access to driver information\\n- Essential for delivery operations and transportation compliance\\n- Driver information includes basic licensing information\\n- Used for delivery assignment and route management\",\n        \"operationId\": \"DriversGet\",\n        \"responses\": {\n          \"200\": {\n            \"description\": \"Success - Returns array of driver objects: `[{ DriverDetail }, ...]`\",\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"type\": \"array\",\n                  \"items\": {\n                    \"$ref\": \"#/components/schemas/DriverDetail\"\n                  }\n                }\n              }\n            }\n          },\n          \"401\": {\n            \"description\": \"Unauthorized - Invalid or missing API key\"\n          },\n          \"403\": {\n            \"description\": \"Forbidden - Account not authorized for driver access\"\n          },\n          \"500\": {\n            \"description\": \"Internal Server Error - Server error occurred\"\n          }\n        }\n      },\n      \"post\": {\n        \"tags\": [\"Drivers\"],\n        \"summary\": \"Create or Update Driver\",\n        \"description\": \"**Purpose:** Creates a new driver or updates existing driver information for delivery operations and transportation management.\\n\\n**Request Requirements:**\\n- \\\"Reporting\\\" or \\\"Deliveries\\\" role authorization required for driver data operations\\n- `DriverDetail` object in request body with driver information\\n- Content-Type: application/json\\n- Driver data must pass validation requirements\\n\\n**Response Data:**\\n- Response format: `200 OK` (no response body)\\n- Returns success confirmation upon successful creation or update\\n- Driver information is validated and stored for operational use\\n- Updates reflected immediately in driver listings and assignments\\n\\n**Request Body Fields:**\\n- DriverId: Driver identifier for updates (0 for new drivers)\\n- Name: Driver's full name (required)\\n- StateId: State identifier for licensing (optional)\\n- DriversLicense: Driver's license number (required)\\n\\n**Create vs Update Behavior:**\\n- **CREATE**: When DriverId is 0 or omitted, creates a new driver record\\n- **UPDATE**: When DriverId is provided with valid driver ID, updates existing driver\\n- **Validation**: All provided data must pass driver validation requirements\\n\\n**Common Use Cases:**\\n- Add new drivers to the delivery team for expanding operations\\n- Update existing driver information when licenses or details change\\n- Maintain accurate driver records for compliance and operational purposes\\n- Support driver onboarding and management workflows\\n\\n**Performance & Limits:**\\n- Single driver operation for targeted updates\\n- Immediate validation and storage\\n- Changes reflected immediately in driver listings\\n- Location-scoped driver management for operational relevance\\n\\n**Related Endpoints:**\\n- `GET /drivers` - Retrieve current driver information\\n- `GET /deliveries` - Get deliveries that may be assigned to drivers\\n- Delivery management endpoints that utilize driver assignments\\n\\n**Important Notes:**\\n- Driver information must pass validation before storage\\n- Drivers are scoped to location level for operational management\\n- Essential for delivery operations and transportation compliance\\n- Basic licensing information required for compliance\\n- Changes immediately available for delivery assignment and scheduling\",\n        \"operationId\": \"DriversPost\",\n        \"requestBody\": {\n          \"description\": \"Driver information to create or update - DriverDetail object with driver details\",\n          \"content\": {\n            \"application/json-patch+json\": {\n              \"schema\": {\n                \"$ref\": \"#/components/schemas/DriverDetail\"\n              }\n            },\n            \"application/json\": {\n              \"schema\": {\n                \"$ref\": \"#/components/schemas/DriverDetail\"\n              }\n            },\n            \"text/json\": {\n              \"schema\": {\n                \"$ref\": \"#/components/schemas/DriverDetail\"\n              }\n            },\n            \"application/*+json\": {\n              \"schema\": {\n                \"$ref\": \"#/components/schemas/DriverDetail\"\n              }\n            }\n          },\n          \"x-bodyName\": \"driver\"\n        },\n        \"responses\": {\n          \"200\": {\n            \"description\": \"Success - Driver successfully created or updated\"\n          },\n          \"400\": {\n            \"description\": \"Bad Request - `ValidationResult` object with `isValid` boolean, `errors` array, and `ruleSetsExecuted` array\",\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"$ref\": \"#/components/schemas/ValidationResult\"\n                }\n              }\n            }\n          },\n          \"401\": {\n            \"description\": \"Unauthorized - Invalid or missing API key\"\n          },\n          \"403\": {\n            \"description\": \"Forbidden - Account not authorized for driver access\"\n          },\n          \"500\": {\n            \"description\": \"Internal Server Error - Server error occurred\"\n          }\n        }\n      }\n    },\n    \"/employees\": {\n      \"get\": {\n        \"tags\": [\"Employees\"],\n        \"summary\": \"Get Employees\",\n        \"description\": \"**Purpose:** Retrieves the complete list of employees for the authenticated organization for staff management and operational workflows.\\n\\n**Request Requirements:**\\n- \\\"Employee\\\" role authorization required for employee data access\\n- No query parameters or request body needed\\n- Rate limited to 300 requests per minute\\n\\n**Response Data:**\\n- Returns array of employee objects: `[{ Employee }, ...]`\\n- Array typically contains 5-100 employees per organization\\n- Returns empty array `[]` if no employees configured (rare)\\n- Includes employee ID, name, location assignments, and permission details\\n- Organization-level employee directory filtered to authenticated organization\\n- Staff information for operational and management purposes\\n\\n**Common Use Cases:**\\n- Populate employee dropdown lists in scheduling and assignment systems\\n- Support staff management and operational workflow assignments\\n- Generate employee directories and contact lists for internal use\\n- Validate employee assignments in transaction and operational systems\\n- Enable staff-based reporting and analytics for management\\n- Support payroll and HR integration systems\\n\\n**Performance & Limits:**\\n- Rate limited to 300 requests per minute for optimal performance\\n- Organization-level employee data filtered to authenticated organization\\n- No pagination needed for typical organization employee counts\\n- Optimized for internal operational and management use cases\\n\\n**Related Endpoints:**\\n- Transaction endpoints that may reference employee assignments\\n- Operational endpoints that utilize employee information\\n- Reporting endpoints that include employee-based analytics\\n\\n**Important Notes:**\\n- Employees are scoped to organization level (LSP) for data security\\n- Requires Employee role authorization for access to sensitive staff information\\n- Rate limiting enforced to protect employee data and system performance\\n- Essential for staff management and operational workflow support\\n- Employee information may be used for transaction tracking and audit trails\\n- Supports internal operational systems and management workflows\",\n        \"operationId\": \"EmployeesGet\",\n        \"responses\": {\n          \"200\": {\n            \"description\": \"Success - Returns array of Employee objects: `[{ Employee }, ...]`\",\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"type\": \"array\",\n                  \"items\": {\n                    \"$ref\": \"#/components/schemas/Employee\"\n                  }\n                }\n              }\n            }\n          },\n          \"401\": {\n            \"description\": \"Unauthorized - Invalid or missing API key\"\n          },\n          \"403\": {\n            \"description\": \"Forbidden - Account not authorized for employee access\"\n          },\n          \"500\": {\n            \"description\": \"Internal Server Error - Server error occurred\"\n          }\n        }\n      }\n    },\n    \"/guestlist\": {\n      \"get\": {\n        \"tags\": [\"GuestList\"],\n        \"summary\": \"Guest List (Active Check-ins)\",\n        \"description\": \"**Purpose:** Retrieves a real-time list of customers currently checked into the dispensary location for queue management and customer service.\\n\\n**Request Requirements:**\\n- \\\"Customer\\\" role authorization required for guest management functions\\n- No query parameters or request body needed\\n\\n**Response Data:**\\n- Returns array of guest objects: `[{ GuestListEntry }, ...]`\\n- Array typically contains 0-50 active guests depending on current business volume\\n- Returns empty array `[]` if no customers are currently checked in\\n- Customer details including name, customer ID, customer type, and contact information\\n- Check-in status with current status and check-in timestamp in UTC\\n- Transaction data with associated transaction ID and reference number\\n- Terminal information showing POS terminal name where check-in occurred\\n- Pre-order source indicating origin of the order (online, walk-in, etc.)\\n- Returns only guests checked into the authenticated location\\n\\n**Data Filtering:**\\n- Real-time data showing only currently active check-ins\\n- Guests who have completed their visit and checked out will not appear\\n- Automatically excludes guests in hidden rooms (administrative areas)\\n- Automatically excludes guests in on-hold rooms (temporary holding areas)\\n- Results filtered to show only the most recent check-in per customer\\n\\n**Common Use Cases:**\\n- Monitor current guest queue and wait times for queue management\\n- Display active customers for budtender assignment on staff dashboards\\n- Maintain records of dispensary occupancy for compliance tracking\\n- Identify guests and their order status for customer service\\n- Track check-in patterns and peak hours for analytics\\n\\n**Performance & Limits:**\\n- Data optimized for real-time display applications\\n- Consider implementing appropriate polling intervals for your use case\\n- Live data reflects current check-in status immediately\\n- Efficient filtering for large guest lists\\n\\n**Related Endpoints:**\\n- `POST /transaction/create-anonymous` - Create anonymous customer check-ins\\n\\n**Important Notes:**\\n- All timestamps are returned in UTC format for consistent processing across time zones\\n- Only shows currently active check-ins; completed visits are excluded\\n- Location-specific data filtered to authenticated dispensary location\\n- Requires customer role authorization for access to guest management functions\",\n        \"operationId\": \"GuestlistGet\",\n        \"responses\": {\n          \"200\": {\n            \"description\": \"Success - Returns array of guest objects: `[{ GuestListEntry }, ...]`\",\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"type\": \"array\",\n                  \"items\": {\n                    \"$ref\": \"#/components/schemas/GuestListEntry\"\n                  }\n                }\n              }\n            }\n          },\n          \"401\": {\n            \"description\": \"Unauthorized - Invalid or missing API key\"\n          },\n          \"403\": {\n            \"description\": \"Forbidden - Account not authorized for customer access\"\n          },\n          \"500\": {\n            \"description\": \"Internal Server Error - Server error occurred\"\n          }\n        }\n      }\n    },\n    \"/harvest\": {\n      \"get\": {\n        \"tags\": [\"Harvest\"],\n        \"summary\": \"Get Harvests\",\n        \"description\": \"**Purpose:** Retrieve harvest records for cannabis cultivation operations including tracking, compliance, and operational management.\\n\\n**Request Requirements:**\\n- Either \\\"Inventory\\\" or \\\"Cultivation\\\" role required for harvest data access\\n- Optional query parameters for filtering and date range selection\\n- No request body needed\\n\\n**Response Data:**\\n- Returns array of `Harvest` objects with comprehensive harvest information\\n- Array may contain 0 to 1,000+ harvests depending on cultivation scale and filtering\\n- Returns empty array `[]` if no harvests match criteria (not null)\\n- Results ordered by last modified date (most recent first)\\n- Harvest details include timing, quantities, strain information, and compliance data\\n- Results automatically filtered to authenticated location\\n\\n**Filtering Options:**\\n- fromLastModifiedDateUTC: Returns harvests modified after this date for incremental sync\\n- toLastModifiedDateUTC: Returns harvests modified before this date for date range filtering\\n- activeHarvests: Filter by harvest status (true=active, false=completed, null=completed only)\\n\\n**Harvest Status Definitions:**\\n- **Active Harvests**: Currently in progress, not yet completed or processed\\n- **Completed Harvests**: Finished harvest operations, ready for processing or completed\\n- **Default Behavior**: Returns completed harvests only when activeHarvests parameter is null\\n\\n**Common Use Cases:**\\n- Monitor harvest progress and completion status for cultivation management\\n- Generate harvest reports for compliance and regulatory reporting\\n- Track harvest yields and timing for operational optimization\\n- Synchronize harvest data with cultivation management systems\\n- Support inventory management and product traceability requirements\\n\\n**Performance & Limits:**\\n- Optimized for cultivation tracking and harvest management workflows\\n- Date range filtering recommended for large cultivation operations\\n- Results sorted by modification date for chronological tracking\\n- Location-scoped results for operational relevance and security\\n\\n**Related Endpoints:**\\n- `POST /harvest` - Create or update individual harvest records\\n- `POST /harvest/bulk` - Create or update multiple harvests efficiently\\n- `GET /inventory` - View products created from harvest operations\\n- Plant and cultivation tracking endpoints for complete workflow\\n\\n**Important Notes:**\\n- **Default Filter**: Returns completed harvests only unless activeHarvests parameter is specified\\n- **Date Filtering**: Use date parameters for incremental sync and performance optimization\\n- **Compliance Tracking**: Harvest records support cannabis regulatory compliance requirements\\n- **Cultivation Integration**: Links with plant tracking and inventory management systems\\n- **Yield Tracking**: Provides harvest quantity and quality data for operational analytics\",\n        \"operationId\": \"HarvestGet\",\n        \"parameters\": [\n          {\n            \"name\": \"fromLastModifiedDateUTC\",\n            \"in\": \"query\",\n            \"description\": \"Filter harvests modified after this date for incremental sync - Optional\",\n            \"schema\": {\n              \"type\": \"string\",\n              \"format\": \"date-time\"\n            }\n          },\n          {\n            \"name\": \"toLastModifiedDateUTC\",\n            \"in\": \"query\",\n            \"description\": \"Filter harvests modified before this date for date range filtering - Optional\",\n            \"schema\": {\n              \"type\": \"string\",\n              \"format\": \"date-time\"\n            }\n          },\n          {\n            \"name\": \"activeHarvests\",\n            \"in\": \"query\",\n            \"description\": \"Filter by harvest status: true=active, false=completed, null=completed only - Default: null (completed only)\",\n            \"schema\": {\n              \"type\": \"boolean\"\n            }\n          }\n        ],\n        \"responses\": {\n          \"200\": {\n            \"description\": \"Success - Returns array of harvest objects: `[{ Harvest }, ...]`\",\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"type\": \"array\",\n                  \"items\": {\n                    \"$ref\": \"#/components/schemas/Harvest\"\n                  }\n                }\n              }\n            }\n          },\n          \"401\": {\n            \"description\": \"Unauthorized - Invalid or missing API key\"\n          },\n          \"403\": {\n            \"description\": \"Forbidden - Account not authorized for cultivation or inventory access\"\n          },\n          \"500\": {\n            \"description\": \"Internal Server Error - Server error occurred\"\n          }\n        }\n      },\n      \"post\": {\n        \"tags\": [\"Harvest\"],\n        \"summary\": \"Create or Update Harvest\",\n        \"description\": \"**Purpose:** Create a new harvest record or update an existing harvest with comprehensive cultivation data for compliance tracking and operational management.\\n\\n**Request Requirements:**\\n- \\\"CultivationWrite\\\" role authorization required for harvest data operations\\n- `CreateOrUpdateHarvest` object in request body with harvest details\\n- Content-Type: application/json\\n- Plant and strain information must be valid and accessible to your location\\n\\n**Response Data:**\\n- Returns single integer harvest ID (not array) for the created or updated harvest\\n- New harvests receive newly assigned harvest ID\\n- Updated harvests return the existing harvest ID\\n- ID can be used for subsequent harvest operations and tracking\\n\\n**Create vs Update Behavior:**\\n- **CREATE**: When HarvestId is null or omitted, a new harvest record will be created\\n- **UPDATE**: When HarvestId is provided with a valid harvest ID, the existing harvest will be updated\\n- **Validation**: Plant and strain data must be valid for both create and update operations\\n- **Compliance**: All harvest data must meet cannabis regulatory requirements\\n\\n**Request Body Fields:**\\n- HarvestId: ID for updates (null for new harvests)\\n- Plant identification and tracking information\\n- Harvest timing and scheduling details\\n- Yield quantities and measurement data\\n- Strain and genetic information\\n- Compliance and regulatory tracking data\\n\\n**Sparse Update Behavior:**\\n- **Provided fields**: Will overwrite existing values with provided data\\n- **Omitted fields**: Will preserve existing values (no data loss for updates)\\n- **Special handling**: Plant and strain associations require valid references\\n- **Validation**: All provided data must meet cultivation and compliance standards\\n\\n**Common Use Cases:**\\n- Record new harvest operations as plants are processed\\n- Update harvest records with final yield and quality data\\n- Maintain compliance with cannabis cultivation tracking requirements\\n- Track harvest timing and efficiency for operational optimization\\n- Link harvests to plant tracking and inventory management systems\\n\\n**Performance & Limits:**\\n- Single harvest operation for targeted tracking\\n- Immediate validation and compliance checking\\n- Changes reflected immediately in harvest listings and reporting\\n- Optimized for cultivation workflow integration\\n\\n**Related Endpoints:**\\n- `GET /harvest` - Retrieve harvest records for review and tracking\\n- `POST /harvest/bulk` - Create or update multiple harvests efficiently\\n- Plant tracking endpoints for complete cultivation workflow\\n- `GET /inventory` - View products created from harvest operations\\n\\n**Important Notes:**\\n- **Compliance Critical**: Harvest records are required for cannabis regulatory compliance\\n- **Plant Tracking**: Must link to valid plant records for traceability\\n- **Yield Accuracy**: Accurate yield data is essential for inventory and compliance\\n- **Timing Tracking**: Harvest dates and timing support compliance reporting\\n- **Bulk Alternative**: Use POST /harvest/bulk for multiple harvest operations\",\n        \"operationId\": \"HarvestPost\",\n        \"requestBody\": {\n          \"description\": \"Harvest information to create or update - CreateOrUpdateHarvest object with harvest details\",\n          \"content\": {\n            \"application/json-patch+json\": {\n              \"schema\": {\n                \"$ref\": \"#/components/schemas/CreateOrUpdateHarvest\"\n              }\n            },\n            \"application/json\": {\n              \"schema\": {\n                \"$ref\": \"#/components/schemas/CreateOrUpdateHarvest\"\n              }\n            },\n            \"text/json\": {\n              \"schema\": {\n                \"$ref\": \"#/components/schemas/CreateOrUpdateHarvest\"\n              }\n            },\n            \"application/*+json\": {\n              \"schema\": {\n                \"$ref\": \"#/components/schemas/CreateOrUpdateHarvest\"\n              }\n            }\n          },\n          \"x-bodyName\": \"req\"\n        },\n        \"responses\": {\n          \"200\": {\n            \"description\": \"Success - Returns harvest ID for created or updated harvest: `integer`\",\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"type\": \"integer\",\n                  \"format\": \"int32\"\n                }\n              }\n            }\n          },\n          \"401\": {\n            \"description\": \"Unauthorized - Invalid or missing API key\"\n          },\n          \"403\": {\n            \"description\": \"Forbidden - Account not authorized for cultivation write access\"\n          },\n          \"500\": {\n            \"description\": \"Internal Server Error - Server error occurred\"\n          }\n        }\n      }\n    },\n    \"/harvest/bulk\": {\n      \"post\": {\n        \"tags\": [\"Harvest\"],\n        \"summary\": \"Bulk Create or Update Harvests\",\n        \"description\": \"**Purpose:** Create or update multiple harvest records in a single operation for efficient cultivation data management and compliance tracking.\\n\\n**Request Requirements:**\\n- \\\"CultivationWrite\\\" role authorization required for harvest data operations\\n- `BulkCreateOrUpdateHarvest` object in request body with array of harvest details\\n- Content-Type: application/json\\n- All plant and strain information must be valid and accessible to your location\\n- Request validation performed before any operations are executed\\n\\n**Response Data:**\\n- Returns single `BulkCreateOrUpdateHarvestResponse` object (not array) with operation results\\n- CreatedHarvestIds: Array of newly created harvest IDs\\n- UpdatedHarvestIds: Array of updated harvest IDs\\n- Success message confirming completion of operations\\n- All operations are atomic - either all succeed or all fail\\n\\n**Create vs Update Behavior:**\\n- **CREATE**: When HarvestId is null or omitted in harvest objects, new harvest records will be created\\n- **UPDATE**: When HarvestId is provided with valid harvest IDs, existing harvests will be updated\\n- **Mixed Operations**: Single request can include both create and update operations\\n- **Validation**: All harvest data must pass validation before any operations are executed\\n- **Atomic Processing**: All operations succeed together or all operations fail together\\n\\n**Request Body Structure:**\\n- Harvests: Array of CreateOrUpdateHarvest objects\\n- Each harvest object contains the same fields as individual harvest operations\\n- Plant identification, timing, yield, strain, and compliance data for each harvest\\n- Mixed create (HarvestId=null) and update (HarvestId=provided) operations supported\\n\\n**Bulk Processing Benefits:**\\n- **Efficiency**: Process multiple harvests in single API call\\n- **Performance**: Optimized database operations for large cultivation operations\\n- **Consistency**: Atomic operations ensure data integrity\\n- **Compliance**: Batch compliance checking and validation\\n- **Convenience**: Simplifies integration for cultivation management systems\\n\\n**Common Use Cases:**\\n- Process multiple harvest operations from cultivation management systems\\n- Synchronize harvest data between external systems and LeafLogix\\n- Update multiple harvest records with final yield and quality data\\n- Import harvest data from spreadsheets or external cultivation tracking\\n- Maintain compliance with cannabis cultivation tracking requirements\\n\\n**Performance & Limits:**\\n- Optimized for bulk cultivation data processing\\n- Atomic transaction processing ensures data consistency\\n- All validation performed before any operations are executed\\n- Efficient for large-scale cultivation operations\\n- Changes reflected immediately in harvest listings and reporting\\n\\n**Related Endpoints:**\\n- `GET /harvest` - Retrieve harvest records for review and tracking\\n- `POST /harvest` - Create or update individual harvest records\\n- Plant tracking endpoints for complete cultivation workflow\\n- `GET /inventory` - View products created from harvest operations\\n\\n**Important Notes:**\\n- **Atomic Operations**: All harvests in the request succeed or fail together\\n- **Validation Required**: Complete validation performed before any processing\\n- **Compliance Critical**: All harvest records must meet cannabis regulatory requirements\\n- **Plant Tracking**: All harvests must link to valid plant records for traceability\\n- **Efficiency**: Preferred method for multiple harvest operations\",\n        \"operationId\": \"HarvestBulkPost\",\n        \"requestBody\": {\n          \"description\": \"Bulk harvest request with array of harvest operations - BulkCreateOrUpdateHarvest object\",\n          \"content\": {\n            \"application/json-patch+json\": {\n              \"schema\": {\n                \"$ref\": \"#/components/schemas/BulkCreateOrUpdateHarvest\"\n              }\n            },\n            \"application/json\": {\n              \"schema\": {\n                \"$ref\": \"#/components/schemas/BulkCreateOrUpdateHarvest\"\n              }\n            },\n            \"text/json\": {\n              \"schema\": {\n                \"$ref\": \"#/components/schemas/BulkCreateOrUpdateHarvest\"\n              }\n            },\n            \"application/*+json\": {\n              \"schema\": {\n                \"$ref\": \"#/components/schemas/BulkCreateOrUpdateHarvest\"\n              }\n            }\n          },\n          \"x-bodyName\": \"req\"\n        },\n        \"responses\": {\n          \"200\": {\n            \"description\": \"Success - Returns bulk harvest response object: `{ BulkCreateOrUpdateHarvestResponse }`\",\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"$ref\": \"#/components/schemas/BulkCreateOrUpdateHarvestResponse\"\n                }\n              }\n            }\n          },\n          \"400\": {\n            \"description\": \"Bad Request - `BadRequestResponse` object with `message` string field (check `propertyErrors`: null for simple message, array for field-specific errors)\",\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"$ref\": \"#/components/schemas/BadRequestResponse\"\n                }\n              }\n            }\n          },\n          \"401\": {\n            \"description\": \"Unauthorized - Invalid or missing API key\"\n          },\n          \"403\": {\n            \"description\": \"Forbidden - Account not authorized for cultivation write access\"\n          },\n          \"500\": {\n            \"description\": \"Internal Server Error - Server error occurred\"\n          }\n        }\n      }\n    },\n    \"/okcomputer\": {\n      \"get\": {\n        \"tags\": [\"HealthCheck\"],\n        \"summary\": \"Health Check Endpoint\",\n        \"description\": \"**Purpose:** Provides a simple health check endpoint to verify the API service is running and responsive.\\n\\n**Request Requirements:**\\n- No authentication or API key required for infrastructure access\\n- AllowAnonymous endpoint for monitoring systems\\n- No query parameters or request body needed\\n\\n**Response Data:**\\n- Returns health status object: `{ SuccessResult }`\\n- HTTP 200 status when the service is healthy\\n- Lightweight JSON response for fast monitoring\\n\\n**Common Use Cases:**\\n- Load balancer health checks to route traffic only to healthy instances\\n- External monitoring services (Pingdom, DataDog) for uptime alerting\\n- Infrastructure monitoring by DevOps teams for service availability\\n- Service verification before making other API calls\\n- Automated health monitoring in deployment pipelines\\n\\n**Performance & Limits:**\\n- Designed to respond quickly with minimal system requirements\\n- No rate limiting applied to health checks\\n- Minimal dependencies to ensure reliable health indication\\n- Optimized for frequent polling by monitoring systems\\n\\n**Related Endpoints:**\\n- No related endpoints - this is a standalone health check\\n\\n**Important Notes:**\\n- This endpoint bypasses normal authentication for infrastructure access\\n- Designed for automated monitoring and load balancer health checks\\n- Simple response format optimized for parsing by monitoring tools\\n- Available on both `/health-check` and `/okcomputer` routes\",\n        \"operationId\": \"OkcomputerGet\",\n        \"responses\": {\n          \"200\": {\n            \"description\": \"Success - Service is healthy and responsive\",\n            \"content\": {\n              \"text/plain\": {\n                \"schema\": {\n                  \"$ref\": \"#/components/schemas/SuccessResult\"\n                }\n              },\n              \"application/json\": {\n                \"schema\": {\n                  \"$ref\": \"#/components/schemas/SuccessResult\"\n                }\n              },\n              \"text/json\": {\n                \"schema\": {\n                  \"$ref\": \"#/components/schemas/SuccessResult\"\n                }\n              }\n            }\n          },\n          \"500\": {\n            \"description\": \"Internal Server Error - Service is experiencing issues\"\n          }\n        }\n      }\n    },\n    \"/integration/integration-recon\": {\n      \"get\": {\n        \"tags\": [\"Integration\"],\n        \"summary\": \"Get Inventory Integration Reconciliation\",\n        \"description\": \"**Purpose:** Retrieve inventory reconciliation data between LeafLogix and external state tracking systems for compliance and integration monitoring.\\n\\n**Request Requirements:**\\n- \\\"Integrations\\\" role authorization required for integration data access\\n- No query parameters or request body needed\\n- Integration management permissions for system reconciliation\\n\\n**Response Data:**\\n- Returns single `InventoryIntegrationReconResponse` object (not array) with reconciliation results\\n- Includes inventory discrepancies and integration status information\\n- State system synchronization details and compliance tracking data\\n- Integration health and data consistency information\\n\\n**Reconciliation Information Included:**\\n- **Inventory Discrepancies**: Items with differences between systems\\n- **Integration Status**: Current state of external system synchronization\\n- **Compliance Data**: Regulatory tracking and audit trail information\\n- **Sync Health**: Integration system connectivity and data flow status\\n\\n**Common Use Cases:**\\n- Monitor inventory synchronization between LeafLogix and state tracking systems\\n- Identify and resolve inventory discrepancies for compliance\\n- Support compliance audits and regulatory reporting requirements\\n- Troubleshoot integration issues and data synchronization problems\\n- Maintain accurate inventory records across integrated systems\\n\\n**Performance & Limits:**\\n- Real-time reconciliation data for immediate integration monitoring\\n- Comprehensive reconciliation across integrated state tracking systems\\n- Optimized for compliance monitoring and integration management workflows\\n- Results include comprehensive integration status and discrepancy details\\n\\n**Related Endpoints:**\\n- `GET /inventory` - View current inventory status for comparison\\n- `GET /plant` - Check plant inventory integration status\\n- `GET /harvest` - Monitor harvest integration synchronization\\n\\n**Important Notes:**\\n- **Compliance Critical**: Essential for regulatory compliance and audit requirements\\n- **Integration Monitoring**: Real-time visibility into external system synchronization\\n- **Complete Data Access**: Provides comprehensive reconciliation across all integrated systems\\n- **State System Integration**: Specific to external state tracking system connectivity\\n- **Audit Ready**: Data formatted for compliance reporting and audit requirements\",\n        \"operationId\": \"IntegrationIntegration-reconGet\",\n        \"responses\": {\n          \"200\": {\n            \"description\": \"Success\",\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"$ref\": \"#/components/schemas/InventoryIntegrationReconResponse\"\n                }\n              }\n            }\n          },\n          \"401\": {\n            \"description\": \"Invalid API Key\"\n          },\n          \"403\": {\n            \"description\": \"Account not authorized\"\n          },\n          \"500\": {\n            \"description\": \"Something went wrong.\"\n          }\n        }\n      }\n    },\n    \"/inventory\": {\n      \"get\": {\n        \"tags\": [\"Inventory\"],\n        \"summary\": \"Get Inventory\",\n        \"description\": \"**Purpose:** Retrieve current inventory levels and product details for API-enabled products with available stock.\\n\\n**Request Requirements:**\\n- \\\"Inventory\\\" role authorization required for inventory data access\\n- Optional query parameters for enhanced data inclusion\\n- No request body needed\\n\\n**Response Data:**\\n- Returns array of `InventoryItem` objects with current stock and product information\\n- Response format: `[{ InventoryItem }, { InventoryItem }, ...]`\\n- Array may contain 0 to 5,000+ inventory items depending on location inventory size\\n- Returns empty array `[]` if no inventory items have stock or meet criteria\\n- Stock levels including available quantities, unit weights, flower equivalent amounts\\n- Product details with SKU, name, description, category, brand, pricing (retail/medical)\\n- Package data including package ID, batch name, package status, expiration dates\\n- Lab results with potency testing, cannabinoid profiles, test dates (when includeLabResults=true)\\n- Room breakdown showing quantities by storage location (when includeRoomQuantities=true)\\n- Compliance data including external package IDs (METRC/BioTrack), strain information, producer details\\n\\n**Filtering Options:**\\n- includeLabResults: Include detailed lab testing data and cannabinoid profiles (default: false)\\n- includeRoomQuantities: Include quantity breakdown by storage room/location (default: false)\\n\\n**Common Use Cases:**\\n- Update online store inventory levels and product availability for e-commerce sync\\n- Perform real-time stock checks during sales transactions for POS integration\\n- Monitor stock levels across multiple storage locations for inventory management\\n- Track package-level inventory for regulatory compliance reporting\\n- Show potency and testing information to customers for lab data display\\n\\n**Performance & Limits:**\\n- Response times optimized for high-volume integrations\\n- Use minimal parameters for fastest response times\\n- Standard rate limits apply for high-volume integrations\\n- Data reflects current system state with real-time accuracy\\n\\n**Related Endpoints:**\\n- `GET /products` - Complete product catalog regardless of stock levels (use for menu/catalog display)\\n\\n**Important Notes:**\\n- Only products enabled for API access are returned for access control\\n- Products with zero inventory are automatically excluded\\n- Results automatically filtered to authenticated user's location only\\n- Inventory data reflects current stock levels with real-time accuracy\",\n        \"operationId\": \"InventoryGet\",\n        \"parameters\": [\n          {\n            \"name\": \"includeLabResults\",\n            \"in\": \"query\",\n            \"description\": \"Include detailed lab testing data and cannabinoid profiles - Default: false\",\n            \"schema\": {\n              \"type\": \"boolean\",\n              \"default\": false\n            }\n          },\n          {\n            \"name\": \"includeRoomQuantities\",\n            \"in\": \"query\",\n            \"description\": \"Include quantity breakdown by storage room/location - Default: false\",\n            \"schema\": {\n              \"type\": \"boolean\",\n              \"default\": false\n            }\n          }\n        ],\n        \"responses\": {\n          \"200\": {\n            \"description\": \"Success - Returns array of inventory items with product and stock details\",\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"type\": \"array\",\n                  \"items\": {\n                    \"$ref\": \"#/components/schemas/InventoryItem\"\n                  }\n                }\n              }\n            }\n          },\n          \"401\": {\n            \"description\": \"Unauthorized - Invalid or missing API key\"\n          },\n          \"403\": {\n            \"description\": \"Forbidden - Account not authorized for inventory access\"\n          },\n          \"500\": {\n            \"description\": \"Internal Server Error - Server error occurred\"\n          }\n        }\n      }\n    },\n    \"/inventory/labresults\": {\n      \"get\": {\n        \"tags\": [\"Inventory\"],\n        \"operationId\": \"InventoryLabresultsGet\",\n        \"parameters\": [\n          {\n            \"name\": \"BatchName\",\n            \"in\": \"query\",\n            \"schema\": {\n              \"type\": \"string\"\n            }\n          }\n        ],\n        \"responses\": {\n          \"200\": {\n            \"description\": \"OK\",\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"type\": \"array\",\n                  \"items\": {\n                    \"$ref\": \"#/components/schemas/LabResult\"\n                  }\n                }\n              }\n            }\n          },\n          \"401\": {\n            \"description\": \"Unauthorized\"\n          },\n          \"403\": {\n            \"description\": \"Forbidden\"\n          },\n          \"500\": {\n            \"description\": \"Internal Server Error\"\n          }\n        }\n      }\n    },\n    \"/inventory/snapshot\": {\n      \"get\": {\n        \"tags\": [\"Inventory\"],\n        \"operationId\": \"InventorySnapshotGet\",\n        \"parameters\": [\n          {\n            \"name\": \"fromDate\",\n            \"in\": \"query\",\n            \"schema\": {\n              \"type\": \"string\",\n              \"format\": \"date-time\"\n            }\n          }\n        ],\n        \"responses\": {\n          \"200\": {\n            \"description\": \"OK\",\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"type\": \"array\",\n                  \"items\": {\n                    \"$ref\": \"#/components/schemas/InventorySnapshot\"\n                  }\n                }\n              }\n            }\n          },\n          \"401\": {\n            \"description\": \"Unauthorized\"\n          },\n          \"403\": {\n            \"description\": \"Forbidden\"\n          },\n          \"500\": {\n            \"description\": \"Internal Server Error\"\n          }\n        }\n      }\n    },\n    \"/inventory/receivedinventory\": {\n      \"get\": {\n        \"tags\": [\"Inventory\"],\n        \"operationId\": \"InventoryReceivedinventoryGet\",\n        \"parameters\": [\n          {\n            \"name\": \"receiveInventoryHistoryId\",\n            \"in\": \"query\",\n            \"schema\": {\n              \"type\": \"integer\",\n              \"format\": \"int32\"\n            }\n          },\n          {\n            \"name\": \"startDate\",\n            \"in\": \"query\",\n            \"schema\": {\n              \"type\": \"string\",\n              \"format\": \"date-time\"\n            }\n          },\n          {\n            \"name\": \"endDate\",\n            \"in\": \"query\",\n            \"schema\": {\n              \"type\": \"string\",\n              \"format\": \"date-time\"\n            }\n          }\n        ],\n        \"responses\": {\n          \"200\": {\n            \"description\": \"OK\",\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"type\": \"array\",\n                  \"items\": {\n                    \"$ref\": \"#/components/schemas/ReceivedInventory\"\n                  }\n                }\n              }\n            }\n          },\n          \"401\": {\n            \"description\": \"Unauthorized\"\n          },\n          \"403\": {\n            \"description\": \"Forbidden\"\n          },\n          \"500\": {\n            \"description\": \"Internal Server Error\"\n          }\n        }\n      }\n    },\n    \"/inventory/inventorytransaction\": {\n      \"get\": {\n        \"tags\": [\"Inventory\"],\n        \"operationId\": \"InventoryInventorytransactionGet\",\n        \"parameters\": [\n          {\n            \"name\": \"startDate\",\n            \"in\": \"query\",\n            \"schema\": {\n              \"type\": \"string\",\n              \"format\": \"date-time\"\n            }\n          },\n          {\n            \"name\": \"endDate\",\n            \"in\": \"query\",\n            \"schema\": {\n              \"type\": \"string\",\n              \"format\": \"date-time\"\n            }\n          },\n          {\n            \"name\": \"transactionType\",\n            \"in\": \"query\",\n            \"schema\": {\n              \"type\": \"string\"\n            }\n          }\n        ],\n        \"responses\": {\n          \"200\": {\n            \"description\": \"OK\",\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"type\": \"array\",\n                  \"items\": {\n                    \"$ref\": \"#/components/schemas/InventoryTransaction\"\n                  }\n                }\n              }\n            }\n          },\n          \"401\": {\n            \"description\": \"Unauthorized\"\n          },\n          \"403\": {\n            \"description\": \"Forbidden\"\n          },\n          \"500\": {\n            \"description\": \"Internal Server Error\"\n          }\n        }\n      }\n    },\n    \"/inventory/receiveinventory\": {\n      \"post\": {\n        \"tags\": [\"Inventory\"],\n        \"summary\": \"Create Receive Inventory Order\",\n        \"description\": \"**Purpose:** Create a new inventory receive order for incoming transfers, purchase orders, or direct inventory additions.\\n\\n**Request Requirements:**\\n- \\\"Inventory\\\" role authorization required for inventory operations\\n- `ReceiveInventorySave` object in request body with vendor and item details\\n- Content-Type: application/json\\n- UserId or UserName required when ReceiveIntoInventory=true\\n\\n**Response Data:**\\n- Response format: `{ SavedReceive }`\\n- Returns transaction ID and processing status information\\n\\n**Processing Options:**\\n- **Draft Mode (ReceiveIntoInventory=false):** Creates a saved receive order that can be opened/edited in LeafLogix\\n- **Direct Processing (ReceiveIntoInventory=true):** Immediately processes items into inventory (requires UserId or UserName)\\n\\n**Required Information:**\\n- **Items Array:** Product details, quantities, costs, room assignments, batch information\\n- **Vendor Information:** VendorId, delivery details, licensing information\\n- **User Context:** UserId or UserName (required when ReceiveIntoInventory=true)\\n\\n**Item Details Required:**\\n- **Product Identification:** ProductId or SKU, product name\\n- **Quantities:** Receive quantity, unit of measure\\n- **Costs:** Unit cost, total cost (for cost tracking)\\n- **Storage:** Room assignment, expiration dates\\n- **Compliance:** Package tags, batch names, lab testing status\\n\\n**Common Use Cases:**\\n- **Transfer Processing:** Receive inventory from other licensed locations\\n- **Purchase Orders:** Process incoming vendor deliveries\\n- **Direct Additions:** Add inventory directly to stock levels\\n- **Compliance Tracking:** Maintain chain of custody for regulatory reporting\\n- **Batch Processing:** Handle multiple items in a single receive transaction\\n\\n**Validation Features:**\\n- **Vendor Verification:** Validates vendor exists and is active\\n- **Room Validation:** Confirms room assignments are valid for location\\n- **Potency Indicators:** Validates required compliance fields\\n- **Duplicate Prevention:** ExternalId checking prevents duplicate receives\\n- **User Authorization:** Verifies user permissions for inventory operations\\n\\n**Important Notes:**\\n- **User Requirement:** UserId or UserName required when ReceiveIntoInventory=true (cannot specify both)\\n- **External ID Uniqueness:** ExternalId must be unique or omitted to prevent duplicates\\n- **Vendor License Support:** Supports vendor license code mapping for compliance requirements\\n- **Location Scoped:** All operations scoped to authenticated user's location\\n- **Enhanced Validation:** Additional validation rules may apply based on location settings\\n\\n**Request Format:**\\nProvide a `ReceiveInventorySave` object containing vendor details, delivery information, and an array of items to receive.\",\n        \"operationId\": \"InventoryReceiveinventoryPost\",\n        \"requestBody\": {\n          \"description\": \"Receive inventory order details including vendor, delivery, and item information\",\n          \"content\": {\n            \"application/json-patch+json\": {\n              \"schema\": {\n                \"$ref\": \"#/components/schemas/ReceiveInventorySave\"\n              }\n            },\n            \"application/json\": {\n              \"schema\": {\n                \"$ref\": \"#/components/schemas/ReceiveInventorySave\"\n              }\n            },\n            \"text/json\": {\n              \"schema\": {\n                \"$ref\": \"#/components/schemas/ReceiveInventorySave\"\n              }\n            },\n            \"application/*+json\": {\n              \"schema\": {\n                \"$ref\": \"#/components/schemas/ReceiveInventorySave\"\n              }\n            }\n          },\n          \"x-bodyName\": \"recInv\"\n        },\n        \"responses\": {\n          \"200\": {\n            \"description\": \"Success - Returns SavedReceive object with transaction details\",\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"$ref\": \"#/components/schemas/SavedReceive\"\n                }\n              }\n            }\n          },\n          \"400\": {\n            \"description\": \"Bad Request - `BadRequestResponse` object with `message` string field (check `propertyErrors`: null for simple message, array for field-specific errors) OR String error message (parse response body as plain text)\",\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"type\": \"string\"\n                }\n              }\n            }\n          },\n          \"401\": {\n            \"description\": \"Unauthorized - Invalid or missing API key\"\n          },\n          \"403\": {\n            \"description\": \"Forbidden - Account not authorized for inventory access\"\n          },\n          \"500\": {\n            \"description\": \"Internal Server Error - Server error occurred\"\n          }\n        }\n      }\n    },\n    \"/lineages\": {\n      \"get\": {\n        \"tags\": [\"Lineage\"],\n        \"summary\": \"Get Lineages\",\n        \"description\": \"**Purpose:** Retrieves the complete list of genetic lineages available for the authenticated organization for product classification and cannabis genetic tracking.\\n\\n**Request Requirements:**\\n- Any authenticated role authorization (no specific role required)\\n- No query parameters or request body needed\\n\\n**Response Data:**\\n- Returns array of lineage objects: `[{ Lineage }, ...]`\\n- Array typically contains 10-50 genetic lineages per organization\\n- Returns empty array `[]` if no lineages configured (rare)\\n- Includes lineage ID, name, and genetic classification details\\n- Cannabis genetic lineages and hereditary information for product categorization\\n- Results filtered to authenticated organization level\\n\\n**Common Use Cases:**\\n- Track genetic lineage and hereditary information for cannabis products\\n- Support compliance reporting with genetic background documentation\\n- Populate lineage dropdown lists in product creation and strain management forms\\n- Validate genetic lineage assignments in product and cultivation systems\\n- Generate lineage-specific reports for cultivation and breeding programs\\n- Enable genetic tracking for quality control and consistency\\n\\n**Performance & Limits:**\\n- Lightweight reference data optimized for frequent access\\n- Small dataset suitable for client-side caching\\n- No pagination needed due to manageable number of genetic lineages\\n- Results consistent across all locations within organization\\n\\n**Related Endpoints:**\\n- `GET /strains` - Get strains that may be associated with these lineages\\n- `GET /products` - Get products with lineage genetic information\\n- Cultivation and breeding endpoints that utilize genetic lineage data\\n\\n**Important Notes:**\\n- Lineages are defined at organization level (LSP) for consistency\\n- Essential for cannabis genetic tracking and breeding program documentation\\n- Used for compliance reporting and genetic background verification\\n- Supports cultivation operations with genetic lineage documentation\\n- May be required for certain cannabis regulations and track-and-trace systems\\n- Helps maintain genetic consistency and quality control in cultivation\",\n        \"operationId\": \"LineagesGet\",\n        \"responses\": {\n          \"200\": {\n            \"description\": \"Success - Returns array of lineage objects: `[{ Lineage }, ...]`\",\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"type\": \"array\",\n                  \"items\": {\n                    \"$ref\": \"#/components/schemas/Lineage\"\n                  }\n                }\n              }\n            }\n          },\n          \"401\": {\n            \"description\": \"Unauthorized - Invalid or missing API key\"\n          },\n          \"403\": {\n            \"description\": \"Forbidden - Account not authorized\"\n          },\n          \"500\": {\n            \"description\": \"Internal Server Error - Server error occurred\"\n          }\n        }\n      }\n    },\n    \"/package/set-tags\": {\n      \"post\": {\n        \"tags\": [\"Package\"],\n        \"summary\": \"Set Package Tags\",\n        \"description\": \"**Purpose:** Set inventory tags for packages, completely replacing any existing tags with the new tag set for organization and tracking.\\n\\n**Request Requirements:**\\n- \\\"PackageWrite\\\" role authorization required for package tag operations\\n- `UpdatePackageTagsRequest` object in request body with package identifiers and tags\\n- Content-Type: application/json\\n- Must specify either InventoryIds OR PackageIds, but not both\\n- All specified packages must be accessible to your location\\n\\n**Response Data:**\\n- Returns success confirmation (HTTP 200) upon successful tag assignment\\n- No response body content (void return)\\n- Tags are validated and applied immediately to specified packages\\n- Changes are reflected immediately in inventory listings and package data\\n\\n**Package Identification Options:**\\n- **InventoryIds**: Target specific inventory records directly (one-to-one relationship)\\n- **PackageIds**: Target packages by serial numbers (may affect multiple inventory records)\\n- **Mutually Exclusive**: Specify either InventoryIds OR PackageIds, never both\\n- **Validation**: Using both types will result in 400 Bad Request error\\n\\n**Tag Operation Behavior:**\\n- **Complete Replacement**: All existing tags are removed and replaced with new tags\\n- **Tag Validation**: All tags must be valid and available in the system\\n- **Immediate Effect**: Changes apply immediately to all specified packages\\n- **Bulk Operation**: Can target multiple packages in a single request\\n\\n**Request Body Fields:**\\n- InventoryIds: Array of inventory record IDs (optional, mutually exclusive with PackageIds)\\n- PackageIds: Array of package serial numbers (optional, mutually exclusive with InventoryIds)\\n- Tags: Array of tag names to apply to the specified packages (required)\\n\\n**Common Use Cases:**\\n- Standardize tag sets across multiple packages for consistency\\n- Replace outdated or incorrect tags with current classification\\n- Implement new tagging schema by completely updating existing tags\\n- Clean up tag sets by removing unwanted tags and setting only desired ones\\n- Maintain organized inventory classification for operational efficiency\\n\\n**Performance & Limits:**\\n- Bulk operation optimized for multiple package updates\\n- Immediate validation and tag assignment\\n- Changes propagate to inventory systems immediately\\n- Efficient for large-scale tag management operations\\n\\n**Related Endpoints:**\\n- `POST /package/add-tags` - Add tags while preserving existing tags\\n- `POST /package/remove-tags` - Remove specific tags while preserving others\\n- `GET /tags` - Retrieve available tag options for validation\\n- `GET /inventory` - View packages with their current tag assignments\\n\\n**Important Notes:**\\n- **Complete Replacement**: This operation removes ALL existing tags and replaces them\\n- **Tag Validation**: All tags must exist in the system and be valid\\n- **Package Access**: All specified packages must be accessible to your authenticated location\\n- **Mutual Exclusion**: Cannot use both InventoryIds and PackageIds in the same request\\n- **Alternative Operations**: Use add-tags or remove-tags for partial tag modifications\",\n        \"operationId\": \"PackageSet-tagsPost\",\n        \"requestBody\": {\n          \"description\": \"Package tag update request with package identifiers and replacement tags - UpdatePackageTagsRequest object\",\n          \"content\": {\n            \"application/json-patch+json\": {\n              \"schema\": {\n                \"$ref\": \"#/components/schemas/UpdatePackageTagsRequest\"\n              }\n            },\n            \"application/json\": {\n              \"schema\": {\n                \"$ref\": \"#/components/schemas/UpdatePackageTagsRequest\"\n              }\n            },\n            \"text/json\": {\n              \"schema\": {\n                \"$ref\": \"#/components/schemas/UpdatePackageTagsRequest\"\n              }\n            },\n            \"application/*+json\": {\n              \"schema\": {\n                \"$ref\": \"#/components/schemas/UpdatePackageTagsRequest\"\n              }\n            }\n          },\n          \"x-bodyName\": \"req\"\n        },\n        \"responses\": {\n          \"200\": {\n            \"description\": \"Success - Tags successfully set on specified packages\"\n          },\n          \"400\": {\n            \"description\": \"Bad Request - `ValidationResult` object with `isValid` boolean, `errors` array, and `ruleSetsExecuted` array\",\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"$ref\": \"#/components/schemas/ValidationResult\"\n                }\n              }\n            }\n          },\n          \"401\": {\n            \"description\": \"Invalid API Key\"\n          },\n          \"403\": {\n            \"description\": \"Account not authorized\"\n          },\n          \"500\": {\n            \"description\": \"Something went wrong.\"\n          }\n        }\n      }\n    },\n    \"/package/add-tags\": {\n      \"post\": {\n        \"tags\": [\"Package\"],\n        \"summary\": \"Add Package Tags\",\n        \"description\": \"**Purpose:** Add new inventory tags to packages while preserving all existing tags for enhanced organization and classification.\\n\\n**Request Requirements:**\\n- \\\"PackageWrite\\\" role authorization required for package tag operations\\n- `UpdatePackageTagsRequest` object in request body with package identifiers and tags\\n- Content-Type: application/json\\n- Must specify either InventoryIds OR PackageIds, but not both\\n- All specified packages must be accessible to your location\\n\\n**Response Data:**\\n- Returns success confirmation (HTTP 200) upon successful tag addition\\n- No response body content (void return)\\n- New tags are validated and added immediately to specified packages\\n- Changes are reflected immediately in inventory listings and package data\\n\\n**Package Identification Options:**\\n- **InventoryIds**: Target specific inventory records directly (one-to-one relationship)\\n- **PackageIds**: Target packages by serial numbers (may affect multiple inventory records)\\n- **Mutually Exclusive**: Specify either InventoryIds OR PackageIds, never both\\n- **Validation**: Using both types will result in 400 Bad Request error\\n\\n**Tag Operation Behavior:**\\n- **Additive Operation**: New tags are added while preserving all existing tags\\n- **Duplicate Handling**: Duplicate tags are automatically ignored (no error)\\n- **Tag Validation**: All new tags must be valid and available in the system\\n- **Immediate Effect**: Changes apply immediately to all specified packages\\n- **Bulk Operation**: Can target multiple packages in a single request\\n\\n**Request Body Fields:**\\n- InventoryIds: Array of inventory record IDs (optional, mutually exclusive with PackageIds)\\n- PackageIds: Array of package serial numbers (optional, mutually exclusive with InventoryIds)\\n- Tags: Array of tag names to add to the specified packages (required)\\n\\n**Common Use Cases:**\\n- Add seasonal or promotional tags to existing products without losing current classification\\n- Enhance product categorization by adding supplementary organizational tags\\n- Apply new quality control or testing tags while maintaining existing product tags\\n- Add compliance or regulatory tags for audit trails without disrupting inventory organization\\n- Implement progressive tagging workflows where tags are added over time\\n\\n**Performance & Limits:**\\n- Bulk operation optimized for multiple package updates\\n- Immediate validation and tag addition\\n- Changes propagate to inventory systems immediately\\n- Efficient for incremental tag management operations\\n\\n**Related Endpoints:**\\n- `POST /package/set-tags` - Replace all existing tags with new tag set\\n- `POST /package/remove-tags` - Remove specific tags while preserving others\\n- `GET /tags` - Retrieve available tag options for validation\\n- `GET /inventory` - View packages with their current tag assignments\\n\\n**Important Notes:**\\n- **Preserves Existing**: This operation keeps ALL existing tags and adds new ones\\n- **Duplicate Safe**: Adding tags that already exist will not cause errors\\n- **Tag Validation**: All new tags must exist in the system and be valid\\n- **Package Access**: All specified packages must be accessible to your authenticated location\\n- **Mutual Exclusion**: Cannot use both InventoryIds and PackageIds in the same request\",\n        \"operationId\": \"PackageAdd-tagsPost\",\n        \"requestBody\": {\n          \"description\": \"Package tag update request with package identifiers and additional tags - UpdatePackageTagsRequest object\",\n          \"content\": {\n            \"application/json-patch+json\": {\n              \"schema\": {\n                \"$ref\": \"#/components/schemas/UpdatePackageTagsRequest\"\n              }\n            },\n            \"application/json\": {\n              \"schema\": {\n                \"$ref\": \"#/components/schemas/UpdatePackageTagsRequest\"\n              }\n            },\n            \"text/json\": {\n              \"schema\": {\n                \"$ref\": \"#/components/schemas/UpdatePackageTagsRequest\"\n              }\n            },\n            \"application/*+json\": {\n              \"schema\": {\n                \"$ref\": \"#/components/schemas/UpdatePackageTagsRequest\"\n              }\n            }\n          },\n          \"x-bodyName\": \"req\"\n        },\n        \"responses\": {\n          \"200\": {\n            \"description\": \"Success - Tags successfully added to specified packages\"\n          },\n          \"400\": {\n            \"description\": \"Bad Request - `ValidationResult` object with `isValid` boolean, `errors` array, and `ruleSetsExecuted` array\"\n          },\n          \"401\": {\n            \"description\": \"Invalid API Key\"\n          },\n          \"403\": {\n            \"description\": \"Account not authorized\"\n          },\n          \"500\": {\n            \"description\": \"Something went wrong.\"\n          }\n        }\n      }\n    },\n    \"/package/remove-tags\": {\n      \"post\": {\n        \"tags\": [\"Package\"],\n        \"summary\": \"Remove Package Tags\",\n        \"description\": \"**Purpose:** Remove specific inventory tags from packages while preserving all other existing tags for selective tag management.\\n\\n**Request Requirements:**\\n- \\\"PackageWrite\\\" role authorization required for package tag operations\\n- `UpdatePackageTagsRequest` object in request body with package identifiers and tags to remove\\n- Content-Type: application/json\\n- Must specify either InventoryIds OR PackageIds, but not both\\n- All specified packages must be accessible to your location\\n\\n**Response Data:**\\n- Returns success confirmation (HTTP 200) upon successful tag removal\\n- No response body content (void return)\\n- Specified tags are removed immediately from specified packages\\n- Changes are reflected immediately in inventory listings and package data\\n\\n**Package Identification Options:**\\n- **InventoryIds**: Target specific inventory records directly (one-to-one relationship)\\n- **PackageIds**: Target packages by serial numbers (may affect multiple inventory records)\\n- **Mutually Exclusive**: Specify either InventoryIds OR PackageIds, never both\\n- **Validation**: Using both types will result in 400 Bad Request error\\n\\n**Tag Operation Behavior:**\\n- **Selective Removal**: Only specified tags are removed, all others are preserved\\n- **Missing Tag Handling**: Removing tags that don't exist is silently ignored (no error)\\n- **Immediate Effect**: Changes apply immediately to all specified packages\\n- **Bulk Operation**: Can target multiple packages in a single request\\n- **Preservation**: All non-specified tags remain unchanged\\n\\n**Request Body Fields:**\\n- InventoryIds: Array of inventory record IDs (optional, mutually exclusive with PackageIds)\\n- PackageIds: Array of package serial numbers (optional, mutually exclusive with InventoryIds)\\n- Tags: Array of tag names to remove from the specified packages (required)\\n\\n**Common Use Cases:**\\n- Remove outdated seasonal or promotional tags while keeping product classification\\n- Clean up temporary testing or quality control tags after completion\\n- Remove incorrect or duplicate tags while preserving accurate classification\\n- Implement tag lifecycle management by removing obsolete organizational tags\\n- Support compliance workflows by removing temporary audit or review tags\\n\\n**Performance & Limits:**\\n- Bulk operation optimized for multiple package updates\\n- Immediate tag removal processing\\n- Changes propagate to inventory systems immediately\\n- Efficient for selective tag cleanup operations\\n\\n**Related Endpoints:**\\n- `POST /package/set-tags` - Replace all existing tags with new tag set\\n- `POST /package/add-tags` - Add new tags while preserving existing tags\\n- `GET /tags` - Retrieve available tag options for validation\\n- `GET /inventory` - View packages with their current tag assignments\\n\\n**Important Notes:**\\n- **Preserves Others**: This operation keeps ALL non-specified tags unchanged\\n- **Missing Tag Safe**: Removing tags that don't exist will not cause errors\\n- **Package Access**: All specified packages must be accessible to your authenticated location\\n- **Mutual Exclusion**: Cannot use both InventoryIds and PackageIds in the same request\\n- **Selective Operation**: Use for precise tag management without affecting other classification\",\n        \"operationId\": \"PackageRemove-tagsPost\",\n        \"requestBody\": {\n          \"description\": \"Package tag update request with package identifiers and tags to remove - UpdatePackageTagsRequest object\",\n          \"content\": {\n            \"application/json-patch+json\": {\n              \"schema\": {\n                \"$ref\": \"#/components/schemas/UpdatePackageTagsRequest\"\n              }\n            },\n            \"application/json\": {\n              \"schema\": {\n                \"$ref\": \"#/components/schemas/UpdatePackageTagsRequest\"\n              }\n            },\n            \"text/json\": {\n              \"schema\": {\n                \"$ref\": \"#/components/schemas/UpdatePackageTagsRequest\"\n              }\n            },\n            \"application/*+json\": {\n              \"schema\": {\n                \"$ref\": \"#/components/schemas/UpdatePackageTagsRequest\"\n              }\n            }\n          },\n          \"x-bodyName\": \"req\"\n        },\n        \"responses\": {\n          \"200\": {\n            \"description\": \"Success - Tags successfully removed from specified packages\"\n          },\n          \"400\": {\n            \"description\": \"Bad Request - `ValidationResult` object with `isValid` boolean, `errors` array, and `ruleSetsExecuted` array\"\n          },\n          \"401\": {\n            \"description\": \"Invalid API Key\"\n          },\n          \"403\": {\n            \"description\": \"Account not authorized\"\n          },\n          \"500\": {\n            \"description\": \"Something went wrong.\"\n          }\n        }\n      }\n    },\n    \"/plant\": {\n      \"get\": {\n        \"tags\": [\"Plant\"],\n        \"summary\": \"Get Plants\",\n        \"description\": \"**Purpose:** Retrieve cannabis plant records for cultivation tracking, compliance monitoring, and operational management.\\n\\n**Request Requirements:**\\n- \\\"Inventory\\\" or \\\"Cultivation\\\" role authorization required for plant data access\\n- Optional query parameters for filtering by plant attributes and date ranges\\n- No request body needed\\n\\n**Response Data:**\\n- Response format: `[{ Plant }, { Plant }, ...]`\\n- Returns array of `Plant` objects with comprehensive plant information\\n- Array may contain 0 to 10,000+ plants depending on cultivation scale and filtering\\n- Returns empty array `[]` if no plants match criteria (not null)\\n- Plant details include identification, growth status, cultivation tracking, and compliance data\\n- Results automatically filtered to authenticated location\\n\\n**Filtering Options:**\\n- plantId: Filter by specific LeafLogix internal plant ID for individual plant lookup\\n- serialNumber: Filter by plant serial number for tracking system integration\\n- status: Filter by plant status (Active, Harvesting, Harvested, Retired)\\n- lastModifiedDateStart: Returns plants modified after this date for incremental sync\\n- lastModifiedDateEnd: Returns plants modified before this date for date range filtering\\n\\n**Plant Status Definitions:**\\n- **Active**: Plants currently growing and under cultivation\\n- **Harvesting**: Plants currently being harvested or in harvest process\\n- **Harvested**: Plants that have completed harvest operations\\n- **Retired**: Plants that have been retired from cultivation (destroyed, failed, etc.)\\n\\n**Common Use Cases:**\\n- Monitor plant growth progress and cultivation status for operational management\\n- Generate compliance reports for regulatory tracking and auditing\\n- Synchronize plant data with cultivation management and tracking systems\\n- Track plant lifecycle from cultivation through harvest completion\\n- Support inventory management and product traceability requirements\\n\\n**Performance & Limits:**\\n- Optimized for cultivation tracking and plant management workflows\\n- Date range filtering recommended for large cultivation operations\\n- Plant status filtering efficient for operational dashboards\\n- Location-scoped results for operational relevance and security\\n\\n**Related Endpoints:**\\n- `POST /plant/harvest` - Move plants into harvest status\\n- `POST /harvest` - Create harvest records for harvested plants\\n- `GET /inventory` - View products created from harvested plants\\n- Plant lifecycle and cultivation management endpoints\\n\\n**Important Notes:**\\n- **Compliance Tracking**: Plant records support cannabis regulatory compliance requirements\\n- **Lifecycle Management**: Tracks complete plant lifecycle from cultivation to harvest\\n- **Date Filtering**: Use date parameters for incremental sync and performance optimization\\n- **Status Filtering**: Essential for operational workflows and cultivation management\\n- **Traceability**: Links with harvest and inventory systems for complete product tracking\",\n        \"operationId\": \"PlantGet\",\n        \"parameters\": [\n          {\n            \"name\": \"plantId\",\n            \"in\": \"query\",\n            \"description\": \"Dutchie internal plant ID for specific plant lookup - Optional\",\n            \"schema\": {\n              \"type\": \"integer\",\n              \"format\": \"int32\"\n            }\n          },\n          {\n            \"name\": \"serialNumber\",\n            \"in\": \"query\",\n            \"description\": \"Plant serial number for tracking system integration - Optional\",\n            \"schema\": {\n              \"type\": \"string\"\n            }\n          },\n          {\n            \"name\": \"status\",\n            \"in\": \"query\",\n            \"description\": \"Plant status filter: Active, Harvesting, Harvested, Retired - Optional\",\n            \"schema\": {\n              \"type\": \"string\"\n            }\n          },\n          {\n            \"name\": \"lastModifiedDateStart\",\n            \"in\": \"query\",\n            \"description\": \"Filter plants modified after this date for incremental sync - Optional\",\n            \"schema\": {\n              \"type\": \"string\",\n              \"format\": \"date-time\"\n            }\n          },\n          {\n            \"name\": \"lastModifiedDateEnd\",\n            \"in\": \"query\",\n            \"description\": \"Filter plants modified before this date for date range filtering - Optional\",\n            \"schema\": {\n              \"type\": \"string\",\n              \"format\": \"date-time\"\n            }\n          }\n        ],\n        \"responses\": {\n          \"200\": {\n            \"description\": \"Success\",\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"type\": \"array\",\n                  \"items\": {\n                    \"$ref\": \"#/components/schemas/Plant\"\n                  }\n                }\n              }\n            }\n          },\n          \"401\": {\n            \"description\": \"Invalid API Key\"\n          },\n          \"403\": {\n            \"description\": \"Account not authorized\"\n          },\n          \"500\": {\n            \"description\": \"Something went wrong.\"\n          }\n        }\n      },\n      \"post\": {\n        \"tags\": [\"Plant\"],\n        \"summary\": \"Add Plant\",\n        \"description\": \"**Purpose:** Create a new cannabis plant record in the cultivation system with unique identification and tracking for compliance monitoring and operational management.\\n\\n**Request Requirements:**\\n- \\\"Inventory\\\" or \\\"Cultivation\\\" role authorization required for plant creation operations\\n- `CreatePlantRequest` object in request body with plant identification and group details\\n- Content-Type: application/json\\n- Serial number must be unique within the facility\\n- Plant group must exist or strain must be provided for new group creation\\n\\n**Response Data:**\\n- Response format: `int` (Plant ID)\\n- Returns the newly created plant's unique LeafLogix plant ID\\n- Plant ID can be used in subsequent plant management operations\\n- Immediate plant creation with tracking system integration\\n\\n**Request Body Fields:**\\n- `PlantGroupName`: Name of plant group for batch tracking (required)\\n- `SerialNumber`: Unique plant identifier for compliance tracking (required, must be unique)\\n- `Strain`: Strain name for new plant groups (required when creating new plant group)\\n- `Room`: Cultivation room name for plant location (required when using state integrations)\\n- `BypassStateIntegration`: Skip external system integration (optional, default: false)\\n- `DateCreated`: Plant creation date (optional, defaults to current UTC time)\\n- `PhaseStartDate`: Initial growth phase start date (optional, defaults to current UTC time)\\n\\n**Plant Group Behavior:**\\n- **Existing Groups**: If plant group exists, strain information is inherited\\n- **New Groups**: If plant group doesn't exist, strain must be provided for group creation\\n- **Batch Tracking**: Plant groups enable batch-based cultivation tracking and compliance\\n- **Strain Assignment**: All plants in a group share the same strain genetics\\n\\n**Validation Rules:**\\n- **Serial Number**: Must be unique across the facility for compliance tracking\\n- **Plant Group**: Required for batch organization and cultivation management\\n- **Strain Requirement**: Must provide strain when creating new plant groups\\n- **Room Validation**: Room name must exist and be accessible when using integrations\\n- **State Integration**: Room required unless bypassing external system integration\\n\\n**Common Use Cases:**\\n- Register new clones or seedlings entering the cultivation facility\\n- Create plant records for compliance tracking and regulatory reporting\\n- Initialize plant tracking for cultivation workflow management\\n- Support batch-based cultivation and harvest planning\\n- Integrate with external cultivation and compliance systems\\n\\n**Performance & Limits:**\\n- Single plant creation for precise record management\\n- Immediate validation and unique identifier assignment\\n- Optional integration with external cultivation systems\\n- Efficient for individual plant registration workflows\\n\\n**Related Endpoints:**\\n- `GET /plant` - Retrieve created plant information and status\\n- `POST /plant/assign-plants-to-group` - Assign existing plants to groups\\n- `POST /plant/move` - Move plants between cultivation rooms\\n- Plant lifecycle management endpoints for complete workflow\\n\\n**Important Notes:**\\n- **Unique Tracking**: Serial numbers must be unique for compliance and tracking\\n- **Compliance Critical**: Plant registration is required for cannabis regulatory compliance\\n- **Group Management**: Plant groups support batch-based cultivation workflows\\n- **Integration**: External system integration supports cultivation management platforms\\n- **Immediate Processing**: Plant creation is immediate with tracking system updates\",\n        \"operationId\": \"PlantPost\",\n        \"requestBody\": {\n          \"description\": \"Plant creation request with identification and group details - see `CreatePlantRequest` model for complete field documentation\",\n          \"content\": {\n            \"application/json-patch+json\": {\n              \"schema\": {\n                \"$ref\": \"#/components/schemas/CreatePlantRequest\"\n              }\n            },\n            \"application/json\": {\n              \"schema\": {\n                \"$ref\": \"#/components/schemas/CreatePlantRequest\"\n              }\n            },\n            \"text/json\": {\n              \"schema\": {\n                \"$ref\": \"#/components/schemas/CreatePlantRequest\"\n              }\n            },\n            \"application/*+json\": {\n              \"schema\": {\n                \"$ref\": \"#/components/schemas/CreatePlantRequest\"\n              }\n            }\n          },\n          \"x-bodyName\": \"request\"\n        },\n        \"responses\": {\n          \"200\": {\n            \"description\": \"Success - Returns newly created plant ID as integer\",\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"type\": \"integer\",\n                  \"format\": \"int32\"\n                }\n              }\n            }\n          },\n          \"400\": {\n            \"description\": \"Bad Request - Validation errors or duplicate serial number\",\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"type\": \"object\"\n                }\n              }\n            }\n          },\n          \"401\": {\n            \"description\": \"Invalid API Key\"\n          },\n          \"403\": {\n            \"description\": \"Account not authorized\"\n          },\n          \"500\": {\n            \"description\": \"Something went wrong.\"\n          }\n        }\n      }\n    },\n    \"/plant/harvest\": {\n      \"post\": {\n        \"tags\": [\"Plant\"],\n        \"summary\": \"Harvest Plants\",\n        \"description\": \"**Purpose:** Move plants from cultivation into harvest status with optional weight tracking for cannabis cultivation compliance and operational management.\\n\\n**Request Requirements:**\\n- \\\"CultivationWrite\\\" role authorization required for plant harvest operations\\n- `HarvestPlantRequest` object in request body with plant identifiers and harvest details\\n- Content-Type: application/json\\n- Rate limited to 300 requests per minute\\n- All specified plants must be accessible to your location and in valid status for harvesting\\n\\n**Response Data:**\\n- Response format: No response body (void)\\n- Returns success confirmation (HTTP 200) upon successful harvest initiation\\n- No response body content (void return)\\n- Plants are moved to harvesting status immediately\\n- Changes are reflected immediately in plant listings and cultivation tracking\\n\\n**Request Body Fields:**\\n- Plant identifiers for the plants to be harvested\\n- Optional wet weight measurements for harvest tracking\\n- Harvest timing and operational details\\n- Compliance and tracking information required for regulatory reporting\\n\\n**Harvest Operation Behavior:**\\n- **Status Change**: Plants are moved from Active to Harvesting status\\n- **Weight Tracking**: Optional wet weight can be recorded for yield tracking\\n- **Bulk Processing**: Multiple plants can be harvested in a single operation\\n- **Compliance**: All operations logged for regulatory compliance requirements\\n- **Immediate Effect**: Status changes apply immediately to all specified plants\\n\\n**Common Use Cases:**\\n- Initiate harvest operations for mature cannabis plants ready for processing\\n- Record harvest timing and initial weight measurements for yield tracking\\n- Maintain compliance with cannabis cultivation and harvest regulations\\n- Support cultivation workflow transitions from growing to processing phases\\n- Track harvest operations for operational efficiency and planning\\n\\n**Performance & Limits:**\\n- Rate limited to 300 requests per minute for cultivation workflow protection\\n- Bulk operation optimized for multiple plant processing\\n- Immediate status updates and tracking system integration\\n- Efficient for large-scale cultivation harvest operations\\n\\n**Related Endpoints:**\\n- `GET /plant` - Retrieve plant records and current status\\n- `POST /harvest` - Create harvest records for tracking and compliance\\n- `GET /harvest` - Monitor harvest progress and completion status\\n- Cultivation and inventory management endpoints for complete workflow\\n\\n**Important Notes:**\\n- **Status Requirements**: Plants must be in Active status to be harvested\\n- **Compliance Critical**: Harvest operations are required for cannabis regulatory compliance\\n- **Weight Tracking**: Wet weight measurements support yield tracking and compliance\\n- **Rate Limiting**: 300 requests per minute limit for cultivation workflow stability\\n- **Immediate Processing**: Status changes are immediate and irreversible through this endpoint\",\n        \"operationId\": \"PlantHarvestPost\",\n        \"requestBody\": {\n          \"description\": \"Plant harvest request with plant identifiers and optional weight data - HarvestPlantRequest object\",\n          \"content\": {\n            \"application/json-patch+json\": {\n              \"schema\": {\n                \"$ref\": \"#/components/schemas/HarvestPlantRequest\"\n              }\n            },\n            \"application/json\": {\n              \"schema\": {\n                \"$ref\": \"#/components/schemas/HarvestPlantRequest\"\n              }\n            },\n            \"text/json\": {\n              \"schema\": {\n                \"$ref\": \"#/components/schemas/HarvestPlantRequest\"\n              }\n            },\n            \"application/*+json\": {\n              \"schema\": {\n                \"$ref\": \"#/components/schemas/HarvestPlantRequest\"\n              }\n            }\n          },\n          \"x-bodyName\": \"req\"\n        },\n        \"responses\": {\n          \"200\": {\n            \"description\": \"Success - Plants successfully moved to harvest status\"\n          },\n          \"401\": {\n            \"description\": \"Invalid API Key\"\n          },\n          \"403\": {\n            \"description\": \"Account not authorized\"\n          },\n          \"500\": {\n            \"description\": \"Something went wrong.\"\n          }\n        }\n      }\n    },\n    \"/plant/move\": {\n      \"post\": {\n        \"tags\": [\"Plant\"],\n        \"summary\": \"Move Plants\",\n        \"description\": \"**Purpose:** Move cannabis plants to a different room or cultivation area within the same facility for cultivation workflow management and compliance tracking.\\n\\n**Request Requirements:**\\n- \\\"CultivationWrite\\\" role authorization required for plant movement operations\\n- `MovePlantRequest` object in request body with plant IDs and target room information\\n- Content-Type: application/json\\n- All specified plants must be accessible to your location and in moveable status\\n- Target room must be within the same facility (location)\\n\\n**Response Data:**\\n- Response format: No response body (void)\\n- Returns success confirmation (HTTP 200) upon successful plant movement\\n- No response body content (void return)\\n- Plants are moved to new room immediately\\n- Changes are reflected immediately in plant location tracking\\n\\n**Request Body Fields:**\\n- `PlantIds`: Array of LeafLogix plant IDs to move (required)\\n- `RoomId`: Target room ID within the same facility (required)\\n- `TableId`: Optional table assignment within the target room\\n\\n**Movement Operation Behavior:**\\n- **Location Validation**: Target room must belong to the same facility\\n- **Bulk Processing**: Multiple plants can be moved in a single operation\\n- **Stage Updates**: If target room has cultivation stage, plants automatically update to that stage\\n- **Compliance**: All movement operations logged for regulatory compliance requirements\\n- **Integration**: Movement synchronized with external cultivation systems when configured\\n\\n**Common Use Cases:**\\n- Move plants between cultivation rooms as they progress through growth stages\\n- Relocate plants for environmental optimization and cultivation management\\n- Transfer plants to harvest preparation areas when ready for processing\\n- Support cultivation workflow automation and plant lifecycle management\\n- Maintain compliance with cannabis cultivation and tracking regulations\\n\\n**Performance & Limits:**\\n- Bulk operation optimized for multiple plant processing\\n- Immediate location updates and tracking system integration\\n- Efficient for large-scale cultivation facility operations\\n- Location validation prevents cross-facility security violations\\n\\n**Related Endpoints:**\\n- `GET /plant` - Retrieve current plant locations and status\\n- `POST /plant/change-phase` - Update growth phases when moving between rooms\\n- `GET /room` - List available rooms for plant movement planning\\n- Cultivation management endpoints for complete workflow\\n\\n**Important Notes:**\\n- **Facility Restriction**: Plants cannot be moved to rooms in different facilities\\n- **Compliance Critical**: Plant movements are required for cannabis regulatory compliance\\n- **Stage Automation**: Room-specific cultivation stages applied automatically when configured\\n- **Immediate Processing**: Location changes are immediate and tracked for audit purposes\\n- **Integration**: Movement synchronized with external cultivation and compliance systems\",\n        \"operationId\": \"PlantMovePost\",\n        \"requestBody\": {\n          \"description\": \"Plant movement request with plant IDs and target room information - see `MovePlantRequest` model for complete field documentation\",\n          \"content\": {\n            \"application/json-patch+json\": {\n              \"schema\": {\n                \"$ref\": \"#/components/schemas/MovePlantRequest\"\n              }\n            },\n            \"application/json\": {\n              \"schema\": {\n                \"$ref\": \"#/components/schemas/MovePlantRequest\"\n              }\n            },\n            \"text/json\": {\n              \"schema\": {\n                \"$ref\": \"#/components/schemas/MovePlantRequest\"\n              }\n            },\n            \"application/*+json\": {\n              \"schema\": {\n                \"$ref\": \"#/components/schemas/MovePlantRequest\"\n              }\n            }\n          },\n          \"x-bodyName\": \"req\"\n        },\n        \"responses\": {\n          \"200\": {\n            \"description\": \"Success - Plants successfully moved to target room\"\n          },\n          \"400\": {\n            \"description\": \"Bad Request - `BadRequestResponse` object with `message` string field (check `propertyErrors`: null for simple message, array for field-specific errors)\"\n          },\n          \"401\": {\n            \"description\": \"Invalid API Key\"\n          },\n          \"403\": {\n            \"description\": \"Account not authorized\"\n          },\n          \"500\": {\n            \"description\": \"Something went wrong.\"\n          }\n        }\n      }\n    },\n    \"/plant/change-phase\": {\n      \"post\": {\n        \"tags\": [\"Plant\"],\n        \"summary\": \"Change Plants Growth Phase\",\n        \"description\": \"**Purpose:** Update the cultivation growth phase of cannabis plants to track their development stage and optimize cultivation management.\\n\\n**Request Requirements:**\\n- \\\"CultivationWrite\\\" role authorization required for plant growth phase operations\\n- `ChangeGrowthPhaseRequest` object in request body with plant IDs and growth phase information\\n- Content-Type: application/json\\n- All specified plants must be accessible to your location and in valid status for phase changes\\n- Growth phase must be one of the valid phase values\\n\\n**Response Data:**\\n- Response format: No response body (void)\\n- Returns success confirmation (HTTP 200) upon successful phase change\\n- No response body content (void return)\\n- Plants are updated to new growth phase immediately\\n- Changes are reflected immediately in plant cultivation tracking\\n\\n**Request Body Fields:**\\n- `PlantIds`: Array of LeafLogix plant IDs to update (required)\\n- `GrowthPhase`: Target cultivation phase - must be one of: `Vegetative`, `Propagation`, `Flowering` (required)\\n- `PhaseStartDate`: Date when new phase begins - defaults to current UTC time if omitted (optional)\\n\\n**Growth Phase Values:**\\n- **Propagation**: Initial plant development and cloning phase\\n- **Vegetative**: Active vegetative growth before flowering initiation\\n- **Flowering**: Reproductive growth phase leading to harvest\\n\\n**Phase Change Operation Behavior:**\\n- **Phase Validation**: Growth phase value validated against allowed phases\\n- **Bulk Processing**: Multiple plants can be updated in a single operation\\n- **Date Management**: Phase start date defaults to current time if not specified\\n- **Compliance**: All phase changes logged for regulatory compliance requirements\\n- **Integration**: Phase updates synchronized with external cultivation systems when configured\\n\\n**Common Use Cases:**\\n- Transition plants from vegetative to flowering phase for harvest timing\\n- Update plant phases during cultivation workflow automation\\n- Maintain accurate cultivation records for compliance reporting\\n- Support cultivation planning and scheduling optimization\\n- Synchronize growth phases with environmental control systems\\n\\n**Performance & Limits:**\\n- Bulk operation optimized for multiple plant processing\\n- Immediate phase updates and tracking system integration\\n- Efficient for large-scale cultivation facility operations\\n- Phase validation prevents invalid cultivation state transitions\\n\\n**Related Endpoints:**\\n- `GET /plant` - Retrieve current plant phases and cultivation status\\n- `POST /plant/move` - Move plants between rooms optimized for different phases\\n- `POST /plant/harvest` - Harvest plants when flowering phase is complete\\n- Cultivation management endpoints for complete workflow\\n\\n**Important Notes:**\\n- **Phase Validation**: Only `Vegetative`, `Propagation`, and `Flowering` phases are accepted\\n- **Compliance Critical**: Phase tracking is required for cannabis regulatory compliance\\n- **Date Tracking**: Phase start dates support cultivation timeline management\\n- **Immediate Processing**: Phase changes are immediate and tracked for audit purposes\\n- **Integration**: Phase updates synchronized with external cultivation and compliance systems\",\n        \"operationId\": \"PlantChange-phasePost\",\n        \"requestBody\": {\n          \"description\": \"Growth phase change request with plant IDs and target phase information - see `ChangeGrowthPhaseRequest` model for complete field documentation\",\n          \"content\": {\n            \"application/json-patch+json\": {\n              \"schema\": {\n                \"$ref\": \"#/components/schemas/ChangeGrowthPhaseRequest\"\n              }\n            },\n            \"application/json\": {\n              \"schema\": {\n                \"$ref\": \"#/components/schemas/ChangeGrowthPhaseRequest\"\n              }\n            },\n            \"text/json\": {\n              \"schema\": {\n                \"$ref\": \"#/components/schemas/ChangeGrowthPhaseRequest\"\n              }\n            },\n            \"application/*+json\": {\n              \"schema\": {\n                \"$ref\": \"#/components/schemas/ChangeGrowthPhaseRequest\"\n              }\n            }\n          },\n          \"x-bodyName\": \"req\"\n        },\n        \"responses\": {\n          \"200\": {\n            \"description\": \"Success - Plants successfully updated to new growth phase\"\n          },\n          \"400\": {\n            \"description\": \"Bad Request - `BadRequestResponse` object with `message` string field (check `propertyErrors`: null for simple message, array for field-specific errors)\"\n          },\n          \"401\": {\n            \"description\": \"Invalid API Key\"\n          },\n          \"403\": {\n            \"description\": \"Account not authorized\"\n          },\n          \"500\": {\n            \"description\": \"Something went wrong.\"\n          }\n        }\n      }\n    },\n    \"/plant/retire\": {\n      \"post\": {\n        \"tags\": [\"Plant\"],\n        \"summary\": \"Retire Plants\",\n        \"description\": \"**Purpose:** Permanently retire cannabis plants from cultivation due to various reasons such as disease, damage, or end-of-life for compliance tracking and waste management.\\n\\n**Request Requirements:**\\n- \\\"CultivationWrite\\\" role authorization required for plant retirement operations\\n- `RetirePlantRequest` object in request body with plant IDs and retirement details\\n- Content-Type: application/json\\n- Rate limited to 300 requests per minute\\n- All specified plants must be accessible to your location and in retirable status\\n- Either `ReasonId` or `ReasonCode` must be provided for retirement justification\\n\\n**Response Data:**\\n- Response format: No response body (void)\\n- Returns success confirmation (HTTP 200) upon successful plant retirement\\n- No response body content (void return)\\n- Plants are permanently retired from cultivation immediately\\n- Changes are reflected immediately in plant status and compliance tracking\\n\\n**Request Body Fields:**\\n- `PlantIds`: Array of LeafLogix plant IDs to retire (required)\\n- `ReasonId`: Numeric reason ID for retirement - use if known (optional if ReasonCode provided)\\n- `ReasonCode`: String reason code for retirement - use if ReasonId unknown (optional if ReasonId provided)\\n- `RoomId`: Room where retirement occurs for waste tracking (required)\\n- `WasteType`: Type of waste generated from retirement (optional)\\n- `WasteWeight`: Weight of waste material in specified units (optional)\\n- `PlantWeight`: Weight of plant material being retired (optional)\\n- `WasteDate`: Date of waste generation for compliance tracking (optional)\\n- Additional waste tracking and compliance fields\\n\\n**Reason Code Management:**\\n- **ReasonId Priority**: If both ReasonId and ReasonCode provided, ReasonId takes precedence\\n- **Code Lookup**: ReasonCode automatically looked up to find corresponding ReasonId\\n- **Validation**: Invalid ReasonId or ReasonCode will result in 400 Bad Request response\\n- **Flexibility**: Use ReasonCode when integrating without pre-knowledge of reason IDs\\n\\n**Retirement Operation Behavior:**\\n- **Permanent Action**: Plant retirement is irreversible once completed\\n- **Bulk Processing**: Multiple plants can be retired in a single operation\\n- **Waste Tracking**: Optional waste weight and material tracking for compliance\\n- **Compliance**: All retirement operations logged for regulatory compliance requirements\\n- **Integration**: Retirement synchronized with external cultivation and waste tracking systems\\n\\n**Common Use Cases:**\\n- Retire diseased or damaged plants to prevent contamination spread\\n- Remove plants that have reached end-of-life or failed quality standards\\n- Comply with regulatory requirements for plant destruction documentation\\n- Manage cultivation space by removing non-productive plants\\n- Support waste tracking and disposal compliance reporting\\n\\n**Performance & Limits:**\\n- Rate limited to 300 requests per minute for cultivation workflow protection\\n- Bulk operation optimized for multiple plant processing\\n- Immediate retirement status updates and tracking system integration\\n- Efficient for large-scale cultivation facility operations\\n\\n**Related Endpoints:**\\n- `GET /plant` - Retrieve current plant status before retirement\\n- `GET /plant/get-reason-codes` - List available retirement reason codes\\n- `POST /waste` - Create waste records for retired plant material\\n- Cultivation and compliance management endpoints\\n\\n**Important Notes:**\\n- **Irreversible Action**: Plant retirement cannot be undone once completed\\n- **Reason Required**: Either ReasonId or ReasonCode must be provided for compliance\\n- **Compliance Critical**: Retirement tracking is required for cannabis regulatory compliance\\n- **Rate Limiting**: 300 requests per minute limit for cultivation workflow stability\\n- **Waste Integration**: Retirement can generate waste records for disposal tracking\",\n        \"operationId\": \"PlantRetirePost\",\n        \"requestBody\": {\n          \"description\": \"Plant retirement request with plant IDs, reason codes, and waste tracking details - see `RetirePlantRequest` model for complete field documentation\",\n          \"content\": {\n            \"application/json-patch+json\": {\n              \"schema\": {\n                \"$ref\": \"#/components/schemas/RetirePlantRequest\"\n              }\n            },\n            \"application/json\": {\n              \"schema\": {\n                \"$ref\": \"#/components/schemas/RetirePlantRequest\"\n              }\n            },\n            \"text/json\": {\n              \"schema\": {\n                \"$ref\": \"#/components/schemas/RetirePlantRequest\"\n              }\n            },\n            \"application/*+json\": {\n              \"schema\": {\n                \"$ref\": \"#/components/schemas/RetirePlantRequest\"\n              }\n            }\n          },\n          \"x-bodyName\": \"req\"\n        },\n        \"responses\": {\n          \"200\": {\n            \"description\": \"Success - Plants successfully retired from cultivation\"\n          },\n          \"400\": {\n            \"description\": \"Bad Request - Invalid reason ID/code or validation errors\",\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"$ref\": \"#/components/schemas/BadRequestResponse\"\n                }\n              }\n            }\n          },\n          \"401\": {\n            \"description\": \"Invalid API Key\"\n          },\n          \"403\": {\n            \"description\": \"Account not authorized\"\n          },\n          \"500\": {\n            \"description\": \"Something went wrong.\"\n          }\n        }\n      }\n    },\n    \"/plant/get-reason-codes\": {\n      \"get\": {\n        \"tags\": [\"Plant\"],\n        \"summary\": \"Get Plant Reason Codes\",\n        \"description\": \"**Purpose:** Retrieve the list of valid reason codes for cannabis plant retirement operations to support compliance documentation and proper retirement categorization.\\n\\n**Request Requirements:**\\n- \\\"Inventory\\\" or \\\"Cultivation\\\" role authorization required for plant data access\\n- No query parameters or request body needed\\n\\n**Response Data:**\\n- Response format: `[string, string, ...]`\\n- Returns array of string reason codes for plant retirement\\n- Array typically contains 5-20 reason codes depending on organization configuration\\n- Returns empty array `[]` if no reason codes configured (rare)\\n- Reason codes are organization-specific and configurable by administrators\\n- Results automatically filtered to authenticated organization\\n\\n**Common Reason Code Examples:**\\n- Disease or pest infestation requiring plant destruction\\n- Physical damage or environmental stress failures\\n- Quality control failures or contamination issues\\n- End-of-life or harvest completion scenarios\\n- Regulatory compliance or audit requirements\\n\\n**Common Use Cases:**\\n- Populate reason code dropdown lists in plant retirement forms\\n- Validate reason codes before submitting plant retirement requests\\n- Generate compliance reports showing retirement reasons and frequencies\\n- Support cultivation management workflows with proper retirement categorization\\n- Maintain audit trails for regulatory compliance and operational analysis\\n\\n**Performance & Limits:**\\n- Lightweight reference data optimized for frequent access\\n- Small dataset suitable for client-side caching\\n- No pagination needed due to manageable reason code catalog sizes\\n- Results filtered to organization-specific reason configurations\\n\\n**Related Endpoints:**\\n- `POST /plant/retire` - Retire plants using these reason codes for compliance\\n- `GET /plant` - Retrieve plant status before determining retirement reasons\\n- Plant lifecycle and cultivation management endpoints\\n\\n**Important Notes:**\\n- **Organization-Specific**: Reason codes vary by organization and compliance requirements\\n- **Compliance Required**: Proper reason codes are essential for cannabis regulatory compliance\\n- **Validation**: Use these codes to validate retirement requests before submission\\n- **Reference Data**: Cache locally for performance in plant retirement workflows\\n- **Administrative**: Reason codes are configured by system administrators\",\n        \"operationId\": \"PlantGet-reason-codesGet\",\n        \"responses\": {\n          \"200\": {\n            \"description\": \"Success - Returns array of reason code strings: `[string, ...]`\",\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"type\": \"array\",\n                  \"items\": {\n                    \"type\": \"string\"\n                  }\n                }\n              }\n            }\n          },\n          \"401\": {\n            \"description\": \"Invalid API Key\"\n          },\n          \"403\": {\n            \"description\": \"Account not authorized\"\n          },\n          \"500\": {\n            \"description\": \"Something went wrong.\"\n          }\n        }\n      }\n    },\n    \"/plant/assign-plants-to-group\": {\n      \"post\": {\n        \"tags\": [\"Plant\"],\n        \"summary\": \"Assign Plants to Group\",\n        \"description\": \"**Purpose:** Assign existing cannabis plants to a specific plant group for batch management and cultivation workflow organization using plant serial numbers.\\n\\n**Request Requirements:**\\n- \\\"Inventory\\\" or \\\"Cultivation\\\" role authorization required for plant group management operations\\n- `AssignPlantsToGroupRequest` object in request body with group name and plant serial numbers\\n- Content-Type: application/json\\n- All specified plant serial numbers must exist and be accessible to your location\\n- Target plant group must exist within the facility\\n\\n**Response Data:**\\n- Response format: No response body (void)\\n- Returns success confirmation (HTTP 200) upon successful plant assignment\\n- No response body content (void return)\\n- Plants are assigned to target group immediately\\n- Changes are reflected immediately in plant group organization and batch tracking\\n\\n**Request Body Fields:**\\n- `PlantGroupName`: Name of target plant group for batch organization (required)\\n- `PlantSerialNumbers`: Array of plant serial numbers to assign to the group (required)\\n\\n**Plant Group Assignment Behavior:**\\n- **Batch Organization**: Plants assigned to groups for batch-based cultivation tracking\\n- **Serial Number Lookup**: Plants identified by serial numbers for precise assignment\\n- **Group Validation**: Target plant group must exist before assignment\\n- **Bulk Processing**: Multiple plants can be assigned to the same group in a single operation\\n- **Immediate Processing**: Group assignments are immediate and tracked for compliance\\n\\n**Validation Rules:**\\n- **Plant Existence**: All serial numbers must correspond to existing plants\\n- **Location Access**: Plants must be accessible to the authenticated location\\n- **Group Existence**: Target plant group must exist within the facility\\n- **Serial Number Format**: Serial numbers must match existing plant tracking identifiers\\n\\n**Common Use Cases:**\\n- Reorganize plants into batch groups for cultivation workflow management\\n- Assign newly created plants to existing cultivation batches\\n- Support batch-based harvest planning and cultivation scheduling\\n- Maintain proper plant group organization for compliance reporting\\n- Facilitate cultivation management and operational efficiency\\n\\n**Performance & Limits:**\\n- Bulk operation optimized for multiple plant assignment\\n- Immediate group assignment and tracking system integration\\n- Efficient for cultivation workflow organization and batch management\\n- Serial number validation ensures accurate plant identification\\n\\n**Related Endpoints:**\\n- `GET /plant` - Retrieve current plant group assignments and status\\n- `POST /plant` - Create new plants that can be assigned to groups\\n- Plant group and cultivation management endpoints for complete workflow\\n\\n**Important Notes:**\\n- **Batch Management**: Plant groups enable batch-based cultivation tracking and compliance\\n- **Serial Number Precision**: Use exact serial numbers for accurate plant identification\\n- **Compliance Support**: Proper group organization supports regulatory compliance requirements\\n- **Immediate Processing**: Group assignments are immediate and tracked for audit purposes\\n- **Workflow Integration**: Supports cultivation management and harvest planning workflows\",\n        \"operationId\": \"PlantAssign-plants-to-groupPost\",\n        \"requestBody\": {\n          \"description\": \"Plant group assignment request with group name and plant serial numbers - see `AssignPlantsToGroupRequest` model for complete field documentation\",\n          \"content\": {\n            \"application/json-patch+json\": {\n              \"schema\": {\n                \"$ref\": \"#/components/schemas/AssignPlantsToGroupRequest\"\n              }\n            },\n            \"application/json\": {\n              \"schema\": {\n                \"$ref\": \"#/components/schemas/AssignPlantsToGroupRequest\"\n              }\n            },\n            \"text/json\": {\n              \"schema\": {\n                \"$ref\": \"#/components/schemas/AssignPlantsToGroupRequest\"\n              }\n            },\n            \"application/*+json\": {\n              \"schema\": {\n                \"$ref\": \"#/components/schemas/AssignPlantsToGroupRequest\"\n              }\n            }\n          },\n          \"x-bodyName\": \"request\"\n        },\n        \"responses\": {\n          \"200\": {\n            \"description\": \"Success - Plants successfully assigned to target group\"\n          },\n          \"400\": {\n            \"description\": \"Bad Request - Validation errors or invalid plant serial numbers\",\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"$ref\": \"#/components/schemas/BadRequestResponse\"\n                }\n              }\n            }\n          },\n          \"401\": {\n            \"description\": \"Invalid API Key\"\n          },\n          \"403\": {\n            \"description\": \"Account not authorized\"\n          },\n          \"500\": {\n            \"description\": \"Something went wrong.\"\n          }\n        }\n      }\n    },\n    \"/plant/nonsts/update\": {\n      \"post\": {\n        \"tags\": [\"PlantNonsts\"],\n        \"summary\": \"Update Existing Plants (Non-State Tracking)\",\n        \"description\": \"**Purpose:** Update existing plant records with cultivation data without reporting to state traceability systems for internal plant management.\\n\\n**Request Requirements:**\\n- \\\"Inventory\\\" or \\\"Cultivation\\\" role authorization required for plant data modification\\n- `UpdatePlantsRequest` object in request body with plant update details\\n- Content-Type: application/json\\n- Valid PlantId required for each plant to be updated\\n- Feature flag \\\"rollout.trym-integration\\\" must be enabled\\n\\n**Response Data:**\\n- Returns single `SuccessResult` object (not array) with operation confirmation\\n- Includes success message confirming plants were updated\\n- Operation status and any relevant update information\\n\\n**Sparse Update Behavior:**\\n- **Null/Empty/Omitted Fields**: Will NOT have their data updated (preserves existing values)\\n- **Provided Fields**: Only fields with values in the request will be updated\\n- **Field Independence**: Each field can be updated independently without affecting others\\n- **Safe Updates**: Omitted fields maintain their current database values\\n\\n**Non-State Tracking (NONSTS) Behavior:**\\n- **Internal Only**: Updates are for internal cultivation tracking only\\n- **No External Reporting**: Changes are NOT reported to state traceability systems\\n- **Cultivation Focus**: Designed for internal plant management and cultivation workflows\\n- **Compliance Safe**: Does not interfere with official state tracking requirements\\n\\n**Common Use Cases:**\\n- Update internal plant cultivation notes and observations\\n- Modify plant growth stage information for internal tracking\\n- Update plant location within cultivation facility\\n- Record internal plant health and development data\\n- Maintain cultivation workflow information without state system updates\\n\\n**Performance & Limits:**\\n- Batch plant updates for efficient cultivation management\\n- Validation performed before any changes to ensure data integrity\\n- Changes reflected immediately in internal cultivation systems\\n- Optimized for cultivation facility management workflows\\n\\n**Related Endpoints:**\\n- `GET /plant` - Retrieve current plant data before updates\\n- `POST /plant/nonsts` - Create new plants for internal tracking\\n- `POST /plant/harvest` - Official plant harvest operations (state tracked)\\n\\n**Important Notes:**\\n- **Feature Gated**: Requires \\\"rollout.trym-integration\\\" feature flag to be enabled\\n- **Internal Tracking**: Updates are for internal cultivation management only\\n- **State Compliance**: Does not affect official state traceability system records\\n- **Validation Required**: Plant IDs must exist and be valid for the location\\n- **Cultivation Focus**: Designed specifically for cultivation facility workflows\",\n        \"operationId\": \"PlantNonstsUpdatePost\",\n        \"requestBody\": {\n          \"description\": \"Plant update request with PlantId and field updates - UpdatePlantsRequest object\",\n          \"content\": {\n            \"application/json-patch+json\": {\n              \"schema\": {\n                \"$ref\": \"#/components/schemas/UpdatePlantsRequest\"\n              }\n            },\n            \"application/json\": {\n              \"schema\": {\n                \"$ref\": \"#/components/schemas/UpdatePlantsRequest\"\n              }\n            },\n            \"text/json\": {\n              \"schema\": {\n                \"$ref\": \"#/components/schemas/UpdatePlantsRequest\"\n              }\n            },\n            \"application/*+json\": {\n              \"schema\": {\n                \"$ref\": \"#/components/schemas/UpdatePlantsRequest\"\n              }\n            }\n          },\n          \"x-bodyName\": \"request\"\n        },\n        \"responses\": {\n          \"200\": {\n            \"description\": \"Success\",\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"$ref\": \"#/components/schemas/SuccessResult\"\n                }\n              }\n            }\n          },\n          \"400\": {\n            \"description\": \"Bad Request - `BadRequestResponse` object with `message` string field (check `propertyErrors`: null for simple message, array for field-specific errors)\",\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"$ref\": \"#/components/schemas/BadRequestResponse\"\n                }\n              }\n            }\n          },\n          \"401\": {\n            \"description\": \"Invalid API Key\"\n          },\n          \"403\": {\n            \"description\": \"Account not authorized\"\n          },\n          \"500\": {\n            \"description\": \"Something went wrong.\"\n          }\n        }\n      }\n    },\n    \"/plant/nonsts/batch/immatureplants\": {\n      \"post\": {\n        \"tags\": [\"PlantNonsts\"],\n        \"summary\": \"Create Immature Plant Batch (Non-State Tracking)\",\n        \"description\": \"**Purpose:** Create a batch of immature plants for internal cultivation tracking without reporting to state traceability systems.\\n\\n**Request Requirements:**\\n- \\\"Inventory\\\" or \\\"Cultivation\\\" role authorization required for plant creation\\n- `PostImmatureBatchRequest` object in request body with batch details\\n- Content-Type: application/json\\n- Valid plant data for each immature plant in the batch\\n- Feature flag \\\"rollout.trym-integration\\\" must be enabled\\n\\n**Response Data:**\\n- Returns single `ApiResult<CreateImmatureBatchResponse>` object (not array) with creation results\\n- Includes array of created plant IDs for tracking and reference\\n- Batch creation status and success confirmation\\n- Plant ID assignments for newly created immature plants\\n\\n**Batch Creation Process:**\\n- **Multiple Plants**: Creates multiple immature plants in a single operation\\n- **ID Assignment**: Each plant receives a unique PlantId for future operations\\n- **Validation**: All plant data validated before batch creation\\n- **Atomic Operation**: Batch succeeds or fails as a complete unit\\n\\n**Non-State Tracking (NONSTS) Behavior:**\\n- **Internal Only**: Plant creation for internal cultivation tracking only\\n- **No External Reporting**: Plant creation NOT transmitted to state traceability systems\\n- **Cultivation Focus**: Designed for internal plant management and cultivation workflows\\n- **Compliance Safe**: Does not interfere with official state tracking requirements\\n\\n**Immature Plant Characteristics:**\\n- **Growth Stage**: Plants in early vegetative or seedling stage\\n- **Tracking Ready**: Created with unique identifiers for cultivation tracking\\n- **Development Phase**: Pre-flowering plants requiring cultivation management\\n- **Internal Records**: Maintained in internal cultivation systems only\\n\\n**Common Use Cases:**\\n- Create batches of seedlings for internal cultivation tracking\\n- Initialize plant records for new cultivation cycles\\n- Set up immature plant inventory for facility management\\n- Start cultivation workflows without state system integration\\n- Manage internal plant genetics and breeding programs\\n\\n**Performance & Limits:**\\n- Batch processing for efficient plant creation workflows\\n- Validation performed before any plant creation\\n- Changes reflected immediately in internal cultivation systems\\n- Optimized for cultivation facility startup and expansion workflows\\n\\n**Related Endpoints:**\\n- `POST /plant/nonsts/update` - Update created plants with cultivation data\\n- `GET /plant` - Retrieve created plant information\\n- `POST /plant/harvest` - Official plant harvest operations (state tracked)\\n\\n**Important Notes:**\\n- **Feature Gated**: Requires \\\"rollout.trym-integration\\\" feature flag to be enabled\\n- **Plant IDs Returned**: Save returned plant IDs for future plant management operations\\n- **Internal Tracking**: Plants created for internal cultivation management only\\n- **State Compliance**: Does not affect official state traceability system records\\n- **Batch Efficiency**: Creates multiple plants efficiently in single operation\",\n        \"operationId\": \"PlantNonstsBatchImmatureplantsPost\",\n        \"requestBody\": {\n          \"description\": \"Immature plant batch request with plant details - PostImmatureBatchRequest object\",\n          \"content\": {\n            \"application/json-patch+json\": {\n              \"schema\": {\n                \"$ref\": \"#/components/schemas/PostImmatureBatchRequest\"\n              }\n            },\n            \"application/json\": {\n              \"schema\": {\n                \"$ref\": \"#/components/schemas/PostImmatureBatchRequest\"\n              }\n            },\n            \"text/json\": {\n              \"schema\": {\n                \"$ref\": \"#/components/schemas/PostImmatureBatchRequest\"\n              }\n            },\n            \"application/*+json\": {\n              \"schema\": {\n                \"$ref\": \"#/components/schemas/PostImmatureBatchRequest\"\n              }\n            }\n          },\n          \"x-bodyName\": \"request\"\n        },\n        \"responses\": {\n          \"200\": {\n            \"description\": \"Success\",\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"$ref\": \"#/components/schemas/CreateImmaturePlantBatchResponseApiResult\"\n                }\n              }\n            }\n          },\n          \"400\": {\n            \"description\": \"Bad Request - `BadRequestResponse` object with `message` string field (check `propertyErrors`: null for simple message, array for field-specific errors)\",\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"$ref\": \"#/components/schemas/BadRequestResponse\"\n                }\n              }\n            }\n          },\n          \"401\": {\n            \"description\": \"Invalid API Key\"\n          },\n          \"403\": {\n            \"description\": \"Account not authorized\"\n          },\n          \"500\": {\n            \"description\": \"Something went wrong.\"\n          }\n        }\n      }\n    },\n    \"/plant/nonsts/batch/convert/immatureplants\": {\n      \"post\": {\n        \"tags\": [\"PlantNonsts\"],\n        \"summary\": \"Convert Immature Plant Batch to Mature (Non-State Tracking)\",\n        \"description\": \"**Purpose:** Convert immature plant batches to mature plant status for internal cultivation tracking without reporting to state traceability systems.\\n\\n**Request Requirements:**\\n- \\\"Inventory\\\" or \\\"Cultivation\\\" role authorization required for plant conversion\\n- `ConvertImmatureBatchRequest` object in request body with conversion details\\n- Content-Type: application/json\\n- Valid immature batch data for conversion to mature plants\\n- Feature flag \\\"rollout.trym-integration\\\" must be enabled\\n\\n**Response Data:**\\n- Returns single `ApiResult<ConvertImmaturePlantResponse>` object (not array) with conversion results\\n- Includes array of converted plant IDs for tracking and reference\\n- Plant conversion status and success confirmation\\n- Mature plant ID assignments for newly converted plants\\n\\n**Plant Conversion Process:**\\n- **Status Transition**: Converts immature plants to mature plant status\\n- **ID Retention**: Existing plant IDs maintained through conversion process\\n- **Validation**: All conversion data validated before processing\\n- **Batch Processing**: Multiple immature plants converted in single operation\\n\\n**Non-State Tracking (NONSTS) Behavior:**\\n- **Internal Only**: Plant creation for internal cultivation tracking only\\n- **No External Reporting**: Plant conversion NOT transmitted to state traceability systems\\n- **Cultivation Focus**: Designed for internal plant management and cultivation workflows\\n- **Compliance Safe**: Does not interfere with official state tracking requirements\\n\\n**Maturity Transition:**\\n- **Growth Stage**: Immature to mature plant status transition\\n- **Cultivation Ready**: Mature plants ready for flowering phase management\\n- **Tracking Continuity**: Maintains plant tracking through maturity transition\\n- **Workflow Integration**: Supports cultivation facility growth phase workflows\\n\\n**Common Use Cases:**\\n- Convert vegetative plants to mature flowering status\\n- Transition immature batches to mature cultivation phases\\n- Progress plants through cultivation development stages\\n- Support internal cultivation workflow maturity management\\n- Manage plant lifecycle transitions without state system integration\\n\\n**Performance & Limits:**\\n- Efficient plant conversion for cultivation management\\n- Validation performed before any plant conversion\\n- Changes reflected immediately in internal cultivation systems\\n- Optimized for cultivation facility maturity workflows\\n\\n**Related Endpoints:**\\n- `POST /plant/nonsts/update` - Update converted plants with cultivation data\\n- `GET /plant` - Retrieve converted plant information\\n- `POST /plant/harvest` - Official plant harvest operations (state tracked)\\n\\n**Important Notes:**\\n- **Feature Gated**: Requires \\\"rollout.trym-integration\\\" feature flag to be enabled\\n- **Plant IDs Returned**: Save returned plant IDs for future plant management operations\\n- **Internal Tracking**: Plants converted for internal cultivation management only\\n- **State Compliance**: Does not affect official state traceability system records\\n- **Cultivation Ready**: Mature plants ready for internal cultivation tracking workflows\",\n        \"operationId\": \"PlantNonstsBatchConvertImmatureplantsPost\",\n        \"requestBody\": {\n          \"description\": \"Immature batch conversion request with conversion details - ConvertImmatureBatchRequest object\",\n          \"content\": {\n            \"application/json-patch+json\": {\n              \"schema\": {\n                \"$ref\": \"#/components/schemas/ConvertImmatureBatchRequest\"\n              }\n            },\n            \"application/json\": {\n              \"schema\": {\n                \"$ref\": \"#/components/schemas/ConvertImmatureBatchRequest\"\n              }\n            },\n            \"text/json\": {\n              \"schema\": {\n                \"$ref\": \"#/components/schemas/ConvertImmatureBatchRequest\"\n              }\n            },\n            \"application/*+json\": {\n              \"schema\": {\n                \"$ref\": \"#/components/schemas/ConvertImmatureBatchRequest\"\n              }\n            }\n          },\n          \"x-bodyName\": \"request\"\n        },\n        \"responses\": {\n          \"200\": {\n            \"description\": \"Success\",\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"$ref\": \"#/components/schemas/ConvertImmaturePlantResponseApiResult\"\n                }\n              }\n            }\n          },\n          \"400\": {\n            \"description\": \"Bad Request - `BadRequestResponse` object with `message` string field (check `propertyErrors`: null for simple message, array for field-specific errors)\",\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"$ref\": \"#/components/schemas/BadRequestResponse\"\n                }\n              }\n            }\n          },\n          \"401\": {\n            \"description\": \"Invalid API Key\"\n          },\n          \"403\": {\n            \"description\": \"Account not authorized\"\n          },\n          \"500\": {\n            \"description\": \"Something went wrong.\"\n          }\n        }\n      }\n    },\n    \"/plant/nonsts/batch/matureplants\": {\n      \"post\": {\n        \"tags\": [\"PlantNonsts\"],\n        \"summary\": \"Create Mature Plant Batch (Non-State Tracking)\",\n        \"description\": \"**Purpose:** Create a batch of mature plants ready for flowering phase cultivation tracking without reporting to state traceability systems.\\n\\n**Request Requirements:**\\n- \\\"Inventory\\\" or \\\"Cultivation\\\" role authorization required for mature plant creation\\n- `CreateMatureBatchRequest` object in request body with mature plant batch details\\n- Content-Type: application/json\\n- Valid mature plant data for each plant in the batch\\n- Feature flag \\\"rollout.trym-integration\\\" must be enabled\\n\\n**Response Data:**\\n- Returns single `ApiResult<CreateMaturePlantsResponse>` object (not array) with creation results\\n- Includes array of created plant IDs for tracking and reference\\n- Batch creation status and success confirmation\\n- Plant ID assignments for newly created mature plants\\n\\n**Mature Plant Batch Creation:**\\n- **Multiple Plants**: Creates multiple mature plants in a single operation\\n- **Flowering Ready**: Plants created at mature stage ready for flowering phase\\n- **ID Assignment**: Each plant receives a unique PlantId for future operations\\n- **Validation**: All plant data validated before batch creation\\n- **Atomic Operation**: Batch succeeds or fails as a complete unit\\n\\n**Non-State Tracking (NONSTS) Behavior:**\\n- **Internal Only**: Plant creation for internal cultivation tracking only\\n- **No External Reporting**: Plant creation NOT transmitted to state traceability systems\\n- **Cultivation Focus**: Designed for internal mature plant management and flowering workflows\\n- **Compliance Safe**: Does not interfere with official state tracking requirements\\n\\n**Mature Plant Characteristics:**\\n- **Growth Stage**: Plants ready for flowering phase cultivation\\n- **Cultivation Ready**: Created with unique identifiers for flowering management\\n- **Production Phase**: Mature plants prepared for harvest cultivation workflows\\n- **Internal Records**: Maintained in internal cultivation systems only\\n\\n**Common Use Cases:**\\n- Create batches of mature plants for flowering room management\\n- Initialize mature plant inventory for production cycles\\n- Set up flowering phase plant tracking for facility management\\n- Start mature cultivation workflows without state system integration\\n- Manage internal mature plant genetics and production programs\\n\\n**Performance & Limits:**\\n- Batch processing for efficient mature plant creation workflows\\n- Validation performed before any plant creation\\n- Changes reflected immediately in internal cultivation systems\\n- Optimized for cultivation facility flowering phase workflows\\n\\n**Related Endpoints:**\\n- `POST /plant/nonsts/update` - Update created mature plants with cultivation data\\n- `POST /plant/nonsts/batch/immatureplants` - Create immature plant batches\\n- `POST /plant/nonsts/batch/convert/immatureplants` - Convert immature to mature plants\\n- `GET /plant` - Retrieve created mature plant information\\n- `POST /plant/harvest` - Official plant harvest operations (state tracked)\\n\\n**Important Notes:**\\n- **Feature Gated**: Requires \\\"rollout.trym-integration\\\" feature flag to be enabled\\n- **Plant IDs Returned**: Save returned plant IDs for future mature plant management operations\\n- **Internal Tracking**: Plants created for internal cultivation management only\\n- **State Compliance**: Does not affect official state traceability system records\\n- **Flowering Ready**: Mature plants ready for flowering phase cultivation workflows\\n- **Batch Efficiency**: Creates multiple mature plants efficiently in single operation\",\n        \"operationId\": \"PlantNonstsBatchMatureplantsPost\",\n        \"requestBody\": {\n          \"description\": \"Mature plant batch request with plant details - CreateMatureBatchRequest object\",\n          \"content\": {\n            \"application/json-patch+json\": {\n              \"schema\": {\n                \"$ref\": \"#/components/schemas/CreateMatureBatchRequest\"\n              }\n            },\n            \"application/json\": {\n              \"schema\": {\n                \"$ref\": \"#/components/schemas/CreateMatureBatchRequest\"\n              }\n            },\n            \"text/json\": {\n              \"schema\": {\n                \"$ref\": \"#/components/schemas/CreateMatureBatchRequest\"\n              }\n            },\n            \"application/*+json\": {\n              \"schema\": {\n                \"$ref\": \"#/components/schemas/CreateMatureBatchRequest\"\n              }\n            }\n          },\n          \"x-bodyName\": \"request\"\n        },\n        \"responses\": {\n          \"200\": {\n            \"description\": \"Success - Returns ApiResult<CreateMaturePlantsResponse> with created plant IDs: `{ \\\"data\\\": { \\\"createdPlants\\\": [plantId1, plantId2, ...] }, \\\"message\\\": \\\"Successfully created mature plants from batches.\\\", \\\"success\\\": true }`\",\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"$ref\": \"#/components/schemas/CreateMaturePlantsResponseApiResult\"\n                }\n              }\n            }\n          },\n          \"400\": {\n            \"description\": \"Bad Request - Validation failed or invalid request data\",\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"$ref\": \"#/components/schemas/BadRequestResponse\"\n                }\n              }\n            }\n          },\n          \"401\": {\n            \"description\": \"Unauthorized - Invalid or missing API key\"\n          },\n          \"403\": {\n            \"description\": \"Forbidden - Account not authorized for mature plant creation or feature flag disabled\"\n          },\n          \"500\": {\n            \"description\": \"Internal Server Error - Server error occurred\"\n          }\n        }\n      }\n    },\n    \"/plant/nonsts/retag\": {\n      \"post\": {\n        \"tags\": [\"PlantNonsts\"],\n        \"summary\": \"Retag Plant or Clone (Non-State Tracking)\",\n        \"description\": \"**Purpose:** Update plant or clone tag identification for internal cultivation tracking without reporting to state traceability systems.\\n\\n**Request Requirements:**\\n- \\\"Inventory\\\" or \\\"Cultivation\\\" role authorization required for plant retagging\\n- `RetagPlantRequest` object in request body with retagging details\\n- Content-Type: application/json\\n- Valid existing plant identification and new tag information\\n- Feature flag \\\"rollout.trym-integration\\\" must be enabled\\n\\n**Response Data:**\\n- Returns HTTP 200 with no response body on success\\n- No data returned - operation confirmation only\\n- Operation status confirms successful retagging completion\\n\\n**Retagging Process:**\\n- **Tag Replacement**: Updates existing plant tag with new identification\\n- **Plant Identification**: Maintains plant record while updating tag reference\\n- **Validation**: Ensures new tag is unique and valid for the facility\\n- **Immediate Update**: Tag change reflected immediately in cultivation systems\\n\\n**Non-State Tracking (NONSTS) Behavior:**\\n- **Internal Only**: Tag updates for internal cultivation tracking only\\n- **No External Reporting**: Retagging NOT transmitted to state traceability systems\\n- **Cultivation Focus**: Designed for internal plant management and tag organization\\n- **Compliance Safe**: Does not interfere with official state tracking requirements\\n\\n**Retagging Applications:**\\n- **Tag Damage**: Replace damaged or unreadable plant tags\\n- **Organization**: Update tag numbering for facility organization\\n- **Growth Stage**: Retag plants when moving between cultivation areas\\n- **Clone Management**: Update clone tags for genetic tracking\\n\\n**Common Use Cases:**\\n- Replace damaged plant tags for continued tracking\\n- Update plant identification for facility reorganization\\n- Retag clones for genetic lineage management\\n- Maintain plant tag consistency across cultivation areas\\n- Support internal cultivation workflow tag requirements\\n\\n**Performance & Limits:**\\n- Single plant retagging operation for targeted tag management\\n- Validation performed before any tag changes\\n- Changes reflected immediately in internal cultivation systems\\n- Optimized for cultivation facility tag management workflows\\n\\n**Related Endpoints:**\\n- `POST /plant/nonsts/update` - Update other plant data beyond tags\\n- `GET /plant` - Retrieve plant information with current tags\\n- `POST /plant/nonsts` - Create new plants with initial tags\\n\\n**Important Notes:**\\n- **Feature Gated**: Requires \\\"rollout.trym-integration\\\" feature flag to be enabled\\n- **Tag Uniqueness**: New tag must be unique within the cultivation facility\\n- **Internal Tracking**: Tag changes for internal cultivation management only\\n- **State Compliance**: Does not affect official state traceability system records\\n- **Cultivation Continuity**: Maintains plant tracking continuity with updated identification\",\n        \"operationId\": \"PlantNonstsRetagPost\",\n        \"requestBody\": {\n          \"description\": \"Plant retagging request with plant and new tag details - RetagPlantRequest object\",\n          \"content\": {\n            \"application/json-patch+json\": {\n              \"schema\": {\n                \"$ref\": \"#/components/schemas/RetagPlantRequest\"\n              }\n            },\n            \"application/json\": {\n              \"schema\": {\n                \"$ref\": \"#/components/schemas/RetagPlantRequest\"\n              }\n            },\n            \"text/json\": {\n              \"schema\": {\n                \"$ref\": \"#/components/schemas/RetagPlantRequest\"\n              }\n            },\n            \"application/*+json\": {\n              \"schema\": {\n                \"$ref\": \"#/components/schemas/RetagPlantRequest\"\n              }\n            }\n          },\n          \"x-bodyName\": \"request\"\n        },\n        \"responses\": {\n          \"200\": {\n            \"description\": \"Success\"\n          },\n          \"400\": {\n            \"description\": \"Bad Request - `BadRequestResponse` object with `message` string field (check `propertyErrors`: null for simple message, array for field-specific errors)\",\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"$ref\": \"#/components/schemas/BadRequestResponse\"\n                }\n              }\n            }\n          },\n          \"401\": {\n            \"description\": \"Invalid API Key\"\n          },\n          \"403\": {\n            \"description\": \"Account not authorized\"\n          },\n          \"500\": {\n            \"description\": \"Something went wrong.\"\n          }\n        }\n      }\n    },\n    \"/plant/nonsts/batch/retire\": {\n      \"post\": {\n        \"tags\": [\"PlantNonsts\"],\n        \"summary\": \"Retire Immature Plant Batch (Non-State Tracking)\",\n        \"description\": \"**Purpose:** Retire batches of immature plants or clones from active cultivation for internal tracking without reporting to state traceability systems.\\n\\n**Request Requirements:**\\n- \\\"Inventory\\\" or \\\"Cultivation\\\" role authorization required for plant retirement\\n- `RetireImmaturePlantsRequest` object in request body with retirement details\\n- Content-Type: application/json\\n- Valid immature plant or clone identification for retirement\\n- Plants must be in immature stage for this operation\\n\\n**Response Data:**\\n- Returns HTTP 200 with no response body on success\\n- No data returned - operation confirmation only\\n- Status confirmation indicates successful plant retirement completion\\n\\n**Plant Retirement Process:**\\n- **Batch Retirement**: Retires multiple immature plants or clones in single operation\\n- **Status Change**: Updates plant status to retired/inactive in cultivation systems\\n- **Validation**: Ensures plants are valid and in immature stage before retirement\\n- **Immediate Effect**: Retirement status applied immediately to cultivation records\\n\\n**Non-State Tracking (NONSTS) Behavior:**\\n- **Internal Only**: Plant retirement for internal cultivation tracking only\\n- **No External Reporting**: Retirement actions NOT transmitted to state traceability systems\\n- **Cultivation Focus**: Designed for internal plant lifecycle management\\n- **Compliance Safe**: Does not interfere with official state tracking requirements\\n\\n**Immature Plant Retirement Reasons:**\\n- **Quality Control**: Remove plants that don't meet cultivation standards\\n- **Space Management**: Retire excess plants for cultivation area optimization\\n- **Health Issues**: Remove unhealthy or diseased plants from active cultivation\\n- **Selection Process**: Retire plants not selected for continued cultivation\\n- **Facility Management**: Clear immature plants for cultivation workflow changes\\n\\n**Common Use Cases:**\\n- Retire poor-performing immature plants or clones\\n- Remove excess immature plants to optimize cultivation space\\n- Clear unhealthy plants from cultivation areas\\n- Support cultivation selection and quality control processes\\n- Manage immature plant inventory for facility efficiency\\n\\n**Performance & Limits:**\\n- Batch processing for efficient plant retirement workflows\\n- Validation performed before any retirement actions\\n- Changes reflected immediately in internal cultivation systems\\n- Optimized for cultivation facility plant lifecycle management\\n\\n**Related Endpoints:**\\n- `POST /plant/nonsts/batch/immatureplants` - Create immature plant batches\\n- `POST /plant/nonsts/update` - Update immature plants before retirement\\n- `GET /plant` - Retrieve plant information including retirement status\\n- `POST /plant/nonsts/batch/convert/immatureplants` - Convert immature to mature plants\\n\\n**Important Notes:**\\n- **Immature Only**: This endpoint specifically handles immature plants and clones\\n- **Batch Operation**: Can retire multiple plants efficiently in single request\\n- **Internal Tracking**: Retirement for internal cultivation management only\\n- **State Compliance**: Does not affect official state traceability system records\\n- **Irreversible**: Plant retirement action cannot be easily undone\\n- **Validation Required**: Plants must exist and be in immature stage for retirement\",\n        \"operationId\": \"PlantNonstsBatchRetirePost\",\n        \"requestBody\": {\n          \"description\": \"Immature plant retirement request with plant details - RetireImmaturePlantsRequest object\",\n          \"content\": {\n            \"application/json-patch+json\": {\n              \"schema\": {\n                \"$ref\": \"#/components/schemas/RetireImmaturePlantsRequest\"\n              }\n            },\n            \"application/json\": {\n              \"schema\": {\n                \"$ref\": \"#/components/schemas/RetireImmaturePlantsRequest\"\n              }\n            },\n            \"text/json\": {\n              \"schema\": {\n                \"$ref\": \"#/components/schemas/RetireImmaturePlantsRequest\"\n              }\n            },\n            \"application/*+json\": {\n              \"schema\": {\n                \"$ref\": \"#/components/schemas/RetireImmaturePlantsRequest\"\n              }\n            }\n          },\n          \"x-bodyName\": \"request\"\n        },\n        \"responses\": {\n          \"200\": {\n            \"description\": \"Success - No response body, operation completed successfully\"\n          },\n          \"400\": {\n            \"description\": \"Bad Request - Validation failed or invalid plant data\",\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"$ref\": \"#/components/schemas/BadRequestResponse\"\n                }\n              }\n            }\n          },\n          \"401\": {\n            \"description\": \"Unauthorized - Invalid or missing API key\"\n          },\n          \"403\": {\n            \"description\": \"Forbidden - Account not authorized for plant retirement\"\n          },\n          \"500\": {\n            \"description\": \"Internal Server Error - Server error occurred\"\n          }\n        }\n      }\n    },\n    \"/plant/nonsts/batch/finish-harvest\": {\n      \"post\": {\n        \"tags\": [\"PlantNonsts\"],\n        \"summary\": \"Finish or Unfinish Harvest Batch (Non-State Tracking)\",\n        \"description\": \"**Purpose:** Mark harvest batches as finished or unfinished for internal cultivation tracking without reporting to state traceability systems.\\n\\n**Request Requirements:**\\n- \\\"Inventory\\\" or \\\"Cultivation\\\" role authorization required for harvest status management\\n- `FinishHarvestBatchRequest` object in request body with harvest batch details\\n- Content-Type: application/json\\n- Valid harvest batch identification and finish/unfinish action\\n- Feature flag \\\"rollout.trym-integration\\\" must be enabled\\n\\n**Response Data:**\\n- Returns HTTP 200 with no response body on success\\n- No data returned - operation confirmation only\\n- Status confirmation indicates successful harvest batch update\\n\\n**Finish/Unfinish Operations:**\\n- **FINISH**: Marks harvest batch as completed and ready for processing\\n- **UNFINISH**: Reverts harvest batch to in-progress status for continued work\\n- **Status Toggle**: Can switch between finished and unfinished states as needed\\n- **Batch Management**: Affects entire harvest batch status uniformly\\n\\n**Non-State Tracking (NONSTS) Behavior:**\\n- **Internal Only**: Harvest status updates for internal cultivation tracking only\\n- **No External Reporting**: Status changes NOT transmitted to state traceability systems\\n- **Cultivation Focus**: Designed for internal harvest workflow management\\n- **Compliance Safe**: Does not interfere with official state tracking requirements\\n\\n**Harvest Batch Status Management:**\\n- **Workflow Control**: Controls harvest batch progression through processing stages\\n- **Quality Gates**: Finish status indicates batch readiness for next processing steps\\n- **Reversible Actions**: Unfinish allows returning to active harvest work\\n- **Batch Integrity**: Maintains harvest batch data consistency\\n\\n**Common Use Cases:**\\n- Mark harvest batches as complete when cultivation work is finished\\n- Unfinish harvest batches to allow additional cultivation work\\n- Control harvest workflow progression through processing stages\\n- Manage harvest batch status for internal tracking and reporting\\n- Support cultivation facility harvest workflow requirements\\n\\n**Performance & Limits:**\\n- Single batch operation for targeted harvest status management\\n- Immediate status update reflected in cultivation systems\\n- Optimized for harvest workflow management and status tracking\\n- Validation performed before any status changes\\n\\n**Related Endpoints:**\\n- `GET /harvest` - Retrieve harvest batch information and current status\\n- `POST /plant/harvest` - Official plant harvest operations (state tracked)\\n- `POST /plant/nonsts/update` - Update plant data related to harvest\\n\\n**Important Notes:**\\n- **Feature Gated**: Requires \\\"rollout.trym-integration\\\" feature flag to be enabled\\n- **Reversible Operation**: Finish and unfinish actions can be toggled as needed\\n- **Internal Tracking**: Status changes for internal cultivation management only\\n- **State Compliance**: Does not affect official state traceability system records\\n- **Workflow Control**: Critical for managing internal harvest processing workflows\",\n        \"operationId\": \"PlantNonstsBatchFinish-harvestPost\",\n        \"requestBody\": {\n          \"description\": \"Harvest batch finish/unfinish request with batch details - FinishHarvestBatchRequest object\",\n          \"content\": {\n            \"application/json-patch+json\": {\n              \"schema\": {\n                \"type\": \"array\",\n                \"items\": {\n                  \"$ref\": \"#/components/schemas/FinishOrUnfinishBatchDetails\"\n                }\n              }\n            },\n            \"application/json\": {\n              \"schema\": {\n                \"type\": \"array\",\n                \"items\": {\n                  \"$ref\": \"#/components/schemas/FinishOrUnfinishBatchDetails\"\n                }\n              }\n            },\n            \"text/json\": {\n              \"schema\": {\n                \"type\": \"array\",\n                \"items\": {\n                  \"$ref\": \"#/components/schemas/FinishOrUnfinishBatchDetails\"\n                }\n              }\n            },\n            \"application/*+json\": {\n              \"schema\": {\n                \"type\": \"array\",\n                \"items\": {\n                  \"$ref\": \"#/components/schemas/FinishOrUnfinishBatchDetails\"\n                }\n              }\n            }\n          },\n          \"x-bodyName\": \"request\"\n        },\n        \"responses\": {\n          \"200\": {\n            \"description\": \"Success\"\n          },\n          \"400\": {\n            \"description\": \"Bad Request - `BadRequestResponse` object with `message` string field (check `propertyErrors`: null for simple message, array for field-specific errors)\",\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"$ref\": \"#/components/schemas/BadRequestResponse\"\n                }\n              }\n            }\n          },\n          \"401\": {\n            \"description\": \"Invalid API Key\"\n          },\n          \"403\": {\n            \"description\": \"Account not authorized\"\n          },\n          \"500\": {\n            \"description\": \"Something went wrong.\"\n          }\n        }\n      }\n    },\n    \"/plant/nonsts/split\": {\n      \"post\": {\n        \"tags\": [\"PlantNonsts\"],\n        \"summary\": \"Split Immature Plant Batch (Non-State Tracking)\",\n        \"description\": \"**Purpose:** Split immature plant or clone batches into two separate batches for internal cultivation management without reporting to state traceability systems.\\n\\n**Request Requirements:**\\n- \\\"Inventory\\\" or \\\"Cultivation\\\" role authorization required for batch splitting\\n- `SplitImmaturePlantsRequest` object in request body with split details\\n- Content-Type: application/json\\n- Valid immature batch identification and split configuration\\n- Source batch must contain multiple plants to enable splitting\\n\\n**Response Data:**\\n- Returns single `ApiResult<SplitImmaturePlantResult>` object (not array) with split results\\n- Includes details of both resulting batches after split operation\\n- Batch split status and success confirmation\\n- Plant distribution information for the two new batches\\n\\n**Batch Splitting Process:**\\n- **Source Division**: Divides single immature batch into two separate batches\\n- **Plant Distribution**: Distributes plants between original and new batch\\n- **Batch Integrity**: Maintains plant tracking continuity through split operation\\n- **Validation**: Ensures source batch is valid and contains sufficient plants for splitting\\n- **Atomic Operation**: Split succeeds or fails as complete operation\\n\\n**Non-State Tracking (NONSTS) Behavior:**\\n- **Internal Only**: Batch splitting for internal cultivation tracking only\\n- **No External Reporting**: Split operations NOT transmitted to state traceability systems\\n- **Cultivation Focus**: Designed for internal batch management and cultivation workflows\\n- **Compliance Safe**: Does not interfere with official state tracking requirements\\n\\n**Immature Batch Splitting Applications:**\\n- **Facility Management**: Split large batches for different cultivation areas\\n- **Growth Phase Management**: Separate plants based on development stage\\n- **Quality Control**: Isolate high-performing plants from standard batches\\n- **Genetic Management**: Separate clones for different breeding programs\\n- **Space Optimization**: Distribute plants across multiple cultivation rooms\\n\\n**Common Use Cases:**\\n- Split large immature plant batches for better facility management\\n- Separate high-quality clones from standard cultivation batches\\n- Distribute plants across different cultivation rooms or areas\\n- Create specialized batches for different cultivation treatments\\n- Support cultivation workflow organization and plant management\\n\\n**Performance & Limits:**\\n- Single batch operation creating two resulting batches\\n- Validation performed before any batch splitting\\n- Changes reflected immediately in internal cultivation systems\\n- Optimized for cultivation facility batch management workflows\\n\\n**Related Endpoints:**\\n- `POST /plant/nonsts/batch/immatureplants` - Create original immature plant batches\\n- `POST /plant/nonsts/update` - Update plants within split batches\\n- `GET /plant` - Retrieve plant information for both resulting batches\\n- `POST /plant/nonsts/batch/convert/immatureplants` - Convert split batches to mature\\n\\n**Important Notes:**\\n- **Immature Only**: This endpoint specifically handles immature plant and clone batches\\n- **Two-Batch Result**: Split operation always creates exactly two batches\\n- **Plant Continuity**: All plants maintain their tracking through the split process\\n- **Internal Tracking**: Split operations for internal cultivation management only\\n- **State Compliance**: Does not affect official state traceability system records\\n- **Batch Requirements**: Source batch must contain multiple plants to enable splitting\",\n        \"operationId\": \"PlantNonstsSplitPost\",\n        \"requestBody\": {\n          \"description\": \"Immature plant batch split request with batch and split details - SplitImmaturePlantsRequest object\",\n          \"content\": {\n            \"application/json-patch+json\": {\n              \"schema\": {\n                \"$ref\": \"#/components/schemas/SplitImmaturePlantsRequest\"\n              }\n            },\n            \"application/json\": {\n              \"schema\": {\n                \"$ref\": \"#/components/schemas/SplitImmaturePlantsRequest\"\n              }\n            },\n            \"text/json\": {\n              \"schema\": {\n                \"$ref\": \"#/components/schemas/SplitImmaturePlantsRequest\"\n              }\n            },\n            \"application/*+json\": {\n              \"schema\": {\n                \"$ref\": \"#/components/schemas/SplitImmaturePlantsRequest\"\n              }\n            }\n          },\n          \"x-bodyName\": \"request\"\n        },\n        \"responses\": {\n          \"200\": {\n            \"description\": \"Success - Returns ApiResult<SplitImmaturePlantResult> with split batch details: `{ \\\"data\\\": { \\\"originalBatch\\\": {...}, \\\"newBatch\\\": {...} }, \\\"message\\\": \\\"Successfully split immature batches of plants.\\\", \\\"success\\\": true }`\",\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"$ref\": \"#/components/schemas/SplitImmaturePlantResultApiResult\"\n                }\n              }\n            }\n          },\n          \"400\": {\n            \"description\": \"Bad Request - Validation failed or invalid batch data\",\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"$ref\": \"#/components/schemas/BadRequestResponse\"\n                }\n              }\n            }\n          },\n          \"401\": {\n            \"description\": \"Unauthorized - Invalid or missing API key\"\n          },\n          \"403\": {\n            \"description\": \"Forbidden - Account not authorized for batch splitting\"\n          },\n          \"500\": {\n            \"description\": \"Internal Server Error - Server error occurred\"\n          }\n        }\n      }\n    },\n    \"/plant/nonsts/batch\": {\n      \"post\": {\n        \"tags\": [\"PlantNonsts\"],\n        \"summary\": \"Update Plant Batch (Non-State Tracking)\",\n        \"description\": \"**Purpose:** Update plant batch information such as strain or location for internal cultivation tracking without reporting to state traceability systems.\\n\\n**Request Requirements:**\\n- \\\"Inventory\\\" or \\\"Cultivation\\\" role authorization required for batch data modification\\n- `UpdateBatchRequest` object in request body with batch update details\\n- Content-Type: application/json\\n- Valid batch identification and field updates\\n- Feature flag \\\"rollout.trym-integration\\\" must be enabled\\n\\n**Response Data:**\\n- Returns HTTP 200 with no response body on success\\n- No data returned - operation confirmation only\\n- Status confirmation indicates successful batch update completion\\n\\n**Batch Update Capabilities:**\\n- **Strain Updates**: Modify strain information for entire plant batch\\n- **Location Updates**: Change cultivation location or room assignment for batch\\n- **Batch Properties**: Update other batch-level cultivation characteristics\\n- **Bulk Changes**: Apply updates to all plants within the specified batch\\n\\n**Sparse Update Behavior:**\\n- **Selective Updates**: Only provided fields in the request will be updated\\n- **Field Independence**: Each batch property can be updated independently\\n- **Preservation**: Omitted fields maintain their current values\\n- **Validation**: All provided updates validated before application\\n\\n**Non-State Tracking (NONSTS) Behavior:**\\n- **Internal Only**: Batch updates for internal cultivation tracking only\\n- **No External Reporting**: Changes NOT transmitted to state traceability systems\\n- **Cultivation Focus**: Designed for internal batch management and cultivation workflows\\n- **Compliance Safe**: Does not interfere with official state tracking requirements\\n\\n**Common Use Cases:**\\n- Update strain information when batch genetics are reclassified\\n- Move plant batches to different cultivation rooms or areas\\n- Modify batch properties for improved cultivation tracking\\n- Correct batch information for accurate facility management\\n- Support cultivation workflow batch organization requirements\\n\\n**Performance & Limits:**\\n- Single batch operation affecting all plants in the specified batch\\n- Validation performed before any batch changes\\n- Changes reflected immediately in internal cultivation systems\\n- Optimized for cultivation facility batch management workflows\\n\\n**Related Endpoints:**\\n- `POST /plant/nonsts/update` - Update individual plant data within batches\\n- `GET /plant` - Retrieve current plant and batch information\\n- `POST /plant/nonsts` - Create new plant batches with initial properties\\n\\n**Important Notes:**\\n- **Feature Gated**: Requires \\\"rollout.trym-integration\\\" feature flag to be enabled\\n- **Batch-Wide Impact**: Updates affect all plants within the specified batch\\n- **Internal Tracking**: Changes for internal cultivation management only\\n- **State Compliance**: Does not affect official state traceability system records\\n- **Cultivation Efficiency**: Streamlines batch-level cultivation management operations\",\n        \"operationId\": \"PlantNonstsBatchPost\",\n        \"requestBody\": {\n          \"description\": \"Batch update request with batch identification and field updates - UpdateBatchRequest object\",\n          \"content\": {\n            \"application/json-patch+json\": {\n              \"schema\": {\n                \"$ref\": \"#/components/schemas/UpdateBatchRequest\"\n              }\n            },\n            \"application/json\": {\n              \"schema\": {\n                \"$ref\": \"#/components/schemas/UpdateBatchRequest\"\n              }\n            },\n            \"text/json\": {\n              \"schema\": {\n                \"$ref\": \"#/components/schemas/UpdateBatchRequest\"\n              }\n            },\n            \"application/*+json\": {\n              \"schema\": {\n                \"$ref\": \"#/components/schemas/UpdateBatchRequest\"\n              }\n            }\n          },\n          \"x-bodyName\": \"request\"\n        },\n        \"responses\": {\n          \"200\": {\n            \"description\": \"Success\"\n          },\n          \"400\": {\n            \"description\": \"Bad Request - `BadRequestResponse` object with `message` string field (check `propertyErrors`: null for simple message, array for field-specific errors)\",\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"$ref\": \"#/components/schemas/BadRequestResponse\"\n                }\n              }\n            }\n          },\n          \"401\": {\n            \"description\": \"Invalid API Key\"\n          },\n          \"403\": {\n            \"description\": \"Account not authorized\"\n          },\n          \"500\": {\n            \"description\": \"Something went wrong.\"\n          }\n        }\n      }\n    },\n    \"/preorder/submit\": {\n      \"post\": {\n        \"tags\": [\"PreOrder\"],\n        \"summary\": \"Create PreOrder\",\n        \"description\": \"**Purpose:** Create a new customer pre-order by submitting cart items with customer information and fulfillment details.\\n\\n**Request Requirements:**\\n- \\\"PreOrder\\\" role authorization required for order creation\\n- `CreatePreOrderRequest` object in request body with complete order details\\n- Content-Type: application/json\\n- Valid customer ID that exists in the system\\n- **Idempotency Support**: Requires `ConsumerKey` header and `IdempotencyKey` field for duplicate prevention (see [Idempotency Documentation](/pages/idempotency.html))\\n\\n**Response Data:**\\n- Returns `PreOrderResponse` object with assigned order ID and transaction ID\\n- Order ID can be used for tracking and future order operations\\n- Transaction ID links to the transaction for fulfillment tracking\\n\\n**Required Request Information:**\\n- Valid CustomerId for the order recipient\\n- Array of cart items with products, quantities, and any special instructions\\n- Order source for tracking and reporting (Web, In-Store, Express)\\n- Fulfillment details with pickup or delivery information and timing\\n\\n**Order Sources Available:**\\n- Web: Online orders from e-commerce platforms\\n- In-Store: Orders placed directly at dispensary location\\n- Express: Expedited or curbside pickup orders\\n- Note: Order Source is deprecated and will be replaced with more comprehensive tracking values\\n\\n**Delivery Time Windows:**\\n- TimeWindowXXXDateUtc fields express desired delivery time windows\\n- May be expanded to pickup orders in the future\\n- Data exposed to locations with \\\"Delivery Management\\\" feature enabled\\n\\n**Redemptions Support:**\\n- Third-party loyalty redemptions and LeafLogix discount codes supported\\n- Valid types: SpringBig Rewards/Offers, Alpine IQ, LeafLogix Codes, Fyllo\\n- Redemption ID should be discount code, reward ID, offer ID, or template ID\\n\\n**Common Use Cases:**\\n- Process e-commerce orders from online platforms\\n- Create pickup orders for customer convenience\\n- Handle delivery orders with specified time windows\\n- Apply loyalty rewards and promotional discounts\\n- Enable customers to secure products before visiting store\\n\\n**Performance & Limits:**\\n- Uses idempotency key to prevent duplicate order creation\\n- Product validation ensures availability and purchase limits\\n- Customer verification confirms validity for location\\n- Compliance checking for local regulations and restrictions\\n\\n**Related Endpoints:**\\n- `POST /preorder/price-cart` - Calculate pricing before order submission\\n- `POST /transaction/create-anonymous` - Anonymous customers without full profiles\\n\\n\\n**Important Notes:**\\n- Payment occurs later at pickup/delivery, not during order creation\\n- System validates product availability and customer purchase limits\\n- Customer must exist and be valid for the authenticated location\\n- Orders must comply with local regulations and purchase restrictions\\n- Use IdempotencyKey to prevent duplicate order creation\",\n        \"operationId\": \"PreorderSubmitPost\",\n        \"requestBody\": {\n          \"description\": \"Pre-order details including customer, cart items, and fulfillment information - CreatePreOrderRequest object\",\n          \"content\": {\n            \"application/json-patch+json\": {\n              \"schema\": {\n                \"$ref\": \"#/components/schemas/CreatePreOrderRequest\"\n              }\n            },\n            \"application/json\": {\n              \"schema\": {\n                \"$ref\": \"#/components/schemas/CreatePreOrderRequest\"\n              }\n            },\n            \"text/json\": {\n              \"schema\": {\n                \"$ref\": \"#/components/schemas/CreatePreOrderRequest\"\n              }\n            },\n            \"application/*+json\": {\n              \"schema\": {\n                \"$ref\": \"#/components/schemas/CreatePreOrderRequest\"\n              }\n            }\n          },\n          \"x-bodyName\": \"req\"\n        },\n        \"responses\": {\n          \"200\": {\n            \"description\": \"Success - Returns orderId and transactionId for the created pre-order\",\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"type\": \"integer\",\n                  \"format\": \"int32\"\n                }\n              }\n            }\n          },\n          \"400\": {\n            \"description\": \"Bad Request - `BadRequestResponse` object with `message` string field (check `propertyErrors`: null for simple message, array for field-specific errors)\",\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"$ref\": \"#/components/schemas/BadRequestResponse\"\n                }\n              }\n            }\n          },\n          \"500\": {\n            \"description\": \"Internal Server Error - Server error occurred\"\n          }\n        }\n      }\n    },\n    \"/preorder/update\": {\n      \"post\": {\n        \"tags\": [\"PreOrder\"],\n        \"summary\": \"Update PreOrder\",\n        \"description\": \"**✏️ Purpose:** Modify an existing pre-order's items, delivery information, notes, or redemptions.\\n\\n**🔄 Updatable Fields:**\\n- **Cart Items:** Add, remove, or modify product quantities and special instructions\\n- **Order Notes:** Update customer notes or special handling instructions\\n- **Delivery Information:** Change delivery address or timing preferences\\n- **Loyalty Redemptions:** Add, remove, or modify applied discounts and rewards\\n- **Order Source:** Update tracking source information\\n\\n**🚫 Non-Updatable Fields:**\\n- **Customer ID:** Cannot transfer order to different customer\\n- **Idempotency Key:** Cannot modify unique transaction identifier\\n- **Order ID:** Core order identifier remains fixed\\n\\n**📋 Update Behavior:**\\n- **Redemptions:** If redemptions field is omitted, existing redemptions are preserved\\n- **Items:** Complete replacement of cart items with provided array\\n- **Delivery:** Updates only if delivery information is provided\\n- **Incremental Changes:** Only provided fields are modified\\n\\n**⏰ Update Restrictions:**\\nOrders can only be updated while in specific states:\\n- ✅ **Submitted/Pending:** Full updates allowed\\n- ✅ **Processing:** Limited updates may be available\\n- ❌ **Filled/Complete:** No updates permitted\\n- ❌ **Checked Out:** Payment completed, updates blocked\\n\\n**🎯 Common Use Cases:**\\n- **Cart Modifications:** Customer wants to add/remove items before fulfillment\\n- **Address Changes:** Update delivery location for customer convenience\\n- **Special Instructions:** Add preparation notes or customer preferences\\n- **Discount Updates:** Apply newly available promotions or loyalty rewards\\n- **Fulfillment Changes:** Switch between pickup and delivery options\\n\\n**🔧 Request Format:**\\nProvide an `UpdatePreOrderRequest` object with OrderId and the fields to be updated.\\n\\n**⚠️ Important Notes:**\\n- **Status Check:** Use the status endpoint to verify order is still updateable\\n- **Inventory Impact:** Item changes may affect product availability\\n- **Pricing Recalculation:** Updates may change order totals and taxes\\n- **Delivery Validation:** Address changes subject to delivery zone verification\",\n        \"operationId\": \"PreorderUpdatePost\",\n        \"requestBody\": {\n          \"description\": \"Update details including OrderId and fields to be modified\",\n          \"content\": {\n            \"application/json-patch+json\": {\n              \"schema\": {\n                \"$ref\": \"#/components/schemas/UpdatePreOrderRequest\"\n              }\n            },\n            \"application/json\": {\n              \"schema\": {\n                \"$ref\": \"#/components/schemas/UpdatePreOrderRequest\"\n              }\n            },\n            \"text/json\": {\n              \"schema\": {\n                \"$ref\": \"#/components/schemas/UpdatePreOrderRequest\"\n              }\n            },\n            \"application/*+json\": {\n              \"schema\": {\n                \"$ref\": \"#/components/schemas/UpdatePreOrderRequest\"\n              }\n            }\n          },\n          \"x-bodyName\": \"req\"\n        },\n        \"responses\": {\n          \"200\": {\n            \"description\": \"Success - Order updated successfully\"\n          },\n          \"400\": {\n            \"description\": \"Bad Request - Empty response body (handle via HTTP status code only)\"\n          },\n          \"404\": {\n            \"description\": \"Not Found - Order ID does not exist\"\n          },\n          \"500\": {\n            \"description\": \"Internal Server Error - Server error occurred\"\n          }\n        }\n      }\n    },\n    \"/preorder/cancel\": {\n      \"post\": {\n        \"tags\": [\"PreOrder\"],\n        \"summary\": \"Cancel PreOrder\",\n        \"description\": \"**❌ Purpose:** Cancel an existing pre-order and release any reserved inventory.\\n\\n**🔍 Cancellation Requirements:**\\nOrder must be in a cancellable state - use the status endpoint to verify before attempting cancellation.\\n\\n**✅ Cancellable States:**\\n- **Submitted/Pending:** Order not yet started by staff\\n- **Processing:** Order in early preparation stages (may vary by location)\\n\\n**🚫 Non-Cancellable States:**\\n- **Checked Out:** Payment has been processed\\n- **Filled/Complete:** Order fulfillment finished\\n- **Partially Filled:** Some items already prepared/dispensed\\n- **In Transit:** Delivery orders already out for delivery\\n\\n**🔄 Cancellation Effects:**\\n- **Inventory Release:** Reserved items returned to available inventory\\n- **Payment Handling:** Refunds processed according to payment method\\n- **Loyalty Redemptions:** Applied rewards/discounts are restored to customer account\\n- **Order Status:** Permanently marked as cancelled\\n- **Customer Notification:** Automated notifications sent if configured\\n\\n**🎯 Common Cancellation Reasons:**\\n- **Customer Request:** Customer no longer wants the order\\n- **Inventory Issues:** Items became unavailable after order placement\\n- **Payment Problems:** Payment processing failed or was declined\\n- **Delivery Issues:** Address problems or delivery zone restrictions\\n- **Business Operations:** Store closure or emergency situations\\n\\n**🔧 Request Format:**\\nProvide a `CancelPreOrderRequest` object with the OrderId to cancel.\\n\\n**Performance & Limits:**\\n- Rate limited to 240 requests per minute for order management protection\\n- Single order cancellation operation for targeted processing\\n- Immediate inventory and payment processing upon successful cancellation\\n\\n**⚠️ Important Notes:**\\n- **Irreversible Action:** Cancelled orders cannot be restored or reactivated\\n- **Status Verification:** Always check cancellable status before attempting cancellation\\n- **Refund Processing:** Payment refunds may take time depending on payment method\\n- **Inventory Impact:** Cancellation immediately releases reserved inventory\\n- **Customer Communication:** Consider notifying customer of cancellation reason\",\n        \"operationId\": \"PreorderCancelPost\",\n        \"requestBody\": {\n          \"description\": \"Cancellation request containing the OrderId to cancel\",\n          \"content\": {\n            \"application/json-patch+json\": {\n              \"schema\": {\n                \"$ref\": \"#/components/schemas/CancelPreorderRequest\"\n              }\n            },\n            \"application/json\": {\n              \"schema\": {\n                \"$ref\": \"#/components/schemas/CancelPreorderRequest\"\n              }\n            },\n            \"text/json\": {\n              \"schema\": {\n                \"$ref\": \"#/components/schemas/CancelPreorderRequest\"\n              }\n            },\n            \"application/*+json\": {\n              \"schema\": {\n                \"$ref\": \"#/components/schemas/CancelPreorderRequest\"\n              }\n            }\n          },\n          \"x-bodyName\": \"req\"\n        },\n        \"responses\": {\n          \"200\": {\n            \"description\": \"Success - Order cancelled successfully\",\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"type\": \"integer\",\n                  \"format\": \"int32\"\n                }\n              }\n            }\n          },\n          \"400\": {\n            \"description\": \"Bad Request - Empty response body (handle via HTTP status code only)\"\n          },\n          \"404\": {\n            \"description\": \"Not Found - Order ID does not exist\"\n          },\n          \"500\": {\n            \"description\": \"Internal Server Error - Server error occurred\",\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"type\": \"string\"\n                }\n              }\n            }\n          }\n        }\n      }\n    },\n    \"/preorder/Status\": {\n      \"get\": {\n        \"tags\": [\"PreOrder\"],\n        \"summary\": \"Get PreOrder Status\",\n        \"description\": \"**📊 Purpose:** Retrieve current status and details for pre-orders to track fulfillment progress.\\n\\n**🔍 Query Options:**\\n- **Specific Order:** Provide PreOrderId to get detailed status for a single order\\n- **All Open Orders:** Omit PreOrderId to retrieve all recent active orders (last 14 days)\\n- **Line Item Details:** Set includeLineItems=true for detailed product information (requires PreOrderId)\\n\\n**📋 Status Information Returned:**\\n- **Order Details:** Order ID, transaction ID, customer information, timestamps\\n- **Current Status:** Order state (Submitted, Processing, Filled, Complete, Cancelled)\\n- **Fulfillment Info:** Pickup/delivery details, estimated completion times\\n- **Update Permissions:** Whether order can still be modified or cancelled\\n- **Payment Status:** Payment processing state and totals\\n- **Line Items:** Product details, quantities, allocated inventory (when requested)\\n\\n**📦 Order Status States:**\\n- **Submitted:** Order received and queued for processing\\n- **Processing:** Staff actively preparing order items\\n- **Filled:** All items prepared and ready for customer\\n- **Complete:** Customer has received order (pickup/delivery completed)\\n- **Cancelled:** Order cancelled and inventory released\\n\\n**⚡ Performance Features:**\\n- **Optimized for Real-Time:** Designed for frequent status checking and monitoring\\n- **Batch Queries:** Retrieve multiple order statuses efficiently without PreOrderId\\n- **Selective Detail:** Choose level of detail needed with includeLineItems parameter\\n\\n**🎯 Common Use Cases:**\\n- **Customer Updates:** Provide real-time order progress to customers\\n- **Operations Dashboard:** Monitor all active orders across fulfillment workflow\\n- **Integration Sync:** Keep external systems updated with current order states\\n- **Customer Service:** Quick lookup of order status for support inquiries\\n- **Automated Notifications:** Trigger customer alerts based on status changes\\n\\n**⚠️ Important Notes:**\\n- **Line Item Restriction:** includeLineItems requires a specific PreOrderId\\n- **Recent Orders Filter:** Bulk queries return orders from last 14 days only\\n- **Location Scoped:** Results filtered to authenticated user's location\\n- **Real-Time Data:** Status reflects current state, may change during fulfillment\",\n        \"operationId\": \"PreorderStatusGet\",\n        \"parameters\": [\n          {\n            \"name\": \"PreOrderId\",\n            \"in\": \"query\",\n            \"description\": \"Specific order ID to retrieve status for (optional - omit for all open orders)\",\n            \"schema\": {\n              \"type\": \"integer\",\n              \"format\": \"int32\"\n            }\n          },\n          {\n            \"name\": \"includeLineItems\",\n            \"in\": \"query\",\n            \"description\": \"Include detailed product line item information (requires PreOrderId)\",\n            \"schema\": {\n              \"type\": \"boolean\",\n              \"default\": false\n            }\n          }\n        ],\n        \"responses\": {\n          \"200\": {\n            \"description\": \"Success - Returns PreOrderStatus object(s) with current order information\",\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"$ref\": \"#/components/schemas/PreOrderStatus\"\n                }\n              }\n            }\n          },\n          \"400\": {\n            \"description\": \"Bad Request - Empty response body (handle via HTTP status code only)\"\n          },\n          \"500\": {\n            \"description\": \"Internal Server Error - Server error occurred\"\n          }\n        }\n      }\n    },\n    \"/preorder/price-cart\": {\n      \"post\": {\n        \"tags\": [\"PreOrder\"],\n        \"summary\": \"Calculate Cart Pricing\",\n        \"description\": \"**💰 Purpose:** Calculate accurate pricing for a cart before order submission, including taxes, discounts, and final totals.\\n\\n**📋 Required Information:**\\n- **Customer Identity:** Either CustomerId (existing customer) OR CustomerTypeId (customer category)\\n- **Cart Items:** Array of products with quantities to be priced\\n- **Fulfillment Type:** Specify if delivery pricing applies (affects taxes/fees)\\n\\n**💵 Pricing Components Calculated:**\\n- **Subtotal:** Base product prices multiplied by quantities\\n- **Taxes:** Location-specific tax rates applied to taxable items\\n- **Discounts:** Customer-specific pricing, loyalty discounts, promotional offers\\n- **Delivery Fees:** Additional charges for delivery service (if applicable)\\n- **Final Total:** Complete order amount including all fees and adjustments\\n\\n**🎯 Customer Pricing Options:**\\n- **Existing Customer:** Use CustomerId for personalized pricing and loyalty benefits\\n- **Customer Type:** Use CustomerTypeId for category-based pricing (Medical, Recreational, etc.)\\n- **Delivery Context:** Set IsDelivery=true to include delivery-specific pricing\\n\\n**🔍 Pricing Accuracy:**\\n- **Real-Time Calculations:** Pricing reflects current product costs and tax rates\\n- **Location-Specific:** Taxes and fees calculated based on dispensary location\\n- **Customer-Specific:** Applies individual discounts, loyalty rewards, and membership benefits\\n- **Delivery Zones:** Delivery fees calculated based on customer address when provided\\n\\n**🎯 Common Use Cases:**\\n- **Cart Preview:** Show customers accurate totals before checkout\\n- **Price Comparison:** Compare costs across different customer types or delivery options\\n- **Integration Sync:** Keep external e-commerce platforms synchronized with current pricing\\n- **Customer Service:** Provide accurate quotes for customer inquiries\\n- **Mobile Apps:** Real-time cart totals for mobile ordering experiences\\n\\n**🔧 Request Format:**\\nProvide a `PriceCartRequest` object with customer information, cart items, and delivery preferences.\\n\\n**Performance & Limits:**\\n- Rate limited to 240 requests per minute for pricing calculation protection\\n- Real-time pricing calculations optimized for responsive user experience\\n- Single cart operation for immediate pricing feedback\\n\\n**⚠️ Important Notes:**\\n- **Unique Products:** Each product should only appear once in the cart array\\n- **Customer Requirement:** Must specify either CustomerId OR CustomerTypeId (not both)\\n- **Pricing Volatility:** Prices may change between calculation and order submission\\n- **Location Dependency:** Pricing is specific to the authenticated dispensary location\\n- **Address Impact:** Delivery address affects tax calculations and delivery fees\",\n        \"operationId\": \"PreorderPrice-cartPost\",\n        \"requestBody\": {\n          \"description\": \"Pricing request containing customer information, cart items, and delivery preferences\",\n          \"content\": {\n            \"application/json-patch+json\": {\n              \"schema\": {\n                \"$ref\": \"#/components/schemas/PriceCartRequest\"\n              }\n            },\n            \"application/json\": {\n              \"schema\": {\n                \"$ref\": \"#/components/schemas/PriceCartRequest\"\n              }\n            },\n            \"text/json\": {\n              \"schema\": {\n                \"$ref\": \"#/components/schemas/PriceCartRequest\"\n              }\n            },\n            \"application/*+json\": {\n              \"schema\": {\n                \"$ref\": \"#/components/schemas/PriceCartRequest\"\n              }\n            }\n          },\n          \"x-bodyName\": \"req\"\n        },\n        \"responses\": {\n          \"200\": {\n            \"description\": \"Success - Returns detailed pricing breakdown for the cart\",\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"$ref\": \"#/components/schemas/CartPrice\"\n                }\n              }\n            }\n          },\n          \"400\": {\n            \"description\": \"Bad Request - String error message (parse response body as plain text)\",\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"type\": \"string\"\n                }\n              }\n            }\n          },\n          \"500\": {\n            \"description\": \"Internal Server Error - Server error occurred during pricing calculation\"\n          }\n        }\n      }\n    },\n    \"/pricing-tiers\": {\n      \"get\": {\n        \"tags\": [\"PricingTier\"],\n        \"summary\": \"Get Pricing Tiers\",\n        \"description\": \"**Purpose:** Retrieves the complete list of pricing tiers available for the authenticated organization for product pricing strategy and customer segmentation.\\n\\n**Request Requirements:**\\n- Any authenticated role authorization (no specific role required)\\n- No query parameters or request body needed\\n\\n**Response Data:**\\n- Returns array of pricing tier objects: `[{ PricingTier }, ...]`\\n- Array typically contains 2-8 pricing tiers per organization\\n- Returns empty array `[]` if no pricing tiers configured (rare)\\n- Includes tier ID, name, and configuration details\\n- Organization-level pricing tiers for customer segmentation (e.g., \\\"Retail\\\", \\\"Wholesale\\\", \\\"Medical\\\", \\\"VIP\\\")\\n- Results filtered to authenticated organization level\\n\\n**Common Use Cases:**\\n- Configure product pricing based on customer tier assignments\\n- Support tiered pricing strategies for different customer segments\\n- Populate pricing tier dropdown lists in customer management forms\\n- Validate pricing tier assignments in product and order management systems\\n- Generate tier-specific pricing reports and analytics\\n- Enable dynamic pricing based on customer classifications\\n\\n**Performance & Limits:**\\n- Lightweight reference data optimized for frequent access\\n- Small dataset suitable for client-side caching\\n- No pagination needed due to limited number of pricing tiers\\n- Results consistent across all locations within organization\\n\\n**Related Endpoints:**\\n- `GET /products` - Get products with tier-based pricing\\n- `GET /customer/customer-types` - Get customer types that may use pricing tiers\\n- Pricing calculation endpoints that utilize these tiers\\n\\n**Important Notes:**\\n- Pricing tiers are defined at organization level (LSP) not location level\\n- Essential for implementing tiered pricing strategies and customer segmentation\\n- Used for dynamic pricing calculations based on customer classifications\\n- Supports business models with wholesale, retail, and VIP pricing structures\\n- May be used in conjunction with customer types for comprehensive pricing strategies\",\n        \"operationId\": \"Pricing-tiersGet\",\n        \"responses\": {\n          \"200\": {\n            \"description\": \"Success - Returns array of pricing tier objects: `[{ PricingTier }, ...]`\",\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"type\": \"array\",\n                  \"items\": {\n                    \"$ref\": \"#/components/schemas/PricingTier\"\n                  }\n                }\n              }\n            }\n          },\n          \"401\": {\n            \"description\": \"Unauthorized - Invalid or missing API key\"\n          },\n          \"403\": {\n            \"description\": \"Forbidden - Account not authorized\"\n          },\n          \"500\": {\n            \"description\": \"Internal Server Error - Server error occurred\"\n          }\n        }\n      }\n    },\n    \"/producers\": {\n      \"get\": {\n        \"tags\": [\"Producer\"],\n        \"summary\": \"Get Producers\",\n        \"description\": \"**Purpose:** Retrieve basic producer identification information for product attribution and reference data needs.\\n\\n**Request Requirements:**\\n- Valid authentication required for producer data access\\n- No request body needed\\n- No query parameters required\\n\\n**Response Data:**\\n- Returns array of producer objects: `[{ Producer }, ...]`\\n- Array typically contains 1-50 producers per organization\\n- Returns empty array `[]` if no producers configured (rare)\\n- Producer details include basic identification information only\\n- Results automatically filtered to authenticated organization and exclude deleted records\\n\\n**Producer Information:**\\n- **Producer ID**: Unique identifier for the producer\\n- **Producer Name**: Display name of the producer\\n\\n**Common Use Cases:**\\n- Populate producer dropdown lists in product management forms\\n- Display producer names for product attribution and branding\\n- Support basic producer identification in product catalogs\\n- Enable producer-based filtering and organization in product displays\\n- Provide producer reference data for product creation workflows\\n\\n**Performance & Limits:**\\n- Lightweight reference data optimized for frequent access\\n- Organization-scoped results for operational relevance and security\\n- Small dataset suitable for client-side caching\\n- Essential reference data for basic producer identification\\n\\n**Related Endpoints:**\\n- `GET /products` - View products that include producer information\\n- `GET /brands` - Related brand information for product attribution\\n- `GET /vendors` - Related vendor information and business relationships\\n\\n**Important Notes:**\\n- **Basic Reference Data**: Provides minimal producer identification information\\n- **Organization Scoped**: Results filtered to authenticated organization level and exclude deleted records\\n- **Limited Data**: Only includes producer ID and name - no licensing, contact, or compliance details\\n- **Product Attribution**: Enables basic producer attribution for product displays\",\n        \"operationId\": \"ProducersGet\",\n        \"responses\": {\n          \"200\": {\n            \"description\": \"Success - Returns array of producer objects: `[{ Producer }, ...]`\",\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"type\": \"array\",\n                  \"items\": {\n                    \"$ref\": \"#/components/schemas/Producer\"\n                  }\n                }\n              }\n            }\n          },\n          \"401\": {\n            \"description\": \"Unauthorized - Invalid or missing API key\"\n          },\n          \"403\": {\n            \"description\": \"Forbidden - Account not authorized\"\n          },\n          \"500\": {\n            \"description\": \"Internal Server Error - Server error occurred\"\n          }\n        }\n      }\n    },\n    \"/products/location-overrides\": {\n      \"get\": {\n        \"tags\": [\"Product\"],\n        \"summary\": \"Get Location Product Overrides\",\n        \"description\": \"**Purpose:** Retrieve all location-specific product overrides for pricing, availability, and display customization at the current location.\\n\\n**Request Requirements:**\\n- \\\"Inventory\\\" role authorization required for product override data access\\n- No query parameters required\\n- No request body needed\\n\\n**Response Data:**\\n- Returns array of `LocationProductOverride` objects with location-specific settings\\n- Array typically contains 50-5,000+ overrides depending on location customization\\n- Returns empty array `[]` if no overrides exist for the location (not null)\\n- If a field is `null`, then the product master version of that field applies\\n- Includes pricing overrides, availability settings, and display configurations\\n- Results automatically filtered to authenticated location\\n\\n**Override Behavior:**\\n- **Null Fields**: When override field is null, the product master value is used\\n- **Set Fields**: When override field has a value, it replaces the master value\\n- **Location Specific**: Overrides only apply to the authenticated location\\n- **Inheritance**: Non-overridden fields inherit from product master data\\n\\n**Common Use Cases:**\\n- Retrieve location-specific pricing for multi-location businesses\\n- Get availability overrides for location inventory management\\n- Access display customizations for location-specific product presentation\\n- Synchronize location overrides with external point-of-sale systems\\n- Generate location-specific product catalogs and pricing sheets\\n\\n**Performance & Limits:**\\n- Optimized for location-specific product management workflows\\n- Results filtered automatically to current location scope\\n- Efficient for multi-location businesses with location-specific pricing\\n- Consider caching for frequent access to override data\\n\\n**Related Endpoints:**\\n- `POST /products/location-overrides` - Create or update location overrides\\n- `GET /products` - Get product master data with default values\\n- `GET /inventory` - Get current inventory levels for overridden products\\n\\n**Important Notes:**\\n- **Inheritance Model**: Null override fields inherit from product master data\\n- **Location Scoped**: Results automatically filtered to authenticated location\\n- **Override Priority**: Location overrides take precedence over master product data\\n- **Multi-Location**: Essential for businesses operating multiple dispensary locations\\n- **Pricing Control**: Enables location-specific pricing strategies and market adaptation\",\n        \"operationId\": \"ProductsLocation-overridesGet\",\n        \"responses\": {\n          \"200\": {\n            \"description\": \"Success\",\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"type\": \"array\",\n                  \"items\": {\n                    \"$ref\": \"#/components/schemas/LocationProductOverride\"\n                  }\n                }\n              }\n            }\n          },\n          \"401\": {\n            \"description\": \"Invalid API Key\"\n          },\n          \"403\": {\n            \"description\": \"Account not authorized\"\n          },\n          \"500\": {\n            \"description\": \"Something went wrong.\"\n          }\n        }\n      },\n      \"post\": {\n        \"tags\": [\"Product\"],\n        \"summary\": \"Create or Update Location Product Overrides\",\n        \"description\": \"**Purpose:** Create or update location-specific product overrides for pricing, availability, and display customization to support multi-location business operations.\\n\\n**Request Requirements:**\\n- \\\"Inventory\\\" role authorization required for product override modification\\n- Array of `LocationProductOverrideRequest` objects in request body\\n- Content-Type: application/json\\n- Valid ProductId required for each override\\n\\n**Response Data:**\\n- Returns HTTP 200 with no response body on success\\n- No data returned - operation confirmation only\\n- Returns HTTP 400 with validation errors if request data is invalid\\n- Partial success possible: some overrides may save even if others fail\\n\\n**Create vs Update Behavior:**\\n- **CREATE**: When no existing override exists for the ProductId at this location, a new override is created\\n- **UPDATE**: When an override already exists for the ProductId at this location, it is updated\\n- **Identification**: Override existence determined by ProductId and authenticated location\\n- **Automatic Detection**: System automatically determines create vs update based on existing data\\n\\n**Sparse Update Behavior:**\\n- **Omitted Fields**: Retain their current override value (no change)\\n- **Null Values**: Remove the override for that field (product master value will apply)\\n- **Set Values**: Update the override with the provided value\\n- **Field Independence**: Each field can be updated independently without affecting others\\n\\n**Override Management:**\\n- **Removal**: Set fields to null to remove overrides and revert to product master values\\n- **Addition**: Set fields to specific values to create new overrides\\n- **Location Scoped**: All overrides apply only to the authenticated location\\n- **Dual Pricing**: Automatically handles recreational price sync when dual pricing is disabled\\n\\n**Common Use Cases:**\\n- Set location-specific pricing for multi-location businesses\\n- Override product availability for location inventory management\\n- Customize product display settings for location-specific presentation\\n- Manage location-based pricing strategies and market adaptation\\n- Synchronize pricing changes from external systems to specific locations\\n\\n**Performance & Limits:**\\n- Batch processing for efficient multi-product override updates\\n- Validation performed before any changes to ensure data integrity\\n- Partial success handling: some overrides may succeed even if others fail\\n- Optimized for location-specific product management workflows\\n\\n**Related Endpoints:**\\n- `GET /products/location-overrides` - Retrieve current location overrides\\n- `GET /products` - Get product master data for comparison\\n- `GET /inventory` - Check inventory levels for overridden products\\n\\n**Important Notes:**\\n- **Partial Success**: Some overrides may save successfully even if others fail validation\\n- **Null Behavior**: Setting fields to null removes overrides and reverts to master data\\n- **Location Isolation**: Overrides only affect the authenticated location\\n- **Validation Required**: All ProductIds must exist and be valid for the location\\n- **Dual Pricing Sync**: Recreational prices automatically sync with medical when dual pricing disabled\",\n        \"operationId\": \"ProductsLocation-overridesPost\",\n        \"requestBody\": {\n          \"description\": \"Array of location product override requests with ProductId and override values - LocationProductOverrideRequest objects\",\n          \"content\": {\n            \"application/json-patch+json\": {\n              \"schema\": {\n                \"type\": \"array\",\n                \"items\": {\n                  \"$ref\": \"#/components/schemas/LocationProductOverrideRequest\"\n                }\n              }\n            },\n            \"application/json\": {\n              \"schema\": {\n                \"type\": \"array\",\n                \"items\": {\n                  \"$ref\": \"#/components/schemas/LocationProductOverrideRequest\"\n                }\n              }\n            },\n            \"text/json\": {\n              \"schema\": {\n                \"type\": \"array\",\n                \"items\": {\n                  \"$ref\": \"#/components/schemas/LocationProductOverrideRequest\"\n                }\n              }\n            },\n            \"application/*+json\": {\n              \"schema\": {\n                \"type\": \"array\",\n                \"items\": {\n                  \"$ref\": \"#/components/schemas/LocationProductOverrideRequest\"\n                }\n              }\n            }\n          },\n          \"x-bodyName\": \"updates\"\n        },\n        \"responses\": {\n          \"200\": {\n            \"description\": \"Success\"\n          },\n          \"400\": {\n            \"description\": \"Bad Request - `BadRequestResponse` object with `message` string field (check `propertyErrors`: null for simple message, array for field-specific errors)\"\n          },\n          \"401\": {\n            \"description\": \"Invalid API Key\"\n          },\n          \"403\": {\n            \"description\": \"Account not authorized\"\n          },\n          \"500\": {\n            \"description\": \"Something went wrong. One or more overrides may have been saved\"\n          }\n        }\n      }\n    },\n    \"/products\": {\n      \"get\": {\n        \"tags\": [\"Product\"],\n        \"summary\": \"Get Products\",\n        \"description\": \"**Purpose:** Retrieve comprehensive product catalog information for API-enabled products, regardless of current inventory levels.\\n\\n**Request Requirements:**\\n- \\\"Inventory\\\" role authorization required for product data access\\n- Optional query parameters for filtering results\\n- No request body needed\\n\\n**Response Data:**\\n- Returns array of product objects: `[{ ProductDetail }, ...]`\\n- Array may contain 0 to 10,000+ products depending on location inventory size\\n- Returns empty array `[]` if no products match criteria (not null)\\n- Product details including SKU, name, description, category, brand, strain information\\n- Pricing data with retail and medical pricing, tax rates, discount eligibility\\n- Classification data including product types, categories, regulatory classifications\\n- Lab results with potency data, cannabinoid profiles, test results when available\\n- Inventory data showing stock levels and availability status\\n- Media assets including product images and visual content\\n- Compliance data with external IDs, producer information, regulatory data\\n\\n**Filtering Options:**\\n- No parameters: Returns all API-enabled products for the location\\n- fromLastModifiedDateUTC: Returns products modified after this date for incremental sync\\n- isActive: Filter by active status (true/false/null for all)\\n\\n**Product Filtering Logic:**\\n- Only products specifically enabled for API access are returned\\n- Only includes products with online availability enabled (onlyOnlineAvailable = true)\\n- Products returned even if currently out of stock\\n- Results automatically filtered to authenticated user's location only\\n\\n**Common Use Cases:**\\n- Get complete product catalog for first-time integration setup\\n- Use incremental updates with fromLastModifiedDateUTC to sync only recent changes\\n- Populate e-commerce online store with complete product information\\n- Maintain up-to-date product database for point-of-sale systems\\n- Build dispensary menus with detailed product information\\n- Analyze product catalog for purchasing and inventory planning decisions\\n\\n**Performance & Limits:**\\n- Use incremental sync with fromLastModifiedDateUTC for regular updates to minimize data transfer\\n- Filter by isActive=true to exclude discontinued products for better performance\\n- Run full catalog sync during off-peak hours for optimal performance\\n- Large product catalogs may require pagination in future versions\\n\\n**Related Endpoints:**\\n- `GET /inventory` - Current stock levels for products with available inventory\\n- `GET /products/strains` - Strain-specific information and genetics data\\n- `GET /products/external-categories` - Product categorization and classification data\\n\\n**Important Notes:**\\n- This endpoint respects the \\\"API access\\\" setting on products for access control\\n- Returns only online-available products (excludes products not enabled for online sales)\\n- Response includes comprehensive product information for full integration capabilities\\n- Products are automatically filtered to the authenticated location\",\n        \"operationId\": \"ProductsGet\",\n        \"parameters\": [\n          {\n            \"name\": \"fromLastModifiedDateUTC\",\n            \"in\": \"query\",\n            \"description\": \"Optional date filter to return only products modified after this timestamp - Used for incremental sync\",\n            \"schema\": {\n              \"type\": \"string\",\n              \"format\": \"date-time\"\n            }\n          },\n          {\n            \"name\": \"isActive\",\n            \"in\": \"query\",\n            \"description\": \"Optional status filter - true for active products only, false for inactive only, null for all products\",\n            \"schema\": {\n              \"type\": \"boolean\"\n            }\n          }\n        ],\n        \"responses\": {\n          \"200\": {\n            \"description\": \"Success - Returns array of product objects: `[{ ProductDetail }, ...]`\",\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"type\": \"array\",\n                  \"items\": {\n                    \"$ref\": \"#/components/schemas/ProductDetail\"\n                  }\n                }\n              }\n            }\n          },\n          \"401\": {\n            \"description\": \"Unauthorized - Invalid or missing API key\"\n          },\n          \"403\": {\n            \"description\": \"Forbidden - Account not authorized for inventory access\"\n          },\n          \"500\": {\n            \"description\": \"Internal Server Error - Server error occurred\"\n          }\n        }\n      }\n    },\n    \"/products/product\": {\n      \"post\": {\n        \"tags\": [\"Product\"],\n        \"summary\": \"Create or Update Product\",\n        \"description\": \"**Purpose:** Creates a new product or updates an existing product with comprehensive product information for inventory management.\\n\\n**Request Requirements:**\\n- \\\"Inventory\\\" role authorization required for product data access\\n- `ProductDetailUpload` object in request body with product details\\n- Content-Type: application/json\\n- SKU and ProductName required for new products\\n\\n**Response Data:**\\n- Returns single `ProductDetail` object (not array) with updated product information\\n- Response format: `{ ProductDetail }`\\n- Includes assigned product ID for new products or updated ID for existing products\\n- Complete product information with all fields populated\\n\\n**CRITICAL DATA LOSS WARNING:**\\nMost fields will be overwritten with null/zero values if not provided in the request.\\nRECOMMENDED APPROACH: First GET the existing product, modify only the fields you want to change, then POST the complete object back.\\n\\n**Required Fields:**\\n- For CREATE: SKU and ProductName are required\\n- For UPDATE: Only ProductId is required (SKU and ProductName can be omitted to preserve existing values)\\n\\n**Field Behavior:**\\n- Optional<T> Fields: Can be explicitly set to null or omitted to preserve existing values\\n- Regular Fields: Will be set to null/zero if omitted, potentially causing data loss\\n- Exception: Fields like SKU and ProductName preserve existing values when omitted during updates\\n\\n**Common Use Cases:**\\n- Add new products to the catalog for inventory management\\n- Update existing product information when details change\\n- Synchronize product data from external inventory systems\\n- Bulk product updates for pricing or categorization changes\\n- Maintain accurate product information for compliance and sales\\n\\n**Performance & Limits:**\\n- Single product operation for targeted updates\\n- Immediate validation and response\\n- Changes reflected immediately in product catalogs\\n- Consider using GET before POST to avoid data loss\\n\\n**Related Endpoints:**\\n- `GET /products` - Retrieve existing product data before updates\\n- `GET /brand` - Get valid brand IDs for product association\\n- `GET /strains` - Get valid strain IDs for product classification\\n\\n**Important Notes:**\\n- Data loss risk: Always retrieve existing product data before updates\\n- Product ID assignment for successful new product creation\\n- Validation performed before creation/update to ensure data integrity\\n- Changes propagate to inventory and sales systems immediately\",\n        \"operationId\": \"ProductsProductPost\",\n        \"requestBody\": {\n          \"description\": \"Product information to create or update - ProductDetailUpload object with product details\",\n          \"content\": {\n            \"application/json-patch+json\": {\n              \"schema\": {\n                \"$ref\": \"#/components/schemas/ProductDetailUpload\"\n              }\n            },\n            \"application/json\": {\n              \"schema\": {\n                \"$ref\": \"#/components/schemas/ProductDetailUpload\"\n              }\n            },\n            \"text/json\": {\n              \"schema\": {\n                \"$ref\": \"#/components/schemas/ProductDetailUpload\"\n              }\n            },\n            \"application/*+json\": {\n              \"schema\": {\n                \"$ref\": \"#/components/schemas/ProductDetailUpload\"\n              }\n            }\n          },\n          \"x-bodyName\": \"product\"\n        },\n        \"responses\": {\n          \"200\": {\n            \"description\": \"Success\",\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"$ref\": \"#/components/schemas/ProductDetail\"\n                }\n              }\n            }\n          },\n          \"400\": {\n            \"description\": \"Bad Request - `BadRequestResponse` object with `message` string field (check `propertyErrors`: null for simple message, array for field-specific errors)\",\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"$ref\": \"#/components/schemas/BadRequestResponse\"\n                }\n              }\n            }\n          },\n          \"401\": {\n            \"description\": \"Invalid API Key\"\n          },\n          \"403\": {\n            \"description\": \"Account not authorized\"\n          },\n          \"500\": {\n            \"description\": \"Something went wrong.\"\n          }\n        }\n      }\n    },\n    \"/products/products\": {\n      \"post\": {\n        \"tags\": [\"Product\"],\n        \"summary\": \"Bulk Create or Update Products\",\n        \"description\": \"**Purpose:** Create or update multiple products in a single operation for efficient catalog management and bulk data synchronization.\\n\\n**Request Requirements:**\\n- \\\"Inventory\\\" role authorization required for product data operations\\n- Array of `ProductDetailUpload` objects in request body with product details\\n- Content-Type: application/json\\n- Each product requires SKU and ProductName for creation, ProductId for updates\\n\\n**Response Data:**\\n- Returns mixed array: `[{ ProductDetail }, { SaveProductError }, ...]`\\n- Successful operations return complete `ProductDetail` objects with updated product information\\n- Failed operations return `SaveProductError` objects with ProductId, SKU, ProductName, and ErrorMessage\\n- HTTP 200 for successful processing - check individual items in response array for success/error status\\n- HTTP 400 for validation errors that prevent processing\\n- Mixed array allows partial success - some products may succeed while others fail\\n\\n**CRITICAL DATA LOSS WARNING:**\\nMost fields will be overwritten with null/zero values if not provided in the request.\\n**RECOMMENDED APPROACH:** First GET existing products, modify only desired fields, then POST complete objects back.\\n\\n**Create vs Update Behavior:**\\n- **CREATE**: When ProductId is null or omitted, new product records will be created\\n- **UPDATE**: When ProductId is provided with valid product IDs, existing products will be updated\\n- **Mixed Operations**: Single request can include both create and update operations\\n- **Validation**: SKU and ProductName required for creates, ProductId required for updates\\n- **Individual Processing**: Each product processed independently - some may succeed while others fail\\n\\n**Field Preservation Behavior:**\\n- **Optional<T> Fields**: Can be explicitly set to null or omitted to preserve existing values\\n- **Regular Fields**: Will be set to null/zero if omitted, potentially causing data loss\\n- **Preserved Fields**: SKU and ProductName preserve existing values when omitted during updates\\n- **Best Practice**: Always provide complete product objects to avoid unintended data loss\\n\\n**Error Handling:**\\n- **Partial Success**: Some products may succeed while others fail within the same request\\n- **Error Identification**: Failed products include ErrorMessage, ProductId, SKU, and ProductName\\n- **Validation Errors**: Returns HTTP 400 for validation errors that prevent processing\\n- **Processing Errors**: Returns HTTP 200 with mixed results for individual product errors\\n- **Rollback Behavior**: No automatic rollback - successful operations persist even if others fail\\n\\n**Common Use Cases:**\\n- Import large product catalogs from external systems efficiently\\n- Synchronize product changes across multiple products simultaneously\\n- Bulk update pricing, categorization, or product attributes\\n- Migrate product data between systems with batch processing\\n- Update multiple products after inventory or regulatory changes\\n\\n**Performance & Limits:**\\n- Optimized for bulk product operations and catalog management\\n- Individual product validation and processing for data integrity\\n- No automatic external system broadcasting for performance\\n- Efficient for large-scale product catalog updates\\n\\n**Related Endpoints:**\\n- `GET /products` - Retrieve existing product data before bulk updates\\n- `POST /products/product` - Create or update individual products with external sync\\n- `GET /brand` - Get valid brand IDs for product associations\\n- `GET /strains` - Get valid strain IDs for product classifications\\n\\n**Important Notes:**\\n- **Individual Processing**: Each product processed independently with separate success/failure results\\n- **No External Broadcast**: Traceability system broadcasting not supported on this endpoint\\n- **Data Loss Risk**: Always retrieve existing product data before bulk updates\\n- **Error Checking Required**: Always check response for individual product errors\\n- **Performance Optimized**: Designed for efficient bulk operations without external system overhead\",\n        \"operationId\": \"ProductsProductsPost\",\n        \"requestBody\": {\n          \"description\": \"Array of product information to create or update - IEnumerable<ProductDetailUpload> objects\",\n          \"content\": {\n            \"application/json-patch+json\": {\n              \"schema\": {\n                \"type\": \"array\",\n                \"items\": {\n                  \"$ref\": \"#/components/schemas/ProductDetailUpload\"\n                }\n              }\n            },\n            \"application/json\": {\n              \"schema\": {\n                \"type\": \"array\",\n                \"items\": {\n                  \"$ref\": \"#/components/schemas/ProductDetailUpload\"\n                }\n              }\n            },\n            \"text/json\": {\n              \"schema\": {\n                \"type\": \"array\",\n                \"items\": {\n                  \"$ref\": \"#/components/schemas/ProductDetailUpload\"\n                }\n              }\n            },\n            \"application/*+json\": {\n              \"schema\": {\n                \"type\": \"array\",\n                \"items\": {\n                  \"$ref\": \"#/components/schemas/ProductDetailUpload\"\n                }\n              }\n            }\n          },\n          \"x-bodyName\": \"products\"\n        },\n        \"responses\": {\n          \"200\": {\n            \"description\": \"Success - Products processed with individual success/error results\",\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"type\": \"array\",\n                  \"items\": {\n                    \"type\": \"object\"\n                  }\n                }\n              }\n            }\n          },\n          \"400\": {\n            \"description\": \"Bad Request - `BadRequestResponse` object with `message` string field (check `propertyErrors`: null for simple message, array for field-specific errors) OR `ValidationResult` object with `isValid` boolean, `errors` array, and `ruleSetsExecuted` array\",\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"$ref\": \"#/components/schemas/ValidationResult\"\n                }\n              }\n            }\n          },\n          \"401\": {\n            \"description\": \"Invalid API Key\"\n          },\n          \"403\": {\n            \"description\": \"Account not authorized\"\n          },\n          \"500\": {\n            \"description\": \"Something went wrong.\"\n          }\n        }\n      }\n    },\n    \"/products/set-image\": {\n      \"post\": {\n        \"tags\": [\"Product\"],\n        \"summary\": \"Set Product Image\",\n        \"description\": \"**Purpose:** Add or update a single image for a product to enhance product presentation and visual merchandising.\\n\\n**Request Requirements:**\\n- \\\"Inventory\\\" role authorization required for product image management\\n- `SetImageRequest` object in request body with ProductId and image data\\n- Content-Type: application/json\\n- Valid ProductId and base64-encoded image data required\\n\\n**Response Data:**\\n- Returns single image response object: `{ SetImageResponse }`\\n- Includes unique image ID for future image management operations\\n- Provides image URL for immediate access to uploaded image\\n- Contains ImageId (integer) and ImageUrl (string) fields only\\n\\n**Image Processing:**\\n- **Single Image**: Adds one image per request to the specified product\\n- **Image ID Assignment**: Returns unique DPOS product image ID for tracking\\n- **Format Support**: Supports standard image formats via base64 encoding\\n- **Validation**: Validates image data and product existence before processing\\n\\n**Integration Behavior:**\\n- **Metrc Integration**: If using Metrc with upload product images enabled, the image will automatically upload to Metrc on next product save\\n- **Automatic Sync**: Integration occurs when `Save Product` is called for this ProductId\\n- **Compliance**: Supports regulatory compliance through integrated system image sync\\n- **External Systems**: Compatible with cultivation and compliance system requirements\\n\\n**Common Use Cases:**\\n- Add product photos for e-commerce and point-of-sale display\\n- Update existing product images for marketing and merchandising\\n- Comply with regulatory requirements for product visual documentation\\n- Enhance customer experience with high-quality product imagery\\n- Support integrated systems with automated image synchronization\\n\\n**Performance & Limits:**\\n- Single image processing for targeted product updates\\n- Base64 encoding for secure image data transmission\\n- Validation performed before processing to ensure data integrity\\n- Optimized for product visual merchandising workflows\\n\\n**Related Endpoints:**\\n- `POST /products/remove-image` - Remove product images using the returned image ID\\n- `POST /products/product` - Save product data and trigger Metrc image sync\\n- `GET /products` - Retrieve products with associated image information\\n\\n**Important Notes:**\\n- **Image ID Required**: Save the returned image ID for future image management operations\\n- **Metrc Auto-Upload**: Images automatically sync to Metrc on next product save when enabled\\n- **Single Operation**: One image per request - use multiple requests for multiple images\\n- **Validation Required**: ProductId must exist and image data must be valid\\n- **Integration Ready**: Supports automated compliance system synchronization\",\n        \"operationId\": \"ProductsSet-imagePost\",\n        \"requestBody\": {\n          \"description\": \"Image upload request with ProductId and base64 image data - SetImageRequest object\",\n          \"content\": {\n            \"application/json-patch+json\": {\n              \"schema\": {\n                \"$ref\": \"#/components/schemas/SetImageRequest\"\n              }\n            },\n            \"application/json\": {\n              \"schema\": {\n                \"$ref\": \"#/components/schemas/SetImageRequest\"\n              }\n            },\n            \"text/json\": {\n              \"schema\": {\n                \"$ref\": \"#/components/schemas/SetImageRequest\"\n              }\n            },\n            \"application/*+json\": {\n              \"schema\": {\n                \"$ref\": \"#/components/schemas/SetImageRequest\"\n              }\n            }\n          },\n          \"x-bodyName\": \"req\"\n        },\n        \"responses\": {\n          \"200\": {\n            \"description\": \"Success\",\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"$ref\": \"#/components/schemas/SetImageResponse\"\n                }\n              }\n            }\n          },\n          \"400\": {\n            \"description\": \"Bad Request - `BadRequestResponse` object with `message` string field (check `propertyErrors`: null for simple message, array for field-specific errors)\",\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"$ref\": \"#/components/schemas/BadRequestResponse\"\n                }\n              }\n            }\n          },\n          \"401\": {\n            \"description\": \"Invalid API Key\"\n          },\n          \"403\": {\n            \"description\": \"Account not authorized\"\n          },\n          \"500\": {\n            \"description\": \"Something went wrong.\"\n          }\n        }\n      }\n    },\n    \"/products/remove-image\": {\n      \"post\": {\n        \"tags\": [\"Product\"],\n        \"summary\": \"Delete Product Image\",\n        \"description\": \"**Purpose:** Remove a specific image from a product using the image ID to maintain clean product presentation and manage visual merchandising.\\n\\n**Request Requirements:**\\n- \\\"Inventory\\\" role authorization required for product image management\\n- `DeleteImageRequest` object in request body with ProductId and ImageId\\n- Content-Type: application/json\\n- Valid ProductId and ImageId required (ImageId obtained from set-image response)\\n\\n**Response Data:**\\n- Returns success confirmation object: `{ SuccessResult }`\\n- Simple success confirmation with HTTP 200 status\\n- No additional data fields returned beyond success indicator\\n\\n**Image Removal Process:**\\n- **Targeted Deletion**: Removes specific image identified by ImageId\\n- **Product Association**: Verifies image belongs to the specified ProductId\\n- **Validation**: Ensures both ProductId and ImageId exist and are valid\\n- **Clean Removal**: Permanently removes image from product and storage systems\\n\\n**Safety & Validation:**\\n- **Existence Check**: Validates ProductId and ImageId before deletion\\n- **Ownership Verification**: Ensures image belongs to the specified product\\n- **Authorization**: Confirms user has permission to modify product images\\n- **Error Handling**: Returns appropriate errors for invalid requests\\n\\n**Common Use Cases:**\\n- Remove outdated or incorrect product images from visual merchandising\\n- Clean up product galleries by deleting unwanted or duplicate images\\n- Manage product image lifecycle for marketing and compliance requirements\\n- Maintain accurate product representation in e-commerce and point-of-sale systems\\n- Support product image management workflows and content updates\\n\\n**Performance & Limits:**\\n- Single image deletion for targeted image management\\n- Immediate removal from product and storage systems\\n- Validation performed before deletion to ensure data integrity\\n- Optimized for product visual merchandising and content management workflows\\n\\n**Related Endpoints:**\\n- `POST /products/set-image` - Add images and obtain ImageId for future deletion\\n- `GET /products` - Retrieve products with current image information\\n- `POST /products/product` - Update product data and manage overall product information\\n\\n**Important Notes:**\\n- **ImageId Required**: Use ImageId returned from set-image endpoint for deletion\\n- **Permanent Operation**: Image deletion is permanent and cannot be undone\\n- **Validation Critical**: Both ProductId and ImageId must be valid and associated\\n- **Single Target**: One image per request - use multiple requests for multiple deletions\\n- **Clean Management**: Essential for maintaining organized product image galleries\",\n        \"operationId\": \"ProductsRemove-imagePost\",\n        \"requestBody\": {\n          \"description\": \"Image deletion request with ProductId and ImageId - DeleteImageRequest object\",\n          \"content\": {\n            \"application/json-patch+json\": {\n              \"schema\": {\n                \"$ref\": \"#/components/schemas/DeleteImageRequest\"\n              }\n            },\n            \"application/json\": {\n              \"schema\": {\n                \"$ref\": \"#/components/schemas/DeleteImageRequest\"\n              }\n            },\n            \"text/json\": {\n              \"schema\": {\n                \"$ref\": \"#/components/schemas/DeleteImageRequest\"\n              }\n            },\n            \"application/*+json\": {\n              \"schema\": {\n                \"$ref\": \"#/components/schemas/DeleteImageRequest\"\n              }\n            }\n          },\n          \"x-bodyName\": \"req\"\n        },\n        \"responses\": {\n          \"200\": {\n            \"description\": \"Success\",\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"$ref\": \"#/components/schemas/SuccessResult\"\n                }\n              }\n            }\n          },\n          \"400\": {\n            \"description\": \"Bad Request - `BadRequestResponse` object with `message` string field (check `propertyErrors`: null for simple message, array for field-specific errors)\",\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"$ref\": \"#/components/schemas/BadRequestResponse\"\n                }\n              }\n            }\n          },\n          \"401\": {\n            \"description\": \"Invalid API Key\"\n          },\n          \"403\": {\n            \"description\": \"Account not authorized\"\n          },\n          \"500\": {\n            \"description\": \"Something went wrong.\"\n          }\n        }\n      }\n    },\n    \"/products/strains\": {\n      \"get\": {\n        \"tags\": [\"Product\"],\n        \"summary\": \"Get Product Strains\",\n        \"description\": \"**Purpose:** Retrieve all available cannabis strains for product classification and inventory management in compliance with industry standards.\\n\\n**Request Requirements:**\\n- \\\"Inventory\\\" role authorization required for strain data access\\n- No query parameters required\\n- No request body needed\\n\\n**Response Data:**\\n- Returns array of strain objects: `[{ StrainDetail }, ...]`\\n- Array typically contains 50-1,000+ strains depending on dispensary catalog\\n- Returns empty array `[]` if no strains are configured (not null)\\n- Basic strain information including ID, name, description, type, and external ID\\n- Results automatically filtered to authenticated location strain catalog\\n\\n**Strain Information:**\\n- **Strain ID**: Unique identifier for the strain\\n- **Strain Name**: Display name of the strain\\n- **Strain Description**: Basic text description of the strain\\n- **Strain Abbreviation**: Short code or abbreviation for the strain\\n- **Strain Type**: Basic type classification (e.g., Indica, Sativa, Hybrid)\\n- **External ID**: External system identifier for integration\\n\\n**Common Use Cases:**\\n- Populate strain dropdown lists in product creation and management forms\\n- Display basic strain information for product attribution\\n- Support strain-based product categorization and filtering\\n- Enable strain identification in inventory management systems\\n- Provide strain reference data for product classification workflows\\n\\n**Performance & Limits:**\\n- Optimized for product classification and strain selection workflows\\n- Comprehensive strain database for complete cannabis product categorization\\n- Results filtered to location-specific strain catalog\\n- Efficient for strain-based product search and filtering operations\\n\\n**Related Endpoints:**\\n- `GET /products` - View products with assigned strain classifications\\n- `POST /products/product` - Assign strains to products during creation/update\\n- `GET /strains` - Manage strain master data and configurations\\n\\n**Important Notes:**\\n- **Basic Reference Data**: Provides essential strain identification information only\\n- **Limited Data**: Only includes basic strain details - no cannabinoid profiles, genetics, or effects\\n- **Product Classification**: Strains used for basic product categorization and identification\\n- **Location Catalog**: Results filtered to strains available for the authenticated location\\n- **External Integration**: Includes External ID for traceability system integration\",\n        \"operationId\": \"ProductsStrainsGet\",\n        \"responses\": {\n          \"200\": {\n            \"description\": \"Success\",\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"type\": \"array\",\n                  \"items\": {\n                    \"$ref\": \"#/components/schemas/StrainDetail\"\n                  }\n                }\n              }\n            }\n          },\n          \"401\": {\n            \"description\": \"Invalid API Key\"\n          },\n          \"403\": {\n            \"description\": \"Account not authorized\"\n          },\n          \"500\": {\n            \"description\": \"Something went wrong.\"\n          }\n        }\n      }\n    },\n    \"/products/external-categories\": {\n      \"get\": {\n        \"tags\": [\"Product\"],\n        \"summary\": \"Get External Categories\",\n        \"description\": \"**Purpose:** Retrieve external system categories for product classification to support integration with traceability and compliance systems.\\n\\n**Request Requirements:**\\n- \\\"Inventory\\\" role authorization required for external category data access\\n- UserId query parameter highly recommended for traceability system integration\\n- No request body needed\\n\\n**Response Data:**\\n- Returns array of string values with external category names\\n- Response format: `[string, string, ...]`\\n- Array contains categories available from integrated traceability systems\\n- Returns empty array `[]` if no external categories are available (not null)\\n- Category names correspond to external system classification standards\\n- Used for populating ExternalCategory field in product data\\n- Results depend on configured integrated systems and user permissions\\n\\n**Integration Requirements:**\\n- **Traceability Systems**: Categories pulled from connected compliance systems (e.g., Metrc, BioTrack)\\n- **User Context**: UserId parameter provides system access context for category retrieval\\n- **System Configuration**: Available categories depend on integrated system configuration\\n- **Compliance Mapping**: Categories align with regulatory compliance requirements\\n\\n**Parameter Guidelines:**\\n- **UserId**: Technically optional but highly recommended for traceability system calls\\n- **System Failure**: Call may fail without UserId when categories come from traceability systems\\n- **Permission Context**: UserId provides proper system access permissions for category retrieval\\n- **Default Fallback**: Uses default user (ID 6) when UserId not provided\\n\\n**Common Use Cases:**\\n- Populate product ExternalCategory field with valid compliance categories\\n- Synchronize product classifications with regulatory traceability systems\\n- Ensure product categories align with state compliance requirements\\n- Support automated product categorization for integrated systems\\n- Validate product classifications against external system standards\\n\\n**Performance & Limits:**\\n- Real-time integration with external traceability systems\\n- Response time dependent on external system availability\\n- Error handling for external system connectivity issues\\n- Optimized for product classification and compliance workflows\\n\\n**Related Endpoints:**\\n- `POST /products/product` - Use external categories in ExternalCategory field\\n- `GET /products` - View products with assigned external categories\\n- `POST /products/products` - Bulk assign external categories to products\\n\\n**Important Notes:**\\n- **UserId Critical**: Highly recommended to prevent traceability system call failures\\n- **External Dependency**: Categories sourced from integrated traceability systems\\n- **Compliance Essential**: External categories required for regulatory compliance\\n- **System Specific**: Available categories depend on configured integrated systems\\n- **Error Handling**: May return errors if external systems are unavailable\",\n        \"operationId\": \"ProductsExternal-categoriesGet\",\n        \"parameters\": [\n          {\n            \"name\": \"userId\",\n            \"in\": \"query\",\n            \"description\": \"User ID for traceability system access context (highly recommended) - Optional but prevents system failures\",\n            \"schema\": {\n              \"type\": \"integer\",\n              \"format\": \"int32\"\n            }\n          }\n        ],\n        \"responses\": {\n          \"200\": {\n            \"description\": \"Success\",\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"type\": \"array\",\n                  \"items\": {\n                    \"type\": \"string\"\n                  }\n                }\n              }\n            }\n          },\n          \"400\": {\n            \"description\": \"Bad Request - String error message (parse response body as plain text)\",\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"$ref\": \"#/components/schemas/BadRequestResponse\"\n                }\n              }\n            }\n          },\n          \"401\": {\n            \"description\": \"Invalid API Key\"\n          },\n          \"403\": {\n            \"description\": \"Account not authorized\"\n          },\n          \"500\": {\n            \"description\": \"Something went wrong.\"\n          }\n        }\n      }\n    },\n    \"/product-category\": {\n      \"get\": {\n        \"tags\": [\"ProductCategory\"],\n        \"summary\": \"Get Product Categories\",\n        \"description\": \"**Purpose:** Retrieves the complete list of product categories available for the authenticated organization for product classification and menu organization.\\n\\n**Request Requirements:**\\n- Any authenticated role authorization (no specific role required)\\n- No query parameters or request body needed\\n\\n**Response Data:**\\n- Returns array of product category objects: `[{ ProductCategory }, ...]`\\n- Array typically contains 10-30 product categories per organization\\n- Returns empty array `[]` if no categories configured (rare)\\n- Includes category ID, name, and master category classification\\n- Standard cannabis product categories (Flower, Edibles, Concentrates, etc.)\\n- Results filtered to authenticated organization level and exclude deleted records\\n\\n**Common Use Cases:**\\n- Populate product category dropdown lists in product creation forms\\n- Organize product menus by category for customer browsing\\n- Validate product categorization in inventory management systems\\n- Generate category-specific reports for sales analytics\\n- Support e-commerce product filtering and navigation\\n\\n**Performance & Limits:**\\n- Lightweight reference data optimized for frequent access\\n- Small dataset suitable for client-side caching\\n- No pagination needed due to limited number of categories\\n- Results consistent across all locations within organization\\n\\n**Related Endpoints:**\\n- `GET /products` - Get products that use these categories\\n- `POST /product` - Create products with category assignments\\n- `GET /regulatory-category` - Get regulatory category classifications\\n\\n**Important Notes:**\\n- Categories are defined at organization level (LSP) not location level\\n- Standard cannabis industry categories for compliance and consistency\\n- Used for product menu organization and customer filtering\\n- Essential reference data for product management workflows\",\n        \"operationId\": \"Product-categoryGet\",\n        \"responses\": {\n          \"200\": {\n            \"description\": \"Success - Returns array of product category objects: `[{ ProductCategory }, ...]`\",\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"type\": \"array\",\n                  \"items\": {\n                    \"$ref\": \"#/components/schemas/ProductCategory\"\n                  }\n                }\n              }\n            }\n          },\n          \"401\": {\n            \"description\": \"Unauthorized - Invalid or missing API key\"\n          },\n          \"403\": {\n            \"description\": \"Forbidden - Account not authorized\"\n          },\n          \"500\": {\n            \"description\": \"Internal Server Error - Server error occurred\"\n          }\n        }\n      }\n    },\n    \"/purchase-order\": {\n      \"get\": {\n        \"tags\": [\"PurchaseOrder\"],\n        \"summary\": \"Get Purchase Orders\",\n        \"description\": \"**Purpose:** Retrieve purchase orders with comprehensive filtering options to support procurement management and vendor relationship tracking.\\n\\n**Request Requirements:**\\n- \\\"PurchaseOrder\\\" role authorization required for purchase order data access\\n- Optional query parameters available for filtering purchase orders\\n- Purchase order management permissions for procurement operations\\n\\n**Response Data:**\\n- Response format: `[{ PurchaseOrderData }, { PurchaseOrderData }, ...]`\\n- **No pagination metadata**: Response contains only data array without total counts or page information\\n- Array contains up to PageSize purchase orders (default 1000)\\n- Returns empty array `[]` if no purchase orders match filtering criteria\\n- Includes comprehensive purchase order details and line item information\\n- Results automatically filtered to authenticated location\\n\\n**Pagination Usage:**\\n- **First Request**: Call with PageNumber=0 to get first page\\n- **Subsequent Requests**: Increment PageNumber for each additional page\\n- **End Detection**: Continue requesting pages until you receive an empty array `[]`\\n- **Page Size Control**: Use PageSize parameter to control items per page\\n- **Example Flow**: Request PageNumber=0 → Process results → Increment PageNumber → Repeat until empty `[]` response\\n\\n**Pagination Detection:**\\n- **End of data detection**: Continue requesting pages until you receive an empty array `[]`\\n- **No metadata provided**: Response does not include total counts, page counts, or hasNextPage indicators\\n- **Sequential access**: Increment PageNumber from 0 until empty response indicates no more data\\n\\n**Filtering Options:**\\n- **FromDateCreated**: Optional date parameter to filter orders created after specific date\\n- **ToDateCreated**: Optional date parameter to filter orders created before specific date\\n- **PurchaseOrderId**: Optional integer parameter to retrieve specific purchase order\\n- **IncludeItemDetails**: Optional boolean to include detailed line item information\\n\\n**Purchase Order Information Included:**\\n- **Order Details**: Purchase order identification, status, and vendor information\\n- **Line Items**: Product details and quantities (when IncludeItemDetails is true)\\n- **Dates**: Creation, modification, and expected delivery dates\\n- **Financial Data**: Order totals, costs, and payment information\\n\\n**Common Use Cases:**\\n- Display purchase orders for procurement management and vendor tracking\\n- Filter orders by date ranges for reporting and analysis\\n- Retrieve specific purchase orders for detailed review and management\\n- Support vendor relationship management and procurement workflows\\n- Generate procurement reports and purchase order analytics\\n\\n**Performance & Limits:**\\n- Use consistent page size throughout pagination sequence for efficiency\\n- Monitor response times and adjust page size for optimal performance\\n- Cache results locally to minimize API calls and improve responsiveness\\n- Validation performed on all query parameters before processing\\n- Optimized for procurement management and vendor tracking workflows\\n\\n**Related Endpoints:**\\n- `POST /purchase-order` - Create or update purchase orders\\n- `GET /vendors` - View vendors associated with purchase orders\\n- `GET /inventory` - View inventory levels for procurement planning\\n\\n**Important Notes:**\\n- **Procurement Integration**: Essential for vendor management and procurement workflows\\n- **Flexible Filtering**: Multiple parameters can be combined for precise order lookup\\n- **Location Scoped**: Purchase orders filtered to authenticated location operations\\n- **Validation Required**: All query parameters validated before purchase order retrieval\",\n        \"operationId\": \"Purchase-orderGet\",\n        \"parameters\": [\n          {\n            \"name\": \"FromDateCreated\",\n            \"in\": \"query\",\n            \"description\": \"Start date filter for purchase orders created after this date (optional).\",\n            \"schema\": {\n              \"type\": \"string\",\n              \"format\": \"date-time\"\n            }\n          },\n          {\n            \"name\": \"ToDateCreated\",\n            \"in\": \"query\",\n            \"description\": \"End date filter for purchase orders created before this date (optional).\",\n            \"schema\": {\n              \"type\": \"string\",\n              \"format\": \"date-time\"\n            }\n          },\n          {\n            \"name\": \"PurchaseOrderId\",\n            \"in\": \"query\",\n            \"description\": \"Specific purchase order identifier for single order retrieval (optional).\",\n            \"schema\": {\n              \"type\": \"integer\",\n              \"format\": \"int32\"\n            }\n          },\n          {\n            \"name\": \"IncludeItemDetails\",\n            \"in\": \"query\",\n            \"description\": \"Whether to include detailed line item information in the response (default: false).\",\n            \"schema\": {\n              \"type\": \"boolean\"\n            }\n          },\n          {\n            \"name\": \"PageNumber\",\n            \"in\": \"query\",\n            \"description\": \"Page number for pagination control (default: 0).\",\n            \"schema\": {\n              \"type\": \"integer\",\n              \"format\": \"int32\"\n            }\n          },\n          {\n            \"name\": \"PageSize\",\n            \"in\": \"query\",\n            \"description\": \"Number of results per page for pagination (default: 1000).\",\n            \"schema\": {\n              \"type\": \"integer\",\n              \"format\": \"int32\"\n            }\n          }\n        ],\n        \"responses\": {\n          \"200\": {\n            \"description\": \"Success\",\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"type\": \"array\",\n                  \"items\": {\n                    \"$ref\": \"#/components/schemas/PurchaseOrderData\"\n                  }\n                }\n              }\n            }\n          },\n          \"400\": {\n            \"description\": \"Bad Request - `ValidationResult` object with `isValid` boolean, `errors` array, and `ruleSetsExecuted` array\",\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"$ref\": \"#/components/schemas/BadRequestResponse\"\n                }\n              }\n            }\n          },\n          \"401\": {\n            \"description\": \"Invalid API Key\"\n          },\n          \"403\": {\n            \"description\": \"Account not authorized\"\n          },\n          \"500\": {\n            \"description\": \"Something went wrong.\"\n          }\n        }\n      },\n      \"post\": {\n        \"tags\": [\"PurchaseOrder\"],\n        \"summary\": \"Create or Update Purchase Orders\",\n        \"description\": \"**Purpose:** Create new purchase orders or update existing purchase orders for procurement management and vendor relationship operations.\\n\\n**Request Requirements:**\\n- \\\"PurchaseOrder\\\" role authorization required for purchase order modification\\n- `CreateUpdatePurchaseOrdersRequest` object in request body with purchase order details\\n- Content-Type: application/json\\n- Purchase order management permissions for procurement operations\\n\\n**Response Data:**\\n- Returns result object with purchase order creation/update status\\n- Response format: `{ \\\"createdPurchaseOrderIds\\\": [int, ...], \\\"updatedPurchaseOrderIds\\\": [int, ...] }`\\n- Includes arrays of created and updated purchase order IDs\\n- Purchase order identification and processing results\\n\\n**Create vs Update Behavior:**\\n- **CREATE**: When PurchaseOrderId is null, a new purchase order will be created\\n- **UPDATE**: When PurchaseOrderId is non-null, the existing purchase order will be updated\\n- **Identification**: Purchase order existence determined by PurchaseOrderId value\\n- **Line Item Updates**: Updates affect both purchase order header and line item details\\n\\n**Purchase Order Data Fields:**\\n- **Header Information**: Vendor details, order dates, and procurement specifications\\n- **Line Items**: Product details, quantities, costs, and delivery requirements\\n- **Financial Data**: Order totals, taxes, and payment terms\\n- **Status Information**: Order status and processing workflow details\\n\\n**Common Use Cases:**\\n- Create new purchase orders for vendor procurement operations\\n- Update existing purchase orders with revised quantities or specifications\\n- Modify purchase order line items for procurement adjustments\\n- Support vendor relationship management and procurement workflows\\n- Maintain accurate procurement records and vendor tracking\\n\\n**Performance & Limits:**\\n- Validation performed before any purchase order processing\\n- Batch processing for multiple purchase order operations\\n- Optimized for procurement management and vendor tracking workflows\\n- Changes reflected immediately in procurement and vendor systems\\n\\n**Related Endpoints:**\\n- `GET /purchase-order` - Retrieve purchase orders for review before updates\\n- `GET /vendors` - View vendors for purchase order creation\\n- `GET /inventory` - Check inventory levels for procurement planning\\n\\n**Important Notes:**\\n- **Validation Critical**: All purchase order data validated before processing\\n- **Procurement Integration**: Purchase orders affect vendor management and procurement workflows\\n- **Location Scoped**: Purchase orders automatically associated with authenticated location\\n- **Batch Processing**: Multiple purchase orders can be processed in single operation\\n- **Vendor Relationships**: Purchase order creation strengthens vendor tracking and management\",\n        \"operationId\": \"Purchase-orderPost\",\n        \"requestBody\": {\n          \"description\": \"Purchase order creation/update request with order details - CreateUpdatePurchaseOrdersRequest object\",\n          \"content\": {\n            \"application/json-patch+json\": {\n              \"schema\": {\n                \"$ref\": \"#/components/schemas/CreateUpdatePurchaseOrdersRequest\"\n              }\n            },\n            \"application/json\": {\n              \"schema\": {\n                \"$ref\": \"#/components/schemas/CreateUpdatePurchaseOrdersRequest\"\n              }\n            },\n            \"text/json\": {\n              \"schema\": {\n                \"$ref\": \"#/components/schemas/CreateUpdatePurchaseOrdersRequest\"\n              }\n            },\n            \"application/*+json\": {\n              \"schema\": {\n                \"$ref\": \"#/components/schemas/CreateUpdatePurchaseOrdersRequest\"\n              }\n            }\n          },\n          \"x-bodyName\": \"req\"\n        },\n        \"responses\": {\n          \"200\": {\n            \"description\": \"Success\",\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"$ref\": \"#/components/schemas/CreateUpdatePurchaseOrderResponse\"\n                }\n              }\n            }\n          },\n          \"400\": {\n            \"description\": \"Bad Request - `ValidationResult` object with `isValid` boolean, `errors` array, and `ruleSetsExecuted` array\",\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"$ref\": \"#/components/schemas/BadRequestResponse\"\n                }\n              }\n            }\n          },\n          \"401\": {\n            \"description\": \"Invalid API Key\"\n          },\n          \"403\": {\n            \"description\": \"Account not authorized\"\n          },\n          \"500\": {\n            \"description\": \"Something went wrong.\"\n          }\n        }\n      }\n    },\n    \"/reference/units\": {\n      \"get\": {\n        \"tags\": [\"ReferenceData\"],\n        \"summary\": \"Get Units\",\n        \"description\": \"**Purpose:** Retrieves the complete list of measurement units available for product tracking and inventory management.\\n\\n**Request Requirements:**\\n- Any authenticated role authorization (no specific role required)\\n- No query parameters or request body needed\\n\\n**Response Data:**\\n- Returns array of unit objects: `[{ Unit }, ...]`\\n- Array typically contains 20-30 measurement units\\n- Returns empty array `[]` if no units configured (rare)\\n- Includes unit ID, name, abbreviation, and conversion factors\\n- Standard measurement units (grams, ounces, pounds, units, etc.)\\n- Essential reference data for product weight and quantity tracking\\n\\n**Common Use Cases:**\\n- Configure product measurement units in inventory systems\\n- Support weight-based pricing and inventory calculations\\n- Validate unit measurements in product and package operations\\n- Generate reports with proper unit conversions and formatting\\n- Enable accurate compliance reporting with regulatory weight requirements\\n\\n**Performance & Limits:**\\n- Lightweight reference data optimized for frequent access\\n- Small static dataset suitable for client-side caching\\n- No pagination needed due to limited number of standard units\\n- Consistent across all organizations and locations\\n\\n**Related Endpoints:**\\n- `GET /reference/unit-types` - Get unit type classifications\\n- `GET /products` - Get products with unit measurements\\n- `GET /inventory` - Get inventory with unit-based quantities\\n\\n**Important Notes:**\\n- Standard cannabis industry measurement units for compliance\\n- Essential for accurate weight tracking and regulatory reporting\\n- Used throughout the system for product and inventory operations\\n- Supports both metric and imperial measurement systems\",\n        \"operationId\": \"ReferenceUnitsGet\",\n        \"responses\": {\n          \"200\": {\n            \"description\": \"Success - Returns array of unit objects: `[{ Unit }, ...]`\",\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"type\": \"array\",\n                  \"items\": {\n                    \"$ref\": \"#/components/schemas/Unit\"\n                  }\n                }\n              }\n            }\n          },\n          \"401\": {\n            \"description\": \"Unauthorized - Invalid or missing API key\"\n          },\n          \"403\": {\n            \"description\": \"Forbidden - Account not authorized\"\n          },\n          \"500\": {\n            \"description\": \"Internal Server Error - Server error occurred\"\n          }\n        }\n      }\n    },\n    \"/reference/unit-types\": {\n      \"get\": {\n        \"tags\": [\"ReferenceData\"],\n        \"summary\": \"Get Unit Types\",\n        \"description\": \"**Purpose:** Retrieves the complete list of unit type classifications used to categorize different measurement units.\\n\\n**Request Requirements:**\\n- Any authenticated role authorization (no specific role required)\\n- No query parameters or request body needed\\n\\n**Response Data:**\\n- Returns array of unit type objects: `[{ UnitType }, ...]`\\n- Array typically contains 5-10 unit type categories\\n- Returns empty array `[]` if no unit types configured (rare)\\n- Includes type ID, name, and category descriptions\\n- Unit type categories (Weight, Volume, Count, etc.) for measurement classification\\n- Reference data for organizing units by measurement type\\n\\n**Common Use Cases:**\\n- Organize units by measurement type in user interfaces\\n- Validate unit assignments based on product type requirements\\n- Support advanced filtering and categorization of measurement units\\n- Enable proper unit selection based on product characteristics\\n- Generate reports organized by measurement type categories\\n\\n**Performance & Limits:**\\n- Lightweight reference data optimized for frequent access\\n- Small static dataset suitable for client-side caching\\n- No pagination needed due to limited number of unit types\\n- Consistent across all organizations and locations\\n\\n**Related Endpoints:**\\n- `GET /reference/units` - Get specific units within these types\\n- `GET /products` - Get products using typed unit measurements\\n- `GET /inventory` - Get inventory with type-based unit tracking\\n\\n**Important Notes:**\\n- Standard measurement type categories for consistent classification\\n- Helps organize units for better user experience and validation\\n- Used for advanced unit selection and validation logic\\n- Essential for proper measurement type categorization\",\n        \"operationId\": \"ReferenceUnit-typesGet\",\n        \"responses\": {\n          \"200\": {\n            \"description\": \"Success - Returns array of unit type objects: `[{ UnitType }, ...]`\",\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"type\": \"array\",\n                  \"items\": {\n                    \"$ref\": \"#/components/schemas/UnitType\"\n                  }\n                }\n              }\n            }\n          },\n          \"401\": {\n            \"description\": \"Unauthorized - Invalid or missing API key\"\n          },\n          \"403\": {\n            \"description\": \"Forbidden - Account not authorized\"\n          },\n          \"500\": {\n            \"description\": \"Internal Server Error - Server error occurred\"\n          }\n        }\n      }\n    },\n    \"/reference/lab-result-units\": {\n      \"get\": {\n        \"tags\": [\"ReferenceData\"],\n        \"summary\": \"Get Lab Result Units\",\n        \"description\": \"**Purpose:** Retrieves the complete list of measurement units specifically used for laboratory test results and cannabinoid/terpene reporting.\\n\\n**Request Requirements:**\\n- Any authenticated role authorization (no specific role required)\\n- No query parameters or request body needed\\n\\n**Response Data:**\\n- Returns array of lab result unit objects: `[{ LabResultUnitData }, ...]`\\n- Array typically contains 5-15 specialized lab measurement units\\n- Returns empty array `[]` if no lab units configured (rare)\\n- Includes lab result unit ID and unit name/abbreviation\\n- Specialized units for cannabinoid and terpene concentration measurements\\n- Essential reference data for laboratory test result reporting\\n\\n**Common Use Cases:**\\n- Configure lab result units in testing and compliance systems\\n- Validate unit measurements in laboratory data submissions\\n- Support cannabinoid and terpene concentration reporting\\n- Generate compliance reports with proper lab result unit formatting\\n- Enable accurate potency testing and COA (Certificate of Analysis) generation\\n\\n**Performance & Limits:**\\n- Lightweight reference data optimized for frequent access\\n- Small static dataset suitable for client-side caching\\n- No pagination needed due to limited number of lab result units\\n- Consistent across all organizations and locations\\n\\n**Related Endpoints:**\\n- `GET /reference/lab-results-names` - Get available lab result names\\n- `GET /reference/units` - Get general measurement units\\n- Lab result POST endpoints (for submitting test data)\\n\\n**Important Notes:**\\n- Specialized units for cannabis laboratory testing and analysis\\n- Essential for compliance with cannabis testing regulations\\n- Used specifically for cannabinoid and terpene concentration measurements\\n- Required for accurate Certificate of Analysis (COA) reporting\\n- Different from general product measurement units\",\n        \"operationId\": \"ReferenceLab-result-unitsGet\",\n        \"responses\": {\n          \"200\": {\n            \"description\": \"Success - Returns array of lab result unit objects: `[{ LabResultUnitData }, ...]`\",\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"type\": \"array\",\n                  \"items\": {\n                    \"$ref\": \"#/components/schemas/LabResultUnitData\"\n                  }\n                }\n              }\n            }\n          },\n          \"401\": {\n            \"description\": \"Unauthorized - Invalid or missing API key\"\n          },\n          \"403\": {\n            \"description\": \"Forbidden - Account not authorized\"\n          },\n          \"500\": {\n            \"description\": \"Internal Server Error - Server error occurred\"\n          }\n        }\n      }\n    },\n    \"/reference/lab-results-names\": {\n      \"get\": {\n        \"tags\": [\"ReferenceData\"],\n        \"summary\": \"Get Lab Result Names\",\n        \"description\": \"**Purpose:** Retrieves the complete list of available lab result names that can be used with lab result POST endpoints for cannabinoid and terpene testing.\\n\\n**Request Requirements:**\\n- Any authenticated role authorization (no specific role required)\\n- No query parameters or request body needed\\n\\n**Response Data:**\\n- Returns array of strings with valid lab result names: `[\\\"string\\\", ...]`\\n- Array typically contains 50-100 cannabinoid and terpene names\\n- Returns empty array `[]` if no lab result names configured (rare)\\n- Standard cannabinoid names (THC, CBD, CBG, CBN, etc.)\\n- Common terpene names (Myrcene, Limonene, Pinene, etc.)\\n- All acceptable values for lab result name validation\\n\\n**Common Use Cases:**\\n- Validate lab result names before submitting test data\\n- Populate dropdown lists for lab result entry forms\\n- Reference data for cannabinoid and terpene testing workflows\\n- Support laboratory data integration and validation\\n- Generate dynamic forms for Certificate of Analysis (COA) entry\\n\\n**Performance & Limits:**\\n- Lightweight reference data optimized for frequent access\\n- Static dataset suitable for client-side caching\\n- No pagination needed due to manageable list size\\n- Consistent across all organizations and locations\\n\\n**Related Endpoints:**\\n- `GET /reference/lab-result-units` - Get valid units for these results\\n- Lab result POST endpoints - Submit test data using these names\\n- `GET /products` - Get products with lab result data\\n\\n**Important Notes:**\\n- These are the only valid values accepted for lab result names\\n- Standard cannabis testing terminology for consistency\\n- Essential for proper cannabinoid and terpene data submission\\n- Used throughout the system for lab result validation\\n- Required for compliance with cannabis testing standards\",\n        \"operationId\": \"ReferenceLab-results-namesGet\",\n        \"responses\": {\n          \"200\": {\n            \"description\": \"Success - Returns array of strings with lab result names: `[\\\"string\\\", ...]`\",\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"type\": \"array\",\n                  \"items\": {\n                    \"type\": \"string\"\n                  }\n                }\n              }\n            }\n          },\n          \"401\": {\n            \"description\": \"Unauthorized - Invalid or missing API key\"\n          },\n          \"403\": {\n            \"description\": \"Forbidden - Account not authorized\"\n          },\n          \"500\": {\n            \"description\": \"Internal Server Error - Server error occurred\"\n          }\n        }\n      }\n    },\n    \"/regulatory-category\": {\n      \"get\": {\n        \"tags\": [\"RegulatoryCategory\"],\n        \"summary\": \"Get Regulatory Categories\",\n        \"description\": \"**Purpose:** Retrieves the complete list of regulatory categories available for the authenticated location for compliance reporting and state-mandated product classification.\\n\\n**Request Requirements:**\\n- Any authenticated role authorization (no specific role required)\\n- No query parameters or request body needed\\n\\n**Response Data:**\\n- Returns array of regulatory category objects: `[{ RegulatoryCategory }, ...]`\\n- Array typically contains 5-20 regulatory categories per jurisdiction\\n- Returns empty array `[]` if no regulatory categories configured (rare)\\n- Includes category ID, name, and state-specific compliance codes\\n- State-mandated product categories for regulatory reporting (varies by jurisdiction)\\n- Results filtered to authenticated location's regulatory requirements\\n\\n**Common Use Cases:**\\n- Validate product regulatory classification for compliance reporting\\n- Generate state-mandated reports with proper category classifications\\n- Ensure product data meets regulatory requirements for each jurisdiction\\n- Support track-and-trace system integration with proper categorization\\n- Populate regulatory category fields in product management systems\\n\\n**Performance & Limits:**\\n- Lightweight reference data optimized for frequent access\\n- Small dataset specific to location's regulatory jurisdiction\\n- No pagination needed due to limited number of regulatory categories\\n- Results may vary by location based on state/local regulations\\n\\n**Related Endpoints:**\\n- `GET /product-category` - Get general product categories\\n- `GET /products` - Get products with regulatory category assignments\\n- `POST /product` - Create products with regulatory category classifications\\n\\n**Important Notes:**\\n- Categories are specific to location's regulatory jurisdiction\\n- Required for compliance with state cannabis regulations\\n- Essential for accurate track-and-trace system reporting\\n- Category requirements may change based on evolving regulations\\n- Used for state-mandated reporting and audit compliance\",\n        \"operationId\": \"Regulatory-categoryGet\",\n        \"responses\": {\n          \"200\": {\n            \"description\": \"Success - Returns array of regulatory category objects: `[{ RegulatoryCategory }, ...]`\",\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"type\": \"array\",\n                  \"items\": {\n                    \"$ref\": \"#/components/schemas/RegulatoryCategory\"\n                  }\n                }\n              }\n            }\n          },\n          \"401\": {\n            \"description\": \"Unauthorized - Invalid or missing API key\"\n          },\n          \"403\": {\n            \"description\": \"Forbidden - Account not authorized\"\n          },\n          \"500\": {\n            \"description\": \"Internal Server Error - Server error occurred\"\n          }\n        }\n      }\n    },\n    \"/reporting/inventory\": {\n      \"get\": {\n        \"tags\": [\"Reporting\"],\n        \"operationId\": \"ReportingInventoryGet\",\n        \"parameters\": [\n          {\n            \"name\": \"includeLabResults\",\n            \"in\": \"query\",\n            \"schema\": {\n              \"type\": \"boolean\",\n              \"default\": false\n            }\n          },\n          {\n            \"name\": \"includeRoomQuantities\",\n            \"in\": \"query\",\n            \"schema\": {\n              \"type\": \"boolean\",\n              \"default\": false\n            }\n          },\n          {\n            \"name\": \"includeAllocated\",\n            \"in\": \"query\",\n            \"schema\": {\n              \"type\": \"boolean\",\n              \"default\": false\n            }\n          },\n          {\n            \"name\": \"includeLineage\",\n            \"in\": \"query\",\n            \"schema\": {\n              \"type\": \"boolean\",\n              \"default\": false\n            }\n          }\n        ],\n        \"responses\": {\n          \"200\": {\n            \"description\": \"OK\",\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"type\": \"array\",\n                  \"items\": {\n                    \"$ref\": \"#/components/schemas/ReportingInventoryItem\"\n                  }\n                }\n              }\n            }\n          },\n          \"401\": {\n            \"description\": \"Unauthorized\"\n          },\n          \"403\": {\n            \"description\": \"Forbidden\"\n          },\n          \"500\": {\n            \"description\": \"Internal Server Error\"\n          }\n        }\n      }\n    },\n    \"/reporting/transactions\": {\n      \"get\": {\n        \"tags\": [\"Reporting\"],\n        \"summary\": \"Transactions List\",\n        \"description\": \"Retrieves POS and Wholesale transaction(s) from the provided dates and/or transactionId.\\nThe use of transactionId, to/from transaction date, and to/from last modified date are mutually exclusive.\\nProviding more than one will result in a validation error.\\n\\n**Performance & Limits:**\\n- Rate limited to 600 requests per minute (higher limit for frequently accessed transaction data)\\n- Optimized for transaction reporting and financial analysis workflows\\n- Use date range filtering to limit result size for better performance\",\n        \"operationId\": \"ReportingTransactionsGet\",\n        \"parameters\": [\n          {\n            \"name\": \"TransactionId\",\n            \"in\": \"query\",\n            \"description\": \"Specific transaction identifier for single transaction lookup.\",\n            \"schema\": {\n              \"type\": \"integer\",\n              \"format\": \"int32\"\n            }\n          },\n          {\n            \"name\": \"FromLastModifiedDateUTC\",\n            \"in\": \"query\",\n            \"description\": \"Start date for filtering transactions by last modified date (UTC) for incremental sync.\",\n            \"schema\": {\n              \"type\": \"string\",\n              \"format\": \"date-time\"\n            }\n          },\n          {\n            \"name\": \"ToLastModifiedDateUTC\",\n            \"in\": \"query\",\n            \"description\": \"End date for filtering transactions by last modified date (UTC) for incremental sync.\",\n            \"schema\": {\n              \"type\": \"string\",\n              \"format\": \"date-time\"\n            }\n          },\n          {\n            \"name\": \"FromDateUTC\",\n            \"in\": \"query\",\n            \"description\": \"Start date for filtering transactions by transaction date (UTC) for periodic reports.\",\n            \"schema\": {\n              \"type\": \"string\",\n              \"format\": \"date-time\"\n            }\n          },\n          {\n            \"name\": \"ToDateUTC\",\n            \"in\": \"query\",\n            \"description\": \"End date for filtering transactions by transaction date (UTC) for periodic reports.\",\n            \"schema\": {\n              \"type\": \"string\",\n              \"format\": \"date-time\"\n            }\n          },\n          {\n            \"name\": \"IncludeDetail\",\n            \"in\": \"query\",\n            \"description\": \"Flag to include detailed transaction item information for comprehensive reporting.\",\n            \"schema\": {\n              \"type\": \"boolean\"\n            }\n          },\n          {\n            \"name\": \"IncludeTaxes\",\n            \"in\": \"query\",\n            \"description\": \"Flag to include tax information for financial compliance reporting.\",\n            \"schema\": {\n              \"type\": \"boolean\"\n            }\n          },\n          {\n            \"name\": \"IncludeOrderIds\",\n            \"in\": \"query\",\n            \"description\": \"Flag to include order identifiers for order fulfillment tracking.\",\n            \"schema\": {\n              \"type\": \"boolean\"\n            }\n          },\n          {\n            \"name\": \"IncludeFeesAndDonations\",\n            \"in\": \"query\",\n            \"description\": \"Flag to include fees and donations for complete financial analysis.\",\n            \"schema\": {\n              \"type\": \"boolean\"\n            }\n          }\n        ],\n        \"responses\": {\n          \"200\": {\n            \"description\": \"Success\",\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"type\": \"array\",\n                  \"items\": {\n                    \"$ref\": \"#/components/schemas/Transaction\"\n                  }\n                }\n              }\n            }\n          },\n          \"400\": {\n            \"description\": \"Bad Request - `ValidationResult` object with `isValid` boolean, `errors` array, and `ruleSetsExecuted` array\",\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"$ref\": \"#/components/schemas/ValidationResult\"\n                }\n              }\n            }\n          },\n          \"401\": {\n            \"description\": \"Invalid API Key\"\n          },\n          \"403\": {\n            \"description\": \"Account not authorized\"\n          },\n          \"500\": {\n            \"description\": \"Something went wrong.\"\n          },\n          \"503\": {\n            \"description\": \"Temporarily disabled (kill switch).\"\n          }\n        }\n      }\n    },\n    \"/reporting/customers\": {\n      \"get\": {\n        \"tags\": [\"Reporting\"],\n        \"summary\": \"Customers List (Reporting)\",\n        \"description\": \"**Purpose:** Retrieves a comprehensive list of wholesale and POS customers optimized for reporting and analytics.\\n\\n**Request Requirements:**\\n- \\\"Reporting\\\" role authorization required for analytics data access\\n- Optional UTC date parameters for filtering\\n- No request body needed\\n\\n**Response Data:**\\n- Response format: `[{ Customer }, { Customer }, ...]`\\n- Array of `Customer` objects with complete customer information\\n- Includes primary and secondary qualifying conditions for medical customers\\n- Contains customer profile data, contact information, and preferences\\n- Results are automatically filtered by the authenticated location\\n\\n**How This Differs from `/customer/customers`:**\\n- Requires \\\"Reporting\\\" role instead of \\\"Customer\\\" role authorization\\n- Optimized for reporting and analytics rather than operational management\\n- Returns ALL customers for comprehensive reporting purposes\\n- Enhanced date range filtering designed for reporting workflows\\n- Performance tuned for bulk data export and analysis\\n\\n**Common Use Cases:**\\n- Generate comprehensive customer reports and analytics\\n- Export customer data for external systems or compliance requirements\\n- Synchronize customer changes with external databases using incremental sync\\n- Review customer records for regulatory compliance audits\\n- Analyze customer demographics and behavior patterns for marketing\\n\\n**Performance & Limits:**\\n- Rate limited to 600 requests per minute (higher limit for frequently accessed reporting data)\\n- Use date range filtering to limit result size for better performance\\n- Consider using `/reporting/customers-paginated` for very large datasets\\n- Cache results locally and use incremental sync for regular updates\\n- May return large datasets as it includes ALL customer types\\n\\n**Related Endpoints:**\\n- `GET /reporting/customers-paginated` - Paginated version for large datasets\\n- `GET /customer/customers` - Operational customer management endpoint\\n\\n**Important Notes:**\\n- This endpoint returns ALL customers (wholesale and POS) and may return large datasets\\n- Requires reporting authorization role for access\\n- Use date filtering to improve performance with large customer bases\",\n        \"operationId\": \"ReportingCustomersGet\",\n        \"parameters\": [\n          {\n            \"name\": \"fromLastModifiedDateUTC\",\n            \"in\": \"query\",\n            \"description\": \"Filter customers modified after this UTC date - Used for incremental sync\",\n            \"schema\": {\n              \"type\": \"string\",\n              \"format\": \"date-time\"\n            }\n          },\n          {\n            \"name\": \"toLastModifiedDateUTC\",\n            \"in\": \"query\",\n            \"description\": \"Filter customers modified before this UTC date - Used for date range filtering\",\n            \"schema\": {\n              \"type\": \"string\",\n              \"format\": \"date-time\"\n            }\n          },\n          {\n            \"name\": \"includeAnonymous\",\n            \"in\": \"query\",\n            \"description\": \"Include anonymous customers in results - Default: true\",\n            \"schema\": {\n              \"type\": \"boolean\",\n              \"default\": true\n            }\n          }\n        ],\n        \"responses\": {\n          \"200\": {\n            \"description\": \"Success - Returns array of customer objects\",\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"type\": \"array\",\n                  \"items\": {\n                    \"$ref\": \"#/components/schemas/Customer\"\n                  }\n                }\n              }\n            }\n          },\n          \"401\": {\n            \"description\": \"Unauthorized - Invalid or missing API key\"\n          },\n          \"403\": {\n            \"description\": \"Forbidden - Account not authorized for reporting access\"\n          },\n          \"500\": {\n            \"description\": \"Internal Server Error - Server error occurred\"\n          }\n        }\n      }\n    },\n    \"/reporting/customers-paginated\": {\n      \"get\": {\n        \"tags\": [\"Reporting\"],\n        \"summary\": \"Get Customers (Paginated, Reporting)\",\n        \"description\": \"**Purpose:** Retrieve paginated customer data optimized for reporting and analytics with enhanced performance for large-scale customer analysis.\\n\\n**Request Requirements:**\\n- \\\"Reporting\\\" role authorization required for analytics data access\\n- Optional query parameters for filtering and pagination control\\n- No request body needed\\n- Maximum page size of 10,000 customers for optimal performance\\n\\n**Response Data:**\\n- Response format: `[{ Customer }, { Customer }, ...]`\\n- Returns array of `Customer` objects for the requested page\\n- Array contains up to PageSize customers (default 1000, max 10,000)\\n- Returns empty array `[]` if no customers match criteria for the page (not null)\\n- **No pagination metadata**: Response contains only customer data without total counts or page information\\n- Includes primary and secondary qualifying conditions for medical customers\\n- Contains customer profile data, contact information, and preferences\\n- Results automatically filtered to authenticated location\\n\\n**Pagination Usage:**\\n- **First Request**: Call with PageNumber=0 to get first page\\n- **Subsequent Requests**: Increment PageNumber for each additional page\\n- **End Detection**: Continue requesting pages until you receive an empty array `[]`\\n- **Page Size Control**: Use PageSize parameter to control items per page (max 10,000)\\n- **Example Flow**: Request PageNumber=0 → Process results → Increment PageNumber → Repeat until empty `[]` response\\n\\n**Key Differences from `/customer/customers-paginated`:**\\n- **Authorization**: Requires \\\"Reporting\\\" role vs \\\"Customer\\\" role\\n- **Purpose**: Optimized for reporting and analytics vs operational customer management\\n- **Page Size**: Higher maximum page size limits for bulk reporting\\n- **Profile Sharing**: Enhanced customer profile sharing logic for reporting\\n- **Performance**: Designed for large-scale data export and analysis\\n\\n**Filtering Options:**\\n- fromLastModifiedDateUTC: Returns customers modified after this date (incremental sync)\\n- toLastModifiedDateUTC: Returns customers modified before this date (date range filtering)\\n- includeAnonymous: Include anonymous customers in results (default: true)\\n\\n**Common Use Cases:**\\n- Handle thousands of customers efficiently with paginated processing\\n- Process customers in manageable chunks for batch operations\\n- Avoid loading entire customer base at once for memory-conscious applications\\n- Stream customer data for live reporting dashboards and analytics\\n- Transfer customer data between systems in controlled batches\\n\\n**Performance & Limits:**\\n- Maximum 10,000 customers per page for optimal performance\\n- Start with PageNumber=0 and increment until no more data available\\n- Use consistent PageSize throughout pagination sequence for efficiency\\n- Monitor response times and adjust PageSize for optimal performance\\n- Cache results locally to minimize API calls and improve responsiveness\\n\\n**Pagination Detection:**\\n- **End of data detection**: Continue requesting pages until you receive an empty array `[]`\\n- **No metadata provided**: Response does not include total counts, page counts, or hasNextPage indicators\\n- **Sequential access**: Increment PageNumber from 0 until empty response indicates no more data\\n\\n**Related Endpoints:**\\n- `GET /reporting/customers` - Non-paginated version for smaller datasets\\n- `GET /customer/customers` - Operational customer management endpoint\\n\\n**Important Notes:**\\n- **Pagination Required**: Large customer bases require multiple page requests\\n- **Enhanced Profile Logic**: Uses advanced customer profile sharing based on LSP configuration\\n- **Reporting Optimized**: Designed for analytics and large-scale data processing\\n- **Location Scoped**: Results automatically filtered to authenticated location\\n- **Page Size Validation**: Requests exceeding 10,000 customers per page will be rejected\",\n        \"operationId\": \"ReportingCustomers-paginatedGet\",\n        \"parameters\": [\n          {\n            \"name\": \"fromLastModifiedDateUTC\",\n            \"in\": \"query\",\n            \"description\": \"Filter customers modified after this UTC date for incremental sync - Optional\",\n            \"schema\": {\n              \"type\": \"string\",\n              \"format\": \"date-time\"\n            }\n          },\n          {\n            \"name\": \"toLastModifiedDateUTC\",\n            \"in\": \"query\",\n            \"description\": \"Filter customers modified before this UTC date for date range filtering - Optional\",\n            \"schema\": {\n              \"type\": \"string\",\n              \"format\": \"date-time\"\n            }\n          },\n          {\n            \"name\": \"PageNumber\",\n            \"in\": \"query\",\n            \"description\": \"Page number for sequential pagination (integer, starts at 0) - Default: 0\",\n            \"schema\": {\n              \"type\": \"integer\",\n              \"format\": \"int32\",\n              \"default\": 0\n            }\n          },\n          {\n            \"name\": \"PageSize\",\n            \"in\": \"query\",\n            \"description\": \"Number of items per page (integer) - Default: 1000, Maximum: 10000\",\n            \"schema\": {\n              \"type\": \"integer\",\n              \"format\": \"int32\",\n              \"default\": 1000\n            }\n          },\n          {\n            \"name\": \"includeAnonymous\",\n            \"in\": \"query\",\n            \"description\": \"Include anonymous customers in results - Default: true\",\n            \"schema\": {\n              \"type\": \"boolean\",\n              \"default\": true\n            }\n          }\n        ],\n        \"responses\": {\n          \"200\": {\n            \"description\": \"Success - Returns array of customer objects for the requested page\",\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"type\": \"array\",\n                  \"items\": {\n                    \"$ref\": \"#/components/schemas/Customer\"\n                  }\n                }\n              }\n            }\n          },\n          \"400\": {\n            \"description\": \"Bad Request - `BadRequestResponse` object with `message` string field (check `propertyErrors`: null for simple message, array for field-specific errors)\",\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"$ref\": \"#/components/schemas/BadRequestResponse\"\n                }\n              }\n            }\n          },\n          \"401\": {\n            \"description\": \"Unauthorized - Invalid or missing API key\"\n          },\n          \"403\": {\n            \"description\": \"Forbidden - Account not authorized for reporting access\"\n          },\n          \"500\": {\n            \"description\": \"Internal Server Error - Server error occurred\"\n          }\n        }\n      }\n    },\n    \"/reporting/register-adjustments\": {\n      \"get\": {\n        \"tags\": [\"Reporting\"],\n        \"summary\": \"Get Register Adjustments\",\n        \"description\": \"**Purpose:** Retrieve register adjustment transactions for cash management and reconciliation reporting with detailed audit trail information.\\n\\n**Request Requirements:**\\n- \\\"Reporting\\\" role authorization required for financial data access\\n- Optional query parameters for date range filtering\\n- No request body needed\\n\\n**Response Data:**\\n- Response format: `[{ RegisterAdjustment }, { RegisterAdjustment }, ...]`\\n- Returns array of `RegisterAdjustment` objects with detailed transaction information\\n- Array may contain 0 to 1,000+ adjustments depending on date range and activity\\n- Returns empty array `[]` if no adjustments match criteria (not null)\\n- Includes adjustment amounts, types, timestamps, and employee information\\n- Contains reason codes and descriptions for each adjustment\\n- Results automatically filtered to authenticated location\\n\\n**Transaction Types Included:**\\n- **Adjustments**: Manual cash register corrections and balancing entries\\n- **Close Outs**: End-of-shift register closing transactions\\n- **Deposits**: Cash deposits made to the register\\n- **Withdrawals**: Cash withdrawals from the register\\n- **Cash Drops**: Safe drops and cash removal transactions\\n\\n**Filtering Options:**\\n- fromLastModifiedDateUTC: Returns adjustments modified after this date (incremental sync)\\n- toLastModifiedDateUTC: Returns adjustments modified before this date (date range filtering)\\n\\n**Common Use Cases:**\\n- Track all register cash movements for balancing and reconciliation\\n- Maintain detailed records of cash handling activities for audit trails\\n- Generate end-of-shift cash management summaries and reports\\n- Document cash handling for regulatory requirements and compliance\\n- Analyze cash flow patterns and adjustment trends for financial analysis\\n- Monitor unusual adjustment patterns or discrepancies for loss prevention\\n\\n**Performance & Limits:**\\n- Use date range filtering to limit results to specific time periods for optimal performance\\n- Combine with cash-summary endpoint for comprehensive cash reporting\\n- Cache results locally and use incremental sync for regular updates\\n- Optimized for financial reconciliation and audit trail workflows\\n\\n**Related Endpoints:**\\n- `GET /reporting/register-transactions` - Complete register activity including sales\\n- `GET /reporting/cash-summary` - Comprehensive cash reporting and summaries\\n- `GET /reporting/closing-report` - Financial closing reports with cash details\\n\\n**Important Notes:**\\n- **Adjustment Focus**: This endpoint focuses specifically on register adjustments only\\n- **Complete Activity**: For complete register activity including sales, use register-transactions\\n- **Audit Trail**: Maintains detailed records of all cash handling activities\\n- **Location Scoped**: Results automatically filtered to authenticated location\\n- **Employee Tracking**: Includes employee information for accountability and audit purposes\",\n        \"operationId\": \"ReportingRegister-adjustmentsGet\",\n        \"parameters\": [\n          {\n            \"name\": \"fromLastModifiedDateUTC\",\n            \"in\": \"query\",\n            \"description\": \"Filter adjustments modified after this date for incremental sync - Optional\",\n            \"schema\": {\n              \"type\": \"string\",\n              \"format\": \"date-time\"\n            }\n          },\n          {\n            \"name\": \"toLastModifiedDateUTC\",\n            \"in\": \"query\",\n            \"description\": \"Filter adjustments modified before this date for date range filtering - Optional\",\n            \"schema\": {\n              \"type\": \"string\",\n              \"format\": \"date-time\"\n            }\n          }\n        ],\n        \"responses\": {\n          \"200\": {\n            \"description\": \"Success - Returns array of register adjustment objects\",\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"type\": \"array\",\n                  \"items\": {\n                    \"$ref\": \"#/components/schemas/RegisterAdjustment\"\n                  }\n                }\n              }\n            }\n          },\n          \"401\": {\n            \"description\": \"Unauthorized - Invalid or missing API key\"\n          },\n          \"403\": {\n            \"description\": \"Forbidden - Account not authorized for reporting access\"\n          },\n          \"500\": {\n            \"description\": \"Internal Server Error - Server error occurred\"\n          }\n        }\n      }\n    },\n    \"/reporting/register-transactions\": {\n      \"get\": {\n        \"tags\": [\"Reporting\"],\n        \"summary\": \"Get Register Transactions (Comprehensive Transaction History)\",\n        \"description\": \"**Purpose:** Retrieve comprehensive register transaction history including sales, adjustments, cash management, and operational activities for complete financial reporting.\\n\\n**Request Requirements:**\\n- \\\"Reporting\\\" role authorization required for financial transaction data access\\n- Optional query parameters for date range filtering\\n- No request body needed\\n\\n**Response Data:**\\n- Response format: `[{ RegisterTransaction }, { RegisterTransaction }, ...]`\\n- Returns array of `RegisterTransaction` objects with comprehensive transaction data\\n- Array may contain 0 to 50,000+ transactions depending on date range and business volume\\n- Returns empty array `[]` if no transactions match criteria (not null)\\n- Includes financial details, customer information, product details, and employee tracking\\n- Complete audit trail with timestamps, register context, and status information\\n- Results automatically filtered to authenticated location\\n\\n**Transaction Types Included:**\\n- **Sales Transactions**: Completed customer purchases and returns\\n- **Register Adjustments**: Manual cash corrections and balance adjustments\\n- **Cash Management**: Deposits, withdrawals, cash drops, and till operations\\n- **Register Close-Outs**: End-of-shift register balancing and reconciliation\\n- **Payment Processing**: Credit card, cash, and other payment method transactions\\n- **Operational Activities**: Register opening, closing, and maintenance operations\\n\\n**Transaction Data Returned:**\\n- **Financial Details**: Transaction amounts, payment methods, taxes, and fees\\n- **Customer Information**: Customer IDs, types, and transaction associations\\n- **Product Details**: Items sold, quantities, prices, and categories\\n- **Employee Tracking**: Staff members who processed transactions\\n- **Timestamps**: Creation, modification, and completion times\\n- **Register Context**: Terminal/register identification and session information\\n- **Status Information**: Transaction status, voiding, and modification history\\n\\n**Filtering Options:**\\n- fromLastModifiedDateUTC: Returns transactions modified after this date (incremental sync)\\n- toLastModifiedDateUTC: Returns transactions modified before this date (date range filtering)\\n\\n**Common Use Cases:**\\n- Balance daily sales across all registers and payment methods for financial reconciliation\\n- Generate comprehensive revenue reports and analytics for sales reporting\\n- Maintain detailed transaction records for compliance and audit preparation\\n- Track all cash movements and register balancing activities for cash management\\n- Analyze sales patterns, employee performance, and business trends for performance analysis\\n- Extract detailed tax information for regulatory compliance and tax reporting\\n- Monitor transaction patterns for unusual activities and fraud prevention\\n\\n**Performance & Limits:**\\n- Large datasets: This endpoint can return substantial amounts of transaction data\\n- Use date range filtering to limit results for better performance\\n- Use fromLastModifiedDateUTC for regular data synchronization and incremental sync\\n- Schedule large data exports during low-traffic periods for optimal performance\\n- Optimized for comprehensive financial reporting and audit trail requirements\\n\\n**Related Endpoints:**\\n- `GET /reporting/register-adjustments` - Cash adjustments and corrections only\\n- `GET /reporting/closing-report` - Summary financial reports for specific date ranges\\n- `GET /reporting/cash-summary` - Cash-specific summaries and balancing information\\n\\n**Important Notes:**\\n- **Comprehensive Data**: Returns ALL register activities, resulting in potentially large datasets\\n- **Real-Time Updates**: Transaction data reflects current state and may include recent modifications\\n- **Location Scoped**: Results automatically filtered to authenticated dispensary location\\n- **Historical Accuracy**: Maintains complete audit trail for all register operations\\n- **Complete Activity**: This is the most comprehensive endpoint for all register transaction types\",\n        \"operationId\": \"ReportingRegister-transactionsGet\",\n        \"parameters\": [\n          {\n            \"name\": \"fromLastModifiedDateUTC\",\n            \"in\": \"query\",\n            \"description\": \"Filter transactions modified after this date for incremental sync - Optional\",\n            \"schema\": {\n              \"type\": \"string\",\n              \"format\": \"date-time\"\n            }\n          },\n          {\n            \"name\": \"toLastModifiedDateUTC\",\n            \"in\": \"query\",\n            \"description\": \"Filter transactions modified before this date for date range filtering - Optional\",\n            \"schema\": {\n              \"type\": \"string\",\n              \"format\": \"date-time\"\n            }\n          }\n        ],\n        \"responses\": {\n          \"200\": {\n            \"description\": \"Success - Returns array of RegisterTransaction objects with comprehensive transaction data\",\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"type\": \"array\",\n                  \"items\": {\n                    \"$ref\": \"#/components/schemas/RegisterTransaction\"\n                  }\n                }\n              }\n            }\n          },\n          \"401\": {\n            \"description\": \"Unauthorized - Invalid or missing API key\"\n          },\n          \"403\": {\n            \"description\": \"Forbidden - Account not authorized for reporting access\"\n          },\n          \"500\": {\n            \"description\": \"Internal Server Error - Server error occurred\"\n          }\n        }\n      }\n    },\n    \"/reporting/cash-summary\": {\n      \"get\": {\n        \"tags\": [\"Reporting\"],\n        \"summary\": \"Get Cash Summary (Real-time Register Activity)\",\n        \"description\": \"**Purpose:** Retrieve real-time register cash activity summary with comprehensive financial reconciliation data for cash management and balancing.\\n\\n**Request Requirements:**\\n- \\\"Reporting\\\" role authorization required for financial data access\\n- Optional query parameters for date range filtering\\n- Date range must be within the last 7 days for optimal performance\\n- No request body needed\\n\\n**Response Data:**\\n- Response format: `[{ RegisterCashSummary }, { RegisterCashSummary }, ...]`\\n- Returns array of `RegisterCashSummary` objects with detailed cash flow information\\n- Array may contain 1-50+ register summaries depending on number of active registers\\n- Returns empty array `[]` if no cash activity matches criteria (not null)\\n- Real-time data reflecting current register status and activities\\n- Includes variance calculations and reconciliation details\\n- Results automatically filtered to authenticated location\\n\\n**Summary Data Included:**\\n- **Starting Balance**: Register opening cash amount for the period\\n- **Ending Balance**: Current or closing register cash amount\\n- **Sales**: Total cash sales transactions processed\\n- **Returns**: Cash refunds and return transactions\\n- **Deposits**: Cash deposits added to the register\\n- **Adjustments**: Manual cash corrections and modifications\\n- **Over/Short**: Cash variance from expected amounts\\n\\n**Filtering Options:**\\n- fromLastModifiedDateUTC: Returns activity after this date (incremental sync, within 7 days)\\n- toLastModifiedDateUTC: Returns activity before this date (date range filtering)\\n\\n**Common Use Cases:**\\n- Track current register cash status throughout the day for real-time monitoring\\n- Balance register cash at shift changes for reconciliation\\n- Generate end-of-day cash summaries for closing procedures\\n- Identify and investigate cash discrepancies for variance analysis\\n- Create comprehensive cash flow reports for financial reporting\\n- Maintain detailed cash handling records for audit preparation\\n\\n**Performance & Limits:**\\n- Rate limited to 480 requests per minute (higher limit for frequent cash monitoring)\\n- Date range restriction: fromLastModifiedDateUTC must be within the last 7 days\\n- Use recent date ranges (within 7 days) for fastest response times\\n- Combine with register-adjustments endpoint for detailed transaction breakdown\\n- Cache results and refresh periodically for dashboard applications\\n- Optimized for real-time cash monitoring and reconciliation workflows\\n\\n**Related Endpoints:**\\n- `GET /reporting/register-adjustments` - Detailed transaction breakdown\\n- `GET /reporting/register-transactions` - Complete register transaction history\\n- `GET /reporting/closing-report` - Comprehensive financial closing reports\\n\\n**Important Notes:**\\n- **Real-time Data**: Provides real-time data and may show different results than historical reports during active business hours\\n- **7-Day Limit**: Date filtering restricted to last 7 days for optimal performance\\n- **Active Business Hours**: Results may vary during active operations due to real-time updates\\n- **Location Scoped**: Results automatically filtered to authenticated location\\n- **Variance Tracking**: Includes over/short calculations for cash discrepancy identification\",\n        \"operationId\": \"ReportingCash-summaryGet\",\n        \"parameters\": [\n          {\n            \"name\": \"fromLastModifiedDateUTC\",\n            \"in\": \"query\",\n            \"description\": \"Filter activity after this date (must be within last 7 days) - Optional\",\n            \"schema\": {\n              \"type\": \"string\",\n              \"format\": \"date-time\"\n            }\n          },\n          {\n            \"name\": \"toLastModifiedDateUTC\",\n            \"in\": \"query\",\n            \"description\": \"Filter activity before this date for date range filtering - Optional\",\n            \"schema\": {\n              \"type\": \"string\",\n              \"format\": \"date-time\"\n            }\n          }\n        ],\n        \"responses\": {\n          \"200\": {\n            \"description\": \"Success - Returns array of register cash summary objects\",\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"type\": \"array\",\n                  \"items\": {\n                    \"$ref\": \"#/components/schemas/RegisterCashSummary\"\n                  }\n                }\n              }\n            }\n          },\n          \"400\": {\n            \"description\": \"Bad Request - String error message (parse response body as plain text)\",\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"type\": \"string\"\n                }\n              }\n            }\n          },\n          \"401\": {\n            \"description\": \"Unauthorized - Invalid or missing API key\"\n          },\n          \"403\": {\n            \"description\": \"Forbidden - Account not authorized for reporting access\"\n          },\n          \"500\": {\n            \"description\": \"Internal Server Error - Server error occurred\"\n          }\n        }\n      }\n    },\n    \"/reporting/loyalty-snapshot\": {\n      \"get\": {\n        \"tags\": [\"Reporting\"],\n        \"summary\": \"Get Loyalty Balance Snapshot (Daily)\",\n        \"description\": \"**Purpose:** Retrieve current loyalty point balances for all customers with nightly batch processing for comprehensive loyalty program reporting and analysis.\\n\\n**Request Requirements:**\\n- \\\"Reporting\\\" role authorization required for loyalty data access\\n- No query parameters required\\n- No request body needed\\n- Rate limited to 1 request per minute for system protection\\n\\n**Response Data:**\\n- Response format: `[{ LoyaltySnapshot }, { LoyaltySnapshot }, ...]`\\n- Returns array of `LoyaltySnapshot` objects with customer loyalty information\\n- Array typically contains 100-10,000+ customers depending on loyalty program participation\\n- Returns empty array `[]` if no customers have loyalty activity (not null)\\n- Includes current point balances, loyalty tier information, and customer identifiers\\n- Contains earned points, redeemed points, and available balance details\\n- Results automatically filtered to authenticated location\\n\\n**Data Characteristics:**\\n- **Update Frequency**: Nightly batch processing (updated once per day)\\n- **Data Freshness**: Reflects loyalty activity through the previous business day\\n- **Scope**: All customers with loyalty program participation\\n- **Balance Types**: Current available points, earned points, redeemed points\\n- **Configuration**: Uses either loyalty ledger service or database depending on system configuration\\n\\n**Common Use Cases:**\\n- Generate end-of-day loyalty summaries for daily loyalty reports\\n- Check customer loyalty balances and history for customer service\\n- Identify customers by loyalty tier or balance ranges for marketing campaigns\\n- Document loyalty program activity for audits and compliance reporting\\n- Export loyalty data to external systems for data synchronization\\n- Analyze loyalty program engagement and effectiveness for analytics\\n\\n**Consumption Guidelines:**\\n- **Recommended Frequency**: Once per day (after nightly processing completes)\\n- **Optimal Timing**: Early morning hours after batch processing\\n- **Caching Strategy**: Cache results for 24 hours, refresh daily\\n\\n**Performance & Limits:**\\n- Rate limited to 1 request per minute for system protection\\n- Schedule automated calls during off-peak hours for optimal performance\\n- Cache results locally to avoid repeated calls within the same day\\n- Use for batch processing rather than real-time customer lookups\\n- Optimized for daily loyalty program management and reporting workflows\\n\\n**Related Endpoints:**\\n- `GET /reporting/customer-loyalty-snapshot` - Individual customer loyalty data\\n- `GET /reporting/loyalty-transactions-paginated` - Detailed loyalty transaction history\\n- `GET /reporting/national-loyalty-snapshot-paginated` - Cross-organization loyalty data\\n\\n**Important Notes:**\\n- **Snapshot Data**: This is a snapshot of loyalty balances as of the last nightly processing\\n- **Real-time Alternative**: For real-time loyalty transactions, use other loyalty endpoints\\n- **Nightly Processing**: Data reflects activity through the previous business day\\n- **Location Scoped**: Results filtered to authenticated location loyalty participants\\n- **Rate Limited**: Maximum 1 request per minute to protect system resources\",\n        \"operationId\": \"ReportingLoyalty-snapshotGet\",\n        \"responses\": {\n          \"200\": {\n            \"description\": \"Success - Returns array of loyalty balance snapshot objects\",\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"type\": \"array\",\n                  \"items\": {\n                    \"$ref\": \"#/components/schemas/LoyaltySnapshot\"\n                  }\n                }\n              }\n            }\n          },\n          \"401\": {\n            \"description\": \"Unauthorized - Invalid or missing API key\"\n          },\n          \"403\": {\n            \"description\": \"Forbidden - Account not authorized for reporting access\"\n          },\n          \"500\": {\n            \"description\": \"Internal Server Error - Server error occurred\"\n          }\n        }\n      }\n    },\n    \"/reporting/products\": {\n      \"get\": {\n        \"tags\": [\"Reporting\"],\n        \"summary\": \"Get Products (Master List, Reporting)\",\n        \"description\": \"**Purpose:** Retrieve the complete product master list with comprehensive product data for reporting and analytics, including all products regardless of API or online availability settings.\\n\\n**Request Requirements:**\\n- \\\"Reporting\\\" role authorization required for comprehensive product data access\\n- Optional query parameters for incremental sync filtering\\n- No request body needed\\n\\n**Response Data:**\\n- Response format: `[{ ProductDetail }, { ProductDetail }, ...]`\\n- Returns array of `ProductDetail` objects with complete product information\\n- Array typically contains 100-50,000+ products depending on catalog size\\n- Returns empty array `[]` if no products exist or match criteria (not null)\\n- Includes ALL products in the system (active and inactive)\\n- Contains pricing, categories, strains, lab results, and inventory data\\n- Results automatically filtered to authenticated location\\n\\n**Key Differences from `/products`:**\\n- **No API Access Filter**: Returns ALL products, not just those enabled for API access\\n- **No Online Filter**: Ignores online availability settings used by standard products endpoint\\n- **Master Data Focus**: Designed for comprehensive product data exports and reporting\\n- **Complete Dataset**: Includes inactive and non-public products for complete catalog view\\n\\n**Filtering Options:**\\n- fromLastModifiedDateUTC: Returns products modified after this date (incremental sync)\\n\\n**Common Use Cases:**\\n- Get complete product catalog for analysis and comprehensive reporting\\n- Export all product data for external systems and data warehousing\\n- Review all products regardless of API/online settings for inventory audits\\n- Maintain complete product records for master data management\\n- Generate reports including all products for compliance reporting\\n\\n**When to Use This vs `/products`:**\\n- **Use `/reporting/products`**: For complete data exports, reporting, audits, and analytics\\n- **Use `/products`**: For e-commerce, POS integration, and customer-facing applications\\n\\n**Performance & Limits:**\\n- Large datasets: This endpoint can return substantial product catalogs\\n- Use fromLastModifiedDateUTC for incremental sync to optimize performance\\n- Optimized for comprehensive product reporting and analytics workflows\\n- Consider pagination for very large product catalogs (50,000+ products)\\n\\n**Related Endpoints:**\\n- `GET /products` - Customer-facing products with API and online filters\\n- `GET /inventory` - Product inventory levels and availability\\n- `GET /product-categories` - Product categorization data\\n\\n**Important Notes:**\\n- **Complete Dataset**: Returns ALL products, including those not intended for public API access or online sales\\n- **Master Data**: This is the authoritative source for complete product catalog data\\n- **Reporting Focus**: Designed for analytics and reporting rather than customer-facing operations\\n- **Location Scoped**: Results filtered to authenticated location product catalog\\n- **Incremental Sync**: Use date filtering for efficient data synchronization\",\n        \"operationId\": \"ReportingProductsGet\",\n        \"parameters\": [\n          {\n            \"name\": \"fromLastModifiedDateUTC\",\n            \"in\": \"query\",\n            \"description\": \"Filter products modified after this date for incremental sync - Optional\",\n            \"schema\": {\n              \"type\": \"string\",\n              \"format\": \"date-time\"\n            }\n          }\n        ],\n        \"responses\": {\n          \"200\": {\n            \"description\": \"Success\",\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"type\": \"array\",\n                  \"items\": {\n                    \"$ref\": \"#/components/schemas/ProductDetail\"\n                  }\n                }\n              }\n            }\n          },\n          \"401\": {\n            \"description\": \"Invalid API Key\"\n          },\n          \"403\": {\n            \"description\": \"Account not authorized\"\n          },\n          \"500\": {\n            \"description\": \"Something went wrong.\"\n          }\n        }\n      }\n    },\n    \"/reporting/closing-report\": {\n      \"get\": {\n        \"tags\": [\"Reporting\"],\n        \"summary\": \"Get Closing Report (Comprehensive Financial Summary)\",\n        \"description\": \"**Purpose:** Retrieve comprehensive closing report with detailed financial summaries, payment breakdowns, and business analytics for specified date range reporting.\\n\\n**Request Requirements:**\\n- \\\"Reporting\\\" role authorization required for financial data access\\n- fromDateUTC and toDateUTC parameters required (both must be provided)\\n- Date range must be between 12 hours and 31 days maximum\\n- UTC datetime format required for all date parameters\\n\\n**Response Data:**\\n- Response format: `{ ClosingReport }` or `{ ClosingReportV2 }` (structure varies by system configuration)\\n- Returns `ClosingReport` or `ClosingReportV2` object with comprehensive financial data\\n- Single object containing multi-dimensional analysis across all business aspects\\n- Not an array - returns one comprehensive report object for the date range\\n- Multi-dimensional analysis across payment methods, customer types, and product categories\\n- Detailed tax calculations and compliance information\\n- Payment processor-specific data and settlement details\\n- Results automatically filtered to authenticated location\\n\\n**Date Range Restrictions:**\\n- **Maximum Range**: 31 days or less\\n- **Minimum Range**: Greater than 12 hours\\n- **Format**: UTC datetime values\\n- **Both Required**: fromDateUTC and toDateUTC must be provided\\n\\n**Report Sections Included:**\\n- **Payment Summary**: Breakdown by payment method (cash, card, etc.)\\n- **Customer Type Summary**: Sales analysis by customer categories\\n- **Category Summary**: Revenue breakdown by product categories\\n- **Tax Summary**: Detailed tax calculations and rates\\n- **Order Source Summary**: Sales by channel (online, in-store, etc.)\\n- **Order Type Summary**: Analysis by order types (delivery, pickup, etc.)\\n- **Fees & Donations**: Processing fees and charitable donations (when enabled)\\n- **Pay-by-Bank Details**: ACH transaction summaries and batch files (when enabled)\\n\\n**Response Version Determination:**\\n- Response structure varies based on internal system configuration\\n- **V1 (ClosingReport)**: Standard financial summaries without tips/fees\\n- **V2 (ClosingReportV2)**: Enhanced with tips, fees, and Pay-by-Bank details\\n- **API Consumer Guidance**: Both versions share common base fields, V2 extends V1 with additional properties\\n- **Breaking Change Protection**: V2 is additive-only (safe to parse as V1 and ignore extra fields)\\n\\n**Handling Variable Response Types:**\\n- **Recommended Approach**: Parse response for common fields first, then check for V2-specific properties\\n- **Common Base Properties**: All versions include PaymentSummary, CustomerTypeSummary, CategorySummary, TaxSummary\\n- **V2 Additional Properties**: TipsSummary, FeesSummary, PayByBankDetails (when present)\\n\\n**Common Use Cases:**\\n- Generate end-of-period financial summaries for daily/weekly closing\\n- Balance sales across all payment methods and channels for financial reconciliation\\n- Extract detailed tax information for compliance and tax reporting\\n- Analyze sales performance across multiple dimensions for business analytics\\n- Reconcile payment processor settlements for payment processing\\n- Generate comprehensive financial documentation for audit preparation\\n\\n**Performance & Limits:**\\n- This report processes large amounts of transactional data\\n- Longer date ranges may take additional time to generate\\n- Use shorter date ranges for faster processing\\n- Schedule report generation during off-peak hours for optimal performance\\n- Cache results for frequently accessed date ranges\\n\\n**Related Endpoints:**\\n- `GET /reporting/register-transactions` - Detailed transaction-level data\\n- `GET /reporting/cash-summary` - Cash-specific summaries\\n- `GET /reporting/register-adjustments` - Register adjustment details\\n\\n**Important Notes:**\\n- **Processing Intensive**: This report processes large amounts of transactional data\\n- **Date Range Validation**: Requests with invalid date ranges will be rejected\\n- **Comprehensive Data**: Includes all financial aspects of business operations\\n- **Location Scoped**: Results filtered to authenticated location financial data\\n- **Version Dependent**: Response object type depends on system configuration and features enabled\",\n        \"operationId\": \"ReportingClosing-reportGet\",\n        \"parameters\": [\n          {\n            \"name\": \"fromDateUTC\",\n            \"in\": \"query\",\n            \"description\": \"Start date for the report period (required) - Must be UTC datetime\",\n            \"schema\": {\n              \"type\": \"string\",\n              \"format\": \"date-time\"\n            }\n          },\n          {\n            \"name\": \"toDateUTC\",\n            \"in\": \"query\",\n            \"description\": \"End date for the report period (required) - Must be UTC datetime\",\n            \"schema\": {\n              \"type\": \"string\",\n              \"format\": \"date-time\"\n            }\n          }\n        ],\n        \"responses\": {\n          \"200\": {\n            \"description\": \"Success - Returns comprehensive closing report object\",\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"$ref\": \"#/components/schemas/ClosingReportV2\"\n                }\n              }\n            }\n          },\n          \"400\": {\n            \"description\": \"Bad Request - String error message (parse response body as plain text)\",\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"type\": \"string\"\n                }\n              }\n            }\n          },\n          \"401\": {\n            \"description\": \"Unauthorized - Invalid or missing API key\"\n          },\n          \"403\": {\n            \"description\": \"Forbidden - Account not authorized for reporting access\"\n          },\n          \"500\": {\n            \"description\": \"Internal Server Error - Server error occurred\"\n          }\n        }\n      }\n    },\n    \"/reporting/discounts\": {\n      \"get\": {\n        \"tags\": [\"Reporting\"],\n        \"summary\": \"Get Discounts (Complete Discount Configuration)\",\n        \"description\": \"**Purpose:** Retrieve comprehensive discount configuration data for all discounts regardless of status, type, or activation state for promotional reporting and analysis.\\n\\n**Request Requirements:**\\n- \\\"Reporting\\\" role authorization required for discount configuration data access\\n- Optional query parameter for including deleted discounts\\n- No request body needed\\n\\n**Response Data:**\\n- Response format: `[{ ReportingDiscountDetail }, { ReportingDiscountDetail }, ...]`\\n- Returns array of `ReportingDiscountDetail` objects with complete discount configurations\\n- Array typically contains 5-500+ discounts depending on promotional activity\\n- Returns empty array `[]` if no discounts exist (not null)\\n- Includes all restriction types and eligibility criteria\\n- Contains scheduling and recurrence information\\n- Provides location-specific applicability data\\n- Results automatically filtered to authenticated location\\n\\n**Unique Endpoint:** This is the only discounts endpoint in the Public API - there is no parallel non-reporting version.\\n\\n**Filtering Options:**\\n- includeDeleted: Include deleted/archived discounts in results (default: false)\\n\\n**Discount Information Included:**\\n- **Basic Details**: Discount names, descriptions, and identifiers\\n- **Status Information**: Active/inactive status and deletion state\\n- **Type Classification**: Manual vs automatic discount types\\n- **Validity Periods**: Start and end dates (converted to UTC)\\n- **Discount Groups**: Associated discount group memberships\\n- **Product Restrictions**: Specific products eligible for the discount\\n- **Category Restrictions**: Product categories covered by the discount\\n- **Strain Restrictions**: Cannabis strain-specific discount rules\\n- **Brand Restrictions**: Brand-specific discount applications\\n- **Vendor Restrictions**: Vendor-specific discount configurations\\n- **Weekly Recurrence**: Recurring discount schedule information\\n- **Location Mapping**: Multi-location discount applicability\\n\\n**Common Use Cases:**\\n- Analyze discount effectiveness and usage patterns for discount analysis\\n- Export complete discount configurations for configuration backup\\n- Document promotional activities for regulatory review and compliance reporting\\n- Synchronize discount rules with external systems for system integration\\n- Review existing promotions for campaign planning and marketing planning\\n- Maintain comprehensive records of all promotional activities for audit preparation\\n\\n**Performance & Limits:**\\n- Use includeDeleted=false for active discount analysis to optimize performance\\n- Cache results locally as discount configurations change infrequently\\n- Process restriction arrays to understand discount eligibility logic\\n- Optimized for promotional reporting and marketing analysis workflows\\n\\n**Related Endpoints:**\\n- `GET /reporting/closing-report` - Financial impact of discount usage\\n- `GET /reporting/register-transactions` - Transaction-level discount application\\n- `GET /products` - Products eligible for discount restrictions\\n\\n**Important Notes:**\\n- **Complete Configuration**: Returns ALL discount configurations including inactive and deleted discounts when requested\\n- **Use Filtering**: Use includeDeleted parameter appropriately for your use case\\n- **UTC Conversion**: All validity periods are automatically converted to UTC\\n- **Location Scoped**: Results filtered to authenticated location discount configurations\\n- **Unique Endpoint**: This is the only public API endpoint for discount data access\",\n        \"operationId\": \"ReportingDiscountsGet\",\n        \"parameters\": [\n          {\n            \"name\": \"includeDeleted\",\n            \"in\": \"query\",\n            \"description\": \"Include deleted/archived discounts in results - Default: false\",\n            \"schema\": {\n              \"type\": \"boolean\",\n              \"default\": false\n            }\n          }\n        ],\n        \"responses\": {\n          \"200\": {\n            \"description\": \"Success - Returns array of comprehensive discount configuration objects\",\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"type\": \"array\",\n                  \"items\": {\n                    \"$ref\": \"#/components/schemas/ReportingDiscountDetail\"\n                  }\n                }\n              }\n            }\n          },\n          \"401\": {\n            \"description\": \"Unauthorized - Invalid or missing API key\"\n          },\n          \"403\": {\n            \"description\": \"Forbidden - Account not authorized for reporting access\"\n          },\n          \"500\": {\n            \"description\": \"Internal Server Error - Server error occurred\"\n          }\n        }\n      }\n    },\n    \"/room/rooms\": {\n      \"get\": {\n        \"tags\": [\"Room\"],\n        \"summary\": \"Get Rooms\",\n        \"description\": \"**Purpose:** Retrieve cultivation rooms and facility areas configured for the location to support cultivation operations and facility management.\\n\\n**Request Requirements:**\\n- \\\"Room\\\" role authorization required for room data access\\n- Optional filtering parameters available for specific room lookup\\n- Cultivation facility management permissions required\\n\\n**Response Data:**\\n- Returns array of `Room` objects with room identification and type information\\n- Array typically contains 5-50 rooms depending on cultivation facility size\\n- Returns empty array `[]` if no rooms match criteria (not null)\\n- Includes room identification, naming, and functional type flags\\n- Results automatically filtered to authenticated location\\n\\n**Filtering Options:**\\n- **roomId**: Optional integer parameter to retrieve specific room by ID\\n- **roomName**: Optional string parameter to search rooms by name\\n- **Combined Filtering**: Parameters can be used together for precise room lookup\\n- **No Filters**: Returns all rooms when no parameters provided\\n\\n**Room Information Included:**\\n- **RoomId**: Unique identifier for each cultivation room or facility area\\n- **RoomName**: Human-readable name for room identification and management\\n- **Location Information**: Facility location details (when integrator is Dutchie)\\n- **Room Type Flags**: Boolean flags indicating room functionality (IsQuarantineRoom, IsVaultRoom, IsSalesFloor, etc.)\\n\\n**Common Use Cases:**\\n- Populate room dropdown lists in cultivation management interfaces\\n- Display available rooms for plant placement and cultivation tracking\\n- Support cultivation facility room management and organization\\n- Enable room-specific cultivation tracking and environmental monitoring\\n- Facilitate cultivation workflow room assignments and plant movement\\n\\n**Performance & Limits:**\\n- Efficient room lookup optimized for cultivation facility workflows\\n- Optimized database queries for improved performance\\n- Flexible filtering for specific room management needs\\n- Results consistent across cultivation and facility management systems\\n\\n**Related Endpoints:**\\n- `POST /room` - Create or update room configuration\\n- `GET /plant` - View plants assigned to specific cultivation rooms\\n- `GET /harvest` - Track harvest operations by cultivation room\\n\\n**Important Notes:**\\n- **Cultivation Integration**: Essential for cultivation facility management and plant tracking\\n- **Location Specific**: Results filtered to authenticated location facility setup\\n- **Integrator Dependent**: Location information visibility controlled by integrator type\\n- **Cultivation Ready**: Room data used throughout cultivation tracking workflows\",\n        \"operationId\": \"RoomRoomsGet\",\n        \"parameters\": [\n          {\n            \"name\": \"roomId\",\n            \"in\": \"query\",\n            \"description\": \"Optional room ID for specific room lookup - integer\",\n            \"schema\": {\n              \"type\": \"integer\",\n              \"format\": \"int32\"\n            }\n          },\n          {\n            \"name\": \"roomName\",\n            \"in\": \"query\",\n            \"description\": \"Optional room name for searching rooms by name - string\",\n            \"schema\": {\n              \"type\": \"string\"\n            }\n          }\n        ],\n        \"responses\": {\n          \"200\": {\n            \"description\": \"Success - Returns array of room objects: `[{ Room }, ...]`\",\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"type\": \"array\",\n                  \"items\": {\n                    \"$ref\": \"#/components/schemas/Room\"\n                  }\n                }\n              }\n            }\n          },\n          \"401\": {\n            \"description\": \"Unauthorized - Invalid or missing API key\"\n          },\n          \"403\": {\n            \"description\": \"Forbidden - Account not authorized for room access\"\n          },\n          \"500\": {\n            \"description\": \"Internal Server Error - Server error occurred\"\n          }\n        }\n      }\n    },\n    \"/room\": {\n      \"post\": {\n        \"tags\": [\"Room\"],\n        \"summary\": \"Create or Update Room\",\n        \"description\": \"**Purpose:** Create a new cultivation room or update an existing room configuration for cultivation facility management and plant tracking operations.\\n\\n**Request Requirements:**\\n- \\\"Room\\\" role authorization required for room data modification\\n- `Room` object in request body with room configuration details\\n- Content-Type: application/json\\n- Cultivation facility management permissions required\\n\\n**Response Data:**\\n- Returns single `Room` object (not array) with updated room information\\n- Includes assigned RoomId for new rooms or updated ID for existing rooms\\n- Complete room information with all fields populated\\n- Room identification, naming, and type flag information\\n\\n**Create vs Update Behavior:**\\n- **CREATE**: When RoomId is null or 0, a new room record will be created\\n- **UPDATE**: When RoomId is provided with a valid room ID, the existing room will be updated\\n- **Identification**: Room existence determined by RoomId value\\n- **Automatic Detection**: System automatically determines create vs update based on RoomId\\n\\n**Room Data Fields:**\\n- **RoomId**: Unique identifier for room (null/0 for new rooms, specific ID for updates)\\n- **RoomName**: Human-readable name for room identification and cultivation tracking\\n- **Room Type Flags**: Boolean indicators for room functionality (IsQuarantineRoom, IsVaultRoom, etc.)\\n\\n**Common Use Cases:**\\n- Add new cultivation rooms to facility management system\\n- Update existing room names or configuration details\\n- Modify room setup for cultivation facility reorganization\\n- Create room assignments for cultivation tracking workflows\\n- Support cultivation facility expansion and room management\\n\\n**Performance & Limits:**\\n- Single room operation for targeted cultivation facility management\\n- Immediate room configuration update reflected in cultivation systems\\n- Optimized for cultivation facility management and plant tracking workflows\\n- Changes reflected immediately in room assignment and cultivation systems\\n\\n**Related Endpoints:**\\n- `GET /room/rooms` - Retrieve existing room configuration before updates\\n- `GET /plant` - View plants assigned to cultivation rooms\\n- `POST /plant/nonsts/update` - Update plant room assignments\\n\\n**Important Notes:**\\n- **RoomId Assignment**: New rooms receive automatically generated RoomId\\n- **Cultivation Integration**: Room configuration affects plant tracking and cultivation workflows\\n- **Location Scoped**: Rooms automatically associated with authenticated location\\n- **Cultivation Ready**: Room data immediately available for plant assignment operations\\n- **Facility Management**: Supports cultivation facility organization and room tracking\",\n        \"operationId\": \"RoomPost\",\n        \"requestBody\": {\n          \"description\": \"Room information to create or update - Room object with RoomId, RoomName, and room type flags\",\n          \"content\": {\n            \"application/json-patch+json\": {\n              \"schema\": {\n                \"$ref\": \"#/components/schemas/Room\"\n              }\n            },\n            \"application/json\": {\n              \"schema\": {\n                \"$ref\": \"#/components/schemas/Room\"\n              }\n            },\n            \"text/json\": {\n              \"schema\": {\n                \"$ref\": \"#/components/schemas/Room\"\n              }\n            },\n            \"application/*+json\": {\n              \"schema\": {\n                \"$ref\": \"#/components/schemas/Room\"\n              }\n            }\n          },\n          \"x-bodyName\": \"room\"\n        },\n        \"responses\": {\n          \"200\": {\n            \"description\": \"Success - Returns single room object: `{ Room }`\",\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"$ref\": \"#/components/schemas/Room\"\n                }\n              }\n            }\n          },\n          \"401\": {\n            \"description\": \"Unauthorized - Invalid or missing API key\"\n          },\n          \"403\": {\n            \"description\": \"Forbidden - Account not authorized for room modification\"\n          },\n          \"500\": {\n            \"description\": \"Internal Server Error - Server error occurred\"\n          }\n        }\n      }\n    },\n    \"/sizes\": {\n      \"get\": {\n        \"tags\": [\"Size\"],\n        \"summary\": \"Get Product Sizes\",\n        \"description\": \"**Purpose:** Retrieves the complete list of product sizes available for the authenticated organization for product configuration and inventory management.\\n\\n**Request Requirements:**\\n- Any authenticated role authorization (no specific role required)\\n- No query parameters or request body needed\\n\\n**Response Data:**\\n- Returns array of size objects: `[{ Size }, ...]`\\n- Response format: `[{ Size }, { Size }, ...]`\\n- Example: `[{ \\\"SizeId\\\": 1, \\\"SizeName\\\": \\\"1g\\\", \\\"Description\\\": \\\"One gram flower package\\\" }, { \\\"SizeId\\\": 2, \\\"SizeName\\\": \\\"3.5g\\\", \\\"Description\\\": \\\"Eighth ounce flower package\\\" }, ...]`\\n- Array typically contains 15-40 product sizes per organization\\n- Returns empty array `[]` if no sizes configured (rare)\\n- Includes size ID, name, and measurement details\\n- Standard product sizes (grams, ounces, units, etc.) for cannabis products\\n- Results filtered to authenticated organization level\\n\\n**Common Use Cases:**\\n- Populate product size dropdown lists in product creation forms\\n- Configure product variants with different size options\\n- Support inventory management with size-based tracking\\n- Generate size-specific pricing and inventory reports\\n- Enable e-commerce product configuration with size selections\\n\\n**Performance & Limits:**\\n- Lightweight reference data optimized for frequent access\\n- Small dataset suitable for client-side caching\\n- No pagination needed due to limited number of standard sizes\\n- Results consistent across all locations within organization\\n\\n**Related Endpoints:**\\n- `GET /products` - Get products that use these size configurations\\n- `POST /product` - Create products with size assignments\\n- `GET /inventory` - Get inventory levels by product size\\n\\n**Important Notes:**\\n- Sizes are defined at organization level (LSP) not location level\\n- Standard cannabis industry size configurations for consistency\\n- Used for product configuration and inventory tracking\\n- Essential reference data for product and pricing management\\n- Supports both weight-based and unit-based product sizing\",\n        \"operationId\": \"SizesGet\",\n        \"responses\": {\n          \"200\": {\n            \"description\": \"Success - Returns array of size objects: `[{ Size }, ...]`\",\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"type\": \"array\",\n                  \"items\": {\n                    \"$ref\": \"#/components/schemas/Size\"\n                  }\n                }\n              }\n            }\n          },\n          \"401\": {\n            \"description\": \"Unauthorized - Invalid or missing API key\"\n          },\n          \"403\": {\n            \"description\": \"Forbidden - Account not authorized\"\n          },\n          \"500\": {\n            \"description\": \"Internal Server Error - Server error occurred\"\n          }\n        }\n      }\n    },\n    \"/strains\": {\n      \"post\": {\n        \"tags\": [\"Strains\"],\n        \"operationId\": \"StrainsPost\",\n        \"requestBody\": {\n          \"content\": {\n            \"application/json-patch+json\": {\n              \"schema\": {\n                \"$ref\": \"#/components/schemas/UpdateStrain\"\n              }\n            },\n            \"application/json\": {\n              \"schema\": {\n                \"$ref\": \"#/components/schemas/UpdateStrain\"\n              }\n            },\n            \"text/json\": {\n              \"schema\": {\n                \"$ref\": \"#/components/schemas/UpdateStrain\"\n              }\n            },\n            \"application/*+json\": {\n              \"schema\": {\n                \"$ref\": \"#/components/schemas/UpdateStrain\"\n              }\n            }\n          },\n          \"x-bodyName\": \"req\"\n        },\n        \"responses\": {\n          \"200\": {\n            \"description\": \"OK\",\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"$ref\": \"#/components/schemas/StrainDetail\"\n                }\n              }\n            }\n          },\n          \"400\": {\n            \"description\": \"Bad Request\",\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"type\": \"string\"\n                }\n              }\n            }\n          },\n          \"401\": {\n            \"description\": \"Unauthorized\"\n          },\n          \"403\": {\n            \"description\": \"Forbidden\"\n          },\n          \"500\": {\n            \"description\": \"Internal Server Error\"\n          }\n        }\n      },\n      \"get\": {\n        \"tags\": [\"Strains\"],\n        \"summary\": \"Get Strains\",\n        \"description\": \"**Purpose:** Retrieves all cannabis strains available for the authenticated location with genetic and classification information.\\n\\n**Request Requirements:**\\n- \\\"Inventory\\\" role authorization required for strain data access\\n- No query parameters or request body needed\\n\\n**Response Data:**\\n- Response format: `[{ StrainDetail }, { StrainDetail }, ...]`\\n- Array typically contains 10-100 strains per location\\n- Returns empty array `[]` if no strains configured for location\\n- Results automatically filtered to authenticated location\\n- See `StrainDetail` model for complete field descriptions\\n\\n**Data Filtering:**\\n- Results are automatically scoped to the authenticated location\\n- Only active strains are included in the response\\n- Strain types include full classification information for categorization\\n\\n**Common Use Cases:**\\n- Populate strain dropdown lists in product creation and editing forms\\n- Display available strain genetics for product categorization and filtering\\n- Synchronize strain catalog with external inventory management systems\\n- Generate strain-specific compliance reports and analytics\\n- Support product menu organization by genetic type and characteristics\\n- Cache strain data for offline product creation workflows\\n\\n**Performance & Limits:**\\n- Lightweight data optimized for frequent access and caching\\n- Typically small dataset (10-100 strains) suitable for client-side storage\\n- No pagination needed due to manageable strain catalog sizes per location\\n- Response time typically under 50ms for standard strain catalogs\\n- Safe for frequent polling (recommended: cache for 5-10 minutes)\\n\\n**Integration Patterns:**\\n- **UI Dropdowns**: Cache response locally for form population\\n- **Product Creation**: Use strain IDs for product categorization\\n- **External Sync**: Compare ExternalId values for third-party integration\\n- **Menu Display**: Filter products by strain type and characteristics\\n\\n**Related Endpoints:**\\n- `POST /strains` - Create or update strain information in this catalog\\n- `GET /strains/types` - Get valid strain type classifications for filtering\\n\\n**Important Notes:**\\n- Strain catalog is location-specific and varies by dispensary\\n- External ID values enable synchronization with cultivation management systems\\n- Strain information directly affects product categorization and compliance reporting\",\n        \"operationId\": \"StrainsGet\",\n        \"responses\": {\n          \"200\": {\n            \"description\": \"Success - Returns array of strain objects: `[{ StrainDetail }, ...]`\",\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"type\": \"array\",\n                  \"items\": {\n                    \"$ref\": \"#/components/schemas/StrainDetail\"\n                  }\n                }\n              }\n            }\n          },\n          \"401\": {\n            \"description\": \"Unauthorized - Invalid or missing API key\"\n          },\n          \"403\": {\n            \"description\": \"Forbidden - Account not authorized for inventory access\"\n          },\n          \"500\": {\n            \"description\": \"Internal Server Error - Server error occurred\"\n          }\n        }\n      }\n    },\n    \"/strains/types\": {\n      \"get\": {\n        \"tags\": [\"Strains\"],\n        \"summary\": \"Get Strain Types\",\n        \"description\": \"**Purpose:** Retrieves the list of valid strain type classifications for cannabis strain categorization.\\n\\n**Request Requirements:**\\n- \\\"Inventory\\\" role authorization required for strain data access\\n- No query parameters or request body needed\\n\\n**Response Data:**\\n- Response format: `[string, string, string, string]`\\n- Example: `[\\\"Indica\\\", \\\"Sativa\\\", \\\"Hybrid\\\", \\\"CBD\\\"]`\\n- Returns available strain type classifications\\n- Includes standard classifications: Indica, Sativa, Hybrid, CBD\\n- Reference data for strain type validation\\n\\n**Common Use Cases:**\\n- Validate strain type values before creating or updating strains\\n- Populate strain type dropdown lists in user interfaces\\n- Reference data for strain classification validation\\n- Support product categorization by genetic type\\n- Ensure consistency in strain type terminology\\n\\n**Performance & Limits:**\\n- Reference data with immediate response\\n- Small dataset suitable for frequent caching\\n- No location filtering needed for standard classifications\\n- Consistent across all locations and organizations\\n\\n**Related Endpoints:**\\n- `POST /strains` - Create or update strains (validates against these types)\\n- `GET /strains` - Get all strains with their assigned types\\n\\n**Important Notes:**\\n- These are the only valid values accepted for strain type in strain creation/updates\\n- Values are case-sensitive when used in strain operations\\n- Standard cannabis industry classifications for genetic types\\n- Used for product menu organization and customer filtering\",\n        \"operationId\": \"StrainsTypesGet\",\n        \"responses\": {\n          \"200\": {\n            \"description\": \"Success - Returns array of strings with strain type names: `[\\\"Indica\\\", \\\"Sativa\\\", \\\"Hybrid\\\", \\\"CBD\\\"]`\",\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"type\": \"array\",\n                  \"items\": {\n                    \"type\": \"string\"\n                  }\n                }\n              }\n            }\n          },\n          \"401\": {\n            \"description\": \"Unauthorized - Invalid or missing API key\"\n          },\n          \"403\": {\n            \"description\": \"Forbidden - Account not authorized for inventory access\"\n          },\n          \"500\": {\n            \"description\": \"Internal Server Error - Server error occurred\"\n          }\n        }\n      }\n    },\n    \"/table/tables\": {\n      \"get\": {\n        \"tags\": [\"Table\"],\n        \"summary\": \"Get Tables\",\n        \"description\": \"**Purpose:** Retrieve dining tables or seating areas configured for the location to support hospitality operations and table management.\\n\\n**Request Requirements:**\\n- \\\"Room\\\" role authorization required for table data access\\n- Optional filtering parameters available for specific table lookup\\n- Table management permissions for hospitality operations\\n\\n**Response Data:**\\n- Returns array of `Table` objects with table identification details\\n- Array typically contains 10-100 tables depending on hospitality operation size\\n- Returns empty array `[]` if no tables match criteria (not null)\\n- Includes table identification and naming information (TableId, TableName)\\n- Results automatically filtered to authenticated location\\n\\n**Filtering Options:**\\n- **tableId**: Optional integer parameter to retrieve specific table by ID\\n- **tableName**: Optional string parameter to search tables by name\\n- **Combined Filtering**: Parameters can be used together for precise table lookup\\n- **No Filters**: Returns all tables when no parameters provided\\n\\n**Table Information Included:**\\n- **TableId**: Unique identifier for each dining table or seating area\\n- **TableName**: Human-readable name for table identification and assignment\\n\\n**Common Use Cases:**\\n- Populate table dropdown lists in reservation and seating management\\n- Display available tables for customer seating assignments\\n- Support hospitality operation table management and configuration\\n- Enable table-specific service tracking and order management\\n- Facilitate dining room management and table allocation workflows\\n\\n**Performance & Limits:**\\n- Efficient table lookup optimized for hospitality operation workflows\\n- Flexible filtering for specific table management needs\\n- No pagination needed for typical table counts per location\\n- Results consistent across hospitality and service management systems\\n\\n**Related Endpoints:**\\n- `POST /table` - Create or update table configuration\\n- `GET /guest-list` - View guest check-ins by table assignments\\n- `POST /transaction` - Process transactions linked to table service\\n\\n**Important Notes:**\\n- **Hospitality Integration**: Essential for dining room management and table service\\n- **Table Management**: Supports table configuration and seating assignments\\n- **Location Specific**: Results filtered to authenticated location table setup\\n- **Service Ready**: Table data used throughout hospitality service workflows\\n- **Flexible Lookup**: Multiple filtering options for precise table management\",\n        \"operationId\": \"TableTablesGet\",\n        \"parameters\": [\n          {\n            \"name\": \"tableId\",\n            \"in\": \"query\",\n            \"description\": \"Optional table ID for specific table lookup - integer\",\n            \"schema\": {\n              \"type\": \"integer\",\n              \"format\": \"int32\"\n            }\n          },\n          {\n            \"name\": \"tableName\",\n            \"in\": \"query\",\n            \"description\": \"Optional table name for searching tables by name - string\",\n            \"schema\": {\n              \"type\": \"string\"\n            }\n          }\n        ],\n        \"responses\": {\n          \"200\": {\n            \"description\": \"Success - Returns array of table objects: `[{ Table }, ...]`\",\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"type\": \"array\",\n                  \"items\": {\n                    \"$ref\": \"#/components/schemas/Table\"\n                  }\n                }\n              }\n            }\n          },\n          \"401\": {\n            \"description\": \"Unauthorized - Invalid or missing API key\"\n          },\n          \"403\": {\n            \"description\": \"Forbidden - Account not authorized for table access\"\n          },\n          \"500\": {\n            \"description\": \"Internal Server Error - Server error occurred\"\n          }\n        }\n      }\n    },\n    \"/table\": {\n      \"post\": {\n        \"tags\": [\"Table\"],\n        \"summary\": \"Create or Update Table\",\n        \"description\": \"**Purpose:** Create a new dining table or update an existing table configuration for hospitality operations and seating management.\\n\\n**Request Requirements:**\\n- \\\"Room\\\" role authorization required for table data modification\\n- `Table` object in request body with table information\\n- Content-Type: application/json\\n- Table management permissions for hospitality operations\\n\\n**Response Data:**\\n- Returns single `Table` object (not array) with updated table information\\n- Includes assigned TableId for new tables or updated ID for existing tables\\n- Complete table information with all fields populated (TableId, TableName)\\n- Table identification and naming information\\n\\n**Create vs Update Behavior:**\\n- **CREATE**: When TableId is null or 0, a new table record will be created\\n- **UPDATE**: When TableId is provided with a positive integer, the existing table will be updated\\n- **Identification**: Table existence determined by TableId value (null/0 = create, positive = update)\\n- **Automatic Detection**: System automatically determines create vs update based on TableId\\n\\n**Table Data Fields:**\\n- **TableId**: Unique identifier for table (null/0 for new tables, positive integer for updates)\\n- **TableName**: Human-readable name for table identification and assignment\\n\\n**Common Use Cases:**\\n- Add new dining tables to hospitality seating configuration\\n- Update existing table names or configuration details\\n- Modify table setup for dining room reorganization\\n- Create table assignments for hospitality service workflows\\n- Support dining room management and table allocation systems\\n\\n**Performance & Limits:**\\n- Single table operation for targeted table management\\n- Immediate table configuration update reflected in hospitality systems\\n- Optimized for dining room management and seating workflows\\n- Changes reflected immediately in table assignment and service systems\\n\\n**Related Endpoints:**\\n- `GET /table/tables` - Retrieve existing table configuration before updates\\n- `GET /guest-list` - View guest check-ins that use table assignments\\n- `POST /transaction` - Process transactions linked to table service\\n\\n**Important Notes:**\\n- **TableId Assignment**: New tables receive automatically generated TableId\\n- **Hospitality Integration**: Table configuration affects seating and service workflows\\n- **Location Scoped**: Tables automatically associated with authenticated location\\n- **Service Ready**: Table data immediately available for hospitality operations\\n- **Configuration Management**: Supports dining room setup and table organization\",\n        \"operationId\": \"TablePost\",\n        \"requestBody\": {\n          \"description\": \"Table information to create or update - Table object with TableId and TableName fields\",\n          \"content\": {\n            \"application/json-patch+json\": {\n              \"schema\": {\n                \"$ref\": \"#/components/schemas/Table\"\n              }\n            },\n            \"application/json\": {\n              \"schema\": {\n                \"$ref\": \"#/components/schemas/Table\"\n              }\n            },\n            \"text/json\": {\n              \"schema\": {\n                \"$ref\": \"#/components/schemas/Table\"\n              }\n            },\n            \"application/*+json\": {\n              \"schema\": {\n                \"$ref\": \"#/components/schemas/Table\"\n              }\n            }\n          },\n          \"x-bodyName\": \"table\"\n        },\n        \"responses\": {\n          \"200\": {\n            \"description\": \"Success - Returns single table object: `{ Table }`\",\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"$ref\": \"#/components/schemas/Table\"\n                }\n              }\n            }\n          },\n          \"401\": {\n            \"description\": \"Unauthorized - Invalid or missing API key\"\n          },\n          \"403\": {\n            \"description\": \"Forbidden - Account not authorized for table modification\"\n          },\n          \"500\": {\n            \"description\": \"Internal Server Error - Server error occurred\"\n          }\n        }\n      }\n    },\n    \"/tag\": {\n      \"get\": {\n        \"tags\": [\"Tag\"],\n        \"summary\": \"Get Tags\",\n        \"description\": \"**Purpose:** Retrieve all inventory tracking tags available for the location to support inventory management and regulatory compliance tracking.\\n\\n**Request Requirements:**\\n- \\\"Inventory\\\" role authorization required for tag data access\\n- No query parameters or request body needed\\n- Inventory management permissions for tag tracking operations\\n\\n**Response Data:**\\n- Returns array of `Tag` objects with tag identification information\\n- Array typically contains 100-10,000 tags depending on facility operation size\\n- Returns empty array `[]` if no tags are available (not null)\\n- Includes tag names and unique identifiers for inventory assignment\\n- Results automatically filtered to authenticated service provider level\\n\\n**Tag Information Included:**\\n- **TagId**: Unique numeric identifier for each tag\\n- **TagName**: Human-readable name or label for the tag\\n- **Assignment Ready**: Tag information available for inventory assignment operations\\n\\n**Common Use Cases:**\\n- Populate tag dropdown lists in inventory management interfaces\\n- Display available tags for plant and package assignment workflows\\n- Support inventory tracking and regulatory compliance operations\\n- Enable tag allocation and assignment for cultivation and retail workflows\\n- Facilitate state system integration and regulatory reporting requirements\\n\\n**Performance & Limits:**\\n- Comprehensive tag data retrieval for inventory management\\n- Service provider level tag access for facility operations\\n- Optimized for inventory tracking and compliance workflows\\n- Results include all available tags for assignment and tracking\\n\\n**Related Endpoints:**\\n- `POST /package/set-tags` - Assign tags to inventory packages\\n- `POST /package/add-tags` - Add additional tags to packages\\n- `POST /package/remove-tags` - Remove tags from inventory packages\\n\\n**Important Notes:**\\n- **Compliance Critical**: Essential for regulatory compliance and state system integration\\n- **Inventory Integration**: Tag data used throughout inventory tracking workflows\\n- **Service Provider Scoped**: Tags filtered to authenticated service provider level\\n- **Assignment Ready**: Tag data immediately available for inventory assignment operations\\n- **Regulatory Tracking**: Tags support state system compliance and audit requirements\",\n        \"operationId\": \"TagGet\",\n        \"responses\": {\n          \"200\": {\n            \"description\": \"Success - Returns array of tag objects: `[{ Tag }, ...]`\",\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"type\": \"array\",\n                  \"items\": {\n                    \"$ref\": \"#/components/schemas/Tag\"\n                  }\n                }\n              }\n            }\n          },\n          \"401\": {\n            \"description\": \"Unauthorized - Invalid or missing API key\"\n          },\n          \"403\": {\n            \"description\": \"Forbidden - Account not authorized for inventory access\"\n          },\n          \"500\": {\n            \"description\": \"Internal Server Error - Server error occurred\"\n          }\n        }\n      }\n    },\n    \"/terminals\": {\n      \"get\": {\n        \"tags\": [\"Terminals\"],\n        \"summary\": \"Get Terminals\",\n        \"description\": \"**Purpose:** Retrieve all point-of-sale terminals configured for the location to support transaction processing and retail operations.\\n\\n**Request Requirements:**\\n- Valid API key authentication required for terminal data access\\n- No specific role restrictions beyond authentication\\n- No query parameters or request body needed\\n\\n**Response Data:**\\n- Returns array of `Terminal` objects with terminal identification information\\n- Response format: `[{ Terminal }, { Terminal }, ...]`\\n- Array typically contains 1-10 terminals depending on retail operation size\\n- Returns empty array `[]` if no terminals are configured (not null)\\n- Includes terminal identification and naming information only\\n- Results automatically filtered to authenticated location\\n\\n**Terminal Information Included:**\\n- **TerminalId**: Unique numeric identifier for each point-of-sale terminal\\n- **TerminalName**: Human-readable name for terminal identification\\n\\n**Common Use Cases:**\\n- Populate terminal dropdown lists in transaction processing interfaces\\n- Display available terminals for cashier assignment and management\\n- Support point-of-sale system configuration and setup\\n- Enable terminal-specific transaction tracking and reporting\\n- Facilitate retail operation management and terminal allocation\\n\\n**Performance & Limits:**\\n- Lightweight operation optimized for frequent terminal lookups\\n- Small dataset suitable for real-time retail operation workflows\\n- No pagination needed due to limited terminal counts per location\\n- Results consistent across point-of-sale and transaction systems\\n\\n**Related Endpoints:**\\n- `POST /transaction` - Process transactions using configured terminals\\n- `GET /reporting/register-transactions` - View terminal-specific transaction history\\n- `GET /reporting/cash-summary` - Terminal cash management and reconciliation\\n\\n**Important Notes:**\\n- **Retail Integration**: Essential for point-of-sale operations and transaction processing\\n- **Terminal Management**: Supports retail terminal configuration and assignment\\n- **Location Specific**: Results filtered to authenticated location terminal setup\\n- **Real-time Access**: Current terminal availability and configuration information\\n- **Transaction Ready**: Terminal data used throughout retail transaction workflows\",\n        \"operationId\": \"TerminalsGet\",\n        \"responses\": {\n          \"200\": {\n            \"description\": \"Success - Returns array of terminal objects: `[{ Terminal }, ...]`\",\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"type\": \"array\",\n                  \"items\": {\n                    \"$ref\": \"#/components/schemas/Terminal\"\n                  }\n                }\n              }\n            }\n          },\n          \"401\": {\n            \"description\": \"Unauthorized - Invalid or missing API key\"\n          },\n          \"403\": {\n            \"description\": \"Forbidden - Account not authorized\"\n          },\n          \"500\": {\n            \"description\": \"Internal Server Error - Server error occurred\"\n          }\n        }\n      }\n    },\n    \"/transaction/create-anonymous\": {\n      \"post\": {\n        \"tags\": [\"Transaction\"],\n        \"summary\": \"Create Anonymous Customer Transaction\",\n        \"description\": \"**Purpose:** Create an anonymous customer profile and automatically check them into the dispensary guest list for pickup or service.\\n\\n**Request Requirements:**\\n- \\\"PreOrder\\\" role authorization required for transaction creation\\n- `CreateAnonymousTransactionRequest` object in request body\\n- Content-Type: application/json\\n- Optional transaction reference for internal tracking\\n\\n**Response Data:**\\n- Returns anonymous transaction object: `{ AnonymousTransaction }`\\n- CustomerId: Temporary customer identifier for this session\\n- TransactionId: Transaction identifier for order processing and tracking\\n- UniqueId: System-generated unique identifier for customer lookup\\n\\n**Process Flow:**\\n1. Anonymous profile creation: Generate temporary customer record with unique identifier\\n2. Guest list check-in: Automatically add customer to dispensary queue/guest list\\n3. Transaction setup: Create transaction record for order processing\\n4. Unique tracking: Assign unique ID for following up on order status\\n\\n**Common Use Cases:**\\n- Process walk-in customers without pre-existing accounts\\n- Provide quick service for customers who prefer not to create full accounts\\n- Handle one-time or occasional customers efficiently\\n- Accommodate privacy-focused customers who prefer minimal data collection\\n- Bridge anonymous sales with customer tracking systems for POS integration\\n\\n**Performance & Limits:**\\n- Immediate customer profile and transaction creation\\n- Automatic guest list integration for streamlined workflow\\n- Temporary records designed for single-session use\\n- Optimized for high-volume walk-in customer processing\\n\\n**Related Endpoints:**\\n- `POST /preorder/submit` - Create orders for existing customers with full profiles\\n- `GET /guest-list` - View current guest list including anonymous customers\\n\\n**Important Notes:**\\n- Anonymous customer profiles are temporary and session-based\\n- Customer automatically appears in dispensary queue/guest list\\n- Optional transaction reference field for external system correlation\\n- Each anonymous customer gets a unique system identifier\\n- Minimal data collection while maintaining operational requirements\\n- Choose this for walk-ins who don't want accounts; use preorder endpoints for existing customers\",\n        \"operationId\": \"TransactionCreate-anonymousPost\",\n        \"requestBody\": {\n          \"description\": \"Anonymous transaction request with optional transaction reference - CreateAnonymousTransactionRequest object\",\n          \"content\": {\n            \"application/json-patch+json\": {\n              \"schema\": {\n                \"$ref\": \"#/components/schemas/CreateAnonymousTransactionRequest\"\n              }\n            },\n            \"application/json\": {\n              \"schema\": {\n                \"$ref\": \"#/components/schemas/CreateAnonymousTransactionRequest\"\n              }\n            },\n            \"text/json\": {\n              \"schema\": {\n                \"$ref\": \"#/components/schemas/CreateAnonymousTransactionRequest\"\n              }\n            },\n            \"application/*+json\": {\n              \"schema\": {\n                \"$ref\": \"#/components/schemas/CreateAnonymousTransactionRequest\"\n              }\n            }\n          },\n          \"x-bodyName\": \"req\"\n        },\n        \"responses\": {\n          \"200\": {\n            \"description\": \"Success - Returns anonymous transaction object: `{ AnonymousTransaction }`\",\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"$ref\": \"#/components/schemas/AnonymousTransaction\"\n                }\n              }\n            }\n          },\n          \"401\": {\n            \"description\": \"Unauthorized - Invalid or missing API key\"\n          },\n          \"403\": {\n            \"description\": \"Forbidden - Account not authorized for transaction creation\"\n          },\n          \"500\": {\n            \"description\": \"Internal Server Error - Server error occurred during transaction creation\"\n          }\n        }\n      }\n    },\n    \"/util/AuthorizationHeader/{apiKey}\": {\n      \"get\": {\n        \"tags\": [\"Util\"],\n        \"summary\": \"Generate Authorization Header\",\n        \"description\": \"**Purpose:** Convert an API key into a properly formatted authorization header for initial API client setup and testing.\\n\\n**Intended Use:** This utility endpoint is designed for initial setup and testing workflows. For production applications, consider encoding headers client-side using Base64: `Basic {base64(api_key:)}`\\n\\n**Request Requirements:**\\n- No authentication required - public utility endpoint\\n- API key provided as URL path parameter\\n- Utility function for API client development and testing\\n\\n**Response Data:**\\n- Returns single string value (not array) with formatted authorization header\\n- Basic authentication header format: \\\"Basic [base64-encoded-api-key]\\\"\\n- Ready-to-use authorization header value for HTTP clients\\n- Base64 encoded API key in standard HTTP Basic authentication format\\n\\n**Authorization Header Format:**\\n- **Encoding**: API key converted to Base64 ASCII encoding\\n- **Format**: \\\"Basic {base64-encoded-key}\\\" format for HTTP Authorization header\\n- **Standards Compliant**: Follows HTTP Basic Authentication specification\\n- **Client Ready**: Direct usage in HTTP client authorization headers\\n\\n**Common Use Cases:**\\n- Initial API client setup and configuration\\n- Development and testing workflows\\n- Manual header generation for API testing tools\\n- Integration development and troubleshooting\\n\\n**Related Endpoints:**\\n- `GET /whoami` - Verify API key validity and location access\\n- `GET /health` - Test basic API connectivity\\n- All other endpoints that require the generated authorization header\\n\\n**Important Notes:**\\n- **Public Utility**: No authentication required for this utility endpoint\\n- **Developer Tool**: Designed for API client development and testing support\\n- **Header Generation**: Produces standard HTTP Basic authentication headers\\n- **Standards Compliant**: Follows HTTP Basic Authentication formatting requirements\",\n        \"operationId\": \"UtilAuthorizationHeaderByApiKeyGet\",\n        \"parameters\": [\n          {\n            \"name\": \"apiKey\",\n            \"in\": \"path\",\n            \"description\": \"API key to convert into authorization header format - string\",\n            \"required\": true,\n            \"schema\": {\n              \"type\": \"string\"\n            }\n          }\n        ],\n        \"responses\": {\n          \"200\": {\n            \"description\": \"Success - Returns formatted authorization header string: \\\"Basic {base64-encoded-key}\\\"\",\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"type\": \"string\"\n                }\n              }\n            }\n          }\n        }\n      }\n    },\n    \"/vehicles\": {\n      \"get\": {\n        \"tags\": [\"Vehicles\"],\n        \"summary\": \"Get Vehicles\",\n        \"description\": \"**Purpose:** Retrieve all vehicles available for delivery and transportation operations to support logistics and compliance tracking.\\n\\n**Request Requirements:**\\n- \\\"Reporting\\\" or \\\"Deliveries\\\" role authorization required for vehicle data access\\n- No query parameters or request body needed\\n\\n**Response Data:**\\n- Response format: `[{ VehicleDetail }, { VehicleDetail }, ...]`\\n- Array typically contains 1-20 vehicles depending on delivery operation size\\n- Returns empty array `[]` if no vehicles are configured (not null)\\n- Includes vehicle identification, specifications, and operational details\\n- License plate numbers, make/model information, and registration data\\n- Results automatically filtered to authenticated location\\n\\n**Vehicle Information Included:**\\n- **Identification**: Vehicle ID, license plate, VIN numbers\\n- **Specifications**: Make, model, year, color, and vehicle type\\n- **Registration**: Registration status and compliance information\\n- **Operational**: Availability status and assignment details\\n\\n**Common Use Cases:**\\n- Populate vehicle dropdown lists in delivery assignment forms\\n- Display vehicle fleet information for logistics management\\n- Support delivery route planning and vehicle allocation\\n- Maintain vehicle records for compliance and regulatory requirements\\n- Generate vehicle utilization reports for operational analysis\\n\\n**Performance & Limits:**\\n- Lightweight operation optimized for frequent vehicle lookups\\n- Small dataset suitable for real-time delivery assignment workflows\\n- No pagination needed due to limited fleet sizes\\n- Results consistent across delivery management operations\\n\\n**Related Endpoints:**\\n- `POST /vehicles` - Create or update vehicle information\\n- `GET /drivers` - Get drivers who can operate vehicles\\n- `POST /deliveries/set-route-detail` - Assign vehicles to delivery routes\\n\\n**Important Notes:**\\n- **Fleet Management**: Essential for delivery operations and logistics coordination\\n- **Compliance Ready**: Vehicle data supports regulatory compliance and tracking\\n- **Location Specific**: Results filtered to authenticated location vehicle fleet\\n- **Real-time Access**: Current vehicle availability and status information\\n- **Delivery Integration**: Vehicle data used throughout delivery assignment workflows\",\n        \"operationId\": \"VehiclesGet\",\n        \"responses\": {\n          \"200\": {\n            \"description\": \"Success - Returns array of vehicle objects: `[{ VehicleDetail }, ...]`\",\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"type\": \"array\",\n                  \"items\": {\n                    \"$ref\": \"#/components/schemas/VehicleDetail\"\n                  }\n                }\n              }\n            }\n          },\n          \"401\": {\n            \"description\": \"Unauthorized - Invalid or missing API key\"\n          },\n          \"403\": {\n            \"description\": \"Forbidden - Account not authorized for vehicle access\"\n          },\n          \"500\": {\n            \"description\": \"Internal Server Error - Server error occurred\"\n          }\n        }\n      },\n      \"post\": {\n        \"tags\": [\"Vehicles\"],\n        \"summary\": \"Create or Update Vehicle\",\n        \"description\": \"**Purpose:** Create a new vehicle or update an existing vehicle with comprehensive fleet information for delivery operations and compliance tracking.\\n\\n**Request Requirements:**\\n- \\\"Reporting\\\" or \\\"Deliveries\\\" role authorization required for vehicle data modification\\n- `VehicleDetail` object in request body with vehicle information\\n- Content-Type: application/json\\n- Validation performed on vehicle data before processing\\n\\n**Response Data:**\\n- Response format: `200 OK` (no response body)\\n- No data returned - operation confirmation only\\n- Returns HTTP 400 with validation errors if request data is invalid\\n\\n**Create vs Update Behavior:**\\n- **CREATE**: When VehicleId is null, 0, or omitted, a new vehicle record will be created\\n- **UPDATE**: When VehicleId is provided with a valid vehicle ID, the existing vehicle will be updated\\n- **Identification**: Vehicle existence determined by VehicleId value\\n- **Automatic Detection**: System automatically determines create vs update based on vehicle data\\n\\n**Sparse Update Behavior:**\\n- **Validation Required**: All provided vehicle data must pass validation checks\\n- **Field Updates**: Provided fields will update existing vehicle information\\n- **Data Integrity**: Validation ensures vehicle data meets operational requirements\\n- **Fleet Consistency**: Updates maintain fleet data consistency and compliance standards\\n\\n**Vehicle Data Fields:**\\n- **Identification**: License plate, VIN, vehicle ID\\n- **Specifications**: Make, model, year, color, vehicle type\\n- **Registration**: Registration information and compliance data\\n- **Operational**: Status, availability, and assignment details\\n\\n**Common Use Cases:**\\n- Add new vehicles to delivery fleet for expanded operations\\n- Update existing vehicle information when details change\\n- Maintain vehicle registration and compliance records\\n- Support fleet management and vehicle tracking requirements\\n- Ensure accurate vehicle data for delivery route assignments\\n\\n**Performance & Limits:**\\n- Single vehicle operation for targeted fleet management\\n- Comprehensive validation performed before any changes\\n- Changes reflected immediately in delivery assignment systems\\n- Optimized for fleet management and compliance workflows\\n\\n**Related Endpoints:**\\n- `GET /vehicles` - Retrieve existing vehicle data before updates\\n- `GET /drivers` - Manage driver assignments for vehicles\\n- `POST /deliveries/set-route-detail` - Assign updated vehicles to delivery routes\\n\\n**Important Notes:**\\n- **Validation Critical**: All vehicle data must pass validation before processing\\n- **Fleet Integration**: Vehicle updates affect delivery assignment and logistics systems\\n- **Compliance Essential**: Vehicle data must meet regulatory requirements for delivery operations\\n- **Location Scoped**: Vehicles automatically associated with authenticated location\\n- **Operation Confirmation**: Success indicated by HTTP 200 status (no response body)\",\n        \"operationId\": \"VehiclesPost\",\n        \"requestBody\": {\n          \"description\": \"Vehicle information to create or update - VehicleDetail object with fleet details\",\n          \"content\": {\n            \"application/json-patch+json\": {\n              \"schema\": {\n                \"$ref\": \"#/components/schemas/VehicleDetail\"\n              }\n            },\n            \"application/json\": {\n              \"schema\": {\n                \"$ref\": \"#/components/schemas/VehicleDetail\"\n              }\n            },\n            \"text/json\": {\n              \"schema\": {\n                \"$ref\": \"#/components/schemas/VehicleDetail\"\n              }\n            },\n            \"application/*+json\": {\n              \"schema\": {\n                \"$ref\": \"#/components/schemas/VehicleDetail\"\n              }\n            }\n          },\n          \"x-bodyName\": \"vehicle\"\n        },\n        \"responses\": {\n          \"200\": {\n            \"description\": \"Success\"\n          },\n          \"400\": {\n            \"description\": \"Bad Request - `ValidationResult` object with `isValid` boolean, `errors` array, and `ruleSetsExecuted` array\",\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"$ref\": \"#/components/schemas/ValidationResult\"\n                }\n              }\n            }\n          },\n          \"401\": {\n            \"description\": \"Invalid API Key\"\n          },\n          \"403\": {\n            \"description\": \"Account not authorized\"\n          },\n          \"500\": {\n            \"description\": \"Something went wrong.\"\n          }\n        }\n      }\n    },\n    \"/vendor/vendors\": {\n      \"get\": {\n        \"tags\": [\"Vendor\"],\n        \"summary\": \"Get Vendors\",\n        \"description\": \"**Purpose:** Retrieves a list of vendors with optional filtering by vendor ID or name for procurement and inventory management.\\n\\n**Request Requirements:**\\n- \\\"Vendor\\\" role authorization required for vendor data access\\n- Optional query parameters for filtering results\\n- No request body needed\\n\\n**Response Data:**\\n- Response format: `[{ Vendor }, { Vendor }, ...]`\\n- Array typically contains 5-50 vendors per location\\n- Returns empty array `[]` if no vendors configured or match filtering criteria\\n- Includes contact details, address, and license information\\n- Results are automatically filtered by the authenticated user's location\\n- Vendor ID, name, and contact information included\\n\\n**Filtering Options:**\\n- No parameters: Returns all vendors for the location\\n- vendorId: Returns specific vendor by ID\\n- vendorName: Filters vendors by name with partial matching support\\n- Both parameters: Can be used together for more specific filtering\\n\\n**Common Use Cases:**\\n- Populate vendor dropdown lists in purchase order creation forms\\n- Search for specific vendors by name or ID for quick lookup\\n- Synchronize vendor data with external inventory management systems\\n- Display vendor contact information for procurement and purchasing\\n- Maintain vendor databases for supply chain management\\n\\n**Performance & Limits:**\\n- Rate limiting disabled for this endpoint to support frequent lookups\\n- Lightweight response for fast vendor list population\\n- Efficient filtering for large vendor databases\\n- Results cached for improved performance\\n\\n**Related Endpoints:**\\n- `POST /vendor` - Create or update vendor information\\n\\n**Important Notes:**\\n- Results are automatically filtered to the authenticated user's location\\n- Vendor name filtering supports partial matching for flexible search\\n- Both filtering parameters can be used simultaneously for precise results\\n- No rate limiting applied to support frequent vendor lookups\",\n        \"operationId\": \"VendorVendorsGet\",\n        \"parameters\": [\n          {\n            \"name\": \"vendorId\",\n            \"in\": \"query\",\n            \"description\": \"Optional vendor ID to filter by specific vendor - Returns exact match\",\n            \"schema\": {\n              \"type\": \"integer\",\n              \"format\": \"int32\"\n            }\n          },\n          {\n            \"name\": \"vendorName\",\n            \"in\": \"query\",\n            \"description\": \"Optional vendor name to filter by - Supports partial matching for flexible search\",\n            \"schema\": {\n              \"type\": \"string\"\n            }\n          }\n        ],\n        \"responses\": {\n          \"200\": {\n            \"description\": \"Success - Returns array of vendor objects: `[{ Vendor }, ...]`\",\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"type\": \"array\",\n                  \"items\": {\n                    \"$ref\": \"#/components/schemas/Vendor\"\n                  }\n                }\n              }\n            }\n          },\n          \"401\": {\n            \"description\": \"Unauthorized - Invalid or missing API key\"\n          },\n          \"403\": {\n            \"description\": \"Forbidden - Account not authorized for vendor access\"\n          },\n          \"500\": {\n            \"description\": \"Internal Server Error - Server error occurred\"\n          }\n        }\n      }\n    },\n    \"/vendor\": {\n      \"post\": {\n        \"tags\": [\"Vendor\"],\n        \"summary\": \"Create or Update Vendor\",\n        \"description\": \"**Purpose:** Create a new vendor or update an existing vendor with comprehensive supplier information for procurement and inventory management.\\n\\n**Request Requirements:**\\n- \\\"Vendor\\\" role authorization required for vendor data modification\\n- `Vendor` object in request body with vendor details\\n- Content-Type: application/json\\n- All vendor fields are optional (no validation performed)\\n\\n**Response Data:**\\n- Response format: `{ Vendor }`\\n- Returns single `Vendor` object (not array) with updated vendor information\\n- Includes assigned VendorId for new vendors or updated ID for existing vendors\\n- Complete vendor information with all fields populated\\n- Contact details, address, and license information included\\n\\n**Create vs Update Behavior:**\\n- **CREATE**: When VendorId is null, 0, or omitted, a new vendor record will be created\\n- **UPDATE**: When VendorId is provided with a valid vendor ID, the existing vendor will be updated\\n- **Identification**: Vendor existence determined by VendorId value\\n- **Automatic Detection**: System automatically determines create vs update based on VendorId\\n\\n**Sparse Update Behavior:**\\n- **No Required Fields**: All fields are optional\\n- **Optional Fields**: Address, contact, and license fields can be omitted to preserve existing values\\n- **Null Handling**: Null values will overwrite existing data (use with caution)\\n- **Field Independence**: Each field can be updated independently\\n\\n**Required Fields:**\\n- **None**: No validation is performed on any fields\\n\\n**Optional Fields:**\\n- **Address, City, State, PostalCode**: Physical address information for shipping and contact\\n- **LicenseNumber**: Vendor's business license number for compliance tracking\\n- **ContactName, ContactEmail, ContactPhone**: Primary contact information for procurement\\n\\n**Common Use Cases:**\\n- Add new suppliers to the vendor database for procurement management\\n- Update existing vendor contact information when details change\\n- Maintain vendor address and license details for compliance\\n- Establish vendor relationships for purchase orders and inventory management\\n- Synchronize vendor data with external procurement systems\\n\\n**Performance & Limits:**\\n- Single vendor operation for targeted supplier management\\n- Immediate validation and response with complete vendor data\\n- Changes reflected immediately in vendor catalogs and purchase order systems\\n- Optimized for vendor relationship management workflows\\n\\n**Related Endpoints:**\\n- `GET /vendor/vendors` - Retrieve existing vendor data before updates\\n- `POST /purchase-orders` - Create purchase orders using vendor relationships\\n- `GET /inventory` - View inventory from specific vendors\\n\\n**Important Notes:**\\n- **VendorId Assignment**: New vendors receive automatically generated VendorId\\n- **No Validation**: No validation is performed before creation/update\\n- **Supplier Relationships**: Vendor data used throughout procurement and inventory systems\\n- **Location Scoped**: Vendors automatically associated with authenticated location\\n- **Contact Management**: Maintain accurate contact information for effective supplier communication\",\n        \"operationId\": \"VendorPost\",\n        \"requestBody\": {\n          \"description\": \"Vendor information to create or update - Vendor object with supplier details\",\n          \"content\": {\n            \"application/json-patch+json\": {\n              \"schema\": {\n                \"$ref\": \"#/components/schemas/Vendor\"\n              }\n            },\n            \"application/json\": {\n              \"schema\": {\n                \"$ref\": \"#/components/schemas/Vendor\"\n              }\n            },\n            \"text/json\": {\n              \"schema\": {\n                \"$ref\": \"#/components/schemas/Vendor\"\n              }\n            },\n            \"application/*+json\": {\n              \"schema\": {\n                \"$ref\": \"#/components/schemas/Vendor\"\n              }\n            }\n          },\n          \"x-bodyName\": \"vendor\"\n        },\n        \"responses\": {\n          \"200\": {\n            \"description\": \"Success - Returns vendor object: `{ Vendor }`\",\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"$ref\": \"#/components/schemas/Vendor\"\n                }\n              }\n            }\n          },\n          \"401\": {\n            \"description\": \"Unauthorized - Invalid or missing API key\"\n          },\n          \"403\": {\n            \"description\": \"Forbidden - Account not authorized for vendor management\"\n          },\n          \"500\": {\n            \"description\": \"Internal Server Error - Server error occurred during vendor operation\"\n          }\n        }\n      }\n    },\n    \"/waste\": {\n      \"get\": {\n        \"tags\": [\"Waste\"],\n        \"summary\": \"Get Waste Records\",\n        \"description\": \"**Purpose:** Retrieve comprehensive waste disposal records for cultivation and compliance tracking to support regulatory reporting and facility management.\\n\\n**Request Requirements:**\\n- \\\"CultivationWrite\\\" role authorization required for waste data access\\n- No query parameters or request body needed\\n- Waste tracking permissions essential for compliance operations\\n\\n**Response Data:**\\n- Returns single `WasteSummary` object (not array) with comprehensive waste information\\n- Response format: `{ WasteSummary }`\\n- Includes categorized waste records by type and source\\n- Contains room waste, harvest waste, and plant waste details\\n- Waste disposal tracking and compliance documentation\\n- Results automatically filtered to authenticated location\\n\\n**Waste Categories Included:**\\n- **Room Waste**: General cultivation room waste disposal records\\n- **Harvest Waste**: Plant material disposal from harvest operations\\n- **Plant Waste**: Individual plant disposal and destruction records\\n\\n**Common Use Cases:**\\n- Generate regulatory compliance reports for waste disposal\\n- Track cultivation facility waste management and disposal\\n- Support compliance audits and regulatory inspections\\n- Monitor waste disposal efficiency and facility operations\\n- Maintain cultivation facility waste tracking for legal requirements\\n\\n**Performance & Limits:**\\n- Comprehensive waste data retrieval for facility management\\n- Location-specific waste records for compliance tracking\\n- Optimized for regulatory reporting and compliance workflows\\n- Results include all waste categories and disposal records\\n\\n**Related Endpoints:**\\n- `GET /harvest` - View harvest operations that generate waste\\n- `GET /plant` - Track plants before waste disposal\\n- `POST /plant/harvest` - Harvest operations that create waste records\\n\\n**Important Notes:**\\n- **Compliance Critical**: Essential for regulatory compliance and waste tracking\\n- **Cultivation Focus**: Specific to cultivation facility waste management\\n- **Location Scoped**: Waste records filtered to authenticated location\\n- **Regulatory Ready**: Data formatted for compliance reporting requirements\\n- **Disposal Tracking**: Comprehensive waste disposal and destruction records\",\n        \"operationId\": \"WasteGet\",\n        \"responses\": {\n          \"200\": {\n            \"description\": \"Success\",\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"$ref\": \"#/components/schemas/WasteSummary\"\n                }\n              }\n            }\n          },\n          \"401\": {\n            \"description\": \"Invalid API Key\"\n          },\n          \"403\": {\n            \"description\": \"Account not authorized\"\n          },\n          \"500\": {\n            \"description\": \"Something went wrong.\"\n          }\n        }\n      }\n    },\n    \"/waste/HarvestWaste\": {\n      \"post\": {\n        \"tags\": [\"Waste\"],\n        \"operationId\": \"WasteHarvestWastePost\",\n        \"requestBody\": {\n          \"content\": {\n            \"application/json-patch+json\": {\n              \"schema\": {\n                \"$ref\": \"#/components/schemas/HarvestWasteDetailWaste\"\n              }\n            },\n            \"application/json\": {\n              \"schema\": {\n                \"$ref\": \"#/components/schemas/HarvestWasteDetailWaste\"\n              }\n            },\n            \"text/json\": {\n              \"schema\": {\n                \"$ref\": \"#/components/schemas/HarvestWasteDetailWaste\"\n              }\n            },\n            \"application/*+json\": {\n              \"schema\": {\n                \"$ref\": \"#/components/schemas/HarvestWasteDetailWaste\"\n              }\n            }\n          },\n          \"x-bodyName\": \"req\"\n        },\n        \"responses\": {\n          \"200\": {\n            \"description\": \"OK\",\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"type\": \"object\"\n                }\n              }\n            }\n          },\n          \"400\": {\n            \"description\": \"Bad Request\",\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"type\": \"string\"\n                }\n              }\n            }\n          },\n          \"401\": {\n            \"description\": \"Unauthorized\"\n          },\n          \"403\": {\n            \"description\": \"Forbidden\"\n          },\n          \"500\": {\n            \"description\": \"Internal Server Error\"\n          }\n        }\n      }\n    },\n    \"/waste/PlantWaste\": {\n      \"post\": {\n        \"tags\": [\"Waste\"],\n        \"operationId\": \"WastePlantWastePost\",\n        \"requestBody\": {\n          \"content\": {\n            \"application/json-patch+json\": {\n              \"schema\": {\n                \"$ref\": \"#/components/schemas/PlantWasteDetailWaste\"\n              }\n            },\n            \"application/json\": {\n              \"schema\": {\n                \"$ref\": \"#/components/schemas/PlantWasteDetailWaste\"\n              }\n            },\n            \"text/json\": {\n              \"schema\": {\n                \"$ref\": \"#/components/schemas/PlantWasteDetailWaste\"\n              }\n            },\n            \"application/*+json\": {\n              \"schema\": {\n                \"$ref\": \"#/components/schemas/PlantWasteDetailWaste\"\n              }\n            }\n          },\n          \"x-bodyName\": \"req\"\n        },\n        \"responses\": {\n          \"200\": {\n            \"description\": \"OK\",\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"type\": \"object\"\n                }\n              }\n            }\n          },\n          \"400\": {\n            \"description\": \"Bad Request\",\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"type\": \"string\"\n                }\n              }\n            }\n          },\n          \"401\": {\n            \"description\": \"Unauthorized\"\n          },\n          \"403\": {\n            \"description\": \"Forbidden\"\n          },\n          \"500\": {\n            \"description\": \"Internal Server Error\"\n          }\n        }\n      }\n    },\n    \"/whoami\": {\n      \"get\": {\n        \"tags\": [\"WhoAmI\"],\n        \"summary\": \"Verify API key and get location identity information\",\n        \"description\": \"**Purpose:** Verifies your API key is valid and returns detailed information about the location/store it's associated with.\\n\\n**Request Requirements:**\\n- Any authenticated role authorization (no specific role required)\\n- No query parameters or request body needed\\n\\n**Response Data:**\\n- Response format: `{ LocationIdentity }`\\n- Returns location identity object with complete location and company information\\n- Location details including name, address, license number, and business information\\n- Parent company (LSP) details and global identifiers\\n- Configuration settings like customer profile sharing preferences\\n- Regional data for compliance and routing\\n\\n**Common Use Cases:**\\n- Confirm your API key is working correctly for API key validation\\n- Identify which store/location your API key accesses for location discovery\\n- Determine current location context for multi-location applications\\n- Get location details for application initialization and configuration setup\\n- Troubleshoot authentication and location access issues during debugging\\n\\n**Performance & Limits:**\\n- Lightweight operation with immediate response\\n- No rate limiting typically applied to identity verification\\n- Recommended as first call when setting up API integration\\n- Cached results can be used for session duration\\n\\n**Related Endpoints:**\\n- No direct related endpoints - this is a foundational identity endpoint\\n\\n**Important Notes:**\\n- Call this endpoint first when setting up API integration\\n- Verify authentication and understand your location context before other calls\\n- Response includes both location-specific and company-wide identifiers\\n- Regional information helps with compliance and API routing decisions\\n\\n**Response Fields:**\\n- `LocationId` / `LocationName` for store identification\\n- `LspId` / `LspName` for parent company information\\n- `Address`, `City`, `State`, `PostalCode` for physical location\\n- `LicenseNumber` for business license and compliance\\n- `ShareCustomerProfiles` for customer data sharing configuration\\n- `LocationGlobalId` / `LspGlobalId` for global unique identifiers\",\n        \"operationId\": \"WhoamiGet\",\n        \"responses\": {\n          \"200\": {\n            \"description\": \"Success - Returns location identity object: `{ LocationIdentity }`\",\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"$ref\": \"#/components/schemas/LocationIdentity\"\n                }\n              }\n            }\n          },\n          \"401\": {\n            \"description\": \"Unauthorized - Invalid or missing API key\"\n          },\n          \"403\": {\n            \"description\": \"Forbidden - API key doesn't have access to this location\"\n          },\n          \"404\": {\n            \"description\": \"Not Found - Location not found for the authenticated API key\"\n          },\n          \"500\": {\n            \"description\": \"Internal Server Error - Server error occurred\"\n          }\n        }\n      }\n    }\n  },\n  \"components\": {\n    \"schemas\": {\n      \"Address\": {\n        \"type\": \"object\",\n        \"properties\": {\n          \"addressId\": {\n            \"type\": \"integer\",\n            \"format\": \"int32\",\n            \"nullable\": true\n          },\n          \"customerId\": {\n            \"type\": \"integer\",\n            \"format\": \"int32\"\n          },\n          \"street\": {\n            \"type\": \"string\",\n            \"nullable\": true\n          },\n          \"street2\": {\n            \"type\": \"string\",\n            \"nullable\": true\n          },\n          \"city\": {\n            \"type\": \"string\",\n            \"nullable\": true\n          },\n          \"state\": {\n            \"type\": \"string\",\n            \"nullable\": true\n          },\n          \"postal_code\": {\n            \"type\": \"string\",\n            \"nullable\": true\n          },\n          \"country_Code\": {\n            \"type\": \"string\",\n            \"nullable\": true\n          },\n          \"latitude\": {\n            \"type\": \"number\",\n            \"format\": \"double\",\n            \"nullable\": true\n          },\n          \"longitude\": {\n            \"type\": \"number\",\n            \"format\": \"double\",\n            \"nullable\": true\n          },\n          \"county\": {\n            \"type\": \"string\",\n            \"nullable\": true\n          },\n          \"additionalStateIdentifiers\": {\n            \"type\": \"string\",\n            \"nullable\": true\n          }\n        },\n        \"additionalProperties\": false\n      },\n      \"AllocatedDeliveryItem\": {\n        \"type\": \"object\",\n        \"properties\": {\n          \"transactionId\": {\n            \"type\": \"integer\",\n            \"format\": \"int32\"\n          },\n          \"productName\": {\n            \"type\": \"string\",\n            \"nullable\": true\n          },\n          \"quantity\": {\n            \"type\": \"number\",\n            \"format\": \"double\"\n          },\n          \"totalPrice\": {\n            \"type\": \"number\",\n            \"format\": \"double\"\n          },\n          \"totalDiscount\": {\n            \"type\": \"number\",\n            \"format\": \"double\"\n          },\n          \"totalTax\": {\n            \"type\": \"number\",\n            \"format\": \"double\"\n          }\n        },\n        \"additionalProperties\": false\n      },\n      \"AllocatedPreOrderItem\": {\n        \"type\": \"object\",\n        \"properties\": {\n          \"productName\": {\n            \"type\": \"string\",\n            \"nullable\": true\n          },\n          \"quantity\": {\n            \"type\": \"number\",\n            \"format\": \"double\"\n          },\n          \"totalPrice\": {\n            \"type\": \"number\",\n            \"format\": \"double\"\n          },\n          \"totalDiscount\": {\n            \"type\": \"number\",\n            \"format\": \"double\"\n          },\n          \"totalTax\": {\n            \"type\": \"number\",\n            \"format\": \"double\"\n          }\n        },\n        \"additionalProperties\": false\n      },\n      \"AnonymousTransaction\": {\n        \"type\": \"object\",\n        \"properties\": {\n          \"customerId\": {\n            \"type\": \"integer\",\n            \"description\": \"Unique identifier for the customer record associated with this anonymous transaction.\",\n            \"format\": \"int32\"\n          },\n          \"transactionId\": {\n            \"type\": \"integer\",\n            \"description\": \"Unique identifier for the transaction record.\",\n            \"format\": \"int32\"\n          },\n          \"uniqueId\": {\n            \"type\": \"string\",\n            \"description\": \"String representation of the unique identifier for API responses.\",\n            \"nullable\": true,\n            \"readOnly\": true\n          }\n        },\n        \"additionalProperties\": false,\n        \"description\": \"Anonymous transaction response model containing transaction identifiers for guest checkout operations.\"\n      },\n      \"AppliedDiscount\": {\n        \"type\": \"object\",\n        \"properties\": {\n          \"discountId\": {\n            \"type\": \"integer\",\n            \"description\": \"Unique identifier for the discount program or campaign applied.\",\n            \"format\": \"int32\"\n          },\n          \"discountName\": {\n            \"type\": \"string\",\n            \"description\": \"Display name of the discount for customer receipts and reporting.\",\n            \"nullable\": true\n          },\n          \"discountReason\": {\n            \"type\": \"string\",\n            \"description\": \"Reason or justification for the discount application (e.g., \\\"Loyalty Reward\\\", \\\"Medical Patient\\\").\",\n            \"nullable\": true\n          },\n          \"amount\": {\n            \"type\": \"number\",\n            \"description\": \"Discount amount applied to the transaction item (in USD, positive value represents savings).\",\n            \"format\": \"double\"\n          },\n          \"transactionItemId\": {\n            \"type\": \"integer\",\n            \"description\": \"Reference identifier linking this discount back to the specific transaction line item.\\nNot guaranteed to be unique outside of a single transaction.\",\n            \"format\": \"int32\",\n            \"readOnly\": true\n          }\n        },\n        \"additionalProperties\": false,\n        \"description\": \"Discount information applied to a specific transaction item in cannabis retail operations.\"\n      },\n      \"AssignPlantsToGroupRequest\": {\n        \"type\": \"object\",\n        \"properties\": {\n          \"plantGroupName\": {\n            \"type\": \"string\",\n            \"description\": \"Name of target plant group for batch organization and cultivation tracking\",\n            \"nullable\": true\n          },\n          \"plantSerialNumbers\": {\n            \"type\": \"array\",\n            \"items\": {\n              \"type\": \"string\"\n            },\n            \"description\": \"Collection of plant serial numbers to assign to the specified plant group\",\n            \"nullable\": true\n          }\n        },\n        \"additionalProperties\": false,\n        \"description\": \"Request model for assigning existing cannabis plants to a specific plant group for batch management and cultivation workflow organization.\\n\\n**Plant Group Assignment:**\\n- Assigns existing plants to target plant group using serial numbers\\n- Supports batch organization for cultivation workflow management\\n- Plants identified by serial numbers for precise assignment\\n- Validates target plant group exists before assignment\\n\\n**Serial Number Identification:**\\n- Plants identified by their unique serial numbers rather than IDs\\n- All serial numbers must correspond to existing plants in the facility\\n- Plants must be accessible to the authenticated location\\n- Serial numbers must match exact plant tracking identifiers\\n\\n**Batch Management:**\\n- Plant groups enable batch-based cultivation tracking and compliance\\n- Supports harvest planning and cultivation scheduling optimization\\n- Facilitates cultivation management and operational efficiency\"\n      },\n      \"BadRequestPropertyError\": {\n        \"type\": \"object\",\n        \"properties\": {\n          \"propertyName\": {\n            \"type\": \"string\",\n            \"description\": \"Name of the property that failed validation.\",\n            \"nullable\": true\n          },\n          \"propertyError\": {\n            \"type\": \"string\",\n            \"description\": \"Description of the validation error for the specified property.\",\n            \"nullable\": true\n          }\n        },\n        \"additionalProperties\": false,\n        \"description\": \"Field-specific validation error details for BadRequest responses.\"\n      },\n      \"BadRequestResponse\": {\n        \"type\": \"object\",\n        \"properties\": {\n          \"message\": {\n            \"type\": \"string\",\n            \"description\": \"General error message describing the nature of the bad request.\",\n            \"nullable\": true\n          },\n          \"propertyErrors\": {\n            \"type\": \"array\",\n            \"items\": {\n              \"$ref\": \"#/components/schemas/BadRequestPropertyError\"\n            },\n            \"description\": \"Collection of field-specific validation errors for detailed feedback.\",\n            \"nullable\": true\n          }\n        },\n        \"additionalProperties\": false,\n        \"description\": \"Standardized error response model for HTTP 400 Bad Request responses across the API.\"\n      },\n      \"BatchDetails\": {\n        \"type\": \"object\",\n        \"properties\": {\n          \"batchName\": {\n            \"type\": \"string\",\n            \"description\": \"Display name for the immature plant batch for identification and organization.\",\n            \"nullable\": true\n          },\n          \"plantType\": {\n            \"type\": \"string\",\n            \"description\": \"Plant type designation for the batch (e.g., \\\"Seedling\\\", \\\"Clone\\\", \\\"Cutting\\\").\",\n            \"nullable\": true\n          },\n          \"plantCount\": {\n            \"type\": \"integer\",\n            \"description\": \"Number of plants in the immature batch for inventory tracking and compliance.\",\n            \"format\": \"int32\"\n          },\n          \"strainId\": {\n            \"type\": \"integer\",\n            \"description\": \"Strain identifier for the cannabis strain being cultivated in this batch.\",\n            \"format\": \"int32\"\n          },\n          \"roomId\": {\n            \"type\": \"integer\",\n            \"description\": \"Room identifier for the immature batch location assignment.\",\n            \"format\": \"int32\"\n          },\n          \"tableId\": {\n            \"type\": \"integer\",\n            \"description\": \"Table identifier within the room for precise location tracking (optional).\",\n            \"format\": \"int32\",\n            \"nullable\": true\n          },\n          \"motherPlantId\": {\n            \"type\": \"integer\",\n            \"description\": \"Mother plant identifier for tracking genetic lineage (required for clone batches).\",\n            \"format\": \"int32\",\n            \"nullable\": true\n          },\n          \"dateCreated\": {\n            \"type\": \"string\",\n            \"description\": \"Date when the immature batch was created for cultivation timeline documentation.\",\n            \"format\": \"date-time\",\n            \"nullable\": true\n          }\n        },\n        \"additionalProperties\": false,\n        \"description\": \"Detailed specification for creating individual immature plant batches with cultivation and compliance information.\"\n      },\n      \"BooleanNullableOptional\": {\n        \"type\": \"boolean\",\n        \"additionalProperties\": false\n      },\n      \"BooleanOptional\": {\n        \"type\": \"boolean\",\n        \"additionalProperties\": false\n      },\n      \"Brand\": {\n        \"type\": \"object\",\n        \"properties\": {\n          \"brandId\": {\n            \"type\": \"integer\",\n            \"format\": \"int32\"\n          },\n          \"brandName\": {\n            \"type\": \"string\",\n            \"nullable\": true\n          },\n          \"brandCatalogBrandId\": {\n            \"type\": \"string\",\n            \"nullable\": true\n          }\n        },\n        \"additionalProperties\": false\n      },\n      \"BrandEditRequest\": {\n        \"type\": \"object\",\n        \"properties\": {\n          \"brandId\": {\n            \"type\": \"integer\",\n            \"format\": \"int32\",\n            \"nullable\": true\n          },\n          \"brandName\": {\n            \"type\": \"string\",\n            \"nullable\": true\n          }\n        },\n        \"additionalProperties\": false\n      },\n      \"BroadcastedResponses\": {\n        \"type\": \"object\",\n        \"properties\": {\n          \"responses\": {\n            \"type\": \"array\",\n            \"items\": {\n              \"$ref\": \"#/components/schemas/LocationResponse\"\n            },\n            \"nullable\": true\n          }\n        },\n        \"additionalProperties\": false\n      },\n      \"BulkCreateOrUpdateHarvest\": {\n        \"type\": \"object\",\n        \"properties\": {\n          \"harvests\": {\n            \"type\": \"array\",\n            \"items\": {\n              \"$ref\": \"#/components/schemas/BulkHarvestDetail\"\n            },\n            \"nullable\": true\n          }\n        },\n        \"additionalProperties\": false\n      },\n      \"BulkCreateOrUpdateHarvestResponse\": {\n        \"type\": \"object\",\n        \"properties\": {\n          \"createdHarvestIds\": {\n            \"type\": \"array\",\n            \"items\": {\n              \"type\": \"integer\",\n              \"format\": \"int32\"\n            },\n            \"nullable\": true\n          },\n          \"updatedHarvestIds\": {\n            \"type\": \"array\",\n            \"items\": {\n              \"type\": \"integer\",\n              \"format\": \"int32\"\n            },\n            \"nullable\": true\n          }\n        },\n        \"additionalProperties\": false\n      },\n      \"BulkHarvestDetail\": {\n        \"type\": \"object\",\n        \"properties\": {\n          \"harvestId\": {\n            \"type\": \"integer\",\n            \"format\": \"int32\",\n            \"nullable\": true\n          },\n          \"harvestName\": {\n            \"type\": \"string\",\n            \"nullable\": true\n          },\n          \"harvestRoomId\": {\n            \"type\": \"integer\",\n            \"format\": \"int32\"\n          },\n          \"harvestDate\": {\n            \"type\": \"string\",\n            \"format\": \"date-time\",\n            \"nullable\": true\n          },\n          \"strainId\": {\n            \"type\": \"integer\",\n            \"format\": \"int32\"\n          }\n        },\n        \"additionalProperties\": false\n      },\n      \"CalculationMethod\": {\n        \"enum\": [1, 2, 3, 4, 5, 6, 15],\n        \"type\": \"integer\",\n        \"format\": \"int32\"\n      },\n      \"CancelPreorderRequest\": {\n        \"type\": \"object\",\n        \"properties\": {\n          \"orderId\": {\n            \"type\": \"integer\",\n            \"description\": \"Unique identifier of the pre-order to be canceled.\",\n            \"format\": \"int32\"\n          },\n          \"cancellationReason\": {\n            \"type\": \"string\",\n            \"description\": \"Required reason for canceling the order (used for business analytics and customer service).\",\n            \"nullable\": true\n          }\n        },\n        \"additionalProperties\": false,\n        \"description\": \"Request model for canceling existing customer pre-orders before fulfillment.\"\n      },\n      \"CannabinoidTerpeneValue\": {\n        \"required\": [\"labResultName\", \"labResultUnitId\", \"value\"],\n        \"type\": \"object\",\n        \"properties\": {\n          \"labResultName\": {\n            \"minLength\": 1,\n            \"type\": \"string\",\n            \"description\": \"Name of the laboratory test result (e.g., \\\"THC\\\", \\\"CBD\\\", \\\"Limonene\\\") - must match predefined compound list.\"\n          },\n          \"value\": {\n            \"type\": \"number\",\n            \"description\": \"Measured value of the compound in the cannabis sample (decimal precision for accurate reporting).\",\n            \"format\": \"double\"\n          },\n          \"labResultUnitId\": {\n            \"type\": \"integer\",\n            \"description\": \"Unit identifier for the measurement (references LabResultUnit enum - mg/g, percentage, etc.).\",\n            \"format\": \"int32\"\n          }\n        },\n        \"additionalProperties\": false,\n        \"description\": \"Laboratory test result value model for cannabinoid and terpene measurements in cannabis products.\"\n      },\n      \"CartItemPrice\": {\n        \"type\": \"object\",\n        \"properties\": {\n          \"productName\": {\n            \"type\": \"string\",\n            \"nullable\": true\n          },\n          \"productId\": {\n            \"type\": \"integer\",\n            \"format\": \"int32\"\n          },\n          \"quantity\": {\n            \"type\": \"number\",\n            \"format\": \"double\"\n          },\n          \"subtotal\": {\n            \"type\": \"number\",\n            \"format\": \"double\"\n          },\n          \"pricingTierAdjustment\": {\n            \"type\": \"number\",\n            \"format\": \"double\",\n            \"nullable\": true\n          },\n          \"discounts\": {\n            \"type\": \"array\",\n            \"items\": {\n              \"$ref\": \"#/components/schemas/Discount\"\n            },\n            \"nullable\": true\n          },\n          \"tax\": {\n            \"type\": \"number\",\n            \"format\": \"double\"\n          }\n        },\n        \"additionalProperties\": false\n      },\n      \"CartPrice\": {\n        \"type\": \"object\",\n        \"properties\": {\n          \"cartItemPrices\": {\n            \"type\": \"array\",\n            \"items\": {\n              \"$ref\": \"#/components/schemas/CartItemPrice\"\n            },\n            \"nullable\": true\n          },\n          \"subTotal\": {\n            \"type\": \"number\",\n            \"format\": \"double\"\n          },\n          \"taxes\": {\n            \"type\": \"number\",\n            \"format\": \"double\"\n          },\n          \"discount\": {\n            \"type\": \"number\",\n            \"format\": \"double\"\n          },\n          \"total\": {\n            \"type\": \"number\",\n            \"format\": \"double\"\n          },\n          \"originalTotal\": {\n            \"type\": \"number\",\n            \"format\": \"double\"\n          },\n          \"roundedDifference\": {\n            \"type\": \"number\",\n            \"format\": \"double\"\n          }\n        },\n        \"additionalProperties\": false\n      },\n      \"ChangeGrowthPhaseRequest\": {\n        \"type\": \"object\",\n        \"properties\": {\n          \"plantIds\": {\n            \"type\": \"array\",\n            \"items\": {\n              \"type\": \"integer\",\n              \"format\": \"int32\"\n            },\n            \"description\": \"Collection of LeafLogix plant IDs to update to the new growth phase\",\n            \"nullable\": true\n          },\n          \"growthPhase\": {\n            \"type\": \"string\",\n            \"description\": \"Target cultivation growth phase. Must be one of: `Propagation`, `Vegetative`, `Flowering`\",\n            \"nullable\": true\n          },\n          \"phaseStartDate\": {\n            \"type\": \"string\",\n            \"description\": \"Date when new growth phase begins (optional, defaults to current UTC time if not specified)\",\n            \"format\": \"date-time\",\n            \"nullable\": true\n          }\n        },\n        \"additionalProperties\": false,\n        \"description\": \"Request model for updating the cultivation growth phase of cannabis plants to track development stages.\\n\\n**Growth Phase Management:**\\n- Updates plant cultivation phase for proper development tracking\\n- Supports bulk processing of multiple plants in single operation\\n- Validates growth phase against allowed phase values\\n- Automatically sets phase start date if not provided\\n\\n**Valid Growth Phases:**\\n- `Propagation`: Initial plant development and cloning phase\\n- `Vegetative`: Active vegetative growth before flowering initiation\\n- `Flowering`: Reproductive growth phase leading to harvest\\n\\n**Phase Transition Rules:**\\n- Phase start date defaults to current UTC time if not specified\\n- Phase changes are logged for cultivation timeline tracking\\n- Integration with external cultivation systems for environmental control\"\n      },\n      \"ClosingReportCategorySummary\": {\n        \"type\": \"object\",\n        \"properties\": {\n          \"category\": {\n            \"type\": \"string\",\n            \"description\": \"Product category name (e.g., \\\"Flower\\\", \\\"Edibles\\\", \\\"Concentrates\\\").\",\n            \"nullable\": true\n          },\n          \"categoryTotal\": {\n            \"type\": \"number\",\n            \"description\": \"Total net sales for the category (calculated property returning CategoryNetTotal).\",\n            \"format\": \"double\",\n            \"readOnly\": true\n          },\n          \"categoryGrossTotal\": {\n            \"type\": \"number\",\n            \"description\": \"Gross sales total for the category before discounts (in USD).\",\n            \"format\": \"double\"\n          },\n          \"categoryDiscountTotal\": {\n            \"type\": \"number\",\n            \"description\": \"Total discount amount applied to products in this category (in USD).\",\n            \"format\": \"double\"\n          },\n          \"categoryNetTotal\": {\n            \"type\": \"number\",\n            \"description\": \"Net sales total for the category after discounts (in USD).\",\n            \"format\": \"double\"\n          },\n          \"categoryCost\": {\n            \"type\": \"number\",\n            \"description\": \"Total cost of goods sold for products in this category (in USD).\",\n            \"format\": \"double\"\n          }\n        },\n        \"additionalProperties\": false,\n        \"description\": \"Product category sales summary for cannabis retail closing reports and financial analysis.\"\n      },\n      \"ClosingReportCustomerTypeSummary\": {\n        \"type\": \"object\",\n        \"properties\": {\n          \"customerType\": {\n            \"type\": \"string\",\n            \"description\": \"Customer type classification (e.g., \\\"Recreational\\\", \\\"Medical\\\", \\\"Industry\\\").\",\n            \"nullable\": true\n          },\n          \"total\": {\n            \"type\": \"number\",\n            \"description\": \"Total net sales for this customer type (calculated property returning NetTotal).\",\n            \"format\": \"double\",\n            \"readOnly\": true\n          },\n          \"grossTotal\": {\n            \"type\": \"number\",\n            \"description\": \"Gross sales total for this customer type before discounts (in USD).\",\n            \"format\": \"double\"\n          },\n          \"netTotal\": {\n            \"type\": \"number\",\n            \"description\": \"Net sales total for this customer type after discounts (in USD).\",\n            \"format\": \"double\"\n          },\n          \"discountTotal\": {\n            \"type\": \"number\",\n            \"description\": \"Total discount amount applied to this customer type (in USD).\",\n            \"format\": \"double\"\n          },\n          \"customerTypeCost\": {\n            \"type\": \"number\",\n            \"description\": \"Total cost of goods sold for this customer type (in USD).\",\n            \"format\": \"double\"\n          },\n          \"cannabisSales\": {\n            \"type\": \"number\",\n            \"description\": \"Cannabis product sales total for this customer type (in USD).\",\n            \"format\": \"double\"\n          },\n          \"nonCannabisSales\": {\n            \"type\": \"number\",\n            \"description\": \"Non-cannabis product sales total for this customer type (accessories, etc.) (in USD).\",\n            \"format\": \"double\"\n          }\n        },\n        \"additionalProperties\": false,\n        \"description\": \"Customer type sales summary for cannabis retail closing reports and customer segment analysis.\"\n      },\n      \"ClosingReportOrderSourceSummary\": {\n        \"type\": \"object\",\n        \"properties\": {\n          \"orderSource\": {\n            \"type\": \"string\",\n            \"description\": \"Order origination source (e.g., \\\"Website\\\", \\\"Mobile App\\\", \\\"Weedmaps\\\", \\\"Walk-In\\\").\",\n            \"nullable\": true\n          },\n          \"total\": {\n            \"type\": \"number\",\n            \"description\": \"Total net sales for this order source (calculated property returning NetTotal).\",\n            \"format\": \"double\",\n            \"readOnly\": true\n          },\n          \"grossTotal\": {\n            \"type\": \"number\",\n            \"description\": \"Gross sales total for this order source before discounts (in USD).\",\n            \"format\": \"double\"\n          },\n          \"netTotal\": {\n            \"type\": \"number\",\n            \"description\": \"Net sales total for this order source after discounts (in USD).\",\n            \"format\": \"double\"\n          },\n          \"discountTotal\": {\n            \"type\": \"number\",\n            \"description\": \"Total discount amount applied to this order source (in USD).\",\n            \"format\": \"double\"\n          },\n          \"orderSourceCost\": {\n            \"type\": \"number\",\n            \"format\": \"double\"\n          }\n        },\n        \"additionalProperties\": false,\n        \"description\": \"Order source sales summary for cannabis retail closing reports and marketing channel analysis.\"\n      },\n      \"ClosingReportOrderTypeSummary\": {\n        \"type\": \"object\",\n        \"properties\": {\n          \"orderType\": {\n            \"type\": \"string\",\n            \"description\": \"Order fulfillment type (e.g., \\\"In-Store\\\", \\\"Pickup\\\", \\\"Delivery\\\", \\\"Curbside\\\").\",\n            \"nullable\": true\n          },\n          \"total\": {\n            \"type\": \"number\",\n            \"description\": \"Total net sales for this order type (calculated property returning NetTotal).\",\n            \"format\": \"double\",\n            \"readOnly\": true\n          },\n          \"grossTotal\": {\n            \"type\": \"number\",\n            \"description\": \"Gross sales total for this order type before discounts (in USD).\",\n            \"format\": \"double\"\n          },\n          \"netTotal\": {\n            \"type\": \"number\",\n            \"description\": \"Net sales total for this order type after discounts (in USD).\",\n            \"format\": \"double\"\n          },\n          \"discountTotal\": {\n            \"type\": \"number\",\n            \"description\": \"Total discount amount applied to this order type (in USD).\",\n            \"format\": \"double\"\n          },\n          \"orderTypeCost\": {\n            \"type\": \"number\",\n            \"description\": \"Total cost of goods sold for this order type (in USD).\",\n            \"format\": \"double\"\n          }\n        },\n        \"additionalProperties\": false,\n        \"description\": \"Order type sales summary for cannabis retail closing reports and fulfillment channel analysis.\"\n      },\n      \"ClosingReportPayByBankBatchFileSums\": {\n        \"type\": \"object\",\n        \"properties\": {\n          \"batchFileName\": {\n            \"type\": \"string\",\n            \"description\": \"Batch file name for payment processor identification and tracking.\",\n            \"nullable\": true\n          },\n          \"payByBankBatchFileAdjustmentAmount\": {\n            \"type\": \"number\",\n            \"description\": \"Adjustment amount for the batch file for financial reconciliation.\",\n            \"format\": \"double\"\n          }\n        },\n        \"additionalProperties\": false,\n        \"description\": \"Pay-by-Bank batch file summary for cannabis payment processing reconciliation.\"\n      },\n      \"ClosingReportPaymentSummary\": {\n        \"type\": \"object\",\n        \"properties\": {\n          \"paymentType\": {\n            \"type\": \"string\",\n            \"description\": \"Payment method type (e.g., \\\"Cash\\\", \\\"Credit Card\\\", \\\"CanPay\\\", \\\"Hypur\\\").\",\n            \"nullable\": true\n          },\n          \"totalPaid\": {\n            \"type\": \"number\",\n            \"description\": \"Total amount paid using this payment method (in USD).\",\n            \"format\": \"double\"\n          }\n        },\n        \"additionalProperties\": false,\n        \"description\": \"Payment method summary for cannabis retail closing reports and financial reconciliation.\"\n      },\n      \"ClosingReportTaxRateSummary\": {\n        \"type\": \"object\",\n        \"properties\": {\n          \"taxRate\": {\n            \"type\": \"string\",\n            \"description\": \"Tax rate name or type (e.g., \\\"State Excise Tax\\\", \\\"City Cannabis Tax\\\", \\\"Sales Tax\\\").\",\n            \"nullable\": true\n          },\n          \"totalTax\": {\n            \"type\": \"number\",\n            \"description\": \"Total tax amount collected for this tax rate (in USD).\",\n            \"format\": \"double\"\n          }\n        },\n        \"additionalProperties\": false,\n        \"description\": \"Tax rate summary for cannabis retail closing reports and tax liability tracking.\"\n      },\n      \"ClosingReportV2\": {\n        \"type\": \"object\",\n        \"properties\": {\n          \"totalTips\": {\n            \"type\": \"number\",\n            \"description\": \"Total tips aggregated for the closing period for staff distribution.\",\n            \"format\": \"double\",\n            \"nullable\": true,\n            \"readOnly\": true\n          },\n          \"payByBankTips\": {\n            \"type\": \"number\",\n            \"description\": \"Tips processed through Pay-by-Bank system for electronic tip distribution.\",\n            \"format\": \"double\"\n          },\n          \"payByBankTransactionFees\": {\n            \"type\": \"number\",\n            \"description\": \"Transaction fees charged by Pay-by-Bank system for cost accounting.\",\n            \"format\": \"double\"\n          },\n          \"payByBankBatchFile\": {\n            \"type\": \"array\",\n            \"items\": {\n              \"$ref\": \"#/components/schemas/ClosingReportPayByBankBatchFileSums\"\n            },\n            \"description\": \"Batch file summaries for Pay-by-Bank transaction reconciliation.\",\n            \"nullable\": true\n          },\n          \"feesDonations\": {\n            \"type\": \"array\",\n            \"items\": {\n              \"$ref\": \"#/components/schemas/FeeDonation\"\n            },\n            \"description\": \"Fees and donations collected during the closing period for compliance reporting.\",\n            \"nullable\": true\n          },\n          \"dutchiePayTips\": {\n            \"type\": \"number\",\n            \"description\": \"DutchiePay tips processed for cannabis payment integration.\",\n            \"format\": \"double\",\n            \"nullable\": true,\n            \"readOnly\": true\n          },\n          \"dutchiePayTotalAdjustmentAmount\": {\n            \"type\": \"number\",\n            \"description\": \"DutchiePay transaction adjustments for cannabis payment processing.\",\n            \"format\": \"double\",\n            \"nullable\": true,\n            \"readOnly\": true\n          },\n          \"dutchiePayBatchFileSums\": {\n            \"type\": \"array\",\n            \"items\": {\n              \"$ref\": \"#/components/schemas/ClosingReportPayByBankBatchFileSums\"\n            },\n            \"description\": \"DutchiePay batch file summaries for cannabis payment reconciliation.\",\n            \"nullable\": true,\n            \"readOnly\": true\n          },\n          \"grossSales\": {\n            \"type\": \"number\",\n            \"format\": \"double\",\n            \"nullable\": true\n          },\n          \"discount\": {\n            \"type\": \"number\",\n            \"format\": \"double\",\n            \"nullable\": true\n          },\n          \"loyalty\": {\n            \"type\": \"number\",\n            \"format\": \"double\",\n            \"nullable\": true\n          },\n          \"totalTax\": {\n            \"type\": \"number\",\n            \"format\": \"double\",\n            \"nullable\": true\n          },\n          \"cost\": {\n            \"type\": \"number\",\n            \"format\": \"double\",\n            \"nullable\": true\n          },\n          \"coupons\": {\n            \"type\": \"number\",\n            \"format\": \"double\",\n            \"nullable\": true\n          },\n          \"itemTotal\": {\n            \"type\": \"number\",\n            \"format\": \"double\",\n            \"nullable\": true\n          },\n          \"transactionCount\": {\n            \"type\": \"integer\",\n            \"format\": \"int32\"\n          },\n          \"itemCount\": {\n            \"type\": \"integer\",\n            \"format\": \"int32\"\n          },\n          \"customerCount\": {\n            \"type\": \"integer\",\n            \"format\": \"int32\"\n          },\n          \"newCustomerCount\": {\n            \"type\": \"integer\",\n            \"format\": \"int32\"\n          },\n          \"voidCount\": {\n            \"type\": \"integer\",\n            \"format\": \"int32\"\n          },\n          \"voidTotal\": {\n            \"type\": \"number\",\n            \"format\": \"double\",\n            \"nullable\": true\n          },\n          \"returnTotal\": {\n            \"type\": \"number\",\n            \"format\": \"double\",\n            \"nullable\": true\n          },\n          \"startingBalance\": {\n            \"type\": \"number\",\n            \"format\": \"double\",\n            \"nullable\": true\n          },\n          \"endingBalance\": {\n            \"type\": \"number\",\n            \"format\": \"double\",\n            \"nullable\": true\n          },\n          \"deposits\": {\n            \"type\": \"number\",\n            \"format\": \"double\",\n            \"nullable\": true\n          },\n          \"adjustments\": {\n            \"type\": \"number\",\n            \"format\": \"double\",\n            \"nullable\": true\n          },\n          \"totalPayments\": {\n            \"type\": \"number\",\n            \"format\": \"double\",\n            \"nullable\": true\n          },\n          \"invoiceTotal\": {\n            \"type\": \"number\",\n            \"format\": \"double\",\n            \"nullable\": true\n          },\n          \"cannabisSales\": {\n            \"type\": \"number\",\n            \"format\": \"double\",\n            \"nullable\": true\n          },\n          \"nonCannabisSales\": {\n            \"type\": \"number\",\n            \"format\": \"double\",\n            \"nullable\": true\n          },\n          \"netSales\": {\n            \"type\": \"number\",\n            \"format\": \"double\",\n            \"nullable\": true\n          },\n          \"revenueFeesDonations\": {\n            \"type\": \"number\",\n            \"format\": \"double\",\n            \"nullable\": true\n          },\n          \"nonRevenueFeesDonations\": {\n            \"type\": \"number\",\n            \"format\": \"double\",\n            \"nullable\": true\n          },\n          \"rounding\": {\n            \"type\": \"number\",\n            \"format\": \"double\",\n            \"nullable\": true\n          },\n          \"totalIncome\": {\n            \"type\": \"number\",\n            \"format\": \"double\",\n            \"nullable\": true\n          },\n          \"averageCartNetSales\": {\n            \"type\": \"number\",\n            \"format\": \"double\",\n            \"nullable\": true\n          },\n          \"overShort\": {\n            \"type\": \"number\",\n            \"format\": \"double\",\n            \"nullable\": true,\n            \"readOnly\": true\n          },\n          \"categorySummary\": {\n            \"type\": \"array\",\n            \"items\": {\n              \"$ref\": \"#/components/schemas/ClosingReportCategorySummary\"\n            },\n            \"nullable\": true\n          },\n          \"paymentSummary\": {\n            \"type\": \"array\",\n            \"items\": {\n              \"$ref\": \"#/components/schemas/ClosingReportPaymentSummary\"\n            },\n            \"nullable\": true\n          },\n          \"taxSummary\": {\n            \"type\": \"array\",\n            \"items\": {\n              \"$ref\": \"#/components/schemas/ClosingReportTaxRateSummary\"\n            },\n            \"nullable\": true\n          },\n          \"customerTypeSummary\": {\n            \"type\": \"array\",\n            \"items\": {\n              \"$ref\": \"#/components/schemas/ClosingReportCustomerTypeSummary\"\n            },\n            \"nullable\": true\n          },\n          \"orderTypeSummary\": {\n            \"type\": \"array\",\n            \"items\": {\n              \"$ref\": \"#/components/schemas/ClosingReportOrderTypeSummary\"\n            },\n            \"nullable\": true\n          },\n          \"orderSourceSummary\": {\n            \"type\": \"array\",\n            \"items\": {\n              \"$ref\": \"#/components/schemas/ClosingReportOrderSourceSummary\"\n            },\n            \"nullable\": true\n          }\n        },\n        \"additionalProperties\": false,\n        \"description\": \"Enhanced closing report model for cannabis dispensary daily financial operations with payment processing integration.\"\n      },\n      \"ConvertBatchDetails\": {\n        \"type\": \"object\",\n        \"properties\": {\n          \"batchId\": {\n            \"type\": \"integer\",\n            \"description\": \"Batch identifier for the plant batch being converted to mature growth phase.\",\n            \"format\": \"int32\"\n          },\n          \"serialNumbers\": {\n            \"type\": \"array\",\n            \"items\": {\n              \"type\": \"string\"\n            },\n            \"description\": \"Collection of individual plant serial numbers within the batch for state tracking compliance.\",\n            \"nullable\": true\n          },\n          \"batchStage\": {\n            \"type\": \"string\",\n            \"description\": \"Target growth stage for the batch conversion (e.g., \\\"Vegetative\\\", \\\"Flowering\\\").\",\n            \"nullable\": true\n          },\n          \"roomId\": {\n            \"type\": \"integer\",\n            \"description\": \"Destination room identifier for the converted batch location tracking.\",\n            \"format\": \"int32\"\n          },\n          \"tableId\": {\n            \"type\": \"integer\",\n            \"description\": \"Destination table identifier within the room for precise location tracking (optional).\",\n            \"format\": \"int32\",\n            \"nullable\": true\n          },\n          \"dateCreated\": {\n            \"type\": \"string\",\n            \"description\": \"Date when the batch conversion was performed for cultivation timeline documentation.\",\n            \"format\": \"date-time\",\n            \"nullable\": true\n          }\n        },\n        \"additionalProperties\": false,\n        \"description\": \"Detailed specification for converting individual plant batches during cultivation growth phase transitions.\"\n      },\n      \"ConvertImmatureBatchRequest\": {\n        \"type\": \"object\",\n        \"properties\": {\n          \"batches\": {\n            \"type\": \"array\",\n            \"items\": {\n              \"$ref\": \"#/components/schemas/ConvertBatchDetails\"\n            },\n            \"description\": \"Collection of plant batches to be converted from immature to mature growth phases.\",\n            \"nullable\": true\n          }\n        },\n        \"additionalProperties\": false,\n        \"description\": \"Request model for converting immature plant batches to mature growth phases in cannabis cultivation operations.\"\n      },\n      \"ConvertImmaturePlantResponse\": {\n        \"type\": \"object\",\n        \"properties\": {\n          \"convertedPlants\": {\n            \"type\": \"array\",\n            \"items\": {\n              \"$ref\": \"#/components/schemas/CreatedMaturePlant\"\n            },\n            \"description\": \"Collection of mature plants created from immature batch conversion.\",\n            \"nullable\": true\n          }\n        },\n        \"additionalProperties\": false,\n        \"description\": \"Response model for immature plant batch conversion operations containing converted mature plant identifiers.\"\n      },\n      \"ConvertImmaturePlantResponseApiResult\": {\n        \"type\": \"object\",\n        \"properties\": {\n          \"result\": {\n            \"type\": \"boolean\"\n          },\n          \"message\": {\n            \"type\": \"string\",\n            \"nullable\": true\n          },\n          \"data\": {\n            \"$ref\": \"#/components/schemas/ConvertImmaturePlantResponse\"\n          }\n        },\n        \"additionalProperties\": false\n      },\n      \"CreateAnonymousTransactionRequest\": {\n        \"type\": \"object\",\n        \"properties\": {\n          \"transactionReference\": {\n            \"type\": \"string\",\n            \"description\": \"Optional reference identifier for the transaction (for external system integration).\",\n            \"nullable\": true\n          }\n        },\n        \"additionalProperties\": false,\n        \"description\": \"Request model for creating anonymous transactions for guest customer operations.\"\n      },\n      \"CreateImmaturePlantBatchResponse\": {\n        \"type\": \"object\",\n        \"properties\": {\n          \"batches\": {\n            \"type\": \"array\",\n            \"items\": {\n              \"$ref\": \"#/components/schemas/CreatedImmaturePlantBatch\"\n            },\n            \"description\": \"Collection of created immature plant batches with associated plant identifiers.\",\n            \"nullable\": true\n          }\n        },\n        \"additionalProperties\": false,\n        \"description\": \"Response model for immature plant batch creation operations containing created batch and plant identifiers.\"\n      },\n      \"CreateImmaturePlantBatchResponseApiResult\": {\n        \"type\": \"object\",\n        \"properties\": {\n          \"result\": {\n            \"type\": \"boolean\"\n          },\n          \"message\": {\n            \"type\": \"string\",\n            \"nullable\": true\n          },\n          \"data\": {\n            \"$ref\": \"#/components/schemas/CreateImmaturePlantBatchResponse\"\n          }\n        },\n        \"additionalProperties\": false\n      },\n      \"CreateJournalEntryRequest\": {\n        \"required\": [\"body\", \"customerId\", \"date\", \"subject\"],\n        \"type\": \"object\",\n        \"properties\": {\n          \"customerId\": {\n            \"type\": \"integer\",\n            \"description\": \"The customer ID to create the journal entry for.\",\n            \"format\": \"int32\"\n          },\n          \"subject\": {\n            \"minLength\": 1,\n            \"type\": \"string\",\n            \"description\": \"Brief title or summary of the journal entry.\"\n          },\n          \"body\": {\n            \"minLength\": 1,\n            \"type\": \"string\",\n            \"description\": \"Detailed content and notes for the journal entry.\"\n          },\n          \"date\": {\n            \"type\": \"string\",\n            \"description\": \"Date and time when the journal entry should be dated.\",\n            \"format\": \"date-time\"\n          }\n        },\n        \"additionalProperties\": false,\n        \"description\": \"Request model for creating new customer journal entries with interaction details and notes.\"\n      },\n      \"CreateMatureBatchRequest\": {\n        \"type\": \"object\",\n        \"properties\": {\n          \"batches\": {\n            \"type\": \"array\",\n            \"items\": {\n              \"$ref\": \"#/components/schemas/MatureBatchDetails\"\n            },\n            \"description\": \"Collection of mature plant batch specifications for bulk batch creation operations.\",\n            \"nullable\": true\n          }\n        },\n        \"additionalProperties\": false,\n        \"description\": \"Request model for creating mature plant batches in cannabis cultivation operations.\"\n      },\n      \"CreateMaturePlantsResponse\": {\n        \"type\": \"object\",\n        \"properties\": {\n          \"createdPlants\": {\n            \"type\": \"array\",\n            \"items\": {\n              \"$ref\": \"#/components/schemas/CreatedMaturePlant\"\n            },\n            \"description\": \"Collection of mature plants created ready for flowering phase cultivation.\",\n            \"nullable\": true\n          }\n        },\n        \"additionalProperties\": false,\n        \"description\": \"Response model for mature plant batch creation operations containing created mature plant identifiers.\"\n      },\n      \"CreateMaturePlantsResponseApiResult\": {\n        \"type\": \"object\",\n        \"properties\": {\n          \"result\": {\n            \"type\": \"boolean\"\n          },\n          \"message\": {\n            \"type\": \"string\",\n            \"nullable\": true\n          },\n          \"data\": {\n            \"$ref\": \"#/components/schemas/CreateMaturePlantsResponse\"\n          }\n        },\n        \"additionalProperties\": false\n      },\n      \"CreateOrUpdateHarvest\": {\n        \"type\": \"object\",\n        \"properties\": {\n          \"harvestId\": {\n            \"type\": \"integer\",\n            \"format\": \"int32\",\n            \"nullable\": true\n          },\n          \"harvestName\": {\n            \"type\": \"string\",\n            \"nullable\": true\n          },\n          \"strainName\": {\n            \"type\": \"string\",\n            \"nullable\": true\n          },\n          \"harvestRoomId\": {\n            \"type\": \"integer\",\n            \"format\": \"int32\"\n          },\n          \"harvestDate\": {\n            \"type\": \"string\",\n            \"format\": \"date-time\"\n          }\n        },\n        \"additionalProperties\": false\n      },\n      \"CreatePlantRequest\": {\n        \"type\": \"object\",\n        \"properties\": {\n          \"serialNumber\": {\n            \"type\": \"string\",\n            \"nullable\": true\n          },\n          \"plantGroupName\": {\n            \"type\": \"string\",\n            \"nullable\": true\n          },\n          \"growthPhase\": {\n            \"type\": \"string\",\n            \"nullable\": true\n          },\n          \"phaseStartDate\": {\n            \"type\": \"string\",\n            \"format\": \"date-time\",\n            \"nullable\": true\n          },\n          \"dateCreated\": {\n            \"type\": \"string\",\n            \"format\": \"date-time\",\n            \"nullable\": true\n          },\n          \"bornDate\": {\n            \"type\": \"string\",\n            \"format\": \"date-time\",\n            \"nullable\": true\n          },\n          \"strain\": {\n            \"type\": \"string\",\n            \"nullable\": true\n          },\n          \"room\": {\n            \"type\": \"string\",\n            \"nullable\": true\n          },\n          \"table\": {\n            \"type\": \"string\",\n            \"nullable\": true\n          },\n          \"isMother\": {\n            \"type\": \"boolean\"\n          },\n          \"bypassStateIntegration\": {\n            \"type\": \"boolean\"\n          }\n        },\n        \"additionalProperties\": false\n      },\n      \"CreatePreOrderRequest\": {\n        \"required\": [\"customerId\"],\n        \"type\": \"object\",\n        \"properties\": {\n          \"customerId\": {\n            \"type\": \"integer\",\n            \"format\": \"int32\"\n          },\n          \"items\": {\n            \"type\": \"array\",\n            \"items\": {\n              \"$ref\": \"#/components/schemas/PreOrderItem\"\n            },\n            \"nullable\": true\n          },\n          \"redemptions\": {\n            \"type\": \"array\",\n            \"items\": {\n              \"$ref\": \"#/components/schemas/PreOrderRedemption\"\n            },\n            \"nullable\": true\n          },\n          \"isDelivery\": {\n            \"type\": \"boolean\"\n          },\n          \"orderSource\": {\n            \"type\": \"string\",\n            \"nullable\": true,\n            \"deprecated\": true\n          },\n          \"orderType\": {\n            \"type\": \"string\",\n            \"nullable\": true\n          },\n          \"deliveryStreet\": {\n            \"type\": \"string\",\n            \"nullable\": true\n          },\n          \"deliveryStreet2\": {\n            \"type\": \"string\",\n            \"nullable\": true\n          },\n          \"deliveryCity\": {\n            \"type\": \"string\",\n            \"nullable\": true\n          },\n          \"deliveryState\": {\n            \"type\": \"string\",\n            \"nullable\": true\n          },\n          \"deliveryPostalCode\": {\n            \"type\": \"string\",\n            \"nullable\": true\n          },\n          \"idempotencyKey\": {\n            \"type\": \"string\",\n            \"nullable\": true\n          },\n          \"notes\": {\n            \"type\": \"string\",\n            \"nullable\": true\n          },\n          \"status\": {\n            \"type\": \"string\",\n            \"nullable\": true\n          },\n          \"transactionReference\": {\n            \"type\": \"string\",\n            \"nullable\": true\n          },\n          \"timeWindowStartDateUtc\": {\n            \"type\": \"string\",\n            \"format\": \"date-time\",\n            \"nullable\": true\n          },\n          \"timeWindowEndDateUtc\": {\n            \"type\": \"string\",\n            \"format\": \"date-time\",\n            \"nullable\": true\n          },\n          \"deliveryScheduleId\": {\n            \"$ref\": \"#/components/schemas/DeliveryScheduleType\"\n          }\n        },\n        \"additionalProperties\": false\n      },\n      \"CreateUpdatePurchaseOrderItemRequest\": {\n        \"type\": \"object\",\n        \"properties\": {\n          \"productId\": {\n            \"type\": \"integer\",\n            \"format\": \"int32\"\n          },\n          \"unitId\": {\n            \"$ref\": \"#/components/schemas/Int32NullableOptional\"\n          },\n          \"quantity\": {\n            \"$ref\": \"#/components/schemas/Int32NullableOptional\"\n          },\n          \"subtotal\": {\n            \"$ref\": \"#/components/schemas/DecimalNullableOptional\"\n          },\n          \"tax\": {\n            \"$ref\": \"#/components/schemas/DecimalNullableOptional\"\n          }\n        },\n        \"additionalProperties\": false\n      },\n      \"CreateUpdatePurchaseOrderRequest\": {\n        \"type\": \"object\",\n        \"properties\": {\n          \"purchaseOrderId\": {\n            \"type\": \"integer\",\n            \"format\": \"int32\",\n            \"nullable\": true\n          },\n          \"expectedArrivalDate\": {\n            \"$ref\": \"#/components/schemas/DateTimeNullableOptional\"\n          },\n          \"title\": {\n            \"$ref\": \"#/components/schemas/StringOptional\"\n          },\n          \"dateReceived\": {\n            \"$ref\": \"#/components/schemas/DateTimeNullableOptional\"\n          },\n          \"shippingInformation\": {\n            \"$ref\": \"#/components/schemas/StringOptional\"\n          },\n          \"vendorContact\": {\n            \"$ref\": \"#/components/schemas/StringOptional\"\n          },\n          \"status\": {\n            \"$ref\": \"#/components/schemas/StringOptional\"\n          },\n          \"vendorId\": {\n            \"$ref\": \"#/components/schemas/Int32NullableOptional\"\n          },\n          \"purchaseOrderNumber\": {\n            \"$ref\": \"#/components/schemas/Int32NullableOptional\"\n          },\n          \"purchaseOrderItems\": {\n            \"type\": \"array\",\n            \"items\": {\n              \"$ref\": \"#/components/schemas/CreateUpdatePurchaseOrderItemRequest\"\n            },\n            \"nullable\": true\n          }\n        },\n        \"additionalProperties\": false\n      },\n      \"CreateUpdatePurchaseOrderResponse\": {\n        \"type\": \"object\",\n        \"properties\": {\n          \"createdPurchaseOrderIds\": {\n            \"type\": \"array\",\n            \"items\": {\n              \"type\": \"integer\",\n              \"format\": \"int32\"\n            },\n            \"nullable\": true\n          },\n          \"updatedPurchaseOrderIds\": {\n            \"type\": \"array\",\n            \"items\": {\n              \"type\": \"integer\",\n              \"format\": \"int32\"\n            },\n            \"nullable\": true\n          }\n        },\n        \"additionalProperties\": false\n      },\n      \"CreateUpdatePurchaseOrdersRequest\": {\n        \"type\": \"object\",\n        \"properties\": {\n          \"purchaseOrders\": {\n            \"type\": \"array\",\n            \"items\": {\n              \"$ref\": \"#/components/schemas/CreateUpdatePurchaseOrderRequest\"\n            },\n            \"nullable\": true\n          }\n        },\n        \"additionalProperties\": false\n      },\n      \"CreatedImmaturePlantBatch\": {\n        \"type\": \"object\",\n        \"properties\": {\n          \"batchId\": {\n            \"type\": \"integer\",\n            \"description\": \"Unique identifier assigned to the created immature plant batch.\",\n            \"format\": \"int32\"\n          },\n          \"plantIds\": {\n            \"type\": \"array\",\n            \"items\": {\n              \"type\": \"integer\",\n              \"format\": \"int32\"\n            },\n            \"description\": \"Collection of unique plant identifiers created within this batch.\",\n            \"nullable\": true\n          }\n        },\n        \"additionalProperties\": false,\n        \"description\": \"Individual created immature plant batch containing batch identifier and associated plant IDs.\"\n      },\n      \"CreatedMaturePlant\": {\n        \"type\": \"object\",\n        \"properties\": {\n          \"batchId\": {\n            \"type\": \"integer\",\n            \"format\": \"int32\"\n          },\n          \"plantId\": {\n            \"type\": \"integer\",\n            \"format\": \"int32\"\n          },\n          \"plantSerialNumber\": {\n            \"type\": \"string\",\n            \"nullable\": true\n          }\n        },\n        \"additionalProperties\": false\n      },\n      \"Customer\": {\n        \"type\": \"object\",\n        \"properties\": {\n          \"customerId\": {\n            \"type\": \"integer\",\n            \"description\": \"Unique internal identifier for the customer record.\",\n            \"format\": \"int32\"\n          },\n          \"uniqueId\": {\n            \"type\": \"string\",\n            \"description\": \"String representation of UniqueId for external API consumption.\",\n            \"nullable\": true,\n            \"readOnly\": true\n          },\n          \"name\": {\n            \"type\": \"string\",\n            \"description\": \"Deprecated name field (use FirstName and LastName instead).\",\n            \"nullable\": true,\n            \"deprecated\": true\n          },\n          \"firstName\": {\n            \"type\": \"string\",\n            \"description\": \"Customer's first name.\",\n            \"nullable\": true\n          },\n          \"lastName\": {\n            \"type\": \"string\",\n            \"description\": \"Customer's last name.\",\n            \"nullable\": true\n          },\n          \"middleName\": {\n            \"type\": \"string\",\n            \"description\": \"Customer's middle name.\",\n            \"nullable\": true\n          },\n          \"nameSuffix\": {\n            \"type\": \"string\",\n            \"description\": \"Name suffix (Jr., Sr., III, etc.).\",\n            \"nullable\": true\n          },\n          \"namePrefix\": {\n            \"type\": \"string\",\n            \"description\": \"Name prefix (Mr., Mrs., Dr., etc.).\",\n            \"nullable\": true\n          },\n          \"address1\": {\n            \"type\": \"string\",\n            \"description\": \"Primary street address line.\",\n            \"nullable\": true\n          },\n          \"address2\": {\n            \"type\": \"string\",\n            \"description\": \"Secondary address line (apartment, suite, etc.).\",\n            \"nullable\": true\n          },\n          \"city\": {\n            \"type\": \"string\",\n            \"description\": \"City name.\",\n            \"nullable\": true\n          },\n          \"state\": {\n            \"type\": \"string\",\n            \"description\": \"State or province.\",\n            \"nullable\": true\n          },\n          \"postalCode\": {\n            \"type\": \"string\",\n            \"description\": \"Postal or ZIP code.\",\n            \"nullable\": true\n          },\n          \"phone\": {\n            \"type\": \"string\",\n            \"description\": \"Primary phone number.\",\n            \"nullable\": true\n          },\n          \"cellPhone\": {\n            \"type\": \"string\",\n            \"description\": \"Cell phone number.\",\n            \"nullable\": true\n          },\n          \"emailAddress\": {\n            \"type\": \"string\",\n            \"description\": \"Email address.\",\n            \"nullable\": true\n          },\n          \"status\": {\n            \"type\": \"string\",\n            \"description\": \"Customer account status.\",\n            \"nullable\": true\n          },\n          \"mmjidNumber\": {\n            \"type\": \"string\",\n            \"description\": \"Medical marijuana identification number.\",\n            \"nullable\": true\n          },\n          \"mmjidExpirationDate\": {\n            \"type\": \"string\",\n            \"description\": \"Medical marijuana ID expiration date.\",\n            \"format\": \"date-time\",\n            \"nullable\": true\n          },\n          \"lastModifiedDateUTC\": {\n            \"type\": \"string\",\n            \"description\": \"Last modification timestamp in UTC format.\",\n            \"nullable\": true\n          },\n          \"creationDate\": {\n            \"type\": \"string\",\n            \"description\": \"Customer record creation date.\",\n            \"format\": \"date-time\",\n            \"nullable\": true\n          },\n          \"customerType\": {\n            \"type\": \"string\",\n            \"description\": \"Customer type classification.\",\n            \"nullable\": true\n          },\n          \"gender\": {\n            \"type\": \"string\",\n            \"description\": \"Customer's gender.\",\n            \"nullable\": true\n          },\n          \"driversLicenseHash\": {\n            \"type\": \"string\",\n            \"description\": \"SHA2_256 hash of the Driver License ID\",\n            \"nullable\": true\n          },\n          \"dateOfBirth\": {\n            \"type\": \"string\",\n            \"description\": \"Customer's date of birth.\",\n            \"format\": \"date-time\",\n            \"nullable\": true\n          },\n          \"externalCustomerId\": {\n            \"type\": \"string\",\n            \"description\": \"External system customer identifier.\",\n            \"nullable\": true\n          },\n          \"createdByIntegrator\": {\n            \"type\": \"string\",\n            \"description\": \"Name of the integration system that created this customer.\",\n            \"nullable\": true\n          },\n          \"isAnonymous\": {\n            \"type\": \"boolean\",\n            \"description\": \"Indicates if this is an anonymous customer record.\"\n          },\n          \"referralSource\": {\n            \"type\": \"string\",\n            \"description\": \"How the customer heard about the dispensary.\",\n            \"nullable\": true\n          },\n          \"otherReferralSource\": {\n            \"type\": \"string\",\n            \"description\": \"Additional details about referral source when \\\"Other\\\" is selected.\",\n            \"nullable\": true\n          },\n          \"springBigMemberId\": {\n            \"type\": \"integer\",\n            \"description\": \"SpringBig loyalty system member identifier.\",\n            \"format\": \"int32\"\n          },\n          \"customIdentifier\": {\n            \"type\": \"string\",\n            \"description\": \"Custom identifier for external system integration.\",\n            \"nullable\": true\n          },\n          \"discountGroups\": {\n            \"type\": \"array\",\n            \"items\": {\n              \"type\": \"string\"\n            },\n            \"description\": \"Collection of active discount groups for this customer.\",\n            \"nullable\": true,\n            \"readOnly\": true\n          },\n          \"createdAtLocation\": {\n            \"type\": \"string\",\n            \"description\": \"Location where this customer record was created.\",\n            \"nullable\": true\n          },\n          \"notes\": {\n            \"type\": \"string\",\n            \"description\": \"Additional notes about the customer.\",\n            \"nullable\": true\n          },\n          \"isLoyaltyMember\": {\n            \"type\": \"boolean\",\n            \"description\": \"Indicates if customer is enrolled in loyalty program.\",\n            \"nullable\": true\n          },\n          \"primaryQualifyingCondition\": {\n            \"type\": \"string\",\n            \"description\": \"Primary medical condition for medical marijuana patients.\",\n            \"nullable\": true\n          },\n          \"secondaryQualifyingConditions\": {\n            \"type\": \"array\",\n            \"items\": {\n              \"type\": \"string\"\n            },\n            \"description\": \"Additional medical conditions for medical marijuana patients.\",\n            \"nullable\": true\n          },\n          \"mergedIntoCustomerId\": {\n            \"type\": \"integer\",\n            \"description\": \"Customer ID this record was merged into (if applicable).\",\n            \"format\": \"int32\",\n            \"nullable\": true\n          },\n          \"optedIntoMarketing\": {\n            \"type\": \"boolean\",\n            \"description\": \"Customer's marketing communication preference.\",\n            \"nullable\": true\n          },\n          \"loyaltyTier\": {\n            \"type\": \"string\",\n            \"description\": \"Customer's current loyalty program tier.\",\n            \"nullable\": true\n          }\n        },\n        \"additionalProperties\": false,\n        \"description\": \"Represents a customer profile with personal information, contact details, and cannabis compliance data.\"\n      },\n      \"CustomerSearchRequest\": {\n        \"type\": \"object\",\n        \"properties\": {\n          \"lastName\": {\n            \"type\": \"string\",\n            \"description\": \"Customer's last name for name-based search matching.\",\n            \"nullable\": true\n          },\n          \"dateOfBirth\": {\n            \"type\": \"string\",\n            \"description\": \"Customer's date of birth for identity verification and precise matching.\",\n            \"format\": \"date-time\",\n            \"nullable\": true\n          },\n          \"phone\": {\n            \"type\": \"string\",\n            \"description\": \"Customer's phone number for contact-based search matching.\",\n            \"nullable\": true\n          },\n          \"emailAddress\": {\n            \"type\": \"string\",\n            \"description\": \"Customer's email address for account-based search matching.\",\n            \"nullable\": true\n          },\n          \"mmjidNumber\": {\n            \"type\": \"string\",\n            \"description\": \"Medical marijuana identification number for regulatory compliance search.\",\n            \"nullable\": true\n          },\n          \"driversLicenseId\": {\n            \"type\": \"string\",\n            \"description\": \"Driver's license identifier for government ID-based search matching.\",\n            \"nullable\": true\n          }\n        },\n        \"additionalProperties\": false,\n        \"description\": \"Search criteria model for customer lookup operations with flexible matching options.\"\n      },\n      \"CustomerSearchResult\": {\n        \"type\": \"object\",\n        \"properties\": {\n          \"matchType\": {\n            \"type\": \"string\",\n            \"description\": \"Indicates how the customer record was matched during the search operation.\",\n            \"nullable\": true\n          },\n          \"customerId\": {\n            \"type\": \"integer\",\n            \"description\": \"Unique internal identifier for the customer record.\",\n            \"format\": \"int32\"\n          },\n          \"uniqueId\": {\n            \"type\": \"string\",\n            \"description\": \"String representation of UniqueId for external API consumption.\",\n            \"nullable\": true,\n            \"readOnly\": true\n          },\n          \"name\": {\n            \"type\": \"string\",\n            \"description\": \"Deprecated name field (use FirstName and LastName instead).\",\n            \"nullable\": true,\n            \"deprecated\": true\n          },\n          \"firstName\": {\n            \"type\": \"string\",\n            \"description\": \"Customer's first name.\",\n            \"nullable\": true\n          },\n          \"lastName\": {\n            \"type\": \"string\",\n            \"description\": \"Customer's last name.\",\n            \"nullable\": true\n          },\n          \"middleName\": {\n            \"type\": \"string\",\n            \"description\": \"Customer's middle name.\",\n            \"nullable\": true\n          },\n          \"nameSuffix\": {\n            \"type\": \"string\",\n            \"description\": \"Name suffix (Jr., Sr., III, etc.).\",\n            \"nullable\": true\n          },\n          \"namePrefix\": {\n            \"type\": \"string\",\n            \"description\": \"Name prefix (Mr., Mrs., Dr., etc.).\",\n            \"nullable\": true\n          },\n          \"address1\": {\n            \"type\": \"string\",\n            \"description\": \"Primary street address line.\",\n            \"nullable\": true\n          },\n          \"address2\": {\n            \"type\": \"string\",\n            \"description\": \"Secondary address line (apartment, suite, etc.).\",\n            \"nullable\": true\n          },\n          \"city\": {\n            \"type\": \"string\",\n            \"description\": \"City name.\",\n            \"nullable\": true\n          },\n          \"state\": {\n            \"type\": \"string\",\n            \"description\": \"State or province.\",\n            \"nullable\": true\n          },\n          \"postalCode\": {\n            \"type\": \"string\",\n            \"description\": \"Postal or ZIP code.\",\n            \"nullable\": true\n          },\n          \"phone\": {\n            \"type\": \"string\",\n            \"description\": \"Primary phone number.\",\n            \"nullable\": true\n          },\n          \"cellPhone\": {\n            \"type\": \"string\",\n            \"description\": \"Cell phone number.\",\n            \"nullable\": true\n          },\n          \"emailAddress\": {\n            \"type\": \"string\",\n            \"description\": \"Email address.\",\n            \"nullable\": true\n          },\n          \"status\": {\n            \"type\": \"string\",\n            \"description\": \"Customer account status.\",\n            \"nullable\": true\n          },\n          \"mmjidNumber\": {\n            \"type\": \"string\",\n            \"description\": \"Medical marijuana identification number.\",\n            \"nullable\": true\n          },\n          \"mmjidExpirationDate\": {\n            \"type\": \"string\",\n            \"description\": \"Medical marijuana ID expiration date.\",\n            \"format\": \"date-time\",\n            \"nullable\": true\n          },\n          \"lastModifiedDateUTC\": {\n            \"type\": \"string\",\n            \"description\": \"Last modification timestamp in UTC format.\",\n            \"nullable\": true\n          },\n          \"creationDate\": {\n            \"type\": \"string\",\n            \"description\": \"Customer record creation date.\",\n            \"format\": \"date-time\",\n            \"nullable\": true\n          },\n          \"customerType\": {\n            \"type\": \"string\",\n            \"description\": \"Customer type classification.\",\n            \"nullable\": true\n          },\n          \"gender\": {\n            \"type\": \"string\",\n            \"description\": \"Customer's gender.\",\n            \"nullable\": true\n          },\n          \"driversLicenseHash\": {\n            \"type\": \"string\",\n            \"description\": \"SHA2_256 hash of the Driver License ID\",\n            \"nullable\": true\n          },\n          \"dateOfBirth\": {\n            \"type\": \"string\",\n            \"description\": \"Customer's date of birth.\",\n            \"format\": \"date-time\",\n            \"nullable\": true\n          },\n          \"externalCustomerId\": {\n            \"type\": \"string\",\n            \"description\": \"External system customer identifier.\",\n            \"nullable\": true\n          },\n          \"createdByIntegrator\": {\n            \"type\": \"string\",\n            \"description\": \"Name of the integration system that created this customer.\",\n            \"nullable\": true\n          },\n          \"isAnonymous\": {\n            \"type\": \"boolean\",\n            \"description\": \"Indicates if this is an anonymous customer record.\"\n          },\n          \"referralSource\": {\n            \"type\": \"string\",\n            \"description\": \"How the customer heard about the dispensary.\",\n            \"nullable\": true\n          },\n          \"otherReferralSource\": {\n            \"type\": \"string\",\n            \"description\": \"Additional details about referral source when \\\"Other\\\" is selected.\",\n            \"nullable\": true\n          },\n          \"springBigMemberId\": {\n            \"type\": \"integer\",\n            \"description\": \"SpringBig loyalty system member identifier.\",\n            \"format\": \"int32\"\n          },\n          \"customIdentifier\": {\n            \"type\": \"string\",\n            \"description\": \"Custom identifier for external system integration.\",\n            \"nullable\": true\n          },\n          \"discountGroups\": {\n            \"type\": \"array\",\n            \"items\": {\n              \"type\": \"string\"\n            },\n            \"description\": \"Collection of active discount groups for this customer.\",\n            \"nullable\": true,\n            \"readOnly\": true\n          },\n          \"createdAtLocation\": {\n            \"type\": \"string\",\n            \"description\": \"Location where this customer record was created.\",\n            \"nullable\": true\n          },\n          \"notes\": {\n            \"type\": \"string\",\n            \"description\": \"Additional notes about the customer.\",\n            \"nullable\": true\n          },\n          \"isLoyaltyMember\": {\n            \"type\": \"boolean\",\n            \"description\": \"Indicates if customer is enrolled in loyalty program.\",\n            \"nullable\": true\n          },\n          \"primaryQualifyingCondition\": {\n            \"type\": \"string\",\n            \"description\": \"Primary medical condition for medical marijuana patients.\",\n            \"nullable\": true\n          },\n          \"secondaryQualifyingConditions\": {\n            \"type\": \"array\",\n            \"items\": {\n              \"type\": \"string\"\n            },\n            \"description\": \"Additional medical conditions for medical marijuana patients.\",\n            \"nullable\": true\n          },\n          \"mergedIntoCustomerId\": {\n            \"type\": \"integer\",\n            \"description\": \"Customer ID this record was merged into (if applicable).\",\n            \"format\": \"int32\",\n            \"nullable\": true\n          },\n          \"optedIntoMarketing\": {\n            \"type\": \"boolean\",\n            \"description\": \"Customer's marketing communication preference.\",\n            \"nullable\": true\n          },\n          \"loyaltyTier\": {\n            \"type\": \"string\",\n            \"description\": \"Customer's current loyalty program tier.\",\n            \"nullable\": true\n          }\n        },\n        \"additionalProperties\": false,\n        \"description\": \"Extended customer model that includes search match type information for customer lookup operations.\"\n      },\n      \"CustomerType\": {\n        \"type\": \"object\",\n        \"properties\": {\n          \"id\": {\n            \"type\": \"integer\",\n            \"description\": \"Unique identifier for the customer type.\",\n            \"format\": \"int32\"\n          },\n          \"name\": {\n            \"type\": \"string\",\n            \"description\": \"Display name of the customer type.\",\n            \"nullable\": true\n          },\n          \"isMedical\": {\n            \"type\": \"boolean\",\n            \"description\": \"Indicates whether this customer type is for medical marijuana patients.\"\n          },\n          \"isRetail\": {\n            \"type\": \"boolean\",\n            \"description\": \"Indicates whether this customer type is for retail (adult-use) customers.\"\n          }\n        },\n        \"additionalProperties\": false,\n        \"description\": \"Represents a customer type classification for cannabis dispensary operations and compliance.\"\n      },\n      \"DateTimeNullableOptional\": {\n        \"type\": \"string\",\n        \"additionalProperties\": false\n      },\n      \"DecimalNullableOptional\": {\n        \"type\": \"number\",\n        \"additionalProperties\": false\n      },\n      \"DeleteImageRequest\": {\n        \"required\": [\"imageId\", \"productId\"],\n        \"type\": \"object\",\n        \"properties\": {\n          \"productId\": {\n            \"type\": \"integer\",\n            \"description\": \"The unique identifier of the product that owns the image to be deleted.\",\n            \"format\": \"int32\"\n          },\n          \"imageId\": {\n            \"type\": \"integer\",\n            \"description\": \"The unique identifier of the specific image to be deleted from the product.\",\n            \"format\": \"int32\"\n          }\n        },\n        \"additionalProperties\": false,\n        \"description\": \"Request model for deleting a product image through the product image management API.\"\n      },\n      \"DeliveryOrderStatus\": {\n        \"type\": \"object\",\n        \"properties\": {\n          \"preOrderId\": {\n            \"type\": \"integer\",\n            \"format\": \"int32\",\n            \"nullable\": true\n          },\n          \"transactionId\": {\n            \"type\": \"integer\",\n            \"format\": \"int32\"\n          },\n          \"status\": {\n            \"type\": \"string\",\n            \"nullable\": true\n          },\n          \"orderDate\": {\n            \"type\": \"string\",\n            \"format\": \"date-time\"\n          },\n          \"customerFirstName\": {\n            \"type\": \"string\",\n            \"nullable\": true\n          },\n          \"customerLastName\": {\n            \"type\": \"string\",\n            \"nullable\": true\n          },\n          \"customerId\": {\n            \"type\": \"integer\",\n            \"format\": \"int32\"\n          },\n          \"orderType\": {\n            \"type\": \"string\",\n            \"nullable\": true\n          },\n          \"orderSource\": {\n            \"type\": \"string\",\n            \"nullable\": true\n          },\n          \"rejectedReason\": {\n            \"type\": \"string\",\n            \"nullable\": true\n          },\n          \"total\": {\n            \"type\": \"number\",\n            \"format\": \"double\",\n            \"nullable\": true\n          },\n          \"subTotal\": {\n            \"type\": \"number\",\n            \"format\": \"double\",\n            \"nullable\": true\n          },\n          \"totalTax\": {\n            \"type\": \"number\",\n            \"format\": \"double\",\n            \"nullable\": true\n          },\n          \"streetAddress1\": {\n            \"type\": \"string\",\n            \"nullable\": true\n          },\n          \"streetAddress2\": {\n            \"type\": \"string\",\n            \"nullable\": true\n          },\n          \"city\": {\n            \"type\": \"string\",\n            \"nullable\": true\n          },\n          \"deliveryState\": {\n            \"type\": \"string\",\n            \"nullable\": true\n          },\n          \"postalCode\": {\n            \"type\": \"string\",\n            \"nullable\": true\n          },\n          \"customerPhone\": {\n            \"type\": \"string\",\n            \"nullable\": true\n          },\n          \"customerExpectedTimeStart\": {\n            \"type\": \"string\",\n            \"format\": \"date-time\"\n          },\n          \"customerExpectedTimeEnd\": {\n            \"type\": \"string\",\n            \"format\": \"date-time\"\n          },\n          \"dispatchDepartTime\": {\n            \"type\": \"string\",\n            \"format\": \"date-time\"\n          },\n          \"dispatchArriveTime\": {\n            \"type\": \"string\",\n            \"format\": \"date-time\"\n          },\n          \"items\": {\n            \"type\": \"array\",\n            \"items\": {\n              \"$ref\": \"#/components/schemas/AllocatedDeliveryItem\"\n            },\n            \"nullable\": true\n          },\n          \"payments\": {\n            \"type\": \"array\",\n            \"items\": {\n              \"$ref\": \"#/components/schemas/DeliveryPayment\"\n            },\n            \"nullable\": true\n          },\n          \"deliveryStatus\": {\n            \"type\": \"string\",\n            \"nullable\": true\n          }\n        },\n        \"additionalProperties\": false\n      },\n      \"DeliveryPayment\": {\n        \"type\": \"object\",\n        \"properties\": {\n          \"name\": {\n            \"type\": \"string\",\n            \"nullable\": true\n          },\n          \"amount\": {\n            \"type\": \"number\",\n            \"format\": \"double\"\n          }\n        },\n        \"additionalProperties\": false\n      },\n      \"DeliveryScheduleType\": {\n        \"enum\": [1, 2],\n        \"type\": \"integer\",\n        \"format\": \"int32\"\n      },\n      \"Discount\": {\n        \"type\": \"object\",\n        \"properties\": {\n          \"name\": {\n            \"type\": \"string\",\n            \"nullable\": true\n          },\n          \"amount\": {\n            \"type\": \"number\",\n            \"format\": \"double\"\n          },\n          \"discountId\": {\n            \"type\": \"integer\",\n            \"format\": \"int32\",\n            \"nullable\": true\n          }\n        },\n        \"additionalProperties\": false\n      },\n      \"DiscountApiResponse\": {\n        \"type\": \"object\",\n        \"properties\": {\n          \"id\": {\n            \"type\": \"integer\",\n            \"format\": \"int32\",\n            \"nullable\": true\n          },\n          \"externalId\": {\n            \"type\": \"string\",\n            \"nullable\": true\n          },\n          \"validDateFrom\": {\n            \"type\": \"string\",\n            \"format\": \"date-time\",\n            \"nullable\": true\n          },\n          \"validDateTo\": {\n            \"type\": \"string\",\n            \"format\": \"date-time\",\n            \"nullable\": true\n          },\n          \"maxRedemptions\": {\n            \"type\": \"integer\",\n            \"format\": \"int32\",\n            \"nullable\": true\n          },\n          \"redemptionLimit\": {\n            \"type\": \"integer\",\n            \"format\": \"int32\",\n            \"nullable\": true\n          },\n          \"firstTimeCustomerOnly\": {\n            \"$ref\": \"#/components/schemas/DiscountFirstTimeCustomer\"\n          },\n          \"discountDescription\": {\n            \"type\": \"string\",\n            \"nullable\": true\n          },\n          \"discountCode\": {\n            \"type\": \"string\",\n            \"nullable\": true\n          },\n          \"applicationMethodId\": {\n            \"$ref\": \"#/components/schemas/DiscountApplicationMethod\"\n          },\n          \"applicationMethod\": {\n            \"type\": \"string\",\n            \"nullable\": true,\n            \"readOnly\": true\n          },\n          \"canStackAutomatically\": {\n            \"type\": \"boolean\"\n          },\n          \"onlineName\": {\n            \"type\": \"string\",\n            \"nullable\": true\n          },\n          \"locationRestrictions\": {\n            \"type\": \"array\",\n            \"items\": {\n              \"type\": \"integer\",\n              \"format\": \"int32\"\n            },\n            \"nullable\": true\n          },\n          \"restrictToGroupIds\": {\n            \"type\": \"array\",\n            \"items\": {\n              \"type\": \"integer\",\n              \"format\": \"int32\"\n            },\n            \"nullable\": true\n          },\n          \"startTime\": {\n            \"type\": \"object\",\n            \"nullable\": true\n          },\n          \"endTime\": {\n            \"type\": \"object\",\n            \"nullable\": true\n          },\n          \"monday\": {\n            \"type\": \"boolean\",\n            \"nullable\": true\n          },\n          \"tuesday\": {\n            \"type\": \"boolean\",\n            \"nullable\": true\n          },\n          \"wednesday\": {\n            \"type\": \"boolean\",\n            \"nullable\": true\n          },\n          \"thursday\": {\n            \"type\": \"boolean\",\n            \"nullable\": true\n          },\n          \"friday\": {\n            \"type\": \"boolean\",\n            \"nullable\": true\n          },\n          \"saturday\": {\n            \"type\": \"boolean\",\n            \"nullable\": true\n          },\n          \"sunday\": {\n            \"type\": \"boolean\",\n            \"nullable\": true\n          },\n          \"isActive\": {\n            \"type\": \"boolean\"\n          },\n          \"isBundledDiscount\": {\n            \"type\": \"boolean\"\n          },\n          \"constraints\": {\n            \"type\": \"array\",\n            \"items\": {\n              \"$ref\": \"#/components/schemas/DiscountConstraintAPIResponse\"\n            },\n            \"nullable\": true\n          },\n          \"reward\": {\n            \"$ref\": \"#/components/schemas/DiscountRewardAPIResponse\"\n          },\n          \"menuDisplay\": {\n            \"$ref\": \"#/components/schemas/DiscountMenuDisplayAPIResponse\"\n          },\n          \"paymentRestrictions\": {\n            \"$ref\": \"#/components/schemas/DiscountPaymentRestrictionAPIResponse\"\n          }\n        },\n        \"additionalProperties\": false\n      },\n      \"DiscountApplicationMethod\": {\n        \"enum\": [1, 2, 3, 4, 5, 6],\n        \"type\": \"integer\",\n        \"format\": \"int32\"\n      },\n      \"DiscountConstraintAPIResponse\": {\n        \"type\": \"object\",\n        \"properties\": {\n          \"discountConstraintId\": {\n            \"type\": \"integer\",\n            \"format\": \"int32\",\n            \"nullable\": true\n          },\n          \"discountId\": {\n            \"type\": \"integer\",\n            \"format\": \"int32\"\n          },\n          \"thresholdMin\": {\n            \"type\": \"number\",\n            \"format\": \"double\",\n            \"nullable\": true\n          },\n          \"includeNonCannabis\": {\n            \"type\": \"boolean\"\n          },\n          \"thresholdTypeId\": {\n            \"$ref\": \"#/components/schemas/DiscountThresholdType\"\n          },\n          \"thresholdType\": {\n            \"type\": \"string\",\n            \"nullable\": true,\n            \"readOnly\": true\n          },\n          \"hasThreshold\": {\n            \"type\": \"boolean\",\n            \"readOnly\": true\n          },\n          \"discountItemGroupTypeId\": {\n            \"$ref\": \"#/components/schemas/DiscountItemGroupType\"\n          },\n          \"itemGroupType\": {\n            \"type\": \"string\",\n            \"nullable\": true,\n            \"readOnly\": true\n          },\n          \"restrictions\": {\n            \"type\": \"object\",\n            \"additionalProperties\": {\n              \"$ref\": \"#/components/schemas/IRestrictionAPIResponse\"\n            },\n            \"nullable\": true\n          }\n        },\n        \"additionalProperties\": false\n      },\n      \"DiscountFirstTimeCustomer\": {\n        \"enum\": [0, 1, 2],\n        \"type\": \"integer\",\n        \"format\": \"int32\"\n      },\n      \"DiscountGroup\": {\n        \"type\": \"object\",\n        \"properties\": {\n          \"discountGroupId\": {\n            \"type\": \"integer\",\n            \"description\": \"Unique identifier for the discount group.\",\n            \"format\": \"int32\"\n          },\n          \"discountGroupName\": {\n            \"type\": \"string\",\n            \"description\": \"Display name of the discount group for management and organization.\",\n            \"nullable\": true\n          }\n        },\n        \"additionalProperties\": false,\n        \"description\": \"Discount group model for organizing and categorizing related discounts.\"\n      },\n      \"DiscountItemGroupType\": {\n        \"enum\": [5, 6],\n        \"type\": \"integer\",\n        \"format\": \"int32\"\n      },\n      \"DiscountMenuDisplayAPIResponse\": {\n        \"type\": \"object\",\n        \"properties\": {\n          \"menuDisplayDescription\": {\n            \"type\": \"string\",\n            \"nullable\": true\n          },\n          \"menuDisplayImageUrl\": {\n            \"type\": \"string\",\n            \"nullable\": true\n          },\n          \"menuDisplayName\": {\n            \"type\": \"string\",\n            \"nullable\": true\n          },\n          \"menuDisplayRank\": {\n            \"type\": \"integer\",\n            \"format\": \"int32\"\n          }\n        },\n        \"additionalProperties\": false\n      },\n      \"DiscountPaymentRestrictionAPIResponse\": {\n        \"type\": \"object\",\n        \"properties\": {\n          \"payByBankSignupIncentive\": {\n            \"type\": \"boolean\"\n          }\n        },\n        \"additionalProperties\": false\n      },\n      \"DiscountRestriction\": {\n        \"type\": \"object\",\n        \"properties\": {\n          \"ids\": {\n            \"type\": \"array\",\n            \"items\": {\n              \"type\": \"integer\",\n              \"format\": \"int32\"\n            },\n            \"description\": \"Collection of entity identifiers subject to the restriction rule.\",\n            \"nullable\": true\n          },\n          \"isExclusion\": {\n            \"type\": \"boolean\",\n            \"description\": \"Indicates if this is an exclusion rule (true) or inclusion rule (false).\"\n          }\n        },\n        \"additionalProperties\": false,\n        \"description\": \"Discount restriction model defining entity inclusion or exclusion rules for discount application.\"\n      },\n      \"DiscountRewardAPIResponse\": {\n        \"type\": \"object\",\n        \"properties\": {\n          \"discountRewardId\": {\n            \"type\": \"integer\",\n            \"format\": \"int32\",\n            \"nullable\": true\n          },\n          \"discountId\": {\n            \"type\": \"integer\",\n            \"format\": \"int32\"\n          },\n          \"calculationMethodId\": {\n            \"$ref\": \"#/components/schemas/CalculationMethod\"\n          },\n          \"calculationMethod\": {\n            \"type\": \"string\",\n            \"nullable\": true,\n            \"readOnly\": true\n          },\n          \"discountValue\": {\n            \"type\": \"number\",\n            \"format\": \"double\"\n          },\n          \"includeNonCannabis\": {\n            \"type\": \"boolean\"\n          },\n          \"highestOrLowest\": {\n            \"type\": \"string\",\n            \"nullable\": true\n          },\n          \"thresholdTypeId\": {\n            \"$ref\": \"#/components/schemas/DiscountThresholdType\"\n          },\n          \"thresholdType\": {\n            \"type\": \"string\",\n            \"nullable\": true,\n            \"readOnly\": true\n          },\n          \"hasThreshold\": {\n            \"type\": \"boolean\",\n            \"readOnly\": true\n          },\n          \"itemGroupTypeId\": {\n            \"$ref\": \"#/components/schemas/DiscountItemGroupType\"\n          },\n          \"itemGroupType\": {\n            \"type\": \"string\",\n            \"nullable\": true,\n            \"readOnly\": true\n          },\n          \"thresholdMin\": {\n            \"type\": \"number\",\n            \"format\": \"double\",\n            \"nullable\": true\n          },\n          \"thresholdMax\": {\n            \"type\": \"number\",\n            \"format\": \"double\",\n            \"nullable\": true\n          },\n          \"applyToOnlyOneItem\": {\n            \"type\": \"boolean\"\n          },\n          \"restrictions\": {\n            \"type\": \"object\",\n            \"additionalProperties\": {\n              \"$ref\": \"#/components/schemas/IRestrictionAPIResponse\"\n            },\n            \"nullable\": true\n          }\n        },\n        \"additionalProperties\": false\n      },\n      \"DiscountThresholdType\": {\n        \"enum\": [1, 2, 3],\n        \"type\": \"integer\",\n        \"format\": \"int32\"\n      },\n      \"DriverDetail\": {\n        \"type\": \"object\",\n        \"properties\": {\n          \"driverId\": {\n            \"type\": \"integer\",\n            \"format\": \"int32\"\n          },\n          \"name\": {\n            \"type\": \"string\",\n            \"nullable\": true\n          },\n          \"stateId\": {\n            \"type\": \"string\",\n            \"nullable\": true\n          },\n          \"driversLicense\": {\n            \"type\": \"string\",\n            \"nullable\": true\n          }\n        },\n        \"additionalProperties\": false\n      },\n      \"EcomCustomerEdit\": {\n        \"required\": [\n          \"address1\",\n          \"city\",\n          \"customerType\",\n          \"firstName\",\n          \"postalCode\",\n          \"state\",\n          \"status\"\n        ],\n        \"type\": \"object\",\n        \"properties\": {\n          \"customerId\": {\n            \"type\": \"integer\",\n            \"description\": \"When specified, it updates the record, if the ID exists\\nnull / unspecified will create a new customer\",\n            \"format\": \"int32\",\n            \"nullable\": true\n          },\n          \"uniqueId\": {\n            \"type\": \"string\",\n            \"description\": \"Unique identifier for external system integration.\",\n            \"nullable\": true\n          },\n          \"name\": {\n            \"type\": \"string\",\n            \"description\": \"Deprecated full name field (use FirstName and LastName instead).\",\n            \"nullable\": true,\n            \"deprecated\": true\n          },\n          \"firstName\": {\n            \"minLength\": 1,\n            \"type\": \"string\",\n            \"description\": \"Customer's first name (required).\"\n          },\n          \"lastName\": {\n            \"type\": \"string\",\n            \"description\": \"Customer's last name.\",\n            \"nullable\": true\n          },\n          \"middleName\": {\n            \"type\": \"string\",\n            \"description\": \"Customer's middle name.\",\n            \"nullable\": true\n          },\n          \"nameSuffix\": {\n            \"type\": \"string\",\n            \"description\": \"Name suffix (Jr., Sr., III, etc.).\",\n            \"nullable\": true\n          },\n          \"namePrefix\": {\n            \"type\": \"string\",\n            \"description\": \"Name prefix (Mr., Mrs., Dr., etc.).\",\n            \"nullable\": true\n          },\n          \"address1\": {\n            \"minLength\": 1,\n            \"type\": \"string\",\n            \"description\": \"Primary street address line (required).\"\n          },\n          \"address2\": {\n            \"type\": \"string\",\n            \"description\": \"Secondary address line (apartment, suite, etc.).\",\n            \"nullable\": true\n          },\n          \"city\": {\n            \"minLength\": 1,\n            \"type\": \"string\",\n            \"description\": \"City name (required).\"\n          },\n          \"state\": {\n            \"minLength\": 1,\n            \"type\": \"string\",\n            \"description\": \"State or province (required).\"\n          },\n          \"postalCode\": {\n            \"minLength\": 1,\n            \"type\": \"string\",\n            \"description\": \"Postal or ZIP code (required).\"\n          },\n          \"phone\": {\n            \"type\": \"string\",\n            \"description\": \"Phone number.\",\n            \"nullable\": true\n          },\n          \"emailAddress\": {\n            \"type\": \"string\",\n            \"description\": \"Email address.\",\n            \"nullable\": true\n          },\n          \"status\": {\n            \"minLength\": 1,\n            \"type\": \"string\",\n            \"description\": \"Active; Cancelled; Hold; Banned\"\n          },\n          \"mmjidNumber\": {\n            \"type\": \"string\",\n            \"description\": \"Medical marijuana identification number.\",\n            \"nullable\": true\n          },\n          \"driversLicenseID\": {\n            \"type\": \"string\",\n            \"description\": \"Driver's license ID.\",\n            \"nullable\": true\n          },\n          \"driversLicenseExpiration\": {\n            \"type\": \"string\",\n            \"description\": \"Driver's license expiration date.\",\n            \"format\": \"date-time\",\n            \"nullable\": true\n          },\n          \"mmjidExpirationDate\": {\n            \"type\": \"string\",\n            \"description\": \"Medical marijuana ID expiration date.\",\n            \"format\": \"date-time\",\n            \"nullable\": true\n          },\n          \"customerType\": {\n            \"minLength\": 1,\n            \"type\": \"string\",\n            \"description\": \"Customer type classification (required). Use CustomerTypes endpoint to retrieve active customer types for a given location.\"\n          },\n          \"dateOfBirth\": {\n            \"type\": \"string\",\n            \"description\": \"Customer's date of birth.\",\n            \"format\": \"date-time\",\n            \"nullable\": true\n          },\n          \"externalCustomerId\": {\n            \"type\": \"string\",\n            \"description\": \"External system customer identifier.\",\n            \"nullable\": true\n          },\n          \"gender\": {\n            \"type\": \"string\",\n            \"description\": \"Customer's gender.\",\n            \"nullable\": true\n          },\n          \"idempotencyKey\": {\n            \"type\": \"string\",\n            \"description\": \"Optional idempotency key for duplicate prevention. When provided with a ConsumerKey header, ensures the same customer creation request is not processed multiple times.\",\n            \"nullable\": true\n          },\n          \"referralSource\": {\n            \"type\": \"string\",\n            \"description\": \"How the customer heard about the dispensary. Use ReferralSources endpoint to retrieve values.\",\n            \"nullable\": true\n          },\n          \"customIdentifier\": {\n            \"type\": \"string\",\n            \"description\": \"Custom identifier for external system integration.\",\n            \"nullable\": true\n          },\n          \"notes\": {\n            \"type\": \"string\",\n            \"description\": \"Additional notes about the customer.\",\n            \"nullable\": true\n          },\n          \"isLoyaltyMember\": {\n            \"type\": \"boolean\",\n            \"description\": \"Indicates if customer is enrolled in loyalty program.\",\n            \"nullable\": true\n          }\n        },\n        \"additionalProperties\": false,\n        \"description\": \"E-commerce customer data model for creating or updating customer profiles via API integration.\"\n      },\n      \"Employee\": {\n        \"type\": \"object\",\n        \"properties\": {\n          \"userId\": {\n            \"type\": \"integer\",\n            \"format\": \"int32\"\n          },\n          \"loginId\": {\n            \"type\": \"string\",\n            \"nullable\": true\n          },\n          \"fullName\": {\n            \"type\": \"string\",\n            \"nullable\": true\n          },\n          \"defaultLocation\": {\n            \"type\": \"string\",\n            \"nullable\": true\n          },\n          \"status\": {\n            \"type\": \"string\",\n            \"nullable\": true\n          },\n          \"stateId\": {\n            \"type\": \"string\",\n            \"nullable\": true\n          },\n          \"mmjExpiration\": {\n            \"type\": \"string\",\n            \"format\": \"date-time\"\n          },\n          \"permissionsLocation\": {\n            \"type\": \"string\",\n            \"nullable\": true\n          },\n          \"groups\": {\n            \"type\": \"string\",\n            \"nullable\": true\n          }\n        },\n        \"additionalProperties\": false\n      },\n      \"FeeDonation\": {\n        \"type\": \"object\",\n        \"properties\": {\n          \"name\": {\n            \"type\": \"string\",\n            \"description\": \"Name of the fee or donation for identification and reporting purposes.\",\n            \"nullable\": true\n          },\n          \"cashValue\": {\n            \"type\": \"number\",\n            \"description\": \"Cash value of the fee or donation for financial accounting.\",\n            \"format\": \"double\"\n          },\n          \"isRevenue\": {\n            \"type\": \"boolean\",\n            \"description\": \"Flag indicating whether the fee or donation counts as revenue for accounting purposes.\"\n          }\n        },\n        \"additionalProperties\": false,\n        \"description\": \"Fee and donation tracking model for cannabis dispensary compliance and accounting.\"\n      },\n      \"FeeDonationInfo\": {\n        \"type\": \"object\",\n        \"properties\": {\n          \"feeDonationId\": {\n            \"type\": \"integer\",\n            \"description\": \"Unique identifier for the specific fee or donation program.\",\n            \"format\": \"int32\"\n          },\n          \"description\": {\n            \"type\": \"string\",\n            \"description\": \"Description of the fee or donation for customer receipts and reporting.\",\n            \"nullable\": true\n          },\n          \"amount\": {\n            \"type\": \"number\",\n            \"description\": \"Amount of the fee or donation (in USD).\",\n            \"format\": \"double\"\n          },\n          \"isRevenue\": {\n            \"type\": \"boolean\",\n            \"description\": \"Indicates whether this fee counts as business revenue for accounting purposes.\"\n          }\n        },\n        \"additionalProperties\": false,\n        \"description\": \"Fee and donation information associated with cannabis retail transactions.\"\n      },\n      \"FinishOrUnfinishBatchDetails\": {\n        \"type\": \"object\",\n        \"properties\": {\n          \"batchId\": {\n            \"type\": \"integer\",\n            \"format\": \"int32\"\n          },\n          \"harvestCompletedOn\": {\n            \"type\": \"string\",\n            \"format\": \"date-time\",\n            \"nullable\": true\n          }\n        },\n        \"additionalProperties\": false\n      },\n      \"GuestListEntry\": {\n        \"type\": \"object\",\n        \"properties\": {\n          \"name\": {\n            \"type\": \"string\",\n            \"nullable\": true\n          },\n          \"checkinDateUTC\": {\n            \"type\": \"string\",\n            \"format\": \"date-time\"\n          },\n          \"status\": {\n            \"type\": \"string\",\n            \"nullable\": true\n          },\n          \"customerId\": {\n            \"type\": \"integer\",\n            \"format\": \"int32\"\n          },\n          \"transactionId\": {\n            \"type\": \"integer\",\n            \"format\": \"int32\"\n          },\n          \"transactionReferenceNumber\": {\n            \"type\": \"string\",\n            \"nullable\": true\n          },\n          \"terminalName\": {\n            \"type\": \"string\",\n            \"nullable\": true\n          },\n          \"customerType\": {\n            \"type\": \"string\",\n            \"nullable\": true\n          },\n          \"phone\": {\n            \"type\": \"string\",\n            \"nullable\": true\n          },\n          \"cellPhone\": {\n            \"type\": \"string\",\n            \"nullable\": true\n          },\n          \"preOrderSource\": {\n            \"type\": \"string\",\n            \"nullable\": true\n          }\n        },\n        \"additionalProperties\": false\n      },\n      \"Harvest\": {\n        \"type\": \"object\",\n        \"properties\": {\n          \"harvestId\": {\n            \"type\": \"integer\",\n            \"format\": \"int32\"\n          },\n          \"harvestName\": {\n            \"type\": \"string\",\n            \"nullable\": true\n          },\n          \"harvestDate\": {\n            \"type\": \"string\",\n            \"format\": \"date-time\"\n          },\n          \"harvestRoom\": {\n            \"type\": \"string\",\n            \"nullable\": true\n          },\n          \"plantCount\": {\n            \"type\": \"integer\",\n            \"format\": \"int32\"\n          },\n          \"plantWeight\": {\n            \"type\": \"number\",\n            \"format\": \"double\",\n            \"nullable\": true\n          },\n          \"wetWeight\": {\n            \"type\": \"number\",\n            \"format\": \"double\",\n            \"nullable\": true\n          },\n          \"wetWaste\": {\n            \"type\": \"number\",\n            \"format\": \"double\",\n            \"nullable\": true\n          },\n          \"dryBudWeight\": {\n            \"type\": \"number\",\n            \"format\": \"double\",\n            \"nullable\": true\n          },\n          \"dryShakeWeight\": {\n            \"type\": \"number\",\n            \"format\": \"double\",\n            \"nullable\": true\n          },\n          \"dryWaste\": {\n            \"type\": \"number\",\n            \"format\": \"double\",\n            \"nullable\": true\n          },\n          \"packageCount\": {\n            \"type\": \"integer\",\n            \"format\": \"int32\"\n          },\n          \"packagedWeight\": {\n            \"type\": \"number\",\n            \"format\": \"double\",\n            \"nullable\": true\n          },\n          \"lastModifiedDateUTC\": {\n            \"type\": \"string\",\n            \"format\": \"date-time\"\n          },\n          \"strainName\": {\n            \"type\": \"string\",\n            \"nullable\": true\n          }\n        },\n        \"additionalProperties\": false\n      },\n      \"HarvestPlantRequest\": {\n        \"type\": \"object\",\n        \"properties\": {\n          \"plants\": {\n            \"type\": \"array\",\n            \"items\": {\n              \"$ref\": \"#/components/schemas/HarvestedPlant\"\n            },\n            \"description\": \"Collection of plants to be harvested with optional weight measurements\",\n            \"nullable\": true\n          },\n          \"harvestId\": {\n            \"type\": \"integer\",\n            \"description\": \"Target harvest record ID for associating harvested plants\",\n            \"format\": \"int32\"\n          },\n          \"harvestedOn\": {\n            \"type\": \"string\",\n            \"description\": \"Date and time when harvest occurred (optional, defaults to current UTC time if not specified)\",\n            \"format\": \"date-time\",\n            \"nullable\": true\n          }\n        },\n        \"additionalProperties\": false,\n        \"description\": \"Request model for moving cannabis plants from cultivation to harvest status with optional weight tracking.\\n\\n**Request Behavior:**\\n- Moves specified plants from cultivation status to harvesting status\\n- Supports bulk processing of multiple plants in single operation\\n- Optional weight tracking for harvest yield management\\n- Integrates with external cultivation systems when configured\\n\\n**Validation:**\\n- All plant IDs must exist and be accessible to the authenticated location\\n- Plants must be in valid status for harvesting (typically Active status)\\n- Harvest ID must correspond to existing harvest record\"\n      },\n      \"HarvestWasteDetail\": {\n        \"type\": \"object\",\n        \"properties\": {\n          \"harvestId\": {\n            \"type\": \"integer\",\n            \"description\": \"Identifier for the harvest batch generating this waste.\",\n            \"format\": \"int32\"\n          },\n          \"wasteType\": {\n            \"type\": \"string\",\n            \"description\": \"Type or category of waste material from the harvest.\",\n            \"nullable\": true\n          },\n          \"wasteAmount\": {\n            \"type\": \"number\",\n            \"description\": \"Quantity of waste material generated from the harvest.\",\n            \"format\": \"double\"\n          },\n          \"unitId\": {\n            \"type\": \"integer\",\n            \"description\": \"Unit of measurement identifier for the waste amount.\",\n            \"format\": \"int32\"\n          }\n        },\n        \"additionalProperties\": false,\n        \"description\": \"Harvest waste detail model for tracking waste generated from specific harvest operations.\"\n      },\n      \"HarvestWasteDetailWaste\": {\n        \"type\": \"object\",\n        \"properties\": {\n          \"wasteId\": {\n            \"type\": \"integer\",\n            \"description\": \"Unique identifier for the waste record (null for new waste creation).\",\n            \"format\": \"int32\",\n            \"nullable\": true\n          },\n          \"referenceNo\": {\n            \"type\": \"string\",\n            \"description\": \"Reference number for waste tracking and documentation.\",\n            \"nullable\": true\n          },\n          \"comments\": {\n            \"type\": \"string\",\n            \"description\": \"Additional comments or notes about the waste disposal.\",\n            \"nullable\": true\n          },\n          \"wasteDate\": {\n            \"type\": \"string\",\n            \"description\": \"Date when the waste disposal occurred.\",\n            \"format\": \"date-time\",\n            \"nullable\": true\n          },\n          \"wasteDetail\": {\n            \"type\": \"array\",\n            \"items\": {\n              \"$ref\": \"#/components/schemas/HarvestWasteDetail\"\n            },\n            \"description\": \"Collection of waste detail records containing specific item information.\",\n            \"nullable\": true\n          },\n          \"lspId\": {\n            \"type\": \"integer\",\n            \"description\": \"Licensed Service Provider identifier (internal use only).\",\n            \"format\": \"int32\",\n            \"nullable\": true\n          },\n          \"locId\": {\n            \"type\": \"integer\",\n            \"description\": \"Location identifier (internal use only).\",\n            \"format\": \"int32\",\n            \"nullable\": true\n          },\n          \"roomRequired\": {\n            \"type\": \"boolean\",\n            \"description\": \"Indicates if room identification is required for this waste type (internal use only).\",\n            \"nullable\": true\n          },\n          \"isBioTrack\": {\n            \"type\": \"boolean\",\n            \"description\": \"Indicates if this waste integrates with BioTrack system (internal use only).\",\n            \"nullable\": true\n          }\n        },\n        \"additionalProperties\": false,\n        \"description\": \"Generic waste record model containing waste disposal information and associated detail records for cannabis compliance and waste tracking.\"\n      },\n      \"HarvestedPlant\": {\n        \"type\": \"object\",\n        \"properties\": {\n          \"plantId\": {\n            \"type\": \"integer\",\n            \"description\": \"Unique LeafLogix plant identifier for the plant being harvested\",\n            \"format\": \"int32\"\n          },\n          \"weight\": {\n            \"type\": \"number\",\n            \"description\": \"Optional harvest weight measurement (typically wet weight in grams)\",\n            \"format\": \"double\",\n            \"nullable\": true\n          }\n        },\n        \"additionalProperties\": false,\n        \"description\": \"Individual plant harvest information with optional weight tracking for yield management.\\n\\n**Weight Tracking:**\\n- Weight is optional but recommended for harvest yield analysis\\n- Typically represents wet weight at time of harvest\\n- Used for compliance reporting and operational analytics\"\n      },\n      \"IRestrictionAPIResponse\": {\n        \"type\": \"object\",\n        \"properties\": {\n          \"isExclusion\": {\n            \"type\": \"boolean\"\n          }\n        },\n        \"additionalProperties\": false\n      },\n      \"Int32IEnumerableOptional\": {\n        \"type\": \"array\",\n        \"additionalProperties\": false\n      },\n      \"Int32NullableOptional\": {\n        \"type\": \"integer\",\n        \"additionalProperties\": false\n      },\n      \"IntegratedPayment\": {\n        \"type\": \"object\",\n        \"properties\": {\n          \"integrationType\": {\n            \"type\": \"string\",\n            \"description\": \"Type of integrated payment processor used for the transaction (e.g., \\\"CreditCard\\\", \\\"CanPay\\\", \\\"ACH\\\").\",\n            \"nullable\": true\n          },\n          \"integratedPaid\": {\n            \"type\": \"number\",\n            \"description\": \"Amount paid through the integrated payment system (in USD).\",\n            \"format\": \"double\"\n          },\n          \"externalPaymentId\": {\n            \"type\": \"string\",\n            \"description\": \"External payment identifier from the integrated payment processor for transaction tracking.\",\n            \"nullable\": true\n          }\n        },\n        \"additionalProperties\": false,\n        \"description\": \"Integrated payment processing information for cannabis transactions processed through connected payment systems.\"\n      },\n      \"InventoryDiscrepancy\": {\n        \"type\": \"object\",\n        \"properties\": {\n          \"inventoryId\": {\n            \"type\": \"integer\",\n            \"format\": \"int32\",\n            \"nullable\": true\n          },\n          \"packageId\": {\n            \"type\": \"string\",\n            \"nullable\": true\n          },\n          \"quantity\": {\n            \"type\": \"number\",\n            \"format\": \"double\"\n          },\n          \"roomId\": {\n            \"type\": \"integer\",\n            \"format\": \"int32\"\n          },\n          \"unitId\": {\n            \"type\": \"integer\",\n            \"format\": \"int32\"\n          },\n          \"externalQuantity\": {\n            \"type\": \"number\",\n            \"format\": \"double\"\n          },\n          \"externalUnitId\": {\n            \"type\": \"integer\",\n            \"format\": \"int32\"\n          },\n          \"equivalentExternalQuantity\": {\n            \"type\": \"number\",\n            \"format\": \"double\",\n            \"nullable\": true\n          },\n          \"difference\": {\n            \"type\": \"number\",\n            \"format\": \"double\",\n            \"readOnly\": true\n          },\n          \"productName\": {\n            \"type\": \"string\",\n            \"nullable\": true\n          },\n          \"room\": {\n            \"type\": \"string\",\n            \"nullable\": true\n          },\n          \"externalRoom\": {\n            \"type\": \"string\",\n            \"nullable\": true\n          },\n          \"batchModeQuantity\": {\n            \"type\": \"number\",\n            \"format\": \"double\",\n            \"nullable\": true\n          },\n          \"bioTrackCategoryName\": {\n            \"type\": \"string\",\n            \"nullable\": true\n          },\n          \"externalBioTrackCategoryName\": {\n            \"type\": \"string\",\n            \"nullable\": true\n          },\n          \"sku\": {\n            \"type\": \"string\",\n            \"nullable\": true\n          },\n          \"unitErrorMsg\": {\n            \"type\": \"string\",\n            \"nullable\": true\n          },\n          \"rooms\": {\n            \"type\": \"array\",\n            \"items\": {\n              \"type\": \"string\"\n            },\n            \"nullable\": true\n          },\n          \"serialNumber\": {\n            \"type\": \"string\",\n            \"nullable\": true\n          }\n        },\n        \"additionalProperties\": false\n      },\n      \"InventoryIntegrationReconResponse\": {\n        \"type\": \"object\",\n        \"properties\": {\n          \"lastUpdated\": {\n            \"type\": \"string\",\n            \"format\": \"date-time\",\n            \"nullable\": true\n          },\n          \"discrepancies\": {\n            \"type\": \"array\",\n            \"items\": {\n              \"$ref\": \"#/components/schemas/InventoryDiscrepancy\"\n            },\n            \"nullable\": true\n          }\n        },\n        \"additionalProperties\": false\n      },\n      \"InventoryItem\": {\n        \"type\": \"object\",\n        \"properties\": {\n          \"unitWeightUnit\": {\n            \"type\": \"string\",\n            \"description\": \"Unit of measurement for unit weight, always \\\"g\\\" (grams).\",\n            \"nullable\": true\n          },\n          \"inventoryId\": {\n            \"type\": \"integer\",\n            \"description\": \"Unique inventory record identifier for this specific inventory item.\",\n            \"format\": \"int32\"\n          },\n          \"productId\": {\n            \"type\": \"integer\",\n            \"description\": \"Product identifier linking this inventory to the product catalog.\",\n            \"format\": \"int32\"\n          },\n          \"sku\": {\n            \"type\": \"string\",\n            \"description\": \"Stock Keeping Unit (SKU) code for inventory tracking and identification.\",\n            \"nullable\": true\n          },\n          \"productName\": {\n            \"type\": \"string\",\n            \"description\": \"Display name of the product for customer-facing applications.\",\n            \"nullable\": true\n          },\n          \"description\": {\n            \"type\": \"string\",\n            \"description\": \"Detailed product description including effects, characteristics, and usage information.\",\n            \"nullable\": true\n          },\n          \"categoryId\": {\n            \"type\": \"integer\",\n            \"description\": \"Category identifier for product classification (optional).\",\n            \"format\": \"int32\",\n            \"nullable\": true\n          },\n          \"category\": {\n            \"type\": \"string\",\n            \"description\": \"Category name for product classification and filtering.\",\n            \"nullable\": true\n          },\n          \"imageUrl\": {\n            \"type\": \"string\",\n            \"description\": \"URL path to product image for display purposes.\",\n            \"nullable\": true\n          },\n          \"quantityAvailable\": {\n            \"type\": \"number\",\n            \"description\": \"Current available quantity for sale or transfer.\",\n            \"format\": \"double\"\n          },\n          \"quantityUnits\": {\n            \"type\": \"string\",\n            \"description\": \"Unit of measurement for the available quantity (e.g., \\\"g\\\", \\\"mg\\\", \\\"ea\\\").\",\n            \"nullable\": true\n          },\n          \"unitWeight\": {\n            \"type\": \"number\",\n            \"description\": \"Weight per unit in grams for dosing and compliance calculations.\",\n            \"format\": \"double\"\n          },\n          \"flowerEquivalent\": {\n            \"type\": \"number\",\n            \"description\": \"Flower equivalent amount in grams for compliance tracking.\",\n            \"format\": \"double\"\n          },\n          \"recFlowerEquivalent\": {\n            \"type\": \"number\",\n            \"description\": \"Recreational flower equivalent amount in grams (optional).\",\n            \"format\": \"double\",\n            \"nullable\": true\n          },\n          \"flowerEquivalentUnits\": {\n            \"type\": \"string\",\n            \"description\": \"Unit of measurement for flower equivalent, always \\\"g\\\" (grams).\",\n            \"nullable\": true,\n            \"readOnly\": true\n          },\n          \"batchId\": {\n            \"type\": \"integer\",\n            \"description\": \"Batch identifier for lot tracking and quality control.\",\n            \"format\": \"int32\"\n          },\n          \"batchName\": {\n            \"type\": \"string\",\n            \"description\": \"Human-readable batch name or lot number for tracking.\",\n            \"nullable\": true\n          },\n          \"packageId\": {\n            \"type\": \"string\",\n            \"description\": \"Package identifier for compliance tracking and traceability.\",\n            \"nullable\": true\n          },\n          \"packageStatus\": {\n            \"type\": \"string\",\n            \"description\": \"Current status of the package (e.g., \\\"Active\\\", \\\"Testing\\\", \\\"Quarantine\\\").\",\n            \"nullable\": true\n          },\n          \"unitPrice\": {\n            \"type\": \"number\",\n            \"description\": \"Base unit price for retail sales.\",\n            \"format\": \"double\"\n          },\n          \"medUnitPrice\": {\n            \"type\": \"number\",\n            \"description\": \"Medical program pricing (optional, different from retail).\",\n            \"format\": \"double\",\n            \"nullable\": true\n          },\n          \"recUnitPrice\": {\n            \"type\": \"number\",\n            \"description\": \"Recreational program pricing (optional, different from medical).\",\n            \"format\": \"double\",\n            \"nullable\": true\n          },\n          \"strainId\": {\n            \"type\": \"integer\",\n            \"description\": \"Strain identifier for cannabis products (optional).\",\n            \"format\": \"int32\",\n            \"nullable\": true\n          },\n          \"strain\": {\n            \"type\": \"string\",\n            \"description\": \"Strain name for cannabis products.\",\n            \"nullable\": true\n          },\n          \"strainType\": {\n            \"type\": \"string\",\n            \"description\": \"Cannabis strain classification (Hybrid, Indica, Sativa, CBD).\",\n            \"nullable\": true\n          },\n          \"size\": {\n            \"type\": \"string\",\n            \"description\": \"Product size designation for packaging and dosing information.\",\n            \"nullable\": true\n          },\n          \"labResults\": {\n            \"type\": \"array\",\n            \"items\": {\n              \"$ref\": \"#/components/schemas/LabResult\"\n            },\n            \"description\": \"Collection of laboratory test results for this batch (included when includeLabResults=true).\",\n            \"nullable\": true\n          },\n          \"testedDate\": {\n            \"type\": \"string\",\n            \"description\": \"Date when laboratory testing was completed (optional).\",\n            \"format\": \"date-time\",\n            \"nullable\": true\n          },\n          \"sampleDate\": {\n            \"type\": \"string\",\n            \"description\": \"Date when sample was collected for laboratory testing (optional).\",\n            \"format\": \"date-time\",\n            \"nullable\": true\n          },\n          \"packagedDate\": {\n            \"type\": \"string\",\n            \"description\": \"Date when product was packaged for distribution (optional).\",\n            \"format\": \"date-time\",\n            \"nullable\": true\n          },\n          \"manufacturingDate\": {\n            \"type\": \"string\",\n            \"description\": \"Date when product was manufactured or produced (optional).\",\n            \"format\": \"date-time\",\n            \"nullable\": true\n          },\n          \"lastModifiedDateUtc\": {\n            \"type\": \"string\",\n            \"description\": \"Last modification timestamp in UTC for data synchronization.\",\n            \"format\": \"date-time\",\n            \"nullable\": true\n          },\n          \"labTestStatus\": {\n            \"type\": \"string\",\n            \"description\": \"Current status of laboratory testing (e.g., \\\"Passed\\\", \\\"Failed\\\", \\\"Pending\\\").\",\n            \"nullable\": true\n          },\n          \"vendorId\": {\n            \"type\": \"integer\",\n            \"description\": \"Vendor identifier for the supplier of this inventory (optional).\",\n            \"format\": \"int32\",\n            \"nullable\": true\n          },\n          \"vendor\": {\n            \"type\": \"string\",\n            \"description\": \"Vendor name for the supplier of this inventory.\",\n            \"nullable\": true\n          },\n          \"expirationDate\": {\n            \"type\": \"string\",\n            \"description\": \"Product expiration date for compliance and quality control (optional).\",\n            \"format\": \"date-time\",\n            \"nullable\": true\n          },\n          \"roomQuantities\": {\n            \"type\": \"array\",\n            \"items\": {\n              \"$ref\": \"#/components/schemas/InventoryRoomQuantity\"\n            },\n            \"description\": \"Quantity breakdown by storage room/location (included when includeRoomQuantities=true).\",\n            \"nullable\": true\n          },\n          \"pricingTierName\": {\n            \"type\": \"string\",\n            \"description\": \"Pricing tier classification for bulk pricing strategies.\",\n            \"nullable\": true\n          },\n          \"alternateName\": {\n            \"type\": \"string\",\n            \"description\": \"Alternative product name for display purposes.\",\n            \"nullable\": true\n          },\n          \"tags\": {\n            \"type\": \"array\",\n            \"items\": {\n              \"$ref\": \"#/components/schemas/InventoryTag\"\n            },\n            \"description\": \"Collection of compliance tags associated with this inventory package.\",\n            \"nullable\": true\n          },\n          \"brandId\": {\n            \"type\": \"integer\",\n            \"description\": \"Brand identifier for branded products (optional).\",\n            \"format\": \"int32\",\n            \"nullable\": true\n          },\n          \"brandName\": {\n            \"type\": \"string\",\n            \"description\": \"Brand name for branded products.\",\n            \"nullable\": true\n          },\n          \"medicalOnly\": {\n            \"type\": \"boolean\",\n            \"description\": \"Indicates if product is restricted to medical program only.\"\n          },\n          \"externalPackageId\": {\n            \"type\": \"string\",\n            \"description\": \"External compliance system ID (METRC or BioTrack) for regulatory tracking.\",\n            \"nullable\": true\n          },\n          \"producer\": {\n            \"type\": \"string\",\n            \"description\": \"Producer name for cultivation and manufacturing tracking.\",\n            \"nullable\": true\n          },\n          \"producerId\": {\n            \"type\": \"integer\",\n            \"description\": \"Producer identifier for cultivation and manufacturing tracking (optional).\",\n            \"format\": \"int32\",\n            \"nullable\": true\n          },\n          \"lineage\": {\n            \"type\": \"array\",\n            \"items\": {\n              \"$ref\": \"#/components/schemas/PackageLineage\"\n            },\n            \"description\": \"Package lineage information for traceability and compliance tracking.\",\n            \"nullable\": true\n          },\n          \"potencyIndicator\": {\n            \"type\": \"string\",\n            \"description\": \"Potency classification indicator for dosing guidance.\",\n            \"nullable\": true\n          },\n          \"masterCategory\": {\n            \"type\": \"string\",\n            \"description\": \"Master category classification for product grouping.\",\n            \"nullable\": true\n          },\n          \"effectivePotencyMg\": {\n            \"type\": \"number\",\n            \"description\": \"Effective potency in milligrams for dosing calculations (optional).\",\n            \"format\": \"double\",\n            \"nullable\": true\n          },\n          \"isCannabis\": {\n            \"type\": \"boolean\",\n            \"description\": \"Indicates if product contains cannabis or is cannabis-related.\"\n          },\n          \"packageNDC\": {\n            \"type\": \"string\",\n            \"description\": \"National Drug Code for pharmaceutical tracking (optional).\",\n            \"nullable\": true\n          },\n          \"labResultUrl\": {\n            \"type\": \"string\",\n            \"description\": \"URL to certificate of analysis or lab testing document.\",\n            \"nullable\": true\n          }\n        },\n        \"additionalProperties\": false,\n        \"description\": \"Inventory item model representing current stock and product details for available inventory.\"\n      },\n      \"InventoryRoomQuantity\": {\n        \"type\": \"object\",\n        \"properties\": {\n          \"roomId\": {\n            \"type\": \"integer\",\n            \"description\": \"Room identifier for the storage location.\",\n            \"format\": \"int32\"\n          },\n          \"room\": {\n            \"type\": \"string\",\n            \"description\": \"Room name or description for the storage location.\",\n            \"nullable\": true\n          },\n          \"quantityAvailable\": {\n            \"type\": \"number\",\n            \"description\": \"Quantity of cannabis product available in this specific room location.\",\n            \"format\": \"double\"\n          }\n        },\n        \"additionalProperties\": false,\n        \"description\": \"Cannabis inventory quantity tracking model by room location for facility management and compliance.\"\n      },\n      \"InventorySnapshot\": {\n        \"required\": [\n          \"inventoryId\",\n          \"packageId\",\n          \"product\",\n          \"productId\",\n          \"quantity\",\n          \"room\",\n          \"roomId\",\n          \"sku\",\n          \"snapshotDate\",\n          \"unit\",\n          \"unitId\"\n        ],\n        \"type\": \"object\",\n        \"properties\": {\n          \"sku\": {\n            \"minLength\": 1,\n            \"type\": \"string\",\n            \"description\": \"Stock Keeping Unit (SKU) code for product identification.\"\n          },\n          \"product\": {\n            \"minLength\": 1,\n            \"type\": \"string\",\n            \"description\": \"Product name as it existed at the snapshot date.\"\n          },\n          \"productId\": {\n            \"type\": \"integer\",\n            \"description\": \"Product identifier linking to the product catalog.\",\n            \"format\": \"int32\"\n          },\n          \"room\": {\n            \"minLength\": 1,\n            \"type\": \"string\",\n            \"description\": \"Storage room name where inventory was located at snapshot time.\"\n          },\n          \"roomId\": {\n            \"type\": \"integer\",\n            \"description\": \"Storage room identifier for location tracking.\",\n            \"format\": \"int32\"\n          },\n          \"vendor\": {\n            \"type\": \"string\",\n            \"description\": \"Vendor name for the supplier of this inventory (optional).\",\n            \"nullable\": true\n          },\n          \"packageId\": {\n            \"minLength\": 1,\n            \"type\": \"string\",\n            \"description\": \"Package identifier for compliance tracking and traceability.\"\n          },\n          \"batchName\": {\n            \"type\": \"string\",\n            \"description\": \"Batch name or lot number for quality tracking (optional).\",\n            \"nullable\": true\n          },\n          \"batchId\": {\n            \"type\": \"integer\",\n            \"description\": \"Batch identifier for lot tracking (optional).\",\n            \"format\": \"int32\",\n            \"nullable\": true\n          },\n          \"quantity\": {\n            \"type\": \"number\",\n            \"description\": \"Inventory quantity as it existed at the snapshot date.\",\n            \"format\": \"double\"\n          },\n          \"totalCost\": {\n            \"type\": \"number\",\n            \"description\": \"Total cost value of the inventory quantity (optional).\",\n            \"format\": \"double\",\n            \"nullable\": true\n          },\n          \"unit\": {\n            \"minLength\": 1,\n            \"type\": \"string\",\n            \"description\": \"Unit of measurement for the quantity.\"\n          },\n          \"unitId\": {\n            \"type\": \"integer\",\n            \"description\": \"Unit identifier for the measurement type.\",\n            \"format\": \"int32\"\n          },\n          \"status\": {\n            \"type\": \"string\",\n            \"description\": \"Inventory status at the time of snapshot (e.g., \\\"Active\\\", \\\"Quarantine\\\").\",\n            \"nullable\": true\n          },\n          \"snapshotDate\": {\n            \"type\": \"string\",\n            \"description\": \"Date and time when this inventory snapshot was captured.\",\n            \"format\": \"date-time\"\n          },\n          \"inventoryId\": {\n            \"type\": \"integer\",\n            \"description\": \"Inventory record identifier linking to the specific inventory item.\",\n            \"format\": \"int32\"\n          }\n        },\n        \"additionalProperties\": false,\n        \"description\": \"Historical inventory snapshot model representing inventory levels at a specific point in time.\"\n      },\n      \"InventoryTag\": {\n        \"type\": \"object\",\n        \"properties\": {\n          \"tagId\": {\n            \"type\": \"integer\",\n            \"format\": \"int32\"\n          },\n          \"tagName\": {\n            \"type\": \"string\",\n            \"nullable\": true\n          },\n          \"packageId\": {\n            \"type\": \"string\",\n            \"nullable\": true\n          }\n        },\n        \"additionalProperties\": false\n      },\n      \"InventoryTransaction\": {\n        \"required\": [\"inventoryTransactionId\"],\n        \"type\": \"object\",\n        \"properties\": {\n          \"inventoryTransactionId\": {\n            \"type\": \"integer\",\n            \"description\": \"Unique identifier for the inventory transaction record.\",\n            \"format\": \"int32\"\n          },\n          \"transactionType\": {\n            \"type\": \"string\",\n            \"description\": \"Type of inventory transaction performed.\\n**Options**: Move, Convert, Adjust, Combine, Receive, Change Product, Discontinue, Detail Update, Reconciliation, Create Package\",\n            \"nullable\": true\n          },\n          \"product\": {\n            \"type\": \"string\",\n            \"description\": \"Product name at the time of transaction.\",\n            \"nullable\": true\n          },\n          \"sku\": {\n            \"type\": \"string\",\n            \"description\": \"Stock Keeping Unit (SKU) code for the product.\",\n            \"nullable\": true\n          },\n          \"productId\": {\n            \"type\": \"integer\",\n            \"description\": \"Product identifier linking to the product catalog.\",\n            \"format\": \"int32\"\n          },\n          \"unit\": {\n            \"type\": \"string\",\n            \"description\": \"Unit of measurement for the transaction quantities.\",\n            \"nullable\": true\n          },\n          \"packageId\": {\n            \"type\": \"string\",\n            \"description\": \"Package identifier for compliance tracking and traceability.\",\n            \"nullable\": true\n          },\n          \"externalPackageId\": {\n            \"type\": \"string\",\n            \"description\": \"External package identifier from integrated compliance systems.\",\n            \"nullable\": true\n          },\n          \"batchId\": {\n            \"type\": \"integer\",\n            \"description\": \"Batch identifier for lot tracking (optional).\",\n            \"format\": \"int32\",\n            \"nullable\": true\n          },\n          \"batchName\": {\n            \"type\": \"string\",\n            \"description\": \"Batch name or lot number for quality tracking (optional).\",\n            \"nullable\": true\n          },\n          \"quantity\": {\n            \"type\": \"number\",\n            \"description\": \"Transaction quantity for non-adjustment operations (Move, Convert, Receive, etc.).\",\n            \"format\": \"double\",\n            \"nullable\": true\n          },\n          \"fromQuantity\": {\n            \"type\": \"number\",\n            \"description\": \"Original quantity before adjustment (used for Adjust transaction type).\",\n            \"format\": \"double\",\n            \"nullable\": true\n          },\n          \"toQuantity\": {\n            \"type\": \"number\",\n            \"description\": \"New quantity after adjustment (used for Adjust transaction type).\",\n            \"format\": \"double\",\n            \"nullable\": true\n          },\n          \"reason\": {\n            \"type\": \"string\",\n            \"description\": \"Reason for adjustment (used for Adjust transaction type).\",\n            \"nullable\": true\n          },\n          \"receiveInventoryHistoryId\": {\n            \"type\": \"integer\",\n            \"description\": \"Receive inventory history identifier for received inventory linkage (optional).\",\n            \"format\": \"int32\",\n            \"nullable\": true\n          },\n          \"fromLocation\": {\n            \"type\": \"string\",\n            \"description\": \"Source location name for Move transactions.\",\n            \"nullable\": true\n          },\n          \"fromRoom\": {\n            \"type\": \"string\",\n            \"description\": \"Source room name for Move transactions.\",\n            \"nullable\": true\n          },\n          \"toLocation\": {\n            \"type\": \"string\",\n            \"description\": \"Destination location name for Move transactions.\",\n            \"nullable\": true\n          },\n          \"toRoom\": {\n            \"type\": \"string\",\n            \"description\": \"Destination room name for Move transactions.\",\n            \"nullable\": true\n          },\n          \"conversionTransactionID\": {\n            \"type\": \"integer\",\n            \"description\": \"Conversion transaction identifier for Convert operations (optional).\",\n            \"format\": \"int32\",\n            \"nullable\": true\n          },\n          \"transactionBy\": {\n            \"type\": \"string\",\n            \"description\": \"Username or identifier of the person who performed the transaction.\",\n            \"nullable\": true\n          },\n          \"transactionDate\": {\n            \"type\": \"string\",\n            \"description\": \"Date and time when the transaction was performed.\",\n            \"format\": \"date-time\"\n          },\n          \"unitCost\": {\n            \"type\": \"number\",\n            \"description\": \"Unit cost of the package at the time of transaction (optional).\",\n            \"format\": \"double\",\n            \"nullable\": true\n          },\n          \"purchaseOrderId\": {\n            \"type\": \"integer\",\n            \"description\": \"Purchase order identifier for received inventory linkage (optional).\",\n            \"format\": \"int32\",\n            \"nullable\": true\n          },\n          \"inventoryId\": {\n            \"type\": \"integer\",\n            \"description\": \"Unique inventory item identifier affected by this transaction.\",\n            \"format\": \"int32\"\n          }\n        },\n        \"additionalProperties\": false,\n        \"description\": \"Inventory transaction record model representing historical inventory movement and modification operations.\"\n      },\n      \"JournalEntry\": {\n        \"type\": \"object\",\n        \"properties\": {\n          \"journalEntryId\": {\n            \"type\": \"integer\",\n            \"description\": \"Unique identifier for the journal entry.\",\n            \"format\": \"int32\"\n          },\n          \"subject\": {\n            \"type\": \"string\",\n            \"description\": \"Brief title or summary of the journal entry.\",\n            \"nullable\": true\n          },\n          \"body\": {\n            \"type\": \"string\",\n            \"description\": \"Detailed content and notes for the journal entry.\",\n            \"nullable\": true\n          },\n          \"date\": {\n            \"type\": \"string\",\n            \"description\": \"Date and time when the journal entry was created or should be dated.\",\n            \"format\": \"date-time\"\n          }\n        },\n        \"additionalProperties\": false,\n        \"description\": \"Represents a customer journal entry containing notes and interaction history for customer service tracking.\"\n      },\n      \"LabResult\": {\n        \"type\": \"object\",\n        \"properties\": {\n          \"labTest\": {\n            \"type\": \"string\",\n            \"description\": \"Name of the laboratory test performed (e.g., \\\"THC\\\", \\\"CBD\\\", \\\"Myrcene\\\", \\\"Total Aerobic Count\\\").\",\n            \"nullable\": true\n          },\n          \"value\": {\n            \"type\": \"number\",\n            \"description\": \"Numeric test result value (null if not detected or not applicable).\",\n            \"format\": \"double\",\n            \"nullable\": true\n          },\n          \"labResultUnitId\": {\n            \"$ref\": \"#/components/schemas/LabResultUnit\"\n          },\n          \"labResultUnit\": {\n            \"type\": \"string\",\n            \"description\": \"Human-readable unit name corresponding to the LabResultUnitId.\",\n            \"nullable\": true,\n            \"readOnly\": true\n          }\n        },\n        \"additionalProperties\": false,\n        \"description\": \"Laboratory testing result model for cannabis and cannabis product analysis.\"\n      },\n      \"LabResultUnit\": {\n        \"enum\": [1, 2, 3, 4, 5, 6],\n        \"type\": \"integer\",\n        \"format\": \"int32\"\n      },\n      \"LabResultUnitData\": {\n        \"type\": \"object\",\n        \"properties\": {\n          \"labResultUnitId\": {\n            \"type\": \"integer\",\n            \"description\": \"Unique identifier for the lab result unit type.\",\n            \"format\": \"int32\"\n          },\n          \"labResultUnit\": {\n            \"type\": \"string\",\n            \"description\": \"Display name of the lab result unit (e.g., \\\"mg\\\", \\\"%\\\", \\\"mg/g\\\", \\\"ND\\\", \\\"LOQ\\\", \\\"Pass/Fail\\\").\",\n            \"nullable\": true\n          }\n        },\n        \"additionalProperties\": false,\n        \"description\": \"Laboratory result unit data model for cannabis testing measurements and reporting.\"\n      },\n      \"LineItemTaxInfo\": {\n        \"type\": \"object\",\n        \"properties\": {\n          \"rateName\": {\n            \"type\": \"string\",\n            \"description\": \"Name of the tax rate applied (e.g., \\\"State Excise Tax\\\", \\\"City Cannabis Tax\\\", \\\"Sales Tax\\\").\",\n            \"nullable\": true\n          },\n          \"rate\": {\n            \"type\": \"number\",\n            \"description\": \"Tax rate as a decimal percentage (e.g., 0.0875 for 8.75% tax rate).\",\n            \"format\": \"double\"\n          },\n          \"amount\": {\n            \"type\": \"number\",\n            \"description\": \"Calculated tax amount applied to the line item (in USD).\",\n            \"format\": \"double\"\n          },\n          \"transactionItemId\": {\n            \"type\": \"integer\",\n            \"description\": \"Reference identifier linking this tax information back to the specific transaction line item.\\nNot guaranteed to be unique outside of a single transaction.\",\n            \"format\": \"int32\",\n            \"readOnly\": true\n          }\n        },\n        \"additionalProperties\": false,\n        \"description\": \"Tax information applied to individual transaction line items in cannabis retail operations.\"\n      },\n      \"Lineage\": {\n        \"type\": \"object\",\n        \"properties\": {\n          \"lineageId\": {\n            \"type\": \"integer\",\n            \"description\": \"Unique identifier for the genetic lineage.\",\n            \"format\": \"int32\"\n          },\n          \"lineageName\": {\n            \"type\": \"string\",\n            \"description\": \"Display name for the genetic lineage (e.g., \\\"Indica\\\", \\\"Sativa\\\", \\\"Hybrid\\\").\",\n            \"nullable\": true\n          }\n        },\n        \"additionalProperties\": false,\n        \"description\": \"Cannabis genetic lineage model containing hereditary classification information for product categorization and genetic tracking.\"\n      },\n      \"LocationIdentity\": {\n        \"type\": \"object\",\n        \"properties\": {\n          \"locationId\": {\n            \"type\": \"integer\",\n            \"description\": \"Unique identifier for the cannabis dispensary location.\",\n            \"format\": \"int32\"\n          },\n          \"lspId\": {\n            \"type\": \"integer\",\n            \"description\": \"Unique identifier for the parent company (LSP - Licensed Service Provider).\",\n            \"format\": \"int32\"\n          },\n          \"locationName\": {\n            \"type\": \"string\",\n            \"description\": \"Business name of the cannabis dispensary location.\",\n            \"nullable\": true\n          },\n          \"lspName\": {\n            \"type\": \"string\",\n            \"description\": \"Company name of the parent organization (Licensed Service Provider).\",\n            \"nullable\": true\n          },\n          \"address\": {\n            \"type\": \"string\",\n            \"description\": \"Primary street address of the dispensary location.\",\n            \"nullable\": true\n          },\n          \"address2\": {\n            \"type\": \"string\",\n            \"description\": \"Secondary address line (suite, unit, etc.) if applicable.\",\n            \"nullable\": true\n          },\n          \"city\": {\n            \"type\": \"string\",\n            \"description\": \"City where the dispensary is located.\",\n            \"nullable\": true\n          },\n          \"state\": {\n            \"type\": \"string\",\n            \"description\": \"State or province where the dispensary is licensed to operate.\",\n            \"nullable\": true\n          },\n          \"postalCode\": {\n            \"type\": \"string\",\n            \"description\": \"Postal code (ZIP code) for the dispensary location.\",\n            \"nullable\": true\n          },\n          \"licenseNumber\": {\n            \"type\": \"string\",\n            \"description\": \"State-issued cannabis business license number for regulatory compliance.\",\n            \"nullable\": true\n          },\n          \"doingBusinessAs\": {\n            \"type\": \"string\",\n            \"description\": \"\\\"Doing Business As\\\" name if different from the legal business name.\",\n            \"nullable\": true\n          },\n          \"shareCustomerProfiles\": {\n            \"type\": \"boolean\",\n            \"description\": \"Indicates whether customer profiles are shared across locations within the organization.\"\n          },\n          \"globalId\": {\n            \"type\": \"string\",\n            \"description\": \"Legacy global unique identifier for the location (deprecated).\",\n            \"format\": \"uuid\",\n            \"nullable\": true,\n            \"deprecated\": true\n          },\n          \"locationGlobalId\": {\n            \"type\": \"string\",\n            \"description\": \"Global unique identifier for the location across all systems and integrations.\",\n            \"format\": \"uuid\",\n            \"nullable\": true\n          },\n          \"lspGlobalId\": {\n            \"type\": \"string\",\n            \"description\": \"Global unique identifier for the parent company (LSP) across all systems.\",\n            \"format\": \"uuid\",\n            \"nullable\": true\n          },\n          \"region\": {\n            \"type\": \"string\",\n            \"description\": \"Regional identifier for compliance and API routing (internal use only).\",\n            \"nullable\": true\n          },\n          \"regionId\": {\n            \"type\": \"string\",\n            \"description\": \"Base64-encoded SHA256 hash of the region identifier for secure regional routing.\",\n            \"nullable\": true,\n            \"readOnly\": true\n          }\n        },\n        \"additionalProperties\": false,\n        \"description\": \"Location identity model containing complete location and parent company information for API key verification and context identification.\"\n      },\n      \"LocationMapping\": {\n        \"type\": \"object\",\n        \"properties\": {\n          \"locationName\": {\n            \"type\": \"string\",\n            \"description\": \"Name of the location where the discount applies.\",\n            \"nullable\": true\n          }\n        },\n        \"additionalProperties\": false,\n        \"description\": \"Location mapping model for associating discounts with specific business locations.\"\n      },\n      \"LocationProductOverride\": {\n        \"type\": \"object\",\n        \"properties\": {\n          \"productId\": {\n            \"type\": \"integer\",\n            \"format\": \"int32\"\n          },\n          \"price\": {\n            \"type\": \"number\",\n            \"format\": \"double\",\n            \"nullable\": true\n          },\n          \"recPrice\": {\n            \"type\": \"number\",\n            \"format\": \"double\",\n            \"nullable\": true\n          },\n          \"cost\": {\n            \"type\": \"number\",\n            \"format\": \"double\",\n            \"nullable\": true\n          },\n          \"onlineAvailable\": {\n            \"type\": \"boolean\",\n            \"nullable\": true\n          },\n          \"posAvailable\": {\n            \"type\": \"boolean\",\n            \"nullable\": true\n          },\n          \"maxPurchasable\": {\n            \"type\": \"number\",\n            \"format\": \"double\",\n            \"nullable\": true\n          },\n          \"lowInventoryThreshold\": {\n            \"type\": \"number\",\n            \"format\": \"double\",\n            \"nullable\": true\n          },\n          \"customMetadata\": {\n            \"type\": \"string\",\n            \"nullable\": true\n          }\n        },\n        \"additionalProperties\": false\n      },\n      \"LocationProductOverrideRequest\": {\n        \"type\": \"object\",\n        \"properties\": {\n          \"productId\": {\n            \"type\": \"integer\",\n            \"description\": \"Product identifier for the product being configured with location-specific overrides.\",\n            \"format\": \"int32\"\n          },\n          \"price\": {\n            \"$ref\": \"#/components/schemas/DecimalNullableOptional\"\n          },\n          \"recPrice\": {\n            \"$ref\": \"#/components/schemas/DecimalNullableOptional\"\n          },\n          \"cost\": {\n            \"$ref\": \"#/components/schemas/DecimalNullableOptional\"\n          },\n          \"onlineAvailable\": {\n            \"$ref\": \"#/components/schemas/BooleanNullableOptional\"\n          },\n          \"posAvailable\": {\n            \"$ref\": \"#/components/schemas/BooleanNullableOptional\"\n          },\n          \"maxPurchasable\": {\n            \"$ref\": \"#/components/schemas/DecimalNullableOptional\"\n          },\n          \"lowInventoryThreshold\": {\n            \"$ref\": \"#/components/schemas/DecimalNullableOptional\"\n          },\n          \"customMetadata\": {\n            \"$ref\": \"#/components/schemas/StringOptional\"\n          }\n        },\n        \"additionalProperties\": false\n      },\n      \"LocationResponse\": {\n        \"type\": \"object\",\n        \"properties\": {\n          \"locationName\": {\n            \"type\": \"string\",\n            \"nullable\": true\n          },\n          \"locId\": {\n            \"type\": \"integer\",\n            \"format\": \"int32\"\n          },\n          \"licenseNumber\": {\n            \"type\": \"string\",\n            \"nullable\": true\n          },\n          \"outcome\": {\n            \"type\": \"string\",\n            \"nullable\": true,\n            \"readOnly\": true\n          },\n          \"outcomeId\": {\n            \"type\": \"integer\",\n            \"format\": \"int32\",\n            \"readOnly\": true\n          },\n          \"broadcastedTo\": {\n            \"type\": \"string\",\n            \"nullable\": true\n          },\n          \"errorDetail\": {\n            \"type\": \"string\",\n            \"nullable\": true\n          }\n        },\n        \"additionalProperties\": false\n      },\n      \"LoyaltySnapshot\": {\n        \"type\": \"object\",\n        \"properties\": {\n          \"customerId\": {\n            \"type\": \"integer\",\n            \"description\": \"Unique identifier for the customer in the loyalty program.\\nLinks this loyalty snapshot to the specific customer account.\",\n            \"format\": \"int32\"\n          },\n          \"loyaltyBalance\": {\n            \"type\": \"number\",\n            \"description\": \"Current available loyalty points balance for the customer.\\nRepresents points that can be redeemed for rewards or discounts.\",\n            \"format\": \"double\"\n          },\n          \"loyaltySpent\": {\n            \"type\": \"number\",\n            \"description\": \"Total loyalty points redeemed/spent by the customer over their lifetime.\\nHistorical record of all point redemptions and rewards claimed.\",\n            \"format\": \"double\"\n          },\n          \"loyaltyEarned\": {\n            \"type\": \"number\",\n            \"description\": \"Total loyalty points earned by the customer over their lifetime.\\nHistorical record of all points awarded through purchases and activities.\",\n            \"format\": \"double\"\n          }\n        },\n        \"additionalProperties\": false,\n        \"description\": \"Represents a customer's loyalty program balance and activity snapshot for reporting purposes.\\n\\nContains current point balances and historical activity for individual customers within the\\nloyalty program. Used for daily balance reporting, customer service inquiries, and loyalty\\nprogram analytics. Data reflects nightly batch processing and may not include real-time changes.\"\n      },\n      \"ManualPayment\": {\n        \"type\": \"object\",\n        \"properties\": {\n          \"manualPaymentProcessorName\": {\n            \"type\": \"string\",\n            \"description\": \"Name of the manual payment processor or handling method (e.g., \\\"Cash\\\", \\\"Check\\\", \\\"Money Order\\\").\",\n            \"nullable\": true\n          },\n          \"manualPaid\": {\n            \"type\": \"number\",\n            \"description\": \"Amount paid through the manual payment method (in USD).\",\n            \"format\": \"double\"\n          }\n        },\n        \"additionalProperties\": false,\n        \"description\": \"Manual payment information for cannabis transactions processed outside integrated payment systems.\"\n      },\n      \"MatureBatchDetails\": {\n        \"type\": \"object\",\n        \"properties\": {\n          \"batchId\": {\n            \"type\": \"integer\",\n            \"description\": \"Batch identifier for the mature plant batch being created.\",\n            \"format\": \"int32\"\n          },\n          \"serialNumbers\": {\n            \"type\": \"array\",\n            \"items\": {\n              \"type\": \"string\"\n            },\n            \"description\": \"Collection of individual plant serial numbers within the mature batch for state tracking compliance.\",\n            \"nullable\": true\n          },\n          \"batchStage\": {\n            \"type\": \"string\",\n            \"description\": \"Growth stage designation for the mature batch (e.g., \\\"Vegetative\\\", \\\"Flowering\\\").\",\n            \"nullable\": true\n          },\n          \"roomId\": {\n            \"type\": \"integer\",\n            \"description\": \"Room identifier for the mature batch location assignment.\",\n            \"format\": \"int32\"\n          },\n          \"tableId\": {\n            \"type\": \"integer\",\n            \"description\": \"Table identifier within the room for precise location tracking (optional).\",\n            \"format\": \"int32\",\n            \"nullable\": true\n          },\n          \"dateCreated\": {\n            \"type\": \"string\",\n            \"description\": \"Date when the mature batch was created for cultivation timeline documentation.\",\n            \"format\": \"date-time\",\n            \"nullable\": true\n          }\n        },\n        \"additionalProperties\": false,\n        \"description\": \"Detailed specification for creating individual mature plant batches with compliance tracking information.\"\n      },\n      \"MovePlantRequest\": {\n        \"type\": \"object\",\n        \"properties\": {\n          \"plantIds\": {\n            \"type\": \"array\",\n            \"items\": {\n              \"type\": \"integer\",\n              \"format\": \"int32\"\n            },\n            \"description\": \"Collection of LeafLogix plant IDs to move to the target room\",\n            \"nullable\": true\n          },\n          \"roomId\": {\n            \"type\": \"integer\",\n            \"description\": \"Target cultivation room ID within the same facility where plants will be moved\",\n            \"format\": \"int32\"\n          },\n          \"tableId\": {\n            \"type\": \"integer\",\n            \"description\": \"Optional table ID within the target room for precise plant positioning (optional)\",\n            \"format\": \"int32\",\n            \"nullable\": true\n          }\n        },\n        \"additionalProperties\": false,\n        \"description\": \"Request model for moving cannabis plants to a different cultivation room or table within the same facility.\\n\\n**Movement Behavior:**\\n- Moves specified plants to target room within same facility\\n- Optional table assignment for precise cultivation area management\\n- Validates target room belongs to same facility for security\\n- Automatically updates plant cultivation stage if room has associated stage\\n\\n**Facility Restrictions:**\\n- Target room must belong to same facility as requesting user\\n- Cross-facility plant movements are prohibited for security and compliance\\n- All plant IDs must be accessible to the authenticated location\\n\\n**Integration:**\\n- Movement synchronized with external cultivation systems when configured\\n- Supports cultivation workflow automation and environmental optimization\"\n      },\n      \"ObjectWaste\": {\n        \"type\": \"object\",\n        \"properties\": {\n          \"wasteId\": {\n            \"type\": \"integer\",\n            \"description\": \"Unique identifier for the waste record (null for new waste creation).\",\n            \"format\": \"int32\",\n            \"nullable\": true\n          },\n          \"referenceNo\": {\n            \"type\": \"string\",\n            \"description\": \"Reference number for waste tracking and documentation.\",\n            \"nullable\": true\n          },\n          \"comments\": {\n            \"type\": \"string\",\n            \"description\": \"Additional comments or notes about the waste disposal.\",\n            \"nullable\": true\n          },\n          \"wasteDate\": {\n            \"type\": \"string\",\n            \"description\": \"Date when the waste disposal occurred.\",\n            \"format\": \"date-time\",\n            \"nullable\": true\n          },\n          \"wasteDetail\": {\n            \"type\": \"array\",\n            \"items\": {\n              \"type\": \"object\"\n            },\n            \"description\": \"Collection of waste detail records containing specific item information.\",\n            \"nullable\": true\n          },\n          \"lspId\": {\n            \"type\": \"integer\",\n            \"description\": \"Licensed Service Provider identifier (internal use only).\",\n            \"format\": \"int32\",\n            \"nullable\": true\n          },\n          \"locId\": {\n            \"type\": \"integer\",\n            \"description\": \"Location identifier (internal use only).\",\n            \"format\": \"int32\",\n            \"nullable\": true\n          },\n          \"roomRequired\": {\n            \"type\": \"boolean\",\n            \"description\": \"Indicates if room identification is required for this waste type (internal use only).\",\n            \"nullable\": true\n          },\n          \"isBioTrack\": {\n            \"type\": \"boolean\",\n            \"description\": \"Indicates if this waste integrates with BioTrack system (internal use only).\",\n            \"nullable\": true\n          }\n        },\n        \"additionalProperties\": false,\n        \"description\": \"Generic waste record model containing waste disposal information and associated detail records for cannabis compliance and waste tracking.\"\n      },\n      \"PackageLineage\": {\n        \"type\": \"object\",\n        \"properties\": {\n          \"packageId\": {\n            \"type\": \"string\",\n            \"description\": \"Package identifier for the current package in the lineage chain.\",\n            \"nullable\": true\n          },\n          \"antecedentPackageDistance\": {\n            \"type\": \"integer\",\n            \"description\": \"Number of generations between current package and antecedent package in the lineage chain.\",\n            \"format\": \"int32\"\n          },\n          \"antecedentIsHarvest\": {\n            \"type\": \"boolean\",\n            \"description\": \"Flag indicating whether the antecedent package originated from a harvest operation.\"\n          },\n          \"batchName\": {\n            \"type\": \"string\",\n            \"description\": \"Batch name for the current package for lot tracking and quality control.\",\n            \"nullable\": true\n          },\n          \"antecedentBatchName\": {\n            \"type\": \"string\",\n            \"description\": \"Batch name of the antecedent package for lineage and quality tracking.\",\n            \"nullable\": true\n          }\n        },\n        \"additionalProperties\": false,\n        \"description\": \"Package lineage tracking model for cannabis product traceability and regulatory compliance.\"\n      },\n      \"Plant\": {\n        \"type\": \"object\",\n        \"properties\": {\n          \"plantId\": {\n            \"type\": \"integer\",\n            \"format\": \"int32\"\n          },\n          \"serialNumber\": {\n            \"type\": \"string\",\n            \"nullable\": true\n          },\n          \"growthPhase\": {\n            \"type\": \"string\",\n            \"nullable\": true\n          },\n          \"type\": {\n            \"type\": \"string\",\n            \"nullable\": true\n          },\n          \"harvestedWeight\": {\n            \"type\": \"number\",\n            \"format\": \"double\",\n            \"nullable\": true\n          },\n          \"status\": {\n            \"type\": \"string\",\n            \"nullable\": true\n          },\n          \"plantCount\": {\n            \"type\": \"integer\",\n            \"format\": \"int32\",\n            \"nullable\": true\n          },\n          \"isMother\": {\n            \"type\": \"boolean\"\n          },\n          \"motherPlantId\": {\n            \"type\": \"integer\",\n            \"format\": \"int32\",\n            \"nullable\": true\n          },\n          \"plantedOn\": {\n            \"type\": \"string\",\n            \"format\": \"date-time\",\n            \"nullable\": true\n          },\n          \"addedToHarvestOn\": {\n            \"type\": \"string\",\n            \"format\": \"date-time\",\n            \"nullable\": true\n          },\n          \"harvestDate\": {\n            \"type\": \"string\",\n            \"format\": \"date-time\",\n            \"nullable\": true\n          },\n          \"destroyedDate\": {\n            \"type\": \"string\",\n            \"format\": \"date-time\",\n            \"nullable\": true\n          },\n          \"plantGroupName\": {\n            \"type\": \"string\",\n            \"nullable\": true\n          },\n          \"strain\": {\n            \"type\": \"string\",\n            \"nullable\": true\n          },\n          \"room\": {\n            \"type\": \"string\",\n            \"nullable\": true\n          },\n          \"table\": {\n            \"type\": \"string\",\n            \"nullable\": true\n          },\n          \"vegetationStartedOn\": {\n            \"type\": \"string\",\n            \"format\": \"date-time\",\n            \"nullable\": true\n          },\n          \"vegetationEndedOn\": {\n            \"type\": \"string\",\n            \"format\": \"date-time\",\n            \"nullable\": true\n          },\n          \"floweringStartedOn\": {\n            \"type\": \"string\",\n            \"format\": \"date-time\",\n            \"nullable\": true\n          },\n          \"floweringEndedOn\": {\n            \"type\": \"string\",\n            \"format\": \"date-time\",\n            \"nullable\": true\n          },\n          \"currentPhaseStartDate\": {\n            \"type\": \"string\",\n            \"format\": \"date-time\",\n            \"nullable\": true\n          },\n          \"lastModifiedDate\": {\n            \"type\": \"string\",\n            \"format\": \"date-time\",\n            \"nullable\": true\n          },\n          \"daysInCurrentPhase\": {\n            \"type\": \"integer\",\n            \"format\": \"int32\",\n            \"nullable\": true\n          },\n          \"floweringRoom\": {\n            \"type\": \"string\",\n            \"nullable\": true\n          },\n          \"floweringTable\": {\n            \"type\": \"string\",\n            \"nullable\": true\n          },\n          \"vegetationRoom\": {\n            \"type\": \"string\",\n            \"nullable\": true\n          },\n          \"vegetationTable\": {\n            \"type\": \"string\",\n            \"nullable\": true\n          },\n          \"daysInFlowering\": {\n            \"type\": \"integer\",\n            \"format\": \"int32\",\n            \"nullable\": true\n          },\n          \"daysInVegetation\": {\n            \"type\": \"integer\",\n            \"format\": \"int32\",\n            \"nullable\": true\n          },\n          \"batchId\": {\n            \"type\": \"integer\",\n            \"format\": \"int32\"\n          },\n          \"harvestId\": {\n            \"type\": \"integer\",\n            \"format\": \"int32\",\n            \"readOnly\": true\n          }\n        },\n        \"additionalProperties\": false\n      },\n      \"PlantWasteDetail\": {\n        \"type\": \"object\",\n        \"properties\": {\n          \"plantId\": {\n            \"type\": \"integer\",\n            \"description\": \"Identifier for the plant generating this waste.\",\n            \"format\": \"int32\"\n          },\n          \"wasteType\": {\n            \"type\": \"string\",\n            \"description\": \"Type or category of waste material from the plant.\",\n            \"nullable\": true\n          },\n          \"wasteAmount\": {\n            \"type\": \"number\",\n            \"description\": \"Quantity of waste material generated from the plant.\",\n            \"format\": \"double\"\n          },\n          \"unitId\": {\n            \"type\": \"integer\",\n            \"description\": \"Unit of measurement identifier for the waste amount.\",\n            \"format\": \"int32\"\n          }\n        },\n        \"additionalProperties\": false,\n        \"description\": \"Plant waste detail model for tracking waste generated from specific plant disposal operations.\"\n      },\n      \"PlantWasteDetailWaste\": {\n        \"type\": \"object\",\n        \"properties\": {\n          \"wasteId\": {\n            \"type\": \"integer\",\n            \"description\": \"Unique identifier for the waste record (null for new waste creation).\",\n            \"format\": \"int32\",\n            \"nullable\": true\n          },\n          \"referenceNo\": {\n            \"type\": \"string\",\n            \"description\": \"Reference number for waste tracking and documentation.\",\n            \"nullable\": true\n          },\n          \"comments\": {\n            \"type\": \"string\",\n            \"description\": \"Additional comments or notes about the waste disposal.\",\n            \"nullable\": true\n          },\n          \"wasteDate\": {\n            \"type\": \"string\",\n            \"description\": \"Date when the waste disposal occurred.\",\n            \"format\": \"date-time\",\n            \"nullable\": true\n          },\n          \"wasteDetail\": {\n            \"type\": \"array\",\n            \"items\": {\n              \"$ref\": \"#/components/schemas/PlantWasteDetail\"\n            },\n            \"description\": \"Collection of waste detail records containing specific item information.\",\n            \"nullable\": true\n          },\n          \"lspId\": {\n            \"type\": \"integer\",\n            \"description\": \"Licensed Service Provider identifier (internal use only).\",\n            \"format\": \"int32\",\n            \"nullable\": true\n          },\n          \"locId\": {\n            \"type\": \"integer\",\n            \"description\": \"Location identifier (internal use only).\",\n            \"format\": \"int32\",\n            \"nullable\": true\n          },\n          \"roomRequired\": {\n            \"type\": \"boolean\",\n            \"description\": \"Indicates if room identification is required for this waste type (internal use only).\",\n            \"nullable\": true\n          },\n          \"isBioTrack\": {\n            \"type\": \"boolean\",\n            \"description\": \"Indicates if this waste integrates with BioTrack system (internal use only).\",\n            \"nullable\": true\n          }\n        },\n        \"additionalProperties\": false,\n        \"description\": \"Generic waste record model containing waste disposal information and associated detail records for cannabis compliance and waste tracking.\"\n      },\n      \"PostImmatureBatchRequest\": {\n        \"type\": \"object\",\n        \"properties\": {\n          \"batches\": {\n            \"type\": \"array\",\n            \"items\": {\n              \"$ref\": \"#/components/schemas/BatchDetails\"\n            },\n            \"description\": \"Collection of immature plant batch specifications for bulk batch creation operations.\",\n            \"nullable\": true\n          }\n        },\n        \"additionalProperties\": false,\n        \"description\": \"Request model for creating immature plant batches in cannabis cultivation operations.\"\n      },\n      \"PreOrderItem\": {\n        \"required\": [\"productId\", \"quantity\"],\n        \"type\": \"object\",\n        \"properties\": {\n          \"productId\": {\n            \"type\": \"integer\",\n            \"format\": \"int32\"\n          },\n          \"quantity\": {\n            \"type\": \"number\",\n            \"format\": \"double\"\n          }\n        },\n        \"additionalProperties\": false\n      },\n      \"PreOrderRedemption\": {\n        \"required\": [\"redemptionId\", \"redemptionType\"],\n        \"type\": \"object\",\n        \"properties\": {\n          \"productId\": {\n            \"type\": \"integer\",\n            \"format\": \"int32\",\n            \"nullable\": true\n          },\n          \"redemptionType\": {\n            \"minLength\": 1,\n            \"type\": \"string\"\n          },\n          \"redemptionId\": {\n            \"minLength\": 1,\n            \"type\": \"string\"\n          },\n          \"redemptionDescription\": {\n            \"type\": \"string\",\n            \"nullable\": true\n          },\n          \"redemptionCallbackUrl\": {\n            \"type\": \"string\",\n            \"nullable\": true\n          }\n        },\n        \"additionalProperties\": false\n      },\n      \"PreOrderRedemptionIEnumerableOptional\": {\n        \"type\": \"array\",\n        \"additionalProperties\": false\n      },\n      \"PreOrderStatus\": {\n        \"type\": \"object\",\n        \"properties\": {\n          \"preOrderId\": {\n            \"type\": \"integer\",\n            \"format\": \"int32\"\n          },\n          \"status\": {\n            \"type\": \"string\",\n            \"nullable\": true\n          },\n          \"transactionId\": {\n            \"type\": \"integer\",\n            \"format\": \"int32\",\n            \"nullable\": true\n          },\n          \"orderDate\": {\n            \"type\": \"string\",\n            \"format\": \"date-time\"\n          },\n          \"customerFirstName\": {\n            \"type\": \"string\",\n            \"nullable\": true\n          },\n          \"customerLastName\": {\n            \"type\": \"string\",\n            \"nullable\": true\n          },\n          \"customerId\": {\n            \"type\": \"integer\",\n            \"format\": \"int32\"\n          },\n          \"orderType\": {\n            \"type\": \"string\",\n            \"nullable\": true\n          },\n          \"orderSource\": {\n            \"type\": \"string\",\n            \"nullable\": true\n          },\n          \"rejectedReason\": {\n            \"type\": \"string\",\n            \"nullable\": true\n          },\n          \"isCancellable\": {\n            \"type\": \"boolean\"\n          },\n          \"isUpdateable\": {\n            \"type\": \"boolean\"\n          },\n          \"total\": {\n            \"type\": \"number\",\n            \"format\": \"double\",\n            \"nullable\": true\n          },\n          \"subTotal\": {\n            \"type\": \"number\",\n            \"format\": \"double\",\n            \"nullable\": true\n          },\n          \"totalTax\": {\n            \"type\": \"number\",\n            \"format\": \"double\",\n            \"nullable\": true\n          },\n          \"sourceSystem\": {\n            \"type\": \"string\",\n            \"nullable\": true\n          },\n          \"items\": {\n            \"type\": \"array\",\n            \"items\": {\n              \"$ref\": \"#/components/schemas/AllocatedPreOrderItem\"\n            },\n            \"nullable\": true\n          }\n        },\n        \"additionalProperties\": false\n      },\n      \"PrecartItem\": {\n        \"type\": \"object\",\n        \"properties\": {\n          \"productId\": {\n            \"type\": \"integer\",\n            \"format\": \"int32\"\n          },\n          \"quantity\": {\n            \"type\": \"number\",\n            \"format\": \"double\"\n          }\n        },\n        \"additionalProperties\": false\n      },\n      \"PriceCartRequest\": {\n        \"type\": \"object\",\n        \"properties\": {\n          \"cart\": {\n            \"type\": \"array\",\n            \"items\": {\n              \"$ref\": \"#/components/schemas/PrecartItem\"\n            },\n            \"description\": \"Collection of products in the customer's shopping cart with quantities and specifications.\",\n            \"nullable\": true\n          },\n          \"customerTypeId\": {\n            \"type\": \"integer\",\n            \"description\": \"Customer type identifier for pricing tier and discount eligibility (e.g., medical, recreational).\",\n            \"format\": \"int32\",\n            \"nullable\": true\n          },\n          \"customerId\": {\n            \"type\": \"integer\",\n            \"description\": \"Unique customer identifier for personalized pricing and loyalty program benefits.\",\n            \"format\": \"int32\",\n            \"nullable\": true\n          },\n          \"deliveryStreet\": {\n            \"type\": \"string\",\n            \"description\": \"Primary street address for delivery orders (used for tax calculation and delivery fee estimation).\",\n            \"nullable\": true\n          },\n          \"deliveryStreet2\": {\n            \"type\": \"string\",\n            \"description\": \"Secondary address information (apartment, suite, unit number) for delivery orders.\",\n            \"nullable\": true\n          },\n          \"deliveryCity\": {\n            \"type\": \"string\",\n            \"description\": \"City name for delivery address (used for tax jurisdiction determination).\",\n            \"nullable\": true\n          },\n          \"deliveryState\": {\n            \"type\": \"string\",\n            \"description\": \"State or province for delivery address (used for tax calculation and compliance verification).\",\n            \"nullable\": true\n          },\n          \"deliveryPostalCode\": {\n            \"type\": \"string\",\n            \"description\": \"Postal or ZIP code for delivery address (used for precise tax calculation and delivery zones).\",\n            \"nullable\": true\n          },\n          \"isDelivery\": {\n            \"type\": \"boolean\",\n            \"description\": \"Indicates whether this is a delivery order (true) or pickup order (false) for tax and fee calculation.\"\n          }\n        },\n        \"additionalProperties\": false,\n        \"description\": \"Request model for calculating pricing, taxes, and discounts for a customer's shopping cart before creating a pre-order.\"\n      },\n      \"PriceEstimates\": {\n        \"type\": \"object\",\n        \"properties\": {\n          \"discountAmount\": {\n            \"type\": \"number\",\n            \"format\": \"double\"\n          },\n          \"taxAmount\": {\n            \"type\": \"number\",\n            \"format\": \"double\"\n          },\n          \"feeAmount\": {\n            \"type\": \"number\",\n            \"format\": \"double\"\n          },\n          \"subtotal\": {\n            \"type\": \"number\",\n            \"format\": \"double\"\n          },\n          \"grandTotal\": {\n            \"type\": \"number\",\n            \"format\": \"double\"\n          }\n        },\n        \"additionalProperties\": false\n      },\n      \"PricingDetail\": {\n        \"type\": \"object\",\n        \"properties\": {\n          \"medPrice\": {\n            \"type\": \"number\",\n            \"description\": \"Medical cannabis patient pricing (typically lower due to tax benefits and patient programs).\",\n            \"format\": \"double\",\n            \"nullable\": true\n          },\n          \"recPrice\": {\n            \"type\": \"number\",\n            \"description\": \"Recreational adult-use cannabis pricing (standard retail pricing with full taxes).\",\n            \"format\": \"double\",\n            \"nullable\": true\n          },\n          \"pricingTierName\": {\n            \"type\": \"string\",\n            \"description\": \"Pricing tier name for customer segmentation (e.g., \\\"Standard\\\", \\\"VIP\\\", \\\"Bulk\\\", \\\"Employee\\\").\",\n            \"nullable\": true\n          }\n        },\n        \"additionalProperties\": false,\n        \"description\": \"Pricing detail information for cannabis products with medical and recreational pricing tiers.\"\n      },\n      \"PricingTier\": {\n        \"type\": \"object\",\n        \"properties\": {\n          \"pricingTierId\": {\n            \"type\": \"integer\",\n            \"format\": \"int32\"\n          },\n          \"pricingTierName\": {\n            \"type\": \"string\",\n            \"nullable\": true\n          }\n        },\n        \"additionalProperties\": false\n      },\n      \"PricingTierData\": {\n        \"type\": \"object\",\n        \"properties\": {\n          \"startWeight\": {\n            \"type\": \"number\",\n            \"format\": \"double\",\n            \"nullable\": true\n          },\n          \"endWeight\": {\n            \"type\": \"number\",\n            \"format\": \"double\",\n            \"nullable\": true\n          },\n          \"price\": {\n            \"type\": \"number\",\n            \"format\": \"double\"\n          },\n          \"medicalPrice\": {\n            \"type\": \"number\",\n            \"format\": \"double\"\n          }\n        },\n        \"additionalProperties\": false\n      },\n      \"Producer\": {\n        \"type\": \"object\",\n        \"properties\": {\n          \"producerId\": {\n            \"type\": \"integer\",\n            \"description\": \"Unique identifier for the producer.\",\n            \"format\": \"int32\"\n          },\n          \"producerName\": {\n            \"type\": \"string\",\n            \"description\": \"Display name of the producer for product attribution and branding.\",\n            \"nullable\": true\n          }\n        },\n        \"additionalProperties\": false,\n        \"description\": \"Producer identification model containing basic producer information for product attribution and reference data needs.\"\n      },\n      \"ProductCategory\": {\n        \"type\": \"object\",\n        \"properties\": {\n          \"productCategoryId\": {\n            \"type\": \"integer\",\n            \"description\": \"Unique identifier for the product category.\",\n            \"format\": \"int32\"\n          },\n          \"productCategoryName\": {\n            \"type\": \"string\",\n            \"description\": \"Display name of the product category (e.g., \\\"Flower\\\", \\\"Edibles\\\", \\\"Concentrates\\\").\",\n            \"nullable\": true\n          },\n          \"masterCategory\": {\n            \"type\": \"string\",\n            \"description\": \"Higher-level master category classification for broader product grouping.\",\n            \"nullable\": true\n          }\n        },\n        \"additionalProperties\": false,\n        \"description\": \"Product category model containing cannabis product classification information for menu organization and product management.\"\n      },\n      \"ProductDetail\": {\n        \"type\": \"object\",\n        \"properties\": {\n          \"productId\": {\n            \"type\": \"integer\",\n            \"format\": \"int32\"\n          },\n          \"sku\": {\n            \"type\": \"string\",\n            \"nullable\": true\n          },\n          \"internalName\": {\n            \"type\": \"string\",\n            \"nullable\": true\n          },\n          \"productName\": {\n            \"type\": \"string\",\n            \"nullable\": true\n          },\n          \"description\": {\n            \"type\": \"string\",\n            \"nullable\": true\n          },\n          \"masterCategory\": {\n            \"type\": \"string\",\n            \"nullable\": true\n          },\n          \"categoryId\": {\n            \"type\": \"integer\",\n            \"format\": \"int32\",\n            \"nullable\": true\n          },\n          \"category\": {\n            \"type\": \"string\",\n            \"nullable\": true\n          },\n          \"imageUrl\": {\n            \"type\": \"string\",\n            \"nullable\": true\n          },\n          \"imageUrls\": {\n            \"type\": \"array\",\n            \"items\": {\n              \"type\": \"string\"\n            },\n            \"nullable\": true\n          },\n          \"strainId\": {\n            \"type\": \"integer\",\n            \"format\": \"int32\",\n            \"nullable\": true\n          },\n          \"strain\": {\n            \"type\": \"string\",\n            \"nullable\": true\n          },\n          \"strainType\": {\n            \"type\": \"string\",\n            \"nullable\": true\n          },\n          \"size\": {\n            \"type\": \"string\",\n            \"nullable\": true\n          },\n          \"netWeight\": {\n            \"type\": \"number\",\n            \"format\": \"double\",\n            \"nullable\": true\n          },\n          \"netWeightUnitId\": {\n            \"type\": \"integer\",\n            \"format\": \"int32\",\n            \"nullable\": true\n          },\n          \"netWeightUnit\": {\n            \"type\": \"string\",\n            \"nullable\": true,\n            \"readOnly\": true\n          },\n          \"brandId\": {\n            \"type\": \"integer\",\n            \"format\": \"int32\",\n            \"nullable\": true\n          },\n          \"brandName\": {\n            \"type\": \"string\",\n            \"nullable\": true\n          },\n          \"vendorId\": {\n            \"type\": \"integer\",\n            \"format\": \"int32\",\n            \"nullable\": true\n          },\n          \"vendorName\": {\n            \"type\": \"string\",\n            \"nullable\": true\n          },\n          \"isCannabis\": {\n            \"type\": \"boolean\"\n          },\n          \"isActive\": {\n            \"type\": \"boolean\"\n          },\n          \"isCoupon\": {\n            \"type\": \"boolean\"\n          },\n          \"thcContent\": {\n            \"type\": \"number\",\n            \"format\": \"double\",\n            \"nullable\": true\n          },\n          \"thcContentUnit\": {\n            \"type\": \"string\",\n            \"nullable\": true\n          },\n          \"cbdContent\": {\n            \"type\": \"number\",\n            \"format\": \"double\",\n            \"nullable\": true\n          },\n          \"cbdContentUnit\": {\n            \"type\": \"string\",\n            \"nullable\": true\n          },\n          \"productGrams\": {\n            \"type\": \"number\",\n            \"format\": \"double\",\n            \"nullable\": true\n          },\n          \"flowerEquivalent\": {\n            \"type\": \"number\",\n            \"format\": \"double\",\n            \"nullable\": true\n          },\n          \"recFlowerEquivalent\": {\n            \"type\": \"number\",\n            \"format\": \"double\",\n            \"nullable\": true\n          },\n          \"price\": {\n            \"type\": \"number\",\n            \"format\": \"double\",\n            \"nullable\": true\n          },\n          \"medPrice\": {\n            \"type\": \"number\",\n            \"format\": \"double\",\n            \"nullable\": true\n          },\n          \"recPrice\": {\n            \"type\": \"number\",\n            \"format\": \"double\",\n            \"nullable\": true\n          },\n          \"unitCost\": {\n            \"type\": \"number\",\n            \"format\": \"double\",\n            \"nullable\": true\n          },\n          \"unitType\": {\n            \"type\": \"string\",\n            \"nullable\": true\n          },\n          \"onlineTitle\": {\n            \"type\": \"string\",\n            \"nullable\": true\n          },\n          \"onlineDescription\": {\n            \"type\": \"string\",\n            \"nullable\": true\n          },\n          \"onlineProduct\": {\n            \"type\": \"boolean\",\n            \"nullable\": true,\n            \"readOnly\": true\n          },\n          \"posProducts\": {\n            \"type\": \"boolean\",\n            \"nullable\": true\n          },\n          \"pricingTier\": {\n            \"type\": \"integer\",\n            \"format\": \"int32\",\n            \"nullable\": true\n          },\n          \"onlineAvailable\": {\n            \"type\": \"boolean\",\n            \"nullable\": true\n          },\n          \"lowInventoryThreshold\": {\n            \"type\": \"number\",\n            \"format\": \"double\",\n            \"nullable\": true\n          },\n          \"pricingTierName\": {\n            \"type\": \"string\",\n            \"nullable\": true\n          },\n          \"pricingTierDescription\": {\n            \"type\": \"string\",\n            \"nullable\": true\n          },\n          \"pricingTierData\": {\n            \"type\": \"array\",\n            \"items\": {\n              \"$ref\": \"#/components/schemas/PricingTierData\"\n            },\n            \"nullable\": true\n          },\n          \"flavor\": {\n            \"type\": \"string\",\n            \"nullable\": true\n          },\n          \"alternateName\": {\n            \"type\": \"string\",\n            \"nullable\": true\n          },\n          \"lineageName\": {\n            \"type\": \"string\",\n            \"nullable\": true\n          },\n          \"distillationName\": {\n            \"type\": \"string\",\n            \"nullable\": true\n          },\n          \"maxPurchaseablePerTransaction\": {\n            \"type\": \"number\",\n            \"format\": \"double\",\n            \"nullable\": true\n          },\n          \"tags\": {\n            \"type\": \"array\",\n            \"items\": {\n              \"$ref\": \"#/components/schemas/ProductTag\"\n            },\n            \"nullable\": true\n          },\n          \"effects\": {\n            \"type\": \"array\",\n            \"items\": {\n              \"$ref\": \"#/components/schemas/ProductEffect\"\n            },\n            \"nullable\": true\n          },\n          \"dosage\": {\n            \"type\": \"string\",\n            \"nullable\": true\n          },\n          \"instructions\": {\n            \"type\": \"string\",\n            \"nullable\": true\n          },\n          \"allergens\": {\n            \"type\": \"string\",\n            \"nullable\": true\n          },\n          \"standardAllergens\": {\n            \"$ref\": \"#/components/schemas/StandardAllergensDetails\"\n          },\n          \"defaultUnit\": {\n            \"type\": \"string\",\n            \"nullable\": true\n          },\n          \"producerId\": {\n            \"type\": \"integer\",\n            \"format\": \"int32\",\n            \"nullable\": true\n          },\n          \"producerName\": {\n            \"type\": \"string\",\n            \"nullable\": true\n          },\n          \"createdDate\": {\n            \"type\": \"string\",\n            \"format\": \"date-time\",\n            \"nullable\": true\n          },\n          \"isMedicalOnly\": {\n            \"type\": \"boolean\"\n          },\n          \"lastModifiedDateUTC\": {\n            \"type\": \"string\",\n            \"format\": \"date-time\",\n            \"nullable\": true\n          },\n          \"grossWeight\": {\n            \"type\": \"number\",\n            \"format\": \"double\",\n            \"nullable\": true\n          },\n          \"isTaxable\": {\n            \"type\": \"boolean\",\n            \"nullable\": true\n          },\n          \"taxCategories\": {\n            \"type\": \"array\",\n            \"items\": {\n              \"type\": \"string\"\n            },\n            \"nullable\": true\n          },\n          \"upc\": {\n            \"type\": \"string\",\n            \"nullable\": true\n          },\n          \"regulatoryCategory\": {\n            \"type\": \"string\",\n            \"nullable\": true\n          },\n          \"ndc\": {\n            \"type\": \"string\",\n            \"nullable\": true\n          },\n          \"daysSupply\": {\n            \"type\": \"number\",\n            \"format\": \"double\",\n            \"nullable\": true\n          },\n          \"illinoisTaxCategory\": {\n            \"type\": \"string\",\n            \"nullable\": true,\n            \"readOnly\": true\n          },\n          \"externalCategory\": {\n            \"type\": \"string\",\n            \"nullable\": true\n          },\n          \"externalId\": {\n            \"type\": \"string\",\n            \"nullable\": true\n          },\n          \"syncExternally\": {\n            \"type\": \"boolean\"\n          },\n          \"regulatoryName\": {\n            \"type\": \"string\",\n            \"nullable\": true\n          },\n          \"broadcastedResponses\": {\n            \"$ref\": \"#/components/schemas/BroadcastedResponses\"\n          },\n          \"administrationMethod\": {\n            \"type\": \"string\",\n            \"nullable\": true\n          },\n          \"unitCBDContentDose\": {\n            \"type\": \"number\",\n            \"format\": \"double\",\n            \"nullable\": true\n          },\n          \"unitTHCContentDose\": {\n            \"type\": \"number\",\n            \"format\": \"double\",\n            \"nullable\": true\n          },\n          \"oilVolume\": {\n            \"type\": \"number\",\n            \"format\": \"double\",\n            \"nullable\": true\n          },\n          \"ingredientList\": {\n            \"type\": \"string\",\n            \"nullable\": true\n          },\n          \"expirationDays\": {\n            \"type\": \"integer\",\n            \"format\": \"int32\",\n            \"nullable\": true\n          },\n          \"abbreviation\": {\n            \"type\": \"string\",\n            \"nullable\": true\n          },\n          \"isTestProduct\": {\n            \"type\": \"boolean\"\n          },\n          \"isFinished\": {\n            \"type\": \"boolean\"\n          },\n          \"allowAutomaticDiscounts\": {\n            \"type\": \"boolean\"\n          },\n          \"servingSize\": {\n            \"type\": \"string\",\n            \"nullable\": true\n          },\n          \"servingSizePerUnit\": {\n            \"type\": \"integer\",\n            \"format\": \"int32\",\n            \"nullable\": true\n          },\n          \"isNutrient\": {\n            \"type\": \"boolean\"\n          },\n          \"approvalDateUTC\": {\n            \"type\": \"string\",\n            \"format\": \"date-time\",\n            \"nullable\": true\n          },\n          \"ecomCategory\": {\n            \"type\": \"string\",\n            \"nullable\": true\n          },\n          \"ecomSubcategory\": {\n            \"type\": \"string\",\n            \"nullable\": true\n          },\n          \"customMetadata\": {\n            \"type\": \"string\",\n            \"nullable\": true\n          }\n        },\n        \"additionalProperties\": false\n      },\n      \"ProductDetailUpload\": {\n        \"required\": [\"productName\", \"sku\"],\n        \"type\": \"object\",\n        \"properties\": {\n          \"productId\": {\n            \"type\": \"integer\",\n            \"description\": \"The unique identifier for a product in the system.\\n\\n**IMPORTANT**: This field determines whether a product is created or updated:\\n- To CREATE a new product: Omit this field or set to null\\n- To UPDATE an existing product: You MUST provide the ProductId of the existing product\",\n            \"format\": \"int32\",\n            \"nullable\": true\n          },\n          \"sku\": {\n            \"minLength\": 1,\n            \"type\": \"string\",\n            \"description\": \"Product SKU - REQUIRED for CREATE operations\"\n          },\n          \"productName\": {\n            \"minLength\": 1,\n            \"type\": \"string\",\n            \"description\": \"Product Name - REQUIRED for CREATE operations\"\n          },\n          \"description\": {\n            \"type\": \"string\",\n            \"description\": \"Deprecated in favor of AlternateName\",\n            \"nullable\": true\n          },\n          \"alternateName\": {\n            \"type\": \"string\",\n            \"nullable\": true\n          },\n          \"masterCategory\": {\n            \"type\": \"string\",\n            \"nullable\": true\n          },\n          \"category\": {\n            \"type\": \"string\",\n            \"nullable\": true\n          },\n          \"strain\": {\n            \"type\": \"string\",\n            \"nullable\": true\n          },\n          \"strainType\": {\n            \"type\": \"string\",\n            \"description\": \"Strain type of the specified strain.\\nUsed to disambiguate strains, if duplicates exist.\\nIf no duplicates exist in the location's strain list, this field is not useful.\\nIf duplicates DO exist and this field is not specified, the strain will be chosen by the first one created.\",\n            \"nullable\": true,\n            \"example\": \"123\"\n          },\n          \"size\": {\n            \"type\": \"string\",\n            \"nullable\": true\n          },\n          \"netWeight\": {\n            \"type\": \"number\",\n            \"format\": \"double\",\n            \"nullable\": true\n          },\n          \"netWeightUnit\": {\n            \"type\": \"string\",\n            \"description\": \"Optional.  Abbreviation of the unit of the product's net weight.\",\n            \"nullable\": true\n          },\n          \"grossWeight\": {\n            \"type\": \"number\",\n            \"format\": \"double\",\n            \"nullable\": true\n          },\n          \"brandName\": {\n            \"type\": \"string\",\n            \"nullable\": true\n          },\n          \"vendorName\": {\n            \"type\": \"string\",\n            \"nullable\": true\n          },\n          \"isCannabis\": {\n            \"type\": \"boolean\"\n          },\n          \"isActive\": {\n            \"type\": \"boolean\"\n          },\n          \"thcContent\": {\n            \"type\": \"number\",\n            \"format\": \"double\",\n            \"nullable\": true\n          },\n          \"thcContentUnit\": {\n            \"type\": \"string\",\n            \"description\": \"mg; %; mg/g; n.d.\",\n            \"nullable\": true\n          },\n          \"cbdContent\": {\n            \"type\": \"number\",\n            \"format\": \"double\",\n            \"nullable\": true\n          },\n          \"cbdContentUnit\": {\n            \"type\": \"string\",\n            \"description\": \"mg; %; mg/g; n.d.\",\n            \"nullable\": true\n          },\n          \"productGrams\": {\n            \"type\": \"number\",\n            \"format\": \"double\",\n            \"nullable\": true\n          },\n          \"flowerEquivalent\": {\n            \"type\": \"number\",\n            \"format\": \"double\",\n            \"nullable\": true\n          },\n          \"recFlowerEquivalent\": {\n            \"type\": \"number\",\n            \"format\": \"double\",\n            \"nullable\": true\n          },\n          \"price\": {\n            \"type\": \"number\",\n            \"format\": \"double\",\n            \"nullable\": true\n          },\n          \"unitCost\": {\n            \"type\": \"number\",\n            \"format\": \"double\",\n            \"nullable\": true\n          },\n          \"unitType\": {\n            \"type\": \"string\",\n            \"nullable\": true\n          },\n          \"onlineTitle\": {\n            \"type\": \"string\",\n            \"nullable\": true\n          },\n          \"onlineDescription\": {\n            \"type\": \"string\",\n            \"nullable\": true\n          },\n          \"onlineProduct\": {\n            \"type\": \"boolean\",\n            \"nullable\": true\n          },\n          \"posProducts\": {\n            \"type\": \"boolean\",\n            \"nullable\": true\n          },\n          \"tags\": {\n            \"type\": \"array\",\n            \"items\": {\n              \"type\": \"integer\",\n              \"format\": \"int32\"\n            },\n            \"nullable\": true\n          },\n          \"defaultUnit\": {\n            \"type\": \"string\",\n            \"nullable\": true\n          },\n          \"isMedicalOnly\": {\n            \"type\": \"boolean\",\n            \"nullable\": true\n          },\n          \"isTaxable\": {\n            \"type\": \"boolean\",\n            \"nullable\": true\n          },\n          \"regulatoryCategory\": {\n            \"type\": \"string\",\n            \"nullable\": true\n          },\n          \"ndc\": {\n            \"type\": \"string\",\n            \"nullable\": true\n          },\n          \"daysSupply\": {\n            \"type\": \"number\",\n            \"format\": \"double\",\n            \"nullable\": true\n          },\n          \"illinoisTaxCategory\": {\n            \"type\": \"string\",\n            \"nullable\": true\n          },\n          \"externalCategory\": {\n            \"type\": \"string\",\n            \"nullable\": true\n          },\n          \"externalId\": {\n            \"$ref\": \"#/components/schemas/StringOptional\"\n          },\n          \"syncExternally\": {\n            \"type\": \"boolean\",\n            \"nullable\": true\n          },\n          \"bypassExternalUpdate\": {\n            \"type\": \"boolean\",\n            \"nullable\": true\n          },\n          \"administrationMethod\": {\n            \"$ref\": \"#/components/schemas/StringOptional\"\n          },\n          \"unitCBDContentDose\": {\n            \"$ref\": \"#/components/schemas/DecimalNullableOptional\"\n          },\n          \"unitTHCContentDose\": {\n            \"$ref\": \"#/components/schemas/DecimalNullableOptional\"\n          },\n          \"oilVolume\": {\n            \"$ref\": \"#/components/schemas/DecimalNullableOptional\"\n          },\n          \"ingredientList\": {\n            \"$ref\": \"#/components/schemas/StringOptional\"\n          },\n          \"expirationDays\": {\n            \"$ref\": \"#/components/schemas/Int32NullableOptional\"\n          },\n          \"abbreviation\": {\n            \"$ref\": \"#/components/schemas/StringOptional\"\n          },\n          \"isTestProduct\": {\n            \"$ref\": \"#/components/schemas/BooleanOptional\"\n          },\n          \"isFinished\": {\n            \"$ref\": \"#/components/schemas/BooleanOptional\"\n          },\n          \"allowAutomaticDiscounts\": {\n            \"$ref\": \"#/components/schemas/BooleanOptional\"\n          },\n          \"servingSize\": {\n            \"$ref\": \"#/components/schemas/StringOptional\"\n          },\n          \"servingSizePerUnit\": {\n            \"$ref\": \"#/components/schemas/Int32NullableOptional\"\n          },\n          \"isNutrient\": {\n            \"$ref\": \"#/components/schemas/BooleanOptional\"\n          },\n          \"approvalDateUTC\": {\n            \"$ref\": \"#/components/schemas/DateTimeNullableOptional\"\n          },\n          \"customMetadata\": {\n            \"$ref\": \"#/components/schemas/StringOptional\"\n          },\n          \"taxCategories\": {\n            \"type\": \"array\",\n            \"items\": {\n              \"type\": \"string\"\n            },\n            \"description\": \"List of strings of tax categories that the product belongs to.\",\n            \"nullable\": true\n          },\n          \"pricingDetails\": {\n            \"$ref\": \"#/components/schemas/PricingDetail\"\n          },\n          \"userName\": {\n            \"type\": \"string\",\n            \"description\": \"UserName of the user making the product change\\nThis will be used when authorizing with traceability systems (METRC/BioTrack) - if not included or NULL is specified, the traceability integration's \\\"master key\\\" will be used, if possible.\\nThis field is only relevant if the request is setting SyncExternally to true\",\n            \"nullable\": true\n          },\n          \"instructions\": {\n            \"type\": \"string\",\n            \"nullable\": true\n          },\n          \"upc\": {\n            \"type\": \"string\",\n            \"nullable\": true\n          },\n          \"regulatoryName\": {\n            \"$ref\": \"#/components/schemas/StringOptional\"\n          },\n          \"broadcast\": {\n            \"$ref\": \"#/components/schemas/BooleanOptional\"\n          }\n        },\n        \"additionalProperties\": false,\n        \"description\": \"Product upload model for creating and updating products.\\n\\n⚠️ **DATA LOSS WARNING**: Most fields will be overwritten with null/zero if not provided.\\n**RECOMMENDED**: Use GET /products first, modify needed fields, then POST the complete object.\"\n      },\n      \"ProductEffect\": {\n        \"type\": \"object\",\n        \"properties\": {\n          \"effectId\": {\n            \"type\": \"integer\",\n            \"format\": \"int32\"\n          },\n          \"effectName\": {\n            \"type\": \"string\",\n            \"nullable\": true\n          },\n          \"productId\": {\n            \"type\": \"integer\",\n            \"format\": \"int32\"\n          }\n        },\n        \"additionalProperties\": false\n      },\n      \"ProductTag\": {\n        \"type\": \"object\",\n        \"properties\": {\n          \"tagId\": {\n            \"type\": \"integer\",\n            \"format\": \"int32\"\n          },\n          \"tagName\": {\n            \"type\": \"string\",\n            \"nullable\": true\n          },\n          \"productId\": {\n            \"type\": \"integer\",\n            \"format\": \"int32\"\n          }\n        },\n        \"additionalProperties\": false\n      },\n      \"PublishedDiscount\": {\n        \"type\": \"object\",\n        \"properties\": {\n          \"discountId\": {\n            \"type\": \"integer\",\n            \"description\": \"Unique identifier for the discount.\",\n            \"format\": \"int32\"\n          },\n          \"discountName\": {\n            \"type\": \"string\",\n            \"description\": \"Display name of the discount for customer-facing applications.\",\n            \"nullable\": true\n          },\n          \"discountAmount\": {\n            \"type\": \"number\",\n            \"description\": \"Monetary discount amount or percentage value.\",\n            \"format\": \"double\"\n          },\n          \"discountCode\": {\n            \"type\": \"string\",\n            \"description\": \"Promotional code required to apply the discount (optional).\",\n            \"nullable\": true\n          },\n          \"discountType\": {\n            \"type\": \"string\",\n            \"description\": \"Type classification of the discount (e.g., percentage, fixed amount).\",\n            \"nullable\": true\n          },\n          \"discountMethod\": {\n            \"type\": \"string\",\n            \"description\": \"Method used to apply the discount (e.g., automatic, code required).\",\n            \"nullable\": true\n          },\n          \"isActive\": {\n            \"type\": \"boolean\",\n            \"description\": \"Indicates if the discount is currently active and available.\"\n          },\n          \"validFrom\": {\n            \"type\": \"string\",\n            \"description\": \"Start date and time when discount becomes valid (UTC converted from Eastern Time).\",\n            \"format\": \"date-time\",\n            \"nullable\": true\n          },\n          \"validUntil\": {\n            \"type\": \"string\",\n            \"description\": \"End date and time when discount expires (UTC converted from Eastern Time).\",\n            \"format\": \"date-time\",\n            \"nullable\": true\n          },\n          \"thresholdType\": {\n            \"type\": \"string\",\n            \"description\": \"Type of threshold requirement for discount eligibility (optional).\",\n            \"nullable\": true\n          },\n          \"minimumItemsRequired\": {\n            \"type\": \"number\",\n            \"description\": \"Minimum number of qualifying items required for discount application (optional).\",\n            \"format\": \"double\",\n            \"nullable\": true\n          },\n          \"maximumItemsAllowed\": {\n            \"type\": \"number\",\n            \"description\": \"Maximum number of items that can receive the discount (optional).\",\n            \"format\": \"double\",\n            \"nullable\": true\n          },\n          \"maximumUsageCount\": {\n            \"type\": \"number\",\n            \"description\": \"Maximum number of times this discount can be used (optional).\",\n            \"format\": \"double\",\n            \"nullable\": true\n          },\n          \"includeNonCannabis\": {\n            \"type\": \"boolean\",\n            \"description\": \"Indicates if discount applies to non-cannabis products.\"\n          },\n          \"firstTimeCustomerOnly\": {\n            \"type\": \"boolean\",\n            \"description\": \"Indicates if discount is restricted to first-time customers only.\"\n          },\n          \"stackOnOtherDiscounts\": {\n            \"type\": \"boolean\",\n            \"description\": \"Indicates if discount can be combined with other discounts.\"\n          },\n          \"weeklyRecurrenceInfo\": {\n            \"$ref\": \"#/components/schemas/WeeklyRecurrenceInfo\"\n          },\n          \"products\": {\n            \"$ref\": \"#/components/schemas/DiscountRestriction\"\n          },\n          \"productCategories\": {\n            \"$ref\": \"#/components/schemas/DiscountRestriction\"\n          },\n          \"brands\": {\n            \"$ref\": \"#/components/schemas/DiscountRestriction\"\n          },\n          \"vendors\": {\n            \"$ref\": \"#/components/schemas/DiscountRestriction\"\n          },\n          \"strains\": {\n            \"$ref\": \"#/components/schemas/DiscountRestriction\"\n          },\n          \"tiers\": {\n            \"$ref\": \"#/components/schemas/DiscountRestriction\"\n          },\n          \"tags\": {\n            \"$ref\": \"#/components/schemas/DiscountRestriction\"\n          },\n          \"inventoryTags\": {\n            \"$ref\": \"#/components/schemas/DiscountRestriction\"\n          },\n          \"customerTypes\": {\n            \"$ref\": \"#/components/schemas/DiscountRestriction\"\n          },\n          \"discountGroups\": {\n            \"type\": \"array\",\n            \"items\": {\n              \"$ref\": \"#/components/schemas/DiscountGroup\"\n            },\n            \"description\": \"Associated discount groups for bundling and organization (loaded conditionally).\",\n            \"nullable\": true\n          }\n        },\n        \"additionalProperties\": false,\n        \"description\": \"Published discount model containing complete discount configuration and constraint information for customer-facing applications.\"\n      },\n      \"PurchaseOrderData\": {\n        \"type\": \"object\",\n        \"properties\": {\n          \"purchaseOrderId\": {\n            \"type\": \"integer\",\n            \"format\": \"int32\"\n          },\n          \"expectedArrivalDate\": {\n            \"type\": \"string\",\n            \"format\": \"date-time\",\n            \"nullable\": true\n          },\n          \"title\": {\n            \"type\": \"string\",\n            \"nullable\": true\n          },\n          \"dateReceived\": {\n            \"type\": \"string\",\n            \"format\": \"date-time\",\n            \"nullable\": true\n          },\n          \"dateSubmitted\": {\n            \"type\": \"string\",\n            \"format\": \"date-time\",\n            \"nullable\": true\n          },\n          \"shippingInformation\": {\n            \"type\": \"string\",\n            \"nullable\": true\n          },\n          \"vendorId\": {\n            \"type\": \"integer\",\n            \"format\": \"int32\"\n          },\n          \"vendorName\": {\n            \"type\": \"string\",\n            \"nullable\": true\n          },\n          \"vendorContact\": {\n            \"type\": \"string\",\n            \"nullable\": true\n          },\n          \"status\": {\n            \"type\": \"string\",\n            \"nullable\": true\n          },\n          \"purchaseOrderNumber\": {\n            \"type\": \"integer\",\n            \"format\": \"int32\"\n          },\n          \"createdByUser\": {\n            \"type\": \"string\",\n            \"nullable\": true\n          },\n          \"dateCreated\": {\n            \"type\": \"string\",\n            \"format\": \"date-time\",\n            \"nullable\": true\n          },\n          \"purchaseOrderItems\": {\n            \"type\": \"array\",\n            \"items\": {\n              \"$ref\": \"#/components/schemas/PurchaseOrderItemDetail\"\n            },\n            \"nullable\": true\n          }\n        },\n        \"additionalProperties\": false\n      },\n      \"PurchaseOrderItemDetail\": {\n        \"type\": \"object\",\n        \"properties\": {\n          \"purchaseOrderId\": {\n            \"type\": \"integer\",\n            \"format\": \"int32\"\n          },\n          \"purchaseOrderItemId\": {\n            \"type\": \"integer\",\n            \"format\": \"int32\"\n          },\n          \"productId\": {\n            \"type\": \"integer\",\n            \"format\": \"int32\"\n          },\n          \"productName\": {\n            \"type\": \"string\",\n            \"nullable\": true\n          },\n          \"quantity\": {\n            \"type\": \"integer\",\n            \"format\": \"int32\"\n          },\n          \"unitId\": {\n            \"type\": \"integer\",\n            \"format\": \"int32\"\n          },\n          \"unitName\": {\n            \"type\": \"string\",\n            \"nullable\": true\n          },\n          \"unitNameAbbreviation\": {\n            \"type\": \"string\",\n            \"nullable\": true\n          },\n          \"subtotal\": {\n            \"type\": \"number\",\n            \"format\": \"double\"\n          },\n          \"tax\": {\n            \"type\": \"number\",\n            \"format\": \"double\"\n          }\n        },\n        \"additionalProperties\": false\n      },\n      \"ReceiveInventoryItemSave\": {\n        \"required\": [\"productId\", \"quantity\"],\n        \"type\": \"object\",\n        \"properties\": {\n          \"productId\": {\n            \"type\": \"integer\",\n            \"description\": \"Product identifier for the cannabis product being received into inventory (required).\",\n            \"format\": \"int32\"\n          },\n          \"quantity\": {\n            \"type\": \"number\",\n            \"description\": \"Quantity of the product being received into inventory (required).\",\n            \"format\": \"double\"\n          },\n          \"unitType\": {\n            \"type\": \"string\",\n            \"description\": \"Unit type for the received quantity (qty; ml; g; Gal; L; lb; mg; oz; fl oz; kg).\",\n            \"nullable\": true\n          },\n          \"flowerEquivalent\": {\n            \"type\": \"number\",\n            \"description\": \"Flower equivalent weight for regulatory compliance and limit calculations.\",\n            \"format\": \"double\",\n            \"nullable\": true\n          },\n          \"recFlowerEquivalent\": {\n            \"type\": \"number\",\n            \"description\": \"Recreational flower equivalent weight for regulatory compliance tracking.\",\n            \"format\": \"double\",\n            \"nullable\": true\n          },\n          \"vendorId\": {\n            \"type\": \"integer\",\n            \"description\": \"Vendor identifier for supply chain tracking and vendor management.\",\n            \"format\": \"int32\",\n            \"nullable\": true\n          },\n          \"roomId\": {\n            \"type\": \"integer\",\n            \"description\": \"Room identifier for facility location assignment and space management.\",\n            \"format\": \"int32\",\n            \"nullable\": true\n          },\n          \"packageId\": {\n            \"type\": \"string\",\n            \"description\": \"Package identifier from state tracking system for compliance documentation.\",\n            \"nullable\": true\n          },\n          \"lot\": {\n            \"type\": \"string\",\n            \"description\": \"Lot number for batch tracking and quality control management.\",\n            \"nullable\": true\n          },\n          \"cost\": {\n            \"type\": \"number\",\n            \"description\": \"Unit cost for inventory valuation and cost accounting.\",\n            \"format\": \"double\",\n            \"nullable\": true\n          },\n          \"price\": {\n            \"type\": \"number\",\n            \"description\": \"General retail price for the received inventory item.\",\n            \"format\": \"double\",\n            \"nullable\": true\n          },\n          \"recPrice\": {\n            \"type\": \"number\",\n            \"description\": \"Recreational market price for dual-license operations.\",\n            \"format\": \"double\",\n            \"nullable\": true\n          },\n          \"tax\": {\n            \"type\": \"number\",\n            \"description\": \"Tax amount for financial compliance and tax reporting.\",\n            \"format\": \"double\",\n            \"nullable\": true\n          },\n          \"expirationDate\": {\n            \"type\": \"string\",\n            \"description\": \"Product expiration date for inventory rotation and compliance management.\",\n            \"format\": \"date-time\",\n            \"nullable\": true\n          },\n          \"tags\": {\n            \"type\": \"array\",\n            \"items\": {\n              \"type\": \"integer\",\n              \"format\": \"int32\"\n            },\n            \"description\": \"Collection of tag identifiers for product categorization and organization.\",\n            \"nullable\": true\n          },\n          \"cultivationTax\": {\n            \"type\": \"number\",\n            \"description\": \"Cultivation tax amount for cannabis-specific tax compliance.\",\n            \"format\": \"double\",\n            \"nullable\": true\n          },\n          \"tableId\": {\n            \"type\": \"integer\",\n            \"description\": \"Table identifier within the room for precise location tracking.\",\n            \"format\": \"int32\",\n            \"nullable\": true\n          },\n          \"sourceAllocatedInventoryId\": {\n            \"type\": \"integer\",\n            \"description\": \"Source allocated inventory identifier for traceability and audit trails.\",\n            \"format\": \"int32\",\n            \"nullable\": true\n          },\n          \"totalPackageCost\": {\n            \"type\": \"number\",\n            \"description\": \"Total package cost for comprehensive cost allocation and accounting.\",\n            \"format\": \"double\",\n            \"nullable\": true\n          },\n          \"getMetrcLabResults\": {\n            \"type\": \"boolean\",\n            \"description\": \"Flag to retrieve lab results from Metrc for compliance integration.\",\n            \"nullable\": true\n          },\n          \"productName\": {\n            \"type\": \"string\",\n            \"description\": \"Product name for inventory identification and display purposes.\",\n            \"nullable\": true\n          },\n          \"packagingDate\": {\n            \"type\": \"string\",\n            \"description\": \"Date when the product was packaged for shelf life tracking.\",\n            \"format\": \"date-time\",\n            \"nullable\": true\n          },\n          \"manufacturingDate\": {\n            \"type\": \"string\",\n            \"description\": \"Date when the product was manufactured for quality control tracking.\",\n            \"format\": \"date-time\",\n            \"nullable\": true\n          },\n          \"producerId\": {\n            \"type\": \"integer\",\n            \"description\": \"Producer identifier for supply chain tracking and compliance documentation.\",\n            \"format\": \"int32\",\n            \"nullable\": true\n          },\n          \"externalPackageId\": {\n            \"type\": \"string\",\n            \"description\": \"External package identifier for cross-system integration and tracking.\",\n            \"nullable\": true\n          },\n          \"potencyIndicator\": {\n            \"type\": \"string\",\n            \"description\": \"Potency indicator for product strength classification and customer information.\",\n            \"nullable\": true\n          }\n        },\n        \"additionalProperties\": false,\n        \"description\": \"Request model for receiving and recording new cannabis inventory items into the facility management system.\"\n      },\n      \"ReceiveInventorySave\": {\n        \"required\": [\"deliveredOn\"],\n        \"type\": \"object\",\n        \"properties\": {\n          \"vendorId\": {\n            \"type\": \"integer\",\n            \"description\": \"Vendor identifier for the supplier (optional, can be resolved from VendorLicense).\",\n            \"format\": \"int32\",\n            \"nullable\": true\n          },\n          \"deliveredBy\": {\n            \"type\": \"string\",\n            \"description\": \"Name of the person who delivered the inventory shipment.\",\n            \"nullable\": true\n          },\n          \"deliveredOn\": {\n            \"type\": \"string\",\n            \"description\": \"Date and time when the inventory was delivered (required).\",\n            \"format\": \"date-time\"\n          },\n          \"vendorLicense\": {\n            \"type\": \"string\",\n            \"description\": \"Vendor license code for compliance tracking and vendor identification.\",\n            \"nullable\": true\n          },\n          \"transactionId\": {\n            \"type\": \"string\",\n            \"description\": \"External transaction reference ID for tracking and reconciliation.\",\n            \"nullable\": true\n          },\n          \"orderTitle\": {\n            \"type\": \"string\",\n            \"description\": \"Descriptive title for the receive order for identification purposes.\",\n            \"nullable\": true\n          },\n          \"externalId\": {\n            \"type\": \"string\",\n            \"description\": \"External system ID for preventing duplicate receives (must be unique).\",\n            \"nullable\": true\n          },\n          \"note\": {\n            \"type\": \"string\",\n            \"description\": \"Additional notes or comments about the receive transaction.\",\n            \"nullable\": true\n          },\n          \"items\": {\n            \"type\": \"array\",\n            \"items\": {\n              \"$ref\": \"#/components/schemas/ReceiveInventoryItemSave\"\n            },\n            \"description\": \"Collection of inventory items being received in this transaction.\",\n            \"nullable\": true\n          },\n          \"receiveIntoInventory\": {\n            \"type\": \"boolean\",\n            \"description\": \"Indicates whether to immediately process items into inventory (true) or save as draft (false).\",\n            \"nullable\": true\n          },\n          \"userId\": {\n            \"type\": \"integer\",\n            \"description\": \"User ID for processing the receive (required when ReceiveIntoInventory=true).\",\n            \"format\": \"int32\",\n            \"nullable\": true\n          },\n          \"userName\": {\n            \"type\": \"string\",\n            \"description\": \"Username for processing the receive (alternative to UserId, required when ReceiveIntoInventory=true).\",\n            \"nullable\": true\n          }\n        },\n        \"additionalProperties\": false,\n        \"description\": \"Request model for creating inventory receive orders for incoming transfers, purchase orders, or direct inventory additions.\"\n      },\n      \"ReceivedInventory\": {\n        \"type\": \"object\",\n        \"properties\": {\n          \"receiveInventoryHistoryId\": {\n            \"type\": \"integer\",\n            \"description\": \"Unique identifier for the receive inventory transaction.\",\n            \"format\": \"int32\"\n          },\n          \"title\": {\n            \"type\": \"string\",\n            \"description\": \"Descriptive title for the receive order for identification purposes.\",\n            \"nullable\": true\n          },\n          \"status\": {\n            \"type\": \"string\",\n            \"description\": \"Current processing status of the receive order (e.g., \\\"Pending\\\", \\\"Completed\\\", \\\"Failed\\\").\",\n            \"nullable\": true\n          },\n          \"failureMessage\": {\n            \"type\": \"string\",\n            \"description\": \"Error message if the receive order failed processing (optional).\",\n            \"nullable\": true\n          },\n          \"deliveredOn\": {\n            \"type\": \"string\",\n            \"description\": \"Date and time when the inventory was delivered by the vendor (optional).\",\n            \"format\": \"date-time\",\n            \"nullable\": true\n          },\n          \"addedOn\": {\n            \"type\": \"string\",\n            \"description\": \"Date and time when the receive order was created in the system (optional).\",\n            \"format\": \"date-time\",\n            \"nullable\": true\n          },\n          \"vendor\": {\n            \"type\": \"string\",\n            \"description\": \"Name of the vendor who supplied the inventory.\",\n            \"nullable\": true\n          },\n          \"vendorLicense\": {\n            \"type\": \"string\",\n            \"description\": \"Vendor license code for compliance tracking and verification.\",\n            \"nullable\": true\n          },\n          \"items\": {\n            \"type\": \"array\",\n            \"items\": {\n              \"$ref\": \"#/components/schemas/ReceivedInventoryItem\"\n            },\n            \"description\": \"Collection of inventory items included in this receive order.\",\n            \"nullable\": true\n          }\n        },\n        \"additionalProperties\": false,\n        \"description\": \"Received inventory record model representing completed or pending inventory receive orders and their processing status.\"\n      },\n      \"ReceivedInventoryItem\": {\n        \"type\": \"object\",\n        \"properties\": {\n          \"product\": {\n            \"type\": \"string\",\n            \"description\": \"Product name for inventory item identification and display.\",\n            \"nullable\": true\n          },\n          \"sku\": {\n            \"type\": \"string\",\n            \"description\": \"Stock Keeping Unit (SKU) for product identification and retail operations.\",\n            \"nullable\": true\n          },\n          \"productId\": {\n            \"type\": \"integer\",\n            \"description\": \"Product identifier for database references and system integration.\",\n            \"format\": \"int32\",\n            \"nullable\": true\n          },\n          \"type\": {\n            \"type\": \"string\",\n            \"description\": \"Product type classification for cannabis product categorization.\",\n            \"nullable\": true\n          },\n          \"quantity\": {\n            \"type\": \"number\",\n            \"description\": \"Quantity of the received inventory item for stock tracking.\",\n            \"format\": \"double\"\n          },\n          \"unitAbbreviation\": {\n            \"type\": \"string\",\n            \"description\": \"Unit abbreviation for quantity measurement display (e.g., \\\"g\\\", \\\"oz\\\", \\\"ml\\\").\",\n            \"nullable\": true\n          },\n          \"unit\": {\n            \"type\": \"string\",\n            \"description\": \"Full unit name for quantity measurement (e.g., \\\"grams\\\", \\\"ounces\\\", \\\"milliliters\\\").\",\n            \"nullable\": true\n          },\n          \"unitCost\": {\n            \"type\": \"number\",\n            \"description\": \"Cost per unit for inventory valuation and financial accounting.\",\n            \"format\": \"double\"\n          },\n          \"unitTax\": {\n            \"type\": \"number\",\n            \"description\": \"Tax amount per unit for cannabis tax compliance and reporting.\",\n            \"format\": \"double\"\n          },\n          \"totalCost\": {\n            \"type\": \"number\",\n            \"description\": \"Total cost for the received inventory item including all taxes and fees.\",\n            \"format\": \"double\"\n          },\n          \"packageId\": {\n            \"type\": \"string\",\n            \"description\": \"Package identifier from state tracking system for compliance documentation.\",\n            \"nullable\": true\n          },\n          \"externalPackageId\": {\n            \"type\": \"string\",\n            \"description\": \"External package identifier for cross-system tracking and integration.\",\n            \"nullable\": true\n          },\n          \"batchName\": {\n            \"type\": \"string\",\n            \"description\": \"Batch name for lot tracking and quality control management.\",\n            \"nullable\": true\n          },\n          \"batchId\": {\n            \"type\": \"integer\",\n            \"description\": \"Batch identifier for database references and batch tracking.\",\n            \"format\": \"int32\",\n            \"nullable\": true\n          },\n          \"room\": {\n            \"type\": \"string\",\n            \"description\": \"Room name for facility location identification and display.\",\n            \"nullable\": true\n          },\n          \"roomId\": {\n            \"type\": \"integer\",\n            \"description\": \"Room identifier for database references and location tracking.\",\n            \"format\": \"int32\",\n            \"nullable\": true\n          }\n        },\n        \"additionalProperties\": false,\n        \"description\": \"Response model representing received cannabis inventory items with complete tracking and financial information.\"\n      },\n      \"RegisterAdjustment\": {\n        \"type\": \"object\",\n        \"properties\": {\n          \"adjustmentId\": {\n            \"type\": \"integer\",\n            \"description\": \"Unique identifier for the register adjustment transaction.\\nPrimary key for tracking and referencing specific adjustment records.\",\n            \"format\": \"int32\"\n          },\n          \"adjustmentType\": {\n            \"type\": \"string\",\n            \"description\": \"Type of register adjustment being performed.\\nCommon values include \\\"Adjustment\\\", \\\"Close Out\\\", \\\"Deposit\\\", \\\"Withdrawal\\\", \\\"Cash Drop\\\".\",\n            \"nullable\": true\n          },\n          \"adjustmentAmount\": {\n            \"type\": \"number\",\n            \"description\": \"Dollar amount of the register adjustment (positive or negative).\\nPositive values indicate cash added to register, negative values indicate cash removed.\",\n            \"format\": \"double\"\n          },\n          \"adjustedBy\": {\n            \"type\": \"string\",\n            \"description\": \"Name of the employee who performed the register adjustment.\\nUsed for accountability and audit trail purposes.\",\n            \"nullable\": true\n          },\n          \"adjustedOn\": {\n            \"type\": \"string\",\n            \"description\": \"Date and time when the register adjustment was performed (optional).\\nTimestamp for audit trail and reconciliation purposes.\",\n            \"format\": \"date-time\",\n            \"nullable\": true\n          },\n          \"terminalName\": {\n            \"type\": \"string\",\n            \"description\": \"Name of the register/terminal where the adjustment occurred.\\nIdentifies which physical register or point-of-sale terminal was adjusted.\",\n            \"nullable\": true\n          },\n          \"terminalId\": {\n            \"type\": \"integer\",\n            \"description\": \"Unique identifier for the register/terminal where the adjustment occurred.\\nNumeric identifier for the specific point-of-sale terminal.\",\n            \"format\": \"int32\"\n          },\n          \"adjustedByEmployeeId\": {\n            \"type\": \"integer\",\n            \"description\": \"Employee ID of the staff member who performed the adjustment.\\nNumeric identifier linking to the employee record for accountability.\",\n            \"format\": \"int32\"\n          },\n          \"adjustmentReason\": {\n            \"type\": \"string\",\n            \"description\": \"Reason code or description for why the adjustment was made.\\nProvides business justification for the cash adjustment.\",\n            \"nullable\": true\n          },\n          \"comment\": {\n            \"type\": \"string\",\n            \"description\": \"Additional comments or notes about the register adjustment (optional).\\nFree-text field for additional details or explanations.\",\n            \"nullable\": true\n          }\n        },\n        \"additionalProperties\": false,\n        \"description\": \"Represents a register cash adjustment transaction record for financial reconciliation and audit trails.\\n\\nRegister adjustments include manual cash corrections, deposits, withdrawals, close-outs, and other\\ncash management activities that affect register balances. Each adjustment maintains a complete\\naudit trail with employee accountability and reason tracking.\"\n      },\n      \"RegisterCashSummary\": {\n        \"type\": \"object\",\n        \"properties\": {\n          \"terminalName\": {\n            \"type\": \"string\",\n            \"description\": \"Name of the register/terminal for which this cash summary applies.\\nIdentifies the specific point-of-sale terminal or register location.\",\n            \"nullable\": true\n          },\n          \"startingBalance\": {\n            \"type\": \"number\",\n            \"description\": \"Starting cash balance for the register at the beginning of the period.\\nBase amount of cash in the register before any transactions occurred.\",\n            \"format\": \"double\"\n          },\n          \"endingBalance\": {\n            \"type\": \"number\",\n            \"description\": \"Ending cash balance for the register at the end of the period.\\nFinal amount of cash in the register after all transactions and adjustments.\",\n            \"format\": \"double\"\n          },\n          \"sales\": {\n            \"type\": \"number\",\n            \"description\": \"Total cash sales processed through the register during the period.\\nIncludes all cash payments received for customer transactions.\",\n            \"format\": \"double\"\n          },\n          \"returns\": {\n            \"type\": \"number\",\n            \"description\": \"Total cash refunds and returns processed during the period.\\nRepresents cash paid out to customers for returned merchandise.\",\n            \"format\": \"double\"\n          },\n          \"deposits\": {\n            \"type\": \"number\",\n            \"description\": \"Total cash deposits added to the register during the period.\\nIncludes cash added to the register for operational purposes.\",\n            \"format\": \"double\"\n          },\n          \"adjustments\": {\n            \"type\": \"number\",\n            \"description\": \"Total register adjustments (positive or negative) made during the period.\\nIncludes manual cash corrections, withdrawals, and balancing entries.\",\n            \"format\": \"double\"\n          },\n          \"overShort\": {\n            \"type\": \"number\",\n            \"description\": \"Cash variance (over or short) compared to expected register balance.\\nPositive values indicate cash overage, negative values indicate shortage.\",\n            \"format\": \"double\"\n          }\n        },\n        \"additionalProperties\": false,\n        \"description\": \"Represents a comprehensive cash flow summary for a specific register terminal.\\n\\nThis model provides real-time cash reconciliation data including starting balances,\\ntransaction activity, and variance calculations for cash management and balancing\\npurposes. Used for end-of-shift reconciliation and cash discrepancy identification.\"\n      },\n      \"RegisterTransaction\": {\n        \"type\": \"object\",\n        \"properties\": {\n          \"registerTransactionId\": {\n            \"type\": \"integer\",\n            \"description\": \"Unique identifier for the register transaction record.\\nPrimary key for tracking and referencing specific transaction activities.\",\n            \"format\": \"int32\"\n          },\n          \"transactionType\": {\n            \"type\": \"string\",\n            \"description\": \"Type of register transaction being recorded.\\nExamples include \\\"Sale\\\", \\\"Adjustment\\\", \\\"Close Out\\\", \\\"Deposit\\\", \\\"Withdrawal\\\", \\\"Return\\\", \\\"Payment\\\".\",\n            \"nullable\": true\n          },\n          \"transactionAmount\": {\n            \"type\": \"number\",\n            \"description\": \"Dollar amount of the register transaction (positive or negative).\\nRepresents the financial impact of the transaction on register balances.\",\n            \"format\": \"double\"\n          },\n          \"transactionBy\": {\n            \"type\": \"string\",\n            \"description\": \"Name of the employee who processed the register transaction.\\nUsed for accountability and performance tracking.\",\n            \"nullable\": true\n          },\n          \"transactionDateUTC\": {\n            \"type\": \"string\",\n            \"description\": \"Date and time when the register transaction occurred in UTC (optional).\\nTimestamp for audit trail and financial reconciliation purposes.\",\n            \"format\": \"date-time\",\n            \"nullable\": true\n          },\n          \"transactionId\": {\n            \"type\": \"integer\",\n            \"description\": \"Reference to the associated business transaction ID (optional).\\nLinks register activity to customer sales transactions when applicable.\",\n            \"format\": \"int32\",\n            \"nullable\": true\n          },\n          \"terminalName\": {\n            \"type\": \"string\",\n            \"description\": \"Name of the register/terminal where the transaction was processed.\\nIdentifies which physical register or point-of-sale terminal handled the transaction.\",\n            \"nullable\": true\n          },\n          \"terminalId\": {\n            \"type\": \"integer\",\n            \"description\": \"Unique identifier for the register/terminal where the transaction occurred.\\nNumeric identifier for the specific point-of-sale terminal.\",\n            \"format\": \"int32\"\n          },\n          \"transactionByEmployeeId\": {\n            \"type\": \"integer\",\n            \"description\": \"Employee ID of the staff member who processed the transaction.\\nNumeric identifier linking to the employee record for accountability tracking.\",\n            \"format\": \"int32\"\n          },\n          \"adjustmentReason\": {\n            \"type\": \"string\",\n            \"description\": \"Reason code or description for adjustment transactions (optional).\\nProvides business justification when the transaction is an adjustment or correction.\",\n            \"nullable\": true\n          },\n          \"comment\": {\n            \"type\": \"string\",\n            \"description\": \"Additional comments or notes about the register transaction (optional).\\nFree-text field for additional context or explanations.\",\n            \"nullable\": true\n          }\n        },\n        \"additionalProperties\": false,\n        \"description\": \"Represents a comprehensive register transaction record including sales, adjustments, and cash management activities.\\n\\nThis model encompasses all types of register activity including customer sales transactions, cash adjustments,\\npayment processing, register maintenance, and operational activities. Each transaction maintains complete\\naudit trails with employee accountability and detailed financial information.\"\n      },\n      \"RegulatoryCategory\": {\n        \"type\": \"object\",\n        \"properties\": {\n          \"regulatoryCategoryId\": {\n            \"type\": \"integer\",\n            \"description\": \"Unique identifier for the regulatory category.\",\n            \"format\": \"int32\"\n          },\n          \"regulatoryCategoryName\": {\n            \"type\": \"string\",\n            \"description\": \"Display name of the regulatory category as defined by state cannabis regulations.\",\n            \"nullable\": true\n          }\n        },\n        \"additionalProperties\": false,\n        \"description\": \"Regulatory category model containing state-mandated product classification information for cannabis compliance and reporting.\"\n      },\n      \"ReportingDiscountDetail\": {\n        \"type\": \"object\",\n        \"properties\": {\n          \"isAvailableOnline\": {\n            \"type\": \"boolean\",\n            \"description\": \"Indicates if discount is available for online/e-commerce ordering.\"\n          },\n          \"applicationMethod\": {\n            \"type\": \"string\",\n            \"description\": \"Method used to apply the discount in the system.\",\n            \"nullable\": true\n          },\n          \"externalId\": {\n            \"type\": \"string\",\n            \"description\": \"External system identifier for integration mapping.\",\n            \"nullable\": true\n          },\n          \"requireManagerApproval\": {\n            \"type\": \"boolean\",\n            \"description\": \"Indicates if discount application requires manager approval.\"\n          },\n          \"isDeleted\": {\n            \"type\": \"boolean\",\n            \"description\": \"Indicates if discount has been marked as deleted.\"\n          },\n          \"appliesToLocations\": {\n            \"type\": \"array\",\n            \"items\": {\n              \"$ref\": \"#/components/schemas/LocationMapping\"\n            },\n            \"description\": \"Collection of location mappings where this discount applies.\",\n            \"nullable\": true\n          },\n          \"discountId\": {\n            \"type\": \"integer\",\n            \"description\": \"Unique identifier for the discount.\",\n            \"format\": \"int32\"\n          },\n          \"discountName\": {\n            \"type\": \"string\",\n            \"description\": \"Display name of the discount for customer-facing applications.\",\n            \"nullable\": true\n          },\n          \"discountAmount\": {\n            \"type\": \"number\",\n            \"description\": \"Monetary discount amount or percentage value.\",\n            \"format\": \"double\"\n          },\n          \"discountCode\": {\n            \"type\": \"string\",\n            \"description\": \"Promotional code required to apply the discount (optional).\",\n            \"nullable\": true\n          },\n          \"discountType\": {\n            \"type\": \"string\",\n            \"description\": \"Type classification of the discount (e.g., percentage, fixed amount).\",\n            \"nullable\": true\n          },\n          \"discountMethod\": {\n            \"type\": \"string\",\n            \"description\": \"Method used to apply the discount (e.g., automatic, code required).\",\n            \"nullable\": true\n          },\n          \"isActive\": {\n            \"type\": \"boolean\",\n            \"description\": \"Indicates if the discount is currently active and available.\"\n          },\n          \"validFrom\": {\n            \"type\": \"string\",\n            \"description\": \"Start date and time when discount becomes valid (UTC converted from Eastern Time).\",\n            \"format\": \"date-time\",\n            \"nullable\": true\n          },\n          \"validUntil\": {\n            \"type\": \"string\",\n            \"description\": \"End date and time when discount expires (UTC converted from Eastern Time).\",\n            \"format\": \"date-time\",\n            \"nullable\": true\n          },\n          \"thresholdType\": {\n            \"type\": \"string\",\n            \"description\": \"Type of threshold requirement for discount eligibility (optional).\",\n            \"nullable\": true\n          },\n          \"minimumItemsRequired\": {\n            \"type\": \"number\",\n            \"description\": \"Minimum number of qualifying items required for discount application (optional).\",\n            \"format\": \"double\",\n            \"nullable\": true\n          },\n          \"maximumItemsAllowed\": {\n            \"type\": \"number\",\n            \"description\": \"Maximum number of items that can receive the discount (optional).\",\n            \"format\": \"double\",\n            \"nullable\": true\n          },\n          \"maximumUsageCount\": {\n            \"type\": \"number\",\n            \"description\": \"Maximum number of times this discount can be used (optional).\",\n            \"format\": \"double\",\n            \"nullable\": true\n          },\n          \"includeNonCannabis\": {\n            \"type\": \"boolean\",\n            \"description\": \"Indicates if discount applies to non-cannabis products.\"\n          },\n          \"firstTimeCustomerOnly\": {\n            \"type\": \"boolean\",\n            \"description\": \"Indicates if discount is restricted to first-time customers only.\"\n          },\n          \"stackOnOtherDiscounts\": {\n            \"type\": \"boolean\",\n            \"description\": \"Indicates if discount can be combined with other discounts.\"\n          },\n          \"weeklyRecurrenceInfo\": {\n            \"$ref\": \"#/components/schemas/WeeklyRecurrenceInfo\"\n          },\n          \"products\": {\n            \"$ref\": \"#/components/schemas/DiscountRestriction\"\n          },\n          \"productCategories\": {\n            \"$ref\": \"#/components/schemas/DiscountRestriction\"\n          },\n          \"brands\": {\n            \"$ref\": \"#/components/schemas/DiscountRestriction\"\n          },\n          \"vendors\": {\n            \"$ref\": \"#/components/schemas/DiscountRestriction\"\n          },\n          \"strains\": {\n            \"$ref\": \"#/components/schemas/DiscountRestriction\"\n          },\n          \"tiers\": {\n            \"$ref\": \"#/components/schemas/DiscountRestriction\"\n          },\n          \"tags\": {\n            \"$ref\": \"#/components/schemas/DiscountRestriction\"\n          },\n          \"inventoryTags\": {\n            \"$ref\": \"#/components/schemas/DiscountRestriction\"\n          },\n          \"customerTypes\": {\n            \"$ref\": \"#/components/schemas/DiscountRestriction\"\n          },\n          \"discountGroups\": {\n            \"type\": \"array\",\n            \"items\": {\n              \"$ref\": \"#/components/schemas/DiscountGroup\"\n            },\n            \"description\": \"Associated discount groups for bundling and organization (loaded conditionally).\",\n            \"nullable\": true\n          }\n        },\n        \"additionalProperties\": false,\n        \"description\": \"Extended discount model with additional reporting and administrative properties for internal operations.\"\n      },\n      \"ReportingInventoryItem\": {\n        \"type\": \"object\",\n        \"properties\": {\n          \"unitWeightUnit\": {\n            \"type\": \"string\",\n            \"description\": \"Unit of measurement for unit weight, always \\\"g\\\" (grams).\",\n            \"nullable\": true\n          },\n          \"unitCost\": {\n            \"type\": \"number\",\n            \"description\": \"Unit cost of the inventory item for cost of goods sold calculations (in USD).\",\n            \"format\": \"double\",\n            \"nullable\": true\n          },\n          \"allocatedQuantity\": {\n            \"type\": \"number\",\n            \"description\": \"Quantity of inventory allocated to orders or transfers but not yet fulfilled.\",\n            \"format\": \"double\",\n            \"nullable\": true\n          },\n          \"inventoryId\": {\n            \"type\": \"integer\",\n            \"description\": \"Unique inventory record identifier for this specific inventory item.\",\n            \"format\": \"int32\"\n          },\n          \"productId\": {\n            \"type\": \"integer\",\n            \"description\": \"Product identifier linking this inventory to the product catalog.\",\n            \"format\": \"int32\"\n          },\n          \"sku\": {\n            \"type\": \"string\",\n            \"description\": \"Stock Keeping Unit (SKU) code for inventory tracking and identification.\",\n            \"nullable\": true\n          },\n          \"productName\": {\n            \"type\": \"string\",\n            \"description\": \"Display name of the product for customer-facing applications.\",\n            \"nullable\": true\n          },\n          \"description\": {\n            \"type\": \"string\",\n            \"description\": \"Detailed product description including effects, characteristics, and usage information.\",\n            \"nullable\": true\n          },\n          \"categoryId\": {\n            \"type\": \"integer\",\n            \"description\": \"Category identifier for product classification (optional).\",\n            \"format\": \"int32\",\n            \"nullable\": true\n          },\n          \"category\": {\n            \"type\": \"string\",\n            \"description\": \"Category name for product classification and filtering.\",\n            \"nullable\": true\n          },\n          \"imageUrl\": {\n            \"type\": \"string\",\n            \"description\": \"URL path to product image for display purposes.\",\n            \"nullable\": true\n          },\n          \"quantityAvailable\": {\n            \"type\": \"number\",\n            \"description\": \"Current available quantity for sale or transfer.\",\n            \"format\": \"double\"\n          },\n          \"quantityUnits\": {\n            \"type\": \"string\",\n            \"description\": \"Unit of measurement for the available quantity (e.g., \\\"g\\\", \\\"mg\\\", \\\"ea\\\").\",\n            \"nullable\": true\n          },\n          \"unitWeight\": {\n            \"type\": \"number\",\n            \"description\": \"Weight per unit in grams for dosing and compliance calculations.\",\n            \"format\": \"double\"\n          },\n          \"flowerEquivalent\": {\n            \"type\": \"number\",\n            \"description\": \"Flower equivalent amount in grams for compliance tracking.\",\n            \"format\": \"double\"\n          },\n          \"recFlowerEquivalent\": {\n            \"type\": \"number\",\n            \"description\": \"Recreational flower equivalent amount in grams (optional).\",\n            \"format\": \"double\",\n            \"nullable\": true\n          },\n          \"flowerEquivalentUnits\": {\n            \"type\": \"string\",\n            \"description\": \"Unit of measurement for flower equivalent, always \\\"g\\\" (grams).\",\n            \"nullable\": true,\n            \"readOnly\": true\n          },\n          \"batchId\": {\n            \"type\": \"integer\",\n            \"description\": \"Batch identifier for lot tracking and quality control.\",\n            \"format\": \"int32\"\n          },\n          \"batchName\": {\n            \"type\": \"string\",\n            \"description\": \"Human-readable batch name or lot number for tracking.\",\n            \"nullable\": true\n          },\n          \"packageId\": {\n            \"type\": \"string\",\n            \"description\": \"Package identifier for compliance tracking and traceability.\",\n            \"nullable\": true\n          },\n          \"packageStatus\": {\n            \"type\": \"string\",\n            \"description\": \"Current status of the package (e.g., \\\"Active\\\", \\\"Testing\\\", \\\"Quarantine\\\").\",\n            \"nullable\": true\n          },\n          \"unitPrice\": {\n            \"type\": \"number\",\n            \"description\": \"Base unit price for retail sales.\",\n            \"format\": \"double\"\n          },\n          \"medUnitPrice\": {\n            \"type\": \"number\",\n            \"description\": \"Medical program pricing (optional, different from retail).\",\n            \"format\": \"double\",\n            \"nullable\": true\n          },\n          \"recUnitPrice\": {\n            \"type\": \"number\",\n            \"description\": \"Recreational program pricing (optional, different from medical).\",\n            \"format\": \"double\",\n            \"nullable\": true\n          },\n          \"strainId\": {\n            \"type\": \"integer\",\n            \"description\": \"Strain identifier for cannabis products (optional).\",\n            \"format\": \"int32\",\n            \"nullable\": true\n          },\n          \"strain\": {\n            \"type\": \"string\",\n            \"description\": \"Strain name for cannabis products.\",\n            \"nullable\": true\n          },\n          \"strainType\": {\n            \"type\": \"string\",\n            \"description\": \"Cannabis strain classification (Hybrid, Indica, Sativa, CBD).\",\n            \"nullable\": true\n          },\n          \"size\": {\n            \"type\": \"string\",\n            \"description\": \"Product size designation for packaging and dosing information.\",\n            \"nullable\": true\n          },\n          \"labResults\": {\n            \"type\": \"array\",\n            \"items\": {\n              \"$ref\": \"#/components/schemas/LabResult\"\n            },\n            \"description\": \"Collection of laboratory test results for this batch (included when includeLabResults=true).\",\n            \"nullable\": true\n          },\n          \"testedDate\": {\n            \"type\": \"string\",\n            \"description\": \"Date when laboratory testing was completed (optional).\",\n            \"format\": \"date-time\",\n            \"nullable\": true\n          },\n          \"sampleDate\": {\n            \"type\": \"string\",\n            \"description\": \"Date when sample was collected for laboratory testing (optional).\",\n            \"format\": \"date-time\",\n            \"nullable\": true\n          },\n          \"packagedDate\": {\n            \"type\": \"string\",\n            \"description\": \"Date when product was packaged for distribution (optional).\",\n            \"format\": \"date-time\",\n            \"nullable\": true\n          },\n          \"manufacturingDate\": {\n            \"type\": \"string\",\n            \"description\": \"Date when product was manufactured or produced (optional).\",\n            \"format\": \"date-time\",\n            \"nullable\": true\n          },\n          \"lastModifiedDateUtc\": {\n            \"type\": \"string\",\n            \"description\": \"Last modification timestamp in UTC for data synchronization.\",\n            \"format\": \"date-time\",\n            \"nullable\": true\n          },\n          \"labTestStatus\": {\n            \"type\": \"string\",\n            \"description\": \"Current status of laboratory testing (e.g., \\\"Passed\\\", \\\"Failed\\\", \\\"Pending\\\").\",\n            \"nullable\": true\n          },\n          \"vendorId\": {\n            \"type\": \"integer\",\n            \"description\": \"Vendor identifier for the supplier of this inventory (optional).\",\n            \"format\": \"int32\",\n            \"nullable\": true\n          },\n          \"vendor\": {\n            \"type\": \"string\",\n            \"description\": \"Vendor name for the supplier of this inventory.\",\n            \"nullable\": true\n          },\n          \"expirationDate\": {\n            \"type\": \"string\",\n            \"description\": \"Product expiration date for compliance and quality control (optional).\",\n            \"format\": \"date-time\",\n            \"nullable\": true\n          },\n          \"roomQuantities\": {\n            \"type\": \"array\",\n            \"items\": {\n              \"$ref\": \"#/components/schemas/InventoryRoomQuantity\"\n            },\n            \"description\": \"Quantity breakdown by storage room/location (included when includeRoomQuantities=true).\",\n            \"nullable\": true\n          },\n          \"pricingTierName\": {\n            \"type\": \"string\",\n            \"description\": \"Pricing tier classification for bulk pricing strategies.\",\n            \"nullable\": true\n          },\n          \"alternateName\": {\n            \"type\": \"string\",\n            \"description\": \"Alternative product name for display purposes.\",\n            \"nullable\": true\n          },\n          \"tags\": {\n            \"type\": \"array\",\n            \"items\": {\n              \"$ref\": \"#/components/schemas/InventoryTag\"\n            },\n            \"description\": \"Collection of compliance tags associated with this inventory package.\",\n            \"nullable\": true\n          },\n          \"brandId\": {\n            \"type\": \"integer\",\n            \"description\": \"Brand identifier for branded products (optional).\",\n            \"format\": \"int32\",\n            \"nullable\": true\n          },\n          \"brandName\": {\n            \"type\": \"string\",\n            \"description\": \"Brand name for branded products.\",\n            \"nullable\": true\n          },\n          \"medicalOnly\": {\n            \"type\": \"boolean\",\n            \"description\": \"Indicates if product is restricted to medical program only.\"\n          },\n          \"externalPackageId\": {\n            \"type\": \"string\",\n            \"description\": \"External compliance system ID (METRC or BioTrack) for regulatory tracking.\",\n            \"nullable\": true\n          },\n          \"producer\": {\n            \"type\": \"string\",\n            \"description\": \"Producer name for cultivation and manufacturing tracking.\",\n            \"nullable\": true\n          },\n          \"producerId\": {\n            \"type\": \"integer\",\n            \"description\": \"Producer identifier for cultivation and manufacturing tracking (optional).\",\n            \"format\": \"int32\",\n            \"nullable\": true\n          },\n          \"lineage\": {\n            \"type\": \"array\",\n            \"items\": {\n              \"$ref\": \"#/components/schemas/PackageLineage\"\n            },\n            \"description\": \"Package lineage information for traceability and compliance tracking.\",\n            \"nullable\": true\n          },\n          \"potencyIndicator\": {\n            \"type\": \"string\",\n            \"description\": \"Potency classification indicator for dosing guidance.\",\n            \"nullable\": true\n          },\n          \"masterCategory\": {\n            \"type\": \"string\",\n            \"description\": \"Master category classification for product grouping.\",\n            \"nullable\": true\n          },\n          \"effectivePotencyMg\": {\n            \"type\": \"number\",\n            \"description\": \"Effective potency in milligrams for dosing calculations (optional).\",\n            \"format\": \"double\",\n            \"nullable\": true\n          },\n          \"isCannabis\": {\n            \"type\": \"boolean\",\n            \"description\": \"Indicates if product contains cannabis or is cannabis-related.\"\n          },\n          \"packageNDC\": {\n            \"type\": \"string\",\n            \"description\": \"National Drug Code for pharmaceutical tracking (optional).\",\n            \"nullable\": true\n          },\n          \"labResultUrl\": {\n            \"type\": \"string\",\n            \"description\": \"URL to certificate of analysis or lab testing document.\",\n            \"nullable\": true\n          }\n        },\n        \"additionalProperties\": false,\n        \"description\": \"Extended inventory item model for financial reporting with cost and allocation data.\"\n      },\n      \"RetagPlantRequest\": {\n        \"type\": \"object\",\n        \"properties\": {\n          \"plantId\": {\n            \"type\": \"integer\",\n            \"description\": \"Plant identifier for the cannabis plant being retagged with a new serial number.\",\n            \"format\": \"int32\"\n          },\n          \"serialNumber\": {\n            \"type\": \"string\",\n            \"description\": \"New serial number for the plant identification tag replacement.\",\n            \"nullable\": true\n          }\n        },\n        \"additionalProperties\": false,\n        \"description\": \"Request model for retagging cannabis plants with new serial numbers for compliance and tracking updates.\"\n      },\n      \"RetireImmaturePlantsDetails\": {\n        \"type\": \"object\",\n        \"properties\": {\n          \"batchId\": {\n            \"type\": \"integer\",\n            \"description\": \"Batch identifier for the plant batch containing plants to be retired.\",\n            \"format\": \"int32\"\n          },\n          \"countToRetire\": {\n            \"type\": \"integer\",\n            \"description\": \"Number of plants to retire from the specified batch.\",\n            \"format\": \"int32\"\n          },\n          \"reasonCode\": {\n            \"type\": \"string\",\n            \"description\": \"Standardized reason code for the plant retirement (e.g., \\\"DISEASE\\\", \\\"PEST\\\", \\\"POOR_HEALTH\\\", \\\"CONTAMINATION\\\").\",\n            \"nullable\": true\n          },\n          \"retireDate\": {\n            \"type\": \"string\",\n            \"description\": \"Date when the plants were retired for cultivation timeline documentation.\",\n            \"format\": \"date-time\",\n            \"nullable\": true\n          }\n        },\n        \"additionalProperties\": false,\n        \"description\": \"Detailed specification for retiring immature plants from cultivation batches with compliance documentation.\"\n      },\n      \"RetireImmaturePlantsRequest\": {\n        \"type\": \"object\",\n        \"properties\": {\n          \"plants\": {\n            \"type\": \"array\",\n            \"items\": {\n              \"$ref\": \"#/components/schemas/RetireImmaturePlantsDetails\"\n            },\n            \"description\": \"Collection of plant retirement specifications for batch processing of plant removals.\",\n            \"nullable\": true\n          }\n        },\n        \"additionalProperties\": false,\n        \"description\": \"Request model for retiring immature cannabis plants due to loss, contamination, or quality issues.\"\n      },\n      \"RetirePlantRequest\": {\n        \"type\": \"object\",\n        \"properties\": {\n          \"plantIds\": {\n            \"type\": \"array\",\n            \"items\": {\n              \"type\": \"integer\",\n              \"format\": \"int32\"\n            },\n            \"nullable\": true\n          },\n          \"reasonId\": {\n            \"type\": \"integer\",\n            \"format\": \"int32\",\n            \"nullable\": true\n          },\n          \"reasonCode\": {\n            \"type\": \"string\",\n            \"nullable\": true\n          },\n          \"wasteType\": {\n            \"type\": \"string\",\n            \"nullable\": true\n          },\n          \"roomId\": {\n            \"type\": \"integer\",\n            \"format\": \"int32\"\n          },\n          \"wasteWeight\": {\n            \"type\": \"number\",\n            \"format\": \"double\",\n            \"nullable\": true\n          },\n          \"comment\": {\n            \"type\": \"string\",\n            \"nullable\": true\n          },\n          \"wastePackageId\": {\n            \"type\": \"string\",\n            \"nullable\": true\n          },\n          \"wasteDate\": {\n            \"type\": \"string\",\n            \"format\": \"date-time\",\n            \"nullable\": true\n          },\n          \"plantWeight\": {\n            \"type\": \"number\",\n            \"format\": \"double\",\n            \"nullable\": true\n          },\n          \"plantWeightUnitId\": {\n            \"type\": \"integer\",\n            \"format\": \"int32\",\n            \"nullable\": true\n          },\n          \"wasteMaterial\": {\n            \"type\": \"string\",\n            \"nullable\": true\n          },\n          \"wasteReason\": {\n            \"type\": \"string\",\n            \"nullable\": true\n          },\n          \"wasteMethod\": {\n            \"type\": \"string\",\n            \"nullable\": true\n          },\n          \"reasonNote\": {\n            \"type\": \"string\",\n            \"nullable\": true\n          },\n          \"emptyCloneGroup\": {\n            \"type\": \"boolean\"\n          }\n        },\n        \"additionalProperties\": false\n      },\n      \"Room\": {\n        \"type\": \"object\",\n        \"properties\": {\n          \"roomId\": {\n            \"type\": \"integer\",\n            \"description\": \"Unique identifier for the cultivation room or facility area.\\n**Required for updates, null/0 for new room creation.**\",\n            \"format\": \"int32\",\n            \"nullable\": true\n          },\n          \"roomName\": {\n            \"type\": \"string\",\n            \"description\": \"Human-readable name for room identification and cultivation tracking.\\n**Required for both create and update operations.**\",\n            \"nullable\": true\n          },\n          \"isQuarantineRoom\": {\n            \"type\": \"boolean\",\n            \"description\": \"Indicates if this room is designated for quarantine operations and compliance isolation.\"\n          },\n          \"isVaultRoom\": {\n            \"type\": \"boolean\",\n            \"description\": \"Indicates if this room is designated as a secure vault for valuable inventory storage.\"\n          },\n          \"isWaitingRoom\": {\n            \"type\": \"boolean\",\n            \"description\": \"Indicates if this room is designated as a customer waiting area.\"\n          },\n          \"isSalesFloor\": {\n            \"type\": \"boolean\",\n            \"description\": \"Indicates if this room is designated as the main sales floor for customer transactions.\"\n          },\n          \"isPOSRoom\": {\n            \"type\": \"boolean\",\n            \"description\": \"Indicates if this room is designated for point-of-sale operations and transactions.\"\n          },\n          \"isInventoryRoom\": {\n            \"type\": \"boolean\",\n            \"description\": \"Indicates if this room is designated for inventory storage and management.\"\n          },\n          \"isPreOrderRoom\": {\n            \"type\": \"boolean\",\n            \"description\": \"Indicates if this room is designated for pre-order fulfillment operations.\"\n          },\n          \"isEcommerceRoom\": {\n            \"type\": \"boolean\",\n            \"description\": \"Indicates if this room is designated for e-commerce order processing and fulfillment.\"\n          }\n        },\n        \"additionalProperties\": false,\n        \"description\": \"Cultivation room model containing facility area configuration information for cannabis operations and facility management.\"\n      },\n      \"RoomWaste\": {\n        \"type\": \"object\",\n        \"properties\": {\n          \"wasteId\": {\n            \"type\": \"integer\",\n            \"description\": \"Unique identifier for the waste record.\",\n            \"format\": \"int32\",\n            \"nullable\": true\n          },\n          \"referenceNo\": {\n            \"type\": \"string\",\n            \"description\": \"Reference number for waste tracking and documentation.\",\n            \"nullable\": true\n          },\n          \"comments\": {\n            \"type\": \"string\",\n            \"description\": \"Additional comments or notes about the waste disposal.\",\n            \"nullable\": true\n          },\n          \"wasteDate\": {\n            \"type\": \"string\",\n            \"description\": \"Date when the waste disposal occurred.\",\n            \"format\": \"date-time\",\n            \"nullable\": true\n          },\n          \"wasteType\": {\n            \"type\": \"string\",\n            \"description\": \"Type or category of waste material being disposed.\",\n            \"nullable\": true\n          },\n          \"roomId\": {\n            \"type\": \"integer\",\n            \"description\": \"Identifier for the room or facility area where waste originated.\",\n            \"format\": \"int32\"\n          },\n          \"wasteAmount\": {\n            \"type\": \"number\",\n            \"description\": \"Quantity of waste material being disposed.\",\n            \"format\": \"double\"\n          },\n          \"unitId\": {\n            \"type\": \"integer\",\n            \"description\": \"Unit of measurement identifier for the waste amount.\",\n            \"format\": \"int32\"\n          }\n        },\n        \"additionalProperties\": false,\n        \"description\": \"Room-based waste record model for facility waste disposal tracking and compliance documentation.\"\n      },\n      \"SavedReceive\": {\n        \"type\": \"object\",\n        \"properties\": {\n          \"receiveInventoryHistoryId\": {\n            \"type\": \"integer\",\n            \"description\": \"Unique identifier for the created receive inventory transaction.\",\n            \"format\": \"int32\"\n          }\n        },\n        \"additionalProperties\": false,\n        \"description\": \"Response model for successful inventory receive order creation operations.\"\n      },\n      \"SetImageRequest\": {\n        \"required\": [\"base64Image\", \"fileName\", \"productId\"],\n        \"type\": \"object\",\n        \"properties\": {\n          \"productId\": {\n            \"type\": \"integer\",\n            \"description\": \"The unique identifier of the product to associate the image with.\",\n            \"format\": \"int32\"\n          },\n          \"base64Image\": {\n            \"minLength\": 1,\n            \"type\": \"string\",\n            \"description\": \"Base64-encoded string representation of the image file data.\"\n          },\n          \"fileName\": {\n            \"minLength\": 1,\n            \"type\": \"string\",\n            \"description\": \"Original filename of the image including file extension for proper handling.\"\n          },\n          \"image\": {\n            \"type\": \"string\",\n            \"description\": \"Computed property that converts the Base64Image string to byte array for processing.\",\n            \"format\": \"byte\",\n            \"nullable\": true,\n            \"readOnly\": true\n          },\n          \"fileType\": {\n            \"$ref\": \"#/components/schemas/UploadFileType\"\n          }\n        },\n        \"additionalProperties\": false,\n        \"description\": \"Request model for setting a product image through the product image management API.\"\n      },\n      \"SetImageResponse\": {\n        \"type\": \"object\",\n        \"properties\": {\n          \"imageId\": {\n            \"type\": \"integer\",\n            \"description\": \"Unique identifier assigned to the uploaded image for tracking and reference.\",\n            \"format\": \"int32\"\n          },\n          \"imageUrl\": {\n            \"type\": \"string\",\n            \"description\": \"Public URL where the uploaded image can be accessed and displayed.\",\n            \"nullable\": true\n          }\n        },\n        \"additionalProperties\": false,\n        \"description\": \"Response model for successful product image upload operations.\"\n      },\n      \"Severity\": {\n        \"enum\": [0, 1, 2],\n        \"type\": \"integer\",\n        \"format\": \"int32\"\n      },\n      \"Size\": {\n        \"type\": \"object\",\n        \"properties\": {\n          \"sizeId\": {\n            \"type\": \"integer\",\n            \"description\": \"Unique identifier for the product size configuration.\",\n            \"format\": \"int32\"\n          },\n          \"sizeName\": {\n            \"type\": \"string\",\n            \"description\": \"Display name for the product size.\",\n            \"nullable\": true\n          },\n          \"description\": {\n            \"type\": \"string\",\n            \"description\": \"Detailed description of the product size and its usage.\",\n            \"nullable\": true\n          }\n        },\n        \"additionalProperties\": false,\n        \"description\": \"Represents a product size configuration for cannabis products within an organization.\"\n      },\n      \"SplitBatchDetails\": {\n        \"type\": \"object\",\n        \"properties\": {\n          \"newBatchName\": {\n            \"type\": \"string\",\n            \"nullable\": true\n          },\n          \"batchId\": {\n            \"type\": \"integer\",\n            \"format\": \"int32\"\n          },\n          \"location\": {\n            \"type\": \"string\",\n            \"nullable\": true\n          },\n          \"strain\": {\n            \"type\": \"string\",\n            \"nullable\": true\n          },\n          \"quantity\": {\n            \"type\": \"integer\",\n            \"format\": \"int32\"\n          },\n          \"splitDate\": {\n            \"type\": \"string\",\n            \"format\": \"date-time\",\n            \"nullable\": true\n          }\n        },\n        \"additionalProperties\": false\n      },\n      \"SplitImmaturePlantResult\": {\n        \"type\": \"object\",\n        \"properties\": {\n          \"batch\": {\n            \"type\": \"array\",\n            \"items\": {\n              \"$ref\": \"#/components/schemas/SplitImmaturePlantResultDetail\"\n            },\n            \"nullable\": true\n          },\n          \"plant\": {\n            \"type\": \"array\",\n            \"items\": {\n              \"$ref\": \"#/components/schemas/SplitImmaturePlantResultDetail\"\n            },\n            \"nullable\": true\n          }\n        },\n        \"additionalProperties\": false\n      },\n      \"SplitImmaturePlantResultApiResult\": {\n        \"type\": \"object\",\n        \"properties\": {\n          \"result\": {\n            \"type\": \"boolean\"\n          },\n          \"message\": {\n            \"type\": \"string\",\n            \"nullable\": true\n          },\n          \"data\": {\n            \"$ref\": \"#/components/schemas/SplitImmaturePlantResult\"\n          }\n        },\n        \"additionalProperties\": false\n      },\n      \"SplitImmaturePlantResultDetail\": {\n        \"type\": \"object\",\n        \"properties\": {\n          \"batchId\": {\n            \"type\": \"integer\",\n            \"format\": \"int32\"\n          },\n          \"batchPlantCount\": {\n            \"type\": \"integer\",\n            \"format\": \"int32\"\n          },\n          \"newBatchId\": {\n            \"type\": \"integer\",\n            \"format\": \"int32\"\n          },\n          \"newBatchPlantCount\": {\n            \"type\": \"integer\",\n            \"format\": \"int32\"\n          }\n        },\n        \"additionalProperties\": false\n      },\n      \"SplitImmaturePlantsRequest\": {\n        \"type\": \"object\",\n        \"properties\": {\n          \"batch\": {\n            \"type\": \"array\",\n            \"items\": {\n              \"$ref\": \"#/components/schemas/SplitBatchDetails\"\n            },\n            \"description\": \"Collection of batch split specifications for dividing immature plant batches into smaller groups.\",\n            \"nullable\": true\n          },\n          \"plant\": {\n            \"type\": \"array\",\n            \"items\": {\n              \"$ref\": \"#/components/schemas/SplitPlantDetails\"\n            },\n            \"description\": \"Collection of individual plant split specifications for precise cultivation management.\",\n            \"nullable\": true\n          }\n        },\n        \"additionalProperties\": false,\n        \"description\": \"Request model for splitting immature cannabis plant batches and individual plants for cultivation optimization.\"\n      },\n      \"SplitPlantDetails\": {\n        \"type\": \"object\",\n        \"properties\": {\n          \"batchId\": {\n            \"type\": \"integer\",\n            \"format\": \"int32\"\n          },\n          \"location\": {\n            \"type\": \"string\",\n            \"nullable\": true\n          },\n          \"strain\": {\n            \"type\": \"string\",\n            \"nullable\": true\n          },\n          \"quantity\": {\n            \"type\": \"integer\",\n            \"format\": \"int32\"\n          },\n          \"splitDate\": {\n            \"type\": \"string\",\n            \"format\": \"date-time\",\n            \"nullable\": true\n          }\n        },\n        \"additionalProperties\": false\n      },\n      \"StandardAllergensDetails\": {\n        \"type\": \"object\",\n        \"properties\": {\n          \"milk\": {\n            \"type\": \"boolean\"\n          },\n          \"eggs\": {\n            \"type\": \"boolean\"\n          },\n          \"fish\": {\n            \"type\": \"boolean\"\n          },\n          \"peanuts\": {\n            \"type\": \"boolean\"\n          },\n          \"treeNuts\": {\n            \"type\": \"boolean\"\n          },\n          \"sesame\": {\n            \"type\": \"boolean\"\n          },\n          \"shellfish\": {\n            \"type\": \"boolean\"\n          },\n          \"soybeans\": {\n            \"type\": \"boolean\"\n          },\n          \"wheat\": {\n            \"type\": \"boolean\"\n          }\n        },\n        \"additionalProperties\": false\n      },\n      \"StrainDetail\": {\n        \"type\": \"object\",\n        \"properties\": {\n          \"strainId\": {\n            \"type\": \"integer\",\n            \"description\": \"Unique identifier for the strain\",\n            \"format\": \"int32\"\n          },\n          \"strainName\": {\n            \"type\": \"string\",\n            \"description\": \"Name of the cannabis strain\",\n            \"nullable\": true\n          },\n          \"strainDescription\": {\n            \"type\": \"string\",\n            \"description\": \"Detailed description of the strain's characteristics and effects\",\n            \"nullable\": true\n          },\n          \"strainAbbreviation\": {\n            \"type\": \"string\",\n            \"description\": \"Short name or code for the strain\",\n            \"nullable\": true\n          },\n          \"strainType\": {\n            \"type\": \"string\",\n            \"description\": \"Classification type of the strain. Valid values: `Indica`, `Sativa`, `Hybrid`, `CBD`\",\n            \"nullable\": true\n          },\n          \"externalId\": {\n            \"type\": \"string\",\n            \"description\": \"External system identifier for third-party integration\",\n            \"nullable\": true\n          }\n        },\n        \"additionalProperties\": false,\n        \"description\": \"Cannabis strain information with genetic and classification details for product categorization and cultivation tracking.\"\n      },\n      \"StringIEnumerableOptional\": {\n        \"type\": \"array\",\n        \"additionalProperties\": false\n      },\n      \"StringOptional\": {\n        \"type\": \"string\",\n        \"additionalProperties\": false\n      },\n      \"SuccessResult\": {\n        \"type\": \"object\",\n        \"properties\": {\n          \"result\": {\n            \"type\": \"boolean\"\n          },\n          \"message\": {\n            \"type\": \"string\",\n            \"nullable\": true\n          },\n          \"data\": {\n            \"type\": \"object\",\n            \"nullable\": true\n          }\n        },\n        \"additionalProperties\": false\n      },\n      \"Table\": {\n        \"type\": \"object\",\n        \"properties\": {\n          \"tableId\": {\n            \"type\": \"integer\",\n            \"format\": \"int32\",\n            \"nullable\": true\n          },\n          \"tableName\": {\n            \"type\": \"string\",\n            \"nullable\": true\n          }\n        },\n        \"additionalProperties\": false\n      },\n      \"Tag\": {\n        \"type\": \"object\",\n        \"properties\": {\n          \"tagName\": {\n            \"type\": \"string\",\n            \"nullable\": true\n          },\n          \"tagId\": {\n            \"type\": \"integer\",\n            \"format\": \"int32\"\n          }\n        },\n        \"additionalProperties\": false\n      },\n      \"TaxSummaryInfo\": {\n        \"type\": \"object\",\n        \"properties\": {\n          \"rateName\": {\n            \"type\": \"string\",\n            \"description\": \"Name of the tax type being summarized (e.g., \\\"State Excise Tax\\\", \\\"Sales Tax\\\").\",\n            \"nullable\": true\n          },\n          \"amount\": {\n            \"type\": \"number\",\n            \"description\": \"Total tax amount for this tax type across all transaction items (in USD).\",\n            \"format\": \"double\"\n          }\n        },\n        \"additionalProperties\": false,\n        \"description\": \"Summary tax information aggregated across transaction items for reporting and receipt generation.\"\n      },\n      \"Terminal\": {\n        \"type\": \"object\",\n        \"properties\": {\n          \"terminalId\": {\n            \"type\": \"integer\",\n            \"description\": \"Unique identifier for the point-of-sale terminal.\",\n            \"format\": \"int32\"\n          },\n          \"terminalName\": {\n            \"type\": \"string\",\n            \"description\": \"Human-readable name for terminal identification and assignment.\",\n            \"nullable\": true\n          }\n        },\n        \"additionalProperties\": false,\n        \"description\": \"Point-of-sale terminal model containing terminal identification information for retail operations and transaction processing.\"\n      },\n      \"Transaction\": {\n        \"type\": \"object\",\n        \"properties\": {\n          \"transactionId\": {\n            \"type\": \"integer\",\n            \"format\": \"int32\"\n          },\n          \"customerId\": {\n            \"type\": \"integer\",\n            \"format\": \"int32\"\n          },\n          \"employeeId\": {\n            \"type\": \"integer\",\n            \"format\": \"int32\"\n          },\n          \"transactionDate\": {\n            \"type\": \"string\",\n            \"format\": \"date-time\"\n          },\n          \"voidDate\": {\n            \"type\": \"string\",\n            \"format\": \"date-time\",\n            \"nullable\": true\n          },\n          \"isVoid\": {\n            \"type\": \"boolean\"\n          },\n          \"subtotal\": {\n            \"type\": \"number\",\n            \"format\": \"double\"\n          },\n          \"totalDiscount\": {\n            \"type\": \"number\",\n            \"format\": \"double\"\n          },\n          \"totalBeforeTax\": {\n            \"type\": \"number\",\n            \"format\": \"double\",\n            \"readOnly\": true\n          },\n          \"tax\": {\n            \"type\": \"number\",\n            \"format\": \"double\"\n          },\n          \"tipAmount\": {\n            \"type\": \"number\",\n            \"format\": \"double\",\n            \"nullable\": true\n          },\n          \"total\": {\n            \"type\": \"number\",\n            \"format\": \"double\"\n          },\n          \"paid\": {\n            \"type\": \"number\",\n            \"format\": \"double\"\n          },\n          \"changeDue\": {\n            \"type\": \"number\",\n            \"format\": \"double\"\n          },\n          \"totalItems\": {\n            \"type\": \"integer\",\n            \"format\": \"int32\"\n          },\n          \"terminalName\": {\n            \"type\": \"string\",\n            \"nullable\": true\n          },\n          \"checkInDate\": {\n            \"type\": \"string\",\n            \"format\": \"date-time\",\n            \"nullable\": true\n          },\n          \"invoiceNumber\": {\n            \"type\": \"string\",\n            \"nullable\": true\n          },\n          \"isTaxInclusive\": {\n            \"type\": \"boolean\"\n          },\n          \"transactionType\": {\n            \"type\": \"string\",\n            \"description\": \"Will have one of the following values: Retail, Transfer, WholesaleOrder\",\n            \"nullable\": true\n          },\n          \"loyaltyEarned\": {\n            \"type\": \"number\",\n            \"description\": \"Loyalty points earned on this transaction (can be negative if it's a return)\",\n            \"format\": \"double\",\n            \"nullable\": true\n          },\n          \"loyaltySpent\": {\n            \"type\": \"number\",\n            \"description\": \"Loyalty points spent on this transaction (can be negative if it's a return)\",\n            \"format\": \"double\",\n            \"nullable\": true\n          },\n          \"items\": {\n            \"type\": \"array\",\n            \"items\": {\n              \"$ref\": \"#/components/schemas/TransactionItem\"\n            },\n            \"nullable\": true\n          },\n          \"discounts\": {\n            \"type\": \"array\",\n            \"items\": {\n              \"$ref\": \"#/components/schemas/AppliedDiscount\"\n            },\n            \"nullable\": true,\n            \"readOnly\": true\n          },\n          \"lastModifiedDateUTC\": {\n            \"type\": \"string\",\n            \"format\": \"date-time\"\n          },\n          \"cashPaid\": {\n            \"type\": \"number\",\n            \"format\": \"double\",\n            \"nullable\": true\n          },\n          \"debitPaid\": {\n            \"type\": \"number\",\n            \"format\": \"double\",\n            \"nullable\": true\n          },\n          \"electronicPaid\": {\n            \"type\": \"number\",\n            \"format\": \"double\",\n            \"nullable\": true\n          },\n          \"electronicPaymentMethod\": {\n            \"type\": \"string\",\n            \"nullable\": true\n          },\n          \"checkPaid\": {\n            \"type\": \"number\",\n            \"format\": \"double\",\n            \"nullable\": true\n          },\n          \"creditPaid\": {\n            \"type\": \"number\",\n            \"format\": \"double\",\n            \"nullable\": true\n          },\n          \"giftPaid\": {\n            \"type\": \"number\",\n            \"format\": \"double\",\n            \"nullable\": true\n          },\n          \"mmapPaid\": {\n            \"type\": \"number\",\n            \"format\": \"double\",\n            \"nullable\": true\n          },\n          \"prePaymentAmount\": {\n            \"type\": \"number\",\n            \"format\": \"double\",\n            \"nullable\": true\n          },\n          \"revenueFeesAndDonations\": {\n            \"type\": \"number\",\n            \"format\": \"double\",\n            \"nullable\": true\n          },\n          \"nonRevenueFeesAndDonations\": {\n            \"type\": \"number\",\n            \"format\": \"double\",\n            \"nullable\": true\n          },\n          \"feesAndDonations\": {\n            \"type\": \"array\",\n            \"items\": {\n              \"$ref\": \"#/components/schemas/FeeDonationInfo\"\n            },\n            \"nullable\": true\n          },\n          \"taxSummary\": {\n            \"type\": \"array\",\n            \"items\": {\n              \"$ref\": \"#/components/schemas/TaxSummaryInfo\"\n            },\n            \"nullable\": true,\n            \"readOnly\": true\n          },\n          \"returnOnTransactionId\": {\n            \"type\": \"integer\",\n            \"format\": \"int32\",\n            \"nullable\": true\n          },\n          \"adjustmentForTransactionId\": {\n            \"type\": \"integer\",\n            \"format\": \"int32\",\n            \"nullable\": true\n          },\n          \"orderType\": {\n            \"type\": \"string\",\n            \"nullable\": true\n          },\n          \"wasPreOrdered\": {\n            \"type\": \"boolean\"\n          },\n          \"orderSource\": {\n            \"type\": \"string\",\n            \"nullable\": true\n          },\n          \"orderMethod\": {\n            \"type\": \"string\",\n            \"nullable\": true\n          },\n          \"invoiceName\": {\n            \"type\": \"string\",\n            \"nullable\": true\n          },\n          \"isReturn\": {\n            \"type\": \"boolean\",\n            \"readOnly\": true\n          },\n          \"authCode\": {\n            \"type\": \"string\",\n            \"nullable\": true\n          },\n          \"customerTypeId\": {\n            \"type\": \"integer\",\n            \"format\": \"int32\"\n          },\n          \"isMedical\": {\n            \"type\": \"boolean\"\n          },\n          \"orderIds\": {\n            \"type\": \"array\",\n            \"items\": {\n              \"type\": \"integer\",\n              \"format\": \"int32\"\n            },\n            \"nullable\": true\n          },\n          \"totalCredit\": {\n            \"type\": \"number\",\n            \"format\": \"double\"\n          },\n          \"completedByUser\": {\n            \"type\": \"string\",\n            \"nullable\": true\n          },\n          \"responsibleForSaleUserId\": {\n            \"type\": \"integer\",\n            \"format\": \"int32\"\n          },\n          \"transactionDateLocalTime\": {\n            \"type\": \"string\",\n            \"format\": \"date-time\"\n          },\n          \"estTimeArrivalLocal\": {\n            \"type\": \"string\",\n            \"format\": \"date-time\",\n            \"nullable\": true\n          },\n          \"estDeliveryDateLocal\": {\n            \"type\": \"string\",\n            \"format\": \"date-time\",\n            \"nullable\": true,\n            \"readOnly\": true\n          },\n          \"referenceId\": {\n            \"type\": \"string\",\n            \"nullable\": true\n          },\n          \"manualPayments\": {\n            \"type\": \"array\",\n            \"items\": {\n              \"$ref\": \"#/components/schemas/ManualPayment\"\n            },\n            \"nullable\": true\n          },\n          \"manualPaid\": {\n            \"type\": \"number\",\n            \"format\": \"double\",\n            \"nullable\": true\n          },\n          \"integratedPayments\": {\n            \"type\": \"array\",\n            \"items\": {\n              \"$ref\": \"#/components/schemas/IntegratedPayment\"\n            },\n            \"nullable\": true\n          },\n          \"integratedPaid\": {\n            \"type\": \"number\",\n            \"format\": \"double\",\n            \"nullable\": true\n          }\n        },\n        \"additionalProperties\": false,\n        \"description\": \"Complete cannabis retail transaction model representing all aspects of cannabis sales operations.\"\n      },\n      \"TransactionItem\": {\n        \"type\": \"object\",\n        \"properties\": {\n          \"transactionId\": {\n            \"type\": \"integer\",\n            \"description\": \"Parent transaction identifier linking this item to the overall transaction.\",\n            \"format\": \"int32\"\n          },\n          \"productId\": {\n            \"type\": \"integer\",\n            \"description\": \"Product identifier for the purchased cannabis product.\",\n            \"format\": \"int32\"\n          },\n          \"totalPrice\": {\n            \"type\": \"number\",\n            \"description\": \"Total price for this line item including all taxes and discounts (in USD).\",\n            \"format\": \"double\"\n          },\n          \"quantity\": {\n            \"type\": \"number\",\n            \"description\": \"Quantity of the product purchased (units based on product type - grams, pieces, etc.).\",\n            \"format\": \"double\"\n          },\n          \"unitPrice\": {\n            \"type\": \"number\",\n            \"description\": \"Unit price per individual item before taxes and discounts (in USD).\",\n            \"format\": \"double\"\n          },\n          \"unitCost\": {\n            \"type\": \"number\",\n            \"description\": \"Cost basis of the product for internal accounting and margin calculations (in USD).\",\n            \"format\": \"double\",\n            \"nullable\": true\n          },\n          \"packageId\": {\n            \"type\": \"string\",\n            \"description\": \"State tracking system package identifier for regulatory compliance (seed-to-sale tracking).\",\n            \"nullable\": true\n          },\n          \"sourcePackageId\": {\n            \"type\": \"string\",\n            \"description\": \"Original source package identifier for product lineage tracking in state systems.\",\n            \"nullable\": true\n          },\n          \"totalDiscount\": {\n            \"type\": \"number\",\n            \"description\": \"Total discount amount applied to this line item (in USD).\",\n            \"format\": \"double\"\n          },\n          \"inventoryId\": {\n            \"type\": \"integer\",\n            \"description\": \"Inventory record identifier for the specific product inventory being sold.\",\n            \"format\": \"int32\"\n          },\n          \"unitId\": {\n            \"type\": \"integer\",\n            \"description\": \"Unit type identifier defining how the product is measured and sold.\",\n            \"format\": \"int32\"\n          },\n          \"unitWeight\": {\n            \"type\": \"number\",\n            \"description\": \"Weight of the product unit in grams (calculated for flower products with UnitId = 1).\",\n            \"format\": \"double\",\n            \"nullable\": true,\n            \"readOnly\": true\n          },\n          \"unitWeightUnit\": {\n            \"type\": \"string\",\n            \"description\": \"Unit of measurement for product weight (always \\\"g\\\" for grams).\",\n            \"nullable\": true,\n            \"readOnly\": true\n          },\n          \"flowerEquivalent\": {\n            \"type\": \"number\",\n            \"description\": \"Flower equivalent weight for concentrate products in grams (for regulatory compliance).\",\n            \"format\": \"double\",\n            \"nullable\": true\n          },\n          \"flowerEquivalentUnit\": {\n            \"type\": \"string\",\n            \"description\": \"Unit of measurement for flower equivalent (always \\\"g\\\" for grams).\",\n            \"nullable\": true,\n            \"readOnly\": true\n          },\n          \"discounts\": {\n            \"type\": \"array\",\n            \"items\": {\n              \"$ref\": \"#/components/schemas/AppliedDiscount\"\n            },\n            \"description\": \"Collection of discounts applied to this transaction item.\",\n            \"nullable\": true\n          },\n          \"taxes\": {\n            \"type\": \"array\",\n            \"items\": {\n              \"$ref\": \"#/components/schemas/LineItemTaxInfo\"\n            },\n            \"description\": \"Collection of taxes applied to this transaction item.\",\n            \"nullable\": true\n          },\n          \"returnDate\": {\n            \"type\": \"string\",\n            \"description\": \"Date when this item was returned (null if not returned).\",\n            \"format\": \"date-time\",\n            \"nullable\": true\n          },\n          \"isReturned\": {\n            \"type\": \"boolean\",\n            \"description\": \"Indicates whether this transaction item has been returned.\",\n            \"readOnly\": true\n          },\n          \"returnedByTransactionId\": {\n            \"type\": \"integer\",\n            \"description\": \"Transaction identifier of the return transaction that processed this item's return.\",\n            \"format\": \"int32\",\n            \"nullable\": true\n          },\n          \"returnReason\": {\n            \"type\": \"string\",\n            \"description\": \"Reason provided for returning this item (e.g., \\\"Defective\\\", \\\"Customer Dissatisfaction\\\").\",\n            \"nullable\": true\n          },\n          \"batchName\": {\n            \"type\": \"string\",\n            \"description\": \"Cultivation batch name for product traceability and regulatory compliance.\",\n            \"nullable\": true\n          },\n          \"transactionItemId\": {\n            \"type\": \"integer\",\n            \"description\": \"Reference identifier to tie child items to parent items within a transaction.\\nNot guaranteed to be unique outside of a single transaction.\",\n            \"format\": \"int32\",\n            \"readOnly\": true\n          },\n          \"vendor\": {\n            \"type\": \"string\",\n            \"description\": \"Vendor or supplier name for the product.\",\n            \"nullable\": true\n          },\n          \"isCoupon\": {\n            \"type\": \"boolean\",\n            \"description\": \"Indicates whether this item represents a coupon or promotional discount rather than a physical product.\"\n          }\n        },\n        \"additionalProperties\": false,\n        \"description\": \"Individual line item within a cannabis retail transaction containing product, pricing, and compliance information.\"\n      },\n      \"Unit\": {\n        \"type\": \"object\",\n        \"properties\": {\n          \"unitId\": {\n            \"type\": \"integer\",\n            \"description\": \"Unique identifier for the measurement unit.\",\n            \"format\": \"int32\"\n          },\n          \"unitName\": {\n            \"type\": \"string\",\n            \"description\": \"Full name of the measurement unit (e.g., \\\"Grams\\\", \\\"Ounces\\\", \\\"Pounds\\\").\",\n            \"nullable\": true\n          },\n          \"abbreviation\": {\n            \"type\": \"string\",\n            \"description\": \"Short abbreviation for the unit (e.g., \\\"g\\\", \\\"oz\\\", \\\"lb\\\").\",\n            \"nullable\": true\n          },\n          \"unitTypeId\": {\n            \"type\": \"integer\",\n            \"description\": \"Unit type classification identifier linking to measurement category.\",\n            \"format\": \"int32\"\n          }\n        },\n        \"additionalProperties\": false,\n        \"description\": \"Measurement unit model for cannabis product tracking and inventory management.\"\n      },\n      \"UnitType\": {\n        \"type\": \"object\",\n        \"properties\": {\n          \"unitTypeId\": {\n            \"type\": \"integer\",\n            \"description\": \"Unique identifier for the unit type category.\",\n            \"format\": \"int32\"\n          },\n          \"unitTypeName\": {\n            \"type\": \"string\",\n            \"description\": \"Display name of the unit type category (e.g., \\\"Weight\\\", \\\"Volume\\\", \\\"Quantity\\\").\",\n            \"nullable\": true\n          },\n          \"unitTypeAbbreivation\": {\n            \"type\": \"string\",\n            \"description\": \"Short abbreviation for the unit type (e.g., \\\"Wgt\\\", \\\"Vol\\\", \\\"Qty\\\").\",\n            \"nullable\": true\n          }\n        },\n        \"additionalProperties\": false,\n        \"description\": \"Unit type classification model for organizing measurement units by category.\"\n      },\n      \"UpdateBatchLabResultsRequest\": {\n        \"required\": [\"batchName\"],\n        \"type\": \"object\",\n        \"properties\": {\n          \"batchName\": {\n            \"minLength\": 1,\n            \"type\": \"string\",\n            \"description\": \"Name of the batch to update with laboratory test results (required).\"\n          },\n          \"sampleWeight\": {\n            \"type\": \"number\",\n            \"description\": \"Weight of the laboratory sample used for testing (in grams).\",\n            \"format\": \"double\",\n            \"nullable\": true\n          },\n          \"labResults\": {\n            \"type\": \"array\",\n            \"items\": {\n              \"$ref\": \"#/components/schemas/CannabinoidTerpeneValue\"\n            },\n            \"description\": \"Collection of laboratory test results including cannabinoids and terpenes.\",\n            \"nullable\": true\n          }\n        },\n        \"additionalProperties\": false,\n        \"description\": \"Request model for updating laboratory test results for a specific batch by batch name.\"\n      },\n      \"UpdateBatchRequest\": {\n        \"type\": \"object\",\n        \"properties\": {\n          \"batchName\": {\n            \"type\": \"string\",\n            \"nullable\": true\n          },\n          \"roomId\": {\n            \"type\": \"integer\",\n            \"format\": \"int32\",\n            \"nullable\": true\n          },\n          \"strainId\": {\n            \"type\": \"integer\",\n            \"format\": \"int32\",\n            \"nullable\": true\n          }\n        },\n        \"additionalProperties\": false\n      },\n      \"UpdateDeliveryRouteDetailRequest\": {\n        \"type\": \"object\",\n        \"properties\": {\n          \"transactionId\": {\n            \"type\": \"integer\",\n            \"description\": \"Delivery transaction identifier to update (required).\",\n            \"format\": \"int32\"\n          },\n          \"driverId\": {\n            \"type\": \"integer\",\n            \"description\": \"Primary driver identifier for delivery assignment (optional).\",\n            \"format\": \"int32\",\n            \"nullable\": true\n          },\n          \"driverId2\": {\n            \"type\": \"integer\",\n            \"description\": \"Secondary driver identifier for delivery assignment (optional).\",\n            \"format\": \"int32\",\n            \"nullable\": true\n          },\n          \"vehicleId\": {\n            \"type\": \"integer\",\n            \"description\": \"Vehicle identifier for delivery assignment (optional).\",\n            \"format\": \"int32\",\n            \"nullable\": true\n          },\n          \"route\": {\n            \"type\": \"string\",\n            \"description\": \"Route information or delivery notes (optional).\",\n            \"nullable\": true\n          },\n          \"status\": {\n            \"type\": \"string\",\n            \"description\": \"Delivery status update (optional).\",\n            \"nullable\": true\n          }\n        },\n        \"additionalProperties\": false,\n        \"description\": \"Request model for updating delivery route details including vehicle assignments, driver assignments, and delivery status.\"\n      },\n      \"UpdateJournalEntryRequest\": {\n        \"required\": [\"body\", \"date\", \"journalEntryId\", \"subject\"],\n        \"type\": \"object\",\n        \"properties\": {\n          \"journalEntryId\": {\n            \"type\": \"integer\",\n            \"description\": \"The ID of the existing journal entry to update.\",\n            \"format\": \"int32\"\n          },\n          \"subject\": {\n            \"minLength\": 1,\n            \"type\": \"string\",\n            \"description\": \"Updated title or summary for the journal entry.\"\n          },\n          \"body\": {\n            \"minLength\": 1,\n            \"type\": \"string\",\n            \"description\": \"Updated detailed content and notes for the journal entry.\"\n          },\n          \"date\": {\n            \"type\": \"string\",\n            \"description\": \"Updated date and time when the journal entry should be dated.\",\n            \"format\": \"date-time\"\n          }\n        },\n        \"additionalProperties\": false,\n        \"description\": \"Request model for updating existing customer journal entries with modified content and details.\"\n      },\n      \"UpdatePackageTagsRequest\": {\n        \"required\": [\"tags\"],\n        \"type\": \"object\",\n        \"properties\": {\n          \"packageIds\": {\n            \"$ref\": \"#/components/schemas/StringIEnumerableOptional\"\n          },\n          \"inventoryIds\": {\n            \"$ref\": \"#/components/schemas/Int32IEnumerableOptional\"\n          },\n          \"tags\": {\n            \"type\": \"array\",\n            \"items\": {\n              \"type\": \"string\"\n            },\n            \"description\": \"Required collection of tags to apply to the specified packages (required).\"\n          }\n        },\n        \"additionalProperties\": false\n      },\n      \"UpdatePlantDetails\": {\n        \"type\": \"object\",\n        \"properties\": {\n          \"plantId\": {\n            \"type\": \"integer\",\n            \"format\": \"int32\"\n          },\n          \"serialNumber\": {\n            \"$ref\": \"#/components/schemas/StringOptional\"\n          },\n          \"dateCreated\": {\n            \"$ref\": \"#/components/schemas/DateTimeNullableOptional\"\n          },\n          \"bornDate\": {\n            \"$ref\": \"#/components/schemas/DateTimeNullableOptional\"\n          },\n          \"isMother\": {\n            \"$ref\": \"#/components/schemas/BooleanNullableOptional\"\n          },\n          \"strainId\": {\n            \"$ref\": \"#/components/schemas/Int32NullableOptional\"\n          },\n          \"roomId\": {\n            \"$ref\": \"#/components/schemas/Int32NullableOptional\"\n          },\n          \"tableId\": {\n            \"$ref\": \"#/components/schemas/Int32NullableOptional\"\n          },\n          \"batchId\": {\n            \"$ref\": \"#/components/schemas/Int32NullableOptional\"\n          }\n        },\n        \"additionalProperties\": false\n      },\n      \"UpdatePlantsRequest\": {\n        \"type\": \"object\",\n        \"properties\": {\n          \"plants\": {\n            \"type\": \"array\",\n            \"items\": {\n              \"$ref\": \"#/components/schemas/UpdatePlantDetails\"\n            },\n            \"nullable\": true\n          }\n        },\n        \"additionalProperties\": false\n      },\n      \"UpdatePreOrderRequest\": {\n        \"type\": \"object\",\n        \"properties\": {\n          \"orderId\": {\n            \"type\": \"integer\",\n            \"format\": \"int32\"\n          },\n          \"items\": {\n            \"type\": \"array\",\n            \"items\": {\n              \"$ref\": \"#/components/schemas/PreOrderItem\"\n            },\n            \"nullable\": true\n          },\n          \"isDelivery\": {\n            \"type\": \"boolean\"\n          },\n          \"orderSource\": {\n            \"type\": \"string\",\n            \"nullable\": true,\n            \"deprecated\": true\n          },\n          \"deliveryStreet\": {\n            \"type\": \"string\",\n            \"nullable\": true\n          },\n          \"deliveryCity\": {\n            \"type\": \"string\",\n            \"nullable\": true\n          },\n          \"deliveryState\": {\n            \"type\": \"string\",\n            \"nullable\": true\n          },\n          \"deliveryPostalCode\": {\n            \"type\": \"string\",\n            \"nullable\": true\n          },\n          \"deliveryScheduleId\": {\n            \"$ref\": \"#/components/schemas/DeliveryScheduleType\"\n          },\n          \"notes\": {\n            \"type\": \"string\",\n            \"nullable\": true\n          },\n          \"redemptions\": {\n            \"$ref\": \"#/components/schemas/PreOrderRedemptionIEnumerableOptional\"\n          },\n          \"customerId\": {\n            \"type\": \"integer\",\n            \"format\": \"int32\"\n          },\n          \"deliveryStreet2\": {\n            \"type\": \"string\",\n            \"nullable\": true\n          },\n          \"timeWindowStartDateUtc\": {\n            \"type\": \"string\",\n            \"format\": \"date-time\",\n            \"nullable\": true\n          },\n          \"timeWindowEndDateUtc\": {\n            \"type\": \"string\",\n            \"format\": \"date-time\",\n            \"nullable\": true\n          }\n        },\n        \"additionalProperties\": false\n      },\n      \"UpdateStrain\": {\n        \"required\": [\"strainDescription\", \"strainName\"],\n        \"type\": \"object\",\n        \"properties\": {\n          \"strainId\": {\n            \"type\": \"integer\",\n            \"description\": \"Unique identifier for strain updates.\\n- **For CREATE**: Omit this field, set to null, or set to 0\\n- **For UPDATE**: Provide the existing strain's ID\",\n            \"format\": \"int32\",\n            \"nullable\": true\n          },\n          \"strainName\": {\n            \"minLength\": 1,\n            \"type\": \"string\",\n            \"description\": \"Name of the cannabis strain (required for creation)\"\n          },\n          \"strainDescription\": {\n            \"minLength\": 1,\n            \"type\": \"string\",\n            \"description\": \"Detailed description of the strain's characteristics and effects.\\n**REQUIRED** - Cannot be null or empty for both create and update operations.\"\n          },\n          \"abbreviation\": {\n            \"type\": \"string\",\n            \"description\": \"Short name or code for the strain (optional)\",\n            \"nullable\": true\n          },\n          \"strainType\": {\n            \"type\": \"string\",\n            \"description\": \"Classification type of the strain (optional).\\n**Must be one of**: `Indica`, `Sativa`, `Hybrid`, `CBD`\\nIf provided, value will be validated against allowed strain types.\",\n            \"nullable\": true\n          },\n          \"externalId\": {\n            \"type\": \"string\",\n            \"description\": \"External system identifier for third-party integration (optional).\\nUseful for synchronizing with cultivation management systems.\",\n            \"nullable\": true\n          },\n          \"broadcast\": {\n            \"$ref\": \"#/components/schemas/BooleanOptional\"\n          }\n        },\n        \"additionalProperties\": false,\n        \"description\": \"Request model for creating or updating cannabis strain information.\\n\\n**Create vs Update Behavior:**\\n- **CREATE**: When `StrainId` is null, 0, or omitted, a new strain record will be created\\n- **UPDATE**: When `StrainId` is provided with a valid strain ID, the existing strain will be updated\\n\\n**Sparse Update Behavior:**\\n- **Provided fields**: Will overwrite existing values with provided data\\n- **Omitted fields**: Will preserve existing values (no data loss for updates)\\n- **Special handling**: `StrainDescription` is always required and cannot be null\"\n      },\n      \"UploadFileType\": {\n        \"enum\": [0, 1, 2, 3, 4, 5],\n        \"type\": \"integer\",\n        \"format\": \"int32\"\n      },\n      \"ValidationFailure\": {\n        \"type\": \"object\",\n        \"properties\": {\n          \"propertyName\": {\n            \"type\": \"string\",\n            \"nullable\": true\n          },\n          \"errorMessage\": {\n            \"type\": \"string\",\n            \"nullable\": true\n          },\n          \"attemptedValue\": {\n            \"type\": \"object\",\n            \"nullable\": true\n          },\n          \"customState\": {\n            \"type\": \"object\",\n            \"nullable\": true\n          },\n          \"severity\": {\n            \"$ref\": \"#/components/schemas/Severity\"\n          },\n          \"errorCode\": {\n            \"type\": \"string\",\n            \"nullable\": true\n          },\n          \"formattedMessagePlaceholderValues\": {\n            \"type\": \"object\",\n            \"additionalProperties\": {\n              \"type\": \"object\",\n              \"nullable\": true\n            },\n            \"nullable\": true\n          }\n        },\n        \"additionalProperties\": false\n      },\n      \"ValidationResult\": {\n        \"type\": \"object\",\n        \"properties\": {\n          \"isValid\": {\n            \"type\": \"boolean\",\n            \"readOnly\": true\n          },\n          \"errors\": {\n            \"type\": \"array\",\n            \"items\": {\n              \"$ref\": \"#/components/schemas/ValidationFailure\"\n            },\n            \"nullable\": true\n          },\n          \"ruleSetsExecuted\": {\n            \"type\": \"array\",\n            \"items\": {\n              \"type\": \"string\"\n            },\n            \"nullable\": true\n          }\n        },\n        \"additionalProperties\": false\n      },\n      \"VehicleDetail\": {\n        \"type\": \"object\",\n        \"properties\": {\n          \"vehicleId\": {\n            \"type\": \"integer\",\n            \"format\": \"int32\"\n          },\n          \"make\": {\n            \"type\": \"string\",\n            \"nullable\": true\n          },\n          \"model\": {\n            \"type\": \"string\",\n            \"nullable\": true\n          },\n          \"modelYear\": {\n            \"type\": \"string\",\n            \"nullable\": true\n          },\n          \"color\": {\n            \"type\": \"string\",\n            \"nullable\": true\n          },\n          \"licensePlate\": {\n            \"type\": \"string\",\n            \"nullable\": true\n          },\n          \"vin\": {\n            \"type\": \"string\",\n            \"nullable\": true\n          }\n        },\n        \"additionalProperties\": false\n      },\n      \"Vendor\": {\n        \"type\": \"object\",\n        \"properties\": {\n          \"vendorId\": {\n            \"type\": \"integer\",\n            \"description\": \"Unique identifier for the vendor in the system (null for new vendor creation).\",\n            \"format\": \"int32\",\n            \"nullable\": true\n          },\n          \"vendorName\": {\n            \"type\": \"string\",\n            \"description\": \"Official business name of the vendor as registered with regulatory authorities.\",\n            \"nullable\": true\n          },\n          \"address\": {\n            \"type\": \"string\",\n            \"description\": \"Street address of the vendor's business location.\",\n            \"nullable\": true\n          },\n          \"city\": {\n            \"type\": \"string\",\n            \"description\": \"City where the vendor's business is located.\",\n            \"nullable\": true\n          },\n          \"state\": {\n            \"type\": \"string\",\n            \"description\": \"State or province where the vendor's business is located.\",\n            \"nullable\": true\n          },\n          \"postalCode\": {\n            \"type\": \"string\",\n            \"description\": \"Postal or ZIP code for the vendor's business address.\",\n            \"nullable\": true\n          },\n          \"licenseNumber\": {\n            \"type\": \"string\",\n            \"description\": \"Cannabis business license number issued by state regulatory authorities.\",\n            \"nullable\": true\n          },\n          \"contactName\": {\n            \"type\": \"string\",\n            \"description\": \"Name of the primary business contact for this vendor.\",\n            \"nullable\": true\n          },\n          \"contactEmail\": {\n            \"type\": \"string\",\n            \"description\": \"Email address for business communications with the vendor.\",\n            \"nullable\": true\n          },\n          \"contactPhone\": {\n            \"type\": \"string\",\n            \"description\": \"Phone number for business communications with the vendor.\",\n            \"nullable\": true\n          }\n        },\n        \"additionalProperties\": false,\n        \"description\": \"Vendor information model for cannabis supply chain and compliance management.\"\n      },\n      \"WasteSummary\": {\n        \"type\": \"object\",\n        \"properties\": {\n          \"roomWaste\": {\n            \"type\": \"array\",\n            \"items\": {\n              \"$ref\": \"#/components/schemas/RoomWaste\"\n            },\n            \"description\": \"Collection of room-based waste disposal records.\",\n            \"nullable\": true\n          },\n          \"harvestWaste\": {\n            \"type\": \"array\",\n            \"items\": {\n              \"$ref\": \"#/components/schemas/ObjectWaste\"\n            },\n            \"description\": \"Collection of harvest-based waste disposal records.\",\n            \"nullable\": true\n          },\n          \"plantWaste\": {\n            \"type\": \"array\",\n            \"items\": {\n              \"$ref\": \"#/components/schemas/ObjectWaste\"\n            },\n            \"description\": \"Collection of plant-based waste disposal records.\",\n            \"nullable\": true\n          }\n        },\n        \"additionalProperties\": false,\n        \"description\": \"Comprehensive waste summary model containing all waste types for facility waste management and regulatory reporting.\"\n      },\n      \"WeeklyRecurrenceInfo\": {\n        \"type\": \"object\",\n        \"properties\": {\n          \"startTime\": {\n            \"type\": \"string\",\n            \"description\": \"Daily start time when discount becomes available (optional).\",\n            \"format\": \"date-span\",\n            \"nullable\": true\n          },\n          \"endTime\": {\n            \"type\": \"string\",\n            \"description\": \"Daily end time when discount expires (optional).\",\n            \"format\": \"date-span\",\n            \"nullable\": true\n          },\n          \"appliesOnMonday\": {\n            \"type\": \"boolean\",\n            \"description\": \"Indicates if discount is available on Mondays.\"\n          },\n          \"appliesOnTuesday\": {\n            \"type\": \"boolean\",\n            \"description\": \"Indicates if discount is available on Tuesdays.\"\n          },\n          \"appliesOnWednesday\": {\n            \"type\": \"boolean\",\n            \"description\": \"Indicates if discount is available on Wednesdays.\"\n          },\n          \"appliesOnThursday\": {\n            \"type\": \"boolean\",\n            \"description\": \"Indicates if discount is available on Thursdays.\"\n          },\n          \"appliesOnFriday\": {\n            \"type\": \"boolean\",\n            \"description\": \"Indicates if discount is available on Fridays.\"\n          },\n          \"appliesOnSaturday\": {\n            \"type\": \"boolean\",\n            \"description\": \"Indicates if discount is available on Saturdays.\"\n          },\n          \"appliesOnSunday\": {\n            \"type\": \"boolean\",\n            \"description\": \"Indicates if discount is available on Sundays.\"\n          }\n        },\n        \"additionalProperties\": false,\n        \"description\": \"Weekly recurring schedule model defining time-based availability patterns for discount application.\"\n      }\n    },\n    \"securitySchemes\": {\n      \"basicAuth\": {\n        \"type\": \"http\",\n        \"description\": \"**API Key Authentication Required**\\r\\n\\r\\n**How to Authenticate:**\\r\\n1. Use HTTP Basic Authentication\\r\\n2. Username: Your API key\\r\\n3. Password: Leave empty\\r\\n4. Header format: `Authorization: Basic <base64-encoded-api-key:>`\\r\\n\\r\\n**Example:**\\r\\n- API Key: `your-api-key-here`\\r\\n- Header: `Authorization: Basic eW91ci1hcGkta2V5LWhlcmU6`\\r\\n\\r\\n**All endpoints require authentication** - requests without valid API keys will receive `401 Unauthorized` responses.\",\n        \"scheme\": \"basic\"\n      }\n    }\n  },\n  \"security\": [\n    {\n      \"basicAuth\": []\n    }\n  ]\n}\n"
  },
  {
    "path": "specs/3.0.x/enum-escape.json",
    "content": "{\n  \"openapi\": \"3.0.2\",\n  \"info\": {\n    \"title\": \"OpenAPI 3.0.2 enum escape example\",\n    \"version\": \"1\"\n  },\n  \"components\": {\n    \"schemas\": {\n      \"Foo\": {\n        \"type\": \"object\",\n        \"properties\": {\n          \"foo\": {\n            \"enum\": [\"foo'bar\", \"foo\\\"bar\"],\n            \"type\": \"string\"\n          }\n        }\n      },\n      \"Bar\": {\n        \"enum\": [\"foo'bar\", \"foo\\\"bar\"],\n        \"type\": \"string\"\n      }\n    }\n  }\n}\n"
  },
  {
    "path": "specs/3.0.x/enum-inline.json",
    "content": "{\n  \"openapi\": \"3.0.3\",\n  \"info\": {\n    \"title\": \"OpenAPI 3.0.3 enum inline example\",\n    \"version\": \"1\"\n  },\n  \"components\": {\n    \"schemas\": {\n      \"Foo\": {\n        \"properties\": {\n          \"type\": {\n            \"enum\": [\"foo\", \"bar\", \"FooBar\", \"fooBar\", \"foo bar\"],\n            \"type\": \"string\"\n          }\n        },\n        \"type\": \"object\"\n      }\n    }\n  }\n}\n"
  },
  {
    "path": "specs/3.0.x/enum-names-values.json",
    "content": "{\n  \"openapi\": \"3.0.2\",\n  \"info\": {\n    \"title\": \"OpenAPI 3.0.2 enum names values example\",\n    \"version\": \"1\"\n  },\n  \"components\": {\n    \"schemas\": {\n      \"1-10\": {\n        \"enum\": [\"1-10\", \"11-20\"],\n        \"type\": \"string\"\n      },\n      \"myFoo\": {\n        \"enum\": [\"myFoo\", \"myBar\"],\n        \"type\": \"string\"\n      },\n      \"MyFoo\": {\n        \"enum\": [\"MyFoo\", \"MyBar\"],\n        \"type\": \"string\"\n      },\n      \"Foo\": {\n        \"enum\": [\"foo\", \"bar\", null, \"\", true, false],\n        \"nullable\": true,\n        \"type\": \"string\"\n      },\n      \"Numbers\": {\n        \"enum\": [100, 200, 300, -100, -200, -300],\n        \"type\": \"number\"\n      },\n      \"Arrays\": {\n        \"enum\": [[\"foo\"], [\"bar\"], [\"baz\"]],\n        \"type\": \"array\"\n      }\n    }\n  }\n}\n"
  },
  {
    "path": "specs/3.0.x/enum-null.json",
    "content": "{\n  \"openapi\": \"3.0.2\",\n  \"info\": {\n    \"title\": \"OpenAPI 3.0.2 enum null example\",\n    \"version\": \"1\"\n  },\n  \"components\": {\n    \"schemas\": {\n      \"Foo\": {\n        \"enum\": [\"foo\", \"bar\", null],\n        \"nullable\": true,\n        \"type\": \"string\"\n      },\n      \"Bar\": {\n        \"enum\": [\"foo\", \"bar\", null],\n        \"type\": \"string\"\n      },\n      \"Baz\": {\n        \"enum\": [\"foo\", \"bar\"],\n        \"nullable\": true,\n        \"type\": \"string\"\n      }\n    }\n  }\n}\n"
  },
  {
    "path": "specs/3.0.x/exclude-deprecated.yaml",
    "content": "openapi: 3.0.4\ninfo:\n  title: OpenAPI 3.0.4 exclude deprecated example\n  version: 1\npaths:\n  /foo:\n    post:\n      requestBody:\n        content:\n          'application/json':\n            schema:\n              $ref: '#/components/schemas/Foo'\n        required: true\n      responses:\n        '200':\n          description: OK\n  /bar:\n    post:\n      deprecated: true\n      requestBody:\n        content:\n          'application/json':\n            schema:\n              $ref: '#/components/schemas/Bar'\n        required: true\n      responses:\n        '200':\n          description: OK\ncomponents:\n  schemas:\n    Foo:\n      type: string\n    Bar:\n      deprecated: true\n      type: string\n"
  },
  {
    "path": "specs/3.0.x/external-shared.json",
    "content": "{\n  \"components\": {\n    \"schemas\": {\n      \"ExternalSharedModel\": {\n        \"type\": \"object\",\n        \"properties\": {\n          \"id\": { \"type\": \"string\" },\n          \"name\": { \"type\": \"string\" }\n        },\n        \"required\": [\"id\"]\n      },\n      \"ExternalSharedModelWithUuid\": {\n        \"type\": \"string\",\n        \"format\": \"uuid\"\n      },\n      \"ExternalNested\": {\n        \"type\": \"object\",\n        \"properties\": {\n          \"inner\": {\n            \"type\": \"object\",\n            \"properties\": {\n              \"deep\": { \"type\": \"string\" }\n            }\n          }\n        }\n      },\n      \"ExternalNestedNumeric\": {\n        \"type\": \"object\",\n        \"properties\": {\n          \"0\": {\n            \"type\": \"object\",\n            \"properties\": {\n              \"1\": { \"type\": \"string\" }\n            }\n          }\n        }\n      }\n    }\n  }\n}\n"
  },
  {
    "path": "specs/3.0.x/external.yaml",
    "content": "openapi: 3.0.0\ninfo:\n  title: OpenAPI 3.0 external example\n  version: 1\n# Paths using external references\npaths:\n  /external-model:\n    get:\n      summary: Get external model\n      parameters:\n        - $ref: '#/components/parameters/ExternalIdParam'\n        - $ref: '#/components/parameters/ExternalUuidParam'\n      responses:\n        '200':\n          $ref: '#/components/responses/ExternalModelResponse'\n        '400':\n          $ref: '#/components/responses/ExternalUuidResponse'\n    post:\n      summary: Create external model\n      requestBody:\n        $ref: '#/components/requestBodies/ExternalModelBody'\n      responses:\n        '201':\n          $ref: '#/components/responses/ExternalModelResponse'\n        '422':\n          $ref: '#/components/responses/ExternalUnionResponse'\n\n  /external-uuid:\n    get:\n      summary: Get external UUID\n      parameters:\n        - $ref: '#/components/parameters/ExternalUuidParam'\n      responses:\n        '200':\n          $ref: '#/components/responses/ExternalUuidResponse'\n    put:\n      summary: Update external UUID\n      requestBody:\n        $ref: '#/components/requestBodies/ExternalUuidBody'\n      responses:\n        '200':\n          $ref: '#/components/responses/ExternalUuidResponse'\n\n  /external-nested:\n    get:\n      summary: Get external nested object\n      parameters:\n        - $ref: '#/components/parameters/ExternalDeepParam'\n      responses:\n        '200':\n          $ref: '#/components/responses/ExternalNestedResponse'\n    post:\n      summary: Create external nested object\n      requestBody:\n        $ref: '#/components/requestBodies/ExternalNestedBody'\n      responses:\n        '201':\n          $ref: '#/components/responses/ExternalNestedResponse'\n\n  /external-mixed:\n    get:\n      summary: Get mixed external data\n      parameters:\n        - $ref: '#/components/parameters/ExternalIdParam'\n        - $ref: '#/components/parameters/ExternalUuidParam'\n        - $ref: '#/components/parameters/ExternalDeepParam'\n        - $ref: '#/components/parameters/ExternalNumericParam'\n      responses:\n        '200':\n          $ref: '#/components/responses/ExternalArrayResponse'\n    post:\n      summary: Create mixed external data\n      requestBody:\n        $ref: '#/components/requestBodies/ExternalMixedBody'\n      responses:\n        '201':\n          $ref: '#/components/responses/ExternalModelResponse'\n\n  /external-array:\n    get:\n      summary: Get array of external models\n      responses:\n        '200':\n          $ref: '#/components/responses/ExternalArrayResponse'\n    post:\n      summary: Create array of external models\n      requestBody:\n        content:\n          application/json:\n            schema:\n              type: array\n              items:\n                $ref: './external-shared.json#/components/schemas/ExternalSharedModel'\n        required: true\n      responses:\n        '201':\n          $ref: '#/components/responses/ExternalArrayResponse'\n\n  /external-union:\n    get:\n      summary: Get union of external types\n      responses:\n        '200':\n          $ref: '#/components/responses/ExternalUnionResponse'\n    post:\n      summary: Create union of external types\n      requestBody:\n        content:\n          application/json:\n            schema:\n              oneOf:\n                - $ref: './external-shared.json#/components/schemas/ExternalSharedModel'\n                - $ref: './external-shared.json#/components/schemas/ExternalSharedModelWithUuid'\n                - $ref: './external-shared.json#/components/schemas/ExternalNested'\n        required: true\n      responses:\n        '201':\n          $ref: '#/components/responses/ExternalUnionResponse'\n\n  /external-properties/{id}:\n    get:\n      summary: Get external properties\n      parameters:\n        - name: id\n          in: path\n          required: true\n          schema:\n            $ref: './external-shared.json#/components/schemas/ExternalSharedModel/properties/id'\n        - name: uuid\n          in: query\n          schema:\n            $ref: './external-shared.json#/components/schemas/ExternalSharedModelWithUuid'\n        - name: deep\n          in: header\n          schema:\n            $ref: './external-shared.json#/components/schemas/ExternalNested/properties/inner/properties/deep'\n      responses:\n        '200':\n          content:\n            application/json:\n              schema:\n                type: object\n                properties:\n                  id:\n                    $ref: './external-shared.json#/components/schemas/ExternalSharedModel/properties/id'\n                  name:\n                    $ref: './external-shared.json#/components/schemas/ExternalSharedModel/properties/name'\n                  uuid:\n                    $ref: './external-shared.json#/components/schemas/ExternalSharedModelWithUuid'\n                  deep:\n                    $ref: './external-shared.json#/components/schemas/ExternalNested/properties/inner/properties/deep'\n                  numeric:\n                    $ref: './external-shared.json#/components/schemas/ExternalNestedNumeric/properties/0/properties/1'\n\ncomponents:\n  schemas:\n    # Basic external schema references (multiple uses of each type)\n    ExternalSchemaA:\n      description: External schema (A)\n      $ref: './external-shared.json#/components/schemas/ExternalSharedModel'\n    ExternalSchemaB:\n      description: External schema (B) - second use of ExternalSharedModel\n      $ref: './external-shared.json#/components/schemas/ExternalSharedModel'\n    ExternalSchemaC:\n      description: External schema (C) - third use of ExternalSharedModel\n      $ref: './external-shared.json#/components/schemas/ExternalSharedModel'\n\n    # Path-based references using /path syntax\n    ExternalSchemaPathA:\n      description: External schema via path reference (A)\n      $ref: './external-shared.json#/components/schemas/ExternalSharedModel'\n    ExternalSchemaPathB:\n      description: External schema via path reference (B) - second use\n      $ref: './external-shared.json#/components/schemas/ExternalSharedModel'\n\n    # UUID type references (multiple uses)\n    ExternalSchemaPropertyA:\n      description: External schema property (A)\n      type: object\n      properties:\n        uuid1:\n          $ref: './external-shared.json#/components/schemas/ExternalSharedModelWithUuid'\n    ExternalSchemaPropertyB:\n      description: External schema property (B) - second use of UUID\n      type: object\n      properties:\n        uuid2:\n          $ref: './external-shared.json#/components/schemas/ExternalSharedModelWithUuid'\n    ExternalSchemaPropertyC:\n      description: External schema property (C) - third use of UUID\n      type: object\n      properties:\n        uuid3:\n          $ref: './external-shared.json#/components/schemas/ExternalSharedModelWithUuid'\n\n    # Duplicate refs in same schema\n    ExternalSchemaPropertyD:\n      description: External schema property with duplicate refs (D)\n      type: object\n      properties:\n        uuid4:\n          $ref: './external-shared.json#/components/schemas/ExternalSharedModelWithUuid'\n        uuid5:\n          $ref: './external-shared.json#/components/schemas/ExternalSharedModelWithUuid'\n\n    # External property references\n    ExternalSchemaExternalProp:\n      description: External schema property via external property ref (id)\n      type: object\n      properties:\n        id3:\n          $ref: './external-shared.json#/components/schemas/ExternalSharedModel/properties/id'\n        id4:\n          $ref: './external-shared.json#/components/schemas/ExternalSharedModel/properties/id'\n\n    # Alias references\n    ExternalSchemaExternalPropAlias:\n      description: Alias to external property via component property ref\n      type: object\n      properties:\n        id5:\n          $ref: '#/components/schemas/ExternalSchemaExternalProp/properties/id3'\n        id6:\n          $ref: '#/components/schemas/ExternalSchemaExternalProp/properties/id4'\n\n    # Nested property references (multiple uses)\n    ExternalDoubleNestedProp:\n      description: External double nested prop via property ref\n      type: object\n      properties:\n        deep1:\n          $ref: './external-shared.json#/components/schemas/ExternalNested/properties/inner/properties/deep'\n        deep2:\n          $ref: './external-shared.json#/components/schemas/ExternalNested/properties/inner/properties/deep'\n\n    # Numeric property references (multiple uses)\n    ExternalDoubleNestedNumeric:\n      description: External double nested numeric properties\n      type: object\n      properties:\n        numeric1:\n          $ref: './external-shared.json#/components/schemas/ExternalNestedNumeric/properties/0/properties/1'\n        numeric2:\n          $ref: './external-shared.json#/components/schemas/ExternalNestedNumeric/properties/0/properties/1'\n\n    # Complex nested object references\n    ExternalNestedObjectA:\n      description: External nested object reference (A)\n      $ref: './external-shared.json#/components/schemas/ExternalNested'\n    ExternalNestedObjectB:\n      description: External nested object reference (B) - second use\n      $ref: './external-shared.json#/components/schemas/ExternalNested'\n\n    # Numeric nested object references\n    ExternalNestedNumericObjectA:\n      description: External numeric nested object reference (A)\n      $ref: './external-shared.json#/components/schemas/ExternalNestedNumeric'\n    ExternalNestedNumericObjectB:\n      description: External numeric nested object reference (B) - second use\n      $ref: './external-shared.json#/components/schemas/ExternalNestedNumeric'\n\n    # Mixed property references\n    ExternalMixedProperties:\n      description: Mixed external property references\n      type: object\n      properties:\n        id7:\n          $ref: './external-shared.json#/components/schemas/ExternalSharedModel/properties/id'\n        name1:\n          $ref: './external-shared.json#/components/schemas/ExternalSharedModel/properties/name'\n        uuid6:\n          $ref: './external-shared.json#/components/schemas/ExternalSharedModelWithUuid'\n        deep3:\n          $ref: './external-shared.json#/components/schemas/ExternalNested/properties/inner/properties/deep'\n        numeric3:\n          $ref: './external-shared.json#/components/schemas/ExternalNestedNumeric/properties/0/properties/1'\n\n    # Array of external references\n    ExternalArraySchema:\n      description: Array containing external references\n      type: object\n      properties:\n        items:\n          type: array\n          items:\n            $ref: './external-shared.json#/components/schemas/ExternalSharedModel'\n        uuidItems:\n          type: array\n          items:\n            $ref: './external-shared.json#/components/schemas/ExternalSharedModelWithUuid'\n\n    # Union types with external references\n    ExternalUnionSchema:\n      description: Union type with external references\n      oneOf:\n        - $ref: './external-shared.json#/components/schemas/ExternalSharedModel'\n        - $ref: './external-shared.json#/components/schemas/ExternalSharedModel'\n        - $ref: './external-shared.json#/components/schemas/ExternalSharedModelWithUuid'\n        - $ref: './external-shared.json#/components/schemas/ExternalSharedModelWithUuid'\n\n    # AllOf with external references\n    ExternalAllOfSchema:\n      description: AllOf with external references\n      allOf:\n        - $ref: './external-shared.json#/components/schemas/ExternalSharedModel'\n        - $ref: './external-shared.json#/components/schemas/ExternalSharedModel'\n        - type: object\n          properties:\n            additional:\n              $ref: './external-shared.json#/components/schemas/ExternalSharedModelWithUuid'\n\n    # AnyOf with external references\n    ExternalAnyOfSchema:\n      description: AnyOf with external references\n      anyOf:\n        - $ref: './external-shared.json#/components/schemas/ExternalNested'\n        - $ref: './external-shared.json#/components/schemas/ExternalNested'\n        - $ref: './external-shared.json#/components/schemas/ExternalNestedNumeric'\n        - $ref: './external-shared.json#/components/schemas/ExternalNestedNumeric'\n\n  # Parameters using external references\n  parameters:\n    ExternalIdParam:\n      name: id\n      in: path\n      required: true\n      schema:\n        $ref: './external-shared.json#/components/schemas/ExternalSharedModel/properties/id'\n    ExternalUuidParam:\n      name: uuid\n      in: query\n      schema:\n        $ref: './external-shared.json#/components/schemas/ExternalSharedModelWithUuid'\n    ExternalDeepParam:\n      name: deep\n      in: header\n      schema:\n        $ref: './external-shared.json#/components/schemas/ExternalNested/properties/inner/properties/deep'\n    ExternalNumericParam:\n      name: numeric\n      in: query\n      schema:\n        $ref: './external-shared.json#/components/schemas/ExternalNestedNumeric/properties/0/properties/1'\n\n  # Request bodies using external references\n  requestBodies:\n    ExternalModelBody:\n      description: Request body using external model\n      required: true\n      content:\n        application/json:\n          schema:\n            $ref: './external-shared.json#/components/schemas/ExternalSharedModel'\n    ExternalUuidBody:\n      description: Request body using external UUID\n      content:\n        application/json:\n          schema:\n            $ref: './external-shared.json#/components/schemas/ExternalSharedModelWithUuid'\n    ExternalNestedBody:\n      description: Request body using external nested object\n      content:\n        application/json:\n          schema:\n            $ref: './external-shared.json#/components/schemas/ExternalNested'\n    ExternalMixedBody:\n      description: Request body with mixed external properties\n      content:\n        application/json:\n          schema:\n            type: object\n            properties:\n              id:\n                $ref: './external-shared.json#/components/schemas/ExternalSharedModel/properties/id'\n              name:\n                $ref: './external-shared.json#/components/schemas/ExternalSharedModel/properties/name'\n              uuid:\n                $ref: './external-shared.json#/components/schemas/ExternalSharedModelWithUuid'\n              deep:\n                $ref: './external-shared.json#/components/schemas/ExternalNested/properties/inner/properties/deep'\n\n  # Responses using external references\n  responses:\n    ExternalModelResponse:\n      description: Response using external model\n      content:\n        application/json:\n          schema:\n            $ref: './external-shared.json#/components/schemas/ExternalSharedModel'\n    ExternalUuidResponse:\n      description: Response using external UUID\n      content:\n        application/json:\n          schema:\n            $ref: './external-shared.json#/components/schemas/ExternalSharedModelWithUuid'\n    ExternalNestedResponse:\n      description: Response using external nested object\n      content:\n        application/json:\n          schema:\n            $ref: './external-shared.json#/components/schemas/ExternalNested'\n    ExternalArrayResponse:\n      description: Response with array of external models\n      content:\n        application/json:\n          schema:\n            type: array\n            items:\n              $ref: './external-shared.json#/components/schemas/ExternalSharedModel'\n    ExternalUnionResponse:\n      description: Response with union of external types\n      content:\n        application/json:\n          schema:\n            oneOf:\n              - $ref: './external-shared.json#/components/schemas/ExternalSharedModel'\n              - $ref: './external-shared.json#/components/schemas/ExternalSharedModelWithUuid'\n              - $ref: './external-shared.json#/components/schemas/ExternalNested'\n\n  # Headers using external references\n  headers:\n    ExternalIdHeader:\n      description: Header using external ID property\n      schema:\n        $ref: './external-shared.json#/components/schemas/ExternalSharedModel/properties/id'\n    ExternalUuidHeader:\n      description: Header using external UUID\n      schema:\n        $ref: './external-shared.json#/components/schemas/ExternalSharedModelWithUuid'\n    ExternalDeepHeader:\n      description: Header using external deep property\n      schema:\n        $ref: './external-shared.json#/components/schemas/ExternalNested/properties/inner/properties/deep'\n"
  },
  {
    "path": "specs/3.0.x/full.yaml",
    "content": "openapi: 3.0.4\ninfo:\n  title: OpenAPI 3.0.4 example\n  version: '1'\nservers:\n  - url: http://localhost:3000/base\npaths:\n  /api/v{api-version}/no+tag:\n    tags: []\n    get:\n      operationId: export\n    patch:\n      responses:\n        default:\n          description: OK\n    post:\n      operationId: import\n      requestBody:\n        required: true\n        content:\n          application/json:\n            schema:\n              type: object\n              oneOf:\n                - $ref: '#/components/schemas/ModelWithReadOnlyAndWriteOnly'\n                - $ref: '#/components/schemas/ModelWithArrayReadOnlyAndWriteOnly'\n      responses:\n        '200':\n          description: Success\n          content:\n            application/json; type=collection:\n              schema:\n                $ref: '#/components/schemas/Model-From.Zendesk'\n        default:\n          description: Default success response\n          content:\n            application/json:\n              schema:\n                $ref: '#/components/schemas/ModelWithReadOnlyAndWriteOnly'\n    put:\n      operationId: foo+Wow\n      responses:\n        default:\n          description: OK\n  /api/v{api-version}/simple/$count:\n    get:\n      tags:\n        - Simple\n      operationId: api/v{version}/ODataController/$count\n      responses:\n        '200':\n          description: Success\n          content:\n            application/json; type=collection:\n              schema:\n                $ref: '#/components/schemas/Model-From.Zendesk'\n  /api/v{api-version}/simple:operation:\n    get:\n      parameters:\n        - description: foo in method\n          in: path\n          name: foo_param\n          required: true\n          schema:\n            type: string\n      responses:\n        '200':\n          description: Response is a simple number\n          content:\n            application/json:\n              schema:\n                type: number\n        default:\n          description: Default error response\n          content:\n            application/json:\n              schema:\n                $ref: '#/components/schemas/ModelWithBoolean'\n  /api/v{api-version}/simple:\n    get:\n      tags:\n        - Simple\n      operationId: GetCallWithoutParametersAndResponse\n    put:\n      tags:\n        - Simple\n      operationId: PutCallWithoutParametersAndResponse\n    post:\n      tags:\n        - Simple\n      operationId: PostCallWithoutParametersAndResponse\n    delete:\n      tags:\n        - Simple\n      operationId: DeleteCallWithoutParametersAndResponse\n    options:\n      tags:\n        - Simple\n      operationId: OptionsCallWithoutParametersAndResponse\n    head:\n      tags:\n        - Simple\n      operationId: HeadCallWithoutParametersAndResponse\n    patch:\n      tags:\n        - Simple\n      operationId: PatchCallWithoutParametersAndResponse\n  /api/v{api-version}/foo/{foo_param}/bar/{BarParam}:\n    delete:\n      tags:\n        - Parameters\n      operationId: deleteFoo\n      parameters:\n        - description: foo in method\n          in: path\n          name: foo_param\n          required: true\n          schema:\n            type: string\n        - description: bar in method\n          in: path\n          name: BarParam\n          required: true\n          schema:\n            type: string\n        - description: Parameter with illegal characters\n          name: x-Foo-Bar\n          in: header\n          required: true\n          content:\n            application/json:\n              schema:\n                $ref: '#/components/schemas/ModelWithString'\n    parameters:\n      - description: foo in global parameters\n        in: path\n        name: foo_param\n        required: true\n        schema:\n          type: string\n      - description: bar in global parameters\n        in: path\n        name: BarParam\n        required: true\n        schema:\n          type: string\n  /api/v{api-version}/descriptions:\n    post:\n      tags:\n        - Descriptions\n      operationId: CallWithDescriptions\n      parameters:\n        - description: |-\n            Testing multiline comments in string: First line\n            Second line\n\n            Fourth line\n          name: parameterWithBreaks\n          in: query\n          schema:\n            type: string\n        - description: 'Testing backticks in string: `backticks` and ```multiple\n            backticks``` should work'\n          name: parameterWithBackticks\n          in: query\n          schema:\n            type: string\n        - description: \"Testing slashes in string: \\\\backwards\\\\\\\\\\\\ and /forwards///\n            should work\"\n          name: parameterWithSlashes\n          in: query\n          schema:\n            type: string\n        - description: 'Testing expression placeholders in string: ${expression} should\n            work'\n          name: parameterWithExpressionPlaceholders\n          in: query\n          schema:\n            type: string\n        - description: 'Testing quotes in string: ''single quote'''''' and \"double\n            quotes\"\"\" should work'\n          name: parameterWithQuotes\n          in: query\n          schema:\n            type: string\n        - description: 'Testing reserved characters in string: /* inline */ and /** inline\n            **/ should work'\n          name: parameterWithReservedCharacters\n          in: query\n          schema:\n            type: string\n  /api/v{api-version}/parameters/deprecated:\n    post:\n      tags:\n        - Deprecated\n      deprecated: true\n      operationId: DeprecatedCall\n      parameters:\n        - deprecated: true\n          description: This parameter is deprecated\n          name: parameter\n          in: header\n          required: true\n          schema:\n            nullable: true\n            allOf:\n              - $ref: '#/components/schemas/DeprecatedModel'\n  /api/v{api-version}/parameters/{parameterPath}:\n    post:\n      tags:\n        - Parameters\n      operationId: CallWithParameters\n      parameters:\n        - description: This is the parameter that goes into the header\n          name: parameterHeader\n          in: header\n          required: true\n          schema:\n            nullable: true\n            type: string\n        - required: false\n          schema:\n            $ref: '#/components/schemas/ModelWithNestedArrayEnumsDataFoo'\n          name: foo_ref_enum\n          in: query\n        - required: true\n          schema:\n            allOf:\n              - $ref: '#/components/schemas/ModelWithNestedArrayEnumsDataFoo'\n          name: foo_all_of_enum\n          in: query\n        - description: This is the parameter that goes into the query params\n          name: cursor\n          in: query\n          required: true\n          schema:\n            nullable: true\n            type: string\n        - description: This is the parameter that goes into the cookie\n          name: parameterCookie\n          in: cookie\n          required: true\n          schema:\n            nullable: true\n            type: string\n        - description: This is the parameter that goes into the path\n          name: parameterPath\n          in: path\n          required: true\n          schema:\n            nullable: true\n            type: string\n        - description: api-version should be required in standalone clients\n          name: api-version\n          in: path\n          required: true\n          schema:\n            nullable: true\n            type: string\n      requestBody:\n        description: This is the parameter that goes into the body\n        required: true\n        content:\n          application/json:\n            schema:\n              nullable: true\n              properties: {}\n              type: object\n  /api/v{api-version}/parameters/{parameter.path.1}/{parameter-path-2}/{PARAMETER-PATH-3}:\n    post:\n      tags:\n        - Parameters\n      operationId: CallWithWeirdParameterNames\n      parameters:\n        - description: This is the parameter that goes into the path\n          name: parameter.path.1\n          in: path\n          required: false\n          schema:\n            nullable: false\n            type: string\n        - description: This is the parameter that goes into the path\n          name: parameter-path-2\n          in: path\n          required: false\n          schema:\n            nullable: false\n            type: string\n        - description: This is the parameter that goes into the path\n          name: PARAMETER-PATH-3\n          in: path\n          required: false\n          schema:\n            nullable: false\n            type: string\n        - description: This is the parameter with a reserved keyword\n          name: default\n          in: query\n          required: false\n          schema:\n            nullable: false\n            type: string\n        - description: This is the parameter that goes into the request header\n          name: parameter.header\n          in: header\n          required: true\n          schema:\n            nullable: true\n            type: string\n        - description: This is the parameter that goes into the request query params\n          name: parameter-query\n          in: query\n          required: true\n          schema:\n            nullable: true\n            type: string\n        - description: This is the parameter that goes into the cookie\n          name: PARAMETER-COOKIE\n          in: cookie\n          required: true\n          schema:\n            nullable: true\n            type: string\n        - description: api-version should be required in standalone clients\n          name: api-version\n          in: path\n          required: true\n          schema:\n            nullable: true\n            type: string\n      requestBody:\n        description: This is the parameter that goes into the body\n        required: true\n        content:\n          application/json:\n            schema:\n              nullable: true\n              allOf:\n                - $ref: '#/components/schemas/ModelWithString'\n  /api/v{api-version}/parameters:\n    get:\n      tags:\n        - Parameters\n      operationId: GetCallWithOptionalParam\n      parameters:\n        - description: This is an optional parameter\n          name: page\n          in: query\n          required: false\n          schema:\n            type: number\n      requestBody:\n        description: This is a required parameter\n        required: true\n        content:\n          application/json:\n            schema:\n              $ref: '#/components/schemas/ModelWithOneOfEnum'\n    post:\n      tags:\n        - Parameters\n      operationId: PostCallWithOptionalParam\n      parameters:\n        - description: This is a required parameter\n          name: parameter\n          in: query\n          required: true\n          schema:\n            $ref: '#/components/schemas/Pageable'\n      requestBody:\n        description: This is an optional parameter\n        required: false\n        content:\n          application/json:\n            schema:\n              properties:\n                offset:\n                  nullable: true\n                  required: true\n                  type: number\n              type: object\n      responses:\n        '200':\n          description: Response is a simple number\n          content:\n            application/json:\n              schema:\n                type: number\n        '204':\n          description: Success\n  /api/v{api-version}/requestBody:\n    post:\n      tags:\n        - RequestBody\n      parameters:\n        - $ref: '#/components/parameters/SimpleParameter'\n      requestBody:\n        $ref: '#/components/requestBodies/SimpleRequestBody'\n  /api/v{api-version}/formData:\n    post:\n      tags:\n        - FormData\n      parameters:\n        - $ref: '#/components/parameters/SimpleParameter'\n      requestBody:\n        $ref: '#/components/requestBodies/SimpleFormData'\n  /api/v{api-version}/defaults:\n    get:\n      tags:\n        - Defaults\n      operationId: CallWithDefaultParameters\n      parameters:\n        - description: This is a simple string with default value\n          name: parameterString\n          in: query\n          schema:\n            nullable: true\n            type: string\n            default: Hello World!\n        - description: This is a simple number with default value\n          name: parameterNumber\n          in: query\n          schema:\n            nullable: true\n            type: number\n            default: 123\n        - description: This is a simple boolean with default value\n          name: parameterBoolean\n          in: query\n          schema:\n            nullable: true\n            type: boolean\n            default: true\n        - description: This is a simple enum with default value\n          name: parameterEnum\n          in: query\n          schema:\n            enum:\n              - Success\n              - Warning\n              - Error\n            default: 0\n        - description: This is a simple model with default value\n          name: parameterModel\n          in: query\n          schema:\n            nullable: true\n            allOf:\n              - $ref: '#/components/schemas/ModelWithString'\n            default:\n              prop: Hello World!\n    post:\n      tags:\n        - Defaults\n      operationId: CallWithDefaultOptionalParameters\n      parameters:\n        - description: This is a simple string that is optional with default value\n          name: parameterString\n          in: query\n          required: false\n          schema:\n            type: string\n            default: Hello World!\n        - description: This is a simple number that is optional with default value\n          name: parameterNumber\n          in: query\n          required: false\n          schema:\n            type: number\n            default: 123\n        - description: This is a simple boolean that is optional with default value\n          name: parameterBoolean\n          in: query\n          required: false\n          schema:\n            type: boolean\n            default: true\n        - description: This is a simple enum that is optional with default value\n          name: parameterEnum\n          in: query\n          required: false\n          schema:\n            enum:\n              - Success\n              - Warning\n              - Error\n            default: 0\n        - description: This is a simple model that is optional with default value\n          name: parameterModel\n          in: query\n          required: false\n          schema:\n            $ref: '#/components/schemas/ModelWithString'\n            default:\n              prop: Hello World!\n    put:\n      tags:\n        - Defaults\n      operationId: CallToTestOrderOfParams\n      parameters:\n        - description: This is a optional string with default\n          name: parameterOptionalStringWithDefault\n          in: query\n          required: false\n          schema:\n            type: string\n            default: Hello World!\n        - description: This is a optional string with empty default\n          name: parameterOptionalStringWithEmptyDefault\n          in: query\n          required: false\n          schema:\n            type: string\n            default: ''\n        - description: This is a optional string with no default\n          name: parameterOptionalStringWithNoDefault\n          in: query\n          required: false\n          schema:\n            type: string\n        - description: This is a string with default\n          name: parameterStringWithDefault\n          in: query\n          required: true\n          schema:\n            type: string\n            default: Hello World!\n        - description: This is a string with empty default\n          name: parameterStringWithEmptyDefault\n          in: query\n          required: true\n          schema:\n            type: string\n            default: ''\n        - description: This is a string with no default\n          name: parameterStringWithNoDefault\n          in: query\n          required: true\n          schema:\n            type: string\n        - description: This is a string that can be null with no default\n          name: parameterStringNullableWithNoDefault\n          in: query\n          required: false\n          schema:\n            type: string\n            nullable: true\n        - description: This is a string that can be null with default\n          name: parameterStringNullableWithDefault\n          in: query\n          required: false\n          schema:\n            type: string\n            nullable: true\n            default: null\n  /api/v{api-version}/duplicate:\n    delete:\n      tags:\n        - Duplicate\n      operationId: DuplicateName\n    get:\n      tags:\n        - Duplicate\n      operationId: DuplicateName2\n    post:\n      tags:\n        - Duplicate\n      operationId: DuplicateName3\n    put:\n      tags:\n        - Duplicate\n      operationId: DuplicateName4\n  /api/v{api-version}/no-content:\n    get:\n      tags:\n        - NoContent\n      operationId: CallWithNoContentResponse\n      responses:\n        '204':\n          description: Success\n  /api/v{api-version}/multiple-tags/response-and-no-content:\n    get:\n      tags:\n        - Response\n        - NoContent\n      operationId: CallWithResponseAndNoContentResponse\n      responses:\n        '200':\n          description: Response is a simple number\n          content:\n            application/json:\n              schema:\n                type: number\n        '204':\n          description: Success\n  /api/v{api-version}/multiple-tags/a:\n    get:\n      tags:\n        - MultipleTags1\n        - MultipleTags2\n      operationId: DummyA\n      responses:\n        '200':\n          content:\n            application/json:\n              schema:\n                $ref: '#/components/schemas/400'\n  /api/v{api-version}/multiple-tags/b:\n    get:\n      tags:\n        - MultipleTags1\n        - MultipleTags2\n        - MultipleTags3\n      operationId: DummyB\n      responses:\n        '204':\n          description: Success\n  /api/v{api-version}/response:\n    get:\n      tags:\n        - Response\n      operationId: CallWithResponse\n      responses:\n        default:\n          content:\n            application/json:\n              schema:\n                $ref: '#/components/schemas/import'\n    post:\n      tags:\n        - Response\n      operationId: CallWithDuplicateResponses\n      responses:\n        '200':\n          description: Message for 200 response\n          content:\n            application/json:\n              schema:\n                allOf:\n                  - $ref: '#/components/schemas/ModelWithBoolean'\n                  - $ref: '#/components/schemas/ModelWithInteger'\n        '201':\n          description: Message for 201 response\n          content:\n            application/json:\n              schema:\n                $ref: '#/components/schemas/ModelWithString'\n        '202':\n          description: Message for 202 response\n          content:\n            application/json:\n              schema:\n                $ref: '#/components/schemas/ModelWithString'\n        '500':\n          description: Message for 500 error\n          content:\n            application/json:\n              schema:\n                $ref: '#/components/schemas/ModelWithStringError'\n        '501':\n          description: Message for 501 error\n          content:\n            application/json:\n              schema:\n                $ref: '#/components/schemas/ModelWithStringError'\n        '502':\n          description: Message for 502 error\n          content:\n            application/json:\n              schema:\n                $ref: '#/components/schemas/ModelWithStringError'\n        default:\n          description: Default error response\n          content:\n            application/json:\n              schema:\n                $ref: '#/components/schemas/ModelWithBoolean'\n        4XX:\n          description: Message for 4XX errors\n          content:\n            application/json:\n              schema:\n                $ref: '#/components/schemas/DictionaryWithArray'\n    put:\n      tags:\n        - Response\n      operationId: CallWithResponses\n      responses:\n        '200':\n          description: Message for 200 response\n          content:\n            application/json:\n              schema:\n                type: object\n                properties:\n                  '@namespace.string':\n                    type: string\n                    readOnly: true\n                  '@namespace.integer':\n                    type: integer\n                    readOnly: true\n                  value:\n                    type: array\n                    items:\n                      $ref: '#/components/schemas/ModelWithString'\n                    readOnly: true\n        '201':\n          description: Message for 201 response\n          content:\n            application/json:\n              schema:\n                $ref: '#/components/schemas/ModelThatExtends'\n        '202':\n          description: Message for 202 response\n          content:\n            application/json:\n              schema:\n                $ref: '#/components/schemas/ModelThatExtendsExtends'\n        '500':\n          description: Message for 500 error\n          content:\n            application/json:\n              schema:\n                $ref: '#/components/schemas/ModelWithStringError'\n        '501':\n          description: Message for 501 error\n          content:\n            application/json:\n              schema:\n                $ref: '#/components/schemas/ModelWithStringError'\n        '502':\n          description: Message for 502 error\n          content:\n            application/json:\n              schema:\n                $ref: '#/components/schemas/ModelWithStringError'\n        default:\n          description: Message for default response\n          content:\n            application/json:\n              schema:\n                $ref: '#/components/schemas/ModelWithStringError'\n  /api/v{api-version}/collectionFormat:\n    get:\n      tags:\n        - CollectionFormat\n      operationId: CollectionFormat\n      parameters:\n        - description: This is an array parameter that is sent as csv format\n            (comma-separated values)\n          name: parameterArrayCSV\n          in: query\n          required: true\n          schema:\n            nullable: true\n            type: array\n            items:\n              type: string\n          collectionFormat: csv\n        - description: This is an array parameter that is sent as ssv format\n            (space-separated values)\n          name: parameterArraySSV\n          in: query\n          required: true\n          schema:\n            nullable: true\n            type: array\n            items:\n              type: string\n          collectionFormat: ssv\n        - description: This is an array parameter that is sent as tsv format\n            (tab-separated values)\n          name: parameterArrayTSV\n          in: query\n          required: true\n          schema:\n            nullable: true\n            type: array\n            items:\n              type: string\n          collectionFormat: tsv\n        - description: This is an array parameter that is sent as pipes format\n            (pipe-separated values)\n          name: parameterArrayPipes\n          in: query\n          required: true\n          schema:\n            nullable: true\n            type: array\n            items:\n              type: string\n          collectionFormat: pipes\n        - description: This is an array parameter that is sent as multi format (multiple\n            parameter instances)\n          name: parameterArrayMulti\n          in: query\n          required: true\n          schema:\n            nullable: true\n            type: array\n            items:\n              type: string\n          collectionFormat: multi\n  /api/v{api-version}/types:\n    get:\n      tags:\n        - Types\n      operationId: Types\n      parameters:\n        - description: This is a number parameter\n          name: parameterNumber\n          in: query\n          required: true\n          schema:\n            type: number\n            default: 123\n        - description: This is a string parameter\n          name: parameterString\n          in: query\n          required: true\n          schema:\n            type: string\n            default: default\n            nullable: true\n        - description: This is a boolean parameter\n          name: parameterBoolean\n          in: query\n          required: true\n          schema:\n            type: boolean\n            default: true\n            nullable: true\n        - description: This is an object parameter\n          name: parameterObject\n          in: query\n          required: true\n          schema:\n            type: object\n            default: null\n            nullable: true\n        - description: This is an array parameter\n          name: parameterArray\n          in: query\n          required: true\n          schema:\n            type: array\n            items:\n              type: string\n            nullable: true\n        - description: This is a dictionary parameter\n          name: parameterDictionary\n          in: query\n          required: true\n          schema:\n            type: object\n            items:\n              type: string\n            nullable: true\n        - description: This is an enum parameter\n          name: parameterEnum\n          in: query\n          required: true\n          schema:\n            enum:\n              - Success\n              - Warning\n              - Error\n            nullable: true\n        - description: This is a number parameter\n          name: id\n          in: path\n          schema:\n            type: integer\n            format: int32\n      responses:\n        '200':\n          description: Response is a simple number\n          content:\n            application/json:\n              schema:\n                type: number\n        '201':\n          description: Response is a simple string\n          content:\n            application/json:\n              schema:\n                type: string\n        '202':\n          description: Response is a simple boolean\n          content:\n            application/json:\n              schema:\n                type: boolean\n        '203':\n          description: Response is a simple object\n          content:\n            application/json:\n              schema:\n                type: object\n  /api/v{api-version}/upload:\n    post:\n      tags:\n        - Upload\n      operationId: UploadFile\n      parameters:\n        - description: api-version should be required in standalone clients\n          name: api-version\n          in: path\n          required: true\n          schema:\n            type: string\n            nullable: true\n      requestBody:\n        content:\n          application/x-www-form-urlencoded:\n            description: Supply a file reference for upload\n            schema:\n              format: binary\n              type: string\n        required: true\n      responses:\n        '200':\n          content:\n            application/json:\n              schema:\n                type: boolean\n  /api/v{api-version}/file/{id}:\n    get:\n      tags:\n        - FileResponse\n      operationId: FileResponse\n      parameters:\n        - name: id\n          in: path\n          required: true\n          schema:\n            type: string\n        - description: api-version should be required in standalone clients\n          name: api-version\n          in: path\n          required: true\n          schema:\n            type: string\n      responses:\n        '200':\n          description: Success\n          content:\n            audio/*:\n              schema:\n                format: binary\n                type: string\n            video/*:\n              schema:\n                format: binary\n                type: string\n  /api/v{api-version}/complex:\n    get:\n      tags:\n        - Complex\n      operationId: ComplexTypes\n      parameters:\n        - description: Parameter containing object\n          name: parameterObject\n          in: query\n          required: true\n          schema:\n            type: object\n            properties:\n              first:\n                type: object\n                properties:\n                  second:\n                    type: object\n                    properties:\n                      third:\n                        type: string\n        - description: Parameter containing reference\n          name: parameterReference\n          in: query\n          required: true\n          schema:\n            $ref: '#/components/schemas/ModelWithString'\n      responses:\n        '200':\n          description: Successful response\n          content:\n            application/json:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/ModelWithString'\n        '400':\n          description: 400 `server` error\n        '500':\n          description: 500 server error\n  /api/v{api-version}/multipart:\n    post:\n      tags:\n        - multipart\n      operationId: MultipartRequest\n      requestBody:\n        content:\n          multipart/form-data:\n            schema:\n              type: object\n              properties:\n                content:\n                  type: string\n                  format: binary\n                data:\n                  allOf:\n                    - $ref: '#/components/schemas/ModelWithString'\n                  nullable: true\n            encoding:\n              content:\n                style: form\n              data:\n                style: form\n    get:\n      tags:\n        - multipart\n      operationId: MultipartResponse\n      responses:\n        '200':\n          description: OK\n          content:\n            multipart/mixed:\n              schema:\n                type: object\n                properties:\n                  file:\n                    type: string\n                    format: binary\n                  metadata:\n                    type: object\n                    properties:\n                      foo:\n                        type: string\n                      bar:\n                        type: string\n  /api/v{api-version}/complex/{id}:\n    put:\n      tags:\n        - Complex\n      operationId: ComplexParams\n      parameters:\n        - name: id\n          in: path\n          required: true\n          schema:\n            type: integer\n            format: int32\n        - description: api-version should be required in standalone clients\n          name: api-version\n          in: path\n          required: true\n          schema:\n            type: string\n      requestBody:\n        content:\n          application/json-patch+json:\n            schema:\n              required:\n                - key\n                - name\n                - parameters\n                - type\n              type: object\n              properties:\n                key:\n                  maxLength: 64\n                  pattern: ^[a-zA-Z0-9_]*$\n                  type: string\n                  nullable: true\n                  readOnly: true\n                name:\n                  maxLength: 255\n                  type: string\n                  nullable: true\n                enabled:\n                  type: boolean\n                  default: true\n                type:\n                  enum:\n                    - Monkey\n                    - Horse\n                    - Bird\n                  type: string\n                  readOnly: true\n                listOfModels:\n                  type: array\n                  items:\n                    $ref: '#/components/schemas/ModelWithString'\n                  nullable: true\n                listOfStrings:\n                  type: array\n                  items:\n                    type: string\n                  nullable: true\n                parameters:\n                  type: object\n                  oneOf:\n                    - $ref: '#/components/schemas/ModelWithString'\n                    - $ref: '#/components/schemas/ModelWithEnum'\n                    - $ref: '#/components/schemas/ModelWithArray'\n                    - $ref: '#/components/schemas/ModelWithDictionary'\n                user:\n                  type: object\n                  properties:\n                    id:\n                      type: integer\n                      format: int32\n                      readOnly: true\n                    name:\n                      type: string\n                      nullable: true\n                      readOnly: true\n                  readOnly: true\n      responses:\n        '200':\n          description: Success\n          content:\n            application/json; type=collection:\n              schema:\n                $ref: '#/components/schemas/ModelWithString'\n  /api/v{api-version}/header:\n    post:\n      tags:\n        - Header\n      operationId: CallWithResultFromHeader\n      responses:\n        '200':\n          description: Successful response\n          headers:\n            operation-location:\n              schema:\n                type: string\n        '400':\n          description: 400 server error\n        '500':\n          description: 500 server error\n  /api/v{api-version}/error:\n    post:\n      tags:\n        - Error\n      operationId: testErrorCode\n      parameters:\n        - description: Status code to return\n          name: status\n          in: query\n          required: true\n          schema:\n            type: integer\n      responses:\n        '200':\n          description: 'Custom message: Successful response'\n        '500':\n          description: 'Custom message: Internal Server Error'\n        '501':\n          description: 'Custom message: Not Implemented'\n        '502':\n          description: 'Custom message: Bad Gateway'\n        '503':\n          description: 'Custom message: Service Unavailable'\n  /api/v{api-version}/non-ascii-æøåÆØÅöôêÊ字符串:\n    post:\n      tags:\n        - Non-Ascii-æøåÆØÅöôêÊ\n      operationId: nonAsciiæøåÆØÅöôêÊ字符串\n      parameters:\n        - description: Dummy input param\n          name: nonAsciiParamæøåÆØÅöôêÊ\n          in: query\n          required: true\n          schema:\n            type: integer\n      responses:\n        '200':\n          description: Successful response\n          content:\n            application/json:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/NonAsciiStringæøåÆØÅöôêÊ字符串'\n    put:\n      tags:\n        - Non-Ascii-æøåÆØÅöôêÊ\n      summary: Login User\n      operationId: putWithFormUrlEncoded\n      requestBody:\n        content:\n          application/x-www-form-urlencoded:\n            schema:\n              $ref: '#/components/schemas/ArrayWithStrings'\n        required: true\ncomponents:\n  requestBodies:\n    SimpleRequestBody:\n      x-body-name: foo\n      description: A reusable request body\n      required: false\n      content:\n        application/json:\n          schema:\n            $ref: '#/components/schemas/ModelWithString'\n    SimpleFormData:\n      description: A reusable request body\n      required: false\n      content:\n        multipart/form-data:\n          schema:\n            $ref: '#/components/schemas/ModelWithString'\n  parameters:\n    SimpleParameter:\n      description: This is a reusable parameter\n      name: parameter\n      in: query\n      required: false\n      schema:\n        type: string\n    x-Foo-Bar:\n      description: Parameter with illegal characters\n      name: x-Foo-Bar\n      in: header\n      required: true\n      content:\n        application/json:\n          schema:\n            $ref: '#/components/schemas/ModelWithString'\n  schemas:\n    ExternalRefA:\n      description: External ref to shared model (A)\n      $ref: './external-shared.json#/components/schemas/ExternalSharedModel'\n    ExternalRefB:\n      description: External ref to shared model (B)\n      $ref: './external-shared.json#/components/schemas/ExternalSharedModel'\n    '400':\n      description: Model with number-only name\n      type: string\n    camelCaseCommentWithBreaks:\n      description: |-\n        Testing multiline comments in string: First line\n        Second line\n\n        Fourth line\n      type: integer\n    CommentWithBreaks:\n      description: |-\n        Testing multiline comments in string: First line\n        Second line\n\n        Fourth line\n      type: integer\n    CommentWithBackticks:\n      description: 'Testing backticks in string: `backticks` and ```multiple\n        backticks``` should work'\n      type: integer\n    CommentWithBackticksAndQuotes:\n      description: 'Testing backticks and quotes in string: `backticks`, ''quotes'',\n        \"double quotes\" and ```multiple backticks``` should work'\n      type: integer\n    CommentWithSlashes:\n      description: \"Testing slashes in string: \\\\backwards\\\\\\\\\\\\ and /forwards///\n        should work\"\n      type: integer\n    CommentWithExpressionPlaceholders:\n      description: 'Testing expression placeholders in string: ${expression} should work'\n      type: integer\n    CommentWithQuotes:\n      description: 'Testing quotes in string: ''single quote'''''' and \"double\n        quotes\"\"\" should work'\n      type: integer\n    CommentWithReservedCharacters:\n      description: 'Testing reserved characters in string: /* inline */ and /** inline\n        **/ should work'\n      type: integer\n    SimpleInteger:\n      description: This is a simple number\n      type: integer\n    SimpleBoolean:\n      description: This is a simple boolean\n      type: boolean\n    SimpleString:\n      description: This is a simple string\n      type: string\n    NonAsciiStringæøåÆØÅöôêÊ字符串:\n      description: A string with non-ascii (unicode) characters valid in typescript\n        identifiers (æøåÆØÅöÔèÈ字符串)\n      type: string\n    SimpleFile:\n      description: This is a simple file\n      format: binary\n      type: string\n    SimpleReference:\n      description: This is a simple reference\n      allOf:\n        - $ref: '#/components/schemas/ModelWithString'\n    SimpleStringWithPattern:\n      description: This is a simple string\n      type: string\n      nullable: true\n      maxLength: 64\n      pattern: ^[a-zA-Z0-9_]*$\n    EnumWithStrings:\n      description: This is a simple enum with strings\n      enum:\n        - Success\n        - Warning\n        - Error\n        - \"'Single Quote'\"\n        - '\"Double Quotes\"'\n        - 'Non-ascii: øæåôöØÆÅÔÖ字符串'\n    EnumWithReplacedCharacters:\n      enum:\n        - \"'Single Quote'\"\n        - '\"Double Quotes\"'\n        - øæåôöØÆÅÔÖ字符串\n        - 3.1\n        - ''\n      type: string\n    EnumWithNumbers:\n      description: This is a simple enum with numbers\n      enum:\n        - 1\n        - 2\n        - 3\n        - 1.1\n        - 1.2\n        - 1.3\n        - 100\n        - 200\n        - 300\n        - -100\n        - -200\n        - -300\n        - -1.1\n        - -1.2\n        - -1.3\n      default: 200\n    EnumFromDescription:\n      description: Success=1,Warning=2,Error=3\n      type: number\n    EnumWithExtensions:\n      description: This is a simple enum with numbers\n      enum:\n        - 200\n        - 400\n        - 500\n      x-enum-varnames:\n        - CUSTOM_SUCCESS\n        - CUSTOM_WARNING\n        - CUSTOM_ERROR\n      x-enum-descriptions:\n        - Used when the status of something is successful\n        - Used when the status of something has a warning\n        - Used when the status of something has an error\n    EnumWithXEnumNames:\n      enum:\n        - 0\n        - 1\n        - 2\n      x-enumNames:\n        - zero\n        - one\n        - two\n    ArrayWithNumbers:\n      description: This is a simple array with numbers\n      type: array\n      items:\n        type: integer\n    ArrayWithBooleans:\n      description: This is a simple array with booleans\n      type: array\n      items:\n        type: boolean\n    ArrayWithStrings:\n      description: This is a simple array with strings\n      type: array\n      items:\n        type: string\n      default:\n        - test\n    ArrayWithReferences:\n      description: This is a simple array with references\n      type: array\n      items:\n        $ref: '#/components/schemas/ModelWithString'\n    ArrayWithArray:\n      description: This is a simple array containing an array\n      type: array\n      items:\n        type: array\n        items:\n          $ref: '#/components/schemas/ModelWithString'\n    ArrayWithProperties:\n      description: This is a simple array with properties\n      type: array\n      items:\n        type: object\n        properties:\n          16x16:\n            $ref: '#/components/schemas/camelCaseCommentWithBreaks'\n          bar:\n            type: string\n    ArrayWithAnyOfProperties:\n      description: This is a simple array with any of properties\n      type: array\n      items:\n        anyOf:\n          - type: object\n            properties:\n              foo:\n                type: string\n                default: test\n          - type: object\n            properties:\n              bar:\n                type: string\n    AnyOfAnyAndNull:\n      type: object\n      properties:\n        data:\n          anyOf:\n            - {}\n            - nullable: true\n    AnyOfArrays:\n      description: This is a simple array with any of properties\n      type: object\n      properties:\n        results:\n          items:\n            anyOf:\n              - type: object\n                properties:\n                  foo:\n                    type: string\n              - type: object\n                properties:\n                  bar:\n                    type: string\n          type: array\n    DictionaryWithString:\n      description: This is a string dictionary\n      type: object\n      additionalProperties:\n        type: string\n    DictionaryWithPropertiesAndAdditionalProperties:\n      type: object\n      properties:\n        foo:\n          type: number\n        bar:\n          type: boolean\n      additionalProperties:\n        type: string\n    DictionaryWithReference:\n      description: This is a string reference\n      type: object\n      additionalProperties:\n        $ref: '#/components/schemas/ModelWithString'\n    DictionaryWithArray:\n      description: This is a complex dictionary\n      type: object\n      additionalProperties:\n        type: array\n        items:\n          $ref: '#/components/schemas/ModelWithString'\n    DictionaryWithDictionary:\n      description: This is a string dictionary\n      type: object\n      additionalProperties:\n        type: object\n        additionalProperties:\n          type: string\n    DictionaryWithProperties:\n      description: This is a complex dictionary\n      type: object\n      additionalProperties:\n        type: object\n        properties:\n          foo:\n            type: string\n          bar:\n            type: string\n    ModelWithInteger:\n      description: This is a model with one number property\n      type: object\n      properties:\n        prop:\n          description: This is a simple number property\n          type: integer\n    ModelWithBoolean:\n      description: This is a model with one boolean property\n      type: object\n      properties:\n        prop:\n          description: This is a simple boolean property\n          type: boolean\n    ModelWithString:\n      description: This is a model with one string property\n      type: object\n      properties:\n        prop:\n          description: This is a simple string property\n          type: string\n    ModelWithStringError:\n      description: This is a model with one string property\n      type: object\n      properties:\n        prop:\n          description: This is a simple string property\n          type: string\n    Model-From.Zendesk:\n      description: \"`Comment` or `VoiceComment`. The JSON object for adding voice\n        comments to tickets is different. See [Adding voice comments to\n        tickets](/documentation/ticketing/managing-tickets/adding-voice-comment\\\n        s-to-tickets)\"\n      type: string\n    ModelWithNullableString:\n      description: This is a model with one string property\n      type: object\n      required:\n        - nullableRequiredProp1\n        - nullableRequiredProp2\n      properties:\n        nullableProp1:\n          description: This is a simple string property\n          type: string\n          nullable: true\n        nullableRequiredProp1:\n          description: This is a simple string property\n          type: string\n          nullable: true\n        nullableProp2:\n          description: This is a simple string property\n          nullable: true\n          type: string\n        nullableRequiredProp2:\n          description: This is a simple string property\n          nullable: true\n          type: string\n        foo_bar-enum:\n          description: This is a simple enum with strings\n          enum:\n            - Success\n            - Warning\n            - Error\n            - ØÆÅ字符串\n    ModelWithEnum:\n      description: This is a model with one enum\n      type: object\n      properties:\n        foo_bar-enum:\n          description: This is a simple enum with strings\n          enum:\n            - Success\n            - Warning\n            - Error\n            - ØÆÅ字符串\n        statusCode:\n          description: These are the HTTP error code enums\n          enum:\n            - '100'\n            - 200 FOO\n            - 300 FOO_BAR\n            - 400 foo-bar\n            - 500 foo.bar\n            - 600 foo&bar\n        bool:\n          description: Simple boolean enum\n          type: boolean\n          enum:\n            - true\n    ModelWithEnumWithHyphen:\n      description: This is a model with one enum with escaped name\n      type: object\n      properties:\n        foo-bar-baz-qux:\n          type: string\n          enum:\n            - '3.0'\n          title: Foo-Bar-Baz-Qux\n          default: '3.0'\n    ModelWithEnumFromDescription:\n      description: This is a model with one enum\n      type: object\n      properties:\n        test:\n          type: integer\n          description: Success=1,Warning=2,Error=3\n    ModelWithNestedEnums:\n      description: This is a model with nested enums\n      type: object\n      properties:\n        dictionaryWithEnum:\n          type: object\n          additionalProperties:\n            enum:\n              - Success\n              - Warning\n              - Error\n        dictionaryWithEnumFromDescription:\n          type: object\n          additionalProperties:\n            type: integer\n            description: Success=1,Warning=2,Error=3\n        arrayWithEnum:\n          type: array\n          items:\n            enum:\n              - Success\n              - Warning\n              - Error\n        arrayWithDescription:\n          type: array\n          items:\n            type: integer\n            description: Success=1,Warning=2,Error=3\n        foo_bar-enum:\n          description: This is a simple enum with strings\n          enum:\n            - Success\n            - Warning\n            - Error\n            - ØÆÅ字符串\n    ModelWithReference:\n      description: This is a model with one property containing a reference\n      type: object\n      properties:\n        prop:\n          $ref: '#/components/schemas/ModelWithProperties'\n    ModelWithArrayReadOnlyAndWriteOnly:\n      description: This is a model with one property containing an array\n      type: object\n      properties:\n        prop:\n          type: array\n          items:\n            $ref: '#/components/schemas/ModelWithReadOnlyAndWriteOnly'\n        propWithFile:\n          type: array\n          items:\n            format: binary\n            type: string\n        propWithNumber:\n          type: array\n          items:\n            type: number\n    ModelWithArray:\n      description: This is a model with one property containing an array\n      type: object\n      properties:\n        prop:\n          type: array\n          items:\n            $ref: '#/components/schemas/ModelWithString'\n        propWithFile:\n          type: array\n          items:\n            format: binary\n            type: string\n        propWithNumber:\n          type: array\n          items:\n            type: number\n    ModelWithDictionary:\n      description: This is a model with one property containing a dictionary\n      type: object\n      properties:\n        prop:\n          type: object\n          additionalProperties:\n            type: string\n    DeprecatedModel:\n      deprecated: true\n      description: This is a deprecated model with a deprecated property\n      type: object\n      properties:\n        prop:\n          deprecated: true\n          description: This is a deprecated property\n          type: string\n    ModelWithCircularReference:\n      description: This is a model with one property containing a circular reference\n      type: object\n      properties:\n        prop:\n          $ref: '#/components/schemas/ModelWithCircularReference'\n    CompositionWithOneOf:\n      description: This is a model with one property with a 'one of' relationship\n      type: object\n      properties:\n        propA:\n          type: object\n          oneOf:\n            - $ref: '#/components/schemas/ModelWithString'\n            - $ref: '#/components/schemas/ModelWithEnum'\n            - $ref: '#/components/schemas/ModelWithArray'\n            - $ref: '#/components/schemas/ModelWithDictionary'\n    CompositionWithOneOfAnonymous:\n      description: This is a model with one property with a 'one of' relationship\n        where the options are not $ref\n      type: object\n      properties:\n        propA:\n          type: object\n          oneOf:\n            - description: Anonymous object type\n              type: object\n              properties:\n                propA:\n                  type: string\n            - description: Anonymous string type\n              type: string\n            - description: Anonymous integer type\n              type: integer\n    ModelCircle:\n      description: Circle\n      type: object\n      required:\n        - kind\n      properties:\n        kind:\n          type: string\n        radius:\n          type: number\n    ModelSquare:\n      description: Square\n      type: object\n      required:\n        - kind\n      properties:\n        kind:\n          type: string\n        sideLength:\n          type: number\n    CompositionWithOneOfDiscriminator:\n      description: This is a model with one property with a 'one of' relationship\n        where the options are not $ref\n      type: object\n      oneOf:\n        - $ref: '#/components/schemas/ModelCircle'\n        - $ref: '#/components/schemas/ModelSquare'\n      discriminator:\n        propertyName: kind\n        mapping:\n          circle: '#/components/schemas/ModelCircle'\n          square: '#/components/schemas/ModelSquare'\n    CompositionWithAnyOf:\n      description: This is a model with one property with a 'any of' relationship\n      type: object\n      properties:\n        propA:\n          type: object\n          anyOf:\n            - $ref: '#/components/schemas/ModelWithString'\n            - $ref: '#/components/schemas/ModelWithEnum'\n            - $ref: '#/components/schemas/ModelWithArray'\n            - $ref: '#/components/schemas/ModelWithDictionary'\n    CompositionWithAnyOfAnonymous:\n      description: This is a model with one property with a 'any of' relationship\n        where the options are not $ref\n      type: object\n      properties:\n        propA:\n          type: object\n          anyOf:\n            - description: Anonymous object type\n              type: object\n              properties:\n                propA:\n                  type: string\n            - description: Anonymous string type\n              type: string\n            - description: Anonymous integer type\n              type: integer\n    CompositionWithNestedAnyAndTypeNull:\n      description: This is a model with nested 'any of' property with a type null\n      type: object\n      properties:\n        propA:\n          type: object\n          anyOf:\n            - items:\n                nullable: true\n                allOf:\n                  - $ref: '#/components/schemas/ModelWithDictionary'\n              type: array\n            - items:\n                nullable: true\n                allOf:\n                  - $ref: '#/components/schemas/ModelWithArray'\n              type: array\n    3e-num_1Период:\n      enum:\n        - Bird\n        - Dog\n      type: string\n    ConstValue:\n      enum:\n        - ConstValue\n      type: string\n    CompositionWithNestedAnyOfAndNull:\n      description: This is a model with one property with a 'any of' relationship\n        where the options are not $ref\n      type: object\n      properties:\n        propA:\n          nullable: true\n          allOf:\n            - items:\n                anyOf:\n                  - $ref: '#/components/schemas/3e-num_1Период'\n                  - $ref: '#/components/schemas/ConstValue'\n              type: array\n          title: Scopes\n    CompositionWithOneOfAndNullable:\n      description: This is a model with one property with a 'one of' relationship\n      type: object\n      properties:\n        propA:\n          nullable: true\n          type: object\n          oneOf:\n            - type: object\n              properties:\n                boolean:\n                  type: boolean\n            - $ref: '#/components/schemas/ModelWithEnum'\n            - $ref: '#/components/schemas/ModelWithArray'\n            - $ref: '#/components/schemas/ModelWithDictionary'\n    CompositionWithOneOfAndSimpleDictionary:\n      description: This is a model that contains a simple dictionary within composition\n      type: object\n      properties:\n        propA:\n          oneOf:\n            - type: boolean\n            - type: object\n              additionalProperties:\n                type: number\n    CompositionWithOneOfAndSimpleArrayDictionary:\n      description: This is a model that contains a dictionary of simple arrays within\n        composition\n      type: object\n      properties:\n        propA:\n          oneOf:\n            - type: boolean\n            - type: object\n              additionalProperties:\n                type: array\n                items:\n                  type: boolean\n    CompositionWithOneOfAndComplexArrayDictionary:\n      description: This is a model that contains a dictionary of complex arrays\n        (composited) within composition\n      type: object\n      properties:\n        propA:\n          oneOf:\n            - type: boolean\n            - type: object\n              additionalProperties:\n                type: array\n                items:\n                  oneOf:\n                    - type: number\n                    - type: string\n    CompositionWithAllOfAndNullable:\n      description: This is a model with one property with a 'all of' relationship\n      type: object\n      properties:\n        propA:\n          nullable: true\n          type: object\n          allOf:\n            - type: object\n              properties:\n                boolean:\n                  type: boolean\n            - $ref: '#/components/schemas/ModelWithEnum'\n            - $ref: '#/components/schemas/ModelWithArray'\n            - $ref: '#/components/schemas/ModelWithDictionary'\n    CompositionWithAnyOfAndNullable:\n      description: This is a model with one property with a 'any of' relationship\n      type: object\n      properties:\n        propA:\n          nullable: true\n          type: object\n          anyOf:\n            - type: object\n              properties:\n                boolean:\n                  type: boolean\n            - $ref: '#/components/schemas/ModelWithEnum'\n            - $ref: '#/components/schemas/ModelWithArray'\n            - $ref: '#/components/schemas/ModelWithDictionary'\n    CompositionBaseModel:\n      description: This is a base model with two simple optional properties\n      type: object\n      properties:\n        firstName:\n          type: string\n        lastname:\n          type: string\n    CompositionExtendedModel:\n      description: This is a model that extends the base model\n      type: object\n      allOf:\n        - $ref: '#/components/schemas/CompositionBaseModel'\n      properties:\n        age:\n          type: number\n      required:\n        - firstName\n        - lastname\n        - age\n    ModelWithProperties:\n      description: This is a model with one nested property\n      type: object\n      required:\n        - required\n        - requiredAndReadOnly\n        - requiredAndNullable\n      properties:\n        required:\n          type: string\n        requiredAndReadOnly:\n          type: string\n          readOnly: true\n        requiredAndNullable:\n          type: string\n          nullable: true\n        string:\n          type: string\n        number:\n          type: number\n        boolean:\n          type: boolean\n        reference:\n          $ref: '#/components/schemas/ModelWithString'\n        property with space:\n          type: string\n        default:\n          type: string\n        try:\n          type: string\n        '@namespace.string':\n          type: string\n          readOnly: true\n        '@namespace.integer':\n          type: integer\n          readOnly: true\n    ModelWithNestedProperties:\n      description: This is a model with one nested property\n      type: object\n      required:\n        - first\n      properties:\n        first:\n          type: object\n          required:\n            - second\n          readOnly: true\n          nullable: true\n          properties:\n            second:\n              type: object\n              required:\n                - third\n              readOnly: true\n              nullable: true\n              properties:\n                third:\n                  type: string\n                  required: true\n                  readOnly: true\n                  nullable: true\n    ModelWithDuplicateProperties:\n      description: This is a model with duplicated properties\n      type: object\n      properties:\n        prop:\n          $ref: '#/components/schemas/ModelWithString'\n    ModelWithOrderedProperties:\n      description: This is a model with ordered properties\n      type: object\n      properties:\n        zebra:\n          type: string\n        apple:\n          type: string\n        hawaii:\n          type: string\n    ModelWithDuplicateImports:\n      description: This is a model with duplicated imports\n      type: object\n      properties:\n        propA:\n          $ref: '#/components/schemas/ModelWithString'\n        propB:\n          $ref: '#/components/schemas/ModelWithString'\n        propC:\n          $ref: '#/components/schemas/ModelWithString'\n    ModelThatExtends:\n      description: This is a model that extends another model\n      type: object\n      allOf:\n        - $ref: '#/components/schemas/ModelWithString'\n        - type: object\n          properties:\n            propExtendsA:\n              type: string\n            propExtendsB:\n              $ref: '#/components/schemas/ModelWithString'\n    ModelThatExtendsExtends:\n      description: This is a model that extends another model\n      type: object\n      allOf:\n        - $ref: '#/components/schemas/ModelWithString'\n        - $ref: '#/components/schemas/ModelThatExtends'\n        - type: object\n          properties:\n            propExtendsC:\n              type: string\n            propExtendsD:\n              $ref: '#/components/schemas/ModelWithString'\n    ModelWithPattern:\n      description: This is a model that contains a some patterns\n      type: object\n      required:\n        - key\n        - name\n      properties:\n        key:\n          maxLength: 64\n          pattern: ^[a-zA-Z0-9_]*$\n          type: string\n        name:\n          maxLength: 255\n          type: string\n        enabled:\n          type: boolean\n          readOnly: true\n        modified:\n          type: string\n          format: date-time\n          readOnly: true\n        id:\n          type: string\n          pattern: ^\\d{2}-\\d{3}-\\d{4}$\n        text:\n          type: string\n          pattern: ^\\w+$\n        patternWithSingleQuotes:\n          type: string\n          pattern: ^[a-zA-Z0-9']*$\n        patternWithNewline:\n          type: string\n          pattern: aaa\\nbbb\n        patternWithBacktick:\n          type: string\n          pattern: aaa`bbb\n        patternWithUnicode:\n          type: string\n          pattern: ^\\p{L}+$\n    File:\n      required:\n        - mime\n      type: object\n      properties:\n        id:\n          title: Id\n          type: string\n          readOnly: true\n          minLength: 1\n        updated_at:\n          title: Updated at\n          type: string\n          format: date-time\n          readOnly: true\n        created_at:\n          title: Created at\n          type: string\n          format: date-time\n          readOnly: true\n        mime:\n          title: Mime\n          type: string\n          maxLength: 24\n          minLength: 1\n        file:\n          title: File\n          type: string\n          readOnly: true\n          format: uri\n    default:\n      type: object\n      properties:\n        name:\n          type: string\n    Pageable:\n      type: object\n      properties:\n        page:\n          minimum: 0\n          type: integer\n          format: int32\n          default: 0\n        size:\n          minimum: 1\n          type: integer\n          format: int32\n        sort:\n          type: array\n          items:\n            type: string\n    FreeFormObjectWithoutAdditionalProperties:\n      description: This is a free-form object without additionalProperties.\n      type: object\n    FreeFormObjectWithAdditionalPropertiesEqTrue:\n      description: 'This is a free-form object with additionalProperties: true.'\n      type: object\n      additionalProperties: true\n    FreeFormObjectWithAdditionalPropertiesEqEmptyObject:\n      description: 'This is a free-form object with additionalProperties: {}.'\n      type: object\n      additionalProperties: {}\n    ModelWithConst:\n      type: object\n      properties:\n        String:\n          enum:\n            - String\n          type: string\n        number:\n          enum:\n            - 0\n          type: number\n        'null':\n          nullable: true\n        withType:\n          enum:\n            - Some string\n          type: string\n    ModelWithAdditionalPropertiesEqTrue:\n      description: 'This is a model with one property and additionalProperties: true'\n      type: object\n      properties:\n        prop:\n          description: This is a simple string property\n          type: string\n      additionalProperties: true\n    NestedAnyOfArraysNullable:\n      properties:\n        nullableArray:\n          nullable: true\n          allOf:\n            - items:\n                anyOf:\n                  - type: string\n                  - type: boolean\n              type: array\n      type: object\n    CompositionWithOneOfAndProperties:\n      type: object\n      oneOf:\n        - type: object\n          required:\n            - foo\n          properties:\n            foo:\n              $ref: '#/components/parameters/SimpleParameter'\n          additionalProperties: false\n        - type: object\n          required:\n            - bar\n          properties:\n            bar:\n              $ref: '#/components/schemas/NonAsciiStringæøåÆØÅöôêÊ字符串'\n          additionalProperties: false\n      required:\n        - baz\n        - qux\n      properties:\n        baz:\n          type: integer\n          format: uint16\n          minimum: 0\n          nullable: true\n        qux:\n          type: integer\n          format: uint8\n          minimum: 0\n    NullableObject:\n      description: An object that can be null\n      nullable: true\n      type: object\n      properties:\n        foo:\n          type: string\n      default: null\n    CharactersInDescription:\n      type: string\n      description: Some % character\n    ModelWithNullableObject:\n      type: object\n      properties:\n        data:\n          $ref: '#/components/schemas/NullableObject'\n    ModelWithAdditionalPropertiesRef:\n      type: object\n      description: An object with additional properties that can be null\n      additionalProperties:\n        nullable: true\n        allOf:\n          - $ref: '#/components/schemas/NullableObject'\n    ModelWithOneOfEnum:\n      oneOf:\n        - type: object\n          required:\n            - foo\n          properties:\n            foo:\n              type: string\n              enum:\n                - Bar\n        - type: object\n          required:\n            - foo\n          properties:\n            foo:\n              type: string\n              enum:\n                - Baz\n        - type: object\n          required:\n            - foo\n          properties:\n            foo:\n              type: string\n              enum:\n                - Qux\n        - type: object\n          required:\n            - content\n            - foo\n          properties:\n            content:\n              type: string\n              format: date-time\n            foo:\n              type: string\n              enum:\n                - Quux\n        - type: object\n          required:\n            - content\n            - foo\n          properties:\n            content:\n              type: array\n              items:\n                type: string\n                format: date-time\n              maxItems: 2\n              minItems: 2\n            foo:\n              type: string\n              enum:\n                - Corge\n    ModelWithNestedArrayEnumsDataFoo:\n      enum:\n        - foo\n        - bar\n      type: string\n    ModelWithNestedArrayEnumsDataBar:\n      enum:\n        - baz\n        - qux\n      type: string\n    ModelWithNestedArrayEnumsData:\n      type: object\n      properties:\n        foo:\n          type: array\n          items:\n            $ref: '#/components/schemas/ModelWithNestedArrayEnumsDataFoo'\n        bar:\n          type: array\n          items:\n            $ref: '#/components/schemas/ModelWithNestedArrayEnumsDataBar'\n    ModelWithNestedArrayEnums:\n      type: object\n      properties:\n        array_strings:\n          type: array\n          items:\n            type: string\n        data:\n          allOf:\n            - $ref: '#/components/schemas/ModelWithNestedArrayEnumsData'\n    ModelWithNestedCompositionEnums:\n      type: object\n      properties:\n        foo:\n          allOf:\n            - $ref: '#/components/schemas/ModelWithNestedArrayEnumsDataFoo'\n    ModelWithReadOnlyAndWriteOnly:\n      type: object\n      required:\n        - foo\n        - bar\n        - baz\n      properties:\n        foo:\n          type: string\n        bar:\n          readOnly: true\n          type: string\n        baz:\n          type: string\n          writeOnly: true\n    ModelWithConstantSizeArray:\n      type: array\n      items:\n        type: number\n      minItems: 2\n      maxItems: 2\n    ModelWithAnyOfConstantSizeArray:\n      type: array\n      items:\n        oneOf:\n          - type: number\n          - type: string\n      minItems: 3\n      maxItems: 3\n    ModelWithPrefixItemsConstantSizeArray:\n      type: array\n      items:\n        oneOf:\n          - $ref: '#/components/schemas/ModelWithInteger'\n          - type: number\n          - type: string\n    ModelWithAnyOfConstantSizeArrayNullable:\n      type: array\n      items:\n        oneOf:\n          - type: number\n            nullable: true\n          - type: string\n      minItems: 3\n      maxItems: 3\n    ModelWithAnyOfConstantSizeArrayWithNSizeAndOptions:\n      type: array\n      items:\n        oneOf:\n          - type: number\n          - $ref: '#/components/schemas/import'\n      minItems: 2\n      maxItems: 2\n    ModelWithAnyOfConstantSizeArrayAndIntersect:\n      type: array\n      items:\n        allOf:\n          - type: number\n          - type: string\n      minItems: 2\n      maxItems: 2\n    ModelWithNumericEnumUnion:\n      type: object\n      properties:\n        value:\n          type: number\n          description: Период\n          enum:\n            - -10\n            - -1\n            - 0\n            - 1\n            - 3\n            - 6\n            - 12\n    ModelWithBackticksInDescription:\n      description: Some description with `back ticks`\n      type: object\n      properties:\n        template:\n          type: string\n          description: >-\n            The template `that` should be used for parsing and importing the\n            contents of the CSV file.\n\n\n            <br/><p>There is one placeholder currently\n            supported:<ul>     <li><b>${x}</b> - refers to the n-th column in\n            the CSV file, e.g. ${1}, ${2}, ...)</li></ul><p>Example of a correct\n            JSON template:</p>\n\n            <pre>\n\n            [\n              {\n                \"resourceType\": \"Asset\",\n                \"identifier\": {\n                  \"name\": \"${1}\",\n                  \"domain\": {\n                    \"name\": \"${2}\",\n                    \"community\": {\n                      \"name\": \"Some Community\"\n                    }\n                  }\n                },\n                \"attributes\" : {\n                  \"00000000-0000-0000-0000-000000003115\" : [ {\n                    \"value\" : \"${3}\"\n                  } ],\n                  \"00000000-0000-0000-0000-000000000222\" : [ {\n                    \"value\" : \"${4}\"\n                  } ]\n                }\n              }\n            ]\n\n            </pre>\n    ModelWithOneOfAndProperties:\n      type: object\n      oneOf:\n        - $ref: '#/components/parameters/SimpleParameter'\n        - $ref: '#/components/schemas/NonAsciiStringæøåÆØÅöôêÊ字符串'\n      required:\n        - baz\n        - qux\n      properties:\n        baz:\n          type: integer\n          format: uint16\n          minimum: 0\n          nullable: true\n        qux:\n          type: integer\n          format: uint8\n          minimum: 0\n    ParameterSimpleParameterUnused:\n      description: Model used to test deduplication strategy (unused)\n      type: string\n    PostServiceWithEmptyTagResponse:\n      description: Model used to test deduplication strategy\n      type: string\n    PostServiceWithEmptyTagResponse2:\n      description: Model used to test deduplication strategy\n      type: string\n    DeleteFooData:\n      description: Model used to test deduplication strategy\n      type: string\n    DeleteFooData2:\n      description: Model used to test deduplication strategy\n      type: string\n    import:\n      description: Model with restricted keyword name\n      type: string\n    SchemaWithFormRestrictedKeys:\n      properties:\n        description:\n          type: string\n        x-enum-descriptions:\n          type: string\n        x-enum-varnames:\n          type: string\n        x-enumNames:\n          type: string\n        title:\n          type: string\n        object:\n          type: object\n          properties:\n            description:\n              type: string\n            x-enum-descriptions:\n              type: string\n            x-enum-varnames:\n              type: string\n            x-enumNames:\n              type: string\n            title:\n              type: string\n        array:\n          type: array\n          items:\n            type: object\n            properties:\n              description:\n                type: string\n              x-enum-descriptions:\n                type: string\n              x-enum-varnames:\n                type: string\n              x-enumNames:\n                type: string\n              title:\n                type: string\n    io.k8s.apimachinery.pkg.apis.meta.v1.DeleteOptions:\n      description: This schema was giving PascalCase transformations a hard time\n      properties:\n        preconditions:\n          allOf:\n            - $ref: '#/components/schemas/io.k8s.apimachinery.pkg.apis.meta.v1.Preconditions'\n          description: Must be fulfilled before a deletion is carried out. If not\n            possible, a 409 Conflict status will be returned.\n      type: object\n    io.k8s.apimachinery.pkg.apis.meta.v1.Preconditions:\n      description: This schema was giving PascalCase transformations a hard time\n      properties:\n        resourceVersion:\n          description: Specifies the target ResourceVersion\n          type: string\n        uid:\n          description: Specifies the target UID.\n          type: string\n      type: object\n    AdditionalPropertiesUnknownIssue:\n      type: object\n      properties: {}\n      additionalProperties:\n        anyOf:\n          - type: string\n          - type: number\n    AdditionalPropertiesUnknownIssue2:\n      type: object\n      additionalProperties:\n        anyOf:\n          - type: string\n          - type: number\n    AdditionalPropertiesUnknownIssue3:\n      type: object\n      allOf:\n        - type: string\n        - type: object\n          required:\n            - entries\n          properties:\n            entries:\n              type: object\n              additionalProperties:\n                $ref: '#/components/schemas/AdditionalPropertiesUnknownIssue'\n    AdditionalPropertiesIntegerIssue:\n      type: object\n      required:\n        - value\n      properties:\n        value:\n          type: integer\n      additionalProperties:\n        type: integer\n    OneOfAllOfIssue:\n      oneOf:\n        - allOf:\n            - oneOf:\n                - $ref: '#/components/schemas/ConstValue'\n                - $ref: '#/components/schemas/Generic.Schema.Duplicate.Issue`1[System.Boolean]'\n            - $ref: '#/components/schemas/3e-num_1Период'\n        - $ref: '#/components/schemas/Generic.Schema.Duplicate.Issue`1[System.String]'\n    Generic.Schema.Duplicate.Issue`1[System.Boolean]:\n      type: object\n      properties:\n        item:\n          type: boolean\n        error:\n          type: string\n          nullable: true\n        hasError:\n          type: boolean\n          readOnly: true\n        data:\n          type: object\n          properties: {}\n          additionalProperties: false\n      additionalProperties: false\n    Generic.Schema.Duplicate.Issue`1[System.String]:\n      type: object\n      properties:\n        item:\n          type: string\n          nullable: true\n        error:\n          type: string\n          nullable: true\n        hasError:\n          type: boolean\n          readOnly: true\n      additionalProperties: false\n"
  },
  {
    "path": "specs/3.0.x/internal-name-conflict.json",
    "content": "{\n  \"openapi\": \"3.0.4\",\n  \"info\": {\n    \"title\": \"OpenAPI 3.0.4 internal name conflict example\",\n    \"version\": \"1\"\n  },\n  \"paths\": {\n    \"/foo\": {\n      \"get\": {\n        \"operationId\": \"create__\",\n        \"responses\": {\n          \"200\": {\n            \"description\": \"OK\"\n          }\n        }\n      },\n      \"patch\": {\n        \"operationId\": \"create_\",\n        \"responses\": {\n          \"200\": {\n            \"description\": \"OK\"\n          }\n        }\n      },\n      \"post\": {\n        \"operationId\": \"create\",\n        \"responses\": {\n          \"200\": {\n            \"description\": \"OK\"\n          }\n        }\n      }\n    }\n  }\n}\n"
  },
  {
    "path": "specs/3.0.x/invalid/operationId-unique.yaml",
    "content": "openapi: 3.0.4\ninfo:\n  title: Invalid OpenAPI 3.0.4 operationId unique example\n  version: 1\npaths:\n  /foo:\n    get:\n      operationId: foo\n      responses:\n        '200':\n          content:\n            '*/*':\n              schema:\n                type: string\n          description: OK\n    post:\n      operationId: foo\n      responses:\n        '200':\n          content:\n            '*/*':\n              schema:\n                type: string\n          description: OK\n"
  },
  {
    "path": "specs/3.0.x/invalid/servers-array.yaml",
    "content": "openapi: 3.0.4\ninfo:\n  title: Invalid OpenAPI 3.0.4 servers array example\n  version: 1\nservers:\n  foo: bar\n"
  },
  {
    "path": "specs/3.0.x/invalid/servers-entry.yaml",
    "content": "openapi: 3.0.4\ninfo:\n  title: Invalid OpenAPI 3.0.4 servers entry example\n  version: 1\nservers:\n  - foo\n"
  },
  {
    "path": "specs/3.0.x/invalid/servers-required.yaml",
    "content": "openapi: 3.0.4\ninfo:\n  title: Invalid OpenAPI 3.0.4 servers required example\n  version: 1\nservers:\n  - description: missing url\n"
  },
  {
    "path": "specs/3.0.x/operation-204.json",
    "content": "{\n  \"openapi\": \"3.0.0\",\n  \"info\": {\n    \"title\": \"OpenAPI 3.0.0 operation 204 example\",\n    \"version\": \"1\"\n  },\n  \"paths\": {\n    \"/foo\": {\n      \"post\": {\n        \"responses\": {\n          \"200\": {\n            \"description\": \"OK\",\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"type\": \"string\"\n                }\n              }\n            }\n          },\n          \"204\": {\n            \"description\": \"Created\"\n          }\n        }\n      }\n    }\n  }\n}\n"
  },
  {
    "path": "specs/3.0.x/orpc.yaml",
    "content": "openapi: 3.0.4\ninfo:\n  title: OpenAPI 3.0.4 oRPC example\n  version: 1\npaths:\n  /users:\n    get:\n      tags:\n        - users\n      operationId: getUsers\n      summary: Get all users\n      parameters:\n        - name: limit\n          in: query\n          description: Maximum number of users to return\n          required: false\n          schema:\n            type: integer\n            default: 10\n        - name: offset\n          in: query\n          description: Number of users to skip\n          required: false\n          schema:\n            type: integer\n            default: 0\n      responses:\n        '200':\n          description: List of users\n          content:\n            application/json:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/User'\n    post:\n      tags:\n        - users\n      operationId: createUser\n      summary: Create a new user\n      requestBody:\n        required: true\n        content:\n          application/json:\n            schema:\n              $ref: '#/components/schemas/CreateUserInput'\n      responses:\n        '201':\n          description: User created\n          content:\n            application/json:\n              schema:\n                $ref: '#/components/schemas/User'\n  /users/{userId}:\n    get:\n      tags:\n        - users\n      operationId: getUserById\n      summary: Get a user by ID\n      parameters:\n        - name: userId\n          in: path\n          description: User ID\n          required: true\n          schema:\n            type: string\n      responses:\n        '200':\n          description: User found\n          content:\n            application/json:\n              schema:\n                $ref: '#/components/schemas/User'\n    put:\n      tags:\n        - users\n      operationId: updateUser\n      summary: Update a user\n      parameters:\n        - name: userId\n          in: path\n          description: User ID\n          required: true\n          schema:\n            type: string\n      requestBody:\n        required: true\n        content:\n          application/json:\n            schema:\n              $ref: '#/components/schemas/UpdateUserInput'\n      responses:\n        '200':\n          description: User updated\n          content:\n            application/json:\n              schema:\n                $ref: '#/components/schemas/User'\n    delete:\n      tags:\n        - users\n      operationId: deleteUser\n      summary: Delete a user\n      parameters:\n        - name: userId\n          in: path\n          description: User ID\n          required: true\n          schema:\n            type: string\n        - name: X-Request-Id\n          in: header\n          description: Request ID for tracing\n          required: false\n          schema:\n            type: string\n      responses:\n        '204':\n          description: User deleted\n  /posts:\n    get:\n      tags:\n        - posts\n      operationId: getPosts\n      summary: Get all posts\n      parameters:\n        - name: authorId\n          in: query\n          description: Filter by author ID\n          required: false\n          schema:\n            type: string\n        - name: status\n          in: query\n          description: Filter by status\n          required: false\n          schema:\n            type: string\n            enum:\n              - draft\n              - published\n              - archived\n      responses:\n        '200':\n          description: List of posts\n          content:\n            application/json:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/Post'\n    post:\n      tags:\n        - posts\n      operationId: createPost\n      summary: Create a new post\n      parameters:\n        - name: X-Author-Id\n          in: header\n          description: Author ID\n          required: true\n          schema:\n            type: string\n      requestBody:\n        required: true\n        content:\n          application/json:\n            schema:\n              $ref: '#/components/schemas/CreatePostInput'\n      responses:\n        '201':\n          description: Post created\n          content:\n            application/json:\n              schema:\n                $ref: '#/components/schemas/Post'\n  /posts/{postId}:\n    get:\n      tags:\n        - posts\n      operationId: getPostById\n      summary: Get a post by ID\n      parameters:\n        - name: postId\n          in: path\n          description: Post ID\n          required: true\n          schema:\n            type: string\n        - name: includeComments\n          in: query\n          description: Include comments in response\n          required: false\n          schema:\n            type: boolean\n            default: false\n      responses:\n        '200':\n          description: Post found\n          content:\n            application/json:\n              schema:\n                $ref: '#/components/schemas/Post'\ncomponents:\n  schemas:\n    User:\n      type: object\n      required:\n        - id\n        - email\n        - name\n      properties:\n        id:\n          type: string\n        email:\n          type: string\n          format: email\n        name:\n          type: string\n        createdAt:\n          type: string\n          format: date-time\n    CreateUserInput:\n      type: object\n      required:\n        - email\n        - name\n      properties:\n        email:\n          type: string\n          format: email\n        name:\n          type: string\n        password:\n          type: string\n          minLength: 8\n    UpdateUserInput:\n      type: object\n      properties:\n        email:\n          type: string\n          format: email\n        name:\n          type: string\n    Post:\n      type: object\n      required:\n        - id\n        - title\n        - content\n        - authorId\n      properties:\n        id:\n          type: string\n        title:\n          type: string\n        content:\n          type: string\n        authorId:\n          type: string\n        status:\n          type: string\n          enum:\n            - draft\n            - published\n            - archived\n        createdAt:\n          type: string\n          format: date-time\n    CreatePostInput:\n      type: object\n      required:\n        - title\n        - content\n      properties:\n        title:\n          type: string\n        content:\n          type: string\n        status:\n          type: string\n          enum:\n            - draft\n            - published\n          default: draft\n"
  },
  {
    "path": "specs/3.0.x/parameter-explode-false.json",
    "content": "{\n  \"openapi\": \"3.0.0\",\n  \"info\": {\n    \"title\": \"OpenAPI 3.0.0 parameter explode false example\",\n    \"version\": \"1\"\n  },\n  \"paths\": {\n    \"/foo\": {\n      \"post\": {\n        \"parameters\": [\n          {\n            \"name\": \"foo\",\n            \"in\": \"query\",\n            \"explode\": false,\n            \"schema\": {\n              \"type\": \"array\",\n              \"items\": {\n                \"type\": \"string\"\n              }\n            }\n          }\n        ],\n        \"responses\": {\n          \"default\": {\n            \"description\": \"OK\"\n          }\n        }\n      }\n    }\n  }\n}\n"
  },
  {
    "path": "specs/3.0.x/ref-deep.yaml",
    "content": "openapi: 3.0.0\ninfo:\n  title: OpenAPI 3.0.0 ref deep example\n  version: '1'\npaths:\n  /foo:\n    get:\n      responses:\n        '200':\n          description: OK\n          content:\n            application/json:\n              schema:\n                type: array\n                items:\n                  type: object\n                  properties:\n                    foo:\n                      type: integer\n                    bar:\n                      type: string\n    post:\n      responses:\n        '200':\n          description: OK\n          content:\n            application/json:\n              schema:\n                type: object\n                properties:\n                  foo:\n                    $ref: '#/paths/~1foo/get/responses/200/content/application~1json/schema/items'\n                  bar:\n                    type: string\ncomponents:\n  schemas:\n    Foo:\n      type: object\n      properties:\n        foo:\n          type: array\n          items:\n            type: object\n            properties:\n              baz:\n                type: string\n        bar:\n          type: array\n          items:\n            type: object\n            properties:\n              baz:\n                type: string\n    Bar:\n      type: object\n      properties:\n        foo:\n          type: array\n          items:\n            $ref: '#/components/schemas/Foo/properties/foo/items'\n        bar:\n          type: array\n          items:\n            $ref: '#/components/schemas/Foo/properties/bar/items'\n"
  },
  {
    "path": "specs/3.0.x/ref-duplicate-url.yaml",
    "content": "openapi: 3.0.3\ninfo:\n  title: OpenAPI 3.0.3 $ref duplicate URL example\n  version: 1\npaths:\n  /a:\n    get:\n      responses:\n        default:\n          description: OK\n          content:\n            application/json:\n              schema:\n                $ref: './enum-escape.json#/components/schemas/Foo'\n  /b:\n    get:\n      responses:\n        default:\n          description: OK\n          content:\n            application/json:\n              schema:\n                $ref: './enum-escape.json#/components/schemas/Foo'\n"
  },
  {
    "path": "specs/3.0.x/sdk-instance.yaml",
    "content": "openapi: 3.0.4\ninfo:\n  title: OpenAPI 3.0.4 sdk instance example\n  version: 1\npaths:\n  /foo:\n    get:\n      tags:\n        - fooBaz\n      responses:\n        '200':\n          content:\n            '*/*':\n              schema:\n                type: string\n          description: OK\n    post:\n      tags:\n        - fooBaz\n      operationId: foo.-post\n      responses:\n        '200':\n          content:\n            '*/*':\n              schema:\n                type: string\n          description: OK\n    put:\n      tags:\n        - fooBaz\n      operationId: /foo/-put/\n      responses:\n        '200':\n          content:\n            '*/*':\n              schema:\n                type: string\n          description: OK\n  /foo/bar:\n    get:\n      tags:\n        - barBaz\n      responses:\n        '200':\n          content:\n            '*/*':\n              schema:\n                type: string\n          description: OK\n    post:\n      tags:\n        - fooBaz\n        - barBaz\n      operationId: foo.bar.post\n      responses:\n        '200':\n          content:\n            '*/*':\n              schema:\n                type: string\n          description: OK\n    put:\n      tags:\n        - fooBaz\n        - barBaz\n      operationId: /foo/bar/put/\n      responses:\n        '200':\n          content:\n            '*/*':\n              schema:\n                type: string\n          description: OK\n"
  },
  {
    "path": "specs/3.0.x/sdk-method-class-conflict.yaml",
    "content": "openapi: 3.0.4\ninfo:\n  title: Internal API\n  description: Internal API\n  version: 1.0-0.0.0\npaths:\n  /api/v1/accounting-companies:\n    post:\n      tags:\n        - AccountingCompanies\n      requestBody:\n        content:\n          application/json;odata.metadata=minimal;odata.streaming=true:\n            schema:\n              $ref: '#/components/schemas/AccountingCompanyCreateDto'\n          application/json;odata.metadata=minimal;odata.streaming=false:\n            schema:\n              $ref: '#/components/schemas/AccountingCompanyCreateDto'\n          application/json;odata.metadata=minimal:\n            schema:\n              $ref: '#/components/schemas/AccountingCompanyCreateDto'\n          application/json;odata.metadata=full;odata.streaming=true:\n            schema:\n              $ref: '#/components/schemas/AccountingCompanyCreateDto'\n          application/json;odata.metadata=full;odata.streaming=false:\n            schema:\n              $ref: '#/components/schemas/AccountingCompanyCreateDto'\n          application/json;odata.metadata=full:\n            schema:\n              $ref: '#/components/schemas/AccountingCompanyCreateDto'\n          application/json;odata.metadata=none;odata.streaming=true:\n            schema:\n              $ref: '#/components/schemas/AccountingCompanyCreateDto'\n          application/json;odata.metadata=none;odata.streaming=false:\n            schema:\n              $ref: '#/components/schemas/AccountingCompanyCreateDto'\n          application/json;odata.metadata=none:\n            schema:\n              $ref: '#/components/schemas/AccountingCompanyCreateDto'\n          application/json;odata.streaming=true:\n            schema:\n              $ref: '#/components/schemas/AccountingCompanyCreateDto'\n          application/json;odata.streaming=false:\n            schema:\n              $ref: '#/components/schemas/AccountingCompanyCreateDto'\n          application/json:\n            schema:\n              $ref: '#/components/schemas/AccountingCompanyCreateDto'\n          application/json;odata.metadata=minimal;odata.streaming=true;IEEE754Compatible=false:\n            schema:\n              $ref: '#/components/schemas/AccountingCompanyCreateDto'\n          application/json;odata.metadata=minimal;odata.streaming=true;IEEE754Compatible=true:\n            schema:\n              $ref: '#/components/schemas/AccountingCompanyCreateDto'\n          application/json;odata.metadata=minimal;odata.streaming=false;IEEE754Compatible=false:\n            schema:\n              $ref: '#/components/schemas/AccountingCompanyCreateDto'\n          application/json;odata.metadata=minimal;odata.streaming=false;IEEE754Compatible=true:\n            schema:\n              $ref: '#/components/schemas/AccountingCompanyCreateDto'\n          application/json;odata.metadata=minimal;IEEE754Compatible=false:\n            schema:\n              $ref: '#/components/schemas/AccountingCompanyCreateDto'\n          application/json;odata.metadata=minimal;IEEE754Compatible=true:\n            schema:\n              $ref: '#/components/schemas/AccountingCompanyCreateDto'\n          application/json;odata.metadata=full;odata.streaming=true;IEEE754Compatible=false:\n            schema:\n              $ref: '#/components/schemas/AccountingCompanyCreateDto'\n          application/json;odata.metadata=full;odata.streaming=true;IEEE754Compatible=true:\n            schema:\n              $ref: '#/components/schemas/AccountingCompanyCreateDto'\n          application/json;odata.metadata=full;odata.streaming=false;IEEE754Compatible=false:\n            schema:\n              $ref: '#/components/schemas/AccountingCompanyCreateDto'\n          application/json;odata.metadata=full;odata.streaming=false;IEEE754Compatible=true:\n            schema:\n              $ref: '#/components/schemas/AccountingCompanyCreateDto'\n          application/json;odata.metadata=full;IEEE754Compatible=false:\n            schema:\n              $ref: '#/components/schemas/AccountingCompanyCreateDto'\n          application/json;odata.metadata=full;IEEE754Compatible=true:\n            schema:\n              $ref: '#/components/schemas/AccountingCompanyCreateDto'\n          application/json;odata.metadata=none;odata.streaming=true;IEEE754Compatible=false:\n            schema:\n              $ref: '#/components/schemas/AccountingCompanyCreateDto'\n          application/json;odata.metadata=none;odata.streaming=true;IEEE754Compatible=true:\n            schema:\n              $ref: '#/components/schemas/AccountingCompanyCreateDto'\n          application/json;odata.metadata=none;odata.streaming=false;IEEE754Compatible=true:\n            schema:\n              $ref: '#/components/schemas/AccountingCompanyCreateDto'\n          application/json;odata.metadata=none;odata.streaming=false;IEEE754Compatible=false:\n            schema:\n              $ref: '#/components/schemas/AccountingCompanyCreateDto'\n          application/json;odata.metadata=none;IEEE754Compatible=false:\n            schema:\n              $ref: '#/components/schemas/AccountingCompanyCreateDto'\n          application/json;odata.metadata=none;IEEE754Compatible=true:\n            schema:\n              $ref: '#/components/schemas/AccountingCompanyCreateDto'\n          application/json;odata.streaming=true;IEEE754Compatible=false:\n            schema:\n              $ref: '#/components/schemas/AccountingCompanyCreateDto'\n          application/json;odata.streaming=true;IEEE754Compatible=true:\n            schema:\n              $ref: '#/components/schemas/AccountingCompanyCreateDto'\n          application/json;odata.streaming=false;IEEE754Compatible=false:\n            schema:\n              $ref: '#/components/schemas/AccountingCompanyCreateDto'\n          application/json;odata.streaming=false;IEEE754Compatible=true:\n            schema:\n              $ref: '#/components/schemas/AccountingCompanyCreateDto'\n          application/json;IEEE754Compatible=false:\n            schema:\n              $ref: '#/components/schemas/AccountingCompanyCreateDto'\n          application/json;IEEE754Compatible=true:\n            schema:\n              $ref: '#/components/schemas/AccountingCompanyCreateDto'\n          application/xml:\n            schema:\n              $ref: '#/components/schemas/AccountingCompanyCreateDto'\n          text/plain:\n            schema:\n              $ref: '#/components/schemas/AccountingCompanyCreateDto'\n          application/json-patch+json:\n            schema:\n              $ref: '#/components/schemas/AccountingCompanyCreateDto'\n          text/json:\n            schema:\n              $ref: '#/components/schemas/AccountingCompanyCreateDto'\n          application/*+json:\n            schema:\n              $ref: '#/components/schemas/AccountingCompanyCreateDto'\n      responses:\n        '200':\n          description: OK\n          content:\n            application/json;odata.metadata=minimal;odata.streaming=true:\n              schema:\n                $ref: '#/components/schemas/AccountingCompany'\n            application/json;odata.metadata=minimal;odata.streaming=false:\n              schema:\n                $ref: '#/components/schemas/AccountingCompany'\n            application/json;odata.metadata=minimal:\n              schema:\n                $ref: '#/components/schemas/AccountingCompany'\n            application/json;odata.metadata=full;odata.streaming=true:\n              schema:\n                $ref: '#/components/schemas/AccountingCompany'\n            application/json;odata.metadata=full;odata.streaming=false:\n              schema:\n                $ref: '#/components/schemas/AccountingCompany'\n            application/json;odata.metadata=full:\n              schema:\n                $ref: '#/components/schemas/AccountingCompany'\n            application/json;odata.metadata=none;odata.streaming=true:\n              schema:\n                $ref: '#/components/schemas/AccountingCompany'\n            application/json;odata.metadata=none;odata.streaming=false:\n              schema:\n                $ref: '#/components/schemas/AccountingCompany'\n            application/json;odata.metadata=none:\n              schema:\n                $ref: '#/components/schemas/AccountingCompany'\n            application/json;odata.streaming=true:\n              schema:\n                $ref: '#/components/schemas/AccountingCompany'\n            application/json;odata.streaming=false:\n              schema:\n                $ref: '#/components/schemas/AccountingCompany'\n            application/json:\n              schema:\n                $ref: '#/components/schemas/AccountingCompany'\n            application/json;odata.metadata=minimal;odata.streaming=true;IEEE754Compatible=false:\n              schema:\n                $ref: '#/components/schemas/AccountingCompany'\n            application/json;odata.metadata=minimal;odata.streaming=true;IEEE754Compatible=true:\n              schema:\n                $ref: '#/components/schemas/AccountingCompany'\n            application/json;odata.metadata=minimal;odata.streaming=false;IEEE754Compatible=false:\n              schema:\n                $ref: '#/components/schemas/AccountingCompany'\n            application/json;odata.metadata=minimal;odata.streaming=false;IEEE754Compatible=true:\n              schema:\n                $ref: '#/components/schemas/AccountingCompany'\n            application/json;odata.metadata=minimal;IEEE754Compatible=false:\n              schema:\n                $ref: '#/components/schemas/AccountingCompany'\n            application/json;odata.metadata=minimal;IEEE754Compatible=true:\n              schema:\n                $ref: '#/components/schemas/AccountingCompany'\n            application/json;odata.metadata=full;odata.streaming=true;IEEE754Compatible=false:\n              schema:\n                $ref: '#/components/schemas/AccountingCompany'\n            application/json;odata.metadata=full;odata.streaming=true;IEEE754Compatible=true:\n              schema:\n                $ref: '#/components/schemas/AccountingCompany'\n            application/json;odata.metadata=full;odata.streaming=false;IEEE754Compatible=false:\n              schema:\n                $ref: '#/components/schemas/AccountingCompany'\n            application/json;odata.metadata=full;odata.streaming=false;IEEE754Compatible=true:\n              schema:\n                $ref: '#/components/schemas/AccountingCompany'\n            application/json;odata.metadata=full;IEEE754Compatible=false:\n              schema:\n                $ref: '#/components/schemas/AccountingCompany'\n            application/json;odata.metadata=full;IEEE754Compatible=true:\n              schema:\n                $ref: '#/components/schemas/AccountingCompany'\n            application/json;odata.metadata=none;odata.streaming=true;IEEE754Compatible=false:\n              schema:\n                $ref: '#/components/schemas/AccountingCompany'\n            application/json;odata.metadata=none;odata.streaming=true;IEEE754Compatible=true:\n              schema:\n                $ref: '#/components/schemas/AccountingCompany'\n            application/json;odata.metadata=none;odata.streaming=false;IEEE754Compatible=true:\n              schema:\n                $ref: '#/components/schemas/AccountingCompany'\n            application/json;odata.metadata=none;odata.streaming=false;IEEE754Compatible=false:\n              schema:\n                $ref: '#/components/schemas/AccountingCompany'\n            application/json;odata.metadata=none;IEEE754Compatible=false:\n              schema:\n                $ref: '#/components/schemas/AccountingCompany'\n            application/json;odata.metadata=none;IEEE754Compatible=true:\n              schema:\n                $ref: '#/components/schemas/AccountingCompany'\n            application/json;odata.streaming=true;IEEE754Compatible=false:\n              schema:\n                $ref: '#/components/schemas/AccountingCompany'\n            application/json;odata.streaming=true;IEEE754Compatible=true:\n              schema:\n                $ref: '#/components/schemas/AccountingCompany'\n            application/json;odata.streaming=false;IEEE754Compatible=false:\n              schema:\n                $ref: '#/components/schemas/AccountingCompany'\n            application/json;odata.streaming=false;IEEE754Compatible=true:\n              schema:\n                $ref: '#/components/schemas/AccountingCompany'\n            application/json;IEEE754Compatible=false:\n              schema:\n                $ref: '#/components/schemas/AccountingCompany'\n            application/json;IEEE754Compatible=true:\n              schema:\n                $ref: '#/components/schemas/AccountingCompany'\n            application/xml:\n              schema:\n                $ref: '#/components/schemas/AccountingCompany'\n            text/plain:\n              schema:\n                $ref: '#/components/schemas/AccountingCompany'\n            application/octet-stream:\n              schema:\n                $ref: '#/components/schemas/AccountingCompany'\n            text/json:\n              schema:\n                $ref: '#/components/schemas/AccountingCompany'\n  /api/v1/accounting-companies/{id}:\n    post:\n      tags:\n        - AccountingCompanies\n      parameters:\n        - name: id\n          in: path\n          required: true\n          schema:\n            type: integer\n            format: int32\n      requestBody:\n        content:\n          application/json;odata.metadata=minimal;odata.streaming=true:\n            schema:\n              $ref: '#/components/schemas/AccountingCompanyUpdateDto'\n          application/json;odata.metadata=minimal;odata.streaming=false:\n            schema:\n              $ref: '#/components/schemas/AccountingCompanyUpdateDto'\n          application/json;odata.metadata=minimal:\n            schema:\n              $ref: '#/components/schemas/AccountingCompanyUpdateDto'\n          application/json;odata.metadata=full;odata.streaming=true:\n            schema:\n              $ref: '#/components/schemas/AccountingCompanyUpdateDto'\n          application/json;odata.metadata=full;odata.streaming=false:\n            schema:\n              $ref: '#/components/schemas/AccountingCompanyUpdateDto'\n          application/json;odata.metadata=full:\n            schema:\n              $ref: '#/components/schemas/AccountingCompanyUpdateDto'\n          application/json;odata.metadata=none;odata.streaming=true:\n            schema:\n              $ref: '#/components/schemas/AccountingCompanyUpdateDto'\n          application/json;odata.metadata=none;odata.streaming=false:\n            schema:\n              $ref: '#/components/schemas/AccountingCompanyUpdateDto'\n          application/json;odata.metadata=none:\n            schema:\n              $ref: '#/components/schemas/AccountingCompanyUpdateDto'\n          application/json;odata.streaming=true:\n            schema:\n              $ref: '#/components/schemas/AccountingCompanyUpdateDto'\n          application/json;odata.streaming=false:\n            schema:\n              $ref: '#/components/schemas/AccountingCompanyUpdateDto'\n          application/json:\n            schema:\n              $ref: '#/components/schemas/AccountingCompanyUpdateDto'\n          application/json;odata.metadata=minimal;odata.streaming=true;IEEE754Compatible=false:\n            schema:\n              $ref: '#/components/schemas/AccountingCompanyUpdateDto'\n          application/json;odata.metadata=minimal;odata.streaming=true;IEEE754Compatible=true:\n            schema:\n              $ref: '#/components/schemas/AccountingCompanyUpdateDto'\n          application/json;odata.metadata=minimal;odata.streaming=false;IEEE754Compatible=false:\n            schema:\n              $ref: '#/components/schemas/AccountingCompanyUpdateDto'\n          application/json;odata.metadata=minimal;odata.streaming=false;IEEE754Compatible=true:\n            schema:\n              $ref: '#/components/schemas/AccountingCompanyUpdateDto'\n          application/json;odata.metadata=minimal;IEEE754Compatible=false:\n            schema:\n              $ref: '#/components/schemas/AccountingCompanyUpdateDto'\n          application/json;odata.metadata=minimal;IEEE754Compatible=true:\n            schema:\n              $ref: '#/components/schemas/AccountingCompanyUpdateDto'\n          application/json;odata.metadata=full;odata.streaming=true;IEEE754Compatible=false:\n            schema:\n              $ref: '#/components/schemas/AccountingCompanyUpdateDto'\n          application/json;odata.metadata=full;odata.streaming=true;IEEE754Compatible=true:\n            schema:\n              $ref: '#/components/schemas/AccountingCompanyUpdateDto'\n          application/json;odata.metadata=full;odata.streaming=false;IEEE754Compatible=false:\n            schema:\n              $ref: '#/components/schemas/AccountingCompanyUpdateDto'\n          application/json;odata.metadata=full;odata.streaming=false;IEEE754Compatible=true:\n            schema:\n              $ref: '#/components/schemas/AccountingCompanyUpdateDto'\n          application/json;odata.metadata=full;IEEE754Compatible=false:\n            schema:\n              $ref: '#/components/schemas/AccountingCompanyUpdateDto'\n          application/json;odata.metadata=full;IEEE754Compatible=true:\n            schema:\n              $ref: '#/components/schemas/AccountingCompanyUpdateDto'\n          application/json;odata.metadata=none;odata.streaming=true;IEEE754Compatible=false:\n            schema:\n              $ref: '#/components/schemas/AccountingCompanyUpdateDto'\n          application/json;odata.metadata=none;odata.streaming=true;IEEE754Compatible=true:\n            schema:\n              $ref: '#/components/schemas/AccountingCompanyUpdateDto'\n          application/json;odata.metadata=none;odata.streaming=false;IEEE754Compatible=true:\n            schema:\n              $ref: '#/components/schemas/AccountingCompanyUpdateDto'\n          application/json;odata.metadata=none;odata.streaming=false;IEEE754Compatible=false:\n            schema:\n              $ref: '#/components/schemas/AccountingCompanyUpdateDto'\n          application/json;odata.metadata=none;IEEE754Compatible=false:\n            schema:\n              $ref: '#/components/schemas/AccountingCompanyUpdateDto'\n          application/json;odata.metadata=none;IEEE754Compatible=true:\n            schema:\n              $ref: '#/components/schemas/AccountingCompanyUpdateDto'\n          application/json;odata.streaming=true;IEEE754Compatible=false:\n            schema:\n              $ref: '#/components/schemas/AccountingCompanyUpdateDto'\n          application/json;odata.streaming=true;IEEE754Compatible=true:\n            schema:\n              $ref: '#/components/schemas/AccountingCompanyUpdateDto'\n          application/json;odata.streaming=false;IEEE754Compatible=false:\n            schema:\n              $ref: '#/components/schemas/AccountingCompanyUpdateDto'\n          application/json;odata.streaming=false;IEEE754Compatible=true:\n            schema:\n              $ref: '#/components/schemas/AccountingCompanyUpdateDto'\n          application/json;IEEE754Compatible=false:\n            schema:\n              $ref: '#/components/schemas/AccountingCompanyUpdateDto'\n          application/json;IEEE754Compatible=true:\n            schema:\n              $ref: '#/components/schemas/AccountingCompanyUpdateDto'\n          application/xml:\n            schema:\n              $ref: '#/components/schemas/AccountingCompanyUpdateDto'\n          text/plain:\n            schema:\n              $ref: '#/components/schemas/AccountingCompanyUpdateDto'\n          application/json-patch+json:\n            schema:\n              $ref: '#/components/schemas/AccountingCompanyUpdateDto'\n          text/json:\n            schema:\n              $ref: '#/components/schemas/AccountingCompanyUpdateDto'\n          application/*+json:\n            schema:\n              $ref: '#/components/schemas/AccountingCompanyUpdateDto'\n      responses:\n        '200':\n          description: OK\n          content:\n            application/json;odata.metadata=minimal;odata.streaming=true:\n              schema:\n                $ref: '#/components/schemas/AccountingCompany'\n            application/json;odata.metadata=minimal;odata.streaming=false:\n              schema:\n                $ref: '#/components/schemas/AccountingCompany'\n            application/json;odata.metadata=minimal:\n              schema:\n                $ref: '#/components/schemas/AccountingCompany'\n            application/json;odata.metadata=full;odata.streaming=true:\n              schema:\n                $ref: '#/components/schemas/AccountingCompany'\n            application/json;odata.metadata=full;odata.streaming=false:\n              schema:\n                $ref: '#/components/schemas/AccountingCompany'\n            application/json;odata.metadata=full:\n              schema:\n                $ref: '#/components/schemas/AccountingCompany'\n            application/json;odata.metadata=none;odata.streaming=true:\n              schema:\n                $ref: '#/components/schemas/AccountingCompany'\n            application/json;odata.metadata=none;odata.streaming=false:\n              schema:\n                $ref: '#/components/schemas/AccountingCompany'\n            application/json;odata.metadata=none:\n              schema:\n                $ref: '#/components/schemas/AccountingCompany'\n            application/json;odata.streaming=true:\n              schema:\n                $ref: '#/components/schemas/AccountingCompany'\n            application/json;odata.streaming=false:\n              schema:\n                $ref: '#/components/schemas/AccountingCompany'\n            application/json:\n              schema:\n                $ref: '#/components/schemas/AccountingCompany'\n            application/json;odata.metadata=minimal;odata.streaming=true;IEEE754Compatible=false:\n              schema:\n                $ref: '#/components/schemas/AccountingCompany'\n            application/json;odata.metadata=minimal;odata.streaming=true;IEEE754Compatible=true:\n              schema:\n                $ref: '#/components/schemas/AccountingCompany'\n            application/json;odata.metadata=minimal;odata.streaming=false;IEEE754Compatible=false:\n              schema:\n                $ref: '#/components/schemas/AccountingCompany'\n            application/json;odata.metadata=minimal;odata.streaming=false;IEEE754Compatible=true:\n              schema:\n                $ref: '#/components/schemas/AccountingCompany'\n            application/json;odata.metadata=minimal;IEEE754Compatible=false:\n              schema:\n                $ref: '#/components/schemas/AccountingCompany'\n            application/json;odata.metadata=minimal;IEEE754Compatible=true:\n              schema:\n                $ref: '#/components/schemas/AccountingCompany'\n            application/json;odata.metadata=full;odata.streaming=true;IEEE754Compatible=false:\n              schema:\n                $ref: '#/components/schemas/AccountingCompany'\n            application/json;odata.metadata=full;odata.streaming=true;IEEE754Compatible=true:\n              schema:\n                $ref: '#/components/schemas/AccountingCompany'\n            application/json;odata.metadata=full;odata.streaming=false;IEEE754Compatible=false:\n              schema:\n                $ref: '#/components/schemas/AccountingCompany'\n            application/json;odata.metadata=full;odata.streaming=false;IEEE754Compatible=true:\n              schema:\n                $ref: '#/components/schemas/AccountingCompany'\n            application/json;odata.metadata=full;IEEE754Compatible=false:\n              schema:\n                $ref: '#/components/schemas/AccountingCompany'\n            application/json;odata.metadata=full;IEEE754Compatible=true:\n              schema:\n                $ref: '#/components/schemas/AccountingCompany'\n            application/json;odata.metadata=none;odata.streaming=true;IEEE754Compatible=false:\n              schema:\n                $ref: '#/components/schemas/AccountingCompany'\n            application/json;odata.metadata=none;odata.streaming=true;IEEE754Compatible=true:\n              schema:\n                $ref: '#/components/schemas/AccountingCompany'\n            application/json;odata.metadata=none;odata.streaming=false;IEEE754Compatible=true:\n              schema:\n                $ref: '#/components/schemas/AccountingCompany'\n            application/json;odata.metadata=none;odata.streaming=false;IEEE754Compatible=false:\n              schema:\n                $ref: '#/components/schemas/AccountingCompany'\n            application/json;odata.metadata=none;IEEE754Compatible=false:\n              schema:\n                $ref: '#/components/schemas/AccountingCompany'\n            application/json;odata.metadata=none;IEEE754Compatible=true:\n              schema:\n                $ref: '#/components/schemas/AccountingCompany'\n            application/json;odata.streaming=true;IEEE754Compatible=false:\n              schema:\n                $ref: '#/components/schemas/AccountingCompany'\n            application/json;odata.streaming=true;IEEE754Compatible=true:\n              schema:\n                $ref: '#/components/schemas/AccountingCompany'\n            application/json;odata.streaming=false;IEEE754Compatible=false:\n              schema:\n                $ref: '#/components/schemas/AccountingCompany'\n            application/json;odata.streaming=false;IEEE754Compatible=true:\n              schema:\n                $ref: '#/components/schemas/AccountingCompany'\n            application/json;IEEE754Compatible=false:\n              schema:\n                $ref: '#/components/schemas/AccountingCompany'\n            application/json;IEEE754Compatible=true:\n              schema:\n                $ref: '#/components/schemas/AccountingCompany'\n            application/xml:\n              schema:\n                $ref: '#/components/schemas/AccountingCompany'\n            text/plain:\n              schema:\n                $ref: '#/components/schemas/AccountingCompany'\n            application/octet-stream:\n              schema:\n                $ref: '#/components/schemas/AccountingCompany'\n            text/json:\n              schema:\n                $ref: '#/components/schemas/AccountingCompany'\n    delete:\n      tags:\n        - AccountingCompanies\n      parameters:\n        - name: id\n          in: path\n          required: true\n          schema:\n            type: integer\n            format: int32\n      responses:\n        '200':\n          description: OK\n  /api/v1/odata/AccountingCompanies:\n    get:\n      tags:\n        - AccountingCompanies\n      operationId: api/v{version:apiVersion}/odata/AccountingCompanies\n      parameters:\n        - name: select\n          in: query\n          description: Limits the properties returned in the result.\n          schema:\n            type: string\n        - name: expand\n          in: query\n          description: Indicates the related entities to be represented inline. The\n            maximum depth is 2.\n          schema:\n            type: string\n        - name: filter\n          in: query\n          description: 'Restricts the set of items returned. The maximum number of\n            expressions is 100. The allowed functions are: allfunctions.'\n          schema:\n            type: string\n        - name: orderby\n          in: query\n          description: Specifies the order in which items are returned. The maximum number\n            of expressions is 5.\n          schema:\n            type: string\n        - name: top\n          in: query\n          description: Limits the number of items returned from a collection. The maximum\n            value is 100.\n          schema:\n            type: integer\n            format: int32\n        - name: skip\n          in: query\n          description: Excludes the specified number of items of the queried collection\n            from the result.\n          schema:\n            type: integer\n            format: int32\n        - name: count\n          in: query\n          description: Indicates whether the total count of items within a collection are\n            returned in the result.\n          schema:\n            type: boolean\n            default: false\n      responses:\n        '200':\n          description: OK\n          content:\n            application/json;odata.metadata=minimal;odata.streaming=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/AccountingCompany'\n            application/json;odata.metadata=minimal;odata.streaming=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/AccountingCompany'\n            application/json;odata.metadata=minimal:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/AccountingCompany'\n            application/json;odata.metadata=full;odata.streaming=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/AccountingCompany'\n            application/json;odata.metadata=full;odata.streaming=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/AccountingCompany'\n            application/json;odata.metadata=full:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/AccountingCompany'\n            application/json;odata.metadata=none;odata.streaming=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/AccountingCompany'\n            application/json;odata.metadata=none;odata.streaming=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/AccountingCompany'\n            application/json;odata.metadata=none:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/AccountingCompany'\n            application/json;odata.streaming=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/AccountingCompany'\n            application/json;odata.streaming=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/AccountingCompany'\n            application/json:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/AccountingCompany'\n            application/json;odata.metadata=minimal;odata.streaming=true;IEEE754Compatible=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/AccountingCompany'\n            application/json;odata.metadata=minimal;odata.streaming=true;IEEE754Compatible=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/AccountingCompany'\n            application/json;odata.metadata=minimal;odata.streaming=false;IEEE754Compatible=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/AccountingCompany'\n            application/json;odata.metadata=minimal;odata.streaming=false;IEEE754Compatible=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/AccountingCompany'\n            application/json;odata.metadata=minimal;IEEE754Compatible=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/AccountingCompany'\n            application/json;odata.metadata=minimal;IEEE754Compatible=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/AccountingCompany'\n            application/json;odata.metadata=full;odata.streaming=true;IEEE754Compatible=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/AccountingCompany'\n            application/json;odata.metadata=full;odata.streaming=true;IEEE754Compatible=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/AccountingCompany'\n            application/json;odata.metadata=full;odata.streaming=false;IEEE754Compatible=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/AccountingCompany'\n            application/json;odata.metadata=full;odata.streaming=false;IEEE754Compatible=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/AccountingCompany'\n            application/json;odata.metadata=full;IEEE754Compatible=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/AccountingCompany'\n            application/json;odata.metadata=full;IEEE754Compatible=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/AccountingCompany'\n            application/json;odata.metadata=none;odata.streaming=true;IEEE754Compatible=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/AccountingCompany'\n            application/json;odata.metadata=none;odata.streaming=true;IEEE754Compatible=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/AccountingCompany'\n            application/json;odata.metadata=none;odata.streaming=false;IEEE754Compatible=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/AccountingCompany'\n            application/json;odata.metadata=none;odata.streaming=false;IEEE754Compatible=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/AccountingCompany'\n            application/json;odata.metadata=none;IEEE754Compatible=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/AccountingCompany'\n            application/json;odata.metadata=none;IEEE754Compatible=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/AccountingCompany'\n            application/json;odata.streaming=true;IEEE754Compatible=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/AccountingCompany'\n            application/json;odata.streaming=true;IEEE754Compatible=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/AccountingCompany'\n            application/json;odata.streaming=false;IEEE754Compatible=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/AccountingCompany'\n            application/json;odata.streaming=false;IEEE754Compatible=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/AccountingCompany'\n            application/json;IEEE754Compatible=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/AccountingCompany'\n            application/json;IEEE754Compatible=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/AccountingCompany'\n            application/xml:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/AccountingCompany'\n            text/plain:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/AccountingCompany'\n            application/octet-stream:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/AccountingCompany'\n            text/json:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/AccountingCompany'\n  /api/v1/odata/AccountingCompanies/$count:\n    get:\n      tags:\n        - AccountingCompanies\n      operationId: api/v{version:apiVersion}/odata/AccountingCompanies/$count\n      parameters:\n        - name: select\n          in: query\n          description: Limits the properties returned in the result.\n          schema:\n            type: string\n        - name: expand\n          in: query\n          description: Indicates the related entities to be represented inline. The\n            maximum depth is 2.\n          schema:\n            type: string\n        - name: filter\n          in: query\n          description: 'Restricts the set of items returned. The maximum number of\n            expressions is 100. The allowed functions are: allfunctions.'\n          schema:\n            type: string\n        - name: orderby\n          in: query\n          description: Specifies the order in which items are returned. The maximum number\n            of expressions is 5.\n          schema:\n            type: string\n        - name: top\n          in: query\n          description: Limits the number of items returned from a collection. The maximum\n            value is 100.\n          schema:\n            type: integer\n            format: int32\n        - name: skip\n          in: query\n          description: Excludes the specified number of items of the queried collection\n            from the result.\n          schema:\n            type: integer\n            format: int32\n        - name: count\n          in: query\n          description: Indicates whether the total count of items within a collection are\n            returned in the result.\n          schema:\n            type: boolean\n            default: false\n      responses:\n        '200':\n          description: OK\n          content:\n            application/json;odata.metadata=minimal;odata.streaming=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/AccountingCompany'\n            application/json;odata.metadata=minimal;odata.streaming=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/AccountingCompany'\n            application/json;odata.metadata=minimal:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/AccountingCompany'\n            application/json;odata.metadata=full;odata.streaming=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/AccountingCompany'\n            application/json;odata.metadata=full;odata.streaming=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/AccountingCompany'\n            application/json;odata.metadata=full:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/AccountingCompany'\n            application/json;odata.metadata=none;odata.streaming=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/AccountingCompany'\n            application/json;odata.metadata=none;odata.streaming=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/AccountingCompany'\n            application/json;odata.metadata=none:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/AccountingCompany'\n            application/json;odata.streaming=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/AccountingCompany'\n            application/json;odata.streaming=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/AccountingCompany'\n            application/json:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/AccountingCompany'\n            application/json;odata.metadata=minimal;odata.streaming=true;IEEE754Compatible=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/AccountingCompany'\n            application/json;odata.metadata=minimal;odata.streaming=true;IEEE754Compatible=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/AccountingCompany'\n            application/json;odata.metadata=minimal;odata.streaming=false;IEEE754Compatible=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/AccountingCompany'\n            application/json;odata.metadata=minimal;odata.streaming=false;IEEE754Compatible=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/AccountingCompany'\n            application/json;odata.metadata=minimal;IEEE754Compatible=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/AccountingCompany'\n            application/json;odata.metadata=minimal;IEEE754Compatible=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/AccountingCompany'\n            application/json;odata.metadata=full;odata.streaming=true;IEEE754Compatible=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/AccountingCompany'\n            application/json;odata.metadata=full;odata.streaming=true;IEEE754Compatible=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/AccountingCompany'\n            application/json;odata.metadata=full;odata.streaming=false;IEEE754Compatible=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/AccountingCompany'\n            application/json;odata.metadata=full;odata.streaming=false;IEEE754Compatible=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/AccountingCompany'\n            application/json;odata.metadata=full;IEEE754Compatible=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/AccountingCompany'\n            application/json;odata.metadata=full;IEEE754Compatible=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/AccountingCompany'\n            application/json;odata.metadata=none;odata.streaming=true;IEEE754Compatible=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/AccountingCompany'\n            application/json;odata.metadata=none;odata.streaming=true;IEEE754Compatible=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/AccountingCompany'\n            application/json;odata.metadata=none;odata.streaming=false;IEEE754Compatible=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/AccountingCompany'\n            application/json;odata.metadata=none;odata.streaming=false;IEEE754Compatible=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/AccountingCompany'\n            application/json;odata.metadata=none;IEEE754Compatible=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/AccountingCompany'\n            application/json;odata.metadata=none;IEEE754Compatible=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/AccountingCompany'\n            application/json;odata.streaming=true;IEEE754Compatible=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/AccountingCompany'\n            application/json;odata.streaming=true;IEEE754Compatible=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/AccountingCompany'\n            application/json;odata.streaming=false;IEEE754Compatible=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/AccountingCompany'\n            application/json;odata.streaming=false;IEEE754Compatible=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/AccountingCompany'\n            application/json;IEEE754Compatible=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/AccountingCompany'\n            application/json;IEEE754Compatible=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/AccountingCompany'\n            application/xml:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/AccountingCompany'\n            text/plain:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/AccountingCompany'\n            application/octet-stream:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/AccountingCompany'\n            text/json:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/AccountingCompany'\n  /api/v1/accounting-company-memberships:\n    put:\n      tags:\n        - AccountingCompanyMemberships\n      requestBody:\n        content:\n          application/json;odata.metadata=minimal;odata.streaming=true:\n            schema:\n              $ref: '#/components/schemas/AccountingCompanyMembershipUpsertDto'\n          application/json;odata.metadata=minimal;odata.streaming=false:\n            schema:\n              $ref: '#/components/schemas/AccountingCompanyMembershipUpsertDto'\n          application/json;odata.metadata=minimal:\n            schema:\n              $ref: '#/components/schemas/AccountingCompanyMembershipUpsertDto'\n          application/json;odata.metadata=full;odata.streaming=true:\n            schema:\n              $ref: '#/components/schemas/AccountingCompanyMembershipUpsertDto'\n          application/json;odata.metadata=full;odata.streaming=false:\n            schema:\n              $ref: '#/components/schemas/AccountingCompanyMembershipUpsertDto'\n          application/json;odata.metadata=full:\n            schema:\n              $ref: '#/components/schemas/AccountingCompanyMembershipUpsertDto'\n          application/json;odata.metadata=none;odata.streaming=true:\n            schema:\n              $ref: '#/components/schemas/AccountingCompanyMembershipUpsertDto'\n          application/json;odata.metadata=none;odata.streaming=false:\n            schema:\n              $ref: '#/components/schemas/AccountingCompanyMembershipUpsertDto'\n          application/json;odata.metadata=none:\n            schema:\n              $ref: '#/components/schemas/AccountingCompanyMembershipUpsertDto'\n          application/json;odata.streaming=true:\n            schema:\n              $ref: '#/components/schemas/AccountingCompanyMembershipUpsertDto'\n          application/json;odata.streaming=false:\n            schema:\n              $ref: '#/components/schemas/AccountingCompanyMembershipUpsertDto'\n          application/json:\n            schema:\n              $ref: '#/components/schemas/AccountingCompanyMembershipUpsertDto'\n          application/json;odata.metadata=minimal;odata.streaming=true;IEEE754Compatible=false:\n            schema:\n              $ref: '#/components/schemas/AccountingCompanyMembershipUpsertDto'\n          application/json;odata.metadata=minimal;odata.streaming=true;IEEE754Compatible=true:\n            schema:\n              $ref: '#/components/schemas/AccountingCompanyMembershipUpsertDto'\n          application/json;odata.metadata=minimal;odata.streaming=false;IEEE754Compatible=false:\n            schema:\n              $ref: '#/components/schemas/AccountingCompanyMembershipUpsertDto'\n          application/json;odata.metadata=minimal;odata.streaming=false;IEEE754Compatible=true:\n            schema:\n              $ref: '#/components/schemas/AccountingCompanyMembershipUpsertDto'\n          application/json;odata.metadata=minimal;IEEE754Compatible=false:\n            schema:\n              $ref: '#/components/schemas/AccountingCompanyMembershipUpsertDto'\n          application/json;odata.metadata=minimal;IEEE754Compatible=true:\n            schema:\n              $ref: '#/components/schemas/AccountingCompanyMembershipUpsertDto'\n          application/json;odata.metadata=full;odata.streaming=true;IEEE754Compatible=false:\n            schema:\n              $ref: '#/components/schemas/AccountingCompanyMembershipUpsertDto'\n          application/json;odata.metadata=full;odata.streaming=true;IEEE754Compatible=true:\n            schema:\n              $ref: '#/components/schemas/AccountingCompanyMembershipUpsertDto'\n          application/json;odata.metadata=full;odata.streaming=false;IEEE754Compatible=false:\n            schema:\n              $ref: '#/components/schemas/AccountingCompanyMembershipUpsertDto'\n          application/json;odata.metadata=full;odata.streaming=false;IEEE754Compatible=true:\n            schema:\n              $ref: '#/components/schemas/AccountingCompanyMembershipUpsertDto'\n          application/json;odata.metadata=full;IEEE754Compatible=false:\n            schema:\n              $ref: '#/components/schemas/AccountingCompanyMembershipUpsertDto'\n          application/json;odata.metadata=full;IEEE754Compatible=true:\n            schema:\n              $ref: '#/components/schemas/AccountingCompanyMembershipUpsertDto'\n          application/json;odata.metadata=none;odata.streaming=true;IEEE754Compatible=false:\n            schema:\n              $ref: '#/components/schemas/AccountingCompanyMembershipUpsertDto'\n          application/json;odata.metadata=none;odata.streaming=true;IEEE754Compatible=true:\n            schema:\n              $ref: '#/components/schemas/AccountingCompanyMembershipUpsertDto'\n          application/json;odata.metadata=none;odata.streaming=false;IEEE754Compatible=true:\n            schema:\n              $ref: '#/components/schemas/AccountingCompanyMembershipUpsertDto'\n          application/json;odata.metadata=none;odata.streaming=false;IEEE754Compatible=false:\n            schema:\n              $ref: '#/components/schemas/AccountingCompanyMembershipUpsertDto'\n          application/json;odata.metadata=none;IEEE754Compatible=false:\n            schema:\n              $ref: '#/components/schemas/AccountingCompanyMembershipUpsertDto'\n          application/json;odata.metadata=none;IEEE754Compatible=true:\n            schema:\n              $ref: '#/components/schemas/AccountingCompanyMembershipUpsertDto'\n          application/json;odata.streaming=true;IEEE754Compatible=false:\n            schema:\n              $ref: '#/components/schemas/AccountingCompanyMembershipUpsertDto'\n          application/json;odata.streaming=true;IEEE754Compatible=true:\n            schema:\n              $ref: '#/components/schemas/AccountingCompanyMembershipUpsertDto'\n          application/json;odata.streaming=false;IEEE754Compatible=false:\n            schema:\n              $ref: '#/components/schemas/AccountingCompanyMembershipUpsertDto'\n          application/json;odata.streaming=false;IEEE754Compatible=true:\n            schema:\n              $ref: '#/components/schemas/AccountingCompanyMembershipUpsertDto'\n          application/json;IEEE754Compatible=false:\n            schema:\n              $ref: '#/components/schemas/AccountingCompanyMembershipUpsertDto'\n          application/json;IEEE754Compatible=true:\n            schema:\n              $ref: '#/components/schemas/AccountingCompanyMembershipUpsertDto'\n          application/xml:\n            schema:\n              $ref: '#/components/schemas/AccountingCompanyMembershipUpsertDto'\n          text/plain:\n            schema:\n              $ref: '#/components/schemas/AccountingCompanyMembershipUpsertDto'\n          application/json-patch+json:\n            schema:\n              $ref: '#/components/schemas/AccountingCompanyMembershipUpsertDto'\n          text/json:\n            schema:\n              $ref: '#/components/schemas/AccountingCompanyMembershipUpsertDto'\n          application/*+json:\n            schema:\n              $ref: '#/components/schemas/AccountingCompanyMembershipUpsertDto'\n      responses:\n        '200':\n          description: OK\n          content:\n            application/json;odata.metadata=minimal;odata.streaming=true:\n              schema:\n                $ref: '#/components/schemas/AccountingCompanyMembership'\n            application/json;odata.metadata=minimal;odata.streaming=false:\n              schema:\n                $ref: '#/components/schemas/AccountingCompanyMembership'\n            application/json;odata.metadata=minimal:\n              schema:\n                $ref: '#/components/schemas/AccountingCompanyMembership'\n            application/json;odata.metadata=full;odata.streaming=true:\n              schema:\n                $ref: '#/components/schemas/AccountingCompanyMembership'\n            application/json;odata.metadata=full;odata.streaming=false:\n              schema:\n                $ref: '#/components/schemas/AccountingCompanyMembership'\n            application/json;odata.metadata=full:\n              schema:\n                $ref: '#/components/schemas/AccountingCompanyMembership'\n            application/json;odata.metadata=none;odata.streaming=true:\n              schema:\n                $ref: '#/components/schemas/AccountingCompanyMembership'\n            application/json;odata.metadata=none;odata.streaming=false:\n              schema:\n                $ref: '#/components/schemas/AccountingCompanyMembership'\n            application/json;odata.metadata=none:\n              schema:\n                $ref: '#/components/schemas/AccountingCompanyMembership'\n            application/json;odata.streaming=true:\n              schema:\n                $ref: '#/components/schemas/AccountingCompanyMembership'\n            application/json;odata.streaming=false:\n              schema:\n                $ref: '#/components/schemas/AccountingCompanyMembership'\n            application/json:\n              schema:\n                $ref: '#/components/schemas/AccountingCompanyMembership'\n            application/json;odata.metadata=minimal;odata.streaming=true;IEEE754Compatible=false:\n              schema:\n                $ref: '#/components/schemas/AccountingCompanyMembership'\n            application/json;odata.metadata=minimal;odata.streaming=true;IEEE754Compatible=true:\n              schema:\n                $ref: '#/components/schemas/AccountingCompanyMembership'\n            application/json;odata.metadata=minimal;odata.streaming=false;IEEE754Compatible=false:\n              schema:\n                $ref: '#/components/schemas/AccountingCompanyMembership'\n            application/json;odata.metadata=minimal;odata.streaming=false;IEEE754Compatible=true:\n              schema:\n                $ref: '#/components/schemas/AccountingCompanyMembership'\n            application/json;odata.metadata=minimal;IEEE754Compatible=false:\n              schema:\n                $ref: '#/components/schemas/AccountingCompanyMembership'\n            application/json;odata.metadata=minimal;IEEE754Compatible=true:\n              schema:\n                $ref: '#/components/schemas/AccountingCompanyMembership'\n            application/json;odata.metadata=full;odata.streaming=true;IEEE754Compatible=false:\n              schema:\n                $ref: '#/components/schemas/AccountingCompanyMembership'\n            application/json;odata.metadata=full;odata.streaming=true;IEEE754Compatible=true:\n              schema:\n                $ref: '#/components/schemas/AccountingCompanyMembership'\n            application/json;odata.metadata=full;odata.streaming=false;IEEE754Compatible=false:\n              schema:\n                $ref: '#/components/schemas/AccountingCompanyMembership'\n            application/json;odata.metadata=full;odata.streaming=false;IEEE754Compatible=true:\n              schema:\n                $ref: '#/components/schemas/AccountingCompanyMembership'\n            application/json;odata.metadata=full;IEEE754Compatible=false:\n              schema:\n                $ref: '#/components/schemas/AccountingCompanyMembership'\n            application/json;odata.metadata=full;IEEE754Compatible=true:\n              schema:\n                $ref: '#/components/schemas/AccountingCompanyMembership'\n            application/json;odata.metadata=none;odata.streaming=true;IEEE754Compatible=false:\n              schema:\n                $ref: '#/components/schemas/AccountingCompanyMembership'\n            application/json;odata.metadata=none;odata.streaming=true;IEEE754Compatible=true:\n              schema:\n                $ref: '#/components/schemas/AccountingCompanyMembership'\n            application/json;odata.metadata=none;odata.streaming=false;IEEE754Compatible=true:\n              schema:\n                $ref: '#/components/schemas/AccountingCompanyMembership'\n            application/json;odata.metadata=none;odata.streaming=false;IEEE754Compatible=false:\n              schema:\n                $ref: '#/components/schemas/AccountingCompanyMembership'\n            application/json;odata.metadata=none;IEEE754Compatible=false:\n              schema:\n                $ref: '#/components/schemas/AccountingCompanyMembership'\n            application/json;odata.metadata=none;IEEE754Compatible=true:\n              schema:\n                $ref: '#/components/schemas/AccountingCompanyMembership'\n            application/json;odata.streaming=true;IEEE754Compatible=false:\n              schema:\n                $ref: '#/components/schemas/AccountingCompanyMembership'\n            application/json;odata.streaming=true;IEEE754Compatible=true:\n              schema:\n                $ref: '#/components/schemas/AccountingCompanyMembership'\n            application/json;odata.streaming=false;IEEE754Compatible=false:\n              schema:\n                $ref: '#/components/schemas/AccountingCompanyMembership'\n            application/json;odata.streaming=false;IEEE754Compatible=true:\n              schema:\n                $ref: '#/components/schemas/AccountingCompanyMembership'\n            application/json;IEEE754Compatible=false:\n              schema:\n                $ref: '#/components/schemas/AccountingCompanyMembership'\n            application/json;IEEE754Compatible=true:\n              schema:\n                $ref: '#/components/schemas/AccountingCompanyMembership'\n            application/xml:\n              schema:\n                $ref: '#/components/schemas/AccountingCompanyMembership'\n            text/plain:\n              schema:\n                $ref: '#/components/schemas/AccountingCompanyMembership'\n            application/octet-stream:\n              schema:\n                $ref: '#/components/schemas/AccountingCompanyMembership'\n            text/json:\n              schema:\n                $ref: '#/components/schemas/AccountingCompanyMembership'\n  /api/v1/accounting-company-memberships/{id}:\n    delete:\n      tags:\n        - AccountingCompanyMemberships\n      parameters:\n        - name: id\n          in: path\n          required: true\n          schema:\n            type: integer\n            format: int32\n      responses:\n        '200':\n          description: OK\n  /api/v1/odata/AccountingCompanyMemberships:\n    get:\n      tags:\n        - AccountingCompanyMemberships\n      operationId: api/v{version:apiVersion}/odata/AccountingCompanyMemberships\n      parameters:\n        - name: select\n          in: query\n          description: Limits the properties returned in the result.\n          schema:\n            type: string\n        - name: expand\n          in: query\n          description: Indicates the related entities to be represented inline. The\n            maximum depth is 2.\n          schema:\n            type: string\n        - name: filter\n          in: query\n          description: 'Restricts the set of items returned. The maximum number of\n            expressions is 100. The allowed functions are: allfunctions.'\n          schema:\n            type: string\n        - name: orderby\n          in: query\n          description: Specifies the order in which items are returned. The maximum number\n            of expressions is 5.\n          schema:\n            type: string\n        - name: top\n          in: query\n          description: Limits the number of items returned from a collection. The maximum\n            value is 100.\n          schema:\n            type: integer\n            format: int32\n        - name: skip\n          in: query\n          description: Excludes the specified number of items of the queried collection\n            from the result.\n          schema:\n            type: integer\n            format: int32\n        - name: count\n          in: query\n          description: Indicates whether the total count of items within a collection are\n            returned in the result.\n          schema:\n            type: boolean\n            default: false\n      responses:\n        '200':\n          description: OK\n          content:\n            application/json;odata.metadata=minimal;odata.streaming=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/AccountingCompanyMembership'\n            application/json;odata.metadata=minimal;odata.streaming=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/AccountingCompanyMembership'\n            application/json;odata.metadata=minimal:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/AccountingCompanyMembership'\n            application/json;odata.metadata=full;odata.streaming=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/AccountingCompanyMembership'\n            application/json;odata.metadata=full;odata.streaming=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/AccountingCompanyMembership'\n            application/json;odata.metadata=full:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/AccountingCompanyMembership'\n            application/json;odata.metadata=none;odata.streaming=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/AccountingCompanyMembership'\n            application/json;odata.metadata=none;odata.streaming=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/AccountingCompanyMembership'\n            application/json;odata.metadata=none:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/AccountingCompanyMembership'\n            application/json;odata.streaming=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/AccountingCompanyMembership'\n            application/json;odata.streaming=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/AccountingCompanyMembership'\n            application/json:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/AccountingCompanyMembership'\n            application/json;odata.metadata=minimal;odata.streaming=true;IEEE754Compatible=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/AccountingCompanyMembership'\n            application/json;odata.metadata=minimal;odata.streaming=true;IEEE754Compatible=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/AccountingCompanyMembership'\n            application/json;odata.metadata=minimal;odata.streaming=false;IEEE754Compatible=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/AccountingCompanyMembership'\n            application/json;odata.metadata=minimal;odata.streaming=false;IEEE754Compatible=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/AccountingCompanyMembership'\n            application/json;odata.metadata=minimal;IEEE754Compatible=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/AccountingCompanyMembership'\n            application/json;odata.metadata=minimal;IEEE754Compatible=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/AccountingCompanyMembership'\n            application/json;odata.metadata=full;odata.streaming=true;IEEE754Compatible=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/AccountingCompanyMembership'\n            application/json;odata.metadata=full;odata.streaming=true;IEEE754Compatible=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/AccountingCompanyMembership'\n            application/json;odata.metadata=full;odata.streaming=false;IEEE754Compatible=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/AccountingCompanyMembership'\n            application/json;odata.metadata=full;odata.streaming=false;IEEE754Compatible=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/AccountingCompanyMembership'\n            application/json;odata.metadata=full;IEEE754Compatible=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/AccountingCompanyMembership'\n            application/json;odata.metadata=full;IEEE754Compatible=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/AccountingCompanyMembership'\n            application/json;odata.metadata=none;odata.streaming=true;IEEE754Compatible=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/AccountingCompanyMembership'\n            application/json;odata.metadata=none;odata.streaming=true;IEEE754Compatible=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/AccountingCompanyMembership'\n            application/json;odata.metadata=none;odata.streaming=false;IEEE754Compatible=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/AccountingCompanyMembership'\n            application/json;odata.metadata=none;odata.streaming=false;IEEE754Compatible=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/AccountingCompanyMembership'\n            application/json;odata.metadata=none;IEEE754Compatible=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/AccountingCompanyMembership'\n            application/json;odata.metadata=none;IEEE754Compatible=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/AccountingCompanyMembership'\n            application/json;odata.streaming=true;IEEE754Compatible=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/AccountingCompanyMembership'\n            application/json;odata.streaming=true;IEEE754Compatible=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/AccountingCompanyMembership'\n            application/json;odata.streaming=false;IEEE754Compatible=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/AccountingCompanyMembership'\n            application/json;odata.streaming=false;IEEE754Compatible=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/AccountingCompanyMembership'\n            application/json;IEEE754Compatible=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/AccountingCompanyMembership'\n            application/json;IEEE754Compatible=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/AccountingCompanyMembership'\n            application/xml:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/AccountingCompanyMembership'\n            text/plain:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/AccountingCompanyMembership'\n            application/octet-stream:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/AccountingCompanyMembership'\n            text/json:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/AccountingCompanyMembership'\n  /api/v1/odata/AccountingCompanyMemberships/$count:\n    get:\n      tags:\n        - AccountingCompanyMemberships\n      operationId: api/v{version:apiVersion}/odata/AccountingCompanyMemberships/$count\n      parameters:\n        - name: select\n          in: query\n          description: Limits the properties returned in the result.\n          schema:\n            type: string\n        - name: expand\n          in: query\n          description: Indicates the related entities to be represented inline. The\n            maximum depth is 2.\n          schema:\n            type: string\n        - name: filter\n          in: query\n          description: 'Restricts the set of items returned. The maximum number of\n            expressions is 100. The allowed functions are: allfunctions.'\n          schema:\n            type: string\n        - name: orderby\n          in: query\n          description: Specifies the order in which items are returned. The maximum number\n            of expressions is 5.\n          schema:\n            type: string\n        - name: top\n          in: query\n          description: Limits the number of items returned from a collection. The maximum\n            value is 100.\n          schema:\n            type: integer\n            format: int32\n        - name: skip\n          in: query\n          description: Excludes the specified number of items of the queried collection\n            from the result.\n          schema:\n            type: integer\n            format: int32\n        - name: count\n          in: query\n          description: Indicates whether the total count of items within a collection are\n            returned in the result.\n          schema:\n            type: boolean\n            default: false\n      responses:\n        '200':\n          description: OK\n          content:\n            application/json;odata.metadata=minimal;odata.streaming=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/AccountingCompanyMembership'\n            application/json;odata.metadata=minimal;odata.streaming=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/AccountingCompanyMembership'\n            application/json;odata.metadata=minimal:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/AccountingCompanyMembership'\n            application/json;odata.metadata=full;odata.streaming=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/AccountingCompanyMembership'\n            application/json;odata.metadata=full;odata.streaming=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/AccountingCompanyMembership'\n            application/json;odata.metadata=full:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/AccountingCompanyMembership'\n            application/json;odata.metadata=none;odata.streaming=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/AccountingCompanyMembership'\n            application/json;odata.metadata=none;odata.streaming=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/AccountingCompanyMembership'\n            application/json;odata.metadata=none:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/AccountingCompanyMembership'\n            application/json;odata.streaming=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/AccountingCompanyMembership'\n            application/json;odata.streaming=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/AccountingCompanyMembership'\n            application/json:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/AccountingCompanyMembership'\n            application/json;odata.metadata=minimal;odata.streaming=true;IEEE754Compatible=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/AccountingCompanyMembership'\n            application/json;odata.metadata=minimal;odata.streaming=true;IEEE754Compatible=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/AccountingCompanyMembership'\n            application/json;odata.metadata=minimal;odata.streaming=false;IEEE754Compatible=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/AccountingCompanyMembership'\n            application/json;odata.metadata=minimal;odata.streaming=false;IEEE754Compatible=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/AccountingCompanyMembership'\n            application/json;odata.metadata=minimal;IEEE754Compatible=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/AccountingCompanyMembership'\n            application/json;odata.metadata=minimal;IEEE754Compatible=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/AccountingCompanyMembership'\n            application/json;odata.metadata=full;odata.streaming=true;IEEE754Compatible=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/AccountingCompanyMembership'\n            application/json;odata.metadata=full;odata.streaming=true;IEEE754Compatible=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/AccountingCompanyMembership'\n            application/json;odata.metadata=full;odata.streaming=false;IEEE754Compatible=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/AccountingCompanyMembership'\n            application/json;odata.metadata=full;odata.streaming=false;IEEE754Compatible=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/AccountingCompanyMembership'\n            application/json;odata.metadata=full;IEEE754Compatible=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/AccountingCompanyMembership'\n            application/json;odata.metadata=full;IEEE754Compatible=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/AccountingCompanyMembership'\n            application/json;odata.metadata=none;odata.streaming=true;IEEE754Compatible=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/AccountingCompanyMembership'\n            application/json;odata.metadata=none;odata.streaming=true;IEEE754Compatible=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/AccountingCompanyMembership'\n            application/json;odata.metadata=none;odata.streaming=false;IEEE754Compatible=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/AccountingCompanyMembership'\n            application/json;odata.metadata=none;odata.streaming=false;IEEE754Compatible=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/AccountingCompanyMembership'\n            application/json;odata.metadata=none;IEEE754Compatible=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/AccountingCompanyMembership'\n            application/json;odata.metadata=none;IEEE754Compatible=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/AccountingCompanyMembership'\n            application/json;odata.streaming=true;IEEE754Compatible=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/AccountingCompanyMembership'\n            application/json;odata.streaming=true;IEEE754Compatible=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/AccountingCompanyMembership'\n            application/json;odata.streaming=false;IEEE754Compatible=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/AccountingCompanyMembership'\n            application/json;odata.streaming=false;IEEE754Compatible=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/AccountingCompanyMembership'\n            application/json;IEEE754Compatible=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/AccountingCompanyMembership'\n            application/json;IEEE754Compatible=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/AccountingCompanyMembership'\n            application/xml:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/AccountingCompanyMembership'\n            text/plain:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/AccountingCompanyMembership'\n            application/octet-stream:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/AccountingCompanyMembership'\n            text/json:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/AccountingCompanyMembership'\n  /api/v1/bank-accounts:\n    put:\n      tags:\n        - BankAccounts\n      requestBody:\n        content:\n          application/json;odata.metadata=minimal;odata.streaming=true:\n            schema:\n              $ref: '#/components/schemas/BankAccountUpsertDto'\n          application/json;odata.metadata=minimal;odata.streaming=false:\n            schema:\n              $ref: '#/components/schemas/BankAccountUpsertDto'\n          application/json;odata.metadata=minimal:\n            schema:\n              $ref: '#/components/schemas/BankAccountUpsertDto'\n          application/json;odata.metadata=full;odata.streaming=true:\n            schema:\n              $ref: '#/components/schemas/BankAccountUpsertDto'\n          application/json;odata.metadata=full;odata.streaming=false:\n            schema:\n              $ref: '#/components/schemas/BankAccountUpsertDto'\n          application/json;odata.metadata=full:\n            schema:\n              $ref: '#/components/schemas/BankAccountUpsertDto'\n          application/json;odata.metadata=none;odata.streaming=true:\n            schema:\n              $ref: '#/components/schemas/BankAccountUpsertDto'\n          application/json;odata.metadata=none;odata.streaming=false:\n            schema:\n              $ref: '#/components/schemas/BankAccountUpsertDto'\n          application/json;odata.metadata=none:\n            schema:\n              $ref: '#/components/schemas/BankAccountUpsertDto'\n          application/json;odata.streaming=true:\n            schema:\n              $ref: '#/components/schemas/BankAccountUpsertDto'\n          application/json;odata.streaming=false:\n            schema:\n              $ref: '#/components/schemas/BankAccountUpsertDto'\n          application/json:\n            schema:\n              $ref: '#/components/schemas/BankAccountUpsertDto'\n          application/json;odata.metadata=minimal;odata.streaming=true;IEEE754Compatible=false:\n            schema:\n              $ref: '#/components/schemas/BankAccountUpsertDto'\n          application/json;odata.metadata=minimal;odata.streaming=true;IEEE754Compatible=true:\n            schema:\n              $ref: '#/components/schemas/BankAccountUpsertDto'\n          application/json;odata.metadata=minimal;odata.streaming=false;IEEE754Compatible=false:\n            schema:\n              $ref: '#/components/schemas/BankAccountUpsertDto'\n          application/json;odata.metadata=minimal;odata.streaming=false;IEEE754Compatible=true:\n            schema:\n              $ref: '#/components/schemas/BankAccountUpsertDto'\n          application/json;odata.metadata=minimal;IEEE754Compatible=false:\n            schema:\n              $ref: '#/components/schemas/BankAccountUpsertDto'\n          application/json;odata.metadata=minimal;IEEE754Compatible=true:\n            schema:\n              $ref: '#/components/schemas/BankAccountUpsertDto'\n          application/json;odata.metadata=full;odata.streaming=true;IEEE754Compatible=false:\n            schema:\n              $ref: '#/components/schemas/BankAccountUpsertDto'\n          application/json;odata.metadata=full;odata.streaming=true;IEEE754Compatible=true:\n            schema:\n              $ref: '#/components/schemas/BankAccountUpsertDto'\n          application/json;odata.metadata=full;odata.streaming=false;IEEE754Compatible=false:\n            schema:\n              $ref: '#/components/schemas/BankAccountUpsertDto'\n          application/json;odata.metadata=full;odata.streaming=false;IEEE754Compatible=true:\n            schema:\n              $ref: '#/components/schemas/BankAccountUpsertDto'\n          application/json;odata.metadata=full;IEEE754Compatible=false:\n            schema:\n              $ref: '#/components/schemas/BankAccountUpsertDto'\n          application/json;odata.metadata=full;IEEE754Compatible=true:\n            schema:\n              $ref: '#/components/schemas/BankAccountUpsertDto'\n          application/json;odata.metadata=none;odata.streaming=true;IEEE754Compatible=false:\n            schema:\n              $ref: '#/components/schemas/BankAccountUpsertDto'\n          application/json;odata.metadata=none;odata.streaming=true;IEEE754Compatible=true:\n            schema:\n              $ref: '#/components/schemas/BankAccountUpsertDto'\n          application/json;odata.metadata=none;odata.streaming=false;IEEE754Compatible=true:\n            schema:\n              $ref: '#/components/schemas/BankAccountUpsertDto'\n          application/json;odata.metadata=none;odata.streaming=false;IEEE754Compatible=false:\n            schema:\n              $ref: '#/components/schemas/BankAccountUpsertDto'\n          application/json;odata.metadata=none;IEEE754Compatible=false:\n            schema:\n              $ref: '#/components/schemas/BankAccountUpsertDto'\n          application/json;odata.metadata=none;IEEE754Compatible=true:\n            schema:\n              $ref: '#/components/schemas/BankAccountUpsertDto'\n          application/json;odata.streaming=true;IEEE754Compatible=false:\n            schema:\n              $ref: '#/components/schemas/BankAccountUpsertDto'\n          application/json;odata.streaming=true;IEEE754Compatible=true:\n            schema:\n              $ref: '#/components/schemas/BankAccountUpsertDto'\n          application/json;odata.streaming=false;IEEE754Compatible=false:\n            schema:\n              $ref: '#/components/schemas/BankAccountUpsertDto'\n          application/json;odata.streaming=false;IEEE754Compatible=true:\n            schema:\n              $ref: '#/components/schemas/BankAccountUpsertDto'\n          application/json;IEEE754Compatible=false:\n            schema:\n              $ref: '#/components/schemas/BankAccountUpsertDto'\n          application/json;IEEE754Compatible=true:\n            schema:\n              $ref: '#/components/schemas/BankAccountUpsertDto'\n          application/xml:\n            schema:\n              $ref: '#/components/schemas/BankAccountUpsertDto'\n          text/plain:\n            schema:\n              $ref: '#/components/schemas/BankAccountUpsertDto'\n          application/json-patch+json:\n            schema:\n              $ref: '#/components/schemas/BankAccountUpsertDto'\n          text/json:\n            schema:\n              $ref: '#/components/schemas/BankAccountUpsertDto'\n          application/*+json:\n            schema:\n              $ref: '#/components/schemas/BankAccountUpsertDto'\n      responses:\n        '200':\n          description: OK\n          content:\n            application/json;odata.metadata=minimal;odata.streaming=true:\n              schema:\n                $ref: '#/components/schemas/BankAccount'\n            application/json;odata.metadata=minimal;odata.streaming=false:\n              schema:\n                $ref: '#/components/schemas/BankAccount'\n            application/json;odata.metadata=minimal:\n              schema:\n                $ref: '#/components/schemas/BankAccount'\n            application/json;odata.metadata=full;odata.streaming=true:\n              schema:\n                $ref: '#/components/schemas/BankAccount'\n            application/json;odata.metadata=full;odata.streaming=false:\n              schema:\n                $ref: '#/components/schemas/BankAccount'\n            application/json;odata.metadata=full:\n              schema:\n                $ref: '#/components/schemas/BankAccount'\n            application/json;odata.metadata=none;odata.streaming=true:\n              schema:\n                $ref: '#/components/schemas/BankAccount'\n            application/json;odata.metadata=none;odata.streaming=false:\n              schema:\n                $ref: '#/components/schemas/BankAccount'\n            application/json;odata.metadata=none:\n              schema:\n                $ref: '#/components/schemas/BankAccount'\n            application/json;odata.streaming=true:\n              schema:\n                $ref: '#/components/schemas/BankAccount'\n            application/json;odata.streaming=false:\n              schema:\n                $ref: '#/components/schemas/BankAccount'\n            application/json:\n              schema:\n                $ref: '#/components/schemas/BankAccount'\n            application/json;odata.metadata=minimal;odata.streaming=true;IEEE754Compatible=false:\n              schema:\n                $ref: '#/components/schemas/BankAccount'\n            application/json;odata.metadata=minimal;odata.streaming=true;IEEE754Compatible=true:\n              schema:\n                $ref: '#/components/schemas/BankAccount'\n            application/json;odata.metadata=minimal;odata.streaming=false;IEEE754Compatible=false:\n              schema:\n                $ref: '#/components/schemas/BankAccount'\n            application/json;odata.metadata=minimal;odata.streaming=false;IEEE754Compatible=true:\n              schema:\n                $ref: '#/components/schemas/BankAccount'\n            application/json;odata.metadata=minimal;IEEE754Compatible=false:\n              schema:\n                $ref: '#/components/schemas/BankAccount'\n            application/json;odata.metadata=minimal;IEEE754Compatible=true:\n              schema:\n                $ref: '#/components/schemas/BankAccount'\n            application/json;odata.metadata=full;odata.streaming=true;IEEE754Compatible=false:\n              schema:\n                $ref: '#/components/schemas/BankAccount'\n            application/json;odata.metadata=full;odata.streaming=true;IEEE754Compatible=true:\n              schema:\n                $ref: '#/components/schemas/BankAccount'\n            application/json;odata.metadata=full;odata.streaming=false;IEEE754Compatible=false:\n              schema:\n                $ref: '#/components/schemas/BankAccount'\n            application/json;odata.metadata=full;odata.streaming=false;IEEE754Compatible=true:\n              schema:\n                $ref: '#/components/schemas/BankAccount'\n            application/json;odata.metadata=full;IEEE754Compatible=false:\n              schema:\n                $ref: '#/components/schemas/BankAccount'\n            application/json;odata.metadata=full;IEEE754Compatible=true:\n              schema:\n                $ref: '#/components/schemas/BankAccount'\n            application/json;odata.metadata=none;odata.streaming=true;IEEE754Compatible=false:\n              schema:\n                $ref: '#/components/schemas/BankAccount'\n            application/json;odata.metadata=none;odata.streaming=true;IEEE754Compatible=true:\n              schema:\n                $ref: '#/components/schemas/BankAccount'\n            application/json;odata.metadata=none;odata.streaming=false;IEEE754Compatible=true:\n              schema:\n                $ref: '#/components/schemas/BankAccount'\n            application/json;odata.metadata=none;odata.streaming=false;IEEE754Compatible=false:\n              schema:\n                $ref: '#/components/schemas/BankAccount'\n            application/json;odata.metadata=none;IEEE754Compatible=false:\n              schema:\n                $ref: '#/components/schemas/BankAccount'\n            application/json;odata.metadata=none;IEEE754Compatible=true:\n              schema:\n                $ref: '#/components/schemas/BankAccount'\n            application/json;odata.streaming=true;IEEE754Compatible=false:\n              schema:\n                $ref: '#/components/schemas/BankAccount'\n            application/json;odata.streaming=true;IEEE754Compatible=true:\n              schema:\n                $ref: '#/components/schemas/BankAccount'\n            application/json;odata.streaming=false;IEEE754Compatible=false:\n              schema:\n                $ref: '#/components/schemas/BankAccount'\n            application/json;odata.streaming=false;IEEE754Compatible=true:\n              schema:\n                $ref: '#/components/schemas/BankAccount'\n            application/json;IEEE754Compatible=false:\n              schema:\n                $ref: '#/components/schemas/BankAccount'\n            application/json;IEEE754Compatible=true:\n              schema:\n                $ref: '#/components/schemas/BankAccount'\n            application/xml:\n              schema:\n                $ref: '#/components/schemas/BankAccount'\n            text/plain:\n              schema:\n                $ref: '#/components/schemas/BankAccount'\n            application/octet-stream:\n              schema:\n                $ref: '#/components/schemas/BankAccount'\n            text/json:\n              schema:\n                $ref: '#/components/schemas/BankAccount'\n  /api/v1/bank-accounts/{id}:\n    delete:\n      tags:\n        - BankAccounts\n      parameters:\n        - name: id\n          in: path\n          required: true\n          schema:\n            type: integer\n            format: int32\n      responses:\n        '200':\n          description: OK\n  /api/v1/odata/BankAccounts:\n    get:\n      tags:\n        - BankAccounts\n      operationId: api/v{version:apiVersion}/odata/BankAccounts\n      parameters:\n        - name: select\n          in: query\n          description: Limits the properties returned in the result.\n          schema:\n            type: string\n        - name: expand\n          in: query\n          description: Indicates the related entities to be represented inline. The\n            maximum depth is 2.\n          schema:\n            type: string\n        - name: filter\n          in: query\n          description: 'Restricts the set of items returned. The maximum number of\n            expressions is 100. The allowed functions are: allfunctions.'\n          schema:\n            type: string\n        - name: orderby\n          in: query\n          description: Specifies the order in which items are returned. The maximum number\n            of expressions is 5.\n          schema:\n            type: string\n        - name: top\n          in: query\n          description: Limits the number of items returned from a collection. The maximum\n            value is 100.\n          schema:\n            type: integer\n            format: int32\n        - name: skip\n          in: query\n          description: Excludes the specified number of items of the queried collection\n            from the result.\n          schema:\n            type: integer\n            format: int32\n        - name: count\n          in: query\n          description: Indicates whether the total count of items within a collection are\n            returned in the result.\n          schema:\n            type: boolean\n            default: false\n      responses:\n        '200':\n          description: OK\n          content:\n            application/json;odata.metadata=minimal;odata.streaming=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/BankAccount'\n            application/json;odata.metadata=minimal;odata.streaming=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/BankAccount'\n            application/json;odata.metadata=minimal:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/BankAccount'\n            application/json;odata.metadata=full;odata.streaming=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/BankAccount'\n            application/json;odata.metadata=full;odata.streaming=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/BankAccount'\n            application/json;odata.metadata=full:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/BankAccount'\n            application/json;odata.metadata=none;odata.streaming=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/BankAccount'\n            application/json;odata.metadata=none;odata.streaming=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/BankAccount'\n            application/json;odata.metadata=none:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/BankAccount'\n            application/json;odata.streaming=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/BankAccount'\n            application/json;odata.streaming=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/BankAccount'\n            application/json:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/BankAccount'\n            application/json;odata.metadata=minimal;odata.streaming=true;IEEE754Compatible=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/BankAccount'\n            application/json;odata.metadata=minimal;odata.streaming=true;IEEE754Compatible=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/BankAccount'\n            application/json;odata.metadata=minimal;odata.streaming=false;IEEE754Compatible=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/BankAccount'\n            application/json;odata.metadata=minimal;odata.streaming=false;IEEE754Compatible=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/BankAccount'\n            application/json;odata.metadata=minimal;IEEE754Compatible=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/BankAccount'\n            application/json;odata.metadata=minimal;IEEE754Compatible=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/BankAccount'\n            application/json;odata.metadata=full;odata.streaming=true;IEEE754Compatible=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/BankAccount'\n            application/json;odata.metadata=full;odata.streaming=true;IEEE754Compatible=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/BankAccount'\n            application/json;odata.metadata=full;odata.streaming=false;IEEE754Compatible=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/BankAccount'\n            application/json;odata.metadata=full;odata.streaming=false;IEEE754Compatible=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/BankAccount'\n            application/json;odata.metadata=full;IEEE754Compatible=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/BankAccount'\n            application/json;odata.metadata=full;IEEE754Compatible=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/BankAccount'\n            application/json;odata.metadata=none;odata.streaming=true;IEEE754Compatible=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/BankAccount'\n            application/json;odata.metadata=none;odata.streaming=true;IEEE754Compatible=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/BankAccount'\n            application/json;odata.metadata=none;odata.streaming=false;IEEE754Compatible=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/BankAccount'\n            application/json;odata.metadata=none;odata.streaming=false;IEEE754Compatible=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/BankAccount'\n            application/json;odata.metadata=none;IEEE754Compatible=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/BankAccount'\n            application/json;odata.metadata=none;IEEE754Compatible=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/BankAccount'\n            application/json;odata.streaming=true;IEEE754Compatible=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/BankAccount'\n            application/json;odata.streaming=true;IEEE754Compatible=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/BankAccount'\n            application/json;odata.streaming=false;IEEE754Compatible=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/BankAccount'\n            application/json;odata.streaming=false;IEEE754Compatible=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/BankAccount'\n            application/json;IEEE754Compatible=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/BankAccount'\n            application/json;IEEE754Compatible=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/BankAccount'\n            application/xml:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/BankAccount'\n            text/plain:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/BankAccount'\n            application/octet-stream:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/BankAccount'\n            text/json:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/BankAccount'\n  /api/v1/odata/BankAccounts/$count:\n    get:\n      tags:\n        - BankAccounts\n      operationId: api/v{version:apiVersion}/odata/BankAccounts/$count\n      parameters:\n        - name: select\n          in: query\n          description: Limits the properties returned in the result.\n          schema:\n            type: string\n        - name: expand\n          in: query\n          description: Indicates the related entities to be represented inline. The\n            maximum depth is 2.\n          schema:\n            type: string\n        - name: filter\n          in: query\n          description: 'Restricts the set of items returned. The maximum number of\n            expressions is 100. The allowed functions are: allfunctions.'\n          schema:\n            type: string\n        - name: orderby\n          in: query\n          description: Specifies the order in which items are returned. The maximum number\n            of expressions is 5.\n          schema:\n            type: string\n        - name: top\n          in: query\n          description: Limits the number of items returned from a collection. The maximum\n            value is 100.\n          schema:\n            type: integer\n            format: int32\n        - name: skip\n          in: query\n          description: Excludes the specified number of items of the queried collection\n            from the result.\n          schema:\n            type: integer\n            format: int32\n        - name: count\n          in: query\n          description: Indicates whether the total count of items within a collection are\n            returned in the result.\n          schema:\n            type: boolean\n            default: false\n      responses:\n        '200':\n          description: OK\n          content:\n            application/json;odata.metadata=minimal;odata.streaming=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/BankAccount'\n            application/json;odata.metadata=minimal;odata.streaming=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/BankAccount'\n            application/json;odata.metadata=minimal:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/BankAccount'\n            application/json;odata.metadata=full;odata.streaming=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/BankAccount'\n            application/json;odata.metadata=full;odata.streaming=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/BankAccount'\n            application/json;odata.metadata=full:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/BankAccount'\n            application/json;odata.metadata=none;odata.streaming=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/BankAccount'\n            application/json;odata.metadata=none;odata.streaming=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/BankAccount'\n            application/json;odata.metadata=none:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/BankAccount'\n            application/json;odata.streaming=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/BankAccount'\n            application/json;odata.streaming=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/BankAccount'\n            application/json:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/BankAccount'\n            application/json;odata.metadata=minimal;odata.streaming=true;IEEE754Compatible=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/BankAccount'\n            application/json;odata.metadata=minimal;odata.streaming=true;IEEE754Compatible=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/BankAccount'\n            application/json;odata.metadata=minimal;odata.streaming=false;IEEE754Compatible=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/BankAccount'\n            application/json;odata.metadata=minimal;odata.streaming=false;IEEE754Compatible=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/BankAccount'\n            application/json;odata.metadata=minimal;IEEE754Compatible=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/BankAccount'\n            application/json;odata.metadata=minimal;IEEE754Compatible=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/BankAccount'\n            application/json;odata.metadata=full;odata.streaming=true;IEEE754Compatible=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/BankAccount'\n            application/json;odata.metadata=full;odata.streaming=true;IEEE754Compatible=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/BankAccount'\n            application/json;odata.metadata=full;odata.streaming=false;IEEE754Compatible=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/BankAccount'\n            application/json;odata.metadata=full;odata.streaming=false;IEEE754Compatible=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/BankAccount'\n            application/json;odata.metadata=full;IEEE754Compatible=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/BankAccount'\n            application/json;odata.metadata=full;IEEE754Compatible=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/BankAccount'\n            application/json;odata.metadata=none;odata.streaming=true;IEEE754Compatible=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/BankAccount'\n            application/json;odata.metadata=none;odata.streaming=true;IEEE754Compatible=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/BankAccount'\n            application/json;odata.metadata=none;odata.streaming=false;IEEE754Compatible=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/BankAccount'\n            application/json;odata.metadata=none;odata.streaming=false;IEEE754Compatible=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/BankAccount'\n            application/json;odata.metadata=none;IEEE754Compatible=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/BankAccount'\n            application/json;odata.metadata=none;IEEE754Compatible=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/BankAccount'\n            application/json;odata.streaming=true;IEEE754Compatible=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/BankAccount'\n            application/json;odata.streaming=true;IEEE754Compatible=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/BankAccount'\n            application/json;odata.streaming=false;IEEE754Compatible=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/BankAccount'\n            application/json;odata.streaming=false;IEEE754Compatible=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/BankAccount'\n            application/json;IEEE754Compatible=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/BankAccount'\n            application/json;IEEE754Compatible=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/BankAccount'\n            application/xml:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/BankAccount'\n            text/plain:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/BankAccount'\n            application/octet-stream:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/BankAccount'\n            text/json:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/BankAccount'\n  /api/v1/business-accountant-assignments:\n    put:\n      tags:\n        - BusinessAccountantAssignments\n      requestBody:\n        content:\n          application/json;odata.metadata=minimal;odata.streaming=true:\n            schema:\n              $ref: '#/components/schemas/BusinessAccountantAssignmentUpsert'\n          application/json;odata.metadata=minimal;odata.streaming=false:\n            schema:\n              $ref: '#/components/schemas/BusinessAccountantAssignmentUpsert'\n          application/json;odata.metadata=minimal:\n            schema:\n              $ref: '#/components/schemas/BusinessAccountantAssignmentUpsert'\n          application/json;odata.metadata=full;odata.streaming=true:\n            schema:\n              $ref: '#/components/schemas/BusinessAccountantAssignmentUpsert'\n          application/json;odata.metadata=full;odata.streaming=false:\n            schema:\n              $ref: '#/components/schemas/BusinessAccountantAssignmentUpsert'\n          application/json;odata.metadata=full:\n            schema:\n              $ref: '#/components/schemas/BusinessAccountantAssignmentUpsert'\n          application/json;odata.metadata=none;odata.streaming=true:\n            schema:\n              $ref: '#/components/schemas/BusinessAccountantAssignmentUpsert'\n          application/json;odata.metadata=none;odata.streaming=false:\n            schema:\n              $ref: '#/components/schemas/BusinessAccountantAssignmentUpsert'\n          application/json;odata.metadata=none:\n            schema:\n              $ref: '#/components/schemas/BusinessAccountantAssignmentUpsert'\n          application/json;odata.streaming=true:\n            schema:\n              $ref: '#/components/schemas/BusinessAccountantAssignmentUpsert'\n          application/json;odata.streaming=false:\n            schema:\n              $ref: '#/components/schemas/BusinessAccountantAssignmentUpsert'\n          application/json:\n            schema:\n              $ref: '#/components/schemas/BusinessAccountantAssignmentUpsert'\n          application/json;odata.metadata=minimal;odata.streaming=true;IEEE754Compatible=false:\n            schema:\n              $ref: '#/components/schemas/BusinessAccountantAssignmentUpsert'\n          application/json;odata.metadata=minimal;odata.streaming=true;IEEE754Compatible=true:\n            schema:\n              $ref: '#/components/schemas/BusinessAccountantAssignmentUpsert'\n          application/json;odata.metadata=minimal;odata.streaming=false;IEEE754Compatible=false:\n            schema:\n              $ref: '#/components/schemas/BusinessAccountantAssignmentUpsert'\n          application/json;odata.metadata=minimal;odata.streaming=false;IEEE754Compatible=true:\n            schema:\n              $ref: '#/components/schemas/BusinessAccountantAssignmentUpsert'\n          application/json;odata.metadata=minimal;IEEE754Compatible=false:\n            schema:\n              $ref: '#/components/schemas/BusinessAccountantAssignmentUpsert'\n          application/json;odata.metadata=minimal;IEEE754Compatible=true:\n            schema:\n              $ref: '#/components/schemas/BusinessAccountantAssignmentUpsert'\n          application/json;odata.metadata=full;odata.streaming=true;IEEE754Compatible=false:\n            schema:\n              $ref: '#/components/schemas/BusinessAccountantAssignmentUpsert'\n          application/json;odata.metadata=full;odata.streaming=true;IEEE754Compatible=true:\n            schema:\n              $ref: '#/components/schemas/BusinessAccountantAssignmentUpsert'\n          application/json;odata.metadata=full;odata.streaming=false;IEEE754Compatible=false:\n            schema:\n              $ref: '#/components/schemas/BusinessAccountantAssignmentUpsert'\n          application/json;odata.metadata=full;odata.streaming=false;IEEE754Compatible=true:\n            schema:\n              $ref: '#/components/schemas/BusinessAccountantAssignmentUpsert'\n          application/json;odata.metadata=full;IEEE754Compatible=false:\n            schema:\n              $ref: '#/components/schemas/BusinessAccountantAssignmentUpsert'\n          application/json;odata.metadata=full;IEEE754Compatible=true:\n            schema:\n              $ref: '#/components/schemas/BusinessAccountantAssignmentUpsert'\n          application/json;odata.metadata=none;odata.streaming=true;IEEE754Compatible=false:\n            schema:\n              $ref: '#/components/schemas/BusinessAccountantAssignmentUpsert'\n          application/json;odata.metadata=none;odata.streaming=true;IEEE754Compatible=true:\n            schema:\n              $ref: '#/components/schemas/BusinessAccountantAssignmentUpsert'\n          application/json;odata.metadata=none;odata.streaming=false;IEEE754Compatible=true:\n            schema:\n              $ref: '#/components/schemas/BusinessAccountantAssignmentUpsert'\n          application/json;odata.metadata=none;odata.streaming=false;IEEE754Compatible=false:\n            schema:\n              $ref: '#/components/schemas/BusinessAccountantAssignmentUpsert'\n          application/json;odata.metadata=none;IEEE754Compatible=false:\n            schema:\n              $ref: '#/components/schemas/BusinessAccountantAssignmentUpsert'\n          application/json;odata.metadata=none;IEEE754Compatible=true:\n            schema:\n              $ref: '#/components/schemas/BusinessAccountantAssignmentUpsert'\n          application/json;odata.streaming=true;IEEE754Compatible=false:\n            schema:\n              $ref: '#/components/schemas/BusinessAccountantAssignmentUpsert'\n          application/json;odata.streaming=true;IEEE754Compatible=true:\n            schema:\n              $ref: '#/components/schemas/BusinessAccountantAssignmentUpsert'\n          application/json;odata.streaming=false;IEEE754Compatible=false:\n            schema:\n              $ref: '#/components/schemas/BusinessAccountantAssignmentUpsert'\n          application/json;odata.streaming=false;IEEE754Compatible=true:\n            schema:\n              $ref: '#/components/schemas/BusinessAccountantAssignmentUpsert'\n          application/json;IEEE754Compatible=false:\n            schema:\n              $ref: '#/components/schemas/BusinessAccountantAssignmentUpsert'\n          application/json;IEEE754Compatible=true:\n            schema:\n              $ref: '#/components/schemas/BusinessAccountantAssignmentUpsert'\n          application/xml:\n            schema:\n              $ref: '#/components/schemas/BusinessAccountantAssignmentUpsert'\n          text/plain:\n            schema:\n              $ref: '#/components/schemas/BusinessAccountantAssignmentUpsert'\n          application/json-patch+json:\n            schema:\n              $ref: '#/components/schemas/BusinessAccountantAssignmentUpsert'\n          text/json:\n            schema:\n              $ref: '#/components/schemas/BusinessAccountantAssignmentUpsert'\n          application/*+json:\n            schema:\n              $ref: '#/components/schemas/BusinessAccountantAssignmentUpsert'\n      responses:\n        '200':\n          description: OK\n          content:\n            application/json;odata.metadata=minimal;odata.streaming=true:\n              schema:\n                $ref: '#/components/schemas/BusinessAccountantAssignment'\n            application/json;odata.metadata=minimal;odata.streaming=false:\n              schema:\n                $ref: '#/components/schemas/BusinessAccountantAssignment'\n            application/json;odata.metadata=minimal:\n              schema:\n                $ref: '#/components/schemas/BusinessAccountantAssignment'\n            application/json;odata.metadata=full;odata.streaming=true:\n              schema:\n                $ref: '#/components/schemas/BusinessAccountantAssignment'\n            application/json;odata.metadata=full;odata.streaming=false:\n              schema:\n                $ref: '#/components/schemas/BusinessAccountantAssignment'\n            application/json;odata.metadata=full:\n              schema:\n                $ref: '#/components/schemas/BusinessAccountantAssignment'\n            application/json;odata.metadata=none;odata.streaming=true:\n              schema:\n                $ref: '#/components/schemas/BusinessAccountantAssignment'\n            application/json;odata.metadata=none;odata.streaming=false:\n              schema:\n                $ref: '#/components/schemas/BusinessAccountantAssignment'\n            application/json;odata.metadata=none:\n              schema:\n                $ref: '#/components/schemas/BusinessAccountantAssignment'\n            application/json;odata.streaming=true:\n              schema:\n                $ref: '#/components/schemas/BusinessAccountantAssignment'\n            application/json;odata.streaming=false:\n              schema:\n                $ref: '#/components/schemas/BusinessAccountantAssignment'\n            application/json:\n              schema:\n                $ref: '#/components/schemas/BusinessAccountantAssignment'\n            application/json;odata.metadata=minimal;odata.streaming=true;IEEE754Compatible=false:\n              schema:\n                $ref: '#/components/schemas/BusinessAccountantAssignment'\n            application/json;odata.metadata=minimal;odata.streaming=true;IEEE754Compatible=true:\n              schema:\n                $ref: '#/components/schemas/BusinessAccountantAssignment'\n            application/json;odata.metadata=minimal;odata.streaming=false;IEEE754Compatible=false:\n              schema:\n                $ref: '#/components/schemas/BusinessAccountantAssignment'\n            application/json;odata.metadata=minimal;odata.streaming=false;IEEE754Compatible=true:\n              schema:\n                $ref: '#/components/schemas/BusinessAccountantAssignment'\n            application/json;odata.metadata=minimal;IEEE754Compatible=false:\n              schema:\n                $ref: '#/components/schemas/BusinessAccountantAssignment'\n            application/json;odata.metadata=minimal;IEEE754Compatible=true:\n              schema:\n                $ref: '#/components/schemas/BusinessAccountantAssignment'\n            application/json;odata.metadata=full;odata.streaming=true;IEEE754Compatible=false:\n              schema:\n                $ref: '#/components/schemas/BusinessAccountantAssignment'\n            application/json;odata.metadata=full;odata.streaming=true;IEEE754Compatible=true:\n              schema:\n                $ref: '#/components/schemas/BusinessAccountantAssignment'\n            application/json;odata.metadata=full;odata.streaming=false;IEEE754Compatible=false:\n              schema:\n                $ref: '#/components/schemas/BusinessAccountantAssignment'\n            application/json;odata.metadata=full;odata.streaming=false;IEEE754Compatible=true:\n              schema:\n                $ref: '#/components/schemas/BusinessAccountantAssignment'\n            application/json;odata.metadata=full;IEEE754Compatible=false:\n              schema:\n                $ref: '#/components/schemas/BusinessAccountantAssignment'\n            application/json;odata.metadata=full;IEEE754Compatible=true:\n              schema:\n                $ref: '#/components/schemas/BusinessAccountantAssignment'\n            application/json;odata.metadata=none;odata.streaming=true;IEEE754Compatible=false:\n              schema:\n                $ref: '#/components/schemas/BusinessAccountantAssignment'\n            application/json;odata.metadata=none;odata.streaming=true;IEEE754Compatible=true:\n              schema:\n                $ref: '#/components/schemas/BusinessAccountantAssignment'\n            application/json;odata.metadata=none;odata.streaming=false;IEEE754Compatible=true:\n              schema:\n                $ref: '#/components/schemas/BusinessAccountantAssignment'\n            application/json;odata.metadata=none;odata.streaming=false;IEEE754Compatible=false:\n              schema:\n                $ref: '#/components/schemas/BusinessAccountantAssignment'\n            application/json;odata.metadata=none;IEEE754Compatible=false:\n              schema:\n                $ref: '#/components/schemas/BusinessAccountantAssignment'\n            application/json;odata.metadata=none;IEEE754Compatible=true:\n              schema:\n                $ref: '#/components/schemas/BusinessAccountantAssignment'\n            application/json;odata.streaming=true;IEEE754Compatible=false:\n              schema:\n                $ref: '#/components/schemas/BusinessAccountantAssignment'\n            application/json;odata.streaming=true;IEEE754Compatible=true:\n              schema:\n                $ref: '#/components/schemas/BusinessAccountantAssignment'\n            application/json;odata.streaming=false;IEEE754Compatible=false:\n              schema:\n                $ref: '#/components/schemas/BusinessAccountantAssignment'\n            application/json;odata.streaming=false;IEEE754Compatible=true:\n              schema:\n                $ref: '#/components/schemas/BusinessAccountantAssignment'\n            application/json;IEEE754Compatible=false:\n              schema:\n                $ref: '#/components/schemas/BusinessAccountantAssignment'\n            application/json;IEEE754Compatible=true:\n              schema:\n                $ref: '#/components/schemas/BusinessAccountantAssignment'\n            application/xml:\n              schema:\n                $ref: '#/components/schemas/BusinessAccountantAssignment'\n            text/plain:\n              schema:\n                $ref: '#/components/schemas/BusinessAccountantAssignment'\n            application/octet-stream:\n              schema:\n                $ref: '#/components/schemas/BusinessAccountantAssignment'\n            text/json:\n              schema:\n                $ref: '#/components/schemas/BusinessAccountantAssignment'\n  /api/v1/business-accountant-assignments/{id}:\n    delete:\n      tags:\n        - BusinessAccountantAssignments\n      parameters:\n        - name: id\n          in: path\n          required: true\n          schema:\n            type: integer\n            format: int32\n      responses:\n        '200':\n          description: OK\n  /api/v1/odata/BusinessAccountantAssignments:\n    get:\n      tags:\n        - BusinessAccountantAssignments\n      operationId: api/v{version:apiVersion}/odata/BusinessAccountantAssignments\n      parameters:\n        - name: select\n          in: query\n          description: Limits the properties returned in the result.\n          schema:\n            type: string\n        - name: expand\n          in: query\n          description: Indicates the related entities to be represented inline. The\n            maximum depth is 2.\n          schema:\n            type: string\n        - name: filter\n          in: query\n          description: 'Restricts the set of items returned. The maximum number of\n            expressions is 100. The allowed functions are: allfunctions.'\n          schema:\n            type: string\n        - name: orderby\n          in: query\n          description: Specifies the order in which items are returned. The maximum number\n            of expressions is 5.\n          schema:\n            type: string\n        - name: top\n          in: query\n          description: Limits the number of items returned from a collection. The maximum\n            value is 100.\n          schema:\n            type: integer\n            format: int32\n        - name: skip\n          in: query\n          description: Excludes the specified number of items of the queried collection\n            from the result.\n          schema:\n            type: integer\n            format: int32\n        - name: count\n          in: query\n          description: Indicates whether the total count of items within a collection are\n            returned in the result.\n          schema:\n            type: boolean\n            default: false\n      responses:\n        '200':\n          description: OK\n          content:\n            application/json;odata.metadata=minimal;odata.streaming=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/BusinessAccountantAssignment'\n            application/json;odata.metadata=minimal;odata.streaming=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/BusinessAccountantAssignment'\n            application/json;odata.metadata=minimal:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/BusinessAccountantAssignment'\n            application/json;odata.metadata=full;odata.streaming=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/BusinessAccountantAssignment'\n            application/json;odata.metadata=full;odata.streaming=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/BusinessAccountantAssignment'\n            application/json;odata.metadata=full:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/BusinessAccountantAssignment'\n            application/json;odata.metadata=none;odata.streaming=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/BusinessAccountantAssignment'\n            application/json;odata.metadata=none;odata.streaming=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/BusinessAccountantAssignment'\n            application/json;odata.metadata=none:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/BusinessAccountantAssignment'\n            application/json;odata.streaming=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/BusinessAccountantAssignment'\n            application/json;odata.streaming=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/BusinessAccountantAssignment'\n            application/json:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/BusinessAccountantAssignment'\n            application/json;odata.metadata=minimal;odata.streaming=true;IEEE754Compatible=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/BusinessAccountantAssignment'\n            application/json;odata.metadata=minimal;odata.streaming=true;IEEE754Compatible=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/BusinessAccountantAssignment'\n            application/json;odata.metadata=minimal;odata.streaming=false;IEEE754Compatible=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/BusinessAccountantAssignment'\n            application/json;odata.metadata=minimal;odata.streaming=false;IEEE754Compatible=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/BusinessAccountantAssignment'\n            application/json;odata.metadata=minimal;IEEE754Compatible=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/BusinessAccountantAssignment'\n            application/json;odata.metadata=minimal;IEEE754Compatible=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/BusinessAccountantAssignment'\n            application/json;odata.metadata=full;odata.streaming=true;IEEE754Compatible=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/BusinessAccountantAssignment'\n            application/json;odata.metadata=full;odata.streaming=true;IEEE754Compatible=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/BusinessAccountantAssignment'\n            application/json;odata.metadata=full;odata.streaming=false;IEEE754Compatible=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/BusinessAccountantAssignment'\n            application/json;odata.metadata=full;odata.streaming=false;IEEE754Compatible=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/BusinessAccountantAssignment'\n            application/json;odata.metadata=full;IEEE754Compatible=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/BusinessAccountantAssignment'\n            application/json;odata.metadata=full;IEEE754Compatible=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/BusinessAccountantAssignment'\n            application/json;odata.metadata=none;odata.streaming=true;IEEE754Compatible=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/BusinessAccountantAssignment'\n            application/json;odata.metadata=none;odata.streaming=true;IEEE754Compatible=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/BusinessAccountantAssignment'\n            application/json;odata.metadata=none;odata.streaming=false;IEEE754Compatible=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/BusinessAccountantAssignment'\n            application/json;odata.metadata=none;odata.streaming=false;IEEE754Compatible=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/BusinessAccountantAssignment'\n            application/json;odata.metadata=none;IEEE754Compatible=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/BusinessAccountantAssignment'\n            application/json;odata.metadata=none;IEEE754Compatible=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/BusinessAccountantAssignment'\n            application/json;odata.streaming=true;IEEE754Compatible=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/BusinessAccountantAssignment'\n            application/json;odata.streaming=true;IEEE754Compatible=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/BusinessAccountantAssignment'\n            application/json;odata.streaming=false;IEEE754Compatible=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/BusinessAccountantAssignment'\n            application/json;odata.streaming=false;IEEE754Compatible=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/BusinessAccountantAssignment'\n            application/json;IEEE754Compatible=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/BusinessAccountantAssignment'\n            application/json;IEEE754Compatible=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/BusinessAccountantAssignment'\n            application/xml:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/BusinessAccountantAssignment'\n            text/plain:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/BusinessAccountantAssignment'\n            application/octet-stream:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/BusinessAccountantAssignment'\n            text/json:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/BusinessAccountantAssignment'\n  /api/v1/odata/BusinessAccountantAssignments/$count:\n    get:\n      tags:\n        - BusinessAccountantAssignments\n      operationId: api/v{version:apiVersion}/odata/BusinessAccountantAssignments/$count\n      parameters:\n        - name: select\n          in: query\n          description: Limits the properties returned in the result.\n          schema:\n            type: string\n        - name: expand\n          in: query\n          description: Indicates the related entities to be represented inline. The\n            maximum depth is 2.\n          schema:\n            type: string\n        - name: filter\n          in: query\n          description: 'Restricts the set of items returned. The maximum number of\n            expressions is 100. The allowed functions are: allfunctions.'\n          schema:\n            type: string\n        - name: orderby\n          in: query\n          description: Specifies the order in which items are returned. The maximum number\n            of expressions is 5.\n          schema:\n            type: string\n        - name: top\n          in: query\n          description: Limits the number of items returned from a collection. The maximum\n            value is 100.\n          schema:\n            type: integer\n            format: int32\n        - name: skip\n          in: query\n          description: Excludes the specified number of items of the queried collection\n            from the result.\n          schema:\n            type: integer\n            format: int32\n        - name: count\n          in: query\n          description: Indicates whether the total count of items within a collection are\n            returned in the result.\n          schema:\n            type: boolean\n            default: false\n      responses:\n        '200':\n          description: OK\n          content:\n            application/json;odata.metadata=minimal;odata.streaming=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/BusinessAccountantAssignment'\n            application/json;odata.metadata=minimal;odata.streaming=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/BusinessAccountantAssignment'\n            application/json;odata.metadata=minimal:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/BusinessAccountantAssignment'\n            application/json;odata.metadata=full;odata.streaming=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/BusinessAccountantAssignment'\n            application/json;odata.metadata=full;odata.streaming=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/BusinessAccountantAssignment'\n            application/json;odata.metadata=full:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/BusinessAccountantAssignment'\n            application/json;odata.metadata=none;odata.streaming=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/BusinessAccountantAssignment'\n            application/json;odata.metadata=none;odata.streaming=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/BusinessAccountantAssignment'\n            application/json;odata.metadata=none:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/BusinessAccountantAssignment'\n            application/json;odata.streaming=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/BusinessAccountantAssignment'\n            application/json;odata.streaming=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/BusinessAccountantAssignment'\n            application/json:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/BusinessAccountantAssignment'\n            application/json;odata.metadata=minimal;odata.streaming=true;IEEE754Compatible=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/BusinessAccountantAssignment'\n            application/json;odata.metadata=minimal;odata.streaming=true;IEEE754Compatible=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/BusinessAccountantAssignment'\n            application/json;odata.metadata=minimal;odata.streaming=false;IEEE754Compatible=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/BusinessAccountantAssignment'\n            application/json;odata.metadata=minimal;odata.streaming=false;IEEE754Compatible=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/BusinessAccountantAssignment'\n            application/json;odata.metadata=minimal;IEEE754Compatible=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/BusinessAccountantAssignment'\n            application/json;odata.metadata=minimal;IEEE754Compatible=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/BusinessAccountantAssignment'\n            application/json;odata.metadata=full;odata.streaming=true;IEEE754Compatible=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/BusinessAccountantAssignment'\n            application/json;odata.metadata=full;odata.streaming=true;IEEE754Compatible=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/BusinessAccountantAssignment'\n            application/json;odata.metadata=full;odata.streaming=false;IEEE754Compatible=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/BusinessAccountantAssignment'\n            application/json;odata.metadata=full;odata.streaming=false;IEEE754Compatible=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/BusinessAccountantAssignment'\n            application/json;odata.metadata=full;IEEE754Compatible=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/BusinessAccountantAssignment'\n            application/json;odata.metadata=full;IEEE754Compatible=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/BusinessAccountantAssignment'\n            application/json;odata.metadata=none;odata.streaming=true;IEEE754Compatible=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/BusinessAccountantAssignment'\n            application/json;odata.metadata=none;odata.streaming=true;IEEE754Compatible=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/BusinessAccountantAssignment'\n            application/json;odata.metadata=none;odata.streaming=false;IEEE754Compatible=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/BusinessAccountantAssignment'\n            application/json;odata.metadata=none;odata.streaming=false;IEEE754Compatible=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/BusinessAccountantAssignment'\n            application/json;odata.metadata=none;IEEE754Compatible=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/BusinessAccountantAssignment'\n            application/json;odata.metadata=none;IEEE754Compatible=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/BusinessAccountantAssignment'\n            application/json;odata.streaming=true;IEEE754Compatible=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/BusinessAccountantAssignment'\n            application/json;odata.streaming=true;IEEE754Compatible=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/BusinessAccountantAssignment'\n            application/json;odata.streaming=false;IEEE754Compatible=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/BusinessAccountantAssignment'\n            application/json;odata.streaming=false;IEEE754Compatible=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/BusinessAccountantAssignment'\n            application/json;IEEE754Compatible=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/BusinessAccountantAssignment'\n            application/json;IEEE754Compatible=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/BusinessAccountantAssignment'\n            application/xml:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/BusinessAccountantAssignment'\n            text/plain:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/BusinessAccountantAssignment'\n            application/octet-stream:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/BusinessAccountantAssignment'\n            text/json:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/BusinessAccountantAssignment'\n  /api/v1/business-documents/{id}/raw:\n    get:\n      tags:\n        - BusinessDocuments\n      parameters:\n        - name: id\n          in: path\n          required: true\n          schema:\n            type: integer\n            format: int64\n      responses:\n        '200':\n          description: OK\n        '204':\n          description: No Content\n  /api/v1/business-documents:\n    post:\n      tags:\n        - BusinessDocuments\n      requestBody:\n        content:\n          multipart/form-data:\n            schema:\n              required:\n                - BusinessId\n                - DocumentName\n                - DocumentTypeId\n                - File\n                - TaskId\n              type: object\n              properties:\n                BusinessId:\n                  type: integer\n                  format: int32\n                DocumentTypeId:\n                  type: integer\n                  format: int32\n                File:\n                  type: string\n                  format: binary\n                DocumentName:\n                  maxLength: 255\n                  type: string\n                TaskId:\n                  type: integer\n                  format: int64\n            encoding:\n              BusinessId:\n                style: form\n              DocumentTypeId:\n                style: form\n              File:\n                style: form\n              DocumentName:\n                style: form\n              TaskId:\n                style: form\n      responses:\n        '200':\n          description: OK\n          content:\n            application/json;odata.metadata=minimal;odata.streaming=true:\n              schema:\n                $ref: '#/components/schemas/DocumentBusiness'\n            application/json;odata.metadata=minimal;odata.streaming=false:\n              schema:\n                $ref: '#/components/schemas/DocumentBusiness'\n            application/json;odata.metadata=minimal:\n              schema:\n                $ref: '#/components/schemas/DocumentBusiness'\n            application/json;odata.metadata=full;odata.streaming=true:\n              schema:\n                $ref: '#/components/schemas/DocumentBusiness'\n            application/json;odata.metadata=full;odata.streaming=false:\n              schema:\n                $ref: '#/components/schemas/DocumentBusiness'\n            application/json;odata.metadata=full:\n              schema:\n                $ref: '#/components/schemas/DocumentBusiness'\n            application/json;odata.metadata=none;odata.streaming=true:\n              schema:\n                $ref: '#/components/schemas/DocumentBusiness'\n            application/json;odata.metadata=none;odata.streaming=false:\n              schema:\n                $ref: '#/components/schemas/DocumentBusiness'\n            application/json;odata.metadata=none:\n              schema:\n                $ref: '#/components/schemas/DocumentBusiness'\n            application/json;odata.streaming=true:\n              schema:\n                $ref: '#/components/schemas/DocumentBusiness'\n            application/json;odata.streaming=false:\n              schema:\n                $ref: '#/components/schemas/DocumentBusiness'\n            application/json:\n              schema:\n                $ref: '#/components/schemas/DocumentBusiness'\n            application/json;odata.metadata=minimal;odata.streaming=true;IEEE754Compatible=false:\n              schema:\n                $ref: '#/components/schemas/DocumentBusiness'\n            application/json;odata.metadata=minimal;odata.streaming=true;IEEE754Compatible=true:\n              schema:\n                $ref: '#/components/schemas/DocumentBusiness'\n            application/json;odata.metadata=minimal;odata.streaming=false;IEEE754Compatible=false:\n              schema:\n                $ref: '#/components/schemas/DocumentBusiness'\n            application/json;odata.metadata=minimal;odata.streaming=false;IEEE754Compatible=true:\n              schema:\n                $ref: '#/components/schemas/DocumentBusiness'\n            application/json;odata.metadata=minimal;IEEE754Compatible=false:\n              schema:\n                $ref: '#/components/schemas/DocumentBusiness'\n            application/json;odata.metadata=minimal;IEEE754Compatible=true:\n              schema:\n                $ref: '#/components/schemas/DocumentBusiness'\n            application/json;odata.metadata=full;odata.streaming=true;IEEE754Compatible=false:\n              schema:\n                $ref: '#/components/schemas/DocumentBusiness'\n            application/json;odata.metadata=full;odata.streaming=true;IEEE754Compatible=true:\n              schema:\n                $ref: '#/components/schemas/DocumentBusiness'\n            application/json;odata.metadata=full;odata.streaming=false;IEEE754Compatible=false:\n              schema:\n                $ref: '#/components/schemas/DocumentBusiness'\n            application/json;odata.metadata=full;odata.streaming=false;IEEE754Compatible=true:\n              schema:\n                $ref: '#/components/schemas/DocumentBusiness'\n            application/json;odata.metadata=full;IEEE754Compatible=false:\n              schema:\n                $ref: '#/components/schemas/DocumentBusiness'\n            application/json;odata.metadata=full;IEEE754Compatible=true:\n              schema:\n                $ref: '#/components/schemas/DocumentBusiness'\n            application/json;odata.metadata=none;odata.streaming=true;IEEE754Compatible=false:\n              schema:\n                $ref: '#/components/schemas/DocumentBusiness'\n            application/json;odata.metadata=none;odata.streaming=true;IEEE754Compatible=true:\n              schema:\n                $ref: '#/components/schemas/DocumentBusiness'\n            application/json;odata.metadata=none;odata.streaming=false;IEEE754Compatible=true:\n              schema:\n                $ref: '#/components/schemas/DocumentBusiness'\n            application/json;odata.metadata=none;odata.streaming=false;IEEE754Compatible=false:\n              schema:\n                $ref: '#/components/schemas/DocumentBusiness'\n            application/json;odata.metadata=none;IEEE754Compatible=false:\n              schema:\n                $ref: '#/components/schemas/DocumentBusiness'\n            application/json;odata.metadata=none;IEEE754Compatible=true:\n              schema:\n                $ref: '#/components/schemas/DocumentBusiness'\n            application/json;odata.streaming=true;IEEE754Compatible=false:\n              schema:\n                $ref: '#/components/schemas/DocumentBusiness'\n            application/json;odata.streaming=true;IEEE754Compatible=true:\n              schema:\n                $ref: '#/components/schemas/DocumentBusiness'\n            application/json;odata.streaming=false;IEEE754Compatible=false:\n              schema:\n                $ref: '#/components/schemas/DocumentBusiness'\n            application/json;odata.streaming=false;IEEE754Compatible=true:\n              schema:\n                $ref: '#/components/schemas/DocumentBusiness'\n            application/json;IEEE754Compatible=false:\n              schema:\n                $ref: '#/components/schemas/DocumentBusiness'\n            application/json;IEEE754Compatible=true:\n              schema:\n                $ref: '#/components/schemas/DocumentBusiness'\n            application/xml:\n              schema:\n                $ref: '#/components/schemas/DocumentBusiness'\n            text/plain:\n              schema:\n                $ref: '#/components/schemas/DocumentBusiness'\n            application/octet-stream:\n              schema:\n                $ref: '#/components/schemas/DocumentBusiness'\n            text/json:\n              schema:\n                $ref: '#/components/schemas/DocumentBusiness'\n  /api/v1/business-documents/{id}:\n    put:\n      tags:\n        - BusinessDocuments\n      parameters:\n        - name: id\n          in: path\n          required: true\n          schema:\n            type: integer\n            format: int64\n      requestBody:\n        content:\n          application/json;odata.metadata=minimal;odata.streaming=true:\n            schema:\n              $ref: '#/components/schemas/BusinessDocumentUpdateDto'\n          application/json;odata.metadata=minimal;odata.streaming=false:\n            schema:\n              $ref: '#/components/schemas/BusinessDocumentUpdateDto'\n          application/json;odata.metadata=minimal:\n            schema:\n              $ref: '#/components/schemas/BusinessDocumentUpdateDto'\n          application/json;odata.metadata=full;odata.streaming=true:\n            schema:\n              $ref: '#/components/schemas/BusinessDocumentUpdateDto'\n          application/json;odata.metadata=full;odata.streaming=false:\n            schema:\n              $ref: '#/components/schemas/BusinessDocumentUpdateDto'\n          application/json;odata.metadata=full:\n            schema:\n              $ref: '#/components/schemas/BusinessDocumentUpdateDto'\n          application/json;odata.metadata=none;odata.streaming=true:\n            schema:\n              $ref: '#/components/schemas/BusinessDocumentUpdateDto'\n          application/json;odata.metadata=none;odata.streaming=false:\n            schema:\n              $ref: '#/components/schemas/BusinessDocumentUpdateDto'\n          application/json;odata.metadata=none:\n            schema:\n              $ref: '#/components/schemas/BusinessDocumentUpdateDto'\n          application/json;odata.streaming=true:\n            schema:\n              $ref: '#/components/schemas/BusinessDocumentUpdateDto'\n          application/json;odata.streaming=false:\n            schema:\n              $ref: '#/components/schemas/BusinessDocumentUpdateDto'\n          application/json:\n            schema:\n              $ref: '#/components/schemas/BusinessDocumentUpdateDto'\n          application/json;odata.metadata=minimal;odata.streaming=true;IEEE754Compatible=false:\n            schema:\n              $ref: '#/components/schemas/BusinessDocumentUpdateDto'\n          application/json;odata.metadata=minimal;odata.streaming=true;IEEE754Compatible=true:\n            schema:\n              $ref: '#/components/schemas/BusinessDocumentUpdateDto'\n          application/json;odata.metadata=minimal;odata.streaming=false;IEEE754Compatible=false:\n            schema:\n              $ref: '#/components/schemas/BusinessDocumentUpdateDto'\n          application/json;odata.metadata=minimal;odata.streaming=false;IEEE754Compatible=true:\n            schema:\n              $ref: '#/components/schemas/BusinessDocumentUpdateDto'\n          application/json;odata.metadata=minimal;IEEE754Compatible=false:\n            schema:\n              $ref: '#/components/schemas/BusinessDocumentUpdateDto'\n          application/json;odata.metadata=minimal;IEEE754Compatible=true:\n            schema:\n              $ref: '#/components/schemas/BusinessDocumentUpdateDto'\n          application/json;odata.metadata=full;odata.streaming=true;IEEE754Compatible=false:\n            schema:\n              $ref: '#/components/schemas/BusinessDocumentUpdateDto'\n          application/json;odata.metadata=full;odata.streaming=true;IEEE754Compatible=true:\n            schema:\n              $ref: '#/components/schemas/BusinessDocumentUpdateDto'\n          application/json;odata.metadata=full;odata.streaming=false;IEEE754Compatible=false:\n            schema:\n              $ref: '#/components/schemas/BusinessDocumentUpdateDto'\n          application/json;odata.metadata=full;odata.streaming=false;IEEE754Compatible=true:\n            schema:\n              $ref: '#/components/schemas/BusinessDocumentUpdateDto'\n          application/json;odata.metadata=full;IEEE754Compatible=false:\n            schema:\n              $ref: '#/components/schemas/BusinessDocumentUpdateDto'\n          application/json;odata.metadata=full;IEEE754Compatible=true:\n            schema:\n              $ref: '#/components/schemas/BusinessDocumentUpdateDto'\n          application/json;odata.metadata=none;odata.streaming=true;IEEE754Compatible=false:\n            schema:\n              $ref: '#/components/schemas/BusinessDocumentUpdateDto'\n          application/json;odata.metadata=none;odata.streaming=true;IEEE754Compatible=true:\n            schema:\n              $ref: '#/components/schemas/BusinessDocumentUpdateDto'\n          application/json;odata.metadata=none;odata.streaming=false;IEEE754Compatible=true:\n            schema:\n              $ref: '#/components/schemas/BusinessDocumentUpdateDto'\n          application/json;odata.metadata=none;odata.streaming=false;IEEE754Compatible=false:\n            schema:\n              $ref: '#/components/schemas/BusinessDocumentUpdateDto'\n          application/json;odata.metadata=none;IEEE754Compatible=false:\n            schema:\n              $ref: '#/components/schemas/BusinessDocumentUpdateDto'\n          application/json;odata.metadata=none;IEEE754Compatible=true:\n            schema:\n              $ref: '#/components/schemas/BusinessDocumentUpdateDto'\n          application/json;odata.streaming=true;IEEE754Compatible=false:\n            schema:\n              $ref: '#/components/schemas/BusinessDocumentUpdateDto'\n          application/json;odata.streaming=true;IEEE754Compatible=true:\n            schema:\n              $ref: '#/components/schemas/BusinessDocumentUpdateDto'\n          application/json;odata.streaming=false;IEEE754Compatible=false:\n            schema:\n              $ref: '#/components/schemas/BusinessDocumentUpdateDto'\n          application/json;odata.streaming=false;IEEE754Compatible=true:\n            schema:\n              $ref: '#/components/schemas/BusinessDocumentUpdateDto'\n          application/json;IEEE754Compatible=false:\n            schema:\n              $ref: '#/components/schemas/BusinessDocumentUpdateDto'\n          application/json;IEEE754Compatible=true:\n            schema:\n              $ref: '#/components/schemas/BusinessDocumentUpdateDto'\n          application/xml:\n            schema:\n              $ref: '#/components/schemas/BusinessDocumentUpdateDto'\n          text/plain:\n            schema:\n              $ref: '#/components/schemas/BusinessDocumentUpdateDto'\n          application/json-patch+json:\n            schema:\n              $ref: '#/components/schemas/BusinessDocumentUpdateDto'\n          text/json:\n            schema:\n              $ref: '#/components/schemas/BusinessDocumentUpdateDto'\n          application/*+json:\n            schema:\n              $ref: '#/components/schemas/BusinessDocumentUpdateDto'\n      responses:\n        '200':\n          description: OK\n          content:\n            application/json;odata.metadata=minimal;odata.streaming=true:\n              schema:\n                $ref: '#/components/schemas/DocumentBusiness'\n            application/json;odata.metadata=minimal;odata.streaming=false:\n              schema:\n                $ref: '#/components/schemas/DocumentBusiness'\n            application/json;odata.metadata=minimal:\n              schema:\n                $ref: '#/components/schemas/DocumentBusiness'\n            application/json;odata.metadata=full;odata.streaming=true:\n              schema:\n                $ref: '#/components/schemas/DocumentBusiness'\n            application/json;odata.metadata=full;odata.streaming=false:\n              schema:\n                $ref: '#/components/schemas/DocumentBusiness'\n            application/json;odata.metadata=full:\n              schema:\n                $ref: '#/components/schemas/DocumentBusiness'\n            application/json;odata.metadata=none;odata.streaming=true:\n              schema:\n                $ref: '#/components/schemas/DocumentBusiness'\n            application/json;odata.metadata=none;odata.streaming=false:\n              schema:\n                $ref: '#/components/schemas/DocumentBusiness'\n            application/json;odata.metadata=none:\n              schema:\n                $ref: '#/components/schemas/DocumentBusiness'\n            application/json;odata.streaming=true:\n              schema:\n                $ref: '#/components/schemas/DocumentBusiness'\n            application/json;odata.streaming=false:\n              schema:\n                $ref: '#/components/schemas/DocumentBusiness'\n            application/json:\n              schema:\n                $ref: '#/components/schemas/DocumentBusiness'\n            application/json;odata.metadata=minimal;odata.streaming=true;IEEE754Compatible=false:\n              schema:\n                $ref: '#/components/schemas/DocumentBusiness'\n            application/json;odata.metadata=minimal;odata.streaming=true;IEEE754Compatible=true:\n              schema:\n                $ref: '#/components/schemas/DocumentBusiness'\n            application/json;odata.metadata=minimal;odata.streaming=false;IEEE754Compatible=false:\n              schema:\n                $ref: '#/components/schemas/DocumentBusiness'\n            application/json;odata.metadata=minimal;odata.streaming=false;IEEE754Compatible=true:\n              schema:\n                $ref: '#/components/schemas/DocumentBusiness'\n            application/json;odata.metadata=minimal;IEEE754Compatible=false:\n              schema:\n                $ref: '#/components/schemas/DocumentBusiness'\n            application/json;odata.metadata=minimal;IEEE754Compatible=true:\n              schema:\n                $ref: '#/components/schemas/DocumentBusiness'\n            application/json;odata.metadata=full;odata.streaming=true;IEEE754Compatible=false:\n              schema:\n                $ref: '#/components/schemas/DocumentBusiness'\n            application/json;odata.metadata=full;odata.streaming=true;IEEE754Compatible=true:\n              schema:\n                $ref: '#/components/schemas/DocumentBusiness'\n            application/json;odata.metadata=full;odata.streaming=false;IEEE754Compatible=false:\n              schema:\n                $ref: '#/components/schemas/DocumentBusiness'\n            application/json;odata.metadata=full;odata.streaming=false;IEEE754Compatible=true:\n              schema:\n                $ref: '#/components/schemas/DocumentBusiness'\n            application/json;odata.metadata=full;IEEE754Compatible=false:\n              schema:\n                $ref: '#/components/schemas/DocumentBusiness'\n            application/json;odata.metadata=full;IEEE754Compatible=true:\n              schema:\n                $ref: '#/components/schemas/DocumentBusiness'\n            application/json;odata.metadata=none;odata.streaming=true;IEEE754Compatible=false:\n              schema:\n                $ref: '#/components/schemas/DocumentBusiness'\n            application/json;odata.metadata=none;odata.streaming=true;IEEE754Compatible=true:\n              schema:\n                $ref: '#/components/schemas/DocumentBusiness'\n            application/json;odata.metadata=none;odata.streaming=false;IEEE754Compatible=true:\n              schema:\n                $ref: '#/components/schemas/DocumentBusiness'\n            application/json;odata.metadata=none;odata.streaming=false;IEEE754Compatible=false:\n              schema:\n                $ref: '#/components/schemas/DocumentBusiness'\n            application/json;odata.metadata=none;IEEE754Compatible=false:\n              schema:\n                $ref: '#/components/schemas/DocumentBusiness'\n            application/json;odata.metadata=none;IEEE754Compatible=true:\n              schema:\n                $ref: '#/components/schemas/DocumentBusiness'\n            application/json;odata.streaming=true;IEEE754Compatible=false:\n              schema:\n                $ref: '#/components/schemas/DocumentBusiness'\n            application/json;odata.streaming=true;IEEE754Compatible=true:\n              schema:\n                $ref: '#/components/schemas/DocumentBusiness'\n            application/json;odata.streaming=false;IEEE754Compatible=false:\n              schema:\n                $ref: '#/components/schemas/DocumentBusiness'\n            application/json;odata.streaming=false;IEEE754Compatible=true:\n              schema:\n                $ref: '#/components/schemas/DocumentBusiness'\n            application/json;IEEE754Compatible=false:\n              schema:\n                $ref: '#/components/schemas/DocumentBusiness'\n            application/json;IEEE754Compatible=true:\n              schema:\n                $ref: '#/components/schemas/DocumentBusiness'\n            application/xml:\n              schema:\n                $ref: '#/components/schemas/DocumentBusiness'\n            text/plain:\n              schema:\n                $ref: '#/components/schemas/DocumentBusiness'\n            application/octet-stream:\n              schema:\n                $ref: '#/components/schemas/DocumentBusiness'\n            text/json:\n              schema:\n                $ref: '#/components/schemas/DocumentBusiness'\n    delete:\n      tags:\n        - BusinessDocuments\n      parameters:\n        - name: id\n          in: path\n          required: true\n          schema:\n            type: integer\n            format: int64\n      responses:\n        '200':\n          description: OK\n          content:\n            application/json;odata.metadata=minimal;odata.streaming=true:\n              schema:\n                $ref: '#/components/schemas/DocumentBusiness'\n            application/json;odata.metadata=minimal;odata.streaming=false:\n              schema:\n                $ref: '#/components/schemas/DocumentBusiness'\n            application/json;odata.metadata=minimal:\n              schema:\n                $ref: '#/components/schemas/DocumentBusiness'\n            application/json;odata.metadata=full;odata.streaming=true:\n              schema:\n                $ref: '#/components/schemas/DocumentBusiness'\n            application/json;odata.metadata=full;odata.streaming=false:\n              schema:\n                $ref: '#/components/schemas/DocumentBusiness'\n            application/json;odata.metadata=full:\n              schema:\n                $ref: '#/components/schemas/DocumentBusiness'\n            application/json;odata.metadata=none;odata.streaming=true:\n              schema:\n                $ref: '#/components/schemas/DocumentBusiness'\n            application/json;odata.metadata=none;odata.streaming=false:\n              schema:\n                $ref: '#/components/schemas/DocumentBusiness'\n            application/json;odata.metadata=none:\n              schema:\n                $ref: '#/components/schemas/DocumentBusiness'\n            application/json;odata.streaming=true:\n              schema:\n                $ref: '#/components/schemas/DocumentBusiness'\n            application/json;odata.streaming=false:\n              schema:\n                $ref: '#/components/schemas/DocumentBusiness'\n            application/json:\n              schema:\n                $ref: '#/components/schemas/DocumentBusiness'\n            application/json;odata.metadata=minimal;odata.streaming=true;IEEE754Compatible=false:\n              schema:\n                $ref: '#/components/schemas/DocumentBusiness'\n            application/json;odata.metadata=minimal;odata.streaming=true;IEEE754Compatible=true:\n              schema:\n                $ref: '#/components/schemas/DocumentBusiness'\n            application/json;odata.metadata=minimal;odata.streaming=false;IEEE754Compatible=false:\n              schema:\n                $ref: '#/components/schemas/DocumentBusiness'\n            application/json;odata.metadata=minimal;odata.streaming=false;IEEE754Compatible=true:\n              schema:\n                $ref: '#/components/schemas/DocumentBusiness'\n            application/json;odata.metadata=minimal;IEEE754Compatible=false:\n              schema:\n                $ref: '#/components/schemas/DocumentBusiness'\n            application/json;odata.metadata=minimal;IEEE754Compatible=true:\n              schema:\n                $ref: '#/components/schemas/DocumentBusiness'\n            application/json;odata.metadata=full;odata.streaming=true;IEEE754Compatible=false:\n              schema:\n                $ref: '#/components/schemas/DocumentBusiness'\n            application/json;odata.metadata=full;odata.streaming=true;IEEE754Compatible=true:\n              schema:\n                $ref: '#/components/schemas/DocumentBusiness'\n            application/json;odata.metadata=full;odata.streaming=false;IEEE754Compatible=false:\n              schema:\n                $ref: '#/components/schemas/DocumentBusiness'\n            application/json;odata.metadata=full;odata.streaming=false;IEEE754Compatible=true:\n              schema:\n                $ref: '#/components/schemas/DocumentBusiness'\n            application/json;odata.metadata=full;IEEE754Compatible=false:\n              schema:\n                $ref: '#/components/schemas/DocumentBusiness'\n            application/json;odata.metadata=full;IEEE754Compatible=true:\n              schema:\n                $ref: '#/components/schemas/DocumentBusiness'\n            application/json;odata.metadata=none;odata.streaming=true;IEEE754Compatible=false:\n              schema:\n                $ref: '#/components/schemas/DocumentBusiness'\n            application/json;odata.metadata=none;odata.streaming=true;IEEE754Compatible=true:\n              schema:\n                $ref: '#/components/schemas/DocumentBusiness'\n            application/json;odata.metadata=none;odata.streaming=false;IEEE754Compatible=true:\n              schema:\n                $ref: '#/components/schemas/DocumentBusiness'\n            application/json;odata.metadata=none;odata.streaming=false;IEEE754Compatible=false:\n              schema:\n                $ref: '#/components/schemas/DocumentBusiness'\n            application/json;odata.metadata=none;IEEE754Compatible=false:\n              schema:\n                $ref: '#/components/schemas/DocumentBusiness'\n            application/json;odata.metadata=none;IEEE754Compatible=true:\n              schema:\n                $ref: '#/components/schemas/DocumentBusiness'\n            application/json;odata.streaming=true;IEEE754Compatible=false:\n              schema:\n                $ref: '#/components/schemas/DocumentBusiness'\n            application/json;odata.streaming=true;IEEE754Compatible=true:\n              schema:\n                $ref: '#/components/schemas/DocumentBusiness'\n            application/json;odata.streaming=false;IEEE754Compatible=false:\n              schema:\n                $ref: '#/components/schemas/DocumentBusiness'\n            application/json;odata.streaming=false;IEEE754Compatible=true:\n              schema:\n                $ref: '#/components/schemas/DocumentBusiness'\n            application/json;IEEE754Compatible=false:\n              schema:\n                $ref: '#/components/schemas/DocumentBusiness'\n            application/json;IEEE754Compatible=true:\n              schema:\n                $ref: '#/components/schemas/DocumentBusiness'\n            application/xml:\n              schema:\n                $ref: '#/components/schemas/DocumentBusiness'\n            text/plain:\n              schema:\n                $ref: '#/components/schemas/DocumentBusiness'\n            application/octet-stream:\n              schema:\n                $ref: '#/components/schemas/DocumentBusiness'\n            text/json:\n              schema:\n                $ref: '#/components/schemas/DocumentBusiness'\n  /api/v1/business-documents/{id}/approve:\n    post:\n      tags:\n        - BusinessDocuments\n      parameters:\n        - name: id\n          in: path\n          required: true\n          schema:\n            type: integer\n            format: int64\n      responses:\n        '200':\n          description: OK\n          content:\n            application/json;odata.metadata=minimal;odata.streaming=true:\n              schema:\n                $ref: '#/components/schemas/DocumentBusiness'\n            application/json;odata.metadata=minimal;odata.streaming=false:\n              schema:\n                $ref: '#/components/schemas/DocumentBusiness'\n            application/json;odata.metadata=minimal:\n              schema:\n                $ref: '#/components/schemas/DocumentBusiness'\n            application/json;odata.metadata=full;odata.streaming=true:\n              schema:\n                $ref: '#/components/schemas/DocumentBusiness'\n            application/json;odata.metadata=full;odata.streaming=false:\n              schema:\n                $ref: '#/components/schemas/DocumentBusiness'\n            application/json;odata.metadata=full:\n              schema:\n                $ref: '#/components/schemas/DocumentBusiness'\n            application/json;odata.metadata=none;odata.streaming=true:\n              schema:\n                $ref: '#/components/schemas/DocumentBusiness'\n            application/json;odata.metadata=none;odata.streaming=false:\n              schema:\n                $ref: '#/components/schemas/DocumentBusiness'\n            application/json;odata.metadata=none:\n              schema:\n                $ref: '#/components/schemas/DocumentBusiness'\n            application/json;odata.streaming=true:\n              schema:\n                $ref: '#/components/schemas/DocumentBusiness'\n            application/json;odata.streaming=false:\n              schema:\n                $ref: '#/components/schemas/DocumentBusiness'\n            application/json:\n              schema:\n                $ref: '#/components/schemas/DocumentBusiness'\n            application/json;odata.metadata=minimal;odata.streaming=true;IEEE754Compatible=false:\n              schema:\n                $ref: '#/components/schemas/DocumentBusiness'\n            application/json;odata.metadata=minimal;odata.streaming=true;IEEE754Compatible=true:\n              schema:\n                $ref: '#/components/schemas/DocumentBusiness'\n            application/json;odata.metadata=minimal;odata.streaming=false;IEEE754Compatible=false:\n              schema:\n                $ref: '#/components/schemas/DocumentBusiness'\n            application/json;odata.metadata=minimal;odata.streaming=false;IEEE754Compatible=true:\n              schema:\n                $ref: '#/components/schemas/DocumentBusiness'\n            application/json;odata.metadata=minimal;IEEE754Compatible=false:\n              schema:\n                $ref: '#/components/schemas/DocumentBusiness'\n            application/json;odata.metadata=minimal;IEEE754Compatible=true:\n              schema:\n                $ref: '#/components/schemas/DocumentBusiness'\n            application/json;odata.metadata=full;odata.streaming=true;IEEE754Compatible=false:\n              schema:\n                $ref: '#/components/schemas/DocumentBusiness'\n            application/json;odata.metadata=full;odata.streaming=true;IEEE754Compatible=true:\n              schema:\n                $ref: '#/components/schemas/DocumentBusiness'\n            application/json;odata.metadata=full;odata.streaming=false;IEEE754Compatible=false:\n              schema:\n                $ref: '#/components/schemas/DocumentBusiness'\n            application/json;odata.metadata=full;odata.streaming=false;IEEE754Compatible=true:\n              schema:\n                $ref: '#/components/schemas/DocumentBusiness'\n            application/json;odata.metadata=full;IEEE754Compatible=false:\n              schema:\n                $ref: '#/components/schemas/DocumentBusiness'\n            application/json;odata.metadata=full;IEEE754Compatible=true:\n              schema:\n                $ref: '#/components/schemas/DocumentBusiness'\n            application/json;odata.metadata=none;odata.streaming=true;IEEE754Compatible=false:\n              schema:\n                $ref: '#/components/schemas/DocumentBusiness'\n            application/json;odata.metadata=none;odata.streaming=true;IEEE754Compatible=true:\n              schema:\n                $ref: '#/components/schemas/DocumentBusiness'\n            application/json;odata.metadata=none;odata.streaming=false;IEEE754Compatible=true:\n              schema:\n                $ref: '#/components/schemas/DocumentBusiness'\n            application/json;odata.metadata=none;odata.streaming=false;IEEE754Compatible=false:\n              schema:\n                $ref: '#/components/schemas/DocumentBusiness'\n            application/json;odata.metadata=none;IEEE754Compatible=false:\n              schema:\n                $ref: '#/components/schemas/DocumentBusiness'\n            application/json;odata.metadata=none;IEEE754Compatible=true:\n              schema:\n                $ref: '#/components/schemas/DocumentBusiness'\n            application/json;odata.streaming=true;IEEE754Compatible=false:\n              schema:\n                $ref: '#/components/schemas/DocumentBusiness'\n            application/json;odata.streaming=true;IEEE754Compatible=true:\n              schema:\n                $ref: '#/components/schemas/DocumentBusiness'\n            application/json;odata.streaming=false;IEEE754Compatible=false:\n              schema:\n                $ref: '#/components/schemas/DocumentBusiness'\n            application/json;odata.streaming=false;IEEE754Compatible=true:\n              schema:\n                $ref: '#/components/schemas/DocumentBusiness'\n            application/json;IEEE754Compatible=false:\n              schema:\n                $ref: '#/components/schemas/DocumentBusiness'\n            application/json;IEEE754Compatible=true:\n              schema:\n                $ref: '#/components/schemas/DocumentBusiness'\n            application/xml:\n              schema:\n                $ref: '#/components/schemas/DocumentBusiness'\n            text/plain:\n              schema:\n                $ref: '#/components/schemas/DocumentBusiness'\n            application/octet-stream:\n              schema:\n                $ref: '#/components/schemas/DocumentBusiness'\n            text/json:\n              schema:\n                $ref: '#/components/schemas/DocumentBusiness'\n  /api/v1/business-documents/{id}/unapprove:\n    post:\n      tags:\n        - BusinessDocuments\n      parameters:\n        - name: id\n          in: path\n          required: true\n          schema:\n            type: integer\n            format: int64\n      responses:\n        '200':\n          description: OK\n          content:\n            application/json;odata.metadata=minimal;odata.streaming=true:\n              schema:\n                $ref: '#/components/schemas/DocumentBusiness'\n            application/json;odata.metadata=minimal;odata.streaming=false:\n              schema:\n                $ref: '#/components/schemas/DocumentBusiness'\n            application/json;odata.metadata=minimal:\n              schema:\n                $ref: '#/components/schemas/DocumentBusiness'\n            application/json;odata.metadata=full;odata.streaming=true:\n              schema:\n                $ref: '#/components/schemas/DocumentBusiness'\n            application/json;odata.metadata=full;odata.streaming=false:\n              schema:\n                $ref: '#/components/schemas/DocumentBusiness'\n            application/json;odata.metadata=full:\n              schema:\n                $ref: '#/components/schemas/DocumentBusiness'\n            application/json;odata.metadata=none;odata.streaming=true:\n              schema:\n                $ref: '#/components/schemas/DocumentBusiness'\n            application/json;odata.metadata=none;odata.streaming=false:\n              schema:\n                $ref: '#/components/schemas/DocumentBusiness'\n            application/json;odata.metadata=none:\n              schema:\n                $ref: '#/components/schemas/DocumentBusiness'\n            application/json;odata.streaming=true:\n              schema:\n                $ref: '#/components/schemas/DocumentBusiness'\n            application/json;odata.streaming=false:\n              schema:\n                $ref: '#/components/schemas/DocumentBusiness'\n            application/json:\n              schema:\n                $ref: '#/components/schemas/DocumentBusiness'\n            application/json;odata.metadata=minimal;odata.streaming=true;IEEE754Compatible=false:\n              schema:\n                $ref: '#/components/schemas/DocumentBusiness'\n            application/json;odata.metadata=minimal;odata.streaming=true;IEEE754Compatible=true:\n              schema:\n                $ref: '#/components/schemas/DocumentBusiness'\n            application/json;odata.metadata=minimal;odata.streaming=false;IEEE754Compatible=false:\n              schema:\n                $ref: '#/components/schemas/DocumentBusiness'\n            application/json;odata.metadata=minimal;odata.streaming=false;IEEE754Compatible=true:\n              schema:\n                $ref: '#/components/schemas/DocumentBusiness'\n            application/json;odata.metadata=minimal;IEEE754Compatible=false:\n              schema:\n                $ref: '#/components/schemas/DocumentBusiness'\n            application/json;odata.metadata=minimal;IEEE754Compatible=true:\n              schema:\n                $ref: '#/components/schemas/DocumentBusiness'\n            application/json;odata.metadata=full;odata.streaming=true;IEEE754Compatible=false:\n              schema:\n                $ref: '#/components/schemas/DocumentBusiness'\n            application/json;odata.metadata=full;odata.streaming=true;IEEE754Compatible=true:\n              schema:\n                $ref: '#/components/schemas/DocumentBusiness'\n            application/json;odata.metadata=full;odata.streaming=false;IEEE754Compatible=false:\n              schema:\n                $ref: '#/components/schemas/DocumentBusiness'\n            application/json;odata.metadata=full;odata.streaming=false;IEEE754Compatible=true:\n              schema:\n                $ref: '#/components/schemas/DocumentBusiness'\n            application/json;odata.metadata=full;IEEE754Compatible=false:\n              schema:\n                $ref: '#/components/schemas/DocumentBusiness'\n            application/json;odata.metadata=full;IEEE754Compatible=true:\n              schema:\n                $ref: '#/components/schemas/DocumentBusiness'\n            application/json;odata.metadata=none;odata.streaming=true;IEEE754Compatible=false:\n              schema:\n                $ref: '#/components/schemas/DocumentBusiness'\n            application/json;odata.metadata=none;odata.streaming=true;IEEE754Compatible=true:\n              schema:\n                $ref: '#/components/schemas/DocumentBusiness'\n            application/json;odata.metadata=none;odata.streaming=false;IEEE754Compatible=true:\n              schema:\n                $ref: '#/components/schemas/DocumentBusiness'\n            application/json;odata.metadata=none;odata.streaming=false;IEEE754Compatible=false:\n              schema:\n                $ref: '#/components/schemas/DocumentBusiness'\n            application/json;odata.metadata=none;IEEE754Compatible=false:\n              schema:\n                $ref: '#/components/schemas/DocumentBusiness'\n            application/json;odata.metadata=none;IEEE754Compatible=true:\n              schema:\n                $ref: '#/components/schemas/DocumentBusiness'\n            application/json;odata.streaming=true;IEEE754Compatible=false:\n              schema:\n                $ref: '#/components/schemas/DocumentBusiness'\n            application/json;odata.streaming=true;IEEE754Compatible=true:\n              schema:\n                $ref: '#/components/schemas/DocumentBusiness'\n            application/json;odata.streaming=false;IEEE754Compatible=false:\n              schema:\n                $ref: '#/components/schemas/DocumentBusiness'\n            application/json;odata.streaming=false;IEEE754Compatible=true:\n              schema:\n                $ref: '#/components/schemas/DocumentBusiness'\n            application/json;IEEE754Compatible=false:\n              schema:\n                $ref: '#/components/schemas/DocumentBusiness'\n            application/json;IEEE754Compatible=true:\n              schema:\n                $ref: '#/components/schemas/DocumentBusiness'\n            application/xml:\n              schema:\n                $ref: '#/components/schemas/DocumentBusiness'\n            text/plain:\n              schema:\n                $ref: '#/components/schemas/DocumentBusiness'\n            application/octet-stream:\n              schema:\n                $ref: '#/components/schemas/DocumentBusiness'\n            text/json:\n              schema:\n                $ref: '#/components/schemas/DocumentBusiness'\n  /api/v1/business-documents/{id}/move-to-personal:\n    post:\n      tags:\n        - BusinessDocuments\n      parameters:\n        - name: id\n          in: path\n          required: true\n          schema:\n            type: integer\n            format: int64\n      responses:\n        '200':\n          description: OK\n  /api/v1/business-documents/{id}/move-to-business:\n    post:\n      tags:\n        - BusinessDocuments\n      parameters:\n        - name: id\n          in: path\n          required: true\n          schema:\n            type: integer\n            format: int64\n      requestBody:\n        content:\n          application/json;odata.metadata=minimal;odata.streaming=true:\n            schema:\n              $ref: '#/components/schemas/BusinessDocumentMoveToBusinessDocumentsDto'\n          application/json;odata.metadata=minimal;odata.streaming=false:\n            schema:\n              $ref: '#/components/schemas/BusinessDocumentMoveToBusinessDocumentsDto'\n          application/json;odata.metadata=minimal:\n            schema:\n              $ref: '#/components/schemas/BusinessDocumentMoveToBusinessDocumentsDto'\n          application/json;odata.metadata=full;odata.streaming=true:\n            schema:\n              $ref: '#/components/schemas/BusinessDocumentMoveToBusinessDocumentsDto'\n          application/json;odata.metadata=full;odata.streaming=false:\n            schema:\n              $ref: '#/components/schemas/BusinessDocumentMoveToBusinessDocumentsDto'\n          application/json;odata.metadata=full:\n            schema:\n              $ref: '#/components/schemas/BusinessDocumentMoveToBusinessDocumentsDto'\n          application/json;odata.metadata=none;odata.streaming=true:\n            schema:\n              $ref: '#/components/schemas/BusinessDocumentMoveToBusinessDocumentsDto'\n          application/json;odata.metadata=none;odata.streaming=false:\n            schema:\n              $ref: '#/components/schemas/BusinessDocumentMoveToBusinessDocumentsDto'\n          application/json;odata.metadata=none:\n            schema:\n              $ref: '#/components/schemas/BusinessDocumentMoveToBusinessDocumentsDto'\n          application/json;odata.streaming=true:\n            schema:\n              $ref: '#/components/schemas/BusinessDocumentMoveToBusinessDocumentsDto'\n          application/json;odata.streaming=false:\n            schema:\n              $ref: '#/components/schemas/BusinessDocumentMoveToBusinessDocumentsDto'\n          application/json:\n            schema:\n              $ref: '#/components/schemas/BusinessDocumentMoveToBusinessDocumentsDto'\n          application/json;odata.metadata=minimal;odata.streaming=true;IEEE754Compatible=false:\n            schema:\n              $ref: '#/components/schemas/BusinessDocumentMoveToBusinessDocumentsDto'\n          application/json;odata.metadata=minimal;odata.streaming=true;IEEE754Compatible=true:\n            schema:\n              $ref: '#/components/schemas/BusinessDocumentMoveToBusinessDocumentsDto'\n          application/json;odata.metadata=minimal;odata.streaming=false;IEEE754Compatible=false:\n            schema:\n              $ref: '#/components/schemas/BusinessDocumentMoveToBusinessDocumentsDto'\n          application/json;odata.metadata=minimal;odata.streaming=false;IEEE754Compatible=true:\n            schema:\n              $ref: '#/components/schemas/BusinessDocumentMoveToBusinessDocumentsDto'\n          application/json;odata.metadata=minimal;IEEE754Compatible=false:\n            schema:\n              $ref: '#/components/schemas/BusinessDocumentMoveToBusinessDocumentsDto'\n          application/json;odata.metadata=minimal;IEEE754Compatible=true:\n            schema:\n              $ref: '#/components/schemas/BusinessDocumentMoveToBusinessDocumentsDto'\n          application/json;odata.metadata=full;odata.streaming=true;IEEE754Compatible=false:\n            schema:\n              $ref: '#/components/schemas/BusinessDocumentMoveToBusinessDocumentsDto'\n          application/json;odata.metadata=full;odata.streaming=true;IEEE754Compatible=true:\n            schema:\n              $ref: '#/components/schemas/BusinessDocumentMoveToBusinessDocumentsDto'\n          application/json;odata.metadata=full;odata.streaming=false;IEEE754Compatible=false:\n            schema:\n              $ref: '#/components/schemas/BusinessDocumentMoveToBusinessDocumentsDto'\n          application/json;odata.metadata=full;odata.streaming=false;IEEE754Compatible=true:\n            schema:\n              $ref: '#/components/schemas/BusinessDocumentMoveToBusinessDocumentsDto'\n          application/json;odata.metadata=full;IEEE754Compatible=false:\n            schema:\n              $ref: '#/components/schemas/BusinessDocumentMoveToBusinessDocumentsDto'\n          application/json;odata.metadata=full;IEEE754Compatible=true:\n            schema:\n              $ref: '#/components/schemas/BusinessDocumentMoveToBusinessDocumentsDto'\n          application/json;odata.metadata=none;odata.streaming=true;IEEE754Compatible=false:\n            schema:\n              $ref: '#/components/schemas/BusinessDocumentMoveToBusinessDocumentsDto'\n          application/json;odata.metadata=none;odata.streaming=true;IEEE754Compatible=true:\n            schema:\n              $ref: '#/components/schemas/BusinessDocumentMoveToBusinessDocumentsDto'\n          application/json;odata.metadata=none;odata.streaming=false;IEEE754Compatible=true:\n            schema:\n              $ref: '#/components/schemas/BusinessDocumentMoveToBusinessDocumentsDto'\n          application/json;odata.metadata=none;odata.streaming=false;IEEE754Compatible=false:\n            schema:\n              $ref: '#/components/schemas/BusinessDocumentMoveToBusinessDocumentsDto'\n          application/json;odata.metadata=none;IEEE754Compatible=false:\n            schema:\n              $ref: '#/components/schemas/BusinessDocumentMoveToBusinessDocumentsDto'\n          application/json;odata.metadata=none;IEEE754Compatible=true:\n            schema:\n              $ref: '#/components/schemas/BusinessDocumentMoveToBusinessDocumentsDto'\n          application/json;odata.streaming=true;IEEE754Compatible=false:\n            schema:\n              $ref: '#/components/schemas/BusinessDocumentMoveToBusinessDocumentsDto'\n          application/json;odata.streaming=true;IEEE754Compatible=true:\n            schema:\n              $ref: '#/components/schemas/BusinessDocumentMoveToBusinessDocumentsDto'\n          application/json;odata.streaming=false;IEEE754Compatible=false:\n            schema:\n              $ref: '#/components/schemas/BusinessDocumentMoveToBusinessDocumentsDto'\n          application/json;odata.streaming=false;IEEE754Compatible=true:\n            schema:\n              $ref: '#/components/schemas/BusinessDocumentMoveToBusinessDocumentsDto'\n          application/json;IEEE754Compatible=false:\n            schema:\n              $ref: '#/components/schemas/BusinessDocumentMoveToBusinessDocumentsDto'\n          application/json;IEEE754Compatible=true:\n            schema:\n              $ref: '#/components/schemas/BusinessDocumentMoveToBusinessDocumentsDto'\n          application/xml:\n            schema:\n              $ref: '#/components/schemas/BusinessDocumentMoveToBusinessDocumentsDto'\n          text/plain:\n            schema:\n              $ref: '#/components/schemas/BusinessDocumentMoveToBusinessDocumentsDto'\n          application/json-patch+json:\n            schema:\n              $ref: '#/components/schemas/BusinessDocumentMoveToBusinessDocumentsDto'\n          text/json:\n            schema:\n              $ref: '#/components/schemas/BusinessDocumentMoveToBusinessDocumentsDto'\n          application/*+json:\n            schema:\n              $ref: '#/components/schemas/BusinessDocumentMoveToBusinessDocumentsDto'\n      responses:\n        '200':\n          description: OK\n          content:\n            application/json;odata.metadata=minimal;odata.streaming=true:\n              schema:\n                $ref: '#/components/schemas/DocumentBusiness'\n            application/json;odata.metadata=minimal;odata.streaming=false:\n              schema:\n                $ref: '#/components/schemas/DocumentBusiness'\n            application/json;odata.metadata=minimal:\n              schema:\n                $ref: '#/components/schemas/DocumentBusiness'\n            application/json;odata.metadata=full;odata.streaming=true:\n              schema:\n                $ref: '#/components/schemas/DocumentBusiness'\n            application/json;odata.metadata=full;odata.streaming=false:\n              schema:\n                $ref: '#/components/schemas/DocumentBusiness'\n            application/json;odata.metadata=full:\n              schema:\n                $ref: '#/components/schemas/DocumentBusiness'\n            application/json;odata.metadata=none;odata.streaming=true:\n              schema:\n                $ref: '#/components/schemas/DocumentBusiness'\n            application/json;odata.metadata=none;odata.streaming=false:\n              schema:\n                $ref: '#/components/schemas/DocumentBusiness'\n            application/json;odata.metadata=none:\n              schema:\n                $ref: '#/components/schemas/DocumentBusiness'\n            application/json;odata.streaming=true:\n              schema:\n                $ref: '#/components/schemas/DocumentBusiness'\n            application/json;odata.streaming=false:\n              schema:\n                $ref: '#/components/schemas/DocumentBusiness'\n            application/json:\n              schema:\n                $ref: '#/components/schemas/DocumentBusiness'\n            application/json;odata.metadata=minimal;odata.streaming=true;IEEE754Compatible=false:\n              schema:\n                $ref: '#/components/schemas/DocumentBusiness'\n            application/json;odata.metadata=minimal;odata.streaming=true;IEEE754Compatible=true:\n              schema:\n                $ref: '#/components/schemas/DocumentBusiness'\n            application/json;odata.metadata=minimal;odata.streaming=false;IEEE754Compatible=false:\n              schema:\n                $ref: '#/components/schemas/DocumentBusiness'\n            application/json;odata.metadata=minimal;odata.streaming=false;IEEE754Compatible=true:\n              schema:\n                $ref: '#/components/schemas/DocumentBusiness'\n            application/json;odata.metadata=minimal;IEEE754Compatible=false:\n              schema:\n                $ref: '#/components/schemas/DocumentBusiness'\n            application/json;odata.metadata=minimal;IEEE754Compatible=true:\n              schema:\n                $ref: '#/components/schemas/DocumentBusiness'\n            application/json;odata.metadata=full;odata.streaming=true;IEEE754Compatible=false:\n              schema:\n                $ref: '#/components/schemas/DocumentBusiness'\n            application/json;odata.metadata=full;odata.streaming=true;IEEE754Compatible=true:\n              schema:\n                $ref: '#/components/schemas/DocumentBusiness'\n            application/json;odata.metadata=full;odata.streaming=false;IEEE754Compatible=false:\n              schema:\n                $ref: '#/components/schemas/DocumentBusiness'\n            application/json;odata.metadata=full;odata.streaming=false;IEEE754Compatible=true:\n              schema:\n                $ref: '#/components/schemas/DocumentBusiness'\n            application/json;odata.metadata=full;IEEE754Compatible=false:\n              schema:\n                $ref: '#/components/schemas/DocumentBusiness'\n            application/json;odata.metadata=full;IEEE754Compatible=true:\n              schema:\n                $ref: '#/components/schemas/DocumentBusiness'\n            application/json;odata.metadata=none;odata.streaming=true;IEEE754Compatible=false:\n              schema:\n                $ref: '#/components/schemas/DocumentBusiness'\n            application/json;odata.metadata=none;odata.streaming=true;IEEE754Compatible=true:\n              schema:\n                $ref: '#/components/schemas/DocumentBusiness'\n            application/json;odata.metadata=none;odata.streaming=false;IEEE754Compatible=true:\n              schema:\n                $ref: '#/components/schemas/DocumentBusiness'\n            application/json;odata.metadata=none;odata.streaming=false;IEEE754Compatible=false:\n              schema:\n                $ref: '#/components/schemas/DocumentBusiness'\n            application/json;odata.metadata=none;IEEE754Compatible=false:\n              schema:\n                $ref: '#/components/schemas/DocumentBusiness'\n            application/json;odata.metadata=none;IEEE754Compatible=true:\n              schema:\n                $ref: '#/components/schemas/DocumentBusiness'\n            application/json;odata.streaming=true;IEEE754Compatible=false:\n              schema:\n                $ref: '#/components/schemas/DocumentBusiness'\n            application/json;odata.streaming=true;IEEE754Compatible=true:\n              schema:\n                $ref: '#/components/schemas/DocumentBusiness'\n            application/json;odata.streaming=false;IEEE754Compatible=false:\n              schema:\n                $ref: '#/components/schemas/DocumentBusiness'\n            application/json;odata.streaming=false;IEEE754Compatible=true:\n              schema:\n                $ref: '#/components/schemas/DocumentBusiness'\n            application/json;IEEE754Compatible=false:\n              schema:\n                $ref: '#/components/schemas/DocumentBusiness'\n            application/json;IEEE754Compatible=true:\n              schema:\n                $ref: '#/components/schemas/DocumentBusiness'\n            application/xml:\n              schema:\n                $ref: '#/components/schemas/DocumentBusiness'\n            text/plain:\n              schema:\n                $ref: '#/components/schemas/DocumentBusiness'\n            application/octet-stream:\n              schema:\n                $ref: '#/components/schemas/DocumentBusiness'\n            text/json:\n              schema:\n                $ref: '#/components/schemas/DocumentBusiness'\n  /api/v1/odata/BusinessDocumentActivities:\n    get:\n      tags:\n        - BusinessDocuments\n      operationId: api/v{version:apiVersion}/odata/BusinessDocumentActivities\n      parameters:\n        - name: accountants\n          in: query\n          schema:\n            type: array\n            items:\n              type: integer\n              format: int32\n        - name: select\n          in: query\n          description: Limits the properties returned in the result.\n          schema:\n            type: string\n        - name: expand\n          in: query\n          description: Indicates the related entities to be represented inline. The\n            maximum depth is 2.\n          schema:\n            type: string\n        - name: filter\n          in: query\n          description: 'Restricts the set of items returned. The maximum number of\n            expressions is 100. The allowed functions are: allfunctions.'\n          schema:\n            type: string\n        - name: orderby\n          in: query\n          description: Specifies the order in which items are returned. The maximum number\n            of expressions is 5.\n          schema:\n            type: string\n        - name: top\n          in: query\n          description: Limits the number of items returned from a collection. The maximum\n            value is 100.\n          schema:\n            type: integer\n            format: int32\n        - name: skip\n          in: query\n          description: Excludes the specified number of items of the queried collection\n            from the result.\n          schema:\n            type: integer\n            format: int32\n        - name: count\n          in: query\n          description: Indicates whether the total count of items within a collection are\n            returned in the result.\n          schema:\n            type: boolean\n            default: false\n      responses:\n        '200':\n          description: OK\n          content:\n            application/json;odata.metadata=minimal;odata.streaming=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/DocumentBusinessActivity'\n            application/json;odata.metadata=minimal;odata.streaming=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/DocumentBusinessActivity'\n            application/json;odata.metadata=minimal:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/DocumentBusinessActivity'\n            application/json;odata.metadata=full;odata.streaming=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/DocumentBusinessActivity'\n            application/json;odata.metadata=full;odata.streaming=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/DocumentBusinessActivity'\n            application/json;odata.metadata=full:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/DocumentBusinessActivity'\n            application/json;odata.metadata=none;odata.streaming=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/DocumentBusinessActivity'\n            application/json;odata.metadata=none;odata.streaming=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/DocumentBusinessActivity'\n            application/json;odata.metadata=none:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/DocumentBusinessActivity'\n            application/json;odata.streaming=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/DocumentBusinessActivity'\n            application/json;odata.streaming=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/DocumentBusinessActivity'\n            application/json:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/DocumentBusinessActivity'\n            application/json;odata.metadata=minimal;odata.streaming=true;IEEE754Compatible=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/DocumentBusinessActivity'\n            application/json;odata.metadata=minimal;odata.streaming=true;IEEE754Compatible=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/DocumentBusinessActivity'\n            application/json;odata.metadata=minimal;odata.streaming=false;IEEE754Compatible=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/DocumentBusinessActivity'\n            application/json;odata.metadata=minimal;odata.streaming=false;IEEE754Compatible=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/DocumentBusinessActivity'\n            application/json;odata.metadata=minimal;IEEE754Compatible=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/DocumentBusinessActivity'\n            application/json;odata.metadata=minimal;IEEE754Compatible=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/DocumentBusinessActivity'\n            application/json;odata.metadata=full;odata.streaming=true;IEEE754Compatible=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/DocumentBusinessActivity'\n            application/json;odata.metadata=full;odata.streaming=true;IEEE754Compatible=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/DocumentBusinessActivity'\n            application/json;odata.metadata=full;odata.streaming=false;IEEE754Compatible=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/DocumentBusinessActivity'\n            application/json;odata.metadata=full;odata.streaming=false;IEEE754Compatible=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/DocumentBusinessActivity'\n            application/json;odata.metadata=full;IEEE754Compatible=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/DocumentBusinessActivity'\n            application/json;odata.metadata=full;IEEE754Compatible=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/DocumentBusinessActivity'\n            application/json;odata.metadata=none;odata.streaming=true;IEEE754Compatible=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/DocumentBusinessActivity'\n            application/json;odata.metadata=none;odata.streaming=true;IEEE754Compatible=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/DocumentBusinessActivity'\n            application/json;odata.metadata=none;odata.streaming=false;IEEE754Compatible=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/DocumentBusinessActivity'\n            application/json;odata.metadata=none;odata.streaming=false;IEEE754Compatible=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/DocumentBusinessActivity'\n            application/json;odata.metadata=none;IEEE754Compatible=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/DocumentBusinessActivity'\n            application/json;odata.metadata=none;IEEE754Compatible=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/DocumentBusinessActivity'\n            application/json;odata.streaming=true;IEEE754Compatible=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/DocumentBusinessActivity'\n            application/json;odata.streaming=true;IEEE754Compatible=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/DocumentBusinessActivity'\n            application/json;odata.streaming=false;IEEE754Compatible=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/DocumentBusinessActivity'\n            application/json;odata.streaming=false;IEEE754Compatible=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/DocumentBusinessActivity'\n            application/json;IEEE754Compatible=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/DocumentBusinessActivity'\n            application/json;IEEE754Compatible=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/DocumentBusinessActivity'\n            application/xml:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/DocumentBusinessActivity'\n            text/plain:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/DocumentBusinessActivity'\n            application/octet-stream:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/DocumentBusinessActivity'\n            text/json:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/DocumentBusinessActivity'\n  /api/v1/odata/BusinessDocumentActivities/$count:\n    get:\n      tags:\n        - BusinessDocuments\n      operationId: api/v{version:apiVersion}/odata/BusinessDocumentActivities/$count\n      parameters:\n        - name: accountants\n          in: query\n          schema:\n            type: array\n            items:\n              type: integer\n              format: int32\n        - name: select\n          in: query\n          description: Limits the properties returned in the result.\n          schema:\n            type: string\n        - name: expand\n          in: query\n          description: Indicates the related entities to be represented inline. The\n            maximum depth is 2.\n          schema:\n            type: string\n        - name: filter\n          in: query\n          description: 'Restricts the set of items returned. The maximum number of\n            expressions is 100. The allowed functions are: allfunctions.'\n          schema:\n            type: string\n        - name: orderby\n          in: query\n          description: Specifies the order in which items are returned. The maximum number\n            of expressions is 5.\n          schema:\n            type: string\n        - name: top\n          in: query\n          description: Limits the number of items returned from a collection. The maximum\n            value is 100.\n          schema:\n            type: integer\n            format: int32\n        - name: skip\n          in: query\n          description: Excludes the specified number of items of the queried collection\n            from the result.\n          schema:\n            type: integer\n            format: int32\n        - name: count\n          in: query\n          description: Indicates whether the total count of items within a collection are\n            returned in the result.\n          schema:\n            type: boolean\n            default: false\n      responses:\n        '200':\n          description: OK\n          content:\n            application/json;odata.metadata=minimal;odata.streaming=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/DocumentBusinessActivity'\n            application/json;odata.metadata=minimal;odata.streaming=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/DocumentBusinessActivity'\n            application/json;odata.metadata=minimal:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/DocumentBusinessActivity'\n            application/json;odata.metadata=full;odata.streaming=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/DocumentBusinessActivity'\n            application/json;odata.metadata=full;odata.streaming=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/DocumentBusinessActivity'\n            application/json;odata.metadata=full:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/DocumentBusinessActivity'\n            application/json;odata.metadata=none;odata.streaming=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/DocumentBusinessActivity'\n            application/json;odata.metadata=none;odata.streaming=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/DocumentBusinessActivity'\n            application/json;odata.metadata=none:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/DocumentBusinessActivity'\n            application/json;odata.streaming=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/DocumentBusinessActivity'\n            application/json;odata.streaming=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/DocumentBusinessActivity'\n            application/json:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/DocumentBusinessActivity'\n            application/json;odata.metadata=minimal;odata.streaming=true;IEEE754Compatible=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/DocumentBusinessActivity'\n            application/json;odata.metadata=minimal;odata.streaming=true;IEEE754Compatible=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/DocumentBusinessActivity'\n            application/json;odata.metadata=minimal;odata.streaming=false;IEEE754Compatible=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/DocumentBusinessActivity'\n            application/json;odata.metadata=minimal;odata.streaming=false;IEEE754Compatible=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/DocumentBusinessActivity'\n            application/json;odata.metadata=minimal;IEEE754Compatible=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/DocumentBusinessActivity'\n            application/json;odata.metadata=minimal;IEEE754Compatible=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/DocumentBusinessActivity'\n            application/json;odata.metadata=full;odata.streaming=true;IEEE754Compatible=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/DocumentBusinessActivity'\n            application/json;odata.metadata=full;odata.streaming=true;IEEE754Compatible=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/DocumentBusinessActivity'\n            application/json;odata.metadata=full;odata.streaming=false;IEEE754Compatible=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/DocumentBusinessActivity'\n            application/json;odata.metadata=full;odata.streaming=false;IEEE754Compatible=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/DocumentBusinessActivity'\n            application/json;odata.metadata=full;IEEE754Compatible=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/DocumentBusinessActivity'\n            application/json;odata.metadata=full;IEEE754Compatible=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/DocumentBusinessActivity'\n            application/json;odata.metadata=none;odata.streaming=true;IEEE754Compatible=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/DocumentBusinessActivity'\n            application/json;odata.metadata=none;odata.streaming=true;IEEE754Compatible=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/DocumentBusinessActivity'\n            application/json;odata.metadata=none;odata.streaming=false;IEEE754Compatible=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/DocumentBusinessActivity'\n            application/json;odata.metadata=none;odata.streaming=false;IEEE754Compatible=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/DocumentBusinessActivity'\n            application/json;odata.metadata=none;IEEE754Compatible=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/DocumentBusinessActivity'\n            application/json;odata.metadata=none;IEEE754Compatible=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/DocumentBusinessActivity'\n            application/json;odata.streaming=true;IEEE754Compatible=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/DocumentBusinessActivity'\n            application/json;odata.streaming=true;IEEE754Compatible=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/DocumentBusinessActivity'\n            application/json;odata.streaming=false;IEEE754Compatible=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/DocumentBusinessActivity'\n            application/json;odata.streaming=false;IEEE754Compatible=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/DocumentBusinessActivity'\n            application/json;IEEE754Compatible=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/DocumentBusinessActivity'\n            application/json;IEEE754Compatible=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/DocumentBusinessActivity'\n            application/xml:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/DocumentBusinessActivity'\n            text/plain:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/DocumentBusinessActivity'\n            application/octet-stream:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/DocumentBusinessActivity'\n            text/json:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/DocumentBusinessActivity'\n  /api/v1/odata/BusinessDocuments:\n    get:\n      tags:\n        - BusinessDocuments\n      operationId: api/v{version:apiVersion}/odata/BusinessDocuments\n      parameters:\n        - name: accountants\n          in: query\n          schema:\n            type: array\n            items:\n              type: integer\n              format: int32\n        - name: select\n          in: query\n          description: Limits the properties returned in the result.\n          schema:\n            type: string\n        - name: expand\n          in: query\n          description: Indicates the related entities to be represented inline. The\n            maximum depth is 2.\n          schema:\n            type: string\n        - name: filter\n          in: query\n          description: 'Restricts the set of items returned. The maximum number of\n            expressions is 100. The allowed functions are: allfunctions.'\n          schema:\n            type: string\n        - name: orderby\n          in: query\n          description: Specifies the order in which items are returned. The maximum number\n            of expressions is 5.\n          schema:\n            type: string\n        - name: top\n          in: query\n          description: Limits the number of items returned from a collection. The maximum\n            value is 100.\n          schema:\n            type: integer\n            format: int32\n        - name: skip\n          in: query\n          description: Excludes the specified number of items of the queried collection\n            from the result.\n          schema:\n            type: integer\n            format: int32\n        - name: count\n          in: query\n          description: Indicates whether the total count of items within a collection are\n            returned in the result.\n          schema:\n            type: boolean\n            default: false\n      responses:\n        '200':\n          description: OK\n          content:\n            application/json;odata.metadata=minimal;odata.streaming=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/DocumentBusiness'\n            application/json;odata.metadata=minimal;odata.streaming=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/DocumentBusiness'\n            application/json;odata.metadata=minimal:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/DocumentBusiness'\n            application/json;odata.metadata=full;odata.streaming=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/DocumentBusiness'\n            application/json;odata.metadata=full;odata.streaming=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/DocumentBusiness'\n            application/json;odata.metadata=full:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/DocumentBusiness'\n            application/json;odata.metadata=none;odata.streaming=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/DocumentBusiness'\n            application/json;odata.metadata=none;odata.streaming=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/DocumentBusiness'\n            application/json;odata.metadata=none:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/DocumentBusiness'\n            application/json;odata.streaming=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/DocumentBusiness'\n            application/json;odata.streaming=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/DocumentBusiness'\n            application/json:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/DocumentBusiness'\n            application/json;odata.metadata=minimal;odata.streaming=true;IEEE754Compatible=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/DocumentBusiness'\n            application/json;odata.metadata=minimal;odata.streaming=true;IEEE754Compatible=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/DocumentBusiness'\n            application/json;odata.metadata=minimal;odata.streaming=false;IEEE754Compatible=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/DocumentBusiness'\n            application/json;odata.metadata=minimal;odata.streaming=false;IEEE754Compatible=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/DocumentBusiness'\n            application/json;odata.metadata=minimal;IEEE754Compatible=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/DocumentBusiness'\n            application/json;odata.metadata=minimal;IEEE754Compatible=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/DocumentBusiness'\n            application/json;odata.metadata=full;odata.streaming=true;IEEE754Compatible=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/DocumentBusiness'\n            application/json;odata.metadata=full;odata.streaming=true;IEEE754Compatible=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/DocumentBusiness'\n            application/json;odata.metadata=full;odata.streaming=false;IEEE754Compatible=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/DocumentBusiness'\n            application/json;odata.metadata=full;odata.streaming=false;IEEE754Compatible=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/DocumentBusiness'\n            application/json;odata.metadata=full;IEEE754Compatible=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/DocumentBusiness'\n            application/json;odata.metadata=full;IEEE754Compatible=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/DocumentBusiness'\n            application/json;odata.metadata=none;odata.streaming=true;IEEE754Compatible=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/DocumentBusiness'\n            application/json;odata.metadata=none;odata.streaming=true;IEEE754Compatible=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/DocumentBusiness'\n            application/json;odata.metadata=none;odata.streaming=false;IEEE754Compatible=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/DocumentBusiness'\n            application/json;odata.metadata=none;odata.streaming=false;IEEE754Compatible=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/DocumentBusiness'\n            application/json;odata.metadata=none;IEEE754Compatible=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/DocumentBusiness'\n            application/json;odata.metadata=none;IEEE754Compatible=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/DocumentBusiness'\n            application/json;odata.streaming=true;IEEE754Compatible=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/DocumentBusiness'\n            application/json;odata.streaming=true;IEEE754Compatible=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/DocumentBusiness'\n            application/json;odata.streaming=false;IEEE754Compatible=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/DocumentBusiness'\n            application/json;odata.streaming=false;IEEE754Compatible=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/DocumentBusiness'\n            application/json;IEEE754Compatible=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/DocumentBusiness'\n            application/json;IEEE754Compatible=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/DocumentBusiness'\n            application/xml:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/DocumentBusiness'\n            text/plain:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/DocumentBusiness'\n            application/octet-stream:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/DocumentBusiness'\n            text/json:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/DocumentBusiness'\n  /api/v1/odata/BusinessDocuments/$count:\n    get:\n      tags:\n        - BusinessDocuments\n      operationId: api/v{version:apiVersion}/odata/BusinessDocuments/$count\n      parameters:\n        - name: accountants\n          in: query\n          schema:\n            type: array\n            items:\n              type: integer\n              format: int32\n        - name: select\n          in: query\n          description: Limits the properties returned in the result.\n          schema:\n            type: string\n        - name: expand\n          in: query\n          description: Indicates the related entities to be represented inline. The\n            maximum depth is 2.\n          schema:\n            type: string\n        - name: filter\n          in: query\n          description: 'Restricts the set of items returned. The maximum number of\n            expressions is 100. The allowed functions are: allfunctions.'\n          schema:\n            type: string\n        - name: orderby\n          in: query\n          description: Specifies the order in which items are returned. The maximum number\n            of expressions is 5.\n          schema:\n            type: string\n        - name: top\n          in: query\n          description: Limits the number of items returned from a collection. The maximum\n            value is 100.\n          schema:\n            type: integer\n            format: int32\n        - name: skip\n          in: query\n          description: Excludes the specified number of items of the queried collection\n            from the result.\n          schema:\n            type: integer\n            format: int32\n        - name: count\n          in: query\n          description: Indicates whether the total count of items within a collection are\n            returned in the result.\n          schema:\n            type: boolean\n            default: false\n      responses:\n        '200':\n          description: OK\n          content:\n            application/json;odata.metadata=minimal;odata.streaming=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/DocumentBusiness'\n            application/json;odata.metadata=minimal;odata.streaming=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/DocumentBusiness'\n            application/json;odata.metadata=minimal:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/DocumentBusiness'\n            application/json;odata.metadata=full;odata.streaming=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/DocumentBusiness'\n            application/json;odata.metadata=full;odata.streaming=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/DocumentBusiness'\n            application/json;odata.metadata=full:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/DocumentBusiness'\n            application/json;odata.metadata=none;odata.streaming=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/DocumentBusiness'\n            application/json;odata.metadata=none;odata.streaming=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/DocumentBusiness'\n            application/json;odata.metadata=none:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/DocumentBusiness'\n            application/json;odata.streaming=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/DocumentBusiness'\n            application/json;odata.streaming=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/DocumentBusiness'\n            application/json:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/DocumentBusiness'\n            application/json;odata.metadata=minimal;odata.streaming=true;IEEE754Compatible=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/DocumentBusiness'\n            application/json;odata.metadata=minimal;odata.streaming=true;IEEE754Compatible=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/DocumentBusiness'\n            application/json;odata.metadata=minimal;odata.streaming=false;IEEE754Compatible=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/DocumentBusiness'\n            application/json;odata.metadata=minimal;odata.streaming=false;IEEE754Compatible=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/DocumentBusiness'\n            application/json;odata.metadata=minimal;IEEE754Compatible=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/DocumentBusiness'\n            application/json;odata.metadata=minimal;IEEE754Compatible=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/DocumentBusiness'\n            application/json;odata.metadata=full;odata.streaming=true;IEEE754Compatible=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/DocumentBusiness'\n            application/json;odata.metadata=full;odata.streaming=true;IEEE754Compatible=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/DocumentBusiness'\n            application/json;odata.metadata=full;odata.streaming=false;IEEE754Compatible=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/DocumentBusiness'\n            application/json;odata.metadata=full;odata.streaming=false;IEEE754Compatible=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/DocumentBusiness'\n            application/json;odata.metadata=full;IEEE754Compatible=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/DocumentBusiness'\n            application/json;odata.metadata=full;IEEE754Compatible=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/DocumentBusiness'\n            application/json;odata.metadata=none;odata.streaming=true;IEEE754Compatible=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/DocumentBusiness'\n            application/json;odata.metadata=none;odata.streaming=true;IEEE754Compatible=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/DocumentBusiness'\n            application/json;odata.metadata=none;odata.streaming=false;IEEE754Compatible=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/DocumentBusiness'\n            application/json;odata.metadata=none;odata.streaming=false;IEEE754Compatible=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/DocumentBusiness'\n            application/json;odata.metadata=none;IEEE754Compatible=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/DocumentBusiness'\n            application/json;odata.metadata=none;IEEE754Compatible=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/DocumentBusiness'\n            application/json;odata.streaming=true;IEEE754Compatible=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/DocumentBusiness'\n            application/json;odata.streaming=true;IEEE754Compatible=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/DocumentBusiness'\n            application/json;odata.streaming=false;IEEE754Compatible=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/DocumentBusiness'\n            application/json;odata.streaming=false;IEEE754Compatible=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/DocumentBusiness'\n            application/json;IEEE754Compatible=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/DocumentBusiness'\n            application/json;IEEE754Compatible=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/DocumentBusiness'\n            application/xml:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/DocumentBusiness'\n            text/plain:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/DocumentBusiness'\n            application/octet-stream:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/DocumentBusiness'\n            text/json:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/DocumentBusiness'\n  /api/v1/odata/BusinessDocumentsSummaries:\n    get:\n      tags:\n        - BusinessDocumentsSummaries\n      operationId: api/v{version:apiVersion}/odata/BusinessDocumentsSummaries\n      parameters:\n        - name: accountants\n          in: query\n          schema:\n            type: array\n            items:\n              type: integer\n              format: int32\n        - name: select\n          in: query\n          description: Limits the properties returned in the result.\n          schema:\n            type: string\n        - name: expand\n          in: query\n          description: Indicates the related entities to be represented inline. The\n            maximum depth is 2.\n          schema:\n            type: string\n        - name: filter\n          in: query\n          description: 'Restricts the set of items returned. The maximum number of\n            expressions is 100. The allowed functions are: allfunctions.'\n          schema:\n            type: string\n        - name: orderby\n          in: query\n          description: Specifies the order in which items are returned. The maximum number\n            of expressions is 5.\n          schema:\n            type: string\n        - name: top\n          in: query\n          description: Limits the number of items returned from a collection. The maximum\n            value is 100.\n          schema:\n            type: integer\n            format: int32\n        - name: skip\n          in: query\n          description: Excludes the specified number of items of the queried collection\n            from the result.\n          schema:\n            type: integer\n            format: int32\n        - name: count\n          in: query\n          description: Indicates whether the total count of items within a collection are\n            returned in the result.\n          schema:\n            type: boolean\n            default: false\n      responses:\n        '200':\n          description: OK\n          content:\n            application/json;odata.metadata=minimal;odata.streaming=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/BusinessDocumentsSummary'\n            application/json;odata.metadata=minimal;odata.streaming=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/BusinessDocumentsSummary'\n            application/json;odata.metadata=minimal:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/BusinessDocumentsSummary'\n            application/json;odata.metadata=full;odata.streaming=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/BusinessDocumentsSummary'\n            application/json;odata.metadata=full;odata.streaming=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/BusinessDocumentsSummary'\n            application/json;odata.metadata=full:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/BusinessDocumentsSummary'\n            application/json;odata.metadata=none;odata.streaming=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/BusinessDocumentsSummary'\n            application/json;odata.metadata=none;odata.streaming=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/BusinessDocumentsSummary'\n            application/json;odata.metadata=none:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/BusinessDocumentsSummary'\n            application/json;odata.streaming=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/BusinessDocumentsSummary'\n            application/json;odata.streaming=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/BusinessDocumentsSummary'\n            application/json:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/BusinessDocumentsSummary'\n            application/json;odata.metadata=minimal;odata.streaming=true;IEEE754Compatible=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/BusinessDocumentsSummary'\n            application/json;odata.metadata=minimal;odata.streaming=true;IEEE754Compatible=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/BusinessDocumentsSummary'\n            application/json;odata.metadata=minimal;odata.streaming=false;IEEE754Compatible=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/BusinessDocumentsSummary'\n            application/json;odata.metadata=minimal;odata.streaming=false;IEEE754Compatible=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/BusinessDocumentsSummary'\n            application/json;odata.metadata=minimal;IEEE754Compatible=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/BusinessDocumentsSummary'\n            application/json;odata.metadata=minimal;IEEE754Compatible=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/BusinessDocumentsSummary'\n            application/json;odata.metadata=full;odata.streaming=true;IEEE754Compatible=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/BusinessDocumentsSummary'\n            application/json;odata.metadata=full;odata.streaming=true;IEEE754Compatible=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/BusinessDocumentsSummary'\n            application/json;odata.metadata=full;odata.streaming=false;IEEE754Compatible=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/BusinessDocumentsSummary'\n            application/json;odata.metadata=full;odata.streaming=false;IEEE754Compatible=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/BusinessDocumentsSummary'\n            application/json;odata.metadata=full;IEEE754Compatible=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/BusinessDocumentsSummary'\n            application/json;odata.metadata=full;IEEE754Compatible=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/BusinessDocumentsSummary'\n            application/json;odata.metadata=none;odata.streaming=true;IEEE754Compatible=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/BusinessDocumentsSummary'\n            application/json;odata.metadata=none;odata.streaming=true;IEEE754Compatible=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/BusinessDocumentsSummary'\n            application/json;odata.metadata=none;odata.streaming=false;IEEE754Compatible=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/BusinessDocumentsSummary'\n            application/json;odata.metadata=none;odata.streaming=false;IEEE754Compatible=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/BusinessDocumentsSummary'\n            application/json;odata.metadata=none;IEEE754Compatible=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/BusinessDocumentsSummary'\n            application/json;odata.metadata=none;IEEE754Compatible=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/BusinessDocumentsSummary'\n            application/json;odata.streaming=true;IEEE754Compatible=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/BusinessDocumentsSummary'\n            application/json;odata.streaming=true;IEEE754Compatible=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/BusinessDocumentsSummary'\n            application/json;odata.streaming=false;IEEE754Compatible=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/BusinessDocumentsSummary'\n            application/json;odata.streaming=false;IEEE754Compatible=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/BusinessDocumentsSummary'\n            application/json;IEEE754Compatible=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/BusinessDocumentsSummary'\n            application/json;IEEE754Compatible=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/BusinessDocumentsSummary'\n            application/xml:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/BusinessDocumentsSummary'\n            text/plain:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/BusinessDocumentsSummary'\n            application/octet-stream:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/BusinessDocumentsSummary'\n            text/json:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/BusinessDocumentsSummary'\n      deprecated: true\n  /api/v1/odata/BusinessDocumentsSummaries/$count:\n    get:\n      tags:\n        - BusinessDocumentsSummaries\n      operationId: api/v{version:apiVersion}/odata/BusinessDocumentsSummaries/$count\n      parameters:\n        - name: accountants\n          in: query\n          schema:\n            type: array\n            items:\n              type: integer\n              format: int32\n        - name: select\n          in: query\n          description: Limits the properties returned in the result.\n          schema:\n            type: string\n        - name: expand\n          in: query\n          description: Indicates the related entities to be represented inline. The\n            maximum depth is 2.\n          schema:\n            type: string\n        - name: filter\n          in: query\n          description: 'Restricts the set of items returned. The maximum number of\n            expressions is 100. The allowed functions are: allfunctions.'\n          schema:\n            type: string\n        - name: orderby\n          in: query\n          description: Specifies the order in which items are returned. The maximum number\n            of expressions is 5.\n          schema:\n            type: string\n        - name: top\n          in: query\n          description: Limits the number of items returned from a collection. The maximum\n            value is 100.\n          schema:\n            type: integer\n            format: int32\n        - name: skip\n          in: query\n          description: Excludes the specified number of items of the queried collection\n            from the result.\n          schema:\n            type: integer\n            format: int32\n        - name: count\n          in: query\n          description: Indicates whether the total count of items within a collection are\n            returned in the result.\n          schema:\n            type: boolean\n            default: false\n      responses:\n        '200':\n          description: OK\n          content:\n            application/json;odata.metadata=minimal;odata.streaming=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/BusinessDocumentsSummary'\n            application/json;odata.metadata=minimal;odata.streaming=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/BusinessDocumentsSummary'\n            application/json;odata.metadata=minimal:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/BusinessDocumentsSummary'\n            application/json;odata.metadata=full;odata.streaming=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/BusinessDocumentsSummary'\n            application/json;odata.metadata=full;odata.streaming=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/BusinessDocumentsSummary'\n            application/json;odata.metadata=full:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/BusinessDocumentsSummary'\n            application/json;odata.metadata=none;odata.streaming=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/BusinessDocumentsSummary'\n            application/json;odata.metadata=none;odata.streaming=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/BusinessDocumentsSummary'\n            application/json;odata.metadata=none:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/BusinessDocumentsSummary'\n            application/json;odata.streaming=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/BusinessDocumentsSummary'\n            application/json;odata.streaming=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/BusinessDocumentsSummary'\n            application/json:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/BusinessDocumentsSummary'\n            application/json;odata.metadata=minimal;odata.streaming=true;IEEE754Compatible=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/BusinessDocumentsSummary'\n            application/json;odata.metadata=minimal;odata.streaming=true;IEEE754Compatible=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/BusinessDocumentsSummary'\n            application/json;odata.metadata=minimal;odata.streaming=false;IEEE754Compatible=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/BusinessDocumentsSummary'\n            application/json;odata.metadata=minimal;odata.streaming=false;IEEE754Compatible=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/BusinessDocumentsSummary'\n            application/json;odata.metadata=minimal;IEEE754Compatible=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/BusinessDocumentsSummary'\n            application/json;odata.metadata=minimal;IEEE754Compatible=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/BusinessDocumentsSummary'\n            application/json;odata.metadata=full;odata.streaming=true;IEEE754Compatible=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/BusinessDocumentsSummary'\n            application/json;odata.metadata=full;odata.streaming=true;IEEE754Compatible=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/BusinessDocumentsSummary'\n            application/json;odata.metadata=full;odata.streaming=false;IEEE754Compatible=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/BusinessDocumentsSummary'\n            application/json;odata.metadata=full;odata.streaming=false;IEEE754Compatible=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/BusinessDocumentsSummary'\n            application/json;odata.metadata=full;IEEE754Compatible=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/BusinessDocumentsSummary'\n            application/json;odata.metadata=full;IEEE754Compatible=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/BusinessDocumentsSummary'\n            application/json;odata.metadata=none;odata.streaming=true;IEEE754Compatible=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/BusinessDocumentsSummary'\n            application/json;odata.metadata=none;odata.streaming=true;IEEE754Compatible=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/BusinessDocumentsSummary'\n            application/json;odata.metadata=none;odata.streaming=false;IEEE754Compatible=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/BusinessDocumentsSummary'\n            application/json;odata.metadata=none;odata.streaming=false;IEEE754Compatible=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/BusinessDocumentsSummary'\n            application/json;odata.metadata=none;IEEE754Compatible=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/BusinessDocumentsSummary'\n            application/json;odata.metadata=none;IEEE754Compatible=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/BusinessDocumentsSummary'\n            application/json;odata.streaming=true;IEEE754Compatible=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/BusinessDocumentsSummary'\n            application/json;odata.streaming=true;IEEE754Compatible=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/BusinessDocumentsSummary'\n            application/json;odata.streaming=false;IEEE754Compatible=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/BusinessDocumentsSummary'\n            application/json;odata.streaming=false;IEEE754Compatible=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/BusinessDocumentsSummary'\n            application/json;IEEE754Compatible=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/BusinessDocumentsSummary'\n            application/json;IEEE754Compatible=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/BusinessDocumentsSummary'\n            application/xml:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/BusinessDocumentsSummary'\n            text/plain:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/BusinessDocumentsSummary'\n            application/octet-stream:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/BusinessDocumentsSummary'\n            text/json:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/BusinessDocumentsSummary'\n      deprecated: true\n  /api/v1/businesses/{id}/document-types-summary:\n    get:\n      tags:\n        - Businesses\n      parameters:\n        - name: id\n          in: path\n          required: true\n          schema:\n            type: integer\n            format: int32\n      responses:\n        '200':\n          description: OK\n          content:\n            application/json;odata.metadata=minimal;odata.streaming=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/DocumentTypesSummary'\n            application/json;odata.metadata=minimal;odata.streaming=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/DocumentTypesSummary'\n            application/json;odata.metadata=minimal:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/DocumentTypesSummary'\n            application/json;odata.metadata=full;odata.streaming=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/DocumentTypesSummary'\n            application/json;odata.metadata=full;odata.streaming=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/DocumentTypesSummary'\n            application/json;odata.metadata=full:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/DocumentTypesSummary'\n            application/json;odata.metadata=none;odata.streaming=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/DocumentTypesSummary'\n            application/json;odata.metadata=none;odata.streaming=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/DocumentTypesSummary'\n            application/json;odata.metadata=none:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/DocumentTypesSummary'\n            application/json;odata.streaming=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/DocumentTypesSummary'\n            application/json;odata.streaming=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/DocumentTypesSummary'\n            application/json:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/DocumentTypesSummary'\n            application/json;odata.metadata=minimal;odata.streaming=true;IEEE754Compatible=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/DocumentTypesSummary'\n            application/json;odata.metadata=minimal;odata.streaming=true;IEEE754Compatible=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/DocumentTypesSummary'\n            application/json;odata.metadata=minimal;odata.streaming=false;IEEE754Compatible=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/DocumentTypesSummary'\n            application/json;odata.metadata=minimal;odata.streaming=false;IEEE754Compatible=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/DocumentTypesSummary'\n            application/json;odata.metadata=minimal;IEEE754Compatible=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/DocumentTypesSummary'\n            application/json;odata.metadata=minimal;IEEE754Compatible=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/DocumentTypesSummary'\n            application/json;odata.metadata=full;odata.streaming=true;IEEE754Compatible=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/DocumentTypesSummary'\n            application/json;odata.metadata=full;odata.streaming=true;IEEE754Compatible=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/DocumentTypesSummary'\n            application/json;odata.metadata=full;odata.streaming=false;IEEE754Compatible=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/DocumentTypesSummary'\n            application/json;odata.metadata=full;odata.streaming=false;IEEE754Compatible=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/DocumentTypesSummary'\n            application/json;odata.metadata=full;IEEE754Compatible=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/DocumentTypesSummary'\n            application/json;odata.metadata=full;IEEE754Compatible=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/DocumentTypesSummary'\n            application/json;odata.metadata=none;odata.streaming=true;IEEE754Compatible=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/DocumentTypesSummary'\n            application/json;odata.metadata=none;odata.streaming=true;IEEE754Compatible=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/DocumentTypesSummary'\n            application/json;odata.metadata=none;odata.streaming=false;IEEE754Compatible=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/DocumentTypesSummary'\n            application/json;odata.metadata=none;odata.streaming=false;IEEE754Compatible=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/DocumentTypesSummary'\n            application/json;odata.metadata=none;IEEE754Compatible=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/DocumentTypesSummary'\n            application/json;odata.metadata=none;IEEE754Compatible=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/DocumentTypesSummary'\n            application/json;odata.streaming=true;IEEE754Compatible=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/DocumentTypesSummary'\n            application/json;odata.streaming=true;IEEE754Compatible=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/DocumentTypesSummary'\n            application/json;odata.streaming=false;IEEE754Compatible=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/DocumentTypesSummary'\n            application/json;odata.streaming=false;IEEE754Compatible=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/DocumentTypesSummary'\n            application/json;IEEE754Compatible=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/DocumentTypesSummary'\n            application/json;IEEE754Compatible=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/DocumentTypesSummary'\n            application/xml:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/DocumentTypesSummary'\n            text/plain:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/DocumentTypesSummary'\n            application/octet-stream:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/DocumentTypesSummary'\n            text/json:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/DocumentTypesSummary'\n  /api/v1/businesses:\n    post:\n      tags:\n        - Businesses\n      requestBody:\n        content:\n          application/json;odata.metadata=minimal;odata.streaming=true:\n            schema:\n              $ref: '#/components/schemas/BusinessCreateDto'\n          application/json;odata.metadata=minimal;odata.streaming=false:\n            schema:\n              $ref: '#/components/schemas/BusinessCreateDto'\n          application/json;odata.metadata=minimal:\n            schema:\n              $ref: '#/components/schemas/BusinessCreateDto'\n          application/json;odata.metadata=full;odata.streaming=true:\n            schema:\n              $ref: '#/components/schemas/BusinessCreateDto'\n          application/json;odata.metadata=full;odata.streaming=false:\n            schema:\n              $ref: '#/components/schemas/BusinessCreateDto'\n          application/json;odata.metadata=full:\n            schema:\n              $ref: '#/components/schemas/BusinessCreateDto'\n          application/json;odata.metadata=none;odata.streaming=true:\n            schema:\n              $ref: '#/components/schemas/BusinessCreateDto'\n          application/json;odata.metadata=none;odata.streaming=false:\n            schema:\n              $ref: '#/components/schemas/BusinessCreateDto'\n          application/json;odata.metadata=none:\n            schema:\n              $ref: '#/components/schemas/BusinessCreateDto'\n          application/json;odata.streaming=true:\n            schema:\n              $ref: '#/components/schemas/BusinessCreateDto'\n          application/json;odata.streaming=false:\n            schema:\n              $ref: '#/components/schemas/BusinessCreateDto'\n          application/json:\n            schema:\n              $ref: '#/components/schemas/BusinessCreateDto'\n          application/json;odata.metadata=minimal;odata.streaming=true;IEEE754Compatible=false:\n            schema:\n              $ref: '#/components/schemas/BusinessCreateDto'\n          application/json;odata.metadata=minimal;odata.streaming=true;IEEE754Compatible=true:\n            schema:\n              $ref: '#/components/schemas/BusinessCreateDto'\n          application/json;odata.metadata=minimal;odata.streaming=false;IEEE754Compatible=false:\n            schema:\n              $ref: '#/components/schemas/BusinessCreateDto'\n          application/json;odata.metadata=minimal;odata.streaming=false;IEEE754Compatible=true:\n            schema:\n              $ref: '#/components/schemas/BusinessCreateDto'\n          application/json;odata.metadata=minimal;IEEE754Compatible=false:\n            schema:\n              $ref: '#/components/schemas/BusinessCreateDto'\n          application/json;odata.metadata=minimal;IEEE754Compatible=true:\n            schema:\n              $ref: '#/components/schemas/BusinessCreateDto'\n          application/json;odata.metadata=full;odata.streaming=true;IEEE754Compatible=false:\n            schema:\n              $ref: '#/components/schemas/BusinessCreateDto'\n          application/json;odata.metadata=full;odata.streaming=true;IEEE754Compatible=true:\n            schema:\n              $ref: '#/components/schemas/BusinessCreateDto'\n          application/json;odata.metadata=full;odata.streaming=false;IEEE754Compatible=false:\n            schema:\n              $ref: '#/components/schemas/BusinessCreateDto'\n          application/json;odata.metadata=full;odata.streaming=false;IEEE754Compatible=true:\n            schema:\n              $ref: '#/components/schemas/BusinessCreateDto'\n          application/json;odata.metadata=full;IEEE754Compatible=false:\n            schema:\n              $ref: '#/components/schemas/BusinessCreateDto'\n          application/json;odata.metadata=full;IEEE754Compatible=true:\n            schema:\n              $ref: '#/components/schemas/BusinessCreateDto'\n          application/json;odata.metadata=none;odata.streaming=true;IEEE754Compatible=false:\n            schema:\n              $ref: '#/components/schemas/BusinessCreateDto'\n          application/json;odata.metadata=none;odata.streaming=true;IEEE754Compatible=true:\n            schema:\n              $ref: '#/components/schemas/BusinessCreateDto'\n          application/json;odata.metadata=none;odata.streaming=false;IEEE754Compatible=true:\n            schema:\n              $ref: '#/components/schemas/BusinessCreateDto'\n          application/json;odata.metadata=none;odata.streaming=false;IEEE754Compatible=false:\n            schema:\n              $ref: '#/components/schemas/BusinessCreateDto'\n          application/json;odata.metadata=none;IEEE754Compatible=false:\n            schema:\n              $ref: '#/components/schemas/BusinessCreateDto'\n          application/json;odata.metadata=none;IEEE754Compatible=true:\n            schema:\n              $ref: '#/components/schemas/BusinessCreateDto'\n          application/json;odata.streaming=true;IEEE754Compatible=false:\n            schema:\n              $ref: '#/components/schemas/BusinessCreateDto'\n          application/json;odata.streaming=true;IEEE754Compatible=true:\n            schema:\n              $ref: '#/components/schemas/BusinessCreateDto'\n          application/json;odata.streaming=false;IEEE754Compatible=false:\n            schema:\n              $ref: '#/components/schemas/BusinessCreateDto'\n          application/json;odata.streaming=false;IEEE754Compatible=true:\n            schema:\n              $ref: '#/components/schemas/BusinessCreateDto'\n          application/json;IEEE754Compatible=false:\n            schema:\n              $ref: '#/components/schemas/BusinessCreateDto'\n          application/json;IEEE754Compatible=true:\n            schema:\n              $ref: '#/components/schemas/BusinessCreateDto'\n          application/xml:\n            schema:\n              $ref: '#/components/schemas/BusinessCreateDto'\n          text/plain:\n            schema:\n              $ref: '#/components/schemas/BusinessCreateDto'\n          application/json-patch+json:\n            schema:\n              $ref: '#/components/schemas/BusinessCreateDto'\n          text/json:\n            schema:\n              $ref: '#/components/schemas/BusinessCreateDto'\n          application/*+json:\n            schema:\n              $ref: '#/components/schemas/BusinessCreateDto'\n      responses:\n        '200':\n          description: OK\n          content:\n            application/json;odata.metadata=minimal;odata.streaming=true:\n              schema:\n                $ref: '#/components/schemas/Business'\n            application/json;odata.metadata=minimal;odata.streaming=false:\n              schema:\n                $ref: '#/components/schemas/Business'\n            application/json;odata.metadata=minimal:\n              schema:\n                $ref: '#/components/schemas/Business'\n            application/json;odata.metadata=full;odata.streaming=true:\n              schema:\n                $ref: '#/components/schemas/Business'\n            application/json;odata.metadata=full;odata.streaming=false:\n              schema:\n                $ref: '#/components/schemas/Business'\n            application/json;odata.metadata=full:\n              schema:\n                $ref: '#/components/schemas/Business'\n            application/json;odata.metadata=none;odata.streaming=true:\n              schema:\n                $ref: '#/components/schemas/Business'\n            application/json;odata.metadata=none;odata.streaming=false:\n              schema:\n                $ref: '#/components/schemas/Business'\n            application/json;odata.metadata=none:\n              schema:\n                $ref: '#/components/schemas/Business'\n            application/json;odata.streaming=true:\n              schema:\n                $ref: '#/components/schemas/Business'\n            application/json;odata.streaming=false:\n              schema:\n                $ref: '#/components/schemas/Business'\n            application/json:\n              schema:\n                $ref: '#/components/schemas/Business'\n            application/json;odata.metadata=minimal;odata.streaming=true;IEEE754Compatible=false:\n              schema:\n                $ref: '#/components/schemas/Business'\n            application/json;odata.metadata=minimal;odata.streaming=true;IEEE754Compatible=true:\n              schema:\n                $ref: '#/components/schemas/Business'\n            application/json;odata.metadata=minimal;odata.streaming=false;IEEE754Compatible=false:\n              schema:\n                $ref: '#/components/schemas/Business'\n            application/json;odata.metadata=minimal;odata.streaming=false;IEEE754Compatible=true:\n              schema:\n                $ref: '#/components/schemas/Business'\n            application/json;odata.metadata=minimal;IEEE754Compatible=false:\n              schema:\n                $ref: '#/components/schemas/Business'\n            application/json;odata.metadata=minimal;IEEE754Compatible=true:\n              schema:\n                $ref: '#/components/schemas/Business'\n            application/json;odata.metadata=full;odata.streaming=true;IEEE754Compatible=false:\n              schema:\n                $ref: '#/components/schemas/Business'\n            application/json;odata.metadata=full;odata.streaming=true;IEEE754Compatible=true:\n              schema:\n                $ref: '#/components/schemas/Business'\n            application/json;odata.metadata=full;odata.streaming=false;IEEE754Compatible=false:\n              schema:\n                $ref: '#/components/schemas/Business'\n            application/json;odata.metadata=full;odata.streaming=false;IEEE754Compatible=true:\n              schema:\n                $ref: '#/components/schemas/Business'\n            application/json;odata.metadata=full;IEEE754Compatible=false:\n              schema:\n                $ref: '#/components/schemas/Business'\n            application/json;odata.metadata=full;IEEE754Compatible=true:\n              schema:\n                $ref: '#/components/schemas/Business'\n            application/json;odata.metadata=none;odata.streaming=true;IEEE754Compatible=false:\n              schema:\n                $ref: '#/components/schemas/Business'\n            application/json;odata.metadata=none;odata.streaming=true;IEEE754Compatible=true:\n              schema:\n                $ref: '#/components/schemas/Business'\n            application/json;odata.metadata=none;odata.streaming=false;IEEE754Compatible=true:\n              schema:\n                $ref: '#/components/schemas/Business'\n            application/json;odata.metadata=none;odata.streaming=false;IEEE754Compatible=false:\n              schema:\n                $ref: '#/components/schemas/Business'\n            application/json;odata.metadata=none;IEEE754Compatible=false:\n              schema:\n                $ref: '#/components/schemas/Business'\n            application/json;odata.metadata=none;IEEE754Compatible=true:\n              schema:\n                $ref: '#/components/schemas/Business'\n            application/json;odata.streaming=true;IEEE754Compatible=false:\n              schema:\n                $ref: '#/components/schemas/Business'\n            application/json;odata.streaming=true;IEEE754Compatible=true:\n              schema:\n                $ref: '#/components/schemas/Business'\n            application/json;odata.streaming=false;IEEE754Compatible=false:\n              schema:\n                $ref: '#/components/schemas/Business'\n            application/json;odata.streaming=false;IEEE754Compatible=true:\n              schema:\n                $ref: '#/components/schemas/Business'\n            application/json;IEEE754Compatible=false:\n              schema:\n                $ref: '#/components/schemas/Business'\n            application/json;IEEE754Compatible=true:\n              schema:\n                $ref: '#/components/schemas/Business'\n            application/xml:\n              schema:\n                $ref: '#/components/schemas/Business'\n            text/plain:\n              schema:\n                $ref: '#/components/schemas/Business'\n            application/octet-stream:\n              schema:\n                $ref: '#/components/schemas/Business'\n            text/json:\n              schema:\n                $ref: '#/components/schemas/Business'\n  /api/v1/businesses/{id}:\n    put:\n      tags:\n        - Businesses\n      parameters:\n        - name: id\n          in: path\n          required: true\n          schema:\n            type: integer\n            format: int32\n      requestBody:\n        content:\n          application/json;odata.metadata=minimal;odata.streaming=true:\n            schema:\n              $ref: '#/components/schemas/BusinessUpdateDto'\n          application/json;odata.metadata=minimal;odata.streaming=false:\n            schema:\n              $ref: '#/components/schemas/BusinessUpdateDto'\n          application/json;odata.metadata=minimal:\n            schema:\n              $ref: '#/components/schemas/BusinessUpdateDto'\n          application/json;odata.metadata=full;odata.streaming=true:\n            schema:\n              $ref: '#/components/schemas/BusinessUpdateDto'\n          application/json;odata.metadata=full;odata.streaming=false:\n            schema:\n              $ref: '#/components/schemas/BusinessUpdateDto'\n          application/json;odata.metadata=full:\n            schema:\n              $ref: '#/components/schemas/BusinessUpdateDto'\n          application/json;odata.metadata=none;odata.streaming=true:\n            schema:\n              $ref: '#/components/schemas/BusinessUpdateDto'\n          application/json;odata.metadata=none;odata.streaming=false:\n            schema:\n              $ref: '#/components/schemas/BusinessUpdateDto'\n          application/json;odata.metadata=none:\n            schema:\n              $ref: '#/components/schemas/BusinessUpdateDto'\n          application/json;odata.streaming=true:\n            schema:\n              $ref: '#/components/schemas/BusinessUpdateDto'\n          application/json;odata.streaming=false:\n            schema:\n              $ref: '#/components/schemas/BusinessUpdateDto'\n          application/json:\n            schema:\n              $ref: '#/components/schemas/BusinessUpdateDto'\n          application/json;odata.metadata=minimal;odata.streaming=true;IEEE754Compatible=false:\n            schema:\n              $ref: '#/components/schemas/BusinessUpdateDto'\n          application/json;odata.metadata=minimal;odata.streaming=true;IEEE754Compatible=true:\n            schema:\n              $ref: '#/components/schemas/BusinessUpdateDto'\n          application/json;odata.metadata=minimal;odata.streaming=false;IEEE754Compatible=false:\n            schema:\n              $ref: '#/components/schemas/BusinessUpdateDto'\n          application/json;odata.metadata=minimal;odata.streaming=false;IEEE754Compatible=true:\n            schema:\n              $ref: '#/components/schemas/BusinessUpdateDto'\n          application/json;odata.metadata=minimal;IEEE754Compatible=false:\n            schema:\n              $ref: '#/components/schemas/BusinessUpdateDto'\n          application/json;odata.metadata=minimal;IEEE754Compatible=true:\n            schema:\n              $ref: '#/components/schemas/BusinessUpdateDto'\n          application/json;odata.metadata=full;odata.streaming=true;IEEE754Compatible=false:\n            schema:\n              $ref: '#/components/schemas/BusinessUpdateDto'\n          application/json;odata.metadata=full;odata.streaming=true;IEEE754Compatible=true:\n            schema:\n              $ref: '#/components/schemas/BusinessUpdateDto'\n          application/json;odata.metadata=full;odata.streaming=false;IEEE754Compatible=false:\n            schema:\n              $ref: '#/components/schemas/BusinessUpdateDto'\n          application/json;odata.metadata=full;odata.streaming=false;IEEE754Compatible=true:\n            schema:\n              $ref: '#/components/schemas/BusinessUpdateDto'\n          application/json;odata.metadata=full;IEEE754Compatible=false:\n            schema:\n              $ref: '#/components/schemas/BusinessUpdateDto'\n          application/json;odata.metadata=full;IEEE754Compatible=true:\n            schema:\n              $ref: '#/components/schemas/BusinessUpdateDto'\n          application/json;odata.metadata=none;odata.streaming=true;IEEE754Compatible=false:\n            schema:\n              $ref: '#/components/schemas/BusinessUpdateDto'\n          application/json;odata.metadata=none;odata.streaming=true;IEEE754Compatible=true:\n            schema:\n              $ref: '#/components/schemas/BusinessUpdateDto'\n          application/json;odata.metadata=none;odata.streaming=false;IEEE754Compatible=true:\n            schema:\n              $ref: '#/components/schemas/BusinessUpdateDto'\n          application/json;odata.metadata=none;odata.streaming=false;IEEE754Compatible=false:\n            schema:\n              $ref: '#/components/schemas/BusinessUpdateDto'\n          application/json;odata.metadata=none;IEEE754Compatible=false:\n            schema:\n              $ref: '#/components/schemas/BusinessUpdateDto'\n          application/json;odata.metadata=none;IEEE754Compatible=true:\n            schema:\n              $ref: '#/components/schemas/BusinessUpdateDto'\n          application/json;odata.streaming=true;IEEE754Compatible=false:\n            schema:\n              $ref: '#/components/schemas/BusinessUpdateDto'\n          application/json;odata.streaming=true;IEEE754Compatible=true:\n            schema:\n              $ref: '#/components/schemas/BusinessUpdateDto'\n          application/json;odata.streaming=false;IEEE754Compatible=false:\n            schema:\n              $ref: '#/components/schemas/BusinessUpdateDto'\n          application/json;odata.streaming=false;IEEE754Compatible=true:\n            schema:\n              $ref: '#/components/schemas/BusinessUpdateDto'\n          application/json;IEEE754Compatible=false:\n            schema:\n              $ref: '#/components/schemas/BusinessUpdateDto'\n          application/json;IEEE754Compatible=true:\n            schema:\n              $ref: '#/components/schemas/BusinessUpdateDto'\n          application/xml:\n            schema:\n              $ref: '#/components/schemas/BusinessUpdateDto'\n          text/plain:\n            schema:\n              $ref: '#/components/schemas/BusinessUpdateDto'\n          application/json-patch+json:\n            schema:\n              $ref: '#/components/schemas/BusinessUpdateDto'\n          text/json:\n            schema:\n              $ref: '#/components/schemas/BusinessUpdateDto'\n          application/*+json:\n            schema:\n              $ref: '#/components/schemas/BusinessUpdateDto'\n      responses:\n        '200':\n          description: OK\n          content:\n            application/json;odata.metadata=minimal;odata.streaming=true:\n              schema:\n                $ref: '#/components/schemas/Business'\n            application/json;odata.metadata=minimal;odata.streaming=false:\n              schema:\n                $ref: '#/components/schemas/Business'\n            application/json;odata.metadata=minimal:\n              schema:\n                $ref: '#/components/schemas/Business'\n            application/json;odata.metadata=full;odata.streaming=true:\n              schema:\n                $ref: '#/components/schemas/Business'\n            application/json;odata.metadata=full;odata.streaming=false:\n              schema:\n                $ref: '#/components/schemas/Business'\n            application/json;odata.metadata=full:\n              schema:\n                $ref: '#/components/schemas/Business'\n            application/json;odata.metadata=none;odata.streaming=true:\n              schema:\n                $ref: '#/components/schemas/Business'\n            application/json;odata.metadata=none;odata.streaming=false:\n              schema:\n                $ref: '#/components/schemas/Business'\n            application/json;odata.metadata=none:\n              schema:\n                $ref: '#/components/schemas/Business'\n            application/json;odata.streaming=true:\n              schema:\n                $ref: '#/components/schemas/Business'\n            application/json;odata.streaming=false:\n              schema:\n                $ref: '#/components/schemas/Business'\n            application/json:\n              schema:\n                $ref: '#/components/schemas/Business'\n            application/json;odata.metadata=minimal;odata.streaming=true;IEEE754Compatible=false:\n              schema:\n                $ref: '#/components/schemas/Business'\n            application/json;odata.metadata=minimal;odata.streaming=true;IEEE754Compatible=true:\n              schema:\n                $ref: '#/components/schemas/Business'\n            application/json;odata.metadata=minimal;odata.streaming=false;IEEE754Compatible=false:\n              schema:\n                $ref: '#/components/schemas/Business'\n            application/json;odata.metadata=minimal;odata.streaming=false;IEEE754Compatible=true:\n              schema:\n                $ref: '#/components/schemas/Business'\n            application/json;odata.metadata=minimal;IEEE754Compatible=false:\n              schema:\n                $ref: '#/components/schemas/Business'\n            application/json;odata.metadata=minimal;IEEE754Compatible=true:\n              schema:\n                $ref: '#/components/schemas/Business'\n            application/json;odata.metadata=full;odata.streaming=true;IEEE754Compatible=false:\n              schema:\n                $ref: '#/components/schemas/Business'\n            application/json;odata.metadata=full;odata.streaming=true;IEEE754Compatible=true:\n              schema:\n                $ref: '#/components/schemas/Business'\n            application/json;odata.metadata=full;odata.streaming=false;IEEE754Compatible=false:\n              schema:\n                $ref: '#/components/schemas/Business'\n            application/json;odata.metadata=full;odata.streaming=false;IEEE754Compatible=true:\n              schema:\n                $ref: '#/components/schemas/Business'\n            application/json;odata.metadata=full;IEEE754Compatible=false:\n              schema:\n                $ref: '#/components/schemas/Business'\n            application/json;odata.metadata=full;IEEE754Compatible=true:\n              schema:\n                $ref: '#/components/schemas/Business'\n            application/json;odata.metadata=none;odata.streaming=true;IEEE754Compatible=false:\n              schema:\n                $ref: '#/components/schemas/Business'\n            application/json;odata.metadata=none;odata.streaming=true;IEEE754Compatible=true:\n              schema:\n                $ref: '#/components/schemas/Business'\n            application/json;odata.metadata=none;odata.streaming=false;IEEE754Compatible=true:\n              schema:\n                $ref: '#/components/schemas/Business'\n            application/json;odata.metadata=none;odata.streaming=false;IEEE754Compatible=false:\n              schema:\n                $ref: '#/components/schemas/Business'\n            application/json;odata.metadata=none;IEEE754Compatible=false:\n              schema:\n                $ref: '#/components/schemas/Business'\n            application/json;odata.metadata=none;IEEE754Compatible=true:\n              schema:\n                $ref: '#/components/schemas/Business'\n            application/json;odata.streaming=true;IEEE754Compatible=false:\n              schema:\n                $ref: '#/components/schemas/Business'\n            application/json;odata.streaming=true;IEEE754Compatible=true:\n              schema:\n                $ref: '#/components/schemas/Business'\n            application/json;odata.streaming=false;IEEE754Compatible=false:\n              schema:\n                $ref: '#/components/schemas/Business'\n            application/json;odata.streaming=false;IEEE754Compatible=true:\n              schema:\n                $ref: '#/components/schemas/Business'\n            application/json;IEEE754Compatible=false:\n              schema:\n                $ref: '#/components/schemas/Business'\n            application/json;IEEE754Compatible=true:\n              schema:\n                $ref: '#/components/schemas/Business'\n            application/xml:\n              schema:\n                $ref: '#/components/schemas/Business'\n            text/plain:\n              schema:\n                $ref: '#/components/schemas/Business'\n            application/octet-stream:\n              schema:\n                $ref: '#/components/schemas/Business'\n            text/json:\n              schema:\n                $ref: '#/components/schemas/Business'\n    delete:\n      tags:\n        - Businesses\n      parameters:\n        - name: id\n          in: path\n          required: true\n          schema:\n            type: integer\n            format: int32\n      responses:\n        '200':\n          description: OK\n  /api/v1/businesses/{id}/contact:\n    put:\n      tags:\n        - Businesses\n      parameters:\n        - name: id\n          in: path\n          required: true\n          schema:\n            type: integer\n            format: int32\n      requestBody:\n        content:\n          application/json;odata.metadata=minimal;odata.streaming=true:\n            schema:\n              $ref: '#/components/schemas/BusinessChangeContactDto'\n          application/json;odata.metadata=minimal;odata.streaming=false:\n            schema:\n              $ref: '#/components/schemas/BusinessChangeContactDto'\n          application/json;odata.metadata=minimal:\n            schema:\n              $ref: '#/components/schemas/BusinessChangeContactDto'\n          application/json;odata.metadata=full;odata.streaming=true:\n            schema:\n              $ref: '#/components/schemas/BusinessChangeContactDto'\n          application/json;odata.metadata=full;odata.streaming=false:\n            schema:\n              $ref: '#/components/schemas/BusinessChangeContactDto'\n          application/json;odata.metadata=full:\n            schema:\n              $ref: '#/components/schemas/BusinessChangeContactDto'\n          application/json;odata.metadata=none;odata.streaming=true:\n            schema:\n              $ref: '#/components/schemas/BusinessChangeContactDto'\n          application/json;odata.metadata=none;odata.streaming=false:\n            schema:\n              $ref: '#/components/schemas/BusinessChangeContactDto'\n          application/json;odata.metadata=none:\n            schema:\n              $ref: '#/components/schemas/BusinessChangeContactDto'\n          application/json;odata.streaming=true:\n            schema:\n              $ref: '#/components/schemas/BusinessChangeContactDto'\n          application/json;odata.streaming=false:\n            schema:\n              $ref: '#/components/schemas/BusinessChangeContactDto'\n          application/json:\n            schema:\n              $ref: '#/components/schemas/BusinessChangeContactDto'\n          application/json;odata.metadata=minimal;odata.streaming=true;IEEE754Compatible=false:\n            schema:\n              $ref: '#/components/schemas/BusinessChangeContactDto'\n          application/json;odata.metadata=minimal;odata.streaming=true;IEEE754Compatible=true:\n            schema:\n              $ref: '#/components/schemas/BusinessChangeContactDto'\n          application/json;odata.metadata=minimal;odata.streaming=false;IEEE754Compatible=false:\n            schema:\n              $ref: '#/components/schemas/BusinessChangeContactDto'\n          application/json;odata.metadata=minimal;odata.streaming=false;IEEE754Compatible=true:\n            schema:\n              $ref: '#/components/schemas/BusinessChangeContactDto'\n          application/json;odata.metadata=minimal;IEEE754Compatible=false:\n            schema:\n              $ref: '#/components/schemas/BusinessChangeContactDto'\n          application/json;odata.metadata=minimal;IEEE754Compatible=true:\n            schema:\n              $ref: '#/components/schemas/BusinessChangeContactDto'\n          application/json;odata.metadata=full;odata.streaming=true;IEEE754Compatible=false:\n            schema:\n              $ref: '#/components/schemas/BusinessChangeContactDto'\n          application/json;odata.metadata=full;odata.streaming=true;IEEE754Compatible=true:\n            schema:\n              $ref: '#/components/schemas/BusinessChangeContactDto'\n          application/json;odata.metadata=full;odata.streaming=false;IEEE754Compatible=false:\n            schema:\n              $ref: '#/components/schemas/BusinessChangeContactDto'\n          application/json;odata.metadata=full;odata.streaming=false;IEEE754Compatible=true:\n            schema:\n              $ref: '#/components/schemas/BusinessChangeContactDto'\n          application/json;odata.metadata=full;IEEE754Compatible=false:\n            schema:\n              $ref: '#/components/schemas/BusinessChangeContactDto'\n          application/json;odata.metadata=full;IEEE754Compatible=true:\n            schema:\n              $ref: '#/components/schemas/BusinessChangeContactDto'\n          application/json;odata.metadata=none;odata.streaming=true;IEEE754Compatible=false:\n            schema:\n              $ref: '#/components/schemas/BusinessChangeContactDto'\n          application/json;odata.metadata=none;odata.streaming=true;IEEE754Compatible=true:\n            schema:\n              $ref: '#/components/schemas/BusinessChangeContactDto'\n          application/json;odata.metadata=none;odata.streaming=false;IEEE754Compatible=true:\n            schema:\n              $ref: '#/components/schemas/BusinessChangeContactDto'\n          application/json;odata.metadata=none;odata.streaming=false;IEEE754Compatible=false:\n            schema:\n              $ref: '#/components/schemas/BusinessChangeContactDto'\n          application/json;odata.metadata=none;IEEE754Compatible=false:\n            schema:\n              $ref: '#/components/schemas/BusinessChangeContactDto'\n          application/json;odata.metadata=none;IEEE754Compatible=true:\n            schema:\n              $ref: '#/components/schemas/BusinessChangeContactDto'\n          application/json;odata.streaming=true;IEEE754Compatible=false:\n            schema:\n              $ref: '#/components/schemas/BusinessChangeContactDto'\n          application/json;odata.streaming=true;IEEE754Compatible=true:\n            schema:\n              $ref: '#/components/schemas/BusinessChangeContactDto'\n          application/json;odata.streaming=false;IEEE754Compatible=false:\n            schema:\n              $ref: '#/components/schemas/BusinessChangeContactDto'\n          application/json;odata.streaming=false;IEEE754Compatible=true:\n            schema:\n              $ref: '#/components/schemas/BusinessChangeContactDto'\n          application/json;IEEE754Compatible=false:\n            schema:\n              $ref: '#/components/schemas/BusinessChangeContactDto'\n          application/json;IEEE754Compatible=true:\n            schema:\n              $ref: '#/components/schemas/BusinessChangeContactDto'\n          application/xml:\n            schema:\n              $ref: '#/components/schemas/BusinessChangeContactDto'\n          text/plain:\n            schema:\n              $ref: '#/components/schemas/BusinessChangeContactDto'\n          application/json-patch+json:\n            schema:\n              $ref: '#/components/schemas/BusinessChangeContactDto'\n          text/json:\n            schema:\n              $ref: '#/components/schemas/BusinessChangeContactDto'\n          application/*+json:\n            schema:\n              $ref: '#/components/schemas/BusinessChangeContactDto'\n      responses:\n        '200':\n          description: OK\n  /api/v1/businesses/{id}/disconnect:\n    post:\n      tags:\n        - Businesses\n      parameters:\n        - name: id\n          in: path\n          required: true\n          schema:\n            type: integer\n            format: int32\n      responses:\n        '200':\n          description: OK\n          content:\n            application/json;odata.metadata=minimal;odata.streaming=true:\n              schema:\n                $ref: '#/components/schemas/Business'\n            application/json;odata.metadata=minimal;odata.streaming=false:\n              schema:\n                $ref: '#/components/schemas/Business'\n            application/json;odata.metadata=minimal:\n              schema:\n                $ref: '#/components/schemas/Business'\n            application/json;odata.metadata=full;odata.streaming=true:\n              schema:\n                $ref: '#/components/schemas/Business'\n            application/json;odata.metadata=full;odata.streaming=false:\n              schema:\n                $ref: '#/components/schemas/Business'\n            application/json;odata.metadata=full:\n              schema:\n                $ref: '#/components/schemas/Business'\n            application/json;odata.metadata=none;odata.streaming=true:\n              schema:\n                $ref: '#/components/schemas/Business'\n            application/json;odata.metadata=none;odata.streaming=false:\n              schema:\n                $ref: '#/components/schemas/Business'\n            application/json;odata.metadata=none:\n              schema:\n                $ref: '#/components/schemas/Business'\n            application/json;odata.streaming=true:\n              schema:\n                $ref: '#/components/schemas/Business'\n            application/json;odata.streaming=false:\n              schema:\n                $ref: '#/components/schemas/Business'\n            application/json:\n              schema:\n                $ref: '#/components/schemas/Business'\n            application/json;odata.metadata=minimal;odata.streaming=true;IEEE754Compatible=false:\n              schema:\n                $ref: '#/components/schemas/Business'\n            application/json;odata.metadata=minimal;odata.streaming=true;IEEE754Compatible=true:\n              schema:\n                $ref: '#/components/schemas/Business'\n            application/json;odata.metadata=minimal;odata.streaming=false;IEEE754Compatible=false:\n              schema:\n                $ref: '#/components/schemas/Business'\n            application/json;odata.metadata=minimal;odata.streaming=false;IEEE754Compatible=true:\n              schema:\n                $ref: '#/components/schemas/Business'\n            application/json;odata.metadata=minimal;IEEE754Compatible=false:\n              schema:\n                $ref: '#/components/schemas/Business'\n            application/json;odata.metadata=minimal;IEEE754Compatible=true:\n              schema:\n                $ref: '#/components/schemas/Business'\n            application/json;odata.metadata=full;odata.streaming=true;IEEE754Compatible=false:\n              schema:\n                $ref: '#/components/schemas/Business'\n            application/json;odata.metadata=full;odata.streaming=true;IEEE754Compatible=true:\n              schema:\n                $ref: '#/components/schemas/Business'\n            application/json;odata.metadata=full;odata.streaming=false;IEEE754Compatible=false:\n              schema:\n                $ref: '#/components/schemas/Business'\n            application/json;odata.metadata=full;odata.streaming=false;IEEE754Compatible=true:\n              schema:\n                $ref: '#/components/schemas/Business'\n            application/json;odata.metadata=full;IEEE754Compatible=false:\n              schema:\n                $ref: '#/components/schemas/Business'\n            application/json;odata.metadata=full;IEEE754Compatible=true:\n              schema:\n                $ref: '#/components/schemas/Business'\n            application/json;odata.metadata=none;odata.streaming=true;IEEE754Compatible=false:\n              schema:\n                $ref: '#/components/schemas/Business'\n            application/json;odata.metadata=none;odata.streaming=true;IEEE754Compatible=true:\n              schema:\n                $ref: '#/components/schemas/Business'\n            application/json;odata.metadata=none;odata.streaming=false;IEEE754Compatible=true:\n              schema:\n                $ref: '#/components/schemas/Business'\n            application/json;odata.metadata=none;odata.streaming=false;IEEE754Compatible=false:\n              schema:\n                $ref: '#/components/schemas/Business'\n            application/json;odata.metadata=none;IEEE754Compatible=false:\n              schema:\n                $ref: '#/components/schemas/Business'\n            application/json;odata.metadata=none;IEEE754Compatible=true:\n              schema:\n                $ref: '#/components/schemas/Business'\n            application/json;odata.streaming=true;IEEE754Compatible=false:\n              schema:\n                $ref: '#/components/schemas/Business'\n            application/json;odata.streaming=true;IEEE754Compatible=true:\n              schema:\n                $ref: '#/components/schemas/Business'\n            application/json;odata.streaming=false;IEEE754Compatible=false:\n              schema:\n                $ref: '#/components/schemas/Business'\n            application/json;odata.streaming=false;IEEE754Compatible=true:\n              schema:\n                $ref: '#/components/schemas/Business'\n            application/json;IEEE754Compatible=false:\n              schema:\n                $ref: '#/components/schemas/Business'\n            application/json;IEEE754Compatible=true:\n              schema:\n                $ref: '#/components/schemas/Business'\n            application/xml:\n              schema:\n                $ref: '#/components/schemas/Business'\n            text/plain:\n              schema:\n                $ref: '#/components/schemas/Business'\n            application/octet-stream:\n              schema:\n                $ref: '#/components/schemas/Business'\n            text/json:\n              schema:\n                $ref: '#/components/schemas/Business'\n  /api/v1/odata/Businesses:\n    get:\n      tags:\n        - Businesses\n      operationId: api/v{version:apiVersion}/odata/Businesses\n      parameters:\n        - name: accountants\n          in: query\n          schema:\n            type: array\n            items:\n              type: integer\n              format: int32\n        - name: select\n          in: query\n          description: Limits the properties returned in the result.\n          schema:\n            type: string\n        - name: expand\n          in: query\n          description: Indicates the related entities to be represented inline. The\n            maximum depth is 2.\n          schema:\n            type: string\n        - name: filter\n          in: query\n          description: 'Restricts the set of items returned. The maximum number of\n            expressions is 100. The allowed functions are: allfunctions.'\n          schema:\n            type: string\n        - name: orderby\n          in: query\n          description: Specifies the order in which items are returned. The maximum number\n            of expressions is 5.\n          schema:\n            type: string\n        - name: top\n          in: query\n          description: Limits the number of items returned from a collection. The maximum\n            value is 100.\n          schema:\n            type: integer\n            format: int32\n        - name: skip\n          in: query\n          description: Excludes the specified number of items of the queried collection\n            from the result.\n          schema:\n            type: integer\n            format: int32\n        - name: count\n          in: query\n          description: Indicates whether the total count of items within a collection are\n            returned in the result.\n          schema:\n            type: boolean\n            default: false\n      responses:\n        '200':\n          description: OK\n          content:\n            application/json;odata.metadata=minimal;odata.streaming=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/Business'\n            application/json;odata.metadata=minimal;odata.streaming=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/Business'\n            application/json;odata.metadata=minimal:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/Business'\n            application/json;odata.metadata=full;odata.streaming=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/Business'\n            application/json;odata.metadata=full;odata.streaming=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/Business'\n            application/json;odata.metadata=full:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/Business'\n            application/json;odata.metadata=none;odata.streaming=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/Business'\n            application/json;odata.metadata=none;odata.streaming=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/Business'\n            application/json;odata.metadata=none:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/Business'\n            application/json;odata.streaming=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/Business'\n            application/json;odata.streaming=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/Business'\n            application/json:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/Business'\n            application/json;odata.metadata=minimal;odata.streaming=true;IEEE754Compatible=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/Business'\n            application/json;odata.metadata=minimal;odata.streaming=true;IEEE754Compatible=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/Business'\n            application/json;odata.metadata=minimal;odata.streaming=false;IEEE754Compatible=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/Business'\n            application/json;odata.metadata=minimal;odata.streaming=false;IEEE754Compatible=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/Business'\n            application/json;odata.metadata=minimal;IEEE754Compatible=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/Business'\n            application/json;odata.metadata=minimal;IEEE754Compatible=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/Business'\n            application/json;odata.metadata=full;odata.streaming=true;IEEE754Compatible=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/Business'\n            application/json;odata.metadata=full;odata.streaming=true;IEEE754Compatible=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/Business'\n            application/json;odata.metadata=full;odata.streaming=false;IEEE754Compatible=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/Business'\n            application/json;odata.metadata=full;odata.streaming=false;IEEE754Compatible=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/Business'\n            application/json;odata.metadata=full;IEEE754Compatible=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/Business'\n            application/json;odata.metadata=full;IEEE754Compatible=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/Business'\n            application/json;odata.metadata=none;odata.streaming=true;IEEE754Compatible=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/Business'\n            application/json;odata.metadata=none;odata.streaming=true;IEEE754Compatible=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/Business'\n            application/json;odata.metadata=none;odata.streaming=false;IEEE754Compatible=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/Business'\n            application/json;odata.metadata=none;odata.streaming=false;IEEE754Compatible=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/Business'\n            application/json;odata.metadata=none;IEEE754Compatible=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/Business'\n            application/json;odata.metadata=none;IEEE754Compatible=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/Business'\n            application/json;odata.streaming=true;IEEE754Compatible=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/Business'\n            application/json;odata.streaming=true;IEEE754Compatible=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/Business'\n            application/json;odata.streaming=false;IEEE754Compatible=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/Business'\n            application/json;odata.streaming=false;IEEE754Compatible=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/Business'\n            application/json;IEEE754Compatible=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/Business'\n            application/json;IEEE754Compatible=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/Business'\n            application/xml:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/Business'\n            text/plain:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/Business'\n            application/octet-stream:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/Business'\n            text/json:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/Business'\n  /api/v1/odata/Businesses/$count:\n    get:\n      tags:\n        - Businesses\n      operationId: api/v{version:apiVersion}/odata/Businesses/$count\n      parameters:\n        - name: accountants\n          in: query\n          schema:\n            type: array\n            items:\n              type: integer\n              format: int32\n        - name: select\n          in: query\n          description: Limits the properties returned in the result.\n          schema:\n            type: string\n        - name: expand\n          in: query\n          description: Indicates the related entities to be represented inline. The\n            maximum depth is 2.\n          schema:\n            type: string\n        - name: filter\n          in: query\n          description: 'Restricts the set of items returned. The maximum number of\n            expressions is 100. The allowed functions are: allfunctions.'\n          schema:\n            type: string\n        - name: orderby\n          in: query\n          description: Specifies the order in which items are returned. The maximum number\n            of expressions is 5.\n          schema:\n            type: string\n        - name: top\n          in: query\n          description: Limits the number of items returned from a collection. The maximum\n            value is 100.\n          schema:\n            type: integer\n            format: int32\n        - name: skip\n          in: query\n          description: Excludes the specified number of items of the queried collection\n            from the result.\n          schema:\n            type: integer\n            format: int32\n        - name: count\n          in: query\n          description: Indicates whether the total count of items within a collection are\n            returned in the result.\n          schema:\n            type: boolean\n            default: false\n      responses:\n        '200':\n          description: OK\n          content:\n            application/json;odata.metadata=minimal;odata.streaming=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/Business'\n            application/json;odata.metadata=minimal;odata.streaming=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/Business'\n            application/json;odata.metadata=minimal:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/Business'\n            application/json;odata.metadata=full;odata.streaming=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/Business'\n            application/json;odata.metadata=full;odata.streaming=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/Business'\n            application/json;odata.metadata=full:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/Business'\n            application/json;odata.metadata=none;odata.streaming=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/Business'\n            application/json;odata.metadata=none;odata.streaming=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/Business'\n            application/json;odata.metadata=none:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/Business'\n            application/json;odata.streaming=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/Business'\n            application/json;odata.streaming=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/Business'\n            application/json:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/Business'\n            application/json;odata.metadata=minimal;odata.streaming=true;IEEE754Compatible=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/Business'\n            application/json;odata.metadata=minimal;odata.streaming=true;IEEE754Compatible=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/Business'\n            application/json;odata.metadata=minimal;odata.streaming=false;IEEE754Compatible=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/Business'\n            application/json;odata.metadata=minimal;odata.streaming=false;IEEE754Compatible=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/Business'\n            application/json;odata.metadata=minimal;IEEE754Compatible=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/Business'\n            application/json;odata.metadata=minimal;IEEE754Compatible=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/Business'\n            application/json;odata.metadata=full;odata.streaming=true;IEEE754Compatible=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/Business'\n            application/json;odata.metadata=full;odata.streaming=true;IEEE754Compatible=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/Business'\n            application/json;odata.metadata=full;odata.streaming=false;IEEE754Compatible=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/Business'\n            application/json;odata.metadata=full;odata.streaming=false;IEEE754Compatible=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/Business'\n            application/json;odata.metadata=full;IEEE754Compatible=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/Business'\n            application/json;odata.metadata=full;IEEE754Compatible=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/Business'\n            application/json;odata.metadata=none;odata.streaming=true;IEEE754Compatible=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/Business'\n            application/json;odata.metadata=none;odata.streaming=true;IEEE754Compatible=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/Business'\n            application/json;odata.metadata=none;odata.streaming=false;IEEE754Compatible=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/Business'\n            application/json;odata.metadata=none;odata.streaming=false;IEEE754Compatible=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/Business'\n            application/json;odata.metadata=none;IEEE754Compatible=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/Business'\n            application/json;odata.metadata=none;IEEE754Compatible=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/Business'\n            application/json;odata.streaming=true;IEEE754Compatible=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/Business'\n            application/json;odata.streaming=true;IEEE754Compatible=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/Business'\n            application/json;odata.streaming=false;IEEE754Compatible=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/Business'\n            application/json;odata.streaming=false;IEEE754Compatible=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/Business'\n            application/json;IEEE754Compatible=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/Business'\n            application/json;IEEE754Compatible=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/Business'\n            application/xml:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/Business'\n            text/plain:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/Business'\n            application/octet-stream:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/Business'\n            text/json:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/Business'\n  /api/v1/odata/Businesses({key}):\n    get:\n      tags:\n        - Businesses\n      operationId: api/v{version:apiVersion}/odata/Businesses({key})\n      parameters:\n        - name: key\n          in: query\n          schema:\n            type: integer\n            format: int32\n        - name: select\n          in: query\n          description: Limits the properties returned in the result.\n          schema:\n            type: string\n        - name: expand\n          in: query\n          description: Indicates the related entities to be represented inline. The\n            maximum depth is 2.\n          schema:\n            type: string\n      responses:\n        '200':\n          description: OK\n          content:\n            application/json;odata.metadata=minimal;odata.streaming=true:\n              schema:\n                $ref: '#/components/schemas/Business'\n            application/json;odata.metadata=minimal;odata.streaming=false:\n              schema:\n                $ref: '#/components/schemas/Business'\n            application/json;odata.metadata=minimal:\n              schema:\n                $ref: '#/components/schemas/Business'\n            application/json;odata.metadata=full;odata.streaming=true:\n              schema:\n                $ref: '#/components/schemas/Business'\n            application/json;odata.metadata=full;odata.streaming=false:\n              schema:\n                $ref: '#/components/schemas/Business'\n            application/json;odata.metadata=full:\n              schema:\n                $ref: '#/components/schemas/Business'\n            application/json;odata.metadata=none;odata.streaming=true:\n              schema:\n                $ref: '#/components/schemas/Business'\n            application/json;odata.metadata=none;odata.streaming=false:\n              schema:\n                $ref: '#/components/schemas/Business'\n            application/json;odata.metadata=none:\n              schema:\n                $ref: '#/components/schemas/Business'\n            application/json;odata.streaming=true:\n              schema:\n                $ref: '#/components/schemas/Business'\n            application/json;odata.streaming=false:\n              schema:\n                $ref: '#/components/schemas/Business'\n            application/json:\n              schema:\n                $ref: '#/components/schemas/Business'\n            application/json;odata.metadata=minimal;odata.streaming=true;IEEE754Compatible=false:\n              schema:\n                $ref: '#/components/schemas/Business'\n            application/json;odata.metadata=minimal;odata.streaming=true;IEEE754Compatible=true:\n              schema:\n                $ref: '#/components/schemas/Business'\n            application/json;odata.metadata=minimal;odata.streaming=false;IEEE754Compatible=false:\n              schema:\n                $ref: '#/components/schemas/Business'\n            application/json;odata.metadata=minimal;odata.streaming=false;IEEE754Compatible=true:\n              schema:\n                $ref: '#/components/schemas/Business'\n            application/json;odata.metadata=minimal;IEEE754Compatible=false:\n              schema:\n                $ref: '#/components/schemas/Business'\n            application/json;odata.metadata=minimal;IEEE754Compatible=true:\n              schema:\n                $ref: '#/components/schemas/Business'\n            application/json;odata.metadata=full;odata.streaming=true;IEEE754Compatible=false:\n              schema:\n                $ref: '#/components/schemas/Business'\n            application/json;odata.metadata=full;odata.streaming=true;IEEE754Compatible=true:\n              schema:\n                $ref: '#/components/schemas/Business'\n            application/json;odata.metadata=full;odata.streaming=false;IEEE754Compatible=false:\n              schema:\n                $ref: '#/components/schemas/Business'\n            application/json;odata.metadata=full;odata.streaming=false;IEEE754Compatible=true:\n              schema:\n                $ref: '#/components/schemas/Business'\n            application/json;odata.metadata=full;IEEE754Compatible=false:\n              schema:\n                $ref: '#/components/schemas/Business'\n            application/json;odata.metadata=full;IEEE754Compatible=true:\n              schema:\n                $ref: '#/components/schemas/Business'\n            application/json;odata.metadata=none;odata.streaming=true;IEEE754Compatible=false:\n              schema:\n                $ref: '#/components/schemas/Business'\n            application/json;odata.metadata=none;odata.streaming=true;IEEE754Compatible=true:\n              schema:\n                $ref: '#/components/schemas/Business'\n            application/json;odata.metadata=none;odata.streaming=false;IEEE754Compatible=true:\n              schema:\n                $ref: '#/components/schemas/Business'\n            application/json;odata.metadata=none;odata.streaming=false;IEEE754Compatible=false:\n              schema:\n                $ref: '#/components/schemas/Business'\n            application/json;odata.metadata=none;IEEE754Compatible=false:\n              schema:\n                $ref: '#/components/schemas/Business'\n            application/json;odata.metadata=none;IEEE754Compatible=true:\n              schema:\n                $ref: '#/components/schemas/Business'\n            application/json;odata.streaming=true;IEEE754Compatible=false:\n              schema:\n                $ref: '#/components/schemas/Business'\n            application/json;odata.streaming=true;IEEE754Compatible=true:\n              schema:\n                $ref: '#/components/schemas/Business'\n            application/json;odata.streaming=false;IEEE754Compatible=false:\n              schema:\n                $ref: '#/components/schemas/Business'\n            application/json;odata.streaming=false;IEEE754Compatible=true:\n              schema:\n                $ref: '#/components/schemas/Business'\n            application/json;IEEE754Compatible=false:\n              schema:\n                $ref: '#/components/schemas/Business'\n            application/json;IEEE754Compatible=true:\n              schema:\n                $ref: '#/components/schemas/Business'\n            application/xml:\n              schema:\n                $ref: '#/components/schemas/Business'\n            text/plain:\n              schema:\n                $ref: '#/components/schemas/Business'\n            application/octet-stream:\n              schema:\n                $ref: '#/components/schemas/Business'\n            text/json:\n              schema:\n                $ref: '#/components/schemas/Business'\n  /api/v1/odata/Businesses/{key}:\n    get:\n      tags:\n        - Businesses\n      operationId: api/v{version:apiVersion}/odata/Businesses/{key}\n      parameters:\n        - name: key\n          in: query\n          schema:\n            type: integer\n            format: int32\n        - name: select\n          in: query\n          description: Limits the properties returned in the result.\n          schema:\n            type: string\n        - name: expand\n          in: query\n          description: Indicates the related entities to be represented inline. The\n            maximum depth is 2.\n          schema:\n            type: string\n      responses:\n        '200':\n          description: OK\n          content:\n            application/json;odata.metadata=minimal;odata.streaming=true:\n              schema:\n                $ref: '#/components/schemas/Business'\n            application/json;odata.metadata=minimal;odata.streaming=false:\n              schema:\n                $ref: '#/components/schemas/Business'\n            application/json;odata.metadata=minimal:\n              schema:\n                $ref: '#/components/schemas/Business'\n            application/json;odata.metadata=full;odata.streaming=true:\n              schema:\n                $ref: '#/components/schemas/Business'\n            application/json;odata.metadata=full;odata.streaming=false:\n              schema:\n                $ref: '#/components/schemas/Business'\n            application/json;odata.metadata=full:\n              schema:\n                $ref: '#/components/schemas/Business'\n            application/json;odata.metadata=none;odata.streaming=true:\n              schema:\n                $ref: '#/components/schemas/Business'\n            application/json;odata.metadata=none;odata.streaming=false:\n              schema:\n                $ref: '#/components/schemas/Business'\n            application/json;odata.metadata=none:\n              schema:\n                $ref: '#/components/schemas/Business'\n            application/json;odata.streaming=true:\n              schema:\n                $ref: '#/components/schemas/Business'\n            application/json;odata.streaming=false:\n              schema:\n                $ref: '#/components/schemas/Business'\n            application/json:\n              schema:\n                $ref: '#/components/schemas/Business'\n            application/json;odata.metadata=minimal;odata.streaming=true;IEEE754Compatible=false:\n              schema:\n                $ref: '#/components/schemas/Business'\n            application/json;odata.metadata=minimal;odata.streaming=true;IEEE754Compatible=true:\n              schema:\n                $ref: '#/components/schemas/Business'\n            application/json;odata.metadata=minimal;odata.streaming=false;IEEE754Compatible=false:\n              schema:\n                $ref: '#/components/schemas/Business'\n            application/json;odata.metadata=minimal;odata.streaming=false;IEEE754Compatible=true:\n              schema:\n                $ref: '#/components/schemas/Business'\n            application/json;odata.metadata=minimal;IEEE754Compatible=false:\n              schema:\n                $ref: '#/components/schemas/Business'\n            application/json;odata.metadata=minimal;IEEE754Compatible=true:\n              schema:\n                $ref: '#/components/schemas/Business'\n            application/json;odata.metadata=full;odata.streaming=true;IEEE754Compatible=false:\n              schema:\n                $ref: '#/components/schemas/Business'\n            application/json;odata.metadata=full;odata.streaming=true;IEEE754Compatible=true:\n              schema:\n                $ref: '#/components/schemas/Business'\n            application/json;odata.metadata=full;odata.streaming=false;IEEE754Compatible=false:\n              schema:\n                $ref: '#/components/schemas/Business'\n            application/json;odata.metadata=full;odata.streaming=false;IEEE754Compatible=true:\n              schema:\n                $ref: '#/components/schemas/Business'\n            application/json;odata.metadata=full;IEEE754Compatible=false:\n              schema:\n                $ref: '#/components/schemas/Business'\n            application/json;odata.metadata=full;IEEE754Compatible=true:\n              schema:\n                $ref: '#/components/schemas/Business'\n            application/json;odata.metadata=none;odata.streaming=true;IEEE754Compatible=false:\n              schema:\n                $ref: '#/components/schemas/Business'\n            application/json;odata.metadata=none;odata.streaming=true;IEEE754Compatible=true:\n              schema:\n                $ref: '#/components/schemas/Business'\n            application/json;odata.metadata=none;odata.streaming=false;IEEE754Compatible=true:\n              schema:\n                $ref: '#/components/schemas/Business'\n            application/json;odata.metadata=none;odata.streaming=false;IEEE754Compatible=false:\n              schema:\n                $ref: '#/components/schemas/Business'\n            application/json;odata.metadata=none;IEEE754Compatible=false:\n              schema:\n                $ref: '#/components/schemas/Business'\n            application/json;odata.metadata=none;IEEE754Compatible=true:\n              schema:\n                $ref: '#/components/schemas/Business'\n            application/json;odata.streaming=true;IEEE754Compatible=false:\n              schema:\n                $ref: '#/components/schemas/Business'\n            application/json;odata.streaming=true;IEEE754Compatible=true:\n              schema:\n                $ref: '#/components/schemas/Business'\n            application/json;odata.streaming=false;IEEE754Compatible=false:\n              schema:\n                $ref: '#/components/schemas/Business'\n            application/json;odata.streaming=false;IEEE754Compatible=true:\n              schema:\n                $ref: '#/components/schemas/Business'\n            application/json;IEEE754Compatible=false:\n              schema:\n                $ref: '#/components/schemas/Business'\n            application/json;IEEE754Compatible=true:\n              schema:\n                $ref: '#/components/schemas/Business'\n            application/xml:\n              schema:\n                $ref: '#/components/schemas/Business'\n            text/plain:\n              schema:\n                $ref: '#/components/schemas/Business'\n            application/octet-stream:\n              schema:\n                $ref: '#/components/schemas/Business'\n            text/json:\n              schema:\n                $ref: '#/components/schemas/Business'\n  /api/v1/business-memberships:\n    put:\n      tags:\n        - BusinessesMemberships\n      requestBody:\n        content:\n          application/json;odata.metadata=minimal;odata.streaming=true:\n            schema:\n              $ref: '#/components/schemas/BusinessMembershipUpsertDto'\n          application/json;odata.metadata=minimal;odata.streaming=false:\n            schema:\n              $ref: '#/components/schemas/BusinessMembershipUpsertDto'\n          application/json;odata.metadata=minimal:\n            schema:\n              $ref: '#/components/schemas/BusinessMembershipUpsertDto'\n          application/json;odata.metadata=full;odata.streaming=true:\n            schema:\n              $ref: '#/components/schemas/BusinessMembershipUpsertDto'\n          application/json;odata.metadata=full;odata.streaming=false:\n            schema:\n              $ref: '#/components/schemas/BusinessMembershipUpsertDto'\n          application/json;odata.metadata=full:\n            schema:\n              $ref: '#/components/schemas/BusinessMembershipUpsertDto'\n          application/json;odata.metadata=none;odata.streaming=true:\n            schema:\n              $ref: '#/components/schemas/BusinessMembershipUpsertDto'\n          application/json;odata.metadata=none;odata.streaming=false:\n            schema:\n              $ref: '#/components/schemas/BusinessMembershipUpsertDto'\n          application/json;odata.metadata=none:\n            schema:\n              $ref: '#/components/schemas/BusinessMembershipUpsertDto'\n          application/json;odata.streaming=true:\n            schema:\n              $ref: '#/components/schemas/BusinessMembershipUpsertDto'\n          application/json;odata.streaming=false:\n            schema:\n              $ref: '#/components/schemas/BusinessMembershipUpsertDto'\n          application/json:\n            schema:\n              $ref: '#/components/schemas/BusinessMembershipUpsertDto'\n          application/json;odata.metadata=minimal;odata.streaming=true;IEEE754Compatible=false:\n            schema:\n              $ref: '#/components/schemas/BusinessMembershipUpsertDto'\n          application/json;odata.metadata=minimal;odata.streaming=true;IEEE754Compatible=true:\n            schema:\n              $ref: '#/components/schemas/BusinessMembershipUpsertDto'\n          application/json;odata.metadata=minimal;odata.streaming=false;IEEE754Compatible=false:\n            schema:\n              $ref: '#/components/schemas/BusinessMembershipUpsertDto'\n          application/json;odata.metadata=minimal;odata.streaming=false;IEEE754Compatible=true:\n            schema:\n              $ref: '#/components/schemas/BusinessMembershipUpsertDto'\n          application/json;odata.metadata=minimal;IEEE754Compatible=false:\n            schema:\n              $ref: '#/components/schemas/BusinessMembershipUpsertDto'\n          application/json;odata.metadata=minimal;IEEE754Compatible=true:\n            schema:\n              $ref: '#/components/schemas/BusinessMembershipUpsertDto'\n          application/json;odata.metadata=full;odata.streaming=true;IEEE754Compatible=false:\n            schema:\n              $ref: '#/components/schemas/BusinessMembershipUpsertDto'\n          application/json;odata.metadata=full;odata.streaming=true;IEEE754Compatible=true:\n            schema:\n              $ref: '#/components/schemas/BusinessMembershipUpsertDto'\n          application/json;odata.metadata=full;odata.streaming=false;IEEE754Compatible=false:\n            schema:\n              $ref: '#/components/schemas/BusinessMembershipUpsertDto'\n          application/json;odata.metadata=full;odata.streaming=false;IEEE754Compatible=true:\n            schema:\n              $ref: '#/components/schemas/BusinessMembershipUpsertDto'\n          application/json;odata.metadata=full;IEEE754Compatible=false:\n            schema:\n              $ref: '#/components/schemas/BusinessMembershipUpsertDto'\n          application/json;odata.metadata=full;IEEE754Compatible=true:\n            schema:\n              $ref: '#/components/schemas/BusinessMembershipUpsertDto'\n          application/json;odata.metadata=none;odata.streaming=true;IEEE754Compatible=false:\n            schema:\n              $ref: '#/components/schemas/BusinessMembershipUpsertDto'\n          application/json;odata.metadata=none;odata.streaming=true;IEEE754Compatible=true:\n            schema:\n              $ref: '#/components/schemas/BusinessMembershipUpsertDto'\n          application/json;odata.metadata=none;odata.streaming=false;IEEE754Compatible=true:\n            schema:\n              $ref: '#/components/schemas/BusinessMembershipUpsertDto'\n          application/json;odata.metadata=none;odata.streaming=false;IEEE754Compatible=false:\n            schema:\n              $ref: '#/components/schemas/BusinessMembershipUpsertDto'\n          application/json;odata.metadata=none;IEEE754Compatible=false:\n            schema:\n              $ref: '#/components/schemas/BusinessMembershipUpsertDto'\n          application/json;odata.metadata=none;IEEE754Compatible=true:\n            schema:\n              $ref: '#/components/schemas/BusinessMembershipUpsertDto'\n          application/json;odata.streaming=true;IEEE754Compatible=false:\n            schema:\n              $ref: '#/components/schemas/BusinessMembershipUpsertDto'\n          application/json;odata.streaming=true;IEEE754Compatible=true:\n            schema:\n              $ref: '#/components/schemas/BusinessMembershipUpsertDto'\n          application/json;odata.streaming=false;IEEE754Compatible=false:\n            schema:\n              $ref: '#/components/schemas/BusinessMembershipUpsertDto'\n          application/json;odata.streaming=false;IEEE754Compatible=true:\n            schema:\n              $ref: '#/components/schemas/BusinessMembershipUpsertDto'\n          application/json;IEEE754Compatible=false:\n            schema:\n              $ref: '#/components/schemas/BusinessMembershipUpsertDto'\n          application/json;IEEE754Compatible=true:\n            schema:\n              $ref: '#/components/schemas/BusinessMembershipUpsertDto'\n          application/xml:\n            schema:\n              $ref: '#/components/schemas/BusinessMembershipUpsertDto'\n          text/plain:\n            schema:\n              $ref: '#/components/schemas/BusinessMembershipUpsertDto'\n          application/json-patch+json:\n            schema:\n              $ref: '#/components/schemas/BusinessMembershipUpsertDto'\n          text/json:\n            schema:\n              $ref: '#/components/schemas/BusinessMembershipUpsertDto'\n          application/*+json:\n            schema:\n              $ref: '#/components/schemas/BusinessMembershipUpsertDto'\n      responses:\n        '200':\n          description: OK\n          content:\n            application/json;odata.metadata=minimal;odata.streaming=true:\n              schema:\n                $ref: '#/components/schemas/BusinessMembershipDto'\n            application/json;odata.metadata=minimal;odata.streaming=false:\n              schema:\n                $ref: '#/components/schemas/BusinessMembershipDto'\n            application/json;odata.metadata=minimal:\n              schema:\n                $ref: '#/components/schemas/BusinessMembershipDto'\n            application/json;odata.metadata=full;odata.streaming=true:\n              schema:\n                $ref: '#/components/schemas/BusinessMembershipDto'\n            application/json;odata.metadata=full;odata.streaming=false:\n              schema:\n                $ref: '#/components/schemas/BusinessMembershipDto'\n            application/json;odata.metadata=full:\n              schema:\n                $ref: '#/components/schemas/BusinessMembershipDto'\n            application/json;odata.metadata=none;odata.streaming=true:\n              schema:\n                $ref: '#/components/schemas/BusinessMembershipDto'\n            application/json;odata.metadata=none;odata.streaming=false:\n              schema:\n                $ref: '#/components/schemas/BusinessMembershipDto'\n            application/json;odata.metadata=none:\n              schema:\n                $ref: '#/components/schemas/BusinessMembershipDto'\n            application/json;odata.streaming=true:\n              schema:\n                $ref: '#/components/schemas/BusinessMembershipDto'\n            application/json;odata.streaming=false:\n              schema:\n                $ref: '#/components/schemas/BusinessMembershipDto'\n            application/json:\n              schema:\n                $ref: '#/components/schemas/BusinessMembershipDto'\n            application/json;odata.metadata=minimal;odata.streaming=true;IEEE754Compatible=false:\n              schema:\n                $ref: '#/components/schemas/BusinessMembershipDto'\n            application/json;odata.metadata=minimal;odata.streaming=true;IEEE754Compatible=true:\n              schema:\n                $ref: '#/components/schemas/BusinessMembershipDto'\n            application/json;odata.metadata=minimal;odata.streaming=false;IEEE754Compatible=false:\n              schema:\n                $ref: '#/components/schemas/BusinessMembershipDto'\n            application/json;odata.metadata=minimal;odata.streaming=false;IEEE754Compatible=true:\n              schema:\n                $ref: '#/components/schemas/BusinessMembershipDto'\n            application/json;odata.metadata=minimal;IEEE754Compatible=false:\n              schema:\n                $ref: '#/components/schemas/BusinessMembershipDto'\n            application/json;odata.metadata=minimal;IEEE754Compatible=true:\n              schema:\n                $ref: '#/components/schemas/BusinessMembershipDto'\n            application/json;odata.metadata=full;odata.streaming=true;IEEE754Compatible=false:\n              schema:\n                $ref: '#/components/schemas/BusinessMembershipDto'\n            application/json;odata.metadata=full;odata.streaming=true;IEEE754Compatible=true:\n              schema:\n                $ref: '#/components/schemas/BusinessMembershipDto'\n            application/json;odata.metadata=full;odata.streaming=false;IEEE754Compatible=false:\n              schema:\n                $ref: '#/components/schemas/BusinessMembershipDto'\n            application/json;odata.metadata=full;odata.streaming=false;IEEE754Compatible=true:\n              schema:\n                $ref: '#/components/schemas/BusinessMembershipDto'\n            application/json;odata.metadata=full;IEEE754Compatible=false:\n              schema:\n                $ref: '#/components/schemas/BusinessMembershipDto'\n            application/json;odata.metadata=full;IEEE754Compatible=true:\n              schema:\n                $ref: '#/components/schemas/BusinessMembershipDto'\n            application/json;odata.metadata=none;odata.streaming=true;IEEE754Compatible=false:\n              schema:\n                $ref: '#/components/schemas/BusinessMembershipDto'\n            application/json;odata.metadata=none;odata.streaming=true;IEEE754Compatible=true:\n              schema:\n                $ref: '#/components/schemas/BusinessMembershipDto'\n            application/json;odata.metadata=none;odata.streaming=false;IEEE754Compatible=true:\n              schema:\n                $ref: '#/components/schemas/BusinessMembershipDto'\n            application/json;odata.metadata=none;odata.streaming=false;IEEE754Compatible=false:\n              schema:\n                $ref: '#/components/schemas/BusinessMembershipDto'\n            application/json;odata.metadata=none;IEEE754Compatible=false:\n              schema:\n                $ref: '#/components/schemas/BusinessMembershipDto'\n            application/json;odata.metadata=none;IEEE754Compatible=true:\n              schema:\n                $ref: '#/components/schemas/BusinessMembershipDto'\n            application/json;odata.streaming=true;IEEE754Compatible=false:\n              schema:\n                $ref: '#/components/schemas/BusinessMembershipDto'\n            application/json;odata.streaming=true;IEEE754Compatible=true:\n              schema:\n                $ref: '#/components/schemas/BusinessMembershipDto'\n            application/json;odata.streaming=false;IEEE754Compatible=false:\n              schema:\n                $ref: '#/components/schemas/BusinessMembershipDto'\n            application/json;odata.streaming=false;IEEE754Compatible=true:\n              schema:\n                $ref: '#/components/schemas/BusinessMembershipDto'\n            application/json;IEEE754Compatible=false:\n              schema:\n                $ref: '#/components/schemas/BusinessMembershipDto'\n            application/json;IEEE754Compatible=true:\n              schema:\n                $ref: '#/components/schemas/BusinessMembershipDto'\n            application/xml:\n              schema:\n                $ref: '#/components/schemas/BusinessMembershipDto'\n            text/plain:\n              schema:\n                $ref: '#/components/schemas/BusinessMembershipDto'\n            application/octet-stream:\n              schema:\n                $ref: '#/components/schemas/BusinessMembershipDto'\n            text/json:\n              schema:\n                $ref: '#/components/schemas/BusinessMembershipDto'\n  /api/v1/odata/BusinessSummaries:\n    get:\n      tags:\n        - BusinessSummaries\n      operationId: api/v{version:apiVersion}/odata/BusinessSummaries\n      parameters:\n        - name: role\n          in: query\n          schema:\n            type: string\n        - name: accountants\n          in: query\n          schema:\n            type: array\n            items:\n              type: integer\n              format: int32\n        - name: select\n          in: query\n          description: Limits the properties returned in the result.\n          schema:\n            type: string\n        - name: expand\n          in: query\n          description: Indicates the related entities to be represented inline. The\n            maximum depth is 2.\n          schema:\n            type: string\n        - name: filter\n          in: query\n          description: 'Restricts the set of items returned. The maximum number of\n            expressions is 100. The allowed functions are: allfunctions.'\n          schema:\n            type: string\n        - name: orderby\n          in: query\n          description: Specifies the order in which items are returned. The maximum number\n            of expressions is 5.\n          schema:\n            type: string\n        - name: top\n          in: query\n          description: Limits the number of items returned from a collection. The maximum\n            value is 100.\n          schema:\n            type: integer\n            format: int32\n        - name: skip\n          in: query\n          description: Excludes the specified number of items of the queried collection\n            from the result.\n          schema:\n            type: integer\n            format: int32\n        - name: count\n          in: query\n          description: Indicates whether the total count of items within a collection are\n            returned in the result.\n          schema:\n            type: boolean\n            default: false\n      responses:\n        '200':\n          description: OK\n          content:\n            application/json;odata.metadata=minimal;odata.streaming=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/BusinessSummary'\n            application/json;odata.metadata=minimal;odata.streaming=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/BusinessSummary'\n            application/json;odata.metadata=minimal:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/BusinessSummary'\n            application/json;odata.metadata=full;odata.streaming=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/BusinessSummary'\n            application/json;odata.metadata=full;odata.streaming=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/BusinessSummary'\n            application/json;odata.metadata=full:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/BusinessSummary'\n            application/json;odata.metadata=none;odata.streaming=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/BusinessSummary'\n            application/json;odata.metadata=none;odata.streaming=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/BusinessSummary'\n            application/json;odata.metadata=none:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/BusinessSummary'\n            application/json;odata.streaming=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/BusinessSummary'\n            application/json;odata.streaming=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/BusinessSummary'\n            application/json:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/BusinessSummary'\n            application/json;odata.metadata=minimal;odata.streaming=true;IEEE754Compatible=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/BusinessSummary'\n            application/json;odata.metadata=minimal;odata.streaming=true;IEEE754Compatible=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/BusinessSummary'\n            application/json;odata.metadata=minimal;odata.streaming=false;IEEE754Compatible=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/BusinessSummary'\n            application/json;odata.metadata=minimal;odata.streaming=false;IEEE754Compatible=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/BusinessSummary'\n            application/json;odata.metadata=minimal;IEEE754Compatible=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/BusinessSummary'\n            application/json;odata.metadata=minimal;IEEE754Compatible=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/BusinessSummary'\n            application/json;odata.metadata=full;odata.streaming=true;IEEE754Compatible=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/BusinessSummary'\n            application/json;odata.metadata=full;odata.streaming=true;IEEE754Compatible=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/BusinessSummary'\n            application/json;odata.metadata=full;odata.streaming=false;IEEE754Compatible=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/BusinessSummary'\n            application/json;odata.metadata=full;odata.streaming=false;IEEE754Compatible=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/BusinessSummary'\n            application/json;odata.metadata=full;IEEE754Compatible=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/BusinessSummary'\n            application/json;odata.metadata=full;IEEE754Compatible=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/BusinessSummary'\n            application/json;odata.metadata=none;odata.streaming=true;IEEE754Compatible=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/BusinessSummary'\n            application/json;odata.metadata=none;odata.streaming=true;IEEE754Compatible=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/BusinessSummary'\n            application/json;odata.metadata=none;odata.streaming=false;IEEE754Compatible=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/BusinessSummary'\n            application/json;odata.metadata=none;odata.streaming=false;IEEE754Compatible=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/BusinessSummary'\n            application/json;odata.metadata=none;IEEE754Compatible=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/BusinessSummary'\n            application/json;odata.metadata=none;IEEE754Compatible=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/BusinessSummary'\n            application/json;odata.streaming=true;IEEE754Compatible=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/BusinessSummary'\n            application/json;odata.streaming=true;IEEE754Compatible=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/BusinessSummary'\n            application/json;odata.streaming=false;IEEE754Compatible=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/BusinessSummary'\n            application/json;odata.streaming=false;IEEE754Compatible=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/BusinessSummary'\n            application/json;IEEE754Compatible=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/BusinessSummary'\n            application/json;IEEE754Compatible=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/BusinessSummary'\n            application/xml:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/BusinessSummary'\n            text/plain:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/BusinessSummary'\n            application/octet-stream:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/BusinessSummary'\n            text/json:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/BusinessSummary'\n  /api/v1/odata/BusinessSummaries/$count:\n    get:\n      tags:\n        - BusinessSummaries\n      operationId: api/v{version:apiVersion}/odata/BusinessSummaries/$count\n      parameters:\n        - name: role\n          in: query\n          schema:\n            type: string\n        - name: accountants\n          in: query\n          schema:\n            type: array\n            items:\n              type: integer\n              format: int32\n        - name: select\n          in: query\n          description: Limits the properties returned in the result.\n          schema:\n            type: string\n        - name: expand\n          in: query\n          description: Indicates the related entities to be represented inline. The\n            maximum depth is 2.\n          schema:\n            type: string\n        - name: filter\n          in: query\n          description: 'Restricts the set of items returned. The maximum number of\n            expressions is 100. The allowed functions are: allfunctions.'\n          schema:\n            type: string\n        - name: orderby\n          in: query\n          description: Specifies the order in which items are returned. The maximum number\n            of expressions is 5.\n          schema:\n            type: string\n        - name: top\n          in: query\n          description: Limits the number of items returned from a collection. The maximum\n            value is 100.\n          schema:\n            type: integer\n            format: int32\n        - name: skip\n          in: query\n          description: Excludes the specified number of items of the queried collection\n            from the result.\n          schema:\n            type: integer\n            format: int32\n        - name: count\n          in: query\n          description: Indicates whether the total count of items within a collection are\n            returned in the result.\n          schema:\n            type: boolean\n            default: false\n      responses:\n        '200':\n          description: OK\n          content:\n            application/json;odata.metadata=minimal;odata.streaming=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/BusinessSummary'\n            application/json;odata.metadata=minimal;odata.streaming=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/BusinessSummary'\n            application/json;odata.metadata=minimal:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/BusinessSummary'\n            application/json;odata.metadata=full;odata.streaming=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/BusinessSummary'\n            application/json;odata.metadata=full;odata.streaming=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/BusinessSummary'\n            application/json;odata.metadata=full:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/BusinessSummary'\n            application/json;odata.metadata=none;odata.streaming=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/BusinessSummary'\n            application/json;odata.metadata=none;odata.streaming=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/BusinessSummary'\n            application/json;odata.metadata=none:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/BusinessSummary'\n            application/json;odata.streaming=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/BusinessSummary'\n            application/json;odata.streaming=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/BusinessSummary'\n            application/json:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/BusinessSummary'\n            application/json;odata.metadata=minimal;odata.streaming=true;IEEE754Compatible=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/BusinessSummary'\n            application/json;odata.metadata=minimal;odata.streaming=true;IEEE754Compatible=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/BusinessSummary'\n            application/json;odata.metadata=minimal;odata.streaming=false;IEEE754Compatible=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/BusinessSummary'\n            application/json;odata.metadata=minimal;odata.streaming=false;IEEE754Compatible=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/BusinessSummary'\n            application/json;odata.metadata=minimal;IEEE754Compatible=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/BusinessSummary'\n            application/json;odata.metadata=minimal;IEEE754Compatible=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/BusinessSummary'\n            application/json;odata.metadata=full;odata.streaming=true;IEEE754Compatible=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/BusinessSummary'\n            application/json;odata.metadata=full;odata.streaming=true;IEEE754Compatible=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/BusinessSummary'\n            application/json;odata.metadata=full;odata.streaming=false;IEEE754Compatible=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/BusinessSummary'\n            application/json;odata.metadata=full;odata.streaming=false;IEEE754Compatible=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/BusinessSummary'\n            application/json;odata.metadata=full;IEEE754Compatible=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/BusinessSummary'\n            application/json;odata.metadata=full;IEEE754Compatible=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/BusinessSummary'\n            application/json;odata.metadata=none;odata.streaming=true;IEEE754Compatible=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/BusinessSummary'\n            application/json;odata.metadata=none;odata.streaming=true;IEEE754Compatible=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/BusinessSummary'\n            application/json;odata.metadata=none;odata.streaming=false;IEEE754Compatible=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/BusinessSummary'\n            application/json;odata.metadata=none;odata.streaming=false;IEEE754Compatible=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/BusinessSummary'\n            application/json;odata.metadata=none;IEEE754Compatible=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/BusinessSummary'\n            application/json;odata.metadata=none;IEEE754Compatible=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/BusinessSummary'\n            application/json;odata.streaming=true;IEEE754Compatible=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/BusinessSummary'\n            application/json;odata.streaming=true;IEEE754Compatible=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/BusinessSummary'\n            application/json;odata.streaming=false;IEEE754Compatible=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/BusinessSummary'\n            application/json;odata.streaming=false;IEEE754Compatible=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/BusinessSummary'\n            application/json;IEEE754Compatible=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/BusinessSummary'\n            application/json;IEEE754Compatible=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/BusinessSummary'\n            application/xml:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/BusinessSummary'\n            text/plain:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/BusinessSummary'\n            application/octet-stream:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/BusinessSummary'\n            text/json:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/BusinessSummary'\n  /api/v1/counterparties:\n    post:\n      tags:\n        - Counterparties\n      requestBody:\n        content:\n          application/json;odata.metadata=minimal;odata.streaming=true:\n            schema:\n              $ref: '#/components/schemas/CounterpartyCreateDto'\n          application/json;odata.metadata=minimal;odata.streaming=false:\n            schema:\n              $ref: '#/components/schemas/CounterpartyCreateDto'\n          application/json;odata.metadata=minimal:\n            schema:\n              $ref: '#/components/schemas/CounterpartyCreateDto'\n          application/json;odata.metadata=full;odata.streaming=true:\n            schema:\n              $ref: '#/components/schemas/CounterpartyCreateDto'\n          application/json;odata.metadata=full;odata.streaming=false:\n            schema:\n              $ref: '#/components/schemas/CounterpartyCreateDto'\n          application/json;odata.metadata=full:\n            schema:\n              $ref: '#/components/schemas/CounterpartyCreateDto'\n          application/json;odata.metadata=none;odata.streaming=true:\n            schema:\n              $ref: '#/components/schemas/CounterpartyCreateDto'\n          application/json;odata.metadata=none;odata.streaming=false:\n            schema:\n              $ref: '#/components/schemas/CounterpartyCreateDto'\n          application/json;odata.metadata=none:\n            schema:\n              $ref: '#/components/schemas/CounterpartyCreateDto'\n          application/json;odata.streaming=true:\n            schema:\n              $ref: '#/components/schemas/CounterpartyCreateDto'\n          application/json;odata.streaming=false:\n            schema:\n              $ref: '#/components/schemas/CounterpartyCreateDto'\n          application/json:\n            schema:\n              $ref: '#/components/schemas/CounterpartyCreateDto'\n          application/json;odata.metadata=minimal;odata.streaming=true;IEEE754Compatible=false:\n            schema:\n              $ref: '#/components/schemas/CounterpartyCreateDto'\n          application/json;odata.metadata=minimal;odata.streaming=true;IEEE754Compatible=true:\n            schema:\n              $ref: '#/components/schemas/CounterpartyCreateDto'\n          application/json;odata.metadata=minimal;odata.streaming=false;IEEE754Compatible=false:\n            schema:\n              $ref: '#/components/schemas/CounterpartyCreateDto'\n          application/json;odata.metadata=minimal;odata.streaming=false;IEEE754Compatible=true:\n            schema:\n              $ref: '#/components/schemas/CounterpartyCreateDto'\n          application/json;odata.metadata=minimal;IEEE754Compatible=false:\n            schema:\n              $ref: '#/components/schemas/CounterpartyCreateDto'\n          application/json;odata.metadata=minimal;IEEE754Compatible=true:\n            schema:\n              $ref: '#/components/schemas/CounterpartyCreateDto'\n          application/json;odata.metadata=full;odata.streaming=true;IEEE754Compatible=false:\n            schema:\n              $ref: '#/components/schemas/CounterpartyCreateDto'\n          application/json;odata.metadata=full;odata.streaming=true;IEEE754Compatible=true:\n            schema:\n              $ref: '#/components/schemas/CounterpartyCreateDto'\n          application/json;odata.metadata=full;odata.streaming=false;IEEE754Compatible=false:\n            schema:\n              $ref: '#/components/schemas/CounterpartyCreateDto'\n          application/json;odata.metadata=full;odata.streaming=false;IEEE754Compatible=true:\n            schema:\n              $ref: '#/components/schemas/CounterpartyCreateDto'\n          application/json;odata.metadata=full;IEEE754Compatible=false:\n            schema:\n              $ref: '#/components/schemas/CounterpartyCreateDto'\n          application/json;odata.metadata=full;IEEE754Compatible=true:\n            schema:\n              $ref: '#/components/schemas/CounterpartyCreateDto'\n          application/json;odata.metadata=none;odata.streaming=true;IEEE754Compatible=false:\n            schema:\n              $ref: '#/components/schemas/CounterpartyCreateDto'\n          application/json;odata.metadata=none;odata.streaming=true;IEEE754Compatible=true:\n            schema:\n              $ref: '#/components/schemas/CounterpartyCreateDto'\n          application/json;odata.metadata=none;odata.streaming=false;IEEE754Compatible=true:\n            schema:\n              $ref: '#/components/schemas/CounterpartyCreateDto'\n          application/json;odata.metadata=none;odata.streaming=false;IEEE754Compatible=false:\n            schema:\n              $ref: '#/components/schemas/CounterpartyCreateDto'\n          application/json;odata.metadata=none;IEEE754Compatible=false:\n            schema:\n              $ref: '#/components/schemas/CounterpartyCreateDto'\n          application/json;odata.metadata=none;IEEE754Compatible=true:\n            schema:\n              $ref: '#/components/schemas/CounterpartyCreateDto'\n          application/json;odata.streaming=true;IEEE754Compatible=false:\n            schema:\n              $ref: '#/components/schemas/CounterpartyCreateDto'\n          application/json;odata.streaming=true;IEEE754Compatible=true:\n            schema:\n              $ref: '#/components/schemas/CounterpartyCreateDto'\n          application/json;odata.streaming=false;IEEE754Compatible=false:\n            schema:\n              $ref: '#/components/schemas/CounterpartyCreateDto'\n          application/json;odata.streaming=false;IEEE754Compatible=true:\n            schema:\n              $ref: '#/components/schemas/CounterpartyCreateDto'\n          application/json;IEEE754Compatible=false:\n            schema:\n              $ref: '#/components/schemas/CounterpartyCreateDto'\n          application/json;IEEE754Compatible=true:\n            schema:\n              $ref: '#/components/schemas/CounterpartyCreateDto'\n          application/xml:\n            schema:\n              $ref: '#/components/schemas/CounterpartyCreateDto'\n          text/plain:\n            schema:\n              $ref: '#/components/schemas/CounterpartyCreateDto'\n          application/json-patch+json:\n            schema:\n              $ref: '#/components/schemas/CounterpartyCreateDto'\n          text/json:\n            schema:\n              $ref: '#/components/schemas/CounterpartyCreateDto'\n          application/*+json:\n            schema:\n              $ref: '#/components/schemas/CounterpartyCreateDto'\n      responses:\n        '200':\n          description: OK\n          content:\n            application/json;odata.metadata=minimal;odata.streaming=true:\n              schema:\n                $ref: '#/components/schemas/Counterparty'\n            application/json;odata.metadata=minimal;odata.streaming=false:\n              schema:\n                $ref: '#/components/schemas/Counterparty'\n            application/json;odata.metadata=minimal:\n              schema:\n                $ref: '#/components/schemas/Counterparty'\n            application/json;odata.metadata=full;odata.streaming=true:\n              schema:\n                $ref: '#/components/schemas/Counterparty'\n            application/json;odata.metadata=full;odata.streaming=false:\n              schema:\n                $ref: '#/components/schemas/Counterparty'\n            application/json;odata.metadata=full:\n              schema:\n                $ref: '#/components/schemas/Counterparty'\n            application/json;odata.metadata=none;odata.streaming=true:\n              schema:\n                $ref: '#/components/schemas/Counterparty'\n            application/json;odata.metadata=none;odata.streaming=false:\n              schema:\n                $ref: '#/components/schemas/Counterparty'\n            application/json;odata.metadata=none:\n              schema:\n                $ref: '#/components/schemas/Counterparty'\n            application/json;odata.streaming=true:\n              schema:\n                $ref: '#/components/schemas/Counterparty'\n            application/json;odata.streaming=false:\n              schema:\n                $ref: '#/components/schemas/Counterparty'\n            application/json:\n              schema:\n                $ref: '#/components/schemas/Counterparty'\n            application/json;odata.metadata=minimal;odata.streaming=true;IEEE754Compatible=false:\n              schema:\n                $ref: '#/components/schemas/Counterparty'\n            application/json;odata.metadata=minimal;odata.streaming=true;IEEE754Compatible=true:\n              schema:\n                $ref: '#/components/schemas/Counterparty'\n            application/json;odata.metadata=minimal;odata.streaming=false;IEEE754Compatible=false:\n              schema:\n                $ref: '#/components/schemas/Counterparty'\n            application/json;odata.metadata=minimal;odata.streaming=false;IEEE754Compatible=true:\n              schema:\n                $ref: '#/components/schemas/Counterparty'\n            application/json;odata.metadata=minimal;IEEE754Compatible=false:\n              schema:\n                $ref: '#/components/schemas/Counterparty'\n            application/json;odata.metadata=minimal;IEEE754Compatible=true:\n              schema:\n                $ref: '#/components/schemas/Counterparty'\n            application/json;odata.metadata=full;odata.streaming=true;IEEE754Compatible=false:\n              schema:\n                $ref: '#/components/schemas/Counterparty'\n            application/json;odata.metadata=full;odata.streaming=true;IEEE754Compatible=true:\n              schema:\n                $ref: '#/components/schemas/Counterparty'\n            application/json;odata.metadata=full;odata.streaming=false;IEEE754Compatible=false:\n              schema:\n                $ref: '#/components/schemas/Counterparty'\n            application/json;odata.metadata=full;odata.streaming=false;IEEE754Compatible=true:\n              schema:\n                $ref: '#/components/schemas/Counterparty'\n            application/json;odata.metadata=full;IEEE754Compatible=false:\n              schema:\n                $ref: '#/components/schemas/Counterparty'\n            application/json;odata.metadata=full;IEEE754Compatible=true:\n              schema:\n                $ref: '#/components/schemas/Counterparty'\n            application/json;odata.metadata=none;odata.streaming=true;IEEE754Compatible=false:\n              schema:\n                $ref: '#/components/schemas/Counterparty'\n            application/json;odata.metadata=none;odata.streaming=true;IEEE754Compatible=true:\n              schema:\n                $ref: '#/components/schemas/Counterparty'\n            application/json;odata.metadata=none;odata.streaming=false;IEEE754Compatible=true:\n              schema:\n                $ref: '#/components/schemas/Counterparty'\n            application/json;odata.metadata=none;odata.streaming=false;IEEE754Compatible=false:\n              schema:\n                $ref: '#/components/schemas/Counterparty'\n            application/json;odata.metadata=none;IEEE754Compatible=false:\n              schema:\n                $ref: '#/components/schemas/Counterparty'\n            application/json;odata.metadata=none;IEEE754Compatible=true:\n              schema:\n                $ref: '#/components/schemas/Counterparty'\n            application/json;odata.streaming=true;IEEE754Compatible=false:\n              schema:\n                $ref: '#/components/schemas/Counterparty'\n            application/json;odata.streaming=true;IEEE754Compatible=true:\n              schema:\n                $ref: '#/components/schemas/Counterparty'\n            application/json;odata.streaming=false;IEEE754Compatible=false:\n              schema:\n                $ref: '#/components/schemas/Counterparty'\n            application/json;odata.streaming=false;IEEE754Compatible=true:\n              schema:\n                $ref: '#/components/schemas/Counterparty'\n            application/json;IEEE754Compatible=false:\n              schema:\n                $ref: '#/components/schemas/Counterparty'\n            application/json;IEEE754Compatible=true:\n              schema:\n                $ref: '#/components/schemas/Counterparty'\n            application/xml:\n              schema:\n                $ref: '#/components/schemas/Counterparty'\n            text/plain:\n              schema:\n                $ref: '#/components/schemas/Counterparty'\n            application/octet-stream:\n              schema:\n                $ref: '#/components/schemas/Counterparty'\n            text/json:\n              schema:\n                $ref: '#/components/schemas/Counterparty'\n  /api/v1/counterparties/{id}:\n    patch:\n      tags:\n        - Counterparties\n      parameters:\n        - name: id\n          in: path\n          required: true\n          schema:\n            type: integer\n            format: int64\n      requestBody:\n        content:\n          application/json;odata.metadata=minimal;odata.streaming=true:\n            schema:\n              $ref: '#/components/schemas/CounterpartyUpdateDto'\n          application/json;odata.metadata=minimal;odata.streaming=false:\n            schema:\n              $ref: '#/components/schemas/CounterpartyUpdateDto'\n          application/json;odata.metadata=minimal:\n            schema:\n              $ref: '#/components/schemas/CounterpartyUpdateDto'\n          application/json;odata.metadata=full;odata.streaming=true:\n            schema:\n              $ref: '#/components/schemas/CounterpartyUpdateDto'\n          application/json;odata.metadata=full;odata.streaming=false:\n            schema:\n              $ref: '#/components/schemas/CounterpartyUpdateDto'\n          application/json;odata.metadata=full:\n            schema:\n              $ref: '#/components/schemas/CounterpartyUpdateDto'\n          application/json;odata.metadata=none;odata.streaming=true:\n            schema:\n              $ref: '#/components/schemas/CounterpartyUpdateDto'\n          application/json;odata.metadata=none;odata.streaming=false:\n            schema:\n              $ref: '#/components/schemas/CounterpartyUpdateDto'\n          application/json;odata.metadata=none:\n            schema:\n              $ref: '#/components/schemas/CounterpartyUpdateDto'\n          application/json;odata.streaming=true:\n            schema:\n              $ref: '#/components/schemas/CounterpartyUpdateDto'\n          application/json;odata.streaming=false:\n            schema:\n              $ref: '#/components/schemas/CounterpartyUpdateDto'\n          application/json:\n            schema:\n              $ref: '#/components/schemas/CounterpartyUpdateDto'\n          application/json;odata.metadata=minimal;odata.streaming=true;IEEE754Compatible=false:\n            schema:\n              $ref: '#/components/schemas/CounterpartyUpdateDto'\n          application/json;odata.metadata=minimal;odata.streaming=true;IEEE754Compatible=true:\n            schema:\n              $ref: '#/components/schemas/CounterpartyUpdateDto'\n          application/json;odata.metadata=minimal;odata.streaming=false;IEEE754Compatible=false:\n            schema:\n              $ref: '#/components/schemas/CounterpartyUpdateDto'\n          application/json;odata.metadata=minimal;odata.streaming=false;IEEE754Compatible=true:\n            schema:\n              $ref: '#/components/schemas/CounterpartyUpdateDto'\n          application/json;odata.metadata=minimal;IEEE754Compatible=false:\n            schema:\n              $ref: '#/components/schemas/CounterpartyUpdateDto'\n          application/json;odata.metadata=minimal;IEEE754Compatible=true:\n            schema:\n              $ref: '#/components/schemas/CounterpartyUpdateDto'\n          application/json;odata.metadata=full;odata.streaming=true;IEEE754Compatible=false:\n            schema:\n              $ref: '#/components/schemas/CounterpartyUpdateDto'\n          application/json;odata.metadata=full;odata.streaming=true;IEEE754Compatible=true:\n            schema:\n              $ref: '#/components/schemas/CounterpartyUpdateDto'\n          application/json;odata.metadata=full;odata.streaming=false;IEEE754Compatible=false:\n            schema:\n              $ref: '#/components/schemas/CounterpartyUpdateDto'\n          application/json;odata.metadata=full;odata.streaming=false;IEEE754Compatible=true:\n            schema:\n              $ref: '#/components/schemas/CounterpartyUpdateDto'\n          application/json;odata.metadata=full;IEEE754Compatible=false:\n            schema:\n              $ref: '#/components/schemas/CounterpartyUpdateDto'\n          application/json;odata.metadata=full;IEEE754Compatible=true:\n            schema:\n              $ref: '#/components/schemas/CounterpartyUpdateDto'\n          application/json;odata.metadata=none;odata.streaming=true;IEEE754Compatible=false:\n            schema:\n              $ref: '#/components/schemas/CounterpartyUpdateDto'\n          application/json;odata.metadata=none;odata.streaming=true;IEEE754Compatible=true:\n            schema:\n              $ref: '#/components/schemas/CounterpartyUpdateDto'\n          application/json;odata.metadata=none;odata.streaming=false;IEEE754Compatible=true:\n            schema:\n              $ref: '#/components/schemas/CounterpartyUpdateDto'\n          application/json;odata.metadata=none;odata.streaming=false;IEEE754Compatible=false:\n            schema:\n              $ref: '#/components/schemas/CounterpartyUpdateDto'\n          application/json;odata.metadata=none;IEEE754Compatible=false:\n            schema:\n              $ref: '#/components/schemas/CounterpartyUpdateDto'\n          application/json;odata.metadata=none;IEEE754Compatible=true:\n            schema:\n              $ref: '#/components/schemas/CounterpartyUpdateDto'\n          application/json;odata.streaming=true;IEEE754Compatible=false:\n            schema:\n              $ref: '#/components/schemas/CounterpartyUpdateDto'\n          application/json;odata.streaming=true;IEEE754Compatible=true:\n            schema:\n              $ref: '#/components/schemas/CounterpartyUpdateDto'\n          application/json;odata.streaming=false;IEEE754Compatible=false:\n            schema:\n              $ref: '#/components/schemas/CounterpartyUpdateDto'\n          application/json;odata.streaming=false;IEEE754Compatible=true:\n            schema:\n              $ref: '#/components/schemas/CounterpartyUpdateDto'\n          application/json;IEEE754Compatible=false:\n            schema:\n              $ref: '#/components/schemas/CounterpartyUpdateDto'\n          application/json;IEEE754Compatible=true:\n            schema:\n              $ref: '#/components/schemas/CounterpartyUpdateDto'\n          application/xml:\n            schema:\n              $ref: '#/components/schemas/CounterpartyUpdateDto'\n          text/plain:\n            schema:\n              $ref: '#/components/schemas/CounterpartyUpdateDto'\n          application/json-patch+json:\n            schema:\n              $ref: '#/components/schemas/CounterpartyUpdateDto'\n          text/json:\n            schema:\n              $ref: '#/components/schemas/CounterpartyUpdateDto'\n          application/*+json:\n            schema:\n              $ref: '#/components/schemas/CounterpartyUpdateDto'\n      responses:\n        '200':\n          description: OK\n          content:\n            application/json;odata.metadata=minimal;odata.streaming=true:\n              schema:\n                $ref: '#/components/schemas/Counterparty'\n            application/json;odata.metadata=minimal;odata.streaming=false:\n              schema:\n                $ref: '#/components/schemas/Counterparty'\n            application/json;odata.metadata=minimal:\n              schema:\n                $ref: '#/components/schemas/Counterparty'\n            application/json;odata.metadata=full;odata.streaming=true:\n              schema:\n                $ref: '#/components/schemas/Counterparty'\n            application/json;odata.metadata=full;odata.streaming=false:\n              schema:\n                $ref: '#/components/schemas/Counterparty'\n            application/json;odata.metadata=full:\n              schema:\n                $ref: '#/components/schemas/Counterparty'\n            application/json;odata.metadata=none;odata.streaming=true:\n              schema:\n                $ref: '#/components/schemas/Counterparty'\n            application/json;odata.metadata=none;odata.streaming=false:\n              schema:\n                $ref: '#/components/schemas/Counterparty'\n            application/json;odata.metadata=none:\n              schema:\n                $ref: '#/components/schemas/Counterparty'\n            application/json;odata.streaming=true:\n              schema:\n                $ref: '#/components/schemas/Counterparty'\n            application/json;odata.streaming=false:\n              schema:\n                $ref: '#/components/schemas/Counterparty'\n            application/json:\n              schema:\n                $ref: '#/components/schemas/Counterparty'\n            application/json;odata.metadata=minimal;odata.streaming=true;IEEE754Compatible=false:\n              schema:\n                $ref: '#/components/schemas/Counterparty'\n            application/json;odata.metadata=minimal;odata.streaming=true;IEEE754Compatible=true:\n              schema:\n                $ref: '#/components/schemas/Counterparty'\n            application/json;odata.metadata=minimal;odata.streaming=false;IEEE754Compatible=false:\n              schema:\n                $ref: '#/components/schemas/Counterparty'\n            application/json;odata.metadata=minimal;odata.streaming=false;IEEE754Compatible=true:\n              schema:\n                $ref: '#/components/schemas/Counterparty'\n            application/json;odata.metadata=minimal;IEEE754Compatible=false:\n              schema:\n                $ref: '#/components/schemas/Counterparty'\n            application/json;odata.metadata=minimal;IEEE754Compatible=true:\n              schema:\n                $ref: '#/components/schemas/Counterparty'\n            application/json;odata.metadata=full;odata.streaming=true;IEEE754Compatible=false:\n              schema:\n                $ref: '#/components/schemas/Counterparty'\n            application/json;odata.metadata=full;odata.streaming=true;IEEE754Compatible=true:\n              schema:\n                $ref: '#/components/schemas/Counterparty'\n            application/json;odata.metadata=full;odata.streaming=false;IEEE754Compatible=false:\n              schema:\n                $ref: '#/components/schemas/Counterparty'\n            application/json;odata.metadata=full;odata.streaming=false;IEEE754Compatible=true:\n              schema:\n                $ref: '#/components/schemas/Counterparty'\n            application/json;odata.metadata=full;IEEE754Compatible=false:\n              schema:\n                $ref: '#/components/schemas/Counterparty'\n            application/json;odata.metadata=full;IEEE754Compatible=true:\n              schema:\n                $ref: '#/components/schemas/Counterparty'\n            application/json;odata.metadata=none;odata.streaming=true;IEEE754Compatible=false:\n              schema:\n                $ref: '#/components/schemas/Counterparty'\n            application/json;odata.metadata=none;odata.streaming=true;IEEE754Compatible=true:\n              schema:\n                $ref: '#/components/schemas/Counterparty'\n            application/json;odata.metadata=none;odata.streaming=false;IEEE754Compatible=true:\n              schema:\n                $ref: '#/components/schemas/Counterparty'\n            application/json;odata.metadata=none;odata.streaming=false;IEEE754Compatible=false:\n              schema:\n                $ref: '#/components/schemas/Counterparty'\n            application/json;odata.metadata=none;IEEE754Compatible=false:\n              schema:\n                $ref: '#/components/schemas/Counterparty'\n            application/json;odata.metadata=none;IEEE754Compatible=true:\n              schema:\n                $ref: '#/components/schemas/Counterparty'\n            application/json;odata.streaming=true;IEEE754Compatible=false:\n              schema:\n                $ref: '#/components/schemas/Counterparty'\n            application/json;odata.streaming=true;IEEE754Compatible=true:\n              schema:\n                $ref: '#/components/schemas/Counterparty'\n            application/json;odata.streaming=false;IEEE754Compatible=false:\n              schema:\n                $ref: '#/components/schemas/Counterparty'\n            application/json;odata.streaming=false;IEEE754Compatible=true:\n              schema:\n                $ref: '#/components/schemas/Counterparty'\n            application/json;IEEE754Compatible=false:\n              schema:\n                $ref: '#/components/schemas/Counterparty'\n            application/json;IEEE754Compatible=true:\n              schema:\n                $ref: '#/components/schemas/Counterparty'\n            application/xml:\n              schema:\n                $ref: '#/components/schemas/Counterparty'\n            text/plain:\n              schema:\n                $ref: '#/components/schemas/Counterparty'\n            application/octet-stream:\n              schema:\n                $ref: '#/components/schemas/Counterparty'\n            text/json:\n              schema:\n                $ref: '#/components/schemas/Counterparty'\n    delete:\n      tags:\n        - Counterparties\n      parameters:\n        - name: id\n          in: path\n          required: true\n          schema:\n            type: integer\n            format: int64\n      responses:\n        '200':\n          description: OK\n  /api/v1/odata/Counterparties:\n    get:\n      tags:\n        - Counterparties\n      operationId: api/v{version:apiVersion}/odata/Counterparties\n      parameters:\n        - name: select\n          in: query\n          description: Limits the properties returned in the result.\n          schema:\n            type: string\n        - name: expand\n          in: query\n          description: Indicates the related entities to be represented inline. The\n            maximum depth is 2.\n          schema:\n            type: string\n        - name: filter\n          in: query\n          description: 'Restricts the set of items returned. The maximum number of\n            expressions is 100. The allowed functions are: allfunctions.'\n          schema:\n            type: string\n        - name: orderby\n          in: query\n          description: Specifies the order in which items are returned. The maximum number\n            of expressions is 5.\n          schema:\n            type: string\n        - name: top\n          in: query\n          description: Limits the number of items returned from a collection. The maximum\n            value is 100.\n          schema:\n            type: integer\n            format: int32\n        - name: skip\n          in: query\n          description: Excludes the specified number of items of the queried collection\n            from the result.\n          schema:\n            type: integer\n            format: int32\n        - name: count\n          in: query\n          description: Indicates whether the total count of items within a collection are\n            returned in the result.\n          schema:\n            type: boolean\n            default: false\n      responses:\n        '200':\n          description: OK\n          content:\n            application/json;odata.metadata=minimal;odata.streaming=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/Counterparty'\n            application/json;odata.metadata=minimal;odata.streaming=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/Counterparty'\n            application/json;odata.metadata=minimal:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/Counterparty'\n            application/json;odata.metadata=full;odata.streaming=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/Counterparty'\n            application/json;odata.metadata=full;odata.streaming=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/Counterparty'\n            application/json;odata.metadata=full:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/Counterparty'\n            application/json;odata.metadata=none;odata.streaming=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/Counterparty'\n            application/json;odata.metadata=none;odata.streaming=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/Counterparty'\n            application/json;odata.metadata=none:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/Counterparty'\n            application/json;odata.streaming=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/Counterparty'\n            application/json;odata.streaming=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/Counterparty'\n            application/json:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/Counterparty'\n            application/json;odata.metadata=minimal;odata.streaming=true;IEEE754Compatible=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/Counterparty'\n            application/json;odata.metadata=minimal;odata.streaming=true;IEEE754Compatible=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/Counterparty'\n            application/json;odata.metadata=minimal;odata.streaming=false;IEEE754Compatible=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/Counterparty'\n            application/json;odata.metadata=minimal;odata.streaming=false;IEEE754Compatible=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/Counterparty'\n            application/json;odata.metadata=minimal;IEEE754Compatible=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/Counterparty'\n            application/json;odata.metadata=minimal;IEEE754Compatible=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/Counterparty'\n            application/json;odata.metadata=full;odata.streaming=true;IEEE754Compatible=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/Counterparty'\n            application/json;odata.metadata=full;odata.streaming=true;IEEE754Compatible=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/Counterparty'\n            application/json;odata.metadata=full;odata.streaming=false;IEEE754Compatible=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/Counterparty'\n            application/json;odata.metadata=full;odata.streaming=false;IEEE754Compatible=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/Counterparty'\n            application/json;odata.metadata=full;IEEE754Compatible=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/Counterparty'\n            application/json;odata.metadata=full;IEEE754Compatible=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/Counterparty'\n            application/json;odata.metadata=none;odata.streaming=true;IEEE754Compatible=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/Counterparty'\n            application/json;odata.metadata=none;odata.streaming=true;IEEE754Compatible=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/Counterparty'\n            application/json;odata.metadata=none;odata.streaming=false;IEEE754Compatible=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/Counterparty'\n            application/json;odata.metadata=none;odata.streaming=false;IEEE754Compatible=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/Counterparty'\n            application/json;odata.metadata=none;IEEE754Compatible=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/Counterparty'\n            application/json;odata.metadata=none;IEEE754Compatible=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/Counterparty'\n            application/json;odata.streaming=true;IEEE754Compatible=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/Counterparty'\n            application/json;odata.streaming=true;IEEE754Compatible=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/Counterparty'\n            application/json;odata.streaming=false;IEEE754Compatible=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/Counterparty'\n            application/json;odata.streaming=false;IEEE754Compatible=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/Counterparty'\n            application/json;IEEE754Compatible=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/Counterparty'\n            application/json;IEEE754Compatible=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/Counterparty'\n            application/xml:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/Counterparty'\n            text/plain:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/Counterparty'\n            application/octet-stream:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/Counterparty'\n            text/json:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/Counterparty'\n  /api/v1/odata/Counterparties/$count:\n    get:\n      tags:\n        - Counterparties\n      operationId: api/v{version:apiVersion}/odata/Counterparties/$count\n      parameters:\n        - name: select\n          in: query\n          description: Limits the properties returned in the result.\n          schema:\n            type: string\n        - name: expand\n          in: query\n          description: Indicates the related entities to be represented inline. The\n            maximum depth is 2.\n          schema:\n            type: string\n        - name: filter\n          in: query\n          description: 'Restricts the set of items returned. The maximum number of\n            expressions is 100. The allowed functions are: allfunctions.'\n          schema:\n            type: string\n        - name: orderby\n          in: query\n          description: Specifies the order in which items are returned. The maximum number\n            of expressions is 5.\n          schema:\n            type: string\n        - name: top\n          in: query\n          description: Limits the number of items returned from a collection. The maximum\n            value is 100.\n          schema:\n            type: integer\n            format: int32\n        - name: skip\n          in: query\n          description: Excludes the specified number of items of the queried collection\n            from the result.\n          schema:\n            type: integer\n            format: int32\n        - name: count\n          in: query\n          description: Indicates whether the total count of items within a collection are\n            returned in the result.\n          schema:\n            type: boolean\n            default: false\n      responses:\n        '200':\n          description: OK\n          content:\n            application/json;odata.metadata=minimal;odata.streaming=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/Counterparty'\n            application/json;odata.metadata=minimal;odata.streaming=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/Counterparty'\n            application/json;odata.metadata=minimal:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/Counterparty'\n            application/json;odata.metadata=full;odata.streaming=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/Counterparty'\n            application/json;odata.metadata=full;odata.streaming=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/Counterparty'\n            application/json;odata.metadata=full:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/Counterparty'\n            application/json;odata.metadata=none;odata.streaming=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/Counterparty'\n            application/json;odata.metadata=none;odata.streaming=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/Counterparty'\n            application/json;odata.metadata=none:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/Counterparty'\n            application/json;odata.streaming=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/Counterparty'\n            application/json;odata.streaming=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/Counterparty'\n            application/json:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/Counterparty'\n            application/json;odata.metadata=minimal;odata.streaming=true;IEEE754Compatible=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/Counterparty'\n            application/json;odata.metadata=minimal;odata.streaming=true;IEEE754Compatible=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/Counterparty'\n            application/json;odata.metadata=minimal;odata.streaming=false;IEEE754Compatible=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/Counterparty'\n            application/json;odata.metadata=minimal;odata.streaming=false;IEEE754Compatible=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/Counterparty'\n            application/json;odata.metadata=minimal;IEEE754Compatible=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/Counterparty'\n            application/json;odata.metadata=minimal;IEEE754Compatible=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/Counterparty'\n            application/json;odata.metadata=full;odata.streaming=true;IEEE754Compatible=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/Counterparty'\n            application/json;odata.metadata=full;odata.streaming=true;IEEE754Compatible=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/Counterparty'\n            application/json;odata.metadata=full;odata.streaming=false;IEEE754Compatible=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/Counterparty'\n            application/json;odata.metadata=full;odata.streaming=false;IEEE754Compatible=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/Counterparty'\n            application/json;odata.metadata=full;IEEE754Compatible=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/Counterparty'\n            application/json;odata.metadata=full;IEEE754Compatible=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/Counterparty'\n            application/json;odata.metadata=none;odata.streaming=true;IEEE754Compatible=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/Counterparty'\n            application/json;odata.metadata=none;odata.streaming=true;IEEE754Compatible=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/Counterparty'\n            application/json;odata.metadata=none;odata.streaming=false;IEEE754Compatible=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/Counterparty'\n            application/json;odata.metadata=none;odata.streaming=false;IEEE754Compatible=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/Counterparty'\n            application/json;odata.metadata=none;IEEE754Compatible=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/Counterparty'\n            application/json;odata.metadata=none;IEEE754Compatible=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/Counterparty'\n            application/json;odata.streaming=true;IEEE754Compatible=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/Counterparty'\n            application/json;odata.streaming=true;IEEE754Compatible=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/Counterparty'\n            application/json;odata.streaming=false;IEEE754Compatible=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/Counterparty'\n            application/json;odata.streaming=false;IEEE754Compatible=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/Counterparty'\n            application/json;IEEE754Compatible=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/Counterparty'\n            application/json;IEEE754Compatible=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/Counterparty'\n            application/xml:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/Counterparty'\n            text/plain:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/Counterparty'\n            application/octet-stream:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/Counterparty'\n            text/json:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/Counterparty'\n  /api/v1/data-box-credentials:\n    put:\n      tags:\n        - DataBoxCredentials\n      requestBody:\n        content:\n          application/json;odata.metadata=minimal;odata.streaming=true:\n            schema:\n              $ref: '#/components/schemas/DataBoxCredentialsUpsertDto'\n          application/json;odata.metadata=minimal;odata.streaming=false:\n            schema:\n              $ref: '#/components/schemas/DataBoxCredentialsUpsertDto'\n          application/json;odata.metadata=minimal:\n            schema:\n              $ref: '#/components/schemas/DataBoxCredentialsUpsertDto'\n          application/json;odata.metadata=full;odata.streaming=true:\n            schema:\n              $ref: '#/components/schemas/DataBoxCredentialsUpsertDto'\n          application/json;odata.metadata=full;odata.streaming=false:\n            schema:\n              $ref: '#/components/schemas/DataBoxCredentialsUpsertDto'\n          application/json;odata.metadata=full:\n            schema:\n              $ref: '#/components/schemas/DataBoxCredentialsUpsertDto'\n          application/json;odata.metadata=none;odata.streaming=true:\n            schema:\n              $ref: '#/components/schemas/DataBoxCredentialsUpsertDto'\n          application/json;odata.metadata=none;odata.streaming=false:\n            schema:\n              $ref: '#/components/schemas/DataBoxCredentialsUpsertDto'\n          application/json;odata.metadata=none:\n            schema:\n              $ref: '#/components/schemas/DataBoxCredentialsUpsertDto'\n          application/json;odata.streaming=true:\n            schema:\n              $ref: '#/components/schemas/DataBoxCredentialsUpsertDto'\n          application/json;odata.streaming=false:\n            schema:\n              $ref: '#/components/schemas/DataBoxCredentialsUpsertDto'\n          application/json:\n            schema:\n              $ref: '#/components/schemas/DataBoxCredentialsUpsertDto'\n          application/json;odata.metadata=minimal;odata.streaming=true;IEEE754Compatible=false:\n            schema:\n              $ref: '#/components/schemas/DataBoxCredentialsUpsertDto'\n          application/json;odata.metadata=minimal;odata.streaming=true;IEEE754Compatible=true:\n            schema:\n              $ref: '#/components/schemas/DataBoxCredentialsUpsertDto'\n          application/json;odata.metadata=minimal;odata.streaming=false;IEEE754Compatible=false:\n            schema:\n              $ref: '#/components/schemas/DataBoxCredentialsUpsertDto'\n          application/json;odata.metadata=minimal;odata.streaming=false;IEEE754Compatible=true:\n            schema:\n              $ref: '#/components/schemas/DataBoxCredentialsUpsertDto'\n          application/json;odata.metadata=minimal;IEEE754Compatible=false:\n            schema:\n              $ref: '#/components/schemas/DataBoxCredentialsUpsertDto'\n          application/json;odata.metadata=minimal;IEEE754Compatible=true:\n            schema:\n              $ref: '#/components/schemas/DataBoxCredentialsUpsertDto'\n          application/json;odata.metadata=full;odata.streaming=true;IEEE754Compatible=false:\n            schema:\n              $ref: '#/components/schemas/DataBoxCredentialsUpsertDto'\n          application/json;odata.metadata=full;odata.streaming=true;IEEE754Compatible=true:\n            schema:\n              $ref: '#/components/schemas/DataBoxCredentialsUpsertDto'\n          application/json;odata.metadata=full;odata.streaming=false;IEEE754Compatible=false:\n            schema:\n              $ref: '#/components/schemas/DataBoxCredentialsUpsertDto'\n          application/json;odata.metadata=full;odata.streaming=false;IEEE754Compatible=true:\n            schema:\n              $ref: '#/components/schemas/DataBoxCredentialsUpsertDto'\n          application/json;odata.metadata=full;IEEE754Compatible=false:\n            schema:\n              $ref: '#/components/schemas/DataBoxCredentialsUpsertDto'\n          application/json;odata.metadata=full;IEEE754Compatible=true:\n            schema:\n              $ref: '#/components/schemas/DataBoxCredentialsUpsertDto'\n          application/json;odata.metadata=none;odata.streaming=true;IEEE754Compatible=false:\n            schema:\n              $ref: '#/components/schemas/DataBoxCredentialsUpsertDto'\n          application/json;odata.metadata=none;odata.streaming=true;IEEE754Compatible=true:\n            schema:\n              $ref: '#/components/schemas/DataBoxCredentialsUpsertDto'\n          application/json;odata.metadata=none;odata.streaming=false;IEEE754Compatible=true:\n            schema:\n              $ref: '#/components/schemas/DataBoxCredentialsUpsertDto'\n          application/json;odata.metadata=none;odata.streaming=false;IEEE754Compatible=false:\n            schema:\n              $ref: '#/components/schemas/DataBoxCredentialsUpsertDto'\n          application/json;odata.metadata=none;IEEE754Compatible=false:\n            schema:\n              $ref: '#/components/schemas/DataBoxCredentialsUpsertDto'\n          application/json;odata.metadata=none;IEEE754Compatible=true:\n            schema:\n              $ref: '#/components/schemas/DataBoxCredentialsUpsertDto'\n          application/json;odata.streaming=true;IEEE754Compatible=false:\n            schema:\n              $ref: '#/components/schemas/DataBoxCredentialsUpsertDto'\n          application/json;odata.streaming=true;IEEE754Compatible=true:\n            schema:\n              $ref: '#/components/schemas/DataBoxCredentialsUpsertDto'\n          application/json;odata.streaming=false;IEEE754Compatible=false:\n            schema:\n              $ref: '#/components/schemas/DataBoxCredentialsUpsertDto'\n          application/json;odata.streaming=false;IEEE754Compatible=true:\n            schema:\n              $ref: '#/components/schemas/DataBoxCredentialsUpsertDto'\n          application/json;IEEE754Compatible=false:\n            schema:\n              $ref: '#/components/schemas/DataBoxCredentialsUpsertDto'\n          application/json;IEEE754Compatible=true:\n            schema:\n              $ref: '#/components/schemas/DataBoxCredentialsUpsertDto'\n          application/xml:\n            schema:\n              $ref: '#/components/schemas/DataBoxCredentialsUpsertDto'\n          text/plain:\n            schema:\n              $ref: '#/components/schemas/DataBoxCredentialsUpsertDto'\n          application/json-patch+json:\n            schema:\n              $ref: '#/components/schemas/DataBoxCredentialsUpsertDto'\n          text/json:\n            schema:\n              $ref: '#/components/schemas/DataBoxCredentialsUpsertDto'\n          application/*+json:\n            schema:\n              $ref: '#/components/schemas/DataBoxCredentialsUpsertDto'\n      responses:\n        '200':\n          description: OK\n          content:\n            application/json;odata.metadata=minimal;odata.streaming=true:\n              schema:\n                $ref: '#/components/schemas/DataBoxCredentials'\n            application/json;odata.metadata=minimal;odata.streaming=false:\n              schema:\n                $ref: '#/components/schemas/DataBoxCredentials'\n            application/json;odata.metadata=minimal:\n              schema:\n                $ref: '#/components/schemas/DataBoxCredentials'\n            application/json;odata.metadata=full;odata.streaming=true:\n              schema:\n                $ref: '#/components/schemas/DataBoxCredentials'\n            application/json;odata.metadata=full;odata.streaming=false:\n              schema:\n                $ref: '#/components/schemas/DataBoxCredentials'\n            application/json;odata.metadata=full:\n              schema:\n                $ref: '#/components/schemas/DataBoxCredentials'\n            application/json;odata.metadata=none;odata.streaming=true:\n              schema:\n                $ref: '#/components/schemas/DataBoxCredentials'\n            application/json;odata.metadata=none;odata.streaming=false:\n              schema:\n                $ref: '#/components/schemas/DataBoxCredentials'\n            application/json;odata.metadata=none:\n              schema:\n                $ref: '#/components/schemas/DataBoxCredentials'\n            application/json;odata.streaming=true:\n              schema:\n                $ref: '#/components/schemas/DataBoxCredentials'\n            application/json;odata.streaming=false:\n              schema:\n                $ref: '#/components/schemas/DataBoxCredentials'\n            application/json:\n              schema:\n                $ref: '#/components/schemas/DataBoxCredentials'\n            application/json;odata.metadata=minimal;odata.streaming=true;IEEE754Compatible=false:\n              schema:\n                $ref: '#/components/schemas/DataBoxCredentials'\n            application/json;odata.metadata=minimal;odata.streaming=true;IEEE754Compatible=true:\n              schema:\n                $ref: '#/components/schemas/DataBoxCredentials'\n            application/json;odata.metadata=minimal;odata.streaming=false;IEEE754Compatible=false:\n              schema:\n                $ref: '#/components/schemas/DataBoxCredentials'\n            application/json;odata.metadata=minimal;odata.streaming=false;IEEE754Compatible=true:\n              schema:\n                $ref: '#/components/schemas/DataBoxCredentials'\n            application/json;odata.metadata=minimal;IEEE754Compatible=false:\n              schema:\n                $ref: '#/components/schemas/DataBoxCredentials'\n            application/json;odata.metadata=minimal;IEEE754Compatible=true:\n              schema:\n                $ref: '#/components/schemas/DataBoxCredentials'\n            application/json;odata.metadata=full;odata.streaming=true;IEEE754Compatible=false:\n              schema:\n                $ref: '#/components/schemas/DataBoxCredentials'\n            application/json;odata.metadata=full;odata.streaming=true;IEEE754Compatible=true:\n              schema:\n                $ref: '#/components/schemas/DataBoxCredentials'\n            application/json;odata.metadata=full;odata.streaming=false;IEEE754Compatible=false:\n              schema:\n                $ref: '#/components/schemas/DataBoxCredentials'\n            application/json;odata.metadata=full;odata.streaming=false;IEEE754Compatible=true:\n              schema:\n                $ref: '#/components/schemas/DataBoxCredentials'\n            application/json;odata.metadata=full;IEEE754Compatible=false:\n              schema:\n                $ref: '#/components/schemas/DataBoxCredentials'\n            application/json;odata.metadata=full;IEEE754Compatible=true:\n              schema:\n                $ref: '#/components/schemas/DataBoxCredentials'\n            application/json;odata.metadata=none;odata.streaming=true;IEEE754Compatible=false:\n              schema:\n                $ref: '#/components/schemas/DataBoxCredentials'\n            application/json;odata.metadata=none;odata.streaming=true;IEEE754Compatible=true:\n              schema:\n                $ref: '#/components/schemas/DataBoxCredentials'\n            application/json;odata.metadata=none;odata.streaming=false;IEEE754Compatible=true:\n              schema:\n                $ref: '#/components/schemas/DataBoxCredentials'\n            application/json;odata.metadata=none;odata.streaming=false;IEEE754Compatible=false:\n              schema:\n                $ref: '#/components/schemas/DataBoxCredentials'\n            application/json;odata.metadata=none;IEEE754Compatible=false:\n              schema:\n                $ref: '#/components/schemas/DataBoxCredentials'\n            application/json;odata.metadata=none;IEEE754Compatible=true:\n              schema:\n                $ref: '#/components/schemas/DataBoxCredentials'\n            application/json;odata.streaming=true;IEEE754Compatible=false:\n              schema:\n                $ref: '#/components/schemas/DataBoxCredentials'\n            application/json;odata.streaming=true;IEEE754Compatible=true:\n              schema:\n                $ref: '#/components/schemas/DataBoxCredentials'\n            application/json;odata.streaming=false;IEEE754Compatible=false:\n              schema:\n                $ref: '#/components/schemas/DataBoxCredentials'\n            application/json;odata.streaming=false;IEEE754Compatible=true:\n              schema:\n                $ref: '#/components/schemas/DataBoxCredentials'\n            application/json;IEEE754Compatible=false:\n              schema:\n                $ref: '#/components/schemas/DataBoxCredentials'\n            application/json;IEEE754Compatible=true:\n              schema:\n                $ref: '#/components/schemas/DataBoxCredentials'\n            application/xml:\n              schema:\n                $ref: '#/components/schemas/DataBoxCredentials'\n            text/plain:\n              schema:\n                $ref: '#/components/schemas/DataBoxCredentials'\n            application/octet-stream:\n              schema:\n                $ref: '#/components/schemas/DataBoxCredentials'\n            text/json:\n              schema:\n                $ref: '#/components/schemas/DataBoxCredentials'\n  /api/v1/data-box-credentials/{id}:\n    delete:\n      tags:\n        - DataBoxCredentials\n      parameters:\n        - name: id\n          in: path\n          required: true\n          schema:\n            type: integer\n            format: int32\n      responses:\n        '200':\n          description: OK\n  /api/v1/odata/DataBoxCredentials:\n    get:\n      tags:\n        - DataBoxCredentials\n      operationId: api/v{version:apiVersion}/odata/DataBoxCredentials\n      parameters:\n        - name: includePassword\n          in: query\n          schema:\n            type: boolean\n        - name: select\n          in: query\n          description: Limits the properties returned in the result.\n          schema:\n            type: string\n        - name: expand\n          in: query\n          description: Indicates the related entities to be represented inline. The\n            maximum depth is 2.\n          schema:\n            type: string\n        - name: filter\n          in: query\n          description: 'Restricts the set of items returned. The maximum number of\n            expressions is 100. The allowed functions are: allfunctions.'\n          schema:\n            type: string\n        - name: orderby\n          in: query\n          description: Specifies the order in which items are returned. The maximum number\n            of expressions is 5.\n          schema:\n            type: string\n        - name: top\n          in: query\n          description: Limits the number of items returned from a collection. The maximum\n            value is 100.\n          schema:\n            type: integer\n            format: int32\n        - name: skip\n          in: query\n          description: Excludes the specified number of items of the queried collection\n            from the result.\n          schema:\n            type: integer\n            format: int32\n        - name: count\n          in: query\n          description: Indicates whether the total count of items within a collection are\n            returned in the result.\n          schema:\n            type: boolean\n            default: false\n      responses:\n        '200':\n          description: OK\n          content:\n            application/json;odata.metadata=minimal;odata.streaming=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/DataBoxCredentials'\n            application/json;odata.metadata=minimal;odata.streaming=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/DataBoxCredentials'\n            application/json;odata.metadata=minimal:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/DataBoxCredentials'\n            application/json;odata.metadata=full;odata.streaming=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/DataBoxCredentials'\n            application/json;odata.metadata=full;odata.streaming=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/DataBoxCredentials'\n            application/json;odata.metadata=full:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/DataBoxCredentials'\n            application/json;odata.metadata=none;odata.streaming=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/DataBoxCredentials'\n            application/json;odata.metadata=none;odata.streaming=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/DataBoxCredentials'\n            application/json;odata.metadata=none:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/DataBoxCredentials'\n            application/json;odata.streaming=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/DataBoxCredentials'\n            application/json;odata.streaming=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/DataBoxCredentials'\n            application/json:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/DataBoxCredentials'\n            application/json;odata.metadata=minimal;odata.streaming=true;IEEE754Compatible=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/DataBoxCredentials'\n            application/json;odata.metadata=minimal;odata.streaming=true;IEEE754Compatible=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/DataBoxCredentials'\n            application/json;odata.metadata=minimal;odata.streaming=false;IEEE754Compatible=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/DataBoxCredentials'\n            application/json;odata.metadata=minimal;odata.streaming=false;IEEE754Compatible=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/DataBoxCredentials'\n            application/json;odata.metadata=minimal;IEEE754Compatible=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/DataBoxCredentials'\n            application/json;odata.metadata=minimal;IEEE754Compatible=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/DataBoxCredentials'\n            application/json;odata.metadata=full;odata.streaming=true;IEEE754Compatible=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/DataBoxCredentials'\n            application/json;odata.metadata=full;odata.streaming=true;IEEE754Compatible=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/DataBoxCredentials'\n            application/json;odata.metadata=full;odata.streaming=false;IEEE754Compatible=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/DataBoxCredentials'\n            application/json;odata.metadata=full;odata.streaming=false;IEEE754Compatible=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/DataBoxCredentials'\n            application/json;odata.metadata=full;IEEE754Compatible=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/DataBoxCredentials'\n            application/json;odata.metadata=full;IEEE754Compatible=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/DataBoxCredentials'\n            application/json;odata.metadata=none;odata.streaming=true;IEEE754Compatible=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/DataBoxCredentials'\n            application/json;odata.metadata=none;odata.streaming=true;IEEE754Compatible=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/DataBoxCredentials'\n            application/json;odata.metadata=none;odata.streaming=false;IEEE754Compatible=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/DataBoxCredentials'\n            application/json;odata.metadata=none;odata.streaming=false;IEEE754Compatible=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/DataBoxCredentials'\n            application/json;odata.metadata=none;IEEE754Compatible=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/DataBoxCredentials'\n            application/json;odata.metadata=none;IEEE754Compatible=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/DataBoxCredentials'\n            application/json;odata.streaming=true;IEEE754Compatible=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/DataBoxCredentials'\n            application/json;odata.streaming=true;IEEE754Compatible=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/DataBoxCredentials'\n            application/json;odata.streaming=false;IEEE754Compatible=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/DataBoxCredentials'\n            application/json;odata.streaming=false;IEEE754Compatible=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/DataBoxCredentials'\n            application/json;IEEE754Compatible=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/DataBoxCredentials'\n            application/json;IEEE754Compatible=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/DataBoxCredentials'\n            application/xml:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/DataBoxCredentials'\n            text/plain:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/DataBoxCredentials'\n            application/octet-stream:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/DataBoxCredentials'\n            text/json:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/DataBoxCredentials'\n  /api/v1/odata/DataBoxCredentials/$count:\n    get:\n      tags:\n        - DataBoxCredentials\n      operationId: api/v{version:apiVersion}/odata/DataBoxCredentials/$count\n      parameters:\n        - name: includePassword\n          in: query\n          schema:\n            type: boolean\n        - name: select\n          in: query\n          description: Limits the properties returned in the result.\n          schema:\n            type: string\n        - name: expand\n          in: query\n          description: Indicates the related entities to be represented inline. The\n            maximum depth is 2.\n          schema:\n            type: string\n        - name: filter\n          in: query\n          description: 'Restricts the set of items returned. The maximum number of\n            expressions is 100. The allowed functions are: allfunctions.'\n          schema:\n            type: string\n        - name: orderby\n          in: query\n          description: Specifies the order in which items are returned. The maximum number\n            of expressions is 5.\n          schema:\n            type: string\n        - name: top\n          in: query\n          description: Limits the number of items returned from a collection. The maximum\n            value is 100.\n          schema:\n            type: integer\n            format: int32\n        - name: skip\n          in: query\n          description: Excludes the specified number of items of the queried collection\n            from the result.\n          schema:\n            type: integer\n            format: int32\n        - name: count\n          in: query\n          description: Indicates whether the total count of items within a collection are\n            returned in the result.\n          schema:\n            type: boolean\n            default: false\n      responses:\n        '200':\n          description: OK\n          content:\n            application/json;odata.metadata=minimal;odata.streaming=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/DataBoxCredentials'\n            application/json;odata.metadata=minimal;odata.streaming=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/DataBoxCredentials'\n            application/json;odata.metadata=minimal:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/DataBoxCredentials'\n            application/json;odata.metadata=full;odata.streaming=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/DataBoxCredentials'\n            application/json;odata.metadata=full;odata.streaming=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/DataBoxCredentials'\n            application/json;odata.metadata=full:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/DataBoxCredentials'\n            application/json;odata.metadata=none;odata.streaming=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/DataBoxCredentials'\n            application/json;odata.metadata=none;odata.streaming=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/DataBoxCredentials'\n            application/json;odata.metadata=none:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/DataBoxCredentials'\n            application/json;odata.streaming=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/DataBoxCredentials'\n            application/json;odata.streaming=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/DataBoxCredentials'\n            application/json:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/DataBoxCredentials'\n            application/json;odata.metadata=minimal;odata.streaming=true;IEEE754Compatible=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/DataBoxCredentials'\n            application/json;odata.metadata=minimal;odata.streaming=true;IEEE754Compatible=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/DataBoxCredentials'\n            application/json;odata.metadata=minimal;odata.streaming=false;IEEE754Compatible=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/DataBoxCredentials'\n            application/json;odata.metadata=minimal;odata.streaming=false;IEEE754Compatible=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/DataBoxCredentials'\n            application/json;odata.metadata=minimal;IEEE754Compatible=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/DataBoxCredentials'\n            application/json;odata.metadata=minimal;IEEE754Compatible=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/DataBoxCredentials'\n            application/json;odata.metadata=full;odata.streaming=true;IEEE754Compatible=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/DataBoxCredentials'\n            application/json;odata.metadata=full;odata.streaming=true;IEEE754Compatible=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/DataBoxCredentials'\n            application/json;odata.metadata=full;odata.streaming=false;IEEE754Compatible=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/DataBoxCredentials'\n            application/json;odata.metadata=full;odata.streaming=false;IEEE754Compatible=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/DataBoxCredentials'\n            application/json;odata.metadata=full;IEEE754Compatible=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/DataBoxCredentials'\n            application/json;odata.metadata=full;IEEE754Compatible=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/DataBoxCredentials'\n            application/json;odata.metadata=none;odata.streaming=true;IEEE754Compatible=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/DataBoxCredentials'\n            application/json;odata.metadata=none;odata.streaming=true;IEEE754Compatible=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/DataBoxCredentials'\n            application/json;odata.metadata=none;odata.streaming=false;IEEE754Compatible=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/DataBoxCredentials'\n            application/json;odata.metadata=none;odata.streaming=false;IEEE754Compatible=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/DataBoxCredentials'\n            application/json;odata.metadata=none;IEEE754Compatible=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/DataBoxCredentials'\n            application/json;odata.metadata=none;IEEE754Compatible=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/DataBoxCredentials'\n            application/json;odata.streaming=true;IEEE754Compatible=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/DataBoxCredentials'\n            application/json;odata.streaming=true;IEEE754Compatible=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/DataBoxCredentials'\n            application/json;odata.streaming=false;IEEE754Compatible=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/DataBoxCredentials'\n            application/json;odata.streaming=false;IEEE754Compatible=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/DataBoxCredentials'\n            application/json;IEEE754Compatible=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/DataBoxCredentials'\n            application/json;IEEE754Compatible=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/DataBoxCredentials'\n            application/xml:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/DataBoxCredentials'\n            text/plain:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/DataBoxCredentials'\n            application/octet-stream:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/DataBoxCredentials'\n            text/json:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/DataBoxCredentials'\n  /api/dev:\n    get:\n      tags:\n        - Dev\n      responses:\n        '200':\n          description: OK\n  /api/dev/reseed-db:\n    get:\n      tags:\n        - Dev\n      responses:\n        '200':\n          description: OK\n  /api/dev/db-reset:\n    get:\n      tags:\n        - Dev\n      responses:\n        '200':\n          description: OK\n  /api/dev/db/reset:\n    get:\n      tags:\n        - Dev\n      responses:\n        '200':\n          description: OK\n  /api/dev/db/create:\n    get:\n      tags:\n        - Dev\n      responses:\n        '200':\n          description: OK\n  /api/dev/db/touch:\n    get:\n      tags:\n        - Dev\n      responses:\n        '200':\n          description: OK\n  /api/dev/seed:\n    get:\n      tags:\n        - Dev\n      responses:\n        '200':\n          description: OK\n  /api/dev/seed-all:\n    get:\n      tags:\n        - Dev\n      responses:\n        '200':\n          description: OK\n  /api/dev/seed-prod:\n    get:\n      tags:\n        - Dev\n      responses:\n        '200':\n          description: OK\n  /api/dev/job/process-recurring-tasks:\n    get:\n      tags:\n        - Dev\n      parameters:\n        - name: refDay\n          in: query\n          schema:\n            type: string\n            format: date\n      responses:\n        '200':\n          description: OK\n  /api/dev/notifications/send-test:\n    get:\n      tags:\n        - Dev\n      parameters:\n        - name: userId\n          in: query\n          schema:\n            type: integer\n            format: int32\n            default: 1\n      responses:\n        '200':\n          description: OK\n  /api/dev/confirm-email:\n    get:\n      tags:\n        - Dev\n      parameters:\n        - name: email\n          in: query\n          schema:\n            type: string\n            format: email\n      responses:\n        '200':\n          description: OK\n  /api/dev/email/send-test:\n    get:\n      tags:\n        - Dev\n      parameters:\n        - name: to\n          in: query\n          schema:\n            type: string\n        - name: subject\n          in: query\n          schema:\n            type: string\n        - name: message\n          in: query\n          schema:\n            type: string\n      responses:\n        '200':\n          description: OK\n  /api/v1/notifications/device-tokens:\n    put:\n      tags:\n        - DeviceTokens\n      requestBody:\n        content:\n          application/json;odata.metadata=minimal;odata.streaming=true:\n            schema:\n              $ref: '#/components/schemas/NotificationsDeviceTokenUpsertDto'\n          application/json;odata.metadata=minimal;odata.streaming=false:\n            schema:\n              $ref: '#/components/schemas/NotificationsDeviceTokenUpsertDto'\n          application/json;odata.metadata=minimal:\n            schema:\n              $ref: '#/components/schemas/NotificationsDeviceTokenUpsertDto'\n          application/json;odata.metadata=full;odata.streaming=true:\n            schema:\n              $ref: '#/components/schemas/NotificationsDeviceTokenUpsertDto'\n          application/json;odata.metadata=full;odata.streaming=false:\n            schema:\n              $ref: '#/components/schemas/NotificationsDeviceTokenUpsertDto'\n          application/json;odata.metadata=full:\n            schema:\n              $ref: '#/components/schemas/NotificationsDeviceTokenUpsertDto'\n          application/json;odata.metadata=none;odata.streaming=true:\n            schema:\n              $ref: '#/components/schemas/NotificationsDeviceTokenUpsertDto'\n          application/json;odata.metadata=none;odata.streaming=false:\n            schema:\n              $ref: '#/components/schemas/NotificationsDeviceTokenUpsertDto'\n          application/json;odata.metadata=none:\n            schema:\n              $ref: '#/components/schemas/NotificationsDeviceTokenUpsertDto'\n          application/json;odata.streaming=true:\n            schema:\n              $ref: '#/components/schemas/NotificationsDeviceTokenUpsertDto'\n          application/json;odata.streaming=false:\n            schema:\n              $ref: '#/components/schemas/NotificationsDeviceTokenUpsertDto'\n          application/json:\n            schema:\n              $ref: '#/components/schemas/NotificationsDeviceTokenUpsertDto'\n          application/json;odata.metadata=minimal;odata.streaming=true;IEEE754Compatible=false:\n            schema:\n              $ref: '#/components/schemas/NotificationsDeviceTokenUpsertDto'\n          application/json;odata.metadata=minimal;odata.streaming=true;IEEE754Compatible=true:\n            schema:\n              $ref: '#/components/schemas/NotificationsDeviceTokenUpsertDto'\n          application/json;odata.metadata=minimal;odata.streaming=false;IEEE754Compatible=false:\n            schema:\n              $ref: '#/components/schemas/NotificationsDeviceTokenUpsertDto'\n          application/json;odata.metadata=minimal;odata.streaming=false;IEEE754Compatible=true:\n            schema:\n              $ref: '#/components/schemas/NotificationsDeviceTokenUpsertDto'\n          application/json;odata.metadata=minimal;IEEE754Compatible=false:\n            schema:\n              $ref: '#/components/schemas/NotificationsDeviceTokenUpsertDto'\n          application/json;odata.metadata=minimal;IEEE754Compatible=true:\n            schema:\n              $ref: '#/components/schemas/NotificationsDeviceTokenUpsertDto'\n          application/json;odata.metadata=full;odata.streaming=true;IEEE754Compatible=false:\n            schema:\n              $ref: '#/components/schemas/NotificationsDeviceTokenUpsertDto'\n          application/json;odata.metadata=full;odata.streaming=true;IEEE754Compatible=true:\n            schema:\n              $ref: '#/components/schemas/NotificationsDeviceTokenUpsertDto'\n          application/json;odata.metadata=full;odata.streaming=false;IEEE754Compatible=false:\n            schema:\n              $ref: '#/components/schemas/NotificationsDeviceTokenUpsertDto'\n          application/json;odata.metadata=full;odata.streaming=false;IEEE754Compatible=true:\n            schema:\n              $ref: '#/components/schemas/NotificationsDeviceTokenUpsertDto'\n          application/json;odata.metadata=full;IEEE754Compatible=false:\n            schema:\n              $ref: '#/components/schemas/NotificationsDeviceTokenUpsertDto'\n          application/json;odata.metadata=full;IEEE754Compatible=true:\n            schema:\n              $ref: '#/components/schemas/NotificationsDeviceTokenUpsertDto'\n          application/json;odata.metadata=none;odata.streaming=true;IEEE754Compatible=false:\n            schema:\n              $ref: '#/components/schemas/NotificationsDeviceTokenUpsertDto'\n          application/json;odata.metadata=none;odata.streaming=true;IEEE754Compatible=true:\n            schema:\n              $ref: '#/components/schemas/NotificationsDeviceTokenUpsertDto'\n          application/json;odata.metadata=none;odata.streaming=false;IEEE754Compatible=true:\n            schema:\n              $ref: '#/components/schemas/NotificationsDeviceTokenUpsertDto'\n          application/json;odata.metadata=none;odata.streaming=false;IEEE754Compatible=false:\n            schema:\n              $ref: '#/components/schemas/NotificationsDeviceTokenUpsertDto'\n          application/json;odata.metadata=none;IEEE754Compatible=false:\n            schema:\n              $ref: '#/components/schemas/NotificationsDeviceTokenUpsertDto'\n          application/json;odata.metadata=none;IEEE754Compatible=true:\n            schema:\n              $ref: '#/components/schemas/NotificationsDeviceTokenUpsertDto'\n          application/json;odata.streaming=true;IEEE754Compatible=false:\n            schema:\n              $ref: '#/components/schemas/NotificationsDeviceTokenUpsertDto'\n          application/json;odata.streaming=true;IEEE754Compatible=true:\n            schema:\n              $ref: '#/components/schemas/NotificationsDeviceTokenUpsertDto'\n          application/json;odata.streaming=false;IEEE754Compatible=false:\n            schema:\n              $ref: '#/components/schemas/NotificationsDeviceTokenUpsertDto'\n          application/json;odata.streaming=false;IEEE754Compatible=true:\n            schema:\n              $ref: '#/components/schemas/NotificationsDeviceTokenUpsertDto'\n          application/json;IEEE754Compatible=false:\n            schema:\n              $ref: '#/components/schemas/NotificationsDeviceTokenUpsertDto'\n          application/json;IEEE754Compatible=true:\n            schema:\n              $ref: '#/components/schemas/NotificationsDeviceTokenUpsertDto'\n          application/xml:\n            schema:\n              $ref: '#/components/schemas/NotificationsDeviceTokenUpsertDto'\n          text/plain:\n            schema:\n              $ref: '#/components/schemas/NotificationsDeviceTokenUpsertDto'\n          application/json-patch+json:\n            schema:\n              $ref: '#/components/schemas/NotificationsDeviceTokenUpsertDto'\n          text/json:\n            schema:\n              $ref: '#/components/schemas/NotificationsDeviceTokenUpsertDto'\n          application/*+json:\n            schema:\n              $ref: '#/components/schemas/NotificationsDeviceTokenUpsertDto'\n      responses:\n        '200':\n          description: OK\n    delete:\n      tags:\n        - DeviceTokens\n      requestBody:\n        content:\n          application/json;odata.metadata=minimal;odata.streaming=true:\n            schema:\n              $ref: '#/components/schemas/NotificationsDeviceTokenDeleteDto'\n          application/json;odata.metadata=minimal;odata.streaming=false:\n            schema:\n              $ref: '#/components/schemas/NotificationsDeviceTokenDeleteDto'\n          application/json;odata.metadata=minimal:\n            schema:\n              $ref: '#/components/schemas/NotificationsDeviceTokenDeleteDto'\n          application/json;odata.metadata=full;odata.streaming=true:\n            schema:\n              $ref: '#/components/schemas/NotificationsDeviceTokenDeleteDto'\n          application/json;odata.metadata=full;odata.streaming=false:\n            schema:\n              $ref: '#/components/schemas/NotificationsDeviceTokenDeleteDto'\n          application/json;odata.metadata=full:\n            schema:\n              $ref: '#/components/schemas/NotificationsDeviceTokenDeleteDto'\n          application/json;odata.metadata=none;odata.streaming=true:\n            schema:\n              $ref: '#/components/schemas/NotificationsDeviceTokenDeleteDto'\n          application/json;odata.metadata=none;odata.streaming=false:\n            schema:\n              $ref: '#/components/schemas/NotificationsDeviceTokenDeleteDto'\n          application/json;odata.metadata=none:\n            schema:\n              $ref: '#/components/schemas/NotificationsDeviceTokenDeleteDto'\n          application/json;odata.streaming=true:\n            schema:\n              $ref: '#/components/schemas/NotificationsDeviceTokenDeleteDto'\n          application/json;odata.streaming=false:\n            schema:\n              $ref: '#/components/schemas/NotificationsDeviceTokenDeleteDto'\n          application/json:\n            schema:\n              $ref: '#/components/schemas/NotificationsDeviceTokenDeleteDto'\n          application/json;odata.metadata=minimal;odata.streaming=true;IEEE754Compatible=false:\n            schema:\n              $ref: '#/components/schemas/NotificationsDeviceTokenDeleteDto'\n          application/json;odata.metadata=minimal;odata.streaming=true;IEEE754Compatible=true:\n            schema:\n              $ref: '#/components/schemas/NotificationsDeviceTokenDeleteDto'\n          application/json;odata.metadata=minimal;odata.streaming=false;IEEE754Compatible=false:\n            schema:\n              $ref: '#/components/schemas/NotificationsDeviceTokenDeleteDto'\n          application/json;odata.metadata=minimal;odata.streaming=false;IEEE754Compatible=true:\n            schema:\n              $ref: '#/components/schemas/NotificationsDeviceTokenDeleteDto'\n          application/json;odata.metadata=minimal;IEEE754Compatible=false:\n            schema:\n              $ref: '#/components/schemas/NotificationsDeviceTokenDeleteDto'\n          application/json;odata.metadata=minimal;IEEE754Compatible=true:\n            schema:\n              $ref: '#/components/schemas/NotificationsDeviceTokenDeleteDto'\n          application/json;odata.metadata=full;odata.streaming=true;IEEE754Compatible=false:\n            schema:\n              $ref: '#/components/schemas/NotificationsDeviceTokenDeleteDto'\n          application/json;odata.metadata=full;odata.streaming=true;IEEE754Compatible=true:\n            schema:\n              $ref: '#/components/schemas/NotificationsDeviceTokenDeleteDto'\n          application/json;odata.metadata=full;odata.streaming=false;IEEE754Compatible=false:\n            schema:\n              $ref: '#/components/schemas/NotificationsDeviceTokenDeleteDto'\n          application/json;odata.metadata=full;odata.streaming=false;IEEE754Compatible=true:\n            schema:\n              $ref: '#/components/schemas/NotificationsDeviceTokenDeleteDto'\n          application/json;odata.metadata=full;IEEE754Compatible=false:\n            schema:\n              $ref: '#/components/schemas/NotificationsDeviceTokenDeleteDto'\n          application/json;odata.metadata=full;IEEE754Compatible=true:\n            schema:\n              $ref: '#/components/schemas/NotificationsDeviceTokenDeleteDto'\n          application/json;odata.metadata=none;odata.streaming=true;IEEE754Compatible=false:\n            schema:\n              $ref: '#/components/schemas/NotificationsDeviceTokenDeleteDto'\n          application/json;odata.metadata=none;odata.streaming=true;IEEE754Compatible=true:\n            schema:\n              $ref: '#/components/schemas/NotificationsDeviceTokenDeleteDto'\n          application/json;odata.metadata=none;odata.streaming=false;IEEE754Compatible=true:\n            schema:\n              $ref: '#/components/schemas/NotificationsDeviceTokenDeleteDto'\n          application/json;odata.metadata=none;odata.streaming=false;IEEE754Compatible=false:\n            schema:\n              $ref: '#/components/schemas/NotificationsDeviceTokenDeleteDto'\n          application/json;odata.metadata=none;IEEE754Compatible=false:\n            schema:\n              $ref: '#/components/schemas/NotificationsDeviceTokenDeleteDto'\n          application/json;odata.metadata=none;IEEE754Compatible=true:\n            schema:\n              $ref: '#/components/schemas/NotificationsDeviceTokenDeleteDto'\n          application/json;odata.streaming=true;IEEE754Compatible=false:\n            schema:\n              $ref: '#/components/schemas/NotificationsDeviceTokenDeleteDto'\n          application/json;odata.streaming=true;IEEE754Compatible=true:\n            schema:\n              $ref: '#/components/schemas/NotificationsDeviceTokenDeleteDto'\n          application/json;odata.streaming=false;IEEE754Compatible=false:\n            schema:\n              $ref: '#/components/schemas/NotificationsDeviceTokenDeleteDto'\n          application/json;odata.streaming=false;IEEE754Compatible=true:\n            schema:\n              $ref: '#/components/schemas/NotificationsDeviceTokenDeleteDto'\n          application/json;IEEE754Compatible=false:\n            schema:\n              $ref: '#/components/schemas/NotificationsDeviceTokenDeleteDto'\n          application/json;IEEE754Compatible=true:\n            schema:\n              $ref: '#/components/schemas/NotificationsDeviceTokenDeleteDto'\n          application/xml:\n            schema:\n              $ref: '#/components/schemas/NotificationsDeviceTokenDeleteDto'\n          text/plain:\n            schema:\n              $ref: '#/components/schemas/NotificationsDeviceTokenDeleteDto'\n          application/json-patch+json:\n            schema:\n              $ref: '#/components/schemas/NotificationsDeviceTokenDeleteDto'\n          text/json:\n            schema:\n              $ref: '#/components/schemas/NotificationsDeviceTokenDeleteDto'\n          application/*+json:\n            schema:\n              $ref: '#/components/schemas/NotificationsDeviceTokenDeleteDto'\n      responses:\n        '200':\n          description: OK\n  /api/v1/odata/DocumentTypes:\n    get:\n      tags:\n        - DocumentTypes\n      operationId: api/v{version:apiVersion}/odata/DocumentTypes\n      parameters:\n        - name: select\n          in: query\n          description: Limits the properties returned in the result.\n          schema:\n            type: string\n        - name: expand\n          in: query\n          description: Indicates the related entities to be represented inline. The\n            maximum depth is 2.\n          schema:\n            type: string\n        - name: filter\n          in: query\n          description: 'Restricts the set of items returned. The maximum number of\n            expressions is 100. The allowed functions are: allfunctions.'\n          schema:\n            type: string\n        - name: orderby\n          in: query\n          description: Specifies the order in which items are returned. The maximum number\n            of expressions is 5.\n          schema:\n            type: string\n        - name: top\n          in: query\n          description: Limits the number of items returned from a collection. The maximum\n            value is 100.\n          schema:\n            type: integer\n            format: int32\n        - name: skip\n          in: query\n          description: Excludes the specified number of items of the queried collection\n            from the result.\n          schema:\n            type: integer\n            format: int32\n        - name: count\n          in: query\n          description: Indicates whether the total count of items within a collection are\n            returned in the result.\n          schema:\n            type: boolean\n            default: false\n      responses:\n        '200':\n          description: OK\n          content:\n            application/json;odata.metadata=minimal;odata.streaming=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/DocumentType'\n            application/json;odata.metadata=minimal;odata.streaming=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/DocumentType'\n            application/json;odata.metadata=minimal:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/DocumentType'\n            application/json;odata.metadata=full;odata.streaming=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/DocumentType'\n            application/json;odata.metadata=full;odata.streaming=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/DocumentType'\n            application/json;odata.metadata=full:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/DocumentType'\n            application/json;odata.metadata=none;odata.streaming=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/DocumentType'\n            application/json;odata.metadata=none;odata.streaming=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/DocumentType'\n            application/json;odata.metadata=none:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/DocumentType'\n            application/json;odata.streaming=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/DocumentType'\n            application/json;odata.streaming=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/DocumentType'\n            application/json:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/DocumentType'\n            application/json;odata.metadata=minimal;odata.streaming=true;IEEE754Compatible=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/DocumentType'\n            application/json;odata.metadata=minimal;odata.streaming=true;IEEE754Compatible=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/DocumentType'\n            application/json;odata.metadata=minimal;odata.streaming=false;IEEE754Compatible=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/DocumentType'\n            application/json;odata.metadata=minimal;odata.streaming=false;IEEE754Compatible=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/DocumentType'\n            application/json;odata.metadata=minimal;IEEE754Compatible=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/DocumentType'\n            application/json;odata.metadata=minimal;IEEE754Compatible=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/DocumentType'\n            application/json;odata.metadata=full;odata.streaming=true;IEEE754Compatible=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/DocumentType'\n            application/json;odata.metadata=full;odata.streaming=true;IEEE754Compatible=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/DocumentType'\n            application/json;odata.metadata=full;odata.streaming=false;IEEE754Compatible=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/DocumentType'\n            application/json;odata.metadata=full;odata.streaming=false;IEEE754Compatible=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/DocumentType'\n            application/json;odata.metadata=full;IEEE754Compatible=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/DocumentType'\n            application/json;odata.metadata=full;IEEE754Compatible=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/DocumentType'\n            application/json;odata.metadata=none;odata.streaming=true;IEEE754Compatible=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/DocumentType'\n            application/json;odata.metadata=none;odata.streaming=true;IEEE754Compatible=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/DocumentType'\n            application/json;odata.metadata=none;odata.streaming=false;IEEE754Compatible=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/DocumentType'\n            application/json;odata.metadata=none;odata.streaming=false;IEEE754Compatible=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/DocumentType'\n            application/json;odata.metadata=none;IEEE754Compatible=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/DocumentType'\n            application/json;odata.metadata=none;IEEE754Compatible=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/DocumentType'\n            application/json;odata.streaming=true;IEEE754Compatible=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/DocumentType'\n            application/json;odata.streaming=true;IEEE754Compatible=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/DocumentType'\n            application/json;odata.streaming=false;IEEE754Compatible=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/DocumentType'\n            application/json;odata.streaming=false;IEEE754Compatible=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/DocumentType'\n            application/json;IEEE754Compatible=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/DocumentType'\n            application/json;IEEE754Compatible=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/DocumentType'\n            application/xml:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/DocumentType'\n            text/plain:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/DocumentType'\n            application/octet-stream:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/DocumentType'\n            text/json:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/DocumentType'\n  /api/v1/odata/DocumentTypes/$count:\n    get:\n      tags:\n        - DocumentTypes\n      operationId: api/v{version:apiVersion}/odata/DocumentTypes/$count\n      parameters:\n        - name: select\n          in: query\n          description: Limits the properties returned in the result.\n          schema:\n            type: string\n        - name: expand\n          in: query\n          description: Indicates the related entities to be represented inline. The\n            maximum depth is 2.\n          schema:\n            type: string\n        - name: filter\n          in: query\n          description: 'Restricts the set of items returned. The maximum number of\n            expressions is 100. The allowed functions are: allfunctions.'\n          schema:\n            type: string\n        - name: orderby\n          in: query\n          description: Specifies the order in which items are returned. The maximum number\n            of expressions is 5.\n          schema:\n            type: string\n        - name: top\n          in: query\n          description: Limits the number of items returned from a collection. The maximum\n            value is 100.\n          schema:\n            type: integer\n            format: int32\n        - name: skip\n          in: query\n          description: Excludes the specified number of items of the queried collection\n            from the result.\n          schema:\n            type: integer\n            format: int32\n        - name: count\n          in: query\n          description: Indicates whether the total count of items within a collection are\n            returned in the result.\n          schema:\n            type: boolean\n            default: false\n      responses:\n        '200':\n          description: OK\n          content:\n            application/json;odata.metadata=minimal;odata.streaming=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/DocumentType'\n            application/json;odata.metadata=minimal;odata.streaming=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/DocumentType'\n            application/json;odata.metadata=minimal:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/DocumentType'\n            application/json;odata.metadata=full;odata.streaming=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/DocumentType'\n            application/json;odata.metadata=full;odata.streaming=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/DocumentType'\n            application/json;odata.metadata=full:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/DocumentType'\n            application/json;odata.metadata=none;odata.streaming=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/DocumentType'\n            application/json;odata.metadata=none;odata.streaming=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/DocumentType'\n            application/json;odata.metadata=none:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/DocumentType'\n            application/json;odata.streaming=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/DocumentType'\n            application/json;odata.streaming=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/DocumentType'\n            application/json:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/DocumentType'\n            application/json;odata.metadata=minimal;odata.streaming=true;IEEE754Compatible=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/DocumentType'\n            application/json;odata.metadata=minimal;odata.streaming=true;IEEE754Compatible=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/DocumentType'\n            application/json;odata.metadata=minimal;odata.streaming=false;IEEE754Compatible=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/DocumentType'\n            application/json;odata.metadata=minimal;odata.streaming=false;IEEE754Compatible=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/DocumentType'\n            application/json;odata.metadata=minimal;IEEE754Compatible=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/DocumentType'\n            application/json;odata.metadata=minimal;IEEE754Compatible=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/DocumentType'\n            application/json;odata.metadata=full;odata.streaming=true;IEEE754Compatible=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/DocumentType'\n            application/json;odata.metadata=full;odata.streaming=true;IEEE754Compatible=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/DocumentType'\n            application/json;odata.metadata=full;odata.streaming=false;IEEE754Compatible=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/DocumentType'\n            application/json;odata.metadata=full;odata.streaming=false;IEEE754Compatible=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/DocumentType'\n            application/json;odata.metadata=full;IEEE754Compatible=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/DocumentType'\n            application/json;odata.metadata=full;IEEE754Compatible=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/DocumentType'\n            application/json;odata.metadata=none;odata.streaming=true;IEEE754Compatible=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/DocumentType'\n            application/json;odata.metadata=none;odata.streaming=true;IEEE754Compatible=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/DocumentType'\n            application/json;odata.metadata=none;odata.streaming=false;IEEE754Compatible=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/DocumentType'\n            application/json;odata.metadata=none;odata.streaming=false;IEEE754Compatible=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/DocumentType'\n            application/json;odata.metadata=none;IEEE754Compatible=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/DocumentType'\n            application/json;odata.metadata=none;IEEE754Compatible=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/DocumentType'\n            application/json;odata.streaming=true;IEEE754Compatible=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/DocumentType'\n            application/json;odata.streaming=true;IEEE754Compatible=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/DocumentType'\n            application/json;odata.streaming=false;IEEE754Compatible=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/DocumentType'\n            application/json;odata.streaming=false;IEEE754Compatible=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/DocumentType'\n            application/json;IEEE754Compatible=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/DocumentType'\n            application/json;IEEE754Compatible=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/DocumentType'\n            application/xml:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/DocumentType'\n            text/plain:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/DocumentType'\n            application/octet-stream:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/DocumentType'\n            text/json:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/DocumentType'\n  /api/v1/feedback:\n    post:\n      tags:\n        - Feedback\n      requestBody:\n        content:\n          application/json;odata.metadata=minimal;odata.streaming=true:\n            schema:\n              $ref: '#/components/schemas/SendFeedbackRequest'\n          application/json;odata.metadata=minimal;odata.streaming=false:\n            schema:\n              $ref: '#/components/schemas/SendFeedbackRequest'\n          application/json;odata.metadata=minimal:\n            schema:\n              $ref: '#/components/schemas/SendFeedbackRequest'\n          application/json;odata.metadata=full;odata.streaming=true:\n            schema:\n              $ref: '#/components/schemas/SendFeedbackRequest'\n          application/json;odata.metadata=full;odata.streaming=false:\n            schema:\n              $ref: '#/components/schemas/SendFeedbackRequest'\n          application/json;odata.metadata=full:\n            schema:\n              $ref: '#/components/schemas/SendFeedbackRequest'\n          application/json;odata.metadata=none;odata.streaming=true:\n            schema:\n              $ref: '#/components/schemas/SendFeedbackRequest'\n          application/json;odata.metadata=none;odata.streaming=false:\n            schema:\n              $ref: '#/components/schemas/SendFeedbackRequest'\n          application/json;odata.metadata=none:\n            schema:\n              $ref: '#/components/schemas/SendFeedbackRequest'\n          application/json;odata.streaming=true:\n            schema:\n              $ref: '#/components/schemas/SendFeedbackRequest'\n          application/json;odata.streaming=false:\n            schema:\n              $ref: '#/components/schemas/SendFeedbackRequest'\n          application/json:\n            schema:\n              $ref: '#/components/schemas/SendFeedbackRequest'\n          application/json;odata.metadata=minimal;odata.streaming=true;IEEE754Compatible=false:\n            schema:\n              $ref: '#/components/schemas/SendFeedbackRequest'\n          application/json;odata.metadata=minimal;odata.streaming=true;IEEE754Compatible=true:\n            schema:\n              $ref: '#/components/schemas/SendFeedbackRequest'\n          application/json;odata.metadata=minimal;odata.streaming=false;IEEE754Compatible=false:\n            schema:\n              $ref: '#/components/schemas/SendFeedbackRequest'\n          application/json;odata.metadata=minimal;odata.streaming=false;IEEE754Compatible=true:\n            schema:\n              $ref: '#/components/schemas/SendFeedbackRequest'\n          application/json;odata.metadata=minimal;IEEE754Compatible=false:\n            schema:\n              $ref: '#/components/schemas/SendFeedbackRequest'\n          application/json;odata.metadata=minimal;IEEE754Compatible=true:\n            schema:\n              $ref: '#/components/schemas/SendFeedbackRequest'\n          application/json;odata.metadata=full;odata.streaming=true;IEEE754Compatible=false:\n            schema:\n              $ref: '#/components/schemas/SendFeedbackRequest'\n          application/json;odata.metadata=full;odata.streaming=true;IEEE754Compatible=true:\n            schema:\n              $ref: '#/components/schemas/SendFeedbackRequest'\n          application/json;odata.metadata=full;odata.streaming=false;IEEE754Compatible=false:\n            schema:\n              $ref: '#/components/schemas/SendFeedbackRequest'\n          application/json;odata.metadata=full;odata.streaming=false;IEEE754Compatible=true:\n            schema:\n              $ref: '#/components/schemas/SendFeedbackRequest'\n          application/json;odata.metadata=full;IEEE754Compatible=false:\n            schema:\n              $ref: '#/components/schemas/SendFeedbackRequest'\n          application/json;odata.metadata=full;IEEE754Compatible=true:\n            schema:\n              $ref: '#/components/schemas/SendFeedbackRequest'\n          application/json;odata.metadata=none;odata.streaming=true;IEEE754Compatible=false:\n            schema:\n              $ref: '#/components/schemas/SendFeedbackRequest'\n          application/json;odata.metadata=none;odata.streaming=true;IEEE754Compatible=true:\n            schema:\n              $ref: '#/components/schemas/SendFeedbackRequest'\n          application/json;odata.metadata=none;odata.streaming=false;IEEE754Compatible=true:\n            schema:\n              $ref: '#/components/schemas/SendFeedbackRequest'\n          application/json;odata.metadata=none;odata.streaming=false;IEEE754Compatible=false:\n            schema:\n              $ref: '#/components/schemas/SendFeedbackRequest'\n          application/json;odata.metadata=none;IEEE754Compatible=false:\n            schema:\n              $ref: '#/components/schemas/SendFeedbackRequest'\n          application/json;odata.metadata=none;IEEE754Compatible=true:\n            schema:\n              $ref: '#/components/schemas/SendFeedbackRequest'\n          application/json;odata.streaming=true;IEEE754Compatible=false:\n            schema:\n              $ref: '#/components/schemas/SendFeedbackRequest'\n          application/json;odata.streaming=true;IEEE754Compatible=true:\n            schema:\n              $ref: '#/components/schemas/SendFeedbackRequest'\n          application/json;odata.streaming=false;IEEE754Compatible=false:\n            schema:\n              $ref: '#/components/schemas/SendFeedbackRequest'\n          application/json;odata.streaming=false;IEEE754Compatible=true:\n            schema:\n              $ref: '#/components/schemas/SendFeedbackRequest'\n          application/json;IEEE754Compatible=false:\n            schema:\n              $ref: '#/components/schemas/SendFeedbackRequest'\n          application/json;IEEE754Compatible=true:\n            schema:\n              $ref: '#/components/schemas/SendFeedbackRequest'\n          application/xml:\n            schema:\n              $ref: '#/components/schemas/SendFeedbackRequest'\n          text/plain:\n            schema:\n              $ref: '#/components/schemas/SendFeedbackRequest'\n          application/json-patch+json:\n            schema:\n              $ref: '#/components/schemas/SendFeedbackRequest'\n          text/json:\n            schema:\n              $ref: '#/components/schemas/SendFeedbackRequest'\n          application/*+json:\n            schema:\n              $ref: '#/components/schemas/SendFeedbackRequest'\n      responses:\n        '200':\n          description: OK\n  /api/v1/invitations:\n    post:\n      tags:\n        - Invitations\n      requestBody:\n        content:\n          application/json;odata.metadata=minimal;odata.streaming=true:\n            schema:\n              $ref: '#/components/schemas/InvitationCreateDto'\n          application/json;odata.metadata=minimal;odata.streaming=false:\n            schema:\n              $ref: '#/components/schemas/InvitationCreateDto'\n          application/json;odata.metadata=minimal:\n            schema:\n              $ref: '#/components/schemas/InvitationCreateDto'\n          application/json;odata.metadata=full;odata.streaming=true:\n            schema:\n              $ref: '#/components/schemas/InvitationCreateDto'\n          application/json;odata.metadata=full;odata.streaming=false:\n            schema:\n              $ref: '#/components/schemas/InvitationCreateDto'\n          application/json;odata.metadata=full:\n            schema:\n              $ref: '#/components/schemas/InvitationCreateDto'\n          application/json;odata.metadata=none;odata.streaming=true:\n            schema:\n              $ref: '#/components/schemas/InvitationCreateDto'\n          application/json;odata.metadata=none;odata.streaming=false:\n            schema:\n              $ref: '#/components/schemas/InvitationCreateDto'\n          application/json;odata.metadata=none:\n            schema:\n              $ref: '#/components/schemas/InvitationCreateDto'\n          application/json;odata.streaming=true:\n            schema:\n              $ref: '#/components/schemas/InvitationCreateDto'\n          application/json;odata.streaming=false:\n            schema:\n              $ref: '#/components/schemas/InvitationCreateDto'\n          application/json:\n            schema:\n              $ref: '#/components/schemas/InvitationCreateDto'\n          application/json;odata.metadata=minimal;odata.streaming=true;IEEE754Compatible=false:\n            schema:\n              $ref: '#/components/schemas/InvitationCreateDto'\n          application/json;odata.metadata=minimal;odata.streaming=true;IEEE754Compatible=true:\n            schema:\n              $ref: '#/components/schemas/InvitationCreateDto'\n          application/json;odata.metadata=minimal;odata.streaming=false;IEEE754Compatible=false:\n            schema:\n              $ref: '#/components/schemas/InvitationCreateDto'\n          application/json;odata.metadata=minimal;odata.streaming=false;IEEE754Compatible=true:\n            schema:\n              $ref: '#/components/schemas/InvitationCreateDto'\n          application/json;odata.metadata=minimal;IEEE754Compatible=false:\n            schema:\n              $ref: '#/components/schemas/InvitationCreateDto'\n          application/json;odata.metadata=minimal;IEEE754Compatible=true:\n            schema:\n              $ref: '#/components/schemas/InvitationCreateDto'\n          application/json;odata.metadata=full;odata.streaming=true;IEEE754Compatible=false:\n            schema:\n              $ref: '#/components/schemas/InvitationCreateDto'\n          application/json;odata.metadata=full;odata.streaming=true;IEEE754Compatible=true:\n            schema:\n              $ref: '#/components/schemas/InvitationCreateDto'\n          application/json;odata.metadata=full;odata.streaming=false;IEEE754Compatible=false:\n            schema:\n              $ref: '#/components/schemas/InvitationCreateDto'\n          application/json;odata.metadata=full;odata.streaming=false;IEEE754Compatible=true:\n            schema:\n              $ref: '#/components/schemas/InvitationCreateDto'\n          application/json;odata.metadata=full;IEEE754Compatible=false:\n            schema:\n              $ref: '#/components/schemas/InvitationCreateDto'\n          application/json;odata.metadata=full;IEEE754Compatible=true:\n            schema:\n              $ref: '#/components/schemas/InvitationCreateDto'\n          application/json;odata.metadata=none;odata.streaming=true;IEEE754Compatible=false:\n            schema:\n              $ref: '#/components/schemas/InvitationCreateDto'\n          application/json;odata.metadata=none;odata.streaming=true;IEEE754Compatible=true:\n            schema:\n              $ref: '#/components/schemas/InvitationCreateDto'\n          application/json;odata.metadata=none;odata.streaming=false;IEEE754Compatible=true:\n            schema:\n              $ref: '#/components/schemas/InvitationCreateDto'\n          application/json;odata.metadata=none;odata.streaming=false;IEEE754Compatible=false:\n            schema:\n              $ref: '#/components/schemas/InvitationCreateDto'\n          application/json;odata.metadata=none;IEEE754Compatible=false:\n            schema:\n              $ref: '#/components/schemas/InvitationCreateDto'\n          application/json;odata.metadata=none;IEEE754Compatible=true:\n            schema:\n              $ref: '#/components/schemas/InvitationCreateDto'\n          application/json;odata.streaming=true;IEEE754Compatible=false:\n            schema:\n              $ref: '#/components/schemas/InvitationCreateDto'\n          application/json;odata.streaming=true;IEEE754Compatible=true:\n            schema:\n              $ref: '#/components/schemas/InvitationCreateDto'\n          application/json;odata.streaming=false;IEEE754Compatible=false:\n            schema:\n              $ref: '#/components/schemas/InvitationCreateDto'\n          application/json;odata.streaming=false;IEEE754Compatible=true:\n            schema:\n              $ref: '#/components/schemas/InvitationCreateDto'\n          application/json;IEEE754Compatible=false:\n            schema:\n              $ref: '#/components/schemas/InvitationCreateDto'\n          application/json;IEEE754Compatible=true:\n            schema:\n              $ref: '#/components/schemas/InvitationCreateDto'\n          application/xml:\n            schema:\n              $ref: '#/components/schemas/InvitationCreateDto'\n          text/plain:\n            schema:\n              $ref: '#/components/schemas/InvitationCreateDto'\n          application/json-patch+json:\n            schema:\n              $ref: '#/components/schemas/InvitationCreateDto'\n          text/json:\n            schema:\n              $ref: '#/components/schemas/InvitationCreateDto'\n          application/*+json:\n            schema:\n              $ref: '#/components/schemas/InvitationCreateDto'\n      responses:\n        '200':\n          description: OK\n          content:\n            application/json;odata.metadata=minimal;odata.streaming=true:\n              schema:\n                $ref: '#/components/schemas/Invitation'\n            application/json;odata.metadata=minimal;odata.streaming=false:\n              schema:\n                $ref: '#/components/schemas/Invitation'\n            application/json;odata.metadata=minimal:\n              schema:\n                $ref: '#/components/schemas/Invitation'\n            application/json;odata.metadata=full;odata.streaming=true:\n              schema:\n                $ref: '#/components/schemas/Invitation'\n            application/json;odata.metadata=full;odata.streaming=false:\n              schema:\n                $ref: '#/components/schemas/Invitation'\n            application/json;odata.metadata=full:\n              schema:\n                $ref: '#/components/schemas/Invitation'\n            application/json;odata.metadata=none;odata.streaming=true:\n              schema:\n                $ref: '#/components/schemas/Invitation'\n            application/json;odata.metadata=none;odata.streaming=false:\n              schema:\n                $ref: '#/components/schemas/Invitation'\n            application/json;odata.metadata=none:\n              schema:\n                $ref: '#/components/schemas/Invitation'\n            application/json;odata.streaming=true:\n              schema:\n                $ref: '#/components/schemas/Invitation'\n            application/json;odata.streaming=false:\n              schema:\n                $ref: '#/components/schemas/Invitation'\n            application/json:\n              schema:\n                $ref: '#/components/schemas/Invitation'\n            application/json;odata.metadata=minimal;odata.streaming=true;IEEE754Compatible=false:\n              schema:\n                $ref: '#/components/schemas/Invitation'\n            application/json;odata.metadata=minimal;odata.streaming=true;IEEE754Compatible=true:\n              schema:\n                $ref: '#/components/schemas/Invitation'\n            application/json;odata.metadata=minimal;odata.streaming=false;IEEE754Compatible=false:\n              schema:\n                $ref: '#/components/schemas/Invitation'\n            application/json;odata.metadata=minimal;odata.streaming=false;IEEE754Compatible=true:\n              schema:\n                $ref: '#/components/schemas/Invitation'\n            application/json;odata.metadata=minimal;IEEE754Compatible=false:\n              schema:\n                $ref: '#/components/schemas/Invitation'\n            application/json;odata.metadata=minimal;IEEE754Compatible=true:\n              schema:\n                $ref: '#/components/schemas/Invitation'\n            application/json;odata.metadata=full;odata.streaming=true;IEEE754Compatible=false:\n              schema:\n                $ref: '#/components/schemas/Invitation'\n            application/json;odata.metadata=full;odata.streaming=true;IEEE754Compatible=true:\n              schema:\n                $ref: '#/components/schemas/Invitation'\n            application/json;odata.metadata=full;odata.streaming=false;IEEE754Compatible=false:\n              schema:\n                $ref: '#/components/schemas/Invitation'\n            application/json;odata.metadata=full;odata.streaming=false;IEEE754Compatible=true:\n              schema:\n                $ref: '#/components/schemas/Invitation'\n            application/json;odata.metadata=full;IEEE754Compatible=false:\n              schema:\n                $ref: '#/components/schemas/Invitation'\n            application/json;odata.metadata=full;IEEE754Compatible=true:\n              schema:\n                $ref: '#/components/schemas/Invitation'\n            application/json;odata.metadata=none;odata.streaming=true;IEEE754Compatible=false:\n              schema:\n                $ref: '#/components/schemas/Invitation'\n            application/json;odata.metadata=none;odata.streaming=true;IEEE754Compatible=true:\n              schema:\n                $ref: '#/components/schemas/Invitation'\n            application/json;odata.metadata=none;odata.streaming=false;IEEE754Compatible=true:\n              schema:\n                $ref: '#/components/schemas/Invitation'\n            application/json;odata.metadata=none;odata.streaming=false;IEEE754Compatible=false:\n              schema:\n                $ref: '#/components/schemas/Invitation'\n            application/json;odata.metadata=none;IEEE754Compatible=false:\n              schema:\n                $ref: '#/components/schemas/Invitation'\n            application/json;odata.metadata=none;IEEE754Compatible=true:\n              schema:\n                $ref: '#/components/schemas/Invitation'\n            application/json;odata.streaming=true;IEEE754Compatible=false:\n              schema:\n                $ref: '#/components/schemas/Invitation'\n            application/json;odata.streaming=true;IEEE754Compatible=true:\n              schema:\n                $ref: '#/components/schemas/Invitation'\n            application/json;odata.streaming=false;IEEE754Compatible=false:\n              schema:\n                $ref: '#/components/schemas/Invitation'\n            application/json;odata.streaming=false;IEEE754Compatible=true:\n              schema:\n                $ref: '#/components/schemas/Invitation'\n            application/json;IEEE754Compatible=false:\n              schema:\n                $ref: '#/components/schemas/Invitation'\n            application/json;IEEE754Compatible=true:\n              schema:\n                $ref: '#/components/schemas/Invitation'\n            application/xml:\n              schema:\n                $ref: '#/components/schemas/Invitation'\n            text/plain:\n              schema:\n                $ref: '#/components/schemas/Invitation'\n            application/octet-stream:\n              schema:\n                $ref: '#/components/schemas/Invitation'\n            text/json:\n              schema:\n                $ref: '#/components/schemas/Invitation'\n  /api/v1/invitations/{id}/accept:\n    post:\n      tags:\n        - Invitations\n      parameters:\n        - name: id\n          in: path\n          required: true\n          schema:\n            type: integer\n            format: int32\n      requestBody:\n        content:\n          application/json;odata.metadata=minimal;odata.streaming=true:\n            schema:\n              $ref: '#/components/schemas/InvitationAcceptDto'\n          application/json;odata.metadata=minimal;odata.streaming=false:\n            schema:\n              $ref: '#/components/schemas/InvitationAcceptDto'\n          application/json;odata.metadata=minimal:\n            schema:\n              $ref: '#/components/schemas/InvitationAcceptDto'\n          application/json;odata.metadata=full;odata.streaming=true:\n            schema:\n              $ref: '#/components/schemas/InvitationAcceptDto'\n          application/json;odata.metadata=full;odata.streaming=false:\n            schema:\n              $ref: '#/components/schemas/InvitationAcceptDto'\n          application/json;odata.metadata=full:\n            schema:\n              $ref: '#/components/schemas/InvitationAcceptDto'\n          application/json;odata.metadata=none;odata.streaming=true:\n            schema:\n              $ref: '#/components/schemas/InvitationAcceptDto'\n          application/json;odata.metadata=none;odata.streaming=false:\n            schema:\n              $ref: '#/components/schemas/InvitationAcceptDto'\n          application/json;odata.metadata=none:\n            schema:\n              $ref: '#/components/schemas/InvitationAcceptDto'\n          application/json;odata.streaming=true:\n            schema:\n              $ref: '#/components/schemas/InvitationAcceptDto'\n          application/json;odata.streaming=false:\n            schema:\n              $ref: '#/components/schemas/InvitationAcceptDto'\n          application/json:\n            schema:\n              $ref: '#/components/schemas/InvitationAcceptDto'\n          application/json;odata.metadata=minimal;odata.streaming=true;IEEE754Compatible=false:\n            schema:\n              $ref: '#/components/schemas/InvitationAcceptDto'\n          application/json;odata.metadata=minimal;odata.streaming=true;IEEE754Compatible=true:\n            schema:\n              $ref: '#/components/schemas/InvitationAcceptDto'\n          application/json;odata.metadata=minimal;odata.streaming=false;IEEE754Compatible=false:\n            schema:\n              $ref: '#/components/schemas/InvitationAcceptDto'\n          application/json;odata.metadata=minimal;odata.streaming=false;IEEE754Compatible=true:\n            schema:\n              $ref: '#/components/schemas/InvitationAcceptDto'\n          application/json;odata.metadata=minimal;IEEE754Compatible=false:\n            schema:\n              $ref: '#/components/schemas/InvitationAcceptDto'\n          application/json;odata.metadata=minimal;IEEE754Compatible=true:\n            schema:\n              $ref: '#/components/schemas/InvitationAcceptDto'\n          application/json;odata.metadata=full;odata.streaming=true;IEEE754Compatible=false:\n            schema:\n              $ref: '#/components/schemas/InvitationAcceptDto'\n          application/json;odata.metadata=full;odata.streaming=true;IEEE754Compatible=true:\n            schema:\n              $ref: '#/components/schemas/InvitationAcceptDto'\n          application/json;odata.metadata=full;odata.streaming=false;IEEE754Compatible=false:\n            schema:\n              $ref: '#/components/schemas/InvitationAcceptDto'\n          application/json;odata.metadata=full;odata.streaming=false;IEEE754Compatible=true:\n            schema:\n              $ref: '#/components/schemas/InvitationAcceptDto'\n          application/json;odata.metadata=full;IEEE754Compatible=false:\n            schema:\n              $ref: '#/components/schemas/InvitationAcceptDto'\n          application/json;odata.metadata=full;IEEE754Compatible=true:\n            schema:\n              $ref: '#/components/schemas/InvitationAcceptDto'\n          application/json;odata.metadata=none;odata.streaming=true;IEEE754Compatible=false:\n            schema:\n              $ref: '#/components/schemas/InvitationAcceptDto'\n          application/json;odata.metadata=none;odata.streaming=true;IEEE754Compatible=true:\n            schema:\n              $ref: '#/components/schemas/InvitationAcceptDto'\n          application/json;odata.metadata=none;odata.streaming=false;IEEE754Compatible=true:\n            schema:\n              $ref: '#/components/schemas/InvitationAcceptDto'\n          application/json;odata.metadata=none;odata.streaming=false;IEEE754Compatible=false:\n            schema:\n              $ref: '#/components/schemas/InvitationAcceptDto'\n          application/json;odata.metadata=none;IEEE754Compatible=false:\n            schema:\n              $ref: '#/components/schemas/InvitationAcceptDto'\n          application/json;odata.metadata=none;IEEE754Compatible=true:\n            schema:\n              $ref: '#/components/schemas/InvitationAcceptDto'\n          application/json;odata.streaming=true;IEEE754Compatible=false:\n            schema:\n              $ref: '#/components/schemas/InvitationAcceptDto'\n          application/json;odata.streaming=true;IEEE754Compatible=true:\n            schema:\n              $ref: '#/components/schemas/InvitationAcceptDto'\n          application/json;odata.streaming=false;IEEE754Compatible=false:\n            schema:\n              $ref: '#/components/schemas/InvitationAcceptDto'\n          application/json;odata.streaming=false;IEEE754Compatible=true:\n            schema:\n              $ref: '#/components/schemas/InvitationAcceptDto'\n          application/json;IEEE754Compatible=false:\n            schema:\n              $ref: '#/components/schemas/InvitationAcceptDto'\n          application/json;IEEE754Compatible=true:\n            schema:\n              $ref: '#/components/schemas/InvitationAcceptDto'\n          application/xml:\n            schema:\n              $ref: '#/components/schemas/InvitationAcceptDto'\n          text/plain:\n            schema:\n              $ref: '#/components/schemas/InvitationAcceptDto'\n          application/json-patch+json:\n            schema:\n              $ref: '#/components/schemas/InvitationAcceptDto'\n          text/json:\n            schema:\n              $ref: '#/components/schemas/InvitationAcceptDto'\n          application/*+json:\n            schema:\n              $ref: '#/components/schemas/InvitationAcceptDto'\n      responses:\n        '200':\n          description: OK\n  /api/v1/invitations/{id}/reject:\n    post:\n      tags:\n        - Invitations\n      parameters:\n        - name: id\n          in: path\n          required: true\n          schema:\n            type: integer\n            format: int32\n      responses:\n        '200':\n          description: OK\n  /api/v1/invitations/{id}:\n    delete:\n      tags:\n        - Invitations\n      parameters:\n        - name: id\n          in: path\n          required: true\n          schema:\n            type: integer\n            format: int32\n      responses:\n        '200':\n          description: OK\n    patch:\n      tags:\n        - Invitations\n      parameters:\n        - name: id\n          in: path\n          required: true\n          schema:\n            type: integer\n            format: int32\n      requestBody:\n        content:\n          application/json;odata.metadata=minimal;odata.streaming=true:\n            schema:\n              $ref: '#/components/schemas/InvitationUpdateDto'\n          application/json;odata.metadata=minimal;odata.streaming=false:\n            schema:\n              $ref: '#/components/schemas/InvitationUpdateDto'\n          application/json;odata.metadata=minimal:\n            schema:\n              $ref: '#/components/schemas/InvitationUpdateDto'\n          application/json;odata.metadata=full;odata.streaming=true:\n            schema:\n              $ref: '#/components/schemas/InvitationUpdateDto'\n          application/json;odata.metadata=full;odata.streaming=false:\n            schema:\n              $ref: '#/components/schemas/InvitationUpdateDto'\n          application/json;odata.metadata=full:\n            schema:\n              $ref: '#/components/schemas/InvitationUpdateDto'\n          application/json;odata.metadata=none;odata.streaming=true:\n            schema:\n              $ref: '#/components/schemas/InvitationUpdateDto'\n          application/json;odata.metadata=none;odata.streaming=false:\n            schema:\n              $ref: '#/components/schemas/InvitationUpdateDto'\n          application/json;odata.metadata=none:\n            schema:\n              $ref: '#/components/schemas/InvitationUpdateDto'\n          application/json;odata.streaming=true:\n            schema:\n              $ref: '#/components/schemas/InvitationUpdateDto'\n          application/json;odata.streaming=false:\n            schema:\n              $ref: '#/components/schemas/InvitationUpdateDto'\n          application/json:\n            schema:\n              $ref: '#/components/schemas/InvitationUpdateDto'\n          application/json;odata.metadata=minimal;odata.streaming=true;IEEE754Compatible=false:\n            schema:\n              $ref: '#/components/schemas/InvitationUpdateDto'\n          application/json;odata.metadata=minimal;odata.streaming=true;IEEE754Compatible=true:\n            schema:\n              $ref: '#/components/schemas/InvitationUpdateDto'\n          application/json;odata.metadata=minimal;odata.streaming=false;IEEE754Compatible=false:\n            schema:\n              $ref: '#/components/schemas/InvitationUpdateDto'\n          application/json;odata.metadata=minimal;odata.streaming=false;IEEE754Compatible=true:\n            schema:\n              $ref: '#/components/schemas/InvitationUpdateDto'\n          application/json;odata.metadata=minimal;IEEE754Compatible=false:\n            schema:\n              $ref: '#/components/schemas/InvitationUpdateDto'\n          application/json;odata.metadata=minimal;IEEE754Compatible=true:\n            schema:\n              $ref: '#/components/schemas/InvitationUpdateDto'\n          application/json;odata.metadata=full;odata.streaming=true;IEEE754Compatible=false:\n            schema:\n              $ref: '#/components/schemas/InvitationUpdateDto'\n          application/json;odata.metadata=full;odata.streaming=true;IEEE754Compatible=true:\n            schema:\n              $ref: '#/components/schemas/InvitationUpdateDto'\n          application/json;odata.metadata=full;odata.streaming=false;IEEE754Compatible=false:\n            schema:\n              $ref: '#/components/schemas/InvitationUpdateDto'\n          application/json;odata.metadata=full;odata.streaming=false;IEEE754Compatible=true:\n            schema:\n              $ref: '#/components/schemas/InvitationUpdateDto'\n          application/json;odata.metadata=full;IEEE754Compatible=false:\n            schema:\n              $ref: '#/components/schemas/InvitationUpdateDto'\n          application/json;odata.metadata=full;IEEE754Compatible=true:\n            schema:\n              $ref: '#/components/schemas/InvitationUpdateDto'\n          application/json;odata.metadata=none;odata.streaming=true;IEEE754Compatible=false:\n            schema:\n              $ref: '#/components/schemas/InvitationUpdateDto'\n          application/json;odata.metadata=none;odata.streaming=true;IEEE754Compatible=true:\n            schema:\n              $ref: '#/components/schemas/InvitationUpdateDto'\n          application/json;odata.metadata=none;odata.streaming=false;IEEE754Compatible=true:\n            schema:\n              $ref: '#/components/schemas/InvitationUpdateDto'\n          application/json;odata.metadata=none;odata.streaming=false;IEEE754Compatible=false:\n            schema:\n              $ref: '#/components/schemas/InvitationUpdateDto'\n          application/json;odata.metadata=none;IEEE754Compatible=false:\n            schema:\n              $ref: '#/components/schemas/InvitationUpdateDto'\n          application/json;odata.metadata=none;IEEE754Compatible=true:\n            schema:\n              $ref: '#/components/schemas/InvitationUpdateDto'\n          application/json;odata.streaming=true;IEEE754Compatible=false:\n            schema:\n              $ref: '#/components/schemas/InvitationUpdateDto'\n          application/json;odata.streaming=true;IEEE754Compatible=true:\n            schema:\n              $ref: '#/components/schemas/InvitationUpdateDto'\n          application/json;odata.streaming=false;IEEE754Compatible=false:\n            schema:\n              $ref: '#/components/schemas/InvitationUpdateDto'\n          application/json;odata.streaming=false;IEEE754Compatible=true:\n            schema:\n              $ref: '#/components/schemas/InvitationUpdateDto'\n          application/json;IEEE754Compatible=false:\n            schema:\n              $ref: '#/components/schemas/InvitationUpdateDto'\n          application/json;IEEE754Compatible=true:\n            schema:\n              $ref: '#/components/schemas/InvitationUpdateDto'\n          application/xml:\n            schema:\n              $ref: '#/components/schemas/InvitationUpdateDto'\n          text/plain:\n            schema:\n              $ref: '#/components/schemas/InvitationUpdateDto'\n          application/json-patch+json:\n            schema:\n              $ref: '#/components/schemas/InvitationUpdateDto'\n          text/json:\n            schema:\n              $ref: '#/components/schemas/InvitationUpdateDto'\n          application/*+json:\n            schema:\n              $ref: '#/components/schemas/InvitationUpdateDto'\n      responses:\n        '200':\n          description: OK\n          content:\n            application/json;odata.metadata=minimal;odata.streaming=true:\n              schema:\n                $ref: '#/components/schemas/Invitation'\n            application/json;odata.metadata=minimal;odata.streaming=false:\n              schema:\n                $ref: '#/components/schemas/Invitation'\n            application/json;odata.metadata=minimal:\n              schema:\n                $ref: '#/components/schemas/Invitation'\n            application/json;odata.metadata=full;odata.streaming=true:\n              schema:\n                $ref: '#/components/schemas/Invitation'\n            application/json;odata.metadata=full;odata.streaming=false:\n              schema:\n                $ref: '#/components/schemas/Invitation'\n            application/json;odata.metadata=full:\n              schema:\n                $ref: '#/components/schemas/Invitation'\n            application/json;odata.metadata=none;odata.streaming=true:\n              schema:\n                $ref: '#/components/schemas/Invitation'\n            application/json;odata.metadata=none;odata.streaming=false:\n              schema:\n                $ref: '#/components/schemas/Invitation'\n            application/json;odata.metadata=none:\n              schema:\n                $ref: '#/components/schemas/Invitation'\n            application/json;odata.streaming=true:\n              schema:\n                $ref: '#/components/schemas/Invitation'\n            application/json;odata.streaming=false:\n              schema:\n                $ref: '#/components/schemas/Invitation'\n            application/json:\n              schema:\n                $ref: '#/components/schemas/Invitation'\n            application/json;odata.metadata=minimal;odata.streaming=true;IEEE754Compatible=false:\n              schema:\n                $ref: '#/components/schemas/Invitation'\n            application/json;odata.metadata=minimal;odata.streaming=true;IEEE754Compatible=true:\n              schema:\n                $ref: '#/components/schemas/Invitation'\n            application/json;odata.metadata=minimal;odata.streaming=false;IEEE754Compatible=false:\n              schema:\n                $ref: '#/components/schemas/Invitation'\n            application/json;odata.metadata=minimal;odata.streaming=false;IEEE754Compatible=true:\n              schema:\n                $ref: '#/components/schemas/Invitation'\n            application/json;odata.metadata=minimal;IEEE754Compatible=false:\n              schema:\n                $ref: '#/components/schemas/Invitation'\n            application/json;odata.metadata=minimal;IEEE754Compatible=true:\n              schema:\n                $ref: '#/components/schemas/Invitation'\n            application/json;odata.metadata=full;odata.streaming=true;IEEE754Compatible=false:\n              schema:\n                $ref: '#/components/schemas/Invitation'\n            application/json;odata.metadata=full;odata.streaming=true;IEEE754Compatible=true:\n              schema:\n                $ref: '#/components/schemas/Invitation'\n            application/json;odata.metadata=full;odata.streaming=false;IEEE754Compatible=false:\n              schema:\n                $ref: '#/components/schemas/Invitation'\n            application/json;odata.metadata=full;odata.streaming=false;IEEE754Compatible=true:\n              schema:\n                $ref: '#/components/schemas/Invitation'\n            application/json;odata.metadata=full;IEEE754Compatible=false:\n              schema:\n                $ref: '#/components/schemas/Invitation'\n            application/json;odata.metadata=full;IEEE754Compatible=true:\n              schema:\n                $ref: '#/components/schemas/Invitation'\n            application/json;odata.metadata=none;odata.streaming=true;IEEE754Compatible=false:\n              schema:\n                $ref: '#/components/schemas/Invitation'\n            application/json;odata.metadata=none;odata.streaming=true;IEEE754Compatible=true:\n              schema:\n                $ref: '#/components/schemas/Invitation'\n            application/json;odata.metadata=none;odata.streaming=false;IEEE754Compatible=true:\n              schema:\n                $ref: '#/components/schemas/Invitation'\n            application/json;odata.metadata=none;odata.streaming=false;IEEE754Compatible=false:\n              schema:\n                $ref: '#/components/schemas/Invitation'\n            application/json;odata.metadata=none;IEEE754Compatible=false:\n              schema:\n                $ref: '#/components/schemas/Invitation'\n            application/json;odata.metadata=none;IEEE754Compatible=true:\n              schema:\n                $ref: '#/components/schemas/Invitation'\n            application/json;odata.streaming=true;IEEE754Compatible=false:\n              schema:\n                $ref: '#/components/schemas/Invitation'\n            application/json;odata.streaming=true;IEEE754Compatible=true:\n              schema:\n                $ref: '#/components/schemas/Invitation'\n            application/json;odata.streaming=false;IEEE754Compatible=false:\n              schema:\n                $ref: '#/components/schemas/Invitation'\n            application/json;odata.streaming=false;IEEE754Compatible=true:\n              schema:\n                $ref: '#/components/schemas/Invitation'\n            application/json;IEEE754Compatible=false:\n              schema:\n                $ref: '#/components/schemas/Invitation'\n            application/json;IEEE754Compatible=true:\n              schema:\n                $ref: '#/components/schemas/Invitation'\n            application/xml:\n              schema:\n                $ref: '#/components/schemas/Invitation'\n            text/plain:\n              schema:\n                $ref: '#/components/schemas/Invitation'\n            application/octet-stream:\n              schema:\n                $ref: '#/components/schemas/Invitation'\n            text/json:\n              schema:\n                $ref: '#/components/schemas/Invitation'\n  /api/v1/odata/Invitations:\n    get:\n      tags:\n        - Invitations\n      operationId: api/v{version:apiVersion}/odata/Invitations\n      parameters:\n        - name: select\n          in: query\n          description: Limits the properties returned in the result.\n          schema:\n            type: string\n        - name: expand\n          in: query\n          description: Indicates the related entities to be represented inline. The\n            maximum depth is 2.\n          schema:\n            type: string\n        - name: filter\n          in: query\n          description: 'Restricts the set of items returned. The maximum number of\n            expressions is 100. The allowed functions are: allfunctions.'\n          schema:\n            type: string\n        - name: orderby\n          in: query\n          description: Specifies the order in which items are returned. The maximum number\n            of expressions is 5.\n          schema:\n            type: string\n        - name: top\n          in: query\n          description: Limits the number of items returned from a collection. The maximum\n            value is 100.\n          schema:\n            type: integer\n            format: int32\n        - name: skip\n          in: query\n          description: Excludes the specified number of items of the queried collection\n            from the result.\n          schema:\n            type: integer\n            format: int32\n        - name: count\n          in: query\n          description: Indicates whether the total count of items within a collection are\n            returned in the result.\n          schema:\n            type: boolean\n            default: false\n      responses:\n        '200':\n          description: OK\n          content:\n            application/json;odata.metadata=minimal;odata.streaming=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/Invitation'\n            application/json;odata.metadata=minimal;odata.streaming=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/Invitation'\n            application/json;odata.metadata=minimal:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/Invitation'\n            application/json;odata.metadata=full;odata.streaming=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/Invitation'\n            application/json;odata.metadata=full;odata.streaming=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/Invitation'\n            application/json;odata.metadata=full:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/Invitation'\n            application/json;odata.metadata=none;odata.streaming=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/Invitation'\n            application/json;odata.metadata=none;odata.streaming=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/Invitation'\n            application/json;odata.metadata=none:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/Invitation'\n            application/json;odata.streaming=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/Invitation'\n            application/json;odata.streaming=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/Invitation'\n            application/json:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/Invitation'\n            application/json;odata.metadata=minimal;odata.streaming=true;IEEE754Compatible=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/Invitation'\n            application/json;odata.metadata=minimal;odata.streaming=true;IEEE754Compatible=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/Invitation'\n            application/json;odata.metadata=minimal;odata.streaming=false;IEEE754Compatible=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/Invitation'\n            application/json;odata.metadata=minimal;odata.streaming=false;IEEE754Compatible=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/Invitation'\n            application/json;odata.metadata=minimal;IEEE754Compatible=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/Invitation'\n            application/json;odata.metadata=minimal;IEEE754Compatible=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/Invitation'\n            application/json;odata.metadata=full;odata.streaming=true;IEEE754Compatible=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/Invitation'\n            application/json;odata.metadata=full;odata.streaming=true;IEEE754Compatible=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/Invitation'\n            application/json;odata.metadata=full;odata.streaming=false;IEEE754Compatible=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/Invitation'\n            application/json;odata.metadata=full;odata.streaming=false;IEEE754Compatible=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/Invitation'\n            application/json;odata.metadata=full;IEEE754Compatible=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/Invitation'\n            application/json;odata.metadata=full;IEEE754Compatible=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/Invitation'\n            application/json;odata.metadata=none;odata.streaming=true;IEEE754Compatible=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/Invitation'\n            application/json;odata.metadata=none;odata.streaming=true;IEEE754Compatible=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/Invitation'\n            application/json;odata.metadata=none;odata.streaming=false;IEEE754Compatible=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/Invitation'\n            application/json;odata.metadata=none;odata.streaming=false;IEEE754Compatible=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/Invitation'\n            application/json;odata.metadata=none;IEEE754Compatible=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/Invitation'\n            application/json;odata.metadata=none;IEEE754Compatible=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/Invitation'\n            application/json;odata.streaming=true;IEEE754Compatible=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/Invitation'\n            application/json;odata.streaming=true;IEEE754Compatible=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/Invitation'\n            application/json;odata.streaming=false;IEEE754Compatible=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/Invitation'\n            application/json;odata.streaming=false;IEEE754Compatible=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/Invitation'\n            application/json;IEEE754Compatible=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/Invitation'\n            application/json;IEEE754Compatible=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/Invitation'\n            application/xml:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/Invitation'\n            text/plain:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/Invitation'\n            application/octet-stream:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/Invitation'\n            text/json:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/Invitation'\n  /api/v1/odata/Invitations/$count:\n    get:\n      tags:\n        - Invitations\n      operationId: api/v{version:apiVersion}/odata/Invitations/$count\n      parameters:\n        - name: select\n          in: query\n          description: Limits the properties returned in the result.\n          schema:\n            type: string\n        - name: expand\n          in: query\n          description: Indicates the related entities to be represented inline. The\n            maximum depth is 2.\n          schema:\n            type: string\n        - name: filter\n          in: query\n          description: 'Restricts the set of items returned. The maximum number of\n            expressions is 100. The allowed functions are: allfunctions.'\n          schema:\n            type: string\n        - name: orderby\n          in: query\n          description: Specifies the order in which items are returned. The maximum number\n            of expressions is 5.\n          schema:\n            type: string\n        - name: top\n          in: query\n          description: Limits the number of items returned from a collection. The maximum\n            value is 100.\n          schema:\n            type: integer\n            format: int32\n        - name: skip\n          in: query\n          description: Excludes the specified number of items of the queried collection\n            from the result.\n          schema:\n            type: integer\n            format: int32\n        - name: count\n          in: query\n          description: Indicates whether the total count of items within a collection are\n            returned in the result.\n          schema:\n            type: boolean\n            default: false\n      responses:\n        '200':\n          description: OK\n          content:\n            application/json;odata.metadata=minimal;odata.streaming=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/Invitation'\n            application/json;odata.metadata=minimal;odata.streaming=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/Invitation'\n            application/json;odata.metadata=minimal:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/Invitation'\n            application/json;odata.metadata=full;odata.streaming=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/Invitation'\n            application/json;odata.metadata=full;odata.streaming=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/Invitation'\n            application/json;odata.metadata=full:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/Invitation'\n            application/json;odata.metadata=none;odata.streaming=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/Invitation'\n            application/json;odata.metadata=none;odata.streaming=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/Invitation'\n            application/json;odata.metadata=none:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/Invitation'\n            application/json;odata.streaming=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/Invitation'\n            application/json;odata.streaming=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/Invitation'\n            application/json:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/Invitation'\n            application/json;odata.metadata=minimal;odata.streaming=true;IEEE754Compatible=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/Invitation'\n            application/json;odata.metadata=minimal;odata.streaming=true;IEEE754Compatible=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/Invitation'\n            application/json;odata.metadata=minimal;odata.streaming=false;IEEE754Compatible=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/Invitation'\n            application/json;odata.metadata=minimal;odata.streaming=false;IEEE754Compatible=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/Invitation'\n            application/json;odata.metadata=minimal;IEEE754Compatible=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/Invitation'\n            application/json;odata.metadata=minimal;IEEE754Compatible=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/Invitation'\n            application/json;odata.metadata=full;odata.streaming=true;IEEE754Compatible=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/Invitation'\n            application/json;odata.metadata=full;odata.streaming=true;IEEE754Compatible=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/Invitation'\n            application/json;odata.metadata=full;odata.streaming=false;IEEE754Compatible=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/Invitation'\n            application/json;odata.metadata=full;odata.streaming=false;IEEE754Compatible=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/Invitation'\n            application/json;odata.metadata=full;IEEE754Compatible=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/Invitation'\n            application/json;odata.metadata=full;IEEE754Compatible=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/Invitation'\n            application/json;odata.metadata=none;odata.streaming=true;IEEE754Compatible=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/Invitation'\n            application/json;odata.metadata=none;odata.streaming=true;IEEE754Compatible=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/Invitation'\n            application/json;odata.metadata=none;odata.streaming=false;IEEE754Compatible=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/Invitation'\n            application/json;odata.metadata=none;odata.streaming=false;IEEE754Compatible=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/Invitation'\n            application/json;odata.metadata=none;IEEE754Compatible=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/Invitation'\n            application/json;odata.metadata=none;IEEE754Compatible=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/Invitation'\n            application/json;odata.streaming=true;IEEE754Compatible=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/Invitation'\n            application/json;odata.streaming=true;IEEE754Compatible=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/Invitation'\n            application/json;odata.streaming=false;IEEE754Compatible=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/Invitation'\n            application/json;odata.streaming=false;IEEE754Compatible=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/Invitation'\n            application/json;IEEE754Compatible=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/Invitation'\n            application/json;IEEE754Compatible=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/Invitation'\n            application/xml:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/Invitation'\n            text/plain:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/Invitation'\n            application/octet-stream:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/Invitation'\n            text/json:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/Invitation'\n  /api/v1/invoices:\n    post:\n      tags:\n        - Invoices\n      requestBody:\n        content:\n          application/json;odata.metadata=minimal;odata.streaming=true:\n            schema:\n              $ref: '#/components/schemas/InvoiceCreateDto'\n          application/json;odata.metadata=minimal;odata.streaming=false:\n            schema:\n              $ref: '#/components/schemas/InvoiceCreateDto'\n          application/json;odata.metadata=minimal:\n            schema:\n              $ref: '#/components/schemas/InvoiceCreateDto'\n          application/json;odata.metadata=full;odata.streaming=true:\n            schema:\n              $ref: '#/components/schemas/InvoiceCreateDto'\n          application/json;odata.metadata=full;odata.streaming=false:\n            schema:\n              $ref: '#/components/schemas/InvoiceCreateDto'\n          application/json;odata.metadata=full:\n            schema:\n              $ref: '#/components/schemas/InvoiceCreateDto'\n          application/json;odata.metadata=none;odata.streaming=true:\n            schema:\n              $ref: '#/components/schemas/InvoiceCreateDto'\n          application/json;odata.metadata=none;odata.streaming=false:\n            schema:\n              $ref: '#/components/schemas/InvoiceCreateDto'\n          application/json;odata.metadata=none:\n            schema:\n              $ref: '#/components/schemas/InvoiceCreateDto'\n          application/json;odata.streaming=true:\n            schema:\n              $ref: '#/components/schemas/InvoiceCreateDto'\n          application/json;odata.streaming=false:\n            schema:\n              $ref: '#/components/schemas/InvoiceCreateDto'\n          application/json:\n            schema:\n              $ref: '#/components/schemas/InvoiceCreateDto'\n          application/json;odata.metadata=minimal;odata.streaming=true;IEEE754Compatible=false:\n            schema:\n              $ref: '#/components/schemas/InvoiceCreateDto'\n          application/json;odata.metadata=minimal;odata.streaming=true;IEEE754Compatible=true:\n            schema:\n              $ref: '#/components/schemas/InvoiceCreateDto'\n          application/json;odata.metadata=minimal;odata.streaming=false;IEEE754Compatible=false:\n            schema:\n              $ref: '#/components/schemas/InvoiceCreateDto'\n          application/json;odata.metadata=minimal;odata.streaming=false;IEEE754Compatible=true:\n            schema:\n              $ref: '#/components/schemas/InvoiceCreateDto'\n          application/json;odata.metadata=minimal;IEEE754Compatible=false:\n            schema:\n              $ref: '#/components/schemas/InvoiceCreateDto'\n          application/json;odata.metadata=minimal;IEEE754Compatible=true:\n            schema:\n              $ref: '#/components/schemas/InvoiceCreateDto'\n          application/json;odata.metadata=full;odata.streaming=true;IEEE754Compatible=false:\n            schema:\n              $ref: '#/components/schemas/InvoiceCreateDto'\n          application/json;odata.metadata=full;odata.streaming=true;IEEE754Compatible=true:\n            schema:\n              $ref: '#/components/schemas/InvoiceCreateDto'\n          application/json;odata.metadata=full;odata.streaming=false;IEEE754Compatible=false:\n            schema:\n              $ref: '#/components/schemas/InvoiceCreateDto'\n          application/json;odata.metadata=full;odata.streaming=false;IEEE754Compatible=true:\n            schema:\n              $ref: '#/components/schemas/InvoiceCreateDto'\n          application/json;odata.metadata=full;IEEE754Compatible=false:\n            schema:\n              $ref: '#/components/schemas/InvoiceCreateDto'\n          application/json;odata.metadata=full;IEEE754Compatible=true:\n            schema:\n              $ref: '#/components/schemas/InvoiceCreateDto'\n          application/json;odata.metadata=none;odata.streaming=true;IEEE754Compatible=false:\n            schema:\n              $ref: '#/components/schemas/InvoiceCreateDto'\n          application/json;odata.metadata=none;odata.streaming=true;IEEE754Compatible=true:\n            schema:\n              $ref: '#/components/schemas/InvoiceCreateDto'\n          application/json;odata.metadata=none;odata.streaming=false;IEEE754Compatible=true:\n            schema:\n              $ref: '#/components/schemas/InvoiceCreateDto'\n          application/json;odata.metadata=none;odata.streaming=false;IEEE754Compatible=false:\n            schema:\n              $ref: '#/components/schemas/InvoiceCreateDto'\n          application/json;odata.metadata=none;IEEE754Compatible=false:\n            schema:\n              $ref: '#/components/schemas/InvoiceCreateDto'\n          application/json;odata.metadata=none;IEEE754Compatible=true:\n            schema:\n              $ref: '#/components/schemas/InvoiceCreateDto'\n          application/json;odata.streaming=true;IEEE754Compatible=false:\n            schema:\n              $ref: '#/components/schemas/InvoiceCreateDto'\n          application/json;odata.streaming=true;IEEE754Compatible=true:\n            schema:\n              $ref: '#/components/schemas/InvoiceCreateDto'\n          application/json;odata.streaming=false;IEEE754Compatible=false:\n            schema:\n              $ref: '#/components/schemas/InvoiceCreateDto'\n          application/json;odata.streaming=false;IEEE754Compatible=true:\n            schema:\n              $ref: '#/components/schemas/InvoiceCreateDto'\n          application/json;IEEE754Compatible=false:\n            schema:\n              $ref: '#/components/schemas/InvoiceCreateDto'\n          application/json;IEEE754Compatible=true:\n            schema:\n              $ref: '#/components/schemas/InvoiceCreateDto'\n          application/xml:\n            schema:\n              $ref: '#/components/schemas/InvoiceCreateDto'\n          text/plain:\n            schema:\n              $ref: '#/components/schemas/InvoiceCreateDto'\n          application/json-patch+json:\n            schema:\n              $ref: '#/components/schemas/InvoiceCreateDto'\n          text/json:\n            schema:\n              $ref: '#/components/schemas/InvoiceCreateDto'\n          application/*+json:\n            schema:\n              $ref: '#/components/schemas/InvoiceCreateDto'\n      responses:\n        '200':\n          description: OK\n          content:\n            application/json;odata.metadata=minimal;odata.streaming=true:\n              schema:\n                $ref: '#/components/schemas/Invoice'\n            application/json;odata.metadata=minimal;odata.streaming=false:\n              schema:\n                $ref: '#/components/schemas/Invoice'\n            application/json;odata.metadata=minimal:\n              schema:\n                $ref: '#/components/schemas/Invoice'\n            application/json;odata.metadata=full;odata.streaming=true:\n              schema:\n                $ref: '#/components/schemas/Invoice'\n            application/json;odata.metadata=full;odata.streaming=false:\n              schema:\n                $ref: '#/components/schemas/Invoice'\n            application/json;odata.metadata=full:\n              schema:\n                $ref: '#/components/schemas/Invoice'\n            application/json;odata.metadata=none;odata.streaming=true:\n              schema:\n                $ref: '#/components/schemas/Invoice'\n            application/json;odata.metadata=none;odata.streaming=false:\n              schema:\n                $ref: '#/components/schemas/Invoice'\n            application/json;odata.metadata=none:\n              schema:\n                $ref: '#/components/schemas/Invoice'\n            application/json;odata.streaming=true:\n              schema:\n                $ref: '#/components/schemas/Invoice'\n            application/json;odata.streaming=false:\n              schema:\n                $ref: '#/components/schemas/Invoice'\n            application/json:\n              schema:\n                $ref: '#/components/schemas/Invoice'\n            application/json;odata.metadata=minimal;odata.streaming=true;IEEE754Compatible=false:\n              schema:\n                $ref: '#/components/schemas/Invoice'\n            application/json;odata.metadata=minimal;odata.streaming=true;IEEE754Compatible=true:\n              schema:\n                $ref: '#/components/schemas/Invoice'\n            application/json;odata.metadata=minimal;odata.streaming=false;IEEE754Compatible=false:\n              schema:\n                $ref: '#/components/schemas/Invoice'\n            application/json;odata.metadata=minimal;odata.streaming=false;IEEE754Compatible=true:\n              schema:\n                $ref: '#/components/schemas/Invoice'\n            application/json;odata.metadata=minimal;IEEE754Compatible=false:\n              schema:\n                $ref: '#/components/schemas/Invoice'\n            application/json;odata.metadata=minimal;IEEE754Compatible=true:\n              schema:\n                $ref: '#/components/schemas/Invoice'\n            application/json;odata.metadata=full;odata.streaming=true;IEEE754Compatible=false:\n              schema:\n                $ref: '#/components/schemas/Invoice'\n            application/json;odata.metadata=full;odata.streaming=true;IEEE754Compatible=true:\n              schema:\n                $ref: '#/components/schemas/Invoice'\n            application/json;odata.metadata=full;odata.streaming=false;IEEE754Compatible=false:\n              schema:\n                $ref: '#/components/schemas/Invoice'\n            application/json;odata.metadata=full;odata.streaming=false;IEEE754Compatible=true:\n              schema:\n                $ref: '#/components/schemas/Invoice'\n            application/json;odata.metadata=full;IEEE754Compatible=false:\n              schema:\n                $ref: '#/components/schemas/Invoice'\n            application/json;odata.metadata=full;IEEE754Compatible=true:\n              schema:\n                $ref: '#/components/schemas/Invoice'\n            application/json;odata.metadata=none;odata.streaming=true;IEEE754Compatible=false:\n              schema:\n                $ref: '#/components/schemas/Invoice'\n            application/json;odata.metadata=none;odata.streaming=true;IEEE754Compatible=true:\n              schema:\n                $ref: '#/components/schemas/Invoice'\n            application/json;odata.metadata=none;odata.streaming=false;IEEE754Compatible=true:\n              schema:\n                $ref: '#/components/schemas/Invoice'\n            application/json;odata.metadata=none;odata.streaming=false;IEEE754Compatible=false:\n              schema:\n                $ref: '#/components/schemas/Invoice'\n            application/json;odata.metadata=none;IEEE754Compatible=false:\n              schema:\n                $ref: '#/components/schemas/Invoice'\n            application/json;odata.metadata=none;IEEE754Compatible=true:\n              schema:\n                $ref: '#/components/schemas/Invoice'\n            application/json;odata.streaming=true;IEEE754Compatible=false:\n              schema:\n                $ref: '#/components/schemas/Invoice'\n            application/json;odata.streaming=true;IEEE754Compatible=true:\n              schema:\n                $ref: '#/components/schemas/Invoice'\n            application/json;odata.streaming=false;IEEE754Compatible=false:\n              schema:\n                $ref: '#/components/schemas/Invoice'\n            application/json;odata.streaming=false;IEEE754Compatible=true:\n              schema:\n                $ref: '#/components/schemas/Invoice'\n            application/json;IEEE754Compatible=false:\n              schema:\n                $ref: '#/components/schemas/Invoice'\n            application/json;IEEE754Compatible=true:\n              schema:\n                $ref: '#/components/schemas/Invoice'\n            application/xml:\n              schema:\n                $ref: '#/components/schemas/Invoice'\n            text/plain:\n              schema:\n                $ref: '#/components/schemas/Invoice'\n            application/octet-stream:\n              schema:\n                $ref: '#/components/schemas/Invoice'\n            text/json:\n              schema:\n                $ref: '#/components/schemas/Invoice'\n  /api/v1/invoices/{id}:\n    patch:\n      tags:\n        - Invoices\n      parameters:\n        - name: id\n          in: path\n          required: true\n          schema:\n            type: integer\n            format: int64\n      requestBody:\n        content:\n          application/json;odata.metadata=minimal;odata.streaming=true:\n            schema:\n              $ref: '#/components/schemas/InvoiceUpdateDto'\n          application/json;odata.metadata=minimal;odata.streaming=false:\n            schema:\n              $ref: '#/components/schemas/InvoiceUpdateDto'\n          application/json;odata.metadata=minimal:\n            schema:\n              $ref: '#/components/schemas/InvoiceUpdateDto'\n          application/json;odata.metadata=full;odata.streaming=true:\n            schema:\n              $ref: '#/components/schemas/InvoiceUpdateDto'\n          application/json;odata.metadata=full;odata.streaming=false:\n            schema:\n              $ref: '#/components/schemas/InvoiceUpdateDto'\n          application/json;odata.metadata=full:\n            schema:\n              $ref: '#/components/schemas/InvoiceUpdateDto'\n          application/json;odata.metadata=none;odata.streaming=true:\n            schema:\n              $ref: '#/components/schemas/InvoiceUpdateDto'\n          application/json;odata.metadata=none;odata.streaming=false:\n            schema:\n              $ref: '#/components/schemas/InvoiceUpdateDto'\n          application/json;odata.metadata=none:\n            schema:\n              $ref: '#/components/schemas/InvoiceUpdateDto'\n          application/json;odata.streaming=true:\n            schema:\n              $ref: '#/components/schemas/InvoiceUpdateDto'\n          application/json;odata.streaming=false:\n            schema:\n              $ref: '#/components/schemas/InvoiceUpdateDto'\n          application/json:\n            schema:\n              $ref: '#/components/schemas/InvoiceUpdateDto'\n          application/json;odata.metadata=minimal;odata.streaming=true;IEEE754Compatible=false:\n            schema:\n              $ref: '#/components/schemas/InvoiceUpdateDto'\n          application/json;odata.metadata=minimal;odata.streaming=true;IEEE754Compatible=true:\n            schema:\n              $ref: '#/components/schemas/InvoiceUpdateDto'\n          application/json;odata.metadata=minimal;odata.streaming=false;IEEE754Compatible=false:\n            schema:\n              $ref: '#/components/schemas/InvoiceUpdateDto'\n          application/json;odata.metadata=minimal;odata.streaming=false;IEEE754Compatible=true:\n            schema:\n              $ref: '#/components/schemas/InvoiceUpdateDto'\n          application/json;odata.metadata=minimal;IEEE754Compatible=false:\n            schema:\n              $ref: '#/components/schemas/InvoiceUpdateDto'\n          application/json;odata.metadata=minimal;IEEE754Compatible=true:\n            schema:\n              $ref: '#/components/schemas/InvoiceUpdateDto'\n          application/json;odata.metadata=full;odata.streaming=true;IEEE754Compatible=false:\n            schema:\n              $ref: '#/components/schemas/InvoiceUpdateDto'\n          application/json;odata.metadata=full;odata.streaming=true;IEEE754Compatible=true:\n            schema:\n              $ref: '#/components/schemas/InvoiceUpdateDto'\n          application/json;odata.metadata=full;odata.streaming=false;IEEE754Compatible=false:\n            schema:\n              $ref: '#/components/schemas/InvoiceUpdateDto'\n          application/json;odata.metadata=full;odata.streaming=false;IEEE754Compatible=true:\n            schema:\n              $ref: '#/components/schemas/InvoiceUpdateDto'\n          application/json;odata.metadata=full;IEEE754Compatible=false:\n            schema:\n              $ref: '#/components/schemas/InvoiceUpdateDto'\n          application/json;odata.metadata=full;IEEE754Compatible=true:\n            schema:\n              $ref: '#/components/schemas/InvoiceUpdateDto'\n          application/json;odata.metadata=none;odata.streaming=true;IEEE754Compatible=false:\n            schema:\n              $ref: '#/components/schemas/InvoiceUpdateDto'\n          application/json;odata.metadata=none;odata.streaming=true;IEEE754Compatible=true:\n            schema:\n              $ref: '#/components/schemas/InvoiceUpdateDto'\n          application/json;odata.metadata=none;odata.streaming=false;IEEE754Compatible=true:\n            schema:\n              $ref: '#/components/schemas/InvoiceUpdateDto'\n          application/json;odata.metadata=none;odata.streaming=false;IEEE754Compatible=false:\n            schema:\n              $ref: '#/components/schemas/InvoiceUpdateDto'\n          application/json;odata.metadata=none;IEEE754Compatible=false:\n            schema:\n              $ref: '#/components/schemas/InvoiceUpdateDto'\n          application/json;odata.metadata=none;IEEE754Compatible=true:\n            schema:\n              $ref: '#/components/schemas/InvoiceUpdateDto'\n          application/json;odata.streaming=true;IEEE754Compatible=false:\n            schema:\n              $ref: '#/components/schemas/InvoiceUpdateDto'\n          application/json;odata.streaming=true;IEEE754Compatible=true:\n            schema:\n              $ref: '#/components/schemas/InvoiceUpdateDto'\n          application/json;odata.streaming=false;IEEE754Compatible=false:\n            schema:\n              $ref: '#/components/schemas/InvoiceUpdateDto'\n          application/json;odata.streaming=false;IEEE754Compatible=true:\n            schema:\n              $ref: '#/components/schemas/InvoiceUpdateDto'\n          application/json;IEEE754Compatible=false:\n            schema:\n              $ref: '#/components/schemas/InvoiceUpdateDto'\n          application/json;IEEE754Compatible=true:\n            schema:\n              $ref: '#/components/schemas/InvoiceUpdateDto'\n          application/xml:\n            schema:\n              $ref: '#/components/schemas/InvoiceUpdateDto'\n          text/plain:\n            schema:\n              $ref: '#/components/schemas/InvoiceUpdateDto'\n          application/json-patch+json:\n            schema:\n              $ref: '#/components/schemas/InvoiceUpdateDto'\n          text/json:\n            schema:\n              $ref: '#/components/schemas/InvoiceUpdateDto'\n          application/*+json:\n            schema:\n              $ref: '#/components/schemas/InvoiceUpdateDto'\n      responses:\n        '200':\n          description: OK\n          content:\n            application/json;odata.metadata=minimal;odata.streaming=true:\n              schema:\n                $ref: '#/components/schemas/Invoice'\n            application/json;odata.metadata=minimal;odata.streaming=false:\n              schema:\n                $ref: '#/components/schemas/Invoice'\n            application/json;odata.metadata=minimal:\n              schema:\n                $ref: '#/components/schemas/Invoice'\n            application/json;odata.metadata=full;odata.streaming=true:\n              schema:\n                $ref: '#/components/schemas/Invoice'\n            application/json;odata.metadata=full;odata.streaming=false:\n              schema:\n                $ref: '#/components/schemas/Invoice'\n            application/json;odata.metadata=full:\n              schema:\n                $ref: '#/components/schemas/Invoice'\n            application/json;odata.metadata=none;odata.streaming=true:\n              schema:\n                $ref: '#/components/schemas/Invoice'\n            application/json;odata.metadata=none;odata.streaming=false:\n              schema:\n                $ref: '#/components/schemas/Invoice'\n            application/json;odata.metadata=none:\n              schema:\n                $ref: '#/components/schemas/Invoice'\n            application/json;odata.streaming=true:\n              schema:\n                $ref: '#/components/schemas/Invoice'\n            application/json;odata.streaming=false:\n              schema:\n                $ref: '#/components/schemas/Invoice'\n            application/json:\n              schema:\n                $ref: '#/components/schemas/Invoice'\n            application/json;odata.metadata=minimal;odata.streaming=true;IEEE754Compatible=false:\n              schema:\n                $ref: '#/components/schemas/Invoice'\n            application/json;odata.metadata=minimal;odata.streaming=true;IEEE754Compatible=true:\n              schema:\n                $ref: '#/components/schemas/Invoice'\n            application/json;odata.metadata=minimal;odata.streaming=false;IEEE754Compatible=false:\n              schema:\n                $ref: '#/components/schemas/Invoice'\n            application/json;odata.metadata=minimal;odata.streaming=false;IEEE754Compatible=true:\n              schema:\n                $ref: '#/components/schemas/Invoice'\n            application/json;odata.metadata=minimal;IEEE754Compatible=false:\n              schema:\n                $ref: '#/components/schemas/Invoice'\n            application/json;odata.metadata=minimal;IEEE754Compatible=true:\n              schema:\n                $ref: '#/components/schemas/Invoice'\n            application/json;odata.metadata=full;odata.streaming=true;IEEE754Compatible=false:\n              schema:\n                $ref: '#/components/schemas/Invoice'\n            application/json;odata.metadata=full;odata.streaming=true;IEEE754Compatible=true:\n              schema:\n                $ref: '#/components/schemas/Invoice'\n            application/json;odata.metadata=full;odata.streaming=false;IEEE754Compatible=false:\n              schema:\n                $ref: '#/components/schemas/Invoice'\n            application/json;odata.metadata=full;odata.streaming=false;IEEE754Compatible=true:\n              schema:\n                $ref: '#/components/schemas/Invoice'\n            application/json;odata.metadata=full;IEEE754Compatible=false:\n              schema:\n                $ref: '#/components/schemas/Invoice'\n            application/json;odata.metadata=full;IEEE754Compatible=true:\n              schema:\n                $ref: '#/components/schemas/Invoice'\n            application/json;odata.metadata=none;odata.streaming=true;IEEE754Compatible=false:\n              schema:\n                $ref: '#/components/schemas/Invoice'\n            application/json;odata.metadata=none;odata.streaming=true;IEEE754Compatible=true:\n              schema:\n                $ref: '#/components/schemas/Invoice'\n            application/json;odata.metadata=none;odata.streaming=false;IEEE754Compatible=true:\n              schema:\n                $ref: '#/components/schemas/Invoice'\n            application/json;odata.metadata=none;odata.streaming=false;IEEE754Compatible=false:\n              schema:\n                $ref: '#/components/schemas/Invoice'\n            application/json;odata.metadata=none;IEEE754Compatible=false:\n              schema:\n                $ref: '#/components/schemas/Invoice'\n            application/json;odata.metadata=none;IEEE754Compatible=true:\n              schema:\n                $ref: '#/components/schemas/Invoice'\n            application/json;odata.streaming=true;IEEE754Compatible=false:\n              schema:\n                $ref: '#/components/schemas/Invoice'\n            application/json;odata.streaming=true;IEEE754Compatible=true:\n              schema:\n                $ref: '#/components/schemas/Invoice'\n            application/json;odata.streaming=false;IEEE754Compatible=false:\n              schema:\n                $ref: '#/components/schemas/Invoice'\n            application/json;odata.streaming=false;IEEE754Compatible=true:\n              schema:\n                $ref: '#/components/schemas/Invoice'\n            application/json;IEEE754Compatible=false:\n              schema:\n                $ref: '#/components/schemas/Invoice'\n            application/json;IEEE754Compatible=true:\n              schema:\n                $ref: '#/components/schemas/Invoice'\n            application/xml:\n              schema:\n                $ref: '#/components/schemas/Invoice'\n            text/plain:\n              schema:\n                $ref: '#/components/schemas/Invoice'\n            application/octet-stream:\n              schema:\n                $ref: '#/components/schemas/Invoice'\n            text/json:\n              schema:\n                $ref: '#/components/schemas/Invoice'\n    delete:\n      tags:\n        - Invoices\n      parameters:\n        - name: id\n          in: path\n          required: true\n          schema:\n            type: integer\n            format: int64\n      responses:\n        '200':\n          description: OK\n  /api/v1/invoices/{id}/preview:\n    get:\n      tags:\n        - Invoices\n      parameters:\n        - name: id\n          in: path\n          required: true\n          schema:\n            type: integer\n            format: int64\n      responses:\n        '200':\n          description: OK\n  /api/v1/invoices/{id}/send:\n    post:\n      tags:\n        - Invoices\n      parameters:\n        - name: id\n          in: path\n          required: true\n          schema:\n            type: integer\n            format: int64\n      requestBody:\n        content:\n          application/json;odata.metadata=minimal;odata.streaming=true:\n            schema:\n              $ref: '#/components/schemas/InvoiceSendDto'\n          application/json;odata.metadata=minimal;odata.streaming=false:\n            schema:\n              $ref: '#/components/schemas/InvoiceSendDto'\n          application/json;odata.metadata=minimal:\n            schema:\n              $ref: '#/components/schemas/InvoiceSendDto'\n          application/json;odata.metadata=full;odata.streaming=true:\n            schema:\n              $ref: '#/components/schemas/InvoiceSendDto'\n          application/json;odata.metadata=full;odata.streaming=false:\n            schema:\n              $ref: '#/components/schemas/InvoiceSendDto'\n          application/json;odata.metadata=full:\n            schema:\n              $ref: '#/components/schemas/InvoiceSendDto'\n          application/json;odata.metadata=none;odata.streaming=true:\n            schema:\n              $ref: '#/components/schemas/InvoiceSendDto'\n          application/json;odata.metadata=none;odata.streaming=false:\n            schema:\n              $ref: '#/components/schemas/InvoiceSendDto'\n          application/json;odata.metadata=none:\n            schema:\n              $ref: '#/components/schemas/InvoiceSendDto'\n          application/json;odata.streaming=true:\n            schema:\n              $ref: '#/components/schemas/InvoiceSendDto'\n          application/json;odata.streaming=false:\n            schema:\n              $ref: '#/components/schemas/InvoiceSendDto'\n          application/json:\n            schema:\n              $ref: '#/components/schemas/InvoiceSendDto'\n          application/json;odata.metadata=minimal;odata.streaming=true;IEEE754Compatible=false:\n            schema:\n              $ref: '#/components/schemas/InvoiceSendDto'\n          application/json;odata.metadata=minimal;odata.streaming=true;IEEE754Compatible=true:\n            schema:\n              $ref: '#/components/schemas/InvoiceSendDto'\n          application/json;odata.metadata=minimal;odata.streaming=false;IEEE754Compatible=false:\n            schema:\n              $ref: '#/components/schemas/InvoiceSendDto'\n          application/json;odata.metadata=minimal;odata.streaming=false;IEEE754Compatible=true:\n            schema:\n              $ref: '#/components/schemas/InvoiceSendDto'\n          application/json;odata.metadata=minimal;IEEE754Compatible=false:\n            schema:\n              $ref: '#/components/schemas/InvoiceSendDto'\n          application/json;odata.metadata=minimal;IEEE754Compatible=true:\n            schema:\n              $ref: '#/components/schemas/InvoiceSendDto'\n          application/json;odata.metadata=full;odata.streaming=true;IEEE754Compatible=false:\n            schema:\n              $ref: '#/components/schemas/InvoiceSendDto'\n          application/json;odata.metadata=full;odata.streaming=true;IEEE754Compatible=true:\n            schema:\n              $ref: '#/components/schemas/InvoiceSendDto'\n          application/json;odata.metadata=full;odata.streaming=false;IEEE754Compatible=false:\n            schema:\n              $ref: '#/components/schemas/InvoiceSendDto'\n          application/json;odata.metadata=full;odata.streaming=false;IEEE754Compatible=true:\n            schema:\n              $ref: '#/components/schemas/InvoiceSendDto'\n          application/json;odata.metadata=full;IEEE754Compatible=false:\n            schema:\n              $ref: '#/components/schemas/InvoiceSendDto'\n          application/json;odata.metadata=full;IEEE754Compatible=true:\n            schema:\n              $ref: '#/components/schemas/InvoiceSendDto'\n          application/json;odata.metadata=none;odata.streaming=true;IEEE754Compatible=false:\n            schema:\n              $ref: '#/components/schemas/InvoiceSendDto'\n          application/json;odata.metadata=none;odata.streaming=true;IEEE754Compatible=true:\n            schema:\n              $ref: '#/components/schemas/InvoiceSendDto'\n          application/json;odata.metadata=none;odata.streaming=false;IEEE754Compatible=true:\n            schema:\n              $ref: '#/components/schemas/InvoiceSendDto'\n          application/json;odata.metadata=none;odata.streaming=false;IEEE754Compatible=false:\n            schema:\n              $ref: '#/components/schemas/InvoiceSendDto'\n          application/json;odata.metadata=none;IEEE754Compatible=false:\n            schema:\n              $ref: '#/components/schemas/InvoiceSendDto'\n          application/json;odata.metadata=none;IEEE754Compatible=true:\n            schema:\n              $ref: '#/components/schemas/InvoiceSendDto'\n          application/json;odata.streaming=true;IEEE754Compatible=false:\n            schema:\n              $ref: '#/components/schemas/InvoiceSendDto'\n          application/json;odata.streaming=true;IEEE754Compatible=true:\n            schema:\n              $ref: '#/components/schemas/InvoiceSendDto'\n          application/json;odata.streaming=false;IEEE754Compatible=false:\n            schema:\n              $ref: '#/components/schemas/InvoiceSendDto'\n          application/json;odata.streaming=false;IEEE754Compatible=true:\n            schema:\n              $ref: '#/components/schemas/InvoiceSendDto'\n          application/json;IEEE754Compatible=false:\n            schema:\n              $ref: '#/components/schemas/InvoiceSendDto'\n          application/json;IEEE754Compatible=true:\n            schema:\n              $ref: '#/components/schemas/InvoiceSendDto'\n          application/xml:\n            schema:\n              $ref: '#/components/schemas/InvoiceSendDto'\n          text/plain:\n            schema:\n              $ref: '#/components/schemas/InvoiceSendDto'\n          application/json-patch+json:\n            schema:\n              $ref: '#/components/schemas/InvoiceSendDto'\n          text/json:\n            schema:\n              $ref: '#/components/schemas/InvoiceSendDto'\n          application/*+json:\n            schema:\n              $ref: '#/components/schemas/InvoiceSendDto'\n      responses:\n        '200':\n          description: OK\n          content:\n            application/json;odata.metadata=minimal;odata.streaming=true:\n              schema:\n                $ref: '#/components/schemas/Invoice'\n            application/json;odata.metadata=minimal;odata.streaming=false:\n              schema:\n                $ref: '#/components/schemas/Invoice'\n            application/json;odata.metadata=minimal:\n              schema:\n                $ref: '#/components/schemas/Invoice'\n            application/json;odata.metadata=full;odata.streaming=true:\n              schema:\n                $ref: '#/components/schemas/Invoice'\n            application/json;odata.metadata=full;odata.streaming=false:\n              schema:\n                $ref: '#/components/schemas/Invoice'\n            application/json;odata.metadata=full:\n              schema:\n                $ref: '#/components/schemas/Invoice'\n            application/json;odata.metadata=none;odata.streaming=true:\n              schema:\n                $ref: '#/components/schemas/Invoice'\n            application/json;odata.metadata=none;odata.streaming=false:\n              schema:\n                $ref: '#/components/schemas/Invoice'\n            application/json;odata.metadata=none:\n              schema:\n                $ref: '#/components/schemas/Invoice'\n            application/json;odata.streaming=true:\n              schema:\n                $ref: '#/components/schemas/Invoice'\n            application/json;odata.streaming=false:\n              schema:\n                $ref: '#/components/schemas/Invoice'\n            application/json:\n              schema:\n                $ref: '#/components/schemas/Invoice'\n            application/json;odata.metadata=minimal;odata.streaming=true;IEEE754Compatible=false:\n              schema:\n                $ref: '#/components/schemas/Invoice'\n            application/json;odata.metadata=minimal;odata.streaming=true;IEEE754Compatible=true:\n              schema:\n                $ref: '#/components/schemas/Invoice'\n            application/json;odata.metadata=minimal;odata.streaming=false;IEEE754Compatible=false:\n              schema:\n                $ref: '#/components/schemas/Invoice'\n            application/json;odata.metadata=minimal;odata.streaming=false;IEEE754Compatible=true:\n              schema:\n                $ref: '#/components/schemas/Invoice'\n            application/json;odata.metadata=minimal;IEEE754Compatible=false:\n              schema:\n                $ref: '#/components/schemas/Invoice'\n            application/json;odata.metadata=minimal;IEEE754Compatible=true:\n              schema:\n                $ref: '#/components/schemas/Invoice'\n            application/json;odata.metadata=full;odata.streaming=true;IEEE754Compatible=false:\n              schema:\n                $ref: '#/components/schemas/Invoice'\n            application/json;odata.metadata=full;odata.streaming=true;IEEE754Compatible=true:\n              schema:\n                $ref: '#/components/schemas/Invoice'\n            application/json;odata.metadata=full;odata.streaming=false;IEEE754Compatible=false:\n              schema:\n                $ref: '#/components/schemas/Invoice'\n            application/json;odata.metadata=full;odata.streaming=false;IEEE754Compatible=true:\n              schema:\n                $ref: '#/components/schemas/Invoice'\n            application/json;odata.metadata=full;IEEE754Compatible=false:\n              schema:\n                $ref: '#/components/schemas/Invoice'\n            application/json;odata.metadata=full;IEEE754Compatible=true:\n              schema:\n                $ref: '#/components/schemas/Invoice'\n            application/json;odata.metadata=none;odata.streaming=true;IEEE754Compatible=false:\n              schema:\n                $ref: '#/components/schemas/Invoice'\n            application/json;odata.metadata=none;odata.streaming=true;IEEE754Compatible=true:\n              schema:\n                $ref: '#/components/schemas/Invoice'\n            application/json;odata.metadata=none;odata.streaming=false;IEEE754Compatible=true:\n              schema:\n                $ref: '#/components/schemas/Invoice'\n            application/json;odata.metadata=none;odata.streaming=false;IEEE754Compatible=false:\n              schema:\n                $ref: '#/components/schemas/Invoice'\n            application/json;odata.metadata=none;IEEE754Compatible=false:\n              schema:\n                $ref: '#/components/schemas/Invoice'\n            application/json;odata.metadata=none;IEEE754Compatible=true:\n              schema:\n                $ref: '#/components/schemas/Invoice'\n            application/json;odata.streaming=true;IEEE754Compatible=false:\n              schema:\n                $ref: '#/components/schemas/Invoice'\n            application/json;odata.streaming=true;IEEE754Compatible=true:\n              schema:\n                $ref: '#/components/schemas/Invoice'\n            application/json;odata.streaming=false;IEEE754Compatible=false:\n              schema:\n                $ref: '#/components/schemas/Invoice'\n            application/json;odata.streaming=false;IEEE754Compatible=true:\n              schema:\n                $ref: '#/components/schemas/Invoice'\n            application/json;IEEE754Compatible=false:\n              schema:\n                $ref: '#/components/schemas/Invoice'\n            application/json;IEEE754Compatible=true:\n              schema:\n                $ref: '#/components/schemas/Invoice'\n            application/xml:\n              schema:\n                $ref: '#/components/schemas/Invoice'\n            text/plain:\n              schema:\n                $ref: '#/components/schemas/Invoice'\n            application/octet-stream:\n              schema:\n                $ref: '#/components/schemas/Invoice'\n            text/json:\n              schema:\n                $ref: '#/components/schemas/Invoice'\n  /api/v1/invoices/{id}/snapshot:\n    post:\n      tags:\n        - Invoices\n      parameters:\n        - name: id\n          in: path\n          required: true\n          schema:\n            type: integer\n            format: int64\n      responses:\n        '200':\n          description: OK\n          content:\n            application/json;odata.metadata=minimal;odata.streaming=true:\n              schema:\n                $ref: '#/components/schemas/Invoice'\n            application/json;odata.metadata=minimal;odata.streaming=false:\n              schema:\n                $ref: '#/components/schemas/Invoice'\n            application/json;odata.metadata=minimal:\n              schema:\n                $ref: '#/components/schemas/Invoice'\n            application/json;odata.metadata=full;odata.streaming=true:\n              schema:\n                $ref: '#/components/schemas/Invoice'\n            application/json;odata.metadata=full;odata.streaming=false:\n              schema:\n                $ref: '#/components/schemas/Invoice'\n            application/json;odata.metadata=full:\n              schema:\n                $ref: '#/components/schemas/Invoice'\n            application/json;odata.metadata=none;odata.streaming=true:\n              schema:\n                $ref: '#/components/schemas/Invoice'\n            application/json;odata.metadata=none;odata.streaming=false:\n              schema:\n                $ref: '#/components/schemas/Invoice'\n            application/json;odata.metadata=none:\n              schema:\n                $ref: '#/components/schemas/Invoice'\n            application/json;odata.streaming=true:\n              schema:\n                $ref: '#/components/schemas/Invoice'\n            application/json;odata.streaming=false:\n              schema:\n                $ref: '#/components/schemas/Invoice'\n            application/json:\n              schema:\n                $ref: '#/components/schemas/Invoice'\n            application/json;odata.metadata=minimal;odata.streaming=true;IEEE754Compatible=false:\n              schema:\n                $ref: '#/components/schemas/Invoice'\n            application/json;odata.metadata=minimal;odata.streaming=true;IEEE754Compatible=true:\n              schema:\n                $ref: '#/components/schemas/Invoice'\n            application/json;odata.metadata=minimal;odata.streaming=false;IEEE754Compatible=false:\n              schema:\n                $ref: '#/components/schemas/Invoice'\n            application/json;odata.metadata=minimal;odata.streaming=false;IEEE754Compatible=true:\n              schema:\n                $ref: '#/components/schemas/Invoice'\n            application/json;odata.metadata=minimal;IEEE754Compatible=false:\n              schema:\n                $ref: '#/components/schemas/Invoice'\n            application/json;odata.metadata=minimal;IEEE754Compatible=true:\n              schema:\n                $ref: '#/components/schemas/Invoice'\n            application/json;odata.metadata=full;odata.streaming=true;IEEE754Compatible=false:\n              schema:\n                $ref: '#/components/schemas/Invoice'\n            application/json;odata.metadata=full;odata.streaming=true;IEEE754Compatible=true:\n              schema:\n                $ref: '#/components/schemas/Invoice'\n            application/json;odata.metadata=full;odata.streaming=false;IEEE754Compatible=false:\n              schema:\n                $ref: '#/components/schemas/Invoice'\n            application/json;odata.metadata=full;odata.streaming=false;IEEE754Compatible=true:\n              schema:\n                $ref: '#/components/schemas/Invoice'\n            application/json;odata.metadata=full;IEEE754Compatible=false:\n              schema:\n                $ref: '#/components/schemas/Invoice'\n            application/json;odata.metadata=full;IEEE754Compatible=true:\n              schema:\n                $ref: '#/components/schemas/Invoice'\n            application/json;odata.metadata=none;odata.streaming=true;IEEE754Compatible=false:\n              schema:\n                $ref: '#/components/schemas/Invoice'\n            application/json;odata.metadata=none;odata.streaming=true;IEEE754Compatible=true:\n              schema:\n                $ref: '#/components/schemas/Invoice'\n            application/json;odata.metadata=none;odata.streaming=false;IEEE754Compatible=true:\n              schema:\n                $ref: '#/components/schemas/Invoice'\n            application/json;odata.metadata=none;odata.streaming=false;IEEE754Compatible=false:\n              schema:\n                $ref: '#/components/schemas/Invoice'\n            application/json;odata.metadata=none;IEEE754Compatible=false:\n              schema:\n                $ref: '#/components/schemas/Invoice'\n            application/json;odata.metadata=none;IEEE754Compatible=true:\n              schema:\n                $ref: '#/components/schemas/Invoice'\n            application/json;odata.streaming=true;IEEE754Compatible=false:\n              schema:\n                $ref: '#/components/schemas/Invoice'\n            application/json;odata.streaming=true;IEEE754Compatible=true:\n              schema:\n                $ref: '#/components/schemas/Invoice'\n            application/json;odata.streaming=false;IEEE754Compatible=false:\n              schema:\n                $ref: '#/components/schemas/Invoice'\n            application/json;odata.streaming=false;IEEE754Compatible=true:\n              schema:\n                $ref: '#/components/schemas/Invoice'\n            application/json;IEEE754Compatible=false:\n              schema:\n                $ref: '#/components/schemas/Invoice'\n            application/json;IEEE754Compatible=true:\n              schema:\n                $ref: '#/components/schemas/Invoice'\n            application/xml:\n              schema:\n                $ref: '#/components/schemas/Invoice'\n            text/plain:\n              schema:\n                $ref: '#/components/schemas/Invoice'\n            application/octet-stream:\n              schema:\n                $ref: '#/components/schemas/Invoice'\n            text/json:\n              schema:\n                $ref: '#/components/schemas/Invoice'\n  /api/v1/odata/Invoices:\n    get:\n      tags:\n        - Invoices\n      operationId: api/v{version:apiVersion}/odata/Invoices\n      parameters:\n        - name: select\n          in: query\n          description: Limits the properties returned in the result.\n          schema:\n            type: string\n        - name: expand\n          in: query\n          description: Indicates the related entities to be represented inline. The\n            maximum depth is 2.\n          schema:\n            type: string\n        - name: filter\n          in: query\n          description: 'Restricts the set of items returned. The maximum number of\n            expressions is 100. The allowed functions are: allfunctions.'\n          schema:\n            type: string\n        - name: orderby\n          in: query\n          description: Specifies the order in which items are returned. The maximum number\n            of expressions is 5.\n          schema:\n            type: string\n        - name: top\n          in: query\n          description: Limits the number of items returned from a collection. The maximum\n            value is 100.\n          schema:\n            type: integer\n            format: int32\n        - name: skip\n          in: query\n          description: Excludes the specified number of items of the queried collection\n            from the result.\n          schema:\n            type: integer\n            format: int32\n        - name: count\n          in: query\n          description: Indicates whether the total count of items within a collection are\n            returned in the result.\n          schema:\n            type: boolean\n            default: false\n      responses:\n        '200':\n          description: OK\n          content:\n            application/json;odata.metadata=minimal;odata.streaming=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/Invoice'\n            application/json;odata.metadata=minimal;odata.streaming=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/Invoice'\n            application/json;odata.metadata=minimal:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/Invoice'\n            application/json;odata.metadata=full;odata.streaming=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/Invoice'\n            application/json;odata.metadata=full;odata.streaming=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/Invoice'\n            application/json;odata.metadata=full:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/Invoice'\n            application/json;odata.metadata=none;odata.streaming=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/Invoice'\n            application/json;odata.metadata=none;odata.streaming=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/Invoice'\n            application/json;odata.metadata=none:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/Invoice'\n            application/json;odata.streaming=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/Invoice'\n            application/json;odata.streaming=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/Invoice'\n            application/json:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/Invoice'\n            application/json;odata.metadata=minimal;odata.streaming=true;IEEE754Compatible=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/Invoice'\n            application/json;odata.metadata=minimal;odata.streaming=true;IEEE754Compatible=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/Invoice'\n            application/json;odata.metadata=minimal;odata.streaming=false;IEEE754Compatible=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/Invoice'\n            application/json;odata.metadata=minimal;odata.streaming=false;IEEE754Compatible=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/Invoice'\n            application/json;odata.metadata=minimal;IEEE754Compatible=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/Invoice'\n            application/json;odata.metadata=minimal;IEEE754Compatible=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/Invoice'\n            application/json;odata.metadata=full;odata.streaming=true;IEEE754Compatible=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/Invoice'\n            application/json;odata.metadata=full;odata.streaming=true;IEEE754Compatible=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/Invoice'\n            application/json;odata.metadata=full;odata.streaming=false;IEEE754Compatible=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/Invoice'\n            application/json;odata.metadata=full;odata.streaming=false;IEEE754Compatible=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/Invoice'\n            application/json;odata.metadata=full;IEEE754Compatible=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/Invoice'\n            application/json;odata.metadata=full;IEEE754Compatible=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/Invoice'\n            application/json;odata.metadata=none;odata.streaming=true;IEEE754Compatible=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/Invoice'\n            application/json;odata.metadata=none;odata.streaming=true;IEEE754Compatible=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/Invoice'\n            application/json;odata.metadata=none;odata.streaming=false;IEEE754Compatible=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/Invoice'\n            application/json;odata.metadata=none;odata.streaming=false;IEEE754Compatible=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/Invoice'\n            application/json;odata.metadata=none;IEEE754Compatible=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/Invoice'\n            application/json;odata.metadata=none;IEEE754Compatible=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/Invoice'\n            application/json;odata.streaming=true;IEEE754Compatible=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/Invoice'\n            application/json;odata.streaming=true;IEEE754Compatible=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/Invoice'\n            application/json;odata.streaming=false;IEEE754Compatible=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/Invoice'\n            application/json;odata.streaming=false;IEEE754Compatible=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/Invoice'\n            application/json;IEEE754Compatible=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/Invoice'\n            application/json;IEEE754Compatible=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/Invoice'\n            application/xml:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/Invoice'\n            text/plain:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/Invoice'\n            application/octet-stream:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/Invoice'\n            text/json:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/Invoice'\n  /api/v1/odata/Invoices/$count:\n    get:\n      tags:\n        - Invoices\n      operationId: api/v{version:apiVersion}/odata/Invoices/$count\n      parameters:\n        - name: select\n          in: query\n          description: Limits the properties returned in the result.\n          schema:\n            type: string\n        - name: expand\n          in: query\n          description: Indicates the related entities to be represented inline. The\n            maximum depth is 2.\n          schema:\n            type: string\n        - name: filter\n          in: query\n          description: 'Restricts the set of items returned. The maximum number of\n            expressions is 100. The allowed functions are: allfunctions.'\n          schema:\n            type: string\n        - name: orderby\n          in: query\n          description: Specifies the order in which items are returned. The maximum number\n            of expressions is 5.\n          schema:\n            type: string\n        - name: top\n          in: query\n          description: Limits the number of items returned from a collection. The maximum\n            value is 100.\n          schema:\n            type: integer\n            format: int32\n        - name: skip\n          in: query\n          description: Excludes the specified number of items of the queried collection\n            from the result.\n          schema:\n            type: integer\n            format: int32\n        - name: count\n          in: query\n          description: Indicates whether the total count of items within a collection are\n            returned in the result.\n          schema:\n            type: boolean\n            default: false\n      responses:\n        '200':\n          description: OK\n          content:\n            application/json;odata.metadata=minimal;odata.streaming=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/Invoice'\n            application/json;odata.metadata=minimal;odata.streaming=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/Invoice'\n            application/json;odata.metadata=minimal:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/Invoice'\n            application/json;odata.metadata=full;odata.streaming=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/Invoice'\n            application/json;odata.metadata=full;odata.streaming=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/Invoice'\n            application/json;odata.metadata=full:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/Invoice'\n            application/json;odata.metadata=none;odata.streaming=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/Invoice'\n            application/json;odata.metadata=none;odata.streaming=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/Invoice'\n            application/json;odata.metadata=none:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/Invoice'\n            application/json;odata.streaming=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/Invoice'\n            application/json;odata.streaming=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/Invoice'\n            application/json:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/Invoice'\n            application/json;odata.metadata=minimal;odata.streaming=true;IEEE754Compatible=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/Invoice'\n            application/json;odata.metadata=minimal;odata.streaming=true;IEEE754Compatible=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/Invoice'\n            application/json;odata.metadata=minimal;odata.streaming=false;IEEE754Compatible=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/Invoice'\n            application/json;odata.metadata=minimal;odata.streaming=false;IEEE754Compatible=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/Invoice'\n            application/json;odata.metadata=minimal;IEEE754Compatible=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/Invoice'\n            application/json;odata.metadata=minimal;IEEE754Compatible=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/Invoice'\n            application/json;odata.metadata=full;odata.streaming=true;IEEE754Compatible=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/Invoice'\n            application/json;odata.metadata=full;odata.streaming=true;IEEE754Compatible=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/Invoice'\n            application/json;odata.metadata=full;odata.streaming=false;IEEE754Compatible=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/Invoice'\n            application/json;odata.metadata=full;odata.streaming=false;IEEE754Compatible=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/Invoice'\n            application/json;odata.metadata=full;IEEE754Compatible=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/Invoice'\n            application/json;odata.metadata=full;IEEE754Compatible=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/Invoice'\n            application/json;odata.metadata=none;odata.streaming=true;IEEE754Compatible=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/Invoice'\n            application/json;odata.metadata=none;odata.streaming=true;IEEE754Compatible=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/Invoice'\n            application/json;odata.metadata=none;odata.streaming=false;IEEE754Compatible=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/Invoice'\n            application/json;odata.metadata=none;odata.streaming=false;IEEE754Compatible=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/Invoice'\n            application/json;odata.metadata=none;IEEE754Compatible=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/Invoice'\n            application/json;odata.metadata=none;IEEE754Compatible=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/Invoice'\n            application/json;odata.streaming=true;IEEE754Compatible=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/Invoice'\n            application/json;odata.streaming=true;IEEE754Compatible=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/Invoice'\n            application/json;odata.streaming=false;IEEE754Compatible=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/Invoice'\n            application/json;odata.streaming=false;IEEE754Compatible=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/Invoice'\n            application/json;IEEE754Compatible=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/Invoice'\n            application/json;IEEE754Compatible=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/Invoice'\n            application/xml:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/Invoice'\n            text/plain:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/Invoice'\n            application/octet-stream:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/Invoice'\n            text/json:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/Invoice'\n  /api/v1/invoice-settings:\n    put:\n      tags:\n        - InvoiceSettings\n      requestBody:\n        content:\n          application/json;odata.metadata=minimal;odata.streaming=true:\n            schema:\n              $ref: '#/components/schemas/InvoiceSettingUpsertDto'\n          application/json;odata.metadata=minimal;odata.streaming=false:\n            schema:\n              $ref: '#/components/schemas/InvoiceSettingUpsertDto'\n          application/json;odata.metadata=minimal:\n            schema:\n              $ref: '#/components/schemas/InvoiceSettingUpsertDto'\n          application/json;odata.metadata=full;odata.streaming=true:\n            schema:\n              $ref: '#/components/schemas/InvoiceSettingUpsertDto'\n          application/json;odata.metadata=full;odata.streaming=false:\n            schema:\n              $ref: '#/components/schemas/InvoiceSettingUpsertDto'\n          application/json;odata.metadata=full:\n            schema:\n              $ref: '#/components/schemas/InvoiceSettingUpsertDto'\n          application/json;odata.metadata=none;odata.streaming=true:\n            schema:\n              $ref: '#/components/schemas/InvoiceSettingUpsertDto'\n          application/json;odata.metadata=none;odata.streaming=false:\n            schema:\n              $ref: '#/components/schemas/InvoiceSettingUpsertDto'\n          application/json;odata.metadata=none:\n            schema:\n              $ref: '#/components/schemas/InvoiceSettingUpsertDto'\n          application/json;odata.streaming=true:\n            schema:\n              $ref: '#/components/schemas/InvoiceSettingUpsertDto'\n          application/json;odata.streaming=false:\n            schema:\n              $ref: '#/components/schemas/InvoiceSettingUpsertDto'\n          application/json:\n            schema:\n              $ref: '#/components/schemas/InvoiceSettingUpsertDto'\n          application/json;odata.metadata=minimal;odata.streaming=true;IEEE754Compatible=false:\n            schema:\n              $ref: '#/components/schemas/InvoiceSettingUpsertDto'\n          application/json;odata.metadata=minimal;odata.streaming=true;IEEE754Compatible=true:\n            schema:\n              $ref: '#/components/schemas/InvoiceSettingUpsertDto'\n          application/json;odata.metadata=minimal;odata.streaming=false;IEEE754Compatible=false:\n            schema:\n              $ref: '#/components/schemas/InvoiceSettingUpsertDto'\n          application/json;odata.metadata=minimal;odata.streaming=false;IEEE754Compatible=true:\n            schema:\n              $ref: '#/components/schemas/InvoiceSettingUpsertDto'\n          application/json;odata.metadata=minimal;IEEE754Compatible=false:\n            schema:\n              $ref: '#/components/schemas/InvoiceSettingUpsertDto'\n          application/json;odata.metadata=minimal;IEEE754Compatible=true:\n            schema:\n              $ref: '#/components/schemas/InvoiceSettingUpsertDto'\n          application/json;odata.metadata=full;odata.streaming=true;IEEE754Compatible=false:\n            schema:\n              $ref: '#/components/schemas/InvoiceSettingUpsertDto'\n          application/json;odata.metadata=full;odata.streaming=true;IEEE754Compatible=true:\n            schema:\n              $ref: '#/components/schemas/InvoiceSettingUpsertDto'\n          application/json;odata.metadata=full;odata.streaming=false;IEEE754Compatible=false:\n            schema:\n              $ref: '#/components/schemas/InvoiceSettingUpsertDto'\n          application/json;odata.metadata=full;odata.streaming=false;IEEE754Compatible=true:\n            schema:\n              $ref: '#/components/schemas/InvoiceSettingUpsertDto'\n          application/json;odata.metadata=full;IEEE754Compatible=false:\n            schema:\n              $ref: '#/components/schemas/InvoiceSettingUpsertDto'\n          application/json;odata.metadata=full;IEEE754Compatible=true:\n            schema:\n              $ref: '#/components/schemas/InvoiceSettingUpsertDto'\n          application/json;odata.metadata=none;odata.streaming=true;IEEE754Compatible=false:\n            schema:\n              $ref: '#/components/schemas/InvoiceSettingUpsertDto'\n          application/json;odata.metadata=none;odata.streaming=true;IEEE754Compatible=true:\n            schema:\n              $ref: '#/components/schemas/InvoiceSettingUpsertDto'\n          application/json;odata.metadata=none;odata.streaming=false;IEEE754Compatible=true:\n            schema:\n              $ref: '#/components/schemas/InvoiceSettingUpsertDto'\n          application/json;odata.metadata=none;odata.streaming=false;IEEE754Compatible=false:\n            schema:\n              $ref: '#/components/schemas/InvoiceSettingUpsertDto'\n          application/json;odata.metadata=none;IEEE754Compatible=false:\n            schema:\n              $ref: '#/components/schemas/InvoiceSettingUpsertDto'\n          application/json;odata.metadata=none;IEEE754Compatible=true:\n            schema:\n              $ref: '#/components/schemas/InvoiceSettingUpsertDto'\n          application/json;odata.streaming=true;IEEE754Compatible=false:\n            schema:\n              $ref: '#/components/schemas/InvoiceSettingUpsertDto'\n          application/json;odata.streaming=true;IEEE754Compatible=true:\n            schema:\n              $ref: '#/components/schemas/InvoiceSettingUpsertDto'\n          application/json;odata.streaming=false;IEEE754Compatible=false:\n            schema:\n              $ref: '#/components/schemas/InvoiceSettingUpsertDto'\n          application/json;odata.streaming=false;IEEE754Compatible=true:\n            schema:\n              $ref: '#/components/schemas/InvoiceSettingUpsertDto'\n          application/json;IEEE754Compatible=false:\n            schema:\n              $ref: '#/components/schemas/InvoiceSettingUpsertDto'\n          application/json;IEEE754Compatible=true:\n            schema:\n              $ref: '#/components/schemas/InvoiceSettingUpsertDto'\n          application/xml:\n            schema:\n              $ref: '#/components/schemas/InvoiceSettingUpsertDto'\n          text/plain:\n            schema:\n              $ref: '#/components/schemas/InvoiceSettingUpsertDto'\n          application/json-patch+json:\n            schema:\n              $ref: '#/components/schemas/InvoiceSettingUpsertDto'\n          text/json:\n            schema:\n              $ref: '#/components/schemas/InvoiceSettingUpsertDto'\n          application/*+json:\n            schema:\n              $ref: '#/components/schemas/InvoiceSettingUpsertDto'\n      responses:\n        '200':\n          description: OK\n          content:\n            application/json;odata.metadata=minimal;odata.streaming=true:\n              schema:\n                $ref: '#/components/schemas/InvoiceSetting'\n            application/json;odata.metadata=minimal;odata.streaming=false:\n              schema:\n                $ref: '#/components/schemas/InvoiceSetting'\n            application/json;odata.metadata=minimal:\n              schema:\n                $ref: '#/components/schemas/InvoiceSetting'\n            application/json;odata.metadata=full;odata.streaming=true:\n              schema:\n                $ref: '#/components/schemas/InvoiceSetting'\n            application/json;odata.metadata=full;odata.streaming=false:\n              schema:\n                $ref: '#/components/schemas/InvoiceSetting'\n            application/json;odata.metadata=full:\n              schema:\n                $ref: '#/components/schemas/InvoiceSetting'\n            application/json;odata.metadata=none;odata.streaming=true:\n              schema:\n                $ref: '#/components/schemas/InvoiceSetting'\n            application/json;odata.metadata=none;odata.streaming=false:\n              schema:\n                $ref: '#/components/schemas/InvoiceSetting'\n            application/json;odata.metadata=none:\n              schema:\n                $ref: '#/components/schemas/InvoiceSetting'\n            application/json;odata.streaming=true:\n              schema:\n                $ref: '#/components/schemas/InvoiceSetting'\n            application/json;odata.streaming=false:\n              schema:\n                $ref: '#/components/schemas/InvoiceSetting'\n            application/json:\n              schema:\n                $ref: '#/components/schemas/InvoiceSetting'\n            application/json;odata.metadata=minimal;odata.streaming=true;IEEE754Compatible=false:\n              schema:\n                $ref: '#/components/schemas/InvoiceSetting'\n            application/json;odata.metadata=minimal;odata.streaming=true;IEEE754Compatible=true:\n              schema:\n                $ref: '#/components/schemas/InvoiceSetting'\n            application/json;odata.metadata=minimal;odata.streaming=false;IEEE754Compatible=false:\n              schema:\n                $ref: '#/components/schemas/InvoiceSetting'\n            application/json;odata.metadata=minimal;odata.streaming=false;IEEE754Compatible=true:\n              schema:\n                $ref: '#/components/schemas/InvoiceSetting'\n            application/json;odata.metadata=minimal;IEEE754Compatible=false:\n              schema:\n                $ref: '#/components/schemas/InvoiceSetting'\n            application/json;odata.metadata=minimal;IEEE754Compatible=true:\n              schema:\n                $ref: '#/components/schemas/InvoiceSetting'\n            application/json;odata.metadata=full;odata.streaming=true;IEEE754Compatible=false:\n              schema:\n                $ref: '#/components/schemas/InvoiceSetting'\n            application/json;odata.metadata=full;odata.streaming=true;IEEE754Compatible=true:\n              schema:\n                $ref: '#/components/schemas/InvoiceSetting'\n            application/json;odata.metadata=full;odata.streaming=false;IEEE754Compatible=false:\n              schema:\n                $ref: '#/components/schemas/InvoiceSetting'\n            application/json;odata.metadata=full;odata.streaming=false;IEEE754Compatible=true:\n              schema:\n                $ref: '#/components/schemas/InvoiceSetting'\n            application/json;odata.metadata=full;IEEE754Compatible=false:\n              schema:\n                $ref: '#/components/schemas/InvoiceSetting'\n            application/json;odata.metadata=full;IEEE754Compatible=true:\n              schema:\n                $ref: '#/components/schemas/InvoiceSetting'\n            application/json;odata.metadata=none;odata.streaming=true;IEEE754Compatible=false:\n              schema:\n                $ref: '#/components/schemas/InvoiceSetting'\n            application/json;odata.metadata=none;odata.streaming=true;IEEE754Compatible=true:\n              schema:\n                $ref: '#/components/schemas/InvoiceSetting'\n            application/json;odata.metadata=none;odata.streaming=false;IEEE754Compatible=true:\n              schema:\n                $ref: '#/components/schemas/InvoiceSetting'\n            application/json;odata.metadata=none;odata.streaming=false;IEEE754Compatible=false:\n              schema:\n                $ref: '#/components/schemas/InvoiceSetting'\n            application/json;odata.metadata=none;IEEE754Compatible=false:\n              schema:\n                $ref: '#/components/schemas/InvoiceSetting'\n            application/json;odata.metadata=none;IEEE754Compatible=true:\n              schema:\n                $ref: '#/components/schemas/InvoiceSetting'\n            application/json;odata.streaming=true;IEEE754Compatible=false:\n              schema:\n                $ref: '#/components/schemas/InvoiceSetting'\n            application/json;odata.streaming=true;IEEE754Compatible=true:\n              schema:\n                $ref: '#/components/schemas/InvoiceSetting'\n            application/json;odata.streaming=false;IEEE754Compatible=false:\n              schema:\n                $ref: '#/components/schemas/InvoiceSetting'\n            application/json;odata.streaming=false;IEEE754Compatible=true:\n              schema:\n                $ref: '#/components/schemas/InvoiceSetting'\n            application/json;IEEE754Compatible=false:\n              schema:\n                $ref: '#/components/schemas/InvoiceSetting'\n            application/json;IEEE754Compatible=true:\n              schema:\n                $ref: '#/components/schemas/InvoiceSetting'\n            application/xml:\n              schema:\n                $ref: '#/components/schemas/InvoiceSetting'\n            text/plain:\n              schema:\n                $ref: '#/components/schemas/InvoiceSetting'\n            application/octet-stream:\n              schema:\n                $ref: '#/components/schemas/InvoiceSetting'\n            text/json:\n              schema:\n                $ref: '#/components/schemas/InvoiceSetting'\n  /api/v1/odata/InvoiceSettings:\n    get:\n      tags:\n        - InvoiceSettings\n      operationId: api/v{version:apiVersion}/odata/InvoiceSettings\n      parameters:\n        - name: select\n          in: query\n          description: Limits the properties returned in the result.\n          schema:\n            type: string\n        - name: expand\n          in: query\n          description: Indicates the related entities to be represented inline. The\n            maximum depth is 2.\n          schema:\n            type: string\n        - name: filter\n          in: query\n          description: 'Restricts the set of items returned. The maximum number of\n            expressions is 100. The allowed functions are: allfunctions.'\n          schema:\n            type: string\n        - name: orderby\n          in: query\n          description: Specifies the order in which items are returned. The maximum number\n            of expressions is 5.\n          schema:\n            type: string\n        - name: top\n          in: query\n          description: Limits the number of items returned from a collection. The maximum\n            value is 100.\n          schema:\n            type: integer\n            format: int32\n        - name: skip\n          in: query\n          description: Excludes the specified number of items of the queried collection\n            from the result.\n          schema:\n            type: integer\n            format: int32\n        - name: count\n          in: query\n          description: Indicates whether the total count of items within a collection are\n            returned in the result.\n          schema:\n            type: boolean\n            default: false\n      responses:\n        '200':\n          description: OK\n          content:\n            application/json;odata.metadata=minimal;odata.streaming=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/InvoiceSetting'\n            application/json;odata.metadata=minimal;odata.streaming=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/InvoiceSetting'\n            application/json;odata.metadata=minimal:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/InvoiceSetting'\n            application/json;odata.metadata=full;odata.streaming=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/InvoiceSetting'\n            application/json;odata.metadata=full;odata.streaming=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/InvoiceSetting'\n            application/json;odata.metadata=full:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/InvoiceSetting'\n            application/json;odata.metadata=none;odata.streaming=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/InvoiceSetting'\n            application/json;odata.metadata=none;odata.streaming=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/InvoiceSetting'\n            application/json;odata.metadata=none:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/InvoiceSetting'\n            application/json;odata.streaming=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/InvoiceSetting'\n            application/json;odata.streaming=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/InvoiceSetting'\n            application/json:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/InvoiceSetting'\n            application/json;odata.metadata=minimal;odata.streaming=true;IEEE754Compatible=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/InvoiceSetting'\n            application/json;odata.metadata=minimal;odata.streaming=true;IEEE754Compatible=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/InvoiceSetting'\n            application/json;odata.metadata=minimal;odata.streaming=false;IEEE754Compatible=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/InvoiceSetting'\n            application/json;odata.metadata=minimal;odata.streaming=false;IEEE754Compatible=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/InvoiceSetting'\n            application/json;odata.metadata=minimal;IEEE754Compatible=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/InvoiceSetting'\n            application/json;odata.metadata=minimal;IEEE754Compatible=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/InvoiceSetting'\n            application/json;odata.metadata=full;odata.streaming=true;IEEE754Compatible=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/InvoiceSetting'\n            application/json;odata.metadata=full;odata.streaming=true;IEEE754Compatible=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/InvoiceSetting'\n            application/json;odata.metadata=full;odata.streaming=false;IEEE754Compatible=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/InvoiceSetting'\n            application/json;odata.metadata=full;odata.streaming=false;IEEE754Compatible=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/InvoiceSetting'\n            application/json;odata.metadata=full;IEEE754Compatible=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/InvoiceSetting'\n            application/json;odata.metadata=full;IEEE754Compatible=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/InvoiceSetting'\n            application/json;odata.metadata=none;odata.streaming=true;IEEE754Compatible=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/InvoiceSetting'\n            application/json;odata.metadata=none;odata.streaming=true;IEEE754Compatible=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/InvoiceSetting'\n            application/json;odata.metadata=none;odata.streaming=false;IEEE754Compatible=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/InvoiceSetting'\n            application/json;odata.metadata=none;odata.streaming=false;IEEE754Compatible=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/InvoiceSetting'\n            application/json;odata.metadata=none;IEEE754Compatible=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/InvoiceSetting'\n            application/json;odata.metadata=none;IEEE754Compatible=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/InvoiceSetting'\n            application/json;odata.streaming=true;IEEE754Compatible=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/InvoiceSetting'\n            application/json;odata.streaming=true;IEEE754Compatible=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/InvoiceSetting'\n            application/json;odata.streaming=false;IEEE754Compatible=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/InvoiceSetting'\n            application/json;odata.streaming=false;IEEE754Compatible=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/InvoiceSetting'\n            application/json;IEEE754Compatible=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/InvoiceSetting'\n            application/json;IEEE754Compatible=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/InvoiceSetting'\n            application/xml:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/InvoiceSetting'\n            text/plain:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/InvoiceSetting'\n            application/octet-stream:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/InvoiceSetting'\n            text/json:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/InvoiceSetting'\n  /api/v1/odata/InvoiceSettings/$count:\n    get:\n      tags:\n        - InvoiceSettings\n      operationId: api/v{version:apiVersion}/odata/InvoiceSettings/$count\n      parameters:\n        - name: select\n          in: query\n          description: Limits the properties returned in the result.\n          schema:\n            type: string\n        - name: expand\n          in: query\n          description: Indicates the related entities to be represented inline. The\n            maximum depth is 2.\n          schema:\n            type: string\n        - name: filter\n          in: query\n          description: 'Restricts the set of items returned. The maximum number of\n            expressions is 100. The allowed functions are: allfunctions.'\n          schema:\n            type: string\n        - name: orderby\n          in: query\n          description: Specifies the order in which items are returned. The maximum number\n            of expressions is 5.\n          schema:\n            type: string\n        - name: top\n          in: query\n          description: Limits the number of items returned from a collection. The maximum\n            value is 100.\n          schema:\n            type: integer\n            format: int32\n        - name: skip\n          in: query\n          description: Excludes the specified number of items of the queried collection\n            from the result.\n          schema:\n            type: integer\n            format: int32\n        - name: count\n          in: query\n          description: Indicates whether the total count of items within a collection are\n            returned in the result.\n          schema:\n            type: boolean\n            default: false\n      responses:\n        '200':\n          description: OK\n          content:\n            application/json;odata.metadata=minimal;odata.streaming=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/InvoiceSetting'\n            application/json;odata.metadata=minimal;odata.streaming=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/InvoiceSetting'\n            application/json;odata.metadata=minimal:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/InvoiceSetting'\n            application/json;odata.metadata=full;odata.streaming=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/InvoiceSetting'\n            application/json;odata.metadata=full;odata.streaming=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/InvoiceSetting'\n            application/json;odata.metadata=full:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/InvoiceSetting'\n            application/json;odata.metadata=none;odata.streaming=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/InvoiceSetting'\n            application/json;odata.metadata=none;odata.streaming=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/InvoiceSetting'\n            application/json;odata.metadata=none:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/InvoiceSetting'\n            application/json;odata.streaming=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/InvoiceSetting'\n            application/json;odata.streaming=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/InvoiceSetting'\n            application/json:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/InvoiceSetting'\n            application/json;odata.metadata=minimal;odata.streaming=true;IEEE754Compatible=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/InvoiceSetting'\n            application/json;odata.metadata=minimal;odata.streaming=true;IEEE754Compatible=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/InvoiceSetting'\n            application/json;odata.metadata=minimal;odata.streaming=false;IEEE754Compatible=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/InvoiceSetting'\n            application/json;odata.metadata=minimal;odata.streaming=false;IEEE754Compatible=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/InvoiceSetting'\n            application/json;odata.metadata=minimal;IEEE754Compatible=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/InvoiceSetting'\n            application/json;odata.metadata=minimal;IEEE754Compatible=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/InvoiceSetting'\n            application/json;odata.metadata=full;odata.streaming=true;IEEE754Compatible=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/InvoiceSetting'\n            application/json;odata.metadata=full;odata.streaming=true;IEEE754Compatible=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/InvoiceSetting'\n            application/json;odata.metadata=full;odata.streaming=false;IEEE754Compatible=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/InvoiceSetting'\n            application/json;odata.metadata=full;odata.streaming=false;IEEE754Compatible=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/InvoiceSetting'\n            application/json;odata.metadata=full;IEEE754Compatible=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/InvoiceSetting'\n            application/json;odata.metadata=full;IEEE754Compatible=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/InvoiceSetting'\n            application/json;odata.metadata=none;odata.streaming=true;IEEE754Compatible=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/InvoiceSetting'\n            application/json;odata.metadata=none;odata.streaming=true;IEEE754Compatible=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/InvoiceSetting'\n            application/json;odata.metadata=none;odata.streaming=false;IEEE754Compatible=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/InvoiceSetting'\n            application/json;odata.metadata=none;odata.streaming=false;IEEE754Compatible=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/InvoiceSetting'\n            application/json;odata.metadata=none;IEEE754Compatible=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/InvoiceSetting'\n            application/json;odata.metadata=none;IEEE754Compatible=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/InvoiceSetting'\n            application/json;odata.streaming=true;IEEE754Compatible=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/InvoiceSetting'\n            application/json;odata.streaming=true;IEEE754Compatible=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/InvoiceSetting'\n            application/json;odata.streaming=false;IEEE754Compatible=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/InvoiceSetting'\n            application/json;odata.streaming=false;IEEE754Compatible=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/InvoiceSetting'\n            application/json;IEEE754Compatible=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/InvoiceSetting'\n            application/json;IEEE754Compatible=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/InvoiceSetting'\n            application/xml:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/InvoiceSetting'\n            text/plain:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/InvoiceSetting'\n            application/octet-stream:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/InvoiceSetting'\n            text/json:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/InvoiceSetting'\n  /api/v1/odata/Licenses:\n    get:\n      tags:\n        - Licenses\n      operationId: api/v{version:apiVersion}/odata/Licenses\n      parameters:\n        - name: select\n          in: query\n          description: Limits the properties returned in the result.\n          schema:\n            type: string\n        - name: expand\n          in: query\n          description: Indicates the related entities to be represented inline. The\n            maximum depth is 2.\n          schema:\n            type: string\n        - name: filter\n          in: query\n          description: 'Restricts the set of items returned. The maximum number of\n            expressions is 100. The allowed functions are: allfunctions.'\n          schema:\n            type: string\n        - name: orderby\n          in: query\n          description: Specifies the order in which items are returned. The maximum number\n            of expressions is 5.\n          schema:\n            type: string\n        - name: top\n          in: query\n          description: Limits the number of items returned from a collection. The maximum\n            value is 100.\n          schema:\n            type: integer\n            format: int32\n        - name: skip\n          in: query\n          description: Excludes the specified number of items of the queried collection\n            from the result.\n          schema:\n            type: integer\n            format: int32\n        - name: count\n          in: query\n          description: Indicates whether the total count of items within a collection are\n            returned in the result.\n          schema:\n            type: boolean\n            default: false\n      responses:\n        '200':\n          description: OK\n          content:\n            application/json;odata.metadata=minimal;odata.streaming=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/LicenseDto'\n            application/json;odata.metadata=minimal;odata.streaming=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/LicenseDto'\n            application/json;odata.metadata=minimal:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/LicenseDto'\n            application/json;odata.metadata=full;odata.streaming=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/LicenseDto'\n            application/json;odata.metadata=full;odata.streaming=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/LicenseDto'\n            application/json;odata.metadata=full:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/LicenseDto'\n            application/json;odata.metadata=none;odata.streaming=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/LicenseDto'\n            application/json;odata.metadata=none;odata.streaming=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/LicenseDto'\n            application/json;odata.metadata=none:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/LicenseDto'\n            application/json;odata.streaming=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/LicenseDto'\n            application/json;odata.streaming=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/LicenseDto'\n            application/json:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/LicenseDto'\n            application/json;odata.metadata=minimal;odata.streaming=true;IEEE754Compatible=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/LicenseDto'\n            application/json;odata.metadata=minimal;odata.streaming=true;IEEE754Compatible=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/LicenseDto'\n            application/json;odata.metadata=minimal;odata.streaming=false;IEEE754Compatible=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/LicenseDto'\n            application/json;odata.metadata=minimal;odata.streaming=false;IEEE754Compatible=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/LicenseDto'\n            application/json;odata.metadata=minimal;IEEE754Compatible=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/LicenseDto'\n            application/json;odata.metadata=minimal;IEEE754Compatible=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/LicenseDto'\n            application/json;odata.metadata=full;odata.streaming=true;IEEE754Compatible=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/LicenseDto'\n            application/json;odata.metadata=full;odata.streaming=true;IEEE754Compatible=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/LicenseDto'\n            application/json;odata.metadata=full;odata.streaming=false;IEEE754Compatible=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/LicenseDto'\n            application/json;odata.metadata=full;odata.streaming=false;IEEE754Compatible=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/LicenseDto'\n            application/json;odata.metadata=full;IEEE754Compatible=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/LicenseDto'\n            application/json;odata.metadata=full;IEEE754Compatible=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/LicenseDto'\n            application/json;odata.metadata=none;odata.streaming=true;IEEE754Compatible=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/LicenseDto'\n            application/json;odata.metadata=none;odata.streaming=true;IEEE754Compatible=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/LicenseDto'\n            application/json;odata.metadata=none;odata.streaming=false;IEEE754Compatible=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/LicenseDto'\n            application/json;odata.metadata=none;odata.streaming=false;IEEE754Compatible=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/LicenseDto'\n            application/json;odata.metadata=none;IEEE754Compatible=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/LicenseDto'\n            application/json;odata.metadata=none;IEEE754Compatible=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/LicenseDto'\n            application/json;odata.streaming=true;IEEE754Compatible=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/LicenseDto'\n            application/json;odata.streaming=true;IEEE754Compatible=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/LicenseDto'\n            application/json;odata.streaming=false;IEEE754Compatible=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/LicenseDto'\n            application/json;odata.streaming=false;IEEE754Compatible=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/LicenseDto'\n            application/json;IEEE754Compatible=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/LicenseDto'\n            application/json;IEEE754Compatible=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/LicenseDto'\n            application/xml:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/LicenseDto'\n            text/plain:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/LicenseDto'\n            application/octet-stream:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/LicenseDto'\n            text/json:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/LicenseDto'\n  /api/v1/odata/Licenses/$count:\n    get:\n      tags:\n        - Licenses\n      operationId: api/v{version:apiVersion}/odata/Licenses/$count\n      parameters:\n        - name: select\n          in: query\n          description: Limits the properties returned in the result.\n          schema:\n            type: string\n        - name: expand\n          in: query\n          description: Indicates the related entities to be represented inline. The\n            maximum depth is 2.\n          schema:\n            type: string\n        - name: filter\n          in: query\n          description: 'Restricts the set of items returned. The maximum number of\n            expressions is 100. The allowed functions are: allfunctions.'\n          schema:\n            type: string\n        - name: orderby\n          in: query\n          description: Specifies the order in which items are returned. The maximum number\n            of expressions is 5.\n          schema:\n            type: string\n        - name: top\n          in: query\n          description: Limits the number of items returned from a collection. The maximum\n            value is 100.\n          schema:\n            type: integer\n            format: int32\n        - name: skip\n          in: query\n          description: Excludes the specified number of items of the queried collection\n            from the result.\n          schema:\n            type: integer\n            format: int32\n        - name: count\n          in: query\n          description: Indicates whether the total count of items within a collection are\n            returned in the result.\n          schema:\n            type: boolean\n            default: false\n      responses:\n        '200':\n          description: OK\n          content:\n            application/json;odata.metadata=minimal;odata.streaming=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/LicenseDto'\n            application/json;odata.metadata=minimal;odata.streaming=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/LicenseDto'\n            application/json;odata.metadata=minimal:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/LicenseDto'\n            application/json;odata.metadata=full;odata.streaming=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/LicenseDto'\n            application/json;odata.metadata=full;odata.streaming=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/LicenseDto'\n            application/json;odata.metadata=full:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/LicenseDto'\n            application/json;odata.metadata=none;odata.streaming=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/LicenseDto'\n            application/json;odata.metadata=none;odata.streaming=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/LicenseDto'\n            application/json;odata.metadata=none:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/LicenseDto'\n            application/json;odata.streaming=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/LicenseDto'\n            application/json;odata.streaming=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/LicenseDto'\n            application/json:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/LicenseDto'\n            application/json;odata.metadata=minimal;odata.streaming=true;IEEE754Compatible=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/LicenseDto'\n            application/json;odata.metadata=minimal;odata.streaming=true;IEEE754Compatible=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/LicenseDto'\n            application/json;odata.metadata=minimal;odata.streaming=false;IEEE754Compatible=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/LicenseDto'\n            application/json;odata.metadata=minimal;odata.streaming=false;IEEE754Compatible=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/LicenseDto'\n            application/json;odata.metadata=minimal;IEEE754Compatible=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/LicenseDto'\n            application/json;odata.metadata=minimal;IEEE754Compatible=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/LicenseDto'\n            application/json;odata.metadata=full;odata.streaming=true;IEEE754Compatible=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/LicenseDto'\n            application/json;odata.metadata=full;odata.streaming=true;IEEE754Compatible=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/LicenseDto'\n            application/json;odata.metadata=full;odata.streaming=false;IEEE754Compatible=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/LicenseDto'\n            application/json;odata.metadata=full;odata.streaming=false;IEEE754Compatible=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/LicenseDto'\n            application/json;odata.metadata=full;IEEE754Compatible=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/LicenseDto'\n            application/json;odata.metadata=full;IEEE754Compatible=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/LicenseDto'\n            application/json;odata.metadata=none;odata.streaming=true;IEEE754Compatible=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/LicenseDto'\n            application/json;odata.metadata=none;odata.streaming=true;IEEE754Compatible=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/LicenseDto'\n            application/json;odata.metadata=none;odata.streaming=false;IEEE754Compatible=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/LicenseDto'\n            application/json;odata.metadata=none;odata.streaming=false;IEEE754Compatible=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/LicenseDto'\n            application/json;odata.metadata=none;IEEE754Compatible=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/LicenseDto'\n            application/json;odata.metadata=none;IEEE754Compatible=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/LicenseDto'\n            application/json;odata.streaming=true;IEEE754Compatible=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/LicenseDto'\n            application/json;odata.streaming=true;IEEE754Compatible=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/LicenseDto'\n            application/json;odata.streaming=false;IEEE754Compatible=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/LicenseDto'\n            application/json;odata.streaming=false;IEEE754Compatible=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/LicenseDto'\n            application/json;IEEE754Compatible=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/LicenseDto'\n            application/json;IEEE754Compatible=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/LicenseDto'\n            application/xml:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/LicenseDto'\n            text/plain:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/LicenseDto'\n            application/octet-stream:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/LicenseDto'\n            text/json:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/LicenseDto'\n  /api/v1/notifications/test:\n    post:\n      tags:\n        - Notifications\n      requestBody:\n        content:\n          application/json;odata.metadata=minimal;odata.streaming=true:\n            schema:\n              $ref: '#/components/schemas/NotificationsTestSendDto'\n          application/json;odata.metadata=minimal;odata.streaming=false:\n            schema:\n              $ref: '#/components/schemas/NotificationsTestSendDto'\n          application/json;odata.metadata=minimal:\n            schema:\n              $ref: '#/components/schemas/NotificationsTestSendDto'\n          application/json;odata.metadata=full;odata.streaming=true:\n            schema:\n              $ref: '#/components/schemas/NotificationsTestSendDto'\n          application/json;odata.metadata=full;odata.streaming=false:\n            schema:\n              $ref: '#/components/schemas/NotificationsTestSendDto'\n          application/json;odata.metadata=full:\n            schema:\n              $ref: '#/components/schemas/NotificationsTestSendDto'\n          application/json;odata.metadata=none;odata.streaming=true:\n            schema:\n              $ref: '#/components/schemas/NotificationsTestSendDto'\n          application/json;odata.metadata=none;odata.streaming=false:\n            schema:\n              $ref: '#/components/schemas/NotificationsTestSendDto'\n          application/json;odata.metadata=none:\n            schema:\n              $ref: '#/components/schemas/NotificationsTestSendDto'\n          application/json;odata.streaming=true:\n            schema:\n              $ref: '#/components/schemas/NotificationsTestSendDto'\n          application/json;odata.streaming=false:\n            schema:\n              $ref: '#/components/schemas/NotificationsTestSendDto'\n          application/json:\n            schema:\n              $ref: '#/components/schemas/NotificationsTestSendDto'\n          application/json;odata.metadata=minimal;odata.streaming=true;IEEE754Compatible=false:\n            schema:\n              $ref: '#/components/schemas/NotificationsTestSendDto'\n          application/json;odata.metadata=minimal;odata.streaming=true;IEEE754Compatible=true:\n            schema:\n              $ref: '#/components/schemas/NotificationsTestSendDto'\n          application/json;odata.metadata=minimal;odata.streaming=false;IEEE754Compatible=false:\n            schema:\n              $ref: '#/components/schemas/NotificationsTestSendDto'\n          application/json;odata.metadata=minimal;odata.streaming=false;IEEE754Compatible=true:\n            schema:\n              $ref: '#/components/schemas/NotificationsTestSendDto'\n          application/json;odata.metadata=minimal;IEEE754Compatible=false:\n            schema:\n              $ref: '#/components/schemas/NotificationsTestSendDto'\n          application/json;odata.metadata=minimal;IEEE754Compatible=true:\n            schema:\n              $ref: '#/components/schemas/NotificationsTestSendDto'\n          application/json;odata.metadata=full;odata.streaming=true;IEEE754Compatible=false:\n            schema:\n              $ref: '#/components/schemas/NotificationsTestSendDto'\n          application/json;odata.metadata=full;odata.streaming=true;IEEE754Compatible=true:\n            schema:\n              $ref: '#/components/schemas/NotificationsTestSendDto'\n          application/json;odata.metadata=full;odata.streaming=false;IEEE754Compatible=false:\n            schema:\n              $ref: '#/components/schemas/NotificationsTestSendDto'\n          application/json;odata.metadata=full;odata.streaming=false;IEEE754Compatible=true:\n            schema:\n              $ref: '#/components/schemas/NotificationsTestSendDto'\n          application/json;odata.metadata=full;IEEE754Compatible=false:\n            schema:\n              $ref: '#/components/schemas/NotificationsTestSendDto'\n          application/json;odata.metadata=full;IEEE754Compatible=true:\n            schema:\n              $ref: '#/components/schemas/NotificationsTestSendDto'\n          application/json;odata.metadata=none;odata.streaming=true;IEEE754Compatible=false:\n            schema:\n              $ref: '#/components/schemas/NotificationsTestSendDto'\n          application/json;odata.metadata=none;odata.streaming=true;IEEE754Compatible=true:\n            schema:\n              $ref: '#/components/schemas/NotificationsTestSendDto'\n          application/json;odata.metadata=none;odata.streaming=false;IEEE754Compatible=true:\n            schema:\n              $ref: '#/components/schemas/NotificationsTestSendDto'\n          application/json;odata.metadata=none;odata.streaming=false;IEEE754Compatible=false:\n            schema:\n              $ref: '#/components/schemas/NotificationsTestSendDto'\n          application/json;odata.metadata=none;IEEE754Compatible=false:\n            schema:\n              $ref: '#/components/schemas/NotificationsTestSendDto'\n          application/json;odata.metadata=none;IEEE754Compatible=true:\n            schema:\n              $ref: '#/components/schemas/NotificationsTestSendDto'\n          application/json;odata.streaming=true;IEEE754Compatible=false:\n            schema:\n              $ref: '#/components/schemas/NotificationsTestSendDto'\n          application/json;odata.streaming=true;IEEE754Compatible=true:\n            schema:\n              $ref: '#/components/schemas/NotificationsTestSendDto'\n          application/json;odata.streaming=false;IEEE754Compatible=false:\n            schema:\n              $ref: '#/components/schemas/NotificationsTestSendDto'\n          application/json;odata.streaming=false;IEEE754Compatible=true:\n            schema:\n              $ref: '#/components/schemas/NotificationsTestSendDto'\n          application/json;IEEE754Compatible=false:\n            schema:\n              $ref: '#/components/schemas/NotificationsTestSendDto'\n          application/json;IEEE754Compatible=true:\n            schema:\n              $ref: '#/components/schemas/NotificationsTestSendDto'\n          application/xml:\n            schema:\n              $ref: '#/components/schemas/NotificationsTestSendDto'\n          text/plain:\n            schema:\n              $ref: '#/components/schemas/NotificationsTestSendDto'\n          application/json-patch+json:\n            schema:\n              $ref: '#/components/schemas/NotificationsTestSendDto'\n          text/json:\n            schema:\n              $ref: '#/components/schemas/NotificationsTestSendDto'\n          application/*+json:\n            schema:\n              $ref: '#/components/schemas/NotificationsTestSendDto'\n      responses:\n        '200':\n          description: OK\n  /api/v1/personal-documents/{id}/raw:\n    get:\n      tags:\n        - PersonalDocuments\n      parameters:\n        - name: id\n          in: path\n          required: true\n          schema:\n            type: integer\n            format: int64\n      responses:\n        '200':\n          description: OK\n        '204':\n          description: No Content\n  /api/v1/personal-documents:\n    post:\n      tags:\n        - PersonalDocuments\n      requestBody:\n        content:\n          multipart/form-data:\n            schema:\n              required:\n                - DocumentName\n                - File\n              type: object\n              properties:\n                File:\n                  type: string\n                  format: binary\n                DocumentName:\n                  maxLength: 255\n                  type: string\n            encoding:\n              File:\n                style: form\n              DocumentName:\n                style: form\n      responses:\n        '200':\n          description: OK\n          content:\n            application/json;odata.metadata=minimal;odata.streaming=true:\n              schema:\n                $ref: '#/components/schemas/DocumentPersonal'\n            application/json;odata.metadata=minimal;odata.streaming=false:\n              schema:\n                $ref: '#/components/schemas/DocumentPersonal'\n            application/json;odata.metadata=minimal:\n              schema:\n                $ref: '#/components/schemas/DocumentPersonal'\n            application/json;odata.metadata=full;odata.streaming=true:\n              schema:\n                $ref: '#/components/schemas/DocumentPersonal'\n            application/json;odata.metadata=full;odata.streaming=false:\n              schema:\n                $ref: '#/components/schemas/DocumentPersonal'\n            application/json;odata.metadata=full:\n              schema:\n                $ref: '#/components/schemas/DocumentPersonal'\n            application/json;odata.metadata=none;odata.streaming=true:\n              schema:\n                $ref: '#/components/schemas/DocumentPersonal'\n            application/json;odata.metadata=none;odata.streaming=false:\n              schema:\n                $ref: '#/components/schemas/DocumentPersonal'\n            application/json;odata.metadata=none:\n              schema:\n                $ref: '#/components/schemas/DocumentPersonal'\n            application/json;odata.streaming=true:\n              schema:\n                $ref: '#/components/schemas/DocumentPersonal'\n            application/json;odata.streaming=false:\n              schema:\n                $ref: '#/components/schemas/DocumentPersonal'\n            application/json:\n              schema:\n                $ref: '#/components/schemas/DocumentPersonal'\n            application/json;odata.metadata=minimal;odata.streaming=true;IEEE754Compatible=false:\n              schema:\n                $ref: '#/components/schemas/DocumentPersonal'\n            application/json;odata.metadata=minimal;odata.streaming=true;IEEE754Compatible=true:\n              schema:\n                $ref: '#/components/schemas/DocumentPersonal'\n            application/json;odata.metadata=minimal;odata.streaming=false;IEEE754Compatible=false:\n              schema:\n                $ref: '#/components/schemas/DocumentPersonal'\n            application/json;odata.metadata=minimal;odata.streaming=false;IEEE754Compatible=true:\n              schema:\n                $ref: '#/components/schemas/DocumentPersonal'\n            application/json;odata.metadata=minimal;IEEE754Compatible=false:\n              schema:\n                $ref: '#/components/schemas/DocumentPersonal'\n            application/json;odata.metadata=minimal;IEEE754Compatible=true:\n              schema:\n                $ref: '#/components/schemas/DocumentPersonal'\n            application/json;odata.metadata=full;odata.streaming=true;IEEE754Compatible=false:\n              schema:\n                $ref: '#/components/schemas/DocumentPersonal'\n            application/json;odata.metadata=full;odata.streaming=true;IEEE754Compatible=true:\n              schema:\n                $ref: '#/components/schemas/DocumentPersonal'\n            application/json;odata.metadata=full;odata.streaming=false;IEEE754Compatible=false:\n              schema:\n                $ref: '#/components/schemas/DocumentPersonal'\n            application/json;odata.metadata=full;odata.streaming=false;IEEE754Compatible=true:\n              schema:\n                $ref: '#/components/schemas/DocumentPersonal'\n            application/json;odata.metadata=full;IEEE754Compatible=false:\n              schema:\n                $ref: '#/components/schemas/DocumentPersonal'\n            application/json;odata.metadata=full;IEEE754Compatible=true:\n              schema:\n                $ref: '#/components/schemas/DocumentPersonal'\n            application/json;odata.metadata=none;odata.streaming=true;IEEE754Compatible=false:\n              schema:\n                $ref: '#/components/schemas/DocumentPersonal'\n            application/json;odata.metadata=none;odata.streaming=true;IEEE754Compatible=true:\n              schema:\n                $ref: '#/components/schemas/DocumentPersonal'\n            application/json;odata.metadata=none;odata.streaming=false;IEEE754Compatible=true:\n              schema:\n                $ref: '#/components/schemas/DocumentPersonal'\n            application/json;odata.metadata=none;odata.streaming=false;IEEE754Compatible=false:\n              schema:\n                $ref: '#/components/schemas/DocumentPersonal'\n            application/json;odata.metadata=none;IEEE754Compatible=false:\n              schema:\n                $ref: '#/components/schemas/DocumentPersonal'\n            application/json;odata.metadata=none;IEEE754Compatible=true:\n              schema:\n                $ref: '#/components/schemas/DocumentPersonal'\n            application/json;odata.streaming=true;IEEE754Compatible=false:\n              schema:\n                $ref: '#/components/schemas/DocumentPersonal'\n            application/json;odata.streaming=true;IEEE754Compatible=true:\n              schema:\n                $ref: '#/components/schemas/DocumentPersonal'\n            application/json;odata.streaming=false;IEEE754Compatible=false:\n              schema:\n                $ref: '#/components/schemas/DocumentPersonal'\n            application/json;odata.streaming=false;IEEE754Compatible=true:\n              schema:\n                $ref: '#/components/schemas/DocumentPersonal'\n            application/json;IEEE754Compatible=false:\n              schema:\n                $ref: '#/components/schemas/DocumentPersonal'\n            application/json;IEEE754Compatible=true:\n              schema:\n                $ref: '#/components/schemas/DocumentPersonal'\n            application/xml:\n              schema:\n                $ref: '#/components/schemas/DocumentPersonal'\n            text/plain:\n              schema:\n                $ref: '#/components/schemas/DocumentPersonal'\n            application/octet-stream:\n              schema:\n                $ref: '#/components/schemas/DocumentPersonal'\n            text/json:\n              schema:\n                $ref: '#/components/schemas/DocumentPersonal'\n  /api/v1/personal-documents/{id}/move-to-business:\n    post:\n      tags:\n        - PersonalDocuments\n      parameters:\n        - name: id\n          in: path\n          required: true\n          schema:\n            type: integer\n            format: int64\n      requestBody:\n        content:\n          application/json;odata.metadata=minimal;odata.streaming=true:\n            schema:\n              $ref: '#/components/schemas/DocumentPersonalMoveToBusinessDocumentsDto'\n          application/json;odata.metadata=minimal;odata.streaming=false:\n            schema:\n              $ref: '#/components/schemas/DocumentPersonalMoveToBusinessDocumentsDto'\n          application/json;odata.metadata=minimal:\n            schema:\n              $ref: '#/components/schemas/DocumentPersonalMoveToBusinessDocumentsDto'\n          application/json;odata.metadata=full;odata.streaming=true:\n            schema:\n              $ref: '#/components/schemas/DocumentPersonalMoveToBusinessDocumentsDto'\n          application/json;odata.metadata=full;odata.streaming=false:\n            schema:\n              $ref: '#/components/schemas/DocumentPersonalMoveToBusinessDocumentsDto'\n          application/json;odata.metadata=full:\n            schema:\n              $ref: '#/components/schemas/DocumentPersonalMoveToBusinessDocumentsDto'\n          application/json;odata.metadata=none;odata.streaming=true:\n            schema:\n              $ref: '#/components/schemas/DocumentPersonalMoveToBusinessDocumentsDto'\n          application/json;odata.metadata=none;odata.streaming=false:\n            schema:\n              $ref: '#/components/schemas/DocumentPersonalMoveToBusinessDocumentsDto'\n          application/json;odata.metadata=none:\n            schema:\n              $ref: '#/components/schemas/DocumentPersonalMoveToBusinessDocumentsDto'\n          application/json;odata.streaming=true:\n            schema:\n              $ref: '#/components/schemas/DocumentPersonalMoveToBusinessDocumentsDto'\n          application/json;odata.streaming=false:\n            schema:\n              $ref: '#/components/schemas/DocumentPersonalMoveToBusinessDocumentsDto'\n          application/json:\n            schema:\n              $ref: '#/components/schemas/DocumentPersonalMoveToBusinessDocumentsDto'\n          application/json;odata.metadata=minimal;odata.streaming=true;IEEE754Compatible=false:\n            schema:\n              $ref: '#/components/schemas/DocumentPersonalMoveToBusinessDocumentsDto'\n          application/json;odata.metadata=minimal;odata.streaming=true;IEEE754Compatible=true:\n            schema:\n              $ref: '#/components/schemas/DocumentPersonalMoveToBusinessDocumentsDto'\n          application/json;odata.metadata=minimal;odata.streaming=false;IEEE754Compatible=false:\n            schema:\n              $ref: '#/components/schemas/DocumentPersonalMoveToBusinessDocumentsDto'\n          application/json;odata.metadata=minimal;odata.streaming=false;IEEE754Compatible=true:\n            schema:\n              $ref: '#/components/schemas/DocumentPersonalMoveToBusinessDocumentsDto'\n          application/json;odata.metadata=minimal;IEEE754Compatible=false:\n            schema:\n              $ref: '#/components/schemas/DocumentPersonalMoveToBusinessDocumentsDto'\n          application/json;odata.metadata=minimal;IEEE754Compatible=true:\n            schema:\n              $ref: '#/components/schemas/DocumentPersonalMoveToBusinessDocumentsDto'\n          application/json;odata.metadata=full;odata.streaming=true;IEEE754Compatible=false:\n            schema:\n              $ref: '#/components/schemas/DocumentPersonalMoveToBusinessDocumentsDto'\n          application/json;odata.metadata=full;odata.streaming=true;IEEE754Compatible=true:\n            schema:\n              $ref: '#/components/schemas/DocumentPersonalMoveToBusinessDocumentsDto'\n          application/json;odata.metadata=full;odata.streaming=false;IEEE754Compatible=false:\n            schema:\n              $ref: '#/components/schemas/DocumentPersonalMoveToBusinessDocumentsDto'\n          application/json;odata.metadata=full;odata.streaming=false;IEEE754Compatible=true:\n            schema:\n              $ref: '#/components/schemas/DocumentPersonalMoveToBusinessDocumentsDto'\n          application/json;odata.metadata=full;IEEE754Compatible=false:\n            schema:\n              $ref: '#/components/schemas/DocumentPersonalMoveToBusinessDocumentsDto'\n          application/json;odata.metadata=full;IEEE754Compatible=true:\n            schema:\n              $ref: '#/components/schemas/DocumentPersonalMoveToBusinessDocumentsDto'\n          application/json;odata.metadata=none;odata.streaming=true;IEEE754Compatible=false:\n            schema:\n              $ref: '#/components/schemas/DocumentPersonalMoveToBusinessDocumentsDto'\n          application/json;odata.metadata=none;odata.streaming=true;IEEE754Compatible=true:\n            schema:\n              $ref: '#/components/schemas/DocumentPersonalMoveToBusinessDocumentsDto'\n          application/json;odata.metadata=none;odata.streaming=false;IEEE754Compatible=true:\n            schema:\n              $ref: '#/components/schemas/DocumentPersonalMoveToBusinessDocumentsDto'\n          application/json;odata.metadata=none;odata.streaming=false;IEEE754Compatible=false:\n            schema:\n              $ref: '#/components/schemas/DocumentPersonalMoveToBusinessDocumentsDto'\n          application/json;odata.metadata=none;IEEE754Compatible=false:\n            schema:\n              $ref: '#/components/schemas/DocumentPersonalMoveToBusinessDocumentsDto'\n          application/json;odata.metadata=none;IEEE754Compatible=true:\n            schema:\n              $ref: '#/components/schemas/DocumentPersonalMoveToBusinessDocumentsDto'\n          application/json;odata.streaming=true;IEEE754Compatible=false:\n            schema:\n              $ref: '#/components/schemas/DocumentPersonalMoveToBusinessDocumentsDto'\n          application/json;odata.streaming=true;IEEE754Compatible=true:\n            schema:\n              $ref: '#/components/schemas/DocumentPersonalMoveToBusinessDocumentsDto'\n          application/json;odata.streaming=false;IEEE754Compatible=false:\n            schema:\n              $ref: '#/components/schemas/DocumentPersonalMoveToBusinessDocumentsDto'\n          application/json;odata.streaming=false;IEEE754Compatible=true:\n            schema:\n              $ref: '#/components/schemas/DocumentPersonalMoveToBusinessDocumentsDto'\n          application/json;IEEE754Compatible=false:\n            schema:\n              $ref: '#/components/schemas/DocumentPersonalMoveToBusinessDocumentsDto'\n          application/json;IEEE754Compatible=true:\n            schema:\n              $ref: '#/components/schemas/DocumentPersonalMoveToBusinessDocumentsDto'\n          application/xml:\n            schema:\n              $ref: '#/components/schemas/DocumentPersonalMoveToBusinessDocumentsDto'\n          text/plain:\n            schema:\n              $ref: '#/components/schemas/DocumentPersonalMoveToBusinessDocumentsDto'\n          application/json-patch+json:\n            schema:\n              $ref: '#/components/schemas/DocumentPersonalMoveToBusinessDocumentsDto'\n          text/json:\n            schema:\n              $ref: '#/components/schemas/DocumentPersonalMoveToBusinessDocumentsDto'\n          application/*+json:\n            schema:\n              $ref: '#/components/schemas/DocumentPersonalMoveToBusinessDocumentsDto'\n      responses:\n        '200':\n          description: OK\n  /api/v1/personal-documents/{id}:\n    delete:\n      tags:\n        - PersonalDocuments\n      parameters:\n        - name: id\n          in: path\n          required: true\n          schema:\n            type: integer\n            format: int64\n      responses:\n        '200':\n          description: OK\n          content:\n            application/json;odata.metadata=minimal;odata.streaming=true:\n              schema:\n                $ref: '#/components/schemas/DocumentPersonal'\n            application/json;odata.metadata=minimal;odata.streaming=false:\n              schema:\n                $ref: '#/components/schemas/DocumentPersonal'\n            application/json;odata.metadata=minimal:\n              schema:\n                $ref: '#/components/schemas/DocumentPersonal'\n            application/json;odata.metadata=full;odata.streaming=true:\n              schema:\n                $ref: '#/components/schemas/DocumentPersonal'\n            application/json;odata.metadata=full;odata.streaming=false:\n              schema:\n                $ref: '#/components/schemas/DocumentPersonal'\n            application/json;odata.metadata=full:\n              schema:\n                $ref: '#/components/schemas/DocumentPersonal'\n            application/json;odata.metadata=none;odata.streaming=true:\n              schema:\n                $ref: '#/components/schemas/DocumentPersonal'\n            application/json;odata.metadata=none;odata.streaming=false:\n              schema:\n                $ref: '#/components/schemas/DocumentPersonal'\n            application/json;odata.metadata=none:\n              schema:\n                $ref: '#/components/schemas/DocumentPersonal'\n            application/json;odata.streaming=true:\n              schema:\n                $ref: '#/components/schemas/DocumentPersonal'\n            application/json;odata.streaming=false:\n              schema:\n                $ref: '#/components/schemas/DocumentPersonal'\n            application/json:\n              schema:\n                $ref: '#/components/schemas/DocumentPersonal'\n            application/json;odata.metadata=minimal;odata.streaming=true;IEEE754Compatible=false:\n              schema:\n                $ref: '#/components/schemas/DocumentPersonal'\n            application/json;odata.metadata=minimal;odata.streaming=true;IEEE754Compatible=true:\n              schema:\n                $ref: '#/components/schemas/DocumentPersonal'\n            application/json;odata.metadata=minimal;odata.streaming=false;IEEE754Compatible=false:\n              schema:\n                $ref: '#/components/schemas/DocumentPersonal'\n            application/json;odata.metadata=minimal;odata.streaming=false;IEEE754Compatible=true:\n              schema:\n                $ref: '#/components/schemas/DocumentPersonal'\n            application/json;odata.metadata=minimal;IEEE754Compatible=false:\n              schema:\n                $ref: '#/components/schemas/DocumentPersonal'\n            application/json;odata.metadata=minimal;IEEE754Compatible=true:\n              schema:\n                $ref: '#/components/schemas/DocumentPersonal'\n            application/json;odata.metadata=full;odata.streaming=true;IEEE754Compatible=false:\n              schema:\n                $ref: '#/components/schemas/DocumentPersonal'\n            application/json;odata.metadata=full;odata.streaming=true;IEEE754Compatible=true:\n              schema:\n                $ref: '#/components/schemas/DocumentPersonal'\n            application/json;odata.metadata=full;odata.streaming=false;IEEE754Compatible=false:\n              schema:\n                $ref: '#/components/schemas/DocumentPersonal'\n            application/json;odata.metadata=full;odata.streaming=false;IEEE754Compatible=true:\n              schema:\n                $ref: '#/components/schemas/DocumentPersonal'\n            application/json;odata.metadata=full;IEEE754Compatible=false:\n              schema:\n                $ref: '#/components/schemas/DocumentPersonal'\n            application/json;odata.metadata=full;IEEE754Compatible=true:\n              schema:\n                $ref: '#/components/schemas/DocumentPersonal'\n            application/json;odata.metadata=none;odata.streaming=true;IEEE754Compatible=false:\n              schema:\n                $ref: '#/components/schemas/DocumentPersonal'\n            application/json;odata.metadata=none;odata.streaming=true;IEEE754Compatible=true:\n              schema:\n                $ref: '#/components/schemas/DocumentPersonal'\n            application/json;odata.metadata=none;odata.streaming=false;IEEE754Compatible=true:\n              schema:\n                $ref: '#/components/schemas/DocumentPersonal'\n            application/json;odata.metadata=none;odata.streaming=false;IEEE754Compatible=false:\n              schema:\n                $ref: '#/components/schemas/DocumentPersonal'\n            application/json;odata.metadata=none;IEEE754Compatible=false:\n              schema:\n                $ref: '#/components/schemas/DocumentPersonal'\n            application/json;odata.metadata=none;IEEE754Compatible=true:\n              schema:\n                $ref: '#/components/schemas/DocumentPersonal'\n            application/json;odata.streaming=true;IEEE754Compatible=false:\n              schema:\n                $ref: '#/components/schemas/DocumentPersonal'\n            application/json;odata.streaming=true;IEEE754Compatible=true:\n              schema:\n                $ref: '#/components/schemas/DocumentPersonal'\n            application/json;odata.streaming=false;IEEE754Compatible=false:\n              schema:\n                $ref: '#/components/schemas/DocumentPersonal'\n            application/json;odata.streaming=false;IEEE754Compatible=true:\n              schema:\n                $ref: '#/components/schemas/DocumentPersonal'\n            application/json;IEEE754Compatible=false:\n              schema:\n                $ref: '#/components/schemas/DocumentPersonal'\n            application/json;IEEE754Compatible=true:\n              schema:\n                $ref: '#/components/schemas/DocumentPersonal'\n            application/xml:\n              schema:\n                $ref: '#/components/schemas/DocumentPersonal'\n            text/plain:\n              schema:\n                $ref: '#/components/schemas/DocumentPersonal'\n            application/octet-stream:\n              schema:\n                $ref: '#/components/schemas/DocumentPersonal'\n            text/json:\n              schema:\n                $ref: '#/components/schemas/DocumentPersonal'\n  /api/v1/personal-documents/summary:\n    get:\n      tags:\n        - PersonalDocuments\n      responses:\n        '200':\n          description: OK\n          content:\n            application/json;odata.metadata=minimal;odata.streaming=true:\n              schema:\n                $ref: '#/components/schemas/PersonalDocumentsSummary'\n            application/json;odata.metadata=minimal;odata.streaming=false:\n              schema:\n                $ref: '#/components/schemas/PersonalDocumentsSummary'\n            application/json;odata.metadata=minimal:\n              schema:\n                $ref: '#/components/schemas/PersonalDocumentsSummary'\n            application/json;odata.metadata=full;odata.streaming=true:\n              schema:\n                $ref: '#/components/schemas/PersonalDocumentsSummary'\n            application/json;odata.metadata=full;odata.streaming=false:\n              schema:\n                $ref: '#/components/schemas/PersonalDocumentsSummary'\n            application/json;odata.metadata=full:\n              schema:\n                $ref: '#/components/schemas/PersonalDocumentsSummary'\n            application/json;odata.metadata=none;odata.streaming=true:\n              schema:\n                $ref: '#/components/schemas/PersonalDocumentsSummary'\n            application/json;odata.metadata=none;odata.streaming=false:\n              schema:\n                $ref: '#/components/schemas/PersonalDocumentsSummary'\n            application/json;odata.metadata=none:\n              schema:\n                $ref: '#/components/schemas/PersonalDocumentsSummary'\n            application/json;odata.streaming=true:\n              schema:\n                $ref: '#/components/schemas/PersonalDocumentsSummary'\n            application/json;odata.streaming=false:\n              schema:\n                $ref: '#/components/schemas/PersonalDocumentsSummary'\n            application/json:\n              schema:\n                $ref: '#/components/schemas/PersonalDocumentsSummary'\n            application/json;odata.metadata=minimal;odata.streaming=true;IEEE754Compatible=false:\n              schema:\n                $ref: '#/components/schemas/PersonalDocumentsSummary'\n            application/json;odata.metadata=minimal;odata.streaming=true;IEEE754Compatible=true:\n              schema:\n                $ref: '#/components/schemas/PersonalDocumentsSummary'\n            application/json;odata.metadata=minimal;odata.streaming=false;IEEE754Compatible=false:\n              schema:\n                $ref: '#/components/schemas/PersonalDocumentsSummary'\n            application/json;odata.metadata=minimal;odata.streaming=false;IEEE754Compatible=true:\n              schema:\n                $ref: '#/components/schemas/PersonalDocumentsSummary'\n            application/json;odata.metadata=minimal;IEEE754Compatible=false:\n              schema:\n                $ref: '#/components/schemas/PersonalDocumentsSummary'\n            application/json;odata.metadata=minimal;IEEE754Compatible=true:\n              schema:\n                $ref: '#/components/schemas/PersonalDocumentsSummary'\n            application/json;odata.metadata=full;odata.streaming=true;IEEE754Compatible=false:\n              schema:\n                $ref: '#/components/schemas/PersonalDocumentsSummary'\n            application/json;odata.metadata=full;odata.streaming=true;IEEE754Compatible=true:\n              schema:\n                $ref: '#/components/schemas/PersonalDocumentsSummary'\n            application/json;odata.metadata=full;odata.streaming=false;IEEE754Compatible=false:\n              schema:\n                $ref: '#/components/schemas/PersonalDocumentsSummary'\n            application/json;odata.metadata=full;odata.streaming=false;IEEE754Compatible=true:\n              schema:\n                $ref: '#/components/schemas/PersonalDocumentsSummary'\n            application/json;odata.metadata=full;IEEE754Compatible=false:\n              schema:\n                $ref: '#/components/schemas/PersonalDocumentsSummary'\n            application/json;odata.metadata=full;IEEE754Compatible=true:\n              schema:\n                $ref: '#/components/schemas/PersonalDocumentsSummary'\n            application/json;odata.metadata=none;odata.streaming=true;IEEE754Compatible=false:\n              schema:\n                $ref: '#/components/schemas/PersonalDocumentsSummary'\n            application/json;odata.metadata=none;odata.streaming=true;IEEE754Compatible=true:\n              schema:\n                $ref: '#/components/schemas/PersonalDocumentsSummary'\n            application/json;odata.metadata=none;odata.streaming=false;IEEE754Compatible=true:\n              schema:\n                $ref: '#/components/schemas/PersonalDocumentsSummary'\n            application/json;odata.metadata=none;odata.streaming=false;IEEE754Compatible=false:\n              schema:\n                $ref: '#/components/schemas/PersonalDocumentsSummary'\n            application/json;odata.metadata=none;IEEE754Compatible=false:\n              schema:\n                $ref: '#/components/schemas/PersonalDocumentsSummary'\n            application/json;odata.metadata=none;IEEE754Compatible=true:\n              schema:\n                $ref: '#/components/schemas/PersonalDocumentsSummary'\n            application/json;odata.streaming=true;IEEE754Compatible=false:\n              schema:\n                $ref: '#/components/schemas/PersonalDocumentsSummary'\n            application/json;odata.streaming=true;IEEE754Compatible=true:\n              schema:\n                $ref: '#/components/schemas/PersonalDocumentsSummary'\n            application/json;odata.streaming=false;IEEE754Compatible=false:\n              schema:\n                $ref: '#/components/schemas/PersonalDocumentsSummary'\n            application/json;odata.streaming=false;IEEE754Compatible=true:\n              schema:\n                $ref: '#/components/schemas/PersonalDocumentsSummary'\n            application/json;IEEE754Compatible=false:\n              schema:\n                $ref: '#/components/schemas/PersonalDocumentsSummary'\n            application/json;IEEE754Compatible=true:\n              schema:\n                $ref: '#/components/schemas/PersonalDocumentsSummary'\n            application/xml:\n              schema:\n                $ref: '#/components/schemas/PersonalDocumentsSummary'\n            text/plain:\n              schema:\n                $ref: '#/components/schemas/PersonalDocumentsSummary'\n            application/octet-stream:\n              schema:\n                $ref: '#/components/schemas/PersonalDocumentsSummary'\n            text/json:\n              schema:\n                $ref: '#/components/schemas/PersonalDocumentsSummary'\n  /api/v1/odata/PersonalDocuments:\n    get:\n      tags:\n        - PersonalDocuments\n      operationId: api/v{version:apiVersion}/odata/PersonalDocuments\n      parameters:\n        - name: select\n          in: query\n          description: Limits the properties returned in the result.\n          schema:\n            type: string\n        - name: expand\n          in: query\n          description: Indicates the related entities to be represented inline. The\n            maximum depth is 2.\n          schema:\n            type: string\n        - name: filter\n          in: query\n          description: 'Restricts the set of items returned. The maximum number of\n            expressions is 100. The allowed functions are: allfunctions.'\n          schema:\n            type: string\n        - name: orderby\n          in: query\n          description: Specifies the order in which items are returned. The maximum number\n            of expressions is 5.\n          schema:\n            type: string\n        - name: top\n          in: query\n          description: Limits the number of items returned from a collection. The maximum\n            value is 100.\n          schema:\n            type: integer\n            format: int32\n        - name: skip\n          in: query\n          description: Excludes the specified number of items of the queried collection\n            from the result.\n          schema:\n            type: integer\n            format: int32\n        - name: count\n          in: query\n          description: Indicates whether the total count of items within a collection are\n            returned in the result.\n          schema:\n            type: boolean\n            default: false\n      responses:\n        '200':\n          description: OK\n          content:\n            application/json;odata.metadata=minimal;odata.streaming=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/DocumentPersonal'\n            application/json;odata.metadata=minimal;odata.streaming=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/DocumentPersonal'\n            application/json;odata.metadata=minimal:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/DocumentPersonal'\n            application/json;odata.metadata=full;odata.streaming=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/DocumentPersonal'\n            application/json;odata.metadata=full;odata.streaming=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/DocumentPersonal'\n            application/json;odata.metadata=full:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/DocumentPersonal'\n            application/json;odata.metadata=none;odata.streaming=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/DocumentPersonal'\n            application/json;odata.metadata=none;odata.streaming=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/DocumentPersonal'\n            application/json;odata.metadata=none:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/DocumentPersonal'\n            application/json;odata.streaming=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/DocumentPersonal'\n            application/json;odata.streaming=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/DocumentPersonal'\n            application/json:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/DocumentPersonal'\n            application/json;odata.metadata=minimal;odata.streaming=true;IEEE754Compatible=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/DocumentPersonal'\n            application/json;odata.metadata=minimal;odata.streaming=true;IEEE754Compatible=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/DocumentPersonal'\n            application/json;odata.metadata=minimal;odata.streaming=false;IEEE754Compatible=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/DocumentPersonal'\n            application/json;odata.metadata=minimal;odata.streaming=false;IEEE754Compatible=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/DocumentPersonal'\n            application/json;odata.metadata=minimal;IEEE754Compatible=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/DocumentPersonal'\n            application/json;odata.metadata=minimal;IEEE754Compatible=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/DocumentPersonal'\n            application/json;odata.metadata=full;odata.streaming=true;IEEE754Compatible=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/DocumentPersonal'\n            application/json;odata.metadata=full;odata.streaming=true;IEEE754Compatible=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/DocumentPersonal'\n            application/json;odata.metadata=full;odata.streaming=false;IEEE754Compatible=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/DocumentPersonal'\n            application/json;odata.metadata=full;odata.streaming=false;IEEE754Compatible=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/DocumentPersonal'\n            application/json;odata.metadata=full;IEEE754Compatible=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/DocumentPersonal'\n            application/json;odata.metadata=full;IEEE754Compatible=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/DocumentPersonal'\n            application/json;odata.metadata=none;odata.streaming=true;IEEE754Compatible=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/DocumentPersonal'\n            application/json;odata.metadata=none;odata.streaming=true;IEEE754Compatible=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/DocumentPersonal'\n            application/json;odata.metadata=none;odata.streaming=false;IEEE754Compatible=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/DocumentPersonal'\n            application/json;odata.metadata=none;odata.streaming=false;IEEE754Compatible=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/DocumentPersonal'\n            application/json;odata.metadata=none;IEEE754Compatible=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/DocumentPersonal'\n            application/json;odata.metadata=none;IEEE754Compatible=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/DocumentPersonal'\n            application/json;odata.streaming=true;IEEE754Compatible=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/DocumentPersonal'\n            application/json;odata.streaming=true;IEEE754Compatible=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/DocumentPersonal'\n            application/json;odata.streaming=false;IEEE754Compatible=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/DocumentPersonal'\n            application/json;odata.streaming=false;IEEE754Compatible=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/DocumentPersonal'\n            application/json;IEEE754Compatible=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/DocumentPersonal'\n            application/json;IEEE754Compatible=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/DocumentPersonal'\n            application/xml:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/DocumentPersonal'\n            text/plain:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/DocumentPersonal'\n            application/octet-stream:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/DocumentPersonal'\n            text/json:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/DocumentPersonal'\n  /api/v1/odata/PersonalDocuments/$count:\n    get:\n      tags:\n        - PersonalDocuments\n      operationId: api/v{version:apiVersion}/odata/PersonalDocuments/$count\n      parameters:\n        - name: select\n          in: query\n          description: Limits the properties returned in the result.\n          schema:\n            type: string\n        - name: expand\n          in: query\n          description: Indicates the related entities to be represented inline. The\n            maximum depth is 2.\n          schema:\n            type: string\n        - name: filter\n          in: query\n          description: 'Restricts the set of items returned. The maximum number of\n            expressions is 100. The allowed functions are: allfunctions.'\n          schema:\n            type: string\n        - name: orderby\n          in: query\n          description: Specifies the order in which items are returned. The maximum number\n            of expressions is 5.\n          schema:\n            type: string\n        - name: top\n          in: query\n          description: Limits the number of items returned from a collection. The maximum\n            value is 100.\n          schema:\n            type: integer\n            format: int32\n        - name: skip\n          in: query\n          description: Excludes the specified number of items of the queried collection\n            from the result.\n          schema:\n            type: integer\n            format: int32\n        - name: count\n          in: query\n          description: Indicates whether the total count of items within a collection are\n            returned in the result.\n          schema:\n            type: boolean\n            default: false\n      responses:\n        '200':\n          description: OK\n          content:\n            application/json;odata.metadata=minimal;odata.streaming=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/DocumentPersonal'\n            application/json;odata.metadata=minimal;odata.streaming=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/DocumentPersonal'\n            application/json;odata.metadata=minimal:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/DocumentPersonal'\n            application/json;odata.metadata=full;odata.streaming=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/DocumentPersonal'\n            application/json;odata.metadata=full;odata.streaming=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/DocumentPersonal'\n            application/json;odata.metadata=full:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/DocumentPersonal'\n            application/json;odata.metadata=none;odata.streaming=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/DocumentPersonal'\n            application/json;odata.metadata=none;odata.streaming=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/DocumentPersonal'\n            application/json;odata.metadata=none:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/DocumentPersonal'\n            application/json;odata.streaming=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/DocumentPersonal'\n            application/json;odata.streaming=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/DocumentPersonal'\n            application/json:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/DocumentPersonal'\n            application/json;odata.metadata=minimal;odata.streaming=true;IEEE754Compatible=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/DocumentPersonal'\n            application/json;odata.metadata=minimal;odata.streaming=true;IEEE754Compatible=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/DocumentPersonal'\n            application/json;odata.metadata=minimal;odata.streaming=false;IEEE754Compatible=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/DocumentPersonal'\n            application/json;odata.metadata=minimal;odata.streaming=false;IEEE754Compatible=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/DocumentPersonal'\n            application/json;odata.metadata=minimal;IEEE754Compatible=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/DocumentPersonal'\n            application/json;odata.metadata=minimal;IEEE754Compatible=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/DocumentPersonal'\n            application/json;odata.metadata=full;odata.streaming=true;IEEE754Compatible=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/DocumentPersonal'\n            application/json;odata.metadata=full;odata.streaming=true;IEEE754Compatible=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/DocumentPersonal'\n            application/json;odata.metadata=full;odata.streaming=false;IEEE754Compatible=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/DocumentPersonal'\n            application/json;odata.metadata=full;odata.streaming=false;IEEE754Compatible=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/DocumentPersonal'\n            application/json;odata.metadata=full;IEEE754Compatible=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/DocumentPersonal'\n            application/json;odata.metadata=full;IEEE754Compatible=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/DocumentPersonal'\n            application/json;odata.metadata=none;odata.streaming=true;IEEE754Compatible=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/DocumentPersonal'\n            application/json;odata.metadata=none;odata.streaming=true;IEEE754Compatible=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/DocumentPersonal'\n            application/json;odata.metadata=none;odata.streaming=false;IEEE754Compatible=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/DocumentPersonal'\n            application/json;odata.metadata=none;odata.streaming=false;IEEE754Compatible=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/DocumentPersonal'\n            application/json;odata.metadata=none;IEEE754Compatible=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/DocumentPersonal'\n            application/json;odata.metadata=none;IEEE754Compatible=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/DocumentPersonal'\n            application/json;odata.streaming=true;IEEE754Compatible=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/DocumentPersonal'\n            application/json;odata.streaming=true;IEEE754Compatible=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/DocumentPersonal'\n            application/json;odata.streaming=false;IEEE754Compatible=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/DocumentPersonal'\n            application/json;odata.streaming=false;IEEE754Compatible=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/DocumentPersonal'\n            application/json;IEEE754Compatible=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/DocumentPersonal'\n            application/json;IEEE754Compatible=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/DocumentPersonal'\n            application/xml:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/DocumentPersonal'\n            text/plain:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/DocumentPersonal'\n            application/octet-stream:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/DocumentPersonal'\n            text/json:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/DocumentPersonal'\n  /api/v1/recurring-tasks:\n    post:\n      tags:\n        - RecurringTasks\n      requestBody:\n        content:\n          application/json;odata.metadata=minimal;odata.streaming=true:\n            schema:\n              $ref: '#/components/schemas/RecurringTaskCreateDto'\n          application/json;odata.metadata=minimal;odata.streaming=false:\n            schema:\n              $ref: '#/components/schemas/RecurringTaskCreateDto'\n          application/json;odata.metadata=minimal:\n            schema:\n              $ref: '#/components/schemas/RecurringTaskCreateDto'\n          application/json;odata.metadata=full;odata.streaming=true:\n            schema:\n              $ref: '#/components/schemas/RecurringTaskCreateDto'\n          application/json;odata.metadata=full;odata.streaming=false:\n            schema:\n              $ref: '#/components/schemas/RecurringTaskCreateDto'\n          application/json;odata.metadata=full:\n            schema:\n              $ref: '#/components/schemas/RecurringTaskCreateDto'\n          application/json;odata.metadata=none;odata.streaming=true:\n            schema:\n              $ref: '#/components/schemas/RecurringTaskCreateDto'\n          application/json;odata.metadata=none;odata.streaming=false:\n            schema:\n              $ref: '#/components/schemas/RecurringTaskCreateDto'\n          application/json;odata.metadata=none:\n            schema:\n              $ref: '#/components/schemas/RecurringTaskCreateDto'\n          application/json;odata.streaming=true:\n            schema:\n              $ref: '#/components/schemas/RecurringTaskCreateDto'\n          application/json;odata.streaming=false:\n            schema:\n              $ref: '#/components/schemas/RecurringTaskCreateDto'\n          application/json:\n            schema:\n              $ref: '#/components/schemas/RecurringTaskCreateDto'\n          application/json;odata.metadata=minimal;odata.streaming=true;IEEE754Compatible=false:\n            schema:\n              $ref: '#/components/schemas/RecurringTaskCreateDto'\n          application/json;odata.metadata=minimal;odata.streaming=true;IEEE754Compatible=true:\n            schema:\n              $ref: '#/components/schemas/RecurringTaskCreateDto'\n          application/json;odata.metadata=minimal;odata.streaming=false;IEEE754Compatible=false:\n            schema:\n              $ref: '#/components/schemas/RecurringTaskCreateDto'\n          application/json;odata.metadata=minimal;odata.streaming=false;IEEE754Compatible=true:\n            schema:\n              $ref: '#/components/schemas/RecurringTaskCreateDto'\n          application/json;odata.metadata=minimal;IEEE754Compatible=false:\n            schema:\n              $ref: '#/components/schemas/RecurringTaskCreateDto'\n          application/json;odata.metadata=minimal;IEEE754Compatible=true:\n            schema:\n              $ref: '#/components/schemas/RecurringTaskCreateDto'\n          application/json;odata.metadata=full;odata.streaming=true;IEEE754Compatible=false:\n            schema:\n              $ref: '#/components/schemas/RecurringTaskCreateDto'\n          application/json;odata.metadata=full;odata.streaming=true;IEEE754Compatible=true:\n            schema:\n              $ref: '#/components/schemas/RecurringTaskCreateDto'\n          application/json;odata.metadata=full;odata.streaming=false;IEEE754Compatible=false:\n            schema:\n              $ref: '#/components/schemas/RecurringTaskCreateDto'\n          application/json;odata.metadata=full;odata.streaming=false;IEEE754Compatible=true:\n            schema:\n              $ref: '#/components/schemas/RecurringTaskCreateDto'\n          application/json;odata.metadata=full;IEEE754Compatible=false:\n            schema:\n              $ref: '#/components/schemas/RecurringTaskCreateDto'\n          application/json;odata.metadata=full;IEEE754Compatible=true:\n            schema:\n              $ref: '#/components/schemas/RecurringTaskCreateDto'\n          application/json;odata.metadata=none;odata.streaming=true;IEEE754Compatible=false:\n            schema:\n              $ref: '#/components/schemas/RecurringTaskCreateDto'\n          application/json;odata.metadata=none;odata.streaming=true;IEEE754Compatible=true:\n            schema:\n              $ref: '#/components/schemas/RecurringTaskCreateDto'\n          application/json;odata.metadata=none;odata.streaming=false;IEEE754Compatible=true:\n            schema:\n              $ref: '#/components/schemas/RecurringTaskCreateDto'\n          application/json;odata.metadata=none;odata.streaming=false;IEEE754Compatible=false:\n            schema:\n              $ref: '#/components/schemas/RecurringTaskCreateDto'\n          application/json;odata.metadata=none;IEEE754Compatible=false:\n            schema:\n              $ref: '#/components/schemas/RecurringTaskCreateDto'\n          application/json;odata.metadata=none;IEEE754Compatible=true:\n            schema:\n              $ref: '#/components/schemas/RecurringTaskCreateDto'\n          application/json;odata.streaming=true;IEEE754Compatible=false:\n            schema:\n              $ref: '#/components/schemas/RecurringTaskCreateDto'\n          application/json;odata.streaming=true;IEEE754Compatible=true:\n            schema:\n              $ref: '#/components/schemas/RecurringTaskCreateDto'\n          application/json;odata.streaming=false;IEEE754Compatible=false:\n            schema:\n              $ref: '#/components/schemas/RecurringTaskCreateDto'\n          application/json;odata.streaming=false;IEEE754Compatible=true:\n            schema:\n              $ref: '#/components/schemas/RecurringTaskCreateDto'\n          application/json;IEEE754Compatible=false:\n            schema:\n              $ref: '#/components/schemas/RecurringTaskCreateDto'\n          application/json;IEEE754Compatible=true:\n            schema:\n              $ref: '#/components/schemas/RecurringTaskCreateDto'\n          application/xml:\n            schema:\n              $ref: '#/components/schemas/RecurringTaskCreateDto'\n          text/plain:\n            schema:\n              $ref: '#/components/schemas/RecurringTaskCreateDto'\n          application/json-patch+json:\n            schema:\n              $ref: '#/components/schemas/RecurringTaskCreateDto'\n          text/json:\n            schema:\n              $ref: '#/components/schemas/RecurringTaskCreateDto'\n          application/*+json:\n            schema:\n              $ref: '#/components/schemas/RecurringTaskCreateDto'\n      responses:\n        '200':\n          description: OK\n          content:\n            application/json;odata.metadata=minimal;odata.streaming=true:\n              schema:\n                $ref: '#/components/schemas/RecurringTask'\n            application/json;odata.metadata=minimal;odata.streaming=false:\n              schema:\n                $ref: '#/components/schemas/RecurringTask'\n            application/json;odata.metadata=minimal:\n              schema:\n                $ref: '#/components/schemas/RecurringTask'\n            application/json;odata.metadata=full;odata.streaming=true:\n              schema:\n                $ref: '#/components/schemas/RecurringTask'\n            application/json;odata.metadata=full;odata.streaming=false:\n              schema:\n                $ref: '#/components/schemas/RecurringTask'\n            application/json;odata.metadata=full:\n              schema:\n                $ref: '#/components/schemas/RecurringTask'\n            application/json;odata.metadata=none;odata.streaming=true:\n              schema:\n                $ref: '#/components/schemas/RecurringTask'\n            application/json;odata.metadata=none;odata.streaming=false:\n              schema:\n                $ref: '#/components/schemas/RecurringTask'\n            application/json;odata.metadata=none:\n              schema:\n                $ref: '#/components/schemas/RecurringTask'\n            application/json;odata.streaming=true:\n              schema:\n                $ref: '#/components/schemas/RecurringTask'\n            application/json;odata.streaming=false:\n              schema:\n                $ref: '#/components/schemas/RecurringTask'\n            application/json:\n              schema:\n                $ref: '#/components/schemas/RecurringTask'\n            application/json;odata.metadata=minimal;odata.streaming=true;IEEE754Compatible=false:\n              schema:\n                $ref: '#/components/schemas/RecurringTask'\n            application/json;odata.metadata=minimal;odata.streaming=true;IEEE754Compatible=true:\n              schema:\n                $ref: '#/components/schemas/RecurringTask'\n            application/json;odata.metadata=minimal;odata.streaming=false;IEEE754Compatible=false:\n              schema:\n                $ref: '#/components/schemas/RecurringTask'\n            application/json;odata.metadata=minimal;odata.streaming=false;IEEE754Compatible=true:\n              schema:\n                $ref: '#/components/schemas/RecurringTask'\n            application/json;odata.metadata=minimal;IEEE754Compatible=false:\n              schema:\n                $ref: '#/components/schemas/RecurringTask'\n            application/json;odata.metadata=minimal;IEEE754Compatible=true:\n              schema:\n                $ref: '#/components/schemas/RecurringTask'\n            application/json;odata.metadata=full;odata.streaming=true;IEEE754Compatible=false:\n              schema:\n                $ref: '#/components/schemas/RecurringTask'\n            application/json;odata.metadata=full;odata.streaming=true;IEEE754Compatible=true:\n              schema:\n                $ref: '#/components/schemas/RecurringTask'\n            application/json;odata.metadata=full;odata.streaming=false;IEEE754Compatible=false:\n              schema:\n                $ref: '#/components/schemas/RecurringTask'\n            application/json;odata.metadata=full;odata.streaming=false;IEEE754Compatible=true:\n              schema:\n                $ref: '#/components/schemas/RecurringTask'\n            application/json;odata.metadata=full;IEEE754Compatible=false:\n              schema:\n                $ref: '#/components/schemas/RecurringTask'\n            application/json;odata.metadata=full;IEEE754Compatible=true:\n              schema:\n                $ref: '#/components/schemas/RecurringTask'\n            application/json;odata.metadata=none;odata.streaming=true;IEEE754Compatible=false:\n              schema:\n                $ref: '#/components/schemas/RecurringTask'\n            application/json;odata.metadata=none;odata.streaming=true;IEEE754Compatible=true:\n              schema:\n                $ref: '#/components/schemas/RecurringTask'\n            application/json;odata.metadata=none;odata.streaming=false;IEEE754Compatible=true:\n              schema:\n                $ref: '#/components/schemas/RecurringTask'\n            application/json;odata.metadata=none;odata.streaming=false;IEEE754Compatible=false:\n              schema:\n                $ref: '#/components/schemas/RecurringTask'\n            application/json;odata.metadata=none;IEEE754Compatible=false:\n              schema:\n                $ref: '#/components/schemas/RecurringTask'\n            application/json;odata.metadata=none;IEEE754Compatible=true:\n              schema:\n                $ref: '#/components/schemas/RecurringTask'\n            application/json;odata.streaming=true;IEEE754Compatible=false:\n              schema:\n                $ref: '#/components/schemas/RecurringTask'\n            application/json;odata.streaming=true;IEEE754Compatible=true:\n              schema:\n                $ref: '#/components/schemas/RecurringTask'\n            application/json;odata.streaming=false;IEEE754Compatible=false:\n              schema:\n                $ref: '#/components/schemas/RecurringTask'\n            application/json;odata.streaming=false;IEEE754Compatible=true:\n              schema:\n                $ref: '#/components/schemas/RecurringTask'\n            application/json;IEEE754Compatible=false:\n              schema:\n                $ref: '#/components/schemas/RecurringTask'\n            application/json;IEEE754Compatible=true:\n              schema:\n                $ref: '#/components/schemas/RecurringTask'\n            application/xml:\n              schema:\n                $ref: '#/components/schemas/RecurringTask'\n            text/plain:\n              schema:\n                $ref: '#/components/schemas/RecurringTask'\n            application/octet-stream:\n              schema:\n                $ref: '#/components/schemas/RecurringTask'\n            text/json:\n              schema:\n                $ref: '#/components/schemas/RecurringTask'\n  /api/v1/recurring-tasks/{id}:\n    patch:\n      tags:\n        - RecurringTasks\n      parameters:\n        - name: id\n          in: path\n          required: true\n          schema:\n            type: integer\n            format: int64\n      requestBody:\n        content:\n          application/json;odata.metadata=minimal;odata.streaming=true:\n            schema:\n              $ref: '#/components/schemas/RecurringTaskUpdateDto'\n          application/json;odata.metadata=minimal;odata.streaming=false:\n            schema:\n              $ref: '#/components/schemas/RecurringTaskUpdateDto'\n          application/json;odata.metadata=minimal:\n            schema:\n              $ref: '#/components/schemas/RecurringTaskUpdateDto'\n          application/json;odata.metadata=full;odata.streaming=true:\n            schema:\n              $ref: '#/components/schemas/RecurringTaskUpdateDto'\n          application/json;odata.metadata=full;odata.streaming=false:\n            schema:\n              $ref: '#/components/schemas/RecurringTaskUpdateDto'\n          application/json;odata.metadata=full:\n            schema:\n              $ref: '#/components/schemas/RecurringTaskUpdateDto'\n          application/json;odata.metadata=none;odata.streaming=true:\n            schema:\n              $ref: '#/components/schemas/RecurringTaskUpdateDto'\n          application/json;odata.metadata=none;odata.streaming=false:\n            schema:\n              $ref: '#/components/schemas/RecurringTaskUpdateDto'\n          application/json;odata.metadata=none:\n            schema:\n              $ref: '#/components/schemas/RecurringTaskUpdateDto'\n          application/json;odata.streaming=true:\n            schema:\n              $ref: '#/components/schemas/RecurringTaskUpdateDto'\n          application/json;odata.streaming=false:\n            schema:\n              $ref: '#/components/schemas/RecurringTaskUpdateDto'\n          application/json:\n            schema:\n              $ref: '#/components/schemas/RecurringTaskUpdateDto'\n          application/json;odata.metadata=minimal;odata.streaming=true;IEEE754Compatible=false:\n            schema:\n              $ref: '#/components/schemas/RecurringTaskUpdateDto'\n          application/json;odata.metadata=minimal;odata.streaming=true;IEEE754Compatible=true:\n            schema:\n              $ref: '#/components/schemas/RecurringTaskUpdateDto'\n          application/json;odata.metadata=minimal;odata.streaming=false;IEEE754Compatible=false:\n            schema:\n              $ref: '#/components/schemas/RecurringTaskUpdateDto'\n          application/json;odata.metadata=minimal;odata.streaming=false;IEEE754Compatible=true:\n            schema:\n              $ref: '#/components/schemas/RecurringTaskUpdateDto'\n          application/json;odata.metadata=minimal;IEEE754Compatible=false:\n            schema:\n              $ref: '#/components/schemas/RecurringTaskUpdateDto'\n          application/json;odata.metadata=minimal;IEEE754Compatible=true:\n            schema:\n              $ref: '#/components/schemas/RecurringTaskUpdateDto'\n          application/json;odata.metadata=full;odata.streaming=true;IEEE754Compatible=false:\n            schema:\n              $ref: '#/components/schemas/RecurringTaskUpdateDto'\n          application/json;odata.metadata=full;odata.streaming=true;IEEE754Compatible=true:\n            schema:\n              $ref: '#/components/schemas/RecurringTaskUpdateDto'\n          application/json;odata.metadata=full;odata.streaming=false;IEEE754Compatible=false:\n            schema:\n              $ref: '#/components/schemas/RecurringTaskUpdateDto'\n          application/json;odata.metadata=full;odata.streaming=false;IEEE754Compatible=true:\n            schema:\n              $ref: '#/components/schemas/RecurringTaskUpdateDto'\n          application/json;odata.metadata=full;IEEE754Compatible=false:\n            schema:\n              $ref: '#/components/schemas/RecurringTaskUpdateDto'\n          application/json;odata.metadata=full;IEEE754Compatible=true:\n            schema:\n              $ref: '#/components/schemas/RecurringTaskUpdateDto'\n          application/json;odata.metadata=none;odata.streaming=true;IEEE754Compatible=false:\n            schema:\n              $ref: '#/components/schemas/RecurringTaskUpdateDto'\n          application/json;odata.metadata=none;odata.streaming=true;IEEE754Compatible=true:\n            schema:\n              $ref: '#/components/schemas/RecurringTaskUpdateDto'\n          application/json;odata.metadata=none;odata.streaming=false;IEEE754Compatible=true:\n            schema:\n              $ref: '#/components/schemas/RecurringTaskUpdateDto'\n          application/json;odata.metadata=none;odata.streaming=false;IEEE754Compatible=false:\n            schema:\n              $ref: '#/components/schemas/RecurringTaskUpdateDto'\n          application/json;odata.metadata=none;IEEE754Compatible=false:\n            schema:\n              $ref: '#/components/schemas/RecurringTaskUpdateDto'\n          application/json;odata.metadata=none;IEEE754Compatible=true:\n            schema:\n              $ref: '#/components/schemas/RecurringTaskUpdateDto'\n          application/json;odata.streaming=true;IEEE754Compatible=false:\n            schema:\n              $ref: '#/components/schemas/RecurringTaskUpdateDto'\n          application/json;odata.streaming=true;IEEE754Compatible=true:\n            schema:\n              $ref: '#/components/schemas/RecurringTaskUpdateDto'\n          application/json;odata.streaming=false;IEEE754Compatible=false:\n            schema:\n              $ref: '#/components/schemas/RecurringTaskUpdateDto'\n          application/json;odata.streaming=false;IEEE754Compatible=true:\n            schema:\n              $ref: '#/components/schemas/RecurringTaskUpdateDto'\n          application/json;IEEE754Compatible=false:\n            schema:\n              $ref: '#/components/schemas/RecurringTaskUpdateDto'\n          application/json;IEEE754Compatible=true:\n            schema:\n              $ref: '#/components/schemas/RecurringTaskUpdateDto'\n          application/xml:\n            schema:\n              $ref: '#/components/schemas/RecurringTaskUpdateDto'\n          text/plain:\n            schema:\n              $ref: '#/components/schemas/RecurringTaskUpdateDto'\n          application/json-patch+json:\n            schema:\n              $ref: '#/components/schemas/RecurringTaskUpdateDto'\n          text/json:\n            schema:\n              $ref: '#/components/schemas/RecurringTaskUpdateDto'\n          application/*+json:\n            schema:\n              $ref: '#/components/schemas/RecurringTaskUpdateDto'\n      responses:\n        '200':\n          description: OK\n          content:\n            application/json;odata.metadata=minimal;odata.streaming=true:\n              schema:\n                $ref: '#/components/schemas/RecurringTask'\n            application/json;odata.metadata=minimal;odata.streaming=false:\n              schema:\n                $ref: '#/components/schemas/RecurringTask'\n            application/json;odata.metadata=minimal:\n              schema:\n                $ref: '#/components/schemas/RecurringTask'\n            application/json;odata.metadata=full;odata.streaming=true:\n              schema:\n                $ref: '#/components/schemas/RecurringTask'\n            application/json;odata.metadata=full;odata.streaming=false:\n              schema:\n                $ref: '#/components/schemas/RecurringTask'\n            application/json;odata.metadata=full:\n              schema:\n                $ref: '#/components/schemas/RecurringTask'\n            application/json;odata.metadata=none;odata.streaming=true:\n              schema:\n                $ref: '#/components/schemas/RecurringTask'\n            application/json;odata.metadata=none;odata.streaming=false:\n              schema:\n                $ref: '#/components/schemas/RecurringTask'\n            application/json;odata.metadata=none:\n              schema:\n                $ref: '#/components/schemas/RecurringTask'\n            application/json;odata.streaming=true:\n              schema:\n                $ref: '#/components/schemas/RecurringTask'\n            application/json;odata.streaming=false:\n              schema:\n                $ref: '#/components/schemas/RecurringTask'\n            application/json:\n              schema:\n                $ref: '#/components/schemas/RecurringTask'\n            application/json;odata.metadata=minimal;odata.streaming=true;IEEE754Compatible=false:\n              schema:\n                $ref: '#/components/schemas/RecurringTask'\n            application/json;odata.metadata=minimal;odata.streaming=true;IEEE754Compatible=true:\n              schema:\n                $ref: '#/components/schemas/RecurringTask'\n            application/json;odata.metadata=minimal;odata.streaming=false;IEEE754Compatible=false:\n              schema:\n                $ref: '#/components/schemas/RecurringTask'\n            application/json;odata.metadata=minimal;odata.streaming=false;IEEE754Compatible=true:\n              schema:\n                $ref: '#/components/schemas/RecurringTask'\n            application/json;odata.metadata=minimal;IEEE754Compatible=false:\n              schema:\n                $ref: '#/components/schemas/RecurringTask'\n            application/json;odata.metadata=minimal;IEEE754Compatible=true:\n              schema:\n                $ref: '#/components/schemas/RecurringTask'\n            application/json;odata.metadata=full;odata.streaming=true;IEEE754Compatible=false:\n              schema:\n                $ref: '#/components/schemas/RecurringTask'\n            application/json;odata.metadata=full;odata.streaming=true;IEEE754Compatible=true:\n              schema:\n                $ref: '#/components/schemas/RecurringTask'\n            application/json;odata.metadata=full;odata.streaming=false;IEEE754Compatible=false:\n              schema:\n                $ref: '#/components/schemas/RecurringTask'\n            application/json;odata.metadata=full;odata.streaming=false;IEEE754Compatible=true:\n              schema:\n                $ref: '#/components/schemas/RecurringTask'\n            application/json;odata.metadata=full;IEEE754Compatible=false:\n              schema:\n                $ref: '#/components/schemas/RecurringTask'\n            application/json;odata.metadata=full;IEEE754Compatible=true:\n              schema:\n                $ref: '#/components/schemas/RecurringTask'\n            application/json;odata.metadata=none;odata.streaming=true;IEEE754Compatible=false:\n              schema:\n                $ref: '#/components/schemas/RecurringTask'\n            application/json;odata.metadata=none;odata.streaming=true;IEEE754Compatible=true:\n              schema:\n                $ref: '#/components/schemas/RecurringTask'\n            application/json;odata.metadata=none;odata.streaming=false;IEEE754Compatible=true:\n              schema:\n                $ref: '#/components/schemas/RecurringTask'\n            application/json;odata.metadata=none;odata.streaming=false;IEEE754Compatible=false:\n              schema:\n                $ref: '#/components/schemas/RecurringTask'\n            application/json;odata.metadata=none;IEEE754Compatible=false:\n              schema:\n                $ref: '#/components/schemas/RecurringTask'\n            application/json;odata.metadata=none;IEEE754Compatible=true:\n              schema:\n                $ref: '#/components/schemas/RecurringTask'\n            application/json;odata.streaming=true;IEEE754Compatible=false:\n              schema:\n                $ref: '#/components/schemas/RecurringTask'\n            application/json;odata.streaming=true;IEEE754Compatible=true:\n              schema:\n                $ref: '#/components/schemas/RecurringTask'\n            application/json;odata.streaming=false;IEEE754Compatible=false:\n              schema:\n                $ref: '#/components/schemas/RecurringTask'\n            application/json;odata.streaming=false;IEEE754Compatible=true:\n              schema:\n                $ref: '#/components/schemas/RecurringTask'\n            application/json;IEEE754Compatible=false:\n              schema:\n                $ref: '#/components/schemas/RecurringTask'\n            application/json;IEEE754Compatible=true:\n              schema:\n                $ref: '#/components/schemas/RecurringTask'\n            application/xml:\n              schema:\n                $ref: '#/components/schemas/RecurringTask'\n            text/plain:\n              schema:\n                $ref: '#/components/schemas/RecurringTask'\n            application/octet-stream:\n              schema:\n                $ref: '#/components/schemas/RecurringTask'\n            text/json:\n              schema:\n                $ref: '#/components/schemas/RecurringTask'\n    delete:\n      tags:\n        - RecurringTasks\n      parameters:\n        - name: id\n          in: path\n          required: true\n          schema:\n            type: integer\n            format: int64\n      responses:\n        '200':\n          description: OK\n  /api/v1/odata/RecurringTasks:\n    get:\n      tags:\n        - RecurringTasks\n      operationId: api/v{version:apiVersion}/odata/RecurringTasks\n      parameters:\n        - name: select\n          in: query\n          description: Limits the properties returned in the result.\n          schema:\n            type: string\n        - name: expand\n          in: query\n          description: Indicates the related entities to be represented inline. The\n            maximum depth is 2.\n          schema:\n            type: string\n        - name: filter\n          in: query\n          description: 'Restricts the set of items returned. The maximum number of\n            expressions is 100. The allowed functions are: allfunctions.'\n          schema:\n            type: string\n        - name: orderby\n          in: query\n          description: Specifies the order in which items are returned. The maximum number\n            of expressions is 5.\n          schema:\n            type: string\n        - name: top\n          in: query\n          description: Limits the number of items returned from a collection. The maximum\n            value is 100.\n          schema:\n            type: integer\n            format: int32\n        - name: skip\n          in: query\n          description: Excludes the specified number of items of the queried collection\n            from the result.\n          schema:\n            type: integer\n            format: int32\n        - name: count\n          in: query\n          description: Indicates whether the total count of items within a collection are\n            returned in the result.\n          schema:\n            type: boolean\n            default: false\n      responses:\n        '200':\n          description: OK\n          content:\n            application/json;odata.metadata=minimal;odata.streaming=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/RecurringTask'\n            application/json;odata.metadata=minimal;odata.streaming=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/RecurringTask'\n            application/json;odata.metadata=minimal:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/RecurringTask'\n            application/json;odata.metadata=full;odata.streaming=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/RecurringTask'\n            application/json;odata.metadata=full;odata.streaming=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/RecurringTask'\n            application/json;odata.metadata=full:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/RecurringTask'\n            application/json;odata.metadata=none;odata.streaming=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/RecurringTask'\n            application/json;odata.metadata=none;odata.streaming=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/RecurringTask'\n            application/json;odata.metadata=none:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/RecurringTask'\n            application/json;odata.streaming=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/RecurringTask'\n            application/json;odata.streaming=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/RecurringTask'\n            application/json:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/RecurringTask'\n            application/json;odata.metadata=minimal;odata.streaming=true;IEEE754Compatible=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/RecurringTask'\n            application/json;odata.metadata=minimal;odata.streaming=true;IEEE754Compatible=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/RecurringTask'\n            application/json;odata.metadata=minimal;odata.streaming=false;IEEE754Compatible=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/RecurringTask'\n            application/json;odata.metadata=minimal;odata.streaming=false;IEEE754Compatible=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/RecurringTask'\n            application/json;odata.metadata=minimal;IEEE754Compatible=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/RecurringTask'\n            application/json;odata.metadata=minimal;IEEE754Compatible=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/RecurringTask'\n            application/json;odata.metadata=full;odata.streaming=true;IEEE754Compatible=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/RecurringTask'\n            application/json;odata.metadata=full;odata.streaming=true;IEEE754Compatible=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/RecurringTask'\n            application/json;odata.metadata=full;odata.streaming=false;IEEE754Compatible=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/RecurringTask'\n            application/json;odata.metadata=full;odata.streaming=false;IEEE754Compatible=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/RecurringTask'\n            application/json;odata.metadata=full;IEEE754Compatible=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/RecurringTask'\n            application/json;odata.metadata=full;IEEE754Compatible=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/RecurringTask'\n            application/json;odata.metadata=none;odata.streaming=true;IEEE754Compatible=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/RecurringTask'\n            application/json;odata.metadata=none;odata.streaming=true;IEEE754Compatible=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/RecurringTask'\n            application/json;odata.metadata=none;odata.streaming=false;IEEE754Compatible=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/RecurringTask'\n            application/json;odata.metadata=none;odata.streaming=false;IEEE754Compatible=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/RecurringTask'\n            application/json;odata.metadata=none;IEEE754Compatible=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/RecurringTask'\n            application/json;odata.metadata=none;IEEE754Compatible=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/RecurringTask'\n            application/json;odata.streaming=true;IEEE754Compatible=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/RecurringTask'\n            application/json;odata.streaming=true;IEEE754Compatible=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/RecurringTask'\n            application/json;odata.streaming=false;IEEE754Compatible=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/RecurringTask'\n            application/json;odata.streaming=false;IEEE754Compatible=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/RecurringTask'\n            application/json;IEEE754Compatible=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/RecurringTask'\n            application/json;IEEE754Compatible=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/RecurringTask'\n            application/xml:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/RecurringTask'\n            text/plain:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/RecurringTask'\n            application/octet-stream:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/RecurringTask'\n            text/json:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/RecurringTask'\n  /api/v1/odata/RecurringTasks/$count:\n    get:\n      tags:\n        - RecurringTasks\n      operationId: api/v{version:apiVersion}/odata/RecurringTasks/$count\n      parameters:\n        - name: select\n          in: query\n          description: Limits the properties returned in the result.\n          schema:\n            type: string\n        - name: expand\n          in: query\n          description: Indicates the related entities to be represented inline. The\n            maximum depth is 2.\n          schema:\n            type: string\n        - name: filter\n          in: query\n          description: 'Restricts the set of items returned. The maximum number of\n            expressions is 100. The allowed functions are: allfunctions.'\n          schema:\n            type: string\n        - name: orderby\n          in: query\n          description: Specifies the order in which items are returned. The maximum number\n            of expressions is 5.\n          schema:\n            type: string\n        - name: top\n          in: query\n          description: Limits the number of items returned from a collection. The maximum\n            value is 100.\n          schema:\n            type: integer\n            format: int32\n        - name: skip\n          in: query\n          description: Excludes the specified number of items of the queried collection\n            from the result.\n          schema:\n            type: integer\n            format: int32\n        - name: count\n          in: query\n          description: Indicates whether the total count of items within a collection are\n            returned in the result.\n          schema:\n            type: boolean\n            default: false\n      responses:\n        '200':\n          description: OK\n          content:\n            application/json;odata.metadata=minimal;odata.streaming=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/RecurringTask'\n            application/json;odata.metadata=minimal;odata.streaming=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/RecurringTask'\n            application/json;odata.metadata=minimal:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/RecurringTask'\n            application/json;odata.metadata=full;odata.streaming=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/RecurringTask'\n            application/json;odata.metadata=full;odata.streaming=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/RecurringTask'\n            application/json;odata.metadata=full:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/RecurringTask'\n            application/json;odata.metadata=none;odata.streaming=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/RecurringTask'\n            application/json;odata.metadata=none;odata.streaming=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/RecurringTask'\n            application/json;odata.metadata=none:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/RecurringTask'\n            application/json;odata.streaming=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/RecurringTask'\n            application/json;odata.streaming=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/RecurringTask'\n            application/json:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/RecurringTask'\n            application/json;odata.metadata=minimal;odata.streaming=true;IEEE754Compatible=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/RecurringTask'\n            application/json;odata.metadata=minimal;odata.streaming=true;IEEE754Compatible=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/RecurringTask'\n            application/json;odata.metadata=minimal;odata.streaming=false;IEEE754Compatible=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/RecurringTask'\n            application/json;odata.metadata=minimal;odata.streaming=false;IEEE754Compatible=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/RecurringTask'\n            application/json;odata.metadata=minimal;IEEE754Compatible=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/RecurringTask'\n            application/json;odata.metadata=minimal;IEEE754Compatible=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/RecurringTask'\n            application/json;odata.metadata=full;odata.streaming=true;IEEE754Compatible=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/RecurringTask'\n            application/json;odata.metadata=full;odata.streaming=true;IEEE754Compatible=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/RecurringTask'\n            application/json;odata.metadata=full;odata.streaming=false;IEEE754Compatible=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/RecurringTask'\n            application/json;odata.metadata=full;odata.streaming=false;IEEE754Compatible=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/RecurringTask'\n            application/json;odata.metadata=full;IEEE754Compatible=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/RecurringTask'\n            application/json;odata.metadata=full;IEEE754Compatible=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/RecurringTask'\n            application/json;odata.metadata=none;odata.streaming=true;IEEE754Compatible=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/RecurringTask'\n            application/json;odata.metadata=none;odata.streaming=true;IEEE754Compatible=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/RecurringTask'\n            application/json;odata.metadata=none;odata.streaming=false;IEEE754Compatible=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/RecurringTask'\n            application/json;odata.metadata=none;odata.streaming=false;IEEE754Compatible=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/RecurringTask'\n            application/json;odata.metadata=none;IEEE754Compatible=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/RecurringTask'\n            application/json;odata.metadata=none;IEEE754Compatible=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/RecurringTask'\n            application/json;odata.streaming=true;IEEE754Compatible=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/RecurringTask'\n            application/json;odata.streaming=true;IEEE754Compatible=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/RecurringTask'\n            application/json;odata.streaming=false;IEEE754Compatible=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/RecurringTask'\n            application/json;odata.streaming=false;IEEE754Compatible=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/RecurringTask'\n            application/json;IEEE754Compatible=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/RecurringTask'\n            application/json;IEEE754Compatible=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/RecurringTask'\n            application/xml:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/RecurringTask'\n            text/plain:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/RecurringTask'\n            application/octet-stream:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/RecurringTask'\n            text/json:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/RecurringTask'\n  /:\n    get:\n      tags:\n        - Root\n      responses:\n        '200':\n          description: OK\n  /api/v1/tasks:\n    post:\n      tags:\n        - Tasks\n      requestBody:\n        content:\n          application/json;odata.metadata=minimal;odata.streaming=true:\n            schema:\n              $ref: '#/components/schemas/TasksCreateDto'\n          application/json;odata.metadata=minimal;odata.streaming=false:\n            schema:\n              $ref: '#/components/schemas/TasksCreateDto'\n          application/json;odata.metadata=minimal:\n            schema:\n              $ref: '#/components/schemas/TasksCreateDto'\n          application/json;odata.metadata=full;odata.streaming=true:\n            schema:\n              $ref: '#/components/schemas/TasksCreateDto'\n          application/json;odata.metadata=full;odata.streaming=false:\n            schema:\n              $ref: '#/components/schemas/TasksCreateDto'\n          application/json;odata.metadata=full:\n            schema:\n              $ref: '#/components/schemas/TasksCreateDto'\n          application/json;odata.metadata=none;odata.streaming=true:\n            schema:\n              $ref: '#/components/schemas/TasksCreateDto'\n          application/json;odata.metadata=none;odata.streaming=false:\n            schema:\n              $ref: '#/components/schemas/TasksCreateDto'\n          application/json;odata.metadata=none:\n            schema:\n              $ref: '#/components/schemas/TasksCreateDto'\n          application/json;odata.streaming=true:\n            schema:\n              $ref: '#/components/schemas/TasksCreateDto'\n          application/json;odata.streaming=false:\n            schema:\n              $ref: '#/components/schemas/TasksCreateDto'\n          application/json:\n            schema:\n              $ref: '#/components/schemas/TasksCreateDto'\n          application/json;odata.metadata=minimal;odata.streaming=true;IEEE754Compatible=false:\n            schema:\n              $ref: '#/components/schemas/TasksCreateDto'\n          application/json;odata.metadata=minimal;odata.streaming=true;IEEE754Compatible=true:\n            schema:\n              $ref: '#/components/schemas/TasksCreateDto'\n          application/json;odata.metadata=minimal;odata.streaming=false;IEEE754Compatible=false:\n            schema:\n              $ref: '#/components/schemas/TasksCreateDto'\n          application/json;odata.metadata=minimal;odata.streaming=false;IEEE754Compatible=true:\n            schema:\n              $ref: '#/components/schemas/TasksCreateDto'\n          application/json;odata.metadata=minimal;IEEE754Compatible=false:\n            schema:\n              $ref: '#/components/schemas/TasksCreateDto'\n          application/json;odata.metadata=minimal;IEEE754Compatible=true:\n            schema:\n              $ref: '#/components/schemas/TasksCreateDto'\n          application/json;odata.metadata=full;odata.streaming=true;IEEE754Compatible=false:\n            schema:\n              $ref: '#/components/schemas/TasksCreateDto'\n          application/json;odata.metadata=full;odata.streaming=true;IEEE754Compatible=true:\n            schema:\n              $ref: '#/components/schemas/TasksCreateDto'\n          application/json;odata.metadata=full;odata.streaming=false;IEEE754Compatible=false:\n            schema:\n              $ref: '#/components/schemas/TasksCreateDto'\n          application/json;odata.metadata=full;odata.streaming=false;IEEE754Compatible=true:\n            schema:\n              $ref: '#/components/schemas/TasksCreateDto'\n          application/json;odata.metadata=full;IEEE754Compatible=false:\n            schema:\n              $ref: '#/components/schemas/TasksCreateDto'\n          application/json;odata.metadata=full;IEEE754Compatible=true:\n            schema:\n              $ref: '#/components/schemas/TasksCreateDto'\n          application/json;odata.metadata=none;odata.streaming=true;IEEE754Compatible=false:\n            schema:\n              $ref: '#/components/schemas/TasksCreateDto'\n          application/json;odata.metadata=none;odata.streaming=true;IEEE754Compatible=true:\n            schema:\n              $ref: '#/components/schemas/TasksCreateDto'\n          application/json;odata.metadata=none;odata.streaming=false;IEEE754Compatible=true:\n            schema:\n              $ref: '#/components/schemas/TasksCreateDto'\n          application/json;odata.metadata=none;odata.streaming=false;IEEE754Compatible=false:\n            schema:\n              $ref: '#/components/schemas/TasksCreateDto'\n          application/json;odata.metadata=none;IEEE754Compatible=false:\n            schema:\n              $ref: '#/components/schemas/TasksCreateDto'\n          application/json;odata.metadata=none;IEEE754Compatible=true:\n            schema:\n              $ref: '#/components/schemas/TasksCreateDto'\n          application/json;odata.streaming=true;IEEE754Compatible=false:\n            schema:\n              $ref: '#/components/schemas/TasksCreateDto'\n          application/json;odata.streaming=true;IEEE754Compatible=true:\n            schema:\n              $ref: '#/components/schemas/TasksCreateDto'\n          application/json;odata.streaming=false;IEEE754Compatible=false:\n            schema:\n              $ref: '#/components/schemas/TasksCreateDto'\n          application/json;odata.streaming=false;IEEE754Compatible=true:\n            schema:\n              $ref: '#/components/schemas/TasksCreateDto'\n          application/json;IEEE754Compatible=false:\n            schema:\n              $ref: '#/components/schemas/TasksCreateDto'\n          application/json;IEEE754Compatible=true:\n            schema:\n              $ref: '#/components/schemas/TasksCreateDto'\n          application/xml:\n            schema:\n              $ref: '#/components/schemas/TasksCreateDto'\n          text/plain:\n            schema:\n              $ref: '#/components/schemas/TasksCreateDto'\n          application/json-patch+json:\n            schema:\n              $ref: '#/components/schemas/TasksCreateDto'\n          text/json:\n            schema:\n              $ref: '#/components/schemas/TasksCreateDto'\n          application/*+json:\n            schema:\n              $ref: '#/components/schemas/TasksCreateDto'\n      responses:\n        '200':\n          description: OK\n          content:\n            application/json;odata.metadata=minimal;odata.streaming=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/Task'\n            application/json;odata.metadata=minimal;odata.streaming=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/Task'\n            application/json;odata.metadata=minimal:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/Task'\n            application/json;odata.metadata=full;odata.streaming=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/Task'\n            application/json;odata.metadata=full;odata.streaming=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/Task'\n            application/json;odata.metadata=full:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/Task'\n            application/json;odata.metadata=none;odata.streaming=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/Task'\n            application/json;odata.metadata=none;odata.streaming=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/Task'\n            application/json;odata.metadata=none:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/Task'\n            application/json;odata.streaming=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/Task'\n            application/json;odata.streaming=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/Task'\n            application/json:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/Task'\n            application/json;odata.metadata=minimal;odata.streaming=true;IEEE754Compatible=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/Task'\n            application/json;odata.metadata=minimal;odata.streaming=true;IEEE754Compatible=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/Task'\n            application/json;odata.metadata=minimal;odata.streaming=false;IEEE754Compatible=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/Task'\n            application/json;odata.metadata=minimal;odata.streaming=false;IEEE754Compatible=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/Task'\n            application/json;odata.metadata=minimal;IEEE754Compatible=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/Task'\n            application/json;odata.metadata=minimal;IEEE754Compatible=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/Task'\n            application/json;odata.metadata=full;odata.streaming=true;IEEE754Compatible=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/Task'\n            application/json;odata.metadata=full;odata.streaming=true;IEEE754Compatible=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/Task'\n            application/json;odata.metadata=full;odata.streaming=false;IEEE754Compatible=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/Task'\n            application/json;odata.metadata=full;odata.streaming=false;IEEE754Compatible=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/Task'\n            application/json;odata.metadata=full;IEEE754Compatible=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/Task'\n            application/json;odata.metadata=full;IEEE754Compatible=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/Task'\n            application/json;odata.metadata=none;odata.streaming=true;IEEE754Compatible=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/Task'\n            application/json;odata.metadata=none;odata.streaming=true;IEEE754Compatible=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/Task'\n            application/json;odata.metadata=none;odata.streaming=false;IEEE754Compatible=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/Task'\n            application/json;odata.metadata=none;odata.streaming=false;IEEE754Compatible=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/Task'\n            application/json;odata.metadata=none;IEEE754Compatible=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/Task'\n            application/json;odata.metadata=none;IEEE754Compatible=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/Task'\n            application/json;odata.streaming=true;IEEE754Compatible=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/Task'\n            application/json;odata.streaming=true;IEEE754Compatible=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/Task'\n            application/json;odata.streaming=false;IEEE754Compatible=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/Task'\n            application/json;odata.streaming=false;IEEE754Compatible=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/Task'\n            application/json;IEEE754Compatible=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/Task'\n            application/json;IEEE754Compatible=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/Task'\n            application/xml:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/Task'\n            text/plain:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/Task'\n            application/octet-stream:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/Task'\n            text/json:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/Task'\n  /api/v1/tasks/{id}:\n    put:\n      tags:\n        - Tasks\n      parameters:\n        - name: id\n          in: path\n          required: true\n          schema:\n            type: integer\n            format: int64\n      requestBody:\n        content:\n          application/json;odata.metadata=minimal;odata.streaming=true:\n            schema:\n              $ref: '#/components/schemas/TaskUpdateDto'\n          application/json;odata.metadata=minimal;odata.streaming=false:\n            schema:\n              $ref: '#/components/schemas/TaskUpdateDto'\n          application/json;odata.metadata=minimal:\n            schema:\n              $ref: '#/components/schemas/TaskUpdateDto'\n          application/json;odata.metadata=full;odata.streaming=true:\n            schema:\n              $ref: '#/components/schemas/TaskUpdateDto'\n          application/json;odata.metadata=full;odata.streaming=false:\n            schema:\n              $ref: '#/components/schemas/TaskUpdateDto'\n          application/json;odata.metadata=full:\n            schema:\n              $ref: '#/components/schemas/TaskUpdateDto'\n          application/json;odata.metadata=none;odata.streaming=true:\n            schema:\n              $ref: '#/components/schemas/TaskUpdateDto'\n          application/json;odata.metadata=none;odata.streaming=false:\n            schema:\n              $ref: '#/components/schemas/TaskUpdateDto'\n          application/json;odata.metadata=none:\n            schema:\n              $ref: '#/components/schemas/TaskUpdateDto'\n          application/json;odata.streaming=true:\n            schema:\n              $ref: '#/components/schemas/TaskUpdateDto'\n          application/json;odata.streaming=false:\n            schema:\n              $ref: '#/components/schemas/TaskUpdateDto'\n          application/json:\n            schema:\n              $ref: '#/components/schemas/TaskUpdateDto'\n          application/json;odata.metadata=minimal;odata.streaming=true;IEEE754Compatible=false:\n            schema:\n              $ref: '#/components/schemas/TaskUpdateDto'\n          application/json;odata.metadata=minimal;odata.streaming=true;IEEE754Compatible=true:\n            schema:\n              $ref: '#/components/schemas/TaskUpdateDto'\n          application/json;odata.metadata=minimal;odata.streaming=false;IEEE754Compatible=false:\n            schema:\n              $ref: '#/components/schemas/TaskUpdateDto'\n          application/json;odata.metadata=minimal;odata.streaming=false;IEEE754Compatible=true:\n            schema:\n              $ref: '#/components/schemas/TaskUpdateDto'\n          application/json;odata.metadata=minimal;IEEE754Compatible=false:\n            schema:\n              $ref: '#/components/schemas/TaskUpdateDto'\n          application/json;odata.metadata=minimal;IEEE754Compatible=true:\n            schema:\n              $ref: '#/components/schemas/TaskUpdateDto'\n          application/json;odata.metadata=full;odata.streaming=true;IEEE754Compatible=false:\n            schema:\n              $ref: '#/components/schemas/TaskUpdateDto'\n          application/json;odata.metadata=full;odata.streaming=true;IEEE754Compatible=true:\n            schema:\n              $ref: '#/components/schemas/TaskUpdateDto'\n          application/json;odata.metadata=full;odata.streaming=false;IEEE754Compatible=false:\n            schema:\n              $ref: '#/components/schemas/TaskUpdateDto'\n          application/json;odata.metadata=full;odata.streaming=false;IEEE754Compatible=true:\n            schema:\n              $ref: '#/components/schemas/TaskUpdateDto'\n          application/json;odata.metadata=full;IEEE754Compatible=false:\n            schema:\n              $ref: '#/components/schemas/TaskUpdateDto'\n          application/json;odata.metadata=full;IEEE754Compatible=true:\n            schema:\n              $ref: '#/components/schemas/TaskUpdateDto'\n          application/json;odata.metadata=none;odata.streaming=true;IEEE754Compatible=false:\n            schema:\n              $ref: '#/components/schemas/TaskUpdateDto'\n          application/json;odata.metadata=none;odata.streaming=true;IEEE754Compatible=true:\n            schema:\n              $ref: '#/components/schemas/TaskUpdateDto'\n          application/json;odata.metadata=none;odata.streaming=false;IEEE754Compatible=true:\n            schema:\n              $ref: '#/components/schemas/TaskUpdateDto'\n          application/json;odata.metadata=none;odata.streaming=false;IEEE754Compatible=false:\n            schema:\n              $ref: '#/components/schemas/TaskUpdateDto'\n          application/json;odata.metadata=none;IEEE754Compatible=false:\n            schema:\n              $ref: '#/components/schemas/TaskUpdateDto'\n          application/json;odata.metadata=none;IEEE754Compatible=true:\n            schema:\n              $ref: '#/components/schemas/TaskUpdateDto'\n          application/json;odata.streaming=true;IEEE754Compatible=false:\n            schema:\n              $ref: '#/components/schemas/TaskUpdateDto'\n          application/json;odata.streaming=true;IEEE754Compatible=true:\n            schema:\n              $ref: '#/components/schemas/TaskUpdateDto'\n          application/json;odata.streaming=false;IEEE754Compatible=false:\n            schema:\n              $ref: '#/components/schemas/TaskUpdateDto'\n          application/json;odata.streaming=false;IEEE754Compatible=true:\n            schema:\n              $ref: '#/components/schemas/TaskUpdateDto'\n          application/json;IEEE754Compatible=false:\n            schema:\n              $ref: '#/components/schemas/TaskUpdateDto'\n          application/json;IEEE754Compatible=true:\n            schema:\n              $ref: '#/components/schemas/TaskUpdateDto'\n          application/xml:\n            schema:\n              $ref: '#/components/schemas/TaskUpdateDto'\n          text/plain:\n            schema:\n              $ref: '#/components/schemas/TaskUpdateDto'\n          application/json-patch+json:\n            schema:\n              $ref: '#/components/schemas/TaskUpdateDto'\n          text/json:\n            schema:\n              $ref: '#/components/schemas/TaskUpdateDto'\n          application/*+json:\n            schema:\n              $ref: '#/components/schemas/TaskUpdateDto'\n      responses:\n        '200':\n          description: OK\n          content:\n            application/json;odata.metadata=minimal;odata.streaming=true:\n              schema:\n                $ref: '#/components/schemas/Task'\n            application/json;odata.metadata=minimal;odata.streaming=false:\n              schema:\n                $ref: '#/components/schemas/Task'\n            application/json;odata.metadata=minimal:\n              schema:\n                $ref: '#/components/schemas/Task'\n            application/json;odata.metadata=full;odata.streaming=true:\n              schema:\n                $ref: '#/components/schemas/Task'\n            application/json;odata.metadata=full;odata.streaming=false:\n              schema:\n                $ref: '#/components/schemas/Task'\n            application/json;odata.metadata=full:\n              schema:\n                $ref: '#/components/schemas/Task'\n            application/json;odata.metadata=none;odata.streaming=true:\n              schema:\n                $ref: '#/components/schemas/Task'\n            application/json;odata.metadata=none;odata.streaming=false:\n              schema:\n                $ref: '#/components/schemas/Task'\n            application/json;odata.metadata=none:\n              schema:\n                $ref: '#/components/schemas/Task'\n            application/json;odata.streaming=true:\n              schema:\n                $ref: '#/components/schemas/Task'\n            application/json;odata.streaming=false:\n              schema:\n                $ref: '#/components/schemas/Task'\n            application/json:\n              schema:\n                $ref: '#/components/schemas/Task'\n            application/json;odata.metadata=minimal;odata.streaming=true;IEEE754Compatible=false:\n              schema:\n                $ref: '#/components/schemas/Task'\n            application/json;odata.metadata=minimal;odata.streaming=true;IEEE754Compatible=true:\n              schema:\n                $ref: '#/components/schemas/Task'\n            application/json;odata.metadata=minimal;odata.streaming=false;IEEE754Compatible=false:\n              schema:\n                $ref: '#/components/schemas/Task'\n            application/json;odata.metadata=minimal;odata.streaming=false;IEEE754Compatible=true:\n              schema:\n                $ref: '#/components/schemas/Task'\n            application/json;odata.metadata=minimal;IEEE754Compatible=false:\n              schema:\n                $ref: '#/components/schemas/Task'\n            application/json;odata.metadata=minimal;IEEE754Compatible=true:\n              schema:\n                $ref: '#/components/schemas/Task'\n            application/json;odata.metadata=full;odata.streaming=true;IEEE754Compatible=false:\n              schema:\n                $ref: '#/components/schemas/Task'\n            application/json;odata.metadata=full;odata.streaming=true;IEEE754Compatible=true:\n              schema:\n                $ref: '#/components/schemas/Task'\n            application/json;odata.metadata=full;odata.streaming=false;IEEE754Compatible=false:\n              schema:\n                $ref: '#/components/schemas/Task'\n            application/json;odata.metadata=full;odata.streaming=false;IEEE754Compatible=true:\n              schema:\n                $ref: '#/components/schemas/Task'\n            application/json;odata.metadata=full;IEEE754Compatible=false:\n              schema:\n                $ref: '#/components/schemas/Task'\n            application/json;odata.metadata=full;IEEE754Compatible=true:\n              schema:\n                $ref: '#/components/schemas/Task'\n            application/json;odata.metadata=none;odata.streaming=true;IEEE754Compatible=false:\n              schema:\n                $ref: '#/components/schemas/Task'\n            application/json;odata.metadata=none;odata.streaming=true;IEEE754Compatible=true:\n              schema:\n                $ref: '#/components/schemas/Task'\n            application/json;odata.metadata=none;odata.streaming=false;IEEE754Compatible=true:\n              schema:\n                $ref: '#/components/schemas/Task'\n            application/json;odata.metadata=none;odata.streaming=false;IEEE754Compatible=false:\n              schema:\n                $ref: '#/components/schemas/Task'\n            application/json;odata.metadata=none;IEEE754Compatible=false:\n              schema:\n                $ref: '#/components/schemas/Task'\n            application/json;odata.metadata=none;IEEE754Compatible=true:\n              schema:\n                $ref: '#/components/schemas/Task'\n            application/json;odata.streaming=true;IEEE754Compatible=false:\n              schema:\n                $ref: '#/components/schemas/Task'\n            application/json;odata.streaming=true;IEEE754Compatible=true:\n              schema:\n                $ref: '#/components/schemas/Task'\n            application/json;odata.streaming=false;IEEE754Compatible=false:\n              schema:\n                $ref: '#/components/schemas/Task'\n            application/json;odata.streaming=false;IEEE754Compatible=true:\n              schema:\n                $ref: '#/components/schemas/Task'\n            application/json;IEEE754Compatible=false:\n              schema:\n                $ref: '#/components/schemas/Task'\n            application/json;IEEE754Compatible=true:\n              schema:\n                $ref: '#/components/schemas/Task'\n            application/xml:\n              schema:\n                $ref: '#/components/schemas/Task'\n            text/plain:\n              schema:\n                $ref: '#/components/schemas/Task'\n            application/octet-stream:\n              schema:\n                $ref: '#/components/schemas/Task'\n            text/json:\n              schema:\n                $ref: '#/components/schemas/Task'\n  /api/v1/tasks/{id}/submit:\n    post:\n      tags:\n        - Tasks\n      parameters:\n        - name: id\n          in: path\n          required: true\n          schema:\n            type: integer\n            format: int64\n      requestBody:\n        content:\n          application/json;odata.metadata=minimal;odata.streaming=true:\n            schema:\n              $ref: '#/components/schemas/TaskSubmitDto'\n          application/json;odata.metadata=minimal;odata.streaming=false:\n            schema:\n              $ref: '#/components/schemas/TaskSubmitDto'\n          application/json;odata.metadata=minimal:\n            schema:\n              $ref: '#/components/schemas/TaskSubmitDto'\n          application/json;odata.metadata=full;odata.streaming=true:\n            schema:\n              $ref: '#/components/schemas/TaskSubmitDto'\n          application/json;odata.metadata=full;odata.streaming=false:\n            schema:\n              $ref: '#/components/schemas/TaskSubmitDto'\n          application/json;odata.metadata=full:\n            schema:\n              $ref: '#/components/schemas/TaskSubmitDto'\n          application/json;odata.metadata=none;odata.streaming=true:\n            schema:\n              $ref: '#/components/schemas/TaskSubmitDto'\n          application/json;odata.metadata=none;odata.streaming=false:\n            schema:\n              $ref: '#/components/schemas/TaskSubmitDto'\n          application/json;odata.metadata=none:\n            schema:\n              $ref: '#/components/schemas/TaskSubmitDto'\n          application/json;odata.streaming=true:\n            schema:\n              $ref: '#/components/schemas/TaskSubmitDto'\n          application/json;odata.streaming=false:\n            schema:\n              $ref: '#/components/schemas/TaskSubmitDto'\n          application/json:\n            schema:\n              $ref: '#/components/schemas/TaskSubmitDto'\n          application/json;odata.metadata=minimal;odata.streaming=true;IEEE754Compatible=false:\n            schema:\n              $ref: '#/components/schemas/TaskSubmitDto'\n          application/json;odata.metadata=minimal;odata.streaming=true;IEEE754Compatible=true:\n            schema:\n              $ref: '#/components/schemas/TaskSubmitDto'\n          application/json;odata.metadata=minimal;odata.streaming=false;IEEE754Compatible=false:\n            schema:\n              $ref: '#/components/schemas/TaskSubmitDto'\n          application/json;odata.metadata=minimal;odata.streaming=false;IEEE754Compatible=true:\n            schema:\n              $ref: '#/components/schemas/TaskSubmitDto'\n          application/json;odata.metadata=minimal;IEEE754Compatible=false:\n            schema:\n              $ref: '#/components/schemas/TaskSubmitDto'\n          application/json;odata.metadata=minimal;IEEE754Compatible=true:\n            schema:\n              $ref: '#/components/schemas/TaskSubmitDto'\n          application/json;odata.metadata=full;odata.streaming=true;IEEE754Compatible=false:\n            schema:\n              $ref: '#/components/schemas/TaskSubmitDto'\n          application/json;odata.metadata=full;odata.streaming=true;IEEE754Compatible=true:\n            schema:\n              $ref: '#/components/schemas/TaskSubmitDto'\n          application/json;odata.metadata=full;odata.streaming=false;IEEE754Compatible=false:\n            schema:\n              $ref: '#/components/schemas/TaskSubmitDto'\n          application/json;odata.metadata=full;odata.streaming=false;IEEE754Compatible=true:\n            schema:\n              $ref: '#/components/schemas/TaskSubmitDto'\n          application/json;odata.metadata=full;IEEE754Compatible=false:\n            schema:\n              $ref: '#/components/schemas/TaskSubmitDto'\n          application/json;odata.metadata=full;IEEE754Compatible=true:\n            schema:\n              $ref: '#/components/schemas/TaskSubmitDto'\n          application/json;odata.metadata=none;odata.streaming=true;IEEE754Compatible=false:\n            schema:\n              $ref: '#/components/schemas/TaskSubmitDto'\n          application/json;odata.metadata=none;odata.streaming=true;IEEE754Compatible=true:\n            schema:\n              $ref: '#/components/schemas/TaskSubmitDto'\n          application/json;odata.metadata=none;odata.streaming=false;IEEE754Compatible=true:\n            schema:\n              $ref: '#/components/schemas/TaskSubmitDto'\n          application/json;odata.metadata=none;odata.streaming=false;IEEE754Compatible=false:\n            schema:\n              $ref: '#/components/schemas/TaskSubmitDto'\n          application/json;odata.metadata=none;IEEE754Compatible=false:\n            schema:\n              $ref: '#/components/schemas/TaskSubmitDto'\n          application/json;odata.metadata=none;IEEE754Compatible=true:\n            schema:\n              $ref: '#/components/schemas/TaskSubmitDto'\n          application/json;odata.streaming=true;IEEE754Compatible=false:\n            schema:\n              $ref: '#/components/schemas/TaskSubmitDto'\n          application/json;odata.streaming=true;IEEE754Compatible=true:\n            schema:\n              $ref: '#/components/schemas/TaskSubmitDto'\n          application/json;odata.streaming=false;IEEE754Compatible=false:\n            schema:\n              $ref: '#/components/schemas/TaskSubmitDto'\n          application/json;odata.streaming=false;IEEE754Compatible=true:\n            schema:\n              $ref: '#/components/schemas/TaskSubmitDto'\n          application/json;IEEE754Compatible=false:\n            schema:\n              $ref: '#/components/schemas/TaskSubmitDto'\n          application/json;IEEE754Compatible=true:\n            schema:\n              $ref: '#/components/schemas/TaskSubmitDto'\n          application/xml:\n            schema:\n              $ref: '#/components/schemas/TaskSubmitDto'\n          text/plain:\n            schema:\n              $ref: '#/components/schemas/TaskSubmitDto'\n          application/json-patch+json:\n            schema:\n              $ref: '#/components/schemas/TaskSubmitDto'\n          text/json:\n            schema:\n              $ref: '#/components/schemas/TaskSubmitDto'\n          application/*+json:\n            schema:\n              $ref: '#/components/schemas/TaskSubmitDto'\n      responses:\n        '200':\n          description: OK\n          content:\n            application/json;odata.metadata=minimal;odata.streaming=true:\n              schema:\n                $ref: '#/components/schemas/Task'\n            application/json;odata.metadata=minimal;odata.streaming=false:\n              schema:\n                $ref: '#/components/schemas/Task'\n            application/json;odata.metadata=minimal:\n              schema:\n                $ref: '#/components/schemas/Task'\n            application/json;odata.metadata=full;odata.streaming=true:\n              schema:\n                $ref: '#/components/schemas/Task'\n            application/json;odata.metadata=full;odata.streaming=false:\n              schema:\n                $ref: '#/components/schemas/Task'\n            application/json;odata.metadata=full:\n              schema:\n                $ref: '#/components/schemas/Task'\n            application/json;odata.metadata=none;odata.streaming=true:\n              schema:\n                $ref: '#/components/schemas/Task'\n            application/json;odata.metadata=none;odata.streaming=false:\n              schema:\n                $ref: '#/components/schemas/Task'\n            application/json;odata.metadata=none:\n              schema:\n                $ref: '#/components/schemas/Task'\n            application/json;odata.streaming=true:\n              schema:\n                $ref: '#/components/schemas/Task'\n            application/json;odata.streaming=false:\n              schema:\n                $ref: '#/components/schemas/Task'\n            application/json:\n              schema:\n                $ref: '#/components/schemas/Task'\n            application/json;odata.metadata=minimal;odata.streaming=true;IEEE754Compatible=false:\n              schema:\n                $ref: '#/components/schemas/Task'\n            application/json;odata.metadata=minimal;odata.streaming=true;IEEE754Compatible=true:\n              schema:\n                $ref: '#/components/schemas/Task'\n            application/json;odata.metadata=minimal;odata.streaming=false;IEEE754Compatible=false:\n              schema:\n                $ref: '#/components/schemas/Task'\n            application/json;odata.metadata=minimal;odata.streaming=false;IEEE754Compatible=true:\n              schema:\n                $ref: '#/components/schemas/Task'\n            application/json;odata.metadata=minimal;IEEE754Compatible=false:\n              schema:\n                $ref: '#/components/schemas/Task'\n            application/json;odata.metadata=minimal;IEEE754Compatible=true:\n              schema:\n                $ref: '#/components/schemas/Task'\n            application/json;odata.metadata=full;odata.streaming=true;IEEE754Compatible=false:\n              schema:\n                $ref: '#/components/schemas/Task'\n            application/json;odata.metadata=full;odata.streaming=true;IEEE754Compatible=true:\n              schema:\n                $ref: '#/components/schemas/Task'\n            application/json;odata.metadata=full;odata.streaming=false;IEEE754Compatible=false:\n              schema:\n                $ref: '#/components/schemas/Task'\n            application/json;odata.metadata=full;odata.streaming=false;IEEE754Compatible=true:\n              schema:\n                $ref: '#/components/schemas/Task'\n            application/json;odata.metadata=full;IEEE754Compatible=false:\n              schema:\n                $ref: '#/components/schemas/Task'\n            application/json;odata.metadata=full;IEEE754Compatible=true:\n              schema:\n                $ref: '#/components/schemas/Task'\n            application/json;odata.metadata=none;odata.streaming=true;IEEE754Compatible=false:\n              schema:\n                $ref: '#/components/schemas/Task'\n            application/json;odata.metadata=none;odata.streaming=true;IEEE754Compatible=true:\n              schema:\n                $ref: '#/components/schemas/Task'\n            application/json;odata.metadata=none;odata.streaming=false;IEEE754Compatible=true:\n              schema:\n                $ref: '#/components/schemas/Task'\n            application/json;odata.metadata=none;odata.streaming=false;IEEE754Compatible=false:\n              schema:\n                $ref: '#/components/schemas/Task'\n            application/json;odata.metadata=none;IEEE754Compatible=false:\n              schema:\n                $ref: '#/components/schemas/Task'\n            application/json;odata.metadata=none;IEEE754Compatible=true:\n              schema:\n                $ref: '#/components/schemas/Task'\n            application/json;odata.streaming=true;IEEE754Compatible=false:\n              schema:\n                $ref: '#/components/schemas/Task'\n            application/json;odata.streaming=true;IEEE754Compatible=true:\n              schema:\n                $ref: '#/components/schemas/Task'\n            application/json;odata.streaming=false;IEEE754Compatible=false:\n              schema:\n                $ref: '#/components/schemas/Task'\n            application/json;odata.streaming=false;IEEE754Compatible=true:\n              schema:\n                $ref: '#/components/schemas/Task'\n            application/json;IEEE754Compatible=false:\n              schema:\n                $ref: '#/components/schemas/Task'\n            application/json;IEEE754Compatible=true:\n              schema:\n                $ref: '#/components/schemas/Task'\n            application/xml:\n              schema:\n                $ref: '#/components/schemas/Task'\n            text/plain:\n              schema:\n                $ref: '#/components/schemas/Task'\n            application/octet-stream:\n              schema:\n                $ref: '#/components/schemas/Task'\n            text/json:\n              schema:\n                $ref: '#/components/schemas/Task'\n  /api/v1/tasks/{id}/approve:\n    post:\n      tags:\n        - Tasks\n      parameters:\n        - name: id\n          in: path\n          required: true\n          schema:\n            type: integer\n            format: int64\n      responses:\n        '200':\n          description: OK\n          content:\n            application/json;odata.metadata=minimal;odata.streaming=true:\n              schema:\n                $ref: '#/components/schemas/Task'\n            application/json;odata.metadata=minimal;odata.streaming=false:\n              schema:\n                $ref: '#/components/schemas/Task'\n            application/json;odata.metadata=minimal:\n              schema:\n                $ref: '#/components/schemas/Task'\n            application/json;odata.metadata=full;odata.streaming=true:\n              schema:\n                $ref: '#/components/schemas/Task'\n            application/json;odata.metadata=full;odata.streaming=false:\n              schema:\n                $ref: '#/components/schemas/Task'\n            application/json;odata.metadata=full:\n              schema:\n                $ref: '#/components/schemas/Task'\n            application/json;odata.metadata=none;odata.streaming=true:\n              schema:\n                $ref: '#/components/schemas/Task'\n            application/json;odata.metadata=none;odata.streaming=false:\n              schema:\n                $ref: '#/components/schemas/Task'\n            application/json;odata.metadata=none:\n              schema:\n                $ref: '#/components/schemas/Task'\n            application/json;odata.streaming=true:\n              schema:\n                $ref: '#/components/schemas/Task'\n            application/json;odata.streaming=false:\n              schema:\n                $ref: '#/components/schemas/Task'\n            application/json:\n              schema:\n                $ref: '#/components/schemas/Task'\n            application/json;odata.metadata=minimal;odata.streaming=true;IEEE754Compatible=false:\n              schema:\n                $ref: '#/components/schemas/Task'\n            application/json;odata.metadata=minimal;odata.streaming=true;IEEE754Compatible=true:\n              schema:\n                $ref: '#/components/schemas/Task'\n            application/json;odata.metadata=minimal;odata.streaming=false;IEEE754Compatible=false:\n              schema:\n                $ref: '#/components/schemas/Task'\n            application/json;odata.metadata=minimal;odata.streaming=false;IEEE754Compatible=true:\n              schema:\n                $ref: '#/components/schemas/Task'\n            application/json;odata.metadata=minimal;IEEE754Compatible=false:\n              schema:\n                $ref: '#/components/schemas/Task'\n            application/json;odata.metadata=minimal;IEEE754Compatible=true:\n              schema:\n                $ref: '#/components/schemas/Task'\n            application/json;odata.metadata=full;odata.streaming=true;IEEE754Compatible=false:\n              schema:\n                $ref: '#/components/schemas/Task'\n            application/json;odata.metadata=full;odata.streaming=true;IEEE754Compatible=true:\n              schema:\n                $ref: '#/components/schemas/Task'\n            application/json;odata.metadata=full;odata.streaming=false;IEEE754Compatible=false:\n              schema:\n                $ref: '#/components/schemas/Task'\n            application/json;odata.metadata=full;odata.streaming=false;IEEE754Compatible=true:\n              schema:\n                $ref: '#/components/schemas/Task'\n            application/json;odata.metadata=full;IEEE754Compatible=false:\n              schema:\n                $ref: '#/components/schemas/Task'\n            application/json;odata.metadata=full;IEEE754Compatible=true:\n              schema:\n                $ref: '#/components/schemas/Task'\n            application/json;odata.metadata=none;odata.streaming=true;IEEE754Compatible=false:\n              schema:\n                $ref: '#/components/schemas/Task'\n            application/json;odata.metadata=none;odata.streaming=true;IEEE754Compatible=true:\n              schema:\n                $ref: '#/components/schemas/Task'\n            application/json;odata.metadata=none;odata.streaming=false;IEEE754Compatible=true:\n              schema:\n                $ref: '#/components/schemas/Task'\n            application/json;odata.metadata=none;odata.streaming=false;IEEE754Compatible=false:\n              schema:\n                $ref: '#/components/schemas/Task'\n            application/json;odata.metadata=none;IEEE754Compatible=false:\n              schema:\n                $ref: '#/components/schemas/Task'\n            application/json;odata.metadata=none;IEEE754Compatible=true:\n              schema:\n                $ref: '#/components/schemas/Task'\n            application/json;odata.streaming=true;IEEE754Compatible=false:\n              schema:\n                $ref: '#/components/schemas/Task'\n            application/json;odata.streaming=true;IEEE754Compatible=true:\n              schema:\n                $ref: '#/components/schemas/Task'\n            application/json;odata.streaming=false;IEEE754Compatible=false:\n              schema:\n                $ref: '#/components/schemas/Task'\n            application/json;odata.streaming=false;IEEE754Compatible=true:\n              schema:\n                $ref: '#/components/schemas/Task'\n            application/json;IEEE754Compatible=false:\n              schema:\n                $ref: '#/components/schemas/Task'\n            application/json;IEEE754Compatible=true:\n              schema:\n                $ref: '#/components/schemas/Task'\n            application/xml:\n              schema:\n                $ref: '#/components/schemas/Task'\n            text/plain:\n              schema:\n                $ref: '#/components/schemas/Task'\n            application/octet-stream:\n              schema:\n                $ref: '#/components/schemas/Task'\n            text/json:\n              schema:\n                $ref: '#/components/schemas/Task'\n  /api/v1/tasks/{id}/reject:\n    post:\n      tags:\n        - Tasks\n      parameters:\n        - name: id\n          in: path\n          required: true\n          schema:\n            type: integer\n            format: int64\n      requestBody:\n        content:\n          application/json;odata.metadata=minimal;odata.streaming=true:\n            schema:\n              $ref: '#/components/schemas/TaskRejectDto'\n          application/json;odata.metadata=minimal;odata.streaming=false:\n            schema:\n              $ref: '#/components/schemas/TaskRejectDto'\n          application/json;odata.metadata=minimal:\n            schema:\n              $ref: '#/components/schemas/TaskRejectDto'\n          application/json;odata.metadata=full;odata.streaming=true:\n            schema:\n              $ref: '#/components/schemas/TaskRejectDto'\n          application/json;odata.metadata=full;odata.streaming=false:\n            schema:\n              $ref: '#/components/schemas/TaskRejectDto'\n          application/json;odata.metadata=full:\n            schema:\n              $ref: '#/components/schemas/TaskRejectDto'\n          application/json;odata.metadata=none;odata.streaming=true:\n            schema:\n              $ref: '#/components/schemas/TaskRejectDto'\n          application/json;odata.metadata=none;odata.streaming=false:\n            schema:\n              $ref: '#/components/schemas/TaskRejectDto'\n          application/json;odata.metadata=none:\n            schema:\n              $ref: '#/components/schemas/TaskRejectDto'\n          application/json;odata.streaming=true:\n            schema:\n              $ref: '#/components/schemas/TaskRejectDto'\n          application/json;odata.streaming=false:\n            schema:\n              $ref: '#/components/schemas/TaskRejectDto'\n          application/json:\n            schema:\n              $ref: '#/components/schemas/TaskRejectDto'\n          application/json;odata.metadata=minimal;odata.streaming=true;IEEE754Compatible=false:\n            schema:\n              $ref: '#/components/schemas/TaskRejectDto'\n          application/json;odata.metadata=minimal;odata.streaming=true;IEEE754Compatible=true:\n            schema:\n              $ref: '#/components/schemas/TaskRejectDto'\n          application/json;odata.metadata=minimal;odata.streaming=false;IEEE754Compatible=false:\n            schema:\n              $ref: '#/components/schemas/TaskRejectDto'\n          application/json;odata.metadata=minimal;odata.streaming=false;IEEE754Compatible=true:\n            schema:\n              $ref: '#/components/schemas/TaskRejectDto'\n          application/json;odata.metadata=minimal;IEEE754Compatible=false:\n            schema:\n              $ref: '#/components/schemas/TaskRejectDto'\n          application/json;odata.metadata=minimal;IEEE754Compatible=true:\n            schema:\n              $ref: '#/components/schemas/TaskRejectDto'\n          application/json;odata.metadata=full;odata.streaming=true;IEEE754Compatible=false:\n            schema:\n              $ref: '#/components/schemas/TaskRejectDto'\n          application/json;odata.metadata=full;odata.streaming=true;IEEE754Compatible=true:\n            schema:\n              $ref: '#/components/schemas/TaskRejectDto'\n          application/json;odata.metadata=full;odata.streaming=false;IEEE754Compatible=false:\n            schema:\n              $ref: '#/components/schemas/TaskRejectDto'\n          application/json;odata.metadata=full;odata.streaming=false;IEEE754Compatible=true:\n            schema:\n              $ref: '#/components/schemas/TaskRejectDto'\n          application/json;odata.metadata=full;IEEE754Compatible=false:\n            schema:\n              $ref: '#/components/schemas/TaskRejectDto'\n          application/json;odata.metadata=full;IEEE754Compatible=true:\n            schema:\n              $ref: '#/components/schemas/TaskRejectDto'\n          application/json;odata.metadata=none;odata.streaming=true;IEEE754Compatible=false:\n            schema:\n              $ref: '#/components/schemas/TaskRejectDto'\n          application/json;odata.metadata=none;odata.streaming=true;IEEE754Compatible=true:\n            schema:\n              $ref: '#/components/schemas/TaskRejectDto'\n          application/json;odata.metadata=none;odata.streaming=false;IEEE754Compatible=true:\n            schema:\n              $ref: '#/components/schemas/TaskRejectDto'\n          application/json;odata.metadata=none;odata.streaming=false;IEEE754Compatible=false:\n            schema:\n              $ref: '#/components/schemas/TaskRejectDto'\n          application/json;odata.metadata=none;IEEE754Compatible=false:\n            schema:\n              $ref: '#/components/schemas/TaskRejectDto'\n          application/json;odata.metadata=none;IEEE754Compatible=true:\n            schema:\n              $ref: '#/components/schemas/TaskRejectDto'\n          application/json;odata.streaming=true;IEEE754Compatible=false:\n            schema:\n              $ref: '#/components/schemas/TaskRejectDto'\n          application/json;odata.streaming=true;IEEE754Compatible=true:\n            schema:\n              $ref: '#/components/schemas/TaskRejectDto'\n          application/json;odata.streaming=false;IEEE754Compatible=false:\n            schema:\n              $ref: '#/components/schemas/TaskRejectDto'\n          application/json;odata.streaming=false;IEEE754Compatible=true:\n            schema:\n              $ref: '#/components/schemas/TaskRejectDto'\n          application/json;IEEE754Compatible=false:\n            schema:\n              $ref: '#/components/schemas/TaskRejectDto'\n          application/json;IEEE754Compatible=true:\n            schema:\n              $ref: '#/components/schemas/TaskRejectDto'\n          application/xml:\n            schema:\n              $ref: '#/components/schemas/TaskRejectDto'\n          text/plain:\n            schema:\n              $ref: '#/components/schemas/TaskRejectDto'\n          application/json-patch+json:\n            schema:\n              $ref: '#/components/schemas/TaskRejectDto'\n          text/json:\n            schema:\n              $ref: '#/components/schemas/TaskRejectDto'\n          application/*+json:\n            schema:\n              $ref: '#/components/schemas/TaskRejectDto'\n      responses:\n        '200':\n          description: OK\n          content:\n            application/json;odata.metadata=minimal;odata.streaming=true:\n              schema:\n                $ref: '#/components/schemas/Task'\n            application/json;odata.metadata=minimal;odata.streaming=false:\n              schema:\n                $ref: '#/components/schemas/Task'\n            application/json;odata.metadata=minimal:\n              schema:\n                $ref: '#/components/schemas/Task'\n            application/json;odata.metadata=full;odata.streaming=true:\n              schema:\n                $ref: '#/components/schemas/Task'\n            application/json;odata.metadata=full;odata.streaming=false:\n              schema:\n                $ref: '#/components/schemas/Task'\n            application/json;odata.metadata=full:\n              schema:\n                $ref: '#/components/schemas/Task'\n            application/json;odata.metadata=none;odata.streaming=true:\n              schema:\n                $ref: '#/components/schemas/Task'\n            application/json;odata.metadata=none;odata.streaming=false:\n              schema:\n                $ref: '#/components/schemas/Task'\n            application/json;odata.metadata=none:\n              schema:\n                $ref: '#/components/schemas/Task'\n            application/json;odata.streaming=true:\n              schema:\n                $ref: '#/components/schemas/Task'\n            application/json;odata.streaming=false:\n              schema:\n                $ref: '#/components/schemas/Task'\n            application/json:\n              schema:\n                $ref: '#/components/schemas/Task'\n            application/json;odata.metadata=minimal;odata.streaming=true;IEEE754Compatible=false:\n              schema:\n                $ref: '#/components/schemas/Task'\n            application/json;odata.metadata=minimal;odata.streaming=true;IEEE754Compatible=true:\n              schema:\n                $ref: '#/components/schemas/Task'\n            application/json;odata.metadata=minimal;odata.streaming=false;IEEE754Compatible=false:\n              schema:\n                $ref: '#/components/schemas/Task'\n            application/json;odata.metadata=minimal;odata.streaming=false;IEEE754Compatible=true:\n              schema:\n                $ref: '#/components/schemas/Task'\n            application/json;odata.metadata=minimal;IEEE754Compatible=false:\n              schema:\n                $ref: '#/components/schemas/Task'\n            application/json;odata.metadata=minimal;IEEE754Compatible=true:\n              schema:\n                $ref: '#/components/schemas/Task'\n            application/json;odata.metadata=full;odata.streaming=true;IEEE754Compatible=false:\n              schema:\n                $ref: '#/components/schemas/Task'\n            application/json;odata.metadata=full;odata.streaming=true;IEEE754Compatible=true:\n              schema:\n                $ref: '#/components/schemas/Task'\n            application/json;odata.metadata=full;odata.streaming=false;IEEE754Compatible=false:\n              schema:\n                $ref: '#/components/schemas/Task'\n            application/json;odata.metadata=full;odata.streaming=false;IEEE754Compatible=true:\n              schema:\n                $ref: '#/components/schemas/Task'\n            application/json;odata.metadata=full;IEEE754Compatible=false:\n              schema:\n                $ref: '#/components/schemas/Task'\n            application/json;odata.metadata=full;IEEE754Compatible=true:\n              schema:\n                $ref: '#/components/schemas/Task'\n            application/json;odata.metadata=none;odata.streaming=true;IEEE754Compatible=false:\n              schema:\n                $ref: '#/components/schemas/Task'\n            application/json;odata.metadata=none;odata.streaming=true;IEEE754Compatible=true:\n              schema:\n                $ref: '#/components/schemas/Task'\n            application/json;odata.metadata=none;odata.streaming=false;IEEE754Compatible=true:\n              schema:\n                $ref: '#/components/schemas/Task'\n            application/json;odata.metadata=none;odata.streaming=false;IEEE754Compatible=false:\n              schema:\n                $ref: '#/components/schemas/Task'\n            application/json;odata.metadata=none;IEEE754Compatible=false:\n              schema:\n                $ref: '#/components/schemas/Task'\n            application/json;odata.metadata=none;IEEE754Compatible=true:\n              schema:\n                $ref: '#/components/schemas/Task'\n            application/json;odata.streaming=true;IEEE754Compatible=false:\n              schema:\n                $ref: '#/components/schemas/Task'\n            application/json;odata.streaming=true;IEEE754Compatible=true:\n              schema:\n                $ref: '#/components/schemas/Task'\n            application/json;odata.streaming=false;IEEE754Compatible=false:\n              schema:\n                $ref: '#/components/schemas/Task'\n            application/json;odata.streaming=false;IEEE754Compatible=true:\n              schema:\n                $ref: '#/components/schemas/Task'\n            application/json;IEEE754Compatible=false:\n              schema:\n                $ref: '#/components/schemas/Task'\n            application/json;IEEE754Compatible=true:\n              schema:\n                $ref: '#/components/schemas/Task'\n            application/xml:\n              schema:\n                $ref: '#/components/schemas/Task'\n            text/plain:\n              schema:\n                $ref: '#/components/schemas/Task'\n            application/octet-stream:\n              schema:\n                $ref: '#/components/schemas/Task'\n            text/json:\n              schema:\n                $ref: '#/components/schemas/Task'\n  /api/v1/tasks/{id}/comments:\n    get:\n      tags:\n        - Tasks\n      parameters:\n        - name: id\n          in: path\n          required: true\n          schema:\n            type: integer\n            format: int64\n      responses:\n        '200':\n          description: OK\n          content:\n            application/json;odata.metadata=minimal;odata.streaming=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/TaskComment'\n            application/json;odata.metadata=minimal;odata.streaming=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/TaskComment'\n            application/json;odata.metadata=minimal:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/TaskComment'\n            application/json;odata.metadata=full;odata.streaming=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/TaskComment'\n            application/json;odata.metadata=full;odata.streaming=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/TaskComment'\n            application/json;odata.metadata=full:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/TaskComment'\n            application/json;odata.metadata=none;odata.streaming=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/TaskComment'\n            application/json;odata.metadata=none;odata.streaming=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/TaskComment'\n            application/json;odata.metadata=none:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/TaskComment'\n            application/json;odata.streaming=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/TaskComment'\n            application/json;odata.streaming=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/TaskComment'\n            application/json:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/TaskComment'\n            application/json;odata.metadata=minimal;odata.streaming=true;IEEE754Compatible=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/TaskComment'\n            application/json;odata.metadata=minimal;odata.streaming=true;IEEE754Compatible=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/TaskComment'\n            application/json;odata.metadata=minimal;odata.streaming=false;IEEE754Compatible=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/TaskComment'\n            application/json;odata.metadata=minimal;odata.streaming=false;IEEE754Compatible=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/TaskComment'\n            application/json;odata.metadata=minimal;IEEE754Compatible=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/TaskComment'\n            application/json;odata.metadata=minimal;IEEE754Compatible=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/TaskComment'\n            application/json;odata.metadata=full;odata.streaming=true;IEEE754Compatible=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/TaskComment'\n            application/json;odata.metadata=full;odata.streaming=true;IEEE754Compatible=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/TaskComment'\n            application/json;odata.metadata=full;odata.streaming=false;IEEE754Compatible=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/TaskComment'\n            application/json;odata.metadata=full;odata.streaming=false;IEEE754Compatible=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/TaskComment'\n            application/json;odata.metadata=full;IEEE754Compatible=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/TaskComment'\n            application/json;odata.metadata=full;IEEE754Compatible=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/TaskComment'\n            application/json;odata.metadata=none;odata.streaming=true;IEEE754Compatible=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/TaskComment'\n            application/json;odata.metadata=none;odata.streaming=true;IEEE754Compatible=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/TaskComment'\n            application/json;odata.metadata=none;odata.streaming=false;IEEE754Compatible=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/TaskComment'\n            application/json;odata.metadata=none;odata.streaming=false;IEEE754Compatible=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/TaskComment'\n            application/json;odata.metadata=none;IEEE754Compatible=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/TaskComment'\n            application/json;odata.metadata=none;IEEE754Compatible=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/TaskComment'\n            application/json;odata.streaming=true;IEEE754Compatible=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/TaskComment'\n            application/json;odata.streaming=true;IEEE754Compatible=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/TaskComment'\n            application/json;odata.streaming=false;IEEE754Compatible=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/TaskComment'\n            application/json;odata.streaming=false;IEEE754Compatible=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/TaskComment'\n            application/json;IEEE754Compatible=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/TaskComment'\n            application/json;IEEE754Compatible=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/TaskComment'\n            application/xml:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/TaskComment'\n            text/plain:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/TaskComment'\n            application/octet-stream:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/TaskComment'\n            text/json:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/TaskComment'\n  /api/v1/tasks/{id}/documents:\n    get:\n      tags:\n        - Tasks\n      parameters:\n        - name: id\n          in: path\n          required: true\n          schema:\n            type: integer\n            format: int64\n      responses:\n        '200':\n          description: OK\n          content:\n            application/json;odata.metadata=minimal;odata.streaming=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/DocumentBusiness'\n            application/json;odata.metadata=minimal;odata.streaming=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/DocumentBusiness'\n            application/json;odata.metadata=minimal:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/DocumentBusiness'\n            application/json;odata.metadata=full;odata.streaming=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/DocumentBusiness'\n            application/json;odata.metadata=full;odata.streaming=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/DocumentBusiness'\n            application/json;odata.metadata=full:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/DocumentBusiness'\n            application/json;odata.metadata=none;odata.streaming=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/DocumentBusiness'\n            application/json;odata.metadata=none;odata.streaming=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/DocumentBusiness'\n            application/json;odata.metadata=none:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/DocumentBusiness'\n            application/json;odata.streaming=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/DocumentBusiness'\n            application/json;odata.streaming=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/DocumentBusiness'\n            application/json:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/DocumentBusiness'\n            application/json;odata.metadata=minimal;odata.streaming=true;IEEE754Compatible=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/DocumentBusiness'\n            application/json;odata.metadata=minimal;odata.streaming=true;IEEE754Compatible=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/DocumentBusiness'\n            application/json;odata.metadata=minimal;odata.streaming=false;IEEE754Compatible=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/DocumentBusiness'\n            application/json;odata.metadata=minimal;odata.streaming=false;IEEE754Compatible=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/DocumentBusiness'\n            application/json;odata.metadata=minimal;IEEE754Compatible=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/DocumentBusiness'\n            application/json;odata.metadata=minimal;IEEE754Compatible=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/DocumentBusiness'\n            application/json;odata.metadata=full;odata.streaming=true;IEEE754Compatible=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/DocumentBusiness'\n            application/json;odata.metadata=full;odata.streaming=true;IEEE754Compatible=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/DocumentBusiness'\n            application/json;odata.metadata=full;odata.streaming=false;IEEE754Compatible=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/DocumentBusiness'\n            application/json;odata.metadata=full;odata.streaming=false;IEEE754Compatible=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/DocumentBusiness'\n            application/json;odata.metadata=full;IEEE754Compatible=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/DocumentBusiness'\n            application/json;odata.metadata=full;IEEE754Compatible=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/DocumentBusiness'\n            application/json;odata.metadata=none;odata.streaming=true;IEEE754Compatible=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/DocumentBusiness'\n            application/json;odata.metadata=none;odata.streaming=true;IEEE754Compatible=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/DocumentBusiness'\n            application/json;odata.metadata=none;odata.streaming=false;IEEE754Compatible=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/DocumentBusiness'\n            application/json;odata.metadata=none;odata.streaming=false;IEEE754Compatible=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/DocumentBusiness'\n            application/json;odata.metadata=none;IEEE754Compatible=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/DocumentBusiness'\n            application/json;odata.metadata=none;IEEE754Compatible=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/DocumentBusiness'\n            application/json;odata.streaming=true;IEEE754Compatible=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/DocumentBusiness'\n            application/json;odata.streaming=true;IEEE754Compatible=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/DocumentBusiness'\n            application/json;odata.streaming=false;IEEE754Compatible=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/DocumentBusiness'\n            application/json;odata.streaming=false;IEEE754Compatible=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/DocumentBusiness'\n            application/json;IEEE754Compatible=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/DocumentBusiness'\n            application/json;IEEE754Compatible=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/DocumentBusiness'\n            application/xml:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/DocumentBusiness'\n            text/plain:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/DocumentBusiness'\n            application/octet-stream:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/DocumentBusiness'\n            text/json:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/DocumentBusiness'\n  /api/v1/odata/Tasks:\n    get:\n      tags:\n        - Tasks\n      operationId: api/v{version:apiVersion}/odata/Tasks\n      parameters:\n        - name: accountants\n          in: query\n          schema:\n            type: array\n            items:\n              type: integer\n              format: int32\n        - name: select\n          in: query\n          description: Limits the properties returned in the result.\n          schema:\n            type: string\n        - name: expand\n          in: query\n          description: Indicates the related entities to be represented inline. The\n            maximum depth is 2.\n          schema:\n            type: string\n        - name: filter\n          in: query\n          description: 'Restricts the set of items returned. The maximum number of\n            expressions is 100. The allowed functions are: allfunctions.'\n          schema:\n            type: string\n        - name: orderby\n          in: query\n          description: Specifies the order in which items are returned. The maximum number\n            of expressions is 5.\n          schema:\n            type: string\n        - name: top\n          in: query\n          description: Limits the number of items returned from a collection. The maximum\n            value is 100.\n          schema:\n            type: integer\n            format: int32\n        - name: skip\n          in: query\n          description: Excludes the specified number of items of the queried collection\n            from the result.\n          schema:\n            type: integer\n            format: int32\n        - name: count\n          in: query\n          description: Indicates whether the total count of items within a collection are\n            returned in the result.\n          schema:\n            type: boolean\n            default: false\n      responses:\n        '200':\n          description: OK\n          content:\n            application/json;odata.metadata=minimal;odata.streaming=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/Task'\n            application/json;odata.metadata=minimal;odata.streaming=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/Task'\n            application/json;odata.metadata=minimal:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/Task'\n            application/json;odata.metadata=full;odata.streaming=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/Task'\n            application/json;odata.metadata=full;odata.streaming=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/Task'\n            application/json;odata.metadata=full:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/Task'\n            application/json;odata.metadata=none;odata.streaming=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/Task'\n            application/json;odata.metadata=none;odata.streaming=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/Task'\n            application/json;odata.metadata=none:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/Task'\n            application/json;odata.streaming=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/Task'\n            application/json;odata.streaming=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/Task'\n            application/json:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/Task'\n            application/json;odata.metadata=minimal;odata.streaming=true;IEEE754Compatible=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/Task'\n            application/json;odata.metadata=minimal;odata.streaming=true;IEEE754Compatible=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/Task'\n            application/json;odata.metadata=minimal;odata.streaming=false;IEEE754Compatible=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/Task'\n            application/json;odata.metadata=minimal;odata.streaming=false;IEEE754Compatible=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/Task'\n            application/json;odata.metadata=minimal;IEEE754Compatible=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/Task'\n            application/json;odata.metadata=minimal;IEEE754Compatible=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/Task'\n            application/json;odata.metadata=full;odata.streaming=true;IEEE754Compatible=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/Task'\n            application/json;odata.metadata=full;odata.streaming=true;IEEE754Compatible=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/Task'\n            application/json;odata.metadata=full;odata.streaming=false;IEEE754Compatible=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/Task'\n            application/json;odata.metadata=full;odata.streaming=false;IEEE754Compatible=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/Task'\n            application/json;odata.metadata=full;IEEE754Compatible=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/Task'\n            application/json;odata.metadata=full;IEEE754Compatible=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/Task'\n            application/json;odata.metadata=none;odata.streaming=true;IEEE754Compatible=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/Task'\n            application/json;odata.metadata=none;odata.streaming=true;IEEE754Compatible=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/Task'\n            application/json;odata.metadata=none;odata.streaming=false;IEEE754Compatible=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/Task'\n            application/json;odata.metadata=none;odata.streaming=false;IEEE754Compatible=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/Task'\n            application/json;odata.metadata=none;IEEE754Compatible=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/Task'\n            application/json;odata.metadata=none;IEEE754Compatible=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/Task'\n            application/json;odata.streaming=true;IEEE754Compatible=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/Task'\n            application/json;odata.streaming=true;IEEE754Compatible=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/Task'\n            application/json;odata.streaming=false;IEEE754Compatible=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/Task'\n            application/json;odata.streaming=false;IEEE754Compatible=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/Task'\n            application/json;IEEE754Compatible=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/Task'\n            application/json;IEEE754Compatible=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/Task'\n            application/xml:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/Task'\n            text/plain:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/Task'\n            application/octet-stream:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/Task'\n            text/json:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/Task'\n  /api/v1/odata/Tasks/$count:\n    get:\n      tags:\n        - Tasks\n      operationId: api/v{version:apiVersion}/odata/Tasks/$count\n      parameters:\n        - name: accountants\n          in: query\n          schema:\n            type: array\n            items:\n              type: integer\n              format: int32\n        - name: select\n          in: query\n          description: Limits the properties returned in the result.\n          schema:\n            type: string\n        - name: expand\n          in: query\n          description: Indicates the related entities to be represented inline. The\n            maximum depth is 2.\n          schema:\n            type: string\n        - name: filter\n          in: query\n          description: 'Restricts the set of items returned. The maximum number of\n            expressions is 100. The allowed functions are: allfunctions.'\n          schema:\n            type: string\n        - name: orderby\n          in: query\n          description: Specifies the order in which items are returned. The maximum number\n            of expressions is 5.\n          schema:\n            type: string\n        - name: top\n          in: query\n          description: Limits the number of items returned from a collection. The maximum\n            value is 100.\n          schema:\n            type: integer\n            format: int32\n        - name: skip\n          in: query\n          description: Excludes the specified number of items of the queried collection\n            from the result.\n          schema:\n            type: integer\n            format: int32\n        - name: count\n          in: query\n          description: Indicates whether the total count of items within a collection are\n            returned in the result.\n          schema:\n            type: boolean\n            default: false\n      responses:\n        '200':\n          description: OK\n          content:\n            application/json;odata.metadata=minimal;odata.streaming=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/Task'\n            application/json;odata.metadata=minimal;odata.streaming=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/Task'\n            application/json;odata.metadata=minimal:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/Task'\n            application/json;odata.metadata=full;odata.streaming=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/Task'\n            application/json;odata.metadata=full;odata.streaming=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/Task'\n            application/json;odata.metadata=full:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/Task'\n            application/json;odata.metadata=none;odata.streaming=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/Task'\n            application/json;odata.metadata=none;odata.streaming=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/Task'\n            application/json;odata.metadata=none:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/Task'\n            application/json;odata.streaming=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/Task'\n            application/json;odata.streaming=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/Task'\n            application/json:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/Task'\n            application/json;odata.metadata=minimal;odata.streaming=true;IEEE754Compatible=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/Task'\n            application/json;odata.metadata=minimal;odata.streaming=true;IEEE754Compatible=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/Task'\n            application/json;odata.metadata=minimal;odata.streaming=false;IEEE754Compatible=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/Task'\n            application/json;odata.metadata=minimal;odata.streaming=false;IEEE754Compatible=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/Task'\n            application/json;odata.metadata=minimal;IEEE754Compatible=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/Task'\n            application/json;odata.metadata=minimal;IEEE754Compatible=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/Task'\n            application/json;odata.metadata=full;odata.streaming=true;IEEE754Compatible=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/Task'\n            application/json;odata.metadata=full;odata.streaming=true;IEEE754Compatible=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/Task'\n            application/json;odata.metadata=full;odata.streaming=false;IEEE754Compatible=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/Task'\n            application/json;odata.metadata=full;odata.streaming=false;IEEE754Compatible=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/Task'\n            application/json;odata.metadata=full;IEEE754Compatible=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/Task'\n            application/json;odata.metadata=full;IEEE754Compatible=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/Task'\n            application/json;odata.metadata=none;odata.streaming=true;IEEE754Compatible=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/Task'\n            application/json;odata.metadata=none;odata.streaming=true;IEEE754Compatible=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/Task'\n            application/json;odata.metadata=none;odata.streaming=false;IEEE754Compatible=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/Task'\n            application/json;odata.metadata=none;odata.streaming=false;IEEE754Compatible=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/Task'\n            application/json;odata.metadata=none;IEEE754Compatible=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/Task'\n            application/json;odata.metadata=none;IEEE754Compatible=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/Task'\n            application/json;odata.streaming=true;IEEE754Compatible=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/Task'\n            application/json;odata.streaming=true;IEEE754Compatible=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/Task'\n            application/json;odata.streaming=false;IEEE754Compatible=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/Task'\n            application/json;odata.streaming=false;IEEE754Compatible=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/Task'\n            application/json;IEEE754Compatible=false:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/Task'\n            application/json;IEEE754Compatible=true:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/Task'\n            application/xml:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/Task'\n            text/plain:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/Task'\n            application/octet-stream:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/Task'\n            text/json:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/Task'\n  /api/v1/odata/Tasks({key}):\n    get:\n      tags:\n        - Tasks\n      operationId: api/v{version:apiVersion}/odata/Tasks({key})\n      parameters:\n        - name: key\n          in: query\n          schema:\n            type: integer\n            format: int32\n        - name: select\n          in: query\n          description: Limits the properties returned in the result.\n          schema:\n            type: string\n        - name: expand\n          in: query\n          description: Indicates the related entities to be represented inline. The\n            maximum depth is 2.\n          schema:\n            type: string\n      responses:\n        '200':\n          description: OK\n          content:\n            application/json;odata.metadata=minimal;odata.streaming=true:\n              schema:\n                $ref: '#/components/schemas/Task'\n            application/json;odata.metadata=minimal;odata.streaming=false:\n              schema:\n                $ref: '#/components/schemas/Task'\n            application/json;odata.metadata=minimal:\n              schema:\n                $ref: '#/components/schemas/Task'\n            application/json;odata.metadata=full;odata.streaming=true:\n              schema:\n                $ref: '#/components/schemas/Task'\n            application/json;odata.metadata=full;odata.streaming=false:\n              schema:\n                $ref: '#/components/schemas/Task'\n            application/json;odata.metadata=full:\n              schema:\n                $ref: '#/components/schemas/Task'\n            application/json;odata.metadata=none;odata.streaming=true:\n              schema:\n                $ref: '#/components/schemas/Task'\n            application/json;odata.metadata=none;odata.streaming=false:\n              schema:\n                $ref: '#/components/schemas/Task'\n            application/json;odata.metadata=none:\n              schema:\n                $ref: '#/components/schemas/Task'\n            application/json;odata.streaming=true:\n              schema:\n                $ref: '#/components/schemas/Task'\n            application/json;odata.streaming=false:\n              schema:\n                $ref: '#/components/schemas/Task'\n            application/json:\n              schema:\n                $ref: '#/components/schemas/Task'\n            application/json;odata.metadata=minimal;odata.streaming=true;IEEE754Compatible=false:\n              schema:\n                $ref: '#/components/schemas/Task'\n            application/json;odata.metadata=minimal;odata.streaming=true;IEEE754Compatible=true:\n              schema:\n                $ref: '#/components/schemas/Task'\n            application/json;odata.metadata=minimal;odata.streaming=false;IEEE754Compatible=false:\n              schema:\n                $ref: '#/components/schemas/Task'\n            application/json;odata.metadata=minimal;odata.streaming=false;IEEE754Compatible=true:\n              schema:\n                $ref: '#/components/schemas/Task'\n            application/json;odata.metadata=minimal;IEEE754Compatible=false:\n              schema:\n                $ref: '#/components/schemas/Task'\n            application/json;odata.metadata=minimal;IEEE754Compatible=true:\n              schema:\n                $ref: '#/components/schemas/Task'\n            application/json;odata.metadata=full;odata.streaming=true;IEEE754Compatible=false:\n              schema:\n                $ref: '#/components/schemas/Task'\n            application/json;odata.metadata=full;odata.streaming=true;IEEE754Compatible=true:\n              schema:\n                $ref: '#/components/schemas/Task'\n            application/json;odata.metadata=full;odata.streaming=false;IEEE754Compatible=false:\n              schema:\n                $ref: '#/components/schemas/Task'\n            application/json;odata.metadata=full;odata.streaming=false;IEEE754Compatible=true:\n              schema:\n                $ref: '#/components/schemas/Task'\n            application/json;odata.metadata=full;IEEE754Compatible=false:\n              schema:\n                $ref: '#/components/schemas/Task'\n            application/json;odata.metadata=full;IEEE754Compatible=true:\n              schema:\n                $ref: '#/components/schemas/Task'\n            application/json;odata.metadata=none;odata.streaming=true;IEEE754Compatible=false:\n              schema:\n                $ref: '#/components/schemas/Task'\n            application/json;odata.metadata=none;odata.streaming=true;IEEE754Compatible=true:\n              schema:\n                $ref: '#/components/schemas/Task'\n            application/json;odata.metadata=none;odata.streaming=false;IEEE754Compatible=true:\n              schema:\n                $ref: '#/components/schemas/Task'\n            application/json;odata.metadata=none;odata.streaming=false;IEEE754Compatible=false:\n              schema:\n                $ref: '#/components/schemas/Task'\n            application/json;odata.metadata=none;IEEE754Compatible=false:\n              schema:\n                $ref: '#/components/schemas/Task'\n            application/json;odata.metadata=none;IEEE754Compatible=true:\n              schema:\n                $ref: '#/components/schemas/Task'\n            application/json;odata.streaming=true;IEEE754Compatible=false:\n              schema:\n                $ref: '#/components/schemas/Task'\n            application/json;odata.streaming=true;IEEE754Compatible=true:\n              schema:\n                $ref: '#/components/schemas/Task'\n            application/json;odata.streaming=false;IEEE754Compatible=false:\n              schema:\n                $ref: '#/components/schemas/Task'\n            application/json;odata.streaming=false;IEEE754Compatible=true:\n              schema:\n                $ref: '#/components/schemas/Task'\n            application/json;IEEE754Compatible=false:\n              schema:\n                $ref: '#/components/schemas/Task'\n            application/json;IEEE754Compatible=true:\n              schema:\n                $ref: '#/components/schemas/Task'\n            application/xml:\n              schema:\n                $ref: '#/components/schemas/Task'\n            text/plain:\n              schema:\n                $ref: '#/components/schemas/Task'\n            application/octet-stream:\n              schema:\n                $ref: '#/components/schemas/Task'\n            text/json:\n              schema:\n                $ref: '#/components/schemas/Task'\n  /api/v1/odata/Tasks/{key}:\n    get:\n      tags:\n        - Tasks\n      operationId: api/v{version:apiVersion}/odata/Tasks/{key}\n      parameters:\n        - name: key\n          in: query\n          schema:\n            type: integer\n            format: int32\n        - name: select\n          in: query\n          description: Limits the properties returned in the result.\n          schema:\n            type: string\n        - name: expand\n          in: query\n          description: Indicates the related entities to be represented inline. The\n            maximum depth is 2.\n          schema:\n            type: string\n      responses:\n        '200':\n          description: OK\n          content:\n            application/json;odata.metadata=minimal;odata.streaming=true:\n              schema:\n                $ref: '#/components/schemas/Task'\n            application/json;odata.metadata=minimal;odata.streaming=false:\n              schema:\n                $ref: '#/components/schemas/Task'\n            application/json;odata.metadata=minimal:\n              schema:\n                $ref: '#/components/schemas/Task'\n            application/json;odata.metadata=full;odata.streaming=true:\n              schema:\n                $ref: '#/components/schemas/Task'\n            application/json;odata.metadata=full;odata.streaming=false:\n              schema:\n                $ref: '#/components/schemas/Task'\n            application/json;odata.metadata=full:\n              schema:\n                $ref: '#/components/schemas/Task'\n            application/json;odata.metadata=none;odata.streaming=true:\n              schema:\n                $ref: '#/components/schemas/Task'\n            application/json;odata.metadata=none;odata.streaming=false:\n              schema:\n                $ref: '#/components/schemas/Task'\n            application/json;odata.metadata=none:\n              schema:\n                $ref: '#/components/schemas/Task'\n            application/json;odata.streaming=true:\n              schema:\n                $ref: '#/components/schemas/Task'\n            application/json;odata.streaming=false:\n              schema:\n                $ref: '#/components/schemas/Task'\n            application/json:\n              schema:\n                $ref: '#/components/schemas/Task'\n            application/json;odata.metadata=minimal;odata.streaming=true;IEEE754Compatible=false:\n              schema:\n                $ref: '#/components/schemas/Task'\n            application/json;odata.metadata=minimal;odata.streaming=true;IEEE754Compatible=true:\n              schema:\n                $ref: '#/components/schemas/Task'\n            application/json;odata.metadata=minimal;odata.streaming=false;IEEE754Compatible=false:\n              schema:\n                $ref: '#/components/schemas/Task'\n            application/json;odata.metadata=minimal;odata.streaming=false;IEEE754Compatible=true:\n              schema:\n                $ref: '#/components/schemas/Task'\n            application/json;odata.metadata=minimal;IEEE754Compatible=false:\n              schema:\n                $ref: '#/components/schemas/Task'\n            application/json;odata.metadata=minimal;IEEE754Compatible=true:\n              schema:\n                $ref: '#/components/schemas/Task'\n            application/json;odata.metadata=full;odata.streaming=true;IEEE754Compatible=false:\n              schema:\n                $ref: '#/components/schemas/Task'\n            application/json;odata.metadata=full;odata.streaming=true;IEEE754Compatible=true:\n              schema:\n                $ref: '#/components/schemas/Task'\n            application/json;odata.metadata=full;odata.streaming=false;IEEE754Compatible=false:\n              schema:\n                $ref: '#/components/schemas/Task'\n            application/json;odata.metadata=full;odata.streaming=false;IEEE754Compatible=true:\n              schema:\n                $ref: '#/components/schemas/Task'\n            application/json;odata.metadata=full;IEEE754Compatible=false:\n              schema:\n                $ref: '#/components/schemas/Task'\n            application/json;odata.metadata=full;IEEE754Compatible=true:\n              schema:\n                $ref: '#/components/schemas/Task'\n            application/json;odata.metadata=none;odata.streaming=true;IEEE754Compatible=false:\n              schema:\n                $ref: '#/components/schemas/Task'\n            application/json;odata.metadata=none;odata.streaming=true;IEEE754Compatible=true:\n              schema:\n                $ref: '#/components/schemas/Task'\n            application/json;odata.metadata=none;odata.streaming=false;IEEE754Compatible=true:\n              schema:\n                $ref: '#/components/schemas/Task'\n            application/json;odata.metadata=none;odata.streaming=false;IEEE754Compatible=false:\n              schema:\n                $ref: '#/components/schemas/Task'\n            application/json;odata.metadata=none;IEEE754Compatible=false:\n              schema:\n                $ref: '#/components/schemas/Task'\n            application/json;odata.metadata=none;IEEE754Compatible=true:\n              schema:\n                $ref: '#/components/schemas/Task'\n            application/json;odata.streaming=true;IEEE754Compatible=false:\n              schema:\n                $ref: '#/components/schemas/Task'\n            application/json;odata.streaming=true;IEEE754Compatible=true:\n              schema:\n                $ref: '#/components/schemas/Task'\n            application/json;odata.streaming=false;IEEE754Compatible=false:\n              schema:\n                $ref: '#/components/schemas/Task'\n            application/json;odata.streaming=false;IEEE754Compatible=true:\n              schema:\n                $ref: '#/components/schemas/Task'\n            application/json;IEEE754Compatible=false:\n              schema:\n                $ref: '#/components/schemas/Task'\n            application/json;IEEE754Compatible=true:\n              schema:\n                $ref: '#/components/schemas/Task'\n            application/xml:\n              schema:\n                $ref: '#/components/schemas/Task'\n            text/plain:\n              schema:\n                $ref: '#/components/schemas/Task'\n            application/octet-stream:\n              schema:\n                $ref: '#/components/schemas/Task'\n            text/json:\n              schema:\n                $ref: '#/components/schemas/Task'\n  /api/v1/user/register:\n    post:\n      tags:\n        - User\n      requestBody:\n        content:\n          application/json:\n            schema:\n              $ref: '#/components/schemas/RegisterRequest'\n        required: true\n      responses:\n        '200':\n          description: OK\n        '400':\n          description: Bad Request\n          content:\n            application/problem+json:\n              schema:\n                $ref: '#/components/schemas/HttpValidationProblemDetails'\n  /api/v1/user/login:\n    post:\n      tags:\n        - User\n      parameters:\n        - name: useCookies\n          in: query\n          schema:\n            type: boolean\n        - name: useSessionCookies\n          in: query\n          schema:\n            type: boolean\n      requestBody:\n        content:\n          application/json:\n            schema:\n              $ref: '#/components/schemas/LoginRequest'\n        required: true\n      responses:\n        '200':\n          description: OK\n          content:\n            application/json:\n              schema:\n                $ref: '#/components/schemas/AccessTokenResponse'\n  /api/v1/user/refresh:\n    post:\n      tags:\n        - User\n      requestBody:\n        content:\n          application/json:\n            schema:\n              $ref: '#/components/schemas/RefreshRequest'\n        required: true\n      responses:\n        '200':\n          description: OK\n          content:\n            application/json:\n              schema:\n                $ref: '#/components/schemas/AccessTokenResponse'\n  /api/v1/user/confirmEmail:\n    get:\n      tags:\n        - User\n      operationId: MapIdentityApi-/api/v{version:apiVersion}/user/confirmEmail\n      parameters:\n        - name: userId\n          in: query\n          required: true\n          schema:\n            type: string\n        - name: code\n          in: query\n          required: true\n          schema:\n            type: string\n        - name: changedEmail\n          in: query\n          schema:\n            type: string\n      responses:\n        '200':\n          description: OK\n  /api/v1/user/resendConfirmationEmail:\n    post:\n      tags:\n        - User\n      requestBody:\n        content:\n          application/json:\n            schema:\n              $ref: '#/components/schemas/ResendConfirmationEmailRequest'\n        required: true\n      responses:\n        '200':\n          description: OK\n  /api/v1/user/forgotPassword:\n    post:\n      tags:\n        - User\n      requestBody:\n        content:\n          application/json:\n            schema:\n              $ref: '#/components/schemas/ForgotPasswordRequest'\n        required: true\n      responses:\n        '200':\n          description: OK\n        '400':\n          description: Bad Request\n          content:\n            application/problem+json:\n              schema:\n                $ref: '#/components/schemas/HttpValidationProblemDetails'\n  /api/v1/user/resetPassword:\n    post:\n      tags:\n        - User\n      requestBody:\n        content:\n          application/json:\n            schema:\n              $ref: '#/components/schemas/ResetPasswordRequest'\n        required: true\n      responses:\n        '200':\n          description: OK\n        '400':\n          description: Bad Request\n          content:\n            application/problem+json:\n              schema:\n                $ref: '#/components/schemas/HttpValidationProblemDetails'\n  /api/v1/user/manage/2fa:\n    post:\n      tags:\n        - User\n      requestBody:\n        content:\n          application/json:\n            schema:\n              $ref: '#/components/schemas/TwoFactorRequest'\n        required: true\n      responses:\n        '200':\n          description: OK\n          content:\n            application/json:\n              schema:\n                $ref: '#/components/schemas/TwoFactorResponse'\n        '400':\n          description: Bad Request\n          content:\n            application/problem+json:\n              schema:\n                $ref: '#/components/schemas/HttpValidationProblemDetails'\n        '404':\n          description: Not Found\n  /api/v1/user/manage/info:\n    get:\n      tags:\n        - User\n      responses:\n        '200':\n          description: OK\n          content:\n            application/json:\n              schema:\n                $ref: '#/components/schemas/InfoResponse'\n        '400':\n          description: Bad Request\n          content:\n            application/problem+json:\n              schema:\n                $ref: '#/components/schemas/HttpValidationProblemDetails'\n        '404':\n          description: Not Found\n    post:\n      tags:\n        - User\n      requestBody:\n        content:\n          application/json:\n            schema:\n              $ref: '#/components/schemas/InfoRequest'\n        required: true\n      responses:\n        '200':\n          description: OK\n          content:\n            application/json:\n              schema:\n                $ref: '#/components/schemas/InfoResponse'\n        '400':\n          description: Bad Request\n          content:\n            application/problem+json:\n              schema:\n                $ref: '#/components/schemas/HttpValidationProblemDetails'\n        '404':\n          description: Not Found\n  /api/v1/user/logout:\n    post:\n      tags:\n        - User\n      requestBody:\n        content:\n          application/json;odata.metadata=minimal;odata.streaming=true:\n            schema: {}\n          application/json;odata.metadata=minimal;odata.streaming=false:\n            schema: {}\n          application/json;odata.metadata=minimal:\n            schema: {}\n          application/json;odata.metadata=full;odata.streaming=true:\n            schema: {}\n          application/json;odata.metadata=full;odata.streaming=false:\n            schema: {}\n          application/json;odata.metadata=full:\n            schema: {}\n          application/json;odata.metadata=none;odata.streaming=true:\n            schema: {}\n          application/json;odata.metadata=none;odata.streaming=false:\n            schema: {}\n          application/json;odata.metadata=none:\n            schema: {}\n          application/json;odata.streaming=true:\n            schema: {}\n          application/json;odata.streaming=false:\n            schema: {}\n          application/json:\n            schema: {}\n          application/json;odata.metadata=minimal;odata.streaming=true;IEEE754Compatible=false:\n            schema: {}\n          application/json;odata.metadata=minimal;odata.streaming=true;IEEE754Compatible=true:\n            schema: {}\n          application/json;odata.metadata=minimal;odata.streaming=false;IEEE754Compatible=false:\n            schema: {}\n          application/json;odata.metadata=minimal;odata.streaming=false;IEEE754Compatible=true:\n            schema: {}\n          application/json;odata.metadata=minimal;IEEE754Compatible=false:\n            schema: {}\n          application/json;odata.metadata=minimal;IEEE754Compatible=true:\n            schema: {}\n          application/json;odata.metadata=full;odata.streaming=true;IEEE754Compatible=false:\n            schema: {}\n          application/json;odata.metadata=full;odata.streaming=true;IEEE754Compatible=true:\n            schema: {}\n          application/json;odata.metadata=full;odata.streaming=false;IEEE754Compatible=false:\n            schema: {}\n          application/json;odata.metadata=full;odata.streaming=false;IEEE754Compatible=true:\n            schema: {}\n          application/json;odata.metadata=full;IEEE754Compatible=false:\n            schema: {}\n          application/json;odata.metadata=full;IEEE754Compatible=true:\n            schema: {}\n          application/json;odata.metadata=none;odata.streaming=true;IEEE754Compatible=false:\n            schema: {}\n          application/json;odata.metadata=none;odata.streaming=true;IEEE754Compatible=true:\n            schema: {}\n          application/json;odata.metadata=none;odata.streaming=false;IEEE754Compatible=true:\n            schema: {}\n          application/json;odata.metadata=none;odata.streaming=false;IEEE754Compatible=false:\n            schema: {}\n          application/json;odata.metadata=none;IEEE754Compatible=false:\n            schema: {}\n          application/json;odata.metadata=none;IEEE754Compatible=true:\n            schema: {}\n          application/json;odata.streaming=true;IEEE754Compatible=false:\n            schema: {}\n          application/json;odata.streaming=true;IEEE754Compatible=true:\n            schema: {}\n          application/json;odata.streaming=false;IEEE754Compatible=false:\n            schema: {}\n          application/json;odata.streaming=false;IEEE754Compatible=true:\n            schema: {}\n          application/json;IEEE754Compatible=false:\n            schema: {}\n          application/json;IEEE754Compatible=true:\n            schema: {}\n          application/xml:\n            schema: {}\n          text/plain:\n            schema: {}\n          application/json-patch+json:\n            schema: {}\n          text/json:\n            schema: {}\n          application/*+json:\n            schema: {}\n      responses:\n        '200':\n          description: OK\n  /api/v1/user/documents-summary:\n    get:\n      tags:\n        - User\n      responses:\n        '200':\n          description: OK\n          content:\n            application/json;odata.metadata=minimal;odata.streaming=true:\n              schema:\n                $ref: '#/components/schemas/PersonalDocumentsSummary'\n            application/json;odata.metadata=minimal;odata.streaming=false:\n              schema:\n                $ref: '#/components/schemas/PersonalDocumentsSummary'\n            application/json;odata.metadata=minimal:\n              schema:\n                $ref: '#/components/schemas/PersonalDocumentsSummary'\n            application/json;odata.metadata=full;odata.streaming=true:\n              schema:\n                $ref: '#/components/schemas/PersonalDocumentsSummary'\n            application/json;odata.metadata=full;odata.streaming=false:\n              schema:\n                $ref: '#/components/schemas/PersonalDocumentsSummary'\n            application/json;odata.metadata=full:\n              schema:\n                $ref: '#/components/schemas/PersonalDocumentsSummary'\n            application/json;odata.metadata=none;odata.streaming=true:\n              schema:\n                $ref: '#/components/schemas/PersonalDocumentsSummary'\n            application/json;odata.metadata=none;odata.streaming=false:\n              schema:\n                $ref: '#/components/schemas/PersonalDocumentsSummary'\n            application/json;odata.metadata=none:\n              schema:\n                $ref: '#/components/schemas/PersonalDocumentsSummary'\n            application/json;odata.streaming=true:\n              schema:\n                $ref: '#/components/schemas/PersonalDocumentsSummary'\n            application/json;odata.streaming=false:\n              schema:\n                $ref: '#/components/schemas/PersonalDocumentsSummary'\n            application/json:\n              schema:\n                $ref: '#/components/schemas/PersonalDocumentsSummary'\n            application/json;odata.metadata=minimal;odata.streaming=true;IEEE754Compatible=false:\n              schema:\n                $ref: '#/components/schemas/PersonalDocumentsSummary'\n            application/json;odata.metadata=minimal;odata.streaming=true;IEEE754Compatible=true:\n              schema:\n                $ref: '#/components/schemas/PersonalDocumentsSummary'\n            application/json;odata.metadata=minimal;odata.streaming=false;IEEE754Compatible=false:\n              schema:\n                $ref: '#/components/schemas/PersonalDocumentsSummary'\n            application/json;odata.metadata=minimal;odata.streaming=false;IEEE754Compatible=true:\n              schema:\n                $ref: '#/components/schemas/PersonalDocumentsSummary'\n            application/json;odata.metadata=minimal;IEEE754Compatible=false:\n              schema:\n                $ref: '#/components/schemas/PersonalDocumentsSummary'\n            application/json;odata.metadata=minimal;IEEE754Compatible=true:\n              schema:\n                $ref: '#/components/schemas/PersonalDocumentsSummary'\n            application/json;odata.metadata=full;odata.streaming=true;IEEE754Compatible=false:\n              schema:\n                $ref: '#/components/schemas/PersonalDocumentsSummary'\n            application/json;odata.metadata=full;odata.streaming=true;IEEE754Compatible=true:\n              schema:\n                $ref: '#/components/schemas/PersonalDocumentsSummary'\n            application/json;odata.metadata=full;odata.streaming=false;IEEE754Compatible=false:\n              schema:\n                $ref: '#/components/schemas/PersonalDocumentsSummary'\n            application/json;odata.metadata=full;odata.streaming=false;IEEE754Compatible=true:\n              schema:\n                $ref: '#/components/schemas/PersonalDocumentsSummary'\n            application/json;odata.metadata=full;IEEE754Compatible=false:\n              schema:\n                $ref: '#/components/schemas/PersonalDocumentsSummary'\n            application/json;odata.metadata=full;IEEE754Compatible=true:\n              schema:\n                $ref: '#/components/schemas/PersonalDocumentsSummary'\n            application/json;odata.metadata=none;odata.streaming=true;IEEE754Compatible=false:\n              schema:\n                $ref: '#/components/schemas/PersonalDocumentsSummary'\n            application/json;odata.metadata=none;odata.streaming=true;IEEE754Compatible=true:\n              schema:\n                $ref: '#/components/schemas/PersonalDocumentsSummary'\n            application/json;odata.metadata=none;odata.streaming=false;IEEE754Compatible=true:\n              schema:\n                $ref: '#/components/schemas/PersonalDocumentsSummary'\n            application/json;odata.metadata=none;odata.streaming=false;IEEE754Compatible=false:\n              schema:\n                $ref: '#/components/schemas/PersonalDocumentsSummary'\n            application/json;odata.metadata=none;IEEE754Compatible=false:\n              schema:\n                $ref: '#/components/schemas/PersonalDocumentsSummary'\n            application/json;odata.metadata=none;IEEE754Compatible=true:\n              schema:\n                $ref: '#/components/schemas/PersonalDocumentsSummary'\n            application/json;odata.streaming=true;IEEE754Compatible=false:\n              schema:\n                $ref: '#/components/schemas/PersonalDocumentsSummary'\n            application/json;odata.streaming=true;IEEE754Compatible=true:\n              schema:\n                $ref: '#/components/schemas/PersonalDocumentsSummary'\n            application/json;odata.streaming=false;IEEE754Compatible=false:\n              schema:\n                $ref: '#/components/schemas/PersonalDocumentsSummary'\n            application/json;odata.streaming=false;IEEE754Compatible=true:\n              schema:\n                $ref: '#/components/schemas/PersonalDocumentsSummary'\n            application/json;IEEE754Compatible=false:\n              schema:\n                $ref: '#/components/schemas/PersonalDocumentsSummary'\n            application/json;IEEE754Compatible=true:\n              schema:\n                $ref: '#/components/schemas/PersonalDocumentsSummary'\n            application/xml:\n              schema:\n                $ref: '#/components/schemas/PersonalDocumentsSummary'\n            text/plain:\n              schema:\n                $ref: '#/components/schemas/PersonalDocumentsSummary'\n            application/octet-stream:\n              schema:\n                $ref: '#/components/schemas/PersonalDocumentsSummary'\n            text/json:\n              schema:\n                $ref: '#/components/schemas/PersonalDocumentsSummary'\n      deprecated: true\n  /api/v1/user:\n    delete:\n      tags:\n        - User\n      responses:\n        '200':\n          description: OK\n  /api/v1/users/me:\n    get:\n      tags:\n        - Users\n      responses:\n        '200':\n          description: OK\n          content:\n            application/json;odata.metadata=minimal;odata.streaming=true:\n              schema:\n                $ref: '#/components/schemas/User'\n            application/json;odata.metadata=minimal;odata.streaming=false:\n              schema:\n                $ref: '#/components/schemas/User'\n            application/json;odata.metadata=minimal:\n              schema:\n                $ref: '#/components/schemas/User'\n            application/json;odata.metadata=full;odata.streaming=true:\n              schema:\n                $ref: '#/components/schemas/User'\n            application/json;odata.metadata=full;odata.streaming=false:\n              schema:\n                $ref: '#/components/schemas/User'\n            application/json;odata.metadata=full:\n              schema:\n                $ref: '#/components/schemas/User'\n            application/json;odata.metadata=none;odata.streaming=true:\n              schema:\n                $ref: '#/components/schemas/User'\n            application/json;odata.metadata=none;odata.streaming=false:\n              schema:\n                $ref: '#/components/schemas/User'\n            application/json;odata.metadata=none:\n              schema:\n                $ref: '#/components/schemas/User'\n            application/json;odata.streaming=true:\n              schema:\n                $ref: '#/components/schemas/User'\n            application/json;odata.streaming=false:\n              schema:\n                $ref: '#/components/schemas/User'\n            application/json:\n              schema:\n                $ref: '#/components/schemas/User'\n            application/json;odata.metadata=minimal;odata.streaming=true;IEEE754Compatible=false:\n              schema:\n                $ref: '#/components/schemas/User'\n            application/json;odata.metadata=minimal;odata.streaming=true;IEEE754Compatible=true:\n              schema:\n                $ref: '#/components/schemas/User'\n            application/json;odata.metadata=minimal;odata.streaming=false;IEEE754Compatible=false:\n              schema:\n                $ref: '#/components/schemas/User'\n            application/json;odata.metadata=minimal;odata.streaming=false;IEEE754Compatible=true:\n              schema:\n                $ref: '#/components/schemas/User'\n            application/json;odata.metadata=minimal;IEEE754Compatible=false:\n              schema:\n                $ref: '#/components/schemas/User'\n            application/json;odata.metadata=minimal;IEEE754Compatible=true:\n              schema:\n                $ref: '#/components/schemas/User'\n            application/json;odata.metadata=full;odata.streaming=true;IEEE754Compatible=false:\n              schema:\n                $ref: '#/components/schemas/User'\n            application/json;odata.metadata=full;odata.streaming=true;IEEE754Compatible=true:\n              schema:\n                $ref: '#/components/schemas/User'\n            application/json;odata.metadata=full;odata.streaming=false;IEEE754Compatible=false:\n              schema:\n                $ref: '#/components/schemas/User'\n            application/json;odata.metadata=full;odata.streaming=false;IEEE754Compatible=true:\n              schema:\n                $ref: '#/components/schemas/User'\n            application/json;odata.metadata=full;IEEE754Compatible=false:\n              schema:\n                $ref: '#/components/schemas/User'\n            application/json;odata.metadata=full;IEEE754Compatible=true:\n              schema:\n                $ref: '#/components/schemas/User'\n            application/json;odata.metadata=none;odata.streaming=true;IEEE754Compatible=false:\n              schema:\n                $ref: '#/components/schemas/User'\n            application/json;odata.metadata=none;odata.streaming=true;IEEE754Compatible=true:\n              schema:\n                $ref: '#/components/schemas/User'\n            application/json;odata.metadata=none;odata.streaming=false;IEEE754Compatible=true:\n              schema:\n                $ref: '#/components/schemas/User'\n            application/json;odata.metadata=none;odata.streaming=false;IEEE754Compatible=false:\n              schema:\n                $ref: '#/components/schemas/User'\n            application/json;odata.metadata=none;IEEE754Compatible=false:\n              schema:\n                $ref: '#/components/schemas/User'\n            application/json;odata.metadata=none;IEEE754Compatible=true:\n              schema:\n                $ref: '#/components/schemas/User'\n            application/json;odata.streaming=true;IEEE754Compatible=false:\n              schema:\n                $ref: '#/components/schemas/User'\n            application/json;odata.streaming=true;IEEE754Compatible=true:\n              schema:\n                $ref: '#/components/schemas/User'\n            application/json;odata.streaming=false;IEEE754Compatible=false:\n              schema:\n                $ref: '#/components/schemas/User'\n            application/json;odata.streaming=false;IEEE754Compatible=true:\n              schema:\n                $ref: '#/components/schemas/User'\n            application/json;IEEE754Compatible=false:\n              schema:\n                $ref: '#/components/schemas/User'\n            application/json;IEEE754Compatible=true:\n              schema:\n                $ref: '#/components/schemas/User'\n            application/xml:\n              schema:\n                $ref: '#/components/schemas/User'\n            text/plain:\n              schema:\n                $ref: '#/components/schemas/User'\n            application/octet-stream:\n              schema:\n                $ref: '#/components/schemas/User'\n            text/json:\n              schema:\n                $ref: '#/components/schemas/User'\n  /api/v1/users/{id}:\n    patch:\n      tags:\n        - Users\n      parameters:\n        - name: id\n          in: path\n          required: true\n          schema:\n            type: integer\n            format: int32\n      requestBody:\n        content:\n          application/json;odata.metadata=minimal;odata.streaming=true:\n            schema:\n              $ref: '#/components/schemas/UserUpdateDto'\n          application/json;odata.metadata=minimal;odata.streaming=false:\n            schema:\n              $ref: '#/components/schemas/UserUpdateDto'\n          application/json;odata.metadata=minimal:\n            schema:\n              $ref: '#/components/schemas/UserUpdateDto'\n          application/json;odata.metadata=full;odata.streaming=true:\n            schema:\n              $ref: '#/components/schemas/UserUpdateDto'\n          application/json;odata.metadata=full;odata.streaming=false:\n            schema:\n              $ref: '#/components/schemas/UserUpdateDto'\n          application/json;odata.metadata=full:\n            schema:\n              $ref: '#/components/schemas/UserUpdateDto'\n          application/json;odata.metadata=none;odata.streaming=true:\n            schema:\n              $ref: '#/components/schemas/UserUpdateDto'\n          application/json;odata.metadata=none;odata.streaming=false:\n            schema:\n              $ref: '#/components/schemas/UserUpdateDto'\n          application/json;odata.metadata=none:\n            schema:\n              $ref: '#/components/schemas/UserUpdateDto'\n          application/json;odata.streaming=true:\n            schema:\n              $ref: '#/components/schemas/UserUpdateDto'\n          application/json;odata.streaming=false:\n            schema:\n              $ref: '#/components/schemas/UserUpdateDto'\n          application/json:\n            schema:\n              $ref: '#/components/schemas/UserUpdateDto'\n          application/json;odata.metadata=minimal;odata.streaming=true;IEEE754Compatible=false:\n            schema:\n              $ref: '#/components/schemas/UserUpdateDto'\n          application/json;odata.metadata=minimal;odata.streaming=true;IEEE754Compatible=true:\n            schema:\n              $ref: '#/components/schemas/UserUpdateDto'\n          application/json;odata.metadata=minimal;odata.streaming=false;IEEE754Compatible=false:\n            schema:\n              $ref: '#/components/schemas/UserUpdateDto'\n          application/json;odata.metadata=minimal;odata.streaming=false;IEEE754Compatible=true:\n            schema:\n              $ref: '#/components/schemas/UserUpdateDto'\n          application/json;odata.metadata=minimal;IEEE754Compatible=false:\n            schema:\n              $ref: '#/components/schemas/UserUpdateDto'\n          application/json;odata.metadata=minimal;IEEE754Compatible=true:\n            schema:\n              $ref: '#/components/schemas/UserUpdateDto'\n          application/json;odata.metadata=full;odata.streaming=true;IEEE754Compatible=false:\n            schema:\n              $ref: '#/components/schemas/UserUpdateDto'\n          application/json;odata.metadata=full;odata.streaming=true;IEEE754Compatible=true:\n            schema:\n              $ref: '#/components/schemas/UserUpdateDto'\n          application/json;odata.metadata=full;odata.streaming=false;IEEE754Compatible=false:\n            schema:\n              $ref: '#/components/schemas/UserUpdateDto'\n          application/json;odata.metadata=full;odata.streaming=false;IEEE754Compatible=true:\n            schema:\n              $ref: '#/components/schemas/UserUpdateDto'\n          application/json;odata.metadata=full;IEEE754Compatible=false:\n            schema:\n              $ref: '#/components/schemas/UserUpdateDto'\n          application/json;odata.metadata=full;IEEE754Compatible=true:\n            schema:\n              $ref: '#/components/schemas/UserUpdateDto'\n          application/json;odata.metadata=none;odata.streaming=true;IEEE754Compatible=false:\n            schema:\n              $ref: '#/components/schemas/UserUpdateDto'\n          application/json;odata.metadata=none;odata.streaming=true;IEEE754Compatible=true:\n            schema:\n              $ref: '#/components/schemas/UserUpdateDto'\n          application/json;odata.metadata=none;odata.streaming=false;IEEE754Compatible=true:\n            schema:\n              $ref: '#/components/schemas/UserUpdateDto'\n          application/json;odata.metadata=none;odata.streaming=false;IEEE754Compatible=false:\n            schema:\n              $ref: '#/components/schemas/UserUpdateDto'\n          application/json;odata.metadata=none;IEEE754Compatible=false:\n            schema:\n              $ref: '#/components/schemas/UserUpdateDto'\n          application/json;odata.metadata=none;IEEE754Compatible=true:\n            schema:\n              $ref: '#/components/schemas/UserUpdateDto'\n          application/json;odata.streaming=true;IEEE754Compatible=false:\n            schema:\n              $ref: '#/components/schemas/UserUpdateDto'\n          application/json;odata.streaming=true;IEEE754Compatible=true:\n            schema:\n              $ref: '#/components/schemas/UserUpdateDto'\n          application/json;odata.streaming=false;IEEE754Compatible=false:\n            schema:\n              $ref: '#/components/schemas/UserUpdateDto'\n          application/json;odata.streaming=false;IEEE754Compatible=true:\n            schema:\n              $ref: '#/components/schemas/UserUpdateDto'\n          application/json;IEEE754Compatible=false:\n            schema:\n              $ref: '#/components/schemas/UserUpdateDto'\n          application/json;IEEE754Compatible=true:\n            schema:\n              $ref: '#/components/schemas/UserUpdateDto'\n          application/xml:\n            schema:\n              $ref: '#/components/schemas/UserUpdateDto'\n          text/plain:\n            schema:\n              $ref: '#/components/schemas/UserUpdateDto'\n          application/json-patch+json:\n            schema:\n              $ref: '#/components/schemas/UserUpdateDto'\n          text/json:\n            schema:\n              $ref: '#/components/schemas/UserUpdateDto'\n          application/*+json:\n            schema:\n              $ref: '#/components/schemas/UserUpdateDto'\n      responses:\n        '200':\n          description: OK\n          content:\n            application/json;odata.metadata=minimal;odata.streaming=true:\n              schema:\n                $ref: '#/components/schemas/User'\n            application/json;odata.metadata=minimal;odata.streaming=false:\n              schema:\n                $ref: '#/components/schemas/User'\n            application/json;odata.metadata=minimal:\n              schema:\n                $ref: '#/components/schemas/User'\n            application/json;odata.metadata=full;odata.streaming=true:\n              schema:\n                $ref: '#/components/schemas/User'\n            application/json;odata.metadata=full;odata.streaming=false:\n              schema:\n                $ref: '#/components/schemas/User'\n            application/json;odata.metadata=full:\n              schema:\n                $ref: '#/components/schemas/User'\n            application/json;odata.metadata=none;odata.streaming=true:\n              schema:\n                $ref: '#/components/schemas/User'\n            application/json;odata.metadata=none;odata.streaming=false:\n              schema:\n                $ref: '#/components/schemas/User'\n            application/json;odata.metadata=none:\n              schema:\n                $ref: '#/components/schemas/User'\n            application/json;odata.streaming=true:\n              schema:\n                $ref: '#/components/schemas/User'\n            application/json;odata.streaming=false:\n              schema:\n                $ref: '#/components/schemas/User'\n            application/json:\n              schema:\n                $ref: '#/components/schemas/User'\n            application/json;odata.metadata=minimal;odata.streaming=true;IEEE754Compatible=false:\n              schema:\n                $ref: '#/components/schemas/User'\n            application/json;odata.metadata=minimal;odata.streaming=true;IEEE754Compatible=true:\n              schema:\n                $ref: '#/components/schemas/User'\n            application/json;odata.metadata=minimal;odata.streaming=false;IEEE754Compatible=false:\n              schema:\n                $ref: '#/components/schemas/User'\n            application/json;odata.metadata=minimal;odata.streaming=false;IEEE754Compatible=true:\n              schema:\n                $ref: '#/components/schemas/User'\n            application/json;odata.metadata=minimal;IEEE754Compatible=false:\n              schema:\n                $ref: '#/components/schemas/User'\n            application/json;odata.metadata=minimal;IEEE754Compatible=true:\n              schema:\n                $ref: '#/components/schemas/User'\n            application/json;odata.metadata=full;odata.streaming=true;IEEE754Compatible=false:\n              schema:\n                $ref: '#/components/schemas/User'\n            application/json;odata.metadata=full;odata.streaming=true;IEEE754Compatible=true:\n              schema:\n                $ref: '#/components/schemas/User'\n            application/json;odata.metadata=full;odata.streaming=false;IEEE754Compatible=false:\n              schema:\n                $ref: '#/components/schemas/User'\n            application/json;odata.metadata=full;odata.streaming=false;IEEE754Compatible=true:\n              schema:\n                $ref: '#/components/schemas/User'\n            application/json;odata.metadata=full;IEEE754Compatible=false:\n              schema:\n                $ref: '#/components/schemas/User'\n            application/json;odata.metadata=full;IEEE754Compatible=true:\n              schema:\n                $ref: '#/components/schemas/User'\n            application/json;odata.metadata=none;odata.streaming=true;IEEE754Compatible=false:\n              schema:\n                $ref: '#/components/schemas/User'\n            application/json;odata.metadata=none;odata.streaming=true;IEEE754Compatible=true:\n              schema:\n                $ref: '#/components/schemas/User'\n            application/json;odata.metadata=none;odata.streaming=false;IEEE754Compatible=true:\n              schema:\n                $ref: '#/components/schemas/User'\n            application/json;odata.metadata=none;odata.streaming=false;IEEE754Compatible=false:\n              schema:\n                $ref: '#/components/schemas/User'\n            application/json;odata.metadata=none;IEEE754Compatible=false:\n              schema:\n                $ref: '#/components/schemas/User'\n            application/json;odata.metadata=none;IEEE754Compatible=true:\n              schema:\n                $ref: '#/components/schemas/User'\n            application/json;odata.streaming=true;IEEE754Compatible=false:\n              schema:\n                $ref: '#/components/schemas/User'\n            application/json;odata.streaming=true;IEEE754Compatible=true:\n              schema:\n                $ref: '#/components/schemas/User'\n            application/json;odata.streaming=false;IEEE754Compatible=false:\n              schema:\n                $ref: '#/components/schemas/User'\n            application/json;odata.streaming=false;IEEE754Compatible=true:\n              schema:\n                $ref: '#/components/schemas/User'\n            application/json;IEEE754Compatible=false:\n              schema:\n                $ref: '#/components/schemas/User'\n            application/json;IEEE754Compatible=true:\n              schema:\n                $ref: '#/components/schemas/User'\n            application/xml:\n              schema:\n                $ref: '#/components/schemas/User'\n            text/plain:\n              schema:\n                $ref: '#/components/schemas/User'\n            application/octet-stream:\n              schema:\n                $ref: '#/components/schemas/User'\n            text/json:\n              schema:\n                $ref: '#/components/schemas/User'\ncomponents:\n  schemas:\n    AccessTokenResponse:\n      required:\n        - accessToken\n        - expiresIn\n        - refreshToken\n      type: object\n      properties:\n        tokenType:\n          type: string\n          readOnly: true\n        accessToken:\n          type: string\n        expiresIn:\n          type: integer\n          format: int64\n        refreshToken:\n          type: string\n      additionalProperties: false\n    AccountingCompany:\n      required:\n        - country\n        - id\n        - identificationNumber\n        - name\n      type: object\n      properties:\n        id:\n          type: integer\n          format: int32\n        name:\n          type: string\n        identificationNumber:\n          type: string\n        countryCode:\n          type: string\n          deprecated: true\n        country:\n          $ref: '#/components/schemas/Country'\n      additionalProperties: false\n    AccountingCompanyCreateDto:\n      required:\n        - identificationNumber\n        - name\n      type: object\n      properties:\n        name:\n          minLength: 1\n          type: string\n        identificationNumber:\n          minLength: 1\n          type: string\n      additionalProperties: false\n    AccountingCompanyMembership:\n      required:\n        - accountingCompanyId\n        - accountingCompanyName\n        - id\n        - roleName\n        - userFullName\n        - userId\n      type: object\n      properties:\n        id:\n          type: integer\n          format: int32\n        accountingCompanyId:\n          type: integer\n          format: int32\n        accountingCompanyName:\n          type: string\n        userId:\n          type: integer\n          format: int32\n        userFullName:\n          type: string\n        roleName:\n          type: string\n      additionalProperties: false\n    AccountingCompanyMembershipUpsertDto:\n      required:\n        - accountingCompanyId\n        - email\n        - roleName\n      type: object\n      properties:\n        accountingCompanyId:\n          type: integer\n          format: int32\n        email:\n          minLength: 1\n          type: string\n          format: email\n        roleName:\n          minLength: 1\n          type: string\n      additionalProperties: false\n    AccountingCompanyUpdateDto:\n      required:\n        - identificationNumber\n        - name\n      type: object\n      properties:\n        name:\n          minLength: 1\n          type: string\n        identificationNumber:\n          minLength: 1\n          type: string\n      additionalProperties: false\n    AddressDto:\n      required:\n        - city\n        - country\n        - postalCode\n        - street\n      type: object\n      properties:\n        street:\n          maxLength: 100\n          type: string\n        city:\n          maxLength: 50\n          type: string\n        postalCode:\n          maxLength: 20\n          type: string\n        country:\n          maxLength: 60\n          type: string\n      additionalProperties: false\n    AnnualInvoicesCount:\n      enum:\n        - Tens\n        - Hundred\n        - Thousands\n        - TenThousands\n        - HundredThousands\n      type: string\n    BankAccount:\n      required:\n        - accountNumber\n        - bankCode\n        - businessId\n        - createdAt\n        - currency\n        - iban\n        - id\n        - swift\n      type: object\n      properties:\n        id:\n          type: integer\n          format: int64\n        businessId:\n          type: integer\n          format: int64\n        accountNumber:\n          type: string\n        bankCode:\n          type: string\n        swift:\n          type: string\n        iban:\n          type: string\n        currency:\n          $ref: '#/components/schemas/Currency'\n        createdAt:\n          type: string\n          format: date-time\n        updatedAt:\n          type: string\n          format: date-time\n          nullable: true\n      additionalProperties: false\n    BankAccountUpsertDto:\n      required:\n        - accountNumber\n        - bankCode\n        - businessId\n        - currency\n        - iban\n        - swift\n      type: object\n      properties:\n        businessId:\n          type: integer\n          format: int32\n        accountNumber:\n          maxLength: 20\n          minLength: 1\n          type: string\n        bankCode:\n          maxLength: 10\n          minLength: 1\n          type: string\n        swift:\n          maxLength: 11\n          minLength: 1\n          type: string\n        iban:\n          maxLength: 34\n          minLength: 1\n          type: string\n        currency:\n          $ref: '#/components/schemas/Currency'\n      additionalProperties: false\n    Business:\n      required:\n        - accountingCompany\n        - contactPerson\n        - country\n        - deletedAt\n        - fullAddress\n        - id\n        - identificationNumber\n        - name\n        - vatNumber\n      type: object\n      properties:\n        id:\n          type: integer\n          format: int32\n        name:\n          type: string\n        identificationNumber:\n          type: string\n        vatNumber:\n          type: string\n          nullable: true\n        country:\n          $ref: '#/components/schemas/Country'\n        countryCode:\n          type: string\n          deprecated: true\n        deletedAt:\n          type: string\n          format: date-time\n          nullable: true\n        fullAddress:\n          type: string\n          nullable: true\n        accountingCompany:\n          $ref: '#/components/schemas/BusinessAccountingCompany'\n        contactPerson:\n          $ref: '#/components/schemas/BusinessContactPerson'\n      additionalProperties: false\n    BusinessAccountantAssignment:\n      required:\n        - accountantId\n        - accountantName\n        - businessId\n        - businessName\n        - id\n      type: object\n      properties:\n        id:\n          type: integer\n          format: int32\n        businessId:\n          type: integer\n          format: int32\n        businessName:\n          type: string\n        accountantId:\n          type: integer\n          format: int32\n        accountantName:\n          type: string\n      additionalProperties: false\n    BusinessAccountantAssignmentUpsert:\n      required:\n        - accountantId\n        - businessId\n      type: object\n      properties:\n        businessId:\n          type: integer\n          format: int32\n        accountantId:\n          type: integer\n          format: int32\n      additionalProperties: false\n    BusinessAccountingCompany:\n      required:\n        - id\n        - name\n      type: object\n      properties:\n        id:\n          type: integer\n          format: int32\n        name:\n          type: string\n      additionalProperties: false\n    BusinessAresAddress:\n      required:\n        - city\n        - houseNumber\n        - postalCode\n        - street\n      type: object\n      properties:\n        street:\n          type: string\n        houseNumber:\n          maximum: 2147483647\n          minimum: 1\n          type: integer\n          format: int32\n        guidanceNumber:\n          maximum: 2147483647\n          minimum: 1\n          type: integer\n          format: int32\n          nullable: true\n        city:\n          type: string\n        postalCode:\n          maximum: 2147483647\n          minimum: 1\n          type: integer\n          format: int32\n      additionalProperties: false\n    BusinessChangeContactDto:\n      required:\n        - userId\n      type: object\n      properties:\n        userId:\n          type: integer\n          format: int32\n          nullable: true\n      additionalProperties: false\n    BusinessContactPerson:\n      required:\n        - email\n        - fullName\n        - id\n        - phoneNumber\n      type: object\n      properties:\n        id:\n          type: integer\n          format: int32\n        fullName:\n          type: string\n        email:\n          type: string\n          nullable: true\n        phoneNumber:\n          type: string\n          nullable: true\n      additionalProperties: false\n    BusinessCreateDto:\n      required:\n        - identificationNumber\n        - name\n      type: object\n      properties:\n        name:\n          minLength: 1\n          type: string\n        identificationNumber:\n          minLength: 1\n          type: string\n        vatNumber:\n          type: string\n          nullable: true\n        address:\n          $ref: '#/components/schemas/BusinessAresAddress'\n      additionalProperties: false\n    BusinessDocumentMoveToBusinessDocumentsDto:\n      required:\n        - businessId\n      type: object\n      properties:\n        businessId:\n          type: integer\n          format: int32\n        documentTypeId:\n          type: integer\n          format: int32\n          nullable: true\n      additionalProperties: false\n    BusinessDocumentUpdateDto:\n      required:\n        - documentTypeId\n        - name\n      type: object\n      properties:\n        name:\n          maxLength: 255\n          type: string\n          nullable: true\n        documentTypeId:\n          type: integer\n          format: int32\n          nullable: true\n      additionalProperties: false\n    BusinessDocumentsSummary:\n      required:\n        - documentsCount\n        - documentsSize\n        - id\n        - lastUploadAt\n        - maxStorageSize\n        - name\n      type: object\n      properties:\n        id:\n          type: integer\n          format: int32\n        name:\n          type: string\n        documentsCount:\n          type: integer\n          format: int32\n        documentsSize:\n          type: integer\n          format: int64\n        lastUploadAt:\n          type: string\n          format: date-time\n          nullable: true\n        maxStorageSize:\n          type: integer\n          format: int64\n      additionalProperties: false\n    BusinessMembershipDto:\n      required:\n        - businessId\n        - businessName\n        - id\n        - roleId\n        - roleName\n        - userFullName\n        - userId\n      type: object\n      properties:\n        id:\n          type: integer\n          format: int32\n        userId:\n          type: integer\n          format: int32\n        userFullName:\n          type: string\n        businessId:\n          type: integer\n          format: int32\n        businessName:\n          type: string\n        roleId:\n          type: integer\n          format: int32\n        roleName:\n          type: string\n      additionalProperties: false\n    BusinessMembershipUpsertDto:\n      required:\n        - businessId\n        - email\n        - roleName\n      type: object\n      properties:\n        businessId:\n          type: integer\n          format: int32\n        email:\n          minLength: 1\n          type: string\n          format: email\n        roleName:\n          minLength: 1\n          type: string\n      additionalProperties: false\n    BusinessSummary:\n      required:\n        - documentsCount\n        - documentsSize\n        - id\n        - lastUploadAt\n        - name\n        - pendingDocumentsCount\n        - pendingTasksCount\n      type: object\n      properties:\n        id:\n          type: integer\n          format: int32\n        name:\n          type: string\n        documentsCount:\n          type: integer\n          format: int32\n        documentsSize:\n          type: integer\n          format: int64\n        lastUploadAt:\n          type: string\n          format: date-time\n          nullable: true\n        maxStorageSize:\n          type: integer\n          format: int64\n          deprecated: true\n        pendingTasksCount:\n          type: integer\n          format: int32\n        pendingDocumentsCount:\n          type: integer\n          format: int32\n      additionalProperties: false\n    BusinessUpdateDto:\n      required:\n        - identificationNumber\n        - name\n      type: object\n      properties:\n        name:\n          minLength: 1\n          type: string\n        identificationNumber:\n          minLength: 1\n          type: string\n        vatNumber:\n          minLength: 1\n          type: string\n          nullable: true\n        address:\n          $ref: '#/components/schemas/BusinessAresAddress'\n      additionalProperties: false\n    Counterparty:\n      required:\n        - address\n        - businessId\n        - createdAt\n        - email\n        - id\n        - identificationNumber\n        - isFavourite\n        - name\n        - privateNote\n        - vatNumber\n      type: object\n      properties:\n        id:\n          type: integer\n          format: int64\n        businessId:\n          type: integer\n          format: int64\n        name:\n          type: string\n        identificationNumber:\n          type: string\n          nullable: true\n        vatNumber:\n          type: string\n          nullable: true\n        address:\n          $ref: '#/components/schemas/AddressDto'\n        email:\n          type: string\n          nullable: true\n        privateNote:\n          type: string\n          nullable: true\n        isFavourite:\n          type: boolean\n          nullable: true\n        createdAt:\n          type: string\n          format: date-time\n        updatedAt:\n          type: string\n          format: date-time\n          nullable: true\n      additionalProperties: false\n    CounterpartyCreateDto:\n      required:\n        - address\n        - businessId\n        - email\n        - identificationNumber\n        - name\n        - vatNumber\n      type: object\n      properties:\n        businessId:\n          type: integer\n          format: int64\n        identificationNumber:\n          maxLength: 31\n          minLength: 0\n          type: string\n        name:\n          maxLength: 255\n          minLength: 0\n          type: string\n        vatNumber:\n          maxLength: 31\n          minLength: 0\n          type: string\n          nullable: true\n        address:\n          $ref: '#/components/schemas/AddressDto'\n        email:\n          maxLength: 320\n          minLength: 0\n          type: string\n          format: email\n          nullable: true\n        privateNote:\n          maxLength: 1024\n          minLength: 0\n          type: string\n          nullable: true\n        isFavourite:\n          type: boolean\n          nullable: true\n      additionalProperties: false\n    CounterpartyUpdateDto:\n      type: object\n      properties:\n        identificationNumber:\n          maxLength: 31\n          minLength: 0\n          type: string\n          nullable: true\n        name:\n          maxLength: 255\n          minLength: 0\n          type: string\n          nullable: true\n        vatNumber:\n          maxLength: 31\n          minLength: 0\n          type: string\n          nullable: true\n        address:\n          $ref: '#/components/schemas/AddressDto'\n        email:\n          maxLength: 320\n          minLength: 0\n          type: string\n          format: email\n          nullable: true\n        privateNote:\n          maxLength: 1024\n          minLength: 0\n          type: string\n          nullable: true\n        isFavourite:\n          type: boolean\n          nullable: true\n      additionalProperties: false\n    Country:\n      enum:\n        - Czechia\n        - Slovakia\n      type: string\n    CreateInvoiceClientDto:\n      required:\n        - counterpartyId\n      type: object\n      properties:\n        counterpartyId:\n          type: integer\n          format: int64\n      additionalProperties: false\n    Currency:\n      enum:\n        - CZK\n        - EUR\n        - USD\n        - GBP\n      type: string\n    DataBoxCredentials:\n      required:\n        - businessId\n        - businessName\n        - password\n        - userId\n        - username\n      type: object\n      properties:\n        id:\n          type: integer\n          format: int32\n        username:\n          type: string\n        password:\n          type: string\n          nullable: true\n        businessId:\n          type: integer\n          format: int32\n        businessName:\n          type: string\n        userId:\n          type: integer\n          format: int32\n      additionalProperties: false\n    DataBoxCredentialsUpsertDto:\n      required:\n        - businessId\n        - password\n        - username\n      type: object\n      properties:\n        businessId:\n          type: integer\n          format: int32\n        username:\n          maxLength: 50\n          type: string\n          nullable: true\n        password:\n          maxLength: 50\n          type: string\n          nullable: true\n      additionalProperties: false\n    DocumentAction:\n      enum:\n        - Uploaded\n      type: string\n    DocumentBusiness:\n      required:\n        - approvedAt\n        - approverFullName\n        - approverId\n        - businessId\n        - businessName\n        - documentName\n        - documentTypeId\n        - documentTypeName\n        - extension\n        - id\n        - originalFileName\n        - size\n        - taskId\n        - uploadedAt\n        - uploaderId\n      type: object\n      properties:\n        id:\n          type: integer\n          format: int64\n        name:\n          type: string\n          deprecated: true\n        documentName:\n          type: string\n        originalFileName:\n          type: string\n        extension:\n          type: string\n          nullable: true\n        size:\n          type: integer\n          format: int64\n        businessId:\n          type: integer\n          format: int64\n          nullable: true\n        businessName:\n          type: string\n          nullable: true\n        documentTypeId:\n          type: integer\n          format: int64\n        documentTypeName:\n          type: string\n        approvedAt:\n          type: string\n          format: date-time\n          nullable: true\n        approverId:\n          type: integer\n          format: int32\n          nullable: true\n        approverFullName:\n          type: string\n          nullable: true\n        taskId:\n          type: integer\n          format: int64\n          nullable: true\n        uploadedAt:\n          type: string\n          format: date-time\n        uploaderId:\n          type: integer\n          format: int32\n          nullable: true\n        deletedAt:\n          type: string\n          format: date-time\n          nullable: true\n      additionalProperties: false\n    DocumentBusinessActivity:\n      required:\n        - action\n        - businessId\n        - businessName\n        - documentId\n        - documentName\n        - happenedAt\n        - performedByUserFullName\n        - performedByUserId\n      type: object\n      properties:\n        documentId:\n          type: integer\n          format: int64\n        documentName:\n          type: string\n        businessId:\n          type: integer\n          format: int64\n        businessName:\n          type: string\n        action:\n          $ref: '#/components/schemas/DocumentAction'\n        happenedAt:\n          type: string\n          format: date-time\n        performedByUserId:\n          type: integer\n          format: int32\n          nullable: true\n        performedByUserFullName:\n          type: string\n          nullable: true\n      additionalProperties: false\n    DocumentPersonal:\n      required:\n        - extension\n        - id\n        - name\n        - size\n        - userFullName\n        - userId\n      type: object\n      properties:\n        id:\n          type: integer\n          format: int64\n        name:\n          type: string\n        extension:\n          type: string\n          nullable: true\n        size:\n          type: integer\n          format: int64\n        userId:\n          type: integer\n          format: int64\n        userFullName:\n          type: string\n        uploadedAt:\n          type: string\n          format: date-time\n        deletedAt:\n          type: string\n          format: date-time\n          nullable: true\n      additionalProperties: false\n    DocumentPersonalMoveToBusinessDocumentsDto:\n      required:\n        - businessId\n      type: object\n      properties:\n        businessId:\n          type: integer\n          format: int32\n        documentTypeId:\n          type: integer\n          format: int32\n      additionalProperties: false\n    DocumentType:\n      required:\n        - id\n        - name\n      type: object\n      properties:\n        id:\n          type: integer\n          format: int64\n        name:\n          type: string\n      additionalProperties: false\n    DocumentTypesSummary:\n      required:\n        - documentsCount\n        - documentTypeId\n        - documentTypeName\n      type: object\n      properties:\n        documentTypeId:\n          type: integer\n          format: int32\n        documentTypeName:\n          type: string\n        documentsCount:\n          type: integer\n          format: int32\n      additionalProperties: false\n    FeedbackType:\n      enum:\n        - Feedback\n        - Bug\n      type: string\n    ForgotPasswordRequest:\n      required:\n        - email\n      type: object\n      properties:\n        email:\n          type: string\n      additionalProperties: false\n    HttpValidationProblemDetails:\n      type: object\n      properties:\n        type:\n          type: string\n          nullable: true\n        title:\n          type: string\n          nullable: true\n        status:\n          type: integer\n          format: int32\n          nullable: true\n        detail:\n          type: string\n          nullable: true\n        instance:\n          type: string\n          nullable: true\n        errors:\n          type: object\n          additionalProperties:\n            type: array\n            items:\n              type: string\n      additionalProperties: {}\n    InfoRequest:\n      type: object\n      properties:\n        newEmail:\n          type: string\n          nullable: true\n        newPassword:\n          type: string\n          nullable: true\n        oldPassword:\n          type: string\n          nullable: true\n      additionalProperties: false\n    InfoResponse:\n      required:\n        - email\n        - isEmailConfirmed\n      type: object\n      properties:\n        email:\n          type: string\n        isEmailConfirmed:\n          type: boolean\n      additionalProperties: false\n    Invitation:\n      required:\n        - accountingCompanyName\n        - email\n        - expiresAt\n        - id\n        - status\n      type: object\n      properties:\n        id:\n          type: integer\n          format: int32\n        accountingCompanyName:\n          type: string\n        status:\n          $ref: '#/components/schemas/InvitationStatus'\n        expiresAt:\n          type: string\n          format: date-time\n        email:\n          type: string\n      additionalProperties: false\n    InvitationAcceptDto:\n      required:\n        - businessId\n      type: object\n      properties:\n        businessId:\n          type: integer\n          format: int32\n      additionalProperties: false\n    InvitationCreateDto:\n      required:\n        - accountingCompanyId\n        - email\n      type: object\n      properties:\n        accountingCompanyId:\n          type: integer\n          format: int32\n        email:\n          maxLength: 320\n          minLength: 1\n          type: string\n          format: email\n      additionalProperties: false\n    InvitationStatus:\n      enum:\n        - Pending\n        - Expired\n        - Rejected\n      type: string\n    InvitationUpdateDto:\n      type: object\n      properties:\n        email:\n          type: string\n          format: email\n          nullable: true\n      additionalProperties: false\n    Invoice:\n      required:\n        - bankAccount\n        - businessId\n        - client\n        - constantSymbol\n        - createdAt\n        - currency\n        - dueAt\n        - footerNote\n        - hideBankAccount\n        - id\n        - issuedAt\n        - lines\n        - noteBeforeLines\n        - number\n        - paymentMethod\n        - reversedVatCharge\n        - sentAt\n        - snapshotAt\n        - status\n        - supplier\n        - taxPointAt\n        - totalPriceExcludingVat\n        - totalPriceIncludingVat\n        - totalVatAmount\n        - type\n        - updatedAt\n        - variableSymbol\n      type: object\n      properties:\n        id:\n          type: integer\n          format: int64\n        businessId:\n          type: integer\n          format: int64\n        supplier:\n          $ref: '#/components/schemas/InvoiceSupplier'\n        client:\n          $ref: '#/components/schemas/InvoiceClient'\n        bankAccount:\n          $ref: '#/components/schemas/InvoiceBankAccount'\n        hideBankAccount:\n          type: boolean\n        type:\n          $ref: '#/components/schemas/InvoiceType'\n        number:\n          type: string\n        status:\n          $ref: '#/components/schemas/InvoiceStatus'\n        paymentMethod:\n          $ref: '#/components/schemas/PaymentMethod'\n        currency:\n          $ref: '#/components/schemas/Currency'\n        reversedVatCharge:\n          type: boolean\n        variableSymbol:\n          type: string\n          nullable: true\n        constantSymbol:\n          type: string\n          nullable: true\n        issuedAt:\n          type: string\n          format: date\n        dueAt:\n          type: string\n          format: date\n        taxPointAt:\n          type: string\n          format: date\n          nullable: true\n        sentAt:\n          type: string\n          format: date-time\n          nullable: true\n        snapshotAt:\n          type: string\n          format: date-time\n          nullable: true\n        noteBeforeLines:\n          type: string\n          nullable: true\n        lines:\n          type: array\n          items:\n            $ref: '#/components/schemas/InvoiceLine'\n        footerNote:\n          type: string\n          nullable: true\n        totalPriceExcludingVat:\n          type: number\n          format: double\n        totalVatAmount:\n          type: number\n          format: double\n        totalPriceIncludingVat:\n          type: number\n          format: double\n        createdAt:\n          type: string\n          format: date-time\n        updatedAt:\n          type: string\n          format: date-time\n          nullable: true\n      additionalProperties: false\n    InvoiceBankAccount:\n      required:\n        - accountNumber\n        - bankCode\n        - currency\n        - iban\n        - swift\n      type: object\n      properties:\n        swift:\n          type: string\n        iban:\n          type: string\n        accountNumber:\n          type: string\n        bankCode:\n          type: string\n        currency:\n          $ref: '#/components/schemas/Currency'\n      additionalProperties: false\n    InvoiceBankAccountUpdateDto:\n      required:\n        - accountNumber\n        - bankCode\n        - currency\n        - iban\n        - swift\n      type: object\n      properties:\n        swift:\n          type: string\n        iban:\n          type: string\n        accountNumber:\n          type: string\n        bankCode:\n          type: string\n        currency:\n          $ref: '#/components/schemas/Currency'\n      additionalProperties: false\n    InvoiceClient:\n      required:\n        - address\n        - counterpartyId\n        - deliveryAddress\n        - deliveryName\n        - email\n        - identificationNumber\n        - name\n        - registrationNumber\n        - vatNumber\n      type: object\n      properties:\n        id:\n          type: integer\n          format: int64\n          nullable: true\n          deprecated: true\n        counterpartyId:\n          type: integer\n          format: int64\n          nullable: true\n        name:\n          type: string\n        registrationNumber:\n          type: string\n          nullable: true\n        identificationNumber:\n          type: string\n          nullable: true\n        vatNumber:\n          type: string\n          nullable: true\n        email:\n          type: string\n          nullable: true\n        address:\n          $ref: '#/components/schemas/InvoiceClientAddress'\n        deliveryName:\n          type: string\n          nullable: true\n        deliveryAddress:\n          $ref: '#/components/schemas/InvoiceClientDeliveryAddress'\n      additionalProperties: false\n    InvoiceClientAddress:\n      required:\n        - city\n        - country\n        - postalCode\n        - street\n      type: object\n      properties:\n        street:\n          maxLength: 100\n          type: string\n        city:\n          maxLength: 50\n          type: string\n        postalCode:\n          maxLength: 20\n          type: string\n        country:\n          maxLength: 60\n          type: string\n      additionalProperties: false\n    InvoiceClientDeliveryAddress:\n      required:\n        - city\n        - country\n        - postalCode\n        - street\n      type: object\n      properties:\n        street:\n          maxLength: 100\n          type: string\n        city:\n          maxLength: 50\n          type: string\n        postalCode:\n          maxLength: 20\n          type: string\n        country:\n          maxLength: 60\n          type: string\n      additionalProperties: false\n    InvoiceCreateDto:\n      required:\n        - businessId\n        - client\n        - dueAt\n        - hideBankAccount\n        - issuedAt\n        - lines\n        - number\n        - paymentMethod\n        - reversedVatCharge\n        - status\n        - taxPointAt\n        - type\n      type: object\n      properties:\n        client:\n          $ref: '#/components/schemas/CreateInvoiceClientDto'\n        type:\n          $ref: '#/components/schemas/InvoiceType'\n        number:\n          maxLength: 50\n          minLength: 1\n          type: string\n        status:\n          $ref: '#/components/schemas/InvoiceStatus'\n        paymentMethod:\n          $ref: '#/components/schemas/PaymentMethod'\n        hideBankAccount:\n          type: boolean\n        reversedVatCharge:\n          type: boolean\n        variableSymbol:\n          maxLength: 10\n          type: string\n          nullable: true\n        constantSymbol:\n          maxLength: 4\n          type: string\n          nullable: true\n        issuedAt:\n          type: string\n          format: date\n        dueAt:\n          type: string\n          format: date\n        taxPointAt:\n          type: string\n          format: date\n        noteBeforeLines:\n          maxLength: 2048\n          type: string\n          nullable: true\n        lines:\n          type: array\n          items:\n            $ref: '#/components/schemas/InvoiceLineCreateDto'\n        footerNote:\n          maxLength: 2048\n          type: string\n          nullable: true\n        businessId:\n          type: integer\n          format: int32\n      additionalProperties: false\n    InvoiceLine:\n      required:\n        - description\n        - quantity\n        - totalPriceExcludingVat\n        - totalPriceIncludingVat\n        - unit\n        - unitPrice\n        - vatAmount\n        - vatRate\n      type: object\n      properties:\n        id:\n          type: integer\n          format: int64\n        description:\n          type: string\n        quantity:\n          type: number\n          format: double\n        unit:\n          type: string\n        unitPrice:\n          type: number\n          format: double\n        vatRate:\n          type: number\n          format: double\n        totalPriceExcludingVat:\n          type: number\n          format: double\n        vatAmount:\n          type: number\n          format: double\n        totalPriceIncludingVat:\n          type: number\n          format: double\n      additionalProperties: false\n    InvoiceLineCreateDto:\n      required:\n        - description\n        - quantity\n        - unit\n        - unitPrice\n        - vatRate\n      type: object\n      properties:\n        description:\n          maxLength: 500\n          minLength: 1\n          type: string\n        quantity:\n          type: number\n          format: double\n        unit:\n          maxLength: 20\n          minLength: 1\n          type: string\n        unitPrice:\n          type: number\n          format: double\n        vatRate:\n          maximum: 100\n          minimum: 0\n          type: number\n          format: double\n      additionalProperties: false\n    InvoiceLineUpdateDto:\n      required:\n        - description\n        - id\n        - quantity\n        - unit\n        - unitPrice\n        - vatRate\n      type: object\n      properties:\n        id:\n          type: integer\n          format: int64\n          nullable: true\n        description:\n          maxLength: 500\n          minLength: 1\n          type: string\n        quantity:\n          type: number\n          format: double\n        unit:\n          maxLength: 20\n          minLength: 1\n          type: string\n        unitPrice:\n          type: number\n          format: double\n        vatRate:\n          type: number\n          format: double\n      additionalProperties: false\n    InvoiceSendDto:\n      required:\n        - customRecipientEmail\n        - message\n      type: object\n      properties:\n        customRecipientEmail:\n          type: string\n          format: email\n          nullable: true\n        message:\n          type: string\n      additionalProperties: false\n    InvoiceSetting:\n      required:\n        - businessId\n        - createdAt\n        - isVatPayer\n        - numberingSetting\n        - template\n      type: object\n      properties:\n        businessId:\n          type: integer\n          format: int64\n        isVatPayer:\n          type: boolean\n        template:\n          $ref: '#/components/schemas/InvoiceTemplate'\n        bankAccount:\n          $ref: '#/components/schemas/InvoiceSettingsBankAccount'\n        numberingSetting:\n          $ref: '#/components/schemas/NumberingSetting'\n        createdAt:\n          type: string\n          format: date-time\n        updatedAt:\n          type: string\n          format: date-time\n          nullable: true\n      additionalProperties: false\n    InvoiceSettingUpsertDto:\n      required:\n        - businessId\n        - isVatPayer\n        - numberingSetting\n        - template\n      type: object\n      properties:\n        businessId:\n          type: integer\n          format: int32\n        isVatPayer:\n          type: boolean\n        template:\n          $ref: '#/components/schemas/InvoiceTemplateUpsertDto'\n        bankAccount:\n          $ref: '#/components/schemas/InvoiceSettingsBankAccountUpsertDto'\n        numberingSetting:\n          $ref: '#/components/schemas/NumberingSettingUpsertDto'\n      additionalProperties: false\n    InvoiceSettingsBankAccount:\n      required:\n        - accountNumber\n        - bankCode\n        - businessId\n        - createdAt\n        - currency\n        - iban\n        - id\n        - number\n        - swift\n      type: object\n      properties:\n        id:\n          type: integer\n          format: int64\n        businessId:\n          type: integer\n          format: int64\n        number:\n          type: string\n          deprecated: true\n        accountNumber:\n          type: string\n        bankCode:\n          type: string\n        swift:\n          type: string\n        iban:\n          type: string\n        currency:\n          $ref: '#/components/schemas/Currency'\n        createdAt:\n          type: string\n          format: date-time\n        updatedAt:\n          type: string\n          format: date-time\n          nullable: true\n      additionalProperties: false\n    InvoiceSettingsBankAccountUpsertDto:\n      required:\n        - accountNumber\n        - bankCode\n        - currency\n        - iban\n        - swift\n      type: object\n      properties:\n        accountNumber:\n          minLength: 1\n          type: string\n        bankCode:\n          minLength: 1\n          type: string\n        swift:\n          minLength: 1\n          type: string\n        iban:\n          minLength: 1\n          type: string\n        currency:\n          $ref: '#/components/schemas/Currency'\n      additionalProperties: false\n    InvoiceStatus:\n      enum:\n        - Draft\n        - Issued\n        - Paid\n        - Overdue\n        - Cancelled\n        - Snapshot\n      type: string\n    InvoiceSupplier:\n      required:\n        - address\n        - identificationNumber\n        - name\n        - registrationNumber\n        - vatNumber\n      type: object\n      properties:\n        name:\n          type: string\n        registrationNumber:\n          type: string\n        identificationNumber:\n          type: string\n        vatNumber:\n          type: string\n          nullable: true\n        address:\n          $ref: '#/components/schemas/InvoiceSupplierAddress'\n      additionalProperties: false\n    InvoiceSupplierAddress:\n      required:\n        - city\n        - country\n        - postalCode\n        - street\n      type: object\n      properties:\n        street:\n          maxLength: 100\n          type: string\n        city:\n          maxLength: 50\n          type: string\n        postalCode:\n          maxLength: 20\n          type: string\n        country:\n          maxLength: 60\n          type: string\n      additionalProperties: false\n    InvoiceTemplate:\n      required:\n        - currency\n        - footerText\n        - textBeforeLines\n      type: object\n      properties:\n        currency:\n          $ref: '#/components/schemas/Currency'\n        textBeforeLines:\n          type: string\n          nullable: true\n        footerText:\n          type: string\n          nullable: true\n      additionalProperties: false\n    InvoiceTemplateUpsertDto:\n      required:\n        - currency\n        - footerText\n        - textBeforeLines\n      type: object\n      properties:\n        currency:\n          $ref: '#/components/schemas/Currency'\n        textBeforeLines:\n          maxLength: 2048\n          minLength: 0\n          type: string\n          nullable: true\n        footerText:\n          maxLength: 2048\n          minLength: 0\n          type: string\n          nullable: true\n      additionalProperties: false\n    InvoiceType:\n      enum:\n        - Regular\n        - Corrective\n        - Advance\n      type: string\n    InvoiceUpdateClientDto:\n      required:\n        - address\n        - counterpartyId\n        - deliveryAddress\n        - deliveryName\n        - email\n        - name\n        - registrationNumber\n        - vatNumber\n      type: object\n      properties:\n        counterpartyId:\n          type: integer\n          format: int64\n          nullable: true\n        name:\n          maxLength: 255\n          type: string\n          nullable: true\n        registrationNumber:\n          maxLength: 31\n          type: string\n          nullable: true\n        vatNumber:\n          maxLength: 31\n          type: string\n          nullable: true\n        email:\n          maxLength: 320\n          type: string\n          format: email\n          nullable: true\n        address:\n          $ref: '#/components/schemas/AddressDto'\n        deliveryName:\n          maxLength: 255\n          type: string\n          nullable: true\n        deliveryAddress:\n          $ref: '#/components/schemas/AddressDto'\n      additionalProperties: false\n    InvoiceUpdateDto:\n      required:\n        - bankAccount\n        - client\n        - constantSymbol\n        - currency\n        - dueAt\n        - footerNote\n        - hideBankAccount\n        - issuedAt\n        - lines\n        - noteBeforeLines\n        - number\n        - paymentMethod\n        - reversedVatCharge\n        - status\n        - taxPointAt\n        - type\n        - variableSymbol\n      type: object\n      properties:\n        client:\n          $ref: '#/components/schemas/InvoiceUpdateClientDto'\n        bankAccount:\n          $ref: '#/components/schemas/InvoiceBankAccountUpdateDto'\n        hideBankAccount:\n          type: boolean\n          nullable: true\n        type:\n          $ref: '#/components/schemas/InvoiceType'\n        number:\n          maxLength: 50\n          type: string\n          nullable: true\n        status:\n          $ref: '#/components/schemas/InvoiceStatus'\n        paymentMethod:\n          $ref: '#/components/schemas/PaymentMethod'\n        currency:\n          $ref: '#/components/schemas/Currency'\n        reversedVatCharge:\n          type: boolean\n          nullable: true\n        variableSymbol:\n          maxLength: 10\n          type: string\n          nullable: true\n        constantSymbol:\n          maxLength: 4\n          type: string\n          nullable: true\n        issuedAt:\n          type: string\n          format: date\n          nullable: true\n        dueAt:\n          type: string\n          format: date\n          nullable: true\n        taxPointAt:\n          type: string\n          format: date\n          nullable: true\n        noteBeforeLines:\n          maxLength: 2048\n          type: string\n          nullable: true\n        lines:\n          type: array\n          items:\n            $ref: '#/components/schemas/InvoiceLineUpdateDto'\n          nullable: true\n        footerNote:\n          maxLength: 2048\n          type: string\n          nullable: true\n      additionalProperties: false\n    LicenseDto:\n      required:\n        - businessId\n        - id\n        - maxBusinessMembersCount\n        - maxBusinessStorageSize\n        - maxContactsCount\n        - tierId\n        - tierName\n      type: object\n      properties:\n        id:\n          type: integer\n          format: int32\n        tierId:\n          type: integer\n          format: int32\n        tierName:\n          type: string\n        businessId:\n          type: integer\n          format: int32\n          nullable: true\n        maxStorageSize:\n          type: integer\n          format: int64\n          deprecated: true\n        maxBusinessStorageSize:\n          type: integer\n          format: int64\n        maxBusinessMembersCount:\n          type: integer\n          format: int32\n        maxContactsCount:\n          type: integer\n          format: int32\n      additionalProperties: false\n    LoginRequest:\n      required:\n        - email\n        - password\n      type: object\n      properties:\n        email:\n          type: string\n        password:\n          type: string\n        twoFactorCode:\n          type: string\n          nullable: true\n        twoFactorRecoveryCode:\n          type: string\n          nullable: true\n      additionalProperties: false\n    NotificationsDeviceTokenDeleteDto:\n      required:\n        - token\n      type: object\n      properties:\n        token:\n          maxLength: 511\n          minLength: 1\n          type: string\n      additionalProperties: false\n    NotificationsDeviceTokenUpsertDto:\n      required:\n        - provider\n        - token\n      type: object\n      properties:\n        provider:\n          $ref: '#/components/schemas/PushNotificationsProvider'\n        token:\n          maxLength: 511\n          minLength: 1\n          type: string\n      additionalProperties: false\n    NotificationsTestSendDto:\n      required:\n        - token\n      type: object\n      properties:\n        token:\n          type: string\n          nullable: true\n      additionalProperties: false\n    NumberingSetting:\n      required:\n        - annualInvoicesCount\n        - businessId\n        - createdAt\n        - format\n        - id\n        - isMonthIncluded\n        - lastExternalInvoiceSequenceNumber\n        - sequencePosition\n        - useHyphen\n        - yearFormat\n      type: object\n      properties:\n        id:\n          type: integer\n          format: int64\n        businessId:\n          type: integer\n          format: int64\n        yearFormat:\n          $ref: '#/components/schemas/YearFormat'\n        isMonthIncluded:\n          type: boolean\n        useHyphen:\n          type: boolean\n        prefix:\n          type: string\n          nullable: true\n        suffix:\n          type: string\n          nullable: true\n        sequencePosition:\n          $ref: '#/components/schemas/SequencePosition'\n        annualInvoicesCount:\n          $ref: '#/components/schemas/AnnualInvoicesCount'\n        format:\n          type: string\n        lastExternalInvoiceSequenceNumber:\n          type: integer\n          format: int32\n          nullable: true\n        createdAt:\n          type: string\n          format: date-time\n        updatedAt:\n          type: string\n          format: date-time\n          nullable: true\n      additionalProperties: false\n    NumberingSettingUpsertDto:\n      required:\n        - annualInvoicesCount\n        - isMonthIncluded\n        - prefix\n        - sequencePosition\n        - suffix\n        - useHyphen\n        - yearFormat\n      type: object\n      properties:\n        yearFormat:\n          $ref: '#/components/schemas/YearFormat'\n        isMonthIncluded:\n          type: boolean\n        useHyphen:\n          type: boolean\n        prefix:\n          maxLength: 15\n          minLength: 0\n          type: string\n          nullable: true\n        suffix:\n          maxLength: 15\n          minLength: 0\n          type: string\n          nullable: true\n        sequencePosition:\n          $ref: '#/components/schemas/SequencePosition'\n        annualInvoicesCount:\n          $ref: '#/components/schemas/AnnualInvoicesCount'\n        lastExternalInvoiceSequenceNumber:\n          maximum: 2147483647\n          minimum: 1\n          type: integer\n          format: int32\n          nullable: true\n      additionalProperties: false\n    PaymentMethod:\n      enum:\n        - Cash\n        - BankTransfer\n      type: string\n    PersonalDocumentsSummary:\n      required:\n        - documentsCount\n        - documentsSize\n        - maxStorageSize\n      type: object\n      properties:\n        documentsCount:\n          type: integer\n          format: int32\n        documentsSize:\n          type: integer\n          format: int64\n        maxStorageSize:\n          type: integer\n          format: int64\n      additionalProperties: false\n    PushNotificationsProvider:\n      enum:\n        - 1\n        - 2\n      type: integer\n      format: int32\n    RecurrenceType:\n      enum:\n        - Daily\n        - Weekly\n        - Monthly\n        - Yearly\n      type: string\n    RecurringTask:\n      required:\n        - accountantFullName\n        - accountantId\n        - accountingCompanyId\n        - accountingCompanyName\n        - businesses\n        - details\n        - documentTypeId\n        - documentTypeName\n        - executeAt\n        - id\n        - interval\n        - isActive\n        - period\n        - title\n      type: object\n      properties:\n        id:\n          type: integer\n          format: int64\n        title:\n          type: string\n        details:\n          type: string\n        accountingCompanyId:\n          type: integer\n          format: int32\n        accountingCompanyName:\n          type: string\n        accountantId:\n          type: integer\n          format: int32\n          nullable: true\n        accountantFullName:\n          type: string\n          nullable: true\n        recurrenceType:\n          $ref: '#/components/schemas/RecurrenceType'\n        period:\n          $ref: '#/components/schemas/RecurrenceType'\n        interval:\n          maximum: 2147483647\n          minimum: 1\n          type: integer\n          format: int32\n        executeAt:\n          type: string\n          format: date\n        isActive:\n          type: boolean\n        businesses:\n          type: array\n          items:\n            $ref: '#/components/schemas/RecurringTaskBusiness'\n        documentTypeId:\n          type: integer\n          format: int32\n        documentTypeName:\n          type: string\n      additionalProperties: false\n    RecurringTaskBusiness:\n      required:\n        - id\n        - name\n      type: object\n      properties:\n        id:\n          type: integer\n          format: int64\n        name:\n          type: string\n      additionalProperties: false\n    RecurringTaskCreateDto:\n      required:\n        - accountingCompanyId\n        - businessIds\n        - details\n        - documentTypeId\n        - firstTaskDueAt\n        - recurrenceType\n        - title\n      type: object\n      properties:\n        title:\n          maxLength: 255\n          minLength: 1\n          type: string\n        details:\n          maxLength: 4096\n          minLength: 1\n          type: string\n        recurrenceType:\n          $ref: '#/components/schemas/RecurrenceType'\n        interval:\n          maximum: 2147483647\n          minimum: 1\n          type: integer\n          format: int32\n        firstTaskDueAt:\n          type: string\n          format: date\n        accountingCompanyId:\n          type: integer\n          format: int32\n        businessIds:\n          type: array\n          items:\n            type: integer\n            format: int32\n        documentTypeId:\n          type: integer\n          format: int32\n      additionalProperties: false\n    RecurringTaskUpdateDto:\n      type: object\n      properties:\n        title:\n          maxLength: 255\n          type: string\n          nullable: true\n        details:\n          maxLength: 4096\n          type: string\n          nullable: true\n        isActive:\n          type: boolean\n          nullable: true\n        recurrenceType:\n          $ref: '#/components/schemas/RecurrenceType'\n        interval:\n          maximum: 2147483647\n          minimum: 1\n          type: integer\n          format: int32\n          nullable: true\n        nextTasksCreateAt:\n          type: string\n          format: date\n          nullable: true\n        documentTypeId:\n          type: integer\n          format: int32\n          nullable: true\n      additionalProperties: false\n    RefreshRequest:\n      required:\n        - refreshToken\n      type: object\n      properties:\n        refreshToken:\n          type: string\n      additionalProperties: false\n    RegisterRequest:\n      required:\n        - email\n        - password\n      type: object\n      properties:\n        email:\n          type: string\n        password:\n          type: string\n      additionalProperties: false\n    ResendConfirmationEmailRequest:\n      required:\n        - email\n      type: object\n      properties:\n        email:\n          type: string\n      additionalProperties: false\n    ResetPasswordRequest:\n      required:\n        - email\n        - newPassword\n        - resetCode\n      type: object\n      properties:\n        email:\n          type: string\n        resetCode:\n          type: string\n        newPassword:\n          type: string\n      additionalProperties: false\n    SendFeedbackRequest:\n      required:\n        - message\n        - platform\n        - subject\n        - type\n      type: object\n      properties:\n        type:\n          $ref: '#/components/schemas/FeedbackType'\n        subject:\n          maxLength: 200\n          minLength: 0\n          type: string\n        message:\n          maxLength: 5000\n          minLength: 0\n          type: string\n        platform:\n          maxLength: 50\n          minLength: 0\n          type: string\n        deviceInfo:\n          maxLength: 500\n          minLength: 0\n          type: string\n          nullable: true\n        appVersion:\n          maxLength: 50\n          minLength: 0\n          type: string\n          nullable: true\n        traceId:\n          maxLength: 100\n          minLength: 0\n          type: string\n          nullable: true\n      additionalProperties: false\n    SequencePosition:\n      enum:\n        - Start\n        - End\n      type: string\n    Task:\n      required:\n        - businessId\n        - businessName\n        - details\n        - documentTypeId\n        - documentTypeName\n        - dueAt\n        - id\n        - status\n        - title\n      type: object\n      properties:\n        id:\n          type: integer\n          format: int64\n        title:\n          type: string\n        details:\n          type: string\n        dueAt:\n          type: string\n          format: date\n        status:\n          $ref: '#/components/schemas/TaskStatus'\n        businessId:\n          type: integer\n          format: int32\n        businessName:\n          type: string\n        documentTypeId:\n          type: integer\n          format: int32\n        documentTypeName:\n          type: string\n      additionalProperties: false\n    TaskComment:\n      required:\n        - authorFullName\n        - authorId\n        - content\n        - createdAt\n        - id\n        - taskId\n      type: object\n      properties:\n        id:\n          type: integer\n          format: int64\n        taskId:\n          type: integer\n          format: int64\n          nullable: true\n        content:\n          type: string\n        authorId:\n          type: integer\n          format: int32\n          nullable: true\n        authorFullName:\n          type: string\n          nullable: true\n        createdAt:\n          type: string\n          format: date-time\n      additionalProperties: false\n    TaskRejectDto:\n      required:\n        - reason\n      type: object\n      properties:\n        reason:\n          minLength: 1\n          type: string\n      additionalProperties: false\n    TaskStatus:\n      enum:\n        - PendingClient\n        - PendingAccountant\n        - Completed\n        - Canceled\n      type: string\n    TaskSubmitDto:\n      required:\n        - answer\n      type: object\n      properties:\n        answer:\n          maxLength: 4096\n          type: string\n          nullable: true\n      additionalProperties: false\n    TaskUpdateDto:\n      required:\n        - details\n        - dueAt\n        - title\n      type: object\n      properties:\n        title:\n          minLength: 1\n          type: string\n        details:\n          minLength: 1\n          type: string\n        dueAt:\n          type: string\n          format: date\n        documentTypeId:\n          type: integer\n          format: int32\n          nullable: true\n      additionalProperties: false\n    TasksCreateDto:\n      required:\n        - businessIds\n        - details\n        - dueAt\n        - title\n      type: object\n      properties:\n        businessIds:\n          type: array\n          items:\n            type: integer\n            format: int32\n        documentTypeId:\n          type: integer\n          format: int32\n        title:\n          minLength: 1\n          type: string\n        details:\n          minLength: 1\n          type: string\n        dueAt:\n          type: string\n          format: date\n      additionalProperties: false\n    TwoFactorRequest:\n      type: object\n      properties:\n        enable:\n          type: boolean\n          nullable: true\n        twoFactorCode:\n          type: string\n          nullable: true\n        resetSharedKey:\n          type: boolean\n        resetRecoveryCodes:\n          type: boolean\n        forgetMachine:\n          type: boolean\n      additionalProperties: false\n    TwoFactorResponse:\n      required:\n        - isMachineRemembered\n        - isTwoFactorEnabled\n        - recoveryCodesLeft\n        - sharedKey\n      type: object\n      properties:\n        sharedKey:\n          type: string\n        recoveryCodesLeft:\n          type: integer\n          format: int32\n        recoveryCodes:\n          type: array\n          items:\n            type: string\n          nullable: true\n        isTwoFactorEnabled:\n          type: boolean\n        isMachineRemembered:\n          type: boolean\n      additionalProperties: false\n    User:\n      required:\n        - email\n        - emailConfirmed\n        - fullName\n        - id\n        - isAccountant\n        - phoneNumber\n      type: object\n      properties:\n        id:\n          type: integer\n          format: int32\n        email:\n          type: string\n          nullable: true\n        emailConfirmed:\n          type: boolean\n        fullName:\n          type: string\n        phoneNumber:\n          type: string\n          nullable: true\n        isAccountant:\n          type: boolean\n      additionalProperties: false\n    UserUpdateDto:\n      type: object\n      properties:\n        firstName:\n          minLength: 1\n          type: string\n          nullable: true\n        lastName:\n          minLength: 1\n          type: string\n          nullable: true\n        phoneNumber:\n          type: string\n          format: tel\n          nullable: true\n      additionalProperties: false\n    YearFormat:\n      enum:\n        - Full\n        - Short\n      type: string\n"
  },
  {
    "path": "specs/3.0.x/sdk-nested-classes.yaml",
    "content": "openapi: 3.0.3\ninfo:\n  title: OpenAPI 3.0 sdk nested classes example\n  version: 1.0.0\n  description: Test schema for nested class generation with various operationId patterns\nservers:\n  - url: https://api.example.com/v1\npaths:\n  /business/providers/domains:\n    get:\n      tags:\n        - business\n        - providers\n        - domains\n      operationId: business.providers.domains.get\n      responses:\n        '200':\n          description: OK\n          content:\n            '*/*':\n              schema:\n                type: string\n    post:\n      tags:\n        - providers\n        - domains\n        - business\n      operationId: business.providers.domains.post\n      responses:\n        '200':\n          description: OK\n          content:\n            '*/*':\n              schema:\n                type: string\n    put:\n      tags:\n        - domains\n      responses:\n        '200':\n          description: OK\n          content:\n            '*/*':\n              schema:\n                type: string\n  /locations/businesses:\n    get:\n      tags:\n        - locations\n        - business\n      operationId: business.get\n      responses:\n        '200':\n          description: OK\n          content:\n            '*/*':\n              schema:\n                type: string\n  /locations:\n    get:\n      tags:\n        - locations\n      operationId: get\n      responses:\n        '200':\n          description: OK\n          content:\n            '*/*':\n              schema:\n                type: string\n"
  },
  {
    "path": "specs/3.0.x/security-api-key.yaml",
    "content": "openapi: 3.0.4\ninfo:\n  title: OpenAPI 3.0.4 security api key example\n  version: '1'\npaths:\n  /foo:\n    get:\n      responses:\n        '200':\n          description: OK\n      security:\n        - foo: []\n  /bar:\n    get:\n      responses:\n        '200':\n          description: OK\n      security:\n        - bar: []\ncomponents:\n  securitySchemes:\n    foo:\n      in: query\n      name: foo\n      type: apiKey\n    bar:\n      in: cookie\n      name: bar\n      type: apiKey\n"
  },
  {
    "path": "specs/3.0.x/security-http-bearer.json",
    "content": "{\n  \"openapi\": \"3.0.4\",\n  \"info\": {\n    \"title\": \"OpenAPI 3.0.4 security bearer example\",\n    \"version\": \"1\"\n  },\n  \"paths\": {\n    \"/foo\": {\n      \"get\": {\n        \"responses\": {\n          \"200\": {\n            \"description\": \"OK\"\n          }\n        },\n        \"security\": [\n          {\n            \"foo\": []\n          }\n        ]\n      }\n    }\n  },\n  \"components\": {\n    \"securitySchemes\": {\n      \"foo\": {\n        \"bearerFormat\": \"JWT\",\n        \"scheme\": \"bearer\",\n        \"type\": \"http\"\n      }\n    }\n  }\n}\n"
  },
  {
    "path": "specs/3.0.x/security-oauth2.yaml",
    "content": "openapi: 3.0.4\ninfo:\n  title: OpenAPI 3.0.4 security oauth2 example\n  version: '1'\npaths:\n  /foo:\n    get:\n      responses:\n        '200':\n          description: OK\n      security:\n        - foo: []\ncomponents:\n  securitySchemes:\n    foo:\n      flows:\n        authorizationCode:\n          authorizationUrl: '/'\n          tokenUrl: '/'\n          scopes: {}\n        clientCredentials:\n          tokenUrl: '/'\n          scopes: {}\n        implicit:\n          authorizationUrl: '/'\n          scopes: {}\n        password:\n          scopes: {}\n          tokenUrl: '/'\n      type: 'oauth2'\n"
  },
  {
    "path": "specs/3.0.x/security-open-id-connect.yaml",
    "content": "openapi: 3.0.4\ninfo:\n  title: OpenAPI 3.0.4 security OpenID Connect example\n  version: '1'\npaths:\n  /foo:\n    get:\n      responses:\n        '200':\n          description: OK\n      security:\n        - foo: []\ncomponents:\n  securitySchemes:\n    foo:\n      openIdConnectUrl: 'https://example.com/.well-known/openid-configuration'\n      type: 'openIdConnect'\n"
  },
  {
    "path": "specs/3.0.x/servers.yaml",
    "content": "openapi: 3.0.4\ninfo:\n  title: OpenAPI 3.0.4 servers example\n  version: 1\nservers:\n  - url: https://foo.com/v1\n    description: foo\n  - url: /v1\npaths:\n  /foo:\n    get:\n      responses:\n        '200':\n          content:\n            '*/*':\n              schema:\n                type: string\n          description: OK\n"
  },
  {
    "path": "specs/3.0.x/transformers-all-of.yaml",
    "content": "openapi: 3.0.1\ninfo:\n  title: OpenAPI 3.0.1 transformers all of example\n  version: 1\npaths:\n  /foo:\n    get:\n      responses:\n        '200':\n          content:\n            '*/*':\n              schema:\n                $ref: '#/components/schemas/Foo'\n          description: OK\ncomponents:\n  schemas:\n    Foo:\n      type: object\n      properties:\n        foo:\n          type: array\n          items:\n            $ref: '#/components/schemas/Bar'\n      required:\n        - foo\n    Bar:\n      type: object\n      properties:\n        foo:\n          type: array\n          items:\n            oneOf:\n              - $ref: '#/components/schemas/Baz'\n        bar:\n          type: string\n          enum:\n            - foo\n            - bar\n            - baz\n      required:\n        - foo\n        - bar\n    Baz:\n      type: object\n      allOf:\n        - $ref: '#/components/schemas/Qux'\n        - type: object\n          properties:\n            foo:\n              format: int32\n              type: integer\n            bar:\n              format: date-time\n              type: string\n            baz:\n              type: string\n              enum:\n                - foo\n                - bar\n                - baz\n            qux:\n              format: int32\n              type: integer\n      required:\n        - foo\n        - bar\n        - baz\n        - qux\n    Qux:\n      type: object\n      discriminator:\n        propertyName: id\n      properties:\n        foo:\n          type: integer\n          format: int32\n        bar:\n          type: number\n        baz:\n          format: date-time\n          type: string\n        id:\n          type: string\n      required:\n        - foo\n        - bar\n        - id\n"
  },
  {
    "path": "specs/3.0.x/transformers-allof-response-wrapper.json",
    "content": "{\n  \"openapi\": \"3.0.0\",\n  \"info\": {\n    \"title\": \"Test Paginated Response\",\n    \"version\": \"1.0.0\"\n  },\n  \"components\": {\n    \"schemas\": {\n      \"PaginatedResponse\": {\n        \"type\": \"object\",\n        \"properties\": {\n          \"meta\": {\n            \"type\": \"object\",\n            \"properties\": {\n              \"page\": {\n                \"type\": \"number\"\n              },\n              \"limit\": {\n                \"type\": \"number\"\n              },\n              \"total\": {\n                \"type\": \"number\"\n              },\n              \"totalPages\": {\n                \"type\": \"number\"\n              }\n            }\n          }\n        }\n      },\n      \"RepositorySecret\": {\n        \"type\": \"object\",\n        \"properties\": {\n          \"id\": {\n            \"type\": \"number\"\n          },\n          \"name\": {\n            \"type\": \"string\"\n          },\n          \"createdAt\": {\n            \"format\": \"date-time\",\n            \"type\": \"string\"\n          },\n          \"updatedAt\": {\n            \"format\": \"date-time\",\n            \"type\": \"string\"\n          }\n        },\n        \"required\": [\"id\", \"name\", \"createdAt\", \"updatedAt\"]\n      }\n    }\n  },\n  \"paths\": {\n    \"/secrets\": {\n      \"get\": {\n        \"operationId\": \"listSecrets\",\n        \"responses\": {\n          \"200\": {\n            \"description\": \"OK\",\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"title\": \"PaginatedResponseRepositorySecret\",\n                  \"allOf\": [\n                    {\n                      \"$ref\": \"#/components/schemas/PaginatedResponse\"\n                    },\n                    {\n                      \"properties\": {\n                        \"data\": {\n                          \"type\": \"array\",\n                          \"items\": {\n                            \"$ref\": \"#/components/schemas/RepositorySecret\"\n                          }\n                        }\n                      }\n                    }\n                  ]\n                }\n              }\n            }\n          }\n        }\n      }\n    },\n    \"/secrets/{id}\": {\n      \"post\": {\n        \"operationId\": \"createSecret\",\n        \"responses\": {\n          \"201\": {\n            \"description\": \"Created\",\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"$ref\": \"#/components/schemas/RepositorySecret\"\n                }\n              }\n            }\n          }\n        }\n      }\n    }\n  },\n  \"servers\": [\n    {\n      \"url\": \"{protocol}://specs\",\n      \"variables\": {\n        \"protocol\": {\n          \"default\": \"https\",\n          \"enum\": [\"http\", \"https\"]\n        }\n      }\n    }\n  ]\n}\n"
  },
  {
    "path": "specs/3.0.x/transformers-any-of-null.json",
    "content": "{\n  \"openapi\": \"3.0.3\",\n  \"info\": {\n    \"title\": \"OpenAPI 3.0.3 transformers any of null example\",\n    \"version\": \"1\"\n  },\n  \"paths\": {\n    \"/foo\": {\n      \"get\": {\n        \"responses\": {\n          \"200\": {\n            \"description\": \"OK\",\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"type\": \"array\",\n                  \"items\": {\n                    \"$ref\": \"#/components/schemas/Foo\"\n                  }\n                }\n              }\n            }\n          }\n        }\n      }\n    },\n    \"/polls\": {\n      \"get\": {\n        \"operationId\": \"getPoll\",\n        \"responses\": {\n          \"200\": {\n            \"description\": \"OK\",\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"$ref\": \"#/components/schemas/Poll\"\n                }\n              }\n            }\n          }\n        }\n      }\n    },\n    \"/polls/nullable\": {\n      \"get\": {\n        \"operationId\": \"getNullablePoll\",\n        \"responses\": {\n          \"200\": {\n            \"description\": \"OK\",\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"anyOf\": [\n                    {\n                      \"$ref\": \"#/components/schemas/Poll\"\n                    }\n                  ],\n                  \"nullable\": true\n                }\n              }\n            }\n          }\n        }\n      }\n    }\n  },\n  \"components\": {\n    \"schemas\": {\n      \"Poll\": {\n        \"type\": \"object\",\n        \"properties\": {\n          \"id\": {\n            \"type\": \"integer\"\n          },\n          \"createdAt\": {\n            \"type\": \"string\",\n            \"format\": \"date-time\"\n          }\n        },\n        \"required\": [\"id\", \"createdAt\"]\n      },\n      \"Foo\": {\n        \"type\": \"object\",\n        \"properties\": {\n          \"foo\": {\n            \"type\": \"string\",\n            \"format\": \"date-time\"\n          },\n          \"bar\": {\n            \"anyOf\": [\n              {\n                \"type\": \"string\",\n                \"nullable\": true,\n                \"format\": \"date-time\"\n              }\n            ]\n          },\n          \"requiredBaz\": {\n            \"anyOf\": [\n              {\n                \"type\": \"string\",\n                \"nullable\": true,\n                \"format\": \"date-time\"\n              }\n            ]\n          }\n        },\n        \"required\": [\"requiredBaz\"]\n      }\n    }\n  }\n}\n"
  },
  {
    "path": "specs/3.0.x/transformers-array.json",
    "content": "{\n  \"openapi\": \"3.0.1\",\n  \"info\": {\n    \"title\": \"OpenAPI 3.0.1 transformers array example\",\n    \"version\": \"1\"\n  },\n  \"paths\": {\n    \"/foo\": {\n      \"get\": {\n        \"responses\": {\n          \"200\": {\n            \"description\": \"OK\",\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"type\": \"object\",\n                  \"properties\": {\n                    \"foo\": {\n                      \"type\": \"array\",\n                      \"items\": {\n                        \"type\": \"object\",\n                        \"properties\": {\n                          \"baz\": {\n                            \"type\": \"string\",\n                            \"format\": \"date-time\"\n                          }\n                        },\n                        \"required\": [\"baz\"]\n                      }\n                    }\n                  },\n                  \"required\": [\"foo\"]\n                }\n              }\n            }\n          }\n        }\n      }\n    }\n  }\n}\n"
  },
  {
    "path": "specs/3.0.x/transformers-recursive.json",
    "content": "{\n  \"openapi\": \"3.0.3\",\n  \"info\": {\n    \"title\": \"Recursive Schema Test\",\n    \"version\": \"1.0.0\"\n  },\n  \"paths\": {\n    \"/tree\": {\n      \"get\": {\n        \"operationId\": \"getTree\",\n        \"responses\": {\n          \"200\": {\n            \"description\": \"Success\",\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"type\": \"array\",\n                  \"items\": {\n                    \"$ref\": \"#/components/schemas/TreeNode\"\n                  }\n                }\n              }\n            }\n          }\n        }\n      }\n    }\n  },\n  \"components\": {\n    \"schemas\": {\n      \"TreeNode\": {\n        \"type\": \"object\",\n        \"properties\": {\n          \"id\": {\n            \"type\": \"string\"\n          },\n          \"name\": {\n            \"type\": \"string\"\n          },\n          \"createdAt\": {\n            \"type\": \"string\",\n            \"format\": \"date-time\"\n          },\n          \"children\": {\n            \"type\": \"array\",\n            \"items\": {\n              \"$ref\": \"#/components/schemas/TreeNode\"\n            }\n          }\n        }\n      }\n    }\n  }\n}\n"
  },
  {
    "path": "specs/3.0.x/transforms-read-write.yaml",
    "content": "openapi: 3.0.4\ninfo:\n  title: OpenAPI 3.0.4 transforms read write example\n  version: 1\npaths:\n  /foo-read-write:\n    post:\n      requestBody:\n        content:\n          'application/json':\n            schema:\n              $ref: '#/components/schemas/FooReadWrite'\n        required: true\n      responses:\n        '200':\n          content:\n            '*/*':\n              schema:\n                $ref: '#/components/schemas/FooReadWrite'\n          description: OK\n  /foo-read:\n    post:\n      requestBody:\n        content:\n          'application/json':\n            schema:\n              $ref: '#/components/schemas/FooRead'\n        required: true\n      responses:\n        '200':\n          content:\n            '*/*':\n              schema:\n                $ref: '#/components/schemas/FooRead'\n          description: OK\n  /foo-write:\n    post:\n      requestBody:\n        content:\n          'application/json':\n            schema:\n              $ref: '#/components/schemas/FooWrite'\n        required: true\n      responses:\n        '200':\n          content:\n            '*/*':\n              schema:\n                $ref: '#/components/schemas/FooWrite'\n          description: OK\ncomponents:\n  schemas:\n    FooReadWrite:\n      allOf:\n        - $ref: '#/components/schemas/BarRead'\n        - type: object\n          properties:\n            foo:\n              writeOnly: true\n              type: string\n    FooRead:\n      allOf:\n        - $ref: '#/components/schemas/BarRead'\n        - type: object\n          properties:\n            foo:\n              readOnly: true\n              type: string\n    FooWrite:\n      allOf:\n        - $ref: '#/components/schemas/BarWrite'\n        - type: object\n          properties:\n            foo:\n              writeOnly: true\n              type: string\n    BarRead:\n      anyOf:\n        - $ref: '#/components/schemas/Baz'\n        - type: object\n          properties:\n            bar:\n              readOnly: true\n              type: string\n    BarWrite:\n      anyOf:\n        - $ref: '#/components/schemas/Baz'\n        - type: object\n          properties:\n            bar:\n              writeOnly: true\n              type: string\n    Baz:\n      type: object\n      properties:\n        baz:\n          type: string\n    QuxAllRead:\n      type: object\n      properties:\n        baz:\n          readOnly: true\n          type: string\n    Quux:\n      type: object\n      properties:\n        baz:\n          type: array\n          items:\n            $ref: '#/components/schemas/Baz'\n        qux:\n          $ref: '#/components/schemas/QuxAllRead'\n    Corge:\n      type: object\n      properties:\n        foo:\n          type: object\n          properties:\n            baz:\n              type: boolean\n              writeOnly: true\n        bar:\n          type: object\n          properties:\n            baz:\n              type: boolean\n              readOnly: true\n"
  },
  {
    "path": "specs/3.0.x/transforms-schemas-name-collision.yaml",
    "content": "openapi: 3.0.3\ninfo:\n  title: Schema Name Collision Test\n  version: 1.0.0\npaths:\n  /test:\n    get:\n      responses:\n        '200':\n          description: Success\n          content:\n            application/json:\n              schema:\n                type: object\n                properties:\n                  user1:\n                    $ref: '#/components/schemas/User_v1_User'\n                  user2:\n                    $ref: '#/components/schemas/User'\n                  user3:\n                    $ref: '#/components/schemas/User_v2_User'\ncomponents:\n  schemas:\n    User_v1_User:\n      type: object\n      properties:\n        id:\n          type: string\n        version:\n          type: string\n          enum: ['v1']\n    User:\n      type: object\n      properties:\n        name:\n          type: string\n    User_v2_User:\n      type: object\n      properties:\n        email:\n          type: string\n        version:\n          type: string\n          enum: ['v2']\n"
  },
  {
    "path": "specs/3.0.x/transforms-schemas-name.yaml",
    "content": "openapi: 3.0.3\ninfo:\n  title: Schema Name Transform Test\n  version: 1.0.0\npaths:\n  /users:\n    get:\n      summary: Get users\n      responses:\n        '200':\n          description: Success\n          content:\n            application/json:\n              schema:\n                $ref: '#/components/schemas/User_v1_0_0_User'\n  /posts:\n    post:\n      summary: Create post\n      requestBody:\n        content:\n          application/json:\n            schema:\n              $ref: '#/components/schemas/Post_v2_1_3_Post'\n      responses:\n        '201':\n          description: Created\n          content:\n            application/json:\n              schema:\n                $ref: '#/components/schemas/Post_v2_1_3_Post'\ncomponents:\n  schemas:\n    User_v1_0_0_User:\n      type: object\n      properties:\n        id:\n          type: string\n        name:\n          type: string\n        profile:\n          $ref: '#/components/schemas/UserProfile_v1_0_0_UserProfile'\n    UserProfile_v1_0_0_UserProfile:\n      type: object\n      properties:\n        bio:\n          type: string\n        avatar:\n          type: string\n    Post_v2_1_3_Post:\n      type: object\n      properties:\n        id:\n          type: string\n        title:\n          type: string\n        author:\n          $ref: '#/components/schemas/User_v1_0_0_User'\n        comments:\n          type: array\n          items:\n            $ref: '#/components/schemas/Comment_v1_5_2_Comment'\n    Comment_v1_5_2_Comment:\n      type: object\n      properties:\n        id:\n          type: string\n        text:\n          type: string\n        author:\n          $ref: '#/components/schemas/User_v1_0_0_User'\n"
  },
  {
    "path": "specs/3.0.x/type-format.yaml",
    "content": "openapi: 3.0.4\ninfo:\n  title: OpenAPI 3.0.4 type format example\n  version: 1\npaths:\n  /foo:\n    post:\n      responses:\n        '200':\n          description: OK\n          content:\n            'application/json':\n              schema:\n                $ref: '#/components/schemas/Foo'\ncomponents:\n  schemas:\n    Foo:\n      type: object\n      properties:\n        bar:\n          type: integer\n        foo:\n          default: 0\n          format: int64\n          type: integer\n        id:\n          type: string\n          format: typeid\n          example: 'user_123'\n      required:\n        - id\n        - foo\n    Bar:\n      type: object\n      required:\n        - foo\n      properties:\n        foo:\n          type: integer\n      additionalProperties:\n        type: integer\n"
  },
  {
    "path": "specs/3.0.x/type-invalid.json",
    "content": "{\n  \"openapi\": \"3.0.0\",\n  \"info\": {\n    \"title\": \"OpenAPI 3.0.0 type invalid example\",\n    \"version\": \"1\"\n  },\n  \"components\": {\n    \"schemas\": {\n      \"Foo\": {\n        \"type\": \"invalid\"\n      }\n    }\n  }\n}\n"
  },
  {
    "path": "specs/3.0.x/validators.json",
    "content": "{\n  \"openapi\": \"3.0.4\",\n  \"info\": {\n    \"title\": \"OpenAPI 3.0.4 validators example\",\n    \"version\": \"1\"\n  },\n  \"components\": {\n    \"schemas\": {\n      \"Foo\": {\n        \"default\": null,\n        \"nullable\": true,\n        \"properties\": {\n          \"foo\": {\n            \"pattern\": \"^\\\\d{3}-\\\\d{2}-\\\\d{4}$\",\n            \"type\": \"string\"\n          },\n          \"bar\": {\n            \"$ref\": \"#/components/schemas/Bar\"\n          },\n          \"baz\": {\n            \"items\": {\n              \"$ref\": \"#/components/schemas/Foo\"\n            },\n            \"type\": \"array\"\n          },\n          \"qux\": {\n            \"default\": 0,\n            \"exclusiveMinimum\": true,\n            \"minimum\": 0,\n            \"type\": \"integer\"\n          }\n        },\n        \"type\": \"object\"\n      },\n      \"Bar\": {\n        \"properties\": {\n          \"foo\": {\n            \"$ref\": \"#/components/schemas/Foo\"\n          }\n        },\n        \"type\": \"object\"\n      },\n      \"Baz\": {\n        \"default\": \"baz\",\n        \"pattern\": \"foo\\\\nbar\",\n        \"readOnly\": true,\n        \"type\": \"string\"\n      }\n    }\n  }\n}\n"
  },
  {
    "path": "specs/3.1.x/additional-properties-false.json",
    "content": "{\n  \"openapi\": \"3.1.0\",\n  \"info\": {\n    \"title\": \"OpenAPI 3.1.0 additional properties false example\",\n    \"version\": \"1\"\n  },\n  \"components\": {\n    \"schemas\": {\n      \"Foo\": {\n        \"required\": [\"foo\"],\n        \"type\": \"object\",\n        \"properties\": {\n          \"foo\": {\n            \"type\": \"string\"\n          }\n        },\n        \"additionalProperties\": false\n      },\n      \"Bar\": {\n        \"allOf\": [\n          {\n            \"$ref\": \"#/components/schemas/Foo\"\n          },\n          {\n            \"type\": \"object\",\n            \"additionalProperties\": false\n          }\n        ]\n      },\n      \"Baz\": {\n        \"allOf\": [\n          {\n            \"$ref\": \"#/components/schemas/Foo\"\n          },\n          {\n            \"required\": [\"bar\"],\n            \"type\": \"object\",\n            \"properties\": {\n              \"bar\": {\n                \"type\": \"string\"\n              }\n            },\n            \"additionalProperties\": false\n          }\n        ]\n      }\n    }\n  }\n}\n"
  },
  {
    "path": "specs/3.1.x/additional-properties-true.json",
    "content": "{\n  \"openapi\": \"3.1.0\",\n  \"info\": {\n    \"title\": \"OpenAPI 3.1.0 additional properties true example\",\n    \"version\": \"1\"\n  },\n  \"components\": {\n    \"schemas\": {\n      \"Foo\": {\n        \"required\": [\"foo\"],\n        \"type\": \"object\",\n        \"properties\": {\n          \"foo\": {\n            \"type\": \"string\"\n          }\n        },\n        \"additionalProperties\": true\n      },\n      \"Bar\": {\n        \"allOf\": [\n          {\n            \"$ref\": \"#/components/schemas/Foo\"\n          },\n          {\n            \"type\": \"object\",\n            \"additionalProperties\": true\n          }\n        ]\n      },\n      \"Baz\": {\n        \"allOf\": [\n          {\n            \"$ref\": \"#/components/schemas/Foo\"\n          },\n          {\n            \"required\": [\"bar\"],\n            \"type\": \"object\",\n            \"properties\": {\n              \"bar\": {\n                \"type\": \"string\"\n              }\n            },\n            \"additionalProperties\": true\n          }\n        ]\n      },\n      \"Qux\": {\n        \"type\": \"object\",\n        \"additionalProperties\": {}\n      }\n    }\n  }\n}\n"
  },
  {
    "path": "specs/3.1.x/additional-properties-undefined.json",
    "content": "{\n  \"openapi\": \"3.1.1\",\n  \"info\": {\n    \"title\": \"OpenAPI 3.1.1 additional properties undefined example\",\n    \"version\": \"1\"\n  },\n  \"components\": {\n    \"schemas\": {\n      \"Foo\": {\n        \"properties\": {\n          \"foo\": {\n            \"type\": \"object\"\n          }\n        },\n        \"required\": [\"foo\"],\n        \"type\": \"object\"\n      }\n    }\n  }\n}\n"
  },
  {
    "path": "specs/3.1.x/additional-properties.yaml",
    "content": "openapi: 3.1.0\ninfo:\n  title: OpenAPI 3.1.0 additional properties example\n  version: '1'\ncomponents:\n  schemas:\n    ObjectWithAdditionalPropertiesString:\n      type: object\n      properties:\n        headers:\n          type: object\n          additionalProperties:\n            type: string\n    ObjectOnlyAdditionalPropertiesString:\n      type: object\n      additionalProperties:\n        type: string\n    ObjectOnlyAdditionalPropertiesNumber:\n      type: object\n      additionalProperties:\n        type: number\n    ObjectOnlyAdditionalPropertiesBoolean:\n      type: object\n      additionalProperties:\n        type: boolean\n    ObjectWithPropertiesAndAdditionalPropertiesNumber:\n      type: object\n      properties:\n        id:\n          type: string\n        count:\n          type: integer\n      additionalProperties:\n        type: number\n    ObjectWithAdditionalPropertiesObject:\n      type: object\n      properties:\n        metadata:\n          type: object\n          additionalProperties:\n            type: object\n            properties:\n              value:\n                type: string\n    ObjectOnlyAdditionalPropertiesObject:\n      type: object\n      additionalProperties:\n        type: object\n        properties:\n          name:\n            type: string\n    ObjectWithAdditionalPropertiesFalse:\n      type: object\n      properties:\n        id:\n          type: string\n        count:\n          type: integer\n      additionalProperties: false\n    ObjectWithNestedAdditionalPropertiesFalse:\n      type: object\n      properties:\n        membership:\n          type: object\n          properties:\n            status:\n              type: string\n              enum: [approved, declined, pending]\n            calendar_membership_tier_id:\n              type: string\n          additionalProperties: false\n"
  },
  {
    "path": "specs/3.1.x/array-items-all-of.yaml",
    "content": "openapi: 3.1.0\ninfo:\n  title: OpenAPI 3.1.0 array items allOf example\n  version: '1'\ncomponents:\n  schemas:\n    ArrayWithAllOfObjects:\n      type: array\n      items:\n        allOf:\n          - type: object\n            properties:\n              id:\n                type: integer\n          - type: object\n            properties:\n              name:\n                type: string\n    ArrayWithAllOfPrimitives:\n      type: array\n      items:\n        allOf:\n          - type: number\n          - type: string\n    ArrayWithAllOfRefs:\n      type: array\n      items:\n        allOf:\n          - $ref: '#/components/schemas/BaseModel'\n          - type: object\n            properties:\n              extra:\n                type: string\n    BaseModel:\n      type: object\n      properties:\n        id:\n          type: integer\n        createdAt:\n          type: string\n          format: date-time\n"
  },
  {
    "path": "specs/3.1.x/array-items-one-of-length-1.yaml",
    "content": "openapi: 3.1.0\ninfo:\n  title: OpenAPI 3.1.0 array items oneOf length 1 example\n  version: '1'\ncomponents:\n  schemas:\n    Foo:\n      type: object\n      properties:\n        foo:\n          type: array\n          items:\n            oneOf:\n              - $ref: '#/components/schemas/Bar'\n          maxItems: 2147483647\n          minItems: 1\n    Bar:\n      type: string\n"
  },
  {
    "path": "specs/3.1.x/array-nested-one-of.yaml",
    "content": "openapi: 3.1.1\ninfo:\n  title: OpenAPI 3.1.1 array nested one of example\n  version: 1\ncomponents:\n  schemas:\n    Foo:\n      oneOf:\n        - type: array\n          items:\n            oneOf:\n              - type: object\n                properties:\n                  foo:\n                    type: string\n                  bar:\n                    type: string\n              - type: object\n                properties:\n                  baz:\n                    type: string\n                  qux:\n                    type: string\n        - type: array\n          items:\n            type: object\n            properties:\n              foo:\n                type: string\n              bar:\n                type: string\n"
  },
  {
    "path": "specs/3.1.x/body-nested-array.yaml",
    "content": "openapi: 3.1.1\ninfo:\n  title: OpenAPI 3.1.1 body nested array example\n  version: 1\npaths:\n  /foo:\n    post:\n      requestBody:\n        content:\n          'multipart/form-data':\n            schema:\n              properties:\n                foo:\n                  items:\n                    items:\n                      type: integer\n                    type: array\n                  type: array\n              required:\n                - foo\n              type: object\n        required: true\n      responses:\n        '200':\n          description: OK\n"
  },
  {
    "path": "specs/3.1.x/body-response-text-plain.yaml",
    "content": "openapi: 3.1.1\ninfo:\n  title: OpenAPI 3.1.1 body response text plain example\n  version: 1\npaths:\n  /foo:\n    post:\n      requestBody:\n        content:\n          'text/plain':\n            schema:\n              type: string\n        required: true\n      responses:\n        '200':\n          description: OK\n          content:\n            text/plain:\n              schema:\n                type: string\n"
  },
  {
    "path": "specs/3.1.x/case.yaml",
    "content": "openapi: 3.1.0\ninfo:\n  title: OpenAPI 3.1.0 case example\n  version: '1'\npaths:\n  /foo:\n    get:\n      parameters:\n        - description: 'original name: fooBar'\n          in: query\n          name: fooBar\n          required: true\n          schema:\n            type: string\n        - description: 'original name: BarBaz'\n          in: query\n          name: BarBaz\n          required: true\n          schema:\n            type: string\n        - description: 'original name: qux_quux'\n          in: query\n          name: qux_quux\n          required: true\n          schema:\n            type: string\n      requestBody:\n        required: true\n        content:\n          application/json:\n            schema:\n              $ref: '#/components/schemas/Foo'\n      responses:\n        '200':\n          description: OK\n          content:\n            application/json:\n              schema:\n                $ref: '#/components/schemas/Foo'\n        '201':\n          description: OK\n          content:\n            application/json:\n              schema:\n                $ref: '#/components/schemas/201'\ncomponents:\n  schemas:\n    '201':\n      description: 'original name: 201'\n      type: number\n    Foo:\n      description: 'original name: Foo'\n      properties:\n        fooBar:\n          description: 'original name: fooBar'\n          $ref: '#/components/schemas/foo_bar'\n        BarBaz:\n          description: 'original name: BarBaz'\n          $ref: '#/components/schemas/Foo'\n        qux_quux:\n          description: 'original name: qux_quux'\n          properties:\n            fooBar:\n              description: 'original name: fooBar'\n              $ref: '#/components/schemas/fooBar'\n            BarBaz:\n              description: 'original name: BarBaz'\n              $ref: '#/components/schemas/FooBar'\n            qux_quux:\n              description: 'original name: qux_quux'\n              type: boolean\n          required:\n            - fooBar\n            - BarBaz\n            - qux_quux\n          type: object\n      required:\n        - fooBar\n        - BarBaz\n        - qux_quux\n      type: object\n    foo_bar:\n      description: 'original name: foo_bar'\n      type: boolean\n    fooBar:\n      description: 'original name: fooBar'\n      type: number\n    FooBar:\n      description: 'original name: FooBar'\n      type: string\n"
  },
  {
    "path": "specs/3.1.x/components-request-bodies.json",
    "content": "{\n  \"openapi\": \"3.1.1\",\n  \"info\": {\n    \"title\": \"OpenAPI 3.1.1 components request bodies example\",\n    \"version\": \"1\"\n  },\n  \"paths\": {\n    \"/foo\": {\n      \"post\": {\n        \"requestBody\": {\n          \"$ref\": \"#/components/requestBodies/Foo\"\n        },\n        \"responses\": {\n          \"200\": {\n            \"description\": \"OK\"\n          }\n        }\n      }\n    }\n  },\n  \"components\": {\n    \"requestBodies\": {\n      \"Foo\": {\n        \"description\": \"Foo\",\n        \"required\": true,\n        \"content\": {\n          \"application/json\": {\n            \"schema\": {\n              \"type\": \"object\",\n              \"properties\": {\n                \"page\": {\n                  \"type\": \"number\"\n                }\n              }\n            }\n          }\n        }\n      }\n    }\n  }\n}\n"
  },
  {
    "path": "specs/3.1.x/const-values.yaml",
    "content": "openapi: 3.1.0\ninfo:\n  title: OpenAPI 3.1.0 const values example\n  version: '1'\ncomponents:\n  schemas:\n    NumberNoFormat:\n      type: number\n      const: 42.5\n    IntegerNoFormat:\n      type: integer\n      const: -1\n    NumberInt8:\n      type: number\n      format: int8\n      const: 100\n    NumberInt16:\n      type: number\n      format: int16\n      const: 1000\n    NumberInt32:\n      type: number\n      format: int32\n      const: 100000\n    NumberInt64:\n      type: number\n      format: int64\n      const: 1000000000000\n    NumberUint8:\n      type: number\n      format: uint8\n      const: 200\n    NumberUint16:\n      type: number\n      format: uint16\n      const: 50000\n    NumberUint32:\n      type: number\n      format: uint32\n      const: 3000000000\n    NumberUint64:\n      type: number\n      format: uint64\n      const: 18000000000000000000\n    IntegerInt8:\n      type: integer\n      format: int8\n      const: -100\n    IntegerInt16:\n      type: integer\n      format: int16\n      const: -1000\n    IntegerInt32:\n      type: integer\n      format: int32\n      const: -100000\n    IntegerInt64:\n      type: integer\n      format: int64\n      const: -1000000000000\n    IntegerUint8:\n      type: integer\n      format: uint8\n      const: 255\n    IntegerUint16:\n      type: integer\n      format: uint16\n      const: 65535\n    IntegerUint32:\n      type: integer\n      format: uint32\n      const: 4294967295\n    IntegerUint64:\n      type: integer\n      format: uint64\n      const: 1000000000000\n    StringInt64:\n      type: string\n      format: int64\n      const: '-9223372036854775808'\n    StringUint64:\n      type: string\n      format: uint64\n      const: '18446744073709551615'\n    StringInt64n:\n      type: string\n      format: int64\n      const: '-9223372036854775808n'\n    StringUint64n:\n      type: string\n      format: uint64\n      const: '18446744073709551615n'\n"
  },
  {
    "path": "specs/3.1.x/const.json",
    "content": "{\n  \"openapi\": \"3.1.0\",\n  \"info\": {\n    \"title\": \"OpenAPI 3.1.0 const example\",\n    \"version\": \"1\"\n  },\n  \"paths\": {\n    \"/foo\": {\n      \"get\": {\n        \"responses\": {\n          \"200\": {\n            \"description\": \"OK\",\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"const\": \"First line.\\n\\nSecond line.\\n\\nPS: I love you.\",\n                  \"type\": \"string\"\n                }\n              }\n            }\n          }\n        }\n      }\n    }\n  }\n}\n"
  },
  {
    "path": "specs/3.1.x/content-binary.json",
    "content": "{\n  \"openapi\": \"3.1.0\",\n  \"info\": {\n    \"title\": \"OpenAPI 3.1.0 content binary example\",\n    \"version\": \"1\"\n  },\n  \"paths\": {\n    \"/foo\": {\n      \"get\": {\n        \"responses\": {\n          \"200\": {\n            \"content\": {\n              \"image/png\": {\n                \"schema\": {\n                  \"type\": \"string\",\n                  \"contentMediaType\": \"image/png\",\n                  \"contentEncoding\": \"base64\"\n                }\n              }\n            }\n          }\n        }\n      }\n    },\n    \"/bar\": {\n      \"get\": {\n        \"responses\": {\n          \"200\": {\n            \"content\": {\n              \"application/zip\": {}\n            }\n          }\n        }\n      }\n    }\n  }\n}\n"
  },
  {
    "path": "specs/3.1.x/content-media-type.yaml",
    "content": "openapi: 3.1.0\ninfo:\n  title: OpenAPI 3.1.0 contentMediaType example\n  version: '1'\npaths:\n  /upload:\n    post:\n      operationId: uploadFile\n      requestBody:\n        content:\n          multipart/form-data:\n            schema:\n              $ref: '#/components/schemas/FileUploadRequest'\n      responses:\n        '200':\n          description: OK\n  /upload-typed:\n    post:\n      operationId: uploadFileTyped\n      requestBody:\n        content:\n          multipart/form-data:\n            schema:\n              $ref: '#/components/schemas/FileUploadRequestTyped'\n      responses:\n        '200':\n          description: OK\ncomponents:\n  schemas:\n    FileUploadRequest:\n      type: object\n      required:\n        - file\n      properties:\n        file:\n          contentMediaType: application/octet-stream\n          description: Binary file content\n    FileUploadRequestTyped:\n      type: object\n      required:\n        - file\n      properties:\n        file:\n          type: string\n          contentMediaType: application/octet-stream\n          description: Binary file content with explicit string type\n"
  },
  {
    "path": "specs/3.1.x/content-types.yaml",
    "content": "openapi: 3.1.0\ninfo:\n  title: OpenAPI 3.1.0 content types example\n  version: '1'\npaths:\n  /foo:\n    get:\n      responses:\n        '200':\n          description: OK\n          content:\n            text/plain:\n              schema:\n                type: string\n            application/json:\n              schema:\n                type: string\n            text/json:\n              schema:\n                type: string\n"
  },
  {
    "path": "specs/3.1.x/defaults-with-ref-and-anyof.json",
    "content": "{\n  \"openapi\": \"3.1.0\",\n  \"info\": {\n    \"title\": \"Defaults with $ref and anyOf\",\n    \"version\": \"1.0.0\"\n  },\n  \"paths\": {},\n  \"components\": {\n    \"schemas\": {\n      \"AudioFormat\": {\n        \"type\": \"string\",\n        \"enum\": [\"pcm_16bit_44.1khz\", \"pcm_16bit_24khz\"]\n      },\n      \"Language\": {\n        \"type\": \"string\",\n        \"enum\": [\"en\", \"es\", \"fr\"]\n      },\n      \"NestedConfig\": {\n        \"type\": \"object\",\n        \"properties\": {\n          \"model\": {\n            \"type\": \"string\",\n            \"default\": \"gpt-4\"\n          },\n          \"temperature\": {\n            \"type\": \"number\",\n            \"default\": 1\n          }\n        },\n        \"required\": [\"model\", \"temperature\"]\n      },\n      \"TestSchema\": {\n        \"type\": \"object\",\n        \"properties\": {\n          \"primitiveDefault\": {\n            \"type\": \"number\",\n            \"default\": 42\n          },\n          \"refWithPrimitiveDefault\": {\n            \"$ref\": \"#/components/schemas/AudioFormat\",\n            \"default\": \"pcm_16bit_44.1khz\"\n          },\n          \"refWithObjectDefault\": {\n            \"$ref\": \"#/components/schemas/NestedConfig\",\n            \"default\": {\n              \"model\": \"gpt-4\",\n              \"temperature\": 1\n            }\n          },\n          \"anyOfWithNullDefault\": {\n            \"anyOf\": [{ \"type\": \"number\" }, { \"type\": \"null\" }],\n            \"default\": null\n          },\n          \"anyOfWithRefAndNullDefault\": {\n            \"anyOf\": [{ \"$ref\": \"#/components/schemas/Language\" }, { \"type\": \"null\" }],\n            \"default\": null\n          },\n          \"optionalAnyOfWithDefault\": {\n            \"anyOf\": [{ \"type\": \"string\" }, { \"type\": \"null\" }],\n            \"default\": null\n          }\n        },\n        \"required\": [\n          \"primitiveDefault\",\n          \"refWithPrimitiveDefault\",\n          \"refWithObjectDefault\",\n          \"anyOfWithNullDefault\",\n          \"anyOfWithRefAndNullDefault\"\n        ]\n      }\n    }\n  }\n}\n"
  },
  {
    "path": "specs/3.1.x/discriminator-all-of.yaml",
    "content": "openapi: 3.1.0\ninfo:\n  title: OpenAPI 3.1.0 discriminator all of example\n  version: 1\ncomponents:\n  schemas:\n    Foo:\n      type: object\n      required:\n        - id\n      properties:\n        id:\n          type: string\n      discriminator:\n        propertyName: id\n    Bar:\n      allOf:\n        - $ref: '#/components/schemas/Foo'\n        - type: object\n          properties:\n            bar:\n              type: string\n    Baz:\n      allOf:\n        - $ref: '#/components/schemas/Foo'\n        - type: object\n          properties:\n            baz:\n              type: string\n    Qux:\n      allOf:\n        - $ref: '#/components/schemas/Foo'\n        - type: object\n          properties:\n            qux:\n              type: boolean\n    FooMapped:\n      type: object\n      required:\n        - id\n      properties:\n        id:\n          type: string\n      discriminator:\n        propertyName: id\n        mapping:\n          bar: '#/components/schemas/BarMapped'\n          baz: '#/components/schemas/BazMapped'\n    BarMapped:\n      allOf:\n        - $ref: '#/components/schemas/FooMapped'\n        - type: object\n          properties:\n            bar:\n              type: string\n    BazMapped:\n      allOf:\n        - $ref: '#/components/schemas/FooMapped'\n        - type: object\n          properties:\n            baz:\n              type: string\n    QuxMapped:\n      allOf:\n        - $ref: '#/components/schemas/FooMapped'\n        - type: object\n          properties:\n            qux:\n              type: boolean\n    FooUnion:\n      oneOf:\n        - $ref: '#/components/schemas/BarUnion'\n        - $ref: '#/components/schemas/BazUnion'\n      discriminator:\n        propertyName: id\n        mapping:\n          bar: '#/components/schemas/BarUnion'\n          baz: '#/components/schemas/BazUnion'\n    BarUnion:\n      type: object\n      properties:\n        id:\n          type: string\n        bar:\n          type: string\n    BazUnion:\n      type: object\n      properties:\n        id:\n          type: string\n        baz:\n          type: string\n    QuxExtend: # this is a schema that extends the FooUnion schema\n      allOf:\n        - $ref: '#/components/schemas/FooUnion'\n"
  },
  {
    "path": "specs/3.1.x/discriminator-allof-inline.json",
    "content": "{\n  \"openapi\": \"3.1.0\",\n  \"info\": {\n    \"title\": \"Discriminator allOf inline schema mapping\",\n    \"version\": \"1.0.0\",\n    \"description\": \"Reproduces a bug where a schema extending a parent whose allOf contains both a $ref (with a discriminator that doesn't map the child) and an inline schema (with a discriminator that does map the child) gets the wrong discriminator value. The inline discriminator mapping should win, not the $ref discriminator fallback.\"\n  },\n  \"paths\": {\n    \"/foos\": {\n      \"get\": {\n        \"responses\": {\n          \"200\": {\n            \"description\": \"OK\",\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"oneOf\": [\n                    { \"$ref\": \"#/components/schemas/Bar\" },\n                    { \"$ref\": \"#/components/schemas/Baz\" },\n                    { \"$ref\": \"#/components/schemas/Qux\" }\n                  ]\n                }\n              }\n            }\n          }\n        }\n      }\n    }\n  },\n  \"components\": {\n    \"schemas\": {\n      \"Foo\": {\n        \"required\": [\"$type\"],\n        \"type\": \"object\",\n        \"properties\": {\n          \"$type\": { \"type\": \"string\" },\n          \"foo\": { \"type\": \"string\" }\n        },\n        \"discriminator\": {\n          \"propertyName\": \"$type\",\n          \"mapping\": {\n            \"FooBar\": \"#/components/schemas/Bar\",\n            \"FooBaz\": \"#/components/schemas/Baz\"\n          }\n        }\n      },\n      \"Bar\": {\n        \"allOf\": [\n          { \"$ref\": \"#/components/schemas/Foo\" },\n          {\n            \"required\": [\"$type\"],\n            \"type\": \"object\",\n            \"properties\": {\n              \"$type\": { \"type\": \"string\" },\n              \"bar\": { \"type\": \"string\" }\n            },\n            \"discriminator\": {\n              \"propertyName\": \"$type\",\n              \"mapping\": {\n                \"BarQux\": \"#/components/schemas/Qux\"\n              }\n            }\n          }\n        ]\n      },\n      \"Baz\": {\n        \"allOf\": [\n          { \"$ref\": \"#/components/schemas/Foo\" },\n          {\n            \"type\": \"object\",\n            \"properties\": {\n              \"baz\": { \"type\": \"string\" }\n            }\n          }\n        ]\n      },\n      \"Qux\": {\n        \"allOf\": [\n          { \"$ref\": \"#/components/schemas/Bar\" },\n          {\n            \"type\": \"object\",\n            \"properties\": {\n              \"qux\": { \"type\": \"string\" }\n            }\n          }\n        ]\n      }\n    }\n  }\n}\n"
  },
  {
    "path": "specs/3.1.x/discriminator-allof-nested.json",
    "content": "{\n  \"openapi\": \"3.1.0\",\n  \"info\": {\n    \"title\": \"Minimal Polymorphic Discriminator Reproduction\",\n    \"version\": \"1.0.0\",\n    \"description\": \"Demonstrates an issue where TypeScript type generation results in wrong discriminator for nested allOf inheritance with discriminators at multiple levels.\"\n  },\n  \"paths\": {\n    \"/cars\": {\n      \"get\": {\n        \"summary\": \"Get cars\",\n        \"responses\": {\n          \"200\": {\n            \"description\": \"List of cars\",\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"type\": \"array\",\n                  \"items\": {\n                    \"oneOf\": [\n                      { \"$ref\": \"#/components/schemas/CarDto\" },\n                      { \"$ref\": \"#/components/schemas/VolvoDto\" }\n                    ]\n                  }\n                }\n              }\n            }\n          }\n        }\n      }\n    }\n  },\n  \"components\": {\n    \"schemas\": {\n      \"VehicleDto\": {\n        \"type\": \"object\",\n        \"required\": [\"$type\", \"id\"],\n        \"properties\": {\n          \"$type\": {\n            \"type\": \"string\"\n          },\n          \"id\": {\n            \"type\": \"integer\"\n          }\n        },\n        \"discriminator\": {\n          \"propertyName\": \"$type\",\n          \"mapping\": {\n            \"Car\": \"#/components/schemas/CarDto\",\n            \"Volvo\": \"#/components/schemas/VolvoDto\"\n          }\n        }\n      },\n      \"CarDto\": {\n        \"allOf\": [\n          { \"$ref\": \"#/components/schemas/VehicleDto\" },\n          {\n            \"type\": \"object\",\n            \"required\": [\"modelName\"],\n            \"properties\": {\n              \"modelName\": {\n                \"type\": \"string\"\n              }\n            }\n          }\n        ]\n      },\n      \"VolvoDto\": {\n        \"allOf\": [\n          { \"$ref\": \"#/components/schemas/CarDto\" },\n          {\n            \"type\": \"object\",\n            \"required\": [\"seatbeltCount\"],\n            \"properties\": {\n              \"seatbeltCount\": {\n                \"type\": \"integer\"\n              }\n            }\n          }\n        ]\n      }\n    }\n  }\n}\n"
  },
  {
    "path": "specs/3.1.x/discriminator-any-of.yaml",
    "content": "openapi: 3.1.0\ninfo:\n  title: OpenAPI 3.1.0 discriminator any of example\n  version: 1\ncomponents:\n  schemas:\n    Foo:\n      anyOf:\n        - $ref: '#/components/schemas/Bar'\n        - $ref: '#/components/schemas/Baz'\n      discriminator:\n        propertyName: type\n    Baz:\n      allOf:\n        - $ref: '#/components/schemas/Qux'\n    Bar:\n      allOf:\n        - $ref: '#/components/schemas/Qux'\n    Spæcial:\n      allOf:\n        - $ref: '#/components/schemas/Qux'\n    Qux:\n      type: object\n      properties:\n        id:\n          type: string\n        type:\n          $ref: '#/components/schemas/Quux'\n      required:\n        - id\n        - type\n    Quux:\n      enum:\n        - Bar\n        - Baz\n      type: string\n    Quuz:\n      anyOf:\n        - $ref: '#/components/schemas/Bar'\n        - $ref: '#/components/schemas/Baz'\n        - $ref: '#/components/schemas/Spæcial'\n      discriminator:\n        propertyName: type\n        mapping:\n          bar: '#/components/schemas/Bar'\n          baz: '#/components/schemas/Baz'\n          'non-ascii': '#/components/schemas/Spæcial'\n"
  },
  {
    "path": "specs/3.1.x/discriminator-mapped-many.yaml",
    "content": "openapi: 3.1.0\ninfo:\n  title: OpenAPI 3.1.0 discriminator mapped many example\n  version: 1\ncomponents:\n  schemas:\n    Foo:\n      oneOf:\n        - $ref: '#/components/schemas/Bar'\n        - $ref: '#/components/schemas/Baz'\n        - $ref: '#/components/schemas/Spæcial'\n      discriminator:\n        propertyName: foo\n        mapping:\n          one: '#/components/schemas/Bar'\n          two: '#/components/schemas/Bar'\n          three: '#/components/schemas/Baz'\n          four: '#/components/schemas/Spæcial'\n    Bar:\n      type: object\n      properties:\n        foo:\n          type: string\n          enum:\n            - one\n            - two\n    Baz:\n      type: object\n      properties:\n        foo:\n          type: string\n          enum:\n            - three\n    Spæcial:\n      type: object\n      properties:\n        foo:\n          type: string\n          enum:\n            - four\n"
  },
  {
    "path": "specs/3.1.x/discriminator-non-string.yaml",
    "content": "openapi: 3.1.0\ninfo:\n  title: Non-string discriminator test\n  version: 1\ncomponents:\n  schemas:\n    # --- Boolean discriminator (oneOf) ---\n    BooleanOneOf:\n      oneOf:\n        - $ref: '#/components/schemas/AutoConfig'\n        - $ref: '#/components/schemas/CustomConfig'\n      discriminator:\n        propertyName: use_custom\n        mapping:\n          'False': '#/components/schemas/AutoConfig'\n          'True': '#/components/schemas/CustomConfig'\n\n    AutoConfig:\n      type: object\n      required:\n        - use_custom\n        - auto_setting\n      properties:\n        use_custom:\n          type: boolean\n          const: false\n        auto_setting:\n          type: string\n\n    CustomConfig:\n      type: object\n      required:\n        - use_custom\n        - custom_value\n      properties:\n        use_custom:\n          type: boolean\n          const: true\n        custom_value:\n          type: integer\n\n    # --- Boolean discriminator (anyOf) ---\n    BooleanAnyOf:\n      anyOf:\n        - $ref: '#/components/schemas/AutoConfig'\n        - $ref: '#/components/schemas/CustomConfig'\n      discriminator:\n        propertyName: use_custom\n        mapping:\n          'False': '#/components/schemas/AutoConfig'\n          'True': '#/components/schemas/CustomConfig'\n\n    # --- Integer discriminator (oneOf) ---\n    IntegerOneOf:\n      oneOf:\n        - $ref: '#/components/schemas/TypeOne'\n        - $ref: '#/components/schemas/TypeTwo'\n      discriminator:\n        propertyName: type_id\n        mapping:\n          '1': '#/components/schemas/TypeOne'\n          '2': '#/components/schemas/TypeTwo'\n\n    TypeOne:\n      type: object\n      required:\n        - type_id\n        - one_data\n      properties:\n        type_id:\n          type: integer\n          const: 1\n        one_data:\n          type: string\n\n    TypeTwo:\n      type: object\n      required:\n        - type_id\n        - two_data\n      properties:\n        type_id:\n          type: integer\n          const: 2\n        two_data:\n          type: string\n\n    # --- Number (float) discriminator (oneOf) ---\n    NumberOneOf:\n      oneOf:\n        - $ref: '#/components/schemas/VersionAlpha'\n        - $ref: '#/components/schemas/VersionBeta'\n      discriminator:\n        propertyName: version\n        mapping:\n          '1.0': '#/components/schemas/VersionAlpha'\n          '2.5': '#/components/schemas/VersionBeta'\n\n    VersionAlpha:\n      type: object\n      required:\n        - version\n        - alpha_field\n      properties:\n        version:\n          type: number\n          const: 1.0\n        alpha_field:\n          type: string\n\n    VersionBeta:\n      type: object\n      required:\n        - version\n        - beta_field\n      properties:\n        version:\n          type: number\n          const: 2.5\n        beta_field:\n          type: string\n\n    # --- Integer discriminator (allOf) ---\n    IntegerAllOfBase:\n      type: object\n      required:\n        - kind\n      properties:\n        kind:\n          type: integer\n      discriminator:\n        propertyName: kind\n        mapping:\n          '1': '#/components/schemas/IntegerAllOfChildA'\n          '2': '#/components/schemas/IntegerAllOfChildB'\n\n    IntegerAllOfChildA:\n      allOf:\n        - $ref: '#/components/schemas/IntegerAllOfBase'\n        - type: object\n          required:\n            - child_a_field\n          properties:\n            child_a_field:\n              type: string\n\n    IntegerAllOfChildB:\n      allOf:\n        - $ref: '#/components/schemas/IntegerAllOfBase'\n        - type: object\n          required:\n            - child_b_field\n          properties:\n            child_b_field:\n              type: string\n\n    # --- 3.1.x-specific: discriminator property with type array (e.g. nullable integer) ---\n    NullableIntegerOneOf:\n      oneOf:\n        - $ref: '#/components/schemas/NullableVariantX'\n        - $ref: '#/components/schemas/NullableVariantY'\n      discriminator:\n        propertyName: tag\n        mapping:\n          '10': '#/components/schemas/NullableVariantX'\n          '20': '#/components/schemas/NullableVariantY'\n\n    NullableVariantX:\n      type: object\n      required:\n        - tag\n        - x_data\n      properties:\n        tag:\n          type:\n            - integer\n            - 'null'\n          const: 10\n        x_data:\n          type: string\n\n    NullableVariantY:\n      type: object\n      required:\n        - tag\n        - y_data\n      properties:\n        tag:\n          type:\n            - integer\n            - 'null'\n          const: 20\n        y_data:\n          type: string\n"
  },
  {
    "path": "specs/3.1.x/discriminator-object-self-mapped.json",
    "content": "{\n  \"openapi\": \"3.1.0\",\n  \"info\": {\n    \"title\": \"Discriminator object schema with self mapping\",\n    \"version\": \"1.0.0\",\n    \"description\": \"Ensures a concrete schema with a discriminator mapping to itself gets a literal discriminator value instead of falling back to string.\"\n  },\n  \"paths\": {\n    \"/blog-posts\": {\n      \"get\": {\n        \"summary\": \"Get blog posts\",\n        \"responses\": {\n          \"200\": {\n            \"description\": \"List of blog posts\",\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"type\": \"array\",\n                  \"items\": {\n                    \"oneOf\": [\n                      { \"$ref\": \"#/components/schemas/BlogPostDto\" },\n                      { \"$ref\": \"#/components/schemas/BlogPostWithImageDto\" }\n                    ]\n                  }\n                }\n              }\n            }\n          }\n        }\n      }\n    }\n  },\n  \"components\": {\n    \"schemas\": {\n      \"BlogPostDto\": {\n        \"type\": \"object\",\n        \"required\": [\"$type\", \"id\", \"title\"],\n        \"properties\": {\n          \"$type\": {\n            \"type\": \"string\"\n          },\n          \"id\": {\n            \"type\": \"integer\"\n          },\n          \"title\": {\n            \"type\": \"string\"\n          }\n        },\n        \"discriminator\": {\n          \"propertyName\": \"$type\",\n          \"mapping\": {\n            \"BlogPost\": \"#/components/schemas/BlogPostDto\",\n            \"BlogPostWithImage\": \"#/components/schemas/BlogPostWithImageDto\"\n          }\n        }\n      },\n      \"BlogPostWithImageDto\": {\n        \"allOf\": [\n          { \"$ref\": \"#/components/schemas/BlogPostDto\" },\n          {\n            \"type\": \"object\",\n            \"required\": [\"imageUrl\"],\n            \"properties\": {\n              \"imageUrl\": {\n                \"type\": \"string\"\n              }\n            }\n          }\n        ]\n      }\n    }\n  }\n}\n"
  },
  {
    "path": "specs/3.1.x/discriminator-one-of-read-write.yaml",
    "content": "openapi: 3.1.0\ninfo:\n  title: OpenAPI 3.1.0 discriminator one of with read/write example\n  version: 1\npaths:\n  /pets:\n    post:\n      requestBody:\n        content:\n          application/json:\n            schema:\n              $ref: '#/components/schemas/CreatePetRequest'\n        required: true\n      responses:\n        '200':\n          content:\n            application/json:\n              schema:\n                $ref: '#/components/schemas/CreatePetResponse'\n          description: OK\ncomponents:\n  schemas:\n    AnimalPayload:\n      type: object\n      required:\n        - typeDiscriminator\n      properties:\n        typeDiscriminator:\n          type: string\n      discriminator:\n        propertyName: typeDiscriminator\n        mapping:\n          dog: '#/components/schemas/DogPayload'\n          cat: '#/components/schemas/CatPayload'\n\n    DogPayload:\n      allOf:\n        - $ref: '#/components/schemas/AnimalPayload'\n        - type: object\n          required:\n            - breed\n            - canFetch\n            - displayBreed\n          properties:\n            breed:\n              type: string\n            canFetch:\n              type: boolean\n            displayBreed:\n              type: string\n              readOnly: true\n\n    CatPayload:\n      allOf:\n        - $ref: '#/components/schemas/AnimalPayload'\n        - type: object\n          required:\n            - breed\n            - livesRemaining\n            - displayBreed\n          properties:\n            breed:\n              type: string\n            livesRemaining:\n              type: integer\n            displayBreed:\n              type: string\n              readOnly: true\n\n    CreatePetRequest:\n      type: object\n      required:\n        - name\n        - animal\n      properties:\n        name:\n          type: string\n        animal:\n          oneOf:\n            - $ref: '#/components/schemas/DogPayload'\n            - $ref: '#/components/schemas/CatPayload'\n          discriminator:\n            propertyName: typeDiscriminator\n            mapping:\n              dog: '#/components/schemas/DogPayload'\n              cat: '#/components/schemas/CatPayload'\n\n    CreatePetResponse:\n      type: object\n      required:\n        - id\n        - name\n        - animal\n      properties:\n        id:\n          type: string\n        name:\n          type: string\n        animal:\n          oneOf:\n            - $ref: '#/components/schemas/DogPayload'\n            - $ref: '#/components/schemas/CatPayload'\n          discriminator:\n            propertyName: typeDiscriminator\n            mapping:\n              dog: '#/components/schemas/DogPayload'\n              cat: '#/components/schemas/CatPayload'\n"
  },
  {
    "path": "specs/3.1.x/discriminator-one-of.yaml",
    "content": "openapi: 3.1.0\ninfo:\n  title: OpenAPI 3.1.0 discriminator one of example\n  version: 1\ncomponents:\n  schemas:\n    Foo:\n      oneOf:\n        - $ref: '#/components/schemas/Bar'\n        - $ref: '#/components/schemas/Baz'\n      discriminator:\n        propertyName: type\n    Baz:\n      allOf:\n        - $ref: '#/components/schemas/Qux'\n    Bar:\n      allOf:\n        - $ref: '#/components/schemas/Qux'\n    Spæcial:\n      allOf:\n        - $ref: '#/components/schemas/Qux'\n    Qux:\n      type: object\n      properties:\n        id:\n          type: string\n        type:\n          $ref: '#/components/schemas/Quux'\n      required:\n        - id\n        - type\n    Quux:\n      enum:\n        - Bar\n        - Baz\n      type: string\n    Quuz:\n      oneOf:\n        - $ref: '#/components/schemas/Bar'\n        - $ref: '#/components/schemas/Baz'\n        - $ref: '#/components/schemas/Spæcial'\n      discriminator:\n        propertyName: type\n        mapping:\n          bar: '#/components/schemas/Bar'\n          baz: '#/components/schemas/Baz'\n          'non-ascii': '#/components/schemas/Spæcial'\n"
  },
  {
    "path": "specs/3.1.x/duplicate-null.json",
    "content": "{\n  \"openapi\": \"3.1.0\",\n  \"info\": {\n    \"version\": \"1.0.0\"\n  },\n  \"components\": {\n    \"schemas\": {\n      \"WeirdEnum\": {\n        \"description\": \"should not produce duplicate null\",\n        \"oneOf\": [\n          {\n            \"type\": \"string\",\n            \"enum\": [\"\"]\n          },\n          {\n            \"type\": [\"string\", \"null\"]\n          },\n          {\n            \"type\": \"null\"\n          }\n        ]\n      }\n    }\n  }\n}\n"
  },
  {
    "path": "specs/3.1.x/enum-escape.json",
    "content": "{\n  \"openapi\": \"3.1.1\",\n  \"info\": {\n    \"title\": \"OpenAPI 3.1.1 enum escape example\",\n    \"version\": \"1\"\n  },\n  \"components\": {\n    \"schemas\": {\n      \"Foo\": {\n        \"type\": \"object\",\n        \"properties\": {\n          \"foo\": {\n            \"enum\": [\"foo'bar\", \"foo\\\"bar\"],\n            \"type\": \"string\"\n          }\n        }\n      },\n      \"Bar\": {\n        \"enum\": [\"foo'bar\", \"foo\\\"bar\"],\n        \"type\": \"string\"\n      }\n    }\n  }\n}\n"
  },
  {
    "path": "specs/3.1.x/enum-inline.yaml",
    "content": "openapi: 3.1.0\ninfo:\n  title: OpenAPI 3.1.0 enum inline example\n  version: '1'\npaths:\n  /foo:\n    get:\n      responses:\n        '200':\n          description: OK\n          content:\n            application/json:\n              schema:\n                type: object\n                properties:\n                  foo:\n                    type: string\n                    enum:\n                      - foo\n                      - bar\n                      - FooBar\n                      - fooBar\n                      - foo bar\n    post:\n      responses:\n        '200':\n          description: 'OK'\n          content:\n            application/json:\n              schema:\n                type: object\n                properties:\n                  foo:\n                    type: string\n                    enum:\n                      - baz\n    put:\n      responses:\n        '200':\n          description: 'OK'\n          content:\n            application/json:\n              schema:\n                $ref: '#/components/schemas/Baz'\ncomponents:\n  schemas:\n    Foo:\n      properties:\n        type:\n          enum:\n            - foo\n            - bar\n          type: string\n      type: object\n    Bar:\n      properties:\n        type:\n          $ref: '#/components/schemas/Baz'\n      type: object\n    Baz:\n      enum:\n        - qux\n        - quux\n      type: string\n"
  },
  {
    "path": "specs/3.1.x/enum-names-values.yaml",
    "content": "openapi: 3.1.1\ninfo:\n  title: OpenAPI 3.1.1 enum names values example\n  version: '1'\ncomponents:\n  schemas:\n    1-10:\n      enum:\n        - 1-10\n        - 11-20\n      type: string\n    myFoo:\n      enum:\n        - myFoo\n        - myBar\n      type: string\n    MyFoo:\n      enum:\n        - MyFoo\n        - MyBar\n      type: string\n    Foo:\n      enum:\n        - foo\n        - bar\n        - null\n        - ''\n        - true\n        - false\n      type:\n        - string\n        - 'null'\n    Numbers:\n      enum:\n        - 100\n        - 200\n        - 300\n        - -100\n        - -200\n        - -300\n      type: number\n    Arrays:\n      enum:\n        - - foo\n        - - bar\n        - - baz\n      type: array\n    MyFooRef:\n      type: object\n      properties:\n        foo:\n          type: array\n          items:\n            $ref: '#/components/schemas/MyFoo'\n"
  },
  {
    "path": "specs/3.1.x/enum-null.json",
    "content": "{\n  \"openapi\": \"3.1.0\",\n  \"info\": {\n    \"title\": \"OpenAPI 3.1.0 enum null example\",\n    \"version\": \"1\"\n  },\n  \"components\": {\n    \"schemas\": {\n      \"Foo\": {\n        \"enum\": [\"foo\", \"bar\", null],\n        \"type\": [\"string\", \"null\"]\n      },\n      \"Bar\": {\n        \"enum\": [\"foo\", \"bar\", null],\n        \"type\": \"string\"\n      },\n      \"Baz\": {\n        \"enum\": [\"foo\", \"bar\"],\n        \"type\": [\"string\", \"null\"]\n      }\n    }\n  }\n}\n"
  },
  {
    "path": "specs/3.1.x/exclude-deprecated.yaml",
    "content": "openapi: 3.1.1\ninfo:\n  title: OpenAPI 3.1.1 exclude deprecated example\n  version: 1\npaths:\n  /foo:\n    post:\n      requestBody:\n        content:\n          'application/json':\n            schema:\n              $ref: '#/components/schemas/Foo'\n        required: true\n      responses:\n        '200':\n          description: OK\n  /bar:\n    post:\n      deprecated: true\n      requestBody:\n        content:\n          'application/json':\n            schema:\n              $ref: '#/components/schemas/Bar'\n        required: true\n      responses:\n        '200':\n          description: OK\ncomponents:\n  schemas:\n    Foo:\n      type: string\n    Bar:\n      deprecated: true\n      type: string\n"
  },
  {
    "path": "specs/3.1.x/external-shared.json",
    "content": "{\n  \"components\": {\n    \"schemas\": {\n      \"ExternalSharedModel\": {\n        \"type\": \"object\",\n        \"properties\": {\n          \"id\": { \"type\": \"string\" },\n          \"name\": { \"type\": \"string\" }\n        },\n        \"required\": [\"id\"]\n      },\n      \"ExternalSharedModelWithUuid\": {\n        \"type\": \"string\",\n        \"format\": \"uuid\"\n      },\n      \"ExternalNested\": {\n        \"type\": \"object\",\n        \"properties\": {\n          \"inner\": {\n            \"type\": \"object\",\n            \"properties\": {\n              \"deep\": { \"type\": \"string\" }\n            }\n          }\n        }\n      },\n      \"ExternalNestedNumeric\": {\n        \"type\": \"object\",\n        \"properties\": {\n          \"0\": {\n            \"type\": \"object\",\n            \"properties\": {\n              \"1\": { \"type\": \"string\" }\n            }\n          }\n        }\n      }\n    }\n  }\n}\n"
  },
  {
    "path": "specs/3.1.x/external.yaml",
    "content": "openapi: 3.1.1\ninfo:\n  title: OpenAPI 3.1.1 external example\n  version: 1\n# Paths using external references\npaths:\n  /external-model:\n    get:\n      summary: Get external model\n      parameters:\n        - $ref: '#/components/parameters/ExternalIdParam'\n        - $ref: '#/components/parameters/ExternalUuidParam'\n      responses:\n        '200':\n          $ref: '#/components/responses/ExternalModelResponse'\n        '400':\n          $ref: '#/components/responses/ExternalUuidResponse'\n    post:\n      summary: Create external model\n      requestBody:\n        $ref: '#/components/requestBodies/ExternalModelBody'\n      responses:\n        '201':\n          $ref: '#/components/responses/ExternalModelResponse'\n        '422':\n          $ref: '#/components/responses/ExternalUnionResponse'\n\n  /external-uuid:\n    get:\n      summary: Get external UUID\n      parameters:\n        - $ref: '#/components/parameters/ExternalUuidParam'\n      responses:\n        '200':\n          $ref: '#/components/responses/ExternalUuidResponse'\n    put:\n      summary: Update external UUID\n      requestBody:\n        $ref: '#/components/requestBodies/ExternalUuidBody'\n      responses:\n        '200':\n          $ref: '#/components/responses/ExternalUuidResponse'\n\n  /external-nested:\n    get:\n      summary: Get external nested object\n      parameters:\n        - $ref: '#/components/parameters/ExternalDeepParam'\n      responses:\n        '200':\n          $ref: '#/components/responses/ExternalNestedResponse'\n    post:\n      summary: Create external nested object\n      requestBody:\n        $ref: '#/components/requestBodies/ExternalNestedBody'\n      responses:\n        '201':\n          $ref: '#/components/responses/ExternalNestedResponse'\n\n  /external-mixed:\n    get:\n      summary: Get mixed external data\n      parameters:\n        - $ref: '#/components/parameters/ExternalIdParam'\n        - $ref: '#/components/parameters/ExternalUuidParam'\n        - $ref: '#/components/parameters/ExternalDeepParam'\n        - $ref: '#/components/parameters/ExternalNumericParam'\n      responses:\n        '200':\n          $ref: '#/components/responses/ExternalArrayResponse'\n    post:\n      summary: Create mixed external data\n      requestBody:\n        $ref: '#/components/requestBodies/ExternalMixedBody'\n      responses:\n        '201':\n          $ref: '#/components/responses/ExternalModelResponse'\n\n  /external-array:\n    get:\n      summary: Get array of external models\n      responses:\n        '200':\n          $ref: '#/components/responses/ExternalArrayResponse'\n    post:\n      summary: Create array of external models\n      requestBody:\n        content:\n          application/json:\n            schema:\n              type: array\n              items:\n                $ref: './external-shared.json#/components/schemas/ExternalSharedModel'\n        required: true\n      responses:\n        '201':\n          $ref: '#/components/responses/ExternalArrayResponse'\n\n  /external-union:\n    get:\n      summary: Get union of external types\n      responses:\n        '200':\n          $ref: '#/components/responses/ExternalUnionResponse'\n    post:\n      summary: Create union of external types\n      requestBody:\n        content:\n          application/json:\n            schema:\n              oneOf:\n                - $ref: './external-shared.json#/components/schemas/ExternalSharedModel'\n                - $ref: './external-shared.json#/components/schemas/ExternalSharedModelWithUuid'\n                - $ref: './external-shared.json#/components/schemas/ExternalNested'\n        required: true\n      responses:\n        '201':\n          $ref: '#/components/responses/ExternalUnionResponse'\n\n  /external-properties/{id}:\n    get:\n      summary: Get external properties\n      parameters:\n        - name: id\n          in: path\n          required: true\n          schema:\n            $ref: './external-shared.json#/components/schemas/ExternalSharedModel/properties/id'\n        - name: uuid\n          in: query\n          schema:\n            $ref: './external-shared.json#/components/schemas/ExternalSharedModelWithUuid'\n        - name: deep\n          in: header\n          schema:\n            $ref: './external-shared.json#/components/schemas/ExternalNested/properties/inner/properties/deep'\n      responses:\n        '200':\n          content:\n            application/json:\n              schema:\n                type: object\n                properties:\n                  id:\n                    $ref: './external-shared.json#/components/schemas/ExternalSharedModel/properties/id'\n                  name:\n                    $ref: './external-shared.json#/components/schemas/ExternalSharedModel/properties/name'\n                  uuid:\n                    $ref: './external-shared.json#/components/schemas/ExternalSharedModelWithUuid'\n                  deep:\n                    $ref: './external-shared.json#/components/schemas/ExternalNested/properties/inner/properties/deep'\n                  numeric:\n                    $ref: './external-shared.json#/components/schemas/ExternalNestedNumeric/properties/0/properties/1'\n\ncomponents:\n  schemas:\n    # Basic external schema references (multiple uses of each type)\n    ExternalSchemaA:\n      description: External schema (A)\n      $ref: './external-shared.json#/components/schemas/ExternalSharedModel'\n    ExternalSchemaB:\n      description: External schema (B) - second use of ExternalSharedModel\n      $ref: './external-shared.json#/components/schemas/ExternalSharedModel'\n    ExternalSchemaC:\n      description: External schema (C) - third use of ExternalSharedModel\n      $ref: './external-shared.json#/components/schemas/ExternalSharedModel'\n\n    # Path-based references using /path syntax\n    ExternalSchemaPathA:\n      description: External schema via path reference (A)\n      $ref: './external-shared.json#/components/schemas/ExternalSharedModel'\n    ExternalSchemaPathB:\n      description: External schema via path reference (B) - second use\n      $ref: './external-shared.json#/components/schemas/ExternalSharedModel'\n\n    # UUID type references (multiple uses)\n    ExternalSchemaPropertyA:\n      description: External schema property (A)\n      type: object\n      properties:\n        uuid1:\n          $ref: './external-shared.json#/components/schemas/ExternalSharedModelWithUuid'\n    ExternalSchemaPropertyB:\n      description: External schema property (B) - second use of UUID\n      type: object\n      properties:\n        uuid2:\n          $ref: './external-shared.json#/components/schemas/ExternalSharedModelWithUuid'\n    ExternalSchemaPropertyC:\n      description: External schema property (C) - third use of UUID\n      type: object\n      properties:\n        uuid3:\n          $ref: './external-shared.json#/components/schemas/ExternalSharedModelWithUuid'\n\n    # Duplicate refs in same schema\n    ExternalSchemaPropertyD:\n      description: External schema property with duplicate refs (D)\n      type: object\n      properties:\n        uuid4:\n          $ref: './external-shared.json#/components/schemas/ExternalSharedModelWithUuid'\n        uuid5:\n          $ref: './external-shared.json#/components/schemas/ExternalSharedModelWithUuid'\n\n    # External property references\n    ExternalSchemaExternalProp:\n      description: External schema property via external property ref (id)\n      type: object\n      properties:\n        id3:\n          $ref: './external-shared.json#/components/schemas/ExternalSharedModel/properties/id'\n        id4:\n          $ref: './external-shared.json#/components/schemas/ExternalSharedModel/properties/id'\n\n    # Alias references\n    ExternalSchemaExternalPropAlias:\n      description: Alias to external property via component property ref\n      type: object\n      properties:\n        id5:\n          $ref: '#/components/schemas/ExternalSchemaExternalProp/properties/id3'\n        id6:\n          $ref: '#/components/schemas/ExternalSchemaExternalProp/properties/id4'\n\n    # Nested property references (multiple uses)\n    ExternalDoubleNestedProp:\n      description: External double nested prop via property ref\n      type: object\n      properties:\n        deep1:\n          $ref: './external-shared.json#/components/schemas/ExternalNested/properties/inner/properties/deep'\n        deep2:\n          $ref: './external-shared.json#/components/schemas/ExternalNested/properties/inner/properties/deep'\n\n    # Numeric property references (multiple uses)\n    ExternalDoubleNestedNumeric:\n      description: External double nested numeric properties\n      type: object\n      properties:\n        numeric1:\n          $ref: './external-shared.json#/components/schemas/ExternalNestedNumeric/properties/0/properties/1'\n        numeric2:\n          $ref: './external-shared.json#/components/schemas/ExternalNestedNumeric/properties/0/properties/1'\n\n    # Complex nested object references\n    ExternalNestedObjectA:\n      description: External nested object reference (A)\n      $ref: './external-shared.json#/components/schemas/ExternalNested'\n    ExternalNestedObjectB:\n      description: External nested object reference (B) - second use\n      $ref: './external-shared.json#/components/schemas/ExternalNested'\n\n    # Numeric nested object references\n    ExternalNestedNumericObjectA:\n      description: External numeric nested object reference (A)\n      $ref: './external-shared.json#/components/schemas/ExternalNestedNumeric'\n    ExternalNestedNumericObjectB:\n      description: External numeric nested object reference (B) - second use\n      $ref: './external-shared.json#/components/schemas/ExternalNestedNumeric'\n\n    # Mixed property references\n    ExternalMixedProperties:\n      description: Mixed external property references\n      type: object\n      properties:\n        id7:\n          $ref: './external-shared.json#/components/schemas/ExternalSharedModel/properties/id'\n        name1:\n          $ref: './external-shared.json#/components/schemas/ExternalSharedModel/properties/name'\n        uuid6:\n          $ref: './external-shared.json#/components/schemas/ExternalSharedModelWithUuid'\n        deep3:\n          $ref: './external-shared.json#/components/schemas/ExternalNested/properties/inner/properties/deep'\n        numeric3:\n          $ref: './external-shared.json#/components/schemas/ExternalNestedNumeric/properties/0/properties/1'\n\n    # Array of external references\n    ExternalArraySchema:\n      description: Array containing external references\n      type: object\n      properties:\n        items:\n          type: array\n          items:\n            $ref: './external-shared.json#/components/schemas/ExternalSharedModel'\n        uuidItems:\n          type: array\n          items:\n            $ref: './external-shared.json#/components/schemas/ExternalSharedModelWithUuid'\n\n    # Union types with external references\n    ExternalUnionSchema:\n      description: Union type with external references\n      oneOf:\n        - $ref: './external-shared.json#/components/schemas/ExternalSharedModel'\n        - $ref: './external-shared.json#/components/schemas/ExternalSharedModel'\n        - $ref: './external-shared.json#/components/schemas/ExternalSharedModelWithUuid'\n        - $ref: './external-shared.json#/components/schemas/ExternalSharedModelWithUuid'\n\n    # AllOf with external references\n    ExternalAllOfSchema:\n      description: AllOf with external references\n      allOf:\n        - $ref: './external-shared.json#/components/schemas/ExternalSharedModel'\n        - $ref: './external-shared.json#/components/schemas/ExternalSharedModel'\n        - type: object\n          properties:\n            additional:\n              $ref: './external-shared.json#/components/schemas/ExternalSharedModelWithUuid'\n\n    # AnyOf with external references\n    ExternalAnyOfSchema:\n      description: AnyOf with external references\n      anyOf:\n        - $ref: './external-shared.json#/components/schemas/ExternalNested'\n        - $ref: './external-shared.json#/components/schemas/ExternalNested'\n        - $ref: './external-shared.json#/components/schemas/ExternalNestedNumeric'\n        - $ref: './external-shared.json#/components/schemas/ExternalNestedNumeric'\n\n  # Parameters using external references\n  parameters:\n    ExternalIdParam:\n      name: id\n      in: path\n      required: true\n      schema:\n        $ref: './external-shared.json#/components/schemas/ExternalSharedModel/properties/id'\n    ExternalUuidParam:\n      name: uuid\n      in: query\n      schema:\n        $ref: './external-shared.json#/components/schemas/ExternalSharedModelWithUuid'\n    ExternalDeepParam:\n      name: deep\n      in: header\n      schema:\n        $ref: './external-shared.json#/components/schemas/ExternalNested/properties/inner/properties/deep'\n    ExternalNumericParam:\n      name: numeric\n      in: query\n      schema:\n        $ref: './external-shared.json#/components/schemas/ExternalNestedNumeric/properties/0/properties/1'\n\n  # Request bodies using external references\n  requestBodies:\n    ExternalModelBody:\n      description: Request body using external model\n      required: true\n      content:\n        application/json:\n          schema:\n            $ref: './external-shared.json#/components/schemas/ExternalSharedModel'\n    ExternalUuidBody:\n      description: Request body using external UUID\n      content:\n        application/json:\n          schema:\n            $ref: './external-shared.json#/components/schemas/ExternalSharedModelWithUuid'\n    ExternalNestedBody:\n      description: Request body using external nested object\n      content:\n        application/json:\n          schema:\n            $ref: './external-shared.json#/components/schemas/ExternalNested'\n    ExternalMixedBody:\n      description: Request body with mixed external properties\n      content:\n        application/json:\n          schema:\n            type: object\n            properties:\n              id:\n                $ref: './external-shared.json#/components/schemas/ExternalSharedModel/properties/id'\n              name:\n                $ref: './external-shared.json#/components/schemas/ExternalSharedModel/properties/name'\n              uuid:\n                $ref: './external-shared.json#/components/schemas/ExternalSharedModelWithUuid'\n              deep:\n                $ref: './external-shared.json#/components/schemas/ExternalNested/properties/inner/properties/deep'\n\n  # Responses using external references\n  responses:\n    ExternalModelResponse:\n      description: Response using external model\n      content:\n        application/json:\n          schema:\n            $ref: './external-shared.json#/components/schemas/ExternalSharedModel'\n    ExternalUuidResponse:\n      description: Response using external UUID\n      content:\n        application/json:\n          schema:\n            $ref: './external-shared.json#/components/schemas/ExternalSharedModelWithUuid'\n    ExternalNestedResponse:\n      description: Response using external nested object\n      content:\n        application/json:\n          schema:\n            $ref: './external-shared.json#/components/schemas/ExternalNested'\n    ExternalArrayResponse:\n      description: Response with array of external models\n      content:\n        application/json:\n          schema:\n            type: array\n            items:\n              $ref: './external-shared.json#/components/schemas/ExternalSharedModel'\n    ExternalUnionResponse:\n      description: Response with union of external types\n      content:\n        application/json:\n          schema:\n            oneOf:\n              - $ref: './external-shared.json#/components/schemas/ExternalSharedModel'\n              - $ref: './external-shared.json#/components/schemas/ExternalSharedModelWithUuid'\n              - $ref: './external-shared.json#/components/schemas/ExternalNested'\n\n  # Headers using external references\n  headers:\n    ExternalIdHeader:\n      description: Header using external ID property\n      schema:\n        $ref: './external-shared.json#/components/schemas/ExternalSharedModel/properties/id'\n    ExternalUuidHeader:\n      description: Header using external UUID\n      schema:\n        $ref: './external-shared.json#/components/schemas/ExternalSharedModelWithUuid'\n    ExternalDeepHeader:\n      description: Header using external deep property\n      schema:\n        $ref: './external-shared.json#/components/schemas/ExternalNested/properties/inner/properties/deep'\n"
  },
  {
    "path": "specs/3.1.x/formats.yaml",
    "content": "openapi: 3.1.0\ninfo:\n  title: OpenAPI 3.1.0 formats example\n  version: '1'\ncomponents:\n  schemas:\n    NumberNoFormat:\n      type: number\n    NumberInt8:\n      type: number\n      format: int8\n    NumberInt16:\n      type: number\n      format: int16\n    NumberInt32:\n      type: number\n      format: int32\n    NumberInt64:\n      type: number\n      format: int64\n    NumberUint8:\n      type: number\n      format: uint8\n    NumberUint16:\n      type: number\n      format: uint16\n    NumberUint32:\n      type: number\n      format: uint32\n    NumberUint64:\n      type: number\n      format: uint64\n    IntegerNoFormat:\n      type: integer\n    IntegerInt8:\n      type: integer\n      format: int8\n    IntegerInt16:\n      type: integer\n      format: int16\n    IntegerInt32:\n      type: integer\n      format: int32\n    IntegerInt64:\n      type: integer\n      format: int64\n    IntegerUint8:\n      type: integer\n      format: uint8\n    IntegerUint16:\n      type: integer\n      format: uint16\n    IntegerUint32:\n      type: integer\n      format: uint32\n    IntegerUint64:\n      type: integer\n      format: uint64\n    StringInt64:\n      type: string\n      format: int64\n    StringUint64:\n      type: string\n      format: uint64\n"
  },
  {
    "path": "specs/3.1.x/full.yaml",
    "content": "openapi: 3.1.0\ninfo:\n  title: swagger\n  version: v1.0\nservers:\n  - url: http://localhost:3000/base\npaths:\n  /api/v{api-version}/no+tag:\n    tags: []\n    get:\n      operationId: export\n    patch:\n      responses:\n        default:\n          description: OK\n    post:\n      operationId: import\n      requestBody:\n        required: true\n        content:\n          application/json:\n            schema:\n              type: object\n              oneOf:\n                - $ref: '#/components/schemas/ModelWithReadOnlyAndWriteOnly'\n                - $ref: '#/components/schemas/ModelWithArrayReadOnlyAndWriteOnly'\n      responses:\n        '200':\n          description: Success\n          content:\n            application/json; type=collection:\n              schema:\n                $ref: '#/components/schemas/Model-From.Zendesk'\n        default:\n          description: Default success response\n          content:\n            application/json:\n              schema:\n                $ref: '#/components/schemas/ModelWithReadOnlyAndWriteOnly'\n    put:\n      operationId: foo+Wow\n      responses:\n        default:\n          description: OK\n  /api/v{api-version}/simple/$count:\n    get:\n      tags:\n        - Simple\n      operationId: api/v{version}/ODataController/$count\n      responses:\n        '200':\n          description: Success\n          content:\n            application/json; type=collection:\n              schema:\n                $ref: '#/components/schemas/Model-From.Zendesk'\n  /api/v{api-version}/simple:operation:\n    get:\n      parameters:\n        - description: foo in method\n          in: path\n          name: foo_param\n          required: true\n          schema:\n            oneOf:\n              - type: string\n              - format: uuid\n                type: string\n      responses:\n        '200':\n          description: Response is a simple number\n          content:\n            application/json:\n              schema:\n                type: number\n        default:\n          description: Default error response\n          content:\n            application/json:\n              schema:\n                $ref: '#/components/schemas/ModelWithBoolean'\n  /api/v{api-version}/simple:\n    get:\n      tags:\n        - Simple\n      operationId: GetCallWithoutParametersAndResponse\n    put:\n      tags:\n        - Simple\n      operationId: PutCallWithoutParametersAndResponse\n    post:\n      tags:\n        - Simple\n      operationId: PostCallWithoutParametersAndResponse\n    delete:\n      tags:\n        - Simple\n      operationId: DeleteCallWithoutParametersAndResponse\n    options:\n      tags:\n        - Simple\n      operationId: OptionsCallWithoutParametersAndResponse\n    head:\n      tags:\n        - Simple\n      operationId: HeadCallWithoutParametersAndResponse\n    patch:\n      tags:\n        - Simple\n      operationId: PatchCallWithoutParametersAndResponse\n  /api/v{api-version}/foo/{foo_param}/bar/{BarParam}:\n    delete:\n      tags:\n        - Parameters\n      operationId: deleteFoo\n      parameters:\n        - description: foo in method\n          in: path\n          name: foo_param\n          required: true\n          schema:\n            type: string\n        - description: bar in method\n          in: path\n          name: BarParam\n          required: true\n          schema:\n            type: string\n        - description: Parameter with illegal characters\n          name: x-Foo-Bar\n          in: header\n          required: true\n          content:\n            application/json:\n              schema:\n                $ref: '#/components/schemas/ModelWithString'\n    parameters:\n      - description: foo in global parameters\n        in: path\n        name: foo_param\n        required: true\n        schema:\n          type: string\n      - description: bar in global parameters\n        in: path\n        name: BarParam\n        required: true\n        schema:\n          type: string\n  /api/v{api-version}/descriptions:\n    post:\n      tags:\n        - Descriptions\n      operationId: CallWithDescriptions\n      parameters:\n        - description: |-\n            Testing multiline comments in string: First line\n            Second line\n\n            Fourth line\n          name: parameterWithBreaks\n          in: query\n          schema:\n            type: string\n        - description: 'Testing backticks in string: `backticks` and ```multiple\n            backticks``` should work'\n          name: parameterWithBackticks\n          in: query\n          schema:\n            type: string\n        - description: \"Testing slashes in string: \\\\backwards\\\\\\\\\\\\ and /forwards///\n            should work\"\n          name: parameterWithSlashes\n          in: query\n          schema:\n            type: string\n        - description: 'Testing expression placeholders in string: ${expression} should\n            work'\n          name: parameterWithExpressionPlaceholders\n          in: query\n          schema:\n            type: string\n        - description: 'Testing quotes in string: ''single quote'''''' and \"double\n            quotes\"\"\" should work'\n          name: parameterWithQuotes\n          in: query\n          schema:\n            type: string\n        - description: 'Testing reserved characters in string: /* inline */ and /** inline\n            **/ should work'\n          name: parameterWithReservedCharacters\n          in: query\n          schema:\n            type: string\n  /api/v{api-version}/parameters/deprecated:\n    post:\n      tags:\n        - Deprecated\n      deprecated: true\n      operationId: DeprecatedCall\n      parameters:\n        - deprecated: true\n          description: This parameter is deprecated\n          name: parameter\n          in: header\n          required: true\n          schema:\n            oneOf:\n              - $ref: '#/components/schemas/DeprecatedModel'\n              - type: 'null'\n  /api/v{api-version}/parameters/{parameterPath}:\n    post:\n      tags:\n        - Parameters\n      operationId: CallWithParameters\n      parameters:\n        - description: This is the parameter that goes into the header\n          name: parameterHeader\n          in: header\n          required: true\n          schema:\n            type:\n              - string\n              - 'null'\n        - required: false\n          schema:\n            $ref: '#/components/schemas/ModelWithNestedArrayEnumsDataFoo'\n          name: foo_ref_enum\n          in: query\n        - required: true\n          schema:\n            allOf:\n              - $ref: '#/components/schemas/ModelWithNestedArrayEnumsDataFoo'\n          name: foo_all_of_enum\n          in: query\n        - description: This is the parameter that goes into the query params\n          name: cursor\n          in: query\n          required: true\n          schema:\n            type:\n              - string\n              - 'null'\n        - description: This is the parameter that goes into the cookie\n          name: parameterCookie\n          in: cookie\n          required: true\n          schema:\n            type:\n              - string\n              - 'null'\n        - description: This is the parameter that goes into the path\n          name: parameterPath\n          in: path\n          required: true\n          schema:\n            type:\n              - string\n              - 'null'\n        - description: api-version should be required in standalone clients\n          name: api-version\n          in: path\n          required: true\n          schema:\n            type:\n              - string\n              - 'null'\n      requestBody:\n        description: This is the parameter that goes into the body\n        required: true\n        content:\n          application/json:\n            schema:\n              properties: {}\n              type:\n                - object\n                - 'null'\n  /api/v{api-version}/parameters/{parameter.path.1}/{parameter-path-2}/{PARAMETER-PATH-3}:\n    post:\n      tags:\n        - Parameters\n      operationId: CallWithWeirdParameterNames\n      parameters:\n        - description: This is the parameter that goes into the path\n          name: parameter.path.1\n          in: path\n          required: false\n          schema:\n            type: string\n        - description: This is the parameter that goes into the path\n          name: parameter-path-2\n          in: path\n          required: false\n          schema:\n            type: string\n        - description: This is the parameter that goes into the path\n          name: PARAMETER-PATH-3\n          in: path\n          required: false\n          schema:\n            type: string\n        - description: This is the parameter with a reserved keyword\n          name: default\n          in: query\n          required: false\n          schema:\n            type: string\n        - description: This is the parameter that goes into the request header\n          name: parameter.header\n          in: header\n          required: true\n          schema:\n            type:\n              - string\n              - 'null'\n        - description: This is the parameter that goes into the request query params\n          name: parameter-query\n          in: query\n          required: true\n          schema:\n            type:\n              - string\n              - 'null'\n        - description: This is the parameter that goes into the cookie\n          name: PARAMETER-COOKIE\n          in: cookie\n          required: true\n          schema:\n            type:\n              - string\n              - 'null'\n        - description: api-version should be required in standalone clients\n          name: api-version\n          in: path\n          required: true\n          schema:\n            type:\n              - string\n              - 'null'\n      requestBody:\n        description: This is the parameter that goes into the body\n        required: true\n        content:\n          application/json:\n            schema:\n              oneOf:\n                - $ref: '#/components/schemas/ModelWithString'\n                - type: 'null'\n  /api/v{api-version}/parameters:\n    get:\n      tags:\n        - Parameters\n      operationId: GetCallWithOptionalParam\n      parameters:\n        - description: This is an optional parameter\n          name: page\n          in: query\n          required: false\n          schema:\n            type: number\n      requestBody:\n        description: This is a required parameter\n        required: true\n        content:\n          application/json:\n            schema:\n              $ref: '#/components/schemas/ModelWithOneOfEnum'\n    post:\n      tags:\n        - Parameters\n      operationId: PostCallWithOptionalParam\n      parameters:\n        - description: This is a required parameter\n          name: parameter\n          in: query\n          required: true\n          schema:\n            $ref: '#/components/schemas/Pageable'\n      requestBody:\n        description: This is an optional parameter\n        required: false\n        content:\n          application/json:\n            schema:\n              properties:\n                offset:\n                  required: true\n                  type:\n                    - number\n                    - 'null'\n              type: object\n      responses:\n        '200':\n          description: Response is a simple number\n          content:\n            application/json:\n              schema:\n                type: number\n        '204':\n          description: Success\n  /api/v{api-version}/requestBody:\n    post:\n      tags:\n        - RequestBody\n      parameters:\n        - $ref: '#/components/parameters/SimpleParameter'\n      requestBody:\n        $ref: '#/components/requestBodies/SimpleRequestBody'\n  /api/v{api-version}/formData:\n    post:\n      tags:\n        - FormData\n      parameters:\n        - $ref: '#/components/parameters/SimpleParameter'\n      requestBody:\n        $ref: '#/components/requestBodies/SimpleFormData'\n  /api/v{api-version}/defaults:\n    get:\n      tags:\n        - Defaults\n      operationId: CallWithDefaultParameters\n      parameters:\n        - description: This is a simple string with default value\n          name: parameterString\n          in: query\n          schema:\n            default: Hello World!\n            type:\n              - string\n              - 'null'\n        - description: This is a simple number with default value\n          name: parameterNumber\n          in: query\n          schema:\n            default: 123\n            type:\n              - number\n              - 'null'\n        - description: This is a simple boolean with default value\n          name: parameterBoolean\n          in: query\n          schema:\n            default: true\n            type:\n              - boolean\n              - 'null'\n        - description: This is a simple enum with default value\n          name: parameterEnum\n          in: query\n          schema:\n            enum:\n              - Success\n              - Warning\n              - Error\n            default: 0\n        - description: This is a simple model with default value\n          name: parameterModel\n          in: query\n          schema:\n            oneOf:\n              - $ref: '#/components/schemas/ModelWithString'\n                default:\n                  prop: Hello World!\n              - type: 'null'\n    post:\n      tags:\n        - Defaults\n      operationId: CallWithDefaultOptionalParameters\n      parameters:\n        - description: This is a simple string that is optional with default value\n          name: parameterString\n          in: query\n          required: false\n          schema:\n            type: string\n            default: Hello World!\n        - description: This is a simple number that is optional with default value\n          name: parameterNumber\n          in: query\n          required: false\n          schema:\n            type: number\n            default: 123\n        - description: This is a simple boolean that is optional with default value\n          name: parameterBoolean\n          in: query\n          required: false\n          schema:\n            type: boolean\n            default: true\n        - description: This is a simple enum that is optional with default value\n          name: parameterEnum\n          in: query\n          required: false\n          schema:\n            enum:\n              - Success\n              - Warning\n              - Error\n            default: 0\n        - description: This is a simple model that is optional with default value\n          name: parameterModel\n          in: query\n          required: false\n          schema:\n            $ref: '#/components/schemas/ModelWithString'\n            default:\n              prop: Hello World!\n    put:\n      tags:\n        - Defaults\n      operationId: CallToTestOrderOfParams\n      parameters:\n        - description: This is a optional string with default\n          name: parameterOptionalStringWithDefault\n          in: query\n          required: false\n          schema:\n            type: string\n            default: Hello World!\n        - description: This is a optional string with empty default\n          name: parameterOptionalStringWithEmptyDefault\n          in: query\n          required: false\n          schema:\n            type: string\n            default: ''\n        - description: This is a optional string with no default\n          name: parameterOptionalStringWithNoDefault\n          in: query\n          required: false\n          schema:\n            type: string\n        - description: This is a string with default\n          name: parameterStringWithDefault\n          in: query\n          required: true\n          schema:\n            type: string\n            default: Hello World!\n        - description: This is a string with empty default\n          name: parameterStringWithEmptyDefault\n          in: query\n          required: true\n          schema:\n            type: string\n            default: ''\n        - description: This is a string with no default\n          name: parameterStringWithNoDefault\n          in: query\n          required: true\n          schema:\n            type: string\n        - description: This is a string that can be null with no default\n          name: parameterStringNullableWithNoDefault\n          in: query\n          required: false\n          schema:\n            type:\n              - string\n              - 'null'\n        - description: This is a string that can be null with default\n          name: parameterStringNullableWithDefault\n          in: query\n          required: false\n          schema:\n            default: null\n            type:\n              - string\n              - 'null'\n  /api/v{api-version}/duplicate:\n    delete:\n      tags:\n        - Duplicate\n        - Duplicate\n      operationId: DuplicateName\n    get:\n      tags:\n        - Duplicate\n      operationId: DuplicateName2\n    post:\n      tags:\n        - Duplicate\n      operationId: DuplicateName3\n    put:\n      tags:\n        - Duplicate\n      operationId: DuplicateName4\n  /api/v{api-version}/no-content:\n    get:\n      tags:\n        - noContent\n      operationId: CallWithNoContentResponse\n      responses:\n        '204':\n          description: Success\n  /api/v{api-version}/multiple-tags/response-and-no-content:\n    get:\n      tags:\n        - Response\n        - NoContent\n      operationId: CallWithResponseAndNoContentResponse\n      responses:\n        '200':\n          description: Response is a simple number\n          content:\n            application/json:\n              schema:\n                type: number\n        '204':\n          description: Success\n  /api/v{api-version}/multiple-tags/a:\n    get:\n      tags:\n        - MultipleTags1\n        - MultipleTags2\n      operationId: DummyA\n      responses:\n        '200':\n          content:\n            application/json:\n              schema:\n                $ref: '#/components/schemas/400'\n  /api/v{api-version}/multiple-tags/b:\n    get:\n      tags:\n        - MultipleTags1\n        - MultipleTags2\n        - MultipleTags3\n      operationId: DummyB\n      responses:\n        '204':\n          description: Success\n  /api/v{api-version}/response:\n    get:\n      tags:\n        - Response\n      operationId: CallWithResponse\n      responses:\n        default:\n          content:\n            application/json:\n              schema:\n                $ref: '#/components/schemas/import'\n    post:\n      tags:\n        - Response\n      operationId: CallWithDuplicateResponses\n      responses:\n        '200':\n          description: Message for 200 response\n          content:\n            application/json:\n              schema:\n                allOf:\n                  - $ref: '#/components/schemas/ModelWithBoolean'\n                  - $ref: '#/components/schemas/ModelWithInteger'\n        '201':\n          description: Message for 201 response\n          content:\n            application/json:\n              schema:\n                $ref: '#/components/schemas/ModelWithString'\n        '202':\n          description: Message for 202 response\n          content:\n            application/json:\n              schema:\n                $ref: '#/components/schemas/ModelWithString'\n        '500':\n          description: Message for 500 error\n          content:\n            application/json:\n              schema:\n                $ref: '#/components/schemas/ModelWithStringError'\n        '501':\n          description: Message for 501 error\n          content:\n            application/json:\n              schema:\n                $ref: '#/components/schemas/ModelWithStringError'\n        '502':\n          description: Message for 502 error\n          content:\n            application/json:\n              schema:\n                $ref: '#/components/schemas/ModelWithStringError'\n        default:\n          description: Default error response\n          content:\n            application/json:\n              schema:\n                $ref: '#/components/schemas/ModelWithBoolean'\n        4XX:\n          description: Message for 4XX errors\n          content:\n            application/json:\n              schema:\n                $ref: '#/components/schemas/DictionaryWithArray'\n    put:\n      tags:\n        - Response\n      operationId: CallWithResponses\n      responses:\n        '200':\n          description: Message for 200 response\n          content:\n            application/json:\n              schema:\n                type: object\n                properties:\n                  '@namespace.string':\n                    type: string\n                    readOnly: true\n                  '@namespace.integer':\n                    type: integer\n                    readOnly: true\n                  value:\n                    type: array\n                    items:\n                      $ref: '#/components/schemas/ModelWithString'\n                    readOnly: true\n        '201':\n          description: Message for 201 response\n          content:\n            application/json:\n              schema:\n                $ref: '#/components/schemas/ModelThatExtends'\n        '202':\n          description: Message for 202 response\n          content:\n            application/json:\n              schema:\n                $ref: '#/components/schemas/ModelThatExtendsExtends'\n        '500':\n          description: Message for 500 error\n          content:\n            application/json:\n              schema:\n                $ref: '#/components/schemas/ModelWithStringError'\n        '501':\n          description: Message for 501 error\n          content:\n            application/json:\n              schema:\n                $ref: '#/components/schemas/ModelWithStringError'\n        '502':\n          description: Message for 502 error\n          content:\n            application/json:\n              schema:\n                $ref: '#/components/schemas/ModelWithStringError'\n        default:\n          description: Message for default response\n          content:\n            application/json:\n              schema:\n                $ref: '#/components/schemas/ModelWithStringError'\n  /api/v{api-version}/collectionFormat:\n    get:\n      tags:\n        - CollectionFormat\n      operationId: CollectionFormat\n      parameters:\n        - description: This is an array parameter that is sent as csv format\n            (comma-separated values)\n          name: parameterArrayCSV\n          in: query\n          required: true\n          schema:\n            type:\n              - array\n              - 'null'\n            items:\n              type: string\n          collectionFormat: csv\n        - description: This is an array parameter that is sent as ssv format\n            (space-separated values)\n          name: parameterArraySSV\n          in: query\n          required: true\n          schema:\n            type:\n              - array\n              - 'null'\n            items:\n              type: string\n          collectionFormat: ssv\n        - description: This is an array parameter that is sent as tsv format\n            (tab-separated values)\n          name: parameterArrayTSV\n          in: query\n          required: true\n          schema:\n            type:\n              - array\n              - 'null'\n            items:\n              type: string\n          collectionFormat: tsv\n        - description: This is an array parameter that is sent as pipes format\n            (pipe-separated values)\n          name: parameterArrayPipes\n          in: query\n          required: true\n          schema:\n            type:\n              - array\n              - 'null'\n            items:\n              type: string\n          collectionFormat: pipes\n        - description: This is an array parameter that is sent as multi format (multiple\n            parameter instances)\n          name: parameterArrayMulti\n          in: query\n          required: true\n          schema:\n            type:\n              - array\n              - 'null'\n            items:\n              type: string\n          collectionFormat: multi\n  /api/v{api-version}/types:\n    get:\n      tags:\n        - Types\n      operationId: Types\n      parameters:\n        - description: This is a number parameter\n          name: parameterNumber\n          in: query\n          required: true\n          schema:\n            type: number\n            default: 123\n        - description: This is a string parameter\n          name: parameterString\n          in: query\n          required: true\n          schema:\n            type:\n              - string\n              - 'null'\n            default: default\n        - description: This is a boolean parameter\n          name: parameterBoolean\n          in: query\n          required: true\n          schema:\n            type:\n              - boolean\n              - 'null'\n            default: true\n        - description: This is an object parameter\n          name: parameterObject\n          in: query\n          required: true\n          schema:\n            type:\n              - object\n              - 'null'\n            default: null\n        - description: This is an array parameter\n          name: parameterArray\n          in: query\n          required: true\n          schema:\n            type:\n              - array\n              - 'null'\n            items:\n              type: string\n        - description: This is a dictionary parameter\n          name: parameterDictionary\n          in: query\n          required: true\n          schema:\n            type:\n              - object\n              - 'null'\n            items:\n              type: string\n        - description: This is an enum parameter\n          name: parameterEnum\n          in: query\n          required: true\n          schema:\n            oneOf:\n              - enum:\n                  - Success\n                  - Warning\n                  - Error\n              - type: 'null'\n        - description: This is a number parameter\n          name: id\n          in: path\n          schema:\n            type: integer\n            format: int32\n      responses:\n        '200':\n          description: Response is a simple number\n          content:\n            application/json:\n              schema:\n                type: number\n        '201':\n          description: Response is a simple string\n          content:\n            application/json:\n              schema:\n                type: string\n        '202':\n          description: Response is a simple boolean\n          content:\n            application/json:\n              schema:\n                type: boolean\n        '203':\n          description: Response is a simple object\n          content:\n            application/json:\n              schema:\n                type: object\n  /api/v{api-version}/upload:\n    post:\n      tags:\n        - Upload\n      operationId: UploadFile\n      parameters:\n        - description: api-version should be required in standalone clients\n          name: api-version\n          in: path\n          required: true\n          schema:\n            type:\n              - string\n              - 'null'\n      requestBody:\n        content:\n          application/x-www-form-urlencoded:\n            description: Supply a file reference for upload\n            schema:\n              format: binary\n              type: string\n        required: true\n      responses:\n        '200':\n          content:\n            application/json:\n              schema:\n                type: boolean\n  /api/v{api-version}/file/{id}:\n    get:\n      tags:\n        - FileResponse\n      operationId: FileResponse\n      parameters:\n        - name: id\n          in: path\n          required: true\n          schema:\n            type: string\n        - description: api-version should be required in standalone clients\n          name: api-version\n          in: path\n          required: true\n          schema:\n            type: string\n      responses:\n        '200':\n          description: Success\n          content:\n            audio/*:\n              schema:\n                format: binary\n                type: string\n            video/*:\n              schema:\n                format: binary\n                type: string\n  /api/v{api-version}/complex:\n    get:\n      tags:\n        - Complex\n      operationId: ComplexTypes\n      parameters:\n        - description: Parameter containing object\n          name: parameterObject\n          in: query\n          required: true\n          schema:\n            type: object\n            properties:\n              first:\n                type: object\n                properties:\n                  second:\n                    type: object\n                    properties:\n                      third:\n                        type: string\n        - description: Parameter containing reference\n          name: parameterReference\n          in: query\n          required: true\n          schema:\n            $ref: '#/components/schemas/ModelWithString'\n      responses:\n        '200':\n          description: Successful response\n          content:\n            application/json:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/ModelWithString'\n        '400':\n          description: 400 `server` error\n        '500':\n          description: 500 server error\n  /api/v{api-version}/multipart:\n    post:\n      tags:\n        - multipart\n      operationId: MultipartRequest\n      requestBody:\n        content:\n          multipart/form-data:\n            schema:\n              type: object\n              properties:\n                content:\n                  type: string\n                  format: binary\n                data:\n                  oneOf:\n                    - $ref: '#/components/schemas/ModelWithString'\n                    - type: 'null'\n            encoding:\n              content:\n                style: form\n              data:\n                style: form\n    get:\n      tags:\n        - multipart\n      operationId: MultipartResponse\n      responses:\n        '200':\n          description: OK\n          content:\n            multipart/mixed:\n              schema:\n                type: object\n                properties:\n                  file:\n                    type: string\n                    format: binary\n                  metadata:\n                    type: object\n                    properties:\n                      foo:\n                        type: string\n                      bar:\n                        type: string\n  /api/v{api-version}/complex/{id}:\n    put:\n      tags:\n        - Complex\n      operationId: ComplexParams\n      parameters:\n        - name: id\n          in: path\n          required: true\n          schema:\n            type: integer\n            format: int32\n        - description: api-version should be required in standalone clients\n          name: api-version\n          in: path\n          required: true\n          schema:\n            type: string\n      requestBody:\n        content:\n          application/json-patch+json:\n            schema:\n              required:\n                - key\n                - name\n                - parameters\n                - type\n              type: object\n              properties:\n                key:\n                  maxLength: 64\n                  pattern: ^[a-zA-Z0-9_]*$\n                  type:\n                    - string\n                    - 'null'\n                  readOnly: true\n                name:\n                  maxLength: 255\n                  type:\n                    - string\n                    - 'null'\n                enabled:\n                  type: boolean\n                  default: true\n                type:\n                  enum:\n                    - Monkey\n                    - Horse\n                    - Bird\n                  type: string\n                  readOnly: true\n                listOfModels:\n                  type:\n                    - array\n                    - 'null'\n                  items:\n                    $ref: '#/components/schemas/ModelWithString'\n                listOfStrings:\n                  type:\n                    - array\n                    - 'null'\n                  items:\n                    type: string\n                parameters:\n                  type: object\n                  oneOf:\n                    - $ref: '#/components/schemas/ModelWithString'\n                    - $ref: '#/components/schemas/ModelWithEnum'\n                    - $ref: '#/components/schemas/ModelWithArray'\n                    - $ref: '#/components/schemas/ModelWithDictionary'\n                user:\n                  type: object\n                  properties:\n                    id:\n                      type: integer\n                      format: int32\n                      readOnly: true\n                    name:\n                      type:\n                        - string\n                        - 'null'\n                      readOnly: true\n                  readOnly: true\n      responses:\n        '200':\n          description: Success\n          content:\n            application/json; type=collection:\n              schema:\n                $ref: '#/components/schemas/ModelWithString'\n  /api/v{api-version}/header:\n    post:\n      tags:\n        - Header\n      operationId: CallWithResultFromHeader\n      responses:\n        '200':\n          description: Successful response\n          headers:\n            operation-location:\n              schema:\n                type: string\n        '400':\n          description: 400 server error\n        '500':\n          description: 500 server error\n  /api/v{api-version}/error:\n    post:\n      tags:\n        - Error\n      operationId: testErrorCode\n      parameters:\n        - description: Status code to return\n          name: status\n          in: query\n          required: true\n          schema:\n            type: integer\n      responses:\n        '200':\n          description: 'Custom message: Successful response'\n        '500':\n          description: 'Custom message: Internal Server Error'\n        '501':\n          description: 'Custom message: Not Implemented'\n        '502':\n          description: 'Custom message: Bad Gateway'\n        '503':\n          description: 'Custom message: Service Unavailable'\n  /api/v{api-version}/non-ascii-æøåÆØÅöôêÊ字符串:\n    post:\n      tags:\n        - Non-Ascii-æøåÆØÅöôêÊ\n      operationId: nonAsciiæøåÆØÅöôêÊ字符串\n      parameters:\n        - description: Dummy input param\n          name: nonAsciiParamæøåÆØÅöôêÊ\n          in: query\n          required: true\n          schema:\n            type: integer\n      responses:\n        '200':\n          description: Successful response\n          content:\n            application/json:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/NonAsciiStringæøåÆØÅöôêÊ字符串'\n    put:\n      tags:\n        - Non-Ascii-æøåÆØÅöôêÊ\n      summary: Login User\n      operationId: putWithFormUrlEncoded\n      requestBody:\n        content:\n          application/x-www-form-urlencoded:\n            schema:\n              $ref: '#/components/schemas/ArrayWithStrings'\n        required: true\ncomponents:\n  requestBodies:\n    SimpleRequestBody:\n      x-body-name: foo\n      description: A reusable request body\n      required: false\n      content:\n        application/json:\n          schema:\n            $ref: '#/components/schemas/ModelWithString'\n    SimpleFormData:\n      description: A reusable request body\n      required: false\n      content:\n        multipart/form-data:\n          schema:\n            $ref: '#/components/schemas/ModelWithString'\n  parameters:\n    SimpleParameter:\n      description: This is a reusable parameter\n      name: parameter\n      in: query\n      required: false\n      schema:\n        type: string\n    x-Foo-Bar:\n      description: Parameter with illegal characters\n      name: x-Foo-Bar\n      in: header\n      required: true\n      content:\n        application/json:\n          schema:\n            $ref: '#/components/schemas/ModelWithString'\n  schemas:\n    ExternalRefA:\n      description: External ref to shared model (A)\n      $ref: './external-shared.json#/components/schemas/ExternalSharedModel'\n    ExternalRefB:\n      description: External ref to shared model (B)\n      $ref: './external-shared.json#/components/schemas/ExternalSharedModel'\n    '400':\n      description: Model with number-only name\n      type: string\n    camelCaseCommentWithBreaks:\n      description: |-\n        Testing multiline comments in string: First line\n        Second line\n\n        Fourth line\n      type: integer\n    CommentWithBreaks:\n      description: |-\n        Testing multiline comments in string: First line\n        Second line\n\n        Fourth line\n      type: integer\n    CommentWithBackticks:\n      description: 'Testing backticks in string: `backticks` and ```multiple\n        backticks``` should work'\n      type: integer\n    CommentWithBackticksAndQuotes:\n      description: 'Testing backticks and quotes in string: `backticks`, ''quotes'',\n        \"double quotes\" and ```multiple backticks``` should work'\n      type: integer\n    CommentWithSlashes:\n      description: \"Testing slashes in string: \\\\backwards\\\\\\\\\\\\ and /forwards///\n        should work\"\n      type: integer\n    CommentWithExpressionPlaceholders:\n      description: 'Testing expression placeholders in string: ${expression} should work'\n      type: integer\n    CommentWithQuotes:\n      description: 'Testing quotes in string: ''single quote'''''' and \"double\n        quotes\"\"\" should work'\n      type: integer\n    CommentWithReservedCharacters:\n      description: 'Testing reserved characters in string: /* inline */ and /** inline\n        **/ should work'\n      type: integer\n    SimpleInteger:\n      description: This is a simple number\n      type: integer\n    SimpleBoolean:\n      description: This is a simple boolean\n      type: boolean\n    SimpleString:\n      description: This is a simple string\n      type: string\n    NonAsciiStringæøåÆØÅöôêÊ字符串:\n      description: A string with non-ascii (unicode) characters valid in typescript\n        identifiers (æøåÆØÅöÔèÈ字符串)\n      type: string\n    SimpleFile:\n      description: This is a simple file\n      format: binary\n      type: string\n    SimpleReference:\n      description: This is a simple reference\n      $ref: '#/components/schemas/ModelWithString'\n    SimpleStringWithPattern:\n      description: This is a simple string\n      maxLength: 64\n      pattern: ^[a-zA-Z0-9_]*$\n      type:\n        - string\n        - 'null'\n    EnumWithStrings:\n      description: This is a simple enum with strings\n      enum:\n        - Success\n        - Warning\n        - Error\n        - \"'Single Quote'\"\n        - '\"Double Quotes\"'\n        - 'Non-ascii: øæåôöØÆÅÔÖ字符串'\n    EnumWithReplacedCharacters:\n      enum:\n        - \"'Single Quote'\"\n        - '\"Double Quotes\"'\n        - øæåôöØÆÅÔÖ字符串\n        - 3.1\n        - ''\n      type: string\n    EnumWithNumbers:\n      description: This is a simple enum with numbers\n      enum:\n        - 1\n        - 2\n        - 3\n        - 1.1\n        - 1.2\n        - 1.3\n        - 100\n        - 200\n        - 300\n        - -100\n        - -200\n        - -300\n        - -1.1\n        - -1.2\n        - -1.3\n      default: 200\n    EnumFromDescription:\n      description: Success=1,Warning=2,Error=3\n      type: number\n    EnumWithExtensions:\n      description: This is a simple enum with numbers\n      enum:\n        - 200\n        - 400\n        - 500\n      x-enum-varnames:\n        - CUSTOM_SUCCESS\n        - CUSTOM_WARNING\n        - CUSTOM_ERROR\n      x-enum-descriptions:\n        - Used when the status of something is successful\n        - Used when the status of something has a warning\n        - Used when the status of something has an error\n    EnumWithXEnumNames:\n      enum:\n        - 0\n        - 1\n        - 2\n      x-enumNames:\n        - zero\n        - one\n        - two\n    ArrayWithNumbers:\n      description: This is a simple array with numbers\n      type: array\n      items:\n        type: integer\n    ArrayWithBooleans:\n      description: This is a simple array with booleans\n      type: array\n      items:\n        type: boolean\n    ArrayWithStrings:\n      description: This is a simple array with strings\n      type: array\n      items:\n        type: string\n      default:\n        - test\n    ArrayWithReferences:\n      description: This is a simple array with references\n      type: array\n      items:\n        $ref: '#/components/schemas/ModelWithString'\n    ArrayWithArray:\n      description: This is a simple array containing an array\n      type: array\n      items:\n        type: array\n        items:\n          $ref: '#/components/schemas/ModelWithString'\n    ArrayWithProperties:\n      description: This is a simple array with properties\n      type: array\n      items:\n        type: object\n        properties:\n          16x16:\n            $ref: '#/components/schemas/camelCaseCommentWithBreaks'\n          bar:\n            type: string\n    ArrayWithAnyOfProperties:\n      description: This is a simple array with any of properties\n      type: array\n      items:\n        anyOf:\n          - type: object\n            properties:\n              foo:\n                type: string\n                default: test\n          - type: object\n            properties:\n              bar:\n                type: string\n    AnyOfAnyAndNull:\n      type: object\n      properties:\n        data:\n          anyOf:\n            - {}\n            - type: 'null'\n    AnyOfArrays:\n      description: This is a simple array with any of properties\n      type: object\n      properties:\n        results:\n          items:\n            anyOf:\n              - type: object\n                properties:\n                  foo:\n                    type: string\n              - type: object\n                properties:\n                  bar:\n                    type: string\n          type: array\n    DictionaryWithString:\n      description: This is a string dictionary\n      type: object\n      additionalProperties:\n        type: string\n    DictionaryWithPropertiesAndAdditionalProperties:\n      type: object\n      properties:\n        foo:\n          type: number\n        bar:\n          type: boolean\n      additionalProperties:\n        type: string\n    DictionaryWithReference:\n      description: This is a string reference\n      type: object\n      additionalProperties:\n        $ref: '#/components/schemas/ModelWithString'\n    DictionaryWithArray:\n      description: This is a complex dictionary\n      type: object\n      additionalProperties:\n        type: array\n        items:\n          $ref: '#/components/schemas/ModelWithString'\n    DictionaryWithDictionary:\n      description: This is a string dictionary\n      type: object\n      additionalProperties:\n        type: object\n        additionalProperties:\n          type: string\n    DictionaryWithProperties:\n      description: This is a complex dictionary\n      type: object\n      additionalProperties:\n        type: object\n        properties:\n          foo:\n            type: string\n          bar:\n            type: string\n    ModelWithInteger:\n      description: This is a model with one number property\n      type: object\n      properties:\n        prop:\n          description: This is a simple number property\n          type: integer\n    ModelWithBoolean:\n      description: This is a model with one boolean property\n      type: object\n      properties:\n        prop:\n          description: This is a simple boolean property\n          type: boolean\n    ModelWithString:\n      description: This is a model with one string property\n      type: object\n      properties:\n        prop:\n          description: This is a simple string property\n          type: string\n    ModelWithStringError:\n      description: This is a model with one string property\n      type: object\n      properties:\n        prop:\n          description: This is a simple string property\n          type: string\n    Model-From.Zendesk:\n      description: \"`Comment` or `VoiceComment`. The JSON object for adding voice\n        comments to tickets is different. See [Adding voice comments to\n        tickets](/documentation/ticketing/managing-tickets/adding-voice-comment\\\n        s-to-tickets)\"\n      type: string\n    ModelWithNullableString:\n      description: This is a model with one string property\n      type: object\n      required:\n        - nullableRequiredProp1\n        - nullableRequiredProp2\n      properties:\n        nullableProp1:\n          description: This is a simple string property\n          type:\n            - string\n            - 'null'\n        nullableRequiredProp1:\n          description: This is a simple string property\n          type:\n            - string\n            - 'null'\n        nullableProp2:\n          description: This is a simple string property\n          type:\n            - string\n            - 'null'\n        nullableRequiredProp2:\n          description: This is a simple string property\n          type:\n            - string\n            - 'null'\n        foo_bar-enum:\n          description: This is a simple enum with strings\n          enum:\n            - Success\n            - Warning\n            - Error\n            - ØÆÅ字符串\n    ModelWithEnum:\n      description: This is a model with one enum\n      type: object\n      properties:\n        foo_bar-enum:\n          description: This is a simple enum with strings\n          enum:\n            - Success\n            - Warning\n            - Error\n            - ØÆÅ字符串\n        statusCode:\n          description: These are the HTTP error code enums\n          enum:\n            - '100'\n            - 200 FOO\n            - 300 FOO_BAR\n            - 400 foo-bar\n            - 500 foo.bar\n            - 600 foo&bar\n        bool:\n          description: Simple boolean enum\n          type: boolean\n          enum:\n            - true\n    ModelWithEnumWithHyphen:\n      description: This is a model with one enum with escaped name\n      type: object\n      properties:\n        foo-bar-baz-qux:\n          type: string\n          enum:\n            - '3.0'\n          title: Foo-Bar-Baz-Qux\n          default: '3.0'\n    ModelWithEnumFromDescription:\n      description: This is a model with one enum\n      type: object\n      properties:\n        test:\n          type: integer\n          description: Success=1,Warning=2,Error=3\n    ModelWithNestedEnums:\n      description: This is a model with nested enums\n      type: object\n      properties:\n        dictionaryWithEnum:\n          type: object\n          additionalProperties:\n            enum:\n              - Success\n              - Warning\n              - Error\n        dictionaryWithEnumFromDescription:\n          type: object\n          additionalProperties:\n            type: integer\n            description: Success=1,Warning=2,Error=3\n        arrayWithEnum:\n          type: array\n          items:\n            enum:\n              - Success\n              - Warning\n              - Error\n        arrayWithDescription:\n          type: array\n          items:\n            type: integer\n            description: Success=1,Warning=2,Error=3\n        foo_bar-enum:\n          description: This is a simple enum with strings\n          enum:\n            - Success\n            - Warning\n            - Error\n            - ØÆÅ字符串\n    ModelWithReference:\n      description: This is a model with one property containing a reference\n      type: object\n      properties:\n        prop:\n          $ref: '#/components/schemas/ModelWithProperties'\n    ModelWithArrayReadOnlyAndWriteOnly:\n      description: This is a model with one property containing an array\n      type: object\n      properties:\n        prop:\n          type: array\n          items:\n            $ref: '#/components/schemas/ModelWithReadOnlyAndWriteOnly'\n        propWithFile:\n          type: array\n          items:\n            format: binary\n            type: string\n        propWithNumber:\n          type: array\n          items:\n            type: number\n    ModelWithArray:\n      description: This is a model with one property containing an array\n      type: object\n      properties:\n        prop:\n          type: array\n          items:\n            $ref: '#/components/schemas/ModelWithString'\n        propWithFile:\n          type: array\n          items:\n            format: binary\n            type: string\n        propWithNumber:\n          type: array\n          items:\n            type: number\n    ModelWithDictionary:\n      description: This is a model with one property containing a dictionary\n      type: object\n      properties:\n        prop:\n          type: object\n          additionalProperties:\n            type: string\n    DeprecatedModel:\n      deprecated: true\n      description: This is a deprecated model with a deprecated property\n      type: object\n      properties:\n        prop:\n          deprecated: true\n          description: This is a deprecated property\n          type: string\n    ModelWithCircularReference:\n      description: This is a model with one property containing a circular reference\n      type: object\n      properties:\n        prop:\n          $ref: '#/components/schemas/ModelWithCircularReference'\n    CompositionWithOneOf:\n      description: This is a model with one property with a 'one of' relationship\n      type: object\n      properties:\n        propA:\n          type: object\n          oneOf:\n            - $ref: '#/components/schemas/ModelWithString'\n            - $ref: '#/components/schemas/ModelWithEnum'\n            - $ref: '#/components/schemas/ModelWithArray'\n            - $ref: '#/components/schemas/ModelWithDictionary'\n    CompositionWithOneOfAnonymous:\n      description: This is a model with one property with a 'one of' relationship\n        where the options are not $ref\n      type: object\n      properties:\n        propA:\n          type: object\n          oneOf:\n            - description: Anonymous object type\n              type: object\n              properties:\n                propA:\n                  type: string\n            - description: Anonymous string type\n              type: string\n            - description: Anonymous integer type\n              type: integer\n    ModelCircle:\n      description: Circle\n      type: object\n      required:\n        - kind\n      properties:\n        kind:\n          type: string\n        radius:\n          type: number\n    ModelSquare:\n      description: Square\n      type: object\n      required:\n        - kind\n      properties:\n        kind:\n          type: string\n        sideLength:\n          type: number\n    CompositionWithOneOfDiscriminator:\n      description: This is a model with one property with a 'one of' relationship\n        where the options are not $ref\n      type: object\n      oneOf:\n        - $ref: '#/components/schemas/ModelCircle'\n        - $ref: '#/components/schemas/ModelSquare'\n      discriminator:\n        propertyName: kind\n        mapping:\n          circle: '#/components/schemas/ModelCircle'\n          square: '#/components/schemas/ModelSquare'\n    CompositionWithAnyOf:\n      description: This is a model with one property with a 'any of' relationship\n      type: object\n      properties:\n        propA:\n          type: object\n          anyOf:\n            - $ref: '#/components/schemas/ModelWithString'\n            - $ref: '#/components/schemas/ModelWithEnum'\n            - $ref: '#/components/schemas/ModelWithArray'\n            - $ref: '#/components/schemas/ModelWithDictionary'\n    CompositionWithAnyOfAnonymous:\n      description: This is a model with one property with a 'any of' relationship\n        where the options are not $ref\n      type: object\n      properties:\n        propA:\n          type: object\n          anyOf:\n            - description: Anonymous object type\n              type: object\n              properties:\n                propA:\n                  type: string\n            - description: Anonymous string type\n              type: string\n            - description: Anonymous integer type\n              type: integer\n    CompositionWithNestedAnyAndTypeNull:\n      description: This is a model with nested 'any of' property with a type null\n      type: object\n      properties:\n        propA:\n          type: object\n          anyOf:\n            - items:\n                anyOf:\n                  - $ref: '#/components/schemas/ModelWithDictionary'\n                  - type: 'null'\n              type: array\n            - items:\n                anyOf:\n                  - $ref: '#/components/schemas/ModelWithArray'\n                  - type: 'null'\n              type: array\n    3e-num_1Период:\n      enum:\n        - Bird\n        - Dog\n      type: string\n    ConstValue:\n      type: string\n      const: ConstValue\n    CompositionWithNestedAnyOfAndNull:\n      description: This is a model with one property with a 'any of' relationship\n        where the options are not $ref\n      type: object\n      properties:\n        propA:\n          anyOf:\n            - items:\n                anyOf:\n                  - $ref: '#/components/schemas/3e-num_1Период'\n                  - $ref: '#/components/schemas/ConstValue'\n              type: array\n            - type: 'null'\n          title: Scopes\n    CompositionWithOneOfAndNullable:\n      description: This is a model with one property with a 'one of' relationship\n      type: object\n      properties:\n        propA:\n          type:\n            - object\n            - 'null'\n          oneOf:\n            - type: object\n              properties:\n                boolean:\n                  type: boolean\n            - $ref: '#/components/schemas/ModelWithEnum'\n            - $ref: '#/components/schemas/ModelWithArray'\n            - $ref: '#/components/schemas/ModelWithDictionary'\n    CompositionWithOneOfAndSimpleDictionary:\n      description: This is a model that contains a simple dictionary within composition\n      type: object\n      properties:\n        propA:\n          oneOf:\n            - type: boolean\n            - type: object\n              additionalProperties:\n                type: number\n    CompositionWithOneOfAndSimpleArrayDictionary:\n      description: This is a model that contains a dictionary of simple arrays within\n        composition\n      type: object\n      properties:\n        propA:\n          oneOf:\n            - type: boolean\n            - type: object\n              additionalProperties:\n                type: array\n                items:\n                  type: boolean\n    CompositionWithOneOfAndComplexArrayDictionary:\n      description: This is a model that contains a dictionary of complex arrays\n        (composited) within composition\n      type: object\n      properties:\n        propA:\n          oneOf:\n            - type: boolean\n            - type: object\n              additionalProperties:\n                type: array\n                items:\n                  oneOf:\n                    - type: number\n                    - type: string\n    CompositionWithAllOfAndNullable:\n      description: This is a model with one property with a 'all of' relationship\n      type: object\n      properties:\n        propA:\n          type:\n            - object\n            - 'null'\n          allOf:\n            - type: object\n              properties:\n                boolean:\n                  type: boolean\n            - $ref: '#/components/schemas/ModelWithEnum'\n            - $ref: '#/components/schemas/ModelWithArray'\n            - $ref: '#/components/schemas/ModelWithDictionary'\n    CompositionWithAnyOfAndNullable:\n      description: This is a model with one property with a 'any of' relationship\n      type: object\n      properties:\n        propA:\n          type:\n            - object\n            - 'null'\n          anyOf:\n            - type: object\n              properties:\n                boolean:\n                  type: boolean\n            - $ref: '#/components/schemas/ModelWithEnum'\n            - $ref: '#/components/schemas/ModelWithArray'\n            - $ref: '#/components/schemas/ModelWithDictionary'\n    CompositionBaseModel:\n      description: This is a base model with two simple optional properties\n      type: object\n      properties:\n        firstName:\n          type: string\n        lastname:\n          type: string\n    CompositionExtendedModel:\n      description: This is a model that extends the base model\n      type: object\n      allOf:\n        - $ref: '#/components/schemas/CompositionBaseModel'\n      properties:\n        age:\n          type: number\n      required:\n        - firstName\n        - lastname\n        - age\n    ModelWithProperties:\n      description: This is a model with one nested property\n      type: object\n      required:\n        - required\n        - requiredAndReadOnly\n        - requiredAndNullable\n      properties:\n        required:\n          type: string\n        requiredAndReadOnly:\n          type: string\n          readOnly: true\n        requiredAndNullable:\n          type:\n            - string\n            - 'null'\n        string:\n          type: string\n        number:\n          type: number\n        boolean:\n          type: boolean\n        reference:\n          $ref: '#/components/schemas/ModelWithString'\n        property with space:\n          type: string\n        default:\n          type: string\n        try:\n          type: string\n        '@namespace.string':\n          type: string\n          readOnly: true\n        '@namespace.integer':\n          type: integer\n          readOnly: true\n    ModelWithNestedProperties:\n      description: This is a model with one nested property\n      type: object\n      required:\n        - first\n      properties:\n        first:\n          type:\n            - object\n            - 'null'\n          required:\n            - second\n          readOnly: true\n          properties:\n            second:\n              type:\n                - object\n                - 'null'\n              required:\n                - third\n              readOnly: true\n              properties:\n                third:\n                  type:\n                    - string\n                    - 'null'\n                  required: true\n                  readOnly: true\n    ModelWithDuplicateProperties:\n      description: This is a model with duplicated properties\n      type: object\n      properties:\n        prop:\n          $ref: '#/components/schemas/ModelWithString'\n    ModelWithOrderedProperties:\n      description: This is a model with ordered properties\n      type: object\n      properties:\n        zebra:\n          type: string\n        apple:\n          type: string\n        hawaii:\n          type: string\n    ModelWithDuplicateImports:\n      description: This is a model with duplicated imports\n      type: object\n      properties:\n        propA:\n          $ref: '#/components/schemas/ModelWithString'\n        propB:\n          $ref: '#/components/schemas/ModelWithString'\n        propC:\n          $ref: '#/components/schemas/ModelWithString'\n    ModelThatExtends:\n      description: This is a model that extends another model\n      type: object\n      allOf:\n        - $ref: '#/components/schemas/ModelWithString'\n        - type: object\n          properties:\n            propExtendsA:\n              type: string\n            propExtendsB:\n              $ref: '#/components/schemas/ModelWithString'\n    ModelThatExtendsExtends:\n      description: This is a model that extends another model\n      type: object\n      allOf:\n        - $ref: '#/components/schemas/ModelWithString'\n        - $ref: '#/components/schemas/ModelThatExtends'\n        - type: object\n          properties:\n            propExtendsC:\n              type: string\n            propExtendsD:\n              $ref: '#/components/schemas/ModelWithString'\n    ModelWithPattern:\n      description: This is a model that contains a some patterns\n      type: object\n      required:\n        - key\n        - name\n      properties:\n        key:\n          maxLength: 64\n          pattern: ^[a-zA-Z0-9_]*$\n          type: string\n        name:\n          maxLength: 255\n          type: string\n        enabled:\n          type: boolean\n          readOnly: true\n        modified:\n          type: string\n          format: date-time\n          readOnly: true\n        id:\n          type: string\n          pattern: ^\\d{2}-\\d{3}-\\d{4}$\n        text:\n          type: string\n          pattern: ^\\w+$\n        patternWithSingleQuotes:\n          type: string\n          pattern: ^[a-zA-Z0-9']*$\n        patternWithNewline:\n          type: string\n          pattern: aaa\\nbbb\n        patternWithBacktick:\n          type: string\n          pattern: aaa`bbb\n        patternWithUnicode:\n          type: string\n          pattern: ^\\p{L}+$\n    File:\n      required:\n        - mime\n      type: object\n      properties:\n        id:\n          title: Id\n          type: string\n          readOnly: true\n          minLength: 1\n        updated_at:\n          title: Updated at\n          type: string\n          format: date-time\n          readOnly: true\n        created_at:\n          title: Created at\n          type: string\n          format: date-time\n          readOnly: true\n        mime:\n          title: Mime\n          type: string\n          maxLength: 24\n          minLength: 1\n        file:\n          title: File\n          type: string\n          readOnly: true\n          format: uri\n    default:\n      type: object\n      properties:\n        name:\n          type: string\n    Pageable:\n      type: object\n      properties:\n        page:\n          minimum: 0\n          type: integer\n          format: int32\n          default: 0\n        size:\n          minimum: 1\n          type: integer\n          format: int32\n        sort:\n          type: array\n          items:\n            type: string\n    FreeFormObjectWithoutAdditionalProperties:\n      description: This is a free-form object without additionalProperties.\n      type: object\n    FreeFormObjectWithAdditionalPropertiesEqTrue:\n      description: 'This is a free-form object with additionalProperties: true.'\n      type: object\n      additionalProperties: true\n    FreeFormObjectWithAdditionalPropertiesEqEmptyObject:\n      description: 'This is a free-form object with additionalProperties: {}.'\n      type: object\n      additionalProperties: {}\n    ModelWithConst:\n      type: object\n      properties:\n        String:\n          const: String\n        number:\n          const: 0\n        'null':\n          const: null\n        withType:\n          type: string\n          const: Some string\n    ModelWithAdditionalPropertiesEqTrue:\n      description: 'This is a model with one property and additionalProperties: true'\n      type: object\n      properties:\n        prop:\n          description: This is a simple string property\n          type: string\n      additionalProperties: true\n    NestedAnyOfArraysNullable:\n      properties:\n        nullableArray:\n          anyOf:\n            - items:\n                anyOf:\n                  - type: string\n                  - type: boolean\n              type: array\n            - type: 'null'\n      type: object\n    CompositionWithOneOfAndProperties:\n      type: object\n      oneOf:\n        - type: object\n          required:\n            - foo\n          properties:\n            foo:\n              $ref: '#/components/parameters/SimpleParameter'\n          additionalProperties: false\n        - type: object\n          required:\n            - bar\n          properties:\n            bar:\n              $ref: '#/components/schemas/NonAsciiStringæøåÆØÅöôêÊ字符串'\n          additionalProperties: false\n      required:\n        - baz\n        - qux\n      properties:\n        baz:\n          type:\n            - integer\n            - 'null'\n          format: uint16\n          minimum: 0\n        qux:\n          type: integer\n          format: uint8\n          minimum: 0\n    NullableObject:\n      type:\n        - object\n        - 'null'\n      description: An object that can be null\n      properties:\n        foo:\n          type: string\n      default: null\n    CharactersInDescription:\n      type: string\n      description: Some % character\n    ModelWithNullableObject:\n      type: object\n      properties:\n        data:\n          $ref: '#/components/schemas/NullableObject'\n    ModelWithAdditionalPropertiesRef:\n      type: object\n      description: An object with additional properties that can be null (anyOf ref + null)\n      additionalProperties:\n        anyOf:\n          - $ref: '#/components/schemas/NullableObject'\n          - type: 'null'\n    ModelWithOneOfEnum:\n      oneOf:\n        - type: object\n          required:\n            - foo\n          properties:\n            foo:\n              type: string\n              enum:\n                - Bar\n        - type: object\n          required:\n            - foo\n          properties:\n            foo:\n              type: string\n              enum:\n                - Baz\n        - type: object\n          required:\n            - foo\n          properties:\n            foo:\n              type: string\n              enum:\n                - Qux\n        - type: object\n          required:\n            - content\n            - foo\n          properties:\n            content:\n              type: string\n              format: date-time\n            foo:\n              type: string\n              enum:\n                - Quux\n        - type: object\n          required:\n            - content\n            - foo\n          properties:\n            content:\n              type: array\n              prefixItems:\n                - type: string\n                  format: date-time\n                - type: string\n              maxItems: 2\n              minItems: 2\n            foo:\n              type: string\n              enum:\n                - Corge\n    ModelWithNestedArrayEnumsDataFoo:\n      enum:\n        - foo\n        - bar\n      type: string\n    ModelWithNestedArrayEnumsDataBar:\n      enum:\n        - baz\n        - qux\n      type: string\n    ModelWithNestedArrayEnumsData:\n      type: object\n      properties:\n        foo:\n          type: array\n          items:\n            $ref: '#/components/schemas/ModelWithNestedArrayEnumsDataFoo'\n        bar:\n          type: array\n          items:\n            $ref: '#/components/schemas/ModelWithNestedArrayEnumsDataBar'\n    ModelWithNestedArrayEnums:\n      type: object\n      properties:\n        array_strings:\n          type: array\n          items:\n            type: string\n        data:\n          allOf:\n            - $ref: '#/components/schemas/ModelWithNestedArrayEnumsData'\n    ModelWithNestedCompositionEnums:\n      type: object\n      properties:\n        foo:\n          allOf:\n            - $ref: '#/components/schemas/ModelWithNestedArrayEnumsDataFoo'\n    ModelWithReadOnlyAndWriteOnly:\n      type: object\n      required:\n        - foo\n        - bar\n        - baz\n      properties:\n        foo:\n          type: string\n        bar:\n          readOnly: true\n          type: string\n        baz:\n          type: string\n          writeOnly: true\n    ModelWithConstantSizeArray:\n      type: array\n      items:\n        type: number\n      minItems: 2\n      maxItems: 2\n    ModelWithAnyOfConstantSizeArray:\n      type: array\n      items:\n        oneOf:\n          - type: number\n          - type: string\n      minItems: 3\n      maxItems: 3\n    ModelWithPrefixItemsConstantSizeArray:\n      type: array\n      prefixItems:\n        - $ref: '#/components/schemas/ModelWithInteger'\n        - oneOf:\n            - type: number\n            - type: string\n        - type: string\n    ModelWithAnyOfConstantSizeArrayNullable:\n      type:\n        - array\n      items:\n        oneOf:\n          - type:\n              - number\n              - 'null'\n          - type: string\n      minItems: 3\n      maxItems: 3\n    ModelWithAnyOfConstantSizeArrayWithNSizeAndOptions:\n      type: array\n      items:\n        oneOf:\n          - type: number\n          - $ref: '#/components/schemas/import'\n      minItems: 2\n      maxItems: 2\n    ModelWithAnyOfConstantSizeArrayAndIntersect:\n      type: array\n      items:\n        allOf:\n          - type: number\n          - type: string\n      minItems: 2\n      maxItems: 2\n    ModelWithNumericEnumUnion:\n      type: object\n      properties:\n        value:\n          type: number\n          description: Период\n          enum:\n            - -10\n            - -1\n            - 0\n            - 1\n            - 3\n            - 6\n            - 12\n    ModelWithBackticksInDescription:\n      description: Some description with `back ticks`\n      type: object\n      properties:\n        template:\n          type: string\n          description: >-\n            The template `that` should be used for parsing and importing the\n            contents of the CSV file.\n\n\n            <br/><p>There is one placeholder currently\n            supported:<ul>     <li><b>${x}</b> - refers to the n-th column in\n            the CSV file, e.g. ${1}, ${2}, ...)</li></ul><p>Example of a correct\n            JSON template:</p>\n\n            <pre>\n\n            [\n              {\n                \"resourceType\": \"Asset\",\n                \"identifier\": {\n                  \"name\": \"${1}\",\n                  \"domain\": {\n                    \"name\": \"${2}\",\n                    \"community\": {\n                      \"name\": \"Some Community\"\n                    }\n                  }\n                },\n                \"attributes\" : {\n                  \"00000000-0000-0000-0000-000000003115\" : [ {\n                    \"value\" : \"${3}\"\n                  } ],\n                  \"00000000-0000-0000-0000-000000000222\" : [ {\n                    \"value\" : \"${4}\"\n                  } ]\n                }\n              }\n            ]\n\n            </pre>\n    ModelWithOneOfAndProperties:\n      type: object\n      oneOf:\n        - $ref: '#/components/parameters/SimpleParameter'\n        - $ref: '#/components/schemas/NonAsciiStringæøåÆØÅöôêÊ字符串'\n      required:\n        - baz\n        - qux\n      properties:\n        baz:\n          type:\n            - integer\n            - 'null'\n          format: uint16\n          minimum: 0\n        qux:\n          type: integer\n          format: uint8\n          minimum: 0\n    ParameterSimpleParameterUnused:\n      description: Model used to test deduplication strategy (unused)\n      type: string\n    PostServiceWithEmptyTagResponse:\n      description: Model used to test deduplication strategy\n      type: string\n    PostServiceWithEmptyTagResponse2:\n      description: Model used to test deduplication strategy\n      type: string\n    DeleteFooData:\n      description: Model used to test deduplication strategy\n      type: string\n    DeleteFooData2:\n      description: Model used to test deduplication strategy\n      type: string\n    import:\n      description: Model with restricted keyword name\n      type: string\n    SchemaWithFormRestrictedKeys:\n      type: object\n      properties:\n        description:\n          type: string\n        x-enum-descriptions:\n          type: string\n        x-enum-varnames:\n          type: string\n        x-enumNames:\n          type: string\n        title:\n          type: string\n        object:\n          type: object\n          properties:\n            description:\n              type: string\n            x-enum-descriptions:\n              type: string\n            x-enum-varnames:\n              type: string\n            x-enumNames:\n              type: string\n            title:\n              type: string\n        array:\n          type: array\n          items:\n            type: object\n            properties:\n              description:\n                type: string\n              x-enum-descriptions:\n                type: string\n              x-enum-varnames:\n                type: string\n              x-enumNames:\n                type: string\n              title:\n                type: string\n    io.k8s.apimachinery.pkg.apis.meta.v1.DeleteOptions:\n      description: This schema was giving PascalCase transformations a hard time\n      properties:\n        preconditions:\n          allOf:\n            - $ref: '#/components/schemas/io.k8s.apimachinery.pkg.apis.meta.v1.Preconditions'\n          description: Must be fulfilled before a deletion is carried out. If not\n            possible, a 409 Conflict status will be returned.\n      type: object\n    io.k8s.apimachinery.pkg.apis.meta.v1.Preconditions:\n      description: This schema was giving PascalCase transformations a hard time\n      properties:\n        resourceVersion:\n          description: Specifies the target ResourceVersion\n          type: string\n        uid:\n          description: Specifies the target UID.\n          type: string\n      type: object\n    AdditionalPropertiesUnknownIssue:\n      type: object\n      properties: {}\n      additionalProperties:\n        anyOf:\n          - type: string\n          - type: number\n    AdditionalPropertiesUnknownIssue2:\n      type: object\n      additionalProperties:\n        anyOf:\n          - type: string\n          - type: number\n    AdditionalPropertiesUnknownIssue3:\n      type: object\n      allOf:\n        - type: string\n        - type: object\n          required:\n            - entries\n          properties:\n            entries:\n              type: object\n              additionalProperties:\n                $ref: '#/components/schemas/AdditionalPropertiesUnknownIssue'\n    AdditionalPropertiesIntegerIssue:\n      type: object\n      required:\n        - value\n      properties:\n        value:\n          type: integer\n      additionalProperties:\n        type: integer\n    OneOfAllOfIssue:\n      oneOf:\n        - allOf:\n            - oneOf:\n                - $ref: '#/components/schemas/ConstValue'\n                - $ref: '#/components/schemas/Generic.Schema.Duplicate.Issue`1[System.Boolean]'\n            - $ref: '#/components/schemas/3e-num_1Период'\n        - $ref: '#/components/schemas/Generic.Schema.Duplicate.Issue`1[System.String]'\n    Generic.Schema.Duplicate.Issue`1[System.Boolean]:\n      type: object\n      properties:\n        item:\n          type: boolean\n        error:\n          type:\n            - string\n            - 'null'\n        hasError:\n          type: boolean\n          readOnly: true\n        data:\n          type: object\n          properties: {}\n          additionalProperties: false\n      additionalProperties: false\n    Generic.Schema.Duplicate.Issue`1[System.String]:\n      type: object\n      properties:\n        item:\n          type:\n            - string\n            - 'null'\n        error:\n          type:\n            - string\n            - 'null'\n        hasError:\n          type: boolean\n          readOnly: true\n      additionalProperties: false\n"
  },
  {
    "path": "specs/3.1.x/headers.yaml",
    "content": "openapi: 3.1.1\ninfo:\n  title: OpenAPI 3.1.1 headers example\n  version: 1\npaths:\n  /foo:\n    get:\n      parameters:\n        - in: header\n          name: Content-Type\n          required: true\n          schema:\n            type: string\n      requestBody:\n        required: true\n        content:\n          application/json:\n            schema:\n              type: string\n      responses:\n        '200':\n          description: OK\n          content:\n            application/json:\n              schema:\n                type: string\n    patch:\n      parameters:\n        - in: header\n          name: Content-Type\n          required: false\n          schema:\n            type: string\n      requestBody:\n        required: false\n        content:\n          application/json:\n            schema:\n              type: string\n      responses:\n        '200':\n          description: OK\n          content:\n            application/json:\n              schema:\n                type: string\n    post:\n      parameters:\n        - in: header\n          name: content-type\n          required: false\n          schema:\n            type: string\n      requestBody:\n        required: true\n        content:\n          application/json:\n            schema:\n              type: string\n      responses:\n        '200':\n          description: OK\n          content:\n            application/json:\n              schema:\n                type: string\n    put:\n      requestBody:\n        required: true\n        content:\n          application/json:\n            schema:\n              type: string\n      responses:\n        '200':\n          description: OK\n          content:\n            application/json:\n              schema:\n                type: string\n"
  },
  {
    "path": "specs/3.1.x/integer-formats.yaml",
    "content": "openapi: '3.1.0'\ninfo:\n  title: Integer Formats Test\n  version: '1.0.0'\ncomponents:\n  schemas:\n    IntegerFormats:\n      type: object\n      properties:\n        numberNoFormat:\n          type: number\n        numberInt8:\n          type: number\n          format: int8\n        numberInt16:\n          type: number\n          format: int16\n        numberInt32:\n          type: number\n          format: int32\n        numberInt64:\n          type: number\n          format: int64\n        numberUint8:\n          type: number\n          format: uint8\n        numberUint16:\n          type: number\n          format: uint16\n        numberUint32:\n          type: number\n          format: uint32\n        numberUint64:\n          type: number\n          format: uint64\n        integerNoFormat:\n          type: integer\n        integerInt8:\n          type: integer\n          format: int8\n        integerInt16:\n          type: integer\n          format: int16\n        integerInt32:\n          type: integer\n          format: int32\n        integerInt64:\n          type: integer\n          format: int64\n        integerUint8:\n          type: integer\n          format: uint8\n        integerUint16:\n          type: integer\n          format: uint16\n        integerUint32:\n          type: integer\n          format: uint32\n        integerUint64:\n          type: integer\n          format: uint64\n        stringInt64:\n          type: string\n          format: int64\n        stringUint64:\n          type: string\n          format: uint64\n"
  },
  {
    "path": "specs/3.1.x/internal-name-conflict.json",
    "content": "{\n  \"openapi\": \"3.1.1\",\n  \"info\": {\n    \"title\": \"OpenAPI 3.1.1 internal name conflict example\",\n    \"version\": \"1\"\n  },\n  \"paths\": {\n    \"/foo\": {\n      \"get\": {\n        \"operationId\": \"create__\",\n        \"responses\": {\n          \"200\": {\n            \"description\": \"OK\"\n          }\n        }\n      },\n      \"patch\": {\n        \"operationId\": \"create_\",\n        \"responses\": {\n          \"200\": {\n            \"description\": \"OK\"\n          }\n        }\n      },\n      \"post\": {\n        \"operationId\": \"create\",\n        \"responses\": {\n          \"200\": {\n            \"description\": \"OK\"\n          }\n        }\n      }\n    }\n  }\n}\n"
  },
  {
    "path": "specs/3.1.x/invalid/operationId-unique.yaml",
    "content": "openapi: 3.1.1\ninfo:\n  title: Invalid OpenAPI 3.1.1 operationId unique example\n  version: 1\npaths:\n  /foo:\n    get:\n      operationId: foo\n      responses:\n        '200':\n          content:\n            '*/*':\n              schema:\n                type: string\n          description: OK\n    post:\n      operationId: foo\n      responses:\n        '200':\n          content:\n            '*/*':\n              schema:\n                type: string\n          description: OK\n"
  },
  {
    "path": "specs/3.1.x/invalid/servers-array.yaml",
    "content": "openapi: 3.1.1\ninfo:\n  title: Invalid OpenAPI 3.1.1 servers array example\n  version: 1\nservers:\n  foo: bar\n"
  },
  {
    "path": "specs/3.1.x/invalid/servers-entry.yaml",
    "content": "openapi: 3.1.1\ninfo:\n  title: Invalid OpenAPI 3.1.1 servers entry example\n  version: 1\nservers:\n  - foo\n"
  },
  {
    "path": "specs/3.1.x/invalid/servers-required.yaml",
    "content": "openapi: 3.1.1\ninfo:\n  title: Invalid OpenAPI 3.1.1 servers required example\n  version: 1\nservers:\n  - description: missing url\n"
  },
  {
    "path": "specs/3.1.x/min-max-constraints.yaml",
    "content": "openapi: 3.1.0\ninfo:\n  title: OpenAPI 3.1.0 min max constraints example\n  version: '1'\ncomponents:\n  schemas:\n    NumberWithMinimum:\n      type: number\n      minimum: 10\n    NumberWithMaximum:\n      type: number\n      maximum: 100\n    NumberWithMinMax:\n      type: number\n      minimum: 0\n      maximum: 100\n    IntegerWithMinimum:\n      type: integer\n      minimum: 5\n    IntegerWithMaximum:\n      type: integer\n      maximum: 999\n    IntegerWithMinMax:\n      type: integer\n      minimum: 1\n      maximum: 999\n    NumberWithExclusiveMin:\n      type: number\n      exclusiveMinimum: 0\n    NumberWithExclusiveMax:\n      type: number\n      exclusiveMaximum: 100\n    NumberWithExclusiveMinMax:\n      type: number\n      exclusiveMinimum: 0\n      exclusiveMaximum: 1\n    IntegerWithExclusiveMin:\n      type: integer\n      exclusiveMinimum: 10\n    IntegerWithExclusiveMax:\n      type: integer\n      exclusiveMaximum: 50\n    IntegerWithExclusiveMinMax:\n      type: integer\n      exclusiveMinimum: 5\n      exclusiveMaximum: 15\n    NumberWithExclusiveMinInclusiveMax:\n      type: number\n      exclusiveMinimum: 10\n      maximum: 90\n    NumberWithInclusiveMinExclusiveMax:\n      type: number\n      minimum: 20\n      exclusiveMaximum: 80\n    IntegerWithExclusiveMinInclusiveMax:\n      type: integer\n      exclusiveMinimum: 5\n      maximum: 50\n    IntegerWithInclusiveMinExclusiveMax:\n      type: integer\n      minimum: 10\n      exclusiveMaximum: 100\n    Int64WithMinimum:\n      type: integer\n      format: int64\n      minimum: -5000000000000\n    Int64WithMaximum:\n      type: integer\n      format: int64\n      maximum: 5000000000000\n    Int64WithMinMax:\n      type: integer\n      format: int64\n      minimum: -4000000000000\n      maximum: 4000000000000\n    Int64WithExclusiveMin:\n      type: integer\n      format: int64\n      exclusiveMinimum: -3000000000000\n    Int64WithExclusiveMax:\n      type: integer\n      format: int64\n      exclusiveMaximum: 3000000000000\n    Int64WithExclusiveMinMax:\n      type: integer\n      format: int64\n      exclusiveMinimum: -2000000000000\n      exclusiveMaximum: 2000000000000\n    Int64WithExclusiveMinInclusiveMax:\n      type: integer\n      format: int64\n      exclusiveMinimum: -6000000000000\n      maximum: 6000000000000\n    Int64WithInclusiveMinExclusiveMax:\n      type: integer\n      format: int64\n      minimum: -7000000000000\n      exclusiveMaximum: 7000000000000\n    UInt64WithMinimum:\n      type: integer\n      format: uint64\n      minimum: 5000000000000\n    UInt64WithMaximum:\n      type: integer\n      format: uint64\n      maximum: 15000000000000\n    UInt64WithMinMax:\n      type: integer\n      format: uint64\n      minimum: 1000000000000\n      maximum: 10000000000000\n    UInt64WithExclusiveMin:\n      type: integer\n      format: uint64\n      exclusiveMinimum: 8000000000000\n    UInt64WithExclusiveMax:\n      type: integer\n      format: uint64\n      exclusiveMaximum: 12000000000000\n    UInt64WithExclusiveMinMax:\n      type: integer\n      format: uint64\n      exclusiveMinimum: 2000000000000\n      exclusiveMaximum: 8000000000000\n    UInt64WithExclusiveMinInclusiveMax:\n      type: integer\n      format: uint64\n      exclusiveMinimum: 3000000000000\n      maximum: 13000000000000\n    UInt64WithInclusiveMinExclusiveMax:\n      type: integer\n      format: uint64\n      minimum: 4000000000000\n      exclusiveMaximum: 14000000000000\n    PrecedenceTest:\n      type: number\n      minimum: 10\n      maximum: 90\n      exclusiveMinimum: 5\n      exclusiveMaximum: 95\n"
  },
  {
    "path": "specs/3.1.x/negative-property-names.json",
    "content": "{\n  \"openapi\": \"3.1.1\",\n  \"info\": {\n    \"title\": \"OpenAPI 3.1.1 negative property names example\",\n    \"version\": \"1\"\n  },\n  \"components\": {\n    \"schemas\": {\n      \"ReactionRollup\": {\n        \"title\": \"Reaction Rollup\",\n        \"type\": \"object\",\n        \"properties\": {\n          \"url\": {\n            \"format\": \"uri\",\n            \"type\": \"string\"\n          },\n          \"total_count\": {\n            \"type\": \"integer\"\n          },\n          \"+1\": {\n            \"type\": \"integer\"\n          },\n          \"-1\": {\n            \"type\": \"integer\"\n          },\n          \"laugh\": {\n            \"type\": \"integer\"\n          },\n          \"confused\": {\n            \"type\": \"integer\"\n          },\n          \"heart\": {\n            \"type\": \"integer\"\n          },\n          \"hooray\": {\n            \"type\": \"integer\"\n          },\n          \"eyes\": {\n            \"type\": \"integer\"\n          },\n          \"rocket\": {\n            \"type\": \"integer\"\n          }\n        },\n        \"required\": [\n          \"url\",\n          \"total_count\",\n          \"+1\",\n          \"-1\",\n          \"laugh\",\n          \"confused\",\n          \"heart\",\n          \"hooray\",\n          \"eyes\",\n          \"rocket\"\n        ]\n      }\n    }\n  }\n}\n"
  },
  {
    "path": "specs/3.1.x/object-properties-all-of.json",
    "content": "{\n  \"openapi\": \"3.1.0\",\n  \"info\": {\n    \"version\": \"1.0.0\"\n  },\n  \"components\": {\n    \"schemas\": {\n      \"Foo\": {\n        \"properties\": {\n          \"foo\": { \"type\": \"string\" },\n          \"bar\": { \"type\": \"string\" },\n          \"baz\": { \"type\": \"string\" }\n        },\n        \"required\": [\"foo\"],\n        \"allOf\": [\n          {\n            \"properties\": { \"bar\": { \"type\": \"string\" } },\n            \"required\": [\"bar\"]\n          },\n          {\n            \"properties\": { \"baz\": { \"type\": \"string\" } },\n            \"required\": [\"baz\"]\n          }\n        ]\n      }\n    }\n  }\n}\n"
  },
  {
    "path": "specs/3.1.x/object-properties-any-of.json",
    "content": "{\n  \"openapi\": \"3.1.0\",\n  \"info\": {\n    \"version\": \"1.0.0\"\n  },\n  \"components\": {\n    \"schemas\": {\n      \"Foo\": {\n        \"properties\": {\n          \"foo\": { \"type\": \"string\" },\n          \"bar\": { \"type\": \"string\" },\n          \"baz\": { \"type\": \"string\" }\n        },\n        \"required\": [\"foo\"],\n        \"anyOf\": [\n          {\n            \"properties\": { \"bar\": { \"type\": \"string\" } },\n            \"required\": [\"bar\"]\n          },\n          {\n            \"properties\": { \"baz\": { \"type\": \"string\" } },\n            \"required\": [\"baz\"]\n          }\n        ]\n      }\n    }\n  }\n}\n"
  },
  {
    "path": "specs/3.1.x/object-properties-one-of.json",
    "content": "{\n  \"openapi\": \"3.1.0\",\n  \"info\": {\n    \"version\": \"1.0.0\"\n  },\n  \"components\": {\n    \"schemas\": {\n      \"Foo\": {\n        \"properties\": {\n          \"foo\": { \"type\": \"string\" },\n          \"bar\": { \"type\": \"string\" },\n          \"baz\": { \"type\": \"string\" }\n        },\n        \"required\": [\"foo\"],\n        \"oneOf\": [\n          {\n            \"properties\": { \"bar\": { \"type\": \"string\" } },\n            \"required\": [\"bar\"]\n          },\n          {\n            \"properties\": { \"baz\": { \"type\": \"string\" } },\n            \"required\": [\"baz\"]\n          }\n        ]\n      }\n    }\n  }\n}\n"
  },
  {
    "path": "specs/3.1.x/object-property-names.yaml",
    "content": "openapi: 3.1.1\ninfo:\n  title: OpenAPI 3.1.1 object property names example\n  version: 1\ncomponents:\n  schemas:\n    Foo:\n      enum:\n        - foo\n        - bar\n      type: string\n    Bar:\n      additionalProperties:\n        type: string\n      propertyNames:\n        $ref: '#/components/schemas/Foo'\n      type: object\n    Baz:\n      additionalProperties:\n        type: integer\n      propertyNames:\n        $ref: '#/components/schemas/Foo'\n      type: object\n"
  },
  {
    "path": "specs/3.1.x/openai.yaml",
    "content": "openapi: 3.1.0\ninfo:\n  title: OpenAI API\n  description: The OpenAI REST API. Please see https://platform.openai.com/docs/api-reference for more details.\n  version: 2.3.0\n  termsOfService: https://openai.com/policies/terms-of-use\n  contact:\n    name: OpenAI Support\n    url: https://help.openai.com/\n  license:\n    name: MIT\n    url: https://github.com/openai/openai-openapi/blob/master/LICENSE\nservers:\n  - url: https://api.openai.com/v1\nsecurity:\n  - ApiKeyAuth: []\ntags:\n  - name: Assistants\n    description: Build Assistants that can call models and use tools.\n  - name: Audio\n    description: Turn audio into text or text into audio.\n  - name: Chat\n    description: Given a list of messages comprising a conversation, the model will return a response.\n  - name: Completions\n    description: >-\n      Given a prompt, the model will return one or more predicted completions, and can also return the\n      probabilities of alternative tokens at each position.\n  - name: Embeddings\n    description: >-\n      Get a vector representation of a given input that can be easily consumed by machine learning models and\n      algorithms.\n  - name: Evals\n    description: Manage and run evals in the OpenAI platform.\n  - name: Fine-tuning\n    description: Manage fine-tuning jobs to tailor a model to your specific training data.\n  - name: Graders\n    description: Manage and run graders in the OpenAI platform.\n  - name: Batch\n    description: Create large batches of API requests to run asynchronously.\n  - name: Files\n    description: Files are used to upload documents that can be used with features like Assistants and Fine-tuning.\n  - name: Uploads\n    description: Use Uploads to upload large files in multiple parts.\n  - name: Images\n    description: Given a prompt and/or an input image, the model will generate a new image.\n  - name: Models\n    description: List and describe the various models available in the API.\n  - name: Moderations\n    description: Given text and/or image inputs, classifies if those inputs are potentially harmful.\n  - name: Audit Logs\n    description: List user actions and configuration changes within this organization.\npaths:\n  /assistants:\n    get:\n      operationId: listAssistants\n      tags:\n        - Assistants\n      summary: List assistants\n      parameters:\n        - name: limit\n          in: query\n          description: >\n            A limit on the number of objects to be returned. Limit can range between 1 and 100, and the\n            default is 20.\n          required: false\n          schema:\n            type: integer\n            default: 20\n        - name: order\n          in: query\n          description: >\n            Sort order by the `created_at` timestamp of the objects. `asc` for ascending order and `desc` for\n            descending order.\n          schema:\n            type: string\n            default: desc\n            enum:\n              - asc\n              - desc\n        - name: after\n          in: query\n          description: >\n            A cursor for use in pagination. `after` is an object ID that defines your place in the list. For\n            instance, if you make a list request and receive 100 objects, ending with obj_foo, your subsequent\n            call can include after=obj_foo in order to fetch the next page of the list.\n          schema:\n            type: string\n        - name: before\n          in: query\n          description: >\n            A cursor for use in pagination. `before` is an object ID that defines your place in the list. For\n            instance, if you make a list request and receive 100 objects, starting with obj_foo, your\n            subsequent call can include before=obj_foo in order to fetch the previous page of the list.\n          schema:\n            type: string\n      responses:\n        '200':\n          description: OK\n          content:\n            application/json:\n              schema:\n                $ref: '#/components/schemas/ListAssistantsResponse'\n      x-oaiMeta:\n        name: List assistants\n        group: assistants\n        beta: true\n        returns: A list of [assistant](https://platform.openai.com/docs/api-reference/assistants/object) objects.\n        examples:\n          response: |\n            {\n              \"object\": \"list\",\n              \"data\": [\n                {\n                  \"id\": \"asst_abc123\",\n                  \"object\": \"assistant\",\n                  \"created_at\": 1698982736,\n                  \"name\": \"Coding Tutor\",\n                  \"description\": null,\n                  \"model\": \"gpt-4o\",\n                  \"instructions\": \"You are a helpful assistant designed to make me better at coding!\",\n                  \"tools\": [],\n                  \"tool_resources\": {},\n                  \"metadata\": {},\n                  \"top_p\": 1.0,\n                  \"temperature\": 1.0,\n                  \"response_format\": \"auto\"\n                },\n                {\n                  \"id\": \"asst_abc456\",\n                  \"object\": \"assistant\",\n                  \"created_at\": 1698982718,\n                  \"name\": \"My Assistant\",\n                  \"description\": null,\n                  \"model\": \"gpt-4o\",\n                  \"instructions\": \"You are a helpful assistant designed to make me better at coding!\",\n                  \"tools\": [],\n                  \"tool_resources\": {},\n                  \"metadata\": {},\n                  \"top_p\": 1.0,\n                  \"temperature\": 1.0,\n                  \"response_format\": \"auto\"\n                },\n                {\n                  \"id\": \"asst_abc789\",\n                  \"object\": \"assistant\",\n                  \"created_at\": 1698982643,\n                  \"name\": null,\n                  \"description\": null,\n                  \"model\": \"gpt-4o\",\n                  \"instructions\": null,\n                  \"tools\": [],\n                  \"tool_resources\": {},\n                  \"metadata\": {},\n                  \"top_p\": 1.0,\n                  \"temperature\": 1.0,\n                  \"response_format\": \"auto\"\n                }\n              ],\n              \"first_id\": \"asst_abc123\",\n              \"last_id\": \"asst_abc789\",\n              \"has_more\": false\n            }\n          request:\n            curl: |\n              curl \"https://api.openai.com/v1/assistants?order=desc&limit=20\" \\\n                -H \"Content-Type: application/json\" \\\n                -H \"Authorization: Bearer $OPENAI_API_KEY\" \\\n                -H \"OpenAI-Beta: assistants=v2\"\n            python: |-\n              from openai import OpenAI\n\n              client = OpenAI(\n                  api_key=\"My API Key\",\n              )\n              page = client.beta.assistants.list()\n              page = page.data[0]\n              print(page.id)\n            node.js: |-\n              import OpenAI from 'openai';\n\n              const client = new OpenAI({\n                apiKey: 'My API Key',\n              });\n\n              // Automatically fetches more pages as needed.\n              for await (const assistant of client.beta.assistants.list()) {\n                console.log(assistant.id);\n              }\n            go: |\n              package main\n\n              import (\n                \"context\"\n                \"fmt\"\n\n                \"github.com/openai/openai-go\"\n                \"github.com/openai/openai-go/option\"\n              )\n\n              func main() {\n                client := openai.NewClient(\n                  option.WithAPIKey(\"My API Key\"),\n                )\n                page, err := client.Beta.Assistants.List(context.TODO(), openai.BetaAssistantListParams{\n\n                })\n                if err != nil {\n                  panic(err.Error())\n                }\n                fmt.Printf(\"%+v\\n\", page)\n              }\n            java: |-\n              package com.openai.example;\n\n              import com.openai.client.OpenAIClient;\n              import com.openai.client.okhttp.OpenAIOkHttpClient;\n              import com.openai.models.beta.assistants.AssistantListPage;\n              import com.openai.models.beta.assistants.AssistantListParams;\n\n              public final class Main {\n                  private Main() {}\n\n                  public static void main(String[] args) {\n                      OpenAIClient client = OpenAIOkHttpClient.fromEnv();\n\n                      AssistantListPage page = client.beta().assistants().list();\n                  }\n              }\n            ruby: |-\n              require \"openai\"\n\n              openai = OpenAI::Client.new(api_key: \"My API Key\")\n\n              page = openai.beta.assistants.list\n\n              puts(page)\n      description: Returns a list of assistants.\n    post:\n      operationId: createAssistant\n      tags:\n        - Assistants\n      summary: Create assistant\n      requestBody:\n        required: true\n        content:\n          application/json:\n            schema:\n              $ref: '#/components/schemas/CreateAssistantRequest'\n      responses:\n        '200':\n          description: OK\n          content:\n            application/json:\n              schema:\n                $ref: '#/components/schemas/AssistantObject'\n      x-oaiMeta:\n        name: Create assistant\n        group: assistants\n        beta: true\n        returns: An [assistant](https://platform.openai.com/docs/api-reference/assistants/object) object.\n        examples:\n          - title: Code Interpreter\n            request:\n              curl: |\n                curl \"https://api.openai.com/v1/assistants\" \\\n                  -H \"Content-Type: application/json\" \\\n                  -H \"Authorization: Bearer $OPENAI_API_KEY\" \\\n                  -H \"OpenAI-Beta: assistants=v2\" \\\n                  -d '{\n                    \"instructions\": \"You are a personal math tutor. When asked a question, write and run Python code to answer the question.\",\n                    \"name\": \"Math Tutor\",\n                    \"tools\": [{\"type\": \"code_interpreter\"}],\n                    \"model\": \"gpt-4o\"\n                  }'\n              python: |-\n                from openai import OpenAI\n\n                client = OpenAI(\n                    api_key=\"My API Key\",\n                )\n                assistant = client.beta.assistants.create(\n                    model=\"gpt-4o\",\n                )\n                print(assistant.id)\n              node.js: |-\n                import OpenAI from 'openai';\n\n                const client = new OpenAI({\n                  apiKey: 'My API Key',\n                });\n\n                const assistant = await client.beta.assistants.create({ model: 'gpt-4o' });\n\n                console.log(assistant.id);\n              go: |\n                package main\n\n                import (\n                  \"context\"\n                  \"fmt\"\n\n                  \"github.com/openai/openai-go\"\n                  \"github.com/openai/openai-go/option\"\n                  \"github.com/openai/openai-go/shared\"\n                )\n\n                func main() {\n                  client := openai.NewClient(\n                    option.WithAPIKey(\"My API Key\"),\n                  )\n                  assistant, err := client.Beta.Assistants.New(context.TODO(), openai.BetaAssistantNewParams{\n                    Model: shared.ChatModelGPT5,\n                  })\n                  if err != nil {\n                    panic(err.Error())\n                  }\n                  fmt.Printf(\"%+v\\n\", assistant.ID)\n                }\n              java: |-\n                package com.openai.example;\n\n                import com.openai.client.OpenAIClient;\n                import com.openai.client.okhttp.OpenAIOkHttpClient;\n                import com.openai.models.ChatModel;\n                import com.openai.models.beta.assistants.Assistant;\n                import com.openai.models.beta.assistants.AssistantCreateParams;\n\n                public final class Main {\n                    private Main() {}\n\n                    public static void main(String[] args) {\n                        OpenAIClient client = OpenAIOkHttpClient.fromEnv();\n\n                        AssistantCreateParams params = AssistantCreateParams.builder()\n                            .model(ChatModel.GPT_5)\n                            .build();\n                        Assistant assistant = client.beta().assistants().create(params);\n                    }\n                }\n              ruby: |-\n                require \"openai\"\n\n                openai = OpenAI::Client.new(api_key: \"My API Key\")\n\n                assistant = openai.beta.assistants.create(model: :\"gpt-5\")\n\n                puts(assistant)\n            response: |\n              {\n                \"id\": \"asst_abc123\",\n                \"object\": \"assistant\",\n                \"created_at\": 1698984975,\n                \"name\": \"Math Tutor\",\n                \"description\": null,\n                \"model\": \"gpt-4o\",\n                \"instructions\": \"You are a personal math tutor. When asked a question, write and run Python code to answer the question.\",\n                \"tools\": [\n                  {\n                    \"type\": \"code_interpreter\"\n                  }\n                ],\n                \"metadata\": {},\n                \"top_p\": 1.0,\n                \"temperature\": 1.0,\n                \"response_format\": \"auto\"\n              }\n          - title: Files\n            request:\n              curl: |\n                curl https://api.openai.com/v1/assistants \\\n                  -H \"Content-Type: application/json\" \\\n                  -H \"Authorization: Bearer $OPENAI_API_KEY\" \\\n                  -H \"OpenAI-Beta: assistants=v2\" \\\n                  -d '{\n                    \"instructions\": \"You are an HR bot, and you have access to files to answer employee questions about company policies.\",\n                    \"tools\": [{\"type\": \"file_search\"}],\n                    \"tool_resources\": {\"file_search\": {\"vector_store_ids\": [\"vs_123\"]}},\n                    \"model\": \"gpt-4o\"\n                  }'\n              python: |-\n                from openai import OpenAI\n\n                client = OpenAI(\n                    api_key=\"My API Key\",\n                )\n                assistant = client.beta.assistants.create(\n                    model=\"gpt-4o\",\n                )\n                print(assistant.id)\n              node.js: |-\n                import OpenAI from 'openai';\n\n                const client = new OpenAI({\n                  apiKey: 'My API Key',\n                });\n\n                const assistant = await client.beta.assistants.create({ model: 'gpt-4o' });\n\n                console.log(assistant.id);\n              go: |\n                package main\n\n                import (\n                  \"context\"\n                  \"fmt\"\n\n                  \"github.com/openai/openai-go\"\n                  \"github.com/openai/openai-go/option\"\n                  \"github.com/openai/openai-go/shared\"\n                )\n\n                func main() {\n                  client := openai.NewClient(\n                    option.WithAPIKey(\"My API Key\"),\n                  )\n                  assistant, err := client.Beta.Assistants.New(context.TODO(), openai.BetaAssistantNewParams{\n                    Model: shared.ChatModelGPT5,\n                  })\n                  if err != nil {\n                    panic(err.Error())\n                  }\n                  fmt.Printf(\"%+v\\n\", assistant.ID)\n                }\n              java: |-\n                package com.openai.example;\n\n                import com.openai.client.OpenAIClient;\n                import com.openai.client.okhttp.OpenAIOkHttpClient;\n                import com.openai.models.ChatModel;\n                import com.openai.models.beta.assistants.Assistant;\n                import com.openai.models.beta.assistants.AssistantCreateParams;\n\n                public final class Main {\n                    private Main() {}\n\n                    public static void main(String[] args) {\n                        OpenAIClient client = OpenAIOkHttpClient.fromEnv();\n\n                        AssistantCreateParams params = AssistantCreateParams.builder()\n                            .model(ChatModel.GPT_5)\n                            .build();\n                        Assistant assistant = client.beta().assistants().create(params);\n                    }\n                }\n              ruby: |-\n                require \"openai\"\n\n                openai = OpenAI::Client.new(api_key: \"My API Key\")\n\n                assistant = openai.beta.assistants.create(model: :\"gpt-5\")\n\n                puts(assistant)\n            response: |\n              {\n                \"id\": \"asst_abc123\",\n                \"object\": \"assistant\",\n                \"created_at\": 1699009403,\n                \"name\": \"HR Helper\",\n                \"description\": null,\n                \"model\": \"gpt-4o\",\n                \"instructions\": \"You are an HR bot, and you have access to files to answer employee questions about company policies.\",\n                \"tools\": [\n                  {\n                    \"type\": \"file_search\"\n                  }\n                ],\n                \"tool_resources\": {\n                  \"file_search\": {\n                    \"vector_store_ids\": [\"vs_123\"]\n                  }\n                },\n                \"metadata\": {},\n                \"top_p\": 1.0,\n                \"temperature\": 1.0,\n                \"response_format\": \"auto\"\n              }\n      description: Create an assistant with a model and instructions.\n  /assistants/{assistant_id}:\n    get:\n      operationId: getAssistant\n      tags:\n        - Assistants\n      summary: Retrieve assistant\n      parameters:\n        - in: path\n          name: assistant_id\n          required: true\n          schema:\n            type: string\n          description: The ID of the assistant to retrieve.\n      responses:\n        '200':\n          description: OK\n          content:\n            application/json:\n              schema:\n                $ref: '#/components/schemas/AssistantObject'\n      x-oaiMeta:\n        name: Retrieve assistant\n        group: assistants\n        beta: true\n        returns: >-\n          The [assistant](https://platform.openai.com/docs/api-reference/assistants/object) object matching\n          the specified ID.\n        examples:\n          response: |\n            {\n              \"id\": \"asst_abc123\",\n              \"object\": \"assistant\",\n              \"created_at\": 1699009709,\n              \"name\": \"HR Helper\",\n              \"description\": null,\n              \"model\": \"gpt-4o\",\n              \"instructions\": \"You are an HR bot, and you have access to files to answer employee questions about company policies.\",\n              \"tools\": [\n                {\n                  \"type\": \"file_search\"\n                }\n              ],\n              \"metadata\": {},\n              \"top_p\": 1.0,\n              \"temperature\": 1.0,\n              \"response_format\": \"auto\"\n            }\n          request:\n            curl: |\n              curl https://api.openai.com/v1/assistants/asst_abc123 \\\n                -H \"Content-Type: application/json\" \\\n                -H \"Authorization: Bearer $OPENAI_API_KEY\" \\\n                -H \"OpenAI-Beta: assistants=v2\"\n            python: |-\n              from openai import OpenAI\n\n              client = OpenAI(\n                  api_key=\"My API Key\",\n              )\n              assistant = client.beta.assistants.retrieve(\n                  \"assistant_id\",\n              )\n              print(assistant.id)\n            node.js: |-\n              import OpenAI from 'openai';\n\n              const client = new OpenAI({\n                apiKey: 'My API Key',\n              });\n\n              const assistant = await client.beta.assistants.retrieve('assistant_id');\n\n              console.log(assistant.id);\n            go: |\n              package main\n\n              import (\n                \"context\"\n                \"fmt\"\n\n                \"github.com/openai/openai-go\"\n                \"github.com/openai/openai-go/option\"\n              )\n\n              func main() {\n                client := openai.NewClient(\n                  option.WithAPIKey(\"My API Key\"),\n                )\n                assistant, err := client.Beta.Assistants.Get(context.TODO(), \"assistant_id\")\n                if err != nil {\n                  panic(err.Error())\n                }\n                fmt.Printf(\"%+v\\n\", assistant.ID)\n              }\n            java: |-\n              package com.openai.example;\n\n              import com.openai.client.OpenAIClient;\n              import com.openai.client.okhttp.OpenAIOkHttpClient;\n              import com.openai.models.beta.assistants.Assistant;\n              import com.openai.models.beta.assistants.AssistantRetrieveParams;\n\n              public final class Main {\n                  private Main() {}\n\n                  public static void main(String[] args) {\n                      OpenAIClient client = OpenAIOkHttpClient.fromEnv();\n\n                      Assistant assistant = client.beta().assistants().retrieve(\"assistant_id\");\n                  }\n              }\n            ruby: |-\n              require \"openai\"\n\n              openai = OpenAI::Client.new(api_key: \"My API Key\")\n\n              assistant = openai.beta.assistants.retrieve(\"assistant_id\")\n\n              puts(assistant)\n      description: Retrieves an assistant.\n    post:\n      operationId: modifyAssistant\n      tags:\n        - Assistants\n      summary: Modify assistant\n      parameters:\n        - in: path\n          name: assistant_id\n          required: true\n          schema:\n            type: string\n          description: The ID of the assistant to modify.\n      requestBody:\n        required: true\n        content:\n          application/json:\n            schema:\n              $ref: '#/components/schemas/ModifyAssistantRequest'\n      responses:\n        '200':\n          description: OK\n          content:\n            application/json:\n              schema:\n                $ref: '#/components/schemas/AssistantObject'\n      x-oaiMeta:\n        name: Modify assistant\n        group: assistants\n        beta: true\n        returns: The modified [assistant](https://platform.openai.com/docs/api-reference/assistants/object) object.\n        examples:\n          response: |\n            {\n              \"id\": \"asst_123\",\n              \"object\": \"assistant\",\n              \"created_at\": 1699009709,\n              \"name\": \"HR Helper\",\n              \"description\": null,\n              \"model\": \"gpt-4o\",\n              \"instructions\": \"You are an HR bot, and you have access to files to answer employee questions about company policies. Always response with info from either of the files.\",\n              \"tools\": [\n                {\n                  \"type\": \"file_search\"\n                }\n              ],\n              \"tool_resources\": {\n                \"file_search\": {\n                  \"vector_store_ids\": []\n                }\n              },\n              \"metadata\": {},\n              \"top_p\": 1.0,\n              \"temperature\": 1.0,\n              \"response_format\": \"auto\"\n            }\n          request:\n            curl: |\n              curl https://api.openai.com/v1/assistants/asst_abc123 \\\n                -H \"Content-Type: application/json\" \\\n                -H \"Authorization: Bearer $OPENAI_API_KEY\" \\\n                -H \"OpenAI-Beta: assistants=v2\" \\\n                -d '{\n                    \"instructions\": \"You are an HR bot, and you have access to files to answer employee questions about company policies. Always response with info from either of the files.\",\n                    \"tools\": [{\"type\": \"file_search\"}],\n                    \"model\": \"gpt-4o\"\n                  }'\n            python: |-\n              from openai import OpenAI\n\n              client = OpenAI(\n                  api_key=\"My API Key\",\n              )\n              assistant = client.beta.assistants.update(\n                  assistant_id=\"assistant_id\",\n              )\n              print(assistant.id)\n            node.js: |-\n              import OpenAI from 'openai';\n\n              const client = new OpenAI({\n                apiKey: 'My API Key',\n              });\n\n              const assistant = await client.beta.assistants.update('assistant_id');\n\n              console.log(assistant.id);\n            go: |\n              package main\n\n              import (\n                \"context\"\n                \"fmt\"\n\n                \"github.com/openai/openai-go\"\n                \"github.com/openai/openai-go/option\"\n              )\n\n              func main() {\n                client := openai.NewClient(\n                  option.WithAPIKey(\"My API Key\"),\n                )\n                assistant, err := client.Beta.Assistants.Update(\n                  context.TODO(),\n                  \"assistant_id\",\n                  openai.BetaAssistantUpdateParams{\n\n                  },\n                )\n                if err != nil {\n                  panic(err.Error())\n                }\n                fmt.Printf(\"%+v\\n\", assistant.ID)\n              }\n            java: |-\n              package com.openai.example;\n\n              import com.openai.client.OpenAIClient;\n              import com.openai.client.okhttp.OpenAIOkHttpClient;\n              import com.openai.models.beta.assistants.Assistant;\n              import com.openai.models.beta.assistants.AssistantUpdateParams;\n\n              public final class Main {\n                  private Main() {}\n\n                  public static void main(String[] args) {\n                      OpenAIClient client = OpenAIOkHttpClient.fromEnv();\n\n                      Assistant assistant = client.beta().assistants().update(\"assistant_id\");\n                  }\n              }\n            ruby: |-\n              require \"openai\"\n\n              openai = OpenAI::Client.new(api_key: \"My API Key\")\n\n              assistant = openai.beta.assistants.update(\"assistant_id\")\n\n              puts(assistant)\n      description: Modifies an assistant.\n    delete:\n      operationId: deleteAssistant\n      tags:\n        - Assistants\n      summary: Delete assistant\n      parameters:\n        - in: path\n          name: assistant_id\n          required: true\n          schema:\n            type: string\n          description: The ID of the assistant to delete.\n      responses:\n        '200':\n          description: OK\n          content:\n            application/json:\n              schema:\n                $ref: '#/components/schemas/DeleteAssistantResponse'\n      x-oaiMeta:\n        name: Delete assistant\n        group: assistants\n        beta: true\n        returns: Deletion status\n        examples:\n          response: |\n            {\n              \"id\": \"asst_abc123\",\n              \"object\": \"assistant.deleted\",\n              \"deleted\": true\n            }\n          request:\n            curl: |\n              curl https://api.openai.com/v1/assistants/asst_abc123 \\\n                -H \"Content-Type: application/json\" \\\n                -H \"Authorization: Bearer $OPENAI_API_KEY\" \\\n                -H \"OpenAI-Beta: assistants=v2\" \\\n                -X DELETE\n            python: |-\n              from openai import OpenAI\n\n              client = OpenAI(\n                  api_key=\"My API Key\",\n              )\n              assistant_deleted = client.beta.assistants.delete(\n                  \"assistant_id\",\n              )\n              print(assistant_deleted.id)\n            node.js: |-\n              import OpenAI from 'openai';\n\n              const client = new OpenAI({\n                apiKey: 'My API Key',\n              });\n\n              const assistantDeleted = await client.beta.assistants.delete('assistant_id');\n\n              console.log(assistantDeleted.id);\n            go: |\n              package main\n\n              import (\n                \"context\"\n                \"fmt\"\n\n                \"github.com/openai/openai-go\"\n                \"github.com/openai/openai-go/option\"\n              )\n\n              func main() {\n                client := openai.NewClient(\n                  option.WithAPIKey(\"My API Key\"),\n                )\n                assistantDeleted, err := client.Beta.Assistants.Delete(context.TODO(), \"assistant_id\")\n                if err != nil {\n                  panic(err.Error())\n                }\n                fmt.Printf(\"%+v\\n\", assistantDeleted.ID)\n              }\n            java: |-\n              package com.openai.example;\n\n              import com.openai.client.OpenAIClient;\n              import com.openai.client.okhttp.OpenAIOkHttpClient;\n              import com.openai.models.beta.assistants.AssistantDeleteParams;\n              import com.openai.models.beta.assistants.AssistantDeleted;\n\n              public final class Main {\n                  private Main() {}\n\n                  public static void main(String[] args) {\n                      OpenAIClient client = OpenAIOkHttpClient.fromEnv();\n\n                      AssistantDeleted assistantDeleted = client.beta().assistants().delete(\"assistant_id\");\n                  }\n              }\n            ruby: |-\n              require \"openai\"\n\n              openai = OpenAI::Client.new(api_key: \"My API Key\")\n\n              assistant_deleted = openai.beta.assistants.delete(\"assistant_id\")\n\n              puts(assistant_deleted)\n      description: Delete an assistant.\n  /audio/speech:\n    post:\n      operationId: createSpeech\n      tags:\n        - Audio\n      summary: Create speech\n      requestBody:\n        required: true\n        content:\n          application/json:\n            schema:\n              $ref: '#/components/schemas/CreateSpeechRequest'\n      responses:\n        '200':\n          description: OK\n          headers:\n            Transfer-Encoding:\n              schema:\n                type: string\n              description: chunked\n          content:\n            application/octet-stream:\n              schema:\n                type: string\n                format: binary\n            text/event-stream:\n              schema:\n                $ref: '#/components/schemas/CreateSpeechResponseStreamEvent'\n      x-oaiMeta:\n        name: Create speech\n        group: audio\n        returns: >-\n          The audio file content or a [stream of audio\n          events](https://platform.openai.com/docs/api-reference/audio/speech-audio-delta-event).\n        examples:\n          - title: Default\n            request:\n              curl: |\n                curl https://api.openai.com/v1/audio/speech \\\n                  -H \"Authorization: Bearer $OPENAI_API_KEY\" \\\n                  -H \"Content-Type: application/json\" \\\n                  -d '{\n                    \"model\": \"gpt-4o-mini-tts\",\n                    \"input\": \"The quick brown fox jumped over the lazy dog.\",\n                    \"voice\": \"alloy\"\n                  }' \\\n                  --output speech.mp3\n              python: |-\n                from openai import OpenAI\n\n                client = OpenAI(\n                    api_key=\"My API Key\",\n                )\n                speech = client.audio.speech.create(\n                    input=\"input\",\n                    model=\"string\",\n                    voice=\"ash\",\n                )\n                print(speech)\n                content = speech.read()\n                print(content)\n              javascript: |\n                import fs from \"fs\";\n                import path from \"path\";\n                import OpenAI from \"openai\";\n\n                const openai = new OpenAI();\n\n                const speechFile = path.resolve(\"./speech.mp3\");\n\n                async function main() {\n                  const mp3 = await openai.audio.speech.create({\n                    model: \"gpt-4o-mini-tts\",\n                    voice: \"alloy\",\n                    input: \"Today is a wonderful day to build something people love!\",\n                  });\n                  console.log(speechFile);\n                  const buffer = Buffer.from(await mp3.arrayBuffer());\n                  await fs.promises.writeFile(speechFile, buffer);\n                }\n                main();\n              csharp: |\n                using System;\n                using System.IO;\n\n                using OpenAI.Audio;\n\n                AudioClient client = new(\n                    model: \"gpt-4o-mini-tts\",\n                    apiKey: Environment.GetEnvironmentVariable(\"OPENAI_API_KEY\")\n                );\n\n                BinaryData speech = client.GenerateSpeech(\n                    text: \"The quick brown fox jumped over the lazy dog.\",\n                    voice: GeneratedSpeechVoice.Alloy\n                );\n\n                using FileStream stream = File.OpenWrite(\"speech.mp3\");\n                speech.ToStream().CopyTo(stream);\n              node.js: >-\n                import OpenAI from 'openai';\n\n\n                const client = new OpenAI({\n                  apiKey: 'My API Key',\n                });\n\n\n                const speech = await client.audio.speech.create({ input: 'input', model: 'string', voice:\n                'ash' });\n\n\n                console.log(speech);\n\n\n                const content = await speech.blob();\n\n                console.log(content);\n              go: |\n                package main\n\n                import (\n                  \"context\"\n                  \"fmt\"\n\n                  \"github.com/openai/openai-go\"\n                  \"github.com/openai/openai-go/option\"\n                )\n\n                func main() {\n                  client := openai.NewClient(\n                    option.WithAPIKey(\"My API Key\"),\n                  )\n                  speech, err := client.Audio.Speech.New(context.TODO(), openai.AudioSpeechNewParams{\n                    Input: \"input\",\n                    Model: openai.SpeechModelTTS1,\n                    Voice: openai.AudioSpeechNewParamsVoiceAlloy,\n                  })\n                  if err != nil {\n                    panic(err.Error())\n                  }\n                  fmt.Printf(\"%+v\\n\", speech)\n                }\n              java: |-\n                package com.openai.example;\n\n                import com.openai.client.OpenAIClient;\n                import com.openai.client.okhttp.OpenAIOkHttpClient;\n                import com.openai.core.http.HttpResponse;\n                import com.openai.models.audio.speech.SpeechCreateParams;\n                import com.openai.models.audio.speech.SpeechModel;\n\n                public final class Main {\n                    private Main() {}\n\n                    public static void main(String[] args) {\n                        OpenAIClient client = OpenAIOkHttpClient.fromEnv();\n\n                        SpeechCreateParams params = SpeechCreateParams.builder()\n                            .input(\"input\")\n                            .model(SpeechModel.TTS_1)\n                            .voice(SpeechCreateParams.Voice.ALLOY)\n                            .build();\n                        HttpResponse speech = client.audio().speech().create(params);\n                    }\n                }\n              ruby: |-\n                require \"openai\"\n\n                openai = OpenAI::Client.new(api_key: \"My API Key\")\n\n                speech = openai.audio.speech.create(input: \"input\", model: :\"tts-1\", voice: :alloy)\n\n                puts(speech)\n          - title: SSE Stream Format\n            request:\n              curl: |\n                curl https://api.openai.com/v1/audio/speech \\\n                  -H \"Authorization: Bearer $OPENAI_API_KEY\" \\\n                  -H \"Content-Type: application/json\" \\\n                  -d '{\n                    \"model\": \"gpt-4o-mini-tts\",\n                    \"input\": \"The quick brown fox jumped over the lazy dog.\",\n                    \"voice\": \"alloy\",\n                    \"stream_format\": \"sse\"\n                  }'\n              node.js: >-\n                import OpenAI from 'openai';\n\n\n                const client = new OpenAI({\n                  apiKey: 'My API Key',\n                });\n\n\n                const speech = await client.audio.speech.create({ input: 'input', model: 'string', voice:\n                'ash' });\n\n\n                console.log(speech);\n\n\n                const content = await speech.blob();\n\n                console.log(content);\n              python: |-\n                from openai import OpenAI\n\n                client = OpenAI(\n                    api_key=\"My API Key\",\n                )\n                speech = client.audio.speech.create(\n                    input=\"input\",\n                    model=\"string\",\n                    voice=\"ash\",\n                )\n                print(speech)\n                content = speech.read()\n                print(content)\n              go: |\n                package main\n\n                import (\n                  \"context\"\n                  \"fmt\"\n\n                  \"github.com/openai/openai-go\"\n                  \"github.com/openai/openai-go/option\"\n                )\n\n                func main() {\n                  client := openai.NewClient(\n                    option.WithAPIKey(\"My API Key\"),\n                  )\n                  speech, err := client.Audio.Speech.New(context.TODO(), openai.AudioSpeechNewParams{\n                    Input: \"input\",\n                    Model: openai.SpeechModelTTS1,\n                    Voice: openai.AudioSpeechNewParamsVoiceAlloy,\n                  })\n                  if err != nil {\n                    panic(err.Error())\n                  }\n                  fmt.Printf(\"%+v\\n\", speech)\n                }\n              java: |-\n                package com.openai.example;\n\n                import com.openai.client.OpenAIClient;\n                import com.openai.client.okhttp.OpenAIOkHttpClient;\n                import com.openai.core.http.HttpResponse;\n                import com.openai.models.audio.speech.SpeechCreateParams;\n                import com.openai.models.audio.speech.SpeechModel;\n\n                public final class Main {\n                    private Main() {}\n\n                    public static void main(String[] args) {\n                        OpenAIClient client = OpenAIOkHttpClient.fromEnv();\n\n                        SpeechCreateParams params = SpeechCreateParams.builder()\n                            .input(\"input\")\n                            .model(SpeechModel.TTS_1)\n                            .voice(SpeechCreateParams.Voice.ALLOY)\n                            .build();\n                        HttpResponse speech = client.audio().speech().create(params);\n                    }\n                }\n              ruby: |-\n                require \"openai\"\n\n                openai = OpenAI::Client.new(api_key: \"My API Key\")\n\n                speech = openai.audio.speech.create(input: \"input\", model: :\"tts-1\", voice: :alloy)\n\n                puts(speech)\n      description: Generates audio from the input text.\n  /audio/transcriptions:\n    post:\n      operationId: createTranscription\n      tags:\n        - Audio\n      summary: Create transcription\n      requestBody:\n        required: true\n        content:\n          multipart/form-data:\n            schema:\n              $ref: '#/components/schemas/CreateTranscriptionRequest'\n      responses:\n        '200':\n          description: OK\n          content:\n            application/json:\n              schema:\n                anyOf:\n                  - $ref: '#/components/schemas/CreateTranscriptionResponseJson'\n                  - $ref: '#/components/schemas/CreateTranscriptionResponseVerboseJson'\n                    x-stainless-skip:\n                      - go\n            text/event-stream:\n              schema:\n                $ref: '#/components/schemas/CreateTranscriptionResponseStreamEvent'\n      x-oaiMeta:\n        name: Create transcription\n        group: audio\n        returns: >-\n          The [transcription object](https://platform.openai.com/docs/api-reference/audio/json-object), a\n          [verbose transcription\n          object](https://platform.openai.com/docs/api-reference/audio/verbose-json-object) or a [stream of\n          transcript\n          events](https://platform.openai.com/docs/api-reference/audio/transcript-text-delta-event).\n        examples:\n          - title: Default\n            request:\n              curl: |\n                curl https://api.openai.com/v1/audio/transcriptions \\\n                  -H \"Authorization: Bearer $OPENAI_API_KEY\" \\\n                  -H \"Content-Type: multipart/form-data\" \\\n                  -F file=\"@/path/to/file/audio.mp3\" \\\n                  -F model=\"gpt-4o-transcribe\"\n              python: |-\n                from openai import OpenAI\n\n                client = OpenAI(\n                    api_key=\"My API Key\",\n                )\n                transcription = client.audio.transcriptions.create(\n                    file=b\"raw file contents\",\n                    model=\"gpt-4o-transcribe\",\n                )\n                print(transcription)\n              javascript: |\n                import fs from \"fs\";\n                import OpenAI from \"openai\";\n\n                const openai = new OpenAI();\n\n                async function main() {\n                  const transcription = await openai.audio.transcriptions.create({\n                    file: fs.createReadStream(\"audio.mp3\"),\n                    model: \"gpt-4o-transcribe\",\n                  });\n\n                  console.log(transcription.text);\n                }\n                main();\n              csharp: |\n                using System;\n\n                using OpenAI.Audio;\n                string audioFilePath = \"audio.mp3\";\n\n                AudioClient client = new(\n                    model: \"gpt-4o-transcribe\",\n                    apiKey: Environment.GetEnvironmentVariable(\"OPENAI_API_KEY\")\n                );\n\n                AudioTranscription transcription = client.TranscribeAudio(audioFilePath);\n\n                Console.WriteLine($\"{transcription.Text}\");\n              node.js: |-\n                import OpenAI from 'openai';\n\n                const client = new OpenAI({\n                  apiKey: 'My API Key',\n                });\n\n                const transcription = await client.audio.transcriptions.create({\n                  file: fs.createReadStream('speech.mp3'),\n                  model: 'gpt-4o-transcribe',\n                });\n\n                console.log(transcription);\n              go: |\n                package main\n\n                import (\n                  \"bytes\"\n                  \"context\"\n                  \"fmt\"\n                  \"io\"\n\n                  \"github.com/openai/openai-go\"\n                  \"github.com/openai/openai-go/option\"\n                )\n\n                func main() {\n                  client := openai.NewClient(\n                    option.WithAPIKey(\"My API Key\"),\n                  )\n                  transcription, err := client.Audio.Transcriptions.New(context.TODO(), openai.AudioTranscriptionNewParams{\n                    File: io.Reader(bytes.NewBuffer([]byte(\"some file contents\"))),\n                    Model: openai.AudioModelWhisper1,\n                  })\n                  if err != nil {\n                    panic(err.Error())\n                  }\n                  fmt.Printf(\"%+v\\n\", transcription)\n                }\n              java: |-\n                package com.openai.example;\n\n                import com.openai.client.OpenAIClient;\n                import com.openai.client.okhttp.OpenAIOkHttpClient;\n                import com.openai.models.audio.AudioModel;\n                import com.openai.models.audio.transcriptions.TranscriptionCreateParams;\n                import com.openai.models.audio.transcriptions.TranscriptionCreateResponse;\n                import java.io.ByteArrayInputStream;\n\n                public final class Main {\n                    private Main() {}\n\n                    public static void main(String[] args) {\n                        OpenAIClient client = OpenAIOkHttpClient.fromEnv();\n\n                        TranscriptionCreateParams params = TranscriptionCreateParams.builder()\n                            .file(ByteArrayInputStream(\"some content\".getBytes()))\n                            .model(AudioModel.WHISPER_1)\n                            .build();\n                        TranscriptionCreateResponse transcription = client.audio().transcriptions().create(params);\n                    }\n                }\n              ruby: >-\n                require \"openai\"\n\n\n                openai = OpenAI::Client.new(api_key: \"My API Key\")\n\n\n                transcription = openai.audio.transcriptions.create(file: Pathname(__FILE__), model:\n                :\"whisper-1\")\n\n\n                puts(transcription)\n            response: |\n              {\n                \"text\": \"Imagine the wildest idea that you've ever had, and you're curious about how it might scale to something that's a 100, a 1,000 times bigger. This is a place where you can get to do that.\",\n                \"usage\": {\n                  \"type\": \"tokens\",\n                  \"input_tokens\": 14,\n                  \"input_token_details\": {\n                    \"text_tokens\": 0,\n                    \"audio_tokens\": 14\n                  },\n                  \"output_tokens\": 45,\n                  \"total_tokens\": 59\n                }\n              }\n          - title: Streaming\n            request:\n              curl: |\n                curl https://api.openai.com/v1/audio/transcriptions \\\n                  -H \"Authorization: Bearer $OPENAI_API_KEY\" \\\n                  -H \"Content-Type: multipart/form-data\" \\\n                  -F file=\"@/path/to/file/audio.mp3\" \\\n                  -F model=\"gpt-4o-mini-transcribe\" \\\n                  -F stream=true\n              python: |-\n                from openai import OpenAI\n\n                client = OpenAI(\n                    api_key=\"My API Key\",\n                )\n                transcription = client.audio.transcriptions.create(\n                    file=b\"raw file contents\",\n                    model=\"gpt-4o-transcribe\",\n                )\n                print(transcription)\n              javascript: |\n                import fs from \"fs\";\n                import OpenAI from \"openai\";\n\n                const openai = new OpenAI();\n\n                const stream = await openai.audio.transcriptions.create({\n                  file: fs.createReadStream(\"audio.mp3\"),\n                  model: \"gpt-4o-mini-transcribe\",\n                  stream: true,\n                });\n\n                for await (const event of stream) {\n                  console.log(event);\n                }\n              node.js: |-\n                import OpenAI from 'openai';\n\n                const client = new OpenAI({\n                  apiKey: 'My API Key',\n                });\n\n                const transcription = await client.audio.transcriptions.create({\n                  file: fs.createReadStream('speech.mp3'),\n                  model: 'gpt-4o-transcribe',\n                });\n\n                console.log(transcription);\n              go: |\n                package main\n\n                import (\n                  \"bytes\"\n                  \"context\"\n                  \"fmt\"\n                  \"io\"\n\n                  \"github.com/openai/openai-go\"\n                  \"github.com/openai/openai-go/option\"\n                )\n\n                func main() {\n                  client := openai.NewClient(\n                    option.WithAPIKey(\"My API Key\"),\n                  )\n                  transcription, err := client.Audio.Transcriptions.New(context.TODO(), openai.AudioTranscriptionNewParams{\n                    File: io.Reader(bytes.NewBuffer([]byte(\"some file contents\"))),\n                    Model: openai.AudioModelWhisper1,\n                  })\n                  if err != nil {\n                    panic(err.Error())\n                  }\n                  fmt.Printf(\"%+v\\n\", transcription)\n                }\n              java: |-\n                package com.openai.example;\n\n                import com.openai.client.OpenAIClient;\n                import com.openai.client.okhttp.OpenAIOkHttpClient;\n                import com.openai.models.audio.AudioModel;\n                import com.openai.models.audio.transcriptions.TranscriptionCreateParams;\n                import com.openai.models.audio.transcriptions.TranscriptionCreateResponse;\n                import java.io.ByteArrayInputStream;\n\n                public final class Main {\n                    private Main() {}\n\n                    public static void main(String[] args) {\n                        OpenAIClient client = OpenAIOkHttpClient.fromEnv();\n\n                        TranscriptionCreateParams params = TranscriptionCreateParams.builder()\n                            .file(ByteArrayInputStream(\"some content\".getBytes()))\n                            .model(AudioModel.WHISPER_1)\n                            .build();\n                        TranscriptionCreateResponse transcription = client.audio().transcriptions().create(params);\n                    }\n                }\n              ruby: >-\n                require \"openai\"\n\n\n                openai = OpenAI::Client.new(api_key: \"My API Key\")\n\n\n                transcription = openai.audio.transcriptions.create(file: Pathname(__FILE__), model:\n                :\"whisper-1\")\n\n\n                puts(transcription)\n            response: >\n              data:\n              {\"type\":\"transcript.text.delta\",\"delta\":\"I\",\"logprobs\":[{\"token\":\"I\",\"logprob\":-0.00007588794,\"bytes\":[73]}]}\n\n\n              data: {\"type\":\"transcript.text.delta\",\"delta\":\" see\",\"logprobs\":[{\"token\":\"\n              see\",\"logprob\":-3.1281633e-7,\"bytes\":[32,115,101,101]}]}\n\n\n              data: {\"type\":\"transcript.text.delta\",\"delta\":\" skies\",\"logprobs\":[{\"token\":\"\n              skies\",\"logprob\":-2.3392786e-6,\"bytes\":[32,115,107,105,101,115]}]}\n\n\n              data: {\"type\":\"transcript.text.delta\",\"delta\":\" of\",\"logprobs\":[{\"token\":\"\n              of\",\"logprob\":-3.1281633e-7,\"bytes\":[32,111,102]}]}\n\n\n              data: {\"type\":\"transcript.text.delta\",\"delta\":\" blue\",\"logprobs\":[{\"token\":\"\n              blue\",\"logprob\":-1.0280384e-6,\"bytes\":[32,98,108,117,101]}]}\n\n\n              data: {\"type\":\"transcript.text.delta\",\"delta\":\" and\",\"logprobs\":[{\"token\":\"\n              and\",\"logprob\":-0.0005108566,\"bytes\":[32,97,110,100]}]}\n\n\n              data: {\"type\":\"transcript.text.delta\",\"delta\":\" clouds\",\"logprobs\":[{\"token\":\"\n              clouds\",\"logprob\":-1.9361265e-7,\"bytes\":[32,99,108,111,117,100,115]}]}\n\n\n              data: {\"type\":\"transcript.text.delta\",\"delta\":\" of\",\"logprobs\":[{\"token\":\"\n              of\",\"logprob\":-1.9361265e-7,\"bytes\":[32,111,102]}]}\n\n\n              data: {\"type\":\"transcript.text.delta\",\"delta\":\" white\",\"logprobs\":[{\"token\":\"\n              white\",\"logprob\":-7.89631e-7,\"bytes\":[32,119,104,105,116,101]}]}\n\n\n              data:\n              {\"type\":\"transcript.text.delta\",\"delta\":\",\",\"logprobs\":[{\"token\":\",\",\"logprob\":-0.0014890312,\"bytes\":[44]}]}\n\n\n              data: {\"type\":\"transcript.text.delta\",\"delta\":\" the\",\"logprobs\":[{\"token\":\"\n              the\",\"logprob\":-0.0110956915,\"bytes\":[32,116,104,101]}]}\n\n\n              data: {\"type\":\"transcript.text.delta\",\"delta\":\" bright\",\"logprobs\":[{\"token\":\"\n              bright\",\"logprob\":0.0,\"bytes\":[32,98,114,105,103,104,116]}]}\n\n\n              data: {\"type\":\"transcript.text.delta\",\"delta\":\" blessed\",\"logprobs\":[{\"token\":\"\n              blessed\",\"logprob\":-0.000045848617,\"bytes\":[32,98,108,101,115,115,101,100]}]}\n\n\n              data: {\"type\":\"transcript.text.delta\",\"delta\":\" days\",\"logprobs\":[{\"token\":\"\n              days\",\"logprob\":-0.000010802739,\"bytes\":[32,100,97,121,115]}]}\n\n\n              data:\n              {\"type\":\"transcript.text.delta\",\"delta\":\",\",\"logprobs\":[{\"token\":\",\",\"logprob\":-0.00001700133,\"bytes\":[44]}]}\n\n\n              data: {\"type\":\"transcript.text.delta\",\"delta\":\" the\",\"logprobs\":[{\"token\":\"\n              the\",\"logprob\":-0.0000118755715,\"bytes\":[32,116,104,101]}]}\n\n\n              data: {\"type\":\"transcript.text.delta\",\"delta\":\" dark\",\"logprobs\":[{\"token\":\"\n              dark\",\"logprob\":-5.5122365e-7,\"bytes\":[32,100,97,114,107]}]}\n\n\n              data: {\"type\":\"transcript.text.delta\",\"delta\":\" sacred\",\"logprobs\":[{\"token\":\"\n              sacred\",\"logprob\":-5.4385737e-6,\"bytes\":[32,115,97,99,114,101,100]}]}\n\n\n              data: {\"type\":\"transcript.text.delta\",\"delta\":\" nights\",\"logprobs\":[{\"token\":\"\n              nights\",\"logprob\":-4.00813e-6,\"bytes\":[32,110,105,103,104,116,115]}]}\n\n\n              data:\n              {\"type\":\"transcript.text.delta\",\"delta\":\",\",\"logprobs\":[{\"token\":\",\",\"logprob\":-0.0036910512,\"bytes\":[44]}]}\n\n\n              data: {\"type\":\"transcript.text.delta\",\"delta\":\" and\",\"logprobs\":[{\"token\":\"\n              and\",\"logprob\":-0.0031903093,\"bytes\":[32,97,110,100]}]}\n\n\n              data: {\"type\":\"transcript.text.delta\",\"delta\":\" I\",\"logprobs\":[{\"token\":\"\n              I\",\"logprob\":-1.504853e-6,\"bytes\":[32,73]}]}\n\n\n              data: {\"type\":\"transcript.text.delta\",\"delta\":\" think\",\"logprobs\":[{\"token\":\"\n              think\",\"logprob\":-4.3202e-7,\"bytes\":[32,116,104,105,110,107]}]}\n\n\n              data: {\"type\":\"transcript.text.delta\",\"delta\":\" to\",\"logprobs\":[{\"token\":\"\n              to\",\"logprob\":-1.9361265e-7,\"bytes\":[32,116,111]}]}\n\n\n              data: {\"type\":\"transcript.text.delta\",\"delta\":\" myself\",\"logprobs\":[{\"token\":\"\n              myself\",\"logprob\":-1.7432603e-6,\"bytes\":[32,109,121,115,101,108,102]}]}\n\n\n              data:\n              {\"type\":\"transcript.text.delta\",\"delta\":\",\",\"logprobs\":[{\"token\":\",\",\"logprob\":-0.29254505,\"bytes\":[44]}]}\n\n\n              data: {\"type\":\"transcript.text.delta\",\"delta\":\" what\",\"logprobs\":[{\"token\":\"\n              what\",\"logprob\":-0.016815351,\"bytes\":[32,119,104,97,116]}]}\n\n\n              data: {\"type\":\"transcript.text.delta\",\"delta\":\" a\",\"logprobs\":[{\"token\":\"\n              a\",\"logprob\":-3.1281633e-7,\"bytes\":[32,97]}]}\n\n\n              data: {\"type\":\"transcript.text.delta\",\"delta\":\" wonderful\",\"logprobs\":[{\"token\":\"\n              wonderful\",\"logprob\":-2.1008714e-6,\"bytes\":[32,119,111,110,100,101,114,102,117,108]}]}\n\n\n              data: {\"type\":\"transcript.text.delta\",\"delta\":\" world\",\"logprobs\":[{\"token\":\"\n              world\",\"logprob\":-8.180258e-6,\"bytes\":[32,119,111,114,108,100]}]}\n\n\n              data:\n              {\"type\":\"transcript.text.delta\",\"delta\":\".\",\"logprobs\":[{\"token\":\".\",\"logprob\":-0.014231676,\"bytes\":[46]}]}\n\n\n              data: {\"type\":\"transcript.text.done\",\"text\":\"I see skies of blue and clouds of white, the bright\n              blessed days, the dark sacred nights, and I think to myself, what a wonderful\n              world.\",\"logprobs\":[{\"token\":\"I\",\"logprob\":-0.00007588794,\"bytes\":[73]},{\"token\":\"\n              see\",\"logprob\":-3.1281633e-7,\"bytes\":[32,115,101,101]},{\"token\":\"\n              skies\",\"logprob\":-2.3392786e-6,\"bytes\":[32,115,107,105,101,115]},{\"token\":\"\n              of\",\"logprob\":-3.1281633e-7,\"bytes\":[32,111,102]},{\"token\":\"\n              blue\",\"logprob\":-1.0280384e-6,\"bytes\":[32,98,108,117,101]},{\"token\":\"\n              and\",\"logprob\":-0.0005108566,\"bytes\":[32,97,110,100]},{\"token\":\"\n              clouds\",\"logprob\":-1.9361265e-7,\"bytes\":[32,99,108,111,117,100,115]},{\"token\":\"\n              of\",\"logprob\":-1.9361265e-7,\"bytes\":[32,111,102]},{\"token\":\"\n              white\",\"logprob\":-7.89631e-7,\"bytes\":[32,119,104,105,116,101]},{\"token\":\",\",\"logprob\":-0.0014890312,\"bytes\":[44]},{\"token\":\"\n              the\",\"logprob\":-0.0110956915,\"bytes\":[32,116,104,101]},{\"token\":\"\n              bright\",\"logprob\":0.0,\"bytes\":[32,98,114,105,103,104,116]},{\"token\":\"\n              blessed\",\"logprob\":-0.000045848617,\"bytes\":[32,98,108,101,115,115,101,100]},{\"token\":\"\n              days\",\"logprob\":-0.000010802739,\"bytes\":[32,100,97,121,115]},{\"token\":\",\",\"logprob\":-0.00001700133,\"bytes\":[44]},{\"token\":\"\n              the\",\"logprob\":-0.0000118755715,\"bytes\":[32,116,104,101]},{\"token\":\"\n              dark\",\"logprob\":-5.5122365e-7,\"bytes\":[32,100,97,114,107]},{\"token\":\"\n              sacred\",\"logprob\":-5.4385737e-6,\"bytes\":[32,115,97,99,114,101,100]},{\"token\":\"\n              nights\",\"logprob\":-4.00813e-6,\"bytes\":[32,110,105,103,104,116,115]},{\"token\":\",\",\"logprob\":-0.0036910512,\"bytes\":[44]},{\"token\":\"\n              and\",\"logprob\":-0.0031903093,\"bytes\":[32,97,110,100]},{\"token\":\"\n              I\",\"logprob\":-1.504853e-6,\"bytes\":[32,73]},{\"token\":\"\n              think\",\"logprob\":-4.3202e-7,\"bytes\":[32,116,104,105,110,107]},{\"token\":\"\n              to\",\"logprob\":-1.9361265e-7,\"bytes\":[32,116,111]},{\"token\":\"\n              myself\",\"logprob\":-1.7432603e-6,\"bytes\":[32,109,121,115,101,108,102]},{\"token\":\",\",\"logprob\":-0.29254505,\"bytes\":[44]},{\"token\":\"\n              what\",\"logprob\":-0.016815351,\"bytes\":[32,119,104,97,116]},{\"token\":\"\n              a\",\"logprob\":-3.1281633e-7,\"bytes\":[32,97]},{\"token\":\"\n              wonderful\",\"logprob\":-2.1008714e-6,\"bytes\":[32,119,111,110,100,101,114,102,117,108]},{\"token\":\"\n              world\",\"logprob\":-8.180258e-6,\"bytes\":[32,119,111,114,108,100]},{\"token\":\".\",\"logprob\":-0.014231676,\"bytes\":[46]}],\"usage\":{\"input_tokens\":14,\"input_token_details\":{\"text_tokens\":0,\"audio_tokens\":14},\"output_tokens\":45,\"total_tokens\":59}}\n          - title: Logprobs\n            request:\n              curl: |\n                curl https://api.openai.com/v1/audio/transcriptions \\\n                  -H \"Authorization: Bearer $OPENAI_API_KEY\" \\\n                  -H \"Content-Type: multipart/form-data\" \\\n                  -F file=\"@/path/to/file/audio.mp3\" \\\n                  -F \"include[]=logprobs\" \\\n                  -F model=\"gpt-4o-transcribe\" \\\n                  -F response_format=\"json\"\n              python: |-\n                from openai import OpenAI\n\n                client = OpenAI(\n                    api_key=\"My API Key\",\n                )\n                transcription = client.audio.transcriptions.create(\n                    file=b\"raw file contents\",\n                    model=\"gpt-4o-transcribe\",\n                )\n                print(transcription)\n              javascript: |\n                import fs from \"fs\";\n                import OpenAI from \"openai\";\n\n                const openai = new OpenAI();\n\n                async function main() {\n                  const transcription = await openai.audio.transcriptions.create({\n                    file: fs.createReadStream(\"audio.mp3\"),\n                    model: \"gpt-4o-transcribe\",\n                    response_format: \"json\",\n                    include: [\"logprobs\"]\n                  });\n\n                  console.log(transcription);\n                }\n                main();\n              node.js: |-\n                import OpenAI from 'openai';\n\n                const client = new OpenAI({\n                  apiKey: 'My API Key',\n                });\n\n                const transcription = await client.audio.transcriptions.create({\n                  file: fs.createReadStream('speech.mp3'),\n                  model: 'gpt-4o-transcribe',\n                });\n\n                console.log(transcription);\n              go: |\n                package main\n\n                import (\n                  \"bytes\"\n                  \"context\"\n                  \"fmt\"\n                  \"io\"\n\n                  \"github.com/openai/openai-go\"\n                  \"github.com/openai/openai-go/option\"\n                )\n\n                func main() {\n                  client := openai.NewClient(\n                    option.WithAPIKey(\"My API Key\"),\n                  )\n                  transcription, err := client.Audio.Transcriptions.New(context.TODO(), openai.AudioTranscriptionNewParams{\n                    File: io.Reader(bytes.NewBuffer([]byte(\"some file contents\"))),\n                    Model: openai.AudioModelWhisper1,\n                  })\n                  if err != nil {\n                    panic(err.Error())\n                  }\n                  fmt.Printf(\"%+v\\n\", transcription)\n                }\n              java: |-\n                package com.openai.example;\n\n                import com.openai.client.OpenAIClient;\n                import com.openai.client.okhttp.OpenAIOkHttpClient;\n                import com.openai.models.audio.AudioModel;\n                import com.openai.models.audio.transcriptions.TranscriptionCreateParams;\n                import com.openai.models.audio.transcriptions.TranscriptionCreateResponse;\n                import java.io.ByteArrayInputStream;\n\n                public final class Main {\n                    private Main() {}\n\n                    public static void main(String[] args) {\n                        OpenAIClient client = OpenAIOkHttpClient.fromEnv();\n\n                        TranscriptionCreateParams params = TranscriptionCreateParams.builder()\n                            .file(ByteArrayInputStream(\"some content\".getBytes()))\n                            .model(AudioModel.WHISPER_1)\n                            .build();\n                        TranscriptionCreateResponse transcription = client.audio().transcriptions().create(params);\n                    }\n                }\n              ruby: >-\n                require \"openai\"\n\n\n                openai = OpenAI::Client.new(api_key: \"My API Key\")\n\n\n                transcription = openai.audio.transcriptions.create(file: Pathname(__FILE__), model:\n                :\"whisper-1\")\n\n\n                puts(transcription)\n            response: |\n              {\n                \"text\": \"Hey, my knee is hurting and I want to see the doctor tomorrow ideally.\",\n                \"logprobs\": [\n                  { \"token\": \"Hey\", \"logprob\": -1.0415299, \"bytes\": [72, 101, 121] },\n                  { \"token\": \",\", \"logprob\": -9.805982e-5, \"bytes\": [44] },\n                  { \"token\": \" my\", \"logprob\": -0.00229799, \"bytes\": [32, 109, 121] },\n                  {\n                    \"token\": \" knee\",\n                    \"logprob\": -4.7159858e-5,\n                    \"bytes\": [32, 107, 110, 101, 101]\n                  },\n                  { \"token\": \" is\", \"logprob\": -0.043909557, \"bytes\": [32, 105, 115] },\n                  {\n                    \"token\": \" hurting\",\n                    \"logprob\": -1.1041146e-5,\n                    \"bytes\": [32, 104, 117, 114, 116, 105, 110, 103]\n                  },\n                  { \"token\": \" and\", \"logprob\": -0.011076359, \"bytes\": [32, 97, 110, 100] },\n                  { \"token\": \" I\", \"logprob\": -5.3193703e-6, \"bytes\": [32, 73] },\n                  {\n                    \"token\": \" want\",\n                    \"logprob\": -0.0017156356,\n                    \"bytes\": [32, 119, 97, 110, 116]\n                  },\n                  { \"token\": \" to\", \"logprob\": -7.89631e-7, \"bytes\": [32, 116, 111] },\n                  { \"token\": \" see\", \"logprob\": -5.5122365e-7, \"bytes\": [32, 115, 101, 101] },\n                  { \"token\": \" the\", \"logprob\": -0.0040786397, \"bytes\": [32, 116, 104, 101] },\n                  {\n                    \"token\": \" doctor\",\n                    \"logprob\": -2.3392786e-6,\n                    \"bytes\": [32, 100, 111, 99, 116, 111, 114]\n                  },\n                  {\n                    \"token\": \" tomorrow\",\n                    \"logprob\": -7.89631e-7,\n                    \"bytes\": [32, 116, 111, 109, 111, 114, 114, 111, 119]\n                  },\n                  {\n                    \"token\": \" ideally\",\n                    \"logprob\": -0.5800861,\n                    \"bytes\": [32, 105, 100, 101, 97, 108, 108, 121]\n                  },\n                  { \"token\": \".\", \"logprob\": -0.00011093382, \"bytes\": [46] }\n                ],\n                \"usage\": {\n                  \"type\": \"tokens\",\n                  \"input_tokens\": 14,\n                  \"input_token_details\": {\n                    \"text_tokens\": 0,\n                    \"audio_tokens\": 14\n                  },\n                  \"output_tokens\": 45,\n                  \"total_tokens\": 59\n                }\n              }\n          - title: Word timestamps\n            request:\n              curl: |\n                curl https://api.openai.com/v1/audio/transcriptions \\\n                  -H \"Authorization: Bearer $OPENAI_API_KEY\" \\\n                  -H \"Content-Type: multipart/form-data\" \\\n                  -F file=\"@/path/to/file/audio.mp3\" \\\n                  -F \"timestamp_granularities[]=word\" \\\n                  -F model=\"whisper-1\" \\\n                  -F response_format=\"verbose_json\"\n              python: |-\n                from openai import OpenAI\n\n                client = OpenAI(\n                    api_key=\"My API Key\",\n                )\n                transcription = client.audio.transcriptions.create(\n                    file=b\"raw file contents\",\n                    model=\"gpt-4o-transcribe\",\n                )\n                print(transcription)\n              javascript: |\n                import fs from \"fs\";\n                import OpenAI from \"openai\";\n\n                const openai = new OpenAI();\n\n                async function main() {\n                  const transcription = await openai.audio.transcriptions.create({\n                    file: fs.createReadStream(\"audio.mp3\"),\n                    model: \"whisper-1\",\n                    response_format: \"verbose_json\",\n                    timestamp_granularities: [\"word\"]\n                  });\n\n                  console.log(transcription.text);\n                }\n                main();\n              csharp: |\n                using System;\n\n                using OpenAI.Audio;\n\n                string audioFilePath = \"audio.mp3\";\n\n                AudioClient client = new(\n                    model: \"whisper-1\",\n                    apiKey: Environment.GetEnvironmentVariable(\"OPENAI_API_KEY\")\n                );\n\n                AudioTranscriptionOptions options = new()\n                {\n                    ResponseFormat = AudioTranscriptionFormat.Verbose,\n                    TimestampGranularities = AudioTimestampGranularities.Word,\n                };\n\n                AudioTranscription transcription = client.TranscribeAudio(audioFilePath, options);\n\n                Console.WriteLine($\"{transcription.Text}\");\n              node.js: |-\n                import OpenAI from 'openai';\n\n                const client = new OpenAI({\n                  apiKey: 'My API Key',\n                });\n\n                const transcription = await client.audio.transcriptions.create({\n                  file: fs.createReadStream('speech.mp3'),\n                  model: 'gpt-4o-transcribe',\n                });\n\n                console.log(transcription);\n              go: |\n                package main\n\n                import (\n                  \"bytes\"\n                  \"context\"\n                  \"fmt\"\n                  \"io\"\n\n                  \"github.com/openai/openai-go\"\n                  \"github.com/openai/openai-go/option\"\n                )\n\n                func main() {\n                  client := openai.NewClient(\n                    option.WithAPIKey(\"My API Key\"),\n                  )\n                  transcription, err := client.Audio.Transcriptions.New(context.TODO(), openai.AudioTranscriptionNewParams{\n                    File: io.Reader(bytes.NewBuffer([]byte(\"some file contents\"))),\n                    Model: openai.AudioModelWhisper1,\n                  })\n                  if err != nil {\n                    panic(err.Error())\n                  }\n                  fmt.Printf(\"%+v\\n\", transcription)\n                }\n              java: |-\n                package com.openai.example;\n\n                import com.openai.client.OpenAIClient;\n                import com.openai.client.okhttp.OpenAIOkHttpClient;\n                import com.openai.models.audio.AudioModel;\n                import com.openai.models.audio.transcriptions.TranscriptionCreateParams;\n                import com.openai.models.audio.transcriptions.TranscriptionCreateResponse;\n                import java.io.ByteArrayInputStream;\n\n                public final class Main {\n                    private Main() {}\n\n                    public static void main(String[] args) {\n                        OpenAIClient client = OpenAIOkHttpClient.fromEnv();\n\n                        TranscriptionCreateParams params = TranscriptionCreateParams.builder()\n                            .file(ByteArrayInputStream(\"some content\".getBytes()))\n                            .model(AudioModel.WHISPER_1)\n                            .build();\n                        TranscriptionCreateResponse transcription = client.audio().transcriptions().create(params);\n                    }\n                }\n              ruby: >-\n                require \"openai\"\n\n\n                openai = OpenAI::Client.new(api_key: \"My API Key\")\n\n\n                transcription = openai.audio.transcriptions.create(file: Pathname(__FILE__), model:\n                :\"whisper-1\")\n\n\n                puts(transcription)\n            response: |\n              {\n                \"task\": \"transcribe\",\n                \"language\": \"english\",\n                \"duration\": 8.470000267028809,\n                \"text\": \"The beach was a popular spot on a hot summer day. People were swimming in the ocean, building sandcastles, and playing beach volleyball.\",\n                \"words\": [\n                  {\n                    \"word\": \"The\",\n                    \"start\": 0.0,\n                    \"end\": 0.23999999463558197\n                  },\n                  ...\n                  {\n                    \"word\": \"volleyball\",\n                    \"start\": 7.400000095367432,\n                    \"end\": 7.900000095367432\n                  }\n                ],\n                \"usage\": {\n                  \"type\": \"duration\",\n                  \"seconds\": 9\n                }\n              }\n          - title: Segment timestamps\n            request:\n              curl: |\n                curl https://api.openai.com/v1/audio/transcriptions \\\n                  -H \"Authorization: Bearer $OPENAI_API_KEY\" \\\n                  -H \"Content-Type: multipart/form-data\" \\\n                  -F file=\"@/path/to/file/audio.mp3\" \\\n                  -F \"timestamp_granularities[]=segment\" \\\n                  -F model=\"whisper-1\" \\\n                  -F response_format=\"verbose_json\"\n              python: |-\n                from openai import OpenAI\n\n                client = OpenAI(\n                    api_key=\"My API Key\",\n                )\n                transcription = client.audio.transcriptions.create(\n                    file=b\"raw file contents\",\n                    model=\"gpt-4o-transcribe\",\n                )\n                print(transcription)\n              javascript: |\n                import fs from \"fs\";\n                import OpenAI from \"openai\";\n\n                const openai = new OpenAI();\n\n                async function main() {\n                  const transcription = await openai.audio.transcriptions.create({\n                    file: fs.createReadStream(\"audio.mp3\"),\n                    model: \"whisper-1\",\n                    response_format: \"verbose_json\",\n                    timestamp_granularities: [\"segment\"]\n                  });\n\n                  console.log(transcription.text);\n                }\n                main();\n              csharp: |\n                using System;\n\n                using OpenAI.Audio;\n\n                string audioFilePath = \"audio.mp3\";\n\n                AudioClient client = new(\n                    model: \"whisper-1\",\n                    apiKey: Environment.GetEnvironmentVariable(\"OPENAI_API_KEY\")\n                );\n\n                AudioTranscriptionOptions options = new()\n                {\n                    ResponseFormat = AudioTranscriptionFormat.Verbose,\n                    TimestampGranularities = AudioTimestampGranularities.Segment,\n                };\n\n                AudioTranscription transcription = client.TranscribeAudio(audioFilePath, options);\n\n                Console.WriteLine($\"{transcription.Text}\");\n              node.js: |-\n                import OpenAI from 'openai';\n\n                const client = new OpenAI({\n                  apiKey: 'My API Key',\n                });\n\n                const transcription = await client.audio.transcriptions.create({\n                  file: fs.createReadStream('speech.mp3'),\n                  model: 'gpt-4o-transcribe',\n                });\n\n                console.log(transcription);\n              go: |\n                package main\n\n                import (\n                  \"bytes\"\n                  \"context\"\n                  \"fmt\"\n                  \"io\"\n\n                  \"github.com/openai/openai-go\"\n                  \"github.com/openai/openai-go/option\"\n                )\n\n                func main() {\n                  client := openai.NewClient(\n                    option.WithAPIKey(\"My API Key\"),\n                  )\n                  transcription, err := client.Audio.Transcriptions.New(context.TODO(), openai.AudioTranscriptionNewParams{\n                    File: io.Reader(bytes.NewBuffer([]byte(\"some file contents\"))),\n                    Model: openai.AudioModelWhisper1,\n                  })\n                  if err != nil {\n                    panic(err.Error())\n                  }\n                  fmt.Printf(\"%+v\\n\", transcription)\n                }\n              java: |-\n                package com.openai.example;\n\n                import com.openai.client.OpenAIClient;\n                import com.openai.client.okhttp.OpenAIOkHttpClient;\n                import com.openai.models.audio.AudioModel;\n                import com.openai.models.audio.transcriptions.TranscriptionCreateParams;\n                import com.openai.models.audio.transcriptions.TranscriptionCreateResponse;\n                import java.io.ByteArrayInputStream;\n\n                public final class Main {\n                    private Main() {}\n\n                    public static void main(String[] args) {\n                        OpenAIClient client = OpenAIOkHttpClient.fromEnv();\n\n                        TranscriptionCreateParams params = TranscriptionCreateParams.builder()\n                            .file(ByteArrayInputStream(\"some content\".getBytes()))\n                            .model(AudioModel.WHISPER_1)\n                            .build();\n                        TranscriptionCreateResponse transcription = client.audio().transcriptions().create(params);\n                    }\n                }\n              ruby: >-\n                require \"openai\"\n\n\n                openai = OpenAI::Client.new(api_key: \"My API Key\")\n\n\n                transcription = openai.audio.transcriptions.create(file: Pathname(__FILE__), model:\n                :\"whisper-1\")\n\n\n                puts(transcription)\n            response: |\n              {\n                \"task\": \"transcribe\",\n                \"language\": \"english\",\n                \"duration\": 8.470000267028809,\n                \"text\": \"The beach was a popular spot on a hot summer day. People were swimming in the ocean, building sandcastles, and playing beach volleyball.\",\n                \"segments\": [\n                  {\n                    \"id\": 0,\n                    \"seek\": 0,\n                    \"start\": 0.0,\n                    \"end\": 3.319999933242798,\n                    \"text\": \" The beach was a popular spot on a hot summer day.\",\n                    \"tokens\": [\n                      50364, 440, 7534, 390, 257, 3743, 4008, 322, 257, 2368, 4266, 786, 13, 50530\n                    ],\n                    \"temperature\": 0.0,\n                    \"avg_logprob\": -0.2860786020755768,\n                    \"compression_ratio\": 1.2363636493682861,\n                    \"no_speech_prob\": 0.00985979475080967\n                  },\n                  ...\n                ],\n                \"usage\": {\n                  \"type\": \"duration\",\n                  \"seconds\": 9\n                }\n              }\n      description: Transcribes audio into the input language.\n  /audio/translations:\n    post:\n      operationId: createTranslation\n      tags:\n        - Audio\n      summary: Create translation\n      requestBody:\n        required: true\n        content:\n          multipart/form-data:\n            schema:\n              $ref: '#/components/schemas/CreateTranslationRequest'\n      responses:\n        '200':\n          description: OK\n          content:\n            application/json:\n              schema:\n                anyOf:\n                  - $ref: '#/components/schemas/CreateTranslationResponseJson'\n                  - $ref: '#/components/schemas/CreateTranslationResponseVerboseJson'\n                    x-stainless-skip:\n                      - go\n      x-oaiMeta:\n        name: Create translation\n        group: audio\n        returns: The translated text.\n        examples:\n          response: |\n            {\n              \"text\": \"Hello, my name is Wolfgang and I come from Germany. Where are you heading today?\"\n            }\n          request:\n            curl: |\n              curl https://api.openai.com/v1/audio/translations \\\n                -H \"Authorization: Bearer $OPENAI_API_KEY\" \\\n                -H \"Content-Type: multipart/form-data\" \\\n                -F file=\"@/path/to/file/german.m4a\" \\\n                -F model=\"whisper-1\"\n            python: |-\n              from openai import OpenAI\n\n              client = OpenAI(\n                  api_key=\"My API Key\",\n              )\n              translation = client.audio.translations.create(\n                  file=b\"raw file contents\",\n                  model=\"whisper-1\",\n              )\n              print(translation)\n            javascript: |\n              import fs from \"fs\";\n              import OpenAI from \"openai\";\n\n              const openai = new OpenAI();\n\n              async function main() {\n                  const translation = await openai.audio.translations.create({\n                      file: fs.createReadStream(\"speech.mp3\"),\n                      model: \"whisper-1\",\n                  });\n\n                  console.log(translation.text);\n              }\n              main();\n            csharp: |\n              using System;\n\n              using OpenAI.Audio;\n\n              string audioFilePath = \"audio.mp3\";\n\n              AudioClient client = new(\n                  model: \"whisper-1\",\n                  apiKey: Environment.GetEnvironmentVariable(\"OPENAI_API_KEY\")\n              );\n\n              AudioTranscription transcription = client.TranscribeAudio(audioFilePath);\n\n              Console.WriteLine($\"{transcription.Text}\");\n            node.js: |-\n              import OpenAI from 'openai';\n\n              const client = new OpenAI({\n                apiKey: 'My API Key',\n              });\n\n              const translation = await client.audio.translations.create({\n                file: fs.createReadStream('speech.mp3'),\n                model: 'whisper-1',\n              });\n\n              console.log(translation);\n            go: |\n              package main\n\n              import (\n                \"bytes\"\n                \"context\"\n                \"fmt\"\n                \"io\"\n\n                \"github.com/openai/openai-go\"\n                \"github.com/openai/openai-go/option\"\n              )\n\n              func main() {\n                client := openai.NewClient(\n                  option.WithAPIKey(\"My API Key\"),\n                )\n                translation, err := client.Audio.Translations.New(context.TODO(), openai.AudioTranslationNewParams{\n                  File: io.Reader(bytes.NewBuffer([]byte(\"some file contents\"))),\n                  Model: openai.AudioModelWhisper1,\n                })\n                if err != nil {\n                  panic(err.Error())\n                }\n                fmt.Printf(\"%+v\\n\", translation)\n              }\n            java: |-\n              package com.openai.example;\n\n              import com.openai.client.OpenAIClient;\n              import com.openai.client.okhttp.OpenAIOkHttpClient;\n              import com.openai.models.audio.AudioModel;\n              import com.openai.models.audio.translations.TranslationCreateParams;\n              import com.openai.models.audio.translations.TranslationCreateResponse;\n              import java.io.ByteArrayInputStream;\n\n              public final class Main {\n                  private Main() {}\n\n                  public static void main(String[] args) {\n                      OpenAIClient client = OpenAIOkHttpClient.fromEnv();\n\n                      TranslationCreateParams params = TranslationCreateParams.builder()\n                          .file(ByteArrayInputStream(\"some content\".getBytes()))\n                          .model(AudioModel.WHISPER_1)\n                          .build();\n                      TranslationCreateResponse translation = client.audio().translations().create(params);\n                  }\n              }\n            ruby: |-\n              require \"openai\"\n\n              openai = OpenAI::Client.new(api_key: \"My API Key\")\n\n              translation = openai.audio.translations.create(file: Pathname(__FILE__), model: :\"whisper-1\")\n\n              puts(translation)\n      description: Translates audio into English.\n  /batches:\n    post:\n      summary: Create batch\n      operationId: createBatch\n      tags:\n        - Batch\n      requestBody:\n        required: true\n        content:\n          application/json:\n            schema:\n              type: object\n              required:\n                - input_file_id\n                - endpoint\n                - completion_window\n              properties:\n                input_file_id:\n                  type: string\n                  description: >\n                    The ID of an uploaded file that contains requests for the new batch.\n\n\n                    See [upload file](https://platform.openai.com/docs/api-reference/files/create) for how to\n                    upload a file.\n\n\n                    Your input file must be formatted as a [JSONL\n                    file](https://platform.openai.com/docs/api-reference/batch/request-input), and must be\n                    uploaded with the purpose `batch`. The file can contain up to 50,000 requests, and can be\n                    up to 200 MB in size.\n                endpoint:\n                  type: string\n                  enum:\n                    - /v1/responses\n                    - /v1/chat/completions\n                    - /v1/embeddings\n                    - /v1/completions\n                  description: >-\n                    The endpoint to be used for all requests in the batch. Currently `/v1/responses`,\n                    `/v1/chat/completions`, `/v1/embeddings`, and `/v1/completions` are supported. Note that\n                    `/v1/embeddings` batches are also restricted to a maximum of 50,000 embedding inputs\n                    across all requests in the batch.\n                completion_window:\n                  type: string\n                  enum:\n                    - 24h\n                  description: >-\n                    The time frame within which the batch should be processed. Currently only `24h` is\n                    supported.\n                metadata:\n                  $ref: '#/components/schemas/Metadata'\n                output_expires_after:\n                  $ref: '#/components/schemas/BatchFileExpirationAfter'\n      responses:\n        '200':\n          description: Batch created successfully.\n          content:\n            application/json:\n              schema:\n                $ref: '#/components/schemas/Batch'\n      x-oaiMeta:\n        name: Create batch\n        group: batch\n        returns: The created [Batch](https://platform.openai.com/docs/api-reference/batch/object) object.\n        examples:\n          response: |\n            {\n              \"id\": \"batch_abc123\",\n              \"object\": \"batch\",\n              \"endpoint\": \"/v1/chat/completions\",\n              \"errors\": null,\n              \"input_file_id\": \"file-abc123\",\n              \"completion_window\": \"24h\",\n              \"status\": \"validating\",\n              \"output_file_id\": null,\n              \"error_file_id\": null,\n              \"created_at\": 1711471533,\n              \"in_progress_at\": null,\n              \"expires_at\": null,\n              \"finalizing_at\": null,\n              \"completed_at\": null,\n              \"failed_at\": null,\n              \"expired_at\": null,\n              \"cancelling_at\": null,\n              \"cancelled_at\": null,\n              \"request_counts\": {\n                \"total\": 0,\n                \"completed\": 0,\n                \"failed\": 0\n              },\n              \"metadata\": {\n                \"customer_id\": \"user_123456789\",\n                \"batch_description\": \"Nightly eval job\",\n              }\n            }\n          request:\n            curl: |\n              curl https://api.openai.com/v1/batches \\\n                -H \"Authorization: Bearer $OPENAI_API_KEY\" \\\n                -H \"Content-Type: application/json\" \\\n                -d '{\n                  \"input_file_id\": \"file-abc123\",\n                  \"endpoint\": \"/v1/chat/completions\",\n                  \"completion_window\": \"24h\"\n                }'\n            python: |-\n              from openai import OpenAI\n\n              client = OpenAI(\n                  api_key=\"My API Key\",\n              )\n              batch = client.batches.create(\n                  completion_window=\"24h\",\n                  endpoint=\"/v1/responses\",\n                  input_file_id=\"input_file_id\",\n              )\n              print(batch.id)\n            node: |\n              import OpenAI from \"openai\";\n\n              const openai = new OpenAI();\n\n              async function main() {\n                const batch = await openai.batches.create({\n                  input_file_id: \"file-abc123\",\n                  endpoint: \"/v1/chat/completions\",\n                  completion_window: \"24h\"\n                });\n\n                console.log(batch);\n              }\n\n              main();\n            node.js: |-\n              import OpenAI from 'openai';\n\n              const client = new OpenAI({\n                apiKey: 'My API Key',\n              });\n\n              const batch = await client.batches.create({\n                completion_window: '24h',\n                endpoint: '/v1/responses',\n                input_file_id: 'input_file_id',\n              });\n\n              console.log(batch.id);\n            go: |\n              package main\n\n              import (\n                \"context\"\n                \"fmt\"\n\n                \"github.com/openai/openai-go\"\n                \"github.com/openai/openai-go/option\"\n              )\n\n              func main() {\n                client := openai.NewClient(\n                  option.WithAPIKey(\"My API Key\"),\n                )\n                batch, err := client.Batches.New(context.TODO(), openai.BatchNewParams{\n                  CompletionWindow: openai.BatchNewParamsCompletionWindow24h,\n                  Endpoint: openai.BatchNewParamsEndpointV1Responses,\n                  InputFileID: \"input_file_id\",\n                })\n                if err != nil {\n                  panic(err.Error())\n                }\n                fmt.Printf(\"%+v\\n\", batch.ID)\n              }\n            java: |-\n              package com.openai.example;\n\n              import com.openai.client.OpenAIClient;\n              import com.openai.client.okhttp.OpenAIOkHttpClient;\n              import com.openai.models.batches.Batch;\n              import com.openai.models.batches.BatchCreateParams;\n\n              public final class Main {\n                  private Main() {}\n\n                  public static void main(String[] args) {\n                      OpenAIClient client = OpenAIOkHttpClient.fromEnv();\n\n                      BatchCreateParams params = BatchCreateParams.builder()\n                          .completionWindow(BatchCreateParams.CompletionWindow._24H)\n                          .endpoint(BatchCreateParams.Endpoint.V1_RESPONSES)\n                          .inputFileId(\"input_file_id\")\n                          .build();\n                      Batch batch = client.batches().create(params);\n                  }\n              }\n            ruby: |-\n              require \"openai\"\n\n              openai = OpenAI::Client.new(api_key: \"My API Key\")\n\n              batch = openai.batches.create(\n                completion_window: :\"24h\",\n                endpoint: :\"/v1/responses\",\n                input_file_id: \"input_file_id\"\n              )\n\n              puts(batch)\n      description: Creates and executes a batch from an uploaded file of requests\n    get:\n      operationId: listBatches\n      tags:\n        - Batch\n      summary: List batch\n      parameters:\n        - in: query\n          name: after\n          required: false\n          schema:\n            type: string\n          description: >\n            A cursor for use in pagination. `after` is an object ID that defines your place in the list. For\n            instance, if you make a list request and receive 100 objects, ending with obj_foo, your subsequent\n            call can include after=obj_foo in order to fetch the next page of the list.\n        - name: limit\n          in: query\n          description: >\n            A limit on the number of objects to be returned. Limit can range between 1 and 100, and the\n            default is 20.\n          required: false\n          schema:\n            type: integer\n            default: 20\n      responses:\n        '200':\n          description: Batch listed successfully.\n          content:\n            application/json:\n              schema:\n                $ref: '#/components/schemas/ListBatchesResponse'\n      x-oaiMeta:\n        name: List batch\n        group: batch\n        returns: A list of paginated [Batch](https://platform.openai.com/docs/api-reference/batch/object) objects.\n        examples:\n          response: |\n            {\n              \"object\": \"list\",\n              \"data\": [\n                {\n                  \"id\": \"batch_abc123\",\n                  \"object\": \"batch\",\n                  \"endpoint\": \"/v1/chat/completions\",\n                  \"errors\": null,\n                  \"input_file_id\": \"file-abc123\",\n                  \"completion_window\": \"24h\",\n                  \"status\": \"completed\",\n                  \"output_file_id\": \"file-cvaTdG\",\n                  \"error_file_id\": \"file-HOWS94\",\n                  \"created_at\": 1711471533,\n                  \"in_progress_at\": 1711471538,\n                  \"expires_at\": 1711557933,\n                  \"finalizing_at\": 1711493133,\n                  \"completed_at\": 1711493163,\n                  \"failed_at\": null,\n                  \"expired_at\": null,\n                  \"cancelling_at\": null,\n                  \"cancelled_at\": null,\n                  \"request_counts\": {\n                    \"total\": 100,\n                    \"completed\": 95,\n                    \"failed\": 5\n                  },\n                  \"metadata\": {\n                    \"customer_id\": \"user_123456789\",\n                    \"batch_description\": \"Nightly job\",\n                  }\n                },\n                { ... },\n              ],\n              \"first_id\": \"batch_abc123\",\n              \"last_id\": \"batch_abc456\",\n              \"has_more\": true\n            }\n          request:\n            curl: |\n              curl https://api.openai.com/v1/batches?limit=2 \\\n                -H \"Authorization: Bearer $OPENAI_API_KEY\" \\\n                -H \"Content-Type: application/json\"\n            python: |-\n              from openai import OpenAI\n\n              client = OpenAI(\n                  api_key=\"My API Key\",\n              )\n              page = client.batches.list()\n              page = page.data[0]\n              print(page.id)\n            node: |\n              import OpenAI from \"openai\";\n\n              const openai = new OpenAI();\n\n              async function main() {\n                const list = await openai.batches.list();\n\n                for await (const batch of list) {\n                  console.log(batch);\n                }\n              }\n\n              main();\n            node.js: |-\n              import OpenAI from 'openai';\n\n              const client = new OpenAI({\n                apiKey: 'My API Key',\n              });\n\n              // Automatically fetches more pages as needed.\n              for await (const batch of client.batches.list()) {\n                console.log(batch.id);\n              }\n            go: |\n              package main\n\n              import (\n                \"context\"\n                \"fmt\"\n\n                \"github.com/openai/openai-go\"\n                \"github.com/openai/openai-go/option\"\n              )\n\n              func main() {\n                client := openai.NewClient(\n                  option.WithAPIKey(\"My API Key\"),\n                )\n                page, err := client.Batches.List(context.TODO(), openai.BatchListParams{\n\n                })\n                if err != nil {\n                  panic(err.Error())\n                }\n                fmt.Printf(\"%+v\\n\", page)\n              }\n            java: |-\n              package com.openai.example;\n\n              import com.openai.client.OpenAIClient;\n              import com.openai.client.okhttp.OpenAIOkHttpClient;\n              import com.openai.models.batches.BatchListPage;\n              import com.openai.models.batches.BatchListParams;\n\n              public final class Main {\n                  private Main() {}\n\n                  public static void main(String[] args) {\n                      OpenAIClient client = OpenAIOkHttpClient.fromEnv();\n\n                      BatchListPage page = client.batches().list();\n                  }\n              }\n            ruby: |-\n              require \"openai\"\n\n              openai = OpenAI::Client.new(api_key: \"My API Key\")\n\n              page = openai.batches.list\n\n              puts(page)\n      description: List your organization's batches.\n  /batches/{batch_id}:\n    get:\n      operationId: retrieveBatch\n      tags:\n        - Batch\n      summary: Retrieve batch\n      parameters:\n        - in: path\n          name: batch_id\n          required: true\n          schema:\n            type: string\n          description: The ID of the batch to retrieve.\n      responses:\n        '200':\n          description: Batch retrieved successfully.\n          content:\n            application/json:\n              schema:\n                $ref: '#/components/schemas/Batch'\n      x-oaiMeta:\n        name: Retrieve batch\n        group: batch\n        returns: >-\n          The [Batch](https://platform.openai.com/docs/api-reference/batch/object) object matching the\n          specified ID.\n        examples:\n          response: |\n            {\n              \"id\": \"batch_abc123\",\n              \"object\": \"batch\",\n              \"endpoint\": \"/v1/completions\",\n              \"errors\": null,\n              \"input_file_id\": \"file-abc123\",\n              \"completion_window\": \"24h\",\n              \"status\": \"completed\",\n              \"output_file_id\": \"file-cvaTdG\",\n              \"error_file_id\": \"file-HOWS94\",\n              \"created_at\": 1711471533,\n              \"in_progress_at\": 1711471538,\n              \"expires_at\": 1711557933,\n              \"finalizing_at\": 1711493133,\n              \"completed_at\": 1711493163,\n              \"failed_at\": null,\n              \"expired_at\": null,\n              \"cancelling_at\": null,\n              \"cancelled_at\": null,\n              \"request_counts\": {\n                \"total\": 100,\n                \"completed\": 95,\n                \"failed\": 5\n              },\n              \"metadata\": {\n                \"customer_id\": \"user_123456789\",\n                \"batch_description\": \"Nightly eval job\",\n              }\n            }\n          request:\n            curl: |\n              curl https://api.openai.com/v1/batches/batch_abc123 \\\n                -H \"Authorization: Bearer $OPENAI_API_KEY\" \\\n                -H \"Content-Type: application/json\" \\\n            python: |-\n              from openai import OpenAI\n\n              client = OpenAI(\n                  api_key=\"My API Key\",\n              )\n              batch = client.batches.retrieve(\n                  \"batch_id\",\n              )\n              print(batch.id)\n            node: |\n              import OpenAI from \"openai\";\n\n              const openai = new OpenAI();\n\n              async function main() {\n                const batch = await openai.batches.retrieve(\"batch_abc123\");\n\n                console.log(batch);\n              }\n\n              main();\n            node.js: |-\n              import OpenAI from 'openai';\n\n              const client = new OpenAI({\n                apiKey: 'My API Key',\n              });\n\n              const batch = await client.batches.retrieve('batch_id');\n\n              console.log(batch.id);\n            go: |\n              package main\n\n              import (\n                \"context\"\n                \"fmt\"\n\n                \"github.com/openai/openai-go\"\n                \"github.com/openai/openai-go/option\"\n              )\n\n              func main() {\n                client := openai.NewClient(\n                  option.WithAPIKey(\"My API Key\"),\n                )\n                batch, err := client.Batches.Get(context.TODO(), \"batch_id\")\n                if err != nil {\n                  panic(err.Error())\n                }\n                fmt.Printf(\"%+v\\n\", batch.ID)\n              }\n            java: |-\n              package com.openai.example;\n\n              import com.openai.client.OpenAIClient;\n              import com.openai.client.okhttp.OpenAIOkHttpClient;\n              import com.openai.models.batches.Batch;\n              import com.openai.models.batches.BatchRetrieveParams;\n\n              public final class Main {\n                  private Main() {}\n\n                  public static void main(String[] args) {\n                      OpenAIClient client = OpenAIOkHttpClient.fromEnv();\n\n                      Batch batch = client.batches().retrieve(\"batch_id\");\n                  }\n              }\n            ruby: |-\n              require \"openai\"\n\n              openai = OpenAI::Client.new(api_key: \"My API Key\")\n\n              batch = openai.batches.retrieve(\"batch_id\")\n\n              puts(batch)\n      description: Retrieves a batch.\n  /batches/{batch_id}/cancel:\n    post:\n      operationId: cancelBatch\n      tags:\n        - Batch\n      summary: Cancel batch\n      parameters:\n        - in: path\n          name: batch_id\n          required: true\n          schema:\n            type: string\n          description: The ID of the batch to cancel.\n      responses:\n        '200':\n          description: Batch is cancelling. Returns the cancelling batch's details.\n          content:\n            application/json:\n              schema:\n                $ref: '#/components/schemas/Batch'\n      x-oaiMeta:\n        name: Cancel batch\n        group: batch\n        returns: >-\n          The [Batch](https://platform.openai.com/docs/api-reference/batch/object) object matching the\n          specified ID.\n        examples:\n          response: |\n            {\n              \"id\": \"batch_abc123\",\n              \"object\": \"batch\",\n              \"endpoint\": \"/v1/chat/completions\",\n              \"errors\": null,\n              \"input_file_id\": \"file-abc123\",\n              \"completion_window\": \"24h\",\n              \"status\": \"cancelling\",\n              \"output_file_id\": null,\n              \"error_file_id\": null,\n              \"created_at\": 1711471533,\n              \"in_progress_at\": 1711471538,\n              \"expires_at\": 1711557933,\n              \"finalizing_at\": null,\n              \"completed_at\": null,\n              \"failed_at\": null,\n              \"expired_at\": null,\n              \"cancelling_at\": 1711475133,\n              \"cancelled_at\": null,\n              \"request_counts\": {\n                \"total\": 100,\n                \"completed\": 23,\n                \"failed\": 1\n              },\n              \"metadata\": {\n                \"customer_id\": \"user_123456789\",\n                \"batch_description\": \"Nightly eval job\",\n              }\n            }\n          request:\n            curl: |\n              curl https://api.openai.com/v1/batches/batch_abc123/cancel \\\n                -H \"Authorization: Bearer $OPENAI_API_KEY\" \\\n                -H \"Content-Type: application/json\" \\\n                -X POST\n            python: |-\n              from openai import OpenAI\n\n              client = OpenAI(\n                  api_key=\"My API Key\",\n              )\n              batch = client.batches.cancel(\n                  \"batch_id\",\n              )\n              print(batch.id)\n            node: |\n              import OpenAI from \"openai\";\n\n              const openai = new OpenAI();\n\n              async function main() {\n                const batch = await openai.batches.cancel(\"batch_abc123\");\n\n                console.log(batch);\n              }\n\n              main();\n            node.js: |-\n              import OpenAI from 'openai';\n\n              const client = new OpenAI({\n                apiKey: 'My API Key',\n              });\n\n              const batch = await client.batches.cancel('batch_id');\n\n              console.log(batch.id);\n            go: |\n              package main\n\n              import (\n                \"context\"\n                \"fmt\"\n\n                \"github.com/openai/openai-go\"\n                \"github.com/openai/openai-go/option\"\n              )\n\n              func main() {\n                client := openai.NewClient(\n                  option.WithAPIKey(\"My API Key\"),\n                )\n                batch, err := client.Batches.Cancel(context.TODO(), \"batch_id\")\n                if err != nil {\n                  panic(err.Error())\n                }\n                fmt.Printf(\"%+v\\n\", batch.ID)\n              }\n            java: |-\n              package com.openai.example;\n\n              import com.openai.client.OpenAIClient;\n              import com.openai.client.okhttp.OpenAIOkHttpClient;\n              import com.openai.models.batches.Batch;\n              import com.openai.models.batches.BatchCancelParams;\n\n              public final class Main {\n                  private Main() {}\n\n                  public static void main(String[] args) {\n                      OpenAIClient client = OpenAIOkHttpClient.fromEnv();\n\n                      Batch batch = client.batches().cancel(\"batch_id\");\n                  }\n              }\n            ruby: |-\n              require \"openai\"\n\n              openai = OpenAI::Client.new(api_key: \"My API Key\")\n\n              batch = openai.batches.cancel(\"batch_id\")\n\n              puts(batch)\n      description: >-\n        Cancels an in-progress batch. The batch will be in status `cancelling` for up to 10 minutes, before\n        changing to `cancelled`, where it will have partial results (if any) available in the output file.\n  /chat/completions:\n    get:\n      operationId: listChatCompletions\n      tags:\n        - Chat\n      summary: List Chat Completions\n      parameters:\n        - name: model\n          in: query\n          description: The model used to generate the Chat Completions.\n          required: false\n          schema:\n            type: string\n        - name: metadata\n          in: query\n          description: |\n            A list of metadata keys to filter the Chat Completions by. Example:\n\n            `metadata[key1]=value1&metadata[key2]=value2`\n          required: false\n          schema:\n            $ref: '#/components/schemas/Metadata'\n        - name: after\n          in: query\n          description: Identifier for the last chat completion from the previous pagination request.\n          required: false\n          schema:\n            type: string\n        - name: limit\n          in: query\n          description: Number of Chat Completions to retrieve.\n          required: false\n          schema:\n            type: integer\n            default: 20\n        - name: order\n          in: query\n          description: >-\n            Sort order for Chat Completions by timestamp. Use `asc` for ascending order or `desc` for\n            descending order. Defaults to `asc`.\n          required: false\n          schema:\n            type: string\n            enum:\n              - asc\n              - desc\n            default: asc\n      responses:\n        '200':\n          description: A list of Chat Completions\n          content:\n            application/json:\n              schema:\n                $ref: '#/components/schemas/ChatCompletionList'\n      x-oaiMeta:\n        name: List Chat Completions\n        group: chat\n        returns: >-\n          A list of [Chat Completions](https://platform.openai.com/docs/api-reference/chat/list-object)\n          matching the specified filters.\n        path: list\n        examples:\n          response: |\n            {\n              \"object\": \"list\",\n              \"data\": [\n                {\n                  \"object\": \"chat.completion\",\n                  \"id\": \"chatcmpl-AyPNinnUqUDYo9SAdA52NobMflmj2\",\n                  \"model\": \"gpt-4.1-2025-04-14\",\n                  \"created\": 1738960610,\n                  \"request_id\": \"req_ded8ab984ec4bf840f37566c1011c417\",\n                  \"tool_choice\": null,\n                  \"usage\": {\n                    \"total_tokens\": 31,\n                    \"completion_tokens\": 18,\n                    \"prompt_tokens\": 13\n                  },\n                  \"seed\": 4944116822809979520,\n                  \"top_p\": 1.0,\n                  \"temperature\": 1.0,\n                  \"presence_penalty\": 0.0,\n                  \"frequency_penalty\": 0.0,\n                  \"system_fingerprint\": \"fp_50cad350e4\",\n                  \"input_user\": null,\n                  \"service_tier\": \"default\",\n                  \"tools\": null,\n                  \"metadata\": {},\n                  \"choices\": [\n                    {\n                      \"index\": 0,\n                      \"message\": {\n                        \"content\": \"Mind of circuits hum,  \\nLearning patterns in silence—  \\nFuture's quiet spark.\",\n                        \"role\": \"assistant\",\n                        \"tool_calls\": null,\n                        \"function_call\": null\n                      },\n                      \"finish_reason\": \"stop\",\n                      \"logprobs\": null\n                    }\n                  ],\n                  \"response_format\": null\n                }\n              ],\n              \"first_id\": \"chatcmpl-AyPNinnUqUDYo9SAdA52NobMflmj2\",\n              \"last_id\": \"chatcmpl-AyPNinnUqUDYo9SAdA52NobMflmj2\",\n              \"has_more\": false\n            }\n          request:\n            curl: |\n              curl https://api.openai.com/v1/chat/completions \\\n                -H \"Authorization: Bearer $OPENAI_API_KEY\" \\\n                -H \"Content-Type: application/json\"\n            python: |-\n              from openai import OpenAI\n\n              client = OpenAI(\n                  api_key=\"My API Key\",\n              )\n              page = client.chat.completions.list()\n              page = page.data[0]\n              print(page.id)\n            node.js: |-\n              import OpenAI from 'openai';\n\n              const client = new OpenAI({\n                apiKey: 'My API Key',\n              });\n\n              // Automatically fetches more pages as needed.\n              for await (const chatCompletion of client.chat.completions.list()) {\n                console.log(chatCompletion.id);\n              }\n            go: |\n              package main\n\n              import (\n                \"context\"\n                \"fmt\"\n\n                \"github.com/openai/openai-go\"\n                \"github.com/openai/openai-go/option\"\n              )\n\n              func main() {\n                client := openai.NewClient(\n                  option.WithAPIKey(\"My API Key\"),\n                )\n                page, err := client.Chat.Completions.List(context.TODO(), openai.ChatCompletionListParams{\n\n                })\n                if err != nil {\n                  panic(err.Error())\n                }\n                fmt.Printf(\"%+v\\n\", page)\n              }\n            java: |-\n              package com.openai.example;\n\n              import com.openai.client.OpenAIClient;\n              import com.openai.client.okhttp.OpenAIOkHttpClient;\n              import com.openai.models.chat.completions.ChatCompletionListPage;\n              import com.openai.models.chat.completions.ChatCompletionListParams;\n\n              public final class Main {\n                  private Main() {}\n\n                  public static void main(String[] args) {\n                      OpenAIClient client = OpenAIOkHttpClient.fromEnv();\n\n                      ChatCompletionListPage page = client.chat().completions().list();\n                  }\n              }\n            ruby: |-\n              require \"openai\"\n\n              openai = OpenAI::Client.new(api_key: \"My API Key\")\n\n              page = openai.chat.completions.list\n\n              puts(page)\n      description: |\n        List stored Chat Completions. Only Chat Completions that have been stored\n        with the `store` parameter set to `true` will be returned.\n    post:\n      operationId: createChatCompletion\n      tags:\n        - Chat\n      summary: Create chat completion\n      requestBody:\n        required: true\n        content:\n          application/json:\n            schema:\n              $ref: '#/components/schemas/CreateChatCompletionRequest'\n      responses:\n        '200':\n          description: OK\n          content:\n            application/json:\n              schema:\n                $ref: '#/components/schemas/CreateChatCompletionResponse'\n            text/event-stream:\n              schema:\n                $ref: '#/components/schemas/CreateChatCompletionStreamResponse'\n      x-oaiMeta:\n        name: Create chat completion\n        group: chat\n        returns: >\n          Returns a [chat completion](https://platform.openai.com/docs/api-reference/chat/object) object, or a\n          streamed sequence of [chat completion\n          chunk](https://platform.openai.com/docs/api-reference/chat/streaming) objects if the request is\n          streamed.\n        path: create\n        examples:\n          - title: Default\n            request:\n              curl: |\n                curl https://api.openai.com/v1/chat/completions \\\n                  -H \"Content-Type: application/json\" \\\n                  -H \"Authorization: Bearer $OPENAI_API_KEY\" \\\n                  -d '{\n                    \"model\": \"VAR_chat_model_id\",\n                    \"messages\": [\n                      {\n                        \"role\": \"developer\",\n                        \"content\": \"You are a helpful assistant.\"\n                      },\n                      {\n                        \"role\": \"user\",\n                        \"content\": \"Hello!\"\n                      }\n                    ]\n                  }'\n              python: |-\n                from openai import OpenAI\n\n                client = OpenAI(\n                    api_key=\"My API Key\",\n                )\n                chat_completion = client.chat.completions.create(\n                    messages=[{\n                        \"content\": \"string\",\n                        \"role\": \"developer\",\n                    }],\n                    model=\"gpt-4o\",\n                )\n                print(chat_completion)\n              node.js: |-\n                import OpenAI from 'openai';\n\n                const client = new OpenAI({\n                  apiKey: 'My API Key',\n                });\n\n                const chatCompletion = await client.chat.completions.create({\n                  messages: [{ content: 'string', role: 'developer' }],\n                  model: 'gpt-4o',\n                });\n\n                console.log(chatCompletion);\n              csharp: |\n                using System;\n                using System.Collections.Generic;\n\n                using OpenAI.Chat;\n\n                ChatClient client = new(\n                    model: \"gpt-4.1\",\n                    apiKey: Environment.GetEnvironmentVariable(\"OPENAI_API_KEY\")\n                );\n\n                List<ChatMessage> messages =\n                [\n                    new SystemChatMessage(\"You are a helpful assistant.\"),\n                    new UserChatMessage(\"Hello!\")\n                ];\n\n                ChatCompletion completion = client.CompleteChat(messages);\n\n                Console.WriteLine(completion.Content[0].Text);\n              go: |\n                package main\n\n                import (\n                  \"context\"\n                  \"fmt\"\n\n                  \"github.com/openai/openai-go\"\n                  \"github.com/openai/openai-go/option\"\n                  \"github.com/openai/openai-go/shared\"\n                )\n\n                func main() {\n                  client := openai.NewClient(\n                    option.WithAPIKey(\"My API Key\"),\n                  )\n                  chatCompletion, err := client.Chat.Completions.New(context.TODO(), openai.ChatCompletionNewParams{\n                    Messages: []openai.ChatCompletionMessageParamUnion{openai.ChatCompletionMessageParamUnion{\n                      OfDeveloper: &openai.ChatCompletionDeveloperMessageParam{\n                        Content: openai.ChatCompletionDeveloperMessageParamContentUnion{\n                          OfString: openai.String(\"string\"),\n                        },\n                      },\n                    }},\n                    Model: shared.ChatModelGPT5,\n                  })\n                  if err != nil {\n                    panic(err.Error())\n                  }\n                  fmt.Printf(\"%+v\\n\", chatCompletion)\n                }\n              java: |-\n                package com.openai.example;\n\n                import com.openai.client.OpenAIClient;\n                import com.openai.client.okhttp.OpenAIOkHttpClient;\n                import com.openai.models.ChatModel;\n                import com.openai.models.chat.completions.ChatCompletion;\n                import com.openai.models.chat.completions.ChatCompletionCreateParams;\n\n                public final class Main {\n                    private Main() {}\n\n                    public static void main(String[] args) {\n                        OpenAIClient client = OpenAIOkHttpClient.fromEnv();\n\n                        ChatCompletionCreateParams params = ChatCompletionCreateParams.builder()\n                            .addDeveloperMessage(\"string\")\n                            .model(ChatModel.GPT_5)\n                            .build();\n                        ChatCompletion chatCompletion = client.chat().completions().create(params);\n                    }\n                }\n              ruby: >-\n                require \"openai\"\n\n\n                openai = OpenAI::Client.new(api_key: \"My API Key\")\n\n\n                chat_completion = openai.chat.completions.create(messages: [{content: \"string\", role:\n                :developer}], model: :\"gpt-5\")\n\n\n                puts(chat_completion)\n            response: |\n              {\n                \"id\": \"chatcmpl-B9MBs8CjcvOU2jLn4n570S5qMJKcT\",\n                \"object\": \"chat.completion\",\n                \"created\": 1741569952,\n                \"model\": \"gpt-4.1-2025-04-14\",\n                \"choices\": [\n                  {\n                    \"index\": 0,\n                    \"message\": {\n                      \"role\": \"assistant\",\n                      \"content\": \"Hello! How can I assist you today?\",\n                      \"refusal\": null,\n                      \"annotations\": []\n                    },\n                    \"logprobs\": null,\n                    \"finish_reason\": \"stop\"\n                  }\n                ],\n                \"usage\": {\n                  \"prompt_tokens\": 19,\n                  \"completion_tokens\": 10,\n                  \"total_tokens\": 29,\n                  \"prompt_tokens_details\": {\n                    \"cached_tokens\": 0,\n                    \"audio_tokens\": 0\n                  },\n                  \"completion_tokens_details\": {\n                    \"reasoning_tokens\": 0,\n                    \"audio_tokens\": 0,\n                    \"accepted_prediction_tokens\": 0,\n                    \"rejected_prediction_tokens\": 0\n                  }\n                },\n                \"service_tier\": \"default\"\n              }\n          - title: Image input\n            request:\n              curl: |\n                curl https://api.openai.com/v1/chat/completions \\\n                  -H \"Content-Type: application/json\" \\\n                  -H \"Authorization: Bearer $OPENAI_API_KEY\" \\\n                  -d '{\n                    \"model\": \"gpt-4.1\",\n                    \"messages\": [\n                      {\n                        \"role\": \"user\",\n                        \"content\": [\n                          {\n                            \"type\": \"text\",\n                            \"text\": \"What is in this image?\"\n                          },\n                          {\n                            \"type\": \"image_url\",\n                            \"image_url\": {\n                              \"url\": \"https://upload.wikimedia.org/wikipedia/commons/thumb/d/dd/Gfp-wisconsin-madison-the-nature-boardwalk.jpg/2560px-Gfp-wisconsin-madison-the-nature-boardwalk.jpg\"\n                            }\n                          }\n                        ]\n                      }\n                    ],\n                    \"max_tokens\": 300\n                  }'\n              python: |-\n                from openai import OpenAI\n\n                client = OpenAI(\n                    api_key=\"My API Key\",\n                )\n                chat_completion = client.chat.completions.create(\n                    messages=[{\n                        \"content\": \"string\",\n                        \"role\": \"developer\",\n                    }],\n                    model=\"gpt-4o\",\n                )\n                print(chat_completion)\n              node.js: |-\n                import OpenAI from 'openai';\n\n                const client = new OpenAI({\n                  apiKey: 'My API Key',\n                });\n\n                const chatCompletion = await client.chat.completions.create({\n                  messages: [{ content: 'string', role: 'developer' }],\n                  model: 'gpt-4o',\n                });\n\n                console.log(chatCompletion);\n              csharp: |\n                using System;\n                using System.Collections.Generic;\n\n                using OpenAI.Chat;\n\n                ChatClient client = new(\n                    model: \"gpt-4.1\",\n                    apiKey: Environment.GetEnvironmentVariable(\"OPENAI_API_KEY\")\n                );\n\n                List<ChatMessage> messages =\n                [\n                    new UserChatMessage(\n                    [\n                        ChatMessageContentPart.CreateTextPart(\"What's in this image?\"),\n                        ChatMessageContentPart.CreateImagePart(new Uri(\"https://upload.wikimedia.org/wikipedia/commons/thumb/d/dd/Gfp-wisconsin-madison-the-nature-boardwalk.jpg/2560px-Gfp-wisconsin-madison-the-nature-boardwalk.jpg\"))\n                    ])\n                ];\n\n                ChatCompletion completion = client.CompleteChat(messages);\n\n                Console.WriteLine(completion.Content[0].Text);\n              go: |\n                package main\n\n                import (\n                  \"context\"\n                  \"fmt\"\n\n                  \"github.com/openai/openai-go\"\n                  \"github.com/openai/openai-go/option\"\n                  \"github.com/openai/openai-go/shared\"\n                )\n\n                func main() {\n                  client := openai.NewClient(\n                    option.WithAPIKey(\"My API Key\"),\n                  )\n                  chatCompletion, err := client.Chat.Completions.New(context.TODO(), openai.ChatCompletionNewParams{\n                    Messages: []openai.ChatCompletionMessageParamUnion{openai.ChatCompletionMessageParamUnion{\n                      OfDeveloper: &openai.ChatCompletionDeveloperMessageParam{\n                        Content: openai.ChatCompletionDeveloperMessageParamContentUnion{\n                          OfString: openai.String(\"string\"),\n                        },\n                      },\n                    }},\n                    Model: shared.ChatModelGPT5,\n                  })\n                  if err != nil {\n                    panic(err.Error())\n                  }\n                  fmt.Printf(\"%+v\\n\", chatCompletion)\n                }\n              java: |-\n                package com.openai.example;\n\n                import com.openai.client.OpenAIClient;\n                import com.openai.client.okhttp.OpenAIOkHttpClient;\n                import com.openai.models.ChatModel;\n                import com.openai.models.chat.completions.ChatCompletion;\n                import com.openai.models.chat.completions.ChatCompletionCreateParams;\n\n                public final class Main {\n                    private Main() {}\n\n                    public static void main(String[] args) {\n                        OpenAIClient client = OpenAIOkHttpClient.fromEnv();\n\n                        ChatCompletionCreateParams params = ChatCompletionCreateParams.builder()\n                            .addDeveloperMessage(\"string\")\n                            .model(ChatModel.GPT_5)\n                            .build();\n                        ChatCompletion chatCompletion = client.chat().completions().create(params);\n                    }\n                }\n              ruby: >-\n                require \"openai\"\n\n\n                openai = OpenAI::Client.new(api_key: \"My API Key\")\n\n\n                chat_completion = openai.chat.completions.create(messages: [{content: \"string\", role:\n                :developer}], model: :\"gpt-5\")\n\n\n                puts(chat_completion)\n            response: |\n              {\n                \"id\": \"chatcmpl-B9MHDbslfkBeAs8l4bebGdFOJ6PeG\",\n                \"object\": \"chat.completion\",\n                \"created\": 1741570283,\n                \"model\": \"gpt-4.1-2025-04-14\",\n                \"choices\": [\n                  {\n                    \"index\": 0,\n                    \"message\": {\n                      \"role\": \"assistant\",\n                      \"content\": \"The image shows a wooden boardwalk path running through a lush green field or meadow. The sky is bright blue with some scattered clouds, giving the scene a serene and peaceful atmosphere. Trees and shrubs are visible in the background.\",\n                      \"refusal\": null,\n                      \"annotations\": []\n                    },\n                    \"logprobs\": null,\n                    \"finish_reason\": \"stop\"\n                  }\n                ],\n                \"usage\": {\n                  \"prompt_tokens\": 1117,\n                  \"completion_tokens\": 46,\n                  \"total_tokens\": 1163,\n                  \"prompt_tokens_details\": {\n                    \"cached_tokens\": 0,\n                    \"audio_tokens\": 0\n                  },\n                  \"completion_tokens_details\": {\n                    \"reasoning_tokens\": 0,\n                    \"audio_tokens\": 0,\n                    \"accepted_prediction_tokens\": 0,\n                    \"rejected_prediction_tokens\": 0\n                  }\n                },\n                \"service_tier\": \"default\"\n              }\n          - title: Streaming\n            request:\n              curl: |\n                curl https://api.openai.com/v1/chat/completions \\\n                  -H \"Content-Type: application/json\" \\\n                  -H \"Authorization: Bearer $OPENAI_API_KEY\" \\\n                  -d '{\n                    \"model\": \"VAR_chat_model_id\",\n                    \"messages\": [\n                      {\n                        \"role\": \"developer\",\n                        \"content\": \"You are a helpful assistant.\"\n                      },\n                      {\n                        \"role\": \"user\",\n                        \"content\": \"Hello!\"\n                      }\n                    ],\n                    \"stream\": true\n                  }'\n              python: |-\n                from openai import OpenAI\n\n                client = OpenAI(\n                    api_key=\"My API Key\",\n                )\n                chat_completion = client.chat.completions.create(\n                    messages=[{\n                        \"content\": \"string\",\n                        \"role\": \"developer\",\n                    }],\n                    model=\"gpt-4o\",\n                )\n                print(chat_completion)\n              node.js: |-\n                import OpenAI from 'openai';\n\n                const client = new OpenAI({\n                  apiKey: 'My API Key',\n                });\n\n                const chatCompletion = await client.chat.completions.create({\n                  messages: [{ content: 'string', role: 'developer' }],\n                  model: 'gpt-4o',\n                });\n\n                console.log(chatCompletion);\n              csharp: >\n                using System;\n\n                using System.ClientModel;\n\n                using System.Collections.Generic;\n\n                using System.Threading.Tasks;\n\n\n                using OpenAI.Chat;\n\n\n                ChatClient client = new(\n                    model: \"gpt-4.1\",\n                    apiKey: Environment.GetEnvironmentVariable(\"OPENAI_API_KEY\")\n                );\n\n\n                List<ChatMessage> messages =\n\n                [\n                    new SystemChatMessage(\"You are a helpful assistant.\"),\n                    new UserChatMessage(\"Hello!\")\n                ];\n\n\n                AsyncCollectionResult<StreamingChatCompletionUpdate> completionUpdates =\n                client.CompleteChatStreamingAsync(messages);\n\n\n                await foreach (StreamingChatCompletionUpdate completionUpdate in completionUpdates)\n\n                {\n                    if (completionUpdate.ContentUpdate.Count > 0)\n                    {\n                        Console.Write(completionUpdate.ContentUpdate[0].Text);\n                    }\n                }\n              go: |\n                package main\n\n                import (\n                  \"context\"\n                  \"fmt\"\n\n                  \"github.com/openai/openai-go\"\n                  \"github.com/openai/openai-go/option\"\n                  \"github.com/openai/openai-go/shared\"\n                )\n\n                func main() {\n                  client := openai.NewClient(\n                    option.WithAPIKey(\"My API Key\"),\n                  )\n                  chatCompletion, err := client.Chat.Completions.New(context.TODO(), openai.ChatCompletionNewParams{\n                    Messages: []openai.ChatCompletionMessageParamUnion{openai.ChatCompletionMessageParamUnion{\n                      OfDeveloper: &openai.ChatCompletionDeveloperMessageParam{\n                        Content: openai.ChatCompletionDeveloperMessageParamContentUnion{\n                          OfString: openai.String(\"string\"),\n                        },\n                      },\n                    }},\n                    Model: shared.ChatModelGPT5,\n                  })\n                  if err != nil {\n                    panic(err.Error())\n                  }\n                  fmt.Printf(\"%+v\\n\", chatCompletion)\n                }\n              java: |-\n                package com.openai.example;\n\n                import com.openai.client.OpenAIClient;\n                import com.openai.client.okhttp.OpenAIOkHttpClient;\n                import com.openai.models.ChatModel;\n                import com.openai.models.chat.completions.ChatCompletion;\n                import com.openai.models.chat.completions.ChatCompletionCreateParams;\n\n                public final class Main {\n                    private Main() {}\n\n                    public static void main(String[] args) {\n                        OpenAIClient client = OpenAIOkHttpClient.fromEnv();\n\n                        ChatCompletionCreateParams params = ChatCompletionCreateParams.builder()\n                            .addDeveloperMessage(\"string\")\n                            .model(ChatModel.GPT_5)\n                            .build();\n                        ChatCompletion chatCompletion = client.chat().completions().create(params);\n                    }\n                }\n              ruby: >-\n                require \"openai\"\n\n\n                openai = OpenAI::Client.new(api_key: \"My API Key\")\n\n\n                chat_completion = openai.chat.completions.create(messages: [{content: \"string\", role:\n                :developer}], model: :\"gpt-5\")\n\n\n                puts(chat_completion)\n            response: >\n              {\"id\":\"chatcmpl-123\",\"object\":\"chat.completion.chunk\",\"created\":1694268190,\"model\":\"gpt-4o-mini\",\n              \"system_fingerprint\": \"fp_44709d6fcb\",\n              \"choices\":[{\"index\":0,\"delta\":{\"role\":\"assistant\",\"content\":\"\"},\"logprobs\":null,\"finish_reason\":null}]}\n\n\n              {\"id\":\"chatcmpl-123\",\"object\":\"chat.completion.chunk\",\"created\":1694268190,\"model\":\"gpt-4o-mini\",\n              \"system_fingerprint\": \"fp_44709d6fcb\",\n              \"choices\":[{\"index\":0,\"delta\":{\"content\":\"Hello\"},\"logprobs\":null,\"finish_reason\":null}]}\n\n\n              ....\n\n\n              {\"id\":\"chatcmpl-123\",\"object\":\"chat.completion.chunk\",\"created\":1694268190,\"model\":\"gpt-4o-mini\",\n              \"system_fingerprint\": \"fp_44709d6fcb\",\n              \"choices\":[{\"index\":0,\"delta\":{},\"logprobs\":null,\"finish_reason\":\"stop\"}]}\n          - title: Functions\n            request:\n              curl: |\n                curl https://api.openai.com/v1/chat/completions \\\n                -H \"Content-Type: application/json\" \\\n                -H \"Authorization: Bearer $OPENAI_API_KEY\" \\\n                -d '{\n                  \"model\": \"gpt-4.1\",\n                  \"messages\": [\n                    {\n                      \"role\": \"user\",\n                      \"content\": \"What is the weather like in Boston today?\"\n                    }\n                  ],\n                  \"tools\": [\n                    {\n                      \"type\": \"function\",\n                      \"function\": {\n                        \"name\": \"get_current_weather\",\n                        \"description\": \"Get the current weather in a given location\",\n                        \"parameters\": {\n                          \"type\": \"object\",\n                          \"properties\": {\n                            \"location\": {\n                              \"type\": \"string\",\n                              \"description\": \"The city and state, e.g. San Francisco, CA\"\n                            },\n                            \"unit\": {\n                              \"type\": \"string\",\n                              \"enum\": [\"celsius\", \"fahrenheit\"]\n                            }\n                          },\n                          \"required\": [\"location\"]\n                        }\n                      }\n                    }\n                  ],\n                  \"tool_choice\": \"auto\"\n                }'\n              python: |-\n                from openai import OpenAI\n\n                client = OpenAI(\n                    api_key=\"My API Key\",\n                )\n                chat_completion = client.chat.completions.create(\n                    messages=[{\n                        \"content\": \"string\",\n                        \"role\": \"developer\",\n                    }],\n                    model=\"gpt-4o\",\n                )\n                print(chat_completion)\n              node.js: |-\n                import OpenAI from 'openai';\n\n                const client = new OpenAI({\n                  apiKey: 'My API Key',\n                });\n\n                const chatCompletion = await client.chat.completions.create({\n                  messages: [{ content: 'string', role: 'developer' }],\n                  model: 'gpt-4o',\n                });\n\n                console.log(chatCompletion);\n              csharp: |\n                using System;\n                using System.Collections.Generic;\n\n                using OpenAI.Chat;\n\n                ChatClient client = new(\n                    model: \"gpt-4.1\",\n                    apiKey: Environment.GetEnvironmentVariable(\"OPENAI_API_KEY\")\n                );\n\n                ChatTool getCurrentWeatherTool = ChatTool.CreateFunctionTool(\n                    functionName: \"get_current_weather\",\n                    functionDescription: \"Get the current weather in a given location\",\n                    functionParameters: BinaryData.FromString(\"\"\"\n                        {\n                            \"type\": \"object\",\n                            \"properties\": {\n                                \"location\": {\n                                    \"type\": \"string\",\n                                    \"description\": \"The city and state, e.g. San Francisco, CA\"\n                                },\n                                \"unit\": {\n                                    \"type\": \"string\",\n                                    \"enum\": [ \"celsius\", \"fahrenheit\" ]\n                                }\n                            },\n                            \"required\": [ \"location\" ]\n                        }\n                    \"\"\")\n                );\n\n                List<ChatMessage> messages =\n                [\n                    new UserChatMessage(\"What's the weather like in Boston today?\"),\n                ];\n\n                ChatCompletionOptions options = new()\n                {\n                    Tools =\n                    {\n                        getCurrentWeatherTool\n                    },\n                    ToolChoice = ChatToolChoice.CreateAutoChoice(),\n                };\n\n                ChatCompletion completion = client.CompleteChat(messages, options);\n              go: |\n                package main\n\n                import (\n                  \"context\"\n                  \"fmt\"\n\n                  \"github.com/openai/openai-go\"\n                  \"github.com/openai/openai-go/option\"\n                  \"github.com/openai/openai-go/shared\"\n                )\n\n                func main() {\n                  client := openai.NewClient(\n                    option.WithAPIKey(\"My API Key\"),\n                  )\n                  chatCompletion, err := client.Chat.Completions.New(context.TODO(), openai.ChatCompletionNewParams{\n                    Messages: []openai.ChatCompletionMessageParamUnion{openai.ChatCompletionMessageParamUnion{\n                      OfDeveloper: &openai.ChatCompletionDeveloperMessageParam{\n                        Content: openai.ChatCompletionDeveloperMessageParamContentUnion{\n                          OfString: openai.String(\"string\"),\n                        },\n                      },\n                    }},\n                    Model: shared.ChatModelGPT5,\n                  })\n                  if err != nil {\n                    panic(err.Error())\n                  }\n                  fmt.Printf(\"%+v\\n\", chatCompletion)\n                }\n              java: |-\n                package com.openai.example;\n\n                import com.openai.client.OpenAIClient;\n                import com.openai.client.okhttp.OpenAIOkHttpClient;\n                import com.openai.models.ChatModel;\n                import com.openai.models.chat.completions.ChatCompletion;\n                import com.openai.models.chat.completions.ChatCompletionCreateParams;\n\n                public final class Main {\n                    private Main() {}\n\n                    public static void main(String[] args) {\n                        OpenAIClient client = OpenAIOkHttpClient.fromEnv();\n\n                        ChatCompletionCreateParams params = ChatCompletionCreateParams.builder()\n                            .addDeveloperMessage(\"string\")\n                            .model(ChatModel.GPT_5)\n                            .build();\n                        ChatCompletion chatCompletion = client.chat().completions().create(params);\n                    }\n                }\n              ruby: >-\n                require \"openai\"\n\n\n                openai = OpenAI::Client.new(api_key: \"My API Key\")\n\n\n                chat_completion = openai.chat.completions.create(messages: [{content: \"string\", role:\n                :developer}], model: :\"gpt-5\")\n\n\n                puts(chat_completion)\n            response: |\n              {\n                \"id\": \"chatcmpl-abc123\",\n                \"object\": \"chat.completion\",\n                \"created\": 1699896916,\n                \"model\": \"gpt-4o-mini\",\n                \"choices\": [\n                  {\n                    \"index\": 0,\n                    \"message\": {\n                      \"role\": \"assistant\",\n                      \"content\": null,\n                      \"tool_calls\": [\n                        {\n                          \"id\": \"call_abc123\",\n                          \"type\": \"function\",\n                          \"function\": {\n                            \"name\": \"get_current_weather\",\n                            \"arguments\": \"{\\n\\\"location\\\": \\\"Boston, MA\\\"\\n}\"\n                          }\n                        }\n                      ]\n                    },\n                    \"logprobs\": null,\n                    \"finish_reason\": \"tool_calls\"\n                  }\n                ],\n                \"usage\": {\n                  \"prompt_tokens\": 82,\n                  \"completion_tokens\": 17,\n                  \"total_tokens\": 99,\n                  \"completion_tokens_details\": {\n                    \"reasoning_tokens\": 0,\n                    \"accepted_prediction_tokens\": 0,\n                    \"rejected_prediction_tokens\": 0\n                  }\n                }\n              }\n          - title: Logprobs\n            request:\n              curl: |\n                curl https://api.openai.com/v1/chat/completions \\\n                  -H \"Content-Type: application/json\" \\\n                  -H \"Authorization: Bearer $OPENAI_API_KEY\" \\\n                  -d '{\n                    \"model\": \"VAR_chat_model_id\",\n                    \"messages\": [\n                      {\n                        \"role\": \"user\",\n                        \"content\": \"Hello!\"\n                      }\n                    ],\n                    \"logprobs\": true,\n                    \"top_logprobs\": 2\n                  }'\n              python: |-\n                from openai import OpenAI\n\n                client = OpenAI(\n                    api_key=\"My API Key\",\n                )\n                chat_completion = client.chat.completions.create(\n                    messages=[{\n                        \"content\": \"string\",\n                        \"role\": \"developer\",\n                    }],\n                    model=\"gpt-4o\",\n                )\n                print(chat_completion)\n              node.js: |-\n                import OpenAI from 'openai';\n\n                const client = new OpenAI({\n                  apiKey: 'My API Key',\n                });\n\n                const chatCompletion = await client.chat.completions.create({\n                  messages: [{ content: 'string', role: 'developer' }],\n                  model: 'gpt-4o',\n                });\n\n                console.log(chatCompletion);\n              csharp: |\n                using System;\n                using System.Collections.Generic;\n\n                using OpenAI.Chat;\n\n                ChatClient client = new(\n                    model: \"gpt-4.1\",\n                    apiKey: Environment.GetEnvironmentVariable(\"OPENAI_API_KEY\")\n                );\n\n                List<ChatMessage> messages =\n                [\n                    new UserChatMessage(\"Hello!\")\n                ];\n\n                ChatCompletionOptions options = new()\n                {\n                    IncludeLogProbabilities = true,\n                    TopLogProbabilityCount = 2\n                };\n\n                ChatCompletion completion = client.CompleteChat(messages, options);\n\n                Console.WriteLine(completion.Content[0].Text);\n              go: |\n                package main\n\n                import (\n                  \"context\"\n                  \"fmt\"\n\n                  \"github.com/openai/openai-go\"\n                  \"github.com/openai/openai-go/option\"\n                  \"github.com/openai/openai-go/shared\"\n                )\n\n                func main() {\n                  client := openai.NewClient(\n                    option.WithAPIKey(\"My API Key\"),\n                  )\n                  chatCompletion, err := client.Chat.Completions.New(context.TODO(), openai.ChatCompletionNewParams{\n                    Messages: []openai.ChatCompletionMessageParamUnion{openai.ChatCompletionMessageParamUnion{\n                      OfDeveloper: &openai.ChatCompletionDeveloperMessageParam{\n                        Content: openai.ChatCompletionDeveloperMessageParamContentUnion{\n                          OfString: openai.String(\"string\"),\n                        },\n                      },\n                    }},\n                    Model: shared.ChatModelGPT5,\n                  })\n                  if err != nil {\n                    panic(err.Error())\n                  }\n                  fmt.Printf(\"%+v\\n\", chatCompletion)\n                }\n              java: |-\n                package com.openai.example;\n\n                import com.openai.client.OpenAIClient;\n                import com.openai.client.okhttp.OpenAIOkHttpClient;\n                import com.openai.models.ChatModel;\n                import com.openai.models.chat.completions.ChatCompletion;\n                import com.openai.models.chat.completions.ChatCompletionCreateParams;\n\n                public final class Main {\n                    private Main() {}\n\n                    public static void main(String[] args) {\n                        OpenAIClient client = OpenAIOkHttpClient.fromEnv();\n\n                        ChatCompletionCreateParams params = ChatCompletionCreateParams.builder()\n                            .addDeveloperMessage(\"string\")\n                            .model(ChatModel.GPT_5)\n                            .build();\n                        ChatCompletion chatCompletion = client.chat().completions().create(params);\n                    }\n                }\n              ruby: >-\n                require \"openai\"\n\n\n                openai = OpenAI::Client.new(api_key: \"My API Key\")\n\n\n                chat_completion = openai.chat.completions.create(messages: [{content: \"string\", role:\n                :developer}], model: :\"gpt-5\")\n\n\n                puts(chat_completion)\n            response: |\n              {\n                \"id\": \"chatcmpl-123\",\n                \"object\": \"chat.completion\",\n                \"created\": 1702685778,\n                \"model\": \"gpt-4o-mini\",\n                \"choices\": [\n                  {\n                    \"index\": 0,\n                    \"message\": {\n                      \"role\": \"assistant\",\n                      \"content\": \"Hello! How can I assist you today?\"\n                    },\n                    \"logprobs\": {\n                      \"content\": [\n                        {\n                          \"token\": \"Hello\",\n                          \"logprob\": -0.31725305,\n                          \"bytes\": [72, 101, 108, 108, 111],\n                          \"top_logprobs\": [\n                            {\n                              \"token\": \"Hello\",\n                              \"logprob\": -0.31725305,\n                              \"bytes\": [72, 101, 108, 108, 111]\n                            },\n                            {\n                              \"token\": \"Hi\",\n                              \"logprob\": -1.3190403,\n                              \"bytes\": [72, 105]\n                            }\n                          ]\n                        },\n                        {\n                          \"token\": \"!\",\n                          \"logprob\": -0.02380986,\n                          \"bytes\": [\n                            33\n                          ],\n                          \"top_logprobs\": [\n                            {\n                              \"token\": \"!\",\n                              \"logprob\": -0.02380986,\n                              \"bytes\": [33]\n                            },\n                            {\n                              \"token\": \" there\",\n                              \"logprob\": -3.787621,\n                              \"bytes\": [32, 116, 104, 101, 114, 101]\n                            }\n                          ]\n                        },\n                        {\n                          \"token\": \" How\",\n                          \"logprob\": -0.000054669687,\n                          \"bytes\": [32, 72, 111, 119],\n                          \"top_logprobs\": [\n                            {\n                              \"token\": \" How\",\n                              \"logprob\": -0.000054669687,\n                              \"bytes\": [32, 72, 111, 119]\n                            },\n                            {\n                              \"token\": \"<|end|>\",\n                              \"logprob\": -10.953937,\n                              \"bytes\": null\n                            }\n                          ]\n                        },\n                        {\n                          \"token\": \" can\",\n                          \"logprob\": -0.015801601,\n                          \"bytes\": [32, 99, 97, 110],\n                          \"top_logprobs\": [\n                            {\n                              \"token\": \" can\",\n                              \"logprob\": -0.015801601,\n                              \"bytes\": [32, 99, 97, 110]\n                            },\n                            {\n                              \"token\": \" may\",\n                              \"logprob\": -4.161023,\n                              \"bytes\": [32, 109, 97, 121]\n                            }\n                          ]\n                        },\n                        {\n                          \"token\": \" I\",\n                          \"logprob\": -3.7697225e-6,\n                          \"bytes\": [\n                            32,\n                            73\n                          ],\n                          \"top_logprobs\": [\n                            {\n                              \"token\": \" I\",\n                              \"logprob\": -3.7697225e-6,\n                              \"bytes\": [32, 73]\n                            },\n                            {\n                              \"token\": \" assist\",\n                              \"logprob\": -13.596657,\n                              \"bytes\": [32, 97, 115, 115, 105, 115, 116]\n                            }\n                          ]\n                        },\n                        {\n                          \"token\": \" assist\",\n                          \"logprob\": -0.04571125,\n                          \"bytes\": [32, 97, 115, 115, 105, 115, 116],\n                          \"top_logprobs\": [\n                            {\n                              \"token\": \" assist\",\n                              \"logprob\": -0.04571125,\n                              \"bytes\": [32, 97, 115, 115, 105, 115, 116]\n                            },\n                            {\n                              \"token\": \" help\",\n                              \"logprob\": -3.1089056,\n                              \"bytes\": [32, 104, 101, 108, 112]\n                            }\n                          ]\n                        },\n                        {\n                          \"token\": \" you\",\n                          \"logprob\": -5.4385737e-6,\n                          \"bytes\": [32, 121, 111, 117],\n                          \"top_logprobs\": [\n                            {\n                              \"token\": \" you\",\n                              \"logprob\": -5.4385737e-6,\n                              \"bytes\": [32, 121, 111, 117]\n                            },\n                            {\n                              \"token\": \" today\",\n                              \"logprob\": -12.807695,\n                              \"bytes\": [32, 116, 111, 100, 97, 121]\n                            }\n                          ]\n                        },\n                        {\n                          \"token\": \" today\",\n                          \"logprob\": -0.0040071653,\n                          \"bytes\": [32, 116, 111, 100, 97, 121],\n                          \"top_logprobs\": [\n                            {\n                              \"token\": \" today\",\n                              \"logprob\": -0.0040071653,\n                              \"bytes\": [32, 116, 111, 100, 97, 121]\n                            },\n                            {\n                              \"token\": \"?\",\n                              \"logprob\": -5.5247097,\n                              \"bytes\": [63]\n                            }\n                          ]\n                        },\n                        {\n                          \"token\": \"?\",\n                          \"logprob\": -0.0008108172,\n                          \"bytes\": [63],\n                          \"top_logprobs\": [\n                            {\n                              \"token\": \"?\",\n                              \"logprob\": -0.0008108172,\n                              \"bytes\": [63]\n                            },\n                            {\n                              \"token\": \"?\\n\",\n                              \"logprob\": -7.184561,\n                              \"bytes\": [63, 10]\n                            }\n                          ]\n                        }\n                      ]\n                    },\n                    \"finish_reason\": \"stop\"\n                  }\n                ],\n                \"usage\": {\n                  \"prompt_tokens\": 9,\n                  \"completion_tokens\": 9,\n                  \"total_tokens\": 18,\n                  \"completion_tokens_details\": {\n                    \"reasoning_tokens\": 0,\n                    \"accepted_prediction_tokens\": 0,\n                    \"rejected_prediction_tokens\": 0\n                  }\n                },\n                \"system_fingerprint\": null\n              }\n      description: >\n        **Starting a new project?** We recommend trying\n        [Responses](https://platform.openai.com/docs/api-reference/responses)\n\n        to take advantage of the latest OpenAI platform features. Compare\n\n        [Chat Completions with\n        Responses](https://platform.openai.com/docs/guides/responses-vs-chat-completions?api-mode=responses).\n\n\n        ---\n\n\n        Creates a model response for the given chat conversation. Learn more in the\n\n        [text generation](https://platform.openai.com/docs/guides/text-generation),\n        [vision](https://platform.openai.com/docs/guides/vision),\n\n        and [audio](https://platform.openai.com/docs/guides/audio) guides.\n\n\n        Parameter support can differ depending on the model used to generate the\n\n        response, particularly for newer reasoning models. Parameters that are only\n\n        supported for reasoning models are noted below. For the current state of\n\n        unsupported parameters in reasoning models,\n\n        [refer to the reasoning guide](https://platform.openai.com/docs/guides/reasoning).\n  /chat/completions/{completion_id}:\n    get:\n      operationId: getChatCompletion\n      tags:\n        - Chat\n      summary: Get chat completion\n      parameters:\n        - in: path\n          name: completion_id\n          required: true\n          schema:\n            type: string\n          description: The ID of the chat completion to retrieve.\n      responses:\n        '200':\n          description: A chat completion\n          content:\n            application/json:\n              schema:\n                $ref: '#/components/schemas/CreateChatCompletionResponse'\n      x-oaiMeta:\n        name: Get chat completion\n        group: chat\n        returns: >-\n          The [ChatCompletion](https://platform.openai.com/docs/api-reference/chat/object) object matching the\n          specified ID.\n        examples:\n          response: |\n            {\n              \"object\": \"chat.completion\",\n              \"id\": \"chatcmpl-abc123\",\n              \"model\": \"gpt-4o-2024-08-06\",\n              \"created\": 1738960610,\n              \"request_id\": \"req_ded8ab984ec4bf840f37566c1011c417\",\n              \"tool_choice\": null,\n              \"usage\": {\n                \"total_tokens\": 31,\n                \"completion_tokens\": 18,\n                \"prompt_tokens\": 13\n              },\n              \"seed\": 4944116822809979520,\n              \"top_p\": 1.0,\n              \"temperature\": 1.0,\n              \"presence_penalty\": 0.0,\n              \"frequency_penalty\": 0.0,\n              \"system_fingerprint\": \"fp_50cad350e4\",\n              \"input_user\": null,\n              \"service_tier\": \"default\",\n              \"tools\": null,\n              \"metadata\": {},\n              \"choices\": [\n                {\n                  \"index\": 0,\n                  \"message\": {\n                    \"content\": \"Mind of circuits hum,  \\nLearning patterns in silence—  \\nFuture's quiet spark.\",\n                    \"role\": \"assistant\",\n                    \"tool_calls\": null,\n                    \"function_call\": null\n                  },\n                  \"finish_reason\": \"stop\",\n                  \"logprobs\": null\n                }\n              ],\n              \"response_format\": null\n            }\n          request:\n            curl: |\n              curl https://api.openai.com/v1/chat/completions/chatcmpl-abc123 \\\n                -H \"Authorization: Bearer $OPENAI_API_KEY\" \\\n                -H \"Content-Type: application/json\"\n            python: |-\n              from openai import OpenAI\n\n              client = OpenAI(\n                  api_key=\"My API Key\",\n              )\n              chat_completion = client.chat.completions.retrieve(\n                  \"completion_id\",\n              )\n              print(chat_completion.id)\n            node.js: |-\n              import OpenAI from 'openai';\n\n              const client = new OpenAI({\n                apiKey: 'My API Key',\n              });\n\n              const chatCompletion = await client.chat.completions.retrieve('completion_id');\n\n              console.log(chatCompletion.id);\n            go: |\n              package main\n\n              import (\n                \"context\"\n                \"fmt\"\n\n                \"github.com/openai/openai-go\"\n                \"github.com/openai/openai-go/option\"\n              )\n\n              func main() {\n                client := openai.NewClient(\n                  option.WithAPIKey(\"My API Key\"),\n                )\n                chatCompletion, err := client.Chat.Completions.Get(context.TODO(), \"completion_id\")\n                if err != nil {\n                  panic(err.Error())\n                }\n                fmt.Printf(\"%+v\\n\", chatCompletion.ID)\n              }\n            java: |-\n              package com.openai.example;\n\n              import com.openai.client.OpenAIClient;\n              import com.openai.client.okhttp.OpenAIOkHttpClient;\n              import com.openai.models.chat.completions.ChatCompletion;\n              import com.openai.models.chat.completions.ChatCompletionRetrieveParams;\n\n              public final class Main {\n                  private Main() {}\n\n                  public static void main(String[] args) {\n                      OpenAIClient client = OpenAIOkHttpClient.fromEnv();\n\n                      ChatCompletion chatCompletion = client.chat().completions().retrieve(\"completion_id\");\n                  }\n              }\n            ruby: |-\n              require \"openai\"\n\n              openai = OpenAI::Client.new(api_key: \"My API Key\")\n\n              chat_completion = openai.chat.completions.retrieve(\"completion_id\")\n\n              puts(chat_completion)\n      description: |\n        Get a stored chat completion. Only Chat Completions that have been created\n        with the `store` parameter set to `true` will be returned.\n    post:\n      operationId: updateChatCompletion\n      tags:\n        - Chat\n      summary: Update chat completion\n      parameters:\n        - in: path\n          name: completion_id\n          required: true\n          schema:\n            type: string\n          description: The ID of the chat completion to update.\n      requestBody:\n        required: true\n        content:\n          application/json:\n            schema:\n              type: object\n              required:\n                - metadata\n              properties:\n                metadata:\n                  $ref: '#/components/schemas/Metadata'\n      responses:\n        '200':\n          description: A chat completion\n          content:\n            application/json:\n              schema:\n                $ref: '#/components/schemas/CreateChatCompletionResponse'\n      x-oaiMeta:\n        name: Update chat completion\n        group: chat\n        returns: >-\n          The [ChatCompletion](https://platform.openai.com/docs/api-reference/chat/object) object matching the\n          specified ID.\n        examples:\n          response: |\n            {\n              \"object\": \"chat.completion\",\n              \"id\": \"chatcmpl-AyPNinnUqUDYo9SAdA52NobMflmj2\",\n              \"model\": \"gpt-4o-2024-08-06\",\n              \"created\": 1738960610,\n              \"request_id\": \"req_ded8ab984ec4bf840f37566c1011c417\",\n              \"tool_choice\": null,\n              \"usage\": {\n                \"total_tokens\": 31,\n                \"completion_tokens\": 18,\n                \"prompt_tokens\": 13\n              },\n              \"seed\": 4944116822809979520,\n              \"top_p\": 1.0,\n              \"temperature\": 1.0,\n              \"presence_penalty\": 0.0,\n              \"frequency_penalty\": 0.0,\n              \"system_fingerprint\": \"fp_50cad350e4\",\n              \"input_user\": null,\n              \"service_tier\": \"default\",\n              \"tools\": null,\n              \"metadata\": {\n                \"foo\": \"bar\"\n              },\n              \"choices\": [\n                {\n                  \"index\": 0,\n                  \"message\": {\n                    \"content\": \"Mind of circuits hum,  \\nLearning patterns in silence—  \\nFuture's quiet spark.\",\n                    \"role\": \"assistant\",\n                    \"tool_calls\": null,\n                    \"function_call\": null\n                  },\n                  \"finish_reason\": \"stop\",\n                  \"logprobs\": null\n                }\n              ],\n              \"response_format\": null\n            }\n          request:\n            curl: |\n              curl -X POST https://api.openai.com/v1/chat/completions/chat_abc123 \\\n                -H \"Authorization: Bearer $OPENAI_API_KEY\" \\\n                -H \"Content-Type: application/json\" \\\n                -d '{\"metadata\": {\"foo\": \"bar\"}}'\n            python: |-\n              from openai import OpenAI\n\n              client = OpenAI(\n                  api_key=\"My API Key\",\n              )\n              chat_completion = client.chat.completions.update(\n                  completion_id=\"completion_id\",\n                  metadata={\n                      \"foo\": \"string\"\n                  },\n              )\n              print(chat_completion.id)\n            node.js: >-\n              import OpenAI from 'openai';\n\n\n              const client = new OpenAI({\n                apiKey: 'My API Key',\n              });\n\n\n              const chatCompletion = await client.chat.completions.update('completion_id', { metadata: { foo:\n              'string' } });\n\n\n              console.log(chatCompletion.id);\n            go: |\n              package main\n\n              import (\n                \"context\"\n                \"fmt\"\n\n                \"github.com/openai/openai-go\"\n                \"github.com/openai/openai-go/option\"\n                \"github.com/openai/openai-go/shared\"\n              )\n\n              func main() {\n                client := openai.NewClient(\n                  option.WithAPIKey(\"My API Key\"),\n                )\n                chatCompletion, err := client.Chat.Completions.Update(\n                  context.TODO(),\n                  \"completion_id\",\n                  openai.ChatCompletionUpdateParams{\n                    Metadata: shared.Metadata{\n                    \"foo\": \"string\",\n                    },\n                  },\n                )\n                if err != nil {\n                  panic(err.Error())\n                }\n                fmt.Printf(\"%+v\\n\", chatCompletion.ID)\n              }\n            java: |-\n              package com.openai.example;\n\n              import com.openai.client.OpenAIClient;\n              import com.openai.client.okhttp.OpenAIOkHttpClient;\n              import com.openai.core.JsonValue;\n              import com.openai.models.chat.completions.ChatCompletion;\n              import com.openai.models.chat.completions.ChatCompletionUpdateParams;\n\n              public final class Main {\n                  private Main() {}\n\n                  public static void main(String[] args) {\n                      OpenAIClient client = OpenAIOkHttpClient.fromEnv();\n\n                      ChatCompletionUpdateParams params = ChatCompletionUpdateParams.builder()\n                          .completionId(\"completion_id\")\n                          .metadata(ChatCompletionUpdateParams.Metadata.builder()\n                              .putAdditionalProperty(\"foo\", JsonValue.from(\"string\"))\n                              .build())\n                          .build();\n                      ChatCompletion chatCompletion = client.chat().completions().update(params);\n                  }\n              }\n            ruby: |-\n              require \"openai\"\n\n              openai = OpenAI::Client.new(api_key: \"My API Key\")\n\n              chat_completion = openai.chat.completions.update(\"completion_id\", metadata: {foo: \"string\"})\n\n              puts(chat_completion)\n      description: |\n        Modify a stored chat completion. Only Chat Completions that have been\n        created with the `store` parameter set to `true` can be modified. Currently,\n        the only supported modification is to update the `metadata` field.\n    delete:\n      operationId: deleteChatCompletion\n      tags:\n        - Chat\n      summary: Delete chat completion\n      parameters:\n        - in: path\n          name: completion_id\n          required: true\n          schema:\n            type: string\n          description: The ID of the chat completion to delete.\n      responses:\n        '200':\n          description: The chat completion was deleted successfully.\n          content:\n            application/json:\n              schema:\n                $ref: '#/components/schemas/ChatCompletionDeleted'\n      x-oaiMeta:\n        name: Delete chat completion\n        group: chat\n        returns: A deletion confirmation object.\n        examples:\n          response: |\n            {\n              \"object\": \"chat.completion.deleted\",\n              \"id\": \"chatcmpl-AyPNinnUqUDYo9SAdA52NobMflmj2\",\n              \"deleted\": true\n            }\n          request:\n            curl: |\n              curl -X DELETE https://api.openai.com/v1/chat/completions/chat_abc123 \\\n                -H \"Authorization: Bearer $OPENAI_API_KEY\" \\\n                -H \"Content-Type: application/json\"\n            python: |-\n              from openai import OpenAI\n\n              client = OpenAI(\n                  api_key=\"My API Key\",\n              )\n              chat_completion_deleted = client.chat.completions.delete(\n                  \"completion_id\",\n              )\n              print(chat_completion_deleted.id)\n            node.js: |-\n              import OpenAI from 'openai';\n\n              const client = new OpenAI({\n                apiKey: 'My API Key',\n              });\n\n              const chatCompletionDeleted = await client.chat.completions.delete('completion_id');\n\n              console.log(chatCompletionDeleted.id);\n            go: |\n              package main\n\n              import (\n                \"context\"\n                \"fmt\"\n\n                \"github.com/openai/openai-go\"\n                \"github.com/openai/openai-go/option\"\n              )\n\n              func main() {\n                client := openai.NewClient(\n                  option.WithAPIKey(\"My API Key\"),\n                )\n                chatCompletionDeleted, err := client.Chat.Completions.Delete(context.TODO(), \"completion_id\")\n                if err != nil {\n                  panic(err.Error())\n                }\n                fmt.Printf(\"%+v\\n\", chatCompletionDeleted.ID)\n              }\n            java: |-\n              package com.openai.example;\n\n              import com.openai.client.OpenAIClient;\n              import com.openai.client.okhttp.OpenAIOkHttpClient;\n              import com.openai.models.chat.completions.ChatCompletionDeleteParams;\n              import com.openai.models.chat.completions.ChatCompletionDeleted;\n\n              public final class Main {\n                  private Main() {}\n\n                  public static void main(String[] args) {\n                      OpenAIClient client = OpenAIOkHttpClient.fromEnv();\n\n                      ChatCompletionDeleted chatCompletionDeleted = client.chat().completions().delete(\"completion_id\");\n                  }\n              }\n            ruby: |-\n              require \"openai\"\n\n              openai = OpenAI::Client.new(api_key: \"My API Key\")\n\n              chat_completion_deleted = openai.chat.completions.delete(\"completion_id\")\n\n              puts(chat_completion_deleted)\n      description: |\n        Delete a stored chat completion. Only Chat Completions that have been\n        created with the `store` parameter set to `true` can be deleted.\n  /chat/completions/{completion_id}/messages:\n    get:\n      operationId: getChatCompletionMessages\n      tags:\n        - Chat\n      summary: Get chat messages\n      parameters:\n        - in: path\n          name: completion_id\n          required: true\n          schema:\n            type: string\n          description: The ID of the chat completion to retrieve messages from.\n        - name: after\n          in: query\n          description: Identifier for the last message from the previous pagination request.\n          required: false\n          schema:\n            type: string\n        - name: limit\n          in: query\n          description: Number of messages to retrieve.\n          required: false\n          schema:\n            type: integer\n            default: 20\n        - name: order\n          in: query\n          description: >-\n            Sort order for messages by timestamp. Use `asc` for ascending order or `desc` for descending\n            order. Defaults to `asc`.\n          required: false\n          schema:\n            type: string\n            enum:\n              - asc\n              - desc\n            default: asc\n      responses:\n        '200':\n          description: A list of messages\n          content:\n            application/json:\n              schema:\n                $ref: '#/components/schemas/ChatCompletionMessageList'\n      x-oaiMeta:\n        name: Get chat messages\n        group: chat\n        returns: >-\n          A list of [messages](https://platform.openai.com/docs/api-reference/chat/message-list) for the\n          specified chat completion.\n        examples:\n          response: |\n            {\n              \"object\": \"list\",\n              \"data\": [\n                {\n                  \"id\": \"chatcmpl-AyPNinnUqUDYo9SAdA52NobMflmj2-0\",\n                  \"role\": \"user\",\n                  \"content\": \"write a haiku about ai\",\n                  \"name\": null,\n                  \"content_parts\": null\n                }\n              ],\n              \"first_id\": \"chatcmpl-AyPNinnUqUDYo9SAdA52NobMflmj2-0\",\n              \"last_id\": \"chatcmpl-AyPNinnUqUDYo9SAdA52NobMflmj2-0\",\n              \"has_more\": false\n            }\n          request:\n            curl: |\n              curl https://api.openai.com/v1/chat/completions/chat_abc123/messages \\\n                -H \"Authorization: Bearer $OPENAI_API_KEY\" \\\n                -H \"Content-Type: application/json\"\n            python: |-\n              from openai import OpenAI\n\n              client = OpenAI(\n                  api_key=\"My API Key\",\n              )\n              page = client.chat.completions.messages.list(\n                  completion_id=\"completion_id\",\n              )\n              page = page.data[0]\n              print(page)\n            node.js: >-\n              import OpenAI from 'openai';\n\n\n              const client = new OpenAI({\n                apiKey: 'My API Key',\n              });\n\n\n              // Automatically fetches more pages as needed.\n\n              for await (const chatCompletionStoreMessage of\n              client.chat.completions.messages.list('completion_id')) {\n                console.log(chatCompletionStoreMessage);\n              }\n            go: |\n              package main\n\n              import (\n                \"context\"\n                \"fmt\"\n\n                \"github.com/openai/openai-go\"\n                \"github.com/openai/openai-go/option\"\n              )\n\n              func main() {\n                client := openai.NewClient(\n                  option.WithAPIKey(\"My API Key\"),\n                )\n                page, err := client.Chat.Completions.Messages.List(\n                  context.TODO(),\n                  \"completion_id\",\n                  openai.ChatCompletionMessageListParams{\n\n                  },\n                )\n                if err != nil {\n                  panic(err.Error())\n                }\n                fmt.Printf(\"%+v\\n\", page)\n              }\n            java: |-\n              package com.openai.example;\n\n              import com.openai.client.OpenAIClient;\n              import com.openai.client.okhttp.OpenAIOkHttpClient;\n              import com.openai.models.chat.completions.messages.MessageListPage;\n              import com.openai.models.chat.completions.messages.MessageListParams;\n\n              public final class Main {\n                  private Main() {}\n\n                  public static void main(String[] args) {\n                      OpenAIClient client = OpenAIOkHttpClient.fromEnv();\n\n                      MessageListPage page = client.chat().completions().messages().list(\"completion_id\");\n                  }\n              }\n            ruby: |-\n              require \"openai\"\n\n              openai = OpenAI::Client.new(api_key: \"My API Key\")\n\n              page = openai.chat.completions.messages.list(\"completion_id\")\n\n              puts(page)\n      description: |\n        Get the messages in a stored chat completion. Only Chat Completions that\n        have been created with the `store` parameter set to `true` will be\n        returned.\n  /completions:\n    post:\n      operationId: createCompletion\n      tags:\n        - Completions\n      summary: Create completion\n      requestBody:\n        required: true\n        content:\n          application/json:\n            schema:\n              $ref: '#/components/schemas/CreateCompletionRequest'\n      responses:\n        '200':\n          description: OK\n          content:\n            application/json:\n              schema:\n                $ref: '#/components/schemas/CreateCompletionResponse'\n      x-oaiMeta:\n        name: Create completion\n        group: completions\n        returns: >\n          Returns a [completion](https://platform.openai.com/docs/api-reference/completions/object) object, or\n          a sequence of completion objects if the request is streamed.\n        legacy: true\n        examples:\n          - title: No streaming\n            request:\n              curl: |\n                curl https://api.openai.com/v1/completions \\\n                  -H \"Content-Type: application/json\" \\\n                  -H \"Authorization: Bearer $OPENAI_API_KEY\" \\\n                  -d '{\n                    \"model\": \"VAR_completion_model_id\",\n                    \"prompt\": \"Say this is a test\",\n                    \"max_tokens\": 7,\n                    \"temperature\": 0\n                  }'\n              python: |-\n                from openai import OpenAI\n\n                client = OpenAI(\n                    api_key=\"My API Key\",\n                )\n                completion = client.completions.create(\n                    model=\"string\",\n                    prompt=\"This is a test.\",\n                )\n                print(completion)\n              node.js: >-\n                import OpenAI from 'openai';\n\n\n                const client = new OpenAI({\n                  apiKey: 'My API Key',\n                });\n\n\n                const completion = await client.completions.create({ model: 'string', prompt: 'This is a\n                test.' });\n\n\n                console.log(completion);\n              go: |\n                package main\n\n                import (\n                  \"context\"\n                  \"fmt\"\n\n                  \"github.com/openai/openai-go\"\n                  \"github.com/openai/openai-go/option\"\n                )\n\n                func main() {\n                  client := openai.NewClient(\n                    option.WithAPIKey(\"My API Key\"),\n                  )\n                  completion, err := client.Completions.New(context.TODO(), openai.CompletionNewParams{\n                    Model: openai.CompletionNewParamsModelGPT3_5TurboInstruct,\n                    Prompt: openai.CompletionNewParamsPromptUnion{\n                      OfString: openai.String(\"This is a test.\"),\n                    },\n                  })\n                  if err != nil {\n                    panic(err.Error())\n                  }\n                  fmt.Printf(\"%+v\\n\", completion)\n                }\n              java: |-\n                package com.openai.example;\n\n                import com.openai.client.OpenAIClient;\n                import com.openai.client.okhttp.OpenAIOkHttpClient;\n                import com.openai.models.completions.Completion;\n                import com.openai.models.completions.CompletionCreateParams;\n\n                public final class Main {\n                    private Main() {}\n\n                    public static void main(String[] args) {\n                        OpenAIClient client = OpenAIOkHttpClient.fromEnv();\n\n                        CompletionCreateParams params = CompletionCreateParams.builder()\n                            .model(CompletionCreateParams.Model.GPT_3_5_TURBO_INSTRUCT)\n                            .prompt(\"This is a test.\")\n                            .build();\n                        Completion completion = client.completions().create(params);\n                    }\n                }\n              ruby: >-\n                require \"openai\"\n\n\n                openai = OpenAI::Client.new(api_key: \"My API Key\")\n\n\n                completion = openai.completions.create(model: :\"gpt-3.5-turbo-instruct\", prompt: \"This is a\n                test.\")\n\n\n                puts(completion)\n            response: |\n              {\n                \"id\": \"cmpl-uqkvlQyYK7bGYrRHQ0eXlWi7\",\n                \"object\": \"text_completion\",\n                \"created\": 1589478378,\n                \"model\": \"VAR_completion_model_id\",\n                \"system_fingerprint\": \"fp_44709d6fcb\",\n                \"choices\": [\n                  {\n                    \"text\": \"\\n\\nThis is indeed a test\",\n                    \"index\": 0,\n                    \"logprobs\": null,\n                    \"finish_reason\": \"length\"\n                  }\n                ],\n                \"usage\": {\n                  \"prompt_tokens\": 5,\n                  \"completion_tokens\": 7,\n                  \"total_tokens\": 12\n                }\n              }\n          - title: Streaming\n            request:\n              curl: |\n                curl https://api.openai.com/v1/completions \\\n                  -H \"Content-Type: application/json\" \\\n                  -H \"Authorization: Bearer $OPENAI_API_KEY\" \\\n                  -d '{\n                    \"model\": \"VAR_completion_model_id\",\n                    \"prompt\": \"Say this is a test\",\n                    \"max_tokens\": 7,\n                    \"temperature\": 0,\n                    \"stream\": true\n                  }'\n              python: |-\n                from openai import OpenAI\n\n                client = OpenAI(\n                    api_key=\"My API Key\",\n                )\n                completion = client.completions.create(\n                    model=\"string\",\n                    prompt=\"This is a test.\",\n                )\n                print(completion)\n              node.js: >-\n                import OpenAI from 'openai';\n\n\n                const client = new OpenAI({\n                  apiKey: 'My API Key',\n                });\n\n\n                const completion = await client.completions.create({ model: 'string', prompt: 'This is a\n                test.' });\n\n\n                console.log(completion);\n              go: |\n                package main\n\n                import (\n                  \"context\"\n                  \"fmt\"\n\n                  \"github.com/openai/openai-go\"\n                  \"github.com/openai/openai-go/option\"\n                )\n\n                func main() {\n                  client := openai.NewClient(\n                    option.WithAPIKey(\"My API Key\"),\n                  )\n                  completion, err := client.Completions.New(context.TODO(), openai.CompletionNewParams{\n                    Model: openai.CompletionNewParamsModelGPT3_5TurboInstruct,\n                    Prompt: openai.CompletionNewParamsPromptUnion{\n                      OfString: openai.String(\"This is a test.\"),\n                    },\n                  })\n                  if err != nil {\n                    panic(err.Error())\n                  }\n                  fmt.Printf(\"%+v\\n\", completion)\n                }\n              java: |-\n                package com.openai.example;\n\n                import com.openai.client.OpenAIClient;\n                import com.openai.client.okhttp.OpenAIOkHttpClient;\n                import com.openai.models.completions.Completion;\n                import com.openai.models.completions.CompletionCreateParams;\n\n                public final class Main {\n                    private Main() {}\n\n                    public static void main(String[] args) {\n                        OpenAIClient client = OpenAIOkHttpClient.fromEnv();\n\n                        CompletionCreateParams params = CompletionCreateParams.builder()\n                            .model(CompletionCreateParams.Model.GPT_3_5_TURBO_INSTRUCT)\n                            .prompt(\"This is a test.\")\n                            .build();\n                        Completion completion = client.completions().create(params);\n                    }\n                }\n              ruby: >-\n                require \"openai\"\n\n\n                openai = OpenAI::Client.new(api_key: \"My API Key\")\n\n\n                completion = openai.completions.create(model: :\"gpt-3.5-turbo-instruct\", prompt: \"This is a\n                test.\")\n\n\n                puts(completion)\n            response: |\n              {\n                \"id\": \"cmpl-7iA7iJjj8V2zOkCGvWF2hAkDWBQZe\",\n                \"object\": \"text_completion\",\n                \"created\": 1690759702,\n                \"choices\": [\n                  {\n                    \"text\": \"This\",\n                    \"index\": 0,\n                    \"logprobs\": null,\n                    \"finish_reason\": null\n                  }\n                ],\n                \"model\": \"gpt-3.5-turbo-instruct\"\n                \"system_fingerprint\": \"fp_44709d6fcb\",\n              }\n      description: Creates a completion for the provided prompt and parameters.\n  /containers:\n    get:\n      summary: List containers\n      description: List Containers\n      operationId: ListContainers\n      parameters:\n        - name: limit\n          in: query\n          description: >\n            A limit on the number of objects to be returned. Limit can range between 1 and 100, and the\n            default is 20.\n          required: false\n          schema:\n            type: integer\n            default: 20\n        - name: order\n          in: query\n          description: >\n            Sort order by the `created_at` timestamp of the objects. `asc` for ascending order and `desc` for\n            descending order.\n          schema:\n            type: string\n            default: desc\n            enum:\n              - asc\n              - desc\n        - name: after\n          in: query\n          description: >\n            A cursor for use in pagination. `after` is an object ID that defines your place in the list. For\n            instance, if you make a list request and receive 100 objects, ending with obj_foo, your subsequent\n            call can include after=obj_foo in order to fetch the next page of the list.\n          schema:\n            type: string\n      responses:\n        '200':\n          description: Success\n          content:\n            application/json:\n              schema:\n                $ref: '#/components/schemas/ContainerListResource'\n      x-oaiMeta:\n        name: List containers\n        group: containers\n        returns: a list of [container](https://platform.openai.com/docs/api-reference/containers/object) objects.\n        path: get\n        examples:\n          response: |\n            {\n              \"object\": \"list\",\n              \"data\": [\n                {\n                    \"id\": \"cntr_682dfebaacac8198bbfe9c2474fb6f4a085685cbe3cb5863\",\n                    \"object\": \"container\",\n                    \"created_at\": 1747844794,\n                    \"status\": \"running\",\n                    \"expires_after\": {\n                        \"anchor\": \"last_active_at\",\n                        \"minutes\": 20\n                    },\n                    \"last_active_at\": 1747844794,\n                    \"name\": \"My Container\"\n                }\n              ],\n              \"first_id\": \"container_123\",\n              \"last_id\": \"container_123\",\n              \"has_more\": false\n            }\n          request:\n            curl: |\n              curl https://api.openai.com/v1/containers \\\n                -H \"Authorization: Bearer $OPENAI_API_KEY\"\n            node.js: |-\n              import OpenAI from 'openai';\n\n              const client = new OpenAI({\n                apiKey: 'My API Key',\n              });\n\n              // Automatically fetches more pages as needed.\n              for await (const containerListResponse of client.containers.list()) {\n                console.log(containerListResponse.id);\n              }\n            python: |-\n              from openai import OpenAI\n\n              client = OpenAI(\n                  api_key=\"My API Key\",\n              )\n              page = client.containers.list()\n              page = page.data[0]\n              print(page.id)\n            go: |\n              package main\n\n              import (\n                \"context\"\n                \"fmt\"\n\n                \"github.com/openai/openai-go\"\n                \"github.com/openai/openai-go/option\"\n              )\n\n              func main() {\n                client := openai.NewClient(\n                  option.WithAPIKey(\"My API Key\"),\n                )\n                page, err := client.Containers.List(context.TODO(), openai.ContainerListParams{\n\n                })\n                if err != nil {\n                  panic(err.Error())\n                }\n                fmt.Printf(\"%+v\\n\", page)\n              }\n            java: |-\n              package com.openai.example;\n\n              import com.openai.client.OpenAIClient;\n              import com.openai.client.okhttp.OpenAIOkHttpClient;\n              import com.openai.models.containers.ContainerListPage;\n              import com.openai.models.containers.ContainerListParams;\n\n              public final class Main {\n                  private Main() {}\n\n                  public static void main(String[] args) {\n                      OpenAIClient client = OpenAIOkHttpClient.fromEnv();\n\n                      ContainerListPage page = client.containers().list();\n                  }\n              }\n            ruby: |-\n              require \"openai\"\n\n              openai = OpenAI::Client.new(api_key: \"My API Key\")\n\n              page = openai.containers.list\n\n              puts(page)\n    post:\n      summary: Create container\n      description: Create Container\n      operationId: CreateContainer\n      parameters: []\n      requestBody:\n        content:\n          application/json:\n            schema:\n              $ref: '#/components/schemas/CreateContainerBody'\n      responses:\n        '200':\n          description: Success\n          content:\n            application/json:\n              schema:\n                $ref: '#/components/schemas/ContainerResource'\n      x-oaiMeta:\n        name: Create container\n        group: containers\n        returns: The created [container](https://platform.openai.com/docs/api-reference/containers/object) object.\n        path: post\n        examples:\n          response: |\n            {\n                \"id\": \"cntr_682e30645a488191b6363a0cbefc0f0a025ec61b66250591\",\n                \"object\": \"container\",\n                \"created_at\": 1747857508,\n                \"status\": \"running\",\n                \"expires_after\": {\n                    \"anchor\": \"last_active_at\",\n                    \"minutes\": 20\n                },\n                \"last_active_at\": 1747857508,\n                \"name\": \"My Container\"\n            }\n          request:\n            curl: |\n              curl https://api.openai.com/v1/containers \\\n                -H \"Authorization: Bearer $OPENAI_API_KEY\" \\\n                -H \"Content-Type: application/json\" \\\n                -d '{\n                      \"name\": \"My Container\"\n                    }'\n            node.js: |-\n              import OpenAI from 'openai';\n\n              const client = new OpenAI({\n                apiKey: 'My API Key',\n              });\n\n              const container = await client.containers.create({ name: 'name' });\n\n              console.log(container.id);\n            python: |-\n              from openai import OpenAI\n\n              client = OpenAI(\n                  api_key=\"My API Key\",\n              )\n              container = client.containers.create(\n                  name=\"name\",\n              )\n              print(container.id)\n            go: |\n              package main\n\n              import (\n                \"context\"\n                \"fmt\"\n\n                \"github.com/openai/openai-go\"\n                \"github.com/openai/openai-go/option\"\n              )\n\n              func main() {\n                client := openai.NewClient(\n                  option.WithAPIKey(\"My API Key\"),\n                )\n                container, err := client.Containers.New(context.TODO(), openai.ContainerNewParams{\n                  Name: \"name\",\n                })\n                if err != nil {\n                  panic(err.Error())\n                }\n                fmt.Printf(\"%+v\\n\", container.ID)\n              }\n            java: |-\n              package com.openai.example;\n\n              import com.openai.client.OpenAIClient;\n              import com.openai.client.okhttp.OpenAIOkHttpClient;\n              import com.openai.models.containers.ContainerCreateParams;\n              import com.openai.models.containers.ContainerCreateResponse;\n\n              public final class Main {\n                  private Main() {}\n\n                  public static void main(String[] args) {\n                      OpenAIClient client = OpenAIOkHttpClient.fromEnv();\n\n                      ContainerCreateParams params = ContainerCreateParams.builder()\n                          .name(\"name\")\n                          .build();\n                      ContainerCreateResponse container = client.containers().create(params);\n                  }\n              }\n            ruby: |-\n              require \"openai\"\n\n              openai = OpenAI::Client.new(api_key: \"My API Key\")\n\n              container = openai.containers.create(name: \"name\")\n\n              puts(container)\n  /containers/{container_id}:\n    get:\n      summary: Retrieve container\n      description: Retrieve Container\n      operationId: RetrieveContainer\n      parameters:\n        - name: container_id\n          in: path\n          required: true\n          schema:\n            type: string\n      responses:\n        '200':\n          description: Success\n          content:\n            application/json:\n              schema:\n                $ref: '#/components/schemas/ContainerResource'\n      x-oaiMeta:\n        name: Retrieve container\n        group: containers\n        returns: The [container](https://platform.openai.com/docs/api-reference/containers/object) object.\n        path: get\n        examples:\n          response: |\n            {\n                \"id\": \"cntr_682dfebaacac8198bbfe9c2474fb6f4a085685cbe3cb5863\",\n                \"object\": \"container\",\n                \"created_at\": 1747844794,\n                \"status\": \"running\",\n                \"expires_after\": {\n                    \"anchor\": \"last_active_at\",\n                    \"minutes\": 20\n                },\n                \"last_active_at\": 1747844794,\n                \"name\": \"My Container\"\n            }\n          request:\n            curl: >\n              curl https://api.openai.com/v1/containers/cntr_682dfebaacac8198bbfe9c2474fb6f4a085685cbe3cb5863\n              \\\n                -H \"Authorization: Bearer $OPENAI_API_KEY\"\n            node.js: |-\n              import OpenAI from 'openai';\n\n              const client = new OpenAI({\n                apiKey: 'My API Key',\n              });\n\n              const container = await client.containers.retrieve('container_id');\n\n              console.log(container.id);\n            python: |-\n              from openai import OpenAI\n\n              client = OpenAI(\n                  api_key=\"My API Key\",\n              )\n              container = client.containers.retrieve(\n                  \"container_id\",\n              )\n              print(container.id)\n            go: |\n              package main\n\n              import (\n                \"context\"\n                \"fmt\"\n\n                \"github.com/openai/openai-go\"\n                \"github.com/openai/openai-go/option\"\n              )\n\n              func main() {\n                client := openai.NewClient(\n                  option.WithAPIKey(\"My API Key\"),\n                )\n                container, err := client.Containers.Get(context.TODO(), \"container_id\")\n                if err != nil {\n                  panic(err.Error())\n                }\n                fmt.Printf(\"%+v\\n\", container.ID)\n              }\n            java: |-\n              package com.openai.example;\n\n              import com.openai.client.OpenAIClient;\n              import com.openai.client.okhttp.OpenAIOkHttpClient;\n              import com.openai.models.containers.ContainerRetrieveParams;\n              import com.openai.models.containers.ContainerRetrieveResponse;\n\n              public final class Main {\n                  private Main() {}\n\n                  public static void main(String[] args) {\n                      OpenAIClient client = OpenAIOkHttpClient.fromEnv();\n\n                      ContainerRetrieveResponse container = client.containers().retrieve(\"container_id\");\n                  }\n              }\n            ruby: |-\n              require \"openai\"\n\n              openai = OpenAI::Client.new(api_key: \"My API Key\")\n\n              container = openai.containers.retrieve(\"container_id\")\n\n              puts(container)\n    delete:\n      operationId: DeleteContainer\n      summary: Delete a container\n      description: Delete Container\n      parameters:\n        - name: container_id\n          in: path\n          description: The ID of the container to delete.\n          required: true\n          schema:\n            type: string\n      responses:\n        '200':\n          description: OK\n      x-oaiMeta:\n        name: Delete a container\n        group: containers\n        returns: Deletion Status\n        path: delete\n        examples:\n          response: |\n            {\n                \"id\": \"cntr_682dfebaacac8198bbfe9c2474fb6f4a085685cbe3cb5863\",\n                \"object\": \"container.deleted\",\n                \"deleted\": true\n            }\n          request:\n            curl: >\n              curl -X DELETE\n              https://api.openai.com/v1/containers/cntr_682dfebaacac8198bbfe9c2474fb6f4a085685cbe3cb5863 \\\n                -H \"Authorization: Bearer $OPENAI_API_KEY\"\n            node.js: |-\n              import OpenAI from 'openai';\n\n              const client = new OpenAI({\n                apiKey: 'My API Key',\n              });\n\n              await client.containers.delete('container_id');\n            python: |-\n              from openai import OpenAI\n\n              client = OpenAI(\n                  api_key=\"My API Key\",\n              )\n              client.containers.delete(\n                  \"container_id\",\n              )\n            go: |\n              package main\n\n              import (\n                \"context\"\n\n                \"github.com/openai/openai-go\"\n                \"github.com/openai/openai-go/option\"\n              )\n\n              func main() {\n                client := openai.NewClient(\n                  option.WithAPIKey(\"My API Key\"),\n                )\n                err := client.Containers.Delete(context.TODO(), \"container_id\")\n                if err != nil {\n                  panic(err.Error())\n                }\n              }\n            java: |-\n              package com.openai.example;\n\n              import com.openai.client.OpenAIClient;\n              import com.openai.client.okhttp.OpenAIOkHttpClient;\n              import com.openai.models.containers.ContainerDeleteParams;\n\n              public final class Main {\n                  private Main() {}\n\n                  public static void main(String[] args) {\n                      OpenAIClient client = OpenAIOkHttpClient.fromEnv();\n\n                      client.containers().delete(\"container_id\");\n                  }\n              }\n            ruby: |-\n              require \"openai\"\n\n              openai = OpenAI::Client.new(api_key: \"My API Key\")\n\n              result = openai.containers.delete(\"container_id\")\n\n              puts(result)\n  /containers/{container_id}/files:\n    post:\n      summary: Create container file\n      description: >\n        Create a Container File\n\n\n        You can send either a multipart/form-data request with the raw file content, or a JSON request with a\n        file ID.\n      operationId: CreateContainerFile\n      parameters:\n        - name: container_id\n          in: path\n          required: true\n          schema:\n            type: string\n      requestBody:\n        required: true\n        content:\n          multipart/form-data:\n            schema:\n              $ref: '#/components/schemas/CreateContainerFileBody'\n      responses:\n        '200':\n          description: Success\n          content:\n            application/json:\n              schema:\n                $ref: '#/components/schemas/ContainerFileResource'\n      x-oaiMeta:\n        name: Create container file\n        group: containers\n        returns: >-\n          The created [container file](https://platform.openai.com/docs/api-reference/container-files/object)\n          object.\n        path: post\n        examples:\n          response: |\n            {\n              \"id\": \"cfile_682e0e8a43c88191a7978f477a09bdf5\",\n              \"object\": \"container.file\",\n              \"created_at\": 1747848842,\n              \"bytes\": 880,\n              \"container_id\": \"cntr_682e0e7318108198aa783fd921ff305e08e78805b9fdbb04\",\n              \"path\": \"/mnt/data/88e12fa445d32636f190a0b33daed6cb-tsconfig.json\",\n              \"source\": \"user\"\n            }\n          request:\n            curl: >\n              curl\n              https://api.openai.com/v1/containers/cntr_682e0e7318108198aa783fd921ff305e08e78805b9fdbb04/files\n              \\\n                -H \"Authorization: Bearer $OPENAI_API_KEY\" \\\n                -F file=\"@example.txt\"\n            node.js: |-\n              import OpenAI from 'openai';\n\n              const client = new OpenAI({\n                apiKey: 'My API Key',\n              });\n\n              const file = await client.containers.files.create('container_id');\n\n              console.log(file.id);\n            python: |-\n              from openai import OpenAI\n\n              client = OpenAI(\n                  api_key=\"My API Key\",\n              )\n              file = client.containers.files.create(\n                  container_id=\"container_id\",\n              )\n              print(file.id)\n            go: |\n              package main\n\n              import (\n                \"context\"\n                \"fmt\"\n\n                \"github.com/openai/openai-go\"\n                \"github.com/openai/openai-go/option\"\n              )\n\n              func main() {\n                client := openai.NewClient(\n                  option.WithAPIKey(\"My API Key\"),\n                )\n                file, err := client.Containers.Files.New(\n                  context.TODO(),\n                  \"container_id\",\n                  openai.ContainerFileNewParams{\n\n                  },\n                )\n                if err != nil {\n                  panic(err.Error())\n                }\n                fmt.Printf(\"%+v\\n\", file.ID)\n              }\n            java: |-\n              package com.openai.example;\n\n              import com.openai.client.OpenAIClient;\n              import com.openai.client.okhttp.OpenAIOkHttpClient;\n              import com.openai.models.containers.files.FileCreateParams;\n              import com.openai.models.containers.files.FileCreateResponse;\n\n              public final class Main {\n                  private Main() {}\n\n                  public static void main(String[] args) {\n                      OpenAIClient client = OpenAIOkHttpClient.fromEnv();\n\n                      FileCreateResponse file = client.containers().files().create(\"container_id\");\n                  }\n              }\n            ruby: |-\n              require \"openai\"\n\n              openai = OpenAI::Client.new(api_key: \"My API Key\")\n\n              file = openai.containers.files.create(\"container_id\")\n\n              puts(file)\n    get:\n      summary: List container files\n      description: List Container files\n      operationId: ListContainerFiles\n      parameters:\n        - name: container_id\n          in: path\n          required: true\n          schema:\n            type: string\n        - name: limit\n          in: query\n          description: >\n            A limit on the number of objects to be returned. Limit can range between 1 and 100, and the\n            default is 20.\n          required: false\n          schema:\n            type: integer\n            default: 20\n        - name: order\n          in: query\n          description: >\n            Sort order by the `created_at` timestamp of the objects. `asc` for ascending order and `desc` for\n            descending order.\n          schema:\n            type: string\n            default: desc\n            enum:\n              - asc\n              - desc\n        - name: after\n          in: query\n          description: >\n            A cursor for use in pagination. `after` is an object ID that defines your place in the list. For\n            instance, if you make a list request and receive 100 objects, ending with obj_foo, your subsequent\n            call can include after=obj_foo in order to fetch the next page of the list.\n          schema:\n            type: string\n      responses:\n        '200':\n          description: Success\n          content:\n            application/json:\n              schema:\n                $ref: '#/components/schemas/ContainerFileListResource'\n      x-oaiMeta:\n        name: List container files\n        group: containers\n        returns: >-\n          a list of [container file](https://platform.openai.com/docs/api-reference/container-files/object)\n          objects.\n        path: get\n        examples:\n          response: |\n            {\n                \"object\": \"list\",\n                \"data\": [\n                    {\n                        \"id\": \"cfile_682e0e8a43c88191a7978f477a09bdf5\",\n                        \"object\": \"container.file\",\n                        \"created_at\": 1747848842,\n                        \"bytes\": 880,\n                        \"container_id\": \"cntr_682e0e7318108198aa783fd921ff305e08e78805b9fdbb04\",\n                        \"path\": \"/mnt/data/88e12fa445d32636f190a0b33daed6cb-tsconfig.json\",\n                        \"source\": \"user\"\n                    }\n                ],\n                \"first_id\": \"cfile_682e0e8a43c88191a7978f477a09bdf5\",\n                \"has_more\": false,\n                \"last_id\": \"cfile_682e0e8a43c88191a7978f477a09bdf5\"\n            }\n          request:\n            curl: >\n              curl\n              https://api.openai.com/v1/containers/cntr_682e0e7318108198aa783fd921ff305e08e78805b9fdbb04/files\n              \\\n                -H \"Authorization: Bearer $OPENAI_API_KEY\"\n            node.js: |-\n              import OpenAI from 'openai';\n\n              const client = new OpenAI({\n                apiKey: 'My API Key',\n              });\n\n              // Automatically fetches more pages as needed.\n              for await (const fileListResponse of client.containers.files.list('container_id')) {\n                console.log(fileListResponse.id);\n              }\n            python: |-\n              from openai import OpenAI\n\n              client = OpenAI(\n                  api_key=\"My API Key\",\n              )\n              page = client.containers.files.list(\n                  container_id=\"container_id\",\n              )\n              page = page.data[0]\n              print(page.id)\n            go: |\n              package main\n\n              import (\n                \"context\"\n                \"fmt\"\n\n                \"github.com/openai/openai-go\"\n                \"github.com/openai/openai-go/option\"\n              )\n\n              func main() {\n                client := openai.NewClient(\n                  option.WithAPIKey(\"My API Key\"),\n                )\n                page, err := client.Containers.Files.List(\n                  context.TODO(),\n                  \"container_id\",\n                  openai.ContainerFileListParams{\n\n                  },\n                )\n                if err != nil {\n                  panic(err.Error())\n                }\n                fmt.Printf(\"%+v\\n\", page)\n              }\n            java: |-\n              package com.openai.example;\n\n              import com.openai.client.OpenAIClient;\n              import com.openai.client.okhttp.OpenAIOkHttpClient;\n              import com.openai.models.containers.files.FileListPage;\n              import com.openai.models.containers.files.FileListParams;\n\n              public final class Main {\n                  private Main() {}\n\n                  public static void main(String[] args) {\n                      OpenAIClient client = OpenAIOkHttpClient.fromEnv();\n\n                      FileListPage page = client.containers().files().list(\"container_id\");\n                  }\n              }\n            ruby: |-\n              require \"openai\"\n\n              openai = OpenAI::Client.new(api_key: \"My API Key\")\n\n              page = openai.containers.files.list(\"container_id\")\n\n              puts(page)\n  /containers/{container_id}/files/{file_id}:\n    get:\n      summary: Retrieve container file\n      description: Retrieve Container File\n      operationId: RetrieveContainerFile\n      parameters:\n        - name: container_id\n          in: path\n          required: true\n          schema:\n            type: string\n        - name: file_id\n          in: path\n          required: true\n          schema:\n            type: string\n      responses:\n        '200':\n          description: Success\n          content:\n            application/json:\n              schema:\n                $ref: '#/components/schemas/ContainerFileResource'\n      x-oaiMeta:\n        name: Retrieve container file\n        group: containers\n        returns: The [container file](https://platform.openai.com/docs/api-reference/container-files/object) object.\n        path: get\n        examples:\n          response: |\n            {\n                \"id\": \"cfile_682e0e8a43c88191a7978f477a09bdf5\",\n                \"object\": \"container.file\",\n                \"created_at\": 1747848842,\n                \"bytes\": 880,\n                \"container_id\": \"cntr_682e0e7318108198aa783fd921ff305e08e78805b9fdbb04\",\n                \"path\": \"/mnt/data/88e12fa445d32636f190a0b33daed6cb-tsconfig.json\",\n                \"source\": \"user\"\n            }\n          request:\n            curl: |\n              curl https://api.openai.com/v1/containers/container_123/files/file_456 \\\n                -H \"Authorization: Bearer $OPENAI_API_KEY\"\n            node.js: >-\n              import OpenAI from 'openai';\n\n\n              const client = new OpenAI({\n                apiKey: 'My API Key',\n              });\n\n\n              const file = await client.containers.files.retrieve('file_id', { container_id: 'container_id'\n              });\n\n\n              console.log(file.id);\n            python: |-\n              from openai import OpenAI\n\n              client = OpenAI(\n                  api_key=\"My API Key\",\n              )\n              file = client.containers.files.retrieve(\n                  file_id=\"file_id\",\n                  container_id=\"container_id\",\n              )\n              print(file.id)\n            go: |\n              package main\n\n              import (\n                \"context\"\n                \"fmt\"\n\n                \"github.com/openai/openai-go\"\n                \"github.com/openai/openai-go/option\"\n              )\n\n              func main() {\n                client := openai.NewClient(\n                  option.WithAPIKey(\"My API Key\"),\n                )\n                file, err := client.Containers.Files.Get(\n                  context.TODO(),\n                  \"container_id\",\n                  \"file_id\",\n                )\n                if err != nil {\n                  panic(err.Error())\n                }\n                fmt.Printf(\"%+v\\n\", file.ID)\n              }\n            java: |-\n              package com.openai.example;\n\n              import com.openai.client.OpenAIClient;\n              import com.openai.client.okhttp.OpenAIOkHttpClient;\n              import com.openai.models.containers.files.FileRetrieveParams;\n              import com.openai.models.containers.files.FileRetrieveResponse;\n\n              public final class Main {\n                  private Main() {}\n\n                  public static void main(String[] args) {\n                      OpenAIClient client = OpenAIOkHttpClient.fromEnv();\n\n                      FileRetrieveParams params = FileRetrieveParams.builder()\n                          .containerId(\"container_id\")\n                          .fileId(\"file_id\")\n                          .build();\n                      FileRetrieveResponse file = client.containers().files().retrieve(params);\n                  }\n              }\n            ruby: |-\n              require \"openai\"\n\n              openai = OpenAI::Client.new(api_key: \"My API Key\")\n\n              file = openai.containers.files.retrieve(\"file_id\", container_id: \"container_id\")\n\n              puts(file)\n    delete:\n      operationId: DeleteContainerFile\n      summary: Delete a container file\n      description: Delete Container File\n      parameters:\n        - name: container_id\n          in: path\n          required: true\n          schema:\n            type: string\n        - name: file_id\n          in: path\n          required: true\n          schema:\n            type: string\n      responses:\n        '200':\n          description: OK\n      x-oaiMeta:\n        name: Delete a container file\n        group: containers\n        returns: Deletion Status\n        path: delete\n        examples:\n          response: |\n            {\n                \"id\": \"cfile_682e0e8a43c88191a7978f477a09bdf5\",\n                \"object\": \"container.file.deleted\",\n                \"deleted\": true\n            }\n          request:\n            curl: >\n              curl -X DELETE\n              https://api.openai.com/v1/containers/cntr_682dfebaacac8198bbfe9c2474fb6f4a085685cbe3cb5863/files/cfile_682e0e8a43c88191a7978f477a09bdf5\n              \\\n                -H \"Authorization: Bearer $OPENAI_API_KEY\"\n            node.js: |-\n              import OpenAI from 'openai';\n\n              const client = new OpenAI({\n                apiKey: 'My API Key',\n              });\n\n              await client.containers.files.delete('file_id', { container_id: 'container_id' });\n            python: |-\n              from openai import OpenAI\n\n              client = OpenAI(\n                  api_key=\"My API Key\",\n              )\n              client.containers.files.delete(\n                  file_id=\"file_id\",\n                  container_id=\"container_id\",\n              )\n            go: |\n              package main\n\n              import (\n                \"context\"\n\n                \"github.com/openai/openai-go\"\n                \"github.com/openai/openai-go/option\"\n              )\n\n              func main() {\n                client := openai.NewClient(\n                  option.WithAPIKey(\"My API Key\"),\n                )\n                err := client.Containers.Files.Delete(\n                  context.TODO(),\n                  \"container_id\",\n                  \"file_id\",\n                )\n                if err != nil {\n                  panic(err.Error())\n                }\n              }\n            java: |-\n              package com.openai.example;\n\n              import com.openai.client.OpenAIClient;\n              import com.openai.client.okhttp.OpenAIOkHttpClient;\n              import com.openai.models.containers.files.FileDeleteParams;\n\n              public final class Main {\n                  private Main() {}\n\n                  public static void main(String[] args) {\n                      OpenAIClient client = OpenAIOkHttpClient.fromEnv();\n\n                      FileDeleteParams params = FileDeleteParams.builder()\n                          .containerId(\"container_id\")\n                          .fileId(\"file_id\")\n                          .build();\n                      client.containers().files().delete(params);\n                  }\n              }\n            ruby: |-\n              require \"openai\"\n\n              openai = OpenAI::Client.new(api_key: \"My API Key\")\n\n              result = openai.containers.files.delete(\"file_id\", container_id: \"container_id\")\n\n              puts(result)\n  /containers/{container_id}/files/{file_id}/content:\n    get:\n      summary: Retrieve container file content\n      description: Retrieve Container File Content\n      operationId: RetrieveContainerFileContent\n      parameters:\n        - name: container_id\n          in: path\n          required: true\n          schema:\n            type: string\n        - name: file_id\n          in: path\n          required: true\n          schema:\n            type: string\n      responses:\n        '200':\n          description: Success\n      x-oaiMeta:\n        name: Retrieve container file content\n        group: containers\n        returns: The contents of the container file.\n        path: get\n        examples:\n          response: |\n            <binary content of the file>\n          request:\n            curl: |\n              curl https://api.openai.com/v1/containers/container_123/files/cfile_456/content \\\n                -H \"Authorization: Bearer $OPENAI_API_KEY\"\n            node.js: >-\n              import OpenAI from 'openai';\n\n\n              const client = new OpenAI({\n                apiKey: 'My API Key',\n              });\n\n\n              const content = await client.containers.files.content.retrieve('file_id', { container_id:\n              'container_id' });\n\n\n              console.log(content);\n\n\n              const data = await content.blob();\n\n              console.log(data);\n            python: |-\n              from openai import OpenAI\n\n              client = OpenAI(\n                  api_key=\"My API Key\",\n              )\n              content = client.containers.files.content.retrieve(\n                  file_id=\"file_id\",\n                  container_id=\"container_id\",\n              )\n              print(content)\n              data = content.read()\n              print(data)\n            go: |\n              package main\n\n              import (\n                \"context\"\n                \"fmt\"\n\n                \"github.com/openai/openai-go\"\n                \"github.com/openai/openai-go/option\"\n              )\n\n              func main() {\n                client := openai.NewClient(\n                  option.WithAPIKey(\"My API Key\"),\n                )\n                content, err := client.Containers.Files.Content.Get(\n                  context.TODO(),\n                  \"container_id\",\n                  \"file_id\",\n                )\n                if err != nil {\n                  panic(err.Error())\n                }\n                fmt.Printf(\"%+v\\n\", content)\n              }\n            java: |-\n              package com.openai.example;\n\n              import com.openai.client.OpenAIClient;\n              import com.openai.client.okhttp.OpenAIOkHttpClient;\n              import com.openai.core.http.HttpResponse;\n              import com.openai.models.containers.files.content.ContentRetrieveParams;\n\n              public final class Main {\n                  private Main() {}\n\n                  public static void main(String[] args) {\n                      OpenAIClient client = OpenAIOkHttpClient.fromEnv();\n\n                      ContentRetrieveParams params = ContentRetrieveParams.builder()\n                          .containerId(\"container_id\")\n                          .fileId(\"file_id\")\n                          .build();\n                      HttpResponse content = client.containers().files().content().retrieve(params);\n                  }\n              }\n            ruby: |-\n              require \"openai\"\n\n              openai = OpenAI::Client.new(api_key: \"My API Key\")\n\n              content = openai.containers.files.content.retrieve(\"file_id\", container_id: \"container_id\")\n\n              puts(content)\n  /embeddings:\n    post:\n      operationId: createEmbedding\n      tags:\n        - Embeddings\n      summary: Create embeddings\n      requestBody:\n        required: true\n        content:\n          application/json:\n            schema:\n              $ref: '#/components/schemas/CreateEmbeddingRequest'\n      responses:\n        '200':\n          description: OK\n          content:\n            application/json:\n              schema:\n                $ref: '#/components/schemas/CreateEmbeddingResponse'\n      x-oaiMeta:\n        name: Create embeddings\n        group: embeddings\n        returns: A list of [embedding](https://platform.openai.com/docs/api-reference/embeddings/object) objects.\n        examples:\n          response: |\n            {\n              \"object\": \"list\",\n              \"data\": [\n                {\n                  \"object\": \"embedding\",\n                  \"embedding\": [\n                    0.0023064255,\n                    -0.009327292,\n                    .... (1536 floats total for ada-002)\n                    -0.0028842222,\n                  ],\n                  \"index\": 0\n                }\n              ],\n              \"model\": \"text-embedding-ada-002\",\n              \"usage\": {\n                \"prompt_tokens\": 8,\n                \"total_tokens\": 8\n              }\n            }\n          request:\n            curl: |\n              curl https://api.openai.com/v1/embeddings \\\n                -H \"Authorization: Bearer $OPENAI_API_KEY\" \\\n                -H \"Content-Type: application/json\" \\\n                -d '{\n                  \"input\": \"The food was delicious and the waiter...\",\n                  \"model\": \"text-embedding-ada-002\",\n                  \"encoding_format\": \"float\"\n                }'\n            python: |-\n              from openai import OpenAI\n\n              client = OpenAI(\n                  api_key=\"My API Key\",\n              )\n              create_embedding_response = client.embeddings.create(\n                  input=\"The quick brown fox jumped over the lazy dog\",\n                  model=\"text-embedding-3-small\",\n              )\n              print(create_embedding_response.data)\n            node.js: |-\n              import OpenAI from 'openai';\n\n              const client = new OpenAI({\n                apiKey: 'My API Key',\n              });\n\n              const createEmbeddingResponse = await client.embeddings.create({\n                input: 'The quick brown fox jumped over the lazy dog',\n                model: 'text-embedding-3-small',\n              });\n\n              console.log(createEmbeddingResponse.data);\n            csharp: >\n              using System;\n\n\n              using OpenAI.Embeddings;\n\n\n              EmbeddingClient client = new(\n                  model: \"text-embedding-3-small\",\n                  apiKey: Environment.GetEnvironmentVariable(\"OPENAI_API_KEY\")\n              );\n\n\n              OpenAIEmbedding embedding = client.GenerateEmbedding(input: \"The quick brown fox jumped over the\n              lazy dog\");\n\n              ReadOnlyMemory<float> vector = embedding.ToFloats();\n\n\n              for (int i = 0; i < vector.Length; i++)\n\n              {\n                  Console.WriteLine($\"  [{i,4}] = {vector.Span[i]}\");\n              }\n            go: |\n              package main\n\n              import (\n                \"context\"\n                \"fmt\"\n\n                \"github.com/openai/openai-go\"\n                \"github.com/openai/openai-go/option\"\n              )\n\n              func main() {\n                client := openai.NewClient(\n                  option.WithAPIKey(\"My API Key\"),\n                )\n                createEmbeddingResponse, err := client.Embeddings.New(context.TODO(), openai.EmbeddingNewParams{\n                  Input: openai.EmbeddingNewParamsInputUnion{\n                    OfString: openai.String(\"The quick brown fox jumped over the lazy dog\"),\n                  },\n                  Model: openai.EmbeddingModelTextEmbeddingAda002,\n                })\n                if err != nil {\n                  panic(err.Error())\n                }\n                fmt.Printf(\"%+v\\n\", createEmbeddingResponse.Data)\n              }\n            java: |-\n              package com.openai.example;\n\n              import com.openai.client.OpenAIClient;\n              import com.openai.client.okhttp.OpenAIOkHttpClient;\n              import com.openai.models.embeddings.CreateEmbeddingResponse;\n              import com.openai.models.embeddings.EmbeddingCreateParams;\n              import com.openai.models.embeddings.EmbeddingModel;\n\n              public final class Main {\n                  private Main() {}\n\n                  public static void main(String[] args) {\n                      OpenAIClient client = OpenAIOkHttpClient.fromEnv();\n\n                      EmbeddingCreateParams params = EmbeddingCreateParams.builder()\n                          .input(\"The quick brown fox jumped over the lazy dog\")\n                          .model(EmbeddingModel.TEXT_EMBEDDING_ADA_002)\n                          .build();\n                      CreateEmbeddingResponse createEmbeddingResponse = client.embeddings().create(params);\n                  }\n              }\n            ruby: |-\n              require \"openai\"\n\n              openai = OpenAI::Client.new(api_key: \"My API Key\")\n\n              create_embedding_response = openai.embeddings.create(\n                input: \"The quick brown fox jumped over the lazy dog\",\n                model: :\"text-embedding-ada-002\"\n              )\n\n              puts(create_embedding_response)\n      description: Creates an embedding vector representing the input text.\n  /evals:\n    get:\n      operationId: listEvals\n      tags:\n        - Evals\n      summary: List evals\n      parameters:\n        - name: after\n          in: query\n          description: Identifier for the last eval from the previous pagination request.\n          required: false\n          schema:\n            type: string\n        - name: limit\n          in: query\n          description: Number of evals to retrieve.\n          required: false\n          schema:\n            type: integer\n            default: 20\n        - name: order\n          in: query\n          description: Sort order for evals by timestamp. Use `asc` for ascending order or `desc` for descending order.\n          required: false\n          schema:\n            type: string\n            enum:\n              - asc\n              - desc\n            default: asc\n        - name: order_by\n          in: query\n          description: |\n            Evals can be ordered by creation time or last updated time. Use\n            `created_at` for creation time or `updated_at` for last updated time.\n          required: false\n          schema:\n            type: string\n            enum:\n              - created_at\n              - updated_at\n            default: created_at\n      responses:\n        '200':\n          description: A list of evals\n          content:\n            application/json:\n              schema:\n                $ref: '#/components/schemas/EvalList'\n      x-oaiMeta:\n        name: List evals\n        group: evals\n        returns: >-\n          A list of [evals](https://platform.openai.com/docs/api-reference/evals/object) matching the\n          specified filters.\n        path: list\n        examples:\n          response: |\n            {\n              \"object\": \"list\",\n              \"data\": [\n                {\n                  \"id\": \"eval_67abd54d9b0081909a86353f6fb9317a\",\n                  \"object\": \"eval\",\n                  \"data_source_config\": {\n                    \"type\": \"stored_completions\",\n                    \"metadata\": {\n                      \"usecase\": \"push_notifications_summarizer\"\n                    },\n                    \"schema\": {\n                      \"type\": \"object\",\n                      \"properties\": {\n                        \"item\": {\n                          \"type\": \"object\"\n                        },\n                        \"sample\": {\n                          \"type\": \"object\"\n                        }\n                      },\n                      \"required\": [\n                        \"item\",\n                        \"sample\"\n                      ]\n                    }\n                  },\n                  \"testing_criteria\": [\n                    {\n                      \"name\": \"Push Notification Summary Grader\",\n                      \"id\": \"Push Notification Summary Grader-9b876f24-4762-4be9-aff4-db7a9b31c673\",\n                      \"type\": \"label_model\",\n                      \"model\": \"o3-mini\",\n                      \"input\": [\n                        {\n                          \"type\": \"message\",\n                          \"role\": \"developer\",\n                          \"content\": {\n                            \"type\": \"input_text\",\n                            \"text\": \"\\nLabel the following push notification summary as either correct or incorrect.\\nThe push notification and the summary will be provided below.\\nA good push notificiation summary is concise and snappy.\\nIf it is good, then label it as correct, if not, then incorrect.\\n\"\n                          }\n                        },\n                        {\n                          \"type\": \"message\",\n                          \"role\": \"user\",\n                          \"content\": {\n                            \"type\": \"input_text\",\n                            \"text\": \"\\nPush notifications: {{item.input}}\\nSummary: {{sample.output_text}}\\n\"\n                          }\n                        }\n                      ],\n                      \"passing_labels\": [\n                        \"correct\"\n                      ],\n                      \"labels\": [\n                        \"correct\",\n                        \"incorrect\"\n                      ],\n                      \"sampling_params\": null\n                    }\n                  ],\n                  \"name\": \"Push Notification Summary Grader\",\n                  \"created_at\": 1739314509,\n                  \"metadata\": {\n                    \"description\": \"A stored completions eval for push notification summaries\"\n                  }\n                }\n              ],\n              \"first_id\": \"eval_67abd54d9b0081909a86353f6fb9317a\",\n              \"last_id\": \"eval_67aa884cf6688190b58f657d4441c8b7\",\n              \"has_more\": true\n            }\n          request:\n            curl: |\n              curl https://api.openai.com/v1/evals?limit=1 \\\n                -H \"Authorization: Bearer $OPENAI_API_KEY\" \\\n                -H \"Content-Type: application/json\"\n            python: |-\n              from openai import OpenAI\n\n              client = OpenAI(\n                  api_key=\"My API Key\",\n              )\n              page = client.evals.list()\n              page = page.data[0]\n              print(page.id)\n            node.js: |-\n              import OpenAI from 'openai';\n\n              const client = new OpenAI({\n                apiKey: 'My API Key',\n              });\n\n              // Automatically fetches more pages as needed.\n              for await (const evalListResponse of client.evals.list()) {\n                console.log(evalListResponse.id);\n              }\n            java: |-\n              package com.openai.example;\n\n              import com.openai.client.OpenAIClient;\n              import com.openai.client.okhttp.OpenAIOkHttpClient;\n              import com.openai.models.evals.EvalListPage;\n              import com.openai.models.evals.EvalListParams;\n\n              public final class Main {\n                  private Main() {}\n\n                  public static void main(String[] args) {\n                      OpenAIClient client = OpenAIOkHttpClient.fromEnv();\n\n                      EvalListPage page = client.evals().list();\n                  }\n              }\n            ruby: |-\n              require \"openai\"\n\n              openai = OpenAI::Client.new(api_key: \"My API Key\")\n\n              page = openai.evals.list\n\n              puts(page)\n      description: |\n        List evaluations for a project.\n    post:\n      operationId: createEval\n      tags:\n        - Evals\n      summary: Create eval\n      requestBody:\n        required: true\n        content:\n          application/json:\n            schema:\n              $ref: '#/components/schemas/CreateEvalRequest'\n      responses:\n        '201':\n          description: OK\n          content:\n            application/json:\n              schema:\n                $ref: '#/components/schemas/Eval'\n      x-oaiMeta:\n        name: Create eval\n        group: evals\n        returns: The created [Eval](https://platform.openai.com/docs/api-reference/evals/object) object.\n        path: post\n        examples:\n          response: |\n            {\n              \"object\": \"eval\",\n              \"id\": \"eval_67b7fa9a81a88190ab4aa417e397ea21\",\n              \"data_source_config\": {\n                \"type\": \"stored_completions\",\n                \"metadata\": {\n                  \"usecase\": \"chatbot\"\n                },\n                \"schema\": {\n                  \"type\": \"object\",\n                  \"properties\": {\n                    \"item\": {\n                      \"type\": \"object\"\n                    },\n                    \"sample\": {\n                      \"type\": \"object\"\n                    }\n                  },\n                  \"required\": [\n                    \"item\",\n                    \"sample\"\n                  ]\n              },\n              \"testing_criteria\": [\n                {\n                  \"name\": \"Example label grader\",\n                  \"type\": \"label_model\",\n                  \"model\": \"o3-mini\",\n                  \"input\": [\n                    {\n                      \"type\": \"message\",\n                      \"role\": \"developer\",\n                      \"content\": {\n                        \"type\": \"input_text\",\n                        \"text\": \"Classify the sentiment of the following statement as one of positive, neutral, or negative\"\n                      }\n                    },\n                    {\n                      \"type\": \"message\",\n                      \"role\": \"user\",\n                      \"content\": {\n                        \"type\": \"input_text\",\n                        \"text\": \"Statement: {{item.input}}\"\n                      }\n                    }\n                  ],\n                  \"passing_labels\": [\n                    \"positive\"\n                  ],\n                  \"labels\": [\n                    \"positive\",\n                    \"neutral\",\n                    \"negative\"\n                  ]\n                }\n              ],\n              \"name\": \"Sentiment\",\n              \"created_at\": 1740110490,\n              \"metadata\": {\n                \"description\": \"An eval for sentiment analysis\"\n              }\n            }\n          request:\n            curl: |\n              curl https://api.openai.com/v1/evals \\\n                -H \"Authorization: Bearer $OPENAI_API_KEY\" \\\n                -H \"Content-Type: application/json\" \\\n                -d '{\n                      \"name\": \"Sentiment\",\n                      \"data_source_config\": {\n                        \"type\": \"stored_completions\",\n                        \"metadata\": {\n                            \"usecase\": \"chatbot\"\n                        }\n                      },\n                      \"testing_criteria\": [\n                        {\n                          \"type\": \"label_model\",\n                          \"model\": \"o3-mini\",\n                          \"input\": [\n                            {\n                              \"role\": \"developer\",\n                              \"content\": \"Classify the sentiment of the following statement as one of 'positive', 'neutral', or 'negative'\"\n                            },\n                            {\n                              \"role\": \"user\",\n                              \"content\": \"Statement: {{item.input}}\"\n                            }\n                          ],\n                          \"passing_labels\": [\n                            \"positive\"\n                          ],\n                          \"labels\": [\n                            \"positive\",\n                            \"neutral\",\n                            \"negative\"\n                          ],\n                          \"name\": \"Example label grader\"\n                        }\n                      ]\n                    }'\n            python: |-\n              from openai import OpenAI\n\n              client = OpenAI(\n                  api_key=\"My API Key\",\n              )\n              eval = client.evals.create(\n                  data_source_config={\n                      \"item_schema\": {\n                          \"foo\": \"bar\"\n                      },\n                      \"type\": \"custom\",\n                  },\n                  testing_criteria=[{\n                      \"input\": [{\n                          \"content\": \"content\",\n                          \"role\": \"role\",\n                      }],\n                      \"labels\": [\"string\"],\n                      \"model\": \"model\",\n                      \"name\": \"name\",\n                      \"passing_labels\": [\"string\"],\n                      \"type\": \"label_model\",\n                  }],\n              )\n              print(eval.id)\n            node.js: |-\n              import OpenAI from 'openai';\n\n              const client = new OpenAI({\n                apiKey: 'My API Key',\n              });\n\n              const _eval = await client.evals.create({\n                data_source_config: { item_schema: { foo: 'bar' }, type: 'custom' },\n                testing_criteria: [\n                  {\n                    input: [{ content: 'content', role: 'role' }],\n                    labels: ['string'],\n                    model: 'model',\n                    name: 'name',\n                    passing_labels: ['string'],\n                    type: 'label_model',\n                  },\n                ],\n              });\n\n              console.log(_eval.id);\n            java: |-\n              package com.openai.example;\n\n              import com.openai.client.OpenAIClient;\n              import com.openai.client.okhttp.OpenAIOkHttpClient;\n              import com.openai.core.JsonValue;\n              import com.openai.models.evals.EvalCreateParams;\n              import com.openai.models.evals.EvalCreateResponse;\n\n              public final class Main {\n                  private Main() {}\n\n                  public static void main(String[] args) {\n                      OpenAIClient client = OpenAIOkHttpClient.fromEnv();\n\n                      EvalCreateParams params = EvalCreateParams.builder()\n                          .customDataSourceConfig(EvalCreateParams.DataSourceConfig.Custom.ItemSchema.builder()\n                              .putAdditionalProperty(\"foo\", JsonValue.from(\"bar\"))\n                              .build())\n                          .addTestingCriterion(EvalCreateParams.TestingCriterion.LabelModel.builder()\n                              .addInput(EvalCreateParams.TestingCriterion.LabelModel.Input.SimpleInputMessage.builder()\n                                  .content(\"content\")\n                                  .role(\"role\")\n                                  .build())\n                              .addLabel(\"string\")\n                              .model(\"model\")\n                              .name(\"name\")\n                              .addPassingLabel(\"string\")\n                              .build())\n                          .build();\n                      EvalCreateResponse eval = client.evals().create(params);\n                  }\n              }\n            ruby: |-\n              require \"openai\"\n\n              openai = OpenAI::Client.new(api_key: \"My API Key\")\n\n              eval_ = openai.evals.create(\n                data_source_config: {item_schema: {foo: \"bar\"}, type: :custom},\n                testing_criteria: [\n                  {\n                    input: [{content: \"content\", role: \"role\"}],\n                    labels: [\"string\"],\n                    model: \"model\",\n                    name: \"name\",\n                    passing_labels: [\"string\"],\n                    type: :label_model\n                  }\n                ]\n              )\n\n              puts(eval_)\n      description: >\n        Create the structure of an evaluation that can be used to test a model's performance.\n\n        An evaluation is a set of testing criteria and the config for a data source, which dictates the schema\n        of the data used in the evaluation. After creating an evaluation, you can run it on different models\n        and model parameters. We support several types of graders and datasources.\n\n        For more information, see the [Evals guide](https://platform.openai.com/docs/guides/evals).\n  /evals/{eval_id}:\n    get:\n      operationId: getEval\n      tags:\n        - Evals\n      summary: Get an eval\n      parameters:\n        - name: eval_id\n          in: path\n          required: true\n          schema:\n            type: string\n          description: The ID of the evaluation to retrieve.\n      responses:\n        '200':\n          description: The evaluation\n          content:\n            application/json:\n              schema:\n                $ref: '#/components/schemas/Eval'\n      x-oaiMeta:\n        name: Get an eval\n        group: evals\n        returns: >-\n          The [Eval](https://platform.openai.com/docs/api-reference/evals/object) object matching the\n          specified ID.\n        path: get\n        examples:\n          response: |\n            {\n              \"object\": \"eval\",\n              \"id\": \"eval_67abd54d9b0081909a86353f6fb9317a\",\n              \"data_source_config\": {\n                \"type\": \"custom\",\n                \"schema\": {\n                  \"type\": \"object\",\n                  \"properties\": {\n                    \"item\": {\n                      \"type\": \"object\",\n                      \"properties\": {\n                        \"input\": {\n                          \"type\": \"string\"\n                        },\n                        \"ground_truth\": {\n                          \"type\": \"string\"\n                        }\n                      },\n                      \"required\": [\n                        \"input\",\n                        \"ground_truth\"\n                      ]\n                    }\n                  },\n                  \"required\": [\n                    \"item\"\n                  ]\n                }\n              },\n              \"testing_criteria\": [\n                {\n                  \"name\": \"String check\",\n                  \"id\": \"String check-2eaf2d8d-d649-4335-8148-9535a7ca73c2\",\n                  \"type\": \"string_check\",\n                  \"input\": \"{{item.input}}\",\n                  \"reference\": \"{{item.ground_truth}}\",\n                  \"operation\": \"eq\"\n                }\n              ],\n              \"name\": \"External Data Eval\",\n              \"created_at\": 1739314509,\n              \"metadata\": {},\n            }\n          request:\n            curl: |\n              curl https://api.openai.com/v1/evals/eval_67abd54d9b0081909a86353f6fb9317a \\\n                -H \"Authorization: Bearer $OPENAI_API_KEY\" \\\n                -H \"Content-Type: application/json\"\n            python: |-\n              from openai import OpenAI\n\n              client = OpenAI(\n                  api_key=\"My API Key\",\n              )\n              eval = client.evals.retrieve(\n                  \"eval_id\",\n              )\n              print(eval.id)\n            node.js: |-\n              import OpenAI from 'openai';\n\n              const client = new OpenAI({\n                apiKey: 'My API Key',\n              });\n\n              const _eval = await client.evals.retrieve('eval_id');\n\n              console.log(_eval.id);\n            java: |-\n              package com.openai.example;\n\n              import com.openai.client.OpenAIClient;\n              import com.openai.client.okhttp.OpenAIOkHttpClient;\n              import com.openai.models.evals.EvalRetrieveParams;\n              import com.openai.models.evals.EvalRetrieveResponse;\n\n              public final class Main {\n                  private Main() {}\n\n                  public static void main(String[] args) {\n                      OpenAIClient client = OpenAIOkHttpClient.fromEnv();\n\n                      EvalRetrieveResponse eval = client.evals().retrieve(\"eval_id\");\n                  }\n              }\n            ruby: |-\n              require \"openai\"\n\n              openai = OpenAI::Client.new(api_key: \"My API Key\")\n\n              eval_ = openai.evals.retrieve(\"eval_id\")\n\n              puts(eval_)\n      description: |\n        Get an evaluation by ID.\n    post:\n      operationId: updateEval\n      tags:\n        - Evals\n      summary: Update an eval\n      parameters:\n        - name: eval_id\n          in: path\n          required: true\n          schema:\n            type: string\n          description: The ID of the evaluation to update.\n      requestBody:\n        description: Request to update an evaluation\n        required: true\n        content:\n          application/json:\n            schema:\n              type: object\n              properties:\n                name:\n                  type: string\n                  description: Rename the evaluation.\n                metadata:\n                  $ref: '#/components/schemas/Metadata'\n      responses:\n        '200':\n          description: The updated evaluation\n          content:\n            application/json:\n              schema:\n                $ref: '#/components/schemas/Eval'\n      x-oaiMeta:\n        name: Update an eval\n        group: evals\n        returns: >-\n          The [Eval](https://platform.openai.com/docs/api-reference/evals/object) object matching the updated\n          version.\n        path: update\n        examples:\n          response: |\n            {\n              \"object\": \"eval\",\n              \"id\": \"eval_67abd54d9b0081909a86353f6fb9317a\",\n              \"data_source_config\": {\n                \"type\": \"custom\",\n                \"schema\": {\n                  \"type\": \"object\",\n                  \"properties\": {\n                    \"item\": {\n                      \"type\": \"object\",\n                      \"properties\": {\n                        \"input\": {\n                          \"type\": \"string\"\n                        },\n                        \"ground_truth\": {\n                          \"type\": \"string\"\n                        }\n                      },\n                      \"required\": [\n                        \"input\",\n                        \"ground_truth\"\n                      ]\n                    }\n                  },\n                  \"required\": [\n                    \"item\"\n                  ]\n                }\n              },\n              \"testing_criteria\": [\n                {\n                  \"name\": \"String check\",\n                  \"id\": \"String check-2eaf2d8d-d649-4335-8148-9535a7ca73c2\",\n                  \"type\": \"string_check\",\n                  \"input\": \"{{item.input}}\",\n                  \"reference\": \"{{item.ground_truth}}\",\n                  \"operation\": \"eq\"\n                }\n              ],\n              \"name\": \"Updated Eval\",\n              \"created_at\": 1739314509,\n              \"metadata\": {\"description\": \"Updated description\"},\n            }\n          request:\n            curl: |\n              curl https://api.openai.com/v1/evals/eval_67abd54d9b0081909a86353f6fb9317a \\\n                -H \"Authorization: Bearer $OPENAI_API_KEY\" \\\n                -H \"Content-Type: application/json\" \\\n                -d '{\"name\": \"Updated Eval\", \"metadata\": {\"description\": \"Updated description\"}}'\n            python: |-\n              from openai import OpenAI\n\n              client = OpenAI(\n                  api_key=\"My API Key\",\n              )\n              eval = client.evals.update(\n                  eval_id=\"eval_id\",\n              )\n              print(eval.id)\n            node.js: |-\n              import OpenAI from 'openai';\n\n              const client = new OpenAI({\n                apiKey: 'My API Key',\n              });\n\n              const _eval = await client.evals.update('eval_id');\n\n              console.log(_eval.id);\n            java: |-\n              package com.openai.example;\n\n              import com.openai.client.OpenAIClient;\n              import com.openai.client.okhttp.OpenAIOkHttpClient;\n              import com.openai.models.evals.EvalUpdateParams;\n              import com.openai.models.evals.EvalUpdateResponse;\n\n              public final class Main {\n                  private Main() {}\n\n                  public static void main(String[] args) {\n                      OpenAIClient client = OpenAIOkHttpClient.fromEnv();\n\n                      EvalUpdateResponse eval = client.evals().update(\"eval_id\");\n                  }\n              }\n            ruby: |-\n              require \"openai\"\n\n              openai = OpenAI::Client.new(api_key: \"My API Key\")\n\n              eval_ = openai.evals.update(\"eval_id\")\n\n              puts(eval_)\n      description: |\n        Update certain properties of an evaluation.\n    delete:\n      operationId: deleteEval\n      tags:\n        - Evals\n      summary: Delete an eval\n      parameters:\n        - name: eval_id\n          in: path\n          required: true\n          schema:\n            type: string\n          description: The ID of the evaluation to delete.\n      responses:\n        '200':\n          description: Successfully deleted the evaluation.\n          content:\n            application/json:\n              schema:\n                type: object\n                properties:\n                  object:\n                    type: string\n                    example: eval.deleted\n                  deleted:\n                    type: boolean\n                    example: true\n                  eval_id:\n                    type: string\n                    example: eval_abc123\n                required:\n                  - object\n                  - deleted\n                  - eval_id\n        '404':\n          description: Evaluation not found.\n          content:\n            application/json:\n              schema:\n                $ref: '#/components/schemas/Error'\n      x-oaiMeta:\n        name: Delete an eval\n        group: evals\n        returns: A deletion confirmation object.\n        examples:\n          response: |\n            {\n              \"object\": \"eval.deleted\",\n              \"deleted\": true,\n              \"eval_id\": \"eval_abc123\"\n            }\n          request:\n            curl: |\n              curl https://api.openai.com/v1/evals/eval_abc123 \\\n                -X DELETE \\\n                -H \"Authorization: Bearer $OPENAI_API_KEY\"\n            python: |-\n              from openai import OpenAI\n\n              client = OpenAI(\n                  api_key=\"My API Key\",\n              )\n              eval = client.evals.delete(\n                  \"eval_id\",\n              )\n              print(eval.eval_id)\n            node.js: |-\n              import OpenAI from 'openai';\n\n              const client = new OpenAI({\n                apiKey: 'My API Key',\n              });\n\n              const _eval = await client.evals.delete('eval_id');\n\n              console.log(_eval.eval_id);\n            java: |-\n              package com.openai.example;\n\n              import com.openai.client.OpenAIClient;\n              import com.openai.client.okhttp.OpenAIOkHttpClient;\n              import com.openai.models.evals.EvalDeleteParams;\n              import com.openai.models.evals.EvalDeleteResponse;\n\n              public final class Main {\n                  private Main() {}\n\n                  public static void main(String[] args) {\n                      OpenAIClient client = OpenAIOkHttpClient.fromEnv();\n\n                      EvalDeleteResponse eval = client.evals().delete(\"eval_id\");\n                  }\n              }\n            ruby: |-\n              require \"openai\"\n\n              openai = OpenAI::Client.new(api_key: \"My API Key\")\n\n              eval_ = openai.evals.delete(\"eval_id\")\n\n              puts(eval_)\n      description: |\n        Delete an evaluation.\n  /evals/{eval_id}/runs:\n    get:\n      operationId: getEvalRuns\n      tags:\n        - Evals\n      summary: Get eval runs\n      parameters:\n        - name: eval_id\n          in: path\n          required: true\n          schema:\n            type: string\n          description: The ID of the evaluation to retrieve runs for.\n        - name: after\n          in: query\n          description: Identifier for the last run from the previous pagination request.\n          required: false\n          schema:\n            type: string\n        - name: limit\n          in: query\n          description: Number of runs to retrieve.\n          required: false\n          schema:\n            type: integer\n            default: 20\n        - name: order\n          in: query\n          description: >-\n            Sort order for runs by timestamp. Use `asc` for ascending order or `desc` for descending order.\n            Defaults to `asc`.\n          required: false\n          schema:\n            type: string\n            enum:\n              - asc\n              - desc\n            default: asc\n        - name: status\n          in: query\n          description: Filter runs by status. One of `queued` | `in_progress` | `failed` | `completed` | `canceled`.\n          required: false\n          schema:\n            type: string\n            enum:\n              - queued\n              - in_progress\n              - completed\n              - canceled\n              - failed\n      responses:\n        '200':\n          description: A list of runs for the evaluation\n          content:\n            application/json:\n              schema:\n                $ref: '#/components/schemas/EvalRunList'\n      x-oaiMeta:\n        name: Get eval runs\n        group: evals\n        returns: >-\n          A list of [EvalRun](https://platform.openai.com/docs/api-reference/evals/run-object) objects\n          matching the specified ID.\n        path: get-runs\n        examples:\n          response: |\n            {\n              \"object\": \"list\",\n              \"data\": [\n                {\n                  \"object\": \"eval.run\",\n                  \"id\": \"evalrun_67e0c7d31560819090d60c0780591042\",\n                  \"eval_id\": \"eval_67e0c726d560819083f19a957c4c640b\",\n                  \"report_url\": \"https://platform.openai.com/evaluations/eval_67e0c726d560819083f19a957c4c640b\",\n                  \"status\": \"completed\",\n                  \"model\": \"o3-mini\",\n                  \"name\": \"bulk_with_negative_examples_o3-mini\",\n                  \"created_at\": 1742784467,\n                  \"result_counts\": {\n                    \"total\": 1,\n                    \"errored\": 0,\n                    \"failed\": 0,\n                    \"passed\": 1\n                  },\n                  \"per_model_usage\": [\n                    {\n                      \"model_name\": \"o3-mini\",\n                      \"invocation_count\": 1,\n                      \"prompt_tokens\": 563,\n                      \"completion_tokens\": 874,\n                      \"total_tokens\": 1437,\n                      \"cached_tokens\": 0\n                    }\n                  ],\n                  \"per_testing_criteria_results\": [\n                    {\n                      \"testing_criteria\": \"Push Notification Summary Grader-1808cd0b-eeec-4e0b-a519-337e79f4f5d1\",\n                      \"passed\": 1,\n                      \"failed\": 0\n                    }\n                  ],\n                  \"data_source\": {\n                    \"type\": \"completions\",\n                    \"source\": {\n                      \"type\": \"file_content\",\n                      \"content\": [\n                        {\n                          \"item\": {\n                            \"notifications\": \"\\n- New message from Sarah: \\\"Can you call me later?\\\"\\n- Your package has been delivered!\\n- Flash sale: 20% off electronics for the next 2 hours!\\n\"\n                          }\n                        }\n                      ]\n                    },\n                    \"input_messages\": {\n                      \"type\": \"template\",\n                      \"template\": [\n                        {\n                          \"type\": \"message\",\n                          \"role\": \"developer\",\n                          \"content\": {\n                            \"type\": \"input_text\",\n                            \"text\": \"\\n\\n\\n\\nYou are a helpful assistant that takes in an array of push notifications and returns a collapsed summary of them.\\nThe push notification will be provided as follows:\\n<push_notifications>\\n...notificationlist...\\n</push_notifications>\\n\\nYou should return just the summary and nothing else.\\n\\n\\nYou should return a summary that is concise and snappy.\\n\\n\\nHere is an example of a good summary:\\n<push_notifications>\\n- Traffic alert: Accident reported on Main Street.- Package out for delivery: Expected by 5 PM.- New friend suggestion: Connect with Emma.\\n</push_notifications>\\n<summary>\\nTraffic alert, package expected by 5pm, suggestion for new friend (Emily).\\n</summary>\\n\\n\\nHere is an example of a bad summary:\\n<push_notifications>\\n- Traffic alert: Accident reported on Main Street.- Package out for delivery: Expected by 5 PM.- New friend suggestion: Connect with Emma.\\n</push_notifications>\\n<summary>\\nTraffic alert reported on main street. You have a package that will arrive by 5pm, Emily is a new friend suggested for you.\\n</summary>\\n\"\n                          }\n                        },\n                        {\n                          \"type\": \"message\",\n                          \"role\": \"user\",\n                          \"content\": {\n                            \"type\": \"input_text\",\n                            \"text\": \"<push_notifications>{{item.notifications}}</push_notifications>\"\n                          }\n                        }\n                      ]\n                    },\n                    \"model\": \"o3-mini\",\n                    \"sampling_params\": null\n                  },\n                  \"error\": null,\n                  \"metadata\": {}\n                }\n              ],\n              \"first_id\": \"evalrun_67e0c7d31560819090d60c0780591042\",\n              \"last_id\": \"evalrun_67e0c7d31560819090d60c0780591042\",\n              \"has_more\": true\n            }\n          request:\n            curl: |\n              curl https://api.openai.com/v1/evals/egroup_67abd54d9b0081909a86353f6fb9317a/runs \\\n                -H \"Authorization: Bearer $OPENAI_API_KEY\" \\\n                -H \"Content-Type: application/json\"\n            python: |-\n              from openai import OpenAI\n\n              client = OpenAI(\n                  api_key=\"My API Key\",\n              )\n              page = client.evals.runs.list(\n                  eval_id=\"eval_id\",\n              )\n              page = page.data[0]\n              print(page.id)\n            node.js: |-\n              import OpenAI from 'openai';\n\n              const client = new OpenAI({\n                apiKey: 'My API Key',\n              });\n\n              // Automatically fetches more pages as needed.\n              for await (const runListResponse of client.evals.runs.list('eval_id')) {\n                console.log(runListResponse.id);\n              }\n            java: |-\n              package com.openai.example;\n\n              import com.openai.client.OpenAIClient;\n              import com.openai.client.okhttp.OpenAIOkHttpClient;\n              import com.openai.models.evals.runs.RunListPage;\n              import com.openai.models.evals.runs.RunListParams;\n\n              public final class Main {\n                  private Main() {}\n\n                  public static void main(String[] args) {\n                      OpenAIClient client = OpenAIOkHttpClient.fromEnv();\n\n                      RunListPage page = client.evals().runs().list(\"eval_id\");\n                  }\n              }\n            ruby: |-\n              require \"openai\"\n\n              openai = OpenAI::Client.new(api_key: \"My API Key\")\n\n              page = openai.evals.runs.list(\"eval_id\")\n\n              puts(page)\n      description: |\n        Get a list of runs for an evaluation.\n    post:\n      operationId: createEvalRun\n      tags:\n        - Evals\n      summary: Create eval run\n      parameters:\n        - in: path\n          name: eval_id\n          required: true\n          schema:\n            type: string\n          description: The ID of the evaluation to create a run for.\n      requestBody:\n        required: true\n        content:\n          application/json:\n            schema:\n              $ref: '#/components/schemas/CreateEvalRunRequest'\n      responses:\n        '201':\n          description: Successfully created a run for the evaluation\n          content:\n            application/json:\n              schema:\n                $ref: '#/components/schemas/EvalRun'\n        '400':\n          description: Bad request (for example, missing eval object)\n          content:\n            application/json:\n              schema:\n                $ref: '#/components/schemas/Error'\n      x-oaiMeta:\n        name: Create eval run\n        group: evals\n        returns: >-\n          The [EvalRun](https://platform.openai.com/docs/api-reference/evals/run-object) object matching the\n          specified ID.\n        examples:\n          response: |\n            {\n              \"object\": \"eval.run\",\n              \"id\": \"evalrun_67e57965b480819094274e3a32235e4c\",\n              \"eval_id\": \"eval_67e579652b548190aaa83ada4b125f47\",\n              \"report_url\": \"https://platform.openai.com/evaluations/eval_67e579652b548190aaa83ada4b125f47&run_id=evalrun_67e57965b480819094274e3a32235e4c\",\n              \"status\": \"queued\",\n              \"model\": \"gpt-4o-mini\",\n              \"name\": \"gpt-4o-mini\",\n              \"created_at\": 1743092069,\n              \"result_counts\": {\n                \"total\": 0,\n                \"errored\": 0,\n                \"failed\": 0,\n                \"passed\": 0\n              },\n              \"per_model_usage\": null,\n              \"per_testing_criteria_results\": null,\n              \"data_source\": {\n                \"type\": \"completions\",\n                \"source\": {\n                  \"type\": \"file_content\",\n                  \"content\": [\n                    {\n                      \"item\": {\n                        \"input\": \"Tech Company Launches Advanced Artificial Intelligence Platform\",\n                        \"ground_truth\": \"Technology\"\n                      }\n                    }\n                  ]\n                },\n                \"input_messages\": {\n                  \"type\": \"template\",\n                  \"template\": [\n                    {\n                      \"type\": \"message\",\n                      \"role\": \"developer\",\n                      \"content\": {\n                        \"type\": \"input_text\",\n                        \"text\": \"Categorize a given news headline into one of the following topics: Technology, Markets, World, Business, or Sports.\\n\\n# Steps\\n\\n1. Analyze the content of the news headline to understand its primary focus.\\n2. Extract the subject matter, identifying any key indicators or keywords.\\n3. Use the identified indicators to determine the most suitable category out of the five options: Technology, Markets, World, Business, or Sports.\\n4. Ensure only one category is selected per headline.\\n\\n# Output Format\\n\\nRespond with the chosen category as a single word. For instance: \\\"Technology\\\", \\\"Markets\\\", \\\"World\\\", \\\"Business\\\", or \\\"Sports\\\".\\n\\n# Examples\\n\\n**Input**: \\\"Apple Unveils New iPhone Model, Featuring Advanced AI Features\\\"  \\n**Output**: \\\"Technology\\\"\\n\\n**Input**: \\\"Global Stocks Mixed as Investors Await Central Bank Decisions\\\"  \\n**Output**: \\\"Markets\\\"\\n\\n**Input**: \\\"War in Ukraine: Latest Updates on Negotiation Status\\\"  \\n**Output**: \\\"World\\\"\\n\\n**Input**: \\\"Microsoft in Talks to Acquire Gaming Company for $2 Billion\\\"  \\n**Output**: \\\"Business\\\"\\n\\n**Input**: \\\"Manchester United Secures Win in Premier League Football Match\\\"  \\n**Output**: \\\"Sports\\\" \\n\\n# Notes\\n\\n- If the headline appears to fit into more than one category, choose the most dominant theme.\\n- Keywords or phrases such as \\\"stocks\\\", \\\"company acquisition\\\", \\\"match\\\", or technological brands can be good indicators for classification.\\n\"\n                      }\n                    },\n                    {\n                      \"type\": \"message\",\n                      \"role\": \"user\",\n                      \"content\": {\n                        \"type\": \"input_text\",\n                        \"text\": \"{{item.input}}\"\n                      }\n                    }\n                  ]\n                },\n                \"model\": \"gpt-4o-mini\",\n                \"sampling_params\": {\n                  \"seed\": 42,\n                  \"temperature\": 1.0,\n                  \"top_p\": 1.0,\n                  \"max_completions_tokens\": 2048\n                }\n              },\n              \"error\": null,\n              \"metadata\": {}\n            }\n          request:\n            curl: |\n              curl https://api.openai.com/v1/evals/eval_67e579652b548190aaa83ada4b125f47/runs \\\n                -X POST \\\n                -H \"Authorization: Bearer $OPENAI_API_KEY\" \\\n                -H \"Content-Type: application/json\" \\\n                -d '{\"name\":\"gpt-4o-mini\",\"data_source\":{\"type\":\"completions\",\"input_messages\":{\"type\":\"template\",\"template\":[{\"role\":\"developer\",\"content\":\"Categorize a given news headline into one of the following topics: Technology, Markets, World, Business, or Sports.\\n\\n# Steps\\n\\n1. Analyze the content of the news headline to understand its primary focus.\\n2. Extract the subject matter, identifying any key indicators or keywords.\\n3. Use the identified indicators to determine the most suitable category out of the five options: Technology, Markets, World, Business, or Sports.\\n4. Ensure only one category is selected per headline.\\n\\n# Output Format\\n\\nRespond with the chosen category as a single word. For instance: \\\"Technology\\\", \\\"Markets\\\", \\\"World\\\", \\\"Business\\\", or \\\"Sports\\\".\\n\\n# Examples\\n\\n**Input**: \\\"Apple Unveils New iPhone Model, Featuring Advanced AI Features\\\"  \\n**Output**: \\\"Technology\\\"\\n\\n**Input**: \\\"Global Stocks Mixed as Investors Await Central Bank Decisions\\\"  \\n**Output**: \\\"Markets\\\"\\n\\n**Input**: \\\"War in Ukraine: Latest Updates on Negotiation Status\\\"  \\n**Output**: \\\"World\\\"\\n\\n**Input**: \\\"Microsoft in Talks to Acquire Gaming Company for $2 Billion\\\"  \\n**Output**: \\\"Business\\\"\\n\\n**Input**: \\\"Manchester United Secures Win in Premier League Football Match\\\"  \\n**Output**: \\\"Sports\\\" \\n\\n# Notes\\n\\n- If the headline appears to fit into more than one category, choose the most dominant theme.\\n- Keywords or phrases such as \\\"stocks\\\", \\\"company acquisition\\\", \\\"match\\\", or technological brands can be good indicators for classification.\\n\"} , {\"role\":\"user\",\"content\":\"{{item.input}}\"}]} ,\"sampling_params\":{\"temperature\":1,\"max_completions_tokens\":2048,\"top_p\":1,\"seed\":42},\"model\":\"gpt-4o-mini\",\"source\":{\"type\":\"file_content\",\"content\":[{\"item\":{\"input\":\"Tech Company Launches Advanced Artificial Intelligence Platform\",\"ground_truth\":\"Technology\"}}]}}'\n            python: |-\n              from openai import OpenAI\n\n              client = OpenAI(\n                  api_key=\"My API Key\",\n              )\n              run = client.evals.runs.create(\n                  eval_id=\"eval_id\",\n                  data_source={\n                      \"source\": {\n                          \"content\": [{\n                              \"item\": {\n                                  \"foo\": \"bar\"\n                              }\n                          }],\n                          \"type\": \"file_content\",\n                      },\n                      \"type\": \"jsonl\",\n                  },\n              )\n              print(run.id)\n            node.js: |-\n              import OpenAI from 'openai';\n\n              const client = new OpenAI({\n                apiKey: 'My API Key',\n              });\n\n              const run = await client.evals.runs.create('eval_id', {\n                data_source: { source: { content: [{ item: { foo: 'bar' } }], type: 'file_content' }, type: 'jsonl' },\n              });\n\n              console.log(run.id);\n            java: |-\n              package com.openai.example;\n\n              import com.openai.client.OpenAIClient;\n              import com.openai.client.okhttp.OpenAIOkHttpClient;\n              import com.openai.core.JsonValue;\n              import com.openai.models.evals.runs.CreateEvalJsonlRunDataSource;\n              import com.openai.models.evals.runs.RunCreateParams;\n              import com.openai.models.evals.runs.RunCreateResponse;\n              import java.util.List;\n\n              public final class Main {\n                  private Main() {}\n\n                  public static void main(String[] args) {\n                      OpenAIClient client = OpenAIOkHttpClient.fromEnv();\n\n                      RunCreateParams params = RunCreateParams.builder()\n                          .evalId(\"eval_id\")\n                          .dataSource(CreateEvalJsonlRunDataSource.builder()\n                              .fileContentSource(List.of(CreateEvalJsonlRunDataSource.Source.FileContent.Content.builder()\n                                  .item(CreateEvalJsonlRunDataSource.Source.FileContent.Content.Item.builder()\n                                      .putAdditionalProperty(\"foo\", JsonValue.from(\"bar\"))\n                                      .build())\n                                  .build()))\n                              .build())\n                          .build();\n                      RunCreateResponse run = client.evals().runs().create(params);\n                  }\n              }\n            ruby: |-\n              require \"openai\"\n\n              openai = OpenAI::Client.new(api_key: \"My API Key\")\n\n              run = openai.evals.runs.create(\n                \"eval_id\",\n                data_source: {source: {content: [{item: {foo: \"bar\"}}], type: :file_content}, type: :jsonl}\n              )\n\n              puts(run)\n      description: >\n        Kicks off a new run for a given evaluation, specifying the data source, and what model configuration\n        to use to test. The datasource will be validated against the schema specified in the config of the\n        evaluation.\n  /evals/{eval_id}/runs/{run_id}:\n    get:\n      operationId: getEvalRun\n      tags:\n        - Evals\n      summary: Get an eval run\n      parameters:\n        - name: eval_id\n          in: path\n          required: true\n          schema:\n            type: string\n          description: The ID of the evaluation to retrieve runs for.\n        - name: run_id\n          in: path\n          required: true\n          schema:\n            type: string\n          description: The ID of the run to retrieve.\n      responses:\n        '200':\n          description: The evaluation run\n          content:\n            application/json:\n              schema:\n                $ref: '#/components/schemas/EvalRun'\n      x-oaiMeta:\n        name: Get an eval run\n        group: evals\n        returns: >-\n          The [EvalRun](https://platform.openai.com/docs/api-reference/evals/run-object) object matching the\n          specified ID.\n        path: get\n        examples:\n          response: |\n            {\n              \"object\": \"eval.run\",\n              \"id\": \"evalrun_67abd54d60ec8190832b46859da808f7\",\n              \"eval_id\": \"eval_67abd54d9b0081909a86353f6fb9317a\",\n              \"report_url\": \"https://platform.openai.com/evaluations/eval_67abd54d9b0081909a86353f6fb9317a?run_id=evalrun_67abd54d60ec8190832b46859da808f7\",\n              \"status\": \"queued\",\n              \"model\": \"gpt-4o-mini\",\n              \"name\": \"gpt-4o-mini\",\n              \"created_at\": 1743092069,\n              \"result_counts\": {\n                \"total\": 0,\n                \"errored\": 0,\n                \"failed\": 0,\n                \"passed\": 0\n              },\n              \"per_model_usage\": null,\n              \"per_testing_criteria_results\": null,\n              \"data_source\": {\n                \"type\": \"completions\",\n                \"source\": {\n                  \"type\": \"file_content\",\n                  \"content\": [\n                    {\n                      \"item\": {\n                        \"input\": \"Tech Company Launches Advanced Artificial Intelligence Platform\",\n                        \"ground_truth\": \"Technology\"\n                      }\n                    },\n                    {\n                      \"item\": {\n                        \"input\": \"Central Bank Increases Interest Rates Amid Inflation Concerns\",\n                        \"ground_truth\": \"Markets\"\n                      }\n                    },\n                    {\n                      \"item\": {\n                        \"input\": \"International Summit Addresses Climate Change Strategies\",\n                        \"ground_truth\": \"World\"\n                      }\n                    },\n                    {\n                      \"item\": {\n                        \"input\": \"Major Retailer Reports Record-Breaking Holiday Sales\",\n                        \"ground_truth\": \"Business\"\n                      }\n                    },\n                    {\n                      \"item\": {\n                        \"input\": \"National Team Qualifies for World Championship Finals\",\n                        \"ground_truth\": \"Sports\"\n                      }\n                    },\n                    {\n                      \"item\": {\n                        \"input\": \"Stock Markets Rally After Positive Economic Data Released\",\n                        \"ground_truth\": \"Markets\"\n                      }\n                    },\n                    {\n                      \"item\": {\n                        \"input\": \"Global Manufacturer Announces Merger with Competitor\",\n                        \"ground_truth\": \"Business\"\n                      }\n                    },\n                    {\n                      \"item\": {\n                        \"input\": \"Breakthrough in Renewable Energy Technology Unveiled\",\n                        \"ground_truth\": \"Technology\"\n                      }\n                    },\n                    {\n                      \"item\": {\n                        \"input\": \"World Leaders Sign Historic Climate Agreement\",\n                        \"ground_truth\": \"World\"\n                      }\n                    },\n                    {\n                      \"item\": {\n                        \"input\": \"Professional Athlete Sets New Record in Championship Event\",\n                        \"ground_truth\": \"Sports\"\n                      }\n                    },\n                    {\n                      \"item\": {\n                        \"input\": \"Financial Institutions Adapt to New Regulatory Requirements\",\n                        \"ground_truth\": \"Business\"\n                      }\n                    },\n                    {\n                      \"item\": {\n                        \"input\": \"Tech Conference Showcases Advances in Artificial Intelligence\",\n                        \"ground_truth\": \"Technology\"\n                      }\n                    },\n                    {\n                      \"item\": {\n                        \"input\": \"Global Markets Respond to Oil Price Fluctuations\",\n                        \"ground_truth\": \"Markets\"\n                      }\n                    },\n                    {\n                      \"item\": {\n                        \"input\": \"International Cooperation Strengthened Through New Treaty\",\n                        \"ground_truth\": \"World\"\n                      }\n                    },\n                    {\n                      \"item\": {\n                        \"input\": \"Sports League Announces Revised Schedule for Upcoming Season\",\n                        \"ground_truth\": \"Sports\"\n                      }\n                    }\n                  ]\n                },\n                \"input_messages\": {\n                  \"type\": \"template\",\n                  \"template\": [\n                    {\n                      \"type\": \"message\",\n                      \"role\": \"developer\",\n                      \"content\": {\n                        \"type\": \"input_text\",\n                        \"text\": \"Categorize a given news headline into one of the following topics: Technology, Markets, World, Business, or Sports.\\n\\n# Steps\\n\\n1. Analyze the content of the news headline to understand its primary focus.\\n2. Extract the subject matter, identifying any key indicators or keywords.\\n3. Use the identified indicators to determine the most suitable category out of the five options: Technology, Markets, World, Business, or Sports.\\n4. Ensure only one category is selected per headline.\\n\\n# Output Format\\n\\nRespond with the chosen category as a single word. For instance: \\\"Technology\\\", \\\"Markets\\\", \\\"World\\\", \\\"Business\\\", or \\\"Sports\\\".\\n\\n# Examples\\n\\n**Input**: \\\"Apple Unveils New iPhone Model, Featuring Advanced AI Features\\\"  \\n**Output**: \\\"Technology\\\"\\n\\n**Input**: \\\"Global Stocks Mixed as Investors Await Central Bank Decisions\\\"  \\n**Output**: \\\"Markets\\\"\\n\\n**Input**: \\\"War in Ukraine: Latest Updates on Negotiation Status\\\"  \\n**Output**: \\\"World\\\"\\n\\n**Input**: \\\"Microsoft in Talks to Acquire Gaming Company for $2 Billion\\\"  \\n**Output**: \\\"Business\\\"\\n\\n**Input**: \\\"Manchester United Secures Win in Premier League Football Match\\\"  \\n**Output**: \\\"Sports\\\" \\n\\n# Notes\\n\\n- If the headline appears to fit into more than one category, choose the most dominant theme.\\n- Keywords or phrases such as \\\"stocks\\\", \\\"company acquisition\\\", \\\"match\\\", or technological brands can be good indicators for classification.\\n\"\n                      }\n                    },\n                    {\n                      \"type\": \"message\",\n                      \"role\": \"user\",\n                      \"content\": {\n                        \"type\": \"input_text\",\n                        \"text\": \"{{item.input}}\"\n                      }\n                    }\n                  ]\n                },\n                \"model\": \"gpt-4o-mini\",\n                \"sampling_params\": {\n                  \"seed\": 42,\n                  \"temperature\": 1.0,\n                  \"top_p\": 1.0,\n                  \"max_completions_tokens\": 2048\n                }\n              },\n              \"error\": null,\n              \"metadata\": {}\n            }\n          request:\n            curl: >\n              curl\n              https://api.openai.com/v1/evals/eval_67abd54d9b0081909a86353f6fb9317a/runs/evalrun_67abd54d60ec8190832b46859da808f7\n              \\\n                -H \"Authorization: Bearer $OPENAI_API_KEY\" \\\n                -H \"Content-Type: application/json\"\n            python: |-\n              from openai import OpenAI\n\n              client = OpenAI(\n                  api_key=\"My API Key\",\n              )\n              run = client.evals.runs.retrieve(\n                  run_id=\"run_id\",\n                  eval_id=\"eval_id\",\n              )\n              print(run.id)\n            node.js: |-\n              import OpenAI from 'openai';\n\n              const client = new OpenAI({\n                apiKey: 'My API Key',\n              });\n\n              const run = await client.evals.runs.retrieve('run_id', { eval_id: 'eval_id' });\n\n              console.log(run.id);\n            java: |-\n              package com.openai.example;\n\n              import com.openai.client.OpenAIClient;\n              import com.openai.client.okhttp.OpenAIOkHttpClient;\n              import com.openai.models.evals.runs.RunRetrieveParams;\n              import com.openai.models.evals.runs.RunRetrieveResponse;\n\n              public final class Main {\n                  private Main() {}\n\n                  public static void main(String[] args) {\n                      OpenAIClient client = OpenAIOkHttpClient.fromEnv();\n\n                      RunRetrieveParams params = RunRetrieveParams.builder()\n                          .evalId(\"eval_id\")\n                          .runId(\"run_id\")\n                          .build();\n                      RunRetrieveResponse run = client.evals().runs().retrieve(params);\n                  }\n              }\n            ruby: |-\n              require \"openai\"\n\n              openai = OpenAI::Client.new(api_key: \"My API Key\")\n\n              run = openai.evals.runs.retrieve(\"run_id\", eval_id: \"eval_id\")\n\n              puts(run)\n      description: |\n        Get an evaluation run by ID.\n    post:\n      operationId: cancelEvalRun\n      tags:\n        - Evals\n      summary: Cancel eval run\n      parameters:\n        - name: eval_id\n          in: path\n          required: true\n          schema:\n            type: string\n          description: The ID of the evaluation whose run you want to cancel.\n        - name: run_id\n          in: path\n          required: true\n          schema:\n            type: string\n          description: The ID of the run to cancel.\n      responses:\n        '200':\n          description: The canceled eval run object\n          content:\n            application/json:\n              schema:\n                $ref: '#/components/schemas/EvalRun'\n      x-oaiMeta:\n        name: Cancel eval run\n        group: evals\n        returns: >-\n          The updated [EvalRun](https://platform.openai.com/docs/api-reference/evals/run-object) object\n          reflecting that the run is canceled.\n        path: post\n        examples:\n          response: |\n            {\n              \"object\": \"eval.run\",\n              \"id\": \"evalrun_67abd54d60ec8190832b46859da808f7\",\n              \"eval_id\": \"eval_67abd54d9b0081909a86353f6fb9317a\",\n              \"report_url\": \"https://platform.openai.com/evaluations/eval_67abd54d9b0081909a86353f6fb9317a?run_id=evalrun_67abd54d60ec8190832b46859da808f7\",\n              \"status\": \"canceled\",\n              \"model\": \"gpt-4o-mini\",\n              \"name\": \"gpt-4o-mini\",\n              \"created_at\": 1743092069,\n              \"result_counts\": {\n                \"total\": 0,\n                \"errored\": 0,\n                \"failed\": 0,\n                \"passed\": 0\n              },\n              \"per_model_usage\": null,\n              \"per_testing_criteria_results\": null,\n              \"data_source\": {\n                \"type\": \"completions\",\n                \"source\": {\n                  \"type\": \"file_content\",\n                  \"content\": [\n                    {\n                      \"item\": {\n                        \"input\": \"Tech Company Launches Advanced Artificial Intelligence Platform\",\n                        \"ground_truth\": \"Technology\"\n                      }\n                    },\n                    {\n                      \"item\": {\n                        \"input\": \"Central Bank Increases Interest Rates Amid Inflation Concerns\",\n                        \"ground_truth\": \"Markets\"\n                      }\n                    },\n                    {\n                      \"item\": {\n                        \"input\": \"International Summit Addresses Climate Change Strategies\",\n                        \"ground_truth\": \"World\"\n                      }\n                    },\n                    {\n                      \"item\": {\n                        \"input\": \"Major Retailer Reports Record-Breaking Holiday Sales\",\n                        \"ground_truth\": \"Business\"\n                      }\n                    },\n                    {\n                      \"item\": {\n                        \"input\": \"National Team Qualifies for World Championship Finals\",\n                        \"ground_truth\": \"Sports\"\n                      }\n                    },\n                    {\n                      \"item\": {\n                        \"input\": \"Stock Markets Rally After Positive Economic Data Released\",\n                        \"ground_truth\": \"Markets\"\n                      }\n                    },\n                    {\n                      \"item\": {\n                        \"input\": \"Global Manufacturer Announces Merger with Competitor\",\n                        \"ground_truth\": \"Business\"\n                      }\n                    },\n                    {\n                      \"item\": {\n                        \"input\": \"Breakthrough in Renewable Energy Technology Unveiled\",\n                        \"ground_truth\": \"Technology\"\n                      }\n                    },\n                    {\n                      \"item\": {\n                        \"input\": \"World Leaders Sign Historic Climate Agreement\",\n                        \"ground_truth\": \"World\"\n                      }\n                    },\n                    {\n                      \"item\": {\n                        \"input\": \"Professional Athlete Sets New Record in Championship Event\",\n                        \"ground_truth\": \"Sports\"\n                      }\n                    },\n                    {\n                      \"item\": {\n                        \"input\": \"Financial Institutions Adapt to New Regulatory Requirements\",\n                        \"ground_truth\": \"Business\"\n                      }\n                    },\n                    {\n                      \"item\": {\n                        \"input\": \"Tech Conference Showcases Advances in Artificial Intelligence\",\n                        \"ground_truth\": \"Technology\"\n                      }\n                    },\n                    {\n                      \"item\": {\n                        \"input\": \"Global Markets Respond to Oil Price Fluctuations\",\n                        \"ground_truth\": \"Markets\"\n                      }\n                    },\n                    {\n                      \"item\": {\n                        \"input\": \"International Cooperation Strengthened Through New Treaty\",\n                        \"ground_truth\": \"World\"\n                      }\n                    },\n                    {\n                      \"item\": {\n                        \"input\": \"Sports League Announces Revised Schedule for Upcoming Season\",\n                        \"ground_truth\": \"Sports\"\n                      }\n                    }\n                  ]\n                },\n                \"input_messages\": {\n                  \"type\": \"template\",\n                  \"template\": [\n                    {\n                      \"type\": \"message\",\n                      \"role\": \"developer\",\n                      \"content\": {\n                        \"type\": \"input_text\",\n                        \"text\": \"Categorize a given news headline into one of the following topics: Technology, Markets, World, Business, or Sports.\\n\\n# Steps\\n\\n1. Analyze the content of the news headline to understand its primary focus.\\n2. Extract the subject matter, identifying any key indicators or keywords.\\n3. Use the identified indicators to determine the most suitable category out of the five options: Technology, Markets, World, Business, or Sports.\\n4. Ensure only one category is selected per headline.\\n\\n# Output Format\\n\\nRespond with the chosen category as a single word. For instance: \\\"Technology\\\", \\\"Markets\\\", \\\"World\\\", \\\"Business\\\", or \\\"Sports\\\".\\n\\n# Examples\\n\\n**Input**: \\\"Apple Unveils New iPhone Model, Featuring Advanced AI Features\\\"  \\n**Output**: \\\"Technology\\\"\\n\\n**Input**: \\\"Global Stocks Mixed as Investors Await Central Bank Decisions\\\"  \\n**Output**: \\\"Markets\\\"\\n\\n**Input**: \\\"War in Ukraine: Latest Updates on Negotiation Status\\\"  \\n**Output**: \\\"World\\\"\\n\\n**Input**: \\\"Microsoft in Talks to Acquire Gaming Company for $2 Billion\\\"  \\n**Output**: \\\"Business\\\"\\n\\n**Input**: \\\"Manchester United Secures Win in Premier League Football Match\\\"  \\n**Output**: \\\"Sports\\\" \\n\\n# Notes\\n\\n- If the headline appears to fit into more than one category, choose the most dominant theme.\\n- Keywords or phrases such as \\\"stocks\\\", \\\"company acquisition\\\", \\\"match\\\", or technological brands can be good indicators for classification.\\n\"\n                      }\n                    },\n                    {\n                      \"type\": \"message\",\n                      \"role\": \"user\",\n                      \"content\": {\n                        \"type\": \"input_text\",\n                        \"text\": \"{{item.input}}\"\n                      }\n                    }\n                  ]\n                },\n                \"model\": \"gpt-4o-mini\",\n                \"sampling_params\": {\n                  \"seed\": 42,\n                  \"temperature\": 1.0,\n                  \"top_p\": 1.0,\n                  \"max_completions_tokens\": 2048\n                }\n              },\n              \"error\": null,\n              \"metadata\": {}\n            }\n          request:\n            curl: >\n              curl\n              https://api.openai.com/v1/evals/eval_67abd54d9b0081909a86353f6fb9317a/runs/evalrun_67abd54d60ec8190832b46859da808f7/cancel\n              \\\n                -X POST \\\n                -H \"Authorization: Bearer $OPENAI_API_KEY\" \\\n                -H \"Content-Type: application/json\"\n            python: |-\n              from openai import OpenAI\n\n              client = OpenAI(\n                  api_key=\"My API Key\",\n              )\n              response = client.evals.runs.cancel(\n                  run_id=\"run_id\",\n                  eval_id=\"eval_id\",\n              )\n              print(response.id)\n            node.js: |-\n              import OpenAI from 'openai';\n\n              const client = new OpenAI({\n                apiKey: 'My API Key',\n              });\n\n              const response = await client.evals.runs.cancel('run_id', { eval_id: 'eval_id' });\n\n              console.log(response.id);\n            java: |-\n              package com.openai.example;\n\n              import com.openai.client.OpenAIClient;\n              import com.openai.client.okhttp.OpenAIOkHttpClient;\n              import com.openai.models.evals.runs.RunCancelParams;\n              import com.openai.models.evals.runs.RunCancelResponse;\n\n              public final class Main {\n                  private Main() {}\n\n                  public static void main(String[] args) {\n                      OpenAIClient client = OpenAIOkHttpClient.fromEnv();\n\n                      RunCancelParams params = RunCancelParams.builder()\n                          .evalId(\"eval_id\")\n                          .runId(\"run_id\")\n                          .build();\n                      RunCancelResponse response = client.evals().runs().cancel(params);\n                  }\n              }\n            ruby: |-\n              require \"openai\"\n\n              openai = OpenAI::Client.new(api_key: \"My API Key\")\n\n              response = openai.evals.runs.cancel(\"run_id\", eval_id: \"eval_id\")\n\n              puts(response)\n      description: |\n        Cancel an ongoing evaluation run.\n    delete:\n      operationId: deleteEvalRun\n      tags:\n        - Evals\n      summary: Delete eval run\n      parameters:\n        - name: eval_id\n          in: path\n          required: true\n          schema:\n            type: string\n          description: The ID of the evaluation to delete the run from.\n        - name: run_id\n          in: path\n          required: true\n          schema:\n            type: string\n          description: The ID of the run to delete.\n      responses:\n        '200':\n          description: Successfully deleted the eval run\n          content:\n            application/json:\n              schema:\n                type: object\n                properties:\n                  object:\n                    type: string\n                    example: eval.run.deleted\n                  deleted:\n                    type: boolean\n                    example: true\n                  run_id:\n                    type: string\n                    example: evalrun_677469f564d48190807532a852da3afb\n        '404':\n          description: Run not found\n          content:\n            application/json:\n              schema:\n                $ref: '#/components/schemas/Error'\n      x-oaiMeta:\n        name: Delete eval run\n        group: evals\n        returns: An object containing the status of the delete operation.\n        path: delete\n        examples:\n          response: |\n            {\n              \"object\": \"eval.run.deleted\",\n              \"deleted\": true,\n              \"run_id\": \"evalrun_abc456\"\n            }\n          request:\n            curl: |\n              curl https://api.openai.com/v1/evals/eval_123abc/runs/evalrun_abc456 \\\n                -X DELETE \\\n                -H \"Authorization: Bearer $OPENAI_API_KEY\" \\\n                -H \"Content-Type: application/json\"\n            python: |-\n              from openai import OpenAI\n\n              client = OpenAI(\n                  api_key=\"My API Key\",\n              )\n              run = client.evals.runs.delete(\n                  run_id=\"run_id\",\n                  eval_id=\"eval_id\",\n              )\n              print(run.run_id)\n            node.js: |-\n              import OpenAI from 'openai';\n\n              const client = new OpenAI({\n                apiKey: 'My API Key',\n              });\n\n              const run = await client.evals.runs.delete('run_id', { eval_id: 'eval_id' });\n\n              console.log(run.run_id);\n            java: |-\n              package com.openai.example;\n\n              import com.openai.client.OpenAIClient;\n              import com.openai.client.okhttp.OpenAIOkHttpClient;\n              import com.openai.models.evals.runs.RunDeleteParams;\n              import com.openai.models.evals.runs.RunDeleteResponse;\n\n              public final class Main {\n                  private Main() {}\n\n                  public static void main(String[] args) {\n                      OpenAIClient client = OpenAIOkHttpClient.fromEnv();\n\n                      RunDeleteParams params = RunDeleteParams.builder()\n                          .evalId(\"eval_id\")\n                          .runId(\"run_id\")\n                          .build();\n                      RunDeleteResponse run = client.evals().runs().delete(params);\n                  }\n              }\n            ruby: |-\n              require \"openai\"\n\n              openai = OpenAI::Client.new(api_key: \"My API Key\")\n\n              run = openai.evals.runs.delete(\"run_id\", eval_id: \"eval_id\")\n\n              puts(run)\n      description: |\n        Delete an eval run.\n  /evals/{eval_id}/runs/{run_id}/output_items:\n    get:\n      operationId: getEvalRunOutputItems\n      tags:\n        - Evals\n      summary: Get eval run output items\n      parameters:\n        - name: eval_id\n          in: path\n          required: true\n          schema:\n            type: string\n          description: The ID of the evaluation to retrieve runs for.\n        - name: run_id\n          in: path\n          required: true\n          schema:\n            type: string\n          description: The ID of the run to retrieve output items for.\n        - name: after\n          in: query\n          description: Identifier for the last output item from the previous pagination request.\n          required: false\n          schema:\n            type: string\n        - name: limit\n          in: query\n          description: Number of output items to retrieve.\n          required: false\n          schema:\n            type: integer\n            default: 20\n        - name: status\n          in: query\n          description: |\n            Filter output items by status. Use `failed` to filter by failed output\n            items or `pass` to filter by passed output items.\n          required: false\n          schema:\n            type: string\n            enum:\n              - fail\n              - pass\n        - name: order\n          in: query\n          description: >-\n            Sort order for output items by timestamp. Use `asc` for ascending order or `desc` for descending\n            order. Defaults to `asc`.\n          required: false\n          schema:\n            type: string\n            enum:\n              - asc\n              - desc\n            default: asc\n      responses:\n        '200':\n          description: A list of output items for the evaluation run\n          content:\n            application/json:\n              schema:\n                $ref: '#/components/schemas/EvalRunOutputItemList'\n      x-oaiMeta:\n        name: Get eval run output items\n        group: evals\n        returns: >-\n          A list of\n          [EvalRunOutputItem](https://platform.openai.com/docs/api-reference/evals/run-output-item-object)\n          objects matching the specified ID.\n        path: get\n        examples:\n          response: |\n            {\n              \"object\": \"list\",\n              \"data\": [\n                {\n                  \"object\": \"eval.run.output_item\",\n                  \"id\": \"outputitem_67e5796c28e081909917bf79f6e6214d\",\n                  \"created_at\": 1743092076,\n                  \"run_id\": \"evalrun_67abd54d60ec8190832b46859da808f7\",\n                  \"eval_id\": \"eval_67abd54d9b0081909a86353f6fb9317a\",\n                  \"status\": \"pass\",\n                  \"datasource_item_id\": 5,\n                  \"datasource_item\": {\n                    \"input\": \"Stock Markets Rally After Positive Economic Data Released\",\n                    \"ground_truth\": \"Markets\"\n                  },\n                  \"results\": [\n                    {\n                      \"name\": \"String check-a2486074-d803-4445-b431-ad2262e85d47\",\n                      \"sample\": null,\n                      \"passed\": true,\n                      \"score\": 1.0\n                    }\n                  ],\n                  \"sample\": {\n                    \"input\": [\n                      {\n                        \"role\": \"developer\",\n                        \"content\": \"Categorize a given news headline into one of the following topics: Technology, Markets, World, Business, or Sports.\\n\\n# Steps\\n\\n1. Analyze the content of the news headline to understand its primary focus.\\n2. Extract the subject matter, identifying any key indicators or keywords.\\n3. Use the identified indicators to determine the most suitable category out of the five options: Technology, Markets, World, Business, or Sports.\\n4. Ensure only one category is selected per headline.\\n\\n# Output Format\\n\\nRespond with the chosen category as a single word. For instance: \\\"Technology\\\", \\\"Markets\\\", \\\"World\\\", \\\"Business\\\", or \\\"Sports\\\".\\n\\n# Examples\\n\\n**Input**: \\\"Apple Unveils New iPhone Model, Featuring Advanced AI Features\\\"  \\n**Output**: \\\"Technology\\\"\\n\\n**Input**: \\\"Global Stocks Mixed as Investors Await Central Bank Decisions\\\"  \\n**Output**: \\\"Markets\\\"\\n\\n**Input**: \\\"War in Ukraine: Latest Updates on Negotiation Status\\\"  \\n**Output**: \\\"World\\\"\\n\\n**Input**: \\\"Microsoft in Talks to Acquire Gaming Company for $2 Billion\\\"  \\n**Output**: \\\"Business\\\"\\n\\n**Input**: \\\"Manchester United Secures Win in Premier League Football Match\\\"  \\n**Output**: \\\"Sports\\\" \\n\\n# Notes\\n\\n- If the headline appears to fit into more than one category, choose the most dominant theme.\\n- Keywords or phrases such as \\\"stocks\\\", \\\"company acquisition\\\", \\\"match\\\", or technological brands can be good indicators for classification.\\n\",\n                        \"tool_call_id\": null,\n                        \"tool_calls\": null,\n                        \"function_call\": null\n                      },\n                      {\n                        \"role\": \"user\",\n                        \"content\": \"Stock Markets Rally After Positive Economic Data Released\",\n                        \"tool_call_id\": null,\n                        \"tool_calls\": null,\n                        \"function_call\": null\n                      }\n                    ],\n                    \"output\": [\n                      {\n                        \"role\": \"assistant\",\n                        \"content\": \"Markets\",\n                        \"tool_call_id\": null,\n                        \"tool_calls\": null,\n                        \"function_call\": null\n                      }\n                    ],\n                    \"finish_reason\": \"stop\",\n                    \"model\": \"gpt-4o-mini-2024-07-18\",\n                    \"usage\": {\n                      \"total_tokens\": 325,\n                      \"completion_tokens\": 2,\n                      \"prompt_tokens\": 323,\n                      \"cached_tokens\": 0\n                    },\n                    \"error\": null,\n                    \"temperature\": 1.0,\n                    \"max_completion_tokens\": 2048,\n                    \"top_p\": 1.0,\n                    \"seed\": 42\n                  }\n                }\n              ],\n              \"first_id\": \"outputitem_67e5796c28e081909917bf79f6e6214d\",\n              \"last_id\": \"outputitem_67e5796c28e081909917bf79f6e6214d\",\n              \"has_more\": true\n            }\n          request:\n            curl: >\n              curl\n              https://api.openai.com/v1/evals/egroup_67abd54d9b0081909a86353f6fb9317a/runs/erun_67abd54d60ec8190832b46859da808f7/output_items\n              \\\n                -H \"Authorization: Bearer $OPENAI_API_KEY\" \\\n                -H \"Content-Type: application/json\"\n            python: |-\n              from openai import OpenAI\n\n              client = OpenAI(\n                  api_key=\"My API Key\",\n              )\n              page = client.evals.runs.output_items.list(\n                  run_id=\"run_id\",\n                  eval_id=\"eval_id\",\n              )\n              page = page.data[0]\n              print(page.id)\n            node.js: |-\n              import OpenAI from 'openai';\n\n              const client = new OpenAI({\n                apiKey: 'My API Key',\n              });\n\n              // Automatically fetches more pages as needed.\n              for await (const outputItemListResponse of client.evals.runs.outputItems.list('run_id', {\n                eval_id: 'eval_id',\n              })) {\n                console.log(outputItemListResponse.id);\n              }\n            java: |-\n              package com.openai.example;\n\n              import com.openai.client.OpenAIClient;\n              import com.openai.client.okhttp.OpenAIOkHttpClient;\n              import com.openai.models.evals.runs.outputitems.OutputItemListPage;\n              import com.openai.models.evals.runs.outputitems.OutputItemListParams;\n\n              public final class Main {\n                  private Main() {}\n\n                  public static void main(String[] args) {\n                      OpenAIClient client = OpenAIOkHttpClient.fromEnv();\n\n                      OutputItemListParams params = OutputItemListParams.builder()\n                          .evalId(\"eval_id\")\n                          .runId(\"run_id\")\n                          .build();\n                      OutputItemListPage page = client.evals().runs().outputItems().list(params);\n                  }\n              }\n            ruby: |-\n              require \"openai\"\n\n              openai = OpenAI::Client.new(api_key: \"My API Key\")\n\n              page = openai.evals.runs.output_items.list(\"run_id\", eval_id: \"eval_id\")\n\n              puts(page)\n      description: |\n        Get a list of output items for an evaluation run.\n  /evals/{eval_id}/runs/{run_id}/output_items/{output_item_id}:\n    get:\n      operationId: getEvalRunOutputItem\n      tags:\n        - Evals\n      summary: Get an output item of an eval run\n      parameters:\n        - name: eval_id\n          in: path\n          required: true\n          schema:\n            type: string\n          description: The ID of the evaluation to retrieve runs for.\n        - name: run_id\n          in: path\n          required: true\n          schema:\n            type: string\n          description: The ID of the run to retrieve.\n        - name: output_item_id\n          in: path\n          required: true\n          schema:\n            type: string\n          description: The ID of the output item to retrieve.\n      responses:\n        '200':\n          description: The evaluation run output item\n          content:\n            application/json:\n              schema:\n                $ref: '#/components/schemas/EvalRunOutputItem'\n      x-oaiMeta:\n        name: Get an output item of an eval run\n        group: evals\n        returns: >-\n          The [EvalRunOutputItem](https://platform.openai.com/docs/api-reference/evals/run-output-item-object)\n          object matching the specified ID.\n        path: get\n        examples:\n          response: |\n            {\n              \"object\": \"eval.run.output_item\",\n              \"id\": \"outputitem_67e5796c28e081909917bf79f6e6214d\",\n              \"created_at\": 1743092076,\n              \"run_id\": \"evalrun_67abd54d60ec8190832b46859da808f7\",\n              \"eval_id\": \"eval_67abd54d9b0081909a86353f6fb9317a\",\n              \"status\": \"pass\",\n              \"datasource_item_id\": 5,\n              \"datasource_item\": {\n                \"input\": \"Stock Markets Rally After Positive Economic Data Released\",\n                \"ground_truth\": \"Markets\"\n              },\n              \"results\": [\n                {\n                  \"name\": \"String check-a2486074-d803-4445-b431-ad2262e85d47\",\n                  \"sample\": null,\n                  \"passed\": true,\n                  \"score\": 1.0\n                }\n              ],\n              \"sample\": {\n                \"input\": [\n                  {\n                    \"role\": \"developer\",\n                    \"content\": \"Categorize a given news headline into one of the following topics: Technology, Markets, World, Business, or Sports.\\n\\n# Steps\\n\\n1. Analyze the content of the news headline to understand its primary focus.\\n2. Extract the subject matter, identifying any key indicators or keywords.\\n3. Use the identified indicators to determine the most suitable category out of the five options: Technology, Markets, World, Business, or Sports.\\n4. Ensure only one category is selected per headline.\\n\\n# Output Format\\n\\nRespond with the chosen category as a single word. For instance: \\\"Technology\\\", \\\"Markets\\\", \\\"World\\\", \\\"Business\\\", or \\\"Sports\\\".\\n\\n# Examples\\n\\n**Input**: \\\"Apple Unveils New iPhone Model, Featuring Advanced AI Features\\\"  \\n**Output**: \\\"Technology\\\"\\n\\n**Input**: \\\"Global Stocks Mixed as Investors Await Central Bank Decisions\\\"  \\n**Output**: \\\"Markets\\\"\\n\\n**Input**: \\\"War in Ukraine: Latest Updates on Negotiation Status\\\"  \\n**Output**: \\\"World\\\"\\n\\n**Input**: \\\"Microsoft in Talks to Acquire Gaming Company for $2 Billion\\\"  \\n**Output**: \\\"Business\\\"\\n\\n**Input**: \\\"Manchester United Secures Win in Premier League Football Match\\\"  \\n**Output**: \\\"Sports\\\" \\n\\n# Notes\\n\\n- If the headline appears to fit into more than one category, choose the most dominant theme.\\n- Keywords or phrases such as \\\"stocks\\\", \\\"company acquisition\\\", \\\"match\\\", or technological brands can be good indicators for classification.\\n\",\n                    \"tool_call_id\": null,\n                    \"tool_calls\": null,\n                    \"function_call\": null\n                  },\n                  {\n                    \"role\": \"user\",\n                    \"content\": \"Stock Markets Rally After Positive Economic Data Released\",\n                    \"tool_call_id\": null,\n                    \"tool_calls\": null,\n                    \"function_call\": null\n                  }\n                ],\n                \"output\": [\n                  {\n                    \"role\": \"assistant\",\n                    \"content\": \"Markets\",\n                    \"tool_call_id\": null,\n                    \"tool_calls\": null,\n                    \"function_call\": null\n                  }\n                ],\n                \"finish_reason\": \"stop\",\n                \"model\": \"gpt-4o-mini-2024-07-18\",\n                \"usage\": {\n                  \"total_tokens\": 325,\n                  \"completion_tokens\": 2,\n                  \"prompt_tokens\": 323,\n                  \"cached_tokens\": 0\n                },\n                \"error\": null,\n                \"temperature\": 1.0,\n                \"max_completion_tokens\": 2048,\n                \"top_p\": 1.0,\n                \"seed\": 42\n              }\n            }\n          request:\n            curl: >\n              curl\n              https://api.openai.com/v1/evals/eval_67abd54d9b0081909a86353f6fb9317a/runs/evalrun_67abd54d60ec8190832b46859da808f7/output_items/outputitem_67abd55eb6548190bb580745d5644a33\n              \\\n                -H \"Authorization: Bearer $OPENAI_API_KEY\" \\\n                -H \"Content-Type: application/json\"\n            python: |-\n              from openai import OpenAI\n\n              client = OpenAI(\n                  api_key=\"My API Key\",\n              )\n              output_item = client.evals.runs.output_items.retrieve(\n                  output_item_id=\"output_item_id\",\n                  eval_id=\"eval_id\",\n                  run_id=\"run_id\",\n              )\n              print(output_item.id)\n            node.js: |-\n              import OpenAI from 'openai';\n\n              const client = new OpenAI({\n                apiKey: 'My API Key',\n              });\n\n              const outputItem = await client.evals.runs.outputItems.retrieve('output_item_id', {\n                eval_id: 'eval_id',\n                run_id: 'run_id',\n              });\n\n              console.log(outputItem.id);\n            java: |-\n              package com.openai.example;\n\n              import com.openai.client.OpenAIClient;\n              import com.openai.client.okhttp.OpenAIOkHttpClient;\n              import com.openai.models.evals.runs.outputitems.OutputItemRetrieveParams;\n              import com.openai.models.evals.runs.outputitems.OutputItemRetrieveResponse;\n\n              public final class Main {\n                  private Main() {}\n\n                  public static void main(String[] args) {\n                      OpenAIClient client = OpenAIOkHttpClient.fromEnv();\n\n                      OutputItemRetrieveParams params = OutputItemRetrieveParams.builder()\n                          .evalId(\"eval_id\")\n                          .runId(\"run_id\")\n                          .outputItemId(\"output_item_id\")\n                          .build();\n                      OutputItemRetrieveResponse outputItem = client.evals().runs().outputItems().retrieve(params);\n                  }\n              }\n            ruby: >-\n              require \"openai\"\n\n\n              openai = OpenAI::Client.new(api_key: \"My API Key\")\n\n\n              output_item = openai.evals.runs.output_items.retrieve(\"output_item_id\", eval_id: \"eval_id\",\n              run_id: \"run_id\")\n\n\n              puts(output_item)\n      description: |\n        Get an evaluation run output item by ID.\n  /files:\n    get:\n      operationId: listFiles\n      tags:\n        - Files\n      summary: List files\n      parameters:\n        - in: query\n          name: purpose\n          required: false\n          schema:\n            type: string\n          description: Only return files with the given purpose.\n        - name: limit\n          in: query\n          description: >\n            A limit on the number of objects to be returned. Limit can range between 1 and 10,000, and the\n            default is 10,000.\n          required: false\n          schema:\n            type: integer\n            default: 10000\n        - name: order\n          in: query\n          description: >\n            Sort order by the `created_at` timestamp of the objects. `asc` for ascending order and `desc` for\n            descending order.\n          schema:\n            type: string\n            default: desc\n            enum:\n              - asc\n              - desc\n        - name: after\n          in: query\n          description: >\n            A cursor for use in pagination. `after` is an object ID that defines your place in the list. For\n            instance, if you make a list request and receive 100 objects, ending with obj_foo, your subsequent\n            call can include after=obj_foo in order to fetch the next page of the list.\n          schema:\n            type: string\n      responses:\n        '200':\n          description: OK\n          content:\n            application/json:\n              schema:\n                $ref: '#/components/schemas/ListFilesResponse'\n      x-oaiMeta:\n        name: List files\n        group: files\n        returns: A list of [File](https://platform.openai.com/docs/api-reference/files/object) objects.\n        examples:\n          response: |\n            {\n              \"object\": \"list\",\n              \"data\": [\n                {\n                  \"id\": \"file-abc123\",\n                  \"object\": \"file\",\n                  \"bytes\": 175,\n                  \"created_at\": 1613677385,\n                  \"expires_at\": 1677614202,\n                  \"filename\": \"salesOverview.pdf\",\n                  \"purpose\": \"assistants\",\n                },\n                {\n                  \"id\": \"file-abc456\",\n                  \"object\": \"file\",\n                  \"bytes\": 140,\n                  \"created_at\": 1613779121,\n                  \"expires_at\": 1677614202,\n                  \"filename\": \"puppy.jsonl\",\n                  \"purpose\": \"fine-tune\",\n                }\n              ],\n              \"first_id\": \"file-abc123\",\n              \"last_id\": \"file-abc456\",\n              \"has_more\": false\n            }\n          request:\n            curl: |\n              curl https://api.openai.com/v1/files \\\n                -H \"Authorization: Bearer $OPENAI_API_KEY\"\n            python: |-\n              from openai import OpenAI\n\n              client = OpenAI(\n                  api_key=\"My API Key\",\n              )\n              page = client.files.list()\n              page = page.data[0]\n              print(page)\n            node.js: |-\n              import OpenAI from 'openai';\n\n              const client = new OpenAI({\n                apiKey: 'My API Key',\n              });\n\n              // Automatically fetches more pages as needed.\n              for await (const fileObject of client.files.list()) {\n                console.log(fileObject);\n              }\n            go: |\n              package main\n\n              import (\n                \"context\"\n                \"fmt\"\n\n                \"github.com/openai/openai-go\"\n                \"github.com/openai/openai-go/option\"\n              )\n\n              func main() {\n                client := openai.NewClient(\n                  option.WithAPIKey(\"My API Key\"),\n                )\n                page, err := client.Files.List(context.TODO(), openai.FileListParams{\n\n                })\n                if err != nil {\n                  panic(err.Error())\n                }\n                fmt.Printf(\"%+v\\n\", page)\n              }\n            java: |-\n              package com.openai.example;\n\n              import com.openai.client.OpenAIClient;\n              import com.openai.client.okhttp.OpenAIOkHttpClient;\n              import com.openai.models.files.FileListPage;\n              import com.openai.models.files.FileListParams;\n\n              public final class Main {\n                  private Main() {}\n\n                  public static void main(String[] args) {\n                      OpenAIClient client = OpenAIOkHttpClient.fromEnv();\n\n                      FileListPage page = client.files().list();\n                  }\n              }\n            ruby: |-\n              require \"openai\"\n\n              openai = OpenAI::Client.new(api_key: \"My API Key\")\n\n              page = openai.files.list\n\n              puts(page)\n      description: Returns a list of files.\n    post:\n      operationId: createFile\n      tags:\n        - Files\n      summary: Upload file\n      requestBody:\n        required: true\n        content:\n          multipart/form-data:\n            schema:\n              $ref: '#/components/schemas/CreateFileRequest'\n      responses:\n        '200':\n          description: OK\n          content:\n            application/json:\n              schema:\n                $ref: '#/components/schemas/OpenAIFile'\n      x-oaiMeta:\n        name: Upload file\n        group: files\n        returns: The uploaded [File](https://platform.openai.com/docs/api-reference/files/object) object.\n        examples:\n          response: |\n            {\n              \"id\": \"file-abc123\",\n              \"object\": \"file\",\n              \"bytes\": 120000,\n              \"created_at\": 1677610602,\n              \"expires_at\": 1677614202,\n              \"filename\": \"mydata.jsonl\",\n              \"purpose\": \"fine-tune\",\n            }\n          request:\n            curl: |\n              curl https://api.openai.com/v1/files \\\n                -H \"Authorization: Bearer $OPENAI_API_KEY\" \\\n                -F purpose=\"fine-tune\" \\\n                -F file=\"@mydata.jsonl\"\n                -F expires_after[anchor]=\"created_at\"\n                -F expires_after[seconds]=3600\n            python: |-\n              from openai import OpenAI\n\n              client = OpenAI(\n                  api_key=\"My API Key\",\n              )\n              file_object = client.files.create(\n                  file=b\"raw file contents\",\n                  purpose=\"assistants\",\n              )\n              print(file_object.id)\n            node.js: |-\n              import OpenAI from 'openai';\n\n              const client = new OpenAI({\n                apiKey: 'My API Key',\n              });\n\n              const fileObject = await client.files.create({\n                file: fs.createReadStream('fine-tune.jsonl'),\n                purpose: 'assistants',\n              });\n\n              console.log(fileObject.id);\n            go: |\n              package main\n\n              import (\n                \"bytes\"\n                \"context\"\n                \"fmt\"\n                \"io\"\n\n                \"github.com/openai/openai-go\"\n                \"github.com/openai/openai-go/option\"\n              )\n\n              func main() {\n                client := openai.NewClient(\n                  option.WithAPIKey(\"My API Key\"),\n                )\n                fileObject, err := client.Files.New(context.TODO(), openai.FileNewParams{\n                  File: io.Reader(bytes.NewBuffer([]byte(\"some file contents\"))),\n                  Purpose: openai.FilePurposeAssistants,\n                })\n                if err != nil {\n                  panic(err.Error())\n                }\n                fmt.Printf(\"%+v\\n\", fileObject.ID)\n              }\n            java: |-\n              package com.openai.example;\n\n              import com.openai.client.OpenAIClient;\n              import com.openai.client.okhttp.OpenAIOkHttpClient;\n              import com.openai.models.files.FileCreateParams;\n              import com.openai.models.files.FileObject;\n              import com.openai.models.files.FilePurpose;\n              import java.io.ByteArrayInputStream;\n\n              public final class Main {\n                  private Main() {}\n\n                  public static void main(String[] args) {\n                      OpenAIClient client = OpenAIOkHttpClient.fromEnv();\n\n                      FileCreateParams params = FileCreateParams.builder()\n                          .file(ByteArrayInputStream(\"some content\".getBytes()))\n                          .purpose(FilePurpose.ASSISTANTS)\n                          .build();\n                      FileObject fileObject = client.files().create(params);\n                  }\n              }\n            ruby: |-\n              require \"openai\"\n\n              openai = OpenAI::Client.new(api_key: \"My API Key\")\n\n              file_object = openai.files.create(file: Pathname(__FILE__), purpose: :assistants)\n\n              puts(file_object)\n      description: >\n        Upload a file that can be used across various endpoints. Individual files can be up to 512 MB, and the\n        size of all files uploaded by one organization can be up to 1 TB.\n\n\n        The Assistants API supports files up to 2 million tokens and of specific file types. See the\n        [Assistants Tools guide](https://platform.openai.com/docs/assistants/tools) for details.\n\n\n        The Fine-tuning API only supports `.jsonl` files. The input also has certain required formats for\n        fine-tuning [chat](https://platform.openai.com/docs/api-reference/fine-tuning/chat-input) or\n        [completions](https://platform.openai.com/docs/api-reference/fine-tuning/completions-input) models.\n\n\n        The Batch API only supports `.jsonl` files up to 200 MB in size. The input also has a specific\n        required [format](https://platform.openai.com/docs/api-reference/batch/request-input).\n\n\n        Please [contact us](https://help.openai.com/) if you need to increase these storage limits.\n  /files/{file_id}:\n    delete:\n      operationId: deleteFile\n      tags:\n        - Files\n      summary: Delete file\n      parameters:\n        - in: path\n          name: file_id\n          required: true\n          schema:\n            type: string\n          description: The ID of the file to use for this request.\n      responses:\n        '200':\n          description: OK\n          content:\n            application/json:\n              schema:\n                $ref: '#/components/schemas/DeleteFileResponse'\n      x-oaiMeta:\n        name: Delete file\n        group: files\n        returns: Deletion status.\n        examples:\n          response: |\n            {\n              \"id\": \"file-abc123\",\n              \"object\": \"file\",\n              \"deleted\": true\n            }\n          request:\n            curl: |\n              curl https://api.openai.com/v1/files/file-abc123 \\\n                -X DELETE \\\n                -H \"Authorization: Bearer $OPENAI_API_KEY\"\n            python: |-\n              from openai import OpenAI\n\n              client = OpenAI(\n                  api_key=\"My API Key\",\n              )\n              file_deleted = client.files.delete(\n                  \"file_id\",\n              )\n              print(file_deleted.id)\n            node.js: |-\n              import OpenAI from 'openai';\n\n              const client = new OpenAI({\n                apiKey: 'My API Key',\n              });\n\n              const fileDeleted = await client.files.delete('file_id');\n\n              console.log(fileDeleted.id);\n            go: |\n              package main\n\n              import (\n                \"context\"\n                \"fmt\"\n\n                \"github.com/openai/openai-go\"\n                \"github.com/openai/openai-go/option\"\n              )\n\n              func main() {\n                client := openai.NewClient(\n                  option.WithAPIKey(\"My API Key\"),\n                )\n                fileDeleted, err := client.Files.Delete(context.TODO(), \"file_id\")\n                if err != nil {\n                  panic(err.Error())\n                }\n                fmt.Printf(\"%+v\\n\", fileDeleted.ID)\n              }\n            java: |-\n              package com.openai.example;\n\n              import com.openai.client.OpenAIClient;\n              import com.openai.client.okhttp.OpenAIOkHttpClient;\n              import com.openai.models.files.FileDeleteParams;\n              import com.openai.models.files.FileDeleted;\n\n              public final class Main {\n                  private Main() {}\n\n                  public static void main(String[] args) {\n                      OpenAIClient client = OpenAIOkHttpClient.fromEnv();\n\n                      FileDeleted fileDeleted = client.files().delete(\"file_id\");\n                  }\n              }\n            ruby: |-\n              require \"openai\"\n\n              openai = OpenAI::Client.new(api_key: \"My API Key\")\n\n              file_deleted = openai.files.delete(\"file_id\")\n\n              puts(file_deleted)\n      description: Delete a file.\n    get:\n      operationId: retrieveFile\n      tags:\n        - Files\n      summary: Retrieve file\n      parameters:\n        - in: path\n          name: file_id\n          required: true\n          schema:\n            type: string\n          description: The ID of the file to use for this request.\n      responses:\n        '200':\n          description: OK\n          content:\n            application/json:\n              schema:\n                $ref: '#/components/schemas/OpenAIFile'\n      x-oaiMeta:\n        name: Retrieve file\n        group: files\n        returns: >-\n          The [File](https://platform.openai.com/docs/api-reference/files/object) object matching the\n          specified ID.\n        examples:\n          response: |\n            {\n              \"id\": \"file-abc123\",\n              \"object\": \"file\",\n              \"bytes\": 120000,\n              \"created_at\": 1677610602,\n              \"expires_at\": 1677614202,\n              \"filename\": \"mydata.jsonl\",\n              \"purpose\": \"fine-tune\",\n            }\n          request:\n            curl: |\n              curl https://api.openai.com/v1/files/file-abc123 \\\n                -H \"Authorization: Bearer $OPENAI_API_KEY\"\n            python: |-\n              from openai import OpenAI\n\n              client = OpenAI(\n                  api_key=\"My API Key\",\n              )\n              file_object = client.files.retrieve(\n                  \"file_id\",\n              )\n              print(file_object.id)\n            node.js: |-\n              import OpenAI from 'openai';\n\n              const client = new OpenAI({\n                apiKey: 'My API Key',\n              });\n\n              const fileObject = await client.files.retrieve('file_id');\n\n              console.log(fileObject.id);\n            go: |\n              package main\n\n              import (\n                \"context\"\n                \"fmt\"\n\n                \"github.com/openai/openai-go\"\n                \"github.com/openai/openai-go/option\"\n              )\n\n              func main() {\n                client := openai.NewClient(\n                  option.WithAPIKey(\"My API Key\"),\n                )\n                fileObject, err := client.Files.Get(context.TODO(), \"file_id\")\n                if err != nil {\n                  panic(err.Error())\n                }\n                fmt.Printf(\"%+v\\n\", fileObject.ID)\n              }\n            java: |-\n              package com.openai.example;\n\n              import com.openai.client.OpenAIClient;\n              import com.openai.client.okhttp.OpenAIOkHttpClient;\n              import com.openai.models.files.FileObject;\n              import com.openai.models.files.FileRetrieveParams;\n\n              public final class Main {\n                  private Main() {}\n\n                  public static void main(String[] args) {\n                      OpenAIClient client = OpenAIOkHttpClient.fromEnv();\n\n                      FileObject fileObject = client.files().retrieve(\"file_id\");\n                  }\n              }\n            ruby: |-\n              require \"openai\"\n\n              openai = OpenAI::Client.new(api_key: \"My API Key\")\n\n              file_object = openai.files.retrieve(\"file_id\")\n\n              puts(file_object)\n      description: Returns information about a specific file.\n  /files/{file_id}/content:\n    get:\n      operationId: downloadFile\n      tags:\n        - Files\n      summary: Retrieve file content\n      parameters:\n        - in: path\n          name: file_id\n          required: true\n          schema:\n            type: string\n          description: The ID of the file to use for this request.\n      responses:\n        '200':\n          description: OK\n          content:\n            application/json:\n              schema:\n                type: string\n      x-oaiMeta:\n        name: Retrieve file content\n        group: files\n        returns: The file content.\n        examples:\n          response: ''\n          request:\n            curl: |\n              curl https://api.openai.com/v1/files/file-abc123/content \\\n                -H \"Authorization: Bearer $OPENAI_API_KEY\" > file.jsonl\n            python: |-\n              from openai import OpenAI\n\n              client = OpenAI(\n                  api_key=\"My API Key\",\n              )\n              response = client.files.content(\n                  \"file_id\",\n              )\n              print(response)\n              content = response.read()\n              print(content)\n            node.js: |-\n              import OpenAI from 'openai';\n\n              const client = new OpenAI({\n                apiKey: 'My API Key',\n              });\n\n              const response = await client.files.content('file_id');\n\n              console.log(response);\n\n              const content = await response.blob();\n              console.log(content);\n            go: |\n              package main\n\n              import (\n                \"context\"\n                \"fmt\"\n\n                \"github.com/openai/openai-go\"\n                \"github.com/openai/openai-go/option\"\n              )\n\n              func main() {\n                client := openai.NewClient(\n                  option.WithAPIKey(\"My API Key\"),\n                )\n                response, err := client.Files.Content(context.TODO(), \"file_id\")\n                if err != nil {\n                  panic(err.Error())\n                }\n                fmt.Printf(\"%+v\\n\", response)\n              }\n            java: |-\n              package com.openai.example;\n\n              import com.openai.client.OpenAIClient;\n              import com.openai.client.okhttp.OpenAIOkHttpClient;\n              import com.openai.core.http.HttpResponse;\n              import com.openai.models.files.FileContentParams;\n\n              public final class Main {\n                  private Main() {}\n\n                  public static void main(String[] args) {\n                      OpenAIClient client = OpenAIOkHttpClient.fromEnv();\n\n                      HttpResponse response = client.files().content(\"file_id\");\n                  }\n              }\n            ruby: |-\n              require \"openai\"\n\n              openai = OpenAI::Client.new(api_key: \"My API Key\")\n\n              response = openai.files.content(\"file_id\")\n\n              puts(response)\n      description: Returns the contents of the specified file.\n  /fine_tuning/alpha/graders/run:\n    post:\n      operationId: runGrader\n      tags:\n        - Fine-tuning\n      summary: Run grader\n      requestBody:\n        required: true\n        content:\n          application/json:\n            schema:\n              $ref: '#/components/schemas/RunGraderRequest'\n      responses:\n        '200':\n          description: OK\n          content:\n            application/json:\n              schema:\n                $ref: '#/components/schemas/RunGraderResponse'\n      x-oaiMeta:\n        name: Run grader\n        beta: true\n        group: graders\n        returns: The results from the grader run.\n        examples:\n          response: |\n            {\n              \"reward\": 1.0,\n              \"metadata\": {\n                \"name\": \"Example score model grader\",\n                \"type\": \"score_model\",\n                \"errors\": {\n                  \"formula_parse_error\": false,\n                  \"sample_parse_error\": false,\n                  \"truncated_observation_error\": false,\n                  \"unresponsive_reward_error\": false,\n                  \"invalid_variable_error\": false,\n                  \"other_error\": false,\n                  \"python_grader_server_error\": false,\n                  \"python_grader_server_error_type\": null,\n                  \"python_grader_runtime_error\": false,\n                  \"python_grader_runtime_error_details\": null,\n                  \"model_grader_server_error\": false,\n                  \"model_grader_refusal_error\": false,\n                  \"model_grader_parse_error\": false,\n                  \"model_grader_server_error_details\": null\n                },\n                \"execution_time\": 4.365238428115845,\n                \"scores\": {},\n                \"token_usage\": {\n                  \"prompt_tokens\": 190,\n                  \"total_tokens\": 324,\n                  \"completion_tokens\": 134,\n                  \"cached_tokens\": 0\n                },\n                \"sampled_model_name\": \"gpt-4o-2024-08-06\"\n              },\n              \"sub_rewards\": {},\n              \"model_grader_token_usage_per_model\": {\n                \"gpt-4o-2024-08-06\": {\n                  \"prompt_tokens\": 190,\n                  \"total_tokens\": 324,\n                  \"completion_tokens\": 134,\n                  \"cached_tokens\": 0\n                }\n              }\n            }\n          request:\n            curl: |\n              curl -X POST https://api.openai.com/v1/fine_tuning/alpha/graders/run \\\n                -H \"Content-Type: application/json\" \\\n                -H \"Authorization: Bearer $OPENAI_API_KEY\" \\\n                -d '{\n                  \"grader\": {\n                    \"type\": \"score_model\",\n                    \"name\": \"Example score model grader\",\n                    \"input\": [\n                      {\n                        \"role\": \"user\",\n                        \"content\": \"Score how close the reference answer is to the model answer. Score 1.0 if they are the same and 0.0 if they are different. Return just a floating point score\\n\\nReference answer: {{item.reference_answer}}\\n\\nModel answer: {{sample.output_text}}\"\n                      }\n                    ],\n                    \"model\": \"gpt-4o-2024-08-06\",\n                    \"sampling_params\": {\n                      \"temperature\": 1,\n                      \"top_p\": 1,\n                      \"seed\": 42\n                    }\n                  },\n                  \"item\": {\n                    \"reference_answer\": \"fuzzy wuzzy was a bear\"\n                  },\n                  \"model_sample\": \"fuzzy wuzzy was a bear\"\n                }'\n            node.js: |-\n              import OpenAI from 'openai';\n\n              const client = new OpenAI({\n                apiKey: 'My API Key',\n              });\n\n              const response = await client.fineTuning.alpha.graders.run({\n                grader: { input: 'input', name: 'name', operation: 'eq', reference: 'reference', type: 'string_check' },\n                model_sample: 'model_sample',\n              });\n\n              console.log(response.metadata);\n            python: |-\n              from openai import OpenAI\n\n              client = OpenAI(\n                  api_key=\"My API Key\",\n              )\n              response = client.fine_tuning.alpha.graders.run(\n                  grader={\n                      \"input\": \"input\",\n                      \"name\": \"name\",\n                      \"operation\": \"eq\",\n                      \"reference\": \"reference\",\n                      \"type\": \"string_check\",\n                  },\n                  model_sample=\"model_sample\",\n              )\n              print(response.metadata)\n            go: |\n              package main\n\n              import (\n                \"context\"\n                \"fmt\"\n\n                \"github.com/openai/openai-go\"\n                \"github.com/openai/openai-go/option\"\n              )\n\n              func main() {\n                client := openai.NewClient(\n                  option.WithAPIKey(\"My API Key\"),\n                )\n                response, err := client.FineTuning.Alpha.Graders.Run(context.TODO(), openai.FineTuningAlphaGraderRunParams{\n                  Grader: openai.FineTuningAlphaGraderRunParamsGraderUnion{\n                    OfStringCheck: &openai.StringCheckGraderParam{\n                      Input: \"input\",\n                      Name: \"name\",\n                      Operation: openai.StringCheckGraderOperationEq,\n                      Reference: \"reference\",\n                    },\n                  },\n                  ModelSample: \"model_sample\",\n                })\n                if err != nil {\n                  panic(err.Error())\n                }\n                fmt.Printf(\"%+v\\n\", response.Metadata)\n              }\n            java: |-\n              package com.openai.example;\n\n              import com.openai.client.OpenAIClient;\n              import com.openai.client.okhttp.OpenAIOkHttpClient;\n              import com.openai.models.finetuning.alpha.graders.GraderRunParams;\n              import com.openai.models.finetuning.alpha.graders.GraderRunResponse;\n              import com.openai.models.graders.gradermodels.StringCheckGrader;\n\n              public final class Main {\n                  private Main() {}\n\n                  public static void main(String[] args) {\n                      OpenAIClient client = OpenAIOkHttpClient.fromEnv();\n\n                      GraderRunParams params = GraderRunParams.builder()\n                          .grader(StringCheckGrader.builder()\n                              .input(\"input\")\n                              .name(\"name\")\n                              .operation(StringCheckGrader.Operation.EQ)\n                              .reference(\"reference\")\n                              .build())\n                          .modelSample(\"model_sample\")\n                          .build();\n                      GraderRunResponse response = client.fineTuning().alpha().graders().run(params);\n                  }\n              }\n            ruby: |-\n              require \"openai\"\n\n              openai = OpenAI::Client.new(api_key: \"My API Key\")\n\n              response = openai.fine_tuning.alpha.graders.run(\n                grader: {input: \"input\", name: \"name\", operation: :eq, reference: \"reference\", type: :string_check},\n                model_sample: \"model_sample\"\n              )\n\n              puts(response)\n      description: |\n        Run a grader.\n  /fine_tuning/alpha/graders/validate:\n    post:\n      operationId: validateGrader\n      tags:\n        - Fine-tuning\n      summary: Validate grader\n      requestBody:\n        required: true\n        content:\n          application/json:\n            schema:\n              $ref: '#/components/schemas/ValidateGraderRequest'\n      responses:\n        '200':\n          description: OK\n          content:\n            application/json:\n              schema:\n                $ref: '#/components/schemas/ValidateGraderResponse'\n      x-oaiMeta:\n        name: Validate grader\n        beta: true\n        group: graders\n        returns: The validated grader object.\n        examples:\n          response: |\n            {\n              \"grader\": {\n                \"type\": \"string_check\",\n                \"name\": \"Example string check grader\",\n                \"input\": \"{{sample.output_text}}\",\n                \"reference\": \"{{item.label}}\",\n                \"operation\": \"eq\"\n              }\n            }\n          request:\n            curl: |\n              curl https://api.openai.com/v1/fine_tuning/alpha/graders/validate \\\n                -H \"Authorization: Bearer $OPENAI_API_KEY\" \\\n                -H \"Content-Type: application/json\" \\\n                -d '{\n                  \"grader\": {\n                    \"type\": \"string_check\",\n                    \"name\": \"Example string check grader\",\n                    \"input\": \"{{sample.output_text}}\",\n                    \"reference\": \"{{item.label}}\",\n                    \"operation\": \"eq\"\n                  }\n                }'\n            node.js: |-\n              import OpenAI from 'openai';\n\n              const client = new OpenAI({\n                apiKey: 'My API Key',\n              });\n\n              const response = await client.fineTuning.alpha.graders.validate({\n                grader: { input: 'input', name: 'name', operation: 'eq', reference: 'reference', type: 'string_check' },\n              });\n\n              console.log(response.grader);\n            python: |-\n              from openai import OpenAI\n\n              client = OpenAI(\n                  api_key=\"My API Key\",\n              )\n              response = client.fine_tuning.alpha.graders.validate(\n                  grader={\n                      \"input\": \"input\",\n                      \"name\": \"name\",\n                      \"operation\": \"eq\",\n                      \"reference\": \"reference\",\n                      \"type\": \"string_check\",\n                  },\n              )\n              print(response.grader)\n            go: |\n              package main\n\n              import (\n                \"context\"\n                \"fmt\"\n\n                \"github.com/openai/openai-go\"\n                \"github.com/openai/openai-go/option\"\n              )\n\n              func main() {\n                client := openai.NewClient(\n                  option.WithAPIKey(\"My API Key\"),\n                )\n                response, err := client.FineTuning.Alpha.Graders.Validate(context.TODO(), openai.FineTuningAlphaGraderValidateParams{\n                  Grader: openai.FineTuningAlphaGraderValidateParamsGraderUnion{\n                    OfStringCheckGrader: &openai.StringCheckGraderParam{\n                      Input: \"input\",\n                      Name: \"name\",\n                      Operation: openai.StringCheckGraderOperationEq,\n                      Reference: \"reference\",\n                    },\n                  },\n                })\n                if err != nil {\n                  panic(err.Error())\n                }\n                fmt.Printf(\"%+v\\n\", response.Grader)\n              }\n            java: |-\n              package com.openai.example;\n\n              import com.openai.client.OpenAIClient;\n              import com.openai.client.okhttp.OpenAIOkHttpClient;\n              import com.openai.models.finetuning.alpha.graders.GraderValidateParams;\n              import com.openai.models.finetuning.alpha.graders.GraderValidateResponse;\n              import com.openai.models.graders.gradermodels.StringCheckGrader;\n\n              public final class Main {\n                  private Main() {}\n\n                  public static void main(String[] args) {\n                      OpenAIClient client = OpenAIOkHttpClient.fromEnv();\n\n                      GraderValidateParams params = GraderValidateParams.builder()\n                          .grader(StringCheckGrader.builder()\n                              .input(\"input\")\n                              .name(\"name\")\n                              .operation(StringCheckGrader.Operation.EQ)\n                              .reference(\"reference\")\n                              .build())\n                          .build();\n                      GraderValidateResponse response = client.fineTuning().alpha().graders().validate(params);\n                  }\n              }\n            ruby: |-\n              require \"openai\"\n\n              openai = OpenAI::Client.new(api_key: \"My API Key\")\n\n              response = openai.fine_tuning.alpha.graders.validate(\n                grader: {input: \"input\", name: \"name\", operation: :eq, reference: \"reference\", type: :string_check}\n              )\n\n              puts(response)\n      description: |\n        Validate a grader.\n  /fine_tuning/checkpoints/{fine_tuned_model_checkpoint}/permissions:\n    get:\n      operationId: listFineTuningCheckpointPermissions\n      tags:\n        - Fine-tuning\n      summary: List checkpoint permissions\n      parameters:\n        - in: path\n          name: fine_tuned_model_checkpoint\n          required: true\n          schema:\n            type: string\n            example: ft-AF1WoRqd3aJAHsqc9NY7iL8F\n          description: |\n            The ID of the fine-tuned model checkpoint to get permissions for.\n        - name: project_id\n          in: query\n          description: The ID of the project to get permissions for.\n          required: false\n          schema:\n            type: string\n        - name: after\n          in: query\n          description: Identifier for the last permission ID from the previous pagination request.\n          required: false\n          schema:\n            type: string\n        - name: limit\n          in: query\n          description: Number of permissions to retrieve.\n          required: false\n          schema:\n            type: integer\n            default: 10\n        - name: order\n          in: query\n          description: The order in which to retrieve permissions.\n          required: false\n          schema:\n            type: string\n            enum:\n              - ascending\n              - descending\n            default: descending\n      responses:\n        '200':\n          description: OK\n          content:\n            application/json:\n              schema:\n                $ref: '#/components/schemas/ListFineTuningCheckpointPermissionResponse'\n      x-oaiMeta:\n        name: List checkpoint permissions\n        group: fine-tuning\n        returns: >-\n          A list of fine-tuned model checkpoint [permission\n          objects](https://platform.openai.com/docs/api-reference/fine-tuning/permission-object) for a\n          fine-tuned model checkpoint.\n        examples:\n          response: |\n            {\n              \"object\": \"list\",\n              \"data\": [\n                {\n                  \"object\": \"checkpoint.permission\",\n                  \"id\": \"cp_zc4Q7MP6XxulcVzj4MZdwsAB\",\n                  \"created_at\": 1721764867,\n                  \"project_id\": \"proj_abGMw1llN8IrBb6SvvY5A1iH\"\n                },\n                {\n                  \"object\": \"checkpoint.permission\",\n                  \"id\": \"cp_enQCFmOTGj3syEpYVhBRLTSy\",\n                  \"created_at\": 1721764800,\n                  \"project_id\": \"proj_iqGMw1llN8IrBb6SvvY5A1oF\"\n                },\n              ],\n              \"first_id\": \"cp_zc4Q7MP6XxulcVzj4MZdwsAB\",\n              \"last_id\": \"cp_enQCFmOTGj3syEpYVhBRLTSy\",\n              \"has_more\": false\n            }\n          request:\n            curl: >\n              curl\n              https://api.openai.com/v1/fine_tuning/checkpoints/ft:gpt-4o-mini-2024-07-18:org:weather:B7R9VjQd/permissions\n              \\\n                -H \"Authorization: Bearer $OPENAI_API_KEY\"\n            node.js: >-\n              import OpenAI from 'openai';\n\n\n              const client = new OpenAI({\n                apiKey: 'My API Key',\n              });\n\n\n              const permission = await\n              client.fineTuning.checkpoints.permissions.retrieve('ft-AF1WoRqd3aJAHsqc9NY7iL8F');\n\n\n              console.log(permission.first_id);\n            python: |-\n              from openai import OpenAI\n\n              client = OpenAI(\n                  api_key=\"My API Key\",\n              )\n              permission = client.fine_tuning.checkpoints.permissions.retrieve(\n                  fine_tuned_model_checkpoint=\"ft-AF1WoRqd3aJAHsqc9NY7iL8F\",\n              )\n              print(permission.first_id)\n            go: |\n              package main\n\n              import (\n                \"context\"\n                \"fmt\"\n\n                \"github.com/openai/openai-go\"\n                \"github.com/openai/openai-go/option\"\n              )\n\n              func main() {\n                client := openai.NewClient(\n                  option.WithAPIKey(\"My API Key\"),\n                )\n                permission, err := client.FineTuning.Checkpoints.Permissions.Get(\n                  context.TODO(),\n                  \"ft-AF1WoRqd3aJAHsqc9NY7iL8F\",\n                  openai.FineTuningCheckpointPermissionGetParams{\n\n                  },\n                )\n                if err != nil {\n                  panic(err.Error())\n                }\n                fmt.Printf(\"%+v\\n\", permission.FirstID)\n              }\n            java: |-\n              package com.openai.example;\n\n              import com.openai.client.OpenAIClient;\n              import com.openai.client.okhttp.OpenAIOkHttpClient;\n              import com.openai.models.finetuning.checkpoints.permissions.PermissionRetrieveParams;\n              import com.openai.models.finetuning.checkpoints.permissions.PermissionRetrieveResponse;\n\n              public final class Main {\n                  private Main() {}\n\n                  public static void main(String[] args) {\n                      OpenAIClient client = OpenAIOkHttpClient.fromEnv();\n\n                      PermissionRetrieveResponse permission = client.fineTuning().checkpoints().permissions().retrieve(\"ft-AF1WoRqd3aJAHsqc9NY7iL8F\");\n                  }\n              }\n            ruby: |-\n              require \"openai\"\n\n              openai = OpenAI::Client.new(api_key: \"My API Key\")\n\n              permission = openai.fine_tuning.checkpoints.permissions.retrieve(\"ft-AF1WoRqd3aJAHsqc9NY7iL8F\")\n\n              puts(permission)\n      description: |\n        **NOTE:** This endpoint requires an [admin API key](../admin-api-keys).\n\n        Organization owners can use this endpoint to view all permissions for a fine-tuned model checkpoint.\n    post:\n      operationId: createFineTuningCheckpointPermission\n      tags:\n        - Fine-tuning\n      summary: Create checkpoint permissions\n      parameters:\n        - in: path\n          name: fine_tuned_model_checkpoint\n          required: true\n          schema:\n            type: string\n            example: ft:gpt-4o-mini-2024-07-18:org:weather:B7R9VjQd\n          description: |\n            The ID of the fine-tuned model checkpoint to create a permission for.\n      requestBody:\n        required: true\n        content:\n          application/json:\n            schema:\n              $ref: '#/components/schemas/CreateFineTuningCheckpointPermissionRequest'\n      responses:\n        '200':\n          description: OK\n          content:\n            application/json:\n              schema:\n                $ref: '#/components/schemas/ListFineTuningCheckpointPermissionResponse'\n      x-oaiMeta:\n        name: Create checkpoint permissions\n        group: fine-tuning\n        returns: >-\n          A list of fine-tuned model checkpoint [permission\n          objects](https://platform.openai.com/docs/api-reference/fine-tuning/permission-object) for a\n          fine-tuned model checkpoint.\n        examples:\n          response: |\n            {\n              \"object\": \"list\",\n              \"data\": [\n                {\n                  \"object\": \"checkpoint.permission\",\n                  \"id\": \"cp_zc4Q7MP6XxulcVzj4MZdwsAB\",\n                  \"created_at\": 1721764867,\n                  \"project_id\": \"proj_abGMw1llN8IrBb6SvvY5A1iH\"\n                }\n              ],\n              \"first_id\": \"cp_zc4Q7MP6XxulcVzj4MZdwsAB\",\n              \"last_id\": \"cp_zc4Q7MP6XxulcVzj4MZdwsAB\",\n              \"has_more\": false\n            }\n          request:\n            curl: >\n              curl\n              https://api.openai.com/v1/fine_tuning/checkpoints/ft:gpt-4o-mini-2024-07-18:org:weather:B7R9VjQd/permissions\n              \\\n                -H \"Authorization: Bearer $OPENAI_API_KEY\"\n                -d '{\"project_ids\": [\"proj_abGMw1llN8IrBb6SvvY5A1iH\"]}'\n            node.js: |-\n              import OpenAI from 'openai';\n\n              const client = new OpenAI({\n                apiKey: 'My API Key',\n              });\n\n              // Automatically fetches more pages as needed.\n              for await (const permissionCreateResponse of client.fineTuning.checkpoints.permissions.create(\n                'ft:gpt-4o-mini-2024-07-18:org:weather:B7R9VjQd',\n                { project_ids: ['string'] },\n              )) {\n                console.log(permissionCreateResponse.id);\n              }\n            python: |-\n              from openai import OpenAI\n\n              client = OpenAI(\n                  api_key=\"My API Key\",\n              )\n              page = client.fine_tuning.checkpoints.permissions.create(\n                  fine_tuned_model_checkpoint=\"ft:gpt-4o-mini-2024-07-18:org:weather:B7R9VjQd\",\n                  project_ids=[\"string\"],\n              )\n              page = page.data[0]\n              print(page.id)\n            go: |\n              package main\n\n              import (\n                \"context\"\n                \"fmt\"\n\n                \"github.com/openai/openai-go\"\n                \"github.com/openai/openai-go/option\"\n              )\n\n              func main() {\n                client := openai.NewClient(\n                  option.WithAPIKey(\"My API Key\"),\n                )\n                page, err := client.FineTuning.Checkpoints.Permissions.New(\n                  context.TODO(),\n                  \"ft:gpt-4o-mini-2024-07-18:org:weather:B7R9VjQd\",\n                  openai.FineTuningCheckpointPermissionNewParams{\n                    ProjectIDs: []string{\"string\"},\n                  },\n                )\n                if err != nil {\n                  panic(err.Error())\n                }\n                fmt.Printf(\"%+v\\n\", page)\n              }\n            java: |-\n              package com.openai.example;\n\n              import com.openai.client.OpenAIClient;\n              import com.openai.client.okhttp.OpenAIOkHttpClient;\n              import com.openai.models.finetuning.checkpoints.permissions.PermissionCreatePage;\n              import com.openai.models.finetuning.checkpoints.permissions.PermissionCreateParams;\n\n              public final class Main {\n                  private Main() {}\n\n                  public static void main(String[] args) {\n                      OpenAIClient client = OpenAIOkHttpClient.fromEnv();\n\n                      PermissionCreateParams params = PermissionCreateParams.builder()\n                          .fineTunedModelCheckpoint(\"ft:gpt-4o-mini-2024-07-18:org:weather:B7R9VjQd\")\n                          .addProjectId(\"string\")\n                          .build();\n                      PermissionCreatePage page = client.fineTuning().checkpoints().permissions().create(params);\n                  }\n              }\n            ruby: |-\n              require \"openai\"\n\n              openai = OpenAI::Client.new(api_key: \"My API Key\")\n\n              page = openai.fine_tuning.checkpoints.permissions.create(\n                \"ft:gpt-4o-mini-2024-07-18:org:weather:B7R9VjQd\",\n                project_ids: [\"string\"]\n              )\n\n              puts(page)\n      description: |\n        **NOTE:** Calling this endpoint requires an [admin API key](../admin-api-keys).\n\n        This enables organization owners to share fine-tuned models with other projects in their organization.\n  /fine_tuning/checkpoints/{fine_tuned_model_checkpoint}/permissions/{permission_id}:\n    delete:\n      operationId: deleteFineTuningCheckpointPermission\n      tags:\n        - Fine-tuning\n      summary: Delete checkpoint permission\n      parameters:\n        - in: path\n          name: fine_tuned_model_checkpoint\n          required: true\n          schema:\n            type: string\n            example: ft:gpt-4o-mini-2024-07-18:org:weather:B7R9VjQd\n          description: |\n            The ID of the fine-tuned model checkpoint to delete a permission for.\n        - in: path\n          name: permission_id\n          required: true\n          schema:\n            type: string\n            example: cp_zc4Q7MP6XxulcVzj4MZdwsAB\n          description: |\n            The ID of the fine-tuned model checkpoint permission to delete.\n      responses:\n        '200':\n          description: OK\n          content:\n            application/json:\n              schema:\n                $ref: '#/components/schemas/DeleteFineTuningCheckpointPermissionResponse'\n      x-oaiMeta:\n        name: Delete checkpoint permission\n        group: fine-tuning\n        returns: >-\n          The deletion status of the fine-tuned model checkpoint [permission\n          object](https://platform.openai.com/docs/api-reference/fine-tuning/permission-object).\n        examples:\n          response: |\n            {\n              \"object\": \"checkpoint.permission\",\n              \"id\": \"cp_zc4Q7MP6XxulcVzj4MZdwsAB\",\n              \"deleted\": true\n            }\n          request:\n            curl: >\n              curl\n              https://api.openai.com/v1/fine_tuning/checkpoints/ft:gpt-4o-mini-2024-07-18:org:weather:B7R9VjQd/permissions/cp_zc4Q7MP6XxulcVzj4MZdwsAB\n              \\\n                -H \"Authorization: Bearer $OPENAI_API_KEY\"\n            node.js: >-\n              import OpenAI from 'openai';\n\n\n              const client = new OpenAI({\n                apiKey: 'My API Key',\n              });\n\n\n              const permission = await\n              client.fineTuning.checkpoints.permissions.delete('cp_zc4Q7MP6XxulcVzj4MZdwsAB', {\n                fine_tuned_model_checkpoint: 'ft:gpt-4o-mini-2024-07-18:org:weather:B7R9VjQd',\n              });\n\n\n              console.log(permission.id);\n            python: |-\n              from openai import OpenAI\n\n              client = OpenAI(\n                  api_key=\"My API Key\",\n              )\n              permission = client.fine_tuning.checkpoints.permissions.delete(\n                  permission_id=\"cp_zc4Q7MP6XxulcVzj4MZdwsAB\",\n                  fine_tuned_model_checkpoint=\"ft:gpt-4o-mini-2024-07-18:org:weather:B7R9VjQd\",\n              )\n              print(permission.id)\n            go: |\n              package main\n\n              import (\n                \"context\"\n                \"fmt\"\n\n                \"github.com/openai/openai-go\"\n                \"github.com/openai/openai-go/option\"\n              )\n\n              func main() {\n                client := openai.NewClient(\n                  option.WithAPIKey(\"My API Key\"),\n                )\n                permission, err := client.FineTuning.Checkpoints.Permissions.Delete(\n                  context.TODO(),\n                  \"ft:gpt-4o-mini-2024-07-18:org:weather:B7R9VjQd\",\n                  \"cp_zc4Q7MP6XxulcVzj4MZdwsAB\",\n                )\n                if err != nil {\n                  panic(err.Error())\n                }\n                fmt.Printf(\"%+v\\n\", permission.ID)\n              }\n            java: |-\n              package com.openai.example;\n\n              import com.openai.client.OpenAIClient;\n              import com.openai.client.okhttp.OpenAIOkHttpClient;\n              import com.openai.models.finetuning.checkpoints.permissions.PermissionDeleteParams;\n              import com.openai.models.finetuning.checkpoints.permissions.PermissionDeleteResponse;\n\n              public final class Main {\n                  private Main() {}\n\n                  public static void main(String[] args) {\n                      OpenAIClient client = OpenAIOkHttpClient.fromEnv();\n\n                      PermissionDeleteParams params = PermissionDeleteParams.builder()\n                          .fineTunedModelCheckpoint(\"ft:gpt-4o-mini-2024-07-18:org:weather:B7R9VjQd\")\n                          .permissionId(\"cp_zc4Q7MP6XxulcVzj4MZdwsAB\")\n                          .build();\n                      PermissionDeleteResponse permission = client.fineTuning().checkpoints().permissions().delete(params);\n                  }\n              }\n            ruby: |-\n              require \"openai\"\n\n              openai = OpenAI::Client.new(api_key: \"My API Key\")\n\n              permission = openai.fine_tuning.checkpoints.permissions.delete(\n                \"cp_zc4Q7MP6XxulcVzj4MZdwsAB\",\n                fine_tuned_model_checkpoint: \"ft:gpt-4o-mini-2024-07-18:org:weather:B7R9VjQd\"\n              )\n\n              puts(permission)\n      description: |\n        **NOTE:** This endpoint requires an [admin API key](../admin-api-keys).\n\n        Organization owners can use this endpoint to delete a permission for a fine-tuned model checkpoint.\n  /fine_tuning/jobs:\n    post:\n      operationId: createFineTuningJob\n      tags:\n        - Fine-tuning\n      summary: Create fine-tuning job\n      requestBody:\n        required: true\n        content:\n          application/json:\n            schema:\n              $ref: '#/components/schemas/CreateFineTuningJobRequest'\n      responses:\n        '200':\n          description: OK\n          content:\n            application/json:\n              schema:\n                $ref: '#/components/schemas/FineTuningJob'\n      x-oaiMeta:\n        name: Create fine-tuning job\n        group: fine-tuning\n        returns: A [fine-tuning.job](https://platform.openai.com/docs/api-reference/fine-tuning/object) object.\n        examples:\n          - title: Default\n            request:\n              curl: |\n                curl https://api.openai.com/v1/fine_tuning/jobs \\\n                  -H \"Content-Type: application/json\" \\\n                  -H \"Authorization: Bearer $OPENAI_API_KEY\" \\\n                  -d '{\n                    \"training_file\": \"file-BK7bzQj3FfZFXr7DbL6xJwfo\",\n                    \"model\": \"gpt-4o-mini\"\n                  }'\n              python: |-\n                from openai import OpenAI\n\n                client = OpenAI(\n                    api_key=\"My API Key\",\n                )\n                fine_tuning_job = client.fine_tuning.jobs.create(\n                    model=\"gpt-4o-mini\",\n                    training_file=\"file-abc123\",\n                )\n                print(fine_tuning_job.id)\n              node.js: |-\n                import OpenAI from 'openai';\n\n                const client = new OpenAI({\n                  apiKey: 'My API Key',\n                });\n\n                const fineTuningJob = await client.fineTuning.jobs.create({\n                  model: 'gpt-4o-mini',\n                  training_file: 'file-abc123',\n                });\n\n                console.log(fineTuningJob.id);\n              go: |\n                package main\n\n                import (\n                  \"context\"\n                  \"fmt\"\n\n                  \"github.com/openai/openai-go\"\n                  \"github.com/openai/openai-go/option\"\n                )\n\n                func main() {\n                  client := openai.NewClient(\n                    option.WithAPIKey(\"My API Key\"),\n                  )\n                  fineTuningJob, err := client.FineTuning.Jobs.New(context.TODO(), openai.FineTuningJobNewParams{\n                    Model: openai.FineTuningJobNewParamsModelBabbage002,\n                    TrainingFile: \"file-abc123\",\n                  })\n                  if err != nil {\n                    panic(err.Error())\n                  }\n                  fmt.Printf(\"%+v\\n\", fineTuningJob.ID)\n                }\n              java: |-\n                package com.openai.example;\n\n                import com.openai.client.OpenAIClient;\n                import com.openai.client.okhttp.OpenAIOkHttpClient;\n                import com.openai.models.finetuning.jobs.FineTuningJob;\n                import com.openai.models.finetuning.jobs.JobCreateParams;\n\n                public final class Main {\n                    private Main() {}\n\n                    public static void main(String[] args) {\n                        OpenAIClient client = OpenAIOkHttpClient.fromEnv();\n\n                        JobCreateParams params = JobCreateParams.builder()\n                            .model(JobCreateParams.Model.BABBAGE_002)\n                            .trainingFile(\"file-abc123\")\n                            .build();\n                        FineTuningJob fineTuningJob = client.fineTuning().jobs().create(params);\n                    }\n                }\n              ruby: >-\n                require \"openai\"\n\n\n                openai = OpenAI::Client.new(api_key: \"My API Key\")\n\n\n                fine_tuning_job = openai.fine_tuning.jobs.create(model: :\"babbage-002\", training_file:\n                \"file-abc123\")\n\n\n                puts(fine_tuning_job)\n            response: |\n              {\n                \"object\": \"fine_tuning.job\",\n                \"id\": \"ftjob-abc123\",\n                \"model\": \"gpt-4o-mini-2024-07-18\",\n                \"created_at\": 1721764800,\n                \"fine_tuned_model\": null,\n                \"organization_id\": \"org-123\",\n                \"result_files\": [],\n                \"status\": \"queued\",\n                \"validation_file\": null,\n                \"training_file\": \"file-abc123\",\n                \"method\": {\n                  \"type\": \"supervised\",\n                  \"supervised\": {\n                    \"hyperparameters\": {\n                      \"batch_size\": \"auto\",\n                      \"learning_rate_multiplier\": \"auto\",\n                      \"n_epochs\": \"auto\",\n                    }\n                  }\n                },\n                \"metadata\": null\n              }\n          - title: Epochs\n            request:\n              curl: |\n                curl https://api.openai.com/v1/fine_tuning/jobs \\\n                  -H \"Content-Type: application/json\" \\\n                  -H \"Authorization: Bearer $OPENAI_API_KEY\" \\\n                  -d '{\n                    \"training_file\": \"file-abc123\",\n                    \"model\": \"gpt-4o-mini\",\n                    \"method\": {\n                      \"type\": \"supervised\",\n                      \"supervised\": {\n                        \"hyperparameters\": {\n                          \"n_epochs\": 2\n                        }\n                      }\n                    }\n                  }'\n              python: |-\n                from openai import OpenAI\n\n                client = OpenAI(\n                    api_key=\"My API Key\",\n                )\n                fine_tuning_job = client.fine_tuning.jobs.create(\n                    model=\"gpt-4o-mini\",\n                    training_file=\"file-abc123\",\n                )\n                print(fine_tuning_job.id)\n              node.js: |-\n                import OpenAI from 'openai';\n\n                const client = new OpenAI({\n                  apiKey: 'My API Key',\n                });\n\n                const fineTuningJob = await client.fineTuning.jobs.create({\n                  model: 'gpt-4o-mini',\n                  training_file: 'file-abc123',\n                });\n\n                console.log(fineTuningJob.id);\n              go: |\n                package main\n\n                import (\n                  \"context\"\n                  \"fmt\"\n\n                  \"github.com/openai/openai-go\"\n                  \"github.com/openai/openai-go/option\"\n                )\n\n                func main() {\n                  client := openai.NewClient(\n                    option.WithAPIKey(\"My API Key\"),\n                  )\n                  fineTuningJob, err := client.FineTuning.Jobs.New(context.TODO(), openai.FineTuningJobNewParams{\n                    Model: openai.FineTuningJobNewParamsModelBabbage002,\n                    TrainingFile: \"file-abc123\",\n                  })\n                  if err != nil {\n                    panic(err.Error())\n                  }\n                  fmt.Printf(\"%+v\\n\", fineTuningJob.ID)\n                }\n              java: |-\n                package com.openai.example;\n\n                import com.openai.client.OpenAIClient;\n                import com.openai.client.okhttp.OpenAIOkHttpClient;\n                import com.openai.models.finetuning.jobs.FineTuningJob;\n                import com.openai.models.finetuning.jobs.JobCreateParams;\n\n                public final class Main {\n                    private Main() {}\n\n                    public static void main(String[] args) {\n                        OpenAIClient client = OpenAIOkHttpClient.fromEnv();\n\n                        JobCreateParams params = JobCreateParams.builder()\n                            .model(JobCreateParams.Model.BABBAGE_002)\n                            .trainingFile(\"file-abc123\")\n                            .build();\n                        FineTuningJob fineTuningJob = client.fineTuning().jobs().create(params);\n                    }\n                }\n              ruby: >-\n                require \"openai\"\n\n\n                openai = OpenAI::Client.new(api_key: \"My API Key\")\n\n\n                fine_tuning_job = openai.fine_tuning.jobs.create(model: :\"babbage-002\", training_file:\n                \"file-abc123\")\n\n\n                puts(fine_tuning_job)\n            response: |\n              {\n                \"object\": \"fine_tuning.job\",\n                \"id\": \"ftjob-abc123\",\n                \"model\": \"gpt-4o-mini\",\n                \"created_at\": 1721764800,\n                \"fine_tuned_model\": null,\n                \"organization_id\": \"org-123\",\n                \"result_files\": [],\n                \"status\": \"queued\",\n                \"validation_file\": null,\n                \"training_file\": \"file-abc123\",\n                \"hyperparameters\": {\n                  \"batch_size\": \"auto\",\n                  \"learning_rate_multiplier\": \"auto\",\n                  \"n_epochs\": 2\n                },\n                \"method\": {\n                  \"type\": \"supervised\",\n                  \"supervised\": {\n                    \"hyperparameters\": {\n                      \"batch_size\": \"auto\",\n                      \"learning_rate_multiplier\": \"auto\",\n                      \"n_epochs\": 2\n                    }\n                  }\n                },\n                \"metadata\": null,\n                \"error\": {\n                  \"code\": null,\n                  \"message\": null,\n                  \"param\": null\n                },\n                \"finished_at\": null,\n                \"seed\": 683058546,\n                \"trained_tokens\": null,\n                \"estimated_finish\": null,\n                \"integrations\": [],\n                \"user_provided_suffix\": null,\n                \"usage_metrics\": null,\n                \"shared_with_openai\": false\n              }\n          - title: DPO\n            request:\n              curl: |\n                curl https://api.openai.com/v1/fine_tuning/jobs \\\n                  -H \"Content-Type: application/json\" \\\n                  -H \"Authorization: Bearer $OPENAI_API_KEY\" \\\n                  -d '{\n                    \"training_file\": \"file-abc123\",\n                    \"validation_file\": \"file-abc123\",\n                    \"model\": \"gpt-4o-mini\",\n                    \"method\": {\n                      \"type\": \"dpo\",\n                      \"dpo\": {\n                        \"hyperparameters\": {\n                          \"beta\": 0.1\n                        }\n                      }\n                    }\n                  }'\n              node.js: |-\n                import OpenAI from 'openai';\n\n                const client = new OpenAI({\n                  apiKey: 'My API Key',\n                });\n\n                const fineTuningJob = await client.fineTuning.jobs.create({\n                  model: 'gpt-4o-mini',\n                  training_file: 'file-abc123',\n                });\n\n                console.log(fineTuningJob.id);\n              python: |-\n                from openai import OpenAI\n\n                client = OpenAI(\n                    api_key=\"My API Key\",\n                )\n                fine_tuning_job = client.fine_tuning.jobs.create(\n                    model=\"gpt-4o-mini\",\n                    training_file=\"file-abc123\",\n                )\n                print(fine_tuning_job.id)\n              go: |\n                package main\n\n                import (\n                  \"context\"\n                  \"fmt\"\n\n                  \"github.com/openai/openai-go\"\n                  \"github.com/openai/openai-go/option\"\n                )\n\n                func main() {\n                  client := openai.NewClient(\n                    option.WithAPIKey(\"My API Key\"),\n                  )\n                  fineTuningJob, err := client.FineTuning.Jobs.New(context.TODO(), openai.FineTuningJobNewParams{\n                    Model: openai.FineTuningJobNewParamsModelBabbage002,\n                    TrainingFile: \"file-abc123\",\n                  })\n                  if err != nil {\n                    panic(err.Error())\n                  }\n                  fmt.Printf(\"%+v\\n\", fineTuningJob.ID)\n                }\n              java: |-\n                package com.openai.example;\n\n                import com.openai.client.OpenAIClient;\n                import com.openai.client.okhttp.OpenAIOkHttpClient;\n                import com.openai.models.finetuning.jobs.FineTuningJob;\n                import com.openai.models.finetuning.jobs.JobCreateParams;\n\n                public final class Main {\n                    private Main() {}\n\n                    public static void main(String[] args) {\n                        OpenAIClient client = OpenAIOkHttpClient.fromEnv();\n\n                        JobCreateParams params = JobCreateParams.builder()\n                            .model(JobCreateParams.Model.BABBAGE_002)\n                            .trainingFile(\"file-abc123\")\n                            .build();\n                        FineTuningJob fineTuningJob = client.fineTuning().jobs().create(params);\n                    }\n                }\n              ruby: >-\n                require \"openai\"\n\n\n                openai = OpenAI::Client.new(api_key: \"My API Key\")\n\n\n                fine_tuning_job = openai.fine_tuning.jobs.create(model: :\"babbage-002\", training_file:\n                \"file-abc123\")\n\n\n                puts(fine_tuning_job)\n            python: |\n              from openai import OpenAI\n              from openai.types.fine_tuning import DpoMethod, DpoHyperparameters\n\n              client = OpenAI()\n\n              client.fine_tuning.jobs.create(\n                training_file=\"file-abc\",\n                validation_file=\"file-123\",\n                model=\"gpt-4o-mini\",\n                method={\n                  \"type\": \"dpo\",\n                  \"dpo\": DpoMethod(\n                    hyperparameters=DpoHyperparameters(beta=0.1)\n                  )\n                }\n              )\n            response: |\n              {\n                \"object\": \"fine_tuning.job\",\n                \"id\": \"ftjob-abc\",\n                \"model\": \"gpt-4o-mini\",\n                \"created_at\": 1746130590,\n                \"fine_tuned_model\": null,\n                \"organization_id\": \"org-abc\",\n                \"result_files\": [],\n                \"status\": \"queued\",\n                \"validation_file\": \"file-123\",\n                \"training_file\": \"file-abc\",\n                \"method\": {\n                  \"type\": \"dpo\",\n                  \"dpo\": {\n                    \"hyperparameters\": {\n                      \"beta\": 0.1,\n                      \"batch_size\": \"auto\",\n                      \"learning_rate_multiplier\": \"auto\",\n                      \"n_epochs\": \"auto\"\n                    }\n                  }\n                },\n                \"metadata\": null,\n                \"error\": {\n                  \"code\": null,\n                  \"message\": null,\n                  \"param\": null\n                },\n                \"finished_at\": null,\n                \"hyperparameters\": null,\n                \"seed\": 1036326793,\n                \"estimated_finish\": null,\n                \"integrations\": [],\n                \"user_provided_suffix\": null,\n                \"usage_metrics\": null,\n                \"shared_with_openai\": false\n              }\n          - title: Reinforcement\n            request:\n              curl: |\n                curl https://api.openai.com/v1/fine_tuning/jobs \\\n                  -H \"Content-Type: application/json\" \\\n                  -H \"Authorization: Bearer $OPENAI_API_KEY\" \\\n                  -d '{\n                    \"training_file\": \"file-abc\",\n                    \"validation_file\": \"file-123\",\n                    \"model\": \"o4-mini\",\n                    \"method\": {\n                      \"type\": \"reinforcement\",\n                      \"reinforcement\": {\n                        \"grader\": {\n                          \"type\": \"string_check\",\n                          \"name\": \"Example string check grader\",\n                          \"input\": \"{{sample.output_text}}\",\n                          \"reference\": \"{{item.label}}\",\n                          \"operation\": \"eq\"\n                        },\n                        \"hyperparameters\": {\n                          \"reasoning_effort\": \"medium\"\n                        }\n                      }\n                    }\n                  }'\n              python: |-\n                from openai import OpenAI\n\n                client = OpenAI(\n                    api_key=\"My API Key\",\n                )\n                fine_tuning_job = client.fine_tuning.jobs.create(\n                    model=\"gpt-4o-mini\",\n                    training_file=\"file-abc123\",\n                )\n                print(fine_tuning_job.id)\n              node.js: |-\n                import OpenAI from 'openai';\n\n                const client = new OpenAI({\n                  apiKey: 'My API Key',\n                });\n\n                const fineTuningJob = await client.fineTuning.jobs.create({\n                  model: 'gpt-4o-mini',\n                  training_file: 'file-abc123',\n                });\n\n                console.log(fineTuningJob.id);\n              go: |\n                package main\n\n                import (\n                  \"context\"\n                  \"fmt\"\n\n                  \"github.com/openai/openai-go\"\n                  \"github.com/openai/openai-go/option\"\n                )\n\n                func main() {\n                  client := openai.NewClient(\n                    option.WithAPIKey(\"My API Key\"),\n                  )\n                  fineTuningJob, err := client.FineTuning.Jobs.New(context.TODO(), openai.FineTuningJobNewParams{\n                    Model: openai.FineTuningJobNewParamsModelBabbage002,\n                    TrainingFile: \"file-abc123\",\n                  })\n                  if err != nil {\n                    panic(err.Error())\n                  }\n                  fmt.Printf(\"%+v\\n\", fineTuningJob.ID)\n                }\n              java: |-\n                package com.openai.example;\n\n                import com.openai.client.OpenAIClient;\n                import com.openai.client.okhttp.OpenAIOkHttpClient;\n                import com.openai.models.finetuning.jobs.FineTuningJob;\n                import com.openai.models.finetuning.jobs.JobCreateParams;\n\n                public final class Main {\n                    private Main() {}\n\n                    public static void main(String[] args) {\n                        OpenAIClient client = OpenAIOkHttpClient.fromEnv();\n\n                        JobCreateParams params = JobCreateParams.builder()\n                            .model(JobCreateParams.Model.BABBAGE_002)\n                            .trainingFile(\"file-abc123\")\n                            .build();\n                        FineTuningJob fineTuningJob = client.fineTuning().jobs().create(params);\n                    }\n                }\n              ruby: >-\n                require \"openai\"\n\n\n                openai = OpenAI::Client.new(api_key: \"My API Key\")\n\n\n                fine_tuning_job = openai.fine_tuning.jobs.create(model: :\"babbage-002\", training_file:\n                \"file-abc123\")\n\n\n                puts(fine_tuning_job)\n            response: |\n              {\n                \"object\": \"fine_tuning.job\",\n                \"id\": \"ftjob-abc123\",\n                \"model\": \"o4-mini\",\n                \"created_at\": 1721764800,\n                \"finished_at\": null,\n                \"fine_tuned_model\": null,\n                \"organization_id\": \"org-123\",\n                \"result_files\": [],\n                \"status\": \"validating_files\",\n                \"validation_file\": \"file-123\",\n                \"training_file\": \"file-abc\",\n                \"trained_tokens\": null,\n                \"error\": {},\n                \"user_provided_suffix\": null,\n                \"seed\": 950189191,\n                \"estimated_finish\": null,\n                \"integrations\": [],\n                \"method\": {\n                  \"type\": \"reinforcement\",\n                  \"reinforcement\": {\n                    \"hyperparameters\": {\n                      \"batch_size\": \"auto\",\n                      \"learning_rate_multiplier\": \"auto\",\n                      \"n_epochs\": \"auto\",\n                      \"eval_interval\": \"auto\",\n                      \"eval_samples\": \"auto\",\n                      \"compute_multiplier\": \"auto\",\n                      \"reasoning_effort\": \"medium\"\n                    },\n                    \"grader\": {\n                      \"type\": \"string_check\",\n                      \"name\": \"Example string check grader\",\n                      \"input\": \"{{sample.output_text}}\",\n                      \"reference\": \"{{item.label}}\",\n                      \"operation\": \"eq\"\n                    },\n                    \"response_format\": null\n                  }\n                },\n                \"metadata\": null,\n                \"usage_metrics\": null,\n                \"shared_with_openai\": false\n              }\n\n          - title: Validation file\n            request:\n              curl: |\n                curl https://api.openai.com/v1/fine_tuning/jobs \\\n                  -H \"Content-Type: application/json\" \\\n                  -H \"Authorization: Bearer $OPENAI_API_KEY\" \\\n                  -d '{\n                    \"training_file\": \"file-abc123\",\n                    \"validation_file\": \"file-abc123\",\n                    \"model\": \"gpt-4o-mini\"\n                  }'\n              python: |-\n                from openai import OpenAI\n\n                client = OpenAI(\n                    api_key=\"My API Key\",\n                )\n                fine_tuning_job = client.fine_tuning.jobs.create(\n                    model=\"gpt-4o-mini\",\n                    training_file=\"file-abc123\",\n                )\n                print(fine_tuning_job.id)\n              node.js: |-\n                import OpenAI from 'openai';\n\n                const client = new OpenAI({\n                  apiKey: 'My API Key',\n                });\n\n                const fineTuningJob = await client.fineTuning.jobs.create({\n                  model: 'gpt-4o-mini',\n                  training_file: 'file-abc123',\n                });\n\n                console.log(fineTuningJob.id);\n              go: |\n                package main\n\n                import (\n                  \"context\"\n                  \"fmt\"\n\n                  \"github.com/openai/openai-go\"\n                  \"github.com/openai/openai-go/option\"\n                )\n\n                func main() {\n                  client := openai.NewClient(\n                    option.WithAPIKey(\"My API Key\"),\n                  )\n                  fineTuningJob, err := client.FineTuning.Jobs.New(context.TODO(), openai.FineTuningJobNewParams{\n                    Model: openai.FineTuningJobNewParamsModelBabbage002,\n                    TrainingFile: \"file-abc123\",\n                  })\n                  if err != nil {\n                    panic(err.Error())\n                  }\n                  fmt.Printf(\"%+v\\n\", fineTuningJob.ID)\n                }\n              java: |-\n                package com.openai.example;\n\n                import com.openai.client.OpenAIClient;\n                import com.openai.client.okhttp.OpenAIOkHttpClient;\n                import com.openai.models.finetuning.jobs.FineTuningJob;\n                import com.openai.models.finetuning.jobs.JobCreateParams;\n\n                public final class Main {\n                    private Main() {}\n\n                    public static void main(String[] args) {\n                        OpenAIClient client = OpenAIOkHttpClient.fromEnv();\n\n                        JobCreateParams params = JobCreateParams.builder()\n                            .model(JobCreateParams.Model.BABBAGE_002)\n                            .trainingFile(\"file-abc123\")\n                            .build();\n                        FineTuningJob fineTuningJob = client.fineTuning().jobs().create(params);\n                    }\n                }\n              ruby: >-\n                require \"openai\"\n\n\n                openai = OpenAI::Client.new(api_key: \"My API Key\")\n\n\n                fine_tuning_job = openai.fine_tuning.jobs.create(model: :\"babbage-002\", training_file:\n                \"file-abc123\")\n\n\n                puts(fine_tuning_job)\n            response: |\n              {\n                \"object\": \"fine_tuning.job\",\n                \"id\": \"ftjob-abc123\",\n                \"model\": \"gpt-4o-mini-2024-07-18\",\n                \"created_at\": 1721764800,\n                \"fine_tuned_model\": null,\n                \"organization_id\": \"org-123\",\n                \"result_files\": [],\n                \"status\": \"queued\",\n                \"validation_file\": \"file-abc123\",\n                \"training_file\": \"file-abc123\",\n                \"method\": {\n                  \"type\": \"supervised\",\n                  \"supervised\": {\n                    \"hyperparameters\": {\n                      \"batch_size\": \"auto\",\n                      \"learning_rate_multiplier\": \"auto\",\n                      \"n_epochs\": \"auto\",\n                    }\n                  }\n                },\n                \"metadata\": null\n              }\n          - title: W&B Integration\n            request:\n              curl: |\n                curl https://api.openai.com/v1/fine_tuning/jobs \\\n                  -H \"Content-Type: application/json\" \\\n                  -H \"Authorization: Bearer $OPENAI_API_KEY\" \\\n                  -d '{\n                    \"training_file\": \"file-abc123\",\n                    \"validation_file\": \"file-abc123\",\n                    \"model\": \"gpt-4o-mini\",\n                    \"integrations\": [\n                      {\n                        \"type\": \"wandb\",\n                        \"wandb\": {\n                          \"project\": \"my-wandb-project\",\n                          \"name\": \"ft-run-display-name\"\n                          \"tags\": [\n                            \"first-experiment\", \"v2\"\n                          ]\n                        }\n                      }\n                    ]\n                  }'\n              node.js: |-\n                import OpenAI from 'openai';\n\n                const client = new OpenAI({\n                  apiKey: 'My API Key',\n                });\n\n                const fineTuningJob = await client.fineTuning.jobs.create({\n                  model: 'gpt-4o-mini',\n                  training_file: 'file-abc123',\n                });\n\n                console.log(fineTuningJob.id);\n              python: |-\n                from openai import OpenAI\n\n                client = OpenAI(\n                    api_key=\"My API Key\",\n                )\n                fine_tuning_job = client.fine_tuning.jobs.create(\n                    model=\"gpt-4o-mini\",\n                    training_file=\"file-abc123\",\n                )\n                print(fine_tuning_job.id)\n              go: |\n                package main\n\n                import (\n                  \"context\"\n                  \"fmt\"\n\n                  \"github.com/openai/openai-go\"\n                  \"github.com/openai/openai-go/option\"\n                )\n\n                func main() {\n                  client := openai.NewClient(\n                    option.WithAPIKey(\"My API Key\"),\n                  )\n                  fineTuningJob, err := client.FineTuning.Jobs.New(context.TODO(), openai.FineTuningJobNewParams{\n                    Model: openai.FineTuningJobNewParamsModelBabbage002,\n                    TrainingFile: \"file-abc123\",\n                  })\n                  if err != nil {\n                    panic(err.Error())\n                  }\n                  fmt.Printf(\"%+v\\n\", fineTuningJob.ID)\n                }\n              java: |-\n                package com.openai.example;\n\n                import com.openai.client.OpenAIClient;\n                import com.openai.client.okhttp.OpenAIOkHttpClient;\n                import com.openai.models.finetuning.jobs.FineTuningJob;\n                import com.openai.models.finetuning.jobs.JobCreateParams;\n\n                public final class Main {\n                    private Main() {}\n\n                    public static void main(String[] args) {\n                        OpenAIClient client = OpenAIOkHttpClient.fromEnv();\n\n                        JobCreateParams params = JobCreateParams.builder()\n                            .model(JobCreateParams.Model.BABBAGE_002)\n                            .trainingFile(\"file-abc123\")\n                            .build();\n                        FineTuningJob fineTuningJob = client.fineTuning().jobs().create(params);\n                    }\n                }\n              ruby: >-\n                require \"openai\"\n\n\n                openai = OpenAI::Client.new(api_key: \"My API Key\")\n\n\n                fine_tuning_job = openai.fine_tuning.jobs.create(model: :\"babbage-002\", training_file:\n                \"file-abc123\")\n\n\n                puts(fine_tuning_job)\n            response: |\n              {\n                \"object\": \"fine_tuning.job\",\n                \"id\": \"ftjob-abc123\",\n                \"model\": \"gpt-4o-mini-2024-07-18\",\n                \"created_at\": 1721764800,\n                \"fine_tuned_model\": null,\n                \"organization_id\": \"org-123\",\n                \"result_files\": [],\n                \"status\": \"queued\",\n                \"validation_file\": \"file-abc123\",\n                \"training_file\": \"file-abc123\",\n                \"integrations\": [\n                  {\n                    \"type\": \"wandb\",\n                    \"wandb\": {\n                      \"project\": \"my-wandb-project\",\n                      \"entity\": None,\n                      \"run_id\": \"ftjob-abc123\"\n                    }\n                  }\n                ],\n                \"method\": {\n                  \"type\": \"supervised\",\n                  \"supervised\": {\n                    \"hyperparameters\": {\n                      \"batch_size\": \"auto\",\n                      \"learning_rate_multiplier\": \"auto\",\n                      \"n_epochs\": \"auto\",\n                    }\n                  }\n                },\n                \"metadata\": null\n              }\n      description: >\n        Creates a fine-tuning job which begins the process of creating a new model from a given dataset.\n\n\n        Response includes details of the enqueued job including job status and the name of the fine-tuned\n        models once complete.\n\n\n        [Learn more about fine-tuning](https://platform.openai.com/docs/guides/model-optimization)\n    get:\n      operationId: listPaginatedFineTuningJobs\n      tags:\n        - Fine-tuning\n      summary: List fine-tuning jobs\n      parameters:\n        - name: after\n          in: query\n          description: Identifier for the last job from the previous pagination request.\n          required: false\n          schema:\n            type: string\n        - name: limit\n          in: query\n          description: Number of fine-tuning jobs to retrieve.\n          required: false\n          schema:\n            type: integer\n            default: 20\n        - in: query\n          name: metadata\n          required: false\n          schema:\n            type: object\n            nullable: true\n            additionalProperties:\n              type: string\n          style: deepObject\n          explode: true\n          description: >\n            Optional metadata filter. To filter, use the syntax `metadata[k]=v`. Alternatively, set\n            `metadata=null` to indicate no metadata.\n      responses:\n        '200':\n          description: OK\n          content:\n            application/json:\n              schema:\n                $ref: '#/components/schemas/ListPaginatedFineTuningJobsResponse'\n      x-oaiMeta:\n        name: List fine-tuning jobs\n        group: fine-tuning\n        returns: >-\n          A list of paginated [fine-tuning\n          job](https://platform.openai.com/docs/api-reference/fine-tuning/object) objects.\n        examples:\n          response: |\n            {\n              \"object\": \"list\",\n              \"data\": [\n                {\n                  \"object\": \"fine_tuning.job\",\n                  \"id\": \"ftjob-abc123\",\n                  \"model\": \"gpt-4o-mini-2024-07-18\",\n                  \"created_at\": 1721764800,\n                  \"fine_tuned_model\": null,\n                  \"organization_id\": \"org-123\",\n                  \"result_files\": [],\n                  \"status\": \"queued\",\n                  \"validation_file\": null,\n                  \"training_file\": \"file-abc123\",\n                  \"metadata\": {\n                    \"key\": \"value\"\n                  }\n                },\n                { ... },\n                { ... }\n              ], \"has_more\": true\n            }\n          request:\n            curl: |\n              curl https://api.openai.com/v1/fine_tuning/jobs?limit=2&metadata[key]=value \\\n                -H \"Authorization: Bearer $OPENAI_API_KEY\"\n            python: |-\n              from openai import OpenAI\n\n              client = OpenAI(\n                  api_key=\"My API Key\",\n              )\n              page = client.fine_tuning.jobs.list()\n              page = page.data[0]\n              print(page.id)\n            node.js: |-\n              import OpenAI from 'openai';\n\n              const client = new OpenAI({\n                apiKey: 'My API Key',\n              });\n\n              // Automatically fetches more pages as needed.\n              for await (const fineTuningJob of client.fineTuning.jobs.list()) {\n                console.log(fineTuningJob.id);\n              }\n            go: |\n              package main\n\n              import (\n                \"context\"\n                \"fmt\"\n\n                \"github.com/openai/openai-go\"\n                \"github.com/openai/openai-go/option\"\n              )\n\n              func main() {\n                client := openai.NewClient(\n                  option.WithAPIKey(\"My API Key\"),\n                )\n                page, err := client.FineTuning.Jobs.List(context.TODO(), openai.FineTuningJobListParams{\n\n                })\n                if err != nil {\n                  panic(err.Error())\n                }\n                fmt.Printf(\"%+v\\n\", page)\n              }\n            java: |-\n              package com.openai.example;\n\n              import com.openai.client.OpenAIClient;\n              import com.openai.client.okhttp.OpenAIOkHttpClient;\n              import com.openai.models.finetuning.jobs.JobListPage;\n              import com.openai.models.finetuning.jobs.JobListParams;\n\n              public final class Main {\n                  private Main() {}\n\n                  public static void main(String[] args) {\n                      OpenAIClient client = OpenAIOkHttpClient.fromEnv();\n\n                      JobListPage page = client.fineTuning().jobs().list();\n                  }\n              }\n            ruby: |-\n              require \"openai\"\n\n              openai = OpenAI::Client.new(api_key: \"My API Key\")\n\n              page = openai.fine_tuning.jobs.list\n\n              puts(page)\n      description: |\n        List your organization's fine-tuning jobs\n  /fine_tuning/jobs/{fine_tuning_job_id}:\n    get:\n      operationId: retrieveFineTuningJob\n      tags:\n        - Fine-tuning\n      summary: Retrieve fine-tuning job\n      parameters:\n        - in: path\n          name: fine_tuning_job_id\n          required: true\n          schema:\n            type: string\n            example: ft-AF1WoRqd3aJAHsqc9NY7iL8F\n          description: |\n            The ID of the fine-tuning job.\n      responses:\n        '200':\n          description: OK\n          content:\n            application/json:\n              schema:\n                $ref: '#/components/schemas/FineTuningJob'\n      x-oaiMeta:\n        name: Retrieve fine-tuning job\n        group: fine-tuning\n        returns: >-\n          The [fine-tuning](https://platform.openai.com/docs/api-reference/fine-tuning/object) object with the\n          given ID.\n        examples:\n          response: |\n            {\n              \"object\": \"fine_tuning.job\",\n              \"id\": \"ftjob-abc123\",\n              \"model\": \"davinci-002\",\n              \"created_at\": 1692661014,\n              \"finished_at\": 1692661190,\n              \"fine_tuned_model\": \"ft:davinci-002:my-org:custom_suffix:7q8mpxmy\",\n              \"organization_id\": \"org-123\",\n              \"result_files\": [\n                  \"file-abc123\"\n              ],\n              \"status\": \"succeeded\",\n              \"validation_file\": null,\n              \"training_file\": \"file-abc123\",\n              \"hyperparameters\": {\n                  \"n_epochs\": 4,\n                  \"batch_size\": 1,\n                  \"learning_rate_multiplier\": 1.0\n              },\n              \"trained_tokens\": 5768,\n              \"integrations\": [],\n              \"seed\": 0,\n              \"estimated_finish\": 0,\n              \"method\": {\n                \"type\": \"supervised\",\n                \"supervised\": {\n                  \"hyperparameters\": {\n                    \"n_epochs\": 4,\n                    \"batch_size\": 1,\n                    \"learning_rate_multiplier\": 1.0\n                  }\n                }\n              }\n            }\n          request:\n            curl: |\n              curl https://api.openai.com/v1/fine_tuning/jobs/ft-AF1WoRqd3aJAHsqc9NY7iL8F \\\n                -H \"Authorization: Bearer $OPENAI_API_KEY\"\n            python: |-\n              from openai import OpenAI\n\n              client = OpenAI(\n                  api_key=\"My API Key\",\n              )\n              fine_tuning_job = client.fine_tuning.jobs.retrieve(\n                  \"ft-AF1WoRqd3aJAHsqc9NY7iL8F\",\n              )\n              print(fine_tuning_job.id)\n            node.js: |-\n              import OpenAI from 'openai';\n\n              const client = new OpenAI({\n                apiKey: 'My API Key',\n              });\n\n              const fineTuningJob = await client.fineTuning.jobs.retrieve('ft-AF1WoRqd3aJAHsqc9NY7iL8F');\n\n              console.log(fineTuningJob.id);\n            go: |\n              package main\n\n              import (\n                \"context\"\n                \"fmt\"\n\n                \"github.com/openai/openai-go\"\n                \"github.com/openai/openai-go/option\"\n              )\n\n              func main() {\n                client := openai.NewClient(\n                  option.WithAPIKey(\"My API Key\"),\n                )\n                fineTuningJob, err := client.FineTuning.Jobs.Get(context.TODO(), \"ft-AF1WoRqd3aJAHsqc9NY7iL8F\")\n                if err != nil {\n                  panic(err.Error())\n                }\n                fmt.Printf(\"%+v\\n\", fineTuningJob.ID)\n              }\n            java: |-\n              package com.openai.example;\n\n              import com.openai.client.OpenAIClient;\n              import com.openai.client.okhttp.OpenAIOkHttpClient;\n              import com.openai.models.finetuning.jobs.FineTuningJob;\n              import com.openai.models.finetuning.jobs.JobRetrieveParams;\n\n              public final class Main {\n                  private Main() {}\n\n                  public static void main(String[] args) {\n                      OpenAIClient client = OpenAIOkHttpClient.fromEnv();\n\n                      FineTuningJob fineTuningJob = client.fineTuning().jobs().retrieve(\"ft-AF1WoRqd3aJAHsqc9NY7iL8F\");\n                  }\n              }\n            ruby: |-\n              require \"openai\"\n\n              openai = OpenAI::Client.new(api_key: \"My API Key\")\n\n              fine_tuning_job = openai.fine_tuning.jobs.retrieve(\"ft-AF1WoRqd3aJAHsqc9NY7iL8F\")\n\n              puts(fine_tuning_job)\n      description: |\n        Get info about a fine-tuning job.\n\n        [Learn more about fine-tuning](https://platform.openai.com/docs/guides/model-optimization)\n  /fine_tuning/jobs/{fine_tuning_job_id}/cancel:\n    post:\n      operationId: cancelFineTuningJob\n      tags:\n        - Fine-tuning\n      summary: Cancel fine-tuning\n      parameters:\n        - in: path\n          name: fine_tuning_job_id\n          required: true\n          schema:\n            type: string\n            example: ft-AF1WoRqd3aJAHsqc9NY7iL8F\n          description: |\n            The ID of the fine-tuning job to cancel.\n      responses:\n        '200':\n          description: OK\n          content:\n            application/json:\n              schema:\n                $ref: '#/components/schemas/FineTuningJob'\n      x-oaiMeta:\n        name: Cancel fine-tuning\n        group: fine-tuning\n        returns: >-\n          The cancelled [fine-tuning](https://platform.openai.com/docs/api-reference/fine-tuning/object)\n          object.\n        examples:\n          response: |\n            {\n              \"object\": \"fine_tuning.job\",\n              \"id\": \"ftjob-abc123\",\n              \"model\": \"gpt-4o-mini-2024-07-18\",\n              \"created_at\": 1721764800,\n              \"fine_tuned_model\": null,\n              \"organization_id\": \"org-123\",\n              \"result_files\": [],\n              \"status\": \"cancelled\",\n              \"validation_file\": \"file-abc123\",\n              \"training_file\": \"file-abc123\"\n            }\n          request:\n            curl: |\n              curl -X POST https://api.openai.com/v1/fine_tuning/jobs/ftjob-abc123/cancel \\\n                -H \"Authorization: Bearer $OPENAI_API_KEY\"\n            python: |-\n              from openai import OpenAI\n\n              client = OpenAI(\n                  api_key=\"My API Key\",\n              )\n              fine_tuning_job = client.fine_tuning.jobs.cancel(\n                  \"ft-AF1WoRqd3aJAHsqc9NY7iL8F\",\n              )\n              print(fine_tuning_job.id)\n            node.js: |-\n              import OpenAI from 'openai';\n\n              const client = new OpenAI({\n                apiKey: 'My API Key',\n              });\n\n              const fineTuningJob = await client.fineTuning.jobs.cancel('ft-AF1WoRqd3aJAHsqc9NY7iL8F');\n\n              console.log(fineTuningJob.id);\n            go: |\n              package main\n\n              import (\n                \"context\"\n                \"fmt\"\n\n                \"github.com/openai/openai-go\"\n                \"github.com/openai/openai-go/option\"\n              )\n\n              func main() {\n                client := openai.NewClient(\n                  option.WithAPIKey(\"My API Key\"),\n                )\n                fineTuningJob, err := client.FineTuning.Jobs.Cancel(context.TODO(), \"ft-AF1WoRqd3aJAHsqc9NY7iL8F\")\n                if err != nil {\n                  panic(err.Error())\n                }\n                fmt.Printf(\"%+v\\n\", fineTuningJob.ID)\n              }\n            java: |-\n              package com.openai.example;\n\n              import com.openai.client.OpenAIClient;\n              import com.openai.client.okhttp.OpenAIOkHttpClient;\n              import com.openai.models.finetuning.jobs.FineTuningJob;\n              import com.openai.models.finetuning.jobs.JobCancelParams;\n\n              public final class Main {\n                  private Main() {}\n\n                  public static void main(String[] args) {\n                      OpenAIClient client = OpenAIOkHttpClient.fromEnv();\n\n                      FineTuningJob fineTuningJob = client.fineTuning().jobs().cancel(\"ft-AF1WoRqd3aJAHsqc9NY7iL8F\");\n                  }\n              }\n            ruby: |-\n              require \"openai\"\n\n              openai = OpenAI::Client.new(api_key: \"My API Key\")\n\n              fine_tuning_job = openai.fine_tuning.jobs.cancel(\"ft-AF1WoRqd3aJAHsqc9NY7iL8F\")\n\n              puts(fine_tuning_job)\n      description: |\n        Immediately cancel a fine-tune job.\n  /fine_tuning/jobs/{fine_tuning_job_id}/checkpoints:\n    get:\n      operationId: listFineTuningJobCheckpoints\n      tags:\n        - Fine-tuning\n      summary: List fine-tuning checkpoints\n      parameters:\n        - in: path\n          name: fine_tuning_job_id\n          required: true\n          schema:\n            type: string\n            example: ft-AF1WoRqd3aJAHsqc9NY7iL8F\n          description: |\n            The ID of the fine-tuning job to get checkpoints for.\n        - name: after\n          in: query\n          description: Identifier for the last checkpoint ID from the previous pagination request.\n          required: false\n          schema:\n            type: string\n        - name: limit\n          in: query\n          description: Number of checkpoints to retrieve.\n          required: false\n          schema:\n            type: integer\n            default: 10\n      responses:\n        '200':\n          description: OK\n          content:\n            application/json:\n              schema:\n                $ref: '#/components/schemas/ListFineTuningJobCheckpointsResponse'\n      x-oaiMeta:\n        name: List fine-tuning checkpoints\n        group: fine-tuning\n        returns: >-\n          A list of fine-tuning [checkpoint\n          objects](https://platform.openai.com/docs/api-reference/fine-tuning/checkpoint-object) for a\n          fine-tuning job.\n        examples:\n          response: |\n            {\n              \"object\": \"list\",\n              \"data\": [\n                {\n                  \"object\": \"fine_tuning.job.checkpoint\",\n                  \"id\": \"ftckpt_zc4Q7MP6XxulcVzj4MZdwsAB\",\n                  \"created_at\": 1721764867,\n                  \"fine_tuned_model_checkpoint\": \"ft:gpt-4o-mini-2024-07-18:my-org:custom-suffix:96olL566:ckpt-step-2000\",\n                  \"metrics\": {\n                    \"full_valid_loss\": 0.134,\n                    \"full_valid_mean_token_accuracy\": 0.874\n                  },\n                  \"fine_tuning_job_id\": \"ftjob-abc123\",\n                  \"step_number\": 2000\n                },\n                {\n                  \"object\": \"fine_tuning.job.checkpoint\",\n                  \"id\": \"ftckpt_enQCFmOTGj3syEpYVhBRLTSy\",\n                  \"created_at\": 1721764800,\n                  \"fine_tuned_model_checkpoint\": \"ft:gpt-4o-mini-2024-07-18:my-org:custom-suffix:7q8mpxmy:ckpt-step-1000\",\n                  \"metrics\": {\n                    \"full_valid_loss\": 0.167,\n                    \"full_valid_mean_token_accuracy\": 0.781\n                  },\n                  \"fine_tuning_job_id\": \"ftjob-abc123\",\n                  \"step_number\": 1000\n                }\n              ],\n              \"first_id\": \"ftckpt_zc4Q7MP6XxulcVzj4MZdwsAB\",\n              \"last_id\": \"ftckpt_enQCFmOTGj3syEpYVhBRLTSy\",\n              \"has_more\": true\n            }\n          request:\n            curl: |\n              curl https://api.openai.com/v1/fine_tuning/jobs/ftjob-abc123/checkpoints \\\n                -H \"Authorization: Bearer $OPENAI_API_KEY\"\n            node.js: |-\n              import OpenAI from 'openai';\n\n              const client = new OpenAI({\n                apiKey: 'My API Key',\n              });\n\n              // Automatically fetches more pages as needed.\n              for await (const fineTuningJobCheckpoint of client.fineTuning.jobs.checkpoints.list(\n                'ft-AF1WoRqd3aJAHsqc9NY7iL8F',\n              )) {\n                console.log(fineTuningJobCheckpoint.id);\n              }\n            python: |-\n              from openai import OpenAI\n\n              client = OpenAI(\n                  api_key=\"My API Key\",\n              )\n              page = client.fine_tuning.jobs.checkpoints.list(\n                  fine_tuning_job_id=\"ft-AF1WoRqd3aJAHsqc9NY7iL8F\",\n              )\n              page = page.data[0]\n              print(page.id)\n            go: |\n              package main\n\n              import (\n                \"context\"\n                \"fmt\"\n\n                \"github.com/openai/openai-go\"\n                \"github.com/openai/openai-go/option\"\n              )\n\n              func main() {\n                client := openai.NewClient(\n                  option.WithAPIKey(\"My API Key\"),\n                )\n                page, err := client.FineTuning.Jobs.Checkpoints.List(\n                  context.TODO(),\n                  \"ft-AF1WoRqd3aJAHsqc9NY7iL8F\",\n                  openai.FineTuningJobCheckpointListParams{\n\n                  },\n                )\n                if err != nil {\n                  panic(err.Error())\n                }\n                fmt.Printf(\"%+v\\n\", page)\n              }\n            java: |-\n              package com.openai.example;\n\n              import com.openai.client.OpenAIClient;\n              import com.openai.client.okhttp.OpenAIOkHttpClient;\n              import com.openai.models.finetuning.jobs.checkpoints.CheckpointListPage;\n              import com.openai.models.finetuning.jobs.checkpoints.CheckpointListParams;\n\n              public final class Main {\n                  private Main() {}\n\n                  public static void main(String[] args) {\n                      OpenAIClient client = OpenAIOkHttpClient.fromEnv();\n\n                      CheckpointListPage page = client.fineTuning().jobs().checkpoints().list(\"ft-AF1WoRqd3aJAHsqc9NY7iL8F\");\n                  }\n              }\n            ruby: |-\n              require \"openai\"\n\n              openai = OpenAI::Client.new(api_key: \"My API Key\")\n\n              page = openai.fine_tuning.jobs.checkpoints.list(\"ft-AF1WoRqd3aJAHsqc9NY7iL8F\")\n\n              puts(page)\n      description: |\n        List checkpoints for a fine-tuning job.\n  /fine_tuning/jobs/{fine_tuning_job_id}/events:\n    get:\n      operationId: listFineTuningEvents\n      tags:\n        - Fine-tuning\n      summary: List fine-tuning events\n      parameters:\n        - in: path\n          name: fine_tuning_job_id\n          required: true\n          schema:\n            type: string\n            example: ft-AF1WoRqd3aJAHsqc9NY7iL8F\n          description: |\n            The ID of the fine-tuning job to get events for.\n        - name: after\n          in: query\n          description: Identifier for the last event from the previous pagination request.\n          required: false\n          schema:\n            type: string\n        - name: limit\n          in: query\n          description: Number of events to retrieve.\n          required: false\n          schema:\n            type: integer\n            default: 20\n      responses:\n        '200':\n          description: OK\n          content:\n            application/json:\n              schema:\n                $ref: '#/components/schemas/ListFineTuningJobEventsResponse'\n      x-oaiMeta:\n        name: List fine-tuning events\n        group: fine-tuning\n        returns: A list of fine-tuning event objects.\n        examples:\n          response: |\n            {\n              \"object\": \"list\",\n              \"data\": [\n                {\n                  \"object\": \"fine_tuning.job.event\",\n                  \"id\": \"ft-event-ddTJfwuMVpfLXseO0Am0Gqjm\",\n                  \"created_at\": 1721764800,\n                  \"level\": \"info\",\n                  \"message\": \"Fine tuning job successfully completed\",\n                  \"data\": null,\n                  \"type\": \"message\"\n                },\n                {\n                  \"object\": \"fine_tuning.job.event\",\n                  \"id\": \"ft-event-tyiGuB72evQncpH87xe505Sv\",\n                  \"created_at\": 1721764800,\n                  \"level\": \"info\",\n                  \"message\": \"New fine-tuned model created: ft:gpt-4o-mini:openai::7p4lURel\",\n                  \"data\": null,\n                  \"type\": \"message\"\n                }\n              ],\n              \"has_more\": true\n            }\n          request:\n            curl: |\n              curl https://api.openai.com/v1/fine_tuning/jobs/ftjob-abc123/events \\\n                -H \"Authorization: Bearer $OPENAI_API_KEY\"\n            python: |-\n              from openai import OpenAI\n\n              client = OpenAI(\n                  api_key=\"My API Key\",\n              )\n              page = client.fine_tuning.jobs.list_events(\n                  fine_tuning_job_id=\"ft-AF1WoRqd3aJAHsqc9NY7iL8F\",\n              )\n              page = page.data[0]\n              print(page.id)\n            node.js: >-\n              import OpenAI from 'openai';\n\n\n              const client = new OpenAI({\n                apiKey: 'My API Key',\n              });\n\n\n              // Automatically fetches more pages as needed.\n\n              for await (const fineTuningJobEvent of\n              client.fineTuning.jobs.listEvents('ft-AF1WoRqd3aJAHsqc9NY7iL8F')) {\n                console.log(fineTuningJobEvent.id);\n              }\n            go: |\n              package main\n\n              import (\n                \"context\"\n                \"fmt\"\n\n                \"github.com/openai/openai-go\"\n                \"github.com/openai/openai-go/option\"\n              )\n\n              func main() {\n                client := openai.NewClient(\n                  option.WithAPIKey(\"My API Key\"),\n                )\n                page, err := client.FineTuning.Jobs.ListEvents(\n                  context.TODO(),\n                  \"ft-AF1WoRqd3aJAHsqc9NY7iL8F\",\n                  openai.FineTuningJobListEventsParams{\n\n                  },\n                )\n                if err != nil {\n                  panic(err.Error())\n                }\n                fmt.Printf(\"%+v\\n\", page)\n              }\n            java: |-\n              package com.openai.example;\n\n              import com.openai.client.OpenAIClient;\n              import com.openai.client.okhttp.OpenAIOkHttpClient;\n              import com.openai.models.finetuning.jobs.JobListEventsPage;\n              import com.openai.models.finetuning.jobs.JobListEventsParams;\n\n              public final class Main {\n                  private Main() {}\n\n                  public static void main(String[] args) {\n                      OpenAIClient client = OpenAIOkHttpClient.fromEnv();\n\n                      JobListEventsPage page = client.fineTuning().jobs().listEvents(\"ft-AF1WoRqd3aJAHsqc9NY7iL8F\");\n                  }\n              }\n            ruby: |-\n              require \"openai\"\n\n              openai = OpenAI::Client.new(api_key: \"My API Key\")\n\n              page = openai.fine_tuning.jobs.list_events(\"ft-AF1WoRqd3aJAHsqc9NY7iL8F\")\n\n              puts(page)\n      description: |\n        Get status updates for a fine-tuning job.\n  /fine_tuning/jobs/{fine_tuning_job_id}/pause:\n    post:\n      operationId: pauseFineTuningJob\n      tags:\n        - Fine-tuning\n      summary: Pause fine-tuning\n      parameters:\n        - in: path\n          name: fine_tuning_job_id\n          required: true\n          schema:\n            type: string\n            example: ft-AF1WoRqd3aJAHsqc9NY7iL8F\n          description: |\n            The ID of the fine-tuning job to pause.\n      responses:\n        '200':\n          description: OK\n          content:\n            application/json:\n              schema:\n                $ref: '#/components/schemas/FineTuningJob'\n      x-oaiMeta:\n        name: Pause fine-tuning\n        group: fine-tuning\n        returns: The paused [fine-tuning](https://platform.openai.com/docs/api-reference/fine-tuning/object) object.\n        examples:\n          response: |\n            {\n              \"object\": \"fine_tuning.job\",\n              \"id\": \"ftjob-abc123\",\n              \"model\": \"gpt-4o-mini-2024-07-18\",\n              \"created_at\": 1721764800,\n              \"fine_tuned_model\": null,\n              \"organization_id\": \"org-123\",\n              \"result_files\": [],\n              \"status\": \"paused\",\n              \"validation_file\": \"file-abc123\",\n              \"training_file\": \"file-abc123\"\n            }\n          request:\n            curl: |\n              curl -X POST https://api.openai.com/v1/fine_tuning/jobs/ftjob-abc123/pause \\\n                -H \"Authorization: Bearer $OPENAI_API_KEY\"\n            python: |-\n              from openai import OpenAI\n\n              client = OpenAI(\n                  api_key=\"My API Key\",\n              )\n              fine_tuning_job = client.fine_tuning.jobs.pause(\n                  \"ft-AF1WoRqd3aJAHsqc9NY7iL8F\",\n              )\n              print(fine_tuning_job.id)\n            node.js: |-\n              import OpenAI from 'openai';\n\n              const client = new OpenAI({\n                apiKey: 'My API Key',\n              });\n\n              const fineTuningJob = await client.fineTuning.jobs.pause('ft-AF1WoRqd3aJAHsqc9NY7iL8F');\n\n              console.log(fineTuningJob.id);\n            go: |\n              package main\n\n              import (\n                \"context\"\n                \"fmt\"\n\n                \"github.com/openai/openai-go\"\n                \"github.com/openai/openai-go/option\"\n              )\n\n              func main() {\n                client := openai.NewClient(\n                  option.WithAPIKey(\"My API Key\"),\n                )\n                fineTuningJob, err := client.FineTuning.Jobs.Pause(context.TODO(), \"ft-AF1WoRqd3aJAHsqc9NY7iL8F\")\n                if err != nil {\n                  panic(err.Error())\n                }\n                fmt.Printf(\"%+v\\n\", fineTuningJob.ID)\n              }\n            java: |-\n              package com.openai.example;\n\n              import com.openai.client.OpenAIClient;\n              import com.openai.client.okhttp.OpenAIOkHttpClient;\n              import com.openai.models.finetuning.jobs.FineTuningJob;\n              import com.openai.models.finetuning.jobs.JobPauseParams;\n\n              public final class Main {\n                  private Main() {}\n\n                  public static void main(String[] args) {\n                      OpenAIClient client = OpenAIOkHttpClient.fromEnv();\n\n                      FineTuningJob fineTuningJob = client.fineTuning().jobs().pause(\"ft-AF1WoRqd3aJAHsqc9NY7iL8F\");\n                  }\n              }\n            ruby: |-\n              require \"openai\"\n\n              openai = OpenAI::Client.new(api_key: \"My API Key\")\n\n              fine_tuning_job = openai.fine_tuning.jobs.pause(\"ft-AF1WoRqd3aJAHsqc9NY7iL8F\")\n\n              puts(fine_tuning_job)\n      description: |\n        Pause a fine-tune job.\n  /fine_tuning/jobs/{fine_tuning_job_id}/resume:\n    post:\n      operationId: resumeFineTuningJob\n      tags:\n        - Fine-tuning\n      summary: Resume fine-tuning\n      parameters:\n        - in: path\n          name: fine_tuning_job_id\n          required: true\n          schema:\n            type: string\n            example: ft-AF1WoRqd3aJAHsqc9NY7iL8F\n          description: |\n            The ID of the fine-tuning job to resume.\n      responses:\n        '200':\n          description: OK\n          content:\n            application/json:\n              schema:\n                $ref: '#/components/schemas/FineTuningJob'\n      x-oaiMeta:\n        name: Resume fine-tuning\n        group: fine-tuning\n        returns: The resumed [fine-tuning](https://platform.openai.com/docs/api-reference/fine-tuning/object) object.\n        examples:\n          response: |\n            {\n              \"object\": \"fine_tuning.job\",\n              \"id\": \"ftjob-abc123\",\n              \"model\": \"gpt-4o-mini-2024-07-18\",\n              \"created_at\": 1721764800,\n              \"fine_tuned_model\": null,\n              \"organization_id\": \"org-123\",\n              \"result_files\": [],\n              \"status\": \"queued\",\n              \"validation_file\": \"file-abc123\",\n              \"training_file\": \"file-abc123\"\n            }\n          request:\n            curl: |\n              curl -X POST https://api.openai.com/v1/fine_tuning/jobs/ftjob-abc123/resume \\\n                -H \"Authorization: Bearer $OPENAI_API_KEY\"\n            python: |-\n              from openai import OpenAI\n\n              client = OpenAI(\n                  api_key=\"My API Key\",\n              )\n              fine_tuning_job = client.fine_tuning.jobs.resume(\n                  \"ft-AF1WoRqd3aJAHsqc9NY7iL8F\",\n              )\n              print(fine_tuning_job.id)\n            node.js: |-\n              import OpenAI from 'openai';\n\n              const client = new OpenAI({\n                apiKey: 'My API Key',\n              });\n\n              const fineTuningJob = await client.fineTuning.jobs.resume('ft-AF1WoRqd3aJAHsqc9NY7iL8F');\n\n              console.log(fineTuningJob.id);\n            go: |\n              package main\n\n              import (\n                \"context\"\n                \"fmt\"\n\n                \"github.com/openai/openai-go\"\n                \"github.com/openai/openai-go/option\"\n              )\n\n              func main() {\n                client := openai.NewClient(\n                  option.WithAPIKey(\"My API Key\"),\n                )\n                fineTuningJob, err := client.FineTuning.Jobs.Resume(context.TODO(), \"ft-AF1WoRqd3aJAHsqc9NY7iL8F\")\n                if err != nil {\n                  panic(err.Error())\n                }\n                fmt.Printf(\"%+v\\n\", fineTuningJob.ID)\n              }\n            java: |-\n              package com.openai.example;\n\n              import com.openai.client.OpenAIClient;\n              import com.openai.client.okhttp.OpenAIOkHttpClient;\n              import com.openai.models.finetuning.jobs.FineTuningJob;\n              import com.openai.models.finetuning.jobs.JobResumeParams;\n\n              public final class Main {\n                  private Main() {}\n\n                  public static void main(String[] args) {\n                      OpenAIClient client = OpenAIOkHttpClient.fromEnv();\n\n                      FineTuningJob fineTuningJob = client.fineTuning().jobs().resume(\"ft-AF1WoRqd3aJAHsqc9NY7iL8F\");\n                  }\n              }\n            ruby: |-\n              require \"openai\"\n\n              openai = OpenAI::Client.new(api_key: \"My API Key\")\n\n              fine_tuning_job = openai.fine_tuning.jobs.resume(\"ft-AF1WoRqd3aJAHsqc9NY7iL8F\")\n\n              puts(fine_tuning_job)\n      description: |\n        Resume a fine-tune job.\n  /images/edits:\n    post:\n      operationId: createImageEdit\n      tags:\n        - Images\n      summary: Create image edit\n      requestBody:\n        required: true\n        content:\n          multipart/form-data:\n            schema:\n              $ref: '#/components/schemas/CreateImageEditRequest'\n      responses:\n        '200':\n          description: OK\n          content:\n            application/json:\n              schema:\n                $ref: '#/components/schemas/ImagesResponse'\n            text/event-stream:\n              schema:\n                $ref: '#/components/schemas/ImageEditStreamEvent'\n      x-oaiMeta:\n        name: Create image edit\n        group: images\n        returns: Returns an [image](https://platform.openai.com/docs/api-reference/images/object) object.\n        examples:\n          - title: Edit image\n            request:\n              curl: |\n                curl -s -D >(grep -i x-request-id >&2) \\\n                  -o >(jq -r '.data[0].b64_json' | base64 --decode > gift-basket.png) \\\n                  -X POST \"https://api.openai.com/v1/images/edits\" \\\n                  -H \"Authorization: Bearer $OPENAI_API_KEY\" \\\n                  -F \"model=gpt-image-1\" \\\n                  -F \"image[]=@body-lotion.png\" \\\n                  -F \"image[]=@bath-bomb.png\" \\\n                  -F \"image[]=@incense-kit.png\" \\\n                  -F \"image[]=@soap.png\" \\\n                  -F 'prompt=Create a lovely gift basket with these four items in it'\n              python: |-\n                from openai import OpenAI\n\n                client = OpenAI(\n                    api_key=\"My API Key\",\n                )\n                images_response = client.images.edit(\n                    image=b\"raw file contents\",\n                    prompt=\"A cute baby sea otter wearing a beret\",\n                )\n                print(images_response)\n              node.js: |-\n                import OpenAI from 'openai';\n\n                const client = new OpenAI({\n                  apiKey: 'My API Key',\n                });\n\n                const imagesResponse = await client.images.edit({\n                  image: fs.createReadStream('path/to/file'),\n                  prompt: 'A cute baby sea otter wearing a beret',\n                });\n\n                console.log(imagesResponse);\n              go: |\n                package main\n\n                import (\n                  \"bytes\"\n                  \"context\"\n                  \"fmt\"\n                  \"io\"\n\n                  \"github.com/openai/openai-go\"\n                  \"github.com/openai/openai-go/option\"\n                )\n\n                func main() {\n                  client := openai.NewClient(\n                    option.WithAPIKey(\"My API Key\"),\n                  )\n                  imagesResponse, err := client.Images.Edit(context.TODO(), openai.ImageEditParams{\n                    Image: openai.ImageEditParamsImageUnion{\n                      OfFile: io.Reader(bytes.NewBuffer([]byte(\"some file contents\"))),\n                    },\n                    Prompt: \"A cute baby sea otter wearing a beret\",\n                  })\n                  if err != nil {\n                    panic(err.Error())\n                  }\n                  fmt.Printf(\"%+v\\n\", imagesResponse)\n                }\n              java: |-\n                package com.openai.example;\n\n                import com.openai.client.OpenAIClient;\n                import com.openai.client.okhttp.OpenAIOkHttpClient;\n                import com.openai.models.images.ImageEditParams;\n                import com.openai.models.images.ImagesResponse;\n                import java.io.ByteArrayInputStream;\n                import java.io.InputStream;\n\n                public final class Main {\n                    private Main() {}\n\n                    public static void main(String[] args) {\n                        OpenAIClient client = OpenAIOkHttpClient.fromEnv();\n\n                        ImageEditParams params = ImageEditParams.builder()\n                            .image(ByteArrayInputStream(\"some content\".getBytes()))\n                            .prompt(\"A cute baby sea otter wearing a beret\")\n                            .build();\n                        ImagesResponse imagesResponse = client.images().edit(params);\n                    }\n                }\n              ruby: >-\n                require \"openai\"\n\n\n                openai = OpenAI::Client.new(api_key: \"My API Key\")\n\n\n                images_response = openai.images.edit(image: Pathname(__FILE__), prompt: \"A cute baby sea otter\n                wearing a beret\")\n\n\n                puts(images_response)\n          - title: Streaming\n            request:\n              curl: |\n                curl -s -N -X POST \"https://api.openai.com/v1/images/edits\" \\\n                  -H \"Authorization: Bearer $OPENAI_API_KEY\" \\\n                  -F \"model=gpt-image-1\" \\\n                  -F \"image[]=@body-lotion.png\" \\\n                  -F \"image[]=@bath-bomb.png\" \\\n                  -F \"image[]=@incense-kit.png\" \\\n                  -F \"image[]=@soap.png\" \\\n                  -F 'prompt=Create a lovely gift basket with these four items in it' \\\n                  -F \"stream=true\"\n              python: |-\n                from openai import OpenAI\n\n                client = OpenAI(\n                    api_key=\"My API Key\",\n                )\n                images_response = client.images.edit(\n                    image=b\"raw file contents\",\n                    prompt=\"A cute baby sea otter wearing a beret\",\n                )\n                print(images_response)\n              node.js: |-\n                import OpenAI from 'openai';\n\n                const client = new OpenAI({\n                  apiKey: 'My API Key',\n                });\n\n                const imagesResponse = await client.images.edit({\n                  image: fs.createReadStream('path/to/file'),\n                  prompt: 'A cute baby sea otter wearing a beret',\n                });\n\n                console.log(imagesResponse);\n              go: |\n                package main\n\n                import (\n                  \"bytes\"\n                  \"context\"\n                  \"fmt\"\n                  \"io\"\n\n                  \"github.com/openai/openai-go\"\n                  \"github.com/openai/openai-go/option\"\n                )\n\n                func main() {\n                  client := openai.NewClient(\n                    option.WithAPIKey(\"My API Key\"),\n                  )\n                  imagesResponse, err := client.Images.Edit(context.TODO(), openai.ImageEditParams{\n                    Image: openai.ImageEditParamsImageUnion{\n                      OfFile: io.Reader(bytes.NewBuffer([]byte(\"some file contents\"))),\n                    },\n                    Prompt: \"A cute baby sea otter wearing a beret\",\n                  })\n                  if err != nil {\n                    panic(err.Error())\n                  }\n                  fmt.Printf(\"%+v\\n\", imagesResponse)\n                }\n              java: |-\n                package com.openai.example;\n\n                import com.openai.client.OpenAIClient;\n                import com.openai.client.okhttp.OpenAIOkHttpClient;\n                import com.openai.models.images.ImageEditParams;\n                import com.openai.models.images.ImagesResponse;\n                import java.io.ByteArrayInputStream;\n                import java.io.InputStream;\n\n                public final class Main {\n                    private Main() {}\n\n                    public static void main(String[] args) {\n                        OpenAIClient client = OpenAIOkHttpClient.fromEnv();\n\n                        ImageEditParams params = ImageEditParams.builder()\n                            .image(ByteArrayInputStream(\"some content\".getBytes()))\n                            .prompt(\"A cute baby sea otter wearing a beret\")\n                            .build();\n                        ImagesResponse imagesResponse = client.images().edit(params);\n                    }\n                }\n              ruby: >-\n                require \"openai\"\n\n\n                openai = OpenAI::Client.new(api_key: \"My API Key\")\n\n\n                images_response = openai.images.edit(image: Pathname(__FILE__), prompt: \"A cute baby sea otter\n                wearing a beret\")\n\n\n                puts(images_response)\n            response: >\n              event: image_edit.partial_image\n\n              data: {\"type\":\"image_edit.partial_image\",\"b64_json\":\"...\",\"partial_image_index\":0}\n\n\n              event: image_edit.completed\n\n              data:\n              {\"type\":\"image_edit.completed\",\"b64_json\":\"...\",\"usage\":{\"total_tokens\":100,\"input_tokens\":50,\"output_tokens\":50,\"input_tokens_details\":{\"text_tokens\":10,\"image_tokens\":40}}}\n      description: >-\n        Creates an edited or extended image given one or more source images and a prompt. This endpoint only\n        supports `gpt-image-1` and `dall-e-2`.\n  /images/generations:\n    post:\n      operationId: createImage\n      tags:\n        - Images\n      summary: Create image\n      requestBody:\n        required: true\n        content:\n          application/json:\n            schema:\n              $ref: '#/components/schemas/CreateImageRequest'\n      responses:\n        '200':\n          description: OK\n          content:\n            application/json:\n              schema:\n                $ref: '#/components/schemas/ImagesResponse'\n            text/event-stream:\n              schema:\n                $ref: '#/components/schemas/ImageGenStreamEvent'\n      x-oaiMeta:\n        name: Create image\n        group: images\n        returns: Returns an [image](https://platform.openai.com/docs/api-reference/images/object) object.\n        examples:\n          - title: Generate image\n            request:\n              curl: |\n                curl https://api.openai.com/v1/images/generations \\\n                  -H \"Content-Type: application/json\" \\\n                  -H \"Authorization: Bearer $OPENAI_API_KEY\" \\\n                  -d '{\n                    \"model\": \"gpt-image-1\",\n                    \"prompt\": \"A cute baby sea otter\",\n                    \"n\": 1,\n                    \"size\": \"1024x1024\"\n                  }'\n              python: |-\n                from openai import OpenAI\n\n                client = OpenAI(\n                    api_key=\"My API Key\",\n                )\n                images_response = client.images.generate(\n                    prompt=\"A cute baby sea otter\",\n                )\n                print(images_response)\n              node.js: |-\n                import OpenAI from 'openai';\n\n                const client = new OpenAI({\n                  apiKey: 'My API Key',\n                });\n\n                const imagesResponse = await client.images.generate({ prompt: 'A cute baby sea otter' });\n\n                console.log(imagesResponse);\n              go: |\n                package main\n\n                import (\n                  \"context\"\n                  \"fmt\"\n\n                  \"github.com/openai/openai-go\"\n                  \"github.com/openai/openai-go/option\"\n                )\n\n                func main() {\n                  client := openai.NewClient(\n                    option.WithAPIKey(\"My API Key\"),\n                  )\n                  imagesResponse, err := client.Images.Generate(context.TODO(), openai.ImageGenerateParams{\n                    Prompt: \"A cute baby sea otter\",\n                  })\n                  if err != nil {\n                    panic(err.Error())\n                  }\n                  fmt.Printf(\"%+v\\n\", imagesResponse)\n                }\n              java: |-\n                package com.openai.example;\n\n                import com.openai.client.OpenAIClient;\n                import com.openai.client.okhttp.OpenAIOkHttpClient;\n                import com.openai.models.images.ImageGenerateParams;\n                import com.openai.models.images.ImagesResponse;\n\n                public final class Main {\n                    private Main() {}\n\n                    public static void main(String[] args) {\n                        OpenAIClient client = OpenAIOkHttpClient.fromEnv();\n\n                        ImageGenerateParams params = ImageGenerateParams.builder()\n                            .prompt(\"A cute baby sea otter\")\n                            .build();\n                        ImagesResponse imagesResponse = client.images().generate(params);\n                    }\n                }\n              ruby: |-\n                require \"openai\"\n\n                openai = OpenAI::Client.new(api_key: \"My API Key\")\n\n                images_response = openai.images.generate(prompt: \"A cute baby sea otter\")\n\n                puts(images_response)\n            response: |\n              {\n                \"created\": 1713833628,\n                \"data\": [\n                  {\n                    \"b64_json\": \"...\"\n                  }\n                ],\n                \"usage\": {\n                  \"total_tokens\": 100,\n                  \"input_tokens\": 50,\n                  \"output_tokens\": 50,\n                  \"input_tokens_details\": {\n                    \"text_tokens\": 10,\n                    \"image_tokens\": 40\n                  }\n                }\n              }\n          - title: Streaming\n            request:\n              curl: |\n                curl https://api.openai.com/v1/images/generations \\\n                  -H \"Content-Type: application/json\" \\\n                  -H \"Authorization: Bearer $OPENAI_API_KEY\" \\\n                  -d '{\n                    \"model\": \"gpt-image-1\",\n                    \"prompt\": \"A cute baby sea otter\",\n                    \"n\": 1,\n                    \"size\": \"1024x1024\",\n                    \"stream\": true\n                  }' \\\n                  --no-buffer\n              python: |-\n                from openai import OpenAI\n\n                client = OpenAI(\n                    api_key=\"My API Key\",\n                )\n                images_response = client.images.generate(\n                    prompt=\"A cute baby sea otter\",\n                )\n                print(images_response)\n              node.js: |-\n                import OpenAI from 'openai';\n\n                const client = new OpenAI({\n                  apiKey: 'My API Key',\n                });\n\n                const imagesResponse = await client.images.generate({ prompt: 'A cute baby sea otter' });\n\n                console.log(imagesResponse);\n              go: |\n                package main\n\n                import (\n                  \"context\"\n                  \"fmt\"\n\n                  \"github.com/openai/openai-go\"\n                  \"github.com/openai/openai-go/option\"\n                )\n\n                func main() {\n                  client := openai.NewClient(\n                    option.WithAPIKey(\"My API Key\"),\n                  )\n                  imagesResponse, err := client.Images.Generate(context.TODO(), openai.ImageGenerateParams{\n                    Prompt: \"A cute baby sea otter\",\n                  })\n                  if err != nil {\n                    panic(err.Error())\n                  }\n                  fmt.Printf(\"%+v\\n\", imagesResponse)\n                }\n              java: |-\n                package com.openai.example;\n\n                import com.openai.client.OpenAIClient;\n                import com.openai.client.okhttp.OpenAIOkHttpClient;\n                import com.openai.models.images.ImageGenerateParams;\n                import com.openai.models.images.ImagesResponse;\n\n                public final class Main {\n                    private Main() {}\n\n                    public static void main(String[] args) {\n                        OpenAIClient client = OpenAIOkHttpClient.fromEnv();\n\n                        ImageGenerateParams params = ImageGenerateParams.builder()\n                            .prompt(\"A cute baby sea otter\")\n                            .build();\n                        ImagesResponse imagesResponse = client.images().generate(params);\n                    }\n                }\n              ruby: |-\n                require \"openai\"\n\n                openai = OpenAI::Client.new(api_key: \"My API Key\")\n\n                images_response = openai.images.generate(prompt: \"A cute baby sea otter\")\n\n                puts(images_response)\n            response: >\n              event: image_generation.partial_image\n\n              data: {\"type\":\"image_generation.partial_image\",\"b64_json\":\"...\",\"partial_image_index\":0}\n\n\n              event: image_generation.completed\n\n              data:\n              {\"type\":\"image_generation.completed\",\"b64_json\":\"...\",\"usage\":{\"total_tokens\":100,\"input_tokens\":50,\"output_tokens\":50,\"input_tokens_details\":{\"text_tokens\":10,\"image_tokens\":40}}}\n      description: |\n        Creates an image given a prompt. [Learn more](https://platform.openai.com/docs/guides/images).\n  /images/variations:\n    post:\n      operationId: createImageVariation\n      tags:\n        - Images\n      summary: Create image variation\n      requestBody:\n        required: true\n        content:\n          multipart/form-data:\n            schema:\n              $ref: '#/components/schemas/CreateImageVariationRequest'\n      responses:\n        '200':\n          description: OK\n          content:\n            application/json:\n              schema:\n                $ref: '#/components/schemas/ImagesResponse'\n      x-oaiMeta:\n        name: Create image variation\n        group: images\n        returns: Returns a list of [image](https://platform.openai.com/docs/api-reference/images/object) objects.\n        examples:\n          response: |\n            {\n              \"created\": 1589478378,\n              \"data\": [\n                {\n                  \"url\": \"https://...\"\n                },\n                {\n                  \"url\": \"https://...\"\n                }\n              ]\n            }\n          request:\n            curl: |\n              curl https://api.openai.com/v1/images/variations \\\n                -H \"Authorization: Bearer $OPENAI_API_KEY\" \\\n                -F image=\"@otter.png\" \\\n                -F n=2 \\\n                -F size=\"1024x1024\"\n            python: |-\n              from openai import OpenAI\n\n              client = OpenAI(\n                  api_key=\"My API Key\",\n              )\n              images_response = client.images.create_variation(\n                  image=b\"raw file contents\",\n              )\n              print(images_response.created)\n            node.js: >-\n              import OpenAI from 'openai';\n\n\n              const client = new OpenAI({\n                apiKey: 'My API Key',\n              });\n\n\n              const imagesResponse = await client.images.createVariation({ image:\n              fs.createReadStream('otter.png') });\n\n\n              console.log(imagesResponse.created);\n            csharp: |\n              using System;\n\n              using OpenAI.Images;\n\n              ImageClient client = new(\n                  model: \"dall-e-2\",\n                  apiKey: Environment.GetEnvironmentVariable(\"OPENAI_API_KEY\")\n              );\n\n              GeneratedImage image = client.GenerateImageVariation(imageFilePath: \"otter.png\");\n\n              Console.WriteLine(image.ImageUri);\n            go: |\n              package main\n\n              import (\n                \"bytes\"\n                \"context\"\n                \"fmt\"\n                \"io\"\n\n                \"github.com/openai/openai-go\"\n                \"github.com/openai/openai-go/option\"\n              )\n\n              func main() {\n                client := openai.NewClient(\n                  option.WithAPIKey(\"My API Key\"),\n                )\n                imagesResponse, err := client.Images.NewVariation(context.TODO(), openai.ImageNewVariationParams{\n                  Image: io.Reader(bytes.NewBuffer([]byte(\"some file contents\"))),\n                })\n                if err != nil {\n                  panic(err.Error())\n                }\n                fmt.Printf(\"%+v\\n\", imagesResponse.Created)\n              }\n            java: |-\n              package com.openai.example;\n\n              import com.openai.client.OpenAIClient;\n              import com.openai.client.okhttp.OpenAIOkHttpClient;\n              import com.openai.models.images.ImageCreateVariationParams;\n              import com.openai.models.images.ImagesResponse;\n              import java.io.ByteArrayInputStream;\n\n              public final class Main {\n                  private Main() {}\n\n                  public static void main(String[] args) {\n                      OpenAIClient client = OpenAIOkHttpClient.fromEnv();\n\n                      ImageCreateVariationParams params = ImageCreateVariationParams.builder()\n                          .image(ByteArrayInputStream(\"some content\".getBytes()))\n                          .build();\n                      ImagesResponse imagesResponse = client.images().createVariation(params);\n                  }\n              }\n            ruby: |-\n              require \"openai\"\n\n              openai = OpenAI::Client.new(api_key: \"My API Key\")\n\n              images_response = openai.images.create_variation(image: Pathname(__FILE__))\n\n              puts(images_response)\n      description: Creates a variation of a given image. This endpoint only supports `dall-e-2`.\n  /models:\n    get:\n      operationId: listModels\n      tags:\n        - Models\n      summary: List models\n      responses:\n        '200':\n          description: OK\n          content:\n            application/json:\n              schema:\n                $ref: '#/components/schemas/ListModelsResponse'\n      x-oaiMeta:\n        name: List models\n        group: models\n        returns: A list of [model](https://platform.openai.com/docs/api-reference/models/object) objects.\n        examples:\n          response: |\n            {\n              \"object\": \"list\",\n              \"data\": [\n                {\n                  \"id\": \"model-id-0\",\n                  \"object\": \"model\",\n                  \"created\": 1686935002,\n                  \"owned_by\": \"organization-owner\"\n                },\n                {\n                  \"id\": \"model-id-1\",\n                  \"object\": \"model\",\n                  \"created\": 1686935002,\n                  \"owned_by\": \"organization-owner\",\n                },\n                {\n                  \"id\": \"model-id-2\",\n                  \"object\": \"model\",\n                  \"created\": 1686935002,\n                  \"owned_by\": \"openai\"\n                },\n              ],\n              \"object\": \"list\"\n            }\n          request:\n            curl: |\n              curl https://api.openai.com/v1/models \\\n                -H \"Authorization: Bearer $OPENAI_API_KEY\"\n            python: |-\n              from openai import OpenAI\n\n              client = OpenAI(\n                  api_key=\"My API Key\",\n              )\n              page = client.models.list()\n              page = page.data[0]\n              print(page.id)\n            node.js: |-\n              import OpenAI from 'openai';\n\n              const client = new OpenAI({\n                apiKey: 'My API Key',\n              });\n\n              // Automatically fetches more pages as needed.\n              for await (const model of client.models.list()) {\n                console.log(model.id);\n              }\n            csharp: |\n              using System;\n\n              using OpenAI.Models;\n\n              OpenAIModelClient client = new(\n                  apiKey: Environment.GetEnvironmentVariable(\"OPENAI_API_KEY\")\n              );\n\n              foreach (var model in client.GetModels().Value)\n              {\n                  Console.WriteLine(model.Id);\n              }\n            go: |\n              package main\n\n              import (\n                \"context\"\n                \"fmt\"\n\n                \"github.com/openai/openai-go\"\n                \"github.com/openai/openai-go/option\"\n              )\n\n              func main() {\n                client := openai.NewClient(\n                  option.WithAPIKey(\"My API Key\"),\n                )\n                page, err := client.Models.List(context.TODO())\n                if err != nil {\n                  panic(err.Error())\n                }\n                fmt.Printf(\"%+v\\n\", page)\n              }\n            java: |-\n              package com.openai.example;\n\n              import com.openai.client.OpenAIClient;\n              import com.openai.client.okhttp.OpenAIOkHttpClient;\n              import com.openai.models.models.ModelListPage;\n              import com.openai.models.models.ModelListParams;\n\n              public final class Main {\n                  private Main() {}\n\n                  public static void main(String[] args) {\n                      OpenAIClient client = OpenAIOkHttpClient.fromEnv();\n\n                      ModelListPage page = client.models().list();\n                  }\n              }\n            ruby: |-\n              require \"openai\"\n\n              openai = OpenAI::Client.new(api_key: \"My API Key\")\n\n              page = openai.models.list\n\n              puts(page)\n      description: >-\n        Lists the currently available models, and provides basic information about each one such as the owner\n        and availability.\n  /models/{model}:\n    get:\n      operationId: retrieveModel\n      tags:\n        - Models\n      summary: Retrieve model\n      parameters:\n        - in: path\n          name: model\n          required: true\n          schema:\n            type: string\n            example: gpt-4o-mini\n          description: The ID of the model to use for this request\n      responses:\n        '200':\n          description: OK\n          content:\n            application/json:\n              schema:\n                $ref: '#/components/schemas/Model'\n      x-oaiMeta:\n        name: Retrieve model\n        group: models\n        returns: >-\n          The [model](https://platform.openai.com/docs/api-reference/models/object) object matching the\n          specified ID.\n        examples:\n          response: |\n            {\n              \"id\": \"VAR_chat_model_id\",\n              \"object\": \"model\",\n              \"created\": 1686935002,\n              \"owned_by\": \"openai\"\n            }\n          request:\n            curl: |\n              curl https://api.openai.com/v1/models/VAR_chat_model_id \\\n                -H \"Authorization: Bearer $OPENAI_API_KEY\"\n            python: |-\n              from openai import OpenAI\n\n              client = OpenAI(\n                  api_key=\"My API Key\",\n              )\n              model = client.models.retrieve(\n                  \"gpt-4o-mini\",\n              )\n              print(model.id)\n            node.js: |-\n              import OpenAI from 'openai';\n\n              const client = new OpenAI({\n                apiKey: 'My API Key',\n              });\n\n              const model = await client.models.retrieve('gpt-4o-mini');\n\n              console.log(model.id);\n            csharp: |\n              using System;\n              using System.ClientModel;\n\n              using OpenAI.Models;\n\n                OpenAIModelClient client = new(\n                  apiKey: Environment.GetEnvironmentVariable(\"OPENAI_API_KEY\")\n              );\n\n              ClientResult<OpenAIModel> model = client.GetModel(\"babbage-002\");\n              Console.WriteLine(model.Value.Id);\n            go: |\n              package main\n\n              import (\n                \"context\"\n                \"fmt\"\n\n                \"github.com/openai/openai-go\"\n                \"github.com/openai/openai-go/option\"\n              )\n\n              func main() {\n                client := openai.NewClient(\n                  option.WithAPIKey(\"My API Key\"),\n                )\n                model, err := client.Models.Get(context.TODO(), \"gpt-4o-mini\")\n                if err != nil {\n                  panic(err.Error())\n                }\n                fmt.Printf(\"%+v\\n\", model.ID)\n              }\n            java: |-\n              package com.openai.example;\n\n              import com.openai.client.OpenAIClient;\n              import com.openai.client.okhttp.OpenAIOkHttpClient;\n              import com.openai.models.models.Model;\n              import com.openai.models.models.ModelRetrieveParams;\n\n              public final class Main {\n                  private Main() {}\n\n                  public static void main(String[] args) {\n                      OpenAIClient client = OpenAIOkHttpClient.fromEnv();\n\n                      Model model = client.models().retrieve(\"gpt-4o-mini\");\n                  }\n              }\n            ruby: |-\n              require \"openai\"\n\n              openai = OpenAI::Client.new(api_key: \"My API Key\")\n\n              model = openai.models.retrieve(\"gpt-4o-mini\")\n\n              puts(model)\n      description: >-\n        Retrieves a model instance, providing basic information about the model such as the owner and\n        permissioning.\n    delete:\n      operationId: deleteModel\n      tags:\n        - Models\n      summary: Delete a fine-tuned model\n      parameters:\n        - in: path\n          name: model\n          required: true\n          schema:\n            type: string\n            example: ft:gpt-4o-mini:acemeco:suffix:abc123\n          description: The model to delete\n      responses:\n        '200':\n          description: OK\n          content:\n            application/json:\n              schema:\n                $ref: '#/components/schemas/DeleteModelResponse'\n      x-oaiMeta:\n        name: Delete a fine-tuned model\n        group: models\n        returns: Deletion status.\n        examples:\n          response: |\n            {\n              \"id\": \"ft:gpt-4o-mini:acemeco:suffix:abc123\",\n              \"object\": \"model\",\n              \"deleted\": true\n            }\n          request:\n            curl: |\n              curl https://api.openai.com/v1/models/ft:gpt-4o-mini:acemeco:suffix:abc123 \\\n                -X DELETE \\\n                -H \"Authorization: Bearer $OPENAI_API_KEY\"\n            python: |-\n              from openai import OpenAI\n\n              client = OpenAI(\n                  api_key=\"My API Key\",\n              )\n              model_deleted = client.models.delete(\n                  \"ft:gpt-4o-mini:acemeco:suffix:abc123\",\n              )\n              print(model_deleted.id)\n            node.js: |-\n              import OpenAI from 'openai';\n\n              const client = new OpenAI({\n                apiKey: 'My API Key',\n              });\n\n              const modelDeleted = await client.models.delete('ft:gpt-4o-mini:acemeco:suffix:abc123');\n\n              console.log(modelDeleted.id);\n            csharp: |\n              using System;\n              using System.ClientModel;\n\n              using OpenAI.Models;\n\n              OpenAIModelClient client = new(\n                  apiKey: Environment.GetEnvironmentVariable(\"OPENAI_API_KEY\")\n              );\n\n              ClientResult success = client.DeleteModel(\"ft:gpt-4o-mini:acemeco:suffix:abc123\");\n              Console.WriteLine(success);\n            go: |\n              package main\n\n              import (\n                \"context\"\n                \"fmt\"\n\n                \"github.com/openai/openai-go\"\n                \"github.com/openai/openai-go/option\"\n              )\n\n              func main() {\n                client := openai.NewClient(\n                  option.WithAPIKey(\"My API Key\"),\n                )\n                modelDeleted, err := client.Models.Delete(context.TODO(), \"ft:gpt-4o-mini:acemeco:suffix:abc123\")\n                if err != nil {\n                  panic(err.Error())\n                }\n                fmt.Printf(\"%+v\\n\", modelDeleted.ID)\n              }\n            java: |-\n              package com.openai.example;\n\n              import com.openai.client.OpenAIClient;\n              import com.openai.client.okhttp.OpenAIOkHttpClient;\n              import com.openai.models.models.ModelDeleteParams;\n              import com.openai.models.models.ModelDeleted;\n\n              public final class Main {\n                  private Main() {}\n\n                  public static void main(String[] args) {\n                      OpenAIClient client = OpenAIOkHttpClient.fromEnv();\n\n                      ModelDeleted modelDeleted = client.models().delete(\"ft:gpt-4o-mini:acemeco:suffix:abc123\");\n                  }\n              }\n            ruby: |-\n              require \"openai\"\n\n              openai = OpenAI::Client.new(api_key: \"My API Key\")\n\n              model_deleted = openai.models.delete(\"ft:gpt-4o-mini:acemeco:suffix:abc123\")\n\n              puts(model_deleted)\n      description: Delete a fine-tuned model. You must have the Owner role in your organization to delete a model.\n  /moderations:\n    post:\n      operationId: createModeration\n      tags:\n        - Moderations\n      summary: Create moderation\n      requestBody:\n        required: true\n        content:\n          application/json:\n            schema:\n              $ref: '#/components/schemas/CreateModerationRequest'\n      responses:\n        '200':\n          description: OK\n          content:\n            application/json:\n              schema:\n                $ref: '#/components/schemas/CreateModerationResponse'\n      x-oaiMeta:\n        name: Create moderation\n        group: moderations\n        returns: A [moderation](https://platform.openai.com/docs/api-reference/moderations/object) object.\n        examples:\n          - title: Single string\n            request:\n              curl: |\n                curl https://api.openai.com/v1/moderations \\\n                  -H \"Content-Type: application/json\" \\\n                  -H \"Authorization: Bearer $OPENAI_API_KEY\" \\\n                  -d '{\n                    \"input\": \"I want to kill them.\"\n                  }'\n              python: |-\n                from openai import OpenAI\n\n                client = OpenAI(\n                    api_key=\"My API Key\",\n                )\n                moderation = client.moderations.create(\n                    input=\"I want to kill them.\",\n                )\n                print(moderation.id)\n              node.js: |-\n                import OpenAI from 'openai';\n\n                const client = new OpenAI({\n                  apiKey: 'My API Key',\n                });\n\n                const moderation = await client.moderations.create({ input: 'I want to kill them.' });\n\n                console.log(moderation.id);\n              csharp: |\n                using System;\n                using System.ClientModel;\n\n                using OpenAI.Moderations;\n\n                ModerationClient client = new(\n                    model: \"omni-moderation-latest\",\n                    apiKey: Environment.GetEnvironmentVariable(\"OPENAI_API_KEY\")\n                );\n\n                ClientResult<ModerationResult> moderation = client.ClassifyText(\"I want to kill them.\");\n              go: |\n                package main\n\n                import (\n                  \"context\"\n                  \"fmt\"\n\n                  \"github.com/openai/openai-go\"\n                  \"github.com/openai/openai-go/option\"\n                )\n\n                func main() {\n                  client := openai.NewClient(\n                    option.WithAPIKey(\"My API Key\"),\n                  )\n                  moderation, err := client.Moderations.New(context.TODO(), openai.ModerationNewParams{\n                    Input: openai.ModerationNewParamsInputUnion{\n                      OfString: openai.String(\"I want to kill them.\"),\n                    },\n                  })\n                  if err != nil {\n                    panic(err.Error())\n                  }\n                  fmt.Printf(\"%+v\\n\", moderation.ID)\n                }\n              java: |-\n                package com.openai.example;\n\n                import com.openai.client.OpenAIClient;\n                import com.openai.client.okhttp.OpenAIOkHttpClient;\n                import com.openai.models.moderations.ModerationCreateParams;\n                import com.openai.models.moderations.ModerationCreateResponse;\n\n                public final class Main {\n                    private Main() {}\n\n                    public static void main(String[] args) {\n                        OpenAIClient client = OpenAIOkHttpClient.fromEnv();\n\n                        ModerationCreateParams params = ModerationCreateParams.builder()\n                            .input(\"I want to kill them.\")\n                            .build();\n                        ModerationCreateResponse moderation = client.moderations().create(params);\n                    }\n                }\n              ruby: |-\n                require \"openai\"\n\n                openai = OpenAI::Client.new(api_key: \"My API Key\")\n\n                moderation = openai.moderations.create(input: \"I want to kill them.\")\n\n                puts(moderation)\n            response: |\n              {\n                \"id\": \"modr-AB8CjOTu2jiq12hp1AQPfeqFWaORR\",\n                \"model\": \"text-moderation-007\",\n                \"results\": [\n                  {\n                    \"flagged\": true,\n                    \"categories\": {\n                      \"sexual\": false,\n                      \"hate\": false,\n                      \"harassment\": true,\n                      \"self-harm\": false,\n                      \"sexual/minors\": false,\n                      \"hate/threatening\": false,\n                      \"violence/graphic\": false,\n                      \"self-harm/intent\": false,\n                      \"self-harm/instructions\": false,\n                      \"harassment/threatening\": true,\n                      \"violence\": true\n                    },\n                    \"category_scores\": {\n                      \"sexual\": 0.000011726012417057063,\n                      \"hate\": 0.22706663608551025,\n                      \"harassment\": 0.5215635299682617,\n                      \"self-harm\": 2.227119921371923e-6,\n                      \"sexual/minors\": 7.107352217872176e-8,\n                      \"hate/threatening\": 0.023547329008579254,\n                      \"violence/graphic\": 0.00003391829886822961,\n                      \"self-harm/intent\": 1.646940972932498e-6,\n                      \"self-harm/instructions\": 1.1198755256458526e-9,\n                      \"harassment/threatening\": 0.5694745779037476,\n                      \"violence\": 0.9971134662628174\n                    }\n                  }\n                ]\n              }\n          - title: Image and text\n            request:\n              curl: |\n                curl https://api.openai.com/v1/moderations \\\n                  -X POST \\\n                  -H \"Content-Type: application/json\" \\\n                  -H \"Authorization: Bearer $OPENAI_API_KEY\" \\\n                  -d '{\n                    \"model\": \"omni-moderation-latest\",\n                    \"input\": [\n                      { \"type\": \"text\", \"text\": \"...text to classify goes here...\" },\n                      {\n                        \"type\": \"image_url\",\n                        \"image_url\": {\n                          \"url\": \"https://example.com/image.png\"\n                        }\n                      }\n                    ]\n                  }'\n              python: |-\n                from openai import OpenAI\n\n                client = OpenAI(\n                    api_key=\"My API Key\",\n                )\n                moderation = client.moderations.create(\n                    input=\"I want to kill them.\",\n                )\n                print(moderation.id)\n              node.js: |-\n                import OpenAI from 'openai';\n\n                const client = new OpenAI({\n                  apiKey: 'My API Key',\n                });\n\n                const moderation = await client.moderations.create({ input: 'I want to kill them.' });\n\n                console.log(moderation.id);\n              go: |\n                package main\n\n                import (\n                  \"context\"\n                  \"fmt\"\n\n                  \"github.com/openai/openai-go\"\n                  \"github.com/openai/openai-go/option\"\n                )\n\n                func main() {\n                  client := openai.NewClient(\n                    option.WithAPIKey(\"My API Key\"),\n                  )\n                  moderation, err := client.Moderations.New(context.TODO(), openai.ModerationNewParams{\n                    Input: openai.ModerationNewParamsInputUnion{\n                      OfString: openai.String(\"I want to kill them.\"),\n                    },\n                  })\n                  if err != nil {\n                    panic(err.Error())\n                  }\n                  fmt.Printf(\"%+v\\n\", moderation.ID)\n                }\n              java: |-\n                package com.openai.example;\n\n                import com.openai.client.OpenAIClient;\n                import com.openai.client.okhttp.OpenAIOkHttpClient;\n                import com.openai.models.moderations.ModerationCreateParams;\n                import com.openai.models.moderations.ModerationCreateResponse;\n\n                public final class Main {\n                    private Main() {}\n\n                    public static void main(String[] args) {\n                        OpenAIClient client = OpenAIOkHttpClient.fromEnv();\n\n                        ModerationCreateParams params = ModerationCreateParams.builder()\n                            .input(\"I want to kill them.\")\n                            .build();\n                        ModerationCreateResponse moderation = client.moderations().create(params);\n                    }\n                }\n              ruby: |-\n                require \"openai\"\n\n                openai = OpenAI::Client.new(api_key: \"My API Key\")\n\n                moderation = openai.moderations.create(input: \"I want to kill them.\")\n\n                puts(moderation)\n            response: |\n              {\n                \"id\": \"modr-0d9740456c391e43c445bf0f010940c7\",\n                \"model\": \"omni-moderation-latest\",\n                \"results\": [\n                  {\n                    \"flagged\": true,\n                    \"categories\": {\n                      \"harassment\": true,\n                      \"harassment/threatening\": true,\n                      \"sexual\": false,\n                      \"hate\": false,\n                      \"hate/threatening\": false,\n                      \"illicit\": false,\n                      \"illicit/violent\": false,\n                      \"self-harm/intent\": false,\n                      \"self-harm/instructions\": false,\n                      \"self-harm\": false,\n                      \"sexual/minors\": false,\n                      \"violence\": true,\n                      \"violence/graphic\": true\n                    },\n                    \"category_scores\": {\n                      \"harassment\": 0.8189693396524255,\n                      \"harassment/threatening\": 0.804985420696006,\n                      \"sexual\": 1.573112165348997e-6,\n                      \"hate\": 0.007562942636942845,\n                      \"hate/threatening\": 0.004208854591835476,\n                      \"illicit\": 0.030535955153511665,\n                      \"illicit/violent\": 0.008925306722380033,\n                      \"self-harm/intent\": 0.00023023930975076432,\n                      \"self-harm/instructions\": 0.0002293869201073356,\n                      \"self-harm\": 0.012598046106750154,\n                      \"sexual/minors\": 2.212566909570261e-8,\n                      \"violence\": 0.9999992735124786,\n                      \"violence/graphic\": 0.843064871157054\n                    },\n                    \"category_applied_input_types\": {\n                      \"harassment\": [\n                        \"text\"\n                      ],\n                      \"harassment/threatening\": [\n                        \"text\"\n                      ],\n                      \"sexual\": [\n                        \"text\",\n                        \"image\"\n                      ],\n                      \"hate\": [\n                        \"text\"\n                      ],\n                      \"hate/threatening\": [\n                        \"text\"\n                      ],\n                      \"illicit\": [\n                        \"text\"\n                      ],\n                      \"illicit/violent\": [\n                        \"text\"\n                      ],\n                      \"self-harm/intent\": [\n                        \"text\",\n                        \"image\"\n                      ],\n                      \"self-harm/instructions\": [\n                        \"text\",\n                        \"image\"\n                      ],\n                      \"self-harm\": [\n                        \"text\",\n                        \"image\"\n                      ],\n                      \"sexual/minors\": [\n                        \"text\"\n                      ],\n                      \"violence\": [\n                        \"text\",\n                        \"image\"\n                      ],\n                      \"violence/graphic\": [\n                        \"text\",\n                        \"image\"\n                      ]\n                    }\n                  }\n                ]\n              }\n      description: |\n        Classifies if text and/or image inputs are potentially harmful. Learn\n        more in the [moderation guide](https://platform.openai.com/docs/guides/moderation).\n  /organization/admin_api_keys:\n    get:\n      summary: List all organization and project API keys.\n      operationId: admin-api-keys-list\n      description: List organization API keys\n      parameters:\n        - in: query\n          name: after\n          required: false\n          schema:\n            type: string\n            nullable: true\n            description: Return keys with IDs that come after this ID in the pagination order.\n        - in: query\n          name: order\n          required: false\n          schema:\n            type: string\n            enum:\n              - asc\n              - desc\n            default: asc\n            description: Order results by creation time, ascending or descending.\n        - in: query\n          name: limit\n          required: false\n          schema:\n            type: integer\n            default: 20\n            description: Maximum number of keys to return.\n      responses:\n        '200':\n          description: A list of organization API keys.\n          content:\n            application/json:\n              schema:\n                $ref: '#/components/schemas/ApiKeyList'\n      x-oaiMeta:\n        name: List all organization and project API keys.\n        group: administration\n        returns: A list of admin and project API key objects.\n        examples:\n          response: |\n            {\n              \"object\": \"list\",\n              \"data\": [\n                {\n                  \"object\": \"organization.admin_api_key\",\n                  \"id\": \"key_abc\",\n                  \"name\": \"Main Admin Key\",\n                  \"redacted_value\": \"sk-admin...def\",\n                  \"created_at\": 1711471533,\n                  \"last_used_at\": 1711471534,\n                  \"owner\": {\n                    \"type\": \"service_account\",\n                    \"object\": \"organization.service_account\",\n                    \"id\": \"sa_456\",\n                    \"name\": \"My Service Account\",\n                    \"created_at\": 1711471533,\n                    \"role\": \"member\"\n                  }\n                }\n              ],\n              \"first_id\": \"key_abc\",\n              \"last_id\": \"key_abc\",\n              \"has_more\": false\n            }\n          request:\n            curl: |\n              curl https://api.openai.com/v1/organization/admin_api_keys?after=key_abc&limit=20 \\\n                -H \"Authorization: Bearer $OPENAI_ADMIN_KEY\" \\\n                -H \"Content-Type: application/json\"\n    post:\n      summary: Create admin API key\n      operationId: admin-api-keys-create\n      description: Create an organization admin API key\n      requestBody:\n        required: true\n        content:\n          application/json:\n            schema:\n              type: object\n              required:\n                - name\n              properties:\n                name:\n                  type: string\n                  example: New Admin Key\n      responses:\n        '200':\n          description: The newly created admin API key.\n          content:\n            application/json:\n              schema:\n                $ref: '#/components/schemas/AdminApiKey'\n      x-oaiMeta:\n        name: Create admin API key\n        group: administration\n        returns: >-\n          The created [AdminApiKey](https://platform.openai.com/docs/api-reference/admin-api-keys/object)\n          object.\n        examples:\n          response: |\n            {\n              \"object\": \"organization.admin_api_key\",\n              \"id\": \"key_xyz\",\n              \"name\": \"New Admin Key\",\n              \"redacted_value\": \"sk-admin...xyz\",\n              \"created_at\": 1711471533,\n              \"last_used_at\": 1711471534,\n              \"owner\": {\n                \"type\": \"user\",\n                \"object\": \"organization.user\",\n                \"id\": \"user_123\",\n                \"name\": \"John Doe\",\n                \"created_at\": 1711471533,\n                \"role\": \"owner\"\n              },\n              \"value\": \"sk-admin-1234abcd\"\n            }\n          request:\n            curl: |\n              curl -X POST https://api.openai.com/v1/organization/admin_api_keys \\\n                -H \"Authorization: Bearer $OPENAI_ADMIN_KEY\" \\\n                -H \"Content-Type: application/json\" \\\n                -d '{\n                    \"name\": \"New Admin Key\"\n                }'\n  /organization/admin_api_keys/{key_id}:\n    get:\n      summary: Retrieve admin API key\n      operationId: admin-api-keys-get\n      description: Retrieve a single organization API key\n      parameters:\n        - in: path\n          name: key_id\n          required: true\n          schema:\n            type: string\n            description: The ID of the API key.\n      responses:\n        '200':\n          description: Details of the requested API key.\n          content:\n            application/json:\n              schema:\n                $ref: '#/components/schemas/AdminApiKey'\n      x-oaiMeta:\n        name: Retrieve admin API key\n        group: administration\n        returns: >-\n          The requested [AdminApiKey](https://platform.openai.com/docs/api-reference/admin-api-keys/object)\n          object.\n        examples:\n          response: |\n            {\n              \"object\": \"organization.admin_api_key\",\n              \"id\": \"key_abc\",\n              \"name\": \"Main Admin Key\",\n              \"redacted_value\": \"sk-admin...xyz\",\n              \"created_at\": 1711471533,\n              \"last_used_at\": 1711471534,\n              \"owner\": {\n                \"type\": \"user\",\n                \"object\": \"organization.user\",\n                \"id\": \"user_123\",\n                \"name\": \"John Doe\",\n                \"created_at\": 1711471533,\n                \"role\": \"owner\"\n              }\n            }\n          request:\n            curl: |\n              curl https://api.openai.com/v1/organization/admin_api_keys/key_abc \\\n                -H \"Authorization: Bearer $OPENAI_ADMIN_KEY\" \\\n                -H \"Content-Type: application/json\"\n    delete:\n      summary: Delete admin API key\n      operationId: admin-api-keys-delete\n      description: Delete an organization admin API key\n      parameters:\n        - in: path\n          name: key_id\n          required: true\n          schema:\n            type: string\n            description: The ID of the API key to be deleted.\n      responses:\n        '200':\n          description: Confirmation that the API key was deleted.\n          content:\n            application/json:\n              schema:\n                type: object\n                properties:\n                  id:\n                    type: string\n                    example: key_abc\n                  object:\n                    type: string\n                    example: organization.admin_api_key.deleted\n                  deleted:\n                    type: boolean\n                    example: true\n      x-oaiMeta:\n        name: Delete admin API key\n        group: administration\n        returns: A confirmation object indicating the key was deleted.\n        examples:\n          response: |\n            {\n              \"id\": \"key_abc\",\n              \"object\": \"organization.admin_api_key.deleted\",\n              \"deleted\": true\n            }\n          request:\n            curl: |\n              curl -X DELETE https://api.openai.com/v1/organization/admin_api_keys/key_abc \\\n                -H \"Authorization: Bearer $OPENAI_ADMIN_KEY\" \\\n                -H \"Content-Type: application/json\"\n  /organization/audit_logs:\n    get:\n      summary: List audit logs\n      operationId: list-audit-logs\n      tags:\n        - Audit Logs\n      parameters:\n        - name: effective_at\n          in: query\n          description: Return only events whose `effective_at` (Unix seconds) is in this range.\n          required: false\n          schema:\n            type: object\n            properties:\n              gt:\n                type: integer\n                description: Return only events whose `effective_at` (Unix seconds) is greater than this value.\n              gte:\n                type: integer\n                description: >-\n                  Return only events whose `effective_at` (Unix seconds) is greater than or equal to this\n                  value.\n              lt:\n                type: integer\n                description: Return only events whose `effective_at` (Unix seconds) is less than this value.\n              lte:\n                type: integer\n                description: Return only events whose `effective_at` (Unix seconds) is less than or equal to this value.\n        - name: project_ids[]\n          in: query\n          description: Return only events for these projects.\n          required: false\n          schema:\n            type: array\n            items:\n              type: string\n        - name: event_types[]\n          in: query\n          description: >-\n            Return only events with a `type` in one of these values. For example, `project.created`. For all\n            options, see the documentation for the [audit log\n            object](https://platform.openai.com/docs/api-reference/audit-logs/object).\n          required: false\n          schema:\n            type: array\n            items:\n              $ref: '#/components/schemas/AuditLogEventType'\n        - name: actor_ids[]\n          in: query\n          description: >-\n            Return only events performed by these actors. Can be a user ID, a service account ID, or an api\n            key tracking ID.\n          required: false\n          schema:\n            type: array\n            items:\n              type: string\n        - name: actor_emails[]\n          in: query\n          description: Return only events performed by users with these emails.\n          required: false\n          schema:\n            type: array\n            items:\n              type: string\n        - name: resource_ids[]\n          in: query\n          description: Return only events performed on these targets. For example, a project ID updated.\n          required: false\n          schema:\n            type: array\n            items:\n              type: string\n        - name: limit\n          in: query\n          description: >\n            A limit on the number of objects to be returned. Limit can range between 1 and 100, and the\n            default is 20.\n          required: false\n          schema:\n            type: integer\n            default: 20\n        - name: after\n          in: query\n          description: >\n            A cursor for use in pagination. `after` is an object ID that defines your place in the list. For\n            instance, if you make a list request and receive 100 objects, ending with obj_foo, your subsequent\n            call can include after=obj_foo in order to fetch the next page of the list.\n          schema:\n            type: string\n        - name: before\n          in: query\n          description: >\n            A cursor for use in pagination. `before` is an object ID that defines your place in the list. For\n            instance, if you make a list request and receive 100 objects, starting with obj_foo, your\n            subsequent call can include before=obj_foo in order to fetch the previous page of the list.\n          schema:\n            type: string\n      responses:\n        '200':\n          description: Audit logs listed successfully.\n          content:\n            application/json:\n              schema:\n                $ref: '#/components/schemas/ListAuditLogsResponse'\n      x-oaiMeta:\n        name: List audit logs\n        group: audit-logs\n        returns: >-\n          A list of paginated [Audit Log](https://platform.openai.com/docs/api-reference/audit-logs/object)\n          objects.\n        examples:\n          response: |\n            {\n                \"object\": \"list\",\n                \"data\": [\n                    {\n                        \"id\": \"audit_log-xxx_yyyymmdd\",\n                        \"type\": \"project.archived\",\n                        \"effective_at\": 1722461446,\n                        \"actor\": {\n                            \"type\": \"api_key\",\n                            \"api_key\": {\n                                \"type\": \"user\",\n                                \"user\": {\n                                    \"id\": \"user-xxx\",\n                                    \"email\": \"user@example.com\"\n                                }\n                            }\n                        },\n                        \"project.archived\": {\n                            \"id\": \"proj_abc\"\n                        },\n                    },\n                    {\n                        \"id\": \"audit_log-yyy__20240101\",\n                        \"type\": \"api_key.updated\",\n                        \"effective_at\": 1720804190,\n                        \"actor\": {\n                            \"type\": \"session\",\n                            \"session\": {\n                                \"user\": {\n                                    \"id\": \"user-xxx\",\n                                    \"email\": \"user@example.com\"\n                                },\n                                \"ip_address\": \"127.0.0.1\",\n                                \"user_agent\": \"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.124 Safari/537.36\",\n                                \"ja3\": \"a497151ce4338a12c4418c44d375173e\",\n                                \"ja4\": \"q13d0313h3_55b375c5d22e_c7319ce65786\",\n                                \"ip_address_details\": {\n                                  \"country\": \"US\",\n                                  \"city\": \"San Francisco\",\n                                  \"region\": \"California\",\n                                  \"region_code\": \"CA\",\n                                  \"asn\": \"1234\",\n                                  \"latitude\": \"37.77490\",\n                                  \"longitude\": \"-122.41940\"\n                                }\n                            }\n                        },\n                        \"api_key.updated\": {\n                            \"id\": \"key_xxxx\",\n                            \"data\": {\n                                \"scopes\": [\"resource_2.operation_2\"]\n                            }\n                        },\n                    }\n                ],\n                \"first_id\": \"audit_log-xxx__20240101\",\n                \"last_id\": \"audit_log_yyy__20240101\",\n                \"has_more\": true\n            }\n          request:\n            curl: |\n              curl https://api.openai.com/v1/organization/audit_logs \\\n              -H \"Authorization: Bearer $OPENAI_ADMIN_KEY\" \\\n              -H \"Content-Type: application/json\"\n      description: List user actions and configuration changes within this organization.\n  /organization/certificates:\n    get:\n      summary: List organization certificates\n      operationId: listOrganizationCertificates\n      tags:\n        - Certificates\n      parameters:\n        - name: limit\n          in: query\n          description: >\n            A limit on the number of objects to be returned. Limit can range between 1 and 100, and the\n            default is 20.\n          required: false\n          schema:\n            type: integer\n            default: 20\n        - name: after\n          in: query\n          description: >\n            A cursor for use in pagination. `after` is an object ID that defines your place in the list. For\n            instance, if you make a list request and receive 100 objects, ending with obj_foo, your subsequent\n            call can include after=obj_foo in order to fetch the next page of the list.\n          required: false\n          schema:\n            type: string\n        - name: order\n          in: query\n          description: >\n            Sort order by the `created_at` timestamp of the objects. `asc` for ascending order and `desc` for\n            descending order.\n          schema:\n            type: string\n            default: desc\n            enum:\n              - asc\n              - desc\n      responses:\n        '200':\n          description: Certificates listed successfully.\n          content:\n            application/json:\n              schema:\n                $ref: '#/components/schemas/ListCertificatesResponse'\n      x-oaiMeta:\n        name: List organization certificates\n        group: administration\n        returns: A list of [Certificate](https://platform.openai.com/docs/api-reference/certificates/object) objects.\n        examples:\n          request:\n            curl: |\n              curl https://api.openai.com/v1/organization/certificates \\\n              -H \"Authorization: Bearer $OPENAI_ADMIN_KEY\"\n          response: |\n            {\n              \"object\": \"list\",\n              \"data\": [\n                {\n                  \"object\": \"organization.certificate\",\n                  \"id\": \"cert_abc\",\n                  \"name\": \"My Example Certificate\",\n                  \"active\": true,\n                  \"created_at\": 1234567,\n                  \"certificate_details\": {\n                    \"valid_at\": 12345667,\n                    \"expires_at\": 12345678\n                  }\n                },\n              ],\n              \"first_id\": \"cert_abc\",\n              \"last_id\": \"cert_abc\",\n              \"has_more\": false\n            }\n      description: List uploaded certificates for this organization.\n    post:\n      summary: Upload certificate\n      operationId: uploadCertificate\n      tags:\n        - Certificates\n      requestBody:\n        description: The certificate upload payload.\n        required: true\n        content:\n          application/json:\n            schema:\n              $ref: '#/components/schemas/UploadCertificateRequest'\n      responses:\n        '200':\n          description: Certificate uploaded successfully.\n          content:\n            application/json:\n              schema:\n                $ref: '#/components/schemas/Certificate'\n      x-oaiMeta:\n        name: Upload certificate\n        group: administration\n        returns: A single [Certificate](https://platform.openai.com/docs/api-reference/certificates/object) object.\n        examples:\n          request:\n            curl: |\n              curl -X POST https://api.openai.com/v1/organization/certificates \\\n              -H \"Authorization: Bearer $OPENAI_ADMIN_KEY\" \\\n              -H \"Content-Type: application/json\" \\\n              -d '{\n                \"name\": \"My Example Certificate\",\n                \"certificate\": \"-----BEGIN CERTIFICATE-----\\\\nMIIDeT...\\\\n-----END CERTIFICATE-----\"\n              }'\n          response: |\n            {\n              \"object\": \"certificate\",\n              \"id\": \"cert_abc\",\n              \"name\": \"My Example Certificate\",\n              \"created_at\": 1234567,\n              \"certificate_details\": {\n                \"valid_at\": 12345667,\n                \"expires_at\": 12345678\n              }\n            }\n      description: |\n        Upload a certificate to the organization. This does **not** automatically activate the certificate.\n\n        Organizations can upload up to 50 certificates.\n  /organization/certificates/activate:\n    post:\n      summary: Activate certificates for organization\n      operationId: activateOrganizationCertificates\n      tags:\n        - Certificates\n      requestBody:\n        description: The certificate activation payload.\n        required: true\n        content:\n          application/json:\n            schema:\n              $ref: '#/components/schemas/ToggleCertificatesRequest'\n      responses:\n        '200':\n          description: Certificates activated successfully.\n          content:\n            application/json:\n              schema:\n                $ref: '#/components/schemas/ListCertificatesResponse'\n      x-oaiMeta:\n        name: Activate certificates for organization\n        group: administration\n        returns: >-\n          A list of [Certificate](https://platform.openai.com/docs/api-reference/certificates/object) objects\n          that were activated.\n        examples:\n          request:\n            curl: |\n              curl https://api.openai.com/v1/organization/certificates/activate \\\n              -H \"Authorization: Bearer $OPENAI_ADMIN_KEY\" \\\n              -H \"Content-Type: application/json\" \\\n              -d '{\n                \"data\": [\"cert_abc\", \"cert_def\"]\n              }'\n          response: |\n            {\n              \"object\": \"organization.certificate.activation\",\n              \"data\": [\n                {\n                  \"object\": \"organization.certificate\",\n                  \"id\": \"cert_abc\",\n                  \"name\": \"My Example Certificate\",\n                  \"active\": true,\n                  \"created_at\": 1234567,\n                  \"certificate_details\": {\n                    \"valid_at\": 12345667,\n                    \"expires_at\": 12345678\n                  }\n                },\n                {\n                  \"object\": \"organization.certificate\",\n                  \"id\": \"cert_def\",\n                  \"name\": \"My Example Certificate 2\",\n                  \"active\": true,\n                  \"created_at\": 1234567,\n                  \"certificate_details\": {\n                    \"valid_at\": 12345667,\n                    \"expires_at\": 12345678\n                  }\n                },\n              ],\n            }\n      description: |\n        Activate certificates at the organization level.\n\n        You can atomically and idempotently activate up to 10 certificates at a time.\n  /organization/certificates/deactivate:\n    post:\n      summary: Deactivate certificates for organization\n      operationId: deactivateOrganizationCertificates\n      tags:\n        - Certificates\n      requestBody:\n        description: The certificate deactivation payload.\n        required: true\n        content:\n          application/json:\n            schema:\n              $ref: '#/components/schemas/ToggleCertificatesRequest'\n      responses:\n        '200':\n          description: Certificates deactivated successfully.\n          content:\n            application/json:\n              schema:\n                $ref: '#/components/schemas/ListCertificatesResponse'\n      x-oaiMeta:\n        name: Deactivate certificates for organization\n        group: administration\n        returns: >-\n          A list of [Certificate](https://platform.openai.com/docs/api-reference/certificates/object) objects\n          that were deactivated.\n        examples:\n          request:\n            curl: |\n              curl https://api.openai.com/v1/organization/certificates/deactivate \\\n              -H \"Authorization: Bearer $OPENAI_ADMIN_KEY\" \\\n              -H \"Content-Type: application/json\" \\\n              -d '{\n                \"data\": [\"cert_abc\", \"cert_def\"]\n              }'\n          response: |\n            {\n              \"object\": \"organization.certificate.deactivation\",\n              \"data\": [\n                {\n                  \"object\": \"organization.certificate\",\n                  \"id\": \"cert_abc\",\n                  \"name\": \"My Example Certificate\",\n                  \"active\": false,\n                  \"created_at\": 1234567,\n                  \"certificate_details\": {\n                    \"valid_at\": 12345667,\n                    \"expires_at\": 12345678\n                  }\n                },\n                {\n                  \"object\": \"organization.certificate\",\n                  \"id\": \"cert_def\",\n                  \"name\": \"My Example Certificate 2\",\n                  \"active\": false,\n                  \"created_at\": 1234567,\n                  \"certificate_details\": {\n                    \"valid_at\": 12345667,\n                    \"expires_at\": 12345678\n                  }\n                },\n              ],\n            }\n      description: |\n        Deactivate certificates at the organization level.\n\n        You can atomically and idempotently deactivate up to 10 certificates at a time.\n  /organization/certificates/{certificate_id}:\n    get:\n      summary: Get certificate\n      operationId: getCertificate\n      tags:\n        - Certificates\n      parameters:\n        - name: certificate_id\n          in: path\n          description: Unique ID of the certificate to retrieve.\n          required: true\n          schema:\n            type: string\n        - name: include\n          in: query\n          description: >-\n            A list of additional fields to include in the response. Currently the only supported value is\n            `content` to fetch the PEM content of the certificate.\n          required: false\n          schema:\n            type: array\n            items:\n              type: string\n              enum:\n                - content\n      responses:\n        '200':\n          description: Certificate retrieved successfully.\n          content:\n            application/json:\n              schema:\n                $ref: '#/components/schemas/Certificate'\n      x-oaiMeta:\n        name: Get certificate\n        group: administration\n        returns: A single [Certificate](https://platform.openai.com/docs/api-reference/certificates/object) object.\n        examples:\n          request:\n            curl: |\n              curl \"https://api.openai.com/v1/organization/certificates/cert_abc?include[]=content\" \\\n              -H \"Authorization: Bearer $OPENAI_ADMIN_KEY\"\n          response: |\n            {\n              \"object\": \"certificate\",\n              \"id\": \"cert_abc\",\n              \"name\": \"My Example Certificate\",\n              \"created_at\": 1234567,\n              \"certificate_details\": {\n                \"valid_at\": 1234567,\n                \"expires_at\": 12345678,\n                \"content\": \"-----BEGIN CERTIFICATE-----MIIDeT...-----END CERTIFICATE-----\"\n              }\n            }\n      description: |\n        Get a certificate that has been uploaded to the organization.\n\n        You can get a certificate regardless of whether it is active or not.\n    post:\n      summary: Modify certificate\n      operationId: modifyCertificate\n      tags:\n        - Certificates\n      requestBody:\n        description: The certificate modification payload.\n        required: true\n        content:\n          application/json:\n            schema:\n              $ref: '#/components/schemas/ModifyCertificateRequest'\n      responses:\n        '200':\n          description: Certificate modified successfully.\n          content:\n            application/json:\n              schema:\n                $ref: '#/components/schemas/Certificate'\n      x-oaiMeta:\n        name: Modify certificate\n        group: administration\n        returns: >-\n          The updated [Certificate](https://platform.openai.com/docs/api-reference/certificates/object)\n          object.\n        examples:\n          request:\n            curl: |\n              curl -X POST https://api.openai.com/v1/organization/certificates/cert_abc \\\n              -H \"Authorization: Bearer $OPENAI_ADMIN_KEY\" \\\n              -H \"Content-Type: application/json\" \\\n              -d '{\n                \"name\": \"Renamed Certificate\"\n              }'\n          response: |\n            {\n              \"object\": \"certificate\",\n              \"id\": \"cert_abc\",\n              \"name\": \"Renamed Certificate\",\n              \"created_at\": 1234567,\n              \"certificate_details\": {\n                \"valid_at\": 12345667,\n                \"expires_at\": 12345678\n              }\n            }\n      description: |\n        Modify a certificate. Note that only the name can be modified.\n    delete:\n      summary: Delete certificate\n      operationId: deleteCertificate\n      tags:\n        - Certificates\n      responses:\n        '200':\n          description: Certificate deleted successfully.\n          content:\n            application/json:\n              schema:\n                $ref: '#/components/schemas/DeleteCertificateResponse'\n      x-oaiMeta:\n        name: Delete certificate\n        group: administration\n        returns: A confirmation object indicating the certificate was deleted.\n        examples:\n          request:\n            curl: |\n              curl -X DELETE https://api.openai.com/v1/organization/certificates/cert_abc \\\n              -H \"Authorization: Bearer $OPENAI_ADMIN_KEY\"\n          response: |\n            {\n              \"object\": \"certificate.deleted\",\n              \"id\": \"cert_abc\"\n            }\n      description: |\n        Delete a certificate from the organization.\n\n        The certificate must be inactive for the organization and all projects.\n  /organization/costs:\n    get:\n      summary: Costs\n      operationId: usage-costs\n      tags:\n        - Usage\n      parameters:\n        - name: start_time\n          in: query\n          description: Start time (Unix seconds) of the query time range, inclusive.\n          required: true\n          schema:\n            type: integer\n        - name: end_time\n          in: query\n          description: End time (Unix seconds) of the query time range, exclusive.\n          required: false\n          schema:\n            type: integer\n        - name: bucket_width\n          in: query\n          description: Width of each time bucket in response. Currently only `1d` is supported, default to `1d`.\n          required: false\n          schema:\n            type: string\n            enum:\n              - 1d\n            default: 1d\n        - name: project_ids\n          in: query\n          description: Return only costs for these projects.\n          required: false\n          schema:\n            type: array\n            items:\n              type: string\n        - name: group_by\n          in: query\n          description: >-\n            Group the costs by the specified fields. Support fields include `project_id`, `line_item` and any\n            combination of them.\n          required: false\n          schema:\n            type: array\n            items:\n              type: string\n              enum:\n                - project_id\n                - line_item\n        - name: limit\n          in: query\n          description: >\n            A limit on the number of buckets to be returned. Limit can range between 1 and 180, and the\n            default is 7.\n          required: false\n          schema:\n            type: integer\n            default: 7\n        - name: page\n          in: query\n          description: A cursor for use in pagination. Corresponding to the `next_page` field from the previous response.\n          schema:\n            type: string\n      responses:\n        '200':\n          description: Costs data retrieved successfully.\n          content:\n            application/json:\n              schema:\n                $ref: '#/components/schemas/UsageResponse'\n      x-oaiMeta:\n        name: Costs\n        group: usage-costs\n        returns: >-\n          A list of paginated, time bucketed\n          [Costs](https://platform.openai.com/docs/api-reference/usage/costs_object) objects.\n        examples:\n          response: |\n            {\n                \"object\": \"page\",\n                \"data\": [\n                    {\n                        \"object\": \"bucket\",\n                        \"start_time\": 1730419200,\n                        \"end_time\": 1730505600,\n                        \"results\": [\n                            {\n                                \"object\": \"organization.costs.result\",\n                                \"amount\": {\n                                    \"value\": 0.06,\n                                    \"currency\": \"usd\"\n                                },\n                                \"line_item\": null,\n                                \"project_id\": null\n                            }\n                        ]\n                    }\n                ],\n                \"has_more\": false,\n                \"next_page\": null\n            }\n          request:\n            curl: |\n              curl \"https://api.openai.com/v1/organization/costs?start_time=1730419200&limit=1\" \\\n              -H \"Authorization: Bearer $OPENAI_ADMIN_KEY\" \\\n              -H \"Content-Type: application/json\"\n      description: Get costs details for the organization.\n  /organization/invites:\n    get:\n      summary: List invites\n      operationId: list-invites\n      tags:\n        - Invites\n      parameters:\n        - name: limit\n          in: query\n          description: >\n            A limit on the number of objects to be returned. Limit can range between 1 and 100, and the\n            default is 20.\n          required: false\n          schema:\n            type: integer\n            default: 20\n        - name: after\n          in: query\n          description: >\n            A cursor for use in pagination. `after` is an object ID that defines your place in the list. For\n            instance, if you make a list request and receive 100 objects, ending with obj_foo, your subsequent\n            call can include after=obj_foo in order to fetch the next page of the list.\n          required: false\n          schema:\n            type: string\n      responses:\n        '200':\n          description: Invites listed successfully.\n          content:\n            application/json:\n              schema:\n                $ref: '#/components/schemas/InviteListResponse'\n      x-oaiMeta:\n        name: List invites\n        group: administration\n        returns: A list of [Invite](https://platform.openai.com/docs/api-reference/invite/object) objects.\n        examples:\n          response: |\n            {\n              \"object\": \"list\",\n              \"data\": [\n                {\n                  \"object\": \"organization.invite\",\n                  \"id\": \"invite-abc\",\n                  \"email\": \"user@example.com\",\n                  \"role\": \"owner\",\n                  \"status\": \"accepted\",\n                  \"invited_at\": 1711471533,\n                  \"expires_at\": 1711471533,\n                  \"accepted_at\": 1711471533\n                }\n              ],\n              \"first_id\": \"invite-abc\",\n              \"last_id\": \"invite-abc\",\n              \"has_more\": false\n            }\n          request:\n            curl: |\n              curl https://api.openai.com/v1/organization/invites?after=invite-abc&limit=20 \\\n                -H \"Authorization: Bearer $OPENAI_ADMIN_KEY\" \\\n                -H \"Content-Type: application/json\"\n      description: Returns a list of invites in the organization.\n    post:\n      summary: Create invite\n      operationId: inviteUser\n      tags:\n        - Invites\n      requestBody:\n        description: The invite request payload.\n        required: true\n        content:\n          application/json:\n            schema:\n              $ref: '#/components/schemas/InviteRequest'\n      responses:\n        '200':\n          description: User invited successfully.\n          content:\n            application/json:\n              schema:\n                $ref: '#/components/schemas/Invite'\n      x-oaiMeta:\n        name: Create invite\n        group: administration\n        returns: The created [Invite](https://platform.openai.com/docs/api-reference/invite/object) object.\n        examples:\n          response: |\n            {\n              \"object\": \"organization.invite\",\n              \"id\": \"invite-def\",\n              \"email\": \"anotheruser@example.com\",\n              \"role\": \"reader\",\n              \"status\": \"pending\",\n              \"invited_at\": 1711471533,\n              \"expires_at\": 1711471533,\n              \"accepted_at\": null,\n              \"projects\": [\n                {\n                  \"id\": \"project-xyz\",\n                  \"role\": \"member\"\n                },\n                {\n                  \"id\": \"project-abc\",\n                  \"role\": \"owner\"\n                }\n              ]\n            }\n          request:\n            curl: |\n              curl -X POST https://api.openai.com/v1/organization/invites \\\n                -H \"Authorization: Bearer $OPENAI_ADMIN_KEY\" \\\n                -H \"Content-Type: application/json\" \\\n                -d '{\n                    \"email\": \"anotheruser@example.com\",\n                    \"role\": \"reader\",\n                    \"projects\": [\n                      {\n                        \"id\": \"project-xyz\",\n                        \"role\": \"member\"\n                      },\n                      {\n                        \"id\": \"project-abc\",\n                        \"role\": \"owner\"\n                      }\n                    ]\n                }'\n      description: >-\n        Create an invite for a user to the organization. The invite must be accepted by the user before they\n        have access to the organization.\n  /organization/invites/{invite_id}:\n    get:\n      summary: Retrieve invite\n      operationId: retrieve-invite\n      tags:\n        - Invites\n      parameters:\n        - in: path\n          name: invite_id\n          required: true\n          schema:\n            type: string\n          description: The ID of the invite to retrieve.\n      responses:\n        '200':\n          description: Invite retrieved successfully.\n          content:\n            application/json:\n              schema:\n                $ref: '#/components/schemas/Invite'\n      x-oaiMeta:\n        name: Retrieve invite\n        group: administration\n        returns: >-\n          The [Invite](https://platform.openai.com/docs/api-reference/invite/object) object matching the\n          specified ID.\n        examples:\n          response: |\n            {\n                \"object\": \"organization.invite\",\n                \"id\": \"invite-abc\",\n                \"email\": \"user@example.com\",\n                \"role\": \"owner\",\n                \"status\": \"accepted\",\n                \"invited_at\": 1711471533,\n                \"expires_at\": 1711471533,\n                \"accepted_at\": 1711471533\n            }\n          request:\n            curl: |\n              curl https://api.openai.com/v1/organization/invites/invite-abc \\\n                -H \"Authorization: Bearer $OPENAI_ADMIN_KEY\" \\\n                -H \"Content-Type: application/json\"\n      description: Retrieves an invite.\n    delete:\n      summary: Delete invite\n      operationId: delete-invite\n      tags:\n        - Invites\n      parameters:\n        - in: path\n          name: invite_id\n          required: true\n          schema:\n            type: string\n          description: The ID of the invite to delete.\n      responses:\n        '200':\n          description: Invite deleted successfully.\n          content:\n            application/json:\n              schema:\n                $ref: '#/components/schemas/InviteDeleteResponse'\n      x-oaiMeta:\n        name: Delete invite\n        group: administration\n        returns: Confirmation that the invite has been deleted\n        examples:\n          response: |\n            {\n                \"object\": \"organization.invite.deleted\",\n                \"id\": \"invite-abc\",\n                \"deleted\": true\n            }\n          request:\n            curl: |\n              curl -X DELETE https://api.openai.com/v1/organization/invites/invite-abc \\\n                -H \"Authorization: Bearer $OPENAI_ADMIN_KEY\" \\\n                -H \"Content-Type: application/json\"\n      description: Delete an invite. If the invite has already been accepted, it cannot be deleted.\n  /organization/projects:\n    get:\n      summary: List projects\n      operationId: list-projects\n      tags:\n        - Projects\n      parameters:\n        - name: limit\n          in: query\n          description: >\n            A limit on the number of objects to be returned. Limit can range between 1 and 100, and the\n            default is 20.\n          required: false\n          schema:\n            type: integer\n            default: 20\n        - name: after\n          in: query\n          description: >\n            A cursor for use in pagination. `after` is an object ID that defines your place in the list. For\n            instance, if you make a list request and receive 100 objects, ending with obj_foo, your subsequent\n            call can include after=obj_foo in order to fetch the next page of the list.\n          required: false\n          schema:\n            type: string\n        - name: include_archived\n          in: query\n          schema:\n            type: boolean\n            default: false\n          description: >-\n            If `true` returns all projects including those that have been `archived`. Archived projects are\n            not included by default.\n      responses:\n        '200':\n          description: Projects listed successfully.\n          content:\n            application/json:\n              schema:\n                $ref: '#/components/schemas/ProjectListResponse'\n      x-oaiMeta:\n        name: List projects\n        group: administration\n        returns: A list of [Project](https://platform.openai.com/docs/api-reference/projects/object) objects.\n        examples:\n          response: |\n            {\n                \"object\": \"list\",\n                \"data\": [\n                    {\n                        \"id\": \"proj_abc\",\n                        \"object\": \"organization.project\",\n                        \"name\": \"Project example\",\n                        \"created_at\": 1711471533,\n                        \"archived_at\": null,\n                        \"status\": \"active\"\n                    }\n                ],\n                \"first_id\": \"proj-abc\",\n                \"last_id\": \"proj-xyz\",\n                \"has_more\": false\n            }\n          request:\n            curl: >\n              curl\n              https://api.openai.com/v1/organization/projects?after=proj_abc&limit=20&include_archived=false \\\n                -H \"Authorization: Bearer $OPENAI_ADMIN_KEY\" \\\n                -H \"Content-Type: application/json\"\n      description: Returns a list of projects.\n    post:\n      summary: Create project\n      operationId: create-project\n      tags:\n        - Projects\n      requestBody:\n        description: The project create request payload.\n        required: true\n        content:\n          application/json:\n            schema:\n              $ref: '#/components/schemas/ProjectCreateRequest'\n      responses:\n        '200':\n          description: Project created successfully.\n          content:\n            application/json:\n              schema:\n                $ref: '#/components/schemas/Project'\n      x-oaiMeta:\n        name: Create project\n        group: administration\n        returns: The created [Project](https://platform.openai.com/docs/api-reference/projects/object) object.\n        examples:\n          response: |\n            {\n                \"id\": \"proj_abc\",\n                \"object\": \"organization.project\",\n                \"name\": \"Project ABC\",\n                \"created_at\": 1711471533,\n                \"archived_at\": null,\n                \"status\": \"active\"\n            }\n          request:\n            curl: |\n              curl -X POST https://api.openai.com/v1/organization/projects \\\n                -H \"Authorization: Bearer $OPENAI_ADMIN_KEY\" \\\n                -H \"Content-Type: application/json\" \\\n                -d '{\n                    \"name\": \"Project ABC\"\n                }'\n      description: Create a new project in the organization. Projects can be created and archived, but cannot be deleted.\n  /organization/projects/{project_id}:\n    get:\n      summary: Retrieve project\n      operationId: retrieve-project\n      tags:\n        - Projects\n      parameters:\n        - name: project_id\n          in: path\n          description: The ID of the project.\n          required: true\n          schema:\n            type: string\n      responses:\n        '200':\n          description: Project retrieved successfully.\n          content:\n            application/json:\n              schema:\n                $ref: '#/components/schemas/Project'\n      x-oaiMeta:\n        name: Retrieve project\n        group: administration\n        description: Retrieve a project.\n        returns: >-\n          The [Project](https://platform.openai.com/docs/api-reference/projects/object) object matching the\n          specified ID.\n        examples:\n          response: |\n            {\n                \"id\": \"proj_abc\",\n                \"object\": \"organization.project\",\n                \"name\": \"Project example\",\n                \"created_at\": 1711471533,\n                \"archived_at\": null,\n                \"status\": \"active\"\n            }\n          request:\n            curl: |\n              curl https://api.openai.com/v1/organization/projects/proj_abc \\\n                -H \"Authorization: Bearer $OPENAI_ADMIN_KEY\" \\\n                -H \"Content-Type: application/json\"\n      description: Retrieves a project.\n    post:\n      summary: Modify project\n      operationId: modify-project\n      tags:\n        - Projects\n      parameters:\n        - name: project_id\n          in: path\n          description: The ID of the project.\n          required: true\n          schema:\n            type: string\n      requestBody:\n        description: The project update request payload.\n        required: true\n        content:\n          application/json:\n            schema:\n              $ref: '#/components/schemas/ProjectUpdateRequest'\n      responses:\n        '200':\n          description: Project updated successfully.\n          content:\n            application/json:\n              schema:\n                $ref: '#/components/schemas/Project'\n        '400':\n          description: Error response when updating the default project.\n          content:\n            application/json:\n              schema:\n                $ref: '#/components/schemas/ErrorResponse'\n      x-oaiMeta:\n        name: Modify project\n        group: administration\n        returns: The updated [Project](https://platform.openai.com/docs/api-reference/projects/object) object.\n        examples:\n          response: ''\n          request:\n            curl: |\n              curl -X POST https://api.openai.com/v1/organization/projects/proj_abc \\\n                -H \"Authorization: Bearer $OPENAI_ADMIN_KEY\" \\\n                -H \"Content-Type: application/json\" \\\n                -d '{\n                    \"name\": \"Project DEF\"\n                }'\n      description: Modifies a project in the organization.\n  /organization/projects/{project_id}/api_keys:\n    get:\n      summary: List project API keys\n      operationId: list-project-api-keys\n      tags:\n        - Projects\n      parameters:\n        - name: project_id\n          in: path\n          description: The ID of the project.\n          required: true\n          schema:\n            type: string\n        - name: limit\n          in: query\n          description: >\n            A limit on the number of objects to be returned. Limit can range between 1 and 100, and the\n            default is 20.\n          required: false\n          schema:\n            type: integer\n            default: 20\n        - name: after\n          in: query\n          description: >\n            A cursor for use in pagination. `after` is an object ID that defines your place in the list. For\n            instance, if you make a list request and receive 100 objects, ending with obj_foo, your subsequent\n            call can include after=obj_foo in order to fetch the next page of the list.\n          required: false\n          schema:\n            type: string\n      responses:\n        '200':\n          description: Project API keys listed successfully.\n          content:\n            application/json:\n              schema:\n                $ref: '#/components/schemas/ProjectApiKeyListResponse'\n      x-oaiMeta:\n        name: List project API keys\n        group: administration\n        returns: >-\n          A list of [ProjectApiKey](https://platform.openai.com/docs/api-reference/project-api-keys/object)\n          objects.\n        examples:\n          response: |\n            {\n                \"object\": \"list\",\n                \"data\": [\n                    {\n                        \"object\": \"organization.project.api_key\",\n                        \"redacted_value\": \"sk-abc...def\",\n                        \"name\": \"My API Key\",\n                        \"created_at\": 1711471533,\n                        \"last_used_at\": 1711471534,\n                        \"id\": \"key_abc\",\n                        \"owner\": {\n                            \"type\": \"user\",\n                            \"user\": {\n                                \"object\": \"organization.project.user\",\n                                \"id\": \"user_abc\",\n                                \"name\": \"First Last\",\n                                \"email\": \"user@example.com\",\n                                \"role\": \"owner\",\n                                \"added_at\": 1711471533\n                            }\n                        }\n                    }\n                ],\n                \"first_id\": \"key_abc\",\n                \"last_id\": \"key_xyz\",\n                \"has_more\": false\n            }\n          request:\n            curl: |\n              curl https://api.openai.com/v1/organization/projects/proj_abc/api_keys?after=key_abc&limit=20 \\\n                -H \"Authorization: Bearer $OPENAI_ADMIN_KEY\" \\\n                -H \"Content-Type: application/json\"\n      description: Returns a list of API keys in the project.\n  /organization/projects/{project_id}/api_keys/{key_id}:\n    get:\n      summary: Retrieve project API key\n      operationId: retrieve-project-api-key\n      tags:\n        - Projects\n      parameters:\n        - name: project_id\n          in: path\n          description: The ID of the project.\n          required: true\n          schema:\n            type: string\n        - name: key_id\n          in: path\n          description: The ID of the API key.\n          required: true\n          schema:\n            type: string\n      responses:\n        '200':\n          description: Project API key retrieved successfully.\n          content:\n            application/json:\n              schema:\n                $ref: '#/components/schemas/ProjectApiKey'\n      x-oaiMeta:\n        name: Retrieve project API key\n        group: administration\n        returns: >-\n          The [ProjectApiKey](https://platform.openai.com/docs/api-reference/project-api-keys/object) object\n          matching the specified ID.\n        examples:\n          response: |\n            {\n                \"object\": \"organization.project.api_key\",\n                \"redacted_value\": \"sk-abc...def\",\n                \"name\": \"My API Key\",\n                \"created_at\": 1711471533,\n                \"last_used_at\": 1711471534,\n                \"id\": \"key_abc\",\n                \"owner\": {\n                    \"type\": \"user\",\n                    \"user\": {\n                        \"object\": \"organization.project.user\",\n                        \"id\": \"user_abc\",\n                        \"name\": \"First Last\",\n                        \"email\": \"user@example.com\",\n                        \"role\": \"owner\",\n                        \"added_at\": 1711471533\n                    }\n                }\n            }\n          request:\n            curl: |\n              curl https://api.openai.com/v1/organization/projects/proj_abc/api_keys/key_abc \\\n                -H \"Authorization: Bearer $OPENAI_ADMIN_KEY\" \\\n                -H \"Content-Type: application/json\"\n      description: Retrieves an API key in the project.\n    delete:\n      summary: Delete project API key\n      operationId: delete-project-api-key\n      tags:\n        - Projects\n      parameters:\n        - name: project_id\n          in: path\n          description: The ID of the project.\n          required: true\n          schema:\n            type: string\n        - name: key_id\n          in: path\n          description: The ID of the API key.\n          required: true\n          schema:\n            type: string\n      responses:\n        '200':\n          description: Project API key deleted successfully.\n          content:\n            application/json:\n              schema:\n                $ref: '#/components/schemas/ProjectApiKeyDeleteResponse'\n        '400':\n          description: Error response for various conditions.\n          content:\n            application/json:\n              schema:\n                $ref: '#/components/schemas/ErrorResponse'\n      x-oaiMeta:\n        name: Delete project API key\n        group: administration\n        returns: Confirmation of the key's deletion or an error if the key belonged to a service account\n        examples:\n          response: |\n            {\n                \"object\": \"organization.project.api_key.deleted\",\n                \"id\": \"key_abc\",\n                \"deleted\": true\n            }\n          request:\n            curl: |\n              curl -X DELETE https://api.openai.com/v1/organization/projects/proj_abc/api_keys/key_abc \\\n                -H \"Authorization: Bearer $OPENAI_ADMIN_KEY\" \\\n                -H \"Content-Type: application/json\"\n      description: Deletes an API key from the project.\n  /organization/projects/{project_id}/archive:\n    post:\n      summary: Archive project\n      operationId: archive-project\n      tags:\n        - Projects\n      parameters:\n        - name: project_id\n          in: path\n          description: The ID of the project.\n          required: true\n          schema:\n            type: string\n      responses:\n        '200':\n          description: Project archived successfully.\n          content:\n            application/json:\n              schema:\n                $ref: '#/components/schemas/Project'\n      x-oaiMeta:\n        name: Archive project\n        group: administration\n        returns: The archived [Project](https://platform.openai.com/docs/api-reference/projects/object) object.\n        examples:\n          response: |\n            {\n                \"id\": \"proj_abc\",\n                \"object\": \"organization.project\",\n                \"name\": \"Project DEF\",\n                \"created_at\": 1711471533,\n                \"archived_at\": 1711471533,\n                \"status\": \"archived\"\n            }\n          request:\n            curl: |\n              curl -X POST https://api.openai.com/v1/organization/projects/proj_abc/archive \\\n                -H \"Authorization: Bearer $OPENAI_ADMIN_KEY\" \\\n                -H \"Content-Type: application/json\"\n      description: Archives a project in the organization. Archived projects cannot be used or updated.\n  /organization/projects/{project_id}/certificates:\n    get:\n      summary: List project certificates\n      operationId: listProjectCertificates\n      tags:\n        - Certificates\n      parameters:\n        - name: project_id\n          in: path\n          description: The ID of the project.\n          required: true\n          schema:\n            type: string\n        - name: limit\n          in: query\n          description: >\n            A limit on the number of objects to be returned. Limit can range between 1 and 100, and the\n            default is 20.\n          required: false\n          schema:\n            type: integer\n            default: 20\n        - name: after\n          in: query\n          description: >\n            A cursor for use in pagination. `after` is an object ID that defines your place in the list. For\n            instance, if you make a list request and receive 100 objects, ending with obj_foo, your subsequent\n            call can include after=obj_foo in order to fetch the next page of the list.\n          required: false\n          schema:\n            type: string\n        - name: order\n          in: query\n          description: >\n            Sort order by the `created_at` timestamp of the objects. `asc` for ascending order and `desc` for\n            descending order.\n          schema:\n            type: string\n            default: desc\n            enum:\n              - asc\n              - desc\n      responses:\n        '200':\n          description: Certificates listed successfully.\n          content:\n            application/json:\n              schema:\n                $ref: '#/components/schemas/ListCertificatesResponse'\n      x-oaiMeta:\n        name: List project certificates\n        group: administration\n        returns: A list of [Certificate](https://platform.openai.com/docs/api-reference/certificates/object) objects.\n        examples:\n          request:\n            curl: |\n              curl https://api.openai.com/v1/organization/projects/proj_abc/certificates \\\n              -H \"Authorization: Bearer $OPENAI_ADMIN_KEY\"\n          response: |\n            {\n              \"object\": \"list\",\n              \"data\": [\n                {\n                  \"object\": \"organization.project.certificate\",\n                  \"id\": \"cert_abc\",\n                  \"name\": \"My Example Certificate\",\n                  \"active\": true,\n                  \"created_at\": 1234567,\n                  \"certificate_details\": {\n                    \"valid_at\": 12345667,\n                    \"expires_at\": 12345678\n                  }\n                },\n              ],\n              \"first_id\": \"cert_abc\",\n              \"last_id\": \"cert_abc\",\n              \"has_more\": false\n            }\n      description: List certificates for this project.\n  /organization/projects/{project_id}/certificates/activate:\n    post:\n      summary: Activate certificates for project\n      operationId: activateProjectCertificates\n      tags:\n        - Certificates\n      parameters:\n        - name: project_id\n          in: path\n          description: The ID of the project.\n          required: true\n          schema:\n            type: string\n      requestBody:\n        description: The certificate activation payload.\n        required: true\n        content:\n          application/json:\n            schema:\n              $ref: '#/components/schemas/ToggleCertificatesRequest'\n      responses:\n        '200':\n          description: Certificates activated successfully.\n          content:\n            application/json:\n              schema:\n                $ref: '#/components/schemas/ListCertificatesResponse'\n      x-oaiMeta:\n        name: Activate certificates for project\n        group: administration\n        returns: >-\n          A list of [Certificate](https://platform.openai.com/docs/api-reference/certificates/object) objects\n          that were activated.\n        examples:\n          request:\n            curl: |\n              curl https://api.openai.com/v1/organization/projects/proj_abc/certificates/activate \\\n              -H \"Authorization: Bearer $OPENAI_ADMIN_KEY\" \\\n              -H \"Content-Type: application/json\" \\\n              -d '{\n                \"data\": [\"cert_abc\", \"cert_def\"]\n              }'\n          response: |\n            {\n              \"object\": \"organization.project.certificate.activation\",\n              \"data\": [\n                {\n                  \"object\": \"organization.project.certificate\",\n                  \"id\": \"cert_abc\",\n                  \"name\": \"My Example Certificate\",\n                  \"active\": true,\n                  \"created_at\": 1234567,\n                  \"certificate_details\": {\n                    \"valid_at\": 12345667,\n                    \"expires_at\": 12345678\n                  }\n                },\n                {\n                  \"object\": \"organization.project.certificate\",\n                  \"id\": \"cert_def\",\n                  \"name\": \"My Example Certificate 2\",\n                  \"active\": true,\n                  \"created_at\": 1234567,\n                  \"certificate_details\": {\n                    \"valid_at\": 12345667,\n                    \"expires_at\": 12345678\n                  }\n                },\n              ],\n            }\n      description: |\n        Activate certificates at the project level.\n\n        You can atomically and idempotently activate up to 10 certificates at a time.\n  /organization/projects/{project_id}/certificates/deactivate:\n    post:\n      summary: Deactivate certificates for project\n      operationId: deactivateProjectCertificates\n      tags:\n        - Certificates\n      parameters:\n        - name: project_id\n          in: path\n          description: The ID of the project.\n          required: true\n          schema:\n            type: string\n      requestBody:\n        description: The certificate deactivation payload.\n        required: true\n        content:\n          application/json:\n            schema:\n              $ref: '#/components/schemas/ToggleCertificatesRequest'\n      responses:\n        '200':\n          description: Certificates deactivated successfully.\n          content:\n            application/json:\n              schema:\n                $ref: '#/components/schemas/ListCertificatesResponse'\n      x-oaiMeta:\n        name: Deactivate certificates for project\n        group: administration\n        returns: >-\n          A list of [Certificate](https://platform.openai.com/docs/api-reference/certificates/object) objects\n          that were deactivated.\n        examples:\n          request:\n            curl: |\n              curl https://api.openai.com/v1/organization/projects/proj_abc/certificates/deactivate \\\n              -H \"Authorization: Bearer $OPENAI_ADMIN_KEY\" \\\n              -H \"Content-Type: application/json\" \\\n              -d '{\n                \"data\": [\"cert_abc\", \"cert_def\"]\n              }'\n          response: |\n            {\n              \"object\": \"organization.project.certificate.deactivation\",\n              \"data\": [\n                {\n                  \"object\": \"organization.project.certificate\",\n                  \"id\": \"cert_abc\",\n                  \"name\": \"My Example Certificate\",\n                  \"active\": false,\n                  \"created_at\": 1234567,\n                  \"certificate_details\": {\n                    \"valid_at\": 12345667,\n                    \"expires_at\": 12345678\n                  }\n                },\n                {\n                  \"object\": \"organization.project.certificate\",\n                  \"id\": \"cert_def\",\n                  \"name\": \"My Example Certificate 2\",\n                  \"active\": false,\n                  \"created_at\": 1234567,\n                  \"certificate_details\": {\n                    \"valid_at\": 12345667,\n                    \"expires_at\": 12345678\n                  }\n                },\n              ],\n            }\n      description: |\n        Deactivate certificates at the project level. You can atomically and\n        idempotently deactivate up to 10 certificates at a time.\n  /organization/projects/{project_id}/rate_limits:\n    get:\n      summary: List project rate limits\n      operationId: list-project-rate-limits\n      tags:\n        - Projects\n      parameters:\n        - name: project_id\n          in: path\n          description: The ID of the project.\n          required: true\n          schema:\n            type: string\n        - name: limit\n          in: query\n          description: |\n            A limit on the number of objects to be returned. The default is 100.\n          required: false\n          schema:\n            type: integer\n            default: 100\n        - name: after\n          in: query\n          description: >\n            A cursor for use in pagination. `after` is an object ID that defines your place in the list. For\n            instance, if you make a list request and receive 100 objects, ending with obj_foo, your subsequent\n            call can include after=obj_foo in order to fetch the next page of the list.\n          required: false\n          schema:\n            type: string\n        - name: before\n          in: query\n          description: >\n            A cursor for use in pagination. `before` is an object ID that defines your place in the list. For\n            instance, if you make a list request and receive 100 objects, beginning with obj_foo, your\n            subsequent call can include before=obj_foo in order to fetch the previous page of the list.\n          required: false\n          schema:\n            type: string\n      responses:\n        '200':\n          description: Project rate limits listed successfully.\n          content:\n            application/json:\n              schema:\n                $ref: '#/components/schemas/ProjectRateLimitListResponse'\n      x-oaiMeta:\n        name: List project rate limits\n        group: administration\n        returns: >-\n          A list of\n          [ProjectRateLimit](https://platform.openai.com/docs/api-reference/project-rate-limits/object)\n          objects.\n        examples:\n          response: |\n            {\n                \"object\": \"list\",\n                \"data\": [\n                    {\n                      \"object\": \"project.rate_limit\",\n                      \"id\": \"rl-ada\",\n                      \"model\": \"ada\",\n                      \"max_requests_per_1_minute\": 600,\n                      \"max_tokens_per_1_minute\": 150000,\n                      \"max_images_per_1_minute\": 10\n                    }\n                ],\n                \"first_id\": \"rl-ada\",\n                \"last_id\": \"rl-ada\",\n                \"has_more\": false\n            }\n          request:\n            curl: >\n              curl https://api.openai.com/v1/organization/projects/proj_abc/rate_limits?after=rl_xxx&limit=20\n              \\\n                -H \"Authorization: Bearer $OPENAI_ADMIN_KEY\" \\\n                -H \"Content-Type: application/json\"\n          error_response: |\n            {\n                \"code\": 404,\n                \"message\": \"The project {project_id} was not found\"\n            }\n      description: Returns the rate limits per model for a project.\n  /organization/projects/{project_id}/rate_limits/{rate_limit_id}:\n    post:\n      summary: Modify project rate limit\n      operationId: update-project-rate-limits\n      tags:\n        - Projects\n      parameters:\n        - name: project_id\n          in: path\n          description: The ID of the project.\n          required: true\n          schema:\n            type: string\n        - name: rate_limit_id\n          in: path\n          description: The ID of the rate limit.\n          required: true\n          schema:\n            type: string\n      requestBody:\n        description: The project rate limit update request payload.\n        required: true\n        content:\n          application/json:\n            schema:\n              $ref: '#/components/schemas/ProjectRateLimitUpdateRequest'\n      responses:\n        '200':\n          description: Project rate limit updated successfully.\n          content:\n            application/json:\n              schema:\n                $ref: '#/components/schemas/ProjectRateLimit'\n        '400':\n          description: Error response for various conditions.\n          content:\n            application/json:\n              schema:\n                $ref: '#/components/schemas/ErrorResponse'\n      x-oaiMeta:\n        name: Modify project rate limit\n        group: administration\n        returns: >-\n          The updated\n          [ProjectRateLimit](https://platform.openai.com/docs/api-reference/project-rate-limits/object)\n          object.\n        examples:\n          response: |\n            {\n                \"object\": \"project.rate_limit\",\n                \"id\": \"rl-ada\",\n                \"model\": \"ada\",\n                \"max_requests_per_1_minute\": 600,\n                \"max_tokens_per_1_minute\": 150000,\n                \"max_images_per_1_minute\": 10\n              }\n          request:\n            curl: |\n              curl -X POST https://api.openai.com/v1/organization/projects/proj_abc/rate_limits/rl_xxx \\\n                -H \"Authorization: Bearer $OPENAI_ADMIN_KEY\" \\\n                -H \"Content-Type: application/json\" \\\n                -d '{\n                    \"max_requests_per_1_minute\": 500\n                }'\n          error_response: |\n            {\n                \"code\": 404,\n                \"message\": \"The project {project_id} was not found\"\n            }\n      description: Updates a project rate limit.\n  /organization/projects/{project_id}/service_accounts:\n    get:\n      summary: List project service accounts\n      operationId: list-project-service-accounts\n      tags:\n        - Projects\n      parameters:\n        - name: project_id\n          in: path\n          description: The ID of the project.\n          required: true\n          schema:\n            type: string\n        - name: limit\n          in: query\n          description: >\n            A limit on the number of objects to be returned. Limit can range between 1 and 100, and the\n            default is 20.\n          required: false\n          schema:\n            type: integer\n            default: 20\n        - name: after\n          in: query\n          description: >\n            A cursor for use in pagination. `after` is an object ID that defines your place in the list. For\n            instance, if you make a list request and receive 100 objects, ending with obj_foo, your subsequent\n            call can include after=obj_foo in order to fetch the next page of the list.\n          required: false\n          schema:\n            type: string\n      responses:\n        '200':\n          description: Project service accounts listed successfully.\n          content:\n            application/json:\n              schema:\n                $ref: '#/components/schemas/ProjectServiceAccountListResponse'\n        '400':\n          description: Error response when project is archived.\n          content:\n            application/json:\n              schema:\n                $ref: '#/components/schemas/ErrorResponse'\n      x-oaiMeta:\n        name: List project service accounts\n        group: administration\n        returns: >-\n          A list of\n          [ProjectServiceAccount](https://platform.openai.com/docs/api-reference/project-service-accounts/object)\n          objects.\n        examples:\n          response: |\n            {\n                \"object\": \"list\",\n                \"data\": [\n                    {\n                        \"object\": \"organization.project.service_account\",\n                        \"id\": \"svc_acct_abc\",\n                        \"name\": \"Service Account\",\n                        \"role\": \"owner\",\n                        \"created_at\": 1711471533\n                    }\n                ],\n                \"first_id\": \"svc_acct_abc\",\n                \"last_id\": \"svc_acct_xyz\",\n                \"has_more\": false\n            }\n          request:\n            curl: >\n              curl\n              https://api.openai.com/v1/organization/projects/proj_abc/service_accounts?after=custom_id&limit=20\n              \\\n                -H \"Authorization: Bearer $OPENAI_ADMIN_KEY\" \\\n                -H \"Content-Type: application/json\"\n      description: Returns a list of service accounts in the project.\n    post:\n      summary: Create project service account\n      operationId: create-project-service-account\n      tags:\n        - Projects\n      parameters:\n        - name: project_id\n          in: path\n          description: The ID of the project.\n          required: true\n          schema:\n            type: string\n      requestBody:\n        description: The project service account create request payload.\n        required: true\n        content:\n          application/json:\n            schema:\n              $ref: '#/components/schemas/ProjectServiceAccountCreateRequest'\n      responses:\n        '200':\n          description: Project service account created successfully.\n          content:\n            application/json:\n              schema:\n                $ref: '#/components/schemas/ProjectServiceAccountCreateResponse'\n        '400':\n          description: Error response when project is archived.\n          content:\n            application/json:\n              schema:\n                $ref: '#/components/schemas/ErrorResponse'\n      x-oaiMeta:\n        name: Create project service account\n        group: administration\n        returns: >-\n          The created\n          [ProjectServiceAccount](https://platform.openai.com/docs/api-reference/project-service-accounts/object)\n          object.\n        examples:\n          response: |\n            {\n                \"object\": \"organization.project.service_account\",\n                \"id\": \"svc_acct_abc\",\n                \"name\": \"Production App\",\n                \"role\": \"member\",\n                \"created_at\": 1711471533,\n                \"api_key\": {\n                    \"object\": \"organization.project.service_account.api_key\",\n                    \"value\": \"sk-abcdefghijklmnop123\",\n                    \"name\": \"Secret Key\",\n                    \"created_at\": 1711471533,\n                    \"id\": \"key_abc\"\n                }\n            }\n          request:\n            curl: |\n              curl -X POST https://api.openai.com/v1/organization/projects/proj_abc/service_accounts \\\n                -H \"Authorization: Bearer $OPENAI_ADMIN_KEY\" \\\n                -H \"Content-Type: application/json\" \\\n                -d '{\n                    \"name\": \"Production App\"\n                }'\n      description: >-\n        Creates a new service account in the project. This also returns an unredacted API key for the service\n        account.\n  /organization/projects/{project_id}/service_accounts/{service_account_id}:\n    get:\n      summary: Retrieve project service account\n      operationId: retrieve-project-service-account\n      tags:\n        - Projects\n      parameters:\n        - name: project_id\n          in: path\n          description: The ID of the project.\n          required: true\n          schema:\n            type: string\n        - name: service_account_id\n          in: path\n          description: The ID of the service account.\n          required: true\n          schema:\n            type: string\n      responses:\n        '200':\n          description: Project service account retrieved successfully.\n          content:\n            application/json:\n              schema:\n                $ref: '#/components/schemas/ProjectServiceAccount'\n      x-oaiMeta:\n        name: Retrieve project service account\n        group: administration\n        returns: >-\n          The\n          [ProjectServiceAccount](https://platform.openai.com/docs/api-reference/project-service-accounts/object)\n          object matching the specified ID.\n        examples:\n          response: |\n            {\n                \"object\": \"organization.project.service_account\",\n                \"id\": \"svc_acct_abc\",\n                \"name\": \"Service Account\",\n                \"role\": \"owner\",\n                \"created_at\": 1711471533\n            }\n          request:\n            curl: |\n              curl https://api.openai.com/v1/organization/projects/proj_abc/service_accounts/svc_acct_abc \\\n                -H \"Authorization: Bearer $OPENAI_ADMIN_KEY\" \\\n                -H \"Content-Type: application/json\"\n      description: Retrieves a service account in the project.\n    delete:\n      summary: Delete project service account\n      operationId: delete-project-service-account\n      tags:\n        - Projects\n      parameters:\n        - name: project_id\n          in: path\n          description: The ID of the project.\n          required: true\n          schema:\n            type: string\n        - name: service_account_id\n          in: path\n          description: The ID of the service account.\n          required: true\n          schema:\n            type: string\n      responses:\n        '200':\n          description: Project service account deleted successfully.\n          content:\n            application/json:\n              schema:\n                $ref: '#/components/schemas/ProjectServiceAccountDeleteResponse'\n      x-oaiMeta:\n        name: Delete project service account\n        group: administration\n        returns: >-\n          Confirmation of service account being deleted, or an error in case of an archived project, which has\n          no service accounts\n        examples:\n          response: |\n            {\n                \"object\": \"organization.project.service_account.deleted\",\n                \"id\": \"svc_acct_abc\",\n                \"deleted\": true\n            }\n          request:\n            curl: >\n              curl -X DELETE\n              https://api.openai.com/v1/organization/projects/proj_abc/service_accounts/svc_acct_abc \\\n                -H \"Authorization: Bearer $OPENAI_ADMIN_KEY\" \\\n                -H \"Content-Type: application/json\"\n      description: Deletes a service account from the project.\n  /organization/projects/{project_id}/users:\n    get:\n      summary: List project users\n      operationId: list-project-users\n      tags:\n        - Projects\n      parameters:\n        - name: project_id\n          in: path\n          description: The ID of the project.\n          required: true\n          schema:\n            type: string\n        - name: limit\n          in: query\n          description: >\n            A limit on the number of objects to be returned. Limit can range between 1 and 100, and the\n            default is 20.\n          required: false\n          schema:\n            type: integer\n            default: 20\n        - name: after\n          in: query\n          description: >\n            A cursor for use in pagination. `after` is an object ID that defines your place in the list. For\n            instance, if you make a list request and receive 100 objects, ending with obj_foo, your subsequent\n            call can include after=obj_foo in order to fetch the next page of the list.\n          required: false\n          schema:\n            type: string\n      responses:\n        '200':\n          description: Project users listed successfully.\n          content:\n            application/json:\n              schema:\n                $ref: '#/components/schemas/ProjectUserListResponse'\n        '400':\n          description: Error response when project is archived.\n          content:\n            application/json:\n              schema:\n                $ref: '#/components/schemas/ErrorResponse'\n      x-oaiMeta:\n        name: List project users\n        group: administration\n        returns: >-\n          A list of [ProjectUser](https://platform.openai.com/docs/api-reference/project-users/object)\n          objects.\n        examples:\n          response: |\n            {\n                \"object\": \"list\",\n                \"data\": [\n                    {\n                        \"object\": \"organization.project.user\",\n                        \"id\": \"user_abc\",\n                        \"name\": \"First Last\",\n                        \"email\": \"user@example.com\",\n                        \"role\": \"owner\",\n                        \"added_at\": 1711471533\n                    }\n                ],\n                \"first_id\": \"user-abc\",\n                \"last_id\": \"user-xyz\",\n                \"has_more\": false\n            }\n          request:\n            curl: |\n              curl https://api.openai.com/v1/organization/projects/proj_abc/users?after=user_abc&limit=20 \\\n                -H \"Authorization: Bearer $OPENAI_ADMIN_KEY\" \\\n                -H \"Content-Type: application/json\"\n      description: Returns a list of users in the project.\n    post:\n      summary: Create project user\n      operationId: create-project-user\n      parameters:\n        - name: project_id\n          in: path\n          description: The ID of the project.\n          required: true\n          schema:\n            type: string\n      tags:\n        - Projects\n      requestBody:\n        description: The project user create request payload.\n        required: true\n        content:\n          application/json:\n            schema:\n              $ref: '#/components/schemas/ProjectUserCreateRequest'\n      responses:\n        '200':\n          description: User added to project successfully.\n          content:\n            application/json:\n              schema:\n                $ref: '#/components/schemas/ProjectUser'\n        '400':\n          description: Error response for various conditions.\n          content:\n            application/json:\n              schema:\n                $ref: '#/components/schemas/ErrorResponse'\n      x-oaiMeta:\n        name: Create project user\n        group: administration\n        returns: >-\n          The created [ProjectUser](https://platform.openai.com/docs/api-reference/project-users/object)\n          object.\n        examples:\n          response: |\n            {\n                \"object\": \"organization.project.user\",\n                \"id\": \"user_abc\",\n                \"email\": \"user@example.com\",\n                \"role\": \"owner\",\n                \"added_at\": 1711471533\n            }\n          request:\n            curl: |\n              curl -X POST https://api.openai.com/v1/organization/projects/proj_abc/users \\\n                -H \"Authorization: Bearer $OPENAI_ADMIN_KEY\" \\\n                -H \"Content-Type: application/json\" \\\n                -d '{\n                    \"user_id\": \"user_abc\",\n                    \"role\": \"member\"\n                }'\n      description: >-\n        Adds a user to the project. Users must already be members of the organization to be added to a\n        project.\n  /organization/projects/{project_id}/users/{user_id}:\n    get:\n      summary: Retrieve project user\n      operationId: retrieve-project-user\n      tags:\n        - Projects\n      parameters:\n        - name: project_id\n          in: path\n          description: The ID of the project.\n          required: true\n          schema:\n            type: string\n        - name: user_id\n          in: path\n          description: The ID of the user.\n          required: true\n          schema:\n            type: string\n      responses:\n        '200':\n          description: Project user retrieved successfully.\n          content:\n            application/json:\n              schema:\n                $ref: '#/components/schemas/ProjectUser'\n      x-oaiMeta:\n        name: Retrieve project user\n        group: administration\n        returns: >-\n          The [ProjectUser](https://platform.openai.com/docs/api-reference/project-users/object) object\n          matching the specified ID.\n        examples:\n          response: |\n            {\n                \"object\": \"organization.project.user\",\n                \"id\": \"user_abc\",\n                \"name\": \"First Last\",\n                \"email\": \"user@example.com\",\n                \"role\": \"owner\",\n                \"added_at\": 1711471533\n            }\n          request:\n            curl: |\n              curl https://api.openai.com/v1/organization/projects/proj_abc/users/user_abc \\\n                -H \"Authorization: Bearer $OPENAI_ADMIN_KEY\" \\\n                -H \"Content-Type: application/json\"\n      description: Retrieves a user in the project.\n    post:\n      summary: Modify project user\n      operationId: modify-project-user\n      tags:\n        - Projects\n      parameters:\n        - name: project_id\n          in: path\n          description: The ID of the project.\n          required: true\n          schema:\n            type: string\n        - name: user_id\n          in: path\n          description: The ID of the user.\n          required: true\n          schema:\n            type: string\n      requestBody:\n        description: The project user update request payload.\n        required: true\n        content:\n          application/json:\n            schema:\n              $ref: '#/components/schemas/ProjectUserUpdateRequest'\n      responses:\n        '200':\n          description: Project user's role updated successfully.\n          content:\n            application/json:\n              schema:\n                $ref: '#/components/schemas/ProjectUser'\n        '400':\n          description: Error response for various conditions.\n          content:\n            application/json:\n              schema:\n                $ref: '#/components/schemas/ErrorResponse'\n      x-oaiMeta:\n        name: Modify project user\n        group: administration\n        returns: >-\n          The updated [ProjectUser](https://platform.openai.com/docs/api-reference/project-users/object)\n          object.\n        examples:\n          response: |\n            {\n                \"object\": \"organization.project.user\",\n                \"id\": \"user_abc\",\n                \"name\": \"First Last\",\n                \"email\": \"user@example.com\",\n                \"role\": \"owner\",\n                \"added_at\": 1711471533\n            }\n          request:\n            curl: |\n              curl -X POST https://api.openai.com/v1/organization/projects/proj_abc/users/user_abc \\\n                -H \"Authorization: Bearer $OPENAI_ADMIN_KEY\" \\\n                -H \"Content-Type: application/json\" \\\n                -d '{\n                    \"role\": \"owner\"\n                }'\n      description: Modifies a user's role in the project.\n    delete:\n      summary: Delete project user\n      operationId: delete-project-user\n      tags:\n        - Projects\n      parameters:\n        - name: project_id\n          in: path\n          description: The ID of the project.\n          required: true\n          schema:\n            type: string\n        - name: user_id\n          in: path\n          description: The ID of the user.\n          required: true\n          schema:\n            type: string\n      responses:\n        '200':\n          description: Project user deleted successfully.\n          content:\n            application/json:\n              schema:\n                $ref: '#/components/schemas/ProjectUserDeleteResponse'\n        '400':\n          description: Error response for various conditions.\n          content:\n            application/json:\n              schema:\n                $ref: '#/components/schemas/ErrorResponse'\n      x-oaiMeta:\n        name: Delete project user\n        group: administration\n        returns: >-\n          Confirmation that project has been deleted or an error in case of an archived project, which has no\n          users\n        examples:\n          response: |\n            {\n                \"object\": \"organization.project.user.deleted\",\n                \"id\": \"user_abc\",\n                \"deleted\": true\n            }\n          request:\n            curl: |\n              curl -X DELETE https://api.openai.com/v1/organization/projects/proj_abc/users/user_abc \\\n                -H \"Authorization: Bearer $OPENAI_ADMIN_KEY\" \\\n                -H \"Content-Type: application/json\"\n      description: Deletes a user from the project.\n  /organization/usage/audio_speeches:\n    get:\n      summary: Audio speeches\n      operationId: usage-audio-speeches\n      tags:\n        - Usage\n      parameters:\n        - name: start_time\n          in: query\n          description: Start time (Unix seconds) of the query time range, inclusive.\n          required: true\n          schema:\n            type: integer\n        - name: end_time\n          in: query\n          description: End time (Unix seconds) of the query time range, exclusive.\n          required: false\n          schema:\n            type: integer\n        - name: bucket_width\n          in: query\n          description: >-\n            Width of each time bucket in response. Currently `1m`, `1h` and `1d` are supported, default to\n            `1d`.\n          required: false\n          schema:\n            type: string\n            enum:\n              - 1m\n              - 1h\n              - 1d\n            default: 1d\n        - name: project_ids\n          in: query\n          description: Return only usage for these projects.\n          required: false\n          schema:\n            type: array\n            items:\n              type: string\n        - name: user_ids\n          in: query\n          description: Return only usage for these users.\n          required: false\n          schema:\n            type: array\n            items:\n              type: string\n        - name: api_key_ids\n          in: query\n          description: Return only usage for these API keys.\n          required: false\n          schema:\n            type: array\n            items:\n              type: string\n        - name: models\n          in: query\n          description: Return only usage for these models.\n          required: false\n          schema:\n            type: array\n            items:\n              type: string\n        - name: group_by\n          in: query\n          description: >-\n            Group the usage data by the specified fields. Support fields include `project_id`, `user_id`,\n            `api_key_id`, `model` or any combination of them.\n          required: false\n          schema:\n            type: array\n            items:\n              type: string\n              enum:\n                - project_id\n                - user_id\n                - api_key_id\n                - model\n        - name: limit\n          in: query\n          description: |\n            Specifies the number of buckets to return.\n            - `bucket_width=1d`: default: 7, max: 31\n            - `bucket_width=1h`: default: 24, max: 168\n            - `bucket_width=1m`: default: 60, max: 1440\n          required: false\n          schema:\n            type: integer\n        - name: page\n          in: query\n          description: A cursor for use in pagination. Corresponding to the `next_page` field from the previous response.\n          schema:\n            type: string\n      responses:\n        '200':\n          description: Usage data retrieved successfully.\n          content:\n            application/json:\n              schema:\n                $ref: '#/components/schemas/UsageResponse'\n      x-oaiMeta:\n        name: Audio speeches\n        group: usage-audio-speeches\n        returns: >-\n          A list of paginated, time bucketed [Audio speeches\n          usage](https://platform.openai.com/docs/api-reference/usage/audio_speeches_object) objects.\n        examples:\n          response: |\n            {\n                \"object\": \"page\",\n                \"data\": [\n                    {\n                        \"object\": \"bucket\",\n                        \"start_time\": 1730419200,\n                        \"end_time\": 1730505600,\n                        \"results\": [\n                            {\n                                \"object\": \"organization.usage.audio_speeches.result\",\n                                \"characters\": 45,\n                                \"num_model_requests\": 1,\n                                \"project_id\": null,\n                                \"user_id\": null,\n                                \"api_key_id\": null,\n                                \"model\": null\n                            }\n                        ]\n                    }\n                ],\n                \"has_more\": false,\n                \"next_page\": null\n            }\n          request:\n            curl: >\n              curl \"https://api.openai.com/v1/organization/usage/audio_speeches?start_time=1730419200&limit=1\"\n              \\\n\n              -H \"Authorization: Bearer $OPENAI_ADMIN_KEY\" \\\n\n              -H \"Content-Type: application/json\"\n      description: Get audio speeches usage details for the organization.\n  /organization/usage/audio_transcriptions:\n    get:\n      summary: Audio transcriptions\n      operationId: usage-audio-transcriptions\n      tags:\n        - Usage\n      parameters:\n        - name: start_time\n          in: query\n          description: Start time (Unix seconds) of the query time range, inclusive.\n          required: true\n          schema:\n            type: integer\n        - name: end_time\n          in: query\n          description: End time (Unix seconds) of the query time range, exclusive.\n          required: false\n          schema:\n            type: integer\n        - name: bucket_width\n          in: query\n          description: >-\n            Width of each time bucket in response. Currently `1m`, `1h` and `1d` are supported, default to\n            `1d`.\n          required: false\n          schema:\n            type: string\n            enum:\n              - 1m\n              - 1h\n              - 1d\n            default: 1d\n        - name: project_ids\n          in: query\n          description: Return only usage for these projects.\n          required: false\n          schema:\n            type: array\n            items:\n              type: string\n        - name: user_ids\n          in: query\n          description: Return only usage for these users.\n          required: false\n          schema:\n            type: array\n            items:\n              type: string\n        - name: api_key_ids\n          in: query\n          description: Return only usage for these API keys.\n          required: false\n          schema:\n            type: array\n            items:\n              type: string\n        - name: models\n          in: query\n          description: Return only usage for these models.\n          required: false\n          schema:\n            type: array\n            items:\n              type: string\n        - name: group_by\n          in: query\n          description: >-\n            Group the usage data by the specified fields. Support fields include `project_id`, `user_id`,\n            `api_key_id`, `model` or any combination of them.\n          required: false\n          schema:\n            type: array\n            items:\n              type: string\n              enum:\n                - project_id\n                - user_id\n                - api_key_id\n                - model\n        - name: limit\n          in: query\n          description: |\n            Specifies the number of buckets to return.\n            - `bucket_width=1d`: default: 7, max: 31\n            - `bucket_width=1h`: default: 24, max: 168\n            - `bucket_width=1m`: default: 60, max: 1440\n          required: false\n          schema:\n            type: integer\n        - name: page\n          in: query\n          description: A cursor for use in pagination. Corresponding to the `next_page` field from the previous response.\n          schema:\n            type: string\n      responses:\n        '200':\n          description: Usage data retrieved successfully.\n          content:\n            application/json:\n              schema:\n                $ref: '#/components/schemas/UsageResponse'\n      x-oaiMeta:\n        name: Audio transcriptions\n        group: usage-audio-transcriptions\n        returns: >-\n          A list of paginated, time bucketed [Audio transcriptions\n          usage](https://platform.openai.com/docs/api-reference/usage/audio_transcriptions_object) objects.\n        examples:\n          response: |\n            {\n                \"object\": \"page\",\n                \"data\": [\n                    {\n                        \"object\": \"bucket\",\n                        \"start_time\": 1730419200,\n                        \"end_time\": 1730505600,\n                        \"results\": [\n                            {\n                                \"object\": \"organization.usage.audio_transcriptions.result\",\n                                \"seconds\": 20,\n                                \"num_model_requests\": 1,\n                                \"project_id\": null,\n                                \"user_id\": null,\n                                \"api_key_id\": null,\n                                \"model\": null\n                            }\n                        ]\n                    }\n                ],\n                \"has_more\": false,\n                \"next_page\": null\n            }\n          request:\n            curl: >\n              curl\n              \"https://api.openai.com/v1/organization/usage/audio_transcriptions?start_time=1730419200&limit=1\"\n              \\\n\n              -H \"Authorization: Bearer $OPENAI_ADMIN_KEY\" \\\n\n              -H \"Content-Type: application/json\"\n      description: Get audio transcriptions usage details for the organization.\n  /organization/usage/code_interpreter_sessions:\n    get:\n      summary: Code interpreter sessions\n      operationId: usage-code-interpreter-sessions\n      tags:\n        - Usage\n      parameters:\n        - name: start_time\n          in: query\n          description: Start time (Unix seconds) of the query time range, inclusive.\n          required: true\n          schema:\n            type: integer\n        - name: end_time\n          in: query\n          description: End time (Unix seconds) of the query time range, exclusive.\n          required: false\n          schema:\n            type: integer\n        - name: bucket_width\n          in: query\n          description: >-\n            Width of each time bucket in response. Currently `1m`, `1h` and `1d` are supported, default to\n            `1d`.\n          required: false\n          schema:\n            type: string\n            enum:\n              - 1m\n              - 1h\n              - 1d\n            default: 1d\n        - name: project_ids\n          in: query\n          description: Return only usage for these projects.\n          required: false\n          schema:\n            type: array\n            items:\n              type: string\n        - name: group_by\n          in: query\n          description: Group the usage data by the specified fields. Support fields include `project_id`.\n          required: false\n          schema:\n            type: array\n            items:\n              type: string\n              enum:\n                - project_id\n        - name: limit\n          in: query\n          description: |\n            Specifies the number of buckets to return.\n            - `bucket_width=1d`: default: 7, max: 31\n            - `bucket_width=1h`: default: 24, max: 168\n            - `bucket_width=1m`: default: 60, max: 1440\n          required: false\n          schema:\n            type: integer\n        - name: page\n          in: query\n          description: A cursor for use in pagination. Corresponding to the `next_page` field from the previous response.\n          schema:\n            type: string\n      responses:\n        '200':\n          description: Usage data retrieved successfully.\n          content:\n            application/json:\n              schema:\n                $ref: '#/components/schemas/UsageResponse'\n      x-oaiMeta:\n        name: Code interpreter sessions\n        group: usage-code-interpreter-sessions\n        returns: >-\n          A list of paginated, time bucketed [Code interpreter sessions\n          usage](https://platform.openai.com/docs/api-reference/usage/code_interpreter_sessions_object)\n          objects.\n        examples:\n          response: |\n            {\n                \"object\": \"page\",\n                \"data\": [\n                    {\n                        \"object\": \"bucket\",\n                        \"start_time\": 1730419200,\n                        \"end_time\": 1730505600,\n                        \"results\": [\n                            {\n                                \"object\": \"organization.usage.code_interpreter_sessions.result\",\n                                \"num_sessions\": 1,\n                                \"project_id\": null\n                            }\n                        ]\n                    }\n                ],\n                \"has_more\": false,\n                \"next_page\": null\n            }\n          request:\n            curl: >\n              curl\n              \"https://api.openai.com/v1/organization/usage/code_interpreter_sessions?start_time=1730419200&limit=1\"\n              \\\n\n              -H \"Authorization: Bearer $OPENAI_ADMIN_KEY\" \\\n\n              -H \"Content-Type: application/json\"\n      description: Get code interpreter sessions usage details for the organization.\n  /organization/usage/completions:\n    get:\n      summary: Completions\n      operationId: usage-completions\n      tags:\n        - Usage\n      parameters:\n        - name: start_time\n          in: query\n          description: Start time (Unix seconds) of the query time range, inclusive.\n          required: true\n          schema:\n            type: integer\n        - name: end_time\n          in: query\n          description: End time (Unix seconds) of the query time range, exclusive.\n          required: false\n          schema:\n            type: integer\n        - name: bucket_width\n          in: query\n          description: >-\n            Width of each time bucket in response. Currently `1m`, `1h` and `1d` are supported, default to\n            `1d`.\n          required: false\n          schema:\n            type: string\n            enum:\n              - 1m\n              - 1h\n              - 1d\n            default: 1d\n        - name: project_ids\n          in: query\n          description: Return only usage for these projects.\n          required: false\n          schema:\n            type: array\n            items:\n              type: string\n        - name: user_ids\n          in: query\n          description: Return only usage for these users.\n          required: false\n          schema:\n            type: array\n            items:\n              type: string\n        - name: api_key_ids\n          in: query\n          description: Return only usage for these API keys.\n          required: false\n          schema:\n            type: array\n            items:\n              type: string\n        - name: models\n          in: query\n          description: Return only usage for these models.\n          required: false\n          schema:\n            type: array\n            items:\n              type: string\n        - name: batch\n          in: query\n          description: >\n            If `true`, return batch jobs only. If `false`, return non-batch jobs only. By default, return\n            both.\n          required: false\n          schema:\n            type: boolean\n        - name: group_by\n          in: query\n          description: >-\n            Group the usage data by the specified fields. Support fields include `project_id`, `user_id`,\n            `api_key_id`, `model`, `batch` or any combination of them.\n          required: false\n          schema:\n            type: array\n            items:\n              type: string\n              enum:\n                - project_id\n                - user_id\n                - api_key_id\n                - model\n                - batch\n        - name: limit\n          in: query\n          description: |\n            Specifies the number of buckets to return.\n            - `bucket_width=1d`: default: 7, max: 31\n            - `bucket_width=1h`: default: 24, max: 168\n            - `bucket_width=1m`: default: 60, max: 1440\n          required: false\n          schema:\n            type: integer\n        - name: page\n          in: query\n          description: A cursor for use in pagination. Corresponding to the `next_page` field from the previous response.\n          schema:\n            type: string\n      responses:\n        '200':\n          description: Usage data retrieved successfully.\n          content:\n            application/json:\n              schema:\n                $ref: '#/components/schemas/UsageResponse'\n      x-oaiMeta:\n        name: Completions\n        group: usage-completions\n        returns: >-\n          A list of paginated, time bucketed [Completions\n          usage](https://platform.openai.com/docs/api-reference/usage/completions_object) objects.\n        examples:\n          response: |\n            {\n                \"object\": \"page\",\n                \"data\": [\n                    {\n                        \"object\": \"bucket\",\n                        \"start_time\": 1730419200,\n                        \"end_time\": 1730505600,\n                        \"results\": [\n                            {\n                                \"object\": \"organization.usage.completions.result\",\n                                \"input_tokens\": 1000,\n                                \"output_tokens\": 500,\n                                \"input_cached_tokens\": 800,\n                                \"input_audio_tokens\": 0,\n                                \"output_audio_tokens\": 0,\n                                \"num_model_requests\": 5,\n                                \"project_id\": null,\n                                \"user_id\": null,\n                                \"api_key_id\": null,\n                                \"model\": null,\n                                \"batch\": null\n                            }\n                        ]\n                    }\n                ],\n                \"has_more\": true,\n                \"next_page\": \"page_AAAAAGdGxdEiJdKOAAAAAGcqsYA=\"\n            }\n          request:\n            curl: |\n              curl \"https://api.openai.com/v1/organization/usage/completions?start_time=1730419200&limit=1\" \\\n              -H \"Authorization: Bearer $OPENAI_ADMIN_KEY\" \\\n              -H \"Content-Type: application/json\"\n      description: Get completions usage details for the organization.\n  /organization/usage/embeddings:\n    get:\n      summary: Embeddings\n      operationId: usage-embeddings\n      tags:\n        - Usage\n      parameters:\n        - name: start_time\n          in: query\n          description: Start time (Unix seconds) of the query time range, inclusive.\n          required: true\n          schema:\n            type: integer\n        - name: end_time\n          in: query\n          description: End time (Unix seconds) of the query time range, exclusive.\n          required: false\n          schema:\n            type: integer\n        - name: bucket_width\n          in: query\n          description: >-\n            Width of each time bucket in response. Currently `1m`, `1h` and `1d` are supported, default to\n            `1d`.\n          required: false\n          schema:\n            type: string\n            enum:\n              - 1m\n              - 1h\n              - 1d\n            default: 1d\n        - name: project_ids\n          in: query\n          description: Return only usage for these projects.\n          required: false\n          schema:\n            type: array\n            items:\n              type: string\n        - name: user_ids\n          in: query\n          description: Return only usage for these users.\n          required: false\n          schema:\n            type: array\n            items:\n              type: string\n        - name: api_key_ids\n          in: query\n          description: Return only usage for these API keys.\n          required: false\n          schema:\n            type: array\n            items:\n              type: string\n        - name: models\n          in: query\n          description: Return only usage for these models.\n          required: false\n          schema:\n            type: array\n            items:\n              type: string\n        - name: group_by\n          in: query\n          description: >-\n            Group the usage data by the specified fields. Support fields include `project_id`, `user_id`,\n            `api_key_id`, `model` or any combination of them.\n          required: false\n          schema:\n            type: array\n            items:\n              type: string\n              enum:\n                - project_id\n                - user_id\n                - api_key_id\n                - model\n        - name: limit\n          in: query\n          description: |\n            Specifies the number of buckets to return.\n            - `bucket_width=1d`: default: 7, max: 31\n            - `bucket_width=1h`: default: 24, max: 168\n            - `bucket_width=1m`: default: 60, max: 1440\n          required: false\n          schema:\n            type: integer\n        - name: page\n          in: query\n          description: A cursor for use in pagination. Corresponding to the `next_page` field from the previous response.\n          schema:\n            type: string\n      responses:\n        '200':\n          description: Usage data retrieved successfully.\n          content:\n            application/json:\n              schema:\n                $ref: '#/components/schemas/UsageResponse'\n      x-oaiMeta:\n        name: Embeddings\n        group: usage-embeddings\n        returns: >-\n          A list of paginated, time bucketed [Embeddings\n          usage](https://platform.openai.com/docs/api-reference/usage/embeddings_object) objects.\n        examples:\n          response: |\n            {\n                \"object\": \"page\",\n                \"data\": [\n                    {\n                        \"object\": \"bucket\",\n                        \"start_time\": 1730419200,\n                        \"end_time\": 1730505600,\n                        \"results\": [\n                            {\n                                \"object\": \"organization.usage.embeddings.result\",\n                                \"input_tokens\": 16,\n                                \"num_model_requests\": 2,\n                                \"project_id\": null,\n                                \"user_id\": null,\n                                \"api_key_id\": null,\n                                \"model\": null\n                            }\n                        ]\n                    }\n                ],\n                \"has_more\": false,\n                \"next_page\": null\n            }\n          request:\n            curl: |\n              curl \"https://api.openai.com/v1/organization/usage/embeddings?start_time=1730419200&limit=1\" \\\n              -H \"Authorization: Bearer $OPENAI_ADMIN_KEY\" \\\n              -H \"Content-Type: application/json\"\n      description: Get embeddings usage details for the organization.\n  /organization/usage/images:\n    get:\n      summary: Images\n      operationId: usage-images\n      tags:\n        - Usage\n      parameters:\n        - name: start_time\n          in: query\n          description: Start time (Unix seconds) of the query time range, inclusive.\n          required: true\n          schema:\n            type: integer\n        - name: end_time\n          in: query\n          description: End time (Unix seconds) of the query time range, exclusive.\n          required: false\n          schema:\n            type: integer\n        - name: bucket_width\n          in: query\n          description: >-\n            Width of each time bucket in response. Currently `1m`, `1h` and `1d` are supported, default to\n            `1d`.\n          required: false\n          schema:\n            type: string\n            enum:\n              - 1m\n              - 1h\n              - 1d\n            default: 1d\n        - name: sources\n          in: query\n          description: >-\n            Return only usages for these sources. Possible values are `image.generation`, `image.edit`,\n            `image.variation` or any combination of them.\n          required: false\n          schema:\n            type: array\n            items:\n              type: string\n              enum:\n                - image.generation\n                - image.edit\n                - image.variation\n        - name: sizes\n          in: query\n          description: >-\n            Return only usages for these image sizes. Possible values are `256x256`, `512x512`, `1024x1024`,\n            `1792x1792`, `1024x1792` or any combination of them.\n          required: false\n          schema:\n            type: array\n            items:\n              type: string\n              enum:\n                - 256x256\n                - 512x512\n                - 1024x1024\n                - 1792x1792\n                - 1024x1792\n        - name: project_ids\n          in: query\n          description: Return only usage for these projects.\n          required: false\n          schema:\n            type: array\n            items:\n              type: string\n        - name: user_ids\n          in: query\n          description: Return only usage for these users.\n          required: false\n          schema:\n            type: array\n            items:\n              type: string\n        - name: api_key_ids\n          in: query\n          description: Return only usage for these API keys.\n          required: false\n          schema:\n            type: array\n            items:\n              type: string\n        - name: models\n          in: query\n          description: Return only usage for these models.\n          required: false\n          schema:\n            type: array\n            items:\n              type: string\n        - name: group_by\n          in: query\n          description: >-\n            Group the usage data by the specified fields. Support fields include `project_id`, `user_id`,\n            `api_key_id`, `model`, `size`, `source` or any combination of them.\n          required: false\n          schema:\n            type: array\n            items:\n              type: string\n              enum:\n                - project_id\n                - user_id\n                - api_key_id\n                - model\n                - size\n                - source\n        - name: limit\n          in: query\n          description: |\n            Specifies the number of buckets to return.\n            - `bucket_width=1d`: default: 7, max: 31\n            - `bucket_width=1h`: default: 24, max: 168\n            - `bucket_width=1m`: default: 60, max: 1440\n          required: false\n          schema:\n            type: integer\n        - name: page\n          in: query\n          description: A cursor for use in pagination. Corresponding to the `next_page` field from the previous response.\n          schema:\n            type: string\n      responses:\n        '200':\n          description: Usage data retrieved successfully.\n          content:\n            application/json:\n              schema:\n                $ref: '#/components/schemas/UsageResponse'\n      x-oaiMeta:\n        name: Images\n        group: usage-images\n        returns: >-\n          A list of paginated, time bucketed [Images\n          usage](https://platform.openai.com/docs/api-reference/usage/images_object) objects.\n        examples:\n          response: |\n            {\n                \"object\": \"page\",\n                \"data\": [\n                    {\n                        \"object\": \"bucket\",\n                        \"start_time\": 1730419200,\n                        \"end_time\": 1730505600,\n                        \"results\": [\n                            {\n                                \"object\": \"organization.usage.images.result\",\n                                \"images\": 2,\n                                \"num_model_requests\": 2,\n                                \"size\": null,\n                                \"source\": null,\n                                \"project_id\": null,\n                                \"user_id\": null,\n                                \"api_key_id\": null,\n                                \"model\": null\n                            }\n                        ]\n                    }\n                ],\n                \"has_more\": false,\n                \"next_page\": null\n            }\n          request:\n            curl: |\n              curl \"https://api.openai.com/v1/organization/usage/images?start_time=1730419200&limit=1\" \\\n              -H \"Authorization: Bearer $OPENAI_ADMIN_KEY\" \\\n              -H \"Content-Type: application/json\"\n      description: Get images usage details for the organization.\n  /organization/usage/moderations:\n    get:\n      summary: Moderations\n      operationId: usage-moderations\n      tags:\n        - Usage\n      parameters:\n        - name: start_time\n          in: query\n          description: Start time (Unix seconds) of the query time range, inclusive.\n          required: true\n          schema:\n            type: integer\n        - name: end_time\n          in: query\n          description: End time (Unix seconds) of the query time range, exclusive.\n          required: false\n          schema:\n            type: integer\n        - name: bucket_width\n          in: query\n          description: >-\n            Width of each time bucket in response. Currently `1m`, `1h` and `1d` are supported, default to\n            `1d`.\n          required: false\n          schema:\n            type: string\n            enum:\n              - 1m\n              - 1h\n              - 1d\n            default: 1d\n        - name: project_ids\n          in: query\n          description: Return only usage for these projects.\n          required: false\n          schema:\n            type: array\n            items:\n              type: string\n        - name: user_ids\n          in: query\n          description: Return only usage for these users.\n          required: false\n          schema:\n            type: array\n            items:\n              type: string\n        - name: api_key_ids\n          in: query\n          description: Return only usage for these API keys.\n          required: false\n          schema:\n            type: array\n            items:\n              type: string\n        - name: models\n          in: query\n          description: Return only usage for these models.\n          required: false\n          schema:\n            type: array\n            items:\n              type: string\n        - name: group_by\n          in: query\n          description: >-\n            Group the usage data by the specified fields. Support fields include `project_id`, `user_id`,\n            `api_key_id`, `model` or any combination of them.\n          required: false\n          schema:\n            type: array\n            items:\n              type: string\n              enum:\n                - project_id\n                - user_id\n                - api_key_id\n                - model\n        - name: limit\n          in: query\n          description: |\n            Specifies the number of buckets to return.\n            - `bucket_width=1d`: default: 7, max: 31\n            - `bucket_width=1h`: default: 24, max: 168\n            - `bucket_width=1m`: default: 60, max: 1440\n          required: false\n          schema:\n            type: integer\n        - name: page\n          in: query\n          description: A cursor for use in pagination. Corresponding to the `next_page` field from the previous response.\n          schema:\n            type: string\n      responses:\n        '200':\n          description: Usage data retrieved successfully.\n          content:\n            application/json:\n              schema:\n                $ref: '#/components/schemas/UsageResponse'\n      x-oaiMeta:\n        name: Moderations\n        group: usage-moderations\n        returns: >-\n          A list of paginated, time bucketed [Moderations\n          usage](https://platform.openai.com/docs/api-reference/usage/moderations_object) objects.\n        examples:\n          response: |\n            {\n                \"object\": \"page\",\n                \"data\": [\n                    {\n                        \"object\": \"bucket\",\n                        \"start_time\": 1730419200,\n                        \"end_time\": 1730505600,\n                        \"results\": [\n                            {\n                                \"object\": \"organization.usage.moderations.result\",\n                                \"input_tokens\": 16,\n                                \"num_model_requests\": 2,\n                                \"project_id\": null,\n                                \"user_id\": null,\n                                \"api_key_id\": null,\n                                \"model\": null\n                            }\n                        ]\n                    }\n                ],\n                \"has_more\": false,\n                \"next_page\": null\n            }\n          request:\n            curl: |\n              curl \"https://api.openai.com/v1/organization/usage/moderations?start_time=1730419200&limit=1\" \\\n              -H \"Authorization: Bearer $OPENAI_ADMIN_KEY\" \\\n              -H \"Content-Type: application/json\"\n      description: Get moderations usage details for the organization.\n  /organization/usage/vector_stores:\n    get:\n      summary: Vector stores\n      operationId: usage-vector-stores\n      tags:\n        - Usage\n      parameters:\n        - name: start_time\n          in: query\n          description: Start time (Unix seconds) of the query time range, inclusive.\n          required: true\n          schema:\n            type: integer\n        - name: end_time\n          in: query\n          description: End time (Unix seconds) of the query time range, exclusive.\n          required: false\n          schema:\n            type: integer\n        - name: bucket_width\n          in: query\n          description: >-\n            Width of each time bucket in response. Currently `1m`, `1h` and `1d` are supported, default to\n            `1d`.\n          required: false\n          schema:\n            type: string\n            enum:\n              - 1m\n              - 1h\n              - 1d\n            default: 1d\n        - name: project_ids\n          in: query\n          description: Return only usage for these projects.\n          required: false\n          schema:\n            type: array\n            items:\n              type: string\n        - name: group_by\n          in: query\n          description: Group the usage data by the specified fields. Support fields include `project_id`.\n          required: false\n          schema:\n            type: array\n            items:\n              type: string\n              enum:\n                - project_id\n        - name: limit\n          in: query\n          description: |\n            Specifies the number of buckets to return.\n            - `bucket_width=1d`: default: 7, max: 31\n            - `bucket_width=1h`: default: 24, max: 168\n            - `bucket_width=1m`: default: 60, max: 1440\n          required: false\n          schema:\n            type: integer\n        - name: page\n          in: query\n          description: A cursor for use in pagination. Corresponding to the `next_page` field from the previous response.\n          schema:\n            type: string\n      responses:\n        '200':\n          description: Usage data retrieved successfully.\n          content:\n            application/json:\n              schema:\n                $ref: '#/components/schemas/UsageResponse'\n      x-oaiMeta:\n        name: Vector stores\n        group: usage-vector-stores\n        returns: >-\n          A list of paginated, time bucketed [Vector stores\n          usage](https://platform.openai.com/docs/api-reference/usage/vector_stores_object) objects.\n        examples:\n          response: |\n            {\n                \"object\": \"page\",\n                \"data\": [\n                    {\n                        \"object\": \"bucket\",\n                        \"start_time\": 1730419200,\n                        \"end_time\": 1730505600,\n                        \"results\": [\n                            {\n                                \"object\": \"organization.usage.vector_stores.result\",\n                                \"usage_bytes\": 1024,\n                                \"project_id\": null\n                            }\n                        ]\n                    }\n                ],\n                \"has_more\": false,\n                \"next_page\": null\n            }\n          request:\n            curl: >\n              curl \"https://api.openai.com/v1/organization/usage/vector_stores?start_time=1730419200&limit=1\"\n              \\\n\n              -H \"Authorization: Bearer $OPENAI_ADMIN_KEY\" \\\n\n              -H \"Content-Type: application/json\"\n      description: Get vector stores usage details for the organization.\n  /organization/users:\n    get:\n      summary: List users\n      operationId: list-users\n      tags:\n        - Users\n      parameters:\n        - name: limit\n          in: query\n          description: >\n            A limit on the number of objects to be returned. Limit can range between 1 and 100, and the\n            default is 20.\n          required: false\n          schema:\n            type: integer\n            default: 20\n        - name: after\n          in: query\n          description: >\n            A cursor for use in pagination. `after` is an object ID that defines your place in the list. For\n            instance, if you make a list request and receive 100 objects, ending with obj_foo, your subsequent\n            call can include after=obj_foo in order to fetch the next page of the list.\n          required: false\n          schema:\n            type: string\n        - name: emails\n          in: query\n          description: Filter by the email address of users.\n          required: false\n          schema:\n            type: array\n            items:\n              type: string\n      responses:\n        '200':\n          description: Users listed successfully.\n          content:\n            application/json:\n              schema:\n                $ref: '#/components/schemas/UserListResponse'\n      x-oaiMeta:\n        name: List users\n        group: administration\n        returns: A list of [User](https://platform.openai.com/docs/api-reference/users/object) objects.\n        examples:\n          response: |\n            {\n                \"object\": \"list\",\n                \"data\": [\n                    {\n                        \"object\": \"organization.user\",\n                        \"id\": \"user_abc\",\n                        \"name\": \"First Last\",\n                        \"email\": \"user@example.com\",\n                        \"role\": \"owner\",\n                        \"added_at\": 1711471533\n                    }\n                ],\n                \"first_id\": \"user-abc\",\n                \"last_id\": \"user-xyz\",\n                \"has_more\": false\n            }\n          request:\n            curl: |\n              curl https://api.openai.com/v1/organization/users?after=user_abc&limit=20 \\\n                -H \"Authorization: Bearer $OPENAI_ADMIN_KEY\" \\\n                -H \"Content-Type: application/json\"\n      description: Lists all of the users in the organization.\n  /organization/users/{user_id}:\n    get:\n      summary: Retrieve user\n      operationId: retrieve-user\n      tags:\n        - Users\n      parameters:\n        - name: user_id\n          in: path\n          description: The ID of the user.\n          required: true\n          schema:\n            type: string\n      responses:\n        '200':\n          description: User retrieved successfully.\n          content:\n            application/json:\n              schema:\n                $ref: '#/components/schemas/User'\n      x-oaiMeta:\n        name: Retrieve user\n        group: administration\n        returns: >-\n          The [User](https://platform.openai.com/docs/api-reference/users/object) object matching the\n          specified ID.\n        examples:\n          response: |\n            {\n                \"object\": \"organization.user\",\n                \"id\": \"user_abc\",\n                \"name\": \"First Last\",\n                \"email\": \"user@example.com\",\n                \"role\": \"owner\",\n                \"added_at\": 1711471533\n            }\n          request:\n            curl: |\n              curl https://api.openai.com/v1/organization/users/user_abc \\\n                -H \"Authorization: Bearer $OPENAI_ADMIN_KEY\" \\\n                -H \"Content-Type: application/json\"\n      description: Retrieves a user by their identifier.\n    post:\n      summary: Modify user\n      operationId: modify-user\n      tags:\n        - Users\n      parameters:\n        - name: user_id\n          in: path\n          description: The ID of the user.\n          required: true\n          schema:\n            type: string\n      requestBody:\n        description: The new user role to modify. This must be one of `owner` or `member`.\n        required: true\n        content:\n          application/json:\n            schema:\n              $ref: '#/components/schemas/UserRoleUpdateRequest'\n      responses:\n        '200':\n          description: User role updated successfully.\n          content:\n            application/json:\n              schema:\n                $ref: '#/components/schemas/User'\n      x-oaiMeta:\n        name: Modify user\n        group: administration\n        returns: The updated [User](https://platform.openai.com/docs/api-reference/users/object) object.\n        examples:\n          response: |\n            {\n                \"object\": \"organization.user\",\n                \"id\": \"user_abc\",\n                \"name\": \"First Last\",\n                \"email\": \"user@example.com\",\n                \"role\": \"owner\",\n                \"added_at\": 1711471533\n            }\n          request:\n            curl: |\n              curl -X POST https://api.openai.com/v1/organization/users/user_abc \\\n                -H \"Authorization: Bearer $OPENAI_ADMIN_KEY\" \\\n                -H \"Content-Type: application/json\" \\\n                -d '{\n                    \"role\": \"owner\"\n                }'\n      description: Modifies a user's role in the organization.\n    delete:\n      summary: Delete user\n      operationId: delete-user\n      tags:\n        - Users\n      parameters:\n        - name: user_id\n          in: path\n          description: The ID of the user.\n          required: true\n          schema:\n            type: string\n      responses:\n        '200':\n          description: User deleted successfully.\n          content:\n            application/json:\n              schema:\n                $ref: '#/components/schemas/UserDeleteResponse'\n      x-oaiMeta:\n        name: Delete user\n        group: administration\n        returns: Confirmation of the deleted user\n        examples:\n          response: |\n            {\n                \"object\": \"organization.user.deleted\",\n                \"id\": \"user_abc\",\n                \"deleted\": true\n            }\n          request:\n            curl: |\n              curl -X DELETE https://api.openai.com/v1/organization/users/user_abc \\\n                -H \"Authorization: Bearer $OPENAI_ADMIN_KEY\" \\\n                -H \"Content-Type: application/json\"\n      description: Deletes a user from the organization.\n  /realtime/sessions:\n    post:\n      summary: Create session\n      operationId: create-realtime-session\n      tags:\n        - Realtime\n      requestBody:\n        description: Create an ephemeral API key with the given session configuration.\n        required: true\n        content:\n          application/json:\n            schema:\n              $ref: '#/components/schemas/RealtimeSessionCreateRequest'\n      responses:\n        '200':\n          description: Session created successfully.\n          content:\n            application/json:\n              schema:\n                $ref: '#/components/schemas/RealtimeSessionCreateResponse'\n      x-oaiMeta:\n        name: Create session\n        group: realtime\n        returns: The created Realtime session object, plus an ephemeral key\n        examples:\n          response: |\n            {\n              \"id\": \"sess_001\",\n              \"object\": \"realtime.session\",\n              \"model\": \"gpt-4o-realtime-preview\",\n              \"modalities\": [\"audio\", \"text\"],\n              \"instructions\": \"You are a friendly assistant.\",\n              \"voice\": \"alloy\",\n              \"input_audio_format\": \"pcm16\",\n              \"output_audio_format\": \"pcm16\",\n              \"input_audio_transcription\": {\n                  \"model\": \"whisper-1\"\n              },\n              \"turn_detection\": null,\n              \"tools\": [],\n              \"tool_choice\": \"none\",\n              \"temperature\": 0.7,\n              \"max_response_output_tokens\": 200,\n              \"speed\": 1.1,\n              \"tracing\": \"auto\",\n              \"client_secret\": {\n                \"value\": \"ek_abc123\",\n                \"expires_at\": 1234567890\n              }\n            }\n          request:\n            curl: |\n              curl -X POST https://api.openai.com/v1/realtime/sessions \\\n                -H \"Authorization: Bearer $OPENAI_API_KEY\" \\\n                -H \"Content-Type: application/json\" \\\n                -d '{\n                  \"model\": \"gpt-4o-realtime-preview\",\n                  \"modalities\": [\"audio\", \"text\"],\n                  \"instructions\": \"You are a friendly assistant.\"\n                }'\n            node.js: |-\n              import OpenAI from 'openai';\n\n              const client = new OpenAI({\n                apiKey: 'My API Key',\n              });\n\n              const session = await client.beta.realtime.sessions.create();\n\n              console.log(session.client_secret);\n            python: |-\n              from openai import OpenAI\n\n              client = OpenAI(\n                  api_key=\"My API Key\",\n              )\n              session = client.beta.realtime.sessions.create()\n              print(session.client_secret)\n            java: |-\n              package com.openai.example;\n\n              import com.openai.client.OpenAIClient;\n              import com.openai.client.okhttp.OpenAIOkHttpClient;\n              import com.openai.models.beta.realtime.sessions.SessionCreateParams;\n              import com.openai.models.beta.realtime.sessions.SessionCreateResponse;\n\n              public final class Main {\n                  private Main() {}\n\n                  public static void main(String[] args) {\n                      OpenAIClient client = OpenAIOkHttpClient.fromEnv();\n\n                      SessionCreateResponse session = client.beta().realtime().sessions().create();\n                  }\n              }\n      description: |\n        Create an ephemeral API token for use in client-side applications with the\n        Realtime API. Can be configured with the same session parameters as the\n        `session.update` client event.\n\n        It responds with a session object, plus a `client_secret` key which contains\n        a usable ephemeral API token that can be used to authenticate browser clients\n        for the Realtime API.\n  /realtime/transcription_sessions:\n    post:\n      summary: Create transcription session\n      operationId: create-realtime-transcription-session\n      tags:\n        - Realtime\n      requestBody:\n        description: Create an ephemeral API key with the given session configuration.\n        required: true\n        content:\n          application/json:\n            schema:\n              $ref: '#/components/schemas/RealtimeTranscriptionSessionCreateRequest'\n      responses:\n        '200':\n          description: Session created successfully.\n          content:\n            application/json:\n              schema:\n                $ref: '#/components/schemas/RealtimeTranscriptionSessionCreateResponse'\n      x-oaiMeta:\n        name: Create transcription session\n        group: realtime\n        returns: >-\n          The created [Realtime transcription session\n          object](https://platform.openai.com/docs/api-reference/realtime-sessions/transcription_session_object),\n          plus an ephemeral key\n        examples:\n          response: |\n            {\n              \"id\": \"sess_BBwZc7cFV3XizEyKGDCGL\",\n              \"object\": \"realtime.transcription_session\",\n              \"modalities\": [\"audio\", \"text\"],\n              \"turn_detection\": {\n                \"type\": \"server_vad\",\n                \"threshold\": 0.5,\n                \"prefix_padding_ms\": 300,\n                \"silence_duration_ms\": 200\n              },\n              \"input_audio_format\": \"pcm16\",\n              \"input_audio_transcription\": {\n                \"model\": \"gpt-4o-transcribe\",\n                \"language\": null,\n                \"prompt\": \"\"\n              },\n              \"client_secret\": null\n            }\n          request:\n            curl: |\n              curl -X POST https://api.openai.com/v1/realtime/transcription_sessions \\\n                -H \"Authorization: Bearer $OPENAI_API_KEY\" \\\n                -H \"Content-Type: application/json\" \\\n                -d '{}'\n            node.js: |-\n              import OpenAI from 'openai';\n\n              const client = new OpenAI({\n                apiKey: 'My API Key',\n              });\n\n              const transcriptionSession = await client.beta.realtime.transcriptionSessions.create();\n\n              console.log(transcriptionSession.client_secret);\n            python: |-\n              from openai import OpenAI\n\n              client = OpenAI(\n                  api_key=\"My API Key\",\n              )\n              transcription_session = client.beta.realtime.transcription_sessions.create()\n              print(transcription_session.client_secret)\n            java: |-\n              package com.openai.example;\n\n              import com.openai.client.OpenAIClient;\n              import com.openai.client.okhttp.OpenAIOkHttpClient;\n              import com.openai.models.beta.realtime.transcriptionsessions.TranscriptionSession;\n              import com.openai.models.beta.realtime.transcriptionsessions.TranscriptionSessionCreateParams;\n\n              public final class Main {\n                  private Main() {}\n\n                  public static void main(String[] args) {\n                      OpenAIClient client = OpenAIOkHttpClient.fromEnv();\n\n                      TranscriptionSession transcriptionSession = client.beta().realtime().transcriptionSessions().create();\n                  }\n              }\n      description: |\n        Create an ephemeral API token for use in client-side applications with the\n        Realtime API specifically for realtime transcriptions.\n        Can be configured with the same session parameters as the `transcription_session.update` client event.\n\n        It responds with a session object, plus a `client_secret` key which contains\n        a usable ephemeral API token that can be used to authenticate browser clients\n        for the Realtime API.\n  /responses:\n    post:\n      operationId: createResponse\n      tags:\n        - Responses\n      summary: Create a model response\n      requestBody:\n        required: true\n        content:\n          application/json:\n            schema:\n              $ref: '#/components/schemas/CreateResponse'\n      responses:\n        '200':\n          description: OK\n          content:\n            application/json:\n              schema:\n                $ref: '#/components/schemas/Response'\n            text/event-stream:\n              schema:\n                $ref: '#/components/schemas/ResponseStreamEvent'\n      x-oaiMeta:\n        name: Create a model response\n        group: responses\n        returns: |\n          Returns a [Response](https://platform.openai.com/docs/api-reference/responses/object) object.\n        path: create\n        examples:\n          - title: Text input\n            request:\n              curl: |\n                curl https://api.openai.com/v1/responses \\\n                  -H \"Content-Type: application/json\" \\\n                  -H \"Authorization: Bearer $OPENAI_API_KEY\" \\\n                  -d '{\n                    \"model\": \"gpt-4.1\",\n                    \"input\": \"Tell me a three sentence bedtime story about a unicorn.\"\n                  }'\n              javascript: |\n                import OpenAI from \"openai\";\n\n                const openai = new OpenAI();\n\n                const response = await openai.responses.create({\n                    model: \"gpt-4.1\",\n                    input: \"Tell me a three sentence bedtime story about a unicorn.\"\n                });\n\n                console.log(response);\n              python: |-\n                from openai import OpenAI\n\n                client = OpenAI(\n                    api_key=\"My API Key\",\n                )\n                response = client.responses.create()\n                print(response.id)\n              csharp: >\n                using System;\n\n                using OpenAI.Responses;\n\n\n                OpenAIResponseClient client = new(\n                    model: \"gpt-4.1\",\n                    apiKey: Environment.GetEnvironmentVariable(\"OPENAI_API_KEY\")\n                );\n\n\n                OpenAIResponse response = client.CreateResponse(\"Tell me a three sentence bedtime story about\n                a unicorn.\");\n\n\n                Console.WriteLine(response.GetOutputText());\n              node.js: |-\n                import OpenAI from 'openai';\n\n                const client = new OpenAI({\n                  apiKey: 'My API Key',\n                });\n\n                const response = await client.responses.create();\n\n                console.log(response.id);\n              go: |\n                package main\n\n                import (\n                  \"context\"\n                  \"fmt\"\n\n                  \"github.com/openai/openai-go\"\n                  \"github.com/openai/openai-go/option\"\n                  \"github.com/openai/openai-go/responses\"\n                )\n\n                func main() {\n                  client := openai.NewClient(\n                    option.WithAPIKey(\"My API Key\"),\n                  )\n                  response, err := client.Responses.New(context.TODO(), responses.ResponseNewParams{\n\n                  })\n                  if err != nil {\n                    panic(err.Error())\n                  }\n                  fmt.Printf(\"%+v\\n\", response.ID)\n                }\n              java: |-\n                package com.openai.example;\n\n                import com.openai.client.OpenAIClient;\n                import com.openai.client.okhttp.OpenAIOkHttpClient;\n                import com.openai.models.responses.Response;\n                import com.openai.models.responses.ResponseCreateParams;\n\n                public final class Main {\n                    private Main() {}\n\n                    public static void main(String[] args) {\n                        OpenAIClient client = OpenAIOkHttpClient.fromEnv();\n\n                        Response response = client.responses().create();\n                    }\n                }\n              ruby: |-\n                require \"openai\"\n\n                openai = OpenAI::Client.new(api_key: \"My API Key\")\n\n                response = openai.responses.create\n\n                puts(response)\n            response: |\n              {\n                \"id\": \"resp_67ccd2bed1ec8190b14f964abc0542670bb6a6b452d3795b\",\n                \"object\": \"response\",\n                \"created_at\": 1741476542,\n                \"status\": \"completed\",\n                \"error\": null,\n                \"incomplete_details\": null,\n                \"instructions\": null,\n                \"max_output_tokens\": null,\n                \"model\": \"gpt-4.1-2025-04-14\",\n                \"output\": [\n                  {\n                    \"type\": \"message\",\n                    \"id\": \"msg_67ccd2bf17f0819081ff3bb2cf6508e60bb6a6b452d3795b\",\n                    \"status\": \"completed\",\n                    \"role\": \"assistant\",\n                    \"content\": [\n                      {\n                        \"type\": \"output_text\",\n                        \"text\": \"In a peaceful grove beneath a silver moon, a unicorn named Lumina discovered a hidden pool that reflected the stars. As she dipped her horn into the water, the pool began to shimmer, revealing a pathway to a magical realm of endless night skies. Filled with wonder, Lumina whispered a wish for all who dream to find their own hidden magic, and as she glanced back, her hoofprints sparkled like stardust.\",\n                        \"annotations\": []\n                      }\n                    ]\n                  }\n                ],\n                \"parallel_tool_calls\": true,\n                \"previous_response_id\": null,\n                \"reasoning\": {\n                  \"effort\": null,\n                  \"summary\": null\n                },\n                \"store\": true,\n                \"temperature\": 1.0,\n                \"text\": {\n                  \"format\": {\n                    \"type\": \"text\"\n                  }\n                },\n                \"tool_choice\": \"auto\",\n                \"tools\": [],\n                \"top_p\": 1.0,\n                \"truncation\": \"disabled\",\n                \"usage\": {\n                  \"input_tokens\": 36,\n                  \"input_tokens_details\": {\n                    \"cached_tokens\": 0\n                  },\n                  \"output_tokens\": 87,\n                  \"output_tokens_details\": {\n                    \"reasoning_tokens\": 0\n                  },\n                  \"total_tokens\": 123\n                },\n                \"user\": null,\n                \"metadata\": {}\n              }\n          - title: Image input\n            request:\n              curl: |\n                curl https://api.openai.com/v1/responses \\\n                  -H \"Content-Type: application/json\" \\\n                  -H \"Authorization: Bearer $OPENAI_API_KEY\" \\\n                  -d '{\n                    \"model\": \"gpt-4.1\",\n                    \"input\": [\n                      {\n                        \"role\": \"user\",\n                        \"content\": [\n                          {\"type\": \"input_text\", \"text\": \"what is in this image?\"},\n                          {\n                            \"type\": \"input_image\",\n                            \"image_url\": \"https://upload.wikimedia.org/wikipedia/commons/thumb/d/dd/Gfp-wisconsin-madison-the-nature-boardwalk.jpg/2560px-Gfp-wisconsin-madison-the-nature-boardwalk.jpg\"\n                          }\n                        ]\n                      }\n                    ]\n                  }'\n              javascript: |\n                import OpenAI from \"openai\";\n\n                const openai = new OpenAI();\n\n                const response = await openai.responses.create({\n                    model: \"gpt-4.1\",\n                    input: [\n                        {\n                            role: \"user\",\n                            content: [\n                                { type: \"input_text\", text: \"what is in this image?\" },\n                                {\n                                    type: \"input_image\",\n                                    image_url:\n                                        \"https://upload.wikimedia.org/wikipedia/commons/thumb/d/dd/Gfp-wisconsin-madison-the-nature-boardwalk.jpg/2560px-Gfp-wisconsin-madison-the-nature-boardwalk.jpg\",\n                                },\n                            ],\n                        },\n                    ],\n                });\n\n                console.log(response);\n              python: |-\n                from openai import OpenAI\n\n                client = OpenAI(\n                    api_key=\"My API Key\",\n                )\n                response = client.responses.create()\n                print(response.id)\n              csharp: |\n                using System;\n                using System.Collections.Generic;\n\n                using OpenAI.Responses;\n\n                OpenAIResponseClient client = new(\n                    model: \"gpt-4.1\",\n                    apiKey: Environment.GetEnvironmentVariable(\"OPENAI_API_KEY\")\n                );\n\n                List<ResponseItem> inputItems =\n                [\n                    ResponseItem.CreateUserMessageItem(\n                        [\n                            ResponseContentPart.CreateInputTextPart(\"What is in this image?\"),\n                            ResponseContentPart.CreateInputImagePart(new Uri(\"https://upload.wikimedia.org/wikipedia/commons/thumb/d/dd/Gfp-wisconsin-madison-the-nature-boardwalk.jpg/2560px-Gfp-wisconsin-madison-the-nature-boardwalk.jpg\"))\n                        ]\n                    )\n                ];\n\n                OpenAIResponse response = client.CreateResponse(inputItems);\n\n                Console.WriteLine(response.GetOutputText());\n              node.js: |-\n                import OpenAI from 'openai';\n\n                const client = new OpenAI({\n                  apiKey: 'My API Key',\n                });\n\n                const response = await client.responses.create();\n\n                console.log(response.id);\n              go: |\n                package main\n\n                import (\n                  \"context\"\n                  \"fmt\"\n\n                  \"github.com/openai/openai-go\"\n                  \"github.com/openai/openai-go/option\"\n                  \"github.com/openai/openai-go/responses\"\n                )\n\n                func main() {\n                  client := openai.NewClient(\n                    option.WithAPIKey(\"My API Key\"),\n                  )\n                  response, err := client.Responses.New(context.TODO(), responses.ResponseNewParams{\n\n                  })\n                  if err != nil {\n                    panic(err.Error())\n                  }\n                  fmt.Printf(\"%+v\\n\", response.ID)\n                }\n              java: |-\n                package com.openai.example;\n\n                import com.openai.client.OpenAIClient;\n                import com.openai.client.okhttp.OpenAIOkHttpClient;\n                import com.openai.models.responses.Response;\n                import com.openai.models.responses.ResponseCreateParams;\n\n                public final class Main {\n                    private Main() {}\n\n                    public static void main(String[] args) {\n                        OpenAIClient client = OpenAIOkHttpClient.fromEnv();\n\n                        Response response = client.responses().create();\n                    }\n                }\n              ruby: |-\n                require \"openai\"\n\n                openai = OpenAI::Client.new(api_key: \"My API Key\")\n\n                response = openai.responses.create\n\n                puts(response)\n            response: |\n              {\n                \"id\": \"resp_67ccd3a9da748190baa7f1570fe91ac604becb25c45c1d41\",\n                \"object\": \"response\",\n                \"created_at\": 1741476777,\n                \"status\": \"completed\",\n                \"error\": null,\n                \"incomplete_details\": null,\n                \"instructions\": null,\n                \"max_output_tokens\": null,\n                \"model\": \"gpt-4.1-2025-04-14\",\n                \"output\": [\n                  {\n                    \"type\": \"message\",\n                    \"id\": \"msg_67ccd3acc8d48190a77525dc6de64b4104becb25c45c1d41\",\n                    \"status\": \"completed\",\n                    \"role\": \"assistant\",\n                    \"content\": [\n                      {\n                        \"type\": \"output_text\",\n                        \"text\": \"The image depicts a scenic landscape with a wooden boardwalk or pathway leading through lush, green grass under a blue sky with some clouds. The setting suggests a peaceful natural area, possibly a park or nature reserve. There are trees and shrubs in the background.\",\n                        \"annotations\": []\n                      }\n                    ]\n                  }\n                ],\n                \"parallel_tool_calls\": true,\n                \"previous_response_id\": null,\n                \"reasoning\": {\n                  \"effort\": null,\n                  \"summary\": null\n                },\n                \"store\": true,\n                \"temperature\": 1.0,\n                \"text\": {\n                  \"format\": {\n                    \"type\": \"text\"\n                  }\n                },\n                \"tool_choice\": \"auto\",\n                \"tools\": [],\n                \"top_p\": 1.0,\n                \"truncation\": \"disabled\",\n                \"usage\": {\n                  \"input_tokens\": 328,\n                  \"input_tokens_details\": {\n                    \"cached_tokens\": 0\n                  },\n                  \"output_tokens\": 52,\n                  \"output_tokens_details\": {\n                    \"reasoning_tokens\": 0\n                  },\n                  \"total_tokens\": 380\n                },\n                \"user\": null,\n                \"metadata\": {}\n              }\n          - title: File input\n            request:\n              curl: |\n                curl https://api.openai.com/v1/responses \\\n                  -H \"Content-Type: application/json\" \\\n                  -H \"Authorization: Bearer $OPENAI_API_KEY\" \\\n                  -d '{\n                    \"model\": \"gpt-4.1\",\n                    \"input\": [\n                      {\n                        \"role\": \"user\",\n                        \"content\": [\n                          {\"type\": \"input_text\", \"text\": \"what is in this file?\"},\n                          {\n                            \"type\": \"input_file\",\n                            \"file_url\": \"https://www.berkshirehathaway.com/letters/2024ltr.pdf\"\n                          }\n                        ]\n                      }\n                    ]\n                  }'\n              javascript: |\n                import OpenAI from \"openai\";\n\n                const openai = new OpenAI();\n\n                const response = await openai.responses.create({\n                    model: \"gpt-4.1\",\n                    input: [\n                        {\n                            role: \"user\",\n                            content: [\n                                { type: \"input_text\", text: \"what is in this file?\" },\n                                {\n                                    type: \"input_file\",\n                                    file_url: \"https://www.berkshirehathaway.com/letters/2024ltr.pdf\",\n                                },\n                            ],\n                        },\n                    ],\n                });\n\n                console.log(response);\n              python: |-\n                from openai import OpenAI\n\n                client = OpenAI(\n                    api_key=\"My API Key\",\n                )\n                response = client.responses.create()\n                print(response.id)\n              node.js: |-\n                import OpenAI from 'openai';\n\n                const client = new OpenAI({\n                  apiKey: 'My API Key',\n                });\n\n                const response = await client.responses.create();\n\n                console.log(response.id);\n              go: |\n                package main\n\n                import (\n                  \"context\"\n                  \"fmt\"\n\n                  \"github.com/openai/openai-go\"\n                  \"github.com/openai/openai-go/option\"\n                  \"github.com/openai/openai-go/responses\"\n                )\n\n                func main() {\n                  client := openai.NewClient(\n                    option.WithAPIKey(\"My API Key\"),\n                  )\n                  response, err := client.Responses.New(context.TODO(), responses.ResponseNewParams{\n\n                  })\n                  if err != nil {\n                    panic(err.Error())\n                  }\n                  fmt.Printf(\"%+v\\n\", response.ID)\n                }\n              java: |-\n                package com.openai.example;\n\n                import com.openai.client.OpenAIClient;\n                import com.openai.client.okhttp.OpenAIOkHttpClient;\n                import com.openai.models.responses.Response;\n                import com.openai.models.responses.ResponseCreateParams;\n\n                public final class Main {\n                    private Main() {}\n\n                    public static void main(String[] args) {\n                        OpenAIClient client = OpenAIOkHttpClient.fromEnv();\n\n                        Response response = client.responses().create();\n                    }\n                }\n              ruby: |-\n                require \"openai\"\n\n                openai = OpenAI::Client.new(api_key: \"My API Key\")\n\n                response = openai.responses.create\n\n                puts(response)\n            response: |\n              {\n                \"id\": \"resp_686eef60237881a2bd1180bb8b13de430e34c516d176ff86\",\n                \"object\": \"response\",\n                \"created_at\": 1752100704,\n                \"status\": \"completed\",\n                \"background\": false,\n                \"error\": null,\n                \"incomplete_details\": null,\n                \"instructions\": null,\n                \"max_output_tokens\": null,\n                \"max_tool_calls\": null,\n                \"model\": \"gpt-4.1-2025-04-14\",\n                \"output\": [\n                  {\n                    \"id\": \"msg_686eef60d3e081a29283bdcbc4322fd90e34c516d176ff86\",\n                    \"type\": \"message\",\n                    \"status\": \"completed\",\n                    \"content\": [\n                      {\n                        \"type\": \"output_text\",\n                        \"annotations\": [],\n                        \"logprobs\": [],\n                        \"text\": \"The file seems to contain excerpts from a letter to the shareholders of Berkshire Hathaway Inc., likely written by Warren Buffett. It covers several topics:\\n\\n1. **Communication Philosophy**: Buffett emphasizes the importance of transparency and candidness in reporting mistakes and successes to shareholders.\\n\\n2. **Mistakes and Learnings**: The letter acknowledges past mistakes in business assessments and management hires, highlighting the importance of correcting errors promptly.\\n\\n3. **CEO Succession**: Mention of Greg Abel stepping in as the new CEO and continuing the tradition of honest communication.\\n\\n4. **Pete Liegl Story**: A detailed account of acquiring Forest River and the relationship with its founder, highlighting trust and effective business decisions.\\n\\n5. **2024 Performance**: Overview of business performance, particularly in insurance and investment activities, with a focus on GEICO's improvement.\\n\\n6. **Tax Contributions**: Discussion of significant tax payments to the U.S. Treasury, credited to shareholders' reinvestments.\\n\\n7. **Investment Strategy**: A breakdown of Berkshire\\u2019s investments in both controlled subsidiaries and marketable equities, along with a focus on long-term holding strategies.\\n\\n8. **American Capitalism**: Reflections on America\\u2019s economic development and Berkshire\\u2019s role within it.\\n\\n9. **Property-Casualty Insurance**: Insights into the P/C insurance business model and its challenges and benefits.\\n\\n10. **Japanese Investments**: Information about Berkshire\\u2019s investments in Japanese companies and future plans.\\n\\n11. **Annual Meeting**: Details about the upcoming annual gathering in Omaha, including schedule changes and new book releases.\\n\\n12. **Personal Anecdotes**: Light-hearted stories about family and interactions, conveying Buffett's personable approach.\\n\\n13. **Financial Performance Data**: Tables comparing Berkshire\\u2019s annual performance to the S&P 500, showing impressive long-term gains.\\n\\nOverall, the letter reinforces Berkshire Hathaway's commitment to transparency, investment in both its businesses and the wider economy, and emphasizes strong leadership and prudent financial management.\"\n                      }\n                    ],\n                    \"role\": \"assistant\"\n                  }\n                ],\n                \"parallel_tool_calls\": true,\n                \"previous_response_id\": null,\n                \"reasoning\": {\n                  \"effort\": null,\n                  \"summary\": null\n                },\n                \"service_tier\": \"default\",\n                \"store\": true,\n                \"temperature\": 1.0,\n                \"text\": {\n                  \"format\": {\n                    \"type\": \"text\"\n                  }\n                },\n                \"tool_choice\": \"auto\",\n                \"tools\": [],\n                \"top_logprobs\": 0,\n                \"top_p\": 1.0,\n                \"truncation\": \"disabled\",\n                \"usage\": {\n                  \"input_tokens\": 8438,\n                  \"input_tokens_details\": {\n                    \"cached_tokens\": 0\n                  },\n                  \"output_tokens\": 398,\n                  \"output_tokens_details\": {\n                    \"reasoning_tokens\": 0\n                  },\n                  \"total_tokens\": 8836\n                },\n                \"user\": null,\n                \"metadata\": {}\n              }\n          - title: Web search\n            request:\n              curl: |\n                curl https://api.openai.com/v1/responses \\\n                  -H \"Content-Type: application/json\" \\\n                  -H \"Authorization: Bearer $OPENAI_API_KEY\" \\\n                  -d '{\n                    \"model\": \"gpt-4.1\",\n                    \"tools\": [{ \"type\": \"web_search_preview\" }],\n                    \"input\": \"What was a positive news story from today?\"\n                  }'\n              javascript: |\n                import OpenAI from \"openai\";\n\n                const openai = new OpenAI();\n\n                const response = await openai.responses.create({\n                    model: \"gpt-4.1\",\n                    tools: [{ type: \"web_search_preview\" }],\n                    input: \"What was a positive news story from today?\",\n                });\n\n                console.log(response);\n              python: |-\n                from openai import OpenAI\n\n                client = OpenAI(\n                    api_key=\"My API Key\",\n                )\n                response = client.responses.create()\n                print(response.id)\n              csharp: |\n                using System;\n\n                using OpenAI.Responses;\n\n                OpenAIResponseClient client = new(\n                    model: \"gpt-4.1\",\n                    apiKey: Environment.GetEnvironmentVariable(\"OPENAI_API_KEY\")\n                );\n\n                string userInputText = \"What was a positive news story from today?\";\n\n                ResponseCreationOptions options = new()\n                {\n                    Tools =\n                    {\n                        ResponseTool.CreateWebSearchTool()\n                    },\n                };\n\n                OpenAIResponse response = client.CreateResponse(userInputText, options);\n\n                Console.WriteLine(response.GetOutputText());\n              node.js: |-\n                import OpenAI from 'openai';\n\n                const client = new OpenAI({\n                  apiKey: 'My API Key',\n                });\n\n                const response = await client.responses.create();\n\n                console.log(response.id);\n              go: |\n                package main\n\n                import (\n                  \"context\"\n                  \"fmt\"\n\n                  \"github.com/openai/openai-go\"\n                  \"github.com/openai/openai-go/option\"\n                  \"github.com/openai/openai-go/responses\"\n                )\n\n                func main() {\n                  client := openai.NewClient(\n                    option.WithAPIKey(\"My API Key\"),\n                  )\n                  response, err := client.Responses.New(context.TODO(), responses.ResponseNewParams{\n\n                  })\n                  if err != nil {\n                    panic(err.Error())\n                  }\n                  fmt.Printf(\"%+v\\n\", response.ID)\n                }\n              java: |-\n                package com.openai.example;\n\n                import com.openai.client.OpenAIClient;\n                import com.openai.client.okhttp.OpenAIOkHttpClient;\n                import com.openai.models.responses.Response;\n                import com.openai.models.responses.ResponseCreateParams;\n\n                public final class Main {\n                    private Main() {}\n\n                    public static void main(String[] args) {\n                        OpenAIClient client = OpenAIOkHttpClient.fromEnv();\n\n                        Response response = client.responses().create();\n                    }\n                }\n              ruby: |-\n                require \"openai\"\n\n                openai = OpenAI::Client.new(api_key: \"My API Key\")\n\n                response = openai.responses.create\n\n                puts(response)\n            response: |\n              {\n                \"id\": \"resp_67ccf18ef5fc8190b16dbee19bc54e5f087bb177ab789d5c\",\n                \"object\": \"response\",\n                \"created_at\": 1741484430,\n                \"status\": \"completed\",\n                \"error\": null,\n                \"incomplete_details\": null,\n                \"instructions\": null,\n                \"max_output_tokens\": null,\n                \"model\": \"gpt-4.1-2025-04-14\",\n                \"output\": [\n                  {\n                    \"type\": \"web_search_call\",\n                    \"id\": \"ws_67ccf18f64008190a39b619f4c8455ef087bb177ab789d5c\",\n                    \"status\": \"completed\"\n                  },\n                  {\n                    \"type\": \"message\",\n                    \"id\": \"msg_67ccf190ca3881909d433c50b1f6357e087bb177ab789d5c\",\n                    \"status\": \"completed\",\n                    \"role\": \"assistant\",\n                    \"content\": [\n                      {\n                        \"type\": \"output_text\",\n                        \"text\": \"As of today, March 9, 2025, one notable positive news story...\",\n                        \"annotations\": [\n                          {\n                            \"type\": \"url_citation\",\n                            \"start_index\": 442,\n                            \"end_index\": 557,\n                            \"url\": \"https://.../?utm_source=chatgpt.com\",\n                            \"title\": \"...\"\n                          },\n                          {\n                            \"type\": \"url_citation\",\n                            \"start_index\": 962,\n                            \"end_index\": 1077,\n                            \"url\": \"https://.../?utm_source=chatgpt.com\",\n                            \"title\": \"...\"\n                          },\n                          {\n                            \"type\": \"url_citation\",\n                            \"start_index\": 1336,\n                            \"end_index\": 1451,\n                            \"url\": \"https://.../?utm_source=chatgpt.com\",\n                            \"title\": \"...\"\n                          }\n                        ]\n                      }\n                    ]\n                  }\n                ],\n                \"parallel_tool_calls\": true,\n                \"previous_response_id\": null,\n                \"reasoning\": {\n                  \"effort\": null,\n                  \"summary\": null\n                },\n                \"store\": true,\n                \"temperature\": 1.0,\n                \"text\": {\n                  \"format\": {\n                    \"type\": \"text\"\n                  }\n                },\n                \"tool_choice\": \"auto\",\n                \"tools\": [\n                  {\n                    \"type\": \"web_search_preview\",\n                    \"domains\": [],\n                    \"search_context_size\": \"medium\",\n                    \"user_location\": {\n                      \"type\": \"approximate\",\n                      \"city\": null,\n                      \"country\": \"US\",\n                      \"region\": null,\n                      \"timezone\": null\n                    }\n                  }\n                ],\n                \"top_p\": 1.0,\n                \"truncation\": \"disabled\",\n                \"usage\": {\n                  \"input_tokens\": 328,\n                  \"input_tokens_details\": {\n                    \"cached_tokens\": 0\n                  },\n                  \"output_tokens\": 356,\n                  \"output_tokens_details\": {\n                    \"reasoning_tokens\": 0\n                  },\n                  \"total_tokens\": 684\n                },\n                \"user\": null,\n                \"metadata\": {}\n              }\n          - title: File search\n            request:\n              curl: |\n                curl https://api.openai.com/v1/responses \\\n                  -H \"Content-Type: application/json\" \\\n                  -H \"Authorization: Bearer $OPENAI_API_KEY\" \\\n                  -d '{\n                    \"model\": \"gpt-4.1\",\n                    \"tools\": [{\n                      \"type\": \"file_search\",\n                      \"vector_store_ids\": [\"vs_1234567890\"],\n                      \"max_num_results\": 20\n                    }],\n                    \"input\": \"What are the attributes of an ancient brown dragon?\"\n                  }'\n              javascript: |\n                import OpenAI from \"openai\";\n\n                const openai = new OpenAI();\n\n                const response = await openai.responses.create({\n                    model: \"gpt-4.1\",\n                    tools: [{\n                      type: \"file_search\",\n                      vector_store_ids: [\"vs_1234567890\"],\n                      max_num_results: 20\n                    }],\n                    input: \"What are the attributes of an ancient brown dragon?\",\n                });\n\n                console.log(response);\n              python: |-\n                from openai import OpenAI\n\n                client = OpenAI(\n                    api_key=\"My API Key\",\n                )\n                response = client.responses.create()\n                print(response.id)\n              csharp: |\n                using System;\n\n                using OpenAI.Responses;\n\n                OpenAIResponseClient client = new(\n                    model: \"gpt-4.1\",\n                    apiKey: Environment.GetEnvironmentVariable(\"OPENAI_API_KEY\")\n                );\n\n                string userInputText = \"What are the attributes of an ancient brown dragon?\";\n\n                ResponseCreationOptions options = new()\n                {\n                    Tools =\n                    {\n                        ResponseTool.CreateFileSearchTool(\n                            vectorStoreIds: [\"vs_1234567890\"],\n                            maxResultCount: 20\n                        )\n                    },\n                };\n\n                OpenAIResponse response = client.CreateResponse(userInputText, options);\n\n                Console.WriteLine(response.GetOutputText());\n              node.js: |-\n                import OpenAI from 'openai';\n\n                const client = new OpenAI({\n                  apiKey: 'My API Key',\n                });\n\n                const response = await client.responses.create();\n\n                console.log(response.id);\n              go: |\n                package main\n\n                import (\n                  \"context\"\n                  \"fmt\"\n\n                  \"github.com/openai/openai-go\"\n                  \"github.com/openai/openai-go/option\"\n                  \"github.com/openai/openai-go/responses\"\n                )\n\n                func main() {\n                  client := openai.NewClient(\n                    option.WithAPIKey(\"My API Key\"),\n                  )\n                  response, err := client.Responses.New(context.TODO(), responses.ResponseNewParams{\n\n                  })\n                  if err != nil {\n                    panic(err.Error())\n                  }\n                  fmt.Printf(\"%+v\\n\", response.ID)\n                }\n              java: |-\n                package com.openai.example;\n\n                import com.openai.client.OpenAIClient;\n                import com.openai.client.okhttp.OpenAIOkHttpClient;\n                import com.openai.models.responses.Response;\n                import com.openai.models.responses.ResponseCreateParams;\n\n                public final class Main {\n                    private Main() {}\n\n                    public static void main(String[] args) {\n                        OpenAIClient client = OpenAIOkHttpClient.fromEnv();\n\n                        Response response = client.responses().create();\n                    }\n                }\n              ruby: |-\n                require \"openai\"\n\n                openai = OpenAI::Client.new(api_key: \"My API Key\")\n\n                response = openai.responses.create\n\n                puts(response)\n            response: |\n              {\n                \"id\": \"resp_67ccf4c55fc48190b71bd0463ad3306d09504fb6872380d7\",\n                \"object\": \"response\",\n                \"created_at\": 1741485253,\n                \"status\": \"completed\",\n                \"error\": null,\n                \"incomplete_details\": null,\n                \"instructions\": null,\n                \"max_output_tokens\": null,\n                \"model\": \"gpt-4.1-2025-04-14\",\n                \"output\": [\n                  {\n                    \"type\": \"file_search_call\",\n                    \"id\": \"fs_67ccf4c63cd08190887ef6464ba5681609504fb6872380d7\",\n                    \"status\": \"completed\",\n                    \"queries\": [\n                      \"attributes of an ancient brown dragon\"\n                    ],\n                    \"results\": null\n                  },\n                  {\n                    \"type\": \"message\",\n                    \"id\": \"msg_67ccf4c93e5c81909d595b369351a9d309504fb6872380d7\",\n                    \"status\": \"completed\",\n                    \"role\": \"assistant\",\n                    \"content\": [\n                      {\n                        \"type\": \"output_text\",\n                        \"text\": \"The attributes of an ancient brown dragon include...\",\n                        \"annotations\": [\n                          {\n                            \"type\": \"file_citation\",\n                            \"index\": 320,\n                            \"file_id\": \"file-4wDz5b167pAf72nx1h9eiN\",\n                            \"filename\": \"dragons.pdf\"\n                          },\n                          {\n                            \"type\": \"file_citation\",\n                            \"index\": 576,\n                            \"file_id\": \"file-4wDz5b167pAf72nx1h9eiN\",\n                            \"filename\": \"dragons.pdf\"\n                          },\n                          {\n                            \"type\": \"file_citation\",\n                            \"index\": 815,\n                            \"file_id\": \"file-4wDz5b167pAf72nx1h9eiN\",\n                            \"filename\": \"dragons.pdf\"\n                          },\n                          {\n                            \"type\": \"file_citation\",\n                            \"index\": 815,\n                            \"file_id\": \"file-4wDz5b167pAf72nx1h9eiN\",\n                            \"filename\": \"dragons.pdf\"\n                          },\n                          {\n                            \"type\": \"file_citation\",\n                            \"index\": 1030,\n                            \"file_id\": \"file-4wDz5b167pAf72nx1h9eiN\",\n                            \"filename\": \"dragons.pdf\"\n                          },\n                          {\n                            \"type\": \"file_citation\",\n                            \"index\": 1030,\n                            \"file_id\": \"file-4wDz5b167pAf72nx1h9eiN\",\n                            \"filename\": \"dragons.pdf\"\n                          },\n                          {\n                            \"type\": \"file_citation\",\n                            \"index\": 1156,\n                            \"file_id\": \"file-4wDz5b167pAf72nx1h9eiN\",\n                            \"filename\": \"dragons.pdf\"\n                          },\n                          {\n                            \"type\": \"file_citation\",\n                            \"index\": 1225,\n                            \"file_id\": \"file-4wDz5b167pAf72nx1h9eiN\",\n                            \"filename\": \"dragons.pdf\"\n                          }\n                        ]\n                      }\n                    ]\n                  }\n                ],\n                \"parallel_tool_calls\": true,\n                \"previous_response_id\": null,\n                \"reasoning\": {\n                  \"effort\": null,\n                  \"summary\": null\n                },\n                \"store\": true,\n                \"temperature\": 1.0,\n                \"text\": {\n                  \"format\": {\n                    \"type\": \"text\"\n                  }\n                },\n                \"tool_choice\": \"auto\",\n                \"tools\": [\n                  {\n                    \"type\": \"file_search\",\n                    \"filters\": null,\n                    \"max_num_results\": 20,\n                    \"ranking_options\": {\n                      \"ranker\": \"auto\",\n                      \"score_threshold\": 0.0\n                    },\n                    \"vector_store_ids\": [\n                      \"vs_1234567890\"\n                    ]\n                  }\n                ],\n                \"top_p\": 1.0,\n                \"truncation\": \"disabled\",\n                \"usage\": {\n                  \"input_tokens\": 18307,\n                  \"input_tokens_details\": {\n                    \"cached_tokens\": 0\n                  },\n                  \"output_tokens\": 348,\n                  \"output_tokens_details\": {\n                    \"reasoning_tokens\": 0\n                  },\n                  \"total_tokens\": 18655\n                },\n                \"user\": null,\n                \"metadata\": {}\n              }\n          - title: Streaming\n            request:\n              curl: |\n                curl https://api.openai.com/v1/responses \\\n                  -H \"Content-Type: application/json\" \\\n                  -H \"Authorization: Bearer $OPENAI_API_KEY\" \\\n                  -d '{\n                    \"model\": \"gpt-4.1\",\n                    \"instructions\": \"You are a helpful assistant.\",\n                    \"input\": \"Hello!\",\n                    \"stream\": true\n                  }'\n              python: |-\n                from openai import OpenAI\n\n                client = OpenAI(\n                    api_key=\"My API Key\",\n                )\n                response = client.responses.create()\n                print(response.id)\n              javascript: |\n                import OpenAI from \"openai\";\n\n                const openai = new OpenAI();\n\n                const response = await openai.responses.create({\n                    model: \"gpt-4.1\",\n                    instructions: \"You are a helpful assistant.\",\n                    input: \"Hello!\",\n                    stream: true,\n                });\n\n                for await (const event of response) {\n                    console.log(event);\n                }\n              csharp: >\n                using System;\n\n                using System.ClientModel;\n\n                using System.Threading.Tasks;\n\n\n                using OpenAI.Responses;\n\n\n                OpenAIResponseClient client = new(\n                    model: \"gpt-4.1\",\n                    apiKey: Environment.GetEnvironmentVariable(\"OPENAI_API_KEY\")\n                );\n\n\n                string userInputText = \"Hello!\";\n\n\n                ResponseCreationOptions options = new()\n\n                {\n                    Instructions = \"You are a helpful assistant.\",\n                };\n\n\n                AsyncCollectionResult<StreamingResponseUpdate> responseUpdates =\n                client.CreateResponseStreamingAsync(userInputText, options);\n\n\n                await foreach (StreamingResponseUpdate responseUpdate in responseUpdates)\n\n                {\n                    if (responseUpdate is StreamingResponseOutputTextDeltaUpdate outputTextDeltaUpdate)\n                    {\n                        Console.Write(outputTextDeltaUpdate.Delta);\n                    }\n                }\n              node.js: |-\n                import OpenAI from 'openai';\n\n                const client = new OpenAI({\n                  apiKey: 'My API Key',\n                });\n\n                const response = await client.responses.create();\n\n                console.log(response.id);\n              go: |\n                package main\n\n                import (\n                  \"context\"\n                  \"fmt\"\n\n                  \"github.com/openai/openai-go\"\n                  \"github.com/openai/openai-go/option\"\n                  \"github.com/openai/openai-go/responses\"\n                )\n\n                func main() {\n                  client := openai.NewClient(\n                    option.WithAPIKey(\"My API Key\"),\n                  )\n                  response, err := client.Responses.New(context.TODO(), responses.ResponseNewParams{\n\n                  })\n                  if err != nil {\n                    panic(err.Error())\n                  }\n                  fmt.Printf(\"%+v\\n\", response.ID)\n                }\n              java: |-\n                package com.openai.example;\n\n                import com.openai.client.OpenAIClient;\n                import com.openai.client.okhttp.OpenAIOkHttpClient;\n                import com.openai.models.responses.Response;\n                import com.openai.models.responses.ResponseCreateParams;\n\n                public final class Main {\n                    private Main() {}\n\n                    public static void main(String[] args) {\n                        OpenAIClient client = OpenAIOkHttpClient.fromEnv();\n\n                        Response response = client.responses().create();\n                    }\n                }\n              ruby: |-\n                require \"openai\"\n\n                openai = OpenAI::Client.new(api_key: \"My API Key\")\n\n                response = openai.responses.create\n\n                puts(response)\n            response: >\n              event: response.created\n\n              data:\n              {\"type\":\"response.created\",\"response\":{\"id\":\"resp_67c9fdcecf488190bdd9a0409de3a1ec07b8b0ad4e5eb654\",\"object\":\"response\",\"created_at\":1741290958,\"status\":\"in_progress\",\"error\":null,\"incomplete_details\":null,\"instructions\":\"You\n              are a helpful\n              assistant.\",\"max_output_tokens\":null,\"model\":\"gpt-4.1-2025-04-14\",\"output\":[],\"parallel_tool_calls\":true,\"previous_response_id\":null,\"reasoning\":{\"effort\":null,\"summary\":null},\"store\":true,\"temperature\":1.0,\"text\":{\"format\":{\"type\":\"text\"}},\"tool_choice\":\"auto\",\"tools\":[],\"top_p\":1.0,\"truncation\":\"disabled\",\"usage\":null,\"user\":null,\"metadata\":{}}}\n\n\n              event: response.in_progress\n\n              data:\n              {\"type\":\"response.in_progress\",\"response\":{\"id\":\"resp_67c9fdcecf488190bdd9a0409de3a1ec07b8b0ad4e5eb654\",\"object\":\"response\",\"created_at\":1741290958,\"status\":\"in_progress\",\"error\":null,\"incomplete_details\":null,\"instructions\":\"You\n              are a helpful\n              assistant.\",\"max_output_tokens\":null,\"model\":\"gpt-4.1-2025-04-14\",\"output\":[],\"parallel_tool_calls\":true,\"previous_response_id\":null,\"reasoning\":{\"effort\":null,\"summary\":null},\"store\":true,\"temperature\":1.0,\"text\":{\"format\":{\"type\":\"text\"}},\"tool_choice\":\"auto\",\"tools\":[],\"top_p\":1.0,\"truncation\":\"disabled\",\"usage\":null,\"user\":null,\"metadata\":{}}}\n\n\n              event: response.output_item.added\n\n              data:\n              {\"type\":\"response.output_item.added\",\"output_index\":0,\"item\":{\"id\":\"msg_67c9fdcf37fc8190ba82116e33fb28c507b8b0ad4e5eb654\",\"type\":\"message\",\"status\":\"in_progress\",\"role\":\"assistant\",\"content\":[]}}\n\n\n              event: response.content_part.added\n\n              data:\n              {\"type\":\"response.content_part.added\",\"item_id\":\"msg_67c9fdcf37fc8190ba82116e33fb28c507b8b0ad4e5eb654\",\"output_index\":0,\"content_index\":0,\"part\":{\"type\":\"output_text\",\"text\":\"\",\"annotations\":[]}}\n\n\n              event: response.output_text.delta\n\n              data:\n              {\"type\":\"response.output_text.delta\",\"item_id\":\"msg_67c9fdcf37fc8190ba82116e33fb28c507b8b0ad4e5eb654\",\"output_index\":0,\"content_index\":0,\"delta\":\"Hi\"}\n\n\n              ...\n\n\n              event: response.output_text.done\n\n              data:\n              {\"type\":\"response.output_text.done\",\"item_id\":\"msg_67c9fdcf37fc8190ba82116e33fb28c507b8b0ad4e5eb654\",\"output_index\":0,\"content_index\":0,\"text\":\"Hi\n              there! How can I assist you today?\"}\n\n\n              event: response.content_part.done\n\n              data:\n              {\"type\":\"response.content_part.done\",\"item_id\":\"msg_67c9fdcf37fc8190ba82116e33fb28c507b8b0ad4e5eb654\",\"output_index\":0,\"content_index\":0,\"part\":{\"type\":\"output_text\",\"text\":\"Hi\n              there! How can I assist you today?\",\"annotations\":[]}}\n\n\n              event: response.output_item.done\n\n              data:\n              {\"type\":\"response.output_item.done\",\"output_index\":0,\"item\":{\"id\":\"msg_67c9fdcf37fc8190ba82116e33fb28c507b8b0ad4e5eb654\",\"type\":\"message\",\"status\":\"completed\",\"role\":\"assistant\",\"content\":[{\"type\":\"output_text\",\"text\":\"Hi\n              there! How can I assist you today?\",\"annotations\":[]}]}}\n\n\n              event: response.completed\n\n              data:\n              {\"type\":\"response.completed\",\"response\":{\"id\":\"resp_67c9fdcecf488190bdd9a0409de3a1ec07b8b0ad4e5eb654\",\"object\":\"response\",\"created_at\":1741290958,\"status\":\"completed\",\"error\":null,\"incomplete_details\":null,\"instructions\":\"You\n              are a helpful\n              assistant.\",\"max_output_tokens\":null,\"model\":\"gpt-4.1-2025-04-14\",\"output\":[{\"id\":\"msg_67c9fdcf37fc8190ba82116e33fb28c507b8b0ad4e5eb654\",\"type\":\"message\",\"status\":\"completed\",\"role\":\"assistant\",\"content\":[{\"type\":\"output_text\",\"text\":\"Hi\n              there! How can I assist you\n              today?\",\"annotations\":[]}]}],\"parallel_tool_calls\":true,\"previous_response_id\":null,\"reasoning\":{\"effort\":null,\"summary\":null},\"store\":true,\"temperature\":1.0,\"text\":{\"format\":{\"type\":\"text\"}},\"tool_choice\":\"auto\",\"tools\":[],\"top_p\":1.0,\"truncation\":\"disabled\",\"usage\":{\"input_tokens\":37,\"output_tokens\":11,\"output_tokens_details\":{\"reasoning_tokens\":0},\"total_tokens\":48},\"user\":null,\"metadata\":{}}}\n          - title: Functions\n            request:\n              curl: |\n                curl https://api.openai.com/v1/responses \\\n                  -H \"Content-Type: application/json\" \\\n                  -H \"Authorization: Bearer $OPENAI_API_KEY\" \\\n                  -d '{\n                    \"model\": \"gpt-4.1\",\n                    \"input\": \"What is the weather like in Boston today?\",\n                    \"tools\": [\n                      {\n                        \"type\": \"function\",\n                        \"name\": \"get_current_weather\",\n                        \"description\": \"Get the current weather in a given location\",\n                        \"parameters\": {\n                          \"type\": \"object\",\n                          \"properties\": {\n                            \"location\": {\n                              \"type\": \"string\",\n                              \"description\": \"The city and state, e.g. San Francisco, CA\"\n                            },\n                            \"unit\": {\n                              \"type\": \"string\",\n                              \"enum\": [\"celsius\", \"fahrenheit\"]\n                            }\n                          },\n                          \"required\": [\"location\", \"unit\"]\n                        }\n                      }\n                    ],\n                    \"tool_choice\": \"auto\"\n                  }'\n              python: |-\n                from openai import OpenAI\n\n                client = OpenAI(\n                    api_key=\"My API Key\",\n                )\n                response = client.responses.create()\n                print(response.id)\n              javascript: |\n                import OpenAI from \"openai\";\n\n                const openai = new OpenAI();\n\n                const tools = [\n                    {\n                        type: \"function\",\n                        name: \"get_current_weather\",\n                        description: \"Get the current weather in a given location\",\n                        parameters: {\n                            type: \"object\",\n                            properties: {\n                                location: {\n                                    type: \"string\",\n                                    description: \"The city and state, e.g. San Francisco, CA\",\n                                },\n                                unit: { type: \"string\", enum: [\"celsius\", \"fahrenheit\"] },\n                            },\n                            required: [\"location\", \"unit\"],\n                        },\n                    },\n                ];\n\n                const response = await openai.responses.create({\n                    model: \"gpt-4.1\",\n                    tools: tools,\n                    input: \"What is the weather like in Boston today?\",\n                    tool_choice: \"auto\",\n                });\n\n                console.log(response);\n              csharp: |\n                using System;\n                using OpenAI.Responses;\n\n                OpenAIResponseClient client = new(\n                    model: \"gpt-4.1\",\n                    apiKey: Environment.GetEnvironmentVariable(\"OPENAI_API_KEY\")\n                );\n\n                ResponseTool getCurrentWeatherFunctionTool = ResponseTool.CreateFunctionTool(\n                    functionName: \"get_current_weather\",\n                    functionDescription: \"Get the current weather in a given location\",\n                    functionParameters: BinaryData.FromString(\"\"\"\n                        {\n                            \"type\": \"object\",\n                            \"properties\": {\n                                \"location\": {\n                                    \"type\": \"string\",\n                                    \"description\": \"The city and state, e.g. San Francisco, CA\"\n                                },\n                                \"unit\": {\"type\": \"string\", \"enum\": [\"celsius\", \"fahrenheit\"]}\n                            },\n                            \"required\": [\"location\", \"unit\"]\n                        }\n                        \"\"\"\n                    )\n                );\n\n                string userInputText = \"What is the weather like in Boston today?\";\n\n                ResponseCreationOptions options = new()\n                {\n                    Tools =\n                    {\n                        getCurrentWeatherFunctionTool\n                    },\n                    ToolChoice = ResponseToolChoice.CreateAutoChoice(),\n                };\n\n                OpenAIResponse response = client.CreateResponse(userInputText, options);\n              node.js: |-\n                import OpenAI from 'openai';\n\n                const client = new OpenAI({\n                  apiKey: 'My API Key',\n                });\n\n                const response = await client.responses.create();\n\n                console.log(response.id);\n              go: |\n                package main\n\n                import (\n                  \"context\"\n                  \"fmt\"\n\n                  \"github.com/openai/openai-go\"\n                  \"github.com/openai/openai-go/option\"\n                  \"github.com/openai/openai-go/responses\"\n                )\n\n                func main() {\n                  client := openai.NewClient(\n                    option.WithAPIKey(\"My API Key\"),\n                  )\n                  response, err := client.Responses.New(context.TODO(), responses.ResponseNewParams{\n\n                  })\n                  if err != nil {\n                    panic(err.Error())\n                  }\n                  fmt.Printf(\"%+v\\n\", response.ID)\n                }\n              java: |-\n                package com.openai.example;\n\n                import com.openai.client.OpenAIClient;\n                import com.openai.client.okhttp.OpenAIOkHttpClient;\n                import com.openai.models.responses.Response;\n                import com.openai.models.responses.ResponseCreateParams;\n\n                public final class Main {\n                    private Main() {}\n\n                    public static void main(String[] args) {\n                        OpenAIClient client = OpenAIOkHttpClient.fromEnv();\n\n                        Response response = client.responses().create();\n                    }\n                }\n              ruby: |-\n                require \"openai\"\n\n                openai = OpenAI::Client.new(api_key: \"My API Key\")\n\n                response = openai.responses.create\n\n                puts(response)\n            response: |\n              {\n                \"id\": \"resp_67ca09c5efe0819096d0511c92b8c890096610f474011cc0\",\n                \"object\": \"response\",\n                \"created_at\": 1741294021,\n                \"status\": \"completed\",\n                \"error\": null,\n                \"incomplete_details\": null,\n                \"instructions\": null,\n                \"max_output_tokens\": null,\n                \"model\": \"gpt-4.1-2025-04-14\",\n                \"output\": [\n                  {\n                    \"type\": \"function_call\",\n                    \"id\": \"fc_67ca09c6bedc8190a7abfec07b1a1332096610f474011cc0\",\n                    \"call_id\": \"call_unLAR8MvFNptuiZK6K6HCy5k\",\n                    \"name\": \"get_current_weather\",\n                    \"arguments\": \"{\\\"location\\\":\\\"Boston, MA\\\",\\\"unit\\\":\\\"celsius\\\"}\",\n                    \"status\": \"completed\"\n                  }\n                ],\n                \"parallel_tool_calls\": true,\n                \"previous_response_id\": null,\n                \"reasoning\": {\n                  \"effort\": null,\n                  \"summary\": null\n                },\n                \"store\": true,\n                \"temperature\": 1.0,\n                \"text\": {\n                  \"format\": {\n                    \"type\": \"text\"\n                  }\n                },\n                \"tool_choice\": \"auto\",\n                \"tools\": [\n                  {\n                    \"type\": \"function\",\n                    \"description\": \"Get the current weather in a given location\",\n                    \"name\": \"get_current_weather\",\n                    \"parameters\": {\n                      \"type\": \"object\",\n                      \"properties\": {\n                        \"location\": {\n                          \"type\": \"string\",\n                          \"description\": \"The city and state, e.g. San Francisco, CA\"\n                        },\n                        \"unit\": {\n                          \"type\": \"string\",\n                          \"enum\": [\n                            \"celsius\",\n                            \"fahrenheit\"\n                          ]\n                        }\n                      },\n                      \"required\": [\n                        \"location\",\n                        \"unit\"\n                      ]\n                    },\n                    \"strict\": true\n                  }\n                ],\n                \"top_p\": 1.0,\n                \"truncation\": \"disabled\",\n                \"usage\": {\n                  \"input_tokens\": 291,\n                  \"output_tokens\": 23,\n                  \"output_tokens_details\": {\n                    \"reasoning_tokens\": 0\n                  },\n                  \"total_tokens\": 314\n                },\n                \"user\": null,\n                \"metadata\": {}\n              }\n          - title: Reasoning\n            request:\n              curl: |\n                curl https://api.openai.com/v1/responses \\\n                  -H \"Content-Type: application/json\" \\\n                  -H \"Authorization: Bearer $OPENAI_API_KEY\" \\\n                  -d '{\n                    \"model\": \"o3-mini\",\n                    \"input\": \"How much wood would a woodchuck chuck?\",\n                    \"reasoning\": {\n                      \"effort\": \"high\"\n                    }\n                  }'\n              javascript: |\n                import OpenAI from \"openai\";\n                const openai = new OpenAI();\n\n                const response = await openai.responses.create({\n                    model: \"o3-mini\",\n                    input: \"How much wood would a woodchuck chuck?\",\n                    reasoning: {\n                      effort: \"high\"\n                    }\n                });\n\n                console.log(response);\n              python: |-\n                from openai import OpenAI\n\n                client = OpenAI(\n                    api_key=\"My API Key\",\n                )\n                response = client.responses.create()\n                print(response.id)\n              csharp: |\n                using System;\n                using OpenAI.Responses;\n\n                OpenAIResponseClient client = new(\n                    model: \"o3-mini\",\n                    apiKey: Environment.GetEnvironmentVariable(\"OPENAI_API_KEY\")\n                );\n\n                string userInputText = \"How much wood would a woodchuck chuck?\";\n\n                ResponseCreationOptions options = new()\n                {\n                    ReasoningOptions = new()\n                    {\n                        ReasoningEffortLevel = ResponseReasoningEffortLevel.High,\n                    },\n                };\n\n                OpenAIResponse response = client.CreateResponse(userInputText, options);\n\n                Console.WriteLine(response.GetOutputText());\n              node.js: |-\n                import OpenAI from 'openai';\n\n                const client = new OpenAI({\n                  apiKey: 'My API Key',\n                });\n\n                const response = await client.responses.create();\n\n                console.log(response.id);\n              go: |\n                package main\n\n                import (\n                  \"context\"\n                  \"fmt\"\n\n                  \"github.com/openai/openai-go\"\n                  \"github.com/openai/openai-go/option\"\n                  \"github.com/openai/openai-go/responses\"\n                )\n\n                func main() {\n                  client := openai.NewClient(\n                    option.WithAPIKey(\"My API Key\"),\n                  )\n                  response, err := client.Responses.New(context.TODO(), responses.ResponseNewParams{\n\n                  })\n                  if err != nil {\n                    panic(err.Error())\n                  }\n                  fmt.Printf(\"%+v\\n\", response.ID)\n                }\n              java: |-\n                package com.openai.example;\n\n                import com.openai.client.OpenAIClient;\n                import com.openai.client.okhttp.OpenAIOkHttpClient;\n                import com.openai.models.responses.Response;\n                import com.openai.models.responses.ResponseCreateParams;\n\n                public final class Main {\n                    private Main() {}\n\n                    public static void main(String[] args) {\n                        OpenAIClient client = OpenAIOkHttpClient.fromEnv();\n\n                        Response response = client.responses().create();\n                    }\n                }\n              ruby: |-\n                require \"openai\"\n\n                openai = OpenAI::Client.new(api_key: \"My API Key\")\n\n                response = openai.responses.create\n\n                puts(response)\n            response: |\n              {\n                \"id\": \"resp_67ccd7eca01881908ff0b5146584e408072912b2993db808\",\n                \"object\": \"response\",\n                \"created_at\": 1741477868,\n                \"status\": \"completed\",\n                \"error\": null,\n                \"incomplete_details\": null,\n                \"instructions\": null,\n                \"max_output_tokens\": null,\n                \"model\": \"o1-2024-12-17\",\n                \"output\": [\n                  {\n                    \"type\": \"message\",\n                    \"id\": \"msg_67ccd7f7b5848190a6f3e95d809f6b44072912b2993db808\",\n                    \"status\": \"completed\",\n                    \"role\": \"assistant\",\n                    \"content\": [\n                      {\n                        \"type\": \"output_text\",\n                        \"text\": \"The classic tongue twister...\",\n                        \"annotations\": []\n                      }\n                    ]\n                  }\n                ],\n                \"parallel_tool_calls\": true,\n                \"previous_response_id\": null,\n                \"reasoning\": {\n                  \"effort\": \"high\",\n                  \"summary\": null\n                },\n                \"store\": true,\n                \"temperature\": 1.0,\n                \"text\": {\n                  \"format\": {\n                    \"type\": \"text\"\n                  }\n                },\n                \"tool_choice\": \"auto\",\n                \"tools\": [],\n                \"top_p\": 1.0,\n                \"truncation\": \"disabled\",\n                \"usage\": {\n                  \"input_tokens\": 81,\n                  \"input_tokens_details\": {\n                    \"cached_tokens\": 0\n                  },\n                  \"output_tokens\": 1035,\n                  \"output_tokens_details\": {\n                    \"reasoning_tokens\": 832\n                  },\n                  \"total_tokens\": 1116\n                },\n                \"user\": null,\n                \"metadata\": {}\n              }\n      description: >\n        Creates a model response. Provide [text](https://platform.openai.com/docs/guides/text) or\n\n        [image](https://platform.openai.com/docs/guides/images) inputs to generate\n        [text](https://platform.openai.com/docs/guides/text)\n\n        or [JSON](https://platform.openai.com/docs/guides/structured-outputs) outputs. Have the model call\n\n        your own [custom code](https://platform.openai.com/docs/guides/function-calling) or use built-in\n\n        [tools](https://platform.openai.com/docs/guides/tools) like [web\n        search](https://platform.openai.com/docs/guides/tools-web-search)\n\n        or [file search](https://platform.openai.com/docs/guides/tools-file-search) to use your own data\n\n        as input for the model's response.\n  /responses/{response_id}:\n    get:\n      operationId: getResponse\n      tags:\n        - Responses\n      summary: Get a model response\n      parameters:\n        - in: path\n          name: response_id\n          required: true\n          schema:\n            type: string\n            example: resp_677efb5139a88190b512bc3fef8e535d\n          description: The ID of the response to retrieve.\n        - in: query\n          name: include\n          schema:\n            type: array\n            items:\n              $ref: '#/components/schemas/Includable'\n          description: |\n            Additional fields to include in the response. See the `include`\n            parameter for Response creation above for more information.\n        - in: query\n          name: stream\n          schema:\n            type: boolean\n          description: >\n            If set to true, the model response data will be streamed to the client\n\n            as it is generated using [server-sent\n            events](https://developer.mozilla.org/en-US/docs/Web/API/Server-sent_events/Using_server-sent_events#Event_stream_format).\n\n            See the [Streaming section\n            below](https://platform.openai.com/docs/api-reference/responses-streaming)\n\n            for more information.\n        - in: query\n          name: starting_after\n          schema:\n            type: integer\n          description: |\n            The sequence number of the event after which to start streaming.\n        - in: query\n          name: include_obfuscation\n          schema:\n            type: boolean\n          description: |\n            When true, stream obfuscation will be enabled. Stream obfuscation adds\n            random characters to an `obfuscation` field on streaming delta events\n            to normalize payload sizes as a mitigation to certain side-channel\n            attacks. These obfuscation fields are included by default, but add a\n            small amount of overhead to the data stream. You can set\n            `include_obfuscation` to false to optimize for bandwidth if you trust\n            the network links between your application and the OpenAI API.\n      responses:\n        '200':\n          description: OK\n          content:\n            application/json:\n              schema:\n                $ref: '#/components/schemas/Response'\n      x-oaiMeta:\n        name: Get a model response\n        group: responses\n        returns: |\n          The [Response](https://platform.openai.com/docs/api-reference/responses/object) object matching the\n          specified ID.\n        examples:\n          response: |\n            {\n              \"id\": \"resp_67cb71b351908190a308f3859487620d06981a8637e6bc44\",\n              \"object\": \"response\",\n              \"created_at\": 1741386163,\n              \"status\": \"completed\",\n              \"error\": null,\n              \"incomplete_details\": null,\n              \"instructions\": null,\n              \"max_output_tokens\": null,\n              \"model\": \"gpt-4o-2024-08-06\",\n              \"output\": [\n                {\n                  \"type\": \"message\",\n                  \"id\": \"msg_67cb71b3c2b0819084d481baaaf148f206981a8637e6bc44\",\n                  \"status\": \"completed\",\n                  \"role\": \"assistant\",\n                  \"content\": [\n                    {\n                      \"type\": \"output_text\",\n                      \"text\": \"Silent circuits hum,  \\nThoughts emerge in data streams—  \\nDigital dawn breaks.\",\n                      \"annotations\": []\n                    }\n                  ]\n                }\n              ],\n              \"parallel_tool_calls\": true,\n              \"previous_response_id\": null,\n              \"reasoning\": {\n                \"effort\": null,\n                \"summary\": null\n              },\n              \"store\": true,\n              \"temperature\": 1.0,\n              \"text\": {\n                \"format\": {\n                  \"type\": \"text\"\n                }\n              },\n              \"tool_choice\": \"auto\",\n              \"tools\": [],\n              \"top_p\": 1.0,\n              \"truncation\": \"disabled\",\n              \"usage\": {\n                \"input_tokens\": 32,\n                \"input_tokens_details\": {\n                  \"cached_tokens\": 0\n                },\n                \"output_tokens\": 18,\n                \"output_tokens_details\": {\n                  \"reasoning_tokens\": 0\n                },\n                \"total_tokens\": 50\n              },\n              \"user\": null,\n              \"metadata\": {}\n            }\n          request:\n            curl: |\n              curl https://api.openai.com/v1/responses/resp_123 \\\n                  -H \"Content-Type: application/json\" \\\n                  -H \"Authorization: Bearer $OPENAI_API_KEY\"\n            javascript: |\n              import OpenAI from \"openai\";\n              const client = new OpenAI();\n\n              const response = await client.responses.retrieve(\"resp_123\");\n              console.log(response);\n            python: |-\n              from openai import OpenAI\n\n              client = OpenAI(\n                  api_key=\"My API Key\",\n              )\n              response = client.responses.retrieve(\n                  response_id=\"resp_677efb5139a88190b512bc3fef8e535d\",\n              )\n              print(response.id)\n            node.js: |-\n              import OpenAI from 'openai';\n\n              const client = new OpenAI({\n                apiKey: 'My API Key',\n              });\n\n              const response = await client.responses.retrieve('resp_677efb5139a88190b512bc3fef8e535d');\n\n              console.log(response.id);\n            go: |\n              package main\n\n              import (\n                \"context\"\n                \"fmt\"\n\n                \"github.com/openai/openai-go\"\n                \"github.com/openai/openai-go/option\"\n                \"github.com/openai/openai-go/responses\"\n              )\n\n              func main() {\n                client := openai.NewClient(\n                  option.WithAPIKey(\"My API Key\"),\n                )\n                response, err := client.Responses.Get(\n                  context.TODO(),\n                  \"resp_677efb5139a88190b512bc3fef8e535d\",\n                  responses.ResponseGetParams{\n\n                  },\n                )\n                if err != nil {\n                  panic(err.Error())\n                }\n                fmt.Printf(\"%+v\\n\", response.ID)\n              }\n            java: |-\n              package com.openai.example;\n\n              import com.openai.client.OpenAIClient;\n              import com.openai.client.okhttp.OpenAIOkHttpClient;\n              import com.openai.models.responses.Response;\n              import com.openai.models.responses.ResponseRetrieveParams;\n\n              public final class Main {\n                  private Main() {}\n\n                  public static void main(String[] args) {\n                      OpenAIClient client = OpenAIOkHttpClient.fromEnv();\n\n                      Response response = client.responses().retrieve(\"resp_677efb5139a88190b512bc3fef8e535d\");\n                  }\n              }\n            ruby: |-\n              require \"openai\"\n\n              openai = OpenAI::Client.new(api_key: \"My API Key\")\n\n              response = openai.responses.retrieve(\"resp_677efb5139a88190b512bc3fef8e535d\")\n\n              puts(response)\n      description: |\n        Retrieves a model response with the given ID.\n    delete:\n      operationId: deleteResponse\n      tags:\n        - Responses\n      summary: Delete a model response\n      parameters:\n        - in: path\n          name: response_id\n          required: true\n          schema:\n            type: string\n            example: resp_677efb5139a88190b512bc3fef8e535d\n          description: The ID of the response to delete.\n      responses:\n        '200':\n          description: OK\n        '404':\n          description: Not Found\n          content:\n            application/json:\n              schema:\n                $ref: '#/components/schemas/Error'\n      x-oaiMeta:\n        name: Delete a model response\n        group: responses\n        returns: |\n          A success message.\n        examples:\n          response: |\n            {\n              \"id\": \"resp_6786a1bec27481909a17d673315b29f6\",\n              \"object\": \"response\",\n              \"deleted\": true\n            }\n          request:\n            curl: |\n              curl -X DELETE https://api.openai.com/v1/responses/resp_123 \\\n                  -H \"Content-Type: application/json\" \\\n                  -H \"Authorization: Bearer $OPENAI_API_KEY\"\n            javascript: |\n              import OpenAI from \"openai\";\n              const client = new OpenAI();\n\n              const response = await client.responses.delete(\"resp_123\");\n              console.log(response);\n            python: |-\n              from openai import OpenAI\n\n              client = OpenAI(\n                  api_key=\"My API Key\",\n              )\n              client.responses.delete(\n                  \"resp_677efb5139a88190b512bc3fef8e535d\",\n              )\n            node.js: |-\n              import OpenAI from 'openai';\n\n              const client = new OpenAI({\n                apiKey: 'My API Key',\n              });\n\n              await client.responses.delete('resp_677efb5139a88190b512bc3fef8e535d');\n            go: |\n              package main\n\n              import (\n                \"context\"\n\n                \"github.com/openai/openai-go\"\n                \"github.com/openai/openai-go/option\"\n              )\n\n              func main() {\n                client := openai.NewClient(\n                  option.WithAPIKey(\"My API Key\"),\n                )\n                err := client.Responses.Delete(context.TODO(), \"resp_677efb5139a88190b512bc3fef8e535d\")\n                if err != nil {\n                  panic(err.Error())\n                }\n              }\n            java: |-\n              package com.openai.example;\n\n              import com.openai.client.OpenAIClient;\n              import com.openai.client.okhttp.OpenAIOkHttpClient;\n              import com.openai.models.responses.ResponseDeleteParams;\n\n              public final class Main {\n                  private Main() {}\n\n                  public static void main(String[] args) {\n                      OpenAIClient client = OpenAIOkHttpClient.fromEnv();\n\n                      client.responses().delete(\"resp_677efb5139a88190b512bc3fef8e535d\");\n                  }\n              }\n            ruby: |-\n              require \"openai\"\n\n              openai = OpenAI::Client.new(api_key: \"My API Key\")\n\n              result = openai.responses.delete(\"resp_677efb5139a88190b512bc3fef8e535d\")\n\n              puts(result)\n      description: |\n        Deletes a model response with the given ID.\n  /responses/{response_id}/cancel:\n    post:\n      operationId: cancelResponse\n      tags:\n        - Responses\n      summary: Cancel a response\n      parameters:\n        - in: path\n          name: response_id\n          required: true\n          schema:\n            type: string\n            example: resp_677efb5139a88190b512bc3fef8e535d\n          description: The ID of the response to cancel.\n      responses:\n        '200':\n          description: OK\n          content:\n            application/json:\n              schema:\n                $ref: '#/components/schemas/Response'\n        '404':\n          description: Not Found\n          content:\n            application/json:\n              schema:\n                $ref: '#/components/schemas/Error'\n      x-oaiMeta:\n        name: Cancel a response\n        group: responses\n        returns: |\n          A [Response](https://platform.openai.com/docs/api-reference/responses/object) object.\n        examples:\n          response: |\n            {\n              \"id\": \"resp_67cb71b351908190a308f3859487620d06981a8637e6bc44\",\n              \"object\": \"response\",\n              \"created_at\": 1741386163,\n              \"status\": \"completed\",\n              \"error\": null,\n              \"incomplete_details\": null,\n              \"instructions\": null,\n              \"max_output_tokens\": null,\n              \"model\": \"gpt-4o-2024-08-06\",\n              \"output\": [\n                {\n                  \"type\": \"message\",\n                  \"id\": \"msg_67cb71b3c2b0819084d481baaaf148f206981a8637e6bc44\",\n                  \"status\": \"completed\",\n                  \"role\": \"assistant\",\n                  \"content\": [\n                    {\n                      \"type\": \"output_text\",\n                      \"text\": \"Silent circuits hum,  \\nThoughts emerge in data streams—  \\nDigital dawn breaks.\",\n                      \"annotations\": []\n                    }\n                  ]\n                }\n              ],\n              \"parallel_tool_calls\": true,\n              \"previous_response_id\": null,\n              \"reasoning\": {\n                \"effort\": null,\n                \"summary\": null\n              },\n              \"store\": true,\n              \"temperature\": 1.0,\n              \"text\": {\n                \"format\": {\n                  \"type\": \"text\"\n                }\n              },\n              \"tool_choice\": \"auto\",\n              \"tools\": [],\n              \"top_p\": 1.0,\n              \"truncation\": \"disabled\",\n              \"usage\": {\n                \"input_tokens\": 32,\n                \"input_tokens_details\": {\n                  \"cached_tokens\": 0\n                },\n                \"output_tokens\": 18,\n                \"output_tokens_details\": {\n                  \"reasoning_tokens\": 0\n                },\n                \"total_tokens\": 50\n              },\n              \"user\": null,\n              \"metadata\": {}\n            }\n          request:\n            curl: |\n              curl -X POST https://api.openai.com/v1/responses/resp_123/cancel \\\n                  -H \"Content-Type: application/json\" \\\n                  -H \"Authorization: Bearer $OPENAI_API_KEY\"\n            javascript: |\n              import OpenAI from \"openai\";\n              const client = new OpenAI();\n\n              const response = await client.responses.cancel(\"resp_123\");\n              console.log(response);\n            python: |-\n              from openai import OpenAI\n\n              client = OpenAI(\n                  api_key=\"My API Key\",\n              )\n              response = client.responses.cancel(\n                  \"resp_677efb5139a88190b512bc3fef8e535d\",\n              )\n              print(response.id)\n            node.js: |-\n              import OpenAI from 'openai';\n\n              const client = new OpenAI({\n                apiKey: 'My API Key',\n              });\n\n              const response = await client.responses.cancel('resp_677efb5139a88190b512bc3fef8e535d');\n\n              console.log(response.id);\n            go: |\n              package main\n\n              import (\n                \"context\"\n                \"fmt\"\n\n                \"github.com/openai/openai-go\"\n                \"github.com/openai/openai-go/option\"\n              )\n\n              func main() {\n                client := openai.NewClient(\n                  option.WithAPIKey(\"My API Key\"),\n                )\n                response, err := client.Responses.Cancel(context.TODO(), \"resp_677efb5139a88190b512bc3fef8e535d\")\n                if err != nil {\n                  panic(err.Error())\n                }\n                fmt.Printf(\"%+v\\n\", response.ID)\n              }\n            java: |-\n              package com.openai.example;\n\n              import com.openai.client.OpenAIClient;\n              import com.openai.client.okhttp.OpenAIOkHttpClient;\n              import com.openai.models.responses.Response;\n              import com.openai.models.responses.ResponseCancelParams;\n\n              public final class Main {\n                  private Main() {}\n\n                  public static void main(String[] args) {\n                      OpenAIClient client = OpenAIOkHttpClient.fromEnv();\n\n                      Response response = client.responses().cancel(\"resp_677efb5139a88190b512bc3fef8e535d\");\n                  }\n              }\n            ruby: |-\n              require \"openai\"\n\n              openai = OpenAI::Client.new(api_key: \"My API Key\")\n\n              response = openai.responses.cancel(\"resp_677efb5139a88190b512bc3fef8e535d\")\n\n              puts(response)\n      description: |\n        Cancels a model response with the given ID. Only responses created with\n        the `background` parameter set to `true` can be cancelled.\n        [Learn more](https://platform.openai.com/docs/guides/background).\n  /responses/{response_id}/input_items:\n    get:\n      operationId: listInputItems\n      tags:\n        - Responses\n      summary: List input items\n      parameters:\n        - in: path\n          name: response_id\n          required: true\n          schema:\n            type: string\n          description: The ID of the response to retrieve input items for.\n        - name: limit\n          in: query\n          description: |\n            A limit on the number of objects to be returned. Limit can range between\n            1 and 100, and the default is 20.\n          required: false\n          schema:\n            type: integer\n            default: 20\n        - in: query\n          name: order\n          schema:\n            type: string\n            enum:\n              - asc\n              - desc\n          description: |\n            The order to return the input items in. Default is `desc`.\n            - `asc`: Return the input items in ascending order.\n            - `desc`: Return the input items in descending order.\n        - in: query\n          name: after\n          schema:\n            type: string\n          description: |\n            An item ID to list items after, used in pagination.\n        - in: query\n          name: before\n          schema:\n            type: string\n          description: |\n            An item ID to list items before, used in pagination.\n        - in: query\n          name: include\n          schema:\n            type: array\n            items:\n              $ref: '#/components/schemas/Includable'\n          description: |\n            Additional fields to include in the response. See the `include`\n            parameter for Response creation above for more information.\n      responses:\n        '200':\n          description: OK\n          content:\n            application/json:\n              schema:\n                $ref: '#/components/schemas/ResponseItemList'\n      x-oaiMeta:\n        name: List input items\n        group: responses\n        returns: A list of input item objects.\n        examples:\n          response: |\n            {\n              \"object\": \"list\",\n              \"data\": [\n                {\n                  \"id\": \"msg_abc123\",\n                  \"type\": \"message\",\n                  \"role\": \"user\",\n                  \"content\": [\n                    {\n                      \"type\": \"input_text\",\n                      \"text\": \"Tell me a three sentence bedtime story about a unicorn.\"\n                    }\n                  ]\n                }\n              ],\n              \"first_id\": \"msg_abc123\",\n              \"last_id\": \"msg_abc123\",\n              \"has_more\": false\n            }\n          request:\n            curl: |\n              curl https://api.openai.com/v1/responses/resp_abc123/input_items \\\n                -H \"Content-Type: application/json\" \\\n                -H \"Authorization: Bearer $OPENAI_API_KEY\"\n            javascript: |\n              import OpenAI from \"openai\";\n              const client = new OpenAI();\n\n              const response = await client.responses.inputItems.list(\"resp_123\");\n              console.log(response.data);\n            python: |-\n              from openai import OpenAI\n\n              client = OpenAI(\n                  api_key=\"My API Key\",\n              )\n              page = client.responses.input_items.list(\n                  response_id=\"response_id\",\n              )\n              page = page.data[0]\n              print(page)\n            node.js: |-\n              import OpenAI from 'openai';\n\n              const client = new OpenAI({\n                apiKey: 'My API Key',\n              });\n\n              // Automatically fetches more pages as needed.\n              for await (const responseItem of client.responses.inputItems.list('response_id')) {\n                console.log(responseItem);\n              }\n            go: |\n              package main\n\n              import (\n                \"context\"\n                \"fmt\"\n\n                \"github.com/openai/openai-go\"\n                \"github.com/openai/openai-go/option\"\n                \"github.com/openai/openai-go/responses\"\n              )\n\n              func main() {\n                client := openai.NewClient(\n                  option.WithAPIKey(\"My API Key\"),\n                )\n                page, err := client.Responses.InputItems.List(\n                  context.TODO(),\n                  \"response_id\",\n                  responses.InputItemListParams{\n\n                  },\n                )\n                if err != nil {\n                  panic(err.Error())\n                }\n                fmt.Printf(\"%+v\\n\", page)\n              }\n            java: |-\n              package com.openai.example;\n\n              import com.openai.client.OpenAIClient;\n              import com.openai.client.okhttp.OpenAIOkHttpClient;\n              import com.openai.models.responses.inputitems.InputItemListPage;\n              import com.openai.models.responses.inputitems.InputItemListParams;\n\n              public final class Main {\n                  private Main() {}\n\n                  public static void main(String[] args) {\n                      OpenAIClient client = OpenAIOkHttpClient.fromEnv();\n\n                      InputItemListPage page = client.responses().inputItems().list(\"response_id\");\n                  }\n              }\n            ruby: |-\n              require \"openai\"\n\n              openai = OpenAI::Client.new(api_key: \"My API Key\")\n\n              page = openai.responses.input_items.list(\"response_id\")\n\n              puts(page)\n      description: Returns a list of input items for a given response.\n  /threads:\n    post:\n      operationId: createThread\n      tags:\n        - Assistants\n      summary: Create thread\n      requestBody:\n        content:\n          application/json:\n            schema:\n              $ref: '#/components/schemas/CreateThreadRequest'\n      responses:\n        '200':\n          description: OK\n          content:\n            application/json:\n              schema:\n                $ref: '#/components/schemas/ThreadObject'\n      x-oaiMeta:\n        name: Create thread\n        group: threads\n        beta: true\n        returns: A [thread](https://platform.openai.com/docs/api-reference/threads) object.\n        examples:\n          - title: Empty\n            request:\n              curl: |\n                curl https://api.openai.com/v1/threads \\\n                  -H \"Content-Type: application/json\" \\\n                  -H \"Authorization: Bearer $OPENAI_API_KEY\" \\\n                  -H \"OpenAI-Beta: assistants=v2\" \\\n                  -d ''\n              python: |-\n                from openai import OpenAI\n\n                client = OpenAI(\n                    api_key=\"My API Key\",\n                )\n                thread = client.beta.threads.create()\n                print(thread.id)\n              node.js: |-\n                import OpenAI from 'openai';\n\n                const client = new OpenAI({\n                  apiKey: 'My API Key',\n                });\n\n                const thread = await client.beta.threads.create();\n\n                console.log(thread.id);\n              go: |\n                package main\n\n                import (\n                  \"context\"\n                  \"fmt\"\n\n                  \"github.com/openai/openai-go\"\n                  \"github.com/openai/openai-go/option\"\n                )\n\n                func main() {\n                  client := openai.NewClient(\n                    option.WithAPIKey(\"My API Key\"),\n                  )\n                  thread, err := client.Beta.Threads.New(context.TODO(), openai.BetaThreadNewParams{\n\n                  })\n                  if err != nil {\n                    panic(err.Error())\n                  }\n                  fmt.Printf(\"%+v\\n\", thread.ID)\n                }\n              java: |-\n                package com.openai.example;\n\n                import com.openai.client.OpenAIClient;\n                import com.openai.client.okhttp.OpenAIOkHttpClient;\n                import com.openai.models.beta.threads.Thread;\n                import com.openai.models.beta.threads.ThreadCreateParams;\n\n                public final class Main {\n                    private Main() {}\n\n                    public static void main(String[] args) {\n                        OpenAIClient client = OpenAIOkHttpClient.fromEnv();\n\n                        Thread thread = client.beta().threads().create();\n                    }\n                }\n              ruby: |-\n                require \"openai\"\n\n                openai = OpenAI::Client.new(api_key: \"My API Key\")\n\n                thread = openai.beta.threads.create\n\n                puts(thread)\n            response: |\n              {\n                \"id\": \"thread_abc123\",\n                \"object\": \"thread\",\n                \"created_at\": 1699012949,\n                \"metadata\": {},\n                \"tool_resources\": {}\n              }\n          - title: Messages\n            request:\n              curl: |\n                curl https://api.openai.com/v1/threads \\\n                -H \"Content-Type: application/json\" \\\n                -H \"Authorization: Bearer $OPENAI_API_KEY\" \\\n                -H \"OpenAI-Beta: assistants=v2\" \\\n                -d '{\n                    \"messages\": [{\n                      \"role\": \"user\",\n                      \"content\": \"Hello, what is AI?\"\n                    }, {\n                      \"role\": \"user\",\n                      \"content\": \"How does AI work? Explain it in simple terms.\"\n                    }]\n                  }'\n              python: |-\n                from openai import OpenAI\n\n                client = OpenAI(\n                    api_key=\"My API Key\",\n                )\n                thread = client.beta.threads.create()\n                print(thread.id)\n              node.js: |-\n                import OpenAI from 'openai';\n\n                const client = new OpenAI({\n                  apiKey: 'My API Key',\n                });\n\n                const thread = await client.beta.threads.create();\n\n                console.log(thread.id);\n              go: |\n                package main\n\n                import (\n                  \"context\"\n                  \"fmt\"\n\n                  \"github.com/openai/openai-go\"\n                  \"github.com/openai/openai-go/option\"\n                )\n\n                func main() {\n                  client := openai.NewClient(\n                    option.WithAPIKey(\"My API Key\"),\n                  )\n                  thread, err := client.Beta.Threads.New(context.TODO(), openai.BetaThreadNewParams{\n\n                  })\n                  if err != nil {\n                    panic(err.Error())\n                  }\n                  fmt.Printf(\"%+v\\n\", thread.ID)\n                }\n              java: |-\n                package com.openai.example;\n\n                import com.openai.client.OpenAIClient;\n                import com.openai.client.okhttp.OpenAIOkHttpClient;\n                import com.openai.models.beta.threads.Thread;\n                import com.openai.models.beta.threads.ThreadCreateParams;\n\n                public final class Main {\n                    private Main() {}\n\n                    public static void main(String[] args) {\n                        OpenAIClient client = OpenAIOkHttpClient.fromEnv();\n\n                        Thread thread = client.beta().threads().create();\n                    }\n                }\n              ruby: |-\n                require \"openai\"\n\n                openai = OpenAI::Client.new(api_key: \"My API Key\")\n\n                thread = openai.beta.threads.create\n\n                puts(thread)\n            response: |\n              {\n                \"id\": \"thread_abc123\",\n                \"object\": \"thread\",\n                \"created_at\": 1699014083,\n                \"metadata\": {},\n                \"tool_resources\": {}\n              }\n      description: Create a thread.\n  /threads/runs:\n    post:\n      operationId: createThreadAndRun\n      tags:\n        - Assistants\n      summary: Create thread and run\n      requestBody:\n        required: true\n        content:\n          application/json:\n            schema:\n              $ref: '#/components/schemas/CreateThreadAndRunRequest'\n      responses:\n        '200':\n          description: OK\n          content:\n            application/json:\n              schema:\n                $ref: '#/components/schemas/RunObject'\n      x-oaiMeta:\n        name: Create thread and run\n        group: threads\n        beta: true\n        returns: A [run](https://platform.openai.com/docs/api-reference/runs/object) object.\n        examples:\n          - title: Default\n            request:\n              curl: |\n                curl https://api.openai.com/v1/threads/runs \\\n                  -H \"Authorization: Bearer $OPENAI_API_KEY\" \\\n                  -H \"Content-Type: application/json\" \\\n                  -H \"OpenAI-Beta: assistants=v2\" \\\n                  -d '{\n                      \"assistant_id\": \"asst_abc123\",\n                      \"thread\": {\n                        \"messages\": [\n                          {\"role\": \"user\", \"content\": \"Explain deep learning to a 5 year old.\"}\n                        ]\n                      }\n                    }'\n              python: |-\n                from openai import OpenAI\n\n                client = OpenAI(\n                    api_key=\"My API Key\",\n                )\n                run = client.beta.threads.create_and_run(\n                    assistant_id=\"assistant_id\",\n                )\n                print(run.id)\n              node.js: |-\n                import OpenAI from 'openai';\n\n                const client = new OpenAI({\n                  apiKey: 'My API Key',\n                });\n\n                const run = await client.beta.threads.createAndRun({ assistant_id: 'assistant_id' });\n\n                console.log(run.id);\n              go: |\n                package main\n\n                import (\n                  \"context\"\n                  \"fmt\"\n\n                  \"github.com/openai/openai-go\"\n                  \"github.com/openai/openai-go/option\"\n                )\n\n                func main() {\n                  client := openai.NewClient(\n                    option.WithAPIKey(\"My API Key\"),\n                  )\n                  run, err := client.Beta.Threads.NewAndRun(context.TODO(), openai.BetaThreadNewAndRunParams{\n                    AssistantID: \"assistant_id\",\n                  })\n                  if err != nil {\n                    panic(err.Error())\n                  }\n                  fmt.Printf(\"%+v\\n\", run.ID)\n                }\n              java: |-\n                package com.openai.example;\n\n                import com.openai.client.OpenAIClient;\n                import com.openai.client.okhttp.OpenAIOkHttpClient;\n                import com.openai.models.beta.threads.ThreadCreateAndRunParams;\n                import com.openai.models.beta.threads.runs.Run;\n\n                public final class Main {\n                    private Main() {}\n\n                    public static void main(String[] args) {\n                        OpenAIClient client = OpenAIOkHttpClient.fromEnv();\n\n                        ThreadCreateAndRunParams params = ThreadCreateAndRunParams.builder()\n                            .assistantId(\"assistant_id\")\n                            .build();\n                        Run run = client.beta().threads().createAndRun(params);\n                    }\n                }\n              ruby: |-\n                require \"openai\"\n\n                openai = OpenAI::Client.new(api_key: \"My API Key\")\n\n                run = openai.beta.threads.create_and_run(assistant_id: \"assistant_id\")\n\n                puts(run)\n            response: |\n              {\n                \"id\": \"run_abc123\",\n                \"object\": \"thread.run\",\n                \"created_at\": 1699076792,\n                \"assistant_id\": \"asst_abc123\",\n                \"thread_id\": \"thread_abc123\",\n                \"status\": \"queued\",\n                \"started_at\": null,\n                \"expires_at\": 1699077392,\n                \"cancelled_at\": null,\n                \"failed_at\": null,\n                \"completed_at\": null,\n                \"required_action\": null,\n                \"last_error\": null,\n                \"model\": \"gpt-4o\",\n                \"instructions\": \"You are a helpful assistant.\",\n                \"tools\": [],\n                \"tool_resources\": {},\n                \"metadata\": {},\n                \"temperature\": 1.0,\n                \"top_p\": 1.0,\n                \"max_completion_tokens\": null,\n                \"max_prompt_tokens\": null,\n                \"truncation_strategy\": {\n                  \"type\": \"auto\",\n                  \"last_messages\": null\n                },\n                \"incomplete_details\": null,\n                \"usage\": null,\n                \"response_format\": \"auto\",\n                \"tool_choice\": \"auto\",\n                \"parallel_tool_calls\": true\n              }\n          - title: Streaming\n            request:\n              curl: |\n                curl https://api.openai.com/v1/threads/runs \\\n                  -H \"Authorization: Bearer $OPENAI_API_KEY\" \\\n                  -H \"Content-Type: application/json\" \\\n                  -H \"OpenAI-Beta: assistants=v2\" \\\n                  -d '{\n                    \"assistant_id\": \"asst_123\",\n                    \"thread\": {\n                      \"messages\": [\n                        {\"role\": \"user\", \"content\": \"Hello\"}\n                      ]\n                    },\n                    \"stream\": true\n                  }'\n              python: |-\n                from openai import OpenAI\n\n                client = OpenAI(\n                    api_key=\"My API Key\",\n                )\n                run = client.beta.threads.create_and_run(\n                    assistant_id=\"assistant_id\",\n                )\n                print(run.id)\n              node.js: |-\n                import OpenAI from 'openai';\n\n                const client = new OpenAI({\n                  apiKey: 'My API Key',\n                });\n\n                const run = await client.beta.threads.createAndRun({ assistant_id: 'assistant_id' });\n\n                console.log(run.id);\n              go: |\n                package main\n\n                import (\n                  \"context\"\n                  \"fmt\"\n\n                  \"github.com/openai/openai-go\"\n                  \"github.com/openai/openai-go/option\"\n                )\n\n                func main() {\n                  client := openai.NewClient(\n                    option.WithAPIKey(\"My API Key\"),\n                  )\n                  run, err := client.Beta.Threads.NewAndRun(context.TODO(), openai.BetaThreadNewAndRunParams{\n                    AssistantID: \"assistant_id\",\n                  })\n                  if err != nil {\n                    panic(err.Error())\n                  }\n                  fmt.Printf(\"%+v\\n\", run.ID)\n                }\n              java: |-\n                package com.openai.example;\n\n                import com.openai.client.OpenAIClient;\n                import com.openai.client.okhttp.OpenAIOkHttpClient;\n                import com.openai.models.beta.threads.ThreadCreateAndRunParams;\n                import com.openai.models.beta.threads.runs.Run;\n\n                public final class Main {\n                    private Main() {}\n\n                    public static void main(String[] args) {\n                        OpenAIClient client = OpenAIOkHttpClient.fromEnv();\n\n                        ThreadCreateAndRunParams params = ThreadCreateAndRunParams.builder()\n                            .assistantId(\"assistant_id\")\n                            .build();\n                        Run run = client.beta().threads().createAndRun(params);\n                    }\n                }\n              ruby: |-\n                require \"openai\"\n\n                openai = OpenAI::Client.new(api_key: \"My API Key\")\n\n                run = openai.beta.threads.create_and_run(assistant_id: \"assistant_id\")\n\n                puts(run)\n            response: >\n              event: thread.created\n\n              data: {\"id\":\"thread_123\",\"object\":\"thread\",\"created_at\":1710348075,\"metadata\":{}}\n\n\n              event: thread.run.created\n\n              data:\n              {\"id\":\"run_123\",\"object\":\"thread.run\",\"created_at\":1710348075,\"assistant_id\":\"asst_123\",\"thread_id\":\"thread_123\",\"status\":\"queued\",\"started_at\":null,\"expires_at\":1710348675,\"cancelled_at\":null,\"failed_at\":null,\"completed_at\":null,\"required_action\":null,\"last_error\":null,\"model\":\"gpt-4o\",\"instructions\":null,\"tools\":[],\"tool_resources\":{},\"metadata\":{},\"temperature\":1.0,\"top_p\":1.0,\"max_completion_tokens\":null,\"max_prompt_tokens\":null,\"truncation_strategy\":{\"type\":\"auto\",\"last_messages\":null},\"incomplete_details\":null,\"usage\":null,\"response_format\":\"auto\",\"tool_choice\":\"auto\",\"parallel_tool_calls\":true}\n\n\n              event: thread.run.queued\n\n              data:\n              {\"id\":\"run_123\",\"object\":\"thread.run\",\"created_at\":1710348075,\"assistant_id\":\"asst_123\",\"thread_id\":\"thread_123\",\"status\":\"queued\",\"started_at\":null,\"expires_at\":1710348675,\"cancelled_at\":null,\"failed_at\":null,\"completed_at\":null,\"required_action\":null,\"last_error\":null,\"model\":\"gpt-4o\",\"instructions\":null,\"tools\":[],\"tool_resources\":{},\"metadata\":{},\"temperature\":1.0,\"top_p\":1.0,\"max_completion_tokens\":null,\"max_prompt_tokens\":null,\"truncation_strategy\":{\"type\":\"auto\",\"last_messages\":null},\"incomplete_details\":null,\"usage\":null,\"response_format\":\"auto\",\"tool_choice\":\"auto\",\"parallel_tool_calls\":true}\n\n\n              event: thread.run.in_progress\n\n              data:\n              {\"id\":\"run_123\",\"object\":\"thread.run\",\"created_at\":1710348075,\"assistant_id\":\"asst_123\",\"thread_id\":\"thread_123\",\"status\":\"in_progress\",\"started_at\":null,\"expires_at\":1710348675,\"cancelled_at\":null,\"failed_at\":null,\"completed_at\":null,\"required_action\":null,\"last_error\":null,\"model\":\"gpt-4o\",\"instructions\":null,\"tools\":[],\"tool_resources\":{},\"metadata\":{},\"temperature\":1.0,\"top_p\":1.0,\"max_completion_tokens\":null,\"max_prompt_tokens\":null,\"truncation_strategy\":{\"type\":\"auto\",\"last_messages\":null},\"incomplete_details\":null,\"usage\":null,\"response_format\":\"auto\",\"tool_choice\":\"auto\",\"parallel_tool_calls\":true}\n\n\n              event: thread.run.step.created\n\n              data:\n              {\"id\":\"step_001\",\"object\":\"thread.run.step\",\"created_at\":1710348076,\"run_id\":\"run_123\",\"assistant_id\":\"asst_123\",\"thread_id\":\"thread_123\",\"type\":\"message_creation\",\"status\":\"in_progress\",\"cancelled_at\":null,\"completed_at\":null,\"expires_at\":1710348675,\"failed_at\":null,\"last_error\":null,\"step_details\":{\"type\":\"message_creation\",\"message_creation\":{\"message_id\":\"msg_001\"}},\"usage\":null}\n\n\n              event: thread.run.step.in_progress\n\n              data:\n              {\"id\":\"step_001\",\"object\":\"thread.run.step\",\"created_at\":1710348076,\"run_id\":\"run_123\",\"assistant_id\":\"asst_123\",\"thread_id\":\"thread_123\",\"type\":\"message_creation\",\"status\":\"in_progress\",\"cancelled_at\":null,\"completed_at\":null,\"expires_at\":1710348675,\"failed_at\":null,\"last_error\":null,\"step_details\":{\"type\":\"message_creation\",\"message_creation\":{\"message_id\":\"msg_001\"}},\"usage\":null}\n\n\n              event: thread.message.created\n\n              data:\n              {\"id\":\"msg_001\",\"object\":\"thread.message\",\"created_at\":1710348076,\"assistant_id\":\"asst_123\",\"thread_id\":\"thread_123\",\"run_id\":\"run_123\",\"status\":\"in_progress\",\"incomplete_details\":null,\"incomplete_at\":null,\"completed_at\":null,\"role\":\"assistant\",\"content\":[],\n              \"metadata\":{}}\n\n\n              event: thread.message.in_progress\n\n              data:\n              {\"id\":\"msg_001\",\"object\":\"thread.message\",\"created_at\":1710348076,\"assistant_id\":\"asst_123\",\"thread_id\":\"thread_123\",\"run_id\":\"run_123\",\"status\":\"in_progress\",\"incomplete_details\":null,\"incomplete_at\":null,\"completed_at\":null,\"role\":\"assistant\",\"content\":[],\n              \"metadata\":{}}\n\n\n              event: thread.message.delta\n\n              data:\n              {\"id\":\"msg_001\",\"object\":\"thread.message.delta\",\"delta\":{\"content\":[{\"index\":0,\"type\":\"text\",\"text\":{\"value\":\"Hello\",\"annotations\":[]}}]}}\n\n\n              ...\n\n\n              event: thread.message.delta\n\n              data:\n              {\"id\":\"msg_001\",\"object\":\"thread.message.delta\",\"delta\":{\"content\":[{\"index\":0,\"type\":\"text\",\"text\":{\"value\":\"\n              today\"}}]}}\n\n\n              event: thread.message.delta\n\n              data:\n              {\"id\":\"msg_001\",\"object\":\"thread.message.delta\",\"delta\":{\"content\":[{\"index\":0,\"type\":\"text\",\"text\":{\"value\":\"?\"}}]}}\n\n\n              event: thread.message.completed\n\n              data:\n              {\"id\":\"msg_001\",\"object\":\"thread.message\",\"created_at\":1710348076,\"assistant_id\":\"asst_123\",\"thread_id\":\"thread_123\",\"run_id\":\"run_123\",\"status\":\"completed\",\"incomplete_details\":null,\"incomplete_at\":null,\"completed_at\":1710348077,\"role\":\"assistant\",\"content\":[{\"type\":\"text\",\"text\":{\"value\":\"Hello!\n              How can I assist you today?\",\"annotations\":[]}}], \"metadata\":{}}\n\n\n              event: thread.run.step.completed\n\n              data:\n              {\"id\":\"step_001\",\"object\":\"thread.run.step\",\"created_at\":1710348076,\"run_id\":\"run_123\",\"assistant_id\":\"asst_123\",\"thread_id\":\"thread_123\",\"type\":\"message_creation\",\"status\":\"completed\",\"cancelled_at\":null,\"completed_at\":1710348077,\"expires_at\":1710348675,\"failed_at\":null,\"last_error\":null,\"step_details\":{\"type\":\"message_creation\",\"message_creation\":{\"message_id\":\"msg_001\"}},\"usage\":{\"prompt_tokens\":20,\"completion_tokens\":11,\"total_tokens\":31}}\n\n\n              event: thread.run.completed\n\n              {\"id\":\"run_123\",\"object\":\"thread.run\",\"created_at\":1710348076,\"assistant_id\":\"asst_123\",\"thread_id\":\"thread_123\",\"status\":\"completed\",\"started_at\":1713226836,\"expires_at\":null,\"cancelled_at\":null,\"failed_at\":null,\"completed_at\":1713226837,\"required_action\":null,\"last_error\":null,\"model\":\"gpt-4o\",\"instructions\":null,\"tools\":[],\"metadata\":{},\"temperature\":1.0,\"top_p\":1.0,\"max_completion_tokens\":null,\"max_prompt_tokens\":null,\"truncation_strategy\":{\"type\":\"auto\",\"last_messages\":null},\"incomplete_details\":null,\"usage\":{\"prompt_tokens\":345,\"completion_tokens\":11,\"total_tokens\":356},\"response_format\":\"auto\",\"tool_choice\":\"auto\",\"parallel_tool_calls\":true}\n\n\n              event: done\n\n              data: [DONE]\n          - title: Streaming with Functions\n            request:\n              curl: |\n                curl https://api.openai.com/v1/threads/runs \\\n                  -H \"Authorization: Bearer $OPENAI_API_KEY\" \\\n                  -H \"Content-Type: application/json\" \\\n                  -H \"OpenAI-Beta: assistants=v2\" \\\n                  -d '{\n                    \"assistant_id\": \"asst_abc123\",\n                    \"thread\": {\n                      \"messages\": [\n                        {\"role\": \"user\", \"content\": \"What is the weather like in San Francisco?\"}\n                      ]\n                    },\n                    \"tools\": [\n                      {\n                        \"type\": \"function\",\n                        \"function\": {\n                          \"name\": \"get_current_weather\",\n                          \"description\": \"Get the current weather in a given location\",\n                          \"parameters\": {\n                            \"type\": \"object\",\n                            \"properties\": {\n                              \"location\": {\n                                \"type\": \"string\",\n                                \"description\": \"The city and state, e.g. San Francisco, CA\"\n                              },\n                              \"unit\": {\n                                \"type\": \"string\",\n                                \"enum\": [\"celsius\", \"fahrenheit\"]\n                              }\n                            },\n                            \"required\": [\"location\"]\n                          }\n                        }\n                      }\n                    ],\n                    \"stream\": true\n                  }'\n              python: |-\n                from openai import OpenAI\n\n                client = OpenAI(\n                    api_key=\"My API Key\",\n                )\n                run = client.beta.threads.create_and_run(\n                    assistant_id=\"assistant_id\",\n                )\n                print(run.id)\n              node.js: |-\n                import OpenAI from 'openai';\n\n                const client = new OpenAI({\n                  apiKey: 'My API Key',\n                });\n\n                const run = await client.beta.threads.createAndRun({ assistant_id: 'assistant_id' });\n\n                console.log(run.id);\n              go: |\n                package main\n\n                import (\n                  \"context\"\n                  \"fmt\"\n\n                  \"github.com/openai/openai-go\"\n                  \"github.com/openai/openai-go/option\"\n                )\n\n                func main() {\n                  client := openai.NewClient(\n                    option.WithAPIKey(\"My API Key\"),\n                  )\n                  run, err := client.Beta.Threads.NewAndRun(context.TODO(), openai.BetaThreadNewAndRunParams{\n                    AssistantID: \"assistant_id\",\n                  })\n                  if err != nil {\n                    panic(err.Error())\n                  }\n                  fmt.Printf(\"%+v\\n\", run.ID)\n                }\n              java: |-\n                package com.openai.example;\n\n                import com.openai.client.OpenAIClient;\n                import com.openai.client.okhttp.OpenAIOkHttpClient;\n                import com.openai.models.beta.threads.ThreadCreateAndRunParams;\n                import com.openai.models.beta.threads.runs.Run;\n\n                public final class Main {\n                    private Main() {}\n\n                    public static void main(String[] args) {\n                        OpenAIClient client = OpenAIOkHttpClient.fromEnv();\n\n                        ThreadCreateAndRunParams params = ThreadCreateAndRunParams.builder()\n                            .assistantId(\"assistant_id\")\n                            .build();\n                        Run run = client.beta().threads().createAndRun(params);\n                    }\n                }\n              ruby: |-\n                require \"openai\"\n\n                openai = OpenAI::Client.new(api_key: \"My API Key\")\n\n                run = openai.beta.threads.create_and_run(assistant_id: \"assistant_id\")\n\n                puts(run)\n            response: >\n              event: thread.created\n\n              data: {\"id\":\"thread_123\",\"object\":\"thread\",\"created_at\":1710351818,\"metadata\":{}}\n\n\n              event: thread.run.created\n\n              data:\n              {\"id\":\"run_123\",\"object\":\"thread.run\",\"created_at\":1710351818,\"assistant_id\":\"asst_123\",\"thread_id\":\"thread_123\",\"status\":\"queued\",\"started_at\":null,\"expires_at\":1710352418,\"cancelled_at\":null,\"failed_at\":null,\"completed_at\":null,\"required_action\":null,\"last_error\":null,\"model\":\"gpt-4o\",\"instructions\":null,\"tools\":[{\"type\":\"function\",\"function\":{\"name\":\"get_current_weather\",\"description\":\"Get\n              the current weather in a given\n              location\",\"parameters\":{\"type\":\"object\",\"properties\":{\"location\":{\"type\":\"string\",\"description\":\"The\n              city and state, e.g. San Francisco,\n              CA\"},\"unit\":{\"type\":\"string\",\"enum\":[\"celsius\",\"fahrenheit\"]}},\"required\":[\"location\"]}}}],\"metadata\":{},\"temperature\":1.0,\"top_p\":1.0,\"max_completion_tokens\":null,\"max_prompt_tokens\":null,\"truncation_strategy\":{\"type\":\"auto\",\"last_messages\":null},\"incomplete_details\":null,\"usage\":null,\"response_format\":\"auto\",\"tool_choice\":\"auto\",\"parallel_tool_calls\":true}}\n\n\n              event: thread.run.queued\n\n              data:\n              {\"id\":\"run_123\",\"object\":\"thread.run\",\"created_at\":1710351818,\"assistant_id\":\"asst_123\",\"thread_id\":\"thread_123\",\"status\":\"queued\",\"started_at\":null,\"expires_at\":1710352418,\"cancelled_at\":null,\"failed_at\":null,\"completed_at\":null,\"required_action\":null,\"last_error\":null,\"model\":\"gpt-4o\",\"instructions\":null,\"tools\":[{\"type\":\"function\",\"function\":{\"name\":\"get_current_weather\",\"description\":\"Get\n              the current weather in a given\n              location\",\"parameters\":{\"type\":\"object\",\"properties\":{\"location\":{\"type\":\"string\",\"description\":\"The\n              city and state, e.g. San Francisco,\n              CA\"},\"unit\":{\"type\":\"string\",\"enum\":[\"celsius\",\"fahrenheit\"]}},\"required\":[\"location\"]}}}],\"metadata\":{},\"temperature\":1.0,\"top_p\":1.0,\"max_completion_tokens\":null,\"max_prompt_tokens\":null,\"truncation_strategy\":{\"type\":\"auto\",\"last_messages\":null},\"incomplete_details\":null,\"usage\":null,\"response_format\":\"auto\",\"tool_choice\":\"auto\",\"parallel_tool_calls\":true}}\n\n\n              event: thread.run.in_progress\n\n              data:\n              {\"id\":\"run_123\",\"object\":\"thread.run\",\"created_at\":1710351818,\"assistant_id\":\"asst_123\",\"thread_id\":\"thread_123\",\"status\":\"in_progress\",\"started_at\":1710351818,\"expires_at\":1710352418,\"cancelled_at\":null,\"failed_at\":null,\"completed_at\":null,\"required_action\":null,\"last_error\":null,\"model\":\"gpt-4o\",\"instructions\":null,\"tools\":[{\"type\":\"function\",\"function\":{\"name\":\"get_current_weather\",\"description\":\"Get\n              the current weather in a given\n              location\",\"parameters\":{\"type\":\"object\",\"properties\":{\"location\":{\"type\":\"string\",\"description\":\"The\n              city and state, e.g. San Francisco,\n              CA\"},\"unit\":{\"type\":\"string\",\"enum\":[\"celsius\",\"fahrenheit\"]}},\"required\":[\"location\"]}}}],\"metadata\":{},\"temperature\":1.0,\"top_p\":1.0,\"max_completion_tokens\":null,\"max_prompt_tokens\":null,\"truncation_strategy\":{\"type\":\"auto\",\"last_messages\":null},\"incomplete_details\":null,\"usage\":null,\"response_format\":\"auto\",\"tool_choice\":\"auto\",\"parallel_tool_calls\":true}}\n\n\n              event: thread.run.step.created\n\n              data:\n              {\"id\":\"step_001\",\"object\":\"thread.run.step\",\"created_at\":1710351819,\"run_id\":\"run_123\",\"assistant_id\":\"asst_123\",\"thread_id\":\"thread_123\",\"type\":\"tool_calls\",\"status\":\"in_progress\",\"cancelled_at\":null,\"completed_at\":null,\"expires_at\":1710352418,\"failed_at\":null,\"last_error\":null,\"step_details\":{\"type\":\"tool_calls\",\"tool_calls\":[]},\"usage\":null}\n\n\n              event: thread.run.step.in_progress\n\n              data:\n              {\"id\":\"step_001\",\"object\":\"thread.run.step\",\"created_at\":1710351819,\"run_id\":\"run_123\",\"assistant_id\":\"asst_123\",\"thread_id\":\"thread_123\",\"type\":\"tool_calls\",\"status\":\"in_progress\",\"cancelled_at\":null,\"completed_at\":null,\"expires_at\":1710352418,\"failed_at\":null,\"last_error\":null,\"step_details\":{\"type\":\"tool_calls\",\"tool_calls\":[]},\"usage\":null}\n\n\n              event: thread.run.step.delta\n\n              data:\n              {\"id\":\"step_001\",\"object\":\"thread.run.step.delta\",\"delta\":{\"step_details\":{\"type\":\"tool_calls\",\"tool_calls\":[{\"index\":0,\"id\":\"call_XXNp8YGaFrjrSjgqxtC8JJ1B\",\"type\":\"function\",\"function\":{\"name\":\"get_current_weather\",\"arguments\":\"\",\"output\":null}}]}}}\n\n\n              event: thread.run.step.delta\n\n              data:\n              {\"id\":\"step_001\",\"object\":\"thread.run.step.delta\",\"delta\":{\"step_details\":{\"type\":\"tool_calls\",\"tool_calls\":[{\"index\":0,\"type\":\"function\",\"function\":{\"arguments\":\"{\\\"\"}}]}}}\n\n\n              event: thread.run.step.delta\n\n              data:\n              {\"id\":\"step_001\",\"object\":\"thread.run.step.delta\",\"delta\":{\"step_details\":{\"type\":\"tool_calls\",\"tool_calls\":[{\"index\":0,\"type\":\"function\",\"function\":{\"arguments\":\"location\"}}]}}}\n\n\n              ...\n\n\n              event: thread.run.step.delta\n\n              data:\n              {\"id\":\"step_001\",\"object\":\"thread.run.step.delta\",\"delta\":{\"step_details\":{\"type\":\"tool_calls\",\"tool_calls\":[{\"index\":0,\"type\":\"function\",\"function\":{\"arguments\":\"ahrenheit\"}}]}}}\n\n\n              event: thread.run.step.delta\n\n              data:\n              {\"id\":\"step_001\",\"object\":\"thread.run.step.delta\",\"delta\":{\"step_details\":{\"type\":\"tool_calls\",\"tool_calls\":[{\"index\":0,\"type\":\"function\",\"function\":{\"arguments\":\"\\\"}\"}}]}}}\n\n\n              event: thread.run.requires_action\n\n              data:\n              {\"id\":\"run_123\",\"object\":\"thread.run\",\"created_at\":1710351818,\"assistant_id\":\"asst_123\",\"thread_id\":\"thread_123\",\"status\":\"requires_action\",\"started_at\":1710351818,\"expires_at\":1710352418,\"cancelled_at\":null,\"failed_at\":null,\"completed_at\":null,\"required_action\":{\"type\":\"submit_tool_outputs\",\"submit_tool_outputs\":{\"tool_calls\":[{\"id\":\"call_XXNp8YGaFrjrSjgqxtC8JJ1B\",\"type\":\"function\",\"function\":{\"name\":\"get_current_weather\",\"arguments\":\"{\\\"location\\\":\\\"San\n              Francisco,\n              CA\\\",\\\"unit\\\":\\\"fahrenheit\\\"}\"}}]}},\"last_error\":null,\"model\":\"gpt-4o\",\"instructions\":null,\"tools\":[{\"type\":\"function\",\"function\":{\"name\":\"get_current_weather\",\"description\":\"Get\n              the current weather in a given\n              location\",\"parameters\":{\"type\":\"object\",\"properties\":{\"location\":{\"type\":\"string\",\"description\":\"The\n              city and state, e.g. San Francisco,\n              CA\"},\"unit\":{\"type\":\"string\",\"enum\":[\"celsius\",\"fahrenheit\"]}},\"required\":[\"location\"]}}}],\"metadata\":{},\"temperature\":1.0,\"top_p\":1.0,\"max_completion_tokens\":null,\"max_prompt_tokens\":null,\"truncation_strategy\":{\"type\":\"auto\",\"last_messages\":null},\"incomplete_details\":null,\"usage\":{\"prompt_tokens\":345,\"completion_tokens\":11,\"total_tokens\":356},\"response_format\":\"auto\",\"tool_choice\":\"auto\",\"parallel_tool_calls\":true}}\n\n\n              event: done\n\n              data: [DONE]\n      description: Create a thread and run it in one request.\n  /threads/{thread_id}:\n    get:\n      operationId: getThread\n      tags:\n        - Assistants\n      summary: Retrieve thread\n      parameters:\n        - in: path\n          name: thread_id\n          required: true\n          schema:\n            type: string\n          description: The ID of the thread to retrieve.\n      responses:\n        '200':\n          description: OK\n          content:\n            application/json:\n              schema:\n                $ref: '#/components/schemas/ThreadObject'\n      x-oaiMeta:\n        name: Retrieve thread\n        group: threads\n        beta: true\n        returns: >-\n          The [thread](https://platform.openai.com/docs/api-reference/threads/object) object matching the\n          specified ID.\n        examples:\n          response: |\n            {\n              \"id\": \"thread_abc123\",\n              \"object\": \"thread\",\n              \"created_at\": 1699014083,\n              \"metadata\": {},\n              \"tool_resources\": {\n                \"code_interpreter\": {\n                  \"file_ids\": []\n                }\n              }\n            }\n          request:\n            curl: |\n              curl https://api.openai.com/v1/threads/thread_abc123 \\\n                -H \"Content-Type: application/json\" \\\n                -H \"Authorization: Bearer $OPENAI_API_KEY\" \\\n                -H \"OpenAI-Beta: assistants=v2\"\n            python: |-\n              from openai import OpenAI\n\n              client = OpenAI(\n                  api_key=\"My API Key\",\n              )\n              thread = client.beta.threads.retrieve(\n                  \"thread_id\",\n              )\n              print(thread.id)\n            node.js: |-\n              import OpenAI from 'openai';\n\n              const client = new OpenAI({\n                apiKey: 'My API Key',\n              });\n\n              const thread = await client.beta.threads.retrieve('thread_id');\n\n              console.log(thread.id);\n            go: |\n              package main\n\n              import (\n                \"context\"\n                \"fmt\"\n\n                \"github.com/openai/openai-go\"\n                \"github.com/openai/openai-go/option\"\n              )\n\n              func main() {\n                client := openai.NewClient(\n                  option.WithAPIKey(\"My API Key\"),\n                )\n                thread, err := client.Beta.Threads.Get(context.TODO(), \"thread_id\")\n                if err != nil {\n                  panic(err.Error())\n                }\n                fmt.Printf(\"%+v\\n\", thread.ID)\n              }\n            java: |-\n              package com.openai.example;\n\n              import com.openai.client.OpenAIClient;\n              import com.openai.client.okhttp.OpenAIOkHttpClient;\n              import com.openai.models.beta.threads.Thread;\n              import com.openai.models.beta.threads.ThreadRetrieveParams;\n\n              public final class Main {\n                  private Main() {}\n\n                  public static void main(String[] args) {\n                      OpenAIClient client = OpenAIOkHttpClient.fromEnv();\n\n                      Thread thread = client.beta().threads().retrieve(\"thread_id\");\n                  }\n              }\n            ruby: |-\n              require \"openai\"\n\n              openai = OpenAI::Client.new(api_key: \"My API Key\")\n\n              thread = openai.beta.threads.retrieve(\"thread_id\")\n\n              puts(thread)\n      description: Retrieves a thread.\n    post:\n      operationId: modifyThread\n      tags:\n        - Assistants\n      summary: Modify thread\n      parameters:\n        - in: path\n          name: thread_id\n          required: true\n          schema:\n            type: string\n          description: The ID of the thread to modify. Only the `metadata` can be modified.\n      requestBody:\n        required: true\n        content:\n          application/json:\n            schema:\n              $ref: '#/components/schemas/ModifyThreadRequest'\n      responses:\n        '200':\n          description: OK\n          content:\n            application/json:\n              schema:\n                $ref: '#/components/schemas/ThreadObject'\n      x-oaiMeta:\n        name: Modify thread\n        group: threads\n        beta: true\n        returns: >-\n          The modified [thread](https://platform.openai.com/docs/api-reference/threads/object) object matching\n          the specified ID.\n        examples:\n          response: |\n            {\n              \"id\": \"thread_abc123\",\n              \"object\": \"thread\",\n              \"created_at\": 1699014083,\n              \"metadata\": {\n                \"modified\": \"true\",\n                \"user\": \"abc123\"\n              },\n              \"tool_resources\": {}\n            }\n          request:\n            curl: |\n              curl https://api.openai.com/v1/threads/thread_abc123 \\\n                -H \"Content-Type: application/json\" \\\n                -H \"Authorization: Bearer $OPENAI_API_KEY\" \\\n                -H \"OpenAI-Beta: assistants=v2\" \\\n                -d '{\n                    \"metadata\": {\n                      \"modified\": \"true\",\n                      \"user\": \"abc123\"\n                    }\n                  }'\n            python: |-\n              from openai import OpenAI\n\n              client = OpenAI(\n                  api_key=\"My API Key\",\n              )\n              thread = client.beta.threads.update(\n                  thread_id=\"thread_id\",\n              )\n              print(thread.id)\n            node.js: |-\n              import OpenAI from 'openai';\n\n              const client = new OpenAI({\n                apiKey: 'My API Key',\n              });\n\n              const thread = await client.beta.threads.update('thread_id');\n\n              console.log(thread.id);\n            go: |\n              package main\n\n              import (\n                \"context\"\n                \"fmt\"\n\n                \"github.com/openai/openai-go\"\n                \"github.com/openai/openai-go/option\"\n              )\n\n              func main() {\n                client := openai.NewClient(\n                  option.WithAPIKey(\"My API Key\"),\n                )\n                thread, err := client.Beta.Threads.Update(\n                  context.TODO(),\n                  \"thread_id\",\n                  openai.BetaThreadUpdateParams{\n\n                  },\n                )\n                if err != nil {\n                  panic(err.Error())\n                }\n                fmt.Printf(\"%+v\\n\", thread.ID)\n              }\n            java: |-\n              package com.openai.example;\n\n              import com.openai.client.OpenAIClient;\n              import com.openai.client.okhttp.OpenAIOkHttpClient;\n              import com.openai.models.beta.threads.Thread;\n              import com.openai.models.beta.threads.ThreadUpdateParams;\n\n              public final class Main {\n                  private Main() {}\n\n                  public static void main(String[] args) {\n                      OpenAIClient client = OpenAIOkHttpClient.fromEnv();\n\n                      Thread thread = client.beta().threads().update(\"thread_id\");\n                  }\n              }\n            ruby: |-\n              require \"openai\"\n\n              openai = OpenAI::Client.new(api_key: \"My API Key\")\n\n              thread = openai.beta.threads.update(\"thread_id\")\n\n              puts(thread)\n      description: Modifies a thread.\n    delete:\n      operationId: deleteThread\n      tags:\n        - Assistants\n      summary: Delete thread\n      parameters:\n        - in: path\n          name: thread_id\n          required: true\n          schema:\n            type: string\n          description: The ID of the thread to delete.\n      responses:\n        '200':\n          description: OK\n          content:\n            application/json:\n              schema:\n                $ref: '#/components/schemas/DeleteThreadResponse'\n      x-oaiMeta:\n        name: Delete thread\n        group: threads\n        beta: true\n        returns: Deletion status\n        examples:\n          response: |\n            {\n              \"id\": \"thread_abc123\",\n              \"object\": \"thread.deleted\",\n              \"deleted\": true\n            }\n          request:\n            curl: |\n              curl https://api.openai.com/v1/threads/thread_abc123 \\\n                -H \"Content-Type: application/json\" \\\n                -H \"Authorization: Bearer $OPENAI_API_KEY\" \\\n                -H \"OpenAI-Beta: assistants=v2\" \\\n                -X DELETE\n            python: |-\n              from openai import OpenAI\n\n              client = OpenAI(\n                  api_key=\"My API Key\",\n              )\n              thread_deleted = client.beta.threads.delete(\n                  \"thread_id\",\n              )\n              print(thread_deleted.id)\n            node.js: |-\n              import OpenAI from 'openai';\n\n              const client = new OpenAI({\n                apiKey: 'My API Key',\n              });\n\n              const threadDeleted = await client.beta.threads.delete('thread_id');\n\n              console.log(threadDeleted.id);\n            go: |\n              package main\n\n              import (\n                \"context\"\n                \"fmt\"\n\n                \"github.com/openai/openai-go\"\n                \"github.com/openai/openai-go/option\"\n              )\n\n              func main() {\n                client := openai.NewClient(\n                  option.WithAPIKey(\"My API Key\"),\n                )\n                threadDeleted, err := client.Beta.Threads.Delete(context.TODO(), \"thread_id\")\n                if err != nil {\n                  panic(err.Error())\n                }\n                fmt.Printf(\"%+v\\n\", threadDeleted.ID)\n              }\n            java: |-\n              package com.openai.example;\n\n              import com.openai.client.OpenAIClient;\n              import com.openai.client.okhttp.OpenAIOkHttpClient;\n              import com.openai.models.beta.threads.ThreadDeleteParams;\n              import com.openai.models.beta.threads.ThreadDeleted;\n\n              public final class Main {\n                  private Main() {}\n\n                  public static void main(String[] args) {\n                      OpenAIClient client = OpenAIOkHttpClient.fromEnv();\n\n                      ThreadDeleted threadDeleted = client.beta().threads().delete(\"thread_id\");\n                  }\n              }\n            ruby: |-\n              require \"openai\"\n\n              openai = OpenAI::Client.new(api_key: \"My API Key\")\n\n              thread_deleted = openai.beta.threads.delete(\"thread_id\")\n\n              puts(thread_deleted)\n      description: Delete a thread.\n  /threads/{thread_id}/messages:\n    get:\n      operationId: listMessages\n      tags:\n        - Assistants\n      summary: List messages\n      parameters:\n        - in: path\n          name: thread_id\n          required: true\n          schema:\n            type: string\n          description: >-\n            The ID of the [thread](https://platform.openai.com/docs/api-reference/threads) the messages belong\n            to.\n        - name: limit\n          in: query\n          description: >\n            A limit on the number of objects to be returned. Limit can range between 1 and 100, and the\n            default is 20.\n          required: false\n          schema:\n            type: integer\n            default: 20\n        - name: order\n          in: query\n          description: >\n            Sort order by the `created_at` timestamp of the objects. `asc` for ascending order and `desc` for\n            descending order.\n          schema:\n            type: string\n            default: desc\n            enum:\n              - asc\n              - desc\n        - name: after\n          in: query\n          description: >\n            A cursor for use in pagination. `after` is an object ID that defines your place in the list. For\n            instance, if you make a list request and receive 100 objects, ending with obj_foo, your subsequent\n            call can include after=obj_foo in order to fetch the next page of the list.\n          schema:\n            type: string\n        - name: before\n          in: query\n          description: >\n            A cursor for use in pagination. `before` is an object ID that defines your place in the list. For\n            instance, if you make a list request and receive 100 objects, starting with obj_foo, your\n            subsequent call can include before=obj_foo in order to fetch the previous page of the list.\n          schema:\n            type: string\n        - name: run_id\n          in: query\n          description: |\n            Filter messages by the run ID that generated them.\n          schema:\n            type: string\n      responses:\n        '200':\n          description: OK\n          content:\n            application/json:\n              schema:\n                $ref: '#/components/schemas/ListMessagesResponse'\n      x-oaiMeta:\n        name: List messages\n        group: threads\n        beta: true\n        returns: A list of [message](https://platform.openai.com/docs/api-reference/messages) objects.\n        examples:\n          response: |\n            {\n              \"object\": \"list\",\n              \"data\": [\n                {\n                  \"id\": \"msg_abc123\",\n                  \"object\": \"thread.message\",\n                  \"created_at\": 1699016383,\n                  \"assistant_id\": null,\n                  \"thread_id\": \"thread_abc123\",\n                  \"run_id\": null,\n                  \"role\": \"user\",\n                  \"content\": [\n                    {\n                      \"type\": \"text\",\n                      \"text\": {\n                        \"value\": \"How does AI work? Explain it in simple terms.\",\n                        \"annotations\": []\n                      }\n                    }\n                  ],\n                  \"attachments\": [],\n                  \"metadata\": {}\n                },\n                {\n                  \"id\": \"msg_abc456\",\n                  \"object\": \"thread.message\",\n                  \"created_at\": 1699016383,\n                  \"assistant_id\": null,\n                  \"thread_id\": \"thread_abc123\",\n                  \"run_id\": null,\n                  \"role\": \"user\",\n                  \"content\": [\n                    {\n                      \"type\": \"text\",\n                      \"text\": {\n                        \"value\": \"Hello, what is AI?\",\n                        \"annotations\": []\n                      }\n                    }\n                  ],\n                  \"attachments\": [],\n                  \"metadata\": {}\n                }\n              ],\n              \"first_id\": \"msg_abc123\",\n              \"last_id\": \"msg_abc456\",\n              \"has_more\": false\n            }\n          request:\n            curl: |\n              curl https://api.openai.com/v1/threads/thread_abc123/messages \\\n                -H \"Content-Type: application/json\" \\\n                -H \"Authorization: Bearer $OPENAI_API_KEY\" \\\n                -H \"OpenAI-Beta: assistants=v2\"\n            python: |-\n              from openai import OpenAI\n\n              client = OpenAI(\n                  api_key=\"My API Key\",\n              )\n              page = client.beta.threads.messages.list(\n                  thread_id=\"thread_id\",\n              )\n              page = page.data[0]\n              print(page.id)\n            node.js: |-\n              import OpenAI from 'openai';\n\n              const client = new OpenAI({\n                apiKey: 'My API Key',\n              });\n\n              // Automatically fetches more pages as needed.\n              for await (const message of client.beta.threads.messages.list('thread_id')) {\n                console.log(message.id);\n              }\n            go: |\n              package main\n\n              import (\n                \"context\"\n                \"fmt\"\n\n                \"github.com/openai/openai-go\"\n                \"github.com/openai/openai-go/option\"\n              )\n\n              func main() {\n                client := openai.NewClient(\n                  option.WithAPIKey(\"My API Key\"),\n                )\n                page, err := client.Beta.Threads.Messages.List(\n                  context.TODO(),\n                  \"thread_id\",\n                  openai.BetaThreadMessageListParams{\n\n                  },\n                )\n                if err != nil {\n                  panic(err.Error())\n                }\n                fmt.Printf(\"%+v\\n\", page)\n              }\n            java: |-\n              package com.openai.example;\n\n              import com.openai.client.OpenAIClient;\n              import com.openai.client.okhttp.OpenAIOkHttpClient;\n              import com.openai.models.beta.threads.messages.MessageListPage;\n              import com.openai.models.beta.threads.messages.MessageListParams;\n\n              public final class Main {\n                  private Main() {}\n\n                  public static void main(String[] args) {\n                      OpenAIClient client = OpenAIOkHttpClient.fromEnv();\n\n                      MessageListPage page = client.beta().threads().messages().list(\"thread_id\");\n                  }\n              }\n            ruby: |-\n              require \"openai\"\n\n              openai = OpenAI::Client.new(api_key: \"My API Key\")\n\n              page = openai.beta.threads.messages.list(\"thread_id\")\n\n              puts(page)\n      description: Returns a list of messages for a given thread.\n    post:\n      operationId: createMessage\n      tags:\n        - Assistants\n      summary: Create message\n      parameters:\n        - in: path\n          name: thread_id\n          required: true\n          schema:\n            type: string\n          description: >-\n            The ID of the [thread](https://platform.openai.com/docs/api-reference/threads) to create a message\n            for.\n      requestBody:\n        required: true\n        content:\n          application/json:\n            schema:\n              $ref: '#/components/schemas/CreateMessageRequest'\n      responses:\n        '200':\n          description: OK\n          content:\n            application/json:\n              schema:\n                $ref: '#/components/schemas/MessageObject'\n      x-oaiMeta:\n        name: Create message\n        group: threads\n        beta: true\n        returns: A [message](https://platform.openai.com/docs/api-reference/messages/object) object.\n        examples:\n          response: |\n            {\n              \"id\": \"msg_abc123\",\n              \"object\": \"thread.message\",\n              \"created_at\": 1713226573,\n              \"assistant_id\": null,\n              \"thread_id\": \"thread_abc123\",\n              \"run_id\": null,\n              \"role\": \"user\",\n              \"content\": [\n                {\n                  \"type\": \"text\",\n                  \"text\": {\n                    \"value\": \"How does AI work? Explain it in simple terms.\",\n                    \"annotations\": []\n                  }\n                }\n              ],\n              \"attachments\": [],\n              \"metadata\": {}\n            }\n          request:\n            curl: |\n              curl https://api.openai.com/v1/threads/thread_abc123/messages \\\n                -H \"Content-Type: application/json\" \\\n                -H \"Authorization: Bearer $OPENAI_API_KEY\" \\\n                -H \"OpenAI-Beta: assistants=v2\" \\\n                -d '{\n                    \"role\": \"user\",\n                    \"content\": \"How does AI work? Explain it in simple terms.\"\n                  }'\n            python: |-\n              from openai import OpenAI\n\n              client = OpenAI(\n                  api_key=\"My API Key\",\n              )\n              message = client.beta.threads.messages.create(\n                  thread_id=\"thread_id\",\n                  content=\"string\",\n                  role=\"user\",\n              )\n              print(message.id)\n            node.js: >-\n              import OpenAI from 'openai';\n\n\n              const client = new OpenAI({\n                apiKey: 'My API Key',\n              });\n\n\n              const message = await client.beta.threads.messages.create('thread_id', { content: 'string',\n              role: 'user' });\n\n\n              console.log(message.id);\n            go: |\n              package main\n\n              import (\n                \"context\"\n                \"fmt\"\n\n                \"github.com/openai/openai-go\"\n                \"github.com/openai/openai-go/option\"\n              )\n\n              func main() {\n                client := openai.NewClient(\n                  option.WithAPIKey(\"My API Key\"),\n                )\n                message, err := client.Beta.Threads.Messages.New(\n                  context.TODO(),\n                  \"thread_id\",\n                  openai.BetaThreadMessageNewParams{\n                    Content: openai.BetaThreadMessageNewParamsContentUnion{\n                      OfString: openai.String(\"string\"),\n                    },\n                    Role: openai.BetaThreadMessageNewParamsRoleUser,\n                  },\n                )\n                if err != nil {\n                  panic(err.Error())\n                }\n                fmt.Printf(\"%+v\\n\", message.ID)\n              }\n            java: |-\n              package com.openai.example;\n\n              import com.openai.client.OpenAIClient;\n              import com.openai.client.okhttp.OpenAIOkHttpClient;\n              import com.openai.models.beta.threads.messages.Message;\n              import com.openai.models.beta.threads.messages.MessageCreateParams;\n\n              public final class Main {\n                  private Main() {}\n\n                  public static void main(String[] args) {\n                      OpenAIClient client = OpenAIOkHttpClient.fromEnv();\n\n                      MessageCreateParams params = MessageCreateParams.builder()\n                          .threadId(\"thread_id\")\n                          .content(\"string\")\n                          .role(MessageCreateParams.Role.USER)\n                          .build();\n                      Message message = client.beta().threads().messages().create(params);\n                  }\n              }\n            ruby: |-\n              require \"openai\"\n\n              openai = OpenAI::Client.new(api_key: \"My API Key\")\n\n              message = openai.beta.threads.messages.create(\"thread_id\", content: \"string\", role: :user)\n\n              puts(message)\n      description: Create a message.\n  /threads/{thread_id}/messages/{message_id}:\n    get:\n      operationId: getMessage\n      tags:\n        - Assistants\n      summary: Retrieve message\n      parameters:\n        - in: path\n          name: thread_id\n          required: true\n          schema:\n            type: string\n          description: >-\n            The ID of the [thread](https://platform.openai.com/docs/api-reference/threads) to which this\n            message belongs.\n        - in: path\n          name: message_id\n          required: true\n          schema:\n            type: string\n          description: The ID of the message to retrieve.\n      responses:\n        '200':\n          description: OK\n          content:\n            application/json:\n              schema:\n                $ref: '#/components/schemas/MessageObject'\n      x-oaiMeta:\n        name: Retrieve message\n        group: threads\n        beta: true\n        returns: >-\n          The [message](https://platform.openai.com/docs/api-reference/messages/object) object matching the\n          specified ID.\n        examples:\n          response: |\n            {\n              \"id\": \"msg_abc123\",\n              \"object\": \"thread.message\",\n              \"created_at\": 1699017614,\n              \"assistant_id\": null,\n              \"thread_id\": \"thread_abc123\",\n              \"run_id\": null,\n              \"role\": \"user\",\n              \"content\": [\n                {\n                  \"type\": \"text\",\n                  \"text\": {\n                    \"value\": \"How does AI work? Explain it in simple terms.\",\n                    \"annotations\": []\n                  }\n                }\n              ],\n              \"attachments\": [],\n              \"metadata\": {}\n            }\n          request:\n            curl: |\n              curl https://api.openai.com/v1/threads/thread_abc123/messages/msg_abc123 \\\n                -H \"Content-Type: application/json\" \\\n                -H \"Authorization: Bearer $OPENAI_API_KEY\" \\\n                -H \"OpenAI-Beta: assistants=v2\"\n            python: |-\n              from openai import OpenAI\n\n              client = OpenAI(\n                  api_key=\"My API Key\",\n              )\n              message = client.beta.threads.messages.retrieve(\n                  message_id=\"message_id\",\n                  thread_id=\"thread_id\",\n              )\n              print(message.id)\n            node.js: >-\n              import OpenAI from 'openai';\n\n\n              const client = new OpenAI({\n                apiKey: 'My API Key',\n              });\n\n\n              const message = await client.beta.threads.messages.retrieve('message_id', { thread_id:\n              'thread_id' });\n\n\n              console.log(message.id);\n            go: |\n              package main\n\n              import (\n                \"context\"\n                \"fmt\"\n\n                \"github.com/openai/openai-go\"\n                \"github.com/openai/openai-go/option\"\n              )\n\n              func main() {\n                client := openai.NewClient(\n                  option.WithAPIKey(\"My API Key\"),\n                )\n                message, err := client.Beta.Threads.Messages.Get(\n                  context.TODO(),\n                  \"thread_id\",\n                  \"message_id\",\n                )\n                if err != nil {\n                  panic(err.Error())\n                }\n                fmt.Printf(\"%+v\\n\", message.ID)\n              }\n            java: |-\n              package com.openai.example;\n\n              import com.openai.client.OpenAIClient;\n              import com.openai.client.okhttp.OpenAIOkHttpClient;\n              import com.openai.models.beta.threads.messages.Message;\n              import com.openai.models.beta.threads.messages.MessageRetrieveParams;\n\n              public final class Main {\n                  private Main() {}\n\n                  public static void main(String[] args) {\n                      OpenAIClient client = OpenAIOkHttpClient.fromEnv();\n\n                      MessageRetrieveParams params = MessageRetrieveParams.builder()\n                          .threadId(\"thread_id\")\n                          .messageId(\"message_id\")\n                          .build();\n                      Message message = client.beta().threads().messages().retrieve(params);\n                  }\n              }\n            ruby: |-\n              require \"openai\"\n\n              openai = OpenAI::Client.new(api_key: \"My API Key\")\n\n              message = openai.beta.threads.messages.retrieve(\"message_id\", thread_id: \"thread_id\")\n\n              puts(message)\n      description: Retrieve a message.\n    post:\n      operationId: modifyMessage\n      tags:\n        - Assistants\n      summary: Modify message\n      parameters:\n        - in: path\n          name: thread_id\n          required: true\n          schema:\n            type: string\n          description: The ID of the thread to which this message belongs.\n        - in: path\n          name: message_id\n          required: true\n          schema:\n            type: string\n          description: The ID of the message to modify.\n      requestBody:\n        required: true\n        content:\n          application/json:\n            schema:\n              $ref: '#/components/schemas/ModifyMessageRequest'\n      responses:\n        '200':\n          description: OK\n          content:\n            application/json:\n              schema:\n                $ref: '#/components/schemas/MessageObject'\n      x-oaiMeta:\n        name: Modify message\n        group: threads\n        beta: true\n        returns: The modified [message](https://platform.openai.com/docs/api-reference/messages/object) object.\n        examples:\n          response: |\n            {\n              \"id\": \"msg_abc123\",\n              \"object\": \"thread.message\",\n              \"created_at\": 1699017614,\n              \"assistant_id\": null,\n              \"thread_id\": \"thread_abc123\",\n              \"run_id\": null,\n              \"role\": \"user\",\n              \"content\": [\n                {\n                  \"type\": \"text\",\n                  \"text\": {\n                    \"value\": \"How does AI work? Explain it in simple terms.\",\n                    \"annotations\": []\n                  }\n                }\n              ],\n              \"file_ids\": [],\n              \"metadata\": {\n                \"modified\": \"true\",\n                \"user\": \"abc123\"\n              }\n            }\n          request:\n            curl: |\n              curl https://api.openai.com/v1/threads/thread_abc123/messages/msg_abc123 \\\n                -H \"Content-Type: application/json\" \\\n                -H \"Authorization: Bearer $OPENAI_API_KEY\" \\\n                -H \"OpenAI-Beta: assistants=v2\" \\\n                -d '{\n                    \"metadata\": {\n                      \"modified\": \"true\",\n                      \"user\": \"abc123\"\n                    }\n                  }'\n            python: |-\n              from openai import OpenAI\n\n              client = OpenAI(\n                  api_key=\"My API Key\",\n              )\n              message = client.beta.threads.messages.update(\n                  message_id=\"message_id\",\n                  thread_id=\"thread_id\",\n              )\n              print(message.id)\n            node.js: >-\n              import OpenAI from 'openai';\n\n\n              const client = new OpenAI({\n                apiKey: 'My API Key',\n              });\n\n\n              const message = await client.beta.threads.messages.update('message_id', { thread_id: 'thread_id'\n              });\n\n\n              console.log(message.id);\n            go: |\n              package main\n\n              import (\n                \"context\"\n                \"fmt\"\n\n                \"github.com/openai/openai-go\"\n                \"github.com/openai/openai-go/option\"\n              )\n\n              func main() {\n                client := openai.NewClient(\n                  option.WithAPIKey(\"My API Key\"),\n                )\n                message, err := client.Beta.Threads.Messages.Update(\n                  context.TODO(),\n                  \"thread_id\",\n                  \"message_id\",\n                  openai.BetaThreadMessageUpdateParams{\n\n                  },\n                )\n                if err != nil {\n                  panic(err.Error())\n                }\n                fmt.Printf(\"%+v\\n\", message.ID)\n              }\n            java: |-\n              package com.openai.example;\n\n              import com.openai.client.OpenAIClient;\n              import com.openai.client.okhttp.OpenAIOkHttpClient;\n              import com.openai.models.beta.threads.messages.Message;\n              import com.openai.models.beta.threads.messages.MessageUpdateParams;\n\n              public final class Main {\n                  private Main() {}\n\n                  public static void main(String[] args) {\n                      OpenAIClient client = OpenAIOkHttpClient.fromEnv();\n\n                      MessageUpdateParams params = MessageUpdateParams.builder()\n                          .threadId(\"thread_id\")\n                          .messageId(\"message_id\")\n                          .build();\n                      Message message = client.beta().threads().messages().update(params);\n                  }\n              }\n            ruby: |-\n              require \"openai\"\n\n              openai = OpenAI::Client.new(api_key: \"My API Key\")\n\n              message = openai.beta.threads.messages.update(\"message_id\", thread_id: \"thread_id\")\n\n              puts(message)\n      description: Modifies a message.\n    delete:\n      operationId: deleteMessage\n      tags:\n        - Assistants\n      summary: Delete message\n      parameters:\n        - in: path\n          name: thread_id\n          required: true\n          schema:\n            type: string\n          description: The ID of the thread to which this message belongs.\n        - in: path\n          name: message_id\n          required: true\n          schema:\n            type: string\n          description: The ID of the message to delete.\n      responses:\n        '200':\n          description: OK\n          content:\n            application/json:\n              schema:\n                $ref: '#/components/schemas/DeleteMessageResponse'\n      x-oaiMeta:\n        name: Delete message\n        group: threads\n        beta: true\n        returns: Deletion status\n        examples:\n          response: |\n            {\n              \"id\": \"msg_abc123\",\n              \"object\": \"thread.message.deleted\",\n              \"deleted\": true\n            }\n          request:\n            curl: |\n              curl -X DELETE https://api.openai.com/v1/threads/thread_abc123/messages/msg_abc123 \\\n                -H \"Content-Type: application/json\" \\\n                -H \"Authorization: Bearer $OPENAI_API_KEY\" \\\n                -H \"OpenAI-Beta: assistants=v2\"\n            python: |-\n              from openai import OpenAI\n\n              client = OpenAI(\n                  api_key=\"My API Key\",\n              )\n              message_deleted = client.beta.threads.messages.delete(\n                  message_id=\"message_id\",\n                  thread_id=\"thread_id\",\n              )\n              print(message_deleted.id)\n            node.js: >-\n              import OpenAI from 'openai';\n\n\n              const client = new OpenAI({\n                apiKey: 'My API Key',\n              });\n\n\n              const messageDeleted = await client.beta.threads.messages.delete('message_id', { thread_id:\n              'thread_id' });\n\n\n              console.log(messageDeleted.id);\n            go: |\n              package main\n\n              import (\n                \"context\"\n                \"fmt\"\n\n                \"github.com/openai/openai-go\"\n                \"github.com/openai/openai-go/option\"\n              )\n\n              func main() {\n                client := openai.NewClient(\n                  option.WithAPIKey(\"My API Key\"),\n                )\n                messageDeleted, err := client.Beta.Threads.Messages.Delete(\n                  context.TODO(),\n                  \"thread_id\",\n                  \"message_id\",\n                )\n                if err != nil {\n                  panic(err.Error())\n                }\n                fmt.Printf(\"%+v\\n\", messageDeleted.ID)\n              }\n            java: |-\n              package com.openai.example;\n\n              import com.openai.client.OpenAIClient;\n              import com.openai.client.okhttp.OpenAIOkHttpClient;\n              import com.openai.models.beta.threads.messages.MessageDeleteParams;\n              import com.openai.models.beta.threads.messages.MessageDeleted;\n\n              public final class Main {\n                  private Main() {}\n\n                  public static void main(String[] args) {\n                      OpenAIClient client = OpenAIOkHttpClient.fromEnv();\n\n                      MessageDeleteParams params = MessageDeleteParams.builder()\n                          .threadId(\"thread_id\")\n                          .messageId(\"message_id\")\n                          .build();\n                      MessageDeleted messageDeleted = client.beta().threads().messages().delete(params);\n                  }\n              }\n            ruby: |-\n              require \"openai\"\n\n              openai = OpenAI::Client.new(api_key: \"My API Key\")\n\n              message_deleted = openai.beta.threads.messages.delete(\"message_id\", thread_id: \"thread_id\")\n\n              puts(message_deleted)\n      description: Deletes a message.\n  /threads/{thread_id}/runs:\n    get:\n      operationId: listRuns\n      tags:\n        - Assistants\n      summary: List runs\n      parameters:\n        - name: thread_id\n          in: path\n          required: true\n          schema:\n            type: string\n          description: The ID of the thread the run belongs to.\n        - name: limit\n          in: query\n          description: >\n            A limit on the number of objects to be returned. Limit can range between 1 and 100, and the\n            default is 20.\n          required: false\n          schema:\n            type: integer\n            default: 20\n        - name: order\n          in: query\n          description: >\n            Sort order by the `created_at` timestamp of the objects. `asc` for ascending order and `desc` for\n            descending order.\n          schema:\n            type: string\n            default: desc\n            enum:\n              - asc\n              - desc\n        - name: after\n          in: query\n          description: >\n            A cursor for use in pagination. `after` is an object ID that defines your place in the list. For\n            instance, if you make a list request and receive 100 objects, ending with obj_foo, your subsequent\n            call can include after=obj_foo in order to fetch the next page of the list.\n          schema:\n            type: string\n        - name: before\n          in: query\n          description: >\n            A cursor for use in pagination. `before` is an object ID that defines your place in the list. For\n            instance, if you make a list request and receive 100 objects, starting with obj_foo, your\n            subsequent call can include before=obj_foo in order to fetch the previous page of the list.\n          schema:\n            type: string\n      responses:\n        '200':\n          description: OK\n          content:\n            application/json:\n              schema:\n                $ref: '#/components/schemas/ListRunsResponse'\n      x-oaiMeta:\n        name: List runs\n        group: threads\n        beta: true\n        returns: A list of [run](https://platform.openai.com/docs/api-reference/runs/object) objects.\n        examples:\n          response: |\n            {\n              \"object\": \"list\",\n              \"data\": [\n                {\n                  \"id\": \"run_abc123\",\n                  \"object\": \"thread.run\",\n                  \"created_at\": 1699075072,\n                  \"assistant_id\": \"asst_abc123\",\n                  \"thread_id\": \"thread_abc123\",\n                  \"status\": \"completed\",\n                  \"started_at\": 1699075072,\n                  \"expires_at\": null,\n                  \"cancelled_at\": null,\n                  \"failed_at\": null,\n                  \"completed_at\": 1699075073,\n                  \"last_error\": null,\n                  \"model\": \"gpt-4o\",\n                  \"instructions\": null,\n                  \"incomplete_details\": null,\n                  \"tools\": [\n                    {\n                      \"type\": \"code_interpreter\"\n                    }\n                  ],\n                  \"tool_resources\": {\n                    \"code_interpreter\": {\n                      \"file_ids\": [\n                        \"file-abc123\",\n                        \"file-abc456\"\n                      ]\n                    }\n                  },\n                  \"metadata\": {},\n                  \"usage\": {\n                    \"prompt_tokens\": 123,\n                    \"completion_tokens\": 456,\n                    \"total_tokens\": 579\n                  },\n                  \"temperature\": 1.0,\n                  \"top_p\": 1.0,\n                  \"max_prompt_tokens\": 1000,\n                  \"max_completion_tokens\": 1000,\n                  \"truncation_strategy\": {\n                    \"type\": \"auto\",\n                    \"last_messages\": null\n                  },\n                  \"response_format\": \"auto\",\n                  \"tool_choice\": \"auto\",\n                  \"parallel_tool_calls\": true\n                },\n                {\n                  \"id\": \"run_abc456\",\n                  \"object\": \"thread.run\",\n                  \"created_at\": 1699063290,\n                  \"assistant_id\": \"asst_abc123\",\n                  \"thread_id\": \"thread_abc123\",\n                  \"status\": \"completed\",\n                  \"started_at\": 1699063290,\n                  \"expires_at\": null,\n                  \"cancelled_at\": null,\n                  \"failed_at\": null,\n                  \"completed_at\": 1699063291,\n                  \"last_error\": null,\n                  \"model\": \"gpt-4o\",\n                  \"instructions\": null,\n                  \"incomplete_details\": null,\n                  \"tools\": [\n                    {\n                      \"type\": \"code_interpreter\"\n                    }\n                  ],\n                  \"tool_resources\": {\n                    \"code_interpreter\": {\n                      \"file_ids\": [\n                        \"file-abc123\",\n                        \"file-abc456\"\n                      ]\n                    }\n                  },\n                  \"metadata\": {},\n                  \"usage\": {\n                    \"prompt_tokens\": 123,\n                    \"completion_tokens\": 456,\n                    \"total_tokens\": 579\n                  },\n                  \"temperature\": 1.0,\n                  \"top_p\": 1.0,\n                  \"max_prompt_tokens\": 1000,\n                  \"max_completion_tokens\": 1000,\n                  \"truncation_strategy\": {\n                    \"type\": \"auto\",\n                    \"last_messages\": null\n                  },\n                  \"response_format\": \"auto\",\n                  \"tool_choice\": \"auto\",\n                  \"parallel_tool_calls\": true\n                }\n              ],\n              \"first_id\": \"run_abc123\",\n              \"last_id\": \"run_abc456\",\n              \"has_more\": false\n            }\n          request:\n            curl: |\n              curl https://api.openai.com/v1/threads/thread_abc123/runs \\\n                -H \"Authorization: Bearer $OPENAI_API_KEY\" \\\n                -H \"Content-Type: application/json\" \\\n                -H \"OpenAI-Beta: assistants=v2\"\n            python: |-\n              from openai import OpenAI\n\n              client = OpenAI(\n                  api_key=\"My API Key\",\n              )\n              page = client.beta.threads.runs.list(\n                  thread_id=\"thread_id\",\n              )\n              page = page.data[0]\n              print(page.id)\n            node.js: |-\n              import OpenAI from 'openai';\n\n              const client = new OpenAI({\n                apiKey: 'My API Key',\n              });\n\n              // Automatically fetches more pages as needed.\n              for await (const run of client.beta.threads.runs.list('thread_id')) {\n                console.log(run.id);\n              }\n            go: |\n              package main\n\n              import (\n                \"context\"\n                \"fmt\"\n\n                \"github.com/openai/openai-go\"\n                \"github.com/openai/openai-go/option\"\n              )\n\n              func main() {\n                client := openai.NewClient(\n                  option.WithAPIKey(\"My API Key\"),\n                )\n                page, err := client.Beta.Threads.Runs.List(\n                  context.TODO(),\n                  \"thread_id\",\n                  openai.BetaThreadRunListParams{\n\n                  },\n                )\n                if err != nil {\n                  panic(err.Error())\n                }\n                fmt.Printf(\"%+v\\n\", page)\n              }\n            java: |-\n              package com.openai.example;\n\n              import com.openai.client.OpenAIClient;\n              import com.openai.client.okhttp.OpenAIOkHttpClient;\n              import com.openai.models.beta.threads.runs.RunListPage;\n              import com.openai.models.beta.threads.runs.RunListParams;\n\n              public final class Main {\n                  private Main() {}\n\n                  public static void main(String[] args) {\n                      OpenAIClient client = OpenAIOkHttpClient.fromEnv();\n\n                      RunListPage page = client.beta().threads().runs().list(\"thread_id\");\n                  }\n              }\n            ruby: |-\n              require \"openai\"\n\n              openai = OpenAI::Client.new(api_key: \"My API Key\")\n\n              page = openai.beta.threads.runs.list(\"thread_id\")\n\n              puts(page)\n      description: Returns a list of runs belonging to a thread.\n    post:\n      operationId: createRun\n      tags:\n        - Assistants\n      summary: Create run\n      parameters:\n        - in: path\n          name: thread_id\n          required: true\n          schema:\n            type: string\n          description: The ID of the thread to run.\n        - name: include[]\n          in: query\n          description: >\n            A list of additional fields to include in the response. Currently the only supported value is\n            `step_details.tool_calls[*].file_search.results[*].content` to fetch the file search result\n            content.\n\n\n            See the [file search tool\n            documentation](https://platform.openai.com/docs/assistants/tools/file-search#customizing-file-search-settings)\n            for more information.\n          schema:\n            type: array\n            items:\n              type: string\n              enum:\n                - step_details.tool_calls[*].file_search.results[*].content\n      requestBody:\n        required: true\n        content:\n          application/json:\n            schema:\n              $ref: '#/components/schemas/CreateRunRequest'\n      responses:\n        '200':\n          description: OK\n          content:\n            application/json:\n              schema:\n                $ref: '#/components/schemas/RunObject'\n      x-oaiMeta:\n        name: Create run\n        group: threads\n        beta: true\n        returns: A [run](https://platform.openai.com/docs/api-reference/runs/object) object.\n        examples:\n          - title: Default\n            request:\n              curl: |\n                curl https://api.openai.com/v1/threads/thread_abc123/runs \\\n                  -H \"Authorization: Bearer $OPENAI_API_KEY\" \\\n                  -H \"Content-Type: application/json\" \\\n                  -H \"OpenAI-Beta: assistants=v2\" \\\n                  -d '{\n                    \"assistant_id\": \"asst_abc123\"\n                  }'\n              python: |-\n                from openai import OpenAI\n\n                client = OpenAI(\n                    api_key=\"My API Key\",\n                )\n                run = client.beta.threads.runs.create(\n                    thread_id=\"thread_id\",\n                    assistant_id=\"assistant_id\",\n                )\n                print(run.id)\n              node.js: >-\n                import OpenAI from 'openai';\n\n\n                const client = new OpenAI({\n                  apiKey: 'My API Key',\n                });\n\n\n                const run = await client.beta.threads.runs.create('thread_id', { assistant_id: 'assistant_id'\n                });\n\n\n                console.log(run.id);\n              go: |\n                package main\n\n                import (\n                  \"context\"\n                  \"fmt\"\n\n                  \"github.com/openai/openai-go\"\n                  \"github.com/openai/openai-go/option\"\n                )\n\n                func main() {\n                  client := openai.NewClient(\n                    option.WithAPIKey(\"My API Key\"),\n                  )\n                  run, err := client.Beta.Threads.Runs.New(\n                    context.TODO(),\n                    \"thread_id\",\n                    openai.BetaThreadRunNewParams{\n                      AssistantID: \"assistant_id\",\n                    },\n                  )\n                  if err != nil {\n                    panic(err.Error())\n                  }\n                  fmt.Printf(\"%+v\\n\", run.ID)\n                }\n              java: |-\n                package com.openai.example;\n\n                import com.openai.client.OpenAIClient;\n                import com.openai.client.okhttp.OpenAIOkHttpClient;\n                import com.openai.models.beta.threads.runs.Run;\n                import com.openai.models.beta.threads.runs.RunCreateParams;\n\n                public final class Main {\n                    private Main() {}\n\n                    public static void main(String[] args) {\n                        OpenAIClient client = OpenAIOkHttpClient.fromEnv();\n\n                        RunCreateParams params = RunCreateParams.builder()\n                            .threadId(\"thread_id\")\n                            .assistantId(\"assistant_id\")\n                            .build();\n                        Run run = client.beta().threads().runs().create(params);\n                    }\n                }\n              ruby: |-\n                require \"openai\"\n\n                openai = OpenAI::Client.new(api_key: \"My API Key\")\n\n                run = openai.beta.threads.runs.create(\"thread_id\", assistant_id: \"assistant_id\")\n\n                puts(run)\n            response: |\n              {\n                \"id\": \"run_abc123\",\n                \"object\": \"thread.run\",\n                \"created_at\": 1699063290,\n                \"assistant_id\": \"asst_abc123\",\n                \"thread_id\": \"thread_abc123\",\n                \"status\": \"queued\",\n                \"started_at\": 1699063290,\n                \"expires_at\": null,\n                \"cancelled_at\": null,\n                \"failed_at\": null,\n                \"completed_at\": 1699063291,\n                \"last_error\": null,\n                \"model\": \"gpt-4o\",\n                \"instructions\": null,\n                \"incomplete_details\": null,\n                \"tools\": [\n                  {\n                    \"type\": \"code_interpreter\"\n                  }\n                ],\n                \"metadata\": {},\n                \"usage\": null,\n                \"temperature\": 1.0,\n                \"top_p\": 1.0,\n                \"max_prompt_tokens\": 1000,\n                \"max_completion_tokens\": 1000,\n                \"truncation_strategy\": {\n                  \"type\": \"auto\",\n                  \"last_messages\": null\n                },\n                \"response_format\": \"auto\",\n                \"tool_choice\": \"auto\",\n                \"parallel_tool_calls\": true\n              }\n          - title: Streaming\n            request:\n              curl: |\n                curl https://api.openai.com/v1/threads/thread_123/runs \\\n                  -H \"Authorization: Bearer $OPENAI_API_KEY\" \\\n                  -H \"Content-Type: application/json\" \\\n                  -H \"OpenAI-Beta: assistants=v2\" \\\n                  -d '{\n                    \"assistant_id\": \"asst_123\",\n                    \"stream\": true\n                  }'\n              python: |-\n                from openai import OpenAI\n\n                client = OpenAI(\n                    api_key=\"My API Key\",\n                )\n                run = client.beta.threads.runs.create(\n                    thread_id=\"thread_id\",\n                    assistant_id=\"assistant_id\",\n                )\n                print(run.id)\n              node.js: >-\n                import OpenAI from 'openai';\n\n\n                const client = new OpenAI({\n                  apiKey: 'My API Key',\n                });\n\n\n                const run = await client.beta.threads.runs.create('thread_id', { assistant_id: 'assistant_id'\n                });\n\n\n                console.log(run.id);\n              go: |\n                package main\n\n                import (\n                  \"context\"\n                  \"fmt\"\n\n                  \"github.com/openai/openai-go\"\n                  \"github.com/openai/openai-go/option\"\n                )\n\n                func main() {\n                  client := openai.NewClient(\n                    option.WithAPIKey(\"My API Key\"),\n                  )\n                  run, err := client.Beta.Threads.Runs.New(\n                    context.TODO(),\n                    \"thread_id\",\n                    openai.BetaThreadRunNewParams{\n                      AssistantID: \"assistant_id\",\n                    },\n                  )\n                  if err != nil {\n                    panic(err.Error())\n                  }\n                  fmt.Printf(\"%+v\\n\", run.ID)\n                }\n              java: |-\n                package com.openai.example;\n\n                import com.openai.client.OpenAIClient;\n                import com.openai.client.okhttp.OpenAIOkHttpClient;\n                import com.openai.models.beta.threads.runs.Run;\n                import com.openai.models.beta.threads.runs.RunCreateParams;\n\n                public final class Main {\n                    private Main() {}\n\n                    public static void main(String[] args) {\n                        OpenAIClient client = OpenAIOkHttpClient.fromEnv();\n\n                        RunCreateParams params = RunCreateParams.builder()\n                            .threadId(\"thread_id\")\n                            .assistantId(\"assistant_id\")\n                            .build();\n                        Run run = client.beta().threads().runs().create(params);\n                    }\n                }\n              ruby: |-\n                require \"openai\"\n\n                openai = OpenAI::Client.new(api_key: \"My API Key\")\n\n                run = openai.beta.threads.runs.create(\"thread_id\", assistant_id: \"assistant_id\")\n\n                puts(run)\n            response: >\n              event: thread.run.created\n\n              data:\n              {\"id\":\"run_123\",\"object\":\"thread.run\",\"created_at\":1710330640,\"assistant_id\":\"asst_123\",\"thread_id\":\"thread_123\",\"status\":\"queued\",\"started_at\":null,\"expires_at\":1710331240,\"cancelled_at\":null,\"failed_at\":null,\"completed_at\":null,\"required_action\":null,\"last_error\":null,\"model\":\"gpt-4o\",\"instructions\":null,\"tools\":[],\"metadata\":{},\"temperature\":1.0,\"top_p\":1.0,\"max_completion_tokens\":null,\"max_prompt_tokens\":null,\"truncation_strategy\":{\"type\":\"auto\",\"last_messages\":null},\"incomplete_details\":null,\"usage\":null,\"response_format\":\"auto\",\"tool_choice\":\"auto\",\"parallel_tool_calls\":true}}\n\n\n              event: thread.run.queued\n\n              data:\n              {\"id\":\"run_123\",\"object\":\"thread.run\",\"created_at\":1710330640,\"assistant_id\":\"asst_123\",\"thread_id\":\"thread_123\",\"status\":\"queued\",\"started_at\":null,\"expires_at\":1710331240,\"cancelled_at\":null,\"failed_at\":null,\"completed_at\":null,\"required_action\":null,\"last_error\":null,\"model\":\"gpt-4o\",\"instructions\":null,\"tools\":[],\"metadata\":{},\"temperature\":1.0,\"top_p\":1.0,\"max_completion_tokens\":null,\"max_prompt_tokens\":null,\"truncation_strategy\":{\"type\":\"auto\",\"last_messages\":null},\"incomplete_details\":null,\"usage\":null,\"response_format\":\"auto\",\"tool_choice\":\"auto\",\"parallel_tool_calls\":true}}\n\n\n              event: thread.run.in_progress\n\n              data:\n              {\"id\":\"run_123\",\"object\":\"thread.run\",\"created_at\":1710330640,\"assistant_id\":\"asst_123\",\"thread_id\":\"thread_123\",\"status\":\"in_progress\",\"started_at\":1710330641,\"expires_at\":1710331240,\"cancelled_at\":null,\"failed_at\":null,\"completed_at\":null,\"required_action\":null,\"last_error\":null,\"model\":\"gpt-4o\",\"instructions\":null,\"tools\":[],\"metadata\":{},\"temperature\":1.0,\"top_p\":1.0,\"max_completion_tokens\":null,\"max_prompt_tokens\":null,\"truncation_strategy\":{\"type\":\"auto\",\"last_messages\":null},\"incomplete_details\":null,\"usage\":null,\"response_format\":\"auto\",\"tool_choice\":\"auto\",\"parallel_tool_calls\":true}}\n\n\n              event: thread.run.step.created\n\n              data:\n              {\"id\":\"step_001\",\"object\":\"thread.run.step\",\"created_at\":1710330641,\"run_id\":\"run_123\",\"assistant_id\":\"asst_123\",\"thread_id\":\"thread_123\",\"type\":\"message_creation\",\"status\":\"in_progress\",\"cancelled_at\":null,\"completed_at\":null,\"expires_at\":1710331240,\"failed_at\":null,\"last_error\":null,\"step_details\":{\"type\":\"message_creation\",\"message_creation\":{\"message_id\":\"msg_001\"}},\"usage\":null}\n\n\n              event: thread.run.step.in_progress\n\n              data:\n              {\"id\":\"step_001\",\"object\":\"thread.run.step\",\"created_at\":1710330641,\"run_id\":\"run_123\",\"assistant_id\":\"asst_123\",\"thread_id\":\"thread_123\",\"type\":\"message_creation\",\"status\":\"in_progress\",\"cancelled_at\":null,\"completed_at\":null,\"expires_at\":1710331240,\"failed_at\":null,\"last_error\":null,\"step_details\":{\"type\":\"message_creation\",\"message_creation\":{\"message_id\":\"msg_001\"}},\"usage\":null}\n\n\n              event: thread.message.created\n\n              data:\n              {\"id\":\"msg_001\",\"object\":\"thread.message\",\"created_at\":1710330641,\"assistant_id\":\"asst_123\",\"thread_id\":\"thread_123\",\"run_id\":\"run_123\",\"status\":\"in_progress\",\"incomplete_details\":null,\"incomplete_at\":null,\"completed_at\":null,\"role\":\"assistant\",\"content\":[],\"metadata\":{}}\n\n\n              event: thread.message.in_progress\n\n              data:\n              {\"id\":\"msg_001\",\"object\":\"thread.message\",\"created_at\":1710330641,\"assistant_id\":\"asst_123\",\"thread_id\":\"thread_123\",\"run_id\":\"run_123\",\"status\":\"in_progress\",\"incomplete_details\":null,\"incomplete_at\":null,\"completed_at\":null,\"role\":\"assistant\",\"content\":[],\"metadata\":{}}\n\n\n              event: thread.message.delta\n\n              data:\n              {\"id\":\"msg_001\",\"object\":\"thread.message.delta\",\"delta\":{\"content\":[{\"index\":0,\"type\":\"text\",\"text\":{\"value\":\"Hello\",\"annotations\":[]}}]}}\n\n\n              ...\n\n\n              event: thread.message.delta\n\n              data:\n              {\"id\":\"msg_001\",\"object\":\"thread.message.delta\",\"delta\":{\"content\":[{\"index\":0,\"type\":\"text\",\"text\":{\"value\":\"\n              today\"}}]}}\n\n\n              event: thread.message.delta\n\n              data:\n              {\"id\":\"msg_001\",\"object\":\"thread.message.delta\",\"delta\":{\"content\":[{\"index\":0,\"type\":\"text\",\"text\":{\"value\":\"?\"}}]}}\n\n\n              event: thread.message.completed\n\n              data:\n              {\"id\":\"msg_001\",\"object\":\"thread.message\",\"created_at\":1710330641,\"assistant_id\":\"asst_123\",\"thread_id\":\"thread_123\",\"run_id\":\"run_123\",\"status\":\"completed\",\"incomplete_details\":null,\"incomplete_at\":null,\"completed_at\":1710330642,\"role\":\"assistant\",\"content\":[{\"type\":\"text\",\"text\":{\"value\":\"Hello!\n              How can I assist you today?\",\"annotations\":[]}}],\"metadata\":{}}\n\n\n              event: thread.run.step.completed\n\n              data:\n              {\"id\":\"step_001\",\"object\":\"thread.run.step\",\"created_at\":1710330641,\"run_id\":\"run_123\",\"assistant_id\":\"asst_123\",\"thread_id\":\"thread_123\",\"type\":\"message_creation\",\"status\":\"completed\",\"cancelled_at\":null,\"completed_at\":1710330642,\"expires_at\":1710331240,\"failed_at\":null,\"last_error\":null,\"step_details\":{\"type\":\"message_creation\",\"message_creation\":{\"message_id\":\"msg_001\"}},\"usage\":{\"prompt_tokens\":20,\"completion_tokens\":11,\"total_tokens\":31}}\n\n\n              event: thread.run.completed\n\n              data:\n              {\"id\":\"run_123\",\"object\":\"thread.run\",\"created_at\":1710330640,\"assistant_id\":\"asst_123\",\"thread_id\":\"thread_123\",\"status\":\"completed\",\"started_at\":1710330641,\"expires_at\":null,\"cancelled_at\":null,\"failed_at\":null,\"completed_at\":1710330642,\"required_action\":null,\"last_error\":null,\"model\":\"gpt-4o\",\"instructions\":null,\"tools\":[],\"metadata\":{},\"temperature\":1.0,\"top_p\":1.0,\"max_completion_tokens\":null,\"max_prompt_tokens\":null,\"truncation_strategy\":{\"type\":\"auto\",\"last_messages\":null},\"incomplete_details\":null,\"usage\":{\"prompt_tokens\":20,\"completion_tokens\":11,\"total_tokens\":31},\"response_format\":\"auto\",\"tool_choice\":\"auto\",\"parallel_tool_calls\":true}}\n\n\n              event: done\n\n              data: [DONE]\n          - title: Streaming with Functions\n            request:\n              curl: |\n                curl https://api.openai.com/v1/threads/thread_abc123/runs \\\n                  -H \"Authorization: Bearer $OPENAI_API_KEY\" \\\n                  -H \"Content-Type: application/json\" \\\n                  -H \"OpenAI-Beta: assistants=v2\" \\\n                  -d '{\n                    \"assistant_id\": \"asst_abc123\",\n                    \"tools\": [\n                      {\n                        \"type\": \"function\",\n                        \"function\": {\n                          \"name\": \"get_current_weather\",\n                          \"description\": \"Get the current weather in a given location\",\n                          \"parameters\": {\n                            \"type\": \"object\",\n                            \"properties\": {\n                              \"location\": {\n                                \"type\": \"string\",\n                                \"description\": \"The city and state, e.g. San Francisco, CA\"\n                              },\n                              \"unit\": {\n                                \"type\": \"string\",\n                                \"enum\": [\"celsius\", \"fahrenheit\"]\n                              }\n                            },\n                            \"required\": [\"location\"]\n                          }\n                        }\n                      }\n                    ],\n                    \"stream\": true\n                  }'\n              python: |-\n                from openai import OpenAI\n\n                client = OpenAI(\n                    api_key=\"My API Key\",\n                )\n                run = client.beta.threads.runs.create(\n                    thread_id=\"thread_id\",\n                    assistant_id=\"assistant_id\",\n                )\n                print(run.id)\n              node.js: >-\n                import OpenAI from 'openai';\n\n\n                const client = new OpenAI({\n                  apiKey: 'My API Key',\n                });\n\n\n                const run = await client.beta.threads.runs.create('thread_id', { assistant_id: 'assistant_id'\n                });\n\n\n                console.log(run.id);\n              go: |\n                package main\n\n                import (\n                  \"context\"\n                  \"fmt\"\n\n                  \"github.com/openai/openai-go\"\n                  \"github.com/openai/openai-go/option\"\n                )\n\n                func main() {\n                  client := openai.NewClient(\n                    option.WithAPIKey(\"My API Key\"),\n                  )\n                  run, err := client.Beta.Threads.Runs.New(\n                    context.TODO(),\n                    \"thread_id\",\n                    openai.BetaThreadRunNewParams{\n                      AssistantID: \"assistant_id\",\n                    },\n                  )\n                  if err != nil {\n                    panic(err.Error())\n                  }\n                  fmt.Printf(\"%+v\\n\", run.ID)\n                }\n              java: |-\n                package com.openai.example;\n\n                import com.openai.client.OpenAIClient;\n                import com.openai.client.okhttp.OpenAIOkHttpClient;\n                import com.openai.models.beta.threads.runs.Run;\n                import com.openai.models.beta.threads.runs.RunCreateParams;\n\n                public final class Main {\n                    private Main() {}\n\n                    public static void main(String[] args) {\n                        OpenAIClient client = OpenAIOkHttpClient.fromEnv();\n\n                        RunCreateParams params = RunCreateParams.builder()\n                            .threadId(\"thread_id\")\n                            .assistantId(\"assistant_id\")\n                            .build();\n                        Run run = client.beta().threads().runs().create(params);\n                    }\n                }\n              ruby: |-\n                require \"openai\"\n\n                openai = OpenAI::Client.new(api_key: \"My API Key\")\n\n                run = openai.beta.threads.runs.create(\"thread_id\", assistant_id: \"assistant_id\")\n\n                puts(run)\n            response: >\n              event: thread.run.created\n\n              data:\n              {\"id\":\"run_123\",\"object\":\"thread.run\",\"created_at\":1710348075,\"assistant_id\":\"asst_123\",\"thread_id\":\"thread_123\",\"status\":\"queued\",\"started_at\":null,\"expires_at\":1710348675,\"cancelled_at\":null,\"failed_at\":null,\"completed_at\":null,\"required_action\":null,\"last_error\":null,\"model\":\"gpt-4o\",\"instructions\":null,\"tools\":[],\"metadata\":{},\"temperature\":1.0,\"top_p\":1.0,\"max_completion_tokens\":null,\"max_prompt_tokens\":null,\"truncation_strategy\":{\"type\":\"auto\",\"last_messages\":null},\"incomplete_details\":null,\"usage\":null,\"response_format\":\"auto\",\"tool_choice\":\"auto\",\"parallel_tool_calls\":true}}\n\n\n              event: thread.run.queued\n\n              data:\n              {\"id\":\"run_123\",\"object\":\"thread.run\",\"created_at\":1710348075,\"assistant_id\":\"asst_123\",\"thread_id\":\"thread_123\",\"status\":\"queued\",\"started_at\":null,\"expires_at\":1710348675,\"cancelled_at\":null,\"failed_at\":null,\"completed_at\":null,\"required_action\":null,\"last_error\":null,\"model\":\"gpt-4o\",\"instructions\":null,\"tools\":[],\"metadata\":{},\"temperature\":1.0,\"top_p\":1.0,\"max_completion_tokens\":null,\"max_prompt_tokens\":null,\"truncation_strategy\":{\"type\":\"auto\",\"last_messages\":null},\"incomplete_details\":null,\"usage\":null,\"response_format\":\"auto\",\"tool_choice\":\"auto\",\"parallel_tool_calls\":true}}\n\n\n              event: thread.run.in_progress\n\n              data:\n              {\"id\":\"run_123\",\"object\":\"thread.run\",\"created_at\":1710348075,\"assistant_id\":\"asst_123\",\"thread_id\":\"thread_123\",\"status\":\"in_progress\",\"started_at\":1710348075,\"expires_at\":1710348675,\"cancelled_at\":null,\"failed_at\":null,\"completed_at\":null,\"required_action\":null,\"last_error\":null,\"model\":\"gpt-4o\",\"instructions\":null,\"tools\":[],\"metadata\":{},\"temperature\":1.0,\"top_p\":1.0,\"max_completion_tokens\":null,\"max_prompt_tokens\":null,\"truncation_strategy\":{\"type\":\"auto\",\"last_messages\":null},\"incomplete_details\":null,\"usage\":null,\"response_format\":\"auto\",\"tool_choice\":\"auto\",\"parallel_tool_calls\":true}}\n\n\n              event: thread.run.step.created\n\n              data:\n              {\"id\":\"step_001\",\"object\":\"thread.run.step\",\"created_at\":1710348076,\"run_id\":\"run_123\",\"assistant_id\":\"asst_123\",\"thread_id\":\"thread_123\",\"type\":\"message_creation\",\"status\":\"in_progress\",\"cancelled_at\":null,\"completed_at\":null,\"expires_at\":1710348675,\"failed_at\":null,\"last_error\":null,\"step_details\":{\"type\":\"message_creation\",\"message_creation\":{\"message_id\":\"msg_001\"}},\"usage\":null}\n\n\n              event: thread.run.step.in_progress\n\n              data:\n              {\"id\":\"step_001\",\"object\":\"thread.run.step\",\"created_at\":1710348076,\"run_id\":\"run_123\",\"assistant_id\":\"asst_123\",\"thread_id\":\"thread_123\",\"type\":\"message_creation\",\"status\":\"in_progress\",\"cancelled_at\":null,\"completed_at\":null,\"expires_at\":1710348675,\"failed_at\":null,\"last_error\":null,\"step_details\":{\"type\":\"message_creation\",\"message_creation\":{\"message_id\":\"msg_001\"}},\"usage\":null}\n\n\n              event: thread.message.created\n\n              data:\n              {\"id\":\"msg_001\",\"object\":\"thread.message\",\"created_at\":1710348076,\"assistant_id\":\"asst_123\",\"thread_id\":\"thread_123\",\"run_id\":\"run_123\",\"status\":\"in_progress\",\"incomplete_details\":null,\"incomplete_at\":null,\"completed_at\":null,\"role\":\"assistant\",\"content\":[],\"metadata\":{}}\n\n\n              event: thread.message.in_progress\n\n              data:\n              {\"id\":\"msg_001\",\"object\":\"thread.message\",\"created_at\":1710348076,\"assistant_id\":\"asst_123\",\"thread_id\":\"thread_123\",\"run_id\":\"run_123\",\"status\":\"in_progress\",\"incomplete_details\":null,\"incomplete_at\":null,\"completed_at\":null,\"role\":\"assistant\",\"content\":[],\"metadata\":{}}\n\n\n              event: thread.message.delta\n\n              data:\n              {\"id\":\"msg_001\",\"object\":\"thread.message.delta\",\"delta\":{\"content\":[{\"index\":0,\"type\":\"text\",\"text\":{\"value\":\"Hello\",\"annotations\":[]}}]}}\n\n\n              ...\n\n\n              event: thread.message.delta\n\n              data:\n              {\"id\":\"msg_001\",\"object\":\"thread.message.delta\",\"delta\":{\"content\":[{\"index\":0,\"type\":\"text\",\"text\":{\"value\":\"\n              today\"}}]}}\n\n\n              event: thread.message.delta\n\n              data:\n              {\"id\":\"msg_001\",\"object\":\"thread.message.delta\",\"delta\":{\"content\":[{\"index\":0,\"type\":\"text\",\"text\":{\"value\":\"?\"}}]}}\n\n\n              event: thread.message.completed\n\n              data:\n              {\"id\":\"msg_001\",\"object\":\"thread.message\",\"created_at\":1710348076,\"assistant_id\":\"asst_123\",\"thread_id\":\"thread_123\",\"run_id\":\"run_123\",\"status\":\"completed\",\"incomplete_details\":null,\"incomplete_at\":null,\"completed_at\":1710348077,\"role\":\"assistant\",\"content\":[{\"type\":\"text\",\"text\":{\"value\":\"Hello!\n              How can I assist you today?\",\"annotations\":[]}}],\"metadata\":{}}\n\n\n              event: thread.run.step.completed\n\n              data:\n              {\"id\":\"step_001\",\"object\":\"thread.run.step\",\"created_at\":1710348076,\"run_id\":\"run_123\",\"assistant_id\":\"asst_123\",\"thread_id\":\"thread_123\",\"type\":\"message_creation\",\"status\":\"completed\",\"cancelled_at\":null,\"completed_at\":1710348077,\"expires_at\":1710348675,\"failed_at\":null,\"last_error\":null,\"step_details\":{\"type\":\"message_creation\",\"message_creation\":{\"message_id\":\"msg_001\"}},\"usage\":{\"prompt_tokens\":20,\"completion_tokens\":11,\"total_tokens\":31}}\n\n\n              event: thread.run.completed\n\n              data:\n              {\"id\":\"run_123\",\"object\":\"thread.run\",\"created_at\":1710348075,\"assistant_id\":\"asst_123\",\"thread_id\":\"thread_123\",\"status\":\"completed\",\"started_at\":1710348075,\"expires_at\":null,\"cancelled_at\":null,\"failed_at\":null,\"completed_at\":1710348077,\"required_action\":null,\"last_error\":null,\"model\":\"gpt-4o\",\"instructions\":null,\"tools\":[],\"metadata\":{},\"temperature\":1.0,\"top_p\":1.0,\"max_completion_tokens\":null,\"max_prompt_tokens\":null,\"truncation_strategy\":{\"type\":\"auto\",\"last_messages\":null},\"incomplete_details\":null,\"usage\":{\"prompt_tokens\":20,\"completion_tokens\":11,\"total_tokens\":31},\"response_format\":\"auto\",\"tool_choice\":\"auto\",\"parallel_tool_calls\":true}}\n\n\n              event: done\n\n              data: [DONE]\n      description: Create a run.\n  /threads/{thread_id}/runs/{run_id}:\n    get:\n      operationId: getRun\n      tags:\n        - Assistants\n      summary: Retrieve run\n      parameters:\n        - in: path\n          name: thread_id\n          required: true\n          schema:\n            type: string\n          description: The ID of the [thread](https://platform.openai.com/docs/api-reference/threads) that was run.\n        - in: path\n          name: run_id\n          required: true\n          schema:\n            type: string\n          description: The ID of the run to retrieve.\n      responses:\n        '200':\n          description: OK\n          content:\n            application/json:\n              schema:\n                $ref: '#/components/schemas/RunObject'\n      x-oaiMeta:\n        name: Retrieve run\n        group: threads\n        beta: true\n        returns: >-\n          The [run](https://platform.openai.com/docs/api-reference/runs/object) object matching the specified\n          ID.\n        examples:\n          response: |\n            {\n              \"id\": \"run_abc123\",\n              \"object\": \"thread.run\",\n              \"created_at\": 1699075072,\n              \"assistant_id\": \"asst_abc123\",\n              \"thread_id\": \"thread_abc123\",\n              \"status\": \"completed\",\n              \"started_at\": 1699075072,\n              \"expires_at\": null,\n              \"cancelled_at\": null,\n              \"failed_at\": null,\n              \"completed_at\": 1699075073,\n              \"last_error\": null,\n              \"model\": \"gpt-4o\",\n              \"instructions\": null,\n              \"incomplete_details\": null,\n              \"tools\": [\n                {\n                  \"type\": \"code_interpreter\"\n                }\n              ],\n              \"metadata\": {},\n              \"usage\": {\n                \"prompt_tokens\": 123,\n                \"completion_tokens\": 456,\n                \"total_tokens\": 579\n              },\n              \"temperature\": 1.0,\n              \"top_p\": 1.0,\n              \"max_prompt_tokens\": 1000,\n              \"max_completion_tokens\": 1000,\n              \"truncation_strategy\": {\n                \"type\": \"auto\",\n                \"last_messages\": null\n              },\n              \"response_format\": \"auto\",\n              \"tool_choice\": \"auto\",\n              \"parallel_tool_calls\": true\n            }\n          request:\n            curl: |\n              curl https://api.openai.com/v1/threads/thread_abc123/runs/run_abc123 \\\n                -H \"Authorization: Bearer $OPENAI_API_KEY\" \\\n                -H \"OpenAI-Beta: assistants=v2\"\n            python: |-\n              from openai import OpenAI\n\n              client = OpenAI(\n                  api_key=\"My API Key\",\n              )\n              run = client.beta.threads.runs.retrieve(\n                  run_id=\"run_id\",\n                  thread_id=\"thread_id\",\n              )\n              print(run.id)\n            node.js: |-\n              import OpenAI from 'openai';\n\n              const client = new OpenAI({\n                apiKey: 'My API Key',\n              });\n\n              const run = await client.beta.threads.runs.retrieve('run_id', { thread_id: 'thread_id' });\n\n              console.log(run.id);\n            go: |\n              package main\n\n              import (\n                \"context\"\n                \"fmt\"\n\n                \"github.com/openai/openai-go\"\n                \"github.com/openai/openai-go/option\"\n              )\n\n              func main() {\n                client := openai.NewClient(\n                  option.WithAPIKey(\"My API Key\"),\n                )\n                run, err := client.Beta.Threads.Runs.Get(\n                  context.TODO(),\n                  \"thread_id\",\n                  \"run_id\",\n                )\n                if err != nil {\n                  panic(err.Error())\n                }\n                fmt.Printf(\"%+v\\n\", run.ID)\n              }\n            java: |-\n              package com.openai.example;\n\n              import com.openai.client.OpenAIClient;\n              import com.openai.client.okhttp.OpenAIOkHttpClient;\n              import com.openai.models.beta.threads.runs.Run;\n              import com.openai.models.beta.threads.runs.RunRetrieveParams;\n\n              public final class Main {\n                  private Main() {}\n\n                  public static void main(String[] args) {\n                      OpenAIClient client = OpenAIOkHttpClient.fromEnv();\n\n                      RunRetrieveParams params = RunRetrieveParams.builder()\n                          .threadId(\"thread_id\")\n                          .runId(\"run_id\")\n                          .build();\n                      Run run = client.beta().threads().runs().retrieve(params);\n                  }\n              }\n            ruby: |-\n              require \"openai\"\n\n              openai = OpenAI::Client.new(api_key: \"My API Key\")\n\n              run = openai.beta.threads.runs.retrieve(\"run_id\", thread_id: \"thread_id\")\n\n              puts(run)\n      description: Retrieves a run.\n    post:\n      operationId: modifyRun\n      tags:\n        - Assistants\n      summary: Modify run\n      parameters:\n        - in: path\n          name: thread_id\n          required: true\n          schema:\n            type: string\n          description: The ID of the [thread](https://platform.openai.com/docs/api-reference/threads) that was run.\n        - in: path\n          name: run_id\n          required: true\n          schema:\n            type: string\n          description: The ID of the run to modify.\n      requestBody:\n        required: true\n        content:\n          application/json:\n            schema:\n              $ref: '#/components/schemas/ModifyRunRequest'\n      responses:\n        '200':\n          description: OK\n          content:\n            application/json:\n              schema:\n                $ref: '#/components/schemas/RunObject'\n      x-oaiMeta:\n        name: Modify run\n        group: threads\n        beta: true\n        returns: >-\n          The modified [run](https://platform.openai.com/docs/api-reference/runs/object) object matching the\n          specified ID.\n        examples:\n          response: |\n            {\n              \"id\": \"run_abc123\",\n              \"object\": \"thread.run\",\n              \"created_at\": 1699075072,\n              \"assistant_id\": \"asst_abc123\",\n              \"thread_id\": \"thread_abc123\",\n              \"status\": \"completed\",\n              \"started_at\": 1699075072,\n              \"expires_at\": null,\n              \"cancelled_at\": null,\n              \"failed_at\": null,\n              \"completed_at\": 1699075073,\n              \"last_error\": null,\n              \"model\": \"gpt-4o\",\n              \"instructions\": null,\n              \"incomplete_details\": null,\n              \"tools\": [\n                {\n                  \"type\": \"code_interpreter\"\n                }\n              ],\n              \"tool_resources\": {\n                \"code_interpreter\": {\n                  \"file_ids\": [\n                    \"file-abc123\",\n                    \"file-abc456\"\n                  ]\n                }\n              },\n              \"metadata\": {\n                \"user_id\": \"user_abc123\"\n              },\n              \"usage\": {\n                \"prompt_tokens\": 123,\n                \"completion_tokens\": 456,\n                \"total_tokens\": 579\n              },\n              \"temperature\": 1.0,\n              \"top_p\": 1.0,\n              \"max_prompt_tokens\": 1000,\n              \"max_completion_tokens\": 1000,\n              \"truncation_strategy\": {\n                \"type\": \"auto\",\n                \"last_messages\": null\n              },\n              \"response_format\": \"auto\",\n              \"tool_choice\": \"auto\",\n              \"parallel_tool_calls\": true\n            }\n          request:\n            curl: |\n              curl https://api.openai.com/v1/threads/thread_abc123/runs/run_abc123 \\\n                -H \"Authorization: Bearer $OPENAI_API_KEY\" \\\n                -H \"Content-Type: application/json\" \\\n                -H \"OpenAI-Beta: assistants=v2\" \\\n                -d '{\n                  \"metadata\": {\n                    \"user_id\": \"user_abc123\"\n                  }\n                }'\n            python: |-\n              from openai import OpenAI\n\n              client = OpenAI(\n                  api_key=\"My API Key\",\n              )\n              run = client.beta.threads.runs.update(\n                  run_id=\"run_id\",\n                  thread_id=\"thread_id\",\n              )\n              print(run.id)\n            node.js: |-\n              import OpenAI from 'openai';\n\n              const client = new OpenAI({\n                apiKey: 'My API Key',\n              });\n\n              const run = await client.beta.threads.runs.update('run_id', { thread_id: 'thread_id' });\n\n              console.log(run.id);\n            go: |\n              package main\n\n              import (\n                \"context\"\n                \"fmt\"\n\n                \"github.com/openai/openai-go\"\n                \"github.com/openai/openai-go/option\"\n              )\n\n              func main() {\n                client := openai.NewClient(\n                  option.WithAPIKey(\"My API Key\"),\n                )\n                run, err := client.Beta.Threads.Runs.Update(\n                  context.TODO(),\n                  \"thread_id\",\n                  \"run_id\",\n                  openai.BetaThreadRunUpdateParams{\n\n                  },\n                )\n                if err != nil {\n                  panic(err.Error())\n                }\n                fmt.Printf(\"%+v\\n\", run.ID)\n              }\n            java: |-\n              package com.openai.example;\n\n              import com.openai.client.OpenAIClient;\n              import com.openai.client.okhttp.OpenAIOkHttpClient;\n              import com.openai.models.beta.threads.runs.Run;\n              import com.openai.models.beta.threads.runs.RunUpdateParams;\n\n              public final class Main {\n                  private Main() {}\n\n                  public static void main(String[] args) {\n                      OpenAIClient client = OpenAIOkHttpClient.fromEnv();\n\n                      RunUpdateParams params = RunUpdateParams.builder()\n                          .threadId(\"thread_id\")\n                          .runId(\"run_id\")\n                          .build();\n                      Run run = client.beta().threads().runs().update(params);\n                  }\n              }\n            ruby: |-\n              require \"openai\"\n\n              openai = OpenAI::Client.new(api_key: \"My API Key\")\n\n              run = openai.beta.threads.runs.update(\"run_id\", thread_id: \"thread_id\")\n\n              puts(run)\n      description: Modifies a run.\n  /threads/{thread_id}/runs/{run_id}/cancel:\n    post:\n      operationId: cancelRun\n      tags:\n        - Assistants\n      summary: Cancel a run\n      parameters:\n        - in: path\n          name: thread_id\n          required: true\n          schema:\n            type: string\n          description: The ID of the thread to which this run belongs.\n        - in: path\n          name: run_id\n          required: true\n          schema:\n            type: string\n          description: The ID of the run to cancel.\n      responses:\n        '200':\n          description: OK\n          content:\n            application/json:\n              schema:\n                $ref: '#/components/schemas/RunObject'\n      x-oaiMeta:\n        name: Cancel a run\n        group: threads\n        beta: true\n        returns: >-\n          The modified [run](https://platform.openai.com/docs/api-reference/runs/object) object matching the\n          specified ID.\n        examples:\n          response: |\n            {\n              \"id\": \"run_abc123\",\n              \"object\": \"thread.run\",\n              \"created_at\": 1699076126,\n              \"assistant_id\": \"asst_abc123\",\n              \"thread_id\": \"thread_abc123\",\n              \"status\": \"cancelling\",\n              \"started_at\": 1699076126,\n              \"expires_at\": 1699076726,\n              \"cancelled_at\": null,\n              \"failed_at\": null,\n              \"completed_at\": null,\n              \"last_error\": null,\n              \"model\": \"gpt-4o\",\n              \"instructions\": \"You summarize books.\",\n              \"tools\": [\n                {\n                  \"type\": \"file_search\"\n                }\n              ],\n              \"tool_resources\": {\n                \"file_search\": {\n                  \"vector_store_ids\": [\"vs_123\"]\n                }\n              },\n              \"metadata\": {},\n              \"usage\": null,\n              \"temperature\": 1.0,\n              \"top_p\": 1.0,\n              \"response_format\": \"auto\",\n              \"tool_choice\": \"auto\",\n              \"parallel_tool_calls\": true\n            }\n          request:\n            curl: |\n              curl https://api.openai.com/v1/threads/thread_abc123/runs/run_abc123/cancel \\\n                -H \"Authorization: Bearer $OPENAI_API_KEY\" \\\n                -H \"OpenAI-Beta: assistants=v2\" \\\n                -X POST\n            python: |-\n              from openai import OpenAI\n\n              client = OpenAI(\n                  api_key=\"My API Key\",\n              )\n              run = client.beta.threads.runs.cancel(\n                  run_id=\"run_id\",\n                  thread_id=\"thread_id\",\n              )\n              print(run.id)\n            node.js: |-\n              import OpenAI from 'openai';\n\n              const client = new OpenAI({\n                apiKey: 'My API Key',\n              });\n\n              const run = await client.beta.threads.runs.cancel('run_id', { thread_id: 'thread_id' });\n\n              console.log(run.id);\n            go: |\n              package main\n\n              import (\n                \"context\"\n                \"fmt\"\n\n                \"github.com/openai/openai-go\"\n                \"github.com/openai/openai-go/option\"\n              )\n\n              func main() {\n                client := openai.NewClient(\n                  option.WithAPIKey(\"My API Key\"),\n                )\n                run, err := client.Beta.Threads.Runs.Cancel(\n                  context.TODO(),\n                  \"thread_id\",\n                  \"run_id\",\n                )\n                if err != nil {\n                  panic(err.Error())\n                }\n                fmt.Printf(\"%+v\\n\", run.ID)\n              }\n            java: |-\n              package com.openai.example;\n\n              import com.openai.client.OpenAIClient;\n              import com.openai.client.okhttp.OpenAIOkHttpClient;\n              import com.openai.models.beta.threads.runs.Run;\n              import com.openai.models.beta.threads.runs.RunCancelParams;\n\n              public final class Main {\n                  private Main() {}\n\n                  public static void main(String[] args) {\n                      OpenAIClient client = OpenAIOkHttpClient.fromEnv();\n\n                      RunCancelParams params = RunCancelParams.builder()\n                          .threadId(\"thread_id\")\n                          .runId(\"run_id\")\n                          .build();\n                      Run run = client.beta().threads().runs().cancel(params);\n                  }\n              }\n            ruby: |-\n              require \"openai\"\n\n              openai = OpenAI::Client.new(api_key: \"My API Key\")\n\n              run = openai.beta.threads.runs.cancel(\"run_id\", thread_id: \"thread_id\")\n\n              puts(run)\n      description: Cancels a run that is `in_progress`.\n  /threads/{thread_id}/runs/{run_id}/steps:\n    get:\n      operationId: listRunSteps\n      tags:\n        - Assistants\n      summary: List run steps\n      parameters:\n        - name: thread_id\n          in: path\n          required: true\n          schema:\n            type: string\n          description: The ID of the thread the run and run steps belong to.\n        - name: run_id\n          in: path\n          required: true\n          schema:\n            type: string\n          description: The ID of the run the run steps belong to.\n        - name: limit\n          in: query\n          description: >\n            A limit on the number of objects to be returned. Limit can range between 1 and 100, and the\n            default is 20.\n          required: false\n          schema:\n            type: integer\n            default: 20\n        - name: order\n          in: query\n          description: >\n            Sort order by the `created_at` timestamp of the objects. `asc` for ascending order and `desc` for\n            descending order.\n          schema:\n            type: string\n            default: desc\n            enum:\n              - asc\n              - desc\n        - name: after\n          in: query\n          description: >\n            A cursor for use in pagination. `after` is an object ID that defines your place in the list. For\n            instance, if you make a list request and receive 100 objects, ending with obj_foo, your subsequent\n            call can include after=obj_foo in order to fetch the next page of the list.\n          schema:\n            type: string\n        - name: before\n          in: query\n          description: >\n            A cursor for use in pagination. `before` is an object ID that defines your place in the list. For\n            instance, if you make a list request and receive 100 objects, starting with obj_foo, your\n            subsequent call can include before=obj_foo in order to fetch the previous page of the list.\n          schema:\n            type: string\n        - name: include[]\n          in: query\n          description: >\n            A list of additional fields to include in the response. Currently the only supported value is\n            `step_details.tool_calls[*].file_search.results[*].content` to fetch the file search result\n            content.\n\n\n            See the [file search tool\n            documentation](https://platform.openai.com/docs/assistants/tools/file-search#customizing-file-search-settings)\n            for more information.\n          schema:\n            type: array\n            items:\n              type: string\n              enum:\n                - step_details.tool_calls[*].file_search.results[*].content\n      responses:\n        '200':\n          description: OK\n          content:\n            application/json:\n              schema:\n                $ref: '#/components/schemas/ListRunStepsResponse'\n      x-oaiMeta:\n        name: List run steps\n        group: threads\n        beta: true\n        returns: A list of [run step](https://platform.openai.com/docs/api-reference/run-steps/step-object) objects.\n        examples:\n          response: |\n            {\n              \"object\": \"list\",\n              \"data\": [\n                {\n                  \"id\": \"step_abc123\",\n                  \"object\": \"thread.run.step\",\n                  \"created_at\": 1699063291,\n                  \"run_id\": \"run_abc123\",\n                  \"assistant_id\": \"asst_abc123\",\n                  \"thread_id\": \"thread_abc123\",\n                  \"type\": \"message_creation\",\n                  \"status\": \"completed\",\n                  \"cancelled_at\": null,\n                  \"completed_at\": 1699063291,\n                  \"expired_at\": null,\n                  \"failed_at\": null,\n                  \"last_error\": null,\n                  \"step_details\": {\n                    \"type\": \"message_creation\",\n                    \"message_creation\": {\n                      \"message_id\": \"msg_abc123\"\n                    }\n                  },\n                  \"usage\": {\n                    \"prompt_tokens\": 123,\n                    \"completion_tokens\": 456,\n                    \"total_tokens\": 579\n                  }\n                }\n              ],\n              \"first_id\": \"step_abc123\",\n              \"last_id\": \"step_abc456\",\n              \"has_more\": false\n            }\n          request:\n            curl: |\n              curl https://api.openai.com/v1/threads/thread_abc123/runs/run_abc123/steps \\\n                -H \"Authorization: Bearer $OPENAI_API_KEY\" \\\n                -H \"Content-Type: application/json\" \\\n                -H \"OpenAI-Beta: assistants=v2\"\n            python: |-\n              from openai import OpenAI\n\n              client = OpenAI(\n                  api_key=\"My API Key\",\n              )\n              page = client.beta.threads.runs.steps.list(\n                  run_id=\"run_id\",\n                  thread_id=\"thread_id\",\n              )\n              page = page.data[0]\n              print(page.id)\n            node.js: >-\n              import OpenAI from 'openai';\n\n\n              const client = new OpenAI({\n                apiKey: 'My API Key',\n              });\n\n\n              // Automatically fetches more pages as needed.\n\n              for await (const runStep of client.beta.threads.runs.steps.list('run_id', { thread_id:\n              'thread_id' })) {\n                console.log(runStep.id);\n              }\n            go: |\n              package main\n\n              import (\n                \"context\"\n                \"fmt\"\n\n                \"github.com/openai/openai-go\"\n                \"github.com/openai/openai-go/option\"\n              )\n\n              func main() {\n                client := openai.NewClient(\n                  option.WithAPIKey(\"My API Key\"),\n                )\n                page, err := client.Beta.Threads.Runs.Steps.List(\n                  context.TODO(),\n                  \"thread_id\",\n                  \"run_id\",\n                  openai.BetaThreadRunStepListParams{\n\n                  },\n                )\n                if err != nil {\n                  panic(err.Error())\n                }\n                fmt.Printf(\"%+v\\n\", page)\n              }\n            java: |-\n              package com.openai.example;\n\n              import com.openai.client.OpenAIClient;\n              import com.openai.client.okhttp.OpenAIOkHttpClient;\n              import com.openai.models.beta.threads.runs.steps.StepListPage;\n              import com.openai.models.beta.threads.runs.steps.StepListParams;\n\n              public final class Main {\n                  private Main() {}\n\n                  public static void main(String[] args) {\n                      OpenAIClient client = OpenAIOkHttpClient.fromEnv();\n\n                      StepListParams params = StepListParams.builder()\n                          .threadId(\"thread_id\")\n                          .runId(\"run_id\")\n                          .build();\n                      StepListPage page = client.beta().threads().runs().steps().list(params);\n                  }\n              }\n            ruby: |-\n              require \"openai\"\n\n              openai = OpenAI::Client.new(api_key: \"My API Key\")\n\n              page = openai.beta.threads.runs.steps.list(\"run_id\", thread_id: \"thread_id\")\n\n              puts(page)\n      description: Returns a list of run steps belonging to a run.\n  /threads/{thread_id}/runs/{run_id}/steps/{step_id}:\n    get:\n      operationId: getRunStep\n      tags:\n        - Assistants\n      summary: Retrieve run step\n      parameters:\n        - in: path\n          name: thread_id\n          required: true\n          schema:\n            type: string\n          description: The ID of the thread to which the run and run step belongs.\n        - in: path\n          name: run_id\n          required: true\n          schema:\n            type: string\n          description: The ID of the run to which the run step belongs.\n        - in: path\n          name: step_id\n          required: true\n          schema:\n            type: string\n          description: The ID of the run step to retrieve.\n        - name: include[]\n          in: query\n          description: >\n            A list of additional fields to include in the response. Currently the only supported value is\n            `step_details.tool_calls[*].file_search.results[*].content` to fetch the file search result\n            content.\n\n\n            See the [file search tool\n            documentation](https://platform.openai.com/docs/assistants/tools/file-search#customizing-file-search-settings)\n            for more information.\n          schema:\n            type: array\n            items:\n              type: string\n              enum:\n                - step_details.tool_calls[*].file_search.results[*].content\n      responses:\n        '200':\n          description: OK\n          content:\n            application/json:\n              schema:\n                $ref: '#/components/schemas/RunStepObject'\n      x-oaiMeta:\n        name: Retrieve run step\n        group: threads\n        beta: true\n        returns: >-\n          The [run step](https://platform.openai.com/docs/api-reference/run-steps/step-object) object matching\n          the specified ID.\n        examples:\n          response: |\n            {\n              \"id\": \"step_abc123\",\n              \"object\": \"thread.run.step\",\n              \"created_at\": 1699063291,\n              \"run_id\": \"run_abc123\",\n              \"assistant_id\": \"asst_abc123\",\n              \"thread_id\": \"thread_abc123\",\n              \"type\": \"message_creation\",\n              \"status\": \"completed\",\n              \"cancelled_at\": null,\n              \"completed_at\": 1699063291,\n              \"expired_at\": null,\n              \"failed_at\": null,\n              \"last_error\": null,\n              \"step_details\": {\n                \"type\": \"message_creation\",\n                \"message_creation\": {\n                  \"message_id\": \"msg_abc123\"\n                }\n              },\n              \"usage\": {\n                \"prompt_tokens\": 123,\n                \"completion_tokens\": 456,\n                \"total_tokens\": 579\n              }\n            }\n          request:\n            curl: |\n              curl https://api.openai.com/v1/threads/thread_abc123/runs/run_abc123/steps/step_abc123 \\\n                -H \"Authorization: Bearer $OPENAI_API_KEY\" \\\n                -H \"Content-Type: application/json\" \\\n                -H \"OpenAI-Beta: assistants=v2\"\n            python: |-\n              from openai import OpenAI\n\n              client = OpenAI(\n                  api_key=\"My API Key\",\n              )\n              run_step = client.beta.threads.runs.steps.retrieve(\n                  step_id=\"step_id\",\n                  thread_id=\"thread_id\",\n                  run_id=\"run_id\",\n              )\n              print(run_step.id)\n            node.js: |-\n              import OpenAI from 'openai';\n\n              const client = new OpenAI({\n                apiKey: 'My API Key',\n              });\n\n              const runStep = await client.beta.threads.runs.steps.retrieve('step_id', {\n                thread_id: 'thread_id',\n                run_id: 'run_id',\n              });\n\n              console.log(runStep.id);\n            go: |\n              package main\n\n              import (\n                \"context\"\n                \"fmt\"\n\n                \"github.com/openai/openai-go\"\n                \"github.com/openai/openai-go/option\"\n              )\n\n              func main() {\n                client := openai.NewClient(\n                  option.WithAPIKey(\"My API Key\"),\n                )\n                runStep, err := client.Beta.Threads.Runs.Steps.Get(\n                  context.TODO(),\n                  \"thread_id\",\n                  \"run_id\",\n                  \"step_id\",\n                  openai.BetaThreadRunStepGetParams{\n\n                  },\n                )\n                if err != nil {\n                  panic(err.Error())\n                }\n                fmt.Printf(\"%+v\\n\", runStep.ID)\n              }\n            java: |-\n              package com.openai.example;\n\n              import com.openai.client.OpenAIClient;\n              import com.openai.client.okhttp.OpenAIOkHttpClient;\n              import com.openai.models.beta.threads.runs.steps.RunStep;\n              import com.openai.models.beta.threads.runs.steps.StepRetrieveParams;\n\n              public final class Main {\n                  private Main() {}\n\n                  public static void main(String[] args) {\n                      OpenAIClient client = OpenAIOkHttpClient.fromEnv();\n\n                      StepRetrieveParams params = StepRetrieveParams.builder()\n                          .threadId(\"thread_id\")\n                          .runId(\"run_id\")\n                          .stepId(\"step_id\")\n                          .build();\n                      RunStep runStep = client.beta().threads().runs().steps().retrieve(params);\n                  }\n              }\n            ruby: >-\n              require \"openai\"\n\n\n              openai = OpenAI::Client.new(api_key: \"My API Key\")\n\n\n              run_step = openai.beta.threads.runs.steps.retrieve(\"step_id\", thread_id: \"thread_id\", run_id:\n              \"run_id\")\n\n\n              puts(run_step)\n      description: Retrieves a run step.\n  /threads/{thread_id}/runs/{run_id}/submit_tool_outputs:\n    post:\n      operationId: submitToolOuputsToRun\n      tags:\n        - Assistants\n      summary: Submit tool outputs to run\n      parameters:\n        - in: path\n          name: thread_id\n          required: true\n          schema:\n            type: string\n          description: >-\n            The ID of the [thread](https://platform.openai.com/docs/api-reference/threads) to which this run\n            belongs.\n        - in: path\n          name: run_id\n          required: true\n          schema:\n            type: string\n          description: The ID of the run that requires the tool output submission.\n      requestBody:\n        required: true\n        content:\n          application/json:\n            schema:\n              $ref: '#/components/schemas/SubmitToolOutputsRunRequest'\n      responses:\n        '200':\n          description: OK\n          content:\n            application/json:\n              schema:\n                $ref: '#/components/schemas/RunObject'\n      x-oaiMeta:\n        name: Submit tool outputs to run\n        group: threads\n        beta: true\n        returns: >-\n          The modified [run](https://platform.openai.com/docs/api-reference/runs/object) object matching the\n          specified ID.\n        examples:\n          - title: Default\n            request:\n              curl: |\n                curl https://api.openai.com/v1/threads/thread_123/runs/run_123/submit_tool_outputs \\\n                  -H \"Authorization: Bearer $OPENAI_API_KEY\" \\\n                  -H \"Content-Type: application/json\" \\\n                  -H \"OpenAI-Beta: assistants=v2\" \\\n                  -d '{\n                    \"tool_outputs\": [\n                      {\n                        \"tool_call_id\": \"call_001\",\n                        \"output\": \"70 degrees and sunny.\"\n                      }\n                    ]\n                  }'\n              python: |-\n                from openai import OpenAI\n\n                client = OpenAI(\n                    api_key=\"My API Key\",\n                )\n                run = client.beta.threads.runs.submit_tool_outputs(\n                    run_id=\"run_id\",\n                    thread_id=\"thread_id\",\n                    tool_outputs=[{}],\n                )\n                print(run.id)\n              node.js: |-\n                import OpenAI from 'openai';\n\n                const client = new OpenAI({\n                  apiKey: 'My API Key',\n                });\n\n                const run = await client.beta.threads.runs.submitToolOutputs('run_id', {\n                  thread_id: 'thread_id',\n                  tool_outputs: [{}],\n                });\n\n                console.log(run.id);\n              go: |\n                package main\n\n                import (\n                  \"context\"\n                  \"fmt\"\n\n                  \"github.com/openai/openai-go\"\n                  \"github.com/openai/openai-go/option\"\n                )\n\n                func main() {\n                  client := openai.NewClient(\n                    option.WithAPIKey(\"My API Key\"),\n                  )\n                  run, err := client.Beta.Threads.Runs.SubmitToolOutputs(\n                    context.TODO(),\n                    \"thread_id\",\n                    \"run_id\",\n                    openai.BetaThreadRunSubmitToolOutputsParams{\n                      ToolOutputs: []openai.BetaThreadRunSubmitToolOutputsParamsToolOutput{openai.BetaThreadRunSubmitToolOutputsParamsToolOutput{\n\n                      }},\n                    },\n                  )\n                  if err != nil {\n                    panic(err.Error())\n                  }\n                  fmt.Printf(\"%+v\\n\", run.ID)\n                }\n              java: |-\n                package com.openai.example;\n\n                import com.openai.client.OpenAIClient;\n                import com.openai.client.okhttp.OpenAIOkHttpClient;\n                import com.openai.models.beta.threads.runs.Run;\n                import com.openai.models.beta.threads.runs.RunSubmitToolOutputsParams;\n\n                public final class Main {\n                    private Main() {}\n\n                    public static void main(String[] args) {\n                        OpenAIClient client = OpenAIOkHttpClient.fromEnv();\n\n                        RunSubmitToolOutputsParams params = RunSubmitToolOutputsParams.builder()\n                            .threadId(\"thread_id\")\n                            .runId(\"run_id\")\n                            .addToolOutput(RunSubmitToolOutputsParams.ToolOutput.builder().build())\n                            .build();\n                        Run run = client.beta().threads().runs().submitToolOutputs(params);\n                    }\n                }\n              ruby: >-\n                require \"openai\"\n\n\n                openai = OpenAI::Client.new(api_key: \"My API Key\")\n\n\n                run = openai.beta.threads.runs.submit_tool_outputs(\"run_id\", thread_id: \"thread_id\",\n                tool_outputs: [{}])\n\n\n                puts(run)\n            response: |\n              {\n                \"id\": \"run_123\",\n                \"object\": \"thread.run\",\n                \"created_at\": 1699075592,\n                \"assistant_id\": \"asst_123\",\n                \"thread_id\": \"thread_123\",\n                \"status\": \"queued\",\n                \"started_at\": 1699075592,\n                \"expires_at\": 1699076192,\n                \"cancelled_at\": null,\n                \"failed_at\": null,\n                \"completed_at\": null,\n                \"last_error\": null,\n                \"model\": \"gpt-4o\",\n                \"instructions\": null,\n                \"tools\": [\n                  {\n                    \"type\": \"function\",\n                    \"function\": {\n                      \"name\": \"get_current_weather\",\n                      \"description\": \"Get the current weather in a given location\",\n                      \"parameters\": {\n                        \"type\": \"object\",\n                        \"properties\": {\n                          \"location\": {\n                            \"type\": \"string\",\n                            \"description\": \"The city and state, e.g. San Francisco, CA\"\n                          },\n                          \"unit\": {\n                            \"type\": \"string\",\n                            \"enum\": [\"celsius\", \"fahrenheit\"]\n                          }\n                        },\n                        \"required\": [\"location\"]\n                      }\n                    }\n                  }\n                ],\n                \"metadata\": {},\n                \"usage\": null,\n                \"temperature\": 1.0,\n                \"top_p\": 1.0,\n                \"max_prompt_tokens\": 1000,\n                \"max_completion_tokens\": 1000,\n                \"truncation_strategy\": {\n                  \"type\": \"auto\",\n                  \"last_messages\": null\n                },\n                \"response_format\": \"auto\",\n                \"tool_choice\": \"auto\",\n                \"parallel_tool_calls\": true\n              }\n          - title: Streaming\n            request:\n              curl: |\n                curl https://api.openai.com/v1/threads/thread_123/runs/run_123/submit_tool_outputs \\\n                  -H \"Authorization: Bearer $OPENAI_API_KEY\" \\\n                  -H \"Content-Type: application/json\" \\\n                  -H \"OpenAI-Beta: assistants=v2\" \\\n                  -d '{\n                    \"tool_outputs\": [\n                      {\n                        \"tool_call_id\": \"call_001\",\n                        \"output\": \"70 degrees and sunny.\"\n                      }\n                    ],\n                    \"stream\": true\n                  }'\n              python: |-\n                from openai import OpenAI\n\n                client = OpenAI(\n                    api_key=\"My API Key\",\n                )\n                run = client.beta.threads.runs.submit_tool_outputs(\n                    run_id=\"run_id\",\n                    thread_id=\"thread_id\",\n                    tool_outputs=[{}],\n                )\n                print(run.id)\n              node.js: |-\n                import OpenAI from 'openai';\n\n                const client = new OpenAI({\n                  apiKey: 'My API Key',\n                });\n\n                const run = await client.beta.threads.runs.submitToolOutputs('run_id', {\n                  thread_id: 'thread_id',\n                  tool_outputs: [{}],\n                });\n\n                console.log(run.id);\n              go: |\n                package main\n\n                import (\n                  \"context\"\n                  \"fmt\"\n\n                  \"github.com/openai/openai-go\"\n                  \"github.com/openai/openai-go/option\"\n                )\n\n                func main() {\n                  client := openai.NewClient(\n                    option.WithAPIKey(\"My API Key\"),\n                  )\n                  run, err := client.Beta.Threads.Runs.SubmitToolOutputs(\n                    context.TODO(),\n                    \"thread_id\",\n                    \"run_id\",\n                    openai.BetaThreadRunSubmitToolOutputsParams{\n                      ToolOutputs: []openai.BetaThreadRunSubmitToolOutputsParamsToolOutput{openai.BetaThreadRunSubmitToolOutputsParamsToolOutput{\n\n                      }},\n                    },\n                  )\n                  if err != nil {\n                    panic(err.Error())\n                  }\n                  fmt.Printf(\"%+v\\n\", run.ID)\n                }\n              java: |-\n                package com.openai.example;\n\n                import com.openai.client.OpenAIClient;\n                import com.openai.client.okhttp.OpenAIOkHttpClient;\n                import com.openai.models.beta.threads.runs.Run;\n                import com.openai.models.beta.threads.runs.RunSubmitToolOutputsParams;\n\n                public final class Main {\n                    private Main() {}\n\n                    public static void main(String[] args) {\n                        OpenAIClient client = OpenAIOkHttpClient.fromEnv();\n\n                        RunSubmitToolOutputsParams params = RunSubmitToolOutputsParams.builder()\n                            .threadId(\"thread_id\")\n                            .runId(\"run_id\")\n                            .addToolOutput(RunSubmitToolOutputsParams.ToolOutput.builder().build())\n                            .build();\n                        Run run = client.beta().threads().runs().submitToolOutputs(params);\n                    }\n                }\n              ruby: >-\n                require \"openai\"\n\n\n                openai = OpenAI::Client.new(api_key: \"My API Key\")\n\n\n                run = openai.beta.threads.runs.submit_tool_outputs(\"run_id\", thread_id: \"thread_id\",\n                tool_outputs: [{}])\n\n\n                puts(run)\n            response: >\n              event: thread.run.step.completed\n\n              data:\n              {\"id\":\"step_001\",\"object\":\"thread.run.step\",\"created_at\":1710352449,\"run_id\":\"run_123\",\"assistant_id\":\"asst_123\",\"thread_id\":\"thread_123\",\"type\":\"tool_calls\",\"status\":\"completed\",\"cancelled_at\":null,\"completed_at\":1710352475,\"expires_at\":1710353047,\"failed_at\":null,\"last_error\":null,\"step_details\":{\"type\":\"tool_calls\",\"tool_calls\":[{\"id\":\"call_iWr0kQ2EaYMaxNdl0v3KYkx7\",\"type\":\"function\",\"function\":{\"name\":\"get_current_weather\",\"arguments\":\"{\\\"location\\\":\\\"San\n              Francisco, CA\\\",\\\"unit\\\":\\\"fahrenheit\\\"}\",\"output\":\"70 degrees and\n              sunny.\"}}]},\"usage\":{\"prompt_tokens\":291,\"completion_tokens\":24,\"total_tokens\":315}}\n\n\n              event: thread.run.queued\n\n              data:\n              {\"id\":\"run_123\",\"object\":\"thread.run\",\"created_at\":1710352447,\"assistant_id\":\"asst_123\",\"thread_id\":\"thread_123\",\"status\":\"queued\",\"started_at\":1710352448,\"expires_at\":1710353047,\"cancelled_at\":null,\"failed_at\":null,\"completed_at\":null,\"required_action\":null,\"last_error\":null,\"model\":\"gpt-4o\",\"instructions\":null,\"tools\":[{\"type\":\"function\",\"function\":{\"name\":\"get_current_weather\",\"description\":\"Get\n              the current weather in a given\n              location\",\"parameters\":{\"type\":\"object\",\"properties\":{\"location\":{\"type\":\"string\",\"description\":\"The\n              city and state, e.g. San Francisco,\n              CA\"},\"unit\":{\"type\":\"string\",\"enum\":[\"celsius\",\"fahrenheit\"]}},\"required\":[\"location\"]}}}],\"metadata\":{},\"temperature\":1.0,\"top_p\":1.0,\"max_completion_tokens\":null,\"max_prompt_tokens\":null,\"truncation_strategy\":{\"type\":\"auto\",\"last_messages\":null},\"incomplete_details\":null,\"usage\":null,\"response_format\":\"auto\",\"tool_choice\":\"auto\",\"parallel_tool_calls\":true}}\n\n\n              event: thread.run.in_progress\n\n              data:\n              {\"id\":\"run_123\",\"object\":\"thread.run\",\"created_at\":1710352447,\"assistant_id\":\"asst_123\",\"thread_id\":\"thread_123\",\"status\":\"in_progress\",\"started_at\":1710352475,\"expires_at\":1710353047,\"cancelled_at\":null,\"failed_at\":null,\"completed_at\":null,\"required_action\":null,\"last_error\":null,\"model\":\"gpt-4o\",\"instructions\":null,\"tools\":[{\"type\":\"function\",\"function\":{\"name\":\"get_current_weather\",\"description\":\"Get\n              the current weather in a given\n              location\",\"parameters\":{\"type\":\"object\",\"properties\":{\"location\":{\"type\":\"string\",\"description\":\"The\n              city and state, e.g. San Francisco,\n              CA\"},\"unit\":{\"type\":\"string\",\"enum\":[\"celsius\",\"fahrenheit\"]}},\"required\":[\"location\"]}}}],\"metadata\":{},\"temperature\":1.0,\"top_p\":1.0,\"max_completion_tokens\":null,\"max_prompt_tokens\":null,\"truncation_strategy\":{\"type\":\"auto\",\"last_messages\":null},\"incomplete_details\":null,\"usage\":null,\"response_format\":\"auto\",\"tool_choice\":\"auto\",\"parallel_tool_calls\":true}}\n\n\n              event: thread.run.step.created\n\n              data:\n              {\"id\":\"step_002\",\"object\":\"thread.run.step\",\"created_at\":1710352476,\"run_id\":\"run_123\",\"assistant_id\":\"asst_123\",\"thread_id\":\"thread_123\",\"type\":\"message_creation\",\"status\":\"in_progress\",\"cancelled_at\":null,\"completed_at\":null,\"expires_at\":1710353047,\"failed_at\":null,\"last_error\":null,\"step_details\":{\"type\":\"message_creation\",\"message_creation\":{\"message_id\":\"msg_002\"}},\"usage\":null}\n\n\n              event: thread.run.step.in_progress\n\n              data:\n              {\"id\":\"step_002\",\"object\":\"thread.run.step\",\"created_at\":1710352476,\"run_id\":\"run_123\",\"assistant_id\":\"asst_123\",\"thread_id\":\"thread_123\",\"type\":\"message_creation\",\"status\":\"in_progress\",\"cancelled_at\":null,\"completed_at\":null,\"expires_at\":1710353047,\"failed_at\":null,\"last_error\":null,\"step_details\":{\"type\":\"message_creation\",\"message_creation\":{\"message_id\":\"msg_002\"}},\"usage\":null}\n\n\n              event: thread.message.created\n\n              data:\n              {\"id\":\"msg_002\",\"object\":\"thread.message\",\"created_at\":1710352476,\"assistant_id\":\"asst_123\",\"thread_id\":\"thread_123\",\"run_id\":\"run_123\",\"status\":\"in_progress\",\"incomplete_details\":null,\"incomplete_at\":null,\"completed_at\":null,\"role\":\"assistant\",\"content\":[],\"metadata\":{}}\n\n\n              event: thread.message.in_progress\n\n              data:\n              {\"id\":\"msg_002\",\"object\":\"thread.message\",\"created_at\":1710352476,\"assistant_id\":\"asst_123\",\"thread_id\":\"thread_123\",\"run_id\":\"run_123\",\"status\":\"in_progress\",\"incomplete_details\":null,\"incomplete_at\":null,\"completed_at\":null,\"role\":\"assistant\",\"content\":[],\"metadata\":{}}\n\n\n              event: thread.message.delta\n\n              data:\n              {\"id\":\"msg_002\",\"object\":\"thread.message.delta\",\"delta\":{\"content\":[{\"index\":0,\"type\":\"text\",\"text\":{\"value\":\"The\",\"annotations\":[]}}]}}\n\n\n              event: thread.message.delta\n\n              data:\n              {\"id\":\"msg_002\",\"object\":\"thread.message.delta\",\"delta\":{\"content\":[{\"index\":0,\"type\":\"text\",\"text\":{\"value\":\"\n              current\"}}]}}\n\n\n              event: thread.message.delta\n\n              data:\n              {\"id\":\"msg_002\",\"object\":\"thread.message.delta\",\"delta\":{\"content\":[{\"index\":0,\"type\":\"text\",\"text\":{\"value\":\"\n              weather\"}}]}}\n\n\n              ...\n\n\n              event: thread.message.delta\n\n              data:\n              {\"id\":\"msg_002\",\"object\":\"thread.message.delta\",\"delta\":{\"content\":[{\"index\":0,\"type\":\"text\",\"text\":{\"value\":\"\n              sunny\"}}]}}\n\n\n              event: thread.message.delta\n\n              data:\n              {\"id\":\"msg_002\",\"object\":\"thread.message.delta\",\"delta\":{\"content\":[{\"index\":0,\"type\":\"text\",\"text\":{\"value\":\".\"}}]}}\n\n\n              event: thread.message.completed\n\n              data:\n              {\"id\":\"msg_002\",\"object\":\"thread.message\",\"created_at\":1710352476,\"assistant_id\":\"asst_123\",\"thread_id\":\"thread_123\",\"run_id\":\"run_123\",\"status\":\"completed\",\"incomplete_details\":null,\"incomplete_at\":null,\"completed_at\":1710352477,\"role\":\"assistant\",\"content\":[{\"type\":\"text\",\"text\":{\"value\":\"The\n              current weather in San Francisco, CA is 70 degrees Fahrenheit and\n              sunny.\",\"annotations\":[]}}],\"metadata\":{}}\n\n\n              event: thread.run.step.completed\n\n              data:\n              {\"id\":\"step_002\",\"object\":\"thread.run.step\",\"created_at\":1710352476,\"run_id\":\"run_123\",\"assistant_id\":\"asst_123\",\"thread_id\":\"thread_123\",\"type\":\"message_creation\",\"status\":\"completed\",\"cancelled_at\":null,\"completed_at\":1710352477,\"expires_at\":1710353047,\"failed_at\":null,\"last_error\":null,\"step_details\":{\"type\":\"message_creation\",\"message_creation\":{\"message_id\":\"msg_002\"}},\"usage\":{\"prompt_tokens\":329,\"completion_tokens\":18,\"total_tokens\":347}}\n\n\n              event: thread.run.completed\n\n              data:\n              {\"id\":\"run_123\",\"object\":\"thread.run\",\"created_at\":1710352447,\"assistant_id\":\"asst_123\",\"thread_id\":\"thread_123\",\"status\":\"completed\",\"started_at\":1710352475,\"expires_at\":null,\"cancelled_at\":null,\"failed_at\":null,\"completed_at\":1710352477,\"required_action\":null,\"last_error\":null,\"model\":\"gpt-4o\",\"instructions\":null,\"tools\":[{\"type\":\"function\",\"function\":{\"name\":\"get_current_weather\",\"description\":\"Get\n              the current weather in a given\n              location\",\"parameters\":{\"type\":\"object\",\"properties\":{\"location\":{\"type\":\"string\",\"description\":\"The\n              city and state, e.g. San Francisco,\n              CA\"},\"unit\":{\"type\":\"string\",\"enum\":[\"celsius\",\"fahrenheit\"]}},\"required\":[\"location\"]}}}],\"metadata\":{},\"temperature\":1.0,\"top_p\":1.0,\"max_completion_tokens\":null,\"max_prompt_tokens\":null,\"truncation_strategy\":{\"type\":\"auto\",\"last_messages\":null},\"incomplete_details\":null,\"usage\":{\"prompt_tokens\":20,\"completion_tokens\":11,\"total_tokens\":31},\"response_format\":\"auto\",\"tool_choice\":\"auto\",\"parallel_tool_calls\":true}}\n\n\n              event: done\n\n              data: [DONE]\n      description: >\n        When a run has the `status: \"requires_action\"` and `required_action.type` is `submit_tool_outputs`,\n        this endpoint can be used to submit the outputs from the tool calls once they're all completed. All\n        outputs must be submitted in a single request.\n  /uploads:\n    post:\n      operationId: createUpload\n      tags:\n        - Uploads\n      summary: Create upload\n      requestBody:\n        required: true\n        content:\n          application/json:\n            schema:\n              $ref: '#/components/schemas/CreateUploadRequest'\n      responses:\n        '200':\n          description: OK\n          content:\n            application/json:\n              schema:\n                $ref: '#/components/schemas/Upload'\n      x-oaiMeta:\n        name: Create upload\n        group: uploads\n        returns: >-\n          The [Upload](https://platform.openai.com/docs/api-reference/uploads/object) object with status\n          `pending`.\n        examples:\n          response: |\n            {\n              \"id\": \"upload_abc123\",\n              \"object\": \"upload\",\n              \"bytes\": 2147483648,\n              \"created_at\": 1719184911,\n              \"filename\": \"training_examples.jsonl\",\n              \"purpose\": \"fine-tune\",\n              \"status\": \"pending\",\n              \"expires_at\": 1719127296\n            }\n          request:\n            curl: |\n              curl https://api.openai.com/v1/uploads \\\n                -H \"Authorization: Bearer $OPENAI_API_KEY\" \\\n                -d '{\n                  \"purpose\": \"fine-tune\",\n                  \"filename\": \"training_examples.jsonl\",\n                  \"bytes\": 2147483648,\n                  \"mime_type\": \"text/jsonl\",\n                  \"expires_after\": {\n                    \"anchor\": \"created_at\",\n                    \"seconds\": 3600\n                  }\n                }'\n            node.js: |-\n              import OpenAI from 'openai';\n\n              const client = new OpenAI({\n                apiKey: 'My API Key',\n              });\n\n              const upload = await client.uploads.create({\n                bytes: 0,\n                filename: 'filename',\n                mime_type: 'mime_type',\n                purpose: 'assistants',\n              });\n\n              console.log(upload.id);\n            python: |-\n              from openai import OpenAI\n\n              client = OpenAI(\n                  api_key=\"My API Key\",\n              )\n              upload = client.uploads.create(\n                  bytes=0,\n                  filename=\"filename\",\n                  mime_type=\"mime_type\",\n                  purpose=\"assistants\",\n              )\n              print(upload.id)\n            go: |\n              package main\n\n              import (\n                \"context\"\n                \"fmt\"\n\n                \"github.com/openai/openai-go\"\n                \"github.com/openai/openai-go/option\"\n              )\n\n              func main() {\n                client := openai.NewClient(\n                  option.WithAPIKey(\"My API Key\"),\n                )\n                upload, err := client.Uploads.New(context.TODO(), openai.UploadNewParams{\n                  Bytes: 0,\n                  Filename: \"filename\",\n                  MimeType: \"mime_type\",\n                  Purpose: openai.FilePurposeAssistants,\n                })\n                if err != nil {\n                  panic(err.Error())\n                }\n                fmt.Printf(\"%+v\\n\", upload.ID)\n              }\n            java: |-\n              package com.openai.example;\n\n              import com.openai.client.OpenAIClient;\n              import com.openai.client.okhttp.OpenAIOkHttpClient;\n              import com.openai.models.files.FilePurpose;\n              import com.openai.models.uploads.Upload;\n              import com.openai.models.uploads.UploadCreateParams;\n\n              public final class Main {\n                  private Main() {}\n\n                  public static void main(String[] args) {\n                      OpenAIClient client = OpenAIOkHttpClient.fromEnv();\n\n                      UploadCreateParams params = UploadCreateParams.builder()\n                          .bytes(0L)\n                          .filename(\"filename\")\n                          .mimeType(\"mime_type\")\n                          .purpose(FilePurpose.ASSISTANTS)\n                          .build();\n                      Upload upload = client.uploads().create(params);\n                  }\n              }\n            ruby: >-\n              require \"openai\"\n\n\n              openai = OpenAI::Client.new(api_key: \"My API Key\")\n\n\n              upload = openai.uploads.create(bytes: 0, filename: \"filename\", mime_type: \"mime_type\", purpose:\n              :assistants)\n\n\n              puts(upload)\n      description: >\n        Creates an intermediate [Upload](https://platform.openai.com/docs/api-reference/uploads/object) object\n\n        that you can add [Parts](https://platform.openai.com/docs/api-reference/uploads/part-object) to.\n\n        Currently, an Upload can accept at most 8 GB in total and expires after an\n\n        hour after you create it.\n\n\n        Once you complete the Upload, we will create a\n\n        [File](https://platform.openai.com/docs/api-reference/files/object) object that contains all the parts\n\n        you uploaded. This File is usable in the rest of our platform as a regular\n\n        File object.\n\n\n        For certain `purpose` values, the correct `mime_type` must be specified.\n\n        Please refer to documentation for the\n\n        [supported MIME types for your use\n        case](https://platform.openai.com/docs/assistants/tools/file-search#supported-files).\n\n\n        For guidance on the proper filename extensions for each purpose, please\n\n        follow the documentation on [creating a\n\n        File](https://platform.openai.com/docs/api-reference/files/create).\n  /uploads/{upload_id}/cancel:\n    post:\n      operationId: cancelUpload\n      tags:\n        - Uploads\n      summary: Cancel upload\n      parameters:\n        - in: path\n          name: upload_id\n          required: true\n          schema:\n            type: string\n            example: upload_abc123\n          description: |\n            The ID of the Upload.\n      responses:\n        '200':\n          description: OK\n          content:\n            application/json:\n              schema:\n                $ref: '#/components/schemas/Upload'\n      x-oaiMeta:\n        name: Cancel upload\n        group: uploads\n        returns: >-\n          The [Upload](https://platform.openai.com/docs/api-reference/uploads/object) object with status\n          `cancelled`.\n        examples:\n          response: |\n            {\n              \"id\": \"upload_abc123\",\n              \"object\": \"upload\",\n              \"bytes\": 2147483648,\n              \"created_at\": 1719184911,\n              \"filename\": \"training_examples.jsonl\",\n              \"purpose\": \"fine-tune\",\n              \"status\": \"cancelled\",\n              \"expires_at\": 1719127296\n            }\n          request:\n            curl: |\n              curl https://api.openai.com/v1/uploads/upload_abc123/cancel\n            node.js: |-\n              import OpenAI from 'openai';\n\n              const client = new OpenAI({\n                apiKey: 'My API Key',\n              });\n\n              const upload = await client.uploads.cancel('upload_abc123');\n\n              console.log(upload.id);\n            python: |-\n              from openai import OpenAI\n\n              client = OpenAI(\n                  api_key=\"My API Key\",\n              )\n              upload = client.uploads.cancel(\n                  \"upload_abc123\",\n              )\n              print(upload.id)\n            go: |\n              package main\n\n              import (\n                \"context\"\n                \"fmt\"\n\n                \"github.com/openai/openai-go\"\n                \"github.com/openai/openai-go/option\"\n              )\n\n              func main() {\n                client := openai.NewClient(\n                  option.WithAPIKey(\"My API Key\"),\n                )\n                upload, err := client.Uploads.Cancel(context.TODO(), \"upload_abc123\")\n                if err != nil {\n                  panic(err.Error())\n                }\n                fmt.Printf(\"%+v\\n\", upload.ID)\n              }\n            java: |-\n              package com.openai.example;\n\n              import com.openai.client.OpenAIClient;\n              import com.openai.client.okhttp.OpenAIOkHttpClient;\n              import com.openai.models.uploads.Upload;\n              import com.openai.models.uploads.UploadCancelParams;\n\n              public final class Main {\n                  private Main() {}\n\n                  public static void main(String[] args) {\n                      OpenAIClient client = OpenAIOkHttpClient.fromEnv();\n\n                      Upload upload = client.uploads().cancel(\"upload_abc123\");\n                  }\n              }\n            ruby: |-\n              require \"openai\"\n\n              openai = OpenAI::Client.new(api_key: \"My API Key\")\n\n              upload = openai.uploads.cancel(\"upload_abc123\")\n\n              puts(upload)\n      description: |\n        Cancels the Upload. No Parts may be added after an Upload is cancelled.\n  /uploads/{upload_id}/complete:\n    post:\n      operationId: completeUpload\n      tags:\n        - Uploads\n      summary: Complete upload\n      parameters:\n        - in: path\n          name: upload_id\n          required: true\n          schema:\n            type: string\n            example: upload_abc123\n          description: |\n            The ID of the Upload.\n      requestBody:\n        required: true\n        content:\n          application/json:\n            schema:\n              $ref: '#/components/schemas/CompleteUploadRequest'\n      responses:\n        '200':\n          description: OK\n          content:\n            application/json:\n              schema:\n                $ref: '#/components/schemas/Upload'\n      x-oaiMeta:\n        name: Complete upload\n        group: uploads\n        returns: >-\n          The [Upload](https://platform.openai.com/docs/api-reference/uploads/object) object with status\n          `completed` with an additional `file` property containing the created usable File object.\n        examples:\n          response: |\n            {\n              \"id\": \"upload_abc123\",\n              \"object\": \"upload\",\n              \"bytes\": 2147483648,\n              \"created_at\": 1719184911,\n              \"filename\": \"training_examples.jsonl\",\n              \"purpose\": \"fine-tune\",\n              \"status\": \"completed\",\n              \"expires_at\": 1719127296,\n              \"file\": {\n                \"id\": \"file-xyz321\",\n                \"object\": \"file\",\n                \"bytes\": 2147483648,\n                \"created_at\": 1719186911,\n                \"expires_at\": 1719127296,\n                \"filename\": \"training_examples.jsonl\",\n                \"purpose\": \"fine-tune\",\n              }\n            }\n          request:\n            curl: |\n              curl https://api.openai.com/v1/uploads/upload_abc123/complete\n                -d '{\n                  \"part_ids\": [\"part_def456\", \"part_ghi789\"]\n                }'\n            node.js: |-\n              import OpenAI from 'openai';\n\n              const client = new OpenAI({\n                apiKey: 'My API Key',\n              });\n\n              const upload = await client.uploads.complete('upload_abc123', { part_ids: ['string'] });\n\n              console.log(upload.id);\n            python: |-\n              from openai import OpenAI\n\n              client = OpenAI(\n                  api_key=\"My API Key\",\n              )\n              upload = client.uploads.complete(\n                  upload_id=\"upload_abc123\",\n                  part_ids=[\"string\"],\n              )\n              print(upload.id)\n            go: |\n              package main\n\n              import (\n                \"context\"\n                \"fmt\"\n\n                \"github.com/openai/openai-go\"\n                \"github.com/openai/openai-go/option\"\n              )\n\n              func main() {\n                client := openai.NewClient(\n                  option.WithAPIKey(\"My API Key\"),\n                )\n                upload, err := client.Uploads.Complete(\n                  context.TODO(),\n                  \"upload_abc123\",\n                  openai.UploadCompleteParams{\n                    PartIDs: []string{\"string\"},\n                  },\n                )\n                if err != nil {\n                  panic(err.Error())\n                }\n                fmt.Printf(\"%+v\\n\", upload.ID)\n              }\n            java: |-\n              package com.openai.example;\n\n              import com.openai.client.OpenAIClient;\n              import com.openai.client.okhttp.OpenAIOkHttpClient;\n              import com.openai.models.uploads.Upload;\n              import com.openai.models.uploads.UploadCompleteParams;\n\n              public final class Main {\n                  private Main() {}\n\n                  public static void main(String[] args) {\n                      OpenAIClient client = OpenAIOkHttpClient.fromEnv();\n\n                      UploadCompleteParams params = UploadCompleteParams.builder()\n                          .uploadId(\"upload_abc123\")\n                          .addPartId(\"string\")\n                          .build();\n                      Upload upload = client.uploads().complete(params);\n                  }\n              }\n            ruby: |-\n              require \"openai\"\n\n              openai = OpenAI::Client.new(api_key: \"My API Key\")\n\n              upload = openai.uploads.complete(\"upload_abc123\", part_ids: [\"string\"])\n\n              puts(upload)\n      description: >\n        Completes the [Upload](https://platform.openai.com/docs/api-reference/uploads/object).\n\n\n        Within the returned Upload object, there is a nested\n        [File](https://platform.openai.com/docs/api-reference/files/object) object that is ready to use in the\n        rest of the platform.\n\n\n        You can specify the order of the Parts by passing in an ordered list of the Part IDs.\n\n\n        The number of bytes uploaded upon completion must match the number of bytes initially specified when\n        creating the Upload object. No Parts may be added after an Upload is completed.\n  /uploads/{upload_id}/parts:\n    post:\n      operationId: addUploadPart\n      tags:\n        - Uploads\n      summary: Add upload part\n      parameters:\n        - in: path\n          name: upload_id\n          required: true\n          schema:\n            type: string\n            example: upload_abc123\n          description: |\n            The ID of the Upload.\n      requestBody:\n        required: true\n        content:\n          multipart/form-data:\n            schema:\n              $ref: '#/components/schemas/AddUploadPartRequest'\n      responses:\n        '200':\n          description: OK\n          content:\n            application/json:\n              schema:\n                $ref: '#/components/schemas/UploadPart'\n      x-oaiMeta:\n        name: Add upload part\n        group: uploads\n        returns: The upload [Part](https://platform.openai.com/docs/api-reference/uploads/part-object) object.\n        examples:\n          response: |\n            {\n              \"id\": \"part_def456\",\n              \"object\": \"upload.part\",\n              \"created_at\": 1719185911,\n              \"upload_id\": \"upload_abc123\"\n            }\n          request:\n            curl: |\n              curl https://api.openai.com/v1/uploads/upload_abc123/parts\n                -F data=\"aHR0cHM6Ly9hcGkub3BlbmFpLmNvbS92MS91cGxvYWRz...\"\n            node.js: |-\n              import OpenAI from 'openai';\n\n              const client = new OpenAI({\n                apiKey: 'My API Key',\n              });\n\n              const uploadPart = await client.uploads.parts.create('upload_abc123', {\n                data: fs.createReadStream('path/to/file'),\n              });\n\n              console.log(uploadPart.id);\n            python: |-\n              from openai import OpenAI\n\n              client = OpenAI(\n                  api_key=\"My API Key\",\n              )\n              upload_part = client.uploads.parts.create(\n                  upload_id=\"upload_abc123\",\n                  data=b\"raw file contents\",\n              )\n              print(upload_part.id)\n            go: |\n              package main\n\n              import (\n                \"bytes\"\n                \"context\"\n                \"fmt\"\n                \"io\"\n\n                \"github.com/openai/openai-go\"\n                \"github.com/openai/openai-go/option\"\n              )\n\n              func main() {\n                client := openai.NewClient(\n                  option.WithAPIKey(\"My API Key\"),\n                )\n                uploadPart, err := client.Uploads.Parts.New(\n                  context.TODO(),\n                  \"upload_abc123\",\n                  openai.UploadPartNewParams{\n                    Data: io.Reader(bytes.NewBuffer([]byte(\"some file contents\"))),\n                  },\n                )\n                if err != nil {\n                  panic(err.Error())\n                }\n                fmt.Printf(\"%+v\\n\", uploadPart.ID)\n              }\n            java: |-\n              package com.openai.example;\n\n              import com.openai.client.OpenAIClient;\n              import com.openai.client.okhttp.OpenAIOkHttpClient;\n              import com.openai.models.uploads.parts.PartCreateParams;\n              import com.openai.models.uploads.parts.UploadPart;\n              import java.io.ByteArrayInputStream;\n\n              public final class Main {\n                  private Main() {}\n\n                  public static void main(String[] args) {\n                      OpenAIClient client = OpenAIOkHttpClient.fromEnv();\n\n                      PartCreateParams params = PartCreateParams.builder()\n                          .uploadId(\"upload_abc123\")\n                          .data(ByteArrayInputStream(\"some content\".getBytes()))\n                          .build();\n                      UploadPart uploadPart = client.uploads().parts().create(params);\n                  }\n              }\n            ruby: |-\n              require \"openai\"\n\n              openai = OpenAI::Client.new(api_key: \"My API Key\")\n\n              upload_part = openai.uploads.parts.create(\"upload_abc123\", data: Pathname(__FILE__))\n\n              puts(upload_part)\n      description: >\n        Adds a [Part](https://platform.openai.com/docs/api-reference/uploads/part-object) to an\n        [Upload](https://platform.openai.com/docs/api-reference/uploads/object) object. A Part represents a\n        chunk of bytes from the file you are trying to upload.\n\n\n        Each Part can be at most 64 MB, and you can add Parts until you hit the Upload maximum of 8 GB.\n\n\n        It is possible to add multiple Parts in parallel. You can decide the intended order of the Parts when\n        you [complete the Upload](https://platform.openai.com/docs/api-reference/uploads/complete).\n  /vector_stores:\n    get:\n      operationId: listVectorStores\n      tags:\n        - Vector stores\n      summary: List vector stores\n      parameters:\n        - name: limit\n          in: query\n          description: >\n            A limit on the number of objects to be returned. Limit can range between 1 and 100, and the\n            default is 20.\n          required: false\n          schema:\n            type: integer\n            default: 20\n        - name: order\n          in: query\n          description: >\n            Sort order by the `created_at` timestamp of the objects. `asc` for ascending order and `desc` for\n            descending order.\n          schema:\n            type: string\n            default: desc\n            enum:\n              - asc\n              - desc\n        - name: after\n          in: query\n          description: >\n            A cursor for use in pagination. `after` is an object ID that defines your place in the list. For\n            instance, if you make a list request and receive 100 objects, ending with obj_foo, your subsequent\n            call can include after=obj_foo in order to fetch the next page of the list.\n          schema:\n            type: string\n        - name: before\n          in: query\n          description: >\n            A cursor for use in pagination. `before` is an object ID that defines your place in the list. For\n            instance, if you make a list request and receive 100 objects, starting with obj_foo, your\n            subsequent call can include before=obj_foo in order to fetch the previous page of the list.\n          schema:\n            type: string\n      responses:\n        '200':\n          description: OK\n          content:\n            application/json:\n              schema:\n                $ref: '#/components/schemas/ListVectorStoresResponse'\n      x-oaiMeta:\n        name: List vector stores\n        group: vector_stores\n        returns: >-\n          A list of [vector store](https://platform.openai.com/docs/api-reference/vector-stores/object)\n          objects.\n        examples:\n          response: |\n            {\n              \"object\": \"list\",\n              \"data\": [\n                {\n                  \"id\": \"vs_abc123\",\n                  \"object\": \"vector_store\",\n                  \"created_at\": 1699061776,\n                  \"name\": \"Support FAQ\",\n                  \"bytes\": 139920,\n                  \"file_counts\": {\n                    \"in_progress\": 0,\n                    \"completed\": 3,\n                    \"failed\": 0,\n                    \"cancelled\": 0,\n                    \"total\": 3\n                  }\n                },\n                {\n                  \"id\": \"vs_abc456\",\n                  \"object\": \"vector_store\",\n                  \"created_at\": 1699061776,\n                  \"name\": \"Support FAQ v2\",\n                  \"bytes\": 139920,\n                  \"file_counts\": {\n                    \"in_progress\": 0,\n                    \"completed\": 3,\n                    \"failed\": 0,\n                    \"cancelled\": 0,\n                    \"total\": 3\n                  }\n                }\n              ],\n              \"first_id\": \"vs_abc123\",\n              \"last_id\": \"vs_abc456\",\n              \"has_more\": false\n            }\n          request:\n            curl: |\n              curl https://api.openai.com/v1/vector_stores \\\n                -H \"Authorization: Bearer $OPENAI_API_KEY\" \\\n                -H \"Content-Type: application/json\" \\\n                -H \"OpenAI-Beta: assistants=v2\"\n            python: |-\n              from openai import OpenAI\n\n              client = OpenAI(\n                  api_key=\"My API Key\",\n              )\n              page = client.vector_stores.list()\n              page = page.data[0]\n              print(page.id)\n            node.js: |-\n              import OpenAI from 'openai';\n\n              const client = new OpenAI({\n                apiKey: 'My API Key',\n              });\n\n              // Automatically fetches more pages as needed.\n              for await (const vectorStore of client.vectorStores.list()) {\n                console.log(vectorStore.id);\n              }\n            go: |\n              package main\n\n              import (\n                \"context\"\n                \"fmt\"\n\n                \"github.com/openai/openai-go\"\n                \"github.com/openai/openai-go/option\"\n              )\n\n              func main() {\n                client := openai.NewClient(\n                  option.WithAPIKey(\"My API Key\"),\n                )\n                page, err := client.VectorStores.List(context.TODO(), openai.VectorStoreListParams{\n\n                })\n                if err != nil {\n                  panic(err.Error())\n                }\n                fmt.Printf(\"%+v\\n\", page)\n              }\n            java: |-\n              package com.openai.example;\n\n              import com.openai.client.OpenAIClient;\n              import com.openai.client.okhttp.OpenAIOkHttpClient;\n              import com.openai.models.vectorstores.VectorStoreListPage;\n              import com.openai.models.vectorstores.VectorStoreListParams;\n\n              public final class Main {\n                  private Main() {}\n\n                  public static void main(String[] args) {\n                      OpenAIClient client = OpenAIOkHttpClient.fromEnv();\n\n                      VectorStoreListPage page = client.vectorStores().list();\n                  }\n              }\n            ruby: |-\n              require \"openai\"\n\n              openai = OpenAI::Client.new(api_key: \"My API Key\")\n\n              page = openai.vector_stores.list\n\n              puts(page)\n      description: Returns a list of vector stores.\n    post:\n      operationId: createVectorStore\n      tags:\n        - Vector stores\n      summary: Create vector store\n      requestBody:\n        required: true\n        content:\n          application/json:\n            schema:\n              $ref: '#/components/schemas/CreateVectorStoreRequest'\n      responses:\n        '200':\n          description: OK\n          content:\n            application/json:\n              schema:\n                $ref: '#/components/schemas/VectorStoreObject'\n      x-oaiMeta:\n        name: Create vector store\n        group: vector_stores\n        returns: A [vector store](https://platform.openai.com/docs/api-reference/vector-stores/object) object.\n        examples:\n          response: |\n            {\n              \"id\": \"vs_abc123\",\n              \"object\": \"vector_store\",\n              \"created_at\": 1699061776,\n              \"name\": \"Support FAQ\",\n              \"bytes\": 139920,\n              \"file_counts\": {\n                \"in_progress\": 0,\n                \"completed\": 3,\n                \"failed\": 0,\n                \"cancelled\": 0,\n                \"total\": 3\n              }\n            }\n          request:\n            curl: |\n              curl https://api.openai.com/v1/vector_stores \\\n                -H \"Authorization: Bearer $OPENAI_API_KEY\" \\\n                -H \"Content-Type: application/json\" \\\n                -H \"OpenAI-Beta: assistants=v2\" \\\n                -d '{\n                  \"name\": \"Support FAQ\"\n                }'\n            python: |-\n              from openai import OpenAI\n\n              client = OpenAI(\n                  api_key=\"My API Key\",\n              )\n              vector_store = client.vector_stores.create()\n              print(vector_store.id)\n            node.js: |-\n              import OpenAI from 'openai';\n\n              const client = new OpenAI({\n                apiKey: 'My API Key',\n              });\n\n              const vectorStore = await client.vectorStores.create();\n\n              console.log(vectorStore.id);\n            go: |\n              package main\n\n              import (\n                \"context\"\n                \"fmt\"\n\n                \"github.com/openai/openai-go\"\n                \"github.com/openai/openai-go/option\"\n              )\n\n              func main() {\n                client := openai.NewClient(\n                  option.WithAPIKey(\"My API Key\"),\n                )\n                vectorStore, err := client.VectorStores.New(context.TODO(), openai.VectorStoreNewParams{\n\n                })\n                if err != nil {\n                  panic(err.Error())\n                }\n                fmt.Printf(\"%+v\\n\", vectorStore.ID)\n              }\n            java: |-\n              package com.openai.example;\n\n              import com.openai.client.OpenAIClient;\n              import com.openai.client.okhttp.OpenAIOkHttpClient;\n              import com.openai.models.vectorstores.VectorStore;\n              import com.openai.models.vectorstores.VectorStoreCreateParams;\n\n              public final class Main {\n                  private Main() {}\n\n                  public static void main(String[] args) {\n                      OpenAIClient client = OpenAIOkHttpClient.fromEnv();\n\n                      VectorStore vectorStore = client.vectorStores().create();\n                  }\n              }\n            ruby: |-\n              require \"openai\"\n\n              openai = OpenAI::Client.new(api_key: \"My API Key\")\n\n              vector_store = openai.vector_stores.create\n\n              puts(vector_store)\n      description: Create a vector store.\n  /vector_stores/{vector_store_id}:\n    get:\n      operationId: getVectorStore\n      tags:\n        - Vector stores\n      summary: Retrieve vector store\n      parameters:\n        - in: path\n          name: vector_store_id\n          required: true\n          schema:\n            type: string\n          description: The ID of the vector store to retrieve.\n      responses:\n        '200':\n          description: OK\n          content:\n            application/json:\n              schema:\n                $ref: '#/components/schemas/VectorStoreObject'\n      x-oaiMeta:\n        name: Retrieve vector store\n        group: vector_stores\n        returns: >-\n          The [vector store](https://platform.openai.com/docs/api-reference/vector-stores/object) object\n          matching the specified ID.\n        examples:\n          response: |\n            {\n              \"id\": \"vs_abc123\",\n              \"object\": \"vector_store\",\n              \"created_at\": 1699061776\n            }\n          request:\n            curl: |\n              curl https://api.openai.com/v1/vector_stores/vs_abc123 \\\n                -H \"Authorization: Bearer $OPENAI_API_KEY\" \\\n                -H \"Content-Type: application/json\" \\\n                -H \"OpenAI-Beta: assistants=v2\"\n            python: |-\n              from openai import OpenAI\n\n              client = OpenAI(\n                  api_key=\"My API Key\",\n              )\n              vector_store = client.vector_stores.retrieve(\n                  \"vector_store_id\",\n              )\n              print(vector_store.id)\n            node.js: |-\n              import OpenAI from 'openai';\n\n              const client = new OpenAI({\n                apiKey: 'My API Key',\n              });\n\n              const vectorStore = await client.vectorStores.retrieve('vector_store_id');\n\n              console.log(vectorStore.id);\n            go: |\n              package main\n\n              import (\n                \"context\"\n                \"fmt\"\n\n                \"github.com/openai/openai-go\"\n                \"github.com/openai/openai-go/option\"\n              )\n\n              func main() {\n                client := openai.NewClient(\n                  option.WithAPIKey(\"My API Key\"),\n                )\n                vectorStore, err := client.VectorStores.Get(context.TODO(), \"vector_store_id\")\n                if err != nil {\n                  panic(err.Error())\n                }\n                fmt.Printf(\"%+v\\n\", vectorStore.ID)\n              }\n            java: |-\n              package com.openai.example;\n\n              import com.openai.client.OpenAIClient;\n              import com.openai.client.okhttp.OpenAIOkHttpClient;\n              import com.openai.models.vectorstores.VectorStore;\n              import com.openai.models.vectorstores.VectorStoreRetrieveParams;\n\n              public final class Main {\n                  private Main() {}\n\n                  public static void main(String[] args) {\n                      OpenAIClient client = OpenAIOkHttpClient.fromEnv();\n\n                      VectorStore vectorStore = client.vectorStores().retrieve(\"vector_store_id\");\n                  }\n              }\n            ruby: |-\n              require \"openai\"\n\n              openai = OpenAI::Client.new(api_key: \"My API Key\")\n\n              vector_store = openai.vector_stores.retrieve(\"vector_store_id\")\n\n              puts(vector_store)\n      description: Retrieves a vector store.\n    post:\n      operationId: modifyVectorStore\n      tags:\n        - Vector stores\n      summary: Modify vector store\n      parameters:\n        - in: path\n          name: vector_store_id\n          required: true\n          schema:\n            type: string\n          description: The ID of the vector store to modify.\n      requestBody:\n        required: true\n        content:\n          application/json:\n            schema:\n              $ref: '#/components/schemas/UpdateVectorStoreRequest'\n      responses:\n        '200':\n          description: OK\n          content:\n            application/json:\n              schema:\n                $ref: '#/components/schemas/VectorStoreObject'\n      x-oaiMeta:\n        name: Modify vector store\n        group: vector_stores\n        returns: >-\n          The modified [vector store](https://platform.openai.com/docs/api-reference/vector-stores/object)\n          object.\n        examples:\n          response: |\n            {\n              \"id\": \"vs_abc123\",\n              \"object\": \"vector_store\",\n              \"created_at\": 1699061776,\n              \"name\": \"Support FAQ\",\n              \"bytes\": 139920,\n              \"file_counts\": {\n                \"in_progress\": 0,\n                \"completed\": 3,\n                \"failed\": 0,\n                \"cancelled\": 0,\n                \"total\": 3\n              }\n            }\n          request:\n            curl: |\n              curl https://api.openai.com/v1/vector_stores/vs_abc123 \\\n                -H \"Authorization: Bearer $OPENAI_API_KEY\" \\\n                -H \"Content-Type: application/json\" \\\n                -H \"OpenAI-Beta: assistants=v2\"\n                -d '{\n                  \"name\": \"Support FAQ\"\n                }'\n            python: |-\n              from openai import OpenAI\n\n              client = OpenAI(\n                  api_key=\"My API Key\",\n              )\n              vector_store = client.vector_stores.update(\n                  vector_store_id=\"vector_store_id\",\n              )\n              print(vector_store.id)\n            node.js: |-\n              import OpenAI from 'openai';\n\n              const client = new OpenAI({\n                apiKey: 'My API Key',\n              });\n\n              const vectorStore = await client.vectorStores.update('vector_store_id');\n\n              console.log(vectorStore.id);\n            go: |\n              package main\n\n              import (\n                \"context\"\n                \"fmt\"\n\n                \"github.com/openai/openai-go\"\n                \"github.com/openai/openai-go/option\"\n              )\n\n              func main() {\n                client := openai.NewClient(\n                  option.WithAPIKey(\"My API Key\"),\n                )\n                vectorStore, err := client.VectorStores.Update(\n                  context.TODO(),\n                  \"vector_store_id\",\n                  openai.VectorStoreUpdateParams{\n\n                  },\n                )\n                if err != nil {\n                  panic(err.Error())\n                }\n                fmt.Printf(\"%+v\\n\", vectorStore.ID)\n              }\n            java: |-\n              package com.openai.example;\n\n              import com.openai.client.OpenAIClient;\n              import com.openai.client.okhttp.OpenAIOkHttpClient;\n              import com.openai.models.vectorstores.VectorStore;\n              import com.openai.models.vectorstores.VectorStoreUpdateParams;\n\n              public final class Main {\n                  private Main() {}\n\n                  public static void main(String[] args) {\n                      OpenAIClient client = OpenAIOkHttpClient.fromEnv();\n\n                      VectorStore vectorStore = client.vectorStores().update(\"vector_store_id\");\n                  }\n              }\n            ruby: |-\n              require \"openai\"\n\n              openai = OpenAI::Client.new(api_key: \"My API Key\")\n\n              vector_store = openai.vector_stores.update(\"vector_store_id\")\n\n              puts(vector_store)\n      description: Modifies a vector store.\n    delete:\n      operationId: deleteVectorStore\n      tags:\n        - Vector stores\n      summary: Delete vector store\n      parameters:\n        - in: path\n          name: vector_store_id\n          required: true\n          schema:\n            type: string\n          description: The ID of the vector store to delete.\n      responses:\n        '200':\n          description: OK\n          content:\n            application/json:\n              schema:\n                $ref: '#/components/schemas/DeleteVectorStoreResponse'\n      x-oaiMeta:\n        name: Delete vector store\n        group: vector_stores\n        returns: Deletion status\n        examples:\n          response: |\n            {\n              id: \"vs_abc123\",\n              object: \"vector_store.deleted\",\n              deleted: true\n            }\n          request:\n            curl: |\n              curl https://api.openai.com/v1/vector_stores/vs_abc123 \\\n                -H \"Authorization: Bearer $OPENAI_API_KEY\" \\\n                -H \"Content-Type: application/json\" \\\n                -H \"OpenAI-Beta: assistants=v2\" \\\n                -X DELETE\n            python: |-\n              from openai import OpenAI\n\n              client = OpenAI(\n                  api_key=\"My API Key\",\n              )\n              vector_store_deleted = client.vector_stores.delete(\n                  \"vector_store_id\",\n              )\n              print(vector_store_deleted.id)\n            node.js: |-\n              import OpenAI from 'openai';\n\n              const client = new OpenAI({\n                apiKey: 'My API Key',\n              });\n\n              const vectorStoreDeleted = await client.vectorStores.delete('vector_store_id');\n\n              console.log(vectorStoreDeleted.id);\n            go: |\n              package main\n\n              import (\n                \"context\"\n                \"fmt\"\n\n                \"github.com/openai/openai-go\"\n                \"github.com/openai/openai-go/option\"\n              )\n\n              func main() {\n                client := openai.NewClient(\n                  option.WithAPIKey(\"My API Key\"),\n                )\n                vectorStoreDeleted, err := client.VectorStores.Delete(context.TODO(), \"vector_store_id\")\n                if err != nil {\n                  panic(err.Error())\n                }\n                fmt.Printf(\"%+v\\n\", vectorStoreDeleted.ID)\n              }\n            java: |-\n              package com.openai.example;\n\n              import com.openai.client.OpenAIClient;\n              import com.openai.client.okhttp.OpenAIOkHttpClient;\n              import com.openai.models.vectorstores.VectorStoreDeleteParams;\n              import com.openai.models.vectorstores.VectorStoreDeleted;\n\n              public final class Main {\n                  private Main() {}\n\n                  public static void main(String[] args) {\n                      OpenAIClient client = OpenAIOkHttpClient.fromEnv();\n\n                      VectorStoreDeleted vectorStoreDeleted = client.vectorStores().delete(\"vector_store_id\");\n                  }\n              }\n            ruby: |-\n              require \"openai\"\n\n              openai = OpenAI::Client.new(api_key: \"My API Key\")\n\n              vector_store_deleted = openai.vector_stores.delete(\"vector_store_id\")\n\n              puts(vector_store_deleted)\n      description: Delete a vector store.\n  /vector_stores/{vector_store_id}/file_batches:\n    post:\n      operationId: createVectorStoreFileBatch\n      tags:\n        - Vector stores\n      summary: Create vector store file batch\n      parameters:\n        - in: path\n          name: vector_store_id\n          required: true\n          schema:\n            type: string\n            example: vs_abc123\n          description: |\n            The ID of the vector store for which to create a File Batch.\n      requestBody:\n        required: true\n        content:\n          application/json:\n            schema:\n              $ref: '#/components/schemas/CreateVectorStoreFileBatchRequest'\n      responses:\n        '200':\n          description: OK\n          content:\n            application/json:\n              schema:\n                $ref: '#/components/schemas/VectorStoreFileBatchObject'\n      x-oaiMeta:\n        name: Create vector store file batch\n        group: vector_stores\n        returns: >-\n          A [vector store file\n          batch](https://platform.openai.com/docs/api-reference/vector-stores-file-batches/batch-object)\n          object.\n        examples:\n          response: |\n            {\n              \"id\": \"vsfb_abc123\",\n              \"object\": \"vector_store.file_batch\",\n              \"created_at\": 1699061776,\n              \"vector_store_id\": \"vs_abc123\",\n              \"status\": \"in_progress\",\n              \"file_counts\": {\n                \"in_progress\": 1,\n                \"completed\": 1,\n                \"failed\": 0,\n                \"cancelled\": 0,\n                \"total\": 0,\n              }\n            }\n          request:\n            curl: |\n              curl https://api.openai.com/v1/vector_stores/vs_abc123/file_batches \\\n                  -H \"Authorization: Bearer $OPENAI_API_KEY\" \\\n                  -H \"Content-Type: application/json \\\n                  -H \"OpenAI-Beta: assistants=v2\" \\\n                  -d '{\n                    \"file_ids\": [\"file-abc123\", \"file-abc456\"]\n                  }'\n            python: |-\n              from openai import OpenAI\n\n              client = OpenAI(\n                  api_key=\"My API Key\",\n              )\n              vector_store_file_batch = client.vector_stores.file_batches.create(\n                  vector_store_id=\"vs_abc123\",\n                  file_ids=[\"string\"],\n              )\n              print(vector_store_file_batch.id)\n            node.js: |-\n              import OpenAI from 'openai';\n\n              const client = new OpenAI({\n                apiKey: 'My API Key',\n              });\n\n              const vectorStoreFileBatch = await client.vectorStores.fileBatches.create('vs_abc123', {\n                file_ids: ['string'],\n              });\n\n              console.log(vectorStoreFileBatch.id);\n            go: |\n              package main\n\n              import (\n                \"context\"\n                \"fmt\"\n\n                \"github.com/openai/openai-go\"\n                \"github.com/openai/openai-go/option\"\n              )\n\n              func main() {\n                client := openai.NewClient(\n                  option.WithAPIKey(\"My API Key\"),\n                )\n                vectorStoreFileBatch, err := client.VectorStores.FileBatches.New(\n                  context.TODO(),\n                  \"vs_abc123\",\n                  openai.VectorStoreFileBatchNewParams{\n                    FileIDs: []string{\"string\"},\n                  },\n                )\n                if err != nil {\n                  panic(err.Error())\n                }\n                fmt.Printf(\"%+v\\n\", vectorStoreFileBatch.ID)\n              }\n            java: |-\n              package com.openai.example;\n\n              import com.openai.client.OpenAIClient;\n              import com.openai.client.okhttp.OpenAIOkHttpClient;\n              import com.openai.models.vectorstores.filebatches.FileBatchCreateParams;\n              import com.openai.models.vectorstores.filebatches.VectorStoreFileBatch;\n\n              public final class Main {\n                  private Main() {}\n\n                  public static void main(String[] args) {\n                      OpenAIClient client = OpenAIOkHttpClient.fromEnv();\n\n                      FileBatchCreateParams params = FileBatchCreateParams.builder()\n                          .vectorStoreId(\"vs_abc123\")\n                          .addFileId(\"string\")\n                          .build();\n                      VectorStoreFileBatch vectorStoreFileBatch = client.vectorStores().fileBatches().create(params);\n                  }\n              }\n            ruby: >-\n              require \"openai\"\n\n\n              openai = OpenAI::Client.new(api_key: \"My API Key\")\n\n\n              vector_store_file_batch = openai.vector_stores.file_batches.create(\"vs_abc123\", file_ids:\n              [\"string\"])\n\n\n              puts(vector_store_file_batch)\n      description: Create a vector store file batch.\n  /vector_stores/{vector_store_id}/file_batches/{batch_id}:\n    get:\n      operationId: getVectorStoreFileBatch\n      tags:\n        - Vector stores\n      summary: Retrieve vector store file batch\n      parameters:\n        - in: path\n          name: vector_store_id\n          required: true\n          schema:\n            type: string\n            example: vs_abc123\n          description: The ID of the vector store that the file batch belongs to.\n        - in: path\n          name: batch_id\n          required: true\n          schema:\n            type: string\n            example: vsfb_abc123\n          description: The ID of the file batch being retrieved.\n      responses:\n        '200':\n          description: OK\n          content:\n            application/json:\n              schema:\n                $ref: '#/components/schemas/VectorStoreFileBatchObject'\n      x-oaiMeta:\n        name: Retrieve vector store file batch\n        group: vector_stores\n        returns: >-\n          The [vector store file\n          batch](https://platform.openai.com/docs/api-reference/vector-stores-file-batches/batch-object)\n          object.\n        examples:\n          response: |\n            {\n              \"id\": \"vsfb_abc123\",\n              \"object\": \"vector_store.file_batch\",\n              \"created_at\": 1699061776,\n              \"vector_store_id\": \"vs_abc123\",\n              \"status\": \"in_progress\",\n              \"file_counts\": {\n                \"in_progress\": 1,\n                \"completed\": 1,\n                \"failed\": 0,\n                \"cancelled\": 0,\n                \"total\": 0,\n              }\n            }\n          request:\n            curl: |\n              curl https://api.openai.com/v1/vector_stores/vs_abc123/files_batches/vsfb_abc123 \\\n                -H \"Authorization: Bearer $OPENAI_API_KEY\" \\\n                -H \"Content-Type: application/json\" \\\n                -H \"OpenAI-Beta: assistants=v2\"\n            python: |-\n              from openai import OpenAI\n\n              client = OpenAI(\n                  api_key=\"My API Key\",\n              )\n              vector_store_file_batch = client.vector_stores.file_batches.retrieve(\n                  batch_id=\"vsfb_abc123\",\n                  vector_store_id=\"vs_abc123\",\n              )\n              print(vector_store_file_batch.id)\n            node.js: |-\n              import OpenAI from 'openai';\n\n              const client = new OpenAI({\n                apiKey: 'My API Key',\n              });\n\n              const vectorStoreFileBatch = await client.vectorStores.fileBatches.retrieve('vsfb_abc123', {\n                vector_store_id: 'vs_abc123',\n              });\n\n              console.log(vectorStoreFileBatch.id);\n            go: |\n              package main\n\n              import (\n                \"context\"\n                \"fmt\"\n\n                \"github.com/openai/openai-go\"\n                \"github.com/openai/openai-go/option\"\n              )\n\n              func main() {\n                client := openai.NewClient(\n                  option.WithAPIKey(\"My API Key\"),\n                )\n                vectorStoreFileBatch, err := client.VectorStores.FileBatches.Get(\n                  context.TODO(),\n                  \"vs_abc123\",\n                  \"vsfb_abc123\",\n                )\n                if err != nil {\n                  panic(err.Error())\n                }\n                fmt.Printf(\"%+v\\n\", vectorStoreFileBatch.ID)\n              }\n            java: |-\n              package com.openai.example;\n\n              import com.openai.client.OpenAIClient;\n              import com.openai.client.okhttp.OpenAIOkHttpClient;\n              import com.openai.models.vectorstores.filebatches.FileBatchRetrieveParams;\n              import com.openai.models.vectorstores.filebatches.VectorStoreFileBatch;\n\n              public final class Main {\n                  private Main() {}\n\n                  public static void main(String[] args) {\n                      OpenAIClient client = OpenAIOkHttpClient.fromEnv();\n\n                      FileBatchRetrieveParams params = FileBatchRetrieveParams.builder()\n                          .vectorStoreId(\"vs_abc123\")\n                          .batchId(\"vsfb_abc123\")\n                          .build();\n                      VectorStoreFileBatch vectorStoreFileBatch = client.vectorStores().fileBatches().retrieve(params);\n                  }\n              }\n            ruby: >-\n              require \"openai\"\n\n\n              openai = OpenAI::Client.new(api_key: \"My API Key\")\n\n\n              vector_store_file_batch = openai.vector_stores.file_batches.retrieve(\"vsfb_abc123\",\n              vector_store_id: \"vs_abc123\")\n\n\n              puts(vector_store_file_batch)\n      description: Retrieves a vector store file batch.\n  /vector_stores/{vector_store_id}/file_batches/{batch_id}/cancel:\n    post:\n      operationId: cancelVectorStoreFileBatch\n      tags:\n        - Vector stores\n      summary: Cancel vector store file batch\n      parameters:\n        - in: path\n          name: vector_store_id\n          required: true\n          schema:\n            type: string\n          description: The ID of the vector store that the file batch belongs to.\n        - in: path\n          name: batch_id\n          required: true\n          schema:\n            type: string\n          description: The ID of the file batch to cancel.\n      responses:\n        '200':\n          description: OK\n          content:\n            application/json:\n              schema:\n                $ref: '#/components/schemas/VectorStoreFileBatchObject'\n      x-oaiMeta:\n        name: Cancel vector store file batch\n        group: vector_stores\n        returns: The modified vector store file batch object.\n        examples:\n          response: |\n            {\n              \"id\": \"vsfb_abc123\",\n              \"object\": \"vector_store.file_batch\",\n              \"created_at\": 1699061776,\n              \"vector_store_id\": \"vs_abc123\",\n              \"status\": \"in_progress\",\n              \"file_counts\": {\n                \"in_progress\": 12,\n                \"completed\": 3,\n                \"failed\": 0,\n                \"cancelled\": 0,\n                \"total\": 15,\n              }\n            }\n          request:\n            curl: |\n              curl https://api.openai.com/v1/vector_stores/vs_abc123/files_batches/vsfb_abc123/cancel \\\n                -H \"Authorization: Bearer $OPENAI_API_KEY\" \\\n                -H \"Content-Type: application/json\" \\\n                -H \"OpenAI-Beta: assistants=v2\" \\\n                -X POST\n            python: |-\n              from openai import OpenAI\n\n              client = OpenAI(\n                  api_key=\"My API Key\",\n              )\n              vector_store_file_batch = client.vector_stores.file_batches.cancel(\n                  batch_id=\"batch_id\",\n                  vector_store_id=\"vector_store_id\",\n              )\n              print(vector_store_file_batch.id)\n            node.js: |-\n              import OpenAI from 'openai';\n\n              const client = new OpenAI({\n                apiKey: 'My API Key',\n              });\n\n              const vectorStoreFileBatch = await client.vectorStores.fileBatches.cancel('batch_id', {\n                vector_store_id: 'vector_store_id',\n              });\n\n              console.log(vectorStoreFileBatch.id);\n            go: |\n              package main\n\n              import (\n                \"context\"\n                \"fmt\"\n\n                \"github.com/openai/openai-go\"\n                \"github.com/openai/openai-go/option\"\n              )\n\n              func main() {\n                client := openai.NewClient(\n                  option.WithAPIKey(\"My API Key\"),\n                )\n                vectorStoreFileBatch, err := client.VectorStores.FileBatches.Cancel(\n                  context.TODO(),\n                  \"vector_store_id\",\n                  \"batch_id\",\n                )\n                if err != nil {\n                  panic(err.Error())\n                }\n                fmt.Printf(\"%+v\\n\", vectorStoreFileBatch.ID)\n              }\n            java: |-\n              package com.openai.example;\n\n              import com.openai.client.OpenAIClient;\n              import com.openai.client.okhttp.OpenAIOkHttpClient;\n              import com.openai.models.vectorstores.filebatches.FileBatchCancelParams;\n              import com.openai.models.vectorstores.filebatches.VectorStoreFileBatch;\n\n              public final class Main {\n                  private Main() {}\n\n                  public static void main(String[] args) {\n                      OpenAIClient client = OpenAIOkHttpClient.fromEnv();\n\n                      FileBatchCancelParams params = FileBatchCancelParams.builder()\n                          .vectorStoreId(\"vector_store_id\")\n                          .batchId(\"batch_id\")\n                          .build();\n                      VectorStoreFileBatch vectorStoreFileBatch = client.vectorStores().fileBatches().cancel(params);\n                  }\n              }\n            ruby: >-\n              require \"openai\"\n\n\n              openai = OpenAI::Client.new(api_key: \"My API Key\")\n\n\n              vector_store_file_batch = openai.vector_stores.file_batches.cancel(\"batch_id\", vector_store_id:\n              \"vector_store_id\")\n\n\n              puts(vector_store_file_batch)\n      description: >-\n        Cancel a vector store file batch. This attempts to cancel the processing of files in this batch as\n        soon as possible.\n  /vector_stores/{vector_store_id}/file_batches/{batch_id}/files:\n    get:\n      operationId: listFilesInVectorStoreBatch\n      tags:\n        - Vector stores\n      summary: List vector store files in a batch\n      parameters:\n        - name: vector_store_id\n          in: path\n          description: The ID of the vector store that the files belong to.\n          required: true\n          schema:\n            type: string\n        - name: batch_id\n          in: path\n          description: The ID of the file batch that the files belong to.\n          required: true\n          schema:\n            type: string\n        - name: limit\n          in: query\n          description: >\n            A limit on the number of objects to be returned. Limit can range between 1 and 100, and the\n            default is 20.\n          required: false\n          schema:\n            type: integer\n            default: 20\n        - name: order\n          in: query\n          description: >\n            Sort order by the `created_at` timestamp of the objects. `asc` for ascending order and `desc` for\n            descending order.\n          schema:\n            type: string\n            default: desc\n            enum:\n              - asc\n              - desc\n        - name: after\n          in: query\n          description: >\n            A cursor for use in pagination. `after` is an object ID that defines your place in the list. For\n            instance, if you make a list request and receive 100 objects, ending with obj_foo, your subsequent\n            call can include after=obj_foo in order to fetch the next page of the list.\n          schema:\n            type: string\n        - name: before\n          in: query\n          description: >\n            A cursor for use in pagination. `before` is an object ID that defines your place in the list. For\n            instance, if you make a list request and receive 100 objects, starting with obj_foo, your\n            subsequent call can include before=obj_foo in order to fetch the previous page of the list.\n          schema:\n            type: string\n        - name: filter\n          in: query\n          description: Filter by file status. One of `in_progress`, `completed`, `failed`, `cancelled`.\n          schema:\n            type: string\n            enum:\n              - in_progress\n              - completed\n              - failed\n              - cancelled\n      responses:\n        '200':\n          description: OK\n          content:\n            application/json:\n              schema:\n                $ref: '#/components/schemas/ListVectorStoreFilesResponse'\n      x-oaiMeta:\n        name: List vector store files in a batch\n        group: vector_stores\n        returns: >-\n          A list of [vector store\n          file](https://platform.openai.com/docs/api-reference/vector-stores-files/file-object) objects.\n        examples:\n          response: |\n            {\n              \"object\": \"list\",\n              \"data\": [\n                {\n                  \"id\": \"file-abc123\",\n                  \"object\": \"vector_store.file\",\n                  \"created_at\": 1699061776,\n                  \"vector_store_id\": \"vs_abc123\"\n                },\n                {\n                  \"id\": \"file-abc456\",\n                  \"object\": \"vector_store.file\",\n                  \"created_at\": 1699061776,\n                  \"vector_store_id\": \"vs_abc123\"\n                }\n              ],\n              \"first_id\": \"file-abc123\",\n              \"last_id\": \"file-abc456\",\n              \"has_more\": false\n            }\n          request:\n            curl: |\n              curl https://api.openai.com/v1/vector_stores/vs_abc123/files_batches/vsfb_abc123/files \\\n                -H \"Authorization: Bearer $OPENAI_API_KEY\" \\\n                -H \"Content-Type: application/json\" \\\n                -H \"OpenAI-Beta: assistants=v2\"\n            python: |-\n              from openai import OpenAI\n\n              client = OpenAI(\n                  api_key=\"My API Key\",\n              )\n              page = client.vector_stores.file_batches.list_files(\n                  batch_id=\"batch_id\",\n                  vector_store_id=\"vector_store_id\",\n              )\n              page = page.data[0]\n              print(page.id)\n            node.js: |-\n              import OpenAI from 'openai';\n\n              const client = new OpenAI({\n                apiKey: 'My API Key',\n              });\n\n              // Automatically fetches more pages as needed.\n              for await (const vectorStoreFile of client.vectorStores.fileBatches.listFiles('batch_id', {\n                vector_store_id: 'vector_store_id',\n              })) {\n                console.log(vectorStoreFile.id);\n              }\n            go: |\n              package main\n\n              import (\n                \"context\"\n                \"fmt\"\n\n                \"github.com/openai/openai-go\"\n                \"github.com/openai/openai-go/option\"\n              )\n\n              func main() {\n                client := openai.NewClient(\n                  option.WithAPIKey(\"My API Key\"),\n                )\n                page, err := client.VectorStores.FileBatches.ListFiles(\n                  context.TODO(),\n                  \"vector_store_id\",\n                  \"batch_id\",\n                  openai.VectorStoreFileBatchListFilesParams{\n\n                  },\n                )\n                if err != nil {\n                  panic(err.Error())\n                }\n                fmt.Printf(\"%+v\\n\", page)\n              }\n            java: |-\n              package com.openai.example;\n\n              import com.openai.client.OpenAIClient;\n              import com.openai.client.okhttp.OpenAIOkHttpClient;\n              import com.openai.models.vectorstores.filebatches.FileBatchListFilesPage;\n              import com.openai.models.vectorstores.filebatches.FileBatchListFilesParams;\n\n              public final class Main {\n                  private Main() {}\n\n                  public static void main(String[] args) {\n                      OpenAIClient client = OpenAIOkHttpClient.fromEnv();\n\n                      FileBatchListFilesParams params = FileBatchListFilesParams.builder()\n                          .vectorStoreId(\"vector_store_id\")\n                          .batchId(\"batch_id\")\n                          .build();\n                      FileBatchListFilesPage page = client.vectorStores().fileBatches().listFiles(params);\n                  }\n              }\n            ruby: >-\n              require \"openai\"\n\n\n              openai = OpenAI::Client.new(api_key: \"My API Key\")\n\n\n              page = openai.vector_stores.file_batches.list_files(\"batch_id\", vector_store_id:\n              \"vector_store_id\")\n\n\n              puts(page)\n      description: Returns a list of vector store files in a batch.\n  /vector_stores/{vector_store_id}/files:\n    get:\n      operationId: listVectorStoreFiles\n      tags:\n        - Vector stores\n      summary: List vector store files\n      parameters:\n        - name: vector_store_id\n          in: path\n          description: The ID of the vector store that the files belong to.\n          required: true\n          schema:\n            type: string\n        - name: limit\n          in: query\n          description: >\n            A limit on the number of objects to be returned. Limit can range between 1 and 100, and the\n            default is 20.\n          required: false\n          schema:\n            type: integer\n            default: 20\n        - name: order\n          in: query\n          description: >\n            Sort order by the `created_at` timestamp of the objects. `asc` for ascending order and `desc` for\n            descending order.\n          schema:\n            type: string\n            default: desc\n            enum:\n              - asc\n              - desc\n        - name: after\n          in: query\n          description: >\n            A cursor for use in pagination. `after` is an object ID that defines your place in the list. For\n            instance, if you make a list request and receive 100 objects, ending with obj_foo, your subsequent\n            call can include after=obj_foo in order to fetch the next page of the list.\n          schema:\n            type: string\n        - name: before\n          in: query\n          description: >\n            A cursor for use in pagination. `before` is an object ID that defines your place in the list. For\n            instance, if you make a list request and receive 100 objects, starting with obj_foo, your\n            subsequent call can include before=obj_foo in order to fetch the previous page of the list.\n          schema:\n            type: string\n        - name: filter\n          in: query\n          description: Filter by file status. One of `in_progress`, `completed`, `failed`, `cancelled`.\n          schema:\n            type: string\n            enum:\n              - in_progress\n              - completed\n              - failed\n              - cancelled\n      responses:\n        '200':\n          description: OK\n          content:\n            application/json:\n              schema:\n                $ref: '#/components/schemas/ListVectorStoreFilesResponse'\n      x-oaiMeta:\n        name: List vector store files\n        group: vector_stores\n        returns: >-\n          A list of [vector store\n          file](https://platform.openai.com/docs/api-reference/vector-stores-files/file-object) objects.\n        examples:\n          response: |\n            {\n              \"object\": \"list\",\n              \"data\": [\n                {\n                  \"id\": \"file-abc123\",\n                  \"object\": \"vector_store.file\",\n                  \"created_at\": 1699061776,\n                  \"vector_store_id\": \"vs_abc123\"\n                },\n                {\n                  \"id\": \"file-abc456\",\n                  \"object\": \"vector_store.file\",\n                  \"created_at\": 1699061776,\n                  \"vector_store_id\": \"vs_abc123\"\n                }\n              ],\n              \"first_id\": \"file-abc123\",\n              \"last_id\": \"file-abc456\",\n              \"has_more\": false\n            }\n          request:\n            curl: |\n              curl https://api.openai.com/v1/vector_stores/vs_abc123/files \\\n                -H \"Authorization: Bearer $OPENAI_API_KEY\" \\\n                -H \"Content-Type: application/json\" \\\n                -H \"OpenAI-Beta: assistants=v2\"\n            python: |-\n              from openai import OpenAI\n\n              client = OpenAI(\n                  api_key=\"My API Key\",\n              )\n              page = client.vector_stores.files.list(\n                  vector_store_id=\"vector_store_id\",\n              )\n              page = page.data[0]\n              print(page.id)\n            node.js: |-\n              import OpenAI from 'openai';\n\n              const client = new OpenAI({\n                apiKey: 'My API Key',\n              });\n\n              // Automatically fetches more pages as needed.\n              for await (const vectorStoreFile of client.vectorStores.files.list('vector_store_id')) {\n                console.log(vectorStoreFile.id);\n              }\n            go: |\n              package main\n\n              import (\n                \"context\"\n                \"fmt\"\n\n                \"github.com/openai/openai-go\"\n                \"github.com/openai/openai-go/option\"\n              )\n\n              func main() {\n                client := openai.NewClient(\n                  option.WithAPIKey(\"My API Key\"),\n                )\n                page, err := client.VectorStores.Files.List(\n                  context.TODO(),\n                  \"vector_store_id\",\n                  openai.VectorStoreFileListParams{\n\n                  },\n                )\n                if err != nil {\n                  panic(err.Error())\n                }\n                fmt.Printf(\"%+v\\n\", page)\n              }\n            java: |-\n              package com.openai.example;\n\n              import com.openai.client.OpenAIClient;\n              import com.openai.client.okhttp.OpenAIOkHttpClient;\n              import com.openai.models.vectorstores.files.FileListPage;\n              import com.openai.models.vectorstores.files.FileListParams;\n\n              public final class Main {\n                  private Main() {}\n\n                  public static void main(String[] args) {\n                      OpenAIClient client = OpenAIOkHttpClient.fromEnv();\n\n                      FileListPage page = client.vectorStores().files().list(\"vector_store_id\");\n                  }\n              }\n            ruby: |-\n              require \"openai\"\n\n              openai = OpenAI::Client.new(api_key: \"My API Key\")\n\n              page = openai.vector_stores.files.list(\"vector_store_id\")\n\n              puts(page)\n      description: Returns a list of vector store files.\n    post:\n      operationId: createVectorStoreFile\n      tags:\n        - Vector stores\n      summary: Create vector store file\n      parameters:\n        - in: path\n          name: vector_store_id\n          required: true\n          schema:\n            type: string\n            example: vs_abc123\n          description: |\n            The ID of the vector store for which to create a File.\n      requestBody:\n        required: true\n        content:\n          application/json:\n            schema:\n              $ref: '#/components/schemas/CreateVectorStoreFileRequest'\n      responses:\n        '200':\n          description: OK\n          content:\n            application/json:\n              schema:\n                $ref: '#/components/schemas/VectorStoreFileObject'\n      x-oaiMeta:\n        name: Create vector store file\n        group: vector_stores\n        returns: >-\n          A [vector store\n          file](https://platform.openai.com/docs/api-reference/vector-stores-files/file-object) object.\n        examples:\n          response: |\n            {\n              \"id\": \"file-abc123\",\n              \"object\": \"vector_store.file\",\n              \"created_at\": 1699061776,\n              \"usage_bytes\": 1234,\n              \"vector_store_id\": \"vs_abcd\",\n              \"status\": \"completed\",\n              \"last_error\": null\n            }\n          request:\n            curl: |\n              curl https://api.openai.com/v1/vector_stores/vs_abc123/files \\\n                  -H \"Authorization: Bearer $OPENAI_API_KEY\" \\\n                  -H \"Content-Type: application/json\" \\\n                  -H \"OpenAI-Beta: assistants=v2\" \\\n                  -d '{\n                    \"file_id\": \"file-abc123\"\n                  }'\n            python: |-\n              from openai import OpenAI\n\n              client = OpenAI(\n                  api_key=\"My API Key\",\n              )\n              vector_store_file = client.vector_stores.files.create(\n                  vector_store_id=\"vs_abc123\",\n                  file_id=\"file_id\",\n              )\n              print(vector_store_file.id)\n            node.js: >-\n              import OpenAI from 'openai';\n\n\n              const client = new OpenAI({\n                apiKey: 'My API Key',\n              });\n\n\n              const vectorStoreFile = await client.vectorStores.files.create('vs_abc123', { file_id: 'file_id'\n              });\n\n\n              console.log(vectorStoreFile.id);\n            go: |\n              package main\n\n              import (\n                \"context\"\n                \"fmt\"\n\n                \"github.com/openai/openai-go\"\n                \"github.com/openai/openai-go/option\"\n              )\n\n              func main() {\n                client := openai.NewClient(\n                  option.WithAPIKey(\"My API Key\"),\n                )\n                vectorStoreFile, err := client.VectorStores.Files.New(\n                  context.TODO(),\n                  \"vs_abc123\",\n                  openai.VectorStoreFileNewParams{\n                    FileID: \"file_id\",\n                  },\n                )\n                if err != nil {\n                  panic(err.Error())\n                }\n                fmt.Printf(\"%+v\\n\", vectorStoreFile.ID)\n              }\n            java: |-\n              package com.openai.example;\n\n              import com.openai.client.OpenAIClient;\n              import com.openai.client.okhttp.OpenAIOkHttpClient;\n              import com.openai.models.vectorstores.files.FileCreateParams;\n              import com.openai.models.vectorstores.files.VectorStoreFile;\n\n              public final class Main {\n                  private Main() {}\n\n                  public static void main(String[] args) {\n                      OpenAIClient client = OpenAIOkHttpClient.fromEnv();\n\n                      FileCreateParams params = FileCreateParams.builder()\n                          .vectorStoreId(\"vs_abc123\")\n                          .fileId(\"file_id\")\n                          .build();\n                      VectorStoreFile vectorStoreFile = client.vectorStores().files().create(params);\n                  }\n              }\n            ruby: |-\n              require \"openai\"\n\n              openai = OpenAI::Client.new(api_key: \"My API Key\")\n\n              vector_store_file = openai.vector_stores.files.create(\"vs_abc123\", file_id: \"file_id\")\n\n              puts(vector_store_file)\n      description: >-\n        Create a vector store file by attaching a [File](https://platform.openai.com/docs/api-reference/files)\n        to a [vector store](https://platform.openai.com/docs/api-reference/vector-stores/object).\n  /vector_stores/{vector_store_id}/files/{file_id}:\n    get:\n      operationId: getVectorStoreFile\n      tags:\n        - Vector stores\n      summary: Retrieve vector store file\n      parameters:\n        - in: path\n          name: vector_store_id\n          required: true\n          schema:\n            type: string\n            example: vs_abc123\n          description: The ID of the vector store that the file belongs to.\n        - in: path\n          name: file_id\n          required: true\n          schema:\n            type: string\n            example: file-abc123\n          description: The ID of the file being retrieved.\n      responses:\n        '200':\n          description: OK\n          content:\n            application/json:\n              schema:\n                $ref: '#/components/schemas/VectorStoreFileObject'\n      x-oaiMeta:\n        name: Retrieve vector store file\n        group: vector_stores\n        returns: >-\n          The [vector store\n          file](https://platform.openai.com/docs/api-reference/vector-stores-files/file-object) object.\n        examples:\n          response: |\n            {\n              \"id\": \"file-abc123\",\n              \"object\": \"vector_store.file\",\n              \"created_at\": 1699061776,\n              \"vector_store_id\": \"vs_abcd\",\n              \"status\": \"completed\",\n              \"last_error\": null\n            }\n          request:\n            curl: |\n              curl https://api.openai.com/v1/vector_stores/vs_abc123/files/file-abc123 \\\n                -H \"Authorization: Bearer $OPENAI_API_KEY\" \\\n                -H \"Content-Type: application/json\" \\\n                -H \"OpenAI-Beta: assistants=v2\"\n            python: |-\n              from openai import OpenAI\n\n              client = OpenAI(\n                  api_key=\"My API Key\",\n              )\n              vector_store_file = client.vector_stores.files.retrieve(\n                  file_id=\"file-abc123\",\n                  vector_store_id=\"vs_abc123\",\n              )\n              print(vector_store_file.id)\n            node.js: |-\n              import OpenAI from 'openai';\n\n              const client = new OpenAI({\n                apiKey: 'My API Key',\n              });\n\n              const vectorStoreFile = await client.vectorStores.files.retrieve('file-abc123', {\n                vector_store_id: 'vs_abc123',\n              });\n\n              console.log(vectorStoreFile.id);\n            go: |\n              package main\n\n              import (\n                \"context\"\n                \"fmt\"\n\n                \"github.com/openai/openai-go\"\n                \"github.com/openai/openai-go/option\"\n              )\n\n              func main() {\n                client := openai.NewClient(\n                  option.WithAPIKey(\"My API Key\"),\n                )\n                vectorStoreFile, err := client.VectorStores.Files.Get(\n                  context.TODO(),\n                  \"vs_abc123\",\n                  \"file-abc123\",\n                )\n                if err != nil {\n                  panic(err.Error())\n                }\n                fmt.Printf(\"%+v\\n\", vectorStoreFile.ID)\n              }\n            java: |-\n              package com.openai.example;\n\n              import com.openai.client.OpenAIClient;\n              import com.openai.client.okhttp.OpenAIOkHttpClient;\n              import com.openai.models.vectorstores.files.FileRetrieveParams;\n              import com.openai.models.vectorstores.files.VectorStoreFile;\n\n              public final class Main {\n                  private Main() {}\n\n                  public static void main(String[] args) {\n                      OpenAIClient client = OpenAIOkHttpClient.fromEnv();\n\n                      FileRetrieveParams params = FileRetrieveParams.builder()\n                          .vectorStoreId(\"vs_abc123\")\n                          .fileId(\"file-abc123\")\n                          .build();\n                      VectorStoreFile vectorStoreFile = client.vectorStores().files().retrieve(params);\n                  }\n              }\n            ruby: >-\n              require \"openai\"\n\n\n              openai = OpenAI::Client.new(api_key: \"My API Key\")\n\n\n              vector_store_file = openai.vector_stores.files.retrieve(\"file-abc123\", vector_store_id:\n              \"vs_abc123\")\n\n\n              puts(vector_store_file)\n      description: Retrieves a vector store file.\n    delete:\n      operationId: deleteVectorStoreFile\n      tags:\n        - Vector stores\n      summary: Delete vector store file\n      parameters:\n        - in: path\n          name: vector_store_id\n          required: true\n          schema:\n            type: string\n          description: The ID of the vector store that the file belongs to.\n        - in: path\n          name: file_id\n          required: true\n          schema:\n            type: string\n          description: The ID of the file to delete.\n      responses:\n        '200':\n          description: OK\n          content:\n            application/json:\n              schema:\n                $ref: '#/components/schemas/DeleteVectorStoreFileResponse'\n      x-oaiMeta:\n        name: Delete vector store file\n        group: vector_stores\n        returns: Deletion status\n        examples:\n          response: |\n            {\n              id: \"file-abc123\",\n              object: \"vector_store.file.deleted\",\n              deleted: true\n            }\n          request:\n            curl: |\n              curl https://api.openai.com/v1/vector_stores/vs_abc123/files/file-abc123 \\\n                -H \"Authorization: Bearer $OPENAI_API_KEY\" \\\n                -H \"Content-Type: application/json\" \\\n                -H \"OpenAI-Beta: assistants=v2\" \\\n                -X DELETE\n            python: |-\n              from openai import OpenAI\n\n              client = OpenAI(\n                  api_key=\"My API Key\",\n              )\n              vector_store_file_deleted = client.vector_stores.files.delete(\n                  file_id=\"file_id\",\n                  vector_store_id=\"vector_store_id\",\n              )\n              print(vector_store_file_deleted.id)\n            node.js: |-\n              import OpenAI from 'openai';\n\n              const client = new OpenAI({\n                apiKey: 'My API Key',\n              });\n\n              const vectorStoreFileDeleted = await client.vectorStores.files.delete('file_id', {\n                vector_store_id: 'vector_store_id',\n              });\n\n              console.log(vectorStoreFileDeleted.id);\n            go: |\n              package main\n\n              import (\n                \"context\"\n                \"fmt\"\n\n                \"github.com/openai/openai-go\"\n                \"github.com/openai/openai-go/option\"\n              )\n\n              func main() {\n                client := openai.NewClient(\n                  option.WithAPIKey(\"My API Key\"),\n                )\n                vectorStoreFileDeleted, err := client.VectorStores.Files.Delete(\n                  context.TODO(),\n                  \"vector_store_id\",\n                  \"file_id\",\n                )\n                if err != nil {\n                  panic(err.Error())\n                }\n                fmt.Printf(\"%+v\\n\", vectorStoreFileDeleted.ID)\n              }\n            java: |-\n              package com.openai.example;\n\n              import com.openai.client.OpenAIClient;\n              import com.openai.client.okhttp.OpenAIOkHttpClient;\n              import com.openai.models.vectorstores.files.FileDeleteParams;\n              import com.openai.models.vectorstores.files.VectorStoreFileDeleted;\n\n              public final class Main {\n                  private Main() {}\n\n                  public static void main(String[] args) {\n                      OpenAIClient client = OpenAIOkHttpClient.fromEnv();\n\n                      FileDeleteParams params = FileDeleteParams.builder()\n                          .vectorStoreId(\"vector_store_id\")\n                          .fileId(\"file_id\")\n                          .build();\n                      VectorStoreFileDeleted vectorStoreFileDeleted = client.vectorStores().files().delete(params);\n                  }\n              }\n            ruby: >-\n              require \"openai\"\n\n\n              openai = OpenAI::Client.new(api_key: \"My API Key\")\n\n\n              vector_store_file_deleted = openai.vector_stores.files.delete(\"file_id\", vector_store_id:\n              \"vector_store_id\")\n\n\n              puts(vector_store_file_deleted)\n      description: >-\n        Delete a vector store file. This will remove the file from the vector store but the file itself will\n        not be deleted. To delete the file, use the [delete\n        file](https://platform.openai.com/docs/api-reference/files/delete) endpoint.\n    post:\n      operationId: updateVectorStoreFileAttributes\n      tags:\n        - Vector stores\n      summary: Update vector store file attributes\n      parameters:\n        - in: path\n          name: vector_store_id\n          required: true\n          schema:\n            type: string\n            example: vs_abc123\n          description: The ID of the vector store the file belongs to.\n        - in: path\n          name: file_id\n          required: true\n          schema:\n            type: string\n            example: file-abc123\n          description: The ID of the file to update attributes.\n      requestBody:\n        required: true\n        content:\n          application/json:\n            schema:\n              $ref: '#/components/schemas/UpdateVectorStoreFileAttributesRequest'\n      responses:\n        '200':\n          description: OK\n          content:\n            application/json:\n              schema:\n                $ref: '#/components/schemas/VectorStoreFileObject'\n      x-oaiMeta:\n        name: Update vector store file attributes\n        group: vector_stores\n        returns: >-\n          The updated [vector store\n          file](https://platform.openai.com/docs/api-reference/vector-stores-files/file-object) object.\n        examples:\n          response: |\n            {\n              \"id\": \"file-abc123\",\n              \"object\": \"vector_store.file\",\n              \"usage_bytes\": 1234,\n              \"created_at\": 1699061776,\n              \"vector_store_id\": \"vs_abcd\",\n              \"status\": \"completed\",\n              \"last_error\": null,\n              \"chunking_strategy\": {...},\n              \"attributes\": {\"key1\": \"value1\", \"key2\": 2}\n            }\n          request:\n            curl: |\n              curl https://api.openai.com/v1/vector_stores/{vector_store_id}/files/{file_id} \\\n                -H \"Authorization: Bearer $OPENAI_API_KEY\" \\\n                -H \"Content-Type: application/json\" \\\n                -d '{\"attributes\": {\"key1\": \"value1\", \"key2\": 2}}'\n            node.js: |-\n              import OpenAI from 'openai';\n\n              const client = new OpenAI({\n                apiKey: 'My API Key',\n              });\n\n              const vectorStoreFile = await client.vectorStores.files.update('file-abc123', {\n                vector_store_id: 'vs_abc123',\n                attributes: { foo: 'string' },\n              });\n\n              console.log(vectorStoreFile.id);\n            python: |-\n              from openai import OpenAI\n\n              client = OpenAI(\n                  api_key=\"My API Key\",\n              )\n              vector_store_file = client.vector_stores.files.update(\n                  file_id=\"file-abc123\",\n                  vector_store_id=\"vs_abc123\",\n                  attributes={\n                      \"foo\": \"string\"\n                  },\n              )\n              print(vector_store_file.id)\n            go: |\n              package main\n\n              import (\n                \"context\"\n                \"fmt\"\n\n                \"github.com/openai/openai-go\"\n                \"github.com/openai/openai-go/option\"\n              )\n\n              func main() {\n                client := openai.NewClient(\n                  option.WithAPIKey(\"My API Key\"),\n                )\n                vectorStoreFile, err := client.VectorStores.Files.Update(\n                  context.TODO(),\n                  \"vs_abc123\",\n                  \"file-abc123\",\n                  openai.VectorStoreFileUpdateParams{\n                    Attributes: map[string]openai.VectorStoreFileUpdateParamsAttributeUnion{\n                    \"foo\": openai.VectorStoreFileUpdateParamsAttributeUnion{\n                      OfString: openai.String(\"string\"),\n                    },\n                    },\n                  },\n                )\n                if err != nil {\n                  panic(err.Error())\n                }\n                fmt.Printf(\"%+v\\n\", vectorStoreFile.ID)\n              }\n            java: |-\n              package com.openai.example;\n\n              import com.openai.client.OpenAIClient;\n              import com.openai.client.okhttp.OpenAIOkHttpClient;\n              import com.openai.core.JsonValue;\n              import com.openai.models.vectorstores.files.FileUpdateParams;\n              import com.openai.models.vectorstores.files.VectorStoreFile;\n\n              public final class Main {\n                  private Main() {}\n\n                  public static void main(String[] args) {\n                      OpenAIClient client = OpenAIOkHttpClient.fromEnv();\n\n                      FileUpdateParams params = FileUpdateParams.builder()\n                          .vectorStoreId(\"vs_abc123\")\n                          .fileId(\"file-abc123\")\n                          .attributes(FileUpdateParams.Attributes.builder()\n                              .putAdditionalProperty(\"foo\", JsonValue.from(\"string\"))\n                              .build())\n                          .build();\n                      VectorStoreFile vectorStoreFile = client.vectorStores().files().update(params);\n                  }\n              }\n            ruby: |-\n              require \"openai\"\n\n              openai = OpenAI::Client.new(api_key: \"My API Key\")\n\n              vector_store_file = openai.vector_stores.files.update(\n                \"file-abc123\",\n                vector_store_id: \"vs_abc123\",\n                attributes: {foo: \"string\"}\n              )\n\n              puts(vector_store_file)\n      description: Update attributes on a vector store file.\n  /vector_stores/{vector_store_id}/files/{file_id}/content:\n    get:\n      operationId: retrieveVectorStoreFileContent\n      tags:\n        - Vector stores\n      summary: Retrieve vector store file content\n      parameters:\n        - in: path\n          name: vector_store_id\n          required: true\n          schema:\n            type: string\n            example: vs_abc123\n          description: The ID of the vector store.\n        - in: path\n          name: file_id\n          required: true\n          schema:\n            type: string\n            example: file-abc123\n          description: The ID of the file within the vector store.\n      responses:\n        '200':\n          description: OK\n          content:\n            application/json:\n              schema:\n                $ref: '#/components/schemas/VectorStoreFileContentResponse'\n      x-oaiMeta:\n        name: Retrieve vector store file content\n        group: vector_stores\n        returns: The parsed contents of the specified vector store file.\n        examples:\n          response: |\n            {\n              \"file_id\": \"file-abc123\",\n              \"filename\": \"example.txt\",\n              \"attributes\": {\"key\": \"value\"},\n              \"content\": [\n                {\"type\": \"text\", \"text\": \"...\"},\n                ...\n              ]\n            }\n          request:\n            curl: |\n              curl \\\n              https://api.openai.com/v1/vector_stores/vs_abc123/files/file-abc123/content \\\n              -H \"Authorization: Bearer $OPENAI_API_KEY\"\n            node.js: |-\n              import OpenAI from 'openai';\n\n              const client = new OpenAI({\n                apiKey: 'My API Key',\n              });\n\n              // Automatically fetches more pages as needed.\n              for await (const fileContentResponse of client.vectorStores.files.content('file-abc123', {\n                vector_store_id: 'vs_abc123',\n              })) {\n                console.log(fileContentResponse.text);\n              }\n            python: |-\n              from openai import OpenAI\n\n              client = OpenAI(\n                  api_key=\"My API Key\",\n              )\n              page = client.vector_stores.files.content(\n                  file_id=\"file-abc123\",\n                  vector_store_id=\"vs_abc123\",\n              )\n              page = page.data[0]\n              print(page.text)\n            go: |\n              package main\n\n              import (\n                \"context\"\n                \"fmt\"\n\n                \"github.com/openai/openai-go\"\n                \"github.com/openai/openai-go/option\"\n              )\n\n              func main() {\n                client := openai.NewClient(\n                  option.WithAPIKey(\"My API Key\"),\n                )\n                page, err := client.VectorStores.Files.Content(\n                  context.TODO(),\n                  \"vs_abc123\",\n                  \"file-abc123\",\n                )\n                if err != nil {\n                  panic(err.Error())\n                }\n                fmt.Printf(\"%+v\\n\", page)\n              }\n            java: |-\n              package com.openai.example;\n\n              import com.openai.client.OpenAIClient;\n              import com.openai.client.okhttp.OpenAIOkHttpClient;\n              import com.openai.models.vectorstores.files.FileContentPage;\n              import com.openai.models.vectorstores.files.FileContentParams;\n\n              public final class Main {\n                  private Main() {}\n\n                  public static void main(String[] args) {\n                      OpenAIClient client = OpenAIOkHttpClient.fromEnv();\n\n                      FileContentParams params = FileContentParams.builder()\n                          .vectorStoreId(\"vs_abc123\")\n                          .fileId(\"file-abc123\")\n                          .build();\n                      FileContentPage page = client.vectorStores().files().content(params);\n                  }\n              }\n            ruby: |-\n              require \"openai\"\n\n              openai = OpenAI::Client.new(api_key: \"My API Key\")\n\n              page = openai.vector_stores.files.content(\"file-abc123\", vector_store_id: \"vs_abc123\")\n\n              puts(page)\n      description: Retrieve the parsed contents of a vector store file.\n  /vector_stores/{vector_store_id}/search:\n    post:\n      operationId: searchVectorStore\n      tags:\n        - Vector stores\n      summary: Search vector store\n      parameters:\n        - in: path\n          name: vector_store_id\n          required: true\n          schema:\n            type: string\n            example: vs_abc123\n          description: The ID of the vector store to search.\n      requestBody:\n        required: true\n        content:\n          application/json:\n            schema:\n              $ref: '#/components/schemas/VectorStoreSearchRequest'\n      responses:\n        '200':\n          description: OK\n          content:\n            application/json:\n              schema:\n                $ref: '#/components/schemas/VectorStoreSearchResultsPage'\n      x-oaiMeta:\n        name: Search vector store\n        group: vector_stores\n        returns: A page of search results from the vector store.\n        examples:\n          response: |\n            {\n              \"object\": \"vector_store.search_results.page\",\n              \"search_query\": \"What is the return policy?\",\n              \"data\": [\n                {\n                  \"file_id\": \"file_123\",\n                  \"filename\": \"document.pdf\",\n                  \"score\": 0.95,\n                  \"attributes\": {\n                    \"author\": \"John Doe\",\n                    \"date\": \"2023-01-01\"\n                  },\n                  \"content\": [\n                    {\n                      \"type\": \"text\",\n                      \"text\": \"Relevant chunk\"\n                    }\n                  ]\n                },\n                {\n                  \"file_id\": \"file_456\",\n                  \"filename\": \"notes.txt\",\n                  \"score\": 0.89,\n                  \"attributes\": {\n                    \"author\": \"Jane Smith\",\n                    \"date\": \"2023-01-02\"\n                  },\n                  \"content\": [\n                    {\n                      \"type\": \"text\",\n                      \"text\": \"Sample text content from the vector store.\"\n                    }\n                  ]\n                }\n              ],\n              \"has_more\": false,\n              \"next_page\": null\n            }\n          request:\n            curl: |\n              curl -X POST \\\n              https://api.openai.com/v1/vector_stores/vs_abc123/search \\\n              -H \"Authorization: Bearer $OPENAI_API_KEY\" \\\n              -H \"Content-Type: application/json\" \\\n              -d '{\"query\": \"What is the return policy?\", \"filters\": {...}}'\n            node.js: >-\n              import OpenAI from 'openai';\n\n\n              const client = new OpenAI({\n                apiKey: 'My API Key',\n              });\n\n\n              // Automatically fetches more pages as needed.\n\n              for await (const vectorStoreSearchResponse of client.vectorStores.search('vs_abc123', { query:\n              'string' })) {\n                console.log(vectorStoreSearchResponse.file_id);\n              }\n            python: |-\n              from openai import OpenAI\n\n              client = OpenAI(\n                  api_key=\"My API Key\",\n              )\n              page = client.vector_stores.search(\n                  vector_store_id=\"vs_abc123\",\n                  query=\"string\",\n              )\n              page = page.data[0]\n              print(page.file_id)\n            go: |\n              package main\n\n              import (\n                \"context\"\n                \"fmt\"\n\n                \"github.com/openai/openai-go\"\n                \"github.com/openai/openai-go/option\"\n              )\n\n              func main() {\n                client := openai.NewClient(\n                  option.WithAPIKey(\"My API Key\"),\n                )\n                page, err := client.VectorStores.Search(\n                  context.TODO(),\n                  \"vs_abc123\",\n                  openai.VectorStoreSearchParams{\n                    Query: openai.VectorStoreSearchParamsQueryUnion{\n                      OfString: openai.String(\"string\"),\n                    },\n                  },\n                )\n                if err != nil {\n                  panic(err.Error())\n                }\n                fmt.Printf(\"%+v\\n\", page)\n              }\n            java: |-\n              package com.openai.example;\n\n              import com.openai.client.OpenAIClient;\n              import com.openai.client.okhttp.OpenAIOkHttpClient;\n              import com.openai.models.vectorstores.VectorStoreSearchPage;\n              import com.openai.models.vectorstores.VectorStoreSearchParams;\n\n              public final class Main {\n                  private Main() {}\n\n                  public static void main(String[] args) {\n                      OpenAIClient client = OpenAIOkHttpClient.fromEnv();\n\n                      VectorStoreSearchParams params = VectorStoreSearchParams.builder()\n                          .vectorStoreId(\"vs_abc123\")\n                          .query(\"string\")\n                          .build();\n                      VectorStoreSearchPage page = client.vectorStores().search(params);\n                  }\n              }\n            ruby: |-\n              require \"openai\"\n\n              openai = OpenAI::Client.new(api_key: \"My API Key\")\n\n              page = openai.vector_stores.search(\"vs_abc123\", query: \"string\")\n\n              puts(page)\n      description: Search a vector store for relevant chunks based on a query and file attributes filter.\nwebhooks:\n  batch_cancelled:\n    post:\n      requestBody:\n        description: The event payload sent by the API.\n        content:\n          application/json:\n            schema:\n              $ref: '#/components/schemas/WebhookBatchCancelled'\n      responses:\n        '200':\n          description: |\n            Return a 200 status code to acknowledge receipt of the event. Non-200\n            status codes will be retried.\n  batch_completed:\n    post:\n      requestBody:\n        description: The event payload sent by the API.\n        content:\n          application/json:\n            schema:\n              $ref: '#/components/schemas/WebhookBatchCompleted'\n      responses:\n        '200':\n          description: |\n            Return a 200 status code to acknowledge receipt of the event. Non-200\n            status codes will be retried.\n  batch_expired:\n    post:\n      requestBody:\n        description: The event payload sent by the API.\n        content:\n          application/json:\n            schema:\n              $ref: '#/components/schemas/WebhookBatchExpired'\n      responses:\n        '200':\n          description: |\n            Return a 200 status code to acknowledge receipt of the event. Non-200\n            status codes will be retried.\n  batch_failed:\n    post:\n      requestBody:\n        description: The event payload sent by the API.\n        content:\n          application/json:\n            schema:\n              $ref: '#/components/schemas/WebhookBatchFailed'\n      responses:\n        '200':\n          description: |\n            Return a 200 status code to acknowledge receipt of the event. Non-200\n            status codes will be retried.\n  eval_run_canceled:\n    post:\n      requestBody:\n        description: The event payload sent by the API.\n        content:\n          application/json:\n            schema:\n              $ref: '#/components/schemas/WebhookEvalRunCanceled'\n      responses:\n        '200':\n          description: |\n            Return a 200 status code to acknowledge receipt of the event. Non-200\n            status codes will be retried.\n  eval_run_failed:\n    post:\n      requestBody:\n        description: The event payload sent by the API.\n        content:\n          application/json:\n            schema:\n              $ref: '#/components/schemas/WebhookEvalRunFailed'\n      responses:\n        '200':\n          description: |\n            Return a 200 status code to acknowledge receipt of the event. Non-200\n            status codes will be retried.\n  eval_run_succeeded:\n    post:\n      requestBody:\n        description: The event payload sent by the API.\n        content:\n          application/json:\n            schema:\n              $ref: '#/components/schemas/WebhookEvalRunSucceeded'\n      responses:\n        '200':\n          description: |\n            Return a 200 status code to acknowledge receipt of the event. Non-200\n            status codes will be retried.\n  fine_tuning_job_cancelled:\n    post:\n      requestBody:\n        description: The event payload sent by the API.\n        content:\n          application/json:\n            schema:\n              $ref: '#/components/schemas/WebhookFineTuningJobCancelled'\n      responses:\n        '200':\n          description: |\n            Return a 200 status code to acknowledge receipt of the event. Non-200\n            status codes will be retried.\n  fine_tuning_job_failed:\n    post:\n      requestBody:\n        description: The event payload sent by the API.\n        content:\n          application/json:\n            schema:\n              $ref: '#/components/schemas/WebhookFineTuningJobFailed'\n      responses:\n        '200':\n          description: |\n            Return a 200 status code to acknowledge receipt of the event. Non-200\n            status codes will be retried.\n  fine_tuning_job_succeeded:\n    post:\n      requestBody:\n        description: The event payload sent by the API.\n        content:\n          application/json:\n            schema:\n              $ref: '#/components/schemas/WebhookFineTuningJobSucceeded'\n      responses:\n        '200':\n          description: |\n            Return a 200 status code to acknowledge receipt of the event. Non-200\n            status codes will be retried.\n  response_cancelled:\n    post:\n      requestBody:\n        description: The event payload sent by the API.\n        content:\n          application/json:\n            schema:\n              $ref: '#/components/schemas/WebhookResponseCancelled'\n      responses:\n        '200':\n          description: |\n            Return a 200 status code to acknowledge receipt of the event. Non-200\n            status codes will be retried.\n  response_completed:\n    post:\n      requestBody:\n        description: The event payload sent by the API.\n        content:\n          application/json:\n            schema:\n              $ref: '#/components/schemas/WebhookResponseCompleted'\n      responses:\n        '200':\n          description: |\n            Return a 200 status code to acknowledge receipt of the event. Non-200\n            status codes will be retried.\n  response_failed:\n    post:\n      requestBody:\n        description: The event payload sent by the API.\n        content:\n          application/json:\n            schema:\n              $ref: '#/components/schemas/WebhookResponseFailed'\n      responses:\n        '200':\n          description: |\n            Return a 200 status code to acknowledge receipt of the event. Non-200\n            status codes will be retried.\n  response_incomplete:\n    post:\n      requestBody:\n        description: The event payload sent by the API.\n        content:\n          application/json:\n            schema:\n              $ref: '#/components/schemas/WebhookResponseIncomplete'\n      responses:\n        '200':\n          description: |\n            Return a 200 status code to acknowledge receipt of the event. Non-200\n            status codes will be retried.\ncomponents:\n  schemas:\n    AddUploadPartRequest:\n      type: object\n      additionalProperties: false\n      properties:\n        data:\n          description: |\n            The chunk of bytes for this Part.\n          type: string\n          format: binary\n      required:\n        - data\n    AdminApiKey:\n      type: object\n      description: Represents an individual Admin API key in an org.\n      properties:\n        object:\n          type: string\n          example: organization.admin_api_key\n          description: The object type, which is always `organization.admin_api_key`\n          x-stainless-const: true\n        id:\n          type: string\n          example: key_abc\n          description: The identifier, which can be referenced in API endpoints\n        name:\n          type: string\n          example: Administration Key\n          description: The name of the API key\n        redacted_value:\n          type: string\n          example: sk-admin...def\n          description: The redacted value of the API key\n        value:\n          type: string\n          example: sk-admin-1234abcd\n          description: The value of the API key. Only shown on create.\n        created_at:\n          type: integer\n          format: int64\n          example: 1711471533\n          description: The Unix timestamp (in seconds) of when the API key was created\n        last_used_at:\n          type: integer\n          format: int64\n          nullable: true\n          example: 1711471534\n          description: The Unix timestamp (in seconds) of when the API key was last used\n        owner:\n          type: object\n          properties:\n            type:\n              type: string\n              example: user\n              description: Always `user`\n            object:\n              type: string\n              example: organization.user\n              description: The object type, which is always organization.user\n            id:\n              type: string\n              example: sa_456\n              description: The identifier, which can be referenced in API endpoints\n            name:\n              type: string\n              example: My Service Account\n              description: The name of the user\n            created_at:\n              type: integer\n              format: int64\n              example: 1711471533\n              description: The Unix timestamp (in seconds) of when the user was created\n            role:\n              type: string\n              example: owner\n              description: Always `owner`\n      required:\n        - object\n        - redacted_value\n        - name\n        - created_at\n        - last_used_at\n        - id\n        - owner\n      x-oaiMeta:\n        name: The admin API key object\n        example: |\n          {\n            \"object\": \"organization.admin_api_key\",\n            \"id\": \"key_abc\",\n            \"name\": \"Main Admin Key\",\n            \"redacted_value\": \"sk-admin...xyz\",\n            \"created_at\": 1711471533,\n            \"last_used_at\": 1711471534,\n            \"owner\": {\n              \"type\": \"user\",\n              \"object\": \"organization.user\",\n              \"id\": \"user_123\",\n              \"name\": \"John Doe\",\n              \"created_at\": 1711471533,\n              \"role\": \"owner\"\n            }\n          }\n    ApiKeyList:\n      type: object\n      properties:\n        object:\n          type: string\n          example: list\n        data:\n          type: array\n          items:\n            $ref: '#/components/schemas/AdminApiKey'\n        has_more:\n          type: boolean\n          example: false\n        first_id:\n          type: string\n          example: key_abc\n        last_id:\n          type: string\n          example: key_xyz\n    AssistantObject:\n      type: object\n      title: Assistant\n      description: Represents an `assistant` that can call the model and use tools.\n      properties:\n        id:\n          description: The identifier, which can be referenced in API endpoints.\n          type: string\n        object:\n          description: The object type, which is always `assistant`.\n          type: string\n          enum:\n            - assistant\n          x-stainless-const: true\n        created_at:\n          description: The Unix timestamp (in seconds) for when the assistant was created.\n          type: integer\n        name:\n          description: |\n            The name of the assistant. The maximum length is 256 characters.\n          type: string\n          maxLength: 256\n          nullable: true\n        description:\n          description: |\n            The description of the assistant. The maximum length is 512 characters.\n          type: string\n          maxLength: 512\n          nullable: true\n        model:\n          description: >\n            ID of the model to use. You can use the [List\n            models](https://platform.openai.com/docs/api-reference/models/list) API to see all of your\n            available models, or see our [Model overview](https://platform.openai.com/docs/models) for\n            descriptions of them.\n          type: string\n        instructions:\n          description: |\n            The system instructions that the assistant uses. The maximum length is 256,000 characters.\n          type: string\n          maxLength: 256000\n          nullable: true\n        tools:\n          description: >\n            A list of tool enabled on the assistant. There can be a maximum of 128 tools per assistant. Tools\n            can be of types `code_interpreter`, `file_search`, or `function`.\n          default: []\n          type: array\n          maxItems: 128\n          items:\n            $ref: '#/components/schemas/AssistantTool'\n        tool_resources:\n          type: object\n          description: >\n            A set of resources that are used by the assistant's tools. The resources are specific to the type\n            of tool. For example, the `code_interpreter` tool requires a list of file IDs, while the\n            `file_search` tool requires a list of vector store IDs.\n          properties:\n            code_interpreter:\n              type: object\n              properties:\n                file_ids:\n                  type: array\n                  description: >\n                    A list of [file](https://platform.openai.com/docs/api-reference/files) IDs made available\n                    to the `code_interpreter`` tool. There can be a maximum of 20 files associated with the\n                    tool.\n                  default: []\n                  maxItems: 20\n                  items:\n                    type: string\n            file_search:\n              type: object\n              properties:\n                vector_store_ids:\n                  type: array\n                  description: >\n                    The ID of the [vector\n                    store](https://platform.openai.com/docs/api-reference/vector-stores/object) attached to\n                    this assistant. There can be a maximum of 1 vector store attached to the assistant.\n                  maxItems: 1\n                  items:\n                    type: string\n          nullable: true\n        metadata:\n          $ref: '#/components/schemas/Metadata'\n        temperature:\n          description: >\n            What sampling temperature to use, between 0 and 2. Higher values like 0.8 will make the output\n            more random, while lower values like 0.2 will make it more focused and deterministic.\n          type: number\n          minimum: 0\n          maximum: 2\n          default: 1\n          example: 1\n          nullable: true\n        top_p:\n          type: number\n          minimum: 0\n          maximum: 1\n          default: 1\n          example: 1\n          nullable: true\n          description: >\n            An alternative to sampling with temperature, called nucleus sampling, where the model considers\n            the results of the tokens with top_p probability mass. So 0.1 means only the tokens comprising the\n            top 10% probability mass are considered.\n\n\n            We generally recommend altering this or temperature but not both.\n        response_format:\n          $ref: '#/components/schemas/AssistantsApiResponseFormatOption'\n          nullable: true\n      required:\n        - id\n        - object\n        - created_at\n        - name\n        - description\n        - model\n        - instructions\n        - tools\n        - metadata\n      x-oaiMeta:\n        name: The assistant object\n        beta: true\n        example: |\n          {\n            \"id\": \"asst_abc123\",\n            \"object\": \"assistant\",\n            \"created_at\": 1698984975,\n            \"name\": \"Math Tutor\",\n            \"description\": null,\n            \"model\": \"gpt-4o\",\n            \"instructions\": \"You are a personal math tutor. When asked a question, write and run Python code to answer the question.\",\n            \"tools\": [\n              {\n                \"type\": \"code_interpreter\"\n              }\n            ],\n            \"metadata\": {},\n            \"top_p\": 1.0,\n            \"temperature\": 1.0,\n            \"response_format\": \"auto\"\n          }\n    AssistantStreamEvent:\n      description: >\n        Represents an event emitted when streaming a Run.\n\n\n        Each event in a server-sent events stream has an `event` and `data` property:\n\n\n        ```\n\n        event: thread.created\n\n        data: {\"id\": \"thread_123\", \"object\": \"thread\", ...}\n\n        ```\n\n\n        We emit events whenever a new object is created, transitions to a new state, or is being\n\n        streamed in parts (deltas). For example, we emit `thread.run.created` when a new run\n\n        is created, `thread.run.completed` when a run completes, and so on. When an Assistant chooses\n\n        to create a message during a run, we emit a `thread.message.created event`, a\n\n        `thread.message.in_progress` event, many `thread.message.delta` events, and finally a\n\n        `thread.message.completed` event.\n\n\n        We may add additional events over time, so we recommend handling unknown events gracefully\n\n        in your code. See the [Assistants API\n        quickstart](https://platform.openai.com/docs/assistants/overview) to learn how to\n\n        integrate the Assistants API with streaming.\n      x-oaiMeta:\n        name: Assistant stream events\n        beta: true\n      anyOf:\n        - $ref: '#/components/schemas/ThreadStreamEvent'\n        - $ref: '#/components/schemas/RunStreamEvent'\n        - $ref: '#/components/schemas/RunStepStreamEvent'\n        - $ref: '#/components/schemas/MessageStreamEvent'\n        - $ref: '#/components/schemas/ErrorEvent'\n          x-stainless-variantName: error_event\n      discriminator:\n        propertyName: event\n    AssistantSupportedModels:\n      type: string\n      enum:\n        - gpt-5\n        - gpt-5-mini\n        - gpt-5-nano\n        - gpt-5-2025-08-07\n        - gpt-5-mini-2025-08-07\n        - gpt-5-nano-2025-08-07\n        - gpt-4.1\n        - gpt-4.1-mini\n        - gpt-4.1-nano\n        - gpt-4.1-2025-04-14\n        - gpt-4.1-mini-2025-04-14\n        - gpt-4.1-nano-2025-04-14\n        - o3-mini\n        - o3-mini-2025-01-31\n        - o1\n        - o1-2024-12-17\n        - gpt-4o\n        - gpt-4o-2024-11-20\n        - gpt-4o-2024-08-06\n        - gpt-4o-2024-05-13\n        - gpt-4o-mini\n        - gpt-4o-mini-2024-07-18\n        - gpt-4.5-preview\n        - gpt-4.5-preview-2025-02-27\n        - gpt-4-turbo\n        - gpt-4-turbo-2024-04-09\n        - gpt-4-0125-preview\n        - gpt-4-turbo-preview\n        - gpt-4-1106-preview\n        - gpt-4-vision-preview\n        - gpt-4\n        - gpt-4-0314\n        - gpt-4-0613\n        - gpt-4-32k\n        - gpt-4-32k-0314\n        - gpt-4-32k-0613\n        - gpt-3.5-turbo\n        - gpt-3.5-turbo-16k\n        - gpt-3.5-turbo-0613\n        - gpt-3.5-turbo-1106\n        - gpt-3.5-turbo-0125\n        - gpt-3.5-turbo-16k-0613\n    AssistantToolsCode:\n      type: object\n      title: Code interpreter tool\n      properties:\n        type:\n          type: string\n          description: 'The type of tool being defined: `code_interpreter`'\n          enum:\n            - code_interpreter\n          x-stainless-const: true\n      required:\n        - type\n    AssistantToolsFileSearch:\n      type: object\n      title: FileSearch tool\n      properties:\n        type:\n          type: string\n          description: 'The type of tool being defined: `file_search`'\n          enum:\n            - file_search\n          x-stainless-const: true\n        file_search:\n          type: object\n          description: Overrides for the file search tool.\n          properties:\n            max_num_results:\n              type: integer\n              minimum: 1\n              maximum: 50\n              description: >\n                The maximum number of results the file search tool should output. The default is 20 for\n                `gpt-4*` models and 5 for `gpt-3.5-turbo`. This number should be between 1 and 50 inclusive.\n\n\n                Note that the file search tool may output fewer than `max_num_results` results. See the [file\n                search tool\n                documentation](https://platform.openai.com/docs/assistants/tools/file-search#customizing-file-search-settings)\n                for more information.\n            ranking_options:\n              $ref: '#/components/schemas/FileSearchRankingOptions'\n      required:\n        - type\n    AssistantToolsFileSearchTypeOnly:\n      type: object\n      title: FileSearch tool\n      properties:\n        type:\n          type: string\n          description: 'The type of tool being defined: `file_search`'\n          enum:\n            - file_search\n          x-stainless-const: true\n      required:\n        - type\n    AssistantToolsFunction:\n      type: object\n      title: Function tool\n      properties:\n        type:\n          type: string\n          description: 'The type of tool being defined: `function`'\n          enum:\n            - function\n          x-stainless-const: true\n        function:\n          $ref: '#/components/schemas/FunctionObject'\n      required:\n        - type\n        - function\n    AssistantsApiResponseFormatOption:\n      description: >\n        Specifies the format that the model must output. Compatible with\n        [GPT-4o](https://platform.openai.com/docs/models#gpt-4o), [GPT-4\n        Turbo](https://platform.openai.com/docs/models#gpt-4-turbo-and-gpt-4), and all GPT-3.5 Turbo models\n        since `gpt-3.5-turbo-1106`.\n\n\n        Setting to `{ \"type\": \"json_schema\", \"json_schema\": {...} }` enables Structured Outputs which ensures\n        the model will match your supplied JSON schema. Learn more in the [Structured Outputs\n        guide](https://platform.openai.com/docs/guides/structured-outputs).\n\n\n        Setting to `{ \"type\": \"json_object\" }` enables JSON mode, which ensures the message the model\n        generates is valid JSON.\n\n\n        **Important:** when using JSON mode, you **must** also instruct the model to produce JSON yourself via\n        a system or user message. Without this, the model may generate an unending stream of whitespace until\n        the generation reaches the token limit, resulting in a long-running and seemingly \"stuck\" request.\n        Also note that the message content may be partially cut off if `finish_reason=\"length\"`, which\n        indicates the generation exceeded `max_tokens` or the conversation exceeded the max context length.\n      anyOf:\n        - type: string\n          description: |\n            `auto` is the default value\n          enum:\n            - auto\n          x-stainless-const: true\n        - $ref: '#/components/schemas/ResponseFormatText'\n        - $ref: '#/components/schemas/ResponseFormatJsonObject'\n        - $ref: '#/components/schemas/ResponseFormatJsonSchema'\n    AssistantsApiToolChoiceOption:\n      description: >\n        Controls which (if any) tool is called by the model.\n\n        `none` means the model will not call any tools and instead generates a message.\n\n        `auto` is the default value and means the model can pick between generating a message or calling one\n        or more tools.\n\n        `required` means the model must call one or more tools before responding to the user.\n\n        Specifying a particular tool like `{\"type\": \"file_search\"}` or `{\"type\": \"function\", \"function\":\n        {\"name\": \"my_function\"}}` forces the model to call that tool.\n      anyOf:\n        - type: string\n          description: >\n            `none` means the model will not call any tools and instead generates a message. `auto` means the\n            model can pick between generating a message or calling one or more tools. `required` means the\n            model must call one or more tools before responding to the user.\n          enum:\n            - none\n            - auto\n            - required\n          title: Auto\n        - $ref: '#/components/schemas/AssistantsNamedToolChoice'\n    AssistantsNamedToolChoice:\n      type: object\n      description: Specifies a tool the model should use. Use to force the model to call a specific tool.\n      properties:\n        type:\n          type: string\n          enum:\n            - function\n            - code_interpreter\n            - file_search\n          description: The type of the tool. If type is `function`, the function name must be set\n        function:\n          type: object\n          properties:\n            name:\n              type: string\n              description: The name of the function to call.\n          required:\n            - name\n      required:\n        - type\n    AudioResponseFormat:\n      description: >\n        The format of the output, in one of these options: `json`, `text`, `srt`, `verbose_json`, or `vtt`.\n        For `gpt-4o-transcribe` and `gpt-4o-mini-transcribe`, the only supported format is `json`.\n      type: string\n      enum:\n        - json\n        - text\n        - srt\n        - verbose_json\n        - vtt\n      default: json\n    AuditLog:\n      type: object\n      description: A log of a user action or configuration change within this organization.\n      properties:\n        id:\n          type: string\n          description: The ID of this log.\n        type:\n          $ref: '#/components/schemas/AuditLogEventType'\n        effective_at:\n          type: integer\n          description: The Unix timestamp (in seconds) of the event.\n        project:\n          type: object\n          description: >-\n            The project that the action was scoped to. Absent for actions not scoped to projects. Note that\n            any admin actions taken via Admin API keys are associated with the default project.\n          properties:\n            id:\n              type: string\n              description: The project ID.\n            name:\n              type: string\n              description: The project title.\n        actor:\n          $ref: '#/components/schemas/AuditLogActor'\n        api_key.created:\n          type: object\n          description: The details for events with this `type`.\n          properties:\n            id:\n              type: string\n              description: The tracking ID of the API key.\n            data:\n              type: object\n              description: The payload used to create the API key.\n              properties:\n                scopes:\n                  type: array\n                  items:\n                    type: string\n                  description: A list of scopes allowed for the API key, e.g. `[\"api.model.request\"]`\n        api_key.updated:\n          type: object\n          description: The details for events with this `type`.\n          properties:\n            id:\n              type: string\n              description: The tracking ID of the API key.\n            changes_requested:\n              type: object\n              description: The payload used to update the API key.\n              properties:\n                scopes:\n                  type: array\n                  items:\n                    type: string\n                  description: A list of scopes allowed for the API key, e.g. `[\"api.model.request\"]`\n        api_key.deleted:\n          type: object\n          description: The details for events with this `type`.\n          properties:\n            id:\n              type: string\n              description: The tracking ID of the API key.\n        checkpoint_permission.created:\n          type: object\n          description: The project and fine-tuned model checkpoint that the checkpoint permission was created for.\n          properties:\n            id:\n              type: string\n              description: The ID of the checkpoint permission.\n            data:\n              type: object\n              description: The payload used to create the checkpoint permission.\n              properties:\n                project_id:\n                  type: string\n                  description: The ID of the project that the checkpoint permission was created for.\n                fine_tuned_model_checkpoint:\n                  type: string\n                  description: The ID of the fine-tuned model checkpoint.\n        checkpoint_permission.deleted:\n          type: object\n          description: The details for events with this `type`.\n          properties:\n            id:\n              type: string\n              description: The ID of the checkpoint permission.\n        invite.sent:\n          type: object\n          description: The details for events with this `type`.\n          properties:\n            id:\n              type: string\n              description: The ID of the invite.\n            data:\n              type: object\n              description: The payload used to create the invite.\n              properties:\n                email:\n                  type: string\n                  description: The email invited to the organization.\n                role:\n                  type: string\n                  description: The role the email was invited to be. Is either `owner` or `member`.\n        invite.accepted:\n          type: object\n          description: The details for events with this `type`.\n          properties:\n            id:\n              type: string\n              description: The ID of the invite.\n        invite.deleted:\n          type: object\n          description: The details for events with this `type`.\n          properties:\n            id:\n              type: string\n              description: The ID of the invite.\n        login.failed:\n          type: object\n          description: The details for events with this `type`.\n          properties:\n            error_code:\n              type: string\n              description: The error code of the failure.\n            error_message:\n              type: string\n              description: The error message of the failure.\n        logout.failed:\n          type: object\n          description: The details for events with this `type`.\n          properties:\n            error_code:\n              type: string\n              description: The error code of the failure.\n            error_message:\n              type: string\n              description: The error message of the failure.\n        organization.updated:\n          type: object\n          description: The details for events with this `type`.\n          properties:\n            id:\n              type: string\n              description: The organization ID.\n            changes_requested:\n              type: object\n              description: The payload used to update the organization settings.\n              properties:\n                title:\n                  type: string\n                  description: The organization title.\n                description:\n                  type: string\n                  description: The organization description.\n                name:\n                  type: string\n                  description: The organization name.\n                threads_ui_visibility:\n                  type: string\n                  description: >-\n                    Visibility of the threads page which shows messages created with the Assistants API and\n                    Playground. One of `ANY_ROLE`, `OWNERS`, or `NONE`.\n                usage_dashboard_visibility:\n                  type: string\n                  description: >-\n                    Visibility of the usage dashboard which shows activity and costs for your organization.\n                    One of `ANY_ROLE` or `OWNERS`.\n                api_call_logging:\n                  type: string\n                  description: >-\n                    How your organization logs data from supported API calls. One of `disabled`,\n                    `enabled_per_call`, `enabled_for_all_projects`, or `enabled_for_selected_projects`\n                api_call_logging_project_ids:\n                  type: string\n                  description: The list of project ids if api_call_logging is set to `enabled_for_selected_projects`\n        project.created:\n          type: object\n          description: The details for events with this `type`.\n          properties:\n            id:\n              type: string\n              description: The project ID.\n            data:\n              type: object\n              description: The payload used to create the project.\n              properties:\n                name:\n                  type: string\n                  description: The project name.\n                title:\n                  type: string\n                  description: The title of the project as seen on the dashboard.\n        project.updated:\n          type: object\n          description: The details for events with this `type`.\n          properties:\n            id:\n              type: string\n              description: The project ID.\n            changes_requested:\n              type: object\n              description: The payload used to update the project.\n              properties:\n                title:\n                  type: string\n                  description: The title of the project as seen on the dashboard.\n        project.archived:\n          type: object\n          description: The details for events with this `type`.\n          properties:\n            id:\n              type: string\n              description: The project ID.\n        rate_limit.updated:\n          type: object\n          description: The details for events with this `type`.\n          properties:\n            id:\n              type: string\n              description: The rate limit ID\n            changes_requested:\n              type: object\n              description: The payload used to update the rate limits.\n              properties:\n                max_requests_per_1_minute:\n                  type: integer\n                  description: The maximum requests per minute.\n                max_tokens_per_1_minute:\n                  type: integer\n                  description: The maximum tokens per minute.\n                max_images_per_1_minute:\n                  type: integer\n                  description: The maximum images per minute. Only relevant for certain models.\n                max_audio_megabytes_per_1_minute:\n                  type: integer\n                  description: The maximum audio megabytes per minute. Only relevant for certain models.\n                max_requests_per_1_day:\n                  type: integer\n                  description: The maximum requests per day. Only relevant for certain models.\n                batch_1_day_max_input_tokens:\n                  type: integer\n                  description: The maximum batch input tokens per day. Only relevant for certain models.\n        rate_limit.deleted:\n          type: object\n          description: The details for events with this `type`.\n          properties:\n            id:\n              type: string\n              description: The rate limit ID\n        service_account.created:\n          type: object\n          description: The details for events with this `type`.\n          properties:\n            id:\n              type: string\n              description: The service account ID.\n            data:\n              type: object\n              description: The payload used to create the service account.\n              properties:\n                role:\n                  type: string\n                  description: The role of the service account. Is either `owner` or `member`.\n        service_account.updated:\n          type: object\n          description: The details for events with this `type`.\n          properties:\n            id:\n              type: string\n              description: The service account ID.\n            changes_requested:\n              type: object\n              description: The payload used to updated the service account.\n              properties:\n                role:\n                  type: string\n                  description: The role of the service account. Is either `owner` or `member`.\n        service_account.deleted:\n          type: object\n          description: The details for events with this `type`.\n          properties:\n            id:\n              type: string\n              description: The service account ID.\n        user.added:\n          type: object\n          description: The details for events with this `type`.\n          properties:\n            id:\n              type: string\n              description: The user ID.\n            data:\n              type: object\n              description: The payload used to add the user to the project.\n              properties:\n                role:\n                  type: string\n                  description: The role of the user. Is either `owner` or `member`.\n        user.updated:\n          type: object\n          description: The details for events with this `type`.\n          properties:\n            id:\n              type: string\n              description: The project ID.\n            changes_requested:\n              type: object\n              description: The payload used to update the user.\n              properties:\n                role:\n                  type: string\n                  description: The role of the user. Is either `owner` or `member`.\n        user.deleted:\n          type: object\n          description: The details for events with this `type`.\n          properties:\n            id:\n              type: string\n              description: The user ID.\n        certificate.created:\n          type: object\n          description: The details for events with this `type`.\n          properties:\n            id:\n              type: string\n              description: The certificate ID.\n            name:\n              type: string\n              description: The name of the certificate.\n        certificate.updated:\n          type: object\n          description: The details for events with this `type`.\n          properties:\n            id:\n              type: string\n              description: The certificate ID.\n            name:\n              type: string\n              description: The name of the certificate.\n        certificate.deleted:\n          type: object\n          description: The details for events with this `type`.\n          properties:\n            id:\n              type: string\n              description: The certificate ID.\n            name:\n              type: string\n              description: The name of the certificate.\n            certificate:\n              type: string\n              description: The certificate content in PEM format.\n        certificates.activated:\n          type: object\n          description: The details for events with this `type`.\n          properties:\n            certificates:\n              type: array\n              items:\n                type: object\n                properties:\n                  id:\n                    type: string\n                    description: The certificate ID.\n                  name:\n                    type: string\n                    description: The name of the certificate.\n        certificates.deactivated:\n          type: object\n          description: The details for events with this `type`.\n          properties:\n            certificates:\n              type: array\n              items:\n                type: object\n                properties:\n                  id:\n                    type: string\n                    description: The certificate ID.\n                  name:\n                    type: string\n                    description: The name of the certificate.\n      required:\n        - id\n        - type\n        - effective_at\n        - actor\n      x-oaiMeta:\n        name: The audit log object\n        example: |\n          {\n              \"id\": \"req_xxx_20240101\",\n              \"type\": \"api_key.created\",\n              \"effective_at\": 1720804090,\n              \"actor\": {\n                  \"type\": \"session\",\n                  \"session\": {\n                      \"user\": {\n                          \"id\": \"user-xxx\",\n                          \"email\": \"user@example.com\"\n                      },\n                      \"ip_address\": \"127.0.0.1\",\n                      \"user_agent\": \"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.124 Safari/537.36\"\n                  }\n              },\n              \"api_key.created\": {\n                  \"id\": \"key_xxxx\",\n                  \"data\": {\n                      \"scopes\": [\"resource.operation\"]\n                  }\n              }\n          }\n    AuditLogActor:\n      type: object\n      description: The actor who performed the audit logged action.\n      properties:\n        type:\n          type: string\n          description: The type of actor. Is either `session` or `api_key`.\n          enum:\n            - session\n            - api_key\n        session:\n          $ref: '#/components/schemas/AuditLogActorSession'\n        api_key:\n          $ref: '#/components/schemas/AuditLogActorApiKey'\n    AuditLogActorApiKey:\n      type: object\n      description: The API Key used to perform the audit logged action.\n      properties:\n        id:\n          type: string\n          description: The tracking id of the API key.\n        type:\n          type: string\n          description: The type of API key. Can be either `user` or `service_account`.\n          enum:\n            - user\n            - service_account\n        user:\n          $ref: '#/components/schemas/AuditLogActorUser'\n        service_account:\n          $ref: '#/components/schemas/AuditLogActorServiceAccount'\n    AuditLogActorServiceAccount:\n      type: object\n      description: The service account that performed the audit logged action.\n      properties:\n        id:\n          type: string\n          description: The service account id.\n    AuditLogActorSession:\n      type: object\n      description: The session in which the audit logged action was performed.\n      properties:\n        user:\n          $ref: '#/components/schemas/AuditLogActorUser'\n        ip_address:\n          type: string\n          description: The IP address from which the action was performed.\n    AuditLogActorUser:\n      type: object\n      description: The user who performed the audit logged action.\n      properties:\n        id:\n          type: string\n          description: The user id.\n        email:\n          type: string\n          description: The user email.\n    AuditLogEventType:\n      type: string\n      description: The event type.\n      enum:\n        - api_key.created\n        - api_key.updated\n        - api_key.deleted\n        - checkpoint_permission.created\n        - checkpoint_permission.deleted\n        - invite.sent\n        - invite.accepted\n        - invite.deleted\n        - login.succeeded\n        - login.failed\n        - logout.succeeded\n        - logout.failed\n        - organization.updated\n        - project.created\n        - project.updated\n        - project.archived\n        - service_account.created\n        - service_account.updated\n        - service_account.deleted\n        - rate_limit.updated\n        - rate_limit.deleted\n        - user.added\n        - user.updated\n        - user.deleted\n    AutoChunkingStrategyRequestParam:\n      type: object\n      title: Auto Chunking Strategy\n      description: >-\n        The default strategy. This strategy currently uses a `max_chunk_size_tokens` of `800` and\n        `chunk_overlap_tokens` of `400`.\n      additionalProperties: false\n      properties:\n        type:\n          type: string\n          description: Always `auto`.\n          enum:\n            - auto\n          x-stainless-const: true\n      required:\n        - type\n    Batch:\n      type: object\n      properties:\n        id:\n          type: string\n        object:\n          type: string\n          enum:\n            - batch\n          description: The object type, which is always `batch`.\n          x-stainless-const: true\n        endpoint:\n          type: string\n          description: The OpenAI API endpoint used by the batch.\n        errors:\n          type: object\n          properties:\n            object:\n              type: string\n              description: The object type, which is always `list`.\n            data:\n              type: array\n              items:\n                $ref: '#/components/schemas/BatchError'\n        input_file_id:\n          type: string\n          description: The ID of the input file for the batch.\n        completion_window:\n          type: string\n          description: The time frame within which the batch should be processed.\n        status:\n          type: string\n          description: The current status of the batch.\n          enum:\n            - validating\n            - failed\n            - in_progress\n            - finalizing\n            - completed\n            - expired\n            - cancelling\n            - cancelled\n        output_file_id:\n          type: string\n          description: The ID of the file containing the outputs of successfully executed requests.\n        error_file_id:\n          type: string\n          description: The ID of the file containing the outputs of requests with errors.\n        created_at:\n          type: integer\n          description: The Unix timestamp (in seconds) for when the batch was created.\n        in_progress_at:\n          type: integer\n          description: The Unix timestamp (in seconds) for when the batch started processing.\n        expires_at:\n          type: integer\n          description: The Unix timestamp (in seconds) for when the batch will expire.\n        finalizing_at:\n          type: integer\n          description: The Unix timestamp (in seconds) for when the batch started finalizing.\n        completed_at:\n          type: integer\n          description: The Unix timestamp (in seconds) for when the batch was completed.\n        failed_at:\n          type: integer\n          description: The Unix timestamp (in seconds) for when the batch failed.\n        expired_at:\n          type: integer\n          description: The Unix timestamp (in seconds) for when the batch expired.\n        cancelling_at:\n          type: integer\n          description: The Unix timestamp (in seconds) for when the batch started cancelling.\n        cancelled_at:\n          type: integer\n          description: The Unix timestamp (in seconds) for when the batch was cancelled.\n        request_counts:\n          $ref: '#/components/schemas/BatchRequestCounts'\n        metadata:\n          $ref: '#/components/schemas/Metadata'\n      required:\n        - id\n        - object\n        - endpoint\n        - input_file_id\n        - completion_window\n        - status\n        - created_at\n      x-oaiMeta:\n        name: The batch object\n        example: |\n          {\n            \"id\": \"batch_abc123\",\n            \"object\": \"batch\",\n            \"endpoint\": \"/v1/completions\",\n            \"errors\": null,\n            \"input_file_id\": \"file-abc123\",\n            \"completion_window\": \"24h\",\n            \"status\": \"completed\",\n            \"output_file_id\": \"file-cvaTdG\",\n            \"error_file_id\": \"file-HOWS94\",\n            \"created_at\": 1711471533,\n            \"in_progress_at\": 1711471538,\n            \"expires_at\": 1711557933,\n            \"finalizing_at\": 1711493133,\n            \"completed_at\": 1711493163,\n            \"failed_at\": null,\n            \"expired_at\": null,\n            \"cancelling_at\": null,\n            \"cancelled_at\": null,\n            \"request_counts\": {\n              \"total\": 100,\n              \"completed\": 95,\n              \"failed\": 5\n            },\n            \"metadata\": {\n              \"customer_id\": \"user_123456789\",\n              \"batch_description\": \"Nightly eval job\",\n            }\n          }\n    BatchFileExpirationAfter:\n      type: object\n      title: File expiration policy\n      description: The expiration policy for the output and/or error file that are generated for a batch.\n      properties:\n        anchor:\n          description: >-\n            Anchor timestamp after which the expiration policy applies. Supported anchors: `created_at`. Note\n            that the anchor is the file creation time, not the time the batch is created.\n          type: string\n          enum:\n            - created_at\n          x-stainless-const: true\n        seconds:\n          description: >-\n            The number of seconds after the anchor time that the file will expire. Must be between 3600 (1\n            hour) and 2592000 (30 days).\n          type: integer\n          minimum: 3600\n          maximum: 2592000\n      required:\n        - anchor\n        - seconds\n    BatchRequestInput:\n      type: object\n      description: The per-line object of the batch input file\n      properties:\n        custom_id:\n          type: string\n          description: >-\n            A developer-provided per-request id that will be used to match outputs to inputs. Must be unique\n            for each request in a batch.\n        method:\n          type: string\n          enum:\n            - POST\n          description: The HTTP method to be used for the request. Currently only `POST` is supported.\n          x-stainless-const: true\n        url:\n          type: string\n          description: >-\n            The OpenAI API relative URL to be used for the request. Currently `/v1/chat/completions`,\n            `/v1/embeddings`, and `/v1/completions` are supported.\n      x-oaiMeta:\n        name: The request input object\n        example: >\n          {\"custom_id\": \"request-1\", \"method\": \"POST\", \"url\": \"/v1/chat/completions\", \"body\": {\"model\":\n          \"gpt-4o-mini\", \"messages\": [{\"role\": \"system\", \"content\": \"You are a helpful assistant.\"}, {\"role\":\n          \"user\", \"content\": \"What is 2+2?\"}]}}\n    BatchRequestOutput:\n      type: object\n      description: The per-line object of the batch output and error files\n      properties:\n        id:\n          type: string\n        custom_id:\n          type: string\n          description: A developer-provided per-request id that will be used to match outputs to inputs.\n        response:\n          type: object\n          nullable: true\n          properties:\n            status_code:\n              type: integer\n              description: The HTTP status code of the response\n            request_id:\n              type: string\n              description: >-\n                An unique identifier for the OpenAI API request. Please include this request ID when\n                contacting support.\n            body:\n              type: object\n              x-oaiTypeLabel: map\n              description: The JSON body of the response\n        error:\n          type: object\n          nullable: true\n          description: >-\n            For requests that failed with a non-HTTP error, this will contain more information on the cause of\n            the failure.\n          properties:\n            code:\n              type: string\n              description: A machine-readable error code.\n            message:\n              type: string\n              description: A human-readable error message.\n      x-oaiMeta:\n        name: The request output object\n        example: >\n          {\"id\": \"batch_req_wnaDys\", \"custom_id\": \"request-2\", \"response\": {\"status_code\": 200, \"request_id\":\n          \"req_c187b3\", \"body\": {\"id\": \"chatcmpl-9758Iw\", \"object\": \"chat.completion\", \"created\": 1711475054,\n          \"model\": \"gpt-4o-mini\", \"choices\": [{\"index\": 0, \"message\": {\"role\": \"assistant\", \"content\": \"2 + 2\n          equals 4.\"}, \"finish_reason\": \"stop\"}], \"usage\": {\"prompt_tokens\": 24, \"completion_tokens\": 15,\n          \"total_tokens\": 39}, \"system_fingerprint\": null}}, \"error\": null}\n    Certificate:\n      type: object\n      description: Represents an individual `certificate` uploaded to the organization.\n      properties:\n        object:\n          type: string\n          enum:\n            - certificate\n            - organization.certificate\n            - organization.project.certificate\n          description: >\n            The object type.\n\n\n            - If creating, updating, or getting a specific certificate, the object type is `certificate`.\n\n            - If listing, activating, or deactivating certificates for the organization, the object type is\n            `organization.certificate`.\n\n            - If listing, activating, or deactivating certificates for a project, the object type is\n            `organization.project.certificate`.\n          x-stainless-const: true\n        id:\n          type: string\n          description: The identifier, which can be referenced in API endpoints\n        name:\n          type: string\n          description: The name of the certificate.\n        created_at:\n          type: integer\n          description: The Unix timestamp (in seconds) of when the certificate was uploaded.\n        certificate_details:\n          type: object\n          properties:\n            valid_at:\n              type: integer\n              description: The Unix timestamp (in seconds) of when the certificate becomes valid.\n            expires_at:\n              type: integer\n              description: The Unix timestamp (in seconds) of when the certificate expires.\n            content:\n              type: string\n              description: The content of the certificate in PEM format.\n        active:\n          type: boolean\n          description: >-\n            Whether the certificate is currently active at the specified scope. Not returned when getting\n            details for a specific certificate.\n      required:\n        - object\n        - id\n        - name\n        - created_at\n        - certificate_details\n      x-oaiMeta:\n        name: The certificate object\n        example: |\n          {\n            \"object\": \"certificate\",\n            \"id\": \"cert_abc\",\n            \"name\": \"My Certificate\",\n            \"created_at\": 1234567,\n            \"certificate_details\": {\n              \"valid_at\": 1234567,\n              \"expires_at\": 12345678,\n              \"content\": \"-----BEGIN CERTIFICATE----- MIIGAjCCA...6znFlOW+ -----END CERTIFICATE-----\"\n            }\n          }\n    ChatCompletionAllowedTools:\n      type: object\n      title: Allowed tools\n      description: |\n        Constrains the tools available to the model to a pre-defined set.\n      properties:\n        mode:\n          type: string\n          enum:\n            - auto\n            - required\n          description: |\n            Constrains the tools available to the model to a pre-defined set.\n\n            `auto` allows the model to pick from among the allowed tools and generate a\n            message.\n\n            `required` requires the model to call one or more of the allowed tools.\n        tools:\n          type: array\n          description: |\n            A list of tool definitions that the model should be allowed to call.\n\n            For the Chat Completions API, the list of tool definitions might look like:\n            ```json\n            [\n              { \"type\": \"function\", \"function\": { \"name\": \"get_weather\" } },\n              { \"type\": \"function\", \"function\": { \"name\": \"get_time\" } }\n            ]\n            ```\n          items:\n            type: object\n            x-oaiExpandable: false\n            description: |\n              A tool definition that the model should be allowed to call.\n            additionalProperties: true\n      required:\n        - mode\n        - tools\n    ChatCompletionAllowedToolsChoice:\n      type: object\n      title: Allowed tools\n      description: |\n        Constrains the tools available to the model to a pre-defined set.\n      properties:\n        type:\n          type: string\n          enum:\n            - allowed_tools\n          description: Allowed tool configuration type. Always `allowed_tools`.\n          x-stainless-const: true\n        allowed_tools:\n          $ref: '#/components/schemas/ChatCompletionAllowedTools'\n      required:\n        - type\n        - allowed_tools\n    ChatCompletionDeleted:\n      type: object\n      properties:\n        object:\n          type: string\n          description: The type of object being deleted.\n          enum:\n            - chat.completion.deleted\n          x-stainless-const: true\n        id:\n          type: string\n          description: The ID of the chat completion that was deleted.\n        deleted:\n          type: boolean\n          description: Whether the chat completion was deleted.\n      required:\n        - object\n        - id\n        - deleted\n    ChatCompletionFunctionCallOption:\n      type: object\n      description: |\n        Specifying a particular function via `{\"name\": \"my_function\"}` forces the model to call that function.\n      properties:\n        name:\n          type: string\n          description: The name of the function to call.\n      required:\n        - name\n      x-stainless-variantName: function_call_option\n    ChatCompletionFunctions:\n      type: object\n      deprecated: true\n      properties:\n        description:\n          type: string\n          description: >-\n            A description of what the function does, used by the model to choose when and how to call the\n            function.\n        name:\n          type: string\n          description: >-\n            The name of the function to be called. Must be a-z, A-Z, 0-9, or contain underscores and dashes,\n            with a maximum length of 64.\n        parameters:\n          $ref: '#/components/schemas/FunctionParameters'\n      required:\n        - name\n    ChatCompletionList:\n      type: object\n      title: ChatCompletionList\n      description: |\n        An object representing a list of Chat Completions.\n      properties:\n        object:\n          type: string\n          enum:\n            - list\n          default: list\n          description: |\n            The type of this object. It is always set to \"list\".\n          x-stainless-const: true\n        data:\n          type: array\n          description: |\n            An array of chat completion objects.\n          items:\n            $ref: '#/components/schemas/CreateChatCompletionResponse'\n        first_id:\n          type: string\n          description: The identifier of the first chat completion in the data array.\n        last_id:\n          type: string\n          description: The identifier of the last chat completion in the data array.\n        has_more:\n          type: boolean\n          description: Indicates whether there are more Chat Completions available.\n      required:\n        - object\n        - data\n        - first_id\n        - last_id\n        - has_more\n      x-oaiMeta:\n        name: The chat completion list object\n        group: chat\n        example: |\n          {\n            \"object\": \"list\",\n            \"data\": [\n              {\n                \"object\": \"chat.completion\",\n                \"id\": \"chatcmpl-AyPNinnUqUDYo9SAdA52NobMflmj2\",\n                \"model\": \"gpt-4o-2024-08-06\",\n                \"created\": 1738960610,\n                \"request_id\": \"req_ded8ab984ec4bf840f37566c1011c417\",\n                \"tool_choice\": null,\n                \"usage\": {\n                  \"total_tokens\": 31,\n                  \"completion_tokens\": 18,\n                  \"prompt_tokens\": 13\n                },\n                \"seed\": 4944116822809979520,\n                \"top_p\": 1.0,\n                \"temperature\": 1.0,\n                \"presence_penalty\": 0.0,\n                \"frequency_penalty\": 0.0,\n                \"system_fingerprint\": \"fp_50cad350e4\",\n                \"input_user\": null,\n                \"service_tier\": \"default\",\n                \"tools\": null,\n                \"metadata\": {},\n                \"choices\": [\n                  {\n                    \"index\": 0,\n                    \"message\": {\n                      \"content\": \"Mind of circuits hum,  \\nLearning patterns in silence—  \\nFuture's quiet spark.\",\n                      \"role\": \"assistant\",\n                      \"tool_calls\": null,\n                      \"function_call\": null\n                    },\n                    \"finish_reason\": \"stop\",\n                    \"logprobs\": null\n                  }\n                ],\n                \"response_format\": null\n              }\n            ],\n            \"first_id\": \"chatcmpl-AyPNinnUqUDYo9SAdA52NobMflmj2\",\n            \"last_id\": \"chatcmpl-AyPNinnUqUDYo9SAdA52NobMflmj2\",\n            \"has_more\": false\n          }\n    ChatCompletionMessageCustomToolCall:\n      type: object\n      title: Custom tool call\n      description: |\n        A call to a custom tool created by the model.\n      properties:\n        id:\n          type: string\n          description: The ID of the tool call.\n        type:\n          type: string\n          enum:\n            - custom\n          description: The type of the tool. Always `custom`.\n          x-stainless-const: true\n        custom:\n          type: object\n          description: The custom tool that the model called.\n          properties:\n            name:\n              type: string\n              description: The name of the custom tool to call.\n            input:\n              type: string\n              description: The input for the custom tool call generated by the model.\n          required:\n            - name\n            - input\n      required:\n        - id\n        - type\n        - custom\n    ChatCompletionMessageList:\n      type: object\n      title: ChatCompletionMessageList\n      description: |\n        An object representing a list of chat completion messages.\n      properties:\n        object:\n          type: string\n          enum:\n            - list\n          default: list\n          description: |\n            The type of this object. It is always set to \"list\".\n          x-stainless-const: true\n        data:\n          type: array\n          description: |\n            An array of chat completion message objects.\n          items:\n            allOf:\n              - $ref: '#/components/schemas/ChatCompletionResponseMessage'\n              - type: object\n                required:\n                  - id\n                properties:\n                  id:\n                    type: string\n                    description: The identifier of the chat message.\n                  content_parts:\n                    type: array\n                    nullable: true\n                    description: >\n                      If a content parts array was provided, this is an array of `text` and `image_url`\n                      parts.\n\n                      Otherwise, null.\n                    items:\n                      anyOf:\n                        - $ref: '#/components/schemas/ChatCompletionRequestMessageContentPartText'\n                        - $ref: '#/components/schemas/ChatCompletionRequestMessageContentPartImage'\n        first_id:\n          type: string\n          description: The identifier of the first chat message in the data array.\n        last_id:\n          type: string\n          description: The identifier of the last chat message in the data array.\n        has_more:\n          type: boolean\n          description: Indicates whether there are more chat messages available.\n      required:\n        - object\n        - data\n        - first_id\n        - last_id\n        - has_more\n      x-oaiMeta:\n        name: The chat completion message list object\n        group: chat\n        example: |\n          {\n            \"object\": \"list\",\n            \"data\": [\n              {\n                \"id\": \"chatcmpl-AyPNinnUqUDYo9SAdA52NobMflmj2-0\",\n                \"role\": \"user\",\n                \"content\": \"write a haiku about ai\",\n                \"name\": null,\n                \"content_parts\": null\n              }\n            ],\n            \"first_id\": \"chatcmpl-AyPNinnUqUDYo9SAdA52NobMflmj2-0\",\n            \"last_id\": \"chatcmpl-AyPNinnUqUDYo9SAdA52NobMflmj2-0\",\n            \"has_more\": false\n          }\n    ChatCompletionMessageToolCall:\n      type: object\n      title: Function tool call\n      description: |\n        A call to a function tool created by the model.\n      properties:\n        id:\n          type: string\n          description: The ID of the tool call.\n        type:\n          type: string\n          enum:\n            - function\n          description: The type of the tool. Currently, only `function` is supported.\n          x-stainless-const: true\n        function:\n          type: object\n          description: The function that the model called.\n          properties:\n            name:\n              type: string\n              description: The name of the function to call.\n            arguments:\n              type: string\n              description: >-\n                The arguments to call the function with, as generated by the model in JSON format. Note that\n                the model does not always generate valid JSON, and may hallucinate parameters not defined by\n                your function schema. Validate the arguments in your code before calling your function.\n          required:\n            - name\n            - arguments\n      required:\n        - id\n        - type\n        - function\n    ChatCompletionMessageToolCallChunk:\n      type: object\n      properties:\n        index:\n          type: integer\n        id:\n          type: string\n          description: The ID of the tool call.\n        type:\n          type: string\n          enum:\n            - function\n          description: The type of the tool. Currently, only `function` is supported.\n          x-stainless-const: true\n        function:\n          type: object\n          properties:\n            name:\n              type: string\n              description: The name of the function to call.\n            arguments:\n              type: string\n              description: >-\n                The arguments to call the function with, as generated by the model in JSON format. Note that\n                the model does not always generate valid JSON, and may hallucinate parameters not defined by\n                your function schema. Validate the arguments in your code before calling your function.\n      required:\n        - index\n    ChatCompletionMessageToolCalls:\n      type: array\n      description: The tool calls generated by the model, such as function calls.\n      items:\n        anyOf:\n          - $ref: '#/components/schemas/ChatCompletionMessageToolCall'\n          - $ref: '#/components/schemas/ChatCompletionMessageCustomToolCall'\n        x-stainless-naming:\n          python:\n            model_name: chat_completion_message_tool_call_union\n            param_model_name: chat_completion_message_tool_call_union_param\n        discriminator:\n          propertyName: type\n        x-stainless-go-variant-constructor: skip\n    ChatCompletionModalities:\n      type: array\n      nullable: true\n      description: >\n        Output types that you would like the model to generate for this request.\n\n        Most models are capable of generating text, which is the default:\n\n\n        `[\"text\"]`\n\n\n        The `gpt-4o-audio-preview` model can also be used to [generate\n        audio](https://platform.openai.com/docs/guides/audio). To\n\n        request that this model generate both text and audio responses, you can\n\n        use:\n\n\n        `[\"text\", \"audio\"]`\n      items:\n        type: string\n        enum:\n          - text\n          - audio\n    ChatCompletionNamedToolChoice:\n      type: object\n      title: Function tool choice\n      description: Specifies a tool the model should use. Use to force the model to call a specific function.\n      properties:\n        type:\n          type: string\n          enum:\n            - function\n          description: For function calling, the type is always `function`.\n          x-stainless-const: true\n        function:\n          type: object\n          properties:\n            name:\n              type: string\n              description: The name of the function to call.\n          required:\n            - name\n      required:\n        - type\n        - function\n    ChatCompletionNamedToolChoiceCustom:\n      type: object\n      title: Custom tool choice\n      description: Specifies a tool the model should use. Use to force the model to call a specific custom tool.\n      properties:\n        type:\n          type: string\n          enum:\n            - custom\n          description: For custom tool calling, the type is always `custom`.\n          x-stainless-const: true\n        custom:\n          type: object\n          properties:\n            name:\n              type: string\n              description: The name of the custom tool to call.\n          required:\n            - name\n      required:\n        - type\n        - custom\n    ChatCompletionRequestAssistantMessage:\n      type: object\n      title: Assistant message\n      description: |\n        Messages sent by the model in response to user messages.\n      properties:\n        content:\n          nullable: true\n          description: >\n            The contents of the assistant message. Required unless `tool_calls` or `function_call` is\n            specified.\n          anyOf:\n            - type: string\n              description: The contents of the assistant message.\n              title: Text content\n            - type: array\n              description: >-\n                An array of content parts with a defined type. Can be one or more of type `text`, or exactly\n                one of type `refusal`.\n              title: Array of content parts\n              items:\n                $ref: '#/components/schemas/ChatCompletionRequestAssistantMessageContentPart'\n              minItems: 1\n        refusal:\n          nullable: true\n          type: string\n          description: The refusal message by the assistant.\n        role:\n          type: string\n          enum:\n            - assistant\n          description: The role of the messages author, in this case `assistant`.\n          x-stainless-const: true\n        name:\n          type: string\n          description: >-\n            An optional name for the participant. Provides the model information to differentiate between\n            participants of the same role.\n        audio:\n          type: object\n          nullable: true\n          description: |\n            Data about a previous audio response from the model.\n            [Learn more](https://platform.openai.com/docs/guides/audio).\n          required:\n            - id\n          properties:\n            id:\n              type: string\n              description: |\n                Unique identifier for a previous audio response from the model.\n        tool_calls:\n          $ref: '#/components/schemas/ChatCompletionMessageToolCalls'\n        function_call:\n          type: object\n          deprecated: true\n          description: >-\n            Deprecated and replaced by `tool_calls`. The name and arguments of a function that should be\n            called, as generated by the model.\n          nullable: true\n          properties:\n            arguments:\n              type: string\n              description: >-\n                The arguments to call the function with, as generated by the model in JSON format. Note that\n                the model does not always generate valid JSON, and may hallucinate parameters not defined by\n                your function schema. Validate the arguments in your code before calling your function.\n            name:\n              type: string\n              description: The name of the function to call.\n          required:\n            - arguments\n            - name\n      required:\n        - role\n      x-stainless-soft-required:\n        - content\n    ChatCompletionRequestAssistantMessageContentPart:\n      anyOf:\n        - $ref: '#/components/schemas/ChatCompletionRequestMessageContentPartText'\n        - $ref: '#/components/schemas/ChatCompletionRequestMessageContentPartRefusal'\n      discriminator:\n        propertyName: type\n    ChatCompletionRequestDeveloperMessage:\n      type: object\n      title: Developer message\n      description: |\n        Developer-provided instructions that the model should follow, regardless of\n        messages sent by the user. With o1 models and newer, `developer` messages\n        replace the previous `system` messages.\n      properties:\n        content:\n          description: The contents of the developer message.\n          anyOf:\n            - type: string\n              description: The contents of the developer message.\n              title: Text content\n            - type: array\n              description: >-\n                An array of content parts with a defined type. For developer messages, only type `text` is\n                supported.\n              title: Array of content parts\n              items:\n                $ref: '#/components/schemas/ChatCompletionRequestMessageContentPartText'\n              minItems: 1\n        role:\n          type: string\n          enum:\n            - developer\n          description: The role of the messages author, in this case `developer`.\n          x-stainless-const: true\n        name:\n          type: string\n          description: >-\n            An optional name for the participant. Provides the model information to differentiate between\n            participants of the same role.\n      required:\n        - content\n        - role\n      x-stainless-naming:\n        go:\n          variant_constructor: DeveloperMessage\n    ChatCompletionRequestFunctionMessage:\n      type: object\n      title: Function message\n      deprecated: true\n      properties:\n        role:\n          type: string\n          enum:\n            - function\n          description: The role of the messages author, in this case `function`.\n          x-stainless-const: true\n        content:\n          nullable: true\n          type: string\n          description: The contents of the function message.\n        name:\n          type: string\n          description: The name of the function to call.\n      required:\n        - role\n        - content\n        - name\n    ChatCompletionRequestMessage:\n      anyOf:\n        - $ref: '#/components/schemas/ChatCompletionRequestDeveloperMessage'\n        - $ref: '#/components/schemas/ChatCompletionRequestSystemMessage'\n        - $ref: '#/components/schemas/ChatCompletionRequestUserMessage'\n        - $ref: '#/components/schemas/ChatCompletionRequestAssistantMessage'\n        - $ref: '#/components/schemas/ChatCompletionRequestToolMessage'\n        - $ref: '#/components/schemas/ChatCompletionRequestFunctionMessage'\n      discriminator:\n        propertyName: role\n    ChatCompletionRequestMessageContentPartAudio:\n      type: object\n      title: Audio content part\n      description: |\n        Learn about [audio inputs](https://platform.openai.com/docs/guides/audio).\n      properties:\n        type:\n          type: string\n          enum:\n            - input_audio\n          description: The type of the content part. Always `input_audio`.\n          x-stainless-const: true\n        input_audio:\n          type: object\n          properties:\n            data:\n              type: string\n              description: Base64 encoded audio data.\n            format:\n              type: string\n              enum:\n                - wav\n                - mp3\n              description: |\n                The format of the encoded audio data. Currently supports \"wav\" and \"mp3\".\n          required:\n            - data\n            - format\n      required:\n        - type\n        - input_audio\n      x-stainless-naming:\n        go:\n          variant_constructor: InputAudioContentPart\n    ChatCompletionRequestMessageContentPartFile:\n      type: object\n      title: File content part\n      description: |\n        Learn about [file inputs](https://platform.openai.com/docs/guides/text) for text generation.\n      properties:\n        type:\n          type: string\n          enum:\n            - file\n          description: The type of the content part. Always `file`.\n          x-stainless-const: true\n        file:\n          type: object\n          properties:\n            filename:\n              type: string\n              description: |\n                The name of the file, used when passing the file to the model as a\n                string.\n            file_data:\n              type: string\n              description: |\n                The base64 encoded file data, used when passing the file to the model\n                as a string.\n            file_id:\n              type: string\n              description: |\n                The ID of an uploaded file to use as input.\n          x-stainless-naming:\n            java:\n              type_name: FileObject\n            kotlin:\n              type_name: FileObject\n      required:\n        - type\n        - file\n      x-stainless-naming:\n        go:\n          variant_constructor: FileContentPart\n    ChatCompletionRequestMessageContentPartImage:\n      type: object\n      title: Image content part\n      description: |\n        Learn about [image inputs](https://platform.openai.com/docs/guides/vision).\n      properties:\n        type:\n          type: string\n          enum:\n            - image_url\n          description: The type of the content part.\n          x-stainless-const: true\n        image_url:\n          type: object\n          properties:\n            url:\n              type: string\n              description: Either a URL of the image or the base64 encoded image data.\n              format: uri\n            detail:\n              type: string\n              description: >-\n                Specifies the detail level of the image. Learn more in the [Vision\n                guide](https://platform.openai.com/docs/guides/vision#low-or-high-fidelity-image-understanding).\n              enum:\n                - auto\n                - low\n                - high\n              default: auto\n          required:\n            - url\n      required:\n        - type\n        - image_url\n      x-stainless-naming:\n        go:\n          variant_constructor: ImageContentPart\n    ChatCompletionRequestMessageContentPartRefusal:\n      type: object\n      title: Refusal content part\n      properties:\n        type:\n          type: string\n          enum:\n            - refusal\n          description: The type of the content part.\n          x-stainless-const: true\n        refusal:\n          type: string\n          description: The refusal message generated by the model.\n      required:\n        - type\n        - refusal\n    ChatCompletionRequestMessageContentPartText:\n      type: object\n      title: Text content part\n      description: |\n        Learn about [text inputs](https://platform.openai.com/docs/guides/text-generation).\n      properties:\n        type:\n          type: string\n          enum:\n            - text\n          description: The type of the content part.\n          x-stainless-const: true\n        text:\n          type: string\n          description: The text content.\n      required:\n        - type\n        - text\n      x-stainless-naming:\n        go:\n          variant_constructor: TextContentPart\n    ChatCompletionRequestSystemMessage:\n      type: object\n      title: System message\n      description: |\n        Developer-provided instructions that the model should follow, regardless of\n        messages sent by the user. With o1 models and newer, use `developer` messages\n        for this purpose instead.\n      properties:\n        content:\n          description: The contents of the system message.\n          anyOf:\n            - type: string\n              description: The contents of the system message.\n              title: Text content\n            - type: array\n              description: >-\n                An array of content parts with a defined type. For system messages, only type `text` is\n                supported.\n              title: Array of content parts\n              items:\n                $ref: '#/components/schemas/ChatCompletionRequestSystemMessageContentPart'\n              minItems: 1\n        role:\n          type: string\n          enum:\n            - system\n          description: The role of the messages author, in this case `system`.\n          x-stainless-const: true\n        name:\n          type: string\n          description: >-\n            An optional name for the participant. Provides the model information to differentiate between\n            participants of the same role.\n      required:\n        - content\n        - role\n      x-stainless-naming:\n        go:\n          variant_constructor: SystemMessage\n    ChatCompletionRequestSystemMessageContentPart:\n      anyOf:\n        - $ref: '#/components/schemas/ChatCompletionRequestMessageContentPartText'\n    ChatCompletionRequestToolMessage:\n      type: object\n      title: Tool message\n      properties:\n        role:\n          type: string\n          enum:\n            - tool\n          description: The role of the messages author, in this case `tool`.\n          x-stainless-const: true\n        content:\n          description: The contents of the tool message.\n          anyOf:\n            - type: string\n              description: The contents of the tool message.\n              title: Text content\n            - type: array\n              description: >-\n                An array of content parts with a defined type. For tool messages, only type `text` is\n                supported.\n              title: Array of content parts\n              items:\n                $ref: '#/components/schemas/ChatCompletionRequestToolMessageContentPart'\n              minItems: 1\n        tool_call_id:\n          type: string\n          description: Tool call that this message is responding to.\n      required:\n        - role\n        - content\n        - tool_call_id\n      x-stainless-naming:\n        go:\n          variant_constructor: ToolMessage\n    ChatCompletionRequestToolMessageContentPart:\n      anyOf:\n        - $ref: '#/components/schemas/ChatCompletionRequestMessageContentPartText'\n    ChatCompletionRequestUserMessage:\n      type: object\n      title: User message\n      description: |\n        Messages sent by an end user, containing prompts or additional context\n        information.\n      properties:\n        content:\n          description: |\n            The contents of the user message.\n          anyOf:\n            - type: string\n              description: The text contents of the message.\n              title: Text content\n            - type: array\n              description: >-\n                An array of content parts with a defined type. Supported options differ based on the\n                [model](https://platform.openai.com/docs/models) being used to generate the response. Can\n                contain text, image, or audio inputs.\n              title: Array of content parts\n              items:\n                $ref: '#/components/schemas/ChatCompletionRequestUserMessageContentPart'\n              minItems: 1\n        role:\n          type: string\n          enum:\n            - user\n          description: The role of the messages author, in this case `user`.\n          x-stainless-const: true\n        name:\n          type: string\n          description: >-\n            An optional name for the participant. Provides the model information to differentiate between\n            participants of the same role.\n      required:\n        - content\n        - role\n      x-stainless-naming:\n        go:\n          variant_constructor: UserMessage\n    ChatCompletionRequestUserMessageContentPart:\n      anyOf:\n        - $ref: '#/components/schemas/ChatCompletionRequestMessageContentPartText'\n        - $ref: '#/components/schemas/ChatCompletionRequestMessageContentPartImage'\n        - $ref: '#/components/schemas/ChatCompletionRequestMessageContentPartAudio'\n        - $ref: '#/components/schemas/ChatCompletionRequestMessageContentPartFile'\n      discriminator:\n        propertyName: type\n    ChatCompletionResponseMessage:\n      type: object\n      description: A chat completion message generated by the model.\n      properties:\n        content:\n          type: string\n          description: The contents of the message.\n          nullable: true\n        refusal:\n          type: string\n          description: The refusal message generated by the model.\n          nullable: true\n        tool_calls:\n          $ref: '#/components/schemas/ChatCompletionMessageToolCalls'\n        annotations:\n          type: array\n          description: |\n            Annotations for the message, when applicable, as when using the\n            [web search tool](https://platform.openai.com/docs/guides/tools-web-search?api-mode=chat).\n          items:\n            type: object\n            description: |\n              A URL citation when using web search.\n            required:\n              - type\n              - url_citation\n            properties:\n              type:\n                type: string\n                description: The type of the URL citation. Always `url_citation`.\n                enum:\n                  - url_citation\n                x-stainless-const: true\n              url_citation:\n                type: object\n                description: A URL citation when using web search.\n                required:\n                  - end_index\n                  - start_index\n                  - url\n                  - title\n                properties:\n                  end_index:\n                    type: integer\n                    description: The index of the last character of the URL citation in the message.\n                  start_index:\n                    type: integer\n                    description: The index of the first character of the URL citation in the message.\n                  url:\n                    type: string\n                    description: The URL of the web resource.\n                  title:\n                    type: string\n                    description: The title of the web resource.\n        role:\n          type: string\n          enum:\n            - assistant\n          description: The role of the author of this message.\n          x-stainless-const: true\n        function_call:\n          type: object\n          deprecated: true\n          description: >-\n            Deprecated and replaced by `tool_calls`. The name and arguments of a function that should be\n            called, as generated by the model.\n          properties:\n            arguments:\n              type: string\n              description: >-\n                The arguments to call the function with, as generated by the model in JSON format. Note that\n                the model does not always generate valid JSON, and may hallucinate parameters not defined by\n                your function schema. Validate the arguments in your code before calling your function.\n            name:\n              type: string\n              description: The name of the function to call.\n          required:\n            - name\n            - arguments\n        audio:\n          type: object\n          nullable: true\n          description: >\n            If the audio output modality is requested, this object contains data\n\n            about the audio response from the model. [Learn\n            more](https://platform.openai.com/docs/guides/audio).\n          required:\n            - id\n            - expires_at\n            - data\n            - transcript\n          properties:\n            id:\n              type: string\n              description: Unique identifier for this audio response.\n            expires_at:\n              type: integer\n              description: |\n                The Unix timestamp (in seconds) for when this audio response will\n                no longer be accessible on the server for use in multi-turn\n                conversations.\n            data:\n              type: string\n              description: |\n                Base64 encoded audio bytes generated by the model, in the format\n                specified in the request.\n            transcript:\n              type: string\n              description: Transcript of the audio generated by the model.\n      required:\n        - role\n        - content\n        - refusal\n    ChatCompletionRole:\n      type: string\n      description: The role of the author of a message\n      enum:\n        - developer\n        - system\n        - user\n        - assistant\n        - tool\n        - function\n    ChatCompletionStreamOptions:\n      description: |\n        Options for streaming response. Only set this when you set `stream: true`.\n      type: object\n      nullable: true\n      default: null\n      properties:\n        include_usage:\n          type: boolean\n          description: |\n            If set, an additional chunk will be streamed before the `data: [DONE]`\n            message. The `usage` field on this chunk shows the token usage statistics\n            for the entire request, and the `choices` field will always be an empty\n            array.\n\n            All other chunks will also include a `usage` field, but with a null\n            value. **NOTE:** If the stream is interrupted, you may not receive the\n            final usage chunk which contains the total token usage for the request.\n        include_obfuscation:\n          type: boolean\n          description: |\n            When true, stream obfuscation will be enabled. Stream obfuscation adds\n            random characters to an `obfuscation` field on streaming delta events to\n            normalize payload sizes as a mitigation to certain side-channel attacks.\n            These obfuscation fields are included by default, but add a small amount\n            of overhead to the data stream. You can set `include_obfuscation` to\n            false to optimize for bandwidth if you trust the network links between\n            your application and the OpenAI API.\n    ChatCompletionStreamResponseDelta:\n      type: object\n      description: A chat completion delta generated by streamed model responses.\n      properties:\n        content:\n          type: string\n          description: The contents of the chunk message.\n          nullable: true\n        function_call:\n          deprecated: true\n          type: object\n          description: >-\n            Deprecated and replaced by `tool_calls`. The name and arguments of a function that should be\n            called, as generated by the model.\n          properties:\n            arguments:\n              type: string\n              description: >-\n                The arguments to call the function with, as generated by the model in JSON format. Note that\n                the model does not always generate valid JSON, and may hallucinate parameters not defined by\n                your function schema. Validate the arguments in your code before calling your function.\n            name:\n              type: string\n              description: The name of the function to call.\n        tool_calls:\n          type: array\n          items:\n            $ref: '#/components/schemas/ChatCompletionMessageToolCallChunk'\n        role:\n          type: string\n          enum:\n            - developer\n            - system\n            - user\n            - assistant\n            - tool\n          description: The role of the author of this message.\n        refusal:\n          type: string\n          description: The refusal message generated by the model.\n          nullable: true\n    ChatCompletionTokenLogprob:\n      type: object\n      properties:\n        token:\n          description: The token.\n          type: string\n        logprob:\n          description: >-\n            The log probability of this token, if it is within the top 20 most likely tokens. Otherwise, the\n            value `-9999.0` is used to signify that the token is very unlikely.\n          type: number\n        bytes:\n          description: >-\n            A list of integers representing the UTF-8 bytes representation of the token. Useful in instances\n            where characters are represented by multiple tokens and their byte representations must be\n            combined to generate the correct text representation. Can be `null` if there is no bytes\n            representation for the token.\n          type: array\n          items:\n            type: integer\n          nullable: true\n        top_logprobs:\n          description: >-\n            List of the most likely tokens and their log probability, at this token position. In rare cases,\n            there may be fewer than the number of requested `top_logprobs` returned.\n          type: array\n          items:\n            type: object\n            properties:\n              token:\n                description: The token.\n                type: string\n              logprob:\n                description: >-\n                  The log probability of this token, if it is within the top 20 most likely tokens. Otherwise,\n                  the value `-9999.0` is used to signify that the token is very unlikely.\n                type: number\n              bytes:\n                description: >-\n                  A list of integers representing the UTF-8 bytes representation of the token. Useful in\n                  instances where characters are represented by multiple tokens and their byte representations\n                  must be combined to generate the correct text representation. Can be `null` if there is no\n                  bytes representation for the token.\n                type: array\n                items:\n                  type: integer\n                nullable: true\n            required:\n              - token\n              - logprob\n              - bytes\n      required:\n        - token\n        - logprob\n        - bytes\n        - top_logprobs\n    ChatCompletionTool:\n      type: object\n      title: Function tool\n      description: |\n        A function tool that can be used to generate a response.\n      properties:\n        type:\n          type: string\n          enum:\n            - function\n          description: The type of the tool. Currently, only `function` is supported.\n          x-stainless-const: true\n        function:\n          $ref: '#/components/schemas/FunctionObject'\n      required:\n        - type\n        - function\n    ChatCompletionToolChoiceOption:\n      description: >\n        Controls which (if any) tool is called by the model.\n\n        `none` means the model will not call any tool and instead generates a message.\n\n        `auto` means the model can pick between generating a message or calling one or more tools.\n\n        `required` means the model must call one or more tools.\n\n        Specifying a particular tool via `{\"type\": \"function\", \"function\": {\"name\": \"my_function\"}}` forces\n        the model to call that tool.\n\n\n        `none` is the default when no tools are present. `auto` is the default if tools are present.\n      anyOf:\n        - type: string\n          title: Auto\n          description: >\n            `none` means the model will not call any tool and instead generates a message. `auto` means the\n            model can pick between generating a message or calling one or more tools. `required` means the\n            model must call one or more tools.\n          enum:\n            - none\n            - auto\n            - required\n        - $ref: '#/components/schemas/ChatCompletionAllowedToolsChoice'\n        - $ref: '#/components/schemas/ChatCompletionNamedToolChoice'\n        - $ref: '#/components/schemas/ChatCompletionNamedToolChoiceCustom'\n      x-stainless-go-variant-constructor:\n        naming: tool_choice_option_{variant}\n    ChunkingStrategyRequestParam:\n      type: object\n      description: >-\n        The chunking strategy used to chunk the file(s). If not set, will use the `auto` strategy. Only\n        applicable if `file_ids` is non-empty.\n      anyOf:\n        - $ref: '#/components/schemas/AutoChunkingStrategyRequestParam'\n        - $ref: '#/components/schemas/StaticChunkingStrategyRequestParam'\n      discriminator:\n        propertyName: type\n    Click:\n      type: object\n      title: Click\n      description: |\n        A click action.\n      properties:\n        type:\n          type: string\n          enum:\n            - click\n          default: click\n          description: |\n            Specifies the event type. For a click action, this property is\n            always set to `click`.\n          x-stainless-const: true\n        button:\n          type: string\n          enum:\n            - left\n            - right\n            - wheel\n            - back\n            - forward\n          description: >\n            Indicates which mouse button was pressed during the click. One of `left`, `right`, `wheel`,\n            `back`, or `forward`.\n        x:\n          type: integer\n          description: |\n            The x-coordinate where the click occurred.\n        'y':\n          type: integer\n          description: |\n            The y-coordinate where the click occurred.\n      required:\n        - type\n        - button\n        - x\n        - 'y'\n    CodeInterpreterFileOutput:\n      type: object\n      title: Code interpreter file output\n      description: |\n        The output of a code interpreter tool call that is a file.\n      properties:\n        type:\n          type: string\n          enum:\n            - files\n          description: |\n            The type of the code interpreter file output. Always `files`.\n          x-stainless-const: true\n        files:\n          type: array\n          items:\n            type: object\n            properties:\n              mime_type:\n                type: string\n                description: |\n                  The MIME type of the file.\n              file_id:\n                type: string\n                description: |\n                  The ID of the file.\n            required:\n              - mime_type\n              - file_id\n      required:\n        - type\n        - files\n    CodeInterpreterOutputImage:\n      type: object\n      title: Code interpreter output image\n      description: |\n        The image output from the code interpreter.\n      properties:\n        type:\n          type: string\n          enum:\n            - image\n          default: image\n          x-stainless-const: true\n          description: The type of the output. Always 'image'.\n        url:\n          type: string\n          description: The URL of the image output from the code interpreter.\n      required:\n        - type\n        - url\n    CodeInterpreterOutputLogs:\n      type: object\n      title: Code interpreter output logs\n      description: |\n        The logs output from the code interpreter.\n      properties:\n        type:\n          type: string\n          enum:\n            - logs\n          default: logs\n          x-stainless-const: true\n          description: The type of the output. Always 'logs'.\n        logs:\n          type: string\n          description: The logs output from the code interpreter.\n      required:\n        - type\n        - logs\n    CodeInterpreterTextOutput:\n      type: object\n      title: Code interpreter text output\n      description: |\n        The output of a code interpreter tool call that is text.\n      properties:\n        type:\n          type: string\n          enum:\n            - logs\n          description: |\n            The type of the code interpreter text output. Always `logs`.\n          x-stainless-const: true\n        logs:\n          type: string\n          description: |\n            The logs of the code interpreter tool call.\n      required:\n        - type\n        - logs\n    CodeInterpreterTool:\n      type: object\n      title: Code interpreter\n      description: |\n        A tool that runs Python code to help generate a response to a prompt.\n      properties:\n        type:\n          type: string\n          enum:\n            - code_interpreter\n          description: |\n            The type of the code interpreter tool. Always `code_interpreter`.\n          x-stainless-const: true\n        container:\n          description: |\n            The code interpreter container. Can be a container ID or an object that\n            specifies uploaded file IDs to make available to your code.\n          anyOf:\n            - type: string\n              description: The container ID.\n            - $ref: '#/components/schemas/CodeInterpreterToolAuto'\n      required:\n        - type\n        - container\n    CodeInterpreterToolAuto:\n      type: object\n      title: CodeInterpreterContainerAuto\n      description: |\n        Configuration for a code interpreter container. Optionally specify the IDs\n        of the files to run the code on.\n      required:\n        - type\n      properties:\n        type:\n          type: string\n          enum:\n            - auto\n          description: Always `auto`.\n          x-stainless-const: true\n        file_ids:\n          type: array\n          items:\n            type: string\n          description: |\n            An optional list of uploaded files to make available to your code.\n    CodeInterpreterToolCall:\n      type: object\n      title: Code interpreter tool call\n      description: |\n        A tool call to run code.\n      properties:\n        type:\n          type: string\n          enum:\n            - code_interpreter_call\n          default: code_interpreter_call\n          x-stainless-const: true\n          description: |\n            The type of the code interpreter tool call. Always `code_interpreter_call`.\n        id:\n          type: string\n          description: |\n            The unique ID of the code interpreter tool call.\n        status:\n          type: string\n          enum:\n            - in_progress\n            - completed\n            - incomplete\n            - interpreting\n            - failed\n          description: >\n            The status of the code interpreter tool call. Valid values are `in_progress`, `completed`,\n            `incomplete`, `interpreting`, and `failed`.\n        container_id:\n          type: string\n          description: |\n            The ID of the container used to run the code.\n        code:\n          type: string\n          nullable: true\n          description: |\n            The code to run, or null if not available.\n        outputs:\n          type: array\n          items:\n            anyOf:\n              - $ref: '#/components/schemas/CodeInterpreterOutputLogs'\n              - $ref: '#/components/schemas/CodeInterpreterOutputImage'\n            discriminator:\n              propertyName: type\n          discriminator:\n            propertyName: type\n          nullable: true\n          description: |\n            The outputs generated by the code interpreter, such as logs or images.\n            Can be null if no outputs are available.\n      required:\n        - type\n        - id\n        - status\n        - container_id\n        - code\n        - outputs\n    ComparisonFilter:\n      type: object\n      additionalProperties: false\n      title: Comparison Filter\n      description: >\n        A filter used to compare a specified attribute key to a given value using a defined comparison\n        operation.\n      properties:\n        type:\n          type: string\n          default: eq\n          enum:\n            - eq\n            - ne\n            - gt\n            - gte\n            - lt\n            - lte\n          description: |\n            Specifies the comparison operator: `eq`, `ne`, `gt`, `gte`, `lt`, `lte`.\n            - `eq`: equals\n            - `ne`: not equal\n            - `gt`: greater than\n            - `gte`: greater than or equal\n            - `lt`: less than\n            - `lte`: less than or equal\n        key:\n          type: string\n          description: The key to compare against the value.\n        value:\n          description: The value to compare against the attribute key; supports string, number, or boolean types.\n          anyOf:\n            - type: string\n            - type: number\n            - type: boolean\n      required:\n        - type\n        - key\n        - value\n      x-oaiMeta:\n        name: ComparisonFilter\n    CompleteUploadRequest:\n      type: object\n      additionalProperties: false\n      properties:\n        part_ids:\n          type: array\n          description: |\n            The ordered list of Part IDs.\n          items:\n            type: string\n        md5:\n          description: >\n            The optional md5 checksum for the file contents to verify if the bytes uploaded matches what you\n            expect.\n          type: string\n      required:\n        - part_ids\n    CompletionUsage:\n      type: object\n      description: Usage statistics for the completion request.\n      properties:\n        completion_tokens:\n          type: integer\n          default: 0\n          description: Number of tokens in the generated completion.\n        prompt_tokens:\n          type: integer\n          default: 0\n          description: Number of tokens in the prompt.\n        total_tokens:\n          type: integer\n          default: 0\n          description: Total number of tokens used in the request (prompt + completion).\n        completion_tokens_details:\n          type: object\n          description: Breakdown of tokens used in a completion.\n          properties:\n            accepted_prediction_tokens:\n              type: integer\n              default: 0\n              description: |\n                When using Predicted Outputs, the number of tokens in the\n                prediction that appeared in the completion.\n            audio_tokens:\n              type: integer\n              default: 0\n              description: Audio input tokens generated by the model.\n            reasoning_tokens:\n              type: integer\n              default: 0\n              description: Tokens generated by the model for reasoning.\n            rejected_prediction_tokens:\n              type: integer\n              default: 0\n              description: |\n                When using Predicted Outputs, the number of tokens in the\n                prediction that did not appear in the completion. However, like\n                reasoning tokens, these tokens are still counted in the total\n                completion tokens for purposes of billing, output, and context window\n                limits.\n        prompt_tokens_details:\n          type: object\n          description: Breakdown of tokens used in the prompt.\n          properties:\n            audio_tokens:\n              type: integer\n              default: 0\n              description: Audio input tokens present in the prompt.\n            cached_tokens:\n              type: integer\n              default: 0\n              description: Cached tokens present in the prompt.\n      required:\n        - prompt_tokens\n        - completion_tokens\n        - total_tokens\n    CompoundFilter:\n      $recursiveAnchor: true\n      type: object\n      additionalProperties: false\n      title: Compound Filter\n      description: Combine multiple filters using `and` or `or`.\n      properties:\n        type:\n          type: string\n          description: 'Type of operation: `and` or `or`.'\n          enum:\n            - and\n            - or\n        filters:\n          type: array\n          description: Array of filters to combine. Items can be `ComparisonFilter` or `CompoundFilter`.\n          items:\n            anyOf:\n              - $ref: '#/components/schemas/ComparisonFilter'\n              - $recursiveRef: '#'\n      required:\n        - type\n        - filters\n      x-oaiMeta:\n        name: CompoundFilter\n    ComputerAction:\n      anyOf:\n        - $ref: '#/components/schemas/Click'\n        - $ref: '#/components/schemas/DoubleClick'\n        - $ref: '#/components/schemas/Drag'\n        - $ref: '#/components/schemas/KeyPress'\n        - $ref: '#/components/schemas/Move'\n        - $ref: '#/components/schemas/Screenshot'\n        - $ref: '#/components/schemas/Scroll'\n        - $ref: '#/components/schemas/Type'\n        - $ref: '#/components/schemas/Wait'\n      discriminator:\n        propertyName: type\n    ComputerScreenshotImage:\n      type: object\n      description: |\n        A computer screenshot image used with the computer use tool.\n      properties:\n        type:\n          type: string\n          enum:\n            - computer_screenshot\n          default: computer_screenshot\n          description: |\n            Specifies the event type. For a computer screenshot, this property is\n            always set to `computer_screenshot`.\n          x-stainless-const: true\n        image_url:\n          type: string\n          description: The URL of the screenshot image.\n        file_id:\n          type: string\n          description: The identifier of an uploaded file that contains the screenshot.\n      required:\n        - type\n    ComputerToolCall:\n      type: object\n      title: Computer tool call\n      description: |\n        A tool call to a computer use tool. See the\n        [computer use guide](https://platform.openai.com/docs/guides/tools-computer-use) for more information.\n      properties:\n        type:\n          type: string\n          description: The type of the computer call. Always `computer_call`.\n          enum:\n            - computer_call\n          default: computer_call\n        id:\n          type: string\n          description: The unique ID of the computer call.\n        call_id:\n          type: string\n          description: |\n            An identifier used when responding to the tool call with output.\n        action:\n          $ref: '#/components/schemas/ComputerAction'\n        pending_safety_checks:\n          type: array\n          items:\n            $ref: '#/components/schemas/ComputerToolCallSafetyCheck'\n          description: |\n            The pending safety checks for the computer call.\n        status:\n          type: string\n          description: |\n            The status of the item. One of `in_progress`, `completed`, or\n            `incomplete`. Populated when items are returned via API.\n          enum:\n            - in_progress\n            - completed\n            - incomplete\n      required:\n        - type\n        - id\n        - action\n        - call_id\n        - pending_safety_checks\n        - status\n    ComputerToolCallOutput:\n      type: object\n      title: Computer tool call output\n      description: |\n        The output of a computer tool call.\n      properties:\n        type:\n          type: string\n          description: |\n            The type of the computer tool call output. Always `computer_call_output`.\n          enum:\n            - computer_call_output\n          default: computer_call_output\n          x-stainless-const: true\n        id:\n          type: string\n          description: |\n            The ID of the computer tool call output.\n        call_id:\n          type: string\n          description: |\n            The ID of the computer tool call that produced the output.\n        acknowledged_safety_checks:\n          type: array\n          description: |\n            The safety checks reported by the API that have been acknowledged by the\n            developer.\n          items:\n            $ref: '#/components/schemas/ComputerToolCallSafetyCheck'\n        output:\n          $ref: '#/components/schemas/ComputerScreenshotImage'\n        status:\n          type: string\n          description: |\n            The status of the message input. One of `in_progress`, `completed`, or\n            `incomplete`. Populated when input items are returned via API.\n          enum:\n            - in_progress\n            - completed\n            - incomplete\n      required:\n        - type\n        - call_id\n        - output\n    ComputerToolCallOutputResource:\n      allOf:\n        - $ref: '#/components/schemas/ComputerToolCallOutput'\n        - type: object\n          properties:\n            id:\n              type: string\n              description: |\n                The unique ID of the computer call tool output.\n          required:\n            - id\n    ComputerToolCallSafetyCheck:\n      type: object\n      description: |\n        A pending safety check for the computer call.\n      properties:\n        id:\n          type: string\n          description: The ID of the pending safety check.\n        code:\n          type: string\n          description: The type of the pending safety check.\n        message:\n          type: string\n          description: Details about the pending safety check.\n      required:\n        - id\n        - code\n        - message\n    ContainerFileListResource:\n      type: object\n      properties:\n        object:\n          description: The type of object returned, must be 'list'.\n          const: list\n        data:\n          type: array\n          description: A list of container files.\n          items:\n            $ref: '#/components/schemas/ContainerFileResource'\n        first_id:\n          type: string\n          description: The ID of the first file in the list.\n        last_id:\n          type: string\n          description: The ID of the last file in the list.\n        has_more:\n          type: boolean\n          description: Whether there are more files available.\n      required:\n        - object\n        - data\n        - first_id\n        - last_id\n        - has_more\n    ContainerFileResource:\n      type: object\n      title: The container file object\n      properties:\n        id:\n          type: string\n          description: Unique identifier for the file.\n        object:\n          type: string\n          description: The type of this object (`container.file`).\n          const: container.file\n        container_id:\n          type: string\n          description: The container this file belongs to.\n        created_at:\n          type: integer\n          description: Unix timestamp (in seconds) when the file was created.\n        bytes:\n          type: integer\n          description: Size of the file in bytes.\n        path:\n          type: string\n          description: Path of the file in the container.\n        source:\n          type: string\n          description: Source of the file (e.g., `user`, `assistant`).\n      required:\n        - id\n        - object\n        - created_at\n        - bytes\n        - container_id\n        - path\n        - source\n      x-oaiMeta:\n        name: The container file object\n        example: |\n          {\n              \"id\": \"cfile_682e0e8a43c88191a7978f477a09bdf5\",\n              \"object\": \"container.file\",\n              \"created_at\": 1747848842,\n              \"bytes\": 880,\n              \"container_id\": \"cntr_682e0e7318108198aa783fd921ff305e08e78805b9fdbb04\",\n              \"path\": \"/mnt/data/88e12fa445d32636f190a0b33daed6cb-tsconfig.json\",\n              \"source\": \"user\"\n          }\n    ContainerListResource:\n      type: object\n      properties:\n        object:\n          description: The type of object returned, must be 'list'.\n          const: list\n        data:\n          type: array\n          description: A list of containers.\n          items:\n            $ref: '#/components/schemas/ContainerResource'\n        first_id:\n          type: string\n          description: The ID of the first container in the list.\n        last_id:\n          type: string\n          description: The ID of the last container in the list.\n        has_more:\n          type: boolean\n          description: Whether there are more containers available.\n      required:\n        - object\n        - data\n        - first_id\n        - last_id\n        - has_more\n    ContainerResource:\n      type: object\n      title: The container object\n      properties:\n        id:\n          type: string\n          description: Unique identifier for the container.\n        object:\n          type: string\n          description: The type of this object.\n        name:\n          type: string\n          description: Name of the container.\n        created_at:\n          type: integer\n          description: Unix timestamp (in seconds) when the container was created.\n        status:\n          type: string\n          description: Status of the container (e.g., active, deleted).\n        expires_after:\n          type: object\n          description: |\n            The container will expire after this time period.\n            The anchor is the reference point for the expiration.\n            The minutes is the number of minutes after the anchor before the container expires.\n          properties:\n            anchor:\n              type: string\n              description: The reference point for the expiration.\n              enum:\n                - last_active_at\n            minutes:\n              type: integer\n              description: The number of minutes after the anchor before the container expires.\n      required:\n        - id\n        - object\n        - name\n        - created_at\n        - status\n        - id\n        - name\n        - created_at\n        - status\n      x-oaiMeta:\n        name: The container object\n        example: |\n          {\n             \"id\": \"cntr_682dfebaacac8198bbfe9c2474fb6f4a085685cbe3cb5863\",\n             \"object\": \"container\",\n             \"created_at\": 1747844794,\n             \"status\": \"running\",\n             \"expires_after\": {\n               \"anchor\": \"last_active_at\",\n               \"minutes\": 20\n             },\n             \"last_active_at\": 1747844794,\n             \"name\": \"My Container\"\n          }\n    Content:\n      description: |\n        Multi-modal input and output contents.\n      anyOf:\n        - title: Input content types\n          $ref: '#/components/schemas/InputContent'\n        - title: Output content types\n          $ref: '#/components/schemas/OutputContent'\n    Coordinate:\n      type: object\n      title: Coordinate\n      description: |\n        An x/y coordinate pair, e.g. `{ x: 100, y: 200 }`.\n      properties:\n        x:\n          type: integer\n          description: |\n            The x-coordinate.\n        'y':\n          type: integer\n          description: |\n            The y-coordinate.\n      required:\n        - x\n        - 'y'\n    CostsResult:\n      type: object\n      description: The aggregated costs details of the specific time bucket.\n      properties:\n        object:\n          type: string\n          enum:\n            - organization.costs.result\n          x-stainless-const: true\n        amount:\n          type: object\n          description: The monetary value in its associated currency.\n          properties:\n            value:\n              type: number\n              description: The numeric value of the cost.\n            currency:\n              type: string\n              description: Lowercase ISO-4217 currency e.g. \"usd\"\n        line_item:\n          type: string\n          nullable: true\n          description: When `group_by=line_item`, this field provides the line item of the grouped costs result.\n        project_id:\n          type: string\n          nullable: true\n          description: When `group_by=project_id`, this field provides the project ID of the grouped costs result.\n      required:\n        - object\n      x-oaiMeta:\n        name: Costs object\n        example: |\n          {\n              \"object\": \"organization.costs.result\",\n              \"amount\": {\n                \"value\": 0.06,\n                \"currency\": \"usd\"\n              },\n              \"line_item\": \"Image models\",\n              \"project_id\": \"proj_abc\"\n          }\n    CreateAssistantRequest:\n      type: object\n      additionalProperties: false\n      properties:\n        model:\n          description: >\n            ID of the model to use. You can use the [List\n            models](https://platform.openai.com/docs/api-reference/models/list) API to see all of your\n            available models, or see our [Model overview](https://platform.openai.com/docs/models) for\n            descriptions of them.\n          example: gpt-4o\n          anyOf:\n            - type: string\n            - $ref: '#/components/schemas/AssistantSupportedModels'\n          x-oaiTypeLabel: string\n        name:\n          description: |\n            The name of the assistant. The maximum length is 256 characters.\n          type: string\n          nullable: true\n          maxLength: 256\n        description:\n          description: |\n            The description of the assistant. The maximum length is 512 characters.\n          type: string\n          nullable: true\n          maxLength: 512\n        instructions:\n          description: |\n            The system instructions that the assistant uses. The maximum length is 256,000 characters.\n          type: string\n          nullable: true\n          maxLength: 256000\n        reasoning_effort:\n          $ref: '#/components/schemas/ReasoningEffort'\n        tools:\n          description: >\n            A list of tool enabled on the assistant. There can be a maximum of 128 tools per assistant. Tools\n            can be of types `code_interpreter`, `file_search`, or `function`.\n          default: []\n          type: array\n          maxItems: 128\n          items:\n            $ref: '#/components/schemas/AssistantTool'\n        tool_resources:\n          type: object\n          description: >\n            A set of resources that are used by the assistant's tools. The resources are specific to the type\n            of tool. For example, the `code_interpreter` tool requires a list of file IDs, while the\n            `file_search` tool requires a list of vector store IDs.\n          properties:\n            code_interpreter:\n              type: object\n              properties:\n                file_ids:\n                  type: array\n                  description: >\n                    A list of [file](https://platform.openai.com/docs/api-reference/files) IDs made available\n                    to the `code_interpreter` tool. There can be a maximum of 20 files associated with the\n                    tool.\n                  default: []\n                  maxItems: 20\n                  items:\n                    type: string\n            file_search:\n              type: object\n              properties:\n                vector_store_ids:\n                  type: array\n                  description: >\n                    The [vector store](https://platform.openai.com/docs/api-reference/vector-stores/object)\n                    attached to this assistant. There can be a maximum of 1 vector store attached to the\n                    assistant.\n                  maxItems: 1\n                  items:\n                    type: string\n                vector_stores:\n                  type: array\n                  description: >\n                    A helper to create a [vector\n                    store](https://platform.openai.com/docs/api-reference/vector-stores/object) with file_ids\n                    and attach it to this assistant. There can be a maximum of 1 vector store attached to the\n                    assistant.\n                  maxItems: 1\n                  items:\n                    type: object\n                    properties:\n                      file_ids:\n                        type: array\n                        description: >\n                          A list of [file](https://platform.openai.com/docs/api-reference/files) IDs to add to\n                          the vector store. There can be a maximum of 10000 files in a vector store.\n                        maxItems: 10000\n                        items:\n                          type: string\n                      chunking_strategy:\n                        type: object\n                        description: >-\n                          The chunking strategy used to chunk the file(s). If not set, will use the `auto`\n                          strategy.\n                        anyOf:\n                          - type: object\n                            title: Auto Chunking Strategy\n                            description: >-\n                              The default strategy. This strategy currently uses a `max_chunk_size_tokens` of\n                              `800` and `chunk_overlap_tokens` of `400`.\n                            additionalProperties: false\n                            properties:\n                              type:\n                                type: string\n                                description: Always `auto`.\n                                enum:\n                                  - auto\n                                x-stainless-const: true\n                            required:\n                              - type\n                          - type: object\n                            title: Static Chunking Strategy\n                            additionalProperties: false\n                            properties:\n                              type:\n                                type: string\n                                description: Always `static`.\n                                enum:\n                                  - static\n                                x-stainless-const: true\n                              static:\n                                type: object\n                                additionalProperties: false\n                                properties:\n                                  max_chunk_size_tokens:\n                                    type: integer\n                                    minimum: 100\n                                    maximum: 4096\n                                    description: >-\n                                      The maximum number of tokens in each chunk. The default value is `800`.\n                                      The minimum value is `100` and the maximum value is `4096`.\n                                  chunk_overlap_tokens:\n                                    type: integer\n                                    description: >\n                                      The number of tokens that overlap between chunks. The default value is\n                                      `400`.\n\n\n                                      Note that the overlap must not exceed half of `max_chunk_size_tokens`.\n                                required:\n                                  - max_chunk_size_tokens\n                                  - chunk_overlap_tokens\n                            required:\n                              - type\n                              - static\n                            x-stainless-naming:\n                              java:\n                                type_name: StaticObject\n                              kotlin:\n                                type_name: StaticObject\n                        discriminator:\n                          propertyName: type\n                      metadata:\n                        $ref: '#/components/schemas/Metadata'\n              anyOf:\n                - required:\n                    - vector_store_ids\n                - required:\n                    - vector_stores\n          nullable: true\n        metadata:\n          $ref: '#/components/schemas/Metadata'\n        temperature:\n          description: >\n            What sampling temperature to use, between 0 and 2. Higher values like 0.8 will make the output\n            more random, while lower values like 0.2 will make it more focused and deterministic.\n          type: number\n          minimum: 0\n          maximum: 2\n          default: 1\n          example: 1\n          nullable: true\n        top_p:\n          type: number\n          minimum: 0\n          maximum: 1\n          default: 1\n          example: 1\n          nullable: true\n          description: >\n            An alternative to sampling with temperature, called nucleus sampling, where the model considers\n            the results of the tokens with top_p probability mass. So 0.1 means only the tokens comprising the\n            top 10% probability mass are considered.\n\n\n            We generally recommend altering this or temperature but not both.\n        response_format:\n          $ref: '#/components/schemas/AssistantsApiResponseFormatOption'\n          nullable: true\n      required:\n        - model\n    CreateChatCompletionRequest:\n      allOf:\n        - $ref: '#/components/schemas/CreateModelResponseProperties'\n        - type: object\n          properties:\n            messages:\n              description: >\n                A list of messages comprising the conversation so far. Depending on the\n\n                [model](https://platform.openai.com/docs/models) you use, different message types (modalities)\n                are\n\n                supported, like [text](https://platform.openai.com/docs/guides/text-generation),\n\n                [images](https://platform.openai.com/docs/guides/vision), and\n                [audio](https://platform.openai.com/docs/guides/audio).\n              type: array\n              minItems: 1\n              items:\n                $ref: '#/components/schemas/ChatCompletionRequestMessage'\n            model:\n              description: >\n                Model ID used to generate the response, like `gpt-4o` or `o3`. OpenAI\n\n                offers a wide range of models with different capabilities, performance\n\n                characteristics, and price points. Refer to the [model\n                guide](https://platform.openai.com/docs/models)\n\n                to browse and compare available models.\n              $ref: '#/components/schemas/ModelIdsShared'\n            modalities:\n              $ref: '#/components/schemas/ResponseModalities'\n            verbosity:\n              $ref: '#/components/schemas/Verbosity'\n            reasoning_effort:\n              $ref: '#/components/schemas/ReasoningEffort'\n            max_completion_tokens:\n              description: >\n                An upper bound for the number of tokens that can be generated for a completion, including\n                visible output tokens and [reasoning\n                tokens](https://platform.openai.com/docs/guides/reasoning).\n              type: integer\n              nullable: true\n            frequency_penalty:\n              type: number\n              default: 0\n              minimum: -2\n              maximum: 2\n              nullable: true\n              description: |\n                Number between -2.0 and 2.0. Positive values penalize new tokens based on\n                their existing frequency in the text so far, decreasing the model's\n                likelihood to repeat the same line verbatim.\n            presence_penalty:\n              type: number\n              default: 0\n              minimum: -2\n              maximum: 2\n              nullable: true\n              description: |\n                Number between -2.0 and 2.0. Positive values penalize new tokens based on\n                whether they appear in the text so far, increasing the model's likelihood\n                to talk about new topics.\n            web_search_options:\n              type: object\n              title: Web search\n              description: >\n                This tool searches the web for relevant results to use in a response.\n\n                Learn more about the [web search\n                tool](https://platform.openai.com/docs/guides/tools-web-search?api-mode=chat).\n              properties:\n                user_location:\n                  type: object\n                  nullable: true\n                  required:\n                    - type\n                    - approximate\n                  description: |\n                    Approximate location parameters for the search.\n                  properties:\n                    type:\n                      type: string\n                      description: |\n                        The type of location approximation. Always `approximate`.\n                      enum:\n                        - approximate\n                      x-stainless-const: true\n                    approximate:\n                      $ref: '#/components/schemas/WebSearchLocation'\n                search_context_size:\n                  $ref: '#/components/schemas/WebSearchContextSize'\n            top_logprobs:\n              description: |\n                An integer between 0 and 20 specifying the number of most likely tokens to\n                return at each token position, each with an associated log probability.\n                `logprobs` must be set to `true` if this parameter is used.\n              type: integer\n              minimum: 0\n              maximum: 20\n              nullable: true\n            response_format:\n              description: |\n                An object specifying the format that the model must output.\n\n                Setting to `{ \"type\": \"json_schema\", \"json_schema\": {...} }` enables\n                Structured Outputs which ensures the model will match your supplied JSON\n                schema. Learn more in the [Structured Outputs\n                guide](https://platform.openai.com/docs/guides/structured-outputs).\n\n                Setting to `{ \"type\": \"json_object\" }` enables the older JSON mode, which\n                ensures the message the model generates is valid JSON. Using `json_schema`\n                is preferred for models that support it.\n              anyOf:\n                - $ref: '#/components/schemas/ResponseFormatText'\n                - $ref: '#/components/schemas/ResponseFormatJsonSchema'\n                - $ref: '#/components/schemas/ResponseFormatJsonObject'\n            audio:\n              type: object\n              nullable: true\n              description: |\n                Parameters for audio output. Required when audio output is requested with\n                `modalities: [\"audio\"]`. [Learn more](https://platform.openai.com/docs/guides/audio).\n              required:\n                - voice\n                - format\n              properties:\n                voice:\n                  $ref: '#/components/schemas/VoiceIdsShared'\n                  description: |\n                    The voice the model uses to respond. Supported voices are\n                    `alloy`, `ash`, `ballad`, `coral`, `echo`, `fable`, `nova`, `onyx`, `sage`, and `shimmer`.\n                format:\n                  type: string\n                  enum:\n                    - wav\n                    - aac\n                    - mp3\n                    - flac\n                    - opus\n                    - pcm16\n                  description: |\n                    Specifies the output audio format. Must be one of `wav`, `mp3`, `flac`,\n                    `opus`, or `pcm16`.\n            store:\n              type: boolean\n              default: false\n              nullable: true\n              description: |\n                Whether or not to store the output of this chat completion request for\n                use in our [model distillation](https://platform.openai.com/docs/guides/distillation) or\n                [evals](https://platform.openai.com/docs/guides/evals) products.\n\n                Supports text and image inputs. Note: image inputs over 8MB will be dropped.\n            stream:\n              description: >\n                If set to true, the model response data will be streamed to the client\n\n                as it is generated using [server-sent\n                events](https://developer.mozilla.org/en-US/docs/Web/API/Server-sent_events/Using_server-sent_events#Event_stream_format).\n\n                See the [Streaming section\n                below](https://platform.openai.com/docs/api-reference/chat/streaming)\n\n                for more information, along with the [streaming\n                responses](https://platform.openai.com/docs/guides/streaming-responses)\n\n                guide for more information on how to handle the streaming events.\n              type: boolean\n              nullable: true\n              default: false\n            stop:\n              $ref: '#/components/schemas/StopConfiguration'\n            logit_bias:\n              type: object\n              x-oaiTypeLabel: map\n              default: null\n              nullable: true\n              additionalProperties:\n                type: integer\n              description: |\n                Modify the likelihood of specified tokens appearing in the completion.\n\n                Accepts a JSON object that maps tokens (specified by their token ID in the\n                tokenizer) to an associated bias value from -100 to 100. Mathematically,\n                the bias is added to the logits generated by the model prior to sampling.\n                The exact effect will vary per model, but values between -1 and 1 should\n                decrease or increase likelihood of selection; values like -100 or 100\n                should result in a ban or exclusive selection of the relevant token.\n            logprobs:\n              description: |\n                Whether to return log probabilities of the output tokens or not. If true,\n                returns the log probabilities of each output token returned in the\n                `content` of `message`.\n              type: boolean\n              default: false\n              nullable: true\n            max_tokens:\n              description: |\n                The maximum number of [tokens](/tokenizer) that can be generated in the\n                chat completion. This value can be used to control\n                [costs](https://openai.com/api/pricing/) for text generated via API.\n\n                This value is now deprecated in favor of `max_completion_tokens`, and is\n                not compatible with [o-series models](https://platform.openai.com/docs/guides/reasoning).\n              type: integer\n              nullable: true\n              deprecated: true\n            'n':\n              type: integer\n              minimum: 1\n              maximum: 128\n              default: 1\n              example: 1\n              nullable: true\n              description: >-\n                How many chat completion choices to generate for each input message. Note that you will be\n                charged based on the number of generated tokens across all of the choices. Keep `n` as `1` to\n                minimize costs.\n            prediction:\n              nullable: true\n              description: >\n                Configuration for a [Predicted\n                Output](https://platform.openai.com/docs/guides/predicted-outputs),\n\n                which can greatly improve response times when large parts of the model\n\n                response are known ahead of time. This is most common when you are\n\n                regenerating a file with only minor changes to most of the content.\n              anyOf:\n                - $ref: '#/components/schemas/PredictionContent'\n              discriminator:\n                propertyName: type\n            seed:\n              type: integer\n              minimum: -9223372036854776000\n              maximum: 9223372036854776000\n              nullable: true\n              deprecated: true\n              description: >\n                This feature is in Beta.\n\n                If specified, our system will make a best effort to sample deterministically, such that\n                repeated requests with the same `seed` and parameters should return the same result.\n\n                Determinism is not guaranteed, and you should refer to the `system_fingerprint` response\n                parameter to monitor changes in the backend.\n              x-oaiMeta:\n                beta: true\n            stream_options:\n              $ref: '#/components/schemas/ChatCompletionStreamOptions'\n            tools:\n              type: array\n              description: |\n                A list of tools the model may call. You can provide either\n                [custom tools](https://platform.openai.com/docs/guides/function-calling#custom-tools) or\n                [function tools](https://platform.openai.com/docs/guides/function-calling).\n              items:\n                anyOf:\n                  - $ref: '#/components/schemas/ChatCompletionTool'\n                  - $ref: '#/components/schemas/CustomToolChatCompletions'\n                x-stainless-naming:\n                  python:\n                    model_name: chat_completion_tool_union\n                    param_model_name: chat_completion_tool_union_param\n                discriminator:\n                  propertyName: type\n                x-stainless-go-variant-constructor:\n                  naming: chat_completion_{variant}_tool\n            tool_choice:\n              $ref: '#/components/schemas/ChatCompletionToolChoiceOption'\n            parallel_tool_calls:\n              $ref: '#/components/schemas/ParallelToolCalls'\n            function_call:\n              deprecated: true\n              description: |\n                Deprecated in favor of `tool_choice`.\n\n                Controls which (if any) function is called by the model.\n\n                `none` means the model will not call a function and instead generates a\n                message.\n\n                `auto` means the model can pick between generating a message or calling a\n                function.\n\n                Specifying a particular function via `{\"name\": \"my_function\"}` forces the\n                model to call that function.\n\n                `none` is the default when no functions are present. `auto` is the default\n                if functions are present.\n              anyOf:\n                - type: string\n                  description: >\n                    `none` means the model will not call a function and instead generates a message. `auto`\n                    means the model can pick between generating a message or calling a function.\n                  enum:\n                    - none\n                    - auto\n                  title: function call mode\n                - $ref: '#/components/schemas/ChatCompletionFunctionCallOption'\n            functions:\n              deprecated: true\n              description: |\n                Deprecated in favor of `tools`.\n\n                A list of functions the model may generate JSON inputs for.\n              type: array\n              minItems: 1\n              maxItems: 128\n              items:\n                $ref: '#/components/schemas/ChatCompletionFunctions'\n          required:\n            - model\n            - messages\n    CreateChatCompletionResponse:\n      type: object\n      description: Represents a chat completion response returned by model, based on the provided input.\n      properties:\n        id:\n          type: string\n          description: A unique identifier for the chat completion.\n        choices:\n          type: array\n          description: A list of chat completion choices. Can be more than one if `n` is greater than 1.\n          items:\n            type: object\n            required:\n              - finish_reason\n              - index\n              - message\n              - logprobs\n            properties:\n              finish_reason:\n                type: string\n                description: >\n                  The reason the model stopped generating tokens. This will be `stop` if the model hit a\n                  natural stop point or a provided stop sequence,\n\n                  `length` if the maximum number of tokens specified in the request was reached,\n\n                  `content_filter` if content was omitted due to a flag from our content filters,\n\n                  `tool_calls` if the model called a tool, or `function_call` (deprecated) if the model called\n                  a function.\n                enum:\n                  - stop\n                  - length\n                  - tool_calls\n                  - content_filter\n                  - function_call\n              index:\n                type: integer\n                description: The index of the choice in the list of choices.\n              message:\n                $ref: '#/components/schemas/ChatCompletionResponseMessage'\n              logprobs:\n                description: Log probability information for the choice.\n                type: object\n                nullable: true\n                properties:\n                  content:\n                    description: A list of message content tokens with log probability information.\n                    type: array\n                    items:\n                      $ref: '#/components/schemas/ChatCompletionTokenLogprob'\n                    nullable: true\n                  refusal:\n                    description: A list of message refusal tokens with log probability information.\n                    type: array\n                    items:\n                      $ref: '#/components/schemas/ChatCompletionTokenLogprob'\n                    nullable: true\n                required:\n                  - content\n                  - refusal\n        created:\n          type: integer\n          description: The Unix timestamp (in seconds) of when the chat completion was created.\n        model:\n          type: string\n          description: The model used for the chat completion.\n        service_tier:\n          $ref: '#/components/schemas/ServiceTier'\n        system_fingerprint:\n          type: string\n          deprecated: true\n          description: >\n            This fingerprint represents the backend configuration that the model runs with.\n\n\n            Can be used in conjunction with the `seed` request parameter to understand when backend changes\n            have been made that might impact determinism.\n        object:\n          type: string\n          description: The object type, which is always `chat.completion`.\n          enum:\n            - chat.completion\n          x-stainless-const: true\n        usage:\n          $ref: '#/components/schemas/CompletionUsage'\n      required:\n        - choices\n        - created\n        - id\n        - model\n        - object\n      x-oaiMeta:\n        name: The chat completion object\n        group: chat\n        example: |\n          {\n            \"id\": \"chatcmpl-B9MHDbslfkBeAs8l4bebGdFOJ6PeG\",\n            \"object\": \"chat.completion\",\n            \"created\": 1741570283,\n            \"model\": \"gpt-4o-2024-08-06\",\n            \"choices\": [\n              {\n                \"index\": 0,\n                \"message\": {\n                  \"role\": \"assistant\",\n                  \"content\": \"The image shows a wooden boardwalk path running through a lush green field or meadow. The sky is bright blue with some scattered clouds, giving the scene a serene and peaceful atmosphere. Trees and shrubs are visible in the background.\",\n                  \"refusal\": null,\n                  \"annotations\": []\n                },\n                \"logprobs\": null,\n                \"finish_reason\": \"stop\"\n              }\n            ],\n            \"usage\": {\n              \"prompt_tokens\": 1117,\n              \"completion_tokens\": 46,\n              \"total_tokens\": 1163,\n              \"prompt_tokens_details\": {\n                \"cached_tokens\": 0,\n                \"audio_tokens\": 0\n              },\n              \"completion_tokens_details\": {\n                \"reasoning_tokens\": 0,\n                \"audio_tokens\": 0,\n                \"accepted_prediction_tokens\": 0,\n                \"rejected_prediction_tokens\": 0\n              }\n            },\n            \"service_tier\": \"default\",\n            \"system_fingerprint\": \"fp_fc9f1d7035\"\n          }\n    CreateChatCompletionStreamResponse:\n      type: object\n      description: |\n        Represents a streamed chunk of a chat completion response returned\n        by the model, based on the provided input.\n        [Learn more](https://platform.openai.com/docs/guides/streaming-responses).\n      properties:\n        id:\n          type: string\n          description: A unique identifier for the chat completion. Each chunk has the same ID.\n        choices:\n          type: array\n          description: >\n            A list of chat completion choices. Can contain more than one elements if `n` is greater than 1.\n            Can also be empty for the\n\n            last chunk if you set `stream_options: {\"include_usage\": true}`.\n          items:\n            type: object\n            required:\n              - delta\n              - finish_reason\n              - index\n            properties:\n              delta:\n                $ref: '#/components/schemas/ChatCompletionStreamResponseDelta'\n              logprobs:\n                description: Log probability information for the choice.\n                type: object\n                nullable: true\n                properties:\n                  content:\n                    description: A list of message content tokens with log probability information.\n                    type: array\n                    items:\n                      $ref: '#/components/schemas/ChatCompletionTokenLogprob'\n                    nullable: true\n                  refusal:\n                    description: A list of message refusal tokens with log probability information.\n                    type: array\n                    items:\n                      $ref: '#/components/schemas/ChatCompletionTokenLogprob'\n                    nullable: true\n                required:\n                  - content\n                  - refusal\n              finish_reason:\n                type: string\n                description: >\n                  The reason the model stopped generating tokens. This will be `stop` if the model hit a\n                  natural stop point or a provided stop sequence,\n\n                  `length` if the maximum number of tokens specified in the request was reached,\n\n                  `content_filter` if content was omitted due to a flag from our content filters,\n\n                  `tool_calls` if the model called a tool, or `function_call` (deprecated) if the model called\n                  a function.\n                enum:\n                  - stop\n                  - length\n                  - tool_calls\n                  - content_filter\n                  - function_call\n                nullable: true\n              index:\n                type: integer\n                description: The index of the choice in the list of choices.\n        created:\n          type: integer\n          description: >-\n            The Unix timestamp (in seconds) of when the chat completion was created. Each chunk has the same\n            timestamp.\n        model:\n          type: string\n          description: The model to generate the completion.\n        service_tier:\n          $ref: '#/components/schemas/ServiceTier'\n        system_fingerprint:\n          type: string\n          deprecated: true\n          description: >\n            This fingerprint represents the backend configuration that the model runs with.\n\n            Can be used in conjunction with the `seed` request parameter to understand when backend changes\n            have been made that might impact determinism.\n        object:\n          type: string\n          description: The object type, which is always `chat.completion.chunk`.\n          enum:\n            - chat.completion.chunk\n          x-stainless-const: true\n        usage:\n          $ref: '#/components/schemas/CompletionUsage'\n          nullable: true\n          description: |\n            An optional field that will only be present when you set\n            `stream_options: {\"include_usage\": true}` in your request. When present, it\n            contains a null value **except for the last chunk** which contains the\n            token usage statistics for the entire request.\n\n            **NOTE:** If the stream is interrupted or cancelled, you may not\n            receive the final usage chunk which contains the total token usage for\n            the request.\n      required:\n        - choices\n        - created\n        - id\n        - model\n        - object\n      x-oaiMeta:\n        name: The chat completion chunk object\n        group: chat\n        example: >\n          {\"id\":\"chatcmpl-123\",\"object\":\"chat.completion.chunk\",\"created\":1694268190,\"model\":\"gpt-4o-mini\",\n          \"system_fingerprint\": \"fp_44709d6fcb\",\n          \"choices\":[{\"index\":0,\"delta\":{\"role\":\"assistant\",\"content\":\"\"},\"logprobs\":null,\"finish_reason\":null}]}\n\n\n          {\"id\":\"chatcmpl-123\",\"object\":\"chat.completion.chunk\",\"created\":1694268190,\"model\":\"gpt-4o-mini\",\n          \"system_fingerprint\": \"fp_44709d6fcb\",\n          \"choices\":[{\"index\":0,\"delta\":{\"content\":\"Hello\"},\"logprobs\":null,\"finish_reason\":null}]}\n\n\n          ....\n\n\n          {\"id\":\"chatcmpl-123\",\"object\":\"chat.completion.chunk\",\"created\":1694268190,\"model\":\"gpt-4o-mini\",\n          \"system_fingerprint\": \"fp_44709d6fcb\",\n          \"choices\":[{\"index\":0,\"delta\":{},\"logprobs\":null,\"finish_reason\":\"stop\"}]}\n    CreateCompletionRequest:\n      type: object\n      properties:\n        model:\n          description: >\n            ID of the model to use. You can use the [List\n            models](https://platform.openai.com/docs/api-reference/models/list) API to see all of your\n            available models, or see our [Model overview](https://platform.openai.com/docs/models) for\n            descriptions of them.\n          anyOf:\n            - type: string\n            - type: string\n              enum:\n                - gpt-3.5-turbo-instruct\n                - davinci-002\n                - babbage-002\n              title: Preset\n          x-oaiTypeLabel: string\n        prompt:\n          description: >\n            The prompt(s) to generate completions for, encoded as a string, array of strings, array of tokens,\n            or array of token arrays.\n\n\n            Note that <|endoftext|> is the document separator that the model sees during training, so if a\n            prompt is not specified the model will generate as if from the beginning of a new document.\n          nullable: true\n          anyOf:\n            - type: string\n              default: ''\n              example: This is a test.\n            - type: array\n              items:\n                type: string\n                default: ''\n                example: This is a test.\n              title: Array of strings\n            - type: array\n              minItems: 1\n              items:\n                type: integer\n              title: Array of tokens\n            - type: array\n              minItems: 1\n              items:\n                type: array\n                minItems: 1\n                items:\n                  type: integer\n              title: Array of token arrays\n        best_of:\n          type: integer\n          default: 1\n          minimum: 0\n          maximum: 20\n          nullable: true\n          description: >\n            Generates `best_of` completions server-side and returns the \"best\" (the one with the highest log\n            probability per token). Results cannot be streamed.\n\n\n            When used with `n`, `best_of` controls the number of candidate completions and `n` specifies how\n            many to return – `best_of` must be greater than `n`.\n\n\n            **Note:** Because this parameter generates many completions, it can quickly consume your token\n            quota. Use carefully and ensure that you have reasonable settings for `max_tokens` and `stop`.\n        echo:\n          type: boolean\n          default: false\n          nullable: true\n          description: |\n            Echo back the prompt in addition to the completion\n        frequency_penalty:\n          type: number\n          default: 0\n          minimum: -2\n          maximum: 2\n          nullable: true\n          description: >\n            Number between -2.0 and 2.0. Positive values penalize new tokens based on their existing frequency\n            in the text so far, decreasing the model's likelihood to repeat the same line verbatim.\n\n\n            [See more information about frequency and presence\n            penalties.](https://platform.openai.com/docs/guides/text-generation)\n        logit_bias:\n          type: object\n          x-oaiTypeLabel: map\n          default: null\n          nullable: true\n          additionalProperties:\n            type: integer\n          description: >\n            Modify the likelihood of specified tokens appearing in the completion.\n\n\n            Accepts a JSON object that maps tokens (specified by their token ID in the GPT tokenizer) to an\n            associated bias value from -100 to 100. You can use this [tokenizer tool](/tokenizer?view=bpe) to\n            convert text to token IDs. Mathematically, the bias is added to the logits generated by the model\n            prior to sampling. The exact effect will vary per model, but values between -1 and 1 should\n            decrease or increase likelihood of selection; values like -100 or 100 should result in a ban or\n            exclusive selection of the relevant token.\n\n\n            As an example, you can pass `{\"50256\": -100}` to prevent the <|endoftext|> token from being\n            generated.\n        logprobs:\n          type: integer\n          minimum: 0\n          maximum: 5\n          default: null\n          nullable: true\n          description: >\n            Include the log probabilities on the `logprobs` most likely output tokens, as well the chosen\n            tokens. For example, if `logprobs` is 5, the API will return a list of the 5 most likely tokens.\n            The API will always return the `logprob` of the sampled token, so there may be up to `logprobs+1`\n            elements in the response.\n\n\n            The maximum value for `logprobs` is 5.\n        max_tokens:\n          type: integer\n          minimum: 0\n          default: 16\n          example: 16\n          nullable: true\n          description: >\n            The maximum number of [tokens](/tokenizer) that can be generated in the completion.\n\n\n            The token count of your prompt plus `max_tokens` cannot exceed the model's context length.\n            [Example Python code](https://cookbook.openai.com/examples/how_to_count_tokens_with_tiktoken) for\n            counting tokens.\n        'n':\n          type: integer\n          minimum: 1\n          maximum: 128\n          default: 1\n          example: 1\n          nullable: true\n          description: >\n            How many completions to generate for each prompt.\n\n\n            **Note:** Because this parameter generates many completions, it can quickly consume your token\n            quota. Use carefully and ensure that you have reasonable settings for `max_tokens` and `stop`.\n        presence_penalty:\n          type: number\n          default: 0\n          minimum: -2\n          maximum: 2\n          nullable: true\n          description: >\n            Number between -2.0 and 2.0. Positive values penalize new tokens based on whether they appear in\n            the text so far, increasing the model's likelihood to talk about new topics.\n\n\n            [See more information about frequency and presence\n            penalties.](https://platform.openai.com/docs/guides/text-generation)\n        seed:\n          type: integer\n          format: int64\n          nullable: true\n          description: >\n            If specified, our system will make a best effort to sample deterministically, such that repeated\n            requests with the same `seed` and parameters should return the same result.\n\n\n            Determinism is not guaranteed, and you should refer to the `system_fingerprint` response parameter\n            to monitor changes in the backend.\n        stop:\n          $ref: '#/components/schemas/StopConfiguration'\n        stream:\n          description: >\n            Whether to stream back partial progress. If set, tokens will be sent as data-only [server-sent\n            events](https://developer.mozilla.org/en-US/docs/Web/API/Server-sent_events/Using_server-sent_events#Event_stream_format)\n            as they become available, with the stream terminated by a `data: [DONE]` message. [Example Python\n            code](https://cookbook.openai.com/examples/how_to_stream_completions).\n          type: boolean\n          nullable: true\n          default: false\n        stream_options:\n          $ref: '#/components/schemas/ChatCompletionStreamOptions'\n        suffix:\n          description: |\n            The suffix that comes after a completion of inserted text.\n\n            This parameter is only supported for `gpt-3.5-turbo-instruct`.\n          default: null\n          nullable: true\n          type: string\n          example: test.\n        temperature:\n          type: number\n          minimum: 0\n          maximum: 2\n          default: 1\n          example: 1\n          nullable: true\n          description: >\n            What sampling temperature to use, between 0 and 2. Higher values like 0.8 will make the output\n            more random, while lower values like 0.2 will make it more focused and deterministic.\n\n\n            We generally recommend altering this or `top_p` but not both.\n        top_p:\n          type: number\n          minimum: 0\n          maximum: 1\n          default: 1\n          example: 1\n          nullable: true\n          description: >\n            An alternative to sampling with temperature, called nucleus sampling, where the model considers\n            the results of the tokens with top_p probability mass. So 0.1 means only the tokens comprising the\n            top 10% probability mass are considered.\n\n\n            We generally recommend altering this or `temperature` but not both.\n        user:\n          type: string\n          example: user-1234\n          description: >\n            A unique identifier representing your end-user, which can help OpenAI to monitor and detect abuse.\n            [Learn more](https://platform.openai.com/docs/guides/safety-best-practices#end-user-ids).\n      required:\n        - model\n        - prompt\n    CreateCompletionResponse:\n      type: object\n      description: >\n        Represents a completion response from the API. Note: both the streamed and non-streamed response\n        objects share the same shape (unlike the chat endpoint).\n      properties:\n        id:\n          type: string\n          description: A unique identifier for the completion.\n        choices:\n          type: array\n          description: The list of completion choices the model generated for the input prompt.\n          items:\n            type: object\n            required:\n              - finish_reason\n              - index\n              - logprobs\n              - text\n            properties:\n              finish_reason:\n                type: string\n                description: >\n                  The reason the model stopped generating tokens. This will be `stop` if the model hit a\n                  natural stop point or a provided stop sequence,\n\n                  `length` if the maximum number of tokens specified in the request was reached,\n\n                  or `content_filter` if content was omitted due to a flag from our content filters.\n                enum:\n                  - stop\n                  - length\n                  - content_filter\n              index:\n                type: integer\n              logprobs:\n                type: object\n                nullable: true\n                properties:\n                  text_offset:\n                    type: array\n                    items:\n                      type: integer\n                  token_logprobs:\n                    type: array\n                    items:\n                      type: number\n                  tokens:\n                    type: array\n                    items:\n                      type: string\n                  top_logprobs:\n                    type: array\n                    items:\n                      type: object\n                      additionalProperties:\n                        type: number\n              text:\n                type: string\n        created:\n          type: integer\n          description: The Unix timestamp (in seconds) of when the completion was created.\n        model:\n          type: string\n          description: The model used for completion.\n        system_fingerprint:\n          type: string\n          description: >\n            This fingerprint represents the backend configuration that the model runs with.\n\n\n            Can be used in conjunction with the `seed` request parameter to understand when backend changes\n            have been made that might impact determinism.\n        object:\n          type: string\n          description: The object type, which is always \"text_completion\"\n          enum:\n            - text_completion\n          x-stainless-const: true\n        usage:\n          $ref: '#/components/schemas/CompletionUsage'\n      required:\n        - id\n        - object\n        - created\n        - model\n        - choices\n      x-oaiMeta:\n        name: The completion object\n        legacy: true\n        example: |\n          {\n            \"id\": \"cmpl-uqkvlQyYK7bGYrRHQ0eXlWi7\",\n            \"object\": \"text_completion\",\n            \"created\": 1589478378,\n            \"model\": \"gpt-4-turbo\",\n            \"choices\": [\n              {\n                \"text\": \"\\n\\nThis is indeed a test\",\n                \"index\": 0,\n                \"logprobs\": null,\n                \"finish_reason\": \"length\"\n              }\n            ],\n            \"usage\": {\n              \"prompt_tokens\": 5,\n              \"completion_tokens\": 7,\n              \"total_tokens\": 12\n            }\n          }\n    CreateContainerBody:\n      type: object\n      properties:\n        name:\n          type: string\n          description: Name of the container to create.\n        file_ids:\n          type: array\n          description: IDs of files to copy to the container.\n          items:\n            type: string\n        expires_after:\n          type: object\n          description: Container expiration time in seconds relative to the 'anchor' time.\n          properties:\n            anchor:\n              type: string\n              enum:\n                - last_active_at\n              description: Time anchor for the expiration time. Currently only 'last_active_at' is supported.\n            minutes:\n              type: integer\n          required:\n            - anchor\n            - minutes\n      required:\n        - name\n    CreateContainerFileBody:\n      type: object\n      properties:\n        file_id:\n          type: string\n          description: Name of the file to create.\n        file:\n          description: |\n            The File object (not file name) to be uploaded.\n          type: string\n          format: binary\n      required: []\n    CreateEmbeddingRequest:\n      type: object\n      additionalProperties: false\n      properties:\n        input:\n          description: >\n            Input text to embed, encoded as a string or array of tokens. To embed multiple inputs in a single\n            request, pass an array of strings or array of token arrays. The input must not exceed the max\n            input tokens for the model (8192 tokens for all embedding models), cannot be an empty string, and\n            any array must be 2048 dimensions or less. [Example Python\n            code](https://cookbook.openai.com/examples/how_to_count_tokens_with_tiktoken) for counting tokens.\n            In addition to the per-input token limit, all embedding  models enforce a maximum of 300,000\n            tokens summed across all inputs in a  single request.\n          example: The quick brown fox jumped over the lazy dog\n          anyOf:\n            - type: string\n              title: string\n              description: The string that will be turned into an embedding.\n              default: ''\n              example: This is a test.\n            - type: array\n              title: Array of strings\n              description: The array of strings that will be turned into an embedding.\n              minItems: 1\n              maxItems: 2048\n              items:\n                type: string\n                default: ''\n                example: \"['This is a test.']\"\n            - type: array\n              title: Array of tokens\n              description: The array of integers that will be turned into an embedding.\n              minItems: 1\n              maxItems: 2048\n              items:\n                type: integer\n            - type: array\n              title: Array of token arrays\n              description: The array of arrays containing integers that will be turned into an embedding.\n              minItems: 1\n              maxItems: 2048\n              items:\n                type: array\n                minItems: 1\n                items:\n                  type: integer\n        model:\n          description: >\n            ID of the model to use. You can use the [List\n            models](https://platform.openai.com/docs/api-reference/models/list) API to see all of your\n            available models, or see our [Model overview](https://platform.openai.com/docs/models) for\n            descriptions of them.\n          example: text-embedding-3-small\n          anyOf:\n            - type: string\n            - type: string\n              enum:\n                - text-embedding-ada-002\n                - text-embedding-3-small\n                - text-embedding-3-large\n              x-stainless-nominal: false\n          x-oaiTypeLabel: string\n        encoding_format:\n          description: >-\n            The format to return the embeddings in. Can be either `float` or\n            [`base64`](https://pypi.org/project/pybase64/).\n          example: float\n          default: float\n          type: string\n          enum:\n            - float\n            - base64\n        dimensions:\n          description: >\n            The number of dimensions the resulting output embeddings should have. Only supported in\n            `text-embedding-3` and later models.\n          type: integer\n          minimum: 1\n        user:\n          type: string\n          example: user-1234\n          description: >\n            A unique identifier representing your end-user, which can help OpenAI to monitor and detect abuse.\n            [Learn more](https://platform.openai.com/docs/guides/safety-best-practices#end-user-ids).\n      required:\n        - model\n        - input\n    CreateEmbeddingResponse:\n      type: object\n      properties:\n        data:\n          type: array\n          description: The list of embeddings generated by the model.\n          items:\n            $ref: '#/components/schemas/Embedding'\n        model:\n          type: string\n          description: The name of the model used to generate the embedding.\n        object:\n          type: string\n          description: The object type, which is always \"list\".\n          enum:\n            - list\n          x-stainless-const: true\n        usage:\n          type: object\n          description: The usage information for the request.\n          properties:\n            prompt_tokens:\n              type: integer\n              description: The number of tokens used by the prompt.\n            total_tokens:\n              type: integer\n              description: The total number of tokens used by the request.\n          required:\n            - prompt_tokens\n            - total_tokens\n      required:\n        - object\n        - model\n        - data\n        - usage\n    CreateEvalCompletionsRunDataSource:\n      type: object\n      title: CompletionsRunDataSource\n      description: |\n        A CompletionsRunDataSource object describing a model sampling configuration.\n      properties:\n        type:\n          type: string\n          enum:\n            - completions\n          default: completions\n          description: The type of run data source. Always `completions`.\n        input_messages:\n          description: >-\n            Used when sampling from a model. Dictates the structure of the messages passed into the model. Can\n            either be a reference to a prebuilt trajectory (ie, `item.input_trajectory`), or a template with\n            variable references to the `item` namespace.\n          anyOf:\n            - type: object\n              title: TemplateInputMessages\n              properties:\n                type:\n                  type: string\n                  enum:\n                    - template\n                  description: The type of input messages. Always `template`.\n                template:\n                  type: array\n                  description: >-\n                    A list of chat messages forming the prompt or context. May include variable references to\n                    the `item` namespace, ie {{item.name}}.\n                  items:\n                    anyOf:\n                      - $ref: '#/components/schemas/EasyInputMessage'\n                      - $ref: '#/components/schemas/EvalItem'\n                    discriminator:\n                      propertyName: type\n              required:\n                - type\n                - template\n            - type: object\n              title: ItemReferenceInputMessages\n              properties:\n                type:\n                  type: string\n                  enum:\n                    - item_reference\n                  description: The type of input messages. Always `item_reference`.\n                item_reference:\n                  type: string\n                  description: A reference to a variable in the `item` namespace. Ie, \"item.input_trajectory\"\n              required:\n                - type\n                - item_reference\n          discriminator:\n            propertyName: type\n        sampling_params:\n          type: object\n          properties:\n            temperature:\n              type: number\n              description: A higher temperature increases randomness in the outputs.\n              default: 1\n            max_completion_tokens:\n              type: integer\n              description: The maximum number of tokens in the generated output.\n            top_p:\n              type: number\n              description: An alternative to temperature for nucleus sampling; 1.0 includes all tokens.\n              default: 1\n            seed:\n              type: integer\n              description: A seed value to initialize the randomness, during sampling.\n              default: 42\n            response_format:\n              description: |\n                An object specifying the format that the model must output.\n\n                Setting to `{ \"type\": \"json_schema\", \"json_schema\": {...} }` enables\n                Structured Outputs which ensures the model will match your supplied JSON\n                schema. Learn more in the [Structured Outputs\n                guide](https://platform.openai.com/docs/guides/structured-outputs).\n\n                Setting to `{ \"type\": \"json_object\" }` enables the older JSON mode, which\n                ensures the message the model generates is valid JSON. Using `json_schema`\n                is preferred for models that support it.\n              anyOf:\n                - $ref: '#/components/schemas/ResponseFormatText'\n                - $ref: '#/components/schemas/ResponseFormatJsonSchema'\n                - $ref: '#/components/schemas/ResponseFormatJsonObject'\n            tools:\n              type: array\n              description: >\n                A list of tools the model may call. Currently, only functions are supported as a tool. Use\n                this to provide a list of functions the model may generate JSON inputs for. A max of 128\n                functions are supported.\n              items:\n                $ref: '#/components/schemas/ChatCompletionTool'\n        model:\n          type: string\n          description: The name of the model to use for generating completions (e.g. \"o3-mini\").\n        source:\n          description: Determines what populates the `item` namespace in this run's data source.\n          anyOf:\n            - $ref: '#/components/schemas/EvalJsonlFileContentSource'\n            - $ref: '#/components/schemas/EvalJsonlFileIdSource'\n            - $ref: '#/components/schemas/EvalStoredCompletionsSource'\n          discriminator:\n            propertyName: type\n      required:\n        - type\n        - source\n      x-oaiMeta:\n        name: The completions data source object used to configure an individual run\n        group: eval runs\n        example: |\n          {\n            \"name\": \"gpt-4o-mini-2024-07-18\",\n            \"data_source\": {\n              \"type\": \"completions\",\n              \"input_messages\": {\n                \"type\": \"item_reference\",\n                \"item_reference\": \"item.input\"\n              },\n              \"model\": \"gpt-4o-mini-2024-07-18\",\n              \"source\": {\n                \"type\": \"stored_completions\",\n                \"model\": \"gpt-4o-mini-2024-07-18\"\n              }\n            }\n          }\n    CreateEvalCustomDataSourceConfig:\n      type: object\n      title: CustomDataSourceConfig\n      description: >\n        A CustomDataSourceConfig object that defines the schema for the data source used for the evaluation\n        runs.\n\n        This schema is used to define the shape of the data that will be:\n\n        - Used to define your testing criteria and\n\n        - What data is required when creating a run\n      properties:\n        type:\n          type: string\n          enum:\n            - custom\n          default: custom\n          description: The type of data source. Always `custom`.\n          x-stainless-const: true\n        item_schema:\n          type: object\n          description: The json schema for each row in the data source.\n          additionalProperties: true\n        include_sample_schema:\n          type: boolean\n          default: false\n          description: >-\n            Whether the eval should expect you to populate the sample namespace (ie, by generating responses\n            off of your data source)\n      required:\n        - item_schema\n        - type\n      x-oaiMeta:\n        name: The eval file data source config object\n        group: evals\n        example: |\n          {\n            \"type\": \"custom\",\n            \"item_schema\": {\n              \"type\": \"object\",\n              \"properties\": {\n                \"name\": {\"type\": \"string\"},\n                \"age\": {\"type\": \"integer\"}\n              },\n              \"required\": [\"name\", \"age\"]\n            },\n            \"include_sample_schema\": true\n          }\n    CreateEvalItem:\n      title: CreateEvalItem\n      description: >-\n        A chat message that makes up the prompt or context. May include variable references to the `item`\n        namespace, ie {{item.name}}.\n      type: object\n      x-oaiMeta:\n        name: The chat message object used to configure an individual run\n      anyOf:\n        - type: object\n          title: SimpleInputMessage\n          properties:\n            role:\n              type: string\n              description: The role of the message (e.g. \"system\", \"assistant\", \"user\").\n            content:\n              type: string\n              description: The content of the message.\n          required:\n            - role\n            - content\n        - $ref: '#/components/schemas/EvalItem'\n    CreateEvalJsonlRunDataSource:\n      type: object\n      title: JsonlRunDataSource\n      description: |\n        A JsonlRunDataSource object with that specifies a JSONL file that matches the eval\n      properties:\n        type:\n          type: string\n          enum:\n            - jsonl\n          default: jsonl\n          description: The type of data source. Always `jsonl`.\n          x-stainless-const: true\n        source:\n          description: Determines what populates the `item` namespace in the data source.\n          anyOf:\n            - $ref: '#/components/schemas/EvalJsonlFileContentSource'\n            - $ref: '#/components/schemas/EvalJsonlFileIdSource'\n          discriminator:\n            propertyName: type\n      required:\n        - type\n        - source\n      x-oaiMeta:\n        name: The file data source object for the eval run configuration\n        group: evals\n        example: |\n          {\n           \"type\": \"jsonl\",\n           \"source\": {\n             \"type\": \"file_id\",\n             \"id\": \"file-9GYS6xbkWgWhmE7VoLUWFg\"\n           }\n          }\n    CreateEvalLabelModelGrader:\n      type: object\n      title: LabelModelGrader\n      description: |\n        A LabelModelGrader object which uses a model to assign labels to each item\n        in the evaluation.\n      properties:\n        type:\n          description: The object type, which is always `label_model`.\n          type: string\n          enum:\n            - label_model\n          x-stainless-const: true\n        name:\n          type: string\n          description: The name of the grader.\n        model:\n          type: string\n          description: The model to use for the evaluation. Must support structured outputs.\n        input:\n          type: array\n          description: >-\n            A list of chat messages forming the prompt or context. May include variable references to the\n            `item` namespace, ie {{item.name}}.\n          items:\n            $ref: '#/components/schemas/CreateEvalItem'\n        labels:\n          type: array\n          items:\n            type: string\n          description: The labels to classify to each item in the evaluation.\n        passing_labels:\n          type: array\n          items:\n            type: string\n          description: The labels that indicate a passing result. Must be a subset of labels.\n      required:\n        - type\n        - model\n        - input\n        - passing_labels\n        - labels\n        - name\n      x-oaiMeta:\n        name: The eval label model grader object\n        group: evals\n        example: |\n          {\n            \"type\": \"label_model\",\n            \"model\": \"gpt-4o-2024-08-06\",\n            \"input\": [\n              {\n                \"role\": \"system\",\n                \"content\": \"Classify the sentiment of the following statement as one of 'positive', 'neutral', or 'negative'\"\n              },\n              {\n                \"role\": \"user\",\n                \"content\": \"Statement: {{item.response}}\"\n              }\n            ],\n            \"passing_labels\": [\"positive\"],\n            \"labels\": [\"positive\", \"neutral\", \"negative\"],\n            \"name\": \"Sentiment label grader\"\n          }\n    CreateEvalLogsDataSourceConfig:\n      type: object\n      title: LogsDataSourceConfig\n      description: |\n        A data source config which specifies the metadata property of your logs query.\n        This is usually metadata like `usecase=chatbot` or `prompt-version=v2`, etc.\n      properties:\n        type:\n          type: string\n          enum:\n            - logs\n          default: logs\n          description: The type of data source. Always `logs`.\n          x-stainless-const: true\n        metadata:\n          type: object\n          description: Metadata filters for the logs data source.\n          additionalProperties: true\n      required:\n        - type\n      x-oaiMeta:\n        name: The logs data source object for evals\n        group: evals\n        example: |\n          {\n            \"type\": \"logs\",\n            \"metadata\": {\n              \"use_case\": \"customer_support_agent\"\n            }\n          }\n    CreateEvalRequest:\n      type: object\n      title: CreateEvalRequest\n      properties:\n        name:\n          type: string\n          description: The name of the evaluation.\n        metadata:\n          $ref: '#/components/schemas/Metadata'\n        data_source_config:\n          type: object\n          description: >-\n            The configuration for the data source used for the evaluation runs. Dictates the schema of the\n            data used in the evaluation.\n          anyOf:\n            - $ref: '#/components/schemas/CreateEvalCustomDataSourceConfig'\n            - $ref: '#/components/schemas/CreateEvalLogsDataSourceConfig'\n            - $ref: '#/components/schemas/CreateEvalStoredCompletionsDataSourceConfig'\n          discriminator:\n            propertyName: type\n        testing_criteria:\n          type: array\n          description: >-\n            A list of graders for all eval runs in this group. Graders can reference variables in the data\n            source using double curly braces notation, like `{{item.variable_name}}`. To reference the model's\n            output, use the `sample` namespace (ie, `{{sample.output_text}}`).\n          items:\n            anyOf:\n              - $ref: '#/components/schemas/CreateEvalLabelModelGrader'\n              - $ref: '#/components/schemas/EvalGraderStringCheck'\n              - $ref: '#/components/schemas/EvalGraderTextSimilarity'\n              - $ref: '#/components/schemas/EvalGraderPython'\n              - $ref: '#/components/schemas/EvalGraderScoreModel'\n            discriminator:\n              propertyName: type\n      required:\n        - data_source_config\n        - testing_criteria\n    CreateEvalResponsesRunDataSource:\n      type: object\n      title: ResponsesRunDataSource\n      description: |\n        A ResponsesRunDataSource object describing a model sampling configuration.\n      properties:\n        type:\n          type: string\n          enum:\n            - responses\n          default: responses\n          description: The type of run data source. Always `responses`.\n        input_messages:\n          description: >-\n            Used when sampling from a model. Dictates the structure of the messages passed into the model. Can\n            either be a reference to a prebuilt trajectory (ie, `item.input_trajectory`), or a template with\n            variable references to the `item` namespace.\n          anyOf:\n            - type: object\n              title: InputMessagesTemplate\n              properties:\n                type:\n                  type: string\n                  enum:\n                    - template\n                  description: The type of input messages. Always `template`.\n                template:\n                  type: array\n                  description: >-\n                    A list of chat messages forming the prompt or context. May include variable references to\n                    the `item` namespace, ie {{item.name}}.\n                  items:\n                    anyOf:\n                      - type: object\n                        title: ChatMessage\n                        properties:\n                          role:\n                            type: string\n                            description: The role of the message (e.g. \"system\", \"assistant\", \"user\").\n                          content:\n                            type: string\n                            description: The content of the message.\n                        required:\n                          - role\n                          - content\n                      - $ref: '#/components/schemas/EvalItem'\n              required:\n                - type\n                - template\n            - type: object\n              title: InputMessagesItemReference\n              properties:\n                type:\n                  type: string\n                  enum:\n                    - item_reference\n                  description: The type of input messages. Always `item_reference`.\n                item_reference:\n                  type: string\n                  description: A reference to a variable in the `item` namespace. Ie, \"item.name\"\n              required:\n                - type\n                - item_reference\n          discriminator:\n            propertyName: type\n        sampling_params:\n          type: object\n          properties:\n            temperature:\n              type: number\n              description: A higher temperature increases randomness in the outputs.\n              default: 1\n            max_completion_tokens:\n              type: integer\n              description: The maximum number of tokens in the generated output.\n            top_p:\n              type: number\n              description: An alternative to temperature for nucleus sampling; 1.0 includes all tokens.\n              default: 1\n            seed:\n              type: integer\n              description: A seed value to initialize the randomness, during sampling.\n              default: 42\n            tools:\n              type: array\n              description: |\n                An array of tools the model may call while generating a response. You\n                can specify which tool to use by setting the `tool_choice` parameter.\n\n                The two categories of tools you can provide the model are:\n\n                - **Built-in tools**: Tools that are provided by OpenAI that extend the\n                  model's capabilities, like [web search](https://platform.openai.com/docs/guides/tools-web-search)\n                  or [file search](https://platform.openai.com/docs/guides/tools-file-search). Learn more about\n                  [built-in tools](https://platform.openai.com/docs/guides/tools).\n                - **Function calls (custom tools)**: Functions that are defined by you,\n                  enabling the model to call your own code. Learn more about\n                  [function calling](https://platform.openai.com/docs/guides/function-calling).\n              items:\n                $ref: '#/components/schemas/Tool'\n            text:\n              type: object\n              description: |\n                Configuration options for a text response from the model. Can be plain\n                text or structured JSON data. Learn more:\n                - [Text inputs and outputs](https://platform.openai.com/docs/guides/text)\n                - [Structured Outputs](https://platform.openai.com/docs/guides/structured-outputs)\n              properties:\n                format:\n                  $ref: '#/components/schemas/TextResponseFormatConfiguration'\n        model:\n          type: string\n          description: The name of the model to use for generating completions (e.g. \"o3-mini\").\n        source:\n          description: Determines what populates the `item` namespace in this run's data source.\n          anyOf:\n            - $ref: '#/components/schemas/EvalJsonlFileContentSource'\n            - $ref: '#/components/schemas/EvalJsonlFileIdSource'\n            - $ref: '#/components/schemas/EvalResponsesSource'\n          discriminator:\n            propertyName: type\n      required:\n        - type\n        - source\n      x-oaiMeta:\n        name: The completions data source object used to configure an individual run\n        group: eval runs\n        example: |\n          {\n            \"name\": \"gpt-4o-mini-2024-07-18\",\n            \"data_source\": {\n              \"type\": \"responses\",\n              \"input_messages\": {\n                \"type\": \"item_reference\",\n                \"item_reference\": \"item.input\"\n              },\n              \"model\": \"gpt-4o-mini-2024-07-18\",\n              \"source\": {\n                \"type\": \"responses\",\n                \"model\": \"gpt-4o-mini-2024-07-18\"\n              }\n            }\n          }\n    CreateEvalRunRequest:\n      type: object\n      title: CreateEvalRunRequest\n      properties:\n        name:\n          type: string\n          description: The name of the run.\n        metadata:\n          $ref: '#/components/schemas/Metadata'\n        data_source:\n          type: object\n          description: Details about the run's data source.\n          anyOf:\n            - $ref: '#/components/schemas/CreateEvalJsonlRunDataSource'\n            - $ref: '#/components/schemas/CreateEvalCompletionsRunDataSource'\n            - $ref: '#/components/schemas/CreateEvalResponsesRunDataSource'\n      required:\n        - data_source\n    CreateEvalStoredCompletionsDataSourceConfig:\n      type: object\n      title: StoredCompletionsDataSourceConfig\n      description: |\n        Deprecated in favor of LogsDataSourceConfig.\n      properties:\n        type:\n          type: string\n          enum:\n            - stored_completions\n          default: stored_completions\n          description: The type of data source. Always `stored_completions`.\n          x-stainless-const: true\n        metadata:\n          type: object\n          description: Metadata filters for the stored completions data source.\n          additionalProperties: true\n      required:\n        - type\n      deprecated: true\n      x-oaiMeta:\n        name: The stored completions data source object for evals\n        group: evals\n        example: |\n          {\n            \"type\": \"stored_completions\",\n            \"metadata\": {\n              \"use_case\": \"customer_support_agent\"\n            }\n          }\n    CreateFileRequest:\n      type: object\n      additionalProperties: false\n      properties:\n        file:\n          description: |\n            The File object (not file name) to be uploaded.\n          type: string\n          format: binary\n          x-oaiMeta:\n            exampleFilePath: fine-tune.jsonl\n        purpose:\n          $ref: '#/components/schemas/FilePurpose'\n        expires_after:\n          $ref: '#/components/schemas/FileExpirationAfter'\n      required:\n        - file\n        - purpose\n    CreateFineTuningCheckpointPermissionRequest:\n      type: object\n      additionalProperties: false\n      properties:\n        project_ids:\n          type: array\n          description: The project identifiers to grant access to.\n          items:\n            type: string\n      required:\n        - project_ids\n    CreateFineTuningJobRequest:\n      type: object\n      properties:\n        model:\n          description: >\n            The name of the model to fine-tune. You can select one of the\n\n            [supported\n            models](https://platform.openai.com/docs/guides/fine-tuning#which-models-can-be-fine-tuned).\n          example: gpt-4o-mini\n          anyOf:\n            - type: string\n            - type: string\n              enum:\n                - babbage-002\n                - davinci-002\n                - gpt-3.5-turbo\n                - gpt-4o-mini\n              title: Preset\n          x-oaiTypeLabel: string\n        training_file:\n          description: >\n            The ID of an uploaded file that contains training data.\n\n\n            See [upload file](https://platform.openai.com/docs/api-reference/files/create) for how to upload a\n            file.\n\n\n            Your dataset must be formatted as a JSONL file. Additionally, you must upload your file with the\n            purpose `fine-tune`.\n\n\n            The contents of the file should differ depending on if the model uses the\n            [chat](https://platform.openai.com/docs/api-reference/fine-tuning/chat-input),\n            [completions](https://platform.openai.com/docs/api-reference/fine-tuning/completions-input)\n            format, or if the fine-tuning method uses the\n            [preference](https://platform.openai.com/docs/api-reference/fine-tuning/preference-input) format.\n\n\n            See the [fine-tuning guide](https://platform.openai.com/docs/guides/model-optimization) for more\n            details.\n          type: string\n          example: file-abc123\n        hyperparameters:\n          type: object\n          description: >\n            The hyperparameters used for the fine-tuning job.\n\n            This value is now deprecated in favor of `method`, and should be passed in under the `method`\n            parameter.\n          properties:\n            batch_size:\n              description: |\n                Number of examples in each batch. A larger batch size means that model parameters\n                are updated less frequently, but with lower variance.\n              default: auto\n              anyOf:\n                - type: string\n                  enum:\n                    - auto\n                  x-stainless-const: true\n                  title: Auto\n                - type: integer\n                  minimum: 1\n                  maximum: 256\n            learning_rate_multiplier:\n              description: |\n                Scaling factor for the learning rate. A smaller learning rate may be useful to avoid\n                overfitting.\n              anyOf:\n                - type: string\n                  enum:\n                    - auto\n                  x-stainless-const: true\n                  title: Auto\n                - type: number\n                  minimum: 0\n                  exclusiveMinimum: true\n            n_epochs:\n              description: |\n                The number of epochs to train the model for. An epoch refers to one full cycle\n                through the training dataset.\n              default: auto\n              anyOf:\n                - type: string\n                  enum:\n                    - auto\n                  x-stainless-const: true\n                  title: Auto\n                - type: integer\n                  minimum: 1\n                  maximum: 50\n          deprecated: true\n        suffix:\n          description: >\n            A string of up to 64 characters that will be added to your fine-tuned model name.\n\n\n            For example, a `suffix` of \"custom-model-name\" would produce a model name like\n            `ft:gpt-4o-mini:openai:custom-model-name:7p4lURel`.\n          type: string\n          minLength: 1\n          maxLength: 64\n          default: null\n          nullable: true\n        validation_file:\n          description: >\n            The ID of an uploaded file that contains validation data.\n\n\n            If you provide this file, the data is used to generate validation\n\n            metrics periodically during fine-tuning. These metrics can be viewed in\n\n            the fine-tuning results file.\n\n            The same data should not be present in both train and validation files.\n\n\n            Your dataset must be formatted as a JSONL file. You must upload your file with the purpose\n            `fine-tune`.\n\n\n            See the [fine-tuning guide](https://platform.openai.com/docs/guides/model-optimization) for more\n            details.\n          type: string\n          nullable: true\n          example: file-abc123\n        integrations:\n          type: array\n          description: A list of integrations to enable for your fine-tuning job.\n          nullable: true\n          items:\n            type: object\n            required:\n              - type\n              - wandb\n            properties:\n              type:\n                description: >\n                  The type of integration to enable. Currently, only \"wandb\" (Weights and Biases) is\n                  supported.\n                anyOf:\n                  - type: string\n                    enum:\n                      - wandb\n                    x-stainless-const: true\n              wandb:\n                type: object\n                description: >\n                  The settings for your integration with Weights and Biases. This payload specifies the\n                  project that\n\n                  metrics will be sent to. Optionally, you can set an explicit display name for your run, add\n                  tags\n\n                  to your run, and set a default entity (team, username, etc) to be associated with your run.\n                required:\n                  - project\n                properties:\n                  project:\n                    description: |\n                      The name of the project that the new run will be created under.\n                    type: string\n                    example: my-wandb-project\n                  name:\n                    description: |\n                      A display name to set for the run. If not set, we will use the Job ID as the name.\n                    nullable: true\n                    type: string\n                  entity:\n                    description: >\n                      The entity to use for the run. This allows you to set the team or username of the WandB\n                      user that you would\n\n                      like associated with the run. If not set, the default entity for the registered WandB\n                      API key is used.\n                    nullable: true\n                    type: string\n                  tags:\n                    description: >\n                      A list of tags to be attached to the newly created run. These tags are passed through\n                      directly to WandB. Some\n\n                      default tags are generated by OpenAI: \"openai/finetune\", \"openai/{base-model}\",\n                      \"openai/{ftjob-abcdef}\".\n                    type: array\n                    items:\n                      type: string\n                      example: custom-tag\n        seed:\n          description: >\n            The seed controls the reproducibility of the job. Passing in the same seed and job parameters\n            should produce the same results, but may differ in rare cases.\n\n            If a seed is not specified, one will be generated for you.\n          type: integer\n          nullable: true\n          minimum: 0\n          maximum: 2147483647\n          example: 42\n        method:\n          $ref: '#/components/schemas/FineTuneMethod'\n        metadata:\n          $ref: '#/components/schemas/Metadata'\n      required:\n        - model\n        - training_file\n    CreateImageEditRequest:\n      type: object\n      properties:\n        image:\n          anyOf:\n            - type: string\n              format: binary\n            - type: array\n              maxItems: 16\n              items:\n                type: string\n                format: binary\n          description: |\n            The image(s) to edit. Must be a supported image file or an array of images.\n\n            For `gpt-image-1`, each image should be a `png`, `webp`, or `jpg` file less\n            than 50MB. You can provide up to 16 images.\n\n            For `dall-e-2`, you can only provide one image, and it should be a square\n            `png` file less than 4MB.\n          x-oaiMeta:\n            exampleFilePath: otter.png\n        prompt:\n          description: >-\n            A text description of the desired image(s). The maximum length is 1000 characters for `dall-e-2`,\n            and 32000 characters for `gpt-image-1`.\n          type: string\n          example: A cute baby sea otter wearing a beret\n        mask:\n          description: >-\n            An additional image whose fully transparent areas (e.g. where alpha is zero) indicate where\n            `image` should be edited. If there are multiple images provided, the mask will be applied on the\n            first image. Must be a valid PNG file, less than 4MB, and have the same dimensions as `image`.\n          type: string\n          format: binary\n          x-oaiMeta:\n            exampleFilePath: mask.png\n        background:\n          type: string\n          enum:\n            - transparent\n            - opaque\n            - auto\n          default: auto\n          example: transparent\n          nullable: true\n          description: |\n            Allows to set transparency for the background of the generated image(s).\n            This parameter is only supported for `gpt-image-1`. Must be one of\n            `transparent`, `opaque` or `auto` (default value). When `auto` is used, the\n            model will automatically determine the best background for the image.\n\n            If `transparent`, the output format needs to support transparency, so it\n            should be set to either `png` (default value) or `webp`.\n        model:\n          anyOf:\n            - type: string\n            - type: string\n              enum:\n                - dall-e-2\n                - gpt-image-1\n              x-stainless-const: true\n          x-oaiTypeLabel: string\n          nullable: true\n          description: >-\n            The model to use for image generation. Only `dall-e-2` and `gpt-image-1` are supported. Defaults\n            to `dall-e-2` unless a parameter specific to `gpt-image-1` is used.\n        'n':\n          type: integer\n          minimum: 1\n          maximum: 10\n          default: 1\n          example: 1\n          nullable: true\n          description: The number of images to generate. Must be between 1 and 10.\n        size:\n          type: string\n          enum:\n            - 256x256\n            - 512x512\n            - 1024x1024\n            - 1536x1024\n            - 1024x1536\n            - auto\n          default: 1024x1024\n          example: 1024x1024\n          nullable: true\n          description: >-\n            The size of the generated images. Must be one of `1024x1024`, `1536x1024` (landscape), `1024x1536`\n            (portrait), or `auto` (default value) for `gpt-image-1`, and one of `256x256`, `512x512`, or\n            `1024x1024` for `dall-e-2`.\n        response_format:\n          type: string\n          enum:\n            - url\n            - b64_json\n          default: url\n          example: url\n          nullable: true\n          description: >-\n            The format in which the generated images are returned. Must be one of `url` or `b64_json`. URLs\n            are only valid for 60 minutes after the image has been generated. This parameter is only supported\n            for `dall-e-2`, as `gpt-image-1` will always return base64-encoded images.\n        output_format:\n          type: string\n          enum:\n            - png\n            - jpeg\n            - webp\n          default: png\n          example: png\n          nullable: true\n          description: |\n            The format in which the generated images are returned. This parameter is\n            only supported for `gpt-image-1`. Must be one of `png`, `jpeg`, or `webp`.\n            The default value is `png`.\n        output_compression:\n          type: integer\n          default: 100\n          example: 100\n          nullable: true\n          description: |\n            The compression level (0-100%) for the generated images. This parameter\n            is only supported for `gpt-image-1` with the `webp` or `jpeg` output\n            formats, and defaults to 100.\n        user:\n          type: string\n          example: user-1234\n          description: >\n            A unique identifier representing your end-user, which can help OpenAI to monitor and detect abuse.\n            [Learn more](https://platform.openai.com/docs/guides/safety-best-practices#end-user-ids).\n        input_fidelity:\n          $ref: '#/components/schemas/ImageInputFidelity'\n        stream:\n          type: boolean\n          default: false\n          example: false\n          nullable: true\n          description: >\n            Edit the image in streaming mode. Defaults to `false`. See the\n\n            [Image generation guide](https://platform.openai.com/docs/guides/image-generation) for more\n            information.\n        partial_images:\n          $ref: '#/components/schemas/PartialImages'\n        quality:\n          type: string\n          enum:\n            - standard\n            - low\n            - medium\n            - high\n            - auto\n          default: auto\n          example: high\n          nullable: true\n          description: >\n            The quality of the image that will be generated. `high`, `medium` and `low` are only supported for\n            `gpt-image-1`. `dall-e-2` only supports `standard` quality. Defaults to `auto`.\n      required:\n        - prompt\n        - image\n    CreateImageRequest:\n      type: object\n      properties:\n        prompt:\n          description: >-\n            A text description of the desired image(s). The maximum length is 32000 characters for\n            `gpt-image-1`, 1000 characters for `dall-e-2` and 4000 characters for `dall-e-3`.\n          type: string\n          example: A cute baby sea otter\n        model:\n          anyOf:\n            - type: string\n            - type: string\n              enum:\n                - dall-e-2\n                - dall-e-3\n                - gpt-image-1\n              x-stainless-nominal: false\n          x-oaiTypeLabel: string\n          nullable: true\n          description: >-\n            The model to use for image generation. One of `dall-e-2`, `dall-e-3`, or `gpt-image-1`. Defaults\n            to `dall-e-2` unless a parameter specific to `gpt-image-1` is used.\n        'n':\n          type: integer\n          minimum: 1\n          maximum: 10\n          default: 1\n          example: 1\n          nullable: true\n          description: >-\n            The number of images to generate. Must be between 1 and 10. For `dall-e-3`, only `n=1` is\n            supported.\n        quality:\n          type: string\n          enum:\n            - standard\n            - hd\n            - low\n            - medium\n            - high\n            - auto\n          default: auto\n          example: medium\n          nullable: true\n          description: |\n            The quality of the image that will be generated.\n\n            - `auto` (default value) will automatically select the best quality for the given model.\n            - `high`, `medium` and `low` are supported for `gpt-image-1`.\n            - `hd` and `standard` are supported for `dall-e-3`.\n            - `standard` is the only option for `dall-e-2`.\n        response_format:\n          type: string\n          enum:\n            - url\n            - b64_json\n          default: url\n          example: url\n          nullable: true\n          description: >-\n            The format in which generated images with `dall-e-2` and `dall-e-3` are returned. Must be one of\n            `url` or `b64_json`. URLs are only valid for 60 minutes after the image has been generated. This\n            parameter isn't supported for `gpt-image-1` which will always return base64-encoded images.\n        output_format:\n          type: string\n          enum:\n            - png\n            - jpeg\n            - webp\n          default: png\n          example: png\n          nullable: true\n          description: >-\n            The format in which the generated images are returned. This parameter is only supported for\n            `gpt-image-1`. Must be one of `png`, `jpeg`, or `webp`.\n        output_compression:\n          type: integer\n          default: 100\n          example: 100\n          nullable: true\n          description: >-\n            The compression level (0-100%) for the generated images. This parameter is only supported for\n            `gpt-image-1` with the `webp` or `jpeg` output formats, and defaults to 100.\n        stream:\n          type: boolean\n          default: false\n          example: false\n          nullable: true\n          description: >\n            Generate the image in streaming mode. Defaults to `false`. See the\n\n            [Image generation guide](https://platform.openai.com/docs/guides/image-generation) for more\n            information.\n\n            This parameter is only supported for `gpt-image-1`.\n        partial_images:\n          $ref: '#/components/schemas/PartialImages'\n        size:\n          type: string\n          enum:\n            - auto\n            - 1024x1024\n            - 1536x1024\n            - 1024x1536\n            - 256x256\n            - 512x512\n            - 1792x1024\n            - 1024x1792\n          default: auto\n          example: 1024x1024\n          nullable: true\n          description: >-\n            The size of the generated images. Must be one of `1024x1024`, `1536x1024` (landscape), `1024x1536`\n            (portrait), or `auto` (default value) for `gpt-image-1`, one of `256x256`, `512x512`, or\n            `1024x1024` for `dall-e-2`, and one of `1024x1024`, `1792x1024`, or `1024x1792` for `dall-e-3`.\n        moderation:\n          type: string\n          enum:\n            - low\n            - auto\n          default: auto\n          example: low\n          nullable: true\n          description: >-\n            Control the content-moderation level for images generated by `gpt-image-1`. Must be either `low`\n            for less restrictive filtering or `auto` (default value).\n        background:\n          type: string\n          enum:\n            - transparent\n            - opaque\n            - auto\n          default: auto\n          example: transparent\n          nullable: true\n          description: |\n            Allows to set transparency for the background of the generated image(s).\n            This parameter is only supported for `gpt-image-1`. Must be one of\n            `transparent`, `opaque` or `auto` (default value). When `auto` is used, the\n            model will automatically determine the best background for the image.\n\n            If `transparent`, the output format needs to support transparency, so it\n            should be set to either `png` (default value) or `webp`.\n        style:\n          type: string\n          enum:\n            - vivid\n            - natural\n          default: vivid\n          example: vivid\n          nullable: true\n          description: >-\n            The style of the generated images. This parameter is only supported for `dall-e-3`. Must be one of\n            `vivid` or `natural`. Vivid causes the model to lean towards generating hyper-real and dramatic\n            images. Natural causes the model to produce more natural, less hyper-real looking images.\n        user:\n          type: string\n          example: user-1234\n          description: >\n            A unique identifier representing your end-user, which can help OpenAI to monitor and detect abuse.\n            [Learn more](https://platform.openai.com/docs/guides/safety-best-practices#end-user-ids).\n      required:\n        - prompt\n    CreateImageVariationRequest:\n      type: object\n      properties:\n        image:\n          description: >-\n            The image to use as the basis for the variation(s). Must be a valid PNG file, less than 4MB, and\n            square.\n          type: string\n          format: binary\n          x-oaiMeta:\n            exampleFilePath: otter.png\n        model:\n          anyOf:\n            - type: string\n            - type: string\n              enum:\n                - dall-e-2\n              x-stainless-const: true\n          x-oaiTypeLabel: string\n          nullable: true\n          description: The model to use for image generation. Only `dall-e-2` is supported at this time.\n        'n':\n          type: integer\n          minimum: 1\n          maximum: 10\n          default: 1\n          example: 1\n          nullable: true\n          description: The number of images to generate. Must be between 1 and 10.\n        response_format:\n          type: string\n          enum:\n            - url\n            - b64_json\n          default: url\n          example: url\n          nullable: true\n          description: >-\n            The format in which the generated images are returned. Must be one of `url` or `b64_json`. URLs\n            are only valid for 60 minutes after the image has been generated.\n        size:\n          type: string\n          enum:\n            - 256x256\n            - 512x512\n            - 1024x1024\n          default: 1024x1024\n          example: 1024x1024\n          nullable: true\n          description: The size of the generated images. Must be one of `256x256`, `512x512`, or `1024x1024`.\n        user:\n          type: string\n          example: user-1234\n          description: >\n            A unique identifier representing your end-user, which can help OpenAI to monitor and detect abuse.\n            [Learn more](https://platform.openai.com/docs/guides/safety-best-practices#end-user-ids).\n      required:\n        - image\n    CreateMessageRequest:\n      type: object\n      additionalProperties: false\n      required:\n        - role\n        - content\n      properties:\n        role:\n          type: string\n          enum:\n            - user\n            - assistant\n          description: >\n            The role of the entity that is creating the message. Allowed values include:\n\n            - `user`: Indicates the message is sent by an actual user and should be used in most cases to\n            represent user-generated messages.\n\n            - `assistant`: Indicates the message is generated by the assistant. Use this value to insert\n            messages from the assistant into the conversation.\n        content:\n          anyOf:\n            - type: string\n              description: The text contents of the message.\n              title: Text content\n            - type: array\n              description: >-\n                An array of content parts with a defined type, each can be of type `text` or images can be\n                passed with `image_url` or `image_file`. Image types are only supported on [Vision-compatible\n                models](https://platform.openai.com/docs/models).\n              title: Array of content parts\n              items:\n                anyOf:\n                  - $ref: '#/components/schemas/MessageContentImageFileObject'\n                  - $ref: '#/components/schemas/MessageContentImageUrlObject'\n                  - $ref: '#/components/schemas/MessageRequestContentTextObject'\n                discriminator:\n                  propertyName: type\n              minItems: 1\n        attachments:\n          type: array\n          items:\n            type: object\n            properties:\n              file_id:\n                type: string\n                description: The ID of the file to attach to the message.\n              tools:\n                description: The tools to add this file to.\n                type: array\n                items:\n                  anyOf:\n                    - $ref: '#/components/schemas/AssistantToolsCode'\n                    - $ref: '#/components/schemas/AssistantToolsFileSearchTypeOnly'\n                  discriminator:\n                    propertyName: type\n          description: A list of files attached to the message, and the tools they should be added to.\n          required:\n            - file_id\n            - tools\n          nullable: true\n        metadata:\n          $ref: '#/components/schemas/Metadata'\n    CreateModelResponseProperties:\n      allOf:\n        - $ref: '#/components/schemas/ModelResponseProperties'\n        - type: object\n          properties:\n            top_logprobs:\n              description: |\n                An integer between 0 and 20 specifying the number of most likely tokens to\n                return at each token position, each with an associated log probability.\n              type: integer\n              minimum: 0\n              maximum: 20\n    CreateModerationRequest:\n      type: object\n      properties:\n        input:\n          description: |\n            Input (or inputs) to classify. Can be a single string, an array of strings, or\n            an array of multi-modal input objects similar to other models.\n          anyOf:\n            - type: string\n              description: A string of text to classify for moderation.\n              default: ''\n              example: I want to kill them.\n            - type: array\n              description: An array of strings to classify for moderation.\n              items:\n                type: string\n                default: ''\n                example: I want to kill them.\n            - type: array\n              description: An array of multi-modal inputs to the moderation model.\n              items:\n                anyOf:\n                  - $ref: '#/components/schemas/ModerationImageURLInput'\n                  - $ref: '#/components/schemas/ModerationTextInput'\n                discriminator:\n                  propertyName: type\n              title: Moderation Multi Modal Array\n        model:\n          description: |\n            The content moderation model you would like to use. Learn more in\n            [the moderation guide](https://platform.openai.com/docs/guides/moderation), and learn about\n            available models [here](https://platform.openai.com/docs/models#moderation).\n          nullable: false\n          anyOf:\n            - type: string\n            - type: string\n              enum:\n                - omni-moderation-latest\n                - omni-moderation-2024-09-26\n                - text-moderation-latest\n                - text-moderation-stable\n              x-stainless-nominal: false\n          x-oaiTypeLabel: string\n      required:\n        - input\n    CreateModerationResponse:\n      type: object\n      description: Represents if a given text input is potentially harmful.\n      properties:\n        id:\n          type: string\n          description: The unique identifier for the moderation request.\n        model:\n          type: string\n          description: The model used to generate the moderation results.\n        results:\n          type: array\n          description: A list of moderation objects.\n          items:\n            type: object\n            properties:\n              flagged:\n                type: boolean\n                description: Whether any of the below categories are flagged.\n              categories:\n                type: object\n                description: A list of the categories, and whether they are flagged or not.\n                properties:\n                  hate:\n                    type: boolean\n                    description: >-\n                      Content that expresses, incites, or promotes hate based on race, gender, ethnicity,\n                      religion, nationality, sexual orientation, disability status, or caste. Hateful content\n                      aimed at non-protected groups (e.g., chess players) is harassment.\n                  hate/threatening:\n                    type: boolean\n                    description: >-\n                      Hateful content that also includes violence or serious harm towards the targeted group\n                      based on race, gender, ethnicity, religion, nationality, sexual orientation, disability\n                      status, or caste.\n                  harassment:\n                    type: boolean\n                    description: Content that expresses, incites, or promotes harassing language towards any target.\n                  harassment/threatening:\n                    type: boolean\n                    description: Harassment content that also includes violence or serious harm towards any target.\n                  illicit:\n                    type: boolean\n                    nullable: true\n                    description: >-\n                      Content that includes instructions or advice that facilitate the planning or execution\n                      of wrongdoing, or that gives advice or instruction on how to commit illicit acts. For\n                      example, \"how to shoplift\" would fit this category.\n                  illicit/violent:\n                    type: boolean\n                    nullable: true\n                    description: >-\n                      Content that includes instructions or advice that facilitate the planning or execution\n                      of wrongdoing that also includes violence, or that gives advice or instruction on the\n                      procurement of any weapon.\n                  self-harm:\n                    type: boolean\n                    description: >-\n                      Content that promotes, encourages, or depicts acts of self-harm, such as suicide,\n                      cutting, and eating disorders.\n                  self-harm/intent:\n                    type: boolean\n                    description: >-\n                      Content where the speaker expresses that they are engaging or intend to engage in acts\n                      of self-harm, such as suicide, cutting, and eating disorders.\n                  self-harm/instructions:\n                    type: boolean\n                    description: >-\n                      Content that encourages performing acts of self-harm, such as suicide, cutting, and\n                      eating disorders, or that gives instructions or advice on how to commit such acts.\n                  sexual:\n                    type: boolean\n                    description: >-\n                      Content meant to arouse sexual excitement, such as the description of sexual activity,\n                      or that promotes sexual services (excluding sex education and wellness).\n                  sexual/minors:\n                    type: boolean\n                    description: Sexual content that includes an individual who is under 18 years old.\n                  violence:\n                    type: boolean\n                    description: Content that depicts death, violence, or physical injury.\n                  violence/graphic:\n                    type: boolean\n                    description: Content that depicts death, violence, or physical injury in graphic detail.\n                required:\n                  - hate\n                  - hate/threatening\n                  - harassment\n                  - harassment/threatening\n                  - illicit\n                  - illicit/violent\n                  - self-harm\n                  - self-harm/intent\n                  - self-harm/instructions\n                  - sexual\n                  - sexual/minors\n                  - violence\n                  - violence/graphic\n              category_scores:\n                type: object\n                description: A list of the categories along with their scores as predicted by model.\n                properties:\n                  hate:\n                    type: number\n                    description: The score for the category 'hate'.\n                  hate/threatening:\n                    type: number\n                    description: The score for the category 'hate/threatening'.\n                  harassment:\n                    type: number\n                    description: The score for the category 'harassment'.\n                  harassment/threatening:\n                    type: number\n                    description: The score for the category 'harassment/threatening'.\n                  illicit:\n                    type: number\n                    description: The score for the category 'illicit'.\n                  illicit/violent:\n                    type: number\n                    description: The score for the category 'illicit/violent'.\n                  self-harm:\n                    type: number\n                    description: The score for the category 'self-harm'.\n                  self-harm/intent:\n                    type: number\n                    description: The score for the category 'self-harm/intent'.\n                  self-harm/instructions:\n                    type: number\n                    description: The score for the category 'self-harm/instructions'.\n                  sexual:\n                    type: number\n                    description: The score for the category 'sexual'.\n                  sexual/minors:\n                    type: number\n                    description: The score for the category 'sexual/minors'.\n                  violence:\n                    type: number\n                    description: The score for the category 'violence'.\n                  violence/graphic:\n                    type: number\n                    description: The score for the category 'violence/graphic'.\n                required:\n                  - hate\n                  - hate/threatening\n                  - harassment\n                  - harassment/threatening\n                  - illicit\n                  - illicit/violent\n                  - self-harm\n                  - self-harm/intent\n                  - self-harm/instructions\n                  - sexual\n                  - sexual/minors\n                  - violence\n                  - violence/graphic\n              category_applied_input_types:\n                type: object\n                description: A list of the categories along with the input type(s) that the score applies to.\n                properties:\n                  hate:\n                    type: array\n                    description: The applied input type(s) for the category 'hate'.\n                    items:\n                      type: string\n                      enum:\n                        - text\n                      x-stainless-const: true\n                  hate/threatening:\n                    type: array\n                    description: The applied input type(s) for the category 'hate/threatening'.\n                    items:\n                      type: string\n                      enum:\n                        - text\n                      x-stainless-const: true\n                  harassment:\n                    type: array\n                    description: The applied input type(s) for the category 'harassment'.\n                    items:\n                      type: string\n                      enum:\n                        - text\n                      x-stainless-const: true\n                  harassment/threatening:\n                    type: array\n                    description: The applied input type(s) for the category 'harassment/threatening'.\n                    items:\n                      type: string\n                      enum:\n                        - text\n                      x-stainless-const: true\n                  illicit:\n                    type: array\n                    description: The applied input type(s) for the category 'illicit'.\n                    items:\n                      type: string\n                      enum:\n                        - text\n                      x-stainless-const: true\n                  illicit/violent:\n                    type: array\n                    description: The applied input type(s) for the category 'illicit/violent'.\n                    items:\n                      type: string\n                      enum:\n                        - text\n                      x-stainless-const: true\n                  self-harm:\n                    type: array\n                    description: The applied input type(s) for the category 'self-harm'.\n                    items:\n                      type: string\n                      enum:\n                        - text\n                        - image\n                  self-harm/intent:\n                    type: array\n                    description: The applied input type(s) for the category 'self-harm/intent'.\n                    items:\n                      type: string\n                      enum:\n                        - text\n                        - image\n                  self-harm/instructions:\n                    type: array\n                    description: The applied input type(s) for the category 'self-harm/instructions'.\n                    items:\n                      type: string\n                      enum:\n                        - text\n                        - image\n                  sexual:\n                    type: array\n                    description: The applied input type(s) for the category 'sexual'.\n                    items:\n                      type: string\n                      enum:\n                        - text\n                        - image\n                  sexual/minors:\n                    type: array\n                    description: The applied input type(s) for the category 'sexual/minors'.\n                    items:\n                      type: string\n                      enum:\n                        - text\n                      x-stainless-const: true\n                  violence:\n                    type: array\n                    description: The applied input type(s) for the category 'violence'.\n                    items:\n                      type: string\n                      enum:\n                        - text\n                        - image\n                  violence/graphic:\n                    type: array\n                    description: The applied input type(s) for the category 'violence/graphic'.\n                    items:\n                      type: string\n                      enum:\n                        - text\n                        - image\n                required:\n                  - hate\n                  - hate/threatening\n                  - harassment\n                  - harassment/threatening\n                  - illicit\n                  - illicit/violent\n                  - self-harm\n                  - self-harm/intent\n                  - self-harm/instructions\n                  - sexual\n                  - sexual/minors\n                  - violence\n                  - violence/graphic\n            required:\n              - flagged\n              - categories\n              - category_scores\n              - category_applied_input_types\n      required:\n        - id\n        - model\n        - results\n      x-oaiMeta:\n        name: The moderation object\n        example: |\n          {\n            \"id\": \"modr-0d9740456c391e43c445bf0f010940c7\",\n            \"model\": \"omni-moderation-latest\",\n            \"results\": [\n              {\n                \"flagged\": true,\n                \"categories\": {\n                  \"harassment\": true,\n                  \"harassment/threatening\": true,\n                  \"sexual\": false,\n                  \"hate\": false,\n                  \"hate/threatening\": false,\n                  \"illicit\": false,\n                  \"illicit/violent\": false,\n                  \"self-harm/intent\": false,\n                  \"self-harm/instructions\": false,\n                  \"self-harm\": false,\n                  \"sexual/minors\": false,\n                  \"violence\": true,\n                  \"violence/graphic\": true\n                },\n                \"category_scores\": {\n                  \"harassment\": 0.8189693396524255,\n                  \"harassment/threatening\": 0.804985420696006,\n                  \"sexual\": 1.573112165348997e-6,\n                  \"hate\": 0.007562942636942845,\n                  \"hate/threatening\": 0.004208854591835476,\n                  \"illicit\": 0.030535955153511665,\n                  \"illicit/violent\": 0.008925306722380033,\n                  \"self-harm/intent\": 0.00023023930975076432,\n                  \"self-harm/instructions\": 0.0002293869201073356,\n                  \"self-harm\": 0.012598046106750154,\n                  \"sexual/minors\": 2.212566909570261e-8,\n                  \"violence\": 0.9999992735124786,\n                  \"violence/graphic\": 0.843064871157054\n                },\n                \"category_applied_input_types\": {\n                  \"harassment\": [\n                    \"text\"\n                  ],\n                  \"harassment/threatening\": [\n                    \"text\"\n                  ],\n                  \"sexual\": [\n                    \"text\",\n                    \"image\"\n                  ],\n                  \"hate\": [\n                    \"text\"\n                  ],\n                  \"hate/threatening\": [\n                    \"text\"\n                  ],\n                  \"illicit\": [\n                    \"text\"\n                  ],\n                  \"illicit/violent\": [\n                    \"text\"\n                  ],\n                  \"self-harm/intent\": [\n                    \"text\",\n                    \"image\"\n                  ],\n                  \"self-harm/instructions\": [\n                    \"text\",\n                    \"image\"\n                  ],\n                  \"self-harm\": [\n                    \"text\",\n                    \"image\"\n                  ],\n                  \"sexual/minors\": [\n                    \"text\"\n                  ],\n                  \"violence\": [\n                    \"text\",\n                    \"image\"\n                  ],\n                  \"violence/graphic\": [\n                    \"text\",\n                    \"image\"\n                  ]\n                }\n              }\n            ]\n          }\n    CreateResponse:\n      allOf:\n        - $ref: '#/components/schemas/CreateModelResponseProperties'\n        - $ref: '#/components/schemas/ResponseProperties'\n        - type: object\n          properties:\n            input:\n              description: |\n                Text, image, or file inputs to the model, used to generate a response.\n\n                Learn more:\n                - [Text inputs and outputs](https://platform.openai.com/docs/guides/text)\n                - [Image inputs](https://platform.openai.com/docs/guides/images)\n                - [File inputs](https://platform.openai.com/docs/guides/pdf-files)\n                - [Conversation state](https://platform.openai.com/docs/guides/conversation-state)\n                - [Function calling](https://platform.openai.com/docs/guides/function-calling)\n              anyOf:\n                - type: string\n                  title: Text input\n                  description: |\n                    A text input to the model, equivalent to a text input with the\n                    `user` role.\n                - type: array\n                  title: Input item list\n                  description: |\n                    A list of one or many input items to the model, containing\n                    different content types.\n                  items:\n                    $ref: '#/components/schemas/InputItem'\n            include:\n              type: array\n              description: |\n                Specify additional output data to include in the model response. Currently\n                supported values are:\n                - `code_interpreter_call.outputs`: Includes the outputs of python code execution\n                  in code interpreter tool call items.\n                - `computer_call_output.output.image_url`: Include image urls from the computer call output.\n                - `file_search_call.results`: Include the search results of\n                  the file search tool call.\n                - `message.input_image.image_url`: Include image urls from the input message.\n                - `message.output_text.logprobs`: Include logprobs with assistant messages.\n                - `reasoning.encrypted_content`: Includes an encrypted version of reasoning\n                  tokens in reasoning item outputs. This enables reasoning items to be used in\n                  multi-turn conversations when using the Responses API statelessly (like\n                  when the `store` parameter is set to `false`, or when an organization is\n                  enrolled in the zero data retention program).\n              items:\n                $ref: '#/components/schemas/Includable'\n              nullable: true\n            parallel_tool_calls:\n              type: boolean\n              description: |\n                Whether to allow the model to run tool calls in parallel.\n              default: true\n              nullable: true\n            store:\n              type: boolean\n              description: |\n                Whether to store the generated model response for later retrieval via\n                API.\n              default: true\n              nullable: true\n            instructions:\n              type: string\n              nullable: true\n              description: |\n                A system (or developer) message inserted into the model's context.\n\n                When using along with `previous_response_id`, the instructions from a previous\n                response will not be carried over to the next response. This makes it simple\n                to swap out system (or developer) messages in new responses.\n            stream:\n              description: >\n                If set to true, the model response data will be streamed to the client\n\n                as it is generated using [server-sent\n                events](https://developer.mozilla.org/en-US/docs/Web/API/Server-sent_events/Using_server-sent_events#Event_stream_format).\n\n                See the [Streaming section\n                below](https://platform.openai.com/docs/api-reference/responses-streaming)\n\n                for more information.\n              type: boolean\n              nullable: true\n              default: false\n            stream_options:\n              $ref: '#/components/schemas/ResponseStreamOptions'\n    CreateRunRequest:\n      type: object\n      additionalProperties: false\n      properties:\n        assistant_id:\n          description: >-\n            The ID of the [assistant](https://platform.openai.com/docs/api-reference/assistants) to use to\n            execute this run.\n          type: string\n        model:\n          description: >-\n            The ID of the [Model](https://platform.openai.com/docs/api-reference/models) to be used to execute\n            this run. If a value is provided here, it will override the model associated with the assistant.\n            If not, the model associated with the assistant will be used.\n          anyOf:\n            - type: string\n            - $ref: '#/components/schemas/AssistantSupportedModels'\n          x-oaiTypeLabel: string\n          nullable: true\n        reasoning_effort:\n          $ref: '#/components/schemas/ReasoningEffort'\n        instructions:\n          description: >-\n            Overrides the\n            [instructions](https://platform.openai.com/docs/api-reference/assistants/createAssistant) of the\n            assistant. This is useful for modifying the behavior on a per-run basis.\n          type: string\n          nullable: true\n        additional_instructions:\n          description: >-\n            Appends additional instructions at the end of the instructions for the run. This is useful for\n            modifying the behavior on a per-run basis without overriding other instructions.\n          type: string\n          nullable: true\n        additional_messages:\n          description: Adds additional messages to the thread before creating the run.\n          type: array\n          items:\n            $ref: '#/components/schemas/CreateMessageRequest'\n          nullable: true\n        tools:\n          description: >-\n            Override the tools the assistant can use for this run. This is useful for modifying the behavior\n            on a per-run basis.\n          nullable: true\n          type: array\n          maxItems: 20\n          items:\n            $ref: '#/components/schemas/AssistantTool'\n        metadata:\n          $ref: '#/components/schemas/Metadata'\n        temperature:\n          type: number\n          minimum: 0\n          maximum: 2\n          default: 1\n          example: 1\n          nullable: true\n          description: >\n            What sampling temperature to use, between 0 and 2. Higher values like 0.8 will make the output\n            more random, while lower values like 0.2 will make it more focused and deterministic.\n        top_p:\n          type: number\n          minimum: 0\n          maximum: 1\n          default: 1\n          example: 1\n          nullable: true\n          description: >\n            An alternative to sampling with temperature, called nucleus sampling, where the model considers\n            the results of the tokens with top_p probability mass. So 0.1 means only the tokens comprising the\n            top 10% probability mass are considered.\n\n\n            We generally recommend altering this or temperature but not both.\n        stream:\n          type: boolean\n          nullable: true\n          description: >\n            If `true`, returns a stream of events that happen during the Run as server-sent events,\n            terminating when the Run enters a terminal state with a `data: [DONE]` message.\n        max_prompt_tokens:\n          type: integer\n          nullable: true\n          description: >\n            The maximum number of prompt tokens that may be used over the course of the run. The run will make\n            a best effort to use only the number of prompt tokens specified, across multiple turns of the run.\n            If the run exceeds the number of prompt tokens specified, the run will end with status\n            `incomplete`. See `incomplete_details` for more info.\n          minimum: 256\n        max_completion_tokens:\n          type: integer\n          nullable: true\n          description: >\n            The maximum number of completion tokens that may be used over the course of the run. The run will\n            make a best effort to use only the number of completion tokens specified, across multiple turns of\n            the run. If the run exceeds the number of completion tokens specified, the run will end with\n            status `incomplete`. See `incomplete_details` for more info.\n          minimum: 256\n        truncation_strategy:\n          allOf:\n            - $ref: '#/components/schemas/TruncationObject'\n            - nullable: true\n        tool_choice:\n          allOf:\n            - $ref: '#/components/schemas/AssistantsApiToolChoiceOption'\n            - nullable: true\n        parallel_tool_calls:\n          $ref: '#/components/schemas/ParallelToolCalls'\n        response_format:\n          $ref: '#/components/schemas/AssistantsApiResponseFormatOption'\n          nullable: true\n      required: &ref_0\n        - assistant_id\n    CreateSpeechRequest:\n      type: object\n      additionalProperties: false\n      properties:\n        model:\n          description: >\n            One of the available [TTS models](https://platform.openai.com/docs/models#tts): `tts-1`,\n            `tts-1-hd` or `gpt-4o-mini-tts`.\n          anyOf:\n            - type: string\n            - type: string\n              enum:\n                - tts-1\n                - tts-1-hd\n                - gpt-4o-mini-tts\n              x-stainless-nominal: false\n          x-oaiTypeLabel: string\n        input:\n          type: string\n          description: The text to generate audio for. The maximum length is 4096 characters.\n          maxLength: 4096\n        instructions:\n          type: string\n          description: >-\n            Control the voice of your generated audio with additional instructions. Does not work with `tts-1`\n            or `tts-1-hd`.\n          maxLength: 4096\n        voice:\n          description: >-\n            The voice to use when generating the audio. Supported voices are `alloy`, `ash`, `ballad`,\n            `coral`, `echo`, `fable`, `onyx`, `nova`, `sage`, `shimmer`, and `verse`. Previews of the voices\n            are available in the [Text to speech\n            guide](https://platform.openai.com/docs/guides/text-to-speech#voice-options).\n          $ref: '#/components/schemas/VoiceIdsShared'\n        response_format:\n          description: The format to audio in. Supported formats are `mp3`, `opus`, `aac`, `flac`, `wav`, and `pcm`.\n          default: mp3\n          type: string\n          enum:\n            - mp3\n            - opus\n            - aac\n            - flac\n            - wav\n            - pcm\n        speed:\n          description: The speed of the generated audio. Select a value from `0.25` to `4.0`. `1.0` is the default.\n          type: number\n          default: 1\n          minimum: 0.25\n          maximum: 4\n        stream_format:\n          description: >-\n            The format to stream the audio in. Supported formats are `sse` and `audio`. `sse` is not supported\n            for `tts-1` or `tts-1-hd`.\n          type: string\n          default: audio\n          enum:\n            - sse\n            - audio\n      required:\n        - model\n        - input\n        - voice\n    CreateSpeechResponseStreamEvent:\n      anyOf:\n        - $ref: '#/components/schemas/SpeechAudioDeltaEvent'\n        - $ref: '#/components/schemas/SpeechAudioDoneEvent'\n      discriminator:\n        propertyName: type\n    CreateThreadAndRunRequest:\n      type: object\n      additionalProperties: false\n      properties:\n        assistant_id:\n          description: >-\n            The ID of the [assistant](https://platform.openai.com/docs/api-reference/assistants) to use to\n            execute this run.\n          type: string\n        thread:\n          $ref: '#/components/schemas/CreateThreadRequest'\n        model:\n          description: >-\n            The ID of the [Model](https://platform.openai.com/docs/api-reference/models) to be used to execute\n            this run. If a value is provided here, it will override the model associated with the assistant.\n            If not, the model associated with the assistant will be used.\n          anyOf:\n            - type: string\n            - type: string\n              enum:\n                - gpt-5\n                - gpt-5-mini\n                - gpt-5-nano\n                - gpt-5-2025-08-07\n                - gpt-5-mini-2025-08-07\n                - gpt-5-nano-2025-08-07\n                - gpt-4.1\n                - gpt-4.1-mini\n                - gpt-4.1-nano\n                - gpt-4.1-2025-04-14\n                - gpt-4.1-mini-2025-04-14\n                - gpt-4.1-nano-2025-04-14\n                - gpt-4o\n                - gpt-4o-2024-11-20\n                - gpt-4o-2024-08-06\n                - gpt-4o-2024-05-13\n                - gpt-4o-mini\n                - gpt-4o-mini-2024-07-18\n                - gpt-4.5-preview\n                - gpt-4.5-preview-2025-02-27\n                - gpt-4-turbo\n                - gpt-4-turbo-2024-04-09\n                - gpt-4-0125-preview\n                - gpt-4-turbo-preview\n                - gpt-4-1106-preview\n                - gpt-4-vision-preview\n                - gpt-4\n                - gpt-4-0314\n                - gpt-4-0613\n                - gpt-4-32k\n                - gpt-4-32k-0314\n                - gpt-4-32k-0613\n                - gpt-3.5-turbo\n                - gpt-3.5-turbo-16k\n                - gpt-3.5-turbo-0613\n                - gpt-3.5-turbo-1106\n                - gpt-3.5-turbo-0125\n                - gpt-3.5-turbo-16k-0613\n          x-oaiTypeLabel: string\n          nullable: true\n        instructions:\n          description: >-\n            Override the default system message of the assistant. This is useful for modifying the behavior on\n            a per-run basis.\n          type: string\n          nullable: true\n        tools:\n          description: >-\n            Override the tools the assistant can use for this run. This is useful for modifying the behavior\n            on a per-run basis.\n          nullable: true\n          type: array\n          maxItems: 20\n          items:\n            $ref: '#/components/schemas/AssistantTool'\n        tool_resources:\n          type: object\n          description: >\n            A set of resources that are used by the assistant's tools. The resources are specific to the type\n            of tool. For example, the `code_interpreter` tool requires a list of file IDs, while the\n            `file_search` tool requires a list of vector store IDs.\n          properties:\n            code_interpreter:\n              type: object\n              properties:\n                file_ids:\n                  type: array\n                  description: >\n                    A list of [file](https://platform.openai.com/docs/api-reference/files) IDs made available\n                    to the `code_interpreter` tool. There can be a maximum of 20 files associated with the\n                    tool.\n                  default: []\n                  maxItems: 20\n                  items:\n                    type: string\n            file_search:\n              type: object\n              properties:\n                vector_store_ids:\n                  type: array\n                  description: >\n                    The ID of the [vector\n                    store](https://platform.openai.com/docs/api-reference/vector-stores/object) attached to\n                    this assistant. There can be a maximum of 1 vector store attached to the assistant.\n                  maxItems: 1\n                  items:\n                    type: string\n          nullable: true\n        metadata:\n          $ref: '#/components/schemas/Metadata'\n        temperature:\n          type: number\n          minimum: 0\n          maximum: 2\n          default: 1\n          example: 1\n          nullable: true\n          description: >\n            What sampling temperature to use, between 0 and 2. Higher values like 0.8 will make the output\n            more random, while lower values like 0.2 will make it more focused and deterministic.\n        top_p:\n          type: number\n          minimum: 0\n          maximum: 1\n          default: 1\n          example: 1\n          nullable: true\n          description: >\n            An alternative to sampling with temperature, called nucleus sampling, where the model considers\n            the results of the tokens with top_p probability mass. So 0.1 means only the tokens comprising the\n            top 10% probability mass are considered.\n\n\n            We generally recommend altering this or temperature but not both.\n        stream:\n          type: boolean\n          nullable: true\n          description: >\n            If `true`, returns a stream of events that happen during the Run as server-sent events,\n            terminating when the Run enters a terminal state with a `data: [DONE]` message.\n        max_prompt_tokens:\n          type: integer\n          nullable: true\n          description: >\n            The maximum number of prompt tokens that may be used over the course of the run. The run will make\n            a best effort to use only the number of prompt tokens specified, across multiple turns of the run.\n            If the run exceeds the number of prompt tokens specified, the run will end with status\n            `incomplete`. See `incomplete_details` for more info.\n          minimum: 256\n        max_completion_tokens:\n          type: integer\n          nullable: true\n          description: >\n            The maximum number of completion tokens that may be used over the course of the run. The run will\n            make a best effort to use only the number of completion tokens specified, across multiple turns of\n            the run. If the run exceeds the number of completion tokens specified, the run will end with\n            status `incomplete`. See `incomplete_details` for more info.\n          minimum: 256\n        truncation_strategy:\n          allOf:\n            - $ref: '#/components/schemas/TruncationObject'\n            - nullable: true\n        tool_choice:\n          allOf:\n            - $ref: '#/components/schemas/AssistantsApiToolChoiceOption'\n            - nullable: true\n        parallel_tool_calls:\n          $ref: '#/components/schemas/ParallelToolCalls'\n        response_format:\n          $ref: '#/components/schemas/AssistantsApiResponseFormatOption'\n          nullable: true\n      required: *ref_0\n    CreateThreadRequest:\n      type: object\n      description: |\n        Options to create a new thread. If no thread is provided when running a\n        request, an empty thread will be created.\n      additionalProperties: false\n      properties:\n        messages:\n          description: >-\n            A list of [messages](https://platform.openai.com/docs/api-reference/messages) to start the thread\n            with.\n          type: array\n          items:\n            $ref: '#/components/schemas/CreateMessageRequest'\n        tool_resources:\n          type: object\n          description: >\n            A set of resources that are made available to the assistant's tools in this thread. The resources\n            are specific to the type of tool. For example, the `code_interpreter` tool requires a list of file\n            IDs, while the `file_search` tool requires a list of vector store IDs.\n          properties:\n            code_interpreter:\n              type: object\n              properties:\n                file_ids:\n                  type: array\n                  description: >\n                    A list of [file](https://platform.openai.com/docs/api-reference/files) IDs made available\n                    to the `code_interpreter` tool. There can be a maximum of 20 files associated with the\n                    tool.\n                  default: []\n                  maxItems: 20\n                  items:\n                    type: string\n            file_search:\n              type: object\n              properties:\n                vector_store_ids:\n                  type: array\n                  description: >\n                    The [vector store](https://platform.openai.com/docs/api-reference/vector-stores/object)\n                    attached to this thread. There can be a maximum of 1 vector store attached to the thread.\n                  maxItems: 1\n                  items:\n                    type: string\n                vector_stores:\n                  type: array\n                  description: >\n                    A helper to create a [vector\n                    store](https://platform.openai.com/docs/api-reference/vector-stores/object) with file_ids\n                    and attach it to this thread. There can be a maximum of 1 vector store attached to the\n                    thread.\n                  maxItems: 1\n                  items:\n                    type: object\n                    properties:\n                      file_ids:\n                        type: array\n                        description: >\n                          A list of [file](https://platform.openai.com/docs/api-reference/files) IDs to add to\n                          the vector store. There can be a maximum of 10000 files in a vector store.\n                        maxItems: 10000\n                        items:\n                          type: string\n                      chunking_strategy:\n                        type: object\n                        description: >-\n                          The chunking strategy used to chunk the file(s). If not set, will use the `auto`\n                          strategy.\n                        anyOf:\n                          - type: object\n                            title: Auto Chunking Strategy\n                            description: >-\n                              The default strategy. This strategy currently uses a `max_chunk_size_tokens` of\n                              `800` and `chunk_overlap_tokens` of `400`.\n                            additionalProperties: false\n                            properties:\n                              type:\n                                type: string\n                                description: Always `auto`.\n                                enum:\n                                  - auto\n                                x-stainless-const: true\n                            required:\n                              - type\n                          - type: object\n                            title: Static Chunking Strategy\n                            additionalProperties: false\n                            properties:\n                              type:\n                                type: string\n                                description: Always `static`.\n                                enum:\n                                  - static\n                                x-stainless-const: true\n                              static:\n                                type: object\n                                additionalProperties: false\n                                properties:\n                                  max_chunk_size_tokens:\n                                    type: integer\n                                    minimum: 100\n                                    maximum: 4096\n                                    description: >-\n                                      The maximum number of tokens in each chunk. The default value is `800`.\n                                      The minimum value is `100` and the maximum value is `4096`.\n                                  chunk_overlap_tokens:\n                                    type: integer\n                                    description: >\n                                      The number of tokens that overlap between chunks. The default value is\n                                      `400`.\n\n\n                                      Note that the overlap must not exceed half of `max_chunk_size_tokens`.\n                                required:\n                                  - max_chunk_size_tokens\n                                  - chunk_overlap_tokens\n                            required:\n                              - type\n                              - static\n                            x-stainless-naming:\n                              java:\n                                type_name: StaticObject\n                              kotlin:\n                                type_name: StaticObject\n                        discriminator:\n                          propertyName: type\n                      metadata:\n                        $ref: '#/components/schemas/Metadata'\n              anyOf:\n                - required:\n                    - vector_store_ids\n                - required:\n                    - vector_stores\n          nullable: true\n        metadata:\n          $ref: '#/components/schemas/Metadata'\n    CreateTranscriptionRequest:\n      type: object\n      additionalProperties: false\n      properties:\n        file:\n          description: >\n            The audio file object (not file name) to transcribe, in one of these formats: flac, mp3, mp4,\n            mpeg, mpga, m4a, ogg, wav, or webm.\n          type: string\n          x-oaiTypeLabel: file\n          format: binary\n          x-oaiMeta:\n            exampleFilePath: speech.mp3\n        model:\n          description: >\n            ID of the model to use. The options are `gpt-4o-transcribe`, `gpt-4o-mini-transcribe`, and\n            `whisper-1` (which is powered by our open source Whisper V2 model).\n          example: gpt-4o-transcribe\n          anyOf:\n            - type: string\n            - type: string\n              enum:\n                - whisper-1\n                - gpt-4o-transcribe\n                - gpt-4o-mini-transcribe\n              x-stainless-const: true\n              x-stainless-nominal: false\n          x-oaiTypeLabel: string\n        language:\n          description: >\n            The language of the input audio. Supplying the input language in\n            [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) (e.g. `en`) format will improve\n            accuracy and latency.\n          type: string\n        prompt:\n          description: >\n            An optional text to guide the model's style or continue a previous audio segment. The\n            [prompt](https://platform.openai.com/docs/guides/speech-to-text#prompting) should match the audio\n            language.\n          type: string\n        response_format:\n          $ref: '#/components/schemas/AudioResponseFormat'\n        temperature:\n          description: >\n            The sampling temperature, between 0 and 1. Higher values like 0.8 will make the output more\n            random, while lower values like 0.2 will make it more focused and deterministic. If set to 0, the\n            model will use [log probability](https://en.wikipedia.org/wiki/Log_probability) to automatically\n            increase the temperature until certain thresholds are hit.\n          type: number\n          default: 0\n        stream:\n          description: >\n            If set to true, the model response data will be streamed to the client\n\n            as it is generated using [server-sent\n            events](https://developer.mozilla.org/en-US/docs/Web/API/Server-sent_events/Using_server-sent_events#Event_stream_format).\n\n            See the [Streaming section of the Speech-to-Text\n            guide](https://platform.openai.com/docs/guides/speech-to-text?lang=curl#streaming-transcriptions)\n\n            for more information.\n\n\n            Note: Streaming is not supported for the `whisper-1` model and will be ignored.\n          type: boolean\n          nullable: true\n          default: false\n        chunking_strategy:\n          $ref: '#/components/schemas/TranscriptionChunkingStrategy'\n        timestamp_granularities:\n          description: >\n            The timestamp granularities to populate for this transcription. `response_format` must be set\n            `verbose_json` to use timestamp granularities. Either or both of these options are supported:\n            `word`, or `segment`. Note: There is no additional latency for segment timestamps, but generating\n            word timestamps incurs additional latency.\n          type: array\n          items:\n            type: string\n            enum:\n              - word\n              - segment\n          default:\n            - segment\n        include:\n          description: |\n            Additional information to include in the transcription response.\n            `logprobs` will return the log probabilities of the tokens in the\n            response to understand the model's confidence in the transcription.\n            `logprobs` only works with response_format set to `json` and only with\n            the models `gpt-4o-transcribe` and `gpt-4o-mini-transcribe`.\n          type: array\n          items:\n            $ref: '#/components/schemas/TranscriptionInclude'\n      required:\n        - file\n        - model\n    CreateTranscriptionResponseJson:\n      type: object\n      description: Represents a transcription response returned by model, based on the provided input.\n      properties:\n        text:\n          type: string\n          description: The transcribed text.\n        logprobs:\n          type: array\n          optional: true\n          description: >\n            The log probabilities of the tokens in the transcription. Only returned with the models\n            `gpt-4o-transcribe` and `gpt-4o-mini-transcribe` if `logprobs` is added to the `include` array.\n          items:\n            type: object\n            properties:\n              token:\n                type: string\n                description: The token in the transcription.\n              logprob:\n                type: number\n                description: The log probability of the token.\n              bytes:\n                type: array\n                items:\n                  type: number\n                description: The bytes of the token.\n        usage:\n          type: object\n          description: Token usage statistics for the request.\n          anyOf:\n            - $ref: '#/components/schemas/TranscriptTextUsageTokens'\n              title: Token Usage\n            - $ref: '#/components/schemas/TranscriptTextUsageDuration'\n              title: Duration Usage\n          discriminator:\n            propertyName: type\n      required:\n        - text\n      x-oaiMeta:\n        name: The transcription object (JSON)\n        group: audio\n        example: |\n          {\n            \"text\": \"Imagine the wildest idea that you've ever had, and you're curious about how it might scale to something that's a 100, a 1,000 times bigger. This is a place where you can get to do that.\",\n            \"usage\": {\n              \"type\": \"tokens\",\n              \"input_tokens\": 14,\n              \"input_token_details\": {\n                \"text_tokens\": 10,\n                \"audio_tokens\": 4\n              },\n              \"output_tokens\": 101,\n              \"total_tokens\": 115\n            }\n          }\n    CreateTranscriptionResponseStreamEvent:\n      anyOf:\n        - $ref: '#/components/schemas/TranscriptTextDeltaEvent'\n        - $ref: '#/components/schemas/TranscriptTextDoneEvent'\n      discriminator:\n        propertyName: type\n    CreateTranscriptionResponseVerboseJson:\n      type: object\n      description: Represents a verbose json transcription response returned by model, based on the provided input.\n      properties:\n        language:\n          type: string\n          description: The language of the input audio.\n        duration:\n          type: number\n          description: The duration of the input audio.\n        text:\n          type: string\n          description: The transcribed text.\n        words:\n          type: array\n          description: Extracted words and their corresponding timestamps.\n          items:\n            $ref: '#/components/schemas/TranscriptionWord'\n        segments:\n          type: array\n          description: Segments of the transcribed text and their corresponding details.\n          items:\n            $ref: '#/components/schemas/TranscriptionSegment'\n        usage:\n          $ref: '#/components/schemas/TranscriptTextUsageDuration'\n      required:\n        - language\n        - duration\n        - text\n      x-oaiMeta:\n        name: The transcription object (Verbose JSON)\n        group: audio\n        example: |\n          {\n            \"task\": \"transcribe\",\n            \"language\": \"english\",\n            \"duration\": 8.470000267028809,\n            \"text\": \"The beach was a popular spot on a hot summer day. People were swimming in the ocean, building sandcastles, and playing beach volleyball.\",\n            \"segments\": [\n              {\n                \"id\": 0,\n                \"seek\": 0,\n                \"start\": 0.0,\n                \"end\": 3.319999933242798,\n                \"text\": \" The beach was a popular spot on a hot summer day.\",\n                \"tokens\": [\n                  50364, 440, 7534, 390, 257, 3743, 4008, 322, 257, 2368, 4266, 786, 13, 50530\n                ],\n                \"temperature\": 0.0,\n                \"avg_logprob\": -0.2860786020755768,\n                \"compression_ratio\": 1.2363636493682861,\n                \"no_speech_prob\": 0.00985979475080967\n              },\n              ...\n            ],\n            \"usage\": {\n              \"type\": \"duration\",\n              \"seconds\": 9\n            }\n          }\n    CreateTranslationRequest:\n      type: object\n      additionalProperties: false\n      properties:\n        file:\n          description: >\n            The audio file object (not file name) translate, in one of these formats: flac, mp3, mp4, mpeg,\n            mpga, m4a, ogg, wav, or webm.\n          type: string\n          x-oaiTypeLabel: file\n          format: binary\n          x-oaiMeta:\n            exampleFilePath: speech.mp3\n        model:\n          description: >\n            ID of the model to use. Only `whisper-1` (which is powered by our open source Whisper V2 model) is\n            currently available.\n          example: whisper-1\n          anyOf:\n            - type: string\n            - type: string\n              enum:\n                - whisper-1\n              x-stainless-const: true\n          x-oaiTypeLabel: string\n        prompt:\n          description: >\n            An optional text to guide the model's style or continue a previous audio segment. The\n            [prompt](https://platform.openai.com/docs/guides/speech-to-text#prompting) should be in English.\n          type: string\n        response_format:\n          description: >\n            The format of the output, in one of these options: `json`, `text`, `srt`, `verbose_json`, or\n            `vtt`.\n          type: string\n          enum:\n            - json\n            - text\n            - srt\n            - verbose_json\n            - vtt\n          default: json\n        temperature:\n          description: >\n            The sampling temperature, between 0 and 1. Higher values like 0.8 will make the output more\n            random, while lower values like 0.2 will make it more focused and deterministic. If set to 0, the\n            model will use [log probability](https://en.wikipedia.org/wiki/Log_probability) to automatically\n            increase the temperature until certain thresholds are hit.\n          type: number\n          default: 0\n      required:\n        - file\n        - model\n    CreateTranslationResponseJson:\n      type: object\n      properties:\n        text:\n          type: string\n      required:\n        - text\n    CreateTranslationResponseVerboseJson:\n      type: object\n      properties:\n        language:\n          type: string\n          description: The language of the output translation (always `english`).\n        duration:\n          type: number\n          description: The duration of the input audio.\n        text:\n          type: string\n          description: The translated text.\n        segments:\n          type: array\n          description: Segments of the translated text and their corresponding details.\n          items:\n            $ref: '#/components/schemas/TranscriptionSegment'\n      required:\n        - language\n        - duration\n        - text\n    CreateUploadRequest:\n      type: object\n      additionalProperties: false\n      properties:\n        filename:\n          description: |\n            The name of the file to upload.\n          type: string\n        purpose:\n          description: >\n            The intended purpose of the uploaded file.\n\n\n            See the [documentation on File\n            purposes](https://platform.openai.com/docs/api-reference/files/create#files-create-purpose).\n          type: string\n          enum:\n            - assistants\n            - batch\n            - fine-tune\n            - vision\n        bytes:\n          description: |\n            The number of bytes in the file you are uploading.\n          type: integer\n        mime_type:\n          description: >\n            The MIME type of the file.\n\n\n            This must fall within the supported MIME types for your file purpose. See the supported MIME types\n            for assistants and vision.\n          type: string\n        expires_after:\n          $ref: '#/components/schemas/FileExpirationAfter'\n      required:\n        - filename\n        - purpose\n        - bytes\n        - mime_type\n    CreateVectorStoreFileBatchRequest:\n      type: object\n      additionalProperties: false\n      properties:\n        file_ids:\n          description: >-\n            A list of [File](https://platform.openai.com/docs/api-reference/files) IDs that the vector store\n            should use. Useful for tools like `file_search` that can access files.\n          type: array\n          minItems: 1\n          maxItems: 500\n          items:\n            type: string\n        chunking_strategy:\n          $ref: '#/components/schemas/ChunkingStrategyRequestParam'\n        attributes:\n          $ref: '#/components/schemas/VectorStoreFileAttributes'\n      required:\n        - file_ids\n    CreateVectorStoreFileRequest:\n      type: object\n      additionalProperties: false\n      properties:\n        file_id:\n          description: >-\n            A [File](https://platform.openai.com/docs/api-reference/files) ID that the vector store should\n            use. Useful for tools like `file_search` that can access files.\n          type: string\n        chunking_strategy:\n          $ref: '#/components/schemas/ChunkingStrategyRequestParam'\n        attributes:\n          $ref: '#/components/schemas/VectorStoreFileAttributes'\n      required:\n        - file_id\n    CreateVectorStoreRequest:\n      type: object\n      additionalProperties: false\n      properties:\n        file_ids:\n          description: >-\n            A list of [File](https://platform.openai.com/docs/api-reference/files) IDs that the vector store\n            should use. Useful for tools like `file_search` that can access files.\n          type: array\n          maxItems: 500\n          items:\n            type: string\n        name:\n          description: The name of the vector store.\n          type: string\n        expires_after:\n          $ref: '#/components/schemas/VectorStoreExpirationAfter'\n        chunking_strategy:\n          $ref: '#/components/schemas/ChunkingStrategyRequestParam'\n        metadata:\n          $ref: '#/components/schemas/Metadata'\n    CustomTool:\n      type: object\n      title: Custom tool\n      description: |\n        A custom tool that processes input using a specified format. Learn more about\n        [custom tools](https://platform.openai.com/docs/guides/function-calling#custom-tools).\n      properties:\n        type:\n          type: string\n          enum:\n            - custom\n          description: The type of the custom tool. Always `custom`.\n          x-stainless-const: true\n        name:\n          type: string\n          description: The name of the custom tool, used to identify it in tool calls.\n        description:\n          type: string\n          description: |\n            Optional description of the custom tool, used to provide more context.\n        format:\n          description: |\n            The input format for the custom tool. Default is unconstrained text.\n          anyOf:\n            - type: object\n              title: Text format\n              description: Unconstrained free-form text.\n              properties:\n                type:\n                  type: string\n                  enum:\n                    - text\n                  description: Unconstrained text format. Always `text`.\n                  x-stainless-const: true\n              required:\n                - type\n              additionalProperties: false\n            - type: object\n              title: Grammar format\n              description: A grammar defined by the user.\n              properties:\n                type:\n                  type: string\n                  enum:\n                    - grammar\n                  description: Grammar format. Always `grammar`.\n                  x-stainless-const: true\n                definition:\n                  type: string\n                  description: The grammar definition.\n                syntax:\n                  type: string\n                  description: The syntax of the grammar definition. One of `lark` or `regex`.\n                  enum:\n                    - lark\n                    - regex\n              required:\n                - type\n                - definition\n                - syntax\n              additionalProperties: false\n          discriminator:\n            propertyName: type\n      required:\n        - type\n        - name\n    CustomToolCall:\n      type: object\n      title: Custom tool call\n      description: |\n        A call to a custom tool created by the model.\n      properties:\n        type:\n          type: string\n          enum:\n            - custom_tool_call\n          x-stainless-const: true\n          description: |\n            The type of the custom tool call. Always `custom_tool_call`.\n        id:\n          type: string\n          description: |\n            The unique ID of the custom tool call in the OpenAI platform.\n        call_id:\n          type: string\n          description: |\n            An identifier used to map this custom tool call to a tool call output.\n        name:\n          type: string\n          description: |\n            The name of the custom tool being called.\n        input:\n          type: string\n          description: |\n            The input for the custom tool call generated by the model.\n      required:\n        - type\n        - call_id\n        - name\n        - input\n    CustomToolCallOutput:\n      type: object\n      title: Custom tool call output\n      description: |\n        The output of a custom tool call from your code, being sent back to the model.\n      properties:\n        type:\n          type: string\n          enum:\n            - custom_tool_call_output\n          x-stainless-const: true\n          description: |\n            The type of the custom tool call output. Always `custom_tool_call_output`.\n        id:\n          type: string\n          description: |\n            The unique ID of the custom tool call output in the OpenAI platform.\n        call_id:\n          type: string\n          description: |\n            The call ID, used to map this custom tool call output to a custom tool call.\n        output:\n          type: string\n          description: |\n            The output from the custom tool call generated by your code.\n      required:\n        - type\n        - call_id\n        - output\n    CustomToolChatCompletions:\n      type: object\n      title: Custom tool\n      description: |\n        A custom tool that processes input using a specified format.\n      properties:\n        type:\n          type: string\n          enum:\n            - custom\n          description: The type of the custom tool. Always `custom`.\n          x-stainless-const: true\n        custom:\n          type: object\n          title: Custom tool properties\n          description: |\n            Properties of the custom tool.\n          properties:\n            name:\n              type: string\n              description: The name of the custom tool, used to identify it in tool calls.\n            description:\n              type: string\n              description: |\n                Optional description of the custom tool, used to provide more context.\n            format:\n              description: |\n                The input format for the custom tool. Default is unconstrained text.\n              anyOf:\n                - type: object\n                  title: Text format\n                  description: Unconstrained free-form text.\n                  properties:\n                    type:\n                      type: string\n                      enum:\n                        - text\n                      description: Unconstrained text format. Always `text`.\n                      x-stainless-const: true\n                  required:\n                    - type\n                  additionalProperties: false\n                - type: object\n                  title: Grammar format\n                  description: A grammar defined by the user.\n                  properties:\n                    type:\n                      type: string\n                      enum:\n                        - grammar\n                      description: Grammar format. Always `grammar`.\n                      x-stainless-const: true\n                    grammar:\n                      type: object\n                      title: Grammar format\n                      description: Your chosen grammar.\n                      properties:\n                        definition:\n                          type: string\n                          description: The grammar definition.\n                        syntax:\n                          type: string\n                          description: The syntax of the grammar definition. One of `lark` or `regex`.\n                          enum:\n                            - lark\n                            - regex\n                      required:\n                        - definition\n                        - syntax\n                  required:\n                    - type\n                    - grammar\n                  additionalProperties: false\n              discriminator:\n                propertyName: type\n          required:\n            - name\n      required:\n        - type\n        - custom\n    DeleteAssistantResponse:\n      type: object\n      properties:\n        id:\n          type: string\n        deleted:\n          type: boolean\n        object:\n          type: string\n          enum:\n            - assistant.deleted\n          x-stainless-const: true\n      required:\n        - id\n        - object\n        - deleted\n    DeleteCertificateResponse:\n      type: object\n      properties:\n        object:\n          description: The object type, must be `certificate.deleted`.\n          x-stainless-const: true\n          const: certificate.deleted\n        id:\n          type: string\n          description: The ID of the certificate that was deleted.\n      required:\n        - object\n        - id\n    DeleteFileResponse:\n      type: object\n      properties:\n        id:\n          type: string\n        object:\n          type: string\n          enum:\n            - file\n          x-stainless-const: true\n        deleted:\n          type: boolean\n      required:\n        - id\n        - object\n        - deleted\n    DeleteFineTuningCheckpointPermissionResponse:\n      type: object\n      properties:\n        id:\n          type: string\n          description: The ID of the fine-tuned model checkpoint permission that was deleted.\n        object:\n          type: string\n          description: The object type, which is always \"checkpoint.permission\".\n          enum:\n            - checkpoint.permission\n          x-stainless-const: true\n        deleted:\n          type: boolean\n          description: Whether the fine-tuned model checkpoint permission was successfully deleted.\n      required:\n        - id\n        - object\n        - deleted\n    DeleteMessageResponse:\n      type: object\n      properties:\n        id:\n          type: string\n        deleted:\n          type: boolean\n        object:\n          type: string\n          enum:\n            - thread.message.deleted\n          x-stainless-const: true\n      required:\n        - id\n        - object\n        - deleted\n    DeleteModelResponse:\n      type: object\n      properties:\n        id:\n          type: string\n        deleted:\n          type: boolean\n        object:\n          type: string\n      required:\n        - id\n        - object\n        - deleted\n    DeleteThreadResponse:\n      type: object\n      properties:\n        id:\n          type: string\n        deleted:\n          type: boolean\n        object:\n          type: string\n          enum:\n            - thread.deleted\n          x-stainless-const: true\n      required:\n        - id\n        - object\n        - deleted\n    DeleteVectorStoreFileResponse:\n      type: object\n      properties:\n        id:\n          type: string\n        deleted:\n          type: boolean\n        object:\n          type: string\n          enum:\n            - vector_store.file.deleted\n          x-stainless-const: true\n      required:\n        - id\n        - object\n        - deleted\n    DeleteVectorStoreResponse:\n      type: object\n      properties:\n        id:\n          type: string\n        deleted:\n          type: boolean\n        object:\n          type: string\n          enum:\n            - vector_store.deleted\n          x-stainless-const: true\n      required:\n        - id\n        - object\n        - deleted\n    DoneEvent:\n      type: object\n      properties:\n        event:\n          type: string\n          enum:\n            - done\n          x-stainless-const: true\n        data:\n          type: string\n          enum:\n            - '[DONE]'\n          x-stainless-const: true\n      required:\n        - event\n        - data\n      description: Occurs when a stream ends.\n      x-oaiMeta:\n        dataDescription: '`data` is `[DONE]`'\n    DoubleClick:\n      type: object\n      title: DoubleClick\n      description: |\n        A double click action.\n      properties:\n        type:\n          type: string\n          enum:\n            - double_click\n          default: double_click\n          description: |\n            Specifies the event type. For a double click action, this property is\n            always set to `double_click`.\n          x-stainless-const: true\n        x:\n          type: integer\n          description: |\n            The x-coordinate where the double click occurred.\n        'y':\n          type: integer\n          description: |\n            The y-coordinate where the double click occurred.\n      required:\n        - type\n        - x\n        - 'y'\n    Drag:\n      type: object\n      title: Drag\n      description: |\n        A drag action.\n      properties:\n        type:\n          type: string\n          enum:\n            - drag\n          default: drag\n          description: |\n            Specifies the event type. For a drag action, this property is\n            always set to `drag`.\n          x-stainless-const: true\n        path:\n          type: array\n          description: >\n            An array of coordinates representing the path of the drag action. Coordinates will appear as an\n            array\n\n            of objects, eg\n\n            ```\n\n            [\n              { x: 100, y: 200 },\n              { x: 200, y: 300 }\n            ]\n\n            ```\n          items:\n            title: Drag path coordinates\n            description: |\n              A series of x/y coordinate pairs in the drag path.\n            $ref: '#/components/schemas/Coordinate'\n      required:\n        - type\n        - path\n    EasyInputMessage:\n      type: object\n      title: Input message\n      description: |\n        A message input to the model with a role indicating instruction following\n        hierarchy. Instructions given with the `developer` or `system` role take\n        precedence over instructions given with the `user` role. Messages with the\n        `assistant` role are presumed to have been generated by the model in previous\n        interactions.\n      properties:\n        role:\n          type: string\n          description: |\n            The role of the message input. One of `user`, `assistant`, `system`, or\n            `developer`.\n          enum:\n            - user\n            - assistant\n            - system\n            - developer\n        content:\n          description: |\n            Text, image, or audio input to the model, used to generate a response.\n            Can also contain previous assistant responses.\n          anyOf:\n            - type: string\n              title: Text input\n              description: |\n                A text input to the model.\n            - $ref: '#/components/schemas/InputMessageContentList'\n        type:\n          type: string\n          description: |\n            The type of the message input. Always `message`.\n          enum:\n            - message\n          x-stainless-const: true\n      required:\n        - role\n        - content\n    Embedding:\n      type: object\n      description: |\n        Represents an embedding vector returned by embedding endpoint.\n      properties:\n        index:\n          type: integer\n          description: The index of the embedding in the list of embeddings.\n        embedding:\n          type: array\n          description: >\n            The embedding vector, which is a list of floats. The length of vector depends on the model as\n            listed in the [embedding guide](https://platform.openai.com/docs/guides/embeddings).\n          items:\n            type: number\n            format: float\n        object:\n          type: string\n          description: The object type, which is always \"embedding\".\n          enum:\n            - embedding\n          x-stainless-const: true\n      required:\n        - index\n        - object\n        - embedding\n      x-oaiMeta:\n        name: The embedding object\n        example: |\n          {\n            \"object\": \"embedding\",\n            \"embedding\": [\n              0.0023064255,\n              -0.009327292,\n              .... (1536 floats total for ada-002)\n              -0.0028842222,\n            ],\n            \"index\": 0\n          }\n    Error:\n      type: object\n      properties:\n        code:\n          type: string\n          nullable: true\n        message:\n          type: string\n          nullable: false\n        param:\n          type: string\n          nullable: true\n        type:\n          type: string\n          nullable: false\n      required:\n        - type\n        - message\n        - param\n        - code\n    ErrorEvent:\n      type: object\n      properties:\n        event:\n          type: string\n          enum:\n            - error\n          x-stainless-const: true\n        data:\n          $ref: '#/components/schemas/Error'\n      required:\n        - event\n        - data\n      description: >-\n        Occurs when an [error](https://platform.openai.com/docs/guides/error-codes#api-errors) occurs. This\n        can happen due to an internal server error or a timeout.\n      x-oaiMeta:\n        dataDescription: '`data` is an [error](/docs/guides/error-codes#api-errors)'\n    ErrorResponse:\n      type: object\n      properties:\n        error:\n          $ref: '#/components/schemas/Error'\n      required:\n        - error\n    Eval:\n      type: object\n      title: Eval\n      description: |\n        An Eval object with a data source config and testing criteria.\n        An Eval represents a task to be done for your LLM integration.\n        Like:\n         - Improve the quality of my chatbot\n         - See how well my chatbot handles customer support\n         - Check if o4-mini is better at my usecase than gpt-4o\n      properties:\n        object:\n          type: string\n          enum:\n            - eval\n          default: eval\n          description: The object type.\n          x-stainless-const: true\n        id:\n          type: string\n          description: Unique identifier for the evaluation.\n        name:\n          type: string\n          description: The name of the evaluation.\n          example: Chatbot effectiveness Evaluation\n        data_source_config:\n          type: object\n          description: Configuration of data sources used in runs of the evaluation.\n          anyOf:\n            - $ref: '#/components/schemas/EvalCustomDataSourceConfig'\n            - $ref: '#/components/schemas/EvalLogsDataSourceConfig'\n            - $ref: '#/components/schemas/EvalStoredCompletionsDataSourceConfig'\n          discriminator:\n            propertyName: type\n        testing_criteria:\n          description: A list of testing criteria.\n          type: array\n          items:\n            anyOf:\n              - $ref: '#/components/schemas/EvalGraderLabelModel'\n              - $ref: '#/components/schemas/EvalGraderStringCheck'\n              - $ref: '#/components/schemas/EvalGraderTextSimilarity'\n              - $ref: '#/components/schemas/EvalGraderPython'\n              - $ref: '#/components/schemas/EvalGraderScoreModel'\n        created_at:\n          type: integer\n          description: The Unix timestamp (in seconds) for when the eval was created.\n        metadata:\n          $ref: '#/components/schemas/Metadata'\n      required:\n        - id\n        - data_source_config\n        - object\n        - testing_criteria\n        - name\n        - created_at\n        - metadata\n      x-oaiMeta:\n        name: The eval object\n        group: evals\n        example: |\n          {\n            \"object\": \"eval\",\n            \"id\": \"eval_67abd54d9b0081909a86353f6fb9317a\",\n            \"data_source_config\": {\n              \"type\": \"custom\",\n              \"item_schema\": {\n                \"type\": \"object\",\n                \"properties\": {\n                  \"label\": {\"type\": \"string\"},\n                },\n                \"required\": [\"label\"]\n              },\n              \"include_sample_schema\": true\n            },\n            \"testing_criteria\": [\n              {\n                \"name\": \"My string check grader\",\n                \"type\": \"string_check\",\n                \"input\": \"{{sample.output_text}}\",\n                \"reference\": \"{{item.label}}\",\n                \"operation\": \"eq\",\n              }\n            ],\n            \"name\": \"External Data Eval\",\n            \"created_at\": 1739314509,\n            \"metadata\": {\n              \"test\": \"synthetics\",\n            }\n          }\n    EvalApiError:\n      type: object\n      title: EvalApiError\n      description: |\n        An object representing an error response from the Eval API.\n      properties:\n        code:\n          type: string\n          description: The error code.\n        message:\n          type: string\n          description: The error message.\n      required:\n        - code\n        - message\n      x-oaiMeta:\n        name: The API error object\n        group: evals\n        example: |\n          {\n            \"code\": \"internal_error\",\n            \"message\": \"The eval run failed due to an internal error.\"\n          }\n    EvalCustomDataSourceConfig:\n      type: object\n      title: CustomDataSourceConfig\n      description: |\n        A CustomDataSourceConfig which specifies the schema of your `item` and optionally `sample` namespaces.\n        The response schema defines the shape of the data that will be:\n        - Used to define your testing criteria and\n        - What data is required when creating a run\n      properties:\n        type:\n          type: string\n          enum:\n            - custom\n          default: custom\n          description: The type of data source. Always `custom`.\n          x-stainless-const: true\n        schema:\n          type: object\n          description: |\n            The json schema for the run data source items.\n            Learn how to build JSON schemas [here](https://json-schema.org/).\n          additionalProperties: true\n      required:\n        - type\n        - schema\n      x-oaiMeta:\n        name: The eval custom data source config object\n        group: evals\n        example: |\n          {\n            \"type\": \"custom\",\n            \"schema\": {\n              \"type\": \"object\",\n              \"properties\": {\n                \"item\": {\n                  \"type\": \"object\",\n                  \"properties\": {\n                    \"label\": {\"type\": \"string\"},\n                  },\n                  \"required\": [\"label\"]\n                }\n              },\n              \"required\": [\"item\"]\n            }\n          }\n    EvalGraderLabelModel:\n      type: object\n      title: LabelModelGrader\n      allOf:\n        - $ref: '#/components/schemas/GraderLabelModel'\n    EvalGraderPython:\n      type: object\n      title: PythonGrader\n      allOf:\n        - $ref: '#/components/schemas/GraderPython'\n        - type: object\n          properties:\n            pass_threshold:\n              type: number\n              description: The threshold for the score.\n          x-oaiMeta:\n            name: Eval Python Grader\n            group: graders\n            example: |\n              {\n                \"type\": \"python\",\n                \"name\": \"Example python grader\",\n                \"image_tag\": \"2025-05-08\",\n                \"source\": \"\"\"\n              def grade(sample: dict, item: dict) -> float:\n                  \\\"\"\"\n                  Returns 1.0 if `output_text` equals `label`, otherwise 0.0.\n                  \\\"\"\"\n                  output = sample.get(\"output_text\")\n                  label = item.get(\"label\")\n                  return 1.0 if output == label else 0.0\n              \"\"\",\n                \"pass_threshold\": 0.8\n              }\n    EvalGraderScoreModel:\n      type: object\n      title: ScoreModelGrader\n      allOf:\n        - $ref: '#/components/schemas/GraderScoreModel'\n        - type: object\n          properties:\n            pass_threshold:\n              type: number\n              description: The threshold for the score.\n    EvalGraderStringCheck:\n      type: object\n      title: StringCheckGrader\n      allOf:\n        - $ref: '#/components/schemas/GraderStringCheck'\n    EvalGraderTextSimilarity:\n      type: object\n      title: TextSimilarityGrader\n      allOf:\n        - $ref: '#/components/schemas/GraderTextSimilarity'\n        - type: object\n          properties:\n            pass_threshold:\n              type: number\n              description: The threshold for the score.\n          required:\n            - pass_threshold\n          x-oaiMeta:\n            name: Text Similarity Grader\n            group: graders\n            example: |\n              {\n                \"type\": \"text_similarity\",\n                \"name\": \"Example text similarity grader\",\n                \"input\": \"{{sample.output_text}}\",\n                \"reference\": \"{{item.label}}\",\n                \"pass_threshold\": 0.8,\n                \"evaluation_metric\": \"fuzzy_match\"\n              }\n    EvalItem:\n      type: object\n      title: Eval message object\n      description: |\n        A message input to the model with a role indicating instruction following\n        hierarchy. Instructions given with the `developer` or `system` role take\n        precedence over instructions given with the `user` role. Messages with the\n        `assistant` role are presumed to have been generated by the model in previous\n        interactions.\n      properties:\n        role:\n          type: string\n          description: |\n            The role of the message input. One of `user`, `assistant`, `system`, or\n            `developer`.\n          enum:\n            - user\n            - assistant\n            - system\n            - developer\n        content:\n          description: |\n            Inputs to the model - can contain template strings.\n          anyOf:\n            - type: string\n              title: Text input\n              description: |\n                A text input to the model.\n            - $ref: '#/components/schemas/InputTextContent'\n            - type: object\n              title: Output text\n              description: |\n                A text output from the model.\n              properties:\n                type:\n                  type: string\n                  description: |\n                    The type of the output text. Always `output_text`.\n                  enum:\n                    - output_text\n                  x-stainless-const: true\n                text:\n                  type: string\n                  description: |\n                    The text output from the model.\n              required:\n                - type\n                - text\n            - type: object\n              title: Input image\n              description: |\n                An image input to the model.\n              properties:\n                type:\n                  type: string\n                  description: |\n                    The type of the image input. Always `input_image`.\n                  enum:\n                    - input_image\n                  x-stainless-const: true\n                image_url:\n                  type: string\n                  description: |\n                    The URL of the image input.\n                detail:\n                  type: string\n                  description: >\n                    The detail level of the image to be sent to the model. One of `high`, `low`, or `auto`.\n                    Defaults to `auto`.\n              required:\n                - type\n                - image_url\n            - type: array\n              title: An array of Input text and Input image\n              description: |\n                A list of inputs, each of which may be either an input text or input image object.\n        type:\n          type: string\n          description: |\n            The type of the message input. Always `message`.\n          enum:\n            - message\n          x-stainless-const: true\n      required:\n        - role\n        - content\n    EvalJsonlFileContentSource:\n      type: object\n      title: EvalJsonlFileContentSource\n      properties:\n        type:\n          type: string\n          enum:\n            - file_content\n          default: file_content\n          description: The type of jsonl source. Always `file_content`.\n          x-stainless-const: true\n        content:\n          type: array\n          items:\n            type: object\n            properties:\n              item:\n                type: object\n                additionalProperties: true\n              sample:\n                type: object\n                additionalProperties: true\n            required:\n              - item\n          description: The content of the jsonl file.\n      required:\n        - type\n        - content\n    EvalJsonlFileIdSource:\n      type: object\n      title: EvalJsonlFileIdSource\n      properties:\n        type:\n          type: string\n          enum:\n            - file_id\n          default: file_id\n          description: The type of jsonl source. Always `file_id`.\n          x-stainless-const: true\n        id:\n          type: string\n          description: The identifier of the file.\n      required:\n        - type\n        - id\n    EvalList:\n      type: object\n      title: EvalList\n      description: |\n        An object representing a list of evals.\n      properties:\n        object:\n          type: string\n          enum:\n            - list\n          default: list\n          description: |\n            The type of this object. It is always set to \"list\".\n          x-stainless-const: true\n        data:\n          type: array\n          description: |\n            An array of eval objects.\n          items:\n            $ref: '#/components/schemas/Eval'\n        first_id:\n          type: string\n          description: The identifier of the first eval in the data array.\n        last_id:\n          type: string\n          description: The identifier of the last eval in the data array.\n        has_more:\n          type: boolean\n          description: Indicates whether there are more evals available.\n      required:\n        - object\n        - data\n        - first_id\n        - last_id\n        - has_more\n      x-oaiMeta:\n        name: The eval list object\n        group: evals\n        example: |\n          {\n            \"object\": \"list\",\n            \"data\": [\n              {\n                \"object\": \"eval\",\n                \"id\": \"eval_67abd54d9b0081909a86353f6fb9317a\",\n                \"data_source_config\": {\n                  \"type\": \"custom\",\n                  \"schema\": {\n                    \"type\": \"object\",\n                    \"properties\": {\n                      \"item\": {\n                        \"type\": \"object\",\n                        \"properties\": {\n                          \"input\": {\n                            \"type\": \"string\"\n                          },\n                          \"ground_truth\": {\n                            \"type\": \"string\"\n                          }\n                        },\n                        \"required\": [\n                          \"input\",\n                          \"ground_truth\"\n                        ]\n                      }\n                    },\n                    \"required\": [\n                      \"item\"\n                    ]\n                  }\n                },\n                \"testing_criteria\": [\n                  {\n                    \"name\": \"String check\",\n                    \"id\": \"String check-2eaf2d8d-d649-4335-8148-9535a7ca73c2\",\n                    \"type\": \"string_check\",\n                    \"input\": \"{{item.input}}\",\n                    \"reference\": \"{{item.ground_truth}}\",\n                    \"operation\": \"eq\"\n                  }\n                ],\n                \"name\": \"External Data Eval\",\n                \"created_at\": 1739314509,\n                \"metadata\": {},\n              }\n            ],\n            \"first_id\": \"eval_67abd54d9b0081909a86353f6fb9317a\",\n            \"last_id\": \"eval_67abd54d9b0081909a86353f6fb9317a\",\n            \"has_more\": true\n          }\n    EvalLogsDataSourceConfig:\n      type: object\n      title: LogsDataSourceConfig\n      description: >\n        A LogsDataSourceConfig which specifies the metadata property of your logs query.\n\n        This is usually metadata like `usecase=chatbot` or `prompt-version=v2`, etc.\n\n        The schema returned by this data source config is used to defined what variables are available in your\n        evals.\n\n        `item` and `sample` are both defined when using this data source config.\n      properties:\n        type:\n          type: string\n          enum:\n            - logs\n          default: logs\n          description: The type of data source. Always `logs`.\n          x-stainless-const: true\n        metadata:\n          $ref: '#/components/schemas/Metadata'\n        schema:\n          type: object\n          description: |\n            The json schema for the run data source items.\n            Learn how to build JSON schemas [here](https://json-schema.org/).\n          additionalProperties: true\n      required:\n        - type\n        - schema\n      x-oaiMeta:\n        name: The logs data source object for evals\n        group: evals\n        example: |\n          {\n            \"type\": \"logs\",\n            \"metadata\": {\n              \"language\": \"english\"\n            },\n            \"schema\": {\n              \"type\": \"object\",\n              \"properties\": {\n                \"item\": {\n                  \"type\": \"object\"\n                },\n                \"sample\": {\n                  \"type\": \"object\"\n                }\n              },\n              \"required\": [\n                \"item\",\n                \"sample\"\n              }\n          }\n    EvalResponsesSource:\n      type: object\n      title: EvalResponsesSource\n      description: |\n        A EvalResponsesSource object describing a run data source configuration.\n      properties:\n        type:\n          type: string\n          enum:\n            - responses\n          description: The type of run data source. Always `responses`.\n        metadata:\n          type: object\n          nullable: true\n          description: Metadata filter for the responses. This is a query parameter used to select responses.\n        model:\n          type: string\n          nullable: true\n          description: The name of the model to find responses for. This is a query parameter used to select responses.\n        instructions_search:\n          type: string\n          nullable: true\n          description: >-\n            Optional string to search the 'instructions' field. This is a query parameter used to select\n            responses.\n        created_after:\n          type: integer\n          minimum: 0\n          nullable: true\n          description: >-\n            Only include items created after this timestamp (inclusive). This is a query parameter used to\n            select responses.\n        created_before:\n          type: integer\n          minimum: 0\n          nullable: true\n          description: >-\n            Only include items created before this timestamp (inclusive). This is a query parameter used to\n            select responses.\n        reasoning_effort:\n          $ref: '#/components/schemas/ReasoningEffort'\n          nullable: true\n          description: Optional reasoning effort parameter. This is a query parameter used to select responses.\n        temperature:\n          type: number\n          nullable: true\n          description: Sampling temperature. This is a query parameter used to select responses.\n        top_p:\n          type: number\n          nullable: true\n          description: Nucleus sampling parameter. This is a query parameter used to select responses.\n        users:\n          type: array\n          items:\n            type: string\n          nullable: true\n          description: List of user identifiers. This is a query parameter used to select responses.\n        tools:\n          type: array\n          items:\n            type: string\n          nullable: true\n          description: List of tool names. This is a query parameter used to select responses.\n      required:\n        - type\n      x-oaiMeta:\n        name: The run data source object used to configure an individual run\n        group: eval runs\n        example: |\n          {\n            \"type\": \"responses\",\n            \"model\": \"gpt-4o-mini-2024-07-18\",\n            \"temperature\": 0.7,\n            \"top_p\": 1.0,\n            \"users\": [\"user1\", \"user2\"],\n            \"tools\": [\"tool1\", \"tool2\"],\n            \"instructions_search\": \"You are a coding assistant\"\n          }\n    EvalRun:\n      type: object\n      title: EvalRun\n      description: |\n        A schema representing an evaluation run.\n      properties:\n        object:\n          type: string\n          enum:\n            - eval.run\n          default: eval.run\n          description: The type of the object. Always \"eval.run\".\n          x-stainless-const: true\n        id:\n          type: string\n          description: Unique identifier for the evaluation run.\n        eval_id:\n          type: string\n          description: The identifier of the associated evaluation.\n        status:\n          type: string\n          description: The status of the evaluation run.\n        model:\n          type: string\n          description: The model that is evaluated, if applicable.\n        name:\n          type: string\n          description: The name of the evaluation run.\n        created_at:\n          type: integer\n          description: Unix timestamp (in seconds) when the evaluation run was created.\n        report_url:\n          type: string\n          description: The URL to the rendered evaluation run report on the UI dashboard.\n        result_counts:\n          type: object\n          description: Counters summarizing the outcomes of the evaluation run.\n          properties:\n            total:\n              type: integer\n              description: Total number of executed output items.\n            errored:\n              type: integer\n              description: Number of output items that resulted in an error.\n            failed:\n              type: integer\n              description: Number of output items that failed to pass the evaluation.\n            passed:\n              type: integer\n              description: Number of output items that passed the evaluation.\n          required:\n            - total\n            - errored\n            - failed\n            - passed\n        per_model_usage:\n          type: array\n          description: Usage statistics for each model during the evaluation run.\n          items:\n            type: object\n            properties:\n              model_name:\n                type: string\n                description: The name of the model.\n                x-stainless-naming:\n                  python:\n                    property_name: run_model_name\n              invocation_count:\n                type: integer\n                description: The number of invocations.\n              prompt_tokens:\n                type: integer\n                description: The number of prompt tokens used.\n              completion_tokens:\n                type: integer\n                description: The number of completion tokens generated.\n              total_tokens:\n                type: integer\n                description: The total number of tokens used.\n              cached_tokens:\n                type: integer\n                description: The number of tokens retrieved from cache.\n            required:\n              - model_name\n              - invocation_count\n              - prompt_tokens\n              - completion_tokens\n              - total_tokens\n              - cached_tokens\n        per_testing_criteria_results:\n          type: array\n          description: Results per testing criteria applied during the evaluation run.\n          items:\n            type: object\n            properties:\n              testing_criteria:\n                type: string\n                description: A description of the testing criteria.\n              passed:\n                type: integer\n                description: Number of tests passed for this criteria.\n              failed:\n                type: integer\n                description: Number of tests failed for this criteria.\n            required:\n              - testing_criteria\n              - passed\n              - failed\n        data_source:\n          type: object\n          description: Information about the run's data source.\n          anyOf:\n            - $ref: '#/components/schemas/CreateEvalJsonlRunDataSource'\n            - $ref: '#/components/schemas/CreateEvalCompletionsRunDataSource'\n            - $ref: '#/components/schemas/CreateEvalResponsesRunDataSource'\n          discriminator:\n            propertyName: type\n        metadata:\n          $ref: '#/components/schemas/Metadata'\n        error:\n          $ref: '#/components/schemas/EvalApiError'\n      required:\n        - object\n        - id\n        - eval_id\n        - status\n        - model\n        - name\n        - created_at\n        - report_url\n        - result_counts\n        - per_model_usage\n        - per_testing_criteria_results\n        - data_source\n        - metadata\n        - error\n      x-oaiMeta:\n        name: The eval run object\n        group: evals\n        example: |\n          {\n            \"object\": \"eval.run\",\n            \"id\": \"evalrun_67e57965b480819094274e3a32235e4c\",\n            \"eval_id\": \"eval_67e579652b548190aaa83ada4b125f47\",\n            \"report_url\": \"https://platform.openai.com/evaluations/eval_67e579652b548190aaa83ada4b125f47?run_id=evalrun_67e57965b480819094274e3a32235e4c\",\n            \"status\": \"queued\",\n            \"model\": \"gpt-4o-mini\",\n            \"name\": \"gpt-4o-mini\",\n            \"created_at\": 1743092069,\n            \"result_counts\": {\n              \"total\": 0,\n              \"errored\": 0,\n              \"failed\": 0,\n              \"passed\": 0\n            },\n            \"per_model_usage\": null,\n            \"per_testing_criteria_results\": null,\n            \"data_source\": {\n              \"type\": \"completions\",\n              \"source\": {\n                \"type\": \"file_content\",\n                \"content\": [\n                  {\n                    \"item\": {\n                      \"input\": \"Tech Company Launches Advanced Artificial Intelligence Platform\",\n                      \"ground_truth\": \"Technology\"\n                    }\n                  },\n                  {\n                    \"item\": {\n                      \"input\": \"Central Bank Increases Interest Rates Amid Inflation Concerns\",\n                      \"ground_truth\": \"Markets\"\n                    }\n                  },\n                  {\n                    \"item\": {\n                      \"input\": \"International Summit Addresses Climate Change Strategies\",\n                      \"ground_truth\": \"World\"\n                    }\n                  },\n                  {\n                    \"item\": {\n                      \"input\": \"Major Retailer Reports Record-Breaking Holiday Sales\",\n                      \"ground_truth\": \"Business\"\n                    }\n                  },\n                  {\n                    \"item\": {\n                      \"input\": \"National Team Qualifies for World Championship Finals\",\n                      \"ground_truth\": \"Sports\"\n                    }\n                  },\n                  {\n                    \"item\": {\n                      \"input\": \"Stock Markets Rally After Positive Economic Data Released\",\n                      \"ground_truth\": \"Markets\"\n                    }\n                  },\n                  {\n                    \"item\": {\n                      \"input\": \"Global Manufacturer Announces Merger with Competitor\",\n                      \"ground_truth\": \"Business\"\n                    }\n                  },\n                  {\n                    \"item\": {\n                      \"input\": \"Breakthrough in Renewable Energy Technology Unveiled\",\n                      \"ground_truth\": \"Technology\"\n                    }\n                  },\n                  {\n                    \"item\": {\n                      \"input\": \"World Leaders Sign Historic Climate Agreement\",\n                      \"ground_truth\": \"World\"\n                    }\n                  },\n                  {\n                    \"item\": {\n                      \"input\": \"Professional Athlete Sets New Record in Championship Event\",\n                      \"ground_truth\": \"Sports\"\n                    }\n                  },\n                  {\n                    \"item\": {\n                      \"input\": \"Financial Institutions Adapt to New Regulatory Requirements\",\n                      \"ground_truth\": \"Business\"\n                    }\n                  },\n                  {\n                    \"item\": {\n                      \"input\": \"Tech Conference Showcases Advances in Artificial Intelligence\",\n                      \"ground_truth\": \"Technology\"\n                    }\n                  },\n                  {\n                    \"item\": {\n                      \"input\": \"Global Markets Respond to Oil Price Fluctuations\",\n                      \"ground_truth\": \"Markets\"\n                    }\n                  },\n                  {\n                    \"item\": {\n                      \"input\": \"International Cooperation Strengthened Through New Treaty\",\n                      \"ground_truth\": \"World\"\n                    }\n                  },\n                  {\n                    \"item\": {\n                      \"input\": \"Sports League Announces Revised Schedule for Upcoming Season\",\n                      \"ground_truth\": \"Sports\"\n                    }\n                  }\n                ]\n              },\n              \"input_messages\": {\n                \"type\": \"template\",\n                \"template\": [\n                  {\n                    \"type\": \"message\",\n                    \"role\": \"developer\",\n                    \"content\": {\n                      \"type\": \"input_text\",\n                      \"text\": \"Categorize a given news headline into one of the following topics: Technology, Markets, World, Business, or Sports.\\n\\n# Steps\\n\\n1. Analyze the content of the news headline to understand its primary focus.\\n2. Extract the subject matter, identifying any key indicators or keywords.\\n3. Use the identified indicators to determine the most suitable category out of the five options: Technology, Markets, World, Business, or Sports.\\n4. Ensure only one category is selected per headline.\\n\\n# Output Format\\n\\nRespond with the chosen category as a single word. For instance: \\\"Technology\\\", \\\"Markets\\\", \\\"World\\\", \\\"Business\\\", or \\\"Sports\\\".\\n\\n# Examples\\n\\n**Input**: \\\"Apple Unveils New iPhone Model, Featuring Advanced AI Features\\\"  \\n**Output**: \\\"Technology\\\"\\n\\n**Input**: \\\"Global Stocks Mixed as Investors Await Central Bank Decisions\\\"  \\n**Output**: \\\"Markets\\\"\\n\\n**Input**: \\\"War in Ukraine: Latest Updates on Negotiation Status\\\"  \\n**Output**: \\\"World\\\"\\n\\n**Input**: \\\"Microsoft in Talks to Acquire Gaming Company for $2 Billion\\\"  \\n**Output**: \\\"Business\\\"\\n\\n**Input**: \\\"Manchester United Secures Win in Premier League Football Match\\\"  \\n**Output**: \\\"Sports\\\" \\n\\n# Notes\\n\\n- If the headline appears to fit into more than one category, choose the most dominant theme.\\n- Keywords or phrases such as \\\"stocks\\\", \\\"company acquisition\\\", \\\"match\\\", or technological brands can be good indicators for classification.\\n\"\n                    }\n                  },\n                  {\n                    \"type\": \"message\",\n                    \"role\": \"user\",\n                    \"content\": {\n                      \"type\": \"input_text\",\n                      \"text\": \"{{item.input}}\"\n                    }\n                  }\n                ]\n              },\n              \"model\": \"gpt-4o-mini\",\n              \"sampling_params\": {\n                \"seed\": 42,\n                \"temperature\": 1.0,\n                \"top_p\": 1.0,\n                \"max_completions_tokens\": 2048\n              }\n            },\n            \"error\": null,\n            \"metadata\": {}\n          }\n    EvalRunList:\n      type: object\n      title: EvalRunList\n      description: |\n        An object representing a list of runs for an evaluation.\n      properties:\n        object:\n          type: string\n          enum:\n            - list\n          default: list\n          description: |\n            The type of this object. It is always set to \"list\".\n          x-stainless-const: true\n        data:\n          type: array\n          description: |\n            An array of eval run objects.\n          items:\n            $ref: '#/components/schemas/EvalRun'\n        first_id:\n          type: string\n          description: The identifier of the first eval run in the data array.\n        last_id:\n          type: string\n          description: The identifier of the last eval run in the data array.\n        has_more:\n          type: boolean\n          description: Indicates whether there are more evals available.\n      required:\n        - object\n        - data\n        - first_id\n        - last_id\n        - has_more\n      x-oaiMeta:\n        name: The eval run list object\n        group: evals\n        example: |\n          {\n            \"object\": \"list\",\n            \"data\": [\n              {\n                \"object\": \"eval.run\",\n                \"id\": \"evalrun_67b7fbdad46c819092f6fe7a14189620\",\n                \"eval_id\": \"eval_67b7fa9a81a88190ab4aa417e397ea21\",\n                \"report_url\": \"https://platform.openai.com/evaluations/eval_67b7fa9a81a88190ab4aa417e397ea21?run_id=evalrun_67b7fbdad46c819092f6fe7a14189620\",\n                \"status\": \"completed\",\n                \"model\": \"o3-mini\",\n                \"name\": \"Academic Assistant\",\n                \"created_at\": 1740110812,\n                \"result_counts\": {\n                  \"total\": 171,\n                  \"errored\": 0,\n                  \"failed\": 80,\n                  \"passed\": 91\n                },\n                \"per_model_usage\": null,\n                \"per_testing_criteria_results\": [\n                  {\n                    \"testing_criteria\": \"String check grader\",\n                    \"passed\": 91,\n                    \"failed\": 80\n                  }\n                ],\n                \"run_data_source\": {\n                  \"type\": \"completions\",\n                  \"template_messages\": [\n                    {\n                      \"type\": \"message\",\n                      \"role\": \"system\",\n                      \"content\": {\n                        \"type\": \"input_text\",\n                        \"text\": \"You are a helpful assistant.\"\n                      }\n                    },\n                    {\n                      \"type\": \"message\",\n                      \"role\": \"user\",\n                      \"content\": {\n                        \"type\": \"input_text\",\n                        \"text\": \"Hello, can you help me with my homework?\"\n                      }\n                    }\n                  ],\n                  \"datasource_reference\": null,\n                  \"model\": \"o3-mini\",\n                  \"max_completion_tokens\": null,\n                  \"seed\": null,\n                  \"temperature\": null,\n                  \"top_p\": null\n                },\n                \"error\": null,\n                \"metadata\": {\"test\": \"synthetics\"}\n              }\n            ],\n            \"first_id\": \"evalrun_67abd54d60ec8190832b46859da808f7\",\n            \"last_id\": \"evalrun_67abd54d60ec8190832b46859da808f7\",\n            \"has_more\": false\n          }\n    EvalRunOutputItem:\n      type: object\n      title: EvalRunOutputItem\n      description: |\n        A schema representing an evaluation run output item.\n      properties:\n        object:\n          type: string\n          enum:\n            - eval.run.output_item\n          default: eval.run.output_item\n          description: The type of the object. Always \"eval.run.output_item\".\n          x-stainless-const: true\n        id:\n          type: string\n          description: Unique identifier for the evaluation run output item.\n        run_id:\n          type: string\n          description: The identifier of the evaluation run associated with this output item.\n        eval_id:\n          type: string\n          description: The identifier of the evaluation group.\n        created_at:\n          type: integer\n          description: Unix timestamp (in seconds) when the evaluation run was created.\n        status:\n          type: string\n          description: The status of the evaluation run.\n        datasource_item_id:\n          type: integer\n          description: The identifier for the data source item.\n        datasource_item:\n          type: object\n          description: Details of the input data source item.\n          additionalProperties: true\n        results:\n          type: array\n          description: A list of results from the evaluation run.\n          items:\n            type: object\n            description: A result object.\n            additionalProperties: true\n        sample:\n          type: object\n          description: A sample containing the input and output of the evaluation run.\n          properties:\n            input:\n              type: array\n              description: An array of input messages.\n              items:\n                type: object\n                description: An input message.\n                properties:\n                  role:\n                    type: string\n                    description: The role of the message sender (e.g., system, user, developer).\n                  content:\n                    type: string\n                    description: The content of the message.\n                required:\n                  - role\n                  - content\n            output:\n              type: array\n              description: An array of output messages.\n              items:\n                type: object\n                properties:\n                  role:\n                    type: string\n                    description: The role of the message (e.g. \"system\", \"assistant\", \"user\").\n                  content:\n                    type: string\n                    description: The content of the message.\n            finish_reason:\n              type: string\n              description: The reason why the sample generation was finished.\n            model:\n              type: string\n              description: The model used for generating the sample.\n            usage:\n              type: object\n              description: Token usage details for the sample.\n              properties:\n                total_tokens:\n                  type: integer\n                  description: The total number of tokens used.\n                completion_tokens:\n                  type: integer\n                  description: The number of completion tokens generated.\n                prompt_tokens:\n                  type: integer\n                  description: The number of prompt tokens used.\n                cached_tokens:\n                  type: integer\n                  description: The number of tokens retrieved from cache.\n              required:\n                - total_tokens\n                - completion_tokens\n                - prompt_tokens\n                - cached_tokens\n            error:\n              $ref: '#/components/schemas/EvalApiError'\n            temperature:\n              type: number\n              description: The sampling temperature used.\n            max_completion_tokens:\n              type: integer\n              description: The maximum number of tokens allowed for completion.\n            top_p:\n              type: number\n              description: The top_p value used for sampling.\n            seed:\n              type: integer\n              description: The seed used for generating the sample.\n          required:\n            - input\n            - output\n            - finish_reason\n            - model\n            - usage\n            - error\n            - temperature\n            - max_completion_tokens\n            - top_p\n            - seed\n      required:\n        - object\n        - id\n        - run_id\n        - eval_id\n        - created_at\n        - status\n        - datasource_item_id\n        - datasource_item\n        - results\n        - sample\n      x-oaiMeta:\n        name: The eval run output item object\n        group: evals\n        example: |\n          {\n            \"object\": \"eval.run.output_item\",\n            \"id\": \"outputitem_67abd55eb6548190bb580745d5644a33\",\n            \"run_id\": \"evalrun_67abd54d60ec8190832b46859da808f7\",\n            \"eval_id\": \"eval_67abd54d9b0081909a86353f6fb9317a\",\n            \"created_at\": 1739314509,\n            \"status\": \"pass\",\n            \"datasource_item_id\": 137,\n            \"datasource_item\": {\n                \"teacher\": \"To grade essays, I only check for style, content, and grammar.\",\n                \"student\": \"I am a student who is trying to write the best essay.\"\n            },\n            \"results\": [\n              {\n                \"name\": \"String Check Grader\",\n                \"type\": \"string-check-grader\",\n                \"score\": 1.0,\n                \"passed\": true,\n              }\n            ],\n            \"sample\": {\n              \"input\": [\n                {\n                  \"role\": \"system\",\n                  \"content\": \"You are an evaluator bot...\"\n                },\n                {\n                  \"role\": \"user\",\n                  \"content\": \"You are assessing...\"\n                }\n              ],\n              \"output\": [\n                {\n                  \"role\": \"assistant\",\n                  \"content\": \"The rubric is not clear nor concise.\"\n                }\n              ],\n              \"finish_reason\": \"stop\",\n              \"model\": \"gpt-4o-2024-08-06\",\n              \"usage\": {\n                \"total_tokens\": 521,\n                \"completion_tokens\": 2,\n                \"prompt_tokens\": 519,\n                \"cached_tokens\": 0\n              },\n              \"error\": null,\n              \"temperature\": 1.0,\n              \"max_completion_tokens\": 2048,\n              \"top_p\": 1.0,\n              \"seed\": 42\n            }\n          }\n    EvalRunOutputItemList:\n      type: object\n      title: EvalRunOutputItemList\n      description: |\n        An object representing a list of output items for an evaluation run.\n      properties:\n        object:\n          type: string\n          enum:\n            - list\n          default: list\n          description: |\n            The type of this object. It is always set to \"list\".\n          x-stainless-const: true\n        data:\n          type: array\n          description: |\n            An array of eval run output item objects.\n          items:\n            $ref: '#/components/schemas/EvalRunOutputItem'\n        first_id:\n          type: string\n          description: The identifier of the first eval run output item in the data array.\n        last_id:\n          type: string\n          description: The identifier of the last eval run output item in the data array.\n        has_more:\n          type: boolean\n          description: Indicates whether there are more eval run output items available.\n      required:\n        - object\n        - data\n        - first_id\n        - last_id\n        - has_more\n      x-oaiMeta:\n        name: The eval run output item list object\n        group: evals\n        example: |\n          {\n            \"object\": \"list\",\n            \"data\": [\n              {\n                \"object\": \"eval.run.output_item\",\n                \"id\": \"outputitem_67abd55eb6548190bb580745d5644a33\",\n                \"run_id\": \"evalrun_67abd54d60ec8190832b46859da808f7\",\n                \"eval_id\": \"eval_67abd54d9b0081909a86353f6fb9317a\",\n                \"created_at\": 1739314509,\n                \"status\": \"pass\",\n                \"datasource_item_id\": 137,\n                \"datasource_item\": {\n                    \"teacher\": \"To grade essays, I only check for style, content, and grammar.\",\n                    \"student\": \"I am a student who is trying to write the best essay.\"\n                },\n                \"results\": [\n                  {\n                    \"name\": \"String Check Grader\",\n                    \"type\": \"string-check-grader\",\n                    \"score\": 1.0,\n                    \"passed\": true,\n                  }\n                ],\n                \"sample\": {\n                  \"input\": [\n                    {\n                      \"role\": \"system\",\n                      \"content\": \"You are an evaluator bot...\"\n                    },\n                    {\n                      \"role\": \"user\",\n                      \"content\": \"You are assessing...\"\n                    }\n                  ],\n                  \"output\": [\n                    {\n                      \"role\": \"assistant\",\n                      \"content\": \"The rubric is not clear nor concise.\"\n                    }\n                  ],\n                  \"finish_reason\": \"stop\",\n                  \"model\": \"gpt-4o-2024-08-06\",\n                  \"usage\": {\n                    \"total_tokens\": 521,\n                    \"completion_tokens\": 2,\n                    \"prompt_tokens\": 519,\n                    \"cached_tokens\": 0\n                  },\n                  \"error\": null,\n                  \"temperature\": 1.0,\n                  \"max_completion_tokens\": 2048,\n                  \"top_p\": 1.0,\n                  \"seed\": 42\n                }\n              },\n            ],\n            \"first_id\": \"outputitem_67abd55eb6548190bb580745d5644a33\",\n            \"last_id\": \"outputitem_67abd55eb6548190bb580745d5644a33\",\n            \"has_more\": false\n          }\n    EvalStoredCompletionsDataSourceConfig:\n      type: object\n      title: StoredCompletionsDataSourceConfig\n      description: |\n        Deprecated in favor of LogsDataSourceConfig.\n      properties:\n        type:\n          type: string\n          enum:\n            - stored_completions\n          default: stored_completions\n          description: The type of data source. Always `stored_completions`.\n          x-stainless-const: true\n        metadata:\n          $ref: '#/components/schemas/Metadata'\n        schema:\n          type: object\n          description: |\n            The json schema for the run data source items.\n            Learn how to build JSON schemas [here](https://json-schema.org/).\n          additionalProperties: true\n      required:\n        - type\n        - schema\n      deprecated: true\n      x-oaiMeta:\n        name: The stored completions data source object for evals\n        group: evals\n        example: |\n          {\n            \"type\": \"stored_completions\",\n            \"metadata\": {\n              \"language\": \"english\"\n            },\n            \"schema\": {\n              \"type\": \"object\",\n              \"properties\": {\n                \"item\": {\n                  \"type\": \"object\"\n                },\n                \"sample\": {\n                  \"type\": \"object\"\n                }\n              },\n              \"required\": [\n                \"item\",\n                \"sample\"\n              }\n          }\n    EvalStoredCompletionsSource:\n      type: object\n      title: StoredCompletionsRunDataSource\n      description: |\n        A StoredCompletionsRunDataSource configuration describing a set of filters\n      properties:\n        type:\n          type: string\n          enum:\n            - stored_completions\n          default: stored_completions\n          description: The type of source. Always `stored_completions`.\n          x-stainless-const: true\n        metadata:\n          $ref: '#/components/schemas/Metadata'\n        model:\n          type: string\n          nullable: true\n          description: An optional model to filter by (e.g., 'gpt-4o').\n        created_after:\n          type: integer\n          nullable: true\n          description: An optional Unix timestamp to filter items created after this time.\n        created_before:\n          type: integer\n          nullable: true\n          description: An optional Unix timestamp to filter items created before this time.\n        limit:\n          type: integer\n          nullable: true\n          description: An optional maximum number of items to return.\n      required:\n        - type\n      x-oaiMeta:\n        name: The stored completions data source object used to configure an individual run\n        group: eval runs\n        example: |\n          {\n            \"type\": \"stored_completions\",\n            \"model\": \"gpt-4o\",\n            \"created_after\": 1668124800,\n            \"created_before\": 1668124900,\n            \"limit\": 100,\n            \"metadata\": {}\n          }\n    FileExpirationAfter:\n      type: object\n      title: File expiration policy\n      description: >-\n        The expiration policy for a file. By default, files with `purpose=batch` expire after 30 days and all\n        other files are persisted until they are manually deleted.\n      properties:\n        anchor:\n          description: 'Anchor timestamp after which the expiration policy applies. Supported anchors: `created_at`.'\n          type: string\n          enum:\n            - created_at\n          x-stainless-const: true\n        seconds:\n          description: >-\n            The number of seconds after the anchor time that the file will expire. Must be between 3600 (1\n            hour) and 2592000 (30 days).\n          type: integer\n          minimum: 3600\n          maximum: 2592000\n      required:\n        - anchor\n        - seconds\n    FilePath:\n      type: object\n      title: File path\n      description: |\n        A path to a file.\n      properties:\n        type:\n          type: string\n          description: |\n            The type of the file path. Always `file_path`.\n          enum:\n            - file_path\n          x-stainless-const: true\n        file_id:\n          type: string\n          description: |\n            The ID of the file.\n        index:\n          type: integer\n          description: |\n            The index of the file in the list of files.\n      required:\n        - type\n        - file_id\n        - index\n    FileSearchRanker:\n      type: string\n      description: The ranker to use for the file search. If not specified will use the `auto` ranker.\n      enum:\n        - auto\n        - default_2024_08_21\n    FileSearchRankingOptions:\n      title: File search tool call ranking options\n      type: object\n      description: >\n        The ranking options for the file search. If not specified, the file search tool will use the `auto`\n        ranker and a score_threshold of 0.\n\n\n        See the [file search tool\n        documentation](https://platform.openai.com/docs/assistants/tools/file-search#customizing-file-search-settings)\n        for more information.\n      properties:\n        ranker:\n          $ref: '#/components/schemas/FileSearchRanker'\n        score_threshold:\n          type: number\n          description: >-\n            The score threshold for the file search. All values must be a floating point number between 0 and\n            1.\n          minimum: 0\n          maximum: 1\n      required:\n        - score_threshold\n    FileSearchToolCall:\n      type: object\n      title: File search tool call\n      description: |\n        The results of a file search tool call. See the\n        [file search guide](https://platform.openai.com/docs/guides/tools-file-search) for more information.\n      properties:\n        id:\n          type: string\n          description: |\n            The unique ID of the file search tool call.\n        type:\n          type: string\n          enum:\n            - file_search_call\n          description: |\n            The type of the file search tool call. Always `file_search_call`.\n          x-stainless-const: true\n        status:\n          type: string\n          description: |\n            The status of the file search tool call. One of `in_progress`,\n            `searching`, `incomplete` or `failed`,\n          enum:\n            - in_progress\n            - searching\n            - completed\n            - incomplete\n            - failed\n        queries:\n          type: array\n          items:\n            type: string\n          description: |\n            The queries used to search for files.\n        results:\n          type: array\n          description: |\n            The results of the file search tool call.\n          items:\n            type: object\n            properties:\n              file_id:\n                type: string\n                description: |\n                  The unique ID of the file.\n              text:\n                type: string\n                description: |\n                  The text that was retrieved from the file.\n              filename:\n                type: string\n                description: |\n                  The name of the file.\n              attributes:\n                $ref: '#/components/schemas/VectorStoreFileAttributes'\n              score:\n                type: number\n                format: float\n                description: |\n                  The relevance score of the file - a value between 0 and 1.\n          nullable: true\n      required:\n        - id\n        - type\n        - status\n        - queries\n    FineTuneChatCompletionRequestAssistantMessage:\n      allOf:\n        - type: object\n          title: Assistant message\n          deprecated: false\n          properties:\n            weight:\n              type: integer\n              enum:\n                - 0\n                - 1\n              description: Controls whether the assistant message is trained against (0 or 1)\n        - $ref: '#/components/schemas/ChatCompletionRequestAssistantMessage'\n      required:\n        - role\n    FineTuneChatRequestInput:\n      type: object\n      description: |\n        The per-line training example of a fine-tuning input file for chat models using the supervised method.\n        Input messages may contain text or image content only. Audio and file input messages\n        are not currently supported for fine-tuning.\n      properties:\n        messages:\n          type: array\n          minItems: 1\n          items:\n            anyOf:\n              - $ref: '#/components/schemas/ChatCompletionRequestSystemMessage'\n              - $ref: '#/components/schemas/ChatCompletionRequestUserMessage'\n              - $ref: '#/components/schemas/FineTuneChatCompletionRequestAssistantMessage'\n              - $ref: '#/components/schemas/ChatCompletionRequestToolMessage'\n              - $ref: '#/components/schemas/ChatCompletionRequestFunctionMessage'\n        tools:\n          type: array\n          description: A list of tools the model may generate JSON inputs for.\n          items:\n            $ref: '#/components/schemas/ChatCompletionTool'\n        parallel_tool_calls:\n          $ref: '#/components/schemas/ParallelToolCalls'\n        functions:\n          deprecated: true\n          description: A list of functions the model may generate JSON inputs for.\n          type: array\n          minItems: 1\n          maxItems: 128\n          items:\n            $ref: '#/components/schemas/ChatCompletionFunctions'\n      x-oaiMeta:\n        name: Training format for chat models using the supervised method\n        example: |\n          {\n            \"messages\": [\n              { \"role\": \"user\", \"content\": \"What is the weather in San Francisco?\" },\n              {\n                \"role\": \"assistant\",\n                \"tool_calls\": [\n                  {\n                    \"id\": \"call_id\",\n                    \"type\": \"function\",\n                    \"function\": {\n                      \"name\": \"get_current_weather\",\n                      \"arguments\": \"{\\\"location\\\": \\\"San Francisco, USA\\\", \\\"format\\\": \\\"celsius\\\"}\"\n                    }\n                  }\n                ]\n              }\n            ],\n            \"parallel_tool_calls\": false,\n            \"tools\": [\n              {\n                \"type\": \"function\",\n                \"function\": {\n                  \"name\": \"get_current_weather\",\n                  \"description\": \"Get the current weather\",\n                  \"parameters\": {\n                    \"type\": \"object\",\n                    \"properties\": {\n                      \"location\": {\n                          \"type\": \"string\",\n                          \"description\": \"The city and country, eg. San Francisco, USA\"\n                      },\n                      \"format\": { \"type\": \"string\", \"enum\": [\"celsius\", \"fahrenheit\"] }\n                    },\n                    \"required\": [\"location\", \"format\"]\n                  }\n                }\n              }\n            ]\n          }\n    FineTuneDPOHyperparameters:\n      type: object\n      description: The hyperparameters used for the DPO fine-tuning job.\n      properties:\n        beta:\n          description: >\n            The beta value for the DPO method. A higher beta value will increase the weight of the penalty\n            between the policy and reference model.\n          anyOf:\n            - type: string\n              enum:\n                - auto\n              x-stainless-const: true\n            - type: number\n              minimum: 0\n              maximum: 2\n              exclusiveMinimum: true\n        batch_size:\n          description: >\n            Number of examples in each batch. A larger batch size means that model parameters are updated less\n            frequently, but with lower variance.\n          default: auto\n          anyOf:\n            - type: string\n              enum:\n                - auto\n              x-stainless-const: true\n            - type: integer\n              minimum: 1\n              maximum: 256\n        learning_rate_multiplier:\n          description: |\n            Scaling factor for the learning rate. A smaller learning rate may be useful to avoid overfitting.\n          anyOf:\n            - type: string\n              enum:\n                - auto\n              x-stainless-const: true\n            - type: number\n              minimum: 0\n              exclusiveMinimum: true\n        n_epochs:\n          description: >\n            The number of epochs to train the model for. An epoch refers to one full cycle through the\n            training dataset.\n          default: auto\n          anyOf:\n            - type: string\n              enum:\n                - auto\n              x-stainless-const: true\n            - type: integer\n              minimum: 1\n              maximum: 50\n    FineTuneDPOMethod:\n      type: object\n      description: Configuration for the DPO fine-tuning method.\n      properties:\n        hyperparameters:\n          $ref: '#/components/schemas/FineTuneDPOHyperparameters'\n    FineTuneMethod:\n      type: object\n      description: The method used for fine-tuning.\n      properties:\n        type:\n          type: string\n          description: The type of method. Is either `supervised`, `dpo`, or `reinforcement`.\n          enum:\n            - supervised\n            - dpo\n            - reinforcement\n        supervised:\n          $ref: '#/components/schemas/FineTuneSupervisedMethod'\n        dpo:\n          $ref: '#/components/schemas/FineTuneDPOMethod'\n        reinforcement:\n          $ref: '#/components/schemas/FineTuneReinforcementMethod'\n      required:\n        - type\n    FineTunePreferenceRequestInput:\n      type: object\n      description: |\n        The per-line training example of a fine-tuning input file for chat models using the dpo method.\n        Input messages may contain text or image content only. Audio and file input messages\n        are not currently supported for fine-tuning.\n      properties:\n        input:\n          type: object\n          properties:\n            messages:\n              type: array\n              minItems: 1\n              items:\n                anyOf:\n                  - $ref: '#/components/schemas/ChatCompletionRequestSystemMessage'\n                  - $ref: '#/components/schemas/ChatCompletionRequestUserMessage'\n                  - $ref: '#/components/schemas/FineTuneChatCompletionRequestAssistantMessage'\n                  - $ref: '#/components/schemas/ChatCompletionRequestToolMessage'\n                  - $ref: '#/components/schemas/ChatCompletionRequestFunctionMessage'\n            tools:\n              type: array\n              description: A list of tools the model may generate JSON inputs for.\n              items:\n                $ref: '#/components/schemas/ChatCompletionTool'\n            parallel_tool_calls:\n              $ref: '#/components/schemas/ParallelToolCalls'\n        preferred_output:\n          type: array\n          description: The preferred completion message for the output.\n          maxItems: 1\n          items:\n            anyOf:\n              - $ref: '#/components/schemas/ChatCompletionRequestAssistantMessage'\n        non_preferred_output:\n          type: array\n          description: The non-preferred completion message for the output.\n          maxItems: 1\n          items:\n            anyOf:\n              - $ref: '#/components/schemas/ChatCompletionRequestAssistantMessage'\n      x-oaiMeta:\n        name: Training format for chat models using the preference method\n        example: |\n          {\n            \"input\": {\n              \"messages\": [\n                { \"role\": \"user\", \"content\": \"What is the weather in San Francisco?\" }\n              ]\n            },\n            \"preferred_output\": [\n              {\n                \"role\": \"assistant\",\n                \"content\": \"The weather in San Francisco is 70 degrees Fahrenheit.\"\n              }\n            ],\n            \"non_preferred_output\": [\n              {\n                \"role\": \"assistant\",\n                \"content\": \"The weather in San Francisco is 21 degrees Celsius.\"\n              }\n            ]\n          }\n    FineTuneReinforcementHyperparameters:\n      type: object\n      description: The hyperparameters used for the reinforcement fine-tuning job.\n      properties:\n        batch_size:\n          description: >\n            Number of examples in each batch. A larger batch size means that model parameters are updated less\n            frequently, but with lower variance.\n          default: auto\n          anyOf:\n            - type: string\n              enum:\n                - auto\n              x-stainless-const: true\n            - type: integer\n              minimum: 1\n              maximum: 256\n        learning_rate_multiplier:\n          description: |\n            Scaling factor for the learning rate. A smaller learning rate may be useful to avoid overfitting.\n          anyOf:\n            - type: string\n              enum:\n                - auto\n              x-stainless-const: true\n            - type: number\n              minimum: 0\n              exclusiveMinimum: true\n        n_epochs:\n          description: >\n            The number of epochs to train the model for. An epoch refers to one full cycle through the\n            training dataset.\n          default: auto\n          anyOf:\n            - type: string\n              enum:\n                - auto\n              x-stainless-const: true\n            - type: integer\n              minimum: 1\n              maximum: 50\n        reasoning_effort:\n          description: |\n            Level of reasoning effort.\n          type: string\n          enum:\n            - default\n            - low\n            - medium\n            - high\n          default: default\n        compute_multiplier:\n          description: |\n            Multiplier on amount of compute used for exploring search space during training.\n          anyOf:\n            - type: string\n              enum:\n                - auto\n              x-stainless-const: true\n            - type: number\n              minimum: 0.00001\n              maximum: 10\n              exclusiveMinimum: true\n        eval_interval:\n          description: |\n            The number of training steps between evaluation runs.\n          default: auto\n          anyOf:\n            - type: string\n              enum:\n                - auto\n              x-stainless-const: true\n            - type: integer\n              minimum: 1\n        eval_samples:\n          description: |\n            Number of evaluation samples to generate per training step.\n          default: auto\n          anyOf:\n            - type: string\n              enum:\n                - auto\n              x-stainless-const: true\n            - type: integer\n              minimum: 1\n    FineTuneReinforcementMethod:\n      type: object\n      description: Configuration for the reinforcement fine-tuning method.\n      properties:\n        grader:\n          type: object\n          description: The grader used for the fine-tuning job.\n          anyOf:\n            - $ref: '#/components/schemas/GraderStringCheck'\n            - $ref: '#/components/schemas/GraderTextSimilarity'\n            - $ref: '#/components/schemas/GraderPython'\n            - $ref: '#/components/schemas/GraderScoreModel'\n            - $ref: '#/components/schemas/GraderMulti'\n        hyperparameters:\n          $ref: '#/components/schemas/FineTuneReinforcementHyperparameters'\n      required:\n        - grader\n    FineTuneReinforcementRequestInput:\n      type: object\n      unevaluatedProperties: true\n      description: >\n        Per-line training example for reinforcement fine-tuning. Note that `messages` and `tools` are the only\n        reserved keywords.\n\n        Any other arbitrary key-value data can be included on training datapoints and will be available to\n        reference during grading under the `{{ item.XXX }}` template variable.\n\n        Input messages may contain text or image content only. Audio and file input messages\n\n        are not currently supported for fine-tuning.\n      required:\n        - messages\n      properties:\n        messages:\n          type: array\n          minItems: 1\n          items:\n            anyOf:\n              - $ref: '#/components/schemas/ChatCompletionRequestDeveloperMessage'\n              - $ref: '#/components/schemas/ChatCompletionRequestUserMessage'\n              - $ref: '#/components/schemas/FineTuneChatCompletionRequestAssistantMessage'\n              - $ref: '#/components/schemas/ChatCompletionRequestToolMessage'\n        tools:\n          type: array\n          description: A list of tools the model may generate JSON inputs for.\n          items:\n            $ref: '#/components/schemas/ChatCompletionTool'\n      x-oaiMeta:\n        name: Training format for reasoning models using the reinforcement method\n        example: |\n          {\n            \"messages\": [\n              {\n                \"role\": \"user\",\n                \"content\": \"Your task is to take a chemical in SMILES format and predict the number of hydrobond bond donors and acceptors according to Lipinkski's rule. CCN(CC)CCC(=O)c1sc(N)nc1C\"\n              },\n            ],\n            # Any other JSON data can be inserted into an example and referenced during RFT grading\n            \"reference_answer\": {\n              \"donor_bond_counts\": 5,\n              \"acceptor_bond_counts\": 7\n            }\n          }\n    FineTuneSupervisedHyperparameters:\n      type: object\n      description: The hyperparameters used for the fine-tuning job.\n      properties:\n        batch_size:\n          description: >\n            Number of examples in each batch. A larger batch size means that model parameters are updated less\n            frequently, but with lower variance.\n          default: auto\n          anyOf:\n            - type: string\n              enum:\n                - auto\n              x-stainless-const: true\n            - type: integer\n              minimum: 1\n              maximum: 256\n        learning_rate_multiplier:\n          description: |\n            Scaling factor for the learning rate. A smaller learning rate may be useful to avoid overfitting.\n          anyOf:\n            - type: string\n              enum:\n                - auto\n              x-stainless-const: true\n            - type: number\n              minimum: 0\n              exclusiveMinimum: true\n        n_epochs:\n          description: >\n            The number of epochs to train the model for. An epoch refers to one full cycle through the\n            training dataset.\n          default: auto\n          anyOf:\n            - type: string\n              enum:\n                - auto\n              x-stainless-const: true\n            - type: integer\n              minimum: 1\n              maximum: 50\n    FineTuneSupervisedMethod:\n      type: object\n      description: Configuration for the supervised fine-tuning method.\n      properties:\n        hyperparameters:\n          $ref: '#/components/schemas/FineTuneSupervisedHyperparameters'\n    FineTuningCheckpointPermission:\n      type: object\n      title: FineTuningCheckpointPermission\n      description: |\n        The `checkpoint.permission` object represents a permission for a fine-tuned model checkpoint.\n      properties:\n        id:\n          type: string\n          description: The permission identifier, which can be referenced in the API endpoints.\n        created_at:\n          type: integer\n          description: The Unix timestamp (in seconds) for when the permission was created.\n        project_id:\n          type: string\n          description: The project identifier that the permission is for.\n        object:\n          type: string\n          description: The object type, which is always \"checkpoint.permission\".\n          enum:\n            - checkpoint.permission\n          x-stainless-const: true\n      required:\n        - created_at\n        - id\n        - object\n        - project_id\n      x-oaiMeta:\n        name: The fine-tuned model checkpoint permission object\n        example: |\n          {\n            \"object\": \"checkpoint.permission\",\n            \"id\": \"cp_zc4Q7MP6XxulcVzj4MZdwsAB\",\n            \"created_at\": 1712211699,\n            \"project_id\": \"proj_abGMw1llN8IrBb6SvvY5A1iH\"\n          }\n    FineTuningIntegration:\n      type: object\n      title: Fine-Tuning Job Integration\n      required:\n        - type\n        - wandb\n      properties:\n        type:\n          type: string\n          description: The type of the integration being enabled for the fine-tuning job\n          enum:\n            - wandb\n          x-stainless-const: true\n        wandb:\n          type: object\n          description: |\n            The settings for your integration with Weights and Biases. This payload specifies the project that\n            metrics will be sent to. Optionally, you can set an explicit display name for your run, add tags\n            to your run, and set a default entity (team, username, etc) to be associated with your run.\n          required:\n            - project\n          properties:\n            project:\n              description: |\n                The name of the project that the new run will be created under.\n              type: string\n              example: my-wandb-project\n            name:\n              description: |\n                A display name to set for the run. If not set, we will use the Job ID as the name.\n              nullable: true\n              type: string\n            entity:\n              description: >\n                The entity to use for the run. This allows you to set the team or username of the WandB user\n                that you would\n\n                like associated with the run. If not set, the default entity for the registered WandB API key\n                is used.\n              nullable: true\n              type: string\n            tags:\n              description: >\n                A list of tags to be attached to the newly created run. These tags are passed through directly\n                to WandB. Some\n\n                default tags are generated by OpenAI: \"openai/finetune\", \"openai/{base-model}\",\n                \"openai/{ftjob-abcdef}\".\n              type: array\n              items:\n                type: string\n                example: custom-tag\n    FineTuningJob:\n      type: object\n      title: FineTuningJob\n      description: |\n        The `fine_tuning.job` object represents a fine-tuning job that has been created through the API.\n      properties:\n        id:\n          type: string\n          description: The object identifier, which can be referenced in the API endpoints.\n        created_at:\n          type: integer\n          description: The Unix timestamp (in seconds) for when the fine-tuning job was created.\n        error:\n          type: object\n          nullable: true\n          description: >-\n            For fine-tuning jobs that have `failed`, this will contain more information on the cause of the\n            failure.\n          properties:\n            code:\n              type: string\n              description: A machine-readable error code.\n            message:\n              type: string\n              description: A human-readable error message.\n            param:\n              type: string\n              description: >-\n                The parameter that was invalid, usually `training_file` or `validation_file`. This field will\n                be null if the failure was not parameter-specific.\n              nullable: true\n          required:\n            - code\n            - message\n            - param\n        fine_tuned_model:\n          type: string\n          nullable: true\n          description: >-\n            The name of the fine-tuned model that is being created. The value will be null if the fine-tuning\n            job is still running.\n        finished_at:\n          type: integer\n          nullable: true\n          description: >-\n            The Unix timestamp (in seconds) for when the fine-tuning job was finished. The value will be null\n            if the fine-tuning job is still running.\n        hyperparameters:\n          type: object\n          description: >-\n            The hyperparameters used for the fine-tuning job. This value will only be returned when running\n            `supervised` jobs.\n          properties:\n            batch_size:\n              nullable: true\n              description: |\n                Number of examples in each batch. A larger batch size means that model parameters\n                are updated less frequently, but with lower variance.\n              anyOf:\n                - type: string\n                  enum:\n                    - auto\n                  x-stainless-const: true\n                  title: Auto\n                - type: integer\n                  minimum: 1\n                  maximum: 256\n                  title: Manual\n            learning_rate_multiplier:\n              description: |\n                Scaling factor for the learning rate. A smaller learning rate may be useful to avoid\n                overfitting.\n              anyOf:\n                - type: string\n                  enum:\n                    - auto\n                  x-stainless-const: true\n                  title: Auto\n                - type: number\n                  minimum: 0\n                  exclusiveMinimum: true\n            n_epochs:\n              description: |\n                The number of epochs to train the model for. An epoch refers to one full cycle\n                through the training dataset.\n              default: auto\n              anyOf:\n                - type: string\n                  enum:\n                    - auto\n                  x-stainless-const: true\n                  title: Auto\n                - type: integer\n                  minimum: 1\n                  maximum: 50\n        model:\n          type: string\n          description: The base model that is being fine-tuned.\n        object:\n          type: string\n          description: The object type, which is always \"fine_tuning.job\".\n          enum:\n            - fine_tuning.job\n          x-stainless-const: true\n        organization_id:\n          type: string\n          description: The organization that owns the fine-tuning job.\n        result_files:\n          type: array\n          description: >-\n            The compiled results file ID(s) for the fine-tuning job. You can retrieve the results with the\n            [Files API](https://platform.openai.com/docs/api-reference/files/retrieve-contents).\n          items:\n            type: string\n            example: file-abc123\n        status:\n          type: string\n          description: >-\n            The current status of the fine-tuning job, which can be either `validating_files`, `queued`,\n            `running`, `succeeded`, `failed`, or `cancelled`.\n          enum:\n            - validating_files\n            - queued\n            - running\n            - succeeded\n            - failed\n            - cancelled\n        trained_tokens:\n          type: integer\n          nullable: true\n          description: >-\n            The total number of billable tokens processed by this fine-tuning job. The value will be null if\n            the fine-tuning job is still running.\n        training_file:\n          type: string\n          description: >-\n            The file ID used for training. You can retrieve the training data with the [Files\n            API](https://platform.openai.com/docs/api-reference/files/retrieve-contents).\n        validation_file:\n          type: string\n          nullable: true\n          description: >-\n            The file ID used for validation. You can retrieve the validation results with the [Files\n            API](https://platform.openai.com/docs/api-reference/files/retrieve-contents).\n        integrations:\n          type: array\n          nullable: true\n          description: A list of integrations to enable for this fine-tuning job.\n          maxItems: 5\n          items:\n            anyOf:\n              - $ref: '#/components/schemas/FineTuningIntegration'\n            discriminator:\n              propertyName: type\n        seed:\n          type: integer\n          description: The seed used for the fine-tuning job.\n        estimated_finish:\n          type: integer\n          nullable: true\n          description: >-\n            The Unix timestamp (in seconds) for when the fine-tuning job is estimated to finish. The value\n            will be null if the fine-tuning job is not running.\n        method:\n          $ref: '#/components/schemas/FineTuneMethod'\n        metadata:\n          $ref: '#/components/schemas/Metadata'\n      required:\n        - created_at\n        - error\n        - finished_at\n        - fine_tuned_model\n        - hyperparameters\n        - id\n        - model\n        - object\n        - organization_id\n        - result_files\n        - status\n        - trained_tokens\n        - training_file\n        - validation_file\n        - seed\n      x-oaiMeta:\n        name: The fine-tuning job object\n        example: |\n          {\n            \"object\": \"fine_tuning.job\",\n            \"id\": \"ftjob-abc123\",\n            \"model\": \"davinci-002\",\n            \"created_at\": 1692661014,\n            \"finished_at\": 1692661190,\n            \"fine_tuned_model\": \"ft:davinci-002:my-org:custom_suffix:7q8mpxmy\",\n            \"organization_id\": \"org-123\",\n            \"result_files\": [\n                \"file-abc123\"\n            ],\n            \"status\": \"succeeded\",\n            \"validation_file\": null,\n            \"training_file\": \"file-abc123\",\n            \"hyperparameters\": {\n                \"n_epochs\": 4,\n                \"batch_size\": 1,\n                \"learning_rate_multiplier\": 1.0\n            },\n            \"trained_tokens\": 5768,\n            \"integrations\": [],\n            \"seed\": 0,\n            \"estimated_finish\": 0,\n            \"method\": {\n              \"type\": \"supervised\",\n              \"supervised\": {\n                \"hyperparameters\": {\n                  \"n_epochs\": 4,\n                  \"batch_size\": 1,\n                  \"learning_rate_multiplier\": 1.0\n                }\n              }\n            },\n            \"metadata\": {\n              \"key\": \"value\"\n            }\n          }\n    FineTuningJobCheckpoint:\n      type: object\n      title: FineTuningJobCheckpoint\n      description: >\n        The `fine_tuning.job.checkpoint` object represents a model checkpoint for a fine-tuning job that is\n        ready to use.\n      properties:\n        id:\n          type: string\n          description: The checkpoint identifier, which can be referenced in the API endpoints.\n        created_at:\n          type: integer\n          description: The Unix timestamp (in seconds) for when the checkpoint was created.\n        fine_tuned_model_checkpoint:\n          type: string\n          description: The name of the fine-tuned checkpoint model that is created.\n        step_number:\n          type: integer\n          description: The step number that the checkpoint was created at.\n        metrics:\n          type: object\n          description: Metrics at the step number during the fine-tuning job.\n          properties:\n            step:\n              type: number\n            train_loss:\n              type: number\n            train_mean_token_accuracy:\n              type: number\n            valid_loss:\n              type: number\n            valid_mean_token_accuracy:\n              type: number\n            full_valid_loss:\n              type: number\n            full_valid_mean_token_accuracy:\n              type: number\n        fine_tuning_job_id:\n          type: string\n          description: The name of the fine-tuning job that this checkpoint was created from.\n        object:\n          type: string\n          description: The object type, which is always \"fine_tuning.job.checkpoint\".\n          enum:\n            - fine_tuning.job.checkpoint\n          x-stainless-const: true\n      required:\n        - created_at\n        - fine_tuning_job_id\n        - fine_tuned_model_checkpoint\n        - id\n        - metrics\n        - object\n        - step_number\n      x-oaiMeta:\n        name: The fine-tuning job checkpoint object\n        example: |\n          {\n            \"object\": \"fine_tuning.job.checkpoint\",\n            \"id\": \"ftckpt_qtZ5Gyk4BLq1SfLFWp3RtO3P\",\n            \"created_at\": 1712211699,\n            \"fine_tuned_model_checkpoint\": \"ft:gpt-4o-mini-2024-07-18:my-org:custom_suffix:9ABel2dg:ckpt-step-88\",\n            \"fine_tuning_job_id\": \"ftjob-fpbNQ3H1GrMehXRf8cO97xTN\",\n            \"metrics\": {\n              \"step\": 88,\n              \"train_loss\": 0.478,\n              \"train_mean_token_accuracy\": 0.924,\n              \"valid_loss\": 10.112,\n              \"valid_mean_token_accuracy\": 0.145,\n              \"full_valid_loss\": 0.567,\n              \"full_valid_mean_token_accuracy\": 0.944\n            },\n            \"step_number\": 88\n          }\n    FineTuningJobEvent:\n      type: object\n      description: Fine-tuning job event object\n      properties:\n        object:\n          type: string\n          description: The object type, which is always \"fine_tuning.job.event\".\n          enum:\n            - fine_tuning.job.event\n          x-stainless-const: true\n        id:\n          type: string\n          description: The object identifier.\n        created_at:\n          type: integer\n          description: The Unix timestamp (in seconds) for when the fine-tuning job was created.\n        level:\n          type: string\n          description: The log level of the event.\n          enum:\n            - info\n            - warn\n            - error\n        message:\n          type: string\n          description: The message of the event.\n        type:\n          type: string\n          description: The type of event.\n          enum:\n            - message\n            - metrics\n        data:\n          type: object\n          description: The data associated with the event.\n      required:\n        - id\n        - object\n        - created_at\n        - level\n        - message\n      x-oaiMeta:\n        name: The fine-tuning job event object\n        example: |\n          {\n            \"object\": \"fine_tuning.job.event\",\n            \"id\": \"ftevent-abc123\"\n            \"created_at\": 1677610602,\n            \"level\": \"info\",\n            \"message\": \"Created fine-tuning job\",\n            \"data\": {},\n            \"type\": \"message\"\n          }\n    FunctionObject:\n      type: object\n      properties:\n        description:\n          type: string\n          description: >-\n            A description of what the function does, used by the model to choose when and how to call the\n            function.\n        name:\n          type: string\n          description: >-\n            The name of the function to be called. Must be a-z, A-Z, 0-9, or contain underscores and dashes,\n            with a maximum length of 64.\n        parameters:\n          $ref: '#/components/schemas/FunctionParameters'\n        strict:\n          type: boolean\n          nullable: true\n          default: false\n          description: >-\n            Whether to enable strict schema adherence when generating the function call. If set to true, the\n            model will follow the exact schema defined in the `parameters` field. Only a subset of JSON Schema\n            is supported when `strict` is `true`. Learn more about Structured Outputs in the [function calling\n            guide](https://platform.openai.com/docs/guides/function-calling).\n      required:\n        - name\n    FunctionParameters:\n      type: object\n      description: >-\n        The parameters the functions accepts, described as a JSON Schema object. See the\n        [guide](https://platform.openai.com/docs/guides/function-calling) for examples, and the [JSON Schema\n        reference](https://json-schema.org/understanding-json-schema/) for documentation about the format.\n\n\n        Omitting `parameters` defines a function with an empty parameter list.\n      additionalProperties: true\n    FunctionToolCall:\n      type: object\n      title: Function tool call\n      description: >\n        A tool call to run a function. See the\n\n        [function calling guide](https://platform.openai.com/docs/guides/function-calling) for more\n        information.\n      properties:\n        id:\n          type: string\n          description: |\n            The unique ID of the function tool call.\n        type:\n          type: string\n          enum:\n            - function_call\n          description: |\n            The type of the function tool call. Always `function_call`.\n          x-stainless-const: true\n        call_id:\n          type: string\n          description: |\n            The unique ID of the function tool call generated by the model.\n        name:\n          type: string\n          description: |\n            The name of the function to run.\n        arguments:\n          type: string\n          description: |\n            A JSON string of the arguments to pass to the function.\n        status:\n          type: string\n          description: |\n            The status of the item. One of `in_progress`, `completed`, or\n            `incomplete`. Populated when items are returned via API.\n          enum:\n            - in_progress\n            - completed\n            - incomplete\n      required:\n        - type\n        - call_id\n        - name\n        - arguments\n    FunctionToolCallOutput:\n      type: object\n      title: Function tool call output\n      description: |\n        The output of a function tool call.\n      properties:\n        id:\n          type: string\n          description: |\n            The unique ID of the function tool call output. Populated when this item\n            is returned via API.\n        type:\n          type: string\n          enum:\n            - function_call_output\n          description: |\n            The type of the function tool call output. Always `function_call_output`.\n          x-stainless-const: true\n        call_id:\n          type: string\n          description: |\n            The unique ID of the function tool call generated by the model.\n        output:\n          type: string\n          description: |\n            A JSON string of the output of the function tool call.\n        status:\n          type: string\n          description: |\n            The status of the item. One of `in_progress`, `completed`, or\n            `incomplete`. Populated when items are returned via API.\n          enum:\n            - in_progress\n            - completed\n            - incomplete\n      required:\n        - type\n        - call_id\n        - output\n    FunctionToolCallOutputResource:\n      allOf:\n        - $ref: '#/components/schemas/FunctionToolCallOutput'\n        - type: object\n          properties:\n            id:\n              type: string\n              description: |\n                The unique ID of the function call tool output.\n          required:\n            - id\n    FunctionToolCallResource:\n      allOf:\n        - $ref: '#/components/schemas/FunctionToolCall'\n        - type: object\n          properties:\n            id:\n              type: string\n              description: |\n                The unique ID of the function tool call.\n          required:\n            - id\n    GraderLabelModel:\n      type: object\n      title: LabelModelGrader\n      description: |\n        A LabelModelGrader object which uses a model to assign labels to each item\n        in the evaluation.\n      properties:\n        type:\n          description: The object type, which is always `label_model`.\n          type: string\n          enum:\n            - label_model\n          x-stainless-const: true\n        name:\n          type: string\n          description: The name of the grader.\n        model:\n          type: string\n          description: The model to use for the evaluation. Must support structured outputs.\n        input:\n          type: array\n          items:\n            $ref: '#/components/schemas/EvalItem'\n        labels:\n          type: array\n          items:\n            type: string\n          description: The labels to assign to each item in the evaluation.\n        passing_labels:\n          type: array\n          items:\n            type: string\n          description: The labels that indicate a passing result. Must be a subset of labels.\n      required:\n        - type\n        - model\n        - input\n        - passing_labels\n        - labels\n        - name\n      x-oaiMeta:\n        name: Label Model Grader\n        group: graders\n        example: |\n          {\n            \"name\": \"First label grader\",\n            \"type\": \"label_model\",\n            \"model\": \"gpt-4o-2024-08-06\",\n            \"input\": [\n              {\n                \"type\": \"message\",\n                \"role\": \"system\",\n                \"content\": {\n                  \"type\": \"input_text\",\n                  \"text\": \"Classify the sentiment of the following statement as one of positive, neutral, or negative\"\n                }\n              },\n              {\n                \"type\": \"message\",\n                \"role\": \"user\",\n                \"content\": {\n                  \"type\": \"input_text\",\n                  \"text\": \"Statement: {{item.response}}\"\n                }\n              }\n            ],\n            \"passing_labels\": [\n              \"positive\"\n            ],\n            \"labels\": [\n              \"positive\",\n              \"neutral\",\n              \"negative\"\n            ]\n          }\n    GraderMulti:\n      type: object\n      title: MultiGrader\n      description: A MultiGrader object combines the output of multiple graders to produce a single score.\n      properties:\n        type:\n          type: string\n          enum:\n            - multi\n          default: multi\n          description: The object type, which is always `multi`.\n          x-stainless-const: true\n        name:\n          type: string\n          description: The name of the grader.\n        graders:\n          anyOf:\n            - $ref: '#/components/schemas/GraderStringCheck'\n            - $ref: '#/components/schemas/GraderTextSimilarity'\n            - $ref: '#/components/schemas/GraderPython'\n            - $ref: '#/components/schemas/GraderScoreModel'\n            - $ref: '#/components/schemas/GraderLabelModel'\n        calculate_output:\n          type: string\n          description: A formula to calculate the output based on grader results.\n      required:\n        - name\n        - type\n        - graders\n        - calculate_output\n      x-oaiMeta:\n        name: Multi Grader\n        group: graders\n        example: |\n          {\n            \"type\": \"multi\",\n            \"name\": \"example multi grader\",\n            \"graders\": [\n              {\n                \"type\": \"text_similarity\",\n                \"name\": \"example text similarity grader\",\n                \"input\": \"The graded text\",\n                \"reference\": \"The reference text\",\n                \"evaluation_metric\": \"fuzzy_match\"\n              },\n              {\n                \"type\": \"string_check\",\n                \"name\": \"Example string check grader\",\n                \"input\": \"{{sample.output_text}}\",\n                \"reference\": \"{{item.label}}\",\n                \"operation\": \"eq\"\n              }\n            ],\n            \"calculate_output\": \"0.5 * text_similarity_score +  0.5 * string_check_score)\"\n          }\n    GraderPython:\n      type: object\n      title: PythonGrader\n      description: |\n        A PythonGrader object that runs a python script on the input.\n      properties:\n        type:\n          type: string\n          enum:\n            - python\n          description: The object type, which is always `python`.\n          x-stainless-const: true\n        name:\n          type: string\n          description: The name of the grader.\n        source:\n          type: string\n          description: The source code of the python script.\n        image_tag:\n          type: string\n          description: The image tag to use for the python script.\n      required:\n        - type\n        - name\n        - source\n      x-oaiMeta:\n        name: Python Grader\n        group: graders\n        example: |\n          {\n            \"type\": \"python\",\n            \"name\": \"Example python grader\",\n            \"image_tag\": \"2025-05-08\",\n            \"source\": \"\"\"\n          def grade(sample: dict, item: dict) -> float:\n              \\\"\"\"\n              Returns 1.0 if `output_text` equals `label`, otherwise 0.0.\n              \\\"\"\"\n              output = sample.get(\"output_text\")\n              label = item.get(\"label\")\n              return 1.0 if output == label else 0.0\n          \"\"\",\n          }\n    GraderScoreModel:\n      type: object\n      title: ScoreModelGrader\n      description: |\n        A ScoreModelGrader object that uses a model to assign a score to the input.\n      properties:\n        type:\n          type: string\n          enum:\n            - score_model\n          description: The object type, which is always `score_model`.\n          x-stainless-const: true\n        name:\n          type: string\n          description: The name of the grader.\n        model:\n          type: string\n          description: The model to use for the evaluation.\n        sampling_params:\n          type: object\n          description: The sampling parameters for the model.\n        input:\n          type: array\n          items:\n            $ref: '#/components/schemas/EvalItem'\n          description: The input text. This may include template strings.\n        range:\n          type: array\n          items:\n            type: number\n            min_items: 2\n            max_items: 2\n          description: The range of the score. Defaults to `[0, 1]`.\n      required:\n        - type\n        - name\n        - input\n        - model\n      x-oaiMeta:\n        name: Score Model Grader\n        group: graders\n        example: |\n          {\n              \"type\": \"score_model\",\n              \"name\": \"Example score model grader\",\n              \"input\": [\n                  {\n                      \"role\": \"user\",\n                      \"content\": (\n                          \"Score how close the reference answer is to the model answer. Score 1.0 if they are the same and 0.0 if they are different.\"\n                          \" Return just a floating point score\\n\\n\"\n                          \" Reference answer: {{item.label}}\\n\\n\"\n                          \" Model answer: {{sample.output_text}}\"\n                      ),\n                  }\n              ],\n              \"model\": \"gpt-4o-2024-08-06\",\n              \"sampling_params\": {\n                  \"temperature\": 1,\n                  \"top_p\": 1,\n                  \"seed\": 42,\n              },\n          }\n    GraderStringCheck:\n      type: object\n      title: StringCheckGrader\n      description: >\n        A StringCheckGrader object that performs a string comparison between input and reference using a\n        specified operation.\n      properties:\n        type:\n          type: string\n          enum:\n            - string_check\n          description: The object type, which is always `string_check`.\n          x-stainless-const: true\n        name:\n          type: string\n          description: The name of the grader.\n        input:\n          type: string\n          description: The input text. This may include template strings.\n        reference:\n          type: string\n          description: The reference text. This may include template strings.\n        operation:\n          type: string\n          enum:\n            - eq\n            - ne\n            - like\n            - ilike\n          description: The string check operation to perform. One of `eq`, `ne`, `like`, or `ilike`.\n      required:\n        - type\n        - name\n        - input\n        - reference\n        - operation\n      x-oaiMeta:\n        name: String Check Grader\n        group: graders\n        example: |\n          {\n            \"type\": \"string_check\",\n            \"name\": \"Example string check grader\",\n            \"input\": \"{{sample.output_text}}\",\n            \"reference\": \"{{item.label}}\",\n            \"operation\": \"eq\"\n          }\n    GraderTextSimilarity:\n      type: object\n      title: TextSimilarityGrader\n      description: |\n        A TextSimilarityGrader object which grades text based on similarity metrics.\n      properties:\n        type:\n          type: string\n          enum:\n            - text_similarity\n          default: text_similarity\n          description: The type of grader.\n          x-stainless-const: true\n        name:\n          type: string\n          description: The name of the grader.\n        input:\n          type: string\n          description: The text being graded.\n        reference:\n          type: string\n          description: The text being graded against.\n        evaluation_metric:\n          type: string\n          enum:\n            - cosine\n            - fuzzy_match\n            - bleu\n            - gleu\n            - meteor\n            - rouge_1\n            - rouge_2\n            - rouge_3\n            - rouge_4\n            - rouge_5\n            - rouge_l\n          description: |\n            The evaluation metric to use. One of `cosine`, `fuzzy_match`, `bleu`,\n            `gleu`, `meteor`, `rouge_1`, `rouge_2`, `rouge_3`, `rouge_4`, `rouge_5`,\n            or `rouge_l`.\n      required:\n        - type\n        - name\n        - input\n        - reference\n        - evaluation_metric\n      x-oaiMeta:\n        name: Text Similarity Grader\n        group: graders\n        example: |\n          {\n            \"type\": \"text_similarity\",\n            \"name\": \"Example text similarity grader\",\n            \"input\": \"{{sample.output_text}}\",\n            \"reference\": \"{{item.label}}\",\n            \"evaluation_metric\": \"fuzzy_match\"\n          }\n    Image:\n      type: object\n      description: Represents the content or the URL of an image generated by the OpenAI API.\n      properties:\n        b64_json:\n          type: string\n          description: >-\n            The base64-encoded JSON of the generated image. Default value for `gpt-image-1`, and only present\n            if `response_format` is set to `b64_json` for `dall-e-2` and `dall-e-3`.\n        url:\n          type: string\n          description: >-\n            When using `dall-e-2` or `dall-e-3`, the URL of the generated image if `response_format` is set to\n            `url` (default value). Unsupported for `gpt-image-1`.\n        revised_prompt:\n          type: string\n          description: For `dall-e-3` only, the revised prompt that was used to generate the image.\n    ImageEditCompletedEvent:\n      type: object\n      description: |\n        Emitted when image editing has completed and the final image is available.\n      properties:\n        type:\n          type: string\n          description: |\n            The type of the event. Always `image_edit.completed`.\n          enum:\n            - image_edit.completed\n          x-stainless-const: true\n        b64_json:\n          type: string\n          description: |\n            Base64-encoded final edited image data, suitable for rendering as an image.\n        created_at:\n          type: integer\n          description: |\n            The Unix timestamp when the event was created.\n        size:\n          type: string\n          description: |\n            The size of the edited image.\n          enum:\n            - 1024x1024\n            - 1024x1536\n            - 1536x1024\n            - auto\n        quality:\n          type: string\n          description: |\n            The quality setting for the edited image.\n          enum:\n            - low\n            - medium\n            - high\n            - auto\n        background:\n          type: string\n          description: |\n            The background setting for the edited image.\n          enum:\n            - transparent\n            - opaque\n            - auto\n        output_format:\n          type: string\n          description: |\n            The output format for the edited image.\n          enum:\n            - png\n            - webp\n            - jpeg\n        usage:\n          $ref: '#/components/schemas/ImagesUsage'\n      required:\n        - type\n        - b64_json\n        - created_at\n        - size\n        - quality\n        - background\n        - output_format\n        - usage\n      x-oaiMeta:\n        name: image_edit.completed\n        group: images\n        example: |\n          {\n            \"type\": \"image_edit.completed\",\n            \"b64_json\": \"...\",\n            \"created_at\": 1620000000,\n            \"size\": \"1024x1024\",\n            \"quality\": \"high\",\n            \"background\": \"transparent\",\n            \"output_format\": \"png\",\n            \"usage\": {\n              \"total_tokens\": 100,\n              \"input_tokens\": 50,\n              \"output_tokens\": 50,\n              \"input_tokens_details\": {\n                \"text_tokens\": 10,\n                \"image_tokens\": 40\n              }\n            }\n          }\n    ImageEditPartialImageEvent:\n      type: object\n      description: |\n        Emitted when a partial image is available during image editing streaming.\n      properties:\n        type:\n          type: string\n          description: |\n            The type of the event. Always `image_edit.partial_image`.\n          enum:\n            - image_edit.partial_image\n          x-stainless-const: true\n        b64_json:\n          type: string\n          description: |\n            Base64-encoded partial image data, suitable for rendering as an image.\n        created_at:\n          type: integer\n          description: |\n            The Unix timestamp when the event was created.\n        size:\n          type: string\n          description: |\n            The size of the requested edited image.\n          enum:\n            - 1024x1024\n            - 1024x1536\n            - 1536x1024\n            - auto\n        quality:\n          type: string\n          description: |\n            The quality setting for the requested edited image.\n          enum:\n            - low\n            - medium\n            - high\n            - auto\n        background:\n          type: string\n          description: |\n            The background setting for the requested edited image.\n          enum:\n            - transparent\n            - opaque\n            - auto\n        output_format:\n          type: string\n          description: |\n            The output format for the requested edited image.\n          enum:\n            - png\n            - webp\n            - jpeg\n        partial_image_index:\n          type: integer\n          description: |\n            0-based index for the partial image (streaming).\n      required:\n        - type\n        - b64_json\n        - created_at\n        - size\n        - quality\n        - background\n        - output_format\n        - partial_image_index\n      x-oaiMeta:\n        name: image_edit.partial_image\n        group: images\n        example: |\n          {\n            \"type\": \"image_edit.partial_image\",\n            \"b64_json\": \"...\",\n            \"created_at\": 1620000000,\n            \"size\": \"1024x1024\",\n            \"quality\": \"high\",\n            \"background\": \"transparent\",\n            \"output_format\": \"png\",\n            \"partial_image_index\": 0\n          }\n    ImageEditStreamEvent:\n      anyOf:\n        - $ref: '#/components/schemas/ImageEditPartialImageEvent'\n        - $ref: '#/components/schemas/ImageEditCompletedEvent'\n      discriminator:\n        propertyName: type\n    ImageGenCompletedEvent:\n      type: object\n      description: |\n        Emitted when image generation has completed and the final image is available.\n      properties:\n        type:\n          type: string\n          description: |\n            The type of the event. Always `image_generation.completed`.\n          enum:\n            - image_generation.completed\n          x-stainless-const: true\n        b64_json:\n          type: string\n          description: |\n            Base64-encoded image data, suitable for rendering as an image.\n        created_at:\n          type: integer\n          description: |\n            The Unix timestamp when the event was created.\n        size:\n          type: string\n          description: |\n            The size of the generated image.\n          enum:\n            - 1024x1024\n            - 1024x1536\n            - 1536x1024\n            - auto\n        quality:\n          type: string\n          description: |\n            The quality setting for the generated image.\n          enum:\n            - low\n            - medium\n            - high\n            - auto\n        background:\n          type: string\n          description: |\n            The background setting for the generated image.\n          enum:\n            - transparent\n            - opaque\n            - auto\n        output_format:\n          type: string\n          description: |\n            The output format for the generated image.\n          enum:\n            - png\n            - webp\n            - jpeg\n        usage:\n          $ref: '#/components/schemas/ImagesUsage'\n      required:\n        - type\n        - b64_json\n        - created_at\n        - size\n        - quality\n        - background\n        - output_format\n        - usage\n      x-oaiMeta:\n        name: image_generation.completed\n        group: images\n        example: |\n          {\n            \"type\": \"image_generation.completed\",\n            \"b64_json\": \"...\",\n            \"created_at\": 1620000000,\n            \"size\": \"1024x1024\",\n            \"quality\": \"high\",\n            \"background\": \"transparent\",\n            \"output_format\": \"png\",\n            \"usage\": {\n              \"total_tokens\": 100,\n              \"input_tokens\": 50,\n              \"output_tokens\": 50,\n              \"input_tokens_details\": {\n                \"text_tokens\": 10,\n                \"image_tokens\": 40\n              }\n            }\n          }\n    ImageGenPartialImageEvent:\n      type: object\n      description: |\n        Emitted when a partial image is available during image generation streaming.\n      properties:\n        type:\n          type: string\n          description: |\n            The type of the event. Always `image_generation.partial_image`.\n          enum:\n            - image_generation.partial_image\n          x-stainless-const: true\n        b64_json:\n          type: string\n          description: |\n            Base64-encoded partial image data, suitable for rendering as an image.\n        created_at:\n          type: integer\n          description: |\n            The Unix timestamp when the event was created.\n        size:\n          type: string\n          description: |\n            The size of the requested image.\n          enum:\n            - 1024x1024\n            - 1024x1536\n            - 1536x1024\n            - auto\n        quality:\n          type: string\n          description: |\n            The quality setting for the requested image.\n          enum:\n            - low\n            - medium\n            - high\n            - auto\n        background:\n          type: string\n          description: |\n            The background setting for the requested image.\n          enum:\n            - transparent\n            - opaque\n            - auto\n        output_format:\n          type: string\n          description: |\n            The output format for the requested image.\n          enum:\n            - png\n            - webp\n            - jpeg\n        partial_image_index:\n          type: integer\n          description: |\n            0-based index for the partial image (streaming).\n      required:\n        - type\n        - b64_json\n        - created_at\n        - size\n        - quality\n        - background\n        - output_format\n        - partial_image_index\n      x-oaiMeta:\n        name: image_generation.partial_image\n        group: images\n        example: |\n          {\n            \"type\": \"image_generation.partial_image\",\n            \"b64_json\": \"...\",\n            \"created_at\": 1620000000,\n            \"size\": \"1024x1024\",\n            \"quality\": \"high\",\n            \"background\": \"transparent\",\n            \"output_format\": \"png\",\n            \"partial_image_index\": 0\n          }\n    ImageGenStreamEvent:\n      anyOf:\n        - $ref: '#/components/schemas/ImageGenPartialImageEvent'\n        - $ref: '#/components/schemas/ImageGenCompletedEvent'\n      discriminator:\n        propertyName: type\n    ImageGenTool:\n      type: object\n      title: Image generation tool\n      description: |\n        A tool that generates images using a model like `gpt-image-1`.\n      properties:\n        type:\n          type: string\n          enum:\n            - image_generation\n          description: |\n            The type of the image generation tool. Always `image_generation`.\n          x-stainless-const: true\n        model:\n          type: string\n          enum:\n            - gpt-image-1\n          description: |\n            The image generation model to use. Default: `gpt-image-1`.\n          default: gpt-image-1\n        quality:\n          type: string\n          enum:\n            - low\n            - medium\n            - high\n            - auto\n          description: |\n            The quality of the generated image. One of `low`, `medium`, `high`,\n            or `auto`. Default: `auto`.\n          default: auto\n        size:\n          type: string\n          enum:\n            - 1024x1024\n            - 1024x1536\n            - 1536x1024\n            - auto\n          description: |\n            The size of the generated image. One of `1024x1024`, `1024x1536`,\n            `1536x1024`, or `auto`. Default: `auto`.\n          default: auto\n        output_format:\n          type: string\n          enum:\n            - png\n            - webp\n            - jpeg\n          description: |\n            The output format of the generated image. One of `png`, `webp`, or\n            `jpeg`. Default: `png`.\n          default: png\n        output_compression:\n          type: integer\n          minimum: 0\n          maximum: 100\n          description: |\n            Compression level for the output image. Default: 100.\n          default: 100\n        moderation:\n          type: string\n          enum:\n            - auto\n            - low\n          description: |\n            Moderation level for the generated image. Default: `auto`.\n          default: auto\n        background:\n          type: string\n          enum:\n            - transparent\n            - opaque\n            - auto\n          description: |\n            Background type for the generated image. One of `transparent`,\n            `opaque`, or `auto`. Default: `auto`.\n          default: auto\n        input_fidelity:\n          $ref: '#/components/schemas/ImageInputFidelity'\n        input_image_mask:\n          type: object\n          description: |\n            Optional mask for inpainting. Contains `image_url`\n            (string, optional) and `file_id` (string, optional).\n          properties:\n            image_url:\n              type: string\n              description: |\n                Base64-encoded mask image.\n            file_id:\n              type: string\n              description: |\n                File ID for the mask image.\n          required: []\n          additionalProperties: false\n        partial_images:\n          type: integer\n          minimum: 0\n          maximum: 3\n          description: |\n            Number of partial images to generate in streaming mode, from 0 (default value) to 3.\n          default: 0\n      required:\n        - type\n    ImageGenToolCall:\n      type: object\n      title: Image generation call\n      description: |\n        An image generation request made by the model.\n      properties:\n        type:\n          type: string\n          enum:\n            - image_generation_call\n          description: |\n            The type of the image generation call. Always `image_generation_call`.\n          x-stainless-const: true\n        id:\n          type: string\n          description: |\n            The unique ID of the image generation call.\n        status:\n          type: string\n          enum:\n            - in_progress\n            - completed\n            - generating\n            - failed\n          description: |\n            The status of the image generation call.\n        result:\n          type: string\n          description: |\n            The generated image encoded in base64.\n          nullable: true\n      required:\n        - type\n        - id\n        - status\n        - result\n    ImageInputFidelity:\n      type: string\n      enum:\n        - high\n        - low\n      default: low\n      nullable: true\n      description: |\n        Control how much effort the model will exert to match the style and features,\n        especially facial features, of input images. This parameter is only supported\n        for `gpt-image-1`. Supports `high` and `low`. Defaults to `low`.\n    ImagesResponse:\n      type: object\n      title: Image generation response\n      description: The response from the image generation endpoint.\n      properties:\n        created:\n          type: integer\n          description: The Unix timestamp (in seconds) of when the image was created.\n        data:\n          type: array\n          description: The list of generated images.\n          items:\n            $ref: '#/components/schemas/Image'\n        background:\n          type: string\n          description: The background parameter used for the image generation. Either `transparent` or `opaque`.\n          enum:\n            - transparent\n            - opaque\n        output_format:\n          type: string\n          description: The output format of the image generation. Either `png`, `webp`, or `jpeg`.\n          enum:\n            - png\n            - webp\n            - jpeg\n        size:\n          type: string\n          description: The size of the image generated. Either `1024x1024`, `1024x1536`, or `1536x1024`.\n          enum:\n            - 1024x1024\n            - 1024x1536\n            - 1536x1024\n        quality:\n          type: string\n          description: The quality of the image generated. Either `low`, `medium`, or `high`.\n          enum:\n            - low\n            - medium\n            - high\n        usage:\n          $ref: '#/components/schemas/ImageGenUsage'\n      required:\n        - created\n      x-oaiMeta:\n        name: The image generation response\n        group: images\n        example: |\n          {\n            \"created\": 1713833628,\n            \"data\": [\n              {\n                \"b64_json\": \"...\"\n              }\n            ],\n            \"background\": \"transparent\",\n            \"output_format\": \"png\",\n            \"size\": \"1024x1024\",\n            \"quality\": \"high\",\n            \"usage\": {\n              \"total_tokens\": 100,\n              \"input_tokens\": 50,\n              \"output_tokens\": 50,\n              \"input_tokens_details\": {\n                \"text_tokens\": 10,\n                \"image_tokens\": 40\n              }\n            }\n          }\n    ImagesUsage:\n      type: object\n      description: |\n        For `gpt-image-1` only, the token usage information for the image generation.\n      required:\n        - total_tokens\n        - input_tokens\n        - output_tokens\n        - input_tokens_details\n      properties:\n        total_tokens:\n          type: integer\n          description: |\n            The total number of tokens (images and text) used for the image generation.\n        input_tokens:\n          type: integer\n          description: The number of tokens (images and text) in the input prompt.\n        output_tokens:\n          type: integer\n          description: The number of image tokens in the output image.\n        input_tokens_details:\n          type: object\n          description: The input tokens detailed information for the image generation.\n          required:\n            - text_tokens\n            - image_tokens\n          properties:\n            text_tokens:\n              type: integer\n              description: The number of text tokens in the input prompt.\n            image_tokens:\n              type: integer\n              description: The number of image tokens in the input prompt.\n    Includable:\n      type: string\n      description: |\n        Specify additional output data to include in the model response. Currently\n        supported values are:\n        - `code_interpreter_call.outputs`: Includes the outputs of python code execution\n          in code interpreter tool call items.\n        - `computer_call_output.output.image_url`: Include image urls from the computer call output.\n        - `file_search_call.results`: Include the search results of\n          the file search tool call.\n        - `message.input_image.image_url`: Include image urls from the input message.\n        - `message.output_text.logprobs`: Include logprobs with assistant messages.\n        - `reasoning.encrypted_content`: Includes an encrypted version of reasoning\n          tokens in reasoning item outputs. This enables reasoning items to be used in\n          multi-turn conversations when using the Responses API statelessly (like\n          when the `store` parameter is set to `false`, or when an organization is\n          enrolled in the zero data retention program).\n      enum:\n        - code_interpreter_call.outputs\n        - computer_call_output.output.image_url\n        - file_search_call.results\n        - message.input_image.image_url\n        - message.output_text.logprobs\n        - reasoning.encrypted_content\n    InputAudio:\n      type: object\n      title: Audio input\n      description: |\n        An audio input to the model.\n      properties:\n        type:\n          type: string\n          description: |\n            The type of the input item. Always `input_audio`.\n          enum:\n            - input_audio\n          x-stainless-const: true\n        data:\n          type: string\n          description: |\n            Base64-encoded audio data.\n        format:\n          type: string\n          description: |\n            The format of the audio data. Currently supported formats are `mp3` and\n            `wav`.\n          enum:\n            - mp3\n            - wav\n      required:\n        - type\n        - data\n        - format\n    InputContent:\n      anyOf:\n        - $ref: '#/components/schemas/InputTextContent'\n        - $ref: '#/components/schemas/InputImageContent'\n        - $ref: '#/components/schemas/InputFileContent'\n      discriminator:\n        propertyName: type\n    InputItem:\n      discriminator:\n        propertyName: type\n      anyOf:\n        - $ref: '#/components/schemas/EasyInputMessage'\n        - type: object\n          title: Item\n          description: |\n            An item representing part of the context for the response to be\n            generated by the model. Can contain text, images, and audio inputs,\n            as well as previous assistant responses and tool call outputs.\n          $ref: '#/components/schemas/Item'\n        - $ref: '#/components/schemas/ItemReferenceParam'\n    InputMessage:\n      type: object\n      title: Input message\n      description: |\n        A message input to the model with a role indicating instruction following\n        hierarchy. Instructions given with the `developer` or `system` role take\n        precedence over instructions given with the `user` role.\n      properties:\n        type:\n          type: string\n          description: |\n            The type of the message input. Always set to `message`.\n          enum:\n            - message\n          x-stainless-const: true\n        role:\n          type: string\n          description: |\n            The role of the message input. One of `user`, `system`, or `developer`.\n          enum:\n            - user\n            - system\n            - developer\n        status:\n          type: string\n          description: |\n            The status of item. One of `in_progress`, `completed`, or\n            `incomplete`. Populated when items are returned via API.\n          enum:\n            - in_progress\n            - completed\n            - incomplete\n        content:\n          $ref: '#/components/schemas/InputMessageContentList'\n      required:\n        - role\n        - content\n    InputMessageContentList:\n      type: array\n      title: Input item content list\n      description: |\n        A list of one or many input items to the model, containing different content\n        types.\n      items:\n        $ref: '#/components/schemas/InputContent'\n    InputMessageResource:\n      allOf:\n        - $ref: '#/components/schemas/InputMessage'\n        - type: object\n          properties:\n            id:\n              type: string\n              description: |\n                The unique ID of the message input.\n          required:\n            - id\n    Invite:\n      type: object\n      description: Represents an individual `invite` to the organization.\n      properties:\n        object:\n          type: string\n          enum:\n            - organization.invite\n          description: The object type, which is always `organization.invite`\n          x-stainless-const: true\n        id:\n          type: string\n          description: The identifier, which can be referenced in API endpoints\n        email:\n          type: string\n          description: The email address of the individual to whom the invite was sent\n        role:\n          type: string\n          enum:\n            - owner\n            - reader\n          description: '`owner` or `reader`'\n        status:\n          type: string\n          enum:\n            - accepted\n            - expired\n            - pending\n          description: '`accepted`,`expired`, or `pending`'\n        invited_at:\n          type: integer\n          description: The Unix timestamp (in seconds) of when the invite was sent.\n        expires_at:\n          type: integer\n          description: The Unix timestamp (in seconds) of when the invite expires.\n        accepted_at:\n          type: integer\n          description: The Unix timestamp (in seconds) of when the invite was accepted.\n        projects:\n          type: array\n          description: The projects that were granted membership upon acceptance of the invite.\n          items:\n            type: object\n            properties:\n              id:\n                type: string\n                description: Project's public ID\n              role:\n                type: string\n                enum:\n                  - member\n                  - owner\n                description: Project membership role\n      required:\n        - object\n        - id\n        - email\n        - role\n        - status\n        - invited_at\n        - expires_at\n      x-oaiMeta:\n        name: The invite object\n        example: |\n          {\n            \"object\": \"organization.invite\",\n            \"id\": \"invite-abc\",\n            \"email\": \"user@example.com\",\n            \"role\": \"owner\",\n            \"status\": \"accepted\",\n            \"invited_at\": 1711471533,\n            \"expires_at\": 1711471533,\n            \"accepted_at\": 1711471533,\n            \"projects\": [\n              {\n                \"id\": \"project-xyz\",\n                \"role\": \"member\"\n              }\n            ]\n          }\n    InviteDeleteResponse:\n      type: object\n      properties:\n        object:\n          type: string\n          enum:\n            - organization.invite.deleted\n          description: The object type, which is always `organization.invite.deleted`\n          x-stainless-const: true\n        id:\n          type: string\n        deleted:\n          type: boolean\n      required:\n        - object\n        - id\n        - deleted\n    InviteListResponse:\n      type: object\n      properties:\n        object:\n          type: string\n          enum:\n            - list\n          description: The object type, which is always `list`\n          x-stainless-const: true\n        data:\n          type: array\n          items:\n            $ref: '#/components/schemas/Invite'\n        first_id:\n          type: string\n          description: The first `invite_id` in the retrieved `list`\n        last_id:\n          type: string\n          description: The last `invite_id` in the retrieved `list`\n        has_more:\n          type: boolean\n          description: The `has_more` property is used for pagination to indicate there are additional results.\n      required:\n        - object\n        - data\n    InviteRequest:\n      type: object\n      properties:\n        email:\n          type: string\n          description: Send an email to this address\n        role:\n          type: string\n          enum:\n            - reader\n            - owner\n          description: '`owner` or `reader`'\n        projects:\n          type: array\n          description: >-\n            An array of projects to which membership is granted at the same time the org invite is accepted.\n            If omitted, the user will be invited to the default project for compatibility with legacy\n            behavior.\n          items:\n            type: object\n            properties:\n              id:\n                type: string\n                description: Project's public ID\n              role:\n                type: string\n                enum:\n                  - member\n                  - owner\n                description: Project membership role\n            required:\n              - id\n              - role\n      required:\n        - email\n        - role\n    Item:\n      type: object\n      description: |\n        Content item used to generate a response.\n      discriminator:\n        propertyName: type\n      anyOf:\n        - $ref: '#/components/schemas/InputMessage'\n        - $ref: '#/components/schemas/OutputMessage'\n        - $ref: '#/components/schemas/FileSearchToolCall'\n        - $ref: '#/components/schemas/ComputerToolCall'\n        - $ref: '#/components/schemas/ComputerCallOutputItemParam'\n        - $ref: '#/components/schemas/WebSearchToolCall'\n        - $ref: '#/components/schemas/FunctionToolCall'\n        - $ref: '#/components/schemas/FunctionCallOutputItemParam'\n        - $ref: '#/components/schemas/ReasoningItem'\n        - $ref: '#/components/schemas/ImageGenToolCall'\n        - $ref: '#/components/schemas/CodeInterpreterToolCall'\n        - $ref: '#/components/schemas/LocalShellToolCall'\n        - $ref: '#/components/schemas/LocalShellToolCallOutput'\n        - $ref: '#/components/schemas/MCPListTools'\n        - $ref: '#/components/schemas/MCPApprovalRequest'\n        - $ref: '#/components/schemas/MCPApprovalResponse'\n        - $ref: '#/components/schemas/MCPToolCall'\n        - $ref: '#/components/schemas/CustomToolCallOutput'\n        - $ref: '#/components/schemas/CustomToolCall'\n    ItemResource:\n      description: |\n        Content item used to generate a response.\n      discriminator:\n        propertyName: type\n      anyOf:\n        - $ref: '#/components/schemas/InputMessageResource'\n        - $ref: '#/components/schemas/OutputMessage'\n        - $ref: '#/components/schemas/FileSearchToolCall'\n        - $ref: '#/components/schemas/ComputerToolCall'\n        - $ref: '#/components/schemas/ComputerToolCallOutputResource'\n        - $ref: '#/components/schemas/WebSearchToolCall'\n        - $ref: '#/components/schemas/FunctionToolCallResource'\n        - $ref: '#/components/schemas/FunctionToolCallOutputResource'\n        - $ref: '#/components/schemas/ImageGenToolCall'\n        - $ref: '#/components/schemas/CodeInterpreterToolCall'\n        - $ref: '#/components/schemas/LocalShellToolCall'\n        - $ref: '#/components/schemas/LocalShellToolCallOutput'\n        - $ref: '#/components/schemas/MCPListTools'\n        - $ref: '#/components/schemas/MCPApprovalRequest'\n        - $ref: '#/components/schemas/MCPApprovalResponseResource'\n        - $ref: '#/components/schemas/MCPToolCall'\n    KeyPress:\n      type: object\n      title: KeyPress\n      description: |\n        A collection of keypresses the model would like to perform.\n      properties:\n        type:\n          type: string\n          enum:\n            - keypress\n          default: keypress\n          description: |\n            Specifies the event type. For a keypress action, this property is\n            always set to `keypress`.\n          x-stainless-const: true\n        keys:\n          type: array\n          items:\n            type: string\n            description: |\n              One of the keys the model is requesting to be pressed.\n          description: |\n            The combination of keys the model is requesting to be pressed. This is an\n            array of strings, each representing a key.\n      required:\n        - type\n        - keys\n    ListAssistantsResponse:\n      type: object\n      properties:\n        object:\n          type: string\n          example: list\n        data:\n          type: array\n          items:\n            $ref: '#/components/schemas/AssistantObject'\n        first_id:\n          type: string\n          example: asst_abc123\n        last_id:\n          type: string\n          example: asst_abc456\n        has_more:\n          type: boolean\n          example: false\n      required:\n        - object\n        - data\n        - first_id\n        - last_id\n        - has_more\n      x-oaiMeta:\n        name: List assistants response object\n        group: chat\n        example: |\n          {\n            \"object\": \"list\",\n            \"data\": [\n              {\n                \"id\": \"asst_abc123\",\n                \"object\": \"assistant\",\n                \"created_at\": 1698982736,\n                \"name\": \"Coding Tutor\",\n                \"description\": null,\n                \"model\": \"gpt-4o\",\n                \"instructions\": \"You are a helpful assistant designed to make me better at coding!\",\n                \"tools\": [],\n                \"tool_resources\": {},\n                \"metadata\": {},\n                \"top_p\": 1.0,\n                \"temperature\": 1.0,\n                \"response_format\": \"auto\"\n              },\n              {\n                \"id\": \"asst_abc456\",\n                \"object\": \"assistant\",\n                \"created_at\": 1698982718,\n                \"name\": \"My Assistant\",\n                \"description\": null,\n                \"model\": \"gpt-4o\",\n                \"instructions\": \"You are a helpful assistant designed to make me better at coding!\",\n                \"tools\": [],\n                \"tool_resources\": {},\n                \"metadata\": {},\n                \"top_p\": 1.0,\n                \"temperature\": 1.0,\n                \"response_format\": \"auto\"\n              },\n              {\n                \"id\": \"asst_abc789\",\n                \"object\": \"assistant\",\n                \"created_at\": 1698982643,\n                \"name\": null,\n                \"description\": null,\n                \"model\": \"gpt-4o\",\n                \"instructions\": null,\n                \"tools\": [],\n                \"tool_resources\": {},\n                \"metadata\": {},\n                \"top_p\": 1.0,\n                \"temperature\": 1.0,\n                \"response_format\": \"auto\"\n              }\n            ],\n            \"first_id\": \"asst_abc123\",\n            \"last_id\": \"asst_abc789\",\n            \"has_more\": false\n          }\n    ListAuditLogsResponse:\n      type: object\n      properties:\n        object:\n          type: string\n          enum:\n            - list\n          x-stainless-const: true\n        data:\n          type: array\n          items:\n            $ref: '#/components/schemas/AuditLog'\n        first_id:\n          type: string\n          example: audit_log-defb456h8dks\n        last_id:\n          type: string\n          example: audit_log-hnbkd8s93s\n        has_more:\n          type: boolean\n      required:\n        - object\n        - data\n        - first_id\n        - last_id\n        - has_more\n    ListBatchesResponse:\n      type: object\n      properties:\n        data:\n          type: array\n          items:\n            $ref: '#/components/schemas/Batch'\n        first_id:\n          type: string\n          example: batch_abc123\n        last_id:\n          type: string\n          example: batch_abc456\n        has_more:\n          type: boolean\n        object:\n          type: string\n          enum:\n            - list\n          x-stainless-const: true\n      required:\n        - object\n        - data\n        - has_more\n    ListCertificatesResponse:\n      type: object\n      properties:\n        data:\n          type: array\n          items:\n            $ref: '#/components/schemas/Certificate'\n        first_id:\n          type: string\n          example: cert_abc\n        last_id:\n          type: string\n          example: cert_abc\n        has_more:\n          type: boolean\n        object:\n          type: string\n          enum:\n            - list\n          x-stainless-const: true\n      required:\n        - object\n        - data\n        - has_more\n    ListFilesResponse:\n      type: object\n      properties:\n        object:\n          type: string\n          example: list\n        data:\n          type: array\n          items:\n            $ref: '#/components/schemas/OpenAIFile'\n        first_id:\n          type: string\n          example: file-abc123\n        last_id:\n          type: string\n          example: file-abc456\n        has_more:\n          type: boolean\n          example: false\n      required:\n        - object\n        - data\n        - first_id\n        - last_id\n        - has_more\n    ListFineTuningCheckpointPermissionResponse:\n      type: object\n      properties:\n        data:\n          type: array\n          items:\n            $ref: '#/components/schemas/FineTuningCheckpointPermission'\n        object:\n          type: string\n          enum:\n            - list\n          x-stainless-const: true\n        first_id:\n          type: string\n          nullable: true\n        last_id:\n          type: string\n          nullable: true\n        has_more:\n          type: boolean\n      required:\n        - object\n        - data\n        - has_more\n    ListFineTuningJobCheckpointsResponse:\n      type: object\n      properties:\n        data:\n          type: array\n          items:\n            $ref: '#/components/schemas/FineTuningJobCheckpoint'\n        object:\n          type: string\n          enum:\n            - list\n          x-stainless-const: true\n        first_id:\n          type: string\n          nullable: true\n        last_id:\n          type: string\n          nullable: true\n        has_more:\n          type: boolean\n      required:\n        - object\n        - data\n        - has_more\n    ListFineTuningJobEventsResponse:\n      type: object\n      properties:\n        data:\n          type: array\n          items:\n            $ref: '#/components/schemas/FineTuningJobEvent'\n        object:\n          type: string\n          enum:\n            - list\n          x-stainless-const: true\n        has_more:\n          type: boolean\n      required:\n        - object\n        - data\n        - has_more\n    ListMessagesResponse:\n      properties:\n        object:\n          type: string\n          example: list\n        data:\n          type: array\n          items:\n            $ref: '#/components/schemas/MessageObject'\n        first_id:\n          type: string\n          example: msg_abc123\n        last_id:\n          type: string\n          example: msg_abc123\n        has_more:\n          type: boolean\n          example: false\n      required:\n        - object\n        - data\n        - first_id\n        - last_id\n        - has_more\n    ListModelsResponse:\n      type: object\n      properties:\n        object:\n          type: string\n          enum:\n            - list\n          x-stainless-const: true\n        data:\n          type: array\n          items:\n            $ref: '#/components/schemas/Model'\n      required:\n        - object\n        - data\n    ListPaginatedFineTuningJobsResponse:\n      type: object\n      properties:\n        data:\n          type: array\n          items:\n            $ref: '#/components/schemas/FineTuningJob'\n        has_more:\n          type: boolean\n        object:\n          type: string\n          enum:\n            - list\n          x-stainless-const: true\n      required:\n        - object\n        - data\n        - has_more\n    ListRunStepsResponse:\n      properties:\n        object:\n          type: string\n          example: list\n        data:\n          type: array\n          items:\n            $ref: '#/components/schemas/RunStepObject'\n        first_id:\n          type: string\n          example: step_abc123\n        last_id:\n          type: string\n          example: step_abc456\n        has_more:\n          type: boolean\n          example: false\n      required:\n        - object\n        - data\n        - first_id\n        - last_id\n        - has_more\n    ListRunsResponse:\n      type: object\n      properties:\n        object:\n          type: string\n          example: list\n        data:\n          type: array\n          items:\n            $ref: '#/components/schemas/RunObject'\n        first_id:\n          type: string\n          example: run_abc123\n        last_id:\n          type: string\n          example: run_abc456\n        has_more:\n          type: boolean\n          example: false\n      required:\n        - object\n        - data\n        - first_id\n        - last_id\n        - has_more\n    ListVectorStoreFilesResponse:\n      properties:\n        object:\n          type: string\n          example: list\n        data:\n          type: array\n          items:\n            $ref: '#/components/schemas/VectorStoreFileObject'\n        first_id:\n          type: string\n          example: file-abc123\n        last_id:\n          type: string\n          example: file-abc456\n        has_more:\n          type: boolean\n          example: false\n      required:\n        - object\n        - data\n        - first_id\n        - last_id\n        - has_more\n    ListVectorStoresResponse:\n      properties:\n        object:\n          type: string\n          example: list\n        data:\n          type: array\n          items:\n            $ref: '#/components/schemas/VectorStoreObject'\n        first_id:\n          type: string\n          example: vs_abc123\n        last_id:\n          type: string\n          example: vs_abc456\n        has_more:\n          type: boolean\n          example: false\n      required:\n        - object\n        - data\n        - first_id\n        - last_id\n        - has_more\n    LocalShellExecAction:\n      type: object\n      title: Local shell exec action\n      description: |\n        Execute a shell command on the server.\n      properties:\n        type:\n          type: string\n          enum:\n            - exec\n          description: |\n            The type of the local shell action. Always `exec`.\n          x-stainless-const: true\n        command:\n          type: array\n          items:\n            type: string\n          description: |\n            The command to run.\n        timeout_ms:\n          type: integer\n          description: |\n            Optional timeout in milliseconds for the command.\n          nullable: true\n        working_directory:\n          type: string\n          description: |\n            Optional working directory to run the command in.\n          nullable: true\n        env:\n          type: object\n          additionalProperties:\n            type: string\n          description: |\n            Environment variables to set for the command.\n        user:\n          type: string\n          description: |\n            Optional user to run the command as.\n          nullable: true\n      required:\n        - type\n        - command\n        - env\n    LocalShellTool:\n      type: object\n      title: Local shell tool\n      description: |\n        A tool that allows the model to execute shell commands in a local environment.\n      properties:\n        type:\n          type: string\n          enum:\n            - local_shell\n          description: The type of the local shell tool. Always `local_shell`.\n          x-stainless-const: true\n      required:\n        - type\n    LocalShellToolCall:\n      type: object\n      title: Local shell call\n      description: |\n        A tool call to run a command on the local shell.\n      properties:\n        type:\n          type: string\n          enum:\n            - local_shell_call\n          description: |\n            The type of the local shell call. Always `local_shell_call`.\n          x-stainless-const: true\n        id:\n          type: string\n          description: |\n            The unique ID of the local shell call.\n        call_id:\n          type: string\n          description: |\n            The unique ID of the local shell tool call generated by the model.\n        action:\n          $ref: '#/components/schemas/LocalShellExecAction'\n        status:\n          type: string\n          enum:\n            - in_progress\n            - completed\n            - incomplete\n          description: |\n            The status of the local shell call.\n      required:\n        - type\n        - id\n        - call_id\n        - action\n        - status\n    LocalShellToolCallOutput:\n      type: object\n      title: Local shell call output\n      description: |\n        The output of a local shell tool call.\n      properties:\n        type:\n          type: string\n          enum:\n            - local_shell_call_output\n          description: |\n            The type of the local shell tool call output. Always `local_shell_call_output`.\n          x-stainless-const: true\n        id:\n          type: string\n          description: |\n            The unique ID of the local shell tool call generated by the model.\n        output:\n          type: string\n          description: |\n            A JSON string of the output of the local shell tool call.\n        status:\n          type: string\n          enum:\n            - in_progress\n            - completed\n            - incomplete\n          description: |\n            The status of the item. One of `in_progress`, `completed`, or `incomplete`.\n          nullable: true\n      required:\n        - id\n        - type\n        - call_id\n        - output\n    LogProbProperties:\n      type: object\n      description: |\n        A log probability object.\n      properties:\n        token:\n          type: string\n          description: |\n            The token that was used to generate the log probability.\n        logprob:\n          type: number\n          description: |\n            The log probability of the token.\n        bytes:\n          type: array\n          items:\n            type: integer\n          description: |\n            The bytes that were used to generate the log probability.\n      required:\n        - token\n        - logprob\n        - bytes\n    MCPApprovalRequest:\n      type: object\n      title: MCP approval request\n      description: |\n        A request for human approval of a tool invocation.\n      properties:\n        type:\n          type: string\n          enum:\n            - mcp_approval_request\n          description: |\n            The type of the item. Always `mcp_approval_request`.\n          x-stainless-const: true\n        id:\n          type: string\n          description: |\n            The unique ID of the approval request.\n        server_label:\n          type: string\n          description: |\n            The label of the MCP server making the request.\n        name:\n          type: string\n          description: |\n            The name of the tool to run.\n        arguments:\n          type: string\n          description: |\n            A JSON string of arguments for the tool.\n      required:\n        - type\n        - id\n        - server_label\n        - name\n        - arguments\n    MCPApprovalResponse:\n      type: object\n      title: MCP approval response\n      description: |\n        A response to an MCP approval request.\n      properties:\n        type:\n          type: string\n          enum:\n            - mcp_approval_response\n          description: |\n            The type of the item. Always `mcp_approval_response`.\n          x-stainless-const: true\n        id:\n          type: string\n          description: |\n            The unique ID of the approval response\n          nullable: true\n        approval_request_id:\n          type: string\n          description: |\n            The ID of the approval request being answered.\n        approve:\n          type: boolean\n          description: |\n            Whether the request was approved.\n        reason:\n          type: string\n          description: |\n            Optional reason for the decision.\n          nullable: true\n      required:\n        - type\n        - request_id\n        - approve\n        - approval_request_id\n    MCPApprovalResponseResource:\n      type: object\n      title: MCP approval response\n      description: |\n        A response to an MCP approval request.\n      properties:\n        type:\n          type: string\n          enum:\n            - mcp_approval_response\n          description: |\n            The type of the item. Always `mcp_approval_response`.\n          x-stainless-const: true\n        id:\n          type: string\n          description: |\n            The unique ID of the approval response\n        approval_request_id:\n          type: string\n          description: |\n            The ID of the approval request being answered.\n        approve:\n          type: boolean\n          description: |\n            Whether the request was approved.\n        reason:\n          type: string\n          description: |\n            Optional reason for the decision.\n          nullable: true\n      required:\n        - type\n        - id\n        - request_id\n        - approve\n        - approval_request_id\n    MCPListTools:\n      type: object\n      title: MCP list tools\n      description: |\n        A list of tools available on an MCP server.\n      properties:\n        type:\n          type: string\n          enum:\n            - mcp_list_tools\n          description: |\n            The type of the item. Always `mcp_list_tools`.\n          x-stainless-const: true\n        id:\n          type: string\n          description: |\n            The unique ID of the list.\n        server_label:\n          type: string\n          description: |\n            The label of the MCP server.\n        tools:\n          type: array\n          items:\n            $ref: '#/components/schemas/MCPListToolsTool'\n          description: |\n            The tools available on the server.\n        error:\n          type: string\n          description: |\n            Error message if the server could not list tools.\n          nullable: true\n      required:\n        - type\n        - id\n        - server_label\n        - tools\n    MCPListToolsTool:\n      type: object\n      title: MCP list tools tool\n      description: |\n        A tool available on an MCP server.\n      properties:\n        name:\n          type: string\n          description: |\n            The name of the tool.\n        description:\n          type: string\n          description: |\n            The description of the tool.\n          nullable: true\n        input_schema:\n          type: object\n          description: |\n            The JSON schema describing the tool's input.\n        annotations:\n          type: object\n          description: |\n            Additional annotations about the tool.\n          nullable: true\n      required:\n        - name\n        - input_schema\n    MCPTool:\n      type: object\n      title: MCP tool\n      description: |\n        Give the model access to additional tools via remote Model Context Protocol\n        (MCP) servers. [Learn more about MCP](https://platform.openai.com/docs/guides/tools-remote-mcp).\n      properties:\n        type:\n          type: string\n          enum:\n            - mcp\n          description: The type of the MCP tool. Always `mcp`.\n          x-stainless-const: true\n        server_label:\n          type: string\n          description: |\n            A label for this MCP server, used to identify it in tool calls.\n        server_url:\n          type: string\n          description: |\n            The URL for the MCP server.\n        server_description:\n          type: string\n          description: |\n            Optional description of the MCP server, used to provide more context.\n        headers:\n          type: object\n          additionalProperties:\n            type: string\n          nullable: true\n          description: |\n            Optional HTTP headers to send to the MCP server. Use for authentication\n            or other purposes.\n        allowed_tools:\n          description: |\n            List of allowed tool names or a filter object.\n          nullable: true\n          anyOf:\n            - type: array\n              title: MCP allowed tools\n              description: A string array of allowed tool names\n              items:\n                type: string\n            - type: object\n              title: MCP allowed tools filter\n              description: |\n                A filter object to specify which tools are allowed.\n              properties:\n                tool_names:\n                  type: array\n                  title: MCP allowed tools\n                  items:\n                    type: string\n                  description: List of allowed tool names.\n              required: []\n              additionalProperties: false\n        require_approval:\n          description: Specify which of the MCP server's tools require approval.\n          nullable: true\n          anyOf:\n            - type: object\n              title: MCP tool approval filter\n              properties:\n                always:\n                  type: object\n                  description: |\n                    A list of tools that always require approval.\n                  properties:\n                    tool_names:\n                      type: array\n                      items:\n                        type: string\n                      description: List of tools that require approval.\n                never:\n                  type: object\n                  description: |\n                    A list of tools that never require approval.\n                  properties:\n                    tool_names:\n                      type: array\n                      items:\n                        type: string\n                      description: List of tools that do not require approval.\n              additionalProperties: false\n            - type: string\n              title: MCP tool approval setting\n              description: |\n                Specify a single approval policy for all tools. One of `always` or\n                `never`. When set to `always`, all tools will require approval. When\n                set to `never`, all tools will not require approval.\n              enum:\n                - always\n                - never\n      required:\n        - type\n        - server_label\n        - server_url\n    MCPToolCall:\n      type: object\n      title: MCP tool call\n      description: |\n        An invocation of a tool on an MCP server.\n      properties:\n        type:\n          type: string\n          enum:\n            - mcp_call\n          description: |\n            The type of the item. Always `mcp_call`.\n          x-stainless-const: true\n        id:\n          type: string\n          description: |\n            The unique ID of the tool call.\n        server_label:\n          type: string\n          description: |\n            The label of the MCP server running the tool.\n        name:\n          type: string\n          description: |\n            The name of the tool that was run.\n        arguments:\n          type: string\n          description: |\n            A JSON string of the arguments passed to the tool.\n        output:\n          type: string\n          description: |\n            The output from the tool call.\n          nullable: true\n        error:\n          type: string\n          description: |\n            The error from the tool call, if any.\n          nullable: true\n      required:\n        - type\n        - id\n        - server_label\n        - name\n        - arguments\n    MessageContentImageFileObject:\n      title: Image file\n      type: object\n      description: >-\n        References an image [File](https://platform.openai.com/docs/api-reference/files) in the content of a\n        message.\n      properties:\n        type:\n          description: Always `image_file`.\n          type: string\n          enum:\n            - image_file\n          x-stainless-const: true\n        image_file:\n          type: object\n          properties:\n            file_id:\n              description: >-\n                The [File](https://platform.openai.com/docs/api-reference/files) ID of the image in the\n                message content. Set `purpose=\"vision\"` when uploading the File if you need to later display\n                the file content.\n              type: string\n            detail:\n              type: string\n              description: >-\n                Specifies the detail level of the image if specified by the user. `low` uses fewer tokens, you\n                can opt in to high resolution using `high`.\n              enum:\n                - auto\n                - low\n                - high\n              default: auto\n          required:\n            - file_id\n      required:\n        - type\n        - image_file\n    MessageContentImageUrlObject:\n      title: Image URL\n      type: object\n      description: References an image URL in the content of a message.\n      properties:\n        type:\n          type: string\n          enum:\n            - image_url\n          description: The type of the content part.\n          x-stainless-const: true\n        image_url:\n          type: object\n          properties:\n            url:\n              type: string\n              description: 'The external URL of the image, must be a supported image types: jpeg, jpg, png, gif, webp.'\n              format: uri\n            detail:\n              type: string\n              description: >-\n                Specifies the detail level of the image. `low` uses fewer tokens, you can opt in to high\n                resolution using `high`. Default value is `auto`\n              enum:\n                - auto\n                - low\n                - high\n              default: auto\n          required:\n            - url\n      required:\n        - type\n        - image_url\n    MessageContentRefusalObject:\n      title: Refusal\n      type: object\n      description: The refusal content generated by the assistant.\n      properties:\n        type:\n          description: Always `refusal`.\n          type: string\n          enum:\n            - refusal\n          x-stainless-const: true\n        refusal:\n          type: string\n          nullable: false\n      required:\n        - type\n        - refusal\n    MessageContentTextAnnotationsFileCitationObject:\n      title: File citation\n      type: object\n      description: >-\n        A citation within the message that points to a specific quote from a specific File associated with the\n        assistant or the message. Generated when the assistant uses the \"file_search\" tool to search files.\n      properties:\n        type:\n          description: Always `file_citation`.\n          type: string\n          enum:\n            - file_citation\n          x-stainless-const: true\n        text:\n          description: The text in the message content that needs to be replaced.\n          type: string\n        file_citation:\n          type: object\n          properties:\n            file_id:\n              description: The ID of the specific File the citation is from.\n              type: string\n          required:\n            - file_id\n        start_index:\n          type: integer\n          minimum: 0\n        end_index:\n          type: integer\n          minimum: 0\n      required:\n        - type\n        - text\n        - file_citation\n        - start_index\n        - end_index\n    MessageContentTextAnnotationsFilePathObject:\n      title: File path\n      type: object\n      description: >-\n        A URL for the file that's generated when the assistant used the `code_interpreter` tool to generate a\n        file.\n      properties:\n        type:\n          description: Always `file_path`.\n          type: string\n          enum:\n            - file_path\n          x-stainless-const: true\n        text:\n          description: The text in the message content that needs to be replaced.\n          type: string\n        file_path:\n          type: object\n          properties:\n            file_id:\n              description: The ID of the file that was generated.\n              type: string\n          required:\n            - file_id\n        start_index:\n          type: integer\n          minimum: 0\n        end_index:\n          type: integer\n          minimum: 0\n      required:\n        - type\n        - text\n        - file_path\n        - start_index\n        - end_index\n    MessageContentTextObject:\n      title: Text\n      type: object\n      description: The text content that is part of a message.\n      properties:\n        type:\n          description: Always `text`.\n          type: string\n          enum:\n            - text\n          x-stainless-const: true\n        text:\n          type: object\n          properties:\n            value:\n              description: The data that makes up the text.\n              type: string\n            annotations:\n              type: array\n              items:\n                $ref: '#/components/schemas/TextAnnotation'\n          required:\n            - value\n            - annotations\n      required:\n        - type\n        - text\n    MessageDeltaContentImageFileObject:\n      title: Image file\n      type: object\n      description: >-\n        References an image [File](https://platform.openai.com/docs/api-reference/files) in the content of a\n        message.\n      properties:\n        index:\n          type: integer\n          description: The index of the content part in the message.\n        type:\n          description: Always `image_file`.\n          type: string\n          enum:\n            - image_file\n          x-stainless-const: true\n        image_file:\n          type: object\n          properties:\n            file_id:\n              description: >-\n                The [File](https://platform.openai.com/docs/api-reference/files) ID of the image in the\n                message content. Set `purpose=\"vision\"` when uploading the File if you need to later display\n                the file content.\n              type: string\n            detail:\n              type: string\n              description: >-\n                Specifies the detail level of the image if specified by the user. `low` uses fewer tokens, you\n                can opt in to high resolution using `high`.\n              enum:\n                - auto\n                - low\n                - high\n              default: auto\n      required:\n        - index\n        - type\n    MessageDeltaContentImageUrlObject:\n      title: Image URL\n      type: object\n      description: References an image URL in the content of a message.\n      properties:\n        index:\n          type: integer\n          description: The index of the content part in the message.\n        type:\n          description: Always `image_url`.\n          type: string\n          enum:\n            - image_url\n          x-stainless-const: true\n        image_url:\n          type: object\n          properties:\n            url:\n              description: 'The URL of the image, must be a supported image types: jpeg, jpg, png, gif, webp.'\n              type: string\n            detail:\n              type: string\n              description: >-\n                Specifies the detail level of the image. `low` uses fewer tokens, you can opt in to high\n                resolution using `high`.\n              enum:\n                - auto\n                - low\n                - high\n              default: auto\n      required:\n        - index\n        - type\n    MessageDeltaContentRefusalObject:\n      title: Refusal\n      type: object\n      description: The refusal content that is part of a message.\n      properties:\n        index:\n          type: integer\n          description: The index of the refusal part in the message.\n        type:\n          description: Always `refusal`.\n          type: string\n          enum:\n            - refusal\n          x-stainless-const: true\n        refusal:\n          type: string\n      required:\n        - index\n        - type\n    MessageDeltaContentTextAnnotationsFileCitationObject:\n      title: File citation\n      type: object\n      description: >-\n        A citation within the message that points to a specific quote from a specific File associated with the\n        assistant or the message. Generated when the assistant uses the \"file_search\" tool to search files.\n      properties:\n        index:\n          type: integer\n          description: The index of the annotation in the text content part.\n        type:\n          description: Always `file_citation`.\n          type: string\n          enum:\n            - file_citation\n          x-stainless-const: true\n        text:\n          description: The text in the message content that needs to be replaced.\n          type: string\n        file_citation:\n          type: object\n          properties:\n            file_id:\n              description: The ID of the specific File the citation is from.\n              type: string\n            quote:\n              description: The specific quote in the file.\n              type: string\n        start_index:\n          type: integer\n          minimum: 0\n        end_index:\n          type: integer\n          minimum: 0\n      required:\n        - index\n        - type\n    MessageDeltaContentTextAnnotationsFilePathObject:\n      title: File path\n      type: object\n      description: >-\n        A URL for the file that's generated when the assistant used the `code_interpreter` tool to generate a\n        file.\n      properties:\n        index:\n          type: integer\n          description: The index of the annotation in the text content part.\n        type:\n          description: Always `file_path`.\n          type: string\n          enum:\n            - file_path\n          x-stainless-const: true\n        text:\n          description: The text in the message content that needs to be replaced.\n          type: string\n        file_path:\n          type: object\n          properties:\n            file_id:\n              description: The ID of the file that was generated.\n              type: string\n        start_index:\n          type: integer\n          minimum: 0\n        end_index:\n          type: integer\n          minimum: 0\n      required:\n        - index\n        - type\n    MessageDeltaContentTextObject:\n      title: Text\n      type: object\n      description: The text content that is part of a message.\n      properties:\n        index:\n          type: integer\n          description: The index of the content part in the message.\n        type:\n          description: Always `text`.\n          type: string\n          enum:\n            - text\n          x-stainless-const: true\n        text:\n          type: object\n          properties:\n            value:\n              description: The data that makes up the text.\n              type: string\n            annotations:\n              type: array\n              items:\n                $ref: '#/components/schemas/TextAnnotationDelta'\n      required:\n        - index\n        - type\n    MessageDeltaObject:\n      type: object\n      title: Message delta object\n      description: |\n        Represents a message delta i.e. any changed fields on a message during streaming.\n      properties:\n        id:\n          description: The identifier of the message, which can be referenced in API endpoints.\n          type: string\n        object:\n          description: The object type, which is always `thread.message.delta`.\n          type: string\n          enum:\n            - thread.message.delta\n          x-stainless-const: true\n        delta:\n          description: The delta containing the fields that have changed on the Message.\n          type: object\n          properties:\n            role:\n              description: The entity that produced the message. One of `user` or `assistant`.\n              type: string\n              enum:\n                - user\n                - assistant\n            content:\n              description: The content of the message in array of text and/or images.\n              type: array\n              items:\n                $ref: '#/components/schemas/MessageContentDelta'\n      required:\n        - id\n        - object\n        - delta\n      x-oaiMeta:\n        name: The message delta object\n        beta: true\n        example: |\n          {\n            \"id\": \"msg_123\",\n            \"object\": \"thread.message.delta\",\n            \"delta\": {\n              \"content\": [\n                {\n                  \"index\": 0,\n                  \"type\": \"text\",\n                  \"text\": { \"value\": \"Hello\", \"annotations\": [] }\n                }\n              ]\n            }\n          }\n    MessageObject:\n      type: object\n      title: The message object\n      description: Represents a message within a [thread](https://platform.openai.com/docs/api-reference/threads).\n      properties:\n        id:\n          description: The identifier, which can be referenced in API endpoints.\n          type: string\n        object:\n          description: The object type, which is always `thread.message`.\n          type: string\n          enum:\n            - thread.message\n          x-stainless-const: true\n        created_at:\n          description: The Unix timestamp (in seconds) for when the message was created.\n          type: integer\n        thread_id:\n          description: >-\n            The [thread](https://platform.openai.com/docs/api-reference/threads) ID that this message belongs\n            to.\n          type: string\n        status:\n          description: The status of the message, which can be either `in_progress`, `incomplete`, or `completed`.\n          type: string\n          enum:\n            - in_progress\n            - incomplete\n            - completed\n        incomplete_details:\n          description: On an incomplete message, details about why the message is incomplete.\n          type: object\n          properties:\n            reason:\n              type: string\n              description: The reason the message is incomplete.\n              enum:\n                - content_filter\n                - max_tokens\n                - run_cancelled\n                - run_expired\n                - run_failed\n          nullable: true\n          required:\n            - reason\n        completed_at:\n          description: The Unix timestamp (in seconds) for when the message was completed.\n          type: integer\n          nullable: true\n        incomplete_at:\n          description: The Unix timestamp (in seconds) for when the message was marked as incomplete.\n          type: integer\n          nullable: true\n        role:\n          description: The entity that produced the message. One of `user` or `assistant`.\n          type: string\n          enum:\n            - user\n            - assistant\n        content:\n          description: The content of the message in array of text and/or images.\n          type: array\n          items:\n            $ref: '#/components/schemas/MessageContent'\n        assistant_id:\n          description: >-\n            If applicable, the ID of the\n            [assistant](https://platform.openai.com/docs/api-reference/assistants) that authored this message.\n          type: string\n          nullable: true\n        run_id:\n          description: >-\n            The ID of the [run](https://platform.openai.com/docs/api-reference/runs) associated with the\n            creation of this message. Value is `null` when messages are created manually using the create\n            message or create thread endpoints.\n          type: string\n          nullable: true\n        attachments:\n          type: array\n          items:\n            type: object\n            properties:\n              file_id:\n                type: string\n                description: The ID of the file to attach to the message.\n              tools:\n                description: The tools to add this file to.\n                type: array\n                items:\n                  anyOf:\n                    - $ref: '#/components/schemas/AssistantToolsCode'\n                    - $ref: '#/components/schemas/AssistantToolsFileSearchTypeOnly'\n          description: A list of files attached to the message, and the tools they were added to.\n          nullable: true\n        metadata:\n          $ref: '#/components/schemas/Metadata'\n      required:\n        - id\n        - object\n        - created_at\n        - thread_id\n        - status\n        - incomplete_details\n        - completed_at\n        - incomplete_at\n        - role\n        - content\n        - assistant_id\n        - run_id\n        - attachments\n        - metadata\n      x-oaiMeta:\n        name: The message object\n        beta: true\n        example: |\n          {\n            \"id\": \"msg_abc123\",\n            \"object\": \"thread.message\",\n            \"created_at\": 1698983503,\n            \"thread_id\": \"thread_abc123\",\n            \"role\": \"assistant\",\n            \"content\": [\n              {\n                \"type\": \"text\",\n                \"text\": {\n                  \"value\": \"Hi! How can I help you today?\",\n                  \"annotations\": []\n                }\n              }\n            ],\n            \"assistant_id\": \"asst_abc123\",\n            \"run_id\": \"run_abc123\",\n            \"attachments\": [],\n            \"metadata\": {}\n          }\n    MessageRequestContentTextObject:\n      title: Text\n      type: object\n      description: The text content that is part of a message.\n      properties:\n        type:\n          description: Always `text`.\n          type: string\n          enum:\n            - text\n          x-stainless-const: true\n        text:\n          type: string\n          description: Text content to be sent to the model\n      required:\n        - type\n        - text\n    MessageStreamEvent:\n      anyOf:\n        - type: object\n          properties:\n            event:\n              type: string\n              enum:\n                - thread.message.created\n              x-stainless-const: true\n            data:\n              $ref: '#/components/schemas/MessageObject'\n          required:\n            - event\n            - data\n          description: >-\n            Occurs when a [message](https://platform.openai.com/docs/api-reference/messages/object) is\n            created.\n          x-oaiMeta:\n            dataDescription: '`data` is a [message](/docs/api-reference/messages/object)'\n        - type: object\n          properties:\n            event:\n              type: string\n              enum:\n                - thread.message.in_progress\n              x-stainless-const: true\n            data:\n              $ref: '#/components/schemas/MessageObject'\n          required:\n            - event\n            - data\n          description: >-\n            Occurs when a [message](https://platform.openai.com/docs/api-reference/messages/object) moves to\n            an `in_progress` state.\n          x-oaiMeta:\n            dataDescription: '`data` is a [message](/docs/api-reference/messages/object)'\n        - type: object\n          properties:\n            event:\n              type: string\n              enum:\n                - thread.message.delta\n              x-stainless-const: true\n            data:\n              $ref: '#/components/schemas/MessageDeltaObject'\n          required:\n            - event\n            - data\n          description: >-\n            Occurs when parts of a [Message](https://platform.openai.com/docs/api-reference/messages/object)\n            are being streamed.\n          x-oaiMeta:\n            dataDescription: '`data` is a [message delta](/docs/api-reference/assistants-streaming/message-delta-object)'\n        - type: object\n          properties:\n            event:\n              type: string\n              enum:\n                - thread.message.completed\n              x-stainless-const: true\n            data:\n              $ref: '#/components/schemas/MessageObject'\n          required:\n            - event\n            - data\n          description: >-\n            Occurs when a [message](https://platform.openai.com/docs/api-reference/messages/object) is\n            completed.\n          x-oaiMeta:\n            dataDescription: '`data` is a [message](/docs/api-reference/messages/object)'\n        - type: object\n          properties:\n            event:\n              type: string\n              enum:\n                - thread.message.incomplete\n              x-stainless-const: true\n            data:\n              $ref: '#/components/schemas/MessageObject'\n          required:\n            - event\n            - data\n          description: >-\n            Occurs when a [message](https://platform.openai.com/docs/api-reference/messages/object) ends\n            before it is completed.\n          x-oaiMeta:\n            dataDescription: '`data` is a [message](/docs/api-reference/messages/object)'\n      discriminator:\n        propertyName: event\n    Metadata:\n      type: object\n      description: |\n        Set of 16 key-value pairs that can be attached to an object. This can be\n        useful for storing additional information about the object in a structured\n        format, and querying for objects via API or the dashboard.\n\n        Keys are strings with a maximum length of 64 characters. Values are strings\n        with a maximum length of 512 characters.\n      additionalProperties:\n        type: string\n      x-oaiTypeLabel: map\n      nullable: true\n    Model:\n      title: Model\n      description: Describes an OpenAI model offering that can be used with the API.\n      properties:\n        id:\n          type: string\n          description: The model identifier, which can be referenced in the API endpoints.\n        created:\n          type: integer\n          description: The Unix timestamp (in seconds) when the model was created.\n        object:\n          type: string\n          description: The object type, which is always \"model\".\n          enum:\n            - model\n          x-stainless-const: true\n        owned_by:\n          type: string\n          description: The organization that owns the model.\n      required:\n        - id\n        - object\n        - created\n        - owned_by\n      x-oaiMeta:\n        name: The model object\n        example: |\n          {\n            \"id\": \"VAR_chat_model_id\",\n            \"object\": \"model\",\n            \"created\": 1686935002,\n            \"owned_by\": \"openai\"\n          }\n    ModelIds:\n      anyOf:\n        - $ref: '#/components/schemas/ModelIdsShared'\n        - $ref: '#/components/schemas/ModelIdsResponses'\n    ModelIdsResponses:\n      example: gpt-4o\n      anyOf:\n        - $ref: '#/components/schemas/ModelIdsShared'\n        - type: string\n          title: ResponsesOnlyModel\n          enum:\n            - o1-pro\n            - o1-pro-2025-03-19\n            - o3-pro\n            - o3-pro-2025-06-10\n            - o3-deep-research\n            - o3-deep-research-2025-06-26\n            - o4-mini-deep-research\n            - o4-mini-deep-research-2025-06-26\n            - computer-use-preview\n            - computer-use-preview-2025-03-11\n    ModelIdsShared:\n      example: gpt-4o\n      anyOf:\n        - type: string\n        - $ref: '#/components/schemas/ChatModel'\n    ModelResponseProperties:\n      type: object\n      properties:\n        metadata:\n          $ref: '#/components/schemas/Metadata'\n        top_logprobs:\n          description: |\n            An integer between 0 and 20 specifying the number of most likely tokens to\n            return at each token position, each with an associated log probability.\n          type: integer\n          minimum: 0\n          maximum: 20\n          nullable: true\n        temperature:\n          type: number\n          minimum: 0\n          maximum: 2\n          default: 1\n          example: 1\n          nullable: true\n          description: >\n            What sampling temperature to use, between 0 and 2. Higher values like 0.8 will make the output\n            more random, while lower values like 0.2 will make it more focused and deterministic.\n\n            We generally recommend altering this or `top_p` but not both.\n        top_p:\n          type: number\n          minimum: 0\n          maximum: 1\n          default: 1\n          example: 1\n          nullable: true\n          description: |\n            An alternative to sampling with temperature, called nucleus sampling,\n            where the model considers the results of the tokens with top_p probability\n            mass. So 0.1 means only the tokens comprising the top 10% probability mass\n            are considered.\n\n            We generally recommend altering this or `temperature` but not both.\n        user:\n          type: string\n          example: user-1234\n          deprecated: true\n          description: >\n            This field is being replaced by `safety_identifier` and `prompt_cache_key`. Use `prompt_cache_key`\n            instead to maintain caching optimizations.\n\n            A stable identifier for your end-users.\n\n            Used to boost cache hit rates by better bucketing similar requests and  to help OpenAI detect and\n            prevent abuse. [Learn\n            more](https://platform.openai.com/docs/guides/safety-best-practices#safety-identifiers).\n        safety_identifier:\n          type: string\n          example: safety-identifier-1234\n          description: >\n            A stable identifier used to help detect users of your application that may be violating OpenAI's\n            usage policies.\n\n            The IDs should be a string that uniquely identifies each user. We recommend hashing their username\n            or email address, in order to avoid sending us any identifying information. [Learn\n            more](https://platform.openai.com/docs/guides/safety-best-practices#safety-identifiers).\n        prompt_cache_key:\n          type: string\n          example: prompt-cache-key-1234\n          description: >\n            Used by OpenAI to cache responses for similar requests to optimize your cache hit rates. Replaces\n            the `user` field. [Learn more](https://platform.openai.com/docs/guides/prompt-caching).\n        service_tier:\n          $ref: '#/components/schemas/ServiceTier'\n    ModifyAssistantRequest:\n      type: object\n      additionalProperties: false\n      properties:\n        model:\n          description: >\n            ID of the model to use. You can use the [List\n            models](https://platform.openai.com/docs/api-reference/models/list) API to see all of your\n            available models, or see our [Model overview](https://platform.openai.com/docs/models) for\n            descriptions of them.\n          anyOf:\n            - type: string\n            - $ref: '#/components/schemas/AssistantSupportedModels'\n        reasoning_effort:\n          $ref: '#/components/schemas/ReasoningEffort'\n        name:\n          description: |\n            The name of the assistant. The maximum length is 256 characters.\n          type: string\n          nullable: true\n          maxLength: 256\n        description:\n          description: |\n            The description of the assistant. The maximum length is 512 characters.\n          type: string\n          nullable: true\n          maxLength: 512\n        instructions:\n          description: |\n            The system instructions that the assistant uses. The maximum length is 256,000 characters.\n          type: string\n          nullable: true\n          maxLength: 256000\n        tools:\n          description: >\n            A list of tool enabled on the assistant. There can be a maximum of 128 tools per assistant. Tools\n            can be of types `code_interpreter`, `file_search`, or `function`.\n          default: []\n          type: array\n          maxItems: 128\n          items:\n            $ref: '#/components/schemas/AssistantTool'\n        tool_resources:\n          type: object\n          description: >\n            A set of resources that are used by the assistant's tools. The resources are specific to the type\n            of tool. For example, the `code_interpreter` tool requires a list of file IDs, while the\n            `file_search` tool requires a list of vector store IDs.\n          properties:\n            code_interpreter:\n              type: object\n              properties:\n                file_ids:\n                  type: array\n                  description: >\n                    Overrides the list of [file](https://platform.openai.com/docs/api-reference/files) IDs\n                    made available to the `code_interpreter` tool. There can be a maximum of 20 files\n                    associated with the tool.\n                  default: []\n                  maxItems: 20\n                  items:\n                    type: string\n            file_search:\n              type: object\n              properties:\n                vector_store_ids:\n                  type: array\n                  description: >\n                    Overrides the [vector\n                    store](https://platform.openai.com/docs/api-reference/vector-stores/object) attached to\n                    this assistant. There can be a maximum of 1 vector store attached to the assistant.\n                  maxItems: 1\n                  items:\n                    type: string\n          nullable: true\n        metadata:\n          $ref: '#/components/schemas/Metadata'\n        temperature:\n          description: >\n            What sampling temperature to use, between 0 and 2. Higher values like 0.8 will make the output\n            more random, while lower values like 0.2 will make it more focused and deterministic.\n          type: number\n          minimum: 0\n          maximum: 2\n          default: 1\n          example: 1\n          nullable: true\n        top_p:\n          type: number\n          minimum: 0\n          maximum: 1\n          default: 1\n          example: 1\n          nullable: true\n          description: >\n            An alternative to sampling with temperature, called nucleus sampling, where the model considers\n            the results of the tokens with top_p probability mass. So 0.1 means only the tokens comprising the\n            top 10% probability mass are considered.\n\n\n            We generally recommend altering this or temperature but not both.\n        response_format:\n          $ref: '#/components/schemas/AssistantsApiResponseFormatOption'\n          nullable: true\n    ModifyCertificateRequest:\n      type: object\n      properties:\n        name:\n          type: string\n          description: The updated name for the certificate\n      required:\n        - name\n    ModifyMessageRequest:\n      type: object\n      additionalProperties: false\n      properties:\n        metadata:\n          $ref: '#/components/schemas/Metadata'\n    ModifyRunRequest:\n      type: object\n      additionalProperties: false\n      properties:\n        metadata:\n          $ref: '#/components/schemas/Metadata'\n    ModifyThreadRequest:\n      type: object\n      additionalProperties: false\n      properties:\n        tool_resources:\n          type: object\n          description: >\n            A set of resources that are made available to the assistant's tools in this thread. The resources\n            are specific to the type of tool. For example, the `code_interpreter` tool requires a list of file\n            IDs, while the `file_search` tool requires a list of vector store IDs.\n          properties:\n            code_interpreter:\n              type: object\n              properties:\n                file_ids:\n                  type: array\n                  description: >\n                    A list of [file](https://platform.openai.com/docs/api-reference/files) IDs made available\n                    to the `code_interpreter` tool. There can be a maximum of 20 files associated with the\n                    tool.\n                  default: []\n                  maxItems: 20\n                  items:\n                    type: string\n            file_search:\n              type: object\n              properties:\n                vector_store_ids:\n                  type: array\n                  description: >\n                    The [vector store](https://platform.openai.com/docs/api-reference/vector-stores/object)\n                    attached to this thread. There can be a maximum of 1 vector store attached to the thread.\n                  maxItems: 1\n                  items:\n                    type: string\n          nullable: true\n        metadata:\n          $ref: '#/components/schemas/Metadata'\n    Move:\n      type: object\n      title: Move\n      description: |\n        A mouse move action.\n      properties:\n        type:\n          type: string\n          enum:\n            - move\n          default: move\n          description: |\n            Specifies the event type. For a move action, this property is\n            always set to `move`.\n          x-stainless-const: true\n        x:\n          type: integer\n          description: |\n            The x-coordinate to move to.\n        'y':\n          type: integer\n          description: |\n            The y-coordinate to move to.\n      required:\n        - type\n        - x\n        - 'y'\n    OpenAIFile:\n      title: OpenAIFile\n      description: The `File` object represents a document that has been uploaded to OpenAI.\n      properties:\n        id:\n          type: string\n          description: The file identifier, which can be referenced in the API endpoints.\n        bytes:\n          type: integer\n          description: The size of the file, in bytes.\n        created_at:\n          type: integer\n          description: The Unix timestamp (in seconds) for when the file was created.\n        expires_at:\n          type: integer\n          description: The Unix timestamp (in seconds) for when the file will expire.\n        filename:\n          type: string\n          description: The name of the file.\n        object:\n          type: string\n          description: The object type, which is always `file`.\n          enum:\n            - file\n          x-stainless-const: true\n        purpose:\n          type: string\n          description: >-\n            The intended purpose of the file. Supported values are `assistants`, `assistants_output`, `batch`,\n            `batch_output`, `fine-tune`, `fine-tune-results`, `vision`, and `user_data`.\n          enum:\n            - assistants\n            - assistants_output\n            - batch\n            - batch_output\n            - fine-tune\n            - fine-tune-results\n            - vision\n            - user_data\n        status:\n          type: string\n          deprecated: true\n          description: >-\n            Deprecated. The current status of the file, which can be either `uploaded`, `processed`, or\n            `error`.\n          enum:\n            - uploaded\n            - processed\n            - error\n        status_details:\n          type: string\n          deprecated: true\n          description: >-\n            Deprecated. For details on why a fine-tuning training file failed validation, see the `error`\n            field on `fine_tuning.job`.\n      required:\n        - id\n        - object\n        - bytes\n        - created_at\n        - filename\n        - purpose\n        - status\n      x-oaiMeta:\n        name: The file object\n        example: |\n          {\n            \"id\": \"file-abc123\",\n            \"object\": \"file\",\n            \"bytes\": 120000,\n            \"created_at\": 1677610602,\n            \"expires_at\": 1680202602,\n            \"filename\": \"salesOverview.pdf\",\n            \"purpose\": \"assistants\",\n          }\n    OtherChunkingStrategyResponseParam:\n      type: object\n      title: Other Chunking Strategy\n      description: >-\n        This is returned when the chunking strategy is unknown. Typically, this is because the file was\n        indexed before the `chunking_strategy` concept was introduced in the API.\n      additionalProperties: false\n      properties:\n        type:\n          type: string\n          description: Always `other`.\n          enum:\n            - other\n          x-stainless-const: true\n      required:\n        - type\n    OutputAudio:\n      type: object\n      title: Output audio\n      description: |\n        An audio output from the model.\n      properties:\n        type:\n          type: string\n          description: |\n            The type of the output audio. Always `output_audio`.\n          enum:\n            - output_audio\n          x-stainless-const: true\n        data:\n          type: string\n          description: |\n            Base64-encoded audio data from the model.\n        transcript:\n          type: string\n          description: |\n            The transcript of the audio data from the model.\n      required:\n        - type\n        - data\n        - transcript\n    OutputContent:\n      anyOf:\n        - $ref: '#/components/schemas/OutputTextContent'\n        - $ref: '#/components/schemas/RefusalContent'\n      discriminator:\n        propertyName: type\n    OutputItem:\n      anyOf:\n        - $ref: '#/components/schemas/OutputMessage'\n        - $ref: '#/components/schemas/FileSearchToolCall'\n        - $ref: '#/components/schemas/FunctionToolCall'\n        - $ref: '#/components/schemas/WebSearchToolCall'\n        - $ref: '#/components/schemas/ComputerToolCall'\n        - $ref: '#/components/schemas/ReasoningItem'\n        - $ref: '#/components/schemas/ImageGenToolCall'\n        - $ref: '#/components/schemas/CodeInterpreterToolCall'\n        - $ref: '#/components/schemas/LocalShellToolCall'\n        - $ref: '#/components/schemas/MCPToolCall'\n        - $ref: '#/components/schemas/MCPListTools'\n        - $ref: '#/components/schemas/MCPApprovalRequest'\n        - $ref: '#/components/schemas/CustomToolCall'\n      discriminator:\n        propertyName: type\n    OutputMessage:\n      type: object\n      title: Output message\n      description: |\n        An output message from the model.\n      properties:\n        id:\n          type: string\n          description: |\n            The unique ID of the output message.\n          x-stainless-go-json: omitzero\n        type:\n          type: string\n          description: |\n            The type of the output message. Always `message`.\n          enum:\n            - message\n          x-stainless-const: true\n        role:\n          type: string\n          description: |\n            The role of the output message. Always `assistant`.\n          enum:\n            - assistant\n          x-stainless-const: true\n        content:\n          type: array\n          description: |\n            The content of the output message.\n          items:\n            $ref: '#/components/schemas/OutputContent'\n        status:\n          type: string\n          description: |\n            The status of the message input. One of `in_progress`, `completed`, or\n            `incomplete`. Populated when input items are returned via API.\n          enum:\n            - in_progress\n            - completed\n            - incomplete\n      required:\n        - id\n        - type\n        - role\n        - content\n        - status\n    ParallelToolCalls:\n      description: >-\n        Whether to enable [parallel function\n        calling](https://platform.openai.com/docs/guides/function-calling#configuring-parallel-function-calling)\n        during tool use.\n      type: boolean\n      default: true\n    PartialImages:\n      type: integer\n      maximum: 3\n      minimum: 0\n      default: 0\n      example: 1\n      nullable: true\n      description: |\n        The number of partial images to generate. This parameter is used for\n        streaming responses that return partial images. Value must be between 0 and 3.\n        When set to 0, the response will be a single image sent in one streaming event.\n\n        Note that the final image may be sent before the full number of partial images\n        are generated if the full image is generated more quickly.\n    PredictionContent:\n      type: object\n      title: Static Content\n      description: |\n        Static predicted output content, such as the content of a text file that is\n        being regenerated.\n      required:\n        - type\n        - content\n      properties:\n        type:\n          type: string\n          enum:\n            - content\n          description: |\n            The type of the predicted content you want to provide. This type is\n            currently always `content`.\n          x-stainless-const: true\n        content:\n          description: |\n            The content that should be matched when generating a model response.\n            If generated tokens would match this content, the entire model response\n            can be returned much more quickly.\n          anyOf:\n            - type: string\n              title: Text content\n              description: |\n                The content used for a Predicted Output. This is often the\n                text of a file you are regenerating with minor changes.\n            - type: array\n              description: >-\n                An array of content parts with a defined type. Supported options differ based on the\n                [model](https://platform.openai.com/docs/models) being used to generate the response. Can\n                contain text inputs.\n              title: Array of content parts\n              items:\n                $ref: '#/components/schemas/ChatCompletionRequestMessageContentPartText'\n              minItems: 1\n    Project:\n      type: object\n      description: Represents an individual project.\n      properties:\n        id:\n          type: string\n          description: The identifier, which can be referenced in API endpoints\n        object:\n          type: string\n          enum:\n            - organization.project\n          description: The object type, which is always `organization.project`\n          x-stainless-const: true\n        name:\n          type: string\n          description: The name of the project. This appears in reporting.\n        created_at:\n          type: integer\n          description: The Unix timestamp (in seconds) of when the project was created.\n        archived_at:\n          type: integer\n          nullable: true\n          description: The Unix timestamp (in seconds) of when the project was archived or `null`.\n        status:\n          type: string\n          enum:\n            - active\n            - archived\n          description: '`active` or `archived`'\n      required:\n        - id\n        - object\n        - name\n        - created_at\n        - status\n      x-oaiMeta:\n        name: The project object\n        example: |\n          {\n              \"id\": \"proj_abc\",\n              \"object\": \"organization.project\",\n              \"name\": \"Project example\",\n              \"created_at\": 1711471533,\n              \"archived_at\": null,\n              \"status\": \"active\"\n          }\n    ProjectApiKey:\n      type: object\n      description: Represents an individual API key in a project.\n      properties:\n        object:\n          type: string\n          enum:\n            - organization.project.api_key\n          description: The object type, which is always `organization.project.api_key`\n          x-stainless-const: true\n        redacted_value:\n          type: string\n          description: The redacted value of the API key\n        name:\n          type: string\n          description: The name of the API key\n        created_at:\n          type: integer\n          description: The Unix timestamp (in seconds) of when the API key was created\n        last_used_at:\n          type: integer\n          description: The Unix timestamp (in seconds) of when the API key was last used.\n        id:\n          type: string\n          description: The identifier, which can be referenced in API endpoints\n        owner:\n          type: object\n          properties:\n            type:\n              type: string\n              enum:\n                - user\n                - service_account\n              description: '`user` or `service_account`'\n            user:\n              $ref: '#/components/schemas/ProjectUser'\n            service_account:\n              $ref: '#/components/schemas/ProjectServiceAccount'\n      required:\n        - object\n        - redacted_value\n        - name\n        - created_at\n        - last_used_at\n        - id\n        - owner\n      x-oaiMeta:\n        name: The project API key object\n        example: |\n          {\n              \"object\": \"organization.project.api_key\",\n              \"redacted_value\": \"sk-abc...def\",\n              \"name\": \"My API Key\",\n              \"created_at\": 1711471533,\n              \"last_used_at\": 1711471534,\n              \"id\": \"key_abc\",\n              \"owner\": {\n                  \"type\": \"user\",\n                  \"user\": {\n                      \"object\": \"organization.project.user\",\n                      \"id\": \"user_abc\",\n                      \"name\": \"First Last\",\n                      \"email\": \"user@example.com\",\n                      \"role\": \"owner\",\n                      \"created_at\": 1711471533\n                  }\n              }\n          }\n    ProjectApiKeyDeleteResponse:\n      type: object\n      properties:\n        object:\n          type: string\n          enum:\n            - organization.project.api_key.deleted\n          x-stainless-const: true\n        id:\n          type: string\n        deleted:\n          type: boolean\n      required:\n        - object\n        - id\n        - deleted\n    ProjectApiKeyListResponse:\n      type: object\n      properties:\n        object:\n          type: string\n          enum:\n            - list\n          x-stainless-const: true\n        data:\n          type: array\n          items:\n            $ref: '#/components/schemas/ProjectApiKey'\n        first_id:\n          type: string\n        last_id:\n          type: string\n        has_more:\n          type: boolean\n      required:\n        - object\n        - data\n        - first_id\n        - last_id\n        - has_more\n    ProjectCreateRequest:\n      type: object\n      properties:\n        name:\n          type: string\n          description: The friendly name of the project, this name appears in reports.\n      required:\n        - name\n    ProjectListResponse:\n      type: object\n      properties:\n        object:\n          type: string\n          enum:\n            - list\n          x-stainless-const: true\n        data:\n          type: array\n          items:\n            $ref: '#/components/schemas/Project'\n        first_id:\n          type: string\n        last_id:\n          type: string\n        has_more:\n          type: boolean\n      required:\n        - object\n        - data\n        - first_id\n        - last_id\n        - has_more\n    ProjectRateLimit:\n      type: object\n      description: Represents a project rate limit config.\n      properties:\n        object:\n          type: string\n          enum:\n            - project.rate_limit\n          description: The object type, which is always `project.rate_limit`\n          x-stainless-const: true\n        id:\n          type: string\n          description: The identifier, which can be referenced in API endpoints.\n        model:\n          type: string\n          description: The model this rate limit applies to.\n        max_requests_per_1_minute:\n          type: integer\n          description: The maximum requests per minute.\n        max_tokens_per_1_minute:\n          type: integer\n          description: The maximum tokens per minute.\n        max_images_per_1_minute:\n          type: integer\n          description: The maximum images per minute. Only present for relevant models.\n        max_audio_megabytes_per_1_minute:\n          type: integer\n          description: The maximum audio megabytes per minute. Only present for relevant models.\n        max_requests_per_1_day:\n          type: integer\n          description: The maximum requests per day. Only present for relevant models.\n        batch_1_day_max_input_tokens:\n          type: integer\n          description: The maximum batch input tokens per day. Only present for relevant models.\n      required:\n        - object\n        - id\n        - model\n        - max_requests_per_1_minute\n        - max_tokens_per_1_minute\n      x-oaiMeta:\n        name: The project rate limit object\n        example: |\n          {\n              \"object\": \"project.rate_limit\",\n              \"id\": \"rl_ada\",\n              \"model\": \"ada\",\n              \"max_requests_per_1_minute\": 600,\n              \"max_tokens_per_1_minute\": 150000,\n              \"max_images_per_1_minute\": 10\n          }\n    ProjectRateLimitListResponse:\n      type: object\n      properties:\n        object:\n          type: string\n          enum:\n            - list\n          x-stainless-const: true\n        data:\n          type: array\n          items:\n            $ref: '#/components/schemas/ProjectRateLimit'\n        first_id:\n          type: string\n        last_id:\n          type: string\n        has_more:\n          type: boolean\n      required:\n        - object\n        - data\n        - first_id\n        - last_id\n        - has_more\n    ProjectRateLimitUpdateRequest:\n      type: object\n      properties:\n        max_requests_per_1_minute:\n          type: integer\n          description: The maximum requests per minute.\n        max_tokens_per_1_minute:\n          type: integer\n          description: The maximum tokens per minute.\n        max_images_per_1_minute:\n          type: integer\n          description: The maximum images per minute. Only relevant for certain models.\n        max_audio_megabytes_per_1_minute:\n          type: integer\n          description: The maximum audio megabytes per minute. Only relevant for certain models.\n        max_requests_per_1_day:\n          type: integer\n          description: The maximum requests per day. Only relevant for certain models.\n        batch_1_day_max_input_tokens:\n          type: integer\n          description: The maximum batch input tokens per day. Only relevant for certain models.\n    ProjectServiceAccount:\n      type: object\n      description: Represents an individual service account in a project.\n      properties:\n        object:\n          type: string\n          enum:\n            - organization.project.service_account\n          description: The object type, which is always `organization.project.service_account`\n          x-stainless-const: true\n        id:\n          type: string\n          description: The identifier, which can be referenced in API endpoints\n        name:\n          type: string\n          description: The name of the service account\n        role:\n          type: string\n          enum:\n            - owner\n            - member\n          description: '`owner` or `member`'\n        created_at:\n          type: integer\n          description: The Unix timestamp (in seconds) of when the service account was created\n      required:\n        - object\n        - id\n        - name\n        - role\n        - created_at\n      x-oaiMeta:\n        name: The project service account object\n        example: |\n          {\n              \"object\": \"organization.project.service_account\",\n              \"id\": \"svc_acct_abc\",\n              \"name\": \"Service Account\",\n              \"role\": \"owner\",\n              \"created_at\": 1711471533\n          }\n    ProjectServiceAccountApiKey:\n      type: object\n      properties:\n        object:\n          type: string\n          enum:\n            - organization.project.service_account.api_key\n          description: The object type, which is always `organization.project.service_account.api_key`\n          x-stainless-const: true\n        value:\n          type: string\n        name:\n          type: string\n        created_at:\n          type: integer\n        id:\n          type: string\n      required:\n        - object\n        - value\n        - name\n        - created_at\n        - id\n    ProjectServiceAccountCreateRequest:\n      type: object\n      properties:\n        name:\n          type: string\n          description: The name of the service account being created.\n      required:\n        - name\n    ProjectServiceAccountCreateResponse:\n      type: object\n      properties:\n        object:\n          type: string\n          enum:\n            - organization.project.service_account\n          x-stainless-const: true\n        id:\n          type: string\n        name:\n          type: string\n        role:\n          type: string\n          enum:\n            - member\n          description: Service accounts can only have one role of type `member`\n          x-stainless-const: true\n        created_at:\n          type: integer\n        api_key:\n          $ref: '#/components/schemas/ProjectServiceAccountApiKey'\n      required:\n        - object\n        - id\n        - name\n        - role\n        - created_at\n        - api_key\n    ProjectServiceAccountDeleteResponse:\n      type: object\n      properties:\n        object:\n          type: string\n          enum:\n            - organization.project.service_account.deleted\n          x-stainless-const: true\n        id:\n          type: string\n        deleted:\n          type: boolean\n      required:\n        - object\n        - id\n        - deleted\n    ProjectServiceAccountListResponse:\n      type: object\n      properties:\n        object:\n          type: string\n          enum:\n            - list\n          x-stainless-const: true\n        data:\n          type: array\n          items:\n            $ref: '#/components/schemas/ProjectServiceAccount'\n        first_id:\n          type: string\n        last_id:\n          type: string\n        has_more:\n          type: boolean\n      required:\n        - object\n        - data\n        - first_id\n        - last_id\n        - has_more\n    ProjectUpdateRequest:\n      type: object\n      properties:\n        name:\n          type: string\n          description: The updated name of the project, this name appears in reports.\n      required:\n        - name\n    ProjectUser:\n      type: object\n      description: Represents an individual user in a project.\n      properties:\n        object:\n          type: string\n          enum:\n            - organization.project.user\n          description: The object type, which is always `organization.project.user`\n          x-stainless-const: true\n        id:\n          type: string\n          description: The identifier, which can be referenced in API endpoints\n        name:\n          type: string\n          description: The name of the user\n        email:\n          type: string\n          description: The email address of the user\n        role:\n          type: string\n          enum:\n            - owner\n            - member\n          description: '`owner` or `member`'\n        added_at:\n          type: integer\n          description: The Unix timestamp (in seconds) of when the project was added.\n      required:\n        - object\n        - id\n        - name\n        - email\n        - role\n        - added_at\n      x-oaiMeta:\n        name: The project user object\n        example: |\n          {\n              \"object\": \"organization.project.user\",\n              \"id\": \"user_abc\",\n              \"name\": \"First Last\",\n              \"email\": \"user@example.com\",\n              \"role\": \"owner\",\n              \"added_at\": 1711471533\n          }\n    ProjectUserCreateRequest:\n      type: object\n      properties:\n        user_id:\n          type: string\n          description: The ID of the user.\n        role:\n          type: string\n          enum:\n            - owner\n            - member\n          description: '`owner` or `member`'\n      required:\n        - user_id\n        - role\n    ProjectUserDeleteResponse:\n      type: object\n      properties:\n        object:\n          type: string\n          enum:\n            - organization.project.user.deleted\n          x-stainless-const: true\n        id:\n          type: string\n        deleted:\n          type: boolean\n      required:\n        - object\n        - id\n        - deleted\n    ProjectUserListResponse:\n      type: object\n      properties:\n        object:\n          type: string\n        data:\n          type: array\n          items:\n            $ref: '#/components/schemas/ProjectUser'\n        first_id:\n          type: string\n        last_id:\n          type: string\n        has_more:\n          type: boolean\n      required:\n        - object\n        - data\n        - first_id\n        - last_id\n        - has_more\n    ProjectUserUpdateRequest:\n      type: object\n      properties:\n        role:\n          type: string\n          enum:\n            - owner\n            - member\n          description: '`owner` or `member`'\n      required:\n        - role\n    Prompt:\n      type: object\n      nullable: true\n      description: |\n        Reference to a prompt template and its variables.\n        [Learn more](https://platform.openai.com/docs/guides/text?api-mode=responses#reusable-prompts).\n      required:\n        - id\n      properties:\n        id:\n          type: string\n          description: The unique identifier of the prompt template to use.\n        version:\n          type: string\n          description: Optional version of the prompt template.\n          nullable: true\n        variables:\n          $ref: '#/components/schemas/ResponsePromptVariables'\n    RealtimeClientEvent:\n      discriminator:\n        propertyName: type\n      description: |\n        A realtime client event.\n      anyOf:\n        - $ref: '#/components/schemas/RealtimeClientEventConversationItemCreate'\n        - $ref: '#/components/schemas/RealtimeClientEventConversationItemDelete'\n        - $ref: '#/components/schemas/RealtimeClientEventConversationItemRetrieve'\n        - $ref: '#/components/schemas/RealtimeClientEventConversationItemTruncate'\n        - $ref: '#/components/schemas/RealtimeClientEventInputAudioBufferAppend'\n        - $ref: '#/components/schemas/RealtimeClientEventInputAudioBufferClear'\n        - $ref: '#/components/schemas/RealtimeClientEventOutputAudioBufferClear'\n        - $ref: '#/components/schemas/RealtimeClientEventInputAudioBufferCommit'\n        - $ref: '#/components/schemas/RealtimeClientEventResponseCancel'\n        - $ref: '#/components/schemas/RealtimeClientEventResponseCreate'\n        - $ref: '#/components/schemas/RealtimeClientEventSessionUpdate'\n        - $ref: '#/components/schemas/RealtimeClientEventTranscriptionSessionUpdate'\n    RealtimeClientEventConversationItemCreate:\n      type: object\n      description: |\n        Add a new Item to the Conversation's context, including messages, function\n        calls, and function call responses. This event can be used both to populate a\n        \"history\" of the conversation and to add new items mid-stream, but has the\n        current limitation that it cannot populate assistant audio messages.\n\n        If successful, the server will respond with a `conversation.item.created`\n        event, otherwise an `error` event will be sent.\n      properties:\n        event_id:\n          type: string\n          description: Optional client-generated ID used to identify this event.\n        type:\n          description: The event type, must be `conversation.item.create`.\n          x-stainless-const: true\n          const: conversation.item.create\n        previous_item_id:\n          type: string\n          description: |\n            The ID of the preceding item after which the new item will be inserted.\n            If not set, the new item will be appended to the end of the conversation.\n            If set to `root`, the new item will be added to the beginning of the conversation.\n            If set to an existing ID, it allows an item to be inserted mid-conversation. If the\n            ID cannot be found, an error will be returned and the item will not be added.\n        item:\n          $ref: '#/components/schemas/RealtimeConversationItem'\n      required:\n        - type\n        - item\n      x-oaiMeta:\n        name: conversation.item.create\n        group: realtime\n        example: |\n          {\n              \"event_id\": \"event_345\",\n              \"type\": \"conversation.item.create\",\n              \"previous_item_id\": null,\n              \"item\": {\n                  \"id\": \"msg_001\",\n                  \"type\": \"message\",\n                  \"role\": \"user\",\n                  \"content\": [\n                      {\n                          \"type\": \"input_text\",\n                          \"text\": \"Hello, how are you?\"\n                      }\n                  ]\n              }\n          }\n    RealtimeClientEventConversationItemDelete:\n      type: object\n      description: |\n        Send this event when you want to remove any item from the conversation\n        history. The server will respond with a `conversation.item.deleted` event,\n        unless the item does not exist in the conversation history, in which case the\n        server will respond with an error.\n      properties:\n        event_id:\n          type: string\n          description: Optional client-generated ID used to identify this event.\n        type:\n          description: The event type, must be `conversation.item.delete`.\n          x-stainless-const: true\n          const: conversation.item.delete\n        item_id:\n          type: string\n          description: The ID of the item to delete.\n      required:\n        - type\n        - item_id\n      x-oaiMeta:\n        name: conversation.item.delete\n        group: realtime\n        example: |\n          {\n              \"event_id\": \"event_901\",\n              \"type\": \"conversation.item.delete\",\n              \"item_id\": \"msg_003\"\n          }\n    RealtimeClientEventConversationItemRetrieve:\n      type: object\n      description: >\n        Send this event when you want to retrieve the server's representation of a specific item in the\n        conversation history. This is useful, for example, to inspect user audio after noise cancellation and\n        VAD.\n\n        The server will respond with a `conversation.item.retrieved` event,\n\n        unless the item does not exist in the conversation history, in which case the\n\n        server will respond with an error.\n      properties:\n        event_id:\n          type: string\n          description: Optional client-generated ID used to identify this event.\n        type:\n          description: The event type, must be `conversation.item.retrieve`.\n          x-stainless-const: true\n          const: conversation.item.retrieve\n        item_id:\n          type: string\n          description: The ID of the item to retrieve.\n      required:\n        - type\n        - item_id\n      x-oaiMeta:\n        name: conversation.item.retrieve\n        group: realtime\n        example: |\n          {\n              \"event_id\": \"event_901\",\n              \"type\": \"conversation.item.retrieve\",\n              \"item_id\": \"msg_003\"\n          }\n    RealtimeClientEventConversationItemTruncate:\n      type: object\n      description: |\n        Send this event to truncate a previous assistant message’s audio. The server\n        will produce audio faster than realtime, so this event is useful when the user\n        interrupts to truncate audio that has already been sent to the client but not\n        yet played. This will synchronize the server's understanding of the audio with\n        the client's playback.\n\n        Truncating audio will delete the server-side text transcript to ensure there\n        is not text in the context that hasn't been heard by the user.\n\n        If successful, the server will respond with a `conversation.item.truncated`\n        event.\n      properties:\n        event_id:\n          type: string\n          description: Optional client-generated ID used to identify this event.\n        type:\n          description: The event type, must be `conversation.item.truncate`.\n          x-stainless-const: true\n          const: conversation.item.truncate\n        item_id:\n          type: string\n          description: |\n            The ID of the assistant message item to truncate. Only assistant message\n            items can be truncated.\n        content_index:\n          type: integer\n          description: The index of the content part to truncate. Set this to 0.\n        audio_end_ms:\n          type: integer\n          description: |\n            Inclusive duration up to which audio is truncated, in milliseconds. If\n            the audio_end_ms is greater than the actual audio duration, the server\n            will respond with an error.\n      required:\n        - type\n        - item_id\n        - content_index\n        - audio_end_ms\n      x-oaiMeta:\n        name: conversation.item.truncate\n        group: realtime\n        example: |\n          {\n              \"event_id\": \"event_678\",\n              \"type\": \"conversation.item.truncate\",\n              \"item_id\": \"msg_002\",\n              \"content_index\": 0,\n              \"audio_end_ms\": 1500\n          }\n    RealtimeClientEventInputAudioBufferAppend:\n      type: object\n      description: |\n        Send this event to append audio bytes to the input audio buffer. The audio\n        buffer is temporary storage you can write to and later commit. In Server VAD\n        mode, the audio buffer is used to detect speech and the server will decide\n        when to commit. When Server VAD is disabled, you must commit the audio buffer\n        manually.\n\n        The client may choose how much audio to place in each event up to a maximum\n        of 15 MiB, for example streaming smaller chunks from the client may allow the\n        VAD to be more responsive. Unlike made other client events, the server will\n        not send a confirmation response to this event.\n      properties:\n        event_id:\n          type: string\n          description: Optional client-generated ID used to identify this event.\n        type:\n          description: The event type, must be `input_audio_buffer.append`.\n          x-stainless-const: true\n          const: input_audio_buffer.append\n        audio:\n          type: string\n          description: |\n            Base64-encoded audio bytes. This must be in the format specified by the\n            `input_audio_format` field in the session configuration.\n      required:\n        - type\n        - audio\n      x-oaiMeta:\n        name: input_audio_buffer.append\n        group: realtime\n        example: |\n          {\n              \"event_id\": \"event_456\",\n              \"type\": \"input_audio_buffer.append\",\n              \"audio\": \"Base64EncodedAudioData\"\n          }\n    RealtimeClientEventInputAudioBufferClear:\n      type: object\n      description: |\n        Send this event to clear the audio bytes in the buffer. The server will\n        respond with an `input_audio_buffer.cleared` event.\n      properties:\n        event_id:\n          type: string\n          description: Optional client-generated ID used to identify this event.\n        type:\n          description: The event type, must be `input_audio_buffer.clear`.\n          x-stainless-const: true\n          const: input_audio_buffer.clear\n      required:\n        - type\n      x-oaiMeta:\n        name: input_audio_buffer.clear\n        group: realtime\n        example: |\n          {\n              \"event_id\": \"event_012\",\n              \"type\": \"input_audio_buffer.clear\"\n          }\n    RealtimeClientEventInputAudioBufferCommit:\n      type: object\n      description: |\n        Send this event to commit the user input audio buffer, which will create a\n        new user message item in the conversation. This event will produce an error\n        if the input audio buffer is empty. When in Server VAD mode, the client does\n        not need to send this event, the server will commit the audio buffer\n        automatically.\n\n        Committing the input audio buffer will trigger input audio transcription\n        (if enabled in session configuration), but it will not create a response\n        from the model. The server will respond with an `input_audio_buffer.committed`\n        event.\n      properties:\n        event_id:\n          type: string\n          description: Optional client-generated ID used to identify this event.\n        type:\n          description: The event type, must be `input_audio_buffer.commit`.\n          x-stainless-const: true\n          const: input_audio_buffer.commit\n      required:\n        - type\n      x-oaiMeta:\n        name: input_audio_buffer.commit\n        group: realtime\n        example: |\n          {\n              \"event_id\": \"event_789\",\n              \"type\": \"input_audio_buffer.commit\"\n          }\n    RealtimeClientEventOutputAudioBufferClear:\n      type: object\n      description: >\n        **WebRTC Only:** Emit to cut off the current audio response. This will trigger the server to\n\n        stop generating audio and emit a `output_audio_buffer.cleared` event. This\n\n        event should be preceded by a `response.cancel` client event to stop the\n\n        generation of the current response.\n\n        [Learn\n        more](https://platform.openai.com/docs/guides/realtime-conversations#client-and-server-events-for-audio-in-webrtc).\n      properties:\n        event_id:\n          type: string\n          description: The unique ID of the client event used for error handling.\n        type:\n          description: The event type, must be `output_audio_buffer.clear`.\n          x-stainless-const: true\n          const: output_audio_buffer.clear\n      required:\n        - type\n      x-oaiMeta:\n        name: output_audio_buffer.clear\n        group: realtime\n        example: |\n          {\n              \"event_id\": \"optional_client_event_id\",\n              \"type\": \"output_audio_buffer.clear\"\n          }\n    RealtimeClientEventResponseCancel:\n      type: object\n      description: |\n        Send this event to cancel an in-progress response. The server will respond\n        with a `response.done` event with a status of `response.status=cancelled`. If\n        there is no response to cancel, the server will respond with an error.\n      properties:\n        event_id:\n          type: string\n          description: Optional client-generated ID used to identify this event.\n        type:\n          description: The event type, must be `response.cancel`.\n          x-stainless-const: true\n          const: response.cancel\n        response_id:\n          type: string\n          description: |\n            A specific response ID to cancel - if not provided, will cancel an\n            in-progress response in the default conversation.\n      required:\n        - type\n      x-oaiMeta:\n        name: response.cancel\n        group: realtime\n        example: |\n          {\n              \"event_id\": \"event_567\",\n              \"type\": \"response.cancel\"\n          }\n    RealtimeClientEventResponseCreate:\n      type: object\n      description: |\n        This event instructs the server to create a Response, which means triggering\n        model inference. When in Server VAD mode, the server will create Responses\n        automatically.\n\n        A Response will include at least one Item, and may have two, in which case\n        the second will be a function call. These Items will be appended to the\n        conversation history.\n\n        The server will respond with a `response.created` event, events for Items\n        and content created, and finally a `response.done` event to indicate the\n        Response is complete.\n\n        The `response.create` event includes inference configuration like\n        `instructions`, and `temperature`. These fields will override the Session's\n        configuration for this Response only.\n      properties:\n        event_id:\n          type: string\n          description: Optional client-generated ID used to identify this event.\n        type:\n          description: The event type, must be `response.create`.\n          x-stainless-const: true\n          const: response.create\n        response:\n          $ref: '#/components/schemas/RealtimeResponseCreateParams'\n      required:\n        - type\n      x-oaiMeta:\n        name: response.create\n        group: realtime\n        example: |\n          {\n              \"event_id\": \"event_234\",\n              \"type\": \"response.create\",\n              \"response\": {\n                  \"modalities\": [\"text\", \"audio\"],\n                  \"instructions\": \"Please assist the user.\",\n                  \"voice\": \"sage\",\n                  \"output_audio_format\": \"pcm16\",\n                  \"tools\": [\n                      {\n                          \"type\": \"function\",\n                          \"name\": \"calculate_sum\",\n                          \"description\": \"Calculates the sum of two numbers.\",\n                          \"parameters\": {\n                              \"type\": \"object\",\n                              \"properties\": {\n                                  \"a\": { \"type\": \"number\" },\n                                  \"b\": { \"type\": \"number\" }\n                              },\n                              \"required\": [\"a\", \"b\"]\n                          }\n                      }\n                  ],\n                  \"tool_choice\": \"auto\",\n                  \"temperature\": 0.8,\n                  \"max_output_tokens\": 1024\n              }\n          }\n    RealtimeClientEventSessionUpdate:\n      type: object\n      description: |\n        Send this event to update the session’s default configuration.\n        The client may send this event at any time to update any field,\n        except for `voice`. However, note that once a session has been\n        initialized with a particular `model`, it can’t be changed to\n        another model using `session.update`.\n\n        When the server receives a `session.update`, it will respond\n        with a `session.updated` event showing the full, effective configuration.\n        Only the fields that are present are updated. To clear a field like\n        `instructions`, pass an empty string.\n      properties:\n        event_id:\n          type: string\n          description: Optional client-generated ID used to identify this event.\n        type:\n          description: The event type, must be `session.update`.\n          x-stainless-const: true\n          const: session.update\n        session:\n          $ref: '#/components/schemas/RealtimeSessionCreateRequest'\n      required:\n        - type\n        - session\n      x-oaiMeta:\n        name: session.update\n        group: realtime\n        example: |\n          {\n              \"event_id\": \"event_123\",\n              \"type\": \"session.update\",\n              \"session\": {\n                  \"modalities\": [\"text\", \"audio\"],\n                  \"instructions\": \"You are a helpful assistant.\",\n                  \"voice\": \"sage\",\n                  \"input_audio_format\": \"pcm16\",\n                  \"output_audio_format\": \"pcm16\",\n                  \"input_audio_transcription\": {\n                      \"model\": \"whisper-1\"\n                  },\n                  \"turn_detection\": {\n                      \"type\": \"server_vad\",\n                      \"threshold\": 0.5,\n                      \"prefix_padding_ms\": 300,\n                      \"silence_duration_ms\": 500,\n                      \"create_response\": true\n                  },\n                  \"tools\": [\n                      {\n                          \"type\": \"function\",\n                          \"name\": \"get_weather\",\n                          \"description\": \"Get the current weather...\",\n                          \"parameters\": {\n                              \"type\": \"object\",\n                              \"properties\": {\n                                  \"location\": { \"type\": \"string\" }\n                              },\n                              \"required\": [\"location\"]\n                          }\n                      }\n                  ],\n                  \"tool_choice\": \"auto\",\n                  \"temperature\": 0.8,\n                  \"max_response_output_tokens\": \"inf\",\n                  \"speed\": 1.1,\n                  \"tracing\": \"auto\"\n              }\n          }\n    RealtimeClientEventTranscriptionSessionUpdate:\n      type: object\n      description: |\n        Send this event to update a transcription session.\n      properties:\n        event_id:\n          type: string\n          description: Optional client-generated ID used to identify this event.\n        type:\n          description: The event type, must be `transcription_session.update`.\n          x-stainless-const: true\n          const: transcription_session.update\n        session:\n          $ref: '#/components/schemas/RealtimeTranscriptionSessionCreateRequest'\n      required:\n        - type\n        - session\n      x-oaiMeta:\n        name: transcription_session.update\n        group: realtime\n        example: |\n          {\n            \"type\": \"transcription_session.update\",\n            \"session\": {\n              \"input_audio_format\": \"pcm16\",\n              \"input_audio_transcription\": {\n                \"model\": \"gpt-4o-transcribe\",\n                \"prompt\": \"\",\n                \"language\": \"\"\n              },\n              \"turn_detection\": {\n                \"type\": \"server_vad\",\n                \"threshold\": 0.5,\n                \"prefix_padding_ms\": 300,\n                \"silence_duration_ms\": 500,\n                \"create_response\": true,\n              },\n              \"input_audio_noise_reduction\": {\n                \"type\": \"near_field\"\n              },\n              \"include\": [\n                \"item.input_audio_transcription.logprobs\",\n              ]\n            }\n          }\n    RealtimeConversationItem:\n      type: object\n      description: The item to add to the conversation.\n      properties:\n        id:\n          type: string\n          description: |\n            The unique ID of the item, this can be generated by the client to help\n            manage server-side context, but is not required because the server will\n            generate one if not provided.\n        type:\n          type: string\n          enum:\n            - message\n            - function_call\n            - function_call_output\n          description: |\n            The type of the item (`message`, `function_call`, `function_call_output`).\n        object:\n          type: string\n          enum:\n            - realtime.item\n          description: |\n            Identifier for the API object being returned - always `realtime.item`.\n          x-stainless-const: true\n        status:\n          type: string\n          enum:\n            - completed\n            - incomplete\n            - in_progress\n          description: |\n            The status of the item (`completed`, `incomplete`, `in_progress`). These have no effect\n            on the conversation, but are accepted for consistency with the\n            `conversation.item.created` event.\n        role:\n          type: string\n          enum:\n            - user\n            - assistant\n            - system\n          description: |\n            The role of the message sender (`user`, `assistant`, `system`), only\n            applicable for `message` items.\n        content:\n          type: array\n          description: |\n            The content of the message, applicable for `message` items.\n            - Message items of role `system` support only `input_text` content\n            - Message items of role `user` support `input_text` and `input_audio`\n              content\n            - Message items of role `assistant` support `text` content.\n          items:\n            $ref: '#/components/schemas/RealtimeConversationItemContent'\n        call_id:\n          type: string\n          description: |\n            The ID of the function call (for `function_call` and\n            `function_call_output` items). If passed on a `function_call_output`\n            item, the server will check that a `function_call` item with the same\n            ID exists in the conversation history.\n        name:\n          type: string\n          description: |\n            The name of the function being called (for `function_call` items).\n        arguments:\n          type: string\n          description: |\n            The arguments of the function call (for `function_call` items).\n        output:\n          type: string\n          description: |\n            The output of the function call (for `function_call_output` items).\n    RealtimeConversationItemWithReference:\n      type: object\n      description: The item to add to the conversation.\n      properties:\n        id:\n          type: string\n          description: |\n            For an item of type (`message` | `function_call` | `function_call_output`)\n            this field allows the client to assign the unique ID of the item. It is\n            not required because the server will generate one if not provided.\n\n            For an item of type `item_reference`, this field is required and is a\n            reference to any item that has previously existed in the conversation.\n        type:\n          type: string\n          enum:\n            - message\n            - function_call\n            - function_call_output\n            - item_reference\n          description: |\n            The type of the item (`message`, `function_call`, `function_call_output`, `item_reference`).\n        object:\n          type: string\n          enum:\n            - realtime.item\n          description: |\n            Identifier for the API object being returned - always `realtime.item`.\n          x-stainless-const: true\n        status:\n          type: string\n          enum:\n            - completed\n            - incomplete\n            - in_progress\n          description: |\n            The status of the item (`completed`, `incomplete`, `in_progress`). These have no effect\n            on the conversation, but are accepted for consistency with the\n            `conversation.item.created` event.\n        role:\n          type: string\n          enum:\n            - user\n            - assistant\n            - system\n          description: |\n            The role of the message sender (`user`, `assistant`, `system`), only\n            applicable for `message` items.\n        content:\n          type: array\n          description: |\n            The content of the message, applicable for `message` items.\n            - Message items of role `system` support only `input_text` content\n            - Message items of role `user` support `input_text` and `input_audio`\n              content\n            - Message items of role `assistant` support `text` content.\n          items:\n            type: object\n            properties:\n              type:\n                type: string\n                enum:\n                  - input_text\n                  - input_audio\n                  - item_reference\n                  - text\n                description: |\n                  The content type (`input_text`, `input_audio`, `item_reference`, `text`).\n              text:\n                type: string\n                description: |\n                  The text content, used for `input_text` and `text` content types.\n              id:\n                type: string\n                description: |\n                  ID of a previous conversation item to reference (for `item_reference`\n                  content types in `response.create` events). These can reference both\n                  client and server created items.\n              audio:\n                type: string\n                description: |\n                  Base64-encoded audio bytes, used for `input_audio` content type.\n              transcript:\n                type: string\n                description: |\n                  The transcript of the audio, used for `input_audio` content type.\n        call_id:\n          type: string\n          description: |\n            The ID of the function call (for `function_call` and\n            `function_call_output` items). If passed on a `function_call_output`\n            item, the server will check that a `function_call` item with the same\n            ID exists in the conversation history.\n        name:\n          type: string\n          description: |\n            The name of the function being called (for `function_call` items).\n        arguments:\n          type: string\n          description: |\n            The arguments of the function call (for `function_call` items).\n        output:\n          type: string\n          description: |\n            The output of the function call (for `function_call_output` items).\n    RealtimeResponse:\n      type: object\n      description: The response resource.\n      properties:\n        id:\n          type: string\n          description: The unique ID of the response.\n        object:\n          description: The object type, must be `realtime.response`.\n          x-stainless-const: true\n          const: realtime.response\n        status:\n          type: string\n          enum:\n            - completed\n            - cancelled\n            - failed\n            - incomplete\n            - in_progress\n          description: |\n            The final status of the response (`completed`, `cancelled`, `failed`, or\n            `incomplete`, `in_progress`).\n        status_details:\n          type: object\n          description: Additional details about the status.\n          properties:\n            type:\n              type: string\n              enum:\n                - completed\n                - cancelled\n                - incomplete\n                - failed\n              description: |\n                The type of error that caused the response to fail, corresponding\n                with the `status` field (`completed`, `cancelled`, `incomplete`,\n                `failed`).\n            reason:\n              type: string\n              enum:\n                - turn_detected\n                - client_cancelled\n                - max_output_tokens\n                - content_filter\n              description: |\n                The reason the Response did not complete. For a `cancelled` Response,\n                one of `turn_detected` (the server VAD detected a new start of speech)\n                or `client_cancelled` (the client sent a cancel event). For an\n                `incomplete` Response, one of `max_output_tokens` or `content_filter`\n                (the server-side safety filter activated and cut off the response).\n            error:\n              type: object\n              description: |\n                A description of the error that caused the response to fail,\n                populated when the `status` is `failed`.\n              properties:\n                type:\n                  type: string\n                  description: The type of error.\n                code:\n                  type: string\n                  description: Error code, if any.\n        output:\n          type: array\n          description: The list of output items generated by the response.\n          items:\n            $ref: '#/components/schemas/RealtimeConversationItem'\n        metadata:\n          $ref: '#/components/schemas/Metadata'\n        usage:\n          type: object\n          description: |\n            Usage statistics for the Response, this will correspond to billing. A\n            Realtime API session will maintain a conversation context and append new\n            Items to the Conversation, thus output from previous turns (text and\n            audio tokens) will become the input for later turns.\n          properties:\n            total_tokens:\n              type: integer\n              description: |\n                The total number of tokens in the Response including input and output\n                text and audio tokens.\n            input_tokens:\n              type: integer\n              description: |\n                The number of input tokens used in the Response, including text and\n                audio tokens.\n            output_tokens:\n              type: integer\n              description: |\n                The number of output tokens sent in the Response, including text and\n                audio tokens.\n            input_token_details:\n              type: object\n              description: Details about the input tokens used in the Response.\n              properties:\n                cached_tokens:\n                  type: integer\n                  description: The number of cached tokens used in the Response.\n                text_tokens:\n                  type: integer\n                  description: The number of text tokens used in the Response.\n                audio_tokens:\n                  type: integer\n                  description: The number of audio tokens used in the Response.\n            output_token_details:\n              type: object\n              description: Details about the output tokens used in the Response.\n              properties:\n                text_tokens:\n                  type: integer\n                  description: The number of text tokens used in the Response.\n                audio_tokens:\n                  type: integer\n                  description: The number of audio tokens used in the Response.\n        conversation_id:\n          description: |\n            Which conversation the response is added to, determined by the `conversation`\n            field in the `response.create` event. If `auto`, the response will be added to\n            the default conversation and the value of `conversation_id` will be an id like\n            `conv_1234`. If `none`, the response will not be added to any conversation and\n            the value of `conversation_id` will be `null`. If responses are being triggered\n            by server VAD, the response will be added to the default conversation, thus\n            the `conversation_id` will be an id like `conv_1234`.\n          type: string\n        voice:\n          $ref: '#/components/schemas/VoiceIdsShared'\n          description: |\n            The voice the model used to respond.\n            Current voice options are `alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`,\n            `shimmer`, and `verse`.\n        modalities:\n          type: array\n          description: |\n            The set of modalities the model used to respond. If there are multiple modalities,\n            the model will pick one, for example if `modalities` is `[\"text\", \"audio\"]`, the model\n            could be responding in either text or audio.\n          items:\n            type: string\n            enum:\n              - text\n              - audio\n        output_audio_format:\n          type: string\n          enum:\n            - pcm16\n            - g711_ulaw\n            - g711_alaw\n          description: |\n            The format of output audio. Options are `pcm16`, `g711_ulaw`, or `g711_alaw`.\n        temperature:\n          type: number\n          description: |\n            Sampling temperature for the model, limited to [0.6, 1.2]. Defaults to 0.8.\n        max_output_tokens:\n          description: |\n            Maximum number of output tokens for a single assistant response,\n            inclusive of tool calls, that was used in this response.\n          anyOf:\n            - type: integer\n            - type: string\n              enum:\n                - inf\n              x-stainless-const: true\n    RealtimeResponseCreateParams:\n      type: object\n      description: Create a new Realtime response with these parameters\n      properties:\n        modalities:\n          type: array\n          description: |\n            The set of modalities the model can respond with. To disable audio,\n            set this to [\"text\"].\n          items:\n            type: string\n            enum:\n              - text\n              - audio\n        instructions:\n          type: string\n          description: |\n            The default system instructions (i.e. system message) prepended to model\n            calls. This field allows the client to guide the model on desired\n            responses. The model can be instructed on response content and format,\n            (e.g. \"be extremely succinct\", \"act friendly\", \"here are examples of good\n            responses\") and on audio behavior (e.g. \"talk quickly\", \"inject emotion\n            into your voice\", \"laugh frequently\"). The instructions are not guaranteed\n            to be followed by the model, but they provide guidance to the model on the\n            desired behavior.\n\n            Note that the server sets default instructions which will be used if this\n            field is not set and are visible in the `session.created` event at the\n            start of the session.\n        voice:\n          $ref: '#/components/schemas/VoiceIdsShared'\n          description: |\n            The voice the model uses to respond. Voice cannot be changed during the\n            session once the model has responded with audio at least once. Current\n            voice options are `alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`,\n            `shimmer`, and `verse`.\n        output_audio_format:\n          type: string\n          enum:\n            - pcm16\n            - g711_ulaw\n            - g711_alaw\n          description: |\n            The format of output audio. Options are `pcm16`, `g711_ulaw`, or `g711_alaw`.\n        tools:\n          type: array\n          description: Tools (functions) available to the model.\n          items:\n            type: object\n            properties:\n              type:\n                type: string\n                enum:\n                  - function\n                description: The type of the tool, i.e. `function`.\n                x-stainless-const: true\n              name:\n                type: string\n                description: The name of the function.\n              description:\n                type: string\n                description: |\n                  The description of the function, including guidance on when and how\n                  to call it, and guidance about what to tell the user when calling\n                  (if anything).\n              parameters:\n                type: object\n                description: Parameters of the function in JSON Schema.\n        tool_choice:\n          type: string\n          description: |\n            How the model chooses tools. Options are `auto`, `none`, `required`, or\n            specify a function, like `{\"type\": \"function\", \"function\": {\"name\": \"my_function\"}}`.\n        temperature:\n          type: number\n          description: |\n            Sampling temperature for the model, limited to [0.6, 1.2]. Defaults to 0.8.\n        max_response_output_tokens:\n          description: |\n            Maximum number of output tokens for a single assistant response,\n            inclusive of tool calls. Provide an integer between 1 and 4096 to\n            limit output tokens, or `inf` for the maximum available tokens for a\n            given model. Defaults to `inf`.\n          anyOf:\n            - type: integer\n            - type: string\n              enum:\n                - inf\n              x-stainless-const: true\n        conversation:\n          description: |\n            Controls which conversation the response is added to. Currently supports\n            `auto` and `none`, with `auto` as the default value. The `auto` value\n            means that the contents of the response will be added to the default\n            conversation. Set this to `none` to create an out-of-band response which\n            will not add items to default conversation.\n          anyOf:\n            - type: string\n            - type: string\n              default: auto\n              enum:\n                - auto\n                - none\n        metadata:\n          $ref: '#/components/schemas/Metadata'\n        input:\n          type: array\n          description: |\n            Input items to include in the prompt for the model. Using this field\n            creates a new context for this Response instead of using the default\n            conversation. An empty array `[]` will clear the context for this Response.\n            Note that this can include references to items from the default conversation.\n          items:\n            $ref: '#/components/schemas/RealtimeConversationItemWithReference'\n    RealtimeServerEvent:\n      discriminator:\n        propertyName: type\n      description: |\n        A realtime server event.\n      anyOf:\n        - $ref: '#/components/schemas/RealtimeServerEventConversationCreated'\n        - $ref: '#/components/schemas/RealtimeServerEventConversationItemCreated'\n        - $ref: '#/components/schemas/RealtimeServerEventConversationItemDeleted'\n        - $ref: '#/components/schemas/RealtimeServerEventConversationItemInputAudioTranscriptionCompleted'\n        - $ref: '#/components/schemas/RealtimeServerEventConversationItemInputAudioTranscriptionDelta'\n        - $ref: '#/components/schemas/RealtimeServerEventConversationItemInputAudioTranscriptionFailed'\n        - $ref: '#/components/schemas/RealtimeServerEventConversationItemRetrieved'\n        - $ref: '#/components/schemas/RealtimeServerEventConversationItemTruncated'\n        - $ref: '#/components/schemas/RealtimeServerEventError'\n        - $ref: '#/components/schemas/RealtimeServerEventInputAudioBufferCleared'\n        - $ref: '#/components/schemas/RealtimeServerEventInputAudioBufferCommitted'\n        - $ref: '#/components/schemas/RealtimeServerEventInputAudioBufferSpeechStarted'\n        - $ref: '#/components/schemas/RealtimeServerEventInputAudioBufferSpeechStopped'\n        - $ref: '#/components/schemas/RealtimeServerEventRateLimitsUpdated'\n        - $ref: '#/components/schemas/RealtimeServerEventResponseAudioDelta'\n        - $ref: '#/components/schemas/RealtimeServerEventResponseAudioDone'\n        - $ref: '#/components/schemas/RealtimeServerEventResponseAudioTranscriptDelta'\n        - $ref: '#/components/schemas/RealtimeServerEventResponseAudioTranscriptDone'\n        - $ref: '#/components/schemas/RealtimeServerEventResponseContentPartAdded'\n        - $ref: '#/components/schemas/RealtimeServerEventResponseContentPartDone'\n        - $ref: '#/components/schemas/RealtimeServerEventResponseCreated'\n        - $ref: '#/components/schemas/RealtimeServerEventResponseDone'\n        - $ref: '#/components/schemas/RealtimeServerEventResponseFunctionCallArgumentsDelta'\n        - $ref: '#/components/schemas/RealtimeServerEventResponseFunctionCallArgumentsDone'\n        - $ref: '#/components/schemas/RealtimeServerEventResponseOutputItemAdded'\n        - $ref: '#/components/schemas/RealtimeServerEventResponseOutputItemDone'\n        - $ref: '#/components/schemas/RealtimeServerEventResponseTextDelta'\n        - $ref: '#/components/schemas/RealtimeServerEventResponseTextDone'\n        - $ref: '#/components/schemas/RealtimeServerEventSessionCreated'\n        - $ref: '#/components/schemas/RealtimeServerEventSessionUpdated'\n        - $ref: '#/components/schemas/RealtimeServerEventTranscriptionSessionUpdated'\n        - $ref: '#/components/schemas/RealtimeServerEventOutputAudioBufferStarted'\n        - $ref: '#/components/schemas/RealtimeServerEventOutputAudioBufferStopped'\n        - $ref: '#/components/schemas/RealtimeServerEventOutputAudioBufferCleared'\n    RealtimeServerEventConversationCreated:\n      type: object\n      description: |\n        Returned when a conversation is created. Emitted right after session creation.\n      properties:\n        event_id:\n          type: string\n          description: The unique ID of the server event.\n        type:\n          description: The event type, must be `conversation.created`.\n          x-stainless-const: true\n          const: conversation.created\n        conversation:\n          type: object\n          description: The conversation resource.\n          properties:\n            id:\n              type: string\n              description: The unique ID of the conversation.\n            object:\n              description: The object type, must be `realtime.conversation`.\n              const: realtime.conversation\n      required:\n        - event_id\n        - type\n        - conversation\n      x-oaiMeta:\n        name: conversation.created\n        group: realtime\n        example: |\n          {\n              \"event_id\": \"event_9101\",\n              \"type\": \"conversation.created\",\n              \"conversation\": {\n                  \"id\": \"conv_001\",\n                  \"object\": \"realtime.conversation\"\n              }\n          }\n    RealtimeServerEventConversationItemCreated:\n      type: object\n      description: |\n        Returned when a conversation item is created. There are several scenarios that produce this event:\n          - The server is generating a Response, which if successful will produce\n            either one or two Items, which will be of type `message`\n            (role `assistant`) or type `function_call`.\n          - The input audio buffer has been committed, either by the client or the\n            server (in `server_vad` mode). The server will take the content of the\n            input audio buffer and add it to a new user message Item.\n          - The client has sent a `conversation.item.create` event to add a new Item\n            to the Conversation.\n      properties:\n        event_id:\n          type: string\n          description: The unique ID of the server event.\n        type:\n          description: The event type, must be `conversation.item.created`.\n          x-stainless-const: true\n          const: conversation.item.created\n        previous_item_id:\n          type: string\n          nullable: true\n          description: |\n            The ID of the preceding item in the Conversation context, allows the\n            client to understand the order of the conversation. Can be `null` if the\n            item has no predecessor.\n        item:\n          $ref: '#/components/schemas/RealtimeConversationItem'\n      required:\n        - event_id\n        - type\n        - item\n      x-oaiMeta:\n        name: conversation.item.created\n        group: realtime\n        example: |\n          {\n              \"event_id\": \"event_1920\",\n              \"type\": \"conversation.item.created\",\n              \"previous_item_id\": \"msg_002\",\n              \"item\": {\n                  \"id\": \"msg_003\",\n                  \"object\": \"realtime.item\",\n                  \"type\": \"message\",\n                  \"status\": \"completed\",\n                  \"role\": \"user\",\n                  \"content\": []\n              }\n          }\n    RealtimeServerEventConversationItemDeleted:\n      type: object\n      description: |\n        Returned when an item in the conversation is deleted by the client with a\n        `conversation.item.delete` event. This event is used to synchronize the\n        server's understanding of the conversation history with the client's view.\n      properties:\n        event_id:\n          type: string\n          description: The unique ID of the server event.\n        type:\n          description: The event type, must be `conversation.item.deleted`.\n          x-stainless-const: true\n          const: conversation.item.deleted\n        item_id:\n          type: string\n          description: The ID of the item that was deleted.\n      required:\n        - event_id\n        - type\n        - item_id\n      x-oaiMeta:\n        name: conversation.item.deleted\n        group: realtime\n        example: |\n          {\n              \"event_id\": \"event_2728\",\n              \"type\": \"conversation.item.deleted\",\n              \"item_id\": \"msg_005\"\n          }\n    RealtimeServerEventConversationItemInputAudioTranscriptionCompleted:\n      type: object\n      description: |\n        This event is the output of audio transcription for user audio written to the\n        user audio buffer. Transcription begins when the input audio buffer is\n        committed by the client or server (in `server_vad` mode). Transcription runs\n        asynchronously with Response creation, so this event may come before or after\n        the Response events.\n\n        Realtime API models accept audio natively, and thus input transcription is a\n        separate process run on a separate ASR (Automatic Speech Recognition) model.\n        The transcript may diverge somewhat from the model's interpretation, and\n        should be treated as a rough guide.\n      properties:\n        event_id:\n          type: string\n          description: The unique ID of the server event.\n        type:\n          type: string\n          enum:\n            - conversation.item.input_audio_transcription.completed\n          description: |\n            The event type, must be\n            `conversation.item.input_audio_transcription.completed`.\n          x-stainless-const: true\n        item_id:\n          type: string\n          description: The ID of the user message item containing the audio.\n        content_index:\n          type: integer\n          description: The index of the content part containing the audio.\n        transcript:\n          type: string\n          description: The transcribed text.\n        logprobs:\n          type: array\n          description: The log probabilities of the transcription.\n          nullable: true\n          items:\n            $ref: '#/components/schemas/LogProbProperties'\n        usage:\n          type: object\n          description: Usage statistics for the transcription.\n          anyOf:\n            - $ref: '#/components/schemas/TranscriptTextUsageTokens'\n              title: Token Usage\n            - $ref: '#/components/schemas/TranscriptTextUsageDuration'\n              title: Duration Usage\n      required:\n        - event_id\n        - type\n        - item_id\n        - content_index\n        - transcript\n        - usage\n      x-oaiMeta:\n        name: conversation.item.input_audio_transcription.completed\n        group: realtime\n        example: |\n          {\n              \"event_id\": \"event_2122\",\n              \"type\": \"conversation.item.input_audio_transcription.completed\",\n              \"item_id\": \"msg_003\",\n              \"content_index\": 0,\n              \"transcript\": \"Hello, how are you?\",\n              \"usage\": {\n                \"type\": \"tokens\",\n                \"total_tokens\": 48,\n                \"input_tokens\": 38,\n                \"input_token_details\": {\n                  \"text_tokens\": 10,\n                  \"audio_tokens\": 28,\n                },\n                \"output_tokens\": 10,\n              }\n          }\n    RealtimeServerEventConversationItemInputAudioTranscriptionDelta:\n      type: object\n      description: |\n        Returned when the text value of an input audio transcription content part is updated.\n      properties:\n        event_id:\n          type: string\n          description: The unique ID of the server event.\n        type:\n          description: The event type, must be `conversation.item.input_audio_transcription.delta`.\n          x-stainless-const: true\n          const: conversation.item.input_audio_transcription.delta\n        item_id:\n          type: string\n          description: The ID of the item.\n        content_index:\n          type: integer\n          description: The index of the content part in the item's content array.\n        delta:\n          type: string\n          description: The text delta.\n        logprobs:\n          type: array\n          description: The log probabilities of the transcription.\n          nullable: true\n          items:\n            $ref: '#/components/schemas/LogProbProperties'\n      required:\n        - event_id\n        - type\n        - item_id\n      x-oaiMeta:\n        name: conversation.item.input_audio_transcription.delta\n        group: realtime\n        example: |\n          {\n            \"type\": \"conversation.item.input_audio_transcription.delta\",\n            \"event_id\": \"event_001\",\n            \"item_id\": \"item_001\",\n            \"content_index\": 0,\n            \"delta\": \"Hello\"\n          }\n    RealtimeServerEventConversationItemInputAudioTranscriptionFailed:\n      type: object\n      description: |\n        Returned when input audio transcription is configured, and a transcription\n        request for a user message failed. These events are separate from other\n        `error` events so that the client can identify the related Item.\n      properties:\n        event_id:\n          type: string\n          description: The unique ID of the server event.\n        type:\n          type: string\n          enum:\n            - conversation.item.input_audio_transcription.failed\n          description: |\n            The event type, must be\n            `conversation.item.input_audio_transcription.failed`.\n          x-stainless-const: true\n        item_id:\n          type: string\n          description: The ID of the user message item.\n        content_index:\n          type: integer\n          description: The index of the content part containing the audio.\n        error:\n          type: object\n          description: Details of the transcription error.\n          properties:\n            type:\n              type: string\n              description: The type of error.\n            code:\n              type: string\n              description: Error code, if any.\n            message:\n              type: string\n              description: A human-readable error message.\n            param:\n              type: string\n              description: Parameter related to the error, if any.\n      required:\n        - event_id\n        - type\n        - item_id\n        - content_index\n        - error\n      x-oaiMeta:\n        name: conversation.item.input_audio_transcription.failed\n        group: realtime\n        example: |\n          {\n              \"event_id\": \"event_2324\",\n              \"type\": \"conversation.item.input_audio_transcription.failed\",\n              \"item_id\": \"msg_003\",\n              \"content_index\": 0,\n              \"error\": {\n                  \"type\": \"transcription_error\",\n                  \"code\": \"audio_unintelligible\",\n                  \"message\": \"The audio could not be transcribed.\",\n                  \"param\": null\n              }\n          }\n    RealtimeServerEventConversationItemRetrieved:\n      type: object\n      description: |\n        Returned when a conversation item is retrieved with `conversation.item.retrieve`.\n      properties:\n        event_id:\n          type: string\n          description: The unique ID of the server event.\n        type:\n          description: The event type, must be `conversation.item.retrieved`.\n          x-stainless-const: true\n          const: conversation.item.retrieved\n        item:\n          $ref: '#/components/schemas/RealtimeConversationItem'\n      required:\n        - event_id\n        - type\n        - item\n      x-oaiMeta:\n        name: conversation.item.retrieved\n        group: realtime\n        example: |\n          {\n              \"event_id\": \"event_1920\",\n              \"type\": \"conversation.item.created\",\n              \"previous_item_id\": \"msg_002\",\n              \"item\": {\n                  \"id\": \"msg_003\",\n                  \"object\": \"realtime.item\",\n                  \"type\": \"message\",\n                  \"status\": \"completed\",\n                  \"role\": \"user\",\n                  \"content\": [\n                      {\n                          \"type\": \"input_audio\",\n                          \"transcript\": \"hello how are you\",\n                          \"audio\": \"base64encodedaudio==\"\n                      }\n                  ]\n              }\n          }\n    RealtimeServerEventConversationItemTruncated:\n      type: object\n      description: |\n        Returned when an earlier assistant audio message item is truncated by the\n        client with a `conversation.item.truncate` event. This event is used to\n        synchronize the server's understanding of the audio with the client's playback.\n\n        This action will truncate the audio and remove the server-side text transcript\n        to ensure there is no text in the context that hasn't been heard by the user.\n      properties:\n        event_id:\n          type: string\n          description: The unique ID of the server event.\n        type:\n          description: The event type, must be `conversation.item.truncated`.\n          x-stainless-const: true\n          const: conversation.item.truncated\n        item_id:\n          type: string\n          description: The ID of the assistant message item that was truncated.\n        content_index:\n          type: integer\n          description: The index of the content part that was truncated.\n        audio_end_ms:\n          type: integer\n          description: |\n            The duration up to which the audio was truncated, in milliseconds.\n      required:\n        - event_id\n        - type\n        - item_id\n        - content_index\n        - audio_end_ms\n      x-oaiMeta:\n        name: conversation.item.truncated\n        group: realtime\n        example: |\n          {\n              \"event_id\": \"event_2526\",\n              \"type\": \"conversation.item.truncated\",\n              \"item_id\": \"msg_004\",\n              \"content_index\": 0,\n              \"audio_end_ms\": 1500\n          }\n    RealtimeServerEventError:\n      type: object\n      description: |\n        Returned when an error occurs, which could be a client problem or a server\n        problem. Most errors are recoverable and the session will stay open, we\n        recommend to implementors to monitor and log error messages by default.\n      properties:\n        event_id:\n          type: string\n          description: The unique ID of the server event.\n        type:\n          description: The event type, must be `error`.\n          x-stainless-const: true\n          const: error\n        error:\n          type: object\n          description: Details of the error.\n          required:\n            - type\n            - message\n          properties:\n            type:\n              type: string\n              description: |\n                The type of error (e.g., \"invalid_request_error\", \"server_error\").\n            code:\n              type: string\n              description: Error code, if any.\n              nullable: true\n            message:\n              type: string\n              description: A human-readable error message.\n            param:\n              type: string\n              description: Parameter related to the error, if any.\n              nullable: true\n            event_id:\n              type: string\n              description: |\n                The event_id of the client event that caused the error, if applicable.\n              nullable: true\n      required:\n        - event_id\n        - type\n        - error\n      x-oaiMeta:\n        name: error\n        group: realtime\n        example: |\n          {\n              \"event_id\": \"event_890\",\n              \"type\": \"error\",\n              \"error\": {\n                  \"type\": \"invalid_request_error\",\n                  \"code\": \"invalid_event\",\n                  \"message\": \"The 'type' field is missing.\",\n                  \"param\": null,\n                  \"event_id\": \"event_567\"\n              }\n          }\n    RealtimeServerEventInputAudioBufferCleared:\n      type: object\n      description: |\n        Returned when the input audio buffer is cleared by the client with a\n        `input_audio_buffer.clear` event.\n      properties:\n        event_id:\n          type: string\n          description: The unique ID of the server event.\n        type:\n          description: The event type, must be `input_audio_buffer.cleared`.\n          x-stainless-const: true\n          const: input_audio_buffer.cleared\n      required:\n        - event_id\n        - type\n      x-oaiMeta:\n        name: input_audio_buffer.cleared\n        group: realtime\n        example: |\n          {\n              \"event_id\": \"event_1314\",\n              \"type\": \"input_audio_buffer.cleared\"\n          }\n    RealtimeServerEventInputAudioBufferCommitted:\n      type: object\n      description: |\n        Returned when an input audio buffer is committed, either by the client or\n        automatically in server VAD mode. The `item_id` property is the ID of the user\n        message item that will be created, thus a `conversation.item.created` event\n        will also be sent to the client.\n      properties:\n        event_id:\n          type: string\n          description: The unique ID of the server event.\n        type:\n          description: The event type, must be `input_audio_buffer.committed`.\n          x-stainless-const: true\n          const: input_audio_buffer.committed\n        previous_item_id:\n          type: string\n          nullable: true\n          description: |\n            The ID of the preceding item after which the new item will be inserted.\n            Can be `null` if the item has no predecessor.\n        item_id:\n          type: string\n          description: The ID of the user message item that will be created.\n      required:\n        - event_id\n        - type\n        - item_id\n      x-oaiMeta:\n        name: input_audio_buffer.committed\n        group: realtime\n        example: |\n          {\n              \"event_id\": \"event_1121\",\n              \"type\": \"input_audio_buffer.committed\",\n              \"previous_item_id\": \"msg_001\",\n              \"item_id\": \"msg_002\"\n          }\n    RealtimeServerEventInputAudioBufferSpeechStarted:\n      type: object\n      description: |\n        Sent by the server when in `server_vad` mode to indicate that speech has been\n        detected in the audio buffer. This can happen any time audio is added to the\n        buffer (unless speech is already detected). The client may want to use this\n        event to interrupt audio playback or provide visual feedback to the user.\n\n        The client should expect to receive a `input_audio_buffer.speech_stopped` event\n        when speech stops. The `item_id` property is the ID of the user message item\n        that will be created when speech stops and will also be included in the\n        `input_audio_buffer.speech_stopped` event (unless the client manually commits\n        the audio buffer during VAD activation).\n      properties:\n        event_id:\n          type: string\n          description: The unique ID of the server event.\n        type:\n          description: The event type, must be `input_audio_buffer.speech_started`.\n          x-stainless-const: true\n          const: input_audio_buffer.speech_started\n        audio_start_ms:\n          type: integer\n          description: |\n            Milliseconds from the start of all audio written to the buffer during the\n            session when speech was first detected. This will correspond to the\n            beginning of audio sent to the model, and thus includes the\n            `prefix_padding_ms` configured in the Session.\n        item_id:\n          type: string\n          description: |\n            The ID of the user message item that will be created when speech stops.\n      required:\n        - event_id\n        - type\n        - audio_start_ms\n        - item_id\n      x-oaiMeta:\n        name: input_audio_buffer.speech_started\n        group: realtime\n        example: |\n          {\n              \"event_id\": \"event_1516\",\n              \"type\": \"input_audio_buffer.speech_started\",\n              \"audio_start_ms\": 1000,\n              \"item_id\": \"msg_003\"\n          }\n    RealtimeServerEventInputAudioBufferSpeechStopped:\n      type: object\n      description: |\n        Returned in `server_vad` mode when the server detects the end of speech in\n        the audio buffer. The server will also send an `conversation.item.created`\n        event with the user message item that is created from the audio buffer.\n      properties:\n        event_id:\n          type: string\n          description: The unique ID of the server event.\n        type:\n          description: The event type, must be `input_audio_buffer.speech_stopped`.\n          x-stainless-const: true\n          const: input_audio_buffer.speech_stopped\n        audio_end_ms:\n          type: integer\n          description: |\n            Milliseconds since the session started when speech stopped. This will\n            correspond to the end of audio sent to the model, and thus includes the\n            `min_silence_duration_ms` configured in the Session.\n        item_id:\n          type: string\n          description: The ID of the user message item that will be created.\n      required:\n        - event_id\n        - type\n        - audio_end_ms\n        - item_id\n      x-oaiMeta:\n        name: input_audio_buffer.speech_stopped\n        group: realtime\n        example: |\n          {\n              \"event_id\": \"event_1718\",\n              \"type\": \"input_audio_buffer.speech_stopped\",\n              \"audio_end_ms\": 2000,\n              \"item_id\": \"msg_003\"\n          }\n    RealtimeServerEventOutputAudioBufferCleared:\n      type: object\n      description: >\n        **WebRTC Only:** Emitted when the output audio buffer is cleared. This happens either in VAD\n\n        mode when the user has interrupted (`input_audio_buffer.speech_started`),\n\n        or when the client has emitted the `output_audio_buffer.clear` event to manually\n\n        cut off the current audio response.\n\n        [Learn\n        more](https://platform.openai.com/docs/guides/realtime-conversations#client-and-server-events-for-audio-in-webrtc).\n      properties:\n        event_id:\n          type: string\n          description: The unique ID of the server event.\n        type:\n          description: The event type, must be `output_audio_buffer.cleared`.\n          x-stainless-const: true\n          const: output_audio_buffer.cleared\n        response_id:\n          type: string\n          description: The unique ID of the response that produced the audio.\n      required:\n        - event_id\n        - type\n        - response_id\n      x-oaiMeta:\n        name: output_audio_buffer.cleared\n        group: realtime\n        example: |\n          {\n              \"event_id\": \"event_abc123\",\n              \"type\": \"output_audio_buffer.cleared\",\n              \"response_id\": \"resp_abc123\"\n          }\n    RealtimeServerEventOutputAudioBufferStarted:\n      type: object\n      description: >\n        **WebRTC Only:** Emitted when the server begins streaming audio to the client. This event is\n\n        emitted after an audio content part has been added (`response.content_part.added`)\n\n        to the response.\n\n        [Learn\n        more](https://platform.openai.com/docs/guides/realtime-conversations#client-and-server-events-for-audio-in-webrtc).\n      properties:\n        event_id:\n          type: string\n          description: The unique ID of the server event.\n        type:\n          description: The event type, must be `output_audio_buffer.started`.\n          x-stainless-const: true\n          const: output_audio_buffer.started\n        response_id:\n          type: string\n          description: The unique ID of the response that produced the audio.\n      required:\n        - event_id\n        - type\n        - response_id\n      x-oaiMeta:\n        name: output_audio_buffer.started\n        group: realtime\n        example: |\n          {\n              \"event_id\": \"event_abc123\",\n              \"type\": \"output_audio_buffer.started\",\n              \"response_id\": \"resp_abc123\"\n          }\n    RealtimeServerEventOutputAudioBufferStopped:\n      type: object\n      description: >\n        **WebRTC Only:** Emitted when the output audio buffer has been completely drained on the server,\n\n        and no more audio is forthcoming. This event is emitted after the full response\n\n        data has been sent to the client (`response.done`).\n\n        [Learn\n        more](https://platform.openai.com/docs/guides/realtime-conversations#client-and-server-events-for-audio-in-webrtc).\n      properties:\n        event_id:\n          type: string\n          description: The unique ID of the server event.\n        type:\n          description: The event type, must be `output_audio_buffer.stopped`.\n          x-stainless-const: true\n          const: output_audio_buffer.stopped\n        response_id:\n          type: string\n          description: The unique ID of the response that produced the audio.\n      required:\n        - event_id\n        - type\n        - response_id\n      x-oaiMeta:\n        name: output_audio_buffer.stopped\n        group: realtime\n        example: |\n          {\n              \"event_id\": \"event_abc123\",\n              \"type\": \"output_audio_buffer.stopped\",\n              \"response_id\": \"resp_abc123\"\n          }\n    RealtimeServerEventRateLimitsUpdated:\n      type: object\n      description: |\n        Emitted at the beginning of a Response to indicate the updated rate limits.\n        When a Response is created some tokens will be \"reserved\" for the output\n        tokens, the rate limits shown here reflect that reservation, which is then\n        adjusted accordingly once the Response is completed.\n      properties:\n        event_id:\n          type: string\n          description: The unique ID of the server event.\n        type:\n          description: The event type, must be `rate_limits.updated`.\n          x-stainless-const: true\n          const: rate_limits.updated\n        rate_limits:\n          type: array\n          description: List of rate limit information.\n          items:\n            type: object\n            properties:\n              name:\n                type: string\n                enum:\n                  - requests\n                  - tokens\n                description: |\n                  The name of the rate limit (`requests`, `tokens`).\n              limit:\n                type: integer\n                description: The maximum allowed value for the rate limit.\n              remaining:\n                type: integer\n                description: The remaining value before the limit is reached.\n              reset_seconds:\n                type: number\n                description: Seconds until the rate limit resets.\n      required:\n        - event_id\n        - type\n        - rate_limits\n      x-oaiMeta:\n        name: rate_limits.updated\n        group: realtime\n        example: |\n          {\n              \"event_id\": \"event_5758\",\n              \"type\": \"rate_limits.updated\",\n              \"rate_limits\": [\n                  {\n                      \"name\": \"requests\",\n                      \"limit\": 1000,\n                      \"remaining\": 999,\n                      \"reset_seconds\": 60\n                  },\n                  {\n                      \"name\": \"tokens\",\n                      \"limit\": 50000,\n                      \"remaining\": 49950,\n                      \"reset_seconds\": 60\n                  }\n              ]\n          }\n    RealtimeServerEventResponseAudioDelta:\n      type: object\n      description: Returned when the model-generated audio is updated.\n      properties:\n        event_id:\n          type: string\n          description: The unique ID of the server event.\n        type:\n          description: The event type, must be `response.audio.delta`.\n          x-stainless-const: true\n          const: response.audio.delta\n        response_id:\n          type: string\n          description: The ID of the response.\n        item_id:\n          type: string\n          description: The ID of the item.\n        output_index:\n          type: integer\n          description: The index of the output item in the response.\n        content_index:\n          type: integer\n          description: The index of the content part in the item's content array.\n        delta:\n          type: string\n          description: Base64-encoded audio data delta.\n      required:\n        - event_id\n        - type\n        - response_id\n        - item_id\n        - output_index\n        - content_index\n        - delta\n      x-oaiMeta:\n        name: response.audio.delta\n        group: realtime\n        example: |\n          {\n              \"event_id\": \"event_4950\",\n              \"type\": \"response.audio.delta\",\n              \"response_id\": \"resp_001\",\n              \"item_id\": \"msg_008\",\n              \"output_index\": 0,\n              \"content_index\": 0,\n              \"delta\": \"Base64EncodedAudioDelta\"\n          }\n    RealtimeServerEventResponseAudioDone:\n      type: object\n      description: |\n        Returned when the model-generated audio is done. Also emitted when a Response\n        is interrupted, incomplete, or cancelled.\n      properties:\n        event_id:\n          type: string\n          description: The unique ID of the server event.\n        type:\n          description: The event type, must be `response.audio.done`.\n          x-stainless-const: true\n          const: response.audio.done\n        response_id:\n          type: string\n          description: The ID of the response.\n        item_id:\n          type: string\n          description: The ID of the item.\n        output_index:\n          type: integer\n          description: The index of the output item in the response.\n        content_index:\n          type: integer\n          description: The index of the content part in the item's content array.\n      required:\n        - event_id\n        - type\n        - response_id\n        - item_id\n        - output_index\n        - content_index\n      x-oaiMeta:\n        name: response.audio.done\n        group: realtime\n        example: |\n          {\n              \"event_id\": \"event_5152\",\n              \"type\": \"response.audio.done\",\n              \"response_id\": \"resp_001\",\n              \"item_id\": \"msg_008\",\n              \"output_index\": 0,\n              \"content_index\": 0\n          }\n    RealtimeServerEventResponseAudioTranscriptDelta:\n      type: object\n      description: |\n        Returned when the model-generated transcription of audio output is updated.\n      properties:\n        event_id:\n          type: string\n          description: The unique ID of the server event.\n        type:\n          description: The event type, must be `response.audio_transcript.delta`.\n          x-stainless-const: true\n          const: response.audio_transcript.delta\n        response_id:\n          type: string\n          description: The ID of the response.\n        item_id:\n          type: string\n          description: The ID of the item.\n        output_index:\n          type: integer\n          description: The index of the output item in the response.\n        content_index:\n          type: integer\n          description: The index of the content part in the item's content array.\n        delta:\n          type: string\n          description: The transcript delta.\n      required:\n        - event_id\n        - type\n        - response_id\n        - item_id\n        - output_index\n        - content_index\n        - delta\n      x-oaiMeta:\n        name: response.audio_transcript.delta\n        group: realtime\n        example: |\n          {\n              \"event_id\": \"event_4546\",\n              \"type\": \"response.audio_transcript.delta\",\n              \"response_id\": \"resp_001\",\n              \"item_id\": \"msg_008\",\n              \"output_index\": 0,\n              \"content_index\": 0,\n              \"delta\": \"Hello, how can I a\"\n          }\n    RealtimeServerEventResponseAudioTranscriptDone:\n      type: object\n      description: |\n        Returned when the model-generated transcription of audio output is done\n        streaming. Also emitted when a Response is interrupted, incomplete, or\n        cancelled.\n      properties:\n        event_id:\n          type: string\n          description: The unique ID of the server event.\n        type:\n          description: The event type, must be `response.audio_transcript.done`.\n          x-stainless-const: true\n          const: response.audio_transcript.done\n        response_id:\n          type: string\n          description: The ID of the response.\n        item_id:\n          type: string\n          description: The ID of the item.\n        output_index:\n          type: integer\n          description: The index of the output item in the response.\n        content_index:\n          type: integer\n          description: The index of the content part in the item's content array.\n        transcript:\n          type: string\n          description: The final transcript of the audio.\n      required:\n        - event_id\n        - type\n        - response_id\n        - item_id\n        - output_index\n        - content_index\n        - transcript\n      x-oaiMeta:\n        name: response.audio_transcript.done\n        group: realtime\n        example: |\n          {\n              \"event_id\": \"event_4748\",\n              \"type\": \"response.audio_transcript.done\",\n              \"response_id\": \"resp_001\",\n              \"item_id\": \"msg_008\",\n              \"output_index\": 0,\n              \"content_index\": 0,\n              \"transcript\": \"Hello, how can I assist you today?\"\n          }\n    RealtimeServerEventResponseContentPartAdded:\n      type: object\n      description: |\n        Returned when a new content part is added to an assistant message item during\n        response generation.\n      properties:\n        event_id:\n          type: string\n          description: The unique ID of the server event.\n        type:\n          description: The event type, must be `response.content_part.added`.\n          x-stainless-const: true\n          const: response.content_part.added\n        response_id:\n          type: string\n          description: The ID of the response.\n        item_id:\n          type: string\n          description: The ID of the item to which the content part was added.\n        output_index:\n          type: integer\n          description: The index of the output item in the response.\n        content_index:\n          type: integer\n          description: The index of the content part in the item's content array.\n        part:\n          type: object\n          description: The content part that was added.\n          properties:\n            type:\n              type: string\n              enum:\n                - text\n                - audio\n              description: The content type (\"text\", \"audio\").\n            text:\n              type: string\n              description: The text content (if type is \"text\").\n            audio:\n              type: string\n              description: Base64-encoded audio data (if type is \"audio\").\n            transcript:\n              type: string\n              description: The transcript of the audio (if type is \"audio\").\n      required:\n        - event_id\n        - type\n        - response_id\n        - item_id\n        - output_index\n        - content_index\n        - part\n      x-oaiMeta:\n        name: response.content_part.added\n        group: realtime\n        example: |\n          {\n              \"event_id\": \"event_3738\",\n              \"type\": \"response.content_part.added\",\n              \"response_id\": \"resp_001\",\n              \"item_id\": \"msg_007\",\n              \"output_index\": 0,\n              \"content_index\": 0,\n              \"part\": {\n                  \"type\": \"text\",\n                  \"text\": \"\"\n              }\n          }\n    RealtimeServerEventResponseContentPartDone:\n      type: object\n      description: |\n        Returned when a content part is done streaming in an assistant message item.\n        Also emitted when a Response is interrupted, incomplete, or cancelled.\n      properties:\n        event_id:\n          type: string\n          description: The unique ID of the server event.\n        type:\n          description: The event type, must be `response.content_part.done`.\n          x-stainless-const: true\n          const: response.content_part.done\n        response_id:\n          type: string\n          description: The ID of the response.\n        item_id:\n          type: string\n          description: The ID of the item.\n        output_index:\n          type: integer\n          description: The index of the output item in the response.\n        content_index:\n          type: integer\n          description: The index of the content part in the item's content array.\n        part:\n          type: object\n          description: The content part that is done.\n          properties:\n            type:\n              type: string\n              enum:\n                - text\n                - audio\n              description: The content type (\"text\", \"audio\").\n            text:\n              type: string\n              description: The text content (if type is \"text\").\n            audio:\n              type: string\n              description: Base64-encoded audio data (if type is \"audio\").\n            transcript:\n              type: string\n              description: The transcript of the audio (if type is \"audio\").\n      required:\n        - event_id\n        - type\n        - response_id\n        - item_id\n        - output_index\n        - content_index\n        - part\n      x-oaiMeta:\n        name: response.content_part.done\n        group: realtime\n        example: |\n          {\n              \"event_id\": \"event_3940\",\n              \"type\": \"response.content_part.done\",\n              \"response_id\": \"resp_001\",\n              \"item_id\": \"msg_007\",\n              \"output_index\": 0,\n              \"content_index\": 0,\n              \"part\": {\n                  \"type\": \"text\",\n                  \"text\": \"Sure, I can help with that.\"\n              }\n          }\n    RealtimeServerEventResponseCreated:\n      type: object\n      description: |\n        Returned when a new Response is created. The first event of response creation,\n        where the response is in an initial state of `in_progress`.\n      properties:\n        event_id:\n          type: string\n          description: The unique ID of the server event.\n        type:\n          description: The event type, must be `response.created`.\n          x-stainless-const: true\n          const: response.created\n        response:\n          $ref: '#/components/schemas/RealtimeResponse'\n      required:\n        - event_id\n        - type\n        - response\n      x-oaiMeta:\n        name: response.created\n        group: realtime\n        example: |\n          {\n              \"event_id\": \"event_2930\",\n              \"type\": \"response.created\",\n              \"response\": {\n                  \"id\": \"resp_001\",\n                  \"object\": \"realtime.response\",\n                  \"status\": \"in_progress\",\n                  \"status_details\": null,\n                  \"output\": [],\n                  \"usage\": null\n              }\n          }\n    RealtimeServerEventResponseDone:\n      type: object\n      description: |\n        Returned when a Response is done streaming. Always emitted, no matter the\n        final state. The Response object included in the `response.done` event will\n        include all output Items in the Response but will omit the raw audio data.\n      properties:\n        event_id:\n          type: string\n          description: The unique ID of the server event.\n        type:\n          description: The event type, must be `response.done`.\n          x-stainless-const: true\n          const: response.done\n        response:\n          $ref: '#/components/schemas/RealtimeResponse'\n      required:\n        - event_id\n        - type\n        - response\n      x-oaiMeta:\n        name: response.done\n        group: realtime\n        example: |\n          {\n              \"event_id\": \"event_3132\",\n              \"type\": \"response.done\",\n              \"response\": {\n                  \"id\": \"resp_001\",\n                  \"object\": \"realtime.response\",\n                  \"status\": \"completed\",\n                  \"status_details\": null,\n                  \"output\": [\n                      {\n                          \"id\": \"msg_006\",\n                          \"object\": \"realtime.item\",\n                          \"type\": \"message\",\n                          \"status\": \"completed\",\n                          \"role\": \"assistant\",\n                          \"content\": [\n                              {\n                                  \"type\": \"text\",\n                                  \"text\": \"Sure, how can I assist you today?\"\n                              }\n                          ]\n                      }\n                  ],\n                  \"usage\": {\n                      \"total_tokens\":275,\n                      \"input_tokens\":127,\n                      \"output_tokens\":148,\n                      \"input_token_details\": {\n                          \"cached_tokens\":384,\n                          \"text_tokens\":119,\n                          \"audio_tokens\":8,\n                          \"cached_tokens_details\": {\n                              \"text_tokens\": 128,\n                              \"audio_tokens\": 256\n                          }\n                      },\n                      \"output_token_details\": {\n                        \"text_tokens\":36,\n                        \"audio_tokens\":112\n                      }\n                  }\n              }\n          }\n    RealtimeServerEventResponseFunctionCallArgumentsDelta:\n      type: object\n      description: |\n        Returned when the model-generated function call arguments are updated.\n      properties:\n        event_id:\n          type: string\n          description: The unique ID of the server event.\n        type:\n          description: |\n            The event type, must be `response.function_call_arguments.delta`.\n          x-stainless-const: true\n          const: response.function_call_arguments.delta\n        response_id:\n          type: string\n          description: The ID of the response.\n        item_id:\n          type: string\n          description: The ID of the function call item.\n        output_index:\n          type: integer\n          description: The index of the output item in the response.\n        call_id:\n          type: string\n          description: The ID of the function call.\n        delta:\n          type: string\n          description: The arguments delta as a JSON string.\n      required:\n        - event_id\n        - type\n        - response_id\n        - item_id\n        - output_index\n        - call_id\n        - delta\n      x-oaiMeta:\n        name: response.function_call_arguments.delta\n        group: realtime\n        example: |\n          {\n              \"event_id\": \"event_5354\",\n              \"type\": \"response.function_call_arguments.delta\",\n              \"response_id\": \"resp_002\",\n              \"item_id\": \"fc_001\",\n              \"output_index\": 0,\n              \"call_id\": \"call_001\",\n              \"delta\": \"{\\\"location\\\": \\\"San\\\"\"\n          }\n    RealtimeServerEventResponseFunctionCallArgumentsDone:\n      type: object\n      description: |\n        Returned when the model-generated function call arguments are done streaming.\n        Also emitted when a Response is interrupted, incomplete, or cancelled.\n      properties:\n        event_id:\n          type: string\n          description: The unique ID of the server event.\n        type:\n          description: |\n            The event type, must be `response.function_call_arguments.done`.\n          x-stainless-const: true\n          const: response.function_call_arguments.done\n        response_id:\n          type: string\n          description: The ID of the response.\n        item_id:\n          type: string\n          description: The ID of the function call item.\n        output_index:\n          type: integer\n          description: The index of the output item in the response.\n        call_id:\n          type: string\n          description: The ID of the function call.\n        arguments:\n          type: string\n          description: The final arguments as a JSON string.\n      required:\n        - event_id\n        - type\n        - response_id\n        - item_id\n        - output_index\n        - call_id\n        - arguments\n      x-oaiMeta:\n        name: response.function_call_arguments.done\n        group: realtime\n        example: |\n          {\n              \"event_id\": \"event_5556\",\n              \"type\": \"response.function_call_arguments.done\",\n              \"response_id\": \"resp_002\",\n              \"item_id\": \"fc_001\",\n              \"output_index\": 0,\n              \"call_id\": \"call_001\",\n              \"arguments\": \"{\\\"location\\\": \\\"San Francisco\\\"}\"\n          }\n    RealtimeServerEventResponseOutputItemAdded:\n      type: object\n      description: Returned when a new Item is created during Response generation.\n      properties:\n        event_id:\n          type: string\n          description: The unique ID of the server event.\n        type:\n          description: The event type, must be `response.output_item.added`.\n          x-stainless-const: true\n          const: response.output_item.added\n        response_id:\n          type: string\n          description: The ID of the Response to which the item belongs.\n        output_index:\n          type: integer\n          description: The index of the output item in the Response.\n        item:\n          $ref: '#/components/schemas/RealtimeConversationItem'\n      required:\n        - event_id\n        - type\n        - response_id\n        - output_index\n        - item\n      x-oaiMeta:\n        name: response.output_item.added\n        group: realtime\n        example: |\n          {\n              \"event_id\": \"event_3334\",\n              \"type\": \"response.output_item.added\",\n              \"response_id\": \"resp_001\",\n              \"output_index\": 0,\n              \"item\": {\n                  \"id\": \"msg_007\",\n                  \"object\": \"realtime.item\",\n                  \"type\": \"message\",\n                  \"status\": \"in_progress\",\n                  \"role\": \"assistant\",\n                  \"content\": []\n              }\n          }\n    RealtimeServerEventResponseOutputItemDone:\n      type: object\n      description: |\n        Returned when an Item is done streaming. Also emitted when a Response is\n        interrupted, incomplete, or cancelled.\n      properties:\n        event_id:\n          type: string\n          description: The unique ID of the server event.\n        type:\n          description: The event type, must be `response.output_item.done`.\n          x-stainless-const: true\n          const: response.output_item.done\n        response_id:\n          type: string\n          description: The ID of the Response to which the item belongs.\n        output_index:\n          type: integer\n          description: The index of the output item in the Response.\n        item:\n          $ref: '#/components/schemas/RealtimeConversationItem'\n      required:\n        - event_id\n        - type\n        - response_id\n        - output_index\n        - item\n      x-oaiMeta:\n        name: response.output_item.done\n        group: realtime\n        example: |\n          {\n              \"event_id\": \"event_3536\",\n              \"type\": \"response.output_item.done\",\n              \"response_id\": \"resp_001\",\n              \"output_index\": 0,\n              \"item\": {\n                  \"id\": \"msg_007\",\n                  \"object\": \"realtime.item\",\n                  \"type\": \"message\",\n                  \"status\": \"completed\",\n                  \"role\": \"assistant\",\n                  \"content\": [\n                      {\n                          \"type\": \"text\",\n                          \"text\": \"Sure, I can help with that.\"\n                      }\n                  ]\n              }\n          }\n    RealtimeServerEventResponseTextDelta:\n      type: object\n      description: Returned when the text value of a \"text\" content part is updated.\n      properties:\n        event_id:\n          type: string\n          description: The unique ID of the server event.\n        type:\n          description: The event type, must be `response.text.delta`.\n          x-stainless-const: true\n          const: response.text.delta\n        response_id:\n          type: string\n          description: The ID of the response.\n        item_id:\n          type: string\n          description: The ID of the item.\n        output_index:\n          type: integer\n          description: The index of the output item in the response.\n        content_index:\n          type: integer\n          description: The index of the content part in the item's content array.\n        delta:\n          type: string\n          description: The text delta.\n      required:\n        - event_id\n        - type\n        - response_id\n        - item_id\n        - output_index\n        - content_index\n        - delta\n      x-oaiMeta:\n        name: response.text.delta\n        group: realtime\n        example: |\n          {\n              \"event_id\": \"event_4142\",\n              \"type\": \"response.text.delta\",\n              \"response_id\": \"resp_001\",\n              \"item_id\": \"msg_007\",\n              \"output_index\": 0,\n              \"content_index\": 0,\n              \"delta\": \"Sure, I can h\"\n          }\n    RealtimeServerEventResponseTextDone:\n      type: object\n      description: |\n        Returned when the text value of a \"text\" content part is done streaming. Also\n        emitted when a Response is interrupted, incomplete, or cancelled.\n      properties:\n        event_id:\n          type: string\n          description: The unique ID of the server event.\n        type:\n          description: The event type, must be `response.text.done`.\n          x-stainless-const: true\n          const: response.text.done\n        response_id:\n          type: string\n          description: The ID of the response.\n        item_id:\n          type: string\n          description: The ID of the item.\n        output_index:\n          type: integer\n          description: The index of the output item in the response.\n        content_index:\n          type: integer\n          description: The index of the content part in the item's content array.\n        text:\n          type: string\n          description: The final text content.\n      required:\n        - event_id\n        - type\n        - response_id\n        - item_id\n        - output_index\n        - content_index\n        - text\n      x-oaiMeta:\n        name: response.text.done\n        group: realtime\n        example: |\n          {\n              \"event_id\": \"event_4344\",\n              \"type\": \"response.text.done\",\n              \"response_id\": \"resp_001\",\n              \"item_id\": \"msg_007\",\n              \"output_index\": 0,\n              \"content_index\": 0,\n              \"text\": \"Sure, I can help with that.\"\n          }\n    RealtimeServerEventSessionCreated:\n      type: object\n      description: |\n        Returned when a Session is created. Emitted automatically when a new\n        connection is established as the first server event. This event will contain\n        the default Session configuration.\n      properties:\n        event_id:\n          type: string\n          description: The unique ID of the server event.\n        type:\n          description: The event type, must be `session.created`.\n          x-stainless-const: true\n          const: session.created\n        session:\n          $ref: '#/components/schemas/RealtimeSession'\n      required:\n        - event_id\n        - type\n        - session\n      x-oaiMeta:\n        name: session.created\n        group: realtime\n        example: |\n          {\n              \"event_id\": \"event_1234\",\n              \"type\": \"session.created\",\n              \"session\": {\n                  \"id\": \"sess_001\",\n                  \"object\": \"realtime.session\",\n                  \"model\": \"gpt-4o-realtime-preview\",\n                  \"modalities\": [\"text\", \"audio\"],\n                  \"instructions\": \"...model instructions here...\",\n                  \"voice\": \"sage\",\n                  \"input_audio_format\": \"pcm16\",\n                  \"output_audio_format\": \"pcm16\",\n                  \"input_audio_transcription\": null,\n                  \"turn_detection\": {\n                      \"type\": \"server_vad\",\n                      \"threshold\": 0.5,\n                      \"prefix_padding_ms\": 300,\n                      \"silence_duration_ms\": 200\n                  },\n                  \"tools\": [],\n                  \"tool_choice\": \"auto\",\n                  \"temperature\": 0.8,\n                  \"max_response_output_tokens\": \"inf\",\n                  \"speed\": 1.1,\n                  \"tracing\": \"auto\"\n              }\n          }\n    RealtimeServerEventSessionUpdated:\n      type: object\n      description: |\n        Returned when a session is updated with a `session.update` event, unless\n        there is an error.\n      properties:\n        event_id:\n          type: string\n          description: The unique ID of the server event.\n        type:\n          description: The event type, must be `session.updated`.\n          x-stainless-const: true\n          const: session.updated\n        session:\n          $ref: '#/components/schemas/RealtimeSession'\n      required:\n        - event_id\n        - type\n        - session\n      x-oaiMeta:\n        name: session.updated\n        group: realtime\n        example: |\n          {\n              \"event_id\": \"event_5678\",\n              \"type\": \"session.updated\",\n              \"session\": {\n                  \"id\": \"sess_001\",\n                  \"object\": \"realtime.session\",\n                  \"model\": \"gpt-4o-realtime-preview\",\n                  \"modalities\": [\"text\"],\n                  \"instructions\": \"New instructions\",\n                  \"voice\": \"sage\",\n                  \"input_audio_format\": \"pcm16\",\n                  \"output_audio_format\": \"pcm16\",\n                  \"input_audio_transcription\": {\n                      \"model\": \"whisper-1\"\n                  },\n                  \"turn_detection\": null,\n                  \"tools\": [],\n                  \"tool_choice\": \"none\",\n                  \"temperature\": 0.7,\n                  \"max_response_output_tokens\": 200,\n                  \"speed\": 1.1,\n                  \"tracing\": \"auto\"\n              }\n          }\n    RealtimeServerEventTranscriptionSessionUpdated:\n      type: object\n      description: |\n        Returned when a transcription session is updated with a `transcription_session.update` event, unless\n        there is an error.\n      properties:\n        event_id:\n          type: string\n          description: The unique ID of the server event.\n        type:\n          description: The event type, must be `transcription_session.updated`.\n          x-stainless-const: true\n          const: transcription_session.updated\n        session:\n          $ref: '#/components/schemas/RealtimeTranscriptionSessionCreateResponse'\n      required:\n        - event_id\n        - type\n        - session\n      x-oaiMeta:\n        name: transcription_session.updated\n        group: realtime\n        example: |\n          {\n            \"event_id\": \"event_5678\",\n            \"type\": \"transcription_session.updated\",\n            \"session\": {\n              \"id\": \"sess_001\",\n              \"object\": \"realtime.transcription_session\",\n              \"input_audio_format\": \"pcm16\",\n              \"input_audio_transcription\": {\n                \"model\": \"gpt-4o-transcribe\",\n                \"prompt\": \"\",\n                \"language\": \"\"\n              },\n              \"turn_detection\": {\n                \"type\": \"server_vad\",\n                \"threshold\": 0.5,\n                \"prefix_padding_ms\": 300,\n                \"silence_duration_ms\": 500,\n                \"create_response\": true,\n                // \"interrupt_response\": false  -- this will NOT be returned\n              },\n              \"input_audio_noise_reduction\": {\n                \"type\": \"near_field\"\n              },\n              \"include\": [\n                \"item.input_audio_transcription.avg_logprob\",\n              ],\n            }\n          }\n    RealtimeSession:\n      type: object\n      description: Realtime session object configuration.\n      properties:\n        id:\n          type: string\n          description: |\n            Unique identifier for the session that looks like `sess_1234567890abcdef`.\n        modalities:\n          description: |\n            The set of modalities the model can respond with. To disable audio,\n            set this to [\"text\"].\n          items:\n            type: string\n            enum:\n              - text\n              - audio\n        model:\n          type: string\n          description: |\n            The Realtime model used for this session.\n          enum:\n            - gpt-4o-realtime-preview\n            - gpt-4o-realtime-preview-2024-10-01\n            - gpt-4o-realtime-preview-2024-12-17\n            - gpt-4o-realtime-preview-2025-06-03\n            - gpt-4o-mini-realtime-preview\n            - gpt-4o-mini-realtime-preview-2024-12-17\n        instructions:\n          type: string\n          description: |\n            The default system instructions (i.e. system message) prepended to model\n            calls. This field allows the client to guide the model on desired\n            responses. The model can be instructed on response content and format,\n            (e.g. \"be extremely succinct\", \"act friendly\", \"here are examples of good\n            responses\") and on audio behavior (e.g. \"talk quickly\", \"inject emotion\n            into your voice\", \"laugh frequently\"). The instructions are not\n            guaranteed to be followed by the model, but they provide guidance to the\n            model on the desired behavior.\n\n\n            Note that the server sets default instructions which will be used if this\n            field is not set and are visible in the `session.created` event at the\n            start of the session.\n        voice:\n          $ref: '#/components/schemas/VoiceIdsShared'\n          description: |\n            The voice the model uses to respond. Voice cannot be changed during the\n            session once the model has responded with audio at least once. Current\n            voice options are `alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`,\n            `shimmer`, and `verse`.\n        input_audio_format:\n          type: string\n          default: pcm16\n          enum:\n            - pcm16\n            - g711_ulaw\n            - g711_alaw\n          description: |\n            The format of input audio. Options are `pcm16`, `g711_ulaw`, or `g711_alaw`.\n            For `pcm16`, input audio must be 16-bit PCM at a 24kHz sample rate,\n            single channel (mono), and little-endian byte order.\n        output_audio_format:\n          type: string\n          default: pcm16\n          enum:\n            - pcm16\n            - g711_ulaw\n            - g711_alaw\n          description: |\n            The format of output audio. Options are `pcm16`, `g711_ulaw`, or `g711_alaw`.\n            For `pcm16`, output audio is sampled at a rate of 24kHz.\n        input_audio_transcription:\n          type: object\n          description: >\n            Configuration for input audio transcription, defaults to off and can be set to `null` to turn off\n            once on. Input audio transcription is not native to the model, since the model consumes audio\n            directly. Transcription runs asynchronously through [the /audio/transcriptions\n            endpoint](https://platform.openai.com/docs/api-reference/audio/createTranscription) and should be\n            treated as guidance of input audio content rather than precisely what the model heard. The client\n            can optionally set the language and prompt for transcription, these offer additional guidance to\n            the transcription service.\n          properties:\n            model:\n              type: string\n              description: >\n                The model to use for transcription, current options are `gpt-4o-transcribe`,\n                `gpt-4o-mini-transcribe`, and `whisper-1`.\n            language:\n              type: string\n              description: |\n                The language of the input audio. Supplying the input language in\n                [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) (e.g. `en`) format\n                will improve accuracy and latency.\n            prompt:\n              type: string\n              description: >\n                An optional text to guide the model's style or continue a previous audio\n\n                segment.\n\n                For `whisper-1`, the [prompt is a list of\n                keywords](https://platform.openai.com/docs/guides/speech-to-text#prompting).\n\n                For `gpt-4o-transcribe` models, the prompt is a free text string, for example \"expect words\n                related to technology\".\n        turn_detection:\n          type: object\n          description: >\n            Configuration for turn detection, ether Server VAD or Semantic VAD. This can be set to `null` to\n            turn off, in which case the client must manually trigger model response.\n\n            Server VAD means that the model will detect the start and end of speech based on audio volume and\n            respond at the end of user speech.\n\n            Semantic VAD is more advanced and uses a turn detection model (in conjunction with VAD) to\n            semantically estimate whether the user has finished speaking, then dynamically sets a timeout\n            based on this probability. For example, if user audio trails off with \"uhhm\", the model will score\n            a low probability of turn end and wait longer for the user to continue speaking. This can be\n            useful for more natural conversations, but may have a higher latency.\n          properties:\n            type:\n              type: string\n              default: server_vad\n              enum:\n                - server_vad\n                - semantic_vad\n              description: |\n                Type of turn detection.\n            eagerness:\n              type: string\n              default: auto\n              enum:\n                - low\n                - medium\n                - high\n                - auto\n              description: >\n                Used only for `semantic_vad` mode. The eagerness of the model to respond. `low` will wait\n                longer for the user to continue speaking, `high` will respond more quickly. `auto` is the\n                default and is equivalent to `medium`.\n            threshold:\n              type: number\n              description: >\n                Used only for `server_vad` mode. Activation threshold for VAD (0.0 to 1.0), this defaults to\n                0.5. A\n\n                higher threshold will require louder audio to activate the model, and\n\n                thus might perform better in noisy environments.\n            prefix_padding_ms:\n              type: integer\n              description: |\n                Used only for `server_vad` mode. Amount of audio to include before the VAD detected speech (in\n                milliseconds). Defaults to 300ms.\n            silence_duration_ms:\n              type: integer\n              description: >\n                Used only for `server_vad` mode. Duration of silence to detect speech stop (in milliseconds).\n                Defaults\n\n                to 500ms. With shorter values the model will respond more quickly,\n\n                but may jump in on short pauses from the user.\n            create_response:\n              type: boolean\n              default: true\n              description: |\n                Whether or not to automatically generate a response when a VAD stop event occurs.\n            interrupt_response:\n              type: boolean\n              default: true\n              description: |\n                Whether or not to automatically interrupt any ongoing response with output to the default\n                conversation (i.e. `conversation` of `auto`) when a VAD start event occurs.\n        input_audio_noise_reduction:\n          type: object\n          description: >\n            Configuration for input audio noise reduction. This can be set to `null` to turn off.\n\n            Noise reduction filters audio added to the input audio buffer before it is sent to VAD and the\n            model.\n\n            Filtering the audio can improve VAD and turn detection accuracy (reducing false positives) and\n            model performance by improving perception of the input audio.\n          properties:\n            type:\n              type: string\n              enum:\n                - near_field\n                - far_field\n              description: >\n                Type of noise reduction. `near_field` is for close-talking microphones such as headphones,\n                `far_field` is for far-field microphones such as laptop or conference room microphones.\n        speed:\n          type: number\n          default: 1\n          maximum: 1.5\n          minimum: 0.25\n          description: |\n            The speed of the model's spoken response. 1.0 is the default speed. 0.25 is\n            the minimum speed. 1.5 is the maximum speed. This value can only be changed\n            in between model turns, not while a response is in progress.\n        tracing:\n          title: Tracing Configuration\n          description: |\n            Configuration options for tracing. Set to null to disable tracing. Once\n            tracing is enabled for a session, the configuration cannot be modified.\n\n            `auto` will create a trace for the session with default values for the\n            workflow name, group id, and metadata.\n          anyOf:\n            - type: string\n              default: auto\n              description: |\n                Default tracing mode for the session.\n              enum:\n                - auto\n              x-stainless-const: true\n            - type: object\n              title: Tracing Configuration\n              description: |\n                Granular configuration for tracing.\n              properties:\n                workflow_name:\n                  type: string\n                  description: |\n                    The name of the workflow to attach to this trace. This is used to\n                    name the trace in the traces dashboard.\n                group_id:\n                  type: string\n                  description: |\n                    The group id to attach to this trace to enable filtering and\n                    grouping in the traces dashboard.\n                metadata:\n                  type: object\n                  description: |\n                    The arbitrary metadata to attach to this trace to enable\n                    filtering in the traces dashboard.\n        tools:\n          type: array\n          description: Tools (functions) available to the model.\n          items:\n            type: object\n            properties:\n              type:\n                type: string\n                enum:\n                  - function\n                description: The type of the tool, i.e. `function`.\n                x-stainless-const: true\n              name:\n                type: string\n                description: The name of the function.\n              description:\n                type: string\n                description: |\n                  The description of the function, including guidance on when and how\n                  to call it, and guidance about what to tell the user when calling\n                  (if anything).\n              parameters:\n                type: object\n                description: Parameters of the function in JSON Schema.\n        tool_choice:\n          type: string\n          default: auto\n          description: |\n            How the model chooses tools. Options are `auto`, `none`, `required`, or\n            specify a function.\n        temperature:\n          type: number\n          default: 0.8\n          description: >\n            Sampling temperature for the model, limited to [0.6, 1.2]. For audio models a temperature of 0.8\n            is highly recommended for best performance.\n        max_response_output_tokens:\n          description: |\n            Maximum number of output tokens for a single assistant response,\n            inclusive of tool calls. Provide an integer between 1 and 4096 to\n            limit output tokens, or `inf` for the maximum available tokens for a\n            given model. Defaults to `inf`.\n          anyOf:\n            - type: integer\n            - type: string\n              enum:\n                - inf\n              x-stainless-const: true\n    RealtimeSessionCreateRequest:\n      type: object\n      description: Realtime session object configuration.\n      properties:\n        modalities:\n          description: |\n            The set of modalities the model can respond with. To disable audio,\n            set this to [\"text\"].\n          items:\n            type: string\n            enum:\n              - text\n              - audio\n        model:\n          type: string\n          description: |\n            The Realtime model used for this session.\n          enum:\n            - gpt-4o-realtime-preview\n            - gpt-4o-realtime-preview-2024-10-01\n            - gpt-4o-realtime-preview-2024-12-17\n            - gpt-4o-realtime-preview-2025-06-03\n            - gpt-4o-mini-realtime-preview\n            - gpt-4o-mini-realtime-preview-2024-12-17\n        instructions:\n          type: string\n          description: >\n            The default system instructions (i.e. system message) prepended to model calls. This field allows\n            the client to guide the model on desired responses. The model can be instructed on response\n            content and format, (e.g. \"be extremely succinct\", \"act friendly\", \"here are examples of good\n            responses\") and on audio behavior (e.g. \"talk quickly\", \"inject emotion into your voice\", \"laugh\n            frequently\"). The instructions are not guaranteed to be followed by the model, but they provide\n            guidance to the model on the desired behavior.\n\n\n            Note that the server sets default instructions which will be used if this field is not set and are\n            visible in the `session.created` event at the start of the session.\n        voice:\n          $ref: '#/components/schemas/VoiceIdsShared'\n          description: |\n            The voice the model uses to respond. Voice cannot be changed during the\n            session once the model has responded with audio at least once. Current\n            voice options are `alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`,\n            `shimmer`, and `verse`.\n        input_audio_format:\n          type: string\n          default: pcm16\n          enum:\n            - pcm16\n            - g711_ulaw\n            - g711_alaw\n          description: |\n            The format of input audio. Options are `pcm16`, `g711_ulaw`, or `g711_alaw`.\n            For `pcm16`, input audio must be 16-bit PCM at a 24kHz sample rate,\n            single channel (mono), and little-endian byte order.\n        output_audio_format:\n          type: string\n          default: pcm16\n          enum:\n            - pcm16\n            - g711_ulaw\n            - g711_alaw\n          description: |\n            The format of output audio. Options are `pcm16`, `g711_ulaw`, or `g711_alaw`.\n            For `pcm16`, output audio is sampled at a rate of 24kHz.\n        input_audio_transcription:\n          type: object\n          description: >\n            Configuration for input audio transcription, defaults to off and can be set to `null` to turn off\n            once on. Input audio transcription is not native to the model, since the model consumes audio\n            directly. Transcription runs asynchronously through [the /audio/transcriptions\n            endpoint](https://platform.openai.com/docs/api-reference/audio/createTranscription) and should be\n            treated as guidance of input audio content rather than precisely what the model heard. The client\n            can optionally set the language and prompt for transcription, these offer additional guidance to\n            the transcription service.\n          properties:\n            model:\n              type: string\n              description: >\n                The model to use for transcription, current options are `gpt-4o-transcribe`,\n                `gpt-4o-mini-transcribe`, and `whisper-1`.\n            language:\n              type: string\n              description: |\n                The language of the input audio. Supplying the input language in\n                [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) (e.g. `en`) format\n                will improve accuracy and latency.\n            prompt:\n              type: string\n              description: >\n                An optional text to guide the model's style or continue a previous audio\n\n                segment.\n\n                For `whisper-1`, the [prompt is a list of\n                keywords](https://platform.openai.com/docs/guides/speech-to-text#prompting).\n\n                For `gpt-4o-transcribe` models, the prompt is a free text string, for example \"expect words\n                related to technology\".\n        turn_detection:\n          type: object\n          description: >\n            Configuration for turn detection, ether Server VAD or Semantic VAD. This can be set to `null` to\n            turn off, in which case the client must manually trigger model response.\n\n            Server VAD means that the model will detect the start and end of speech based on audio volume and\n            respond at the end of user speech.\n\n            Semantic VAD is more advanced and uses a turn detection model (in conjunction with VAD) to\n            semantically estimate whether the user has finished speaking, then dynamically sets a timeout\n            based on this probability. For example, if user audio trails off with \"uhhm\", the model will score\n            a low probability of turn end and wait longer for the user to continue speaking. This can be\n            useful for more natural conversations, but may have a higher latency.\n          properties:\n            type:\n              type: string\n              default: server_vad\n              enum:\n                - server_vad\n                - semantic_vad\n              description: |\n                Type of turn detection.\n            eagerness:\n              type: string\n              default: auto\n              enum:\n                - low\n                - medium\n                - high\n                - auto\n              description: >\n                Used only for `semantic_vad` mode. The eagerness of the model to respond. `low` will wait\n                longer for the user to continue speaking, `high` will respond more quickly. `auto` is the\n                default and is equivalent to `medium`.\n            threshold:\n              type: number\n              description: >\n                Used only for `server_vad` mode. Activation threshold for VAD (0.0 to 1.0), this defaults to\n                0.5. A\n\n                higher threshold will require louder audio to activate the model, and\n\n                thus might perform better in noisy environments.\n            prefix_padding_ms:\n              type: integer\n              description: |\n                Used only for `server_vad` mode. Amount of audio to include before the VAD detected speech (in\n                milliseconds). Defaults to 300ms.\n            silence_duration_ms:\n              type: integer\n              description: >\n                Used only for `server_vad` mode. Duration of silence to detect speech stop (in milliseconds).\n                Defaults\n\n                to 500ms. With shorter values the model will respond more quickly,\n\n                but may jump in on short pauses from the user.\n            create_response:\n              type: boolean\n              default: true\n              description: |\n                Whether or not to automatically generate a response when a VAD stop event occurs.\n            interrupt_response:\n              type: boolean\n              default: true\n              description: |\n                Whether or not to automatically interrupt any ongoing response with output to the default\n                conversation (i.e. `conversation` of `auto`) when a VAD start event occurs.\n        input_audio_noise_reduction:\n          type: object\n          description: >\n            Configuration for input audio noise reduction. This can be set to `null` to turn off.\n\n            Noise reduction filters audio added to the input audio buffer before it is sent to VAD and the\n            model.\n\n            Filtering the audio can improve VAD and turn detection accuracy (reducing false positives) and\n            model performance by improving perception of the input audio.\n          properties:\n            type:\n              type: string\n              enum:\n                - near_field\n                - far_field\n              description: >\n                Type of noise reduction. `near_field` is for close-talking microphones such as headphones,\n                `far_field` is for far-field microphones such as laptop or conference room microphones.\n        speed:\n          type: number\n          default: 1\n          maximum: 1.5\n          minimum: 0.25\n          description: |\n            The speed of the model's spoken response. 1.0 is the default speed. 0.25 is\n            the minimum speed. 1.5 is the maximum speed. This value can only be changed\n            in between model turns, not while a response is in progress.\n        tracing:\n          title: Tracing Configuration\n          description: |\n            Configuration options for tracing. Set to null to disable tracing. Once\n            tracing is enabled for a session, the configuration cannot be modified.\n\n            `auto` will create a trace for the session with default values for the\n            workflow name, group id, and metadata.\n          anyOf:\n            - type: string\n              default: auto\n              description: |\n                Default tracing mode for the session.\n              enum:\n                - auto\n              x-stainless-const: true\n            - type: object\n              title: Tracing Configuration\n              description: |\n                Granular configuration for tracing.\n              properties:\n                workflow_name:\n                  type: string\n                  description: |\n                    The name of the workflow to attach to this trace. This is used to\n                    name the trace in the traces dashboard.\n                group_id:\n                  type: string\n                  description: |\n                    The group id to attach to this trace to enable filtering and\n                    grouping in the traces dashboard.\n                metadata:\n                  type: object\n                  description: |\n                    The arbitrary metadata to attach to this trace to enable\n                    filtering in the traces dashboard.\n        tools:\n          type: array\n          description: Tools (functions) available to the model.\n          items:\n            type: object\n            properties:\n              type:\n                type: string\n                enum:\n                  - function\n                description: The type of the tool, i.e. `function`.\n                x-stainless-const: true\n              name:\n                type: string\n                description: The name of the function.\n              description:\n                type: string\n                description: |\n                  The description of the function, including guidance on when and how\n                  to call it, and guidance about what to tell the user when calling\n                  (if anything).\n              parameters:\n                type: object\n                description: Parameters of the function in JSON Schema.\n        tool_choice:\n          type: string\n          default: auto\n          description: |\n            How the model chooses tools. Options are `auto`, `none`, `required`, or\n            specify a function.\n        temperature:\n          type: number\n          default: 0.8\n          description: >\n            Sampling temperature for the model, limited to [0.6, 1.2]. For audio models a temperature of 0.8\n            is highly recommended for best performance.\n        max_response_output_tokens:\n          description: |\n            Maximum number of output tokens for a single assistant response,\n            inclusive of tool calls. Provide an integer between 1 and 4096 to\n            limit output tokens, or `inf` for the maximum available tokens for a\n            given model. Defaults to `inf`.\n          anyOf:\n            - type: integer\n            - type: string\n              enum:\n                - inf\n              x-stainless-const: true\n        client_secret:\n          type: object\n          description: |\n            Configuration options for the generated client secret.\n          properties:\n            expires_after:\n              type: object\n              description: |\n                Configuration for the ephemeral token expiration.\n              properties:\n                anchor:\n                  type: string\n                  enum:\n                    - created_at\n                  description: >\n                    The anchor point for the ephemeral token expiration. Only `created_at` is currently\n                    supported.\n                seconds:\n                  default: 600\n                  type: integer\n                  description: >\n                    The number of seconds from the anchor point to the expiration. Select a value between `10`\n                    and `7200`.\n              required:\n                - anchor\n    RealtimeSessionCreateResponse:\n      type: object\n      description: |\n        A new Realtime session configuration, with an ephemeral key. Default TTL\n        for keys is one minute.\n      properties:\n        client_secret:\n          type: object\n          description: Ephemeral key returned by the API.\n          properties:\n            value:\n              type: string\n              description: |\n                Ephemeral key usable in client environments to authenticate connections\n                to the Realtime API. Use this in client-side environments rather than\n                a standard API token, which should only be used server-side.\n            expires_at:\n              type: integer\n              description: |\n                Timestamp for when the token expires. Currently, all tokens expire\n                after one minute.\n          required:\n            - value\n            - expires_at\n        modalities:\n          description: |\n            The set of modalities the model can respond with. To disable audio,\n            set this to [\"text\"].\n          items:\n            type: string\n            enum:\n              - text\n              - audio\n        instructions:\n          type: string\n          description: |\n            The default system instructions (i.e. system message) prepended to model\n            calls. This field allows the client to guide the model on desired\n            responses. The model can be instructed on response content and format,\n            (e.g. \"be extremely succinct\", \"act friendly\", \"here are examples of good\n            responses\") and on audio behavior (e.g. \"talk quickly\", \"inject emotion\n            into your voice\", \"laugh frequently\"). The instructions are not guaranteed\n            to be followed by the model, but they provide guidance to the model on the\n            desired behavior.\n\n            Note that the server sets default instructions which will be used if this\n            field is not set and are visible in the `session.created` event at the\n            start of the session.\n        voice:\n          $ref: '#/components/schemas/VoiceIdsShared'\n          description: |\n            The voice the model uses to respond. Voice cannot be changed during the\n            session once the model has responded with audio at least once. Current\n            voice options are `alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`,\n            `shimmer`, and `verse`.\n        input_audio_format:\n          type: string\n          description: |\n            The format of input audio. Options are `pcm16`, `g711_ulaw`, or `g711_alaw`.\n        output_audio_format:\n          type: string\n          description: |\n            The format of output audio. Options are `pcm16`, `g711_ulaw`, or `g711_alaw`.\n        input_audio_transcription:\n          type: object\n          description: |\n            Configuration for input audio transcription, defaults to off and can be\n            set to `null` to turn off once on. Input audio transcription is not native\n            to the model, since the model consumes audio directly. Transcription runs\n            asynchronously and should be treated as rough guidance\n            rather than the representation understood by the model.\n          properties:\n            model:\n              type: string\n              description: |\n                The model to use for transcription.\n        speed:\n          type: number\n          default: 1\n          maximum: 1.5\n          minimum: 0.25\n          description: |\n            The speed of the model's spoken response. 1.0 is the default speed. 0.25 is\n            the minimum speed. 1.5 is the maximum speed. This value can only be changed\n            in between model turns, not while a response is in progress.\n        tracing:\n          title: Tracing Configuration\n          description: |\n            Configuration options for tracing. Set to null to disable tracing. Once\n            tracing is enabled for a session, the configuration cannot be modified.\n\n            `auto` will create a trace for the session with default values for the\n            workflow name, group id, and metadata.\n          anyOf:\n            - type: string\n              default: auto\n              description: |\n                Default tracing mode for the session.\n              enum:\n                - auto\n              x-stainless-const: true\n            - type: object\n              title: Tracing Configuration\n              description: |\n                Granular configuration for tracing.\n              properties:\n                workflow_name:\n                  type: string\n                  description: |\n                    The name of the workflow to attach to this trace. This is used to\n                    name the trace in the traces dashboard.\n                group_id:\n                  type: string\n                  description: |\n                    The group id to attach to this trace to enable filtering and\n                    grouping in the traces dashboard.\n                metadata:\n                  type: object\n                  description: |\n                    The arbitrary metadata to attach to this trace to enable\n                    filtering in the traces dashboard.\n        turn_detection:\n          type: object\n          description: |\n            Configuration for turn detection. Can be set to `null` to turn off. Server\n            VAD means that the model will detect the start and end of speech based on\n            audio volume and respond at the end of user speech.\n          properties:\n            type:\n              type: string\n              description: |\n                Type of turn detection, only `server_vad` is currently supported.\n            threshold:\n              type: number\n              description: |\n                Activation threshold for VAD (0.0 to 1.0), this defaults to 0.5. A\n                higher threshold will require louder audio to activate the model, and\n                thus might perform better in noisy environments.\n            prefix_padding_ms:\n              type: integer\n              description: |\n                Amount of audio to include before the VAD detected speech (in\n                milliseconds). Defaults to 300ms.\n            silence_duration_ms:\n              type: integer\n              description: |\n                Duration of silence to detect speech stop (in milliseconds). Defaults\n                to 500ms. With shorter values the model will respond more quickly,\n                but may jump in on short pauses from the user.\n        tools:\n          type: array\n          description: Tools (functions) available to the model.\n          items:\n            type: object\n            properties:\n              type:\n                type: string\n                enum:\n                  - function\n                description: The type of the tool, i.e. `function`.\n                x-stainless-const: true\n              name:\n                type: string\n                description: The name of the function.\n              description:\n                type: string\n                description: |\n                  The description of the function, including guidance on when and how\n                  to call it, and guidance about what to tell the user when calling\n                  (if anything).\n              parameters:\n                type: object\n                description: Parameters of the function in JSON Schema.\n        tool_choice:\n          type: string\n          description: |\n            How the model chooses tools. Options are `auto`, `none`, `required`, or\n            specify a function.\n        temperature:\n          type: number\n          description: |\n            Sampling temperature for the model, limited to [0.6, 1.2]. Defaults to 0.8.\n        max_response_output_tokens:\n          description: |\n            Maximum number of output tokens for a single assistant response,\n            inclusive of tool calls. Provide an integer between 1 and 4096 to\n            limit output tokens, or `inf` for the maximum available tokens for a\n            given model. Defaults to `inf`.\n          anyOf:\n            - type: integer\n            - type: string\n              enum:\n                - inf\n              x-stainless-const: true\n      required:\n        - client_secret\n      x-oaiMeta:\n        name: The session object\n        group: realtime\n        example: |\n          {\n            \"id\": \"sess_001\",\n            \"object\": \"realtime.session\",\n            \"model\": \"gpt-4o-realtime-preview\",\n            \"modalities\": [\"audio\", \"text\"],\n            \"instructions\": \"You are a friendly assistant.\",\n            \"voice\": \"alloy\",\n            \"input_audio_format\": \"pcm16\",\n            \"output_audio_format\": \"pcm16\",\n            \"input_audio_transcription\": {\n                \"model\": \"whisper-1\"\n            },\n            \"turn_detection\": null,\n            \"tools\": [],\n            \"tool_choice\": \"none\",\n            \"temperature\": 0.7,\n            \"speed\": 1.1,\n            \"tracing\": \"auto\",\n            \"max_response_output_tokens\": 200,\n            \"client_secret\": {\n              \"value\": \"ek_abc123\",\n              \"expires_at\": 1234567890\n            }\n          }\n    RealtimeTranscriptionSessionCreateRequest:\n      type: object\n      description: Realtime transcription session object configuration.\n      properties:\n        modalities:\n          description: |\n            The set of modalities the model can respond with. To disable audio,\n            set this to [\"text\"].\n          items:\n            type: string\n            enum:\n              - text\n              - audio\n        input_audio_format:\n          type: string\n          default: pcm16\n          enum:\n            - pcm16\n            - g711_ulaw\n            - g711_alaw\n          description: |\n            The format of input audio. Options are `pcm16`, `g711_ulaw`, or `g711_alaw`.\n            For `pcm16`, input audio must be 16-bit PCM at a 24kHz sample rate,\n            single channel (mono), and little-endian byte order.\n        input_audio_transcription:\n          type: object\n          description: >\n            Configuration for input audio transcription. The client can optionally set the language and prompt\n            for transcription, these offer additional guidance to the transcription service.\n          properties:\n            model:\n              type: string\n              description: >\n                The model to use for transcription, current options are `gpt-4o-transcribe`,\n                `gpt-4o-mini-transcribe`, and `whisper-1`.\n              enum:\n                - gpt-4o-transcribe\n                - gpt-4o-mini-transcribe\n                - whisper-1\n            language:\n              type: string\n              description: |\n                The language of the input audio. Supplying the input language in\n                [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) (e.g. `en`) format\n                will improve accuracy and latency.\n            prompt:\n              type: string\n              description: >\n                An optional text to guide the model's style or continue a previous audio\n\n                segment.\n\n                For `whisper-1`, the [prompt is a list of\n                keywords](https://platform.openai.com/docs/guides/speech-to-text#prompting).\n\n                For `gpt-4o-transcribe` models, the prompt is a free text string, for example \"expect words\n                related to technology\".\n        turn_detection:\n          type: object\n          description: >\n            Configuration for turn detection, ether Server VAD or Semantic VAD. This can be set to `null` to\n            turn off, in which case the client must manually trigger model response.\n\n            Server VAD means that the model will detect the start and end of speech based on audio volume and\n            respond at the end of user speech.\n\n            Semantic VAD is more advanced and uses a turn detection model (in conjunction with VAD) to\n            semantically estimate whether the user has finished speaking, then dynamically sets a timeout\n            based on this probability. For example, if user audio trails off with \"uhhm\", the model will score\n            a low probability of turn end and wait longer for the user to continue speaking. This can be\n            useful for more natural conversations, but may have a higher latency.\n          properties:\n            type:\n              type: string\n              default: server_vad\n              enum:\n                - server_vad\n                - semantic_vad\n              description: |\n                Type of turn detection.\n            eagerness:\n              type: string\n              default: auto\n              enum:\n                - low\n                - medium\n                - high\n                - auto\n              description: >\n                Used only for `semantic_vad` mode. The eagerness of the model to respond. `low` will wait\n                longer for the user to continue speaking, `high` will respond more quickly. `auto` is the\n                default and is equivalent to `medium`.\n            threshold:\n              type: number\n              description: >\n                Used only for `server_vad` mode. Activation threshold for VAD (0.0 to 1.0), this defaults to\n                0.5. A\n\n                higher threshold will require louder audio to activate the model, and\n\n                thus might perform better in noisy environments.\n            prefix_padding_ms:\n              type: integer\n              description: |\n                Used only for `server_vad` mode. Amount of audio to include before the VAD detected speech (in\n                milliseconds). Defaults to 300ms.\n            silence_duration_ms:\n              type: integer\n              description: >\n                Used only for `server_vad` mode. Duration of silence to detect speech stop (in milliseconds).\n                Defaults\n\n                to 500ms. With shorter values the model will respond more quickly,\n\n                but may jump in on short pauses from the user.\n            create_response:\n              type: boolean\n              default: true\n              description: >\n                Whether or not to automatically generate a response when a VAD stop event occurs. Not\n                available for transcription sessions.\n            interrupt_response:\n              type: boolean\n              default: true\n              description: >\n                Whether or not to automatically interrupt any ongoing response with output to the default\n\n                conversation (i.e. `conversation` of `auto`) when a VAD start event occurs. Not available for\n                transcription sessions.\n        input_audio_noise_reduction:\n          type: object\n          description: >\n            Configuration for input audio noise reduction. This can be set to `null` to turn off.\n\n            Noise reduction filters audio added to the input audio buffer before it is sent to VAD and the\n            model.\n\n            Filtering the audio can improve VAD and turn detection accuracy (reducing false positives) and\n            model performance by improving perception of the input audio.\n          properties:\n            type:\n              type: string\n              enum:\n                - near_field\n                - far_field\n              description: >\n                Type of noise reduction. `near_field` is for close-talking microphones such as headphones,\n                `far_field` is for far-field microphones such as laptop or conference room microphones.\n        include:\n          type: array\n          items:\n            type: string\n          description: |\n            The set of items to include in the transcription. Current available items are:\n            - `item.input_audio_transcription.logprobs`\n        client_secret:\n          type: object\n          description: |\n            Configuration options for the generated client secret.\n          properties:\n            expires_at:\n              type: object\n              description: |\n                Configuration for the ephemeral token expiration.\n              properties:\n                anchor:\n                  default: created_at\n                  type: string\n                  enum:\n                    - created_at\n                  description: >\n                    The anchor point for the ephemeral token expiration. Only `created_at` is currently\n                    supported.\n                seconds:\n                  default: 600\n                  type: integer\n                  description: >\n                    The number of seconds from the anchor point to the expiration. Select a value between `10`\n                    and `7200`.\n    RealtimeTranscriptionSessionCreateResponse:\n      type: object\n      description: |\n        A new Realtime transcription session configuration.\n\n        When a session is created on the server via REST API, the session object\n        also contains an ephemeral key. Default TTL for keys is 10 minutes. This\n        property is not present when a session is updated via the WebSocket API.\n      properties:\n        client_secret:\n          type: object\n          description: |\n            Ephemeral key returned by the API. Only present when the session is\n            created on the server via REST API.\n          properties:\n            value:\n              type: string\n              description: |\n                Ephemeral key usable in client environments to authenticate connections\n                to the Realtime API. Use this in client-side environments rather than\n                a standard API token, which should only be used server-side.\n            expires_at:\n              type: integer\n              description: |\n                Timestamp for when the token expires. Currently, all tokens expire\n                after one minute.\n          required:\n            - value\n            - expires_at\n        modalities:\n          description: |\n            The set of modalities the model can respond with. To disable audio,\n            set this to [\"text\"].\n          items:\n            type: string\n            enum:\n              - text\n              - audio\n        input_audio_format:\n          type: string\n          description: |\n            The format of input audio. Options are `pcm16`, `g711_ulaw`, or `g711_alaw`.\n        input_audio_transcription:\n          type: object\n          description: |\n            Configuration of the transcription model.\n          properties:\n            model:\n              type: string\n              description: >\n                The model to use for transcription. Can be `gpt-4o-transcribe`, `gpt-4o-mini-transcribe`, or\n                `whisper-1`.\n              enum:\n                - gpt-4o-transcribe\n                - gpt-4o-mini-transcribe\n                - whisper-1\n            language:\n              type: string\n              description: |\n                The language of the input audio. Supplying the input language in\n                [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) (e.g. `en`) format\n                will improve accuracy and latency.\n            prompt:\n              type: string\n              description: >\n                An optional text to guide the model's style or continue a previous audio\n\n                segment. The [prompt](https://platform.openai.com/docs/guides/speech-to-text#prompting) should\n                match\n\n                the audio language.\n        turn_detection:\n          type: object\n          description: |\n            Configuration for turn detection. Can be set to `null` to turn off. Server\n            VAD means that the model will detect the start and end of speech based on\n            audio volume and respond at the end of user speech.\n          properties:\n            type:\n              type: string\n              description: |\n                Type of turn detection, only `server_vad` is currently supported.\n            threshold:\n              type: number\n              description: |\n                Activation threshold for VAD (0.0 to 1.0), this defaults to 0.5. A\n                higher threshold will require louder audio to activate the model, and\n                thus might perform better in noisy environments.\n            prefix_padding_ms:\n              type: integer\n              description: |\n                Amount of audio to include before the VAD detected speech (in\n                milliseconds). Defaults to 300ms.\n            silence_duration_ms:\n              type: integer\n              description: |\n                Duration of silence to detect speech stop (in milliseconds). Defaults\n                to 500ms. With shorter values the model will respond more quickly,\n                but may jump in on short pauses from the user.\n      required:\n        - client_secret\n      x-oaiMeta:\n        name: The transcription session object\n        group: realtime\n        example: |\n          {\n            \"id\": \"sess_BBwZc7cFV3XizEyKGDCGL\",\n            \"object\": \"realtime.transcription_session\",\n            \"expires_at\": 1742188264,\n            \"modalities\": [\"audio\", \"text\"],\n            \"turn_detection\": {\n              \"type\": \"server_vad\",\n              \"threshold\": 0.5,\n              \"prefix_padding_ms\": 300,\n              \"silence_duration_ms\": 200\n            },\n            \"input_audio_format\": \"pcm16\",\n            \"input_audio_transcription\": {\n              \"model\": \"gpt-4o-transcribe\",\n              \"language\": null,\n              \"prompt\": \"\"\n            },\n            \"client_secret\": null\n          }\n    Reasoning:\n      type: object\n      description: |\n        **gpt-5 and o-series models only**\n\n        Configuration options for\n        [reasoning models](https://platform.openai.com/docs/guides/reasoning).\n      title: Reasoning\n      properties:\n        effort:\n          $ref: '#/components/schemas/ReasoningEffort'\n        summary:\n          type: string\n          description: |\n            A summary of the reasoning performed by the model. This can be\n            useful for debugging and understanding the model's reasoning process.\n            One of `auto`, `concise`, or `detailed`.\n          enum:\n            - auto\n            - concise\n            - detailed\n          nullable: true\n        generate_summary:\n          type: string\n          deprecated: true\n          description: |\n            **Deprecated:** use `summary` instead.\n\n            A summary of the reasoning performed by the model. This can be\n            useful for debugging and understanding the model's reasoning process.\n            One of `auto`, `concise`, or `detailed`.\n          enum:\n            - auto\n            - concise\n            - detailed\n          nullable: true\n    ReasoningEffort:\n      type: string\n      enum:\n        - minimal\n        - low\n        - medium\n        - high\n      default: medium\n      nullable: true\n      description: |\n        Constrains effort on reasoning for\n        [reasoning models](https://platform.openai.com/docs/guides/reasoning).\n        Currently supported values are `minimal`, `low`, `medium`, and `high`. Reducing\n        reasoning effort can result in faster responses and fewer tokens used\n        on reasoning in a response.\n    ReasoningItem:\n      type: object\n      description: |\n        A description of the chain of thought used by a reasoning model while generating\n        a response. Be sure to include these items in your `input` to the Responses API\n        for subsequent turns of a conversation if you are manually\n        [managing context](https://platform.openai.com/docs/guides/conversation-state).\n      title: Reasoning\n      properties:\n        type:\n          type: string\n          description: |\n            The type of the object. Always `reasoning`.\n          enum:\n            - reasoning\n          x-stainless-const: true\n        id:\n          type: string\n          description: |\n            The unique identifier of the reasoning content.\n        encrypted_content:\n          type: string\n          description: |\n            The encrypted content of the reasoning item - populated when a response is\n            generated with `reasoning.encrypted_content` in the `include` parameter.\n          nullable: true\n        summary:\n          type: array\n          description: |\n            Reasoning summary content.\n          items:\n            type: object\n            properties:\n              type:\n                type: string\n                description: |\n                  The type of the object. Always `summary_text`.\n                enum:\n                  - summary_text\n                x-stainless-const: true\n              text:\n                type: string\n                description: |\n                  A summary of the reasoning output from the model so far.\n            required:\n              - type\n              - text\n        content:\n          type: array\n          description: |\n            Reasoning text content.\n          items:\n            type: object\n            properties:\n              type:\n                type: string\n                description: |\n                  The type of the object. Always `reasoning_text`.\n                enum:\n                  - reasoning_text\n                x-stainless-const: true\n              text:\n                type: string\n                description: |\n                  Reasoning text output from the model.\n            required:\n              - type\n              - text\n        status:\n          type: string\n          description: |\n            The status of the item. One of `in_progress`, `completed`, or\n            `incomplete`. Populated when items are returned via API.\n          enum:\n            - in_progress\n            - completed\n            - incomplete\n      required:\n        - id\n        - summary\n        - type\n    Response:\n      title: The response object\n      allOf:\n        - $ref: '#/components/schemas/ModelResponseProperties'\n        - $ref: '#/components/schemas/ResponseProperties'\n        - type: object\n          properties:\n            id:\n              type: string\n              description: |\n                Unique identifier for this Response.\n            object:\n              type: string\n              description: |\n                The object type of this resource - always set to `response`.\n              enum:\n                - response\n              x-stainless-const: true\n            status:\n              type: string\n              description: |\n                The status of the response generation. One of `completed`, `failed`,\n                `in_progress`, `cancelled`, `queued`, or `incomplete`.\n              enum:\n                - completed\n                - failed\n                - in_progress\n                - cancelled\n                - queued\n                - incomplete\n            created_at:\n              type: number\n              description: |\n                Unix timestamp (in seconds) of when this Response was created.\n            error:\n              $ref: '#/components/schemas/ResponseError'\n            incomplete_details:\n              type: object\n              nullable: true\n              description: |\n                Details about why the response is incomplete.\n              properties:\n                reason:\n                  type: string\n                  description: The reason why the response is incomplete.\n                  enum:\n                    - max_output_tokens\n                    - content_filter\n            output:\n              type: array\n              description: |\n                An array of content items generated by the model.\n\n                - The length and order of items in the `output` array is dependent\n                  on the model's response.\n                - Rather than accessing the first item in the `output` array and\n                  assuming it's an `assistant` message with the content generated by\n                  the model, you might consider using the `output_text` property where\n                  supported in SDKs.\n              items:\n                $ref: '#/components/schemas/OutputItem'\n            instructions:\n              nullable: true\n              description: |\n                A system (or developer) message inserted into the model's context.\n\n                When using along with `previous_response_id`, the instructions from a previous\n                response will not be carried over to the next response. This makes it simple\n                to swap out system (or developer) messages in new responses.\n              anyOf:\n                - type: string\n                  description: |\n                    A text input to the model, equivalent to a text input with the\n                    `developer` role.\n                - type: array\n                  title: Input item list\n                  description: |\n                    A list of one or many input items to the model, containing\n                    different content types.\n                  items:\n                    $ref: '#/components/schemas/InputItem'\n            output_text:\n              type: string\n              nullable: true\n              description: |\n                SDK-only convenience property that contains the aggregated text output\n                from all `output_text` items in the `output` array, if any are present.\n                Supported in the Python and JavaScript SDKs.\n              x-oaiSupportedSDKs:\n                - python\n                - javascript\n              x-stainless-skip: true\n            usage:\n              $ref: '#/components/schemas/ResponseUsage'\n            parallel_tool_calls:\n              type: boolean\n              description: |\n                Whether to allow the model to run tool calls in parallel.\n              default: true\n          required:\n            - id\n            - object\n            - created_at\n            - error\n            - incomplete_details\n            - instructions\n            - model\n            - tools\n            - output\n            - parallel_tool_calls\n            - metadata\n            - tool_choice\n            - temperature\n            - top_p\n    ResponseAudioDeltaEvent:\n      type: object\n      description: Emitted when there is a partial audio response.\n      properties:\n        type:\n          type: string\n          description: |\n            The type of the event. Always `response.audio.delta`.\n          enum:\n            - response.audio.delta\n          x-stainless-const: true\n        sequence_number:\n          type: integer\n          description: |\n            A sequence number for this chunk of the stream response.\n        delta:\n          type: string\n          description: |\n            A chunk of Base64 encoded response audio bytes.\n      required:\n        - type\n        - delta\n        - sequence_number\n      x-oaiMeta:\n        name: response.audio.delta\n        group: responses\n        example: |\n          {\n            \"type\": \"response.audio.delta\",\n            \"response_id\": \"resp_123\",\n            \"delta\": \"base64encoded...\",\n            \"sequence_number\": 1\n          }\n    ResponseAudioDoneEvent:\n      type: object\n      description: Emitted when the audio response is complete.\n      properties:\n        type:\n          type: string\n          description: |\n            The type of the event. Always `response.audio.done`.\n          enum:\n            - response.audio.done\n          x-stainless-const: true\n        sequence_number:\n          type: integer\n          description: |\n            The sequence number of the delta.\n      required:\n        - type\n        - sequence_number\n        - response_id\n      x-oaiMeta:\n        name: response.audio.done\n        group: responses\n        example: |\n          {\n            \"type\": \"response.audio.done\",\n            \"response_id\": \"resp-123\",\n            \"sequence_number\": 1\n          }\n    ResponseAudioTranscriptDeltaEvent:\n      type: object\n      description: Emitted when there is a partial transcript of audio.\n      properties:\n        type:\n          type: string\n          description: |\n            The type of the event. Always `response.audio.transcript.delta`.\n          enum:\n            - response.audio.transcript.delta\n          x-stainless-const: true\n        delta:\n          type: string\n          description: |\n            The partial transcript of the audio response.\n        sequence_number:\n          type: integer\n          description: The sequence number of this event.\n      required:\n        - type\n        - response_id\n        - delta\n        - sequence_number\n      x-oaiMeta:\n        name: response.audio.transcript.delta\n        group: responses\n        example: |\n          {\n            \"type\": \"response.audio.transcript.delta\",\n            \"response_id\": \"resp_123\",\n            \"delta\": \" ... partial transcript ... \",\n            \"sequence_number\": 1\n          }\n    ResponseAudioTranscriptDoneEvent:\n      type: object\n      description: Emitted when the full audio transcript is completed.\n      properties:\n        type:\n          type: string\n          description: |\n            The type of the event. Always `response.audio.transcript.done`.\n          enum:\n            - response.audio.transcript.done\n          x-stainless-const: true\n        sequence_number:\n          type: integer\n          description: The sequence number of this event.\n      required:\n        - type\n        - response_id\n        - sequence_number\n      x-oaiMeta:\n        name: response.audio.transcript.done\n        group: responses\n        example: |\n          {\n            \"type\": \"response.audio.transcript.done\",\n            \"response_id\": \"resp_123\",\n            \"sequence_number\": 1\n          }\n    ResponseCodeInterpreterCallCodeDeltaEvent:\n      type: object\n      description: Emitted when a partial code snippet is streamed by the code interpreter.\n      properties:\n        type:\n          type: string\n          description: The type of the event. Always `response.code_interpreter_call_code.delta`.\n          enum:\n            - response.code_interpreter_call_code.delta\n          x-stainless-const: true\n        output_index:\n          type: integer\n          description: The index of the output item in the response for which the code is being streamed.\n        item_id:\n          type: string\n          description: The unique identifier of the code interpreter tool call item.\n        delta:\n          type: string\n          description: The partial code snippet being streamed by the code interpreter.\n        sequence_number:\n          type: integer\n          description: The sequence number of this event, used to order streaming events.\n      required:\n        - type\n        - output_index\n        - item_id\n        - delta\n        - sequence_number\n      x-oaiMeta:\n        name: response.code_interpreter_call_code.delta\n        group: responses\n        example: |\n          {\n            \"type\": \"response.code_interpreter_call_code.delta\",\n            \"output_index\": 0,\n            \"item_id\": \"ci_12345\",\n            \"delta\": \"print('Hello, world')\",\n            \"sequence_number\": 1\n          }\n    ResponseCodeInterpreterCallCodeDoneEvent:\n      type: object\n      description: Emitted when the code snippet is finalized by the code interpreter.\n      properties:\n        type:\n          type: string\n          description: The type of the event. Always `response.code_interpreter_call_code.done`.\n          enum:\n            - response.code_interpreter_call_code.done\n          x-stainless-const: true\n        output_index:\n          type: integer\n          description: The index of the output item in the response for which the code is finalized.\n        item_id:\n          type: string\n          description: The unique identifier of the code interpreter tool call item.\n        code:\n          type: string\n          description: The final code snippet output by the code interpreter.\n        sequence_number:\n          type: integer\n          description: The sequence number of this event, used to order streaming events.\n      required:\n        - type\n        - output_index\n        - item_id\n        - code\n        - sequence_number\n      x-oaiMeta:\n        name: response.code_interpreter_call_code.done\n        group: responses\n        example: |\n          {\n            \"type\": \"response.code_interpreter_call_code.done\",\n            \"output_index\": 3,\n            \"item_id\": \"ci_12345\",\n            \"code\": \"print('done')\",\n            \"sequence_number\": 1\n          }\n    ResponseCodeInterpreterCallCompletedEvent:\n      type: object\n      description: Emitted when the code interpreter call is completed.\n      properties:\n        type:\n          type: string\n          description: The type of the event. Always `response.code_interpreter_call.completed`.\n          enum:\n            - response.code_interpreter_call.completed\n          x-stainless-const: true\n        output_index:\n          type: integer\n          description: The index of the output item in the response for which the code interpreter call is completed.\n        item_id:\n          type: string\n          description: The unique identifier of the code interpreter tool call item.\n        sequence_number:\n          type: integer\n          description: The sequence number of this event, used to order streaming events.\n      required:\n        - type\n        - output_index\n        - item_id\n        - sequence_number\n      x-oaiMeta:\n        name: response.code_interpreter_call.completed\n        group: responses\n        example: |\n          {\n            \"type\": \"response.code_interpreter_call.completed\",\n            \"output_index\": 5,\n            \"item_id\": \"ci_12345\",\n            \"sequence_number\": 1\n          }\n    ResponseCodeInterpreterCallInProgressEvent:\n      type: object\n      description: Emitted when a code interpreter call is in progress.\n      properties:\n        type:\n          type: string\n          description: The type of the event. Always `response.code_interpreter_call.in_progress`.\n          enum:\n            - response.code_interpreter_call.in_progress\n          x-stainless-const: true\n        output_index:\n          type: integer\n          description: The index of the output item in the response for which the code interpreter call is in progress.\n        item_id:\n          type: string\n          description: The unique identifier of the code interpreter tool call item.\n        sequence_number:\n          type: integer\n          description: The sequence number of this event, used to order streaming events.\n      required:\n        - type\n        - output_index\n        - item_id\n        - sequence_number\n      x-oaiMeta:\n        name: response.code_interpreter_call.in_progress\n        group: responses\n        example: |\n          {\n            \"type\": \"response.code_interpreter_call.in_progress\",\n            \"output_index\": 0,\n            \"item_id\": \"ci_12345\",\n            \"sequence_number\": 1\n          }\n    ResponseCodeInterpreterCallInterpretingEvent:\n      type: object\n      description: Emitted when the code interpreter is actively interpreting the code snippet.\n      properties:\n        type:\n          type: string\n          description: The type of the event. Always `response.code_interpreter_call.interpreting`.\n          enum:\n            - response.code_interpreter_call.interpreting\n          x-stainless-const: true\n        output_index:\n          type: integer\n          description: The index of the output item in the response for which the code interpreter is interpreting code.\n        item_id:\n          type: string\n          description: The unique identifier of the code interpreter tool call item.\n        sequence_number:\n          type: integer\n          description: The sequence number of this event, used to order streaming events.\n      required:\n        - type\n        - output_index\n        - item_id\n        - sequence_number\n      x-oaiMeta:\n        name: response.code_interpreter_call.interpreting\n        group: responses\n        example: |\n          {\n            \"type\": \"response.code_interpreter_call.interpreting\",\n            \"output_index\": 4,\n            \"item_id\": \"ci_12345\",\n            \"sequence_number\": 1\n          }\n    ResponseCompletedEvent:\n      type: object\n      description: Emitted when the model response is complete.\n      properties:\n        type:\n          type: string\n          description: |\n            The type of the event. Always `response.completed`.\n          enum:\n            - response.completed\n          x-stainless-const: true\n        response:\n          $ref: '#/components/schemas/Response'\n          description: |\n            Properties of the completed response.\n        sequence_number:\n          type: integer\n          description: The sequence number for this event.\n      required:\n        - type\n        - response\n        - sequence_number\n      x-oaiMeta:\n        name: response.completed\n        group: responses\n        example: |\n          {\n            \"type\": \"response.completed\",\n            \"response\": {\n              \"id\": \"resp_123\",\n              \"object\": \"response\",\n              \"created_at\": 1740855869,\n              \"status\": \"completed\",\n              \"error\": null,\n              \"incomplete_details\": null,\n              \"input\": [],\n              \"instructions\": null,\n              \"max_output_tokens\": null,\n              \"model\": \"gpt-4o-mini-2024-07-18\",\n              \"output\": [\n                {\n                  \"id\": \"msg_123\",\n                  \"type\": \"message\",\n                  \"role\": \"assistant\",\n                  \"content\": [\n                    {\n                      \"type\": \"output_text\",\n                      \"text\": \"In a shimmering forest under a sky full of stars, a lonely unicorn named Lila discovered a hidden pond that glowed with moonlight. Every night, she would leave sparkling, magical flowers by the water's edge, hoping to share her beauty with others. One enchanting evening, she woke to find a group of friendly animals gathered around, eager to be friends and share in her magic.\",\n                      \"annotations\": []\n                    }\n                  ]\n                }\n              ],\n              \"previous_response_id\": null,\n              \"reasoning_effort\": null,\n              \"store\": false,\n              \"temperature\": 1,\n              \"text\": {\n                \"format\": {\n                  \"type\": \"text\"\n                }\n              },\n              \"tool_choice\": \"auto\",\n              \"tools\": [],\n              \"top_p\": 1,\n              \"truncation\": \"disabled\",\n              \"usage\": {\n                \"input_tokens\": 0,\n                \"output_tokens\": 0,\n                \"output_tokens_details\": {\n                  \"reasoning_tokens\": 0\n                },\n                \"total_tokens\": 0\n              },\n              \"user\": null,\n              \"metadata\": {}\n            },\n            \"sequence_number\": 1\n          }\n    ResponseContentPartAddedEvent:\n      type: object\n      description: Emitted when a new content part is added.\n      properties:\n        type:\n          type: string\n          description: |\n            The type of the event. Always `response.content_part.added`.\n          enum:\n            - response.content_part.added\n          x-stainless-const: true\n        item_id:\n          type: string\n          description: |\n            The ID of the output item that the content part was added to.\n        output_index:\n          type: integer\n          description: |\n            The index of the output item that the content part was added to.\n        content_index:\n          type: integer\n          description: |\n            The index of the content part that was added.\n        part:\n          $ref: '#/components/schemas/OutputContent'\n          description: |\n            The content part that was added.\n        sequence_number:\n          type: integer\n          description: The sequence number of this event.\n      required:\n        - type\n        - item_id\n        - output_index\n        - content_index\n        - part\n        - sequence_number\n      x-oaiMeta:\n        name: response.content_part.added\n        group: responses\n        example: |\n          {\n            \"type\": \"response.content_part.added\",\n            \"item_id\": \"msg_123\",\n            \"output_index\": 0,\n            \"content_index\": 0,\n            \"part\": {\n              \"type\": \"output_text\",\n              \"text\": \"\",\n              \"annotations\": []\n            },\n            \"sequence_number\": 1\n          }\n    ResponseContentPartDoneEvent:\n      type: object\n      description: Emitted when a content part is done.\n      properties:\n        type:\n          type: string\n          description: |\n            The type of the event. Always `response.content_part.done`.\n          enum:\n            - response.content_part.done\n          x-stainless-const: true\n        item_id:\n          type: string\n          description: |\n            The ID of the output item that the content part was added to.\n        output_index:\n          type: integer\n          description: |\n            The index of the output item that the content part was added to.\n        content_index:\n          type: integer\n          description: |\n            The index of the content part that is done.\n        sequence_number:\n          type: integer\n          description: The sequence number of this event.\n        part:\n          $ref: '#/components/schemas/OutputContent'\n          description: |\n            The content part that is done.\n      required:\n        - type\n        - item_id\n        - output_index\n        - content_index\n        - part\n        - sequence_number\n      x-oaiMeta:\n        name: response.content_part.done\n        group: responses\n        example: |\n          {\n            \"type\": \"response.content_part.done\",\n            \"item_id\": \"msg_123\",\n            \"output_index\": 0,\n            \"content_index\": 0,\n            \"sequence_number\": 1,\n            \"part\": {\n              \"type\": \"output_text\",\n              \"text\": \"In a shimmering forest under a sky full of stars, a lonely unicorn named Lila discovered a hidden pond that glowed with moonlight. Every night, she would leave sparkling, magical flowers by the water's edge, hoping to share her beauty with others. One enchanting evening, she woke to find a group of friendly animals gathered around, eager to be friends and share in her magic.\",\n              \"annotations\": []\n            }\n          }\n    ResponseCreatedEvent:\n      type: object\n      description: |\n        An event that is emitted when a response is created.\n      properties:\n        type:\n          type: string\n          description: |\n            The type of the event. Always `response.created`.\n          enum:\n            - response.created\n          x-stainless-const: true\n        response:\n          $ref: '#/components/schemas/Response'\n          description: |\n            The response that was created.\n        sequence_number:\n          type: integer\n          description: The sequence number for this event.\n      required:\n        - type\n        - response\n        - sequence_number\n      x-oaiMeta:\n        name: response.created\n        group: responses\n        example: |\n          {\n            \"type\": \"response.created\",\n            \"response\": {\n              \"id\": \"resp_67ccfcdd16748190a91872c75d38539e09e4d4aac714747c\",\n              \"object\": \"response\",\n              \"created_at\": 1741487325,\n              \"status\": \"in_progress\",\n              \"error\": null,\n              \"incomplete_details\": null,\n              \"instructions\": null,\n              \"max_output_tokens\": null,\n              \"model\": \"gpt-4o-2024-08-06\",\n              \"output\": [],\n              \"parallel_tool_calls\": true,\n              \"previous_response_id\": null,\n              \"reasoning\": {\n                \"effort\": null,\n                \"summary\": null\n              },\n              \"store\": true,\n              \"temperature\": 1,\n              \"text\": {\n                \"format\": {\n                  \"type\": \"text\"\n                }\n              },\n              \"tool_choice\": \"auto\",\n              \"tools\": [],\n              \"top_p\": 1,\n              \"truncation\": \"disabled\",\n              \"usage\": null,\n              \"user\": null,\n              \"metadata\": {}\n            },\n            \"sequence_number\": 1\n          }\n    ResponseCustomToolCallInputDeltaEvent:\n      title: ResponseCustomToolCallInputDelta\n      type: object\n      description: |\n        Event representing a delta (partial update) to the input of a custom tool call.\n      properties:\n        type:\n          type: string\n          enum:\n            - response.custom_tool_call_input.delta\n          description: The event type identifier.\n          x-stainless-const: true\n        sequence_number:\n          type: integer\n          description: The sequence number of this event.\n        output_index:\n          type: integer\n          description: The index of the output this delta applies to.\n        item_id:\n          type: string\n          description: Unique identifier for the API item associated with this event.\n        delta:\n          type: string\n          description: The incremental input data (delta) for the custom tool call.\n      required:\n        - type\n        - output_index\n        - item_id\n        - delta\n        - sequence_number\n      x-oaiMeta:\n        name: response.custom_tool_call_input.delta\n        group: responses\n        example: |\n          {\n            \"type\": \"response.custom_tool_call_input.delta\",\n            \"output_index\": 0,\n            \"item_id\": \"ctc_1234567890abcdef\",\n            \"delta\": \"partial input text\"\n          }\n    ResponseCustomToolCallInputDoneEvent:\n      title: ResponseCustomToolCallInputDone\n      type: object\n      description: |\n        Event indicating that input for a custom tool call is complete.\n      properties:\n        type:\n          type: string\n          enum:\n            - response.custom_tool_call_input.done\n          description: The event type identifier.\n          x-stainless-const: true\n        sequence_number:\n          type: integer\n          description: The sequence number of this event.\n        output_index:\n          type: integer\n          description: The index of the output this event applies to.\n        item_id:\n          type: string\n          description: Unique identifier for the API item associated with this event.\n        input:\n          type: string\n          description: The complete input data for the custom tool call.\n      required:\n        - type\n        - output_index\n        - item_id\n        - input\n        - sequence_number\n      x-oaiMeta:\n        name: response.custom_tool_call_input.done\n        group: responses\n        example: |\n          {\n            \"type\": \"response.custom_tool_call_input.done\",\n            \"output_index\": 0,\n            \"item_id\": \"ctc_1234567890abcdef\",\n            \"input\": \"final complete input text\"\n          }\n    ResponseError:\n      type: object\n      description: |\n        An error object returned when the model fails to generate a Response.\n      nullable: true\n      properties:\n        code:\n          $ref: '#/components/schemas/ResponseErrorCode'\n        message:\n          type: string\n          description: |\n            A human-readable description of the error.\n      required:\n        - code\n        - message\n    ResponseErrorCode:\n      type: string\n      description: |\n        The error code for the response.\n      enum:\n        - server_error\n        - rate_limit_exceeded\n        - invalid_prompt\n        - vector_store_timeout\n        - invalid_image\n        - invalid_image_format\n        - invalid_base64_image\n        - invalid_image_url\n        - image_too_large\n        - image_too_small\n        - image_parse_error\n        - image_content_policy_violation\n        - invalid_image_mode\n        - image_file_too_large\n        - unsupported_image_media_type\n        - empty_image_file\n        - failed_to_download_image\n        - image_file_not_found\n    ResponseErrorEvent:\n      type: object\n      description: Emitted when an error occurs.\n      properties:\n        type:\n          type: string\n          description: |\n            The type of the event. Always `error`.\n          enum:\n            - error\n          x-stainless-const: true\n        code:\n          type: string\n          description: |\n            The error code.\n          nullable: true\n        message:\n          type: string\n          description: |\n            The error message.\n        param:\n          type: string\n          description: |\n            The error parameter.\n          nullable: true\n        sequence_number:\n          type: integer\n          description: The sequence number of this event.\n      required:\n        - type\n        - code\n        - message\n        - param\n        - sequence_number\n      x-oaiMeta:\n        name: error\n        group: responses\n        example: |\n          {\n            \"type\": \"error\",\n            \"code\": \"ERR_SOMETHING\",\n            \"message\": \"Something went wrong\",\n            \"param\": null,\n            \"sequence_number\": 1\n          }\n    ResponseFailedEvent:\n      type: object\n      description: |\n        An event that is emitted when a response fails.\n      properties:\n        type:\n          type: string\n          description: |\n            The type of the event. Always `response.failed`.\n          enum:\n            - response.failed\n          x-stainless-const: true\n        sequence_number:\n          type: integer\n          description: The sequence number of this event.\n        response:\n          $ref: '#/components/schemas/Response'\n          description: |\n            The response that failed.\n      required:\n        - type\n        - response\n        - sequence_number\n      x-oaiMeta:\n        name: response.failed\n        group: responses\n        example: |\n          {\n            \"type\": \"response.failed\",\n            \"response\": {\n              \"id\": \"resp_123\",\n              \"object\": \"response\",\n              \"created_at\": 1740855869,\n              \"status\": \"failed\",\n              \"error\": {\n                \"code\": \"server_error\",\n                \"message\": \"The model failed to generate a response.\"\n              },\n              \"incomplete_details\": null,\n              \"instructions\": null,\n              \"max_output_tokens\": null,\n              \"model\": \"gpt-4o-mini-2024-07-18\",\n              \"output\": [],\n              \"previous_response_id\": null,\n              \"reasoning_effort\": null,\n              \"store\": false,\n              \"temperature\": 1,\n              \"text\": {\n                \"format\": {\n                  \"type\": \"text\"\n                }\n              },\n              \"tool_choice\": \"auto\",\n              \"tools\": [],\n              \"top_p\": 1,\n              \"truncation\": \"disabled\",\n              \"usage\": null,\n              \"user\": null,\n              \"metadata\": {}\n            }\n          }\n    ResponseFileSearchCallCompletedEvent:\n      type: object\n      description: Emitted when a file search call is completed (results found).\n      properties:\n        type:\n          type: string\n          description: |\n            The type of the event. Always `response.file_search_call.completed`.\n          enum:\n            - response.file_search_call.completed\n          x-stainless-const: true\n        output_index:\n          type: integer\n          description: |\n            The index of the output item that the file search call is initiated.\n        item_id:\n          type: string\n          description: |\n            The ID of the output item that the file search call is initiated.\n        sequence_number:\n          type: integer\n          description: The sequence number of this event.\n      required:\n        - type\n        - output_index\n        - item_id\n        - sequence_number\n      x-oaiMeta:\n        name: response.file_search_call.completed\n        group: responses\n        example: |\n          {\n            \"type\": \"response.file_search_call.completed\",\n            \"output_index\": 0,\n            \"item_id\": \"fs_123\",\n            \"sequence_number\": 1\n          }\n    ResponseFileSearchCallInProgressEvent:\n      type: object\n      description: Emitted when a file search call is initiated.\n      properties:\n        type:\n          type: string\n          description: |\n            The type of the event. Always `response.file_search_call.in_progress`.\n          enum:\n            - response.file_search_call.in_progress\n          x-stainless-const: true\n        output_index:\n          type: integer\n          description: |\n            The index of the output item that the file search call is initiated.\n        item_id:\n          type: string\n          description: |\n            The ID of the output item that the file search call is initiated.\n        sequence_number:\n          type: integer\n          description: The sequence number of this event.\n      required:\n        - type\n        - output_index\n        - item_id\n        - sequence_number\n      x-oaiMeta:\n        name: response.file_search_call.in_progress\n        group: responses\n        example: |\n          {\n            \"type\": \"response.file_search_call.in_progress\",\n            \"output_index\": 0,\n            \"item_id\": \"fs_123\",\n            \"sequence_number\": 1\n          }\n    ResponseFileSearchCallSearchingEvent:\n      type: object\n      description: Emitted when a file search is currently searching.\n      properties:\n        type:\n          type: string\n          description: |\n            The type of the event. Always `response.file_search_call.searching`.\n          enum:\n            - response.file_search_call.searching\n          x-stainless-const: true\n        output_index:\n          type: integer\n          description: |\n            The index of the output item that the file search call is searching.\n        item_id:\n          type: string\n          description: |\n            The ID of the output item that the file search call is initiated.\n        sequence_number:\n          type: integer\n          description: The sequence number of this event.\n      required:\n        - type\n        - output_index\n        - item_id\n        - sequence_number\n      x-oaiMeta:\n        name: response.file_search_call.searching\n        group: responses\n        example: |\n          {\n            \"type\": \"response.file_search_call.searching\",\n            \"output_index\": 0,\n            \"item_id\": \"fs_123\",\n            \"sequence_number\": 1\n          }\n    ResponseFormatJsonObject:\n      type: object\n      title: JSON object\n      description: |\n        JSON object response format. An older method of generating JSON responses.\n        Using `json_schema` is recommended for models that support it. Note that the\n        model will not generate JSON without a system or user message instructing it\n        to do so.\n      properties:\n        type:\n          type: string\n          description: The type of response format being defined. Always `json_object`.\n          enum:\n            - json_object\n          x-stainless-const: true\n      required:\n        - type\n    ResponseFormatJsonSchema:\n      type: object\n      title: JSON schema\n      description: |\n        JSON Schema response format. Used to generate structured JSON responses.\n        Learn more about [Structured Outputs](https://platform.openai.com/docs/guides/structured-outputs).\n      properties:\n        type:\n          type: string\n          description: The type of response format being defined. Always `json_schema`.\n          enum:\n            - json_schema\n          x-stainless-const: true\n        json_schema:\n          type: object\n          title: JSON schema\n          description: |\n            Structured Outputs configuration options, including a JSON Schema.\n          properties:\n            description:\n              type: string\n              description: |\n                A description of what the response format is for, used by the model to\n                determine how to respond in the format.\n            name:\n              type: string\n              description: |\n                The name of the response format. Must be a-z, A-Z, 0-9, or contain\n                underscores and dashes, with a maximum length of 64.\n            schema:\n              $ref: '#/components/schemas/ResponseFormatJsonSchemaSchema'\n            strict:\n              type: boolean\n              nullable: true\n              default: false\n              description: |\n                Whether to enable strict schema adherence when generating the output.\n                If set to true, the model will always follow the exact schema defined\n                in the `schema` field. Only a subset of JSON Schema is supported when\n                `strict` is `true`. To learn more, read the [Structured Outputs\n                guide](https://platform.openai.com/docs/guides/structured-outputs).\n          required:\n            - name\n      required:\n        - type\n        - json_schema\n    ResponseFormatJsonSchemaSchema:\n      type: object\n      title: JSON schema\n      description: |\n        The schema for the response format, described as a JSON Schema object.\n        Learn how to build JSON schemas [here](https://json-schema.org/).\n      additionalProperties: true\n    ResponseFormatText:\n      type: object\n      title: Text\n      description: |\n        Default response format. Used to generate text responses.\n      properties:\n        type:\n          type: string\n          description: The type of response format being defined. Always `text`.\n          enum:\n            - text\n          x-stainless-const: true\n      required:\n        - type\n    ResponseFormatTextGrammar:\n      type: object\n      title: Text grammar\n      description: |\n        A custom grammar for the model to follow when generating text.\n        Learn more in the [custom grammars guide](https://platform.openai.com/docs/guides/custom-grammars).\n      properties:\n        type:\n          type: string\n          description: The type of response format being defined. Always `grammar`.\n          enum:\n            - grammar\n          x-stainless-const: true\n        grammar:\n          type: string\n          description: The custom grammar for the model to follow.\n      required:\n        - type\n        - grammar\n    ResponseFormatTextPython:\n      type: object\n      title: Python grammar\n      description: |\n        Configure the model to generate valid Python code. See the\n        [custom grammars guide](https://platform.openai.com/docs/guides/custom-grammars) for more details.\n      properties:\n        type:\n          type: string\n          description: The type of response format being defined. Always `python`.\n          enum:\n            - python\n          x-stainless-const: true\n      required:\n        - type\n    ResponseFunctionCallArgumentsDeltaEvent:\n      type: object\n      description: Emitted when there is a partial function-call arguments delta.\n      properties:\n        type:\n          type: string\n          description: |\n            The type of the event. Always `response.function_call_arguments.delta`.\n          enum:\n            - response.function_call_arguments.delta\n          x-stainless-const: true\n        item_id:\n          type: string\n          description: |\n            The ID of the output item that the function-call arguments delta is added to.\n        output_index:\n          type: integer\n          description: |\n            The index of the output item that the function-call arguments delta is added to.\n        sequence_number:\n          type: integer\n          description: The sequence number of this event.\n        delta:\n          type: string\n          description: |\n            The function-call arguments delta that is added.\n      required:\n        - type\n        - item_id\n        - output_index\n        - delta\n        - sequence_number\n      x-oaiMeta:\n        name: response.function_call_arguments.delta\n        group: responses\n        example: |\n          {\n            \"type\": \"response.function_call_arguments.delta\",\n            \"item_id\": \"item-abc\",\n            \"output_index\": 0,\n            \"delta\": \"{ \\\"arg\\\":\"\n            \"sequence_number\": 1\n          }\n    ResponseFunctionCallArgumentsDoneEvent:\n      type: object\n      description: Emitted when function-call arguments are finalized.\n      properties:\n        type:\n          type: string\n          enum:\n            - response.function_call_arguments.done\n          x-stainless-const: true\n        item_id:\n          type: string\n          description: The ID of the item.\n        output_index:\n          type: integer\n          description: The index of the output item.\n        sequence_number:\n          type: integer\n          description: The sequence number of this event.\n        arguments:\n          type: string\n          description: The function-call arguments.\n      required:\n        - type\n        - item_id\n        - output_index\n        - arguments\n        - sequence_number\n      x-oaiMeta:\n        name: response.function_call_arguments.done\n        group: responses\n        example: |\n          {\n            \"type\": \"response.function_call_arguments.done\",\n            \"item_id\": \"item-abc\",\n            \"output_index\": 1,\n            \"arguments\": \"{ \\\"arg\\\": 123 }\",\n            \"sequence_number\": 1\n          }\n    ResponseImageGenCallCompletedEvent:\n      type: object\n      title: ResponseImageGenCallCompletedEvent\n      description: |\n        Emitted when an image generation tool call has completed and the final image is available.\n      properties:\n        type:\n          type: string\n          enum:\n            - response.image_generation_call.completed\n          description: The type of the event. Always 'response.image_generation_call.completed'.\n          x-stainless-const: true\n        output_index:\n          type: integer\n          description: The index of the output item in the response's output array.\n        sequence_number:\n          type: integer\n          description: The sequence number of this event.\n        item_id:\n          type: string\n          description: The unique identifier of the image generation item being processed.\n      required:\n        - type\n        - output_index\n        - item_id\n        - sequence_number\n      x-oaiMeta:\n        name: response.image_generation_call.completed\n        group: responses\n        example: |\n          {\n            \"type\": \"response.image_generation_call.completed\",\n            \"output_index\": 0,\n            \"item_id\": \"item-123\",\n            \"sequence_number\": 1\n          }\n    ResponseImageGenCallGeneratingEvent:\n      type: object\n      title: ResponseImageGenCallGeneratingEvent\n      description: |\n        Emitted when an image generation tool call is actively generating an image (intermediate state).\n      properties:\n        type:\n          type: string\n          enum:\n            - response.image_generation_call.generating\n          description: The type of the event. Always 'response.image_generation_call.generating'.\n          x-stainless-const: true\n        output_index:\n          type: integer\n          description: The index of the output item in the response's output array.\n        item_id:\n          type: string\n          description: The unique identifier of the image generation item being processed.\n        sequence_number:\n          type: integer\n          description: The sequence number of the image generation item being processed.\n      required:\n        - type\n        - output_index\n        - item_id\n        - sequence_number\n      x-oaiMeta:\n        name: response.image_generation_call.generating\n        group: responses\n        example: |\n          {\n            \"type\": \"response.image_generation_call.generating\",\n            \"output_index\": 0,\n            \"item_id\": \"item-123\",\n            \"sequence_number\": 0\n          }\n    ResponseImageGenCallInProgressEvent:\n      type: object\n      title: ResponseImageGenCallInProgressEvent\n      description: |\n        Emitted when an image generation tool call is in progress.\n      properties:\n        type:\n          type: string\n          enum:\n            - response.image_generation_call.in_progress\n          description: The type of the event. Always 'response.image_generation_call.in_progress'.\n          x-stainless-const: true\n        output_index:\n          type: integer\n          description: The index of the output item in the response's output array.\n        item_id:\n          type: string\n          description: The unique identifier of the image generation item being processed.\n        sequence_number:\n          type: integer\n          description: The sequence number of the image generation item being processed.\n      required:\n        - type\n        - output_index\n        - item_id\n        - sequence_number\n      x-oaiMeta:\n        name: response.image_generation_call.in_progress\n        group: responses\n        example: |\n          {\n            \"type\": \"response.image_generation_call.in_progress\",\n            \"output_index\": 0,\n            \"item_id\": \"item-123\",\n            \"sequence_number\": 0\n          }\n    ResponseImageGenCallPartialImageEvent:\n      type: object\n      title: ResponseImageGenCallPartialImageEvent\n      description: |\n        Emitted when a partial image is available during image generation streaming.\n      properties:\n        type:\n          type: string\n          enum:\n            - response.image_generation_call.partial_image\n          description: The type of the event. Always 'response.image_generation_call.partial_image'.\n          x-stainless-const: true\n        output_index:\n          type: integer\n          description: The index of the output item in the response's output array.\n        item_id:\n          type: string\n          description: The unique identifier of the image generation item being processed.\n        sequence_number:\n          type: integer\n          description: The sequence number of the image generation item being processed.\n        partial_image_index:\n          type: integer\n          description: 0-based index for the partial image (backend is 1-based, but this is 0-based for the user).\n        partial_image_b64:\n          type: string\n          description: Base64-encoded partial image data, suitable for rendering as an image.\n      required:\n        - type\n        - output_index\n        - item_id\n        - sequence_number\n        - partial_image_index\n        - partial_image_b64\n      x-oaiMeta:\n        name: response.image_generation_call.partial_image\n        group: responses\n        example: |\n          {\n            \"type\": \"response.image_generation_call.partial_image\",\n            \"output_index\": 0,\n            \"item_id\": \"item-123\",\n            \"sequence_number\": 0,\n            \"partial_image_index\": 0,\n            \"partial_image_b64\": \"...\"\n          }\n    ResponseInProgressEvent:\n      type: object\n      description: Emitted when the response is in progress.\n      properties:\n        type:\n          type: string\n          description: |\n            The type of the event. Always `response.in_progress`.\n          enum:\n            - response.in_progress\n          x-stainless-const: true\n        response:\n          $ref: '#/components/schemas/Response'\n          description: |\n            The response that is in progress.\n        sequence_number:\n          type: integer\n          description: The sequence number of this event.\n      required:\n        - type\n        - response\n        - sequence_number\n      x-oaiMeta:\n        name: response.in_progress\n        group: responses\n        example: |\n          {\n            \"type\": \"response.in_progress\",\n            \"response\": {\n              \"id\": \"resp_67ccfcdd16748190a91872c75d38539e09e4d4aac714747c\",\n              \"object\": \"response\",\n              \"created_at\": 1741487325,\n              \"status\": \"in_progress\",\n              \"error\": null,\n              \"incomplete_details\": null,\n              \"instructions\": null,\n              \"max_output_tokens\": null,\n              \"model\": \"gpt-4o-2024-08-06\",\n              \"output\": [],\n              \"parallel_tool_calls\": true,\n              \"previous_response_id\": null,\n              \"reasoning\": {\n                \"effort\": null,\n                \"summary\": null\n              },\n              \"store\": true,\n              \"temperature\": 1,\n              \"text\": {\n                \"format\": {\n                  \"type\": \"text\"\n                }\n              },\n              \"tool_choice\": \"auto\",\n              \"tools\": [],\n              \"top_p\": 1,\n              \"truncation\": \"disabled\",\n              \"usage\": null,\n              \"user\": null,\n              \"metadata\": {}\n            },\n            \"sequence_number\": 1\n          }\n    ResponseIncompleteEvent:\n      type: object\n      description: |\n        An event that is emitted when a response finishes as incomplete.\n      properties:\n        type:\n          type: string\n          description: |\n            The type of the event. Always `response.incomplete`.\n          enum:\n            - response.incomplete\n          x-stainless-const: true\n        response:\n          $ref: '#/components/schemas/Response'\n          description: |\n            The response that was incomplete.\n        sequence_number:\n          type: integer\n          description: The sequence number of this event.\n      required:\n        - type\n        - response\n        - sequence_number\n      x-oaiMeta:\n        name: response.incomplete\n        group: responses\n        example: |\n          {\n            \"type\": \"response.incomplete\",\n            \"response\": {\n              \"id\": \"resp_123\",\n              \"object\": \"response\",\n              \"created_at\": 1740855869,\n              \"status\": \"incomplete\",\n              \"error\": null,\n              \"incomplete_details\": {\n                \"reason\": \"max_tokens\"\n              },\n              \"instructions\": null,\n              \"max_output_tokens\": null,\n              \"model\": \"gpt-4o-mini-2024-07-18\",\n              \"output\": [],\n              \"previous_response_id\": null,\n              \"reasoning_effort\": null,\n              \"store\": false,\n              \"temperature\": 1,\n              \"text\": {\n                \"format\": {\n                  \"type\": \"text\"\n                }\n              },\n              \"tool_choice\": \"auto\",\n              \"tools\": [],\n              \"top_p\": 1,\n              \"truncation\": \"disabled\",\n              \"usage\": null,\n              \"user\": null,\n              \"metadata\": {}\n            },\n            \"sequence_number\": 1\n          }\n    ResponseItemList:\n      type: object\n      description: A list of Response items.\n      properties:\n        object:\n          description: The type of object returned, must be `list`.\n          x-stainless-const: true\n          const: list\n        data:\n          type: array\n          description: A list of items used to generate this response.\n          items:\n            $ref: '#/components/schemas/ItemResource'\n        has_more:\n          type: boolean\n          description: Whether there are more items available.\n        first_id:\n          type: string\n          description: The ID of the first item in the list.\n        last_id:\n          type: string\n          description: The ID of the last item in the list.\n      required:\n        - object\n        - data\n        - has_more\n        - first_id\n        - last_id\n      x-oaiMeta:\n        name: The input item list\n        group: responses\n        example: |\n          {\n            \"object\": \"list\",\n            \"data\": [\n              {\n                \"id\": \"msg_abc123\",\n                \"type\": \"message\",\n                \"role\": \"user\",\n                \"content\": [\n                  {\n                    \"type\": \"input_text\",\n                    \"text\": \"Tell me a three sentence bedtime story about a unicorn.\"\n                  }\n                ]\n              }\n            ],\n            \"first_id\": \"msg_abc123\",\n            \"last_id\": \"msg_abc123\",\n            \"has_more\": false\n          }\n    ResponseLogProb:\n      type: object\n      description: |\n        A logprob is the logarithmic probability that the model assigns to producing\n        a particular token at a given position in the sequence. Less-negative (higher)\n        logprob values indicate greater model confidence in that token choice.\n      properties:\n        token:\n          description: A possible text token.\n          type: string\n        logprob:\n          description: |\n            The log probability of this token.\n          type: number\n        top_logprobs:\n          description: |\n            The log probability of the top 20 most likely tokens.\n          type: array\n          items:\n            type: object\n            properties:\n              token:\n                description: A possible text token.\n                type: string\n              logprob:\n                description: The log probability of this token.\n                type: number\n      required:\n        - token\n        - logprob\n    ResponseMCPCallArgumentsDeltaEvent:\n      type: object\n      title: ResponseMCPCallArgumentsDeltaEvent\n      description: |\n        Emitted when there is a delta (partial update) to the arguments of an MCP tool call.\n      properties:\n        type:\n          type: string\n          enum:\n            - response.mcp_call_arguments.delta\n          description: The type of the event. Always 'response.mcp_call_arguments.delta'.\n          x-stainless-const: true\n        output_index:\n          type: integer\n          description: The index of the output item in the response's output array.\n        item_id:\n          type: string\n          description: The unique identifier of the MCP tool call item being processed.\n        delta:\n          type: string\n          description: |\n            A JSON string containing the partial update to the arguments for the MCP tool call.\n        sequence_number:\n          type: integer\n          description: The sequence number of this event.\n      required:\n        - type\n        - output_index\n        - item_id\n        - delta\n        - sequence_number\n      x-oaiMeta:\n        name: response.mcp_call_arguments.delta\n        group: responses\n        example: |\n          {\n            \"type\": \"response.mcp_call_arguments.delta\",\n            \"output_index\": 0,\n            \"item_id\": \"item-abc\",\n            \"delta\": \"{\",\n            \"sequence_number\": 1\n          }\n    ResponseMCPCallArgumentsDoneEvent:\n      type: object\n      title: ResponseMCPCallArgumentsDoneEvent\n      description: |\n        Emitted when the arguments for an MCP tool call are finalized.\n      properties:\n        type:\n          type: string\n          enum:\n            - response.mcp_call_arguments.done\n          description: The type of the event. Always 'response.mcp_call_arguments.done'.\n          x-stainless-const: true\n        output_index:\n          type: integer\n          description: The index of the output item in the response's output array.\n        item_id:\n          type: string\n          description: The unique identifier of the MCP tool call item being processed.\n        arguments:\n          type: string\n          description: |\n            A JSON string containing the finalized arguments for the MCP tool call.\n        sequence_number:\n          type: integer\n          description: The sequence number of this event.\n      required:\n        - type\n        - output_index\n        - item_id\n        - arguments\n        - sequence_number\n      x-oaiMeta:\n        name: response.mcp_call_arguments.done\n        group: responses\n        example: |\n          {\n            \"type\": \"response.mcp_call_arguments.done\",\n            \"output_index\": 0,\n            \"item_id\": \"item-abc\",\n            \"arguments\": \"{\\\"arg1\\\": \\\"value1\\\", \\\"arg2\\\": \\\"value2\\\"}\",\n            \"sequence_number\": 1\n          }\n    ResponseMCPCallCompletedEvent:\n      type: object\n      title: ResponseMCPCallCompletedEvent\n      description: |\n        Emitted when an MCP  tool call has completed successfully.\n      properties:\n        type:\n          type: string\n          enum:\n            - response.mcp_call.completed\n          description: The type of the event. Always 'response.mcp_call.completed'.\n          x-stainless-const: true\n        item_id:\n          type: string\n          description: The ID of the MCP tool call item that completed.\n        output_index:\n          type: integer\n          description: The index of the output item that completed.\n        sequence_number:\n          type: integer\n          description: The sequence number of this event.\n      required:\n        - type\n        - item_id\n        - output_index\n        - sequence_number\n      x-oaiMeta:\n        name: response.mcp_call.completed\n        group: responses\n        example: |\n          {\n            \"type\": \"response.mcp_call.completed\",\n            \"sequence_number\": 1,\n            \"item_id\": \"mcp_682d437d90a88191bf88cd03aae0c3e503937d5f622d7a90\",\n            \"output_index\": 0\n          }\n    ResponseMCPCallFailedEvent:\n      type: object\n      title: ResponseMCPCallFailedEvent\n      description: |\n        Emitted when an MCP  tool call has failed.\n      properties:\n        type:\n          type: string\n          enum:\n            - response.mcp_call.failed\n          description: The type of the event. Always 'response.mcp_call.failed'.\n          x-stainless-const: true\n        item_id:\n          type: string\n          description: The ID of the MCP tool call item that failed.\n        output_index:\n          type: integer\n          description: The index of the output item that failed.\n        sequence_number:\n          type: integer\n          description: The sequence number of this event.\n      required:\n        - type\n        - item_id\n        - output_index\n        - sequence_number\n      x-oaiMeta:\n        name: response.mcp_call.failed\n        group: responses\n        example: |\n          {\n            \"type\": \"response.mcp_call.failed\",\n            \"sequence_number\": 1,\n            \"item_id\": \"mcp_682d437d90a88191bf88cd03aae0c3e503937d5f622d7a90\",\n            \"output_index\": 0\n          }\n    ResponseMCPCallInProgressEvent:\n      type: object\n      title: ResponseMCPCallInProgressEvent\n      description: |\n        Emitted when an MCP  tool call is in progress.\n      properties:\n        type:\n          type: string\n          enum:\n            - response.mcp_call.in_progress\n          description: The type of the event. Always 'response.mcp_call.in_progress'.\n          x-stainless-const: true\n        sequence_number:\n          type: integer\n          description: The sequence number of this event.\n        output_index:\n          type: integer\n          description: The index of the output item in the response's output array.\n        item_id:\n          type: string\n          description: The unique identifier of the MCP tool call item being processed.\n      required:\n        - type\n        - output_index\n        - item_id\n        - sequence_number\n      x-oaiMeta:\n        name: response.mcp_call.in_progress\n        group: responses\n        example: |\n          {\n            \"type\": \"response.mcp_call.in_progress\",\n            \"sequence_number\": 1,\n            \"output_index\": 0,\n            \"item_id\": \"mcp_682d437d90a88191bf88cd03aae0c3e503937d5f622d7a90\"\n          }\n    ResponseMCPListToolsCompletedEvent:\n      type: object\n      title: ResponseMCPListToolsCompletedEvent\n      description: |\n        Emitted when the list of available MCP tools has been successfully retrieved.\n      properties:\n        type:\n          type: string\n          enum:\n            - response.mcp_list_tools.completed\n          description: The type of the event. Always 'response.mcp_list_tools.completed'.\n          x-stainless-const: true\n        item_id:\n          type: string\n          description: The ID of the MCP tool call item that produced this output.\n        output_index:\n          type: integer\n          description: The index of the output item that was processed.\n        sequence_number:\n          type: integer\n          description: The sequence number of this event.\n      required:\n        - type\n        - item_id\n        - output_index\n        - sequence_number\n      x-oaiMeta:\n        name: response.mcp_list_tools.completed\n        group: responses\n        example: |\n          {\n            \"type\": \"response.mcp_list_tools.completed\",\n            \"sequence_number\": 1,\n            \"output_index\": 0,\n            \"item_id\": \"mcpl_682d4379df088191886b70f4ec39f90403937d5f622d7a90\"\n          }\n    ResponseMCPListToolsFailedEvent:\n      type: object\n      title: ResponseMCPListToolsFailedEvent\n      description: |\n        Emitted when the attempt to list available MCP tools has failed.\n      properties:\n        type:\n          type: string\n          enum:\n            - response.mcp_list_tools.failed\n          description: The type of the event. Always 'response.mcp_list_tools.failed'.\n          x-stainless-const: true\n        item_id:\n          type: string\n          description: The ID of the MCP tool call item that failed.\n        output_index:\n          type: integer\n          description: The index of the output item that failed.\n        sequence_number:\n          type: integer\n          description: The sequence number of this event.\n      required:\n        - type\n        - item_id\n        - output_index\n        - sequence_number\n      x-oaiMeta:\n        name: response.mcp_list_tools.failed\n        group: responses\n        example: |\n          {\n            \"type\": \"response.mcp_list_tools.failed\",\n            \"sequence_number\": 1,\n            \"output_index\": 0,\n            \"item_id\": \"mcpl_682d4379df088191886b70f4ec39f90403937d5f622d7a90\"\n          }\n    ResponseMCPListToolsInProgressEvent:\n      type: object\n      title: ResponseMCPListToolsInProgressEvent\n      description: |\n        Emitted when the system is in the process of retrieving the list of available MCP tools.\n      properties:\n        type:\n          type: string\n          enum:\n            - response.mcp_list_tools.in_progress\n          description: The type of the event. Always 'response.mcp_list_tools.in_progress'.\n          x-stainless-const: true\n        item_id:\n          type: string\n          description: The ID of the MCP tool call item that is being processed.\n        output_index:\n          type: integer\n          description: The index of the output item that is being processed.\n        sequence_number:\n          type: integer\n          description: The sequence number of this event.\n      required:\n        - type\n        - item_id\n        - output_index\n        - sequence_number\n      x-oaiMeta:\n        name: response.mcp_list_tools.in_progress\n        group: responses\n        example: |\n          {\n            \"type\": \"response.mcp_list_tools.in_progress\",\n            \"sequence_number\": 1,\n            \"output_index\": 0,\n            \"item_id\": \"mcpl_682d4379df088191886b70f4ec39f90403937d5f622d7a90\"\n          }\n    ResponseModalities:\n      type: array\n      nullable: true\n      description: |\n        Output types that you would like the model to generate.\n        Most models are capable of generating text, which is the default:\n\n        `[\"text\"]`\n\n        The `gpt-4o-audio-preview` model can also be used to\n        [generate audio](https://platform.openai.com/docs/guides/audio). To request that this model generate\n        both text and audio responses, you can use:\n\n        `[\"text\", \"audio\"]`\n      items:\n        type: string\n        enum:\n          - text\n          - audio\n    ResponseOutputItemAddedEvent:\n      type: object\n      description: Emitted when a new output item is added.\n      properties:\n        type:\n          type: string\n          description: |\n            The type of the event. Always `response.output_item.added`.\n          enum:\n            - response.output_item.added\n          x-stainless-const: true\n        output_index:\n          type: integer\n          description: |\n            The index of the output item that was added.\n        sequence_number:\n          type: integer\n          description: |\n            The sequence number of this event.\n        item:\n          $ref: '#/components/schemas/OutputItem'\n          description: |\n            The output item that was added.\n      required:\n        - type\n        - output_index\n        - item\n        - sequence_number\n      x-oaiMeta:\n        name: response.output_item.added\n        group: responses\n        example: |\n          {\n            \"type\": \"response.output_item.added\",\n            \"output_index\": 0,\n            \"item\": {\n              \"id\": \"msg_123\",\n              \"status\": \"in_progress\",\n              \"type\": \"message\",\n              \"role\": \"assistant\",\n              \"content\": []\n            },\n            \"sequence_number\": 1\n          }\n    ResponseOutputItemDoneEvent:\n      type: object\n      description: Emitted when an output item is marked done.\n      properties:\n        type:\n          type: string\n          description: |\n            The type of the event. Always `response.output_item.done`.\n          enum:\n            - response.output_item.done\n          x-stainless-const: true\n        output_index:\n          type: integer\n          description: |\n            The index of the output item that was marked done.\n        sequence_number:\n          type: integer\n          description: |\n            The sequence number of this event.\n        item:\n          $ref: '#/components/schemas/OutputItem'\n          description: |\n            The output item that was marked done.\n      required:\n        - type\n        - output_index\n        - item\n        - sequence_number\n      x-oaiMeta:\n        name: response.output_item.done\n        group: responses\n        example: |\n          {\n            \"type\": \"response.output_item.done\",\n            \"output_index\": 0,\n            \"item\": {\n              \"id\": \"msg_123\",\n              \"status\": \"completed\",\n              \"type\": \"message\",\n              \"role\": \"assistant\",\n              \"content\": [\n                {\n                  \"type\": \"output_text\",\n                  \"text\": \"In a shimmering forest under a sky full of stars, a lonely unicorn named Lila discovered a hidden pond that glowed with moonlight. Every night, she would leave sparkling, magical flowers by the water's edge, hoping to share her beauty with others. One enchanting evening, she woke to find a group of friendly animals gathered around, eager to be friends and share in her magic.\",\n                  \"annotations\": []\n                }\n              ]\n            },\n            \"sequence_number\": 1\n          }\n    ResponseOutputTextAnnotationAddedEvent:\n      type: object\n      title: ResponseOutputTextAnnotationAddedEvent\n      description: |\n        Emitted when an annotation is added to output text content.\n      properties:\n        type:\n          type: string\n          enum:\n            - response.output_text.annotation.added\n          description: The type of the event. Always 'response.output_text.annotation.added'.\n          x-stainless-const: true\n        item_id:\n          type: string\n          description: The unique identifier of the item to which the annotation is being added.\n        output_index:\n          type: integer\n          description: The index of the output item in the response's output array.\n        content_index:\n          type: integer\n          description: The index of the content part within the output item.\n        annotation_index:\n          type: integer\n          description: The index of the annotation within the content part.\n        sequence_number:\n          type: integer\n          description: The sequence number of this event.\n        annotation:\n          type: object\n          description: The annotation object being added. (See annotation schema for details.)\n      required:\n        - type\n        - item_id\n        - output_index\n        - content_index\n        - annotation_index\n        - annotation\n        - sequence_number\n      x-oaiMeta:\n        name: response.output_text.annotation.added\n        group: responses\n        example: |\n          {\n            \"type\": \"response.output_text.annotation.added\",\n            \"item_id\": \"item-abc\",\n            \"output_index\": 0,\n            \"content_index\": 0,\n            \"annotation_index\": 0,\n            \"annotation\": {\n              \"type\": \"text_annotation\",\n              \"text\": \"This is a test annotation\",\n              \"start\": 0,\n              \"end\": 10\n            },\n            \"sequence_number\": 1\n          }\n    ResponsePromptVariables:\n      type: object\n      title: Prompt Variables\n      description: |\n        Optional map of values to substitute in for variables in your\n        prompt. The substitution values can either be strings, or other\n        Response input types like images or files.\n      x-oaiExpandable: true\n      x-oaiTypeLabel: map\n      nullable: true\n      additionalProperties:\n        x-oaiExpandable: true\n        x-oaiTypeLabel: map\n        anyOf:\n          - type: string\n          - $ref: '#/components/schemas/InputTextContent'\n          - $ref: '#/components/schemas/InputImageContent'\n          - $ref: '#/components/schemas/InputFileContent'\n    ResponseProperties:\n      type: object\n      properties:\n        previous_response_id:\n          type: string\n          description: |\n            The unique ID of the previous response to the model. Use this to\n            create multi-turn conversations. Learn more about\n            [conversation state](https://platform.openai.com/docs/guides/conversation-state).\n          nullable: true\n        model:\n          description: >\n            Model ID used to generate the response, like `gpt-4o` or `o3`. OpenAI\n\n            offers a wide range of models with different capabilities, performance\n\n            characteristics, and price points. Refer to the [model\n            guide](https://platform.openai.com/docs/models)\n\n            to browse and compare available models.\n          $ref: '#/components/schemas/ModelIdsResponses'\n        reasoning:\n          $ref: '#/components/schemas/Reasoning'\n          nullable: true\n        background:\n          type: boolean\n          description: |\n            Whether to run the model response in the background.\n            [Learn more](https://platform.openai.com/docs/guides/background).\n          default: false\n          nullable: true\n        max_output_tokens:\n          description: >\n            An upper bound for the number of tokens that can be generated for a response, including visible\n            output tokens and [reasoning tokens](https://platform.openai.com/docs/guides/reasoning).\n          type: integer\n          nullable: true\n        max_tool_calls:\n          description: >\n            The maximum number of total calls to built-in tools that can be processed in a response. This\n            maximum number applies across all built-in tool calls, not per individual tool. Any further\n            attempts to call a tool by the model will be ignored.\n          type: integer\n          nullable: true\n        text:\n          type: object\n          description: |\n            Configuration options for a text response from the model. Can be plain\n            text or structured JSON data. Learn more:\n            - [Text inputs and outputs](https://platform.openai.com/docs/guides/text)\n            - [Structured Outputs](https://platform.openai.com/docs/guides/structured-outputs)\n          properties:\n            format:\n              $ref: '#/components/schemas/TextResponseFormatConfiguration'\n            verbosity:\n              $ref: '#/components/schemas/Verbosity'\n        tools:\n          type: array\n          description: |\n            An array of tools the model may call while generating a response. You\n            can specify which tool to use by setting the `tool_choice` parameter.\n\n            The two categories of tools you can provide the model are:\n\n            - **Built-in tools**: Tools that are provided by OpenAI that extend the\n              model's capabilities, like [web search](https://platform.openai.com/docs/guides/tools-web-search)\n              or [file search](https://platform.openai.com/docs/guides/tools-file-search). Learn more about\n              [built-in tools](https://platform.openai.com/docs/guides/tools).\n            - **Function calls (custom tools)**: Functions that are defined by you,\n              enabling the model to call your own code with strongly typed arguments\n              and outputs. Learn more about\n              [function calling](https://platform.openai.com/docs/guides/function-calling). You can also use\n              custom tools to call your own code.\n          items:\n            $ref: '#/components/schemas/Tool'\n        tool_choice:\n          description: |\n            How the model should select which tool (or tools) to use when generating\n            a response. See the `tools` parameter to see how to specify which tools\n            the model can call.\n          anyOf:\n            - $ref: '#/components/schemas/ToolChoiceOptions'\n            - $ref: '#/components/schemas/ToolChoiceAllowed'\n            - $ref: '#/components/schemas/ToolChoiceTypes'\n            - $ref: '#/components/schemas/ToolChoiceFunction'\n            - $ref: '#/components/schemas/ToolChoiceMCP'\n            - $ref: '#/components/schemas/ToolChoiceCustom'\n        prompt:\n          $ref: '#/components/schemas/Prompt'\n        truncation:\n          type: string\n          description: |\n            The truncation strategy to use for the model response.\n            - `auto`: If the context of this response and previous ones exceeds\n              the model's context window size, the model will truncate the\n              response to fit the context window by dropping input items in the\n              middle of the conversation.\n            - `disabled` (default): If a model response will exceed the context window\n              size for a model, the request will fail with a 400 error.\n          enum:\n            - auto\n            - disabled\n          nullable: true\n          default: disabled\n    ResponseQueuedEvent:\n      type: object\n      title: ResponseQueuedEvent\n      description: |\n        Emitted when a response is queued and waiting to be processed.\n      properties:\n        type:\n          type: string\n          enum:\n            - response.queued\n          description: The type of the event. Always 'response.queued'.\n          x-stainless-const: true\n        response:\n          $ref: '#/components/schemas/Response'\n          description: The full response object that is queued.\n        sequence_number:\n          type: integer\n          description: The sequence number for this event.\n      required:\n        - type\n        - response\n        - sequence_number\n      x-oaiMeta:\n        name: response.queued\n        group: responses\n        example: |\n          {\n            \"type\": \"response.queued\",\n            \"response\": {\n              \"id\": \"res_123\",\n              \"status\": \"queued\",\n              \"created_at\": \"2021-01-01T00:00:00Z\",\n              \"updated_at\": \"2021-01-01T00:00:00Z\"\n            },\n            \"sequence_number\": 1\n          }\n    ResponseReasoningSummaryPartAddedEvent:\n      type: object\n      description: Emitted when a new reasoning summary part is added.\n      properties:\n        type:\n          type: string\n          description: |\n            The type of the event. Always `response.reasoning_summary_part.added`.\n          enum:\n            - response.reasoning_summary_part.added\n          x-stainless-const: true\n        item_id:\n          type: string\n          description: |\n            The ID of the item this summary part is associated with.\n        output_index:\n          type: integer\n          description: |\n            The index of the output item this summary part is associated with.\n        summary_index:\n          type: integer\n          description: |\n            The index of the summary part within the reasoning summary.\n        sequence_number:\n          type: integer\n          description: |\n            The sequence number of this event.\n        part:\n          type: object\n          description: |\n            The summary part that was added.\n          properties:\n            type:\n              type: string\n              description: The type of the summary part. Always `summary_text`.\n              enum:\n                - summary_text\n              x-stainless-const: true\n            text:\n              type: string\n              description: The text of the summary part.\n          required:\n            - type\n            - text\n      required:\n        - type\n        - item_id\n        - output_index\n        - summary_index\n        - part\n        - sequence_number\n      x-oaiMeta:\n        name: response.reasoning_summary_part.added\n        group: responses\n        example: |\n          {\n            \"type\": \"response.reasoning_summary_part.added\",\n            \"item_id\": \"rs_6806bfca0b2481918a5748308061a2600d3ce51bdffd5476\",\n            \"output_index\": 0,\n            \"summary_index\": 0,\n            \"part\": {\n              \"type\": \"summary_text\",\n              \"text\": \"\"\n            },\n            \"sequence_number\": 1\n          }\n    ResponseReasoningSummaryPartDoneEvent:\n      type: object\n      description: Emitted when a reasoning summary part is completed.\n      properties:\n        type:\n          type: string\n          description: |\n            The type of the event. Always `response.reasoning_summary_part.done`.\n          enum:\n            - response.reasoning_summary_part.done\n          x-stainless-const: true\n        item_id:\n          type: string\n          description: |\n            The ID of the item this summary part is associated with.\n        output_index:\n          type: integer\n          description: |\n            The index of the output item this summary part is associated with.\n        summary_index:\n          type: integer\n          description: |\n            The index of the summary part within the reasoning summary.\n        sequence_number:\n          type: integer\n          description: |\n            The sequence number of this event.\n        part:\n          type: object\n          description: |\n            The completed summary part.\n          properties:\n            type:\n              type: string\n              description: The type of the summary part. Always `summary_text`.\n              enum:\n                - summary_text\n              x-stainless-const: true\n            text:\n              type: string\n              description: The text of the summary part.\n          required:\n            - type\n            - text\n      required:\n        - type\n        - item_id\n        - output_index\n        - summary_index\n        - part\n        - sequence_number\n      x-oaiMeta:\n        name: response.reasoning_summary_part.done\n        group: responses\n        example: |\n          {\n            \"type\": \"response.reasoning_summary_part.done\",\n            \"item_id\": \"rs_6806bfca0b2481918a5748308061a2600d3ce51bdffd5476\",\n            \"output_index\": 0,\n            \"summary_index\": 0,\n            \"part\": {\n              \"type\": \"summary_text\",\n              \"text\": \"**Responding to a greeting**\\n\\nThe user just said, \\\"Hello!\\\" So, it seems I need to engage. I'll greet them back and offer help since they're looking to chat. I could say something like, \\\"Hello! How can I assist you today?\\\" That feels friendly and open. They didn't ask a specific question, so this approach will work well for starting a conversation. Let's see where it goes from there!\"\n            },\n            \"sequence_number\": 1\n          }\n    ResponseReasoningSummaryTextDeltaEvent:\n      type: object\n      description: Emitted when a delta is added to a reasoning summary text.\n      properties:\n        type:\n          type: string\n          description: |\n            The type of the event. Always `response.reasoning_summary_text.delta`.\n          enum:\n            - response.reasoning_summary_text.delta\n          x-stainless-const: true\n        item_id:\n          type: string\n          description: |\n            The ID of the item this summary text delta is associated with.\n        output_index:\n          type: integer\n          description: |\n            The index of the output item this summary text delta is associated with.\n        summary_index:\n          type: integer\n          description: |\n            The index of the summary part within the reasoning summary.\n        delta:\n          type: string\n          description: |\n            The text delta that was added to the summary.\n        sequence_number:\n          type: integer\n          description: |\n            The sequence number of this event.\n      required:\n        - type\n        - item_id\n        - output_index\n        - summary_index\n        - delta\n        - sequence_number\n      x-oaiMeta:\n        name: response.reasoning_summary_text.delta\n        group: responses\n        example: |\n          {\n            \"type\": \"response.reasoning_summary_text.delta\",\n            \"item_id\": \"rs_6806bfca0b2481918a5748308061a2600d3ce51bdffd5476\",\n            \"output_index\": 0,\n            \"summary_index\": 0,\n            \"delta\": \"**Responding to a greeting**\\n\\nThe user just said, \\\"Hello!\\\" So, it seems I need to engage. I'll greet them back and offer help since they're looking to chat. I could say something like, \\\"Hello! How can I assist you today?\\\" That feels friendly and open. They didn't ask a specific question, so this approach will work well for starting a conversation. Let's see where it goes from there!\",\n            \"sequence_number\": 1\n          }\n    ResponseReasoningSummaryTextDoneEvent:\n      type: object\n      description: Emitted when a reasoning summary text is completed.\n      properties:\n        type:\n          type: string\n          description: |\n            The type of the event. Always `response.reasoning_summary_text.done`.\n          enum:\n            - response.reasoning_summary_text.done\n          x-stainless-const: true\n        item_id:\n          type: string\n          description: |\n            The ID of the item this summary text is associated with.\n        output_index:\n          type: integer\n          description: |\n            The index of the output item this summary text is associated with.\n        summary_index:\n          type: integer\n          description: |\n            The index of the summary part within the reasoning summary.\n        text:\n          type: string\n          description: |\n            The full text of the completed reasoning summary.\n        sequence_number:\n          type: integer\n          description: |\n            The sequence number of this event.\n      required:\n        - type\n        - item_id\n        - output_index\n        - summary_index\n        - text\n        - sequence_number\n      x-oaiMeta:\n        name: response.reasoning_summary_text.done\n        group: responses\n        example: |\n          {\n            \"type\": \"response.reasoning_summary_text.done\",\n            \"item_id\": \"rs_6806bfca0b2481918a5748308061a2600d3ce51bdffd5476\",\n            \"output_index\": 0,\n            \"summary_index\": 0,\n            \"text\": \"**Responding to a greeting**\\n\\nThe user just said, \\\"Hello!\\\" So, it seems I need to engage. I'll greet them back and offer help since they're looking to chat. I could say something like, \\\"Hello! How can I assist you today?\\\" That feels friendly and open. They didn't ask a specific question, so this approach will work well for starting a conversation. Let's see where it goes from there!\",\n            \"sequence_number\": 1\n          }\n    ResponseReasoningTextDeltaEvent:\n      type: object\n      description: Emitted when a delta is added to a reasoning text.\n      properties:\n        type:\n          type: string\n          description: |\n            The type of the event. Always `response.reasoning_text.delta`.\n          enum:\n            - response.reasoning_text.delta\n          x-stainless-const: true\n        item_id:\n          type: string\n          description: |\n            The ID of the item this reasoning text delta is associated with.\n        output_index:\n          type: integer\n          description: |\n            The index of the output item this reasoning text delta is associated with.\n        content_index:\n          type: integer\n          description: |\n            The index of the reasoning content part this delta is associated with.\n        delta:\n          type: string\n          description: |\n            The text delta that was added to the reasoning content.\n        sequence_number:\n          type: integer\n          description: |\n            The sequence number of this event.\n      required:\n        - type\n        - item_id\n        - output_index\n        - content_index\n        - delta\n        - sequence_number\n      x-oaiMeta:\n        name: response.reasoning_text.delta\n        group: responses\n        example: |\n          {\n            \"type\": \"response.reasoning_text.delta\",\n            \"item_id\": \"rs_123\",\n            \"output_index\": 0,\n            \"content_index\": 0,\n            \"delta\": \"The\",\n            \"sequence_number\": 1\n          }\n    ResponseReasoningTextDoneEvent:\n      type: object\n      description: Emitted when a reasoning text is completed.\n      properties:\n        type:\n          type: string\n          description: |\n            The type of the event. Always `response.reasoning_text.done`.\n          enum:\n            - response.reasoning_text.done\n          x-stainless-const: true\n        item_id:\n          type: string\n          description: |\n            The ID of the item this reasoning text is associated with.\n        output_index:\n          type: integer\n          description: |\n            The index of the output item this reasoning text is associated with.\n        content_index:\n          type: integer\n          description: |\n            The index of the reasoning content part.\n        text:\n          type: string\n          description: |\n            The full text of the completed reasoning content.\n        sequence_number:\n          type: integer\n          description: |\n            The sequence number of this event.\n      required:\n        - type\n        - item_id\n        - output_index\n        - content_index\n        - text\n        - sequence_number\n      x-oaiMeta:\n        name: response.reasoning_text.done\n        group: responses\n        example: |\n          {\n            \"type\": \"response.reasoning_text.done\",\n            \"item_id\": \"rs_123\",\n            \"output_index\": 0,\n            \"content_index\": 0,\n            \"text\": \"The user is asking...\",\n            \"sequence_number\": 4\n          }\n    ResponseRefusalDeltaEvent:\n      type: object\n      description: Emitted when there is a partial refusal text.\n      properties:\n        type:\n          type: string\n          description: |\n            The type of the event. Always `response.refusal.delta`.\n          enum:\n            - response.refusal.delta\n          x-stainless-const: true\n        item_id:\n          type: string\n          description: |\n            The ID of the output item that the refusal text is added to.\n        output_index:\n          type: integer\n          description: |\n            The index of the output item that the refusal text is added to.\n        content_index:\n          type: integer\n          description: |\n            The index of the content part that the refusal text is added to.\n        delta:\n          type: string\n          description: |\n            The refusal text that is added.\n        sequence_number:\n          type: integer\n          description: |\n            The sequence number of this event.\n      required:\n        - type\n        - item_id\n        - output_index\n        - content_index\n        - delta\n        - sequence_number\n      x-oaiMeta:\n        name: response.refusal.delta\n        group: responses\n        example: |\n          {\n            \"type\": \"response.refusal.delta\",\n            \"item_id\": \"msg_123\",\n            \"output_index\": 0,\n            \"content_index\": 0,\n            \"delta\": \"refusal text so far\",\n            \"sequence_number\": 1\n          }\n    ResponseRefusalDoneEvent:\n      type: object\n      description: Emitted when refusal text is finalized.\n      properties:\n        type:\n          type: string\n          description: |\n            The type of the event. Always `response.refusal.done`.\n          enum:\n            - response.refusal.done\n          x-stainless-const: true\n        item_id:\n          type: string\n          description: |\n            The ID of the output item that the refusal text is finalized.\n        output_index:\n          type: integer\n          description: |\n            The index of the output item that the refusal text is finalized.\n        content_index:\n          type: integer\n          description: |\n            The index of the content part that the refusal text is finalized.\n        refusal:\n          type: string\n          description: |\n            The refusal text that is finalized.\n        sequence_number:\n          type: integer\n          description: |\n            The sequence number of this event.\n      required:\n        - type\n        - item_id\n        - output_index\n        - content_index\n        - refusal\n        - sequence_number\n      x-oaiMeta:\n        name: response.refusal.done\n        group: responses\n        example: |\n          {\n            \"type\": \"response.refusal.done\",\n            \"item_id\": \"item-abc\",\n            \"output_index\": 1,\n            \"content_index\": 2,\n            \"refusal\": \"final refusal text\",\n            \"sequence_number\": 1\n          }\n    ResponseStreamEvent:\n      anyOf:\n        - $ref: '#/components/schemas/ResponseAudioDeltaEvent'\n        - $ref: '#/components/schemas/ResponseAudioDoneEvent'\n        - $ref: '#/components/schemas/ResponseAudioTranscriptDeltaEvent'\n        - $ref: '#/components/schemas/ResponseAudioTranscriptDoneEvent'\n        - $ref: '#/components/schemas/ResponseCodeInterpreterCallCodeDeltaEvent'\n        - $ref: '#/components/schemas/ResponseCodeInterpreterCallCodeDoneEvent'\n        - $ref: '#/components/schemas/ResponseCodeInterpreterCallCompletedEvent'\n        - $ref: '#/components/schemas/ResponseCodeInterpreterCallInProgressEvent'\n        - $ref: '#/components/schemas/ResponseCodeInterpreterCallInterpretingEvent'\n        - $ref: '#/components/schemas/ResponseCompletedEvent'\n        - $ref: '#/components/schemas/ResponseContentPartAddedEvent'\n        - $ref: '#/components/schemas/ResponseContentPartDoneEvent'\n        - $ref: '#/components/schemas/ResponseCreatedEvent'\n        - $ref: '#/components/schemas/ResponseErrorEvent'\n        - $ref: '#/components/schemas/ResponseFileSearchCallCompletedEvent'\n        - $ref: '#/components/schemas/ResponseFileSearchCallInProgressEvent'\n        - $ref: '#/components/schemas/ResponseFileSearchCallSearchingEvent'\n        - $ref: '#/components/schemas/ResponseFunctionCallArgumentsDeltaEvent'\n        - $ref: '#/components/schemas/ResponseFunctionCallArgumentsDoneEvent'\n        - $ref: '#/components/schemas/ResponseInProgressEvent'\n        - $ref: '#/components/schemas/ResponseFailedEvent'\n        - $ref: '#/components/schemas/ResponseIncompleteEvent'\n        - $ref: '#/components/schemas/ResponseOutputItemAddedEvent'\n        - $ref: '#/components/schemas/ResponseOutputItemDoneEvent'\n        - $ref: '#/components/schemas/ResponseReasoningSummaryPartAddedEvent'\n        - $ref: '#/components/schemas/ResponseReasoningSummaryPartDoneEvent'\n        - $ref: '#/components/schemas/ResponseReasoningSummaryTextDeltaEvent'\n        - $ref: '#/components/schemas/ResponseReasoningSummaryTextDoneEvent'\n        - $ref: '#/components/schemas/ResponseReasoningTextDeltaEvent'\n        - $ref: '#/components/schemas/ResponseReasoningTextDoneEvent'\n        - $ref: '#/components/schemas/ResponseRefusalDeltaEvent'\n        - $ref: '#/components/schemas/ResponseRefusalDoneEvent'\n        - $ref: '#/components/schemas/ResponseTextDeltaEvent'\n        - $ref: '#/components/schemas/ResponseTextDoneEvent'\n        - $ref: '#/components/schemas/ResponseWebSearchCallCompletedEvent'\n        - $ref: '#/components/schemas/ResponseWebSearchCallInProgressEvent'\n        - $ref: '#/components/schemas/ResponseWebSearchCallSearchingEvent'\n        - $ref: '#/components/schemas/ResponseImageGenCallCompletedEvent'\n        - $ref: '#/components/schemas/ResponseImageGenCallGeneratingEvent'\n        - $ref: '#/components/schemas/ResponseImageGenCallInProgressEvent'\n        - $ref: '#/components/schemas/ResponseImageGenCallPartialImageEvent'\n        - $ref: '#/components/schemas/ResponseMCPCallArgumentsDeltaEvent'\n        - $ref: '#/components/schemas/ResponseMCPCallArgumentsDoneEvent'\n        - $ref: '#/components/schemas/ResponseMCPCallCompletedEvent'\n        - $ref: '#/components/schemas/ResponseMCPCallFailedEvent'\n        - $ref: '#/components/schemas/ResponseMCPCallInProgressEvent'\n        - $ref: '#/components/schemas/ResponseMCPListToolsCompletedEvent'\n        - $ref: '#/components/schemas/ResponseMCPListToolsFailedEvent'\n        - $ref: '#/components/schemas/ResponseMCPListToolsInProgressEvent'\n        - $ref: '#/components/schemas/ResponseOutputTextAnnotationAddedEvent'\n        - $ref: '#/components/schemas/ResponseQueuedEvent'\n        - $ref: '#/components/schemas/ResponseCustomToolCallInputDeltaEvent'\n        - $ref: '#/components/schemas/ResponseCustomToolCallInputDoneEvent'\n      discriminator:\n        propertyName: type\n    ResponseStreamOptions:\n      description: |\n        Options for streaming responses. Only set this when you set `stream: true`.\n      type: object\n      nullable: true\n      default: null\n      properties:\n        include_obfuscation:\n          type: boolean\n          description: |\n            When true, stream obfuscation will be enabled. Stream obfuscation adds\n            random characters to an `obfuscation` field on streaming delta events to\n            normalize payload sizes as a mitigation to certain side-channel attacks.\n            These obfuscation fields are included by default, but add a small amount\n            of overhead to the data stream. You can set `include_obfuscation` to\n            false to optimize for bandwidth if you trust the network links between\n            your application and the OpenAI API.\n    ResponseTextDeltaEvent:\n      type: object\n      description: Emitted when there is an additional text delta.\n      properties:\n        type:\n          type: string\n          description: |\n            The type of the event. Always `response.output_text.delta`.\n          enum:\n            - response.output_text.delta\n          x-stainless-const: true\n        item_id:\n          type: string\n          description: |\n            The ID of the output item that the text delta was added to.\n        output_index:\n          type: integer\n          description: |\n            The index of the output item that the text delta was added to.\n        content_index:\n          type: integer\n          description: |\n            The index of the content part that the text delta was added to.\n        delta:\n          type: string\n          description: |\n            The text delta that was added.\n        sequence_number:\n          type: integer\n          description: The sequence number for this event.\n        logprobs:\n          type: array\n          description: |\n            The log probabilities of the tokens in the delta.\n          items:\n            $ref: '#/components/schemas/ResponseLogProb'\n      required:\n        - type\n        - item_id\n        - output_index\n        - content_index\n        - delta\n        - sequence_number\n        - logprobs\n      x-oaiMeta:\n        name: response.output_text.delta\n        group: responses\n        example: |\n          {\n            \"type\": \"response.output_text.delta\",\n            \"item_id\": \"msg_123\",\n            \"output_index\": 0,\n            \"content_index\": 0,\n            \"delta\": \"In\",\n            \"sequence_number\": 1\n          }\n    ResponseTextDoneEvent:\n      type: object\n      description: Emitted when text content is finalized.\n      properties:\n        type:\n          type: string\n          description: |\n            The type of the event. Always `response.output_text.done`.\n          enum:\n            - response.output_text.done\n          x-stainless-const: true\n        item_id:\n          type: string\n          description: |\n            The ID of the output item that the text content is finalized.\n        output_index:\n          type: integer\n          description: |\n            The index of the output item that the text content is finalized.\n        content_index:\n          type: integer\n          description: |\n            The index of the content part that the text content is finalized.\n        text:\n          type: string\n          description: |\n            The text content that is finalized.\n        sequence_number:\n          type: integer\n          description: The sequence number for this event.\n        logprobs:\n          type: array\n          description: |\n            The log probabilities of the tokens in the delta.\n          items:\n            $ref: '#/components/schemas/ResponseLogProb'\n      required:\n        - type\n        - item_id\n        - output_index\n        - content_index\n        - text\n        - sequence_number\n        - logprobs\n      x-oaiMeta:\n        name: response.output_text.done\n        group: responses\n        example: |\n          {\n            \"type\": \"response.output_text.done\",\n            \"item_id\": \"msg_123\",\n            \"output_index\": 0,\n            \"content_index\": 0,\n            \"text\": \"In a shimmering forest under a sky full of stars, a lonely unicorn named Lila discovered a hidden pond that glowed with moonlight. Every night, she would leave sparkling, magical flowers by the water's edge, hoping to share her beauty with others. One enchanting evening, she woke to find a group of friendly animals gathered around, eager to be friends and share in her magic.\",\n            \"sequence_number\": 1\n          }\n    ResponseUsage:\n      type: object\n      description: |\n        Represents token usage details including input tokens, output tokens,\n        a breakdown of output tokens, and the total tokens used.\n      properties:\n        input_tokens:\n          type: integer\n          description: The number of input tokens.\n        input_tokens_details:\n          type: object\n          description: A detailed breakdown of the input tokens.\n          properties:\n            cached_tokens:\n              type: integer\n              description: |\n                The number of tokens that were retrieved from the cache.\n                [More on prompt caching](https://platform.openai.com/docs/guides/prompt-caching).\n          required:\n            - cached_tokens\n        output_tokens:\n          type: integer\n          description: The number of output tokens.\n        output_tokens_details:\n          type: object\n          description: A detailed breakdown of the output tokens.\n          properties:\n            reasoning_tokens:\n              type: integer\n              description: The number of reasoning tokens.\n          required:\n            - reasoning_tokens\n        total_tokens:\n          type: integer\n          description: The total number of tokens used.\n      required:\n        - input_tokens\n        - input_tokens_details\n        - output_tokens\n        - output_tokens_details\n        - total_tokens\n    ResponseWebSearchCallCompletedEvent:\n      type: object\n      description: Emitted when a web search call is completed.\n      properties:\n        type:\n          type: string\n          description: |\n            The type of the event. Always `response.web_search_call.completed`.\n          enum:\n            - response.web_search_call.completed\n          x-stainless-const: true\n        output_index:\n          type: integer\n          description: |\n            The index of the output item that the web search call is associated with.\n        item_id:\n          type: string\n          description: |\n            Unique ID for the output item associated with the web search call.\n        sequence_number:\n          type: integer\n          description: The sequence number of the web search call being processed.\n      required:\n        - type\n        - output_index\n        - item_id\n        - sequence_number\n      x-oaiMeta:\n        name: response.web_search_call.completed\n        group: responses\n        example: |\n          {\n            \"type\": \"response.web_search_call.completed\",\n            \"output_index\": 0,\n            \"item_id\": \"ws_123\",\n            \"sequence_number\": 0\n          }\n    ResponseWebSearchCallInProgressEvent:\n      type: object\n      description: Emitted when a web search call is initiated.\n      properties:\n        type:\n          type: string\n          description: |\n            The type of the event. Always `response.web_search_call.in_progress`.\n          enum:\n            - response.web_search_call.in_progress\n          x-stainless-const: true\n        output_index:\n          type: integer\n          description: |\n            The index of the output item that the web search call is associated with.\n        item_id:\n          type: string\n          description: |\n            Unique ID for the output item associated with the web search call.\n        sequence_number:\n          type: integer\n          description: The sequence number of the web search call being processed.\n      required:\n        - type\n        - output_index\n        - item_id\n        - sequence_number\n      x-oaiMeta:\n        name: response.web_search_call.in_progress\n        group: responses\n        example: |\n          {\n            \"type\": \"response.web_search_call.in_progress\",\n            \"output_index\": 0,\n            \"item_id\": \"ws_123\",\n            \"sequence_number\": 0\n          }\n    ResponseWebSearchCallSearchingEvent:\n      type: object\n      description: Emitted when a web search call is executing.\n      properties:\n        type:\n          type: string\n          description: |\n            The type of the event. Always `response.web_search_call.searching`.\n          enum:\n            - response.web_search_call.searching\n          x-stainless-const: true\n        output_index:\n          type: integer\n          description: |\n            The index of the output item that the web search call is associated with.\n        item_id:\n          type: string\n          description: |\n            Unique ID for the output item associated with the web search call.\n        sequence_number:\n          type: integer\n          description: The sequence number of the web search call being processed.\n      required:\n        - type\n        - output_index\n        - item_id\n        - sequence_number\n      x-oaiMeta:\n        name: response.web_search_call.searching\n        group: responses\n        example: |\n          {\n            \"type\": \"response.web_search_call.searching\",\n            \"output_index\": 0,\n            \"item_id\": \"ws_123\",\n            \"sequence_number\": 0\n          }\n    RunCompletionUsage:\n      type: object\n      description: >-\n        Usage statistics related to the run. This value will be `null` if the run is not in a terminal state\n        (i.e. `in_progress`, `queued`, etc.).\n      properties:\n        completion_tokens:\n          type: integer\n          description: Number of completion tokens used over the course of the run.\n        prompt_tokens:\n          type: integer\n          description: Number of prompt tokens used over the course of the run.\n        total_tokens:\n          type: integer\n          description: Total number of tokens used (prompt + completion).\n      required:\n        - prompt_tokens\n        - completion_tokens\n        - total_tokens\n      nullable: true\n    RunGraderRequest:\n      type: object\n      title: RunGraderRequest\n      properties:\n        grader:\n          type: object\n          description: The grader used for the fine-tuning job.\n          anyOf:\n            - $ref: '#/components/schemas/GraderStringCheck'\n            - $ref: '#/components/schemas/GraderTextSimilarity'\n            - $ref: '#/components/schemas/GraderPython'\n            - $ref: '#/components/schemas/GraderScoreModel'\n            - $ref: '#/components/schemas/GraderMulti'\n          discriminator:\n            propertyName: type\n        item:\n          type: object\n          description: >\n            The dataset item provided to the grader. This will be used to populate\n\n            the `item` namespace. See [the guide](https://platform.openai.com/docs/guides/graders) for more\n            details.\n        model_sample:\n          type: string\n          description: >\n            The model sample to be evaluated. This value will be used to populate\n\n            the `sample` namespace. See [the guide](https://platform.openai.com/docs/guides/graders) for more\n            details.\n\n            The `output_json` variable will be populated if the model sample is a\n\n            valid JSON string.\n\n      required:\n        - grader\n        - model_sample\n    RunGraderResponse:\n      type: object\n      properties:\n        reward:\n          type: number\n        metadata:\n          type: object\n          properties:\n            name:\n              type: string\n            type:\n              type: string\n            errors:\n              type: object\n              properties:\n                formula_parse_error:\n                  type: boolean\n                sample_parse_error:\n                  type: boolean\n                truncated_observation_error:\n                  type: boolean\n                unresponsive_reward_error:\n                  type: boolean\n                invalid_variable_error:\n                  type: boolean\n                other_error:\n                  type: boolean\n                python_grader_server_error:\n                  type: boolean\n                python_grader_server_error_type:\n                  type: string\n                  nullable: true\n                python_grader_runtime_error:\n                  type: boolean\n                python_grader_runtime_error_details:\n                  type: string\n                  nullable: true\n                model_grader_server_error:\n                  type: boolean\n                model_grader_refusal_error:\n                  type: boolean\n                model_grader_parse_error:\n                  type: boolean\n                model_grader_server_error_details:\n                  type: string\n                  nullable: true\n              required:\n                - formula_parse_error\n                - sample_parse_error\n                - truncated_observation_error\n                - unresponsive_reward_error\n                - invalid_variable_error\n                - other_error\n                - python_grader_server_error\n                - python_grader_server_error_type\n                - python_grader_runtime_error\n                - python_grader_runtime_error_details\n                - model_grader_server_error\n                - model_grader_refusal_error\n                - model_grader_parse_error\n                - model_grader_server_error_details\n            execution_time:\n              type: number\n            scores:\n              type: object\n              additionalProperties: {}\n            token_usage:\n              type: integer\n              nullable: true\n            sampled_model_name:\n              type: string\n              nullable: true\n          required:\n            - name\n            - type\n            - errors\n            - execution_time\n            - scores\n            - token_usage\n            - sampled_model_name\n        sub_rewards:\n          type: object\n          additionalProperties: {}\n        model_grader_token_usage_per_model:\n          type: object\n          additionalProperties: {}\n      required:\n        - reward\n        - metadata\n        - sub_rewards\n        - model_grader_token_usage_per_model\n    RunObject:\n      type: object\n      title: A run on a thread\n      description: Represents an execution run on a [thread](https://platform.openai.com/docs/api-reference/threads).\n      properties:\n        id:\n          description: The identifier, which can be referenced in API endpoints.\n          type: string\n        object:\n          description: The object type, which is always `thread.run`.\n          type: string\n          enum:\n            - thread.run\n          x-stainless-const: true\n        created_at:\n          description: The Unix timestamp (in seconds) for when the run was created.\n          type: integer\n        thread_id:\n          description: >-\n            The ID of the [thread](https://platform.openai.com/docs/api-reference/threads) that was executed\n            on as a part of this run.\n          type: string\n        assistant_id:\n          description: >-\n            The ID of the [assistant](https://platform.openai.com/docs/api-reference/assistants) used for\n            execution of this run.\n          type: string\n        status:\n          $ref: '#/components/schemas/RunStatus'\n        required_action:\n          type: object\n          description: Details on the action required to continue the run. Will be `null` if no action is required.\n          nullable: true\n          properties:\n            type:\n              description: For now, this is always `submit_tool_outputs`.\n              type: string\n              enum:\n                - submit_tool_outputs\n              x-stainless-const: true\n            submit_tool_outputs:\n              type: object\n              description: Details on the tool outputs needed for this run to continue.\n              properties:\n                tool_calls:\n                  type: array\n                  description: A list of the relevant tool calls.\n                  items:\n                    $ref: '#/components/schemas/RunToolCallObject'\n              required:\n                - tool_calls\n          required:\n            - type\n            - submit_tool_outputs\n        last_error:\n          type: object\n          description: The last error associated with this run. Will be `null` if there are no errors.\n          nullable: true\n          properties:\n            code:\n              type: string\n              description: One of `server_error`, `rate_limit_exceeded`, or `invalid_prompt`.\n              enum:\n                - server_error\n                - rate_limit_exceeded\n                - invalid_prompt\n            message:\n              type: string\n              description: A human-readable description of the error.\n          required:\n            - code\n            - message\n        expires_at:\n          description: The Unix timestamp (in seconds) for when the run will expire.\n          type: integer\n          nullable: true\n        started_at:\n          description: The Unix timestamp (in seconds) for when the run was started.\n          type: integer\n          nullable: true\n        cancelled_at:\n          description: The Unix timestamp (in seconds) for when the run was cancelled.\n          type: integer\n          nullable: true\n        failed_at:\n          description: The Unix timestamp (in seconds) for when the run failed.\n          type: integer\n          nullable: true\n        completed_at:\n          description: The Unix timestamp (in seconds) for when the run was completed.\n          type: integer\n          nullable: true\n        incomplete_details:\n          description: Details on why the run is incomplete. Will be `null` if the run is not incomplete.\n          type: object\n          nullable: true\n          properties:\n            reason:\n              description: >-\n                The reason why the run is incomplete. This will point to which specific token limit was\n                reached over the course of the run.\n              type: string\n              enum:\n                - max_completion_tokens\n                - max_prompt_tokens\n        model:\n          description: >-\n            The model that the [assistant](https://platform.openai.com/docs/api-reference/assistants) used for\n            this run.\n          type: string\n        instructions:\n          description: >-\n            The instructions that the [assistant](https://platform.openai.com/docs/api-reference/assistants)\n            used for this run.\n          type: string\n        tools:\n          description: >-\n            The list of tools that the [assistant](https://platform.openai.com/docs/api-reference/assistants)\n            used for this run.\n          default: []\n          type: array\n          maxItems: 20\n          items:\n            $ref: '#/components/schemas/AssistantTool'\n        metadata:\n          $ref: '#/components/schemas/Metadata'\n        usage:\n          $ref: '#/components/schemas/RunCompletionUsage'\n        temperature:\n          description: The sampling temperature used for this run. If not set, defaults to 1.\n          type: number\n          nullable: true\n        top_p:\n          description: The nucleus sampling value used for this run. If not set, defaults to 1.\n          type: number\n          nullable: true\n        max_prompt_tokens:\n          type: integer\n          nullable: true\n          description: |\n            The maximum number of prompt tokens specified to have been used over the course of the run.\n          minimum: 256\n        max_completion_tokens:\n          type: integer\n          nullable: true\n          description: |\n            The maximum number of completion tokens specified to have been used over the course of the run.\n          minimum: 256\n        truncation_strategy:\n          allOf:\n            - $ref: '#/components/schemas/TruncationObject'\n            - nullable: true\n        tool_choice:\n          allOf:\n            - $ref: '#/components/schemas/AssistantsApiToolChoiceOption'\n            - nullable: true\n        parallel_tool_calls:\n          $ref: '#/components/schemas/ParallelToolCalls'\n        response_format:\n          $ref: '#/components/schemas/AssistantsApiResponseFormatOption'\n          nullable: true\n      required:\n        - id\n        - object\n        - created_at\n        - thread_id\n        - assistant_id\n        - status\n        - required_action\n        - last_error\n        - expires_at\n        - started_at\n        - cancelled_at\n        - failed_at\n        - completed_at\n        - model\n        - instructions\n        - tools\n        - metadata\n        - usage\n        - incomplete_details\n        - max_prompt_tokens\n        - max_completion_tokens\n        - truncation_strategy\n        - tool_choice\n        - parallel_tool_calls\n        - response_format\n      x-oaiMeta:\n        name: The run object\n        beta: true\n        example: |\n          {\n            \"id\": \"run_abc123\",\n            \"object\": \"thread.run\",\n            \"created_at\": 1698107661,\n            \"assistant_id\": \"asst_abc123\",\n            \"thread_id\": \"thread_abc123\",\n            \"status\": \"completed\",\n            \"started_at\": 1699073476,\n            \"expires_at\": null,\n            \"cancelled_at\": null,\n            \"failed_at\": null,\n            \"completed_at\": 1699073498,\n            \"last_error\": null,\n            \"model\": \"gpt-4o\",\n            \"instructions\": null,\n            \"tools\": [{\"type\": \"file_search\"}, {\"type\": \"code_interpreter\"}],\n            \"metadata\": {},\n            \"incomplete_details\": null,\n            \"usage\": {\n              \"prompt_tokens\": 123,\n              \"completion_tokens\": 456,\n              \"total_tokens\": 579\n            },\n            \"temperature\": 1.0,\n            \"top_p\": 1.0,\n            \"max_prompt_tokens\": 1000,\n            \"max_completion_tokens\": 1000,\n            \"truncation_strategy\": {\n              \"type\": \"auto\",\n              \"last_messages\": null\n            },\n            \"response_format\": \"auto\",\n            \"tool_choice\": \"auto\",\n            \"parallel_tool_calls\": true\n          }\n    RunStepCompletionUsage:\n      type: object\n      description: >-\n        Usage statistics related to the run step. This value will be `null` while the run step's status is\n        `in_progress`.\n      properties:\n        completion_tokens:\n          type: integer\n          description: Number of completion tokens used over the course of the run step.\n        prompt_tokens:\n          type: integer\n          description: Number of prompt tokens used over the course of the run step.\n        total_tokens:\n          type: integer\n          description: Total number of tokens used (prompt + completion).\n      required:\n        - prompt_tokens\n        - completion_tokens\n        - total_tokens\n      nullable: true\n    RunStepDeltaObject:\n      type: object\n      title: Run step delta object\n      description: |\n        Represents a run step delta i.e. any changed fields on a run step during streaming.\n      properties:\n        id:\n          description: The identifier of the run step, which can be referenced in API endpoints.\n          type: string\n        object:\n          description: The object type, which is always `thread.run.step.delta`.\n          type: string\n          enum:\n            - thread.run.step.delta\n          x-stainless-const: true\n        delta:\n          $ref: '#/components/schemas/RunStepDeltaObjectDelta'\n      required:\n        - id\n        - object\n        - delta\n      x-oaiMeta:\n        name: The run step delta object\n        beta: true\n        example: |\n          {\n            \"id\": \"step_123\",\n            \"object\": \"thread.run.step.delta\",\n            \"delta\": {\n              \"step_details\": {\n                \"type\": \"tool_calls\",\n                \"tool_calls\": [\n                  {\n                    \"index\": 0,\n                    \"id\": \"call_123\",\n                    \"type\": \"code_interpreter\",\n                    \"code_interpreter\": { \"input\": \"\", \"outputs\": [] }\n                  }\n                ]\n              }\n            }\n          }\n    RunStepDeltaStepDetailsMessageCreationObject:\n      title: Message creation\n      type: object\n      description: Details of the message creation by the run step.\n      properties:\n        type:\n          description: Always `message_creation`.\n          type: string\n          enum:\n            - message_creation\n          x-stainless-const: true\n        message_creation:\n          type: object\n          properties:\n            message_id:\n              type: string\n              description: The ID of the message that was created by this run step.\n      required:\n        - type\n    RunStepDeltaStepDetailsToolCallsCodeObject:\n      title: Code interpreter tool call\n      type: object\n      description: Details of the Code Interpreter tool call the run step was involved in.\n      properties:\n        index:\n          type: integer\n          description: The index of the tool call in the tool calls array.\n        id:\n          type: string\n          description: The ID of the tool call.\n        type:\n          type: string\n          description: The type of tool call. This is always going to be `code_interpreter` for this type of tool call.\n          enum:\n            - code_interpreter\n          x-stainless-const: true\n        code_interpreter:\n          type: object\n          description: The Code Interpreter tool call definition.\n          properties:\n            input:\n              type: string\n              description: The input to the Code Interpreter tool call.\n            outputs:\n              type: array\n              description: >-\n                The outputs from the Code Interpreter tool call. Code Interpreter can output one or more\n                items, including text (`logs`) or images (`image`). Each of these are represented by a\n                different object type.\n              items:\n                type: object\n                anyOf:\n                  - $ref: '#/components/schemas/RunStepDeltaStepDetailsToolCallsCodeOutputLogsObject'\n                  - $ref: '#/components/schemas/RunStepDeltaStepDetailsToolCallsCodeOutputImageObject'\n                discriminator:\n                  propertyName: type\n      required:\n        - index\n        - type\n    RunStepDeltaStepDetailsToolCallsCodeOutputImageObject:\n      title: Code interpreter image output\n      type: object\n      properties:\n        index:\n          type: integer\n          description: The index of the output in the outputs array.\n        type:\n          description: Always `image`.\n          type: string\n          enum:\n            - image\n          x-stainless-const: true\n        image:\n          type: object\n          properties:\n            file_id:\n              description: The [file](https://platform.openai.com/docs/api-reference/files) ID of the image.\n              type: string\n      required:\n        - index\n        - type\n    RunStepDeltaStepDetailsToolCallsCodeOutputLogsObject:\n      title: Code interpreter log output\n      type: object\n      description: Text output from the Code Interpreter tool call as part of a run step.\n      properties:\n        index:\n          type: integer\n          description: The index of the output in the outputs array.\n        type:\n          description: Always `logs`.\n          type: string\n          enum:\n            - logs\n          x-stainless-const: true\n        logs:\n          type: string\n          description: The text output from the Code Interpreter tool call.\n      required:\n        - index\n        - type\n    RunStepDeltaStepDetailsToolCallsFileSearchObject:\n      title: File search tool call\n      type: object\n      properties:\n        index:\n          type: integer\n          description: The index of the tool call in the tool calls array.\n        id:\n          type: string\n          description: The ID of the tool call object.\n        type:\n          type: string\n          description: The type of tool call. This is always going to be `file_search` for this type of tool call.\n          enum:\n            - file_search\n          x-stainless-const: true\n        file_search:\n          type: object\n          description: For now, this is always going to be an empty object.\n          x-oaiTypeLabel: map\n      required:\n        - index\n        - type\n        - file_search\n    RunStepDeltaStepDetailsToolCallsFunctionObject:\n      type: object\n      title: Function tool call\n      properties:\n        index:\n          type: integer\n          description: The index of the tool call in the tool calls array.\n        id:\n          type: string\n          description: The ID of the tool call object.\n        type:\n          type: string\n          description: The type of tool call. This is always going to be `function` for this type of tool call.\n          enum:\n            - function\n          x-stainless-const: true\n        function:\n          type: object\n          description: The definition of the function that was called.\n          properties:\n            name:\n              type: string\n              description: The name of the function.\n            arguments:\n              type: string\n              description: The arguments passed to the function.\n            output:\n              type: string\n              description: >-\n                The output of the function. This will be `null` if the outputs have not been\n                [submitted](https://platform.openai.com/docs/api-reference/runs/submitToolOutputs) yet.\n              nullable: true\n      required:\n        - index\n        - type\n    RunStepDeltaStepDetailsToolCallsObject:\n      title: Tool calls\n      type: object\n      description: Details of the tool call.\n      properties:\n        type:\n          description: Always `tool_calls`.\n          type: string\n          enum:\n            - tool_calls\n          x-stainless-const: true\n        tool_calls:\n          type: array\n          description: >\n            An array of tool calls the run step was involved in. These can be associated with one of three\n            types of tools: `code_interpreter`, `file_search`, or `function`.\n          items:\n            $ref: '#/components/schemas/RunStepDeltaStepDetailsToolCall'\n      required:\n        - type\n    RunStepDetailsMessageCreationObject:\n      title: Message creation\n      type: object\n      description: Details of the message creation by the run step.\n      properties:\n        type:\n          description: Always `message_creation`.\n          type: string\n          enum:\n            - message_creation\n          x-stainless-const: true\n        message_creation:\n          type: object\n          properties:\n            message_id:\n              type: string\n              description: The ID of the message that was created by this run step.\n          required:\n            - message_id\n      required:\n        - type\n        - message_creation\n    RunStepDetailsToolCallsCodeObject:\n      title: Code Interpreter tool call\n      type: object\n      description: Details of the Code Interpreter tool call the run step was involved in.\n      properties:\n        id:\n          type: string\n          description: The ID of the tool call.\n        type:\n          type: string\n          description: The type of tool call. This is always going to be `code_interpreter` for this type of tool call.\n          enum:\n            - code_interpreter\n          x-stainless-const: true\n        code_interpreter:\n          type: object\n          description: The Code Interpreter tool call definition.\n          required:\n            - input\n            - outputs\n          properties:\n            input:\n              type: string\n              description: The input to the Code Interpreter tool call.\n            outputs:\n              type: array\n              description: >-\n                The outputs from the Code Interpreter tool call. Code Interpreter can output one or more\n                items, including text (`logs`) or images (`image`). Each of these are represented by a\n                different object type.\n              items:\n                type: object\n                anyOf:\n                  - $ref: '#/components/schemas/RunStepDetailsToolCallsCodeOutputLogsObject'\n                  - $ref: '#/components/schemas/RunStepDetailsToolCallsCodeOutputImageObject'\n                discriminator:\n                  propertyName: type\n      required:\n        - id\n        - type\n        - code_interpreter\n    RunStepDetailsToolCallsCodeOutputImageObject:\n      title: Code Interpreter image output\n      type: object\n      properties:\n        type:\n          description: Always `image`.\n          type: string\n          enum:\n            - image\n          x-stainless-const: true\n        image:\n          type: object\n          properties:\n            file_id:\n              description: The [file](https://platform.openai.com/docs/api-reference/files) ID of the image.\n              type: string\n          required:\n            - file_id\n      required:\n        - type\n        - image\n      x-stainless-naming:\n        java:\n          type_name: ImageOutput\n        kotlin:\n          type_name: ImageOutput\n    RunStepDetailsToolCallsCodeOutputLogsObject:\n      title: Code Interpreter log output\n      type: object\n      description: Text output from the Code Interpreter tool call as part of a run step.\n      properties:\n        type:\n          description: Always `logs`.\n          type: string\n          enum:\n            - logs\n          x-stainless-const: true\n        logs:\n          type: string\n          description: The text output from the Code Interpreter tool call.\n      required:\n        - type\n        - logs\n      x-stainless-naming:\n        java:\n          type_name: LogsOutput\n        kotlin:\n          type_name: LogsOutput\n    RunStepDetailsToolCallsFileSearchObject:\n      title: File search tool call\n      type: object\n      properties:\n        id:\n          type: string\n          description: The ID of the tool call object.\n        type:\n          type: string\n          description: The type of tool call. This is always going to be `file_search` for this type of tool call.\n          enum:\n            - file_search\n          x-stainless-const: true\n        file_search:\n          type: object\n          description: For now, this is always going to be an empty object.\n          x-oaiTypeLabel: map\n          properties:\n            ranking_options:\n              $ref: '#/components/schemas/RunStepDetailsToolCallsFileSearchRankingOptionsObject'\n            results:\n              type: array\n              description: The results of the file search.\n              items:\n                $ref: '#/components/schemas/RunStepDetailsToolCallsFileSearchResultObject'\n      required:\n        - id\n        - type\n        - file_search\n    RunStepDetailsToolCallsFileSearchRankingOptionsObject:\n      title: File search tool call ranking options\n      type: object\n      description: The ranking options for the file search.\n      properties:\n        ranker:\n          $ref: '#/components/schemas/FileSearchRanker'\n        score_threshold:\n          type: number\n          description: >-\n            The score threshold for the file search. All values must be a floating point number between 0 and\n            1.\n          minimum: 0\n          maximum: 1\n      required:\n        - ranker\n        - score_threshold\n    RunStepDetailsToolCallsFileSearchResultObject:\n      title: File search tool call result\n      type: object\n      description: A result instance of the file search.\n      x-oaiTypeLabel: map\n      properties:\n        file_id:\n          type: string\n          description: The ID of the file that result was found in.\n        file_name:\n          type: string\n          description: The name of the file that result was found in.\n        score:\n          type: number\n          description: The score of the result. All values must be a floating point number between 0 and 1.\n          minimum: 0\n          maximum: 1\n        content:\n          type: array\n          description: >-\n            The content of the result that was found. The content is only included if requested via the\n            include query parameter.\n          items:\n            type: object\n            properties:\n              type:\n                type: string\n                description: The type of the content.\n                enum:\n                  - text\n                x-stainless-const: true\n              text:\n                type: string\n                description: The text content of the file.\n      required:\n        - file_id\n        - file_name\n        - score\n    RunStepDetailsToolCallsFunctionObject:\n      type: object\n      title: Function tool call\n      properties:\n        id:\n          type: string\n          description: The ID of the tool call object.\n        type:\n          type: string\n          description: The type of tool call. This is always going to be `function` for this type of tool call.\n          enum:\n            - function\n          x-stainless-const: true\n        function:\n          type: object\n          description: The definition of the function that was called.\n          properties:\n            name:\n              type: string\n              description: The name of the function.\n            arguments:\n              type: string\n              description: The arguments passed to the function.\n            output:\n              type: string\n              description: >-\n                The output of the function. This will be `null` if the outputs have not been\n                [submitted](https://platform.openai.com/docs/api-reference/runs/submitToolOutputs) yet.\n              nullable: true\n          required:\n            - name\n            - arguments\n            - output\n      required:\n        - id\n        - type\n        - function\n    RunStepDetailsToolCallsObject:\n      title: Tool calls\n      type: object\n      description: Details of the tool call.\n      properties:\n        type:\n          description: Always `tool_calls`.\n          type: string\n          enum:\n            - tool_calls\n          x-stainless-const: true\n        tool_calls:\n          type: array\n          description: >\n            An array of tool calls the run step was involved in. These can be associated with one of three\n            types of tools: `code_interpreter`, `file_search`, or `function`.\n          items:\n            $ref: '#/components/schemas/RunStepDetailsToolCall'\n      required:\n        - type\n        - tool_calls\n    RunStepObject:\n      type: object\n      title: Run steps\n      description: |\n        Represents a step in execution of a run.\n      properties:\n        id:\n          description: The identifier of the run step, which can be referenced in API endpoints.\n          type: string\n        object:\n          description: The object type, which is always `thread.run.step`.\n          type: string\n          enum:\n            - thread.run.step\n          x-stainless-const: true\n        created_at:\n          description: The Unix timestamp (in seconds) for when the run step was created.\n          type: integer\n        assistant_id:\n          description: >-\n            The ID of the [assistant](https://platform.openai.com/docs/api-reference/assistants) associated\n            with the run step.\n          type: string\n        thread_id:\n          description: The ID of the [thread](https://platform.openai.com/docs/api-reference/threads) that was run.\n          type: string\n        run_id:\n          description: >-\n            The ID of the [run](https://platform.openai.com/docs/api-reference/runs) that this run step is a\n            part of.\n          type: string\n        type:\n          description: The type of run step, which can be either `message_creation` or `tool_calls`.\n          type: string\n          enum:\n            - message_creation\n            - tool_calls\n        status:\n          description: >-\n            The status of the run step, which can be either `in_progress`, `cancelled`, `failed`, `completed`,\n            or `expired`.\n          type: string\n          enum:\n            - in_progress\n            - cancelled\n            - failed\n            - completed\n            - expired\n        step_details:\n          type: object\n          description: The details of the run step.\n          anyOf:\n            - $ref: '#/components/schemas/RunStepDetailsMessageCreationObject'\n            - $ref: '#/components/schemas/RunStepDetailsToolCallsObject'\n          discriminator:\n            propertyName: type\n        last_error:\n          type: object\n          description: The last error associated with this run step. Will be `null` if there are no errors.\n          nullable: true\n          properties:\n            code:\n              type: string\n              description: One of `server_error` or `rate_limit_exceeded`.\n              enum:\n                - server_error\n                - rate_limit_exceeded\n            message:\n              type: string\n              description: A human-readable description of the error.\n          required:\n            - code\n            - message\n        expired_at:\n          description: >-\n            The Unix timestamp (in seconds) for when the run step expired. A step is considered expired if the\n            parent run is expired.\n          type: integer\n          nullable: true\n        cancelled_at:\n          description: The Unix timestamp (in seconds) for when the run step was cancelled.\n          type: integer\n          nullable: true\n        failed_at:\n          description: The Unix timestamp (in seconds) for when the run step failed.\n          type: integer\n          nullable: true\n        completed_at:\n          description: The Unix timestamp (in seconds) for when the run step completed.\n          type: integer\n          nullable: true\n        metadata:\n          $ref: '#/components/schemas/Metadata'\n        usage:\n          $ref: '#/components/schemas/RunStepCompletionUsage'\n      required:\n        - id\n        - object\n        - created_at\n        - assistant_id\n        - thread_id\n        - run_id\n        - type\n        - status\n        - step_details\n        - last_error\n        - expired_at\n        - cancelled_at\n        - failed_at\n        - completed_at\n        - metadata\n        - usage\n      x-oaiMeta:\n        name: The run step object\n        beta: true\n        example: |\n          {\n            \"id\": \"step_abc123\",\n            \"object\": \"thread.run.step\",\n            \"created_at\": 1699063291,\n            \"run_id\": \"run_abc123\",\n            \"assistant_id\": \"asst_abc123\",\n            \"thread_id\": \"thread_abc123\",\n            \"type\": \"message_creation\",\n            \"status\": \"completed\",\n            \"cancelled_at\": null,\n            \"completed_at\": 1699063291,\n            \"expired_at\": null,\n            \"failed_at\": null,\n            \"last_error\": null,\n            \"step_details\": {\n              \"type\": \"message_creation\",\n              \"message_creation\": {\n                \"message_id\": \"msg_abc123\"\n              }\n            },\n            \"usage\": {\n              \"prompt_tokens\": 123,\n              \"completion_tokens\": 456,\n              \"total_tokens\": 579\n            }\n          }\n    RunStepStreamEvent:\n      anyOf:\n        - type: object\n          properties:\n            event:\n              type: string\n              enum:\n                - thread.run.step.created\n              x-stainless-const: true\n            data:\n              $ref: '#/components/schemas/RunStepObject'\n          required:\n            - event\n            - data\n          description: >-\n            Occurs when a [run step](https://platform.openai.com/docs/api-reference/run-steps/step-object) is\n            created.\n          x-oaiMeta:\n            dataDescription: '`data` is a [run step](/docs/api-reference/run-steps/step-object)'\n        - type: object\n          properties:\n            event:\n              type: string\n              enum:\n                - thread.run.step.in_progress\n              x-stainless-const: true\n            data:\n              $ref: '#/components/schemas/RunStepObject'\n          required:\n            - event\n            - data\n          description: >-\n            Occurs when a [run step](https://platform.openai.com/docs/api-reference/run-steps/step-object)\n            moves to an `in_progress` state.\n          x-oaiMeta:\n            dataDescription: '`data` is a [run step](/docs/api-reference/run-steps/step-object)'\n        - type: object\n          properties:\n            event:\n              type: string\n              enum:\n                - thread.run.step.delta\n              x-stainless-const: true\n            data:\n              $ref: '#/components/schemas/RunStepDeltaObject'\n          required:\n            - event\n            - data\n          description: >-\n            Occurs when parts of a [run\n            step](https://platform.openai.com/docs/api-reference/run-steps/step-object) are being streamed.\n          x-oaiMeta:\n            dataDescription: '`data` is a [run step delta](/docs/api-reference/assistants-streaming/run-step-delta-object)'\n        - type: object\n          properties:\n            event:\n              type: string\n              enum:\n                - thread.run.step.completed\n              x-stainless-const: true\n            data:\n              $ref: '#/components/schemas/RunStepObject'\n          required:\n            - event\n            - data\n          description: >-\n            Occurs when a [run step](https://platform.openai.com/docs/api-reference/run-steps/step-object) is\n            completed.\n          x-oaiMeta:\n            dataDescription: '`data` is a [run step](/docs/api-reference/run-steps/step-object)'\n        - type: object\n          properties:\n            event:\n              type: string\n              enum:\n                - thread.run.step.failed\n              x-stainless-const: true\n            data:\n              $ref: '#/components/schemas/RunStepObject'\n          required:\n            - event\n            - data\n          description: >-\n            Occurs when a [run step](https://platform.openai.com/docs/api-reference/run-steps/step-object)\n            fails.\n          x-oaiMeta:\n            dataDescription: '`data` is a [run step](/docs/api-reference/run-steps/step-object)'\n        - type: object\n          properties:\n            event:\n              type: string\n              enum:\n                - thread.run.step.cancelled\n              x-stainless-const: true\n            data:\n              $ref: '#/components/schemas/RunStepObject'\n          required:\n            - event\n            - data\n          description: >-\n            Occurs when a [run step](https://platform.openai.com/docs/api-reference/run-steps/step-object) is\n            cancelled.\n          x-oaiMeta:\n            dataDescription: '`data` is a [run step](/docs/api-reference/run-steps/step-object)'\n        - type: object\n          properties:\n            event:\n              type: string\n              enum:\n                - thread.run.step.expired\n              x-stainless-const: true\n            data:\n              $ref: '#/components/schemas/RunStepObject'\n          required:\n            - event\n            - data\n          description: >-\n            Occurs when a [run step](https://platform.openai.com/docs/api-reference/run-steps/step-object)\n            expires.\n          x-oaiMeta:\n            dataDescription: '`data` is a [run step](/docs/api-reference/run-steps/step-object)'\n      discriminator:\n        propertyName: event\n    RunStreamEvent:\n      anyOf:\n        - type: object\n          properties:\n            event:\n              type: string\n              enum:\n                - thread.run.created\n              x-stainless-const: true\n            data:\n              $ref: '#/components/schemas/RunObject'\n          required:\n            - event\n            - data\n          description: Occurs when a new [run](https://platform.openai.com/docs/api-reference/runs/object) is created.\n          x-oaiMeta:\n            dataDescription: '`data` is a [run](/docs/api-reference/runs/object)'\n        - type: object\n          properties:\n            event:\n              type: string\n              enum:\n                - thread.run.queued\n              x-stainless-const: true\n            data:\n              $ref: '#/components/schemas/RunObject'\n          required:\n            - event\n            - data\n          description: >-\n            Occurs when a [run](https://platform.openai.com/docs/api-reference/runs/object) moves to a\n            `queued` status.\n          x-oaiMeta:\n            dataDescription: '`data` is a [run](/docs/api-reference/runs/object)'\n        - type: object\n          properties:\n            event:\n              type: string\n              enum:\n                - thread.run.in_progress\n              x-stainless-const: true\n            data:\n              $ref: '#/components/schemas/RunObject'\n          required:\n            - event\n            - data\n          description: >-\n            Occurs when a [run](https://platform.openai.com/docs/api-reference/runs/object) moves to an\n            `in_progress` status.\n          x-oaiMeta:\n            dataDescription: '`data` is a [run](/docs/api-reference/runs/object)'\n        - type: object\n          properties:\n            event:\n              type: string\n              enum:\n                - thread.run.requires_action\n              x-stainless-const: true\n            data:\n              $ref: '#/components/schemas/RunObject'\n          required:\n            - event\n            - data\n          description: >-\n            Occurs when a [run](https://platform.openai.com/docs/api-reference/runs/object) moves to a\n            `requires_action` status.\n          x-oaiMeta:\n            dataDescription: '`data` is a [run](/docs/api-reference/runs/object)'\n        - type: object\n          properties:\n            event:\n              type: string\n              enum:\n                - thread.run.completed\n              x-stainless-const: true\n            data:\n              $ref: '#/components/schemas/RunObject'\n          required:\n            - event\n            - data\n          description: Occurs when a [run](https://platform.openai.com/docs/api-reference/runs/object) is completed.\n          x-oaiMeta:\n            dataDescription: '`data` is a [run](/docs/api-reference/runs/object)'\n        - type: object\n          properties:\n            event:\n              type: string\n              enum:\n                - thread.run.incomplete\n              x-stainless-const: true\n            data:\n              $ref: '#/components/schemas/RunObject'\n          required:\n            - event\n            - data\n          description: >-\n            Occurs when a [run](https://platform.openai.com/docs/api-reference/runs/object) ends with status\n            `incomplete`.\n          x-oaiMeta:\n            dataDescription: '`data` is a [run](/docs/api-reference/runs/object)'\n        - type: object\n          properties:\n            event:\n              type: string\n              enum:\n                - thread.run.failed\n              x-stainless-const: true\n            data:\n              $ref: '#/components/schemas/RunObject'\n          required:\n            - event\n            - data\n          description: Occurs when a [run](https://platform.openai.com/docs/api-reference/runs/object) fails.\n          x-oaiMeta:\n            dataDescription: '`data` is a [run](/docs/api-reference/runs/object)'\n        - type: object\n          properties:\n            event:\n              type: string\n              enum:\n                - thread.run.cancelling\n              x-stainless-const: true\n            data:\n              $ref: '#/components/schemas/RunObject'\n          required:\n            - event\n            - data\n          description: >-\n            Occurs when a [run](https://platform.openai.com/docs/api-reference/runs/object) moves to a\n            `cancelling` status.\n          x-oaiMeta:\n            dataDescription: '`data` is a [run](/docs/api-reference/runs/object)'\n        - type: object\n          properties:\n            event:\n              type: string\n              enum:\n                - thread.run.cancelled\n              x-stainless-const: true\n            data:\n              $ref: '#/components/schemas/RunObject'\n          required:\n            - event\n            - data\n          description: Occurs when a [run](https://platform.openai.com/docs/api-reference/runs/object) is cancelled.\n          x-oaiMeta:\n            dataDescription: '`data` is a [run](/docs/api-reference/runs/object)'\n        - type: object\n          properties:\n            event:\n              type: string\n              enum:\n                - thread.run.expired\n              x-stainless-const: true\n            data:\n              $ref: '#/components/schemas/RunObject'\n          required:\n            - event\n            - data\n          description: Occurs when a [run](https://platform.openai.com/docs/api-reference/runs/object) expires.\n          x-oaiMeta:\n            dataDescription: '`data` is a [run](/docs/api-reference/runs/object)'\n      discriminator:\n        propertyName: event\n    RunToolCallObject:\n      type: object\n      description: Tool call objects\n      properties:\n        id:\n          type: string\n          description: >-\n            The ID of the tool call. This ID must be referenced when you submit the tool outputs in using the\n            [Submit tool outputs to\n            run](https://platform.openai.com/docs/api-reference/runs/submitToolOutputs) endpoint.\n        type:\n          type: string\n          description: The type of tool call the output is required for. For now, this is always `function`.\n          enum:\n            - function\n          x-stainless-const: true\n        function:\n          type: object\n          description: The function definition.\n          properties:\n            name:\n              type: string\n              description: The name of the function.\n            arguments:\n              type: string\n              description: The arguments that the model expects you to pass to the function.\n          required:\n            - name\n            - arguments\n      required:\n        - id\n        - type\n        - function\n    Screenshot:\n      type: object\n      title: Screenshot\n      description: |\n        A screenshot action.\n      properties:\n        type:\n          type: string\n          enum:\n            - screenshot\n          default: screenshot\n          description: |\n            Specifies the event type. For a screenshot action, this property is\n            always set to `screenshot`.\n          x-stainless-const: true\n      required:\n        - type\n    Scroll:\n      type: object\n      title: Scroll\n      description: |\n        A scroll action.\n      properties:\n        type:\n          type: string\n          enum:\n            - scroll\n          default: scroll\n          description: |\n            Specifies the event type. For a scroll action, this property is\n            always set to `scroll`.\n          x-stainless-const: true\n        x:\n          type: integer\n          description: |\n            The x-coordinate where the scroll occurred.\n        'y':\n          type: integer\n          description: |\n            The y-coordinate where the scroll occurred.\n        scroll_x:\n          type: integer\n          description: |\n            The horizontal scroll distance.\n        scroll_y:\n          type: integer\n          description: |\n            The vertical scroll distance.\n      required:\n        - type\n        - x\n        - 'y'\n        - scroll_x\n        - scroll_y\n    ServiceTier:\n      type: string\n      description: |\n        Specifies the processing type used for serving the request.\n          - If set to 'auto', then the request will be processed with the service tier configured in the Project settings. Unless otherwise configured, the Project will use 'default'.\n          - If set to 'default', then the request will be processed with the standard pricing and performance for the selected model.\n          - If set to '[flex](https://platform.openai.com/docs/guides/flex-processing)' or '[priority](https://openai.com/api-priority-processing/)', then the request will be processed with the corresponding service tier.\n          - When not set, the default behavior is 'auto'.\n\n          When the `service_tier` parameter is set, the response body will include the `service_tier` value based on the processing mode actually used to serve the request. This response value may be different from the value set in the parameter.\n      enum:\n        - auto\n        - default\n        - flex\n        - scale\n        - priority\n      nullable: true\n      default: auto\n    SpeechAudioDeltaEvent:\n      type: object\n      description: Emitted for each chunk of audio data generated during speech synthesis.\n      properties:\n        type:\n          type: string\n          description: |\n            The type of the event. Always `speech.audio.delta`.\n          enum:\n            - speech.audio.delta\n          x-stainless-const: true\n        audio:\n          type: string\n          description: |\n            A chunk of Base64-encoded audio data.\n      required:\n        - type\n        - audio\n      x-oaiMeta:\n        name: Stream Event (speech.audio.delta)\n        group: speech\n        example: |\n          {\n            \"type\": \"speech.audio.delta\",\n            \"audio\": \"base64-encoded-audio-data\"\n          }\n    SpeechAudioDoneEvent:\n      type: object\n      description: Emitted when the speech synthesis is complete and all audio has been streamed.\n      properties:\n        type:\n          type: string\n          description: |\n            The type of the event. Always `speech.audio.done`.\n          enum:\n            - speech.audio.done\n          x-stainless-const: true\n        usage:\n          type: object\n          description: |\n            Token usage statistics for the request.\n          properties:\n            input_tokens:\n              type: integer\n              description: Number of input tokens in the prompt.\n            output_tokens:\n              type: integer\n              description: Number of output tokens generated.\n            total_tokens:\n              type: integer\n              description: Total number of tokens used (input + output).\n          required:\n            - input_tokens\n            - output_tokens\n            - total_tokens\n      required:\n        - type\n        - usage\n      x-oaiMeta:\n        name: Stream Event (speech.audio.done)\n        group: speech\n        example: |\n          {\n            \"type\": \"speech.audio.done\",\n            \"usage\": {\n              \"input_tokens\": 14,\n              \"output_tokens\": 101,\n              \"total_tokens\": 115\n            }\n          }\n    StaticChunkingStrategy:\n      type: object\n      additionalProperties: false\n      properties:\n        max_chunk_size_tokens:\n          type: integer\n          minimum: 100\n          maximum: 4096\n          description: >-\n            The maximum number of tokens in each chunk. The default value is `800`. The minimum value is `100`\n            and the maximum value is `4096`.\n        chunk_overlap_tokens:\n          type: integer\n          description: |\n            The number of tokens that overlap between chunks. The default value is `400`.\n\n            Note that the overlap must not exceed half of `max_chunk_size_tokens`.\n      required:\n        - max_chunk_size_tokens\n        - chunk_overlap_tokens\n    StaticChunkingStrategyRequestParam:\n      type: object\n      title: Static Chunking Strategy\n      description: Customize your own chunking strategy by setting chunk size and chunk overlap.\n      additionalProperties: false\n      properties:\n        type:\n          type: string\n          description: Always `static`.\n          enum:\n            - static\n          x-stainless-const: true\n        static:\n          $ref: '#/components/schemas/StaticChunkingStrategy'\n      required:\n        - type\n        - static\n    StaticChunkingStrategyResponseParam:\n      type: object\n      title: Static Chunking Strategy\n      additionalProperties: false\n      properties:\n        type:\n          type: string\n          description: Always `static`.\n          enum:\n            - static\n          x-stainless-const: true\n        static:\n          $ref: '#/components/schemas/StaticChunkingStrategy'\n      required:\n        - type\n        - static\n    StopConfiguration:\n      description: |\n        Not supported with latest reasoning models `o3` and `o4-mini`.\n\n        Up to 4 sequences where the API will stop generating further tokens. The\n        returned text will not contain the stop sequence.\n      nullable: true\n      anyOf:\n        - type: string\n          default: <|endoftext|>\n          example: |+\n\n          nullable: true\n        - type: array\n          minItems: 1\n          maxItems: 4\n          items:\n            type: string\n            example: '[\"\\n\"]'\n    SubmitToolOutputsRunRequest:\n      type: object\n      additionalProperties: false\n      properties:\n        tool_outputs:\n          description: A list of tools for which the outputs are being submitted.\n          type: array\n          items:\n            type: object\n            properties:\n              tool_call_id:\n                type: string\n                description: >-\n                  The ID of the tool call in the `required_action` object within the run object the output is\n                  being submitted for.\n              output:\n                type: string\n                description: The output of the tool call to be submitted to continue the run.\n        stream:\n          type: boolean\n          nullable: true\n          description: >\n            If `true`, returns a stream of events that happen during the Run as server-sent events,\n            terminating when the Run enters a terminal state with a `data: [DONE]` message.\n      required:\n        - tool_outputs\n    TextResponseFormatConfiguration:\n      description: |\n        An object specifying the format that the model must output.\n\n        Configuring `{ \"type\": \"json_schema\" }` enables Structured Outputs,\n        which ensures the model will match your supplied JSON schema. Learn more in the\n        [Structured Outputs guide](https://platform.openai.com/docs/guides/structured-outputs).\n\n        The default format is `{ \"type\": \"text\" }` with no additional options.\n\n        **Not recommended for gpt-4o and newer models:**\n\n        Setting to `{ \"type\": \"json_object\" }` enables the older JSON mode, which\n        ensures the message the model generates is valid JSON. Using `json_schema`\n        is preferred for models that support it.\n      anyOf:\n        - $ref: '#/components/schemas/ResponseFormatText'\n        - $ref: '#/components/schemas/TextResponseFormatJsonSchema'\n        - $ref: '#/components/schemas/ResponseFormatJsonObject'\n      discriminator:\n        propertyName: type\n    TextResponseFormatJsonSchema:\n      type: object\n      title: JSON schema\n      description: |\n        JSON Schema response format. Used to generate structured JSON responses.\n        Learn more about [Structured Outputs](https://platform.openai.com/docs/guides/structured-outputs).\n      properties:\n        type:\n          type: string\n          description: The type of response format being defined. Always `json_schema`.\n          enum:\n            - json_schema\n          x-stainless-const: true\n        description:\n          type: string\n          description: |\n            A description of what the response format is for, used by the model to\n            determine how to respond in the format.\n        name:\n          type: string\n          description: |\n            The name of the response format. Must be a-z, A-Z, 0-9, or contain\n            underscores and dashes, with a maximum length of 64.\n        schema:\n          $ref: '#/components/schemas/ResponseFormatJsonSchemaSchema'\n        strict:\n          type: boolean\n          nullable: true\n          default: false\n          description: |\n            Whether to enable strict schema adherence when generating the output.\n            If set to true, the model will always follow the exact schema defined\n            in the `schema` field. Only a subset of JSON Schema is supported when\n            `strict` is `true`. To learn more, read the [Structured Outputs\n            guide](https://platform.openai.com/docs/guides/structured-outputs).\n      required:\n        - type\n        - schema\n        - name\n    ThreadObject:\n      type: object\n      title: Thread\n      description: Represents a thread that contains [messages](https://platform.openai.com/docs/api-reference/messages).\n      properties:\n        id:\n          description: The identifier, which can be referenced in API endpoints.\n          type: string\n        object:\n          description: The object type, which is always `thread`.\n          type: string\n          enum:\n            - thread\n          x-stainless-const: true\n        created_at:\n          description: The Unix timestamp (in seconds) for when the thread was created.\n          type: integer\n        tool_resources:\n          type: object\n          description: >\n            A set of resources that are made available to the assistant's tools in this thread. The resources\n            are specific to the type of tool. For example, the `code_interpreter` tool requires a list of file\n            IDs, while the `file_search` tool requires a list of vector store IDs.\n          properties:\n            code_interpreter:\n              type: object\n              properties:\n                file_ids:\n                  type: array\n                  description: >\n                    A list of [file](https://platform.openai.com/docs/api-reference/files) IDs made available\n                    to the `code_interpreter` tool. There can be a maximum of 20 files associated with the\n                    tool.\n                  default: []\n                  maxItems: 20\n                  items:\n                    type: string\n            file_search:\n              type: object\n              properties:\n                vector_store_ids:\n                  type: array\n                  description: >\n                    The [vector store](https://platform.openai.com/docs/api-reference/vector-stores/object)\n                    attached to this thread. There can be a maximum of 1 vector store attached to the thread.\n                  maxItems: 1\n                  items:\n                    type: string\n          nullable: true\n        metadata:\n          $ref: '#/components/schemas/Metadata'\n      required:\n        - id\n        - object\n        - created_at\n        - tool_resources\n        - metadata\n      x-oaiMeta:\n        name: The thread object\n        beta: true\n        example: |\n          {\n            \"id\": \"thread_abc123\",\n            \"object\": \"thread\",\n            \"created_at\": 1698107661,\n            \"metadata\": {}\n          }\n    ThreadStreamEvent:\n      anyOf:\n        - type: object\n          properties:\n            enabled:\n              type: boolean\n              description: Whether to enable input audio transcription.\n            event:\n              type: string\n              enum:\n                - thread.created\n              x-stainless-const: true\n            data:\n              $ref: '#/components/schemas/ThreadObject'\n          required:\n            - event\n            - data\n          description: >-\n            Occurs when a new [thread](https://platform.openai.com/docs/api-reference/threads/object) is\n            created.\n          x-oaiMeta:\n            dataDescription: '`data` is a [thread](/docs/api-reference/threads/object)'\n      discriminator:\n        propertyName: event\n    ToggleCertificatesRequest:\n      type: object\n      properties:\n        certificate_ids:\n          type: array\n          items:\n            type: string\n            example: cert_abc\n          minItems: 1\n          maxItems: 10\n      required:\n        - certificate_ids\n    Tool:\n      description: |\n        A tool that can be used to generate a response.\n      discriminator:\n        propertyName: type\n      anyOf:\n        - $ref: '#/components/schemas/FunctionTool'\n        - $ref: '#/components/schemas/FileSearchTool'\n        - $ref: '#/components/schemas/WebSearchPreviewTool'\n        - $ref: '#/components/schemas/ComputerUsePreviewTool'\n        - $ref: '#/components/schemas/MCPTool'\n        - $ref: '#/components/schemas/CodeInterpreterTool'\n        - $ref: '#/components/schemas/ImageGenTool'\n        - $ref: '#/components/schemas/LocalShellTool'\n        - $ref: '#/components/schemas/CustomTool'\n    ToolChoiceAllowed:\n      type: object\n      title: Allowed tools\n      description: |\n        Constrains the tools available to the model to a pre-defined set.\n      properties:\n        type:\n          type: string\n          enum:\n            - allowed_tools\n          description: Allowed tool configuration type. Always `allowed_tools`.\n          x-stainless-const: true\n        mode:\n          type: string\n          enum:\n            - auto\n            - required\n          description: |\n            Constrains the tools available to the model to a pre-defined set.\n\n            `auto` allows the model to pick from among the allowed tools and generate a\n            message.\n\n            `required` requires the model to call one or more of the allowed tools.\n        tools:\n          type: array\n          description: |\n            A list of tool definitions that the model should be allowed to call.\n\n            For the Responses API, the list of tool definitions might look like:\n            ```json\n            [\n              { \"type\": \"function\", \"name\": \"get_weather\" },\n              { \"type\": \"mcp\", \"server_label\": \"deepwiki\" },\n              { \"type\": \"image_generation\" }\n            ]\n            ```\n          items:\n            type: object\n            description: |\n              A tool definition that the model should be allowed to call.\n            additionalProperties: true\n            x-oaiExpandable: false\n      required:\n        - type\n        - mode\n        - tools\n    ToolChoiceCustom:\n      type: object\n      title: Custom tool\n      description: |\n        Use this option to force the model to call a specific custom tool.\n      properties:\n        type:\n          type: string\n          enum:\n            - custom\n          description: For custom tool calling, the type is always `custom`.\n          x-stainless-const: true\n        name:\n          type: string\n          description: The name of the custom tool to call.\n      required:\n        - type\n        - name\n    ToolChoiceFunction:\n      type: object\n      title: Function tool\n      description: |\n        Use this option to force the model to call a specific function.\n      properties:\n        type:\n          type: string\n          enum:\n            - function\n          description: For function calling, the type is always `function`.\n          x-stainless-const: true\n        name:\n          type: string\n          description: The name of the function to call.\n      required:\n        - type\n        - name\n    ToolChoiceMCP:\n      type: object\n      title: MCP tool\n      description: |\n        Use this option to force the model to call a specific tool on a remote MCP server.\n      properties:\n        type:\n          type: string\n          enum:\n            - mcp\n          description: For MCP tools, the type is always `mcp`.\n          x-stainless-const: true\n        server_label:\n          type: string\n          description: |\n            The label of the MCP server to use.\n        name:\n          type: string\n          description: |\n            The name of the tool to call on the server.\n          nullable: true\n      required:\n        - type\n        - server_label\n    ToolChoiceOptions:\n      type: string\n      title: Tool choice mode\n      description: |\n        Controls which (if any) tool is called by the model.\n\n        `none` means the model will not call any tool and instead generates a message.\n\n        `auto` means the model can pick between generating a message or calling one or\n        more tools.\n\n        `required` means the model must call one or more tools.\n      enum:\n        - none\n        - auto\n        - required\n    ToolChoiceTypes:\n      type: object\n      title: Hosted tool\n      description: |\n        Indicates that the model should use a built-in tool to generate a response.\n        [Learn more about built-in tools](https://platform.openai.com/docs/guides/tools).\n      properties:\n        type:\n          type: string\n          description: |\n            The type of hosted tool the model should to use. Learn more about\n            [built-in tools](https://platform.openai.com/docs/guides/tools).\n\n            Allowed values are:\n            - `file_search`\n            - `web_search_preview`\n            - `computer_use_preview`\n            - `code_interpreter`\n            - `image_generation`\n          enum:\n            - file_search\n            - web_search_preview\n            - computer_use_preview\n            - web_search_preview_2025_03_11\n            - image_generation\n            - code_interpreter\n      required:\n        - type\n    TranscriptTextDeltaEvent:\n      type: object\n      description: >-\n        Emitted when there is an additional text delta. This is also the first event emitted when the\n        transcription starts. Only emitted when you [create a\n        transcription](https://platform.openai.com/docs/api-reference/audio/create-transcription) with the\n        `Stream` parameter set to `true`.\n      properties:\n        type:\n          type: string\n          description: |\n            The type of the event. Always `transcript.text.delta`.\n          enum:\n            - transcript.text.delta\n          x-stainless-const: true\n        delta:\n          type: string\n          description: |\n            The text delta that was additionally transcribed.\n        logprobs:\n          type: array\n          description: >\n            The log probabilities of the delta. Only included if you [create a\n            transcription](https://platform.openai.com/docs/api-reference/audio/create-transcription) with the\n            `include[]` parameter set to `logprobs`.\n          items:\n            type: object\n            properties:\n              token:\n                type: string\n                description: |\n                  The token that was used to generate the log probability.\n              logprob:\n                type: number\n                description: |\n                  The log probability of the token.\n              bytes:\n                type: array\n                items:\n                  type: integer\n                description: |\n                  The bytes that were used to generate the log probability.\n      required:\n        - type\n        - delta\n      x-oaiMeta:\n        name: Stream Event (transcript.text.delta)\n        group: transcript\n        example: |\n          {\n            \"type\": \"transcript.text.delta\",\n            \"delta\": \" wonderful\"\n          }\n    TranscriptTextDoneEvent:\n      type: object\n      description: >-\n        Emitted when the transcription is complete. Contains the complete transcription text. Only emitted\n        when you [create a\n        transcription](https://platform.openai.com/docs/api-reference/audio/create-transcription) with the\n        `Stream` parameter set to `true`.\n      properties:\n        type:\n          type: string\n          description: |\n            The type of the event. Always `transcript.text.done`.\n          enum:\n            - transcript.text.done\n          x-stainless-const: true\n        text:\n          type: string\n          description: |\n            The text that was transcribed.\n        logprobs:\n          type: array\n          description: >\n            The log probabilities of the individual tokens in the transcription. Only included if you [create\n            a transcription](https://platform.openai.com/docs/api-reference/audio/create-transcription) with\n            the `include[]` parameter set to `logprobs`.\n          items:\n            type: object\n            properties:\n              token:\n                type: string\n                description: |\n                  The token that was used to generate the log probability.\n              logprob:\n                type: number\n                description: |\n                  The log probability of the token.\n              bytes:\n                type: array\n                items:\n                  type: integer\n                description: |\n                  The bytes that were used to generate the log probability.\n        usage:\n          $ref: '#/components/schemas/TranscriptTextUsageTokens'\n      required:\n        - type\n        - text\n      x-oaiMeta:\n        name: Stream Event (transcript.text.done)\n        group: transcript\n        example: |\n          {\n            \"type\": \"transcript.text.done\",\n            \"text\": \"I see skies of blue and clouds of white, the bright blessed days, the dark sacred nights, and I think to myself, what a wonderful world.\",\n            \"usage\": {\n              \"type\": \"tokens\",\n              \"input_tokens\": 14,\n              \"input_token_details\": {\n                \"text_tokens\": 10,\n                \"audio_tokens\": 4\n              },\n              \"output_tokens\": 31,\n              \"total_tokens\": 45\n            }\n          }\n    TranscriptTextUsageDuration:\n      type: object\n      title: Duration Usage\n      description: Usage statistics for models billed by audio input duration.\n      properties:\n        type:\n          type: string\n          enum:\n            - duration\n          description: The type of the usage object. Always `duration` for this variant.\n          x-stainless-const: true\n        seconds:\n          type: number\n          description: Duration of the input audio in seconds.\n      required:\n        - type\n        - seconds\n    TranscriptTextUsageTokens:\n      type: object\n      title: Token Usage\n      description: Usage statistics for models billed by token usage.\n      properties:\n        type:\n          type: string\n          enum:\n            - tokens\n          description: The type of the usage object. Always `tokens` for this variant.\n          x-stainless-const: true\n        input_tokens:\n          type: integer\n          description: Number of input tokens billed for this request.\n        input_token_details:\n          type: object\n          description: Details about the input tokens billed for this request.\n          properties:\n            text_tokens:\n              type: integer\n              description: Number of text tokens billed for this request.\n            audio_tokens:\n              type: integer\n              description: Number of audio tokens billed for this request.\n        output_tokens:\n          type: integer\n          description: Number of output tokens generated.\n        total_tokens:\n          type: integer\n          description: Total number of tokens used (input + output).\n      required:\n        - type\n        - input_tokens\n        - output_tokens\n        - total_tokens\n    TranscriptionChunkingStrategy:\n      description: >-\n        Controls how the audio is cut into chunks. When set to `\"auto\"`, the server first normalizes loudness\n        and then uses voice activity detection (VAD) to choose boundaries. `server_vad` object can be provided\n        to tweak VAD detection parameters manually. If unset, the audio is transcribed as a single block.\n      anyOf:\n        - type: string\n          enum:\n            - auto\n          description: |\n            Automatically set chunking parameters based on the audio. Must be set to `\"auto\"`.\n          x-stainless-const: true\n        - $ref: '#/components/schemas/VadConfig'\n      nullable: true\n      x-oaiTypeLabel: string\n    TranscriptionInclude:\n      type: string\n      enum:\n        - logprobs\n    TranscriptionSegment:\n      type: object\n      properties:\n        id:\n          type: integer\n          description: Unique identifier of the segment.\n        seek:\n          type: integer\n          description: Seek offset of the segment.\n        start:\n          type: number\n          format: float\n          description: Start time of the segment in seconds.\n        end:\n          type: number\n          format: float\n          description: End time of the segment in seconds.\n        text:\n          type: string\n          description: Text content of the segment.\n        tokens:\n          type: array\n          items:\n            type: integer\n          description: Array of token IDs for the text content.\n        temperature:\n          type: number\n          format: float\n          description: Temperature parameter used for generating the segment.\n        avg_logprob:\n          type: number\n          format: float\n          description: Average logprob of the segment. If the value is lower than -1, consider the logprobs failed.\n        compression_ratio:\n          type: number\n          format: float\n          description: >-\n            Compression ratio of the segment. If the value is greater than 2.4, consider the compression\n            failed.\n        no_speech_prob:\n          type: number\n          format: float\n          description: >-\n            Probability of no speech in the segment. If the value is higher than 1.0 and the `avg_logprob` is\n            below -1, consider this segment silent.\n      required:\n        - id\n        - seek\n        - start\n        - end\n        - text\n        - tokens\n        - temperature\n        - avg_logprob\n        - compression_ratio\n        - no_speech_prob\n    TranscriptionWord:\n      type: object\n      properties:\n        word:\n          type: string\n          description: The text content of the word.\n        start:\n          type: number\n          format: float\n          description: Start time of the word in seconds.\n        end:\n          type: number\n          format: float\n          description: End time of the word in seconds.\n      required:\n        - word\n        - start\n        - end\n    TruncationObject:\n      type: object\n      title: Thread Truncation Controls\n      description: >-\n        Controls for how a thread will be truncated prior to the run. Use this to control the initial context\n        window of the run.\n      properties:\n        type:\n          type: string\n          description: >-\n            The truncation strategy to use for the thread. The default is `auto`. If set to `last_messages`,\n            the thread will be truncated to the n most recent messages in the thread. When set to `auto`,\n            messages in the middle of the thread will be dropped to fit the context length of the model,\n            `max_prompt_tokens`.\n          enum:\n            - auto\n            - last_messages\n        last_messages:\n          type: integer\n          description: The number of most recent messages from the thread when constructing the context for the run.\n          minimum: 1\n          nullable: true\n      required:\n        - type\n    Type:\n      type: object\n      title: Type\n      description: |\n        An action to type in text.\n      properties:\n        type:\n          type: string\n          enum:\n            - type\n          default: type\n          description: |\n            Specifies the event type. For a type action, this property is\n            always set to `type`.\n          x-stainless-const: true\n        text:\n          type: string\n          description: |\n            The text to type.\n      required:\n        - type\n        - text\n    UpdateVectorStoreFileAttributesRequest:\n      type: object\n      additionalProperties: false\n      properties:\n        attributes:\n          $ref: '#/components/schemas/VectorStoreFileAttributes'\n      required:\n        - attributes\n      x-oaiMeta:\n        name: Update vector store file attributes request\n    UpdateVectorStoreRequest:\n      type: object\n      additionalProperties: false\n      properties:\n        name:\n          description: The name of the vector store.\n          type: string\n          nullable: true\n        expires_after:\n          allOf:\n            - $ref: '#/components/schemas/VectorStoreExpirationAfter'\n            - nullable: true\n        metadata:\n          $ref: '#/components/schemas/Metadata'\n    Upload:\n      type: object\n      title: Upload\n      description: |\n        The Upload object can accept byte chunks in the form of Parts.\n      properties:\n        id:\n          type: string\n          description: The Upload unique identifier, which can be referenced in API endpoints.\n        created_at:\n          type: integer\n          description: The Unix timestamp (in seconds) for when the Upload was created.\n        filename:\n          type: string\n          description: The name of the file to be uploaded.\n        bytes:\n          type: integer\n          description: The intended number of bytes to be uploaded.\n        purpose:\n          type: string\n          description: >-\n            The intended purpose of the file. [Please refer\n            here](https://platform.openai.com/docs/api-reference/files/object#files/object-purpose) for\n            acceptable values.\n        status:\n          type: string\n          description: The status of the Upload.\n          enum:\n            - pending\n            - completed\n            - cancelled\n            - expired\n        expires_at:\n          type: integer\n          description: The Unix timestamp (in seconds) for when the Upload will expire.\n        object:\n          type: string\n          description: The object type, which is always \"upload\".\n          enum:\n            - upload\n          x-stainless-const: true\n        file:\n          allOf:\n            - $ref: '#/components/schemas/OpenAIFile'\n            - nullable: true\n              description: The ready File object after the Upload is completed.\n      required:\n        - bytes\n        - created_at\n        - expires_at\n        - filename\n        - id\n        - purpose\n        - status\n        - object\n      x-oaiMeta:\n        name: The upload object\n        example: |\n          {\n            \"id\": \"upload_abc123\",\n            \"object\": \"upload\",\n            \"bytes\": 2147483648,\n            \"created_at\": 1719184911,\n            \"filename\": \"training_examples.jsonl\",\n            \"purpose\": \"fine-tune\",\n            \"status\": \"completed\",\n            \"expires_at\": 1719127296,\n            \"file\": {\n              \"id\": \"file-xyz321\",\n              \"object\": \"file\",\n              \"bytes\": 2147483648,\n              \"created_at\": 1719186911,\n              \"filename\": \"training_examples.jsonl\",\n              \"purpose\": \"fine-tune\",\n            }\n          }\n    UploadCertificateRequest:\n      type: object\n      properties:\n        name:\n          type: string\n          description: An optional name for the certificate\n        content:\n          type: string\n          description: The certificate content in PEM format\n      required:\n        - content\n    UploadPart:\n      type: object\n      title: UploadPart\n      description: |\n        The upload Part represents a chunk of bytes we can add to an Upload object.\n      properties:\n        id:\n          type: string\n          description: The upload Part unique identifier, which can be referenced in API endpoints.\n        created_at:\n          type: integer\n          description: The Unix timestamp (in seconds) for when the Part was created.\n        upload_id:\n          type: string\n          description: The ID of the Upload object that this Part was added to.\n        object:\n          type: string\n          description: The object type, which is always `upload.part`.\n          enum:\n            - upload.part\n          x-stainless-const: true\n      required:\n        - created_at\n        - id\n        - object\n        - upload_id\n      x-oaiMeta:\n        name: The upload part object\n        example: |\n          {\n              \"id\": \"part_def456\",\n              \"object\": \"upload.part\",\n              \"created_at\": 1719186911,\n              \"upload_id\": \"upload_abc123\"\n          }\n    UsageAudioSpeechesResult:\n      type: object\n      description: The aggregated audio speeches usage details of the specific time bucket.\n      properties:\n        object:\n          type: string\n          enum:\n            - organization.usage.audio_speeches.result\n          x-stainless-const: true\n        characters:\n          type: integer\n          description: The number of characters processed.\n        num_model_requests:\n          type: integer\n          description: The count of requests made to the model.\n        project_id:\n          type: string\n          nullable: true\n          description: When `group_by=project_id`, this field provides the project ID of the grouped usage result.\n        user_id:\n          type: string\n          nullable: true\n          description: When `group_by=user_id`, this field provides the user ID of the grouped usage result.\n        api_key_id:\n          type: string\n          nullable: true\n          description: When `group_by=api_key_id`, this field provides the API key ID of the grouped usage result.\n        model:\n          type: string\n          nullable: true\n          description: When `group_by=model`, this field provides the model name of the grouped usage result.\n      required:\n        - object\n        - characters\n        - num_model_requests\n      x-oaiMeta:\n        name: Audio speeches usage object\n        example: |\n          {\n              \"object\": \"organization.usage.audio_speeches.result\",\n              \"characters\": 45,\n              \"num_model_requests\": 1,\n              \"project_id\": \"proj_abc\",\n              \"user_id\": \"user-abc\",\n              \"api_key_id\": \"key_abc\",\n              \"model\": \"tts-1\"\n          }\n    UsageAudioTranscriptionsResult:\n      type: object\n      description: The aggregated audio transcriptions usage details of the specific time bucket.\n      properties:\n        object:\n          type: string\n          enum:\n            - organization.usage.audio_transcriptions.result\n          x-stainless-const: true\n        seconds:\n          type: integer\n          description: The number of seconds processed.\n        num_model_requests:\n          type: integer\n          description: The count of requests made to the model.\n        project_id:\n          type: string\n          nullable: true\n          description: When `group_by=project_id`, this field provides the project ID of the grouped usage result.\n        user_id:\n          type: string\n          nullable: true\n          description: When `group_by=user_id`, this field provides the user ID of the grouped usage result.\n        api_key_id:\n          type: string\n          nullable: true\n          description: When `group_by=api_key_id`, this field provides the API key ID of the grouped usage result.\n        model:\n          type: string\n          nullable: true\n          description: When `group_by=model`, this field provides the model name of the grouped usage result.\n      required:\n        - object\n        - seconds\n        - num_model_requests\n      x-oaiMeta:\n        name: Audio transcriptions usage object\n        example: |\n          {\n              \"object\": \"organization.usage.audio_transcriptions.result\",\n              \"seconds\": 10,\n              \"num_model_requests\": 1,\n              \"project_id\": \"proj_abc\",\n              \"user_id\": \"user-abc\",\n              \"api_key_id\": \"key_abc\",\n              \"model\": \"tts-1\"\n          }\n    UsageCodeInterpreterSessionsResult:\n      type: object\n      description: The aggregated code interpreter sessions usage details of the specific time bucket.\n      properties:\n        object:\n          type: string\n          enum:\n            - organization.usage.code_interpreter_sessions.result\n          x-stainless-const: true\n        num_sessions:\n          type: integer\n          description: The number of code interpreter sessions.\n        project_id:\n          type: string\n          nullable: true\n          description: When `group_by=project_id`, this field provides the project ID of the grouped usage result.\n      required:\n        - object\n        - sessions\n      x-oaiMeta:\n        name: Code interpreter sessions usage object\n        example: |\n          {\n              \"object\": \"organization.usage.code_interpreter_sessions.result\",\n              \"num_sessions\": 1,\n              \"project_id\": \"proj_abc\"\n          }\n    UsageCompletionsResult:\n      type: object\n      description: The aggregated completions usage details of the specific time bucket.\n      properties:\n        object:\n          type: string\n          enum:\n            - organization.usage.completions.result\n          x-stainless-const: true\n        input_tokens:\n          type: integer\n          description: >-\n            The aggregated number of text input tokens used, including cached tokens. For customers subscribe\n            to scale tier, this includes scale tier tokens.\n        input_cached_tokens:\n          type: integer\n          description: >-\n            The aggregated number of text input tokens that has been cached from previous requests. For\n            customers subscribe to scale tier, this includes scale tier tokens.\n        output_tokens:\n          type: integer\n          description: >-\n            The aggregated number of text output tokens used. For customers subscribe to scale tier, this\n            includes scale tier tokens.\n        input_audio_tokens:\n          type: integer\n          description: The aggregated number of audio input tokens used, including cached tokens.\n        output_audio_tokens:\n          type: integer\n          description: The aggregated number of audio output tokens used.\n        num_model_requests:\n          type: integer\n          description: The count of requests made to the model.\n        project_id:\n          type: string\n          nullable: true\n          description: When `group_by=project_id`, this field provides the project ID of the grouped usage result.\n        user_id:\n          type: string\n          nullable: true\n          description: When `group_by=user_id`, this field provides the user ID of the grouped usage result.\n        api_key_id:\n          type: string\n          nullable: true\n          description: When `group_by=api_key_id`, this field provides the API key ID of the grouped usage result.\n        model:\n          type: string\n          nullable: true\n          description: When `group_by=model`, this field provides the model name of the grouped usage result.\n        batch:\n          type: boolean\n          nullable: true\n          description: When `group_by=batch`, this field tells whether the grouped usage result is batch or not.\n      required:\n        - object\n        - input_tokens\n        - output_tokens\n        - num_model_requests\n      x-oaiMeta:\n        name: Completions usage object\n        example: |\n          {\n              \"object\": \"organization.usage.completions.result\",\n              \"input_tokens\": 5000,\n              \"output_tokens\": 1000,\n              \"input_cached_tokens\": 4000,\n              \"input_audio_tokens\": 300,\n              \"output_audio_tokens\": 200,\n              \"num_model_requests\": 5,\n              \"project_id\": \"proj_abc\",\n              \"user_id\": \"user-abc\",\n              \"api_key_id\": \"key_abc\",\n              \"model\": \"gpt-4o-mini-2024-07-18\",\n              \"batch\": false\n          }\n    UsageEmbeddingsResult:\n      type: object\n      description: The aggregated embeddings usage details of the specific time bucket.\n      properties:\n        object:\n          type: string\n          enum:\n            - organization.usage.embeddings.result\n          x-stainless-const: true\n        input_tokens:\n          type: integer\n          description: The aggregated number of input tokens used.\n        num_model_requests:\n          type: integer\n          description: The count of requests made to the model.\n        project_id:\n          type: string\n          nullable: true\n          description: When `group_by=project_id`, this field provides the project ID of the grouped usage result.\n        user_id:\n          type: string\n          nullable: true\n          description: When `group_by=user_id`, this field provides the user ID of the grouped usage result.\n        api_key_id:\n          type: string\n          nullable: true\n          description: When `group_by=api_key_id`, this field provides the API key ID of the grouped usage result.\n        model:\n          type: string\n          nullable: true\n          description: When `group_by=model`, this field provides the model name of the grouped usage result.\n      required:\n        - object\n        - input_tokens\n        - num_model_requests\n      x-oaiMeta:\n        name: Embeddings usage object\n        example: |\n          {\n              \"object\": \"organization.usage.embeddings.result\",\n              \"input_tokens\": 20,\n              \"num_model_requests\": 2,\n              \"project_id\": \"proj_abc\",\n              \"user_id\": \"user-abc\",\n              \"api_key_id\": \"key_abc\",\n              \"model\": \"text-embedding-ada-002-v2\"\n          }\n    UsageImagesResult:\n      type: object\n      description: The aggregated images usage details of the specific time bucket.\n      properties:\n        object:\n          type: string\n          enum:\n            - organization.usage.images.result\n          x-stainless-const: true\n        images:\n          type: integer\n          description: The number of images processed.\n        num_model_requests:\n          type: integer\n          description: The count of requests made to the model.\n        source:\n          type: string\n          nullable: true\n          description: >-\n            When `group_by=source`, this field provides the source of the grouped usage result, possible\n            values are `image.generation`, `image.edit`, `image.variation`.\n        size:\n          type: string\n          nullable: true\n          description: When `group_by=size`, this field provides the image size of the grouped usage result.\n        project_id:\n          type: string\n          nullable: true\n          description: When `group_by=project_id`, this field provides the project ID of the grouped usage result.\n        user_id:\n          type: string\n          nullable: true\n          description: When `group_by=user_id`, this field provides the user ID of the grouped usage result.\n        api_key_id:\n          type: string\n          nullable: true\n          description: When `group_by=api_key_id`, this field provides the API key ID of the grouped usage result.\n        model:\n          type: string\n          nullable: true\n          description: When `group_by=model`, this field provides the model name of the grouped usage result.\n      required:\n        - object\n        - images\n        - num_model_requests\n      x-oaiMeta:\n        name: Images usage object\n        example: |\n          {\n              \"object\": \"organization.usage.images.result\",\n              \"images\": 2,\n              \"num_model_requests\": 2,\n              \"size\": \"1024x1024\",\n              \"source\": \"image.generation\",\n              \"project_id\": \"proj_abc\",\n              \"user_id\": \"user-abc\",\n              \"api_key_id\": \"key_abc\",\n              \"model\": \"dall-e-3\"\n          }\n    UsageModerationsResult:\n      type: object\n      description: The aggregated moderations usage details of the specific time bucket.\n      properties:\n        object:\n          type: string\n          enum:\n            - organization.usage.moderations.result\n          x-stainless-const: true\n        input_tokens:\n          type: integer\n          description: The aggregated number of input tokens used.\n        num_model_requests:\n          type: integer\n          description: The count of requests made to the model.\n        project_id:\n          type: string\n          nullable: true\n          description: When `group_by=project_id`, this field provides the project ID of the grouped usage result.\n        user_id:\n          type: string\n          nullable: true\n          description: When `group_by=user_id`, this field provides the user ID of the grouped usage result.\n        api_key_id:\n          type: string\n          nullable: true\n          description: When `group_by=api_key_id`, this field provides the API key ID of the grouped usage result.\n        model:\n          type: string\n          nullable: true\n          description: When `group_by=model`, this field provides the model name of the grouped usage result.\n      required:\n        - object\n        - input_tokens\n        - num_model_requests\n      x-oaiMeta:\n        name: Moderations usage object\n        example: |\n          {\n              \"object\": \"organization.usage.moderations.result\",\n              \"input_tokens\": 20,\n              \"num_model_requests\": 2,\n              \"project_id\": \"proj_abc\",\n              \"user_id\": \"user-abc\",\n              \"api_key_id\": \"key_abc\",\n              \"model\": \"text-moderation\"\n          }\n    UsageResponse:\n      type: object\n      properties:\n        object:\n          type: string\n          enum:\n            - page\n          x-stainless-const: true\n        data:\n          type: array\n          items:\n            $ref: '#/components/schemas/UsageTimeBucket'\n        has_more:\n          type: boolean\n        next_page:\n          type: string\n      required:\n        - object\n        - data\n        - has_more\n        - next_page\n    UsageTimeBucket:\n      type: object\n      properties:\n        object:\n          type: string\n          enum:\n            - bucket\n          x-stainless-const: true\n        start_time:\n          type: integer\n        end_time:\n          type: integer\n        result:\n          type: array\n          items:\n            anyOf:\n              - $ref: '#/components/schemas/UsageCompletionsResult'\n              - $ref: '#/components/schemas/UsageEmbeddingsResult'\n              - $ref: '#/components/schemas/UsageModerationsResult'\n              - $ref: '#/components/schemas/UsageImagesResult'\n              - $ref: '#/components/schemas/UsageAudioSpeechesResult'\n              - $ref: '#/components/schemas/UsageAudioTranscriptionsResult'\n              - $ref: '#/components/schemas/UsageVectorStoresResult'\n              - $ref: '#/components/schemas/UsageCodeInterpreterSessionsResult'\n              - $ref: '#/components/schemas/CostsResult'\n            discriminator:\n              propertyName: object\n      required:\n        - object\n        - start_time\n        - end_time\n        - result\n    UsageVectorStoresResult:\n      type: object\n      description: The aggregated vector stores usage details of the specific time bucket.\n      properties:\n        object:\n          type: string\n          enum:\n            - organization.usage.vector_stores.result\n          x-stainless-const: true\n        usage_bytes:\n          type: integer\n          description: The vector stores usage in bytes.\n        project_id:\n          type: string\n          nullable: true\n          description: When `group_by=project_id`, this field provides the project ID of the grouped usage result.\n      required:\n        - object\n        - usage_bytes\n      x-oaiMeta:\n        name: Vector stores usage object\n        example: |\n          {\n              \"object\": \"organization.usage.vector_stores.result\",\n              \"usage_bytes\": 1024,\n              \"project_id\": \"proj_abc\"\n          }\n    User:\n      type: object\n      description: Represents an individual `user` within an organization.\n      properties:\n        object:\n          type: string\n          enum:\n            - organization.user\n          description: The object type, which is always `organization.user`\n          x-stainless-const: true\n        id:\n          type: string\n          description: The identifier, which can be referenced in API endpoints\n        name:\n          type: string\n          description: The name of the user\n        email:\n          type: string\n          description: The email address of the user\n        role:\n          type: string\n          enum:\n            - owner\n            - reader\n          description: '`owner` or `reader`'\n        added_at:\n          type: integer\n          description: The Unix timestamp (in seconds) of when the user was added.\n      required:\n        - object\n        - id\n        - name\n        - email\n        - role\n        - added_at\n      x-oaiMeta:\n        name: The user object\n        example: |\n          {\n              \"object\": \"organization.user\",\n              \"id\": \"user_abc\",\n              \"name\": \"First Last\",\n              \"email\": \"user@example.com\",\n              \"role\": \"owner\",\n              \"added_at\": 1711471533\n          }\n    UserDeleteResponse:\n      type: object\n      properties:\n        object:\n          type: string\n          enum:\n            - organization.user.deleted\n          x-stainless-const: true\n        id:\n          type: string\n        deleted:\n          type: boolean\n      required:\n        - object\n        - id\n        - deleted\n    UserListResponse:\n      type: object\n      properties:\n        object:\n          type: string\n          enum:\n            - list\n          x-stainless-const: true\n        data:\n          type: array\n          items:\n            $ref: '#/components/schemas/User'\n        first_id:\n          type: string\n        last_id:\n          type: string\n        has_more:\n          type: boolean\n      required:\n        - object\n        - data\n        - first_id\n        - last_id\n        - has_more\n    UserRoleUpdateRequest:\n      type: object\n      properties:\n        role:\n          type: string\n          enum:\n            - owner\n            - reader\n          description: '`owner` or `reader`'\n      required:\n        - role\n    VadConfig:\n      type: object\n      additionalProperties: false\n      required:\n        - type\n      properties:\n        type:\n          type: string\n          enum:\n            - server_vad\n          description: Must be set to `server_vad` to enable manual chunking using server side VAD.\n        prefix_padding_ms:\n          type: integer\n          default: 300\n          description: |\n            Amount of audio to include before the VAD detected speech (in\n            milliseconds).\n        silence_duration_ms:\n          type: integer\n          default: 200\n          description: |\n            Duration of silence to detect speech stop (in milliseconds).\n            With shorter values the model will respond more quickly,\n            but may jump in on short pauses from the user.\n        threshold:\n          type: number\n          default: 0.5\n          description: |\n            Sensitivity threshold (0.0 to 1.0) for voice activity detection. A\n            higher threshold will require louder audio to activate the model, and\n            thus might perform better in noisy environments.\n    ValidateGraderRequest:\n      type: object\n      title: ValidateGraderRequest\n      properties:\n        grader:\n          type: object\n          description: The grader used for the fine-tuning job.\n          anyOf:\n            - $ref: '#/components/schemas/GraderStringCheck'\n            - $ref: '#/components/schemas/GraderTextSimilarity'\n            - $ref: '#/components/schemas/GraderPython'\n            - $ref: '#/components/schemas/GraderScoreModel'\n            - $ref: '#/components/schemas/GraderMulti'\n      required:\n        - grader\n    ValidateGraderResponse:\n      type: object\n      title: ValidateGraderResponse\n      properties:\n        grader:\n          type: object\n          description: The grader used for the fine-tuning job.\n          anyOf:\n            - $ref: '#/components/schemas/GraderStringCheck'\n            - $ref: '#/components/schemas/GraderTextSimilarity'\n            - $ref: '#/components/schemas/GraderPython'\n            - $ref: '#/components/schemas/GraderScoreModel'\n            - $ref: '#/components/schemas/GraderMulti'\n    VectorStoreExpirationAfter:\n      type: object\n      title: Vector store expiration policy\n      description: The expiration policy for a vector store.\n      properties:\n        anchor:\n          description: 'Anchor timestamp after which the expiration policy applies. Supported anchors: `last_active_at`.'\n          type: string\n          enum:\n            - last_active_at\n          x-stainless-const: true\n        days:\n          description: The number of days after the anchor time that the vector store will expire.\n          type: integer\n          minimum: 1\n          maximum: 365\n      required:\n        - anchor\n        - days\n    VectorStoreFileAttributes:\n      type: object\n      description: |\n        Set of 16 key-value pairs that can be attached to an object. This can be\n        useful for storing additional information about the object in a structured\n        format, and querying for objects via API or the dashboard. Keys are strings\n        with a maximum length of 64 characters. Values are strings with a maximum\n        length of 512 characters, booleans, or numbers.\n      maxProperties: 16\n      propertyNames:\n        type: string\n        maxLength: 64\n      additionalProperties:\n        anyOf:\n          - type: string\n            maxLength: 512\n          - type: number\n          - type: boolean\n      x-oaiTypeLabel: map\n      nullable: true\n    VectorStoreFileBatchObject:\n      type: object\n      title: Vector store file batch\n      description: A batch of files attached to a vector store.\n      properties:\n        id:\n          description: The identifier, which can be referenced in API endpoints.\n          type: string\n        object:\n          description: The object type, which is always `vector_store.file_batch`.\n          type: string\n          enum:\n            - vector_store.files_batch\n          x-stainless-const: true\n        created_at:\n          description: The Unix timestamp (in seconds) for when the vector store files batch was created.\n          type: integer\n        vector_store_id:\n          description: >-\n            The ID of the [vector store](https://platform.openai.com/docs/api-reference/vector-stores/object)\n            that the [File](https://platform.openai.com/docs/api-reference/files) is attached to.\n          type: string\n        status:\n          description: >-\n            The status of the vector store files batch, which can be either `in_progress`, `completed`,\n            `cancelled` or `failed`.\n          type: string\n          enum:\n            - in_progress\n            - completed\n            - cancelled\n            - failed\n        file_counts:\n          type: object\n          properties:\n            in_progress:\n              description: The number of files that are currently being processed.\n              type: integer\n            completed:\n              description: The number of files that have been processed.\n              type: integer\n            failed:\n              description: The number of files that have failed to process.\n              type: integer\n            cancelled:\n              description: The number of files that where cancelled.\n              type: integer\n            total:\n              description: The total number of files.\n              type: integer\n          required:\n            - in_progress\n            - completed\n            - cancelled\n            - failed\n            - total\n      required:\n        - id\n        - object\n        - created_at\n        - vector_store_id\n        - status\n        - file_counts\n      x-oaiMeta:\n        name: The vector store files batch object\n        beta: true\n        example: |\n          {\n            \"id\": \"vsfb_123\",\n            \"object\": \"vector_store.files_batch\",\n            \"created_at\": 1698107661,\n            \"vector_store_id\": \"vs_abc123\",\n            \"status\": \"completed\",\n            \"file_counts\": {\n              \"in_progress\": 0,\n              \"completed\": 100,\n              \"failed\": 0,\n              \"cancelled\": 0,\n              \"total\": 100\n            }\n          }\n    VectorStoreFileContentResponse:\n      type: object\n      description: Represents the parsed content of a vector store file.\n      properties:\n        object:\n          type: string\n          enum:\n            - vector_store.file_content.page\n          description: The object type, which is always `vector_store.file_content.page`\n          x-stainless-const: true\n        data:\n          type: array\n          description: Parsed content of the file.\n          items:\n            type: object\n            properties:\n              type:\n                type: string\n                description: The content type (currently only `\"text\"`)\n              text:\n                type: string\n                description: The text content\n        has_more:\n          type: boolean\n          description: Indicates if there are more content pages to fetch.\n        next_page:\n          type: string\n          description: The token for the next page, if any.\n          nullable: true\n      required:\n        - object\n        - data\n        - has_more\n        - next_page\n    VectorStoreFileObject:\n      type: object\n      title: Vector store files\n      description: A list of files attached to a vector store.\n      properties:\n        id:\n          description: The identifier, which can be referenced in API endpoints.\n          type: string\n        object:\n          description: The object type, which is always `vector_store.file`.\n          type: string\n          enum:\n            - vector_store.file\n          x-stainless-const: true\n        usage_bytes:\n          description: >-\n            The total vector store usage in bytes. Note that this may be different from the original file\n            size.\n          type: integer\n        created_at:\n          description: The Unix timestamp (in seconds) for when the vector store file was created.\n          type: integer\n        vector_store_id:\n          description: >-\n            The ID of the [vector store](https://platform.openai.com/docs/api-reference/vector-stores/object)\n            that the [File](https://platform.openai.com/docs/api-reference/files) is attached to.\n          type: string\n        status:\n          description: >-\n            The status of the vector store file, which can be either `in_progress`, `completed`, `cancelled`,\n            or `failed`. The status `completed` indicates that the vector store file is ready for use.\n          type: string\n          enum:\n            - in_progress\n            - completed\n            - cancelled\n            - failed\n        last_error:\n          type: object\n          description: The last error associated with this vector store file. Will be `null` if there are no errors.\n          nullable: true\n          properties:\n            code:\n              type: string\n              description: One of `server_error` or `rate_limit_exceeded`.\n              enum:\n                - server_error\n                - unsupported_file\n                - invalid_file\n            message:\n              type: string\n              description: A human-readable description of the error.\n          required:\n            - code\n            - message\n        chunking_strategy:\n          $ref: '#/components/schemas/ChunkingStrategyResponse'\n        attributes:\n          $ref: '#/components/schemas/VectorStoreFileAttributes'\n      required:\n        - id\n        - object\n        - usage_bytes\n        - created_at\n        - vector_store_id\n        - status\n        - last_error\n      x-oaiMeta:\n        name: The vector store file object\n        beta: true\n        example: |\n          {\n            \"id\": \"file-abc123\",\n            \"object\": \"vector_store.file\",\n            \"usage_bytes\": 1234,\n            \"created_at\": 1698107661,\n            \"vector_store_id\": \"vs_abc123\",\n            \"status\": \"completed\",\n            \"last_error\": null,\n            \"chunking_strategy\": {\n              \"type\": \"static\",\n              \"static\": {\n                \"max_chunk_size_tokens\": 800,\n                \"chunk_overlap_tokens\": 400\n              }\n            }\n          }\n    VectorStoreObject:\n      type: object\n      title: Vector store\n      description: A vector store is a collection of processed files can be used by the `file_search` tool.\n      properties:\n        id:\n          description: The identifier, which can be referenced in API endpoints.\n          type: string\n        object:\n          description: The object type, which is always `vector_store`.\n          type: string\n          enum:\n            - vector_store\n          x-stainless-const: true\n        created_at:\n          description: The Unix timestamp (in seconds) for when the vector store was created.\n          type: integer\n        name:\n          description: The name of the vector store.\n          type: string\n        usage_bytes:\n          description: The total number of bytes used by the files in the vector store.\n          type: integer\n        file_counts:\n          type: object\n          properties:\n            in_progress:\n              description: The number of files that are currently being processed.\n              type: integer\n            completed:\n              description: The number of files that have been successfully processed.\n              type: integer\n            failed:\n              description: The number of files that have failed to process.\n              type: integer\n            cancelled:\n              description: The number of files that were cancelled.\n              type: integer\n            total:\n              description: The total number of files.\n              type: integer\n          required:\n            - in_progress\n            - completed\n            - failed\n            - cancelled\n            - total\n        status:\n          description: >-\n            The status of the vector store, which can be either `expired`, `in_progress`, or `completed`. A\n            status of `completed` indicates that the vector store is ready for use.\n          type: string\n          enum:\n            - expired\n            - in_progress\n            - completed\n        expires_after:\n          $ref: '#/components/schemas/VectorStoreExpirationAfter'\n        expires_at:\n          description: The Unix timestamp (in seconds) for when the vector store will expire.\n          type: integer\n          nullable: true\n        last_active_at:\n          description: The Unix timestamp (in seconds) for when the vector store was last active.\n          type: integer\n          nullable: true\n        metadata:\n          $ref: '#/components/schemas/Metadata'\n      required:\n        - id\n        - object\n        - usage_bytes\n        - created_at\n        - status\n        - last_active_at\n        - name\n        - file_counts\n        - metadata\n      x-oaiMeta:\n        name: The vector store object\n        example: |\n          {\n            \"id\": \"vs_123\",\n            \"object\": \"vector_store\",\n            \"created_at\": 1698107661,\n            \"usage_bytes\": 123456,\n            \"last_active_at\": 1698107661,\n            \"name\": \"my_vector_store\",\n            \"status\": \"completed\",\n            \"file_counts\": {\n              \"in_progress\": 0,\n              \"completed\": 100,\n              \"cancelled\": 0,\n              \"failed\": 0,\n              \"total\": 100\n            },\n            \"last_used_at\": 1698107661\n          }\n    VectorStoreSearchRequest:\n      type: object\n      additionalProperties: false\n      properties:\n        query:\n          description: A query string for a search\n          anyOf:\n            - type: string\n            - type: array\n              items:\n                type: string\n                description: A list of queries to search for.\n                minItems: 1\n        rewrite_query:\n          description: Whether to rewrite the natural language query for vector search.\n          type: boolean\n          default: false\n        max_num_results:\n          description: The maximum number of results to return. This number should be between 1 and 50 inclusive.\n          type: integer\n          default: 10\n          minimum: 1\n          maximum: 50\n        filters:\n          description: A filter to apply based on file attributes.\n          anyOf:\n            - $ref: '#/components/schemas/ComparisonFilter'\n            - $ref: '#/components/schemas/CompoundFilter'\n        ranking_options:\n          description: Ranking options for search.\n          type: object\n          additionalProperties: false\n          properties:\n            ranker:\n              description: Enable re-ranking; set to `none` to disable, which can help reduce latency.\n              type: string\n              enum:\n                - none\n                - auto\n                - default-2024-11-15\n              default: auto\n            score_threshold:\n              type: number\n              minimum: 0\n              maximum: 1\n              default: 0\n      required:\n        - query\n      x-oaiMeta:\n        name: Vector store search request\n    VectorStoreSearchResultContentObject:\n      type: object\n      additionalProperties: false\n      properties:\n        type:\n          description: The type of content.\n          type: string\n          enum:\n            - text\n        text:\n          description: The text content returned from search.\n          type: string\n      required:\n        - type\n        - text\n      x-oaiMeta:\n        name: Vector store search result content object\n    VectorStoreSearchResultItem:\n      type: object\n      additionalProperties: false\n      properties:\n        file_id:\n          type: string\n          description: The ID of the vector store file.\n        filename:\n          type: string\n          description: The name of the vector store file.\n        score:\n          type: number\n          description: The similarity score for the result.\n          minimum: 0\n          maximum: 1\n        attributes:\n          $ref: '#/components/schemas/VectorStoreFileAttributes'\n        content:\n          type: array\n          description: Content chunks from the file.\n          items:\n            $ref: '#/components/schemas/VectorStoreSearchResultContentObject'\n      required:\n        - file_id\n        - filename\n        - score\n        - attributes\n        - content\n      x-oaiMeta:\n        name: Vector store search result item\n    VectorStoreSearchResultsPage:\n      type: object\n      additionalProperties: false\n      properties:\n        object:\n          type: string\n          enum:\n            - vector_store.search_results.page\n          description: The object type, which is always `vector_store.search_results.page`\n          x-stainless-const: true\n        search_query:\n          type: array\n          items:\n            type: string\n            description: The query used for this search.\n            minItems: 1\n        data:\n          type: array\n          description: The list of search result items.\n          items:\n            $ref: '#/components/schemas/VectorStoreSearchResultItem'\n        has_more:\n          type: boolean\n          description: Indicates if there are more results to fetch.\n        next_page:\n          type: string\n          description: The token for the next page, if any.\n          nullable: true\n      required:\n        - object\n        - search_query\n        - data\n        - has_more\n        - next_page\n      x-oaiMeta:\n        name: Vector store search results page\n    Verbosity:\n      type: string\n      enum:\n        - low\n        - medium\n        - high\n      default: medium\n      nullable: true\n      description: |\n        Constrains the verbosity of the model's response. Lower values will result in\n        more concise responses, while higher values will result in more verbose responses.\n        Currently supported values are `low`, `medium`, and `high`.\n    VoiceIdsShared:\n      example: ash\n      anyOf:\n        - type: string\n        - type: string\n          enum:\n            - alloy\n            - ash\n            - ballad\n            - coral\n            - echo\n            - sage\n            - shimmer\n            - verse\n    Wait:\n      type: object\n      title: Wait\n      description: |\n        A wait action.\n      properties:\n        type:\n          type: string\n          enum:\n            - wait\n          default: wait\n          description: |\n            Specifies the event type. For a wait action, this property is\n            always set to `wait`.\n          x-stainless-const: true\n      required:\n        - type\n    WebSearchActionFind:\n      type: object\n      title: Find action\n      description: |\n        Action type \"find\": Searches for a pattern within a loaded page.\n      properties:\n        type:\n          type: string\n          enum:\n            - find\n          description: |\n            The action type.\n          x-stainless-const: true\n        url:\n          type: string\n          format: uri\n          description: |\n            The URL of the page searched for the pattern.\n        pattern:\n          type: string\n          description: |\n            The pattern or text to search for within the page.\n      required:\n        - type\n        - url\n        - pattern\n    WebSearchActionOpenPage:\n      type: object\n      title: Open page action\n      description: |\n        Action type \"open_page\" - Opens a specific URL from search results.\n      properties:\n        type:\n          type: string\n          enum:\n            - open_page\n          description: |\n            The action type.\n          x-stainless-const: true\n        url:\n          type: string\n          format: uri\n          description: |\n            The URL opened by the model.\n      required:\n        - type\n        - url\n    WebSearchActionSearch:\n      type: object\n      title: Search action\n      description: |\n        Action type \"search\" - Performs a web search query.\n      properties:\n        type:\n          type: string\n          enum:\n            - search\n          description: |\n            The action type.\n          x-stainless-const: true\n        query:\n          type: string\n          description: |\n            The search query.\n      required:\n        - type\n        - query\n    WebSearchContextSize:\n      type: string\n      description: |\n        High level guidance for the amount of context window space to use for the\n        search. One of `low`, `medium`, or `high`. `medium` is the default.\n      enum:\n        - low\n        - medium\n        - high\n      default: medium\n    WebSearchLocation:\n      type: object\n      title: Web search location\n      description: Approximate location parameters for the search.\n      properties:\n        country:\n          type: string\n          description: |\n            The two-letter\n            [ISO country code](https://en.wikipedia.org/wiki/ISO_3166-1) of the user,\n            e.g. `US`.\n        region:\n          type: string\n          description: |\n            Free text input for the region of the user, e.g. `California`.\n        city:\n          type: string\n          description: |\n            Free text input for the city of the user, e.g. `San Francisco`.\n        timezone:\n          type: string\n          description: |\n            The [IANA timezone](https://timeapi.io/documentation/iana-timezones)\n            of the user, e.g. `America/Los_Angeles`.\n    WebSearchToolCall:\n      type: object\n      title: Web search tool call\n      description: |\n        The results of a web search tool call. See the\n        [web search guide](https://platform.openai.com/docs/guides/tools-web-search) for more information.\n      properties:\n        id:\n          type: string\n          description: |\n            The unique ID of the web search tool call.\n        type:\n          type: string\n          enum:\n            - web_search_call\n          description: |\n            The type of the web search tool call. Always `web_search_call`.\n          x-stainless-const: true\n        status:\n          type: string\n          description: |\n            The status of the web search tool call.\n          enum:\n            - in_progress\n            - searching\n            - completed\n            - failed\n        action:\n          type: object\n          description: |\n            An object describing the specific action taken in this web search call.\n            Includes details on how the model used the web (search, open_page, find).\n          anyOf:\n            - $ref: '#/components/schemas/WebSearchActionSearch'\n            - $ref: '#/components/schemas/WebSearchActionOpenPage'\n            - $ref: '#/components/schemas/WebSearchActionFind'\n          discriminator:\n            propertyName: type\n      required:\n        - id\n        - type\n        - status\n        - action\n    WebhookBatchCancelled:\n      type: object\n      title: batch.cancelled\n      description: |\n        Sent when a batch API request has been cancelled.\n      required:\n        - created_at\n        - id\n        - data\n        - type\n      properties:\n        created_at:\n          type: integer\n          description: |\n            The Unix timestamp (in seconds) of when the batch API request was cancelled.\n        id:\n          type: string\n          description: |\n            The unique ID of the event.\n        data:\n          type: object\n          description: |\n            Event data payload.\n          required:\n            - id\n          properties:\n            id:\n              type: string\n              description: |\n                The unique ID of the batch API request.\n        object:\n          type: string\n          description: |\n            The object of the event. Always `event`.\n          enum:\n            - event\n          x-stainless-const: true\n        type:\n          type: string\n          description: |\n            The type of the event. Always `batch.cancelled`.\n          enum:\n            - batch.cancelled\n          x-stainless-const: true\n      x-oaiMeta:\n        name: batch.cancelled\n        group: webhook-events\n        example: |\n          {\n            \"id\": \"evt_abc123\",\n            \"type\": \"batch.cancelled\",\n            \"created_at\": 1719168000,\n            \"data\": {\n              \"id\": \"batch_abc123\"\n            }\n          }\n    WebhookBatchCompleted:\n      type: object\n      title: batch.completed\n      description: |\n        Sent when a batch API request has been completed.\n      required:\n        - created_at\n        - id\n        - data\n        - type\n      properties:\n        created_at:\n          type: integer\n          description: |\n            The Unix timestamp (in seconds) of when the batch API request was completed.\n        id:\n          type: string\n          description: |\n            The unique ID of the event.\n        data:\n          type: object\n          description: |\n            Event data payload.\n          required:\n            - id\n          properties:\n            id:\n              type: string\n              description: |\n                The unique ID of the batch API request.\n        object:\n          type: string\n          description: |\n            The object of the event. Always `event`.\n          enum:\n            - event\n          x-stainless-const: true\n        type:\n          type: string\n          description: |\n            The type of the event. Always `batch.completed`.\n          enum:\n            - batch.completed\n          x-stainless-const: true\n      x-oaiMeta:\n        name: batch.completed\n        group: webhook-events\n        example: |\n          {\n            \"id\": \"evt_abc123\",\n            \"type\": \"batch.completed\",\n            \"created_at\": 1719168000,\n            \"data\": {\n              \"id\": \"batch_abc123\"\n            }\n          }\n    WebhookBatchExpired:\n      type: object\n      title: batch.expired\n      description: |\n        Sent when a batch API request has expired.\n      required:\n        - created_at\n        - id\n        - data\n        - type\n      properties:\n        created_at:\n          type: integer\n          description: |\n            The Unix timestamp (in seconds) of when the batch API request expired.\n        id:\n          type: string\n          description: |\n            The unique ID of the event.\n        data:\n          type: object\n          description: |\n            Event data payload.\n          required:\n            - id\n          properties:\n            id:\n              type: string\n              description: |\n                The unique ID of the batch API request.\n        object:\n          type: string\n          description: |\n            The object of the event. Always `event`.\n          enum:\n            - event\n          x-stainless-const: true\n        type:\n          type: string\n          description: |\n            The type of the event. Always `batch.expired`.\n          enum:\n            - batch.expired\n          x-stainless-const: true\n      x-oaiMeta:\n        name: batch.expired\n        group: webhook-events\n        example: |\n          {\n            \"id\": \"evt_abc123\",\n            \"type\": \"batch.expired\",\n            \"created_at\": 1719168000,\n            \"data\": {\n              \"id\": \"batch_abc123\"\n            }\n          }\n    WebhookBatchFailed:\n      type: object\n      title: batch.failed\n      description: |\n        Sent when a batch API request has failed.\n      required:\n        - created_at\n        - id\n        - data\n        - type\n      properties:\n        created_at:\n          type: integer\n          description: |\n            The Unix timestamp (in seconds) of when the batch API request failed.\n        id:\n          type: string\n          description: |\n            The unique ID of the event.\n        data:\n          type: object\n          description: |\n            Event data payload.\n          required:\n            - id\n          properties:\n            id:\n              type: string\n              description: |\n                The unique ID of the batch API request.\n        object:\n          type: string\n          description: |\n            The object of the event. Always `event`.\n          enum:\n            - event\n          x-stainless-const: true\n        type:\n          type: string\n          description: |\n            The type of the event. Always `batch.failed`.\n          enum:\n            - batch.failed\n          x-stainless-const: true\n      x-oaiMeta:\n        name: batch.failed\n        group: webhook-events\n        example: |\n          {\n            \"id\": \"evt_abc123\",\n            \"type\": \"batch.failed\",\n            \"created_at\": 1719168000,\n            \"data\": {\n              \"id\": \"batch_abc123\"\n            }\n          }\n    WebhookEvalRunCanceled:\n      type: object\n      title: eval.run.canceled\n      description: |\n        Sent when an eval run has been canceled.\n      required:\n        - created_at\n        - id\n        - data\n        - type\n      properties:\n        created_at:\n          type: integer\n          description: |\n            The Unix timestamp (in seconds) of when the eval run was canceled.\n        id:\n          type: string\n          description: |\n            The unique ID of the event.\n        data:\n          type: object\n          description: |\n            Event data payload.\n          required:\n            - id\n          properties:\n            id:\n              type: string\n              description: |\n                The unique ID of the eval run.\n        object:\n          type: string\n          description: |\n            The object of the event. Always `event`.\n          enum:\n            - event\n          x-stainless-const: true\n        type:\n          type: string\n          description: |\n            The type of the event. Always `eval.run.canceled`.\n          enum:\n            - eval.run.canceled\n          x-stainless-const: true\n      x-oaiMeta:\n        name: eval.run.canceled\n        group: webhook-events\n        example: |\n          {\n            \"id\": \"evt_abc123\",\n            \"type\": \"eval.run.canceled\",\n            \"created_at\": 1719168000,\n            \"data\": {\n              \"id\": \"evalrun_abc123\"\n            }\n          }\n    WebhookEvalRunFailed:\n      type: object\n      title: eval.run.failed\n      description: |\n        Sent when an eval run has failed.\n      required:\n        - created_at\n        - id\n        - data\n        - type\n      properties:\n        created_at:\n          type: integer\n          description: |\n            The Unix timestamp (in seconds) of when the eval run failed.\n        id:\n          type: string\n          description: |\n            The unique ID of the event.\n        data:\n          type: object\n          description: |\n            Event data payload.\n          required:\n            - id\n          properties:\n            id:\n              type: string\n              description: |\n                The unique ID of the eval run.\n        object:\n          type: string\n          description: |\n            The object of the event. Always `event`.\n          enum:\n            - event\n          x-stainless-const: true\n        type:\n          type: string\n          description: |\n            The type of the event. Always `eval.run.failed`.\n          enum:\n            - eval.run.failed\n          x-stainless-const: true\n      x-oaiMeta:\n        name: eval.run.failed\n        group: webhook-events\n        example: |\n          {\n            \"id\": \"evt_abc123\",\n            \"type\": \"eval.run.failed\",\n            \"created_at\": 1719168000,\n            \"data\": {\n              \"id\": \"evalrun_abc123\"\n            }\n          }\n    WebhookEvalRunSucceeded:\n      type: object\n      title: eval.run.succeeded\n      description: |\n        Sent when an eval run has succeeded.\n      required:\n        - created_at\n        - id\n        - data\n        - type\n      properties:\n        created_at:\n          type: integer\n          description: |\n            The Unix timestamp (in seconds) of when the eval run succeeded.\n        id:\n          type: string\n          description: |\n            The unique ID of the event.\n        data:\n          type: object\n          description: |\n            Event data payload.\n          required:\n            - id\n          properties:\n            id:\n              type: string\n              description: |\n                The unique ID of the eval run.\n        object:\n          type: string\n          description: |\n            The object of the event. Always `event`.\n          enum:\n            - event\n          x-stainless-const: true\n        type:\n          type: string\n          description: |\n            The type of the event. Always `eval.run.succeeded`.\n          enum:\n            - eval.run.succeeded\n          x-stainless-const: true\n      x-oaiMeta:\n        name: eval.run.succeeded\n        group: webhook-events\n        example: |\n          {\n            \"id\": \"evt_abc123\",\n            \"type\": \"eval.run.succeeded\",\n            \"created_at\": 1719168000,\n            \"data\": {\n              \"id\": \"evalrun_abc123\"\n            }\n          }\n    WebhookFineTuningJobCancelled:\n      type: object\n      title: fine_tuning.job.cancelled\n      description: |\n        Sent when a fine-tuning job has been cancelled.\n      required:\n        - created_at\n        - id\n        - data\n        - type\n      properties:\n        created_at:\n          type: integer\n          description: |\n            The Unix timestamp (in seconds) of when the fine-tuning job was cancelled.\n        id:\n          type: string\n          description: |\n            The unique ID of the event.\n        data:\n          type: object\n          description: |\n            Event data payload.\n          required:\n            - id\n          properties:\n            id:\n              type: string\n              description: |\n                The unique ID of the fine-tuning job.\n        object:\n          type: string\n          description: |\n            The object of the event. Always `event`.\n          enum:\n            - event\n          x-stainless-const: true\n        type:\n          type: string\n          description: |\n            The type of the event. Always `fine_tuning.job.cancelled`.\n          enum:\n            - fine_tuning.job.cancelled\n          x-stainless-const: true\n      x-oaiMeta:\n        name: fine_tuning.job.cancelled\n        group: webhook-events\n        example: |\n          {\n            \"id\": \"evt_abc123\",\n            \"type\": \"fine_tuning.job.cancelled\",\n            \"created_at\": 1719168000,\n            \"data\": {\n              \"id\": \"ftjob_abc123\"\n            }\n          }\n    WebhookFineTuningJobFailed:\n      type: object\n      title: fine_tuning.job.failed\n      description: |\n        Sent when a fine-tuning job has failed.\n      required:\n        - created_at\n        - id\n        - data\n        - type\n      properties:\n        created_at:\n          type: integer\n          description: |\n            The Unix timestamp (in seconds) of when the fine-tuning job failed.\n        id:\n          type: string\n          description: |\n            The unique ID of the event.\n        data:\n          type: object\n          description: |\n            Event data payload.\n          required:\n            - id\n          properties:\n            id:\n              type: string\n              description: |\n                The unique ID of the fine-tuning job.\n        object:\n          type: string\n          description: |\n            The object of the event. Always `event`.\n          enum:\n            - event\n          x-stainless-const: true\n        type:\n          type: string\n          description: |\n            The type of the event. Always `fine_tuning.job.failed`.\n          enum:\n            - fine_tuning.job.failed\n          x-stainless-const: true\n      x-oaiMeta:\n        name: fine_tuning.job.failed\n        group: webhook-events\n        example: |\n          {\n            \"id\": \"evt_abc123\",\n            \"type\": \"fine_tuning.job.failed\",\n            \"created_at\": 1719168000,\n            \"data\": {\n              \"id\": \"ftjob_abc123\"\n            }\n          }\n    WebhookFineTuningJobSucceeded:\n      type: object\n      title: fine_tuning.job.succeeded\n      description: |\n        Sent when a fine-tuning job has succeeded.\n      required:\n        - created_at\n        - id\n        - data\n        - type\n      properties:\n        created_at:\n          type: integer\n          description: |\n            The Unix timestamp (in seconds) of when the fine-tuning job succeeded.\n        id:\n          type: string\n          description: |\n            The unique ID of the event.\n        data:\n          type: object\n          description: |\n            Event data payload.\n          required:\n            - id\n          properties:\n            id:\n              type: string\n              description: |\n                The unique ID of the fine-tuning job.\n        object:\n          type: string\n          description: |\n            The object of the event. Always `event`.\n          enum:\n            - event\n          x-stainless-const: true\n        type:\n          type: string\n          description: |\n            The type of the event. Always `fine_tuning.job.succeeded`.\n          enum:\n            - fine_tuning.job.succeeded\n          x-stainless-const: true\n      x-oaiMeta:\n        name: fine_tuning.job.succeeded\n        group: webhook-events\n        example: |\n          {\n            \"id\": \"evt_abc123\",\n            \"type\": \"fine_tuning.job.succeeded\",\n            \"created_at\": 1719168000,\n            \"data\": {\n              \"id\": \"ftjob_abc123\"\n            }\n          }\n    WebhookResponseCancelled:\n      type: object\n      title: response.cancelled\n      description: |\n        Sent when a background response has been cancelled.\n      required:\n        - created_at\n        - id\n        - data\n        - type\n      properties:\n        created_at:\n          type: integer\n          description: |\n            The Unix timestamp (in seconds) of when the model response was cancelled.\n        id:\n          type: string\n          description: |\n            The unique ID of the event.\n        data:\n          type: object\n          description: |\n            Event data payload.\n          required:\n            - id\n          properties:\n            id:\n              type: string\n              description: |\n                The unique ID of the model response.\n        object:\n          type: string\n          description: |\n            The object of the event. Always `event`.\n          enum:\n            - event\n          x-stainless-const: true\n        type:\n          type: string\n          description: |\n            The type of the event. Always `response.cancelled`.\n          enum:\n            - response.cancelled\n          x-stainless-const: true\n      x-oaiMeta:\n        name: response.cancelled\n        group: webhook-events\n        example: |\n          {\n            \"id\": \"evt_abc123\",\n            \"type\": \"response.cancelled\",\n            \"created_at\": 1719168000,\n            \"data\": {\n              \"id\": \"resp_abc123\"\n            }\n          }\n    WebhookResponseCompleted:\n      type: object\n      title: response.completed\n      description: |\n        Sent when a background response has been completed.\n      required:\n        - created_at\n        - id\n        - data\n        - type\n      properties:\n        created_at:\n          type: integer\n          description: |\n            The Unix timestamp (in seconds) of when the model response was completed.\n        id:\n          type: string\n          description: |\n            The unique ID of the event.\n        data:\n          type: object\n          description: |\n            Event data payload.\n          required:\n            - id\n          properties:\n            id:\n              type: string\n              description: |\n                The unique ID of the model response.\n        object:\n          type: string\n          description: |\n            The object of the event. Always `event`.\n          enum:\n            - event\n          x-stainless-const: true\n        type:\n          type: string\n          description: |\n            The type of the event. Always `response.completed`.\n          enum:\n            - response.completed\n          x-stainless-const: true\n      x-oaiMeta:\n        name: response.completed\n        group: webhook-events\n        example: |\n          {\n            \"id\": \"evt_abc123\",\n            \"type\": \"response.completed\",\n            \"created_at\": 1719168000,\n            \"data\": {\n              \"id\": \"resp_abc123\"\n            }\n          }\n    WebhookResponseFailed:\n      type: object\n      title: response.failed\n      description: |\n        Sent when a background response has failed.\n      required:\n        - created_at\n        - id\n        - data\n        - type\n      properties:\n        created_at:\n          type: integer\n          description: |\n            The Unix timestamp (in seconds) of when the model response failed.\n        id:\n          type: string\n          description: |\n            The unique ID of the event.\n        data:\n          type: object\n          description: |\n            Event data payload.\n          required:\n            - id\n          properties:\n            id:\n              type: string\n              description: |\n                The unique ID of the model response.\n        object:\n          type: string\n          description: |\n            The object of the event. Always `event`.\n          enum:\n            - event\n          x-stainless-const: true\n        type:\n          type: string\n          description: |\n            The type of the event. Always `response.failed`.\n          enum:\n            - response.failed\n          x-stainless-const: true\n      x-oaiMeta:\n        name: response.failed\n        group: webhook-events\n        example: |\n          {\n            \"id\": \"evt_abc123\",\n            \"type\": \"response.failed\",\n            \"created_at\": 1719168000,\n            \"data\": {\n              \"id\": \"resp_abc123\"\n            }\n          }\n    WebhookResponseIncomplete:\n      type: object\n      title: response.incomplete\n      description: |\n        Sent when a background response has been interrupted.\n      required:\n        - created_at\n        - id\n        - data\n        - type\n      properties:\n        created_at:\n          type: integer\n          description: |\n            The Unix timestamp (in seconds) of when the model response was interrupted.\n        id:\n          type: string\n          description: |\n            The unique ID of the event.\n        data:\n          type: object\n          description: |\n            Event data payload.\n          required:\n            - id\n          properties:\n            id:\n              type: string\n              description: |\n                The unique ID of the model response.\n        object:\n          type: string\n          description: |\n            The object of the event. Always `event`.\n          enum:\n            - event\n          x-stainless-const: true\n        type:\n          type: string\n          description: |\n            The type of the event. Always `response.incomplete`.\n          enum:\n            - response.incomplete\n          x-stainless-const: true\n      x-oaiMeta:\n        name: response.incomplete\n        group: webhook-events\n        example: |\n          {\n            \"id\": \"evt_abc123\",\n            \"type\": \"response.incomplete\",\n            \"created_at\": 1719168000,\n            \"data\": {\n              \"id\": \"resp_abc123\"\n            }\n          }\n    InputTextContent:\n      properties:\n        type:\n          type: string\n          enum:\n            - input_text\n          description: The type of the input item. Always `input_text`.\n          default: input_text\n          x-stainless-const: true\n        text:\n          type: string\n          description: The text input to the model.\n      type: object\n      required:\n        - type\n        - text\n      title: Input text\n      description: A text input to the model.\n    InputImageContent:\n      properties:\n        type:\n          type: string\n          enum:\n            - input_image\n          description: The type of the input item. Always `input_image`.\n          default: input_image\n          x-stainless-const: true\n        image_url:\n          anyOf:\n            - type: string\n              description: >-\n                The URL of the image to be sent to the model. A fully qualified URL or base64 encoded image in\n                a data URL.\n            - type: 'null'\n        file_id:\n          anyOf:\n            - type: string\n              description: The ID of the file to be sent to the model.\n            - type: 'null'\n        detail:\n          type: string\n          enum:\n            - low\n            - high\n            - auto\n          description: >-\n            The detail level of the image to be sent to the model. One of `high`, `low`, or `auto`. Defaults\n            to `auto`.\n      type: object\n      required:\n        - type\n        - detail\n      title: Input image\n      description: >-\n        An image input to the model. Learn about [image\n        inputs](https://platform.openai.com/docs/guides/vision).\n    InputFileContent:\n      properties:\n        type:\n          type: string\n          enum:\n            - input_file\n          description: The type of the input item. Always `input_file`.\n          default: input_file\n          x-stainless-const: true\n        file_id:\n          anyOf:\n            - type: string\n              description: The ID of the file to be sent to the model.\n            - type: 'null'\n        filename:\n          type: string\n          description: The name of the file to be sent to the model.\n        file_url:\n          type: string\n          description: The URL of the file to be sent to the model.\n        file_data:\n          type: string\n          description: |\n            The content of the file to be sent to the model.\n      type: object\n      required:\n        - type\n      title: Input file\n      description: A file input to the model.\n    FunctionTool:\n      properties:\n        type:\n          type: string\n          enum:\n            - function\n          description: The type of the function tool. Always `function`.\n          default: function\n          x-stainless-const: true\n        name:\n          type: string\n          description: The name of the function to call.\n        description:\n          anyOf:\n            - type: string\n              description: >-\n                A description of the function. Used by the model to determine whether or not to call the\n                function.\n            - type: 'null'\n        parameters:\n          anyOf:\n            - additionalProperties: {}\n              type: object\n              description: A JSON schema object describing the parameters of the function.\n            - type: 'null'\n        strict:\n          anyOf:\n            - type: boolean\n              description: Whether to enforce strict parameter validation. Default `true`.\n            - type: 'null'\n      type: object\n      required:\n        - type\n        - name\n        - strict\n        - parameters\n      title: Function\n      description: >-\n        Defines a function in your own code the model can choose to call. Learn more about [function\n        calling](https://platform.openai.com/docs/guides/function-calling).\n    RankingOptions:\n      properties:\n        ranker:\n          type: string\n          enum:\n            - auto\n            - default-2024-11-15\n          description: The ranker to use for the file search.\n        score_threshold:\n          type: number\n          description: >-\n            The score threshold for the file search, a number between 0 and 1. Numbers closer to 1 will\n            attempt to return only the most relevant results, but may return fewer results.\n      type: object\n      required: []\n    Filters:\n      anyOf:\n        - $ref: '#/components/schemas/ComparisonFilter'\n        - $ref: '#/components/schemas/CompoundFilter'\n    FileSearchTool:\n      properties:\n        type:\n          type: string\n          enum:\n            - file_search\n          description: The type of the file search tool. Always `file_search`.\n          default: file_search\n          x-stainless-const: true\n        vector_store_ids:\n          items:\n            type: string\n          type: array\n          description: The IDs of the vector stores to search.\n        max_num_results:\n          type: integer\n          description: The maximum number of results to return. This number should be between 1 and 50 inclusive.\n        ranking_options:\n          $ref: '#/components/schemas/RankingOptions'\n          description: Ranking options for search.\n        filters:\n          anyOf:\n            - $ref: '#/components/schemas/Filters'\n              description: A filter to apply.\n            - type: 'null'\n      type: object\n      required:\n        - type\n        - vector_store_ids\n      title: File search\n      description: >-\n        A tool that searches for relevant content from uploaded files. Learn more about the [file search\n        tool](https://platform.openai.com/docs/guides/tools-file-search).\n    ApproximateLocation:\n      properties:\n        type:\n          type: string\n          enum:\n            - approximate\n          description: The type of location approximation. Always `approximate`.\n          default: approximate\n          x-stainless-const: true\n        country:\n          anyOf:\n            - type: string\n              description: >-\n                The two-letter [ISO country code](https://en.wikipedia.org/wiki/ISO_3166-1) of the user, e.g.\n                `US`.\n            - type: 'null'\n        region:\n          anyOf:\n            - type: string\n              description: Free text input for the region of the user, e.g. `California`.\n            - type: 'null'\n        city:\n          anyOf:\n            - type: string\n              description: Free text input for the city of the user, e.g. `San Francisco`.\n            - type: 'null'\n        timezone:\n          anyOf:\n            - type: string\n              description: >-\n                The [IANA timezone](https://timeapi.io/documentation/iana-timezones) of the user, e.g.\n                `America/Los_Angeles`.\n            - type: 'null'\n      type: object\n      required:\n        - type\n    WebSearchPreviewTool:\n      properties:\n        type:\n          type: string\n          enum:\n            - web_search_preview\n            - web_search_preview_2025_03_11\n          description: The type of the web search tool. One of `web_search_preview` or `web_search_preview_2025_03_11`.\n          default: web_search_preview\n          x-stainless-const: true\n        user_location:\n          anyOf:\n            - $ref: '#/components/schemas/ApproximateLocation'\n              description: The user's location.\n            - type: 'null'\n        search_context_size:\n          type: string\n          enum:\n            - low\n            - medium\n            - high\n          description: >-\n            High level guidance for the amount of context window space to use for the search. One of `low`,\n            `medium`, or `high`. `medium` is the default.\n      type: object\n      required:\n        - type\n      title: Web search preview\n      description: >-\n        This tool searches the web for relevant results to use in a response. Learn more about the [web search\n        tool](https://platform.openai.com/docs/guides/tools-web-search).\n    ComputerUsePreviewTool:\n      properties:\n        type:\n          type: string\n          enum:\n            - computer_use_preview\n          description: The type of the computer use tool. Always `computer_use_preview`.\n          default: computer_use_preview\n          x-stainless-const: true\n        environment:\n          type: string\n          enum:\n            - windows\n            - mac\n            - linux\n            - ubuntu\n            - browser\n          description: The type of computer environment to control.\n        display_width:\n          type: integer\n          description: The width of the computer display.\n        display_height:\n          type: integer\n          description: The height of the computer display.\n      type: object\n      required:\n        - type\n        - environment\n        - display_width\n        - display_height\n      title: Computer use preview\n      description: >-\n        A tool that controls a virtual computer. Learn more about the [computer\n        tool](https://platform.openai.com/docs/guides/tools-computer-use).\n    ImageGenInputUsageDetails:\n      properties:\n        text_tokens:\n          type: integer\n          description: The number of text tokens in the input prompt.\n        image_tokens:\n          type: integer\n          description: The number of image tokens in the input prompt.\n      type: object\n      required:\n        - text_tokens\n        - image_tokens\n      title: Input usage details\n      description: The input tokens detailed information for the image generation.\n    ImageGenUsage:\n      properties:\n        input_tokens:\n          type: integer\n          description: The number of tokens (images and text) in the input prompt.\n        total_tokens:\n          type: integer\n          description: The total number of tokens (images and text) used for the image generation.\n        output_tokens:\n          type: integer\n          description: The number of output tokens generated by the model.\n        input_tokens_details:\n          $ref: '#/components/schemas/ImageGenInputUsageDetails'\n      type: object\n      required:\n        - input_tokens\n        - total_tokens\n        - output_tokens\n        - input_tokens_details\n      title: Image generation usage\n      description: For `gpt-image-1` only, the token usage information for the image generation.\n    FileCitationBody:\n      properties:\n        type:\n          type: string\n          enum:\n            - file_citation\n          description: The type of the file citation. Always `file_citation`.\n          default: file_citation\n          x-stainless-const: true\n        file_id:\n          type: string\n          description: The ID of the file.\n        index:\n          type: integer\n          description: The index of the file in the list of files.\n        filename:\n          type: string\n          description: The filename of the file cited.\n      type: object\n      required:\n        - type\n        - file_id\n        - index\n        - filename\n      title: File citation\n      description: A citation to a file.\n    UrlCitationBody:\n      properties:\n        type:\n          type: string\n          enum:\n            - url_citation\n          description: The type of the URL citation. Always `url_citation`.\n          default: url_citation\n          x-stainless-const: true\n        url:\n          type: string\n          description: The URL of the web resource.\n        start_index:\n          type: integer\n          description: The index of the first character of the URL citation in the message.\n        end_index:\n          type: integer\n          description: The index of the last character of the URL citation in the message.\n        title:\n          type: string\n          description: The title of the web resource.\n      type: object\n      required:\n        - type\n        - url\n        - start_index\n        - end_index\n        - title\n      title: URL citation\n      description: A citation for a web resource used to generate a model response.\n    ContainerFileCitationBody:\n      properties:\n        type:\n          type: string\n          enum:\n            - container_file_citation\n          description: The type of the container file citation. Always `container_file_citation`.\n          default: container_file_citation\n          x-stainless-const: true\n        container_id:\n          type: string\n          description: The ID of the container file.\n        file_id:\n          type: string\n          description: The ID of the file.\n        start_index:\n          type: integer\n          description: The index of the first character of the container file citation in the message.\n        end_index:\n          type: integer\n          description: The index of the last character of the container file citation in the message.\n        filename:\n          type: string\n          description: The filename of the container file cited.\n      type: object\n      required:\n        - type\n        - container_id\n        - file_id\n        - start_index\n        - end_index\n        - filename\n      title: Container file citation\n      description: A citation for a container file used to generate a model response.\n    Annotation:\n      discriminator:\n        propertyName: type\n      anyOf:\n        - $ref: '#/components/schemas/FileCitationBody'\n        - $ref: '#/components/schemas/UrlCitationBody'\n        - $ref: '#/components/schemas/ContainerFileCitationBody'\n        - $ref: '#/components/schemas/FilePath'\n    TopLogProb:\n      properties:\n        token:\n          type: string\n        logprob:\n          type: number\n        bytes:\n          items:\n            type: integer\n          type: array\n      type: object\n      required:\n        - token\n        - logprob\n        - bytes\n      title: Top log probability\n      description: The top log probability of a token.\n    LogProb:\n      properties:\n        token:\n          type: string\n        logprob:\n          type: number\n        bytes:\n          items:\n            type: integer\n          type: array\n        top_logprobs:\n          items:\n            $ref: '#/components/schemas/TopLogProb'\n          type: array\n      type: object\n      required:\n        - token\n        - logprob\n        - bytes\n        - top_logprobs\n      title: Log probability\n      description: The log probability of a token.\n    OutputTextContent:\n      properties:\n        type:\n          type: string\n          enum:\n            - output_text\n          description: The type of the output text. Always `output_text`.\n          default: output_text\n          x-stainless-const: true\n        text:\n          type: string\n          description: The text output from the model.\n        annotations:\n          items:\n            $ref: '#/components/schemas/Annotation'\n          type: array\n          description: The annotations of the text output.\n        logprobs:\n          items:\n            $ref: '#/components/schemas/LogProb'\n          type: array\n      type: object\n      required:\n        - type\n        - text\n        - annotations\n      title: Output text\n      description: A text output from the model.\n    RefusalContent:\n      properties:\n        type:\n          type: string\n          enum:\n            - refusal\n          description: The type of the refusal. Always `refusal`.\n          default: refusal\n          x-stainless-const: true\n        refusal:\n          type: string\n          description: The refusal explanation from the model.\n      type: object\n      required:\n        - type\n        - refusal\n      title: Refusal\n      description: A refusal from the model.\n    ComputerCallSafetyCheckParam:\n      properties:\n        id:\n          type: string\n          description: The ID of the pending safety check.\n        code:\n          anyOf:\n            - type: string\n              description: The type of the pending safety check.\n            - type: 'null'\n        message:\n          anyOf:\n            - type: string\n              description: Details about the pending safety check.\n            - type: 'null'\n      type: object\n      required:\n        - id\n      description: A pending safety check for the computer call.\n    ComputerCallOutputItemParam:\n      properties:\n        id:\n          anyOf:\n            - type: string\n              description: The ID of the computer tool call output.\n            - type: 'null'\n        call_id:\n          type: string\n          maxLength: 64\n          minLength: 1\n          description: The ID of the computer tool call that produced the output.\n        type:\n          type: string\n          enum:\n            - computer_call_output\n          description: The type of the computer tool call output. Always `computer_call_output`.\n          default: computer_call_output\n          x-stainless-const: true\n        output:\n          $ref: '#/components/schemas/ComputerScreenshotImage'\n        acknowledged_safety_checks:\n          anyOf:\n            - items:\n                $ref: '#/components/schemas/ComputerCallSafetyCheckParam'\n              type: array\n              description: The safety checks reported by the API that have been acknowledged by the developer.\n            - type: 'null'\n        status:\n          anyOf:\n            - type: string\n              enum:\n                - in_progress\n                - completed\n                - incomplete\n              description: >-\n                The status of the message input. One of `in_progress`, `completed`, or `incomplete`. Populated\n                when input items are returned via API.\n            - type: 'null'\n      type: object\n      required:\n        - call_id\n        - type\n        - output\n      title: Computer tool call output\n      description: The output of a computer tool call.\n    FunctionCallOutputItemParam:\n      properties:\n        id:\n          anyOf:\n            - type: string\n              description: The unique ID of the function tool call output. Populated when this item is returned via API.\n            - type: 'null'\n        call_id:\n          type: string\n          maxLength: 64\n          minLength: 1\n          description: The unique ID of the function tool call generated by the model.\n        type:\n          type: string\n          enum:\n            - function_call_output\n          description: The type of the function tool call output. Always `function_call_output`.\n          default: function_call_output\n          x-stainless-const: true\n        output:\n          type: string\n          maxLength: 10485760\n          description: A JSON string of the output of the function tool call.\n        status:\n          anyOf:\n            - type: string\n              enum:\n                - in_progress\n                - completed\n                - incomplete\n              description: >-\n                The status of the item. One of `in_progress`, `completed`, or `incomplete`. Populated when\n                items are returned via API.\n            - type: 'null'\n      type: object\n      required:\n        - call_id\n        - type\n        - output\n      title: Function tool call output\n      description: The output of a function tool call.\n    ItemReferenceParam:\n      properties:\n        type:\n          anyOf:\n            - type: string\n              enum:\n                - item_reference\n              description: The type of item to reference. Always `item_reference`.\n              default: item_reference\n              x-stainless-const: true\n            - type: 'null'\n        id:\n          type: string\n          description: The ID of the item to reference.\n      type: object\n      required:\n        - id\n      title: Item reference\n      description: An internal identifier for an item to reference.\n    RealtimeConversationItemContent:\n      type: object\n      properties:\n        type:\n          type: string\n          enum:\n            - input_text\n            - input_audio\n            - item_reference\n            - text\n            - audio\n          description: |\n            The content type (`input_text`, `input_audio`, `item_reference`, `text`, `audio`).\n        text:\n          type: string\n          description: |\n            The text content, used for `input_text` and `text` content types.\n        id:\n          type: string\n          description: |\n            ID of a previous conversation item to reference (for `item_reference`\n            content types in `response.create` events). These can reference both\n            client and server created items.\n        audio:\n          type: string\n          description: |\n            Base64-encoded audio bytes, used for `input_audio` content type.\n        transcript:\n          type: string\n          description: |\n            The transcript of the audio, used for `input_audio` and `audio`\n            content types.\n    RealtimeConnectParams:\n      type: object\n      properties:\n        model:\n          type: string\n      required:\n        - model\n    ModerationImageURLInput:\n      type: object\n      description: An object describing an image to classify.\n      properties:\n        type:\n          description: Always `image_url`.\n          type: string\n          enum:\n            - image_url\n          x-stainless-const: true\n        image_url:\n          type: object\n          description: Contains either an image URL or a data URL for a base64 encoded image.\n          properties:\n            url:\n              type: string\n              description: Either a URL of the image or the base64 encoded image data.\n              format: uri\n              example: https://example.com/image.jpg\n          required:\n            - url\n      required:\n        - type\n        - image_url\n    ModerationTextInput:\n      type: object\n      description: An object describing text to classify.\n      properties:\n        type:\n          description: Always `text`.\n          type: string\n          enum:\n            - text\n          x-stainless-const: true\n        text:\n          description: A string of text to classify.\n          type: string\n          example: I want to kill them\n      required:\n        - type\n        - text\n    ChunkingStrategyResponse:\n      type: object\n      description: The strategy used to chunk the file.\n      anyOf:\n        - $ref: '#/components/schemas/StaticChunkingStrategyResponseParam'\n        - $ref: '#/components/schemas/OtherChunkingStrategyResponseParam'\n      discriminator:\n        propertyName: type\n    FilePurpose:\n      description: >\n        The intended purpose of the uploaded file. One of: - `assistants`: Used in the Assistants API -\n        `batch`: Used in the Batch API - `fine-tune`: Used for fine-tuning - `vision`: Images used for vision\n        fine-tuning - `user_data`: Flexible file type for any purpose - `evals`: Used for eval data sets\n      type: string\n      enum:\n        - assistants\n        - batch\n        - fine-tune\n        - vision\n        - user_data\n        - evals\n    BatchError:\n      type: object\n      properties:\n        code:\n          type: string\n          description: An error code identifying the error type.\n        message:\n          type: string\n          description: A human-readable message providing more details about the error.\n        param:\n          type: string\n          description: The name of the parameter that caused the error, if applicable.\n          nullable: true\n        line:\n          type: integer\n          description: The line number of the input file where the error occurred, if applicable.\n          nullable: true\n    BatchRequestCounts:\n      type: object\n      properties:\n        total:\n          type: integer\n          description: Total number of requests in the batch.\n        completed:\n          type: integer\n          description: Number of requests that have been completed successfully.\n        failed:\n          type: integer\n          description: Number of requests that have failed.\n      required:\n        - total\n        - completed\n        - failed\n      description: The request counts for different statuses within the batch.\n    AssistantTool:\n      anyOf:\n        - $ref: '#/components/schemas/AssistantToolsCode'\n        - $ref: '#/components/schemas/AssistantToolsFileSearch'\n        - $ref: '#/components/schemas/AssistantToolsFunction'\n      discriminator:\n        propertyName: type\n    TextAnnotationDelta:\n      anyOf:\n        - $ref: '#/components/schemas/MessageDeltaContentTextAnnotationsFileCitationObject'\n        - $ref: '#/components/schemas/MessageDeltaContentTextAnnotationsFilePathObject'\n      discriminator:\n        propertyName: type\n    TextAnnotation:\n      anyOf:\n        - $ref: '#/components/schemas/MessageContentTextAnnotationsFileCitationObject'\n        - $ref: '#/components/schemas/MessageContentTextAnnotationsFilePathObject'\n      discriminator:\n        propertyName: type\n    RunStepDetailsToolCall:\n      anyOf:\n        - $ref: '#/components/schemas/RunStepDetailsToolCallsCodeObject'\n        - $ref: '#/components/schemas/RunStepDetailsToolCallsFileSearchObject'\n        - $ref: '#/components/schemas/RunStepDetailsToolCallsFunctionObject'\n      discriminator:\n        propertyName: type\n    RunStepDeltaStepDetailsToolCall:\n      anyOf:\n        - $ref: '#/components/schemas/RunStepDeltaStepDetailsToolCallsCodeObject'\n        - $ref: '#/components/schemas/RunStepDeltaStepDetailsToolCallsFileSearchObject'\n        - $ref: '#/components/schemas/RunStepDeltaStepDetailsToolCallsFunctionObject'\n      discriminator:\n        propertyName: type\n    MessageContent:\n      anyOf:\n        - $ref: '#/components/schemas/MessageContentImageFileObject'\n        - $ref: '#/components/schemas/MessageContentImageUrlObject'\n        - $ref: '#/components/schemas/MessageContentTextObject'\n        - $ref: '#/components/schemas/MessageContentRefusalObject'\n      discriminator:\n        propertyName: type\n    MessageContentDelta:\n      anyOf:\n        - $ref: '#/components/schemas/MessageDeltaContentImageFileObject'\n        - $ref: '#/components/schemas/MessageDeltaContentTextObject'\n        - $ref: '#/components/schemas/MessageDeltaContentRefusalObject'\n        - $ref: '#/components/schemas/MessageDeltaContentImageUrlObject'\n      discriminator:\n        propertyName: type\n    ChatModel:\n      type: string\n      enum:\n        - gpt-5\n        - gpt-5-mini\n        - gpt-5-nano\n        - gpt-5-2025-08-07\n        - gpt-5-mini-2025-08-07\n        - gpt-5-nano-2025-08-07\n        - gpt-5-chat-latest\n        - gpt-4.1\n        - gpt-4.1-mini\n        - gpt-4.1-nano\n        - gpt-4.1-2025-04-14\n        - gpt-4.1-mini-2025-04-14\n        - gpt-4.1-nano-2025-04-14\n        - o4-mini\n        - o4-mini-2025-04-16\n        - o3\n        - o3-2025-04-16\n        - o3-mini\n        - o3-mini-2025-01-31\n        - o1\n        - o1-2024-12-17\n        - o1-preview\n        - o1-preview-2024-09-12\n        - o1-mini\n        - o1-mini-2024-09-12\n        - gpt-4o\n        - gpt-4o-2024-11-20\n        - gpt-4o-2024-08-06\n        - gpt-4o-2024-05-13\n        - gpt-4o-audio-preview\n        - gpt-4o-audio-preview-2024-10-01\n        - gpt-4o-audio-preview-2024-12-17\n        - gpt-4o-audio-preview-2025-06-03\n        - gpt-4o-mini-audio-preview\n        - gpt-4o-mini-audio-preview-2024-12-17\n        - gpt-4o-search-preview\n        - gpt-4o-mini-search-preview\n        - gpt-4o-search-preview-2025-03-11\n        - gpt-4o-mini-search-preview-2025-03-11\n        - chatgpt-4o-latest\n        - codex-mini-latest\n        - gpt-4o-mini\n        - gpt-4o-mini-2024-07-18\n        - gpt-4-turbo\n        - gpt-4-turbo-2024-04-09\n        - gpt-4-0125-preview\n        - gpt-4-turbo-preview\n        - gpt-4-1106-preview\n        - gpt-4-vision-preview\n        - gpt-4\n        - gpt-4-0314\n        - gpt-4-0613\n        - gpt-4-32k\n        - gpt-4-32k-0314\n        - gpt-4-32k-0613\n        - gpt-3.5-turbo\n        - gpt-3.5-turbo-16k\n        - gpt-3.5-turbo-0301\n        - gpt-3.5-turbo-0613\n        - gpt-3.5-turbo-1106\n        - gpt-3.5-turbo-0125\n        - gpt-3.5-turbo-16k-0613\n      x-stainless-nominal: false\n    CreateThreadAndRunRequestWithoutStream:\n      type: object\n      additionalProperties: false\n      properties:\n        assistant_id:\n          description: >-\n            The ID of the [assistant](https://platform.openai.com/docs/api-reference/assistants) to use to\n            execute this run.\n          type: string\n        thread:\n          $ref: '#/components/schemas/CreateThreadRequest'\n        model:\n          description: >-\n            The ID of the [Model](https://platform.openai.com/docs/api-reference/models) to be used to execute\n            this run. If a value is provided here, it will override the model associated with the assistant.\n            If not, the model associated with the assistant will be used.\n          anyOf:\n            - type: string\n            - type: string\n              enum:\n                - gpt-5\n                - gpt-5-mini\n                - gpt-5-nano\n                - gpt-5-2025-08-07\n                - gpt-5-mini-2025-08-07\n                - gpt-5-nano-2025-08-07\n                - gpt-4.1\n                - gpt-4.1-mini\n                - gpt-4.1-nano\n                - gpt-4.1-2025-04-14\n                - gpt-4.1-mini-2025-04-14\n                - gpt-4.1-nano-2025-04-14\n                - gpt-4o\n                - gpt-4o-2024-11-20\n                - gpt-4o-2024-08-06\n                - gpt-4o-2024-05-13\n                - gpt-4o-mini\n                - gpt-4o-mini-2024-07-18\n                - gpt-4.5-preview\n                - gpt-4.5-preview-2025-02-27\n                - gpt-4-turbo\n                - gpt-4-turbo-2024-04-09\n                - gpt-4-0125-preview\n                - gpt-4-turbo-preview\n                - gpt-4-1106-preview\n                - gpt-4-vision-preview\n                - gpt-4\n                - gpt-4-0314\n                - gpt-4-0613\n                - gpt-4-32k\n                - gpt-4-32k-0314\n                - gpt-4-32k-0613\n                - gpt-3.5-turbo\n                - gpt-3.5-turbo-16k\n                - gpt-3.5-turbo-0613\n                - gpt-3.5-turbo-1106\n                - gpt-3.5-turbo-0125\n                - gpt-3.5-turbo-16k-0613\n          x-oaiTypeLabel: string\n          nullable: true\n        instructions:\n          description: >-\n            Override the default system message of the assistant. This is useful for modifying the behavior on\n            a per-run basis.\n          type: string\n          nullable: true\n        tools:\n          description: >-\n            Override the tools the assistant can use for this run. This is useful for modifying the behavior\n            on a per-run basis.\n          nullable: true\n          type: array\n          maxItems: 20\n          items:\n            $ref: '#/components/schemas/AssistantTool'\n        tool_resources:\n          type: object\n          description: >\n            A set of resources that are used by the assistant's tools. The resources are specific to the type\n            of tool. For example, the `code_interpreter` tool requires a list of file IDs, while the\n            `file_search` tool requires a list of vector store IDs.\n          properties:\n            code_interpreter:\n              type: object\n              properties:\n                file_ids:\n                  type: array\n                  description: >\n                    A list of [file](https://platform.openai.com/docs/api-reference/files) IDs made available\n                    to the `code_interpreter` tool. There can be a maximum of 20 files associated with the\n                    tool.\n                  default: []\n                  maxItems: 20\n                  items:\n                    type: string\n            file_search:\n              type: object\n              properties:\n                vector_store_ids:\n                  type: array\n                  description: >\n                    The ID of the [vector\n                    store](https://platform.openai.com/docs/api-reference/vector-stores/object) attached to\n                    this assistant. There can be a maximum of 1 vector store attached to the assistant.\n                  maxItems: 1\n                  items:\n                    type: string\n          nullable: true\n        metadata:\n          $ref: '#/components/schemas/Metadata'\n        temperature:\n          type: number\n          minimum: 0\n          maximum: 2\n          default: 1\n          example: 1\n          nullable: true\n          description: >\n            What sampling temperature to use, between 0 and 2. Higher values like 0.8 will make the output\n            more random, while lower values like 0.2 will make it more focused and deterministic.\n        top_p:\n          type: number\n          minimum: 0\n          maximum: 1\n          default: 1\n          example: 1\n          nullable: true\n          description: >\n            An alternative to sampling with temperature, called nucleus sampling, where the model considers\n            the results of the tokens with top_p probability mass. So 0.1 means only the tokens comprising the\n            top 10% probability mass are considered.\n\n\n            We generally recommend altering this or temperature but not both.\n        max_prompt_tokens:\n          type: integer\n          nullable: true\n          description: >\n            The maximum number of prompt tokens that may be used over the course of the run. The run will make\n            a best effort to use only the number of prompt tokens specified, across multiple turns of the run.\n            If the run exceeds the number of prompt tokens specified, the run will end with status\n            `incomplete`. See `incomplete_details` for more info.\n          minimum: 256\n        max_completion_tokens:\n          type: integer\n          nullable: true\n          description: >\n            The maximum number of completion tokens that may be used over the course of the run. The run will\n            make a best effort to use only the number of completion tokens specified, across multiple turns of\n            the run. If the run exceeds the number of completion tokens specified, the run will end with\n            status `incomplete`. See `incomplete_details` for more info.\n          minimum: 256\n        truncation_strategy:\n          allOf:\n            - $ref: '#/components/schemas/TruncationObject'\n            - nullable: true\n        tool_choice:\n          allOf:\n            - $ref: '#/components/schemas/AssistantsApiToolChoiceOption'\n            - nullable: true\n        parallel_tool_calls:\n          $ref: '#/components/schemas/ParallelToolCalls'\n        response_format:\n          $ref: '#/components/schemas/AssistantsApiResponseFormatOption'\n          nullable: true\n      required: *ref_0\n    CreateRunRequestWithoutStream:\n      type: object\n      additionalProperties: false\n      properties:\n        assistant_id:\n          description: >-\n            The ID of the [assistant](https://platform.openai.com/docs/api-reference/assistants) to use to\n            execute this run.\n          type: string\n        model:\n          description: >-\n            The ID of the [Model](https://platform.openai.com/docs/api-reference/models) to be used to execute\n            this run. If a value is provided here, it will override the model associated with the assistant.\n            If not, the model associated with the assistant will be used.\n          anyOf:\n            - type: string\n            - $ref: '#/components/schemas/AssistantSupportedModels'\n          x-oaiTypeLabel: string\n          nullable: true\n        reasoning_effort:\n          $ref: '#/components/schemas/ReasoningEffort'\n        instructions:\n          description: >-\n            Overrides the\n            [instructions](https://platform.openai.com/docs/api-reference/assistants/createAssistant) of the\n            assistant. This is useful for modifying the behavior on a per-run basis.\n          type: string\n          nullable: true\n        additional_instructions:\n          description: >-\n            Appends additional instructions at the end of the instructions for the run. This is useful for\n            modifying the behavior on a per-run basis without overriding other instructions.\n          type: string\n          nullable: true\n        additional_messages:\n          description: Adds additional messages to the thread before creating the run.\n          type: array\n          items:\n            $ref: '#/components/schemas/CreateMessageRequest'\n          nullable: true\n        tools:\n          description: >-\n            Override the tools the assistant can use for this run. This is useful for modifying the behavior\n            on a per-run basis.\n          nullable: true\n          type: array\n          maxItems: 20\n          items:\n            $ref: '#/components/schemas/AssistantTool'\n        metadata:\n          $ref: '#/components/schemas/Metadata'\n        temperature:\n          type: number\n          minimum: 0\n          maximum: 2\n          default: 1\n          example: 1\n          nullable: true\n          description: >\n            What sampling temperature to use, between 0 and 2. Higher values like 0.8 will make the output\n            more random, while lower values like 0.2 will make it more focused and deterministic.\n        top_p:\n          type: number\n          minimum: 0\n          maximum: 1\n          default: 1\n          example: 1\n          nullable: true\n          description: >\n            An alternative to sampling with temperature, called nucleus sampling, where the model considers\n            the results of the tokens with top_p probability mass. So 0.1 means only the tokens comprising the\n            top 10% probability mass are considered.\n\n\n            We generally recommend altering this or temperature but not both.\n        max_prompt_tokens:\n          type: integer\n          nullable: true\n          description: >\n            The maximum number of prompt tokens that may be used over the course of the run. The run will make\n            a best effort to use only the number of prompt tokens specified, across multiple turns of the run.\n            If the run exceeds the number of prompt tokens specified, the run will end with status\n            `incomplete`. See `incomplete_details` for more info.\n          minimum: 256\n        max_completion_tokens:\n          type: integer\n          nullable: true\n          description: >\n            The maximum number of completion tokens that may be used over the course of the run. The run will\n            make a best effort to use only the number of completion tokens specified, across multiple turns of\n            the run. If the run exceeds the number of completion tokens specified, the run will end with\n            status `incomplete`. See `incomplete_details` for more info.\n          minimum: 256\n        truncation_strategy:\n          allOf:\n            - $ref: '#/components/schemas/TruncationObject'\n            - nullable: true\n        tool_choice:\n          allOf:\n            - $ref: '#/components/schemas/AssistantsApiToolChoiceOption'\n            - nullable: true\n        parallel_tool_calls:\n          $ref: '#/components/schemas/ParallelToolCalls'\n        response_format:\n          $ref: '#/components/schemas/AssistantsApiResponseFormatOption'\n          nullable: true\n      required: *ref_0\n    SubmitToolOutputsRunRequestWithoutStream:\n      type: object\n      additionalProperties: false\n      properties:\n        tool_outputs:\n          description: A list of tools for which the outputs are being submitted.\n          type: array\n          items:\n            type: object\n            properties:\n              tool_call_id:\n                type: string\n                description: >-\n                  The ID of the tool call in the `required_action` object within the run object the output is\n                  being submitted for.\n              output:\n                type: string\n                description: The output of the tool call to be submitted to continue the run.\n      required:\n        - tool_outputs\n    RunStatus:\n      description: >-\n        The status of the run, which can be either `queued`, `in_progress`, `requires_action`, `cancelling`,\n        `cancelled`, `failed`, `completed`, `incomplete`, or `expired`.\n      type: string\n      enum:\n        - queued\n        - in_progress\n        - requires_action\n        - cancelling\n        - cancelled\n        - failed\n        - completed\n        - incomplete\n        - expired\n    RunStepDeltaObjectDelta:\n      description: The delta containing the fields that have changed on the run step.\n      type: object\n      properties:\n        step_details:\n          type: object\n          description: The details of the run step.\n          anyOf:\n            - $ref: '#/components/schemas/RunStepDeltaStepDetailsMessageCreationObject'\n            - $ref: '#/components/schemas/RunStepDeltaStepDetailsToolCallsObject'\n          discriminator:\n            propertyName: type\n  securitySchemes:\n    ApiKeyAuth:\n      type: http\n      scheme: bearer\nx-oaiMeta:\n  navigationGroups:\n    - id: responses\n      title: Responses\n    - id: webhooks\n      title: Webhooks\n    - id: endpoints\n      title: Platform APIs\n    - id: vector_stores\n      title: Vector stores\n    - id: containers\n      title: Containers\n    - id: realtime\n      title: Realtime\n      beta: true\n    - id: chat\n      title: Chat Completions\n    - id: assistants\n      title: Assistants\n      beta: true\n    - id: administration\n      title: Administration\n    - id: legacy\n      title: Legacy\n  groups:\n    - id: responses\n      title: Responses\n      description: |\n        OpenAI's most advanced interface for generating model responses. Supports\n        text and image inputs, and text outputs. Create stateful interactions\n        with the model, using the output of previous responses as input. Extend\n        the model's capabilities with built-in tools for file search, web search,\n        computer use, and more. Allow the model access to external systems and data\n        using function calling.\n\n        Related guides:\n        - [Quickstart](https://platform.openai.com/docs/quickstart?api-mode=responses)\n        - [Text inputs and outputs](https://platform.openai.com/docs/guides/text?api-mode=responses)\n        - [Image inputs](https://platform.openai.com/docs/guides/images?api-mode=responses)\n        - [Structured Outputs](https://platform.openai.com/docs/guides/structured-outputs?api-mode=responses)\n        - [Function calling](https://platform.openai.com/docs/guides/function-calling?api-mode=responses)\n        - [Conversation state](https://platform.openai.com/docs/guides/conversation-state?api-mode=responses)\n        - [Extend the models with tools](https://platform.openai.com/docs/guides/tools?api-mode=responses)\n      navigationGroup: responses\n      sections:\n        - type: endpoint\n          key: createResponse\n          path: create\n        - type: endpoint\n          key: getResponse\n          path: get\n        - type: endpoint\n          key: deleteResponse\n          path: delete\n        - type: endpoint\n          key: cancelResponse\n          path: cancel\n        - type: endpoint\n          key: listInputItems\n          path: input-items\n        - type: object\n          key: Response\n          path: object\n        - type: object\n          key: ResponseItemList\n          path: list\n    - id: responses-streaming\n      title: Streaming\n      description: >\n        When you [create a Response](https://platform.openai.com/docs/api-reference/responses/create) with\n\n        `stream` set to `true`, the server will emit server-sent events to the\n\n        client as the Response is generated. This section contains the events that\n\n        are emitted by the server.\n\n\n        [Learn more about streaming\n        responses](https://platform.openai.com/docs/guides/streaming-responses?api-mode=responses).\n      navigationGroup: responses\n      sections:\n        - type: object\n          key: ResponseCreatedEvent\n          path: <auto>\n        - type: object\n          key: ResponseInProgressEvent\n          path: <auto>\n        - type: object\n          key: ResponseCompletedEvent\n          path: <auto>\n        - type: object\n          key: ResponseFailedEvent\n          path: <auto>\n        - type: object\n          key: ResponseIncompleteEvent\n          path: <auto>\n        - type: object\n          key: ResponseOutputItemAddedEvent\n          path: <auto>\n        - type: object\n          key: ResponseOutputItemDoneEvent\n          path: <auto>\n        - type: object\n          key: ResponseContentPartAddedEvent\n          path: <auto>\n        - type: object\n          key: ResponseContentPartDoneEvent\n          path: <auto>\n        - type: object\n          key: ResponseTextDeltaEvent\n          path: <auto>\n        - type: object\n          key: ResponseTextDoneEvent\n          path: <auto>\n        - type: object\n          key: ResponseRefusalDeltaEvent\n          path: <auto>\n        - type: object\n          key: ResponseRefusalDoneEvent\n          path: <auto>\n        - type: object\n          key: ResponseFunctionCallArgumentsDeltaEvent\n          path: <auto>\n        - type: object\n          key: ResponseFunctionCallArgumentsDoneEvent\n          path: <auto>\n        - type: object\n          key: ResponseFileSearchCallInProgressEvent\n          path: <auto>\n        - type: object\n          key: ResponseFileSearchCallSearchingEvent\n          path: <auto>\n        - type: object\n          key: ResponseFileSearchCallCompletedEvent\n          path: <auto>\n        - type: object\n          key: ResponseWebSearchCallInProgressEvent\n          path: <auto>\n        - type: object\n          key: ResponseWebSearchCallSearchingEvent\n          path: <auto>\n        - type: object\n          key: ResponseWebSearchCallCompletedEvent\n          path: <auto>\n        - type: object\n          key: ResponseReasoningSummaryPartAddedEvent\n          path: <auto>\n        - type: object\n          key: ResponseReasoningSummaryPartDoneEvent\n          path: <auto>\n        - type: object\n          key: ResponseReasoningSummaryTextDeltaEvent\n          path: <auto>\n        - type: object\n          key: ResponseReasoningSummaryTextDoneEvent\n          path: <auto>\n        - type: object\n          key: ResponseReasoningTextDeltaEvent\n          path: <auto>\n        - type: object\n          key: ResponseReasoningTextDoneEvent\n          path: <auto>\n        - type: object\n          key: ResponseImageGenCallCompletedEvent\n          path: <auto>\n        - type: object\n          key: ResponseImageGenCallGeneratingEvent\n          path: <auto>\n        - type: object\n          key: ResponseImageGenCallInProgressEvent\n          path: <auto>\n        - type: object\n          key: ResponseImageGenCallPartialImageEvent\n          path: <auto>\n        - type: object\n          key: ResponseMCPCallArgumentsDeltaEvent\n          path: <auto>\n        - type: object\n          key: ResponseMCPCallArgumentsDoneEvent\n          path: <auto>\n        - type: object\n          key: ResponseMCPCallCompletedEvent\n          path: <auto>\n        - type: object\n          key: ResponseMCPCallFailedEvent\n          path: <auto>\n        - type: object\n          key: ResponseMCPCallInProgressEvent\n          path: <auto>\n        - type: object\n          key: ResponseMCPListToolsCompletedEvent\n          path: <auto>\n        - type: object\n          key: ResponseMCPListToolsFailedEvent\n          path: <auto>\n        - type: object\n          key: ResponseMCPListToolsInProgressEvent\n          path: <auto>\n        - type: object\n          key: ResponseCodeInterpreterCallInProgressEvent\n          path: <auto>\n        - type: object\n          key: ResponseCodeInterpreterCallInterpretingEvent\n          path: <auto>\n        - type: object\n          key: ResponseCodeInterpreterCallCompletedEvent\n          path: <auto>\n        - type: object\n          key: ResponseCodeInterpreterCallCodeDeltaEvent\n          path: <auto>\n        - type: object\n          key: ResponseCodeInterpreterCallCodeDoneEvent\n          path: <auto>\n        - type: object\n          key: ResponseOutputTextAnnotationAddedEvent\n          path: <auto>\n        - type: object\n          key: ResponseQueuedEvent\n          path: <auto>\n        - type: object\n          key: ResponseCustomToolCallInputDeltaEvent\n          path: <auto>\n        - type: object\n          key: ResponseCustomToolCallInputDoneEvent\n          path: <auto>\n        - type: object\n          key: ResponseErrorEvent\n          path: <auto>\n    - id: webhook-events\n      title: Webhook Events\n      description: |\n        Webhooks are HTTP requests sent by OpenAI to a URL you specify when certain\n        events happen during the course of API usage.\n\n        [Learn more about webhooks](https://platform.openai.com/docs/guides/webhooks).\n      navigationGroup: webhooks\n      sections:\n        - type: object\n          key: WebhookResponseCompleted\n          path: <auto>\n        - type: object\n          key: WebhookResponseCancelled\n          path: <auto>\n        - type: object\n          key: WebhookResponseFailed\n          path: <auto>\n        - type: object\n          key: WebhookResponseIncomplete\n          path: <auto>\n        - type: object\n          key: WebhookBatchCompleted\n          path: <auto>\n        - type: object\n          key: WebhookBatchCancelled\n          path: <auto>\n        - type: object\n          key: WebhookBatchExpired\n          path: <auto>\n        - type: object\n          key: WebhookBatchFailed\n          path: <auto>\n        - type: object\n          key: WebhookFineTuningJobSucceeded\n          path: <auto>\n        - type: object\n          key: WebhookFineTuningJobFailed\n          path: <auto>\n        - type: object\n          key: WebhookFineTuningJobCancelled\n          path: <auto>\n        - type: object\n          key: WebhookEvalRunSucceeded\n          path: <auto>\n        - type: object\n          key: WebhookEvalRunFailed\n          path: <auto>\n        - type: object\n          key: WebhookEvalRunCanceled\n          path: <auto>\n    - id: audio\n      title: Audio\n      description: |\n        Learn how to turn audio into text or text into audio.\n\n        Related guide: [Speech to text](https://platform.openai.com/docs/guides/speech-to-text)\n      navigationGroup: endpoints\n      sections:\n        - type: endpoint\n          key: createSpeech\n          path: createSpeech\n        - type: endpoint\n          key: createTranscription\n          path: createTranscription\n        - type: endpoint\n          key: createTranslation\n          path: createTranslation\n        - type: object\n          key: CreateTranscriptionResponseJson\n          path: json-object\n        - type: object\n          key: CreateTranscriptionResponseVerboseJson\n          path: verbose-json-object\n        - type: object\n          key: SpeechAudioDeltaEvent\n          path: speech-audio-delta-event\n        - type: object\n          key: SpeechAudioDoneEvent\n          path: speech-audio-done-event\n        - type: object\n          key: TranscriptTextDeltaEvent\n          path: transcript-text-delta-event\n        - type: object\n          key: TranscriptTextDoneEvent\n          path: transcript-text-done-event\n    - id: images\n      title: Images\n      description: |\n        Given a prompt and/or an input image, the model will generate a new image.\n        Related guide: [Image generation](https://platform.openai.com/docs/guides/images)\n      navigationGroup: endpoints\n      sections:\n        - type: endpoint\n          key: createImage\n          path: create\n        - type: endpoint\n          key: createImageEdit\n          path: createEdit\n        - type: endpoint\n          key: createImageVariation\n          path: createVariation\n        - type: object\n          key: ImagesResponse\n          path: object\n    - id: images-streaming\n      title: Image Streaming\n      description: |\n        Stream image generation and editing in real time with server-sent events.\n        [Learn more about image streaming](https://platform.openai.com/docs/guides/image-generation).\n      navigationGroup: endpoints\n      sections:\n        - type: object\n          key: ImageGenPartialImageEvent\n          path: <auto>\n        - type: object\n          key: ImageGenCompletedEvent\n          path: <auto>\n        - type: object\n          key: ImageEditPartialImageEvent\n          path: <auto>\n        - type: object\n          key: ImageEditCompletedEvent\n          path: <auto>\n    - id: embeddings\n      title: Embeddings\n      description: >\n        Get a vector representation of a given input that can be easily consumed by machine learning models\n        and algorithms.\n\n        Related guide: [Embeddings](https://platform.openai.com/docs/guides/embeddings)\n      navigationGroup: endpoints\n      sections:\n        - type: endpoint\n          key: createEmbedding\n          path: create\n        - type: object\n          key: Embedding\n          path: object\n    - id: evals\n      title: Evals\n      description: |\n        Create, manage, and run evals in the OpenAI platform.\n        Related guide: [Evals](https://platform.openai.com/docs/guides/evals)\n      navigationGroup: endpoints\n      sections:\n        - type: endpoint\n          key: createEval\n          path: create\n        - type: endpoint\n          key: getEval\n          path: get\n        - type: endpoint\n          key: updateEval\n          path: update\n        - type: endpoint\n          key: deleteEval\n          path: delete\n        - type: endpoint\n          key: listEvals\n          path: list\n        - type: endpoint\n          key: getEvalRuns\n          path: getRuns\n        - type: endpoint\n          key: getEvalRun\n          path: getRun\n        - type: endpoint\n          key: createEvalRun\n          path: createRun\n        - type: endpoint\n          key: cancelEvalRun\n          path: cancelRun\n        - type: endpoint\n          key: deleteEvalRun\n          path: deleteRun\n        - type: endpoint\n          key: getEvalRunOutputItem\n          path: getRunOutputItem\n        - type: endpoint\n          key: getEvalRunOutputItems\n          path: getRunOutputItems\n        - type: object\n          key: Eval\n          path: object\n        - type: object\n          key: EvalRun\n          path: run-object\n        - type: object\n          key: EvalRunOutputItem\n          path: run-output-item-object\n    - id: fine-tuning\n      title: Fine-tuning\n      description: |\n        Manage fine-tuning jobs to tailor a model to your specific training data.\n        Related guide: [Fine-tune models](https://platform.openai.com/docs/guides/fine-tuning)\n      navigationGroup: endpoints\n      sections:\n        - type: endpoint\n          key: createFineTuningJob\n          path: create\n        - type: endpoint\n          key: listPaginatedFineTuningJobs\n          path: list\n        - type: endpoint\n          key: listFineTuningEvents\n          path: list-events\n        - type: endpoint\n          key: listFineTuningJobCheckpoints\n          path: list-checkpoints\n        - type: endpoint\n          key: listFineTuningCheckpointPermissions\n          path: list-permissions\n        - type: endpoint\n          key: createFineTuningCheckpointPermission\n          path: create-permission\n        - type: endpoint\n          key: deleteFineTuningCheckpointPermission\n          path: delete-permission\n        - type: endpoint\n          key: retrieveFineTuningJob\n          path: retrieve\n        - type: endpoint\n          key: cancelFineTuningJob\n          path: cancel\n        - type: endpoint\n          key: resumeFineTuningJob\n          path: resume\n        - type: endpoint\n          key: pauseFineTuningJob\n          path: pause\n        - type: object\n          key: FineTuneChatRequestInput\n          path: chat-input\n        - type: object\n          key: FineTunePreferenceRequestInput\n          path: preference-input\n        - type: object\n          key: FineTuneReinforcementRequestInput\n          path: reinforcement-input\n        - type: object\n          key: FineTuningJob\n          path: object\n        - type: object\n          key: FineTuningJobEvent\n          path: event-object\n        - type: object\n          key: FineTuningJobCheckpoint\n          path: checkpoint-object\n        - type: object\n          key: FineTuningCheckpointPermission\n          path: permission-object\n    - id: graders\n      title: Graders\n      description: |\n        Manage and run graders in the OpenAI platform.\n        Related guide: [Graders](https://platform.openai.com/docs/guides/graders)\n      navigationGroup: endpoints\n      sections:\n        - type: object\n          key: GraderStringCheck\n          path: string-check\n        - type: object\n          key: GraderTextSimilarity\n          path: text-similarity\n        - type: object\n          key: GraderScoreModel\n          path: score-model\n        - type: object\n          key: GraderLabelModel\n          path: label-model\n        - type: object\n          key: GraderPython\n          path: python\n        - type: object\n          key: GraderMulti\n          path: multi\n        - type: endpoint\n          key: runGrader\n          path: run\n        - type: endpoint\n          key: validateGrader\n          path: validate\n          beta: true\n    - id: batch\n      title: Batch\n      description: >\n        Create large batches of API requests for asynchronous processing. The Batch API returns completions\n        within 24 hours for a 50% discount.\n\n        Related guide: [Batch](https://platform.openai.com/docs/guides/batch)\n      navigationGroup: endpoints\n      sections:\n        - type: endpoint\n          key: createBatch\n          path: create\n        - type: endpoint\n          key: retrieveBatch\n          path: retrieve\n        - type: endpoint\n          key: cancelBatch\n          path: cancel\n        - type: endpoint\n          key: listBatches\n          path: list\n        - type: object\n          key: Batch\n          path: object\n        - type: object\n          key: BatchRequestInput\n          path: request-input\n        - type: object\n          key: BatchRequestOutput\n          path: request-output\n    - id: files\n      title: Files\n      description: >\n        Files are used to upload documents that can be used with features like\n        [Assistants](https://platform.openai.com/docs/api-reference/assistants),\n        [Fine-tuning](https://platform.openai.com/docs/api-reference/fine-tuning), and [Batch\n        API](https://platform.openai.com/docs/guides/batch).\n      navigationGroup: endpoints\n      sections:\n        - type: endpoint\n          key: createFile\n          path: create\n        - type: endpoint\n          key: listFiles\n          path: list\n        - type: endpoint\n          key: retrieveFile\n          path: retrieve\n        - type: endpoint\n          key: deleteFile\n          path: delete\n        - type: endpoint\n          key: downloadFile\n          path: retrieve-contents\n        - type: object\n          key: OpenAIFile\n          path: object\n    - id: uploads\n      title: Uploads\n      description: |\n        Allows you to upload large files in multiple parts.\n      navigationGroup: endpoints\n      sections:\n        - type: endpoint\n          key: createUpload\n          path: create\n        - type: endpoint\n          key: addUploadPart\n          path: add-part\n        - type: endpoint\n          key: completeUpload\n          path: complete\n        - type: endpoint\n          key: cancelUpload\n          path: cancel\n        - type: object\n          key: Upload\n          path: object\n        - type: object\n          key: UploadPart\n          path: part-object\n    - id: models\n      title: Models\n      description: >\n        List and describe the various models available in the API. You can refer to the\n        [Models](https://platform.openai.com/docs/models) documentation to understand what models are\n        available and the differences between them.\n      navigationGroup: endpoints\n      sections:\n        - type: endpoint\n          key: listModels\n          path: list\n        - type: endpoint\n          key: retrieveModel\n          path: retrieve\n        - type: endpoint\n          key: deleteModel\n          path: delete\n        - type: object\n          key: Model\n          path: object\n    - id: moderations\n      title: Moderations\n      description: >\n        Given text and/or image inputs, classifies if those inputs are potentially harmful across several\n        categories.\n\n        Related guide: [Moderations](https://platform.openai.com/docs/guides/moderation)\n      navigationGroup: endpoints\n      sections:\n        - type: endpoint\n          key: createModeration\n          path: create\n        - type: object\n          key: CreateModerationResponse\n          path: object\n    - id: vector-stores\n      title: Vector stores\n      description: >\n        Vector stores power semantic search for the Retrieval API and the `file_search` tool in the Responses\n        and Assistants APIs.\n\n\n        Related guide: [File Search](https://platform.openai.com/docs/assistants/tools/file-search)\n      navigationGroup: vector_stores\n      sections:\n        - type: endpoint\n          key: createVectorStore\n          path: create\n        - type: endpoint\n          key: listVectorStores\n          path: list\n        - type: endpoint\n          key: getVectorStore\n          path: retrieve\n        - type: endpoint\n          key: modifyVectorStore\n          path: modify\n        - type: endpoint\n          key: deleteVectorStore\n          path: delete\n        - type: endpoint\n          key: searchVectorStore\n          path: search\n        - type: object\n          key: VectorStoreObject\n          path: object\n    - id: vector-stores-files\n      title: Vector store files\n      description: |\n        Vector store files represent files inside a vector store.\n\n        Related guide: [File Search](https://platform.openai.com/docs/assistants/tools/file-search)\n      navigationGroup: vector_stores\n      sections:\n        - type: endpoint\n          key: createVectorStoreFile\n          path: createFile\n        - type: endpoint\n          key: listVectorStoreFiles\n          path: listFiles\n        - type: endpoint\n          key: getVectorStoreFile\n          path: getFile\n        - type: endpoint\n          key: retrieveVectorStoreFileContent\n          path: getContent\n        - type: endpoint\n          key: updateVectorStoreFileAttributes\n          path: updateAttributes\n        - type: endpoint\n          key: deleteVectorStoreFile\n          path: deleteFile\n        - type: object\n          key: VectorStoreFileObject\n          path: file-object\n    - id: vector-stores-file-batches\n      title: Vector store file batches\n      description: |\n        Vector store file batches represent operations to add multiple files to a vector store.\n        Related guide: [File Search](https://platform.openai.com/docs/assistants/tools/file-search)\n      navigationGroup: vector_stores\n      sections:\n        - type: endpoint\n          key: createVectorStoreFileBatch\n          path: createBatch\n        - type: endpoint\n          key: getVectorStoreFileBatch\n          path: getBatch\n        - type: endpoint\n          key: cancelVectorStoreFileBatch\n          path: cancelBatch\n        - type: endpoint\n          key: listFilesInVectorStoreBatch\n          path: listBatchFiles\n        - type: object\n          key: VectorStoreFileBatchObject\n          path: batch-object\n    - id: containers\n      title: Containers\n      description: |\n        Create and manage containers for use with the Code Interpreter tool.\n      navigationGroup: containers\n      sections:\n        - type: endpoint\n          key: CreateContainer\n          path: createContainers\n        - type: endpoint\n          key: ListContainers\n          path: listContainers\n        - type: endpoint\n          key: RetrieveContainer\n          path: retrieveContainer\n        - type: endpoint\n          key: DeleteContainer\n          path: deleteContainer\n        - type: object\n          key: ContainerResource\n          path: object\n    - id: container-files\n      title: Container Files\n      description: |\n        Create and manage container files for use with the Code Interpreter tool.\n      navigationGroup: containers\n      sections:\n        - type: endpoint\n          key: CreateContainerFile\n          path: createContainerFile\n        - type: endpoint\n          key: ListContainerFiles\n          path: listContainerFiles\n        - type: endpoint\n          key: RetrieveContainerFile\n          path: retrieveContainerFile\n        - type: endpoint\n          key: RetrieveContainerFileContent\n          path: retrieveContainerFileContent\n        - type: endpoint\n          key: DeleteContainerFile\n          path: deleteContainerFile\n        - type: object\n          key: ContainerFileResource\n          path: object\n    - id: realtime\n      title: Realtime\n      beta: true\n      description: |\n        Communicate with a GPT-4o class model in real time using WebRTC or\n        WebSockets. Supports text and audio inputs and ouputs, along with audio\n        transcriptions.\n        [Learn more about the Realtime API](https://platform.openai.com/docs/guides/realtime).\n      navigationGroup: realtime\n    - id: realtime-sessions\n      title: Session tokens\n      description: |\n        REST API endpoint to generate ephemeral session tokens for use in client-side\n        applications.\n      navigationGroup: realtime\n      sections:\n        - type: endpoint\n          key: create-realtime-session\n          path: create\n        - type: endpoint\n          key: create-realtime-transcription-session\n          path: create-transcription\n        - type: object\n          key: RealtimeSessionCreateResponse\n          path: session_object\n        - type: object\n          key: RealtimeTranscriptionSessionCreateResponse\n          path: transcription_session_object\n    - id: realtime-client-events\n      title: Client events\n      description: |\n        These are events that the OpenAI Realtime WebSocket server will accept from the client.\n      navigationGroup: realtime\n      sections:\n        - type: object\n          key: RealtimeClientEventSessionUpdate\n          path: <auto>\n        - type: object\n          key: RealtimeClientEventInputAudioBufferAppend\n          path: <auto>\n        - type: object\n          key: RealtimeClientEventInputAudioBufferCommit\n          path: <auto>\n        - type: object\n          key: RealtimeClientEventInputAudioBufferClear\n          path: <auto>\n        - type: object\n          key: RealtimeClientEventConversationItemCreate\n          path: <auto>\n        - type: object\n          key: RealtimeClientEventConversationItemRetrieve\n          path: <auto>\n        - type: object\n          key: RealtimeClientEventConversationItemTruncate\n          path: <auto>\n        - type: object\n          key: RealtimeClientEventConversationItemDelete\n          path: <auto>\n        - type: object\n          key: RealtimeClientEventResponseCreate\n          path: <auto>\n        - type: object\n          key: RealtimeClientEventResponseCancel\n          path: <auto>\n        - type: object\n          key: RealtimeClientEventTranscriptionSessionUpdate\n          path: <auto>\n        - type: object\n          key: RealtimeClientEventOutputAudioBufferClear\n          path: <auto>\n    - id: realtime-server-events\n      title: Server events\n      description: |\n        These are events emitted from the OpenAI Realtime WebSocket server to the client.\n      navigationGroup: realtime\n      sections:\n        - type: object\n          key: RealtimeServerEventError\n          path: <auto>\n        - type: object\n          key: RealtimeServerEventSessionCreated\n          path: <auto>\n        - type: object\n          key: RealtimeServerEventSessionUpdated\n          path: <auto>\n        - type: object\n          key: RealtimeServerEventConversationCreated\n          path: <auto>\n        - type: object\n          key: RealtimeServerEventConversationItemCreated\n          path: <auto>\n        - type: object\n          key: RealtimeServerEventConversationItemRetrieved\n          path: <auto>\n        - type: object\n          key: RealtimeServerEventConversationItemInputAudioTranscriptionCompleted\n          path: <auto>\n        - type: object\n          key: RealtimeServerEventConversationItemInputAudioTranscriptionDelta\n          path: <auto>\n        - type: object\n          key: RealtimeServerEventConversationItemInputAudioTranscriptionFailed\n          path: <auto>\n        - type: object\n          key: RealtimeServerEventConversationItemTruncated\n          path: <auto>\n        - type: object\n          key: RealtimeServerEventConversationItemDeleted\n          path: <auto>\n        - type: object\n          key: RealtimeServerEventInputAudioBufferCommitted\n          path: <auto>\n        - type: object\n          key: RealtimeServerEventInputAudioBufferCleared\n          path: <auto>\n        - type: object\n          key: RealtimeServerEventInputAudioBufferSpeechStarted\n          path: <auto>\n        - type: object\n          key: RealtimeServerEventInputAudioBufferSpeechStopped\n          path: <auto>\n        - type: object\n          key: RealtimeServerEventResponseCreated\n          path: <auto>\n        - type: object\n          key: RealtimeServerEventResponseDone\n          path: <auto>\n        - type: object\n          key: RealtimeServerEventResponseOutputItemAdded\n          path: <auto>\n        - type: object\n          key: RealtimeServerEventResponseOutputItemDone\n          path: <auto>\n        - type: object\n          key: RealtimeServerEventResponseContentPartAdded\n          path: <auto>\n        - type: object\n          key: RealtimeServerEventResponseContentPartDone\n          path: <auto>\n        - type: object\n          key: RealtimeServerEventResponseTextDelta\n          path: <auto>\n        - type: object\n          key: RealtimeServerEventResponseTextDone\n          path: <auto>\n        - type: object\n          key: RealtimeServerEventResponseAudioTranscriptDelta\n          path: <auto>\n        - type: object\n          key: RealtimeServerEventResponseAudioTranscriptDone\n          path: <auto>\n        - type: object\n          key: RealtimeServerEventResponseAudioDelta\n          path: <auto>\n        - type: object\n          key: RealtimeServerEventResponseAudioDone\n          path: <auto>\n        - type: object\n          key: RealtimeServerEventResponseFunctionCallArgumentsDelta\n          path: <auto>\n        - type: object\n          key: RealtimeServerEventResponseFunctionCallArgumentsDone\n          path: <auto>\n        - type: object\n          key: RealtimeServerEventTranscriptionSessionUpdated\n          path: <auto>\n        - type: object\n          key: RealtimeServerEventRateLimitsUpdated\n          path: <auto>\n        - type: object\n          key: RealtimeServerEventOutputAudioBufferStarted\n          path: <auto>\n        - type: object\n          key: RealtimeServerEventOutputAudioBufferStopped\n          path: <auto>\n        - type: object\n          key: RealtimeServerEventOutputAudioBufferCleared\n          path: <auto>\n    - id: chat\n      title: Chat Completions\n      description: >\n        The Chat Completions API endpoint will generate a model response from a\n\n        list of messages comprising a conversation.\n\n\n        Related guides:\n\n        - [Quickstart](https://platform.openai.com/docs/quickstart?api-mode=chat)\n\n        - [Text inputs and outputs](https://platform.openai.com/docs/guides/text?api-mode=chat)\n\n        - [Image inputs](https://platform.openai.com/docs/guides/images?api-mode=chat)\n\n        - [Audio inputs and outputs](https://platform.openai.com/docs/guides/audio?api-mode=chat)\n\n        - [Structured Outputs](https://platform.openai.com/docs/guides/structured-outputs?api-mode=chat)\n\n        - [Function calling](https://platform.openai.com/docs/guides/function-calling?api-mode=chat)\n\n        - [Conversation state](https://platform.openai.com/docs/guides/conversation-state?api-mode=chat)\n\n\n        **Starting a new project?** We recommend trying\n        [Responses](https://platform.openai.com/docs/api-reference/responses)\n\n        to take advantage of the latest OpenAI platform features. Compare\n\n        [Chat Completions with\n        Responses](https://platform.openai.com/docs/guides/responses-vs-chat-completions?api-mode=responses).\n      navigationGroup: chat\n      sections:\n        - type: endpoint\n          key: createChatCompletion\n          path: create\n        - type: endpoint\n          key: getChatCompletion\n          path: get\n        - type: endpoint\n          key: getChatCompletionMessages\n          path: getMessages\n        - type: endpoint\n          key: listChatCompletions\n          path: list\n        - type: endpoint\n          key: updateChatCompletion\n          path: update\n        - type: endpoint\n          key: deleteChatCompletion\n          path: delete\n        - type: object\n          key: CreateChatCompletionResponse\n          path: object\n        - type: object\n          key: ChatCompletionList\n          path: list-object\n        - type: object\n          key: ChatCompletionMessageList\n          path: message-list\n    - id: chat-streaming\n      title: Streaming\n      description: |\n        Stream Chat Completions in real time. Receive chunks of completions\n        returned from the model using server-sent events.\n        [Learn more](https://platform.openai.com/docs/guides/streaming-responses?api-mode=chat).\n      navigationGroup: chat\n      sections:\n        - type: object\n          key: CreateChatCompletionStreamResponse\n          path: streaming\n    - id: assistants\n      title: Assistants\n      beta: true\n      description: |\n        Build assistants that can call models and use tools to perform tasks.\n\n        [Get started with the Assistants API](https://platform.openai.com/docs/assistants)\n      navigationGroup: assistants\n      sections:\n        - type: endpoint\n          key: createAssistant\n          path: createAssistant\n        - type: endpoint\n          key: listAssistants\n          path: listAssistants\n        - type: endpoint\n          key: getAssistant\n          path: getAssistant\n        - type: endpoint\n          key: modifyAssistant\n          path: modifyAssistant\n        - type: endpoint\n          key: deleteAssistant\n          path: deleteAssistant\n        - type: object\n          key: AssistantObject\n          path: object\n    - id: threads\n      title: Threads\n      beta: true\n      description: |\n        Create threads that assistants can interact with.\n\n        Related guide: [Assistants](https://platform.openai.com/docs/assistants/overview)\n      navigationGroup: assistants\n      sections:\n        - type: endpoint\n          key: createThread\n          path: createThread\n        - type: endpoint\n          key: getThread\n          path: getThread\n        - type: endpoint\n          key: modifyThread\n          path: modifyThread\n        - type: endpoint\n          key: deleteThread\n          path: deleteThread\n        - type: object\n          key: ThreadObject\n          path: object\n    - id: messages\n      title: Messages\n      beta: true\n      description: |\n        Create messages within threads\n\n        Related guide: [Assistants](https://platform.openai.com/docs/assistants/overview)\n      navigationGroup: assistants\n      sections:\n        - type: endpoint\n          key: createMessage\n          path: createMessage\n        - type: endpoint\n          key: listMessages\n          path: listMessages\n        - type: endpoint\n          key: getMessage\n          path: getMessage\n        - type: endpoint\n          key: modifyMessage\n          path: modifyMessage\n        - type: endpoint\n          key: deleteMessage\n          path: deleteMessage\n        - type: object\n          key: MessageObject\n          path: object\n    - id: runs\n      title: Runs\n      beta: true\n      description: |\n        Represents an execution run on a thread.\n\n        Related guide: [Assistants](https://platform.openai.com/docs/assistants/overview)\n      navigationGroup: assistants\n      sections:\n        - type: endpoint\n          key: createRun\n          path: createRun\n        - type: endpoint\n          key: createThreadAndRun\n          path: createThreadAndRun\n        - type: endpoint\n          key: listRuns\n          path: listRuns\n        - type: endpoint\n          key: getRun\n          path: getRun\n        - type: endpoint\n          key: modifyRun\n          path: modifyRun\n        - type: endpoint\n          key: submitToolOuputsToRun\n          path: submitToolOutputs\n        - type: endpoint\n          key: cancelRun\n          path: cancelRun\n        - type: object\n          key: RunObject\n          path: object\n    - id: run-steps\n      title: Run steps\n      beta: true\n      description: |\n        Represents the steps (model and tool calls) taken during the run.\n\n        Related guide: [Assistants](https://platform.openai.com/docs/assistants/overview)\n      navigationGroup: assistants\n      sections:\n        - type: endpoint\n          key: listRunSteps\n          path: listRunSteps\n        - type: endpoint\n          key: getRunStep\n          path: getRunStep\n        - type: object\n          key: RunStepObject\n          path: step-object\n    - id: assistants-streaming\n      title: Streaming\n      beta: true\n      description: >\n        Stream the result of executing a Run or resuming a Run after submitting tool outputs.\n\n        You can stream events from the [Create Thread and\n        Run](https://platform.openai.com/docs/api-reference/runs/createThreadAndRun),\n\n        [Create Run](https://platform.openai.com/docs/api-reference/runs/createRun), and [Submit Tool\n        Outputs](https://platform.openai.com/docs/api-reference/runs/submitToolOutputs)\n\n        endpoints by passing `\"stream\": true`. The response will be a [Server-Sent\n        events](https://html.spec.whatwg.org/multipage/server-sent-events.html#server-sent-events) stream.\n\n        Our Node and Python SDKs provide helpful utilities to make streaming easy. Reference the\n\n        [Assistants API quickstart](https://platform.openai.com/docs/assistants/overview) to learn more.\n      navigationGroup: assistants\n      sections:\n        - type: object\n          key: MessageDeltaObject\n          path: message-delta-object\n        - type: object\n          key: RunStepDeltaObject\n          path: run-step-delta-object\n        - type: object\n          key: AssistantStreamEvent\n          path: events\n    - id: administration\n      title: Administration\n      description: >\n        Programmatically manage your organization.\n\n        The Audit Logs endpoint provides a log of all actions taken in the organization for security and\n        monitoring purposes.\n\n        To access these endpoints please generate an Admin API Key through the [API Platform Organization\n        overview](/organization/admin-keys). Admin API keys cannot be used for non-administration endpoints.\n\n        For best practices on setting up your organization, please refer to this\n        [guide](https://platform.openai.com/docs/guides/production-best-practices#setting-up-your-organization)\n      navigationGroup: administration\n    - id: admin-api-keys\n      title: Admin API Keys\n      description: >\n        Admin API keys enable Organization Owners to programmatically manage various aspects of their\n        organization, including users, projects, and API keys. These keys provide administrative capabilities,\n        such as creating, updating, and deleting users; managing projects; and overseeing API key lifecycles.\n\n\n        Key Features of Admin API Keys:\n\n\n        - User Management: Invite new users, update roles, and remove users from the organization.\n\n\n        - Project Management: Create, update, archive projects, and manage user assignments within projects.\n\n\n        - API Key Oversight: List, retrieve, and delete API keys associated with projects.\n\n\n        Only Organization Owners have the authority to create and utilize Admin API keys. To manage these\n        keys, Organization Owners can navigate to the Admin Keys section of their API Platform dashboard.\n\n\n        For direct access to the Admin Keys management page, Organization Owners can use the following link:\n\n\n        [https://platform.openai.com/settings/organization/admin-keys](https://platform.openai.com/settings/organization/admin-keys)\n\n\n        It's crucial to handle Admin API keys with care due to their elevated permissions. Adhering to best\n        practices, such as regular key rotation and assigning appropriate permissions, enhances security and\n        ensures proper governance within the organization.\n      navigationGroup: administration\n      sections:\n        - type: endpoint\n          key: admin-api-keys-list\n          path: list\n        - type: endpoint\n          key: admin-api-keys-create\n          path: create\n        - type: endpoint\n          key: admin-api-keys-get\n          path: listget\n        - type: endpoint\n          key: admin-api-keys-delete\n          path: delete\n        - type: object\n          key: AdminApiKey\n          path: object\n    - id: invite\n      title: Invites\n      description: Invite and manage invitations for an organization.\n      navigationGroup: administration\n      sections:\n        - type: endpoint\n          key: list-invites\n          path: list\n        - type: endpoint\n          key: inviteUser\n          path: create\n        - type: endpoint\n          key: retrieve-invite\n          path: retrieve\n        - type: endpoint\n          key: delete-invite\n          path: delete\n        - type: object\n          key: Invite\n          path: object\n    - id: users\n      title: Users\n      description: |\n        Manage users and their role in an organization.\n      navigationGroup: administration\n      sections:\n        - type: endpoint\n          key: list-users\n          path: list\n        - type: endpoint\n          key: modify-user\n          path: modify\n        - type: endpoint\n          key: retrieve-user\n          path: retrieve\n        - type: endpoint\n          key: delete-user\n          path: delete\n        - type: object\n          key: User\n          path: object\n    - id: projects\n      title: Projects\n      description: |\n        Manage the projects within an orgnanization includes creation, updating, and archiving or projects.\n        The Default project cannot be archived.\n      navigationGroup: administration\n      sections:\n        - type: endpoint\n          key: list-projects\n          path: list\n        - type: endpoint\n          key: create-project\n          path: create\n        - type: endpoint\n          key: retrieve-project\n          path: retrieve\n        - type: endpoint\n          key: modify-project\n          path: modify\n        - type: endpoint\n          key: archive-project\n          path: archive\n        - type: object\n          key: Project\n          path: object\n    - id: project-users\n      title: Project users\n      description: |\n        Manage users within a project, including adding, updating roles, and removing users.\n      navigationGroup: administration\n      sections:\n        - type: endpoint\n          key: list-project-users\n          path: list\n        - type: endpoint\n          key: create-project-user\n          path: create\n        - type: endpoint\n          key: retrieve-project-user\n          path: retrieve\n        - type: endpoint\n          key: modify-project-user\n          path: modify\n        - type: endpoint\n          key: delete-project-user\n          path: delete\n        - type: object\n          key: ProjectUser\n          path: object\n    - id: project-service-accounts\n      title: Project service accounts\n      description: >\n        Manage service accounts within a project. A service account is a bot user that is not associated with\n        a user.\n\n        If a user leaves an organization, their keys and membership in projects will no longer work. Service\n        accounts\n\n        do not have this limitation. However, service accounts can also be deleted from a project.\n      navigationGroup: administration\n      sections:\n        - type: endpoint\n          key: list-project-service-accounts\n          path: list\n        - type: endpoint\n          key: create-project-service-account\n          path: create\n        - type: endpoint\n          key: retrieve-project-service-account\n          path: retrieve\n        - type: endpoint\n          key: delete-project-service-account\n          path: delete\n        - type: object\n          key: ProjectServiceAccount\n          path: object\n    - id: project-api-keys\n      title: Project API keys\n      description: >\n        Manage API keys for a given project. Supports listing and deleting keys for users.\n\n        This API does not allow issuing keys for users, as users need to authorize themselves to generate\n        keys.\n      navigationGroup: administration\n      sections:\n        - type: endpoint\n          key: list-project-api-keys\n          path: list\n        - type: endpoint\n          key: retrieve-project-api-key\n          path: retrieve\n        - type: endpoint\n          key: delete-project-api-key\n          path: delete\n        - type: object\n          key: ProjectApiKey\n          path: object\n    - id: project-rate-limits\n      title: Project rate limits\n      description: >\n        Manage rate limits per model for projects. Rate limits may be configured to be equal to or lower than\n        the organization's rate limits.\n      navigationGroup: administration\n      sections:\n        - type: endpoint\n          key: list-project-rate-limits\n          path: list\n        - type: endpoint\n          key: update-project-rate-limits\n          path: update\n        - type: object\n          key: ProjectRateLimit\n          path: object\n    - id: audit-logs\n      title: Audit logs\n      description: >\n        Logs of user actions and configuration changes within this organization.\n\n        To log events, an Organization Owner must activate logging in the [Data Controls\n        Settings](/settings/organization/data-controls/data-retention).\n\n        Once activated, for security reasons, logging cannot be deactivated.\n      navigationGroup: administration\n      sections:\n        - type: endpoint\n          key: list-audit-logs\n          path: list\n        - type: object\n          key: AuditLog\n          path: object\n    - id: usage\n      title: Usage\n      description: >\n        The **Usage API** provides detailed insights into your activity across the OpenAI API. It also\n        includes a separate [Costs endpoint](https://platform.openai.com/docs/api-reference/usage/costs),\n        which offers visibility into your spend, breaking down consumption by invoice line items and project\n        IDs.\n\n\n        While the Usage API delivers granular usage data, it may not always reconcile perfectly with the Costs\n        due to minor differences in how usage and spend are recorded. For financial purposes, we recommend\n        using the [Costs endpoint](https://platform.openai.com/docs/api-reference/usage/costs) or the [Costs\n        tab](/settings/organization/usage) in the Usage Dashboard, which will reconcile back to your billing\n        invoice.\n      navigationGroup: administration\n      sections:\n        - type: endpoint\n          key: usage-completions\n          path: completions\n        - type: object\n          key: UsageCompletionsResult\n          path: completions_object\n        - type: endpoint\n          key: usage-embeddings\n          path: embeddings\n        - type: object\n          key: UsageEmbeddingsResult\n          path: embeddings_object\n        - type: endpoint\n          key: usage-moderations\n          path: moderations\n        - type: object\n          key: UsageModerationsResult\n          path: moderations_object\n        - type: endpoint\n          key: usage-images\n          path: images\n        - type: object\n          key: UsageImagesResult\n          path: images_object\n        - type: endpoint\n          key: usage-audio-speeches\n          path: audio_speeches\n        - type: object\n          key: UsageAudioSpeechesResult\n          path: audio_speeches_object\n        - type: endpoint\n          key: usage-audio-transcriptions\n          path: audio_transcriptions\n        - type: object\n          key: UsageAudioTranscriptionsResult\n          path: audio_transcriptions_object\n        - type: endpoint\n          key: usage-vector-stores\n          path: vector_stores\n        - type: object\n          key: UsageVectorStoresResult\n          path: vector_stores_object\n        - type: endpoint\n          key: usage-code-interpreter-sessions\n          path: code_interpreter_sessions\n        - type: object\n          key: UsageCodeInterpreterSessionsResult\n          path: code_interpreter_sessions_object\n        - type: endpoint\n          key: usage-costs\n          path: costs\n        - type: object\n          key: CostsResult\n          path: costs_object\n    - id: certificates\n      beta: true\n      title: Certificates\n      description: >\n        Manage Mutual TLS certificates across your organization and projects.\n\n\n        [Learn more about Mutual\n        TLS.](https://help.openai.com/en/articles/10876024-openai-mutual-tls-beta-program)\n      navigationGroup: administration\n      sections:\n        - type: endpoint\n          key: uploadCertificate\n          path: uploadCertificate\n        - type: endpoint\n          key: getCertificate\n          path: getCertificate\n        - type: endpoint\n          key: modifyCertificate\n          path: modifyCertificate\n        - type: endpoint\n          key: deleteCertificate\n          path: deleteCertificate\n        - type: endpoint\n          key: listOrganizationCertificates\n          path: listOrganizationCertificates\n        - type: endpoint\n          key: listProjectCertificates\n          path: listProjectCertificates\n        - type: endpoint\n          key: activateOrganizationCertificates\n          path: activateOrganizationCertificates\n        - type: endpoint\n          key: deactivateOrganizationCertificates\n          path: deactivateOrganizationCertificates\n        - type: endpoint\n          key: activateProjectCertificates\n          path: activateProjectCertificates\n        - type: endpoint\n          key: deactivateProjectCertificates\n          path: deactivateProjectCertificates\n        - type: object\n          key: Certificate\n          path: object\n    - id: completions\n      title: Completions\n      legacy: true\n      navigationGroup: legacy\n      description: >\n        Given a prompt, the model will return one or more predicted completions along with the probabilities\n        of alternative tokens at each position. Most developer should use our [Chat Completions\n        API](https://platform.openai.com/docs/guides/text-generation#text-generation-models) to leverage our\n        best and newest models.\n      sections:\n        - type: endpoint\n          key: createCompletion\n          path: create\n        - type: object\n          key: CreateCompletionResponse\n          path: object\n"
  },
  {
    "path": "specs/3.1.x/opencode.yaml",
    "content": "openapi: 3.1.1\ninfo:\n  title: opencode\n  description: opencode api\n  version: 1.0.0\npaths:\n  /global/health:\n    get:\n      operationId: global.health\n      summary: Get health\n      description: Get health information about the OpenCode server.\n      responses:\n        '200':\n          description: Health information\n          content:\n            application/json:\n              schema:\n                type: object\n                properties:\n                  healthy:\n                    type: boolean\n                    const: true\n                  version:\n                    type: string\n                required:\n                  - healthy\n                  - version\n      x-codeSamples:\n        - lang: js\n          source: |-\n            import { createOpencodeClient } from \"@opencode-ai/sdk\n\n            const client = createOpencodeClient()\n            await client.global.health({\n              ...\n            })\n  /global/event:\n    get:\n      operationId: global.event\n      summary: Get global events\n      description: Subscribe to global events from the OpenCode system using\n        server-sent events.\n      responses:\n        '200':\n          description: Event stream\n          content:\n            text/event-stream:\n              schema:\n                $ref: '#/components/schemas/GlobalEvent'\n      x-codeSamples:\n        - lang: js\n          source: |-\n            import { createOpencodeClient } from \"@opencode-ai/sdk\n\n            const client = createOpencodeClient()\n            await client.global.event({\n              ...\n            })\n  /global/dispose:\n    post:\n      operationId: global.dispose\n      summary: Dispose instance\n      description: Clean up and dispose all OpenCode instances, releasing all resources.\n      responses:\n        '200':\n          description: Global disposed\n          content:\n            application/json:\n              schema:\n                type: boolean\n      x-codeSamples:\n        - lang: js\n          source: |-\n            import { createOpencodeClient } from \"@opencode-ai/sdk\n\n            const client = createOpencodeClient()\n            await client.global.dispose({\n              ...\n            })\n  /project:\n    get:\n      operationId: project.list\n      parameters:\n        - in: query\n          name: directory\n          schema:\n            type: string\n      summary: List all projects\n      description: Get a list of projects that have been opened with OpenCode.\n      responses:\n        '200':\n          description: List of projects\n          content:\n            application/json:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/Project'\n      x-codeSamples:\n        - lang: js\n          source: |-\n            import { createOpencodeClient } from \"@opencode-ai/sdk\n\n            const client = createOpencodeClient()\n            await client.project.list({\n              ...\n            })\n  /project/current:\n    get:\n      operationId: project.current\n      parameters:\n        - in: query\n          name: directory\n          schema:\n            type: string\n      summary: Get current project\n      description: Retrieve the currently active project that OpenCode is working with.\n      responses:\n        '200':\n          description: Current project information\n          content:\n            application/json:\n              schema:\n                $ref: '#/components/schemas/Project'\n      x-codeSamples:\n        - lang: js\n          source: |-\n            import { createOpencodeClient } from \"@opencode-ai/sdk\n\n            const client = createOpencodeClient()\n            await client.project.current({\n              ...\n            })\n  /project/{projectID}:\n    patch:\n      operationId: project.update\n      parameters:\n        - in: query\n          name: directory\n          schema:\n            type: string\n        - in: path\n          name: projectID\n          schema:\n            type: string\n          required: true\n      summary: Update project\n      description: Update project properties such as name, icon and color.\n      responses:\n        '200':\n          description: Updated project information\n          content:\n            application/json:\n              schema:\n                $ref: '#/components/schemas/Project'\n        '400':\n          description: Bad request\n          content:\n            application/json:\n              schema:\n                $ref: '#/components/schemas/BadRequestError'\n        '404':\n          description: Not found\n          content:\n            application/json:\n              schema:\n                $ref: '#/components/schemas/NotFoundError'\n      requestBody:\n        content:\n          application/json:\n            schema:\n              type: object\n              properties:\n                name:\n                  type: string\n                icon:\n                  type: object\n                  properties:\n                    url:\n                      type: string\n                    color:\n                      type: string\n      x-codeSamples:\n        - lang: js\n          source: |-\n            import { createOpencodeClient } from \"@opencode-ai/sdk\n\n            const client = createOpencodeClient()\n            await client.project.update({\n              ...\n            })\n  /pty:\n    get:\n      operationId: pty.list\n      parameters:\n        - in: query\n          name: directory\n          schema:\n            type: string\n      summary: List PTY sessions\n      description: Get a list of all active pseudo-terminal (PTY) sessions managed by\n        OpenCode.\n      responses:\n        '200':\n          description: List of sessions\n          content:\n            application/json:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/Pty'\n      x-codeSamples:\n        - lang: js\n          source: |-\n            import { createOpencodeClient } from \"@opencode-ai/sdk\n\n            const client = createOpencodeClient()\n            await client.pty.list({\n              ...\n            })\n    post:\n      operationId: pty.create\n      parameters:\n        - in: query\n          name: directory\n          schema:\n            type: string\n      summary: Create PTY session\n      description: Create a new pseudo-terminal (PTY) session for running shell\n        commands and processes.\n      responses:\n        '200':\n          description: Created session\n          content:\n            application/json:\n              schema:\n                $ref: '#/components/schemas/Pty'\n        '400':\n          description: Bad request\n          content:\n            application/json:\n              schema:\n                $ref: '#/components/schemas/BadRequestError'\n      requestBody:\n        content:\n          application/json:\n            schema:\n              type: object\n              properties:\n                command:\n                  type: string\n                args:\n                  type: array\n                  items:\n                    type: string\n                cwd:\n                  type: string\n                title:\n                  type: string\n                env:\n                  type: object\n                  propertyNames:\n                    type: string\n                  additionalProperties:\n                    type: string\n      x-codeSamples:\n        - lang: js\n          source: |-\n            import { createOpencodeClient } from \"@opencode-ai/sdk\n\n            const client = createOpencodeClient()\n            await client.pty.create({\n              ...\n            })\n  /pty/{ptyID}:\n    get:\n      operationId: pty.get\n      parameters:\n        - in: query\n          name: directory\n          schema:\n            type: string\n        - in: path\n          name: ptyID\n          schema:\n            type: string\n          required: true\n      summary: Get PTY session\n      description: Retrieve detailed information about a specific pseudo-terminal\n        (PTY) session.\n      responses:\n        '200':\n          description: Session info\n          content:\n            application/json:\n              schema:\n                $ref: '#/components/schemas/Pty'\n        '404':\n          description: Not found\n          content:\n            application/json:\n              schema:\n                $ref: '#/components/schemas/NotFoundError'\n      x-codeSamples:\n        - lang: js\n          source: |-\n            import { createOpencodeClient } from \"@opencode-ai/sdk\n\n            const client = createOpencodeClient()\n            await client.pty.get({\n              ...\n            })\n    put:\n      operationId: pty.update\n      parameters:\n        - in: query\n          name: directory\n          schema:\n            type: string\n        - in: path\n          name: ptyID\n          schema:\n            type: string\n          required: true\n      summary: Update PTY session\n      description: Update properties of an existing pseudo-terminal (PTY) session.\n      responses:\n        '200':\n          description: Updated session\n          content:\n            application/json:\n              schema:\n                $ref: '#/components/schemas/Pty'\n        '400':\n          description: Bad request\n          content:\n            application/json:\n              schema:\n                $ref: '#/components/schemas/BadRequestError'\n      requestBody:\n        content:\n          application/json:\n            schema:\n              type: object\n              properties:\n                title:\n                  type: string\n                size:\n                  type: object\n                  properties:\n                    rows:\n                      type: number\n                    cols:\n                      type: number\n                  required:\n                    - rows\n                    - cols\n      x-codeSamples:\n        - lang: js\n          source: |-\n            import { createOpencodeClient } from \"@opencode-ai/sdk\n\n            const client = createOpencodeClient()\n            await client.pty.update({\n              ...\n            })\n    delete:\n      operationId: pty.remove\n      parameters:\n        - in: query\n          name: directory\n          schema:\n            type: string\n        - in: path\n          name: ptyID\n          schema:\n            type: string\n          required: true\n      summary: Remove PTY session\n      description: Remove and terminate a specific pseudo-terminal (PTY) session.\n      responses:\n        '200':\n          description: Session removed\n          content:\n            application/json:\n              schema:\n                type: boolean\n        '404':\n          description: Not found\n          content:\n            application/json:\n              schema:\n                $ref: '#/components/schemas/NotFoundError'\n      x-codeSamples:\n        - lang: js\n          source: |-\n            import { createOpencodeClient } from \"@opencode-ai/sdk\n\n            const client = createOpencodeClient()\n            await client.pty.remove({\n              ...\n            })\n  /pty/{ptyID}/connect:\n    get:\n      operationId: pty.connect\n      parameters:\n        - in: query\n          name: directory\n          schema:\n            type: string\n        - in: path\n          name: ptyID\n          schema:\n            type: string\n          required: true\n      summary: Connect to PTY session\n      description: Establish a WebSocket connection to interact with a pseudo-terminal\n        (PTY) session in real-time.\n      responses:\n        '200':\n          description: Connected session\n          content:\n            application/json:\n              schema:\n                type: boolean\n        '404':\n          description: Not found\n          content:\n            application/json:\n              schema:\n                $ref: '#/components/schemas/NotFoundError'\n      x-codeSamples:\n        - lang: js\n          source: |-\n            import { createOpencodeClient } from \"@opencode-ai/sdk\n\n            const client = createOpencodeClient()\n            await client.pty.connect({\n              ...\n            })\n  /config:\n    get:\n      operationId: config.get\n      parameters:\n        - in: query\n          name: directory\n          schema:\n            type: string\n      summary: Get configuration\n      description: Retrieve the current OpenCode configuration settings and preferences.\n      responses:\n        '200':\n          description: Get config info\n          content:\n            application/json:\n              schema:\n                $ref: '#/components/schemas/Config'\n      x-codeSamples:\n        - lang: js\n          source: |-\n            import { createOpencodeClient } from \"@opencode-ai/sdk\n\n            const client = createOpencodeClient()\n            await client.config.get({\n              ...\n            })\n    patch:\n      operationId: config.update\n      parameters:\n        - in: query\n          name: directory\n          schema:\n            type: string\n      summary: Update configuration\n      description: Update OpenCode configuration settings and preferences.\n      responses:\n        '200':\n          description: Successfully updated config\n          content:\n            application/json:\n              schema:\n                $ref: '#/components/schemas/Config'\n        '400':\n          description: Bad request\n          content:\n            application/json:\n              schema:\n                $ref: '#/components/schemas/BadRequestError'\n      requestBody:\n        content:\n          application/json:\n            schema:\n              $ref: '#/components/schemas/Config'\n      x-codeSamples:\n        - lang: js\n          source: |-\n            import { createOpencodeClient } from \"@opencode-ai/sdk\n\n            const client = createOpencodeClient()\n            await client.config.update({\n              ...\n            })\n  /experimental/tool/ids:\n    get:\n      operationId: tool.ids\n      parameters:\n        - in: query\n          name: directory\n          schema:\n            type: string\n      summary: List tool IDs\n      description: Get a list of all available tool IDs, including both built-in tools\n        and dynamically registered tools.\n      responses:\n        '200':\n          description: Tool IDs\n          content:\n            application/json:\n              schema:\n                $ref: '#/components/schemas/ToolIDs'\n        '400':\n          description: Bad request\n          content:\n            application/json:\n              schema:\n                $ref: '#/components/schemas/BadRequestError'\n      x-codeSamples:\n        - lang: js\n          source: |-\n            import { createOpencodeClient } from \"@opencode-ai/sdk\n\n            const client = createOpencodeClient()\n            await client.tool.ids({\n              ...\n            })\n  /experimental/tool:\n    get:\n      operationId: tool.list\n      parameters:\n        - in: query\n          name: directory\n          schema:\n            type: string\n        - in: query\n          name: provider\n          schema:\n            type: string\n          required: true\n        - in: query\n          name: model\n          schema:\n            type: string\n          required: true\n      summary: List tools\n      description: Get a list of available tools with their JSON schema parameters for\n        a specific provider and model combination.\n      responses:\n        '200':\n          description: Tools\n          content:\n            application/json:\n              schema:\n                $ref: '#/components/schemas/ToolList'\n        '400':\n          description: Bad request\n          content:\n            application/json:\n              schema:\n                $ref: '#/components/schemas/BadRequestError'\n      x-codeSamples:\n        - lang: js\n          source: |-\n            import { createOpencodeClient } from \"@opencode-ai/sdk\n\n            const client = createOpencodeClient()\n            await client.tool.list({\n              ...\n            })\n  /instance/dispose:\n    post:\n      operationId: instance.dispose\n      parameters:\n        - in: query\n          name: directory\n          schema:\n            type: string\n      summary: Dispose instance\n      description: Clean up and dispose the current OpenCode instance, releasing all\n        resources.\n      responses:\n        '200':\n          description: Instance disposed\n          content:\n            application/json:\n              schema:\n                type: boolean\n      x-codeSamples:\n        - lang: js\n          source: |-\n            import { createOpencodeClient } from \"@opencode-ai/sdk\n\n            const client = createOpencodeClient()\n            await client.instance.dispose({\n              ...\n            })\n  /path:\n    get:\n      operationId: path.get\n      parameters:\n        - in: query\n          name: directory\n          schema:\n            type: string\n      summary: Get paths\n      description: Retrieve the current working directory and related path information\n        for the OpenCode instance.\n      responses:\n        '200':\n          description: Path\n          content:\n            application/json:\n              schema:\n                $ref: '#/components/schemas/Path'\n      x-codeSamples:\n        - lang: js\n          source: |-\n            import { createOpencodeClient } from \"@opencode-ai/sdk\n\n            const client = createOpencodeClient()\n            await client.path.get({\n              ...\n            })\n  /vcs:\n    get:\n      operationId: vcs.get\n      parameters:\n        - in: query\n          name: directory\n          schema:\n            type: string\n      summary: Get VCS info\n      description: Retrieve version control system (VCS) information for the current\n        project, such as git branch.\n      responses:\n        '200':\n          description: VCS info\n          content:\n            application/json:\n              schema:\n                $ref: '#/components/schemas/VcsInfo'\n      x-codeSamples:\n        - lang: js\n          source: |-\n            import { createOpencodeClient } from \"@opencode-ai/sdk\n\n            const client = createOpencodeClient()\n            await client.vcs.get({\n              ...\n            })\n  /session:\n    get:\n      operationId: session.list\n      parameters:\n        - in: query\n          name: directory\n          schema:\n            type: string\n      summary: List sessions\n      description: Get a list of all OpenCode sessions, sorted by most recently updated.\n      responses:\n        '200':\n          description: List of sessions\n          content:\n            application/json:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/Session'\n      x-codeSamples:\n        - lang: js\n          source: |-\n            import { createOpencodeClient } from \"@opencode-ai/sdk\n\n            const client = createOpencodeClient()\n            await client.session.list({\n              ...\n            })\n    post:\n      operationId: session.create\n      parameters:\n        - in: query\n          name: directory\n          schema:\n            type: string\n      summary: Create session\n      description: Create a new OpenCode session for interacting with AI assistants\n        and managing conversations.\n      responses:\n        '200':\n          description: Successfully created session\n          content:\n            application/json:\n              schema:\n                $ref: '#/components/schemas/Session'\n        '400':\n          description: Bad request\n          content:\n            application/json:\n              schema:\n                $ref: '#/components/schemas/BadRequestError'\n      requestBody:\n        content:\n          application/json:\n            schema:\n              type: object\n              properties:\n                parentID:\n                  type: string\n                  pattern: ^ses.*\n                title:\n                  type: string\n                permission:\n                  $ref: '#/components/schemas/PermissionRuleset'\n      x-codeSamples:\n        - lang: js\n          source: |-\n            import { createOpencodeClient } from \"@opencode-ai/sdk\n\n            const client = createOpencodeClient()\n            await client.session.create({\n              ...\n            })\n  /session/status:\n    get:\n      operationId: session.status\n      parameters:\n        - in: query\n          name: directory\n          schema:\n            type: string\n      summary: Get session status\n      description: Retrieve the current status of all sessions, including active,\n        idle, and completed states.\n      responses:\n        '200':\n          description: Get session status\n          content:\n            application/json:\n              schema:\n                type: object\n                propertyNames:\n                  type: string\n                additionalProperties:\n                  $ref: '#/components/schemas/SessionStatus'\n        '400':\n          description: Bad request\n          content:\n            application/json:\n              schema:\n                $ref: '#/components/schemas/BadRequestError'\n      x-codeSamples:\n        - lang: js\n          source: |-\n            import { createOpencodeClient } from \"@opencode-ai/sdk\n\n            const client = createOpencodeClient()\n            await client.session.status({\n              ...\n            })\n  /session/{sessionID}:\n    get:\n      operationId: session.get\n      parameters:\n        - in: query\n          name: directory\n          schema:\n            type: string\n        - in: path\n          name: sessionID\n          schema:\n            type: string\n            pattern: ^ses.*\n          required: true\n      summary: Get session\n      description: Retrieve detailed information about a specific OpenCode session.\n      tags:\n        - Session\n      responses:\n        '200':\n          description: Get session\n          content:\n            application/json:\n              schema:\n                $ref: '#/components/schemas/Session'\n        '400':\n          description: Bad request\n          content:\n            application/json:\n              schema:\n                $ref: '#/components/schemas/BadRequestError'\n        '404':\n          description: Not found\n          content:\n            application/json:\n              schema:\n                $ref: '#/components/schemas/NotFoundError'\n      x-codeSamples:\n        - lang: js\n          source: |-\n            import { createOpencodeClient } from \"@opencode-ai/sdk\n\n            const client = createOpencodeClient()\n            await client.session.get({\n              ...\n            })\n    delete:\n      operationId: session.delete\n      parameters:\n        - in: query\n          name: directory\n          schema:\n            type: string\n        - in: path\n          name: sessionID\n          schema:\n            type: string\n            pattern: ^ses.*\n          required: true\n      summary: Delete session\n      description: Delete a session and permanently remove all associated data,\n        including messages and history.\n      responses:\n        '200':\n          description: Successfully deleted session\n          content:\n            application/json:\n              schema:\n                type: boolean\n        '400':\n          description: Bad request\n          content:\n            application/json:\n              schema:\n                $ref: '#/components/schemas/BadRequestError'\n        '404':\n          description: Not found\n          content:\n            application/json:\n              schema:\n                $ref: '#/components/schemas/NotFoundError'\n      x-codeSamples:\n        - lang: js\n          source: |-\n            import { createOpencodeClient } from \"@opencode-ai/sdk\n\n            const client = createOpencodeClient()\n            await client.session.delete({\n              ...\n            })\n    patch:\n      operationId: session.update\n      parameters:\n        - in: query\n          name: directory\n          schema:\n            type: string\n        - in: path\n          name: sessionID\n          schema:\n            type: string\n          required: true\n      summary: Update session\n      description: Update properties of an existing session, such as title or other\n        metadata.\n      responses:\n        '200':\n          description: Successfully updated session\n          content:\n            application/json:\n              schema:\n                $ref: '#/components/schemas/Session'\n        '400':\n          description: Bad request\n          content:\n            application/json:\n              schema:\n                $ref: '#/components/schemas/BadRequestError'\n        '404':\n          description: Not found\n          content:\n            application/json:\n              schema:\n                $ref: '#/components/schemas/NotFoundError'\n      requestBody:\n        content:\n          application/json:\n            schema:\n              type: object\n              properties:\n                title:\n                  type: string\n                time:\n                  type: object\n                  properties:\n                    archived:\n                      type: number\n      x-codeSamples:\n        - lang: js\n          source: |-\n            import { createOpencodeClient } from \"@opencode-ai/sdk\n\n            const client = createOpencodeClient()\n            await client.session.update({\n              ...\n            })\n  /session/{sessionID}/children:\n    get:\n      operationId: session.children\n      parameters:\n        - in: query\n          name: directory\n          schema:\n            type: string\n        - in: path\n          name: sessionID\n          schema:\n            type: string\n            pattern: ^ses.*\n          required: true\n      summary: Get session children\n      tags:\n        - Session\n      description: Retrieve all child sessions that were forked from the specified\n        parent session.\n      responses:\n        '200':\n          description: List of children\n          content:\n            application/json:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/Session'\n        '400':\n          description: Bad request\n          content:\n            application/json:\n              schema:\n                $ref: '#/components/schemas/BadRequestError'\n        '404':\n          description: Not found\n          content:\n            application/json:\n              schema:\n                $ref: '#/components/schemas/NotFoundError'\n      x-codeSamples:\n        - lang: js\n          source: |-\n            import { createOpencodeClient } from \"@opencode-ai/sdk\n\n            const client = createOpencodeClient()\n            await client.session.children({\n              ...\n            })\n  /session/{sessionID}/todo:\n    get:\n      operationId: session.todo\n      parameters:\n        - in: query\n          name: directory\n          schema:\n            type: string\n        - in: path\n          name: sessionID\n          schema:\n            type: string\n          required: true\n          description: Session ID\n      summary: Get session todos\n      description: Retrieve the todo list associated with a specific session, showing\n        tasks and action items.\n      responses:\n        '200':\n          description: Todo list\n          content:\n            application/json:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/Todo'\n        '400':\n          description: Bad request\n          content:\n            application/json:\n              schema:\n                $ref: '#/components/schemas/BadRequestError'\n        '404':\n          description: Not found\n          content:\n            application/json:\n              schema:\n                $ref: '#/components/schemas/NotFoundError'\n      x-codeSamples:\n        - lang: js\n          source: |-\n            import { createOpencodeClient } from \"@opencode-ai/sdk\n\n            const client = createOpencodeClient()\n            await client.session.todo({\n              ...\n            })\n  /session/{sessionID}/init:\n    post:\n      operationId: session.init\n      parameters:\n        - in: query\n          name: directory\n          schema:\n            type: string\n        - in: path\n          name: sessionID\n          schema:\n            type: string\n          required: true\n          description: Session ID\n      summary: Initialize session\n      description: Analyze the current application and create an AGENTS.md file with\n        project-specific agent configurations.\n      responses:\n        '200':\n          description: '200'\n          content:\n            application/json:\n              schema:\n                type: boolean\n        '400':\n          description: Bad request\n          content:\n            application/json:\n              schema:\n                $ref: '#/components/schemas/BadRequestError'\n        '404':\n          description: Not found\n          content:\n            application/json:\n              schema:\n                $ref: '#/components/schemas/NotFoundError'\n      requestBody:\n        content:\n          application/json:\n            schema:\n              type: object\n              properties:\n                modelID:\n                  type: string\n                providerID:\n                  type: string\n                messageID:\n                  type: string\n                  pattern: ^msg.*\n              required:\n                - modelID\n                - providerID\n                - messageID\n      x-codeSamples:\n        - lang: js\n          source: |-\n            import { createOpencodeClient } from \"@opencode-ai/sdk\n\n            const client = createOpencodeClient()\n            await client.session.init({\n              ...\n            })\n  /session/{sessionID}/fork:\n    post:\n      operationId: session.fork\n      parameters:\n        - in: query\n          name: directory\n          schema:\n            type: string\n        - in: path\n          name: sessionID\n          schema:\n            type: string\n            pattern: ^ses.*\n          required: true\n      summary: Fork session\n      description: Create a new session by forking an existing session at a specific\n        message point.\n      responses:\n        '200':\n          description: '200'\n          content:\n            application/json:\n              schema:\n                $ref: '#/components/schemas/Session'\n      requestBody:\n        content:\n          application/json:\n            schema:\n              type: object\n              properties:\n                messageID:\n                  type: string\n                  pattern: ^msg.*\n      x-codeSamples:\n        - lang: js\n          source: |-\n            import { createOpencodeClient } from \"@opencode-ai/sdk\n\n            const client = createOpencodeClient()\n            await client.session.fork({\n              ...\n            })\n  /session/{sessionID}/abort:\n    post:\n      operationId: session.abort\n      parameters:\n        - in: query\n          name: directory\n          schema:\n            type: string\n        - in: path\n          name: sessionID\n          schema:\n            type: string\n          required: true\n      summary: Abort session\n      description: Abort an active session and stop any ongoing AI processing or\n        command execution.\n      responses:\n        '200':\n          description: Aborted session\n          content:\n            application/json:\n              schema:\n                type: boolean\n        '400':\n          description: Bad request\n          content:\n            application/json:\n              schema:\n                $ref: '#/components/schemas/BadRequestError'\n        '404':\n          description: Not found\n          content:\n            application/json:\n              schema:\n                $ref: '#/components/schemas/NotFoundError'\n      x-codeSamples:\n        - lang: js\n          source: |-\n            import { createOpencodeClient } from \"@opencode-ai/sdk\n\n            const client = createOpencodeClient()\n            await client.session.abort({\n              ...\n            })\n  /session/{sessionID}/share:\n    post:\n      operationId: session.share\n      parameters:\n        - in: query\n          name: directory\n          schema:\n            type: string\n        - in: path\n          name: sessionID\n          schema:\n            type: string\n          required: true\n      summary: Share session\n      description: Create a shareable link for a session, allowing others to view the\n        conversation.\n      responses:\n        '200':\n          description: Successfully shared session\n          content:\n            application/json:\n              schema:\n                $ref: '#/components/schemas/Session'\n        '400':\n          description: Bad request\n          content:\n            application/json:\n              schema:\n                $ref: '#/components/schemas/BadRequestError'\n        '404':\n          description: Not found\n          content:\n            application/json:\n              schema:\n                $ref: '#/components/schemas/NotFoundError'\n      x-codeSamples:\n        - lang: js\n          source: |-\n            import { createOpencodeClient } from \"@opencode-ai/sdk\n\n            const client = createOpencodeClient()\n            await client.session.share({\n              ...\n            })\n    delete:\n      operationId: session.unshare\n      parameters:\n        - in: query\n          name: directory\n          schema:\n            type: string\n        - in: path\n          name: sessionID\n          schema:\n            type: string\n            pattern: ^ses.*\n          required: true\n      summary: Unshare session\n      description: Remove the shareable link for a session, making it private again.\n      responses:\n        '200':\n          description: Successfully unshared session\n          content:\n            application/json:\n              schema:\n                $ref: '#/components/schemas/Session'\n        '400':\n          description: Bad request\n          content:\n            application/json:\n              schema:\n                $ref: '#/components/schemas/BadRequestError'\n        '404':\n          description: Not found\n          content:\n            application/json:\n              schema:\n                $ref: '#/components/schemas/NotFoundError'\n      x-codeSamples:\n        - lang: js\n          source: |-\n            import { createOpencodeClient } from \"@opencode-ai/sdk\n\n            const client = createOpencodeClient()\n            await client.session.unshare({\n              ...\n            })\n  /session/{sessionID}/diff:\n    get:\n      operationId: session.diff\n      parameters:\n        - in: query\n          name: directory\n          schema:\n            type: string\n        - in: path\n          name: sessionID\n          schema:\n            type: string\n          required: true\n          description: Session ID\n        - in: query\n          name: messageID\n          schema:\n            type: string\n            pattern: ^msg.*\n      summary: Get session diff\n      description: Get all file changes (diffs) made during this session.\n      responses:\n        '200':\n          description: List of diffs\n          content:\n            application/json:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/FileDiff'\n        '400':\n          description: Bad request\n          content:\n            application/json:\n              schema:\n                $ref: '#/components/schemas/BadRequestError'\n        '404':\n          description: Not found\n          content:\n            application/json:\n              schema:\n                $ref: '#/components/schemas/NotFoundError'\n      x-codeSamples:\n        - lang: js\n          source: |-\n            import { createOpencodeClient } from \"@opencode-ai/sdk\n\n            const client = createOpencodeClient()\n            await client.session.diff({\n              ...\n            })\n  /session/{sessionID}/summarize:\n    post:\n      operationId: session.summarize\n      parameters:\n        - in: query\n          name: directory\n          schema:\n            type: string\n        - in: path\n          name: sessionID\n          schema:\n            type: string\n          required: true\n          description: Session ID\n      summary: Summarize session\n      description: Generate a concise summary of the session using AI compaction to\n        preserve key information.\n      responses:\n        '200':\n          description: Summarized session\n          content:\n            application/json:\n              schema:\n                type: boolean\n        '400':\n          description: Bad request\n          content:\n            application/json:\n              schema:\n                $ref: '#/components/schemas/BadRequestError'\n        '404':\n          description: Not found\n          content:\n            application/json:\n              schema:\n                $ref: '#/components/schemas/NotFoundError'\n      requestBody:\n        content:\n          application/json:\n            schema:\n              type: object\n              properties:\n                providerID:\n                  type: string\n                modelID:\n                  type: string\n                auto:\n                  default: false\n                  type: boolean\n              required:\n                - providerID\n                - modelID\n      x-codeSamples:\n        - lang: js\n          source: |-\n            import { createOpencodeClient } from \"@opencode-ai/sdk\n\n            const client = createOpencodeClient()\n            await client.session.summarize({\n              ...\n            })\n  /session/{sessionID}/message:\n    get:\n      operationId: session.messages\n      parameters:\n        - in: query\n          name: directory\n          schema:\n            type: string\n        - in: path\n          name: sessionID\n          schema:\n            type: string\n          required: true\n          description: Session ID\n        - in: query\n          name: limit\n          schema:\n            type: number\n      summary: Get session messages\n      description: Retrieve all messages in a session, including user prompts and AI\n        responses.\n      responses:\n        '200':\n          description: List of messages\n          content:\n            application/json:\n              schema:\n                type: array\n                items:\n                  type: object\n                  properties:\n                    info:\n                      $ref: '#/components/schemas/Message'\n                    parts:\n                      type: array\n                      items:\n                        $ref: '#/components/schemas/Part'\n                  required:\n                    - info\n                    - parts\n        '400':\n          description: Bad request\n          content:\n            application/json:\n              schema:\n                $ref: '#/components/schemas/BadRequestError'\n        '404':\n          description: Not found\n          content:\n            application/json:\n              schema:\n                $ref: '#/components/schemas/NotFoundError'\n      x-codeSamples:\n        - lang: js\n          source: |-\n            import { createOpencodeClient } from \"@opencode-ai/sdk\n\n            const client = createOpencodeClient()\n            await client.session.messages({\n              ...\n            })\n    post:\n      operationId: session.prompt\n      parameters:\n        - in: query\n          name: directory\n          schema:\n            type: string\n        - in: path\n          name: sessionID\n          schema:\n            type: string\n          required: true\n          description: Session ID\n      summary: Send message\n      description: Create and send a new message to a session, streaming the AI response.\n      responses:\n        '200':\n          description: Created message\n          content:\n            application/json:\n              schema:\n                type: object\n                properties:\n                  info:\n                    $ref: '#/components/schemas/AssistantMessage'\n                  parts:\n                    type: array\n                    items:\n                      $ref: '#/components/schemas/Part'\n                required:\n                  - info\n                  - parts\n        '400':\n          description: Bad request\n          content:\n            application/json:\n              schema:\n                $ref: '#/components/schemas/BadRequestError'\n        '404':\n          description: Not found\n          content:\n            application/json:\n              schema:\n                $ref: '#/components/schemas/NotFoundError'\n      requestBody:\n        content:\n          application/json:\n            schema:\n              type: object\n              properties:\n                messageID:\n                  type: string\n                  pattern: ^msg.*\n                model:\n                  type: object\n                  properties:\n                    providerID:\n                      type: string\n                    modelID:\n                      type: string\n                  required:\n                    - providerID\n                    - modelID\n                agent:\n                  type: string\n                noReply:\n                  type: boolean\n                tools:\n                  description: '@deprecated tools and permissions have been merged, you can set\n                    permissions on the session itself now'\n                  type: object\n                  propertyNames:\n                    type: string\n                  additionalProperties:\n                    type: boolean\n                system:\n                  type: string\n                variant:\n                  type: string\n                parts:\n                  type: array\n                  items:\n                    anyOf:\n                      - $ref: '#/components/schemas/TextPartInput'\n                      - $ref: '#/components/schemas/FilePartInput'\n                      - $ref: '#/components/schemas/AgentPartInput'\n                      - $ref: '#/components/schemas/SubtaskPartInput'\n              required:\n                - parts\n      x-codeSamples:\n        - lang: js\n          source: |-\n            import { createOpencodeClient } from \"@opencode-ai/sdk\n\n            const client = createOpencodeClient()\n            await client.session.prompt({\n              ...\n            })\n  /session/{sessionID}/message/{messageID}:\n    get:\n      operationId: session.message\n      parameters:\n        - in: query\n          name: directory\n          schema:\n            type: string\n        - in: path\n          name: sessionID\n          schema:\n            type: string\n          required: true\n          description: Session ID\n        - in: path\n          name: messageID\n          schema:\n            type: string\n          required: true\n          description: Message ID\n      summary: Get message\n      description: Retrieve a specific message from a session by its message ID.\n      responses:\n        '200':\n          description: Message\n          content:\n            application/json:\n              schema:\n                type: object\n                properties:\n                  info:\n                    $ref: '#/components/schemas/Message'\n                  parts:\n                    type: array\n                    items:\n                      $ref: '#/components/schemas/Part'\n                required:\n                  - info\n                  - parts\n        '400':\n          description: Bad request\n          content:\n            application/json:\n              schema:\n                $ref: '#/components/schemas/BadRequestError'\n        '404':\n          description: Not found\n          content:\n            application/json:\n              schema:\n                $ref: '#/components/schemas/NotFoundError'\n      x-codeSamples:\n        - lang: js\n          source: |-\n            import { createOpencodeClient } from \"@opencode-ai/sdk\n\n            const client = createOpencodeClient()\n            await client.session.message({\n              ...\n            })\n  /session/{sessionID}/message/{messageID}/part/{partID}:\n    delete:\n      operationId: part.delete\n      parameters:\n        - in: query\n          name: directory\n          schema:\n            type: string\n        - in: path\n          name: sessionID\n          schema:\n            type: string\n          required: true\n          description: Session ID\n        - in: path\n          name: messageID\n          schema:\n            type: string\n          required: true\n          description: Message ID\n        - in: path\n          name: partID\n          schema:\n            type: string\n          required: true\n          description: Part ID\n      description: Delete a part from a message\n      responses:\n        '200':\n          description: Successfully deleted part\n          content:\n            application/json:\n              schema:\n                type: boolean\n        '400':\n          description: Bad request\n          content:\n            application/json:\n              schema:\n                $ref: '#/components/schemas/BadRequestError'\n        '404':\n          description: Not found\n          content:\n            application/json:\n              schema:\n                $ref: '#/components/schemas/NotFoundError'\n      x-codeSamples:\n        - lang: js\n          source: |-\n            import { createOpencodeClient } from \"@opencode-ai/sdk\n\n            const client = createOpencodeClient()\n            await client.part.delete({\n              ...\n            })\n    patch:\n      operationId: part.update\n      parameters:\n        - in: query\n          name: directory\n          schema:\n            type: string\n        - in: path\n          name: sessionID\n          schema:\n            type: string\n          required: true\n          description: Session ID\n        - in: path\n          name: messageID\n          schema:\n            type: string\n          required: true\n          description: Message ID\n        - in: path\n          name: partID\n          schema:\n            type: string\n          required: true\n          description: Part ID\n      description: Update a part in a message\n      responses:\n        '200':\n          description: Successfully updated part\n          content:\n            application/json:\n              schema:\n                $ref: '#/components/schemas/Part'\n        '400':\n          description: Bad request\n          content:\n            application/json:\n              schema:\n                $ref: '#/components/schemas/BadRequestError'\n        '404':\n          description: Not found\n          content:\n            application/json:\n              schema:\n                $ref: '#/components/schemas/NotFoundError'\n      requestBody:\n        content:\n          application/json:\n            schema:\n              $ref: '#/components/schemas/Part'\n      x-codeSamples:\n        - lang: js\n          source: |-\n            import { createOpencodeClient } from \"@opencode-ai/sdk\n\n            const client = createOpencodeClient()\n            await client.part.update({\n              ...\n            })\n  /session/{sessionID}/prompt_async:\n    post:\n      operationId: session.prompt_async\n      parameters:\n        - in: query\n          name: directory\n          schema:\n            type: string\n        - in: path\n          name: sessionID\n          schema:\n            type: string\n          required: true\n          description: Session ID\n      summary: Send async message\n      description: Create and send a new message to a session asynchronously, starting\n        the session if needed and returning immediately.\n      responses:\n        '204':\n          description: Prompt accepted\n        '400':\n          description: Bad request\n          content:\n            application/json:\n              schema:\n                $ref: '#/components/schemas/BadRequestError'\n        '404':\n          description: Not found\n          content:\n            application/json:\n              schema:\n                $ref: '#/components/schemas/NotFoundError'\n      requestBody:\n        content:\n          application/json:\n            schema:\n              type: object\n              properties:\n                messageID:\n                  type: string\n                  pattern: ^msg.*\n                model:\n                  type: object\n                  properties:\n                    providerID:\n                      type: string\n                    modelID:\n                      type: string\n                  required:\n                    - providerID\n                    - modelID\n                agent:\n                  type: string\n                noReply:\n                  type: boolean\n                tools:\n                  description: '@deprecated tools and permissions have been merged, you can set\n                    permissions on the session itself now'\n                  type: object\n                  propertyNames:\n                    type: string\n                  additionalProperties:\n                    type: boolean\n                system:\n                  type: string\n                variant:\n                  type: string\n                parts:\n                  type: array\n                  items:\n                    anyOf:\n                      - $ref: '#/components/schemas/TextPartInput'\n                      - $ref: '#/components/schemas/FilePartInput'\n                      - $ref: '#/components/schemas/AgentPartInput'\n                      - $ref: '#/components/schemas/SubtaskPartInput'\n              required:\n                - parts\n      x-codeSamples:\n        - lang: js\n          source: |-\n            import { createOpencodeClient } from \"@opencode-ai/sdk\n\n            const client = createOpencodeClient()\n            await client.session.prompt_async({\n              ...\n            })\n  /session/{sessionID}/command:\n    post:\n      operationId: session.command\n      parameters:\n        - in: query\n          name: directory\n          schema:\n            type: string\n        - in: path\n          name: sessionID\n          schema:\n            type: string\n          required: true\n          description: Session ID\n      summary: Send command\n      description: Send a new command to a session for execution by the AI assistant.\n      responses:\n        '200':\n          description: Created message\n          content:\n            application/json:\n              schema:\n                type: object\n                properties:\n                  info:\n                    $ref: '#/components/schemas/AssistantMessage'\n                  parts:\n                    type: array\n                    items:\n                      $ref: '#/components/schemas/Part'\n                required:\n                  - info\n                  - parts\n        '400':\n          description: Bad request\n          content:\n            application/json:\n              schema:\n                $ref: '#/components/schemas/BadRequestError'\n        '404':\n          description: Not found\n          content:\n            application/json:\n              schema:\n                $ref: '#/components/schemas/NotFoundError'\n      requestBody:\n        content:\n          application/json:\n            schema:\n              type: object\n              properties:\n                messageID:\n                  type: string\n                  pattern: ^msg.*\n                agent:\n                  type: string\n                model:\n                  type: string\n                arguments:\n                  type: string\n                command:\n                  type: string\n                variant:\n                  type: string\n              required:\n                - arguments\n                - command\n      x-codeSamples:\n        - lang: js\n          source: |-\n            import { createOpencodeClient } from \"@opencode-ai/sdk\n\n            const client = createOpencodeClient()\n            await client.session.command({\n              ...\n            })\n  /session/{sessionID}/shell:\n    post:\n      operationId: session.shell\n      parameters:\n        - in: query\n          name: directory\n          schema:\n            type: string\n        - in: path\n          name: sessionID\n          schema:\n            type: string\n          required: true\n          description: Session ID\n      summary: Run shell command\n      description: Execute a shell command within the session context and return the\n        AI's response.\n      responses:\n        '200':\n          description: Created message\n          content:\n            application/json:\n              schema:\n                $ref: '#/components/schemas/AssistantMessage'\n        '400':\n          description: Bad request\n          content:\n            application/json:\n              schema:\n                $ref: '#/components/schemas/BadRequestError'\n        '404':\n          description: Not found\n          content:\n            application/json:\n              schema:\n                $ref: '#/components/schemas/NotFoundError'\n      requestBody:\n        content:\n          application/json:\n            schema:\n              type: object\n              properties:\n                agent:\n                  type: string\n                model:\n                  type: object\n                  properties:\n                    providerID:\n                      type: string\n                    modelID:\n                      type: string\n                  required:\n                    - providerID\n                    - modelID\n                command:\n                  type: string\n              required:\n                - agent\n                - command\n      x-codeSamples:\n        - lang: js\n          source: |-\n            import { createOpencodeClient } from \"@opencode-ai/sdk\n\n            const client = createOpencodeClient()\n            await client.session.shell({\n              ...\n            })\n  /session/{sessionID}/revert:\n    post:\n      operationId: session.revert\n      parameters:\n        - in: query\n          name: directory\n          schema:\n            type: string\n        - in: path\n          name: sessionID\n          schema:\n            type: string\n          required: true\n      summary: Revert message\n      description: Revert a specific message in a session, undoing its effects and\n        restoring the previous state.\n      responses:\n        '200':\n          description: Updated session\n          content:\n            application/json:\n              schema:\n                $ref: '#/components/schemas/Session'\n        '400':\n          description: Bad request\n          content:\n            application/json:\n              schema:\n                $ref: '#/components/schemas/BadRequestError'\n        '404':\n          description: Not found\n          content:\n            application/json:\n              schema:\n                $ref: '#/components/schemas/NotFoundError'\n      requestBody:\n        content:\n          application/json:\n            schema:\n              type: object\n              properties:\n                messageID:\n                  type: string\n                  pattern: ^msg.*\n                partID:\n                  type: string\n                  pattern: ^prt.*\n              required:\n                - messageID\n      x-codeSamples:\n        - lang: js\n          source: |-\n            import { createOpencodeClient } from \"@opencode-ai/sdk\n\n            const client = createOpencodeClient()\n            await client.session.revert({\n              ...\n            })\n  /session/{sessionID}/unrevert:\n    post:\n      operationId: session.unrevert\n      parameters:\n        - in: query\n          name: directory\n          schema:\n            type: string\n        - in: path\n          name: sessionID\n          schema:\n            type: string\n          required: true\n      summary: Restore reverted messages\n      description: Restore all previously reverted messages in a session.\n      responses:\n        '200':\n          description: Updated session\n          content:\n            application/json:\n              schema:\n                $ref: '#/components/schemas/Session'\n        '400':\n          description: Bad request\n          content:\n            application/json:\n              schema:\n                $ref: '#/components/schemas/BadRequestError'\n        '404':\n          description: Not found\n          content:\n            application/json:\n              schema:\n                $ref: '#/components/schemas/NotFoundError'\n      x-codeSamples:\n        - lang: js\n          source: |-\n            import { createOpencodeClient } from \"@opencode-ai/sdk\n\n            const client = createOpencodeClient()\n            await client.session.unrevert({\n              ...\n            })\n  /session/{sessionID}/permissions/{permissionID}:\n    post:\n      operationId: permission.respond\n      parameters:\n        - in: query\n          name: directory\n          schema:\n            type: string\n        - in: path\n          name: sessionID\n          schema:\n            type: string\n          required: true\n        - in: path\n          name: permissionID\n          schema:\n            type: string\n          required: true\n      summary: Respond to permission\n      deprecated: true\n      description: Approve or deny a permission request from the AI assistant.\n      responses:\n        '200':\n          description: Permission processed successfully\n          content:\n            application/json:\n              schema:\n                type: boolean\n        '400':\n          description: Bad request\n          content:\n            application/json:\n              schema:\n                $ref: '#/components/schemas/BadRequestError'\n        '404':\n          description: Not found\n          content:\n            application/json:\n              schema:\n                $ref: '#/components/schemas/NotFoundError'\n      requestBody:\n        content:\n          application/json:\n            schema:\n              type: object\n              properties:\n                response:\n                  type: string\n                  enum:\n                    - once\n                    - always\n                    - reject\n              required:\n                - response\n      x-codeSamples:\n        - lang: js\n          source: |-\n            import { createOpencodeClient } from \"@opencode-ai/sdk\n\n            const client = createOpencodeClient()\n            await client.permission.respond({\n              ...\n            })\n  /permission/{requestID}/reply:\n    post:\n      operationId: permission.reply\n      parameters:\n        - in: query\n          name: directory\n          schema:\n            type: string\n        - in: path\n          name: requestID\n          schema:\n            type: string\n          required: true\n      summary: Respond to permission request\n      description: Approve or deny a permission request from the AI assistant.\n      responses:\n        '200':\n          description: Permission processed successfully\n          content:\n            application/json:\n              schema:\n                type: boolean\n        '400':\n          description: Bad request\n          content:\n            application/json:\n              schema:\n                $ref: '#/components/schemas/BadRequestError'\n        '404':\n          description: Not found\n          content:\n            application/json:\n              schema:\n                $ref: '#/components/schemas/NotFoundError'\n      requestBody:\n        content:\n          application/json:\n            schema:\n              type: object\n              properties:\n                reply:\n                  type: string\n                  enum:\n                    - once\n                    - always\n                    - reject\n              required:\n                - reply\n      x-codeSamples:\n        - lang: js\n          source: |-\n            import { createOpencodeClient } from \"@opencode-ai/sdk\n\n            const client = createOpencodeClient()\n            await client.permission.reply({\n              ...\n            })\n  /permission:\n    get:\n      operationId: permission.list\n      parameters:\n        - in: query\n          name: directory\n          schema:\n            type: string\n      summary: List pending permissions\n      description: Get all pending permission requests across all sessions.\n      responses:\n        '200':\n          description: List of pending permissions\n          content:\n            application/json:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/PermissionRequest'\n      x-codeSamples:\n        - lang: js\n          source: |-\n            import { createOpencodeClient } from \"@opencode-ai/sdk\n\n            const client = createOpencodeClient()\n            await client.permission.list({\n              ...\n            })\n  /command:\n    get:\n      operationId: command.list\n      parameters:\n        - in: query\n          name: directory\n          schema:\n            type: string\n      summary: List commands\n      description: Get a list of all available commands in the OpenCode system.\n      responses:\n        '200':\n          description: List of commands\n          content:\n            application/json:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/Command'\n      x-codeSamples:\n        - lang: js\n          source: |-\n            import { createOpencodeClient } from \"@opencode-ai/sdk\n\n            const client = createOpencodeClient()\n            await client.command.list({\n              ...\n            })\n  /config/providers:\n    get:\n      operationId: config.providers\n      parameters:\n        - in: query\n          name: directory\n          schema:\n            type: string\n      summary: List config providers\n      description: Get a list of all configured AI providers and their default models.\n      responses:\n        '200':\n          description: List of providers\n          content:\n            application/json:\n              schema:\n                type: object\n                properties:\n                  providers:\n                    type: array\n                    items:\n                      $ref: '#/components/schemas/Provider'\n                  default:\n                    type: object\n                    propertyNames:\n                      type: string\n                    additionalProperties:\n                      type: string\n                required:\n                  - providers\n                  - default\n      x-codeSamples:\n        - lang: js\n          source: |-\n            import { createOpencodeClient } from \"@opencode-ai/sdk\n\n            const client = createOpencodeClient()\n            await client.config.providers({\n              ...\n            })\n  /provider:\n    get:\n      operationId: provider.list\n      parameters:\n        - in: query\n          name: directory\n          schema:\n            type: string\n      summary: List providers\n      description: Get a list of all available AI providers, including both available\n        and connected ones.\n      responses:\n        '200':\n          description: List of providers\n          content:\n            application/json:\n              schema:\n                type: object\n                properties:\n                  all:\n                    type: array\n                    items:\n                      type: object\n                      properties:\n                        api:\n                          type: string\n                        name:\n                          type: string\n                        env:\n                          type: array\n                          items:\n                            type: string\n                        id:\n                          type: string\n                        npm:\n                          type: string\n                        models:\n                          type: object\n                          propertyNames:\n                            type: string\n                          additionalProperties:\n                            type: object\n                            properties:\n                              id:\n                                type: string\n                              name:\n                                type: string\n                              family:\n                                type: string\n                              release_date:\n                                type: string\n                              attachment:\n                                type: boolean\n                              reasoning:\n                                type: boolean\n                              temperature:\n                                type: boolean\n                              tool_call:\n                                type: boolean\n                              interleaved:\n                                anyOf:\n                                  - type: boolean\n                                    const: true\n                                  - type: object\n                                    properties:\n                                      field:\n                                        type: string\n                                        enum:\n                                          - reasoning_content\n                                          - reasoning_details\n                                    required:\n                                      - field\n                                    additionalProperties: false\n                              cost:\n                                type: object\n                                properties:\n                                  input:\n                                    type: number\n                                  output:\n                                    type: number\n                                  cache_read:\n                                    type: number\n                                  cache_write:\n                                    type: number\n                                  context_over_200k:\n                                    type: object\n                                    properties:\n                                      input:\n                                        type: number\n                                      output:\n                                        type: number\n                                      cache_read:\n                                        type: number\n                                      cache_write:\n                                        type: number\n                                    required:\n                                      - input\n                                      - output\n                                required:\n                                  - input\n                                  - output\n                              limit:\n                                type: object\n                                properties:\n                                  context:\n                                    type: number\n                                  output:\n                                    type: number\n                                required:\n                                  - context\n                                  - output\n                              modalities:\n                                type: object\n                                properties:\n                                  input:\n                                    type: array\n                                    items:\n                                      type: string\n                                      enum:\n                                        - text\n                                        - audio\n                                        - image\n                                        - video\n                                        - pdf\n                                  output:\n                                    type: array\n                                    items:\n                                      type: string\n                                      enum:\n                                        - text\n                                        - audio\n                                        - image\n                                        - video\n                                        - pdf\n                                required:\n                                  - input\n                                  - output\n                              experimental:\n                                type: boolean\n                              status:\n                                type: string\n                                enum:\n                                  - alpha\n                                  - beta\n                                  - deprecated\n                              options:\n                                type: object\n                                propertyNames:\n                                  type: string\n                                additionalProperties: {}\n                              headers:\n                                type: object\n                                propertyNames:\n                                  type: string\n                                additionalProperties:\n                                  type: string\n                              provider:\n                                type: object\n                                properties:\n                                  npm:\n                                    type: string\n                                required:\n                                  - npm\n                              variants:\n                                type: object\n                                propertyNames:\n                                  type: string\n                                additionalProperties:\n                                  type: object\n                                  propertyNames:\n                                    type: string\n                                  additionalProperties: {}\n                            required:\n                              - id\n                              - name\n                              - release_date\n                              - attachment\n                              - reasoning\n                              - temperature\n                              - tool_call\n                              - limit\n                              - options\n                      required:\n                        - name\n                        - env\n                        - id\n                        - models\n                  default:\n                    type: object\n                    propertyNames:\n                      type: string\n                    additionalProperties:\n                      type: string\n                  connected:\n                    type: array\n                    items:\n                      type: string\n                required:\n                  - all\n                  - default\n                  - connected\n      x-codeSamples:\n        - lang: js\n          source: |-\n            import { createOpencodeClient } from \"@opencode-ai/sdk\n\n            const client = createOpencodeClient()\n            await client.provider.list({\n              ...\n            })\n  /provider/auth:\n    get:\n      operationId: provider.auth\n      parameters:\n        - in: query\n          name: directory\n          schema:\n            type: string\n      summary: Get provider auth methods\n      description: Retrieve available authentication methods for all AI providers.\n      responses:\n        '200':\n          description: Provider auth methods\n          content:\n            application/json:\n              schema:\n                type: object\n                propertyNames:\n                  type: string\n                additionalProperties:\n                  type: array\n                  items:\n                    $ref: '#/components/schemas/ProviderAuthMethod'\n      x-codeSamples:\n        - lang: js\n          source: |-\n            import { createOpencodeClient } from \"@opencode-ai/sdk\n\n            const client = createOpencodeClient()\n            await client.provider.auth({\n              ...\n            })\n  /provider/{providerID}/oauth/authorize:\n    post:\n      operationId: provider.oauth.authorize\n      parameters:\n        - in: query\n          name: directory\n          schema:\n            type: string\n        - in: path\n          name: providerID\n          schema:\n            type: string\n          required: true\n          description: Provider ID\n      summary: OAuth authorize\n      description: Initiate OAuth authorization for a specific AI provider to get an\n        authorization URL.\n      responses:\n        '200':\n          description: Authorization URL and method\n          content:\n            application/json:\n              schema:\n                $ref: '#/components/schemas/ProviderAuthAuthorization'\n        '400':\n          description: Bad request\n          content:\n            application/json:\n              schema:\n                $ref: '#/components/schemas/BadRequestError'\n      requestBody:\n        content:\n          application/json:\n            schema:\n              type: object\n              properties:\n                method:\n                  description: Auth method index\n                  type: number\n              required:\n                - method\n      x-codeSamples:\n        - lang: js\n          source: |-\n            import { createOpencodeClient } from \"@opencode-ai/sdk\n\n            const client = createOpencodeClient()\n            await client.provider.oauth.authorize({\n              ...\n            })\n  /provider/{providerID}/oauth/callback:\n    post:\n      operationId: provider.oauth.callback\n      parameters:\n        - in: query\n          name: directory\n          schema:\n            type: string\n        - in: path\n          name: providerID\n          schema:\n            type: string\n          required: true\n          description: Provider ID\n      summary: OAuth callback\n      description: Handle the OAuth callback from a provider after user authorization.\n      responses:\n        '200':\n          description: OAuth callback processed successfully\n          content:\n            application/json:\n              schema:\n                type: boolean\n        '400':\n          description: Bad request\n          content:\n            application/json:\n              schema:\n                $ref: '#/components/schemas/BadRequestError'\n      requestBody:\n        content:\n          application/json:\n            schema:\n              type: object\n              properties:\n                method:\n                  description: Auth method index\n                  type: number\n                code:\n                  description: OAuth authorization code\n                  type: string\n              required:\n                - method\n      x-codeSamples:\n        - lang: js\n          source: |-\n            import { createOpencodeClient } from \"@opencode-ai/sdk\n\n            const client = createOpencodeClient()\n            await client.provider.oauth.callback({\n              ...\n            })\n  /find:\n    get:\n      operationId: find.text\n      parameters:\n        - in: query\n          name: directory\n          schema:\n            type: string\n        - in: query\n          name: pattern\n          schema:\n            type: string\n          required: true\n      summary: Find text\n      description: Search for text patterns across files in the project using ripgrep.\n      responses:\n        '200':\n          description: Matches\n          content:\n            application/json:\n              schema:\n                type: array\n                items:\n                  type: object\n                  properties:\n                    path:\n                      type: object\n                      properties:\n                        text:\n                          type: string\n                      required:\n                        - text\n                    lines:\n                      type: object\n                      properties:\n                        text:\n                          type: string\n                      required:\n                        - text\n                    line_number:\n                      type: number\n                    absolute_offset:\n                      type: number\n                    submatches:\n                      type: array\n                      items:\n                        type: object\n                        properties:\n                          match:\n                            type: object\n                            properties:\n                              text:\n                                type: string\n                            required:\n                              - text\n                          start:\n                            type: number\n                          end:\n                            type: number\n                        required:\n                          - match\n                          - start\n                          - end\n                  required:\n                    - path\n                    - lines\n                    - line_number\n                    - absolute_offset\n                    - submatches\n      x-codeSamples:\n        - lang: js\n          source: |-\n            import { createOpencodeClient } from \"@opencode-ai/sdk\n\n            const client = createOpencodeClient()\n            await client.find.text({\n              ...\n            })\n  /find/file:\n    get:\n      operationId: find.files\n      parameters:\n        - in: query\n          name: directory\n          schema:\n            type: string\n        - in: query\n          name: query\n          schema:\n            type: string\n          required: true\n        - in: query\n          name: dirs\n          schema:\n            type: string\n            enum:\n              - 'true'\n              - 'false'\n        - in: query\n          name: type\n          schema:\n            type: string\n            enum:\n              - file\n              - directory\n        - in: query\n          name: limit\n          schema:\n            type: integer\n            minimum: 1\n            maximum: 200\n      summary: Find files\n      description: Search for files or directories by name or pattern in the project\n        directory.\n      responses:\n        '200':\n          description: File paths\n          content:\n            application/json:\n              schema:\n                type: array\n                items:\n                  type: string\n      x-codeSamples:\n        - lang: js\n          source: |-\n            import { createOpencodeClient } from \"@opencode-ai/sdk\n\n            const client = createOpencodeClient()\n            await client.find.files({\n              ...\n            })\n  /find/symbol:\n    get:\n      operationId: find.symbols\n      parameters:\n        - in: query\n          name: directory\n          schema:\n            type: string\n        - in: query\n          name: query\n          schema:\n            type: string\n          required: true\n      summary: Find symbols\n      description: Search for workspace symbols like functions, classes, and variables\n        using LSP.\n      responses:\n        '200':\n          description: Symbols\n          content:\n            application/json:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/Symbol'\n      x-codeSamples:\n        - lang: js\n          source: |-\n            import { createOpencodeClient } from \"@opencode-ai/sdk\n\n            const client = createOpencodeClient()\n            await client.find.symbols({\n              ...\n            })\n  /file:\n    get:\n      operationId: file.list\n      parameters:\n        - in: query\n          name: directory\n          schema:\n            type: string\n        - in: query\n          name: path\n          schema:\n            type: string\n          required: true\n      summary: List files\n      description: List files and directories in a specified path.\n      responses:\n        '200':\n          description: Files and directories\n          content:\n            application/json:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/FileNode'\n      x-codeSamples:\n        - lang: js\n          source: |-\n            import { createOpencodeClient } from \"@opencode-ai/sdk\n\n            const client = createOpencodeClient()\n            await client.file.list({\n              ...\n            })\n  /file/content:\n    get:\n      operationId: file.read\n      parameters:\n        - in: query\n          name: directory\n          schema:\n            type: string\n        - in: query\n          name: path\n          schema:\n            type: string\n          required: true\n      summary: Read file\n      description: Read the content of a specified file.\n      responses:\n        '200':\n          description: File content\n          content:\n            application/json:\n              schema:\n                $ref: '#/components/schemas/FileContent'\n      x-codeSamples:\n        - lang: js\n          source: |-\n            import { createOpencodeClient } from \"@opencode-ai/sdk\n\n            const client = createOpencodeClient()\n            await client.file.read({\n              ...\n            })\n  /file/status:\n    get:\n      operationId: file.status\n      parameters:\n        - in: query\n          name: directory\n          schema:\n            type: string\n      summary: Get file status\n      description: Get the git status of all files in the project.\n      responses:\n        '200':\n          description: File status\n          content:\n            application/json:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/File'\n      x-codeSamples:\n        - lang: js\n          source: |-\n            import { createOpencodeClient } from \"@opencode-ai/sdk\n\n            const client = createOpencodeClient()\n            await client.file.status({\n              ...\n            })\n  /log:\n    post:\n      operationId: app.log\n      parameters:\n        - in: query\n          name: directory\n          schema:\n            type: string\n      summary: Write log\n      description: Write a log entry to the server logs with specified level and metadata.\n      responses:\n        '200':\n          description: Log entry written successfully\n          content:\n            application/json:\n              schema:\n                type: boolean\n        '400':\n          description: Bad request\n          content:\n            application/json:\n              schema:\n                $ref: '#/components/schemas/BadRequestError'\n      requestBody:\n        content:\n          application/json:\n            schema:\n              type: object\n              properties:\n                service:\n                  description: Service name for the log entry\n                  type: string\n                level:\n                  description: Log level\n                  type: string\n                  enum:\n                    - debug\n                    - info\n                    - error\n                    - warn\n                message:\n                  description: Log message\n                  type: string\n                extra:\n                  description: Additional metadata for the log entry\n                  type: object\n                  propertyNames:\n                    type: string\n                  additionalProperties: {}\n              required:\n                - service\n                - level\n                - message\n      x-codeSamples:\n        - lang: js\n          source: |-\n            import { createOpencodeClient } from \"@opencode-ai/sdk\n\n            const client = createOpencodeClient()\n            await client.app.log({\n              ...\n            })\n  /agent:\n    get:\n      operationId: app.agents\n      parameters:\n        - in: query\n          name: directory\n          schema:\n            type: string\n      summary: List agents\n      description: Get a list of all available AI agents in the OpenCode system.\n      responses:\n        '200':\n          description: List of agents\n          content:\n            application/json:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/Agent'\n      x-codeSamples:\n        - lang: js\n          source: |-\n            import { createOpencodeClient } from \"@opencode-ai/sdk\n\n            const client = createOpencodeClient()\n            await client.app.agents({\n              ...\n            })\n  /mcp:\n    get:\n      operationId: mcp.status\n      parameters:\n        - in: query\n          name: directory\n          schema:\n            type: string\n      summary: Get MCP status\n      description: Get the status of all Model Context Protocol (MCP) servers.\n      responses:\n        '200':\n          description: MCP server status\n          content:\n            application/json:\n              schema:\n                type: object\n                propertyNames:\n                  type: string\n                additionalProperties:\n                  $ref: '#/components/schemas/MCPStatus'\n      x-codeSamples:\n        - lang: js\n          source: |-\n            import { createOpencodeClient } from \"@opencode-ai/sdk\n\n            const client = createOpencodeClient()\n            await client.mcp.status({\n              ...\n            })\n    post:\n      operationId: mcp.add\n      parameters:\n        - in: query\n          name: directory\n          schema:\n            type: string\n      summary: Add MCP server\n      description: Dynamically add a new Model Context Protocol (MCP) server to the system.\n      responses:\n        '200':\n          description: MCP server added successfully\n          content:\n            application/json:\n              schema:\n                type: object\n                propertyNames:\n                  type: string\n                additionalProperties:\n                  $ref: '#/components/schemas/MCPStatus'\n        '400':\n          description: Bad request\n          content:\n            application/json:\n              schema:\n                $ref: '#/components/schemas/BadRequestError'\n      requestBody:\n        content:\n          application/json:\n            schema:\n              type: object\n              properties:\n                name:\n                  type: string\n                config:\n                  anyOf:\n                    - $ref: '#/components/schemas/McpLocalConfig'\n                    - $ref: '#/components/schemas/McpRemoteConfig'\n              required:\n                - name\n                - config\n      x-codeSamples:\n        - lang: js\n          source: |-\n            import { createOpencodeClient } from \"@opencode-ai/sdk\n\n            const client = createOpencodeClient()\n            await client.mcp.add({\n              ...\n            })\n  /mcp/{name}/auth:\n    post:\n      operationId: mcp.auth.start\n      parameters:\n        - in: query\n          name: directory\n          schema:\n            type: string\n        - schema:\n            type: string\n          in: path\n          name: name\n          required: true\n      summary: Start MCP OAuth\n      description: Start OAuth authentication flow for a Model Context Protocol (MCP)\n        server.\n      responses:\n        '200':\n          description: OAuth flow started\n          content:\n            application/json:\n              schema:\n                type: object\n                properties:\n                  authorizationUrl:\n                    description: URL to open in browser for authorization\n                    type: string\n                required:\n                  - authorizationUrl\n        '400':\n          description: Bad request\n          content:\n            application/json:\n              schema:\n                $ref: '#/components/schemas/BadRequestError'\n        '404':\n          description: Not found\n          content:\n            application/json:\n              schema:\n                $ref: '#/components/schemas/NotFoundError'\n      x-codeSamples:\n        - lang: js\n          source: |-\n            import { createOpencodeClient } from \"@opencode-ai/sdk\n\n            const client = createOpencodeClient()\n            await client.mcp.auth.start({\n              ...\n            })\n    delete:\n      operationId: mcp.auth.remove\n      parameters:\n        - in: query\n          name: directory\n          schema:\n            type: string\n        - schema:\n            type: string\n          in: path\n          name: name\n          required: true\n      summary: Remove MCP OAuth\n      description: Remove OAuth credentials for an MCP server\n      responses:\n        '200':\n          description: OAuth credentials removed\n          content:\n            application/json:\n              schema:\n                type: object\n                properties:\n                  success:\n                    type: boolean\n                    const: true\n                required:\n                  - success\n        '404':\n          description: Not found\n          content:\n            application/json:\n              schema:\n                $ref: '#/components/schemas/NotFoundError'\n      x-codeSamples:\n        - lang: js\n          source: |-\n            import { createOpencodeClient } from \"@opencode-ai/sdk\n\n            const client = createOpencodeClient()\n            await client.mcp.auth.remove({\n              ...\n            })\n  /mcp/{name}/auth/callback:\n    post:\n      operationId: mcp.auth.callback\n      parameters:\n        - in: query\n          name: directory\n          schema:\n            type: string\n        - schema:\n            type: string\n          in: path\n          name: name\n          required: true\n      summary: Complete MCP OAuth\n      description: Complete OAuth authentication for a Model Context Protocol (MCP)\n        server using the authorization code.\n      responses:\n        '200':\n          description: OAuth authentication completed\n          content:\n            application/json:\n              schema:\n                $ref: '#/components/schemas/MCPStatus'\n        '400':\n          description: Bad request\n          content:\n            application/json:\n              schema:\n                $ref: '#/components/schemas/BadRequestError'\n        '404':\n          description: Not found\n          content:\n            application/json:\n              schema:\n                $ref: '#/components/schemas/NotFoundError'\n      requestBody:\n        content:\n          application/json:\n            schema:\n              type: object\n              properties:\n                code:\n                  description: Authorization code from OAuth callback\n                  type: string\n              required:\n                - code\n      x-codeSamples:\n        - lang: js\n          source: |-\n            import { createOpencodeClient } from \"@opencode-ai/sdk\n\n            const client = createOpencodeClient()\n            await client.mcp.auth.callback({\n              ...\n            })\n  /mcp/{name}/auth/authenticate:\n    post:\n      operationId: mcp.auth.authenticate\n      parameters:\n        - in: query\n          name: directory\n          schema:\n            type: string\n        - schema:\n            type: string\n          in: path\n          name: name\n          required: true\n      summary: Authenticate MCP OAuth\n      description: Start OAuth flow and wait for callback (opens browser)\n      responses:\n        '200':\n          description: OAuth authentication completed\n          content:\n            application/json:\n              schema:\n                $ref: '#/components/schemas/MCPStatus'\n        '400':\n          description: Bad request\n          content:\n            application/json:\n              schema:\n                $ref: '#/components/schemas/BadRequestError'\n        '404':\n          description: Not found\n          content:\n            application/json:\n              schema:\n                $ref: '#/components/schemas/NotFoundError'\n      x-codeSamples:\n        - lang: js\n          source: |-\n            import { createOpencodeClient } from \"@opencode-ai/sdk\n\n            const client = createOpencodeClient()\n            await client.mcp.auth.authenticate({\n              ...\n            })\n  /mcp/{name}/connect:\n    post:\n      operationId: mcp.connect\n      parameters:\n        - in: query\n          name: directory\n          schema:\n            type: string\n        - in: path\n          name: name\n          schema:\n            type: string\n          required: true\n      description: Connect an MCP server\n      responses:\n        '200':\n          description: MCP server connected successfully\n          content:\n            application/json:\n              schema:\n                type: boolean\n      x-codeSamples:\n        - lang: js\n          source: |-\n            import { createOpencodeClient } from \"@opencode-ai/sdk\n\n            const client = createOpencodeClient()\n            await client.mcp.connect({\n              ...\n            })\n  /mcp/{name}/disconnect:\n    post:\n      operationId: mcp.disconnect\n      parameters:\n        - in: query\n          name: directory\n          schema:\n            type: string\n        - in: path\n          name: name\n          schema:\n            type: string\n          required: true\n      description: Disconnect an MCP server\n      responses:\n        '200':\n          description: MCP server disconnected successfully\n          content:\n            application/json:\n              schema:\n                type: boolean\n      x-codeSamples:\n        - lang: js\n          source: |-\n            import { createOpencodeClient } from \"@opencode-ai/sdk\n\n            const client = createOpencodeClient()\n            await client.mcp.disconnect({\n              ...\n            })\n  /lsp:\n    get:\n      operationId: lsp.status\n      parameters:\n        - in: query\n          name: directory\n          schema:\n            type: string\n      summary: Get LSP status\n      description: Get LSP server status\n      responses:\n        '200':\n          description: LSP server status\n          content:\n            application/json:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/LSPStatus'\n      x-codeSamples:\n        - lang: js\n          source: |-\n            import { createOpencodeClient } from \"@opencode-ai/sdk\n\n            const client = createOpencodeClient()\n            await client.lsp.status({\n              ...\n            })\n  /formatter:\n    get:\n      operationId: formatter.status\n      parameters:\n        - in: query\n          name: directory\n          schema:\n            type: string\n      summary: Get formatter status\n      description: Get formatter status\n      responses:\n        '200':\n          description: Formatter status\n          content:\n            application/json:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/FormatterStatus'\n      x-codeSamples:\n        - lang: js\n          source: |-\n            import { createOpencodeClient } from \"@opencode-ai/sdk\n\n            const client = createOpencodeClient()\n            await client.formatter.status({\n              ...\n            })\n  /tui/append-prompt:\n    post:\n      operationId: tui.appendPrompt\n      parameters:\n        - in: query\n          name: directory\n          schema:\n            type: string\n      summary: Append TUI prompt\n      description: Append prompt to the TUI\n      responses:\n        '200':\n          description: Prompt processed successfully\n          content:\n            application/json:\n              schema:\n                type: boolean\n        '400':\n          description: Bad request\n          content:\n            application/json:\n              schema:\n                $ref: '#/components/schemas/BadRequestError'\n      requestBody:\n        content:\n          application/json:\n            schema:\n              type: object\n              properties:\n                text:\n                  type: string\n              required:\n                - text\n      x-codeSamples:\n        - lang: js\n          source: |-\n            import { createOpencodeClient } from \"@opencode-ai/sdk\n\n            const client = createOpencodeClient()\n            await client.tui.appendPrompt({\n              ...\n            })\n  /tui/open-help:\n    post:\n      operationId: tui.openHelp\n      parameters:\n        - in: query\n          name: directory\n          schema:\n            type: string\n      summary: Open help dialog\n      description: Open the help dialog in the TUI to display user assistance information.\n      responses:\n        '200':\n          description: Help dialog opened successfully\n          content:\n            application/json:\n              schema:\n                type: boolean\n      x-codeSamples:\n        - lang: js\n          source: |-\n            import { createOpencodeClient } from \"@opencode-ai/sdk\n\n            const client = createOpencodeClient()\n            await client.tui.openHelp({\n              ...\n            })\n  /tui/open-sessions:\n    post:\n      operationId: tui.openSessions\n      parameters:\n        - in: query\n          name: directory\n          schema:\n            type: string\n      summary: Open sessions dialog\n      description: Open the session dialog\n      responses:\n        '200':\n          description: Session dialog opened successfully\n          content:\n            application/json:\n              schema:\n                type: boolean\n      x-codeSamples:\n        - lang: js\n          source: |-\n            import { createOpencodeClient } from \"@opencode-ai/sdk\n\n            const client = createOpencodeClient()\n            await client.tui.openSessions({\n              ...\n            })\n  /tui/open-themes:\n    post:\n      operationId: tui.openThemes\n      parameters:\n        - in: query\n          name: directory\n          schema:\n            type: string\n      summary: Open themes dialog\n      description: Open the theme dialog\n      responses:\n        '200':\n          description: Theme dialog opened successfully\n          content:\n            application/json:\n              schema:\n                type: boolean\n      x-codeSamples:\n        - lang: js\n          source: |-\n            import { createOpencodeClient } from \"@opencode-ai/sdk\n\n            const client = createOpencodeClient()\n            await client.tui.openThemes({\n              ...\n            })\n  /tui/open-models:\n    post:\n      operationId: tui.openModels\n      parameters:\n        - in: query\n          name: directory\n          schema:\n            type: string\n      summary: Open models dialog\n      description: Open the model dialog\n      responses:\n        '200':\n          description: Model dialog opened successfully\n          content:\n            application/json:\n              schema:\n                type: boolean\n      x-codeSamples:\n        - lang: js\n          source: |-\n            import { createOpencodeClient } from \"@opencode-ai/sdk\n\n            const client = createOpencodeClient()\n            await client.tui.openModels({\n              ...\n            })\n  /tui/submit-prompt:\n    post:\n      operationId: tui.submitPrompt\n      parameters:\n        - in: query\n          name: directory\n          schema:\n            type: string\n      summary: Submit TUI prompt\n      description: Submit the prompt\n      responses:\n        '200':\n          description: Prompt submitted successfully\n          content:\n            application/json:\n              schema:\n                type: boolean\n      x-codeSamples:\n        - lang: js\n          source: |-\n            import { createOpencodeClient } from \"@opencode-ai/sdk\n\n            const client = createOpencodeClient()\n            await client.tui.submitPrompt({\n              ...\n            })\n  /tui/clear-prompt:\n    post:\n      operationId: tui.clearPrompt\n      parameters:\n        - in: query\n          name: directory\n          schema:\n            type: string\n      summary: Clear TUI prompt\n      description: Clear the prompt\n      responses:\n        '200':\n          description: Prompt cleared successfully\n          content:\n            application/json:\n              schema:\n                type: boolean\n      x-codeSamples:\n        - lang: js\n          source: |-\n            import { createOpencodeClient } from \"@opencode-ai/sdk\n\n            const client = createOpencodeClient()\n            await client.tui.clearPrompt({\n              ...\n            })\n  /tui/execute-command:\n    post:\n      operationId: tui.executeCommand\n      parameters:\n        - in: query\n          name: directory\n          schema:\n            type: string\n      summary: Execute TUI command\n      description: Execute a TUI command (e.g. agent_cycle)\n      responses:\n        '200':\n          description: Command executed successfully\n          content:\n            application/json:\n              schema:\n                type: boolean\n        '400':\n          description: Bad request\n          content:\n            application/json:\n              schema:\n                $ref: '#/components/schemas/BadRequestError'\n      requestBody:\n        content:\n          application/json:\n            schema:\n              type: object\n              properties:\n                command:\n                  type: string\n              required:\n                - command\n      x-codeSamples:\n        - lang: js\n          source: |-\n            import { createOpencodeClient } from \"@opencode-ai/sdk\n\n            const client = createOpencodeClient()\n            await client.tui.executeCommand({\n              ...\n            })\n  /tui/show-toast:\n    post:\n      operationId: tui.showToast\n      parameters:\n        - in: query\n          name: directory\n          schema:\n            type: string\n      summary: Show TUI toast\n      description: Show a toast notification in the TUI\n      responses:\n        '200':\n          description: Toast notification shown successfully\n          content:\n            application/json:\n              schema:\n                type: boolean\n      requestBody:\n        content:\n          application/json:\n            schema:\n              type: object\n              properties:\n                title:\n                  type: string\n                message:\n                  type: string\n                variant:\n                  type: string\n                  enum:\n                    - info\n                    - success\n                    - warning\n                    - error\n                duration:\n                  description: Duration in milliseconds\n                  default: 5000\n                  type: number\n              required:\n                - message\n                - variant\n      x-codeSamples:\n        - lang: js\n          source: |-\n            import { createOpencodeClient } from \"@opencode-ai/sdk\n\n            const client = createOpencodeClient()\n            await client.tui.showToast({\n              ...\n            })\n  /tui/publish:\n    post:\n      operationId: tui.publish\n      parameters:\n        - in: query\n          name: directory\n          schema:\n            type: string\n      summary: Publish TUI event\n      description: Publish a TUI event\n      responses:\n        '200':\n          description: Event published successfully\n          content:\n            application/json:\n              schema:\n                type: boolean\n        '400':\n          description: Bad request\n          content:\n            application/json:\n              schema:\n                $ref: '#/components/schemas/BadRequestError'\n      requestBody:\n        content:\n          application/json:\n            schema:\n              anyOf:\n                - $ref: '#/components/schemas/Event.tui.prompt.append'\n                - $ref: '#/components/schemas/Event.tui.command.execute'\n                - $ref: '#/components/schemas/Event.tui.toast.show'\n      x-codeSamples:\n        - lang: js\n          source: |-\n            import { createOpencodeClient } from \"@opencode-ai/sdk\n\n            const client = createOpencodeClient()\n            await client.tui.publish({\n              ...\n            })\n  /tui/control/next:\n    get:\n      operationId: tui.control.next\n      parameters:\n        - in: query\n          name: directory\n          schema:\n            type: string\n      summary: Get next TUI request\n      description: Retrieve the next TUI (Terminal User Interface) request from the\n        queue for processing.\n      responses:\n        '200':\n          description: Next TUI request\n          content:\n            application/json:\n              schema:\n                type: object\n                properties:\n                  path:\n                    type: string\n                  body: {}\n                required:\n                  - path\n                  - body\n      x-codeSamples:\n        - lang: js\n          source: |-\n            import { createOpencodeClient } from \"@opencode-ai/sdk\n\n            const client = createOpencodeClient()\n            await client.tui.control.next({\n              ...\n            })\n  /tui/control/response:\n    post:\n      operationId: tui.control.response\n      parameters:\n        - in: query\n          name: directory\n          schema:\n            type: string\n      summary: Submit TUI response\n      description: Submit a response to the TUI request queue to complete a pending request.\n      responses:\n        '200':\n          description: Response submitted successfully\n          content:\n            application/json:\n              schema:\n                type: boolean\n      requestBody:\n        content:\n          application/json:\n            schema: {}\n      x-codeSamples:\n        - lang: js\n          source: |-\n            import { createOpencodeClient } from \"@opencode-ai/sdk\n\n            const client = createOpencodeClient()\n            await client.tui.control.response({\n              ...\n            })\n  /auth/{providerID}:\n    put:\n      operationId: auth.set\n      parameters:\n        - in: query\n          name: directory\n          schema:\n            type: string\n        - in: path\n          name: providerID\n          schema:\n            type: string\n          required: true\n      summary: Set auth credentials\n      description: Set authentication credentials\n      responses:\n        '200':\n          description: Successfully set authentication credentials\n          content:\n            application/json:\n              schema:\n                type: boolean\n        '400':\n          description: Bad request\n          content:\n            application/json:\n              schema:\n                $ref: '#/components/schemas/BadRequestError'\n      requestBody:\n        content:\n          application/json:\n            schema:\n              $ref: '#/components/schemas/Auth'\n      x-codeSamples:\n        - lang: js\n          source: |-\n            import { createOpencodeClient } from \"@opencode-ai/sdk\n\n            const client = createOpencodeClient()\n            await client.auth.set({\n              ...\n            })\n  /event:\n    get:\n      operationId: event.subscribe\n      parameters:\n        - in: query\n          name: directory\n          schema:\n            type: string\n      summary: Subscribe to events\n      description: Get events\n      responses:\n        '200':\n          description: Event stream\n          content:\n            text/event-stream:\n              schema:\n                $ref: '#/components/schemas/Event'\n      x-codeSamples:\n        - lang: js\n          source: |-\n            import { createOpencodeClient } from \"@opencode-ai/sdk\n\n            const client = createOpencodeClient()\n            await client.event.subscribe({\n              ...\n            })\ncomponents:\n  schemas:\n    Event.installation.updated:\n      type: object\n      properties:\n        type:\n          type: string\n          const: installation.updated\n        properties:\n          type: object\n          properties:\n            version:\n              type: string\n          required:\n            - version\n      required:\n        - type\n        - properties\n    Event.installation.update-available:\n      type: object\n      properties:\n        type:\n          type: string\n          const: installation.update-available\n        properties:\n          type: object\n          properties:\n            version:\n              type: string\n          required:\n            - version\n      required:\n        - type\n        - properties\n    Project:\n      type: object\n      properties:\n        id:\n          type: string\n        worktree:\n          type: string\n        vcs:\n          type: string\n          const: git\n        name:\n          type: string\n        icon:\n          type: object\n          properties:\n            url:\n              type: string\n            color:\n              type: string\n        time:\n          type: object\n          properties:\n            created:\n              type: number\n            updated:\n              type: number\n            initialized:\n              type: number\n          required:\n            - created\n            - updated\n      required:\n        - id\n        - worktree\n        - time\n    Event.project.updated:\n      type: object\n      properties:\n        type:\n          type: string\n          const: project.updated\n        properties:\n          $ref: '#/components/schemas/Project'\n      required:\n        - type\n        - properties\n    Event.server.instance.disposed:\n      type: object\n      properties:\n        type:\n          type: string\n          const: server.instance.disposed\n        properties:\n          type: object\n          properties:\n            directory:\n              type: string\n          required:\n            - directory\n      required:\n        - type\n        - properties\n    Event.lsp.client.diagnostics:\n      type: object\n      properties:\n        type:\n          type: string\n          const: lsp.client.diagnostics\n        properties:\n          type: object\n          properties:\n            serverID:\n              type: string\n            path:\n              type: string\n          required:\n            - serverID\n            - path\n      required:\n        - type\n        - properties\n    Event.lsp.updated:\n      type: object\n      properties:\n        type:\n          type: string\n          const: lsp.updated\n        properties:\n          type: object\n          properties: {}\n      required:\n        - type\n        - properties\n    FileDiff:\n      type: object\n      properties:\n        file:\n          type: string\n        before:\n          type: string\n        after:\n          type: string\n        additions:\n          type: number\n        deletions:\n          type: number\n      required:\n        - file\n        - before\n        - after\n        - additions\n        - deletions\n    UserMessage:\n      type: object\n      properties:\n        id:\n          type: string\n        sessionID:\n          type: string\n        role:\n          type: string\n          const: user\n        time:\n          type: object\n          properties:\n            created:\n              type: number\n          required:\n            - created\n        summary:\n          type: object\n          properties:\n            title:\n              type: string\n            body:\n              type: string\n            diffs:\n              type: array\n              items:\n                $ref: '#/components/schemas/FileDiff'\n          required:\n            - diffs\n        agent:\n          type: string\n        model:\n          type: object\n          properties:\n            providerID:\n              type: string\n            modelID:\n              type: string\n          required:\n            - providerID\n            - modelID\n        system:\n          type: string\n        tools:\n          type: object\n          propertyNames:\n            type: string\n          additionalProperties:\n            type: boolean\n        variant:\n          type: string\n      required:\n        - id\n        - sessionID\n        - role\n        - time\n        - agent\n        - model\n    ProviderAuthError:\n      type: object\n      properties:\n        name:\n          type: string\n          const: ProviderAuthError\n        data:\n          type: object\n          properties:\n            providerID:\n              type: string\n            message:\n              type: string\n          required:\n            - providerID\n            - message\n      required:\n        - name\n        - data\n    UnknownError:\n      type: object\n      properties:\n        name:\n          type: string\n          const: UnknownError\n        data:\n          type: object\n          properties:\n            message:\n              type: string\n          required:\n            - message\n      required:\n        - name\n        - data\n    MessageOutputLengthError:\n      type: object\n      properties:\n        name:\n          type: string\n          const: MessageOutputLengthError\n        data:\n          type: object\n          properties: {}\n      required:\n        - name\n        - data\n    MessageAbortedError:\n      type: object\n      properties:\n        name:\n          type: string\n          const: MessageAbortedError\n        data:\n          type: object\n          properties:\n            message:\n              type: string\n          required:\n            - message\n      required:\n        - name\n        - data\n    APIError:\n      type: object\n      properties:\n        name:\n          type: string\n          const: APIError\n        data:\n          type: object\n          properties:\n            message:\n              type: string\n            statusCode:\n              type: number\n            isRetryable:\n              type: boolean\n            responseHeaders:\n              type: object\n              propertyNames:\n                type: string\n              additionalProperties:\n                type: string\n            responseBody:\n              type: string\n            metadata:\n              type: object\n              propertyNames:\n                type: string\n              additionalProperties:\n                type: string\n          required:\n            - message\n            - isRetryable\n      required:\n        - name\n        - data\n    AssistantMessage:\n      type: object\n      properties:\n        id:\n          type: string\n        sessionID:\n          type: string\n        role:\n          type: string\n          const: assistant\n        time:\n          type: object\n          properties:\n            created:\n              type: number\n            completed:\n              type: number\n          required:\n            - created\n        error:\n          anyOf:\n            - $ref: '#/components/schemas/ProviderAuthError'\n            - $ref: '#/components/schemas/UnknownError'\n            - $ref: '#/components/schemas/MessageOutputLengthError'\n            - $ref: '#/components/schemas/MessageAbortedError'\n            - $ref: '#/components/schemas/APIError'\n        parentID:\n          type: string\n        modelID:\n          type: string\n        providerID:\n          type: string\n        mode:\n          type: string\n        agent:\n          type: string\n        path:\n          type: object\n          properties:\n            cwd:\n              type: string\n            root:\n              type: string\n          required:\n            - cwd\n            - root\n        summary:\n          type: boolean\n        cost:\n          type: number\n        tokens:\n          type: object\n          properties:\n            input:\n              type: number\n            output:\n              type: number\n            reasoning:\n              type: number\n            cache:\n              type: object\n              properties:\n                read:\n                  type: number\n                write:\n                  type: number\n              required:\n                - read\n                - write\n          required:\n            - input\n            - output\n            - reasoning\n            - cache\n        finish:\n          type: string\n      required:\n        - id\n        - sessionID\n        - role\n        - time\n        - parentID\n        - modelID\n        - providerID\n        - mode\n        - agent\n        - path\n        - cost\n        - tokens\n    Message:\n      anyOf:\n        - $ref: '#/components/schemas/UserMessage'\n        - $ref: '#/components/schemas/AssistantMessage'\n    Event.message.updated:\n      type: object\n      properties:\n        type:\n          type: string\n          const: message.updated\n        properties:\n          type: object\n          properties:\n            info:\n              $ref: '#/components/schemas/Message'\n          required:\n            - info\n      required:\n        - type\n        - properties\n    Event.message.removed:\n      type: object\n      properties:\n        type:\n          type: string\n          const: message.removed\n        properties:\n          type: object\n          properties:\n            sessionID:\n              type: string\n            messageID:\n              type: string\n          required:\n            - sessionID\n            - messageID\n      required:\n        - type\n        - properties\n    TextPart:\n      type: object\n      properties:\n        id:\n          type: string\n        sessionID:\n          type: string\n        messageID:\n          type: string\n        type:\n          type: string\n          const: text\n        text:\n          type: string\n        synthetic:\n          type: boolean\n        ignored:\n          type: boolean\n        time:\n          type: object\n          properties:\n            start:\n              type: number\n            end:\n              type: number\n          required:\n            - start\n        metadata:\n          type: object\n          propertyNames:\n            type: string\n          additionalProperties: {}\n      required:\n        - id\n        - sessionID\n        - messageID\n        - type\n        - text\n    ReasoningPart:\n      type: object\n      properties:\n        id:\n          type: string\n        sessionID:\n          type: string\n        messageID:\n          type: string\n        type:\n          type: string\n          const: reasoning\n        text:\n          type: string\n        metadata:\n          type: object\n          propertyNames:\n            type: string\n          additionalProperties: {}\n        time:\n          type: object\n          properties:\n            start:\n              type: number\n            end:\n              type: number\n          required:\n            - start\n      required:\n        - id\n        - sessionID\n        - messageID\n        - type\n        - text\n        - time\n    FilePartSourceText:\n      type: object\n      properties:\n        value:\n          type: string\n        start:\n          type: integer\n          minimum: -9007199254740991\n          maximum: 9007199254740991\n        end:\n          type: integer\n          minimum: -9007199254740991\n          maximum: 9007199254740991\n      required:\n        - value\n        - start\n        - end\n    FileSource:\n      type: object\n      properties:\n        text:\n          $ref: '#/components/schemas/FilePartSourceText'\n        type:\n          type: string\n          const: file\n        path:\n          type: string\n      required:\n        - text\n        - type\n        - path\n    Range:\n      type: object\n      properties:\n        start:\n          type: object\n          properties:\n            line:\n              type: number\n            character:\n              type: number\n          required:\n            - line\n            - character\n        end:\n          type: object\n          properties:\n            line:\n              type: number\n            character:\n              type: number\n          required:\n            - line\n            - character\n      required:\n        - start\n        - end\n    SymbolSource:\n      type: object\n      properties:\n        text:\n          $ref: '#/components/schemas/FilePartSourceText'\n        type:\n          type: string\n          const: symbol\n        path:\n          type: string\n        range:\n          $ref: '#/components/schemas/Range'\n        name:\n          type: string\n        kind:\n          type: integer\n          minimum: -9007199254740991\n          maximum: 9007199254740991\n      required:\n        - text\n        - type\n        - path\n        - range\n        - name\n        - kind\n    FilePartSource:\n      anyOf:\n        - $ref: '#/components/schemas/FileSource'\n        - $ref: '#/components/schemas/SymbolSource'\n    FilePart:\n      type: object\n      properties:\n        id:\n          type: string\n        sessionID:\n          type: string\n        messageID:\n          type: string\n        type:\n          type: string\n          const: file\n        mime:\n          type: string\n        filename:\n          type: string\n        url:\n          type: string\n        source:\n          $ref: '#/components/schemas/FilePartSource'\n      required:\n        - id\n        - sessionID\n        - messageID\n        - type\n        - mime\n        - url\n    ToolStatePending:\n      type: object\n      properties:\n        status:\n          type: string\n          const: pending\n        input:\n          type: object\n          propertyNames:\n            type: string\n          additionalProperties: {}\n        raw:\n          type: string\n      required:\n        - status\n        - input\n        - raw\n    ToolStateRunning:\n      type: object\n      properties:\n        status:\n          type: string\n          const: running\n        input:\n          type: object\n          propertyNames:\n            type: string\n          additionalProperties: {}\n        title:\n          type: string\n        metadata:\n          type: object\n          propertyNames:\n            type: string\n          additionalProperties: {}\n        time:\n          type: object\n          properties:\n            start:\n              type: number\n          required:\n            - start\n      required:\n        - status\n        - input\n        - time\n    ToolStateCompleted:\n      type: object\n      properties:\n        status:\n          type: string\n          const: completed\n        input:\n          type: object\n          propertyNames:\n            type: string\n          additionalProperties: {}\n        output:\n          type: string\n        title:\n          type: string\n        metadata:\n          type: object\n          propertyNames:\n            type: string\n          additionalProperties: {}\n        time:\n          type: object\n          properties:\n            start:\n              type: number\n            end:\n              type: number\n            compacted:\n              type: number\n          required:\n            - start\n            - end\n        attachments:\n          type: array\n          items:\n            $ref: '#/components/schemas/FilePart'\n      required:\n        - status\n        - input\n        - output\n        - title\n        - metadata\n        - time\n    ToolStateError:\n      type: object\n      properties:\n        status:\n          type: string\n          const: error\n        input:\n          type: object\n          propertyNames:\n            type: string\n          additionalProperties: {}\n        error:\n          type: string\n        metadata:\n          type: object\n          propertyNames:\n            type: string\n          additionalProperties: {}\n        time:\n          type: object\n          properties:\n            start:\n              type: number\n            end:\n              type: number\n          required:\n            - start\n            - end\n      required:\n        - status\n        - input\n        - error\n        - time\n    ToolState:\n      anyOf:\n        - $ref: '#/components/schemas/ToolStatePending'\n        - $ref: '#/components/schemas/ToolStateRunning'\n        - $ref: '#/components/schemas/ToolStateCompleted'\n        - $ref: '#/components/schemas/ToolStateError'\n    ToolPart:\n      type: object\n      properties:\n        id:\n          type: string\n        sessionID:\n          type: string\n        messageID:\n          type: string\n        type:\n          type: string\n          const: tool\n        callID:\n          type: string\n        tool:\n          type: string\n        state:\n          $ref: '#/components/schemas/ToolState'\n        metadata:\n          type: object\n          propertyNames:\n            type: string\n          additionalProperties: {}\n      required:\n        - id\n        - sessionID\n        - messageID\n        - type\n        - callID\n        - tool\n        - state\n    StepStartPart:\n      type: object\n      properties:\n        id:\n          type: string\n        sessionID:\n          type: string\n        messageID:\n          type: string\n        type:\n          type: string\n          const: step-start\n        snapshot:\n          type: string\n      required:\n        - id\n        - sessionID\n        - messageID\n        - type\n    StepFinishPart:\n      type: object\n      properties:\n        id:\n          type: string\n        sessionID:\n          type: string\n        messageID:\n          type: string\n        type:\n          type: string\n          const: step-finish\n        reason:\n          type: string\n        snapshot:\n          type: string\n        cost:\n          type: number\n        tokens:\n          type: object\n          properties:\n            input:\n              type: number\n            output:\n              type: number\n            reasoning:\n              type: number\n            cache:\n              type: object\n              properties:\n                read:\n                  type: number\n                write:\n                  type: number\n              required:\n                - read\n                - write\n          required:\n            - input\n            - output\n            - reasoning\n            - cache\n      required:\n        - id\n        - sessionID\n        - messageID\n        - type\n        - reason\n        - cost\n        - tokens\n    SnapshotPart:\n      type: object\n      properties:\n        id:\n          type: string\n        sessionID:\n          type: string\n        messageID:\n          type: string\n        type:\n          type: string\n          const: snapshot\n        snapshot:\n          type: string\n      required:\n        - id\n        - sessionID\n        - messageID\n        - type\n        - snapshot\n    PatchPart:\n      type: object\n      properties:\n        id:\n          type: string\n        sessionID:\n          type: string\n        messageID:\n          type: string\n        type:\n          type: string\n          const: patch\n        hash:\n          type: string\n        files:\n          type: array\n          items:\n            type: string\n      required:\n        - id\n        - sessionID\n        - messageID\n        - type\n        - hash\n        - files\n    AgentPart:\n      type: object\n      properties:\n        id:\n          type: string\n        sessionID:\n          type: string\n        messageID:\n          type: string\n        type:\n          type: string\n          const: agent\n        name:\n          type: string\n        source:\n          type: object\n          properties:\n            value:\n              type: string\n            start:\n              type: integer\n              minimum: -9007199254740991\n              maximum: 9007199254740991\n            end:\n              type: integer\n              minimum: -9007199254740991\n              maximum: 9007199254740991\n          required:\n            - value\n            - start\n            - end\n      required:\n        - id\n        - sessionID\n        - messageID\n        - type\n        - name\n    RetryPart:\n      type: object\n      properties:\n        id:\n          type: string\n        sessionID:\n          type: string\n        messageID:\n          type: string\n        type:\n          type: string\n          const: retry\n        attempt:\n          type: number\n        error:\n          $ref: '#/components/schemas/APIError'\n        time:\n          type: object\n          properties:\n            created:\n              type: number\n          required:\n            - created\n      required:\n        - id\n        - sessionID\n        - messageID\n        - type\n        - attempt\n        - error\n        - time\n    CompactionPart:\n      type: object\n      properties:\n        id:\n          type: string\n        sessionID:\n          type: string\n        messageID:\n          type: string\n        type:\n          type: string\n          const: compaction\n        auto:\n          type: boolean\n      required:\n        - id\n        - sessionID\n        - messageID\n        - type\n        - auto\n    Part:\n      anyOf:\n        - $ref: '#/components/schemas/TextPart'\n        - type: object\n          properties:\n            id:\n              type: string\n            sessionID:\n              type: string\n            messageID:\n              type: string\n            type:\n              type: string\n              const: subtask\n            prompt:\n              type: string\n            description:\n              type: string\n            agent:\n              type: string\n            command:\n              type: string\n          required:\n            - id\n            - sessionID\n            - messageID\n            - type\n            - prompt\n            - description\n            - agent\n        - $ref: '#/components/schemas/ReasoningPart'\n        - $ref: '#/components/schemas/FilePart'\n        - $ref: '#/components/schemas/ToolPart'\n        - $ref: '#/components/schemas/StepStartPart'\n        - $ref: '#/components/schemas/StepFinishPart'\n        - $ref: '#/components/schemas/SnapshotPart'\n        - $ref: '#/components/schemas/PatchPart'\n        - $ref: '#/components/schemas/AgentPart'\n        - $ref: '#/components/schemas/RetryPart'\n        - $ref: '#/components/schemas/CompactionPart'\n    Event.message.part.updated:\n      type: object\n      properties:\n        type:\n          type: string\n          const: message.part.updated\n        properties:\n          type: object\n          properties:\n            part:\n              $ref: '#/components/schemas/Part'\n            delta:\n              type: string\n          required:\n            - part\n      required:\n        - type\n        - properties\n    Event.message.part.removed:\n      type: object\n      properties:\n        type:\n          type: string\n          const: message.part.removed\n        properties:\n          type: object\n          properties:\n            sessionID:\n              type: string\n            messageID:\n              type: string\n            partID:\n              type: string\n          required:\n            - sessionID\n            - messageID\n            - partID\n      required:\n        - type\n        - properties\n    PermissionRequest:\n      type: object\n      properties:\n        id:\n          type: string\n          pattern: ^per.*\n        sessionID:\n          type: string\n          pattern: ^ses.*\n        permission:\n          type: string\n        patterns:\n          type: array\n          items:\n            type: string\n        metadata:\n          type: object\n          propertyNames:\n            type: string\n          additionalProperties: {}\n        always:\n          type: array\n          items:\n            type: string\n        tool:\n          type: object\n          properties:\n            messageID:\n              type: string\n            callID:\n              type: string\n          required:\n            - messageID\n            - callID\n      required:\n        - id\n        - sessionID\n        - permission\n        - patterns\n        - metadata\n        - always\n    Event.permission.asked:\n      type: object\n      properties:\n        type:\n          type: string\n          const: permission.asked\n        properties:\n          $ref: '#/components/schemas/PermissionRequest'\n      required:\n        - type\n        - properties\n    Event.permission.replied:\n      type: object\n      properties:\n        type:\n          type: string\n          const: permission.replied\n        properties:\n          type: object\n          properties:\n            sessionID:\n              type: string\n            requestID:\n              type: string\n            reply:\n              type: string\n              enum:\n                - once\n                - always\n                - reject\n          required:\n            - sessionID\n            - requestID\n            - reply\n      required:\n        - type\n        - properties\n    SessionStatus:\n      anyOf:\n        - type: object\n          properties:\n            type:\n              type: string\n              const: idle\n          required:\n            - type\n        - type: object\n          properties:\n            type:\n              type: string\n              const: retry\n            attempt:\n              type: number\n            message:\n              type: string\n            next:\n              type: number\n          required:\n            - type\n            - attempt\n            - message\n            - next\n        - type: object\n          properties:\n            type:\n              type: string\n              const: busy\n          required:\n            - type\n    Event.session.status:\n      type: object\n      properties:\n        type:\n          type: string\n          const: session.status\n        properties:\n          type: object\n          properties:\n            sessionID:\n              type: string\n            status:\n              $ref: '#/components/schemas/SessionStatus'\n          required:\n            - sessionID\n            - status\n      required:\n        - type\n        - properties\n    Event.session.idle:\n      type: object\n      properties:\n        type:\n          type: string\n          const: session.idle\n        properties:\n          type: object\n          properties:\n            sessionID:\n              type: string\n          required:\n            - sessionID\n      required:\n        - type\n        - properties\n    Event.session.compacted:\n      type: object\n      properties:\n        type:\n          type: string\n          const: session.compacted\n        properties:\n          type: object\n          properties:\n            sessionID:\n              type: string\n          required:\n            - sessionID\n      required:\n        - type\n        - properties\n    Event.file.edited:\n      type: object\n      properties:\n        type:\n          type: string\n          const: file.edited\n        properties:\n          type: object\n          properties:\n            file:\n              type: string\n          required:\n            - file\n      required:\n        - type\n        - properties\n    Todo:\n      type: object\n      properties:\n        content:\n          description: Brief description of the task\n          type: string\n        status:\n          description: 'Current status of the task: pending, in_progress, completed,\n            cancelled'\n          type: string\n        priority:\n          description: 'Priority level of the task: high, medium, low'\n          type: string\n        id:\n          description: Unique identifier for the todo item\n          type: string\n      required:\n        - content\n        - status\n        - priority\n        - id\n    Event.todo.updated:\n      type: object\n      properties:\n        type:\n          type: string\n          const: todo.updated\n        properties:\n          type: object\n          properties:\n            sessionID:\n              type: string\n            todos:\n              type: array\n              items:\n                $ref: '#/components/schemas/Todo'\n          required:\n            - sessionID\n            - todos\n      required:\n        - type\n        - properties\n    Event.tui.prompt.append:\n      type: object\n      properties:\n        type:\n          type: string\n          const: tui.prompt.append\n        properties:\n          type: object\n          properties:\n            text:\n              type: string\n          required:\n            - text\n      required:\n        - type\n        - properties\n    Event.tui.command.execute:\n      type: object\n      properties:\n        type:\n          type: string\n          const: tui.command.execute\n        properties:\n          type: object\n          properties:\n            command:\n              anyOf:\n                - type: string\n                  enum:\n                    - session.list\n                    - session.new\n                    - session.share\n                    - session.interrupt\n                    - session.compact\n                    - session.page.up\n                    - session.page.down\n                    - session.half.page.up\n                    - session.half.page.down\n                    - session.first\n                    - session.last\n                    - prompt.clear\n                    - prompt.submit\n                    - agent.cycle\n                - type: string\n          required:\n            - command\n      required:\n        - type\n        - properties\n    Event.tui.toast.show:\n      type: object\n      properties:\n        type:\n          type: string\n          const: tui.toast.show\n        properties:\n          type: object\n          properties:\n            title:\n              type: string\n            message:\n              type: string\n            variant:\n              type: string\n              enum:\n                - info\n                - success\n                - warning\n                - error\n            duration:\n              description: Duration in milliseconds\n              default: 5000\n              type: number\n          required:\n            - message\n            - variant\n      required:\n        - type\n        - properties\n    Event.mcp.tools.changed:\n      type: object\n      properties:\n        type:\n          type: string\n          const: mcp.tools.changed\n        properties:\n          type: object\n          properties:\n            server:\n              type: string\n          required:\n            - server\n      required:\n        - type\n        - properties\n    Event.command.executed:\n      type: object\n      properties:\n        type:\n          type: string\n          const: command.executed\n        properties:\n          type: object\n          properties:\n            name:\n              type: string\n            sessionID:\n              type: string\n              pattern: ^ses.*\n            arguments:\n              type: string\n            messageID:\n              type: string\n              pattern: ^msg.*\n          required:\n            - name\n            - sessionID\n            - arguments\n            - messageID\n      required:\n        - type\n        - properties\n    PermissionAction:\n      type: string\n      enum:\n        - allow\n        - deny\n        - ask\n    PermissionRule:\n      type: object\n      properties:\n        permission:\n          type: string\n        pattern:\n          type: string\n        action:\n          $ref: '#/components/schemas/PermissionAction'\n      required:\n        - permission\n        - pattern\n        - action\n    PermissionRuleset:\n      type: array\n      items:\n        $ref: '#/components/schemas/PermissionRule'\n    Session:\n      type: object\n      properties:\n        id:\n          type: string\n          pattern: ^ses.*\n        projectID:\n          type: string\n        directory:\n          type: string\n        parentID:\n          type: string\n          pattern: ^ses.*\n        summary:\n          type: object\n          properties:\n            additions:\n              type: number\n            deletions:\n              type: number\n            files:\n              type: number\n            diffs:\n              type: array\n              items:\n                $ref: '#/components/schemas/FileDiff'\n          required:\n            - additions\n            - deletions\n            - files\n        share:\n          type: object\n          properties:\n            url:\n              type: string\n          required:\n            - url\n        title:\n          type: string\n        version:\n          type: string\n        time:\n          type: object\n          properties:\n            created:\n              type: number\n            updated:\n              type: number\n            compacting:\n              type: number\n            archived:\n              type: number\n          required:\n            - created\n            - updated\n        permission:\n          $ref: '#/components/schemas/PermissionRuleset'\n        revert:\n          type: object\n          properties:\n            messageID:\n              type: string\n            partID:\n              type: string\n            snapshot:\n              type: string\n            diff:\n              type: string\n          required:\n            - messageID\n      required:\n        - id\n        - projectID\n        - directory\n        - title\n        - version\n        - time\n    Event.session.created:\n      type: object\n      properties:\n        type:\n          type: string\n          const: session.created\n        properties:\n          type: object\n          properties:\n            info:\n              $ref: '#/components/schemas/Session'\n          required:\n            - info\n      required:\n        - type\n        - properties\n    Event.session.updated:\n      type: object\n      properties:\n        type:\n          type: string\n          const: session.updated\n        properties:\n          type: object\n          properties:\n            info:\n              $ref: '#/components/schemas/Session'\n          required:\n            - info\n      required:\n        - type\n        - properties\n    Event.session.deleted:\n      type: object\n      properties:\n        type:\n          type: string\n          const: session.deleted\n        properties:\n          type: object\n          properties:\n            info:\n              $ref: '#/components/schemas/Session'\n          required:\n            - info\n      required:\n        - type\n        - properties\n    Event.session.diff:\n      type: object\n      properties:\n        type:\n          type: string\n          const: session.diff\n        properties:\n          type: object\n          properties:\n            sessionID:\n              type: string\n            diff:\n              type: array\n              items:\n                $ref: '#/components/schemas/FileDiff'\n          required:\n            - sessionID\n            - diff\n      required:\n        - type\n        - properties\n    Event.session.error:\n      type: object\n      properties:\n        type:\n          type: string\n          const: session.error\n        properties:\n          type: object\n          properties:\n            sessionID:\n              type: string\n            error:\n              anyOf:\n                - $ref: '#/components/schemas/ProviderAuthError'\n                - $ref: '#/components/schemas/UnknownError'\n                - $ref: '#/components/schemas/MessageOutputLengthError'\n                - $ref: '#/components/schemas/MessageAbortedError'\n                - $ref: '#/components/schemas/APIError'\n      required:\n        - type\n        - properties\n    Event.file.watcher.updated:\n      type: object\n      properties:\n        type:\n          type: string\n          const: file.watcher.updated\n        properties:\n          type: object\n          properties:\n            file:\n              type: string\n            event:\n              anyOf:\n                - type: string\n                  const: add\n                - type: string\n                  const: change\n                - type: string\n                  const: unlink\n          required:\n            - file\n            - event\n      required:\n        - type\n        - properties\n    Event.vcs.branch.updated:\n      type: object\n      properties:\n        type:\n          type: string\n          const: vcs.branch.updated\n        properties:\n          type: object\n          properties:\n            branch:\n              type: string\n      required:\n        - type\n        - properties\n    Pty:\n      type: object\n      properties:\n        id:\n          type: string\n          pattern: ^pty.*\n        title:\n          type: string\n        command:\n          type: string\n        args:\n          type: array\n          items:\n            type: string\n        cwd:\n          type: string\n        status:\n          type: string\n          enum:\n            - running\n            - exited\n        pid:\n          type: number\n      required:\n        - id\n        - title\n        - command\n        - args\n        - cwd\n        - status\n        - pid\n    Event.pty.created:\n      type: object\n      properties:\n        type:\n          type: string\n          const: pty.created\n        properties:\n          type: object\n          properties:\n            info:\n              $ref: '#/components/schemas/Pty'\n          required:\n            - info\n      required:\n        - type\n        - properties\n    Event.pty.updated:\n      type: object\n      properties:\n        type:\n          type: string\n          const: pty.updated\n        properties:\n          type: object\n          properties:\n            info:\n              $ref: '#/components/schemas/Pty'\n          required:\n            - info\n      required:\n        - type\n        - properties\n    Event.pty.exited:\n      type: object\n      properties:\n        type:\n          type: string\n          const: pty.exited\n        properties:\n          type: object\n          properties:\n            id:\n              type: string\n              pattern: ^pty.*\n            exitCode:\n              type: number\n          required:\n            - id\n            - exitCode\n      required:\n        - type\n        - properties\n    Event.pty.deleted:\n      type: object\n      properties:\n        type:\n          type: string\n          const: pty.deleted\n        properties:\n          type: object\n          properties:\n            id:\n              type: string\n              pattern: ^pty.*\n          required:\n            - id\n      required:\n        - type\n        - properties\n    Event.server.connected:\n      type: object\n      properties:\n        type:\n          type: string\n          const: server.connected\n        properties:\n          type: object\n          properties: {}\n      required:\n        - type\n        - properties\n    Event.global.disposed:\n      type: object\n      properties:\n        type:\n          type: string\n          const: global.disposed\n        properties:\n          type: object\n          properties: {}\n      required:\n        - type\n        - properties\n    Event:\n      anyOf:\n        - $ref: '#/components/schemas/Event.installation.updated'\n        - $ref: '#/components/schemas/Event.installation.update-available'\n        - $ref: '#/components/schemas/Event.project.updated'\n        - $ref: '#/components/schemas/Event.server.instance.disposed'\n        - $ref: '#/components/schemas/Event.lsp.client.diagnostics'\n        - $ref: '#/components/schemas/Event.lsp.updated'\n        - $ref: '#/components/schemas/Event.message.updated'\n        - $ref: '#/components/schemas/Event.message.removed'\n        - $ref: '#/components/schemas/Event.message.part.updated'\n        - $ref: '#/components/schemas/Event.message.part.removed'\n        - $ref: '#/components/schemas/Event.permission.asked'\n        - $ref: '#/components/schemas/Event.permission.replied'\n        - $ref: '#/components/schemas/Event.session.status'\n        - $ref: '#/components/schemas/Event.session.idle'\n        - $ref: '#/components/schemas/Event.session.compacted'\n        - $ref: '#/components/schemas/Event.file.edited'\n        - $ref: '#/components/schemas/Event.todo.updated'\n        - $ref: '#/components/schemas/Event.tui.prompt.append'\n        - $ref: '#/components/schemas/Event.tui.command.execute'\n        - $ref: '#/components/schemas/Event.tui.toast.show'\n        - $ref: '#/components/schemas/Event.mcp.tools.changed'\n        - $ref: '#/components/schemas/Event.command.executed'\n        - $ref: '#/components/schemas/Event.session.created'\n        - $ref: '#/components/schemas/Event.session.updated'\n        - $ref: '#/components/schemas/Event.session.deleted'\n        - $ref: '#/components/schemas/Event.session.diff'\n        - $ref: '#/components/schemas/Event.session.error'\n        - $ref: '#/components/schemas/Event.file.watcher.updated'\n        - $ref: '#/components/schemas/Event.vcs.branch.updated'\n        - $ref: '#/components/schemas/Event.pty.created'\n        - $ref: '#/components/schemas/Event.pty.updated'\n        - $ref: '#/components/schemas/Event.pty.exited'\n        - $ref: '#/components/schemas/Event.pty.deleted'\n        - $ref: '#/components/schemas/Event.server.connected'\n        - $ref: '#/components/schemas/Event.global.disposed'\n    GlobalEvent:\n      type: object\n      properties:\n        directory:\n          type: string\n        payload:\n          $ref: '#/components/schemas/Event'\n      required:\n        - directory\n        - payload\n    BadRequestError:\n      type: object\n      properties:\n        data: {}\n        errors:\n          type: array\n          items:\n            type: object\n            propertyNames:\n              type: string\n            additionalProperties: {}\n        success:\n          type: boolean\n          const: false\n      required:\n        - data\n        - errors\n        - success\n    NotFoundError:\n      type: object\n      properties:\n        name:\n          type: string\n          const: NotFoundError\n        data:\n          type: object\n          properties:\n            message:\n              type: string\n          required:\n            - message\n      required:\n        - name\n        - data\n    KeybindsConfig:\n      description: Custom keybind configurations\n      type: object\n      properties:\n        leader:\n          description: Leader key for keybind combinations\n          default: ctrl+x\n          type: string\n        app_exit:\n          description: Exit the application\n          default: ctrl+c,ctrl+d,<leader>q\n          type: string\n        editor_open:\n          description: Open external editor\n          default: <leader>e\n          type: string\n        theme_list:\n          description: List available themes\n          default: <leader>t\n          type: string\n        sidebar_toggle:\n          description: Toggle sidebar\n          default: <leader>b\n          type: string\n        scrollbar_toggle:\n          description: Toggle session scrollbar\n          default: none\n          type: string\n        username_toggle:\n          description: Toggle username visibility\n          default: none\n          type: string\n        status_view:\n          description: View status\n          default: <leader>s\n          type: string\n        session_export:\n          description: Export session to editor\n          default: <leader>x\n          type: string\n        session_new:\n          description: Create a new session\n          default: <leader>n\n          type: string\n        session_list:\n          description: List all sessions\n          default: <leader>l\n          type: string\n        session_timeline:\n          description: Show session timeline\n          default: <leader>g\n          type: string\n        session_fork:\n          description: Fork session from message\n          default: none\n          type: string\n        session_rename:\n          description: Rename session\n          default: none\n          type: string\n        session_share:\n          description: Share current session\n          default: none\n          type: string\n        session_unshare:\n          description: Unshare current session\n          default: none\n          type: string\n        session_interrupt:\n          description: Interrupt current session\n          default: escape\n          type: string\n        session_compact:\n          description: Compact the session\n          default: <leader>c\n          type: string\n        messages_page_up:\n          description: Scroll messages up by one page\n          default: pageup\n          type: string\n        messages_page_down:\n          description: Scroll messages down by one page\n          default: pagedown\n          type: string\n        messages_half_page_up:\n          description: Scroll messages up by half page\n          default: ctrl+alt+u\n          type: string\n        messages_half_page_down:\n          description: Scroll messages down by half page\n          default: ctrl+alt+d\n          type: string\n        messages_first:\n          description: Navigate to first message\n          default: ctrl+g,home\n          type: string\n        messages_last:\n          description: Navigate to last message\n          default: ctrl+alt+g,end\n          type: string\n        messages_next:\n          description: Navigate to next message\n          default: none\n          type: string\n        messages_previous:\n          description: Navigate to previous message\n          default: none\n          type: string\n        messages_last_user:\n          description: Navigate to last user message\n          default: none\n          type: string\n        messages_copy:\n          description: Copy message\n          default: <leader>y\n          type: string\n        messages_undo:\n          description: Undo message\n          default: <leader>u\n          type: string\n        messages_redo:\n          description: Redo message\n          default: <leader>r\n          type: string\n        messages_toggle_conceal:\n          description: Toggle code block concealment in messages\n          default: <leader>h\n          type: string\n        tool_details:\n          description: Toggle tool details visibility\n          default: none\n          type: string\n        model_list:\n          description: List available models\n          default: <leader>m\n          type: string\n        model_cycle_recent:\n          description: Next recently used model\n          default: f2\n          type: string\n        model_cycle_recent_reverse:\n          description: Previous recently used model\n          default: shift+f2\n          type: string\n        model_cycle_favorite:\n          description: Next favorite model\n          default: none\n          type: string\n        model_cycle_favorite_reverse:\n          description: Previous favorite model\n          default: none\n          type: string\n        command_list:\n          description: List available commands\n          default: ctrl+p\n          type: string\n        agent_list:\n          description: List agents\n          default: <leader>a\n          type: string\n        agent_cycle:\n          description: Next agent\n          default: tab\n          type: string\n        agent_cycle_reverse:\n          description: Previous agent\n          default: shift+tab\n          type: string\n        variant_cycle:\n          description: Cycle model variants\n          default: ctrl+t\n          type: string\n        input_clear:\n          description: Clear input field\n          default: ctrl+c\n          type: string\n        input_paste:\n          description: Paste from clipboard\n          default: ctrl+v\n          type: string\n        input_submit:\n          description: Submit input\n          default: return\n          type: string\n        input_newline:\n          description: Insert newline in input\n          default: shift+return,ctrl+return,alt+return,ctrl+j\n          type: string\n        input_move_left:\n          description: Move cursor left in input\n          default: left,ctrl+b\n          type: string\n        input_move_right:\n          description: Move cursor right in input\n          default: right,ctrl+f\n          type: string\n        input_move_up:\n          description: Move cursor up in input\n          default: up\n          type: string\n        input_move_down:\n          description: Move cursor down in input\n          default: down\n          type: string\n        input_select_left:\n          description: Select left in input\n          default: shift+left\n          type: string\n        input_select_right:\n          description: Select right in input\n          default: shift+right\n          type: string\n        input_select_up:\n          description: Select up in input\n          default: shift+up\n          type: string\n        input_select_down:\n          description: Select down in input\n          default: shift+down\n          type: string\n        input_line_home:\n          description: Move to start of line in input\n          default: ctrl+a\n          type: string\n        input_line_end:\n          description: Move to end of line in input\n          default: ctrl+e\n          type: string\n        input_select_line_home:\n          description: Select to start of line in input\n          default: ctrl+shift+a\n          type: string\n        input_select_line_end:\n          description: Select to end of line in input\n          default: ctrl+shift+e\n          type: string\n        input_visual_line_home:\n          description: Move to start of visual line in input\n          default: alt+a\n          type: string\n        input_visual_line_end:\n          description: Move to end of visual line in input\n          default: alt+e\n          type: string\n        input_select_visual_line_home:\n          description: Select to start of visual line in input\n          default: alt+shift+a\n          type: string\n        input_select_visual_line_end:\n          description: Select to end of visual line in input\n          default: alt+shift+e\n          type: string\n        input_buffer_home:\n          description: Move to start of buffer in input\n          default: home\n          type: string\n        input_buffer_end:\n          description: Move to end of buffer in input\n          default: end\n          type: string\n        input_select_buffer_home:\n          description: Select to start of buffer in input\n          default: shift+home\n          type: string\n        input_select_buffer_end:\n          description: Select to end of buffer in input\n          default: shift+end\n          type: string\n        input_delete_line:\n          description: Delete line in input\n          default: ctrl+shift+d\n          type: string\n        input_delete_to_line_end:\n          description: Delete to end of line in input\n          default: ctrl+k\n          type: string\n        input_delete_to_line_start:\n          description: Delete to start of line in input\n          default: ctrl+u\n          type: string\n        input_backspace:\n          description: Backspace in input\n          default: backspace,shift+backspace\n          type: string\n        input_delete:\n          description: Delete character in input\n          default: ctrl+d,delete,shift+delete\n          type: string\n        input_undo:\n          description: Undo in input\n          default: ctrl+-,super+z\n          type: string\n        input_redo:\n          description: Redo in input\n          default: ctrl+.,super+shift+z\n          type: string\n        input_word_forward:\n          description: Move word forward in input\n          default: alt+f,alt+right,ctrl+right\n          type: string\n        input_word_backward:\n          description: Move word backward in input\n          default: alt+b,alt+left,ctrl+left\n          type: string\n        input_select_word_forward:\n          description: Select word forward in input\n          default: alt+shift+f,alt+shift+right\n          type: string\n        input_select_word_backward:\n          description: Select word backward in input\n          default: alt+shift+b,alt+shift+left\n          type: string\n        input_delete_word_forward:\n          description: Delete word forward in input\n          default: alt+d,alt+delete,ctrl+delete\n          type: string\n        input_delete_word_backward:\n          description: Delete word backward in input\n          default: ctrl+w,ctrl+backspace,alt+backspace\n          type: string\n        history_previous:\n          description: Previous history item\n          default: up\n          type: string\n        history_next:\n          description: Next history item\n          default: down\n          type: string\n        session_child_cycle:\n          description: Next child session\n          default: <leader>right\n          type: string\n        session_child_cycle_reverse:\n          description: Previous child session\n          default: <leader>left\n          type: string\n        session_parent:\n          description: Go to parent session\n          default: <leader>up\n          type: string\n        terminal_suspend:\n          description: Suspend terminal\n          default: ctrl+z\n          type: string\n        terminal_title_toggle:\n          description: Toggle terminal title\n          default: none\n          type: string\n        tips_toggle:\n          description: Toggle tips on home screen\n          default: <leader>h\n          type: string\n      additionalProperties: false\n    LogLevel:\n      description: Log level\n      type: string\n      enum:\n        - DEBUG\n        - INFO\n        - WARN\n        - ERROR\n    ServerConfig:\n      description: Server configuration for opencode serve and web commands\n      type: object\n      properties:\n        port:\n          description: Port to listen on\n          type: integer\n          exclusiveMinimum: 0\n          maximum: 9007199254740991\n        hostname:\n          description: Hostname to listen on\n          type: string\n        mdns:\n          description: Enable mDNS service discovery\n          type: boolean\n        cors:\n          description: Additional domains to allow for CORS\n          type: array\n          items:\n            type: string\n      additionalProperties: false\n    PermissionActionConfig:\n      type: string\n      enum:\n        - ask\n        - allow\n        - deny\n    PermissionObjectConfig:\n      type: object\n      propertyNames:\n        type: string\n      additionalProperties:\n        $ref: '#/components/schemas/PermissionActionConfig'\n    PermissionRuleConfig:\n      anyOf:\n        - $ref: '#/components/schemas/PermissionActionConfig'\n        - $ref: '#/components/schemas/PermissionObjectConfig'\n    PermissionConfig:\n      anyOf:\n        - type: object\n          properties:\n            read:\n              $ref: '#/components/schemas/PermissionRuleConfig'\n            edit:\n              $ref: '#/components/schemas/PermissionRuleConfig'\n            glob:\n              $ref: '#/components/schemas/PermissionRuleConfig'\n            grep:\n              $ref: '#/components/schemas/PermissionRuleConfig'\n            list:\n              $ref: '#/components/schemas/PermissionRuleConfig'\n            bash:\n              $ref: '#/components/schemas/PermissionRuleConfig'\n            task:\n              $ref: '#/components/schemas/PermissionRuleConfig'\n            external_directory:\n              $ref: '#/components/schemas/PermissionRuleConfig'\n            todowrite:\n              $ref: '#/components/schemas/PermissionActionConfig'\n            todoread:\n              $ref: '#/components/schemas/PermissionActionConfig'\n            webfetch:\n              $ref: '#/components/schemas/PermissionActionConfig'\n            websearch:\n              $ref: '#/components/schemas/PermissionActionConfig'\n            codesearch:\n              $ref: '#/components/schemas/PermissionActionConfig'\n            lsp:\n              $ref: '#/components/schemas/PermissionRuleConfig'\n            doom_loop:\n              $ref: '#/components/schemas/PermissionActionConfig'\n          additionalProperties:\n            $ref: '#/components/schemas/PermissionRuleConfig'\n        - $ref: '#/components/schemas/PermissionActionConfig'\n    AgentConfig:\n      type: object\n      properties:\n        model:\n          type: string\n        temperature:\n          type: number\n        top_p:\n          type: number\n        prompt:\n          type: string\n        tools:\n          description: \"@deprecated Use 'permission' field instead\"\n          type: object\n          propertyNames:\n            type: string\n          additionalProperties:\n            type: boolean\n        disable:\n          type: boolean\n        description:\n          description: Description of when to use the agent\n          type: string\n        mode:\n          type: string\n          enum:\n            - subagent\n            - primary\n            - all\n        options:\n          type: object\n          propertyNames:\n            type: string\n          additionalProperties: {}\n        color:\n          description: 'Hex color code for the agent (e.g., #FF5733)'\n          type: string\n          pattern: ^#[0-9a-fA-F]{6}$\n        steps:\n          description: Maximum number of agentic iterations before forcing text-only\n            response\n          type: integer\n          exclusiveMinimum: 0\n          maximum: 9007199254740991\n        maxSteps:\n          description: \"@deprecated Use 'steps' field instead.\"\n          type: integer\n          exclusiveMinimum: 0\n          maximum: 9007199254740991\n        permission:\n          $ref: '#/components/schemas/PermissionConfig'\n      additionalProperties: {}\n    ProviderConfig:\n      type: object\n      properties:\n        api:\n          type: string\n        name:\n          type: string\n        env:\n          type: array\n          items:\n            type: string\n        id:\n          type: string\n        npm:\n          type: string\n        models:\n          type: object\n          propertyNames:\n            type: string\n          additionalProperties:\n            type: object\n            properties:\n              id:\n                type: string\n              name:\n                type: string\n              family:\n                type: string\n              release_date:\n                type: string\n              attachment:\n                type: boolean\n              reasoning:\n                type: boolean\n              temperature:\n                type: boolean\n              tool_call:\n                type: boolean\n              interleaved:\n                anyOf:\n                  - type: boolean\n                    const: true\n                  - type: object\n                    properties:\n                      field:\n                        type: string\n                        enum:\n                          - reasoning_content\n                          - reasoning_details\n                    required:\n                      - field\n                    additionalProperties: false\n              cost:\n                type: object\n                properties:\n                  input:\n                    type: number\n                  output:\n                    type: number\n                  cache_read:\n                    type: number\n                  cache_write:\n                    type: number\n                  context_over_200k:\n                    type: object\n                    properties:\n                      input:\n                        type: number\n                      output:\n                        type: number\n                      cache_read:\n                        type: number\n                      cache_write:\n                        type: number\n                    required:\n                      - input\n                      - output\n                required:\n                  - input\n                  - output\n              limit:\n                type: object\n                properties:\n                  context:\n                    type: number\n                  output:\n                    type: number\n                required:\n                  - context\n                  - output\n              modalities:\n                type: object\n                properties:\n                  input:\n                    type: array\n                    items:\n                      type: string\n                      enum:\n                        - text\n                        - audio\n                        - image\n                        - video\n                        - pdf\n                  output:\n                    type: array\n                    items:\n                      type: string\n                      enum:\n                        - text\n                        - audio\n                        - image\n                        - video\n                        - pdf\n                required:\n                  - input\n                  - output\n              experimental:\n                type: boolean\n              status:\n                type: string\n                enum:\n                  - alpha\n                  - beta\n                  - deprecated\n              options:\n                type: object\n                propertyNames:\n                  type: string\n                additionalProperties: {}\n              headers:\n                type: object\n                propertyNames:\n                  type: string\n                additionalProperties:\n                  type: string\n              provider:\n                type: object\n                properties:\n                  npm:\n                    type: string\n                required:\n                  - npm\n              variants:\n                description: Variant-specific configuration\n                type: object\n                propertyNames:\n                  type: string\n                additionalProperties:\n                  type: object\n                  properties:\n                    disabled:\n                      description: Disable this variant for the model\n                      type: boolean\n                  additionalProperties: {}\n        whitelist:\n          type: array\n          items:\n            type: string\n        blacklist:\n          type: array\n          items:\n            type: string\n        options:\n          type: object\n          properties:\n            apiKey:\n              type: string\n            baseURL:\n              type: string\n            enterpriseUrl:\n              description: GitHub Enterprise URL for copilot authentication\n              type: string\n            setCacheKey:\n              description: Enable promptCacheKey for this provider (default false)\n              type: boolean\n            timeout:\n              description: Timeout in milliseconds for requests to this provider. Default is\n                300000 (5 minutes). Set to false to disable timeout.\n              anyOf:\n                - description: Timeout in milliseconds for requests to this provider. Default is\n                    300000 (5 minutes). Set to false to disable timeout.\n                  type: integer\n                  exclusiveMinimum: 0\n                  maximum: 9007199254740991\n                - description: Disable timeout for this provider entirely.\n                  type: boolean\n                  const: false\n          additionalProperties: {}\n      additionalProperties: false\n    McpLocalConfig:\n      type: object\n      properties:\n        type:\n          description: Type of MCP server connection\n          type: string\n          const: local\n        command:\n          description: Command and arguments to run the MCP server\n          type: array\n          items:\n            type: string\n        environment:\n          description: Environment variables to set when running the MCP server\n          type: object\n          propertyNames:\n            type: string\n          additionalProperties:\n            type: string\n        enabled:\n          description: Enable or disable the MCP server on startup\n          type: boolean\n        timeout:\n          description: Timeout in ms for fetching tools from the MCP server. Defaults to\n            5000 (5 seconds) if not specified.\n          type: integer\n          exclusiveMinimum: 0\n          maximum: 9007199254740991\n      required:\n        - type\n        - command\n      additionalProperties: false\n    McpOAuthConfig:\n      type: object\n      properties:\n        clientId:\n          description: OAuth client ID. If not provided, dynamic client registration (RFC\n            7591) will be attempted.\n          type: string\n        clientSecret:\n          description: OAuth client secret (if required by the authorization server)\n          type: string\n        scope:\n          description: OAuth scopes to request during authorization\n          type: string\n      additionalProperties: false\n    McpRemoteConfig:\n      type: object\n      properties:\n        type:\n          description: Type of MCP server connection\n          type: string\n          const: remote\n        url:\n          description: URL of the remote MCP server\n          type: string\n        enabled:\n          description: Enable or disable the MCP server on startup\n          type: boolean\n        headers:\n          description: Headers to send with the request\n          type: object\n          propertyNames:\n            type: string\n          additionalProperties:\n            type: string\n        oauth:\n          description: OAuth authentication configuration for the MCP server. Set to false\n            to disable OAuth auto-detection.\n          anyOf:\n            - $ref: '#/components/schemas/McpOAuthConfig'\n            - type: boolean\n              const: false\n        timeout:\n          description: Timeout in ms for fetching tools from the MCP server. Defaults to\n            5000 (5 seconds) if not specified.\n          type: integer\n          exclusiveMinimum: 0\n          maximum: 9007199254740991\n      required:\n        - type\n        - url\n      additionalProperties: false\n    LayoutConfig:\n      description: '@deprecated Always uses stretch layout.'\n      type: string\n      enum:\n        - auto\n        - stretch\n    Config:\n      type: object\n      properties:\n        $schema:\n          description: JSON schema reference for configuration validation\n          type: string\n        theme:\n          description: Theme name to use for the interface\n          type: string\n        keybinds:\n          $ref: '#/components/schemas/KeybindsConfig'\n        logLevel:\n          $ref: '#/components/schemas/LogLevel'\n        tui:\n          description: TUI specific settings\n          type: object\n          properties:\n            scroll_speed:\n              description: TUI scroll speed\n              type: number\n              minimum: 0.001\n            scroll_acceleration:\n              description: Scroll acceleration settings\n              type: object\n              properties:\n                enabled:\n                  description: Enable scroll acceleration\n                  type: boolean\n              required:\n                - enabled\n            diff_style:\n              description: \"Control diff rendering style: 'auto' adapts to terminal width,\n                'stacked' always shows single column\"\n              type: string\n              enum:\n                - auto\n                - stacked\n        server:\n          $ref: '#/components/schemas/ServerConfig'\n        command:\n          description: Command configuration, see https://opencode.ai/docs/commands\n          type: object\n          propertyNames:\n            type: string\n          additionalProperties:\n            type: object\n            properties:\n              template:\n                type: string\n              description:\n                type: string\n              agent:\n                type: string\n              model:\n                type: string\n              subtask:\n                type: boolean\n            required:\n              - template\n        watcher:\n          type: object\n          properties:\n            ignore:\n              type: array\n              items:\n                type: string\n        plugin:\n          type: array\n          items:\n            type: string\n        snapshot:\n          type: boolean\n        share:\n          description: Control sharing behavior:'manual' allows manual sharing via\n            commands, 'auto' enables automatic sharing, 'disabled' disables all\n            sharing\n          type: string\n          enum:\n            - manual\n            - auto\n            - disabled\n        autoshare:\n          description: \"@deprecated Use 'share' field instead. Share newly created\n            sessions automatically\"\n          type: boolean\n        autoupdate:\n          description: Automatically update to the latest version. Set to true to\n            auto-update, false to disable, or 'notify' to show update\n            notifications\n          anyOf:\n            - type: boolean\n            - type: string\n              const: notify\n        disabled_providers:\n          description: Disable providers that are loaded automatically\n          type: array\n          items:\n            type: string\n        enabled_providers:\n          description: When set, ONLY these providers will be enabled. All other providers\n            will be ignored\n          type: array\n          items:\n            type: string\n        model:\n          description: Model to use in the format of provider/model, eg anthropic/claude-2\n          type: string\n        small_model:\n          description: Small model to use for tasks like title generation in the format of\n            provider/model\n          type: string\n        default_agent:\n          description: Default agent to use when none is specified. Must be a primary\n            agent. Falls back to 'build' if not set or if the specified agent is\n            invalid.\n          type: string\n        username:\n          description: Custom username to display in conversations instead of system\n            username\n          type: string\n        mode:\n          description: '@deprecated Use `agent` field instead.'\n          type: object\n          properties:\n            build:\n              $ref: '#/components/schemas/AgentConfig'\n            plan:\n              $ref: '#/components/schemas/AgentConfig'\n          additionalProperties:\n            $ref: '#/components/schemas/AgentConfig'\n        agent:\n          description: Agent configuration, see https://opencode.ai/docs/agent\n          type: object\n          properties:\n            plan:\n              $ref: '#/components/schemas/AgentConfig'\n            build:\n              $ref: '#/components/schemas/AgentConfig'\n            general:\n              $ref: '#/components/schemas/AgentConfig'\n            explore:\n              $ref: '#/components/schemas/AgentConfig'\n            title:\n              $ref: '#/components/schemas/AgentConfig'\n            summary:\n              $ref: '#/components/schemas/AgentConfig'\n            compaction:\n              $ref: '#/components/schemas/AgentConfig'\n          additionalProperties:\n            $ref: '#/components/schemas/AgentConfig'\n        provider:\n          description: Custom provider configurations and model overrides\n          type: object\n          propertyNames:\n            type: string\n          additionalProperties:\n            $ref: '#/components/schemas/ProviderConfig'\n        mcp:\n          description: MCP (Model Context Protocol) server configurations\n          type: object\n          propertyNames:\n            type: string\n          additionalProperties:\n            anyOf:\n              - $ref: '#/components/schemas/McpLocalConfig'\n              - $ref: '#/components/schemas/McpRemoteConfig'\n        formatter:\n          anyOf:\n            - type: boolean\n              const: false\n            - type: object\n              propertyNames:\n                type: string\n              additionalProperties:\n                type: object\n                properties:\n                  disabled:\n                    type: boolean\n                  command:\n                    type: array\n                    items:\n                      type: string\n                  environment:\n                    type: object\n                    propertyNames:\n                      type: string\n                    additionalProperties:\n                      type: string\n                  extensions:\n                    type: array\n                    items:\n                      type: string\n        lsp:\n          anyOf:\n            - type: boolean\n              const: false\n            - type: object\n              propertyNames:\n                type: string\n              additionalProperties:\n                anyOf:\n                  - type: object\n                    properties:\n                      disabled:\n                        type: boolean\n                        const: true\n                    required:\n                      - disabled\n                  - type: object\n                    properties:\n                      command:\n                        type: array\n                        items:\n                          type: string\n                      extensions:\n                        type: array\n                        items:\n                          type: string\n                      disabled:\n                        type: boolean\n                      env:\n                        type: object\n                        propertyNames:\n                          type: string\n                        additionalProperties:\n                          type: string\n                      initialization:\n                        type: object\n                        propertyNames:\n                          type: string\n                        additionalProperties: {}\n                    required:\n                      - command\n        instructions:\n          description: Additional instruction files or patterns to include\n          type: array\n          items:\n            type: string\n        layout:\n          $ref: '#/components/schemas/LayoutConfig'\n        permission:\n          $ref: '#/components/schemas/PermissionConfig'\n        tools:\n          type: object\n          propertyNames:\n            type: string\n          additionalProperties:\n            type: boolean\n        enterprise:\n          type: object\n          properties:\n            url:\n              description: Enterprise URL\n              type: string\n        compaction:\n          type: object\n          properties:\n            auto:\n              description: 'Enable automatic compaction when context is full (default: true)'\n              type: boolean\n            prune:\n              description: 'Enable pruning of old tool outputs (default: true)'\n              type: boolean\n        experimental:\n          type: object\n          properties:\n            hook:\n              type: object\n              properties:\n                file_edited:\n                  type: object\n                  propertyNames:\n                    type: string\n                  additionalProperties:\n                    type: array\n                    items:\n                      type: object\n                      properties:\n                        command:\n                          type: array\n                          items:\n                            type: string\n                        environment:\n                          type: object\n                          propertyNames:\n                            type: string\n                          additionalProperties:\n                            type: string\n                      required:\n                        - command\n                session_completed:\n                  type: array\n                  items:\n                    type: object\n                    properties:\n                      command:\n                        type: array\n                        items:\n                          type: string\n                      environment:\n                        type: object\n                        propertyNames:\n                          type: string\n                        additionalProperties:\n                          type: string\n                    required:\n                      - command\n            chatMaxRetries:\n              description: Number of retries for chat completions on failure\n              type: number\n            disable_paste_summary:\n              type: boolean\n            batch_tool:\n              description: Enable the batch tool\n              type: boolean\n            openTelemetry:\n              description: Enable OpenTelemetry spans for AI SDK calls (using the\n                'experimental_telemetry' flag)\n              type: boolean\n            primary_tools:\n              description: Tools that should only be available to primary agents.\n              type: array\n              items:\n                type: string\n            continue_loop_on_deny:\n              description: Continue the agent loop when a tool call is denied\n              type: boolean\n            mcp_timeout:\n              description: Timeout in milliseconds for model context protocol (MCP) requests\n              type: integer\n              exclusiveMinimum: 0\n              maximum: 9007199254740991\n      additionalProperties: false\n    ToolIDs:\n      type: array\n      items:\n        type: string\n    ToolListItem:\n      type: object\n      properties:\n        id:\n          type: string\n        description:\n          type: string\n        parameters: {}\n      required:\n        - id\n        - description\n        - parameters\n    ToolList:\n      type: array\n      items:\n        $ref: '#/components/schemas/ToolListItem'\n    Path:\n      type: object\n      properties:\n        home:\n          type: string\n        state:\n          type: string\n        config:\n          type: string\n        worktree:\n          type: string\n        directory:\n          type: string\n      required:\n        - home\n        - state\n        - config\n        - worktree\n        - directory\n    VcsInfo:\n      type: object\n      properties:\n        branch:\n          type: string\n      required:\n        - branch\n    TextPartInput:\n      type: object\n      properties:\n        id:\n          type: string\n        type:\n          type: string\n          const: text\n        text:\n          type: string\n        synthetic:\n          type: boolean\n        ignored:\n          type: boolean\n        time:\n          type: object\n          properties:\n            start:\n              type: number\n            end:\n              type: number\n          required:\n            - start\n        metadata:\n          type: object\n          propertyNames:\n            type: string\n          additionalProperties: {}\n      required:\n        - type\n        - text\n    FilePartInput:\n      type: object\n      properties:\n        id:\n          type: string\n        type:\n          type: string\n          const: file\n        mime:\n          type: string\n        filename:\n          type: string\n        url:\n          type: string\n        source:\n          $ref: '#/components/schemas/FilePartSource'\n      required:\n        - type\n        - mime\n        - url\n    AgentPartInput:\n      type: object\n      properties:\n        id:\n          type: string\n        type:\n          type: string\n          const: agent\n        name:\n          type: string\n        source:\n          type: object\n          properties:\n            value:\n              type: string\n            start:\n              type: integer\n              minimum: -9007199254740991\n              maximum: 9007199254740991\n            end:\n              type: integer\n              minimum: -9007199254740991\n              maximum: 9007199254740991\n          required:\n            - value\n            - start\n            - end\n      required:\n        - type\n        - name\n    SubtaskPartInput:\n      type: object\n      properties:\n        id:\n          type: string\n        type:\n          type: string\n          const: subtask\n        prompt:\n          type: string\n        description:\n          type: string\n        agent:\n          type: string\n        command:\n          type: string\n      required:\n        - type\n        - prompt\n        - description\n        - agent\n    Command:\n      type: object\n      properties:\n        name:\n          type: string\n        description:\n          type: string\n        agent:\n          type: string\n        model:\n          type: string\n        mcp:\n          type: boolean\n        template:\n          anyOf:\n            - type: string\n            - type: string\n        subtask:\n          type: boolean\n        hints:\n          type: array\n          items:\n            type: string\n      required:\n        - name\n        - template\n        - hints\n    Model:\n      type: object\n      properties:\n        id:\n          type: string\n        providerID:\n          type: string\n        api:\n          type: object\n          properties:\n            id:\n              type: string\n            url:\n              type: string\n            npm:\n              type: string\n          required:\n            - id\n            - url\n            - npm\n        name:\n          type: string\n        family:\n          type: string\n        capabilities:\n          type: object\n          properties:\n            temperature:\n              type: boolean\n            reasoning:\n              type: boolean\n            attachment:\n              type: boolean\n            toolcall:\n              type: boolean\n            input:\n              type: object\n              properties:\n                text:\n                  type: boolean\n                audio:\n                  type: boolean\n                image:\n                  type: boolean\n                video:\n                  type: boolean\n                pdf:\n                  type: boolean\n              required:\n                - text\n                - audio\n                - image\n                - video\n                - pdf\n            output:\n              type: object\n              properties:\n                text:\n                  type: boolean\n                audio:\n                  type: boolean\n                image:\n                  type: boolean\n                video:\n                  type: boolean\n                pdf:\n                  type: boolean\n              required:\n                - text\n                - audio\n                - image\n                - video\n                - pdf\n            interleaved:\n              anyOf:\n                - type: boolean\n                - type: object\n                  properties:\n                    field:\n                      type: string\n                      enum:\n                        - reasoning_content\n                        - reasoning_details\n                  required:\n                    - field\n          required:\n            - temperature\n            - reasoning\n            - attachment\n            - toolcall\n            - input\n            - output\n            - interleaved\n        cost:\n          type: object\n          properties:\n            input:\n              type: number\n            output:\n              type: number\n            cache:\n              type: object\n              properties:\n                read:\n                  type: number\n                write:\n                  type: number\n              required:\n                - read\n                - write\n            experimentalOver200K:\n              type: object\n              properties:\n                input:\n                  type: number\n                output:\n                  type: number\n                cache:\n                  type: object\n                  properties:\n                    read:\n                      type: number\n                    write:\n                      type: number\n                  required:\n                    - read\n                    - write\n              required:\n                - input\n                - output\n                - cache\n          required:\n            - input\n            - output\n            - cache\n        limit:\n          type: object\n          properties:\n            context:\n              type: number\n            output:\n              type: number\n          required:\n            - context\n            - output\n        status:\n          type: string\n          enum:\n            - alpha\n            - beta\n            - deprecated\n            - active\n        options:\n          type: object\n          propertyNames:\n            type: string\n          additionalProperties: {}\n        headers:\n          type: object\n          propertyNames:\n            type: string\n          additionalProperties:\n            type: string\n        release_date:\n          type: string\n        variants:\n          type: object\n          propertyNames:\n            type: string\n          additionalProperties:\n            type: object\n            propertyNames:\n              type: string\n            additionalProperties: {}\n      required:\n        - id\n        - providerID\n        - api\n        - name\n        - capabilities\n        - cost\n        - limit\n        - status\n        - options\n        - headers\n        - release_date\n    Provider:\n      type: object\n      properties:\n        id:\n          type: string\n        name:\n          type: string\n        source:\n          type: string\n          enum:\n            - env\n            - config\n            - custom\n            - api\n        env:\n          type: array\n          items:\n            type: string\n        key:\n          type: string\n        options:\n          type: object\n          propertyNames:\n            type: string\n          additionalProperties: {}\n        models:\n          type: object\n          propertyNames:\n            type: string\n          additionalProperties:\n            $ref: '#/components/schemas/Model'\n      required:\n        - id\n        - name\n        - source\n        - env\n        - options\n        - models\n    ProviderAuthMethod:\n      type: object\n      properties:\n        type:\n          anyOf:\n            - type: string\n              const: oauth\n            - type: string\n              const: api\n        label:\n          type: string\n      required:\n        - type\n        - label\n    ProviderAuthAuthorization:\n      type: object\n      properties:\n        url:\n          type: string\n        method:\n          anyOf:\n            - type: string\n              const: auto\n            - type: string\n              const: code\n        instructions:\n          type: string\n      required:\n        - url\n        - method\n        - instructions\n    Symbol:\n      type: object\n      properties:\n        name:\n          type: string\n        kind:\n          type: number\n        location:\n          type: object\n          properties:\n            uri:\n              type: string\n            range:\n              $ref: '#/components/schemas/Range'\n          required:\n            - uri\n            - range\n      required:\n        - name\n        - kind\n        - location\n    FileNode:\n      type: object\n      properties:\n        name:\n          type: string\n        path:\n          type: string\n        absolute:\n          type: string\n        type:\n          type: string\n          enum:\n            - file\n            - directory\n        ignored:\n          type: boolean\n      required:\n        - name\n        - path\n        - absolute\n        - type\n        - ignored\n    FileContent:\n      type: object\n      properties:\n        type:\n          type: string\n          const: text\n        content:\n          type: string\n        diff:\n          type: string\n        patch:\n          type: object\n          properties:\n            oldFileName:\n              type: string\n            newFileName:\n              type: string\n            oldHeader:\n              type: string\n            newHeader:\n              type: string\n            hunks:\n              type: array\n              items:\n                type: object\n                properties:\n                  oldStart:\n                    type: number\n                  oldLines:\n                    type: number\n                  newStart:\n                    type: number\n                  newLines:\n                    type: number\n                  lines:\n                    type: array\n                    items:\n                      type: string\n                required:\n                  - oldStart\n                  - oldLines\n                  - newStart\n                  - newLines\n                  - lines\n            index:\n              type: string\n          required:\n            - oldFileName\n            - newFileName\n            - hunks\n        encoding:\n          type: string\n          const: base64\n        mimeType:\n          type: string\n      required:\n        - type\n        - content\n    File:\n      type: object\n      properties:\n        path:\n          type: string\n        added:\n          type: integer\n          minimum: -9007199254740991\n          maximum: 9007199254740991\n        removed:\n          type: integer\n          minimum: -9007199254740991\n          maximum: 9007199254740991\n        status:\n          type: string\n          enum:\n            - added\n            - deleted\n            - modified\n      required:\n        - path\n        - added\n        - removed\n        - status\n    Agent:\n      type: object\n      properties:\n        name:\n          type: string\n        description:\n          type: string\n        mode:\n          type: string\n          enum:\n            - subagent\n            - primary\n            - all\n        native:\n          type: boolean\n        hidden:\n          type: boolean\n        topP:\n          type: number\n        temperature:\n          type: number\n        color:\n          type: string\n        permission:\n          $ref: '#/components/schemas/PermissionRuleset'\n        model:\n          type: object\n          properties:\n            modelID:\n              type: string\n            providerID:\n              type: string\n          required:\n            - modelID\n            - providerID\n        prompt:\n          type: string\n        options:\n          type: object\n          propertyNames:\n            type: string\n          additionalProperties: {}\n        steps:\n          type: integer\n          exclusiveMinimum: 0\n          maximum: 9007199254740991\n      required:\n        - name\n        - mode\n        - permission\n        - options\n    MCPStatusConnected:\n      type: object\n      properties:\n        status:\n          type: string\n          const: connected\n      required:\n        - status\n    MCPStatusDisabled:\n      type: object\n      properties:\n        status:\n          type: string\n          const: disabled\n      required:\n        - status\n    MCPStatusFailed:\n      type: object\n      properties:\n        status:\n          type: string\n          const: failed\n        error:\n          type: string\n      required:\n        - status\n        - error\n    MCPStatusNeedsAuth:\n      type: object\n      properties:\n        status:\n          type: string\n          const: needs_auth\n      required:\n        - status\n    MCPStatusNeedsClientRegistration:\n      type: object\n      properties:\n        status:\n          type: string\n          const: needs_client_registration\n        error:\n          type: string\n      required:\n        - status\n        - error\n    MCPStatus:\n      anyOf:\n        - $ref: '#/components/schemas/MCPStatusConnected'\n        - $ref: '#/components/schemas/MCPStatusDisabled'\n        - $ref: '#/components/schemas/MCPStatusFailed'\n        - $ref: '#/components/schemas/MCPStatusNeedsAuth'\n        - $ref: '#/components/schemas/MCPStatusNeedsClientRegistration'\n    LSPStatus:\n      type: object\n      properties:\n        id:\n          type: string\n        name:\n          type: string\n        root:\n          type: string\n        status:\n          anyOf:\n            - type: string\n              const: connected\n            - type: string\n              const: error\n      required:\n        - id\n        - name\n        - root\n        - status\n    FormatterStatus:\n      type: object\n      properties:\n        name:\n          type: string\n        extensions:\n          type: array\n          items:\n            type: string\n        enabled:\n          type: boolean\n      required:\n        - name\n        - extensions\n        - enabled\n    OAuth:\n      type: object\n      properties:\n        type:\n          type: string\n          const: oauth\n        refresh:\n          type: string\n        access:\n          type: string\n        expires:\n          type: number\n        enterpriseUrl:\n          type: string\n      required:\n        - type\n        - refresh\n        - access\n        - expires\n    ApiAuth:\n      type: object\n      properties:\n        type:\n          type: string\n          const: api\n        key:\n          type: string\n      required:\n        - type\n        - key\n    WellKnownAuth:\n      type: object\n      properties:\n        type:\n          type: string\n          const: wellknown\n        key:\n          type: string\n        token:\n          type: string\n      required:\n        - type\n        - key\n        - token\n    Auth:\n      anyOf:\n        - $ref: '#/components/schemas/OAuth'\n        - $ref: '#/components/schemas/ApiAuth'\n        - $ref: '#/components/schemas/WellKnownAuth'\n"
  },
  {
    "path": "specs/3.1.x/operation-204.json",
    "content": "{\n  \"openapi\": \"3.1.0\",\n  \"info\": {\n    \"title\": \"OpenAPI 3.1.0 operation 204 example\",\n    \"version\": \"1\"\n  },\n  \"paths\": {\n    \"/foo\": {\n      \"post\": {\n        \"responses\": {\n          \"200\": {\n            \"description\": \"OK\",\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"type\": \"string\"\n                }\n              }\n            }\n          },\n          \"204\": {\n            \"description\": \"Created\"\n          }\n        }\n      }\n    }\n  }\n}\n"
  },
  {
    "path": "specs/3.1.x/orpc.yaml",
    "content": "openapi: 3.1.1\ninfo:\n  title: OpenAPI 3.1.1 oRPC example\n  version: 1\npaths:\n  /users:\n    get:\n      tags:\n        - users\n      operationId: getUsers\n      summary: Get all users\n      parameters:\n        - name: limit\n          in: query\n          description: Maximum number of users to return\n          required: false\n          schema:\n            type: integer\n            default: 10\n        - name: offset\n          in: query\n          description: Number of users to skip\n          required: false\n          schema:\n            type: integer\n            default: 0\n      responses:\n        '200':\n          description: List of users\n          content:\n            application/json:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/User'\n    post:\n      tags:\n        - users\n      operationId: createUser\n      summary: Create a new user\n      requestBody:\n        required: true\n        content:\n          application/json:\n            schema:\n              $ref: '#/components/schemas/CreateUserInput'\n      responses:\n        '201':\n          description: User created\n          content:\n            application/json:\n              schema:\n                $ref: '#/components/schemas/User'\n  /users/{userId}:\n    get:\n      tags:\n        - users\n      operationId: getUserById\n      summary: Get a user by ID\n      parameters:\n        - name: userId\n          in: path\n          description: User ID\n          required: true\n          schema:\n            type: string\n      responses:\n        '200':\n          description: User found\n          content:\n            application/json:\n              schema:\n                $ref: '#/components/schemas/User'\n    put:\n      tags:\n        - users\n      operationId: updateUser\n      summary: Update a user\n      parameters:\n        - name: userId\n          in: path\n          description: User ID\n          required: true\n          schema:\n            type: string\n      requestBody:\n        required: true\n        content:\n          application/json:\n            schema:\n              $ref: '#/components/schemas/UpdateUserInput'\n      responses:\n        '200':\n          description: User updated\n          content:\n            application/json:\n              schema:\n                $ref: '#/components/schemas/User'\n    delete:\n      tags:\n        - users\n      operationId: deleteUser\n      summary: Delete a user\n      parameters:\n        - name: userId\n          in: path\n          description: User ID\n          required: true\n          schema:\n            type: string\n        - name: X-Request-Id\n          in: header\n          description: Request ID for tracing\n          required: false\n          schema:\n            type: string\n      responses:\n        '204':\n          description: User deleted\n  /posts:\n    get:\n      tags:\n        - posts\n      operationId: getPosts\n      summary: Get all posts\n      parameters:\n        - name: authorId\n          in: query\n          description: Filter by author ID\n          required: false\n          schema:\n            type: string\n        - name: status\n          in: query\n          description: Filter by status\n          required: false\n          schema:\n            type: string\n            enum:\n              - draft\n              - published\n              - archived\n      responses:\n        '200':\n          description: List of posts\n          content:\n            application/json:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/Post'\n    post:\n      tags:\n        - posts\n      operationId: createPost\n      summary: Create a new post\n      parameters:\n        - name: X-Author-Id\n          in: header\n          description: Author ID\n          required: true\n          schema:\n            type: string\n      requestBody:\n        required: true\n        content:\n          application/json:\n            schema:\n              $ref: '#/components/schemas/CreatePostInput'\n      responses:\n        '201':\n          description: Post created\n          content:\n            application/json:\n              schema:\n                $ref: '#/components/schemas/Post'\n  /posts/{postId}:\n    get:\n      tags:\n        - posts\n      operationId: getPostById\n      summary: Get a post by ID\n      parameters:\n        - name: postId\n          in: path\n          description: Post ID\n          required: true\n          schema:\n            type: string\n        - name: includeComments\n          in: query\n          description: Include comments in response\n          required: false\n          schema:\n            type: boolean\n            default: false\n      responses:\n        '200':\n          description: Post found\n          content:\n            application/json:\n              schema:\n                $ref: '#/components/schemas/Post'\ncomponents:\n  schemas:\n    User:\n      type: object\n      required:\n        - id\n        - email\n        - name\n      properties:\n        id:\n          type: string\n        email:\n          type: string\n          format: email\n        name:\n          type: string\n        createdAt:\n          type: string\n          format: date-time\n    CreateUserInput:\n      type: object\n      required:\n        - email\n        - name\n      properties:\n        email:\n          type: string\n          format: email\n        name:\n          type: string\n        password:\n          type: string\n          minLength: 8\n    UpdateUserInput:\n      type: object\n      properties:\n        email:\n          type: string\n          format: email\n        name:\n          type: string\n    Post:\n      type: object\n      required:\n        - id\n        - title\n        - content\n        - authorId\n      properties:\n        id:\n          type: string\n        title:\n          type: string\n        content:\n          type: string\n        authorId:\n          type: string\n        status:\n          type: string\n          enum:\n            - draft\n            - published\n            - archived\n        createdAt:\n          type: string\n          format: date-time\n    CreatePostInput:\n      type: object\n      required:\n        - title\n        - content\n      properties:\n        title:\n          type: string\n        content:\n          type: string\n        status:\n          type: string\n          enum:\n            - draft\n            - published\n          default: draft\n"
  },
  {
    "path": "specs/3.1.x/pagination-ref.yaml",
    "content": "openapi: 3.1.1\ninfo:\n  title: OpenAPI 3.1.1 pagination ref example\n  version: 1\npaths:\n  /foo:\n    get:\n      parameters:\n        - in: query\n          name: foo\n          required: true\n          schema:\n            $ref: '#/components/schemas/Bar'\n      responses:\n        '200':\n          description: OK\n          content:\n            '*/*':\n              schema:\n                type: number\n    post:\n      requestBody:\n        content:\n          'application/json':\n            schema:\n              $ref: '#/components/schemas/Foo'\n        required: true\n      responses:\n        '200':\n          description: OK\ncomponents:\n  schemas:\n    Foo:\n      properties:\n        page:\n          anyOf:\n            - type: integer\n              minimum: 1.0\n            - type: 'null'\n          default: 1\n      type: object\n    Bar:\n      properties:\n        page:\n          type:\n            - integer\n            - 'null'\n          format: int32\n          minimum: 0\n        size:\n          type:\n            - integer\n            - 'null'\n          format: int32\n          minimum: 1\n        sort:\n          type:\n            - array\n            - 'null'\n          items:\n            type: string\n      required:\n        - page\n        - size\n        - sort\n      type: object\n"
  },
  {
    "path": "specs/3.1.x/parameter-explode-false.json",
    "content": "{\n  \"openapi\": \"3.1.0\",\n  \"info\": {\n    \"title\": \"OpenAPI 3.1.0 parameter explode false example\",\n    \"version\": \"1\"\n  },\n  \"paths\": {\n    \"/foo\": {\n      \"post\": {\n        \"parameters\": [\n          {\n            \"name\": \"foo\",\n            \"in\": \"query\",\n            \"explode\": false,\n            \"schema\": {\n              \"type\": \"array\",\n              \"items\": {\n                \"type\": \"string\"\n              }\n            }\n          }\n        ],\n        \"responses\": {\n          \"default\": {\n            \"description\": \"OK\"\n          }\n        }\n      }\n    }\n  }\n}\n"
  },
  {
    "path": "specs/3.1.x/parameter-tuple.json",
    "content": "{\n  \"openapi\": \"3.1.0\",\n  \"info\": {\n    \"title\": \"OpenAPI 3.1.0 parameter tuple example\",\n    \"version\": \"1\"\n  },\n  \"paths\": {\n    \"/foo\": {\n      \"post\": {\n        \"parameters\": [\n          {\n            \"name\": \"tuple\",\n            \"in\": \"query\",\n            \"schema\": {\n              \"type\": \"array\",\n              \"minItems\": 4,\n              \"maxItems\": 4,\n              \"items\": {\n                \"type\": \"number\"\n              }\n            }\n          }\n        ],\n        \"responses\": {\n          \"default\": {\n            \"description\": \"OK\"\n          }\n        }\n      }\n    }\n  }\n}\n"
  },
  {
    "path": "specs/3.1.x/parser-filters.yaml",
    "content": "openapi: 3.1.1\ninfo:\n  title: OpenAPI 3.1.1 parser filters example\n  version: 1\npaths:\n  /v1/foo:\n    post:\n      deprecated: true\n      tags:\n        - foo\n        - bar\n      parameters:\n        - $ref: '#/components/parameters/Foo'\n      requestBody:\n        $ref: '#/components/requestBodies/Foo'\n      responses:\n        '200':\n          content:\n            '*/*':\n              schema:\n                $ref: '#/components/schemas/Foo'\n          description: OK\n    put:\n      tags:\n        - bar\n      requestBody:\n        $ref: '#/components/requestBodies/Bar'\n      responses:\n        '200':\n          content:\n            '*/*':\n              schema:\n                $ref: '#/components/schemas/Baz'\n          description: OK\n  /v2/bar:\n    post:\n      requestBody:\n        content:\n          'application/json':\n            schema:\n              $ref: '#/components/schemas/Bar'\n        required: true\n      responses:\n        '200':\n          content:\n            '*/*':\n              schema:\n                $ref: '#/components/schemas/Bar'\n          description: OK\ncomponents:\n  parameters:\n    Foo:\n      name: foo\n      in: query\n      description: Query parameter\n      required: false\n      schema:\n        type: string\n  requestBodies:\n    Foo:\n      required: true\n      description: POST /foo payload\n      content:\n        'application/json':\n          schema:\n            type: object\n            properties:\n              foo:\n                $ref: '#/components/schemas/Bar'\n    Bar:\n      required: true\n      description: PUT /foo payload\n      content:\n        'application/json':\n          schema:\n            type: object\n            properties:\n              foo:\n                $ref: '#/components/schemas/Foo'\n  schemas:\n    Foo:\n      type: object\n      properties:\n        foo:\n          $ref: '#/components/schemas/Bar'\n    Bar:\n      type: object\n      properties:\n        bar:\n          $ref: '#/components/schemas/Baz'\n    Baz:\n      type: object\n      properties:\n        baz:\n          type: string\n    Orphan:\n      type: object\n      properties:\n        orphan:\n          type: string\n"
  },
  {
    "path": "specs/3.1.x/pattern-properties.json",
    "content": "{\n  \"openapi\": \"3.1.0\",\n  \"info\": {\n    \"title\": \"OpenAPI 3.1.0 pattern properties example\",\n    \"version\": \"1\"\n  },\n  \"paths\": {\n    \"/pattern-test\": {\n      \"post\": {\n        \"summary\": \"Test pattern properties\",\n        \"requestBody\": {\n          \"required\": true,\n          \"content\": {\n            \"application/json\": {\n              \"schema\": {\n                \"$ref\": \"#/components/schemas/PatternPropertiesTest\"\n              }\n            }\n          }\n        },\n        \"responses\": {\n          \"200\": {\n            \"description\": \"Success\",\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"$ref\": \"#/components/schemas/PatternPropertiesResponse\"\n                }\n              }\n            }\n          }\n        }\n      }\n    }\n  },\n  \"components\": {\n    \"schemas\": {\n      \"PatternPropertiesTest\": {\n        \"type\": \"object\",\n        \"properties\": {\n          \"id\": {\n            \"type\": \"string\"\n          },\n          \"metadata\": {\n            \"$ref\": \"#/components/schemas/MetadataObject\"\n          }\n        },\n        \"additionalProperties\": false\n      },\n      \"MetadataObject\": {\n        \"type\": \"object\",\n        \"properties\": {\n          \"name\": {\n            \"type\": \"string\"\n          },\n          \"description\": {\n            \"type\": \"string\"\n          }\n        },\n        \"patternProperties\": {\n          \"^meta_\": {\n            \"type\": \"string\",\n            \"description\": \"Any property starting with 'meta_' must be a string\"\n          },\n          \"^config_\": {\n            \"type\": \"object\",\n            \"properties\": {\n              \"value\": {\n                \"type\": \"string\"\n              },\n              \"enabled\": {\n                \"type\": \"boolean\"\n              }\n            },\n            \"additionalProperties\": false\n          },\n          \"^tag_[a-zA-Z0-9_]+$\": {\n            \"type\": \"string\",\n            \"description\": \"Tag properties must match pattern and be strings\"\n          },\n          \"^[0-9]+_item$\": {\n            \"type\": \"array\",\n            \"items\": {\n              \"type\": \"string\"\n            },\n            \"description\": \"Numbered item properties must be arrays of strings\"\n          }\n        },\n        \"additionalProperties\": false\n      },\n      \"NestedPatternObject\": {\n        \"type\": \"object\",\n        \"properties\": {\n          \"base\": {\n            \"type\": \"string\"\n          }\n        },\n        \"patternProperties\": {\n          \"^nested_\": {\n            \"type\": \"object\",\n            \"patternProperties\": {\n              \"^sub_\": {\n                \"type\": \"string\"\n              }\n            },\n            \"additionalProperties\": false\n          }\n        },\n        \"additionalProperties\": false\n      },\n      \"UnionPatternObject\": {\n        \"type\": \"object\",\n        \"properties\": {\n          \"type\": {\n            \"type\": \"string\",\n            \"enum\": [\"user\", \"admin\", \"guest\"]\n          }\n        },\n        \"patternProperties\": {\n          \"^user_\": {\n            \"oneOf\": [\n              {\n                \"type\": \"string\"\n              },\n              {\n                \"type\": \"number\"\n              }\n            ]\n          },\n          \"^admin_\": {\n            \"allOf\": [\n              {\n                \"type\": \"object\"\n              },\n              {\n                \"properties\": {\n                  \"level\": {\n                    \"type\": \"number\",\n                    \"minimum\": 1,\n                    \"maximum\": 10\n                  }\n                }\n              }\n            ]\n          }\n        },\n        \"additionalProperties\": false\n      },\n      \"PatternPropertiesResponse\": {\n        \"type\": \"object\",\n        \"properties\": {\n          \"success\": {\n            \"type\": \"boolean\"\n          },\n          \"data\": {\n            \"$ref\": \"#/components/schemas/MetadataObject\"\n          }\n        },\n        \"additionalProperties\": false\n      }\n    }\n  }\n}\n"
  },
  {
    "path": "specs/3.1.x/ref-deep.yaml",
    "content": "openapi: 3.1.1\ninfo:\n  title: OpenAPI 3.1.1 ref deep example\n  version: '1'\npaths:\n  /foo:\n    get:\n      responses:\n        '200':\n          description: OK\n          content:\n            application/json:\n              schema:\n                type: array\n                items:\n                  type: object\n                  properties:\n                    foo:\n                      type: integer\n                    bar:\n                      type: string\n    post:\n      responses:\n        '200':\n          description: OK\n          content:\n            application/json:\n              schema:\n                type: object\n                properties:\n                  foo:\n                    $ref: '#/paths/~1foo/get/responses/200/content/application~1json/schema/items'\n                  bar:\n                    type: string\ncomponents:\n  schemas:\n    Foo:\n      type: object\n      properties:\n        foo:\n          type: array\n          items:\n            type: object\n            properties:\n              baz:\n                type: string\n        bar:\n          type: array\n          items:\n            type: object\n            properties:\n              baz:\n                type: string\n    Bar:\n      type: object\n      properties:\n        foo:\n          type: array\n          items:\n            $ref: '#/components/schemas/Foo/properties/foo/items'\n        bar:\n          type: array\n          items:\n            $ref: '#/components/schemas/Foo/properties/bar/items'\n"
  },
  {
    "path": "specs/3.1.x/ref-type.json",
    "content": "{\n  \"openapi\": \"3.1.0\",\n  \"info\": {\n    \"title\": \"OpenAPI 3.1.0 ref type example\",\n    \"version\": \"1\"\n  },\n  \"paths\": {\n    \"/foo\": {\n      \"get\": {\n        \"responses\": {\n          \"200\": {\n            \"description\": \"OK\",\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"$ref\": \"#/components/schemas/Foo\",\n                  \"type\": [\"object\", \"null\"]\n                }\n              }\n            }\n          }\n        }\n      }\n    }\n  },\n  \"components\": {\n    \"schemas\": {\n      \"Foo\": {\n        \"properties\": {\n          \"foo\": {\n            \"items\": {\n              \"properties\": {\n                \"baz\": {\n                  \"$ref\": \"#/components/schemas/Bar\",\n                  \"type\": [\"object\", \"null\"]\n                }\n              },\n              \"required\": [\"baz\"],\n              \"type\": \"object\"\n            },\n            \"type\": \"array\"\n          }\n        },\n        \"required\": [\"foo\"],\n        \"type\": \"object\"\n      },\n      \"Bar\": {\n        \"properties\": {\n          \"bar\": {\n            \"type\": \"integer\"\n          }\n        },\n        \"required\": [\"bar\"],\n        \"type\": \"object\"\n      }\n    }\n  }\n}\n"
  },
  {
    "path": "specs/3.1.x/required-all-of-ref.json",
    "content": "{\n  \"openapi\": \"3.1.0\",\n  \"info\": {\n    \"version\": \"1.0.0\"\n  },\n  \"components\": {\n    \"schemas\": {\n      \"Foo\": {\n        \"type\": \"object\",\n        \"properties\": {\n          \"foo\": {\n            \"type\": \"string\"\n          },\n          \"baz\": {\n            \"type\": \"string\"\n          }\n        }\n      },\n      \"Bar\": {\n        \"type\": \"object\",\n        \"allOf\": [\n          {\n            \"$ref\": \"#/components/schemas/Foo\"\n          }\n        ],\n        \"properties\": {\n          \"bar\": {\n            \"type\": \"number\"\n          }\n        },\n        \"required\": [\"foo\", \"bar\", \"baz\"]\n      }\n    }\n  }\n}\n"
  },
  {
    "path": "specs/3.1.x/required-any-of-ref.json",
    "content": "{\n  \"openapi\": \"3.1.0\",\n  \"info\": {\n    \"version\": \"1.0.0\"\n  },\n  \"components\": {\n    \"schemas\": {\n      \"Foo\": {\n        \"type\": \"object\",\n        \"properties\": {\n          \"foo\": {\n            \"type\": \"string\"\n          },\n          \"baz\": {\n            \"type\": \"string\"\n          }\n        }\n      },\n      \"Bar\": {\n        \"type\": \"object\",\n        \"anyOf\": [\n          {\n            \"$ref\": \"#/components/schemas/Foo\"\n          }\n        ],\n        \"properties\": {\n          \"bar\": {\n            \"type\": \"number\"\n          }\n        },\n        \"required\": [\"foo\", \"bar\", \"baz\"]\n      }\n    }\n  }\n}\n"
  },
  {
    "path": "specs/3.1.x/required-one-of-ref.json",
    "content": "{\n  \"openapi\": \"3.1.0\",\n  \"info\": {\n    \"version\": \"1.0.0\"\n  },\n  \"components\": {\n    \"schemas\": {\n      \"Foo\": {\n        \"type\": \"object\",\n        \"properties\": {\n          \"foo\": {\n            \"type\": \"string\"\n          },\n          \"baz\": {\n            \"type\": \"string\"\n          }\n        }\n      },\n      \"Bar\": {\n        \"type\": \"object\",\n        \"oneOf\": [\n          {\n            \"$ref\": \"#/components/schemas/Foo\"\n          }\n        ],\n        \"properties\": {\n          \"bar\": {\n            \"type\": \"number\"\n          }\n        },\n        \"required\": [\"foo\", \"bar\", \"baz\"]\n      }\n    }\n  }\n}\n"
  },
  {
    "path": "specs/3.1.x/schema-const.yaml",
    "content": "openapi: 3.1.1\ninfo:\n  title: OpenAPI 3.1.1 schema const example\n  version: 1\ncomponents:\n  schemas:\n    Foo:\n      properties:\n        foo:\n          const: foo\n          type: string\n        bar:\n          const: 3.2\n          type: number\n        baz:\n          const: -1\n          type: integer\n        qux:\n          const: true\n          type: boolean\n        quux:\n          const: [1, 2, 3, 'foo', true]\n          type: array\n        corge:\n          const:\n            foo: 1\n            bar: true\n            baz: grault\n          type: object\n        garply:\n          const: 10n\n          format: int64\n          type: integer\n        # Integer format const examples - number type\n        numberInt8:\n          const: 100\n          format: int8\n          type: number\n        numberInt16:\n          const: 1000\n          format: int16\n          type: number\n        numberInt32:\n          const: 100000\n          format: int32\n          type: number\n        numberInt64:\n          const: 1000000000000\n          format: int64\n          type: number\n        numberUint8:\n          const: 200\n          format: uint8\n          type: number\n        numberUint16:\n          const: 50000\n          format: uint16\n          type: number\n        numberUint32:\n          const: 3000000000\n          format: uint32\n          type: number\n        numberUint64:\n          const: 18000000000000000000\n          format: uint64\n          type: number\n        # Integer format const examples - integer type\n        integerInt8:\n          const: -100\n          format: int8\n          type: integer\n        integerInt16:\n          const: -1000\n          format: int16\n          type: integer\n        integerInt32:\n          const: -100000\n          format: int32\n          type: integer\n        integerInt64:\n          const: -1000000000000\n          format: int64\n          type: integer\n        integerUint8:\n          const: 255\n          format: uint8\n          type: integer\n        integerUint16:\n          const: 65535\n          format: uint16\n          type: integer\n        integerUint32:\n          const: 4294967295\n          format: uint32\n          type: integer\n        integerUint64:\n          const: 18446744073709551615n\n          format: uint64\n          type: integer\n        # Integer format const examples - string type (only for 64-bit formats)\n        stringInt64:\n          const: '-9223372036854775808'\n          format: int64\n          type: string\n        stringUint64:\n          const: '18446744073709551615'\n          format: uint64\n          type: string\n      type: object\n"
  },
  {
    "path": "specs/3.1.x/sdk-instance.yaml",
    "content": "openapi: 3.1.1\ninfo:\n  title: OpenAPI 3.1.1 sdk instance example\n  version: 1\npaths:\n  /foo:\n    get:\n      tags:\n        - fooBaz\n      responses:\n        '200':\n          content:\n            '*/*':\n              schema:\n                type: string\n          description: OK\n    post:\n      tags:\n        - fooBaz\n      operationId: foo.-post\n      responses:\n        '200':\n          content:\n            '*/*':\n              schema:\n                type: string\n          description: OK\n    put:\n      tags:\n        - fooBaz\n      operationId: /foo/-put/\n      responses:\n        '200':\n          content:\n            '*/*':\n              schema:\n                type: string\n          description: OK\n  /foo/bar:\n    get:\n      tags:\n        - barBaz\n      responses:\n        '200':\n          content:\n            '*/*':\n              schema:\n                type: string\n          description: OK\n    post:\n      tags:\n        - fooBaz\n        - barBaz\n      operationId: foo.bar.post\n      responses:\n        '200':\n          content:\n            '*/*':\n              schema:\n                type: string\n          description: OK\n    put:\n      tags:\n        - fooBaz\n        - barBaz\n      operationId: /foo/bar/put/\n      responses:\n        '200':\n          content:\n            '*/*':\n              schema:\n                type: string\n          description: OK\n"
  },
  {
    "path": "specs/3.1.x/sdk-nested-classes.yaml",
    "content": "openapi: 3.1.1\ninfo:\n  title: OpenAPI 3.1.1 sdk nested classes example\n  version: 1\npaths:\n  /business/providers/domains:\n    get:\n      tags:\n        - business\n        - providers\n        - domains\n      operationId: business.providers.domains.get\n      responses:\n        '200':\n          content:\n            '*/*':\n              schema:\n                type: string\n          description: OK\n    post:\n      tags:\n        - providers\n        - domains\n        - business\n      operationId: business.providers.domains.post\n      responses:\n        '200':\n          content:\n            '*/*':\n              schema:\n                type: string\n          description: OK\n    put:\n      tags:\n        - domains\n      responses:\n        '200':\n          content:\n            '*/*':\n              schema:\n                type: string\n          description: OK\n  /locations/businesses:\n    get:\n      tags:\n        - locations\n        - business\n      operationId: business.get\n      responses:\n        '200':\n          content:\n            '*/*':\n              schema:\n                type: string\n          description: OK\n  /locations:\n    get:\n      tags:\n        - locations\n      operationId: get\n      responses:\n        '200':\n          content:\n            '*/*':\n              schema:\n                type: string\n          description: OK\n"
  },
  {
    "path": "specs/3.1.x/sdk-nested-conflict.yaml",
    "content": "openapi: 3.1.1\ninfo:\n  title: OpenAPI 3.1.1 sdk nested conflict example\n  version: 1\npaths:\n  /v1/providers:\n    get:\n      operationId: providers.list\n      summary: List Providers\n      tags:\n        - providers\n  /v1/tenants/{tenantId}/providers:\n    get:\n      operationId: tenants.providers.list\n      summary: List Tenant Providers\n      tags:\n        - tenants\n        - tenantProviders\n      parameters:\n        - name: tenantId\n          in: path\n          required: true\n          schema:\n            type: string\n            description: Tenant ID\n"
  },
  {
    "path": "specs/3.1.x/sdk-signatures.yaml",
    "content": "openapi: 3.1.0\ninfo:\n  title: SDK signatures\n  version: 1.0.0\npaths:\n  /no-params:\n    get:\n      operationId: noParams\n      summary: No parameters\n      responses:\n        '200':\n          description: OK\n  /one-path/{id}:\n    get:\n      operationId: onePath\n      summary: One path parameter\n      parameters:\n        - name: id\n          in: path\n          required: true\n          schema:\n            type: string\n      responses:\n        '200':\n          description: OK\n  /one-query:\n    get:\n      operationId: oneQuery\n      summary: One query parameter\n      parameters:\n        - name: search\n          in: query\n          schema:\n            type: string\n      responses:\n        '200':\n          description: OK\n  /multiple-params/{id}:\n    post:\n      operationId: multipleParams\n      summary: Path, query, header, and body\n      parameters:\n        - name: id\n          in: path\n          required: true\n          schema:\n            type: string\n        - name: filter\n          in: query\n          schema:\n            type: string\n        - name: X-Request-Id\n          in: header\n          schema:\n            type: string\n      requestBody:\n        required: true\n        content:\n          application/json:\n            schema:\n              type: object\n              properties:\n                foo:\n                  type: string\n      responses:\n        '200':\n          description: OK\n  /conflict/{foo}:\n    get:\n      operationId: conflict\n      summary: Conflicting parameter names\n      parameters:\n        - name: foo\n          in: path\n          required: true\n          schema:\n            type: string\n        - name: foo\n          in: query\n          schema:\n            type: string\n        - name: foo\n          in: header\n          schema:\n            type: string\n      responses:\n        '200':\n          description: OK\n  /body-only:\n    post:\n      operationId: bodyOnly\n      summary: Only body parameter\n      requestBody:\n        required: true\n        content:\n          application/json:\n            schema:\n              type: object\n              properties:\n                bar:\n                  type: string\n      responses:\n        '200':\n          description: OK\n  /optional-params:\n    get:\n      operationId: optionalParams\n      summary: Optional query and header\n      parameters:\n        - name: q\n          in: query\n          required: false\n          schema:\n            type: string\n        - name: X-Optional\n          in: header\n          required: false\n          schema:\n            type: string\n      responses:\n        '200':\n          description: OK\n  /reserved-keywords/{default}:\n    get:\n      operationId: reservedKeywords\n      summary: Reserved keyword as parameter\n      parameters:\n        - name: default\n          in: path\n          required: true\n          schema:\n            type: string\n        - name: default\n          in: query\n          schema:\n            type: string\n      responses:\n        '200':\n          description: OK\n  /non-ascii/{æøå}:\n    get:\n      operationId: nonAscii\n      summary: Non-ASCII parameter names\n      parameters:\n        - name: æøå\n          in: path\n          required: true\n          schema:\n            type: string\n        - name: öôê\n          in: query\n          schema:\n            type: string\n      responses:\n        '200':\n          description: OK\n  /array-params:\n    get:\n      operationId: arrayParams\n      summary: Array parameters\n      parameters:\n        - name: tags\n          in: query\n          schema:\n            type: array\n            items:\n              type: string\n      responses:\n        '200':\n          description: OK\n  /cookie-param:\n    get:\n      operationId: cookieParam\n      summary: Cookie parameter\n      parameters:\n        - name: session\n          in: cookie\n          schema:\n            type: string\n      responses:\n        '200':\n          description: OK\n"
  },
  {
    "path": "specs/3.1.x/security-api-key.yaml",
    "content": "openapi: 3.1.1\ninfo:\n  title: OpenAPI 3.1.1 security api key example\n  version: '1'\npaths:\n  /foo:\n    get:\n      responses:\n        '200':\n          description: OK\n      security:\n        - foo: []\n  /bar:\n    get:\n      responses:\n        '200':\n          description: OK\n      security:\n        - bar: []\n        - MutualTLS: []\ncomponents:\n  securitySchemes:\n    foo:\n      in: query\n      name: foo\n      type: apiKey\n    bar:\n      in: cookie\n      name: bar\n      type: apiKey\n    MutualTLS:\n      type: mutualTLS\n"
  },
  {
    "path": "specs/3.1.x/security-http-bearer.json",
    "content": "{\n  \"openapi\": \"3.1.1\",\n  \"info\": {\n    \"title\": \"OpenAPI 3.1.1 security bearer example\",\n    \"version\": \"1\"\n  },\n  \"paths\": {\n    \"/foo\": {\n      \"get\": {\n        \"responses\": {\n          \"200\": {\n            \"description\": \"OK\"\n          }\n        },\n        \"security\": [\n          {\n            \"foo\": []\n          }\n        ]\n      }\n    }\n  },\n  \"components\": {\n    \"securitySchemes\": {\n      \"foo\": {\n        \"bearerFormat\": \"JWT\",\n        \"scheme\": \"bearer\",\n        \"type\": \"http\"\n      }\n    }\n  }\n}\n"
  },
  {
    "path": "specs/3.1.x/security-oauth2.yaml",
    "content": "openapi: 3.1.1\ninfo:\n  title: OpenAPI 3.1.1 security oauth2 example\n  version: '1'\npaths:\n  /foo:\n    get:\n      responses:\n        '200':\n          description: OK\n      security:\n        - foo: []\ncomponents:\n  securitySchemes:\n    foo:\n      flows:\n        authorizationCode:\n          authorizationUrl: '/'\n          tokenUrl: '/'\n          scopes: {}\n        clientCredentials:\n          tokenUrl: '/'\n          scopes: {}\n        implicit:\n          authorizationUrl: '/'\n          scopes: {}\n        password:\n          scopes: {}\n          tokenUrl: '/'\n      type: 'oauth2'\n"
  },
  {
    "path": "specs/3.1.x/security-open-id-connect.yaml",
    "content": "openapi: 3.1.1\ninfo:\n  title: OpenAPI 3.1.1 security OpenID Connect example\n  version: '1'\npaths:\n  /foo:\n    get:\n      responses:\n        '200':\n          description: OK\n      security:\n        - foo: []\ncomponents:\n  securitySchemes:\n    foo:\n      openIdConnectUrl: 'https://example.com/.well-known/openid-configuration'\n      type: 'openIdConnect'\n"
  },
  {
    "path": "specs/3.1.x/servers.yaml",
    "content": "openapi: 3.1.1\ninfo:\n  title: OpenAPI 3.1.1 servers example\n  version: 1\nservers:\n  - url: https://foo.com/v1\n    description: foo\n  - url: /v1\npaths:\n  /foo:\n    get:\n      responses:\n        '200':\n          content:\n            '*/*':\n              schema:\n                type: string\n          description: OK\n"
  },
  {
    "path": "specs/3.1.x/sse-post.yaml",
    "content": "openapi: 3.1.0\ninfo:\n  title: SSE POST test\n  version: 1.0.0\npaths:\n  /events/subscribe:\n    post:\n      operationId: subscribeToEventStream\n      summary: Subscribe to event stream\n      responses:\n        '200':\n          description: Event stream\n          content:\n            text/event-stream:\n              schema:\n                type: object\n  /events/list:\n    get:\n      operationId: listEvents\n      summary: List events\n      responses:\n        '200':\n          description: OK\n          content:\n            application/json:\n              schema:\n                type: array\n                items:\n                  type: string\n"
  },
  {
    "path": "specs/3.1.x/string-with-format.yaml",
    "content": "openapi: 3.1.1\ninfo:\n  title: OpenAPI 3.1.1 string with format example\n  version: '1'\ncomponents:\n  schemas:\n    Foo:\n      properties:\n        foo:\n          items:\n            anyOf:\n              - type: string\n                format: binary\n              - type: string\n          type: array\n"
  },
  {
    "path": "specs/3.1.x/string-with-guid-format.yaml",
    "content": "openapi: 3.1.1\ninfo:\n  title: OpenAPI 3.1.1 string with GUID format example\n  version: '1'\npaths:\n  /foo/{guidId}:\n    get:\n      operationId: getFoo\n      parameters:\n        - name: guidId\n          in: path\n          required: true\n          schema:\n            type: string\n            format: guid\n      responses:\n        '200':\n          description: OK\n"
  },
  {
    "path": "specs/3.1.x/time-format.yaml",
    "content": "openapi: 3.1.0\ninfo:\n  title: OpenAPI 3.1.0 time format example\n  version: '1'\npaths:\n  /search:\n    get:\n      summary: Search with time parameter\n      parameters:\n        - name: start_time\n          in: query\n          description: Start time in HH:MM:SS format\n          schema:\n            type: string\n            format: time\n        - name: end_time\n          in: query\n          description: End time in HH:MM:SS format\n          required: true\n          schema:\n            type: string\n            format: time\n      responses:\n        '200':\n          description: Success\n          content:\n            application/json:\n              schema:\n                type: object\n                properties:\n                  result:\n                    type: string\n                  scheduled_time:\n                    type: string\n                    format: time\n"
  },
  {
    "path": "specs/3.1.x/transformers-all-of.yaml",
    "content": "openapi: 3.1.1\ninfo:\n  title: OpenAPI 3.1.1 transformers all of example\n  version: 1\npaths:\n  /foo:\n    get:\n      responses:\n        '200':\n          content:\n            '*/*':\n              schema:\n                $ref: '#/components/schemas/Foo'\n          description: OK\ncomponents:\n  schemas:\n    Foo:\n      type: object\n      properties:\n        foo:\n          type: array\n          items:\n            $ref: '#/components/schemas/Bar'\n      required:\n        - foo\n    Bar:\n      type: object\n      properties:\n        foo:\n          type: array\n          items:\n            oneOf:\n              - $ref: '#/components/schemas/Baz'\n        bar:\n          type: string\n          enum:\n            - foo\n            - bar\n            - baz\n      required:\n        - foo\n        - bar\n    Baz:\n      type: object\n      allOf:\n        - $ref: '#/components/schemas/Qux'\n        - type: object\n          properties:\n            foo:\n              format: int32\n              type: integer\n            bar:\n              format: date-time\n              type: string\n            baz:\n              type: string\n              enum:\n                - foo\n                - bar\n                - baz\n            qux:\n              format: int32\n              type: integer\n      required:\n        - foo\n        - bar\n        - baz\n        - qux\n    Qux:\n      type: object\n      discriminator:\n        propertyName: id\n      properties:\n        foo:\n          type: integer\n          format: int32\n        bar:\n          type: number\n        baz:\n          format: date-time\n          type: string\n        id:\n          type: string\n      required:\n        - foo\n        - bar\n        - id\n"
  },
  {
    "path": "specs/3.1.x/transformers-allof-response-wrapper.json",
    "content": "{\n  \"openapi\": \"3.1.0\",\n  \"info\": {\n    \"title\": \"Test Paginated Response\",\n    \"version\": \"1.0.0\"\n  },\n  \"servers\": [\n    {\n      \"url\": \"{protocol}://specs\",\n      \"variables\": {\n        \"protocol\": {\n          \"default\": \"https\",\n          \"enum\": [\"http\", \"https\"]\n        }\n      }\n    }\n  ],\n  \"components\": {\n    \"schemas\": {\n      \"PaginatedResponse\": {\n        \"type\": \"object\",\n        \"properties\": {\n          \"meta\": {\n            \"type\": \"object\",\n            \"properties\": {\n              \"page\": { \"type\": \"number\" },\n              \"limit\": { \"type\": \"number\" },\n              \"total\": { \"type\": \"number\" },\n              \"totalPages\": { \"type\": \"number\" }\n            }\n          }\n        }\n      },\n      \"RepositorySecret\": {\n        \"type\": \"object\",\n        \"properties\": {\n          \"id\": { \"type\": \"number\" },\n          \"name\": { \"type\": \"string\" },\n          \"createdAt\": { \"format\": \"date-time\", \"type\": \"string\" },\n          \"updatedAt\": { \"format\": \"date-time\", \"type\": \"string\" }\n        },\n        \"required\": [\"id\", \"name\", \"createdAt\", \"updatedAt\"]\n      }\n    }\n  },\n  \"paths\": {\n    \"/secrets\": {\n      \"get\": {\n        \"operationId\": \"listSecrets\",\n        \"responses\": {\n          \"200\": {\n            \"description\": \"OK\",\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"title\": \"PaginatedResponseRepositorySecret\",\n                  \"allOf\": [\n                    { \"$ref\": \"#/components/schemas/PaginatedResponse\" },\n                    {\n                      \"properties\": {\n                        \"data\": {\n                          \"type\": \"array\",\n                          \"items\": { \"$ref\": \"#/components/schemas/RepositorySecret\" }\n                        }\n                      }\n                    }\n                  ]\n                }\n              }\n            }\n          }\n        }\n      }\n    },\n    \"/secrets/{id}\": {\n      \"post\": {\n        \"operationId\": \"createSecret\",\n        \"responses\": {\n          \"201\": {\n            \"description\": \"Created\",\n            \"content\": {\n              \"application/json\": {\n                \"schema\": { \"$ref\": \"#/components/schemas/RepositorySecret\" }\n              }\n            }\n          }\n        }\n      }\n    }\n  }\n}\n"
  },
  {
    "path": "specs/3.1.x/transformers-any-of-null.json",
    "content": "{\n  \"openapi\": \"3.1.1\",\n  \"info\": {\n    \"title\": \"OpenAPI 3.1.1 transformers any of null example\",\n    \"version\": \"1\"\n  },\n  \"paths\": {\n    \"/foo\": {\n      \"get\": {\n        \"responses\": {\n          \"200\": {\n            \"description\": \"OK\",\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"type\": \"array\",\n                  \"items\": {\n                    \"$ref\": \"#/components/schemas/Foo\"\n                  }\n                }\n              }\n            }\n          }\n        }\n      }\n    },\n    \"/polls\": {\n      \"get\": {\n        \"operationId\": \"getPoll\",\n        \"responses\": {\n          \"200\": {\n            \"description\": \"OK\",\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"$ref\": \"#/components/schemas/Poll\"\n                }\n              }\n            }\n          }\n        }\n      }\n    },\n    \"/polls/nullable\": {\n      \"get\": {\n        \"operationId\": \"getNullablePoll\",\n        \"responses\": {\n          \"200\": {\n            \"description\": \"OK\",\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"anyOf\": [\n                    {\n                      \"$ref\": \"#/components/schemas/Poll\"\n                    },\n                    {\n                      \"type\": \"null\"\n                    }\n                  ]\n                }\n              }\n            }\n          }\n        }\n      }\n    },\n    \"/api/nested-date-object\": {\n      \"get\": {\n        \"operationId\": \"nestedDateObject\",\n        \"responses\": {\n          \"200\": {\n            \"description\": \"Object with nested date\",\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"$ref\": \"#/components/schemas/NestedDateObject\"\n                }\n              }\n            }\n          }\n        }\n      }\n    }\n  },\n  \"components\": {\n    \"schemas\": {\n      \"Poll\": {\n        \"type\": \"object\",\n        \"properties\": {\n          \"id\": {\n            \"type\": \"integer\"\n          },\n          \"createdAt\": {\n            \"type\": \"string\",\n            \"format\": \"date-time\"\n          }\n        },\n        \"required\": [\"id\", \"createdAt\"]\n      },\n      \"NestedDateObject\": {\n        \"description\": \"Object with a nested date structure\",\n        \"type\": \"object\",\n        \"properties\": {\n          \"foo\": {\n            \"type\": \"object\",\n            \"properties\": {\n              \"bar\": {\n                \"type\": \"string\",\n                \"format\": \"date-time\"\n              }\n            }\n          }\n        }\n      },\n      \"Foo\": {\n        \"type\": \"object\",\n        \"properties\": {\n          \"foo\": {\n            \"type\": \"string\",\n            \"format\": \"date-time\"\n          },\n          \"bar\": {\n            \"anyOf\": [\n              {\n                \"type\": \"string\",\n                \"format\": \"date-time\"\n              },\n              {\n                \"type\": \"null\"\n              }\n            ]\n          },\n          \"baz\": {\n            \"anyOf\": [\n              {\n                \"type\": [\"string\", \"null\"],\n                \"format\": \"date-time\"\n              }\n            ]\n          },\n          \"requiredQux\": {\n            \"anyOf\": [\n              {\n                \"type\": [\"string\", \"null\"],\n                \"format\": \"date-time\"\n              }\n            ]\n          }\n        },\n        \"required\": [\"requiredQux\"]\n      }\n    }\n  }\n}\n"
  },
  {
    "path": "specs/3.1.x/transformers-array.json",
    "content": "{\n  \"openapi\": \"3.1.0\",\n  \"info\": {\n    \"title\": \"OpenAPI 3.1.0 transformers array example\",\n    \"version\": \"1\"\n  },\n  \"paths\": {\n    \"/foo\": {\n      \"get\": {\n        \"responses\": {\n          \"200\": {\n            \"description\": \"OK\",\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"type\": \"object\",\n                  \"properties\": {\n                    \"foo\": {\n                      \"type\": \"array\",\n                      \"items\": {\n                        \"type\": \"object\",\n                        \"properties\": {\n                          \"baz\": {\n                            \"type\": \"string\",\n                            \"format\": \"date-time\"\n                          }\n                        },\n                        \"required\": [\"baz\"]\n                      }\n                    }\n                  },\n                  \"required\": [\"foo\"]\n                }\n              }\n            }\n          }\n        }\n      }\n    }\n  }\n}\n"
  },
  {
    "path": "specs/3.1.x/transformers-one-of-discriminated.yaml",
    "content": "openapi: 3.1.1\ninfo:\n  title: Example API\n  version: 1.0.0\n\npaths:\n  /rules:\n    get:\n      operationId: listRules\n      responses:\n        '200':\n          description: Rules response\n          content:\n            application/json:\n              schema:\n                type: object\n                required:\n                  - rules\n                properties:\n                  rules:\n                    type: array\n                    items:\n                      $ref: '#/components/schemas/Rule'\n\ncomponents:\n  schemas:\n    Rule:\n      type: object\n      required:\n        - id\n        - then\n      properties:\n        id:\n          type: string\n        createdAt:\n          type: string\n          format: date-time\n        then:\n          $ref: '#/components/schemas/Then'\n\n    Then:\n      description: Action to take when rule conditions are met\n      oneOf:\n        - $ref: '#/components/schemas/DirectAction'\n        - $ref: '#/components/schemas/RoundRobinAction'\n        - $ref: '#/components/schemas/CategoryAction'\n        - $ref: '#/components/schemas/StatusAction'\n      discriminator:\n        propertyName: type\n        mapping:\n          direct: '#/components/schemas/DirectAction'\n          round-robin: '#/components/schemas/RoundRobinAction'\n          category: '#/components/schemas/CategoryAction'\n          status: '#/components/schemas/StatusAction'\n\n    DirectAction:\n      type: object\n      required: [type, assignee]\n      properties:\n        type:\n          type: string\n          const: direct\n        assignee:\n          type: string\n\n    RoundRobinAction:\n      type: object\n      required: [type, id, items]\n      properties:\n        type:\n          type: string\n          const: round-robin\n        id:\n          type: string\n        items:\n          type: array\n          items:\n            type: string\n\n    CategoryAction:\n      type: object\n      required: [type, category]\n      properties:\n        type:\n          type: string\n          const: category\n        category:\n          type: string\n\n    StatusAction:\n      type: object\n      required: [type, status]\n      properties:\n        type:\n          type: string\n          const: status\n        status:\n          type: string\n"
  },
  {
    "path": "specs/3.1.x/transformers-recursive.json",
    "content": "{\n  \"openapi\": \"3.1.0\",\n  \"info\": {\n    \"title\": \"Recursive Schema Test\",\n    \"version\": \"1.0.0\"\n  },\n  \"paths\": {\n    \"/tree\": {\n      \"get\": {\n        \"operationId\": \"getTree\",\n        \"responses\": {\n          \"200\": {\n            \"description\": \"Success\",\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"type\": \"array\",\n                  \"items\": {\n                    \"$ref\": \"#/components/schemas/TreeNode\"\n                  }\n                }\n              }\n            }\n          }\n        }\n      }\n    }\n  },\n  \"components\": {\n    \"schemas\": {\n      \"TreeNode\": {\n        \"type\": \"object\",\n        \"properties\": {\n          \"id\": {\n            \"type\": \"string\"\n          },\n          \"name\": {\n            \"type\": \"string\"\n          },\n          \"createdAt\": {\n            \"type\": \"string\",\n            \"format\": \"date-time\"\n          },\n          \"children\": {\n            \"type\": \"array\",\n            \"items\": {\n              \"$ref\": \"#/components/schemas/TreeNode\"\n            }\n          }\n        }\n      }\n    }\n  }\n}\n"
  },
  {
    "path": "specs/3.1.x/transformers.json",
    "content": "{\n  \"openapi\": \"3.1.0\",\n  \"info\": {\n    \"title\": \"swagger\",\n    \"version\": \"v1.0\"\n  },\n  \"servers\": [\n    {\n      \"url\": \"http://localhost:3000/base\"\n    }\n  ],\n  \"paths\": {\n    \"/api/model-with-dates\": {\n      \"post\": {\n        \"operationId\": \"parentModelWithDates\",\n        \"responses\": {\n          \"200\": {\n            \"description\": \"Success\",\n            \"content\": {\n              \"application/json; type=collection\": {\n                \"schema\": {\n                  \"$ref\": \"#/components/schemas/ParentModelWithDates\"\n                }\n              }\n            }\n          },\n          \"201\": {\n            \"description\": \"Success\",\n            \"content\": {\n              \"application/json; type=collection\": {\n                \"schema\": {\n                  \"$ref\": \"#/components/schemas/ParentModelWithDates\"\n                }\n              }\n            }\n          }\n        }\n      },\n      \"put\": {\n        \"operationId\": \"modelWithDates\",\n        \"responses\": {\n          \"200\": {\n            \"description\": \"Success\",\n            \"content\": {\n              \"application/json; type=collection\": {\n                \"schema\": {\n                  \"$ref\": \"#/components/schemas/ModelWithDates\"\n                }\n              }\n            }\n          }\n        }\n      }\n    },\n    \"/api/model-with-dates-array\": {\n      \"put\": {\n        \"operationId\": \"modelWithDatesArray\",\n        \"responses\": {\n          \"200\": {\n            \"description\": \"Success\",\n            \"content\": {\n              \"application/json; type=collection\": {\n                \"schema\": {\n                  \"type\": \"array\",\n                  \"items\": {\n                    \"$ref\": \"#/components/schemas/ModelWithDates\"\n                  }\n                }\n              }\n            }\n          }\n        }\n      }\n    },\n    \"/api/array-of-dates\": {\n      \"put\": {\n        \"operationId\": \"arrayOfDates\",\n        \"responses\": {\n          \"200\": {\n            \"description\": \"Success\",\n            \"content\": {\n              \"application/json; type=collection\": {\n                \"schema\": {\n                  \"type\": \"array\",\n                  \"items\": {\n                    \"type\": \"string\",\n                    \"format\": \"date-time\"\n                  }\n                }\n              }\n            }\n          }\n        }\n      }\n    },\n    \"/api/multiple-responses\": {\n      \"put\": {\n        \"operationId\": \"multiple-responses\",\n        \"responses\": {\n          \"200\": {\n            \"description\": \"Updated\",\n            \"content\": {\n              \"application/json; type=collection\": {\n                \"schema\": {\n                  \"type\": \"array\",\n                  \"items\": {\n                    \"$ref\": \"#/components/schemas/ModelWithDates\"\n                  }\n                }\n              }\n            }\n          },\n          \"201\": {\n            \"description\": \"Created\",\n            \"content\": {\n              \"application/json; type=collection\": {\n                \"schema\": {\n                  \"type\": \"array\",\n                  \"items\": {\n                    \"$ref\": \"#/components/schemas/SimpleModel\"\n                  }\n                }\n              }\n            }\n          }\n        }\n      }\n    },\n    \"/api/no-response-transformer\": {\n      \"put\": {\n        \"responses\": {\n          \"200\": {\n            \"description\": \"Updated\",\n            \"content\": {\n              \"application/json; type=collection\": {\n                \"schema\": {\n                  \"type\": \"array\",\n                  \"items\": {\n                    \"$ref\": \"#/components/schemas/SimpleModel\"\n                  }\n                }\n              }\n            }\n          }\n        }\n      }\n    },\n    \"/api/simple-date-response\": {\n      \"post\": {\n        \"responses\": {\n          \"200\": {\n            \"description\": \"Simple date string\",\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"type\": \"string\",\n                  \"format\": \"date-time\"\n                }\n              }\n            }\n          }\n        }\n      },\n      \"put\": {\n        \"responses\": {\n          \"200\": {\n            \"description\": \"Simple date string ref\",\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"$ref\": \"#/components/schemas/DateString\"\n                }\n              }\n            }\n          }\n        }\n      }\n    }\n  },\n  \"components\": {\n    \"schemas\": {\n      \"DateString\": {\n        \"type\": \"string\",\n        \"format\": \"date-time\"\n      },\n      \"SimpleModel\": {\n        \"description\": \"This is a model that contains a some dates\",\n        \"type\": \"object\",\n        \"required\": [\"id\", \"name\", \"enabled\"],\n        \"properties\": {\n          \"id\": {\n            \"type\": \"number\"\n          },\n          \"name\": {\n            \"maxLength\": 255,\n            \"type\": \"string\"\n          },\n          \"enabled\": {\n            \"type\": \"boolean\",\n            \"readOnly\": true\n          }\n        }\n      },\n      \"ModelWithDates\": {\n        \"description\": \"This is a model that contains a some dates\",\n        \"type\": \"object\",\n        \"required\": [\"id\", \"name\", \"enabled\", \"modified\"],\n        \"properties\": {\n          \"id\": {\n            \"type\": \"number\"\n          },\n          \"name\": {\n            \"maxLength\": 255,\n            \"type\": \"string\"\n          },\n          \"enabled\": {\n            \"type\": \"boolean\",\n            \"readOnly\": true\n          },\n          \"modified\": {\n            \"type\": \"string\",\n            \"format\": \"date-time\",\n            \"readOnly\": true\n          },\n          \"expires\": {\n            \"type\": \"string\",\n            \"format\": \"date\",\n            \"readOnly\": true\n          }\n        }\n      },\n      \"ParentModelWithDates\": {\n        \"description\": \"This is a model that contains a some dates and arrays\",\n        \"type\": \"object\",\n        \"required\": [\"id\", \"name\"],\n        \"properties\": {\n          \"id\": {\n            \"type\": \"number\"\n          },\n          \"modified\": {\n            \"type\": \"string\",\n            \"format\": \"date-time\",\n            \"readOnly\": true\n          },\n          \"items\": {\n            \"type\": \"array\",\n            \"items\": {\n              \"$ref\": \"#/components/schemas/ModelWithDates\"\n            }\n          },\n          \"item\": {\n            \"$ref\": \"#/components/schemas/ModelWithDates\"\n          },\n          \"nullable-date\": {\n            \"type\": \"array\",\n            \"items\": {\n              \"anyOf\": [{ \"type\": \"string\", \"format\": \"date-time\" }, { \"type\": \"null\" }]\n            }\n          },\n          \"simpleItems\": {\n            \"type\": \"array\",\n            \"items\": {\n              \"$ref\": \"#/components/schemas/SimpleModel\"\n            }\n          },\n          \"simpleItem\": {\n            \"$ref\": \"#/components/schemas/SimpleModel\"\n          },\n          \"dates\": {\n            \"type\": \"array\",\n            \"items\": {\n              \"type\": \"string\",\n              \"format\": \"date-time\"\n            }\n          },\n          \"strings\": {\n            \"type\": \"array\",\n            \"items\": {\n              \"type\": \"string\"\n            }\n          }\n        }\n      }\n    }\n  }\n}\n"
  },
  {
    "path": "specs/3.1.x/transforms-read-write-nested.yaml",
    "content": "openapi: 3.0.3\ninfo:\n  title: writeOnly repro\n  version: 1.0.0\npaths:\n  /items:\n    post:\n      operationId: item_create\n      requestBody:\n        required: true\n        content:\n          application/json:\n            schema:\n              $ref: '#/components/schemas/CreateItemRequest'\n      responses:\n        '201':\n          description: Created\ncomponents:\n  schemas:\n    CreateItemRequest:\n      type: object\n      required:\n        - payload\n      properties:\n        payload:\n          $ref: '#/components/schemas/Payload'\n    Payload:\n      type: object\n      required:\n        - kind\n        - encoded\n      properties:\n        kind:\n          type: string\n          enum: [jpeg]\n        encoded:\n          type: string\n          writeOnly: true\n          description: Data required on write\n"
  },
  {
    "path": "specs/3.1.x/transforms-read-write-response.yaml",
    "content": "openapi: 3.0.3\ninfo:\n  title: readOnly response test\n  version: 1.0.0\npaths:\n  /items:\n    get:\n      operationId: item_list\n      responses:\n        '200':\n          description: Success\n          content:\n            application/json:\n              schema:\n                $ref: '#/components/schemas/ItemListResponse'\ncomponents:\n  schemas:\n    ItemListResponse:\n      type: object\n      required:\n        - items\n      properties:\n        items:\n          type: array\n          items:\n            $ref: '#/components/schemas/Item'\n    Item:\n      type: object\n      required:\n        - id\n        - name\n      properties:\n        id:\n          type: string\n          readOnly: true\n          description: Server-generated ID\n        name:\n          type: string\n        created_at:\n          type: string\n          format: date-time\n          readOnly: true\n          description: Server-generated timestamp\n"
  },
  {
    "path": "specs/3.1.x/transforms-read-write-unevaluated.yaml",
    "content": "openapi: 3.1.0\ninfo:\n  title: readOnly map property with unevaluatedProperties\n  version: 1.0.0\npaths:\n  /x:\n    get:\n      operationId: getX\n      responses:\n        '200':\n          description: ok\n          content:\n            application/json:\n              schema:\n                $ref: '#/components/schemas/DisposableEmail'\n    post:\n      operationId: createX\n      requestBody:\n        required: true\n        content:\n          application/json:\n            schema:\n              $ref: '#/components/schemas/DisposableEmail'\n      responses:\n        '200':\n          description: ok\n          content:\n            application/json:\n              schema:\n                $ref: '#/components/schemas/DisposableEmail'\ncomponents:\n  schemas:\n    DisposableEmail:\n      type: object\n      required:\n        - domain\n        - disposable\n        - metadata\n      properties:\n        domain:\n          type: string\n        disposable:\n          type: boolean\n          readOnly: true\n        metadata:\n          type: object\n          unevaluatedProperties: {}\n"
  },
  {
    "path": "specs/3.1.x/transforms-read-write.yaml",
    "content": "openapi: 3.1.1\ninfo:\n  title: OpenAPI 3.1.1 transforms read write example\n  version: 1\npaths:\n  /foo-read-write:\n    post:\n      requestBody:\n        content:\n          'application/json':\n            schema:\n              $ref: '#/components/schemas/FooReadWrite'\n        required: true\n      responses:\n        '200':\n          content:\n            '*/*':\n              schema:\n                $ref: '#/components/schemas/FooReadWrite'\n          description: OK\n  /foo-read:\n    post:\n      requestBody:\n        content:\n          'application/json':\n            schema:\n              $ref: '#/components/schemas/FooRead'\n        required: true\n      responses:\n        '200':\n          content:\n            '*/*':\n              schema:\n                $ref: '#/components/schemas/FooRead'\n          description: OK\n  /foo-write:\n    post:\n      requestBody:\n        content:\n          'application/json':\n            schema:\n              $ref: '#/components/schemas/FooWrite'\n        required: true\n      responses:\n        '200':\n          content:\n            '*/*':\n              schema:\n                $ref: '#/components/schemas/FooWrite'\n          description: OK\n    put:\n      parameters:\n        - $ref: '#/components/parameters/Foo'\n      requestBody:\n        $ref: '#/components/requestBodies/Foo'\n      responses:\n        '200':\n          $ref: '#/components/responses/Foo'\ncomponents:\n  parameters:\n    Foo:\n      name: foo\n      in: query\n      description: Query parameter\n      required: false\n      schema:\n        type: string\n  requestBodies:\n    Foo:\n      required: true\n      description: PUT /foo-write payload\n      content:\n        'application/json':\n          schema:\n            type: object\n            properties:\n              foo:\n                $ref: '#/components/schemas/BarRead'\n  responses:\n    Foo:\n      content:\n        '*/*':\n          schema:\n            $ref: '#/components/schemas/FooWrite'\n      description: OK\n  schemas:\n    FooReadWrite:\n      allOf:\n        - $ref: '#/components/schemas/BarRead'\n        - type: object\n          properties:\n            foo:\n              writeOnly: true\n              type: string\n    FooRead:\n      allOf:\n        - $ref: '#/components/schemas/BarRead'\n        - type: object\n          properties:\n            foo:\n              readOnly: true\n              type: string\n    FooWrite:\n      allOf:\n        - $ref: '#/components/schemas/BarWrite'\n        - type: object\n          properties:\n            foo:\n              writeOnly: true\n              type: string\n    BarRead:\n      anyOf:\n        - $ref: '#/components/schemas/Baz'\n        - $ref: '#/components/schemas/QuxAllWrite'\n        - $ref: '#/components/schemas/QuxAllRead'\n        - type: object\n          properties:\n            bar:\n              readOnly: true\n              type: string\n    BarWrite:\n      anyOf:\n        - $ref: '#/components/schemas/Baz'\n        - $ref: '#/components/schemas/QuxAllWrite'\n        - $ref: '#/components/schemas/QuxAllRead'\n        - type: object\n          properties:\n            bar:\n              writeOnly: true\n              type: string\n    Baz:\n      type: object\n      properties:\n        baz:\n          type: string\n    QuxAllWrite:\n      type: object\n      properties:\n        baz:\n          writeOnly: true\n          type: string\n    QuxAllRead:\n      type: object\n      properties:\n        baz:\n          readOnly: true\n          type: string\n    Quux:\n      type: object\n      properties:\n        baz:\n          type: array\n          items:\n            $ref: '#/components/schemas/Baz'\n        qux:\n          $ref: '#/components/schemas/QuxAllRead'\n    Corge:\n      type: object\n      properties:\n        foo:\n          type: object\n          properties:\n            baz:\n              type: boolean\n              writeOnly: true\n        bar:\n          type: object\n          properties:\n            baz:\n              type: boolean\n              readOnly: true\n    FooReadWriteRef:\n      type: object\n      properties:\n        foo:\n          $ref: '#/components/schemas/FooReadWrite'\n        bar:\n          $ref: '#/components/schemas/FooReadWriteRef'\n    FooReadWriteRef2:\n      $ref: '#/components/schemas/FooReadWrite'\n"
  },
  {
    "path": "specs/3.1.x/transforms-schemas-name.yaml",
    "content": "openapi: 3.1.0\ninfo:\n  title: Schema Name Transform Test\n  version: 1.0.0\npaths:\n  /users:\n    get:\n      summary: Get users\n      responses:\n        '200':\n          description: Success\n          content:\n            application/json:\n              schema:\n                $ref: '#/components/schemas/User_v1_0_0_User'\n  /posts:\n    post:\n      summary: Create post\n      requestBody:\n        content:\n          application/json:\n            schema:\n              $ref: '#/components/schemas/Post_v2_1_3_Post'\n      responses:\n        '201':\n          description: Created\n          content:\n            application/json:\n              schema:\n                $ref: '#/components/schemas/Post_v2_1_3_Post'\ncomponents:\n  schemas:\n    User_v1_0_0_User:\n      type: object\n      properties:\n        id:\n          type: string\n        name:\n          type: string\n        profile:\n          $ref: '#/components/schemas/UserProfile_v1_0_0_UserProfile'\n    UserProfile_v1_0_0_UserProfile:\n      type: object\n      properties:\n        bio:\n          type: string\n        avatar:\n          type: string\n    Post_v2_1_3_Post:\n      type: object\n      properties:\n        id:\n          type: string\n        title:\n          type: string\n        author:\n          $ref: '#/components/schemas/User_v1_0_0_User'\n        comments:\n          type: array\n          items:\n            $ref: '#/components/schemas/Comment_v1_5_2_Comment'\n    Comment_v1_5_2_Comment:\n      type: object\n      properties:\n        id:\n          type: string\n        text:\n          type: string\n        author:\n          $ref: '#/components/schemas/User_v1_0_0_User'\n"
  },
  {
    "path": "specs/3.1.x/type-format.yaml",
    "content": "openapi: 3.1.1\ninfo:\n  title: OpenAPI 3.1.1 type format example\n  version: 1\npaths:\n  /foo:\n    post:\n      responses:\n        '200':\n          description: OK\n          content:\n            'application/json':\n              schema:\n                $ref: '#/components/schemas/Foo'\ncomponents:\n  schemas:\n    Foo:\n      type: object\n      properties:\n        bar:\n          type: integer\n        foo:\n          default: 0\n          format: int64\n          type: integer\n        id:\n          type: string\n          format: typeid\n          example: 'user_123'\n      required:\n        - id\n        - foo\n    Bar:\n      type: object\n      required:\n        - foo\n      properties:\n        foo:\n          type: integer\n      additionalProperties:\n        type: integer\n"
  },
  {
    "path": "specs/3.1.x/type-invalid.json",
    "content": "{\n  \"openapi\": \"3.1.0\",\n  \"info\": {\n    \"title\": \"OpenAPI 3.1.0 type invalid example\",\n    \"version\": \"1\"\n  },\n  \"components\": {\n    \"schemas\": {\n      \"Foo\": {\n        \"type\": \"invalid\"\n      }\n    }\n  }\n}\n"
  },
  {
    "path": "specs/3.1.x/union-types.json",
    "content": "{\n  \"openapi\": \"3.1.0\",\n  \"info\": {\n    \"title\": \"OpenAPI 3.1.0 union types example\",\n    \"version\": \"1\"\n  },\n  \"components\": {\n    \"schemas\": {\n      \"Foo\": {\n        \"type\": \"object\",\n        \"properties\": {\n          \"bar\": {\n            \"type\": [\"number\", \"boolean\", \"string\"]\n          }\n        }\n      }\n    }\n  }\n}\n"
  },
  {
    "path": "specs/3.1.x/validators-bigint-min-max.json",
    "content": "{\n  \"openapi\": \"3.1.0\",\n  \"info\": {\n    \"title\": \"OpenAPI 3.1.0 validators bigint min max example\",\n    \"version\": \"1\"\n  },\n  \"components\": {\n    \"schemas\": {\n      \"Foo\": {\n        \"properties\": {\n          \"foo\": {\n            \"format\": \"int64\",\n            \"maximum\": 100,\n            \"minimum\": 0,\n            \"type\": \"integer\"\n          }\n        },\n        \"type\": \"object\"\n      }\n    }\n  }\n}\n"
  },
  {
    "path": "specs/3.1.x/validators-circular-ref-2.yaml",
    "content": "openapi: 3.1.1\ninfo:\n  title: OpenAPI 3.1.1 validators circular ref 2 example\n  version: 1\ncomponents:\n  schemas:\n    Foo:\n      additionalProperties: false\n      properties:\n        foo:\n          $ref: '#/components/schemas/Bar'\n      required:\n        - foo\n      type: object\n    Bar:\n      additionalProperties: false\n      properties:\n        bar:\n          items:\n            $ref: '#/components/schemas/Bar'\n          type:\n            - array\n            - 'null'\n      required:\n        - bar\n      type: object\n"
  },
  {
    "path": "specs/3.1.x/validators-circular-ref.json",
    "content": "{\n  \"openapi\": \"3.1.0\",\n  \"info\": {\n    \"title\": \"OpenAPI 3.1.0 validators circular reference example\",\n    \"version\": \"1\"\n  },\n  \"components\": {\n    \"schemas\": {\n      \"Foo\": {\n        \"properties\": {\n          \"foo\": {\n            \"$ref\": \"#/components/schemas/Bar\"\n          }\n        },\n        \"type\": \"object\"\n      },\n      \"Bar\": {\n        \"properties\": {\n          \"bar\": {\n            \"items\": {\n              \"$ref\": \"#/components/schemas/Bar\"\n            },\n            \"type\": \"array\"\n          }\n        },\n        \"type\": \"object\"\n      },\n      \"Baz\": {\n        \"$ref\": \"#/components/schemas/Qux\"\n      },\n      \"Qux\": {\n        \"description\": \"description caused circular reference error\",\n        \"$ref\": \"#/components/schemas/Baz\"\n      }\n    }\n  }\n}\n"
  },
  {
    "path": "specs/3.1.x/validators-string-constraints-union.json",
    "content": "{\n  \"openapi\": \"3.1.0\",\n  \"info\": {\n    \"title\": \"String Constraints Union Test\",\n    \"version\": \"1.0.0\"\n  },\n  \"components\": {\n    \"schemas\": {\n      \"LocaleOrLanguage\": {\n        \"anyOf\": [\n          {\n            \"type\": \"string\",\n            \"minLength\": 5,\n            \"maxLength\": 5,\n            \"description\": \"Combination of ISO 639-1 and ISO 3166-1 alpha-2 separated by a hyphen.\"\n          },\n          {\n            \"type\": \"string\",\n            \"minLength\": 2,\n            \"maxLength\": 2,\n            \"description\": \"ISO 639-1 language code.\"\n          }\n        ]\n      }\n    }\n  }\n}\n"
  },
  {
    "path": "specs/3.1.x/validators-union-merge.json",
    "content": "{\n  \"openapi\": \"3.1.0\",\n  \"info\": {\n    \"title\": \"OpenAPI 3.1.0 validators union merge example\",\n    \"version\": \"1\"\n  },\n  \"components\": {\n    \"schemas\": {\n      \"User\": {\n        \"allOf\": [\n          {\n            \"$ref\": \"#/components/schemas/Contact\"\n          },\n          {\n            \"properties\": {\n              \"username\": {\n                \"type\": \"string\"\n              }\n            },\n            \"required\": [\"username\"],\n            \"type\": \"object\"\n          }\n        ]\n      },\n      \"Contact\": {\n        \"oneOf\": [\n          {\n            \"properties\": {\n              \"email\": {\n                \"type\": \"string\"\n              }\n            },\n            \"required\": [\"email\"],\n            \"type\": \"object\"\n          },\n          {\n            \"properties\": {\n              \"phone\": {\n                \"type\": \"string\"\n              }\n            },\n            \"required\": [\"phone\"],\n            \"type\": \"object\"\n          }\n        ]\n      },\n      \"PetStore\": {\n        \"type\": \"object\",\n        \"required\": [\"animals\"],\n        \"properties\": {\n          \"animals\": {\n            \"type\": \"array\",\n            \"items\": {\n              \"type\": \"object\",\n              \"required\": [\"name\", \"details\"],\n              \"properties\": {\n                \"name\": {\n                  \"type\": \"string\"\n                },\n                \"type\": {\n                  \"type\": \"string\",\n                  \"enum\": [\"dog\", \"cat\"],\n                  \"default\": \"dog\"\n                },\n                \"details\": {\n                  \"oneOf\": [\n                    { \"$ref\": \"#/components/schemas/DogDetails\" },\n                    { \"$ref\": \"#/components/schemas/CatDetails\" }\n                  ]\n                }\n              }\n            }\n          }\n        }\n      },\n      \"DogDetails\": {\n        \"type\": \"object\",\n        \"required\": [\"breed\", \"barkVolume\"],\n        \"properties\": {\n          \"breed\": {\n            \"type\": \"string\"\n          },\n          \"barkVolume\": {\n            \"type\": \"integer\",\n            \"minimum\": 1,\n            \"maximum\": 10\n          }\n        }\n      },\n      \"CatDetails\": {\n        \"type\": \"object\",\n        \"required\": [\"furLength\", \"purrs\"],\n        \"properties\": {\n          \"furLength\": {\n            \"type\": \"string\",\n            \"enum\": [\"short\", \"medium\", \"long\"]\n          },\n          \"purrs\": {\n            \"type\": \"boolean\"\n          }\n        }\n      }\n    }\n  }\n}\n"
  },
  {
    "path": "specs/3.1.x/validators.yaml",
    "content": "openapi: 3.1.0\ninfo:\n  title: OpenAPI 3.1.0 validators example\n  version: '1'\npaths:\n  /foo:\n    patch:\n      parameters:\n        - $ref: '#/components/parameters/Foo'\n        - in: query\n          name: bar\n          required: false\n          schema:\n            $ref: '#/components/schemas/Bar'\n        - in: query\n          name: baz\n          required: false\n          schema:\n            properties:\n              baz:\n                type: string\n            type: object\n        - in: query\n          name: qux\n          required: false\n          schema:\n            format: date\n            type: string\n        - in: query\n          name: quux\n          required: false\n          schema:\n            format: date-time\n            type: string\n      requestBody:\n        content:\n          'application/json':\n            schema:\n              properties:\n                foo:\n                  type: string\n              type: object\n        required: true\n      responses:\n        '200':\n          description: OK\n    post:\n      requestBody:\n        $ref: '#/components/requestBodies/Foo'\n      responses:\n        '200':\n          description: OK\ncomponents:\n  parameters:\n    Foo:\n      description: 'This is Foo parameter.'\n      name: foo\n      in: query\n      required: false\n      schema:\n        type: string\n  requestBodies:\n    Foo:\n      required: true\n      content:\n        'application/json':\n          schema:\n            type: object\n            properties:\n              foo:\n                $ref: '#/components/schemas/Bar'\n  schemas:\n    Foo:\n      default: null\n      description: 'This is Foo schema.'\n      properties:\n        foo:\n          description: 'This is foo property.'\n          pattern: ^\\d{3}-\\d{2}-\\d{4}$\n          type: string\n        bar:\n          $ref: '#/components/schemas/Bar'\n        baz:\n          description: 'This is baz property.'\n          items:\n            $ref: '#/components/schemas/Foo'\n          type: array\n        qux:\n          description: 'This is qux property.'\n          default: 0\n          exclusiveMinimum: 0\n          type: integer\n      type:\n        - object\n        - 'null'\n    Bar:\n      description: 'This is Bar schema.'\n      properties:\n        foo:\n          $ref: '#/components/schemas/Foo'\n      type: object\n    Baz:\n      default: baz\n      pattern: foo\\nbar\n      readOnly: true\n      type: string\n    Qux:\n      additionalProperties:\n        properties:\n          qux:\n            type: string\n        type: object\n      type: object\n"
  },
  {
    "path": "specs/3.1.x/zoom-video-sdk.json",
    "content": "{\n  \"openapi\": \"3.1.0\",\n  \"info\": {\n    \"title\": \"Video SDK\",\n    \"description\": \"**Subscribe to webhook events** \\n\\nOn your [Video SDK account page on the App Marketplace](/docs/video-sdk/developer-accounts/), under **Add feature**, toggle **Event Subscriptions** to subscribe to events [using webhooks](/docs/api/rest/webhook-reference/).\\n\\n Configure webhooks to send [Video SDK events](/docs/video-sdk/webhooks/) to your server as HTTP POST requests. This is useful for tracking events or building out business logic. For example, when you receive a Video SDK session ended webhook, you could kick off an email to thank the participants for joining. \\n\\nSee [Make API requests](/docs/video-sdk/api-request/) for details or our [webhook sample code (Node.js)](https://github.com/zoom/webhook-sample).\",\n    \"version\": \"1.0.0\"\n  },\n  \"webhooks\": {\n    \"session.user_phone_callout_ringing\": {\n      \"post\": {\n        \"tags\": [\"session\"],\n        \"operationId\": \"session.user_phone_callout_ringing\",\n        \"requestBody\": {\n          \"description\": \"# session.user_phone_callout_ringing\\n\\nThe **Invited party's phone (call out) ringing** event is triggered every time a user's phone is ringing when they were invited to join a session through phone (call out). Video SDK call out operates in a similar manner as [Zoom meeting call out](https://support.zoom.com/hc/article?id=zm_kb&sysparm_article=KB0062038).\\n\\n## Prerequisites\\n\\n* **Event Subscriptions** must be enabled for your app with the following configurations:\\n  * A valid **Event Notification Endpoint URL**.\\n  * The **Invited party's phone (call out) ringing** subscription enabled under the **Session** event.\\n\\n\\n\\n\\n**Event type**: `session.user_phone_callout_ringing`\\n\",\n          \"content\": {\n            \"application/json\": {\n              \"schema\": {\n                \"type\": \"object\",\n                \"required\": [\"event\", \"event_ts\", \"payload\"],\n                \"properties\": {\n                  \"event\": {\n                    \"type\": \"string\",\n                    \"description\": \"The name of the event.\"\n                  },\n                  \"event_ts\": {\n                    \"type\": \"integer\",\n                    \"format\": \"int64\",\n                    \"description\": \"A timestamp at which the event occurred.\"\n                  },\n                  \"payload\": {\n                    \"type\": \"object\",\n                    \"required\": [\"account_id\", \"object\"],\n                    \"properties\": {\n                      \"account_id\": {\n                        \"type\": \"string\",\n                        \"description\": \"The account ID of the session host.\"\n                      },\n                      \"object\": {\n                        \"type\": \"object\",\n                        \"description\": \"Information about the session.\",\n                        \"required\": [\n                          \"session_id\",\n                          \"session_name\",\n                          \"session_key\",\n                          \"user_key\",\n                          \"host_id\",\n                          \"participant\"\n                        ],\n                        \"properties\": {\n                          \"id\": {\n                            \"type\": \"integer\",\n                            \"format\": \"int64\",\n                            \"description\": \"The session ID.\",\n                            \"deprecated\": true\n                          },\n                          \"uuid\": {\n                            \"type\": \"string\",\n                            \"description\": \"The session's universally unique identifier (UUID). Each session instance generates a session UUID.\",\n                            \"deprecated\": true\n                          },\n                          \"session_id\": {\n                            \"type\": \"string\",\n                            \"description\": \"Unique session identifier. Each instance of the session will have its own session_id.\"\n                          },\n                          \"session_name\": {\n                            \"type\": \"string\",\n                            \"description\": \"Session name.\"\n                          },\n                          \"session_key\": {\n                            \"type\": \"string\",\n                            \"description\": \"The Video SDK custom session ID.\"\n                          },\n                          \"user_key\": {\n                            \"type\": \"string\",\n                            \"description\": \"Another identifier for the inviter. Can be a number or characters.\"\n                          },\n                          \"host_id\": {\n                            \"type\": \"string\",\n                            \"description\": \"The user ID of the session host.\"\n                          },\n                          \"participant\": {\n                            \"type\": \"object\",\n                            \"description\": \"Information about the invited user.\",\n                            \"required\": [\"invitee_name\", \"phone_number\", \"from_number\"],\n                            \"properties\": {\n                              \"invitee_name\": {\n                                \"type\": \"string\",\n                                \"description\": \"The user's name to display in the session.\"\n                              },\n                              \"phone_number\": {\n                                \"type\": \"integer\",\n                                \"format\": \"int64\",\n                                \"description\": \"The user's phone number.\"\n                              },\n                              \"from_number\": {\n                                \"type\": \"integer\",\n                                \"format\": \"int64\",\n                                \"description\": \"The number used to call out to the invited user.\"\n                              }\n                            },\n                            \"additionalProperties\": false\n                          }\n                        },\n                        \"additionalProperties\": false\n                      }\n                    },\n                    \"additionalProperties\": false\n                  }\n                },\n                \"additionalProperties\": false\n              },\n              \"examples\": {\n                \"json-example\": {\n                  \"summary\": \"JSON example\",\n                  \"value\": \"{\\n  \\\"event\\\": \\\"session.user_phone_callout_ringing\\\",\\n  \\\"event_ts\\\": 1626230691572,\\n  \\\"payload\\\": {\\n    \\\"account_id\\\": \\\"dzVA4QmMQfyISoRcpFO8CA\\\",\\n    \\\"object\\\": {\\n      \\\"id\\\": 713592696,\\n      \\\"uuid\\\": \\\"4444AAAiAAAAAiAiAiiAii==\\\",\\n      \\\"session_id\\\": \\\"4444AAAiAAAAAiAiAiiAii==\\\",\\n      \\\"session_name\\\": \\\"My Session\\\",\\n      \\\"session_key\\\": \\\"ABC36jaBI145\\\",\\n      \\\"user_key\\\": \\\"ASD74dfDI854\\\",\\n      \\\"host_id\\\": \\\"ICuPoX4ERtikRcKqkVxunQ\\\",\\n      \\\"participant\\\": {\\n        \\\"invitee_name\\\": \\\"Jill Chill\\\",\\n        \\\"phone_number\\\": 15555550100,\\n        \\\"from_number\\\": 13167900000\\n      }\\n    }\\n  }\\n}\"\n                }\n              }\n            }\n          }\n        },\n        \"responses\": {\n          \"200\": {\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"type\": \"object\",\n                  \"required\": [\"event\", \"event_ts\", \"payload\"],\n                  \"properties\": {\n                    \"event\": {\n                      \"type\": \"string\",\n                      \"description\": \"The name of the event.\"\n                    },\n                    \"event_ts\": {\n                      \"type\": \"integer\",\n                      \"format\": \"int64\",\n                      \"description\": \"A timestamp at which the event occurred.\"\n                    },\n                    \"payload\": {\n                      \"type\": \"object\",\n                      \"required\": [\"account_id\", \"object\"],\n                      \"properties\": {\n                        \"account_id\": {\n                          \"type\": \"string\",\n                          \"description\": \"The account ID of the session host.\"\n                        },\n                        \"object\": {\n                          \"type\": \"object\",\n                          \"description\": \"Information about the session.\",\n                          \"required\": [\n                            \"session_id\",\n                            \"session_name\",\n                            \"session_key\",\n                            \"user_key\",\n                            \"host_id\",\n                            \"participant\"\n                          ],\n                          \"properties\": {\n                            \"id\": {\n                              \"type\": \"integer\",\n                              \"format\": \"int64\",\n                              \"description\": \"The session ID.\",\n                              \"deprecated\": true\n                            },\n                            \"uuid\": {\n                              \"type\": \"string\",\n                              \"description\": \"The session's universally unique identifier (UUID). Each session instance generates a session UUID.\",\n                              \"deprecated\": true\n                            },\n                            \"session_id\": {\n                              \"type\": \"string\",\n                              \"description\": \"Unique session identifier. Each instance of the session will have its own session_id.\"\n                            },\n                            \"session_name\": {\n                              \"type\": \"string\",\n                              \"description\": \"Session name.\"\n                            },\n                            \"session_key\": {\n                              \"type\": \"string\",\n                              \"description\": \"The Video SDK custom session ID.\"\n                            },\n                            \"user_key\": {\n                              \"type\": \"string\",\n                              \"description\": \"Another identifier for the inviter. Can be a number or characters.\"\n                            },\n                            \"host_id\": {\n                              \"type\": \"string\",\n                              \"description\": \"The user ID of the session host.\"\n                            },\n                            \"participant\": {\n                              \"type\": \"object\",\n                              \"description\": \"Information about the invited user.\",\n                              \"required\": [\"invitee_name\", \"phone_number\", \"from_number\"],\n                              \"properties\": {\n                                \"invitee_name\": {\n                                  \"type\": \"string\",\n                                  \"description\": \"The user's name to display in the session.\"\n                                },\n                                \"phone_number\": {\n                                  \"type\": \"integer\",\n                                  \"format\": \"int64\",\n                                  \"description\": \"The user's phone number.\"\n                                },\n                                \"from_number\": {\n                                  \"type\": \"integer\",\n                                  \"format\": \"int64\",\n                                  \"description\": \"The number used to call out to the invited user.\"\n                                }\n                              },\n                              \"additionalProperties\": false\n                            }\n                          },\n                          \"additionalProperties\": false\n                        }\n                      },\n                      \"additionalProperties\": false\n                    }\n                  },\n                  \"additionalProperties\": false\n                },\n                \"examples\": {\n                  \"json-example\": {\n                    \"summary\": \"JSON example\",\n                    \"value\": \"{\\n  \\\"event\\\": \\\"session.user_phone_callout_ringing\\\",\\n  \\\"event_ts\\\": 1626230691572,\\n  \\\"payload\\\": {\\n    \\\"account_id\\\": \\\"dzVA4QmMQfyISoRcpFO8CA\\\",\\n    \\\"object\\\": {\\n      \\\"id\\\": 713592696,\\n      \\\"uuid\\\": \\\"4444AAAiAAAAAiAiAiiAii==\\\",\\n      \\\"session_id\\\": \\\"4444AAAiAAAAAiAiAiiAii==\\\",\\n      \\\"session_name\\\": \\\"My Session\\\",\\n      \\\"session_key\\\": \\\"ABC36jaBI145\\\",\\n      \\\"user_key\\\": \\\"ASD74dfDI854\\\",\\n      \\\"host_id\\\": \\\"ICuPoX4ERtikRcKqkVxunQ\\\",\\n      \\\"participant\\\": {\\n        \\\"invitee_name\\\": \\\"Jill Chill\\\",\\n        \\\"phone_number\\\": 15555550100,\\n        \\\"from_number\\\": 13167900000\\n      }\\n    }\\n  }\\n}\"\n                  }\n                }\n              }\n            }\n          }\n        }\n      }\n    },\n    \"session.user_room_system_callout_ringing\": {\n      \"post\": {\n        \"tags\": [\"session\"],\n        \"operationId\": \"session.user_room_system_callout_ringing\",\n        \"requestBody\": {\n          \"description\": \"# session.user_room_system_callout_ringing\\n\\nThe **Invited party's phone (call out) ringing in Zoom room** event is triggered every time a user's phone is ringing when they were invited to [join a session through phone (call out) from a Zoom room](https://support.zoom.us/hc/en-us/articles/205369035).\\n\\n## Prerequisites\\n\\n* **Event Subscriptions** must be enabled for your app with the following configurations:\\n* A valid **Event Notification Endpoint URL**.\\n* The **Invited party's phone (call out) ringing in Zoom room** subscription enabled under the **Session** event.\\n\\n\\n\\n**Event type**: `session.user_room_system_callout_ringing`\\n\",\n          \"content\": {\n            \"application/json\": {\n              \"schema\": {\n                \"type\": \"object\",\n                \"required\": [\"event\", \"event_ts\", \"payload\"],\n                \"properties\": {\n                  \"event\": {\n                    \"type\": \"string\",\n                    \"description\": \"The name of the event.\"\n                  },\n                  \"event_ts\": {\n                    \"type\": \"integer\",\n                    \"format\": \"int64\",\n                    \"description\": \"A timestamp at which the event occurred.\"\n                  },\n                  \"payload\": {\n                    \"type\": \"object\",\n                    \"required\": [\"account_id\", \"object\"],\n                    \"properties\": {\n                      \"account_id\": {\n                        \"type\": \"string\",\n                        \"description\": \"The account ID of the session host.\"\n                      },\n                      \"object\": {\n                        \"type\": \"object\",\n                        \"description\": \"Information about the session.\",\n                        \"required\": [\n                          \"session_id\",\n                          \"session_name\",\n                          \"host_id\",\n                          \"message_id\",\n                          \"inviter_name\",\n                          \"participant\"\n                        ],\n                        \"properties\": {\n                          \"id\": {\n                            \"type\": \"integer\",\n                            \"format\": \"int64\",\n                            \"description\": \"The session ID.\",\n                            \"deprecated\": true\n                          },\n                          \"uuid\": {\n                            \"type\": \"string\",\n                            \"description\": \"The session's universally unique identifier (UUID). Each session instance generates a session UUID.\",\n                            \"deprecated\": true\n                          },\n                          \"session_id\": {\n                            \"type\": \"string\",\n                            \"description\": \"Unique session identifier. Each instance of the session will have its own session_id.\"\n                          },\n                          \"session_name\": {\n                            \"type\": \"string\",\n                            \"description\": \"Session name.\"\n                          },\n                          \"host_id\": {\n                            \"type\": \"string\",\n                            \"description\": \"The user ID of the session host.\"\n                          },\n                          \"message_id\": {\n                            \"type\": \"string\",\n                            \"description\": \"The request unique identifier (UUID).\"\n                          },\n                          \"inviter_name\": {\n                            \"type\": \"string\",\n                            \"description\": \"The user name of the event's trigger.\"\n                          },\n                          \"participant\": {\n                            \"type\": \"object\",\n                            \"description\": \"Information about the invited participant.\",\n                            \"required\": [\"call_type\", \"device_ip\"],\n                            \"properties\": {\n                              \"call_type\": {\n                                \"type\": \"string\",\n                                \"description\": \"The type of call out. Use a value of h323 or sip.\"\n                              },\n                              \"device_ip\": {\n                                \"type\": \"string\",\n                                \"description\": \"The user's device IP address.\"\n                              }\n                            },\n                            \"additionalProperties\": true\n                          }\n                        },\n                        \"additionalProperties\": false\n                      }\n                    },\n                    \"additionalProperties\": false\n                  }\n                },\n                \"additionalProperties\": false\n              },\n              \"examples\": {\n                \"json-example\": {\n                  \"summary\": \"JSON example\",\n                  \"value\": \"{\\n  \\\"event\\\": \\\"session.user_room_system_callout_ringing\\\",\\n  \\\"event_ts\\\": 1626230691572,\\n  \\\"payload\\\": {\\n    \\\"account_id\\\": \\\"dzVA4QmMQfyISoRcpFO8CA\\\",\\n    \\\"object\\\": {\\n      \\\"id\\\": 713592696,\\n      \\\"uuid\\\": \\\"4444AAAiAAAAAiAiAiiAii==\\\",\\n      \\\"session_id\\\": \\\"4444AAAiAAAAAiAiAiiAii==\\\",\\n      \\\"session_name\\\": \\\"My Session\\\",\\n      \\\"host_id\\\": \\\"ICuPoX4ERtikRcKqkVxunQ\\\",\\n      \\\"message_id\\\": \\\"atsXxhSEQWit9t+U02HXNQ==\\\",\\n      \\\"inviter_name\\\": \\\"Jill Chill\\\",\\n      \\\"participant\\\": {\\n        \\\"call_type\\\": \\\"h323\\\",\\n        \\\"device_ip\\\": \\\"10.100.111.237\\\"\\n      }\\n    }\\n  }\\n}\"\n                }\n              }\n            }\n          }\n        },\n        \"responses\": {\n          \"200\": {\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"type\": \"object\",\n                  \"required\": [\"event\", \"event_ts\", \"payload\"],\n                  \"properties\": {\n                    \"event\": {\n                      \"type\": \"string\",\n                      \"description\": \"The name of the event.\"\n                    },\n                    \"event_ts\": {\n                      \"type\": \"integer\",\n                      \"format\": \"int64\",\n                      \"description\": \"A timestamp at which the event occurred.\"\n                    },\n                    \"payload\": {\n                      \"type\": \"object\",\n                      \"required\": [\"account_id\", \"object\"],\n                      \"properties\": {\n                        \"account_id\": {\n                          \"type\": \"string\",\n                          \"description\": \"The account ID of the session host.\"\n                        },\n                        \"object\": {\n                          \"type\": \"object\",\n                          \"description\": \"Information about the session.\",\n                          \"required\": [\n                            \"session_id\",\n                            \"session_name\",\n                            \"host_id\",\n                            \"message_id\",\n                            \"inviter_name\",\n                            \"participant\"\n                          ],\n                          \"properties\": {\n                            \"id\": {\n                              \"type\": \"integer\",\n                              \"format\": \"int64\",\n                              \"description\": \"The session ID.\",\n                              \"deprecated\": true\n                            },\n                            \"uuid\": {\n                              \"type\": \"string\",\n                              \"description\": \"The session's universally unique identifier (UUID). Each session instance generates a session UUID.\",\n                              \"deprecated\": true\n                            },\n                            \"session_id\": {\n                              \"type\": \"string\",\n                              \"description\": \"Unique session identifier. Each instance of the session will have its own session_id.\"\n                            },\n                            \"session_name\": {\n                              \"type\": \"string\",\n                              \"description\": \"Session name.\"\n                            },\n                            \"host_id\": {\n                              \"type\": \"string\",\n                              \"description\": \"The user ID of the session host.\"\n                            },\n                            \"message_id\": {\n                              \"type\": \"string\",\n                              \"description\": \"The request unique identifier (UUID).\"\n                            },\n                            \"inviter_name\": {\n                              \"type\": \"string\",\n                              \"description\": \"The user name of the event's trigger.\"\n                            },\n                            \"participant\": {\n                              \"type\": \"object\",\n                              \"description\": \"Information about the invited participant.\",\n                              \"required\": [\"call_type\", \"device_ip\"],\n                              \"properties\": {\n                                \"call_type\": {\n                                  \"type\": \"string\",\n                                  \"description\": \"The type of call out. Use a value of h323 or sip.\"\n                                },\n                                \"device_ip\": {\n                                  \"type\": \"string\",\n                                  \"description\": \"The user's device IP address.\"\n                                }\n                              },\n                              \"additionalProperties\": true\n                            }\n                          },\n                          \"additionalProperties\": false\n                        }\n                      },\n                      \"additionalProperties\": false\n                    }\n                  },\n                  \"additionalProperties\": false\n                },\n                \"examples\": {\n                  \"json-example\": {\n                    \"summary\": \"JSON example\",\n                    \"value\": \"{\\n  \\\"event\\\": \\\"session.user_room_system_callout_ringing\\\",\\n  \\\"event_ts\\\": 1626230691572,\\n  \\\"payload\\\": {\\n    \\\"account_id\\\": \\\"dzVA4QmMQfyISoRcpFO8CA\\\",\\n    \\\"object\\\": {\\n      \\\"id\\\": 713592696,\\n      \\\"uuid\\\": \\\"4444AAAiAAAAAiAiAiiAii==\\\",\\n      \\\"session_id\\\": \\\"4444AAAiAAAAAiAiAiiAii==\\\",\\n      \\\"session_name\\\": \\\"My Session\\\",\\n      \\\"host_id\\\": \\\"ICuPoX4ERtikRcKqkVxunQ\\\",\\n      \\\"message_id\\\": \\\"atsXxhSEQWit9t+U02HXNQ==\\\",\\n      \\\"inviter_name\\\": \\\"Jill Chill\\\",\\n      \\\"participant\\\": {\\n        \\\"call_type\\\": \\\"h323\\\",\\n        \\\"device_ip\\\": \\\"10.100.111.237\\\"\\n      }\\n    }\\n  }\\n}\"\n                  }\n                }\n              }\n            }\n          }\n        }\n      }\n    },\n    \"session.recording_started\": {\n      \"post\": {\n        \"tags\": [\"session\"],\n        \"operationId\": \"session.recording_started\",\n        \"requestBody\": {\n          \"description\": \"# session.recording_started\\n---\\n\\nEvent: `session.recording_started`\\n\\n## Event description\\n\\nThe **Session recording started** event is triggered every time a recording is started by one of your app users or account users.\\n\\nOnly a session host or co-host can start, pause, resume, or stop a cloud recording. A recording is considered complete **after** the host or co-host ends the session. See [Enable cloud recording](https://developers.zoom.us/docs/video-sdk/account/#enable-cloud-recording) for details.\\n\\n## Prerequisites\\n\\n* Cloud Recording must be enabled on the Video SDK account.\\n* Event Subscriptions must be enabled for your app with the following configurations:\\n  * A valid Event Notification Endpoint URL.\\n  * **Session recording started** subscription enabled under the **Recording** event.\\n\\nThe tabs below display the complete schema, payload with data types, and an example of the `session.recording_started` event notification:\\n\\n\\n\\n**Event type**: `session.recording_started`\\n\",\n          \"content\": {\n            \"application/json\": {\n              \"schema\": {\n                \"type\": \"object\",\n                \"required\": [\"event\", \"event_ts\", \"payload\"],\n                \"properties\": {\n                  \"event\": {\n                    \"type\": \"string\",\n                    \"enum\": [\"session.recording_started\"],\n                    \"description\": \"The event's name.\"\n                  },\n                  \"event_ts\": {\n                    \"type\": \"integer\",\n                    \"format\": \"int64\",\n                    \"description\": \"A timestamp, in milliseconds since epoch, at which the event occurred.\"\n                  },\n                  \"payload\": {\n                    \"type\": \"object\",\n                    \"required\": [\"account_id\", \"object\"],\n                    \"properties\": {\n                      \"account_id\": {\n                        \"type\": \"string\",\n                        \"description\": \"The Video SDK account ID.\"\n                      },\n                      \"object\": {\n                        \"type\": \"object\",\n                        \"description\": \"Information about the session. This object only returns updated properties.\",\n                        \"required\": [\n                          \"session_id\",\n                          \"session_name\",\n                          \"session_key\",\n                          \"start_time\",\n                          \"timezone\",\n                          \"recording_file\"\n                        ],\n                        \"properties\": {\n                          \"session_id\": {\n                            \"type\": \"string\",\n                            \"description\": \"Unique session identifier. Each instance of the session will have its own session_id.\"\n                          },\n                          \"session_name\": {\n                            \"type\": \"string\",\n                            \"description\": \"Session name.\"\n                          },\n                          \"session_key\": {\n                            \"type\": \"string\",\n                            \"description\": \"The Video SDK custom session ID.\"\n                          },\n                          \"start_time\": {\n                            \"type\": \"string\",\n                            \"format\": \"date-time\",\n                            \"description\": \"The time at which the session started.\"\n                          },\n                          \"timezone\": {\n                            \"type\": \"string\",\n                            \"description\": \"The user's timezone.\"\n                          },\n                          \"recording_file\": {\n                            \"type\": \"object\",\n                            \"properties\": {\n                              \"recording_start\": {\n                                \"type\": \"string\",\n                                \"description\": \"The recording start time.\"\n                              },\n                              \"recording_end\": {\n                                \"type\": \"string\",\n                                \"description\": \"The recording end time. Response in general query.\"\n                              }\n                            }\n                          }\n                        },\n                        \"additionalProperties\": false\n                      }\n                    },\n                    \"additionalProperties\": false\n                  }\n                },\n                \"additionalProperties\": false\n              },\n              \"examples\": {\n                \"json-example\": {\n                  \"summary\": \"JSON example\",\n                  \"value\": \"{\\n  \\\"event\\\": \\\"session.recording_started\\\",\\n  \\\"event_ts\\\": 1626230691572,\\n  \\\"payload\\\": {\\n    \\\"account_id\\\": \\\"AAAAAABBBB\\\",\\n    \\\"object\\\": {\\n      \\\"session_id\\\": 1234567890,\\n      \\\"session_name\\\": \\\"My Personal Recording\\\",\\n      \\\"session_key\\\": \\\"ABC36jaBI145\\\",\\n      \\\"start_time\\\": \\\"2021-07-13T21:44:51Z\\\",\\n      \\\"timezone\\\": \\\"America/Los_Angeles\\\",\\n      \\\"recording_file\\\": {\\n          \\\"recording_start\\\": \\\"2021-03-23T22:14:57Z\\\",\\n          \\\"recording_end\\\": \\\"2021-03-23T23:15:41Z\\\"\\n      }\\n    }\\n  }\\n}\"\n                }\n              }\n            }\n          }\n        },\n        \"responses\": {\n          \"200\": {\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"type\": \"object\",\n                  \"required\": [\"event\", \"event_ts\", \"payload\"],\n                  \"properties\": {\n                    \"event\": {\n                      \"type\": \"string\",\n                      \"enum\": [\"session.recording_started\"],\n                      \"description\": \"The event's name.\"\n                    },\n                    \"event_ts\": {\n                      \"type\": \"integer\",\n                      \"format\": \"int64\",\n                      \"description\": \"A timestamp, in milliseconds since epoch, at which the event occurred.\"\n                    },\n                    \"payload\": {\n                      \"type\": \"object\",\n                      \"required\": [\"account_id\", \"object\"],\n                      \"properties\": {\n                        \"account_id\": {\n                          \"type\": \"string\",\n                          \"description\": \"The Video SDK account ID.\"\n                        },\n                        \"object\": {\n                          \"type\": \"object\",\n                          \"description\": \"Information about the session. This object only returns updated properties.\",\n                          \"required\": [\n                            \"session_id\",\n                            \"session_name\",\n                            \"session_key\",\n                            \"start_time\",\n                            \"timezone\",\n                            \"recording_file\"\n                          ],\n                          \"properties\": {\n                            \"session_id\": {\n                              \"type\": \"string\",\n                              \"description\": \"Unique session identifier. Each instance of the session will have its own session_id.\"\n                            },\n                            \"session_name\": {\n                              \"type\": \"string\",\n                              \"description\": \"Session name.\"\n                            },\n                            \"session_key\": {\n                              \"type\": \"string\",\n                              \"description\": \"The Video SDK custom session ID.\"\n                            },\n                            \"start_time\": {\n                              \"type\": \"string\",\n                              \"format\": \"date-time\",\n                              \"description\": \"The time at which the session started.\"\n                            },\n                            \"timezone\": {\n                              \"type\": \"string\",\n                              \"description\": \"The user's timezone.\"\n                            },\n                            \"recording_file\": {\n                              \"type\": \"object\",\n                              \"properties\": {\n                                \"recording_start\": {\n                                  \"type\": \"string\",\n                                  \"description\": \"The recording start time.\"\n                                },\n                                \"recording_end\": {\n                                  \"type\": \"string\",\n                                  \"description\": \"The recording end time. Response in general query.\"\n                                }\n                              }\n                            }\n                          },\n                          \"additionalProperties\": false\n                        }\n                      },\n                      \"additionalProperties\": false\n                    }\n                  },\n                  \"additionalProperties\": false\n                },\n                \"examples\": {\n                  \"json-example\": {\n                    \"summary\": \"JSON example\",\n                    \"value\": \"{\\n  \\\"event\\\": \\\"session.recording_started\\\",\\n  \\\"event_ts\\\": 1626230691572,\\n  \\\"payload\\\": {\\n    \\\"account_id\\\": \\\"AAAAAABBBB\\\",\\n    \\\"object\\\": {\\n      \\\"session_id\\\": 1234567890,\\n      \\\"session_name\\\": \\\"My Personal Recording\\\",\\n      \\\"session_key\\\": \\\"ABC36jaBI145\\\",\\n      \\\"start_time\\\": \\\"2021-07-13T21:44:51Z\\\",\\n      \\\"timezone\\\": \\\"America/Los_Angeles\\\",\\n      \\\"recording_file\\\": {\\n          \\\"recording_start\\\": \\\"2021-03-23T22:14:57Z\\\",\\n          \\\"recording_end\\\": \\\"2021-03-23T23:15:41Z\\\"\\n      }\\n    }\\n  }\\n}\"\n                  }\n                }\n              }\n            }\n          }\n        }\n      }\n    },\n    \"session.recording_resumed\": {\n      \"post\": {\n        \"tags\": [\"session\"],\n        \"operationId\": \"session.recording_resumed\",\n        \"requestBody\": {\n          \"description\": \"# session.recording_resumed\\n---\\n\\nEvent: `session.recording_resumed`\\n\\n## Event description\\n\\nThe **Session recording resumed** event is triggered every time a previously paused recording of a session is resumed.\\n\\nOnly a session host or co-host can start, pause, resume, or stop a cloud recording. A recording is considered complete **after** the host or co-host ends the session. See [Enable cloud recording](https://developers.zoom.us/docs/video-sdk/account/#enable-cloud-recording) for details.\\n\\n## Prerequisites\\n\\n* Cloud Recording must be enabled on the Video SDK account.\\n* Event Subscriptions must be enabled for your app with the following configurations:\\n  * A valid Event Notification Endpoint URL.\\n  * **Session recording resumed** subscription enabled under the **Recording** event.\\n\\nThe tabs below display the complete schema, payload with data types, and an example of the `session.recording_resumed` event notification:\\n\\n\\n\\n**Event type**: `session.recording_resumed`\\n\",\n          \"content\": {\n            \"application/json\": {\n              \"schema\": {\n                \"type\": \"object\",\n                \"required\": [\"event\", \"event_ts\", \"payload\"],\n                \"properties\": {\n                  \"event\": {\n                    \"type\": \"string\",\n                    \"enum\": [\"session.recording_resumed\"],\n                    \"description\": \"The event's name.\"\n                  },\n                  \"event_ts\": {\n                    \"type\": \"integer\",\n                    \"format\": \"int64\",\n                    \"description\": \"A timestamp, in milliseconds since epoch, at which the event occurred.\"\n                  },\n                  \"payload\": {\n                    \"type\": \"object\",\n                    \"required\": [\"account_id\", \"object\"],\n                    \"properties\": {\n                      \"account_id\": {\n                        \"type\": \"string\",\n                        \"description\": \"The Video SDK account ID.\"\n                      },\n                      \"object\": {\n                        \"type\": \"object\",\n                        \"description\": \"Information about the session. This object only returns updated properties.\",\n                        \"required\": [\n                          \"session_id\",\n                          \"session_name\",\n                          \"session_key\",\n                          \"start_time\",\n                          \"timezone\",\n                          \"recording_file\"\n                        ],\n                        \"properties\": {\n                          \"session_id\": {\n                            \"type\": \"string\",\n                            \"description\": \"Unique session identifier. Each instance of the session will have its own session_id.\"\n                          },\n                          \"session_name\": {\n                            \"type\": \"string\",\n                            \"description\": \"Session name.\"\n                          },\n                          \"session_key\": {\n                            \"type\": \"string\",\n                            \"description\": \"The Video SDK custom session ID.\"\n                          },\n                          \"start_time\": {\n                            \"type\": \"string\",\n                            \"format\": \"date-time\",\n                            \"description\": \"The time at which the session started.\"\n                          },\n                          \"timezone\": {\n                            \"type\": \"string\",\n                            \"description\": \"The user's timezone.\"\n                          },\n                          \"recording_file\": {\n                            \"type\": \"object\",\n                            \"properties\": {\n                              \"recording_start\": {\n                                \"type\": \"string\",\n                                \"description\": \"The recording start time.\"\n                              },\n                              \"recording_end\": {\n                                \"type\": \"string\",\n                                \"description\": \"The recording end time. Response in general query.\"\n                              }\n                            }\n                          }\n                        },\n                        \"additionalProperties\": false\n                      }\n                    },\n                    \"additionalProperties\": false\n                  }\n                },\n                \"additionalProperties\": false\n              },\n              \"examples\": {\n                \"json-example\": {\n                  \"summary\": \"JSON example\",\n                  \"value\": \"{\\n  \\\"event\\\": \\\"session.recording_resumed\\\",\\n  \\\"event_ts\\\": 1626230691572,\\n  \\\"payload\\\": {\\n    \\\"account_id\\\": \\\"AAAAAABBBB\\\",\\n    \\\"object\\\": {\\n      \\\"session_id\\\": 1234567890,\\n      \\\"session_name\\\": \\\"My Personal Recording\\\",\\n      \\\"session_key\\\": \\\"ABC36jaBI145\\\",\\n      \\\"start_time\\\": \\\"2021-07-13T21:44:51Z\\\",\\n      \\\"timezone\\\": \\\"America/Los_Angeles\\\",\\n      \\\"recording_file\\\": {\\n          \\\"recording_start\\\": \\\"2021-03-23T22:14:57Z\\\",\\n          \\\"recording_end\\\": \\\"2021-03-23T23:15:41Z\\\"\\n      }\\n    }\\n  }\\n}\"\n                }\n              }\n            }\n          }\n        },\n        \"responses\": {\n          \"200\": {\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"type\": \"object\",\n                  \"required\": [\"event\", \"event_ts\", \"payload\"],\n                  \"properties\": {\n                    \"event\": {\n                      \"type\": \"string\",\n                      \"enum\": [\"session.recording_resumed\"],\n                      \"description\": \"The event's name.\"\n                    },\n                    \"event_ts\": {\n                      \"type\": \"integer\",\n                      \"format\": \"int64\",\n                      \"description\": \"A timestamp, in milliseconds since epoch, at which the event occurred.\"\n                    },\n                    \"payload\": {\n                      \"type\": \"object\",\n                      \"required\": [\"account_id\", \"object\"],\n                      \"properties\": {\n                        \"account_id\": {\n                          \"type\": \"string\",\n                          \"description\": \"The Video SDK account ID.\"\n                        },\n                        \"object\": {\n                          \"type\": \"object\",\n                          \"description\": \"Information about the session. This object only returns updated properties.\",\n                          \"required\": [\n                            \"session_id\",\n                            \"session_name\",\n                            \"session_key\",\n                            \"start_time\",\n                            \"timezone\",\n                            \"recording_file\"\n                          ],\n                          \"properties\": {\n                            \"session_id\": {\n                              \"type\": \"string\",\n                              \"description\": \"Unique session identifier. Each instance of the session will have its own session_id.\"\n                            },\n                            \"session_name\": {\n                              \"type\": \"string\",\n                              \"description\": \"Session name.\"\n                            },\n                            \"session_key\": {\n                              \"type\": \"string\",\n                              \"description\": \"The Video SDK custom session ID.\"\n                            },\n                            \"start_time\": {\n                              \"type\": \"string\",\n                              \"format\": \"date-time\",\n                              \"description\": \"The time at which the session started.\"\n                            },\n                            \"timezone\": {\n                              \"type\": \"string\",\n                              \"description\": \"The user's timezone.\"\n                            },\n                            \"recording_file\": {\n                              \"type\": \"object\",\n                              \"properties\": {\n                                \"recording_start\": {\n                                  \"type\": \"string\",\n                                  \"description\": \"The recording start time.\"\n                                },\n                                \"recording_end\": {\n                                  \"type\": \"string\",\n                                  \"description\": \"The recording end time. Response in general query.\"\n                                }\n                              }\n                            }\n                          },\n                          \"additionalProperties\": false\n                        }\n                      },\n                      \"additionalProperties\": false\n                    }\n                  },\n                  \"additionalProperties\": false\n                },\n                \"examples\": {\n                  \"json-example\": {\n                    \"summary\": \"JSON example\",\n                    \"value\": \"{\\n  \\\"event\\\": \\\"session.recording_resumed\\\",\\n  \\\"event_ts\\\": 1626230691572,\\n  \\\"payload\\\": {\\n    \\\"account_id\\\": \\\"AAAAAABBBB\\\",\\n    \\\"object\\\": {\\n      \\\"session_id\\\": 1234567890,\\n      \\\"session_name\\\": \\\"My Personal Recording\\\",\\n      \\\"session_key\\\": \\\"ABC36jaBI145\\\",\\n      \\\"start_time\\\": \\\"2021-07-13T21:44:51Z\\\",\\n      \\\"timezone\\\": \\\"America/Los_Angeles\\\",\\n      \\\"recording_file\\\": {\\n          \\\"recording_start\\\": \\\"2021-03-23T22:14:57Z\\\",\\n          \\\"recording_end\\\": \\\"2021-03-23T23:15:41Z\\\"\\n      }\\n    }\\n  }\\n}\"\n                  }\n                }\n              }\n            }\n          }\n        }\n      }\n    },\n    \"session.live_streaming_stopped\": {\n      \"post\": {\n        \"tags\": [\"session\"],\n        \"operationId\": \"session.live_streaming_stopped\",\n        \"requestBody\": {\n          \"description\": \"# session.live_streaming_stopped\\n---\\n\\n\\nThe Session Live Streaming Stopped event is triggered every time a user stops a live stream.\\n\\n## Prerequisites\\nEvent Subscriptions must be enabled for your app with the following configurations:\\n\\n* A valid Event Notification Endpoint URL.\\n* **Session Live Streaming Stopped** subscription enabled under the **Video SDK** event.\\n\\nThe tabs below display the complete schema, payload with data types, and an example of the `session.live_streaming_stopped` event notification:\\n\\n\\n\\n**Event type**: `session.live_streaming_stopped`\\n\",\n          \"content\": {\n            \"application/json\": {\n              \"schema\": {\n                \"type\": \"object\",\n                \"required\": [\"event\", \"event_ts\", \"payload\"],\n                \"properties\": {\n                  \"event\": {\n                    \"type\": \"string\",\n                    \"enum\": [\"session.live_streaming_stopped\"],\n                    \"description\": \"The name of the event.\"\n                  },\n                  \"event_ts\": {\n                    \"type\": \"integer\",\n                    \"format\": \"int64\",\n                    \"description\": \"Timestamp (in milliseconds since epoch) at which the event occurred. The value of this field is returned in long(int64) format.\"\n                  },\n                  \"payload\": {\n                    \"type\": \"object\",\n                    \"required\": [\"account_id\", \"object\"],\n                    \"properties\": {\n                      \"account_id\": {\n                        \"type\": \"string\",\n                        \"description\": \"The Video SDK account ID.\"\n                      },\n                      \"object\": {\n                        \"type\": \"object\",\n                        \"description\": \"Information about the session.\",\n                        \"required\": [\n                          \"id\",\n                          \"session_id\",\n                          \"session_name\",\n                          \"start_time\",\n                          \"live_streaming\"\n                        ],\n                        \"properties\": {\n                          \"id\": {\n                            \"type\": \"string\",\n                            \"description\": \"The session ID.\",\n                            \"deprecated\": true\n                          },\n                          \"session_id\": {\n                            \"type\": \"string\",\n                            \"description\": \"Unique session identifier. Each instance of the session will have its own session_id.\"\n                          },\n                          \"session_name\": {\n                            \"type\": \"string\",\n                            \"description\": \"Session name.\"\n                          },\n                          \"session_key\": {\n                            \"type\": \"string\",\n                            \"description\": \"The Video SDK custom session ID.\"\n                          },\n                          \"start_time\": {\n                            \"type\": \"string\",\n                            \"description\": \"The session's start time.\",\n                            \"format\": \"date-time\"\n                          },\n                          \"live_streaming\": {\n                            \"type\": \"object\",\n                            \"description\": \"Information about the participant.\",\n                            \"required\": [\"service\", \"custom_live_streaming_settings\", \"date_time\"],\n                            \"properties\": {\n                              \"service\": {\n                                \"type\": \"string\",\n                                \"description\": \"The name of the Live Streaming service.\",\n                                \"enum\": [\n                                  \"Facebook\",\n                                  \"Workplace_by_Facebook\",\n                                  \"YouTube\",\n                                  \"Custom_Live_Streaming_Service\"\n                                ]\n                              },\n                              \"custom_live_streaming_settings\": {\n                                \"type\": \"object\",\n                                \"description\": \"The live stream settings.\",\n                                \"required\": [\"stream_url\", \"stream_key\", \"page_url\"],\n                                \"properties\": {\n                                  \"stream_url\": {\n                                    \"type\": \"string\",\n                                    \"description\": \"The stream's URL.\"\n                                  },\n                                  \"stream_key\": {\n                                    \"type\": \"string\",\n                                    \"description\": \"The stream's Key.\"\n                                  },\n                                  \"page_url\": {\n                                    \"type\": \"string\",\n                                    \"description\": \"The live stream's page URL.\"\n                                  },\n                                  \"resolution\": {\n                                    \"type\": \"string\",\n                                    \"description\": \"The number of pixels in each dimension that the video camera can display.\"\n                                  }\n                                }\n                              },\n                              \"date_time\": {\n                                \"type\": \"string\",\n                                \"description\": \"The live stream's stop time.\",\n                                \"format\": \"date-time\"\n                              }\n                            }\n                          }\n                        },\n                        \"additionalProperties\": false\n                      }\n                    },\n                    \"additionalProperties\": false\n                  }\n                },\n                \"additionalProperties\": false\n              },\n              \"examples\": {\n                \"json-example\": {\n                  \"summary\": \"JSON example\",\n                  \"value\": \"{\\n  \\\"event\\\": \\\"session.live_streaming_stopped\\\",\\n  \\\"event_ts\\\": 1627906965803,\\n  \\\"payload\\\": {\\n    \\\"account_id\\\": \\\"D8cJuqWVQ623CI4Q8yQK0Q\\\",\\n    \\\"object\\\": {\\n      \\\"id\\\": \\\"BrgGrWeZSwaXkLBTpvmmvg==\\\",\\n      \\\"session_id\\\": \\\"4567UVWxYZABCdEfGhiJkl==\\\",\\n      \\\"session_name\\\": \\\"My Session\\\",\\n      \\\"session_key\\\": \\\"ABC36jaBI145\\\",\\n      \\\"start_time\\\": \\\"2021-08-02T12:03:32Z\\\",\\n      \\\"live_streaming\\\": {\\n        \\\"service\\\": \\\"Custom_Live_Streaming_Service\\\",\\n        \\\"custom_live_streaming_settings\\\": {\\n          \\\"stream_url\\\": \\\"https://example.com/livestream\\\",\\n          \\\"stream_key\\\": \\\"ABCDEFG12345HIJ6789\\\",\\n          \\\"page_url\\\": \\\"https://example.com/livestream/123\\\",\\n\\t\\t  \\\"resolution\\\": \\\"1080p\\\"\\n        },\\n        \\\"date_time\\\": \\\"2021-08-02T12:22:45Z\\\"\\n      }\\n    }\\n  }\\n}\"\n                }\n              }\n            }\n          }\n        },\n        \"responses\": {\n          \"200\": {\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"type\": \"object\",\n                  \"required\": [\"event\", \"event_ts\", \"payload\"],\n                  \"properties\": {\n                    \"event\": {\n                      \"type\": \"string\",\n                      \"enum\": [\"session.live_streaming_stopped\"],\n                      \"description\": \"The name of the event.\"\n                    },\n                    \"event_ts\": {\n                      \"type\": \"integer\",\n                      \"format\": \"int64\",\n                      \"description\": \"Timestamp (in milliseconds since epoch) at which the event occurred. The value of this field is returned in long(int64) format.\"\n                    },\n                    \"payload\": {\n                      \"type\": \"object\",\n                      \"required\": [\"account_id\", \"object\"],\n                      \"properties\": {\n                        \"account_id\": {\n                          \"type\": \"string\",\n                          \"description\": \"The Video SDK account ID.\"\n                        },\n                        \"object\": {\n                          \"type\": \"object\",\n                          \"description\": \"Information about the session.\",\n                          \"required\": [\n                            \"id\",\n                            \"session_id\",\n                            \"session_name\",\n                            \"start_time\",\n                            \"live_streaming\"\n                          ],\n                          \"properties\": {\n                            \"id\": {\n                              \"type\": \"string\",\n                              \"description\": \"The session ID.\",\n                              \"deprecated\": true\n                            },\n                            \"session_id\": {\n                              \"type\": \"string\",\n                              \"description\": \"Unique session identifier. Each instance of the session will have its own session_id.\"\n                            },\n                            \"session_name\": {\n                              \"type\": \"string\",\n                              \"description\": \"Session name.\"\n                            },\n                            \"session_key\": {\n                              \"type\": \"string\",\n                              \"description\": \"The Video SDK custom session ID.\"\n                            },\n                            \"start_time\": {\n                              \"type\": \"string\",\n                              \"description\": \"The session's start time.\",\n                              \"format\": \"date-time\"\n                            },\n                            \"live_streaming\": {\n                              \"type\": \"object\",\n                              \"description\": \"Information about the participant.\",\n                              \"required\": [\n                                \"service\",\n                                \"custom_live_streaming_settings\",\n                                \"date_time\"\n                              ],\n                              \"properties\": {\n                                \"service\": {\n                                  \"type\": \"string\",\n                                  \"description\": \"The name of the Live Streaming service.\",\n                                  \"enum\": [\n                                    \"Facebook\",\n                                    \"Workplace_by_Facebook\",\n                                    \"YouTube\",\n                                    \"Custom_Live_Streaming_Service\"\n                                  ]\n                                },\n                                \"custom_live_streaming_settings\": {\n                                  \"type\": \"object\",\n                                  \"description\": \"The live stream settings.\",\n                                  \"required\": [\"stream_url\", \"stream_key\", \"page_url\"],\n                                  \"properties\": {\n                                    \"stream_url\": {\n                                      \"type\": \"string\",\n                                      \"description\": \"The stream's URL.\"\n                                    },\n                                    \"stream_key\": {\n                                      \"type\": \"string\",\n                                      \"description\": \"The stream's Key.\"\n                                    },\n                                    \"page_url\": {\n                                      \"type\": \"string\",\n                                      \"description\": \"The live stream's page URL.\"\n                                    },\n                                    \"resolution\": {\n                                      \"type\": \"string\",\n                                      \"description\": \"The number of pixels in each dimension that the video camera can display.\"\n                                    }\n                                  }\n                                },\n                                \"date_time\": {\n                                  \"type\": \"string\",\n                                  \"description\": \"The live stream's stop time.\",\n                                  \"format\": \"date-time\"\n                                }\n                              }\n                            }\n                          },\n                          \"additionalProperties\": false\n                        }\n                      },\n                      \"additionalProperties\": false\n                    }\n                  },\n                  \"additionalProperties\": false\n                },\n                \"examples\": {\n                  \"json-example\": {\n                    \"summary\": \"JSON example\",\n                    \"value\": \"{\\n  \\\"event\\\": \\\"session.live_streaming_stopped\\\",\\n  \\\"event_ts\\\": 1627906965803,\\n  \\\"payload\\\": {\\n    \\\"account_id\\\": \\\"D8cJuqWVQ623CI4Q8yQK0Q\\\",\\n    \\\"object\\\": {\\n      \\\"id\\\": \\\"BrgGrWeZSwaXkLBTpvmmvg==\\\",\\n      \\\"session_id\\\": \\\"4567UVWxYZABCdEfGhiJkl==\\\",\\n      \\\"session_name\\\": \\\"My Session\\\",\\n      \\\"session_key\\\": \\\"ABC36jaBI145\\\",\\n      \\\"start_time\\\": \\\"2021-08-02T12:03:32Z\\\",\\n      \\\"live_streaming\\\": {\\n        \\\"service\\\": \\\"Custom_Live_Streaming_Service\\\",\\n        \\\"custom_live_streaming_settings\\\": {\\n          \\\"stream_url\\\": \\\"https://example.com/livestream\\\",\\n          \\\"stream_key\\\": \\\"ABCDEFG12345HIJ6789\\\",\\n          \\\"page_url\\\": \\\"https://example.com/livestream/123\\\",\\n\\t\\t  \\\"resolution\\\": \\\"1080p\\\"\\n        },\\n        \\\"date_time\\\": \\\"2021-08-02T12:22:45Z\\\"\\n      }\\n    }\\n  }\\n}\"\n                  }\n                }\n              }\n            }\n          }\n        }\n      }\n    },\n    \"session.stream_ingestion_stopped\": {\n      \"post\": {\n        \"tags\": [\"session\"],\n        \"operationId\": \"session.stream_ingestion_stopped\",\n        \"requestBody\": {\n          \"description\": \"# session.stream_ingestion_stopped\\nZoom triggers the **Session stream ingestion stopped** event every time a user stops sending live incoming streams.\\n\\n## Prerequisites\\n\\n* **Event Subscriptions** must be enabled for your app with the following configurations:\\n  * A valid **Event Notification Endpoint URL**.\\n  * The **Session stream ingestion stopped** subscription enabled under the **Video SDK** event.\\n\\n\\n**Event type**: `session.stream_ingestion_stopped`\\n\",\n          \"content\": {\n            \"application/json\": {\n              \"schema\": {\n                \"type\": \"object\",\n                \"required\": [\"event\", \"event_ts\", \"payload\"],\n                \"properties\": {\n                  \"event\": {\n                    \"type\": \"string\",\n                    \"enum\": [\"session.stream_ingestion_stopped\"],\n                    \"description\": \"Event name.\"\n                  },\n                  \"event_ts\": {\n                    \"type\": \"integer\",\n                    \"format\": \"int64\",\n                    \"description\": \"Timestamp (in milliseconds since epoch) when the event occurred. The value of this field is returned in long (int64) format.\"\n                  },\n                  \"payload\": {\n                    \"type\": \"object\",\n                    \"required\": [\"account_id\", \"object\"],\n                    \"properties\": {\n                      \"account_id\": {\n                        \"type\": \"string\",\n                        \"description\": \"The Video SDK account ID.\"\n                      },\n                      \"object\": {\n                        \"type\": \"object\",\n                        \"description\": \"Information about the session.\",\n                        \"required\": [\"session_id\", \"session_name\", \"stream_ingestion\"],\n                        \"properties\": {\n                          \"session_id\": {\n                            \"type\": \"string\",\n                            \"description\": \"Unique session identifier. Each instance of the session will have its own session_id.\"\n                          },\n                          \"session_name\": {\n                            \"type\": \"string\",\n                            \"description\": \"Session name.\"\n                          },\n                          \"session_key\": {\n                            \"type\": \"string\",\n                            \"description\": \"The Video SDK custom session ID.\"\n                          },\n                          \"stream_ingestion\": {\n                            \"type\": \"object\",\n                            \"description\": \"Information about the stream ingestion.\",\n                            \"required\": [\n                              \"stream_id\",\n                              \"stream_name\",\n                              \"stream_key\",\n                              \"stream_url\",\n                              \"backup_stream_url\"\n                            ],\n                            \"properties\": {\n                              \"stream_id\": {\n                                \"type\": \"string\",\n                                \"description\": \"The stream ingestion ID.\"\n                              },\n                              \"stream_name\": {\n                                \"type\": \"string\",\n                                \"description\": \"The stream ingestion name.\"\n                              },\n                              \"stream_description\": {\n                                \"type\": \"string\",\n                                \"description\": \"The stream ingestion description.\"\n                              },\n                              \"stream_key\": {\n                                \"type\": \"string\",\n                                \"description\": \"The stream ingestion key.\"\n                              },\n                              \"stream_url\": {\n                                \"type\": \"string\",\n                                \"description\": \"The stream URL.\"\n                              },\n                              \"backup_stream_url\": {\n                                \"type\": \"string\",\n                                \"description\": \"The backup stream URL.\"\n                              }\n                            }\n                          }\n                        },\n                        \"additionalProperties\": false\n                      }\n                    },\n                    \"additionalProperties\": false\n                  }\n                },\n                \"additionalProperties\": false\n              },\n              \"examples\": {\n                \"json-example\": {\n                  \"summary\": \"JSON example\",\n                  \"value\": \"{\\n  \\\"event\\\": \\\"session.stream_ingestion_stopped\\\",\\n  \\\"event_ts\\\": 1627906965803,\\n  \\\"payload\\\": {\\n    \\\"account_id\\\": \\\"D8cJuqWVQ623CI4Q8yQK0Q\\\",\\n    \\\"object\\\": {\\n      \\\"session_id\\\": \\\"4567UVWxYZABCdEfGhiJkl==\\\",\\n      \\\"session_name\\\": \\\"My Session\\\",\\n      \\\"session_key\\\": \\\"ABC36jaBI145\\\",\\n      \\\"stream_ingestion\\\": {\\n        \\\"stream_id\\\": \\\"sfk/aOFJSJSYhGwk1hnxgw==\\\",\\n        \\\"stream_name\\\": \\\"stream ingestion1\\\",\\n        \\\"stream_description\\\": \\\"stream ingestion1\\\",\\n        \\\"stream_key\\\": \\\"ABCDEFG12345HIJ6789\\\",\\n        \\\"stream_url\\\": \\\"rtmp://a.rtmp.zoomevent.com/live1\\\",\\n        \\\"backup_stream_url\\\": \\\"rtmp://a.rtmp.zoomevent.com/live1\\\"\\n      }\\n    }\\n  }\\n}\"\n                }\n              }\n            }\n          }\n        },\n        \"responses\": {\n          \"200\": {\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"type\": \"object\",\n                  \"required\": [\"event\", \"event_ts\", \"payload\"],\n                  \"properties\": {\n                    \"event\": {\n                      \"type\": \"string\",\n                      \"enum\": [\"session.stream_ingestion_stopped\"],\n                      \"description\": \"Event name.\"\n                    },\n                    \"event_ts\": {\n                      \"type\": \"integer\",\n                      \"format\": \"int64\",\n                      \"description\": \"Timestamp (in milliseconds since epoch) when the event occurred. The value of this field is returned in long (int64) format.\"\n                    },\n                    \"payload\": {\n                      \"type\": \"object\",\n                      \"required\": [\"account_id\", \"object\"],\n                      \"properties\": {\n                        \"account_id\": {\n                          \"type\": \"string\",\n                          \"description\": \"The Video SDK account ID.\"\n                        },\n                        \"object\": {\n                          \"type\": \"object\",\n                          \"description\": \"Information about the session.\",\n                          \"required\": [\"session_id\", \"session_name\", \"stream_ingestion\"],\n                          \"properties\": {\n                            \"session_id\": {\n                              \"type\": \"string\",\n                              \"description\": \"Unique session identifier. Each instance of the session will have its own session_id.\"\n                            },\n                            \"session_name\": {\n                              \"type\": \"string\",\n                              \"description\": \"Session name.\"\n                            },\n                            \"session_key\": {\n                              \"type\": \"string\",\n                              \"description\": \"The Video SDK custom session ID.\"\n                            },\n                            \"stream_ingestion\": {\n                              \"type\": \"object\",\n                              \"description\": \"Information about the stream ingestion.\",\n                              \"required\": [\n                                \"stream_id\",\n                                \"stream_name\",\n                                \"stream_key\",\n                                \"stream_url\",\n                                \"backup_stream_url\"\n                              ],\n                              \"properties\": {\n                                \"stream_id\": {\n                                  \"type\": \"string\",\n                                  \"description\": \"The stream ingestion ID.\"\n                                },\n                                \"stream_name\": {\n                                  \"type\": \"string\",\n                                  \"description\": \"The stream ingestion name.\"\n                                },\n                                \"stream_description\": {\n                                  \"type\": \"string\",\n                                  \"description\": \"The stream ingestion description.\"\n                                },\n                                \"stream_key\": {\n                                  \"type\": \"string\",\n                                  \"description\": \"The stream ingestion key.\"\n                                },\n                                \"stream_url\": {\n                                  \"type\": \"string\",\n                                  \"description\": \"The stream URL.\"\n                                },\n                                \"backup_stream_url\": {\n                                  \"type\": \"string\",\n                                  \"description\": \"The backup stream URL.\"\n                                }\n                              }\n                            }\n                          },\n                          \"additionalProperties\": false\n                        }\n                      },\n                      \"additionalProperties\": false\n                    }\n                  },\n                  \"additionalProperties\": false\n                },\n                \"examples\": {\n                  \"json-example\": {\n                    \"summary\": \"JSON example\",\n                    \"value\": \"{\\n  \\\"event\\\": \\\"session.stream_ingestion_stopped\\\",\\n  \\\"event_ts\\\": 1627906965803,\\n  \\\"payload\\\": {\\n    \\\"account_id\\\": \\\"D8cJuqWVQ623CI4Q8yQK0Q\\\",\\n    \\\"object\\\": {\\n      \\\"session_id\\\": \\\"4567UVWxYZABCdEfGhiJkl==\\\",\\n      \\\"session_name\\\": \\\"My Session\\\",\\n      \\\"session_key\\\": \\\"ABC36jaBI145\\\",\\n      \\\"stream_ingestion\\\": {\\n        \\\"stream_id\\\": \\\"sfk/aOFJSJSYhGwk1hnxgw==\\\",\\n        \\\"stream_name\\\": \\\"stream ingestion1\\\",\\n        \\\"stream_description\\\": \\\"stream ingestion1\\\",\\n        \\\"stream_key\\\": \\\"ABCDEFG12345HIJ6789\\\",\\n        \\\"stream_url\\\": \\\"rtmp://a.rtmp.zoomevent.com/live1\\\",\\n        \\\"backup_stream_url\\\": \\\"rtmp://a.rtmp.zoomevent.com/live1\\\"\\n      }\\n    }\\n  }\\n}\"\n                  }\n                }\n              }\n            }\n          }\n        }\n      }\n    },\n    \"session.user_room_system_callout_rejected\": {\n      \"post\": {\n        \"tags\": [\"session\"],\n        \"operationId\": \"session.user_room_system_callout_rejected\",\n        \"requestBody\": {\n          \"description\": \"# session.user_room_system_callout_rejected\\n\\nThe **Invited party rejected a session invitation through phone (call out) via Zoom room** event is triggered every time a user rejects an invitation to [join a session through phone (call out) from a Zoom room](https://support.zoom.us/hc/en-us/articles/205369035).\\n\\n## Prerequisites\\n\\n* **Event Subscriptions** must be enabled for your app with the following configurations:\\n* A valid **Event Notification Endpoint URL**.\\n* The **Invited party rejected a session invitation through phone (call out) via Zoom room** subscription enabled under the **Session** event.\\n\\n\\n\\n**Event type**: `session.user_room_system_callout_rejected`\\n\",\n          \"content\": {\n            \"application/json\": {\n              \"schema\": {\n                \"type\": \"object\",\n                \"required\": [\"event\", \"event_ts\", \"payload\"],\n                \"properties\": {\n                  \"event\": {\n                    \"type\": \"string\",\n                    \"description\": \"The name of the event.\"\n                  },\n                  \"event_ts\": {\n                    \"type\": \"integer\",\n                    \"format\": \"int64\",\n                    \"description\": \"A timestamp at which the event occurred.\"\n                  },\n                  \"payload\": {\n                    \"type\": \"object\",\n                    \"required\": [\"account_id\", \"object\"],\n                    \"properties\": {\n                      \"account_id\": {\n                        \"type\": \"string\",\n                        \"description\": \"The account ID of the session host.\"\n                      },\n                      \"object\": {\n                        \"type\": \"object\",\n                        \"description\": \"Information about the session.\",\n                        \"required\": [\n                          \"session_id\",\n                          \"session_name\",\n                          \"host_id\",\n                          \"message_id\",\n                          \"inviter_name\",\n                          \"participant\"\n                        ],\n                        \"properties\": {\n                          \"id\": {\n                            \"type\": \"integer\",\n                            \"format\": \"int64\",\n                            \"description\": \"The session ID.\",\n                            \"deprecated\": true\n                          },\n                          \"uuid\": {\n                            \"type\": \"string\",\n                            \"description\": \"The session's universally unique identifier (UUID). Each session instance generates a session UUID.\",\n                            \"deprecated\": true\n                          },\n                          \"session_id\": {\n                            \"type\": \"string\",\n                            \"description\": \"Unique session identifier. Each instance of the session will have its own session_id.\"\n                          },\n                          \"session_name\": {\n                            \"type\": \"string\",\n                            \"description\": \"Session name.\"\n                          },\n                          \"host_id\": {\n                            \"type\": \"string\",\n                            \"description\": \"The user ID of the session host.\"\n                          },\n                          \"message_id\": {\n                            \"type\": \"string\",\n                            \"description\": \"The request unique identifier (UUID).\"\n                          },\n                          \"inviter_name\": {\n                            \"type\": \"string\",\n                            \"description\": \"The user name of the event's trigger.\"\n                          },\n                          \"participant\": {\n                            \"type\": \"object\",\n                            \"description\": \"Information about the invited participant.\",\n                            \"required\": [\"call_type\", \"device_ip\"],\n                            \"properties\": {\n                              \"call_type\": {\n                                \"type\": \"string\",\n                                \"description\": \"The type of call out. Use a value of h323 or sip.\"\n                              },\n                              \"device_ip\": {\n                                \"type\": \"string\",\n                                \"description\": \"The user's device IP address.\"\n                              }\n                            },\n                            \"additionalProperties\": true\n                          }\n                        },\n                        \"additionalProperties\": false\n                      }\n                    },\n                    \"additionalProperties\": false\n                  }\n                },\n                \"additionalProperties\": false\n              },\n              \"examples\": {\n                \"json-example\": {\n                  \"summary\": \"JSON example\",\n                  \"value\": \"{\\n  \\\"event\\\": \\\"session.user_room_system_callout_rejected\\\",\\n  \\\"event_ts\\\": 1626230691572,\\n  \\\"payload\\\": {\\n    \\\"account_id\\\": \\\"dzVA4QmMQfyISoRcpFO8CA\\\",\\n    \\\"object\\\": {\\n      \\\"id\\\": 713592696,\\n      \\\"uuid\\\": \\\"4444AAAiAAAAAiAiAiiAii==\\\",\\n      \\\"session_id\\\": \\\"4444AAAiAAAAAiAiAiiAii==\\\",\\n      \\\"session_name\\\": \\\"My Session\\\",\\n      \\\"host_id\\\": \\\"ICuPoX4ERtikRcKqkVxunQ\\\",\\n      \\\"message_id\\\": \\\"atsXxhSEQWit9t+U02HXNQ==\\\",\\n      \\\"inviter_name\\\": \\\"Jill Chill\\\",\\n      \\\"participant\\\": {\\n        \\\"call_type\\\": \\\"h323\\\",\\n        \\\"device_ip\\\": \\\"10.100.111.237\\\"\\n      }\\n    }\\n  }\\n}\"\n                }\n              }\n            }\n          }\n        },\n        \"responses\": {\n          \"200\": {\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"type\": \"object\",\n                  \"required\": [\"event\", \"event_ts\", \"payload\"],\n                  \"properties\": {\n                    \"event\": {\n                      \"type\": \"string\",\n                      \"description\": \"The name of the event.\"\n                    },\n                    \"event_ts\": {\n                      \"type\": \"integer\",\n                      \"format\": \"int64\",\n                      \"description\": \"A timestamp at which the event occurred.\"\n                    },\n                    \"payload\": {\n                      \"type\": \"object\",\n                      \"required\": [\"account_id\", \"object\"],\n                      \"properties\": {\n                        \"account_id\": {\n                          \"type\": \"string\",\n                          \"description\": \"The account ID of the session host.\"\n                        },\n                        \"object\": {\n                          \"type\": \"object\",\n                          \"description\": \"Information about the session.\",\n                          \"required\": [\n                            \"session_id\",\n                            \"session_name\",\n                            \"host_id\",\n                            \"message_id\",\n                            \"inviter_name\",\n                            \"participant\"\n                          ],\n                          \"properties\": {\n                            \"id\": {\n                              \"type\": \"integer\",\n                              \"format\": \"int64\",\n                              \"description\": \"The session ID.\",\n                              \"deprecated\": true\n                            },\n                            \"uuid\": {\n                              \"type\": \"string\",\n                              \"description\": \"The session's universally unique identifier (UUID). Each session instance generates a session UUID.\",\n                              \"deprecated\": true\n                            },\n                            \"session_id\": {\n                              \"type\": \"string\",\n                              \"description\": \"Unique session identifier. Each instance of the session will have its own session_id.\"\n                            },\n                            \"session_name\": {\n                              \"type\": \"string\",\n                              \"description\": \"Session name.\"\n                            },\n                            \"host_id\": {\n                              \"type\": \"string\",\n                              \"description\": \"The user ID of the session host.\"\n                            },\n                            \"message_id\": {\n                              \"type\": \"string\",\n                              \"description\": \"The request unique identifier (UUID).\"\n                            },\n                            \"inviter_name\": {\n                              \"type\": \"string\",\n                              \"description\": \"The user name of the event's trigger.\"\n                            },\n                            \"participant\": {\n                              \"type\": \"object\",\n                              \"description\": \"Information about the invited participant.\",\n                              \"required\": [\"call_type\", \"device_ip\"],\n                              \"properties\": {\n                                \"call_type\": {\n                                  \"type\": \"string\",\n                                  \"description\": \"The type of call out. Use a value of h323 or sip.\"\n                                },\n                                \"device_ip\": {\n                                  \"type\": \"string\",\n                                  \"description\": \"The user's device IP address.\"\n                                }\n                              },\n                              \"additionalProperties\": true\n                            }\n                          },\n                          \"additionalProperties\": false\n                        }\n                      },\n                      \"additionalProperties\": false\n                    }\n                  },\n                  \"additionalProperties\": false\n                },\n                \"examples\": {\n                  \"json-example\": {\n                    \"summary\": \"JSON example\",\n                    \"value\": \"{\\n  \\\"event\\\": \\\"session.user_room_system_callout_rejected\\\",\\n  \\\"event_ts\\\": 1626230691572,\\n  \\\"payload\\\": {\\n    \\\"account_id\\\": \\\"dzVA4QmMQfyISoRcpFO8CA\\\",\\n    \\\"object\\\": {\\n      \\\"id\\\": 713592696,\\n      \\\"uuid\\\": \\\"4444AAAiAAAAAiAiAiiAii==\\\",\\n      \\\"session_id\\\": \\\"4444AAAiAAAAAiAiAiiAii==\\\",\\n      \\\"session_name\\\": \\\"My Session\\\",\\n      \\\"host_id\\\": \\\"ICuPoX4ERtikRcKqkVxunQ\\\",\\n      \\\"message_id\\\": \\\"atsXxhSEQWit9t+U02HXNQ==\\\",\\n      \\\"inviter_name\\\": \\\"Jill Chill\\\",\\n      \\\"participant\\\": {\\n        \\\"call_type\\\": \\\"h323\\\",\\n        \\\"device_ip\\\": \\\"10.100.111.237\\\"\\n      }\\n    }\\n  }\\n}\"\n                  }\n                }\n              }\n            }\n          }\n        }\n      }\n    },\n    \"session.alert\": {\n      \"post\": {\n        \"tags\": [\"session\"],\n        \"operationId\": \"session.alert\",\n        \"requestBody\": {\n          \"description\": \"# session.alert\\n---\\n\\n\\nThe Session Alert event is triggered every time a service issue is encountered during a session in your account.\\n\\nThe following quality metrics can trigger an alert:\\n\\n* Unstable audio quality\\n* Unstable video quality\\n* Unstable screen share quality\\n* High CPU occupation\\n* Call Reconnection\\n\\n## Prerequisites\\nEvent Subscriptions must be enabled for your [Marketplace app](https://marketplace.zoom.us/user/build) with the following configurations:\\n\\n* A valid Event Notification Endpoint URL.\\n* Session Alert subscription enabled under the Video SDK event.\\n\\nThe tabs below display the complete schema, payload with data types, and an example of the `session.alert` event notification:\\n\\n\\n**Event type**: `session.alert`\\n\",\n          \"content\": {\n            \"application/json\": {\n              \"schema\": {\n                \"type\": \"object\",\n                \"required\": [\"event\", \"event_ts\", \"payload\"],\n                \"properties\": {\n                  \"event\": {\n                    \"type\": \"string\",\n                    \"enum\": [\"session.alert\"],\n                    \"description\": \"The event's name.\"\n                  },\n                  \"event_ts\": {\n                    \"type\": \"integer\",\n                    \"format\": \"int64\",\n                    \"description\": \"A timestamp, in milliseconds since epoch, at which the event occurred.\"\n                  },\n                  \"payload\": {\n                    \"type\": \"object\",\n                    \"required\": [\"account_id\", \"object\"],\n                    \"properties\": {\n                      \"account_id\": {\n                        \"type\": \"string\",\n                        \"description\": \"The Video SDK account ID.\"\n                      },\n                      \"object\": {\n                        \"type\": \"object\",\n                        \"description\": \"Information about the session. This object only returns updated properties.\",\n                        \"required\": [\"id\", \"session_id\", \"session_name\", \"issues\"],\n                        \"properties\": {\n                          \"id\": {\n                            \"type\": \"string\",\n                            \"description\": \"The session ID.\"\n                          },\n                          \"session_id\": {\n                            \"type\": \"string\",\n                            \"description\": \"Unique session identifier. Each instance of the session will have its own session_id.\"\n                          },\n                          \"session_name\": {\n                            \"type\": \"string\",\n                            \"description\": \"Session name.\"\n                          },\n                          \"session_key\": {\n                            \"type\": \"string\",\n                            \"description\": \"The Video SDK custom session ID.\"\n                          },\n                          \"issues\": {\n                            \"type\": \"array\",\n                            \"items\": {\n                              \"type\": \"string\",\n                              \"enum\": [\n                                \"Unstable audio quality\",\n                                \"Unstable video quality\",\n                                \"Unstable screen share quality\",\n                                \"High CPU occupation\",\n                                \"Call Reconnection\"\n                              ]\n                            },\n                            \"description\": \"Issues that occurred during the session.\"\n                          }\n                        },\n                        \"additionalProperties\": false\n                      }\n                    },\n                    \"additionalProperties\": false\n                  }\n                },\n                \"additionalProperties\": false\n              },\n              \"examples\": {\n                \"json-example\": {\n                  \"summary\": \"JSON example\",\n                  \"value\": \"{\\n  \\\"event\\\": \\\"session.alert\\\",\\n  \\\"event_ts\\\": 1626473951859,\\n  \\\"payload\\\": {\\n    \\\"account_id\\\": \\\"EFgHiJABC000DEfGHI\\\",\\n    \\\"object\\\": {\\n      \\\"id\\\": \\\"4567UVWxYZABCdEfGhiJkl==\\\",\\n      \\\"session_id\\\": \\\"4567UVWxYZABCdEfGhiJkl==\\\",\\n      \\\"session_name\\\": \\\"My Session\\\",\\n      \\\"session_key\\\": \\\"ABC36jaBI145\\\",\\n      \\\"issues\\\": \\\"Unstable audio quality\\\"\\n    }\\n  }\\n}\"\n                }\n              }\n            }\n          }\n        },\n        \"responses\": {\n          \"200\": {\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"type\": \"object\",\n                  \"required\": [\"event\", \"event_ts\", \"payload\"],\n                  \"properties\": {\n                    \"event\": {\n                      \"type\": \"string\",\n                      \"enum\": [\"session.alert\"],\n                      \"description\": \"The event's name.\"\n                    },\n                    \"event_ts\": {\n                      \"type\": \"integer\",\n                      \"format\": \"int64\",\n                      \"description\": \"A timestamp, in milliseconds since epoch, at which the event occurred.\"\n                    },\n                    \"payload\": {\n                      \"type\": \"object\",\n                      \"required\": [\"account_id\", \"object\"],\n                      \"properties\": {\n                        \"account_id\": {\n                          \"type\": \"string\",\n                          \"description\": \"The Video SDK account ID.\"\n                        },\n                        \"object\": {\n                          \"type\": \"object\",\n                          \"description\": \"Information about the session. This object only returns updated properties.\",\n                          \"required\": [\"id\", \"session_id\", \"session_name\", \"issues\"],\n                          \"properties\": {\n                            \"id\": {\n                              \"type\": \"string\",\n                              \"description\": \"The session ID.\"\n                            },\n                            \"session_id\": {\n                              \"type\": \"string\",\n                              \"description\": \"Unique session identifier. Each instance of the session will have its own session_id.\"\n                            },\n                            \"session_name\": {\n                              \"type\": \"string\",\n                              \"description\": \"Session name.\"\n                            },\n                            \"session_key\": {\n                              \"type\": \"string\",\n                              \"description\": \"The Video SDK custom session ID.\"\n                            },\n                            \"issues\": {\n                              \"type\": \"array\",\n                              \"items\": {\n                                \"type\": \"string\",\n                                \"enum\": [\n                                  \"Unstable audio quality\",\n                                  \"Unstable video quality\",\n                                  \"Unstable screen share quality\",\n                                  \"High CPU occupation\",\n                                  \"Call Reconnection\"\n                                ]\n                              },\n                              \"description\": \"Issues that occurred during the session.\"\n                            }\n                          },\n                          \"additionalProperties\": false\n                        }\n                      },\n                      \"additionalProperties\": false\n                    }\n                  },\n                  \"additionalProperties\": false\n                },\n                \"examples\": {\n                  \"json-example\": {\n                    \"summary\": \"JSON example\",\n                    \"value\": \"{\\n  \\\"event\\\": \\\"session.alert\\\",\\n  \\\"event_ts\\\": 1626473951859,\\n  \\\"payload\\\": {\\n    \\\"account_id\\\": \\\"EFgHiJABC000DEfGHI\\\",\\n    \\\"object\\\": {\\n      \\\"id\\\": \\\"4567UVWxYZABCdEfGhiJkl==\\\",\\n      \\\"session_id\\\": \\\"4567UVWxYZABCdEfGhiJkl==\\\",\\n      \\\"session_name\\\": \\\"My Session\\\",\\n      \\\"session_key\\\": \\\"ABC36jaBI145\\\",\\n      \\\"issues\\\": \\\"Unstable audio quality\\\"\\n    }\\n  }\\n}\"\n                  }\n                }\n              }\n            }\n          }\n        }\n      }\n    },\n    \"session.sharing_ended\": {\n      \"post\": {\n        \"tags\": [\"session\"],\n        \"operationId\": \"session.sharing_ended\",\n        \"requestBody\": {\n          \"description\": \"# session.sharing_ended\\n---\\n\\n\\nThe Session Sharing Ended event is triggered every time a user stops sharing the screen during a session.\\n\\n## Prerequisites\\nEvent Subscriptions must be enabled for your [Marketplace app](https://marketplace.zoom.us/user/build) with the following configurations:\\n\\n* A valid Event Notification Endpoint URL.\\n* **Session Sharing Ended** subscription enabled under the **Video SDK** event.\\n\\nThe tabs below display the complete schema, payload with data types, and an example of the `session.sharing_ended` event notification:\\n\\n\\n\\n**Event type**: `session.sharing_ended`\\n\",\n          \"content\": {\n            \"application/json\": {\n              \"schema\": {\n                \"type\": \"object\",\n                \"required\": [\"event\", \"event_ts\", \"payload\"],\n                \"properties\": {\n                  \"event\": {\n                    \"type\": \"string\",\n                    \"enum\": [\"session.sharing_ended\"],\n                    \"description\": \"The event's name.\"\n                  },\n                  \"event_ts\": {\n                    \"type\": \"integer\",\n                    \"format\": \"int64\",\n                    \"description\": \"A timestamp, in milliseconds since epoch, at which the event occurred.\"\n                  },\n                  \"payload\": {\n                    \"type\": \"object\",\n                    \"required\": [\"account_id\", \"object\"],\n                    \"properties\": {\n                      \"account_id\": {\n                        \"type\": \"string\",\n                        \"description\": \"The Video SDK account ID.\"\n                      },\n                      \"object\": {\n                        \"type\": \"object\",\n                        \"description\": \"Information about the session. This object only returns updated properties.\",\n                        \"required\": [\"id\", \"session_id\", \"session_name\", \"user\"],\n                        \"properties\": {\n                          \"id\": {\n                            \"type\": \"string\",\n                            \"description\": \"The session ID.\",\n                            \"deprecated\": true\n                          },\n                          \"session_id\": {\n                            \"type\": \"string\",\n                            \"description\": \"Unique session identifier. Each instance of the session will have its own session_id.\"\n                          },\n                          \"session_name\": {\n                            \"type\": \"string\",\n                            \"description\": \"Session name.\"\n                          },\n                          \"session_key\": {\n                            \"type\": \"string\",\n                            \"description\": \"The Video SDK custom session ID.\"\n                          },\n                          \"user\": {\n                            \"type\": \"object\",\n                            \"description\": \"Information about the user.\",\n                            \"required\": [\"id\", \"name\", \"sharing_details\"],\n                            \"properties\": {\n                              \"id\": {\n                                \"type\": \"string\",\n                                \"description\": \"The user's unique ID. This value is assigned to the user upon joining a session and is only valid for that session.\"\n                              },\n                              \"name\": {\n                                \"type\": \"string\",\n                                \"description\": \"The user's username.\"\n                              },\n                              \"user_key\": {\n                                \"type\": \"string\",\n                                \"description\": \"Another identifier for the user. Can be a number or characters.\"\n                              },\n                              \"sharing_details\": {\n                                \"type\": \"object\",\n                                \"description\": \"Information about the session's screen sharing.\",\n                                \"required\": [\"content\", \"date_time\"],\n                                \"properties\": {\n                                  \"content\": {\n                                    \"type\": \"string\",\n                                    \"description\": \"The type of shared content:\\n* application — An application. For example, a web browser.\\n* whiteboard — The Zoom [whiteboard](https://support.zoom.us/hc/en-us/articles/205677665-Sharing-a-whiteboard).\\n* desktop — A user's desktop.\\n* unknown — An unrecognized application, such as a third party app.\",\n                                    \"enum\": [\"application\", \"whiteboard\", \"desktop\", \"unknown\"]\n                                  },\n                                  \"date_time\": {\n                                    \"type\": \"string\",\n                                    \"format\": \"date-time\",\n                                    \"description\": \"The session's screen sharing date and time.\"\n                                  }\n                                },\n                                \"additionalProperties\": false\n                              }\n                            },\n                            \"additionalProperties\": false\n                          }\n                        },\n                        \"additionalProperties\": false\n                      }\n                    },\n                    \"additionalProperties\": false\n                  }\n                },\n                \"additionalProperties\": false\n              },\n              \"examples\": {\n                \"json-example\": {\n                  \"summary\": \"JSON example\",\n                  \"value\": \"{\\n  \\\"event\\\": \\\"session.sharing_ended\\\",\\n  \\\"event_ts\\\": 1626473951859,\\n  \\\"payload\\\": {\\n    \\\"object\\\": {\\n      \\\"id\\\": \\\"4567UVWxYZABCdEfGhiJkl==\\\",\\n      \\\"session_id\\\": \\\"4567UVWxYZABCdEfGhiJkl==\\\",\\n      \\\"session_name\\\": \\\"My Session\\\",\\n      \\\"session_key\\\": \\\"ABC36jaBI145\\\",\\n      \\\"user\\\": {\\n        \\\"id\\\": \\\"25508864\\\",\\n        \\\"name\\\": \\\"username\\\",\\n        \\\"user_key\\\": \\\"ASD74dfDI854\\\",\\n        \\\"sharing_details\\\": {\\n          \\\"content\\\": \\\"application\\\",\\n          \\\"date_time\\\": \\\"2021-07-16T17:19:11Z\\\"\\n        }\\n      }\\n    },\\n    \\\"account_id\\\": \\\"EFgHiJABC000DEfGHI\\\"\\n  }\\n}\"\n                }\n              }\n            }\n          }\n        },\n        \"responses\": {\n          \"200\": {\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"type\": \"object\",\n                  \"required\": [\"event\", \"event_ts\", \"payload\"],\n                  \"properties\": {\n                    \"event\": {\n                      \"type\": \"string\",\n                      \"enum\": [\"session.sharing_ended\"],\n                      \"description\": \"The event's name.\"\n                    },\n                    \"event_ts\": {\n                      \"type\": \"integer\",\n                      \"format\": \"int64\",\n                      \"description\": \"A timestamp, in milliseconds since epoch, at which the event occurred.\"\n                    },\n                    \"payload\": {\n                      \"type\": \"object\",\n                      \"required\": [\"account_id\", \"object\"],\n                      \"properties\": {\n                        \"account_id\": {\n                          \"type\": \"string\",\n                          \"description\": \"The Video SDK account ID.\"\n                        },\n                        \"object\": {\n                          \"type\": \"object\",\n                          \"description\": \"Information about the session. This object only returns updated properties.\",\n                          \"required\": [\"id\", \"session_id\", \"session_name\", \"user\"],\n                          \"properties\": {\n                            \"id\": {\n                              \"type\": \"string\",\n                              \"description\": \"The session ID.\",\n                              \"deprecated\": true\n                            },\n                            \"session_id\": {\n                              \"type\": \"string\",\n                              \"description\": \"Unique session identifier. Each instance of the session will have its own session_id.\"\n                            },\n                            \"session_name\": {\n                              \"type\": \"string\",\n                              \"description\": \"Session name.\"\n                            },\n                            \"session_key\": {\n                              \"type\": \"string\",\n                              \"description\": \"The Video SDK custom session ID.\"\n                            },\n                            \"user\": {\n                              \"type\": \"object\",\n                              \"description\": \"Information about the user.\",\n                              \"required\": [\"id\", \"name\", \"sharing_details\"],\n                              \"properties\": {\n                                \"id\": {\n                                  \"type\": \"string\",\n                                  \"description\": \"The user's unique ID. This value is assigned to the user upon joining a session and is only valid for that session.\"\n                                },\n                                \"name\": {\n                                  \"type\": \"string\",\n                                  \"description\": \"The user's username.\"\n                                },\n                                \"user_key\": {\n                                  \"type\": \"string\",\n                                  \"description\": \"Another identifier for the user. Can be a number or characters.\"\n                                },\n                                \"sharing_details\": {\n                                  \"type\": \"object\",\n                                  \"description\": \"Information about the session's screen sharing.\",\n                                  \"required\": [\"content\", \"date_time\"],\n                                  \"properties\": {\n                                    \"content\": {\n                                      \"type\": \"string\",\n                                      \"description\": \"The type of shared content:\\n* application — An application. For example, a web browser.\\n* whiteboard — The Zoom [whiteboard](https://support.zoom.us/hc/en-us/articles/205677665-Sharing-a-whiteboard).\\n* desktop — A user's desktop.\\n* unknown — An unrecognized application, such as a third party app.\",\n                                      \"enum\": [\"application\", \"whiteboard\", \"desktop\", \"unknown\"]\n                                    },\n                                    \"date_time\": {\n                                      \"type\": \"string\",\n                                      \"format\": \"date-time\",\n                                      \"description\": \"The session's screen sharing date and time.\"\n                                    }\n                                  },\n                                  \"additionalProperties\": false\n                                }\n                              },\n                              \"additionalProperties\": false\n                            }\n                          },\n                          \"additionalProperties\": false\n                        }\n                      },\n                      \"additionalProperties\": false\n                    }\n                  },\n                  \"additionalProperties\": false\n                },\n                \"examples\": {\n                  \"json-example\": {\n                    \"summary\": \"JSON example\",\n                    \"value\": \"{\\n  \\\"event\\\": \\\"session.sharing_ended\\\",\\n  \\\"event_ts\\\": 1626473951859,\\n  \\\"payload\\\": {\\n    \\\"object\\\": {\\n      \\\"id\\\": \\\"4567UVWxYZABCdEfGhiJkl==\\\",\\n      \\\"session_id\\\": \\\"4567UVWxYZABCdEfGhiJkl==\\\",\\n      \\\"session_name\\\": \\\"My Session\\\",\\n      \\\"session_key\\\": \\\"ABC36jaBI145\\\",\\n      \\\"user\\\": {\\n        \\\"id\\\": \\\"25508864\\\",\\n        \\\"name\\\": \\\"username\\\",\\n        \\\"user_key\\\": \\\"ASD74dfDI854\\\",\\n        \\\"sharing_details\\\": {\\n          \\\"content\\\": \\\"application\\\",\\n          \\\"date_time\\\": \\\"2021-07-16T17:19:11Z\\\"\\n        }\\n      }\\n    },\\n    \\\"account_id\\\": \\\"EFgHiJABC000DEfGHI\\\"\\n  }\\n}\"\n                  }\n                }\n              }\n            }\n          }\n        }\n      }\n    },\n    \"session.recording_paused\": {\n      \"post\": {\n        \"tags\": [\"session\"],\n        \"operationId\": \"session.recording_paused\",\n        \"requestBody\": {\n          \"description\": \"# session.recording_paused\\n---\\n\\nEvent: `session.recording_paused`\\n\\n## Event description\\n\\nThe **Session recording paused** event is triggered every time a recording is paused by one of your app or account users.\\n\\nOnly a session host or co-host can start, pause, resume, or stop a cloud recording. A recording is considered complete **after** the host or co-host ends the session. See [Enable cloud recording](https://developers.zoom.us/docs/video-sdk/account/#enable-cloud-recording) for details.\\n\\n## Prerequisites\\n\\n* Cloud Recording must be enabled on the Video SDK account.\\n* Event Subscriptions must be enabled for your app with the following configurations:\\n  * A valid Event Notification Endpoint URL.\\n  * \\\"**Session recording paused**\\\" subscription enabled under the **Recording** event.\\n\\nThe tabs below display the complete schema, payload with data types, and an example of the `session.recording_paused` event notification:\\n\\n\\n\\n**Event type**: `session.recording_paused`\\n\",\n          \"content\": {\n            \"application/json\": {\n              \"schema\": {\n                \"type\": \"object\",\n                \"required\": [\"event\", \"event_ts\", \"payload\"],\n                \"properties\": {\n                  \"event\": {\n                    \"type\": \"string\",\n                    \"enum\": [\"session.recording_paused\"],\n                    \"description\": \"The event's name.\"\n                  },\n                  \"event_ts\": {\n                    \"type\": \"integer\",\n                    \"format\": \"int64\",\n                    \"description\": \"A timestamp, in milliseconds since epoch, at which the event occurred.\"\n                  },\n                  \"payload\": {\n                    \"type\": \"object\",\n                    \"required\": [\"account_id\", \"object\"],\n                    \"properties\": {\n                      \"account_id\": {\n                        \"type\": \"string\",\n                        \"description\": \"The Video SDK account ID.\"\n                      },\n                      \"object\": {\n                        \"type\": \"object\",\n                        \"description\": \"Information about the session. This object only returns updated properties.\",\n                        \"required\": [\n                          \"session_id\",\n                          \"session_name\",\n                          \"session_key\",\n                          \"start_time\",\n                          \"timezone\",\n                          \"recording_file\"\n                        ],\n                        \"properties\": {\n                          \"session_id\": {\n                            \"type\": \"string\",\n                            \"description\": \"Unique session identifier. Each instance of the session will have its own session_id.\"\n                          },\n                          \"session_name\": {\n                            \"type\": \"string\",\n                            \"description\": \"Session name.\"\n                          },\n                          \"session_key\": {\n                            \"type\": \"string\",\n                            \"description\": \"The Video SDK custom session ID.\"\n                          },\n                          \"start_time\": {\n                            \"type\": \"string\",\n                            \"format\": \"date-time\",\n                            \"description\": \"The time at which the session started.\"\n                          },\n                          \"timezone\": {\n                            \"type\": \"string\",\n                            \"description\": \"The user's timezone.\"\n                          },\n                          \"recording_file\": {\n                            \"type\": \"object\",\n                            \"properties\": {\n                              \"recording_start\": {\n                                \"type\": \"string\",\n                                \"description\": \"The recording start time.\"\n                              },\n                              \"recording_end\": {\n                                \"type\": \"string\",\n                                \"description\": \"The recording end time. Response in general query.\"\n                              }\n                            }\n                          }\n                        },\n                        \"additionalProperties\": false\n                      }\n                    },\n                    \"additionalProperties\": false\n                  }\n                },\n                \"additionalProperties\": false\n              },\n              \"examples\": {\n                \"json-example\": {\n                  \"summary\": \"JSON example\",\n                  \"value\": \"{\\n  \\\"event\\\": \\\"session.recording_paused\\\",\\n  \\\"event_ts\\\": 1626230691572,\\n  \\\"payload\\\": {\\n    \\\"account_id\\\": \\\"AAAAAABBBB\\\",\\n    \\\"object\\\": {\\n      \\\"session_id\\\": 1234567890,\\n      \\\"session_name\\\": \\\"My Personal Recording\\\",\\n      \\\"session_key\\\": \\\"ABC36jaBI145\\\",\\n      \\\"start_time\\\": \\\"2021-07-13T21:44:51Z\\\",\\n      \\\"timezone\\\": \\\"America/Los_Angeles\\\",\\n      \\\"recording_file\\\": {\\n          \\\"recording_start\\\": \\\"2021-03-23T22:14:57Z\\\",\\n          \\\"recording_end\\\": \\\"2021-03-23T23:15:41Z\\\"\\n      }\\n    }\\n  }\\n}\"\n                }\n              }\n            }\n          }\n        },\n        \"responses\": {\n          \"200\": {\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"type\": \"object\",\n                  \"required\": [\"event\", \"event_ts\", \"payload\"],\n                  \"properties\": {\n                    \"event\": {\n                      \"type\": \"string\",\n                      \"enum\": [\"session.recording_paused\"],\n                      \"description\": \"The event's name.\"\n                    },\n                    \"event_ts\": {\n                      \"type\": \"integer\",\n                      \"format\": \"int64\",\n                      \"description\": \"A timestamp, in milliseconds since epoch, at which the event occurred.\"\n                    },\n                    \"payload\": {\n                      \"type\": \"object\",\n                      \"required\": [\"account_id\", \"object\"],\n                      \"properties\": {\n                        \"account_id\": {\n                          \"type\": \"string\",\n                          \"description\": \"The Video SDK account ID.\"\n                        },\n                        \"object\": {\n                          \"type\": \"object\",\n                          \"description\": \"Information about the session. This object only returns updated properties.\",\n                          \"required\": [\n                            \"session_id\",\n                            \"session_name\",\n                            \"session_key\",\n                            \"start_time\",\n                            \"timezone\",\n                            \"recording_file\"\n                          ],\n                          \"properties\": {\n                            \"session_id\": {\n                              \"type\": \"string\",\n                              \"description\": \"Unique session identifier. Each instance of the session will have its own session_id.\"\n                            },\n                            \"session_name\": {\n                              \"type\": \"string\",\n                              \"description\": \"Session name.\"\n                            },\n                            \"session_key\": {\n                              \"type\": \"string\",\n                              \"description\": \"The Video SDK custom session ID.\"\n                            },\n                            \"start_time\": {\n                              \"type\": \"string\",\n                              \"format\": \"date-time\",\n                              \"description\": \"The time at which the session started.\"\n                            },\n                            \"timezone\": {\n                              \"type\": \"string\",\n                              \"description\": \"The user's timezone.\"\n                            },\n                            \"recording_file\": {\n                              \"type\": \"object\",\n                              \"properties\": {\n                                \"recording_start\": {\n                                  \"type\": \"string\",\n                                  \"description\": \"The recording start time.\"\n                                },\n                                \"recording_end\": {\n                                  \"type\": \"string\",\n                                  \"description\": \"The recording end time. Response in general query.\"\n                                }\n                              }\n                            }\n                          },\n                          \"additionalProperties\": false\n                        }\n                      },\n                      \"additionalProperties\": false\n                    }\n                  },\n                  \"additionalProperties\": false\n                },\n                \"examples\": {\n                  \"json-example\": {\n                    \"summary\": \"JSON example\",\n                    \"value\": \"{\\n  \\\"event\\\": \\\"session.recording_paused\\\",\\n  \\\"event_ts\\\": 1626230691572,\\n  \\\"payload\\\": {\\n    \\\"account_id\\\": \\\"AAAAAABBBB\\\",\\n    \\\"object\\\": {\\n      \\\"session_id\\\": 1234567890,\\n      \\\"session_name\\\": \\\"My Personal Recording\\\",\\n      \\\"session_key\\\": \\\"ABC36jaBI145\\\",\\n      \\\"start_time\\\": \\\"2021-07-13T21:44:51Z\\\",\\n      \\\"timezone\\\": \\\"America/Los_Angeles\\\",\\n      \\\"recording_file\\\": {\\n          \\\"recording_start\\\": \\\"2021-03-23T22:14:57Z\\\",\\n          \\\"recording_end\\\": \\\"2021-03-23T23:15:41Z\\\"\\n      }\\n    }\\n  }\\n}\"\n                  }\n                }\n              }\n            }\n          }\n        }\n      }\n    },\n    \"session.ended\": {\n      \"post\": {\n        \"tags\": [\"session\"],\n        \"operationId\": \"session.ended\",\n        \"requestBody\": {\n          \"description\": \"# session.ended\\n---\\n\\n\\nThe Session Ended event is triggered when the host ends the session, or when all users have left the session.\\n\\n## Prerequisites\\nEvent Subscriptions must be enabled for your app with the following configurations:\\n\\n* A valid Event Notification Endpoint URL.\\n* **Session Ended** subscription enabled under the **Video SDK** event.\\n\\nThe tabs below display the complete schema, payload with data types, and an example of the `session.ended` event notification:\\n\\n\\n\\n**Event type**: `session.ended`\\n\",\n          \"content\": {\n            \"application/json\": {\n              \"schema\": {\n                \"type\": \"object\",\n                \"required\": [\"event\", \"event_ts\", \"payload\"],\n                \"properties\": {\n                  \"event\": {\n                    \"type\": \"string\",\n                    \"enum\": [\"session.ended\"],\n                    \"description\": \"The name of the event.\"\n                  },\n                  \"event_ts\": {\n                    \"type\": \"integer\",\n                    \"format\": \"int64\",\n                    \"description\": \"Timestamp at which the event occurred, in milliseconds since epoch. The value of this field is returned in long(int64) format.\"\n                  },\n                  \"payload\": {\n                    \"type\": \"object\",\n                    \"required\": [\"account_id\", \"object\"],\n                    \"properties\": {\n                      \"account_id\": {\n                        \"type\": \"string\",\n                        \"description\": \"The Video SDK account ID.\"\n                      },\n                      \"object\": {\n                        \"type\": \"object\",\n                        \"description\": \"Information about the session.\",\n                        \"required\": [\"id\", \"session_id\", \"session_name\", \"start_time\", \"end_time\"],\n                        \"properties\": {\n                          \"id\": {\n                            \"type\": \"string\",\n                            \"description\": \"The session ID.\",\n                            \"deprecated\": true\n                          },\n                          \"session_id\": {\n                            \"type\": \"string\",\n                            \"description\": \"Unique session identifier. Each instance of the session will have its own session_id.\"\n                          },\n                          \"session_name\": {\n                            \"type\": \"string\",\n                            \"description\": \"Session name.\"\n                          },\n                          \"session_key\": {\n                            \"type\": \"string\",\n                            \"description\": \"The Video SDK custom session ID.\"\n                          },\n                          \"start_time\": {\n                            \"type\": \"string\",\n                            \"description\": \"The session's start time.\",\n                            \"format\": \"date-time\"\n                          },\n                          \"end_time\": {\n                            \"type\": \"string\",\n                            \"description\": \"The session's end time.\",\n                            \"format\": \"date-time\"\n                          }\n                        },\n                        \"additionalProperties\": false\n                      }\n                    },\n                    \"additionalProperties\": false\n                  }\n                },\n                \"additionalProperties\": false\n              },\n              \"examples\": {\n                \"json-example\": {\n                  \"summary\": \"JSON example\",\n                  \"value\": \"{\\n  \\\"event\\\": \\\"session.ended\\\",\\n  \\\"event_ts\\\": 1627906944384,\\n  \\\"payload\\\": {\\n    \\\"account_id\\\": \\\"D8cJuqWVQ623CI4Q8yQK0Q\\\",\\n    \\\"object\\\": {\\n      \\\"id\\\": \\\"BrgGrWeZSwaXkLBTpvmmvg==\\\",\\n      \\\"session_id\\\": \\\"4567UVWxYZABCdEfGhiJkl==\\\",\\n      \\\"session_name\\\": \\\"My Session\\\",\\n      \\\"session_key\\\": \\\"ABC36jaBI145\\\",\\n      \\\"start_time\\\": \\\"2021-08-02T12:22:24Z\\\",\\n      \\\"end_time\\\": \\\"2021-08-02T13:22:24Z\\\"\\n    }\\n  }\\n}\"\n                }\n              }\n            }\n          }\n        },\n        \"responses\": {\n          \"200\": {\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"type\": \"object\",\n                  \"required\": [\"event\", \"event_ts\", \"payload\"],\n                  \"properties\": {\n                    \"event\": {\n                      \"type\": \"string\",\n                      \"enum\": [\"session.ended\"],\n                      \"description\": \"The name of the event.\"\n                    },\n                    \"event_ts\": {\n                      \"type\": \"integer\",\n                      \"format\": \"int64\",\n                      \"description\": \"Timestamp at which the event occurred, in milliseconds since epoch. The value of this field is returned in long(int64) format.\"\n                    },\n                    \"payload\": {\n                      \"type\": \"object\",\n                      \"required\": [\"account_id\", \"object\"],\n                      \"properties\": {\n                        \"account_id\": {\n                          \"type\": \"string\",\n                          \"description\": \"The Video SDK account ID.\"\n                        },\n                        \"object\": {\n                          \"type\": \"object\",\n                          \"description\": \"Information about the session.\",\n                          \"required\": [\n                            \"id\",\n                            \"session_id\",\n                            \"session_name\",\n                            \"start_time\",\n                            \"end_time\"\n                          ],\n                          \"properties\": {\n                            \"id\": {\n                              \"type\": \"string\",\n                              \"description\": \"The session ID.\",\n                              \"deprecated\": true\n                            },\n                            \"session_id\": {\n                              \"type\": \"string\",\n                              \"description\": \"Unique session identifier. Each instance of the session will have its own session_id.\"\n                            },\n                            \"session_name\": {\n                              \"type\": \"string\",\n                              \"description\": \"Session name.\"\n                            },\n                            \"session_key\": {\n                              \"type\": \"string\",\n                              \"description\": \"The Video SDK custom session ID.\"\n                            },\n                            \"start_time\": {\n                              \"type\": \"string\",\n                              \"description\": \"The session's start time.\",\n                              \"format\": \"date-time\"\n                            },\n                            \"end_time\": {\n                              \"type\": \"string\",\n                              \"description\": \"The session's end time.\",\n                              \"format\": \"date-time\"\n                            }\n                          },\n                          \"additionalProperties\": false\n                        }\n                      },\n                      \"additionalProperties\": false\n                    }\n                  },\n                  \"additionalProperties\": false\n                },\n                \"examples\": {\n                  \"json-example\": {\n                    \"summary\": \"JSON example\",\n                    \"value\": \"{\\n  \\\"event\\\": \\\"session.ended\\\",\\n  \\\"event_ts\\\": 1627906944384,\\n  \\\"payload\\\": {\\n    \\\"account_id\\\": \\\"D8cJuqWVQ623CI4Q8yQK0Q\\\",\\n    \\\"object\\\": {\\n      \\\"id\\\": \\\"BrgGrWeZSwaXkLBTpvmmvg==\\\",\\n      \\\"session_id\\\": \\\"4567UVWxYZABCdEfGhiJkl==\\\",\\n      \\\"session_name\\\": \\\"My Session\\\",\\n      \\\"session_key\\\": \\\"ABC36jaBI145\\\",\\n      \\\"start_time\\\": \\\"2021-08-02T12:22:24Z\\\",\\n      \\\"end_time\\\": \\\"2021-08-02T13:22:24Z\\\"\\n    }\\n  }\\n}\"\n                  }\n                }\n              }\n            }\n          }\n        }\n      }\n    },\n    \"session.started\": {\n      \"post\": {\n        \"tags\": [\"session\"],\n        \"operationId\": \"session.started\",\n        \"requestBody\": {\n          \"description\": \"# session.started\\n---\\n\\n\\nThe Session Start event is triggered when the first user (including host and co-host) joins.\\n\\n## Prerequisites\\nEvent Subscriptions must be enabled for your app with the following configurations:\\n\\n* A valid Event Notification Endpoint URL.\\n* **Session Started** subscription enabled under the **Video SDK** event.\\n\\nThe tabs below display the complete schema, payload with data types, and an example of the `session.started` event notification:\\n\\n\\n\\n**Event type**: `session.started`\\n\",\n          \"content\": {\n            \"application/json\": {\n              \"schema\": {\n                \"type\": \"object\",\n                \"required\": [\"event\", \"event_ts\", \"payload\"],\n                \"properties\": {\n                  \"event\": {\n                    \"type\": \"string\",\n                    \"enum\": [\"session.started\"],\n                    \"description\": \"The name of the event.\"\n                  },\n                  \"event_ts\": {\n                    \"type\": \"integer\",\n                    \"format\": \"int64\",\n                    \"description\": \"Timestamp (in milliseconds since epoch) at which the event occurred. The value of this field is returned in long(int64) format.\"\n                  },\n                  \"payload\": {\n                    \"type\": \"object\",\n                    \"required\": [\"account_id\", \"object\"],\n                    \"properties\": {\n                      \"account_id\": {\n                        \"type\": \"string\",\n                        \"description\": \"The Video SDK account ID.\"\n                      },\n                      \"object\": {\n                        \"type\": \"object\",\n                        \"description\": \"Information about the session.\",\n                        \"required\": [\"id\", \"session_id\", \"session_name\", \"start_time\"],\n                        \"properties\": {\n                          \"id\": {\n                            \"type\": \"string\",\n                            \"description\": \"The session's ID.\",\n                            \"deprecated\": true\n                          },\n                          \"session_id\": {\n                            \"type\": \"string\",\n                            \"description\": \"Unique session identifier. Each instance of the session will have its own session_id.\"\n                          },\n                          \"session_name\": {\n                            \"type\": \"string\",\n                            \"description\": \"Session name.\"\n                          },\n                          \"session_key\": {\n                            \"type\": \"string\",\n                            \"description\": \"The Video SDK custom session ID.\"\n                          },\n                          \"start_time\": {\n                            \"type\": \"string\",\n                            \"description\": \"The session's start time.\",\n                            \"format\": \"date-time\"\n                          }\n                        },\n                        \"additionalProperties\": false\n                      }\n                    },\n                    \"additionalProperties\": false\n                  }\n                },\n                \"additionalProperties\": false\n              },\n              \"examples\": {\n                \"json-example\": {\n                  \"summary\": \"JSON example\",\n                  \"value\": \"{\\n  \\\"event\\\": \\\"session.started\\\",\\n  \\\"event_ts\\\": 1627906944384,\\n  \\\"payload\\\": {\\n    \\\"account_id\\\": \\\"D8cJuqWVQ623CI4Q8yQK0Q\\\",\\n    \\\"object\\\": {\\n      \\\"id\\\": \\\"BrgGrWeZSwaXkLBTpvmmvg==\\\",\\n      \\\"session_id\\\": \\\"4567UVWxYZABCdEfGhiJkl==\\\",\\n      \\\"session_name\\\": \\\"My Session\\\",\\n      \\\"session_key\\\": \\\"ABC36jaBI145\\\",\\n      \\\"start_time\\\": \\\"2021-08-02T12:22:24Z\\\"\\n    }\\n  }\\n}\"\n                }\n              }\n            }\n          }\n        },\n        \"responses\": {\n          \"200\": {\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"type\": \"object\",\n                  \"required\": [\"event\", \"event_ts\", \"payload\"],\n                  \"properties\": {\n                    \"event\": {\n                      \"type\": \"string\",\n                      \"enum\": [\"session.started\"],\n                      \"description\": \"The name of the event.\"\n                    },\n                    \"event_ts\": {\n                      \"type\": \"integer\",\n                      \"format\": \"int64\",\n                      \"description\": \"Timestamp (in milliseconds since epoch) at which the event occurred. The value of this field is returned in long(int64) format.\"\n                    },\n                    \"payload\": {\n                      \"type\": \"object\",\n                      \"required\": [\"account_id\", \"object\"],\n                      \"properties\": {\n                        \"account_id\": {\n                          \"type\": \"string\",\n                          \"description\": \"The Video SDK account ID.\"\n                        },\n                        \"object\": {\n                          \"type\": \"object\",\n                          \"description\": \"Information about the session.\",\n                          \"required\": [\"id\", \"session_id\", \"session_name\", \"start_time\"],\n                          \"properties\": {\n                            \"id\": {\n                              \"type\": \"string\",\n                              \"description\": \"The session's ID.\",\n                              \"deprecated\": true\n                            },\n                            \"session_id\": {\n                              \"type\": \"string\",\n                              \"description\": \"Unique session identifier. Each instance of the session will have its own session_id.\"\n                            },\n                            \"session_name\": {\n                              \"type\": \"string\",\n                              \"description\": \"Session name.\"\n                            },\n                            \"session_key\": {\n                              \"type\": \"string\",\n                              \"description\": \"The Video SDK custom session ID.\"\n                            },\n                            \"start_time\": {\n                              \"type\": \"string\",\n                              \"description\": \"The session's start time.\",\n                              \"format\": \"date-time\"\n                            }\n                          },\n                          \"additionalProperties\": false\n                        }\n                      },\n                      \"additionalProperties\": false\n                    }\n                  },\n                  \"additionalProperties\": false\n                },\n                \"examples\": {\n                  \"json-example\": {\n                    \"summary\": \"JSON example\",\n                    \"value\": \"{\\n  \\\"event\\\": \\\"session.started\\\",\\n  \\\"event_ts\\\": 1627906944384,\\n  \\\"payload\\\": {\\n    \\\"account_id\\\": \\\"D8cJuqWVQ623CI4Q8yQK0Q\\\",\\n    \\\"object\\\": {\\n      \\\"id\\\": \\\"BrgGrWeZSwaXkLBTpvmmvg==\\\",\\n      \\\"session_id\\\": \\\"4567UVWxYZABCdEfGhiJkl==\\\",\\n      \\\"session_name\\\": \\\"My Session\\\",\\n      \\\"session_key\\\": \\\"ABC36jaBI145\\\",\\n      \\\"start_time\\\": \\\"2021-08-02T12:22:24Z\\\"\\n    }\\n  }\\n}\"\n                  }\n                }\n              }\n            }\n          }\n        }\n      }\n    },\n    \"session.stream_ingestion_unbind\": {\n      \"post\": {\n        \"tags\": [\"session\"],\n        \"operationId\": \"session.stream_ingestion_unbind\",\n        \"requestBody\": {\n          \"description\": \"# session.stream_ingestion_unbind\\nZoom triggers the **Session stream ingestion unbind** event every time a session unbinds a stream key.\\n\\n## Prerequisites\\n\\n* **Event Subscriptions** must be enabled for your app with the following configurations:\\n  * A valid **Event Notification Endpoint URL**.\\n  * The **Session stream ingestion unbind** subscription enabled under the **Video SDK** event.\\n\\n\\n**Event type**: `session.stream_ingestion_unbind`\\n\",\n          \"content\": {\n            \"application/json\": {\n              \"schema\": {\n                \"type\": \"object\",\n                \"required\": [\"event\", \"event_ts\", \"payload\"],\n                \"properties\": {\n                  \"event\": {\n                    \"type\": \"string\",\n                    \"enum\": [\"session.stream_ingestion_unbind\"],\n                    \"description\": \"Event name.\"\n                  },\n                  \"event_ts\": {\n                    \"type\": \"integer\",\n                    \"format\": \"int64\",\n                    \"description\": \"Timestamp (in milliseconds since epoch) at which the event occurred. The value of this field is returned in long (int64) format.\"\n                  },\n                  \"payload\": {\n                    \"type\": \"object\",\n                    \"required\": [\"account_id\", \"object\"],\n                    \"properties\": {\n                      \"account_id\": {\n                        \"type\": \"string\",\n                        \"description\": \"The Video SDK account ID.\"\n                      },\n                      \"object\": {\n                        \"type\": \"object\",\n                        \"description\": \"Information about the session.\",\n                        \"required\": [\"session_id\", \"session_name\", \"stream_ingestion\"],\n                        \"properties\": {\n                          \"session_id\": {\n                            \"type\": \"string\",\n                            \"description\": \"Unique session identifier. Each instance of the session will have its own session_id.\"\n                          },\n                          \"session_name\": {\n                            \"type\": \"string\",\n                            \"description\": \"Session name.\"\n                          },\n                          \"session_key\": {\n                            \"type\": \"string\",\n                            \"description\": \"The Video SDK custom session ID.\"\n                          },\n                          \"stream_ingestion\": {\n                            \"type\": \"object\",\n                            \"description\": \"Information about the stream ingestion.\",\n                            \"required\": [\n                              \"stream_id\",\n                              \"stream_name\",\n                              \"stream_key\",\n                              \"stream_url\",\n                              \"backup_stream_url\"\n                            ],\n                            \"properties\": {\n                              \"stream_id\": {\n                                \"type\": \"string\",\n                                \"description\": \"The stream ingestion ID.\"\n                              },\n                              \"stream_name\": {\n                                \"type\": \"string\",\n                                \"description\": \"The stream ingestion name.\"\n                              },\n                              \"stream_description\": {\n                                \"type\": \"string\",\n                                \"description\": \"The stream ingestion description.\"\n                              },\n                              \"stream_key\": {\n                                \"type\": \"string\",\n                                \"description\": \"The stream ingestion key.\"\n                              },\n                              \"stream_url\": {\n                                \"type\": \"string\",\n                                \"description\": \"The stream URL.\"\n                              },\n                              \"backup_stream_url\": {\n                                \"type\": \"string\",\n                                \"description\": \"The backup stream URL.\"\n                              }\n                            }\n                          }\n                        },\n                        \"additionalProperties\": false\n                      }\n                    },\n                    \"additionalProperties\": false\n                  }\n                },\n                \"additionalProperties\": false\n              },\n              \"examples\": {\n                \"json-example\": {\n                  \"summary\": \"JSON example\",\n                  \"value\": \"{\\n  \\\"event\\\": \\\"session.stream_ingestion_unbind\\\",\\n  \\\"event_ts\\\": 1627906965803,\\n  \\\"payload\\\": {\\n    \\\"account_id\\\": \\\"D8cJuqWVQ623CI4Q8yQK0Q\\\",\\n    \\\"object\\\": {\\n      \\\"session_id\\\": \\\"4567UVWxYZABCdEfGhiJkl==\\\",\\n      \\\"session_name\\\": \\\"My Session\\\",\\n      \\\"session_key\\\": \\\"ABC36jaBI145\\\",\\n      \\\"stream_ingestion\\\": {\\n        \\\"stream_id\\\": \\\"sfk/aOFJSJSYhGwk1hnxgw==\\\",\\n        \\\"stream_name\\\": \\\"stream ingestion1\\\",\\n        \\\"stream_description\\\": \\\"stream ingestion1\\\",\\n        \\\"stream_key\\\": \\\"ABCDEFG12345HIJ6789\\\",\\n        \\\"stream_url\\\": \\\"rtmp://a.rtmp.zoomevent.com/live1\\\",\\n        \\\"backup_stream_url\\\": \\\"rtmp://a.rtmp.zoomevent.com/live1\\\"\\n      }\\n    }\\n  }\\n}\"\n                }\n              }\n            }\n          }\n        },\n        \"responses\": {\n          \"200\": {\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"type\": \"object\",\n                  \"required\": [\"event\", \"event_ts\", \"payload\"],\n                  \"properties\": {\n                    \"event\": {\n                      \"type\": \"string\",\n                      \"enum\": [\"session.stream_ingestion_unbind\"],\n                      \"description\": \"Event name.\"\n                    },\n                    \"event_ts\": {\n                      \"type\": \"integer\",\n                      \"format\": \"int64\",\n                      \"description\": \"Timestamp (in milliseconds since epoch) at which the event occurred. The value of this field is returned in long (int64) format.\"\n                    },\n                    \"payload\": {\n                      \"type\": \"object\",\n                      \"required\": [\"account_id\", \"object\"],\n                      \"properties\": {\n                        \"account_id\": {\n                          \"type\": \"string\",\n                          \"description\": \"The Video SDK account ID.\"\n                        },\n                        \"object\": {\n                          \"type\": \"object\",\n                          \"description\": \"Information about the session.\",\n                          \"required\": [\"session_id\", \"session_name\", \"stream_ingestion\"],\n                          \"properties\": {\n                            \"session_id\": {\n                              \"type\": \"string\",\n                              \"description\": \"Unique session identifier. Each instance of the session will have its own session_id.\"\n                            },\n                            \"session_name\": {\n                              \"type\": \"string\",\n                              \"description\": \"Session name.\"\n                            },\n                            \"session_key\": {\n                              \"type\": \"string\",\n                              \"description\": \"The Video SDK custom session ID.\"\n                            },\n                            \"stream_ingestion\": {\n                              \"type\": \"object\",\n                              \"description\": \"Information about the stream ingestion.\",\n                              \"required\": [\n                                \"stream_id\",\n                                \"stream_name\",\n                                \"stream_key\",\n                                \"stream_url\",\n                                \"backup_stream_url\"\n                              ],\n                              \"properties\": {\n                                \"stream_id\": {\n                                  \"type\": \"string\",\n                                  \"description\": \"The stream ingestion ID.\"\n                                },\n                                \"stream_name\": {\n                                  \"type\": \"string\",\n                                  \"description\": \"The stream ingestion name.\"\n                                },\n                                \"stream_description\": {\n                                  \"type\": \"string\",\n                                  \"description\": \"The stream ingestion description.\"\n                                },\n                                \"stream_key\": {\n                                  \"type\": \"string\",\n                                  \"description\": \"The stream ingestion key.\"\n                                },\n                                \"stream_url\": {\n                                  \"type\": \"string\",\n                                  \"description\": \"The stream URL.\"\n                                },\n                                \"backup_stream_url\": {\n                                  \"type\": \"string\",\n                                  \"description\": \"The backup stream URL.\"\n                                }\n                              }\n                            }\n                          },\n                          \"additionalProperties\": false\n                        }\n                      },\n                      \"additionalProperties\": false\n                    }\n                  },\n                  \"additionalProperties\": false\n                },\n                \"examples\": {\n                  \"json-example\": {\n                    \"summary\": \"JSON example\",\n                    \"value\": \"{\\n  \\\"event\\\": \\\"session.stream_ingestion_unbind\\\",\\n  \\\"event_ts\\\": 1627906965803,\\n  \\\"payload\\\": {\\n    \\\"account_id\\\": \\\"D8cJuqWVQ623CI4Q8yQK0Q\\\",\\n    \\\"object\\\": {\\n      \\\"session_id\\\": \\\"4567UVWxYZABCdEfGhiJkl==\\\",\\n      \\\"session_name\\\": \\\"My Session\\\",\\n      \\\"session_key\\\": \\\"ABC36jaBI145\\\",\\n      \\\"stream_ingestion\\\": {\\n        \\\"stream_id\\\": \\\"sfk/aOFJSJSYhGwk1hnxgw==\\\",\\n        \\\"stream_name\\\": \\\"stream ingestion1\\\",\\n        \\\"stream_description\\\": \\\"stream ingestion1\\\",\\n        \\\"stream_key\\\": \\\"ABCDEFG12345HIJ6789\\\",\\n        \\\"stream_url\\\": \\\"rtmp://a.rtmp.zoomevent.com/live1\\\",\\n        \\\"backup_stream_url\\\": \\\"rtmp://a.rtmp.zoomevent.com/live1\\\"\\n      }\\n    }\\n  }\\n}\"\n                  }\n                }\n              }\n            }\n          }\n        }\n      }\n    },\n    \"session.live_streaming_started\": {\n      \"post\": {\n        \"tags\": [\"session\"],\n        \"operationId\": \"session.live_streaming_started\",\n        \"requestBody\": {\n          \"description\": \"# session.live_streaming_started\\n---\\n\\n\\nThe Session Live Streaming Started event is triggered every time a user starts a live stream.\\n\\n## Prerequisites\\nEvent Subscriptions must be enabled for your app with the following configurations:\\n\\n* A valid Event Notification Endpoint URL.\\n* **Session Live Streaming Started** subscription enabled under the **Video SDK** event.\\n\\nThe tabs below display the complete schema, payload with data types, and an example of the `session.live_streaming_started` event notification:\\n\\n\\n\\n**Event type**: `session.live_streaming_started`\\n\",\n          \"content\": {\n            \"application/json\": {\n              \"schema\": {\n                \"type\": \"object\",\n                \"required\": [\"event\", \"event_ts\", \"payload\"],\n                \"properties\": {\n                  \"event\": {\n                    \"type\": \"string\",\n                    \"enum\": [\"session.live_streaming_started\"],\n                    \"description\": \"Name of the event.\"\n                  },\n                  \"event_ts\": {\n                    \"type\": \"integer\",\n                    \"format\": \"int64\",\n                    \"description\": \"Timestamp (in milliseconds since epoch) at which the event occurred. The value of this field is returned in long(int64) format.\"\n                  },\n                  \"payload\": {\n                    \"type\": \"object\",\n                    \"required\": [\"account_id\", \"object\"],\n                    \"properties\": {\n                      \"account_id\": {\n                        \"type\": \"string\",\n                        \"description\": \"The Video SDK account ID.\"\n                      },\n                      \"object\": {\n                        \"type\": \"object\",\n                        \"description\": \"Information about the session.\",\n                        \"required\": [\n                          \"id\",\n                          \"session_id\",\n                          \"session_name\",\n                          \"start_time\",\n                          \"live_streaming\"\n                        ],\n                        \"properties\": {\n                          \"id\": {\n                            \"type\": \"string\",\n                            \"description\": \"The session ID.\",\n                            \"deprecated\": true\n                          },\n                          \"session_id\": {\n                            \"type\": \"string\",\n                            \"description\": \"Unique session identifier. Each instance of the session will have its own session_id.\"\n                          },\n                          \"session_name\": {\n                            \"type\": \"string\",\n                            \"description\": \"Session name.\"\n                          },\n                          \"session_key\": {\n                            \"type\": \"string\",\n                            \"description\": \"The Video SDK custom session ID.\"\n                          },\n                          \"start_time\": {\n                            \"type\": \"string\",\n                            \"description\": \"The session's start time.\",\n                            \"format\": \"date-time\"\n                          },\n                          \"live_streaming\": {\n                            \"type\": \"object\",\n                            \"description\": \"Information about the participant.\",\n                            \"required\": [\"service\", \"custom_live_streaming_settings\", \"date_time\"],\n                            \"properties\": {\n                              \"service\": {\n                                \"type\": \"string\",\n                                \"description\": \"The name of the Live Streaming service.\",\n                                \"enum\": [\n                                  \"Facebook\",\n                                  \"Workplace_by_Facebook\",\n                                  \"YouTube\",\n                                  \"Custom_Live_Streaming_Service\"\n                                ]\n                              },\n                              \"custom_live_streaming_settings\": {\n                                \"type\": \"object\",\n                                \"description\": \"The live stream settings.\",\n                                \"required\": [\"stream_url\", \"stream_key\", \"page_url\"],\n                                \"properties\": {\n                                  \"stream_url\": {\n                                    \"type\": \"string\",\n                                    \"description\": \"The stream's URL.\"\n                                  },\n                                  \"stream_key\": {\n                                    \"type\": \"string\",\n                                    \"description\": \"The stream's key.\"\n                                  },\n                                  \"page_url\": {\n                                    \"type\": \"string\",\n                                    \"description\": \"The live stream's page URL.\"\n                                  },\n                                  \"resolution\": {\n                                    \"type\": \"string\",\n                                    \"description\": \"The number of pixels in each dimension that the video camera can display.\"\n                                  }\n                                }\n                              },\n                              \"date_time\": {\n                                \"type\": \"string\",\n                                \"description\": \"The live stream's start time.\",\n                                \"format\": \"date-time\"\n                              }\n                            }\n                          }\n                        },\n                        \"additionalProperties\": false\n                      }\n                    },\n                    \"additionalProperties\": false\n                  }\n                },\n                \"additionalProperties\": false\n              },\n              \"examples\": {\n                \"json-example\": {\n                  \"summary\": \"JSON example\",\n                  \"value\": \"{\\n  \\\"event\\\": \\\"session.live_streaming_started\\\",\\n  \\\"event_ts\\\": 1627906965803,\\n  \\\"payload\\\": {\\n    \\\"account_id\\\": \\\"D8cJuqWVQ623CI4Q8yQK0Q\\\",\\n    \\\"object\\\": {\\n      \\\"id\\\": \\\"BrgGrWeZSwaXkLBTpvmmvg==\\\",\\n      \\\"session_id\\\": \\\"4567UVWxYZABCdEfGhiJkl==\\\",\\n      \\\"session_name\\\": \\\"My Session\\\",\\n      \\\"session_key\\\": \\\"ABC36jaBI145\\\",\\n      \\\"start_time\\\": \\\"2021-08-02T12:03:32Z\\\",\\n      \\\"live_streaming\\\": {\\n        \\\"service\\\": \\\"Custom_Live_Streaming_Service\\\",\\n        \\\"custom_live_streaming_settings\\\": {\\n          \\\"stream_url\\\": \\\"https://example.com/livestream\\\",\\n          \\\"stream_key\\\": \\\"ABCDEFG12345HIJ6789\\\",\\n          \\\"page_url\\\": \\\"https://example.com/livestream/123\\\",\\n\\t\\t  \\\"resolution\\\": \\\"1080p\\\"\\n        },\\n        \\\"date_time\\\": \\\"2021-08-02T12:22:45Z\\\"\\n      }\\n    }\\n  }\\n}\"\n                }\n              }\n            }\n          }\n        },\n        \"responses\": {\n          \"200\": {\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"type\": \"object\",\n                  \"required\": [\"event\", \"event_ts\", \"payload\"],\n                  \"properties\": {\n                    \"event\": {\n                      \"type\": \"string\",\n                      \"enum\": [\"session.live_streaming_started\"],\n                      \"description\": \"Name of the event.\"\n                    },\n                    \"event_ts\": {\n                      \"type\": \"integer\",\n                      \"format\": \"int64\",\n                      \"description\": \"Timestamp (in milliseconds since epoch) at which the event occurred. The value of this field is returned in long(int64) format.\"\n                    },\n                    \"payload\": {\n                      \"type\": \"object\",\n                      \"required\": [\"account_id\", \"object\"],\n                      \"properties\": {\n                        \"account_id\": {\n                          \"type\": \"string\",\n                          \"description\": \"The Video SDK account ID.\"\n                        },\n                        \"object\": {\n                          \"type\": \"object\",\n                          \"description\": \"Information about the session.\",\n                          \"required\": [\n                            \"id\",\n                            \"session_id\",\n                            \"session_name\",\n                            \"start_time\",\n                            \"live_streaming\"\n                          ],\n                          \"properties\": {\n                            \"id\": {\n                              \"type\": \"string\",\n                              \"description\": \"The session ID.\",\n                              \"deprecated\": true\n                            },\n                            \"session_id\": {\n                              \"type\": \"string\",\n                              \"description\": \"Unique session identifier. Each instance of the session will have its own session_id.\"\n                            },\n                            \"session_name\": {\n                              \"type\": \"string\",\n                              \"description\": \"Session name.\"\n                            },\n                            \"session_key\": {\n                              \"type\": \"string\",\n                              \"description\": \"The Video SDK custom session ID.\"\n                            },\n                            \"start_time\": {\n                              \"type\": \"string\",\n                              \"description\": \"The session's start time.\",\n                              \"format\": \"date-time\"\n                            },\n                            \"live_streaming\": {\n                              \"type\": \"object\",\n                              \"description\": \"Information about the participant.\",\n                              \"required\": [\n                                \"service\",\n                                \"custom_live_streaming_settings\",\n                                \"date_time\"\n                              ],\n                              \"properties\": {\n                                \"service\": {\n                                  \"type\": \"string\",\n                                  \"description\": \"The name of the Live Streaming service.\",\n                                  \"enum\": [\n                                    \"Facebook\",\n                                    \"Workplace_by_Facebook\",\n                                    \"YouTube\",\n                                    \"Custom_Live_Streaming_Service\"\n                                  ]\n                                },\n                                \"custom_live_streaming_settings\": {\n                                  \"type\": \"object\",\n                                  \"description\": \"The live stream settings.\",\n                                  \"required\": [\"stream_url\", \"stream_key\", \"page_url\"],\n                                  \"properties\": {\n                                    \"stream_url\": {\n                                      \"type\": \"string\",\n                                      \"description\": \"The stream's URL.\"\n                                    },\n                                    \"stream_key\": {\n                                      \"type\": \"string\",\n                                      \"description\": \"The stream's key.\"\n                                    },\n                                    \"page_url\": {\n                                      \"type\": \"string\",\n                                      \"description\": \"The live stream's page URL.\"\n                                    },\n                                    \"resolution\": {\n                                      \"type\": \"string\",\n                                      \"description\": \"The number of pixels in each dimension that the video camera can display.\"\n                                    }\n                                  }\n                                },\n                                \"date_time\": {\n                                  \"type\": \"string\",\n                                  \"description\": \"The live stream's start time.\",\n                                  \"format\": \"date-time\"\n                                }\n                              }\n                            }\n                          },\n                          \"additionalProperties\": false\n                        }\n                      },\n                      \"additionalProperties\": false\n                    }\n                  },\n                  \"additionalProperties\": false\n                },\n                \"examples\": {\n                  \"json-example\": {\n                    \"summary\": \"JSON example\",\n                    \"value\": \"{\\n  \\\"event\\\": \\\"session.live_streaming_started\\\",\\n  \\\"event_ts\\\": 1627906965803,\\n  \\\"payload\\\": {\\n    \\\"account_id\\\": \\\"D8cJuqWVQ623CI4Q8yQK0Q\\\",\\n    \\\"object\\\": {\\n      \\\"id\\\": \\\"BrgGrWeZSwaXkLBTpvmmvg==\\\",\\n      \\\"session_id\\\": \\\"4567UVWxYZABCdEfGhiJkl==\\\",\\n      \\\"session_name\\\": \\\"My Session\\\",\\n      \\\"session_key\\\": \\\"ABC36jaBI145\\\",\\n      \\\"start_time\\\": \\\"2021-08-02T12:03:32Z\\\",\\n      \\\"live_streaming\\\": {\\n        \\\"service\\\": \\\"Custom_Live_Streaming_Service\\\",\\n        \\\"custom_live_streaming_settings\\\": {\\n          \\\"stream_url\\\": \\\"https://example.com/livestream\\\",\\n          \\\"stream_key\\\": \\\"ABCDEFG12345HIJ6789\\\",\\n          \\\"page_url\\\": \\\"https://example.com/livestream/123\\\",\\n\\t\\t  \\\"resolution\\\": \\\"1080p\\\"\\n        },\\n        \\\"date_time\\\": \\\"2021-08-02T12:22:45Z\\\"\\n      }\\n    }\\n  }\\n}\"\n                  }\n                }\n              }\n            }\n          }\n        }\n      }\n    },\n    \"session.user_room_system_callout_missed\": {\n      \"post\": {\n        \"tags\": [\"session\"],\n        \"operationId\": \"session.user_room_system_callout_missed\",\n        \"requestBody\": {\n          \"description\": \"# session.user_room_system_callout_missed\\n\\nThe **Invited party missed a session invitation through phone (call out) via Zoom room** event is triggered every time an invitation to [join a session through phone (call out) from a Zoom room](https://support.zoom.us/hc/en-us/articles/205369035) times out.\\n\\n## Prerequisites\\n\\n* **Event Subscriptions** must be enabled for your app with the following configurations:\\n* A valid **Event Notification Endpoint URL**.\\n* The **Invited party missed a session invitation through phone (call out) via Zoom room** subscription enabled under the **Session** event.\\n\\n\\n\\n**Event type**: `session.user_room_system_callout_missed`\\n\",\n          \"content\": {\n            \"application/json\": {\n              \"schema\": {\n                \"type\": \"object\",\n                \"required\": [\"event\", \"event_ts\", \"payload\"],\n                \"properties\": {\n                  \"event\": {\n                    \"type\": \"string\",\n                    \"description\": \"The name of the event.\"\n                  },\n                  \"event_ts\": {\n                    \"type\": \"integer\",\n                    \"format\": \"int64\",\n                    \"description\": \"A timestamp at which the event occurred.\"\n                  },\n                  \"payload\": {\n                    \"type\": \"object\",\n                    \"required\": [\"account_id\", \"object\"],\n                    \"properties\": {\n                      \"account_id\": {\n                        \"type\": \"string\",\n                        \"description\": \"The account ID of the session host.\"\n                      },\n                      \"object\": {\n                        \"type\": \"object\",\n                        \"description\": \"Information about the session.\",\n                        \"required\": [\n                          \"session_id\",\n                          \"session_name\",\n                          \"host_id\",\n                          \"message_id\",\n                          \"inviter_name\",\n                          \"participant\"\n                        ],\n                        \"properties\": {\n                          \"id\": {\n                            \"type\": \"integer\",\n                            \"format\": \"int64\",\n                            \"description\": \"The session ID.\",\n                            \"deprecated\": true\n                          },\n                          \"uuid\": {\n                            \"type\": \"string\",\n                            \"description\": \"The session's universally unique identifier (UUID). Each session instance generates a session UUID.\",\n                            \"deprecated\": true\n                          },\n                          \"session_id\": {\n                            \"type\": \"string\",\n                            \"description\": \"Unique session identifier. Each instance of the session will have its own session_id.\"\n                          },\n                          \"session_name\": {\n                            \"type\": \"string\",\n                            \"description\": \"Session name.\"\n                          },\n                          \"host_id\": {\n                            \"type\": \"string\",\n                            \"description\": \"The user ID of the session host.\"\n                          },\n                          \"message_id\": {\n                            \"type\": \"string\",\n                            \"description\": \"The request unique identifier (UUID).\"\n                          },\n                          \"inviter_name\": {\n                            \"type\": \"string\",\n                            \"description\": \"The user name of the event's trigger.\"\n                          },\n                          \"participant\": {\n                            \"type\": \"object\",\n                            \"description\": \"Information about the invited participant.\",\n                            \"required\": [\"call_type\", \"device_ip\"],\n                            \"properties\": {\n                              \"call_type\": {\n                                \"type\": \"string\",\n                                \"description\": \"The type of call out. Use a value of h323 or sip.\"\n                              },\n                              \"device_ip\": {\n                                \"type\": \"string\",\n                                \"description\": \"The user's device IP address.\"\n                              }\n                            },\n                            \"additionalProperties\": true\n                          }\n                        },\n                        \"additionalProperties\": false\n                      }\n                    },\n                    \"additionalProperties\": false\n                  }\n                },\n                \"additionalProperties\": false\n              },\n              \"examples\": {\n                \"json-example\": {\n                  \"summary\": \"JSON example\",\n                  \"value\": \"{\\n  \\\"event\\\": \\\"session.user_room_system_callout_missed\\\",\\n  \\\"event_ts\\\": 1626230691572,\\n  \\\"payload\\\": {\\n    \\\"account_id\\\": \\\"dzVA4QmMQfyISoRcpFO8CA\\\",\\n    \\\"object\\\": {\\n      \\\"id\\\": 713592696,\\n      \\\"uuid\\\": \\\"4444AAAiAAAAAiAiAiiAii==\\\",\\n      \\\"session_id\\\": \\\"4444AAAiAAAAAiAiAiiAii==\\\",\\n      \\\"session_name\\\": \\\"My Session\\\",\\n      \\\"host_id\\\": \\\"ICuPoX4ERtikRcKqkVxunQ\\\",\\n      \\\"message_id\\\": \\\"atsXxhSEQWit9t+U02HXNQ==\\\",\\n      \\\"inviter_name\\\": \\\"Jill Chill\\\",\\n      \\\"participant\\\": {\\n        \\\"call_type\\\": \\\"h323\\\",\\n        \\\"device_ip\\\": \\\"10.100.111.237\\\"\\n      }\\n    }\\n  }\\n}\"\n                }\n              }\n            }\n          }\n        },\n        \"responses\": {\n          \"200\": {\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"type\": \"object\",\n                  \"required\": [\"event\", \"event_ts\", \"payload\"],\n                  \"properties\": {\n                    \"event\": {\n                      \"type\": \"string\",\n                      \"description\": \"The name of the event.\"\n                    },\n                    \"event_ts\": {\n                      \"type\": \"integer\",\n                      \"format\": \"int64\",\n                      \"description\": \"A timestamp at which the event occurred.\"\n                    },\n                    \"payload\": {\n                      \"type\": \"object\",\n                      \"required\": [\"account_id\", \"object\"],\n                      \"properties\": {\n                        \"account_id\": {\n                          \"type\": \"string\",\n                          \"description\": \"The account ID of the session host.\"\n                        },\n                        \"object\": {\n                          \"type\": \"object\",\n                          \"description\": \"Information about the session.\",\n                          \"required\": [\n                            \"session_id\",\n                            \"session_name\",\n                            \"host_id\",\n                            \"message_id\",\n                            \"inviter_name\",\n                            \"participant\"\n                          ],\n                          \"properties\": {\n                            \"id\": {\n                              \"type\": \"integer\",\n                              \"format\": \"int64\",\n                              \"description\": \"The session ID.\",\n                              \"deprecated\": true\n                            },\n                            \"uuid\": {\n                              \"type\": \"string\",\n                              \"description\": \"The session's universally unique identifier (UUID). Each session instance generates a session UUID.\",\n                              \"deprecated\": true\n                            },\n                            \"session_id\": {\n                              \"type\": \"string\",\n                              \"description\": \"Unique session identifier. Each instance of the session will have its own session_id.\"\n                            },\n                            \"session_name\": {\n                              \"type\": \"string\",\n                              \"description\": \"Session name.\"\n                            },\n                            \"host_id\": {\n                              \"type\": \"string\",\n                              \"description\": \"The user ID of the session host.\"\n                            },\n                            \"message_id\": {\n                              \"type\": \"string\",\n                              \"description\": \"The request unique identifier (UUID).\"\n                            },\n                            \"inviter_name\": {\n                              \"type\": \"string\",\n                              \"description\": \"The user name of the event's trigger.\"\n                            },\n                            \"participant\": {\n                              \"type\": \"object\",\n                              \"description\": \"Information about the invited participant.\",\n                              \"required\": [\"call_type\", \"device_ip\"],\n                              \"properties\": {\n                                \"call_type\": {\n                                  \"type\": \"string\",\n                                  \"description\": \"The type of call out. Use a value of h323 or sip.\"\n                                },\n                                \"device_ip\": {\n                                  \"type\": \"string\",\n                                  \"description\": \"The user's device IP address.\"\n                                }\n                              },\n                              \"additionalProperties\": true\n                            }\n                          },\n                          \"additionalProperties\": false\n                        }\n                      },\n                      \"additionalProperties\": false\n                    }\n                  },\n                  \"additionalProperties\": false\n                },\n                \"examples\": {\n                  \"json-example\": {\n                    \"summary\": \"JSON example\",\n                    \"value\": \"{\\n  \\\"event\\\": \\\"session.user_room_system_callout_missed\\\",\\n  \\\"event_ts\\\": 1626230691572,\\n  \\\"payload\\\": {\\n    \\\"account_id\\\": \\\"dzVA4QmMQfyISoRcpFO8CA\\\",\\n    \\\"object\\\": {\\n      \\\"id\\\": 713592696,\\n      \\\"uuid\\\": \\\"4444AAAiAAAAAiAiAiiAii==\\\",\\n      \\\"session_id\\\": \\\"4444AAAiAAAAAiAiAiiAii==\\\",\\n      \\\"session_name\\\": \\\"My Session\\\",\\n      \\\"host_id\\\": \\\"ICuPoX4ERtikRcKqkVxunQ\\\",\\n      \\\"message_id\\\": \\\"atsXxhSEQWit9t+U02HXNQ==\\\",\\n      \\\"inviter_name\\\": \\\"Jill Chill\\\",\\n      \\\"participant\\\": {\\n        \\\"call_type\\\": \\\"h323\\\",\\n        \\\"device_ip\\\": \\\"10.100.111.237\\\"\\n      }\\n    }\\n  }\\n}\"\n                  }\n                }\n              }\n            }\n          }\n        }\n      }\n    },\n    \"session.user_phone_callout_accepted\": {\n      \"post\": {\n        \"tags\": [\"session\"],\n        \"operationId\": \"session.user_phone_callout_accepted\",\n        \"requestBody\": {\n          \"description\": \"# session.user_phone_callout_accepted\\n\\nThe **Invited party answered a session invitation through phone (call out)** event is triggered every time a user accepts an invitation to join a session through phone (call out). Video SDK call out operates in a similar manner as [Zoom meeting call out](https://support.zoom.com/hc/article?id=zm_kb&sysparm_article=KB0062038).\\n\\n## Prerequisites\\n\\n* **Event Subscriptions** must be enabled for your app with the following configurations:\\n  * A valid **Event Notification Endpoint URL**.\\n  * The **Invited party answered a session invitation through phone (call out)** subscription enabled under the **Session** event.\\n\\n\\n\\n**Event type**: `session.user_phone_callout_accepted`\\n\",\n          \"content\": {\n            \"application/json\": {\n              \"schema\": {\n                \"type\": \"object\",\n                \"required\": [\"event\", \"event_ts\", \"payload\"],\n                \"properties\": {\n                  \"event\": {\n                    \"type\": \"string\",\n                    \"description\": \"The name of the event.\"\n                  },\n                  \"event_ts\": {\n                    \"type\": \"integer\",\n                    \"format\": \"int64\",\n                    \"description\": \"A timestamp at which the event occurred.\"\n                  },\n                  \"payload\": {\n                    \"type\": \"object\",\n                    \"required\": [\"account_id\", \"object\"],\n                    \"properties\": {\n                      \"account_id\": {\n                        \"type\": \"string\",\n                        \"description\": \"The account ID of the session host.\"\n                      },\n                      \"object\": {\n                        \"type\": \"object\",\n                        \"description\": \"Information about the session.\",\n                        \"required\": [\n                          \"session_id\",\n                          \"session_name\",\n                          \"session_key\",\n                          \"user_key\",\n                          \"host_id\",\n                          \"participant\"\n                        ],\n                        \"properties\": {\n                          \"id\": {\n                            \"type\": \"integer\",\n                            \"format\": \"int64\",\n                            \"description\": \"The session ID.\",\n                            \"deprecated\": true\n                          },\n                          \"uuid\": {\n                            \"type\": \"string\",\n                            \"description\": \"The session's universally unique identifier (UUID). Each session instance generates a session UUID.\",\n                            \"deprecated\": true\n                          },\n                          \"session_id\": {\n                            \"type\": \"string\",\n                            \"description\": \"Unique session identifier. Each instance of the session will have its own session_id.\"\n                          },\n                          \"session_name\": {\n                            \"type\": \"string\",\n                            \"description\": \"Session name.\"\n                          },\n                          \"session_key\": {\n                            \"type\": \"string\",\n                            \"description\": \"The Video SDK custom session ID.\"\n                          },\n                          \"user_key\": {\n                            \"type\": \"string\",\n                            \"description\": \"Another identifier for the inviter. Can be a number or characters.\"\n                          },\n                          \"host_id\": {\n                            \"type\": \"string\",\n                            \"description\": \"The user ID of the session host.\"\n                          },\n                          \"participant\": {\n                            \"type\": \"object\",\n                            \"description\": \"Information about the invited participant.\",\n                            \"required\": [\"invitee_name\", \"phone_number\", \"from_number\"],\n                            \"properties\": {\n                              \"invitee_name\": {\n                                \"type\": \"string\",\n                                \"description\": \"The user's name to display in the session.\"\n                              },\n                              \"phone_number\": {\n                                \"type\": \"integer\",\n                                \"format\": \"int64\",\n                                \"description\": \"The user's phone number.\"\n                              },\n                              \"from_number\": {\n                                \"type\": \"integer\",\n                                \"format\": \"int64\",\n                                \"description\": \"The number used to call out to the invited user.\"\n                              }\n                            },\n                            \"additionalProperties\": false\n                          }\n                        },\n                        \"additionalProperties\": false\n                      }\n                    },\n                    \"additionalProperties\": false\n                  }\n                },\n                \"additionalProperties\": false\n              },\n              \"examples\": {\n                \"json-example\": {\n                  \"summary\": \"JSON example\",\n                  \"value\": \"{\\n  \\\"event\\\": \\\"session.user_phone_callout_accepted\\\",\\n  \\\"event_ts\\\": 1626230691572,\\n  \\\"payload\\\": {\\n    \\\"account_id\\\": \\\"dzVA4QmMQfyISoRcpFO8CA\\\",\\n    \\\"object\\\": {\\n      \\\"id\\\": 713592696,\\n      \\\"uuid\\\": \\\"4444AAAiAAAAAiAiAiiAii==\\\",\\n      \\\"session_id\\\": \\\"4444AAAiAAAAAiAiAiiAii==\\\",\\n      \\\"session_name\\\": \\\"My Session\\\",\\n      \\\"session_key\\\": \\\"ABC36jaBI145\\\",\\n      \\\"user_key\\\": \\\"ASD74dfDI854\\\",\\n      \\\"host_id\\\": \\\"ICuPoX4ERtikRcKqkVxunQ\\\",\\n      \\\"participant\\\": {\\n        \\\"invitee_name\\\": \\\"Jill Chill\\\",\\n        \\\"phone_number\\\": 15555550100,\\n        \\\"from_number\\\": 13167900000\\n      }\\n    }\\n  }\\n}\"\n                }\n              }\n            }\n          }\n        },\n        \"responses\": {\n          \"200\": {\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"type\": \"object\",\n                  \"required\": [\"event\", \"event_ts\", \"payload\"],\n                  \"properties\": {\n                    \"event\": {\n                      \"type\": \"string\",\n                      \"description\": \"The name of the event.\"\n                    },\n                    \"event_ts\": {\n                      \"type\": \"integer\",\n                      \"format\": \"int64\",\n                      \"description\": \"A timestamp at which the event occurred.\"\n                    },\n                    \"payload\": {\n                      \"type\": \"object\",\n                      \"required\": [\"account_id\", \"object\"],\n                      \"properties\": {\n                        \"account_id\": {\n                          \"type\": \"string\",\n                          \"description\": \"The account ID of the session host.\"\n                        },\n                        \"object\": {\n                          \"type\": \"object\",\n                          \"description\": \"Information about the session.\",\n                          \"required\": [\n                            \"session_id\",\n                            \"session_name\",\n                            \"session_key\",\n                            \"user_key\",\n                            \"host_id\",\n                            \"participant\"\n                          ],\n                          \"properties\": {\n                            \"id\": {\n                              \"type\": \"integer\",\n                              \"format\": \"int64\",\n                              \"description\": \"The session ID.\",\n                              \"deprecated\": true\n                            },\n                            \"uuid\": {\n                              \"type\": \"string\",\n                              \"description\": \"The session's universally unique identifier (UUID). Each session instance generates a session UUID.\",\n                              \"deprecated\": true\n                            },\n                            \"session_id\": {\n                              \"type\": \"string\",\n                              \"description\": \"Unique session identifier. Each instance of the session will have its own session_id.\"\n                            },\n                            \"session_name\": {\n                              \"type\": \"string\",\n                              \"description\": \"Session name.\"\n                            },\n                            \"session_key\": {\n                              \"type\": \"string\",\n                              \"description\": \"The Video SDK custom session ID.\"\n                            },\n                            \"user_key\": {\n                              \"type\": \"string\",\n                              \"description\": \"Another identifier for the inviter. Can be a number or characters.\"\n                            },\n                            \"host_id\": {\n                              \"type\": \"string\",\n                              \"description\": \"The user ID of the session host.\"\n                            },\n                            \"participant\": {\n                              \"type\": \"object\",\n                              \"description\": \"Information about the invited participant.\",\n                              \"required\": [\"invitee_name\", \"phone_number\", \"from_number\"],\n                              \"properties\": {\n                                \"invitee_name\": {\n                                  \"type\": \"string\",\n                                  \"description\": \"The user's name to display in the session.\"\n                                },\n                                \"phone_number\": {\n                                  \"type\": \"integer\",\n                                  \"format\": \"int64\",\n                                  \"description\": \"The user's phone number.\"\n                                },\n                                \"from_number\": {\n                                  \"type\": \"integer\",\n                                  \"format\": \"int64\",\n                                  \"description\": \"The number used to call out to the invited user.\"\n                                }\n                              },\n                              \"additionalProperties\": false\n                            }\n                          },\n                          \"additionalProperties\": false\n                        }\n                      },\n                      \"additionalProperties\": false\n                    }\n                  },\n                  \"additionalProperties\": false\n                },\n                \"examples\": {\n                  \"json-example\": {\n                    \"summary\": \"JSON example\",\n                    \"value\": \"{\\n  \\\"event\\\": \\\"session.user_phone_callout_accepted\\\",\\n  \\\"event_ts\\\": 1626230691572,\\n  \\\"payload\\\": {\\n    \\\"account_id\\\": \\\"dzVA4QmMQfyISoRcpFO8CA\\\",\\n    \\\"object\\\": {\\n      \\\"id\\\": 713592696,\\n      \\\"uuid\\\": \\\"4444AAAiAAAAAiAiAiiAii==\\\",\\n      \\\"session_id\\\": \\\"4444AAAiAAAAAiAiAiiAii==\\\",\\n      \\\"session_name\\\": \\\"My Session\\\",\\n      \\\"session_key\\\": \\\"ABC36jaBI145\\\",\\n      \\\"user_key\\\": \\\"ASD74dfDI854\\\",\\n      \\\"host_id\\\": \\\"ICuPoX4ERtikRcKqkVxunQ\\\",\\n      \\\"participant\\\": {\\n        \\\"invitee_name\\\": \\\"Jill Chill\\\",\\n        \\\"phone_number\\\": 15555550100,\\n        \\\"from_number\\\": 13167900000\\n      }\\n    }\\n  }\\n}\"\n                  }\n                }\n              }\n            }\n          }\n        }\n      }\n    },\n    \"session.user_left\": {\n      \"post\": {\n        \"tags\": [\"session\"],\n        \"operationId\": \"session.user_left\",\n        \"requestBody\": {\n          \"description\": \"# session.user_left\\n\\n\\nThe Session User Left event is triggered every time a user (including host and co-host) leaves a session.\\n\\n## Prerequisites\\nEvent Subscriptions must be enabled for your [Marketplace app](https://marketplace.zoom.us/user/build) with the following configurations:\\n\\n* A valid Event Notification Endpoint URL.\\n* Session User Left subscription enabled under the Video SDK event.\\n\\n\\n\\n**Event type**: `session.user_left`\\n\",\n          \"content\": {\n            \"application/json\": {\n              \"schema\": {\n                \"type\": \"object\",\n                \"required\": [\"event\", \"event_ts\", \"payload\"],\n                \"properties\": {\n                  \"event\": {\n                    \"type\": \"string\",\n                    \"enum\": [\"session.user_left\"],\n                    \"description\": \"The event's name.\"\n                  },\n                  \"event_ts\": {\n                    \"type\": \"integer\",\n                    \"format\": \"int64\",\n                    \"description\": \"A timestamp, in milliseconds since epoch, at which the event occurred.\"\n                  },\n                  \"payload\": {\n                    \"type\": \"object\",\n                    \"required\": [\"account_id\", \"object\"],\n                    \"properties\": {\n                      \"account_id\": {\n                        \"type\": \"string\",\n                        \"description\": \"The Video SDK account ID.\"\n                      },\n                      \"object\": {\n                        \"type\": \"object\",\n                        \"description\": \"Information about the session. This object only returns updated properties.\",\n                        \"required\": [\"id\", \"session_id\", \"session_name\", \"user\"],\n                        \"properties\": {\n                          \"id\": {\n                            \"type\": \"string\",\n                            \"description\": \"The session ID.\"\n                          },\n                          \"session_id\": {\n                            \"type\": \"string\",\n                            \"description\": \"Unique session identifier. Each instance of the session will have its own session_id.\"\n                          },\n                          \"session_name\": {\n                            \"type\": \"string\",\n                            \"description\": \"Session name.\"\n                          },\n                          \"session_key\": {\n                            \"type\": \"string\",\n                            \"description\": \"The Video SDK custom session ID.\"\n                          },\n                          \"user\": {\n                            \"type\": \"object\",\n                            \"description\": \"Information about the user.\",\n                            \"required\": [\"id\", \"name\", \"leave_time\", \"participant_uuid\"],\n                            \"properties\": {\n                              \"id\": {\n                                \"type\": \"string\",\n                                \"description\": \"The user's unique ID. This value is assigned to the user upon joining a session and is only valid for that session.\"\n                              },\n                              \"name\": {\n                                \"type\": \"string\",\n                                \"description\": \"The user's username.\"\n                              },\n                              \"leave_time\": {\n                                \"type\": \"string\",\n                                \"description\": \"The time at which the user left the session.\",\n                                \"format\": \"date-time\"\n                              },\n                              \"leave_reason\": {\n                                \"type\": \"string\",\n                                \"description\": \"The reason why the user left the session, where $name is the participant's username: \\n* $name left the session. \\n* $name got disconnected from the session. \\n* Host ended the session. \\n* Host closed the session. \\n* Host started a new session. \\n* Network connection error. \\n* Host did not join. \\n* Exceeded free session minutes limit. \\n* Removed by host. \\n* Unknown reason. \\n* Leave waiting room. \\n* Removed by host from waiting room.\",\n                                \"x-enum\": [\n                                  \"$name left the session.\",\n                                  \"$name got disconnected from the session.\",\n                                  \"Host ended the session.\",\n                                  \"Host closed the session.\",\n                                  \"Host started a new session.\",\n                                  \"Network connection error.\",\n                                  \"Host did not join.\",\n                                  \"Exceeded free session minutes limit.\",\n                                  \"Removed by host.\",\n                                  \"Unknown reason.\",\n                                  \"Leave waiting room.\",\n                                  \"Removed by host from waiting room.\"\n                                ]\n                              },\n                              \"user_key\": {\n                                \"type\": \"string\",\n                                \"description\": \"Another identifier for the user. Can be a number or characters.\"\n                              },\n                              \"phone_number\": {\n                                \"type\": \"string\",\n                                \"description\": \"Phone number of participant joined via PSTN.\"\n                              },\n                              \"participant_uuid\": {\n                                \"type\": \"string\",\n                                \"description\": \"The participant's UUID. This value is assigned to a participant upon joining a session and is only valid for the session's duration.\"\n                              }\n                            },\n                            \"additionalProperties\": false\n                          }\n                        },\n                        \"additionalProperties\": false\n                      }\n                    },\n                    \"additionalProperties\": false\n                  }\n                },\n                \"additionalProperties\": false\n              },\n              \"examples\": {\n                \"json-example\": {\n                  \"summary\": \"JSON example\",\n                  \"value\": \"{\\n  \\\"event\\\": \\\"session.user_left\\\",\\n  \\\"event_ts\\\": 1626473951859,\\n  \\\"payload\\\": {\\n    \\\"account_id\\\": \\\"EFgHiJABC000DEfGHI\\\",\\n    \\\"object\\\": {\\n      \\\"id\\\": \\\"4567UVWxYZABCdEfGhiJkl==\\\",\\n      \\\"session_id\\\": \\\"4567UVWxYZABCdEfGhiJkl==\\\",\\n      \\\"session_name\\\": \\\"My Session\\\",\\n      \\\"session_key\\\": \\\"ABC36jaBI145\\\",\\n      \\\"user\\\": {\\n        \\\"id\\\": \\\"25508864\\\",\\n        \\\"name\\\": \\\"example\\\",\\n        \\\"leave_time\\\": \\\"2021-07-16T17:19:11Z\\\",\\n        \\\"leave_reason\\\": \\\"Jill Chill left the session.<br>Reason: Host ended the session.\\\",\\n        \\\"user_key\\\": \\\"ASD74dfDI854\\\",\\n        \\\"phone_number\\\": \\\"8615250064084\\\",\\n        \\\"participant_uuid\\\": \\\"55555AAAiAAAAAiAiAiiAii\\\"\\n      }\\n    }\\n  }\\n}\"\n                }\n              }\n            }\n          }\n        },\n        \"responses\": {\n          \"200\": {\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"type\": \"object\",\n                  \"required\": [\"event\", \"event_ts\", \"payload\"],\n                  \"properties\": {\n                    \"event\": {\n                      \"type\": \"string\",\n                      \"enum\": [\"session.user_left\"],\n                      \"description\": \"The event's name.\"\n                    },\n                    \"event_ts\": {\n                      \"type\": \"integer\",\n                      \"format\": \"int64\",\n                      \"description\": \"A timestamp, in milliseconds since epoch, at which the event occurred.\"\n                    },\n                    \"payload\": {\n                      \"type\": \"object\",\n                      \"required\": [\"account_id\", \"object\"],\n                      \"properties\": {\n                        \"account_id\": {\n                          \"type\": \"string\",\n                          \"description\": \"The Video SDK account ID.\"\n                        },\n                        \"object\": {\n                          \"type\": \"object\",\n                          \"description\": \"Information about the session. This object only returns updated properties.\",\n                          \"required\": [\"id\", \"session_id\", \"session_name\", \"user\"],\n                          \"properties\": {\n                            \"id\": {\n                              \"type\": \"string\",\n                              \"description\": \"The session ID.\"\n                            },\n                            \"session_id\": {\n                              \"type\": \"string\",\n                              \"description\": \"Unique session identifier. Each instance of the session will have its own session_id.\"\n                            },\n                            \"session_name\": {\n                              \"type\": \"string\",\n                              \"description\": \"Session name.\"\n                            },\n                            \"session_key\": {\n                              \"type\": \"string\",\n                              \"description\": \"The Video SDK custom session ID.\"\n                            },\n                            \"user\": {\n                              \"type\": \"object\",\n                              \"description\": \"Information about the user.\",\n                              \"required\": [\"id\", \"name\", \"leave_time\", \"participant_uuid\"],\n                              \"properties\": {\n                                \"id\": {\n                                  \"type\": \"string\",\n                                  \"description\": \"The user's unique ID. This value is assigned to the user upon joining a session and is only valid for that session.\"\n                                },\n                                \"name\": {\n                                  \"type\": \"string\",\n                                  \"description\": \"The user's username.\"\n                                },\n                                \"leave_time\": {\n                                  \"type\": \"string\",\n                                  \"description\": \"The time at which the user left the session.\",\n                                  \"format\": \"date-time\"\n                                },\n                                \"leave_reason\": {\n                                  \"type\": \"string\",\n                                  \"description\": \"The reason why the user left the session, where $name is the participant's username: \\n* $name left the session. \\n* $name got disconnected from the session. \\n* Host ended the session. \\n* Host closed the session. \\n* Host started a new session. \\n* Network connection error. \\n* Host did not join. \\n* Exceeded free session minutes limit. \\n* Removed by host. \\n* Unknown reason. \\n* Leave waiting room. \\n* Removed by host from waiting room.\",\n                                  \"x-enum\": [\n                                    \"$name left the session.\",\n                                    \"$name got disconnected from the session.\",\n                                    \"Host ended the session.\",\n                                    \"Host closed the session.\",\n                                    \"Host started a new session.\",\n                                    \"Network connection error.\",\n                                    \"Host did not join.\",\n                                    \"Exceeded free session minutes limit.\",\n                                    \"Removed by host.\",\n                                    \"Unknown reason.\",\n                                    \"Leave waiting room.\",\n                                    \"Removed by host from waiting room.\"\n                                  ]\n                                },\n                                \"user_key\": {\n                                  \"type\": \"string\",\n                                  \"description\": \"Another identifier for the user. Can be a number or characters.\"\n                                },\n                                \"phone_number\": {\n                                  \"type\": \"string\",\n                                  \"description\": \"Phone number of participant joined via PSTN.\"\n                                },\n                                \"participant_uuid\": {\n                                  \"type\": \"string\",\n                                  \"description\": \"The participant's UUID. This value is assigned to a participant upon joining a session and is only valid for the session's duration.\"\n                                }\n                              },\n                              \"additionalProperties\": false\n                            }\n                          },\n                          \"additionalProperties\": false\n                        }\n                      },\n                      \"additionalProperties\": false\n                    }\n                  },\n                  \"additionalProperties\": false\n                },\n                \"examples\": {\n                  \"json-example\": {\n                    \"summary\": \"JSON example\",\n                    \"value\": \"{\\n  \\\"event\\\": \\\"session.user_left\\\",\\n  \\\"event_ts\\\": 1626473951859,\\n  \\\"payload\\\": {\\n    \\\"account_id\\\": \\\"EFgHiJABC000DEfGHI\\\",\\n    \\\"object\\\": {\\n      \\\"id\\\": \\\"4567UVWxYZABCdEfGhiJkl==\\\",\\n      \\\"session_id\\\": \\\"4567UVWxYZABCdEfGhiJkl==\\\",\\n      \\\"session_name\\\": \\\"My Session\\\",\\n      \\\"session_key\\\": \\\"ABC36jaBI145\\\",\\n      \\\"user\\\": {\\n        \\\"id\\\": \\\"25508864\\\",\\n        \\\"name\\\": \\\"example\\\",\\n        \\\"leave_time\\\": \\\"2021-07-16T17:19:11Z\\\",\\n        \\\"leave_reason\\\": \\\"Jill Chill left the session.<br>Reason: Host ended the session.\\\",\\n        \\\"user_key\\\": \\\"ASD74dfDI854\\\",\\n        \\\"phone_number\\\": \\\"8615250064084\\\",\\n        \\\"participant_uuid\\\": \\\"55555AAAiAAAAAiAiAiiAii\\\"\\n      }\\n    }\\n  }\\n}\"\n                  }\n                }\n              }\n            }\n          }\n        }\n      }\n    },\n    \"session.sharing_started\": {\n      \"post\": {\n        \"tags\": [\"session\"],\n        \"operationId\": \"session.sharing_started\",\n        \"requestBody\": {\n          \"description\": \"# session.sharing_started\\n\\n\\nThe Session Sharing Started event is triggered every time a user starts sharing the screen during a session.\\n\\n## Prerequisites\\nEvent Subscriptions must be enabled for your [Marketplace app](https://marketplace.zoom.us/user/build) with the following configurations:\\n\\n* A valid Event Notification Endpoint URL.\\n* **Session Sharing Started** subscription enabled under the **Video SDK** event.\\n\\nThe tabs below display the complete schema, payload with data types, and an example of the `session.sharing_started` event notification:\\n\\n\\n\\n**Event type**: `session.sharing_started`\\n\",\n          \"content\": {\n            \"application/json\": {\n              \"schema\": {\n                \"type\": \"object\",\n                \"required\": [\"event\", \"event_ts\", \"payload\"],\n                \"properties\": {\n                  \"event\": {\n                    \"type\": \"string\",\n                    \"enum\": [\"session.sharing_started\"],\n                    \"description\": \"The event's name.\"\n                  },\n                  \"event_ts\": {\n                    \"type\": \"integer\",\n                    \"format\": \"int64\",\n                    \"description\": \"A timestamp, in milliseconds since epoch, at which the event occurred.\"\n                  },\n                  \"payload\": {\n                    \"type\": \"object\",\n                    \"required\": [\"account_id\", \"object\"],\n                    \"properties\": {\n                      \"account_id\": {\n                        \"type\": \"string\",\n                        \"description\": \"The Video SDK account ID.\"\n                      },\n                      \"object\": {\n                        \"type\": \"object\",\n                        \"description\": \"Information about the session. This object only returns updated properties.\",\n                        \"required\": [\"id\", \"session_id\", \"session_name\", \"user\"],\n                        \"properties\": {\n                          \"id\": {\n                            \"type\": \"string\",\n                            \"description\": \"The session ID.\"\n                          },\n                          \"session_id\": {\n                            \"type\": \"string\",\n                            \"description\": \"Unique session identifier. Each instance of the session will have its own session_id.\"\n                          },\n                          \"session_name\": {\n                            \"type\": \"string\",\n                            \"description\": \"Session name.\"\n                          },\n                          \"session_key\": {\n                            \"type\": \"string\",\n                            \"description\": \"The Video SDK custom session ID.\"\n                          },\n                          \"user\": {\n                            \"type\": \"object\",\n                            \"description\": \"Information about the user.\",\n                            \"required\": [\"id\", \"name\", \"sharing_details\"],\n                            \"properties\": {\n                              \"id\": {\n                                \"type\": \"string\",\n                                \"description\": \"The user's unique ID. This value is assigned to the user upon joining a session and is only valid for that session.\"\n                              },\n                              \"name\": {\n                                \"type\": \"string\",\n                                \"description\": \"The user's username.\"\n                              },\n                              \"user_key\": {\n                                \"type\": \"string\",\n                                \"description\": \"Another identifier for the user. Can be a number or characters.\"\n                              },\n                              \"sharing_details\": {\n                                \"type\": \"object\",\n                                \"description\": \"Information about the session's screen sharing.\",\n                                \"required\": [\"content\", \"date_time\"],\n                                \"properties\": {\n                                  \"content\": {\n                                    \"type\": \"string\",\n                                    \"description\": \"The type of shared content:\\n* application — An application. For example, a web browser.\\n* whiteboard — The Zoom [whiteboard](https://support.zoom.us/hc/en-us/articles/205677665-Sharing-a-whiteboard).\\n* desktop — A user's desktop.\\n* unknown — An unrecognized application, such as a third party app.\",\n                                    \"enum\": [\"application\", \"whiteboard\", \"desktop\", \"unknown\"]\n                                  },\n                                  \"date_time\": {\n                                    \"type\": \"string\",\n                                    \"format\": \"date-time\",\n                                    \"description\": \"The session's screen sharing date and time.\"\n                                  }\n                                },\n                                \"additionalProperties\": false\n                              }\n                            },\n                            \"additionalProperties\": false\n                          }\n                        },\n                        \"additionalProperties\": false\n                      }\n                    },\n                    \"additionalProperties\": false\n                  }\n                },\n                \"additionalProperties\": false\n              },\n              \"examples\": {\n                \"json-example\": {\n                  \"summary\": \"JSON example\",\n                  \"value\": \"{\\n  \\\"event\\\": \\\"session.sharing_started\\\",\\n  \\\"event_ts\\\": 1626473951859,\\n  \\\"payload\\\": {\\n    \\\"object\\\": {\\n      \\\"id\\\": \\\"4118UHIiRCAAAtBlDkcVyw==\\\",\\n      \\\"session_id\\\": \\\"4567UVWxYZABCdEfGhiJkl==\\\",\\n      \\\"session_name\\\": \\\"My Session\\\",\\n      \\\"session_key\\\": \\\"ABC36jaBI145\\\",\\n      \\\"user\\\": {\\n        \\\"id\\\": \\\"25508864\\\",\\n        \\\"name\\\": \\\"username\\\",\\n        \\\"user_key\\\": \\\"ASD74dfDI854\\\",\\n        \\\"sharing_details\\\": {\\n          \\\"date_time\\\": \\\"2019-07-16T17:19:11Z\\\",\\n          \\\"content\\\": \\\"application\\\"\\n        }\\n      }\\n    },\\n    \\\"account_id\\\": \\\"EPeQtiABC000VYxHMA\\\"\\n  }\\n}\"\n                }\n              }\n            }\n          }\n        },\n        \"responses\": {\n          \"200\": {\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"type\": \"object\",\n                  \"required\": [\"event\", \"event_ts\", \"payload\"],\n                  \"properties\": {\n                    \"event\": {\n                      \"type\": \"string\",\n                      \"enum\": [\"session.sharing_started\"],\n                      \"description\": \"The event's name.\"\n                    },\n                    \"event_ts\": {\n                      \"type\": \"integer\",\n                      \"format\": \"int64\",\n                      \"description\": \"A timestamp, in milliseconds since epoch, at which the event occurred.\"\n                    },\n                    \"payload\": {\n                      \"type\": \"object\",\n                      \"required\": [\"account_id\", \"object\"],\n                      \"properties\": {\n                        \"account_id\": {\n                          \"type\": \"string\",\n                          \"description\": \"The Video SDK account ID.\"\n                        },\n                        \"object\": {\n                          \"type\": \"object\",\n                          \"description\": \"Information about the session. This object only returns updated properties.\",\n                          \"required\": [\"id\", \"session_id\", \"session_name\", \"user\"],\n                          \"properties\": {\n                            \"id\": {\n                              \"type\": \"string\",\n                              \"description\": \"The session ID.\"\n                            },\n                            \"session_id\": {\n                              \"type\": \"string\",\n                              \"description\": \"Unique session identifier. Each instance of the session will have its own session_id.\"\n                            },\n                            \"session_name\": {\n                              \"type\": \"string\",\n                              \"description\": \"Session name.\"\n                            },\n                            \"session_key\": {\n                              \"type\": \"string\",\n                              \"description\": \"The Video SDK custom session ID.\"\n                            },\n                            \"user\": {\n                              \"type\": \"object\",\n                              \"description\": \"Information about the user.\",\n                              \"required\": [\"id\", \"name\", \"sharing_details\"],\n                              \"properties\": {\n                                \"id\": {\n                                  \"type\": \"string\",\n                                  \"description\": \"The user's unique ID. This value is assigned to the user upon joining a session and is only valid for that session.\"\n                                },\n                                \"name\": {\n                                  \"type\": \"string\",\n                                  \"description\": \"The user's username.\"\n                                },\n                                \"user_key\": {\n                                  \"type\": \"string\",\n                                  \"description\": \"Another identifier for the user. Can be a number or characters.\"\n                                },\n                                \"sharing_details\": {\n                                  \"type\": \"object\",\n                                  \"description\": \"Information about the session's screen sharing.\",\n                                  \"required\": [\"content\", \"date_time\"],\n                                  \"properties\": {\n                                    \"content\": {\n                                      \"type\": \"string\",\n                                      \"description\": \"The type of shared content:\\n* application — An application. For example, a web browser.\\n* whiteboard — The Zoom [whiteboard](https://support.zoom.us/hc/en-us/articles/205677665-Sharing-a-whiteboard).\\n* desktop — A user's desktop.\\n* unknown — An unrecognized application, such as a third party app.\",\n                                      \"enum\": [\"application\", \"whiteboard\", \"desktop\", \"unknown\"]\n                                    },\n                                    \"date_time\": {\n                                      \"type\": \"string\",\n                                      \"format\": \"date-time\",\n                                      \"description\": \"The session's screen sharing date and time.\"\n                                    }\n                                  },\n                                  \"additionalProperties\": false\n                                }\n                              },\n                              \"additionalProperties\": false\n                            }\n                          },\n                          \"additionalProperties\": false\n                        }\n                      },\n                      \"additionalProperties\": false\n                    }\n                  },\n                  \"additionalProperties\": false\n                },\n                \"examples\": {\n                  \"json-example\": {\n                    \"summary\": \"JSON example\",\n                    \"value\": \"{\\n  \\\"event\\\": \\\"session.sharing_started\\\",\\n  \\\"event_ts\\\": 1626473951859,\\n  \\\"payload\\\": {\\n    \\\"object\\\": {\\n      \\\"id\\\": \\\"4118UHIiRCAAAtBlDkcVyw==\\\",\\n      \\\"session_id\\\": \\\"4567UVWxYZABCdEfGhiJkl==\\\",\\n      \\\"session_name\\\": \\\"My Session\\\",\\n      \\\"session_key\\\": \\\"ABC36jaBI145\\\",\\n      \\\"user\\\": {\\n        \\\"id\\\": \\\"25508864\\\",\\n        \\\"name\\\": \\\"username\\\",\\n        \\\"user_key\\\": \\\"ASD74dfDI854\\\",\\n        \\\"sharing_details\\\": {\\n          \\\"date_time\\\": \\\"2019-07-16T17:19:11Z\\\",\\n          \\\"content\\\": \\\"application\\\"\\n        }\\n      }\\n    },\\n    \\\"account_id\\\": \\\"EPeQtiABC000VYxHMA\\\"\\n  }\\n}\"\n                  }\n                }\n              }\n            }\n          }\n        }\n      }\n    },\n    \"session.user_phone_callout_canceled\": {\n      \"post\": {\n        \"tags\": [\"session\"],\n        \"operationId\": \"session.user_phone_callout_canceled\",\n        \"requestBody\": {\n          \"description\": \"# session.user_phone_callout_canceled\\nThe **Invited party's phone (call out) canceled** event is triggered every time the inviter cancels the call out when they were invited to join a session through phone (call out). Video SDK call out operates in a similar manner as [Zoom meeting call out](https://support.zoom.com/hc/article?id=zm_kb&sysparm_article=KB0062038).\\n\\n## Prerequisites\\n\\n* **Event Subscriptions** must be enabled for your app with the following configurations:\\n  * A valid **Event Notification Endpoint URL**.\\n  * The **Invited party's phone (call out) canceled** subscription enabled under the **Session** event.\\n\\n\\n**Event type**: `session.user_phone_callout_canceled`\\n\",\n          \"content\": {\n            \"application/json\": {\n              \"schema\": {\n                \"type\": \"object\",\n                \"required\": [\"event\", \"event_ts\", \"payload\"],\n                \"properties\": {\n                  \"event\": {\n                    \"type\": \"string\",\n                    \"description\": \"The name of the event.\"\n                  },\n                  \"event_ts\": {\n                    \"type\": \"integer\",\n                    \"format\": \"int64\",\n                    \"description\": \"A timestamp at which the event occurred.\"\n                  },\n                  \"payload\": {\n                    \"type\": \"object\",\n                    \"required\": [\"account_id\", \"object\"],\n                    \"properties\": {\n                      \"account_id\": {\n                        \"type\": \"string\",\n                        \"description\": \"The account ID of the session host.\"\n                      },\n                      \"object\": {\n                        \"type\": \"object\",\n                        \"description\": \"Information about the session.\",\n                        \"required\": [\n                          \"session_id\",\n                          \"session_name\",\n                          \"session_key\",\n                          \"user_key\",\n                          \"participant\"\n                        ],\n                        \"properties\": {\n                          \"session_id\": {\n                            \"type\": \"string\",\n                            \"description\": \"Unique session identifier. Each instance of the session will have its own session_id.\"\n                          },\n                          \"session_name\": {\n                            \"type\": \"string\",\n                            \"description\": \"Session name.\"\n                          },\n                          \"session_key\": {\n                            \"type\": \"string\",\n                            \"description\": \"The Video SDK custom session ID.\"\n                          },\n                          \"user_key\": {\n                            \"type\": \"string\",\n                            \"description\": \"Another identifier for the inviter. Can be a number or characters.\"\n                          },\n                          \"participant\": {\n                            \"type\": \"object\",\n                            \"description\": \"Information about the invited participant.\",\n                            \"required\": [\"invitee_name\", \"phone_number\", \"from_number\"],\n                            \"properties\": {\n                              \"invitee_name\": {\n                                \"type\": \"string\",\n                                \"description\": \"The user's name to display in the session.\"\n                              },\n                              \"phone_number\": {\n                                \"type\": \"integer\",\n                                \"format\": \"int64\",\n                                \"description\": \"The user's phone number.\"\n                              },\n                              \"from_number\": {\n                                \"type\": \"integer\",\n                                \"format\": \"int64\",\n                                \"description\": \"The number used to call out to the invited user.\"\n                              }\n                            },\n                            \"additionalProperties\": false\n                          }\n                        },\n                        \"additionalProperties\": false\n                      }\n                    },\n                    \"additionalProperties\": false\n                  }\n                },\n                \"additionalProperties\": false\n              },\n              \"examples\": {\n                \"json-example\": {\n                  \"summary\": \"JSON example\",\n                  \"value\": \"{\\n  \\\"event\\\": \\\"session.user_phone_callout_canceled\\\",\\n  \\\"event_ts\\\": 1626230691572,\\n  \\\"payload\\\": {\\n    \\\"account_id\\\": \\\"dzVA4QmMQfyISoRcpFO8CA\\\",\\n    \\\"object\\\": {\\n      \\\"session_id\\\": \\\"4444AAAiAAAAAiAiAiiAii==\\\",\\n      \\\"session_name\\\": \\\"My Session\\\",\\n      \\\"session_key\\\": \\\"ABC36jaBI145\\\",\\n      \\\"user_key\\\": \\\"ASD74dfDI854\\\",\\n      \\\"participant\\\": {\\n        \\\"invitee_name\\\": \\\"Jill Chill\\\",\\n        \\\"phone_number\\\": 15555550100,\\n        \\\"from_number\\\": 13167900000\\n      }\\n    }\\n  }\\n}\"\n                }\n              }\n            }\n          }\n        },\n        \"responses\": {\n          \"200\": {\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"type\": \"object\",\n                  \"required\": [\"event\", \"event_ts\", \"payload\"],\n                  \"properties\": {\n                    \"event\": {\n                      \"type\": \"string\",\n                      \"description\": \"The name of the event.\"\n                    },\n                    \"event_ts\": {\n                      \"type\": \"integer\",\n                      \"format\": \"int64\",\n                      \"description\": \"A timestamp at which the event occurred.\"\n                    },\n                    \"payload\": {\n                      \"type\": \"object\",\n                      \"required\": [\"account_id\", \"object\"],\n                      \"properties\": {\n                        \"account_id\": {\n                          \"type\": \"string\",\n                          \"description\": \"The account ID of the session host.\"\n                        },\n                        \"object\": {\n                          \"type\": \"object\",\n                          \"description\": \"Information about the session.\",\n                          \"required\": [\n                            \"session_id\",\n                            \"session_name\",\n                            \"session_key\",\n                            \"user_key\",\n                            \"participant\"\n                          ],\n                          \"properties\": {\n                            \"session_id\": {\n                              \"type\": \"string\",\n                              \"description\": \"Unique session identifier. Each instance of the session will have its own session_id.\"\n                            },\n                            \"session_name\": {\n                              \"type\": \"string\",\n                              \"description\": \"Session name.\"\n                            },\n                            \"session_key\": {\n                              \"type\": \"string\",\n                              \"description\": \"The Video SDK custom session ID.\"\n                            },\n                            \"user_key\": {\n                              \"type\": \"string\",\n                              \"description\": \"Another identifier for the inviter. Can be a number or characters.\"\n                            },\n                            \"participant\": {\n                              \"type\": \"object\",\n                              \"description\": \"Information about the invited participant.\",\n                              \"required\": [\"invitee_name\", \"phone_number\", \"from_number\"],\n                              \"properties\": {\n                                \"invitee_name\": {\n                                  \"type\": \"string\",\n                                  \"description\": \"The user's name to display in the session.\"\n                                },\n                                \"phone_number\": {\n                                  \"type\": \"integer\",\n                                  \"format\": \"int64\",\n                                  \"description\": \"The user's phone number.\"\n                                },\n                                \"from_number\": {\n                                  \"type\": \"integer\",\n                                  \"format\": \"int64\",\n                                  \"description\": \"The number used to call out to the invited user.\"\n                                }\n                              },\n                              \"additionalProperties\": false\n                            }\n                          },\n                          \"additionalProperties\": false\n                        }\n                      },\n                      \"additionalProperties\": false\n                    }\n                  },\n                  \"additionalProperties\": false\n                },\n                \"examples\": {\n                  \"json-example\": {\n                    \"summary\": \"JSON example\",\n                    \"value\": \"{\\n  \\\"event\\\": \\\"session.user_phone_callout_canceled\\\",\\n  \\\"event_ts\\\": 1626230691572,\\n  \\\"payload\\\": {\\n    \\\"account_id\\\": \\\"dzVA4QmMQfyISoRcpFO8CA\\\",\\n    \\\"object\\\": {\\n      \\\"session_id\\\": \\\"4444AAAiAAAAAiAiAiiAii==\\\",\\n      \\\"session_name\\\": \\\"My Session\\\",\\n      \\\"session_key\\\": \\\"ABC36jaBI145\\\",\\n      \\\"user_key\\\": \\\"ASD74dfDI854\\\",\\n      \\\"participant\\\": {\\n        \\\"invitee_name\\\": \\\"Jill Chill\\\",\\n        \\\"phone_number\\\": 15555550100,\\n        \\\"from_number\\\": 13167900000\\n      }\\n    }\\n  }\\n}\"\n                  }\n                }\n              }\n            }\n          }\n        }\n      }\n    },\n    \"session.recording_transcript_completed\": {\n      \"post\": {\n        \"tags\": [\"session\"],\n        \"operationId\": \"session.recording_transcript_completed\",\n        \"requestBody\": {\n          \"description\": \"# session.recording_transcript_completed\\n---\\n\\nEvent: `session.recording_transcript_completed`\\n\\n## Event description\\n\\nThe **Session recording transcript completed** event is triggered every time the transcript of the recording of a session becomes available to view or download.\\n\\nOnly a session host or co-host can start, pause, resume, or stop a cloud recording. A recording is considered complete **after** the host or co-host ends the session. See [Enable cloud recording](https://developers.zoom.us/docs/video-sdk/account/#enable-cloud-recording) for details.\\n\\n## Prerequisites\\n\\n* Cloud Recording must be enabled on the Video SDK account.\\n* Event Subscriptions must be enabled for your app with the following configurations:\\n  * A valid Event Notification Endpoint URL.\\n  * Session recording transcript completed subscription enabled under the Recording event.\\n\\nThe tabs below display the complete schema, payload with data types, and an example of the `session.recording_transcript_completed` event notification:\\n\\n\\n\\n**Event type**: `session.recording_transcript_completed`\\n\",\n          \"content\": {\n            \"application/json\": {\n              \"schema\": {\n                \"type\": \"object\",\n                \"required\": [\"event\", \"event_ts\", \"download_token\", \"payload\"],\n                \"properties\": {\n                  \"event\": {\n                    \"type\": \"string\",\n                    \"enum\": [\"session.recording_transcript_completed\"],\n                    \"description\": \"The event's name.\"\n                  },\n                  \"event_ts\": {\n                    \"type\": \"integer\",\n                    \"format\": \"int64\",\n                    \"description\": \"A timestamp, in milliseconds since epoch, at which the event occurred.\"\n                  },\n                  \"download_token\": {\n                    \"type\": \"string\",\n                    \"description\": \"A generated token used to download the recording. The download token only lasts for 24 hours after its creation and you can only download the file within 24 hours of receiving the event notification. You can either pass the download_token as a Bearer token in the Authorization header of your HTTP request (recommended) or include it as a query parameter. See the following for examples. \\n\\n **Using an Authorization header (Recommended)** \\n\\n \\ncurl --request GET \\\\\\n  --url {download_url} \\\\\\n  --header 'authorization: Bearer {download_token} \\\\\\n  --header 'content-type: application/json'\\n \\n\\n**Using a query parameter** \\n\\n \\n{download_url}/?access_token={download_token}\\n \\n\\n For example: https://zoom.us/recording/download/123456?access_token=abcdefgh\"\n                  },\n                  \"payload\": {\n                    \"type\": \"object\",\n                    \"required\": [\"account_id\", \"object\"],\n                    \"properties\": {\n                      \"account_id\": {\n                        \"type\": \"string\",\n                        \"description\": \"The Video SDK account ID.\"\n                      },\n                      \"object\": {\n                        \"type\": \"object\",\n                        \"description\": \"Information about the session. This object only returns updated properties.\",\n                        \"required\": [\n                          \"session_id\",\n                          \"session_name\",\n                          \"session_key\",\n                          \"start_time\",\n                          \"timezone\",\n                          \"recording_files\"\n                        ],\n                        \"properties\": {\n                          \"session_id\": {\n                            \"type\": \"string\",\n                            \"description\": \"Unique session identifier. Each instance of the session will have its own session_id.\"\n                          },\n                          \"session_name\": {\n                            \"type\": \"string\",\n                            \"description\": \"Session name.\"\n                          },\n                          \"session_key\": {\n                            \"type\": \"string\",\n                            \"description\": \"The Video SDK custom session ID.\"\n                          },\n                          \"start_time\": {\n                            \"type\": \"string\",\n                            \"format\": \"date-time\",\n                            \"description\": \"The time at which the session started.\"\n                          },\n                          \"timezone\": {\n                            \"type\": \"string\",\n                            \"description\": \"The user's timezone.\"\n                          },\n                          \"recording_files\": {\n                            \"type\": \"array\",\n                            \"title\": \"Recording file List\",\n                            \"description\": \"List of recording file.\",\n                            \"items\": {\n                              \"type\": \"object\",\n                              \"properties\": {\n                                \"id\": {\n                                  \"type\": \"string\",\n                                  \"description\": \"The recording file ID. Included in the response of general query.\"\n                                },\n                                \"recording_start\": {\n                                  \"type\": \"string\",\n                                  \"description\": \"The recording start time.\"\n                                },\n                                \"recording_end\": {\n                                  \"type\": \"string\",\n                                  \"description\": \"The recording end time. Response in general query.\"\n                                },\n                                \"file_name\": {\n                                  \"type\": \"string\",\n                                  \"description\": \"Name of the file.\"\n                                },\n                                \"file_path\": {\n                                  \"type\": \"string\",\n                                  \"description\": \"The file path to the On-Premise account recording. \\n\\n**Note:** This API only returns this field for [Zoom On-Premise accounts](https://support.zoom.us/hc/en-us/articles/360034064852-Zoom-On-Premise-Deployment). It does **not** return the download_url field.\"\n                                },\n                                \"file_type\": {\n                                  \"type\": \"string\",\n                                  \"description\": \"The recording file type. The value of this field could be one of the following:<br>\\nMP4: Video file of the recording.<br>M4A Audio-only file of the recording.<br>TIMELINE: Timestamp file of the recording in JSON file format. To get a timeline file, the \\\"Add a timestamp to the recording\\\" setting must be enabled in the [recording settings](https://support.zoom.us/hc/en-us/articles/360060316092). The time will display in the host's timezone, set on their Zoom profile.\\n<br> TRANSCRIPT: Transcription file of the recording in VTT format.<br> CHAT: A TXT file containing in-session chat messages that were sent during the session.<br>CC: File containing closed captions of the recording in VTT file format.<br>CSV: File containing polling data in csv format.\\n\\n<br>\\n\\nA recording file object with file type of either CC or TIMELINE **does not have** the following properties:<br>\\n\\tid, status, file_size, recording_type.\",\n                                  \"enum\": [\n                                    \"MP4\",\n                                    \"M4A\",\n                                    \"CHAT\",\n                                    \"TRANSCRIPT\",\n                                    \"CSV\",\n                                    \"CC\",\n                                    \"TB\",\n                                    \"CHAT_MESSAGE\",\n                                    \"TIMELINE\"\n                                  ]\n                                },\n                                \"file_size\": {\n                                  \"type\": \"number\",\n                                  \"description\": \"The recording file size.\"\n                                },\n                                \"file_extension\": {\n                                  \"type\": \"string\",\n                                  \"description\": \"The archived file's file extension.\",\n                                  \"enum\": [\"MP4\", \"M4A\", \"TXT\", \"VTT\", \"CSV\", \"JSON\", \"JPG\"]\n                                },\n                                \"download_url\": {\n                                  \"type\": \"string\",\n                                  \"description\": \"The URL at which to download the the recording. \\n\\nTo access a private or password-protected cloud recording of a user in your account, use your [Video SDK API JWT](https://marketplace.zoom.us/docs/guides/build/video-sdk-app/#video-sdk-and-api-credentials). You can either pass the generated JWT as a Bearer token in the Authorization header of your HTTP request (recommended) or include it as a query parameter at the end of the URL. See the following for examples. \\n\\n **Using an Authorization header (Recommended)** \\n\\n \\ncurl --request GET \\\\\\n  --url {download_url} \\\\\\n  --header 'authorization: Bearer {JWT} \\\\\\n  --header 'content-type: application/json'\\n \\n\\n**Using a query parameter** \\n\\n \\n{download_url}/?access_token={download_token}\\n \\n\\n For example: https://{base-domain}/recording/download/{path-to-file-download}?access_token={JWT}.\"\n                                },\n                                \"status\": {\n                                  \"type\": \"string\",\n                                  \"description\": \"The recording status.\",\n                                  \"enum\": [\"completed\"]\n                                },\n                                \"recording_type\": {\n                                  \"type\": \"string\",\n                                  \"description\": \"The recording type. The value of this field can be one of the following:<br>shared_screen_with_speaker_view(CC)<br>shared_screen_with_speaker_view<br>shared_screen_with_gallery_view<br>speaker_view<br>gallery_view<br>shared_screen<br>audio_only<br>audio_transcript<br>chat_file<br>active_speaker<br>poll<br>timeline<br>closed_caption\",\n                                  \"enum\": [\n                                    \"shared_screen_with_speaker_view(CC)\",\n                                    \"shared_screen_with_speaker_view\",\n                                    \"shared_screen_with_gallery_view\",\n                                    \"gallery_view\",\n                                    \"shared_screen\",\n                                    \"audio_only\",\n                                    \"audio_transcript\",\n                                    \"chat_file\",\n                                    \"active_speaker\",\n                                    \"host_video\",\n                                    \"audio_only_each_participant\",\n                                    \"cc_transcript\",\n                                    \"closed_caption\",\n                                    \"poll\",\n                                    \"timeline\",\n                                    \"thumbnail\",\n                                    \"chat_message\"\n                                  ]\n                                }\n                              }\n                            }\n                          }\n                        },\n                        \"additionalProperties\": false\n                      }\n                    },\n                    \"additionalProperties\": false\n                  }\n                },\n                \"additionalProperties\": false\n              },\n              \"examples\": {\n                \"json-example\": {\n                  \"summary\": \"JSON example\",\n                  \"value\": \"{\\n  \\\"event\\\": \\\"session.recording_transcript_completed\\\",\\n  \\\"event_ts\\\": 1626230691572,\\n  \\\"download_token\\\": \\\"abJhbGciOiJIUzUxMiJ9.eyJpc3MiOiJodHRwczovL2V2ZW50Lnpvb20udXMiLCJhY2NvdW50SWQiOiJNdDZzdjR1MFRBeVBrd2dzTDJseGlBIiwiYXVkIjoiaHR0cHM6Ly9vYXV0aC56b29tLnVzIiwibWlkIjoieFp3SEc0c3BRU2VuekdZWG16dnpiUT09IiwiZXhwIjoxNjI2MTM5NTA3LCJ1c2VySWQiOiJEWUhyZHBqclMzdWFPZjdkUGtrZzh3In0.a6KetiC6BlkDhf1dP4KBGUE1bb2brMeraoD45yhFx0eSSSTFdkHQnsKmlJQ-hdo9Zy-4vQw3rOxlyoHv583JyZ\\\",\\n  \\\"payload\\\": {\\n    \\\"account_id\\\": \\\"AAAAAABBBB\\\",\\n    \\\"object\\\": {\\n      \\\"session_id\\\": 1234567890,\\n      \\\"session_name\\\": \\\"My Personal Recording\\\",\\n      \\\"session_key\\\": \\\"ABC36jaBI145\\\",\\n      \\\"start_time\\\": \\\"2021-07-13T21:44:51Z\\\",\\n      \\\"timezone\\\": \\\"America/Los_Angeles\\\",\\n      \\\"recording_files\\\": [\\n        {\\n          \\\"id\\\": \\\"ed6c2f27-2ae7-42f4-b3d0-835b493e4fa8\\\",\\n          \\\"recording_start\\\": \\\"2021-03-23T22:14:57Z\\\",\\n          \\\"recording_end\\\": \\\"2021-03-23T23:15:41Z\\\",\\n          \\\"recording_type\\\": \\\"audio_only\\\",\\n          \\\"file_type\\\": \\\"TRANSCRIPT\\\",\\n          \\\"file_size\\\": 246560,\\n          \\\"file_extension\\\": \\\"M4A\\\",\\n          \\\"download_url\\\": \\\"https://example.com/recording/download/Qg75t7xZBtEbAkjdlgbfdngBBBB\\\",\\n          \\\"status\\\": \\\"completed\\\",\\n          \\\"recording_type\\\": \\\"audio_transcript\\\"\\n        }\\n      ]\\n    }\\n  }\\n}\"\n                }\n              }\n            }\n          }\n        },\n        \"responses\": {\n          \"200\": {\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"type\": \"object\",\n                  \"required\": [\"event\", \"event_ts\", \"download_token\", \"payload\"],\n                  \"properties\": {\n                    \"event\": {\n                      \"type\": \"string\",\n                      \"enum\": [\"session.recording_transcript_completed\"],\n                      \"description\": \"The event's name.\"\n                    },\n                    \"event_ts\": {\n                      \"type\": \"integer\",\n                      \"format\": \"int64\",\n                      \"description\": \"A timestamp, in milliseconds since epoch, at which the event occurred.\"\n                    },\n                    \"download_token\": {\n                      \"type\": \"string\",\n                      \"description\": \"A generated token used to download the recording. The download token only lasts for 24 hours after its creation and you can only download the file within 24 hours of receiving the event notification. You can either pass the download_token as a Bearer token in the Authorization header of your HTTP request (recommended) or include it as a query parameter. See the following for examples. \\n\\n **Using an Authorization header (Recommended)** \\n\\n \\ncurl --request GET \\\\\\n  --url {download_url} \\\\\\n  --header 'authorization: Bearer {download_token} \\\\\\n  --header 'content-type: application/json'\\n \\n\\n**Using a query parameter** \\n\\n \\n{download_url}/?access_token={download_token}\\n \\n\\n For example: https://zoom.us/recording/download/123456?access_token=abcdefgh\"\n                    },\n                    \"payload\": {\n                      \"type\": \"object\",\n                      \"required\": [\"account_id\", \"object\"],\n                      \"properties\": {\n                        \"account_id\": {\n                          \"type\": \"string\",\n                          \"description\": \"The Video SDK account ID.\"\n                        },\n                        \"object\": {\n                          \"type\": \"object\",\n                          \"description\": \"Information about the session. This object only returns updated properties.\",\n                          \"required\": [\n                            \"session_id\",\n                            \"session_name\",\n                            \"session_key\",\n                            \"start_time\",\n                            \"timezone\",\n                            \"recording_files\"\n                          ],\n                          \"properties\": {\n                            \"session_id\": {\n                              \"type\": \"string\",\n                              \"description\": \"Unique session identifier. Each instance of the session will have its own session_id.\"\n                            },\n                            \"session_name\": {\n                              \"type\": \"string\",\n                              \"description\": \"Session name.\"\n                            },\n                            \"session_key\": {\n                              \"type\": \"string\",\n                              \"description\": \"The Video SDK custom session ID.\"\n                            },\n                            \"start_time\": {\n                              \"type\": \"string\",\n                              \"format\": \"date-time\",\n                              \"description\": \"The time at which the session started.\"\n                            },\n                            \"timezone\": {\n                              \"type\": \"string\",\n                              \"description\": \"The user's timezone.\"\n                            },\n                            \"recording_files\": {\n                              \"type\": \"array\",\n                              \"title\": \"Recording file List\",\n                              \"description\": \"List of recording file.\",\n                              \"items\": {\n                                \"type\": \"object\",\n                                \"properties\": {\n                                  \"id\": {\n                                    \"type\": \"string\",\n                                    \"description\": \"The recording file ID. Included in the response of general query.\"\n                                  },\n                                  \"recording_start\": {\n                                    \"type\": \"string\",\n                                    \"description\": \"The recording start time.\"\n                                  },\n                                  \"recording_end\": {\n                                    \"type\": \"string\",\n                                    \"description\": \"The recording end time. Response in general query.\"\n                                  },\n                                  \"file_name\": {\n                                    \"type\": \"string\",\n                                    \"description\": \"Name of the file.\"\n                                  },\n                                  \"file_path\": {\n                                    \"type\": \"string\",\n                                    \"description\": \"The file path to the On-Premise account recording. \\n\\n**Note:** This API only returns this field for [Zoom On-Premise accounts](https://support.zoom.us/hc/en-us/articles/360034064852-Zoom-On-Premise-Deployment). It does **not** return the download_url field.\"\n                                  },\n                                  \"file_type\": {\n                                    \"type\": \"string\",\n                                    \"description\": \"The recording file type. The value of this field could be one of the following:<br>\\nMP4: Video file of the recording.<br>M4A Audio-only file of the recording.<br>TIMELINE: Timestamp file of the recording in JSON file format. To get a timeline file, the \\\"Add a timestamp to the recording\\\" setting must be enabled in the [recording settings](https://support.zoom.us/hc/en-us/articles/360060316092). The time will display in the host's timezone, set on their Zoom profile.\\n<br> TRANSCRIPT: Transcription file of the recording in VTT format.<br> CHAT: A TXT file containing in-session chat messages that were sent during the session.<br>CC: File containing closed captions of the recording in VTT file format.<br>CSV: File containing polling data in csv format.\\n\\n<br>\\n\\nA recording file object with file type of either CC or TIMELINE **does not have** the following properties:<br>\\n\\tid, status, file_size, recording_type.\",\n                                    \"enum\": [\n                                      \"MP4\",\n                                      \"M4A\",\n                                      \"CHAT\",\n                                      \"TRANSCRIPT\",\n                                      \"CSV\",\n                                      \"CC\",\n                                      \"TB\",\n                                      \"CHAT_MESSAGE\",\n                                      \"TIMELINE\"\n                                    ]\n                                  },\n                                  \"file_size\": {\n                                    \"type\": \"number\",\n                                    \"description\": \"The recording file size.\"\n                                  },\n                                  \"file_extension\": {\n                                    \"type\": \"string\",\n                                    \"description\": \"The archived file's file extension.\",\n                                    \"enum\": [\"MP4\", \"M4A\", \"TXT\", \"VTT\", \"CSV\", \"JSON\", \"JPG\"]\n                                  },\n                                  \"download_url\": {\n                                    \"type\": \"string\",\n                                    \"description\": \"The URL at which to download the the recording. \\n\\nTo access a private or password-protected cloud recording of a user in your account, use your [Video SDK API JWT](https://marketplace.zoom.us/docs/guides/build/video-sdk-app/#video-sdk-and-api-credentials). You can either pass the generated JWT as a Bearer token in the Authorization header of your HTTP request (recommended) or include it as a query parameter at the end of the URL. See the following for examples. \\n\\n **Using an Authorization header (Recommended)** \\n\\n \\ncurl --request GET \\\\\\n  --url {download_url} \\\\\\n  --header 'authorization: Bearer {JWT} \\\\\\n  --header 'content-type: application/json'\\n \\n\\n**Using a query parameter** \\n\\n \\n{download_url}/?access_token={download_token}\\n \\n\\n For example: https://{base-domain}/recording/download/{path-to-file-download}?access_token={JWT}.\"\n                                  },\n                                  \"status\": {\n                                    \"type\": \"string\",\n                                    \"description\": \"The recording status.\",\n                                    \"enum\": [\"completed\"]\n                                  },\n                                  \"recording_type\": {\n                                    \"type\": \"string\",\n                                    \"description\": \"The recording type. The value of this field can be one of the following:<br>shared_screen_with_speaker_view(CC)<br>shared_screen_with_speaker_view<br>shared_screen_with_gallery_view<br>speaker_view<br>gallery_view<br>shared_screen<br>audio_only<br>audio_transcript<br>chat_file<br>active_speaker<br>poll<br>timeline<br>closed_caption\",\n                                    \"enum\": [\n                                      \"shared_screen_with_speaker_view(CC)\",\n                                      \"shared_screen_with_speaker_view\",\n                                      \"shared_screen_with_gallery_view\",\n                                      \"gallery_view\",\n                                      \"shared_screen\",\n                                      \"audio_only\",\n                                      \"audio_transcript\",\n                                      \"chat_file\",\n                                      \"active_speaker\",\n                                      \"host_video\",\n                                      \"audio_only_each_participant\",\n                                      \"cc_transcript\",\n                                      \"closed_caption\",\n                                      \"poll\",\n                                      \"timeline\",\n                                      \"thumbnail\",\n                                      \"chat_message\"\n                                    ]\n                                  }\n                                }\n                              }\n                            }\n                          },\n                          \"additionalProperties\": false\n                        }\n                      },\n                      \"additionalProperties\": false\n                    }\n                  },\n                  \"additionalProperties\": false\n                },\n                \"examples\": {\n                  \"json-example\": {\n                    \"summary\": \"JSON example\",\n                    \"value\": \"{\\n  \\\"event\\\": \\\"session.recording_transcript_completed\\\",\\n  \\\"event_ts\\\": 1626230691572,\\n  \\\"download_token\\\": \\\"abJhbGciOiJIUzUxMiJ9.eyJpc3MiOiJodHRwczovL2V2ZW50Lnpvb20udXMiLCJhY2NvdW50SWQiOiJNdDZzdjR1MFRBeVBrd2dzTDJseGlBIiwiYXVkIjoiaHR0cHM6Ly9vYXV0aC56b29tLnVzIiwibWlkIjoieFp3SEc0c3BRU2VuekdZWG16dnpiUT09IiwiZXhwIjoxNjI2MTM5NTA3LCJ1c2VySWQiOiJEWUhyZHBqclMzdWFPZjdkUGtrZzh3In0.a6KetiC6BlkDhf1dP4KBGUE1bb2brMeraoD45yhFx0eSSSTFdkHQnsKmlJQ-hdo9Zy-4vQw3rOxlyoHv583JyZ\\\",\\n  \\\"payload\\\": {\\n    \\\"account_id\\\": \\\"AAAAAABBBB\\\",\\n    \\\"object\\\": {\\n      \\\"session_id\\\": 1234567890,\\n      \\\"session_name\\\": \\\"My Personal Recording\\\",\\n      \\\"session_key\\\": \\\"ABC36jaBI145\\\",\\n      \\\"start_time\\\": \\\"2021-07-13T21:44:51Z\\\",\\n      \\\"timezone\\\": \\\"America/Los_Angeles\\\",\\n      \\\"recording_files\\\": [\\n        {\\n          \\\"id\\\": \\\"ed6c2f27-2ae7-42f4-b3d0-835b493e4fa8\\\",\\n          \\\"recording_start\\\": \\\"2021-03-23T22:14:57Z\\\",\\n          \\\"recording_end\\\": \\\"2021-03-23T23:15:41Z\\\",\\n          \\\"recording_type\\\": \\\"audio_only\\\",\\n          \\\"file_type\\\": \\\"TRANSCRIPT\\\",\\n          \\\"file_size\\\": 246560,\\n          \\\"file_extension\\\": \\\"M4A\\\",\\n          \\\"download_url\\\": \\\"https://example.com/recording/download/Qg75t7xZBtEbAkjdlgbfdngBBBB\\\",\\n          \\\"status\\\": \\\"completed\\\",\\n          \\\"recording_type\\\": \\\"audio_transcript\\\"\\n        }\\n      ]\\n    }\\n  }\\n}\"\n                  }\n                }\n              }\n            }\n          }\n        }\n      }\n    },\n    \"session.recording_deleted\": {\n      \"post\": {\n        \"tags\": [\"session\"],\n        \"operationId\": \"session.recording_deleted\",\n        \"requestBody\": {\n          \"description\": \"# session.recording_deleted\\n---\\n\\nEvent: `session.recording_deleted`\\n\\n## Event description\\n\\nThe **Session recording permanently deleted** event is triggered every time one of your app users or account users permanently deletes a cloud recording.\\n\\nWhen a user initially deletes a recording, it is sent to the trash. At this stage, the recording can still be recovered for up to 30 days after deletion. To permanently delete a recording, users must delete it from the trash. Users can permanently delete a recording using:\\n\\n* The [Delete session's recording API](https://developers.zoom.us/docs/api/rest/reference/video-sdk/methods/#operation/recordingDelete) **with the delete query parameter** or\\n* The Zoom web portal. See [Video SDK account](https://developers.zoom.us/docs/video-sdk/account/) for details.\\n\\n## Prerequisites\\n\\n* Cloud Recording must be enabled on the Video SDK account.\\n* Event Subscriptions must be enabled for your app with the following configurations:\\n\\t* A valid Event Notification Endpoint URL.\\n\\t* \\\"**Session recording permanently deleted**\\\" subscription enabled under the **Recording** event.\\n\\nThe tabs below display the complete schema, payload with data types, and an example of the `session.recording_deleted` event notification:\\n\\n\\n\\n**Event type**: `session.recording_deleted`\\n\",\n          \"content\": {\n            \"application/json\": {\n              \"schema\": {\n                \"type\": \"object\",\n                \"required\": [\"event\", \"event_ts\", \"payload\"],\n                \"properties\": {\n                  \"event\": {\n                    \"type\": \"string\",\n                    \"enum\": [\"session.recording_deleted\"],\n                    \"description\": \"The event's name.\"\n                  },\n                  \"event_ts\": {\n                    \"type\": \"integer\",\n                    \"format\": \"int64\",\n                    \"description\": \"A timestamp, in milliseconds since epoch, at which the event occurred.\"\n                  },\n                  \"payload\": {\n                    \"type\": \"object\",\n                    \"required\": [\"account_id\", \"operator\", \"operator_id\", \"object\"],\n                    \"properties\": {\n                      \"account_id\": {\n                        \"type\": \"string\",\n                        \"description\": \"The Video SDK account ID.\"\n                      },\n                      \"operator\": {\n                        \"type\": \"string\",\n                        \"format\": \"email\",\n                        \"description\": \"The email address of the user who deleted the recording.\"\n                      },\n                      \"operator_id\": {\n                        \"type\": \"string\",\n                        \"description\": \"The user ID of the user who deleted the recording.\"\n                      },\n                      \"object\": {\n                        \"type\": \"object\",\n                        \"description\": \"Information about the session. This object only returns updated properties.\",\n                        \"required\": [\n                          \"session_id\",\n                          \"session_name\",\n                          \"session_key\",\n                          \"start_time\",\n                          \"timezone\"\n                        ],\n                        \"properties\": {\n                          \"session_id\": {\n                            \"type\": \"string\",\n                            \"description\": \"Unique session identifier. Each instance of the session will have its own session_id.\"\n                          },\n                          \"session_name\": {\n                            \"type\": \"string\",\n                            \"description\": \"Session name.\"\n                          },\n                          \"session_key\": {\n                            \"type\": \"string\",\n                            \"description\": \"The Video SDK custom session ID.\"\n                          },\n                          \"start_time\": {\n                            \"type\": \"string\",\n                            \"format\": \"date-time\",\n                            \"description\": \"The time at which the session started.\"\n                          },\n                          \"timezone\": {\n                            \"type\": \"string\",\n                            \"description\": \"The user's timezone.\"\n                          }\n                        },\n                        \"additionalProperties\": false\n                      }\n                    },\n                    \"additionalProperties\": false\n                  }\n                },\n                \"additionalProperties\": false\n              },\n              \"examples\": {\n                \"json-example\": {\n                  \"summary\": \"JSON example\",\n                  \"value\": \"{\\n  \\\"event\\\": \\\"session.recording_deleted\\\",\\n  \\\"event_ts\\\": 1626230691572,\\n  \\\"payload\\\": {\\n    \\\"account_id\\\": \\\"AAAAAABBBB\\\",\\n\\t\\\"operator\\\" : \\\"user@example.com\\\",\\n\\t\\\"operator_id\\\" : \\\"I7zp-pYbTl22Z29H796Ixg\\\",\\n    \\\"object\\\": {\\n      \\\"session_id\\\": 1234567890,\\n      \\\"session_name\\\": \\\"My Personal Recording\\\",\\n      \\\"session_key\\\": \\\"ABC36jaBI145\\\",\\n      \\\"start_time\\\": \\\"2021-07-13T21:44:51Z\\\",\\n      \\\"timezone\\\": \\\"America/Los_Angeles\\\"\\n    }\\n  }\\n}\"\n                }\n              }\n            }\n          }\n        },\n        \"responses\": {\n          \"200\": {\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"type\": \"object\",\n                  \"required\": [\"event\", \"event_ts\", \"payload\"],\n                  \"properties\": {\n                    \"event\": {\n                      \"type\": \"string\",\n                      \"enum\": [\"session.recording_deleted\"],\n                      \"description\": \"The event's name.\"\n                    },\n                    \"event_ts\": {\n                      \"type\": \"integer\",\n                      \"format\": \"int64\",\n                      \"description\": \"A timestamp, in milliseconds since epoch, at which the event occurred.\"\n                    },\n                    \"payload\": {\n                      \"type\": \"object\",\n                      \"required\": [\"account_id\", \"operator\", \"operator_id\", \"object\"],\n                      \"properties\": {\n                        \"account_id\": {\n                          \"type\": \"string\",\n                          \"description\": \"The Video SDK account ID.\"\n                        },\n                        \"operator\": {\n                          \"type\": \"string\",\n                          \"format\": \"email\",\n                          \"description\": \"The email address of the user who deleted the recording.\"\n                        },\n                        \"operator_id\": {\n                          \"type\": \"string\",\n                          \"description\": \"The user ID of the user who deleted the recording.\"\n                        },\n                        \"object\": {\n                          \"type\": \"object\",\n                          \"description\": \"Information about the session. This object only returns updated properties.\",\n                          \"required\": [\n                            \"session_id\",\n                            \"session_name\",\n                            \"session_key\",\n                            \"start_time\",\n                            \"timezone\"\n                          ],\n                          \"properties\": {\n                            \"session_id\": {\n                              \"type\": \"string\",\n                              \"description\": \"Unique session identifier. Each instance of the session will have its own session_id.\"\n                            },\n                            \"session_name\": {\n                              \"type\": \"string\",\n                              \"description\": \"Session name.\"\n                            },\n                            \"session_key\": {\n                              \"type\": \"string\",\n                              \"description\": \"The Video SDK custom session ID.\"\n                            },\n                            \"start_time\": {\n                              \"type\": \"string\",\n                              \"format\": \"date-time\",\n                              \"description\": \"The time at which the session started.\"\n                            },\n                            \"timezone\": {\n                              \"type\": \"string\",\n                              \"description\": \"The user's timezone.\"\n                            }\n                          },\n                          \"additionalProperties\": false\n                        }\n                      },\n                      \"additionalProperties\": false\n                    }\n                  },\n                  \"additionalProperties\": false\n                },\n                \"examples\": {\n                  \"json-example\": {\n                    \"summary\": \"JSON example\",\n                    \"value\": \"{\\n  \\\"event\\\": \\\"session.recording_deleted\\\",\\n  \\\"event_ts\\\": 1626230691572,\\n  \\\"payload\\\": {\\n    \\\"account_id\\\": \\\"AAAAAABBBB\\\",\\n\\t\\\"operator\\\" : \\\"user@example.com\\\",\\n\\t\\\"operator_id\\\" : \\\"I7zp-pYbTl22Z29H796Ixg\\\",\\n    \\\"object\\\": {\\n      \\\"session_id\\\": 1234567890,\\n      \\\"session_name\\\": \\\"My Personal Recording\\\",\\n      \\\"session_key\\\": \\\"ABC36jaBI145\\\",\\n      \\\"start_time\\\": \\\"2021-07-13T21:44:51Z\\\",\\n      \\\"timezone\\\": \\\"America/Los_Angeles\\\"\\n    }\\n  }\\n}\"\n                  }\n                }\n              }\n            }\n          }\n        }\n      }\n    },\n    \"session.user_room_system_callout_failed\": {\n      \"post\": {\n        \"tags\": [\"session\"],\n        \"operationId\": \"session.user_room_system_callout_failed\",\n        \"requestBody\": {\n          \"description\": \"# session.user_room_system_callout_failed\\n\\nThe **Session invitation through phone (call out) via Zoom room failed** event is triggered every time an invitation to [join a session through phone (call out) from a Zoom room](https://support.zoom.us/hc/en-us/articles/205369035) fails.\\n\\n## Prerequisites\\n\\n* **Event Subscriptions** must be enabled for your app with the following configurations:\\n* A valid **Event Notification Endpoint URL**.\\n* The **Session invitation through phone (call out) via Zoom room failed** subscription enabled under the **Session** event.\\n\\n\\n\\n**Event type**: `session.user_room_system_callout_failed`\\n\",\n          \"content\": {\n            \"application/json\": {\n              \"schema\": {\n                \"type\": \"object\",\n                \"required\": [\"event\", \"event_ts\", \"payload\"],\n                \"properties\": {\n                  \"event\": {\n                    \"type\": \"string\",\n                    \"description\": \"The name of the event.\"\n                  },\n                  \"event_ts\": {\n                    \"type\": \"integer\",\n                    \"format\": \"int64\",\n                    \"description\": \"A timestamp at which the event occurred.\"\n                  },\n                  \"payload\": {\n                    \"type\": \"object\",\n                    \"required\": [\"account_id\", \"object\"],\n                    \"properties\": {\n                      \"account_id\": {\n                        \"type\": \"string\",\n                        \"description\": \"The account ID of the session host.\"\n                      },\n                      \"object\": {\n                        \"type\": \"object\",\n                        \"description\": \"Information about the session.\",\n                        \"required\": [\n                          \"session_id\",\n                          \"session_name\",\n                          \"host_id\",\n                          \"message_id\",\n                          \"inviter_name\",\n                          \"reason_type\",\n                          \"participant\"\n                        ],\n                        \"properties\": {\n                          \"id\": {\n                            \"type\": \"integer\",\n                            \"format\": \"int64\",\n                            \"description\": \"The session ID.\",\n                            \"deprecated\": true\n                          },\n                          \"uuid\": {\n                            \"type\": \"string\",\n                            \"description\": \"The session's universally unique identifier (UUID). Each session instance generates a session UUID.\",\n                            \"deprecated\": true\n                          },\n                          \"session_id\": {\n                            \"type\": \"string\",\n                            \"description\": \"Unique session identifier. Each instance of the session will have its own session_id.\"\n                          },\n                          \"session_name\": {\n                            \"type\": \"string\",\n                            \"description\": \"Session name.\"\n                          },\n                          \"host_id\": {\n                            \"type\": \"string\",\n                            \"description\": \"The user ID of the session host.\"\n                          },\n                          \"message_id\": {\n                            \"type\": \"string\",\n                            \"description\": \"The request unique identifier (UUID).\"\n                          },\n                          \"inviter_name\": {\n                            \"type\": \"string\",\n                            \"description\": \"The user name of the event's trigger.\"\n                          },\n                          \"reason_type\": {\n                            \"type\": \"integer\",\n                            \"description\": \"reason type for failure: \\n* 1 — Encryption_Fail. \\n* 2 — Disconnected_By_Remote. \\n* 3 — Retry. \\n* 4 — Bad_Seq. \\n* 5 — Call_Limit. \\n* 6 — Not_Registered. \\n* 7 — Timeout. \\n* 8 — Bad_Addr. \\n* 9 — Unreachable \\n* 10 — Disconnect_By_Local \\n* 11 — Server_Internal_Error \\n* 12 — Exceed_Free_Port \\n* 13 — Connect_Error \\n* 14 — Proxy_Connect_Error \\n* 0 — Other_Failed_Reason.\",\n                            \"enum\": [0, 1, 2, 3, 4, 7, 8, 9, 10, 11, 12, 13, 14]\n                          },\n                          \"participant\": {\n                            \"type\": \"object\",\n                            \"description\": \"Information about the invited participant.\",\n                            \"required\": [\"call_type\", \"device_ip\"],\n                            \"properties\": {\n                              \"call_type\": {\n                                \"type\": \"string\",\n                                \"description\": \"The type of call out. Use a value of h323 or sip.\"\n                              },\n                              \"device_ip\": {\n                                \"type\": \"string\",\n                                \"description\": \"The user's device IP address.\"\n                              }\n                            },\n                            \"additionalProperties\": true\n                          }\n                        },\n                        \"additionalProperties\": false\n                      }\n                    },\n                    \"additionalProperties\": false\n                  }\n                },\n                \"additionalProperties\": false\n              },\n              \"examples\": {\n                \"json-example\": {\n                  \"summary\": \"JSON example\",\n                  \"value\": \"{\\n  \\\"event\\\": \\\"session.user_room_system_callout_failed\\\",\\n  \\\"event_ts\\\": 1626230691572,\\n  \\\"payload\\\": {\\n    \\\"account_id\\\": \\\"dzVA4QmMQfyISoRcpFO8CA\\\",\\n    \\\"object\\\": {\\n      \\\"id\\\": 713592696,\\n      \\\"uuid\\\": \\\"4444AAAiAAAAAiAiAiiAii==\\\",\\n      \\\"session_id\\\": \\\"4444AAAiAAAAAiAiAiiAii==\\\",\\n      \\\"session_name\\\": \\\"My Session\\\",\\n      \\\"host_id\\\": \\\"ICuPoX4ERtikRcKqkVxunQ\\\",\\n      \\\"message_id\\\": \\\"atsXxhSEQWit9t+U02HXNQ==\\\",\\n      \\\"inviter_name\\\": \\\"Jill Chill\\\",\\n      \\\"reason_type\\\": 1,\\n      \\\"participant\\\": {\\n        \\\"call_type\\\": \\\"h323\\\",\\n        \\\"device_ip\\\": \\\"10.100.111.237\\\"\\n      }\\n    }\\n  }\\n}\"\n                }\n              }\n            }\n          }\n        },\n        \"responses\": {\n          \"200\": {\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"type\": \"object\",\n                  \"required\": [\"event\", \"event_ts\", \"payload\"],\n                  \"properties\": {\n                    \"event\": {\n                      \"type\": \"string\",\n                      \"description\": \"The name of the event.\"\n                    },\n                    \"event_ts\": {\n                      \"type\": \"integer\",\n                      \"format\": \"int64\",\n                      \"description\": \"A timestamp at which the event occurred.\"\n                    },\n                    \"payload\": {\n                      \"type\": \"object\",\n                      \"required\": [\"account_id\", \"object\"],\n                      \"properties\": {\n                        \"account_id\": {\n                          \"type\": \"string\",\n                          \"description\": \"The account ID of the session host.\"\n                        },\n                        \"object\": {\n                          \"type\": \"object\",\n                          \"description\": \"Information about the session.\",\n                          \"required\": [\n                            \"session_id\",\n                            \"session_name\",\n                            \"host_id\",\n                            \"message_id\",\n                            \"inviter_name\",\n                            \"reason_type\",\n                            \"participant\"\n                          ],\n                          \"properties\": {\n                            \"id\": {\n                              \"type\": \"integer\",\n                              \"format\": \"int64\",\n                              \"description\": \"The session ID.\",\n                              \"deprecated\": true\n                            },\n                            \"uuid\": {\n                              \"type\": \"string\",\n                              \"description\": \"The session's universally unique identifier (UUID). Each session instance generates a session UUID.\",\n                              \"deprecated\": true\n                            },\n                            \"session_id\": {\n                              \"type\": \"string\",\n                              \"description\": \"Unique session identifier. Each instance of the session will have its own session_id.\"\n                            },\n                            \"session_name\": {\n                              \"type\": \"string\",\n                              \"description\": \"Session name.\"\n                            },\n                            \"host_id\": {\n                              \"type\": \"string\",\n                              \"description\": \"The user ID of the session host.\"\n                            },\n                            \"message_id\": {\n                              \"type\": \"string\",\n                              \"description\": \"The request unique identifier (UUID).\"\n                            },\n                            \"inviter_name\": {\n                              \"type\": \"string\",\n                              \"description\": \"The user name of the event's trigger.\"\n                            },\n                            \"reason_type\": {\n                              \"type\": \"integer\",\n                              \"description\": \"reason type for failure: \\n* 1 — Encryption_Fail. \\n* 2 — Disconnected_By_Remote. \\n* 3 — Retry. \\n* 4 — Bad_Seq. \\n* 5 — Call_Limit. \\n* 6 — Not_Registered. \\n* 7 — Timeout. \\n* 8 — Bad_Addr. \\n* 9 — Unreachable \\n* 10 — Disconnect_By_Local \\n* 11 — Server_Internal_Error \\n* 12 — Exceed_Free_Port \\n* 13 — Connect_Error \\n* 14 — Proxy_Connect_Error \\n* 0 — Other_Failed_Reason.\",\n                              \"enum\": [0, 1, 2, 3, 4, 7, 8, 9, 10, 11, 12, 13, 14]\n                            },\n                            \"participant\": {\n                              \"type\": \"object\",\n                              \"description\": \"Information about the invited participant.\",\n                              \"required\": [\"call_type\", \"device_ip\"],\n                              \"properties\": {\n                                \"call_type\": {\n                                  \"type\": \"string\",\n                                  \"description\": \"The type of call out. Use a value of h323 or sip.\"\n                                },\n                                \"device_ip\": {\n                                  \"type\": \"string\",\n                                  \"description\": \"The user's device IP address.\"\n                                }\n                              },\n                              \"additionalProperties\": true\n                            }\n                          },\n                          \"additionalProperties\": false\n                        }\n                      },\n                      \"additionalProperties\": false\n                    }\n                  },\n                  \"additionalProperties\": false\n                },\n                \"examples\": {\n                  \"json-example\": {\n                    \"summary\": \"JSON example\",\n                    \"value\": \"{\\n  \\\"event\\\": \\\"session.user_room_system_callout_failed\\\",\\n  \\\"event_ts\\\": 1626230691572,\\n  \\\"payload\\\": {\\n    \\\"account_id\\\": \\\"dzVA4QmMQfyISoRcpFO8CA\\\",\\n    \\\"object\\\": {\\n      \\\"id\\\": 713592696,\\n      \\\"uuid\\\": \\\"4444AAAiAAAAAiAiAiiAii==\\\",\\n      \\\"session_id\\\": \\\"4444AAAiAAAAAiAiAiiAii==\\\",\\n      \\\"session_name\\\": \\\"My Session\\\",\\n      \\\"host_id\\\": \\\"ICuPoX4ERtikRcKqkVxunQ\\\",\\n      \\\"message_id\\\": \\\"atsXxhSEQWit9t+U02HXNQ==\\\",\\n      \\\"inviter_name\\\": \\\"Jill Chill\\\",\\n      \\\"reason_type\\\": 1,\\n      \\\"participant\\\": {\\n        \\\"call_type\\\": \\\"h323\\\",\\n        \\\"device_ip\\\": \\\"10.100.111.237\\\"\\n      }\\n    }\\n  }\\n}\"\n                  }\n                }\n              }\n            }\n          }\n        }\n      }\n    },\n    \"session.recording_completed\": {\n      \"post\": {\n        \"tags\": [\"session\"],\n        \"operationId\": \"session.recording_completed\",\n        \"requestBody\": {\n          \"description\": \"# session.recording_completed\\n---\\n\\nEvent: `session.recording_completed`\\n\\n## Event description\\n\\nThe **Session recording completed** event is triggered every time a recording of a session becomes available to view and/or download.\\n\\nOnly a session host or co-host can start, pause, resume, or stop a cloud recording. A recording is considered complete **after** the host or co-host ends the session. See [Enable cloud recording](https://developers.zoom.us/docs/video-sdk/account/#enable-cloud-recording) for details.\\n\\n## Prerequisites\\n\\n* Cloud Recording must be enabled on the Video SDK account.\\n* Event Subscriptions must be enabled for your app with the following configurations:\\n  * A valid Event Notification Endpoint URL.\\n  * Session recording completed subscription enabled under the Recording event.\\n\\nThe tabs below display the complete schema, payload with data types, and an example of the `session.recording_completed` event notification:\\n\\n\\n\\n**Event type**: `session.recording_completed`\\n\",\n          \"content\": {\n            \"application/json\": {\n              \"schema\": {\n                \"type\": \"object\",\n                \"required\": [\"event\", \"event_ts\", \"download_token\", \"payload\"],\n                \"properties\": {\n                  \"event\": {\n                    \"type\": \"string\",\n                    \"enum\": [\"session.recording_completed\"],\n                    \"description\": \"The event's name.\"\n                  },\n                  \"event_ts\": {\n                    \"type\": \"integer\",\n                    \"format\": \"int64\",\n                    \"description\": \"A timestamp, in milliseconds since epoch, at which the event occurred.\"\n                  },\n                  \"download_token\": {\n                    \"type\": \"string\",\n                    \"description\": \"A generated token used to download the recording. The download token only lasts for 24 hours after its creation and you can only download the file within 24 hours of receiving the event notification. Pass the download_token as a Bearer token in the Authorization header of your HTTP request. For example: \\n\\n \\ncurl --request GET \\\\\\n  --url {download_url} \\\\\\n  --header 'authorization: Bearer {download_token} \\\\\\n  --header 'content-type: application/json'\\n\"\n                  },\n                  \"payload\": {\n                    \"type\": \"object\",\n                    \"required\": [\"account_id\", \"object\"],\n                    \"properties\": {\n                      \"account_id\": {\n                        \"type\": \"string\",\n                        \"description\": \"The Video SDK account ID.\"\n                      },\n                      \"object\": {\n                        \"type\": \"object\",\n                        \"description\": \"Information about the session. This object only returns updated properties.\",\n                        \"required\": [\n                          \"session_id\",\n                          \"session_name\",\n                          \"session_key\",\n                          \"start_time\",\n                          \"timezone\",\n                          \"recording_files\"\n                        ],\n                        \"properties\": {\n                          \"session_id\": {\n                            \"type\": \"string\",\n                            \"description\": \"Unique session identifier. Each instance of the session will have its own session_id.\"\n                          },\n                          \"session_name\": {\n                            \"type\": \"string\",\n                            \"description\": \"Session name.\"\n                          },\n                          \"session_key\": {\n                            \"type\": \"string\",\n                            \"description\": \"The Video SDK custom session ID.\"\n                          },\n                          \"start_time\": {\n                            \"type\": \"string\",\n                            \"format\": \"date-time\",\n                            \"description\": \"The time at which the session started.\"\n                          },\n                          \"timezone\": {\n                            \"type\": \"string\",\n                            \"description\": \"The user's timezone.\"\n                          },\n                          \"recording_files\": {\n                            \"type\": \"array\",\n                            \"title\": \"Recording file List\",\n                            \"description\": \"List of recording file.\",\n                            \"items\": {\n                              \"type\": \"object\",\n                              \"properties\": {\n                                \"id\": {\n                                  \"type\": \"string\",\n                                  \"description\": \"The recording file ID. Included in the response of general query.\"\n                                },\n                                \"recording_start\": {\n                                  \"type\": \"string\",\n                                  \"description\": \"The recording start time.\"\n                                },\n                                \"recording_end\": {\n                                  \"type\": \"string\",\n                                  \"description\": \"The recording end time. Response in general query.\"\n                                },\n                                \"file_name\": {\n                                  \"type\": \"string\",\n                                  \"description\": \"Name of the file.\"\n                                },\n                                \"file_path\": {\n                                  \"type\": \"string\",\n                                  \"description\": \"The file path to the On-Premise account recording. \\n\\n**Note:** This API only returns this field for [Zoom On-Premise accounts](https://support.zoom.us/hc/en-us/articles/360034064852-Zoom-On-Premise-Deployment). It does **not** return the download_url field.\"\n                                },\n                                \"file_type\": {\n                                  \"type\": \"string\",\n                                  \"description\": \"The recording file type. The value of this field could be one of the following:<br>\\nMP4: Video file of the recording.<br>M4A Audio-only file of the recording.<br>TIMELINE: Timestamp file of the recording in JSON file format. To get a timeline file, the \\\"Add a timestamp to the recording\\\" setting must be enabled in the [recording settings](https://support.zoom.us/hc/en-us/articles/360060316092). The time will display in the host's timezone, set on their Zoom profile.\\n<br> TRANSCRIPT: Transcription file of the recording in VTT format.<br> CHAT: A TXT file containing in-session chat messages that were sent during the session.<br>CC: File containing closed captions of the recording in VTT file format.<br>CSV: File containing polling data in csv format.\\n\\n<br>\\n\\nA recording file object with file type of either CC or TIMELINE **does not have** the following properties:<br>\\n\\tid, status, file_size, recording_type.\",\n                                  \"enum\": [\n                                    \"MP4\",\n                                    \"M4A\",\n                                    \"CHAT\",\n                                    \"TRANSCRIPT\",\n                                    \"CSV\",\n                                    \"CC\",\n                                    \"TB\",\n                                    \"CHAT_MESSAGE\"\n                                  ]\n                                },\n                                \"file_size\": {\n                                  \"type\": \"number\",\n                                  \"description\": \"The recording file size.\"\n                                },\n                                \"file_extension\": {\n                                  \"type\": \"string\",\n                                  \"description\": \"The archived file's file extension.\",\n                                  \"enum\": [\"MP4\", \"M4A\", \"TXT\", \"VTT\", \"CSV\", \"JSON\", \"JPG\"]\n                                },\n                                \"download_url\": {\n                                  \"type\": \"string\",\n                                  \"description\": \"The URL at which to download the the recording. \\n\\nTo access a private or password-protected cloud recording of a user in your account, use your [Video SDK API JWT](https://marketplace.zoom.us/docs/guides/build/video-sdk-app/#video-sdk-and-api-credentials). Pass the generated JWT as a Bearer token in the Authorization header of your HTTP request. For example: \\n\\n \\ncurl --request GET \\\\\\n  --url {download_url} \\\\\\n  --header 'authorization: Bearer {JWT} \\\\\\n  --header 'content-type: application/json'\\n\"\n                                },\n                                \"status\": {\n                                  \"type\": \"string\",\n                                  \"description\": \"The recording status.\",\n                                  \"enum\": [\"completed\"]\n                                },\n                                \"recording_type\": {\n                                  \"type\": \"string\",\n                                  \"description\": \"The recording type. The value of this field can be one of the following:<br>shared_screen_with_speaker_view(CC)<br>shared_screen_with_speaker_view<br>shared_screen_with_gallery_view<br>speaker_view<br>gallery_view<br>shared_screen<br>audio_only<br>audio_transcript<br>chat_file<br>active_speaker<br>poll<br>timeline<br>closed_caption\",\n                                  \"enum\": [\n                                    \"shared_screen_with_speaker_view(CC)\",\n                                    \"shared_screen_with_speaker_view\",\n                                    \"shared_screen_with_gallery_view\",\n                                    \"gallery_view\",\n                                    \"shared_screen\",\n                                    \"audio_only\",\n                                    \"audio_transcript\",\n                                    \"chat_file\",\n                                    \"active_speaker\",\n                                    \"host_video\",\n                                    \"audio_only_each_participant\",\n                                    \"cc_transcript\",\n                                    \"closed_caption\",\n                                    \"poll\",\n                                    \"timeline\",\n                                    \"thumbnail\",\n                                    \"chat_message\"\n                                  ]\n                                }\n                              }\n                            }\n                          },\n                          \"participant_audio_files\": {\n                            \"type\": \"array\",\n                            \"title\": \"Recording file List\",\n                            \"description\": \"List of recording file.\",\n                            \"items\": {\n                              \"type\": \"object\",\n                              \"properties\": {\n                                \"id\": {\n                                  \"type\": \"string\",\n                                  \"description\": \"The recording file ID. Included in the response of general query.\"\n                                },\n                                \"recording_start\": {\n                                  \"type\": \"string\",\n                                  \"description\": \"The recording start time.\"\n                                },\n                                \"recording_end\": {\n                                  \"type\": \"string\",\n                                  \"description\": \"The recording end time. Response in general query.\"\n                                },\n                                \"file_name\": {\n                                  \"type\": \"string\",\n                                  \"description\": \"Name of the file.\"\n                                },\n                                \"file_path\": {\n                                  \"type\": \"string\",\n                                  \"description\": \"The file path to the On-Premise account recording. \\n\\n**Note:** This API only returns this field for [Zoom On-Premise accounts](https://support.zoom.us/hc/en-us/articles/360034064852-Zoom-On-Premise-Deployment). It does **not** return the download_url field.\"\n                                },\n                                \"file_type\": {\n                                  \"type\": \"string\",\n                                  \"description\": \"The recording file type. The value of this field could be one of the following:<br>\\nMP4: Video file of the recording.<br>M4A Audio-only file of the recording.<br>TIMELINE: Timestamp file of the recording in JSON file format. To get a timeline file, the \\\"Add a timestamp to the recording\\\" setting must be enabled in the [recording settings](https://support.zoom.us/hc/en-us/articles/360060316092). The time will display in the host's timezone, set on their Zoom profile.\\n<br> TRANSCRIPT: Transcription file of the recording in VTT format.<br> CHAT: A TXT file containing in-session chat messages that were sent during the session.<br>CC: File containing closed captions of the recording in VTT file format.<br>CSV: File containing polling data in csv format.\\n\\n<br>\\n\\nA recording file object with file type of either CC or TIMELINE **does not have** the following properties:<br>\\n\\tid, status, file_size, recording_type.\",\n                                  \"enum\": [\n                                    \"MP4\",\n                                    \"M4A\",\n                                    \"CHAT\",\n                                    \"TRANSCRIPT\",\n                                    \"CSV\",\n                                    \"CC\",\n                                    \"TB\",\n                                    \"CHAT_MESSAGE\"\n                                  ]\n                                },\n                                \"file_size\": {\n                                  \"type\": \"number\",\n                                  \"description\": \"The recording file size.\"\n                                },\n                                \"file_extension\": {\n                                  \"type\": \"string\",\n                                  \"description\": \"The archived file's file extension.\",\n                                  \"enum\": [\"MP4\", \"M4A\", \"TXT\", \"VTT\", \"CSV\", \"JSON\", \"JPG\"]\n                                },\n                                \"download_url\": {\n                                  \"type\": \"string\",\n                                  \"description\": \"The URL at which to download the the recording. \\n\\nTo access a private or password-protected cloud recording of a user in your account, use your [Video SDK API JWT](https://marketplace.zoom.us/docs/guides/build/video-sdk-app/#video-sdk-and-api-credentials). Pass the generated JWT as a Bearer token in the Authorization header of your HTTP request. For example: \\n\\n \\ncurl --request GET \\\\\\n  --url {download_url} \\\\\\n  --header 'authorization: Bearer {JWT} \\\\\\n  --header 'content-type: application/json'\\n\"\n                                },\n                                \"status\": {\n                                  \"type\": \"string\",\n                                  \"description\": \"The recording status.\",\n                                  \"enum\": [\"completed\"]\n                                },\n                                \"recording_type\": {\n                                  \"type\": \"string\",\n                                  \"description\": \"The recording type. The value of this field can be one of the following:<br>shared_screen_with_speaker_view(CC)<br>shared_screen_with_speaker_view<br>shared_screen_with_gallery_view<br>speaker_view<br>gallery_view<br>shared_screen<br>audio_only<br>audio_transcript<br>chat_file<br>active_speaker<br>poll<br>timeline<br>closed_caption\",\n                                  \"enum\": [\n                                    \"shared_screen_with_speaker_view(CC)\",\n                                    \"shared_screen_with_speaker_view\",\n                                    \"shared_screen_with_gallery_view\",\n                                    \"gallery_view\",\n                                    \"shared_screen\",\n                                    \"audio_only\",\n                                    \"audio_transcript\",\n                                    \"chat_file\",\n                                    \"active_speaker\",\n                                    \"host_video\",\n                                    \"audio_only_each_participant\",\n                                    \"cc_transcript\",\n                                    \"closed_caption\",\n                                    \"poll\",\n                                    \"timeline\",\n                                    \"thumbnail\",\n                                    \"chat_message\"\n                                  ]\n                                },\n                                \"user_id\": {\n                                  \"type\": \"string\",\n                                  \"description\": \"The participant's session user ID. This value is assigned to a participant upon joining a session and is only valid for the duration of the session.\"\n                                },\n                                \"user_key\": {\n                                  \"type\": \"string\",\n                                  \"description\": \"The participant's SDK identifier. Set with the user_identity key in the Video SDK JWT payload. This value can be alphanumeric, up to a maximum length of 35 characters.\"\n                                }\n                              }\n                            }\n                          },\n                          \"participant_video_files\": {\n                            \"type\": \"array\",\n                            \"title\": \"Recording file List\",\n                            \"description\": \"List of recording file.\",\n                            \"items\": {\n                              \"type\": \"object\",\n                              \"properties\": {\n                                \"id\": {\n                                  \"type\": \"string\",\n                                  \"description\": \"The recording file ID. Included in the response of general query.\"\n                                },\n                                \"recording_start\": {\n                                  \"type\": \"string\",\n                                  \"description\": \"The recording start time.\"\n                                },\n                                \"recording_end\": {\n                                  \"type\": \"string\",\n                                  \"description\": \"The recording end time. Response in general query.\"\n                                },\n                                \"file_name\": {\n                                  \"type\": \"string\",\n                                  \"description\": \"Name of the file.\"\n                                },\n                                \"file_path\": {\n                                  \"type\": \"string\",\n                                  \"description\": \"The file path to the On-Premise account recording. \\n\\n**Note:** This API only returns this field for [Zoom On-Premise accounts](https://support.zoom.us/hc/en-us/articles/360034064852-Zoom-On-Premise-Deployment). It does **not** return the download_url field.\"\n                                },\n                                \"file_type\": {\n                                  \"type\": \"string\",\n                                  \"description\": \"The recording file type. The value of this field could be one of the following:<br>\\nMP4: Video file of the recording.\",\n                                  \"enum\": [\"MP4\"]\n                                },\n                                \"file_size\": {\n                                  \"type\": \"number\",\n                                  \"description\": \"The recording file size.\"\n                                },\n                                \"file_extension\": {\n                                  \"type\": \"string\",\n                                  \"description\": \"The archived file's file extension.\",\n                                  \"enum\": [\"MP4\"]\n                                },\n                                \"download_url\": {\n                                  \"type\": \"string\",\n                                  \"description\": \"The URL at which to download the the recording. \\n\\nTo access a private or password-protected cloud recording of a user in your account, use your [Video SDK API JWT](https://marketplace.zoom.us/docs/guides/build/video-sdk-app/#video-sdk-and-api-credentials). Pass the generated JWT as a Bearer token in the Authorization header of your HTTP request. For example: \\n\\n \\ncurl --request GET \\\\\\n  --url {download_url} \\\\\\n  --header 'authorization: Bearer {JWT} \\\\\\n  --header 'content-type: application/json'\\n\"\n                                },\n                                \"status\": {\n                                  \"type\": \"string\",\n                                  \"description\": \"The recording status.\",\n                                  \"enum\": [\"completed\"]\n                                },\n                                \"recording_type\": {\n                                  \"type\": \"string\",\n                                  \"description\": \"The recording type. The value of this field can be one of the following:<br>shared_screen_with_speaker_view(CC)<br>shared_screen_with_speaker_view<br>shared_screen_with_gallery_view<br>speaker_view<br>gallery_view<br>shared_screen<br>audio_only<br>audio_transcript<br>chat_file<br>active_speaker<br>poll<br>timeline<br>closed_caption\",\n                                  \"enum\": [\"individual_user\", \"individual_shared_screen\"]\n                                },\n                                \"user_id\": {\n                                  \"type\": \"string\",\n                                  \"description\": \"The participant's session user ID. This value is assigned to a participant upon joining a session and is only valid for the duration of the session.\"\n                                },\n                                \"user_key\": {\n                                  \"type\": \"string\",\n                                  \"description\": \"The participant's SDK identifier. Set with the user_identity key in the Video SDK JWT payload. This value can be alphanumeric, up to a maximum length of 35 characters.\"\n                                }\n                              }\n                            }\n                          }\n                        },\n                        \"additionalProperties\": false\n                      }\n                    },\n                    \"additionalProperties\": false\n                  }\n                },\n                \"additionalProperties\": false\n              },\n              \"examples\": {\n                \"json-example\": {\n                  \"summary\": \"JSON example\",\n                  \"value\": \"{\\n  \\\"event\\\": \\\"session.recording_completed\\\",\\n  \\\"event_ts\\\": 1626230691572,\\n  \\\"download_token\\\": \\\"abJhbGciOiJIUzUxMiJ9.eyJpc3MiOiJodHRwczovL2V2ZW50Lnpvb20udXMiLCJhY2NvdW50SWQiOiJNdDZzdjR1MFRBeVBrd2dzTDJseGlBIiwiYXVkIjoiaHR0cHM6Ly9vYXV0aC56b29tLnVzIiwibWlkIjoieFp3SEc0c3BRU2VuekdZWG16dnpiUT09IiwiZXhwIjoxNjI2MTM5NTA3LCJ1c2VySWQiOiJEWUhyZHBqclMzdWFPZjdkUGtrZzh3In0.a6KetiC6BlkDhf1dP4KBGUE1bb2brMeraoD45yhFx0eSSSTFdkHQnsKmlJQ-hdo9Zy-4vQw3rOxlyoHv583JyZ\\\",\\n  \\\"payload\\\": {\\n    \\\"account_id\\\": \\\"AAAAAABBBB\\\",\\n    \\\"object\\\": {\\n      \\\"session_id\\\": 1234567890,\\n      \\\"session_name\\\": \\\"My Personal Recording\\\",\\n      \\\"session_key\\\": \\\"ABC36jaBI145\\\",\\n      \\\"start_time\\\": \\\"2021-07-13T21:44:51Z\\\",\\n      \\\"timezone\\\": \\\"America/Los_Angeles\\\",\\n      \\\"recording_files\\\": [\\n        {\\n          \\\"id\\\": \\\"ed6c2f27-2ae7-42f4-b3d0-835b493e4fa8\\\",\\n          \\\"recording_start\\\": \\\"2021-03-23T22:14:57Z\\\",\\n          \\\"recording_end\\\": \\\"2021-03-23T23:15:41Z\\\",\\n          \\\"recording_type\\\": \\\"audio_only\\\",\\n          \\\"file_type\\\": \\\"M4A\\\",\\n          \\\"file_size\\\": 246560,\\n          \\\"file_extension\\\": \\\"M4A\\\",\\n          \\\"download_url\\\": \\\"https://example.com/recording/download/Qg75t7xZBtEbAkjdlgbfdngBBBB\\\",\\n          \\\"status\\\": \\\"completed\\\",\\n          \\\"recording_type\\\": \\\"audio_only\\\"\\n        }\\n      ],\\n      \\\"participant_audio_files\\\": [\\n        {\\n          \\\"id\\\": \\\"ed6c2f27-2ae7-42f4-b3d0-835b493e4fa8\\\",\\n          \\\"recording_start\\\": \\\"2021-03-23T22:14:57Z\\\",\\n          \\\"recording_end\\\": \\\"2021-03-23T23:15:41Z\\\",\\n          \\\"file_type\\\": \\\"M4A\\\",\\n          \\\"file_name\\\": \\\"MyRecording\\\",\\n          \\\"file_size\\\": 246560,\\n          \\\"file_extension\\\": \\\"MP4\\\",\\n          \\\"download_url\\\": \\\"https://example.com/recording/download/Qg75t7xZBtEbAkjdlgbfdngAAAA\\\",\\n          \\\"status\\\": \\\"completed\\\",\\n          \\\"recording_type\\\": \\\"audio_only\\\",\\n          \\\"user_id\\\": \\\"16778240\\\",\\n          \\\"user_key\\\": \\\"key1\\\"\\n        }\\n      ],\\n      \\\"participant_video_files\\\": [\\n        {\\n          \\\"id\\\": \\\"0a564312-edf7-495e-b916-6873a7b32c50\\\",\\n          \\\"status\\\": \\\"completed\\\",\\n          \\\"recording_start\\\": \\\"2022-12-06T01:01:30Z\\\",\\n          \\\"recording_end\\\": \\\"2022-12-06T01:10:32Z\\\",\\n          \\\"file_type\\\": \\\"MP4\\\",\\n          \\\"file_size\\\": 1200500,\\n          \\\"download_url\\\": \\\"https://example.com/rec/download/cWfE3Ye3UUFgTxbBcii5t\\\",\\n          \\\"recording_type\\\": \\\"individual_shared_screen\\\",\\n          \\\"file_name\\\": \\\"Separated Share Video - user@example.com\\\",\\n          \\\"file_extension\\\": \\\"MP4\\\",\\n          \\\"user_id\\\": \\\"16778240\\\",\\n          \\\"user_key\\\": \\\"key1\\\"\\n        }\\n      ]\\n    }\\n  }\\n}\"\n                }\n              }\n            }\n          }\n        },\n        \"responses\": {\n          \"200\": {\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"type\": \"object\",\n                  \"required\": [\"event\", \"event_ts\", \"download_token\", \"payload\"],\n                  \"properties\": {\n                    \"event\": {\n                      \"type\": \"string\",\n                      \"enum\": [\"session.recording_completed\"],\n                      \"description\": \"The event's name.\"\n                    },\n                    \"event_ts\": {\n                      \"type\": \"integer\",\n                      \"format\": \"int64\",\n                      \"description\": \"A timestamp, in milliseconds since epoch, at which the event occurred.\"\n                    },\n                    \"download_token\": {\n                      \"type\": \"string\",\n                      \"description\": \"A generated token used to download the recording. The download token only lasts for 24 hours after its creation and you can only download the file within 24 hours of receiving the event notification. Pass the download_token as a Bearer token in the Authorization header of your HTTP request. For example: \\n\\n \\ncurl --request GET \\\\\\n  --url {download_url} \\\\\\n  --header 'authorization: Bearer {download_token} \\\\\\n  --header 'content-type: application/json'\\n\"\n                    },\n                    \"payload\": {\n                      \"type\": \"object\",\n                      \"required\": [\"account_id\", \"object\"],\n                      \"properties\": {\n                        \"account_id\": {\n                          \"type\": \"string\",\n                          \"description\": \"The Video SDK account ID.\"\n                        },\n                        \"object\": {\n                          \"type\": \"object\",\n                          \"description\": \"Information about the session. This object only returns updated properties.\",\n                          \"required\": [\n                            \"session_id\",\n                            \"session_name\",\n                            \"session_key\",\n                            \"start_time\",\n                            \"timezone\",\n                            \"recording_files\"\n                          ],\n                          \"properties\": {\n                            \"session_id\": {\n                              \"type\": \"string\",\n                              \"description\": \"Unique session identifier. Each instance of the session will have its own session_id.\"\n                            },\n                            \"session_name\": {\n                              \"type\": \"string\",\n                              \"description\": \"Session name.\"\n                            },\n                            \"session_key\": {\n                              \"type\": \"string\",\n                              \"description\": \"The Video SDK custom session ID.\"\n                            },\n                            \"start_time\": {\n                              \"type\": \"string\",\n                              \"format\": \"date-time\",\n                              \"description\": \"The time at which the session started.\"\n                            },\n                            \"timezone\": {\n                              \"type\": \"string\",\n                              \"description\": \"The user's timezone.\"\n                            },\n                            \"recording_files\": {\n                              \"type\": \"array\",\n                              \"title\": \"Recording file List\",\n                              \"description\": \"List of recording file.\",\n                              \"items\": {\n                                \"type\": \"object\",\n                                \"properties\": {\n                                  \"id\": {\n                                    \"type\": \"string\",\n                                    \"description\": \"The recording file ID. Included in the response of general query.\"\n                                  },\n                                  \"recording_start\": {\n                                    \"type\": \"string\",\n                                    \"description\": \"The recording start time.\"\n                                  },\n                                  \"recording_end\": {\n                                    \"type\": \"string\",\n                                    \"description\": \"The recording end time. Response in general query.\"\n                                  },\n                                  \"file_name\": {\n                                    \"type\": \"string\",\n                                    \"description\": \"Name of the file.\"\n                                  },\n                                  \"file_path\": {\n                                    \"type\": \"string\",\n                                    \"description\": \"The file path to the On-Premise account recording. \\n\\n**Note:** This API only returns this field for [Zoom On-Premise accounts](https://support.zoom.us/hc/en-us/articles/360034064852-Zoom-On-Premise-Deployment). It does **not** return the download_url field.\"\n                                  },\n                                  \"file_type\": {\n                                    \"type\": \"string\",\n                                    \"description\": \"The recording file type. The value of this field could be one of the following:<br>\\nMP4: Video file of the recording.<br>M4A Audio-only file of the recording.<br>TIMELINE: Timestamp file of the recording in JSON file format. To get a timeline file, the \\\"Add a timestamp to the recording\\\" setting must be enabled in the [recording settings](https://support.zoom.us/hc/en-us/articles/360060316092). The time will display in the host's timezone, set on their Zoom profile.\\n<br> TRANSCRIPT: Transcription file of the recording in VTT format.<br> CHAT: A TXT file containing in-session chat messages that were sent during the session.<br>CC: File containing closed captions of the recording in VTT file format.<br>CSV: File containing polling data in csv format.\\n\\n<br>\\n\\nA recording file object with file type of either CC or TIMELINE **does not have** the following properties:<br>\\n\\tid, status, file_size, recording_type.\",\n                                    \"enum\": [\n                                      \"MP4\",\n                                      \"M4A\",\n                                      \"CHAT\",\n                                      \"TRANSCRIPT\",\n                                      \"CSV\",\n                                      \"CC\",\n                                      \"TB\",\n                                      \"CHAT_MESSAGE\"\n                                    ]\n                                  },\n                                  \"file_size\": {\n                                    \"type\": \"number\",\n                                    \"description\": \"The recording file size.\"\n                                  },\n                                  \"file_extension\": {\n                                    \"type\": \"string\",\n                                    \"description\": \"The archived file's file extension.\",\n                                    \"enum\": [\"MP4\", \"M4A\", \"TXT\", \"VTT\", \"CSV\", \"JSON\", \"JPG\"]\n                                  },\n                                  \"download_url\": {\n                                    \"type\": \"string\",\n                                    \"description\": \"The URL at which to download the the recording. \\n\\nTo access a private or password-protected cloud recording of a user in your account, use your [Video SDK API JWT](https://marketplace.zoom.us/docs/guides/build/video-sdk-app/#video-sdk-and-api-credentials). Pass the generated JWT as a Bearer token in the Authorization header of your HTTP request. For example: \\n\\n \\ncurl --request GET \\\\\\n  --url {download_url} \\\\\\n  --header 'authorization: Bearer {JWT} \\\\\\n  --header 'content-type: application/json'\\n\"\n                                  },\n                                  \"status\": {\n                                    \"type\": \"string\",\n                                    \"description\": \"The recording status.\",\n                                    \"enum\": [\"completed\"]\n                                  },\n                                  \"recording_type\": {\n                                    \"type\": \"string\",\n                                    \"description\": \"The recording type. The value of this field can be one of the following:<br>shared_screen_with_speaker_view(CC)<br>shared_screen_with_speaker_view<br>shared_screen_with_gallery_view<br>speaker_view<br>gallery_view<br>shared_screen<br>audio_only<br>audio_transcript<br>chat_file<br>active_speaker<br>poll<br>timeline<br>closed_caption\",\n                                    \"enum\": [\n                                      \"shared_screen_with_speaker_view(CC)\",\n                                      \"shared_screen_with_speaker_view\",\n                                      \"shared_screen_with_gallery_view\",\n                                      \"gallery_view\",\n                                      \"shared_screen\",\n                                      \"audio_only\",\n                                      \"audio_transcript\",\n                                      \"chat_file\",\n                                      \"active_speaker\",\n                                      \"host_video\",\n                                      \"audio_only_each_participant\",\n                                      \"cc_transcript\",\n                                      \"closed_caption\",\n                                      \"poll\",\n                                      \"timeline\",\n                                      \"thumbnail\",\n                                      \"chat_message\"\n                                    ]\n                                  }\n                                }\n                              }\n                            },\n                            \"participant_audio_files\": {\n                              \"type\": \"array\",\n                              \"title\": \"Recording file List\",\n                              \"description\": \"List of recording file.\",\n                              \"items\": {\n                                \"type\": \"object\",\n                                \"properties\": {\n                                  \"id\": {\n                                    \"type\": \"string\",\n                                    \"description\": \"The recording file ID. Included in the response of general query.\"\n                                  },\n                                  \"recording_start\": {\n                                    \"type\": \"string\",\n                                    \"description\": \"The recording start time.\"\n                                  },\n                                  \"recording_end\": {\n                                    \"type\": \"string\",\n                                    \"description\": \"The recording end time. Response in general query.\"\n                                  },\n                                  \"file_name\": {\n                                    \"type\": \"string\",\n                                    \"description\": \"Name of the file.\"\n                                  },\n                                  \"file_path\": {\n                                    \"type\": \"string\",\n                                    \"description\": \"The file path to the On-Premise account recording. \\n\\n**Note:** This API only returns this field for [Zoom On-Premise accounts](https://support.zoom.us/hc/en-us/articles/360034064852-Zoom-On-Premise-Deployment). It does **not** return the download_url field.\"\n                                  },\n                                  \"file_type\": {\n                                    \"type\": \"string\",\n                                    \"description\": \"The recording file type. The value of this field could be one of the following:<br>\\nMP4: Video file of the recording.<br>M4A Audio-only file of the recording.<br>TIMELINE: Timestamp file of the recording in JSON file format. To get a timeline file, the \\\"Add a timestamp to the recording\\\" setting must be enabled in the [recording settings](https://support.zoom.us/hc/en-us/articles/360060316092). The time will display in the host's timezone, set on their Zoom profile.\\n<br> TRANSCRIPT: Transcription file of the recording in VTT format.<br> CHAT: A TXT file containing in-session chat messages that were sent during the session.<br>CC: File containing closed captions of the recording in VTT file format.<br>CSV: File containing polling data in csv format.\\n\\n<br>\\n\\nA recording file object with file type of either CC or TIMELINE **does not have** the following properties:<br>\\n\\tid, status, file_size, recording_type.\",\n                                    \"enum\": [\n                                      \"MP4\",\n                                      \"M4A\",\n                                      \"CHAT\",\n                                      \"TRANSCRIPT\",\n                                      \"CSV\",\n                                      \"CC\",\n                                      \"TB\",\n                                      \"CHAT_MESSAGE\"\n                                    ]\n                                  },\n                                  \"file_size\": {\n                                    \"type\": \"number\",\n                                    \"description\": \"The recording file size.\"\n                                  },\n                                  \"file_extension\": {\n                                    \"type\": \"string\",\n                                    \"description\": \"The archived file's file extension.\",\n                                    \"enum\": [\"MP4\", \"M4A\", \"TXT\", \"VTT\", \"CSV\", \"JSON\", \"JPG\"]\n                                  },\n                                  \"download_url\": {\n                                    \"type\": \"string\",\n                                    \"description\": \"The URL at which to download the the recording. \\n\\nTo access a private or password-protected cloud recording of a user in your account, use your [Video SDK API JWT](https://marketplace.zoom.us/docs/guides/build/video-sdk-app/#video-sdk-and-api-credentials). Pass the generated JWT as a Bearer token in the Authorization header of your HTTP request. For example: \\n\\n \\ncurl --request GET \\\\\\n  --url {download_url} \\\\\\n  --header 'authorization: Bearer {JWT} \\\\\\n  --header 'content-type: application/json'\\n\"\n                                  },\n                                  \"status\": {\n                                    \"type\": \"string\",\n                                    \"description\": \"The recording status.\",\n                                    \"enum\": [\"completed\"]\n                                  },\n                                  \"recording_type\": {\n                                    \"type\": \"string\",\n                                    \"description\": \"The recording type. The value of this field can be one of the following:<br>shared_screen_with_speaker_view(CC)<br>shared_screen_with_speaker_view<br>shared_screen_with_gallery_view<br>speaker_view<br>gallery_view<br>shared_screen<br>audio_only<br>audio_transcript<br>chat_file<br>active_speaker<br>poll<br>timeline<br>closed_caption\",\n                                    \"enum\": [\n                                      \"shared_screen_with_speaker_view(CC)\",\n                                      \"shared_screen_with_speaker_view\",\n                                      \"shared_screen_with_gallery_view\",\n                                      \"gallery_view\",\n                                      \"shared_screen\",\n                                      \"audio_only\",\n                                      \"audio_transcript\",\n                                      \"chat_file\",\n                                      \"active_speaker\",\n                                      \"host_video\",\n                                      \"audio_only_each_participant\",\n                                      \"cc_transcript\",\n                                      \"closed_caption\",\n                                      \"poll\",\n                                      \"timeline\",\n                                      \"thumbnail\",\n                                      \"chat_message\"\n                                    ]\n                                  },\n                                  \"user_id\": {\n                                    \"type\": \"string\",\n                                    \"description\": \"The participant's session user ID. This value is assigned to a participant upon joining a session and is only valid for the duration of the session.\"\n                                  },\n                                  \"user_key\": {\n                                    \"type\": \"string\",\n                                    \"description\": \"The participant's SDK identifier. Set with the user_identity key in the Video SDK JWT payload. This value can be alphanumeric, up to a maximum length of 35 characters.\"\n                                  }\n                                }\n                              }\n                            },\n                            \"participant_video_files\": {\n                              \"type\": \"array\",\n                              \"title\": \"Recording file List\",\n                              \"description\": \"List of recording file.\",\n                              \"items\": {\n                                \"type\": \"object\",\n                                \"properties\": {\n                                  \"id\": {\n                                    \"type\": \"string\",\n                                    \"description\": \"The recording file ID. Included in the response of general query.\"\n                                  },\n                                  \"recording_start\": {\n                                    \"type\": \"string\",\n                                    \"description\": \"The recording start time.\"\n                                  },\n                                  \"recording_end\": {\n                                    \"type\": \"string\",\n                                    \"description\": \"The recording end time. Response in general query.\"\n                                  },\n                                  \"file_name\": {\n                                    \"type\": \"string\",\n                                    \"description\": \"Name of the file.\"\n                                  },\n                                  \"file_path\": {\n                                    \"type\": \"string\",\n                                    \"description\": \"The file path to the On-Premise account recording. \\n\\n**Note:** This API only returns this field for [Zoom On-Premise accounts](https://support.zoom.us/hc/en-us/articles/360034064852-Zoom-On-Premise-Deployment). It does **not** return the download_url field.\"\n                                  },\n                                  \"file_type\": {\n                                    \"type\": \"string\",\n                                    \"description\": \"The recording file type. The value of this field could be one of the following:<br>\\nMP4: Video file of the recording.\",\n                                    \"enum\": [\"MP4\"]\n                                  },\n                                  \"file_size\": {\n                                    \"type\": \"number\",\n                                    \"description\": \"The recording file size.\"\n                                  },\n                                  \"file_extension\": {\n                                    \"type\": \"string\",\n                                    \"description\": \"The archived file's file extension.\",\n                                    \"enum\": [\"MP4\"]\n                                  },\n                                  \"download_url\": {\n                                    \"type\": \"string\",\n                                    \"description\": \"The URL at which to download the the recording. \\n\\nTo access a private or password-protected cloud recording of a user in your account, use your [Video SDK API JWT](https://marketplace.zoom.us/docs/guides/build/video-sdk-app/#video-sdk-and-api-credentials). Pass the generated JWT as a Bearer token in the Authorization header of your HTTP request. For example: \\n\\n \\ncurl --request GET \\\\\\n  --url {download_url} \\\\\\n  --header 'authorization: Bearer {JWT} \\\\\\n  --header 'content-type: application/json'\\n\"\n                                  },\n                                  \"status\": {\n                                    \"type\": \"string\",\n                                    \"description\": \"The recording status.\",\n                                    \"enum\": [\"completed\"]\n                                  },\n                                  \"recording_type\": {\n                                    \"type\": \"string\",\n                                    \"description\": \"The recording type. The value of this field can be one of the following:<br>shared_screen_with_speaker_view(CC)<br>shared_screen_with_speaker_view<br>shared_screen_with_gallery_view<br>speaker_view<br>gallery_view<br>shared_screen<br>audio_only<br>audio_transcript<br>chat_file<br>active_speaker<br>poll<br>timeline<br>closed_caption\",\n                                    \"enum\": [\"individual_user\", \"individual_shared_screen\"]\n                                  },\n                                  \"user_id\": {\n                                    \"type\": \"string\",\n                                    \"description\": \"The participant's session user ID. This value is assigned to a participant upon joining a session and is only valid for the duration of the session.\"\n                                  },\n                                  \"user_key\": {\n                                    \"type\": \"string\",\n                                    \"description\": \"The participant's SDK identifier. Set with the user_identity key in the Video SDK JWT payload. This value can be alphanumeric, up to a maximum length of 35 characters.\"\n                                  }\n                                }\n                              }\n                            }\n                          },\n                          \"additionalProperties\": false\n                        }\n                      },\n                      \"additionalProperties\": false\n                    }\n                  },\n                  \"additionalProperties\": false\n                },\n                \"examples\": {\n                  \"json-example\": {\n                    \"summary\": \"JSON example\",\n                    \"value\": \"{\\n  \\\"event\\\": \\\"session.recording_completed\\\",\\n  \\\"event_ts\\\": 1626230691572,\\n  \\\"download_token\\\": \\\"abJhbGciOiJIUzUxMiJ9.eyJpc3MiOiJodHRwczovL2V2ZW50Lnpvb20udXMiLCJhY2NvdW50SWQiOiJNdDZzdjR1MFRBeVBrd2dzTDJseGlBIiwiYXVkIjoiaHR0cHM6Ly9vYXV0aC56b29tLnVzIiwibWlkIjoieFp3SEc0c3BRU2VuekdZWG16dnpiUT09IiwiZXhwIjoxNjI2MTM5NTA3LCJ1c2VySWQiOiJEWUhyZHBqclMzdWFPZjdkUGtrZzh3In0.a6KetiC6BlkDhf1dP4KBGUE1bb2brMeraoD45yhFx0eSSSTFdkHQnsKmlJQ-hdo9Zy-4vQw3rOxlyoHv583JyZ\\\",\\n  \\\"payload\\\": {\\n    \\\"account_id\\\": \\\"AAAAAABBBB\\\",\\n    \\\"object\\\": {\\n      \\\"session_id\\\": 1234567890,\\n      \\\"session_name\\\": \\\"My Personal Recording\\\",\\n      \\\"session_key\\\": \\\"ABC36jaBI145\\\",\\n      \\\"start_time\\\": \\\"2021-07-13T21:44:51Z\\\",\\n      \\\"timezone\\\": \\\"America/Los_Angeles\\\",\\n      \\\"recording_files\\\": [\\n        {\\n          \\\"id\\\": \\\"ed6c2f27-2ae7-42f4-b3d0-835b493e4fa8\\\",\\n          \\\"recording_start\\\": \\\"2021-03-23T22:14:57Z\\\",\\n          \\\"recording_end\\\": \\\"2021-03-23T23:15:41Z\\\",\\n          \\\"recording_type\\\": \\\"audio_only\\\",\\n          \\\"file_type\\\": \\\"M4A\\\",\\n          \\\"file_size\\\": 246560,\\n          \\\"file_extension\\\": \\\"M4A\\\",\\n          \\\"download_url\\\": \\\"https://example.com/recording/download/Qg75t7xZBtEbAkjdlgbfdngBBBB\\\",\\n          \\\"status\\\": \\\"completed\\\",\\n          \\\"recording_type\\\": \\\"audio_only\\\"\\n        }\\n      ],\\n      \\\"participant_audio_files\\\": [\\n        {\\n          \\\"id\\\": \\\"ed6c2f27-2ae7-42f4-b3d0-835b493e4fa8\\\",\\n          \\\"recording_start\\\": \\\"2021-03-23T22:14:57Z\\\",\\n          \\\"recording_end\\\": \\\"2021-03-23T23:15:41Z\\\",\\n          \\\"file_type\\\": \\\"M4A\\\",\\n          \\\"file_name\\\": \\\"MyRecording\\\",\\n          \\\"file_size\\\": 246560,\\n          \\\"file_extension\\\": \\\"MP4\\\",\\n          \\\"download_url\\\": \\\"https://example.com/recording/download/Qg75t7xZBtEbAkjdlgbfdngAAAA\\\",\\n          \\\"status\\\": \\\"completed\\\",\\n          \\\"recording_type\\\": \\\"audio_only\\\",\\n          \\\"user_id\\\": \\\"16778240\\\",\\n          \\\"user_key\\\": \\\"key1\\\"\\n        }\\n      ],\\n      \\\"participant_video_files\\\": [\\n        {\\n          \\\"id\\\": \\\"0a564312-edf7-495e-b916-6873a7b32c50\\\",\\n          \\\"status\\\": \\\"completed\\\",\\n          \\\"recording_start\\\": \\\"2022-12-06T01:01:30Z\\\",\\n          \\\"recording_end\\\": \\\"2022-12-06T01:10:32Z\\\",\\n          \\\"file_type\\\": \\\"MP4\\\",\\n          \\\"file_size\\\": 1200500,\\n          \\\"download_url\\\": \\\"https://example.com/rec/download/cWfE3Ye3UUFgTxbBcii5t\\\",\\n          \\\"recording_type\\\": \\\"individual_shared_screen\\\",\\n          \\\"file_name\\\": \\\"Separated Share Video - user@example.com\\\",\\n          \\\"file_extension\\\": \\\"MP4\\\",\\n          \\\"user_id\\\": \\\"16778240\\\",\\n          \\\"user_key\\\": \\\"key1\\\"\\n        }\\n      ]\\n    }\\n  }\\n}\"\n                  }\n                }\n              }\n            }\n          }\n        }\n      }\n    },\n    \"session.recording_transcript_failed\": {\n      \"post\": {\n        \"tags\": [\"session\"],\n        \"operationId\": \"session.recording_transcript_failed\",\n        \"requestBody\": {\n          \"description\": \"# session.recording_transcript_failed\\n---\\n\\nEvent: `session.recording_transcript_failed`\\n\\n## Event description\\n\\nThe **Session recording transcript failed** event is triggered every time the transcript of the recording of a session generated failed.\\n\\nOnly a session host or co-host can start, pause, resume, or stop a cloud recording. A recording is considered complete **after** the host or co-host ends the session. See [Enable cloud recording](https://developers.zoom.us/docs/video-sdk/account/#enable-cloud-recording) for details.\\n\\n## Prerequisites\\n\\n* Enable Cloud Recording on the Video SDK account.\\n* Enable Event Subscriptions for your app with the following configurations:\\n  * A valid Event Notification Endpoint URL.\\n  * Enable session recording transcript completed subscription under the Recording event.\\n\\nThe tabs below display the complete schema, payload with data types, and an example of the `session.recording_transcript_completed` event notification:\\n\\n\\n\\n**Event type**: `session.recording_transcript_failed`\\n\",\n          \"content\": {\n            \"application/json\": {\n              \"schema\": {\n                \"type\": \"object\",\n                \"required\": [\"event\", \"event_ts\", \"payload\"],\n                \"properties\": {\n                  \"event\": {\n                    \"type\": \"string\",\n                    \"enum\": [\"session.recording_transcript_failed\"],\n                    \"description\": \"The event's name.\"\n                  },\n                  \"event_ts\": {\n                    \"type\": \"integer\",\n                    \"format\": \"int64\",\n                    \"description\": \"A timestamp, in milliseconds since epoch, when the event occurred.\"\n                  },\n                  \"payload\": {\n                    \"type\": \"object\",\n                    \"required\": [\"account_id\", \"object\"],\n                    \"properties\": {\n                      \"account_id\": {\n                        \"type\": \"string\",\n                        \"description\": \"The Video SDK account ID.\"\n                      },\n                      \"object\": {\n                        \"type\": \"object\",\n                        \"description\": \"Information about the session. This object only returns updated properties.\",\n                        \"required\": [\n                          \"session_id\",\n                          \"session_name\",\n                          \"session_key\",\n                          \"start_time\",\n                          \"timezone\"\n                        ],\n                        \"properties\": {\n                          \"session_id\": {\n                            \"type\": \"string\",\n                            \"description\": \"Unique session identifier. Each instance of the session will have its own session_id.\"\n                          },\n                          \"session_name\": {\n                            \"type\": \"string\",\n                            \"description\": \"Session name.\"\n                          },\n                          \"session_key\": {\n                            \"type\": \"string\",\n                            \"description\": \"The Video SDK custom session ID.\"\n                          },\n                          \"start_time\": {\n                            \"type\": \"string\",\n                            \"format\": \"date-time\",\n                            \"description\": \"The time when the session started.\"\n                          },\n                          \"timezone\": {\n                            \"type\": \"string\",\n                            \"description\": \"The user's timezone.\"\n                          }\n                        },\n                        \"additionalProperties\": false\n                      }\n                    },\n                    \"additionalProperties\": false\n                  }\n                },\n                \"additionalProperties\": false\n              },\n              \"examples\": {\n                \"json-example\": {\n                  \"summary\": \"JSON example\",\n                  \"value\": \"{\\n  \\\"event\\\": \\\"session.recording_transcript_completed\\\",\\n  \\\"event_ts\\\": 1626230691572,\\n  \\\"payload\\\": {\\n    \\\"account_id\\\": \\\"AAAAAABBBB\\\",\\n    \\\"object\\\": {\\n      \\\"session_id\\\": 1234567890,\\n      \\\"session_name\\\": \\\"My Personal Recording\\\",\\n      \\\"session_key\\\": \\\"ABC36jaBI145\\\",\\n      \\\"start_time\\\": \\\"2021-07-13T21:44:51Z\\\",\\n      \\\"timezone\\\": \\\"America/Los_Angeles\\\"\\n    }\\n  }\\n}\"\n                }\n              }\n            }\n          }\n        },\n        \"responses\": {\n          \"200\": {\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"type\": \"object\",\n                  \"required\": [\"event\", \"event_ts\", \"payload\"],\n                  \"properties\": {\n                    \"event\": {\n                      \"type\": \"string\",\n                      \"enum\": [\"session.recording_transcript_failed\"],\n                      \"description\": \"The event's name.\"\n                    },\n                    \"event_ts\": {\n                      \"type\": \"integer\",\n                      \"format\": \"int64\",\n                      \"description\": \"A timestamp, in milliseconds since epoch, when the event occurred.\"\n                    },\n                    \"payload\": {\n                      \"type\": \"object\",\n                      \"required\": [\"account_id\", \"object\"],\n                      \"properties\": {\n                        \"account_id\": {\n                          \"type\": \"string\",\n                          \"description\": \"The Video SDK account ID.\"\n                        },\n                        \"object\": {\n                          \"type\": \"object\",\n                          \"description\": \"Information about the session. This object only returns updated properties.\",\n                          \"required\": [\n                            \"session_id\",\n                            \"session_name\",\n                            \"session_key\",\n                            \"start_time\",\n                            \"timezone\"\n                          ],\n                          \"properties\": {\n                            \"session_id\": {\n                              \"type\": \"string\",\n                              \"description\": \"Unique session identifier. Each instance of the session will have its own session_id.\"\n                            },\n                            \"session_name\": {\n                              \"type\": \"string\",\n                              \"description\": \"Session name.\"\n                            },\n                            \"session_key\": {\n                              \"type\": \"string\",\n                              \"description\": \"The Video SDK custom session ID.\"\n                            },\n                            \"start_time\": {\n                              \"type\": \"string\",\n                              \"format\": \"date-time\",\n                              \"description\": \"The time when the session started.\"\n                            },\n                            \"timezone\": {\n                              \"type\": \"string\",\n                              \"description\": \"The user's timezone.\"\n                            }\n                          },\n                          \"additionalProperties\": false\n                        }\n                      },\n                      \"additionalProperties\": false\n                    }\n                  },\n                  \"additionalProperties\": false\n                },\n                \"examples\": {\n                  \"json-example\": {\n                    \"summary\": \"JSON example\",\n                    \"value\": \"{\\n  \\\"event\\\": \\\"session.recording_transcript_completed\\\",\\n  \\\"event_ts\\\": 1626230691572,\\n  \\\"payload\\\": {\\n    \\\"account_id\\\": \\\"AAAAAABBBB\\\",\\n    \\\"object\\\": {\\n      \\\"session_id\\\": 1234567890,\\n      \\\"session_name\\\": \\\"My Personal Recording\\\",\\n      \\\"session_key\\\": \\\"ABC36jaBI145\\\",\\n      \\\"start_time\\\": \\\"2021-07-13T21:44:51Z\\\",\\n      \\\"timezone\\\": \\\"America/Los_Angeles\\\"\\n    }\\n  }\\n}\"\n                  }\n                }\n              }\n            }\n          }\n        }\n      }\n    },\n    \"session.recording_trashed\": {\n      \"post\": {\n        \"tags\": [\"session\"],\n        \"operationId\": \"session.recording_trashed\",\n        \"requestBody\": {\n          \"description\": \"# session.recording_trashed\\n---\\n\\nEvent: `session.recording_trashed`\\n\\n## Event description\\n\\nThe **Session recording deleted to trash** event is triggered every time one of your app users or account users temporarily delete a cloud recording.\\n\\nWhen a user initially deletes a recording, it is deleted to the trash. Recordings deleted to the trash can be recovered up to 30 days after deletion. Users can move a recording to the trash using:\\n\\n* The [Delete session's recording](https://developers.zoom.us/docs/api/rest/reference/video-sdk/methods/#operation/recordingDelete) API **with the trash query parameter** or\\n* The Zoom web portal. See [Video SDK account](https://developers.zoom.us/docs/video-sdk/account/) for details.\\n\\n## Prerequisites\\n\\n* Cloud Recording must be enabled on the Video SDK account.\\n* Event Subscriptions must be enabled for your app with the following configurations:\\n\\t* A valid Event Notification Endpoint URL.\\n\\t* **Session recording deleted to trash** subscription enabled under the **Recording** event.\\n\\nThe tabs below display the complete schema, payload with data types, and an example of the `session.recording_trashed` event notification:\\n\\n\\n\\n**Event type**: `session.recording_trashed`\\n\",\n          \"content\": {\n            \"application/json\": {\n              \"schema\": {\n                \"type\": \"object\",\n                \"required\": [\"event\", \"event_ts\", \"payload\"],\n                \"properties\": {\n                  \"event\": {\n                    \"type\": \"string\",\n                    \"enum\": [\"session.recording_trashed\"],\n                    \"description\": \"The event's name.\"\n                  },\n                  \"event_ts\": {\n                    \"type\": \"integer\",\n                    \"format\": \"int64\",\n                    \"description\": \"A timestamp, in milliseconds since epoch, at which the event occurred.\"\n                  },\n                  \"payload\": {\n                    \"type\": \"object\",\n                    \"required\": [\"account_id\", \"operator\", \"operator_id\", \"object\"],\n                    \"properties\": {\n                      \"account_id\": {\n                        \"type\": \"string\",\n                        \"description\": \"The Video SDK account ID.\"\n                      },\n                      \"operator\": {\n                        \"type\": \"string\",\n                        \"format\": \"email\",\n                        \"description\": \"The email address of the user who deleted the recording.\"\n                      },\n                      \"operator_id\": {\n                        \"type\": \"string\",\n                        \"description\": \"The user ID of the user who deleted the recording.\"\n                      },\n                      \"object\": {\n                        \"type\": \"object\",\n                        \"description\": \"Information about the session. This object only returns updated properties.\",\n                        \"required\": [\n                          \"session_id\",\n                          \"session_name\",\n                          \"session_key\",\n                          \"start_time\",\n                          \"timezone\"\n                        ],\n                        \"properties\": {\n                          \"session_id\": {\n                            \"type\": \"string\",\n                            \"description\": \"Unique session identifier. Each instance of the session will have its own session_id.\"\n                          },\n                          \"session_name\": {\n                            \"type\": \"string\",\n                            \"description\": \"Session name.\"\n                          },\n                          \"session_key\": {\n                            \"type\": \"string\",\n                            \"description\": \"The Video SDK custom session ID.\"\n                          },\n                          \"start_time\": {\n                            \"type\": \"string\",\n                            \"format\": \"date-time\",\n                            \"description\": \"The time at which the session started.\"\n                          },\n                          \"timezone\": {\n                            \"type\": \"string\",\n                            \"description\": \"The user's timezone.\"\n                          }\n                        },\n                        \"additionalProperties\": false\n                      }\n                    },\n                    \"additionalProperties\": false\n                  }\n                },\n                \"additionalProperties\": false\n              },\n              \"examples\": {\n                \"json-example\": {\n                  \"summary\": \"JSON example\",\n                  \"value\": \"{\\n  \\\"event\\\": \\\"session.recording_trashed\\\",\\n  \\\"event_ts\\\": 1626230691572,\\n  \\\"payload\\\": {\\n    \\\"account_id\\\": \\\"AAAAAABBBB\\\",\\n\\t\\\"operator\\\" : \\\"user@example.com\\\",\\n\\t\\\"operator_id\\\" : \\\"I7zp-pYbTl22Z29H796Ixg\\\",\\n    \\\"object\\\": {\\n      \\\"session_id\\\": 1234567890,\\n      \\\"session_name\\\": \\\"My Personal Recording\\\",\\n      \\\"session_key\\\": \\\"ABC36jaBI145\\\",\\n      \\\"start_time\\\": \\\"2021-07-13T21:44:51Z\\\",\\n      \\\"timezone\\\": \\\"America/Los_Angeles\\\"\\n    }\\n  }\\n}\"\n                }\n              }\n            }\n          }\n        },\n        \"responses\": {\n          \"200\": {\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"type\": \"object\",\n                  \"required\": [\"event\", \"event_ts\", \"payload\"],\n                  \"properties\": {\n                    \"event\": {\n                      \"type\": \"string\",\n                      \"enum\": [\"session.recording_trashed\"],\n                      \"description\": \"The event's name.\"\n                    },\n                    \"event_ts\": {\n                      \"type\": \"integer\",\n                      \"format\": \"int64\",\n                      \"description\": \"A timestamp, in milliseconds since epoch, at which the event occurred.\"\n                    },\n                    \"payload\": {\n                      \"type\": \"object\",\n                      \"required\": [\"account_id\", \"operator\", \"operator_id\", \"object\"],\n                      \"properties\": {\n                        \"account_id\": {\n                          \"type\": \"string\",\n                          \"description\": \"The Video SDK account ID.\"\n                        },\n                        \"operator\": {\n                          \"type\": \"string\",\n                          \"format\": \"email\",\n                          \"description\": \"The email address of the user who deleted the recording.\"\n                        },\n                        \"operator_id\": {\n                          \"type\": \"string\",\n                          \"description\": \"The user ID of the user who deleted the recording.\"\n                        },\n                        \"object\": {\n                          \"type\": \"object\",\n                          \"description\": \"Information about the session. This object only returns updated properties.\",\n                          \"required\": [\n                            \"session_id\",\n                            \"session_name\",\n                            \"session_key\",\n                            \"start_time\",\n                            \"timezone\"\n                          ],\n                          \"properties\": {\n                            \"session_id\": {\n                              \"type\": \"string\",\n                              \"description\": \"Unique session identifier. Each instance of the session will have its own session_id.\"\n                            },\n                            \"session_name\": {\n                              \"type\": \"string\",\n                              \"description\": \"Session name.\"\n                            },\n                            \"session_key\": {\n                              \"type\": \"string\",\n                              \"description\": \"The Video SDK custom session ID.\"\n                            },\n                            \"start_time\": {\n                              \"type\": \"string\",\n                              \"format\": \"date-time\",\n                              \"description\": \"The time at which the session started.\"\n                            },\n                            \"timezone\": {\n                              \"type\": \"string\",\n                              \"description\": \"The user's timezone.\"\n                            }\n                          },\n                          \"additionalProperties\": false\n                        }\n                      },\n                      \"additionalProperties\": false\n                    }\n                  },\n                  \"additionalProperties\": false\n                },\n                \"examples\": {\n                  \"json-example\": {\n                    \"summary\": \"JSON example\",\n                    \"value\": \"{\\n  \\\"event\\\": \\\"session.recording_trashed\\\",\\n  \\\"event_ts\\\": 1626230691572,\\n  \\\"payload\\\": {\\n    \\\"account_id\\\": \\\"AAAAAABBBB\\\",\\n\\t\\\"operator\\\" : \\\"user@example.com\\\",\\n\\t\\\"operator_id\\\" : \\\"I7zp-pYbTl22Z29H796Ixg\\\",\\n    \\\"object\\\": {\\n      \\\"session_id\\\": 1234567890,\\n      \\\"session_name\\\": \\\"My Personal Recording\\\",\\n      \\\"session_key\\\": \\\"ABC36jaBI145\\\",\\n      \\\"start_time\\\": \\\"2021-07-13T21:44:51Z\\\",\\n      \\\"timezone\\\": \\\"America/Los_Angeles\\\"\\n    }\\n  }\\n}\"\n                  }\n                }\n              }\n            }\n          }\n        }\n      }\n    },\n    \"session.user_joined\": {\n      \"post\": {\n        \"tags\": [\"session\"],\n        \"operationId\": \"session.user_joined\",\n        \"requestBody\": {\n          \"description\": \"# session.user_joined\\n---\\n\\n\\nThe Session User Joined event is triggered every time a user (including host and co-host) joins a session.\\n\\n## Prerequisites\\nEvent Subscriptions must be enabled for your [Marketplace app](https://marketplace.zoom.us/user/build) with the following configurations:\\n\\n* A valid Event Notification Endpoint URL.\\n* Session User Joined subscription enabled under the Video SDK event.\\n\\nThe tabs below display the complete schema, payload with data types, and an example of the `session.user_joined` event notification:\\n\\n\\n\\n**Event type**: `session.user_joined`\\n\",\n          \"content\": {\n            \"application/json\": {\n              \"schema\": {\n                \"type\": \"object\",\n                \"required\": [\"event\", \"event_ts\", \"payload\"],\n                \"properties\": {\n                  \"event\": {\n                    \"type\": \"string\",\n                    \"enum\": [\"session.user_joined\"],\n                    \"description\": \"The event's name.\"\n                  },\n                  \"event_ts\": {\n                    \"type\": \"integer\",\n                    \"format\": \"int64\",\n                    \"description\": \"A timestamp, in milliseconds since epoch, at which the event occurred.\"\n                  },\n                  \"payload\": {\n                    \"type\": \"object\",\n                    \"required\": [\"account_id\", \"object\"],\n                    \"properties\": {\n                      \"account_id\": {\n                        \"type\": \"string\",\n                        \"description\": \"The Video SDK account ID.\"\n                      },\n                      \"object\": {\n                        \"type\": \"object\",\n                        \"description\": \"Information about the session. This object only returns updated properties.\",\n                        \"required\": [\"id\", \"session_id\", \"session_name\", \"user\"],\n                        \"properties\": {\n                          \"id\": {\n                            \"type\": \"string\",\n                            \"description\": \"The session ID.\"\n                          },\n                          \"session_id\": {\n                            \"type\": \"string\",\n                            \"description\": \"Unique session identifier. Each instance of the session will have its own session_id.\"\n                          },\n                          \"session_name\": {\n                            \"type\": \"string\",\n                            \"description\": \"Session name.\"\n                          },\n                          \"session_key\": {\n                            \"type\": \"string\",\n                            \"description\": \"The Video SDK custom session ID.\"\n                          },\n                          \"user\": {\n                            \"type\": \"object\",\n                            \"description\": \"Information about the user.\",\n                            \"required\": [\"id\", \"name\", \"join_time\", \"participant_uuid\"],\n                            \"properties\": {\n                              \"id\": {\n                                \"type\": \"string\",\n                                \"description\": \"The user's unique ID. This value is assigned to the user upon joining a session and is only valid for that session.\"\n                              },\n                              \"name\": {\n                                \"type\": \"string\",\n                                \"description\": \"The user's username.\"\n                              },\n                              \"join_time\": {\n                                \"type\": \"string\",\n                                \"description\": \"The time at which the user joined the session.\",\n                                \"format\": \"date-time\"\n                              },\n                              \"user_key\": {\n                                \"type\": \"string\",\n                                \"description\": \"Another identifier for the user. Can be a number or characters.\"\n                              },\n                              \"phone_number\": {\n                                \"type\": \"string\",\n                                \"description\": \"Phone number of participant joined via PSTN.\"\n                              },\n                              \"participant_uuid\": {\n                                \"type\": \"string\",\n                                \"description\": \"The participant's UUID. This value is assigned to a participant upon joining a session and is only valid for the session's duration.\"\n                              }\n                            },\n                            \"additionalProperties\": false\n                          }\n                        },\n                        \"additionalProperties\": false\n                      }\n                    },\n                    \"additionalProperties\": false\n                  }\n                },\n                \"additionalProperties\": false\n              },\n              \"examples\": {\n                \"json-example\": {\n                  \"summary\": \"JSON example\",\n                  \"value\": \"{\\n  \\\"event\\\": \\\"session.user_joined\\\",\\n  \\\"event_ts\\\": 1626473951859,\\n  \\\"payload\\\": {\\n    \\\"account_id\\\": \\\"EFgHiJABC000DEfGHI\\\",\\n    \\\"object\\\": {\\n      \\\"id\\\": \\\"4567UVWxYZABCdEfGhiJkl==\\\",\\n      \\\"session_id\\\": \\\"4567UVWxYZABCdEfGhiJkl==\\\",\\n      \\\"session_name\\\": \\\"My Session\\\",\\n      \\\"session_key\\\": \\\"ABC36jaBI145\\\",\\n      \\\"user\\\": {\\n        \\\"id\\\": \\\"25508864\\\",\\n        \\\"name\\\": \\\"example\\\",\\n        \\\"join_time\\\": \\\"2021-07-16T17:19:11Z\\\",\\n        \\\"user_key\\\": \\\"ASD74dfDI854\\\",\\n        \\\"phone_number\\\": \\\"8615250064084\\\",\\n        \\\"participant_uuid\\\": \\\"55555AAAiAAAAAiAiAiiAii\\\"\\n      }\\n    }\\n  }\\n}\"\n                }\n              }\n            }\n          }\n        },\n        \"responses\": {\n          \"200\": {\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"type\": \"object\",\n                  \"required\": [\"event\", \"event_ts\", \"payload\"],\n                  \"properties\": {\n                    \"event\": {\n                      \"type\": \"string\",\n                      \"enum\": [\"session.user_joined\"],\n                      \"description\": \"The event's name.\"\n                    },\n                    \"event_ts\": {\n                      \"type\": \"integer\",\n                      \"format\": \"int64\",\n                      \"description\": \"A timestamp, in milliseconds since epoch, at which the event occurred.\"\n                    },\n                    \"payload\": {\n                      \"type\": \"object\",\n                      \"required\": [\"account_id\", \"object\"],\n                      \"properties\": {\n                        \"account_id\": {\n                          \"type\": \"string\",\n                          \"description\": \"The Video SDK account ID.\"\n                        },\n                        \"object\": {\n                          \"type\": \"object\",\n                          \"description\": \"Information about the session. This object only returns updated properties.\",\n                          \"required\": [\"id\", \"session_id\", \"session_name\", \"user\"],\n                          \"properties\": {\n                            \"id\": {\n                              \"type\": \"string\",\n                              \"description\": \"The session ID.\"\n                            },\n                            \"session_id\": {\n                              \"type\": \"string\",\n                              \"description\": \"Unique session identifier. Each instance of the session will have its own session_id.\"\n                            },\n                            \"session_name\": {\n                              \"type\": \"string\",\n                              \"description\": \"Session name.\"\n                            },\n                            \"session_key\": {\n                              \"type\": \"string\",\n                              \"description\": \"The Video SDK custom session ID.\"\n                            },\n                            \"user\": {\n                              \"type\": \"object\",\n                              \"description\": \"Information about the user.\",\n                              \"required\": [\"id\", \"name\", \"join_time\", \"participant_uuid\"],\n                              \"properties\": {\n                                \"id\": {\n                                  \"type\": \"string\",\n                                  \"description\": \"The user's unique ID. This value is assigned to the user upon joining a session and is only valid for that session.\"\n                                },\n                                \"name\": {\n                                  \"type\": \"string\",\n                                  \"description\": \"The user's username.\"\n                                },\n                                \"join_time\": {\n                                  \"type\": \"string\",\n                                  \"description\": \"The time at which the user joined the session.\",\n                                  \"format\": \"date-time\"\n                                },\n                                \"user_key\": {\n                                  \"type\": \"string\",\n                                  \"description\": \"Another identifier for the user. Can be a number or characters.\"\n                                },\n                                \"phone_number\": {\n                                  \"type\": \"string\",\n                                  \"description\": \"Phone number of participant joined via PSTN.\"\n                                },\n                                \"participant_uuid\": {\n                                  \"type\": \"string\",\n                                  \"description\": \"The participant's UUID. This value is assigned to a participant upon joining a session and is only valid for the session's duration.\"\n                                }\n                              },\n                              \"additionalProperties\": false\n                            }\n                          },\n                          \"additionalProperties\": false\n                        }\n                      },\n                      \"additionalProperties\": false\n                    }\n                  },\n                  \"additionalProperties\": false\n                },\n                \"examples\": {\n                  \"json-example\": {\n                    \"summary\": \"JSON example\",\n                    \"value\": \"{\\n  \\\"event\\\": \\\"session.user_joined\\\",\\n  \\\"event_ts\\\": 1626473951859,\\n  \\\"payload\\\": {\\n    \\\"account_id\\\": \\\"EFgHiJABC000DEfGHI\\\",\\n    \\\"object\\\": {\\n      \\\"id\\\": \\\"4567UVWxYZABCdEfGhiJkl==\\\",\\n      \\\"session_id\\\": \\\"4567UVWxYZABCdEfGhiJkl==\\\",\\n      \\\"session_name\\\": \\\"My Session\\\",\\n      \\\"session_key\\\": \\\"ABC36jaBI145\\\",\\n      \\\"user\\\": {\\n        \\\"id\\\": \\\"25508864\\\",\\n        \\\"name\\\": \\\"example\\\",\\n        \\\"join_time\\\": \\\"2021-07-16T17:19:11Z\\\",\\n        \\\"user_key\\\": \\\"ASD74dfDI854\\\",\\n        \\\"phone_number\\\": \\\"8615250064084\\\",\\n        \\\"participant_uuid\\\": \\\"55555AAAiAAAAAiAiAiiAii\\\"\\n      }\\n    }\\n  }\\n}\"\n                  }\n                }\n              }\n            }\n          }\n        }\n      }\n    },\n    \"session.stream_ingestion_started\": {\n      \"post\": {\n        \"tags\": [\"session\"],\n        \"operationId\": \"session.stream_ingestion_started\",\n        \"requestBody\": {\n          \"description\": \"# session.stream_ingestion_started\\nZoom triggers the **Session stream ingestion started** event every time a host starts sending an incoming live stream to a session. The session user can subscribe to it to see what's being streamed live into this session.\\n\\n## Prerequisites\\n\\n* **Event Subscriptions** must be enabled for your app with the following configurations:\\n  * A valid **Event Notification Endpoint URL**.\\n  * The **Session stream ingestion started** subscription enabled under the **Video SDK** event.\\n\\n\\n**Event type**: `session.stream_ingestion_started`\\n\",\n          \"content\": {\n            \"application/json\": {\n              \"schema\": {\n                \"type\": \"object\",\n                \"required\": [\"event\", \"event_ts\", \"payload\"],\n                \"properties\": {\n                  \"event\": {\n                    \"type\": \"string\",\n                    \"enum\": [\"session.stream_ingestion_started\"],\n                    \"description\": \"Event name.\"\n                  },\n                  \"event_ts\": {\n                    \"type\": \"integer\",\n                    \"format\": \"int64\",\n                    \"description\": \"Timestamp (in milliseconds since epoch) when the event occurred. The value of this field is returned in long (int64) format.\"\n                  },\n                  \"payload\": {\n                    \"type\": \"object\",\n                    \"required\": [\"account_id\", \"object\"],\n                    \"properties\": {\n                      \"account_id\": {\n                        \"type\": \"string\",\n                        \"description\": \"The Video SDK account ID.\"\n                      },\n                      \"object\": {\n                        \"type\": \"object\",\n                        \"description\": \"Information about the session.\",\n                        \"required\": [\"session_id\", \"session_name\", \"stream_ingestion\"],\n                        \"properties\": {\n                          \"session_id\": {\n                            \"type\": \"string\",\n                            \"description\": \"Unique session identifier. Each instance of the session will have its own session_id.\"\n                          },\n                          \"session_name\": {\n                            \"type\": \"string\",\n                            \"description\": \"Session name.\"\n                          },\n                          \"session_key\": {\n                            \"type\": \"string\",\n                            \"description\": \"The Video SDK custom session ID.\"\n                          },\n                          \"stream_ingestion\": {\n                            \"type\": \"object\",\n                            \"description\": \"Information about the stream ingestion.\",\n                            \"required\": [\n                              \"stream_id\",\n                              \"stream_name\",\n                              \"stream_key\",\n                              \"stream_url\",\n                              \"backup_stream_url\"\n                            ],\n                            \"properties\": {\n                              \"stream_id\": {\n                                \"type\": \"string\",\n                                \"description\": \"The stream ingestion ID.\"\n                              },\n                              \"stream_name\": {\n                                \"type\": \"string\",\n                                \"description\": \"The stream ingestion name.\"\n                              },\n                              \"stream_description\": {\n                                \"type\": \"string\",\n                                \"description\": \"The stream ingestion description.\"\n                              },\n                              \"stream_key\": {\n                                \"type\": \"string\",\n                                \"description\": \"The stream ingestion key.\"\n                              },\n                              \"stream_url\": {\n                                \"type\": \"string\",\n                                \"description\": \"The stream URL.\"\n                              },\n                              \"backup_stream_url\": {\n                                \"type\": \"string\",\n                                \"description\": \"The backup stream URL.\"\n                              }\n                            }\n                          }\n                        },\n                        \"additionalProperties\": false\n                      }\n                    },\n                    \"additionalProperties\": false\n                  }\n                },\n                \"additionalProperties\": false\n              },\n              \"examples\": {\n                \"json-example\": {\n                  \"summary\": \"JSON example\",\n                  \"value\": \"{\\n  \\\"event\\\": \\\"session.stream_ingestion_started\\\",\\n  \\\"event_ts\\\": 1627906965803,\\n  \\\"payload\\\": {\\n    \\\"account_id\\\": \\\"D8cJuqWVQ623CI4Q8yQK0Q\\\",\\n    \\\"object\\\": {\\n      \\\"session_id\\\": \\\"4567UVWxYZABCdEfGhiJkl==\\\",\\n      \\\"session_name\\\": \\\"My Session\\\",\\n      \\\"session_key\\\": \\\"ABC36jaBI145\\\",\\n      \\\"stream_ingestion\\\": {\\n        \\\"stream_id\\\": \\\"sfk/aOFJSJSYhGwk1hnxgw==\\\",\\n        \\\"stream_name\\\": \\\"stream ingestion1\\\",\\n        \\\"stream_description\\\": \\\"stream ingestion1\\\",\\n        \\\"stream_key\\\": \\\"ABCDEFG12345HIJ6789\\\",\\n        \\\"stream_url\\\": \\\"rtmp://a.rtmp.zoomevent.com/live1\\\",\\n        \\\"backup_stream_url\\\": \\\"rtmp://a.rtmp.zoomevent.com/live1\\\"\\n      }\\n    }\\n  }\\n}\"\n                }\n              }\n            }\n          }\n        },\n        \"responses\": {\n          \"200\": {\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"type\": \"object\",\n                  \"required\": [\"event\", \"event_ts\", \"payload\"],\n                  \"properties\": {\n                    \"event\": {\n                      \"type\": \"string\",\n                      \"enum\": [\"session.stream_ingestion_started\"],\n                      \"description\": \"Event name.\"\n                    },\n                    \"event_ts\": {\n                      \"type\": \"integer\",\n                      \"format\": \"int64\",\n                      \"description\": \"Timestamp (in milliseconds since epoch) when the event occurred. The value of this field is returned in long (int64) format.\"\n                    },\n                    \"payload\": {\n                      \"type\": \"object\",\n                      \"required\": [\"account_id\", \"object\"],\n                      \"properties\": {\n                        \"account_id\": {\n                          \"type\": \"string\",\n                          \"description\": \"The Video SDK account ID.\"\n                        },\n                        \"object\": {\n                          \"type\": \"object\",\n                          \"description\": \"Information about the session.\",\n                          \"required\": [\"session_id\", \"session_name\", \"stream_ingestion\"],\n                          \"properties\": {\n                            \"session_id\": {\n                              \"type\": \"string\",\n                              \"description\": \"Unique session identifier. Each instance of the session will have its own session_id.\"\n                            },\n                            \"session_name\": {\n                              \"type\": \"string\",\n                              \"description\": \"Session name.\"\n                            },\n                            \"session_key\": {\n                              \"type\": \"string\",\n                              \"description\": \"The Video SDK custom session ID.\"\n                            },\n                            \"stream_ingestion\": {\n                              \"type\": \"object\",\n                              \"description\": \"Information about the stream ingestion.\",\n                              \"required\": [\n                                \"stream_id\",\n                                \"stream_name\",\n                                \"stream_key\",\n                                \"stream_url\",\n                                \"backup_stream_url\"\n                              ],\n                              \"properties\": {\n                                \"stream_id\": {\n                                  \"type\": \"string\",\n                                  \"description\": \"The stream ingestion ID.\"\n                                },\n                                \"stream_name\": {\n                                  \"type\": \"string\",\n                                  \"description\": \"The stream ingestion name.\"\n                                },\n                                \"stream_description\": {\n                                  \"type\": \"string\",\n                                  \"description\": \"The stream ingestion description.\"\n                                },\n                                \"stream_key\": {\n                                  \"type\": \"string\",\n                                  \"description\": \"The stream ingestion key.\"\n                                },\n                                \"stream_url\": {\n                                  \"type\": \"string\",\n                                  \"description\": \"The stream URL.\"\n                                },\n                                \"backup_stream_url\": {\n                                  \"type\": \"string\",\n                                  \"description\": \"The backup stream URL.\"\n                                }\n                              }\n                            }\n                          },\n                          \"additionalProperties\": false\n                        }\n                      },\n                      \"additionalProperties\": false\n                    }\n                  },\n                  \"additionalProperties\": false\n                },\n                \"examples\": {\n                  \"json-example\": {\n                    \"summary\": \"JSON example\",\n                    \"value\": \"{\\n  \\\"event\\\": \\\"session.stream_ingestion_started\\\",\\n  \\\"event_ts\\\": 1627906965803,\\n  \\\"payload\\\": {\\n    \\\"account_id\\\": \\\"D8cJuqWVQ623CI4Q8yQK0Q\\\",\\n    \\\"object\\\": {\\n      \\\"session_id\\\": \\\"4567UVWxYZABCdEfGhiJkl==\\\",\\n      \\\"session_name\\\": \\\"My Session\\\",\\n      \\\"session_key\\\": \\\"ABC36jaBI145\\\",\\n      \\\"stream_ingestion\\\": {\\n        \\\"stream_id\\\": \\\"sfk/aOFJSJSYhGwk1hnxgw==\\\",\\n        \\\"stream_name\\\": \\\"stream ingestion1\\\",\\n        \\\"stream_description\\\": \\\"stream ingestion1\\\",\\n        \\\"stream_key\\\": \\\"ABCDEFG12345HIJ6789\\\",\\n        \\\"stream_url\\\": \\\"rtmp://a.rtmp.zoomevent.com/live1\\\",\\n        \\\"backup_stream_url\\\": \\\"rtmp://a.rtmp.zoomevent.com/live1\\\"\\n      }\\n    }\\n  }\\n}\"\n                  }\n                }\n              }\n            }\n          }\n        }\n      }\n    },\n    \"session.stream_ingestion_connected\": {\n      \"post\": {\n        \"tags\": [\"session\"],\n        \"operationId\": \"session.stream_ingestion_connected\",\n        \"requestBody\": {\n          \"description\": \"# session.stream_ingestion_connected\\nZoom triggers the **Session stream ingestion connected** event every time live streaming software connects to the Zoom Video SDK session. This indicates that the Zoom streaming platform is receiving data from the streaming software, but the received Real-Time Messaging Protocol (RTMP) data is not sent to the session yet.\\n\\n## Prerequisites\\n\\n* **Event Subscriptions** must be enabled for your app with the following configurations:\\n  * A valid **Event Notification Endpoint URL**.\\n  * The **Session stream ingestion connected** subscription enabled under the **Video SDK** event.\\n\\n\\n**Event type**: `session.stream_ingestion_connected`\\n\",\n          \"content\": {\n            \"application/json\": {\n              \"schema\": {\n                \"type\": \"object\",\n                \"required\": [\"event\", \"event_ts\", \"payload\"],\n                \"properties\": {\n                  \"event\": {\n                    \"type\": \"string\",\n                    \"enum\": [\"session.stream_ingestion_connected\"],\n                    \"description\": \"Name of the event.\"\n                  },\n                  \"event_ts\": {\n                    \"type\": \"integer\",\n                    \"format\": \"int64\",\n                    \"description\": \"Timestamp (in milliseconds since epoch) when the event occurred. The value of this field is returned in long (int64) format.\"\n                  },\n                  \"payload\": {\n                    \"type\": \"object\",\n                    \"required\": [\"account_id\", \"object\"],\n                    \"properties\": {\n                      \"account_id\": {\n                        \"type\": \"string\",\n                        \"description\": \"The Video SDK account ID.\"\n                      },\n                      \"object\": {\n                        \"type\": \"object\",\n                        \"description\": \"Information about the session.\",\n                        \"required\": [\"session_id\", \"session_name\", \"stream_ingestion\"],\n                        \"properties\": {\n                          \"session_id\": {\n                            \"type\": \"string\",\n                            \"description\": \"Unique session identifier. Each instance of the session will have its own session_id.\"\n                          },\n                          \"session_name\": {\n                            \"type\": \"string\",\n                            \"description\": \"Session name.\"\n                          },\n                          \"session_key\": {\n                            \"type\": \"string\",\n                            \"description\": \"The Video SDK custom session ID.\"\n                          },\n                          \"stream_ingestion\": {\n                            \"type\": \"object\",\n                            \"description\": \"Information about the stream ingestion.\",\n                            \"required\": [\n                              \"stream_id\",\n                              \"stream_name\",\n                              \"stream_key\",\n                              \"stream_url\",\n                              \"backup_stream_url\"\n                            ],\n                            \"properties\": {\n                              \"stream_id\": {\n                                \"type\": \"string\",\n                                \"description\": \"The stream ingestion ID.\"\n                              },\n                              \"stream_name\": {\n                                \"type\": \"string\",\n                                \"description\": \"The stream ingestion name.\"\n                              },\n                              \"stream_description\": {\n                                \"type\": \"string\",\n                                \"description\": \"The stream ingestion description.\"\n                              },\n                              \"stream_key\": {\n                                \"type\": \"string\",\n                                \"description\": \"The stream ingestion key.\"\n                              },\n                              \"stream_url\": {\n                                \"type\": \"string\",\n                                \"description\": \"The stream URL.\"\n                              },\n                              \"backup_stream_url\": {\n                                \"type\": \"string\",\n                                \"description\": \"The backup stream URL.\"\n                              }\n                            }\n                          }\n                        },\n                        \"additionalProperties\": false\n                      }\n                    },\n                    \"additionalProperties\": false\n                  }\n                },\n                \"additionalProperties\": false\n              },\n              \"examples\": {\n                \"json-example\": {\n                  \"summary\": \"JSON example\",\n                  \"value\": \"{\\n  \\\"event\\\": \\\"session.stream_ingestion_connected\\\",\\n  \\\"event_ts\\\": 1627906965803,\\n  \\\"payload\\\": {\\n    \\\"account_id\\\": \\\"D8cJuqWVQ623CI4Q8yQK0Q\\\",\\n    \\\"object\\\": {\\n      \\\"session_id\\\": \\\"4567UVWxYZABCdEfGhiJkl==\\\",\\n      \\\"session_name\\\": \\\"My Session\\\",\\n      \\\"session_key\\\": \\\"ABC36jaBI145\\\",\\n      \\\"stream_ingestion\\\": {\\n        \\\"stream_id\\\": \\\"sfk/aOFJSJSYhGwk1hnxgw==\\\",\\n        \\\"stream_name\\\": \\\"stream ingestion1\\\",\\n        \\\"stream_description\\\": \\\"stream ingestion1\\\",\\n        \\\"stream_key\\\": \\\"ABCDEFG12345HIJ6789\\\",\\n        \\\"stream_url\\\": \\\"rtmp://a.rtmp.zoomevent.com/live1\\\",\\n        \\\"backup_stream_url\\\": \\\"rtmp://a.rtmp.zoomevent.com/live1\\\"\\n      }\\n    }\\n  }\\n}\"\n                }\n              }\n            }\n          }\n        },\n        \"responses\": {\n          \"200\": {\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"type\": \"object\",\n                  \"required\": [\"event\", \"event_ts\", \"payload\"],\n                  \"properties\": {\n                    \"event\": {\n                      \"type\": \"string\",\n                      \"enum\": [\"session.stream_ingestion_connected\"],\n                      \"description\": \"Name of the event.\"\n                    },\n                    \"event_ts\": {\n                      \"type\": \"integer\",\n                      \"format\": \"int64\",\n                      \"description\": \"Timestamp (in milliseconds since epoch) when the event occurred. The value of this field is returned in long (int64) format.\"\n                    },\n                    \"payload\": {\n                      \"type\": \"object\",\n                      \"required\": [\"account_id\", \"object\"],\n                      \"properties\": {\n                        \"account_id\": {\n                          \"type\": \"string\",\n                          \"description\": \"The Video SDK account ID.\"\n                        },\n                        \"object\": {\n                          \"type\": \"object\",\n                          \"description\": \"Information about the session.\",\n                          \"required\": [\"session_id\", \"session_name\", \"stream_ingestion\"],\n                          \"properties\": {\n                            \"session_id\": {\n                              \"type\": \"string\",\n                              \"description\": \"Unique session identifier. Each instance of the session will have its own session_id.\"\n                            },\n                            \"session_name\": {\n                              \"type\": \"string\",\n                              \"description\": \"Session name.\"\n                            },\n                            \"session_key\": {\n                              \"type\": \"string\",\n                              \"description\": \"The Video SDK custom session ID.\"\n                            },\n                            \"stream_ingestion\": {\n                              \"type\": \"object\",\n                              \"description\": \"Information about the stream ingestion.\",\n                              \"required\": [\n                                \"stream_id\",\n                                \"stream_name\",\n                                \"stream_key\",\n                                \"stream_url\",\n                                \"backup_stream_url\"\n                              ],\n                              \"properties\": {\n                                \"stream_id\": {\n                                  \"type\": \"string\",\n                                  \"description\": \"The stream ingestion ID.\"\n                                },\n                                \"stream_name\": {\n                                  \"type\": \"string\",\n                                  \"description\": \"The stream ingestion name.\"\n                                },\n                                \"stream_description\": {\n                                  \"type\": \"string\",\n                                  \"description\": \"The stream ingestion description.\"\n                                },\n                                \"stream_key\": {\n                                  \"type\": \"string\",\n                                  \"description\": \"The stream ingestion key.\"\n                                },\n                                \"stream_url\": {\n                                  \"type\": \"string\",\n                                  \"description\": \"The stream URL.\"\n                                },\n                                \"backup_stream_url\": {\n                                  \"type\": \"string\",\n                                  \"description\": \"The backup stream URL.\"\n                                }\n                              }\n                            }\n                          },\n                          \"additionalProperties\": false\n                        }\n                      },\n                      \"additionalProperties\": false\n                    }\n                  },\n                  \"additionalProperties\": false\n                },\n                \"examples\": {\n                  \"json-example\": {\n                    \"summary\": \"JSON example\",\n                    \"value\": \"{\\n  \\\"event\\\": \\\"session.stream_ingestion_connected\\\",\\n  \\\"event_ts\\\": 1627906965803,\\n  \\\"payload\\\": {\\n    \\\"account_id\\\": \\\"D8cJuqWVQ623CI4Q8yQK0Q\\\",\\n    \\\"object\\\": {\\n      \\\"session_id\\\": \\\"4567UVWxYZABCdEfGhiJkl==\\\",\\n      \\\"session_name\\\": \\\"My Session\\\",\\n      \\\"session_key\\\": \\\"ABC36jaBI145\\\",\\n      \\\"stream_ingestion\\\": {\\n        \\\"stream_id\\\": \\\"sfk/aOFJSJSYhGwk1hnxgw==\\\",\\n        \\\"stream_name\\\": \\\"stream ingestion1\\\",\\n        \\\"stream_description\\\": \\\"stream ingestion1\\\",\\n        \\\"stream_key\\\": \\\"ABCDEFG12345HIJ6789\\\",\\n        \\\"stream_url\\\": \\\"rtmp://a.rtmp.zoomevent.com/live1\\\",\\n        \\\"backup_stream_url\\\": \\\"rtmp://a.rtmp.zoomevent.com/live1\\\"\\n      }\\n    }\\n  }\\n}\"\n                  }\n                }\n              }\n            }\n          }\n        }\n      }\n    },\n    \"session.stream_ingestion_disconnected\": {\n      \"post\": {\n        \"tags\": [\"session\"],\n        \"operationId\": \"session.stream_ingestion_disconnected\",\n        \"requestBody\": {\n          \"description\": \"# session.stream_ingestion_disconnected\\nZoom triggers the **Session stream ingestion disconnected** event every time a Real-Time Messaging Protocol (RTMP) software program disconnects.\\n\\n## Prerequisites\\n\\n* **Event Subscriptions** must be enabled for your app with the following configurations:\\n  * A valid **Event Notification Endpoint URL**.\\n  * The **Session stream ingestion disconnected** subscription enabled under the **Video SDK** event.\\n\\n\\n**Event type**: `session.stream_ingestion_disconnected`\\n\",\n          \"content\": {\n            \"application/json\": {\n              \"schema\": {\n                \"type\": \"object\",\n                \"required\": [\"event\", \"event_ts\", \"payload\"],\n                \"properties\": {\n                  \"event\": {\n                    \"type\": \"string\",\n                    \"enum\": [\"session.stream_ingestion_disconnected\"],\n                    \"description\": \"Name of the event.\"\n                  },\n                  \"event_ts\": {\n                    \"type\": \"integer\",\n                    \"format\": \"int64\",\n                    \"description\": \"Timestamp (in milliseconds since epoch) when the event occurred. The value of this field is returned in long (int64) format.\"\n                  },\n                  \"payload\": {\n                    \"type\": \"object\",\n                    \"required\": [\"account_id\", \"object\"],\n                    \"properties\": {\n                      \"account_id\": {\n                        \"type\": \"string\",\n                        \"description\": \"The Video SDK account ID.\"\n                      },\n                      \"object\": {\n                        \"type\": \"object\",\n                        \"description\": \"Information about the session.\",\n                        \"required\": [\"session_id\", \"session_name\", \"stream_ingestion\"],\n                        \"properties\": {\n                          \"session_id\": {\n                            \"type\": \"string\",\n                            \"description\": \"Unique session identifier. Each instance of the session will have its own session_id.\"\n                          },\n                          \"session_name\": {\n                            \"type\": \"string\",\n                            \"description\": \"Session name.\"\n                          },\n                          \"session_key\": {\n                            \"type\": \"string\",\n                            \"description\": \"The Video SDK custom session ID.\"\n                          },\n                          \"stream_ingestion\": {\n                            \"type\": \"object\",\n                            \"description\": \"Information about the stream ingestion.\",\n                            \"required\": [\n                              \"stream_id\",\n                              \"stream_name\",\n                              \"stream_key\",\n                              \"stream_url\",\n                              \"backup_stream_url\"\n                            ],\n                            \"properties\": {\n                              \"stream_id\": {\n                                \"type\": \"string\",\n                                \"description\": \"The stream ingestion ID.\"\n                              },\n                              \"stream_name\": {\n                                \"type\": \"string\",\n                                \"description\": \"The stream ingestion name.\"\n                              },\n                              \"stream_description\": {\n                                \"type\": \"string\",\n                                \"description\": \"The stream ingestion description.\"\n                              },\n                              \"stream_key\": {\n                                \"type\": \"string\",\n                                \"description\": \"The stream ingestion key.\"\n                              },\n                              \"stream_url\": {\n                                \"type\": \"string\",\n                                \"description\": \"The stream URL.\"\n                              },\n                              \"backup_stream_url\": {\n                                \"type\": \"string\",\n                                \"description\": \"The backup stream URL.\"\n                              }\n                            }\n                          }\n                        },\n                        \"additionalProperties\": false\n                      }\n                    },\n                    \"additionalProperties\": false\n                  }\n                },\n                \"additionalProperties\": false\n              },\n              \"examples\": {\n                \"json-example\": {\n                  \"summary\": \"JSON example\",\n                  \"value\": \"{\\n  \\\"event\\\": \\\"session.stream_ingestion_disconnected\\\",\\n  \\\"event_ts\\\": 1627906965803,\\n  \\\"payload\\\": {\\n    \\\"account_id\\\": \\\"D8cJuqWVQ623CI4Q8yQK0Q\\\",\\n    \\\"object\\\": {\\n      \\\"session_id\\\": \\\"4567UVWxYZABCdEfGhiJkl==\\\",\\n      \\\"session_name\\\": \\\"My Session\\\",\\n      \\\"session_key\\\": \\\"ABC36jaBI145\\\",\\n      \\\"stream_ingestion\\\": {\\n        \\\"stream_id\\\": \\\"sfk/aOFJSJSYhGwk1hnxgw==\\\",\\n        \\\"stream_name\\\": \\\"stream ingestion1\\\",\\n        \\\"stream_description\\\": \\\"stream ingestion1\\\",\\n        \\\"stream_key\\\": \\\"ABCDEFG12345HIJ6789\\\",\\n        \\\"stream_url\\\": \\\"rtmp://a.rtmp.zoomevent.com/live1\\\",\\n        \\\"backup_stream_url\\\": \\\"rtmp://a.rtmp.zoomevent.com/live1\\\"\\n      }\\n    }\\n  }\\n}\"\n                }\n              }\n            }\n          }\n        },\n        \"responses\": {\n          \"200\": {\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"type\": \"object\",\n                  \"required\": [\"event\", \"event_ts\", \"payload\"],\n                  \"properties\": {\n                    \"event\": {\n                      \"type\": \"string\",\n                      \"enum\": [\"session.stream_ingestion_disconnected\"],\n                      \"description\": \"Name of the event.\"\n                    },\n                    \"event_ts\": {\n                      \"type\": \"integer\",\n                      \"format\": \"int64\",\n                      \"description\": \"Timestamp (in milliseconds since epoch) when the event occurred. The value of this field is returned in long (int64) format.\"\n                    },\n                    \"payload\": {\n                      \"type\": \"object\",\n                      \"required\": [\"account_id\", \"object\"],\n                      \"properties\": {\n                        \"account_id\": {\n                          \"type\": \"string\",\n                          \"description\": \"The Video SDK account ID.\"\n                        },\n                        \"object\": {\n                          \"type\": \"object\",\n                          \"description\": \"Information about the session.\",\n                          \"required\": [\"session_id\", \"session_name\", \"stream_ingestion\"],\n                          \"properties\": {\n                            \"session_id\": {\n                              \"type\": \"string\",\n                              \"description\": \"Unique session identifier. Each instance of the session will have its own session_id.\"\n                            },\n                            \"session_name\": {\n                              \"type\": \"string\",\n                              \"description\": \"Session name.\"\n                            },\n                            \"session_key\": {\n                              \"type\": \"string\",\n                              \"description\": \"The Video SDK custom session ID.\"\n                            },\n                            \"stream_ingestion\": {\n                              \"type\": \"object\",\n                              \"description\": \"Information about the stream ingestion.\",\n                              \"required\": [\n                                \"stream_id\",\n                                \"stream_name\",\n                                \"stream_key\",\n                                \"stream_url\",\n                                \"backup_stream_url\"\n                              ],\n                              \"properties\": {\n                                \"stream_id\": {\n                                  \"type\": \"string\",\n                                  \"description\": \"The stream ingestion ID.\"\n                                },\n                                \"stream_name\": {\n                                  \"type\": \"string\",\n                                  \"description\": \"The stream ingestion name.\"\n                                },\n                                \"stream_description\": {\n                                  \"type\": \"string\",\n                                  \"description\": \"The stream ingestion description.\"\n                                },\n                                \"stream_key\": {\n                                  \"type\": \"string\",\n                                  \"description\": \"The stream ingestion key.\"\n                                },\n                                \"stream_url\": {\n                                  \"type\": \"string\",\n                                  \"description\": \"The stream URL.\"\n                                },\n                                \"backup_stream_url\": {\n                                  \"type\": \"string\",\n                                  \"description\": \"The backup stream URL.\"\n                                }\n                              }\n                            }\n                          },\n                          \"additionalProperties\": false\n                        }\n                      },\n                      \"additionalProperties\": false\n                    }\n                  },\n                  \"additionalProperties\": false\n                },\n                \"examples\": {\n                  \"json-example\": {\n                    \"summary\": \"JSON example\",\n                    \"value\": \"{\\n  \\\"event\\\": \\\"session.stream_ingestion_disconnected\\\",\\n  \\\"event_ts\\\": 1627906965803,\\n  \\\"payload\\\": {\\n    \\\"account_id\\\": \\\"D8cJuqWVQ623CI4Q8yQK0Q\\\",\\n    \\\"object\\\": {\\n      \\\"session_id\\\": \\\"4567UVWxYZABCdEfGhiJkl==\\\",\\n      \\\"session_name\\\": \\\"My Session\\\",\\n      \\\"session_key\\\": \\\"ABC36jaBI145\\\",\\n      \\\"stream_ingestion\\\": {\\n        \\\"stream_id\\\": \\\"sfk/aOFJSJSYhGwk1hnxgw==\\\",\\n        \\\"stream_name\\\": \\\"stream ingestion1\\\",\\n        \\\"stream_description\\\": \\\"stream ingestion1\\\",\\n        \\\"stream_key\\\": \\\"ABCDEFG12345HIJ6789\\\",\\n        \\\"stream_url\\\": \\\"rtmp://a.rtmp.zoomevent.com/live1\\\",\\n        \\\"backup_stream_url\\\": \\\"rtmp://a.rtmp.zoomevent.com/live1\\\"\\n      }\\n    }\\n  }\\n}\"\n                  }\n                }\n              }\n            }\n          }\n        }\n      }\n    },\n    \"session.recording_recovered\": {\n      \"post\": {\n        \"tags\": [\"session\"],\n        \"operationId\": \"session.recording_recovered\",\n        \"requestBody\": {\n          \"description\": \"# session.recording_recovered\\n---\\n\\nEvent: `session.recording_recovered`\\n\\n## Event description\\n\\nThe **Session recording recovered** event is triggered every time one of your app users or account users recover a recording from the trash.\\n\\nZoom allows users to recover their cloud recordings from trash within 30 days of deletion. You can recover a deleted cloud recording with:\\n\\n* The tab in the Zoom web client. See [Video SDK recordings and reports](https://developers.zoom.us/docs/video-sdk/reports/) for details.\\n* The [Recover a single recording](https://developers.zoom.us/docs/api/rest/reference/video-sdk/methods/#operation/recordingStatusUpdateOne) or [Recover session's recordings](https://developers.zoom.us/docs/api/rest/reference/video-sdk/methods/#operation/recordingStatusUpdate) API.\\n\\n## Prerequisites\\n\\n* Cloud Recording must be enabled on the Video SDK account.\\n* Event Subscriptions must be enabled for your app with the following configurations:\\n\\t* A valid Event Notification Endpoint URL.\\n\\t* \\\"**Session recording recovered**\\\" subscription enabled under the **Recording** event.\\n\\nThe tabs below display the complete schema, payload with data types, and an example of the `session.recording_recovered` event notification:\\n\\n\\n\\n**Event type**: `session.recording_recovered`\\n\",\n          \"content\": {\n            \"application/json\": {\n              \"schema\": {\n                \"type\": \"object\",\n                \"required\": [\"event\", \"event_ts\", \"payload\"],\n                \"properties\": {\n                  \"event\": {\n                    \"type\": \"string\",\n                    \"enum\": [\"session.recording_recovered\"],\n                    \"description\": \"The event's name.\"\n                  },\n                  \"event_ts\": {\n                    \"type\": \"integer\",\n                    \"format\": \"int64\",\n                    \"description\": \"A timestamp, in milliseconds since epoch, at which the event occurred.\"\n                  },\n                  \"payload\": {\n                    \"type\": \"object\",\n                    \"required\": [\"account_id\", \"operator\", \"operator_id\", \"object\"],\n                    \"properties\": {\n                      \"account_id\": {\n                        \"type\": \"string\",\n                        \"description\": \"The Video SDK account ID.\"\n                      },\n                      \"operator\": {\n                        \"type\": \"string\",\n                        \"format\": \"email\",\n                        \"description\": \"The email address of the user who deleted the recording.\"\n                      },\n                      \"operator_id\": {\n                        \"type\": \"string\",\n                        \"description\": \"The user ID of the user who deleted the recording.\"\n                      },\n                      \"object\": {\n                        \"type\": \"object\",\n                        \"description\": \"Information about the session. This object only returns updated properties.\",\n                        \"required\": [\n                          \"session_id\",\n                          \"session_name\",\n                          \"session_key\",\n                          \"start_time\",\n                          \"timezone\"\n                        ],\n                        \"properties\": {\n                          \"session_id\": {\n                            \"type\": \"string\",\n                            \"description\": \"Unique session identifier. Each instance of the session will have its own session_id.\"\n                          },\n                          \"session_name\": {\n                            \"type\": \"string\",\n                            \"description\": \"Session name.\"\n                          },\n                          \"session_key\": {\n                            \"type\": \"string\",\n                            \"description\": \"The Video SDK custom session ID.\"\n                          },\n                          \"start_time\": {\n                            \"type\": \"string\",\n                            \"format\": \"date-time\",\n                            \"description\": \"The time at which the session started.\"\n                          },\n                          \"timezone\": {\n                            \"type\": \"string\",\n                            \"description\": \"The user's timezone.\"\n                          }\n                        },\n                        \"additionalProperties\": false\n                      }\n                    },\n                    \"additionalProperties\": false\n                  }\n                },\n                \"additionalProperties\": false\n              },\n              \"examples\": {\n                \"json-example\": {\n                  \"summary\": \"JSON example\",\n                  \"value\": \"{\\n  \\\"event\\\": \\\"session.recording_recovered\\\",\\n  \\\"event_ts\\\": 1626230691572,\\n  \\\"payload\\\": {\\n    \\\"account_id\\\": \\\"AAAAAABBBB\\\",\\n\\t\\\"operator\\\" : \\\"user@example.com\\\",\\n\\t\\\"operator_id\\\" : \\\"I7zp-pYbTl22Z29H796Ixg\\\",\\n    \\\"object\\\": {\\n      \\\"session_id\\\": 1234567890,\\n      \\\"session_name\\\": \\\"My Personal Recording\\\",\\n      \\\"session_key\\\": \\\"ABC36jaBI145\\\",\\n      \\\"start_time\\\": \\\"2021-07-13T21:44:51Z\\\",\\n      \\\"timezone\\\": \\\"America/Los_Angeles\\\"\\n    }\\n  }\\n}\"\n                }\n              }\n            }\n          }\n        },\n        \"responses\": {\n          \"200\": {\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"type\": \"object\",\n                  \"required\": [\"event\", \"event_ts\", \"payload\"],\n                  \"properties\": {\n                    \"event\": {\n                      \"type\": \"string\",\n                      \"enum\": [\"session.recording_recovered\"],\n                      \"description\": \"The event's name.\"\n                    },\n                    \"event_ts\": {\n                      \"type\": \"integer\",\n                      \"format\": \"int64\",\n                      \"description\": \"A timestamp, in milliseconds since epoch, at which the event occurred.\"\n                    },\n                    \"payload\": {\n                      \"type\": \"object\",\n                      \"required\": [\"account_id\", \"operator\", \"operator_id\", \"object\"],\n                      \"properties\": {\n                        \"account_id\": {\n                          \"type\": \"string\",\n                          \"description\": \"The Video SDK account ID.\"\n                        },\n                        \"operator\": {\n                          \"type\": \"string\",\n                          \"format\": \"email\",\n                          \"description\": \"The email address of the user who deleted the recording.\"\n                        },\n                        \"operator_id\": {\n                          \"type\": \"string\",\n                          \"description\": \"The user ID of the user who deleted the recording.\"\n                        },\n                        \"object\": {\n                          \"type\": \"object\",\n                          \"description\": \"Information about the session. This object only returns updated properties.\",\n                          \"required\": [\n                            \"session_id\",\n                            \"session_name\",\n                            \"session_key\",\n                            \"start_time\",\n                            \"timezone\"\n                          ],\n                          \"properties\": {\n                            \"session_id\": {\n                              \"type\": \"string\",\n                              \"description\": \"Unique session identifier. Each instance of the session will have its own session_id.\"\n                            },\n                            \"session_name\": {\n                              \"type\": \"string\",\n                              \"description\": \"Session name.\"\n                            },\n                            \"session_key\": {\n                              \"type\": \"string\",\n                              \"description\": \"The Video SDK custom session ID.\"\n                            },\n                            \"start_time\": {\n                              \"type\": \"string\",\n                              \"format\": \"date-time\",\n                              \"description\": \"The time at which the session started.\"\n                            },\n                            \"timezone\": {\n                              \"type\": \"string\",\n                              \"description\": \"The user's timezone.\"\n                            }\n                          },\n                          \"additionalProperties\": false\n                        }\n                      },\n                      \"additionalProperties\": false\n                    }\n                  },\n                  \"additionalProperties\": false\n                },\n                \"examples\": {\n                  \"json-example\": {\n                    \"summary\": \"JSON example\",\n                    \"value\": \"{\\n  \\\"event\\\": \\\"session.recording_recovered\\\",\\n  \\\"event_ts\\\": 1626230691572,\\n  \\\"payload\\\": {\\n    \\\"account_id\\\": \\\"AAAAAABBBB\\\",\\n\\t\\\"operator\\\" : \\\"user@example.com\\\",\\n\\t\\\"operator_id\\\" : \\\"I7zp-pYbTl22Z29H796Ixg\\\",\\n    \\\"object\\\": {\\n      \\\"session_id\\\": 1234567890,\\n      \\\"session_name\\\": \\\"My Personal Recording\\\",\\n      \\\"session_key\\\": \\\"ABC36jaBI145\\\",\\n      \\\"start_time\\\": \\\"2021-07-13T21:44:51Z\\\",\\n      \\\"timezone\\\": \\\"America/Los_Angeles\\\"\\n    }\\n  }\\n}\"\n                  }\n                }\n              }\n            }\n          }\n        }\n      }\n    },\n    \"session.user_phone_callout_missed\": {\n      \"post\": {\n        \"tags\": [\"session\"],\n        \"operationId\": \"session.user_phone_callout_missed\",\n        \"requestBody\": {\n          \"description\": \"# session.user_phone_callout_missed\\n\\nThe **Invited party missed a session invitation through phone (call out)** event is triggered every time an invitation to join a session through phone (call out) times out. Video SDK call out operates in a similar manner as [Zoom meeting call out](https://support.zoom.com/hc/article?id=zm_kb&sysparm_article=KB0062038).\\n\\n## Prerequisites\\n\\n* **Event Subscriptions** must be enabled for your app with the following configurations:\\n  * A valid **Event Notification Endpoint URL**.\\n  * The **Invited party missed a session invitation through phone (call out)** subscription enabled under the **Session** event.\\n\\n\\n\\n\\n**Event type**: `session.user_phone_callout_missed`\\n\",\n          \"content\": {\n            \"application/json\": {\n              \"schema\": {\n                \"type\": \"object\",\n                \"required\": [\"event\", \"event_ts\", \"payload\"],\n                \"properties\": {\n                  \"event\": {\n                    \"type\": \"string\",\n                    \"description\": \"The name of the event.\"\n                  },\n                  \"event_ts\": {\n                    \"type\": \"integer\",\n                    \"format\": \"int64\",\n                    \"description\": \"A timestamp at which the event occurred.\"\n                  },\n                  \"payload\": {\n                    \"type\": \"object\",\n                    \"required\": [\"account_id\", \"object\"],\n                    \"properties\": {\n                      \"account_id\": {\n                        \"type\": \"string\",\n                        \"description\": \"The account ID of the session host.\"\n                      },\n                      \"object\": {\n                        \"type\": \"object\",\n                        \"description\": \"Information about the session.\",\n                        \"required\": [\n                          \"session_id\",\n                          \"session_name\",\n                          \"session_key\",\n                          \"user_key\",\n                          \"host_id\",\n                          \"participant\"\n                        ],\n                        \"properties\": {\n                          \"id\": {\n                            \"type\": \"integer\",\n                            \"format\": \"int64\",\n                            \"description\": \"The session ID.\",\n                            \"deprecated\": true\n                          },\n                          \"uuid\": {\n                            \"type\": \"string\",\n                            \"description\": \"The session's universally unique identifier (UUID). Each session instance generates a session UUID.\",\n                            \"deprecated\": true\n                          },\n                          \"session_id\": {\n                            \"type\": \"string\",\n                            \"description\": \"Unique session identifier. Each instance of the session will have its own session_id.\"\n                          },\n                          \"session_name\": {\n                            \"type\": \"string\",\n                            \"description\": \"Session name.\"\n                          },\n                          \"session_key\": {\n                            \"type\": \"string\",\n                            \"description\": \"The Video SDK custom session ID.\"\n                          },\n                          \"user_key\": {\n                            \"type\": \"string\",\n                            \"description\": \"Another identifier for the inviter. Can be a number or characters.\"\n                          },\n                          \"host_id\": {\n                            \"type\": \"string\",\n                            \"description\": \"The user ID of the session host.\"\n                          },\n                          \"participant\": {\n                            \"type\": \"object\",\n                            \"description\": \"Information about the invited user.\",\n                            \"required\": [\"invitee_name\", \"phone_number\", \"from_number\"],\n                            \"properties\": {\n                              \"invitee_name\": {\n                                \"type\": \"string\",\n                                \"description\": \"The user's name to display in the session.\"\n                              },\n                              \"phone_number\": {\n                                \"type\": \"integer\",\n                                \"format\": \"int64\",\n                                \"description\": \"The user's phone number.\"\n                              },\n                              \"from_number\": {\n                                \"type\": \"integer\",\n                                \"format\": \"int64\",\n                                \"description\": \"The number used to call out to the invited user.\"\n                              }\n                            },\n                            \"additionalProperties\": false\n                          }\n                        },\n                        \"additionalProperties\": false\n                      }\n                    },\n                    \"additionalProperties\": false\n                  }\n                },\n                \"additionalProperties\": false\n              },\n              \"examples\": {\n                \"json-example\": {\n                  \"summary\": \"JSON example\",\n                  \"value\": \"{\\n  \\\"event\\\": \\\"session.user_phone_callout_missed\\\",\\n  \\\"event_ts\\\": 1626230691572,\\n  \\\"payload\\\": {\\n    \\\"account_id\\\": \\\"dzVA4QmMQfyISoRcpFO8CA\\\",\\n    \\\"object\\\": {\\n      \\\"id\\\": 713592696,\\n      \\\"uuid\\\": \\\"4444AAAiAAAAAiAiAiiAii==\\\",\\n      \\\"session_id\\\": \\\"4444AAAiAAAAAiAiAiiAii==\\\",\\n      \\\"session_name\\\": \\\"My Session\\\",\\n      \\\"session_key\\\": \\\"ABC36jaBI145\\\",\\n      \\\"user_key\\\": \\\"ASD74dfDI854\\\",\\n      \\\"host_id\\\": \\\"ICuPoX4ERtikRcKqkVxunQ\\\",\\n      \\\"participant\\\": {\\n        \\\"invitee_name\\\": \\\"Jill Chill\\\",\\n        \\\"phone_number\\\": 15555550100,\\n        \\\"from_number\\\": 13167900000\\n      }\\n    }\\n  }\\n}\"\n                }\n              }\n            }\n          }\n        },\n        \"responses\": {\n          \"200\": {\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"type\": \"object\",\n                  \"required\": [\"event\", \"event_ts\", \"payload\"],\n                  \"properties\": {\n                    \"event\": {\n                      \"type\": \"string\",\n                      \"description\": \"The name of the event.\"\n                    },\n                    \"event_ts\": {\n                      \"type\": \"integer\",\n                      \"format\": \"int64\",\n                      \"description\": \"A timestamp at which the event occurred.\"\n                    },\n                    \"payload\": {\n                      \"type\": \"object\",\n                      \"required\": [\"account_id\", \"object\"],\n                      \"properties\": {\n                        \"account_id\": {\n                          \"type\": \"string\",\n                          \"description\": \"The account ID of the session host.\"\n                        },\n                        \"object\": {\n                          \"type\": \"object\",\n                          \"description\": \"Information about the session.\",\n                          \"required\": [\n                            \"session_id\",\n                            \"session_name\",\n                            \"session_key\",\n                            \"user_key\",\n                            \"host_id\",\n                            \"participant\"\n                          ],\n                          \"properties\": {\n                            \"id\": {\n                              \"type\": \"integer\",\n                              \"format\": \"int64\",\n                              \"description\": \"The session ID.\",\n                              \"deprecated\": true\n                            },\n                            \"uuid\": {\n                              \"type\": \"string\",\n                              \"description\": \"The session's universally unique identifier (UUID). Each session instance generates a session UUID.\",\n                              \"deprecated\": true\n                            },\n                            \"session_id\": {\n                              \"type\": \"string\",\n                              \"description\": \"Unique session identifier. Each instance of the session will have its own session_id.\"\n                            },\n                            \"session_name\": {\n                              \"type\": \"string\",\n                              \"description\": \"Session name.\"\n                            },\n                            \"session_key\": {\n                              \"type\": \"string\",\n                              \"description\": \"The Video SDK custom session ID.\"\n                            },\n                            \"user_key\": {\n                              \"type\": \"string\",\n                              \"description\": \"Another identifier for the inviter. Can be a number or characters.\"\n                            },\n                            \"host_id\": {\n                              \"type\": \"string\",\n                              \"description\": \"The user ID of the session host.\"\n                            },\n                            \"participant\": {\n                              \"type\": \"object\",\n                              \"description\": \"Information about the invited user.\",\n                              \"required\": [\"invitee_name\", \"phone_number\", \"from_number\"],\n                              \"properties\": {\n                                \"invitee_name\": {\n                                  \"type\": \"string\",\n                                  \"description\": \"The user's name to display in the session.\"\n                                },\n                                \"phone_number\": {\n                                  \"type\": \"integer\",\n                                  \"format\": \"int64\",\n                                  \"description\": \"The user's phone number.\"\n                                },\n                                \"from_number\": {\n                                  \"type\": \"integer\",\n                                  \"format\": \"int64\",\n                                  \"description\": \"The number used to call out to the invited user.\"\n                                }\n                              },\n                              \"additionalProperties\": false\n                            }\n                          },\n                          \"additionalProperties\": false\n                        }\n                      },\n                      \"additionalProperties\": false\n                    }\n                  },\n                  \"additionalProperties\": false\n                },\n                \"examples\": {\n                  \"json-example\": {\n                    \"summary\": \"JSON example\",\n                    \"value\": \"{\\n  \\\"event\\\": \\\"session.user_phone_callout_missed\\\",\\n  \\\"event_ts\\\": 1626230691572,\\n  \\\"payload\\\": {\\n    \\\"account_id\\\": \\\"dzVA4QmMQfyISoRcpFO8CA\\\",\\n    \\\"object\\\": {\\n      \\\"id\\\": 713592696,\\n      \\\"uuid\\\": \\\"4444AAAiAAAAAiAiAiiAii==\\\",\\n      \\\"session_id\\\": \\\"4444AAAiAAAAAiAiAiiAii==\\\",\\n      \\\"session_name\\\": \\\"My Session\\\",\\n      \\\"session_key\\\": \\\"ABC36jaBI145\\\",\\n      \\\"user_key\\\": \\\"ASD74dfDI854\\\",\\n      \\\"host_id\\\": \\\"ICuPoX4ERtikRcKqkVxunQ\\\",\\n      \\\"participant\\\": {\\n        \\\"invitee_name\\\": \\\"Jill Chill\\\",\\n        \\\"phone_number\\\": 15555550100,\\n        \\\"from_number\\\": 13167900000\\n      }\\n    }\\n  }\\n}\"\n                  }\n                }\n              }\n            }\n          }\n        }\n      }\n    },\n    \"session.user_phone_callout_rejected\": {\n      \"post\": {\n        \"tags\": [\"session\"],\n        \"operationId\": \"session.user_phone_callout_rejected\",\n        \"requestBody\": {\n          \"description\": \"# session.user_phone_callout_rejected\\n\\nThe **Invited party rejected a session invitation through phone (call out)** event is triggered every time a user rejects an invitation to join a session through phone (call out). Video SDK call out operates in a similar manner as [Zoom meeting call out](https://support.zoom.com/hc/article?id=zm_kb&sysparm_article=KB0062038).\\n\\n## Prerequisites\\n\\n* **Event Subscriptions** must be enabled for your app with the following configurations:\\n  * A valid **Event Notification Endpoint URL**.\\n  * The **Invited party rejected a session invitation through phone (call out)** subscription enabled under the **Session** event.\\n\\n\\n\\n\\n**Event type**: `session.user_phone_callout_rejected`\\n\",\n          \"content\": {\n            \"application/json\": {\n              \"schema\": {\n                \"type\": \"object\",\n                \"required\": [\"event\", \"event_ts\", \"payload\"],\n                \"properties\": {\n                  \"event\": {\n                    \"type\": \"string\",\n                    \"description\": \"The name of the event.\"\n                  },\n                  \"event_ts\": {\n                    \"type\": \"integer\",\n                    \"format\": \"int64\",\n                    \"description\": \"A timestamp at which the event occurred.\"\n                  },\n                  \"payload\": {\n                    \"type\": \"object\",\n                    \"required\": [\"account_id\", \"object\"],\n                    \"properties\": {\n                      \"account_id\": {\n                        \"type\": \"string\",\n                        \"description\": \"The account ID of the session host.\"\n                      },\n                      \"object\": {\n                        \"type\": \"object\",\n                        \"description\": \"Information about the session.\",\n                        \"required\": [\n                          \"session_id\",\n                          \"session_name\",\n                          \"session_key\",\n                          \"user_key\",\n                          \"host_id\",\n                          \"participant\"\n                        ],\n                        \"properties\": {\n                          \"id\": {\n                            \"type\": \"integer\",\n                            \"format\": \"int64\",\n                            \"description\": \"The session ID.\",\n                            \"deprecated\": true\n                          },\n                          \"uuid\": {\n                            \"type\": \"string\",\n                            \"description\": \"The session's universally unique identifier (UUID). Each session instance generates a session UUID.\",\n                            \"deprecated\": true\n                          },\n                          \"session_id\": {\n                            \"type\": \"string\",\n                            \"description\": \"Unique session identifier. Each instance of the session will have its own session_id.\"\n                          },\n                          \"session_name\": {\n                            \"type\": \"string\",\n                            \"description\": \"Session name.\"\n                          },\n                          \"session_key\": {\n                            \"type\": \"string\",\n                            \"description\": \"The Video SDK custom session ID.\"\n                          },\n                          \"user_key\": {\n                            \"type\": \"string\",\n                            \"description\": \"Another identifier for the inviter. Can be a number or characters.\"\n                          },\n                          \"host_id\": {\n                            \"type\": \"string\",\n                            \"description\": \"The user ID of the session host.\"\n                          },\n                          \"participant\": {\n                            \"type\": \"object\",\n                            \"description\": \"Information about the invited user.\",\n                            \"required\": [\"invitee_name\", \"phone_number\", \"from_number\"],\n                            \"properties\": {\n                              \"invitee_name\": {\n                                \"type\": \"string\",\n                                \"description\": \"The user's name to display in the session.\"\n                              },\n                              \"phone_number\": {\n                                \"type\": \"integer\",\n                                \"format\": \"int64\",\n                                \"description\": \"The user's phone number.\"\n                              },\n                              \"from_number\": {\n                                \"type\": \"integer\",\n                                \"format\": \"int64\",\n                                \"description\": \"The number used to call out to the invited user.\"\n                              }\n                            },\n                            \"additionalProperties\": false\n                          }\n                        },\n                        \"additionalProperties\": false\n                      }\n                    },\n                    \"additionalProperties\": false\n                  }\n                },\n                \"additionalProperties\": false\n              },\n              \"examples\": {\n                \"json-example\": {\n                  \"summary\": \"JSON example\",\n                  \"value\": \"{\\n  \\\"event\\\": \\\"session.user_phone_callout_rejected\\\",\\n  \\\"event_ts\\\": 1626230691572,\\n  \\\"payload\\\": {\\n    \\\"account_id\\\": \\\"dzVA4QmMQfyISoRcpFO8CA\\\",\\n    \\\"object\\\": {\\n      \\\"id\\\": 713592696,\\n      \\\"uuid\\\": \\\"4444AAAiAAAAAiAiAiiAii==\\\",\\n      \\\"session_id\\\": \\\"4444AAAiAAAAAiAiAiiAii==\\\",\\n      \\\"session_name\\\": \\\"My Session\\\",\\n      \\\"session_key\\\": \\\"ABC36jaBI145\\\",\\n      \\\"user_key\\\": \\\"ASD74dfDI854\\\",\\n      \\\"host_id\\\": \\\"ICuPoX4ERtikRcKqkVxunQ\\\",\\n      \\\"participant\\\": {\\n        \\\"invitee_name\\\": \\\"Jill Chill\\\",\\n        \\\"phone_number\\\": 15555550100,\\n        \\\"from_number\\\": 13167900000\\n      }\\n    }\\n  }\\n}\"\n                }\n              }\n            }\n          }\n        },\n        \"responses\": {\n          \"200\": {\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"type\": \"object\",\n                  \"required\": [\"event\", \"event_ts\", \"payload\"],\n                  \"properties\": {\n                    \"event\": {\n                      \"type\": \"string\",\n                      \"description\": \"The name of the event.\"\n                    },\n                    \"event_ts\": {\n                      \"type\": \"integer\",\n                      \"format\": \"int64\",\n                      \"description\": \"A timestamp at which the event occurred.\"\n                    },\n                    \"payload\": {\n                      \"type\": \"object\",\n                      \"required\": [\"account_id\", \"object\"],\n                      \"properties\": {\n                        \"account_id\": {\n                          \"type\": \"string\",\n                          \"description\": \"The account ID of the session host.\"\n                        },\n                        \"object\": {\n                          \"type\": \"object\",\n                          \"description\": \"Information about the session.\",\n                          \"required\": [\n                            \"session_id\",\n                            \"session_name\",\n                            \"session_key\",\n                            \"user_key\",\n                            \"host_id\",\n                            \"participant\"\n                          ],\n                          \"properties\": {\n                            \"id\": {\n                              \"type\": \"integer\",\n                              \"format\": \"int64\",\n                              \"description\": \"The session ID.\",\n                              \"deprecated\": true\n                            },\n                            \"uuid\": {\n                              \"type\": \"string\",\n                              \"description\": \"The session's universally unique identifier (UUID). Each session instance generates a session UUID.\",\n                              \"deprecated\": true\n                            },\n                            \"session_id\": {\n                              \"type\": \"string\",\n                              \"description\": \"Unique session identifier. Each instance of the session will have its own session_id.\"\n                            },\n                            \"session_name\": {\n                              \"type\": \"string\",\n                              \"description\": \"Session name.\"\n                            },\n                            \"session_key\": {\n                              \"type\": \"string\",\n                              \"description\": \"The Video SDK custom session ID.\"\n                            },\n                            \"user_key\": {\n                              \"type\": \"string\",\n                              \"description\": \"Another identifier for the inviter. Can be a number or characters.\"\n                            },\n                            \"host_id\": {\n                              \"type\": \"string\",\n                              \"description\": \"The user ID of the session host.\"\n                            },\n                            \"participant\": {\n                              \"type\": \"object\",\n                              \"description\": \"Information about the invited user.\",\n                              \"required\": [\"invitee_name\", \"phone_number\", \"from_number\"],\n                              \"properties\": {\n                                \"invitee_name\": {\n                                  \"type\": \"string\",\n                                  \"description\": \"The user's name to display in the session.\"\n                                },\n                                \"phone_number\": {\n                                  \"type\": \"integer\",\n                                  \"format\": \"int64\",\n                                  \"description\": \"The user's phone number.\"\n                                },\n                                \"from_number\": {\n                                  \"type\": \"integer\",\n                                  \"format\": \"int64\",\n                                  \"description\": \"The number used to call out to the invited user.\"\n                                }\n                              },\n                              \"additionalProperties\": false\n                            }\n                          },\n                          \"additionalProperties\": false\n                        }\n                      },\n                      \"additionalProperties\": false\n                    }\n                  },\n                  \"additionalProperties\": false\n                },\n                \"examples\": {\n                  \"json-example\": {\n                    \"summary\": \"JSON example\",\n                    \"value\": \"{\\n  \\\"event\\\": \\\"session.user_phone_callout_rejected\\\",\\n  \\\"event_ts\\\": 1626230691572,\\n  \\\"payload\\\": {\\n    \\\"account_id\\\": \\\"dzVA4QmMQfyISoRcpFO8CA\\\",\\n    \\\"object\\\": {\\n      \\\"id\\\": 713592696,\\n      \\\"uuid\\\": \\\"4444AAAiAAAAAiAiAiiAii==\\\",\\n      \\\"session_id\\\": \\\"4444AAAiAAAAAiAiAiiAii==\\\",\\n      \\\"session_name\\\": \\\"My Session\\\",\\n      \\\"session_key\\\": \\\"ABC36jaBI145\\\",\\n      \\\"user_key\\\": \\\"ASD74dfDI854\\\",\\n      \\\"host_id\\\": \\\"ICuPoX4ERtikRcKqkVxunQ\\\",\\n      \\\"participant\\\": {\\n        \\\"invitee_name\\\": \\\"Jill Chill\\\",\\n        \\\"phone_number\\\": 15555550100,\\n        \\\"from_number\\\": 13167900000\\n      }\\n    }\\n  }\\n}\"\n                  }\n                }\n              }\n            }\n          }\n        }\n      }\n    },\n    \"session.user_room_system_callout_accepted\": {\n      \"post\": {\n        \"tags\": [\"session\"],\n        \"operationId\": \"session.user_room_system_callout_accepted\",\n        \"requestBody\": {\n          \"description\": \"# session.user_room_system_callout_accepted\\n\\nThe **Invited party answered a session invitation through phone (call out) via Zoom room** event is triggered every time a user [joins a session through phone (call out) from a Zoom room](https://support.zoom.us/hc/en-us/articles/205369035).\\n\\n## Prerequisites\\n\\n* **Event Subscriptions** must be enabled for your app with the following configurations:\\n* A valid **Event Notification Endpoint URL**.\\n* The **Invited party answered a session invitation through phone (call out) via Zoom room** subscription enabled under the **Session** event.\\n\\n\\n\\n**Event type**: `session.user_room_system_callout_accepted`\\n\",\n          \"content\": {\n            \"application/json\": {\n              \"schema\": {\n                \"type\": \"object\",\n                \"required\": [\"event\", \"event_ts\", \"payload\"],\n                \"properties\": {\n                  \"event\": {\n                    \"type\": \"string\",\n                    \"description\": \"The name of the event.\"\n                  },\n                  \"event_ts\": {\n                    \"type\": \"integer\",\n                    \"format\": \"int64\",\n                    \"description\": \"A timestamp at which the event occurred.\"\n                  },\n                  \"payload\": {\n                    \"type\": \"object\",\n                    \"required\": [\"account_id\", \"object\"],\n                    \"properties\": {\n                      \"account_id\": {\n                        \"type\": \"string\",\n                        \"description\": \"The account ID of the session host.\"\n                      },\n                      \"object\": {\n                        \"type\": \"object\",\n                        \"description\": \"Information about the session.\",\n                        \"required\": [\n                          \"session_id\",\n                          \"session_name\",\n                          \"host_id\",\n                          \"message_id\",\n                          \"inviter_name\",\n                          \"participant\"\n                        ],\n                        \"properties\": {\n                          \"id\": {\n                            \"type\": \"integer\",\n                            \"format\": \"int64\",\n                            \"description\": \"The session ID.\",\n                            \"deprecated\": true\n                          },\n                          \"uuid\": {\n                            \"type\": \"string\",\n                            \"description\": \"The session's universally unique identifier (UUID). Each session instance generates a session UUID.\",\n                            \"deprecated\": true\n                          },\n                          \"session_id\": {\n                            \"type\": \"string\",\n                            \"description\": \"Unique session identifier. Each instance of the session will have its own session_id.\"\n                          },\n                          \"session_name\": {\n                            \"type\": \"string\",\n                            \"description\": \"Session name.\"\n                          },\n                          \"host_id\": {\n                            \"type\": \"string\",\n                            \"description\": \"The user ID of the session host.\"\n                          },\n                          \"message_id\": {\n                            \"type\": \"string\",\n                            \"description\": \"The request unique identifier (UUID).\"\n                          },\n                          \"inviter_name\": {\n                            \"type\": \"string\",\n                            \"description\": \"The user name of the event's trigger.\"\n                          },\n                          \"participant\": {\n                            \"type\": \"object\",\n                            \"description\": \"Information about the invited participant.\",\n                            \"required\": [\"call_type\", \"device_ip\"],\n                            \"properties\": {\n                              \"call_type\": {\n                                \"type\": \"string\",\n                                \"description\": \"The type of call out. Use a value of h323 or sip.\"\n                              },\n                              \"device_ip\": {\n                                \"type\": \"string\",\n                                \"description\": \"The user's device IP address.\"\n                              }\n                            },\n                            \"additionalProperties\": true\n                          }\n                        },\n                        \"additionalProperties\": false\n                      }\n                    },\n                    \"additionalProperties\": false\n                  }\n                },\n                \"additionalProperties\": false\n              },\n              \"examples\": {\n                \"json-example\": {\n                  \"summary\": \"JSON example\",\n                  \"value\": \"{\\n  \\\"event\\\": \\\"session.user_room_system_callout_accepted\\\",\\n  \\\"event_ts\\\": 1626230691572,\\n  \\\"payload\\\": {\\n    \\\"account_id\\\": \\\"dzVA4QmMQfyISoRcpFO8CA\\\",\\n    \\\"object\\\": {\\n      \\\"id\\\": 713592696,\\n      \\\"uuid\\\": \\\"4444AAAiAAAAAiAiAiiAii==\\\",\\n      \\\"session_id\\\": \\\"4444AAAiAAAAAiAiAiiAii==\\\",\\n      \\\"session_name\\\": \\\"My Session\\\",\\n      \\\"host_id\\\": \\\"ICuPoX4ERtikRcKqkVxunQ\\\",\\n      \\\"message_id\\\": \\\"atsXxhSEQWit9t+U02HXNQ==\\\",\\n      \\\"inviter_name\\\": \\\"Jill Chill\\\",\\n      \\\"participant\\\": {\\n        \\\"call_type\\\": \\\"h323\\\",\\n        \\\"device_ip\\\": \\\"10.100.111.237\\\"\\n      }\\n    }\\n  }\\n}\"\n                }\n              }\n            }\n          }\n        },\n        \"responses\": {\n          \"200\": {\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"type\": \"object\",\n                  \"required\": [\"event\", \"event_ts\", \"payload\"],\n                  \"properties\": {\n                    \"event\": {\n                      \"type\": \"string\",\n                      \"description\": \"The name of the event.\"\n                    },\n                    \"event_ts\": {\n                      \"type\": \"integer\",\n                      \"format\": \"int64\",\n                      \"description\": \"A timestamp at which the event occurred.\"\n                    },\n                    \"payload\": {\n                      \"type\": \"object\",\n                      \"required\": [\"account_id\", \"object\"],\n                      \"properties\": {\n                        \"account_id\": {\n                          \"type\": \"string\",\n                          \"description\": \"The account ID of the session host.\"\n                        },\n                        \"object\": {\n                          \"type\": \"object\",\n                          \"description\": \"Information about the session.\",\n                          \"required\": [\n                            \"session_id\",\n                            \"session_name\",\n                            \"host_id\",\n                            \"message_id\",\n                            \"inviter_name\",\n                            \"participant\"\n                          ],\n                          \"properties\": {\n                            \"id\": {\n                              \"type\": \"integer\",\n                              \"format\": \"int64\",\n                              \"description\": \"The session ID.\",\n                              \"deprecated\": true\n                            },\n                            \"uuid\": {\n                              \"type\": \"string\",\n                              \"description\": \"The session's universally unique identifier (UUID). Each session instance generates a session UUID.\",\n                              \"deprecated\": true\n                            },\n                            \"session_id\": {\n                              \"type\": \"string\",\n                              \"description\": \"Unique session identifier. Each instance of the session will have its own session_id.\"\n                            },\n                            \"session_name\": {\n                              \"type\": \"string\",\n                              \"description\": \"Session name.\"\n                            },\n                            \"host_id\": {\n                              \"type\": \"string\",\n                              \"description\": \"The user ID of the session host.\"\n                            },\n                            \"message_id\": {\n                              \"type\": \"string\",\n                              \"description\": \"The request unique identifier (UUID).\"\n                            },\n                            \"inviter_name\": {\n                              \"type\": \"string\",\n                              \"description\": \"The user name of the event's trigger.\"\n                            },\n                            \"participant\": {\n                              \"type\": \"object\",\n                              \"description\": \"Information about the invited participant.\",\n                              \"required\": [\"call_type\", \"device_ip\"],\n                              \"properties\": {\n                                \"call_type\": {\n                                  \"type\": \"string\",\n                                  \"description\": \"The type of call out. Use a value of h323 or sip.\"\n                                },\n                                \"device_ip\": {\n                                  \"type\": \"string\",\n                                  \"description\": \"The user's device IP address.\"\n                                }\n                              },\n                              \"additionalProperties\": true\n                            }\n                          },\n                          \"additionalProperties\": false\n                        }\n                      },\n                      \"additionalProperties\": false\n                    }\n                  },\n                  \"additionalProperties\": false\n                },\n                \"examples\": {\n                  \"json-example\": {\n                    \"summary\": \"JSON example\",\n                    \"value\": \"{\\n  \\\"event\\\": \\\"session.user_room_system_callout_accepted\\\",\\n  \\\"event_ts\\\": 1626230691572,\\n  \\\"payload\\\": {\\n    \\\"account_id\\\": \\\"dzVA4QmMQfyISoRcpFO8CA\\\",\\n    \\\"object\\\": {\\n      \\\"id\\\": 713592696,\\n      \\\"uuid\\\": \\\"4444AAAiAAAAAiAiAiiAii==\\\",\\n      \\\"session_id\\\": \\\"4444AAAiAAAAAiAiAiiAii==\\\",\\n      \\\"session_name\\\": \\\"My Session\\\",\\n      \\\"host_id\\\": \\\"ICuPoX4ERtikRcKqkVxunQ\\\",\\n      \\\"message_id\\\": \\\"atsXxhSEQWit9t+U02HXNQ==\\\",\\n      \\\"inviter_name\\\": \\\"Jill Chill\\\",\\n      \\\"participant\\\": {\\n        \\\"call_type\\\": \\\"h323\\\",\\n        \\\"device_ip\\\": \\\"10.100.111.237\\\"\\n      }\\n    }\\n  }\\n}\"\n                  }\n                }\n              }\n            }\n          }\n        }\n      }\n    },\n    \"session.recording_stopped\": {\n      \"post\": {\n        \"tags\": [\"session\"],\n        \"operationId\": \"session.recording_stopped\",\n        \"requestBody\": {\n          \"description\": \"# session.recording_stopped\\n---\\n\\nEvent: `session.recording_stopped`\\n\\n## Event description\\n\\nThe **Session recording stopped** event is triggered every time a previously paused recording of a session is resumed.\\n\\nOnly a session host or co-host can start, pause, resume, or stop a cloud recording. A recording is considered complete **after** the host or co-host ends the session. See [Enable cloud recording](https://developers.zoom.us/docs/video-sdk/account/#enable-cloud-recording) for details.\\n\\n## Prerequisites\\n\\n* Cloud Recording must be enabled on the Video SDK account.\\n* Event Subscriptions must be enabled for your app with the following configurations:\\n  * A valid Event Notification Endpoint URL.\\n  * **Session recording stopped** subscription enabled under the **Recording** event.\\n\\nThe tabs below display the complete schema, payload with data types, and an example of the `session.recording_stopped` event notification:\\n\\n\\n\\n**Event type**: `session.recording_stopped`\\n\",\n          \"content\": {\n            \"application/json\": {\n              \"schema\": {\n                \"type\": \"object\",\n                \"required\": [\"event\", \"event_ts\", \"payload\"],\n                \"properties\": {\n                  \"event\": {\n                    \"type\": \"string\",\n                    \"enum\": [\"session.recording_stopped\"],\n                    \"description\": \"The event's name.\"\n                  },\n                  \"event_ts\": {\n                    \"type\": \"integer\",\n                    \"format\": \"int64\",\n                    \"description\": \"A timestamp, in milliseconds since epoch, at which the event occurred.\"\n                  },\n                  \"payload\": {\n                    \"type\": \"object\",\n                    \"required\": [\"account_id\", \"object\"],\n                    \"properties\": {\n                      \"account_id\": {\n                        \"type\": \"string\",\n                        \"description\": \"The Video SDK account ID.\"\n                      },\n                      \"object\": {\n                        \"type\": \"object\",\n                        \"description\": \"Information about the session. This object only returns updated properties.\",\n                        \"required\": [\n                          \"session_id\",\n                          \"session_name\",\n                          \"session_key\",\n                          \"start_time\",\n                          \"timezone\",\n                          \"recording_file\"\n                        ],\n                        \"properties\": {\n                          \"session_id\": {\n                            \"type\": \"string\",\n                            \"description\": \"Unique session identifier. Each instance of the session will have its own session_id.\"\n                          },\n                          \"session_name\": {\n                            \"type\": \"string\",\n                            \"description\": \"Session name.\"\n                          },\n                          \"session_key\": {\n                            \"type\": \"string\",\n                            \"description\": \"The Video SDK custom session ID.\"\n                          },\n                          \"start_time\": {\n                            \"type\": \"string\",\n                            \"format\": \"date-time\",\n                            \"description\": \"The time at which the session started.\"\n                          },\n                          \"timezone\": {\n                            \"type\": \"string\",\n                            \"description\": \"The user's timezone.\"\n                          },\n                          \"recording_file\": {\n                            \"type\": \"object\",\n                            \"properties\": {\n                              \"recording_start\": {\n                                \"type\": \"string\",\n                                \"description\": \"The recording start time.\"\n                              },\n                              \"recording_end\": {\n                                \"type\": \"string\",\n                                \"description\": \"The recording end time. Response in general query.\"\n                              }\n                            }\n                          }\n                        },\n                        \"additionalProperties\": false\n                      }\n                    },\n                    \"additionalProperties\": false\n                  }\n                },\n                \"additionalProperties\": false\n              },\n              \"examples\": {\n                \"json-example\": {\n                  \"summary\": \"JSON example\",\n                  \"value\": \"{\\n  \\\"event\\\": \\\"session.recording_stopped\\\",\\n  \\\"event_ts\\\": 1626230691572,\\n  \\\"payload\\\": {\\n    \\\"account_id\\\": \\\"AAAAAABBBB\\\",\\n    \\\"object\\\": {\\n      \\\"session_id\\\": 1234567890,\\n      \\\"session_name\\\": \\\"My Personal Recording\\\",\\n      \\\"session_key\\\": \\\"ABC36jaBI145\\\",\\n      \\\"start_time\\\": \\\"2021-07-13T21:44:51Z\\\",\\n      \\\"timezone\\\": \\\"America/Los_Angeles\\\",\\n      \\\"recording_file\\\": {\\n          \\\"recording_start\\\": \\\"2021-03-23T22:14:57Z\\\",\\n          \\\"recording_end\\\": \\\"2021-03-23T23:15:41Z\\\"\\n      }\\n    }\\n  }\\n}\"\n                }\n              }\n            }\n          }\n        },\n        \"responses\": {\n          \"200\": {\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"type\": \"object\",\n                  \"required\": [\"event\", \"event_ts\", \"payload\"],\n                  \"properties\": {\n                    \"event\": {\n                      \"type\": \"string\",\n                      \"enum\": [\"session.recording_stopped\"],\n                      \"description\": \"The event's name.\"\n                    },\n                    \"event_ts\": {\n                      \"type\": \"integer\",\n                      \"format\": \"int64\",\n                      \"description\": \"A timestamp, in milliseconds since epoch, at which the event occurred.\"\n                    },\n                    \"payload\": {\n                      \"type\": \"object\",\n                      \"required\": [\"account_id\", \"object\"],\n                      \"properties\": {\n                        \"account_id\": {\n                          \"type\": \"string\",\n                          \"description\": \"The Video SDK account ID.\"\n                        },\n                        \"object\": {\n                          \"type\": \"object\",\n                          \"description\": \"Information about the session. This object only returns updated properties.\",\n                          \"required\": [\n                            \"session_id\",\n                            \"session_name\",\n                            \"session_key\",\n                            \"start_time\",\n                            \"timezone\",\n                            \"recording_file\"\n                          ],\n                          \"properties\": {\n                            \"session_id\": {\n                              \"type\": \"string\",\n                              \"description\": \"Unique session identifier. Each instance of the session will have its own session_id.\"\n                            },\n                            \"session_name\": {\n                              \"type\": \"string\",\n                              \"description\": \"Session name.\"\n                            },\n                            \"session_key\": {\n                              \"type\": \"string\",\n                              \"description\": \"The Video SDK custom session ID.\"\n                            },\n                            \"start_time\": {\n                              \"type\": \"string\",\n                              \"format\": \"date-time\",\n                              \"description\": \"The time at which the session started.\"\n                            },\n                            \"timezone\": {\n                              \"type\": \"string\",\n                              \"description\": \"The user's timezone.\"\n                            },\n                            \"recording_file\": {\n                              \"type\": \"object\",\n                              \"properties\": {\n                                \"recording_start\": {\n                                  \"type\": \"string\",\n                                  \"description\": \"The recording start time.\"\n                                },\n                                \"recording_end\": {\n                                  \"type\": \"string\",\n                                  \"description\": \"The recording end time. Response in general query.\"\n                                }\n                              }\n                            }\n                          },\n                          \"additionalProperties\": false\n                        }\n                      },\n                      \"additionalProperties\": false\n                    }\n                  },\n                  \"additionalProperties\": false\n                },\n                \"examples\": {\n                  \"json-example\": {\n                    \"summary\": \"JSON example\",\n                    \"value\": \"{\\n  \\\"event\\\": \\\"session.recording_stopped\\\",\\n  \\\"event_ts\\\": 1626230691572,\\n  \\\"payload\\\": {\\n    \\\"account_id\\\": \\\"AAAAAABBBB\\\",\\n    \\\"object\\\": {\\n      \\\"session_id\\\": 1234567890,\\n      \\\"session_name\\\": \\\"My Personal Recording\\\",\\n      \\\"session_key\\\": \\\"ABC36jaBI145\\\",\\n      \\\"start_time\\\": \\\"2021-07-13T21:44:51Z\\\",\\n      \\\"timezone\\\": \\\"America/Los_Angeles\\\",\\n      \\\"recording_file\\\": {\\n          \\\"recording_start\\\": \\\"2021-03-23T22:14:57Z\\\",\\n          \\\"recording_end\\\": \\\"2021-03-23T23:15:41Z\\\"\\n      }\\n    }\\n  }\\n}\"\n                  }\n                }\n              }\n            }\n          }\n        }\n      }\n    }\n  }\n}\n"
  },
  {
    "path": "specs/json-schema-ref-parser/ResolutionStep.v1_0_1.yaml",
    "content": "components:\n  schemas:\n    ResolutionStep_v1_0_1_ResolutionStep:\n      type: object\n      properties:\n        ResolutionType:\n          oneOf:\n            - $ref: '#/components/schemas/ResolutionStep_v1_0_1_ResolutionType'\n        ActionName:\n          type: string\n          description: Name of the action\n    ResolutionStep_v1_0_1_ResolutionType:\n      type: string\n      enum:\n        - ContactVendor\n        - ResetToDefaults\n        - RetryOperation\n      description: Types of resolution actions\n    ResolutionStep_v1_0_1_ActionParameters:\n      type: object\n      properties:\n        ActionId:\n          type: string\n        ActionType:\n          $ref: '#/components/schemas/ResolutionStep_v1_0_1_ResolutionType'\n"
  },
  {
    "path": "specs/json-schema-ref-parser/circular-ref-with-description.json",
    "content": "{\n  \"schemas\": {\n    \"Foo\": {\n      \"$ref\": \"#/schemas/Bar\"\n    },\n    \"Bar\": {\n      \"description\": \"ok\",\n      \"$ref\": \"#/schemas/Foo\"\n    }\n  }\n}\n"
  },
  {
    "path": "specs/json-schema-ref-parser/external-with-siblings.json",
    "content": "{\n  \"components\": {\n    \"schemas\": {\n      \"ResolutionStep\": {\n        \"type\": \"object\",\n        \"properties\": {\n          \"ResolutionType\": {\n            \"oneOf\": [\n              {\n                \"$ref\": \"#/components/schemas/ResolutionType\"\n              }\n            ]\n          },\n          \"ActionName\": {\n            \"type\": \"string\"\n          }\n        }\n      },\n      \"ResolutionType\": {\n        \"type\": \"string\",\n        \"enum\": [\"ContactVendor\", \"ResetToDefaults\", \"RetryOperation\"]\n      },\n      \"ActionInfo\": {\n        \"type\": \"object\",\n        \"properties\": {\n          \"ActionId\": {\n            \"type\": \"string\"\n          }\n        }\n      }\n    }\n  }\n}\n"
  },
  {
    "path": "specs/json-schema-ref-parser/main-with-external-siblings.json",
    "content": "{\n  \"openapi\": \"3.0.0\",\n  \"info\": {\n    \"title\": \"Test API\",\n    \"version\": \"1.0.0\"\n  },\n  \"paths\": {\n    \"/resolution\": {\n      \"get\": {\n        \"summary\": \"Get resolution step\",\n        \"responses\": {\n          \"200\": {\n            \"description\": \"Success\",\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"$ref\": \"external-with-siblings.json#/components/schemas/ResolutionStep\"\n                }\n              }\n            }\n          }\n        }\n      }\n    },\n    \"/action\": {\n      \"get\": {\n        \"summary\": \"Get action info\",\n        \"responses\": {\n          \"200\": {\n            \"description\": \"Success\",\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"$ref\": \"external-with-siblings.json#/components/schemas/ActionInfo\"\n                }\n              }\n            }\n          }\n        }\n      }\n    }\n  }\n}\n"
  },
  {
    "path": "specs/json-schema-ref-parser/multiple-refs.json",
    "content": "{\n  \"paths\": {\n    \"/test1/{pathId}\": {\n      \"get\": {\n        \"summary\": \"First endpoint using the same pathId schema\",\n        \"parameters\": [\n          {\n            \"$ref\": \"path-parameter.json#/components/parameters/pathId\"\n          }\n        ],\n        \"responses\": {\n          \"200\": {\n            \"description\": \"Test 1 response\"\n          }\n        }\n      }\n    },\n    \"/test2/{pathId}\": {\n      \"get\": {\n        \"summary\": \"Second endpoint using the same pathId schema\",\n        \"parameters\": [\n          {\n            \"$ref\": \"path-parameter.json#/components/parameters/pathId\"\n          }\n        ],\n        \"responses\": {\n          \"200\": {\n            \"description\": \"Test 2 response\"\n          }\n        }\n      }\n    }\n  }\n}\n"
  },
  {
    "path": "specs/json-schema-ref-parser/openapi-paths-ref.json",
    "content": "{\n  \"openapi\": \"3.1.0\",\n  \"info\": {\n    \"title\": \"Sample API\",\n    \"version\": \"1.0.0\"\n  },\n  \"paths\": {\n    \"/foo\": {\n      \"get\": {\n        \"summary\": \"Get foo\",\n        \"responses\": {\n          \"200\": {\n            \"description\": \"OK\",\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"type\": \"object\",\n                  \"properties\": {\n                    \"bar\": {\n                      \"type\": \"string\"\n                    }\n                  }\n                }\n              }\n            }\n          }\n        }\n      },\n      \"post\": {\n        \"summary\": \"Create foo\",\n        \"responses\": {\n          \"200\": {\n            \"description\": \"OK\",\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"$ref\": \"#/paths/~1foo/get/responses/200/content/application~1json/schema\"\n                }\n              }\n            }\n          }\n        }\n      }\n    }\n  }\n}\n"
  },
  {
    "path": "specs/json-schema-ref-parser/path-parameter.json",
    "content": "{\n  \"components\": {\n    \"parameters\": {\n      \"pathId\": {\n        \"name\": \"pathId\",\n        \"in\": \"path\",\n        \"required\": true,\n        \"schema\": {\n          \"type\": \"string\",\n          \"format\": \"uuid\",\n          \"description\": \"Unique identifier for the path\"\n        }\n      }\n    }\n  }\n}\n"
  },
  {
    "path": "specs/json-schema-ref-parser/redfish-like.yaml",
    "content": "openapi: 3.0.0\ninfo:\n  title: Redfish-like API\n  version: '1.0.0'\n  description: Test API simulating Redfish structure with versioned schemas\npaths:\n  /redfish/v1/Systems:\n    get:\n      summary: Get Systems\n      responses:\n        '200':\n          description: Success\n          content:\n            application/json:\n              schema:\n                $ref: 'ResolutionStep.v1_0_1.yaml#/components/schemas/ResolutionStep_v1_0_1_ResolutionStep'\n        default:\n          description: Error\n  /redfish/v1/Actions:\n    post:\n      summary: Submit Action\n      responses:\n        '200':\n          description: Success\n          content:\n            application/json:\n              schema:\n                $ref: 'ResolutionStep.v1_0_1.yaml#/components/schemas/ResolutionStep_v1_0_1_ActionParameters'\n"
  },
  {
    "path": "specs/json-schema-ref-parser/sibling-schema-collision-other.json",
    "content": "{\n  \"components\": {\n    \"schemas\": {\n      \"OtherSchema\": {\n        \"type\": \"object\",\n        \"properties\": {\n          \"code\": {\n            \"$ref\": \"#/components/schemas/Status\"\n          }\n        }\n      },\n      \"Status\": {\n        \"type\": \"integer\",\n        \"enum\": [0, 1, 2]\n      }\n    }\n  }\n}\n"
  },
  {
    "path": "specs/json-schema-ref-parser/sibling-schema-collision-root.json",
    "content": "{\n  \"openapi\": \"3.1.0\",\n  \"info\": { \"title\": \"Collision Test\", \"version\": \"1.0.0\" },\n  \"paths\": {\n    \"/main\": {\n      \"get\": {\n        \"responses\": {\n          \"200\": {\n            \"description\": \"ok\",\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"$ref\": \"sibling-schema-collision-wrapper.json#/components/schemas/MainSchema\"\n                }\n              }\n            }\n          }\n        }\n      }\n    },\n    \"/other\": {\n      \"get\": {\n        \"responses\": {\n          \"200\": {\n            \"description\": \"ok\",\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"$ref\": \"sibling-schema-collision-other.json#/components/schemas/OtherSchema\"\n                }\n              }\n            }\n          }\n        }\n      }\n    }\n  }\n}\n"
  },
  {
    "path": "specs/json-schema-ref-parser/sibling-schema-collision-versioned.json",
    "content": "{\n  \"components\": {\n    \"schemas\": {\n      \"MainSchema\": {\n        \"type\": \"object\",\n        \"properties\": {\n          \"status\": {\n            \"$ref\": \"#/components/schemas/Status\"\n          }\n        }\n      },\n      \"Status\": {\n        \"type\": \"string\",\n        \"enum\": [\"active\", \"inactive\"]\n      }\n    }\n  }\n}\n"
  },
  {
    "path": "specs/json-schema-ref-parser/sibling-schema-collision-wrapper.json",
    "content": "{\n  \"components\": {\n    \"schemas\": {\n      \"MainSchema\": {\n        \"$ref\": \"sibling-schema-collision-versioned.json#/components/schemas/MainSchema\"\n      }\n    }\n  }\n}\n"
  },
  {
    "path": "specs/json-schema-ref-parser/sibling-schema-direct-root.json",
    "content": "{\n  \"openapi\": \"3.1.0\",\n  \"info\": { \"title\": \"Direct Sibling Schema Test\", \"version\": \"1.0.0\" },\n  \"paths\": {\n    \"/test\": {\n      \"get\": {\n        \"responses\": {\n          \"200\": {\n            \"description\": \"ok\",\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"$ref\": \"sibling-schema-versioned.json#/components/schemas/Versioned_Schema\"\n                }\n              }\n            }\n          }\n        }\n      }\n    }\n  }\n}\n"
  },
  {
    "path": "specs/json-schema-ref-parser/sibling-schema-extended-root.json",
    "content": "{\n  \"openapi\": \"3.1.0\",\n  \"info\": {\n    \"title\": \"Extended Wrapper Sibling Schema Test\",\n    \"version\": \"1.0.0\"\n  },\n  \"paths\": {\n    \"/test\": {\n      \"get\": {\n        \"responses\": {\n          \"200\": {\n            \"description\": \"ok\",\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"$ref\": \"sibling-schema-extended-wrapper.json#/components/schemas/Wrapper_Schema\"\n                }\n              }\n            }\n          }\n        }\n      }\n    }\n  }\n}\n"
  },
  {
    "path": "specs/json-schema-ref-parser/sibling-schema-extended-wrapper.json",
    "content": "{\n  \"components\": {\n    \"schemas\": {\n      \"Wrapper_Schema\": {\n        \"description\": \"Wrapper that extends the versioned schema\",\n        \"$ref\": \"sibling-schema-versioned.json#/components/schemas/Versioned_Schema\"\n      }\n    }\n  }\n}\n"
  },
  {
    "path": "specs/json-schema-ref-parser/sibling-schema-multi-root.json",
    "content": "{\n  \"openapi\": \"3.1.0\",\n  \"info\": {\n    \"title\": \"Multiple Siblings Test\",\n    \"version\": \"1.0.0\"\n  },\n  \"paths\": {\n    \"/resource\": {\n      \"get\": {\n        \"responses\": {\n          \"200\": {\n            \"description\": \"ok\",\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"$ref\": \"sibling-schema-multi-wrapper.json#/components/schemas/Resource_Schema\"\n                }\n              }\n            }\n          }\n        }\n      }\n    }\n  }\n}\n"
  },
  {
    "path": "specs/json-schema-ref-parser/sibling-schema-multi-versioned.json",
    "content": "{\n  \"components\": {\n    \"schemas\": {\n      \"Resource_v1_Schema\": {\n        \"type\": \"object\",\n        \"properties\": {\n          \"status\": {\n            \"$ref\": \"#/components/schemas/Resource_v1_StatusEnum\"\n          },\n          \"health\": {\n            \"$ref\": \"#/components/schemas/Resource_v1_HealthEnum\"\n          },\n          \"name\": {\n            \"type\": \"string\"\n          }\n        }\n      },\n      \"Resource_v1_StatusEnum\": {\n        \"type\": \"string\",\n        \"enum\": [\"enabled\", \"disabled\", \"standby\"]\n      },\n      \"Resource_v1_HealthEnum\": {\n        \"type\": \"string\",\n        \"enum\": [\"ok\", \"warning\", \"critical\"]\n      }\n    }\n  }\n}\n"
  },
  {
    "path": "specs/json-schema-ref-parser/sibling-schema-multi-wrapper.json",
    "content": "{\n  \"components\": {\n    \"schemas\": {\n      \"Resource_Schema\": {\n        \"description\": \"Wrapper with extra description\",\n        \"$ref\": \"sibling-schema-multi-versioned.json#/components/schemas/Resource_v1_Schema\"\n      }\n    }\n  }\n}\n"
  },
  {
    "path": "specs/json-schema-ref-parser/sibling-schema-root.json",
    "content": "{\n  \"openapi\": \"3.1.0\",\n  \"info\": { \"title\": \"Sibling Schema Test\", \"version\": \"1.0.0\" },\n  \"paths\": {\n    \"/test\": {\n      \"get\": {\n        \"responses\": {\n          \"200\": {\n            \"description\": \"ok\",\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"$ref\": \"sibling-schema-wrapper.json#/components/schemas/Wrapper_Schema\"\n                }\n              }\n            }\n          }\n        }\n      }\n    }\n  }\n}\n"
  },
  {
    "path": "specs/json-schema-ref-parser/sibling-schema-versioned.json",
    "content": "{\n  \"components\": {\n    \"schemas\": {\n      \"Versioned_Schema\": {\n        \"type\": \"object\",\n        \"properties\": {\n          \"name\": {\n            \"type\": \"string\"\n          },\n          \"status\": {\n            \"$ref\": \"#/components/schemas/Versioned_MyEnum\"\n          }\n        }\n      },\n      \"Versioned_MyEnum\": {\n        \"type\": \"string\",\n        \"enum\": [\"active\", \"inactive\", \"pending\"]\n      }\n    }\n  }\n}\n"
  },
  {
    "path": "specs/json-schema-ref-parser/sibling-schema-wrapper.json",
    "content": "{\n  \"components\": {\n    \"schemas\": {\n      \"Wrapper_Schema\": {\n        \"$ref\": \"sibling-schema-versioned.json#/components/schemas/Versioned_Schema\"\n      }\n    }\n  }\n}\n"
  },
  {
    "path": "specs/json-schema-ref-parser/test-siblings.yaml",
    "content": "components:\n  schemas:\n    MainSchema:\n      type: object\n      properties:\n        typeField:\n          $ref: '#/components/schemas/SiblingSchema'\n        name:\n          type: string\n    SiblingSchema:\n      type: string\n      enum:\n        - TypeA\n        - TypeB\n"
  },
  {
    "path": "tsconfig.base.json",
    "content": "{\n  \"compilerOptions\": {\n    \"declaration\": true,\n    \"declarationMap\": true,\n    \"esModuleInterop\": true,\n    \"forceConsistentCasingInFileNames\": true,\n    \"isolatedModules\": true,\n    \"module\": \"ES2022\",\n    \"moduleResolution\": \"Bundler\",\n    \"noEmit\": false,\n    \"noUncheckedIndexedAccess\": true,\n    \"skipLibCheck\": true,\n    \"sourceMap\": true,\n    \"strict\": true,\n    \"target\": \"ES2022\",\n    \"verbatimModuleSyntax\": true\n  }\n}\n"
  },
  {
    "path": "tsconfig.json",
    "content": "{\n  \"files\": [],\n  \"references\": [\n    { \"path\": \"./packages/codegen-core\" },\n    { \"path\": \"./packages/json-schema-ref-parser\" },\n    { \"path\": \"./packages/openapi-python\" },\n    { \"path\": \"./packages/openapi-ts\" },\n    { \"path\": \"./packages/shared\" },\n    { \"path\": \"./packages/types\" }\n  ]\n}\n"
  },
  {
    "path": "turbo.json",
    "content": "{\n  \"$schema\": \"./node_modules/turbo/schema.json\",\n  \"tasks\": {\n    \"build\": {\n      \"dependsOn\": [\"^build\"],\n      \"inputs\": [\n        \"src/**\",\n        \"!src/**/*.test.ts\",\n        \"package.json\",\n        \"tsconfig.json\",\n        \"tsdown.config.ts\"\n      ],\n      \"outputs\": [\n        \".next/**\",\n        \"!.next/cache/**\",\n        \".output/**\",\n        \".svelte-kit/**\",\n        \".vitepress/dist/**\",\n        \"dist/**\"\n      ]\n    },\n    \"dev\": {\n      \"cache\": false,\n      \"persistent\": true\n    },\n    \"lint\": {\n      \"dependsOn\": [\"^build\"],\n      \"inputs\": [\"src/**\", \"test/**\", \"*.config.*\", \"package.json\"]\n    },\n    \"//#test\": {\n      \"cache\": true,\n      \"dependsOn\": [\"^build\"],\n      \"inputs\": [\"src/**\", \"test/**\", \"*.config.*\", \"package.json\", \"vitest.config.ts\"],\n      \"outputs\": [\"coverage/**\"]\n    },\n    \"//#test:coverage\": {\n      \"dependsOn\": [\"^build\"],\n      \"inputs\": [\"src/**\", \"test/**\", \"*.config.*\", \"package.json\", \"vitest.config.ts\"],\n      \"outputs\": [\"coverage/**\"]\n    },\n    \"//#test:update\": {\n      \"cache\": false,\n      \"dependsOn\": [\"^build\"]\n    },\n    \"//#test:watch\": {\n      \"cache\": false,\n      \"dependsOn\": [\"^build\"],\n      \"persistent\": true\n    },\n    \"typecheck\": {\n      \"dependsOn\": [\"^build\"],\n      \"inputs\": [\n        \"src/**\",\n        \"test/**\",\n        \"*.config.*\",\n        \"package.json\",\n        \"tsconfig.json\",\n        \"pyproject.toml\"\n      ]\n    }\n  }\n}\n"
  },
  {
    "path": "vercel.json",
    "content": "{\n  \"$schema\": \"https://openapi.vercel.sh/vercel.json\",\n  \"buildCommand\": \"pnpm --filter docs build\",\n  \"cleanUrls\": true,\n  \"devCommand\": \"pnpm --filter docs dev\",\n  \"framework\": \"vitepress\",\n  \"installCommand\": \"pnpm install --filter docs\",\n  \"outputDirectory\": \"docs/.vitepress/dist\",\n  \"redirects\": [\n    {\n      \"source\": \"/openapi-ts\",\n      \"destination\": \"/openapi-ts/get-started\",\n      \"permanent\": true\n    },\n    {\n      \"source\": \"/openapi-ts/custom-plugin\",\n      \"destination\": \"/openapi-ts/plugins/custom\",\n      \"permanent\": true\n    },\n    {\n      \"source\": \"/openapi-ts/plugins\",\n      \"destination\": \"/openapi-ts/core\",\n      \"permanent\": true\n    },\n    {\n      \"source\": \"/openapi-ts/output/json-schema\",\n      \"destination\": \"/openapi-ts/plugins/schemas\",\n      \"permanent\": true\n    },\n    {\n      \"source\": \"/openapi-ts/output/sdk\",\n      \"destination\": \"/openapi-ts/plugins/sdk\",\n      \"permanent\": true\n    },\n    {\n      \"source\": \"/openapi-ts/transformers\",\n      \"destination\": \"/openapi-ts/plugins/transformers\",\n      \"permanent\": true\n    },\n    {\n      \"source\": \"/openapi-ts/output/typescript\",\n      \"destination\": \"/openapi-ts/plugins/typescript\",\n      \"permanent\": true\n    }\n  ],\n  \"trailingSlash\": false\n}\n"
  },
  {
    "path": "vitest.config.ts",
    "content": "import { platform } from 'node:os';\n\nimport { defineConfig } from 'vitest/config';\n\nexport default defineConfig({\n  test: {\n    coverage: {\n      exclude: ['bin', 'dist', 'src/**/*.d.ts'],\n      include: ['src/**/*.ts', 'src/**/*.tsx', 'src/**/*.vue'],\n      provider: 'v8',\n    },\n    globals: true,\n    projects: [\n      'examples/*/vitest.config.ts',\n      {\n        extends: true,\n        test: {\n          name: '@hey-api/codegen-core',\n          root: 'packages/codegen-core',\n        },\n      },\n      {\n        extends: true,\n        test: {\n          globalSetup: ['./src/py-compiler/__tests__/globalTeardown.ts'],\n          name: '@hey-api/openapi-python',\n          root: 'packages/openapi-python',\n          setupFiles: ['./vitest.setup.ts'],\n        },\n      },\n      {\n        extends: true,\n        test: {\n          globalSetup: ['./src/ts-compiler/__tests__/globalTeardown.ts'],\n          name: '@hey-api/openapi-ts',\n          root: 'packages/openapi-ts',\n          setupFiles: ['./vitest.setup.ts'],\n        },\n      },\n      {\n        extends: true,\n        test: {\n          name: '@hey-api/shared',\n          root: 'packages/shared',\n        },\n      },\n      {\n        extends: true,\n        test: {\n          name: '@hey-api/json-schema-ref-parser',\n          root: 'packages/json-schema-ref-parser',\n        },\n      },\n      {\n        extends: true,\n        test: {\n          name: '@test/openapi-ts',\n          root: 'packages/openapi-ts-tests/main',\n          setupFiles: ['./vitest.setup.ts'],\n        },\n      },\n      {\n        extends: true,\n        test: {\n          name: '@test/openapi-ts-nestjs-v11',\n          root: 'packages/openapi-ts-tests/nestjs/v11',\n          setupFiles: ['./vitest.setup.ts'],\n        },\n      },\n      {\n        extends: true,\n        test: {\n          globalSetup: ['./test/globalTeardown.ts'],\n          name: '@test/openapi-ts-orpc-v1',\n          root: 'packages/openapi-ts-tests/orpc/v1',\n          setupFiles: ['./vitest.setup.ts'],\n        },\n      },\n      {\n        extends: true,\n        test: {\n          name: '@test/openapi-ts-sdks',\n          root: 'packages/openapi-ts-tests/sdks',\n          setupFiles: ['./vitest.setup.ts'],\n        },\n      },\n      {\n        extends: true,\n        test: {\n          name: '@test/openapi-ts-valibot-v1',\n          root: 'packages/openapi-ts-tests/valibot/v1',\n          setupFiles: ['./vitest.setup.ts'],\n        },\n      },\n      {\n        extends: true,\n        test: {\n          name: '@test/openapi-ts-zod-v3',\n          root: 'packages/openapi-ts-tests/zod/v3',\n          setupFiles: ['./vitest.setup.ts'],\n        },\n      },\n      {\n        extends: true,\n        test: {\n          name: '@test/openapi-ts-zod-v4',\n          root: 'packages/openapi-ts-tests/zod/v4',\n          setupFiles: ['./vitest.setup.ts'],\n        },\n      },\n      {\n        extends: true,\n        test: {\n          name: '@test/openapi-python-sdks',\n          root: 'packages/openapi-python-tests/sdks',\n          setupFiles: ['./vitest.setup.ts'],\n        },\n      },\n      {\n        extends: true,\n        test: {\n          name: '@test/openapi-python-pydantic-v2',\n          root: 'packages/openapi-python-tests/pydantic/v2',\n          setupFiles: ['./vitest.setup.ts'],\n        },\n      },\n      {\n        extends: true,\n        test: {\n          name: '@hey-api/custom-client',\n          root: 'packages/custom-client',\n        },\n      },\n    ],\n    testTimeout: platform() === 'win32' ? 10000 : 5000,\n  },\n});\n"
  }
]